@stackable-labs/embeddables 1.94.2 → 1.95.1

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,Wo){"use strict";var hb=Object.defineProperty;var gb=(d,be,x)=>be in d?hb(d,be,{enumerable:!0,configurable:!0,writable:!0,value:x}):d[be]=x;var sr=(d,be,x)=>gb(d,typeof be!="symbol"?be+"":be,x);function ir(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const p=ir(x),Rt=ir(Wo),Ll='/*! 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)}}',zl=()=>{try{return"0b5bae8b-8fee-404a-b02a-049252620438"}catch{return"dev"}},tt=new Map,Dl=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 n=document.createElement("iframe");n.setAttribute("sandbox","allow-scripts allow-same-origin"),n.style.display="none",n.style.width="0",n.style.height="0",n.style.border="none";const r=e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js"),a=r?new URL(e.bundleUrl).origin:"null";if(r){const l=new URL(e.bundleUrl);l.searchParams.set("__extensionId",e.id),n.src=l.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${l.toString()}`)}else{let l="";try{const f=zl();l=await(await fetch(`${e.bundleUrl}?_b=${f}`)).text()}catch(f){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,f)}const u=`<!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,Wo){"use strict";var hb=Object.defineProperty;var gb=(d,be,x)=>be in d?hb(d,be,{enumerable:!0,configurable:!0,writable:!0,value:x}):d[be]=x;var sr=(d,be,x)=>gb(d,typeof be!="symbol"?be+"":be,x);function ir(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const p=ir(x),Rt=ir(Wo),zl='/*! 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)}}',Dl=()=>{try{return"d316593a-bbc2-4a87-8ba3-5d3ad01f4b9c"}catch{return"dev"}},tt=new Map,$l=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 n=document.createElement("iframe");n.setAttribute("sandbox","allow-scripts allow-same-origin"),n.style.display="none",n.style.width="0",n.style.height="0",n.style.border="none";const r=e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js"),a=r?new URL(e.bundleUrl).origin:"null";if(r){const l=new URL(e.bundleUrl);l.searchParams.set("__extensionId",e.id),n.src=l.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${l.toString()}`)}else{let l="";try{const f=Dl();l=await(await fetch(`${e.bundleUrl}?_b=${f}`)).text()}catch(f){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,f)}const u=`<!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
@@ -9,12 +9,12 @@
9
9
  <script>var __STACKABLE_EXTENSION_ID__ = ${JSON.stringify(e.id)}; var process = { env: { NODE_ENV: "production" } };<\/script>
10
10
  <script type="module">${l}<\/script>
11
11
  </body>
12
- </html>`;n.srcdoc=u,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${u.substring(0,300)}`)}t.appendChild(n);const s={manifest:e.manifest,extensionId:e.id,iframe:n,ready:!1,expectedOrigin:a,messageHandlers:new Set},i=l=>{if(l.origin!==s.expectedOrigin)return;const u=l.data;!u||typeof u!="object"||!("type"in u)||("extensionId"in u?u.extensionId:void 0)!==e.id||(u.type==="extension-ready"&&(s.ready=!0),s.messageHandlers.forEach(c=>c(u)))};return window.addEventListener("message",i),tt.set(e.id,s),s},Me=(e,t)=>{const o=tt.get(e);if(!(o!=null&&o.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}const n=o.expectedOrigin==="null"?"*":o.expectedOrigin;o.iframe.contentWindow.postMessage(t,n)},ut=e=>tt.get(e),$l=e=>{const t=tt.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),tt.delete(e))},ft=()=>tt,Uo=e=>e,Fl={SUPER_ADMIN:"super_admin"};new Set(Object.values(Fl));const lr={ADMIN:"org:admin",MEMBER:"org:member"},Bl=[lr.ADMIN];[...Object.values(Bl),lr.MEMBER];const cr={"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"]}},pt=cr,Mt=Object.keys(cr),Hl=Object.fromEntries(Mt.map(e=>[e,pt[e].attributes]));Object.fromEntries(Mt.filter(e=>pt[e].attributeValues).map(e=>[e,pt[e].attributeValues]));const Vl=Object.fromEntries(Mt.filter(e=>pt[e].children).map(e=>[e,pt[e].children]));Object.fromEntries(Mt.map(e=>[e,pt[e].category]));const ht={NEW_CONVERSATION:"newConversation",SET_CONVERSATION_TAGS:"setConversationTags",SET_CONVERSATION_FIELDS:"setConversationFields"},Wl=["identity","messaging","settings"],Ul={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke","extend.identity":"extend:identity"},jl=e=>{const t=async o=>{const n=o.data;if((n==null?void 0:n.type)!=="capability-request")return;const r=n;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(o.data));const a=r.extensionId;if(!a||!ut(a)){const l=[...ft().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${r.capability})`);return}const s=ut(a);if(!s)return;const i=Ul[r.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:r.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};Me(a,l);return}try{let l;switch(r.capability){case"data.query":l=await e["data.query"](r.payload);break;case"data.fetch":l=await e["data.fetch"](a,r.payload);break;case"actions.toast":l=await e["actions.toast"](a,r.payload);break;case"actions.invoke":l=await e["actions.invoke"](r.payload);break;case"context.read":l=await e["context.read"](a);break;case"extend.identity":l=e["extend.identity"]?await e["extend.identity"](a,r.payload):null;break;default:throw new Error(`Unknown capability: ${r.capability}`)}const u={type:"capability-response",id:r.id,success:!0,data:l};Me(a,u)}catch(l){const u={type:"capability-response",id:r.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};Me(a,u)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},dr=x.createContext({extensions:[],components:{},ready:!1}),Rl=({extensions:e,capabilityHandlers:t,components:o={},children:n})=>{const[r,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=jl(h);for(const g of e)g.enabled&&!u&&(console.log("[ExtensionProvider] Creating sandbox for",g.id,"bundleUrl:",g.bundleUrl),await Dl(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)$l(h.id);(c=i.current)==null||c.call(i)}},[e]),d.jsxs(dr.Provider,{value:{extensions:e,components:o,ready:r},children:[d.jsx("div",{ref:s,style:{display:"none"}}),n]})},ur=()=>x.useContext(dr),Gl=e=>Mt.includes(e),ql=(e,t={})=>{const{surfaceId:o,logPrefix:n="[NodeRenderer]"}=t,r=(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)=>r(v,s,w))},i);if(!Gl(a.tag))return console.warn(`${n} Unknown UI tag rejected: <${a.tag}>`),null;const l=e[a.tag];if(!l)return a.tag.startsWith("ui-")?(console.warn(`${n} Unregistered UI tag: <${a.tag}>`),null):d.jsx(x.Fragment,{children:(b=a.children)==null?void 0:b.map((v,w)=>r(v,s,w))},i);const{filtered:u,stripped:f}=Yl(a.tag,a.attrs);f.length>0&&console.warn(`${n} Attributes not allowed on <${a.tag}>, stripped: ${f.join(", ")}`);const c=Xl(a.tag,a.children);if(c.length>0&&console.warn(`${n} 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)=>r(v,s,w));return x.createElement(l,{...u,key:i},h&&h.length>0?h:void 0)};return r},Yl=(e,t)=>{const o={},n=[];if(!t)return{filtered:o,stripped:n};const r=Hl[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){o[a]=s;continue}r!=null&&r.includes(a)?o[a]=s:n.push(a)}return{filtered:o,stripped:n}},Xl=(e,t)=>{const o=Vl[e];if(!o||!t)return[];const n=[];for(const r of t)r.type!=="text"&&(!r.tag||r.tag==="__fragment"||o.includes(r.tag)||n.push(r.tag));return n},Kl=e=>{const t={...e};for(const o of Wl)delete t[o];return t},Gt=({target:e,context:t,className:o,separator:n,fallback:r=null,render:a})=>{const{extensions:s,components:i,ready:l}=ur(),[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(()=>ql(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 E=ut(T.id);return E&&y.source===E.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 _=Kl(t);h.forEach(P=>{var E;const T=ut(P.id);(E=T==null?void 0:T.iframe.contentWindow)==null||E.postMessage({type:"context-update",surfaceId:e,context:_},"*")})}}};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 r?d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:r}):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||!n)return[C];const _=y[w-1],P=typeof n=="function"?n({index:w,total:y.length,previousExtensionId:_.id,extensionId:v.id}):n;return[d.jsx(x.Fragment,{children:P},`separator:${_.id}:${v.id}:${w}`),C]}):r;return d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:m})};function Zl(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 Jl=e=>{switch(e){case"success":return tc;case"info":return nc;case"warning":return oc;case"error":return rc;default:return null}},Ql=Array(12).fill(0),ec=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},Ql.map((o,n)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),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:"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"})),oc=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"})),nc=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"})),rc=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"})),ac=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"})),sc=()=>{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 jo=1;class ic{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:n,...r}=t,a=typeof(t==null?void 0:t.id)=="number"||((o=t.id)==null?void 0:o.length)>0?t.id:jo++,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:n}),{...l,...t,id:a,dismissible:i,title:n}):l):this.addToast({title:n,...r,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(n=>n({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 n;o.loading!==void 0&&(n=this.create({...o,promise:t,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let a=n!==void 0,s;const i=r.then(async u=>{if(s=["resolve",u],x.isValidElement(u))a=!1,this.create({id:n,type:"default",message:u});else if(cc(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:n,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:n,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:n,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:n,type:"error",description:c,...g})}}).finally(()=>{a&&(this.dismiss(n),n=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 n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(t,o)=>{const n=(o==null?void 0:o.id)||jo++;return this.create({jsx:t(n),id:n,...o}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ge=new ic,lc=(e,t)=>{const o=(t==null?void 0:t.id)||jo++;return ge.addToast({title:e,...t,id:o}),o},cc=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",dc=lc,uc=()=>ge.toasts,fc=()=>ge.getActiveToasts(),gt=Object.assign(dc,{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:uc,getToasts:fc});Zl("[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 qt(e){return e.label!==void 0}const pc=3,hc="24px",gc="16px",fr=4e3,mc=356,vc=14,bc=45,wc=200;function Oe(...e){return e.filter(Boolean).join(" ")}function yc(e){const[t,o]=e.split("-"),n=[];return t&&n.push(t),o&&n.push(o),n}const xc=e=>{var t,o,n,r,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:_,closeButton:P,style:T,cancelButtonStyle:E,actionButtonStyle:z,className:j="",descriptionClassName:O="",duration:B,position:V,gap:L,expandByDefault:Y,classNames:I,icons:D,closeButtonAriaLabel:R="Close toast"}=e,[N,S]=x.useState(null),[M,F]=x.useState(null),[A,$]=x.useState(!1),[H,Z]=x.useState(!1),[G,q]=x.useState(!1),[Q,ee]=x.useState(!1),[re,oe]=x.useState(!1),[ce,de]=x.useState(0),[ct,Qe]=x.useState(0),Pe=x.useRef(c.duration||B||fr),Fo=x.useRef(null),ve=x.useRef(null),rb=w===0,ab=w+1<=m,xe=c.type,Pt=c.dismissible!==!1,sb=c.className||"",ib=c.descriptionClassName||"",Bo=x.useMemo(()=>v.findIndex(te=>te.toastId===c.id)||0,[v,c.id]),lb=x.useMemo(()=>{var te;return(te=c.closeButton)!=null?te:P},[c.closeButton,P]),Tl=x.useMemo(()=>c.duration||B||fr,[c.duration,B]),rr=x.useRef(0),At=x.useRef(0),_l=x.useRef(0),It=x.useRef(null),[cb,db]=V.split("-"),Pl=x.useMemo(()=>v.reduce((te,ue,he)=>he>=Bo?te:te+ue.height,0),[v,Bo]),Al=sc(),ub=c.invert||f,ar=xe==="loading";At.current=x.useMemo(()=>Bo*L+Pl,[Bo,Pl]),x.useEffect(()=>{Pe.current=Tl},[Tl]),x.useEffect(()=>{$(!0)},[]),x.useEffect(()=>{const te=ve.current;if(te){const ue=te.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(!A)return;const te=ve.current,ue=te.style.height;te.style.height="auto";const he=te.getBoundingClientRect().height;te.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])},[A,c.title,c.description,b,c.id,c.jsx,c.action,c.cancel]);const et=x.useCallback(()=>{Z(!0),de(At.current),b(te=>te.filter(ue=>ue.toastId!==c.id)),setTimeout(()=>{C(c)},wc)},[c,C,b,At]);x.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let te;return k||g||Al?(()=>{if(_l.current<rr.current){const ke=new Date().getTime()-rr.current;Pe.current=Pe.current-ke}_l.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(rr.current=new Date().getTime(),te=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),et()},Pe.current))})(),()=>clearTimeout(te)},[k,g,c,xe,Al,et]),x.useEffect(()=>{c.delete&&(et(),c.onDismiss==null||c.onDismiss.call(c,c))},[et,c.delete]);function fb(){var te;if(D!=null&&D.loading){var ue;return x.createElement("div",{className:Oe(I==null?void 0:I.loader,c==null||(ue=c.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":xe==="loading"},D.loading)}return x.createElement(ec,{className:Oe(I==null?void 0:I.loader,c==null||(te=c.classNames)==null?void 0:te.loader),visible:xe==="loading"})}const pb=c.icon||(D==null?void 0:D[xe])||Jl(xe);var Il,Ml;return x.createElement("li",{tabIndex:0,ref:ve,className:Oe(j,sb,I==null?void 0:I.toast,c==null||(t=c.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[xe],c==null||(o=c.classNames)==null?void 0:o[xe]),"data-sonner-toast":"","data-rich-colors":(Il=c.richColors)!=null?Il:_,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":A,"data-promise":!!c.promise,"data-swiped":re,"data-removed":H,"data-visible":ab,"data-y-position":cb,"data-x-position":db,"data-index":w,"data-front":rb,"data-swiping":G,"data-dismissible":Pt,"data-type":xe,"data-invert":ub,"data-swipe-out":Q,"data-swipe-direction":M,"data-expanded":!!(k||Y&&A),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":y.length-w,"--offset":`${H?ce:At.current}px`,"--initial-height":Y?"auto":`${ct}px`,...T,...c.style},onDragEnd:()=>{q(!1),S(null),It.current=null},onPointerDown:te=>{te.button!==2&&(ar||!Pt||(Fo.current=new Date,de(At.current),te.target.setPointerCapture(te.pointerId),te.target.tagName!=="BUTTON"&&(q(!0),It.current={x:te.clientX,y:te.clientY})))},onPointerUp:()=>{var te,ue,he;if(Q||!Pt)return;It.current=null;const ke=Number(((te=ve.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ho=Number(((ue=ve.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fe=new Date().getTime()-((he=Fo.current)==null?void 0:he.getTime()),Ce=N==="x"?ke:Ho,Vo=Math.abs(Ce)/fe;if(Math.abs(Ce)>=bc||Vo>.11){de(At.current),c.onDismiss==null||c.onDismiss.call(c,c),F(N==="x"?ke>0?"right":"left":Ho>0?"down":"up"),et(),ee(!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")}oe(!1),q(!1),S(null)},onPointerMove:te=>{var ue,he,ke;if(!It.current||!Pt||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const fe=te.clientY-It.current.y,Ce=te.clientX-It.current.x;var Vo;const Ae=(Vo=e.swipeDirections)!=null?Vo:yc(V);!N&&(Math.abs(Ce)>1||Math.abs(fe)>1)&&S(Math.abs(Ce)>Math.abs(fe)?"x":"y");let Ie={x:0,y:0};const Ol=dt=>1/(1.5+Math.abs(dt)/20);if(N==="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*Ol(fe);Ie.y=Math.abs(dt)<Math.abs(fe)?dt:fe}}else if(N==="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*Ol(Ce);Ie.x=Math.abs(dt)<Math.abs(Ce)?dt:Ce}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&oe(!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`)}},lb&&!c.jsx&&xe!=="loading"?x.createElement("button",{"aria-label":R,"data-disabled":ar,"data-close-button":!0,onClick:ar||!Pt?()=>{}:()=>{et(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Oe(I==null?void 0:I.closeButton,c==null||(n=c.classNames)==null?void 0:n.closeButton)},(Ml=D==null?void 0:D.close)!=null?Ml:ac):null,(xe||c.icon||c.promise)&&c.icon!==null&&((D==null?void 0:D[xe])!==null||c.icon)?x.createElement("div",{"data-icon":"",className:Oe(I==null?void 0:I.icon,c==null||(r=c.classNames)==null?void 0:r.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||fb():null,c.type!=="loading"?pb:null):null,x.createElement("div",{"data-content":"",className:Oe(I==null?void 0:I.content,c==null||(a=c.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:Oe(I==null?void 0:I.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:Oe(O,ib,I==null?void 0:I.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&&qt(c.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||E,onClick:te=>{qt(c.cancel)&&Pt&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,te),et())},className:Oe(I==null?void 0:I.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,x.isValidElement(c.action)?c.action:c.action&&qt(c.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||z,onClick:te=>{qt(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,te),!te.defaultPrevented&&et())},className:Oe(I==null?void 0:I.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function pr(){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 kc(e,t){const o={};return[e,t].forEach((n,r)=>{const a=r===1,s=a?"--mobile-offset":"--offset",i=a?gc:hc;function l(u){["top","right","bottom","left"].forEach(f=>{o[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?o[`${s}-${u}`]=i:o[`${s}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(i)}),o}const Sc=x.forwardRef(function(t,o){const{id:n,invert:r,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=pc,toastOptions:w,dir:y=pr(),gap:k=vc,icons:C,containerAriaLabel:_="Notifications"}=t,[P,T]=x.useState([]),E=x.useMemo(()=>n?P.filter(A=>A.toasterId===n):P.filter(A=>!A.toasterId),[P,n]),z=x.useMemo(()=>Array.from(new Set([a].concat(E.filter(A=>A.position).map(A=>A.position)))),[E,a]),[j,O]=x.useState([]),[B,V]=x.useState(!1),[L,Y]=x.useState(!1),[I,D]=x.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),R=x.useRef(null),N=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=x.useRef(null),M=x.useRef(!1),F=x.useCallback(A=>{T($=>{var H;return(H=$.find(Z=>Z.id===A.id))!=null&&H.delete||ge.dismiss(A.id),$.filter(({id:Z})=>Z!==A.id)})},[]);return x.useEffect(()=>ge.subscribe(A=>{if(A.dismiss){requestAnimationFrame(()=>{T($=>$.map(H=>H.id===A.id?{...H,delete:!0}:H))});return}setTimeout(()=>{Wo.flushSync(()=>{T($=>{const H=$.findIndex(Z=>Z.id===A.id);return H!==-1?[...$.slice(0,H),{...$[H],...A},...$.slice(H+1)]:[A,...$]})})})}),[P]),x.useEffect(()=>{if(h!=="system"){D(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;const A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:$})=>{D($?"dark":"light")})}catch{A.addListener(({matches:H})=>{try{D(H?"dark":"light")}catch(Z){console.error(Z)}})}},[h]),x.useEffect(()=>{P.length<=1&&V(!1)},[P]),x.useEffect(()=>{const A=$=>{var H;if(s.every(q=>$[q]||$.code===q)){var G;V(!0),(G=R.current)==null||G.focus()}$.code==="Escape"&&(document.activeElement===R.current||(H=R.current)!=null&&H.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[s]),x.useEffect(()=>{if(R.current)return()=>{S.current&&(S.current.focus({preventScroll:!0}),S.current=null,M.current=!1)}},[R.current]),x.createElement("section",{ref:o,"aria-label":`${_} ${N}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((A,$)=>{var H;const[Z,G]=A.split("-");return E.length?x.createElement("ol",{key:A,dir:y==="auto"?pr():y,tabIndex:-1,ref:R,className:u,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":Z,"data-x-position":G,style:{"--front-toast-height":`${((H=j[0])==null?void 0:H.height)||0}px`,"--width":`${mc}px`,"--gap":`${k}px`,...m,...kc(f,c)},onBlur:q=>{M.current&&!q.currentTarget.contains(q.relatedTarget)&&(M.current=!1,S.current&&(S.current.focus({preventScroll:!0}),S.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||M.current||(M.current=!0,S.current=q.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{L||V(!1)},onDragEnd:()=>V(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},E.filter(q=>!q.position&&$===0||q.position===A).map((q,Q)=>{var ee,re;return x.createElement(xc,{key:q.id,icons:C,index:Q,toast:q,defaultRichColors:g,duration:(ee=w==null?void 0:w.duration)!=null?ee:b,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:r,visibleToasts:v,closeButton:(re=w==null?void 0:w.closeButton)!=null?re:l,interacting:L,position:A,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:F,toasts:E.filter(oe=>oe.position==q.position),heights:j.filter(oe=>oe.position==q.position),setHeights:O,expandByDefault:i,gap:k,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),Cc=e=>e.startsWith("http")&&!e.endsWith(".js"),hr=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}},Ec=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=t+"=".repeat((4-t.length%4)%4);return atob(o)},Nc=(e,t)=>{const o=e.indexOf(":");if(o===-1)return;const n=e.slice(0,o),r=e.slice(o+1);if(!(!n||!r)){if(!r.startsWith("http")){try{const a=JSON.parse(Ec(r));if(a.url&&hr(a.url))return{extensionId:n,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(hr(r))return{extensionId:n,bundleUrl:r,mode:t}}},gr=(e,t,o)=>{const n=e.getAll(t);if(n.length===0)return[];const r=[];for(const a of n){const s=a.split(",");for(const i of s){const l=Nc(i,o);l&&r.push(l)}}return r},mr=e=>{const t=new URLSearchParams(e);try{const o=gr(t,"_stackable_dev","dev"),n=gr(t,"_stackable_staging","staging"),r=new Map;for(const a of o)r.set(a.extensionId,a);for(const a of n)r.set(a.extensionId,a);return Array.from(r.values())}catch{return[]}},Tc=async(e,t)=>t.length===0?e:Promise.all(e.map(async o=>{const n=t.find(r=>r.extensionId===o.id);if(!n)return o;console.log(`[Stackable] Dev override active for ${o.id} → ${n.bundleUrl}`);try{const r=await fetch(`${n.bundleUrl}/manifest.json`);if(r.ok){const a=await r.json();return console.log(`[Stackable] Dev manifest loaded for ${o.id}`,a.permissions),{...o,bundleUrl:n.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${o.id}, using registry manifest`)}return{...o,bundleUrl:n.bundleUrl}}));/**
12
+ </html>`;n.srcdoc=u,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${u.substring(0,300)}`)}t.appendChild(n);const s={manifest:e.manifest,extensionId:e.id,iframe:n,ready:!1,expectedOrigin:a,messageHandlers:new Set},i=l=>{if(l.origin!==s.expectedOrigin)return;const u=l.data;!u||typeof u!="object"||!("type"in u)||("extensionId"in u?u.extensionId:void 0)!==e.id||(u.type==="extension-ready"&&(s.ready=!0),s.messageHandlers.forEach(c=>c(u)))};return window.addEventListener("message",i),tt.set(e.id,s),s},Me=(e,t)=>{const o=tt.get(e);if(!(o!=null&&o.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}const n=o.expectedOrigin==="null"?"*":o.expectedOrigin;o.iframe.contentWindow.postMessage(t,n)},ut=e=>tt.get(e),Fl=e=>{const t=tt.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),tt.delete(e))},ft=()=>tt,Uo=e=>e,Bl={SUPER_ADMIN:"super_admin"};new Set(Object.values(Bl));const lr={ADMIN:"org:admin",MEMBER:"org:member"},Hl=[lr.ADMIN];[...Object.values(Hl),lr.MEMBER];const cr={"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"]}},pt=cr,Mt=Object.keys(cr),Vl=Object.fromEntries(Mt.map(e=>[e,pt[e].attributes]));Object.fromEntries(Mt.filter(e=>pt[e].attributeValues).map(e=>[e,pt[e].attributeValues]));const dr=Object.fromEntries(Mt.filter(e=>pt[e].children).map(e=>[e,pt[e].children]));({...dr},Object.fromEntries(Mt.map(e=>[e,pt[e].category])));const ht={NEW_CONVERSATION:"newConversation",SET_CONVERSATION_TAGS:"setConversationTags",SET_CONVERSATION_FIELDS:"setConversationFields"},Wl=["identity","messaging","settings"],Ul={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke","extend.identity":"extend:identity"},jl=e=>{const t=async o=>{const n=o.data;if((n==null?void 0:n.type)!=="capability-request")return;const r=n;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(o.data));const a=r.extensionId;if(!a||!ut(a)){const l=[...ft().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${r.capability})`);return}const s=ut(a);if(!s)return;const i=Ul[r.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:r.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};Me(a,l);return}try{let l;switch(r.capability){case"data.query":l=await e["data.query"](r.payload);break;case"data.fetch":l=await e["data.fetch"](a,r.payload);break;case"actions.toast":l=await e["actions.toast"](a,r.payload);break;case"actions.invoke":l=await e["actions.invoke"](r.payload);break;case"context.read":l=await e["context.read"](a);break;case"extend.identity":l=e["extend.identity"]?await e["extend.identity"](a,r.payload):null;break;default:throw new Error(`Unknown capability: ${r.capability}`)}const u={type:"capability-response",id:r.id,success:!0,data:l};Me(a,u)}catch(l){const u={type:"capability-response",id:r.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};Me(a,u)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},ur=x.createContext({extensions:[],components:{},ready:!1}),Rl=({extensions:e,capabilityHandlers:t,components:o={},children:n})=>{const[r,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=jl(h);for(const g of e)g.enabled&&!u&&(console.log("[ExtensionProvider] Creating sandbox for",g.id,"bundleUrl:",g.bundleUrl),await $l(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)Fl(h.id);(c=i.current)==null||c.call(i)}},[e]),d.jsxs(ur.Provider,{value:{extensions:e,components:o,ready:r},children:[d.jsx("div",{ref:s,style:{display:"none"}}),n]})},fr=()=>x.useContext(ur),Gl=e=>Mt.includes(e),ql=(e,t={})=>{const{surfaceId:o,logPrefix:n="[NodeRenderer]"}=t,r=(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)=>r(v,s,w))},i);if(!Gl(a.tag))return console.warn(`${n} Unknown UI tag rejected: <${a.tag}>`),null;const l=e[a.tag];if(!l)return a.tag.startsWith("ui-")?(console.warn(`${n} Unregistered UI tag: <${a.tag}>`),null):d.jsx(x.Fragment,{children:(b=a.children)==null?void 0:b.map((v,w)=>r(v,s,w))},i);const{filtered:u,stripped:f}=Yl(a.tag,a.attrs);f.length>0&&console.warn(`${n} Attributes not allowed on <${a.tag}>, stripped: ${f.join(", ")}`);const c=Xl(a.tag,a.children);if(c.length>0&&console.warn(`${n} 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)=>r(v,s,w));return x.createElement(l,{...u,key:i},h&&h.length>0?h:void 0)};return r},Yl=(e,t)=>{const o={},n=[];if(!t)return{filtered:o,stripped:n};const r=Vl[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){o[a]=s;continue}r!=null&&r.includes(a)?o[a]=s:n.push(a)}return{filtered:o,stripped:n}},Xl=(e,t)=>{const o=dr[e];if(!o||!t)return[];const n=[];for(const r of t)r.type!=="text"&&(!r.tag||r.tag==="__fragment"||o.includes(r.tag)||n.push(r.tag));return n},Kl=e=>{const t={...e};for(const o of Wl)delete t[o];return t},Gt=({target:e,context:t,className:o,separator:n,fallback:r=null,render:a})=>{const{extensions:s,components:i,ready:l}=fr(),[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(()=>ql(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 E=ut(T.id);return E&&y.source===E.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 _=Kl(t);h.forEach(P=>{var E;const T=ut(P.id);(E=T==null?void 0:T.iframe.contentWindow)==null||E.postMessage({type:"context-update",surfaceId:e,context:_},"*")})}}};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 r?d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:r}):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||!n)return[C];const _=y[w-1],P=typeof n=="function"?n({index:w,total:y.length,previousExtensionId:_.id,extensionId:v.id}):n;return[d.jsx(x.Fragment,{children:P},`separator:${_.id}:${v.id}:${w}`),C]}):r;return d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:m})};function Zl(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 Jl=e=>{switch(e){case"success":return tc;case"info":return nc;case"warning":return oc;case"error":return rc;default:return null}},Ql=Array(12).fill(0),ec=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},Ql.map((o,n)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),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:"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"})),oc=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"})),nc=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"})),rc=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"})),ac=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"})),sc=()=>{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 jo=1;class ic{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:n,...r}=t,a=typeof(t==null?void 0:t.id)=="number"||((o=t.id)==null?void 0:o.length)>0?t.id:jo++,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:n}),{...l,...t,id:a,dismissible:i,title:n}):l):this.addToast({title:n,...r,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(n=>n({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 n;o.loading!==void 0&&(n=this.create({...o,promise:t,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let a=n!==void 0,s;const i=r.then(async u=>{if(s=["resolve",u],x.isValidElement(u))a=!1,this.create({id:n,type:"default",message:u});else if(cc(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:n,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:n,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:n,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:n,type:"error",description:c,...g})}}).finally(()=>{a&&(this.dismiss(n),n=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 n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(t,o)=>{const n=(o==null?void 0:o.id)||jo++;return this.create({jsx:t(n),id:n,...o}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ge=new ic,lc=(e,t)=>{const o=(t==null?void 0:t.id)||jo++;return ge.addToast({title:e,...t,id:o}),o},cc=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",dc=lc,uc=()=>ge.toasts,fc=()=>ge.getActiveToasts(),gt=Object.assign(dc,{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:uc,getToasts:fc});Zl("[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 qt(e){return e.label!==void 0}const pc=3,hc="24px",gc="16px",pr=4e3,mc=356,vc=14,bc=45,wc=200;function Oe(...e){return e.filter(Boolean).join(" ")}function yc(e){const[t,o]=e.split("-"),n=[];return t&&n.push(t),o&&n.push(o),n}const xc=e=>{var t,o,n,r,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:_,closeButton:P,style:T,cancelButtonStyle:E,actionButtonStyle:z,className:j="",descriptionClassName:O="",duration:B,position:V,gap:L,expandByDefault:Y,classNames:I,icons:D,closeButtonAriaLabel:R="Close toast"}=e,[N,S]=x.useState(null),[M,F]=x.useState(null),[A,$]=x.useState(!1),[H,Z]=x.useState(!1),[G,q]=x.useState(!1),[Q,ee]=x.useState(!1),[re,oe]=x.useState(!1),[ce,de]=x.useState(0),[ct,Qe]=x.useState(0),Pe=x.useRef(c.duration||B||pr),Fo=x.useRef(null),ve=x.useRef(null),rb=w===0,ab=w+1<=m,xe=c.type,Pt=c.dismissible!==!1,sb=c.className||"",ib=c.descriptionClassName||"",Bo=x.useMemo(()=>v.findIndex(te=>te.toastId===c.id)||0,[v,c.id]),lb=x.useMemo(()=>{var te;return(te=c.closeButton)!=null?te:P},[c.closeButton,P]),_l=x.useMemo(()=>c.duration||B||pr,[c.duration,B]),rr=x.useRef(0),At=x.useRef(0),Pl=x.useRef(0),It=x.useRef(null),[cb,db]=V.split("-"),Al=x.useMemo(()=>v.reduce((te,ue,he)=>he>=Bo?te:te+ue.height,0),[v,Bo]),Il=sc(),ub=c.invert||f,ar=xe==="loading";At.current=x.useMemo(()=>Bo*L+Al,[Bo,Al]),x.useEffect(()=>{Pe.current=_l},[_l]),x.useEffect(()=>{$(!0)},[]),x.useEffect(()=>{const te=ve.current;if(te){const ue=te.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(!A)return;const te=ve.current,ue=te.style.height;te.style.height="auto";const he=te.getBoundingClientRect().height;te.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])},[A,c.title,c.description,b,c.id,c.jsx,c.action,c.cancel]);const et=x.useCallback(()=>{Z(!0),de(At.current),b(te=>te.filter(ue=>ue.toastId!==c.id)),setTimeout(()=>{C(c)},wc)},[c,C,b,At]);x.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let te;return k||g||Il?(()=>{if(Pl.current<rr.current){const ke=new Date().getTime()-rr.current;Pe.current=Pe.current-ke}Pl.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(rr.current=new Date().getTime(),te=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),et()},Pe.current))})(),()=>clearTimeout(te)},[k,g,c,xe,Il,et]),x.useEffect(()=>{c.delete&&(et(),c.onDismiss==null||c.onDismiss.call(c,c))},[et,c.delete]);function fb(){var te;if(D!=null&&D.loading){var ue;return x.createElement("div",{className:Oe(I==null?void 0:I.loader,c==null||(ue=c.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":xe==="loading"},D.loading)}return x.createElement(ec,{className:Oe(I==null?void 0:I.loader,c==null||(te=c.classNames)==null?void 0:te.loader),visible:xe==="loading"})}const pb=c.icon||(D==null?void 0:D[xe])||Jl(xe);var Ml,Ol;return x.createElement("li",{tabIndex:0,ref:ve,className:Oe(j,sb,I==null?void 0:I.toast,c==null||(t=c.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[xe],c==null||(o=c.classNames)==null?void 0:o[xe]),"data-sonner-toast":"","data-rich-colors":(Ml=c.richColors)!=null?Ml:_,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":A,"data-promise":!!c.promise,"data-swiped":re,"data-removed":H,"data-visible":ab,"data-y-position":cb,"data-x-position":db,"data-index":w,"data-front":rb,"data-swiping":G,"data-dismissible":Pt,"data-type":xe,"data-invert":ub,"data-swipe-out":Q,"data-swipe-direction":M,"data-expanded":!!(k||Y&&A),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":y.length-w,"--offset":`${H?ce:At.current}px`,"--initial-height":Y?"auto":`${ct}px`,...T,...c.style},onDragEnd:()=>{q(!1),S(null),It.current=null},onPointerDown:te=>{te.button!==2&&(ar||!Pt||(Fo.current=new Date,de(At.current),te.target.setPointerCapture(te.pointerId),te.target.tagName!=="BUTTON"&&(q(!0),It.current={x:te.clientX,y:te.clientY})))},onPointerUp:()=>{var te,ue,he;if(Q||!Pt)return;It.current=null;const ke=Number(((te=ve.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ho=Number(((ue=ve.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fe=new Date().getTime()-((he=Fo.current)==null?void 0:he.getTime()),Ce=N==="x"?ke:Ho,Vo=Math.abs(Ce)/fe;if(Math.abs(Ce)>=bc||Vo>.11){de(At.current),c.onDismiss==null||c.onDismiss.call(c,c),F(N==="x"?ke>0?"right":"left":Ho>0?"down":"up"),et(),ee(!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")}oe(!1),q(!1),S(null)},onPointerMove:te=>{var ue,he,ke;if(!It.current||!Pt||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const fe=te.clientY-It.current.y,Ce=te.clientX-It.current.x;var Vo;const Ae=(Vo=e.swipeDirections)!=null?Vo:yc(V);!N&&(Math.abs(Ce)>1||Math.abs(fe)>1)&&S(Math.abs(Ce)>Math.abs(fe)?"x":"y");let Ie={x:0,y:0};const Ll=dt=>1/(1.5+Math.abs(dt)/20);if(N==="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*Ll(fe);Ie.y=Math.abs(dt)<Math.abs(fe)?dt:fe}}else if(N==="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*Ll(Ce);Ie.x=Math.abs(dt)<Math.abs(Ce)?dt:Ce}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&oe(!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`)}},lb&&!c.jsx&&xe!=="loading"?x.createElement("button",{"aria-label":R,"data-disabled":ar,"data-close-button":!0,onClick:ar||!Pt?()=>{}:()=>{et(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Oe(I==null?void 0:I.closeButton,c==null||(n=c.classNames)==null?void 0:n.closeButton)},(Ol=D==null?void 0:D.close)!=null?Ol:ac):null,(xe||c.icon||c.promise)&&c.icon!==null&&((D==null?void 0:D[xe])!==null||c.icon)?x.createElement("div",{"data-icon":"",className:Oe(I==null?void 0:I.icon,c==null||(r=c.classNames)==null?void 0:r.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||fb():null,c.type!=="loading"?pb:null):null,x.createElement("div",{"data-content":"",className:Oe(I==null?void 0:I.content,c==null||(a=c.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:Oe(I==null?void 0:I.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:Oe(O,ib,I==null?void 0:I.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&&qt(c.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||E,onClick:te=>{qt(c.cancel)&&Pt&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,te),et())},className:Oe(I==null?void 0:I.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,x.isValidElement(c.action)?c.action:c.action&&qt(c.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||z,onClick:te=>{qt(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,te),!te.defaultPrevented&&et())},className:Oe(I==null?void 0:I.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function hr(){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 kc(e,t){const o={};return[e,t].forEach((n,r)=>{const a=r===1,s=a?"--mobile-offset":"--offset",i=a?gc:hc;function l(u){["top","right","bottom","left"].forEach(f=>{o[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?o[`${s}-${u}`]=i:o[`${s}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(i)}),o}const Sc=x.forwardRef(function(t,o){const{id:n,invert:r,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=pc,toastOptions:w,dir:y=hr(),gap:k=vc,icons:C,containerAriaLabel:_="Notifications"}=t,[P,T]=x.useState([]),E=x.useMemo(()=>n?P.filter(A=>A.toasterId===n):P.filter(A=>!A.toasterId),[P,n]),z=x.useMemo(()=>Array.from(new Set([a].concat(E.filter(A=>A.position).map(A=>A.position)))),[E,a]),[j,O]=x.useState([]),[B,V]=x.useState(!1),[L,Y]=x.useState(!1),[I,D]=x.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),R=x.useRef(null),N=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=x.useRef(null),M=x.useRef(!1),F=x.useCallback(A=>{T($=>{var H;return(H=$.find(Z=>Z.id===A.id))!=null&&H.delete||ge.dismiss(A.id),$.filter(({id:Z})=>Z!==A.id)})},[]);return x.useEffect(()=>ge.subscribe(A=>{if(A.dismiss){requestAnimationFrame(()=>{T($=>$.map(H=>H.id===A.id?{...H,delete:!0}:H))});return}setTimeout(()=>{Wo.flushSync(()=>{T($=>{const H=$.findIndex(Z=>Z.id===A.id);return H!==-1?[...$.slice(0,H),{...$[H],...A},...$.slice(H+1)]:[A,...$]})})})}),[P]),x.useEffect(()=>{if(h!=="system"){D(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;const A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:$})=>{D($?"dark":"light")})}catch{A.addListener(({matches:H})=>{try{D(H?"dark":"light")}catch(Z){console.error(Z)}})}},[h]),x.useEffect(()=>{P.length<=1&&V(!1)},[P]),x.useEffect(()=>{const A=$=>{var H;if(s.every(q=>$[q]||$.code===q)){var G;V(!0),(G=R.current)==null||G.focus()}$.code==="Escape"&&(document.activeElement===R.current||(H=R.current)!=null&&H.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[s]),x.useEffect(()=>{if(R.current)return()=>{S.current&&(S.current.focus({preventScroll:!0}),S.current=null,M.current=!1)}},[R.current]),x.createElement("section",{ref:o,"aria-label":`${_} ${N}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((A,$)=>{var H;const[Z,G]=A.split("-");return E.length?x.createElement("ol",{key:A,dir:y==="auto"?hr():y,tabIndex:-1,ref:R,className:u,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":Z,"data-x-position":G,style:{"--front-toast-height":`${((H=j[0])==null?void 0:H.height)||0}px`,"--width":`${mc}px`,"--gap":`${k}px`,...m,...kc(f,c)},onBlur:q=>{M.current&&!q.currentTarget.contains(q.relatedTarget)&&(M.current=!1,S.current&&(S.current.focus({preventScroll:!0}),S.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||M.current||(M.current=!0,S.current=q.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{L||V(!1)},onDragEnd:()=>V(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},E.filter(q=>!q.position&&$===0||q.position===A).map((q,Q)=>{var ee,re;return x.createElement(xc,{key:q.id,icons:C,index:Q,toast:q,defaultRichColors:g,duration:(ee=w==null?void 0:w.duration)!=null?ee:b,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:r,visibleToasts:v,closeButton:(re=w==null?void 0:w.closeButton)!=null?re:l,interacting:L,position:A,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:F,toasts:E.filter(oe=>oe.position==q.position),heights:j.filter(oe=>oe.position==q.position),setHeights:O,expandByDefault:i,gap:k,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),Cc=e=>e.startsWith("http")&&!e.endsWith(".js"),gr=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}},Ec=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=t+"=".repeat((4-t.length%4)%4);return atob(o)},Nc=(e,t)=>{const o=e.indexOf(":");if(o===-1)return;const n=e.slice(0,o),r=e.slice(o+1);if(!(!n||!r)){if(!r.startsWith("http")){try{const a=JSON.parse(Ec(r));if(a.url&&gr(a.url))return{extensionId:n,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(gr(r))return{extensionId:n,bundleUrl:r,mode:t}}},mr=(e,t,o)=>{const n=e.getAll(t);if(n.length===0)return[];const r=[];for(const a of n){const s=a.split(",");for(const i of s){const l=Nc(i,o);l&&r.push(l)}}return r},vr=e=>{const t=new URLSearchParams(e);try{const o=mr(t,"_stackable_dev","dev"),n=mr(t,"_stackable_staging","staging"),r=new Map;for(const a of o)r.set(a.extensionId,a);for(const a of n)r.set(a.extensionId,a);return Array.from(r.values())}catch{return[]}},Tc=async(e,t)=>t.length===0?e:Promise.all(e.map(async o=>{const n=t.find(r=>r.extensionId===o.id);if(!n)return o;console.log(`[Stackable] Dev override active for ${o.id} → ${n.bundleUrl}`);try{const r=await fetch(`${n.bundleUrl}/manifest.json`);if(r.ok){const a=await r.json();return console.log(`[Stackable] Dev manifest loaded for ${o.id}`,a.permissions),{...o,bundleUrl:n.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${o.id}, using registry manifest`)}return{...o,bundleUrl:n.bundleUrl}}));/**
13
13
  * @license lucide-react v0.577.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
- */const vr=(...e)=>e.filter((t,o,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===o).join(" ").trim();/**
17
+ */const br=(...e)=>e.filter((t,o,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===o).join(" ").trim();/**
18
18
  * @license lucide-react v0.577.0 - ISC
19
19
  *
20
20
  * This source code is licensed under the ISC license.
@@ -29,7 +29,7 @@
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 br=e=>{const t=Pc(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
32
+ */const wr=e=>{const t=Pc(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.
@@ -44,12 +44,12 @@
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 Mc=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:n,className:r="",children:a,iconNode:s,...i},l)=>x.createElement("svg",{ref:l,...Ac,width:t,height:t,stroke:e,strokeWidth:n?Number(o)*24/Number(t):o,className:vr("lucide",r),...!a&&!Ic(i)&&{"aria-hidden":"true"},...i},[...s.map(([u,f])=>x.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
47
+ */const Mc=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:n,className:r="",children:a,iconNode:s,...i},l)=>x.createElement("svg",{ref:l,...Ac,width:t,height:t,stroke:e,strokeWidth:n?Number(o)*24/Number(t):o,className:br("lucide",r),...!a&&!Ic(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 ae=(e,t)=>{const o=x.forwardRef(({className:n,...r},a)=>x.createElement(Mc,{ref:a,iconNode:t,className:vr(`lucide-${_c(br(e))}`,`lucide-${e}`,n),...r}));return o.displayName=br(e),o};/**
52
+ */const ae=(e,t)=>{const o=x.forwardRef(({className:n,...r},a)=>x.createElement(Mc,{ref:a,iconNode:t,className:br(`lucide-${_c(wr(e))}`,`lucide-${e}`,n),...r}));return o.displayName=wr(e),o};/**
53
53
  * @license lucide-react v0.577.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
@@ -79,12 +79,12 @@
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const wr=ae("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
82
+ */const yr=ae("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
83
83
  * @license lucide-react v0.577.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const yr=ae("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
87
+ */const xr=ae("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
88
88
  * @license lucide-react v0.577.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
@@ -104,17 +104,17 @@
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const xr=ae("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
107
+ */const kr=ae("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
108
108
  * @license lucide-react v0.577.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const kr=ae("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
112
+ */const Sr=ae("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
113
113
  * @license lucide-react v0.577.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const Sr=ae("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
117
+ */const Cr=ae("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
118
118
  * @license lucide-react v0.577.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
@@ -174,7 +174,7 @@
174
174
  *
175
175
  * This source code is licensed under the ISC license.
176
176
  * See the LICENSE file in the root directory of this source tree.
177
- */const Cr=ae("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);/**
177
+ */const Er=ae("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);/**
178
178
  * @license lucide-react v0.577.0 - ISC
179
179
  *
180
180
  * This source code is licensed under the ISC license.
@@ -214,7 +214,7 @@
214
214
  *
215
215
  * This source code is licensed under the ISC license.
216
216
  * See the LICENSE file in the root directory of this source tree.
217
- */const Er=ae("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);/**
217
+ */const Nr=ae("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);/**
218
218
  * @license lucide-react v0.577.0 - ISC
219
219
  *
220
220
  * This source code is licensed under the ISC license.
@@ -229,12 +229,12 @@
229
229
  *
230
230
  * This source code is licensed under the ISC license.
231
231
  * See the LICENSE file in the root directory of this source tree.
232
- */const Nr=ae("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
232
+ */const Tr=ae("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
233
233
  * @license lucide-react v0.577.0 - ISC
234
234
  *
235
235
  * This source code is licensed under the ISC license.
236
236
  * See the LICENSE file in the root directory of this source tree.
237
- */const od=ae("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 Tr(e){var t,o,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=Tr(e[t]))&&(n&&(n+=" "),n+=o)}else for(o in e)e[o]&&(n&&(n+=" "),n+=o);return n}function _r(){for(var e,t,o=0,n="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=Tr(e))&&(n&&(n+=" "),n+=t);return n}const nd=(e,t)=>{const o=new Array(e.length+t.length);for(let n=0;n<e.length;n++)o[n]=e[n];for(let n=0;n<t.length;n++)o[e.length+n]=t[n];return o},rd=(e,t)=>({classGroupId:e,validator:t}),Pr=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),Xt="-",Ar=[],ad="arbitrary..",sd=e=>{const t=ld(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return id(s);const i=s.split(Xt),l=i[0]===""&&i.length>1?1:0;return Ir(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=n[s],u=o[s];return l?u?nd(u,l):l:u||Ar}return o[s]||Ar}}},Ir=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const r=e[t],a=o.nextPart.get(r);if(a){const u=Ir(e,t+1,a);if(u)return u}const s=o.validators;if(s===null)return;const i=t===0?e.join(Xt):e.slice(t).join(Xt),l=s.length;for(let u=0;u<l;u++){const f=s[u];if(f.validator(i))return f.classGroupId}},id=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),n=t.slice(0,o);return n?ad+n:void 0})(),ld=e=>{const{theme:t,classGroups:o}=e;return cd(o,t)},cd=(e,t)=>{const o=Pr();for(const n in e){const r=e[n];Xo(r,o,n,t)}return o},Xo=(e,t,o,n)=>{const r=e.length;for(let a=0;a<r;a++){const s=e[a];dd(s,t,o,n)}},dd=(e,t,o,n)=>{if(typeof e=="string"){ud(e,t,o);return}if(typeof e=="function"){fd(e,t,o,n);return}pd(e,t,o,n)},ud=(e,t,o)=>{const n=e===""?t:Mr(t,e);n.classGroupId=o},fd=(e,t,o,n)=>{if(hd(e)){Xo(e(n),t,o,n);return}t.validators===null&&(t.validators=[]),t.validators.push(rd(o,e))},pd=(e,t,o,n)=>{const r=Object.entries(e),a=r.length;for(let s=0;s<a;s++){const[i,l]=r[s];Xo(l,Mr(t,i),o,n)}},Mr=(e,t)=>{let o=e;const n=t.split(Xt),r=n.length;for(let a=0;a<r;a++){const s=n[a];let i=o.nextPart.get(s);i||(i=Pr(),o.nextPart.set(s,i)),o=i}return o},hd=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,gd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),n=Object.create(null);const r=(a,s)=>{o[a]=s,t++,t>e&&(t=0,n=o,o=Object.create(null))};return{get(a){let s=o[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return r(a,s),s},set(a,s){a in o?o[a]=s:r(a,s)}}},Ko="!",Or=":",md=[],Lr=(e,t,o,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:n,isExternal:r}),vd=e=>{const{prefix:t,experimentalParseClassName:o}=e;let n=r=>{const a=[];let s=0,i=0,l=0,u;const f=r.length;for(let m=0;m<f;m++){const v=r[m];if(s===0&&i===0){if(v===Or){a.push(r.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?r:r.slice(l);let h=c,g=!1;c.endsWith(Ko)?(h=c.slice(0,-1),g=!0):c.startsWith(Ko)&&(h=c.slice(1),g=!0);const b=u&&u>l?u-l:void 0;return Lr(a,g,h,b)};if(t){const r=t+Or,a=n;n=s=>s.startsWith(r)?a(s.slice(r.length)):Lr(md,!1,s,void 0,!0)}if(o){const r=n;n=a=>o({className:a,parseClassName:r})}return n},bd=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,n)=>{t.set(o,1e6+n)}),o=>{const n=[];let r=[];for(let a=0;a<o.length;a++){const s=o[a],i=s[0]==="[",l=t.has(s);i||l?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(s)):r.push(s)}return r.length>0&&(r.sort(),n.push(...r)),n}},wd=e=>({cache:gd(e.cacheSize),parseClassName:vd(e),sortModifiers:bd(e),...sd(e)}),yd=/\s+/,xd=(e,t)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:r,sortModifiers:a}=t,s=[],i=e.trim().split(yd);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=n(v?b.substring(0,m):b);if(!w){if(!v){l=f+(l.length>0?" "+l:l);continue}if(w=n(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+Ko:y,C=k+w;if(s.indexOf(C)>-1)continue;s.push(C);const _=r(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},kd=(...e)=>{let t=0,o,n,r="";for(;t<e.length;)(o=e[t++])&&(n=zr(o))&&(r&&(r+=" "),r+=n);return r},zr=e=>{if(typeof e=="string")return e;let t,o="";for(let n=0;n<e.length;n++)e[n]&&(t=zr(e[n]))&&(o&&(o+=" "),o+=t);return o},Sd=(e,...t)=>{let o,n,r,a;const s=l=>{const u=t.reduce((f,c)=>c(f),e());return o=wd(u),n=o.cache.get,r=o.cache.set,a=i,i(l)},i=l=>{const u=n(l);if(u)return u;const f=xd(l,o);return r(l,f),f};return a=s,(...l)=>a(kd(...l))},Cd=[],le=e=>{const t=o=>o[e]||Cd;return t.isThemeGetter=!0,t},Dr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$r=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ed=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Nd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Td=/\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$/,_d=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Pd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ad=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>Ed.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),Re=e=>!!e&&Number.isInteger(Number(e)),Zo=e=>e.endsWith("%")&&ne(e.slice(0,-1)),Be=e=>Nd.test(e),Fr=()=>!0,Id=e=>Td.test(e)&&!_d.test(e),Jo=()=>!1,Md=e=>Pd.test(e),Od=e=>Ad.test(e),Ld=e=>!W(e)&&!U(e),zd=e=>Ge(e,jr,Jo),W=e=>Dr.test(e),ot=e=>Ge(e,Rr,Id),Br=e=>Ge(e,Ud,ne),Dd=e=>Ge(e,qr,Fr),$d=e=>Ge(e,Gr,Jo),Hr=e=>Ge(e,Wr,Jo),Fd=e=>Ge(e,Ur,Od),Kt=e=>Ge(e,Yr,Md),U=e=>$r.test(e),Ot=e=>nt(e,Rr),Bd=e=>nt(e,Gr),Vr=e=>nt(e,Wr),Hd=e=>nt(e,jr),Vd=e=>nt(e,Ur),Zt=e=>nt(e,Yr,!0),Wd=e=>nt(e,qr,!0),Ge=(e,t,o)=>{const n=Dr.exec(e);return n?n[1]?t(n[1]):o(n[2]):!1},nt=(e,t,o=!1)=>{const n=$r.exec(e);return n?n[1]?t(n[1]):o:!1},Wr=e=>e==="position"||e==="percentage",Ur=e=>e==="image"||e==="url",jr=e=>e==="length"||e==="size"||e==="bg-size",Rr=e=>e==="length",Ud=e=>e==="number",Gr=e=>e==="family-name",qr=e=>e==="number"||e==="weight",Yr=e=>e==="shadow",jd=Sd(()=>{const e=le("color"),t=le("font"),o=le("text"),n=le("font-weight"),r=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"],_=()=>[...C(),U,W],P=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],E=()=>[U,W,l],z=()=>[je,"full","auto",...E()],j=()=>[Re,"none","subgrid",U,W],O=()=>["auto",{span:["full",Re,U,W]},Re,U,W],B=()=>[Re,"auto",U,W],V=()=>["auto","min","max","fr",U,W],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...E()],D=()=>[je,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],R=()=>[je,"screen","full","dvw","lvw","svw","min","max","fit",...E()],N=()=>[je,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],S=()=>[e,U,W],M=()=>[...C(),Vr,Hr,{position:[U,W]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",Hd,zd,{size:[U,W]}],$=()=>[Zo,Ot,ot],H=()=>["","none","full",u,U,W],Z=()=>["",ne,Ot,ot],G=()=>["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"],Q=()=>[ne,Zo,Vr,Hr],ee=()=>["","none",b,U,W],re=()=>["none",ne,U,W],oe=()=>["none",ne,U,W],ce=()=>[ne,U,W],de=()=>[je,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Be],breakpoint:[Be],color:[Fr],container:[Be],"drop-shadow":[Be],ease:["in","out","in-out"],font:[Ld],"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",ne],text:[Be],"text-shadow":[Be],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",je,W,U,v]}],container:["container"],columns:[{columns:[ne,W,U,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:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[Re,"auto",U,W]}],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:[ne,je,"auto","initial","none",W]}],grow:[{grow:["",ne,U,W]}],shrink:[{shrink:["",ne,U,W]}],order:[{order:[Re,"first","last","none",U,W]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],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:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...R()]}],"min-inline-size":[{"min-inline":["auto",...R()]}],"max-inline-size":[{"max-inline":["none",...R()]}],"block-size":[{block:["auto",...N()]}],"min-block-size":[{"min-block":["auto",...N()]}],"max-block-size":[{"max-block":["none",...N()]}],w:[{w:[i,"screen",...D()]}],"min-w":[{"min-w":[i,"screen","none",...D()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",o,Ot,ot]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Wd,Dd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zo,W]}],"font-family":[{font:[Bd,$d,t]}],"font-features":[{"font-features":[W]}],"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:[r,U,W]}],"line-clamp":[{"line-clamp":[ne,"none",U,Br]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",U,W]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",U,W]}],"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:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",U,ot]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[ne,"auto",U,W]}],"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",U,W]}],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",U,W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Re,U,W],radial:["",U,W],conic:[Re,U,W]},Vd,Fd]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-bs":[{"border-bs":Z()}],"border-w-be":[{"border-be":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"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:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,U,W]}],"outline-w":[{outline:["",ne,Ot,ot]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",f,Zt,Kt]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",c,Zt,Kt]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[ne,ot]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",h,Zt,Kt]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[ne,U,W]}],"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":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"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":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"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":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"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":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"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":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"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":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"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":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[U,W]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"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":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"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:M()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",U,W]}],filter:[{filter:["","none",U,W]}],blur:[{blur:ee()}],brightness:[{brightness:[ne,U,W]}],contrast:[{contrast:[ne,U,W]}],"drop-shadow":[{"drop-shadow":["","none",g,Zt,Kt]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",ne,U,W]}],"hue-rotate":[{"hue-rotate":[ne,U,W]}],invert:[{invert:["",ne,U,W]}],saturate:[{saturate:[ne,U,W]}],sepia:[{sepia:["",ne,U,W]}],"backdrop-filter":[{"backdrop-filter":["","none",U,W]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[ne,U,W]}],"backdrop-contrast":[{"backdrop-contrast":[ne,U,W]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,U,W]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,U,W]}],"backdrop-invert":[{"backdrop-invert":["",ne,U,W]}],"backdrop-opacity":[{"backdrop-opacity":[ne,U,W]}],"backdrop-saturate":[{"backdrop-saturate":[ne,U,W]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,U,W]}],"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",U,W]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",U,W]}],ease:[{ease:["linear","initial",w,U,W]}],delay:[{delay:[ne,U,W]}],animate:[{animate:["none",y,U,W]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,U,W]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[U,W,"","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: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",U,W]}],"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",U,W]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[ne,Ot,ot,Br]}],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)=>jd(_r(e));function Lt({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 Rd({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 zt({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:X("px-6",e),...t})}const Xr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kr=_r,Jt=(e,t)=>o=>{var n;if((t==null?void 0:t.variants)==null)return Kr(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:r,defaultVariants:a}=t,s=Object.keys(r).map(u=>{const f=o==null?void 0:o[u],c=a==null?void 0:a[u];if(f===null)return null;const h=Xr(f)||Xr(c);return r[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||(n=t.compoundVariants)===null||n===void 0?void 0:n.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 Kr(e,s,l,o==null?void 0:o.class,o==null?void 0:o.className)};function Zr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jr(...e){return t=>{let o=!1;const n=e.map(r=>{const a=Zr(r,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let r=0;r<n.length;r++){const a=n[r];typeof a=="function"?a():Zr(e[r],null)}}}}function se(...e){return p.useCallback(Jr(...e),e)}function Dt(e){const t=Gd(e),o=p.forwardRef((n,r)=>{const{children:a,...s}=n,i=p.Children.toArray(a),l=i.find(Yd);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:r,children:p.isValidElement(u)?p.cloneElement(u,void 0,f):null})}return d.jsx(t,{...s,ref:r,children:a})});return o.displayName=`${e}.Slot`,o}var Qr=Dt("Slot");function Gd(e){const t=p.forwardRef((o,n)=>{const{children:r,...a}=o;if(p.isValidElement(r)){const s=Kd(r),i=Xd(a,r.props);return r.type!==p.Fragment&&(i.ref=n?Jr(n,s):s),p.cloneElement(r,i)}return p.Children.count(r)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ea=Symbol("radix.slottable");function qd(e){const t=({children:o})=>d.jsx(d.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=ea,t}function Yd(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ea}function Xd(e,t){const o={...t};for(const n in t){const r=e[n],a=t[n];/^on[A-Z]/.test(n)?r&&a?o[n]=(...i)=>{const l=a(...i);return r(...i),l}:r&&(o[n]=r):n==="style"?o[n]={...r,...a}:n==="className"&&(o[n]=[r,a].filter(Boolean).join(" "))}return{...e,...o}}function Kd(e){var n,r;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Zd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],K=Zd.reduce((e,t)=>{const o=Dt(`Primitive.${t}`),n=p.forwardRef((r,a)=>{const{asChild:s,...i}=r,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Jd(e,t){e&&Rt.flushSync(()=>e.dispatchEvent(t))}var ta=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"}),Qd="VisuallyHidden",oa=p.forwardRef((e,t)=>d.jsx(K.span,{...e,ref:t,style:{...ta,...e.style}}));oa.displayName=Qd;var eu=oa;function me(e,t=[]){let o=[];function n(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 r=()=>{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 r.scopeName=e,[n,tu(r,...t)]}function tu(...e){const t=e[0];if(e.length===1)return t;const o=()=>{const n=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const s=n.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 na(e){const t=e+"CollectionProvider",[o,n]=me(t),[r,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(r,{scope:v,itemMap:k,collectionRef:y,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=Dt(i),u=x.forwardRef((m,v)=>{const{scope:w,children:y}=m,k=a(i,w),C=se(v,k.collectionRef);return d.jsx(l,{ref:C,children:y})});u.displayName=i;const f=e+"CollectionItemSlot",c="data-radix-collection-item",h=Dt(f),g=x.forwardRef((m,v)=>{const{scope:w,children:y,...k}=m,C=x.useRef(null),_=se(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:_,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,n]}function J(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e==null||e(r),o===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var ie=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},ou=p[" useInsertionEffect ".trim().toString()]||ie;function He({prop:e,defaultProp:t,onChange:o=()=>{},caller:n}){const[r,a,s]=nu({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:r;{const f=p.useRef(e!==void 0);p.useEffect(()=>{const c=f.current;c!==i&&console.warn(`${n} 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,n])}const u=p.useCallback(f=>{var c;if(i){const h=ru(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 nu({defaultProp:e,onChange:t}){const[o,n]=p.useState(e),r=p.useRef(o),a=p.useRef(t);return ou(()=>{a.current=t},[t]),p.useEffect(()=>{var s;r.current!==o&&((s=a.current)==null||s.call(a,o),r.current=o)},[o,r]),[o,n,a]}function ru(e){return typeof e=="function"}function au(e,t){return p.useReducer((o,n)=>t[o][n]??o,e)}var Ee=e=>{const{present:t,children:o}=e,n=su(t),r=typeof o=="function"?o({present:n.isPresent}):p.Children.only(o),a=se(n.ref,iu(r));return typeof o=="function"||n.isPresent?p.cloneElement(r,{ref:a}):null};Ee.displayName="Presence";function su(e){const[t,o]=p.useState(),n=p.useRef(null),r=p.useRef(e),a=p.useRef("none"),s=e?"mounted":"unmounted",[i,l]=au(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Qt(n.current);a.current=i==="mounted"?u:"none"},[i]),ie(()=>{const u=n.current,f=r.current;if(f!==e){const h=a.current,g=Qt(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),ie(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,c=g=>{const m=Qt(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!r.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=Qt(n.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=>{n.current=u?getComputedStyle(u):null,o(u)},[])}}function Qt(e){return(e==null?void 0:e.animationName)||"none"}function iu(e){var n,r;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var lu=p[" useId ".trim().toString()]||(()=>{}),cu=0;function rt(e){const[t,o]=p.useState(lu());return ie(()=>{o(n=>n??String(cu++))},[e]),e||(t?`radix-${t}`:"")}var eo="Collapsible",[du]=me(eo),[uu,Qo]=du(eo),ra=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,open:n,defaultOpen:r,disabled:a,onOpenChange:s,...i}=e,[l,u]=He({prop:n,defaultProp:r??!1,onChange:s,caller:eo});return d.jsx(uu,{scope:o,disabled:a,contentId:rt(),open:l,onOpenToggle:p.useCallback(()=>u(f=>!f),[u]),children:d.jsx(K.div,{"data-state":tn(l),"data-disabled":a?"":void 0,...i,ref:t})})});ra.displayName=eo;var aa="CollapsibleTrigger",sa=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,...n}=e,r=Qo(aa,o);return d.jsx(K.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":tn(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...n,ref:t,onClick:J(e.onClick,r.onOpenToggle)})});sa.displayName=aa;var en="CollapsibleContent",ia=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Qo(en,e.__scopeCollapsible);return d.jsx(Ee,{present:o||r.open,children:({present:a})=>d.jsx(fu,{...n,ref:t,present:a})})});ia.displayName=en;var fu=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,present:n,children:r,...a}=e,s=Qo(en,o),[i,l]=p.useState(n),u=p.useRef(null),f=se(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(n)}},[s.open,n]),d.jsx(K.div,{"data-state":tn(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&&r})});function tn(e){return e?"open":"closed"}var pu=ra,hu=p.createContext(void 0);function $t(e){const t=p.useContext(hu);return e||t||"ltr"}function pe(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...o)=>{var n;return(n=t.current)==null?void 0:n.call(t,...o)},[])}function gu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e);p.useEffect(()=>{const n=r=>{r.key==="Escape"&&o(r)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[o,t])}var mu="DismissableLayer",on="dismissableLayer.update",vu="dismissableLayer.pointerDownOutside",bu="dismissableLayer.focusOutside",la,ca=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nn=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=p.useContext(ca),[f,c]=p.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=p.useState({}),b=se(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,C=y>=w,_=xu(T=>{const E=T.target,z=[...u.branches].some(j=>j.contains(E));!C||z||(r==null||r(T),s==null||s(T),T.defaultPrevented||i==null||i())},h),P=ku(T=>{const E=T.target;[...u.branches].some(j=>j.contains(E))||(a==null||a(T),s==null||s(T),T.defaultPrevented||i==null||i())},h);return gu(T=>{y===u.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&i&&(T.preventDefault(),i()))},h),p.useEffect(()=>{if(f)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(la=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),da(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=la)}},[f,h,o,u]),p.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),da())},[f,u]),p.useEffect(()=>{const T=()=>g({});return document.addEventListener(on,T),()=>document.removeEventListener(on,T)},[]),d.jsx(K.div,{...l,ref:b,style:{pointerEvents:k?C?"auto":"none":void 0,...e.style},onFocusCapture:J(e.onFocusCapture,P.onFocusCapture),onBlurCapture:J(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,_.onPointerDownCapture)})});nn.displayName=mu;var wu="DismissableLayerBranch",yu=p.forwardRef((e,t)=>{const o=p.useContext(ca),n=p.useRef(null),r=se(t,n);return p.useEffect(()=>{const a=n.current;if(a)return o.branches.add(a),()=>{o.branches.delete(a)}},[o.branches]),d.jsx(K.div,{...e,ref:r})});yu.displayName=wu;function xu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e),n=p.useRef(!1),r=p.useRef(()=>{});return p.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let l=function(){ua(vu,o,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,o]),{onPointerDownCapture:()=>n.current=!0}}function ku(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e),n=p.useRef(!1);return p.useEffect(()=>{const r=a=>{a.target&&!n.current&&ua(bu,o,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,o]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function da(){const e=new CustomEvent(on);document.dispatchEvent(e)}function ua(e,t,o,{discrete:n}){const r=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&r.addEventListener(e,t,{once:!0}),n?Jd(r,a):r.dispatchEvent(a)}var rn="focusScope.autoFocusOnMount",an="focusScope.autoFocusOnUnmount",fa={bubbles:!1,cancelable:!0},Su="FocusScope",pa=p.forwardRef((e,t)=>{const{loop:o=!1,trapped:n=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...s}=e,[i,l]=p.useState(null),u=pe(r),f=pe(a),c=p.useRef(null),h=se(t,m=>l(m)),g=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){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 _ 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()}}},[n,i,g.paused]),p.useEffect(()=>{if(i){ma.add(g);const m=document.activeElement;if(!i.contains(m)){const w=new CustomEvent(rn,fa);i.addEventListener(rn,u),i.dispatchEvent(w),w.defaultPrevented||(Cu(Pu(ha(i)),{select:!0}),document.activeElement===m&&qe(i))}return()=>{i.removeEventListener(rn,u),setTimeout(()=>{const w=new CustomEvent(an,fa);i.addEventListener(an,f),i.dispatchEvent(w),w.defaultPrevented||qe(m??document.body,{select:!0}),i.removeEventListener(an,f),ma.remove(g)},0)}}},[i,u,f,g]);const b=p.useCallback(m=>{if(!o&&!n||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]=Eu(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,n,g.paused]);return d.jsx(K.div,{tabIndex:-1,...s,ref:h,onKeyDown:b})});pa.displayName=Su;function Cu(e,{select:t=!1}={}){const o=document.activeElement;for(const n of e)if(qe(n,{select:t}),document.activeElement!==o)return}function Eu(e){const t=ha(e),o=ga(t,e),n=ga(t.reverse(),e);return[o,n]}function ha(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const r=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||r?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function ga(e,t){for(const o of e)if(!Nu(o,{upTo:t}))return o}function Nu(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 Tu(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&&Tu(e)&&t&&e.select()}}var ma=_u();function _u(){let e=[];return{add(t){const o=e[0];t!==o&&(o==null||o.pause()),e=va(e,t),e.unshift(t)},remove(t){var o;e=va(e,t),(o=e[0])==null||o.resume()}}}function va(e,t){const o=[...e],n=o.indexOf(t);return n!==-1&&o.splice(n,1),o}function Pu(e){return e.filter(t=>t.tagName!=="A")}var Au="Portal",sn=p.forwardRef((e,t)=>{var i;const{container:o,...n}=e,[r,a]=p.useState(!1);ie(()=>a(!0),[]);const s=o||r&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Wo.createPortal(d.jsx(K.div,{...n,ref:t}),s):null});sn.displayName=Au;var ln=0;function Iu(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ba()),document.body.insertAdjacentElement("beforeend",e[1]??ba()),ln++,()=>{ln===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ln--}},[])}function ba(){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 Le=function(){return Le=Object.assign||function(t){for(var o,n=1,r=arguments.length;n<r;n++){o=arguments[n];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},Le.apply(this,arguments)};function wa(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o}function Mu(e,t,o){if(o||arguments.length===2)for(var n=0,r=t.length,a;n<r;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var to="right-scroll-bar-position",oo="width-before-scroll-bar",Ou="with-scroll-bars-hidden",Lu="--removed-body-scroll-bar-size";function cn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function zu(e,t){var o=x.useState(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(n){var r=o.value;r!==n&&(o.value=n,o.callback(n,r))}}}})[0];return o.callback=t,o.facade}var Du=typeof window<"u"?p.useLayoutEffect:p.useEffect,ya=new WeakMap;function $u(e,t){var o=zu(null,function(n){return e.forEach(function(r){return cn(r,n)})});return Du(function(){var n=ya.get(o);if(n){var r=new Set(n),a=new Set(e),s=o.current;r.forEach(function(i){a.has(i)||cn(i,null)}),a.forEach(function(i){r.has(i)||cn(i,s)})}ya.set(o,e)},[e]),o}function Fu(e){return e}function Bu(e,t){t===void 0&&(t=Fu);var o=[],n=!1,r={read:function(){if(n)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,n);return o.push(s),function(){o=o.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;o.length;){var s=o;o=[],s.forEach(a)}o={push:function(i){return a(i)},filter:function(){return o}}},assignMedium:function(a){n=!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 r}function Hu(e){e===void 0&&(e={});var t=Bu(null);return t.options=Le({async:!0,ssr:!1},e),t}var xa=function(e){var t=e.sideCar,o=wa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,Le({},o))};xa.isSideCarExport=!0;function Vu(e,t){return e.useMedium(t),xa}var ka=Hu(),dn=function(){},no=p.forwardRef(function(e,t){var o=p.useRef(null),n=p.useState({onScrollCapture:dn,onWheelCapture:dn,onTouchMoveCapture:dn}),r=n[0],a=n[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=wa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,P=$u([o,t]),T=Le(Le({},C),r);return p.createElement(p.Fragment,null,f&&p.createElement(_,{sideCar:ka,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),Le(Le({},T),{ref:P})):p.createElement(y,Le({},T,{className:l,ref:P}),i))});no.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},no.classNames={fullWidth:oo,zeroRight:to};var Wu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Uu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wu();return t&&e.setAttribute("nonce",t),e}function ju(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ru(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Gu=function(){var e=0,t=null;return{add:function(o){e==0&&(t=Uu())&&(ju(t,o),Ru(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qu=function(){var e=Gu();return function(t,o){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}},Sa=function(){var e=qu(),t=function(o){var n=o.styles,r=o.dynamic;return e(n,r),null};return t},Yu={left:0,top:0,right:0,gap:0},un=function(e){return parseInt(e||"",10)||0},Xu=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[un(o),un(n),un(r)]},Ku=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Yu;var t=Xu(e),o=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-o+t[2]-t[0])}},Zu=Sa(),mt="data-scroll-locked",Ju=function(e,t,o,n){var r=e.left,a=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
237
+ */const od=ae("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 _r(e){var t,o,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=_r(e[t]))&&(n&&(n+=" "),n+=o)}else for(o in e)e[o]&&(n&&(n+=" "),n+=o);return n}function Pr(){for(var e,t,o=0,n="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=_r(e))&&(n&&(n+=" "),n+=t);return n}const nd=(e,t)=>{const o=new Array(e.length+t.length);for(let n=0;n<e.length;n++)o[n]=e[n];for(let n=0;n<t.length;n++)o[e.length+n]=t[n];return o},rd=(e,t)=>({classGroupId:e,validator:t}),Ar=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),Xt="-",Ir=[],ad="arbitrary..",sd=e=>{const t=ld(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return id(s);const i=s.split(Xt),l=i[0]===""&&i.length>1?1:0;return Mr(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=n[s],u=o[s];return l?u?nd(u,l):l:u||Ir}return o[s]||Ir}}},Mr=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const r=e[t],a=o.nextPart.get(r);if(a){const u=Mr(e,t+1,a);if(u)return u}const s=o.validators;if(s===null)return;const i=t===0?e.join(Xt):e.slice(t).join(Xt),l=s.length;for(let u=0;u<l;u++){const f=s[u];if(f.validator(i))return f.classGroupId}},id=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),n=t.slice(0,o);return n?ad+n:void 0})(),ld=e=>{const{theme:t,classGroups:o}=e;return cd(o,t)},cd=(e,t)=>{const o=Ar();for(const n in e){const r=e[n];Xo(r,o,n,t)}return o},Xo=(e,t,o,n)=>{const r=e.length;for(let a=0;a<r;a++){const s=e[a];dd(s,t,o,n)}},dd=(e,t,o,n)=>{if(typeof e=="string"){ud(e,t,o);return}if(typeof e=="function"){fd(e,t,o,n);return}pd(e,t,o,n)},ud=(e,t,o)=>{const n=e===""?t:Or(t,e);n.classGroupId=o},fd=(e,t,o,n)=>{if(hd(e)){Xo(e(n),t,o,n);return}t.validators===null&&(t.validators=[]),t.validators.push(rd(o,e))},pd=(e,t,o,n)=>{const r=Object.entries(e),a=r.length;for(let s=0;s<a;s++){const[i,l]=r[s];Xo(l,Or(t,i),o,n)}},Or=(e,t)=>{let o=e;const n=t.split(Xt),r=n.length;for(let a=0;a<r;a++){const s=n[a];let i=o.nextPart.get(s);i||(i=Ar(),o.nextPart.set(s,i)),o=i}return o},hd=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,gd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),n=Object.create(null);const r=(a,s)=>{o[a]=s,t++,t>e&&(t=0,n=o,o=Object.create(null))};return{get(a){let s=o[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return r(a,s),s},set(a,s){a in o?o[a]=s:r(a,s)}}},Ko="!",Lr=":",md=[],zr=(e,t,o,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:n,isExternal:r}),vd=e=>{const{prefix:t,experimentalParseClassName:o}=e;let n=r=>{const a=[];let s=0,i=0,l=0,u;const f=r.length;for(let m=0;m<f;m++){const v=r[m];if(s===0&&i===0){if(v===Lr){a.push(r.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?r:r.slice(l);let h=c,g=!1;c.endsWith(Ko)?(h=c.slice(0,-1),g=!0):c.startsWith(Ko)&&(h=c.slice(1),g=!0);const b=u&&u>l?u-l:void 0;return zr(a,g,h,b)};if(t){const r=t+Lr,a=n;n=s=>s.startsWith(r)?a(s.slice(r.length)):zr(md,!1,s,void 0,!0)}if(o){const r=n;n=a=>o({className:a,parseClassName:r})}return n},bd=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,n)=>{t.set(o,1e6+n)}),o=>{const n=[];let r=[];for(let a=0;a<o.length;a++){const s=o[a],i=s[0]==="[",l=t.has(s);i||l?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(s)):r.push(s)}return r.length>0&&(r.sort(),n.push(...r)),n}},wd=e=>({cache:gd(e.cacheSize),parseClassName:vd(e),sortModifiers:bd(e),...sd(e)}),yd=/\s+/,xd=(e,t)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:r,sortModifiers:a}=t,s=[],i=e.trim().split(yd);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=n(v?b.substring(0,m):b);if(!w){if(!v){l=f+(l.length>0?" "+l:l);continue}if(w=n(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+Ko:y,C=k+w;if(s.indexOf(C)>-1)continue;s.push(C);const _=r(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},kd=(...e)=>{let t=0,o,n,r="";for(;t<e.length;)(o=e[t++])&&(n=Dr(o))&&(r&&(r+=" "),r+=n);return r},Dr=e=>{if(typeof e=="string")return e;let t,o="";for(let n=0;n<e.length;n++)e[n]&&(t=Dr(e[n]))&&(o&&(o+=" "),o+=t);return o},Sd=(e,...t)=>{let o,n,r,a;const s=l=>{const u=t.reduce((f,c)=>c(f),e());return o=wd(u),n=o.cache.get,r=o.cache.set,a=i,i(l)},i=l=>{const u=n(l);if(u)return u;const f=xd(l,o);return r(l,f),f};return a=s,(...l)=>a(kd(...l))},Cd=[],le=e=>{const t=o=>o[e]||Cd;return t.isThemeGetter=!0,t},$r=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Fr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ed=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Nd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Td=/\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$/,_d=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Pd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ad=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>Ed.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),Re=e=>!!e&&Number.isInteger(Number(e)),Zo=e=>e.endsWith("%")&&ne(e.slice(0,-1)),Be=e=>Nd.test(e),Br=()=>!0,Id=e=>Td.test(e)&&!_d.test(e),Jo=()=>!1,Md=e=>Pd.test(e),Od=e=>Ad.test(e),Ld=e=>!W(e)&&!U(e),zd=e=>Ge(e,Rr,Jo),W=e=>$r.test(e),ot=e=>Ge(e,Gr,Id),Hr=e=>Ge(e,Ud,ne),Dd=e=>Ge(e,Yr,Br),$d=e=>Ge(e,qr,Jo),Vr=e=>Ge(e,Ur,Jo),Fd=e=>Ge(e,jr,Od),Kt=e=>Ge(e,Xr,Md),U=e=>Fr.test(e),Ot=e=>nt(e,Gr),Bd=e=>nt(e,qr),Wr=e=>nt(e,Ur),Hd=e=>nt(e,Rr),Vd=e=>nt(e,jr),Zt=e=>nt(e,Xr,!0),Wd=e=>nt(e,Yr,!0),Ge=(e,t,o)=>{const n=$r.exec(e);return n?n[1]?t(n[1]):o(n[2]):!1},nt=(e,t,o=!1)=>{const n=Fr.exec(e);return n?n[1]?t(n[1]):o:!1},Ur=e=>e==="position"||e==="percentage",jr=e=>e==="image"||e==="url",Rr=e=>e==="length"||e==="size"||e==="bg-size",Gr=e=>e==="length",Ud=e=>e==="number",qr=e=>e==="family-name",Yr=e=>e==="number"||e==="weight",Xr=e=>e==="shadow",jd=Sd(()=>{const e=le("color"),t=le("font"),o=le("text"),n=le("font-weight"),r=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"],_=()=>[...C(),U,W],P=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],E=()=>[U,W,l],z=()=>[je,"full","auto",...E()],j=()=>[Re,"none","subgrid",U,W],O=()=>["auto",{span:["full",Re,U,W]},Re,U,W],B=()=>[Re,"auto",U,W],V=()=>["auto","min","max","fr",U,W],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...E()],D=()=>[je,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],R=()=>[je,"screen","full","dvw","lvw","svw","min","max","fit",...E()],N=()=>[je,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],S=()=>[e,U,W],M=()=>[...C(),Wr,Vr,{position:[U,W]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",Hd,zd,{size:[U,W]}],$=()=>[Zo,Ot,ot],H=()=>["","none","full",u,U,W],Z=()=>["",ne,Ot,ot],G=()=>["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"],Q=()=>[ne,Zo,Wr,Vr],ee=()=>["","none",b,U,W],re=()=>["none",ne,U,W],oe=()=>["none",ne,U,W],ce=()=>[ne,U,W],de=()=>[je,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Be],breakpoint:[Be],color:[Br],container:[Be],"drop-shadow":[Be],ease:["in","out","in-out"],font:[Ld],"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",ne],text:[Be],"text-shadow":[Be],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",je,W,U,v]}],container:["container"],columns:[{columns:[ne,W,U,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:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[Re,"auto",U,W]}],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:[ne,je,"auto","initial","none",W]}],grow:[{grow:["",ne,U,W]}],shrink:[{shrink:["",ne,U,W]}],order:[{order:[Re,"first","last","none",U,W]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],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:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],"inline-size":[{inline:["auto",...R()]}],"min-inline-size":[{"min-inline":["auto",...R()]}],"max-inline-size":[{"max-inline":["none",...R()]}],"block-size":[{block:["auto",...N()]}],"min-block-size":[{"min-block":["auto",...N()]}],"max-block-size":[{"max-block":["none",...N()]}],w:[{w:[i,"screen",...D()]}],"min-w":[{"min-w":[i,"screen","none",...D()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",o,Ot,ot]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Wd,Dd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zo,W]}],"font-family":[{font:[Bd,$d,t]}],"font-features":[{"font-features":[W]}],"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:[r,U,W]}],"line-clamp":[{"line-clamp":[ne,"none",U,Hr]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",U,W]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",U,W]}],"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:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",U,ot]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[ne,"auto",U,W]}],"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",U,W]}],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",U,W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Re,U,W],radial:["",U,W],conic:[Re,U,W]},Vd,Fd]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-bs":[{"border-bs":Z()}],"border-w-be":[{"border-be":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"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:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,U,W]}],"outline-w":[{outline:["",ne,Ot,ot]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",f,Zt,Kt]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",c,Zt,Kt]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[ne,ot]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",h,Zt,Kt]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[ne,U,W]}],"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":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"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":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"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":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"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":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"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":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"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":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"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":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[U,W]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"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":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"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:M()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",U,W]}],filter:[{filter:["","none",U,W]}],blur:[{blur:ee()}],brightness:[{brightness:[ne,U,W]}],contrast:[{contrast:[ne,U,W]}],"drop-shadow":[{"drop-shadow":["","none",g,Zt,Kt]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",ne,U,W]}],"hue-rotate":[{"hue-rotate":[ne,U,W]}],invert:[{invert:["",ne,U,W]}],saturate:[{saturate:[ne,U,W]}],sepia:[{sepia:["",ne,U,W]}],"backdrop-filter":[{"backdrop-filter":["","none",U,W]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[ne,U,W]}],"backdrop-contrast":[{"backdrop-contrast":[ne,U,W]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,U,W]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,U,W]}],"backdrop-invert":[{"backdrop-invert":["",ne,U,W]}],"backdrop-opacity":[{"backdrop-opacity":[ne,U,W]}],"backdrop-saturate":[{"backdrop-saturate":[ne,U,W]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,U,W]}],"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",U,W]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",U,W]}],ease:[{ease:["linear","initial",w,U,W]}],delay:[{delay:[ne,U,W]}],animate:[{animate:["none",y,U,W]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,U,W]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[U,W,"","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: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",U,W]}],"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",U,W]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[ne,Ot,ot,Hr]}],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)=>jd(Pr(e));function Lt({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 Rd({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 zt({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:X("px-6",e),...t})}const Kr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Zr=Pr,Jt=(e,t)=>o=>{var n;if((t==null?void 0:t.variants)==null)return Zr(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:r,defaultVariants:a}=t,s=Object.keys(r).map(u=>{const f=o==null?void 0:o[u],c=a==null?void 0:a[u];if(f===null)return null;const h=Kr(f)||Kr(c);return r[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||(n=t.compoundVariants)===null||n===void 0?void 0:n.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 Zr(e,s,l,o==null?void 0:o.class,o==null?void 0:o.className)};function Jr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qr(...e){return t=>{let o=!1;const n=e.map(r=>{const a=Jr(r,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let r=0;r<n.length;r++){const a=n[r];typeof a=="function"?a():Jr(e[r],null)}}}}function se(...e){return p.useCallback(Qr(...e),e)}function Dt(e){const t=Gd(e),o=p.forwardRef((n,r)=>{const{children:a,...s}=n,i=p.Children.toArray(a),l=i.find(Yd);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:r,children:p.isValidElement(u)?p.cloneElement(u,void 0,f):null})}return d.jsx(t,{...s,ref:r,children:a})});return o.displayName=`${e}.Slot`,o}var ea=Dt("Slot");function Gd(e){const t=p.forwardRef((o,n)=>{const{children:r,...a}=o;if(p.isValidElement(r)){const s=Kd(r),i=Xd(a,r.props);return r.type!==p.Fragment&&(i.ref=n?Qr(n,s):s),p.cloneElement(r,i)}return p.Children.count(r)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ta=Symbol("radix.slottable");function qd(e){const t=({children:o})=>d.jsx(d.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=ta,t}function Yd(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ta}function Xd(e,t){const o={...t};for(const n in t){const r=e[n],a=t[n];/^on[A-Z]/.test(n)?r&&a?o[n]=(...i)=>{const l=a(...i);return r(...i),l}:r&&(o[n]=r):n==="style"?o[n]={...r,...a}:n==="className"&&(o[n]=[r,a].filter(Boolean).join(" "))}return{...e,...o}}function Kd(e){var n,r;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Zd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],K=Zd.reduce((e,t)=>{const o=Dt(`Primitive.${t}`),n=p.forwardRef((r,a)=>{const{asChild:s,...i}=r,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Jd(e,t){e&&Rt.flushSync(()=>e.dispatchEvent(t))}var oa=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"}),Qd="VisuallyHidden",na=p.forwardRef((e,t)=>d.jsx(K.span,{...e,ref:t,style:{...oa,...e.style}}));na.displayName=Qd;var eu=na;function me(e,t=[]){let o=[];function n(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 r=()=>{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 r.scopeName=e,[n,tu(r,...t)]}function tu(...e){const t=e[0];if(e.length===1)return t;const o=()=>{const n=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const s=n.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 ra(e){const t=e+"CollectionProvider",[o,n]=me(t),[r,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(r,{scope:v,itemMap:k,collectionRef:y,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=Dt(i),u=x.forwardRef((m,v)=>{const{scope:w,children:y}=m,k=a(i,w),C=se(v,k.collectionRef);return d.jsx(l,{ref:C,children:y})});u.displayName=i;const f=e+"CollectionItemSlot",c="data-radix-collection-item",h=Dt(f),g=x.forwardRef((m,v)=>{const{scope:w,children:y,...k}=m,C=x.useRef(null),_=se(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:_,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,n]}function J(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e==null||e(r),o===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var ie=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},ou=p[" useInsertionEffect ".trim().toString()]||ie;function He({prop:e,defaultProp:t,onChange:o=()=>{},caller:n}){const[r,a,s]=nu({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:r;{const f=p.useRef(e!==void 0);p.useEffect(()=>{const c=f.current;c!==i&&console.warn(`${n} 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,n])}const u=p.useCallback(f=>{var c;if(i){const h=ru(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 nu({defaultProp:e,onChange:t}){const[o,n]=p.useState(e),r=p.useRef(o),a=p.useRef(t);return ou(()=>{a.current=t},[t]),p.useEffect(()=>{var s;r.current!==o&&((s=a.current)==null||s.call(a,o),r.current=o)},[o,r]),[o,n,a]}function ru(e){return typeof e=="function"}function au(e,t){return p.useReducer((o,n)=>t[o][n]??o,e)}var Ee=e=>{const{present:t,children:o}=e,n=su(t),r=typeof o=="function"?o({present:n.isPresent}):p.Children.only(o),a=se(n.ref,iu(r));return typeof o=="function"||n.isPresent?p.cloneElement(r,{ref:a}):null};Ee.displayName="Presence";function su(e){const[t,o]=p.useState(),n=p.useRef(null),r=p.useRef(e),a=p.useRef("none"),s=e?"mounted":"unmounted",[i,l]=au(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Qt(n.current);a.current=i==="mounted"?u:"none"},[i]),ie(()=>{const u=n.current,f=r.current;if(f!==e){const h=a.current,g=Qt(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),ie(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,c=g=>{const m=Qt(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!r.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=Qt(n.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=>{n.current=u?getComputedStyle(u):null,o(u)},[])}}function Qt(e){return(e==null?void 0:e.animationName)||"none"}function iu(e){var n,r;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var lu=p[" useId ".trim().toString()]||(()=>{}),cu=0;function rt(e){const[t,o]=p.useState(lu());return ie(()=>{o(n=>n??String(cu++))},[e]),e||(t?`radix-${t}`:"")}var eo="Collapsible",[du]=me(eo),[uu,Qo]=du(eo),aa=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,open:n,defaultOpen:r,disabled:a,onOpenChange:s,...i}=e,[l,u]=He({prop:n,defaultProp:r??!1,onChange:s,caller:eo});return d.jsx(uu,{scope:o,disabled:a,contentId:rt(),open:l,onOpenToggle:p.useCallback(()=>u(f=>!f),[u]),children:d.jsx(K.div,{"data-state":tn(l),"data-disabled":a?"":void 0,...i,ref:t})})});aa.displayName=eo;var sa="CollapsibleTrigger",ia=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,...n}=e,r=Qo(sa,o);return d.jsx(K.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":tn(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...n,ref:t,onClick:J(e.onClick,r.onOpenToggle)})});ia.displayName=sa;var en="CollapsibleContent",la=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Qo(en,e.__scopeCollapsible);return d.jsx(Ee,{present:o||r.open,children:({present:a})=>d.jsx(fu,{...n,ref:t,present:a})})});la.displayName=en;var fu=p.forwardRef((e,t)=>{const{__scopeCollapsible:o,present:n,children:r,...a}=e,s=Qo(en,o),[i,l]=p.useState(n),u=p.useRef(null),f=se(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(n)}},[s.open,n]),d.jsx(K.div,{"data-state":tn(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&&r})});function tn(e){return e?"open":"closed"}var pu=aa,hu=p.createContext(void 0);function $t(e){const t=p.useContext(hu);return e||t||"ltr"}function pe(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...o)=>{var n;return(n=t.current)==null?void 0:n.call(t,...o)},[])}function gu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e);p.useEffect(()=>{const n=r=>{r.key==="Escape"&&o(r)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[o,t])}var mu="DismissableLayer",on="dismissableLayer.update",vu="dismissableLayer.pointerDownOutside",bu="dismissableLayer.focusOutside",ca,da=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nn=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=p.useContext(da),[f,c]=p.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=p.useState({}),b=se(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,C=y>=w,_=xu(T=>{const E=T.target,z=[...u.branches].some(j=>j.contains(E));!C||z||(r==null||r(T),s==null||s(T),T.defaultPrevented||i==null||i())},h),P=ku(T=>{const E=T.target;[...u.branches].some(j=>j.contains(E))||(a==null||a(T),s==null||s(T),T.defaultPrevented||i==null||i())},h);return gu(T=>{y===u.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&i&&(T.preventDefault(),i()))},h),p.useEffect(()=>{if(f)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ca=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ua(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ca)}},[f,h,o,u]),p.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ua())},[f,u]),p.useEffect(()=>{const T=()=>g({});return document.addEventListener(on,T),()=>document.removeEventListener(on,T)},[]),d.jsx(K.div,{...l,ref:b,style:{pointerEvents:k?C?"auto":"none":void 0,...e.style},onFocusCapture:J(e.onFocusCapture,P.onFocusCapture),onBlurCapture:J(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,_.onPointerDownCapture)})});nn.displayName=mu;var wu="DismissableLayerBranch",yu=p.forwardRef((e,t)=>{const o=p.useContext(da),n=p.useRef(null),r=se(t,n);return p.useEffect(()=>{const a=n.current;if(a)return o.branches.add(a),()=>{o.branches.delete(a)}},[o.branches]),d.jsx(K.div,{...e,ref:r})});yu.displayName=wu;function xu(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e),n=p.useRef(!1),r=p.useRef(()=>{});return p.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let l=function(){fa(vu,o,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,o]),{onPointerDownCapture:()=>n.current=!0}}function ku(e,t=globalThis==null?void 0:globalThis.document){const o=pe(e),n=p.useRef(!1);return p.useEffect(()=>{const r=a=>{a.target&&!n.current&&fa(bu,o,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,o]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ua(){const e=new CustomEvent(on);document.dispatchEvent(e)}function fa(e,t,o,{discrete:n}){const r=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&r.addEventListener(e,t,{once:!0}),n?Jd(r,a):r.dispatchEvent(a)}var rn="focusScope.autoFocusOnMount",an="focusScope.autoFocusOnUnmount",pa={bubbles:!1,cancelable:!0},Su="FocusScope",ha=p.forwardRef((e,t)=>{const{loop:o=!1,trapped:n=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...s}=e,[i,l]=p.useState(null),u=pe(r),f=pe(a),c=p.useRef(null),h=se(t,m=>l(m)),g=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){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 _ 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()}}},[n,i,g.paused]),p.useEffect(()=>{if(i){va.add(g);const m=document.activeElement;if(!i.contains(m)){const w=new CustomEvent(rn,pa);i.addEventListener(rn,u),i.dispatchEvent(w),w.defaultPrevented||(Cu(Pu(ga(i)),{select:!0}),document.activeElement===m&&qe(i))}return()=>{i.removeEventListener(rn,u),setTimeout(()=>{const w=new CustomEvent(an,pa);i.addEventListener(an,f),i.dispatchEvent(w),w.defaultPrevented||qe(m??document.body,{select:!0}),i.removeEventListener(an,f),va.remove(g)},0)}}},[i,u,f,g]);const b=p.useCallback(m=>{if(!o&&!n||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]=Eu(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,n,g.paused]);return d.jsx(K.div,{tabIndex:-1,...s,ref:h,onKeyDown:b})});ha.displayName=Su;function Cu(e,{select:t=!1}={}){const o=document.activeElement;for(const n of e)if(qe(n,{select:t}),document.activeElement!==o)return}function Eu(e){const t=ga(e),o=ma(t,e),n=ma(t.reverse(),e);return[o,n]}function ga(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const r=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||r?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function ma(e,t){for(const o of e)if(!Nu(o,{upTo:t}))return o}function Nu(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 Tu(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&&Tu(e)&&t&&e.select()}}var va=_u();function _u(){let e=[];return{add(t){const o=e[0];t!==o&&(o==null||o.pause()),e=ba(e,t),e.unshift(t)},remove(t){var o;e=ba(e,t),(o=e[0])==null||o.resume()}}}function ba(e,t){const o=[...e],n=o.indexOf(t);return n!==-1&&o.splice(n,1),o}function Pu(e){return e.filter(t=>t.tagName!=="A")}var Au="Portal",sn=p.forwardRef((e,t)=>{var i;const{container:o,...n}=e,[r,a]=p.useState(!1);ie(()=>a(!0),[]);const s=o||r&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Wo.createPortal(d.jsx(K.div,{...n,ref:t}),s):null});sn.displayName=Au;var ln=0;function Iu(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wa()),document.body.insertAdjacentElement("beforeend",e[1]??wa()),ln++,()=>{ln===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ln--}},[])}function wa(){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 Le=function(){return Le=Object.assign||function(t){for(var o,n=1,r=arguments.length;n<r;n++){o=arguments[n];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},Le.apply(this,arguments)};function ya(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o}function Mu(e,t,o){if(o||arguments.length===2)for(var n=0,r=t.length,a;n<r;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var to="right-scroll-bar-position",oo="width-before-scroll-bar",Ou="with-scroll-bars-hidden",Lu="--removed-body-scroll-bar-size";function cn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function zu(e,t){var o=x.useState(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(n){var r=o.value;r!==n&&(o.value=n,o.callback(n,r))}}}})[0];return o.callback=t,o.facade}var Du=typeof window<"u"?p.useLayoutEffect:p.useEffect,xa=new WeakMap;function $u(e,t){var o=zu(null,function(n){return e.forEach(function(r){return cn(r,n)})});return Du(function(){var n=xa.get(o);if(n){var r=new Set(n),a=new Set(e),s=o.current;r.forEach(function(i){a.has(i)||cn(i,null)}),a.forEach(function(i){r.has(i)||cn(i,s)})}xa.set(o,e)},[e]),o}function Fu(e){return e}function Bu(e,t){t===void 0&&(t=Fu);var o=[],n=!1,r={read:function(){if(n)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,n);return o.push(s),function(){o=o.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;o.length;){var s=o;o=[],s.forEach(a)}o={push:function(i){return a(i)},filter:function(){return o}}},assignMedium:function(a){n=!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 r}function Hu(e){e===void 0&&(e={});var t=Bu(null);return t.options=Le({async:!0,ssr:!1},e),t}var ka=function(e){var t=e.sideCar,o=ya(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,Le({},o))};ka.isSideCarExport=!0;function Vu(e,t){return e.useMedium(t),ka}var Sa=Hu(),dn=function(){},no=p.forwardRef(function(e,t){var o=p.useRef(null),n=p.useState({onScrollCapture:dn,onWheelCapture:dn,onTouchMoveCapture:dn}),r=n[0],a=n[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=ya(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,P=$u([o,t]),T=Le(Le({},C),r);return p.createElement(p.Fragment,null,f&&p.createElement(_,{sideCar:Sa,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),Le(Le({},T),{ref:P})):p.createElement(y,Le({},T,{className:l,ref:P}),i))});no.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},no.classNames={fullWidth:oo,zeroRight:to};var Wu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Uu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wu();return t&&e.setAttribute("nonce",t),e}function ju(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ru(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Gu=function(){var e=0,t=null;return{add:function(o){e==0&&(t=Uu())&&(ju(t,o),Ru(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qu=function(){var e=Gu();return function(t,o){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}},Ca=function(){var e=qu(),t=function(o){var n=o.styles,r=o.dynamic;return e(n,r),null};return t},Yu={left:0,top:0,right:0,gap:0},un=function(e){return parseInt(e||"",10)||0},Xu=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[un(o),un(n),un(r)]},Ku=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Yu;var t=Xu(e),o=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-o+t[2]-t[0])}},Zu=Ca(),mt="data-scroll-locked",Ju=function(e,t,o,n){var r=e.left,a=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
238
238
  .`.concat(Ou,` {
239
239
  overflow: hidden `).concat(n,`;
240
240
  padding-right: `).concat(i,"px ").concat(n,`;
@@ -271,10 +271,10 @@
271
271
  body[`).concat(mt,`] {
272
272
  `).concat(Lu,": ").concat(i,`px;
273
273
  }
274
- `)},Ca=function(){var e=parseInt(document.body.getAttribute(mt)||"0",10);return isFinite(e)?e:0},Qu=function(){p.useEffect(function(){return document.body.setAttribute(mt,(Ca()+1).toString()),function(){var e=Ca()-1;e<=0?document.body.removeAttribute(mt):document.body.setAttribute(mt,e.toString())}},[])},ef=function(e){var t=e.noRelative,o=e.noImportant,n=e.gapMode,r=n===void 0?"margin":n;Qu();var a=p.useMemo(function(){return Ku(r)},[r]);return p.createElement(Zu,{styles:Ju(a,!t,r,o?"":"!important")})},fn=!1;if(typeof window<"u")try{var ro=Object.defineProperty({},"passive",{get:function(){return fn=!0,!0}});window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{fn=!1}var vt=fn?{passive:!1}:!1,tf=function(e){return e.tagName==="TEXTAREA"},Ea=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!tf(e)&&o[t]==="visible")},of=function(e){return Ea(e,"overflowY")},nf=function(e){return Ea(e,"overflowX")},Na=function(e,t){var o=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Ta(e,n);if(r){var a=_a(e,n),s=a[1],i=a[2];if(s>i)return!0}n=n.parentNode}while(n&&n!==o.body);return!1},rf=function(e){var t=e.scrollTop,o=e.scrollHeight,n=e.clientHeight;return[t,o,n]},af=function(e){var t=e.scrollLeft,o=e.scrollWidth,n=e.clientWidth;return[t,o,n]},Ta=function(e,t){return e==="v"?of(t):nf(t)},_a=function(e,t){return e==="v"?rf(t):af(t)},sf=function(e,t){return e==="h"&&t==="rtl"?-1:1},lf=function(e,t,o,n,r){var a=sf(e,window.getComputedStyle(t).direction),s=a*n,i=o.target,l=t.contains(i),u=!1,f=s>0,c=0,h=0;do{if(!i)break;var g=_a(e,i),b=g[0],m=g[1],v=g[2],w=m-v-a*b;(b||w)&&Ta(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},ao=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pa=function(e){return[e.deltaX,e.deltaY]},Aa=function(e){return e&&"current"in e?e.current:e},cf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},df=function(e){return`
274
+ `)},Ea=function(){var e=parseInt(document.body.getAttribute(mt)||"0",10);return isFinite(e)?e:0},Qu=function(){p.useEffect(function(){return document.body.setAttribute(mt,(Ea()+1).toString()),function(){var e=Ea()-1;e<=0?document.body.removeAttribute(mt):document.body.setAttribute(mt,e.toString())}},[])},ef=function(e){var t=e.noRelative,o=e.noImportant,n=e.gapMode,r=n===void 0?"margin":n;Qu();var a=p.useMemo(function(){return Ku(r)},[r]);return p.createElement(Zu,{styles:Ju(a,!t,r,o?"":"!important")})},fn=!1;if(typeof window<"u")try{var ro=Object.defineProperty({},"passive",{get:function(){return fn=!0,!0}});window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{fn=!1}var vt=fn?{passive:!1}:!1,tf=function(e){return e.tagName==="TEXTAREA"},Na=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!tf(e)&&o[t]==="visible")},of=function(e){return Na(e,"overflowY")},nf=function(e){return Na(e,"overflowX")},Ta=function(e,t){var o=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=_a(e,n);if(r){var a=Pa(e,n),s=a[1],i=a[2];if(s>i)return!0}n=n.parentNode}while(n&&n!==o.body);return!1},rf=function(e){var t=e.scrollTop,o=e.scrollHeight,n=e.clientHeight;return[t,o,n]},af=function(e){var t=e.scrollLeft,o=e.scrollWidth,n=e.clientWidth;return[t,o,n]},_a=function(e,t){return e==="v"?of(t):nf(t)},Pa=function(e,t){return e==="v"?rf(t):af(t)},sf=function(e,t){return e==="h"&&t==="rtl"?-1:1},lf=function(e,t,o,n,r){var a=sf(e,window.getComputedStyle(t).direction),s=a*n,i=o.target,l=t.contains(i),u=!1,f=s>0,c=0,h=0;do{if(!i)break;var g=Pa(e,i),b=g[0],m=g[1],v=g[2],w=m-v-a*b;(b||w)&&_a(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},ao=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Aa=function(e){return[e.deltaX,e.deltaY]},Ia=function(e){return e&&"current"in e?e.current:e},cf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},df=function(e){return`
275
275
  .block-interactivity-`.concat(e,` {pointer-events: none;}
276
276
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
277
- `)},uf=0,bt=[];function ff(e){var t=p.useRef([]),o=p.useRef([0,0]),n=p.useRef(),r=p.useState(uf++)[0],a=p.useState(Sa)[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(r));var m=Mu([e.lockRef.current],(e.shards||[]).map(Aa),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[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=ao(m),y=o.current,k="deltaX"in m?m.deltaX:y[0]-w[0],C="deltaY"in m?m.deltaY:y[1]-w[1],_,P=m.target,T=Math.abs(k)>Math.abs(C)?"h":"v";if("touches"in m&&T==="h"&&P.type==="range")return!1;var E=window.getSelection(),z=E&&E.anchorNode,j=z?z===P||z.contains(P):!1;if(j)return!1;var O=Na(T,P);if(!O)return!0;if(O?_=T:(_=T==="v"?"h":"v",O=Na(T,P)),!O)return!1;if(!n.current&&"changedTouches"in m&&(k||C)&&(n.current=_),!_)return!0;var B=n.current||_;return lf(B,v,m,B==="h"?k:C)},[]),l=p.useCallback(function(m){var v=m;if(!(!bt.length||bt[bt.length-1]!==a)){var w="deltaY"in v?Pa(v):ao(v),y=t.current.filter(function(_){return _.name===v.type&&(_.target===v.target||v.target===_.shadowParent)&&cf(_.delta,w)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var k=(s.current.shards||[]).map(Aa).filter(Boolean).filter(function(_){return _.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:pf(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=ao(m),n.current=void 0},[]),c=p.useCallback(function(m){u(m.type,Pa(m),m.target,i(m,e.lockRef.current))},[]),h=p.useCallback(function(m){u(m.type,ao(m),m.target,i(m,e.lockRef.current))},[]);p.useEffect(function(){return bt.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,vt),document.addEventListener("touchmove",l,vt),document.addEventListener("touchstart",f,vt),function(){bt=bt.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,vt),document.removeEventListener("touchmove",l,vt),document.removeEventListener("touchstart",f,vt)}},[]);var g=e.removeScrollBar,b=e.inert;return p.createElement(p.Fragment,null,b?p.createElement(a,{styles:df(r)}):null,g?p.createElement(ef,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const hf=Vu(ka,ff);var Ia=p.forwardRef(function(e,t){return p.createElement(no,Le({},e,{ref:t,sideCar:hf}))});Ia.classNames=no.classNames;var gf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wt=new WeakMap,so=new WeakMap,io={},pn=0,Ma=function(e){return e&&(e.host||Ma(e.parentNode))},mf=function(e,t){return t.map(function(o){if(e.contains(o))return o;var n=Ma(o);return n&&e.contains(n)?n:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},vf=function(e,t,o,n){var r=mf(t,Array.isArray(e)?e:[e]);io[o]||(io[o]=new WeakMap);var a=io[o],s=[],i=new Set,l=new Set(r),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};r.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(n),b=g!==null&&g!=="false",m=(wt.get(h)||0)+1,v=(a.get(h)||0)+1;wt.set(h,m),a.set(h,v),s.push(h),m===1&&b&&so.set(h,!0),v===1&&h.setAttribute(o,"true"),b||h.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return f(t),i.clear(),pn++,function(){s.forEach(function(c){var h=wt.get(c)-1,g=a.get(c)-1;wt.set(c,h),a.set(c,g),h||(so.has(c)||c.removeAttribute(n),so.delete(c)),g||c.removeAttribute(o)}),pn--,pn||(wt=new WeakMap,wt=new WeakMap,so=new WeakMap,io={})}},bf=function(e,t,o){o===void 0&&(o="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),r=gf(e);return r?(n.push.apply(n,Array.from(r.querySelectorAll("[aria-live], script"))),vf(n,r,o,"aria-hidden")):function(){return null}},hn={exports:{}},gn={};/**
277
+ `)},uf=0,bt=[];function ff(e){var t=p.useRef([]),o=p.useRef([0,0]),n=p.useRef(),r=p.useState(uf++)[0],a=p.useState(Ca)[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(r));var m=Mu([e.lockRef.current],(e.shards||[]).map(Ia),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[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=ao(m),y=o.current,k="deltaX"in m?m.deltaX:y[0]-w[0],C="deltaY"in m?m.deltaY:y[1]-w[1],_,P=m.target,T=Math.abs(k)>Math.abs(C)?"h":"v";if("touches"in m&&T==="h"&&P.type==="range")return!1;var E=window.getSelection(),z=E&&E.anchorNode,j=z?z===P||z.contains(P):!1;if(j)return!1;var O=Ta(T,P);if(!O)return!0;if(O?_=T:(_=T==="v"?"h":"v",O=Ta(T,P)),!O)return!1;if(!n.current&&"changedTouches"in m&&(k||C)&&(n.current=_),!_)return!0;var B=n.current||_;return lf(B,v,m,B==="h"?k:C)},[]),l=p.useCallback(function(m){var v=m;if(!(!bt.length||bt[bt.length-1]!==a)){var w="deltaY"in v?Aa(v):ao(v),y=t.current.filter(function(_){return _.name===v.type&&(_.target===v.target||v.target===_.shadowParent)&&cf(_.delta,w)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var k=(s.current.shards||[]).map(Ia).filter(Boolean).filter(function(_){return _.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:pf(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=ao(m),n.current=void 0},[]),c=p.useCallback(function(m){u(m.type,Aa(m),m.target,i(m,e.lockRef.current))},[]),h=p.useCallback(function(m){u(m.type,ao(m),m.target,i(m,e.lockRef.current))},[]);p.useEffect(function(){return bt.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,vt),document.addEventListener("touchmove",l,vt),document.addEventListener("touchstart",f,vt),function(){bt=bt.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,vt),document.removeEventListener("touchmove",l,vt),document.removeEventListener("touchstart",f,vt)}},[]);var g=e.removeScrollBar,b=e.inert;return p.createElement(p.Fragment,null,b?p.createElement(a,{styles:df(r)}):null,g?p.createElement(ef,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const hf=Vu(Sa,ff);var Ma=p.forwardRef(function(e,t){return p.createElement(no,Le({},e,{ref:t,sideCar:hf}))});Ma.classNames=no.classNames;var gf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wt=new WeakMap,so=new WeakMap,io={},pn=0,Oa=function(e){return e&&(e.host||Oa(e.parentNode))},mf=function(e,t){return t.map(function(o){if(e.contains(o))return o;var n=Oa(o);return n&&e.contains(n)?n:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},vf=function(e,t,o,n){var r=mf(t,Array.isArray(e)?e:[e]);io[o]||(io[o]=new WeakMap);var a=io[o],s=[],i=new Set,l=new Set(r),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};r.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(n),b=g!==null&&g!=="false",m=(wt.get(h)||0)+1,v=(a.get(h)||0)+1;wt.set(h,m),a.set(h,v),s.push(h),m===1&&b&&so.set(h,!0),v===1&&h.setAttribute(o,"true"),b||h.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return f(t),i.clear(),pn++,function(){s.forEach(function(c){var h=wt.get(c)-1,g=a.get(c)-1;wt.set(c,h),a.set(c,g),h||(so.has(c)||c.removeAttribute(n),so.delete(c)),g||c.removeAttribute(o)}),pn--,pn||(wt=new WeakMap,wt=new WeakMap,so=new WeakMap,io={})}},bf=function(e,t,o){o===void 0&&(o="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),r=gf(e);return r?(n.push.apply(n,Array.from(r.querySelectorAll("[aria-live], script"))),vf(n,r,o,"aria-hidden")):function(){return null}},hn={exports:{}},gn={};/**
278
278
  * @license React
279
279
  * use-sync-external-store-shim.production.js
280
280
  *
@@ -282,16 +282,16 @@
282
282
  *
283
283
  * This source code is licensed under the MIT license found in the
284
284
  * LICENSE file in the root directory of this source tree.
285
- */var Oa;function wf(){if(Oa)return gn;Oa=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,n=e.useState,r=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,h){var g=h(),b=n({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]),r(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 gn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,gn}var La;function yf(){return La||(La=1,hn.exports=wf()),hn.exports}var xf=yf();function kf(){return xf.useSyncExternalStore(Sf,()=>!0,()=>!1)}function Sf(){return()=>{}}var mn="Avatar",[Cf]=me(mn),[Ef,za]=Cf(mn),Da=p.forwardRef((e,t)=>{const{__scopeAvatar:o,...n}=e,[r,a]=p.useState("idle");return d.jsx(Ef,{scope:o,imageLoadingStatus:r,onImageLoadingStatusChange:a,children:d.jsx(K.span,{...n,ref:t})})});Da.displayName=mn;var $a="AvatarImage",Fa=p.forwardRef((e,t)=>{const{__scopeAvatar:o,src:n,onLoadingStatusChange:r=()=>{},...a}=e,s=za($a,o),i=Nf(n,a),l=pe(u=>{r(u),s.onImageLoadingStatusChange(u)});return ie(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(K.img,{...a,ref:t,src:n}):null});Fa.displayName=$a;var Ba="AvatarFallback",Ha=p.forwardRef((e,t)=>{const{__scopeAvatar:o,delayMs:n,...r}=e,a=za(Ba,o),[s,i]=p.useState(n===void 0);return p.useEffect(()=>{if(n!==void 0){const l=window.setTimeout(()=>i(!0),n);return()=>window.clearTimeout(l)}},[n]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(K.span,{...r,ref:t}):null});Ha.displayName=Ba;function Va(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Nf(e,{referrerPolicy:t,crossOrigin:o}){const n=kf(),r=p.useRef(null),a=n?(r.current||(r.current=new window.Image),r.current):null,[s,i]=p.useState(()=>Va(a,e));return ie(()=>{i(Va(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 Tf=Da,_f=Fa,Pf=Ha;function lo(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 co(e){const[t,o]=p.useState(void 0);return ie(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[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 n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else o(void 0)},[e]),t}var uo="Checkbox",[Af]=me(uo),[If,vn]=Af(uo);function Mf(e){const{__scopeCheckbox:t,checked:o,children:n,defaultChecked:r,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:r??!1,onChange:l,caller:uo}),[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(r)?!1:r,isFormControl:k,bubbleInput:v,setBubbleInput:w};return d.jsx(If,{scope:t,...C,children:Of(c)?c(C):n})}var Wa="CheckboxTrigger",Ua=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...n},r)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:f,setChecked:c,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:b}=vn(Wa,e),m=se(r,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":Xa(l),"data-disabled":i?"":void 0,disabled:i,value:s,...n,ref:m,onKeyDown:J(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:J(o,w=>{c(y=>Ye(y)?!0:!y),b&&g&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})})});Ua.displayName=Wa;var ja=p.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:n,checked:r,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:f,...c}=e;return d.jsx(Mf,{__scopeCheckbox:o,checked:r,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:n,form:f,value:l,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(Ua,{...c,ref:t,__scopeCheckbox:o}),h&&d.jsx(Ya,{__scopeCheckbox:o})]})})});ja.displayName=uo;var Ra="CheckboxIndicator",Ga=p.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:n,...r}=e,a=vn(Ra,o);return d.jsx(Ee,{present:n||Ye(a.checked)||a.checked===!0,children:d.jsx(K.span,{"data-state":Xa(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});Ga.displayName=Ra;var qa="CheckboxBubbleInput",Ya=p.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:n,hasConsumerStoppedPropagationRef:r,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:f,form:c,bubbleInput:h,setBubbleInput:g}=vn(qa,e),b=se(o,g),m=lo(a),v=co(n);p.useEffect(()=>{const y=h;if(!y)return;const k=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(k,"checked").set,P=!r.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,r]);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%)"}})});Ya.displayName=qa;function Of(e){return typeof e=="function"}function Ye(e){return e==="indeterminate"}function Xa(e){return Ye(e)?"indeterminate":e?"checked":"unchecked"}const Lf=["top","right","bottom","left"],Xe=Math.min,we=Math.max,fo=Math.round,po=Math.floor,ze=e=>({x:e,y:e}),zf={left:"right",right:"left",bottom:"top",top:"bottom"};function bn(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 yt(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function yn(e){return e==="y"?"height":"width"}function De(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function xn(e){return wn(De(e))}function Df(e,t,o){o===void 0&&(o=!1);const n=yt(e),r=xn(e),a=yn(r);let s=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=ho(s)),[s,ho(s)]}function $f(e){const t=ho(e);return[kn(e),t,kn(t)]}function kn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ka=["left","right"],Za=["right","left"],Ff=["top","bottom"],Bf=["bottom","top"];function Hf(e,t,o){switch(e){case"top":case"bottom":return o?t?Za:Ka:t?Ka:Za;case"left":case"right":return t?Ff:Bf;default:return[]}}function Vf(e,t,o,n){const r=yt(e);let a=Hf(We(e),o==="start",n);return r&&(a=a.map(s=>s+"-"+r),t&&(a=a.concat(a.map(kn)))),a}function ho(e){const t=We(e);return zf[t]+e.slice(t.length)}function Wf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ja(e){return typeof e!="number"?Wf(e):{top:e,right:e,bottom:e,left:e}}function go(e){const{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function Qa(e,t,o){let{reference:n,floating:r}=e;const a=De(t),s=xn(t),i=yn(s),l=We(t),u=a==="y",f=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2,h=n[i]/2-r[i]/2;let g;switch(l){case"top":g={x:f,y:n.y-r.height};break;case"bottom":g={x:f,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:c};break;case"left":g={x:n.x-r.width,y:c};break;default:g={x:n.x,y:n.y}}switch(yt(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 Uf(e,t){var o;t===void 0&&(t={});const{x:n,y:r,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=Ja(g),v=i[h?c==="floating"?"reference":"floating":c],w=go(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:n,y:r,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},_=go(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:k,strategy:l}):y);return{top:(w.top-_.top+b.top)/C.y,bottom:(_.bottom-w.bottom+b.bottom)/C.y,left:(w.left-_.left+b.left)/C.x,right:(_.right-w.right+b.right)/C.x}}const jf=50,Rf=async(e,t,o)=>{const{placement:n="bottom",strategy:r="absolute",middleware:a=[],platform:s}=o,i=s.detectOverflow?s:{...s,detectOverflow:Uf},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:c}=Qa(u,n,l),h=n,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:_,reset:P}=await y({x:f,y:c,initialPlacement:n,placement:h,strategy:r,middlewareData:b,rects:u,platform:i,elements:{reference:e,floating:t}});f=k??f,c=C??c,b[w]={...b[w],..._},P&&g<jf&&(g++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):P.rects),{x:f,y:c}=Qa(u,h,l)),m=-1)}return{x:f,y:c,placement:h,strategy:r,middlewareData:b}},Gf=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:n,placement:r,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:f=0}=Ve(e,t)||{};if(u==null)return{};const c=Ja(f),h={x:o,y:n},g=xn(r),b=yn(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],_=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 E=C/2-_/2,z=T/2-m[b]/2-1,j=Xe(c[w],z),O=Xe(c[y],z),B=j,V=T-m[b]-O,L=T/2-m[b]/2+E,Y=bn(B,L,V),I=!l.arrow&&yt(r)!=null&&L!==Y&&a.reference[b]/2-(L<B?j:O)-m[b]/2<0,D=I?L<B?L-B:L-V:0;return{[g]:h[g]+D,data:{[g]:Y,centerOffset:L-Y-D,...I&&{alignmentOffset:D}},reset:I}}}),qf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:r,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(r),y=De(i),k=We(i)===i,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=h||(k||!m?[ho(i)]:$f(i)),P=b!=="none";!h&&P&&_.push(...Vf(i,m,b,C));const T=[i,..._],E=await l.detectOverflow(t,v),z=[];let j=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&z.push(E[w]),c){const L=Df(r,s,C);z.push(E[L[0]],E[L[1]])}if(j=[...j,{placement:r,overflows:z}],!z.every(L=>L<=0)){var O,B;const L=(((O=a.flip)==null?void 0:O.index)||0)+1,Y=T[L];if(Y&&(!(c==="alignment"?y!==De(Y):!1)||j.every(R=>De(R.placement)===y?R.overflows[0]>0:!0)))return{data:{index:L,overflows:j},reset:{placement:Y}};let I=(B=j.filter(D=>D.overflows[0]<=0).sort((D,R)=>D.overflows[1]-R.overflows[1])[0])==null?void 0:B.placement;if(!I)switch(g){case"bestFit":{var V;const D=(V=j.filter(R=>{if(P){const N=De(R.placement);return N===y||N==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(N=>N>0).reduce((N,S)=>N+S,0)]).sort((R,N)=>R[1]-N[1])[0])==null?void 0:V[0];D&&(I=D);break}case"initialPlacement":I=i;break}if(r!==I)return{reset:{placement:I}}}return{}}}};function es(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ts(e){return Lf.some(t=>e[t]>=0)}const Yf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o,platform:n}=t,{strategy:r="referenceHidden",...a}=Ve(e,t);switch(r){case"referenceHidden":{const s=await n.detectOverflow(t,{...a,elementContext:"reference"}),i=es(s,o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ts(i)}}}case"escaped":{const s=await n.detectOverflow(t,{...a,altBoundary:!0}),i=es(s,o.floating);return{data:{escapedOffsets:i,escaped:ts(i)}}}default:return{}}}}},os=new Set(["left","top"]);async function Xf(e,t){const{placement:o,platform:n,elements:r}=e,a=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=We(o),i=yt(o),l=De(o)==="y",u=os.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 Kf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:r,y:a,placement:s,middlewareData:i}=t,l=await Xf(t,e);return s===((o=i.offset)==null?void 0:o.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:r+l.x,y:a+l.y,data:{...l,placement:s}}}}},Zf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:r,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:n},c=await a.detectOverflow(t,u),h=De(We(r)),g=wn(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=bn(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=bn(k,m,C)}const v=l.fn({...t,[g]:b,[h]:m});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[g]:s,[h]:i}}}}}},Jf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:n,placement:r,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Ve(e,t),f={x:o,y:n},c=De(r),h=wn(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,_=a.reference[h]+a.reference[k]-v.mainAxis;g<C?g=C:g>_&&(g=_)}if(u){var w,y;const k=h==="y"?"width":"height",C=os.has(We(r)),_=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<_?b=_:b>P&&(b=P)}return{[h]:g,[c]:b}}}},Qf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,n;const{placement:r,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=Ve(e,t),f=await s.detectOverflow(t,u),c=We(r),h=yt(r),g=De(r)==="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),_=Xe(b-f[w],k),P=!t.middlewareData.shift;let T=C,E=_;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(E=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=y),P&&!h){const j=we(f.left,0),O=we(f.right,0),B=we(f.top,0),V=we(f.bottom,0);g?E=b-2*(j!==0||O!==0?j+O:we(f.left,f.right)):T=m-2*(B!==0||V!==0?B+V:we(f.top,f.bottom))}await l({...t,availableWidth:E,availableHeight:T});const z=await s.getDimensions(i.floating);return b!==z.width||m!==z.height?{reset:{rects:!0}}:{}}}};function mo(){return typeof window<"u"}function xt(e){return ns(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $e(e){var t;return(t=(ns(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ns(e){return mo()?e instanceof Node||e instanceof ye(e).Node:!1}function Ne(e){return mo()?e instanceof Element||e instanceof ye(e).Element:!1}function Ue(e){return mo()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function rs(e){return!mo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Ft(e){const{overflow:t,overflowX:o,overflowY:n,display:r}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&r!=="inline"&&r!=="contents"}function ep(e){return/^(table|td|th)$/.test(xt(e))}function vo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const tp=/transform|translate|scale|rotate|perspective|filter/,op=/paint|layout|strict|content/,at=e=>!!e&&e!=="none";let Sn;function Cn(e){const t=Ne(e)?Te(e):e;return at(t.transform)||at(t.translate)||at(t.scale)||at(t.rotate)||at(t.perspective)||!En()&&(at(t.backdropFilter)||at(t.filter))||tp.test(t.willChange||"")||op.test(t.contain||"")}function np(e){let t=Ke(e);for(;Ue(t)&&!kt(t);){if(Cn(t))return t;if(vo(t))return null;t=Ke(t)}return null}function En(){return Sn==null&&(Sn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Sn}function kt(e){return/^(html|body|#document)$/.test(xt(e))}function Te(e){return ye(e).getComputedStyle(e)}function bo(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ke(e){if(xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rs(e)&&e.host||$e(e);return rs(t)?t.host:t}function as(e){const t=Ke(e);return kt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ue(t)&&Ft(t)?t:as(t)}function Bt(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);const r=as(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),s=ye(r);if(a){const i=Nn(s);return t.concat(s,s.visualViewport||[],Ft(r)?r:[],i&&o?Bt(i):[])}else return t.concat(r,Bt(r,[],o))}function Nn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ss(e){const t=Te(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=Ue(e),a=r?e.offsetWidth:o,s=r?e.offsetHeight:n,i=fo(o)!==a||fo(n)!==s;return i&&(o=a,n=s),{width:o,height:n,$:i}}function Tn(e){return Ne(e)?e:e.contextElement}function St(e){const t=Tn(e);if(!Ue(t))return ze(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:a}=ss(t);let s=(a?fo(o.width):o.width)/n,i=(a?fo(o.height):o.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const rp=ze(0);function is(e){const t=ye(e);return!En()||!t.visualViewport?rp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ap(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ye(e)?!1:t}function st(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const r=e.getBoundingClientRect(),a=Tn(e);let s=ze(1);t&&(n?Ne(n)&&(s=St(n)):s=St(e));const i=ap(a,o,n)?is(a):ze(0);let l=(r.left+i.x)/s.x,u=(r.top+i.y)/s.y,f=r.width/s.x,c=r.height/s.y;if(a){const h=ye(a),g=n&&Ne(n)?ye(n):n;let b=h,m=Nn(b);for(;m&&n&&g!==b;){const v=St(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=Nn(b)}}return go({width:f,height:c,x:l,y:u})}function wo(e,t){const o=bo(e).scrollLeft;return t?t.left+o:st($e(e)).left+o}function ls(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-wo(e,o),r=o.top+t.scrollTop;return{x:n,y:r}}function sp(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e;const a=r==="fixed",s=$e(n),i=t?vo(t.floating):!1;if(n===s||i&&a)return o;let l={scrollLeft:0,scrollTop:0},u=ze(1);const f=ze(0),c=Ue(n);if((c||!c&&!a)&&((xt(n)!=="body"||Ft(s))&&(l=bo(n)),c)){const g=st(n);u=St(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const h=s&&!c&&!a?ls(s,l):ze(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 ip(e){return Array.from(e.getClientRects())}function lp(e){const t=$e(e),o=bo(e),n=e.ownerDocument.body,r=we(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=we(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+wo(e);const i=-o.scrollTop;return Te(n).direction==="rtl"&&(s+=we(t.clientWidth,n.clientWidth)-r),{width:r,height:a,x:s,y:i}}const cs=25;function cp(e,t){const o=ye(e),n=$e(e),r=o.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,l=0;if(r){a=r.width,s=r.height;const f=En();(!f||f&&t==="fixed")&&(i=r.offsetLeft,l=r.offsetTop)}const u=wo(n);if(u<=0){const f=n.ownerDocument,c=f.body,h=getComputedStyle(c),g=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(n.clientWidth-c.clientWidth-g);b<=cs&&(a-=b)}else u<=cs&&(a+=u);return{width:a,height:s,x:i,y:l}}function dp(e,t){const o=st(e,!0,t==="fixed"),n=o.top+e.clientTop,r=o.left+e.clientLeft,a=Ue(e)?St(e):ze(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=r*a.x,u=n*a.y;return{width:s,height:i,x:l,y:u}}function ds(e,t,o){let n;if(t==="viewport")n=cp(e,o);else if(t==="document")n=lp($e(e));else if(Ne(t))n=dp(t,o);else{const r=is(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return go(n)}function us(e,t){const o=Ke(e);return o===t||!Ne(o)||kt(o)?!1:Te(o).position==="fixed"||us(o,t)}function up(e,t){const o=t.get(e);if(o)return o;let n=Bt(e,[],!1).filter(i=>Ne(i)&&xt(i)!=="body"),r=null;const a=Te(e).position==="fixed";let s=a?Ke(e):e;for(;Ne(s)&&!kt(s);){const i=Te(s),l=Cn(s);!l&&i.position==="fixed"&&(r=null),(a?!l&&!r:!l&&i.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Ft(s)&&!l&&us(e,s))?n=n.filter(f=>f!==s):r=i,s=Ke(s)}return t.set(e,n),n}function fp(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const s=[...o==="clippingAncestors"?vo(t)?[]:up(t,this._c):[].concat(o),n],i=ds(t,s[0],r);let l=i.top,u=i.right,f=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const g=ds(t,s[h],r);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 pp(e){const{width:t,height:o}=ss(e);return{width:t,height:o}}function hp(e,t,o){const n=Ue(t),r=$e(t),a=o==="fixed",s=st(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ze(0);function u(){l.x=wo(r)}if(n||!n&&!a)if((xt(t)!=="body"||Ft(r))&&(i=bo(t)),n){const g=st(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else r&&u();a&&!n&&r&&u();const f=r&&!n&&!a?ls(r,i):ze(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 _n(e){return Te(e).position==="static"}function fs(e,t){if(!Ue(e)||Te(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return $e(e)===o&&(o=o.ownerDocument.body),o}function ps(e,t){const o=ye(e);if(vo(e))return o;if(!Ue(e)){let r=Ke(e);for(;r&&!kt(r);){if(Ne(r)&&!_n(r))return r;r=Ke(r)}return o}let n=fs(e,t);for(;n&&ep(n)&&_n(n);)n=fs(n,t);return n&&kt(n)&&_n(n)&&!Cn(n)?o:n||np(e)||o}const gp=async function(e){const t=this.getOffsetParent||ps,o=this.getDimensions,n=await o(e.floating);return{reference:hp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function mp(e){return Te(e).direction==="rtl"}const vp={convertOffsetParentRelativeRectToViewportRelativeRect:sp,getDocumentElement:$e,getClippingRect:fp,getOffsetParent:ps,getElementRects:gp,getClientRects:ip,getDimensions:pp,getScale:St,isElement:Ne,isRTL:mp};function hs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bp(e,t){let o=null,n;const r=$e(e);function a(){var i;clearTimeout(n),(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=po(c),m=po(r.clientWidth-(f+h)),v=po(r.clientHeight-(c+g)),w=po(f),k={rootMargin:-b+"px "+-m+"px "+-v+"px "+-w+"px",threshold:we(0,Xe(1,l))||1};let C=!0;function _(P){const T=P[0].intersectionRatio;if(T!==l){if(!C)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!hs(u,e.getBoundingClientRect())&&s(),C=!1}try{o=new IntersectionObserver(_,{...k,root:r.ownerDocument})}catch{o=new IntersectionObserver(_,k)}o.observe(e)}return s(!0),a}function wp(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Tn(e),f=r||a?[...u?Bt(u):[],...t?Bt(t):[]]:[];f.forEach(w=>{r&&w.addEventListener("scroll",o,{passive:!0}),a&&w.addEventListener("resize",o)});const c=u&&i?bp(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&&!hs(m,w)&&o(),m=w,b=requestAnimationFrame(v)}return o(),()=>{var w;f.forEach(y=>{r&&y.removeEventListener("scroll",o),a&&y.removeEventListener("resize",o)}),c==null||c(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const yp=Kf,xp=Zf,kp=qf,Sp=Qf,Cp=Yf,gs=Gf,Ep=Jf,Np=(e,t,o)=>{const n=new Map,r={platform:vp,...o},a={...r.platform,_c:n};return Rf(e,t,{...r,platform:a})};var Tp=typeof document<"u",_p=function(){},yo=Tp?x.useLayoutEffect:_p;function xo(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,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!xo(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;n--!==0;){const a=r[n];if(!(a==="_owner"&&e.$$typeof)&&!xo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ms(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vs(e,t){const o=ms(e);return Math.round(t*o)/o}function Pn(e){const t=p.useRef(e);return yo(()=>{t.current=e}),t}function Pp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:r,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(n);xo(h,n)||g(n);const[b,m]=p.useState(null),[v,w]=p.useState(null),y=p.useCallback(R=>{R!==P.current&&(P.current=R,m(R))},[]),k=p.useCallback(R=>{R!==T.current&&(T.current=R,w(R))},[]),C=a||b,_=s||v,P=p.useRef(null),T=p.useRef(null),E=p.useRef(f),z=l!=null,j=Pn(l),O=Pn(r),B=Pn(u),V=p.useCallback(()=>{if(!P.current||!T.current)return;const R={placement:t,strategy:o,middleware:h};O.current&&(R.platform=O.current),Np(P.current,T.current,R).then(N=>{const S={...N,isPositioned:B.current!==!1};L.current&&!xo(E.current,S)&&(E.current=S,Rt.flushSync(()=>{c(S)}))})},[h,t,o,O,B]);yo(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,c(R=>({...R,isPositioned:!1})))},[u]);const L=p.useRef(!1);yo(()=>(L.current=!0,()=>{L.current=!1}),[]),yo(()=>{if(C&&(P.current=C),_&&(T.current=_),C&&_){if(j.current)return j.current(C,_,V);V()}},[C,_,V,j,z]);const Y=p.useMemo(()=>({reference:P,floating:T,setReference:y,setFloating:k}),[y,k]),I=p.useMemo(()=>({reference:C,floating:_}),[C,_]),D=p.useMemo(()=>{const R={position:o,left:0,top:0};if(!I.floating)return R;const N=vs(I.floating,f.x),S=vs(I.floating,f.y);return i?{...R,transform:"translate("+N+"px, "+S+"px)",...ms(I.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:N,top:S}},[o,i,I.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:V,refs:Y,elements:I,floatingStyles:D}),[f,V,Y,I,D])}const Ap=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:n,padding:r}=typeof e=="function"?e(o):e;return n&&t(n)?n.current!=null?gs({element:n.current,padding:r}).fn(o):{}:n?gs({element:n,padding:r}).fn(o):{}}}},Ip=(e,t)=>{const o=yp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Mp=(e,t)=>{const o=xp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Op=(e,t)=>({fn:Ep(e).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=Sp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Dp=(e,t)=>{const o=Cp(e);return{name:o.name,fn:o.fn,options:[e,t]}},$p=(e,t)=>{const o=Ap(e);return{name:o.name,fn:o.fn,options:[e,t]}};var Fp="Arrow",bs=p.forwardRef((e,t)=>{const{children:o,width:n=10,height:r=5,...a}=e;return d.jsx(K.svg,{...a,ref:t,width:n,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});bs.displayName=Fp;var Bp=bs,An="Popper",[ws,ko]=me(An),[Hp,ys]=ws(An),xs=e=>{const{__scopePopper:t,children:o}=e,[n,r]=p.useState(null);return d.jsx(Hp,{scope:t,anchor:n,onAnchorChange:r,children:o})};xs.displayName=An;var ks="PopperAnchor",Ss=p.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:n,...r}=e,a=ys(ks,o),s=p.useRef(null),i=se(t,s),l=p.useRef(null);return p.useEffect(()=>{const u=l.current;l.current=(n==null?void 0:n.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),n?null:d.jsx(K.div,{...r,ref:i})});Ss.displayName=ks;var In="PopperContent",[Vp,Wp]=ws(In),Cs=p.forwardRef((e,t)=>{var G,q,Q,ee,re,oe;const{__scopePopper:o,side:n="bottom",sideOffset:r=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=ys(In,o),[w,y]=p.useState(null),k=se(t,ce=>y(ce)),[C,_]=p.useState(null),P=co(C),T=(P==null?void 0:P.width)??0,E=(P==null?void 0:P.height)??0,z=n+(a!=="center"?"-"+a:""),j=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},O=Array.isArray(u)?u:[u],B=O.length>0,V={padding:j,boundary:O.filter(jp),altBoundary:B},{refs:L,floatingStyles:Y,placement:I,isPositioned:D,middlewareData:R}=Pp({strategy:"fixed",placement:z,whileElementsMounted:(...ce)=>wp(...ce,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Ip({mainAxis:r+E,alignmentAxis:s}),l&&Mp({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Op():void 0,...V}),l&&Lp({...V}),zp({...V,apply:({elements:ce,rects:de,availableWidth:ct,availableHeight:Qe})=>{const{width:Pe,height:Fo}=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",`${Fo}px`)}}),C&&$p({element:C,padding:i}),Rp({arrowWidth:T,arrowHeight:E}),h&&Dp({strategy:"referenceHidden",...V})]}),[N,S]=Ts(I),M=pe(b);ie(()=>{D&&(M==null||M())},[D,M]);const F=(G=R.arrow)==null?void 0:G.x,A=(q=R.arrow)==null?void 0:q.y,$=((Q=R.arrow)==null?void 0:Q.centerOffset)!==0,[H,Z]=p.useState();return ie(()=>{w&&Z(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:D?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[(ee=R.transformOrigin)==null?void 0:ee.x,(re=R.transformOrigin)==null?void 0:re.y].join(" "),...((oe=R.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Vp,{scope:o,placedSide:N,onArrowChange:_,arrowX:F,arrowY:A,shouldHideArrow:$,children:d.jsx(K.div,{"data-side":N,"data-align":S,...m,ref:k,style:{...m.style,animation:D?void 0:"none"}})})})});Cs.displayName=In;var Es="PopperArrow",Up={top:"bottom",right:"left",bottom:"top",left:"right"},Ns=p.forwardRef(function(t,o){const{__scopePopper:n,...r}=t,a=Wp(Es,n),s=Up[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(Bp,{...r,ref:o,style:{...r.style,display:"block"}})})});Ns.displayName=Es;function jp(e){return e!==null}var Rp=e=>({name:"transformOrigin",options:e,fn(t){var v,w,y;const{placement:o,rects:n,middlewareData:r}=t,s=((v=r.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,f]=Ts(o),c={start:"0%",center:"50%",end:"100%"}[f],h=(((w=r.arrow)==null?void 0:w.x)??0)+i/2,g=(((y=r.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=`${n.floating.height+l}px`):u==="right"?(b=`${-l}px`,m=s?c:`${g}px`):u==="left"&&(b=`${n.floating.width+l}px`,m=s?c:`${g}px`),{data:{x:b,y:m}}}});function Ts(e){const[t,o="center"]=e.split("-");return[t,o]}var _s=xs,Ps=Ss,As=Cs,Is=Ns,Mn="rovingFocusGroup.onEntryFocus",Gp={bubbles:!1,cancelable:!0},Ht="RovingFocusGroup",[On,Ms,qp]=na(Ht),[Yp,So]=me(Ht,[qp]),[Xp,Kp]=Yp(Ht),Os=p.forwardRef((e,t)=>d.jsx(On.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(On.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Zp,{...e,ref:t})})}));Os.displayName=Ht;var Zp=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:n,loop:r=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...c}=e,h=p.useRef(null),g=se(t,h),b=$t(a),[m,v]=He({prop:s,defaultProp:i??null,onChange:l,caller:Ht}),[w,y]=p.useState(!1),k=pe(u),C=Ms(o),_=p.useRef(!1),[P,T]=p.useState(0);return p.useEffect(()=>{const E=h.current;if(E)return E.addEventListener(Mn,k),()=>E.removeEventListener(Mn,k)},[k]),d.jsx(Xp,{scope:o,orientation:n,dir:b,loop:r,currentTabStopId:m,onItemFocus:p.useCallback(E=>v(E),[v]),onItemShiftTab:p.useCallback(()=>y(!0),[]),onFocusableItemAdd:p.useCallback(()=>T(E=>E+1),[]),onFocusableItemRemove:p.useCallback(()=>T(E=>E-1),[]),children:d.jsx(K.div,{tabIndex:w||P===0?-1:0,"data-orientation":n,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:J(e.onMouseDown,()=>{_.current=!0}),onFocus:J(e.onFocus,E=>{const z=!_.current;if(E.target===E.currentTarget&&z&&!w){const j=new CustomEvent(Mn,Gp);if(E.currentTarget.dispatchEvent(j),!j.defaultPrevented){const O=C().filter(I=>I.focusable),B=O.find(I=>I.active),V=O.find(I=>I.id===m),Y=[B,V,...O].filter(Boolean).map(I=>I.ref.current);Ds(Y,f)}}_.current=!1}),onBlur:J(e.onBlur,()=>y(!1))})})}),Ls="RovingFocusGroupItem",zs=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:n=!0,active:r=!1,tabStopId:a,children:s,...i}=e,l=rt(),u=a||l,f=Kp(Ls,o),c=f.currentTabStopId===u,h=Ms(o),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:m}=f;return p.useEffect(()=>{if(n)return g(),()=>b()},[n,g,b]),d.jsx(On.ItemSlot,{scope:o,id:u,focusable:n,active:r,children:d.jsx(K.span,{tabIndex:c?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:J(e.onMouseDown,v=>{n?f.onItemFocus(u):v.preventDefault()}),onFocus:J(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:J(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=eh(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?th(k,C+1):k.slice(C+1)}setTimeout(()=>Ds(k))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:m!=null}):s})})});zs.displayName=Ls;var Jp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Qp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function eh(e,t,o){const n=Qp(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Jp[n]}function Ds(e,t=!1){const o=document.activeElement;for(const n of e)if(n===o||(n.focus({preventScroll:t}),document.activeElement!==o))return}function th(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var $s=Os,Fs=zs,oh="Label",Bs=p.forwardRef((e,t)=>d.jsx(K.label,{...e,ref:t,onMouseDown:o=>{var r;o.target.closest("button, input, select, textarea")||((r=e.onMouseDown)==null||r.call(e,o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));Bs.displayName=oh;var nh=Bs;function Ln(e,[t,o]){return Math.min(o,Math.max(t,e))}var zn="Progress",Dn=100,[rh]=me(zn),[ah,sh]=rh(zn),Hs=p.forwardRef((e,t)=>{const{__scopeProgress:o,value:n=null,max:r,getValueLabel:a=ih,...s}=e;(r||r===0)&&!js(r)&&console.error(lh(`${r}`,"Progress"));const i=js(r)?r:Dn;n!==null&&!Rs(n,i)&&console.error(ch(`${n}`,"Progress"));const l=Rs(n,i)?n:null,u=Co(l)?a(l,i):void 0;return d.jsx(ah,{scope:o,value:l,max:i,children:d.jsx(K.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Co(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":Us(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});Hs.displayName=zn;var Vs="ProgressIndicator",Ws=p.forwardRef((e,t)=>{const{__scopeProgress:o,...n}=e,r=sh(Vs,o);return d.jsx(K.div,{"data-state":Us(r.value,r.max),"data-value":r.value??void 0,"data-max":r.max,...n,ref:t})});Ws.displayName=Vs;function ih(e,t){return`${Math.round(e/t*100)}%`}function Us(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Co(e){return typeof e=="number"}function js(e){return Co(e)&&!isNaN(e)&&e>0}function Rs(e,t){return Co(e)&&!isNaN(e)&&e<=t&&e>=0}function lh(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Dn}\`.`}function ch(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
285
+ */var La;function wf(){if(La)return gn;La=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,n=e.useState,r=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,h){var g=h(),b=n({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]),r(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 gn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,gn}var za;function yf(){return za||(za=1,hn.exports=wf()),hn.exports}var xf=yf();function kf(){return xf.useSyncExternalStore(Sf,()=>!0,()=>!1)}function Sf(){return()=>{}}var mn="Avatar",[Cf]=me(mn),[Ef,Da]=Cf(mn),$a=p.forwardRef((e,t)=>{const{__scopeAvatar:o,...n}=e,[r,a]=p.useState("idle");return d.jsx(Ef,{scope:o,imageLoadingStatus:r,onImageLoadingStatusChange:a,children:d.jsx(K.span,{...n,ref:t})})});$a.displayName=mn;var Fa="AvatarImage",Ba=p.forwardRef((e,t)=>{const{__scopeAvatar:o,src:n,onLoadingStatusChange:r=()=>{},...a}=e,s=Da(Fa,o),i=Nf(n,a),l=pe(u=>{r(u),s.onImageLoadingStatusChange(u)});return ie(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(K.img,{...a,ref:t,src:n}):null});Ba.displayName=Fa;var Ha="AvatarFallback",Va=p.forwardRef((e,t)=>{const{__scopeAvatar:o,delayMs:n,...r}=e,a=Da(Ha,o),[s,i]=p.useState(n===void 0);return p.useEffect(()=>{if(n!==void 0){const l=window.setTimeout(()=>i(!0),n);return()=>window.clearTimeout(l)}},[n]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(K.span,{...r,ref:t}):null});Va.displayName=Ha;function Wa(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Nf(e,{referrerPolicy:t,crossOrigin:o}){const n=kf(),r=p.useRef(null),a=n?(r.current||(r.current=new window.Image),r.current):null,[s,i]=p.useState(()=>Wa(a,e));return ie(()=>{i(Wa(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 Tf=$a,_f=Ba,Pf=Va;function lo(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 co(e){const[t,o]=p.useState(void 0);return ie(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[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 n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else o(void 0)},[e]),t}var uo="Checkbox",[Af]=me(uo),[If,vn]=Af(uo);function Mf(e){const{__scopeCheckbox:t,checked:o,children:n,defaultChecked:r,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:r??!1,onChange:l,caller:uo}),[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(r)?!1:r,isFormControl:k,bubbleInput:v,setBubbleInput:w};return d.jsx(If,{scope:t,...C,children:Of(c)?c(C):n})}var Ua="CheckboxTrigger",ja=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...n},r)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:f,setChecked:c,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:b}=vn(Ua,e),m=se(r,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":Ka(l),"data-disabled":i?"":void 0,disabled:i,value:s,...n,ref:m,onKeyDown:J(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:J(o,w=>{c(y=>Ye(y)?!0:!y),b&&g&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})})});ja.displayName=Ua;var Ra=p.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:n,checked:r,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:f,...c}=e;return d.jsx(Mf,{__scopeCheckbox:o,checked:r,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:n,form:f,value:l,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(ja,{...c,ref:t,__scopeCheckbox:o}),h&&d.jsx(Xa,{__scopeCheckbox:o})]})})});Ra.displayName=uo;var Ga="CheckboxIndicator",qa=p.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:n,...r}=e,a=vn(Ga,o);return d.jsx(Ee,{present:n||Ye(a.checked)||a.checked===!0,children:d.jsx(K.span,{"data-state":Ka(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});qa.displayName=Ga;var Ya="CheckboxBubbleInput",Xa=p.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:n,hasConsumerStoppedPropagationRef:r,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:f,form:c,bubbleInput:h,setBubbleInput:g}=vn(Ya,e),b=se(o,g),m=lo(a),v=co(n);p.useEffect(()=>{const y=h;if(!y)return;const k=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(k,"checked").set,P=!r.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,r]);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%)"}})});Xa.displayName=Ya;function Of(e){return typeof e=="function"}function Ye(e){return e==="indeterminate"}function Ka(e){return Ye(e)?"indeterminate":e?"checked":"unchecked"}const Lf=["top","right","bottom","left"],Xe=Math.min,we=Math.max,fo=Math.round,po=Math.floor,ze=e=>({x:e,y:e}),zf={left:"right",right:"left",bottom:"top",top:"bottom"};function bn(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 yt(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function yn(e){return e==="y"?"height":"width"}function De(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function xn(e){return wn(De(e))}function Df(e,t,o){o===void 0&&(o=!1);const n=yt(e),r=xn(e),a=yn(r);let s=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=ho(s)),[s,ho(s)]}function $f(e){const t=ho(e);return[kn(e),t,kn(t)]}function kn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Za=["left","right"],Ja=["right","left"],Ff=["top","bottom"],Bf=["bottom","top"];function Hf(e,t,o){switch(e){case"top":case"bottom":return o?t?Ja:Za:t?Za:Ja;case"left":case"right":return t?Ff:Bf;default:return[]}}function Vf(e,t,o,n){const r=yt(e);let a=Hf(We(e),o==="start",n);return r&&(a=a.map(s=>s+"-"+r),t&&(a=a.concat(a.map(kn)))),a}function ho(e){const t=We(e);return zf[t]+e.slice(t.length)}function Wf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qa(e){return typeof e!="number"?Wf(e):{top:e,right:e,bottom:e,left:e}}function go(e){const{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function es(e,t,o){let{reference:n,floating:r}=e;const a=De(t),s=xn(t),i=yn(s),l=We(t),u=a==="y",f=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2,h=n[i]/2-r[i]/2;let g;switch(l){case"top":g={x:f,y:n.y-r.height};break;case"bottom":g={x:f,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:c};break;case"left":g={x:n.x-r.width,y:c};break;default:g={x:n.x,y:n.y}}switch(yt(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 Uf(e,t){var o;t===void 0&&(t={});const{x:n,y:r,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=Qa(g),v=i[h?c==="floating"?"reference":"floating":c],w=go(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:n,y:r,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},_=go(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:k,strategy:l}):y);return{top:(w.top-_.top+b.top)/C.y,bottom:(_.bottom-w.bottom+b.bottom)/C.y,left:(w.left-_.left+b.left)/C.x,right:(_.right-w.right+b.right)/C.x}}const jf=50,Rf=async(e,t,o)=>{const{placement:n="bottom",strategy:r="absolute",middleware:a=[],platform:s}=o,i=s.detectOverflow?s:{...s,detectOverflow:Uf},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:c}=es(u,n,l),h=n,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:_,reset:P}=await y({x:f,y:c,initialPlacement:n,placement:h,strategy:r,middlewareData:b,rects:u,platform:i,elements:{reference:e,floating:t}});f=k??f,c=C??c,b[w]={...b[w],..._},P&&g<jf&&(g++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):P.rects),{x:f,y:c}=es(u,h,l)),m=-1)}return{x:f,y:c,placement:h,strategy:r,middlewareData:b}},Gf=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:n,placement:r,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:f=0}=Ve(e,t)||{};if(u==null)return{};const c=Qa(f),h={x:o,y:n},g=xn(r),b=yn(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],_=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 E=C/2-_/2,z=T/2-m[b]/2-1,j=Xe(c[w],z),O=Xe(c[y],z),B=j,V=T-m[b]-O,L=T/2-m[b]/2+E,Y=bn(B,L,V),I=!l.arrow&&yt(r)!=null&&L!==Y&&a.reference[b]/2-(L<B?j:O)-m[b]/2<0,D=I?L<B?L-B:L-V:0;return{[g]:h[g]+D,data:{[g]:Y,centerOffset:L-Y-D,...I&&{alignmentOffset:D}},reset:I}}}),qf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:r,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(r),y=De(i),k=We(i)===i,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=h||(k||!m?[ho(i)]:$f(i)),P=b!=="none";!h&&P&&_.push(...Vf(i,m,b,C));const T=[i,..._],E=await l.detectOverflow(t,v),z=[];let j=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&z.push(E[w]),c){const L=Df(r,s,C);z.push(E[L[0]],E[L[1]])}if(j=[...j,{placement:r,overflows:z}],!z.every(L=>L<=0)){var O,B;const L=(((O=a.flip)==null?void 0:O.index)||0)+1,Y=T[L];if(Y&&(!(c==="alignment"?y!==De(Y):!1)||j.every(R=>De(R.placement)===y?R.overflows[0]>0:!0)))return{data:{index:L,overflows:j},reset:{placement:Y}};let I=(B=j.filter(D=>D.overflows[0]<=0).sort((D,R)=>D.overflows[1]-R.overflows[1])[0])==null?void 0:B.placement;if(!I)switch(g){case"bestFit":{var V;const D=(V=j.filter(R=>{if(P){const N=De(R.placement);return N===y||N==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(N=>N>0).reduce((N,S)=>N+S,0)]).sort((R,N)=>R[1]-N[1])[0])==null?void 0:V[0];D&&(I=D);break}case"initialPlacement":I=i;break}if(r!==I)return{reset:{placement:I}}}return{}}}};function ts(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function os(e){return Lf.some(t=>e[t]>=0)}const Yf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o,platform:n}=t,{strategy:r="referenceHidden",...a}=Ve(e,t);switch(r){case"referenceHidden":{const s=await n.detectOverflow(t,{...a,elementContext:"reference"}),i=ts(s,o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:os(i)}}}case"escaped":{const s=await n.detectOverflow(t,{...a,altBoundary:!0}),i=ts(s,o.floating);return{data:{escapedOffsets:i,escaped:os(i)}}}default:return{}}}}},ns=new Set(["left","top"]);async function Xf(e,t){const{placement:o,platform:n,elements:r}=e,a=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=We(o),i=yt(o),l=De(o)==="y",u=ns.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 Kf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:r,y:a,placement:s,middlewareData:i}=t,l=await Xf(t,e);return s===((o=i.offset)==null?void 0:o.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:r+l.x,y:a+l.y,data:{...l,placement:s}}}}},Zf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:r,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:n},c=await a.detectOverflow(t,u),h=De(We(r)),g=wn(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=bn(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=bn(k,m,C)}const v=l.fn({...t,[g]:b,[h]:m});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[g]:s,[h]:i}}}}}},Jf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:n,placement:r,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Ve(e,t),f={x:o,y:n},c=De(r),h=wn(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,_=a.reference[h]+a.reference[k]-v.mainAxis;g<C?g=C:g>_&&(g=_)}if(u){var w,y;const k=h==="y"?"width":"height",C=ns.has(We(r)),_=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<_?b=_:b>P&&(b=P)}return{[h]:g,[c]:b}}}},Qf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,n;const{placement:r,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=Ve(e,t),f=await s.detectOverflow(t,u),c=We(r),h=yt(r),g=De(r)==="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),_=Xe(b-f[w],k),P=!t.middlewareData.shift;let T=C,E=_;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(E=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=y),P&&!h){const j=we(f.left,0),O=we(f.right,0),B=we(f.top,0),V=we(f.bottom,0);g?E=b-2*(j!==0||O!==0?j+O:we(f.left,f.right)):T=m-2*(B!==0||V!==0?B+V:we(f.top,f.bottom))}await l({...t,availableWidth:E,availableHeight:T});const z=await s.getDimensions(i.floating);return b!==z.width||m!==z.height?{reset:{rects:!0}}:{}}}};function mo(){return typeof window<"u"}function xt(e){return rs(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $e(e){var t;return(t=(rs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rs(e){return mo()?e instanceof Node||e instanceof ye(e).Node:!1}function Ne(e){return mo()?e instanceof Element||e instanceof ye(e).Element:!1}function Ue(e){return mo()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function as(e){return!mo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Ft(e){const{overflow:t,overflowX:o,overflowY:n,display:r}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&r!=="inline"&&r!=="contents"}function ep(e){return/^(table|td|th)$/.test(xt(e))}function vo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const tp=/transform|translate|scale|rotate|perspective|filter/,op=/paint|layout|strict|content/,at=e=>!!e&&e!=="none";let Sn;function Cn(e){const t=Ne(e)?Te(e):e;return at(t.transform)||at(t.translate)||at(t.scale)||at(t.rotate)||at(t.perspective)||!En()&&(at(t.backdropFilter)||at(t.filter))||tp.test(t.willChange||"")||op.test(t.contain||"")}function np(e){let t=Ke(e);for(;Ue(t)&&!kt(t);){if(Cn(t))return t;if(vo(t))return null;t=Ke(t)}return null}function En(){return Sn==null&&(Sn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Sn}function kt(e){return/^(html|body|#document)$/.test(xt(e))}function Te(e){return ye(e).getComputedStyle(e)}function bo(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ke(e){if(xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||as(e)&&e.host||$e(e);return as(t)?t.host:t}function ss(e){const t=Ke(e);return kt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ue(t)&&Ft(t)?t:ss(t)}function Bt(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);const r=ss(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),s=ye(r);if(a){const i=Nn(s);return t.concat(s,s.visualViewport||[],Ft(r)?r:[],i&&o?Bt(i):[])}else return t.concat(r,Bt(r,[],o))}function Nn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function is(e){const t=Te(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=Ue(e),a=r?e.offsetWidth:o,s=r?e.offsetHeight:n,i=fo(o)!==a||fo(n)!==s;return i&&(o=a,n=s),{width:o,height:n,$:i}}function Tn(e){return Ne(e)?e:e.contextElement}function St(e){const t=Tn(e);if(!Ue(t))return ze(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:a}=is(t);let s=(a?fo(o.width):o.width)/n,i=(a?fo(o.height):o.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const rp=ze(0);function ls(e){const t=ye(e);return!En()||!t.visualViewport?rp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ap(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ye(e)?!1:t}function st(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const r=e.getBoundingClientRect(),a=Tn(e);let s=ze(1);t&&(n?Ne(n)&&(s=St(n)):s=St(e));const i=ap(a,o,n)?ls(a):ze(0);let l=(r.left+i.x)/s.x,u=(r.top+i.y)/s.y,f=r.width/s.x,c=r.height/s.y;if(a){const h=ye(a),g=n&&Ne(n)?ye(n):n;let b=h,m=Nn(b);for(;m&&n&&g!==b;){const v=St(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=Nn(b)}}return go({width:f,height:c,x:l,y:u})}function wo(e,t){const o=bo(e).scrollLeft;return t?t.left+o:st($e(e)).left+o}function cs(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-wo(e,o),r=o.top+t.scrollTop;return{x:n,y:r}}function sp(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e;const a=r==="fixed",s=$e(n),i=t?vo(t.floating):!1;if(n===s||i&&a)return o;let l={scrollLeft:0,scrollTop:0},u=ze(1);const f=ze(0),c=Ue(n);if((c||!c&&!a)&&((xt(n)!=="body"||Ft(s))&&(l=bo(n)),c)){const g=st(n);u=St(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const h=s&&!c&&!a?cs(s,l):ze(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 ip(e){return Array.from(e.getClientRects())}function lp(e){const t=$e(e),o=bo(e),n=e.ownerDocument.body,r=we(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=we(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+wo(e);const i=-o.scrollTop;return Te(n).direction==="rtl"&&(s+=we(t.clientWidth,n.clientWidth)-r),{width:r,height:a,x:s,y:i}}const ds=25;function cp(e,t){const o=ye(e),n=$e(e),r=o.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,l=0;if(r){a=r.width,s=r.height;const f=En();(!f||f&&t==="fixed")&&(i=r.offsetLeft,l=r.offsetTop)}const u=wo(n);if(u<=0){const f=n.ownerDocument,c=f.body,h=getComputedStyle(c),g=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(n.clientWidth-c.clientWidth-g);b<=ds&&(a-=b)}else u<=ds&&(a+=u);return{width:a,height:s,x:i,y:l}}function dp(e,t){const o=st(e,!0,t==="fixed"),n=o.top+e.clientTop,r=o.left+e.clientLeft,a=Ue(e)?St(e):ze(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=r*a.x,u=n*a.y;return{width:s,height:i,x:l,y:u}}function us(e,t,o){let n;if(t==="viewport")n=cp(e,o);else if(t==="document")n=lp($e(e));else if(Ne(t))n=dp(t,o);else{const r=ls(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return go(n)}function fs(e,t){const o=Ke(e);return o===t||!Ne(o)||kt(o)?!1:Te(o).position==="fixed"||fs(o,t)}function up(e,t){const o=t.get(e);if(o)return o;let n=Bt(e,[],!1).filter(i=>Ne(i)&&xt(i)!=="body"),r=null;const a=Te(e).position==="fixed";let s=a?Ke(e):e;for(;Ne(s)&&!kt(s);){const i=Te(s),l=Cn(s);!l&&i.position==="fixed"&&(r=null),(a?!l&&!r:!l&&i.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Ft(s)&&!l&&fs(e,s))?n=n.filter(f=>f!==s):r=i,s=Ke(s)}return t.set(e,n),n}function fp(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const s=[...o==="clippingAncestors"?vo(t)?[]:up(t,this._c):[].concat(o),n],i=us(t,s[0],r);let l=i.top,u=i.right,f=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const g=us(t,s[h],r);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 pp(e){const{width:t,height:o}=is(e);return{width:t,height:o}}function hp(e,t,o){const n=Ue(t),r=$e(t),a=o==="fixed",s=st(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ze(0);function u(){l.x=wo(r)}if(n||!n&&!a)if((xt(t)!=="body"||Ft(r))&&(i=bo(t)),n){const g=st(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else r&&u();a&&!n&&r&&u();const f=r&&!n&&!a?cs(r,i):ze(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 _n(e){return Te(e).position==="static"}function ps(e,t){if(!Ue(e)||Te(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return $e(e)===o&&(o=o.ownerDocument.body),o}function hs(e,t){const o=ye(e);if(vo(e))return o;if(!Ue(e)){let r=Ke(e);for(;r&&!kt(r);){if(Ne(r)&&!_n(r))return r;r=Ke(r)}return o}let n=ps(e,t);for(;n&&ep(n)&&_n(n);)n=ps(n,t);return n&&kt(n)&&_n(n)&&!Cn(n)?o:n||np(e)||o}const gp=async function(e){const t=this.getOffsetParent||hs,o=this.getDimensions,n=await o(e.floating);return{reference:hp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function mp(e){return Te(e).direction==="rtl"}const vp={convertOffsetParentRelativeRectToViewportRelativeRect:sp,getDocumentElement:$e,getClippingRect:fp,getOffsetParent:hs,getElementRects:gp,getClientRects:ip,getDimensions:pp,getScale:St,isElement:Ne,isRTL:mp};function gs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bp(e,t){let o=null,n;const r=$e(e);function a(){var i;clearTimeout(n),(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=po(c),m=po(r.clientWidth-(f+h)),v=po(r.clientHeight-(c+g)),w=po(f),k={rootMargin:-b+"px "+-m+"px "+-v+"px "+-w+"px",threshold:we(0,Xe(1,l))||1};let C=!0;function _(P){const T=P[0].intersectionRatio;if(T!==l){if(!C)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!gs(u,e.getBoundingClientRect())&&s(),C=!1}try{o=new IntersectionObserver(_,{...k,root:r.ownerDocument})}catch{o=new IntersectionObserver(_,k)}o.observe(e)}return s(!0),a}function wp(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Tn(e),f=r||a?[...u?Bt(u):[],...t?Bt(t):[]]:[];f.forEach(w=>{r&&w.addEventListener("scroll",o,{passive:!0}),a&&w.addEventListener("resize",o)});const c=u&&i?bp(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&&!gs(m,w)&&o(),m=w,b=requestAnimationFrame(v)}return o(),()=>{var w;f.forEach(y=>{r&&y.removeEventListener("scroll",o),a&&y.removeEventListener("resize",o)}),c==null||c(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const yp=Kf,xp=Zf,kp=qf,Sp=Qf,Cp=Yf,ms=Gf,Ep=Jf,Np=(e,t,o)=>{const n=new Map,r={platform:vp,...o},a={...r.platform,_c:n};return Rf(e,t,{...r,platform:a})};var Tp=typeof document<"u",_p=function(){},yo=Tp?x.useLayoutEffect:_p;function xo(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,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!xo(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;n--!==0;){const a=r[n];if(!(a==="_owner"&&e.$$typeof)&&!xo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function vs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bs(e,t){const o=vs(e);return Math.round(t*o)/o}function Pn(e){const t=p.useRef(e);return yo(()=>{t.current=e}),t}function Pp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:r,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(n);xo(h,n)||g(n);const[b,m]=p.useState(null),[v,w]=p.useState(null),y=p.useCallback(R=>{R!==P.current&&(P.current=R,m(R))},[]),k=p.useCallback(R=>{R!==T.current&&(T.current=R,w(R))},[]),C=a||b,_=s||v,P=p.useRef(null),T=p.useRef(null),E=p.useRef(f),z=l!=null,j=Pn(l),O=Pn(r),B=Pn(u),V=p.useCallback(()=>{if(!P.current||!T.current)return;const R={placement:t,strategy:o,middleware:h};O.current&&(R.platform=O.current),Np(P.current,T.current,R).then(N=>{const S={...N,isPositioned:B.current!==!1};L.current&&!xo(E.current,S)&&(E.current=S,Rt.flushSync(()=>{c(S)}))})},[h,t,o,O,B]);yo(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,c(R=>({...R,isPositioned:!1})))},[u]);const L=p.useRef(!1);yo(()=>(L.current=!0,()=>{L.current=!1}),[]),yo(()=>{if(C&&(P.current=C),_&&(T.current=_),C&&_){if(j.current)return j.current(C,_,V);V()}},[C,_,V,j,z]);const Y=p.useMemo(()=>({reference:P,floating:T,setReference:y,setFloating:k}),[y,k]),I=p.useMemo(()=>({reference:C,floating:_}),[C,_]),D=p.useMemo(()=>{const R={position:o,left:0,top:0};if(!I.floating)return R;const N=bs(I.floating,f.x),S=bs(I.floating,f.y);return i?{...R,transform:"translate("+N+"px, "+S+"px)",...vs(I.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:N,top:S}},[o,i,I.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:V,refs:Y,elements:I,floatingStyles:D}),[f,V,Y,I,D])}const Ap=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:n,padding:r}=typeof e=="function"?e(o):e;return n&&t(n)?n.current!=null?ms({element:n.current,padding:r}).fn(o):{}:n?ms({element:n,padding:r}).fn(o):{}}}},Ip=(e,t)=>{const o=yp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Mp=(e,t)=>{const o=xp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Op=(e,t)=>({fn:Ep(e).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=Sp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Dp=(e,t)=>{const o=Cp(e);return{name:o.name,fn:o.fn,options:[e,t]}},$p=(e,t)=>{const o=Ap(e);return{name:o.name,fn:o.fn,options:[e,t]}};var Fp="Arrow",ws=p.forwardRef((e,t)=>{const{children:o,width:n=10,height:r=5,...a}=e;return d.jsx(K.svg,{...a,ref:t,width:n,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});ws.displayName=Fp;var Bp=ws,An="Popper",[ys,ko]=me(An),[Hp,xs]=ys(An),ks=e=>{const{__scopePopper:t,children:o}=e,[n,r]=p.useState(null);return d.jsx(Hp,{scope:t,anchor:n,onAnchorChange:r,children:o})};ks.displayName=An;var Ss="PopperAnchor",Cs=p.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:n,...r}=e,a=xs(Ss,o),s=p.useRef(null),i=se(t,s),l=p.useRef(null);return p.useEffect(()=>{const u=l.current;l.current=(n==null?void 0:n.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),n?null:d.jsx(K.div,{...r,ref:i})});Cs.displayName=Ss;var In="PopperContent",[Vp,Wp]=ys(In),Es=p.forwardRef((e,t)=>{var G,q,Q,ee,re,oe;const{__scopePopper:o,side:n="bottom",sideOffset:r=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=xs(In,o),[w,y]=p.useState(null),k=se(t,ce=>y(ce)),[C,_]=p.useState(null),P=co(C),T=(P==null?void 0:P.width)??0,E=(P==null?void 0:P.height)??0,z=n+(a!=="center"?"-"+a:""),j=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},O=Array.isArray(u)?u:[u],B=O.length>0,V={padding:j,boundary:O.filter(jp),altBoundary:B},{refs:L,floatingStyles:Y,placement:I,isPositioned:D,middlewareData:R}=Pp({strategy:"fixed",placement:z,whileElementsMounted:(...ce)=>wp(...ce,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Ip({mainAxis:r+E,alignmentAxis:s}),l&&Mp({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Op():void 0,...V}),l&&Lp({...V}),zp({...V,apply:({elements:ce,rects:de,availableWidth:ct,availableHeight:Qe})=>{const{width:Pe,height:Fo}=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",`${Fo}px`)}}),C&&$p({element:C,padding:i}),Rp({arrowWidth:T,arrowHeight:E}),h&&Dp({strategy:"referenceHidden",...V})]}),[N,S]=_s(I),M=pe(b);ie(()=>{D&&(M==null||M())},[D,M]);const F=(G=R.arrow)==null?void 0:G.x,A=(q=R.arrow)==null?void 0:q.y,$=((Q=R.arrow)==null?void 0:Q.centerOffset)!==0,[H,Z]=p.useState();return ie(()=>{w&&Z(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:D?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[(ee=R.transformOrigin)==null?void 0:ee.x,(re=R.transformOrigin)==null?void 0:re.y].join(" "),...((oe=R.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Vp,{scope:o,placedSide:N,onArrowChange:_,arrowX:F,arrowY:A,shouldHideArrow:$,children:d.jsx(K.div,{"data-side":N,"data-align":S,...m,ref:k,style:{...m.style,animation:D?void 0:"none"}})})})});Es.displayName=In;var Ns="PopperArrow",Up={top:"bottom",right:"left",bottom:"top",left:"right"},Ts=p.forwardRef(function(t,o){const{__scopePopper:n,...r}=t,a=Wp(Ns,n),s=Up[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(Bp,{...r,ref:o,style:{...r.style,display:"block"}})})});Ts.displayName=Ns;function jp(e){return e!==null}var Rp=e=>({name:"transformOrigin",options:e,fn(t){var v,w,y;const{placement:o,rects:n,middlewareData:r}=t,s=((v=r.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,f]=_s(o),c={start:"0%",center:"50%",end:"100%"}[f],h=(((w=r.arrow)==null?void 0:w.x)??0)+i/2,g=(((y=r.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=`${n.floating.height+l}px`):u==="right"?(b=`${-l}px`,m=s?c:`${g}px`):u==="left"&&(b=`${n.floating.width+l}px`,m=s?c:`${g}px`),{data:{x:b,y:m}}}});function _s(e){const[t,o="center"]=e.split("-");return[t,o]}var Ps=ks,As=Cs,Is=Es,Ms=Ts,Mn="rovingFocusGroup.onEntryFocus",Gp={bubbles:!1,cancelable:!0},Ht="RovingFocusGroup",[On,Os,qp]=ra(Ht),[Yp,So]=me(Ht,[qp]),[Xp,Kp]=Yp(Ht),Ls=p.forwardRef((e,t)=>d.jsx(On.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(On.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Zp,{...e,ref:t})})}));Ls.displayName=Ht;var Zp=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:n,loop:r=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...c}=e,h=p.useRef(null),g=se(t,h),b=$t(a),[m,v]=He({prop:s,defaultProp:i??null,onChange:l,caller:Ht}),[w,y]=p.useState(!1),k=pe(u),C=Os(o),_=p.useRef(!1),[P,T]=p.useState(0);return p.useEffect(()=>{const E=h.current;if(E)return E.addEventListener(Mn,k),()=>E.removeEventListener(Mn,k)},[k]),d.jsx(Xp,{scope:o,orientation:n,dir:b,loop:r,currentTabStopId:m,onItemFocus:p.useCallback(E=>v(E),[v]),onItemShiftTab:p.useCallback(()=>y(!0),[]),onFocusableItemAdd:p.useCallback(()=>T(E=>E+1),[]),onFocusableItemRemove:p.useCallback(()=>T(E=>E-1),[]),children:d.jsx(K.div,{tabIndex:w||P===0?-1:0,"data-orientation":n,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:J(e.onMouseDown,()=>{_.current=!0}),onFocus:J(e.onFocus,E=>{const z=!_.current;if(E.target===E.currentTarget&&z&&!w){const j=new CustomEvent(Mn,Gp);if(E.currentTarget.dispatchEvent(j),!j.defaultPrevented){const O=C().filter(I=>I.focusable),B=O.find(I=>I.active),V=O.find(I=>I.id===m),Y=[B,V,...O].filter(Boolean).map(I=>I.ref.current);$s(Y,f)}}_.current=!1}),onBlur:J(e.onBlur,()=>y(!1))})})}),zs="RovingFocusGroupItem",Ds=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:n=!0,active:r=!1,tabStopId:a,children:s,...i}=e,l=rt(),u=a||l,f=Kp(zs,o),c=f.currentTabStopId===u,h=Os(o),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:m}=f;return p.useEffect(()=>{if(n)return g(),()=>b()},[n,g,b]),d.jsx(On.ItemSlot,{scope:o,id:u,focusable:n,active:r,children:d.jsx(K.span,{tabIndex:c?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:J(e.onMouseDown,v=>{n?f.onItemFocus(u):v.preventDefault()}),onFocus:J(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:J(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=eh(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?th(k,C+1):k.slice(C+1)}setTimeout(()=>$s(k))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:m!=null}):s})})});Ds.displayName=zs;var Jp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Qp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function eh(e,t,o){const n=Qp(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Jp[n]}function $s(e,t=!1){const o=document.activeElement;for(const n of e)if(n===o||(n.focus({preventScroll:t}),document.activeElement!==o))return}function th(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var Fs=Ls,Bs=Ds,oh="Label",Hs=p.forwardRef((e,t)=>d.jsx(K.label,{...e,ref:t,onMouseDown:o=>{var r;o.target.closest("button, input, select, textarea")||((r=e.onMouseDown)==null||r.call(e,o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));Hs.displayName=oh;var nh=Hs;function Ln(e,[t,o]){return Math.min(o,Math.max(t,e))}var zn="Progress",Dn=100,[rh]=me(zn),[ah,sh]=rh(zn),Vs=p.forwardRef((e,t)=>{const{__scopeProgress:o,value:n=null,max:r,getValueLabel:a=ih,...s}=e;(r||r===0)&&!Rs(r)&&console.error(lh(`${r}`,"Progress"));const i=Rs(r)?r:Dn;n!==null&&!Gs(n,i)&&console.error(ch(`${n}`,"Progress"));const l=Gs(n,i)?n:null,u=Co(l)?a(l,i):void 0;return d.jsx(ah,{scope:o,value:l,max:i,children:d.jsx(K.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Co(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":js(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});Vs.displayName=zn;var Ws="ProgressIndicator",Us=p.forwardRef((e,t)=>{const{__scopeProgress:o,...n}=e,r=sh(Ws,o);return d.jsx(K.div,{"data-state":js(r.value,r.max),"data-value":r.value??void 0,"data-max":r.max,...n,ref:t})});Us.displayName=Ws;function ih(e,t){return`${Math.round(e/t*100)}%`}function js(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Co(e){return typeof e=="number"}function Rs(e){return Co(e)&&!isNaN(e)&&e>0}function Gs(e,t){return Co(e)&&!isNaN(e)&&e<=t&&e>=0}function lh(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Dn}\`.`}function ch(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
286
286
  - a positive number
287
287
  - less than the value passed to \`max\` (or ${Dn} if no \`max\` prop is set)
288
288
  - \`null\` or \`undefined\` if the progress is indeterminate.
289
289
 
290
- Defaulting to \`null\`.`}var dh=Hs,uh=Ws,$n="Radio",[fh,Gs]=me($n),[ph,hh]=fh($n),qs=p.forwardRef((e,t)=>{const{__scopeRadio:o,name:n,checked:r=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...f}=e,[c,h]=p.useState(null),g=se(t,v=>h(v)),b=p.useRef(!1),m=c?u||!!c.closest("form"):!0;return d.jsxs(ph,{scope:o,checked:r,disabled:s,children:[d.jsx(K.button,{type:"button",role:"radio","aria-checked":r,"data-state":Zs(r),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:J(e.onClick,v=>{r||l==null||l(),m&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),m&&d.jsx(Ks,{control:c,bubbles:!b.current,name:n,value:i,checked:r,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});qs.displayName=$n;var Ys="RadioIndicator",Xs=p.forwardRef((e,t)=>{const{__scopeRadio:o,forceMount:n,...r}=e,a=hh(Ys,o);return d.jsx(Ee,{present:n||a.checked,children:d.jsx(K.span,{"data-state":Zs(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})})});Xs.displayName=Ys;var gh="RadioBubbleInput",Ks=p.forwardRef(({__scopeRadio:e,control:t,checked:o,bubbles:n=!0,...r},a)=>{const s=p.useRef(null),i=se(s,a),l=lo(o),u=co(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:n});g.call(f,o),f.dispatchEvent(b)}},[l,o,n]),d.jsx(K.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...r,tabIndex:-1,ref:i,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ks.displayName=gh;function Zs(e){return e?"checked":"unchecked"}var mh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Eo="RadioGroup",[vh]=me(Eo,[So,Gs]),Js=So(),Qs=Gs(),[bh,wh]=vh(Eo),ei=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,name:n,defaultValue:r,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:f=!0,onValueChange:c,...h}=e,g=Js(o),b=$t(u),[m,v]=He({prop:a,defaultProp:r??null,onChange:c,caller:Eo});return d.jsx(bh,{scope:o,name:n,required:s,disabled:i,value:m,onValueChange:v,children:d.jsx($s,{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})})})});ei.displayName=Eo;var ti="RadioGroupItem",oi=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,disabled:n,...r}=e,a=wh(ti,o),s=a.disabled||n,i=Js(o),l=Qs(o),u=p.useRef(null),f=se(t,u),c=a.value===r.value,h=p.useRef(!1);return p.useEffect(()=>{const g=m=>{mh.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(Fs,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(qs,{disabled:s,required:a.required,checked:c,...l,...r,name:a.name,ref:f,onCheck:()=>a.onValueChange(r.value),onKeyDown:J(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:J(r.onFocus,()=>{var g;h.current&&((g=u.current)==null||g.click())})})})});oi.displayName=ti;var yh="RadioGroupIndicator",ni=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,...n}=e,r=Qs(o);return d.jsx(Xs,{...r,...n,ref:t})});ni.displayName=yh;var xh=ei,kh=oi,Sh=ni;function Ch(e,t){return p.useReducer((o,n)=>t[o][n]??o,e)}var Fn="ScrollArea",[ri]=me(Fn),[Eh,Se]=ri(Fn),ai=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,type:n="hover",dir:r,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),[_,P]=p.useState(!1),[T,E]=p.useState(!1),z=se(t,O=>l(O)),j=$t(r);return d.jsx(Eh,{scope:o,type:n,dir:j,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:E,onCornerWidthChange:y,onCornerHeightChange:C,children:d.jsx(K.div,{dir:j,...s,ref:z,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});ai.displayName=Fn;var si="ScrollAreaViewport",ii=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,children:n,nonce:r,...a}=e,s=Se(si,o),i=p.useRef(null),l=se(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:r}),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:n})})]})});ii.displayName=si;var Fe="ScrollAreaScrollbar",li=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Se(Fe,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=r,i=e.orientation==="horizontal";return p.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),r.type==="hover"?d.jsx(Nh,{...n,ref:t,forceMount:o}):r.type==="scroll"?d.jsx(Th,{...n,ref:t,forceMount:o}):r.type==="auto"?d.jsx(ci,{...n,ref:t,forceMount:o}):r.type==="always"?d.jsx(Bn,{...n,ref:t}):null});li.displayName=Fe;var Nh=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Se(Fe,e.__scopeScrollArea),[a,s]=p.useState(!1);return p.useEffect(()=>{const i=r.scrollArea;let l=0;if(i){const u=()=>{window.clearTimeout(l),s(!0)},f=()=>{l=window.setTimeout(()=>s(!1),r.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",f)}}},[r.scrollArea,r.scrollHideDelay]),d.jsx(Ee,{present:o||a,children:d.jsx(ci,{"data-state":a?"visible":"hidden",...n,ref:t})})}),Th=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Se(Fe,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Po(()=>l("SCROLL_END"),100),[i,l]=Ch("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"),r.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,r.scrollHideDelay,l]),p.useEffect(()=>{const u=r.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)}},[r.viewport,a,l,s]),d.jsx(Ee,{present:o||i!=="hidden",children:d.jsx(Bn,{"data-state":i==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:J(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:J(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ci=p.forwardRef((e,t)=>{const o=Se(Fe,e.__scopeScrollArea),{forceMount:n,...r}=e,[a,s]=p.useState(!1),i=e.orientation==="horizontal",l=Po(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,f=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:f)}},10);return Ct(o.viewport,l),Ct(o.content,l),d.jsx(Ee,{present:n||a,children:d.jsx(Bn,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Bn=p.forwardRef((e,t)=>{const{orientation:o="vertical",...n}=e,r=Se(Fe,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=hi(i.viewport,i.content),f={...n,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 Oh(h,s.current,i,g)}return o==="horizontal"?d.jsx(_h,{...f,ref:t,onThumbPositionChange:()=>{if(r.viewport&&a.current){const h=r.viewport.scrollLeft,g=gi(h,i,r.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollLeft=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollLeft=c(h,r.dir))}}):o==="vertical"?d.jsx(Ph,{...f,ref:t,onThumbPositionChange:()=>{if(r.viewport&&a.current){const h=r.viewport.scrollTop,g=gi(h,i);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollTop=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollTop=c(h))}}):null}),_h=p.forwardRef((e,t)=>{const{sizes:o,onSizesChange:n,...r}=e,a=Se(Fe,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),u=se(t,l,a.onScrollbarXChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ui,{"data-orientation":"horizontal",...r,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":_o(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),vi(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:To(s.paddingLeft),paddingEnd:To(s.paddingRight)}})}})}),Ph=p.forwardRef((e,t)=>{const{sizes:o,onSizesChange:n,...r}=e,a=Se(Fe,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),u=se(t,l,a.onScrollbarYChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ui,{"data-orientation":"vertical",...r,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":_o(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),vi(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:To(s.paddingTop),paddingEnd:To(s.paddingBottom)}})}})}),[Ah,di]=ri(Fe),ui=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,sizes:n,hasThumb:r,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:c,...h}=e,g=Se(Fe,o),[b,m]=p.useState(null),v=se(t,z=>m(z)),w=p.useRef(null),y=p.useRef(""),k=g.viewport,C=n.content-n.viewport,_=pe(f),P=pe(l),T=Po(c,10);function E(z){if(w.current){const j=z.clientX-w.current.left,O=z.clientY-w.current.top;u({x:j,y:O})}}return p.useEffect(()=>{const z=j=>{const O=j.target;(b==null?void 0:b.contains(O))&&_(j,C)};return document.addEventListener("wheel",z,{passive:!1}),()=>document.removeEventListener("wheel",z,{passive:!1})},[k,b,C,_]),p.useEffect(P,[n,P]),Ct(b,T),Ct(g.content,T),d.jsx(Ah,{scope:o,scrollbar:b,hasThumb:r,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:J(e.onPointerDown,z=>{z.button===0&&(z.target.setPointerCapture(z.pointerId),w.current=b.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),E(z))}),onPointerMove:J(e.onPointerMove,E),onPointerUp:J(e.onPointerUp,z=>{const j=z.target;j.hasPointerCapture(z.pointerId)&&j.releasePointerCapture(z.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),No="ScrollAreaThumb",fi=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=di(No,e.__scopeScrollArea);return d.jsx(Ee,{present:o||r.hasThumb,children:d.jsx(Ih,{ref:t,...n})})}),Ih=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,style:n,...r}=e,a=Se(No,o),s=di(No,o),{onThumbPositionChange:i}=s,l=se(t,c=>s.onThumbChange(c)),u=p.useRef(void 0),f=Po(()=>{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=Lh(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",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:J(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:J(e.onPointerUp,s.onThumbPointerUp)})});fi.displayName=No;var Hn="ScrollAreaCorner",pi=p.forwardRef((e,t)=>{const o=Se(Hn,e.__scopeScrollArea),n=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&n?d.jsx(Mh,{...e,ref:t}):null});pi.displayName=Hn;var Mh=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,...n}=e,r=Se(Hn,o),[a,s]=p.useState(0),[i,l]=p.useState(0),u=!!(a&&i);return Ct(r.scrollbarX,()=>{var c;const f=((c=r.scrollbarX)==null?void 0:c.offsetHeight)||0;r.onCornerHeightChange(f),l(f)}),Ct(r.scrollbarY,()=>{var c;const f=((c=r.scrollbarY)==null?void 0:c.offsetWidth)||0;r.onCornerWidthChange(f),s(f)}),u?d.jsx(K.div,{...n,ref:t,style:{width:a,height:i,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function To(e){return e?parseInt(e,10):0}function hi(e,t){const o=e/t;return isNaN(o)?0:o}function _o(e){const t=hi(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-o)*t;return Math.max(n,18)}function Oh(e,t,o,n="ltr"){const r=_o(o),a=r/2,s=t||a,i=r-s,l=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-i,f=o.content-o.viewport,c=n==="ltr"?[0,f]:[f*-1,0];return mi([l,u],c)(e)}function gi(e,t,o="ltr"){const n=_o(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-r,s=t.content-t.viewport,i=a-n,l=o==="ltr"?[0,s]:[s*-1,0],u=Ln(e,l);return mi([0,s],[0,i])(u)}function mi(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function vi(e,t){return e>0&&e<t}var Lh=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},n=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},s=o.left!==a.left,i=o.top!==a.top;(s||i)&&t(),o=a,n=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(n)};function Po(e,t){const o=pe(e),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(o,t)},[o,t])}function Ct(e,t){const o=pe(t);ie(()=>{let n=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(o)});return r.observe(e),()=>{window.cancelAnimationFrame(n),r.unobserve(e)}}},[e,o])}var zh=ai,Dh=ii,$h=pi,Fh=[" ","Enter","ArrowUp","ArrowDown"],Bh=[" ","Enter"],it="Select",[Ao,Io,Hh]=na(it),[Et]=me(it,[Hh,ko]),Mo=ko(),[Vh,Ze]=Et(it),[Wh,Uh]=Et(it),bi=e=>{const{__scopeSelect:t,children:o,open:n,defaultOpen:r,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:f,autoComplete:c,disabled:h,required:g,form:b}=e,m=Mo(t),[v,w]=p.useState(null),[y,k]=p.useState(null),[C,_]=p.useState(!1),P=$t(u),[T,E]=He({prop:n,defaultProp:r??!1,onChange:a,caller:it}),[z,j]=He({prop:s,defaultProp:i,onChange:l,caller:it}),O=p.useRef(null),B=v?b||!!v.closest("form"):!0,[V,L]=p.useState(new Set),Y=Array.from(V).map(I=>I.props.value).join(";");return d.jsx(_s,{...m,children:d.jsxs(Vh,{required:g,scope:t,trigger:v,onTriggerChange:w,valueNode:y,onValueNodeChange:k,valueNodeHasChildren:C,onValueNodeHasChildrenChange:_,contentId:rt(),value:z,onValueChange:j,open:T,onOpenChange:E,dir:P,triggerPointerDownPosRef:O,disabled:h,children:[d.jsx(Ao.Provider,{scope:t,children:d.jsx(Wh,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(I=>{L(D=>new Set(D).add(I))},[]),onNativeOptionRemove:p.useCallback(I=>{L(D=>{const R=new Set(D);return R.delete(I),R})},[]),children:o})}),B?d.jsxs(Hi,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:c,value:z,onChange:I=>j(I.target.value),disabled:h,form:b,children:[z===void 0?d.jsx("option",{value:""}):null,Array.from(V)]},Y):null]})})};bi.displayName=it;var wi="SelectTrigger",yi=p.forwardRef((e,t)=>{const{__scopeSelect:o,disabled:n=!1,...r}=e,a=Mo(o),s=Ze(wi,o),i=s.disabled||n,l=se(t,s.onTriggerChange),u=Io(o),f=p.useRef("touch"),[c,h,g]=Wi(m=>{const v=u().filter(k=>!k.disabled),w=v.find(k=>k.value===s.value),y=Ui(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(Ps,{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":Vi(s.value)?"":void 0,...r,ref:l,onClick:J(r.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&b(m)}),onPointerDown:J(r.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:J(r.onKeyDown,m=>{const v=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Fh.includes(m.key)&&(b(),m.preventDefault())})})})});yi.displayName=wi;var xi="SelectValue",ki=p.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,children:a,placeholder:s="",...i}=e,l=Ze(xi,o),{onValueNodeHasChildrenChange:u}=l,f=a!==void 0,c=se(t,l.onValueNodeChange);return ie(()=>{u(f)},[u,f]),d.jsx(K.span,{...i,ref:c,style:{pointerEvents:"none"},children:Vi(l.value)?d.jsx(d.Fragment,{children:s}):a})});ki.displayName=xi;var jh="SelectIcon",Si=p.forwardRef((e,t)=>{const{__scopeSelect:o,children:n,...r}=e;return d.jsx(K.span,{"aria-hidden":!0,...r,ref:t,children:n||"▼"})});Si.displayName=jh;var Rh="SelectPortal",Ci=e=>d.jsx(sn,{asChild:!0,...e});Ci.displayName=Rh;var lt="SelectContent",Ei=p.forwardRef((e,t)=>{const o=Ze(lt,e.__scopeSelect),[n,r]=p.useState();if(ie(()=>{r(new DocumentFragment)},[]),!o.open){const a=n;return a?Rt.createPortal(d.jsx(Ni,{scope:e.__scopeSelect,children:d.jsx(Ao.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(Ti,{...e,ref:t})});Ei.displayName=lt;var _e=10,[Ni,Je]=Et(lt),Gh="SelectContentImpl",qh=Dt("SelectContent.RemoveScroll"),Ti=p.forwardRef((e,t)=>{const{__scopeSelect:o,position:n="item-aligned",onCloseAutoFocus:r,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),[_,P]=p.useState(null),T=se(t,G=>C(G)),[E,z]=p.useState(null),[j,O]=p.useState(null),B=Io(o),[V,L]=p.useState(!1),Y=p.useRef(!1);p.useEffect(()=>{if(k)return bf(k)},[k]),Iu();const I=p.useCallback(G=>{const[q,...Q]=B().map(oe=>oe.ref.current),[ee]=Q.slice(-1),re=document.activeElement;for(const oe of G)if(oe===re||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===q&&_&&(_.scrollTop=0),oe===ee&&_&&(_.scrollTop=_.scrollHeight),oe==null||oe.focus(),document.activeElement!==re))return},[B,_]),D=p.useCallback(()=>I([E,k]),[I,E,k]);p.useEffect(()=>{V&&D()},[V,D]);const{onOpenChange:R,triggerPointerDownPosRef:N}=y;p.useEffect(()=>{if(k){let G={x:0,y:0};const q=ee=>{var re,oe;G={x:Math.abs(Math.round(ee.pageX)-(((re=N.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(ee.pageY)-(((oe=N.current)==null?void 0:oe.y)??0))}},Q=ee=>{G.x<=10&&G.y<=10?ee.preventDefault():k.contains(ee.target)||R(!1),document.removeEventListener("pointermove",q),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",Q,{capture:!0})}}},[k,R,N]),p.useEffect(()=>{const G=()=>R(!1);return window.addEventListener("blur",G),window.addEventListener("resize",G),()=>{window.removeEventListener("blur",G),window.removeEventListener("resize",G)}},[R]);const[S,M]=Wi(G=>{const q=B().filter(re=>!re.disabled),Q=q.find(re=>re.ref.current===document.activeElement),ee=Ui(q,G,Q);ee&&setTimeout(()=>ee.ref.current.focus())}),F=p.useCallback((G,q,Q)=>{const ee=!Y.current&&!Q;(y.value!==void 0&&y.value===q||ee)&&(z(G),ee&&(Y.current=!0))},[y.value]),A=p.useCallback(()=>k==null?void 0:k.focus(),[k]),$=p.useCallback((G,q,Q)=>{const ee=!Y.current&&!Q;(y.value!==void 0&&y.value===q||ee)&&O(G)},[y.value]),H=n==="popper"?Vn:_i,Z=H===Vn?{side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:m,avoidCollisions:v}:{};return d.jsx(Ni,{scope:o,content:k,viewport:_,onViewportChange:P,itemRefCallback:F,selectedItem:E,onItemLeave:A,itemTextRefCallback:$,focusSelectedItem:D,selectedItemText:j,position:n,isPositioned:V,searchRef:S,children:d.jsx(Ia,{as:qh,allowPinchZoom:!0,children:d.jsx(pa,{asChild:!0,trapped:y.open,onMountAutoFocus:G=>{G.preventDefault()},onUnmountAutoFocus:J(r,G=>{var q;(q=y.trigger)==null||q.focus({preventScroll:!0}),G.preventDefault()}),children:d.jsx(nn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:G=>G.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:d.jsx(H,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:G=>G.preventDefault(),...w,...Z,onPlaced:()=>L(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:J(w.onKeyDown,G=>{const q=G.ctrlKey||G.altKey||G.metaKey;if(G.key==="Tab"&&G.preventDefault(),!q&&G.key.length===1&&M(G.key),["ArrowUp","ArrowDown","Home","End"].includes(G.key)){let ee=B().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(G.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(G.key)){const re=G.target,oe=ee.indexOf(re);ee=ee.slice(oe+1)}setTimeout(()=>I(ee)),G.preventDefault()}})})})})})})});Ti.displayName=Gh;var Yh="SelectItemAlignedPosition",_i=p.forwardRef((e,t)=>{const{__scopeSelect:o,onPlaced:n,...r}=e,a=Ze(lt,o),s=Je(lt,o),[i,l]=p.useState(null),[u,f]=p.useState(null),c=se(t,T=>f(T)),h=Io(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(),E=u.getBoundingClientRect(),z=a.valueNode.getBoundingClientRect(),j=w.getBoundingClientRect();if(a.dir!=="rtl"){const re=j.left-E.left,oe=z.left-re,ce=T.left-oe,de=T.width+ce,ct=Math.max(de,E.width),Qe=window.innerWidth-_e,Pe=Ln(oe,[_e,Math.max(_e,Qe-ct)]);i.style.minWidth=de+"px",i.style.left=Pe+"px"}else{const re=E.right-j.right,oe=window.innerWidth-z.right-re,ce=window.innerWidth-T.right-oe,de=T.width+ce,ct=Math.max(de,E.width),Qe=window.innerWidth-_e,Pe=Ln(oe,[_e,Math.max(_e,Qe-ct)]);i.style.minWidth=de+"px",i.style.right=Pe+"px"}const O=h(),B=window.innerHeight-_e*2,V=m.scrollHeight,L=window.getComputedStyle(u),Y=parseInt(L.borderTopWidth,10),I=parseInt(L.paddingTop,10),D=parseInt(L.borderBottomWidth,10),R=parseInt(L.paddingBottom,10),N=Y+I+V+R+D,S=Math.min(v.offsetHeight*5,N),M=window.getComputedStyle(m),F=parseInt(M.paddingTop,10),A=parseInt(M.paddingBottom,10),$=T.top+T.height/2-_e,H=B-$,Z=v.offsetHeight/2,G=v.offsetTop+Z,q=Y+I+G,Q=N-q;if(q<=$){const re=O.length>0&&v===O[O.length-1].ref.current;i.style.bottom="0px";const oe=u.clientHeight-m.offsetTop-m.offsetHeight,ce=Math.max(H,Z+(re?A:0)+oe+D),de=q+ce;i.style.height=de+"px"}else{const re=O.length>0&&v===O[0].ref.current;i.style.top="0px";const ce=Math.max($,Y+m.offsetTop+(re?F:0)+Z)+Q;i.style.height=ce+"px",m.scrollTop=q-$+m.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=S+"px",i.style.maxHeight=B+"px",n==null||n(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,i,u,m,v,w,a.dir,n]);ie(()=>k(),[k]);const[C,_]=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(Kh,{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,{...r,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});_i.displayName=Yh;var Xh="SelectPopperPosition",Vn=p.forwardRef((e,t)=>{const{__scopeSelect:o,align:n="start",collisionPadding:r=_e,...a}=e,s=Mo(o);return d.jsx(As,{...s,...a,ref:t,align:n,collisionPadding:r,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)"}})});Vn.displayName=Xh;var[Kh,Wn]=Et(lt,{}),Un="SelectViewport",Pi=p.forwardRef((e,t)=>{const{__scopeSelect:o,nonce:n,...r}=e,a=Je(Un,o),s=Wn(Un,o),i=se(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:n}),d.jsx(Ao.Slot,{scope:o,children:d.jsx(K.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:J(r.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})})})]})});Pi.displayName=Un;var Ai="SelectGroup",[Zh,Jh]=Et(Ai),Qh=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=rt();return d.jsx(Zh,{scope:o,id:r,children:d.jsx(K.div,{role:"group","aria-labelledby":r,...n,ref:t})})});Qh.displayName=Ai;var Ii="SelectLabel",eg=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=Jh(Ii,o);return d.jsx(K.div,{id:r.id,...n,ref:t})});eg.displayName=Ii;var Oo="SelectItem",[tg,Mi]=Et(Oo),Oi=p.forwardRef((e,t)=>{const{__scopeSelect:o,value:n,disabled:r=!1,textValue:a,...s}=e,i=Ze(Oo,o),l=Je(Oo,o),u=i.value===n,[f,c]=p.useState(a??""),[h,g]=p.useState(!1),b=se(t,y=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,y,n,r)}),m=rt(),v=p.useRef("touch"),w=()=>{r||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")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(tg,{scope:o,value:n,disabled:r,textId:m,isSelected:u,onItemTextChange:p.useCallback(y=>{c(k=>k||((y==null?void 0:y.textContent)??"").trim())},[]),children:d.jsx(Ao.ItemSlot,{scope:o,value:n,disabled:r,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":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:b,onFocus:J(s.onFocus,()=>g(!0)),onBlur:J(s.onBlur,()=>g(!1)),onClick:J(s.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:J(s.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:J(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:J(s.onPointerMove,y=>{var k;v.current=y.pointerType,r?(k=l.onItemLeave)==null||k.call(l):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:J(s.onPointerLeave,y=>{var k;y.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:J(s.onKeyDown,y=>{var C;((C=l.searchRef)==null?void 0:C.current)!==""&&y.key===" "||(Bh.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});Oi.displayName=Oo;var Vt="SelectItemText",Li=p.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,...a}=e,s=Ze(Vt,o),i=Je(Vt,o),l=Mi(Vt,o),u=Uh(Vt,o),[f,c]=p.useState(null),h=se(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?Rt.createPortal(a.children,s.valueNode):null]})});Li.displayName=Vt;var zi="SelectItemIndicator",Di=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return Mi(zi,o).isSelected?d.jsx(K.span,{"aria-hidden":!0,...n,ref:t}):null});Di.displayName=zi;var jn="SelectScrollUpButton",$i=p.forwardRef((e,t)=>{const o=Je(jn,e.__scopeSelect),n=Wn(jn,e.__scopeSelect),[r,a]=p.useState(!1),s=se(t,n.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]),r?d.jsx(Bi,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});$i.displayName=jn;var Rn="SelectScrollDownButton",Fi=p.forwardRef((e,t)=>{const o=Je(Rn,e.__scopeSelect),n=Wn(Rn,e.__scopeSelect),[r,a]=p.useState(!1),s=se(t,n.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]),r?d.jsx(Bi,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Fi.displayName=Rn;var Bi=p.forwardRef((e,t)=>{const{__scopeSelect:o,onAutoScroll:n,...r}=e,a=Je("SelectScrollButton",o),s=p.useRef(null),i=Io(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,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:J(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:J(r.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:J(r.onPointerLeave,()=>{l()})})}),og="SelectSeparator",ng=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return d.jsx(K.div,{"aria-hidden":!0,...n,ref:t})});ng.displayName=og;var Gn="SelectArrow",rg=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=Mo(o),a=Ze(Gn,o),s=Je(Gn,o);return a.open&&s.position==="popper"?d.jsx(Is,{...r,...n,ref:t}):null});rg.displayName=Gn;var ag="SelectBubbleInput",Hi=p.forwardRef(({__scopeSelect:e,value:t,...o},n)=>{const r=p.useRef(null),a=se(n,r),s=lo(t);return p.useEffect(()=>{const i=r.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:{...ta,...o.style},ref:a,defaultValue:t})});Hi.displayName=ag;function Vi(e){return e===""||e===void 0}function Wi(e){const t=pe(e),o=p.useRef(""),n=p.useRef(0),r=p.useCallback(s=>{const i=o.current+s;t(i),(function l(u){o.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=p.useCallback(()=>{o.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[o,r,a]}function Ui(e,t,o){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let s=sg(e,Math.max(a,0));r.length===1&&(s=s.filter(u=>u!==o));const l=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==o?l:void 0}function sg(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var ig=bi,lg=yi,cg=ki,dg=Si,ug=Ci,fg=Ei,pg=Pi,hg=Oi,gg=Li,mg=Di,vg=$i,bg=Fi,wg="Separator",ji="horizontal",yg=["horizontal","vertical"],Ri=p.forwardRef((e,t)=>{const{decorative:o,orientation:n=ji,...r}=e,a=xg(n)?n:ji,i=o?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(K.div,{"data-orientation":a,...i,...r,ref:t})});Ri.displayName=wg;function xg(e){return yg.includes(e)}var kg=Ri,Lo="Switch",[Sg]=me(Lo),[Cg,Eg]=Sg(Lo),Gi=p.forwardRef((e,t)=>{const{__scopeSwitch:o,name:n,checked:r,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,form:f,...c}=e,[h,g]=p.useState(null),b=se(t,k=>g(k)),m=p.useRef(!1),v=h?f||!!h.closest("form"):!0,[w,y]=He({prop:r,defaultProp:a??!1,onChange:u,caller:Lo});return d.jsxs(Cg,{scope:o,checked:w,disabled:i,children:[d.jsx(K.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":Ki(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:b,onClick:J(e.onClick,k=>{y(C=>!C),v&&(m.current=k.isPropagationStopped(),m.current||k.stopPropagation())})}),v&&d.jsx(Xi,{control:h,bubbles:!m.current,name:n,value:l,checked:w,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Gi.displayName=Lo;var qi="SwitchThumb",Yi=p.forwardRef((e,t)=>{const{__scopeSwitch:o,...n}=e,r=Eg(qi,o);return d.jsx(K.span,{"data-state":Ki(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:t})});Yi.displayName=qi;var Ng="SwitchBubbleInput",Xi=p.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:n=!0,...r},a)=>{const s=p.useRef(null),i=se(s,a),l=lo(o),u=co(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:n});g.call(f,o),f.dispatchEvent(b)}},[l,o,n]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...r,tabIndex:-1,ref:i,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Xi.displayName=Ng;function Ki(e){return e?"checked":"unchecked"}var Tg=Gi,_g=Yi,zo="Tabs",[Pg]=me(zo,[So]),Zi=So(),[Ag,qn]=Pg(zo),Ji=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,onValueChange:r,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,f=$t(i),[c,h]=He({prop:n,onChange:r,defaultProp:a??"",caller:zo});return d.jsx(Ag,{scope:o,baseId:rt(),value:c,onValueChange:h,orientation:s,dir:f,activationMode:l,children:d.jsx(K.div,{dir:f,"data-orientation":s,...u,ref:t})})});Ji.displayName=zo;var Qi="TabsList",el=p.forwardRef((e,t)=>{const{__scopeTabs:o,loop:n=!0,...r}=e,a=qn(Qi,o),s=Zi(o);return d.jsx($s,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:d.jsx(K.div,{role:"tablist","aria-orientation":a.orientation,...r,ref:t})})});el.displayName=Qi;var tl="TabsTrigger",ol=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,disabled:r=!1,...a}=e,s=qn(tl,o),i=Zi(o),l=al(s.baseId,n),u=sl(s.baseId,n),f=n===s.value;return d.jsx(Fs,{asChild:!0,...i,focusable:!r,active:f,children:d.jsx(K.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...a,ref:t,onMouseDown:J(e.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?s.onValueChange(n):c.preventDefault()}),onKeyDown:J(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(n)}),onFocus:J(e.onFocus,()=>{const c=s.activationMode!=="manual";!f&&!r&&c&&s.onValueChange(n)})})})});ol.displayName=tl;var nl="TabsContent",rl=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,forceMount:r,children:a,...s}=e,i=qn(nl,o),l=al(i.baseId,n),u=sl(i.baseId,n),f=n===i.value,c=p.useRef(f);return p.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Ee,{present:r||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})})});rl.displayName=nl;function al(e,t){return`${e}-trigger-${t}`}function sl(e,t){return`${e}-content-${t}`}var Ig=Ji,Mg=el,Og=ol,Lg=rl,[Do]=me("Tooltip",[ko]),$o=ko(),il="TooltipProvider",zg=700,Yn="tooltip.open",[Dg,Xn]=Do(il),ll=e=>{const{__scopeTooltip:t,delayDuration:o=zg,skipDelayDuration:n=300,disableHoverableContent:r=!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(Dg,{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,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:p.useCallback(u=>{i.current=u},[]),disableHoverableContent:r,children:a})};ll.displayName=il;var Wt="Tooltip",[$g,Ut]=Do(Wt),cl=e=>{const{__scopeTooltip:t,children:o,open:n,defaultOpen:r,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Xn(Wt,e.__scopeTooltip),u=$o(t),[f,c]=p.useState(null),h=rt(),g=p.useRef(0),b=s??l.disableHoverableContent,m=i??l.delayDuration,v=p.useRef(!1),[w,y]=He({prop:n,defaultProp:r??!1,onChange:T=>{T?(l.onOpen(),document.dispatchEvent(new CustomEvent(Yn))):l.onClose(),a==null||a(T)},caller:Wt}),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]),_=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(_s,{...u,children:d.jsx($g,{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?_():(window.clearTimeout(g.current),g.current=0)},[_,b]),onOpen:C,onClose:_,disableHoverableContent:b,children:o})})};cl.displayName=Wt;var Kn="TooltipTrigger",dl=p.forwardRef((e,t)=>{const{__scopeTooltip:o,...n}=e,r=Ut(Kn,o),a=Xn(Kn,o),s=$o(o),i=p.useRef(null),l=se(t,i,r.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(Ps,{asChild:!0,...s,children:d.jsx(K.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...n,ref:l,onPointerMove:J(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:J(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:J(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:J(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:J(e.onBlur,r.onClose),onClick:J(e.onClick,r.onClose)})})});dl.displayName=Kn;var Zn="TooltipPortal",[Fg,Bg]=Do(Zn,{forceMount:void 0}),ul=e=>{const{__scopeTooltip:t,forceMount:o,children:n,container:r}=e,a=Ut(Zn,t);return d.jsx(Fg,{scope:t,forceMount:o,children:d.jsx(Ee,{present:o||a.open,children:d.jsx(sn,{asChild:!0,container:r,children:n})})})};ul.displayName=Zn;var Nt="TooltipContent",fl=p.forwardRef((e,t)=>{const o=Bg(Nt,e.__scopeTooltip),{forceMount:n=o.forceMount,side:r="top",...a}=e,s=Ut(Nt,e.__scopeTooltip);return d.jsx(Ee,{present:n||s.open,children:s.disableHoverableContent?d.jsx(pl,{side:r,...a,ref:t}):d.jsx(Hg,{side:r,...a,ref:t})})}),Hg=p.forwardRef((e,t)=>{const o=Ut(Nt,e.__scopeTooltip),n=Xn(Nt,e.__scopeTooltip),r=p.useRef(null),a=se(t,r),[s,i]=p.useState(null),{trigger:l,onClose:u}=o,f=r.current,{onPointerInTransitChange:c}=n,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=jg(w,v.getBoundingClientRect()),k=Rg(w,y),C=Gg(m.getBoundingClientRect()),_=Yg([...k,...C]);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=!qg(w,s);y?h():k&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,f,s,u,h]),d.jsx(pl,{...e,ref:a})}),[Vg,Wg]=Do(Wt,{isInside:!1}),Ug=qd("TooltipContent"),pl=p.forwardRef((e,t)=>{const{__scopeTooltip:o,children:n,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Ut(Nt,o),u=$o(o),{onClose:f}=l;return p.useEffect(()=>(document.addEventListener(Yn,f),()=>document.removeEventListener(Yn,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(nn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:d.jsxs(As,{"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(Ug,{children:n}),d.jsx(Vg,{scope:o,isInside:!0,children:d.jsx(eu,{id:l.contentId,role:"tooltip",children:r||n})})]})})});fl.displayName=Nt;var hl="TooltipArrow",gl=p.forwardRef((e,t)=>{const{__scopeTooltip:o,...n}=e,r=$o(o);return Wg(hl,o).isInside?null:d.jsx(Is,{...r,...n,ref:t})});gl.displayName=hl;function jg(e,t){const o=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(o,n,r,a)){case a:return"left";case r:return"right";case o:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Rg(e,t,o=5){const n=[];switch(t){case"top":n.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":n.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":n.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":n.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return n}function Gg(e){const{top:t,right:o,bottom:n,left:r}=e;return[{x:r,y:t},{x:o,y:t},{x:o,y:n},{x:r,y:n}]}function qg(e,t){const{x:o,y:n}=e;let r=!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>n!=h>n&&o<(c-u)*(n-f)/(h-f)+u&&(r=!r)}return r}function Yg(e){const t=e.slice();return t.sort((o,n)=>o.x<n.x?-1:o.x>n.x?1:o.y<n.y?-1:o.y>n.y?1:0),Xg(t)}function Xg(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const o=[];for(let n=e.length-1;n>=0;n--){const r=e[n];for(;o.length>=2;){const a=o[o.length-1],s=o[o.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))o.pop();else break}o.push(r)}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 Kg=ll,Zg=cl,Jg=dl,Qg=ul,em=fl,tm=gl;const om=Jt("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 ml({className:e,variant:t="default",size:o="default",asChild:n=!1,...r}){const a=n?Qr:"button";return d.jsx(a,{"data-slot":"button","data-variant":t,"data-size":o,className:X(om({variant:t,size:o,className:e})),...r})}const nm={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"},rm=Jt("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 am({className:e,variant:t="default",hue:o,asChild:n=!1,...r}){const a=n?Qr:"span",s=o?nm[o]:void 0;return d.jsx(a,{"data-slot":"badge","data-variant":t,className:X(rm({variant:t}),s,e),...r})}function sm({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 im({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 lm({...e}){return d.jsx(ig,{"data-slot":"select",...e})}function cm({...e}){return d.jsx(cg,{"data-slot":"select-value",...e})}function dm({className:e,size:t="default",children:o,...n}){return d.jsxs(lg,{"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),...n,children:[o,d.jsx(dg,{asChild:!0,children:d.jsx(yr,{className:"size-4 opacity-50"})})]})}function um({className:e,children:t,position:o="item-aligned",align:n="center",...r}){return d.jsx(ug,{children:d.jsxs(fg,{"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:n,...r,children:[d.jsx(pm,{}),d.jsx(pg,{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(hm,{})]})})}function fm({className:e,children:t,...o}){return d.jsxs(hg,{"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(mg,{children:d.jsx(wr,{className:"size-4"})})}),d.jsx(gg,{children:t})]})}function pm({className:e,...t}){return d.jsx(vg,{"data-slot":"select-scroll-up-button",className:X("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Bc,{className:"size-4"})})}function hm({className:e,...t}){return d.jsx(bg,{"data-slot":"select-scroll-down-button",className:X("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(yr,{className:"size-4"})})}function gm({className:e,...t}){return d.jsx(ja,{"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(Ga,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:d.jsx(wr,{className:"size-3.5"})})})}function mm({className:e,size:t="default",...o}){return d.jsx(Tg,{"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(_g,{"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 vm({className:e,...t}){return d.jsx(nh,{"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 bm({className:e,...t}){return d.jsx(xh,{"data-slot":"radio-group",className:X("grid gap-3",e),...t})}function wm({className:e,...t}){return d.jsx(kh,{"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(Sh,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(Vc,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function ym({className:e,orientation:t="horizontal",decorative:o=!0,...n}){return d.jsx(kg,{"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),...n})}function xm({className:e,orientation:t="horizontal",...o}){return d.jsx(Ig,{"data-slot":"tabs","data-orientation":t,orientation:t,className:X("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...o})}const km=Jt("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 Sm({className:e,variant:t="default",...o}){return d.jsx(Mg,{"data-slot":"tabs-list","data-variant":t,className:X(km({variant:t}),e),...o})}function Cm({className:e,...t}){return d.jsx(Og,{"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 Em({className:e,...t}){return d.jsx(Lg,{"data-slot":"tabs-content",className:X("flex-1 outline-none",e),...t})}function Nm({className:e,children:t,...o}){return d.jsxs(zh,{"data-slot":"scroll-area",className:X("relative",e),...o,children:[d.jsx(Dh,{"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(Tm,{}),d.jsx($h,{})]})}function Tm({className:e,orientation:t="vertical",...o}){return d.jsx(li,{"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(fi,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Jn({className:e,size:t="default",...o}){return d.jsx(Tf,{"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 Qn({className:e,...t}){return d.jsx(_f,{"data-slot":"avatar-image",className:X("aspect-square size-full",e),...t})}function er({className:e,...t}){return d.jsx(Pf,{"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 _m({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:X("animate-pulse rounded-md bg-accent",e),...t})}function Pm({delayDuration:e=0,...t}){return d.jsx(Kg,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Am({...e}){return d.jsx(Zg,{"data-slot":"tooltip",...e})}function Im({...e}){return d.jsx(Jg,{"data-slot":"tooltip-trigger",...e})}function Mm({className:e,sideOffset:t=0,children:o,...n}){return d.jsx(Qg,{children:d.jsxs(em,{"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),...n,children:[o,d.jsx(tm,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function Om({className:e,value:t,...o}){return d.jsx(dh,{"data-slot":"progress",className:X("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...o,children:d.jsx(uh,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const Lm=Jt("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 zm({className:e,variant:t,...o}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:X(Lm({variant:t}),e),...o})}function Dm({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 $m({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 Fm({...e}){return d.jsx(pu,{"data-slot":"collapsible",...e})}function Bm({...e}){return d.jsx(sa,{"data-slot":"collapsible-trigger",...e})}function Hm({...e}){return d.jsx(ia,{"data-slot":"collapsible-content",...e})}const Tt=e=>e==null?void 0:e===!0||e==="true",vl={"arrow-left":Lc,calendar:$c,"check-circle-2":kr,"chevron-left":Fc,"chevron-right":Ro,clock:Wc,"credit-card":jc,"external-link":Rc,"help-circle":Sr,info:Yt,"loader-2":Go,mail:qo,"map-pin":qc,"message-circle":Cr,"message-square":Yo,package:Xc,phone:Kc,search:Jc,"shopping-bag":Qc,sparkles:Er,truck:td,user:Nr,"x-circle":Hc,"alert-circle":xr,"book-open":zc},bl={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"},wl={default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive"},yl=e=>typeof e=="number"?bl[String(e)]??"gap-2":typeof e=="string"?bl[e.trim()]??"gap-2":"gap-2",Vm=({children:e,className:t,onClick:o})=>d.jsx(Lt,{className:t,onClick:o,children:e}),Wm=({children:e,className:t})=>d.jsx(zt,{className:t,children:e}),Um=({children:e,className:t})=>d.jsx(Rd,{className:t,children:e}),jm=({children:e,className:t,onClick:o,variant:n,size:r,disabled:a,title:s})=>d.jsx(ml,{className:t,variant:n,size:r,onClick:o,disabled:Tt(a),title:s,children:e}),Rm=({children:e,className:t,variant:o,hue:n,tone:r})=>d.jsx(am,{className:X(wl[r]??"",t),variant:o,hue:n,children:e}),Gm=({className:e,onChange:t,...o})=>d.jsx(sm,{className:e,onChange:t,...o}),qm=({className:e,onChange:t,...o})=>d.jsx(im,{className:e,onChange:t,...o}),Ym=({children:e,className:t,value:o,defaultValue:n,onChange:r,placeholder:a,disabled:s})=>d.jsxs(lm,{value:o,defaultValue:n,onValueChange:i=>{const l=r;l==null||l({target:{value:i}})},disabled:Tt(s),children:[d.jsx(dm,{className:t,children:d.jsx(cm,{placeholder:a})}),d.jsx(um,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),Xm=({children:e,value:t,disabled:o,className:n})=>d.jsx(fm,{value:t,disabled:Tt(o),className:n,children:e}),Km=({checked:e,onChange:t,disabled:o,className:n,id:r})=>{const a=e!==void 0,s=t;return d.jsx(gm,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:Tt(o),className:n,id:r})},Zm=({checked:e,onChange:t,disabled:o,size:n,className:r,id:a})=>{const s=e!==void 0,i=t;return d.jsx(mm,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:Tt(o),size:n,className:r,id:a})},Jm=({children:e,htmlFor:t,className:o})=>d.jsx(vm,{htmlFor:t,className:o,children:e}),Qm=({children:e,value:t,defaultValue:o,onChange:n,className:r})=>d.jsx(bm,{value:t,defaultValue:o,onValueChange:a=>{const s=n;s==null||s({target:{value:a}})},className:r,children:e}),ev=({value:e,disabled:t,className:o,id:n})=>d.jsx(wm,{value:e,disabled:Tt(t),className:o,id:n}),tv=({className:e})=>d.jsx(ym,{className:e}),ov=({children:e,defaultValue:t,className:o})=>{const[n,r]=x.useState(t);return d.jsx(xm,{value:n,onValueChange:r,className:o,children:e})},nv=({children:e,className:t})=>d.jsx(Sm,{className:t,children:e}),rv=({children:e,value:t,className:o})=>d.jsx(Cm,{className:o,value:t,children:e}),av=({children:e,value:t,className:o})=>d.jsx(Em,{className:o,value:t,children:e}),sv=({children:e,className:t})=>d.jsx(Nm,{className:t,children:e}),iv=({src:e,alt:t,className:o})=>{var n;return d.jsxs(Jn,{className:o,children:[d.jsx(Qn,{src:e,alt:t}),d.jsx(er,{children:((n=t==null?void 0:t.charAt(0))==null?void 0:n.toUpperCase())||"?"})]})},lv=({width:e,height:t,className:o})=>d.jsx(_m,{className:o,style:{width:e,height:t}}),cv=({children:e,content:t,className:o})=>d.jsx(Pm,{children:d.jsxs(Am,{children:[d.jsx(Im,{asChild:!0,children:d.jsx("span",{className:o,children:e})}),d.jsx(Mm,{children:d.jsx("p",{children:String(t)})})]})}),dv=({value:e,className:t})=>d.jsx(Om,{value:typeof e=="string"?Number(e):e,className:t}),uv={default:Yt,destructive:xr},fv=({children:e,variant:t,title:o,className:n})=>{const r=t,a=uv[r||"default"]||Yt;return d.jsxs(zm,{variant:r,className:n,children:[d.jsx(a,{className:"size-4"}),o?d.jsx(Dm,{children:String(o)}):null,e?d.jsx($m,{children:e}):null]})},pv=({children:e,defaultOpen:t,className:o})=>d.jsx(Fm,{defaultOpen:t==="true"||t===!0,className:o,children:e}),hv=({children:e,className:t})=>d.jsxs(Bm,{className:X("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[d.jsx(Ro,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),gv=({children:e,className:t})=>d.jsx(Hm,{className:t,children:e}),mv=({children:e,className:t,tone:o})=>d.jsx("p",{className:X("text-sm",wl[o]??"",t),children:e}),vv=({children:e,className:t,level:o})=>{const n=`h${o||"2"}`;return d.jsx(n,{className:X("font-semibold tracking-tight",t),children:e})},bv=({children:e,className:t,direction:o,gap:n})=>{const r=o==="row"?"flex-row":"flex-col",a=yl(n);return d.jsx("div",{className:X("flex",r,a,t),children:e})},wv=({children:e,className:t,gap:o})=>{const n=yl(o);return d.jsx("div",{className:X("flex flex-row items-center",n,t),children:e})},yv=({children:e,className:t,href:o,target:n,rel:r})=>d.jsx("a",{href:o,target:n,rel:r,className:t,children:e}),xv=({title:e,children:t,className:o})=>d.jsxs(Lt,{className:X("overflow-hidden p-0 gap-0 shadow-sm",o),children:[e?d.jsx(zt,{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})]}),kv=({icon:e,label:t,description:o,onClick:n,className:r})=>{const a=e,s="size-5",i=a?vl[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",r),onClick:n,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(Ro,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},Sv=({name:e,size:t,className:o})=>{const r={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=vl[a],i=a==="sparkles"?"sparkle-icon":"";return s?d.jsx(s,{className:X(r,i,o)}):d.jsx("span",{className:X("inline-block",r,i,o),"data-icon":a})},Cv=()=>({"ui-card":Vm,"ui-card-content":Wm,"ui-card-header":Um,"ui-button":jm,"ui-text":mv,"ui-heading":vv,"ui-badge":Rm,"ui-input":Gm,"ui-textarea":qm,"ui-select":Ym,"ui-select-option":Xm,"ui-checkbox":Km,"ui-switch":Zm,"ui-label":Jm,"ui-radio-group":Qm,"ui-radio-group-item":ev,"ui-stack":bv,"ui-inline":wv,"ui-separator":tv,"ui-tabs":ov,"ui-tabs-list":nv,"ui-tabs-trigger":rv,"ui-tabs-content":av,"ui-scroll-area":sv,"ui-avatar":iv,"ui-icon":Sv,"ui-link":yv,"ui-menu-item":kv,"ui-menu":xv,"ui-skeleton":lv,"ui-tooltip":cv,"ui-progress":dv,"ui-alert":fv,"ui-collapsible":pv,"ui-collapsible-trigger":hv,"ui-collapsible-content":gv}),xl="/api/ecommerce",kl=async(e,t)=>{const o=t?`${t.replace(/\/$/,"")}${xl}`:xl,n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await n.json();if(!n.ok)throw new Error(r.error||"API request failed");return r.data},Ev=({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)"})})]}),Sl="stackable-dev-badge-styles",Nv=()=>{if(typeof document>"u"||document.getElementById(Sl))return;const e=document.createElement("style");e.id=Sl,e.textContent=`
290
+ Defaulting to \`null\`.`}var dh=Vs,uh=Us,$n="Radio",[fh,qs]=me($n),[ph,hh]=fh($n),Ys=p.forwardRef((e,t)=>{const{__scopeRadio:o,name:n,checked:r=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...f}=e,[c,h]=p.useState(null),g=se(t,v=>h(v)),b=p.useRef(!1),m=c?u||!!c.closest("form"):!0;return d.jsxs(ph,{scope:o,checked:r,disabled:s,children:[d.jsx(K.button,{type:"button",role:"radio","aria-checked":r,"data-state":Js(r),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:J(e.onClick,v=>{r||l==null||l(),m&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),m&&d.jsx(Zs,{control:c,bubbles:!b.current,name:n,value:i,checked:r,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Ys.displayName=$n;var Xs="RadioIndicator",Ks=p.forwardRef((e,t)=>{const{__scopeRadio:o,forceMount:n,...r}=e,a=hh(Xs,o);return d.jsx(Ee,{present:n||a.checked,children:d.jsx(K.span,{"data-state":Js(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})})});Ks.displayName=Xs;var gh="RadioBubbleInput",Zs=p.forwardRef(({__scopeRadio:e,control:t,checked:o,bubbles:n=!0,...r},a)=>{const s=p.useRef(null),i=se(s,a),l=lo(o),u=co(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:n});g.call(f,o),f.dispatchEvent(b)}},[l,o,n]),d.jsx(K.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...r,tabIndex:-1,ref:i,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Zs.displayName=gh;function Js(e){return e?"checked":"unchecked"}var mh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Eo="RadioGroup",[vh]=me(Eo,[So,qs]),Qs=So(),ei=qs(),[bh,wh]=vh(Eo),ti=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,name:n,defaultValue:r,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:f=!0,onValueChange:c,...h}=e,g=Qs(o),b=$t(u),[m,v]=He({prop:a,defaultProp:r??null,onChange:c,caller:Eo});return d.jsx(bh,{scope:o,name:n,required:s,disabled:i,value:m,onValueChange:v,children:d.jsx(Fs,{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})})})});ti.displayName=Eo;var oi="RadioGroupItem",ni=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,disabled:n,...r}=e,a=wh(oi,o),s=a.disabled||n,i=Qs(o),l=ei(o),u=p.useRef(null),f=se(t,u),c=a.value===r.value,h=p.useRef(!1);return p.useEffect(()=>{const g=m=>{mh.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(Bs,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(Ys,{disabled:s,required:a.required,checked:c,...l,...r,name:a.name,ref:f,onCheck:()=>a.onValueChange(r.value),onKeyDown:J(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:J(r.onFocus,()=>{var g;h.current&&((g=u.current)==null||g.click())})})})});ni.displayName=oi;var yh="RadioGroupIndicator",ri=p.forwardRef((e,t)=>{const{__scopeRadioGroup:o,...n}=e,r=ei(o);return d.jsx(Ks,{...r,...n,ref:t})});ri.displayName=yh;var xh=ti,kh=ni,Sh=ri;function Ch(e,t){return p.useReducer((o,n)=>t[o][n]??o,e)}var Fn="ScrollArea",[ai]=me(Fn),[Eh,Se]=ai(Fn),si=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,type:n="hover",dir:r,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),[_,P]=p.useState(!1),[T,E]=p.useState(!1),z=se(t,O=>l(O)),j=$t(r);return d.jsx(Eh,{scope:o,type:n,dir:j,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:E,onCornerWidthChange:y,onCornerHeightChange:C,children:d.jsx(K.div,{dir:j,...s,ref:z,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});si.displayName=Fn;var ii="ScrollAreaViewport",li=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,children:n,nonce:r,...a}=e,s=Se(ii,o),i=p.useRef(null),l=se(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:r}),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:n})})]})});li.displayName=ii;var Fe="ScrollAreaScrollbar",ci=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Se(Fe,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=r,i=e.orientation==="horizontal";return p.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),r.type==="hover"?d.jsx(Nh,{...n,ref:t,forceMount:o}):r.type==="scroll"?d.jsx(Th,{...n,ref:t,forceMount:o}):r.type==="auto"?d.jsx(di,{...n,ref:t,forceMount:o}):r.type==="always"?d.jsx(Bn,{...n,ref:t}):null});ci.displayName=Fe;var Nh=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Se(Fe,e.__scopeScrollArea),[a,s]=p.useState(!1);return p.useEffect(()=>{const i=r.scrollArea;let l=0;if(i){const u=()=>{window.clearTimeout(l),s(!0)},f=()=>{l=window.setTimeout(()=>s(!1),r.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",f)}}},[r.scrollArea,r.scrollHideDelay]),d.jsx(Ee,{present:o||a,children:d.jsx(di,{"data-state":a?"visible":"hidden",...n,ref:t})})}),Th=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=Se(Fe,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Po(()=>l("SCROLL_END"),100),[i,l]=Ch("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"),r.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,r.scrollHideDelay,l]),p.useEffect(()=>{const u=r.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)}},[r.viewport,a,l,s]),d.jsx(Ee,{present:o||i!=="hidden",children:d.jsx(Bn,{"data-state":i==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:J(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:J(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),di=p.forwardRef((e,t)=>{const o=Se(Fe,e.__scopeScrollArea),{forceMount:n,...r}=e,[a,s]=p.useState(!1),i=e.orientation==="horizontal",l=Po(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,f=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:f)}},10);return Ct(o.viewport,l),Ct(o.content,l),d.jsx(Ee,{present:n||a,children:d.jsx(Bn,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Bn=p.forwardRef((e,t)=>{const{orientation:o="vertical",...n}=e,r=Se(Fe,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=gi(i.viewport,i.content),f={...n,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 Oh(h,s.current,i,g)}return o==="horizontal"?d.jsx(_h,{...f,ref:t,onThumbPositionChange:()=>{if(r.viewport&&a.current){const h=r.viewport.scrollLeft,g=mi(h,i,r.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollLeft=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollLeft=c(h,r.dir))}}):o==="vertical"?d.jsx(Ph,{...f,ref:t,onThumbPositionChange:()=>{if(r.viewport&&a.current){const h=r.viewport.scrollTop,g=mi(h,i);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollTop=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollTop=c(h))}}):null}),_h=p.forwardRef((e,t)=>{const{sizes:o,onSizesChange:n,...r}=e,a=Se(Fe,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),u=se(t,l,a.onScrollbarXChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(fi,{"data-orientation":"horizontal",...r,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":_o(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),bi(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:To(s.paddingLeft),paddingEnd:To(s.paddingRight)}})}})}),Ph=p.forwardRef((e,t)=>{const{sizes:o,onSizesChange:n,...r}=e,a=Se(Fe,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),u=se(t,l,a.onScrollbarYChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(fi,{"data-orientation":"vertical",...r,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":_o(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),bi(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:To(s.paddingTop),paddingEnd:To(s.paddingBottom)}})}})}),[Ah,ui]=ai(Fe),fi=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,sizes:n,hasThumb:r,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:c,...h}=e,g=Se(Fe,o),[b,m]=p.useState(null),v=se(t,z=>m(z)),w=p.useRef(null),y=p.useRef(""),k=g.viewport,C=n.content-n.viewport,_=pe(f),P=pe(l),T=Po(c,10);function E(z){if(w.current){const j=z.clientX-w.current.left,O=z.clientY-w.current.top;u({x:j,y:O})}}return p.useEffect(()=>{const z=j=>{const O=j.target;(b==null?void 0:b.contains(O))&&_(j,C)};return document.addEventListener("wheel",z,{passive:!1}),()=>document.removeEventListener("wheel",z,{passive:!1})},[k,b,C,_]),p.useEffect(P,[n,P]),Ct(b,T),Ct(g.content,T),d.jsx(Ah,{scope:o,scrollbar:b,hasThumb:r,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:J(e.onPointerDown,z=>{z.button===0&&(z.target.setPointerCapture(z.pointerId),w.current=b.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),E(z))}),onPointerMove:J(e.onPointerMove,E),onPointerUp:J(e.onPointerUp,z=>{const j=z.target;j.hasPointerCapture(z.pointerId)&&j.releasePointerCapture(z.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),No="ScrollAreaThumb",pi=p.forwardRef((e,t)=>{const{forceMount:o,...n}=e,r=ui(No,e.__scopeScrollArea);return d.jsx(Ee,{present:o||r.hasThumb,children:d.jsx(Ih,{ref:t,...n})})}),Ih=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,style:n,...r}=e,a=Se(No,o),s=ui(No,o),{onThumbPositionChange:i}=s,l=se(t,c=>s.onThumbChange(c)),u=p.useRef(void 0),f=Po(()=>{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=Lh(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",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:J(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:J(e.onPointerUp,s.onThumbPointerUp)})});pi.displayName=No;var Hn="ScrollAreaCorner",hi=p.forwardRef((e,t)=>{const o=Se(Hn,e.__scopeScrollArea),n=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&n?d.jsx(Mh,{...e,ref:t}):null});hi.displayName=Hn;var Mh=p.forwardRef((e,t)=>{const{__scopeScrollArea:o,...n}=e,r=Se(Hn,o),[a,s]=p.useState(0),[i,l]=p.useState(0),u=!!(a&&i);return Ct(r.scrollbarX,()=>{var c;const f=((c=r.scrollbarX)==null?void 0:c.offsetHeight)||0;r.onCornerHeightChange(f),l(f)}),Ct(r.scrollbarY,()=>{var c;const f=((c=r.scrollbarY)==null?void 0:c.offsetWidth)||0;r.onCornerWidthChange(f),s(f)}),u?d.jsx(K.div,{...n,ref:t,style:{width:a,height:i,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function To(e){return e?parseInt(e,10):0}function gi(e,t){const o=e/t;return isNaN(o)?0:o}function _o(e){const t=gi(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-o)*t;return Math.max(n,18)}function Oh(e,t,o,n="ltr"){const r=_o(o),a=r/2,s=t||a,i=r-s,l=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-i,f=o.content-o.viewport,c=n==="ltr"?[0,f]:[f*-1,0];return vi([l,u],c)(e)}function mi(e,t,o="ltr"){const n=_o(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-r,s=t.content-t.viewport,i=a-n,l=o==="ltr"?[0,s]:[s*-1,0],u=Ln(e,l);return vi([0,s],[0,i])(u)}function vi(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function bi(e,t){return e>0&&e<t}var Lh=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},n=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},s=o.left!==a.left,i=o.top!==a.top;(s||i)&&t(),o=a,n=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(n)};function Po(e,t){const o=pe(e),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(o,t)},[o,t])}function Ct(e,t){const o=pe(t);ie(()=>{let n=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(o)});return r.observe(e),()=>{window.cancelAnimationFrame(n),r.unobserve(e)}}},[e,o])}var zh=si,Dh=li,$h=hi,Fh=[" ","Enter","ArrowUp","ArrowDown"],Bh=[" ","Enter"],it="Select",[Ao,Io,Hh]=ra(it),[Et]=me(it,[Hh,ko]),Mo=ko(),[Vh,Ze]=Et(it),[Wh,Uh]=Et(it),wi=e=>{const{__scopeSelect:t,children:o,open:n,defaultOpen:r,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:f,autoComplete:c,disabled:h,required:g,form:b}=e,m=Mo(t),[v,w]=p.useState(null),[y,k]=p.useState(null),[C,_]=p.useState(!1),P=$t(u),[T,E]=He({prop:n,defaultProp:r??!1,onChange:a,caller:it}),[z,j]=He({prop:s,defaultProp:i,onChange:l,caller:it}),O=p.useRef(null),B=v?b||!!v.closest("form"):!0,[V,L]=p.useState(new Set),Y=Array.from(V).map(I=>I.props.value).join(";");return d.jsx(Ps,{...m,children:d.jsxs(Vh,{required:g,scope:t,trigger:v,onTriggerChange:w,valueNode:y,onValueNodeChange:k,valueNodeHasChildren:C,onValueNodeHasChildrenChange:_,contentId:rt(),value:z,onValueChange:j,open:T,onOpenChange:E,dir:P,triggerPointerDownPosRef:O,disabled:h,children:[d.jsx(Ao.Provider,{scope:t,children:d.jsx(Wh,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(I=>{L(D=>new Set(D).add(I))},[]),onNativeOptionRemove:p.useCallback(I=>{L(D=>{const R=new Set(D);return R.delete(I),R})},[]),children:o})}),B?d.jsxs(Vi,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:c,value:z,onChange:I=>j(I.target.value),disabled:h,form:b,children:[z===void 0?d.jsx("option",{value:""}):null,Array.from(V)]},Y):null]})})};wi.displayName=it;var yi="SelectTrigger",xi=p.forwardRef((e,t)=>{const{__scopeSelect:o,disabled:n=!1,...r}=e,a=Mo(o),s=Ze(yi,o),i=s.disabled||n,l=se(t,s.onTriggerChange),u=Io(o),f=p.useRef("touch"),[c,h,g]=Ui(m=>{const v=u().filter(k=>!k.disabled),w=v.find(k=>k.value===s.value),y=ji(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(As,{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":Wi(s.value)?"":void 0,...r,ref:l,onClick:J(r.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&b(m)}),onPointerDown:J(r.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:J(r.onKeyDown,m=>{const v=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Fh.includes(m.key)&&(b(),m.preventDefault())})})})});xi.displayName=yi;var ki="SelectValue",Si=p.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,children:a,placeholder:s="",...i}=e,l=Ze(ki,o),{onValueNodeHasChildrenChange:u}=l,f=a!==void 0,c=se(t,l.onValueNodeChange);return ie(()=>{u(f)},[u,f]),d.jsx(K.span,{...i,ref:c,style:{pointerEvents:"none"},children:Wi(l.value)?d.jsx(d.Fragment,{children:s}):a})});Si.displayName=ki;var jh="SelectIcon",Ci=p.forwardRef((e,t)=>{const{__scopeSelect:o,children:n,...r}=e;return d.jsx(K.span,{"aria-hidden":!0,...r,ref:t,children:n||"▼"})});Ci.displayName=jh;var Rh="SelectPortal",Ei=e=>d.jsx(sn,{asChild:!0,...e});Ei.displayName=Rh;var lt="SelectContent",Ni=p.forwardRef((e,t)=>{const o=Ze(lt,e.__scopeSelect),[n,r]=p.useState();if(ie(()=>{r(new DocumentFragment)},[]),!o.open){const a=n;return a?Rt.createPortal(d.jsx(Ti,{scope:e.__scopeSelect,children:d.jsx(Ao.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(_i,{...e,ref:t})});Ni.displayName=lt;var _e=10,[Ti,Je]=Et(lt),Gh="SelectContentImpl",qh=Dt("SelectContent.RemoveScroll"),_i=p.forwardRef((e,t)=>{const{__scopeSelect:o,position:n="item-aligned",onCloseAutoFocus:r,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),[_,P]=p.useState(null),T=se(t,G=>C(G)),[E,z]=p.useState(null),[j,O]=p.useState(null),B=Io(o),[V,L]=p.useState(!1),Y=p.useRef(!1);p.useEffect(()=>{if(k)return bf(k)},[k]),Iu();const I=p.useCallback(G=>{const[q,...Q]=B().map(oe=>oe.ref.current),[ee]=Q.slice(-1),re=document.activeElement;for(const oe of G)if(oe===re||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===q&&_&&(_.scrollTop=0),oe===ee&&_&&(_.scrollTop=_.scrollHeight),oe==null||oe.focus(),document.activeElement!==re))return},[B,_]),D=p.useCallback(()=>I([E,k]),[I,E,k]);p.useEffect(()=>{V&&D()},[V,D]);const{onOpenChange:R,triggerPointerDownPosRef:N}=y;p.useEffect(()=>{if(k){let G={x:0,y:0};const q=ee=>{var re,oe;G={x:Math.abs(Math.round(ee.pageX)-(((re=N.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(ee.pageY)-(((oe=N.current)==null?void 0:oe.y)??0))}},Q=ee=>{G.x<=10&&G.y<=10?ee.preventDefault():k.contains(ee.target)||R(!1),document.removeEventListener("pointermove",q),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",Q,{capture:!0})}}},[k,R,N]),p.useEffect(()=>{const G=()=>R(!1);return window.addEventListener("blur",G),window.addEventListener("resize",G),()=>{window.removeEventListener("blur",G),window.removeEventListener("resize",G)}},[R]);const[S,M]=Ui(G=>{const q=B().filter(re=>!re.disabled),Q=q.find(re=>re.ref.current===document.activeElement),ee=ji(q,G,Q);ee&&setTimeout(()=>ee.ref.current.focus())}),F=p.useCallback((G,q,Q)=>{const ee=!Y.current&&!Q;(y.value!==void 0&&y.value===q||ee)&&(z(G),ee&&(Y.current=!0))},[y.value]),A=p.useCallback(()=>k==null?void 0:k.focus(),[k]),$=p.useCallback((G,q,Q)=>{const ee=!Y.current&&!Q;(y.value!==void 0&&y.value===q||ee)&&O(G)},[y.value]),H=n==="popper"?Vn:Pi,Z=H===Vn?{side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:m,avoidCollisions:v}:{};return d.jsx(Ti,{scope:o,content:k,viewport:_,onViewportChange:P,itemRefCallback:F,selectedItem:E,onItemLeave:A,itemTextRefCallback:$,focusSelectedItem:D,selectedItemText:j,position:n,isPositioned:V,searchRef:S,children:d.jsx(Ma,{as:qh,allowPinchZoom:!0,children:d.jsx(ha,{asChild:!0,trapped:y.open,onMountAutoFocus:G=>{G.preventDefault()},onUnmountAutoFocus:J(r,G=>{var q;(q=y.trigger)==null||q.focus({preventScroll:!0}),G.preventDefault()}),children:d.jsx(nn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:G=>G.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:d.jsx(H,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:G=>G.preventDefault(),...w,...Z,onPlaced:()=>L(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:J(w.onKeyDown,G=>{const q=G.ctrlKey||G.altKey||G.metaKey;if(G.key==="Tab"&&G.preventDefault(),!q&&G.key.length===1&&M(G.key),["ArrowUp","ArrowDown","Home","End"].includes(G.key)){let ee=B().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(G.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(G.key)){const re=G.target,oe=ee.indexOf(re);ee=ee.slice(oe+1)}setTimeout(()=>I(ee)),G.preventDefault()}})})})})})})});_i.displayName=Gh;var Yh="SelectItemAlignedPosition",Pi=p.forwardRef((e,t)=>{const{__scopeSelect:o,onPlaced:n,...r}=e,a=Ze(lt,o),s=Je(lt,o),[i,l]=p.useState(null),[u,f]=p.useState(null),c=se(t,T=>f(T)),h=Io(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(),E=u.getBoundingClientRect(),z=a.valueNode.getBoundingClientRect(),j=w.getBoundingClientRect();if(a.dir!=="rtl"){const re=j.left-E.left,oe=z.left-re,ce=T.left-oe,de=T.width+ce,ct=Math.max(de,E.width),Qe=window.innerWidth-_e,Pe=Ln(oe,[_e,Math.max(_e,Qe-ct)]);i.style.minWidth=de+"px",i.style.left=Pe+"px"}else{const re=E.right-j.right,oe=window.innerWidth-z.right-re,ce=window.innerWidth-T.right-oe,de=T.width+ce,ct=Math.max(de,E.width),Qe=window.innerWidth-_e,Pe=Ln(oe,[_e,Math.max(_e,Qe-ct)]);i.style.minWidth=de+"px",i.style.right=Pe+"px"}const O=h(),B=window.innerHeight-_e*2,V=m.scrollHeight,L=window.getComputedStyle(u),Y=parseInt(L.borderTopWidth,10),I=parseInt(L.paddingTop,10),D=parseInt(L.borderBottomWidth,10),R=parseInt(L.paddingBottom,10),N=Y+I+V+R+D,S=Math.min(v.offsetHeight*5,N),M=window.getComputedStyle(m),F=parseInt(M.paddingTop,10),A=parseInt(M.paddingBottom,10),$=T.top+T.height/2-_e,H=B-$,Z=v.offsetHeight/2,G=v.offsetTop+Z,q=Y+I+G,Q=N-q;if(q<=$){const re=O.length>0&&v===O[O.length-1].ref.current;i.style.bottom="0px";const oe=u.clientHeight-m.offsetTop-m.offsetHeight,ce=Math.max(H,Z+(re?A:0)+oe+D),de=q+ce;i.style.height=de+"px"}else{const re=O.length>0&&v===O[0].ref.current;i.style.top="0px";const ce=Math.max($,Y+m.offsetTop+(re?F:0)+Z)+Q;i.style.height=ce+"px",m.scrollTop=q-$+m.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=S+"px",i.style.maxHeight=B+"px",n==null||n(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,i,u,m,v,w,a.dir,n]);ie(()=>k(),[k]);const[C,_]=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(Kh,{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,{...r,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Pi.displayName=Yh;var Xh="SelectPopperPosition",Vn=p.forwardRef((e,t)=>{const{__scopeSelect:o,align:n="start",collisionPadding:r=_e,...a}=e,s=Mo(o);return d.jsx(Is,{...s,...a,ref:t,align:n,collisionPadding:r,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)"}})});Vn.displayName=Xh;var[Kh,Wn]=Et(lt,{}),Un="SelectViewport",Ai=p.forwardRef((e,t)=>{const{__scopeSelect:o,nonce:n,...r}=e,a=Je(Un,o),s=Wn(Un,o),i=se(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:n}),d.jsx(Ao.Slot,{scope:o,children:d.jsx(K.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:J(r.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})})})]})});Ai.displayName=Un;var Ii="SelectGroup",[Zh,Jh]=Et(Ii),Qh=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=rt();return d.jsx(Zh,{scope:o,id:r,children:d.jsx(K.div,{role:"group","aria-labelledby":r,...n,ref:t})})});Qh.displayName=Ii;var Mi="SelectLabel",eg=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=Jh(Mi,o);return d.jsx(K.div,{id:r.id,...n,ref:t})});eg.displayName=Mi;var Oo="SelectItem",[tg,Oi]=Et(Oo),Li=p.forwardRef((e,t)=>{const{__scopeSelect:o,value:n,disabled:r=!1,textValue:a,...s}=e,i=Ze(Oo,o),l=Je(Oo,o),u=i.value===n,[f,c]=p.useState(a??""),[h,g]=p.useState(!1),b=se(t,y=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,y,n,r)}),m=rt(),v=p.useRef("touch"),w=()=>{r||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")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(tg,{scope:o,value:n,disabled:r,textId:m,isSelected:u,onItemTextChange:p.useCallback(y=>{c(k=>k||((y==null?void 0:y.textContent)??"").trim())},[]),children:d.jsx(Ao.ItemSlot,{scope:o,value:n,disabled:r,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":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:b,onFocus:J(s.onFocus,()=>g(!0)),onBlur:J(s.onBlur,()=>g(!1)),onClick:J(s.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:J(s.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:J(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:J(s.onPointerMove,y=>{var k;v.current=y.pointerType,r?(k=l.onItemLeave)==null||k.call(l):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:J(s.onPointerLeave,y=>{var k;y.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:J(s.onKeyDown,y=>{var C;((C=l.searchRef)==null?void 0:C.current)!==""&&y.key===" "||(Bh.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});Li.displayName=Oo;var Vt="SelectItemText",zi=p.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,...a}=e,s=Ze(Vt,o),i=Je(Vt,o),l=Oi(Vt,o),u=Uh(Vt,o),[f,c]=p.useState(null),h=se(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?Rt.createPortal(a.children,s.valueNode):null]})});zi.displayName=Vt;var Di="SelectItemIndicator",$i=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return Oi(Di,o).isSelected?d.jsx(K.span,{"aria-hidden":!0,...n,ref:t}):null});$i.displayName=Di;var jn="SelectScrollUpButton",Fi=p.forwardRef((e,t)=>{const o=Je(jn,e.__scopeSelect),n=Wn(jn,e.__scopeSelect),[r,a]=p.useState(!1),s=se(t,n.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]),r?d.jsx(Hi,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});Fi.displayName=jn;var Rn="SelectScrollDownButton",Bi=p.forwardRef((e,t)=>{const o=Je(Rn,e.__scopeSelect),n=Wn(Rn,e.__scopeSelect),[r,a]=p.useState(!1),s=se(t,n.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]),r?d.jsx(Hi,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Bi.displayName=Rn;var Hi=p.forwardRef((e,t)=>{const{__scopeSelect:o,onAutoScroll:n,...r}=e,a=Je("SelectScrollButton",o),s=p.useRef(null),i=Io(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,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:J(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:J(r.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:J(r.onPointerLeave,()=>{l()})})}),og="SelectSeparator",ng=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return d.jsx(K.div,{"aria-hidden":!0,...n,ref:t})});ng.displayName=og;var Gn="SelectArrow",rg=p.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=Mo(o),a=Ze(Gn,o),s=Je(Gn,o);return a.open&&s.position==="popper"?d.jsx(Ms,{...r,...n,ref:t}):null});rg.displayName=Gn;var ag="SelectBubbleInput",Vi=p.forwardRef(({__scopeSelect:e,value:t,...o},n)=>{const r=p.useRef(null),a=se(n,r),s=lo(t);return p.useEffect(()=>{const i=r.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:{...oa,...o.style},ref:a,defaultValue:t})});Vi.displayName=ag;function Wi(e){return e===""||e===void 0}function Ui(e){const t=pe(e),o=p.useRef(""),n=p.useRef(0),r=p.useCallback(s=>{const i=o.current+s;t(i),(function l(u){o.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=p.useCallback(()=>{o.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[o,r,a]}function ji(e,t,o){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let s=sg(e,Math.max(a,0));r.length===1&&(s=s.filter(u=>u!==o));const l=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==o?l:void 0}function sg(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var ig=wi,lg=xi,cg=Si,dg=Ci,ug=Ei,fg=Ni,pg=Ai,hg=Li,gg=zi,mg=$i,vg=Fi,bg=Bi,wg="Separator",Ri="horizontal",yg=["horizontal","vertical"],Gi=p.forwardRef((e,t)=>{const{decorative:o,orientation:n=Ri,...r}=e,a=xg(n)?n:Ri,i=o?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(K.div,{"data-orientation":a,...i,...r,ref:t})});Gi.displayName=wg;function xg(e){return yg.includes(e)}var kg=Gi,Lo="Switch",[Sg]=me(Lo),[Cg,Eg]=Sg(Lo),qi=p.forwardRef((e,t)=>{const{__scopeSwitch:o,name:n,checked:r,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,form:f,...c}=e,[h,g]=p.useState(null),b=se(t,k=>g(k)),m=p.useRef(!1),v=h?f||!!h.closest("form"):!0,[w,y]=He({prop:r,defaultProp:a??!1,onChange:u,caller:Lo});return d.jsxs(Cg,{scope:o,checked:w,disabled:i,children:[d.jsx(K.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":Zi(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:b,onClick:J(e.onClick,k=>{y(C=>!C),v&&(m.current=k.isPropagationStopped(),m.current||k.stopPropagation())})}),v&&d.jsx(Ki,{control:h,bubbles:!m.current,name:n,value:l,checked:w,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});qi.displayName=Lo;var Yi="SwitchThumb",Xi=p.forwardRef((e,t)=>{const{__scopeSwitch:o,...n}=e,r=Eg(Yi,o);return d.jsx(K.span,{"data-state":Zi(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:t})});Xi.displayName=Yi;var Ng="SwitchBubbleInput",Ki=p.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:n=!0,...r},a)=>{const s=p.useRef(null),i=se(s,a),l=lo(o),u=co(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:n});g.call(f,o),f.dispatchEvent(b)}},[l,o,n]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...r,tabIndex:-1,ref:i,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ki.displayName=Ng;function Zi(e){return e?"checked":"unchecked"}var Tg=qi,_g=Xi,zo="Tabs",[Pg]=me(zo,[So]),Ji=So(),[Ag,qn]=Pg(zo),Qi=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,onValueChange:r,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,f=$t(i),[c,h]=He({prop:n,onChange:r,defaultProp:a??"",caller:zo});return d.jsx(Ag,{scope:o,baseId:rt(),value:c,onValueChange:h,orientation:s,dir:f,activationMode:l,children:d.jsx(K.div,{dir:f,"data-orientation":s,...u,ref:t})})});Qi.displayName=zo;var el="TabsList",tl=p.forwardRef((e,t)=>{const{__scopeTabs:o,loop:n=!0,...r}=e,a=qn(el,o),s=Ji(o);return d.jsx(Fs,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:d.jsx(K.div,{role:"tablist","aria-orientation":a.orientation,...r,ref:t})})});tl.displayName=el;var ol="TabsTrigger",nl=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,disabled:r=!1,...a}=e,s=qn(ol,o),i=Ji(o),l=sl(s.baseId,n),u=il(s.baseId,n),f=n===s.value;return d.jsx(Bs,{asChild:!0,...i,focusable:!r,active:f,children:d.jsx(K.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...a,ref:t,onMouseDown:J(e.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?s.onValueChange(n):c.preventDefault()}),onKeyDown:J(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(n)}),onFocus:J(e.onFocus,()=>{const c=s.activationMode!=="manual";!f&&!r&&c&&s.onValueChange(n)})})})});nl.displayName=ol;var rl="TabsContent",al=p.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,forceMount:r,children:a,...s}=e,i=qn(rl,o),l=sl(i.baseId,n),u=il(i.baseId,n),f=n===i.value,c=p.useRef(f);return p.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Ee,{present:r||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})})});al.displayName=rl;function sl(e,t){return`${e}-trigger-${t}`}function il(e,t){return`${e}-content-${t}`}var Ig=Qi,Mg=tl,Og=nl,Lg=al,[Do]=me("Tooltip",[ko]),$o=ko(),ll="TooltipProvider",zg=700,Yn="tooltip.open",[Dg,Xn]=Do(ll),cl=e=>{const{__scopeTooltip:t,delayDuration:o=zg,skipDelayDuration:n=300,disableHoverableContent:r=!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(Dg,{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,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:p.useCallback(u=>{i.current=u},[]),disableHoverableContent:r,children:a})};cl.displayName=ll;var Wt="Tooltip",[$g,Ut]=Do(Wt),dl=e=>{const{__scopeTooltip:t,children:o,open:n,defaultOpen:r,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Xn(Wt,e.__scopeTooltip),u=$o(t),[f,c]=p.useState(null),h=rt(),g=p.useRef(0),b=s??l.disableHoverableContent,m=i??l.delayDuration,v=p.useRef(!1),[w,y]=He({prop:n,defaultProp:r??!1,onChange:T=>{T?(l.onOpen(),document.dispatchEvent(new CustomEvent(Yn))):l.onClose(),a==null||a(T)},caller:Wt}),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]),_=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(Ps,{...u,children:d.jsx($g,{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?_():(window.clearTimeout(g.current),g.current=0)},[_,b]),onOpen:C,onClose:_,disableHoverableContent:b,children:o})})};dl.displayName=Wt;var Kn="TooltipTrigger",ul=p.forwardRef((e,t)=>{const{__scopeTooltip:o,...n}=e,r=Ut(Kn,o),a=Xn(Kn,o),s=$o(o),i=p.useRef(null),l=se(t,i,r.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(As,{asChild:!0,...s,children:d.jsx(K.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...n,ref:l,onPointerMove:J(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:J(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:J(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:J(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:J(e.onBlur,r.onClose),onClick:J(e.onClick,r.onClose)})})});ul.displayName=Kn;var Zn="TooltipPortal",[Fg,Bg]=Do(Zn,{forceMount:void 0}),fl=e=>{const{__scopeTooltip:t,forceMount:o,children:n,container:r}=e,a=Ut(Zn,t);return d.jsx(Fg,{scope:t,forceMount:o,children:d.jsx(Ee,{present:o||a.open,children:d.jsx(sn,{asChild:!0,container:r,children:n})})})};fl.displayName=Zn;var Nt="TooltipContent",pl=p.forwardRef((e,t)=>{const o=Bg(Nt,e.__scopeTooltip),{forceMount:n=o.forceMount,side:r="top",...a}=e,s=Ut(Nt,e.__scopeTooltip);return d.jsx(Ee,{present:n||s.open,children:s.disableHoverableContent?d.jsx(hl,{side:r,...a,ref:t}):d.jsx(Hg,{side:r,...a,ref:t})})}),Hg=p.forwardRef((e,t)=>{const o=Ut(Nt,e.__scopeTooltip),n=Xn(Nt,e.__scopeTooltip),r=p.useRef(null),a=se(t,r),[s,i]=p.useState(null),{trigger:l,onClose:u}=o,f=r.current,{onPointerInTransitChange:c}=n,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=jg(w,v.getBoundingClientRect()),k=Rg(w,y),C=Gg(m.getBoundingClientRect()),_=Yg([...k,...C]);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=!qg(w,s);y?h():k&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,f,s,u,h]),d.jsx(hl,{...e,ref:a})}),[Vg,Wg]=Do(Wt,{isInside:!1}),Ug=qd("TooltipContent"),hl=p.forwardRef((e,t)=>{const{__scopeTooltip:o,children:n,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Ut(Nt,o),u=$o(o),{onClose:f}=l;return p.useEffect(()=>(document.addEventListener(Yn,f),()=>document.removeEventListener(Yn,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(nn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:d.jsxs(Is,{"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(Ug,{children:n}),d.jsx(Vg,{scope:o,isInside:!0,children:d.jsx(eu,{id:l.contentId,role:"tooltip",children:r||n})})]})})});pl.displayName=Nt;var gl="TooltipArrow",ml=p.forwardRef((e,t)=>{const{__scopeTooltip:o,...n}=e,r=$o(o);return Wg(gl,o).isInside?null:d.jsx(Ms,{...r,...n,ref:t})});ml.displayName=gl;function jg(e,t){const o=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(o,n,r,a)){case a:return"left";case r:return"right";case o:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Rg(e,t,o=5){const n=[];switch(t){case"top":n.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":n.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":n.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":n.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return n}function Gg(e){const{top:t,right:o,bottom:n,left:r}=e;return[{x:r,y:t},{x:o,y:t},{x:o,y:n},{x:r,y:n}]}function qg(e,t){const{x:o,y:n}=e;let r=!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>n!=h>n&&o<(c-u)*(n-f)/(h-f)+u&&(r=!r)}return r}function Yg(e){const t=e.slice();return t.sort((o,n)=>o.x<n.x?-1:o.x>n.x?1:o.y<n.y?-1:o.y>n.y?1:0),Xg(t)}function Xg(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const o=[];for(let n=e.length-1;n>=0;n--){const r=e[n];for(;o.length>=2;){const a=o[o.length-1],s=o[o.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))o.pop();else break}o.push(r)}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 Kg=cl,Zg=dl,Jg=ul,Qg=fl,em=pl,tm=ml;const om=Jt("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 vl({className:e,variant:t="default",size:o="default",asChild:n=!1,...r}){const a=n?ea:"button";return d.jsx(a,{"data-slot":"button","data-variant":t,"data-size":o,className:X(om({variant:t,size:o,className:e})),...r})}const nm={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"},rm=Jt("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 am({className:e,variant:t="default",hue:o,asChild:n=!1,...r}){const a=n?ea:"span",s=o?nm[o]:void 0;return d.jsx(a,{"data-slot":"badge","data-variant":t,className:X(rm({variant:t}),s,e),...r})}function sm({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 im({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 lm({...e}){return d.jsx(ig,{"data-slot":"select",...e})}function cm({...e}){return d.jsx(cg,{"data-slot":"select-value",...e})}function dm({className:e,size:t="default",children:o,...n}){return d.jsxs(lg,{"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),...n,children:[o,d.jsx(dg,{asChild:!0,children:d.jsx(xr,{className:"size-4 opacity-50"})})]})}function um({className:e,children:t,position:o="item-aligned",align:n="center",...r}){return d.jsx(ug,{children:d.jsxs(fg,{"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:n,...r,children:[d.jsx(pm,{}),d.jsx(pg,{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(hm,{})]})})}function fm({className:e,children:t,...o}){return d.jsxs(hg,{"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(mg,{children:d.jsx(yr,{className:"size-4"})})}),d.jsx(gg,{children:t})]})}function pm({className:e,...t}){return d.jsx(vg,{"data-slot":"select-scroll-up-button",className:X("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Bc,{className:"size-4"})})}function hm({className:e,...t}){return d.jsx(bg,{"data-slot":"select-scroll-down-button",className:X("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(xr,{className:"size-4"})})}function gm({className:e,...t}){return d.jsx(Ra,{"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(qa,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:d.jsx(yr,{className:"size-3.5"})})})}function mm({className:e,size:t="default",...o}){return d.jsx(Tg,{"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(_g,{"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 vm({className:e,...t}){return d.jsx(nh,{"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 bm({className:e,...t}){return d.jsx(xh,{"data-slot":"radio-group",className:X("grid gap-3",e),...t})}function wm({className:e,...t}){return d.jsx(kh,{"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(Sh,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(Vc,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function ym({className:e,orientation:t="horizontal",decorative:o=!0,...n}){return d.jsx(kg,{"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),...n})}function xm({className:e,orientation:t="horizontal",...o}){return d.jsx(Ig,{"data-slot":"tabs","data-orientation":t,orientation:t,className:X("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...o})}const km=Jt("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 Sm({className:e,variant:t="default",...o}){return d.jsx(Mg,{"data-slot":"tabs-list","data-variant":t,className:X(km({variant:t}),e),...o})}function Cm({className:e,...t}){return d.jsx(Og,{"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 Em({className:e,...t}){return d.jsx(Lg,{"data-slot":"tabs-content",className:X("flex-1 outline-none",e),...t})}function Nm({className:e,children:t,...o}){return d.jsxs(zh,{"data-slot":"scroll-area",className:X("relative",e),...o,children:[d.jsx(Dh,{"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(Tm,{}),d.jsx($h,{})]})}function Tm({className:e,orientation:t="vertical",...o}){return d.jsx(ci,{"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(pi,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Jn({className:e,size:t="default",...o}){return d.jsx(Tf,{"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 Qn({className:e,...t}){return d.jsx(_f,{"data-slot":"avatar-image",className:X("aspect-square size-full",e),...t})}function er({className:e,...t}){return d.jsx(Pf,{"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 _m({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:X("animate-pulse rounded-md bg-accent",e),...t})}function Pm({delayDuration:e=0,...t}){return d.jsx(Kg,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Am({...e}){return d.jsx(Zg,{"data-slot":"tooltip",...e})}function Im({...e}){return d.jsx(Jg,{"data-slot":"tooltip-trigger",...e})}function Mm({className:e,sideOffset:t=0,children:o,...n}){return d.jsx(Qg,{children:d.jsxs(em,{"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),...n,children:[o,d.jsx(tm,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function Om({className:e,value:t,...o}){return d.jsx(dh,{"data-slot":"progress",className:X("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...o,children:d.jsx(uh,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const Lm=Jt("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 zm({className:e,variant:t,...o}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:X(Lm({variant:t}),e),...o})}function Dm({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 $m({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 Fm({...e}){return d.jsx(pu,{"data-slot":"collapsible",...e})}function Bm({...e}){return d.jsx(ia,{"data-slot":"collapsible-trigger",...e})}function Hm({...e}){return d.jsx(la,{"data-slot":"collapsible-content",...e})}const Tt=e=>e==null?void 0:e===!0||e==="true",bl={"arrow-left":Lc,calendar:$c,"check-circle-2":Sr,"chevron-left":Fc,"chevron-right":Ro,clock:Wc,"credit-card":jc,"external-link":Rc,"help-circle":Cr,info:Yt,"loader-2":Go,mail:qo,"map-pin":qc,"message-circle":Er,"message-square":Yo,package:Xc,phone:Kc,search:Jc,"shopping-bag":Qc,sparkles:Nr,truck:td,user:Tr,"x-circle":Hc,"alert-circle":kr,"book-open":zc},wl={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"},yl={default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive"},xl=e=>typeof e=="number"?wl[String(e)]??"gap-2":typeof e=="string"?wl[e.trim()]??"gap-2":"gap-2",Vm=({children:e,className:t,onClick:o})=>d.jsx(Lt,{className:t,onClick:o,children:e}),Wm=({children:e,className:t})=>d.jsx(zt,{className:t,children:e}),Um=({children:e,className:t})=>d.jsx(Rd,{className:t,children:e}),jm=({children:e,className:t,onClick:o,variant:n,size:r,disabled:a,title:s})=>d.jsx(vl,{className:t,variant:n,size:r,onClick:o,disabled:Tt(a),title:s,children:e}),Rm=({children:e,className:t,variant:o,hue:n,tone:r})=>d.jsx(am,{className:X(yl[r]??"",t),variant:o,hue:n,children:e}),Gm=({className:e,onChange:t,...o})=>d.jsx(sm,{className:e,onChange:t,...o}),qm=({className:e,onChange:t,...o})=>d.jsx(im,{className:e,onChange:t,...o}),Ym=({children:e,className:t,value:o,defaultValue:n,onChange:r,placeholder:a,disabled:s})=>d.jsxs(lm,{value:o,defaultValue:n,onValueChange:i=>{const l=r;l==null||l({target:{value:i}})},disabled:Tt(s),children:[d.jsx(dm,{className:t,children:d.jsx(cm,{placeholder:a})}),d.jsx(um,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),Xm=({children:e,value:t,disabled:o,className:n})=>d.jsx(fm,{value:t,disabled:Tt(o),className:n,children:e}),Km=({checked:e,onChange:t,disabled:o,className:n,id:r})=>{const a=e!==void 0,s=t;return d.jsx(gm,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:Tt(o),className:n,id:r})},Zm=({checked:e,onChange:t,disabled:o,size:n,className:r,id:a})=>{const s=e!==void 0,i=t;return d.jsx(mm,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:Tt(o),size:n,className:r,id:a})},Jm=({children:e,htmlFor:t,className:o})=>d.jsx(vm,{htmlFor:t,className:o,children:e}),Qm=({children:e,value:t,defaultValue:o,onChange:n,className:r})=>d.jsx(bm,{value:t,defaultValue:o,onValueChange:a=>{const s=n;s==null||s({target:{value:a}})},className:r,children:e}),ev=({value:e,disabled:t,className:o,id:n})=>d.jsx(wm,{value:e,disabled:Tt(t),className:o,id:n}),tv=({className:e})=>d.jsx(ym,{className:e}),ov=({children:e,defaultValue:t,className:o})=>{const[n,r]=x.useState(t);return d.jsx(xm,{value:n,onValueChange:r,className:o,children:e})},nv=({children:e,className:t})=>d.jsx(Sm,{className:t,children:e}),rv=({children:e,value:t,className:o})=>d.jsx(Cm,{className:o,value:t,children:e}),av=({children:e,value:t,className:o})=>d.jsx(Em,{className:o,value:t,children:e}),sv=({children:e,className:t})=>d.jsx(Nm,{className:t,children:e}),iv=({src:e,alt:t,className:o})=>{var n;return d.jsxs(Jn,{className:o,children:[d.jsx(Qn,{src:e,alt:t}),d.jsx(er,{children:((n=t==null?void 0:t.charAt(0))==null?void 0:n.toUpperCase())||"?"})]})},lv=({width:e,height:t,className:o})=>d.jsx(_m,{className:o,style:{width:e,height:t}}),cv=({children:e,content:t,className:o})=>d.jsx(Pm,{children:d.jsxs(Am,{children:[d.jsx(Im,{asChild:!0,children:d.jsx("span",{className:o,children:e})}),d.jsx(Mm,{children:d.jsx("p",{children:String(t)})})]})}),dv=({value:e,className:t})=>d.jsx(Om,{value:typeof e=="string"?Number(e):e,className:t}),uv={default:Yt,destructive:kr},fv=({children:e,variant:t,title:o,className:n})=>{const r=t,a=uv[r||"default"]||Yt;return d.jsxs(zm,{variant:r,className:n,children:[d.jsx(a,{className:"size-4"}),o?d.jsx(Dm,{children:String(o)}):null,e?d.jsx($m,{children:e}):null]})},pv=({children:e,defaultOpen:t,className:o})=>d.jsx(Fm,{defaultOpen:t==="true"||t===!0,className:o,children:e}),hv=({children:e,className:t})=>d.jsxs(Bm,{className:X("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[d.jsx(Ro,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),gv=({children:e,className:t})=>d.jsx(Hm,{className:t,children:e}),mv=({children:e,className:t,tone:o})=>d.jsx("p",{className:X("text-sm",yl[o]??"",t),children:e}),vv=({children:e,className:t,level:o})=>{const n=`h${o||"2"}`;return d.jsx(n,{className:X("font-semibold tracking-tight",t),children:e})},bv=({children:e,className:t,direction:o,gap:n})=>{const r=o==="row"?"flex-row":"flex-col",a=xl(n);return d.jsx("div",{className:X("flex",r,a,t),children:e})},wv=({children:e,className:t,gap:o})=>{const n=xl(o);return d.jsx("div",{className:X("flex flex-row items-center",n,t),children:e})},yv=({children:e,className:t,href:o,target:n,rel:r})=>d.jsx("a",{href:o,target:n,rel:r,className:t,children:e}),xv=({title:e,children:t,className:o})=>d.jsxs(Lt,{className:X("overflow-hidden p-0 gap-0 shadow-sm",o),children:[e?d.jsx(zt,{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})]}),kv=({icon:e,label:t,description:o,onClick:n,className:r})=>{const a=e,s="size-5",i=a?bl[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",r),onClick:n,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(Ro,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},Sv=({name:e,size:t,className:o})=>{const r={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=bl[a],i=a==="sparkles"?"sparkle-icon":"";return s?d.jsx(s,{className:X(r,i,o)}):d.jsx("span",{className:X("inline-block",r,i,o),"data-icon":a})},Cv=()=>({"ui-card":Vm,"ui-card-content":Wm,"ui-card-header":Um,"ui-button":jm,"ui-text":mv,"ui-heading":vv,"ui-badge":Rm,"ui-input":Gm,"ui-textarea":qm,"ui-select":Ym,"ui-select-option":Xm,"ui-checkbox":Km,"ui-switch":Zm,"ui-label":Jm,"ui-radio-group":Qm,"ui-radio-group-item":ev,"ui-stack":bv,"ui-inline":wv,"ui-separator":tv,"ui-tabs":ov,"ui-tabs-list":nv,"ui-tabs-trigger":rv,"ui-tabs-content":av,"ui-scroll-area":sv,"ui-avatar":iv,"ui-icon":Sv,"ui-link":yv,"ui-menu-item":kv,"ui-menu":xv,"ui-skeleton":lv,"ui-tooltip":cv,"ui-progress":dv,"ui-alert":fv,"ui-collapsible":pv,"ui-collapsible-trigger":hv,"ui-collapsible-content":gv}),kl="/api/ecommerce",Sl=async(e,t)=>{const o=t?`${t.replace(/\/$/,"")}${kl}`:kl,n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await n.json();if(!n.ok)throw new Error(r.error||"API request failed");return r.data},Ev=({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)"})})]}),Cl="stackable-dev-badge-styles",Nv=()=>{if(typeof document>"u"||document.getElementById(Cl))return;const e=document.createElement("style");e.id=Cl,e.textContent=`
291
291
  @keyframes stackable-icon-wiggle {
292
292
  0% { transform: rotate(0deg); }
293
293
  70% { transform: rotate(200deg); }
294
294
  85% { transform: rotate(175deg); }
295
295
  100% { transform: rotate(180deg); }
296
296
  }
297
- `,document.head.appendChild(e)},Tv=e=>{const t=e.some(n=>n.mode==="staging"),o=e.some(n=>n.mode==="dev");return t&&o?"Dev + Staging":t?"Staging Mode":"Dev Mode"},_v=e=>e.mode==="staging"?"STAGING":"DEV",Pv=({className:e="",extensions:t=[],tokenErrors:o=new Map})=>{const[n,r]=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(()=>{Nv()},[]),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=mr(window.location.search);r(v)};b();const m=()=>b();return window.addEventListener("popstate",m),()=>window.removeEventListener("popstate",m)},[]),n.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:n.map((b,m)=>{var v;return d.jsxs("div",{style:{padding:"8px 12px",borderBottom:m<n.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:_v(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(Ev,{className:"w-6 h-6"})}),d.jsx("span",{children:Tv(n)}),d.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",n.length," extension",n.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"})]})]})},Av=800,jt=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,Iv=async(e,t,o,n,r)=>{const a=new Map,s=new Map;return await Promise.all(e.filter(i=>{var l;return i.manifest.permissions.includes("data:fetch")||(((l=i.manifest.settingsSchema)==null?void 0:l.length)??0)>0}).map(async i=>{const l=r.find(g=>g.extensionId===i.id),u=l==null?void 0:l.token,f=l==null?void 0:l.mode,c=jt(t,"/proxy-token"),h=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:o,instanceId:n,extensionId:i.id,...f&&{mode:f},...u&&{devSessionToken:u}})});if(h.ok){const{token:g,encryptionKey:b,settings:m}=await h.json();a.set(i.id,{token:g,encryptionKey:b,settings:m})}else{let g=`Proxy token failed (${h.status})`;f&&!u?g="Session token missing — re-run CLI":f&&(g="Session expired or invalid — re-run CLI"),s.set(i.id,g),console.warn(`[embeddables] Failed to obtain proxy token for extension ${i.id} (${h.status}) — ${g}`)}})),{tokens:a,errors:s}},Mv=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),Ov=({instanceId:e,queryApiBase:t,apiBase:o,appId:n,children:r,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,_]=x.useState(void 0);x.useEffect(()=>{window.stackable||(window.stackable={emit:(N,S={})=>{const[M,...F]=N.split(":"),A=F.join(":");window.dispatchEvent(new CustomEvent(`stackable:${M}`,{detail:{eventName:A,data:S}}))}})},[]);const P=x.useRef(null),T=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 S=e;try{if(!S){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),u([]),w(!0);return}if(!o||!n){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),u([]),w(!0);return}const M=await fetch(jt(o,`/instances/${n}/${S}`));if(!M.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${S}`),u([]),w(!0);return}const F=await M.json(),A=mr(typeof window<"u"?window.location.search:""),$=await Tc(F,A),{tokens:H,errors:Z}=await Iv($,o,n,S,A);u($),c(A),g(new Map(H)),m(Z)}catch(M){console.error("Failed to load extensions:",M)}finally{w(!0)}})()},[e,n,o]),x.useEffect(()=>{if(!o||!n||l.length===0)return;const S=setInterval(async()=>{const M=[];await Promise.all(l.filter(F=>{var A;return F.manifest.permissions.includes("data:fetch")||(((A=F.manifest.settingsSchema)==null?void 0:A.length)??0)>0}).map(async F=>{const A=f.find(q=>q.extensionId===F.id),$=A==null?void 0:A.token,H=A==null?void 0:A.mode,Z=jt(o,"/proxy-token"),G=await fetch(Z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:n,instanceId:e,extensionId:F.id,...H&&{mode:H},...$&&{devSessionToken:$}})});if(G.ok){const{token:q,encryptionKey:Q,settings:ee}=await G.json();M.push([F.id,{token:q,encryptionKey:Q,settings:ee}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${F.id} (${G.status}) — using stale token`)})),M.length>0&&g(F=>{const A=new Map(F);for(const[$,H]of M)A.set($,H);return A})},3300*1e3);return()=>clearInterval(S)},[l,f,o,n,e]),x.useEffect(()=>{if(h.size===0)return;const N=S=>{const M=S.data;if((M==null?void 0:M.type)!=="extension-ready")return;const F=M.extensionId,A=l.find(Z=>Z.id===F);if(!(A!=null&&A.bundleUrl))return;const $=f.find(Z=>Z.extensionId===F);if(Cc(A.bundleUrl)&&($==null?void 0:$.mode)!=="staging")return;const H=h.get(F);H&&Me(F,{type:"extension-encryption-key",encryptionKey:H.encryptionKey})};return window.addEventListener("message",N),()=>window.removeEventListener("message",N)},[l,f,h]);const z=x.useCallback((N,S)=>{const M=ft();for(const[F,A]of M){if(!A.manifest.permissions.includes("events:identity"))continue;const $=A.manifest.events??[];!$.includes("identity")&&!$.includes(`identity:${N}`)||Me(F,{type:"extension-event",eventType:"identity",payload:{eventName:N,data:{state:S,timestamp:Uo(new Date().toISOString())}}})}},[]),j=x.useCallback(N=>{const S=ft();for(const[M,F]of S){if(!F.manifest.permissions.includes("events:messaging"))continue;const A=F.manifest.events??[];!A.includes("messaging")&&!A.includes("messaging:postback")&&!A.includes(`messaging:postback:${N.data.actionName}`)||Me(M,{type:"extension-event",eventType:"messaging",payload:N})}},[]),O=x.useCallback(N=>{const S=ft();for(const[M,F]of S){if(!F.manifest.permissions.includes("events:activity"))continue;const A=F.manifest.events??[];!A.includes("activity")&&!A.includes(`activity:${N.eventName}`)||Me(M,{type:"extension-event",eventType:"activity",payload:N})}},[]),B=x.useCallback(async N=>{const S=ft(),M=[];for(const[A,$]of S){if(!$.manifest.permissions.includes("extend:identity"))continue;const H=new Promise(Z=>{const G=`enrich_${A}_${Date.now()}`,q=Q=>{const ee=Q.data;(ee==null?void 0:ee.type)!=="extend-identity-response"||ee.id!==G||(window.removeEventListener("message",q),ee.additionalClaims?Z(ee.additionalClaims):Z({}))};window.addEventListener("message",q),setTimeout(()=>{window.removeEventListener("message",q),Z({})},5e3),Me(A,{type:"extend-identity-request",id:G,claims:N})});M.push(H)}if(M.length===0)return{};const F=await Promise.all(M);return Object.assign({},...F)},[]),V=x.useCallback(async N=>{if(!o||!n||!e)return console.warn("[embeddables] signIdentity skipped — missing:",{apiBase:!!o,appId:!!n,instanceId:!!e}),null;const S=jt(o,`/instances/${n}/${e}/identity`);console.log("[embeddables] Calling identity sign:",{url:S,claims:Object.keys(N)});try{const M=await fetch(S,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)});if(!M.ok)return console.warn(`[embeddables] Identity sign failed (${M.status})`),null;const{token:F}=await M.json();return F}catch(M){return console.warn("[embeddables] Identity sign request failed:",M),null}},[o,n,e]),L=x.useCallback(N=>{const S=window.zE;S&&S("messenger","loginUser",async M=>{M(N)})},[]),Y=x.useCallback(()=>{const N=window.zE;N&&N("messenger","logoutUser")},[]),I=x.useCallback(N=>{console.log("[embeddables] Running sign lifecycle for user:",N.id);const{email:S,name:M}=N,F={external_id:String(N.id)};(async()=>{const A=await B({...F,email:S,name:M});console.log("[embeddables] Enriched claims:",A);const $=await V({...F,...A,email:S,name:M});console.log("[embeddables] Sign result:",{hasToken:!!$}),$&&L($)})()},[B,V,L]),D=x.useCallback(N=>{if(E.length>0&&T.current.size<E.length){console.log(`[embeddables] Deferring sign lifecycle — waiting for extend:identity extensions: ${T.current.size}/${E.length} ready`),P.current=N;return}console.log("[embeddables] No extend:identity extensions (or all ready) — signing immediately"),I(N)},[E,I]);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(S=>{var M,F;return S.authenticated&&((M=S.user)==null?void 0:M.id)===((F=N.user)==null?void 0:F.id)?S:(console.log("[embeddables] Identity state changed (props), starting sign lifecycle"),D(N.user),z("login",N),N)})}else{if(a===void 0)return;k(N=>N.authenticated?(console.log("[embeddables] Customer props cleared, logging out"),Y(),z("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):N)}},[v,a,s,i,E,D,z,Y]),x.useEffect(()=>{if(!v||a!==void 0)return;const N=()=>{const M=document.getElementById("stackable-identity");if(M)try{const F=JSON.parse(M.textContent??"{}"),A={authenticated:!0,user:{id:String(F.customerId??""),email:F.customerEmail,name:F.customerName,provider:"shopify"}};k($=>{var H,Z;return $.authenticated&&((H=$.user)==null?void 0:H.id)===((Z=A.user)==null?void 0:Z.id)?$:(console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"),D(A.user),z("login",A),A)})}catch{console.warn("[embeddables] Failed to parse #stackable-identity JSON")}else k(F=>F.authenticated?(Y(),z("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):F)};N();const S=new MutationObserver(N);return S.observe(document.head,{childList:!0,subtree:!0}),S.observe(document.body,{childList:!0,subtree:!0}),()=>S.disconnect()},[v,a,D,z,Y]),x.useEffect(()=>{if(!y.authenticated)return;const N=S=>{const M=S.data;if((M==null?void 0:M.type)!=="extension-ready")return;const F=M.extensionId,A=l.find(H=>H.id===F);if(!(A!=null&&A.manifest.permissions.includes("events:identity")))return;const $=A.manifest.events??[];!$.includes("identity")&&!$.includes("identity:login")||Me(F,{type:"extension-event",eventType:"identity",payload:{eventName:"login",data:{state:y,timestamp:Uo(new Date().toISOString())}}})};return window.addEventListener("message",N),()=>window.removeEventListener("message",N)},[y,l]),x.useEffect(()=>{if(E.length===0)return;const N=M=>{const F=M.data;if((F==null?void 0:F.type)!=="extension-ready")return;const A=F.extensionId;if(E.includes(A)&&(T.current.add(A),console.log(`[embeddables] extend:identity extension ready: ${A} (${T.current.size}/${E.length})`),T.current.size>=E.length&&P.current)){console.log("[embeddables] All extend:identity extensions ready, running deferred sign lifecycle");const $=P.current;P.current=null,I($)}};window.addEventListener("message",N);const S=setTimeout(()=>{if(P.current){console.warn(`[embeddables] extend:identity timeout (5s) — signing with ${T.current.size}/${E.length} extensions ready`);const M=P.current;P.current=null,I(M)}},5e3);return()=>{window.removeEventListener("message",N),clearTimeout(S)}},[E,I]),x.useEffect(()=>{const N=S=>{const{detail:M}=S;M!=null&&M.eventName&&(M.eventName==="postback"?j({eventName:"postback",data:{actionName:M.data.actionName,conversationId:M.data.conversationId??"",timestamp:Uo(new Date().toISOString())}}):M.eventName==="context"&&_(F=>({...F,...M.data})))};return window.addEventListener("stackable:messaging",N),()=>window.removeEventListener("stackable:messaging",N)},[j]),x.useEffect(()=>{const N=S=>{const{detail:M}=S;M!=null&&M.eventName&&O({eventName:M.eventName,data:M.data??{}})};return window.addEventListener("stackable:activity",N),()=>window.removeEventListener("stackable:activity",N)},[O]),x.useEffect(()=>{var M;if(!v)return;const N={customerId:a??"",customerEmail:s??"",customerName:i??"",messaging:C,identity:y},S=ft();for(const[F,A]of S){if(!A.manifest.permissions.includes("context:read"))continue;const $=(M=h.get(F))==null?void 0:M.settings,H=$?{...N,settings:$}:N;Me(F,{type:"context-push",context:H})}},[v,a,s,i,y,C,h]);const R=x.useMemo(()=>({"data.query":async N=>kl(N,t),"data.fetch":async(N,S)=>{const M=h.get(N);if(!M)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const F=Mv(S)?S:{url:S.url,method:S.method??"GET",headers:S.headers??{},body:S.body??null},A=jt(o,"/proxy"),$=await fetch(A,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":N,"X-Application-Id":n??"",Authorization:`Bearer ${M.token}`},body:JSON.stringify(F)}),H=await $.json();return{status:H.status??$.status,ok:H.ok??$.ok,data:H.data}},"actions.toast":async(N,S)=>{const M={...S.description&&{description:S.description},...S.duration&&{duration:S.duration},...S.position&&{position:S.position},...S.dismissible!=null&&{dismissible:S.dismissible},...S.closeButton!=null&&{closeButton:S.closeButton}};if(S.fetch){const F=$=>new Promise(H=>setTimeout(H,$)),A=Promise.all([R["data.fetch"](N,S.fetch),F(Av)]).then(([$])=>$);gt.promise(A,{loading:S.loading??S.message,success:S.success??S.message,error:S.error??"Something went wrong",...M});return}switch(S.type){case"success":{gt.success(S.message,M);break}case"error":{gt.error(S.message,M);break}case"warning":{gt.warning(S.message,M);break}case"info":{gt.info(S.message,M);break}default:gt(S.message,M)}},"actions.invoke":async N=>(window.dispatchEvent(new CustomEvent(`stackable:action:${N.action}`,{detail:N})),{success:!0}),"context.read":async N=>{var S;return{customerId:a??"",customerEmail:s??"",customerName:i??"",identity:y,messaging:C,...((S=h.get(N))==null?void 0:S.settings)&&{settings:h.get(N).settings}}}}),[o,n,t,a,s,i,h,y,C]);return v?d.jsxs(d.Fragment,{children:[d.jsx(Rl,{extensions:l,capabilityHandlers:R,components:Cv(),children:r}),d.jsx(Pv,{extensions:l,tokenErrors:b})]}):null};var Lv=(e,t,o,n,r,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?r.map(w=>a[w]||w):r;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(n)f(n);else try{let g=localStorage.getItem(t)||o,b=s&&g==="system"?h():g;f(b)}catch{}},zv=p.createContext(void 0),Dv={setTheme:e=>{},themes:[]},$v=()=>{var e;return(e=p.useContext(zv))!=null?e:Dv};p.memo(({forcedTheme:e,storageKey:t,attribute:o,enableSystem:n,enableColorScheme:r,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:u})=>{let f=JSON.stringify([o,t,a,e,i,s,n,r]).slice(1,-1);return p.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${Lv.toString()})(${f})`}})});const Fv=({...e})=>{const{theme:t="system"}=$v();return d.jsx(Sc,{theme:t,className:"toaster group",icons:{success:d.jsx(kr,{className:"size-4"}),info:d.jsx(Yt,{className:"size-4"}),warning:d.jsx(ed,{className:"size-4"}),error:d.jsx(Yc,{className:"size-4"}),loading:d.jsx(Go,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},Bv={dark:"dark",light:"widget-theme-light"},Hv={dark:"dark",light:"light"},Vv=({children:e,theme:t="inherit"})=>d.jsxs("div",{"data-id":"widget-body",className:Bv[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(Fv,{position:"bottom-center",theme:Hv[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Wv={airplay:Oc,"message-circle":Cr,"message-square":Yo,headphones:Gc,"help-circle":Sr,bot:Dc,sparkles:Er,zap:od},Uv=({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)"})}),jv=({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"})})]})]}),Cl=400,Rv=Cl*.35,Gv=({icon:e,isOpen:t,onClick:o})=>{const n=Wv[e]??Uv,[r,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"),Rv);return()=>clearTimeout(l)},[t]);const i=()=>r==="interstitial"?d.jsx(jv,{}):t?d.jsx(Uc,{}):d.jsx(n,{});return d.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:d.jsx(ml,{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:`${Cl}ms`},children:i()})})})},qv=({children:e,icon:t,theme:o})=>{const[n,r]=x.useState(!1),[a,s]=x.useState(!0),[i,l]=x.useState(!1),u=x.useCallback(()=>{r(f=>!f)},[]);return x.useEffect(()=>{n&&!i&&l(!0)},[n,i]),x.useEffect(()=>{const f=()=>r(m=>!m),c=()=>r(!0),h=()=>r(!1),g=()=>s(!0),b=()=>{r(!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(Gv,{isOpen:n,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",n?"opacity-100 scale-100 translate-y-0 pointer-events-auto":"opacity-0 scale-95 translate-y-2 pointer-events-none"),children:d.jsx(Vv,{theme:o,children:e})})]})},Yv=({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}),Xv=(e,t)=>{const[o,n]=x.useState(null),[r,a]=x.useState(!1),[s,i]=x.useState(null);return x.useEffect(()=>{if(!e){n(null);return}(async()=>{a(!0),i(null);try{const u=await kl({action:"getCustomer",customerId:e},t);n(u)}catch(u){i(u)}finally{a(!1)}})()},[e,t]),{customer:o,loading:r,error:s}},Kv=({customerId:e,customerEmail:t,queryApiBase:o,children:n})=>{var l,u;const{customer:r,loading:a,error:s}=Xv(e,o);if(a)return d.jsx(Lt,{className:"border-none shadow-none bg-transparent",children:d.jsx(zt,{className:"flex items-center justify-center p-6",children:d.jsx(Go,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!r){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(Lt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsxs(zt,{className:"p-4 pb-0 pt-2",children:[d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Jn,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Qn,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(f)}&background=7c3aed&color=fff&size=128`,alt:f}),d.jsx(er,{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(qo,{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:n})]})]}),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=r.first_name)==null?void 0:l[0])||""}${((u=r.last_name)==null?void 0:u[0])||""}`;return d.jsx(Lt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsx(zt,{className:"p-4 pb-0 pt-2",children:d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Jn,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Qn,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(r.name)}&background=7c3aed&color=fff&size=128`,alt:r.name}),d.jsx(er,{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:r.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(qo,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:r.email})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:n})]})]})})})},El=(e,t)=>{x.useEffect(()=>{const o=t.current;if(!o)return;let n=document.getElementById(e);n||(n=document.createElement("div"),n.id=e,n.style.cssText="position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;",document.body.appendChild(n));const r=new MutationObserver(()=>{for(;n.firstChild;)o.appendChild(document.adoptNode(n.firstChild))});return r.observe(n,{childList:!0,subtree:!0}),()=>{r.disconnect(),n==null||n.remove()}},[e,t])},Zv=({customization:e})=>{const t=x.useRef(null);return El("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"})},Jv=({customization:e})=>{const t=x.useRef(null);return El("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"})},_t="stackable:action",tr=e=>{window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"context",data:e}}))},or=25,nr=75,Qv=({header:e,buttons:t,queryApiBase:o,customerId:n="",customerEmail:r="",primaryPercent:a=50})=>{const s=Math.max(or,Math.min(nr,a)),{extensions:i}=ur(),l=x.useMemo(()=>i.some(O=>O.enabled&&(O.manifest.targets.includes("slot.header")||O.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 Y,I;const O=document.querySelector('script[src*="zdassets.com/ekr/snippet"]'),B=(I=(Y=O==null?void 0:O.src)==null?void 0:Y.match(/key=([a-f0-9-]+)/))==null?void 0:I[1];if(B&&fetch(`https://ekr.zdassets.com/compose/${B}`).then(D=>D.text()).then(D=>{var N;const R=(N=D.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/))==null?void 0:N[1];R&&tr({appId:R})}).catch(()=>{}),C()){y("ready");return}const V=setInterval(()=>{C()&&(y("ready"),clearInterval(V))},100),L=setTimeout(()=>{clearInterval(V),y(D=>D==="ready"?D:(console.warn("Zendesk widget failed to load after 10 seconds"),"error"))},1e4);return()=>{clearInterval(V),clearTimeout(L)}},[C]);const _=x.useCallback(O=>{!window.zE||!O.length||(console.log("[ZendeskMessenger] setConversationTags",O,{zE:!!window.zE}),window.zE("messenger:set","conversationTags",O))},[]),P=x.useCallback(O=>{!window.zE||!O.length||(console.log("[ZendeskMessenger] setConversationFields",O,{zE:!!window.zE}),window.zE("messenger:set","conversationFields",O))},[]),T=x.useCallback(O=>{if(!window.zE)return;const{tags:B=[],fields:V=[],...L}=O??{};_(B),P(V),window.zE("messenger:ui","newConversation",Object.keys(L).length?L:void 0)},[_,P]),E=x.useCallback(O=>{const{detail:B}=O;B!=null&&B.payload&&T(B.payload)},[T]);x.useEffect(()=>(window.addEventListener(`${_t}:${ht.NEW_CONVERSATION}`,E),()=>{window.removeEventListener(`${_t}:${ht.NEW_CONVERSATION}`,E)}),[E]),x.useEffect(()=>{const O=V=>{const{detail:L}=V;L!=null&&L.payload&&_(L.payload)},B=V=>{const{detail:L}=V;L!=null&&L.payload&&P(L.payload)};return window.addEventListener(`${_t}:${ht.SET_CONVERSATION_TAGS}`,O),window.addEventListener(`${_t}:${ht.SET_CONVERSATION_FIELDS}`,B),()=>{window.removeEventListener(`${_t}:${ht.SET_CONVERSATION_TAGS}`,O),window.removeEventListener(`${_t}:${ht.SET_CONVERSATION_FIELDS}`,B)}},[_,P]),x.useEffect(()=>{if(w!=="ready"||!window.zE)return;const O=window.zE("messenger:on","conversationStarted",L=>{var I,D;const Y=(D=(I=L==null?void 0:L.payload)==null?void 0:I.conversation)==null?void 0:D.id;Y&&tr({conversationId:Y})}),B=window.zE("messenger:on","messagesShown",L=>{var I,D;const Y=(D=(I=L==null?void 0:L.payload)==null?void 0:I.conversation)==null?void 0:D.id;Y&&tr({conversationId:Y})}),V=window.zE("messenger:on","postbackButtonClicked",L=>{var I;const Y=L==null?void 0:L.payload;Y!=null&&Y.actionName&&window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"postback",data:{actionName:Y.actionName,conversationId:((I=Y.conversation)==null?void 0:I.id)??""}}}))});return()=>{typeof O=="function"&&O(),typeof B=="function"&&B(),typeof V=="function"&&V()}},[w]),x.useEffect(()=>{if(!u)return;const O=V=>{if(!k.current)return;const L=k.current.getBoundingClientRect();if((c?L.width:L.height)===0)return;const I=c?(V.clientX-L.left)/L.width*100:(V.clientY-L.top)/L.height*100,D=Math.max(or,Math.min(nr,I));v(D)},B=()=>{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",O),window.addEventListener("mouseup",B),window.addEventListener("blur",B),()=>{window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",B),window.removeEventListener("blur",B),document.body.style.cursor="",document.body.style.userSelect=""}},[u,c]),x.useEffect(()=>{if(!k.current)return;const O=k.current,B=()=>{const L=getComputedStyle(O).flexDirection==="row";h(L)};B();const V=new ResizeObserver(B);return V.observe(O),()=>{V.disconnect()}},[]);const z=x.useCallback(O=>{if(O.detail===2){v(s);return}O.preventDefault(),f(!0)},[s]),j={customerId:n,customerEmail:r};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(Zc,{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(Yo,{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(Nr,{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(Kv,{customerId:n,customerEmail:r,queryApiBase:o,children:d.jsx(Gt,{target:"slot.header",context:j,className:"flex-none"})}),d.jsx(Gt,{target:"slot.content",context:j,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(Zv,{})})]})]}),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(Jv,{})}),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(Gt,{target:"slot.footer",context:j,className:"flex items-center gap-1",fallback:d.jsxs(d.Fragment,{children:[d.jsx("div",{children:"powered by"}),d.jsx(Yv,{href:"https://zendesk.com",children:"Zendesk"})]})}),d.jsx(Gt,{target:"slot.footer-links",context:j,className:"flex items-center gap-1",separator:d.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:O,index:B})=>d.jsxs(d.Fragment,{children:[B===0&&d.jsx("span",{className:"text-zinc-300",children:"+"}),O]})})]})]}),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:z,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":or,"aria-valuemax":nr,"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)})]})]})]})},eb="ze-snippet",Nl=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,tb=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:o=!1,scriptId:n=eb}=t;window.zEMessenger={autorender:o};const r=document.getElementById(n);if(r){if(r.getAttribute("src")===Nl(e))return Promise.resolve();r.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=n,i.src=Nl(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},ob=({queryApiBase:e,apiBase:t,appId:o,theme:n,icon:r,instanceId:a,customerId:s,customerEmail:i,customerName:l,snippetKey:u})=>{const f=n==="dark"||n==="light"?n:"inherit";return x.useEffect(()=>{u&&tb(u).catch(c=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",c)})},[u]),d.jsx(Ov,{instanceId:a,queryApiBase:e,apiBase:t,appId:o,customerId:s,customerEmail:i,customerName:l,children:d.jsx(qv,{theme:f,icon:r,children:d.jsx(Qv,{queryApiBase:e,customerId:s,customerEmail:i,primaryPercent:40})})})};class nb extends HTMLElement{constructor(){super();sr(this,"mountNode");sr(this,"root");const o=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Ll,o.appendChild(n),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(ob,{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",nb)}));
297
+ `,document.head.appendChild(e)},Tv=e=>{const t=e.some(n=>n.mode==="staging"),o=e.some(n=>n.mode==="dev");return t&&o?"Dev + Staging":t?"Staging Mode":"Dev Mode"},_v=e=>e.mode==="staging"?"STAGING":"DEV",Pv=({className:e="",extensions:t=[],tokenErrors:o=new Map})=>{const[n,r]=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(()=>{Nv()},[]),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=vr(window.location.search);r(v)};b();const m=()=>b();return window.addEventListener("popstate",m),()=>window.removeEventListener("popstate",m)},[]),n.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:n.map((b,m)=>{var v;return d.jsxs("div",{style:{padding:"8px 12px",borderBottom:m<n.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:_v(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(Ev,{className:"w-6 h-6"})}),d.jsx("span",{children:Tv(n)}),d.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",n.length," extension",n.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"})]})]})},Av=800,jt=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,Iv=async(e,t,o,n,r)=>{const a=new Map,s=new Map;return await Promise.all(e.filter(i=>{var l;return i.manifest.permissions.includes("data:fetch")||(((l=i.manifest.settingsSchema)==null?void 0:l.length)??0)>0}).map(async i=>{const l=r.find(g=>g.extensionId===i.id),u=l==null?void 0:l.token,f=l==null?void 0:l.mode,c=jt(t,"/proxy-token"),h=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:o,instanceId:n,extensionId:i.id,...f&&{mode:f},...u&&{devSessionToken:u}})});if(h.ok){const{token:g,encryptionKey:b,settings:m}=await h.json();a.set(i.id,{token:g,encryptionKey:b,settings:m})}else{let g=`Proxy token failed (${h.status})`;f&&!u?g="Session token missing — re-run CLI":f&&(g="Session expired or invalid — re-run CLI"),s.set(i.id,g),console.warn(`[embeddables] Failed to obtain proxy token for extension ${i.id} (${h.status}) — ${g}`)}})),{tokens:a,errors:s}},Mv=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),Ov=({instanceId:e,queryApiBase:t,apiBase:o,appId:n,children:r,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,_]=x.useState(void 0);x.useEffect(()=>{window.stackable||(window.stackable={emit:(N,S={})=>{const[M,...F]=N.split(":"),A=F.join(":");window.dispatchEvent(new CustomEvent(`stackable:${M}`,{detail:{eventName:A,data:S}}))}})},[]);const P=x.useRef(null),T=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 S=e;try{if(!S){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),u([]),w(!0);return}if(!o||!n){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),u([]),w(!0);return}const M=await fetch(jt(o,`/instances/${n}/${S}`));if(!M.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${S}`),u([]),w(!0);return}const F=await M.json(),A=vr(typeof window<"u"?window.location.search:""),$=await Tc(F,A),{tokens:H,errors:Z}=await Iv($,o,n,S,A);u($),c(A),g(new Map(H)),m(Z)}catch(M){console.error("Failed to load extensions:",M)}finally{w(!0)}})()},[e,n,o]),x.useEffect(()=>{if(!o||!n||l.length===0)return;const S=setInterval(async()=>{const M=[];await Promise.all(l.filter(F=>{var A;return F.manifest.permissions.includes("data:fetch")||(((A=F.manifest.settingsSchema)==null?void 0:A.length)??0)>0}).map(async F=>{const A=f.find(q=>q.extensionId===F.id),$=A==null?void 0:A.token,H=A==null?void 0:A.mode,Z=jt(o,"/proxy-token"),G=await fetch(Z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:n,instanceId:e,extensionId:F.id,...H&&{mode:H},...$&&{devSessionToken:$}})});if(G.ok){const{token:q,encryptionKey:Q,settings:ee}=await G.json();M.push([F.id,{token:q,encryptionKey:Q,settings:ee}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${F.id} (${G.status}) — using stale token`)})),M.length>0&&g(F=>{const A=new Map(F);for(const[$,H]of M)A.set($,H);return A})},3300*1e3);return()=>clearInterval(S)},[l,f,o,n,e]),x.useEffect(()=>{if(h.size===0)return;const N=S=>{const M=S.data;if((M==null?void 0:M.type)!=="extension-ready")return;const F=M.extensionId,A=l.find(Z=>Z.id===F);if(!(A!=null&&A.bundleUrl))return;const $=f.find(Z=>Z.extensionId===F);if(Cc(A.bundleUrl)&&($==null?void 0:$.mode)!=="staging")return;const H=h.get(F);H&&Me(F,{type:"extension-encryption-key",encryptionKey:H.encryptionKey})};return window.addEventListener("message",N),()=>window.removeEventListener("message",N)},[l,f,h]);const z=x.useCallback((N,S)=>{const M=ft();for(const[F,A]of M){if(!A.manifest.permissions.includes("events:identity"))continue;const $=A.manifest.events??[];!$.includes("identity")&&!$.includes(`identity:${N}`)||Me(F,{type:"extension-event",eventType:"identity",payload:{eventName:N,data:{state:S,timestamp:Uo(new Date().toISOString())}}})}},[]),j=x.useCallback(N=>{const S=ft();for(const[M,F]of S){if(!F.manifest.permissions.includes("events:messaging"))continue;const A=F.manifest.events??[];!A.includes("messaging")&&!A.includes("messaging:postback")&&!A.includes(`messaging:postback:${N.data.actionName}`)||Me(M,{type:"extension-event",eventType:"messaging",payload:N})}},[]),O=x.useCallback(N=>{const S=ft();for(const[M,F]of S){if(!F.manifest.permissions.includes("events:activity"))continue;const A=F.manifest.events??[];!A.includes("activity")&&!A.includes(`activity:${N.eventName}`)||Me(M,{type:"extension-event",eventType:"activity",payload:N})}},[]),B=x.useCallback(async N=>{const S=ft(),M=[];for(const[A,$]of S){if(!$.manifest.permissions.includes("extend:identity"))continue;const H=new Promise(Z=>{const G=`enrich_${A}_${Date.now()}`,q=Q=>{const ee=Q.data;(ee==null?void 0:ee.type)!=="extend-identity-response"||ee.id!==G||(window.removeEventListener("message",q),ee.additionalClaims?Z(ee.additionalClaims):Z({}))};window.addEventListener("message",q),setTimeout(()=>{window.removeEventListener("message",q),Z({})},5e3),Me(A,{type:"extend-identity-request",id:G,claims:N})});M.push(H)}if(M.length===0)return{};const F=await Promise.all(M);return Object.assign({},...F)},[]),V=x.useCallback(async N=>{if(!o||!n||!e)return console.warn("[embeddables] signIdentity skipped — missing:",{apiBase:!!o,appId:!!n,instanceId:!!e}),null;const S=jt(o,`/instances/${n}/${e}/identity`);console.log("[embeddables] Calling identity sign:",{url:S,claims:Object.keys(N)});try{const M=await fetch(S,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)});if(!M.ok)return console.warn(`[embeddables] Identity sign failed (${M.status})`),null;const{token:F}=await M.json();return F}catch(M){return console.warn("[embeddables] Identity sign request failed:",M),null}},[o,n,e]),L=x.useCallback(N=>{const S=window.zE;S&&S("messenger","loginUser",async M=>{M(N)})},[]),Y=x.useCallback(()=>{const N=window.zE;N&&N("messenger","logoutUser")},[]),I=x.useCallback(N=>{console.log("[embeddables] Running sign lifecycle for user:",N.id);const{email:S,name:M}=N,F={external_id:String(N.id)};(async()=>{const A=await B({...F,email:S,name:M});console.log("[embeddables] Enriched claims:",A);const $=await V({...F,...A,email:S,name:M});console.log("[embeddables] Sign result:",{hasToken:!!$}),$&&L($)})()},[B,V,L]),D=x.useCallback(N=>{if(E.length>0&&T.current.size<E.length){console.log(`[embeddables] Deferring sign lifecycle — waiting for extend:identity extensions: ${T.current.size}/${E.length} ready`),P.current=N;return}console.log("[embeddables] No extend:identity extensions (or all ready) — signing immediately"),I(N)},[E,I]);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(S=>{var M,F;return S.authenticated&&((M=S.user)==null?void 0:M.id)===((F=N.user)==null?void 0:F.id)?S:(console.log("[embeddables] Identity state changed (props), starting sign lifecycle"),D(N.user),z("login",N),N)})}else{if(a===void 0)return;k(N=>N.authenticated?(console.log("[embeddables] Customer props cleared, logging out"),Y(),z("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):N)}},[v,a,s,i,E,D,z,Y]),x.useEffect(()=>{if(!v||a!==void 0)return;const N=()=>{const M=document.getElementById("stackable-identity");if(M)try{const F=JSON.parse(M.textContent??"{}"),A={authenticated:!0,user:{id:String(F.customerId??""),email:F.customerEmail,name:F.customerName,provider:"shopify"}};k($=>{var H,Z;return $.authenticated&&((H=$.user)==null?void 0:H.id)===((Z=A.user)==null?void 0:Z.id)?$:(console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"),D(A.user),z("login",A),A)})}catch{console.warn("[embeddables] Failed to parse #stackable-identity JSON")}else k(F=>F.authenticated?(Y(),z("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):F)};N();const S=new MutationObserver(N);return S.observe(document.head,{childList:!0,subtree:!0}),S.observe(document.body,{childList:!0,subtree:!0}),()=>S.disconnect()},[v,a,D,z,Y]),x.useEffect(()=>{if(!y.authenticated)return;const N=S=>{const M=S.data;if((M==null?void 0:M.type)!=="extension-ready")return;const F=M.extensionId,A=l.find(H=>H.id===F);if(!(A!=null&&A.manifest.permissions.includes("events:identity")))return;const $=A.manifest.events??[];!$.includes("identity")&&!$.includes("identity:login")||Me(F,{type:"extension-event",eventType:"identity",payload:{eventName:"login",data:{state:y,timestamp:Uo(new Date().toISOString())}}})};return window.addEventListener("message",N),()=>window.removeEventListener("message",N)},[y,l]),x.useEffect(()=>{if(E.length===0)return;const N=M=>{const F=M.data;if((F==null?void 0:F.type)!=="extension-ready")return;const A=F.extensionId;if(E.includes(A)&&(T.current.add(A),console.log(`[embeddables] extend:identity extension ready: ${A} (${T.current.size}/${E.length})`),T.current.size>=E.length&&P.current)){console.log("[embeddables] All extend:identity extensions ready, running deferred sign lifecycle");const $=P.current;P.current=null,I($)}};window.addEventListener("message",N);const S=setTimeout(()=>{if(P.current){console.warn(`[embeddables] extend:identity timeout (5s) — signing with ${T.current.size}/${E.length} extensions ready`);const M=P.current;P.current=null,I(M)}},5e3);return()=>{window.removeEventListener("message",N),clearTimeout(S)}},[E,I]),x.useEffect(()=>{const N=S=>{const{detail:M}=S;M!=null&&M.eventName&&(M.eventName==="postback"?j({eventName:"postback",data:{actionName:M.data.actionName,conversationId:M.data.conversationId??"",timestamp:Uo(new Date().toISOString())}}):M.eventName==="context"&&_(F=>({...F,...M.data})))};return window.addEventListener("stackable:messaging",N),()=>window.removeEventListener("stackable:messaging",N)},[j]),x.useEffect(()=>{const N=S=>{const{detail:M}=S;M!=null&&M.eventName&&O({eventName:M.eventName,data:M.data??{}})};return window.addEventListener("stackable:activity",N),()=>window.removeEventListener("stackable:activity",N)},[O]),x.useEffect(()=>{var M;if(!v)return;const N={customerId:a??"",customerEmail:s??"",customerName:i??"",messaging:C,identity:y},S=ft();for(const[F,A]of S){if(!A.manifest.permissions.includes("context:read"))continue;const $=(M=h.get(F))==null?void 0:M.settings,H=$?{...N,settings:$}:N;Me(F,{type:"context-push",context:H})}},[v,a,s,i,y,C,h]);const R=x.useMemo(()=>({"data.query":async N=>Sl(N,t),"data.fetch":async(N,S)=>{const M=h.get(N);if(!M)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const F=Mv(S)?S:{url:S.url,method:S.method??"GET",headers:S.headers??{},body:S.body??null},A=jt(o,"/proxy"),$=await fetch(A,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":N,"X-Application-Id":n??"",Authorization:`Bearer ${M.token}`},body:JSON.stringify(F)}),H=await $.json();return{status:H.status??$.status,ok:H.ok??$.ok,data:H.data}},"actions.toast":async(N,S)=>{const M={...S.description&&{description:S.description},...S.duration&&{duration:S.duration},...S.position&&{position:S.position},...S.dismissible!=null&&{dismissible:S.dismissible},...S.closeButton!=null&&{closeButton:S.closeButton}};if(S.fetch){const F=$=>new Promise(H=>setTimeout(H,$)),A=Promise.all([R["data.fetch"](N,S.fetch),F(Av)]).then(([$])=>$);gt.promise(A,{loading:S.loading??S.message,success:S.success??S.message,error:S.error??"Something went wrong",...M});return}switch(S.type){case"success":{gt.success(S.message,M);break}case"error":{gt.error(S.message,M);break}case"warning":{gt.warning(S.message,M);break}case"info":{gt.info(S.message,M);break}default:gt(S.message,M)}},"actions.invoke":async N=>(window.dispatchEvent(new CustomEvent(`stackable:action:${N.action}`,{detail:N})),{success:!0}),"context.read":async N=>{var S;return{customerId:a??"",customerEmail:s??"",customerName:i??"",identity:y,messaging:C,...((S=h.get(N))==null?void 0:S.settings)&&{settings:h.get(N).settings}}}}),[o,n,t,a,s,i,h,y,C]);return v?d.jsxs(d.Fragment,{children:[d.jsx(Rl,{extensions:l,capabilityHandlers:R,components:Cv(),children:r}),d.jsx(Pv,{extensions:l,tokenErrors:b})]}):null};var Lv=(e,t,o,n,r,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?r.map(w=>a[w]||w):r;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(n)f(n);else try{let g=localStorage.getItem(t)||o,b=s&&g==="system"?h():g;f(b)}catch{}},zv=p.createContext(void 0),Dv={setTheme:e=>{},themes:[]},$v=()=>{var e;return(e=p.useContext(zv))!=null?e:Dv};p.memo(({forcedTheme:e,storageKey:t,attribute:o,enableSystem:n,enableColorScheme:r,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:u})=>{let f=JSON.stringify([o,t,a,e,i,s,n,r]).slice(1,-1);return p.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${Lv.toString()})(${f})`}})});const Fv=({...e})=>{const{theme:t="system"}=$v();return d.jsx(Sc,{theme:t,className:"toaster group",icons:{success:d.jsx(Sr,{className:"size-4"}),info:d.jsx(Yt,{className:"size-4"}),warning:d.jsx(ed,{className:"size-4"}),error:d.jsx(Yc,{className:"size-4"}),loading:d.jsx(Go,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},Bv={dark:"dark",light:"widget-theme-light"},Hv={dark:"dark",light:"light"},Vv=({children:e,theme:t="inherit"})=>d.jsxs("div",{"data-id":"widget-body",className:Bv[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(Fv,{position:"bottom-center",theme:Hv[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Wv={airplay:Oc,"message-circle":Er,"message-square":Yo,headphones:Gc,"help-circle":Cr,bot:Dc,sparkles:Nr,zap:od},Uv=({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)"})}),jv=({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"})})]})]}),El=400,Rv=El*.35,Gv=({icon:e,isOpen:t,onClick:o})=>{const n=Wv[e]??Uv,[r,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"),Rv);return()=>clearTimeout(l)},[t]);const i=()=>r==="interstitial"?d.jsx(jv,{}):t?d.jsx(Uc,{}):d.jsx(n,{});return d.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:d.jsx(vl,{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:`${El}ms`},children:i()})})})},qv=({children:e,icon:t,theme:o})=>{const[n,r]=x.useState(!1),[a,s]=x.useState(!0),[i,l]=x.useState(!1),u=x.useCallback(()=>{r(f=>!f)},[]);return x.useEffect(()=>{n&&!i&&l(!0)},[n,i]),x.useEffect(()=>{const f=()=>r(m=>!m),c=()=>r(!0),h=()=>r(!1),g=()=>s(!0),b=()=>{r(!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(Gv,{isOpen:n,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",n?"opacity-100 scale-100 translate-y-0 pointer-events-auto":"opacity-0 scale-95 translate-y-2 pointer-events-none"),children:d.jsx(Vv,{theme:o,children:e})})]})},Yv=({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}),Xv=(e,t)=>{const[o,n]=x.useState(null),[r,a]=x.useState(!1),[s,i]=x.useState(null);return x.useEffect(()=>{if(!e){n(null);return}(async()=>{a(!0),i(null);try{const u=await Sl({action:"getCustomer",customerId:e},t);n(u)}catch(u){i(u)}finally{a(!1)}})()},[e,t]),{customer:o,loading:r,error:s}},Kv=({customerId:e,customerEmail:t,queryApiBase:o,children:n})=>{var l,u;const{customer:r,loading:a,error:s}=Xv(e,o);if(a)return d.jsx(Lt,{className:"border-none shadow-none bg-transparent",children:d.jsx(zt,{className:"flex items-center justify-center p-6",children:d.jsx(Go,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!r){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(Lt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsxs(zt,{className:"p-4 pb-0 pt-2",children:[d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Jn,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Qn,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(f)}&background=7c3aed&color=fff&size=128`,alt:f}),d.jsx(er,{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(qo,{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:n})]})]}),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=r.first_name)==null?void 0:l[0])||""}${((u=r.last_name)==null?void 0:u[0])||""}`;return d.jsx(Lt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsx(zt,{className:"p-4 pb-0 pt-2",children:d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Jn,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Qn,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(r.name)}&background=7c3aed&color=fff&size=128`,alt:r.name}),d.jsx(er,{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:r.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(qo,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:r.email})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:n})]})]})})})},Nl=(e,t)=>{x.useEffect(()=>{const o=t.current;if(!o)return;let n=document.getElementById(e);n||(n=document.createElement("div"),n.id=e,n.style.cssText="position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;",document.body.appendChild(n));const r=new MutationObserver(()=>{for(;n.firstChild;)o.appendChild(document.adoptNode(n.firstChild))});return r.observe(n,{childList:!0,subtree:!0}),()=>{r.disconnect(),n==null||n.remove()}},[e,t])},Zv=({customization:e})=>{const t=x.useRef(null);return Nl("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"})},Jv=({customization:e})=>{const t=x.useRef(null);return Nl("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"})},_t="stackable:action",tr=e=>{window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"context",data:e}}))},or=25,nr=75,Qv=({header:e,buttons:t,queryApiBase:o,customerId:n="",customerEmail:r="",primaryPercent:a=50})=>{const s=Math.max(or,Math.min(nr,a)),{extensions:i}=fr(),l=x.useMemo(()=>i.some(O=>O.enabled&&(O.manifest.targets.includes("slot.header")||O.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 Y,I;const O=document.querySelector('script[src*="zdassets.com/ekr/snippet"]'),B=(I=(Y=O==null?void 0:O.src)==null?void 0:Y.match(/key=([a-f0-9-]+)/))==null?void 0:I[1];if(B&&fetch(`https://ekr.zdassets.com/compose/${B}`).then(D=>D.text()).then(D=>{var N;const R=(N=D.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/))==null?void 0:N[1];R&&tr({appId:R})}).catch(()=>{}),C()){y("ready");return}const V=setInterval(()=>{C()&&(y("ready"),clearInterval(V))},100),L=setTimeout(()=>{clearInterval(V),y(D=>D==="ready"?D:(console.warn("Zendesk widget failed to load after 10 seconds"),"error"))},1e4);return()=>{clearInterval(V),clearTimeout(L)}},[C]);const _=x.useCallback(O=>{!window.zE||!O.length||(console.log("[ZendeskMessenger] setConversationTags",O,{zE:!!window.zE}),window.zE("messenger:set","conversationTags",O))},[]),P=x.useCallback(O=>{!window.zE||!O.length||(console.log("[ZendeskMessenger] setConversationFields",O,{zE:!!window.zE}),window.zE("messenger:set","conversationFields",O))},[]),T=x.useCallback(O=>{if(!window.zE)return;const{tags:B=[],fields:V=[],...L}=O??{};_(B),P(V),window.zE("messenger:ui","newConversation",Object.keys(L).length?L:void 0)},[_,P]),E=x.useCallback(O=>{const{detail:B}=O;B!=null&&B.payload&&T(B.payload)},[T]);x.useEffect(()=>(window.addEventListener(`${_t}:${ht.NEW_CONVERSATION}`,E),()=>{window.removeEventListener(`${_t}:${ht.NEW_CONVERSATION}`,E)}),[E]),x.useEffect(()=>{const O=V=>{const{detail:L}=V;L!=null&&L.payload&&_(L.payload)},B=V=>{const{detail:L}=V;L!=null&&L.payload&&P(L.payload)};return window.addEventListener(`${_t}:${ht.SET_CONVERSATION_TAGS}`,O),window.addEventListener(`${_t}:${ht.SET_CONVERSATION_FIELDS}`,B),()=>{window.removeEventListener(`${_t}:${ht.SET_CONVERSATION_TAGS}`,O),window.removeEventListener(`${_t}:${ht.SET_CONVERSATION_FIELDS}`,B)}},[_,P]),x.useEffect(()=>{if(w!=="ready"||!window.zE)return;const O=window.zE("messenger:on","conversationStarted",L=>{var I,D;const Y=(D=(I=L==null?void 0:L.payload)==null?void 0:I.conversation)==null?void 0:D.id;Y&&tr({conversationId:Y})}),B=window.zE("messenger:on","messagesShown",L=>{var I,D;const Y=(D=(I=L==null?void 0:L.payload)==null?void 0:I.conversation)==null?void 0:D.id;Y&&tr({conversationId:Y})}),V=window.zE("messenger:on","postbackButtonClicked",L=>{var I;const Y=L==null?void 0:L.payload;Y!=null&&Y.actionName&&window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"postback",data:{actionName:Y.actionName,conversationId:((I=Y.conversation)==null?void 0:I.id)??""}}}))});return()=>{typeof O=="function"&&O(),typeof B=="function"&&B(),typeof V=="function"&&V()}},[w]),x.useEffect(()=>{if(!u)return;const O=V=>{if(!k.current)return;const L=k.current.getBoundingClientRect();if((c?L.width:L.height)===0)return;const I=c?(V.clientX-L.left)/L.width*100:(V.clientY-L.top)/L.height*100,D=Math.max(or,Math.min(nr,I));v(D)},B=()=>{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",O),window.addEventListener("mouseup",B),window.addEventListener("blur",B),()=>{window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",B),window.removeEventListener("blur",B),document.body.style.cursor="",document.body.style.userSelect=""}},[u,c]),x.useEffect(()=>{if(!k.current)return;const O=k.current,B=()=>{const L=getComputedStyle(O).flexDirection==="row";h(L)};B();const V=new ResizeObserver(B);return V.observe(O),()=>{V.disconnect()}},[]);const z=x.useCallback(O=>{if(O.detail===2){v(s);return}O.preventDefault(),f(!0)},[s]),j={customerId:n,customerEmail:r};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(Zc,{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(Yo,{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(Tr,{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(Kv,{customerId:n,customerEmail:r,queryApiBase:o,children:d.jsx(Gt,{target:"slot.header",context:j,className:"flex-none"})}),d.jsx(Gt,{target:"slot.content",context:j,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(Zv,{})})]})]}),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(Jv,{})}),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(Gt,{target:"slot.footer",context:j,className:"flex items-center gap-1",fallback:d.jsxs(d.Fragment,{children:[d.jsx("div",{children:"powered by"}),d.jsx(Yv,{href:"https://zendesk.com",children:"Zendesk"})]})}),d.jsx(Gt,{target:"slot.footer-links",context:j,className:"flex items-center gap-1",separator:d.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:O,index:B})=>d.jsxs(d.Fragment,{children:[B===0&&d.jsx("span",{className:"text-zinc-300",children:"+"}),O]})})]})]}),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:z,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":or,"aria-valuemax":nr,"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)})]})]})]})},eb="ze-snippet",Tl=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,tb=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:o=!1,scriptId:n=eb}=t;window.zEMessenger={autorender:o};const r=document.getElementById(n);if(r){if(r.getAttribute("src")===Tl(e))return Promise.resolve();r.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=n,i.src=Tl(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},ob=({queryApiBase:e,apiBase:t,appId:o,theme:n,icon:r,instanceId:a,customerId:s,customerEmail:i,customerName:l,snippetKey:u})=>{const f=n==="dark"||n==="light"?n:"inherit";return x.useEffect(()=>{u&&tb(u).catch(c=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",c)})},[u]),d.jsx(Ov,{instanceId:a,queryApiBase:e,apiBase:t,appId:o,customerId:s,customerEmail:i,customerName:l,children:d.jsx(qv,{theme:f,icon:r,children:d.jsx(Qv,{queryApiBase:e,customerId:s,customerEmail:i,primaryPercent:40})})})};class nb extends HTMLElement{constructor(){super();sr(this,"mountNode");sr(this,"root");const o=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=zl,o.appendChild(n),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(ob,{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",nb)}));