@rinzai/zen 0.0.10 → 0.0.11

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.
Files changed (61) hide show
  1. package/dist/badge/index.d.ts +19 -0
  2. package/dist/badge/index.d.ts.map +1 -0
  3. package/dist/badge/index.stories.d.ts +4 -0
  4. package/dist/badge/index.stories.d.ts.map +1 -0
  5. package/dist/button/index.d.ts +5 -6
  6. package/dist/button/index.d.ts.map +1 -1
  7. package/dist/button/{Button.stories.d.ts → index.stories.d.ts} +1 -1
  8. package/dist/button/index.stories.d.ts.map +1 -0
  9. package/dist/collapse/index.d.ts +16 -0
  10. package/dist/collapse/index.d.ts.map +1 -0
  11. package/dist/collapse/index.stories.d.ts +4 -0
  12. package/dist/collapse/index.stories.d.ts.map +1 -0
  13. package/dist/component/index.d.ts +6 -9
  14. package/dist/component/index.d.ts.map +1 -1
  15. package/dist/component/index.stories.d.ts +25 -0
  16. package/dist/component/index.stories.d.ts.map +1 -0
  17. package/dist/container/index.d.ts +3 -2
  18. package/dist/container/index.d.ts.map +1 -1
  19. package/dist/{component/Component.stories.d.ts → container/index.stories.d.ts} +3 -3
  20. package/dist/container/index.stories.d.ts.map +1 -0
  21. package/dist/dropdown/index.d.ts +20 -0
  22. package/dist/dropdown/index.d.ts.map +1 -0
  23. package/dist/dropdown/index.stories.d.ts +7 -0
  24. package/dist/dropdown/index.stories.d.ts.map +1 -0
  25. package/dist/icons/chevron-down.d.ts +3 -0
  26. package/dist/icons/chevron-down.d.ts.map +1 -0
  27. package/dist/icons/chevron-up.d.ts +3 -0
  28. package/dist/icons/chevron-up.d.ts.map +1 -0
  29. package/dist/icons/icon.types.d.ts +4 -0
  30. package/dist/icons/icon.types.d.ts.map +1 -0
  31. package/dist/icons/index.d.ts +4 -0
  32. package/dist/icons/index.d.ts.map +1 -0
  33. package/dist/icons/search.d.ts +3 -0
  34. package/dist/icons/search.d.ts.map +1 -0
  35. package/dist/icons/x-mark.d.ts +3 -0
  36. package/dist/icons/x-mark.d.ts.map +1 -0
  37. package/dist/index.d.ts +6 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/input/index.d.ts +5 -0
  40. package/dist/input/index.d.ts.map +1 -0
  41. package/dist/input/index.stories.d.ts +4 -0
  42. package/dist/input/index.stories.d.ts.map +1 -0
  43. package/dist/popover/index.d.ts +20 -0
  44. package/dist/popover/index.d.ts.map +1 -0
  45. package/dist/toggle/index.d.ts +2 -2
  46. package/dist/toggle/index.d.ts.map +1 -1
  47. package/dist/toggle/{Toggle.Stories.d.ts → index.stories.d.ts} +1 -1
  48. package/dist/toggle/index.stories.d.ts.map +1 -0
  49. package/dist/utils/cva.d.ts +2 -2
  50. package/dist/utils/cva.d.ts.map +1 -1
  51. package/dist/utils/cx.d.ts.map +1 -1
  52. package/dist/zen.js +3696 -0
  53. package/package.json +80 -79
  54. package/dist/button/Button.stories.d.ts.map +0 -1
  55. package/dist/component/Component.stories.d.ts.map +0 -1
  56. package/dist/container/Container.stories.d.ts +0 -21
  57. package/dist/container/Container.stories.d.ts.map +0 -1
  58. package/dist/style.css +0 -1
  59. package/dist/toggle/Toggle.Stories.d.ts.map +0 -1
  60. package/dist/zen.es.js +0 -743
  61. package/dist/zen.umd.js +0 -27
package/dist/zen.js ADDED
@@ -0,0 +1,3696 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}h1{scroll-margin:5rem;font-size:2.25rem;line-height:2.5rem;font-weight:800;letter-spacing:-.025em}@media (min-width: 1024px){h1{font-size:3rem;line-height:1}}h2{scroll-margin:5rem;font-size:1.875rem;line-height:2.25rem;font-weight:600;letter-spacing:-.025em}h2:first-child{margin-top:0}h3{scroll-margin:5rem;font-size:1.5rem;line-height:2rem;font-weight:600;letter-spacing:-.025em}h4{scroll-margin:5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600;letter-spacing:-.025em}h5{scroll-margin:5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600;letter-spacing:-.025em}h6{scroll-margin:5rem;font-size:1rem;line-height:1.5rem;font-weight:600;letter-spacing:-.025em}p{line-height:1.75rem}p:not(:first-child){margin-top:1.5rem}blockquote{margin-top:1.5rem;border-left-width:2px;padding-left:1.5rem;font-style:italic}code,pre{position:relative;border-radius:.25rem;background-color:hsl(var(--muted));padding:.2rem .3rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875rem;line-height:1.25rem;font-weight:600;color:hsl(var(--muted-foreground))}label{font-size:.875rem;line-height:1.25rem;font-weight:500;line-height:1}.peer:disabled~label{cursor:not-allowed;opacity:.7}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.\\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.left-3{left:.75rem}.top-0{top:0}.top-3{top:.75rem}.z-50{z-index:50}.z-auto{z-index:auto}.mr-2{margin-right:.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.size-3{width:.75rem;height:.75rem}.size-4{width:1rem;height:1rem}.h-10{height:2.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.max-h-60{max-height:15rem}.w-10{width:2.5rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-fit{width:fit-content}.w-full{width:100%}.min-w-max{min-width:max-content}.min-w-min{min-width:min-content}.max-w-\\[calc\\(100\\%-30px\\)\\]{max-width:calc(100% - 30px)}.flex-none{flex:none}.grow{flex-grow:1}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-flow-row{grid-auto-flow:row}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.divide-y-2>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(2px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(2px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:hsl(var(--border))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-2{border-width:2px}.border-border{border-color:hsl(var(--border))}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.\\!bg-input{background-color:hsl(var(--input))!important}.bg-background{background-color:hsl(var(--background))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-input{background-color:hsl(var(--input))}.bg-muted{background-color:hsl(var(--muted))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\\/90{background-color:hsl(var(--primary) / .9)}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-2{padding:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pr-1{padding-right:.25rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-muted{color:hsl(var(--muted))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline-offset-4{text-underline-offset:4px}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-ring{--tw-shadow-color: hsl(var(--ring));--tw-shadow: var(--tw-shadow-colored)}.shadow-secondary{--tw-shadow-color: hsl(var(--secondary));--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\\:bg-muted-foreground:hover{background-color:hsl(var(--muted-foreground))}.hover\\:bg-primary\\/60:hover{background-color:hsl(var(--primary) / .6)}.hover\\:bg-primary\\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:border-primary:focus-visible{border-color:hsl(var(--primary))}.focus-visible\\:shadow-sm:focus-visible{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus-visible\\:shadow-ring:focus-visible{--tw-shadow-color: hsl(var(--ring));--tw-shadow: var(--tw-shadow-colored)}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-muted:disabled{background-color:hsl(var(--muted))}.disabled\\:text-muted:disabled{color:hsl(var(--muted))}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:text-muted{color:hsl(var(--muted))}')),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
+ import * as b from "react";
3
+ import gn, { forwardRef as hn, useLayoutEffect as pn, useEffect as $e, useRef as Ct, useState as St, useId as mr, useMemo as pt } from "react";
4
+ import * as vr from "react-dom";
5
+ import { createPortal as gr, flushSync as hr } from "react-dom";
6
+ var bt = { exports: {} }, Oe = {};
7
+ /**
8
+ * @license React
9
+ * react-jsx-runtime.development.js
10
+ *
11
+ * Copyright (c) Facebook, Inc. and its affiliates.
12
+ *
13
+ * This source code is licensed under the MIT license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
16
+ var Kt;
17
+ function pr() {
18
+ return Kt || (Kt = 1, process.env.NODE_ENV !== "production" && function() {
19
+ var t = gn, n = Symbol.for("react.element"), e = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), a = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), p = Symbol.iterator, g = "@@iterator";
20
+ function S(l) {
21
+ if (l === null || typeof l != "object")
22
+ return null;
23
+ var h = p && l[p] || l[g];
24
+ return typeof h == "function" ? h : null;
25
+ }
26
+ var y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
27
+ function x(l) {
28
+ {
29
+ for (var h = arguments.length, E = new Array(h > 1 ? h - 1 : 0), _ = 1; _ < h; _++)
30
+ E[_ - 1] = arguments[_];
31
+ A("error", l, E);
32
+ }
33
+ }
34
+ function A(l, h, E) {
35
+ {
36
+ var _ = y.ReactDebugCurrentFrame, F = _.getStackAddendum();
37
+ F !== "" && (h += "%s", E = E.concat([F]));
38
+ var W = E.map(function(D) {
39
+ return String(D);
40
+ });
41
+ W.unshift("Warning: " + h), Function.prototype.apply.call(console[l], console, W);
42
+ }
43
+ }
44
+ var T = !1, P = !1, j = !1, z = !1, I = !1, V;
45
+ V = Symbol.for("react.module.reference");
46
+ function Y(l) {
47
+ return !!(typeof l == "string" || typeof l == "function" || l === r || l === i || I || l === o || l === c || l === m || z || l === f || T || P || j || typeof l == "object" && l !== null && (l.$$typeof === v || l.$$typeof === d || l.$$typeof === s || l.$$typeof === a || l.$$typeof === u || // This needs to include all possible module reference object
48
+ // types supported by any Flight configuration anywhere since
49
+ // we don't know which Flight build this will end up being used
50
+ // with.
51
+ l.$$typeof === V || l.getModuleId !== void 0));
52
+ }
53
+ function B(l, h, E) {
54
+ var _ = l.displayName;
55
+ if (_)
56
+ return _;
57
+ var F = h.displayName || h.name || "";
58
+ return F !== "" ? E + "(" + F + ")" : E;
59
+ }
60
+ function L(l) {
61
+ return l.displayName || "Context";
62
+ }
63
+ function $(l) {
64
+ if (l == null)
65
+ return null;
66
+ if (typeof l.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof l == "function")
67
+ return l.displayName || l.name || null;
68
+ if (typeof l == "string")
69
+ return l;
70
+ switch (l) {
71
+ case r:
72
+ return "Fragment";
73
+ case e:
74
+ return "Portal";
75
+ case i:
76
+ return "Profiler";
77
+ case o:
78
+ return "StrictMode";
79
+ case c:
80
+ return "Suspense";
81
+ case m:
82
+ return "SuspenseList";
83
+ }
84
+ if (typeof l == "object")
85
+ switch (l.$$typeof) {
86
+ case a:
87
+ var h = l;
88
+ return L(h) + ".Consumer";
89
+ case s:
90
+ var E = l;
91
+ return L(E._context) + ".Provider";
92
+ case u:
93
+ return B(l, l.render, "ForwardRef");
94
+ case d:
95
+ var _ = l.displayName || null;
96
+ return _ !== null ? _ : $(l.type) || "Memo";
97
+ case v: {
98
+ var F = l, W = F._payload, D = F._init;
99
+ try {
100
+ return $(D(W));
101
+ } catch {
102
+ return null;
103
+ }
104
+ }
105
+ }
106
+ return null;
107
+ }
108
+ var k = Object.assign, w = 0, C, M, R, q, be, ne, Me;
109
+ function Se() {
110
+ }
111
+ Se.__reactDisabledLog = !0;
112
+ function G() {
113
+ {
114
+ if (w === 0) {
115
+ C = console.log, M = console.info, R = console.warn, q = console.error, be = console.group, ne = console.groupCollapsed, Me = console.groupEnd;
116
+ var l = {
117
+ configurable: !0,
118
+ enumerable: !0,
119
+ value: Se,
120
+ writable: !0
121
+ };
122
+ Object.defineProperties(console, {
123
+ info: l,
124
+ log: l,
125
+ warn: l,
126
+ error: l,
127
+ group: l,
128
+ groupCollapsed: l,
129
+ groupEnd: l
130
+ });
131
+ }
132
+ w++;
133
+ }
134
+ }
135
+ function oe() {
136
+ {
137
+ if (w--, w === 0) {
138
+ var l = {
139
+ configurable: !0,
140
+ enumerable: !0,
141
+ writable: !0
142
+ };
143
+ Object.defineProperties(console, {
144
+ log: k({}, l, {
145
+ value: C
146
+ }),
147
+ info: k({}, l, {
148
+ value: M
149
+ }),
150
+ warn: k({}, l, {
151
+ value: R
152
+ }),
153
+ error: k({}, l, {
154
+ value: q
155
+ }),
156
+ group: k({}, l, {
157
+ value: be
158
+ }),
159
+ groupCollapsed: k({}, l, {
160
+ value: ne
161
+ }),
162
+ groupEnd: k({}, l, {
163
+ value: Me
164
+ })
165
+ });
166
+ }
167
+ w < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
168
+ }
169
+ }
170
+ var ie = y.ReactCurrentDispatcher, Ae;
171
+ function je(l, h, E) {
172
+ {
173
+ if (Ae === void 0)
174
+ try {
175
+ throw Error();
176
+ } catch (F) {
177
+ var _ = F.stack.trim().match(/\n( *(at )?)/);
178
+ Ae = _ && _[1] || "";
179
+ }
180
+ return `
181
+ ` + Ae + l;
182
+ }
183
+ }
184
+ var ot = !1, Ne;
185
+ {
186
+ var Yn = typeof WeakMap == "function" ? WeakMap : Map;
187
+ Ne = new Yn();
188
+ }
189
+ function Mt(l, h) {
190
+ if (!l || ot)
191
+ return "";
192
+ {
193
+ var E = Ne.get(l);
194
+ if (E !== void 0)
195
+ return E;
196
+ }
197
+ var _;
198
+ ot = !0;
199
+ var F = Error.prepareStackTrace;
200
+ Error.prepareStackTrace = void 0;
201
+ var W;
202
+ W = ie.current, ie.current = null, G();
203
+ try {
204
+ if (h) {
205
+ var D = function() {
206
+ throw Error();
207
+ };
208
+ if (Object.defineProperty(D.prototype, "props", {
209
+ set: function() {
210
+ throw Error();
211
+ }
212
+ }), typeof Reflect == "object" && Reflect.construct) {
213
+ try {
214
+ Reflect.construct(D, []);
215
+ } catch (se) {
216
+ _ = se;
217
+ }
218
+ Reflect.construct(l, [], D);
219
+ } else {
220
+ try {
221
+ D.call();
222
+ } catch (se) {
223
+ _ = se;
224
+ }
225
+ l.call(D.prototype);
226
+ }
227
+ } else {
228
+ try {
229
+ throw Error();
230
+ } catch (se) {
231
+ _ = se;
232
+ }
233
+ l();
234
+ }
235
+ } catch (se) {
236
+ if (se && _ && typeof se.stack == "string") {
237
+ for (var N = se.stack.split(`
238
+ `), X = _.stack.split(`
239
+ `), K = N.length - 1, H = X.length - 1; K >= 1 && H >= 0 && N[K] !== X[H]; )
240
+ H--;
241
+ for (; K >= 1 && H >= 0; K--, H--)
242
+ if (N[K] !== X[H]) {
243
+ if (K !== 1 || H !== 1)
244
+ do
245
+ if (K--, H--, H < 0 || N[K] !== X[H]) {
246
+ var te = `
247
+ ` + N[K].replace(" at new ", " at ");
248
+ return l.displayName && te.includes("<anonymous>") && (te = te.replace("<anonymous>", l.displayName)), typeof l == "function" && Ne.set(l, te), te;
249
+ }
250
+ while (K >= 1 && H >= 0);
251
+ break;
252
+ }
253
+ }
254
+ } finally {
255
+ ot = !1, ie.current = W, oe(), Error.prepareStackTrace = F;
256
+ }
257
+ var xe = l ? l.displayName || l.name : "", Ut = xe ? je(xe) : "";
258
+ return typeof l == "function" && Ne.set(l, Ut), Ut;
259
+ }
260
+ function Un(l, h, E) {
261
+ return Mt(l, !1);
262
+ }
263
+ function Kn(l) {
264
+ var h = l.prototype;
265
+ return !!(h && h.isReactComponent);
266
+ }
267
+ function De(l, h, E) {
268
+ if (l == null)
269
+ return "";
270
+ if (typeof l == "function")
271
+ return Mt(l, Kn(l));
272
+ if (typeof l == "string")
273
+ return je(l);
274
+ switch (l) {
275
+ case c:
276
+ return je("Suspense");
277
+ case m:
278
+ return je("SuspenseList");
279
+ }
280
+ if (typeof l == "object")
281
+ switch (l.$$typeof) {
282
+ case u:
283
+ return Un(l.render);
284
+ case d:
285
+ return De(l.type, h, E);
286
+ case v: {
287
+ var _ = l, F = _._payload, W = _._init;
288
+ try {
289
+ return De(W(F), h, E);
290
+ } catch {
291
+ }
292
+ }
293
+ }
294
+ return "";
295
+ }
296
+ var Le = Object.prototype.hasOwnProperty, At = {}, jt = y.ReactDebugCurrentFrame;
297
+ function Fe(l) {
298
+ if (l) {
299
+ var h = l._owner, E = De(l.type, l._source, h ? h.type : null);
300
+ jt.setExtraStackFrame(E);
301
+ } else
302
+ jt.setExtraStackFrame(null);
303
+ }
304
+ function Hn(l, h, E, _, F) {
305
+ {
306
+ var W = Function.call.bind(Le);
307
+ for (var D in l)
308
+ if (W(l, D)) {
309
+ var N = void 0;
310
+ try {
311
+ if (typeof l[D] != "function") {
312
+ var X = Error((_ || "React class") + ": " + E + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
313
+ throw X.name = "Invariant Violation", X;
314
+ }
315
+ N = l[D](h, D, _, E, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
316
+ } catch (K) {
317
+ N = K;
318
+ }
319
+ N && !(N instanceof Error) && (Fe(F), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", _ || "React class", E, D, typeof N), Fe(null)), N instanceof Error && !(N.message in At) && (At[N.message] = !0, Fe(F), x("Failed %s type: %s", E, N.message), Fe(null));
320
+ }
321
+ }
322
+ }
323
+ var qn = Array.isArray;
324
+ function it(l) {
325
+ return qn(l);
326
+ }
327
+ function Xn(l) {
328
+ {
329
+ var h = typeof Symbol == "function" && Symbol.toStringTag, E = h && l[Symbol.toStringTag] || l.constructor.name || "Object";
330
+ return E;
331
+ }
332
+ }
333
+ function Gn(l) {
334
+ try {
335
+ return Nt(l), !1;
336
+ } catch {
337
+ return !0;
338
+ }
339
+ }
340
+ function Nt(l) {
341
+ return "" + l;
342
+ }
343
+ function Dt(l) {
344
+ if (Gn(l))
345
+ return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xn(l)), Nt(l);
346
+ }
347
+ var Te = y.ReactCurrentOwner, Jn = {
348
+ key: !0,
349
+ ref: !0,
350
+ __self: !0,
351
+ __source: !0
352
+ }, Lt, Ft, st;
353
+ st = {};
354
+ function Zn(l) {
355
+ if (Le.call(l, "ref")) {
356
+ var h = Object.getOwnPropertyDescriptor(l, "ref").get;
357
+ if (h && h.isReactWarning)
358
+ return !1;
359
+ }
360
+ return l.ref !== void 0;
361
+ }
362
+ function Qn(l) {
363
+ if (Le.call(l, "key")) {
364
+ var h = Object.getOwnPropertyDescriptor(l, "key").get;
365
+ if (h && h.isReactWarning)
366
+ return !1;
367
+ }
368
+ return l.key !== void 0;
369
+ }
370
+ function er(l, h) {
371
+ if (typeof l.ref == "string" && Te.current && h && Te.current.stateNode !== h) {
372
+ var E = $(Te.current.type);
373
+ st[E] || (x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', $(Te.current.type), l.ref), st[E] = !0);
374
+ }
375
+ }
376
+ function tr(l, h) {
377
+ {
378
+ var E = function() {
379
+ Lt || (Lt = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
380
+ };
381
+ E.isReactWarning = !0, Object.defineProperty(l, "key", {
382
+ get: E,
383
+ configurable: !0
384
+ });
385
+ }
386
+ }
387
+ function nr(l, h) {
388
+ {
389
+ var E = function() {
390
+ Ft || (Ft = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
391
+ };
392
+ E.isReactWarning = !0, Object.defineProperty(l, "ref", {
393
+ get: E,
394
+ configurable: !0
395
+ });
396
+ }
397
+ }
398
+ var rr = function(l, h, E, _, F, W, D) {
399
+ var N = {
400
+ // This tag allows us to uniquely identify this as a React Element
401
+ $$typeof: n,
402
+ // Built-in properties that belong on the element
403
+ type: l,
404
+ key: h,
405
+ ref: E,
406
+ props: D,
407
+ // Record the component responsible for creating this element.
408
+ _owner: W
409
+ };
410
+ return N._store = {}, Object.defineProperty(N._store, "validated", {
411
+ configurable: !1,
412
+ enumerable: !1,
413
+ writable: !0,
414
+ value: !1
415
+ }), Object.defineProperty(N, "_self", {
416
+ configurable: !1,
417
+ enumerable: !1,
418
+ writable: !1,
419
+ value: _
420
+ }), Object.defineProperty(N, "_source", {
421
+ configurable: !1,
422
+ enumerable: !1,
423
+ writable: !1,
424
+ value: F
425
+ }), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
426
+ };
427
+ function or(l, h, E, _, F) {
428
+ {
429
+ var W, D = {}, N = null, X = null;
430
+ E !== void 0 && (Dt(E), N = "" + E), Qn(h) && (Dt(h.key), N = "" + h.key), Zn(h) && (X = h.ref, er(h, F));
431
+ for (W in h)
432
+ Le.call(h, W) && !Jn.hasOwnProperty(W) && (D[W] = h[W]);
433
+ if (l && l.defaultProps) {
434
+ var K = l.defaultProps;
435
+ for (W in K)
436
+ D[W] === void 0 && (D[W] = K[W]);
437
+ }
438
+ if (N || X) {
439
+ var H = typeof l == "function" ? l.displayName || l.name || "Unknown" : l;
440
+ N && tr(D, H), X && nr(D, H);
441
+ }
442
+ return rr(l, N, X, F, _, Te.current, D);
443
+ }
444
+ }
445
+ var at = y.ReactCurrentOwner, zt = y.ReactDebugCurrentFrame;
446
+ function ye(l) {
447
+ if (l) {
448
+ var h = l._owner, E = De(l.type, l._source, h ? h.type : null);
449
+ zt.setExtraStackFrame(E);
450
+ } else
451
+ zt.setExtraStackFrame(null);
452
+ }
453
+ var lt;
454
+ lt = !1;
455
+ function ut(l) {
456
+ return typeof l == "object" && l !== null && l.$$typeof === n;
457
+ }
458
+ function Vt() {
459
+ {
460
+ if (at.current) {
461
+ var l = $(at.current.type);
462
+ if (l)
463
+ return `
464
+
465
+ Check the render method of \`` + l + "`.";
466
+ }
467
+ return "";
468
+ }
469
+ }
470
+ function ir(l) {
471
+ {
472
+ if (l !== void 0) {
473
+ var h = l.fileName.replace(/^.*[\\\/]/, ""), E = l.lineNumber;
474
+ return `
475
+
476
+ Check your code at ` + h + ":" + E + ".";
477
+ }
478
+ return "";
479
+ }
480
+ }
481
+ var $t = {};
482
+ function sr(l) {
483
+ {
484
+ var h = Vt();
485
+ if (!h) {
486
+ var E = typeof l == "string" ? l : l.displayName || l.name;
487
+ E && (h = `
488
+
489
+ Check the top-level render call using <` + E + ">.");
490
+ }
491
+ return h;
492
+ }
493
+ }
494
+ function Bt(l, h) {
495
+ {
496
+ if (!l._store || l._store.validated || l.key != null)
497
+ return;
498
+ l._store.validated = !0;
499
+ var E = sr(h);
500
+ if ($t[E])
501
+ return;
502
+ $t[E] = !0;
503
+ var _ = "";
504
+ l && l._owner && l._owner !== at.current && (_ = " It was passed a child from " + $(l._owner.type) + "."), ye(l), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', E, _), ye(null);
505
+ }
506
+ }
507
+ function Wt(l, h) {
508
+ {
509
+ if (typeof l != "object")
510
+ return;
511
+ if (it(l))
512
+ for (var E = 0; E < l.length; E++) {
513
+ var _ = l[E];
514
+ ut(_) && Bt(_, h);
515
+ }
516
+ else if (ut(l))
517
+ l._store && (l._store.validated = !0);
518
+ else if (l) {
519
+ var F = S(l);
520
+ if (typeof F == "function" && F !== l.entries)
521
+ for (var W = F.call(l), D; !(D = W.next()).done; )
522
+ ut(D.value) && Bt(D.value, h);
523
+ }
524
+ }
525
+ }
526
+ function ar(l) {
527
+ {
528
+ var h = l.type;
529
+ if (h == null || typeof h == "string")
530
+ return;
531
+ var E;
532
+ if (typeof h == "function")
533
+ E = h.propTypes;
534
+ else if (typeof h == "object" && (h.$$typeof === u || // Note: Memo only checks outer props here.
535
+ // Inner props are checked in the reconciler.
536
+ h.$$typeof === d))
537
+ E = h.propTypes;
538
+ else
539
+ return;
540
+ if (E) {
541
+ var _ = $(h);
542
+ Hn(E, l.props, "prop", _, l);
543
+ } else if (h.PropTypes !== void 0 && !lt) {
544
+ lt = !0;
545
+ var F = $(h);
546
+ x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", F || "Unknown");
547
+ }
548
+ typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
549
+ }
550
+ }
551
+ function lr(l) {
552
+ {
553
+ for (var h = Object.keys(l.props), E = 0; E < h.length; E++) {
554
+ var _ = h[E];
555
+ if (_ !== "children" && _ !== "key") {
556
+ ye(l), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), ye(null);
557
+ break;
558
+ }
559
+ }
560
+ l.ref !== null && (ye(l), x("Invalid attribute `ref` supplied to `React.Fragment`."), ye(null));
561
+ }
562
+ }
563
+ function Yt(l, h, E, _, F, W) {
564
+ {
565
+ var D = Y(l);
566
+ if (!D) {
567
+ var N = "";
568
+ (l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && (N += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
569
+ var X = ir(F);
570
+ X ? N += X : N += Vt();
571
+ var K;
572
+ l === null ? K = "null" : it(l) ? K = "array" : l !== void 0 && l.$$typeof === n ? (K = "<" + ($(l.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : K = typeof l, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", K, N);
573
+ }
574
+ var H = or(l, h, E, F, W);
575
+ if (H == null)
576
+ return H;
577
+ if (D) {
578
+ var te = h.children;
579
+ if (te !== void 0)
580
+ if (_)
581
+ if (it(te)) {
582
+ for (var xe = 0; xe < te.length; xe++)
583
+ Wt(te[xe], l);
584
+ Object.freeze && Object.freeze(te);
585
+ } else
586
+ x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
587
+ else
588
+ Wt(te, l);
589
+ }
590
+ return l === r ? lr(H) : ar(H), H;
591
+ }
592
+ }
593
+ function ur(l, h, E) {
594
+ return Yt(l, h, E, !0);
595
+ }
596
+ function cr(l, h, E) {
597
+ return Yt(l, h, E, !1);
598
+ }
599
+ var fr = cr, dr = ur;
600
+ Oe.Fragment = r, Oe.jsx = fr, Oe.jsxs = dr;
601
+ }()), Oe;
602
+ }
603
+ var ke = {};
604
+ /**
605
+ * @license React
606
+ * react-jsx-runtime.production.min.js
607
+ *
608
+ * Copyright (c) Facebook, Inc. and its affiliates.
609
+ *
610
+ * This source code is licensed under the MIT license found in the
611
+ * LICENSE file in the root directory of this source tree.
612
+ */
613
+ var Ht;
614
+ function br() {
615
+ if (Ht)
616
+ return ke;
617
+ Ht = 1;
618
+ var t = gn, n = Symbol.for("react.element"), e = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
619
+ function s(a, u, c) {
620
+ var m, d = {}, v = null, f = null;
621
+ c !== void 0 && (v = "" + c), u.key !== void 0 && (v = "" + u.key), u.ref !== void 0 && (f = u.ref);
622
+ for (m in u)
623
+ r.call(u, m) && !i.hasOwnProperty(m) && (d[m] = u[m]);
624
+ if (a && a.defaultProps)
625
+ for (m in u = a.defaultProps, u)
626
+ d[m] === void 0 && (d[m] = u[m]);
627
+ return { $$typeof: n, type: a, key: v, ref: f, props: d, _owner: o.current };
628
+ }
629
+ return ke.Fragment = e, ke.jsx = s, ke.jsxs = s, ke;
630
+ }
631
+ process.env.NODE_ENV === "production" ? bt.exports = br() : bt.exports = pr();
632
+ var O = bt.exports;
633
+ const re = hn(
634
+ ({ tag: t, children: n, visible: e = !0, asChild: r, ...o }, i) => {
635
+ if (!e)
636
+ return /* @__PURE__ */ O.jsx(O.Fragment, {});
637
+ if (r) {
638
+ const a = bn(n);
639
+ if (!a)
640
+ return /* @__PURE__ */ O.jsx(O.Fragment, {});
641
+ const { Tag: u, props: c } = a;
642
+ return /* @__PURE__ */ O.jsx(u, { ref: i, ...o, ...c });
643
+ }
644
+ const s = t ?? "div";
645
+ return /* @__PURE__ */ O.jsx(s, { ref: i, ...o, children: n });
646
+ }
647
+ ), bn = (t) => {
648
+ if (typeof t != "string") {
649
+ if (Array.isArray(t))
650
+ return t.reduce((n, e) => n || bn(e), void 0);
651
+ if (typeof t == "object" && t !== null)
652
+ return {
653
+ Tag: t.type,
654
+ props: t.props
655
+ };
656
+ }
657
+ }, ae = hn((t, n) => /* @__PURE__ */ O.jsx(re, { tag: "div", ...t, ref: n })), J = (...t) => t.reduce((n, e) => e == null || e === !1 ? n : typeof e == "string" || typeof e == "number" ? n + " " + e : Array.isArray(e) ? n + " " + J(...e) : typeof e == "object" ? n + " " + Object.entries(e).reduce((r, [o, i]) => i == null || i === !1 ? r : typeof i == "string" || typeof i == "number" ? r + " " + o + "-" + i : typeof i == "boolean" && i ? r + " " + o : r, "") : n, ""), qt = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, yn = (t, n) => (e) => {
658
+ var u;
659
+ if ((n == null ? void 0 : n.variants) == null)
660
+ return J(t, e == null ? void 0 : e.class, e == null ? void 0 : e.className);
661
+ const { variants: r, defaultVariants: o } = n, i = Object.keys(r).map((c) => {
662
+ const m = e == null ? void 0 : e[c], d = o == null ? void 0 : o[c];
663
+ if (m === null)
664
+ return null;
665
+ const v = qt(m) || qt(d);
666
+ return r[c][v];
667
+ }), s = e && Object.entries(e).reduce(
668
+ (c, [m, d]) => (d === void 0 || (c[m] = d), c),
669
+ {}
670
+ ), a = (u = n == null ? void 0 : n.compoundVariants) == null ? void 0 : u.reduce(
671
+ (c, { class: m, className: d, ...v }) => Object.entries(v).every(
672
+ ([f, p]) => Array.isArray(p) ? p.includes(
673
+ {
674
+ ...o,
675
+ ...s
676
+ }[f]
677
+ ) : {
678
+ ...o,
679
+ ...s
680
+ }[f] === p
681
+ ) ? [...c, m, d] : c,
682
+ []
683
+ );
684
+ return J(t, i, a, e == null ? void 0 : e.class, e == null ? void 0 : e.className);
685
+ };
686
+ function xn(t) {
687
+ const { variant: n, className: e, ...r } = t;
688
+ return /* @__PURE__ */ O.jsx(ae, { ...r, className: yr({ variant: n, className: e }) });
689
+ }
690
+ const yr = yn(
691
+ "zen__badge inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors whitespace-nowrap",
692
+ {
693
+ variants: {
694
+ variant: {
695
+ default: "border-transparent bg-primary text-primary-foreground shadow",
696
+ secondary: "border-transparent bg-secondary text-secondary-foreground",
697
+ destructive: "border-transparent bg-destructive text-destructive-foreground shadow",
698
+ outline: "text-foreground"
699
+ }
700
+ },
701
+ defaultVariants: {
702
+ variant: "default"
703
+ }
704
+ }
705
+ ), xr = (t) => {
706
+ let { children: n, className: e, variant: r = "default", size: o = "default", ...i } = t;
707
+ return /* @__PURE__ */ O.jsx(re, { tag: "button", className: wr({ variant: r, size: o, className: e }), ...i, children: n });
708
+ }, wr = yn(
709
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
710
+ {
711
+ variants: {
712
+ variant: {
713
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
714
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
715
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
716
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
717
+ ghost: "hover:bg-accent hover:text-accent-foreground",
718
+ link: "text-primary underline-offset-4 hover:underline",
719
+ icon: ""
720
+ },
721
+ size: {
722
+ default: "h-9 px-4 py-2",
723
+ sm: "h-8 rounded-md px-3 text-xs",
724
+ lg: "h-10 rounded-md px-8",
725
+ icon: ""
726
+ }
727
+ },
728
+ defaultVariants: {
729
+ variant: "default",
730
+ size: "default"
731
+ }
732
+ }
733
+ );
734
+ function ce(t) {
735
+ return wn(t) ? (t.nodeName || "").toLowerCase() : "#document";
736
+ }
737
+ function Z(t) {
738
+ var n;
739
+ return (t == null || (n = t.ownerDocument) == null ? void 0 : n.defaultView) || window;
740
+ }
741
+ function le(t) {
742
+ var n;
743
+ return (n = (wn(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : n.documentElement;
744
+ }
745
+ function wn(t) {
746
+ return t instanceof Node || t instanceof Z(t).Node;
747
+ }
748
+ function U(t) {
749
+ return t instanceof Element || t instanceof Z(t).Element;
750
+ }
751
+ function Q(t) {
752
+ return t instanceof HTMLElement || t instanceof Z(t).HTMLElement;
753
+ }
754
+ function yt(t) {
755
+ return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof Z(t).ShadowRoot;
756
+ }
757
+ function _e(t) {
758
+ const {
759
+ overflow: n,
760
+ overflowX: e,
761
+ overflowY: r,
762
+ display: o
763
+ } = ee(t);
764
+ return /auto|scroll|overlay|hidden|clip/.test(n + r + e) && !["inline", "contents"].includes(o);
765
+ }
766
+ function Er(t) {
767
+ return ["table", "td", "th"].includes(ce(t));
768
+ }
769
+ function Tt(t) {
770
+ const n = Ot(), e = ee(t);
771
+ return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !n && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !n && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (e.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (e.contain || "").includes(r));
772
+ }
773
+ function Rr(t) {
774
+ let n = ge(t);
775
+ for (; Q(n) && !Ce(n); ) {
776
+ if (Tt(n))
777
+ return n;
778
+ n = ge(n);
779
+ }
780
+ return null;
781
+ }
782
+ function Ot() {
783
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
784
+ }
785
+ function Ce(t) {
786
+ return ["html", "body", "#document"].includes(ce(t));
787
+ }
788
+ function ee(t) {
789
+ return Z(t).getComputedStyle(t);
790
+ }
791
+ function Qe(t) {
792
+ return U(t) ? {
793
+ scrollLeft: t.scrollLeft,
794
+ scrollTop: t.scrollTop
795
+ } : {
796
+ scrollLeft: t.pageXOffset,
797
+ scrollTop: t.pageYOffset
798
+ };
799
+ }
800
+ function ge(t) {
801
+ if (ce(t) === "html")
802
+ return t;
803
+ const n = (
804
+ // Step into the shadow DOM of the parent of a slotted node.
805
+ t.assignedSlot || // DOM Element detected.
806
+ t.parentNode || // ShadowRoot detected.
807
+ yt(t) && t.host || // Fallback.
808
+ le(t)
809
+ );
810
+ return yt(n) ? n.host : n;
811
+ }
812
+ function En(t) {
813
+ const n = ge(t);
814
+ return Ce(n) ? t.ownerDocument ? t.ownerDocument.body : t.body : Q(n) && _e(n) ? n : En(n);
815
+ }
816
+ function ue(t, n, e) {
817
+ var r;
818
+ n === void 0 && (n = []), e === void 0 && (e = !0);
819
+ const o = En(t), i = o === ((r = t.ownerDocument) == null ? void 0 : r.body), s = Z(o);
820
+ return i ? n.concat(s, s.visualViewport || [], _e(o) ? o : [], s.frameElement && e ? ue(s.frameElement) : []) : n.concat(o, ue(o, [], e));
821
+ }
822
+ function Cr(t) {
823
+ let n = t.activeElement;
824
+ for (; ((e = n) == null || (e = e.shadowRoot) == null ? void 0 : e.activeElement) != null; ) {
825
+ var e;
826
+ n = n.shadowRoot.activeElement;
827
+ }
828
+ return n;
829
+ }
830
+ function Be(t, n) {
831
+ if (!t || !n)
832
+ return !1;
833
+ const e = n.getRootNode && n.getRootNode();
834
+ if (t.contains(n))
835
+ return !0;
836
+ if (e && yt(e)) {
837
+ let r = n;
838
+ for (; r; ) {
839
+ if (t === r)
840
+ return !0;
841
+ r = r.parentNode || r.host;
842
+ }
843
+ }
844
+ return !1;
845
+ }
846
+ function Sr() {
847
+ return /apple/i.test(navigator.vendor);
848
+ }
849
+ function We(t, n) {
850
+ const e = ["mouse", "pen"];
851
+ return n || e.push("", void 0), e.includes(t);
852
+ }
853
+ function Tr(t) {
854
+ return "nativeEvent" in t;
855
+ }
856
+ function Or(t) {
857
+ return t.matches("html,body");
858
+ }
859
+ function me(t) {
860
+ return (t == null ? void 0 : t.ownerDocument) || document;
861
+ }
862
+ function ct(t, n) {
863
+ if (n == null)
864
+ return !1;
865
+ if ("composedPath" in t)
866
+ return t.composedPath().includes(n);
867
+ const e = t;
868
+ return e.target != null && n.contains(e.target);
869
+ }
870
+ function Ie(t) {
871
+ return "composedPath" in t ? t.composedPath()[0] : t.target;
872
+ }
873
+ const kr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
874
+ function Ir(t) {
875
+ return Q(t) && t.matches(kr);
876
+ }
877
+ const Ye = Math.min, ve = Math.max, Ue = Math.round, ze = Math.floor, fe = (t) => ({
878
+ x: t,
879
+ y: t
880
+ }), Pr = {
881
+ left: "right",
882
+ right: "left",
883
+ bottom: "top",
884
+ top: "bottom"
885
+ }, _r = {
886
+ start: "end",
887
+ end: "start"
888
+ };
889
+ function Xt(t, n, e) {
890
+ return ve(t, Ye(n, e));
891
+ }
892
+ function et(t, n) {
893
+ return typeof t == "function" ? t(n) : t;
894
+ }
895
+ function he(t) {
896
+ return t.split("-")[0];
897
+ }
898
+ function tt(t) {
899
+ return t.split("-")[1];
900
+ }
901
+ function Rn(t) {
902
+ return t === "x" ? "y" : "x";
903
+ }
904
+ function Cn(t) {
905
+ return t === "y" ? "height" : "width";
906
+ }
907
+ function nt(t) {
908
+ return ["top", "bottom"].includes(he(t)) ? "y" : "x";
909
+ }
910
+ function Sn(t) {
911
+ return Rn(nt(t));
912
+ }
913
+ function Mr(t, n, e) {
914
+ e === void 0 && (e = !1);
915
+ const r = tt(t), o = Sn(t), i = Cn(o);
916
+ let s = o === "x" ? r === (e ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
917
+ return n.reference[i] > n.floating[i] && (s = Ke(s)), [s, Ke(s)];
918
+ }
919
+ function Ar(t) {
920
+ const n = Ke(t);
921
+ return [xt(t), n, xt(n)];
922
+ }
923
+ function xt(t) {
924
+ return t.replace(/start|end/g, (n) => _r[n]);
925
+ }
926
+ function jr(t, n, e) {
927
+ const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
928
+ switch (t) {
929
+ case "top":
930
+ case "bottom":
931
+ return e ? n ? o : r : n ? r : o;
932
+ case "left":
933
+ case "right":
934
+ return n ? i : s;
935
+ default:
936
+ return [];
937
+ }
938
+ }
939
+ function Nr(t, n, e, r) {
940
+ const o = tt(t);
941
+ let i = jr(he(t), e === "start", r);
942
+ return o && (i = i.map((s) => s + "-" + o), n && (i = i.concat(i.map(xt)))), i;
943
+ }
944
+ function Ke(t) {
945
+ return t.replace(/left|right|bottom|top/g, (n) => Pr[n]);
946
+ }
947
+ function Dr(t) {
948
+ return {
949
+ top: 0,
950
+ right: 0,
951
+ bottom: 0,
952
+ left: 0,
953
+ ...t
954
+ };
955
+ }
956
+ function Lr(t) {
957
+ return typeof t != "number" ? Dr(t) : {
958
+ top: t,
959
+ right: t,
960
+ bottom: t,
961
+ left: t
962
+ };
963
+ }
964
+ function He(t) {
965
+ return {
966
+ ...t,
967
+ top: t.y,
968
+ left: t.x,
969
+ right: t.x + t.width,
970
+ bottom: t.y + t.height
971
+ };
972
+ }
973
+ function Gt(t, n, e) {
974
+ let {
975
+ reference: r,
976
+ floating: o
977
+ } = t;
978
+ const i = nt(n), s = Sn(n), a = Cn(s), u = he(n), c = i === "y", m = r.x + r.width / 2 - o.width / 2, d = r.y + r.height / 2 - o.height / 2, v = r[a] / 2 - o[a] / 2;
979
+ let f;
980
+ switch (u) {
981
+ case "top":
982
+ f = {
983
+ x: m,
984
+ y: r.y - o.height
985
+ };
986
+ break;
987
+ case "bottom":
988
+ f = {
989
+ x: m,
990
+ y: r.y + r.height
991
+ };
992
+ break;
993
+ case "right":
994
+ f = {
995
+ x: r.x + r.width,
996
+ y: d
997
+ };
998
+ break;
999
+ case "left":
1000
+ f = {
1001
+ x: r.x - o.width,
1002
+ y: d
1003
+ };
1004
+ break;
1005
+ default:
1006
+ f = {
1007
+ x: r.x,
1008
+ y: r.y
1009
+ };
1010
+ }
1011
+ switch (tt(n)) {
1012
+ case "start":
1013
+ f[s] -= v * (e && c ? -1 : 1);
1014
+ break;
1015
+ case "end":
1016
+ f[s] += v * (e && c ? -1 : 1);
1017
+ break;
1018
+ }
1019
+ return f;
1020
+ }
1021
+ const Fr = async (t, n, e) => {
1022
+ const {
1023
+ placement: r = "bottom",
1024
+ strategy: o = "absolute",
1025
+ middleware: i = [],
1026
+ platform: s
1027
+ } = e, a = i.filter(Boolean), u = await (s.isRTL == null ? void 0 : s.isRTL(n));
1028
+ let c = await s.getElementRects({
1029
+ reference: t,
1030
+ floating: n,
1031
+ strategy: o
1032
+ }), {
1033
+ x: m,
1034
+ y: d
1035
+ } = Gt(c, r, u), v = r, f = {}, p = 0;
1036
+ for (let g = 0; g < a.length; g++) {
1037
+ const {
1038
+ name: S,
1039
+ fn: y
1040
+ } = a[g], {
1041
+ x,
1042
+ y: A,
1043
+ data: T,
1044
+ reset: P
1045
+ } = await y({
1046
+ x: m,
1047
+ y: d,
1048
+ initialPlacement: r,
1049
+ placement: v,
1050
+ strategy: o,
1051
+ middlewareData: f,
1052
+ rects: c,
1053
+ platform: s,
1054
+ elements: {
1055
+ reference: t,
1056
+ floating: n
1057
+ }
1058
+ });
1059
+ if (m = x ?? m, d = A ?? d, f = {
1060
+ ...f,
1061
+ [S]: {
1062
+ ...f[S],
1063
+ ...T
1064
+ }
1065
+ }, P && p <= 50) {
1066
+ p++, typeof P == "object" && (P.placement && (v = P.placement), P.rects && (c = P.rects === !0 ? await s.getElementRects({
1067
+ reference: t,
1068
+ floating: n,
1069
+ strategy: o
1070
+ }) : P.rects), {
1071
+ x: m,
1072
+ y: d
1073
+ } = Gt(c, v, u)), g = -1;
1074
+ continue;
1075
+ }
1076
+ }
1077
+ return {
1078
+ x: m,
1079
+ y: d,
1080
+ placement: v,
1081
+ strategy: o,
1082
+ middlewareData: f
1083
+ };
1084
+ };
1085
+ async function Tn(t, n) {
1086
+ var e;
1087
+ n === void 0 && (n = {});
1088
+ const {
1089
+ x: r,
1090
+ y: o,
1091
+ platform: i,
1092
+ rects: s,
1093
+ elements: a,
1094
+ strategy: u
1095
+ } = t, {
1096
+ boundary: c = "clippingAncestors",
1097
+ rootBoundary: m = "viewport",
1098
+ elementContext: d = "floating",
1099
+ altBoundary: v = !1,
1100
+ padding: f = 0
1101
+ } = et(n, t), p = Lr(f), S = a[v ? d === "floating" ? "reference" : "floating" : d], y = He(await i.getClippingRect({
1102
+ element: (e = await (i.isElement == null ? void 0 : i.isElement(S))) == null || e ? S : S.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
1103
+ boundary: c,
1104
+ rootBoundary: m,
1105
+ strategy: u
1106
+ })), x = d === "floating" ? {
1107
+ ...s.floating,
1108
+ x: r,
1109
+ y: o
1110
+ } : s.reference, A = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), T = await (i.isElement == null ? void 0 : i.isElement(A)) ? await (i.getScale == null ? void 0 : i.getScale(A)) || {
1111
+ x: 1,
1112
+ y: 1
1113
+ } : {
1114
+ x: 1,
1115
+ y: 1
1116
+ }, P = He(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
1117
+ rect: x,
1118
+ offsetParent: A,
1119
+ strategy: u
1120
+ }) : x);
1121
+ return {
1122
+ top: (y.top - P.top + p.top) / T.y,
1123
+ bottom: (P.bottom - y.bottom + p.bottom) / T.y,
1124
+ left: (y.left - P.left + p.left) / T.x,
1125
+ right: (P.right - y.right + p.right) / T.x
1126
+ };
1127
+ }
1128
+ const zr = function(t) {
1129
+ return t === void 0 && (t = {}), {
1130
+ name: "flip",
1131
+ options: t,
1132
+ async fn(n) {
1133
+ var e, r;
1134
+ const {
1135
+ placement: o,
1136
+ middlewareData: i,
1137
+ rects: s,
1138
+ initialPlacement: a,
1139
+ platform: u,
1140
+ elements: c
1141
+ } = n, {
1142
+ mainAxis: m = !0,
1143
+ crossAxis: d = !0,
1144
+ fallbackPlacements: v,
1145
+ fallbackStrategy: f = "bestFit",
1146
+ fallbackAxisSideDirection: p = "none",
1147
+ flipAlignment: g = !0,
1148
+ ...S
1149
+ } = et(t, n);
1150
+ if ((e = i.arrow) != null && e.alignmentOffset)
1151
+ return {};
1152
+ const y = he(o), x = he(a) === a, A = await (u.isRTL == null ? void 0 : u.isRTL(c.floating)), T = v || (x || !g ? [Ke(a)] : Ar(a));
1153
+ !v && p !== "none" && T.push(...Nr(a, g, p, A));
1154
+ const P = [a, ...T], j = await Tn(n, S), z = [];
1155
+ let I = ((r = i.flip) == null ? void 0 : r.overflows) || [];
1156
+ if (m && z.push(j[y]), d) {
1157
+ const L = Mr(o, s, A);
1158
+ z.push(j[L[0]], j[L[1]]);
1159
+ }
1160
+ if (I = [...I, {
1161
+ placement: o,
1162
+ overflows: z
1163
+ }], !z.every((L) => L <= 0)) {
1164
+ var V, Y;
1165
+ const L = (((V = i.flip) == null ? void 0 : V.index) || 0) + 1, $ = P[L];
1166
+ if ($)
1167
+ return {
1168
+ data: {
1169
+ index: L,
1170
+ overflows: I
1171
+ },
1172
+ reset: {
1173
+ placement: $
1174
+ }
1175
+ };
1176
+ let k = (Y = I.filter((w) => w.overflows[0] <= 0).sort((w, C) => w.overflows[1] - C.overflows[1])[0]) == null ? void 0 : Y.placement;
1177
+ if (!k)
1178
+ switch (f) {
1179
+ case "bestFit": {
1180
+ var B;
1181
+ const w = (B = I.map((C) => [C.placement, C.overflows.filter((M) => M > 0).reduce((M, R) => M + R, 0)]).sort((C, M) => C[1] - M[1])[0]) == null ? void 0 : B[0];
1182
+ w && (k = w);
1183
+ break;
1184
+ }
1185
+ case "initialPlacement":
1186
+ k = a;
1187
+ break;
1188
+ }
1189
+ if (o !== k)
1190
+ return {
1191
+ reset: {
1192
+ placement: k
1193
+ }
1194
+ };
1195
+ }
1196
+ return {};
1197
+ }
1198
+ };
1199
+ };
1200
+ async function Vr(t, n) {
1201
+ const {
1202
+ placement: e,
1203
+ platform: r,
1204
+ elements: o
1205
+ } = t, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = he(e), a = tt(e), u = nt(e) === "y", c = ["left", "top"].includes(s) ? -1 : 1, m = i && u ? -1 : 1, d = et(n, t);
1206
+ let {
1207
+ mainAxis: v,
1208
+ crossAxis: f,
1209
+ alignmentAxis: p
1210
+ } = typeof d == "number" ? {
1211
+ mainAxis: d,
1212
+ crossAxis: 0,
1213
+ alignmentAxis: null
1214
+ } : {
1215
+ mainAxis: 0,
1216
+ crossAxis: 0,
1217
+ alignmentAxis: null,
1218
+ ...d
1219
+ };
1220
+ return a && typeof p == "number" && (f = a === "end" ? p * -1 : p), u ? {
1221
+ x: f * m,
1222
+ y: v * c
1223
+ } : {
1224
+ x: v * c,
1225
+ y: f * m
1226
+ };
1227
+ }
1228
+ const $r = function(t) {
1229
+ return t === void 0 && (t = 0), {
1230
+ name: "offset",
1231
+ options: t,
1232
+ async fn(n) {
1233
+ var e, r;
1234
+ const {
1235
+ x: o,
1236
+ y: i,
1237
+ placement: s,
1238
+ middlewareData: a
1239
+ } = n, u = await Vr(n, t);
1240
+ return s === ((e = a.offset) == null ? void 0 : e.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
1241
+ x: o + u.x,
1242
+ y: i + u.y,
1243
+ data: {
1244
+ ...u,
1245
+ placement: s
1246
+ }
1247
+ };
1248
+ }
1249
+ };
1250
+ }, Br = function(t) {
1251
+ return t === void 0 && (t = {}), {
1252
+ name: "shift",
1253
+ options: t,
1254
+ async fn(n) {
1255
+ const {
1256
+ x: e,
1257
+ y: r,
1258
+ placement: o
1259
+ } = n, {
1260
+ mainAxis: i = !0,
1261
+ crossAxis: s = !1,
1262
+ limiter: a = {
1263
+ fn: (S) => {
1264
+ let {
1265
+ x: y,
1266
+ y: x
1267
+ } = S;
1268
+ return {
1269
+ x: y,
1270
+ y: x
1271
+ };
1272
+ }
1273
+ },
1274
+ ...u
1275
+ } = et(t, n), c = {
1276
+ x: e,
1277
+ y: r
1278
+ }, m = await Tn(n, u), d = nt(he(o)), v = Rn(d);
1279
+ let f = c[v], p = c[d];
1280
+ if (i) {
1281
+ const S = v === "y" ? "top" : "left", y = v === "y" ? "bottom" : "right", x = f + m[S], A = f - m[y];
1282
+ f = Xt(x, f, A);
1283
+ }
1284
+ if (s) {
1285
+ const S = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", x = p + m[S], A = p - m[y];
1286
+ p = Xt(x, p, A);
1287
+ }
1288
+ const g = a.fn({
1289
+ ...n,
1290
+ [v]: f,
1291
+ [d]: p
1292
+ });
1293
+ return {
1294
+ ...g,
1295
+ data: {
1296
+ x: g.x - e,
1297
+ y: g.y - r
1298
+ }
1299
+ };
1300
+ }
1301
+ };
1302
+ };
1303
+ function On(t) {
1304
+ const n = ee(t);
1305
+ let e = parseFloat(n.width) || 0, r = parseFloat(n.height) || 0;
1306
+ const o = Q(t), i = o ? t.offsetWidth : e, s = o ? t.offsetHeight : r, a = Ue(e) !== i || Ue(r) !== s;
1307
+ return a && (e = i, r = s), {
1308
+ width: e,
1309
+ height: r,
1310
+ $: a
1311
+ };
1312
+ }
1313
+ function kt(t) {
1314
+ return U(t) ? t : t.contextElement;
1315
+ }
1316
+ function Re(t) {
1317
+ const n = kt(t);
1318
+ if (!Q(n))
1319
+ return fe(1);
1320
+ const e = n.getBoundingClientRect(), {
1321
+ width: r,
1322
+ height: o,
1323
+ $: i
1324
+ } = On(n);
1325
+ let s = (i ? Ue(e.width) : e.width) / r, a = (i ? Ue(e.height) : e.height) / o;
1326
+ return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1327
+ x: s,
1328
+ y: a
1329
+ };
1330
+ }
1331
+ const Wr = /* @__PURE__ */ fe(0);
1332
+ function kn(t) {
1333
+ const n = Z(t);
1334
+ return !Ot() || !n.visualViewport ? Wr : {
1335
+ x: n.visualViewport.offsetLeft,
1336
+ y: n.visualViewport.offsetTop
1337
+ };
1338
+ }
1339
+ function Yr(t, n, e) {
1340
+ return n === void 0 && (n = !1), !e || n && e !== Z(t) ? !1 : n;
1341
+ }
1342
+ function pe(t, n, e, r) {
1343
+ n === void 0 && (n = !1), e === void 0 && (e = !1);
1344
+ const o = t.getBoundingClientRect(), i = kt(t);
1345
+ let s = fe(1);
1346
+ n && (r ? U(r) && (s = Re(r)) : s = Re(t));
1347
+ const a = Yr(i, e, r) ? kn(i) : fe(0);
1348
+ let u = (o.left + a.x) / s.x, c = (o.top + a.y) / s.y, m = o.width / s.x, d = o.height / s.y;
1349
+ if (i) {
1350
+ const v = Z(i), f = r && U(r) ? Z(r) : r;
1351
+ let p = v.frameElement;
1352
+ for (; p && r && f !== v; ) {
1353
+ const g = Re(p), S = p.getBoundingClientRect(), y = ee(p), x = S.left + (p.clientLeft + parseFloat(y.paddingLeft)) * g.x, A = S.top + (p.clientTop + parseFloat(y.paddingTop)) * g.y;
1354
+ u *= g.x, c *= g.y, m *= g.x, d *= g.y, u += x, c += A, p = Z(p).frameElement;
1355
+ }
1356
+ }
1357
+ return He({
1358
+ width: m,
1359
+ height: d,
1360
+ x: u,
1361
+ y: c
1362
+ });
1363
+ }
1364
+ function Ur(t) {
1365
+ let {
1366
+ rect: n,
1367
+ offsetParent: e,
1368
+ strategy: r
1369
+ } = t;
1370
+ const o = Q(e), i = le(e);
1371
+ if (e === i)
1372
+ return n;
1373
+ let s = {
1374
+ scrollLeft: 0,
1375
+ scrollTop: 0
1376
+ }, a = fe(1);
1377
+ const u = fe(0);
1378
+ if ((o || !o && r !== "fixed") && ((ce(e) !== "body" || _e(i)) && (s = Qe(e)), Q(e))) {
1379
+ const c = pe(e);
1380
+ a = Re(e), u.x = c.x + e.clientLeft, u.y = c.y + e.clientTop;
1381
+ }
1382
+ return {
1383
+ width: n.width * a.x,
1384
+ height: n.height * a.y,
1385
+ x: n.x * a.x - s.scrollLeft * a.x + u.x,
1386
+ y: n.y * a.y - s.scrollTop * a.y + u.y
1387
+ };
1388
+ }
1389
+ function Kr(t) {
1390
+ return Array.from(t.getClientRects());
1391
+ }
1392
+ function In(t) {
1393
+ return pe(le(t)).left + Qe(t).scrollLeft;
1394
+ }
1395
+ function Hr(t) {
1396
+ const n = le(t), e = Qe(t), r = t.ownerDocument.body, o = ve(n.scrollWidth, n.clientWidth, r.scrollWidth, r.clientWidth), i = ve(n.scrollHeight, n.clientHeight, r.scrollHeight, r.clientHeight);
1397
+ let s = -e.scrollLeft + In(t);
1398
+ const a = -e.scrollTop;
1399
+ return ee(r).direction === "rtl" && (s += ve(n.clientWidth, r.clientWidth) - o), {
1400
+ width: o,
1401
+ height: i,
1402
+ x: s,
1403
+ y: a
1404
+ };
1405
+ }
1406
+ function qr(t, n) {
1407
+ const e = Z(t), r = le(t), o = e.visualViewport;
1408
+ let i = r.clientWidth, s = r.clientHeight, a = 0, u = 0;
1409
+ if (o) {
1410
+ i = o.width, s = o.height;
1411
+ const c = Ot();
1412
+ (!c || c && n === "fixed") && (a = o.offsetLeft, u = o.offsetTop);
1413
+ }
1414
+ return {
1415
+ width: i,
1416
+ height: s,
1417
+ x: a,
1418
+ y: u
1419
+ };
1420
+ }
1421
+ function Xr(t, n) {
1422
+ const e = pe(t, !0, n === "fixed"), r = e.top + t.clientTop, o = e.left + t.clientLeft, i = Q(t) ? Re(t) : fe(1), s = t.clientWidth * i.x, a = t.clientHeight * i.y, u = o * i.x, c = r * i.y;
1423
+ return {
1424
+ width: s,
1425
+ height: a,
1426
+ x: u,
1427
+ y: c
1428
+ };
1429
+ }
1430
+ function Jt(t, n, e) {
1431
+ let r;
1432
+ if (n === "viewport")
1433
+ r = qr(t, e);
1434
+ else if (n === "document")
1435
+ r = Hr(le(t));
1436
+ else if (U(n))
1437
+ r = Xr(n, e);
1438
+ else {
1439
+ const o = kn(t);
1440
+ r = {
1441
+ ...n,
1442
+ x: n.x - o.x,
1443
+ y: n.y - o.y
1444
+ };
1445
+ }
1446
+ return He(r);
1447
+ }
1448
+ function Pn(t, n) {
1449
+ const e = ge(t);
1450
+ return e === n || !U(e) || Ce(e) ? !1 : ee(e).position === "fixed" || Pn(e, n);
1451
+ }
1452
+ function Gr(t, n) {
1453
+ const e = n.get(t);
1454
+ if (e)
1455
+ return e;
1456
+ let r = ue(t, [], !1).filter((a) => U(a) && ce(a) !== "body"), o = null;
1457
+ const i = ee(t).position === "fixed";
1458
+ let s = i ? ge(t) : t;
1459
+ for (; U(s) && !Ce(s); ) {
1460
+ const a = ee(s), u = Tt(s);
1461
+ !u && a.position === "fixed" && (o = null), (i ? !u && !o : !u && a.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || _e(s) && !u && Pn(t, s)) ? r = r.filter((m) => m !== s) : o = a, s = ge(s);
1462
+ }
1463
+ return n.set(t, r), r;
1464
+ }
1465
+ function Jr(t) {
1466
+ let {
1467
+ element: n,
1468
+ boundary: e,
1469
+ rootBoundary: r,
1470
+ strategy: o
1471
+ } = t;
1472
+ const s = [...e === "clippingAncestors" ? Gr(n, this._c) : [].concat(e), r], a = s[0], u = s.reduce((c, m) => {
1473
+ const d = Jt(n, m, o);
1474
+ return c.top = ve(d.top, c.top), c.right = Ye(d.right, c.right), c.bottom = Ye(d.bottom, c.bottom), c.left = ve(d.left, c.left), c;
1475
+ }, Jt(n, a, o));
1476
+ return {
1477
+ width: u.right - u.left,
1478
+ height: u.bottom - u.top,
1479
+ x: u.left,
1480
+ y: u.top
1481
+ };
1482
+ }
1483
+ function Zr(t) {
1484
+ return On(t);
1485
+ }
1486
+ function Qr(t, n, e) {
1487
+ const r = Q(n), o = le(n), i = e === "fixed", s = pe(t, !0, i, n);
1488
+ let a = {
1489
+ scrollLeft: 0,
1490
+ scrollTop: 0
1491
+ };
1492
+ const u = fe(0);
1493
+ if (r || !r && !i)
1494
+ if ((ce(n) !== "body" || _e(o)) && (a = Qe(n)), r) {
1495
+ const c = pe(n, !0, i, n);
1496
+ u.x = c.x + n.clientLeft, u.y = c.y + n.clientTop;
1497
+ } else
1498
+ o && (u.x = In(o));
1499
+ return {
1500
+ x: s.left + a.scrollLeft - u.x,
1501
+ y: s.top + a.scrollTop - u.y,
1502
+ width: s.width,
1503
+ height: s.height
1504
+ };
1505
+ }
1506
+ function Zt(t, n) {
1507
+ return !Q(t) || ee(t).position === "fixed" ? null : n ? n(t) : t.offsetParent;
1508
+ }
1509
+ function _n(t, n) {
1510
+ const e = Z(t);
1511
+ if (!Q(t))
1512
+ return e;
1513
+ let r = Zt(t, n);
1514
+ for (; r && Er(r) && ee(r).position === "static"; )
1515
+ r = Zt(r, n);
1516
+ return r && (ce(r) === "html" || ce(r) === "body" && ee(r).position === "static" && !Tt(r)) ? e : r || Rr(t) || e;
1517
+ }
1518
+ const eo = async function(t) {
1519
+ let {
1520
+ reference: n,
1521
+ floating: e,
1522
+ strategy: r
1523
+ } = t;
1524
+ const o = this.getOffsetParent || _n, i = this.getDimensions;
1525
+ return {
1526
+ reference: Qr(n, await o(e), r),
1527
+ floating: {
1528
+ x: 0,
1529
+ y: 0,
1530
+ ...await i(e)
1531
+ }
1532
+ };
1533
+ };
1534
+ function to(t) {
1535
+ return ee(t).direction === "rtl";
1536
+ }
1537
+ const no = {
1538
+ convertOffsetParentRelativeRectToViewportRelativeRect: Ur,
1539
+ getDocumentElement: le,
1540
+ getClippingRect: Jr,
1541
+ getOffsetParent: _n,
1542
+ getElementRects: eo,
1543
+ getClientRects: Kr,
1544
+ getDimensions: Zr,
1545
+ getScale: Re,
1546
+ isElement: U,
1547
+ isRTL: to
1548
+ };
1549
+ function ro(t, n) {
1550
+ let e = null, r;
1551
+ const o = le(t);
1552
+ function i() {
1553
+ clearTimeout(r), e && e.disconnect(), e = null;
1554
+ }
1555
+ function s(a, u) {
1556
+ a === void 0 && (a = !1), u === void 0 && (u = 1), i();
1557
+ const {
1558
+ left: c,
1559
+ top: m,
1560
+ width: d,
1561
+ height: v
1562
+ } = t.getBoundingClientRect();
1563
+ if (a || n(), !d || !v)
1564
+ return;
1565
+ const f = ze(m), p = ze(o.clientWidth - (c + d)), g = ze(o.clientHeight - (m + v)), S = ze(c), x = {
1566
+ rootMargin: -f + "px " + -p + "px " + -g + "px " + -S + "px",
1567
+ threshold: ve(0, Ye(1, u)) || 1
1568
+ };
1569
+ let A = !0;
1570
+ function T(P) {
1571
+ const j = P[0].intersectionRatio;
1572
+ if (j !== u) {
1573
+ if (!A)
1574
+ return s();
1575
+ j ? s(!1, j) : r = setTimeout(() => {
1576
+ s(!1, 1e-7);
1577
+ }, 100);
1578
+ }
1579
+ A = !1;
1580
+ }
1581
+ try {
1582
+ e = new IntersectionObserver(T, {
1583
+ ...x,
1584
+ // Handle <iframe>s
1585
+ root: o.ownerDocument
1586
+ });
1587
+ } catch {
1588
+ e = new IntersectionObserver(T, x);
1589
+ }
1590
+ e.observe(t);
1591
+ }
1592
+ return s(!0), i;
1593
+ }
1594
+ function oo(t, n, e, r) {
1595
+ r === void 0 && (r = {});
1596
+ const {
1597
+ ancestorScroll: o = !0,
1598
+ ancestorResize: i = !0,
1599
+ elementResize: s = typeof ResizeObserver == "function",
1600
+ layoutShift: a = typeof IntersectionObserver == "function",
1601
+ animationFrame: u = !1
1602
+ } = r, c = kt(t), m = o || i ? [...c ? ue(c) : [], ...ue(n)] : [];
1603
+ m.forEach((y) => {
1604
+ o && y.addEventListener("scroll", e, {
1605
+ passive: !0
1606
+ }), i && y.addEventListener("resize", e);
1607
+ });
1608
+ const d = c && a ? ro(c, e) : null;
1609
+ let v = -1, f = null;
1610
+ s && (f = new ResizeObserver((y) => {
1611
+ let [x] = y;
1612
+ x && x.target === c && f && (f.unobserve(n), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
1613
+ f && f.observe(n);
1614
+ })), e();
1615
+ }), c && !u && f.observe(c), f.observe(n));
1616
+ let p, g = u ? pe(t) : null;
1617
+ u && S();
1618
+ function S() {
1619
+ const y = pe(t);
1620
+ g && (y.x !== g.x || y.y !== g.y || y.width !== g.width || y.height !== g.height) && e(), g = y, p = requestAnimationFrame(S);
1621
+ }
1622
+ return e(), () => {
1623
+ m.forEach((y) => {
1624
+ o && y.removeEventListener("scroll", e), i && y.removeEventListener("resize", e);
1625
+ }), d && d(), f && f.disconnect(), f = null, u && cancelAnimationFrame(p);
1626
+ };
1627
+ }
1628
+ const io = (t, n, e) => {
1629
+ const r = /* @__PURE__ */ new Map(), o = {
1630
+ platform: no,
1631
+ ...e
1632
+ }, i = {
1633
+ ...o.platform,
1634
+ _c: r
1635
+ };
1636
+ return Fr(t, n, {
1637
+ ...o,
1638
+ platform: i
1639
+ });
1640
+ };
1641
+ var Ve = typeof document < "u" ? pn : $e;
1642
+ function qe(t, n) {
1643
+ if (t === n)
1644
+ return !0;
1645
+ if (typeof t != typeof n)
1646
+ return !1;
1647
+ if (typeof t == "function" && t.toString() === n.toString())
1648
+ return !0;
1649
+ let e, r, o;
1650
+ if (t && n && typeof t == "object") {
1651
+ if (Array.isArray(t)) {
1652
+ if (e = t.length, e != n.length)
1653
+ return !1;
1654
+ for (r = e; r-- !== 0; )
1655
+ if (!qe(t[r], n[r]))
1656
+ return !1;
1657
+ return !0;
1658
+ }
1659
+ if (o = Object.keys(t), e = o.length, e !== Object.keys(n).length)
1660
+ return !1;
1661
+ for (r = e; r-- !== 0; )
1662
+ if (!{}.hasOwnProperty.call(n, o[r]))
1663
+ return !1;
1664
+ for (r = e; r-- !== 0; ) {
1665
+ const i = o[r];
1666
+ if (!(i === "_owner" && t.$$typeof) && !qe(t[i], n[i]))
1667
+ return !1;
1668
+ }
1669
+ return !0;
1670
+ }
1671
+ return t !== t && n !== n;
1672
+ }
1673
+ function Mn(t) {
1674
+ return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1675
+ }
1676
+ function Qt(t, n) {
1677
+ const e = Mn(t);
1678
+ return Math.round(n * e) / e;
1679
+ }
1680
+ function en(t) {
1681
+ const n = b.useRef(t);
1682
+ return Ve(() => {
1683
+ n.current = t;
1684
+ }), n;
1685
+ }
1686
+ function so(t) {
1687
+ t === void 0 && (t = {});
1688
+ const {
1689
+ placement: n = "bottom",
1690
+ strategy: e = "absolute",
1691
+ middleware: r = [],
1692
+ platform: o,
1693
+ elements: {
1694
+ reference: i,
1695
+ floating: s
1696
+ } = {},
1697
+ transform: a = !0,
1698
+ whileElementsMounted: u,
1699
+ open: c
1700
+ } = t, [m, d] = b.useState({
1701
+ x: 0,
1702
+ y: 0,
1703
+ strategy: e,
1704
+ placement: n,
1705
+ middlewareData: {},
1706
+ isPositioned: !1
1707
+ }), [v, f] = b.useState(r);
1708
+ qe(v, r) || f(r);
1709
+ const [p, g] = b.useState(null), [S, y] = b.useState(null), x = b.useCallback((C) => {
1710
+ C != j.current && (j.current = C, g(C));
1711
+ }, [g]), A = b.useCallback((C) => {
1712
+ C !== z.current && (z.current = C, y(C));
1713
+ }, [y]), T = i || p, P = s || S, j = b.useRef(null), z = b.useRef(null), I = b.useRef(m), V = en(u), Y = en(o), B = b.useCallback(() => {
1714
+ if (!j.current || !z.current)
1715
+ return;
1716
+ const C = {
1717
+ placement: n,
1718
+ strategy: e,
1719
+ middleware: v
1720
+ };
1721
+ Y.current && (C.platform = Y.current), io(j.current, z.current, C).then((M) => {
1722
+ const R = {
1723
+ ...M,
1724
+ isPositioned: !0
1725
+ };
1726
+ L.current && !qe(I.current, R) && (I.current = R, vr.flushSync(() => {
1727
+ d(R);
1728
+ }));
1729
+ });
1730
+ }, [v, n, e, Y]);
1731
+ Ve(() => {
1732
+ c === !1 && I.current.isPositioned && (I.current.isPositioned = !1, d((C) => ({
1733
+ ...C,
1734
+ isPositioned: !1
1735
+ })));
1736
+ }, [c]);
1737
+ const L = b.useRef(!1);
1738
+ Ve(() => (L.current = !0, () => {
1739
+ L.current = !1;
1740
+ }), []), Ve(() => {
1741
+ if (T && (j.current = T), P && (z.current = P), T && P) {
1742
+ if (V.current)
1743
+ return V.current(T, P, B);
1744
+ B();
1745
+ }
1746
+ }, [T, P, B, V]);
1747
+ const $ = b.useMemo(() => ({
1748
+ reference: j,
1749
+ floating: z,
1750
+ setReference: x,
1751
+ setFloating: A
1752
+ }), [x, A]), k = b.useMemo(() => ({
1753
+ reference: T,
1754
+ floating: P
1755
+ }), [T, P]), w = b.useMemo(() => {
1756
+ const C = {
1757
+ position: e,
1758
+ left: 0,
1759
+ top: 0
1760
+ };
1761
+ if (!k.floating)
1762
+ return C;
1763
+ const M = Qt(k.floating, m.x), R = Qt(k.floating, m.y);
1764
+ return a ? {
1765
+ ...C,
1766
+ transform: "translate(" + M + "px, " + R + "px)",
1767
+ ...Mn(k.floating) >= 1.5 && {
1768
+ willChange: "transform"
1769
+ }
1770
+ } : {
1771
+ position: e,
1772
+ left: M,
1773
+ top: R
1774
+ };
1775
+ }, [e, a, k.floating, m.x, m.y]);
1776
+ return b.useMemo(() => ({
1777
+ ...m,
1778
+ update: B,
1779
+ refs: $,
1780
+ elements: k,
1781
+ floatingStyles: w
1782
+ }), [m, B, $, k, w]);
1783
+ }
1784
+ /*!
1785
+ * tabbable 6.2.0
1786
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
1787
+ */
1788
+ var ao = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], wt = /* @__PURE__ */ ao.join(","), An = typeof Element > "u", Pe = An ? function() {
1789
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Xe = !An && Element.prototype.getRootNode ? function(t) {
1790
+ var n;
1791
+ return t == null || (n = t.getRootNode) === null || n === void 0 ? void 0 : n.call(t);
1792
+ } : function(t) {
1793
+ return t == null ? void 0 : t.ownerDocument;
1794
+ }, Ge = function t(n, e) {
1795
+ var r;
1796
+ e === void 0 && (e = !0);
1797
+ var o = n == null || (r = n.getAttribute) === null || r === void 0 ? void 0 : r.call(n, "inert"), i = o === "" || o === "true", s = i || e && n && t(n.parentNode);
1798
+ return s;
1799
+ }, lo = function(n) {
1800
+ var e, r = n == null || (e = n.getAttribute) === null || e === void 0 ? void 0 : e.call(n, "contenteditable");
1801
+ return r === "" || r === "true";
1802
+ }, uo = function(n, e, r) {
1803
+ if (Ge(n))
1804
+ return [];
1805
+ var o = Array.prototype.slice.apply(n.querySelectorAll(wt));
1806
+ return e && Pe.call(n, wt) && o.unshift(n), o = o.filter(r), o;
1807
+ }, co = function t(n, e, r) {
1808
+ for (var o = [], i = Array.from(n); i.length; ) {
1809
+ var s = i.shift();
1810
+ if (!Ge(s, !1))
1811
+ if (s.tagName === "SLOT") {
1812
+ var a = s.assignedElements(), u = a.length ? a : s.children, c = t(u, !0, r);
1813
+ r.flatten ? o.push.apply(o, c) : o.push({
1814
+ scopeParent: s,
1815
+ candidates: c
1816
+ });
1817
+ } else {
1818
+ var m = Pe.call(s, wt);
1819
+ m && r.filter(s) && (e || !n.includes(s)) && o.push(s);
1820
+ var d = s.shadowRoot || // check for an undisclosed shadow
1821
+ typeof r.getShadowRoot == "function" && r.getShadowRoot(s), v = !Ge(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
1822
+ if (d && v) {
1823
+ var f = t(d === !0 ? s.children : d.children, !0, r);
1824
+ r.flatten ? o.push.apply(o, f) : o.push({
1825
+ scopeParent: s,
1826
+ candidates: f
1827
+ });
1828
+ } else
1829
+ i.unshift.apply(i, s.children);
1830
+ }
1831
+ }
1832
+ return o;
1833
+ }, jn = function(n) {
1834
+ return !isNaN(parseInt(n.getAttribute("tabindex"), 10));
1835
+ }, Nn = function(n) {
1836
+ if (!n)
1837
+ throw new Error("No node provided");
1838
+ return n.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(n.tagName) || lo(n)) && !jn(n) ? 0 : n.tabIndex;
1839
+ }, fo = function(n, e) {
1840
+ var r = Nn(n);
1841
+ return r < 0 && e && !jn(n) ? 0 : r;
1842
+ }, mo = function(n, e) {
1843
+ return n.tabIndex === e.tabIndex ? n.documentOrder - e.documentOrder : n.tabIndex - e.tabIndex;
1844
+ }, Dn = function(n) {
1845
+ return n.tagName === "INPUT";
1846
+ }, vo = function(n) {
1847
+ return Dn(n) && n.type === "hidden";
1848
+ }, go = function(n) {
1849
+ var e = n.tagName === "DETAILS" && Array.prototype.slice.apply(n.children).some(function(r) {
1850
+ return r.tagName === "SUMMARY";
1851
+ });
1852
+ return e;
1853
+ }, ho = function(n, e) {
1854
+ for (var r = 0; r < n.length; r++)
1855
+ if (n[r].checked && n[r].form === e)
1856
+ return n[r];
1857
+ }, po = function(n) {
1858
+ if (!n.name)
1859
+ return !0;
1860
+ var e = n.form || Xe(n), r = function(a) {
1861
+ return e.querySelectorAll('input[type="radio"][name="' + a + '"]');
1862
+ }, o;
1863
+ if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
1864
+ o = r(window.CSS.escape(n.name));
1865
+ else
1866
+ try {
1867
+ o = r(n.name);
1868
+ } catch (s) {
1869
+ return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", s.message), !1;
1870
+ }
1871
+ var i = ho(o, n.form);
1872
+ return !i || i === n;
1873
+ }, bo = function(n) {
1874
+ return Dn(n) && n.type === "radio";
1875
+ }, yo = function(n) {
1876
+ return bo(n) && !po(n);
1877
+ }, xo = function(n) {
1878
+ var e, r = n && Xe(n), o = (e = r) === null || e === void 0 ? void 0 : e.host, i = !1;
1879
+ if (r && r !== n) {
1880
+ var s, a, u;
1881
+ for (i = !!((s = o) !== null && s !== void 0 && (a = s.ownerDocument) !== null && a !== void 0 && a.contains(o) || n != null && (u = n.ownerDocument) !== null && u !== void 0 && u.contains(n)); !i && o; ) {
1882
+ var c, m, d;
1883
+ r = Xe(o), o = (c = r) === null || c === void 0 ? void 0 : c.host, i = !!((m = o) !== null && m !== void 0 && (d = m.ownerDocument) !== null && d !== void 0 && d.contains(o));
1884
+ }
1885
+ }
1886
+ return i;
1887
+ }, tn = function(n) {
1888
+ var e = n.getBoundingClientRect(), r = e.width, o = e.height;
1889
+ return r === 0 && o === 0;
1890
+ }, wo = function(n, e) {
1891
+ var r = e.displayCheck, o = e.getShadowRoot;
1892
+ if (getComputedStyle(n).visibility === "hidden")
1893
+ return !0;
1894
+ var i = Pe.call(n, "details>summary:first-of-type"), s = i ? n.parentElement : n;
1895
+ if (Pe.call(s, "details:not([open]) *"))
1896
+ return !0;
1897
+ if (!r || r === "full" || r === "legacy-full") {
1898
+ if (typeof o == "function") {
1899
+ for (var a = n; n; ) {
1900
+ var u = n.parentElement, c = Xe(n);
1901
+ if (u && !u.shadowRoot && o(u) === !0)
1902
+ return tn(n);
1903
+ n.assignedSlot ? n = n.assignedSlot : !u && c !== n.ownerDocument ? n = c.host : n = u;
1904
+ }
1905
+ n = a;
1906
+ }
1907
+ if (xo(n))
1908
+ return !n.getClientRects().length;
1909
+ if (r !== "legacy-full")
1910
+ return !0;
1911
+ } else if (r === "non-zero-area")
1912
+ return tn(n);
1913
+ return !1;
1914
+ }, Eo = function(n) {
1915
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))
1916
+ for (var e = n.parentElement; e; ) {
1917
+ if (e.tagName === "FIELDSET" && e.disabled) {
1918
+ for (var r = 0; r < e.children.length; r++) {
1919
+ var o = e.children.item(r);
1920
+ if (o.tagName === "LEGEND")
1921
+ return Pe.call(e, "fieldset[disabled] *") ? !0 : !o.contains(n);
1922
+ }
1923
+ return !0;
1924
+ }
1925
+ e = e.parentElement;
1926
+ }
1927
+ return !1;
1928
+ }, Ro = function(n, e) {
1929
+ return !(e.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
1930
+ // because we're limited in the type of selectors we can use in JSDom (see related
1931
+ // note related to `candidateSelectors`)
1932
+ Ge(e) || vo(e) || wo(e, n) || // For a details element with a summary, the summary element gets the focus
1933
+ go(e) || Eo(e));
1934
+ }, nn = function(n, e) {
1935
+ return !(yo(e) || Nn(e) < 0 || !Ro(n, e));
1936
+ }, Co = function(n) {
1937
+ var e = parseInt(n.getAttribute("tabindex"), 10);
1938
+ return !!(isNaN(e) || e >= 0);
1939
+ }, So = function t(n) {
1940
+ var e = [], r = [];
1941
+ return n.forEach(function(o, i) {
1942
+ var s = !!o.scopeParent, a = s ? o.scopeParent : o, u = fo(a, s), c = s ? t(o.candidates) : a;
1943
+ u === 0 ? s ? e.push.apply(e, c) : e.push(a) : r.push({
1944
+ documentOrder: i,
1945
+ tabIndex: u,
1946
+ item: o,
1947
+ isScope: s,
1948
+ content: c
1949
+ });
1950
+ }), r.sort(mo).reduce(function(o, i) {
1951
+ return i.isScope ? o.push.apply(o, i.content) : o.push(i.content), o;
1952
+ }, []).concat(e);
1953
+ }, Ln = function(n, e) {
1954
+ e = e || {};
1955
+ var r;
1956
+ return e.getShadowRoot ? r = co([n], e.includeContainer, {
1957
+ filter: nn.bind(null, e),
1958
+ flatten: !1,
1959
+ getShadowRoot: e.getShadowRoot,
1960
+ shadowRootFilter: Co
1961
+ }) : r = uo(n, e.includeContainer, nn.bind(null, e)), So(r);
1962
+ };
1963
+ const To = b.useInsertionEffect, Oo = To || ((t) => t());
1964
+ function Ee(t) {
1965
+ const n = b.useRef(() => {
1966
+ if (process.env.NODE_ENV !== "production")
1967
+ throw new Error("Cannot call an event handler while rendering.");
1968
+ });
1969
+ return Oo(() => {
1970
+ n.current = t;
1971
+ }), b.useCallback(function() {
1972
+ for (var e = arguments.length, r = new Array(e), o = 0; o < e; o++)
1973
+ r[o] = arguments[o];
1974
+ return n.current == null ? void 0 : n.current(...r);
1975
+ }, []);
1976
+ }
1977
+ var de = typeof document < "u" ? pn : $e;
1978
+ function Et() {
1979
+ return Et = Object.assign ? Object.assign.bind() : function(t) {
1980
+ for (var n = 1; n < arguments.length; n++) {
1981
+ var e = arguments[n];
1982
+ for (var r in e)
1983
+ Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
1984
+ }
1985
+ return t;
1986
+ }, Et.apply(this, arguments);
1987
+ }
1988
+ let ft = !1, ko = 0;
1989
+ const rn = () => "floating-ui-" + ko++;
1990
+ function Io() {
1991
+ const [t, n] = b.useState(() => ft ? rn() : void 0);
1992
+ return de(() => {
1993
+ t == null && n(rn());
1994
+ }, []), b.useEffect(() => {
1995
+ ft || (ft = !0);
1996
+ }, []), t;
1997
+ }
1998
+ const Po = b.useId, It = Po || Io;
1999
+ function _o() {
2000
+ const t = /* @__PURE__ */ new Map();
2001
+ return {
2002
+ emit(n, e) {
2003
+ var r;
2004
+ (r = t.get(n)) == null || r.forEach((o) => o(e));
2005
+ },
2006
+ on(n, e) {
2007
+ t.set(n, [...t.get(n) || [], e]);
2008
+ },
2009
+ off(n, e) {
2010
+ var r;
2011
+ t.set(n, ((r = t.get(n)) == null ? void 0 : r.filter((o) => o !== e)) || []);
2012
+ }
2013
+ };
2014
+ }
2015
+ const Mo = /* @__PURE__ */ b.createContext(null), Ao = /* @__PURE__ */ b.createContext(null), Pt = () => {
2016
+ var t;
2017
+ return ((t = b.useContext(Mo)) == null ? void 0 : t.id) || null;
2018
+ }, _t = () => b.useContext(Ao);
2019
+ function rt(t) {
2020
+ return "data-floating-ui-" + t;
2021
+ }
2022
+ function on(t) {
2023
+ const n = Ct(t);
2024
+ return de(() => {
2025
+ n.current = t;
2026
+ }), n;
2027
+ }
2028
+ const sn = /* @__PURE__ */ rt("safe-polygon");
2029
+ function dt(t, n, e) {
2030
+ return e && !We(e) ? 0 : typeof t == "number" ? t : t == null ? void 0 : t[n];
2031
+ }
2032
+ function jo(t, n) {
2033
+ n === void 0 && (n = {});
2034
+ const {
2035
+ open: e,
2036
+ onOpenChange: r,
2037
+ dataRef: o,
2038
+ events: i,
2039
+ elements: {
2040
+ domReference: s,
2041
+ floating: a
2042
+ },
2043
+ refs: u
2044
+ } = t, {
2045
+ enabled: c = !0,
2046
+ delay: m = 0,
2047
+ handleClose: d = null,
2048
+ mouseOnly: v = !1,
2049
+ restMs: f = 0,
2050
+ move: p = !0
2051
+ } = n, g = _t(), S = Pt(), y = on(d), x = on(m), A = b.useRef(), T = b.useRef(), P = b.useRef(), j = b.useRef(), z = b.useRef(!0), I = b.useRef(!1), V = b.useRef(() => {
2052
+ }), Y = b.useCallback(() => {
2053
+ var k;
2054
+ const w = (k = o.current.openEvent) == null ? void 0 : k.type;
2055
+ return (w == null ? void 0 : w.includes("mouse")) && w !== "mousedown";
2056
+ }, [o]);
2057
+ b.useEffect(() => {
2058
+ if (!c)
2059
+ return;
2060
+ function k(w) {
2061
+ let {
2062
+ open: C
2063
+ } = w;
2064
+ C || (clearTimeout(T.current), clearTimeout(j.current), z.current = !0);
2065
+ }
2066
+ return i.on("openchange", k), () => {
2067
+ i.off("openchange", k);
2068
+ };
2069
+ }, [c, i]), b.useEffect(() => {
2070
+ if (!c || !y.current || !e)
2071
+ return;
2072
+ function k(C) {
2073
+ Y() && r(!1, C, "hover");
2074
+ }
2075
+ const w = me(a).documentElement;
2076
+ return w.addEventListener("mouseleave", k), () => {
2077
+ w.removeEventListener("mouseleave", k);
2078
+ };
2079
+ }, [a, e, r, c, y, o, Y]);
2080
+ const B = b.useCallback(function(k, w, C) {
2081
+ w === void 0 && (w = !0), C === void 0 && (C = "hover");
2082
+ const M = dt(x.current, "close", A.current);
2083
+ M && !P.current ? (clearTimeout(T.current), T.current = setTimeout(() => r(!1, k, C), M)) : w && (clearTimeout(T.current), r(!1, k, C));
2084
+ }, [x, r]), L = b.useCallback(() => {
2085
+ V.current(), P.current = void 0;
2086
+ }, []), $ = b.useCallback(() => {
2087
+ if (I.current) {
2088
+ const k = me(u.floating.current).body;
2089
+ k.style.pointerEvents = "", k.removeAttribute(sn), I.current = !1;
2090
+ }
2091
+ }, [u]);
2092
+ return b.useEffect(() => {
2093
+ if (!c)
2094
+ return;
2095
+ function k() {
2096
+ return o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1;
2097
+ }
2098
+ function w(R) {
2099
+ if (clearTimeout(T.current), z.current = !1, v && !We(A.current) || f > 0 && dt(x.current, "open") === 0)
2100
+ return;
2101
+ const q = dt(x.current, "open", A.current);
2102
+ q ? T.current = setTimeout(() => {
2103
+ r(!0, R, "hover");
2104
+ }, q) : r(!0, R, "hover");
2105
+ }
2106
+ function C(R) {
2107
+ if (k())
2108
+ return;
2109
+ V.current();
2110
+ const q = me(a);
2111
+ if (clearTimeout(j.current), y.current) {
2112
+ e || clearTimeout(T.current), P.current = y.current({
2113
+ ...t,
2114
+ tree: g,
2115
+ x: R.clientX,
2116
+ y: R.clientY,
2117
+ onClose() {
2118
+ $(), L(), B(R, !0, "safe-polygon");
2119
+ }
2120
+ });
2121
+ const ne = P.current;
2122
+ q.addEventListener("mousemove", ne), V.current = () => {
2123
+ q.removeEventListener("mousemove", ne);
2124
+ };
2125
+ return;
2126
+ }
2127
+ (A.current === "touch" ? !Be(a, R.relatedTarget) : !0) && B(R);
2128
+ }
2129
+ function M(R) {
2130
+ k() || y.current == null || y.current({
2131
+ ...t,
2132
+ tree: g,
2133
+ x: R.clientX,
2134
+ y: R.clientY,
2135
+ onClose() {
2136
+ $(), L(), B(R);
2137
+ }
2138
+ })(R);
2139
+ }
2140
+ if (U(s)) {
2141
+ const R = s;
2142
+ return e && R.addEventListener("mouseleave", M), a == null || a.addEventListener("mouseleave", M), p && R.addEventListener("mousemove", w, {
2143
+ once: !0
2144
+ }), R.addEventListener("mouseenter", w), R.addEventListener("mouseleave", C), () => {
2145
+ e && R.removeEventListener("mouseleave", M), a == null || a.removeEventListener("mouseleave", M), p && R.removeEventListener("mousemove", w), R.removeEventListener("mouseenter", w), R.removeEventListener("mouseleave", C);
2146
+ };
2147
+ }
2148
+ }, [s, a, c, t, v, f, p, B, L, $, r, e, g, x, y, o]), de(() => {
2149
+ var k;
2150
+ if (c && e && (k = y.current) != null && k.__options.blockPointerEvents && Y()) {
2151
+ const C = me(a).body;
2152
+ if (C.setAttribute(sn, ""), C.style.pointerEvents = "none", I.current = !0, U(s) && a) {
2153
+ var w;
2154
+ const M = s, R = g == null || (w = g.nodesRef.current.find((q) => q.id === S)) == null || (w = w.context) == null ? void 0 : w.elements.floating;
2155
+ return R && (R.style.pointerEvents = ""), M.style.pointerEvents = "auto", a.style.pointerEvents = "auto", () => {
2156
+ M.style.pointerEvents = "", a.style.pointerEvents = "";
2157
+ };
2158
+ }
2159
+ }
2160
+ }, [c, e, S, a, s, g, y, o, Y]), de(() => {
2161
+ e || (A.current = void 0, L(), $());
2162
+ }, [e, L, $]), b.useEffect(() => () => {
2163
+ L(), clearTimeout(T.current), clearTimeout(j.current), $();
2164
+ }, [c, s, L, $]), b.useMemo(() => {
2165
+ if (!c)
2166
+ return {};
2167
+ function k(w) {
2168
+ A.current = w.pointerType;
2169
+ }
2170
+ return {
2171
+ reference: {
2172
+ onPointerDown: k,
2173
+ onPointerEnter: k,
2174
+ onMouseMove(w) {
2175
+ e || f === 0 || (clearTimeout(j.current), j.current = setTimeout(() => {
2176
+ z.current || r(!0, w.nativeEvent, "hover");
2177
+ }, f));
2178
+ }
2179
+ },
2180
+ floating: {
2181
+ onMouseEnter() {
2182
+ clearTimeout(T.current);
2183
+ },
2184
+ onMouseLeave(w) {
2185
+ B(w.nativeEvent, !1);
2186
+ }
2187
+ }
2188
+ };
2189
+ }, [c, f, e, r, B]);
2190
+ }
2191
+ function mt(t, n) {
2192
+ let e = t.filter((o) => {
2193
+ var i;
2194
+ return o.parentId === n && ((i = o.context) == null ? void 0 : i.open);
2195
+ }), r = e;
2196
+ for (; r.length; )
2197
+ r = t.filter((o) => {
2198
+ var i;
2199
+ return (i = r) == null ? void 0 : i.some((s) => {
2200
+ var a;
2201
+ return o.parentId === s.id && ((a = o.context) == null ? void 0 : a.open);
2202
+ });
2203
+ }), e = e.concat(r);
2204
+ return e;
2205
+ }
2206
+ const Fn = () => ({
2207
+ getShadowRoot: !0,
2208
+ displayCheck: (
2209
+ // JSDOM does not support the `tabbable` library. To solve this we can
2210
+ // check if `ResizeObserver` is a real function (not polyfilled), which
2211
+ // determines if the current environment is JSDOM-like.
2212
+ typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
2213
+ )
2214
+ });
2215
+ function zn(t, n) {
2216
+ const e = Ln(t, Fn());
2217
+ n === "prev" && e.reverse();
2218
+ const r = e.indexOf(Cr(me(t)));
2219
+ return e.slice(r + 1)[0];
2220
+ }
2221
+ function No() {
2222
+ return zn(document.body, "next");
2223
+ }
2224
+ function Do() {
2225
+ return zn(document.body, "prev");
2226
+ }
2227
+ function vt(t, n) {
2228
+ const e = n || t.currentTarget, r = t.relatedTarget;
2229
+ return !r || !Be(e, r);
2230
+ }
2231
+ function Lo(t) {
2232
+ Ln(t, Fn()).forEach((e) => {
2233
+ e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
2234
+ });
2235
+ }
2236
+ function Fo(t) {
2237
+ t.querySelectorAll("[data-tabindex]").forEach((e) => {
2238
+ const r = e.dataset.tabindex;
2239
+ delete e.dataset.tabindex, r ? e.setAttribute("tabindex", r) : e.removeAttribute("tabindex");
2240
+ });
2241
+ }
2242
+ const Vn = {
2243
+ border: 0,
2244
+ clip: "rect(0 0 0 0)",
2245
+ height: "1px",
2246
+ margin: "-1px",
2247
+ overflow: "hidden",
2248
+ padding: 0,
2249
+ position: "fixed",
2250
+ whiteSpace: "nowrap",
2251
+ width: "1px",
2252
+ top: 0,
2253
+ left: 0
2254
+ };
2255
+ let zo;
2256
+ function an(t) {
2257
+ t.key === "Tab" && (t.target, clearTimeout(zo));
2258
+ }
2259
+ const ln = /* @__PURE__ */ b.forwardRef(function(n, e) {
2260
+ const [r, o] = b.useState();
2261
+ de(() => (Sr() && o("button"), document.addEventListener("keydown", an), () => {
2262
+ document.removeEventListener("keydown", an);
2263
+ }), []);
2264
+ const i = {
2265
+ ref: e,
2266
+ tabIndex: 0,
2267
+ // Role is only for VoiceOver
2268
+ role: r,
2269
+ "aria-hidden": r ? void 0 : !0,
2270
+ [rt("focus-guard")]: "",
2271
+ style: Vn
2272
+ };
2273
+ return /* @__PURE__ */ b.createElement("span", Et({}, n, i));
2274
+ }), $n = /* @__PURE__ */ b.createContext(null);
2275
+ function Vo(t) {
2276
+ let {
2277
+ id: n,
2278
+ root: e
2279
+ } = t === void 0 ? {} : t;
2280
+ const [r, o] = b.useState(null), i = It(), s = Bo(), a = b.useMemo(() => ({
2281
+ id: n,
2282
+ root: e,
2283
+ portalContext: s,
2284
+ uniqueId: i
2285
+ }), [n, e, s, i]), u = b.useRef();
2286
+ return de(() => () => {
2287
+ r == null || r.remove();
2288
+ }, [r, a]), de(() => {
2289
+ if (u.current === a)
2290
+ return;
2291
+ u.current = a;
2292
+ const {
2293
+ id: c,
2294
+ root: m,
2295
+ portalContext: d,
2296
+ uniqueId: v
2297
+ } = a, f = c ? document.getElementById(c) : null, p = rt("portal");
2298
+ if (f) {
2299
+ const g = document.createElement("div");
2300
+ g.id = v, g.setAttribute(p, ""), f.appendChild(g), o(g);
2301
+ } else {
2302
+ let g = m || (d == null ? void 0 : d.portalNode);
2303
+ g && !U(g) && (g = g.current), g = g || document.body;
2304
+ let S = null;
2305
+ c && (S = document.createElement("div"), S.id = c, g.appendChild(S));
2306
+ const y = document.createElement("div");
2307
+ y.id = v, y.setAttribute(p, ""), g = S || g, g.appendChild(y), o(y);
2308
+ }
2309
+ }, [a]), r;
2310
+ }
2311
+ function $o(t) {
2312
+ let {
2313
+ children: n,
2314
+ id: e,
2315
+ root: r = null,
2316
+ preserveTabOrder: o = !0
2317
+ } = t;
2318
+ const i = Vo({
2319
+ id: e,
2320
+ root: r
2321
+ }), [s, a] = b.useState(null), u = b.useRef(null), c = b.useRef(null), m = b.useRef(null), d = b.useRef(null), v = (
2322
+ // The FocusManager and therefore floating element are currently open/
2323
+ // rendered.
2324
+ !!s && // Guards are only for non-modal focus management.
2325
+ !s.modal && // Don't render if unmount is transitioning.
2326
+ s.open && o && !!(r || i)
2327
+ );
2328
+ return b.useEffect(() => {
2329
+ if (!i || !o || s != null && s.modal)
2330
+ return;
2331
+ function f(p) {
2332
+ i && vt(p) && (p.type === "focusin" ? Fo : Lo)(i);
2333
+ }
2334
+ return i.addEventListener("focusin", f, !0), i.addEventListener("focusout", f, !0), () => {
2335
+ i.removeEventListener("focusin", f, !0), i.removeEventListener("focusout", f, !0);
2336
+ };
2337
+ }, [i, o, s == null ? void 0 : s.modal]), /* @__PURE__ */ b.createElement($n.Provider, {
2338
+ value: b.useMemo(() => ({
2339
+ preserveTabOrder: o,
2340
+ beforeOutsideRef: u,
2341
+ afterOutsideRef: c,
2342
+ beforeInsideRef: m,
2343
+ afterInsideRef: d,
2344
+ portalNode: i,
2345
+ setFocusManagerState: a
2346
+ }), [o, i])
2347
+ }, v && i && /* @__PURE__ */ b.createElement(ln, {
2348
+ "data-type": "outside",
2349
+ ref: u,
2350
+ onFocus: (f) => {
2351
+ if (vt(f, i)) {
2352
+ var p;
2353
+ (p = m.current) == null || p.focus();
2354
+ } else {
2355
+ const g = Do() || (s == null ? void 0 : s.refs.domReference.current);
2356
+ g == null || g.focus();
2357
+ }
2358
+ }
2359
+ }), v && i && /* @__PURE__ */ b.createElement("span", {
2360
+ "aria-owns": i.id,
2361
+ style: Vn
2362
+ }), i && /* @__PURE__ */ gr(n, i), v && i && /* @__PURE__ */ b.createElement(ln, {
2363
+ "data-type": "outside",
2364
+ ref: c,
2365
+ onFocus: (f) => {
2366
+ if (vt(f, i)) {
2367
+ var p;
2368
+ (p = d.current) == null || p.focus();
2369
+ } else {
2370
+ const g = No() || (s == null ? void 0 : s.refs.domReference.current);
2371
+ g == null || g.focus(), s != null && s.closeOnFocusOut && (s == null || s.onOpenChange(!1, f.nativeEvent));
2372
+ }
2373
+ }
2374
+ }));
2375
+ }
2376
+ const Bo = () => b.useContext($n);
2377
+ function un(t) {
2378
+ return Q(t.target) && t.target.tagName === "BUTTON";
2379
+ }
2380
+ function cn(t) {
2381
+ return Ir(t);
2382
+ }
2383
+ function Wo(t, n) {
2384
+ n === void 0 && (n = {});
2385
+ const {
2386
+ open: e,
2387
+ onOpenChange: r,
2388
+ dataRef: o,
2389
+ elements: {
2390
+ domReference: i
2391
+ }
2392
+ } = t, {
2393
+ enabled: s = !0,
2394
+ event: a = "click",
2395
+ toggle: u = !0,
2396
+ ignoreMouse: c = !1,
2397
+ keyboardHandlers: m = !0
2398
+ } = n, d = b.useRef(), v = b.useRef(!1);
2399
+ return b.useMemo(() => s ? {
2400
+ reference: {
2401
+ onPointerDown(f) {
2402
+ d.current = f.pointerType;
2403
+ },
2404
+ onMouseDown(f) {
2405
+ f.button === 0 && (We(d.current, !0) && c || a !== "click" && (e && u && (!o.current.openEvent || o.current.openEvent.type === "mousedown") ? r(!1, f.nativeEvent, "click") : (f.preventDefault(), r(!0, f.nativeEvent, "click"))));
2406
+ },
2407
+ onClick(f) {
2408
+ if (a === "mousedown" && d.current) {
2409
+ d.current = void 0;
2410
+ return;
2411
+ }
2412
+ We(d.current, !0) && c || (e && u && (!o.current.openEvent || o.current.openEvent.type === "click") ? r(!1, f.nativeEvent, "click") : r(!0, f.nativeEvent, "click"));
2413
+ },
2414
+ onKeyDown(f) {
2415
+ d.current = void 0, !(f.defaultPrevented || !m || un(f)) && (f.key === " " && !cn(i) && (f.preventDefault(), v.current = !0), f.key === "Enter" && r(!(e && u), f.nativeEvent, "click"));
2416
+ },
2417
+ onKeyUp(f) {
2418
+ f.defaultPrevented || !m || un(f) || cn(i) || f.key === " " && v.current && (v.current = !1, r(!(e && u), f.nativeEvent, "click"));
2419
+ }
2420
+ }
2421
+ } : {}, [s, o, a, c, m, i, u, e, r]);
2422
+ }
2423
+ const Yo = {
2424
+ pointerdown: "onPointerDown",
2425
+ mousedown: "onMouseDown",
2426
+ click: "onClick"
2427
+ }, Uo = {
2428
+ pointerdown: "onPointerDownCapture",
2429
+ mousedown: "onMouseDownCapture",
2430
+ click: "onClickCapture"
2431
+ }, fn = (t) => {
2432
+ var n, e;
2433
+ return {
2434
+ escapeKey: typeof t == "boolean" ? t : (n = t == null ? void 0 : t.escapeKey) != null ? n : !1,
2435
+ outsidePress: typeof t == "boolean" ? t : (e = t == null ? void 0 : t.outsidePress) != null ? e : !0
2436
+ };
2437
+ };
2438
+ function Ko(t, n) {
2439
+ n === void 0 && (n = {});
2440
+ const {
2441
+ open: e,
2442
+ onOpenChange: r,
2443
+ nodeId: o,
2444
+ elements: {
2445
+ reference: i,
2446
+ domReference: s,
2447
+ floating: a
2448
+ },
2449
+ dataRef: u
2450
+ } = t, {
2451
+ enabled: c = !0,
2452
+ escapeKey: m = !0,
2453
+ outsidePress: d = !0,
2454
+ outsidePressEvent: v = "pointerdown",
2455
+ referencePress: f = !1,
2456
+ referencePressEvent: p = "pointerdown",
2457
+ ancestorScroll: g = !1,
2458
+ bubbles: S,
2459
+ capture: y
2460
+ } = n, x = _t(), A = Ee(typeof d == "function" ? d : () => !1), T = typeof d == "function" ? A : d, P = b.useRef(!1), j = b.useRef(!1), {
2461
+ escapeKey: z,
2462
+ outsidePress: I
2463
+ } = fn(S), {
2464
+ escapeKey: V,
2465
+ outsidePress: Y
2466
+ } = fn(y), B = Ee((w) => {
2467
+ if (!e || !c || !m || w.key !== "Escape")
2468
+ return;
2469
+ const C = x ? mt(x.nodesRef.current, o) : [];
2470
+ if (!z && (w.stopPropagation(), C.length > 0)) {
2471
+ let M = !0;
2472
+ if (C.forEach((R) => {
2473
+ var q;
2474
+ if ((q = R.context) != null && q.open && !R.context.dataRef.current.__escapeKeyBubbles) {
2475
+ M = !1;
2476
+ return;
2477
+ }
2478
+ }), !M)
2479
+ return;
2480
+ }
2481
+ r(!1, Tr(w) ? w.nativeEvent : w, "escape-key");
2482
+ }), L = Ee((w) => {
2483
+ var C;
2484
+ const M = () => {
2485
+ var R;
2486
+ B(w), (R = Ie(w)) == null || R.removeEventListener("keydown", M);
2487
+ };
2488
+ (C = Ie(w)) == null || C.addEventListener("keydown", M);
2489
+ }), $ = Ee((w) => {
2490
+ const C = P.current;
2491
+ P.current = !1;
2492
+ const M = j.current;
2493
+ if (j.current = !1, v === "click" && M || C || typeof T == "function" && !T(w))
2494
+ return;
2495
+ const R = Ie(w), q = "[" + rt("inert") + "]", be = me(a).querySelectorAll(q);
2496
+ let ne = U(R) ? R : null;
2497
+ for (; ne && !Ce(ne); ) {
2498
+ const G = ge(ne);
2499
+ if (Ce(G) || !U(G))
2500
+ break;
2501
+ ne = G;
2502
+ }
2503
+ if (be.length && U(R) && !Or(R) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2504
+ !Be(R, a) && // If the target root element contains none of the markers, then the
2505
+ // element was injected after the floating element rendered.
2506
+ Array.from(be).every((G) => !Be(ne, G)))
2507
+ return;
2508
+ if (Q(R) && a) {
2509
+ const G = R.clientWidth > 0 && R.scrollWidth > R.clientWidth, oe = R.clientHeight > 0 && R.scrollHeight > R.clientHeight;
2510
+ let ie = oe && w.offsetX > R.clientWidth;
2511
+ if (oe && ee(R).direction === "rtl" && (ie = w.offsetX <= R.offsetWidth - R.clientWidth), ie || G && w.offsetY > R.clientHeight)
2512
+ return;
2513
+ }
2514
+ const Me = x && mt(x.nodesRef.current, o).some((G) => {
2515
+ var oe;
2516
+ return ct(w, (oe = G.context) == null ? void 0 : oe.elements.floating);
2517
+ });
2518
+ if (ct(w, a) || ct(w, s) || Me)
2519
+ return;
2520
+ const Se = x ? mt(x.nodesRef.current, o) : [];
2521
+ if (Se.length > 0) {
2522
+ let G = !0;
2523
+ if (Se.forEach((oe) => {
2524
+ var ie;
2525
+ if ((ie = oe.context) != null && ie.open && !oe.context.dataRef.current.__outsidePressBubbles) {
2526
+ G = !1;
2527
+ return;
2528
+ }
2529
+ }), !G)
2530
+ return;
2531
+ }
2532
+ r(!1, w, "outside-press");
2533
+ }), k = Ee((w) => {
2534
+ var C;
2535
+ const M = () => {
2536
+ var R;
2537
+ $(w), (R = Ie(w)) == null || R.removeEventListener(v, M);
2538
+ };
2539
+ (C = Ie(w)) == null || C.addEventListener(v, M);
2540
+ });
2541
+ return b.useEffect(() => {
2542
+ if (!e || !c)
2543
+ return;
2544
+ u.current.__escapeKeyBubbles = z, u.current.__outsidePressBubbles = I;
2545
+ function w(R) {
2546
+ r(!1, R, "ancestor-scroll");
2547
+ }
2548
+ const C = me(a);
2549
+ m && C.addEventListener("keydown", V ? L : B, V), T && C.addEventListener(v, Y ? k : $, Y);
2550
+ let M = [];
2551
+ return g && (U(s) && (M = ue(s)), U(a) && (M = M.concat(ue(a))), !U(i) && i && i.contextElement && (M = M.concat(ue(i.contextElement)))), M = M.filter((R) => {
2552
+ var q;
2553
+ return R !== ((q = C.defaultView) == null ? void 0 : q.visualViewport);
2554
+ }), M.forEach((R) => {
2555
+ R.addEventListener("scroll", w, {
2556
+ passive: !0
2557
+ });
2558
+ }), () => {
2559
+ m && C.removeEventListener("keydown", V ? L : B, V), T && C.removeEventListener(v, Y ? k : $, Y), M.forEach((R) => {
2560
+ R.removeEventListener("scroll", w);
2561
+ });
2562
+ };
2563
+ }, [u, a, s, i, m, T, v, e, r, g, c, z, I, B, V, L, $, Y, k]), b.useEffect(() => {
2564
+ P.current = !1;
2565
+ }, [T, v]), b.useMemo(() => c ? {
2566
+ reference: {
2567
+ onKeyDown: B,
2568
+ [Yo[p]]: (w) => {
2569
+ f && r(!1, w.nativeEvent, "reference-press");
2570
+ }
2571
+ },
2572
+ floating: {
2573
+ onKeyDown: B,
2574
+ onMouseDown() {
2575
+ j.current = !0;
2576
+ },
2577
+ onMouseUp() {
2578
+ j.current = !0;
2579
+ },
2580
+ [Uo[v]]: () => {
2581
+ P.current = !0;
2582
+ }
2583
+ }
2584
+ } : {}, [c, f, v, p, r, B]);
2585
+ }
2586
+ let Rt;
2587
+ process.env.NODE_ENV !== "production" && (Rt = /* @__PURE__ */ new Set());
2588
+ function Ho(t) {
2589
+ var n;
2590
+ t === void 0 && (t = {});
2591
+ const {
2592
+ open: e = !1,
2593
+ onOpenChange: r,
2594
+ nodeId: o
2595
+ } = t;
2596
+ if (process.env.NODE_ENV !== "production") {
2597
+ var i;
2598
+ const I = "Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";
2599
+ if ((i = t.elements) != null && i.reference && !U(t.elements.reference)) {
2600
+ var s;
2601
+ if (!((s = Rt) != null && s.has(I))) {
2602
+ var a;
2603
+ (a = Rt) == null || a.add(I), console.error(I);
2604
+ }
2605
+ }
2606
+ }
2607
+ const [u, c] = b.useState(null), m = ((n = t.elements) == null ? void 0 : n.reference) || u, d = so(t), v = _t(), f = Pt() != null, p = Ee((I, V, Y) => {
2608
+ I && (S.current.openEvent = V), y.emit("openchange", {
2609
+ open: I,
2610
+ event: V,
2611
+ reason: Y,
2612
+ nested: f
2613
+ }), r == null || r(I, V, Y);
2614
+ }), g = b.useRef(null), S = b.useRef({}), y = b.useState(() => _o())[0], x = It(), A = b.useCallback((I) => {
2615
+ const V = U(I) ? {
2616
+ getBoundingClientRect: () => I.getBoundingClientRect(),
2617
+ contextElement: I
2618
+ } : I;
2619
+ d.refs.setReference(V);
2620
+ }, [d.refs]), T = b.useCallback((I) => {
2621
+ (U(I) || I === null) && (g.current = I, c(I)), (U(d.refs.reference.current) || d.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2622
+ // `null` to support `positionReference` + an unstable `reference`
2623
+ // callback ref.
2624
+ I !== null && !U(I)) && d.refs.setReference(I);
2625
+ }, [d.refs]), P = b.useMemo(() => ({
2626
+ ...d.refs,
2627
+ setReference: T,
2628
+ setPositionReference: A,
2629
+ domReference: g
2630
+ }), [d.refs, T, A]), j = b.useMemo(() => ({
2631
+ ...d.elements,
2632
+ domReference: m
2633
+ }), [d.elements, m]), z = b.useMemo(() => ({
2634
+ ...d,
2635
+ refs: P,
2636
+ elements: j,
2637
+ dataRef: S,
2638
+ nodeId: o,
2639
+ floatingId: x,
2640
+ events: y,
2641
+ open: e,
2642
+ onOpenChange: p
2643
+ }), [d, o, x, y, e, p, P, j]);
2644
+ return de(() => {
2645
+ const I = v == null ? void 0 : v.nodesRef.current.find((V) => V.id === o);
2646
+ I && (I.context = z);
2647
+ }), b.useMemo(() => ({
2648
+ ...d,
2649
+ context: z,
2650
+ refs: P,
2651
+ elements: j
2652
+ }), [d, P, j, z]);
2653
+ }
2654
+ const dn = "active", mn = "selected";
2655
+ function gt(t, n, e) {
2656
+ const r = /* @__PURE__ */ new Map(), o = e === "item";
2657
+ let i = t;
2658
+ if (o && t) {
2659
+ const {
2660
+ [dn]: s,
2661
+ [mn]: a,
2662
+ ...u
2663
+ } = t;
2664
+ i = u;
2665
+ }
2666
+ return {
2667
+ ...e === "floating" && {
2668
+ tabIndex: -1
2669
+ },
2670
+ ...i,
2671
+ ...n.map((s) => {
2672
+ const a = s ? s[e] : null;
2673
+ return typeof a == "function" ? t ? a(t) : null : a;
2674
+ }).concat(t).reduce((s, a) => (a && Object.entries(a).forEach((u) => {
2675
+ let [c, m] = u;
2676
+ if (!(o && [dn, mn].includes(c)))
2677
+ if (c.indexOf("on") === 0) {
2678
+ if (r.has(c) || r.set(c, []), typeof m == "function") {
2679
+ var d;
2680
+ (d = r.get(c)) == null || d.push(m), s[c] = function() {
2681
+ for (var v, f = arguments.length, p = new Array(f), g = 0; g < f; g++)
2682
+ p[g] = arguments[g];
2683
+ return (v = r.get(c)) == null ? void 0 : v.map((S) => S(...p)).find((S) => S !== void 0);
2684
+ };
2685
+ }
2686
+ } else
2687
+ s[c] = m;
2688
+ }), s), {})
2689
+ };
2690
+ }
2691
+ function qo(t) {
2692
+ t === void 0 && (t = []);
2693
+ const n = t, e = b.useCallback(
2694
+ (i) => gt(i, t, "reference"),
2695
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2696
+ n
2697
+ ), r = b.useCallback(
2698
+ (i) => gt(i, t, "floating"),
2699
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2700
+ n
2701
+ ), o = b.useCallback(
2702
+ (i) => gt(i, t, "item"),
2703
+ // Granularly check for `item` changes, because the `getItemProps` getter
2704
+ // should be as referentially stable as possible since it may be passed as
2705
+ // a prop to many components. All `item` key values must therefore be
2706
+ // memoized.
2707
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2708
+ t.map((i) => i == null ? void 0 : i.item)
2709
+ );
2710
+ return b.useMemo(() => ({
2711
+ getReferenceProps: e,
2712
+ getFloatingProps: r,
2713
+ getItemProps: o
2714
+ }), [e, r, o]);
2715
+ }
2716
+ const Xo = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
2717
+ function Go(t, n) {
2718
+ var e;
2719
+ n === void 0 && (n = {});
2720
+ const {
2721
+ open: r,
2722
+ floatingId: o
2723
+ } = t, {
2724
+ enabled: i = !0,
2725
+ role: s = "dialog"
2726
+ } = n, a = (e = Xo.get(s)) != null ? e : s, u = It(), m = Pt() != null;
2727
+ return b.useMemo(() => {
2728
+ if (!i)
2729
+ return {};
2730
+ const d = {
2731
+ id: o,
2732
+ ...a && {
2733
+ role: a
2734
+ }
2735
+ };
2736
+ return a === "tooltip" || s === "label" ? {
2737
+ reference: {
2738
+ ["aria-" + (s === "label" ? "labelledby" : "describedby")]: r ? o : void 0
2739
+ },
2740
+ floating: d
2741
+ } : {
2742
+ reference: {
2743
+ "aria-expanded": r ? "true" : "false",
2744
+ "aria-haspopup": a === "alertdialog" ? "dialog" : a,
2745
+ "aria-controls": r ? o : void 0,
2746
+ ...a === "listbox" && {
2747
+ role: "combobox"
2748
+ },
2749
+ ...a === "menu" && {
2750
+ id: u
2751
+ },
2752
+ ...a === "menu" && m && {
2753
+ role: "menuitem"
2754
+ },
2755
+ ...s === "select" && {
2756
+ "aria-autocomplete": "none"
2757
+ },
2758
+ ...s === "combobox" && {
2759
+ "aria-autocomplete": "list"
2760
+ }
2761
+ },
2762
+ floating: {
2763
+ ...d,
2764
+ ...a === "menu" && {
2765
+ "aria-labelledby": u
2766
+ }
2767
+ },
2768
+ item(v) {
2769
+ let {
2770
+ active: f,
2771
+ selected: p
2772
+ } = v;
2773
+ const g = {
2774
+ role: "option",
2775
+ ...f && {
2776
+ id: o + "-option"
2777
+ }
2778
+ };
2779
+ switch (s) {
2780
+ case "select":
2781
+ return {
2782
+ ...g,
2783
+ "aria-selected": f && p
2784
+ };
2785
+ case "combobox":
2786
+ return {
2787
+ ...g,
2788
+ ...f && {
2789
+ "aria-selected": !0
2790
+ }
2791
+ };
2792
+ }
2793
+ return {};
2794
+ }
2795
+ };
2796
+ }, [i, s, a, r, o, u, m]);
2797
+ }
2798
+ const Bn = (t) => {
2799
+ let {
2800
+ className: n,
2801
+ placement: e = "bottom-start",
2802
+ trigger: r = "hover",
2803
+ content: o,
2804
+ children: i,
2805
+ onClose: s,
2806
+ onOpen: a,
2807
+ disabled: u = !1,
2808
+ show: c = !1,
2809
+ setShow: m,
2810
+ role: d = "tooltip"
2811
+ } = t;
2812
+ const [v, f] = St(c), p = () => m !== void 0 && c !== void 0 ? c : v, g = () => m !== void 0 && c !== void 0 ? m : f, { x: S, y, strategy: x, refs: A, context: T } = Ho({
2813
+ open: p(),
2814
+ onOpenChange: (L) => {
2815
+ g()(L), L ? a == null || a() : s == null || s();
2816
+ },
2817
+ middleware: [$r(4), zr(), Br()],
2818
+ whileElementsMounted: oo,
2819
+ placement: e
2820
+ }), P = jo(T, { enabled: r === "hover" && !u, move: !1 }), j = Wo(T, { enabled: r === "click" && !u, keyboardHandlers: !1 }), z = Ko(T), I = Go(T, { role: d }), { getReferenceProps: V, getFloatingProps: Y } = qo([
2821
+ r === "click" ? j : P,
2822
+ z,
2823
+ I
2824
+ ]), B = mr();
2825
+ return /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
2826
+ /* @__PURE__ */ O.jsx(
2827
+ re,
2828
+ {
2829
+ className: "z-auto block min-w-max",
2830
+ id: `zen__popover-${B}`,
2831
+ ref: A.setReference,
2832
+ ...V(),
2833
+ asChild: !0,
2834
+ children: i == null ? void 0 : i(p())
2835
+ }
2836
+ ),
2837
+ p() && /* @__PURE__ */ O.jsx($o, { preserveTabOrder: !0, children: /* @__PURE__ */ O.jsx(
2838
+ ae,
2839
+ {
2840
+ onClick: (L) => L.stopPropagation(),
2841
+ visible: p(),
2842
+ role: "tooltip",
2843
+ className: J(
2844
+ "zen__popover z-50 w-fit rounded border border-border bg-background shadow-secondary",
2845
+ n
2846
+ ),
2847
+ ref: A.setFloating,
2848
+ style: {
2849
+ position: x,
2850
+ top: y ?? 0,
2851
+ left: S ?? 0
2852
+ },
2853
+ ...Y(),
2854
+ children: o
2855
+ }
2856
+ ) })
2857
+ ] });
2858
+ }, Jo = (t) => {
2859
+ var g, S;
2860
+ const {
2861
+ items: n = [],
2862
+ children: e,
2863
+ moreItemsLabel: r = "",
2864
+ parentRef: o,
2865
+ data: i,
2866
+ estimator: s = (y, x) => x + 30,
2867
+ font: a = "12px Inter",
2868
+ badgeVariant: u = "secondary",
2869
+ badgeStyles: c
2870
+ } = t, [m, d] = St({
2871
+ visible: n,
2872
+ hidden: []
2873
+ }), v = pt(() => {
2874
+ let x = document.createElement("canvas").getContext("2d");
2875
+ return x && (x.font = a), x;
2876
+ }, []), f = () => {
2877
+ const y = o == null ? void 0 : o.current;
2878
+ if (!y)
2879
+ return;
2880
+ const x = y.offsetWidth, A = [], T = [], P = s(r, v.measureText(r).width + 10);
2881
+ p == null || p.reduce((j, z, I) => (j + z + P > x - 20 ? T.push(n[I]) : A.push(n[I]), j + z), 0), d({
2882
+ visible: A,
2883
+ hidden: T
2884
+ });
2885
+ }, p = pt(
2886
+ () => (n == null ? void 0 : n.map((y) => s(y, v.measureText(y).width))) ?? [],
2887
+ [n]
2888
+ );
2889
+ return $e(() => {
2890
+ f();
2891
+ }, [n]), $e(() => {
2892
+ if (!(o != null && o.current))
2893
+ return;
2894
+ const y = new ResizeObserver(() => {
2895
+ f();
2896
+ });
2897
+ return y.observe(o.current), () => {
2898
+ y.disconnect();
2899
+ };
2900
+ }, [n]), /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
2901
+ (g = m.visible) == null ? void 0 : g.map((y, x) => e(y, x, i == null ? void 0 : i[x])),
2902
+ ((S = m.hidden) == null ? void 0 : S.length) > 0 && /* @__PURE__ */ O.jsx(
2903
+ Bn,
2904
+ {
2905
+ trigger: "click",
2906
+ content: /* @__PURE__ */ O.jsx(ae, { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children: m.hidden.map(
2907
+ (y, x) => e(
2908
+ y,
2909
+ m.visible.length + x,
2910
+ i == null ? void 0 : i[m.visible.length + x]
2911
+ )
2912
+ ) }),
2913
+ children: (y) => /* @__PURE__ */ O.jsx(xn, { className: c, variant: u, children: /* @__PURE__ */ O.jsx(re, { tag: "p", children: `+${m.hidden.length} ${r}` }) }, "more_items_button")
2914
+ }
2915
+ )
2916
+ ] });
2917
+ };
2918
+ function Zo(t) {
2919
+ return /* @__PURE__ */ O.jsx(
2920
+ "svg",
2921
+ {
2922
+ xmlns: "http://www.w3.org/2000/svg",
2923
+ fill: "none",
2924
+ viewBox: "0 0 24 24",
2925
+ strokeWidth: 1.5,
2926
+ stroke: "currentColor",
2927
+ className: "h-6 w-6",
2928
+ ...t,
2929
+ children: /* @__PURE__ */ O.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" })
2930
+ }
2931
+ );
2932
+ }
2933
+ function Qo(t) {
2934
+ return /* @__PURE__ */ O.jsx(
2935
+ "svg",
2936
+ {
2937
+ xmlns: "http://www.w3.org/2000/svg",
2938
+ fill: "none",
2939
+ viewBox: "0 0 24 24",
2940
+ strokeWidth: 1.5,
2941
+ stroke: "currentColor",
2942
+ className: "h-6 w-6",
2943
+ ...t,
2944
+ children: /* @__PURE__ */ O.jsx(
2945
+ "path",
2946
+ {
2947
+ strokeLinecap: "round",
2948
+ strokeLinejoin: "round",
2949
+ d: "m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
2950
+ }
2951
+ )
2952
+ }
2953
+ );
2954
+ }
2955
+ function ei(t) {
2956
+ return /* @__PURE__ */ O.jsx(
2957
+ "svg",
2958
+ {
2959
+ xmlns: "http://www.w3.org/2000/svg",
2960
+ fill: "none",
2961
+ viewBox: "0 0 24 24",
2962
+ strokeWidth: 1.5,
2963
+ stroke: "currentColor",
2964
+ className: "h-6 w-6",
2965
+ ...t,
2966
+ children: /* @__PURE__ */ O.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" })
2967
+ }
2968
+ );
2969
+ }
2970
+ /**
2971
+ * react-virtual
2972
+ *
2973
+ * Copyright (c) TanStack
2974
+ *
2975
+ * This source code is licensed under the MIT license found in the
2976
+ * LICENSE.md file in the root directory of this source tree.
2977
+ *
2978
+ * @license MIT
2979
+ */
2980
+ function Je() {
2981
+ return Je = Object.assign ? Object.assign.bind() : function(t) {
2982
+ for (var n = 1; n < arguments.length; n++) {
2983
+ var e = arguments[n];
2984
+ for (var r in e)
2985
+ Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
2986
+ }
2987
+ return t;
2988
+ }, Je.apply(this, arguments);
2989
+ }
2990
+ /**
2991
+ * virtual-core
2992
+ *
2993
+ * Copyright (c) TanStack
2994
+ *
2995
+ * This source code is licensed under the MIT license found in the
2996
+ * LICENSE.md file in the root directory of this source tree.
2997
+ *
2998
+ * @license MIT
2999
+ */
3000
+ function Ze() {
3001
+ return Ze = Object.assign ? Object.assign.bind() : function(t) {
3002
+ for (var n = 1; n < arguments.length; n++) {
3003
+ var e = arguments[n];
3004
+ for (var r in e)
3005
+ Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
3006
+ }
3007
+ return t;
3008
+ }, Ze.apply(this, arguments);
3009
+ }
3010
+ /**
3011
+ * virtual-core
3012
+ *
3013
+ * Copyright (c) TanStack
3014
+ *
3015
+ * This source code is licensed under the MIT license found in the
3016
+ * LICENSE.md file in the root directory of this source tree.
3017
+ *
3018
+ * @license MIT
3019
+ */
3020
+ function we(t, n, e) {
3021
+ var r, o = (r = e.initialDeps) != null ? r : [], i;
3022
+ return function() {
3023
+ var s;
3024
+ e.key && e.debug != null && e.debug() && (s = Date.now());
3025
+ var a = t(), u = a.length !== o.length || a.some(function(p, g) {
3026
+ return o[g] !== p;
3027
+ });
3028
+ if (!u)
3029
+ return i;
3030
+ o = a;
3031
+ var c;
3032
+ if (e.key && e.debug != null && e.debug() && (c = Date.now()), i = n.apply(void 0, a), e.key && e.debug != null && e.debug()) {
3033
+ var m = Math.round((Date.now() - s) * 100) / 100, d = Math.round((Date.now() - c) * 100) / 100, v = d / 16, f = function(g, S) {
3034
+ for (g = String(g); g.length < S; )
3035
+ g = " " + g;
3036
+ return g;
3037
+ };
3038
+ console.info("%c⏱ " + f(d, 5) + " /" + f(m, 5) + " ms", `
3039
+ font-size: .6rem;
3040
+ font-weight: bold;
3041
+ color: hsl(` + Math.max(0, Math.min(120 - 120 * v, 120)) + "deg 100% 31%);", e == null ? void 0 : e.key);
3042
+ }
3043
+ return e == null || e.onChange == null || e.onChange(i), i;
3044
+ };
3045
+ }
3046
+ function ht(t, n) {
3047
+ if (t === void 0)
3048
+ throw new Error("Unexpected undefined" + (n ? ": " + n : ""));
3049
+ return t;
3050
+ }
3051
+ var ti = function(n, e) {
3052
+ return Math.abs(n - e) < 1;
3053
+ };
3054
+ /**
3055
+ * virtual-core
3056
+ *
3057
+ * Copyright (c) TanStack
3058
+ *
3059
+ * This source code is licensed under the MIT license found in the
3060
+ * LICENSE.md file in the root directory of this source tree.
3061
+ *
3062
+ * @license MIT
3063
+ */
3064
+ var ni = function(n) {
3065
+ return n;
3066
+ }, ri = function(n) {
3067
+ for (var e = Math.max(n.startIndex - n.overscan, 0), r = Math.min(n.endIndex + n.overscan, n.count - 1), o = [], i = e; i <= r; i++)
3068
+ o.push(i);
3069
+ return o;
3070
+ }, oi = function(n, e) {
3071
+ var r = n.scrollElement;
3072
+ if (r) {
3073
+ var o = function(a) {
3074
+ var u = a.width, c = a.height;
3075
+ e({
3076
+ width: Math.round(u),
3077
+ height: Math.round(c)
3078
+ });
3079
+ };
3080
+ o(r.getBoundingClientRect());
3081
+ var i = new ResizeObserver(function(s) {
3082
+ var a = s[0];
3083
+ if (a != null && a.borderBoxSize) {
3084
+ var u = a.borderBoxSize[0];
3085
+ if (u) {
3086
+ o({
3087
+ width: u.inlineSize,
3088
+ height: u.blockSize
3089
+ });
3090
+ return;
3091
+ }
3092
+ }
3093
+ o(r.getBoundingClientRect());
3094
+ });
3095
+ return i.observe(r, {
3096
+ box: "border-box"
3097
+ }), function() {
3098
+ i.unobserve(r);
3099
+ };
3100
+ }
3101
+ }, ii = function(n, e) {
3102
+ var r = n.scrollElement;
3103
+ if (r) {
3104
+ var o = function() {
3105
+ e(r[n.options.horizontal ? "scrollLeft" : "scrollTop"]);
3106
+ };
3107
+ return o(), r.addEventListener("scroll", o, {
3108
+ passive: !0
3109
+ }), function() {
3110
+ r.removeEventListener("scroll", o);
3111
+ };
3112
+ }
3113
+ }, si = function(n, e, r) {
3114
+ if (e != null && e.borderBoxSize) {
3115
+ var o = e.borderBoxSize[0];
3116
+ if (o) {
3117
+ var i = Math.round(o[r.options.horizontal ? "inlineSize" : "blockSize"]);
3118
+ return i;
3119
+ }
3120
+ }
3121
+ return Math.round(n.getBoundingClientRect()[r.options.horizontal ? "width" : "height"]);
3122
+ }, ai = function(n, e, r) {
3123
+ var o, i, s = e.adjustments, a = s === void 0 ? 0 : s, u = e.behavior, c = n + a;
3124
+ (o = r.scrollElement) == null || o.scrollTo == null || o.scrollTo((i = {}, i[r.options.horizontal ? "left" : "top"] = c, i.behavior = u, i));
3125
+ }, li = function(n) {
3126
+ var e = this;
3127
+ this.unsubs = [], this.scrollElement = null, this.isScrolling = !1, this.isScrollingTimeoutId = null, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollDirection = null, this.scrollAdjustments = 0, this.measureElementCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ function() {
3128
+ var r = null, o = function() {
3129
+ return r || (typeof ResizeObserver < "u" ? r = new ResizeObserver(function(s) {
3130
+ s.forEach(function(a) {
3131
+ e._measureElement(a.target, a);
3132
+ });
3133
+ }) : null);
3134
+ };
3135
+ return {
3136
+ disconnect: function() {
3137
+ var s;
3138
+ return (s = o()) == null ? void 0 : s.disconnect();
3139
+ },
3140
+ observe: function(s) {
3141
+ var a;
3142
+ return (a = o()) == null ? void 0 : a.observe(s, {
3143
+ box: "border-box"
3144
+ });
3145
+ },
3146
+ unobserve: function(s) {
3147
+ var a;
3148
+ return (a = o()) == null ? void 0 : a.unobserve(s);
3149
+ }
3150
+ };
3151
+ }(), this.range = null, this.setOptions = function(r) {
3152
+ Object.entries(r).forEach(function(o) {
3153
+ var i = o[0], s = o[1];
3154
+ typeof s > "u" && delete r[i];
3155
+ }), e.options = Ze({
3156
+ debug: !1,
3157
+ initialOffset: 0,
3158
+ overscan: 1,
3159
+ paddingStart: 0,
3160
+ paddingEnd: 0,
3161
+ scrollPaddingStart: 0,
3162
+ scrollPaddingEnd: 0,
3163
+ horizontal: !1,
3164
+ getItemKey: ni,
3165
+ rangeExtractor: ri,
3166
+ onChange: function() {
3167
+ },
3168
+ measureElement: si,
3169
+ initialRect: {
3170
+ width: 0,
3171
+ height: 0
3172
+ },
3173
+ scrollMargin: 0,
3174
+ scrollingDelay: 150,
3175
+ indexAttribute: "data-index",
3176
+ initialMeasurementsCache: [],
3177
+ lanes: 1
3178
+ }, r);
3179
+ }, this.notify = function(r) {
3180
+ e.options.onChange == null || e.options.onChange(e, r);
3181
+ }, this.maybeNotify = we(function() {
3182
+ return e.calculateRange(), [e.isScrolling, e.range ? e.range.startIndex : null, e.range ? e.range.endIndex : null];
3183
+ }, function(r) {
3184
+ e.notify(r);
3185
+ }, {
3186
+ key: process.env.NODE_ENV !== "production" && "maybeNotify",
3187
+ debug: function() {
3188
+ return e.options.debug;
3189
+ },
3190
+ initialDeps: [this.isScrolling, this.range ? this.range.startIndex : null, this.range ? this.range.endIndex : null]
3191
+ }), this.cleanup = function() {
3192
+ e.unsubs.filter(Boolean).forEach(function(r) {
3193
+ return r();
3194
+ }), e.unsubs = [], e.scrollElement = null;
3195
+ }, this._didMount = function() {
3196
+ return e.measureElementCache.forEach(e.observer.observe), function() {
3197
+ e.observer.disconnect(), e.cleanup();
3198
+ };
3199
+ }, this._willUpdate = function() {
3200
+ var r = e.options.getScrollElement();
3201
+ e.scrollElement !== r && (e.cleanup(), e.scrollElement = r, e._scrollToOffset(e.scrollOffset, {
3202
+ adjustments: void 0,
3203
+ behavior: void 0
3204
+ }), e.unsubs.push(e.options.observeElementRect(e, function(o) {
3205
+ e.scrollRect = o, e.maybeNotify();
3206
+ })), e.unsubs.push(e.options.observeElementOffset(e, function(o) {
3207
+ e.scrollAdjustments = 0, e.scrollOffset !== o && (e.isScrollingTimeoutId !== null && (clearTimeout(e.isScrollingTimeoutId), e.isScrollingTimeoutId = null), e.isScrolling = !0, e.scrollDirection = e.scrollOffset < o ? "forward" : "backward", e.scrollOffset = o, e.maybeNotify(), e.isScrollingTimeoutId = setTimeout(function() {
3208
+ e.isScrollingTimeoutId = null, e.isScrolling = !1, e.scrollDirection = null, e.maybeNotify();
3209
+ }, e.options.scrollingDelay));
3210
+ })));
3211
+ }, this.getSize = function() {
3212
+ return e.scrollRect[e.options.horizontal ? "width" : "height"];
3213
+ }, this.memoOptions = we(function() {
3214
+ return [e.options.count, e.options.paddingStart, e.options.scrollMargin, e.options.getItemKey];
3215
+ }, function(r, o, i, s) {
3216
+ return e.pendingMeasuredCacheIndexes = [], {
3217
+ count: r,
3218
+ paddingStart: o,
3219
+ scrollMargin: i,
3220
+ getItemKey: s
3221
+ };
3222
+ }, {
3223
+ key: !1
3224
+ }), this.getFurthestMeasurement = function(r, o) {
3225
+ for (var i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = o - 1; a >= 0; a--) {
3226
+ var u = r[a];
3227
+ if (!i.has(u.lane)) {
3228
+ var c = s.get(u.lane);
3229
+ if (c == null || u.end > c.end ? s.set(u.lane, u) : u.end < c.end && i.set(u.lane, !0), i.size === e.options.lanes)
3230
+ break;
3231
+ }
3232
+ }
3233
+ return s.size === e.options.lanes ? Array.from(s.values()).sort(function(m, d) {
3234
+ return m.end - d.end;
3235
+ })[0] : void 0;
3236
+ }, this.getMeasurements = we(function() {
3237
+ return [e.memoOptions(), e.itemSizeCache];
3238
+ }, function(r, o) {
3239
+ var i = r.count, s = r.paddingStart, a = r.scrollMargin, u = r.getItemKey, c = e.pendingMeasuredCacheIndexes.length > 0 ? Math.min.apply(Math, e.pendingMeasuredCacheIndexes) : 0;
3240
+ e.pendingMeasuredCacheIndexes = [];
3241
+ for (var m = e.measurementsCache.slice(0, c), d = c; d < i; d++) {
3242
+ var v = u(d), f = e.options.lanes === 1 ? m[d - 1] : e.getFurthestMeasurement(m, d), p = f ? f.end : s + a, g = o.get(v), S = typeof g == "number" ? g : e.options.estimateSize(d), y = p + S, x = f ? f.lane : d % e.options.lanes;
3243
+ m[d] = {
3244
+ index: d,
3245
+ start: p,
3246
+ size: S,
3247
+ end: y,
3248
+ key: v,
3249
+ lane: x
3250
+ };
3251
+ }
3252
+ return e.measurementsCache = m, m;
3253
+ }, {
3254
+ key: process.env.NODE_ENV !== "production" && "getMeasurements",
3255
+ debug: function() {
3256
+ return e.options.debug;
3257
+ }
3258
+ }), this.calculateRange = we(function() {
3259
+ return [e.getMeasurements(), e.getSize(), e.scrollOffset];
3260
+ }, function(r, o, i) {
3261
+ return e.range = r.length > 0 && o > 0 ? ui({
3262
+ measurements: r,
3263
+ outerSize: o,
3264
+ scrollOffset: i
3265
+ }) : null;
3266
+ }, {
3267
+ key: process.env.NODE_ENV !== "production" && "calculateRange",
3268
+ debug: function() {
3269
+ return e.options.debug;
3270
+ }
3271
+ }), this.getIndexes = we(function() {
3272
+ return [e.options.rangeExtractor, e.calculateRange(), e.options.overscan, e.options.count];
3273
+ }, function(r, o, i, s) {
3274
+ return o === null ? [] : r(Ze({}, o, {
3275
+ overscan: i,
3276
+ count: s
3277
+ }));
3278
+ }, {
3279
+ key: process.env.NODE_ENV !== "production" && "getIndexes",
3280
+ debug: function() {
3281
+ return e.options.debug;
3282
+ }
3283
+ }), this.indexFromElement = function(r) {
3284
+ var o = e.options.indexAttribute, i = r.getAttribute(o);
3285
+ return i ? parseInt(i, 10) : (console.warn("Missing attribute name '" + o + "={index}' on measured element."), -1);
3286
+ }, this._measureElement = function(r, o) {
3287
+ var i = e.measurementsCache[e.indexFromElement(r)];
3288
+ if (!i || !r.isConnected) {
3289
+ e.measureElementCache.forEach(function(u, c) {
3290
+ u === r && (e.observer.unobserve(r), e.measureElementCache.delete(c));
3291
+ });
3292
+ return;
3293
+ }
3294
+ var s = e.measureElementCache.get(i.key);
3295
+ s !== r && (s && e.observer.unobserve(s), e.observer.observe(r), e.measureElementCache.set(i.key, r));
3296
+ var a = e.options.measureElement(r, o, e);
3297
+ e.resizeItem(i, a);
3298
+ }, this.resizeItem = function(r, o) {
3299
+ var i, s = (i = e.itemSizeCache.get(r.key)) != null ? i : r.size, a = o - s;
3300
+ a !== 0 && (r.start < e.scrollOffset && (process.env.NODE_ENV !== "production" && e.options.debug && console.info("correction", a), e._scrollToOffset(e.scrollOffset, {
3301
+ adjustments: e.scrollAdjustments += a,
3302
+ behavior: void 0
3303
+ })), e.pendingMeasuredCacheIndexes.push(r.index), e.itemSizeCache = new Map(e.itemSizeCache.set(r.key, o)), e.notify(!1));
3304
+ }, this.measureElement = function(r) {
3305
+ r && e._measureElement(r, void 0);
3306
+ }, this.getVirtualItems = we(function() {
3307
+ return [e.getIndexes(), e.getMeasurements()];
3308
+ }, function(r, o) {
3309
+ for (var i = [], s = 0, a = r.length; s < a; s++) {
3310
+ var u = r[s], c = o[u];
3311
+ i.push(c);
3312
+ }
3313
+ return i;
3314
+ }, {
3315
+ key: process.env.NODE_ENV !== "production" && "getIndexes",
3316
+ debug: function() {
3317
+ return e.options.debug;
3318
+ }
3319
+ }), this.getVirtualItemForOffset = function(r) {
3320
+ var o = e.getMeasurements();
3321
+ return ht(o[Wn(0, o.length - 1, function(i) {
3322
+ return ht(o[i]).start;
3323
+ }, r)]);
3324
+ }, this.getOffsetForAlignment = function(r, o) {
3325
+ var i = e.getSize();
3326
+ o === "auto" && (r <= e.scrollOffset ? o = "start" : r >= e.scrollOffset + i ? o = "end" : o = "start"), o === "start" ? r = r : o === "end" ? r = r - i : o === "center" && (r = r - i / 2);
3327
+ var s = e.options.horizontal ? "scrollWidth" : "scrollHeight", a = e.scrollElement ? "document" in e.scrollElement ? e.scrollElement.document.documentElement[s] : e.scrollElement[s] : 0, u = a - e.getSize();
3328
+ return Math.max(Math.min(u, r), 0);
3329
+ }, this.getOffsetForIndex = function(r, o) {
3330
+ o === void 0 && (o = "auto"), r = Math.max(0, Math.min(r, e.options.count - 1));
3331
+ var i = ht(e.getMeasurements()[r]);
3332
+ if (o === "auto")
3333
+ if (i.end >= e.scrollOffset + e.getSize() - e.options.scrollPaddingEnd)
3334
+ o = "end";
3335
+ else if (i.start <= e.scrollOffset + e.options.scrollPaddingStart)
3336
+ o = "start";
3337
+ else
3338
+ return [e.scrollOffset, o];
3339
+ var s = o === "end" ? i.end + e.options.scrollPaddingEnd : i.start - e.options.scrollPaddingStart;
3340
+ return [e.getOffsetForAlignment(s, o), o];
3341
+ }, this.isDynamicMode = function() {
3342
+ return e.measureElementCache.size > 0;
3343
+ }, this.cancelScrollToIndex = function() {
3344
+ e.scrollToIndexTimeoutId !== null && (clearTimeout(e.scrollToIndexTimeoutId), e.scrollToIndexTimeoutId = null);
3345
+ }, this.scrollToOffset = function(r, o) {
3346
+ var i = o === void 0 ? {} : o, s = i.align, a = s === void 0 ? "start" : s, u = i.behavior;
3347
+ e.cancelScrollToIndex(), u === "smooth" && e.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."), e._scrollToOffset(e.getOffsetForAlignment(r, a), {
3348
+ adjustments: void 0,
3349
+ behavior: u
3350
+ });
3351
+ }, this.scrollToIndex = function(r, o) {
3352
+ var i = o === void 0 ? {} : o, s = i.align, a = s === void 0 ? "auto" : s, u = i.behavior;
3353
+ r = Math.max(0, Math.min(r, e.options.count - 1)), e.cancelScrollToIndex(), u === "smooth" && e.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");
3354
+ var c = e.getOffsetForIndex(r, a), m = c[0], d = c[1];
3355
+ e._scrollToOffset(m, {
3356
+ adjustments: void 0,
3357
+ behavior: u
3358
+ }), u !== "smooth" && e.isDynamicMode() && (e.scrollToIndexTimeoutId = setTimeout(function() {
3359
+ e.scrollToIndexTimeoutId = null;
3360
+ var v = e.measureElementCache.has(e.options.getItemKey(r));
3361
+ if (v) {
3362
+ var f = e.getOffsetForIndex(r, d), p = f[0];
3363
+ ti(p, e.scrollOffset) || e.scrollToIndex(r, {
3364
+ align: d,
3365
+ behavior: u
3366
+ });
3367
+ } else
3368
+ e.scrollToIndex(r, {
3369
+ align: d,
3370
+ behavior: u
3371
+ });
3372
+ }));
3373
+ }, this.scrollBy = function(r, o) {
3374
+ var i = o === void 0 ? {} : o, s = i.behavior;
3375
+ e.cancelScrollToIndex(), s === "smooth" && e.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."), e._scrollToOffset(e.scrollOffset + r, {
3376
+ adjustments: void 0,
3377
+ behavior: s
3378
+ });
3379
+ }, this.getTotalSize = function() {
3380
+ var r;
3381
+ return (((r = e.getMeasurements()[e.options.count - 1]) == null ? void 0 : r.end) || e.options.paddingStart) - e.options.scrollMargin + e.options.paddingEnd;
3382
+ }, this._scrollToOffset = function(r, o) {
3383
+ var i = o.adjustments, s = o.behavior;
3384
+ e.options.scrollToFn(r, {
3385
+ behavior: s,
3386
+ adjustments: i
3387
+ }, e);
3388
+ }, this.measure = function() {
3389
+ e.itemSizeCache = /* @__PURE__ */ new Map(), e.notify(!1);
3390
+ }, this.setOptions(n), this.scrollRect = this.options.initialRect, this.scrollOffset = this.options.initialOffset, this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach(function(r) {
3391
+ e.itemSizeCache.set(r.key, r.size);
3392
+ }), this.maybeNotify();
3393
+ }, Wn = function(n, e, r, o) {
3394
+ for (; n <= e; ) {
3395
+ var i = (n + e) / 2 | 0, s = r(i);
3396
+ if (s < o)
3397
+ n = i + 1;
3398
+ else if (s > o)
3399
+ e = i - 1;
3400
+ else
3401
+ return i;
3402
+ }
3403
+ return n > 0 ? n - 1 : 0;
3404
+ };
3405
+ function ui(t) {
3406
+ for (var n = t.measurements, e = t.outerSize, r = t.scrollOffset, o = n.length - 1, i = function(c) {
3407
+ return n[c].start;
3408
+ }, s = Wn(0, o, i, r), a = s; a < o && n[a].end < r + e; )
3409
+ a++;
3410
+ return {
3411
+ startIndex: s,
3412
+ endIndex: a
3413
+ };
3414
+ }
3415
+ /**
3416
+ * react-virtual
3417
+ *
3418
+ * Copyright (c) TanStack
3419
+ *
3420
+ * This source code is licensed under the MIT license found in the
3421
+ * LICENSE.md file in the root directory of this source tree.
3422
+ *
3423
+ * @license MIT
3424
+ */
3425
+ var ci = typeof document < "u" ? b.useLayoutEffect : b.useEffect;
3426
+ function fi(t) {
3427
+ var n = b.useReducer(function() {
3428
+ return {};
3429
+ }, {})[1], e = Je({}, t, {
3430
+ onChange: function(s, a) {
3431
+ a ? hr(n) : n(), t.onChange == null || t.onChange(s, a);
3432
+ }
3433
+ }), r = b.useState(function() {
3434
+ return new li(e);
3435
+ }), o = r[0];
3436
+ return o.setOptions(e), b.useEffect(function() {
3437
+ return o._didMount();
3438
+ }, []), ci(function() {
3439
+ return o._willUpdate();
3440
+ }), o;
3441
+ }
3442
+ function di(t) {
3443
+ return fi(Je({
3444
+ observeElementRect: oi,
3445
+ observeElementOffset: ii,
3446
+ scrollToFn: ai
3447
+ }, t));
3448
+ }
3449
+ function gi(t) {
3450
+ const {
3451
+ items: n,
3452
+ selected: e,
3453
+ className: r,
3454
+ onChange: o,
3455
+ disabled: i,
3456
+ placeholder: s = "Select an Item",
3457
+ multiple: a,
3458
+ width: u = "215px",
3459
+ height: c = "40px",
3460
+ ...m
3461
+ } = t, d = Ct(null);
3462
+ return /* @__PURE__ */ O.jsx(
3463
+ Bn,
3464
+ {
3465
+ placement: "bottom",
3466
+ trigger: "click",
3467
+ role: "combobox",
3468
+ disabled: i,
3469
+ content: a ? /* @__PURE__ */ O.jsx(vn, { multiple: !0, items: n, selected: e, onChange: o, width: u }) : /* @__PURE__ */ O.jsx(vn, { items: n, selected: e, onChange: o, width: u }),
3470
+ children: (v) => /* @__PURE__ */ O.jsxs(
3471
+ ae,
3472
+ {
3473
+ style: { width: u, height: c },
3474
+ className: J(
3475
+ "inline-flex grow items-center justify-between rounded border-2 border-input bg-background p-2 transition",
3476
+ i ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
3477
+ // open && 'border-primary shadow-sm shadow-ring',
3478
+ r
3479
+ ),
3480
+ children: [
3481
+ /* @__PURE__ */ O.jsx(
3482
+ ae,
3483
+ {
3484
+ className: J(
3485
+ "flex max-w-[calc(100%-30px)] flex-none grow items-center gap-1 text-sm",
3486
+ i ? "text-muted-foreground" : "text-foreground"
3487
+ ),
3488
+ ref: d,
3489
+ children: a ? /* @__PURE__ */ O.jsx(
3490
+ Jo,
3491
+ {
3492
+ items: e.map((f) => f.text),
3493
+ data: e,
3494
+ parentRef: d,
3495
+ badgeVariant: "secondary",
3496
+ badgeStyles: "!bg-input h-6 min-w-min gap-2 !bg-input",
3497
+ children: (f, p, g) => /* @__PURE__ */ O.jsxs(
3498
+ xn,
3499
+ {
3500
+ className: "flex h-6 min-w-min gap-2 !bg-input pr-1",
3501
+ variant: "secondary",
3502
+ children: [
3503
+ f,
3504
+ /* @__PURE__ */ O.jsx(
3505
+ xr,
3506
+ {
3507
+ onClick: () => {
3508
+ o(e.filter((S) => S.key !== (g == null ? void 0 : g.key)));
3509
+ },
3510
+ variant: "icon",
3511
+ size: "icon",
3512
+ className: "group bg-muted p-0.5 hover:bg-muted-foreground ",
3513
+ children: /* @__PURE__ */ O.jsx(ei, { className: "size-3 transition duration-300 group-hover:rotate-90 group-hover:text-muted" })
3514
+ }
3515
+ )
3516
+ ]
3517
+ },
3518
+ g == null ? void 0 : g.key
3519
+ )
3520
+ }
3521
+ ) : e.text ?? "Select an item"
3522
+ }
3523
+ ),
3524
+ /* @__PURE__ */ O.jsx(
3525
+ Zo,
3526
+ {
3527
+ className: J(
3528
+ "size-4 rounded-full bg-input p-0.5 transition duration-300 ease-in-out",
3529
+ v ? "rotate-180" : "rotate-0",
3530
+ i ? "text-muted-foreground" : "text-foreground"
3531
+ )
3532
+ }
3533
+ )
3534
+ ]
3535
+ }
3536
+ )
3537
+ }
3538
+ );
3539
+ }
3540
+ const vn = (t) => {
3541
+ const { items: n, multiple: e, selected: r, onChange: o, width: i } = t, [s, a] = St(""), u = Ct(null), c = pt(
3542
+ () => n.reduce((v, f, p, g) => ((!s.length || f.text.toLowerCase().includes(s.toLowerCase())) && v.push(f), v), []),
3543
+ [n, s]
3544
+ ), m = di({
3545
+ count: c.length,
3546
+ getScrollElement: () => u.current,
3547
+ estimateSize: () => 35
3548
+ }), d = r instanceof Array ? r : [r];
3549
+ return /* @__PURE__ */ O.jsxs(
3550
+ ae,
3551
+ {
3552
+ className: "flex flex-col divide-y-2 divide-border overflow-hidden rounded border border-input bg-background",
3553
+ style: { width: i },
3554
+ children: [
3555
+ /* @__PURE__ */ O.jsxs(ae, { className: J("inline-flex grow items-center rounded px-3 py-2"), children: [
3556
+ /* @__PURE__ */ O.jsx(Qo, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
3557
+ /* @__PURE__ */ O.jsx(
3558
+ re,
3559
+ {
3560
+ tag: "input",
3561
+ className: "inline-flex grow bg-transparent text-sm text-foreground outline-none",
3562
+ placeholder: "Search",
3563
+ value: s,
3564
+ onChange: (v) => a(v.target.value)
3565
+ }
3566
+ )
3567
+ ] }),
3568
+ /* @__PURE__ */ O.jsx(
3569
+ re,
3570
+ {
3571
+ tag: "ul",
3572
+ className: J("max-h-60 grow overflow-auto shadow", "focus:outline-none focus:ring-0"),
3573
+ ref: u,
3574
+ children: /* @__PURE__ */ O.jsxs(
3575
+ ae,
3576
+ {
3577
+ style: {
3578
+ height: `${m.getTotalSize()}px`,
3579
+ width: "100%",
3580
+ position: "relative"
3581
+ },
3582
+ children: [
3583
+ m.getVirtualItems().map((v) => /* @__PURE__ */ O.jsx(
3584
+ re,
3585
+ {
3586
+ tag: "li",
3587
+ style: {
3588
+ height: `${v.size}px`,
3589
+ transform: `translateY(${v.start}px)`
3590
+ },
3591
+ className: J(
3592
+ "absolute left-0 top-0 w-full cursor-pointer px-3 py-2 text-sm text-foreground",
3593
+ d.some((f) => f.key === c[v.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
3594
+ ),
3595
+ onClick: () => {
3596
+ e ? d.some((f) => f.key === c[v.index].key) ? o(
3597
+ structuredClone(
3598
+ r.filter(
3599
+ (f) => f.key !== c[v.index].key
3600
+ )
3601
+ )
3602
+ ) : o(structuredClone([...r, c[v.index]])) : o(c[v.index]);
3603
+ },
3604
+ children: c[v.index].text
3605
+ },
3606
+ v.key
3607
+ )),
3608
+ c.length === 0 && /* @__PURE__ */ O.jsx(re, { tag: "li", className: J("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" })
3609
+ ]
3610
+ }
3611
+ )
3612
+ }
3613
+ )
3614
+ ]
3615
+ }
3616
+ );
3617
+ };
3618
+ function hi(t) {
3619
+ return /* @__PURE__ */ O.jsx(
3620
+ "svg",
3621
+ {
3622
+ xmlns: "http://www.w3.org/2000/svg",
3623
+ fill: "none",
3624
+ viewBox: "0 0 24 24",
3625
+ strokeWidth: 1.5,
3626
+ stroke: "currentColor",
3627
+ className: "h-6 w-6",
3628
+ ...t,
3629
+ children: /* @__PURE__ */ O.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m4.5 15.75 7.5-7.5 7.5 7.5" })
3630
+ }
3631
+ );
3632
+ }
3633
+ function pi(t) {
3634
+ const { className: n, ...e } = t;
3635
+ return /* @__PURE__ */ O.jsx(
3636
+ re,
3637
+ {
3638
+ tag: "input",
3639
+ className: J(
3640
+ "h-10 w-full rounded border-2 border-input bg-background px-3 py-2 text-sm text-foreground transition",
3641
+ "focus-visible:border-primary focus-visible:shadow-sm focus-visible:shadow-ring focus-visible:outline-none",
3642
+ "disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted",
3643
+ "file:border-0 file:bg-transparent file:text-sm file:font-medium",
3644
+ n
3645
+ ),
3646
+ ...e
3647
+ }
3648
+ );
3649
+ }
3650
+ function bi(t) {
3651
+ const { className: n, checked: e, onChange: r, ...o } = t;
3652
+ return /* @__PURE__ */ O.jsxs(
3653
+ re,
3654
+ {
3655
+ tag: "div",
3656
+ className: J(
3657
+ "rounded-full",
3658
+ "h-5 w-10",
3659
+ "border border-muted bg-secondary",
3660
+ "flex items-center",
3661
+ n
3662
+ ),
3663
+ onClick: () => {
3664
+ r(!e);
3665
+ },
3666
+ children: [
3667
+ /* @__PURE__ */ O.jsx(re, { tag: "input", type: "hidden", checked: e, ...o }),
3668
+ /* @__PURE__ */ O.jsx(
3669
+ ae,
3670
+ {
3671
+ className: J(
3672
+ "h-4 w-4 rounded-full bg-primary transition",
3673
+ e ? "translate-x-5" : "translate-x-1"
3674
+ )
3675
+ }
3676
+ )
3677
+ ]
3678
+ }
3679
+ );
3680
+ }
3681
+ export {
3682
+ xn as Badge,
3683
+ xr as Button,
3684
+ hi as ChevronDown,
3685
+ Zo as ChevronUp,
3686
+ Jo as Collapse,
3687
+ re as Component,
3688
+ ae as Container,
3689
+ gi as Dropdown,
3690
+ pi as Input,
3691
+ Bn as Popover,
3692
+ Qo as Search,
3693
+ bi as Toggle,
3694
+ yn as cva,
3695
+ J as cx
3696
+ };