@oncehub/ui-react 1.3.5 → 1.4.0-beta.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,156 +1,158 @@
1
1
  import "./index.css";
2
- import { jsx as S, Fragment as Qe, jsxs as we } from "react/jsx-runtime";
3
- import * as Pe from "react";
4
- import Y, { forwardRef as We, useState as Q, useEffect as Z, useRef as C, useLayoutEffect as Hr, Fragment as Le, isValidElement as qr, cloneElement as zr, createElement as Kr, createContext as He, useContext as Ve, useMemo as re, useReducer as Sn, createRef as kn, useCallback as Ke } from "react";
5
- const Gr = "_button_1d9mw_1", Yr = "_primary_1d9mw_5", Qr = "_secondary_1d9mw_12", Xr = "_small_1d9mw_19", Zr = "_rounded_1d9mw_22", Jr = "_medium_1d9mw_26", ei = "_large_1d9mw_33", ti = "_squared_1d9mw_40", ft = {
6
- button: Gr,
7
- primary: Yr,
8
- secondary: Qr,
9
- small: Xr,
10
- rounded: Zr,
11
- medium: Jr,
12
- large: ei,
13
- squared: ti
14
- }, qe = (e) => {
2
+ import { jsx as k, Fragment as it, jsxs as we } from "react/jsx-runtime";
3
+ import * as We from "react";
4
+ import ee, { forwardRef as Ke, useState as K, useEffect as Y, useRef as _, useLayoutEffect as Kr, Fragment as je, isValidElement as Yr, cloneElement as Gr, createElement as Qr, createContext as Je, useContext as Ye, useMemo as fe, useReducer as In, createRef as _n, useCallback as tt } from "react";
5
+ import { createPortal as Yt } from "react-dom";
6
+ const Xr = "_button_1d9mw_1", Zr = "_primary_1d9mw_5", Jr = "_secondary_1d9mw_12", ei = "_small_1d9mw_19", ti = "_rounded_1d9mw_22", ni = "_medium_1d9mw_26", ri = "_large_1d9mw_33", ii = "_squared_1d9mw_40", xt = {
7
+ button: Xr,
8
+ primary: Zr,
9
+ secondary: Jr,
10
+ small: ei,
11
+ rounded: ti,
12
+ medium: ni,
13
+ large: ri,
14
+ squared: ii
15
+ }, Ge = (e) => {
15
16
  if (!e)
16
17
  throw new Error("Please provide a hex color code");
17
18
  if (!/^#([A-Fa-f0-9]{3}){1,2}$/.test(e))
18
19
  throw new Error("Please provide a valid hex code");
19
20
  e = e.length === 4 ? e.replace(/^#(.)(.)(.)$/, "#$1$1$2$2$3$3") : e;
20
- const r = e.substring(1), [i, a, o] = [0, 2, 4].map(
21
+ const r = e.substring(1), [i, s, o] = [0, 2, 4].map(
21
22
  (p) => parseInt(r.substring(p, p + 2), 16)
22
23
  );
23
- return (0.2126 * i + 0.7152 * a + 0.0722 * o) / 255 < 0.7 ? "dark" : "light";
24
+ return (0.2126 * i + 0.7152 * s + 0.0722 * o) / 255 < 0.7 ? "dark" : "light";
24
25
  };
25
- class Re {
26
+ class De {
26
27
  static convert3HexTo6(t) {
27
28
  return typeof t == "string" && /^#(?:[0-9a-fA-F]{3}){1,2}$/.test(t) && t.length === 4 ? t.replace(/^#(.)(.)(.)$/, "#$1$1$2$2$3$3") : t;
28
29
  }
29
30
  }
30
- const Tn = We(
31
+ const Cn = Ke(
31
32
  ({
32
33
  themeColor: e = "",
33
34
  variant: t = "primary",
34
35
  size: n = "small",
35
36
  shape: r = "rounded",
36
37
  children: i,
37
- className: a = "",
38
+ className: s = "",
38
39
  style: o = {},
39
40
  ...f
40
41
  }, p) => {
41
42
  let b = {};
42
43
  if (e) {
43
- const h = qe(e);
44
- if (e = Re.convert3HexTo6(e), h === "dark" || h === "light") {
45
- const l = t === "primary" ? e : "#ffffff", u = t === "primary" ? h === "dark" ? "#ffffff" : "#333333" : h === "light" ? "#333333" : e, s = e === "#ffffff" ? "#c8c8c8" : e;
44
+ const m = Ge(e);
45
+ if (e = De.convert3HexTo6(e), m === "dark" || m === "light") {
46
+ const l = t === "primary" ? e : "#ffffff", u = t === "primary" ? m === "dark" ? "#ffffff" : "#333333" : m === "light" ? "#333333" : e, a = e === "#ffffff" ? "#c8c8c8" : e;
46
47
  b = {
47
48
  backgroundColor: l,
48
49
  color: u,
49
- outlineColor: s,
50
- borderColor: s
50
+ outlineColor: a,
51
+ borderColor: a
51
52
  };
52
53
  }
53
54
  }
54
- const v = [ft.button, ft[t], ft[n], ft[r], a].filter(Boolean).join(" ");
55
- return /* @__PURE__ */ S(Qe, { children: /* @__PURE__ */ S("button", { ref: p, style: { ...b, ...o }, className: `${v}`, ...f, children: i }) });
55
+ const v = [xt.button, xt[t], xt[n], xt[r], s].filter(Boolean).join(" ");
56
+ return /* @__PURE__ */ k(it, { children: /* @__PURE__ */ k("button", { ref: p, style: { ...b, ...o }, className: `${v}`, ...f, children: i }) });
56
57
  }
57
58
  );
58
- Tn.displayName = "Button";
59
- const ni = "_checkboxLayout_12n0g_1", ri = "_checkboxLabel_12n0g_4", ii = "_checkboxInnerContainer_12n0g_10", oi = "_checkboxInput_12n0g_13", ai = "_checkboxFrame_12n0g_16", li = "_checkboxCheckMark_12n0g_19", si = "_checkboxCheckMarkPath_12n0g_22", ci = "_checkboxUncheckedChecked_12n0g_1", ui = "_checkboxDisabled_12n0g_43", di = "_medium_12n0g_49", fi = "_large_12n0g_55", Ce = {
60
- checkboxLayout: ni,
61
- checkboxLabel: ri,
62
- checkboxInnerContainer: ii,
63
- checkboxInput: oi,
64
- checkboxFrame: ai,
65
- checkboxCheckMark: li,
66
- checkboxCheckMarkPath: si,
67
- checkboxUncheckedChecked: ci,
68
- checkboxDisabled: ui,
69
- medium: di,
70
- large: fi
71
- }, pi = () => `checkbox_${Math.random().toString(36).substring(2, 11)}`, Bt = We(
59
+ Cn.displayName = "Button";
60
+ const oi = "_checkboxLayout_1jaci_1", ai = "_checkboxLabel_1jaci_4", li = "_checkboxInnerContainer_1jaci_10", si = "_checkboxInput_1jaci_13", ci = "_checkboxFrame_1jaci_16", ui = "_checkboxCheckMark_1jaci_19", di = "_checkboxCheckMarkPath_1jaci_22", fi = "_checkboxUncheckedChecked_1jaci_1", pi = "_visuallyHidden_1jaci_43", bi = "_checkboxDisabled_1jaci_53", vi = "_medium_1jaci_59", mi = "_large_1jaci_65", Le = {
61
+ checkboxLayout: oi,
62
+ checkboxLabel: ai,
63
+ checkboxInnerContainer: li,
64
+ checkboxInput: si,
65
+ checkboxFrame: ci,
66
+ checkboxCheckMark: ui,
67
+ checkboxCheckMarkPath: di,
68
+ checkboxUncheckedChecked: fi,
69
+ visuallyHidden: pi,
70
+ checkboxDisabled: bi,
71
+ medium: vi,
72
+ large: mi
73
+ }, hi = () => `checkbox_${Math.random().toString(36).substring(2, 11)}`, Pn = Ke(
72
74
  ({
73
75
  children: e,
74
76
  themeColor: t = "",
75
77
  checkboxSize: n = "medium",
76
- id: r = pi(),
78
+ id: r = hi(),
77
79
  checked: i = !1,
78
- disabled: a = !1,
80
+ disabled: s = !1,
79
81
  className: o = "",
80
82
  onChange: f,
81
83
  style: p = {},
82
84
  tabIndex: b,
83
85
  ...v
84
- }, h) => {
85
- const [l, u] = Q(i);
86
- let s = {}, c, d = a ? "#9b9b9b" : "#ffffff";
86
+ }, m) => {
87
+ const [l, u] = K(i);
88
+ let a = {}, c, d = s ? "#9b9b9b" : "#ffffff";
87
89
  if (t) {
88
- const g = qe(t);
89
- if (t = Re.convert3HexTo6(t), g === "dark" || g === "light") {
90
+ const g = Ge(t);
91
+ if (t = De.convert3HexTo6(t), g === "dark" || g === "light") {
90
92
  switch (g) {
91
93
  case "dark":
92
- d = a ? l ? "#9b9b9b" : "#f9f9f9" : "#ffffff";
94
+ d = s ? l ? "#9b9b9b" : "#f9f9f9" : "#ffffff";
93
95
  break;
94
96
  case "light":
95
- d = a ? l ? "#9b9b9b" : "#f9f9f9" : l ? "#333333" : "#ffffff";
97
+ d = s ? l ? "#9b9b9b" : "#f9f9f9" : l ? "#333333" : "#ffffff";
96
98
  break;
97
99
  default:
98
100
  d = "#9b9b9b";
99
101
  break;
100
102
  }
101
- const W = a ? "#f9f9f9" : l ? t : "#ffffff";
102
- c = a ? "#e4e4e4" : t == "#ffffff" ? "#333333" : t, l && (s = {
103
- backgroundColor: W,
103
+ const R = s ? "#f9f9f9" : l ? t : "#ffffff";
104
+ c = s ? "#e4e4e4" : t == "#ffffff" ? "#333333" : t, l && (a = {
105
+ backgroundColor: R,
104
106
  borderColor: c,
105
107
  outlineColor: c
106
108
  });
107
109
  }
108
110
  }
109
- const m = a ? Ce.checkboxDisabled : "", O = [Ce.checkboxLayout, Ce[n], m, o].filter(Boolean).join(" "), w = (g) => {
111
+ const h = s ? Le.checkboxDisabled : "", I = [Le.checkboxLayout, Le[n], h, o].filter(Boolean).join(" "), w = (g) => {
110
112
  g.key != "Enter" && (g.preventDefault(), f?.(g.target.checked), u(!l));
111
113
  };
112
- return /* @__PURE__ */ S(Qe, { children: /* @__PURE__ */ S("div", { className: O, "data-testid": "checkbox", children: /* @__PURE__ */ we("label", { className: Ce.checkboxLabel, htmlFor: r, onClick: (g) => w(g), children: [
114
+ return /* @__PURE__ */ k(it, { children: /* @__PURE__ */ k("div", { className: I, "data-testid": "checkbox", children: /* @__PURE__ */ we("label", { className: Le.checkboxLabel, htmlFor: r, onClick: (g) => w(g), children: [
113
115
  /* @__PURE__ */ we(
114
116
  "div",
115
117
  {
116
- className: Ce.checkboxInnerContainer,
117
- tabIndex: b || a ? -1 : 0,
118
+ className: Le.checkboxInnerContainer,
119
+ tabIndex: b || s ? -1 : 0,
118
120
  onKeyPress: (g) => w(g),
119
121
  "data-testid": "checkbox-inner-container",
120
122
  children: [
121
- /* @__PURE__ */ S(
123
+ /* @__PURE__ */ k(
122
124
  "input",
123
125
  {
124
- className: Ce.checkboxInput,
126
+ className: Le.checkboxInput,
125
127
  onChange: (g) => w(g),
126
128
  type: "checkbox",
127
129
  checked: l,
128
- disabled: a,
130
+ disabled: s,
129
131
  id: r,
130
- ref: h,
132
+ ref: m,
131
133
  ...v,
132
134
  tabIndex: -1,
133
135
  "data-testid": "checkbox-input"
134
136
  }
135
137
  ),
136
- /* @__PURE__ */ S(
138
+ /* @__PURE__ */ k(
137
139
  "div",
138
140
  {
139
- className: Ce.checkboxFrame,
140
- style: { ...s, ...p },
141
+ className: Le.checkboxFrame,
142
+ style: { ...a, ...p },
141
143
  "data-testid": "checkbox-frame",
142
- children: /* @__PURE__ */ S(
144
+ children: /* @__PURE__ */ k(
143
145
  "svg",
144
146
  {
145
147
  version: "1.1",
146
148
  focusable: "false",
147
- className: Ce.checkboxCheckMark,
149
+ className: Le.checkboxCheckMark,
148
150
  viewBox: "0 0 24 24",
149
151
  "data-testid": "check-mark-svg",
150
- children: /* @__PURE__ */ S(
152
+ children: /* @__PURE__ */ k(
151
153
  "path",
152
154
  {
153
- className: Ce.checkboxCheckMarkPath,
155
+ className: Le.checkboxCheckMarkPath,
154
156
  fill: "none",
155
157
  stroke: d,
156
158
  d: "M4.1,12.7 9,17.6 20.3,6.3"
@@ -163,109 +165,110 @@ const ni = "_checkboxLayout_12n0g_1", ri = "_checkboxLabel_12n0g_4", ii = "_chec
163
165
  ]
164
166
  }
165
167
  ),
166
- e && /* @__PURE__ */ S("span", { "data-testid": "checkbox-label", children: e })
168
+ e && /* @__PURE__ */ k("span", { "data-testid": "checkbox-label", children: e }),
169
+ /* @__PURE__ */ k("div", { className: Le.visuallyHidden, "aria-live": "polite", "aria-atomic": "true", children: l ? "Checked" : "Unchecked" })
167
170
  ] }) }) });
168
171
  }
169
172
  );
170
- Bt.displayName = "Checkbox";
171
- const bi = "_textInputWrapper_3upxq_1", vi = "_textInput_3upxq_1", cn = {
172
- textInputWrapper: bi,
173
- textInput: vi
173
+ Pn.displayName = "Checkbox";
174
+ const wi = "_textInputWrapper_1i9m6_1", gi = "_textInput_1i9m6_1", pn = {
175
+ textInputWrapper: wi,
176
+ textInput: gi
174
177
  };
175
- var mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, y = {}, Mt = { exports: {} };
178
+ var xi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, S = {}, Ut = { exports: {} };
176
179
  (function(e, t) {
177
180
  (function(n, r) {
178
- var i = "1.0.37", a = "", o = "?", f = "function", p = "undefined", b = "object", v = "string", h = "major", l = "model", u = "name", s = "type", c = "vendor", d = "version", m = "architecture", O = "console", w = "mobile", g = "tablet", W = "smarttv", L = "wearable", q = "embedded", M = 500, k = "Amazon", z = "Apple", ie = "ASUS", pe = "BlackBerry", _ = "Browser", te = "Chrome", ee = "Edge", ce = "Firefox", V = "Google", T = "Huawei", R = "LG", A = "Microsoft", oe = "Motorola", ne = "Opera", ae = "Samsung", x = "Sharp", I = "Sony", D = "Xiaomi", he = "Zebra", Ae = "Facebook", nn = "Chromium OS", rn = "Mac OS", Br = function($, H) {
181
+ var i = "1.0.37", s = "", o = "?", f = "function", p = "undefined", b = "object", v = "string", m = "major", l = "model", u = "name", a = "type", c = "vendor", d = "version", h = "architecture", I = "console", w = "mobile", g = "tablet", R = "smarttv", E = "wearable", j = "embedded", A = 500, T = "Amazon", V = "Apple", te = "ASUS", G = "BlackBerry", x = "Browser", Z = "Chrome", ne = "Edge", le = "Firefox", M = "Google", oe = "Huawei", J = "LG", q = "Microsoft", ue = "Motorola", se = "Opera", re = "Samsung", O = "Sharp", C = "Sony", $ = "Xiaomi", be = "Zebra", Ce = "Facebook", mt = "Chromium OS", ht = "Mac OS", y = function(W, z) {
179
182
  var F = {};
180
- for (var K in $)
181
- H[K] && H[K].length % 2 === 0 ? F[K] = H[K].concat($[K]) : F[K] = $[K];
183
+ for (var Q in W)
184
+ z[Q] && z[Q].length % 2 === 0 ? F[Q] = z[Q].concat(W[Q]) : F[Q] = W[Q];
182
185
  return F;
183
- }, ut = function($) {
184
- for (var H = {}, F = 0; F < $.length; F++)
185
- H[$[F].toUpperCase()] = $[F];
186
- return H;
187
- }, on = function($, H) {
188
- return typeof $ === v ? Je(H).indexOf(Je($)) !== -1 : !1;
189
- }, Je = function($) {
190
- return $.toLowerCase();
191
- }, jr = function($) {
192
- return typeof $ === v ? $.replace(/[^\d\.]/g, a).split(".")[0] : r;
193
- }, It = function($, H) {
194
- if (typeof $ === v)
195
- return $ = $.replace(/^\s\s*/, a), typeof H === p ? $ : $.substring(0, M);
196
- }, et = function($, H) {
197
- for (var F = 0, K, Me, ke, B, N, Te; F < H.length && !N; ) {
198
- var Ct = H[F], sn = H[F + 1];
199
- for (K = Me = 0; K < Ct.length && !N && Ct[K]; )
200
- if (N = Ct[K++].exec($), N)
201
- for (ke = 0; ke < sn.length; ke++)
202
- Te = N[++Me], B = sn[ke], typeof B === b && B.length > 0 ? B.length === 2 ? typeof B[1] == f ? this[B[0]] = B[1].call(this, Te) : this[B[0]] = B[1] : B.length === 3 ? typeof B[1] === f && !(B[1].exec && B[1].test) ? this[B[0]] = Te ? B[1].call(this, Te, B[2]) : r : this[B[0]] = Te ? Te.replace(B[1], B[2]) : r : B.length === 4 && (this[B[0]] = Te ? B[3].call(this, Te.replace(B[1], B[2])) : r) : this[B] = Te || r;
186
+ }, D = function(W) {
187
+ for (var z = {}, F = 0; F < W.length; F++)
188
+ z[W[F].toUpperCase()] = W[F];
189
+ return z;
190
+ }, de = function(W, z) {
191
+ return typeof W === v ? ce(z).indexOf(ce(W)) !== -1 : !1;
192
+ }, ce = function(W) {
193
+ return W.toLowerCase();
194
+ }, Ue = function(W) {
195
+ return typeof W === v ? W.replace(/[^\d\.]/g, s).split(".")[0] : r;
196
+ }, Me = function(W, z) {
197
+ if (typeof W === v)
198
+ return W = W.replace(/^\s\s*/, s), typeof z === p ? W : W.substring(0, A);
199
+ }, $e = function(W, z) {
200
+ for (var F = 0, Q, He, Pe, B, N, Re; F < z.length && !N; ) {
201
+ var Dt = z[F], fn = z[F + 1];
202
+ for (Q = He = 0; Q < Dt.length && !N && Dt[Q]; )
203
+ if (N = Dt[Q++].exec(W), N)
204
+ for (Pe = 0; Pe < fn.length; Pe++)
205
+ Re = N[++He], B = fn[Pe], typeof B === b && B.length > 0 ? B.length === 2 ? typeof B[1] == f ? this[B[0]] = B[1].call(this, Re) : this[B[0]] = B[1] : B.length === 3 ? typeof B[1] === f && !(B[1].exec && B[1].test) ? this[B[0]] = Re ? B[1].call(this, Re, B[2]) : r : this[B[0]] = Re ? Re.replace(B[1], B[2]) : r : B.length === 4 && (this[B[0]] = Re ? B[3].call(this, Re.replace(B[1], B[2])) : r) : this[B] = Re || r;
203
206
  F += 2;
204
207
  }
205
- }, _t = function($, H) {
206
- for (var F in H)
207
- if (typeof H[F] === b && H[F].length > 0) {
208
- for (var K = 0; K < H[F].length; K++)
209
- if (on(H[F][K], $))
208
+ }, Se = function(W, z) {
209
+ for (var F in z)
210
+ if (typeof z[F] === b && z[F].length > 0) {
211
+ for (var Q = 0; Q < z[F].length; Q++)
212
+ if (de(z[F][Q], W))
210
213
  return F === o ? r : F;
211
- } else if (on(H[F], $))
214
+ } else if (de(z[F], W))
212
215
  return F === o ? r : F;
213
- return $;
214
- }, Ur = { "1.0": "/8", 1.2: "/1", 1.3: "/3", "2.0": "/412", "2.0.2": "/416", "2.0.3": "/417", "2.0.4": "/419", "?": "/" }, an = { ME: "4.90", "NT 3.11": "NT3.51", "NT 4.0": "NT4.0", 2e3: "NT 5.0", XP: ["NT 5.1", "NT 5.2"], Vista: "NT 6.0", 7: "NT 6.1", 8: "NT 6.2", 8.1: "NT 6.3", 10: ["NT 6.4", "NT 10.0"], RT: "ARM" }, ln = { browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [d, [u, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [d, [u, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [u, d], [/opios[\/ ]+([\w\.]+)/i], [d, [u, ne + " Mini"]], [/\bopr\/([\w\.]+)/i], [d, [u, ne]], [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i], [d, [u, "Baidu"]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, /(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i, /(heytap|ovi)browser\/([\d\.]+)/i, /(weibo)__([\d\.]+)/i], [u, d], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [d, [u, "UC" + _]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i, /micromessenger\/([\w\.]+)/i], [d, [u, "WeChat"]], [/konqueror\/([\w\.]+)/i], [d, [u, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [d, [u, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [d, [u, "Yandex"]], [/slbrowser\/([\w\.]+)/i], [d, [u, "Smart Lenovo " + _]], [/(avast|avg)\/([\w\.]+)/i], [[u, /(.+)/, "$1 Secure " + _], d], [/\bfocus\/([\w\.]+)/i], [d, [u, ce + " Focus"]], [/\bopt\/([\w\.]+)/i], [d, [u, ne + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [d, [u, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [d, [u, "Dolphin"]], [/coast\/([\w\.]+)/i], [d, [u, ne + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [d, [u, "MIUI " + _]], [/fxios\/([-\w\.]+)/i], [d, [u, ce]], [/\bqihu|(qi?ho?o?|360)browser/i], [[u, "360 " + _]], [/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i], [[u, /(.+)/, "$1 " + _], d], [/samsungbrowser\/([\w\.]+)/i], [d, [u, ae + " Internet"]], [/(comodo_dragon)\/([\w\.]+)/i], [[u, /_/g, " "], d], [/metasr[\/ ]?([\d\.]+)/i], [d, [u, "Sogou Explorer"]], [/(sogou)mo\w+\/([\d\.]+)/i], [[u, "Sogou Mobile"], d], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i], [u, d], [/(lbbrowser)/i, /\[(linkedin)app\]/i], [u], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[u, Ae], d], [/(Klarna)\/([\w\.]+)/i, /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(alipay)client\/([\w\.]+)/i, /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i], [u, d], [/\bgsa\/([\w\.]+) .*safari\//i], [d, [u, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [d, [u, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [d, [u, te + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[u, te + " WebView"], d], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [d, [u, "Android " + _]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [u, d], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [d, [u, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [d, u], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [u, [d, _t, Ur]], [/(webkit|khtml)\/([\w\.]+)/i], [u, d], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[u, "Netscape"], d], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [d, [u, ce + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i, /panasonic;(viera)/i], [u, d], [/(cobalt)\/([\w\.]+)/i], [u, [d, /master.|lts./, ""]]], cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[m, "amd64"]], [/(ia32(?=;))/i], [[m, Je]], [/((?:i[346]|x)86)[;\)]/i], [[m, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[m, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[m, "armhf"]], [/windows (ce|mobile); ppc;/i], [[m, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[m, /ower/, a, Je]], [/(sun4\w)[;\)]/i], [[m, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[m, Je]]], device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [l, [c, ae], [s, g]], [/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]([-\w]+)/i, /sec-(sgh\w+)/i], [l, [c, ae], [s, w]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [l, [c, z], [s, w]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [l, [c, z], [s, g]], [/(macintosh);/i], [l, [c, z]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [l, [c, x], [s, w]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [l, [c, T], [s, g]], [/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [l, [c, T], [s, w]], [/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i], [[l, /_/g, " "], [c, D], [s, w]], [/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[l, /_/g, " "], [c, D], [s, g]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [l, [c, "OPPO"], [s, w]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [l, [c, "Vivo"], [s, w]], [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i], [l, [c, "Realme"], [s, w]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [l, [c, oe], [s, w]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [l, [c, oe], [s, g]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [l, [c, R], [s, g]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [l, [c, R], [s, w]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [l, [c, "Lenovo"], [s, g]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[l, /_/g, " "], [c, "Nokia"], [s, w]], [/(pixel c)\b/i], [l, [c, V], [s, g]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [l, [c, V], [s, w]], [/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [l, [c, I], [s, w]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[l, "Xperia Tablet"], [c, I], [s, g]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [l, [c, "OnePlus"], [s, w]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [l, [c, k], [s, g]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[l, /(.+)/g, "Fire Phone $1"], [c, k], [s, w]], [/(playbook);[-\w\),; ]+(rim)/i], [l, c, [s, g]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [l, [c, pe], [s, w]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [l, [c, ie], [s, g]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [l, [c, ie], [s, w]], [/(nexus 9)/i], [l, [c, "HTC"], [s, g]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [c, [l, /_/g, " "], [s, w]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [l, [c, "Acer"], [s, g]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [l, [c, "Meizu"], [s, w]], [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i], [l, [c, "Ulefone"], [s, w]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [c, l, [s, w]], [/(kobo)\s(ereader|touch)/i, /(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [c, l, [s, g]], [/(surface duo)/i], [l, [c, A], [s, g]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [l, [c, "Fairphone"], [s, w]], [/(u304aa)/i], [l, [c, "AT&T"], [s, w]], [/\bsie-(\w*)/i], [l, [c, "Siemens"], [s, w]], [/\b(rct\w+) b/i], [l, [c, "RCA"], [s, g]], [/\b(venue[\d ]{2,7}) b/i], [l, [c, "Dell"], [s, g]], [/\b(q(?:mv|ta)\w+) b/i], [l, [c, "Verizon"], [s, g]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [l, [c, "Barnes & Noble"], [s, g]], [/\b(tm\d{3}\w+) b/i], [l, [c, "NuVision"], [s, g]], [/\b(k88) b/i], [l, [c, "ZTE"], [s, g]], [/\b(nx\d{3}j) b/i], [l, [c, "ZTE"], [s, w]], [/\b(gen\d{3}) b.+49h/i], [l, [c, "Swiss"], [s, w]], [/\b(zur\d{3}) b/i], [l, [c, "Swiss"], [s, g]], [/\b((zeki)?tb.*\b) b/i], [l, [c, "Zeki"], [s, g]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[c, "Dragon Touch"], l, [s, g]], [/\b(ns-?\w{0,9}) b/i], [l, [c, "Insignia"], [s, g]], [/\b((nxa|next)-?\w{0,9}) b/i], [l, [c, "NextBook"], [s, g]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[c, "Voice"], l, [s, w]], [/\b(lvtel\-)?(v1[12]) b/i], [[c, "LvTel"], l, [s, w]], [/\b(ph-1) /i], [l, [c, "Essential"], [s, w]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [l, [c, "Envizen"], [s, g]], [/\b(trio[-\w\. ]+) b/i], [l, [c, "MachSpeed"], [s, g]], [/\btu_(1491) b/i], [l, [c, "Rotor"], [s, g]], [/(shield[\w ]+) b/i], [l, [c, "Nvidia"], [s, g]], [/(sprint) (\w+)/i], [c, l, [s, w]], [/(kin\.[onetw]{3})/i], [[l, /\./g, " "], [c, A], [s, w]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [l, [c, he], [s, g]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [l, [c, he], [s, w]], [/smart-tv.+(samsung)/i], [c, [s, W]], [/hbbtv.+maple;(\d+)/i], [[l, /^/, "SmartTV"], [c, ae], [s, W]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[c, R], [s, W]], [/(apple) ?tv/i], [c, [l, z + " TV"], [s, W]], [/crkey/i], [[l, te + "cast"], [c, V], [s, W]], [/droid.+aft(\w+)( bui|\))/i], [l, [c, k], [s, W]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [l, [c, x], [s, W]], [/(bravia[\w ]+)( bui|\))/i], [l, [c, I], [s, W]], [/(mitv-\w{5}) bui/i], [l, [c, D], [s, W]], [/Hbbtv.*(technisat) (.*);/i], [c, l, [s, W]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[c, It], [l, It], [s, W]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[s, W]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [c, l, [s, O]], [/droid.+; (shield) bui/i], [l, [c, "Nvidia"], [s, O]], [/(playstation [345portablevi]+)/i], [l, [c, I], [s, O]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [l, [c, A], [s, O]], [/((pebble))app/i], [c, l, [s, L]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [l, [c, z], [s, L]], [/droid.+; (glass) \d/i], [l, [c, V], [s, L]], [/droid.+; (wt63?0{2,3})\)/i], [l, [c, he], [s, L]], [/(quest( 2| pro)?)/i], [l, [c, Ae], [s, L]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [c, [s, q]], [/(aeobc)\b/i], [l, [c, k], [s, q]], [/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i], [l, [s, w]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [l, [s, g]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[s, g]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[s, w]], [/(android[-\w\. ]{0,9});.+buil/i], [l, [c, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [d, [u, ee + "HTML"]], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [d, [u, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [u, d], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [d, u]], os: [[/microsoft (windows) (vista|xp)/i], [u, d], [/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i], [u, [d, _t, an]], [/windows nt 6\.2; (arm)/i, /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i, /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[d, _t, an], [u, "Windows"]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[d, /_/g, "."], [u, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[u, rn], [d, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [d, u], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [u, d], [/\(bb(10);/i], [d, [u, pe]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [d, [u, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [d, [u, ce + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [d, [u, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [d, [u, "watchOS"]], [/crkey\/([\d\.]+)/i], [d, [u, te + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[u, nn], d], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [u, d], [/(sunos) ?([\w\.\d]*)/i], [[u, "Solaris"], d], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [u, d]] }, Oe = function($, H) {
215
- if (typeof $ === b && (H = $, $ = r), !(this instanceof Oe))
216
- return new Oe($, H).getResult();
217
- var F = typeof n !== p && n.navigator ? n.navigator : r, K = $ || (F && F.userAgent ? F.userAgent : a), Me = F && F.userAgentData ? F.userAgentData : r, ke = H ? Br(ln, H) : ln, B = F && F.userAgent == K;
216
+ return W;
217
+ }, wt = { "1.0": "/8", 1.2: "/1", 1.3: "/3", "2.0": "/412", "2.0.2": "/416", "2.0.3": "/417", "2.0.4": "/419", "?": "/" }, un = { ME: "4.90", "NT 3.11": "NT3.51", "NT 4.0": "NT4.0", 2e3: "NT 5.0", XP: ["NT 5.1", "NT 5.2"], Vista: "NT 6.0", 7: "NT 6.1", 8: "NT 6.2", 8.1: "NT 6.3", 10: ["NT 6.4", "NT 10.0"], RT: "ARM" }, dn = { browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [d, [u, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [d, [u, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [u, d], [/opios[\/ ]+([\w\.]+)/i], [d, [u, se + " Mini"]], [/\bopr\/([\w\.]+)/i], [d, [u, se]], [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i], [d, [u, "Baidu"]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, /(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i, /(heytap|ovi)browser\/([\d\.]+)/i, /(weibo)__([\d\.]+)/i], [u, d], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [d, [u, "UC" + x]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i, /micromessenger\/([\w\.]+)/i], [d, [u, "WeChat"]], [/konqueror\/([\w\.]+)/i], [d, [u, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [d, [u, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [d, [u, "Yandex"]], [/slbrowser\/([\w\.]+)/i], [d, [u, "Smart Lenovo " + x]], [/(avast|avg)\/([\w\.]+)/i], [[u, /(.+)/, "$1 Secure " + x], d], [/\bfocus\/([\w\.]+)/i], [d, [u, le + " Focus"]], [/\bopt\/([\w\.]+)/i], [d, [u, se + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [d, [u, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [d, [u, "Dolphin"]], [/coast\/([\w\.]+)/i], [d, [u, se + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [d, [u, "MIUI " + x]], [/fxios\/([-\w\.]+)/i], [d, [u, le]], [/\bqihu|(qi?ho?o?|360)browser/i], [[u, "360 " + x]], [/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i], [[u, /(.+)/, "$1 " + x], d], [/samsungbrowser\/([\w\.]+)/i], [d, [u, re + " Internet"]], [/(comodo_dragon)\/([\w\.]+)/i], [[u, /_/g, " "], d], [/metasr[\/ ]?([\d\.]+)/i], [d, [u, "Sogou Explorer"]], [/(sogou)mo\w+\/([\d\.]+)/i], [[u, "Sogou Mobile"], d], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i], [u, d], [/(lbbrowser)/i, /\[(linkedin)app\]/i], [u], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[u, Ce], d], [/(Klarna)\/([\w\.]+)/i, /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(alipay)client\/([\w\.]+)/i, /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i], [u, d], [/\bgsa\/([\w\.]+) .*safari\//i], [d, [u, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [d, [u, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [d, [u, Z + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[u, Z + " WebView"], d], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [d, [u, "Android " + x]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [u, d], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [d, [u, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [d, u], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [u, [d, Se, wt]], [/(webkit|khtml)\/([\w\.]+)/i], [u, d], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[u, "Netscape"], d], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [d, [u, le + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i, /panasonic;(viera)/i], [u, d], [/(cobalt)\/([\w\.]+)/i], [u, [d, /master.|lts./, ""]]], cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[h, "amd64"]], [/(ia32(?=;))/i], [[h, ce]], [/((?:i[346]|x)86)[;\)]/i], [[h, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[h, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[h, "armhf"]], [/windows (ce|mobile); ppc;/i], [[h, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[h, /ower/, s, ce]], [/(sun4\w)[;\)]/i], [[h, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[h, ce]]], device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [l, [c, re], [a, g]], [/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]([-\w]+)/i, /sec-(sgh\w+)/i], [l, [c, re], [a, w]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [l, [c, V], [a, w]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [l, [c, V], [a, g]], [/(macintosh);/i], [l, [c, V]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [l, [c, O], [a, w]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [l, [c, oe], [a, g]], [/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [l, [c, oe], [a, w]], [/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i], [[l, /_/g, " "], [c, $], [a, w]], [/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[l, /_/g, " "], [c, $], [a, g]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [l, [c, "OPPO"], [a, w]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [l, [c, "Vivo"], [a, w]], [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i], [l, [c, "Realme"], [a, w]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [l, [c, ue], [a, w]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [l, [c, ue], [a, g]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [l, [c, J], [a, g]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [l, [c, J], [a, w]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [l, [c, "Lenovo"], [a, g]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[l, /_/g, " "], [c, "Nokia"], [a, w]], [/(pixel c)\b/i], [l, [c, M], [a, g]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [l, [c, M], [a, w]], [/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [l, [c, C], [a, w]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[l, "Xperia Tablet"], [c, C], [a, g]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [l, [c, "OnePlus"], [a, w]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [l, [c, T], [a, g]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[l, /(.+)/g, "Fire Phone $1"], [c, T], [a, w]], [/(playbook);[-\w\),; ]+(rim)/i], [l, c, [a, g]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [l, [c, G], [a, w]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [l, [c, te], [a, g]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [l, [c, te], [a, w]], [/(nexus 9)/i], [l, [c, "HTC"], [a, g]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [c, [l, /_/g, " "], [a, w]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [l, [c, "Acer"], [a, g]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [l, [c, "Meizu"], [a, w]], [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i], [l, [c, "Ulefone"], [a, w]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [c, l, [a, w]], [/(kobo)\s(ereader|touch)/i, /(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [c, l, [a, g]], [/(surface duo)/i], [l, [c, q], [a, g]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [l, [c, "Fairphone"], [a, w]], [/(u304aa)/i], [l, [c, "AT&T"], [a, w]], [/\bsie-(\w*)/i], [l, [c, "Siemens"], [a, w]], [/\b(rct\w+) b/i], [l, [c, "RCA"], [a, g]], [/\b(venue[\d ]{2,7}) b/i], [l, [c, "Dell"], [a, g]], [/\b(q(?:mv|ta)\w+) b/i], [l, [c, "Verizon"], [a, g]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [l, [c, "Barnes & Noble"], [a, g]], [/\b(tm\d{3}\w+) b/i], [l, [c, "NuVision"], [a, g]], [/\b(k88) b/i], [l, [c, "ZTE"], [a, g]], [/\b(nx\d{3}j) b/i], [l, [c, "ZTE"], [a, w]], [/\b(gen\d{3}) b.+49h/i], [l, [c, "Swiss"], [a, w]], [/\b(zur\d{3}) b/i], [l, [c, "Swiss"], [a, g]], [/\b((zeki)?tb.*\b) b/i], [l, [c, "Zeki"], [a, g]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[c, "Dragon Touch"], l, [a, g]], [/\b(ns-?\w{0,9}) b/i], [l, [c, "Insignia"], [a, g]], [/\b((nxa|next)-?\w{0,9}) b/i], [l, [c, "NextBook"], [a, g]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[c, "Voice"], l, [a, w]], [/\b(lvtel\-)?(v1[12]) b/i], [[c, "LvTel"], l, [a, w]], [/\b(ph-1) /i], [l, [c, "Essential"], [a, w]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [l, [c, "Envizen"], [a, g]], [/\b(trio[-\w\. ]+) b/i], [l, [c, "MachSpeed"], [a, g]], [/\btu_(1491) b/i], [l, [c, "Rotor"], [a, g]], [/(shield[\w ]+) b/i], [l, [c, "Nvidia"], [a, g]], [/(sprint) (\w+)/i], [c, l, [a, w]], [/(kin\.[onetw]{3})/i], [[l, /\./g, " "], [c, q], [a, w]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [l, [c, be], [a, g]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [l, [c, be], [a, w]], [/smart-tv.+(samsung)/i], [c, [a, R]], [/hbbtv.+maple;(\d+)/i], [[l, /^/, "SmartTV"], [c, re], [a, R]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[c, J], [a, R]], [/(apple) ?tv/i], [c, [l, V + " TV"], [a, R]], [/crkey/i], [[l, Z + "cast"], [c, M], [a, R]], [/droid.+aft(\w+)( bui|\))/i], [l, [c, T], [a, R]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [l, [c, O], [a, R]], [/(bravia[\w ]+)( bui|\))/i], [l, [c, C], [a, R]], [/(mitv-\w{5}) bui/i], [l, [c, $], [a, R]], [/Hbbtv.*(technisat) (.*);/i], [c, l, [a, R]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[c, Me], [l, Me], [a, R]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[a, R]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [c, l, [a, I]], [/droid.+; (shield) bui/i], [l, [c, "Nvidia"], [a, I]], [/(playstation [345portablevi]+)/i], [l, [c, C], [a, I]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [l, [c, q], [a, I]], [/((pebble))app/i], [c, l, [a, E]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [l, [c, V], [a, E]], [/droid.+; (glass) \d/i], [l, [c, M], [a, E]], [/droid.+; (wt63?0{2,3})\)/i], [l, [c, be], [a, E]], [/(quest( 2| pro)?)/i], [l, [c, Ce], [a, E]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [c, [a, j]], [/(aeobc)\b/i], [l, [c, T], [a, j]], [/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i], [l, [a, w]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [l, [a, g]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[a, g]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[a, w]], [/(android[-\w\. ]{0,9});.+buil/i], [l, [c, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [d, [u, ne + "HTML"]], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [d, [u, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [u, d], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [d, u]], os: [[/microsoft (windows) (vista|xp)/i], [u, d], [/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i], [u, [d, Se, un]], [/windows nt 6\.2; (arm)/i, /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i, /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[d, Se, un], [u, "Windows"]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[d, /_/g, "."], [u, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[u, ht], [d, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [d, u], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [u, d], [/\(bb(10);/i], [d, [u, G]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [d, [u, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [d, [u, le + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [d, [u, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [d, [u, "watchOS"]], [/crkey\/([\d\.]+)/i], [d, [u, Z + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[u, mt], d], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [u, d], [/(sunos) ?([\w\.\d]*)/i], [[u, "Solaris"], d], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [u, d]] }, Ie = function(W, z) {
218
+ if (typeof W === b && (z = W, W = r), !(this instanceof Ie))
219
+ return new Ie(W, z).getResult();
220
+ var F = typeof n !== p && n.navigator ? n.navigator : r, Q = W || (F && F.userAgent ? F.userAgent : s), He = F && F.userAgentData ? F.userAgentData : r, Pe = z ? y(dn, z) : dn, B = F && F.userAgent == Q;
218
221
  return this.getBrowser = function() {
219
222
  var N = {};
220
- return N[u] = r, N[d] = r, et.call(N, K, ke.browser), N[h] = jr(N[d]), B && F && F.brave && typeof F.brave.isBrave == f && (N[u] = "Brave"), N;
223
+ return N[u] = r, N[d] = r, $e.call(N, Q, Pe.browser), N[m] = Ue(N[d]), B && F && F.brave && typeof F.brave.isBrave == f && (N[u] = "Brave"), N;
221
224
  }, this.getCPU = function() {
222
225
  var N = {};
223
- return N[m] = r, et.call(N, K, ke.cpu), N;
226
+ return N[h] = r, $e.call(N, Q, Pe.cpu), N;
224
227
  }, this.getDevice = function() {
225
228
  var N = {};
226
- return N[c] = r, N[l] = r, N[s] = r, et.call(N, K, ke.device), B && !N[s] && Me && Me.mobile && (N[s] = w), B && N[l] == "Macintosh" && F && typeof F.standalone !== p && F.maxTouchPoints && F.maxTouchPoints > 2 && (N[l] = "iPad", N[s] = g), N;
229
+ return N[c] = r, N[l] = r, N[a] = r, $e.call(N, Q, Pe.device), B && !N[a] && He && He.mobile && (N[a] = w), B && N[l] == "Macintosh" && F && typeof F.standalone !== p && F.maxTouchPoints && F.maxTouchPoints > 2 && (N[l] = "iPad", N[a] = g), N;
227
230
  }, this.getEngine = function() {
228
231
  var N = {};
229
- return N[u] = r, N[d] = r, et.call(N, K, ke.engine), N;
232
+ return N[u] = r, N[d] = r, $e.call(N, Q, Pe.engine), N;
230
233
  }, this.getOS = function() {
231
234
  var N = {};
232
- return N[u] = r, N[d] = r, et.call(N, K, ke.os), B && !N[u] && Me && Me.platform != "Unknown" && (N[u] = Me.platform.replace(/chrome os/i, nn).replace(/macos/i, rn)), N;
235
+ return N[u] = r, N[d] = r, $e.call(N, Q, Pe.os), B && !N[u] && He && He.platform != "Unknown" && (N[u] = He.platform.replace(/chrome os/i, mt).replace(/macos/i, ht)), N;
233
236
  }, this.getResult = function() {
234
237
  return { ua: this.getUA(), browser: this.getBrowser(), engine: this.getEngine(), os: this.getOS(), device: this.getDevice(), cpu: this.getCPU() };
235
238
  }, this.getUA = function() {
236
- return K;
239
+ return Q;
237
240
  }, this.setUA = function(N) {
238
- return K = typeof N === v && N.length > M ? It(N, M) : N, this;
239
- }, this.setUA(K), this;
241
+ return Q = typeof N === v && N.length > A ? Me(N, A) : N, this;
242
+ }, this.setUA(Q), this;
240
243
  };
241
- Oe.VERSION = i, Oe.BROWSER = ut([u, d, h]), Oe.CPU = ut([m]), Oe.DEVICE = ut([l, c, s, O, w, W, g, L, q]), Oe.ENGINE = Oe.OS = ut([u, d]), e.exports && (t = e.exports = Oe), t.UAParser = Oe;
242
- var ze = typeof n !== p && (n.jQuery || n.Zepto);
243
- if (ze && !ze.ua) {
244
- var dt = new Oe();
245
- ze.ua = dt.getResult(), ze.ua.get = function() {
246
- return dt.getUA();
247
- }, ze.ua.set = function($) {
248
- dt.setUA($);
249
- var H = dt.getResult();
250
- for (var F in H)
251
- ze.ua[F] = H[F];
244
+ Ie.VERSION = i, Ie.BROWSER = D([u, d, m]), Ie.CPU = D([h]), Ie.DEVICE = D([l, c, a, I, w, R, g, E, j]), Ie.ENGINE = Ie.OS = D([u, d]), e.exports && (t = e.exports = Ie), t.UAParser = Ie;
245
+ var et = typeof n !== p && (n.jQuery || n.Zepto);
246
+ if (et && !et.ua) {
247
+ var gt = new Ie();
248
+ et.ua = gt.getResult(), et.ua.get = function() {
249
+ return gt.getUA();
250
+ }, et.ua.set = function(W) {
251
+ gt.setUA(W);
252
+ var z = gt.getResult();
253
+ for (var F in z)
254
+ et.ua[F] = z[F];
252
255
  };
253
256
  }
254
- })(typeof window == "object" ? window : mi);
255
- })(Mt, Mt.exports);
256
- var hi = Mt.exports;
257
- Object.defineProperty(y, "__esModule", { value: !0 });
258
- function wi(e) {
257
+ })(typeof window == "object" ? window : xi);
258
+ })(Ut, Ut.exports);
259
+ var yi = Ut.exports;
260
+ Object.defineProperty(S, "__esModule", { value: !0 });
261
+ function ki(e) {
259
262
  return e && typeof e == "object" && "default" in e ? e.default : e;
260
263
  }
261
- var de = Y, G = wi(de), En = hi, Be = new En(), fe = Be.getBrowser(), gi = Be.getCPU(), ge = Be.getDevice(), jt = Be.getEngine(), je = Be.getOS(), it = Be.getUA(), In = function(t) {
262
- return Be.setUA(t);
263
- }, ot = function(t) {
264
+ var me = ee, X = ki(me), Rn = yi, Qe = new Rn(), he = Qe.getBrowser(), Oi = Qe.getCPU(), Oe = Qe.getDevice(), Gt = Qe.getEngine(), Xe = Qe.getOS(), ut = Qe.getUA(), Ln = function(t) {
265
+ return Qe.setUA(t);
266
+ }, dt = function(t) {
264
267
  if (!t) {
265
268
  console.error("No userAgent string was provided");
266
269
  return;
267
270
  }
268
- var n = new En(t);
271
+ var n = new Rn(t);
269
272
  return {
270
273
  UA: n,
271
274
  browser: n.getBrowser(),
@@ -278,18 +281,18 @@ var de = Y, G = wi(de), En = hi, Be = new En(), fe = Be.getBrowser(), gi = Be.ge
278
281
  return n.setUA(i);
279
282
  }
280
283
  };
281
- }, _n = /* @__PURE__ */ Object.freeze({
282
- ClientUAInstance: Be,
283
- browser: fe,
284
- cpu: gi,
285
- device: ge,
286
- engine: jt,
287
- os: je,
288
- ua: it,
289
- setUa: In,
290
- parseUserAgent: ot
284
+ }, Nn = /* @__PURE__ */ Object.freeze({
285
+ ClientUAInstance: Qe,
286
+ browser: he,
287
+ cpu: Oi,
288
+ device: Oe,
289
+ engine: Gt,
290
+ os: Xe,
291
+ ua: ut,
292
+ setUa: Ln,
293
+ parseUserAgent: dt
291
294
  });
292
- function un(e, t) {
295
+ function bn(e, t) {
293
296
  var n = Object.keys(e);
294
297
  if (Object.getOwnPropertySymbols) {
295
298
  var r = Object.getOwnPropertySymbols(e);
@@ -299,39 +302,39 @@ function un(e, t) {
299
302
  }
300
303
  return n;
301
304
  }
302
- function xi(e) {
305
+ function Si(e) {
303
306
  for (var t = 1; t < arguments.length; t++) {
304
307
  var n = arguments[t] != null ? arguments[t] : {};
305
- t % 2 ? un(Object(n), !0).forEach(function(r) {
306
- Si(e, r, n[r]);
307
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : un(Object(n)).forEach(function(r) {
308
+ t % 2 ? bn(Object(n), !0).forEach(function(r) {
309
+ Ii(e, r, n[r]);
310
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : bn(Object(n)).forEach(function(r) {
308
311
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
309
312
  });
310
313
  }
311
314
  return e;
312
315
  }
313
- function nt(e) {
316
+ function st(e) {
314
317
  "@babel/helpers - typeof";
315
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? nt = function(t) {
318
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? st = function(t) {
316
319
  return typeof t;
317
- } : nt = function(t) {
320
+ } : st = function(t) {
318
321
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
319
- }, nt(e);
322
+ }, st(e);
320
323
  }
321
- function yi(e, t) {
324
+ function Ti(e, t) {
322
325
  if (!(e instanceof t))
323
326
  throw new TypeError("Cannot call a class as a function");
324
327
  }
325
- function dn(e, t) {
328
+ function vn(e, t) {
326
329
  for (var n = 0; n < t.length; n++) {
327
330
  var r = t[n];
328
331
  r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
329
332
  }
330
333
  }
331
- function Oi(e, t, n) {
332
- return t && dn(e.prototype, t), n && dn(e, n), e;
334
+ function Ei(e, t, n) {
335
+ return t && vn(e.prototype, t), n && vn(e, n), e;
333
336
  }
334
- function Si(e, t, n) {
337
+ function Ii(e, t, n) {
335
338
  return t in e ? Object.defineProperty(e, t, {
336
339
  value: n,
337
340
  enumerable: !0,
@@ -339,17 +342,17 @@ function Si(e, t, n) {
339
342
  writable: !0
340
343
  }) : e[t] = n, e;
341
344
  }
342
- function Dt() {
343
- return Dt = Object.assign || function(e) {
345
+ function Ht() {
346
+ return Ht = Object.assign || function(e) {
344
347
  for (var t = 1; t < arguments.length; t++) {
345
348
  var n = arguments[t];
346
349
  for (var r in n)
347
350
  Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
348
351
  }
349
352
  return e;
350
- }, Dt.apply(this, arguments);
353
+ }, Ht.apply(this, arguments);
351
354
  }
352
- function ki(e, t) {
355
+ function _i(e, t) {
353
356
  if (typeof t != "function" && t !== null)
354
357
  throw new TypeError("Super expression must either be null or a function");
355
358
  e.prototype = Object.create(t && t.prototype, {
@@ -358,98 +361,98 @@ function ki(e, t) {
358
361
  writable: !0,
359
362
  configurable: !0
360
363
  }
361
- }), t && Wt(e, t);
364
+ }), t && qt(e, t);
362
365
  }
363
- function $t(e) {
364
- return $t = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) {
366
+ function zt(e) {
367
+ return zt = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) {
365
368
  return n.__proto__ || Object.getPrototypeOf(n);
366
- }, $t(e);
369
+ }, zt(e);
367
370
  }
368
- function Wt(e, t) {
369
- return Wt = Object.setPrototypeOf || function(r, i) {
371
+ function qt(e, t) {
372
+ return qt = Object.setPrototypeOf || function(r, i) {
370
373
  return r.__proto__ = i, r;
371
- }, Wt(e, t);
374
+ }, qt(e, t);
372
375
  }
373
- function Ti(e, t) {
376
+ function Ci(e, t) {
374
377
  if (e == null)
375
378
  return {};
376
- var n = {}, r = Object.keys(e), i, a;
377
- for (a = 0; a < r.length; a++)
378
- i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
379
+ var n = {}, r = Object.keys(e), i, s;
380
+ for (s = 0; s < r.length; s++)
381
+ i = r[s], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
379
382
  return n;
380
383
  }
381
- function xe(e, t) {
384
+ function Te(e, t) {
382
385
  if (e == null)
383
386
  return {};
384
- var n = Ti(e, t), r, i;
387
+ var n = Ci(e, t), r, i;
385
388
  if (Object.getOwnPropertySymbols) {
386
- var a = Object.getOwnPropertySymbols(e);
387
- for (i = 0; i < a.length; i++)
388
- r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
389
+ var s = Object.getOwnPropertySymbols(e);
390
+ for (i = 0; i < s.length; i++)
391
+ r = s[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
389
392
  }
390
393
  return n;
391
394
  }
392
- function vt(e) {
395
+ function St(e) {
393
396
  if (e === void 0)
394
397
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
395
398
  return e;
396
399
  }
397
- function Ei(e, t) {
400
+ function Pi(e, t) {
398
401
  if (t && (typeof t == "object" || typeof t == "function"))
399
402
  return t;
400
403
  if (t !== void 0)
401
404
  throw new TypeError("Derived constructors may only return object or undefined");
402
- return vt(e);
405
+ return St(e);
403
406
  }
404
- function Ii(e, t) {
405
- return _i(e) || Ci(e, t) || Pi(e, t) || Li();
407
+ function Ri(e, t) {
408
+ return Li(e) || Ni(e, t) || Ai(e, t) || Fi();
406
409
  }
407
- function _i(e) {
410
+ function Li(e) {
408
411
  if (Array.isArray(e))
409
412
  return e;
410
413
  }
411
- function Ci(e, t) {
414
+ function Ni(e, t) {
412
415
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
413
416
  if (n != null) {
414
- var r = [], i = !0, a = !1, o, f;
417
+ var r = [], i = !0, s = !1, o, f;
415
418
  try {
416
419
  for (n = n.call(e); !(i = (o = n.next()).done) && (r.push(o.value), !(t && r.length === t)); i = !0)
417
420
  ;
418
421
  } catch (p) {
419
- a = !0, f = p;
422
+ s = !0, f = p;
420
423
  } finally {
421
424
  try {
422
425
  !i && n.return != null && n.return();
423
426
  } finally {
424
- if (a)
427
+ if (s)
425
428
  throw f;
426
429
  }
427
430
  }
428
431
  return r;
429
432
  }
430
433
  }
431
- function Pi(e, t) {
434
+ function Ai(e, t) {
432
435
  if (e) {
433
436
  if (typeof e == "string")
434
- return fn(e, t);
437
+ return mn(e, t);
435
438
  var n = Object.prototype.toString.call(e).slice(8, -1);
436
439
  if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set")
437
440
  return Array.from(e);
438
441
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
439
- return fn(e, t);
442
+ return mn(e, t);
440
443
  }
441
444
  }
442
- function fn(e, t) {
445
+ function mn(e, t) {
443
446
  (t == null || t > e.length) && (t = e.length);
444
447
  for (var n = 0, r = new Array(t); n < t; n++)
445
448
  r[n] = e[n];
446
449
  return r;
447
450
  }
448
- function Li() {
451
+ function Fi() {
449
452
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
450
453
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
451
454
  }
452
- var ue = {
455
+ var ve = {
453
456
  Mobile: "mobile",
454
457
  Tablet: "tablet",
455
458
  SmartTv: "smarttv",
@@ -457,7 +460,7 @@ var ue = {
457
460
  Wearable: "wearable",
458
461
  Embedded: "embedded",
459
462
  Browser: void 0
460
- }, ve = {
463
+ }, ye = {
461
464
  Chrome: "Chrome",
462
465
  Firefox: "Firefox",
463
466
  Opera: "Opera",
@@ -471,368 +474,368 @@ var ue = {
471
474
  EdgeChromium: "Edge Chromium",
472
475
  MIUI: "MIUI Browser",
473
476
  SamsungBrowser: "Samsung Browser"
474
- }, Xe = {
477
+ }, ot = {
475
478
  IOS: "iOS",
476
479
  Android: "Android",
477
480
  WindowsPhone: "Windows Phone",
478
481
  Windows: "Windows",
479
482
  MAC_OS: "Mac OS"
480
- }, Ni = {
483
+ }, Di = {
481
484
  isMobile: !1,
482
485
  isTablet: !1,
483
486
  isBrowser: !1,
484
487
  isSmartTV: !1,
485
488
  isConsole: !1,
486
489
  isWearable: !1
487
- }, Ri = function(t) {
490
+ }, Mi = function(t) {
488
491
  switch (t) {
489
- case ue.Mobile:
492
+ case ve.Mobile:
490
493
  return {
491
494
  isMobile: !0
492
495
  };
493
- case ue.Tablet:
496
+ case ve.Tablet:
494
497
  return {
495
498
  isTablet: !0
496
499
  };
497
- case ue.SmartTv:
500
+ case ve.SmartTv:
498
501
  return {
499
502
  isSmartTV: !0
500
503
  };
501
- case ue.Console:
504
+ case ve.Console:
502
505
  return {
503
506
  isConsole: !0
504
507
  };
505
- case ue.Wearable:
508
+ case ve.Wearable:
506
509
  return {
507
510
  isWearable: !0
508
511
  };
509
- case ue.Browser:
512
+ case ve.Browser:
510
513
  return {
511
514
  isBrowser: !0
512
515
  };
513
- case ue.Embedded:
516
+ case ve.Embedded:
514
517
  return {
515
518
  isEmbedded: !0
516
519
  };
517
520
  default:
518
- return Ni;
521
+ return Di;
519
522
  }
520
- }, Fi = function(t) {
521
- return In(t);
522
- }, P = function(t) {
523
+ }, $i = function(t) {
524
+ return Ln(t);
525
+ }, L = function(t) {
523
526
  var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "none";
524
527
  return t || n;
525
- }, Ut = function() {
528
+ }, Qt = function() {
526
529
  return typeof window < "u" && (window.navigator || navigator) ? window.navigator || navigator : !1;
527
- }, Ht = function(t) {
528
- var n = Ut();
530
+ }, Xt = function(t) {
531
+ var n = Qt();
529
532
  return n && n.platform && (n.platform.indexOf(t) !== -1 || n.platform === "MacIntel" && n.maxTouchPoints > 1 && !window.MSStream);
530
- }, Ai = function(t, n, r, i, a) {
533
+ }, Wi = function(t, n, r, i, s) {
531
534
  return {
532
535
  isBrowser: t,
533
- browserMajorVersion: P(n.major),
534
- browserFullVersion: P(n.version),
535
- browserName: P(n.name),
536
- engineName: P(r.name),
537
- engineVersion: P(r.version),
538
- osName: P(i.name),
539
- osVersion: P(i.version),
540
- userAgent: P(a)
536
+ browserMajorVersion: L(n.major),
537
+ browserFullVersion: L(n.version),
538
+ browserName: L(n.name),
539
+ engineName: L(r.name),
540
+ engineVersion: L(r.version),
541
+ osName: L(i.name),
542
+ osVersion: L(i.version),
543
+ userAgent: L(s)
541
544
  };
542
- }, pn = function(t, n, r, i) {
543
- return xi({}, t, {
544
- vendor: P(n.vendor),
545
- model: P(n.model),
546
- os: P(r.name),
547
- osVersion: P(r.version),
548
- ua: P(i)
545
+ }, hn = function(t, n, r, i) {
546
+ return Si({}, t, {
547
+ vendor: L(n.vendor),
548
+ model: L(n.model),
549
+ os: L(r.name),
550
+ osVersion: L(r.version),
551
+ ua: L(i)
549
552
  });
550
- }, Mi = function(t, n, r, i) {
553
+ }, ji = function(t, n, r, i) {
551
554
  return {
552
555
  isSmartTV: t,
553
- engineName: P(n.name),
554
- engineVersion: P(n.version),
555
- osName: P(r.name),
556
- osVersion: P(r.version),
557
- userAgent: P(i)
556
+ engineName: L(n.name),
557
+ engineVersion: L(n.version),
558
+ osName: L(r.name),
559
+ osVersion: L(r.version),
560
+ userAgent: L(i)
558
561
  };
559
- }, Di = function(t, n, r, i) {
562
+ }, Vi = function(t, n, r, i) {
560
563
  return {
561
564
  isConsole: t,
562
- engineName: P(n.name),
563
- engineVersion: P(n.version),
564
- osName: P(r.name),
565
- osVersion: P(r.version),
566
- userAgent: P(i)
565
+ engineName: L(n.name),
566
+ engineVersion: L(n.version),
567
+ osName: L(r.name),
568
+ osVersion: L(r.version),
569
+ userAgent: L(i)
567
570
  };
568
- }, $i = function(t, n, r, i) {
571
+ }, Bi = function(t, n, r, i) {
569
572
  return {
570
573
  isWearable: t,
571
- engineName: P(n.name),
572
- engineVersion: P(n.version),
573
- osName: P(r.name),
574
- osVersion: P(r.version),
575
- userAgent: P(i)
574
+ engineName: L(n.name),
575
+ engineVersion: L(n.version),
576
+ osName: L(r.name),
577
+ osVersion: L(r.version),
578
+ userAgent: L(i)
576
579
  };
577
- }, Wi = function(t, n, r, i, a) {
580
+ }, Ui = function(t, n, r, i, s) {
578
581
  return {
579
582
  isEmbedded: t,
580
- vendor: P(n.vendor),
581
- model: P(n.model),
582
- engineName: P(r.name),
583
- engineVersion: P(r.version),
584
- osName: P(i.name),
585
- osVersion: P(i.version),
586
- userAgent: P(a)
583
+ vendor: L(n.vendor),
584
+ model: L(n.model),
585
+ engineName: L(r.name),
586
+ engineVersion: L(r.version),
587
+ osName: L(i.name),
588
+ osVersion: L(i.version),
589
+ userAgent: L(s)
587
590
  };
588
591
  };
589
- function Vi(e) {
590
- var t = e ? ot(e) : _n, n = t.device, r = t.browser, i = t.engine, a = t.os, o = t.ua, f = Ri(n.type), p = f.isBrowser, b = f.isMobile, v = f.isTablet, h = f.isSmartTV, l = f.isConsole, u = f.isWearable, s = f.isEmbedded;
592
+ function Hi(e) {
593
+ var t = e ? dt(e) : Nn, n = t.device, r = t.browser, i = t.engine, s = t.os, o = t.ua, f = Mi(n.type), p = f.isBrowser, b = f.isMobile, v = f.isTablet, m = f.isSmartTV, l = f.isConsole, u = f.isWearable, a = f.isEmbedded;
591
594
  if (p)
592
- return Ai(p, r, i, a, o);
593
- if (h)
594
- return Mi(h, i, a, o);
595
+ return Wi(p, r, i, s, o);
596
+ if (m)
597
+ return ji(m, i, s, o);
595
598
  if (l)
596
- return Di(l, i, a, o);
599
+ return Vi(l, i, s, o);
597
600
  if (b || v)
598
- return pn(f, n, a, o);
601
+ return hn(f, n, s, o);
599
602
  if (u)
600
- return $i(u, i, a, o);
601
- if (s)
602
- return Wi(s, n, i, a, o);
603
+ return Bi(u, i, s, o);
604
+ if (a)
605
+ return Ui(a, n, i, s, o);
603
606
  }
604
- var Cn = function(t) {
605
- var n = t.type;
606
- return n === ue.Mobile;
607
- }, Pn = function(t) {
607
+ var An = function(t) {
608
608
  var n = t.type;
609
- return n === ue.Tablet;
610
- }, Ln = function(t) {
611
- var n = t.type;
612
- return n === ue.Mobile || n === ue.Tablet;
613
- }, Nn = function(t) {
614
- var n = t.type;
615
- return n === ue.SmartTv;
616
- }, mt = function(t) {
617
- var n = t.type;
618
- return n === ue.Browser;
619
- }, Rn = function(t) {
620
- var n = t.type;
621
- return n === ue.Wearable;
609
+ return n === ve.Mobile;
622
610
  }, Fn = function(t) {
623
611
  var n = t.type;
624
- return n === ue.Console;
625
- }, An = function(t) {
612
+ return n === ve.Tablet;
613
+ }, Dn = function(t) {
626
614
  var n = t.type;
627
- return n === ue.Embedded;
615
+ return n === ve.Mobile || n === ve.Tablet;
628
616
  }, Mn = function(t) {
629
- var n = t.vendor;
630
- return P(n);
631
- }, Dn = function(t) {
632
- var n = t.model;
633
- return P(n);
617
+ var n = t.type;
618
+ return n === ve.SmartTv;
619
+ }, Tt = function(t) {
620
+ var n = t.type;
621
+ return n === ve.Browser;
634
622
  }, $n = function(t) {
635
623
  var n = t.type;
636
- return P(n, "browser");
624
+ return n === ve.Wearable;
637
625
  }, Wn = function(t) {
638
- var n = t.name;
639
- return n === Xe.Android;
626
+ var n = t.type;
627
+ return n === ve.Console;
628
+ }, jn = function(t) {
629
+ var n = t.type;
630
+ return n === ve.Embedded;
640
631
  }, Vn = function(t) {
641
- var n = t.name;
642
- return n === Xe.Windows;
632
+ var n = t.vendor;
633
+ return L(n);
643
634
  }, Bn = function(t) {
644
- var n = t.name;
645
- return n === Xe.MAC_OS;
646
- }, jn = function(t) {
647
- var n = t.name;
648
- return n === Xe.WindowsPhone;
635
+ var n = t.model;
636
+ return L(n);
649
637
  }, Un = function(t) {
650
- var n = t.name;
651
- return n === Xe.IOS;
638
+ var n = t.type;
639
+ return L(n, "browser");
652
640
  }, Hn = function(t) {
653
- var n = t.version;
654
- return P(n);
655
- }, qn = function(t) {
656
641
  var n = t.name;
657
- return P(n);
642
+ return n === ot.Android;
658
643
  }, zn = function(t) {
659
644
  var n = t.name;
660
- return n === ve.Chrome;
661
- }, Kn = function(t) {
662
- var n = t.name;
663
- return n === ve.Firefox;
664
- }, Gn = function(t) {
645
+ return n === ot.Windows;
646
+ }, qn = function(t) {
665
647
  var n = t.name;
666
- return n === ve.Chromium;
667
- }, ht = function(t) {
648
+ return n === ot.MAC_OS;
649
+ }, Kn = function(t) {
668
650
  var n = t.name;
669
- return n === ve.Edge;
651
+ return n === ot.WindowsPhone;
670
652
  }, Yn = function(t) {
671
653
  var n = t.name;
672
- return n === ve.Yandex;
654
+ return n === ot.IOS;
655
+ }, Gn = function(t) {
656
+ var n = t.version;
657
+ return L(n);
673
658
  }, Qn = function(t) {
674
659
  var n = t.name;
675
- return n === ve.Safari || n === ve.MobileSafari;
660
+ return L(n);
676
661
  }, Xn = function(t) {
677
662
  var n = t.name;
678
- return n === ve.MobileSafari;
663
+ return n === ye.Chrome;
679
664
  }, Zn = function(t) {
680
665
  var n = t.name;
681
- return n === ve.Opera;
666
+ return n === ye.Firefox;
682
667
  }, Jn = function(t) {
683
668
  var n = t.name;
684
- return n === ve.InternetExplorer || n === ve.Ie;
669
+ return n === ye.Chromium;
670
+ }, Et = function(t) {
671
+ var n = t.name;
672
+ return n === ye.Edge;
685
673
  }, er = function(t) {
686
674
  var n = t.name;
687
- return n === ve.MIUI;
675
+ return n === ye.Yandex;
688
676
  }, tr = function(t) {
689
677
  var n = t.name;
690
- return n === ve.SamsungBrowser;
678
+ return n === ye.Safari || n === ye.MobileSafari;
691
679
  }, nr = function(t) {
692
- var n = t.version;
693
- return P(n);
680
+ var n = t.name;
681
+ return n === ye.MobileSafari;
694
682
  }, rr = function(t) {
695
- var n = t.major;
696
- return P(n);
683
+ var n = t.name;
684
+ return n === ye.Opera;
697
685
  }, ir = function(t) {
698
686
  var n = t.name;
699
- return P(n);
687
+ return n === ye.InternetExplorer || n === ye.Ie;
700
688
  }, or = function(t) {
701
689
  var n = t.name;
702
- return P(n);
690
+ return n === ye.MIUI;
703
691
  }, ar = function(t) {
692
+ var n = t.name;
693
+ return n === ye.SamsungBrowser;
694
+ }, lr = function(t) {
704
695
  var n = t.version;
705
- return P(n);
706
- }, lr = function() {
707
- var t = Ut(), n = t && t.userAgent && t.userAgent.toLowerCase();
696
+ return L(n);
697
+ }, sr = function(t) {
698
+ var n = t.major;
699
+ return L(n);
700
+ }, cr = function(t) {
701
+ var n = t.name;
702
+ return L(n);
703
+ }, ur = function(t) {
704
+ var n = t.name;
705
+ return L(n);
706
+ }, dr = function(t) {
707
+ var n = t.version;
708
+ return L(n);
709
+ }, fr = function() {
710
+ var t = Qt(), n = t && t.userAgent && t.userAgent.toLowerCase();
708
711
  return typeof n == "string" ? /electron/.test(n) : !1;
709
- }, Ge = function(t) {
712
+ }, nt = function(t) {
710
713
  return typeof t == "string" && t.indexOf("Edg/") !== -1;
711
- }, sr = function() {
712
- var t = Ut();
714
+ }, pr = function() {
715
+ var t = Qt();
713
716
  return t && (/iPad|iPhone|iPod/.test(t.platform) || t.platform === "MacIntel" && t.maxTouchPoints > 1) && !window.MSStream;
714
- }, Ie = function() {
715
- return Ht("iPad");
716
- }, cr = function() {
717
- return Ht("iPhone");
718
- }, ur = function() {
719
- return Ht("iPod");
720
- }, dr = function(t) {
721
- return P(t);
717
+ }, Ae = function() {
718
+ return Xt("iPad");
719
+ }, br = function() {
720
+ return Xt("iPhone");
721
+ }, vr = function() {
722
+ return Xt("iPod");
723
+ }, mr = function(t) {
724
+ return L(t);
722
725
  };
723
- function fr(e) {
724
- var t = e || _n, n = t.device, r = t.browser, i = t.os, a = t.engine, o = t.ua;
726
+ function hr(e) {
727
+ var t = e || Nn, n = t.device, r = t.browser, i = t.os, s = t.engine, o = t.ua;
725
728
  return {
726
- isSmartTV: Nn(n),
727
- isConsole: Fn(n),
728
- isWearable: Rn(n),
729
- isEmbedded: An(n),
730
- isMobileSafari: Xn(r) || Ie(),
731
- isChromium: Gn(r),
732
- isMobile: Ln(n) || Ie(),
733
- isMobileOnly: Cn(n),
734
- isTablet: Pn(n) || Ie(),
735
- isBrowser: mt(n),
736
- isDesktop: mt(n),
737
- isAndroid: Wn(i),
738
- isWinPhone: jn(i),
739
- isIOS: Un(i) || Ie(),
740
- isChrome: zn(r),
741
- isFirefox: Kn(r),
742
- isSafari: Qn(r),
743
- isOpera: Zn(r),
744
- isIE: Jn(r),
745
- osVersion: Hn(i),
746
- osName: qn(i),
747
- fullBrowserVersion: nr(r),
748
- browserVersion: rr(r),
749
- browserName: ir(r),
750
- mobileVendor: Mn(n),
751
- mobileModel: Dn(n),
752
- engineName: or(a),
753
- engineVersion: ar(a),
754
- getUA: dr(o),
755
- isEdge: ht(r) || Ge(o),
756
- isYandex: Yn(r),
757
- deviceType: $n(n),
758
- isIOS13: sr(),
759
- isIPad13: Ie(),
760
- isIPhone13: cr(),
761
- isIPod13: ur(),
762
- isElectron: lr(),
763
- isEdgeChromium: Ge(o),
764
- isLegacyEdge: ht(r) && !Ge(o),
765
- isWindows: Vn(i),
766
- isMacOs: Bn(i),
767
- isMIUI: er(r),
768
- isSamsungBrowser: tr(r)
729
+ isSmartTV: Mn(n),
730
+ isConsole: Wn(n),
731
+ isWearable: $n(n),
732
+ isEmbedded: jn(n),
733
+ isMobileSafari: nr(r) || Ae(),
734
+ isChromium: Jn(r),
735
+ isMobile: Dn(n) || Ae(),
736
+ isMobileOnly: An(n),
737
+ isTablet: Fn(n) || Ae(),
738
+ isBrowser: Tt(n),
739
+ isDesktop: Tt(n),
740
+ isAndroid: Hn(i),
741
+ isWinPhone: Kn(i),
742
+ isIOS: Yn(i) || Ae(),
743
+ isChrome: Xn(r),
744
+ isFirefox: Zn(r),
745
+ isSafari: tr(r),
746
+ isOpera: rr(r),
747
+ isIE: ir(r),
748
+ osVersion: Gn(i),
749
+ osName: Qn(i),
750
+ fullBrowserVersion: lr(r),
751
+ browserVersion: sr(r),
752
+ browserName: cr(r),
753
+ mobileVendor: Vn(n),
754
+ mobileModel: Bn(n),
755
+ engineName: ur(s),
756
+ engineVersion: dr(s),
757
+ getUA: mr(o),
758
+ isEdge: Et(r) || nt(o),
759
+ isYandex: er(r),
760
+ deviceType: Un(n),
761
+ isIOS13: pr(),
762
+ isIPad13: Ae(),
763
+ isIPhone13: br(),
764
+ isIPod13: vr(),
765
+ isElectron: fr(),
766
+ isEdgeChromium: nt(o),
767
+ isLegacyEdge: Et(r) && !nt(o),
768
+ isWindows: zn(i),
769
+ isMacOs: qn(i),
770
+ isMIUI: or(r),
771
+ isSamsungBrowser: ar(r)
769
772
  };
770
773
  }
771
- var pr = Nn(ge), br = Fn(ge), vr = Rn(ge), Bi = An(ge), ji = Xn(fe) || Ie(), Ui = Gn(fe), yt = Ln(ge) || Ie(), mr = Cn(ge), hr = Pn(ge) || Ie(), wr = mt(ge), Hi = mt(ge), gr = Wn(je), xr = jn(je), yr = Un(je) || Ie(), qi = zn(fe), zi = Kn(fe), Ki = Qn(fe), Gi = Zn(fe), Or = Jn(fe), Yi = Hn(je), Qi = qn(je), Xi = nr(fe), Zi = rr(fe), Ji = ir(fe), eo = Mn(ge), to = Dn(ge), no = or(jt), ro = ar(jt), io = dr(it), oo = ht(fe) || Ge(it), ao = Yn(fe), lo = $n(ge), so = sr(), co = Ie(), uo = cr(), fo = ur(), po = lr(), bo = Ge(it), vo = ht(fe) && !Ge(it), mo = Vn(je), ho = Bn(je), wo = er(fe), go = tr(fe), xo = function(t) {
774
+ var wr = Mn(Oe), gr = Wn(Oe), xr = $n(Oe), zi = jn(Oe), qi = nr(he) || Ae(), Ki = Jn(he), Pt = Dn(Oe) || Ae(), yr = An(Oe), kr = Fn(Oe) || Ae(), Or = Tt(Oe), Yi = Tt(Oe), Sr = Hn(Xe), Tr = Kn(Xe), Er = Yn(Xe) || Ae(), Gi = Xn(he), Qi = Zn(he), Xi = tr(he), Zi = rr(he), Ir = ir(he), Ji = Gn(Xe), eo = Qn(Xe), to = lr(he), no = sr(he), ro = cr(he), io = Vn(Oe), oo = Bn(Oe), ao = ur(Gt), lo = dr(Gt), so = mr(ut), co = Et(he) || nt(ut), uo = er(he), fo = Un(Oe), po = pr(), bo = Ae(), vo = br(), mo = vr(), ho = fr(), wo = nt(ut), go = Et(he) && !nt(ut), xo = zn(Xe), yo = qn(Xe), ko = or(he), Oo = ar(he), So = function(t) {
772
775
  if (!t || typeof t != "string") {
773
776
  console.error("No valid user agent string was provided");
774
777
  return;
775
778
  }
776
- var n = ot(t), r = n.device, i = n.browser, a = n.os, o = n.engine, f = n.ua;
777
- return fr({
779
+ var n = dt(t), r = n.device, i = n.browser, s = n.os, o = n.engine, f = n.ua;
780
+ return hr({
778
781
  device: r,
779
782
  browser: i,
780
- os: a,
783
+ os: s,
781
784
  engine: o,
782
785
  ua: f
783
786
  });
784
- }, yo = function(t) {
785
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
786
- return gr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
787
- }, Oo = function(t) {
788
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
789
- return wr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
790
- }, So = function(t) {
791
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
792
- return Or ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
793
- }, ko = function(t) {
794
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
795
- return yr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
796
787
  }, To = function(t) {
797
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
798
- return yt ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
788
+ var n = t.renderWithFragment, r = t.children, i = Te(t, ["renderWithFragment", "children"]);
789
+ return Sr ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", i, r) : null;
799
790
  }, Eo = function(t) {
800
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
801
- return hr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
791
+ var n = t.renderWithFragment, r = t.children, i = Te(t, ["renderWithFragment", "children"]);
792
+ return Or ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", i, r) : null;
802
793
  }, Io = function(t) {
803
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
804
- return xr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
794
+ var n = t.renderWithFragment, r = t.children, i = Te(t, ["renderWithFragment", "children"]);
795
+ return Ir ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", i, r) : null;
805
796
  }, _o = function(t) {
806
- var n = t.renderWithFragment, r = t.children;
807
- t.viewClassName, t.style;
808
- var i = xe(t, ["renderWithFragment", "children", "viewClassName", "style"]);
809
- return mr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
797
+ var n = t.renderWithFragment, r = t.children, i = Te(t, ["renderWithFragment", "children"]);
798
+ return Er ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", i, r) : null;
810
799
  }, Co = function(t) {
811
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
812
- return pr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
800
+ var n = t.renderWithFragment, r = t.children, i = Te(t, ["renderWithFragment", "children"]);
801
+ return Pt ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", i, r) : null;
813
802
  }, Po = function(t) {
814
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
815
- return br ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
803
+ var n = t.renderWithFragment, r = t.children, i = Te(t, ["renderWithFragment", "children"]);
804
+ return kr ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", i, r) : null;
805
+ }, Ro = function(t) {
806
+ var n = t.renderWithFragment, r = t.children, i = Te(t, ["renderWithFragment", "children"]);
807
+ return Tr ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", i, r) : null;
816
808
  }, Lo = function(t) {
817
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
818
- return vr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
809
+ var n = t.renderWithFragment, r = t.children;
810
+ t.viewClassName, t.style;
811
+ var i = Te(t, ["renderWithFragment", "children", "viewClassName", "style"]);
812
+ return yr ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", i, r) : null;
819
813
  }, No = function(t) {
814
+ var n = t.renderWithFragment, r = t.children, i = Te(t, ["renderWithFragment", "children"]);
815
+ return wr ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", i, r) : null;
816
+ }, Ao = function(t) {
817
+ var n = t.renderWithFragment, r = t.children, i = Te(t, ["renderWithFragment", "children"]);
818
+ return gr ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", i, r) : null;
819
+ }, Fo = function(t) {
820
+ var n = t.renderWithFragment, r = t.children, i = Te(t, ["renderWithFragment", "children"]);
821
+ return xr ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", i, r) : null;
822
+ }, Do = function(t) {
820
823
  var n = t.renderWithFragment, r = t.children;
821
824
  t.viewClassName, t.style;
822
- var i = t.condition, a = xe(t, ["renderWithFragment", "children", "viewClassName", "style", "condition"]);
823
- return i ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", a, r) : null;
825
+ var i = t.condition, s = Te(t, ["renderWithFragment", "children", "viewClassName", "style", "condition"]);
826
+ return i ? n ? X.createElement(me.Fragment, null, r) : X.createElement("div", s, r) : null;
824
827
  };
825
- function Ro(e) {
828
+ function Mo(e) {
826
829
  return /* @__PURE__ */ function(t) {
827
- ki(n, t);
830
+ _i(n, t);
828
831
  function n(r) {
829
832
  var i;
830
- return yi(this, n), i = Ei(this, $t(n).call(this, r)), i.isEventListenerAdded = !1, i.handleOrientationChange = i.handleOrientationChange.bind(vt(i)), i.onOrientationChange = i.onOrientationChange.bind(vt(i)), i.onPageLoad = i.onPageLoad.bind(vt(i)), i.state = {
833
+ return Ti(this, n), i = Pi(this, zt(n).call(this, r)), i.isEventListenerAdded = !1, i.handleOrientationChange = i.handleOrientationChange.bind(St(i)), i.onOrientationChange = i.onOrientationChange.bind(St(i)), i.onPageLoad = i.onPageLoad.bind(St(i)), i.state = {
831
834
  isLandscape: !1,
832
835
  isPortrait: !1
833
836
  }, i;
834
837
  }
835
- return Oi(n, [{
838
+ return Ei(n, [{
836
839
  key: "handleOrientationChange",
837
840
  value: function() {
838
841
  this.isEventListenerAdded || (this.isEventListenerAdded = !0);
@@ -855,7 +858,7 @@ function Ro(e) {
855
858
  }, {
856
859
  key: "componentDidMount",
857
860
  value: function() {
858
- (typeof window > "u" ? "undefined" : nt(window)) !== void 0 && yt && (this.isEventListenerAdded ? window.removeEventListener("load", this.onPageLoad, !1) : (this.handleOrientationChange(), window.addEventListener("load", this.onPageLoad, !1)), window.addEventListener("resize", this.onOrientationChange, !1));
861
+ (typeof window > "u" ? "undefined" : st(window)) !== void 0 && Pt && (this.isEventListenerAdded ? window.removeEventListener("load", this.onPageLoad, !1) : (this.handleOrientationChange(), window.addEventListener("load", this.onPageLoad, !1)), window.addEventListener("resize", this.onOrientationChange, !1));
859
862
  }
860
863
  }, {
861
864
  key: "componentWillUnmount",
@@ -865,256 +868,350 @@ function Ro(e) {
865
868
  }, {
866
869
  key: "render",
867
870
  value: function() {
868
- return G.createElement(e, Dt({}, this.props, {
871
+ return X.createElement(e, Ht({}, this.props, {
869
872
  isLandscape: this.state.isLandscape,
870
873
  isPortrait: this.state.isPortrait
871
874
  }));
872
875
  }
873
876
  }]), n;
874
- }(G.Component);
877
+ }(X.Component);
875
878
  }
876
- function Fo() {
877
- var e = de.useState(function() {
878
- var a = window.innerWidth > window.innerHeight ? 90 : 0;
879
+ function $o() {
880
+ var e = me.useState(function() {
881
+ var s = window.innerWidth > window.innerHeight ? 90 : 0;
879
882
  return {
880
- isPortrait: a === 0,
881
- isLandscape: a === 90,
882
- orientation: a === 0 ? "portrait" : "landscape"
883
+ isPortrait: s === 0,
884
+ isLandscape: s === 90,
885
+ orientation: s === 0 ? "portrait" : "landscape"
883
886
  };
884
- }), t = Ii(e, 2), n = t[0], r = t[1], i = de.useCallback(function() {
885
- var a = window.innerWidth > window.innerHeight ? 90 : 0, o = {
886
- isPortrait: a === 0,
887
- isLandscape: a === 90,
888
- orientation: a === 0 ? "portrait" : "landscape"
887
+ }), t = Ri(e, 2), n = t[0], r = t[1], i = me.useCallback(function() {
888
+ var s = window.innerWidth > window.innerHeight ? 90 : 0, o = {
889
+ isPortrait: s === 0,
890
+ isLandscape: s === 90,
891
+ orientation: s === 0 ? "portrait" : "landscape"
889
892
  };
890
893
  n.orientation !== o.orientation && r(o);
891
894
  }, [n.orientation]);
892
- return de.useEffect(function() {
893
- return (typeof window > "u" ? "undefined" : nt(window)) !== void 0 && yt && (i(), window.addEventListener("load", i, !1), window.addEventListener("resize", i, !1)), function() {
895
+ return me.useEffect(function() {
896
+ return (typeof window > "u" ? "undefined" : st(window)) !== void 0 && Pt && (i(), window.addEventListener("load", i, !1), window.addEventListener("resize", i, !1)), function() {
894
897
  window.removeEventListener("resize", i, !1), window.removeEventListener("load", i, !1);
895
898
  };
896
899
  }, [i]), n;
897
900
  }
898
- function Sr(e) {
901
+ function _r(e) {
899
902
  var t = e || window.navigator.userAgent;
900
- return ot(t);
903
+ return dt(t);
901
904
  }
902
- function Ao(e) {
903
- var t = e || window.navigator.userAgent, n = Sr(t), r = fr(n);
905
+ function Wo(e) {
906
+ var t = e || window.navigator.userAgent, n = _r(t), r = hr(n);
904
907
  return [r, n];
905
908
  }
906
- y.AndroidView = yo;
907
- y.BrowserTypes = ve;
908
- y.BrowserView = Oo;
909
- y.ConsoleView = Po;
910
- y.CustomView = No;
911
- y.IEView = So;
912
- y.IOSView = ko;
913
- y.MobileOnlyView = _o;
914
- y.MobileView = To;
915
- y.OsTypes = Xe;
916
- y.SmartTVView = Co;
917
- y.TabletView = Eo;
918
- y.WearableView = Lo;
919
- y.WinPhoneView = Io;
920
- y.browserName = Ji;
921
- y.browserVersion = Zi;
922
- y.deviceDetect = Vi;
923
- y.deviceType = lo;
924
- y.engineName = no;
925
- y.engineVersion = ro;
926
- y.fullBrowserVersion = Xi;
927
- y.getSelectorsByUserAgent = xo;
928
- y.getUA = io;
929
- y.isAndroid = gr;
930
- y.isBrowser = wr;
931
- y.isChrome = qi;
932
- y.isChromium = Ui;
933
- y.isConsole = br;
934
- y.isDesktop = Hi;
935
- y.isEdge = oo;
936
- y.isEdgeChromium = bo;
937
- y.isElectron = po;
938
- y.isEmbedded = Bi;
939
- y.isFirefox = zi;
940
- y.isIE = Or;
941
- y.isIOS = yr;
942
- y.isIOS13 = so;
943
- y.isIPad13 = co;
944
- y.isIPhone13 = uo;
945
- y.isIPod13 = fo;
946
- y.isLegacyEdge = vo;
947
- y.isMIUI = wo;
948
- y.isMacOs = ho;
949
- var Mo = y.isMobile = yt;
950
- y.isMobileOnly = mr;
951
- y.isMobileSafari = ji;
952
- y.isOpera = Gi;
953
- y.isSafari = Ki;
954
- y.isSamsungBrowser = go;
955
- y.isSmartTV = pr;
956
- y.isTablet = hr;
957
- y.isWearable = vr;
958
- y.isWinPhone = xr;
959
- y.isWindows = mo;
960
- y.isYandex = ao;
961
- y.mobileModel = to;
962
- y.mobileVendor = eo;
963
- y.osName = Qi;
964
- y.osVersion = Yi;
965
- y.parseUserAgent = ot;
966
- y.setUserAgent = Fi;
967
- y.useDeviceData = Sr;
968
- y.useDeviceSelectors = Ao;
969
- y.useMobileOrientation = Fo;
970
- y.withOrientationChange = Ro;
971
- const rs = Y.memo(
972
- We(
973
- ({ themeColor: e = "", onSubmit: t, style: n = {}, className: r = "", onInput: i, onFocus: a, onBlur: o, ...f }, p) => {
974
- const [b, v] = Q(!0), [h, l] = Q(!1);
975
- e = Re.convert3HexTo6(e), Z(() => {
976
- v(Mo);
909
+ S.AndroidView = To;
910
+ S.BrowserTypes = ye;
911
+ S.BrowserView = Eo;
912
+ S.ConsoleView = Ao;
913
+ S.CustomView = Do;
914
+ S.IEView = Io;
915
+ S.IOSView = _o;
916
+ S.MobileOnlyView = Lo;
917
+ S.MobileView = Co;
918
+ S.OsTypes = ot;
919
+ S.SmartTVView = No;
920
+ S.TabletView = Po;
921
+ S.WearableView = Fo;
922
+ S.WinPhoneView = Ro;
923
+ S.browserName = ro;
924
+ S.browserVersion = no;
925
+ S.deviceDetect = Hi;
926
+ S.deviceType = fo;
927
+ S.engineName = ao;
928
+ S.engineVersion = lo;
929
+ S.fullBrowserVersion = to;
930
+ S.getSelectorsByUserAgent = So;
931
+ S.getUA = so;
932
+ S.isAndroid = Sr;
933
+ S.isBrowser = Or;
934
+ S.isChrome = Gi;
935
+ S.isChromium = Ki;
936
+ S.isConsole = gr;
937
+ S.isDesktop = Yi;
938
+ S.isEdge = co;
939
+ S.isEdgeChromium = wo;
940
+ S.isElectron = ho;
941
+ S.isEmbedded = zi;
942
+ S.isFirefox = Qi;
943
+ S.isIE = Ir;
944
+ S.isIOS = Er;
945
+ S.isIOS13 = po;
946
+ S.isIPad13 = bo;
947
+ S.isIPhone13 = vo;
948
+ S.isIPod13 = mo;
949
+ S.isLegacyEdge = go;
950
+ S.isMIUI = ko;
951
+ S.isMacOs = yo;
952
+ var jo = S.isMobile = Pt;
953
+ S.isMobileOnly = yr;
954
+ S.isMobileSafari = qi;
955
+ S.isOpera = Zi;
956
+ S.isSafari = Xi;
957
+ S.isSamsungBrowser = Oo;
958
+ S.isSmartTV = wr;
959
+ S.isTablet = kr;
960
+ S.isWearable = xr;
961
+ S.isWinPhone = Tr;
962
+ S.isWindows = xo;
963
+ S.isYandex = uo;
964
+ S.mobileModel = oo;
965
+ S.mobileVendor = io;
966
+ S.osName = eo;
967
+ S.osVersion = Ji;
968
+ S.parseUserAgent = dt;
969
+ S.setUserAgent = $i;
970
+ S.useDeviceData = _r;
971
+ S.useDeviceSelectors = Wo;
972
+ S.useMobileOrientation = $o;
973
+ S.withOrientationChange = Mo;
974
+ const ps = ee.memo(
975
+ Ke(
976
+ ({ themeColor: e = "", onSubmit: t, style: n = {}, className: r = "", onInput: i, onFocus: s, onBlur: o, ...f }, p) => {
977
+ const [b, v] = K(!0), [m, l] = K(!1);
978
+ e = De.convert3HexTo6(e), Y(() => {
979
+ v(jo);
977
980
  }, []);
978
981
  const u = (w) => {
979
982
  !b && w.key === "Enter" && !w.shiftKey && t && (w.preventDefault(), t());
980
- }, s = (w) => {
983
+ }, a = (w) => {
981
984
  i?.(w), w.target.style.height = "40px", w.target.style.height = 2 + w.target.scrollHeight + "px";
982
985
  };
983
986
  let c = {};
984
- const d = [cn.textInput, r].filter(Boolean).join(" "), m = () => {
987
+ const d = [pn.textInput, r].filter(Boolean).join(" "), h = () => {
985
988
  l(!0);
986
- }, O = () => {
989
+ }, I = () => {
987
990
  l(!1);
988
991
  };
989
992
  return c = {
990
- borderBottomColor: h ? e !== "#ffffff" ? e : "#c8c8c8" : ""
991
- }, /* @__PURE__ */ S("div", { className: cn.textInputWrapper, children: /* @__PURE__ */ S(
993
+ borderBottomColor: m ? e !== "#ffffff" ? e : "#c8c8c8" : ""
994
+ }, /* @__PURE__ */ k("div", { className: pn.textInputWrapper, children: /* @__PURE__ */ k(
992
995
  "textarea",
993
996
  {
994
997
  "data-testid": "textbox-input",
995
998
  ref: p,
996
999
  className: d,
997
1000
  style: { ...c, ...n },
998
- onFocus: m,
999
- onBlur: O,
1000
- onInput: (w) => s(w),
1001
+ onFocus: h,
1002
+ onBlur: I,
1003
+ onInput: (w) => a(w),
1001
1004
  onKeyDown: u,
1002
1005
  ...f
1003
1006
  }
1004
1007
  ) });
1005
1008
  }
1006
1009
  )
1007
- ), Do = "_multiSelectContainer_1r7i6_1", $o = "_listOptionsWrap_1r7i6_4", Wo = "_selectedValuesWrap_1r7i6_7", Vo = "_selectedValues_1r7i6_7", Bo = "_focused_1r7i6_13", jo = "_dropDownIcon_1r7i6_16", Uo = "_optionsListContainer_1r7i6_19", Ho = "_top_1r7i6_22", qo = "_optionsListWrap_1r7i6_25", zo = "_searchInputWrap_1r7i6_28", Ko = "_searchInput_1r7i6_28", Go = "_optionsList_1r7i6_19", Yo = "_optionsListCheckbox_1r7i6_37", Qo = "_btnContainer_1r7i6_46", le = {
1008
- multiSelectContainer: Do,
1009
- listOptionsWrap: $o,
1010
- selectedValuesWrap: Wo,
1011
- selectedValues: Vo,
1012
- focused: Bo,
1013
- dropDownIcon: jo,
1014
- optionsListContainer: Uo,
1015
- top: Ho,
1016
- optionsListWrap: qo,
1017
- searchInputWrap: zo,
1018
- searchInput: Ko,
1019
- optionsList: Go,
1020
- optionsListCheckbox: Yo,
1021
- btnContainer: Qo
1022
- }, is = ({
1010
+ ), Vo = "_multiSelectContainer_o3j9t_1", Bo = "_listOptionsWrap_o3j9t_4", Uo = "_selectedValuesWrap_o3j9t_7", Ho = "_selectedValues_o3j9t_7", zo = "_focused_o3j9t_13", qo = "_dropDownIcon_o3j9t_16", Ko = "_optionsListContainer_o3j9t_20", Yo = "_top_o3j9t_23", Go = "_optionsListWrap_o3j9t_26", Qo = "_searchInputWrap_o3j9t_29", Xo = "_searchInput_o3j9t_29", Zo = "_optionsList_o3j9t_20", Jo = "_btnContainer_o3j9t_47", xe = {
1011
+ multiSelectContainer: Vo,
1012
+ listOptionsWrap: Bo,
1013
+ selectedValuesWrap: Uo,
1014
+ selectedValues: Ho,
1015
+ focused: zo,
1016
+ dropDownIcon: qo,
1017
+ optionsListContainer: Ko,
1018
+ top: Yo,
1019
+ optionsListWrap: Go,
1020
+ searchInputWrap: Qo,
1021
+ searchInput: Xo,
1022
+ optionsList: Zo,
1023
+ btnContainer: Jo
1024
+ }, ea = "_pseudoCheckbox_1tuhb_1", ta = "_checkboxCheckMark_1tuhb_4", na = "_checkboxCheckMarkPath_1tuhb_7", ra = "_checked_1tuhb_12", ia = "_checkboxUncheckedChecked_1tuhb_1", oa = "_checkboxDisabled_1tuhb_22", lt = {
1025
+ pseudoCheckbox: ea,
1026
+ checkboxCheckMark: ta,
1027
+ checkboxCheckMarkPath: na,
1028
+ checked: ra,
1029
+ checkboxUncheckedChecked: ia,
1030
+ checkboxDisabled: oa
1031
+ }, Cr = ({ checked: e = !1, themeColor: t = "", disabled: n = !1 }) => {
1032
+ let r = {}, i = "#006bb1", s = n ? "#9b9b9b" : "#ffffff";
1033
+ const o = n ? lt.checkboxDisabled : "", f = e ? lt.checked : "", p = [lt.pseudoCheckbox, f, o].filter(Boolean).join(" ");
1034
+ let b;
1035
+ if (t) {
1036
+ const v = Ge(t);
1037
+ t = De.convert3HexTo6(t), v === "dark" || v === "light" ? (n ? s = e ? "#9b9b9b" : "#f9f9f9" : s = v == "light" ? "#333333" : "#ffffff", i = n ? "#f9f9f9" : e ? t : "#ffffff", b = n ? "#e4e4e4" : t === "#ffffff" ? "#333333" : t, e && (r = {
1038
+ backgroundColor: i,
1039
+ borderColor: b,
1040
+ outlineColor: b
1041
+ })) : s = "#9b9b9b";
1042
+ }
1043
+ return /* @__PURE__ */ k(
1044
+ "div",
1045
+ {
1046
+ style: r,
1047
+ className: p,
1048
+ role: "checkbox",
1049
+ "aria-checked": e,
1050
+ "aria-hidden": "true",
1051
+ tabIndex: -1,
1052
+ "data-testid": "checkbox-input",
1053
+ children: /* @__PURE__ */ k("svg", { version: "1.1", focusable: "false", className: lt.checkboxCheckMark, viewBox: "0 0 24 24", children: /* @__PURE__ */ k(
1054
+ "path",
1055
+ {
1056
+ className: lt.checkboxCheckMarkPath,
1057
+ fill: "none",
1058
+ stroke: s,
1059
+ d: "M4.1,12.7 9,17.6 20.3,6.3"
1060
+ }
1061
+ ) })
1062
+ }
1063
+ );
1064
+ };
1065
+ Cr.displayName = "Checkbox";
1066
+ const bs = ({
1023
1067
  options: e,
1024
1068
  checkedValue: t,
1025
1069
  onSelectionChange: n,
1026
- minOptions: r = 0,
1027
- maxOptions: i,
1028
- themeColor: a,
1029
- className: o = "",
1030
- style: f = {}
1070
+ maxOptions: r,
1071
+ themeColor: i,
1072
+ className: s = "",
1073
+ style: o = {}
1031
1074
  }) => {
1032
- const [p, b] = Q(e), [v, h] = Q(t), [l, u] = Q(""), [s, c] = Q(!1), [d, m] = Q(!1), O = C(null), w = C({}), g = C(null), W = C(null), [L, q] = Q(-1), [M, k] = Q("bottom");
1033
- let z = {};
1034
- Z(() => {
1035
- const T = (R) => {
1036
- O.current && !O.current.contains(R.target) && (c(!1), u(""));
1075
+ const f = _(e), [p, b] = K(t), [v, m] = K(""), [l, u] = K(!1), [a, c] = K(!1), d = _(null), h = _(null), I = _(null), w = _(null), g = _(null), R = _(null), [E, j] = K(-1), A = _(0), T = _(0), [V, te] = K(!1);
1076
+ let G = {};
1077
+ const [x, Z] = K({ left: 0, top: 0 }), [ne, le] = K(null), M = _(!1), oe = () => {
1078
+ setTimeout(() => {
1079
+ (d.current?.children[0]).focus();
1080
+ }, 0);
1081
+ };
1082
+ Y(() => {
1083
+ const y = (D) => {
1084
+ h.current && !h.current.contains(D.target) && (u(!1), m(""), oe());
1037
1085
  };
1038
- return document.addEventListener("mousedown", T), () => {
1039
- document.removeEventListener("mousedown", T);
1086
+ return document.addEventListener("mousedown", y), () => {
1087
+ document.removeEventListener("mousedown", y);
1040
1088
  };
1041
- }, []), Z(() => {
1042
- if (O.current) {
1043
- const T = O.current.getBoundingClientRect(), R = window.innerHeight;
1044
- T.bottom + 280 > R ? k("top") : k("bottom");
1089
+ }, []);
1090
+ const J = () => {
1091
+ A.current = window.innerHeight, T.current = document.body.scrollHeight, te(!0);
1092
+ };
1093
+ Y(() => (J(), window.addEventListener("resize", J), () => {
1094
+ window.addEventListener("resize", J);
1095
+ }), []);
1096
+ const q = (y) => {
1097
+ const D = document.getElementById("announcement");
1098
+ D && (D.textContent = y, D.setAttribute("aria-live", "assertive"), setTimeout(() => {
1099
+ D.textContent = "", D.setAttribute("aria-live", "off");
1100
+ }, 1e3));
1101
+ };
1102
+ Y(() => {
1103
+ const y = e.filter((D) => D.text.toLowerCase().includes(v.toLowerCase()));
1104
+ f.current = y;
1105
+ }, [e, v]);
1106
+ const ue = p.map((y) => {
1107
+ const D = e.find((de) => de.id === y);
1108
+ return D?.text !== null ? D?.text : "";
1109
+ }).filter((y) => y !== "").join(", "), se = (y) => {
1110
+ const D = e.find((de) => de.id === y);
1111
+ if (D && !D.disabled && (r === void 0 || p.length <= r)) {
1112
+ const ce = p.includes(y) ? p.filter((Me) => Me !== y) : [...p, y];
1113
+ (r === void 0 || ce.length <= r) && l && (b(ce), n(ce), q(`${D?.text} ${ce.includes(y) ? "selected" : "not selected"}`));
1045
1114
  }
1046
- }, [s]), Z(() => {
1047
- const T = e.filter((R) => R.text.toLowerCase().includes(l.toLowerCase()));
1048
- b(T);
1049
- }, [e, l]);
1050
- const ie = (T) => {
1051
- const A = v.includes(T) ? v.filter((ne) => ne !== T) : [...v, T];
1052
- (i === void 0 || A.length <= i) && (h(A), n(A));
1053
- }, pe = v.map((T) => {
1054
- const R = e.find((A) => A.id === T);
1055
- return R && R.text !== null ? R.text : "";
1056
- }).filter((T) => T !== "").join(", "), _ = (T) => {
1057
- const R = e.find((A) => A.id === T);
1058
- R && !R.disabled && (i === void 0 || v.length <= i) && w.current[T]?.click();
1059
- }, te = (T) => {
1060
- c(T), !s && p.length > 6 ? setTimeout(() => {
1061
- g.current?.focus();
1062
- }, 0) : setTimeout(() => {
1063
- const R = W.current?.querySelector(`.${le.optionsList}`);
1064
- R && R.focus();
1115
+ }, re = (y) => {
1116
+ C(), u(y), setTimeout(() => {
1117
+ I.current ? I.current?.focus() : w.current?.focus(), q("use up and down arrow keys to navigate");
1065
1118
  }, 0);
1066
- }, ee = (T) => {
1067
- const { key: R } = T;
1068
- if (R === "ArrowDown" || R === "ArrowUp") {
1069
- T.preventDefault();
1070
- let A = L;
1071
- if (R === "ArrowDown" ? A = Math.min(L + 1, p.length - 1) : R === "ArrowUp" && (A = Math.max(L - 1, 0)), q(A), W.current && A >= 0) {
1072
- const oe = W.current.querySelectorAll(`.${le.optionsList}`)[A];
1073
- oe && oe.scrollIntoView({
1119
+ }, O = () => T.current - (A.current + window.scrollY), C = () => {
1120
+ if (d.current) {
1121
+ const y = d.current.getBoundingClientRect();
1122
+ setTimeout(() => {
1123
+ const D = h?.current?.getBoundingClientRect(), de = O(), ce = A.current - y.bottom;
1124
+ let Ue;
1125
+ if (D) {
1126
+ const Me = y.height, $e = y.top, Se = D.height, wt = Se > $e + window.scrollY;
1127
+ $e < Se && (wt || wt && ce < Se || de > Se || ce > Se) || $e > Se && ce > Se ? Ue = y.y + Me : Ue = y.y - Se, Z({
1128
+ left: y.left,
1129
+ top: Ue ?? y.top
1130
+ });
1131
+ }
1132
+ }, 0);
1133
+ }
1134
+ };
1135
+ Y(() => (window.addEventListener("scroll", C), window.addEventListener("resize", C), () => {
1136
+ window.removeEventListener("scroll", C), window.removeEventListener("resize", C);
1137
+ }), [l]);
1138
+ const $ = (y) => {
1139
+ y.preventDefault(), y.key === "Shift" ? M.current = !0 : y.shiftKey && M.current && y.key === "Tab" || y.key === "Tab" ? (setTimeout(() => {
1140
+ I.current ? I.current?.focus() : w.current?.focus();
1141
+ }, 0), M.current = !1) : y.key === "Escape" || y.key === "Enter" || y.key === "Space" || y.key === " " ? (re(!1), oe()) : M.current = !1;
1142
+ }, be = (y) => {
1143
+ const { key: D } = y;
1144
+ if (D === "Tab" || y.shiftKey && D === "Tab")
1145
+ setTimeout(() => {
1146
+ g.current?.focus();
1147
+ }, 0);
1148
+ else if (D === "ArrowDown" || D === "ArrowUp") {
1149
+ y.preventDefault(), setTimeout(() => {
1150
+ w.current?.focus();
1151
+ }, 0);
1152
+ let de = E;
1153
+ if (D === "ArrowDown" ? de = Math.min(E + 1, f.current.length - 1) : D === "ArrowUp" && (de = Math.max(E - 1, 0)), E === 0 && y.key === "ArrowUp" ? de = f.current.length - 1 : E === f.current.length - 1 && y.key === "ArrowDown" && (de = 0), j(de), R.current && de >= 0) {
1154
+ const ce = R.current.querySelectorAll(`.${xe.optionsList}`)[de], Ue = ce.children[0].getAttribute("aria-checked"), Me = `${ce.textContent} ${Ue === "true" ? "selected" : "not selected"} ${de + 1} out of ${f.current.length}`;
1155
+ q(Me), ce && ce.scrollIntoView({
1074
1156
  block: "nearest",
1075
1157
  inline: "nearest"
1076
1158
  });
1077
1159
  }
1078
1160
  } else
1079
- R === "Enter" && L !== -1 && _(p[L].id);
1080
- }, ce = () => {
1081
- m(!0);
1082
- }, V = () => {
1083
- m(!1);
1161
+ D === "Enter" || D === "Space" || D === " " ? E !== -1 && se(f.current[E].id) : D === "Escape" && (re(!1), oe());
1162
+ };
1163
+ Y(() => {
1164
+ ne && clearTimeout(ne);
1165
+ const y = setTimeout(() => {
1166
+ const D = f.current.length ? `${f.current.length} results are available, use up and down arrow keys to navigate` : "No results available";
1167
+ l && q(D);
1168
+ }, 500);
1169
+ le(y);
1170
+ }, [v]);
1171
+ const Ce = () => {
1172
+ c(!0);
1173
+ }, mt = () => {
1174
+ c(!1);
1084
1175
  };
1085
- if (a) {
1086
- const T = qe(a);
1087
- a = Re.convert3HexTo6(a), (T === "dark" || T === "light") && (z = {
1088
- borderBottomColor: a === "#ffffff" ? "#c8c8c8" : d || s ? a : "#333333"
1176
+ if (i) {
1177
+ const y = Ge(i);
1178
+ i = De.convert3HexTo6(i), (y === "dark" || y === "light") && (G = {
1179
+ borderBottomColor: i === "#ffffff" ? "#c8c8c8" : a || l ? i : "#333333"
1089
1180
  });
1090
1181
  }
1091
- return /* @__PURE__ */ S("div", { className: le.multiSelectContainer, children: /* @__PURE__ */ we("div", { className: le.listOptionsWrap, ref: O, children: [
1092
- /* @__PURE__ */ we("div", { className: `${o} ${le.selectedValuesWrap}`, children: [
1093
- /* @__PURE__ */ S(
1094
- "input",
1182
+ const ht = () => {
1183
+ u(!1);
1184
+ };
1185
+ return /* @__PURE__ */ k("div", { className: xe.multiSelectContainer, children: /* @__PURE__ */ we("div", { className: xe.listOptionsWrap, children: [
1186
+ /* @__PURE__ */ we("div", { className: `${s} ${xe.selectedValuesWrap}`, ref: d, children: [
1187
+ /* @__PURE__ */ k(
1188
+ "div",
1095
1189
  {
1096
- type: "text",
1097
- className: `${le.selectedValues} ${s ? le.focused : ""}`,
1098
- value: pe,
1099
- readOnly: !0,
1100
- onFocus: ce,
1101
- onBlur: V,
1102
- onClick: () => te(!s),
1103
- onKeyPress: (T) => {
1104
- (T.key === " " || T.code === "Space") && (T.preventDefault(), te(!s));
1190
+ className: `${xe.selectedValues} ${l ? xe.focused : ""}`,
1191
+ onFocus: Ce,
1192
+ onBlur: mt,
1193
+ onClick: () => re(!l),
1194
+ onKeyPress: (y) => {
1195
+ (y.key === " " || y.code === "Space" || y.code === "Enter") && (y.preventDefault(), re(!l));
1105
1196
  },
1197
+ tabIndex: 0,
1106
1198
  "data-testid": "selected-input",
1107
- placeholder: "Select your option",
1108
- style: { ...z, ...f }
1199
+ style: { ...G, ...o },
1200
+ "aria-expanded": l,
1201
+ "aria-haspopup": "listbox",
1202
+ "aria-multiselectable": "true",
1203
+ "aria-autocomplete": "list",
1204
+ role: "combobox",
1205
+ children: ue
1109
1206
  }
1110
1207
  ),
1111
- /* @__PURE__ */ S(
1208
+ /* @__PURE__ */ k(
1112
1209
  "span",
1113
1210
  {
1114
- className: le.dropDownIcon,
1115
- onClick: () => te(!s),
1211
+ className: xe.dropDownIcon,
1212
+ onClick: () => re(!l),
1116
1213
  "data-testid": "arrow-button",
1117
- children: /* @__PURE__ */ S("svg", { width: "12px", height: "7px", viewBox: "0 0 12 7", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ S("g", { stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ S("g", { transform: "translate(-2360.000000, -295.000000)", fill: "#666666", children: /* @__PURE__ */ S("g", { transform: "translate(2006.000000, 248.000000)", children: /* @__PURE__ */ S(
1214
+ children: /* @__PURE__ */ k("svg", { width: "12px", height: "7px", viewBox: "0 0 12 7", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ k("g", { stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ k("g", { transform: "translate(-2360.000000, -295.000000)", fill: "#666666", children: /* @__PURE__ */ k("g", { transform: "translate(2006.000000, 248.000000)", children: /* @__PURE__ */ k(
1118
1215
  "path",
1119
1216
  {
1120
1217
  d: "M358.027356,44.3431458 L358.027146,50.6581458 L364.343146,50.6589352 L364.343146,52.3431458 L358.027146,52.3421458 L358.027356,52.3431458 L356.343146,52.3431458 L356.343146,44.3431458 L358.027356,44.3431458 Z",
@@ -1124,215 +1221,265 @@ const rs = Y.memo(
1124
1221
  }
1125
1222
  )
1126
1223
  ] }),
1127
- s && /* @__PURE__ */ we("div", { className: ` ${le.optionsListContainer} ${M === "top" ? le.top : ""}`, children: [
1128
- /* @__PURE__ */ we("div", { className: le.optionsListWrap, children: [
1129
- e.length >= 6 && /* @__PURE__ */ S("div", { className: le.searchInputWrap, children: /* @__PURE__ */ S(
1130
- "input",
1131
- {
1132
- type: "text",
1133
- placeholder: "Type to filter",
1134
- className: le.searchInput,
1135
- value: l,
1136
- onChange: (T) => u(T.target.value),
1137
- "data-testid": "search-input",
1138
- onKeyDown: ee,
1139
- ref: g
1140
- }
1141
- ) }),
1142
- /* @__PURE__ */ S("ul", { ref: W, children: p.map((T, R) => (
1143
- // eslint-disable-next-line jsx-a11y/role-supports-aria-props
1144
- /* @__PURE__ */ S(
1145
- "li",
1224
+ /* @__PURE__ */ k(
1225
+ "div",
1226
+ {
1227
+ id: "announcement",
1228
+ "aria-live": "assertive",
1229
+ role: "alert",
1230
+ className: "tw-pointer-events-none tw-h-0 tw-overflow-hidden tw-opacity-0"
1231
+ }
1232
+ ),
1233
+ V ? Yt(
1234
+ /* @__PURE__ */ k(it, { children: l && d && /* @__PURE__ */ k(
1235
+ "div",
1236
+ {
1237
+ onClick: ht,
1238
+ style: {
1239
+ position: "fixed",
1240
+ inset: 0,
1241
+ backgroundColor: "rgba(255,255,255,0)",
1242
+ zIndex: 1e3
1243
+ },
1244
+ children: /* @__PURE__ */ we(
1245
+ "div",
1146
1246
  {
1147
- className: `${le.optionsList} ${R === L ? le.focused : ""}`,
1148
- onClick: () => _(T.id),
1149
- onKeyPress: (A) => {
1150
- (A.key === " " || A.code === "Space") && (A.preventDefault(), _(T.id));
1247
+ className: `${xe.optionsListContainer}`,
1248
+ ref: h,
1249
+ onClick: (y) => y.stopPropagation(),
1250
+ style: {
1251
+ opacity: x.left ? 1 : 0,
1252
+ width: d.current ? d.current.clientWidth : "auto",
1253
+ left: x.left,
1254
+ top: x.top
1151
1255
  },
1152
- "aria-selected": R === L,
1153
- children: /* @__PURE__ */ S(
1154
- Bt,
1155
- {
1156
- className: le.optionsListCheckbox,
1157
- tabIndex: -1,
1158
- themeColor: a,
1159
- ref: (A) => {
1160
- w.current[T.id] = A;
1161
- },
1162
- checked: v.includes(T.id),
1163
- onClick: (A) => {
1164
- A.stopPropagation(), ie(T.id);
1165
- },
1166
- disabled: T.disabled || i !== void 0 && v.length >= i && !v.includes(T.id),
1167
- children: /* @__PURE__ */ S("span", { className: "tw-block tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap", children: T.text })
1168
- }
1169
- )
1170
- },
1171
- T.id
1256
+ children: [
1257
+ /* @__PURE__ */ we("div", { className: xe.optionsListWrap, children: [
1258
+ e.length >= 6 && /* @__PURE__ */ k("div", { className: xe.searchInputWrap, children: /* @__PURE__ */ k(
1259
+ "input",
1260
+ {
1261
+ type: "text",
1262
+ ref: I,
1263
+ placeholder: "Type to filter",
1264
+ className: xe.searchInput,
1265
+ value: v,
1266
+ onChange: (y) => m(y.target.value),
1267
+ "data-testid": "search-input",
1268
+ onKeyDown: (y) => {
1269
+ be(y);
1270
+ }
1271
+ }
1272
+ ) }),
1273
+ /* @__PURE__ */ k("ul", { ref: R, role: "listbox", children: f.current.map((y, D) => (
1274
+ // eslint-disable-next-line jsx-a11y/role-supports-aria-props
1275
+ /* @__PURE__ */ we(
1276
+ "li",
1277
+ {
1278
+ className: `${xe.optionsList} ${D === E ? xe.focused : ""}`,
1279
+ onClick: () => se(y.id),
1280
+ "aria-selected": D === E,
1281
+ role: "option",
1282
+ children: [
1283
+ /* @__PURE__ */ k(
1284
+ Cr,
1285
+ {
1286
+ themeColor: i,
1287
+ checked: p.includes(y.id),
1288
+ disabled: y.disabled || r !== void 0 && p.length >= r && !p.includes(y.id)
1289
+ }
1290
+ ),
1291
+ /* @__PURE__ */ k("span", { children: y.text })
1292
+ ]
1293
+ },
1294
+ y.id
1295
+ )
1296
+ )) })
1297
+ ] }),
1298
+ /* @__PURE__ */ we("div", { className: xe.btnContainer, children: [
1299
+ /* @__PURE__ */ k(
1300
+ "input",
1301
+ {
1302
+ ref: w,
1303
+ onKeyDown: (y) => {
1304
+ be(y);
1305
+ },
1306
+ className: "tw-absolute tw-left-[-9999px] tw-h-0 tw-w-0 tw-opacity-0"
1307
+ }
1308
+ ),
1309
+ /* @__PURE__ */ k(
1310
+ Cn,
1311
+ {
1312
+ themeColor: i,
1313
+ variant: "primary",
1314
+ size: "medium",
1315
+ onClick: () => {
1316
+ u(!1), m(""), oe(), n(p);
1317
+ },
1318
+ "data-testid": "done-button",
1319
+ onKeyDown: (y) => {
1320
+ $(y);
1321
+ },
1322
+ ref: g,
1323
+ children: "Done"
1324
+ }
1325
+ )
1326
+ ] })
1327
+ ]
1328
+ }
1172
1329
  )
1173
- )) })
1174
- ] }),
1175
- /* @__PURE__ */ S("div", { className: le.btnContainer, children: /* @__PURE__ */ S(
1176
- Tn,
1177
- {
1178
- themeColor: a,
1179
- variant: "primary",
1180
- size: "medium",
1181
- onClick: () => {
1182
- c(!1), u(""), n(v);
1183
- },
1184
- "data-testid": "done-button",
1185
- children: "Done"
1186
1330
  }
1187
- ) })
1188
- ] })
1331
+ ) }),
1332
+ document.body
1333
+ ) : null
1189
1334
  ] }) });
1190
- }, Xo = "_multiSelectContainer_15bhb_1", Zo = "_quickOptionsWrap_15bhb_4", Jo = "_selected_15bhb_10", ea = "_disabled_15bhb_16", tt = {
1191
- multiSelectContainer: Xo,
1192
- quickOptionsWrap: Zo,
1193
- selected: Jo,
1194
- disabled: ea
1195
- }, os = ({
1335
+ }, aa = "_multiSelectContainer_owbxn_1", la = "_quickOptionsWrap_owbxn_4", sa = "_selected_owbxn_10", ca = "_disabled_owbxn_16", yt = {
1336
+ multiSelectContainer: aa,
1337
+ quickOptionsWrap: la,
1338
+ selected: sa,
1339
+ disabled: ca
1340
+ }, vs = ({
1196
1341
  options: e,
1197
1342
  checkedValue: t,
1198
1343
  onSelectionChange: n,
1199
- minOptions: r = 0,
1200
- maxOptions: i,
1201
- themeColor: a,
1202
- className: o = "",
1203
- style: f = {}
1344
+ maxOptions: r,
1345
+ themeColor: i,
1346
+ className: s = "",
1347
+ style: o = {},
1348
+ id: f = ""
1204
1349
  }) => {
1205
- const [p, b] = Q(t), v = C({});
1206
- let h = {}, l;
1207
- const u = (c) => {
1208
- const m = p.includes(c) ? p.filter((w) => w !== c) : [...p, c];
1209
- (i === void 0 || m.length <= i) && (b(m), n(m));
1210
- }, s = (c) => {
1211
- const d = e.find((m) => m.id === c);
1212
- d && !d.disabled && (i === void 0 || p.length <= i) && v.current[c]?.click();
1350
+ const [p, b] = K(t), v = _({});
1351
+ let m = {}, l;
1352
+ const u = (a) => {
1353
+ const c = e.find((g) => g.id === a);
1354
+ if (!c || c.disabled)
1355
+ return;
1356
+ v.current[a]?.click();
1357
+ const I = p.includes(a) ? p.filter((g) => g !== a) : [...p, a];
1358
+ (r === void 0 || I.length <= r) && (b(I), n(I));
1213
1359
  };
1214
- if (a) {
1215
- l = qe(a), a = Re.convert3HexTo6(a);
1216
- const c = a === "#ffffff" ? "#333333" : a;
1217
- (l === "dark" || l === "light") && (h = {
1218
- outlineColor: c,
1219
- borderColor: c,
1220
- color: a === "#ffffff" || l === "light" ? "#333333" : a
1360
+ if (i) {
1361
+ l = Ge(i), i = De.convert3HexTo6(i);
1362
+ const a = i === "#ffffff" ? "#333333" : i;
1363
+ (l === "dark" || l === "light") && (m = {
1364
+ outlineColor: a,
1365
+ borderColor: a,
1366
+ color: i === "#ffffff" || l === "light" ? "#333333" : i
1221
1367
  });
1222
1368
  }
1223
- return /* @__PURE__ */ S("div", { className: tt.multiSelectContainer, children: /* @__PURE__ */ S("ul", { className: tt.quickOptionsWrap, children: e.map((c) => /* @__PURE__ */ S(
1369
+ return /* @__PURE__ */ k("div", { className: yt.multiSelectContainer, role: "group", children: /* @__PURE__ */ k("ul", { className: yt.quickOptionsWrap, id: f, children: e.map((a) => /* @__PURE__ */ k(
1224
1370
  "li",
1225
1371
  {
1226
- style: { ...h, ...f },
1227
- className: `${o} ${tt.quickOption} ${c.disabled || i !== void 0 && p.length >= i && !p.includes(c.id) ? tt.disabled : ""} ${p.includes(c.id) ? tt.selected : ""}`,
1228
- tabIndex: c.disabled ? -1 : 0,
1229
- onClick: () => s(c.id),
1230
- onKeyPress: (d) => {
1231
- (d.key === " " || d.code === "Space") && (d.preventDefault(), s(c.id));
1372
+ style: { ...m, ...o },
1373
+ className: `${s} ${a.disabled || r !== void 0 && p.length >= r && !p.includes(a.id) ? yt.disabled : ""} ${p.includes(a.id) ? yt.selected : ""}`,
1374
+ tabIndex: a.disabled ? -1 : 0,
1375
+ onClick: () => u(a.id),
1376
+ onKeyPress: (c) => {
1377
+ (c.key === " " || c.code === "Space") && (c.preventDefault(), u(a.id));
1232
1378
  },
1233
1379
  "data-testid": "option-box",
1234
- children: /* @__PURE__ */ S(
1235
- Bt,
1380
+ children: /* @__PURE__ */ k(
1381
+ Pn,
1236
1382
  {
1383
+ id: a.id,
1237
1384
  checkboxSize: "large",
1238
1385
  tabIndex: -1,
1239
- themeColor: a,
1240
- ref: (d) => {
1241
- v.current[c.id] = d;
1242
- },
1243
- checked: p.includes(c.id),
1244
- onClick: (d) => {
1245
- d.stopPropagation(), u(c.id);
1386
+ themeColor: i,
1387
+ ref: (c) => {
1388
+ v.current[a.id] = c;
1246
1389
  },
1247
- disabled: c.disabled || i !== void 0 && p.length >= i && !p.includes(c.id),
1248
- children: /* @__PURE__ */ S(
1390
+ checked: p.includes(a.id),
1391
+ disabled: a.disabled || r !== void 0 && p.length >= r && !p.includes(a.id),
1392
+ children: /* @__PURE__ */ k(
1249
1393
  "span",
1250
1394
  {
1251
1395
  style: {
1252
- color: a && (a === "#ffffff" || l === "light") || c.disabled || i !== void 0 && p.length >= i && !p.includes(c.id) ? "#333333" : a && (a !== "#ffffff" || l !== "light") ? a : "#006bb1"
1396
+ color: i && (i === "#ffffff" || l === "light") || a.disabled || r !== void 0 && p.length >= r && !p.includes(a.id) ? "#333333" : i && (i !== "#ffffff" || l !== "light") ? i : "#006bb1"
1253
1397
  },
1254
- children: c.text
1398
+ children: a.text
1255
1399
  }
1256
1400
  )
1257
1401
  }
1258
1402
  )
1259
1403
  },
1260
- c.id
1404
+ a.id
1261
1405
  )) }) });
1262
- }, ta = "_singleSelectWrapper_j8hf5_1", na = "_quickOption_j8hf5_4", ra = "_selected_j8hf5_10", ia = "_triangle_j8hf5_16", oa = "_loader_j8hf5_19", aa = "_checkmarkWrap_j8hf5_22", la = "_checkmark_j8hf5_22", sa = "_fill_j8hf5_1", ca = "_scale_j8hf5_1", ua = "_checkmarkCheck_j8hf5_29", da = "_stroke_j8hf5_1", fa = "_disabled_j8hf5_34", Ee = {
1263
- singleSelectWrapper: ta,
1264
- quickOption: na,
1265
- selected: ra,
1266
- triangle: ia,
1267
- loader: oa,
1406
+ }, ua = "_singleSelectWrapper_j8hf5_1", da = "_quickOption_j8hf5_4", fa = "_selected_j8hf5_10", pa = "_triangle_j8hf5_16", ba = "_loader_j8hf5_19", va = "_checkmarkWrap_j8hf5_22", ma = "_checkmark_j8hf5_22", ha = "_fill_j8hf5_1", wa = "_scale_j8hf5_1", ga = "_checkmarkCheck_j8hf5_29", xa = "_stroke_j8hf5_1", ya = "_disabled_j8hf5_34", Ne = {
1407
+ singleSelectWrapper: ua,
1408
+ quickOption: da,
1409
+ selected: fa,
1410
+ triangle: pa,
1411
+ loader: ba,
1268
1412
  "tw-spin": "_tw-spin_j8hf5_1",
1269
- checkmarkWrap: aa,
1270
- checkmark: la,
1271
- fill: sa,
1272
- scale: ca,
1273
- checkmarkCheck: ua,
1274
- stroke: da,
1275
- disabled: fa
1276
- }, as = ({
1413
+ checkmarkWrap: va,
1414
+ checkmark: ma,
1415
+ fill: ha,
1416
+ scale: wa,
1417
+ checkmarkCheck: ga,
1418
+ stroke: xa,
1419
+ disabled: ya
1420
+ }, ms = ({
1277
1421
  options: e,
1278
1422
  onSelect: t,
1279
1423
  selected: n,
1280
1424
  themeColor: r,
1281
1425
  className: i = "",
1282
- style: a = {},
1283
- showLoader: o = !1
1426
+ style: s = {},
1427
+ showLoader: o = !1,
1428
+ id: f = ""
1284
1429
  }) => {
1285
- const [f, p] = Q(n);
1286
- let b = {}, v = {}, h = "#ffffff";
1287
- const l = (u) => {
1288
- if (f?.id === u?.id) {
1289
- p(void 0), t(void 0);
1430
+ const [p, b] = K(n);
1431
+ let v = {}, m = {}, l = "#ffffff";
1432
+ const u = (a) => {
1433
+ if (p?.id === a?.id) {
1434
+ b(void 0), t(void 0);
1290
1435
  return;
1291
1436
  }
1292
- t(u), p(u);
1437
+ t(a), b(a);
1293
1438
  };
1294
1439
  if (r) {
1295
- const u = qe(r);
1296
- r = Re.convert3HexTo6(r);
1297
- const s = r === "#ffffff" ? "#333333" : r;
1298
- (u === "dark" || u === "light") && (h = r === "#ffffff" || u === "dark" ? "#ffffff" : "#333333", b = {
1299
- outlineColor: s,
1300
- borderColor: s,
1301
- color: r === "#ffffff" || u === "light" ? "#333333" : r
1302
- }, v = {
1303
- borderRightColor: s,
1304
- borderTopColor: s
1440
+ const a = Ge(r);
1441
+ r = De.convert3HexTo6(r);
1442
+ const c = r === "#ffffff" ? "#333333" : r;
1443
+ (a === "dark" || a === "light") && (l = r === "#ffffff" || a === "dark" ? "#ffffff" : "#333333", v = {
1444
+ outlineColor: c,
1445
+ borderColor: c,
1446
+ color: r === "#ffffff" || a === "light" ? "#333333" : r
1447
+ }, m = {
1448
+ borderRightColor: c,
1449
+ borderTopColor: c
1305
1450
  });
1306
1451
  }
1307
- return /* @__PURE__ */ S("div", { className: Ee.singleSelectWrapper, children: /* @__PURE__ */ S("div", { className: Ee.quickOption, children: /* @__PURE__ */ S("ul", { className: Ee.quickOption, children: e.map((u) => /* @__PURE__ */ we(
1452
+ return /* @__PURE__ */ k("div", { className: Ne.singleSelectWrapper, children: /* @__PURE__ */ k("div", { className: Ne.quickOption, children: /* @__PURE__ */ k("ul", { className: Ne.quickOption, role: "radiogroup", id: f, children: e.map((a) => /* @__PURE__ */ we(
1308
1453
  "li",
1309
1454
  {
1310
- tabIndex: u.disabled ? -1 : 0,
1311
- className: `${i} ${f?.id === u.id ? Ee.selected : ""} ${u.disabled ? Ee.disabled : ""}`,
1312
- style: { ...b, ...a },
1313
- onClick: () => l(u),
1314
- onKeyPress: (s) => {
1315
- (s.key === " " || s.code === "Space") && (s.preventDefault(), l(u));
1455
+ tabIndex: a.disabled ? -1 : 0,
1456
+ className: `${i} ${p?.id === a.id ? Ne.selected : ""} ${a.disabled ? Ne.disabled : ""}`,
1457
+ style: { ...v, ...s },
1458
+ onClick: () => u(a),
1459
+ onKeyPress: (c) => {
1460
+ (c.key === " " || c.code === "Space") && (c.preventDefault(), u(a));
1316
1461
  },
1317
1462
  "data-testid": "checkbox-input",
1463
+ role: "radio",
1464
+ "aria-checked": p?.id === a.id,
1318
1465
  children: [
1319
- u.text,
1320
- f?.id === u.id && /* @__PURE__ */ we("div", { className: Ee.triangle, style: { ...v }, children: [
1321
- o && /* @__PURE__ */ S("div", { className: Ee.loader, style: { borderRightColor: r ?? "#006bb1" } }),
1322
- !o && /* @__PURE__ */ S("div", { className: Ee.checkmarkWrap, children: /* @__PURE__ */ S(
1466
+ a.text,
1467
+ p?.id === a.id && !a.disabled && /* @__PURE__ */ we("div", { className: Ne.triangle, style: { ...m }, children: [
1468
+ o && /* @__PURE__ */ k("div", { className: Ne.loader, style: { borderRightColor: r ?? "#006bb1" } }),
1469
+ !o && /* @__PURE__ */ k("div", { className: Ne.checkmarkWrap, children: /* @__PURE__ */ k(
1323
1470
  "svg",
1324
1471
  {
1325
- className: Ee.checkmark,
1472
+ className: Ne.checkmark,
1326
1473
  xmlns: "http://www.w3.org/2000/svg",
1327
1474
  width: "11",
1328
1475
  height: "9",
1329
1476
  viewBox: "0 0 11 9",
1330
1477
  fill: "none",
1331
- children: /* @__PURE__ */ S(
1478
+ children: /* @__PURE__ */ k(
1332
1479
  "path",
1333
1480
  {
1334
- className: Ee.checkmarkCheck,
1335
- stroke: h,
1481
+ className: Ne.checkmarkCheck,
1482
+ stroke: l,
1336
1483
  d: "M2.1 4.34286L4.12857 6.40001L8.9 1.60001",
1337
1484
  strokeWidth: "2"
1338
1485
  }
@@ -1342,21 +1489,21 @@ const rs = Y.memo(
1342
1489
  ] })
1343
1490
  ]
1344
1491
  },
1345
- u.id
1492
+ a.id
1346
1493
  )) }) }) });
1347
- }, pa = "_scrollbarContainer_er2uj_1", ba = {
1348
- scrollbarContainer: pa
1349
- }, va = We(
1494
+ }, ka = "_scrollbarContainer_er2uj_1", Oa = {
1495
+ scrollbarContainer: ka
1496
+ }, Sa = Ke(
1350
1497
  ({ children: e, className: t = "", style: n = {}, ...r }, i) => {
1351
- const a = [ba.scrollbarContainer, t].filter(Boolean).join(" ");
1352
- return /* @__PURE__ */ S(Qe, { children: /* @__PURE__ */ S("div", { ref: i, style: { ...n }, className: a, ...r, children: e }) });
1498
+ const s = [Oa.scrollbarContainer, t].filter(Boolean).join(" ");
1499
+ return /* @__PURE__ */ k(it, { children: /* @__PURE__ */ k("div", { ref: i, style: { ...n }, className: s, ...r, children: e }) });
1353
1500
  }
1354
1501
  );
1355
- va.displayName = "Scrollbar";
1356
- var ma = Object.defineProperty, ha = (e, t, n) => t in e ? ma(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Pt = (e, t, n) => (ha(e, typeof t != "symbol" ? t + "" : t, n), n);
1357
- let wa = class {
1502
+ Sa.displayName = "Scrollbar";
1503
+ var Ta = Object.defineProperty, Ea = (e, t, n) => t in e ? Ta(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Mt = (e, t, n) => (Ea(e, typeof t != "symbol" ? t + "" : t, n), n);
1504
+ let Ia = class {
1358
1505
  constructor() {
1359
- Pt(this, "current", this.detect()), Pt(this, "handoffState", "pending"), Pt(this, "currentId", 0);
1506
+ Mt(this, "current", this.detect()), Mt(this, "handoffState", "pending"), Mt(this, "currentId", 0);
1360
1507
  }
1361
1508
  set(t) {
1362
1509
  this.current !== t && (this.handoffState = "pending", this.currentId = 0, this.current = t);
@@ -1382,27 +1529,27 @@ let wa = class {
1382
1529
  get isHandoffComplete() {
1383
1530
  return this.handoffState === "complete";
1384
1531
  }
1385
- }, Ue = new wa(), J = (e, t) => {
1386
- Ue.isServer ? Z(e, t) : Hr(e, t);
1532
+ }, Ze = new Ia(), ae = (e, t) => {
1533
+ Ze.isServer ? Y(e, t) : Kr(e, t);
1387
1534
  };
1388
- function Se(e) {
1389
- let t = C(e);
1390
- return J(() => {
1535
+ function _e(e) {
1536
+ let t = _(e);
1537
+ return ae(() => {
1391
1538
  t.current = e;
1392
1539
  }, [e]), t;
1393
1540
  }
1394
- function at(e, t) {
1395
- let [n, r] = Q(e), i = Se(e);
1396
- return J(() => r(i.current), [i, r, ...t]), n;
1541
+ function ft(e, t) {
1542
+ let [n, r] = K(e), i = _e(e);
1543
+ return ae(() => r(i.current), [i, r, ...t]), n;
1397
1544
  }
1398
- function ga(e) {
1545
+ function _a(e) {
1399
1546
  typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
1400
1547
  throw t;
1401
1548
  }));
1402
1549
  }
1403
- function _e() {
1404
- let e = [], t = { addEventListener(n, r, i, a) {
1405
- return n.addEventListener(r, i, a), t.add(() => n.removeEventListener(r, i, a));
1550
+ function Fe() {
1551
+ let e = [], t = { addEventListener(n, r, i, s) {
1552
+ return n.addEventListener(r, i, s), t.add(() => n.removeEventListener(r, i, s));
1406
1553
  }, requestAnimationFrame(...n) {
1407
1554
  let r = requestAnimationFrame(...n);
1408
1555
  return t.add(() => cancelAnimationFrame(r));
@@ -1413,18 +1560,18 @@ function _e() {
1413
1560
  return t.add(() => clearTimeout(r));
1414
1561
  }, microTask(...n) {
1415
1562
  let r = { current: !0 };
1416
- return ga(() => {
1563
+ return _a(() => {
1417
1564
  r.current && n[0]();
1418
1565
  }), t.add(() => {
1419
1566
  r.current = !1;
1420
1567
  });
1421
1568
  }, style(n, r, i) {
1422
- let a = n.style.getPropertyValue(r);
1569
+ let s = n.style.getPropertyValue(r);
1423
1570
  return Object.assign(n.style, { [r]: i }), this.add(() => {
1424
- Object.assign(n.style, { [r]: a });
1571
+ Object.assign(n.style, { [r]: s });
1425
1572
  });
1426
1573
  }, group(n) {
1427
- let r = _e();
1574
+ let r = Fe();
1428
1575
  return n(r), this.add(() => r.dispose());
1429
1576
  }, add(n) {
1430
1577
  return e.push(n), () => {
@@ -1439,95 +1586,95 @@ function _e() {
1439
1586
  } };
1440
1587
  return t;
1441
1588
  }
1442
- function Ne() {
1443
- let [e] = Q(_e);
1444
- return Z(() => () => e.dispose(), [e]), e;
1589
+ function Ve() {
1590
+ let [e] = K(Fe);
1591
+ return Y(() => () => e.dispose(), [e]), e;
1445
1592
  }
1446
- let E = function(e) {
1447
- let t = Se(e);
1448
- return Y.useCallback((...n) => t.current(...n), [t]);
1593
+ let P = function(e) {
1594
+ let t = _e(e);
1595
+ return ee.useCallback((...n) => t.current(...n), [t]);
1449
1596
  };
1450
- function xa() {
1597
+ function Ca() {
1451
1598
  let e = typeof document > "u";
1452
- return "useSyncExternalStore" in Pe ? ((t) => t.useSyncExternalStore)(Pe)(() => () => {
1599
+ return "useSyncExternalStore" in We ? ((t) => t.useSyncExternalStore)(We)(() => () => {
1453
1600
  }, () => !1, () => !e) : !1;
1454
1601
  }
1455
- function qt() {
1456
- let e = xa(), [t, n] = Pe.useState(Ue.isHandoffComplete);
1457
- return t && Ue.isHandoffComplete === !1 && n(!1), Pe.useEffect(() => {
1602
+ function Zt() {
1603
+ let e = Ca(), [t, n] = We.useState(Ze.isHandoffComplete);
1604
+ return t && Ze.isHandoffComplete === !1 && n(!1), We.useEffect(() => {
1458
1605
  t !== !0 && n(!0);
1459
- }, [t]), Pe.useEffect(() => Ue.handoff(), []), e ? !1 : t;
1606
+ }, [t]), We.useEffect(() => Ze.handoff(), []), e ? !1 : t;
1460
1607
  }
1461
- var bn;
1462
- let Fe = (bn = Y.useId) != null ? bn : function() {
1463
- let e = qt(), [t, n] = Y.useState(e ? () => Ue.nextId() : null);
1464
- return J(() => {
1465
- t === null && n(Ue.nextId());
1608
+ var wn;
1609
+ let Be = (wn = ee.useId) != null ? wn : function() {
1610
+ let e = Zt(), [t, n] = ee.useState(e ? () => Ze.nextId() : null);
1611
+ return ae(() => {
1612
+ t === null && n(Ze.nextId());
1466
1613
  }, [t]), t != null ? "" + t : void 0;
1467
1614
  };
1468
- function X(e, t, ...n) {
1615
+ function ie(e, t, ...n) {
1469
1616
  if (e in t) {
1470
1617
  let i = t[e];
1471
1618
  return typeof i == "function" ? i(...n) : i;
1472
1619
  }
1473
1620
  let r = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((i) => `"${i}"`).join(", ")}.`);
1474
- throw Error.captureStackTrace && Error.captureStackTrace(r, X), r;
1621
+ throw Error.captureStackTrace && Error.captureStackTrace(r, ie), r;
1475
1622
  }
1476
- function Ot(e) {
1477
- return Ue.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
1623
+ function Rt(e) {
1624
+ return Ze.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
1478
1625
  }
1479
- let vn = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
1480
- var ya = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(ya || {}), Oa = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Oa || {}), Sa = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Sa || {}), zt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(zt || {});
1481
- function kr(e, t = 0) {
1626
+ let gn = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
1627
+ var Pa = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(Pa || {}), Ra = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Ra || {}), La = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(La || {}), Jt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Jt || {});
1628
+ function Pr(e, t = 0) {
1482
1629
  var n;
1483
- return e === ((n = Ot(e)) == null ? void 0 : n.body) ? !1 : X(t, { 0() {
1484
- return e.matches(vn);
1630
+ return e === ((n = Rt(e)) == null ? void 0 : n.body) ? !1 : ie(t, { 0() {
1631
+ return e.matches(gn);
1485
1632
  }, 1() {
1486
1633
  let r = e;
1487
1634
  for (; r !== null; ) {
1488
- if (r.matches(vn))
1635
+ if (r.matches(gn))
1489
1636
  return !0;
1490
1637
  r = r.parentElement;
1491
1638
  }
1492
1639
  return !1;
1493
1640
  } });
1494
1641
  }
1495
- var ka = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(ka || {});
1642
+ var Na = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Na || {});
1496
1643
  typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
1497
1644
  e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
1498
1645
  }, !0), document.addEventListener("click", (e) => {
1499
1646
  e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
1500
1647
  }, !0));
1501
- function Tr(e, t = (n) => n) {
1648
+ function Rr(e, t = (n) => n) {
1502
1649
  return e.slice().sort((n, r) => {
1503
- let i = t(n), a = t(r);
1504
- if (i === null || a === null)
1650
+ let i = t(n), s = t(r);
1651
+ if (i === null || s === null)
1505
1652
  return 0;
1506
- let o = i.compareDocumentPosition(a);
1653
+ let o = i.compareDocumentPosition(s);
1507
1654
  return o & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
1508
1655
  });
1509
1656
  }
1510
- function pt(e, t, n) {
1511
- let r = Se(t);
1512
- Z(() => {
1513
- function i(a) {
1514
- r.current(a);
1657
+ function kt(e, t, n) {
1658
+ let r = _e(t);
1659
+ Y(() => {
1660
+ function i(s) {
1661
+ r.current(s);
1515
1662
  }
1516
1663
  return document.addEventListener(e, i, n), () => document.removeEventListener(e, i, n);
1517
1664
  }, [e, n]);
1518
1665
  }
1519
- function Ta(e, t, n) {
1520
- let r = Se(t);
1521
- Z(() => {
1522
- function i(a) {
1523
- r.current(a);
1666
+ function Aa(e, t, n) {
1667
+ let r = _e(t);
1668
+ Y(() => {
1669
+ function i(s) {
1670
+ r.current(s);
1524
1671
  }
1525
1672
  return window.addEventListener(e, i, n), () => window.removeEventListener(e, i, n);
1526
1673
  }, [e, n]);
1527
1674
  }
1528
- function Er(e, t, n = !0) {
1529
- let r = C(!1);
1530
- Z(() => {
1675
+ function Lr(e, t, n = !0) {
1676
+ let r = _(!1);
1677
+ Y(() => {
1531
1678
  requestAnimationFrame(() => {
1532
1679
  r.current = n;
1533
1680
  });
@@ -1538,30 +1685,30 @@ function Er(e, t, n = !0) {
1538
1685
  let p = f(o);
1539
1686
  if (p === null || !p.getRootNode().contains(p) || !p.isConnected)
1540
1687
  return;
1541
- let b = function v(h) {
1542
- return typeof h == "function" ? v(h()) : Array.isArray(h) || h instanceof Set ? h : [h];
1688
+ let b = function v(m) {
1689
+ return typeof m == "function" ? v(m()) : Array.isArray(m) || m instanceof Set ? m : [m];
1543
1690
  }(e);
1544
1691
  for (let v of b) {
1545
1692
  if (v === null)
1546
1693
  continue;
1547
- let h = v instanceof HTMLElement ? v : v.current;
1548
- if (h != null && h.contains(p) || o.composed && o.composedPath().includes(h))
1694
+ let m = v instanceof HTMLElement ? v : v.current;
1695
+ if (m != null && m.contains(p) || o.composed && o.composedPath().includes(m))
1549
1696
  return;
1550
1697
  }
1551
- return !kr(p, zt.Loose) && p.tabIndex !== -1 && o.preventDefault(), t(o, p);
1698
+ return !Pr(p, Jt.Loose) && p.tabIndex !== -1 && o.preventDefault(), t(o, p);
1552
1699
  }
1553
- let a = C(null);
1554
- pt("pointerdown", (o) => {
1700
+ let s = _(null);
1701
+ kt("pointerdown", (o) => {
1555
1702
  var f, p;
1556
- r.current && (a.current = ((p = (f = o.composedPath) == null ? void 0 : f.call(o)) == null ? void 0 : p[0]) || o.target);
1557
- }, !0), pt("mousedown", (o) => {
1703
+ r.current && (s.current = ((p = (f = o.composedPath) == null ? void 0 : f.call(o)) == null ? void 0 : p[0]) || o.target);
1704
+ }, !0), kt("mousedown", (o) => {
1558
1705
  var f, p;
1559
- r.current && (a.current = ((p = (f = o.composedPath) == null ? void 0 : f.call(o)) == null ? void 0 : p[0]) || o.target);
1560
- }, !0), pt("click", (o) => {
1561
- a.current && (i(o, () => a.current), a.current = null);
1562
- }, !0), pt("touchend", (o) => i(o, () => o.target instanceof HTMLElement ? o.target : null), !0), Ta("blur", (o) => i(o, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
1706
+ r.current && (s.current = ((p = (f = o.composedPath) == null ? void 0 : f.call(o)) == null ? void 0 : p[0]) || o.target);
1707
+ }, !0), kt("click", (o) => {
1708
+ s.current && (i(o, () => s.current), s.current = null);
1709
+ }, !0), kt("touchend", (o) => i(o, () => o.target instanceof HTMLElement ? o.target : null), !0), Aa("blur", (o) => i(o, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
1563
1710
  }
1564
- function mn(e) {
1711
+ function xn(e) {
1565
1712
  var t;
1566
1713
  if (e.type)
1567
1714
  return e.type;
@@ -1569,50 +1716,50 @@ function mn(e) {
1569
1716
  if (typeof n == "string" && n.toLowerCase() === "button")
1570
1717
  return "button";
1571
1718
  }
1572
- function Ir(e, t) {
1573
- let [n, r] = Q(() => mn(e));
1574
- return J(() => {
1575
- r(mn(e));
1576
- }, [e.type, e.as]), J(() => {
1719
+ function Nr(e, t) {
1720
+ let [n, r] = K(() => xn(e));
1721
+ return ae(() => {
1722
+ r(xn(e));
1723
+ }, [e.type, e.as]), ae(() => {
1577
1724
  n || t.current && t.current instanceof HTMLButtonElement && !t.current.hasAttribute("type") && r("button");
1578
1725
  }, [n, t]), n;
1579
1726
  }
1580
- let Ea = Symbol();
1581
- function ye(...e) {
1582
- let t = C(e);
1583
- Z(() => {
1727
+ let Fa = Symbol();
1728
+ function Ee(...e) {
1729
+ let t = _(e);
1730
+ Y(() => {
1584
1731
  t.current = e;
1585
1732
  }, [e]);
1586
- let n = E((r) => {
1733
+ let n = P((r) => {
1587
1734
  for (let i of t.current)
1588
1735
  i != null && (typeof i == "function" ? i(r) : i.current = r);
1589
1736
  });
1590
- return e.every((r) => r == null || r?.[Ea]) ? void 0 : n;
1737
+ return e.every((r) => r == null || r?.[Fa]) ? void 0 : n;
1591
1738
  }
1592
- function Ia({ container: e, accept: t, walk: n, enabled: r = !0 }) {
1593
- let i = C(t), a = C(n);
1594
- Z(() => {
1595
- i.current = t, a.current = n;
1596
- }, [t, n]), J(() => {
1739
+ function Da({ container: e, accept: t, walk: n, enabled: r = !0 }) {
1740
+ let i = _(t), s = _(n);
1741
+ Y(() => {
1742
+ i.current = t, s.current = n;
1743
+ }, [t, n]), ae(() => {
1597
1744
  if (!e || !r)
1598
1745
  return;
1599
- let o = Ot(e);
1746
+ let o = Rt(e);
1600
1747
  if (!o)
1601
1748
  return;
1602
- let f = i.current, p = a.current, b = Object.assign((h) => f(h), { acceptNode: f }), v = o.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, b, !1);
1749
+ let f = i.current, p = s.current, b = Object.assign((m) => f(m), { acceptNode: f }), v = o.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, b, !1);
1603
1750
  for (; v.nextNode(); )
1604
1751
  p(v.currentNode);
1605
- }, [e, r, i, a]);
1752
+ }, [e, r, i, s]);
1606
1753
  }
1607
- function _a(e) {
1754
+ function Ma(e) {
1608
1755
  throw new Error("Unexpected object: " + e);
1609
1756
  }
1610
- var U = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(U || {});
1611
- function _r(e, t) {
1757
+ var H = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(H || {});
1758
+ function Ar(e, t) {
1612
1759
  let n = t.resolveItems();
1613
1760
  if (n.length <= 0)
1614
1761
  return null;
1615
- let r = t.resolveActiveIndex(), i = r ?? -1, a = (() => {
1762
+ let r = t.resolveActiveIndex(), i = r ?? -1, s = (() => {
1616
1763
  switch (e.focus) {
1617
1764
  case 0:
1618
1765
  return n.findIndex((o) => !t.resolveDisabled(o));
@@ -1631,63 +1778,63 @@ function _r(e, t) {
1631
1778
  case 5:
1632
1779
  return null;
1633
1780
  default:
1634
- _a(e);
1781
+ Ma(e);
1635
1782
  }
1636
1783
  })();
1637
- return a === -1 ? r : a;
1784
+ return s === -1 ? r : s;
1638
1785
  }
1639
- function wt(...e) {
1786
+ function It(...e) {
1640
1787
  return Array.from(new Set(e.flatMap((t) => typeof t == "string" ? t.split(" ") : []))).filter(Boolean).join(" ");
1641
1788
  }
1642
- var Ye = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ye || {}), $e = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))($e || {});
1643
- function me({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: i, visible: a = !0, name: o }) {
1644
- let f = Cr(t, e);
1645
- if (a)
1646
- return bt(f, n, r, o);
1789
+ var rt = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(rt || {}), qe = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(qe || {});
1790
+ function ke({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: i, visible: s = !0, name: o }) {
1791
+ let f = Fr(t, e);
1792
+ if (s)
1793
+ return Ot(f, n, r, o);
1647
1794
  let p = i ?? 0;
1648
1795
  if (p & 2) {
1649
1796
  let { static: b = !1, ...v } = f;
1650
1797
  if (b)
1651
- return bt(v, n, r, o);
1798
+ return Ot(v, n, r, o);
1652
1799
  }
1653
1800
  if (p & 1) {
1654
1801
  let { unmount: b = !0, ...v } = f;
1655
- return X(b ? 0 : 1, { 0() {
1802
+ return ie(b ? 0 : 1, { 0() {
1656
1803
  return null;
1657
1804
  }, 1() {
1658
- return bt({ ...v, hidden: !0, style: { display: "none" } }, n, r, o);
1805
+ return Ot({ ...v, hidden: !0, style: { display: "none" } }, n, r, o);
1659
1806
  } });
1660
1807
  }
1661
- return bt(f, n, r, o);
1808
+ return Ot(f, n, r, o);
1662
1809
  }
1663
- function bt(e, t = {}, n, r) {
1664
- let { as: i = n, children: a, refName: o = "ref", ...f } = Lt(e, ["unmount", "static"]), p = e.ref !== void 0 ? { [o]: e.ref } : {}, b = typeof a == "function" ? a(t) : a;
1810
+ function Ot(e, t = {}, n, r) {
1811
+ let { as: i = n, children: s, refName: o = "ref", ...f } = $t(e, ["unmount", "static"]), p = e.ref !== void 0 ? { [o]: e.ref } : {}, b = typeof s == "function" ? s(t) : s;
1665
1812
  "className" in f && f.className && typeof f.className == "function" && (f.className = f.className(t));
1666
1813
  let v = {};
1667
1814
  if (t) {
1668
- let h = !1, l = [];
1669
- for (let [u, s] of Object.entries(t))
1670
- typeof s == "boolean" && (h = !0), s === !0 && l.push(u);
1671
- h && (v["data-headlessui-state"] = l.join(" "));
1815
+ let m = !1, l = [];
1816
+ for (let [u, a] of Object.entries(t))
1817
+ typeof a == "boolean" && (m = !0), a === !0 && l.push(u);
1818
+ m && (v["data-headlessui-state"] = l.join(" "));
1672
1819
  }
1673
- if (i === Le && Object.keys(gt(f)).length > 0) {
1674
- if (!qr(b) || Array.isArray(b) && b.length > 1)
1675
- throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(f).map((s) => ` - ${s}`).join(`
1676
- `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((s) => ` - ${s}`).join(`
1820
+ if (i === je && Object.keys(_t(f)).length > 0) {
1821
+ if (!Yr(b) || Array.isArray(b) && b.length > 1)
1822
+ throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(f).map((a) => ` - ${a}`).join(`
1823
+ `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((a) => ` - ${a}`).join(`
1677
1824
  `)].join(`
1678
1825
  `));
1679
- let h = b.props, l = typeof h?.className == "function" ? (...s) => wt(h?.className(...s), f.className) : wt(h?.className, f.className), u = l ? { className: l } : {};
1680
- return zr(b, Object.assign({}, Cr(b.props, gt(Lt(f, ["ref"]))), v, p, Ca(b.ref, p.ref), u));
1826
+ let m = b.props, l = typeof m?.className == "function" ? (...a) => It(m?.className(...a), f.className) : It(m?.className, f.className), u = l ? { className: l } : {};
1827
+ return Gr(b, Object.assign({}, Fr(b.props, _t($t(f, ["ref"]))), v, p, $a(b.ref, p.ref), u));
1681
1828
  }
1682
- return Kr(i, Object.assign({}, Lt(f, ["ref"]), i !== Le && p, i !== Le && v), b);
1829
+ return Qr(i, Object.assign({}, $t(f, ["ref"]), i !== je && p, i !== je && v), b);
1683
1830
  }
1684
- function Ca(...e) {
1831
+ function $a(...e) {
1685
1832
  return { ref: e.every((t) => t == null) ? void 0 : (t) => {
1686
1833
  for (let n of e)
1687
1834
  n != null && (typeof n == "function" ? n(t) : n.current = t);
1688
1835
  } };
1689
1836
  }
1690
- function Cr(...e) {
1837
+ function Fr(...e) {
1691
1838
  if (e.length === 0)
1692
1839
  return {};
1693
1840
  if (e.length === 1)
@@ -1699,40 +1846,40 @@ function Cr(...e) {
1699
1846
  if (t.disabled || t["aria-disabled"])
1700
1847
  return Object.assign(t, Object.fromEntries(Object.keys(n).map((r) => [r, void 0])));
1701
1848
  for (let r in n)
1702
- Object.assign(t, { [r](i, ...a) {
1849
+ Object.assign(t, { [r](i, ...s) {
1703
1850
  let o = n[r];
1704
1851
  for (let f of o) {
1705
1852
  if ((i instanceof Event || i?.nativeEvent instanceof Event) && i.defaultPrevented)
1706
1853
  return;
1707
- f(i, ...a);
1854
+ f(i, ...s);
1708
1855
  }
1709
1856
  } });
1710
1857
  return t;
1711
1858
  }
1712
- function be(e) {
1859
+ function ge(e) {
1713
1860
  var t;
1714
- return Object.assign(We(e), { displayName: (t = e.displayName) != null ? t : e.name });
1861
+ return Object.assign(Ke(e), { displayName: (t = e.displayName) != null ? t : e.name });
1715
1862
  }
1716
- function gt(e) {
1863
+ function _t(e) {
1717
1864
  let t = Object.assign({}, e);
1718
1865
  for (let n in t)
1719
1866
  t[n] === void 0 && delete t[n];
1720
1867
  return t;
1721
1868
  }
1722
- function Lt(e, t = []) {
1869
+ function $t(e, t = []) {
1723
1870
  let n = Object.assign({}, e);
1724
1871
  for (let r of t)
1725
1872
  r in n && delete n[r];
1726
1873
  return n;
1727
1874
  }
1728
- function Pr(e) {
1875
+ function Dr(e) {
1729
1876
  let t = e.parentElement, n = null;
1730
1877
  for (; t && !(t instanceof HTMLFieldSetElement); )
1731
1878
  t instanceof HTMLLegendElement && (n = t), t = t.parentElement;
1732
1879
  let r = t?.getAttribute("disabled") === "";
1733
- return r && Pa(n) ? !1 : r;
1880
+ return r && Wa(n) ? !1 : r;
1734
1881
  }
1735
- function Pa(e) {
1882
+ function Wa(e) {
1736
1883
  if (!e)
1737
1884
  return !1;
1738
1885
  let t = e.previousElementSibling;
@@ -1743,82 +1890,82 @@ function Pa(e) {
1743
1890
  }
1744
1891
  return !0;
1745
1892
  }
1746
- function Kt(e = {}, t = null, n = []) {
1893
+ function en(e = {}, t = null, n = []) {
1747
1894
  for (let [r, i] of Object.entries(e))
1748
- Nr(n, Lr(t, r), i);
1895
+ $r(n, Mr(t, r), i);
1749
1896
  return n;
1750
1897
  }
1751
- function Lr(e, t) {
1898
+ function Mr(e, t) {
1752
1899
  return e ? e + "[" + t + "]" : t;
1753
1900
  }
1754
- function Nr(e, t, n) {
1901
+ function $r(e, t, n) {
1755
1902
  if (Array.isArray(n))
1756
1903
  for (let [r, i] of n.entries())
1757
- Nr(e, Lr(t, r.toString()), i);
1904
+ $r(e, Mr(t, r.toString()), i);
1758
1905
  else
1759
- n instanceof Date ? e.push([t, n.toISOString()]) : typeof n == "boolean" ? e.push([t, n ? "1" : "0"]) : typeof n == "string" ? e.push([t, n]) : typeof n == "number" ? e.push([t, `${n}`]) : n == null ? e.push([t, ""]) : Kt(n, t, e);
1906
+ n instanceof Date ? e.push([t, n.toISOString()]) : typeof n == "boolean" ? e.push([t, n ? "1" : "0"]) : typeof n == "string" ? e.push([t, n]) : typeof n == "number" ? e.push([t, `${n}`]) : n == null ? e.push([t, ""]) : en(n, t, e);
1760
1907
  }
1761
- let La = "div";
1762
- var Gt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Gt || {});
1763
- function Na(e, t) {
1908
+ let ja = "div";
1909
+ var tn = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(tn || {});
1910
+ function Va(e, t) {
1764
1911
  let { features: n = 1, ...r } = e, i = { ref: t, "aria-hidden": (n & 2) === 2 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(n & 4) === 4 && (n & 2) !== 2 && { display: "none" } } };
1765
- return me({ ourProps: i, theirProps: r, slot: {}, defaultTag: La, name: "Hidden" });
1912
+ return ke({ ourProps: i, theirProps: r, slot: {}, defaultTag: ja, name: "Hidden" });
1766
1913
  }
1767
- let Rr = be(Na), Yt = He(null);
1768
- Yt.displayName = "OpenClosedContext";
1769
- var se = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(se || {});
1770
- function St() {
1771
- return Ve(Yt);
1914
+ let Wr = ge(Va), nn = Je(null);
1915
+ nn.displayName = "OpenClosedContext";
1916
+ var pe = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(pe || {});
1917
+ function Lt() {
1918
+ return Ye(nn);
1772
1919
  }
1773
- function Qt({ value: e, children: t }) {
1774
- return Y.createElement(Yt.Provider, { value: e }, t);
1920
+ function rn({ value: e, children: t }) {
1921
+ return ee.createElement(nn.Provider, { value: e }, t);
1775
1922
  }
1776
- var j = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(j || {});
1777
- function Fr(e, t, n) {
1778
- let [r, i] = Q(n), a = e !== void 0, o = C(a), f = C(!1), p = C(!1);
1779
- return a && !o.current && !f.current ? (f.current = !0, o.current = a, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !a && o.current && !p.current && (p.current = !0, o.current = a, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [a ? e : r, E((b) => (a || i(b), t?.(b)))];
1923
+ var U = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(U || {});
1924
+ function jr(e, t, n) {
1925
+ let [r, i] = K(n), s = e !== void 0, o = _(s), f = _(!1), p = _(!1);
1926
+ return s && !o.current && !f.current ? (f.current = !0, o.current = s, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !s && o.current && !p.current && (p.current = !0, o.current = s, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [s ? e : r, P((b) => (s || i(b), t?.(b)))];
1780
1927
  }
1781
- function hn(e, t) {
1782
- let n = C([]), r = E(e);
1783
- Z(() => {
1928
+ function yn(e, t) {
1929
+ let n = _([]), r = P(e);
1930
+ Y(() => {
1784
1931
  let i = [...n.current];
1785
- for (let [a, o] of t.entries())
1786
- if (n.current[a] !== o) {
1932
+ for (let [s, o] of t.entries())
1933
+ if (n.current[s] !== o) {
1787
1934
  let f = r(t, i);
1788
1935
  return n.current = t, f;
1789
1936
  }
1790
1937
  }, [r, ...t]);
1791
1938
  }
1792
- function wn(e) {
1939
+ function kn(e) {
1793
1940
  return [e.screenX, e.screenY];
1794
1941
  }
1795
- function Ar() {
1796
- let e = C([-1, -1]);
1942
+ function Vr() {
1943
+ let e = _([-1, -1]);
1797
1944
  return { wasMoved(t) {
1798
- let n = wn(t);
1945
+ let n = kn(t);
1799
1946
  return e.current[0] === n[0] && e.current[1] === n[1] ? !1 : (e.current = n, !0);
1800
1947
  }, update(t) {
1801
- e.current = wn(t);
1948
+ e.current = kn(t);
1802
1949
  } };
1803
1950
  }
1804
- function Ra() {
1951
+ function Ba() {
1805
1952
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
1806
1953
  }
1807
- function Fa() {
1954
+ function Ua() {
1808
1955
  return /Android/gi.test(window.navigator.userAgent);
1809
1956
  }
1810
- function Aa() {
1811
- return Ra() || Fa();
1957
+ function Ha() {
1958
+ return Ba() || Ua();
1812
1959
  }
1813
- function Ma(...e) {
1814
- return re(() => Ot(...e), [...e]);
1960
+ function za(...e) {
1961
+ return fe(() => Rt(...e), [...e]);
1815
1962
  }
1816
- var Da = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Da || {}), $a = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))($a || {}), Wa = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(Wa || {}), Va = ((e) => (e[e.OpenCombobox = 0] = "OpenCombobox", e[e.CloseCombobox = 1] = "CloseCombobox", e[e.GoToOption = 2] = "GoToOption", e[e.RegisterOption = 3] = "RegisterOption", e[e.UnregisterOption = 4] = "UnregisterOption", e[e.RegisterLabel = 5] = "RegisterLabel", e))(Va || {});
1817
- function Nt(e, t = (n) => n) {
1818
- let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, r = Tr(t(e.options.slice()), (a) => a.dataRef.current.domRef.current), i = n ? r.indexOf(n) : null;
1963
+ var qa = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(qa || {}), Ka = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(Ka || {}), Ya = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(Ya || {}), Ga = ((e) => (e[e.OpenCombobox = 0] = "OpenCombobox", e[e.CloseCombobox = 1] = "CloseCombobox", e[e.GoToOption = 2] = "GoToOption", e[e.RegisterOption = 3] = "RegisterOption", e[e.UnregisterOption = 4] = "UnregisterOption", e[e.RegisterLabel = 5] = "RegisterLabel", e))(Ga || {});
1964
+ function Wt(e, t = (n) => n) {
1965
+ let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, r = Rr(t(e.options.slice()), (s) => s.dataRef.current.domRef.current), i = n ? r.indexOf(n) : null;
1819
1966
  return i === -1 && (i = null), { options: r, activeOptionIndex: i };
1820
1967
  }
1821
- let Ba = { 1(e) {
1968
+ let Qa = { 1(e) {
1822
1969
  var t;
1823
1970
  return (t = e.dataRef.current) != null && t.disabled || e.comboboxState === 1 ? e : { ...e, activeOptionIndex: null, comboboxState: 1 };
1824
1971
  }, 0(e) {
@@ -1827,214 +1974,214 @@ let Ba = { 1(e) {
1827
1974
  return e;
1828
1975
  let n = e.activeOptionIndex;
1829
1976
  if (e.dataRef.current) {
1830
- let { isSelected: r } = e.dataRef.current, i = e.options.findIndex((a) => r(a.dataRef.current.value));
1977
+ let { isSelected: r } = e.dataRef.current, i = e.options.findIndex((s) => r(s.dataRef.current.value));
1831
1978
  i !== -1 && (n = i);
1832
1979
  }
1833
1980
  return { ...e, comboboxState: 0, activeOptionIndex: n };
1834
1981
  }, 2(e, t) {
1835
- var n, r, i, a;
1982
+ var n, r, i, s;
1836
1983
  if ((n = e.dataRef.current) != null && n.disabled || (r = e.dataRef.current) != null && r.optionsRef.current && !((i = e.dataRef.current) != null && i.optionsPropsRef.current.static) && e.comboboxState === 1)
1837
1984
  return e;
1838
- let o = Nt(e);
1985
+ let o = Wt(e);
1839
1986
  if (o.activeOptionIndex === null) {
1840
1987
  let p = o.options.findIndex((b) => !b.dataRef.current.disabled);
1841
1988
  p !== -1 && (o.activeOptionIndex = p);
1842
1989
  }
1843
- let f = _r(t, { resolveItems: () => o.options, resolveActiveIndex: () => o.activeOptionIndex, resolveId: (p) => p.id, resolveDisabled: (p) => p.dataRef.current.disabled });
1844
- return { ...e, ...o, activeOptionIndex: f, activationTrigger: (a = t.trigger) != null ? a : 1 };
1990
+ let f = Ar(t, { resolveItems: () => o.options, resolveActiveIndex: () => o.activeOptionIndex, resolveId: (p) => p.id, resolveDisabled: (p) => p.dataRef.current.disabled });
1991
+ return { ...e, ...o, activeOptionIndex: f, activationTrigger: (s = t.trigger) != null ? s : 1 };
1845
1992
  }, 3: (e, t) => {
1846
1993
  var n, r;
1847
- let i = { id: t.id, dataRef: t.dataRef }, a = Nt(e, (f) => [...f, i]);
1848
- e.activeOptionIndex === null && (n = e.dataRef.current) != null && n.isSelected(t.dataRef.current.value) && (a.activeOptionIndex = a.options.indexOf(i));
1849
- let o = { ...e, ...a, activationTrigger: 1 };
1994
+ let i = { id: t.id, dataRef: t.dataRef }, s = Wt(e, (f) => [...f, i]);
1995
+ e.activeOptionIndex === null && (n = e.dataRef.current) != null && n.isSelected(t.dataRef.current.value) && (s.activeOptionIndex = s.options.indexOf(i));
1996
+ let o = { ...e, ...s, activationTrigger: 1 };
1850
1997
  return (r = e.dataRef.current) != null && r.__demoMode && e.dataRef.current.value === void 0 && (o.activeOptionIndex = 0), o;
1851
1998
  }, 4: (e, t) => {
1852
- let n = Nt(e, (r) => {
1853
- let i = r.findIndex((a) => a.id === t.id);
1999
+ let n = Wt(e, (r) => {
2000
+ let i = r.findIndex((s) => s.id === t.id);
1854
2001
  return i !== -1 && r.splice(i, 1), r;
1855
2002
  });
1856
2003
  return { ...e, ...n, activationTrigger: 1 };
1857
- }, 5: (e, t) => ({ ...e, labelId: t.id }) }, Xt = He(null);
1858
- Xt.displayName = "ComboboxActionsContext";
1859
- function lt(e) {
1860
- let t = Ve(Xt);
2004
+ }, 5: (e, t) => ({ ...e, labelId: t.id }) }, on = Je(null);
2005
+ on.displayName = "ComboboxActionsContext";
2006
+ function pt(e) {
2007
+ let t = Ye(on);
1861
2008
  if (t === null) {
1862
2009
  let n = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
1863
- throw Error.captureStackTrace && Error.captureStackTrace(n, lt), n;
2010
+ throw Error.captureStackTrace && Error.captureStackTrace(n, pt), n;
1864
2011
  }
1865
2012
  return t;
1866
2013
  }
1867
- let Zt = He(null);
1868
- Zt.displayName = "ComboboxDataContext";
1869
- function Ze(e) {
1870
- let t = Ve(Zt);
2014
+ let an = Je(null);
2015
+ an.displayName = "ComboboxDataContext";
2016
+ function at(e) {
2017
+ let t = Ye(an);
1871
2018
  if (t === null) {
1872
2019
  let n = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
1873
- throw Error.captureStackTrace && Error.captureStackTrace(n, Ze), n;
2020
+ throw Error.captureStackTrace && Error.captureStackTrace(n, at), n;
1874
2021
  }
1875
2022
  return t;
1876
2023
  }
1877
- function ja(e, t) {
1878
- return X(t.type, Ba, e, t);
1879
- }
1880
- let Ua = Le;
1881
- function Ha(e, t) {
1882
- let { value: n, defaultValue: r, onChange: i, form: a, name: o, by: f = (x, I) => x === I, disabled: p = !1, __demoMode: b = !1, nullable: v = !1, multiple: h = !1, ...l } = e, [u = h ? [] : void 0, s] = Fr(n, i, r), [c, d] = Sn(ja, { dataRef: kn(), comboboxState: b ? 0 : 1, options: [], activeOptionIndex: null, activationTrigger: 1, labelId: null }), m = C(!1), O = C({ static: !1, hold: !1 }), w = C(null), g = C(null), W = C(null), L = C(null), q = E(typeof f == "string" ? (x, I) => {
1883
- let D = f;
1884
- return x?.[D] === I?.[D];
1885
- } : f), M = Ke((x) => X(k.mode, { 1: () => u.some((I) => q(I, x)), 0: () => q(u, x) }), [u]), k = re(() => ({ ...c, optionsPropsRef: O, labelRef: w, inputRef: g, buttonRef: W, optionsRef: L, value: u, defaultValue: r, disabled: p, mode: h ? 1 : 0, get activeOptionIndex() {
1886
- if (m.current && c.activeOptionIndex === null && c.options.length > 0) {
1887
- let x = c.options.findIndex((I) => !I.dataRef.current.disabled);
1888
- if (x !== -1)
1889
- return x;
2024
+ function Xa(e, t) {
2025
+ return ie(t.type, Qa, e, t);
2026
+ }
2027
+ let Za = je;
2028
+ function Ja(e, t) {
2029
+ let { value: n, defaultValue: r, onChange: i, form: s, name: o, by: f = (O, C) => O === C, disabled: p = !1, __demoMode: b = !1, nullable: v = !1, multiple: m = !1, ...l } = e, [u = m ? [] : void 0, a] = jr(n, i, r), [c, d] = In(Xa, { dataRef: _n(), comboboxState: b ? 0 : 1, options: [], activeOptionIndex: null, activationTrigger: 1, labelId: null }), h = _(!1), I = _({ static: !1, hold: !1 }), w = _(null), g = _(null), R = _(null), E = _(null), j = P(typeof f == "string" ? (O, C) => {
2030
+ let $ = f;
2031
+ return O?.[$] === C?.[$];
2032
+ } : f), A = tt((O) => ie(T.mode, { 1: () => u.some((C) => j(C, O)), 0: () => j(u, O) }), [u]), T = fe(() => ({ ...c, optionsPropsRef: I, labelRef: w, inputRef: g, buttonRef: R, optionsRef: E, value: u, defaultValue: r, disabled: p, mode: m ? 1 : 0, get activeOptionIndex() {
2033
+ if (h.current && c.activeOptionIndex === null && c.options.length > 0) {
2034
+ let O = c.options.findIndex((C) => !C.dataRef.current.disabled);
2035
+ if (O !== -1)
2036
+ return O;
1890
2037
  }
1891
2038
  return c.activeOptionIndex;
1892
- }, compare: q, isSelected: M, nullable: v, __demoMode: b }), [u, r, p, h, v, b, c]), z = C(k.activeOptionIndex !== null ? k.options[k.activeOptionIndex] : null);
1893
- Z(() => {
1894
- let x = k.activeOptionIndex !== null ? k.options[k.activeOptionIndex] : null;
1895
- z.current !== x && (z.current = x);
1896
- }), J(() => {
1897
- c.dataRef.current = k;
1898
- }, [k]), Er([k.buttonRef, k.inputRef, k.optionsRef], () => A.closeCombobox(), k.comboboxState === 0);
1899
- let ie = re(() => ({ open: k.comboboxState === 0, disabled: p, activeIndex: k.activeOptionIndex, activeOption: k.activeOptionIndex === null ? null : k.options[k.activeOptionIndex].dataRef.current.value, value: u }), [k, p, u]), pe = E((x) => {
1900
- let I = k.options.find((D) => D.id === x);
1901
- I && R(I.dataRef.current.value);
1902
- }), _ = E(() => {
1903
- if (k.activeOptionIndex !== null) {
1904
- let { dataRef: x, id: I } = k.options[k.activeOptionIndex];
1905
- R(x.current.value), A.goToOption(U.Specific, I);
2039
+ }, compare: j, isSelected: A, nullable: v, __demoMode: b }), [u, r, p, m, v, b, c]), V = _(T.activeOptionIndex !== null ? T.options[T.activeOptionIndex] : null);
2040
+ Y(() => {
2041
+ let O = T.activeOptionIndex !== null ? T.options[T.activeOptionIndex] : null;
2042
+ V.current !== O && (V.current = O);
2043
+ }), ae(() => {
2044
+ c.dataRef.current = T;
2045
+ }, [T]), Lr([T.buttonRef, T.inputRef, T.optionsRef], () => q.closeCombobox(), T.comboboxState === 0);
2046
+ let te = fe(() => ({ open: T.comboboxState === 0, disabled: p, activeIndex: T.activeOptionIndex, activeOption: T.activeOptionIndex === null ? null : T.options[T.activeOptionIndex].dataRef.current.value, value: u }), [T, p, u]), G = P((O) => {
2047
+ let C = T.options.find(($) => $.id === O);
2048
+ C && J(C.dataRef.current.value);
2049
+ }), x = P(() => {
2050
+ if (T.activeOptionIndex !== null) {
2051
+ let { dataRef: O, id: C } = T.options[T.activeOptionIndex];
2052
+ J(O.current.value), q.goToOption(H.Specific, C);
1906
2053
  }
1907
- }), te = E(() => {
1908
- d({ type: 0 }), m.current = !0;
1909
- }), ee = E(() => {
1910
- d({ type: 1 }), m.current = !1;
1911
- }), ce = E((x, I, D) => (m.current = !1, x === U.Specific ? d({ type: 2, focus: U.Specific, id: I, trigger: D }) : d({ type: 2, focus: x, trigger: D }))), V = E((x, I) => (d({ type: 3, id: x, dataRef: I }), () => {
1912
- var D;
1913
- ((D = z.current) == null ? void 0 : D.id) === x && (m.current = !0), d({ type: 4, id: x });
1914
- })), T = E((x) => (d({ type: 5, id: x }), () => d({ type: 5, id: null }))), R = E((x) => X(k.mode, { 0() {
1915
- return s?.(x);
2054
+ }), Z = P(() => {
2055
+ d({ type: 0 }), h.current = !0;
2056
+ }), ne = P(() => {
2057
+ d({ type: 1 }), h.current = !1;
2058
+ }), le = P((O, C, $) => (h.current = !1, O === H.Specific ? d({ type: 2, focus: H.Specific, id: C, trigger: $ }) : d({ type: 2, focus: O, trigger: $ }))), M = P((O, C) => (d({ type: 3, id: O, dataRef: C }), () => {
2059
+ var $;
2060
+ (($ = V.current) == null ? void 0 : $.id) === O && (h.current = !0), d({ type: 4, id: O });
2061
+ })), oe = P((O) => (d({ type: 5, id: O }), () => d({ type: 5, id: null }))), J = P((O) => ie(T.mode, { 0() {
2062
+ return a?.(O);
1916
2063
  }, 1() {
1917
- let I = k.value.slice(), D = I.findIndex((he) => q(he, x));
1918
- return D === -1 ? I.push(x) : I.splice(D, 1), s?.(I);
1919
- } })), A = re(() => ({ onChange: R, registerOption: V, registerLabel: T, goToOption: ce, closeCombobox: ee, openCombobox: te, selectActiveOption: _, selectOption: pe }), []), oe = t === null ? {} : { ref: t }, ne = C(null), ae = Ne();
1920
- return Z(() => {
1921
- ne.current && r !== void 0 && ae.addEventListener(ne.current, "reset", () => {
1922
- s?.(r);
2064
+ let C = T.value.slice(), $ = C.findIndex((be) => j(be, O));
2065
+ return $ === -1 ? C.push(O) : C.splice($, 1), a?.(C);
2066
+ } })), q = fe(() => ({ onChange: J, registerOption: M, registerLabel: oe, goToOption: le, closeCombobox: ne, openCombobox: Z, selectActiveOption: x, selectOption: G }), []), ue = t === null ? {} : { ref: t }, se = _(null), re = Ve();
2067
+ return Y(() => {
2068
+ se.current && r !== void 0 && re.addEventListener(se.current, "reset", () => {
2069
+ a?.(r);
1923
2070
  });
1924
- }, [ne, s]), Y.createElement(Xt.Provider, { value: A }, Y.createElement(Zt.Provider, { value: k }, Y.createElement(Qt, { value: X(k.comboboxState, { 0: se.Open, 1: se.Closed }) }, o != null && u != null && Kt({ [o]: u }).map(([x, I], D) => Y.createElement(Rr, { features: Gt.Hidden, ref: D === 0 ? (he) => {
1925
- var Ae;
1926
- ne.current = (Ae = he?.closest("form")) != null ? Ae : null;
1927
- } : void 0, ...gt({ key: x, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: a, name: x, value: I }) })), me({ ourProps: oe, theirProps: l, slot: ie, defaultTag: Ua, name: "Combobox" }))));
1928
- }
1929
- let qa = "input";
1930
- function za(e, t) {
1931
- var n, r, i, a;
1932
- let o = Fe(), { id: f = `headlessui-combobox-input-${o}`, onChange: p, displayValue: b, type: v = "text", ...h } = e, l = Ze("Combobox.Input"), u = lt("Combobox.Input"), s = ye(l.inputRef, t), c = Ma(l.inputRef), d = C(!1), m = Ne(), O = E(() => {
1933
- u.onChange(null), l.optionsRef.current && (l.optionsRef.current.scrollTop = 0), u.goToOption(U.Nothing);
2071
+ }, [se, a]), ee.createElement(on.Provider, { value: q }, ee.createElement(an.Provider, { value: T }, ee.createElement(rn, { value: ie(T.comboboxState, { 0: pe.Open, 1: pe.Closed }) }, o != null && u != null && en({ [o]: u }).map(([O, C], $) => ee.createElement(Wr, { features: tn.Hidden, ref: $ === 0 ? (be) => {
2072
+ var Ce;
2073
+ se.current = (Ce = be?.closest("form")) != null ? Ce : null;
2074
+ } : void 0, ..._t({ key: O, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: s, name: O, value: C }) })), ke({ ourProps: ue, theirProps: l, slot: te, defaultTag: Za, name: "Combobox" }))));
2075
+ }
2076
+ let el = "input";
2077
+ function tl(e, t) {
2078
+ var n, r, i, s;
2079
+ let o = Be(), { id: f = `headlessui-combobox-input-${o}`, onChange: p, displayValue: b, type: v = "text", ...m } = e, l = at("Combobox.Input"), u = pt("Combobox.Input"), a = Ee(l.inputRef, t), c = za(l.inputRef), d = _(!1), h = Ve(), I = P(() => {
2080
+ u.onChange(null), l.optionsRef.current && (l.optionsRef.current.scrollTop = 0), u.goToOption(H.Nothing);
1934
2081
  }), w = function() {
1935
- var _;
1936
- return typeof b == "function" && l.value !== void 0 ? (_ = b(l.value)) != null ? _ : "" : typeof l.value == "string" ? l.value : "";
2082
+ var x;
2083
+ return typeof b == "function" && l.value !== void 0 ? (x = b(l.value)) != null ? x : "" : typeof l.value == "string" ? l.value : "";
1937
2084
  }();
1938
- hn(([_, te], [ee, ce]) => {
2085
+ yn(([x, Z], [ne, le]) => {
1939
2086
  if (d.current)
1940
2087
  return;
1941
- let V = l.inputRef.current;
1942
- V && ((ce === 0 && te === 1 || _ !== ee) && (V.value = _), requestAnimationFrame(() => {
1943
- if (d.current || !V || c?.activeElement !== V)
2088
+ let M = l.inputRef.current;
2089
+ M && ((le === 0 && Z === 1 || x !== ne) && (M.value = x), requestAnimationFrame(() => {
2090
+ if (d.current || !M || c?.activeElement !== M)
1944
2091
  return;
1945
- let { selectionStart: T, selectionEnd: R } = V;
1946
- Math.abs((R ?? 0) - (T ?? 0)) === 0 && T === 0 && V.setSelectionRange(V.value.length, V.value.length);
2092
+ let { selectionStart: oe, selectionEnd: J } = M;
2093
+ Math.abs((J ?? 0) - (oe ?? 0)) === 0 && oe === 0 && M.setSelectionRange(M.value.length, M.value.length);
1947
2094
  }));
1948
- }, [w, l.comboboxState, c]), hn(([_], [te]) => {
1949
- if (_ === 0 && te === 1) {
2095
+ }, [w, l.comboboxState, c]), yn(([x], [Z]) => {
2096
+ if (x === 0 && Z === 1) {
1950
2097
  if (d.current)
1951
2098
  return;
1952
- let ee = l.inputRef.current;
1953
- if (!ee)
2099
+ let ne = l.inputRef.current;
2100
+ if (!ne)
1954
2101
  return;
1955
- let ce = ee.value, { selectionStart: V, selectionEnd: T, selectionDirection: R } = ee;
1956
- ee.value = "", ee.value = ce, R !== null ? ee.setSelectionRange(V, T, R) : ee.setSelectionRange(V, T);
2102
+ let le = ne.value, { selectionStart: M, selectionEnd: oe, selectionDirection: J } = ne;
2103
+ ne.value = "", ne.value = le, J !== null ? ne.setSelectionRange(M, oe, J) : ne.setSelectionRange(M, oe);
1957
2104
  }
1958
2105
  }, [l.comboboxState]);
1959
- let g = C(!1), W = E(() => {
2106
+ let g = _(!1), R = P(() => {
1960
2107
  g.current = !0;
1961
- }), L = E(() => {
1962
- m.nextFrame(() => {
2108
+ }), E = P(() => {
2109
+ h.nextFrame(() => {
1963
2110
  g.current = !1;
1964
2111
  });
1965
- }), q = E((_) => {
1966
- switch (d.current = !0, _.key) {
1967
- case j.Enter:
2112
+ }), j = P((x) => {
2113
+ switch (d.current = !0, x.key) {
2114
+ case U.Enter:
1968
2115
  if (d.current = !1, l.comboboxState !== 0 || g.current)
1969
2116
  return;
1970
- if (_.preventDefault(), _.stopPropagation(), l.activeOptionIndex === null) {
2117
+ if (x.preventDefault(), x.stopPropagation(), l.activeOptionIndex === null) {
1971
2118
  u.closeCombobox();
1972
2119
  return;
1973
2120
  }
1974
2121
  u.selectActiveOption(), l.mode === 0 && u.closeCombobox();
1975
2122
  break;
1976
- case j.ArrowDown:
1977
- return d.current = !1, _.preventDefault(), _.stopPropagation(), X(l.comboboxState, { 0: () => {
1978
- u.goToOption(U.Next);
2123
+ case U.ArrowDown:
2124
+ return d.current = !1, x.preventDefault(), x.stopPropagation(), ie(l.comboboxState, { 0: () => {
2125
+ u.goToOption(H.Next);
1979
2126
  }, 1: () => {
1980
2127
  u.openCombobox();
1981
2128
  } });
1982
- case j.ArrowUp:
1983
- return d.current = !1, _.preventDefault(), _.stopPropagation(), X(l.comboboxState, { 0: () => {
1984
- u.goToOption(U.Previous);
2129
+ case U.ArrowUp:
2130
+ return d.current = !1, x.preventDefault(), x.stopPropagation(), ie(l.comboboxState, { 0: () => {
2131
+ u.goToOption(H.Previous);
1985
2132
  }, 1: () => {
1986
- u.openCombobox(), m.nextFrame(() => {
1987
- l.value || u.goToOption(U.Last);
2133
+ u.openCombobox(), h.nextFrame(() => {
2134
+ l.value || u.goToOption(H.Last);
1988
2135
  });
1989
2136
  } });
1990
- case j.Home:
1991
- if (_.shiftKey)
2137
+ case U.Home:
2138
+ if (x.shiftKey)
1992
2139
  break;
1993
- return d.current = !1, _.preventDefault(), _.stopPropagation(), u.goToOption(U.First);
1994
- case j.PageUp:
1995
- return d.current = !1, _.preventDefault(), _.stopPropagation(), u.goToOption(U.First);
1996
- case j.End:
1997
- if (_.shiftKey)
2140
+ return d.current = !1, x.preventDefault(), x.stopPropagation(), u.goToOption(H.First);
2141
+ case U.PageUp:
2142
+ return d.current = !1, x.preventDefault(), x.stopPropagation(), u.goToOption(H.First);
2143
+ case U.End:
2144
+ if (x.shiftKey)
1998
2145
  break;
1999
- return d.current = !1, _.preventDefault(), _.stopPropagation(), u.goToOption(U.Last);
2000
- case j.PageDown:
2001
- return d.current = !1, _.preventDefault(), _.stopPropagation(), u.goToOption(U.Last);
2002
- case j.Escape:
2003
- return d.current = !1, l.comboboxState !== 0 ? void 0 : (_.preventDefault(), l.optionsRef.current && !l.optionsPropsRef.current.static && _.stopPropagation(), l.nullable && l.mode === 0 && l.value === null && O(), u.closeCombobox());
2004
- case j.Tab:
2146
+ return d.current = !1, x.preventDefault(), x.stopPropagation(), u.goToOption(H.Last);
2147
+ case U.PageDown:
2148
+ return d.current = !1, x.preventDefault(), x.stopPropagation(), u.goToOption(H.Last);
2149
+ case U.Escape:
2150
+ return d.current = !1, l.comboboxState !== 0 ? void 0 : (x.preventDefault(), l.optionsRef.current && !l.optionsPropsRef.current.static && x.stopPropagation(), l.nullable && l.mode === 0 && l.value === null && I(), u.closeCombobox());
2151
+ case U.Tab:
2005
2152
  if (d.current = !1, l.comboboxState !== 0)
2006
2153
  return;
2007
2154
  l.mode === 0 && u.selectActiveOption(), u.closeCombobox();
2008
2155
  break;
2009
2156
  }
2010
- }), M = E((_) => {
2011
- p?.(_), l.nullable && l.mode === 0 && _.target.value === "" && O(), u.openCombobox();
2012
- }), k = E(() => {
2157
+ }), A = P((x) => {
2158
+ p?.(x), l.nullable && l.mode === 0 && x.target.value === "" && I(), u.openCombobox();
2159
+ }), T = P(() => {
2013
2160
  d.current = !1;
2014
- }), z = at(() => {
2161
+ }), V = ft(() => {
2015
2162
  if (l.labelId)
2016
2163
  return [l.labelId].join(" ");
2017
- }, [l.labelId]), ie = re(() => ({ open: l.comboboxState === 0, disabled: l.disabled }), [l]), pe = { ref: s, id: f, role: "combobox", type: v, "aria-controls": (n = l.optionsRef.current) == null ? void 0 : n.id, "aria-expanded": l.comboboxState === 0, "aria-activedescendant": l.activeOptionIndex === null || (r = l.options[l.activeOptionIndex]) == null ? void 0 : r.id, "aria-labelledby": z, "aria-autocomplete": "list", defaultValue: (a = (i = e.defaultValue) != null ? i : l.defaultValue !== void 0 ? b?.(l.defaultValue) : null) != null ? a : l.defaultValue, disabled: l.disabled, onCompositionStart: W, onCompositionEnd: L, onKeyDown: q, onChange: M, onBlur: k };
2018
- return me({ ourProps: pe, theirProps: h, slot: ie, defaultTag: qa, name: "Combobox.Input" });
2164
+ }, [l.labelId]), te = fe(() => ({ open: l.comboboxState === 0, disabled: l.disabled }), [l]), G = { ref: a, id: f, role: "combobox", type: v, "aria-controls": (n = l.optionsRef.current) == null ? void 0 : n.id, "aria-expanded": l.comboboxState === 0, "aria-activedescendant": l.activeOptionIndex === null || (r = l.options[l.activeOptionIndex]) == null ? void 0 : r.id, "aria-labelledby": V, "aria-autocomplete": "list", defaultValue: (s = (i = e.defaultValue) != null ? i : l.defaultValue !== void 0 ? b?.(l.defaultValue) : null) != null ? s : l.defaultValue, disabled: l.disabled, onCompositionStart: R, onCompositionEnd: E, onKeyDown: j, onChange: A, onBlur: T };
2165
+ return ke({ ourProps: G, theirProps: m, slot: te, defaultTag: el, name: "Combobox.Input" });
2019
2166
  }
2020
- let Ka = "button";
2021
- function Ga(e, t) {
2167
+ let nl = "button";
2168
+ function rl(e, t) {
2022
2169
  var n;
2023
- let r = Ze("Combobox.Button"), i = lt("Combobox.Button"), a = ye(r.buttonRef, t), o = Fe(), { id: f = `headlessui-combobox-button-${o}`, ...p } = e, b = Ne(), v = E((c) => {
2170
+ let r = at("Combobox.Button"), i = pt("Combobox.Button"), s = Ee(r.buttonRef, t), o = Be(), { id: f = `headlessui-combobox-button-${o}`, ...p } = e, b = Ve(), v = P((c) => {
2024
2171
  switch (c.key) {
2025
- case j.ArrowDown:
2172
+ case U.ArrowDown:
2026
2173
  return c.preventDefault(), c.stopPropagation(), r.comboboxState === 1 && i.openCombobox(), b.nextFrame(() => {
2027
2174
  var d;
2028
2175
  return (d = r.inputRef.current) == null ? void 0 : d.focus({ preventScroll: !0 });
2029
2176
  });
2030
- case j.ArrowUp:
2177
+ case U.ArrowUp:
2031
2178
  return c.preventDefault(), c.stopPropagation(), r.comboboxState === 1 && (i.openCombobox(), b.nextFrame(() => {
2032
- r.value || i.goToOption(U.Last);
2179
+ r.value || i.goToOption(H.Last);
2033
2180
  })), b.nextFrame(() => {
2034
2181
  var d;
2035
2182
  return (d = r.inputRef.current) == null ? void 0 : d.focus({ preventScroll: !0 });
2036
2183
  });
2037
- case j.Escape:
2184
+ case U.Escape:
2038
2185
  return r.comboboxState !== 0 ? void 0 : (c.preventDefault(), r.optionsRef.current && !r.optionsPropsRef.current.static && c.stopPropagation(), i.closeCombobox(), b.nextFrame(() => {
2039
2186
  var d;
2040
2187
  return (d = r.inputRef.current) == null ? void 0 : d.focus({ preventScroll: !0 });
@@ -2042,145 +2189,145 @@ function Ga(e, t) {
2042
2189
  default:
2043
2190
  return;
2044
2191
  }
2045
- }), h = E((c) => {
2046
- if (Pr(c.currentTarget))
2192
+ }), m = P((c) => {
2193
+ if (Dr(c.currentTarget))
2047
2194
  return c.preventDefault();
2048
2195
  r.comboboxState === 0 ? i.closeCombobox() : (c.preventDefault(), i.openCombobox()), b.nextFrame(() => {
2049
2196
  var d;
2050
2197
  return (d = r.inputRef.current) == null ? void 0 : d.focus({ preventScroll: !0 });
2051
2198
  });
2052
- }), l = at(() => {
2199
+ }), l = ft(() => {
2053
2200
  if (r.labelId)
2054
2201
  return [r.labelId, f].join(" ");
2055
- }, [r.labelId, f]), u = re(() => ({ open: r.comboboxState === 0, disabled: r.disabled, value: r.value }), [r]), s = { ref: a, id: f, type: Ir(e, r.buttonRef), tabIndex: -1, "aria-haspopup": "listbox", "aria-controls": (n = r.optionsRef.current) == null ? void 0 : n.id, "aria-expanded": r.comboboxState === 0, "aria-labelledby": l, disabled: r.disabled, onClick: h, onKeyDown: v };
2056
- return me({ ourProps: s, theirProps: p, slot: u, defaultTag: Ka, name: "Combobox.Button" });
2057
- }
2058
- let Ya = "label";
2059
- function Qa(e, t) {
2060
- let n = Fe(), { id: r = `headlessui-combobox-label-${n}`, ...i } = e, a = Ze("Combobox.Label"), o = lt("Combobox.Label"), f = ye(a.labelRef, t);
2061
- J(() => o.registerLabel(r), [r]);
2062
- let p = E(() => {
2202
+ }, [r.labelId, f]), u = fe(() => ({ open: r.comboboxState === 0, disabled: r.disabled, value: r.value }), [r]), a = { ref: s, id: f, type: Nr(e, r.buttonRef), tabIndex: -1, "aria-haspopup": "listbox", "aria-controls": (n = r.optionsRef.current) == null ? void 0 : n.id, "aria-expanded": r.comboboxState === 0, "aria-labelledby": l, disabled: r.disabled, onClick: m, onKeyDown: v };
2203
+ return ke({ ourProps: a, theirProps: p, slot: u, defaultTag: nl, name: "Combobox.Button" });
2204
+ }
2205
+ let il = "label";
2206
+ function ol(e, t) {
2207
+ let n = Be(), { id: r = `headlessui-combobox-label-${n}`, ...i } = e, s = at("Combobox.Label"), o = pt("Combobox.Label"), f = Ee(s.labelRef, t);
2208
+ ae(() => o.registerLabel(r), [r]);
2209
+ let p = P(() => {
2063
2210
  var v;
2064
- return (v = a.inputRef.current) == null ? void 0 : v.focus({ preventScroll: !0 });
2065
- }), b = re(() => ({ open: a.comboboxState === 0, disabled: a.disabled }), [a]);
2066
- return me({ ourProps: { ref: f, id: r, onClick: p }, theirProps: i, slot: b, defaultTag: Ya, name: "Combobox.Label" });
2067
- }
2068
- let Xa = "ul", Za = Ye.RenderStrategy | Ye.Static;
2069
- function Ja(e, t) {
2070
- let n = Fe(), { id: r = `headlessui-combobox-options-${n}`, hold: i = !1, ...a } = e, o = Ze("Combobox.Options"), f = ye(o.optionsRef, t), p = St(), b = (() => p !== null ? (p & se.Open) === se.Open : o.comboboxState === 0)();
2071
- J(() => {
2211
+ return (v = s.inputRef.current) == null ? void 0 : v.focus({ preventScroll: !0 });
2212
+ }), b = fe(() => ({ open: s.comboboxState === 0, disabled: s.disabled }), [s]);
2213
+ return ke({ ourProps: { ref: f, id: r, onClick: p }, theirProps: i, slot: b, defaultTag: il, name: "Combobox.Label" });
2214
+ }
2215
+ let al = "ul", ll = rt.RenderStrategy | rt.Static;
2216
+ function sl(e, t) {
2217
+ let n = Be(), { id: r = `headlessui-combobox-options-${n}`, hold: i = !1, ...s } = e, o = at("Combobox.Options"), f = Ee(o.optionsRef, t), p = Lt(), b = (() => p !== null ? (p & pe.Open) === pe.Open : o.comboboxState === 0)();
2218
+ ae(() => {
2072
2219
  var u;
2073
2220
  o.optionsPropsRef.current.static = (u = e.static) != null ? u : !1;
2074
- }, [o.optionsPropsRef, e.static]), J(() => {
2221
+ }, [o.optionsPropsRef, e.static]), ae(() => {
2075
2222
  o.optionsPropsRef.current.hold = i;
2076
- }, [o.optionsPropsRef, i]), Ia({ container: o.optionsRef.current, enabled: o.comboboxState === 0, accept(u) {
2223
+ }, [o.optionsPropsRef, i]), Da({ container: o.optionsRef.current, enabled: o.comboboxState === 0, accept(u) {
2077
2224
  return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
2078
2225
  }, walk(u) {
2079
2226
  u.setAttribute("role", "none");
2080
2227
  } });
2081
- let v = at(() => {
2082
- var u, s;
2083
- return (s = o.labelId) != null ? s : (u = o.buttonRef.current) == null ? void 0 : u.id;
2084
- }, [o.labelId, o.buttonRef.current]), h = re(() => ({ open: o.comboboxState === 0 }), [o]), l = { "aria-labelledby": v, role: "listbox", "aria-multiselectable": o.mode === 1 ? !0 : void 0, id: r, ref: f };
2085
- return me({ ourProps: l, theirProps: a, slot: h, defaultTag: Xa, features: Za, visible: b, name: "Combobox.Options" });
2086
- }
2087
- let el = "li";
2088
- function tl(e, t) {
2228
+ let v = ft(() => {
2229
+ var u, a;
2230
+ return (a = o.labelId) != null ? a : (u = o.buttonRef.current) == null ? void 0 : u.id;
2231
+ }, [o.labelId, o.buttonRef.current]), m = fe(() => ({ open: o.comboboxState === 0 }), [o]), l = { "aria-labelledby": v, role: "listbox", "aria-multiselectable": o.mode === 1 ? !0 : void 0, id: r, ref: f };
2232
+ return ke({ ourProps: l, theirProps: s, slot: m, defaultTag: al, features: ll, visible: b, name: "Combobox.Options" });
2233
+ }
2234
+ let cl = "li";
2235
+ function ul(e, t) {
2089
2236
  var n, r;
2090
- let i = Fe(), { id: a = `headlessui-combobox-option-${i}`, disabled: o = !1, value: f, ...p } = e, b = Ze("Combobox.Option"), v = lt("Combobox.Option"), h = b.activeOptionIndex !== null ? b.options[b.activeOptionIndex].id === a : !1, l = b.isSelected(f), u = C(null), s = Se({ disabled: o, value: f, domRef: u, textValue: (r = (n = u.current) == null ? void 0 : n.textContent) == null ? void 0 : r.toLowerCase() }), c = ye(t, u), d = E(() => v.selectOption(a));
2091
- J(() => v.registerOption(a, s), [s, a]);
2092
- let m = C(!b.__demoMode);
2093
- J(() => {
2237
+ let i = Be(), { id: s = `headlessui-combobox-option-${i}`, disabled: o = !1, value: f, ...p } = e, b = at("Combobox.Option"), v = pt("Combobox.Option"), m = b.activeOptionIndex !== null ? b.options[b.activeOptionIndex].id === s : !1, l = b.isSelected(f), u = _(null), a = _e({ disabled: o, value: f, domRef: u, textValue: (r = (n = u.current) == null ? void 0 : n.textContent) == null ? void 0 : r.toLowerCase() }), c = Ee(t, u), d = P(() => v.selectOption(s));
2238
+ ae(() => v.registerOption(s, a), [a, s]);
2239
+ let h = _(!b.__demoMode);
2240
+ ae(() => {
2094
2241
  if (!b.__demoMode)
2095
2242
  return;
2096
- let k = _e();
2097
- return k.requestAnimationFrame(() => {
2098
- m.current = !0;
2099
- }), k.dispose;
2100
- }, []), J(() => {
2101
- if (b.comboboxState !== 0 || !h || !m.current || b.activationTrigger === 0)
2243
+ let T = Fe();
2244
+ return T.requestAnimationFrame(() => {
2245
+ h.current = !0;
2246
+ }), T.dispose;
2247
+ }, []), ae(() => {
2248
+ if (b.comboboxState !== 0 || !m || !h.current || b.activationTrigger === 0)
2102
2249
  return;
2103
- let k = _e();
2104
- return k.requestAnimationFrame(() => {
2105
- var z, ie;
2106
- (ie = (z = u.current) == null ? void 0 : z.scrollIntoView) == null || ie.call(z, { block: "nearest" });
2107
- }), k.dispose;
2108
- }, [u, h, b.comboboxState, b.activationTrigger, b.activeOptionIndex]);
2109
- let O = E((k) => {
2250
+ let T = Fe();
2251
+ return T.requestAnimationFrame(() => {
2252
+ var V, te;
2253
+ (te = (V = u.current) == null ? void 0 : V.scrollIntoView) == null || te.call(V, { block: "nearest" });
2254
+ }), T.dispose;
2255
+ }, [u, m, b.comboboxState, b.activationTrigger, b.activeOptionIndex]);
2256
+ let I = P((T) => {
2110
2257
  if (o)
2111
- return k.preventDefault();
2112
- d(), b.mode === 0 && v.closeCombobox(), Aa() || requestAnimationFrame(() => {
2113
- var z;
2114
- return (z = b.inputRef.current) == null ? void 0 : z.focus();
2258
+ return T.preventDefault();
2259
+ d(), b.mode === 0 && v.closeCombobox(), Ha() || requestAnimationFrame(() => {
2260
+ var V;
2261
+ return (V = b.inputRef.current) == null ? void 0 : V.focus();
2115
2262
  });
2116
- }), w = E(() => {
2263
+ }), w = P(() => {
2117
2264
  if (o)
2118
- return v.goToOption(U.Nothing);
2119
- v.goToOption(U.Specific, a);
2120
- }), g = Ar(), W = E((k) => g.update(k)), L = E((k) => {
2121
- g.wasMoved(k) && (o || h || v.goToOption(U.Specific, a, 0));
2122
- }), q = E((k) => {
2123
- g.wasMoved(k) && (o || h && (b.optionsPropsRef.current.hold || v.goToOption(U.Nothing)));
2124
- }), M = re(() => ({ active: h, selected: l, disabled: o }), [h, l, o]);
2125
- return me({ ourProps: { id: a, ref: c, role: "option", tabIndex: o === !0 ? void 0 : -1, "aria-disabled": o === !0 ? !0 : void 0, "aria-selected": l, disabled: void 0, onClick: O, onFocus: w, onPointerEnter: W, onMouseEnter: W, onPointerMove: L, onMouseMove: L, onPointerLeave: q, onMouseLeave: q }, theirProps: p, slot: M, defaultTag: el, name: "Combobox.Option" });
2126
- }
2127
- let nl = be(Ha), rl = be(Ga), il = be(za), ol = be(Qa), al = be(Ja), ll = be(tl), rt = Object.assign(nl, { Input: il, Button: rl, Label: ol, Options: al, Option: ll });
2128
- function Jt() {
2129
- let e = C(!1);
2130
- return J(() => (e.current = !0, () => {
2265
+ return v.goToOption(H.Nothing);
2266
+ v.goToOption(H.Specific, s);
2267
+ }), g = Vr(), R = P((T) => g.update(T)), E = P((T) => {
2268
+ g.wasMoved(T) && (o || m || v.goToOption(H.Specific, s, 0));
2269
+ }), j = P((T) => {
2270
+ g.wasMoved(T) && (o || m && (b.optionsPropsRef.current.hold || v.goToOption(H.Nothing)));
2271
+ }), A = fe(() => ({ active: m, selected: l, disabled: o }), [m, l, o]);
2272
+ return ke({ ourProps: { id: s, ref: c, role: "option", tabIndex: o === !0 ? void 0 : -1, "aria-disabled": o === !0 ? !0 : void 0, "aria-selected": l, disabled: void 0, onClick: I, onFocus: w, onPointerEnter: R, onMouseEnter: R, onPointerMove: E, onMouseMove: E, onPointerLeave: j, onMouseLeave: j }, theirProps: p, slot: A, defaultTag: cl, name: "Combobox.Option" });
2273
+ }
2274
+ let dl = ge(Ja), fl = ge(rl), pl = ge(tl), bl = ge(ol), vl = ge(sl), ml = ge(ul), ct = Object.assign(dl, { Input: pl, Button: fl, Label: bl, Options: vl, Option: ml });
2275
+ function ln() {
2276
+ let e = _(!1);
2277
+ return ae(() => (e.current = !0, () => {
2131
2278
  e.current = !1;
2132
2279
  }), []), e;
2133
2280
  }
2134
- let gn = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
2135
- function xn(e) {
2281
+ let On = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
2282
+ function Sn(e) {
2136
2283
  var t, n;
2137
2284
  let r = (t = e.innerText) != null ? t : "", i = e.cloneNode(!0);
2138
2285
  if (!(i instanceof HTMLElement))
2139
2286
  return r;
2140
- let a = !1;
2287
+ let s = !1;
2141
2288
  for (let f of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
2142
- f.remove(), a = !0;
2143
- let o = a ? (n = i.innerText) != null ? n : "" : r;
2144
- return gn.test(o) && (o = o.replace(gn, "")), o;
2289
+ f.remove(), s = !0;
2290
+ let o = s ? (n = i.innerText) != null ? n : "" : r;
2291
+ return On.test(o) && (o = o.replace(On, "")), o;
2145
2292
  }
2146
- function sl(e) {
2293
+ function hl(e) {
2147
2294
  let t = e.getAttribute("aria-label");
2148
2295
  if (typeof t == "string")
2149
2296
  return t.trim();
2150
2297
  let n = e.getAttribute("aria-labelledby");
2151
2298
  if (n) {
2152
2299
  let r = n.split(" ").map((i) => {
2153
- let a = document.getElementById(i);
2154
- if (a) {
2155
- let o = a.getAttribute("aria-label");
2156
- return typeof o == "string" ? o.trim() : xn(a).trim();
2300
+ let s = document.getElementById(i);
2301
+ if (s) {
2302
+ let o = s.getAttribute("aria-label");
2303
+ return typeof o == "string" ? o.trim() : Sn(s).trim();
2157
2304
  }
2158
2305
  return null;
2159
2306
  }).filter(Boolean);
2160
2307
  if (r.length > 0)
2161
2308
  return r.join(", ");
2162
2309
  }
2163
- return xn(e).trim();
2310
+ return Sn(e).trim();
2164
2311
  }
2165
- function cl(e) {
2166
- let t = C(""), n = C("");
2167
- return E(() => {
2312
+ function wl(e) {
2313
+ let t = _(""), n = _("");
2314
+ return P(() => {
2168
2315
  let r = e.current;
2169
2316
  if (!r)
2170
2317
  return "";
2171
2318
  let i = r.innerText;
2172
2319
  if (t.current === i)
2173
2320
  return n.current;
2174
- let a = sl(r).trim().toLowerCase();
2175
- return t.current = i, n.current = a, a;
2321
+ let s = hl(r).trim().toLowerCase();
2322
+ return t.current = i, n.current = s, s;
2176
2323
  });
2177
2324
  }
2178
- var ul = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(ul || {}), dl = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(dl || {}), fl = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(fl || {}), pl = ((e) => (e[e.OpenListbox = 0] = "OpenListbox", e[e.CloseListbox = 1] = "CloseListbox", e[e.GoToOption = 2] = "GoToOption", e[e.Search = 3] = "Search", e[e.ClearSearch = 4] = "ClearSearch", e[e.RegisterOption = 5] = "RegisterOption", e[e.UnregisterOption = 6] = "UnregisterOption", e[e.RegisterLabel = 7] = "RegisterLabel", e))(pl || {});
2179
- function Rt(e, t = (n) => n) {
2180
- let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, r = Tr(t(e.options.slice()), (a) => a.dataRef.current.domRef.current), i = n ? r.indexOf(n) : null;
2325
+ var gl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(gl || {}), xl = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(xl || {}), yl = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(yl || {}), kl = ((e) => (e[e.OpenListbox = 0] = "OpenListbox", e[e.CloseListbox = 1] = "CloseListbox", e[e.GoToOption = 2] = "GoToOption", e[e.Search = 3] = "Search", e[e.ClearSearch = 4] = "ClearSearch", e[e.RegisterOption = 5] = "RegisterOption", e[e.UnregisterOption = 6] = "UnregisterOption", e[e.RegisterLabel = 7] = "RegisterLabel", e))(kl || {});
2326
+ function jt(e, t = (n) => n) {
2327
+ let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, r = Rr(t(e.options.slice()), (s) => s.dataRef.current.domRef.current), i = n ? r.indexOf(n) : null;
2181
2328
  return i === -1 && (i = null), { options: r, activeOptionIndex: i };
2182
2329
  }
2183
- let bl = { 1(e) {
2330
+ let Ol = { 1(e) {
2184
2331
  return e.dataRef.current.disabled || e.listboxState === 1 ? e : { ...e, activeOptionIndex: null, listboxState: 1 };
2185
2332
  }, 0(e) {
2186
2333
  if (e.dataRef.current.disabled || e.listboxState === 0)
@@ -2191,7 +2338,7 @@ let bl = { 1(e) {
2191
2338
  var n;
2192
2339
  if (e.dataRef.current.disabled || e.listboxState === 1)
2193
2340
  return e;
2194
- let r = Rt(e), i = _r(t, { resolveItems: () => r.options, resolveActiveIndex: () => r.activeOptionIndex, resolveId: (a) => a.id, resolveDisabled: (a) => a.dataRef.current.disabled });
2341
+ let r = jt(e), i = Ar(t, { resolveItems: () => r.options, resolveActiveIndex: () => r.activeOptionIndex, resolveId: (s) => s.id, resolveDisabled: (s) => s.dataRef.current.disabled });
2195
2342
  return { ...e, ...r, searchQuery: "", activeOptionIndex: i, activationTrigger: (n = t.trigger) != null ? n : 1 };
2196
2343
  }, 3: (e, t) => {
2197
2344
  if (e.dataRef.current.disabled || e.listboxState === 1)
@@ -2199,242 +2346,242 @@ let bl = { 1(e) {
2199
2346
  let n = e.searchQuery !== "" ? 0 : 1, r = e.searchQuery + t.value.toLowerCase(), i = (e.activeOptionIndex !== null ? e.options.slice(e.activeOptionIndex + n).concat(e.options.slice(0, e.activeOptionIndex + n)) : e.options).find((o) => {
2200
2347
  var f;
2201
2348
  return !o.dataRef.current.disabled && ((f = o.dataRef.current.textValue) == null ? void 0 : f.startsWith(r));
2202
- }), a = i ? e.options.indexOf(i) : -1;
2203
- return a === -1 || a === e.activeOptionIndex ? { ...e, searchQuery: r } : { ...e, searchQuery: r, activeOptionIndex: a, activationTrigger: 1 };
2349
+ }), s = i ? e.options.indexOf(i) : -1;
2350
+ return s === -1 || s === e.activeOptionIndex ? { ...e, searchQuery: r } : { ...e, searchQuery: r, activeOptionIndex: s, activationTrigger: 1 };
2204
2351
  }, 4(e) {
2205
2352
  return e.dataRef.current.disabled || e.listboxState === 1 || e.searchQuery === "" ? e : { ...e, searchQuery: "" };
2206
2353
  }, 5: (e, t) => {
2207
- let n = { id: t.id, dataRef: t.dataRef }, r = Rt(e, (i) => [...i, n]);
2354
+ let n = { id: t.id, dataRef: t.dataRef }, r = jt(e, (i) => [...i, n]);
2208
2355
  return e.activeOptionIndex === null && e.dataRef.current.isSelected(t.dataRef.current.value) && (r.activeOptionIndex = r.options.indexOf(n)), { ...e, ...r };
2209
2356
  }, 6: (e, t) => {
2210
- let n = Rt(e, (r) => {
2211
- let i = r.findIndex((a) => a.id === t.id);
2357
+ let n = jt(e, (r) => {
2358
+ let i = r.findIndex((s) => s.id === t.id);
2212
2359
  return i !== -1 && r.splice(i, 1), r;
2213
2360
  });
2214
2361
  return { ...e, ...n, activationTrigger: 1 };
2215
- }, 7: (e, t) => ({ ...e, labelId: t.id }) }, en = He(null);
2216
- en.displayName = "ListboxActionsContext";
2217
- function st(e) {
2218
- let t = Ve(en);
2362
+ }, 7: (e, t) => ({ ...e, labelId: t.id }) }, sn = Je(null);
2363
+ sn.displayName = "ListboxActionsContext";
2364
+ function bt(e) {
2365
+ let t = Ye(sn);
2219
2366
  if (t === null) {
2220
2367
  let n = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
2221
- throw Error.captureStackTrace && Error.captureStackTrace(n, st), n;
2368
+ throw Error.captureStackTrace && Error.captureStackTrace(n, bt), n;
2222
2369
  }
2223
2370
  return t;
2224
2371
  }
2225
- let tn = He(null);
2226
- tn.displayName = "ListboxDataContext";
2227
- function ct(e) {
2228
- let t = Ve(tn);
2372
+ let cn = Je(null);
2373
+ cn.displayName = "ListboxDataContext";
2374
+ function vt(e) {
2375
+ let t = Ye(cn);
2229
2376
  if (t === null) {
2230
2377
  let n = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
2231
- throw Error.captureStackTrace && Error.captureStackTrace(n, ct), n;
2378
+ throw Error.captureStackTrace && Error.captureStackTrace(n, vt), n;
2232
2379
  }
2233
2380
  return t;
2234
2381
  }
2235
- function vl(e, t) {
2236
- return X(t.type, bl, e, t);
2382
+ function Sl(e, t) {
2383
+ return ie(t.type, Ol, e, t);
2237
2384
  }
2238
- let ml = Le;
2239
- function hl(e, t) {
2240
- let { value: n, defaultValue: r, form: i, name: a, onChange: o, by: f = (x, I) => x === I, disabled: p = !1, horizontal: b = !1, multiple: v = !1, ...h } = e;
2385
+ let Tl = je;
2386
+ function El(e, t) {
2387
+ let { value: n, defaultValue: r, form: i, name: s, onChange: o, by: f = (O, C) => O === C, disabled: p = !1, horizontal: b = !1, multiple: v = !1, ...m } = e;
2241
2388
  const l = b ? "horizontal" : "vertical";
2242
- let u = ye(t), [s = v ? [] : void 0, c] = Fr(n, o, r), [d, m] = Sn(vl, { dataRef: kn(), listboxState: 1, options: [], searchQuery: "", labelId: null, activeOptionIndex: null, activationTrigger: 1 }), O = C({ static: !1, hold: !1 }), w = C(null), g = C(null), W = C(null), L = E(typeof f == "string" ? (x, I) => {
2243
- let D = f;
2244
- return x?.[D] === I?.[D];
2245
- } : f), q = Ke((x) => X(M.mode, { 1: () => s.some((I) => L(I, x)), 0: () => L(s, x) }), [s]), M = re(() => ({ ...d, value: s, disabled: p, mode: v ? 1 : 0, orientation: l, compare: L, isSelected: q, optionsPropsRef: O, labelRef: w, buttonRef: g, optionsRef: W }), [s, p, v, d]);
2246
- J(() => {
2247
- d.dataRef.current = M;
2248
- }, [M]), Er([M.buttonRef, M.optionsRef], (x, I) => {
2249
- var D;
2250
- m({ type: 1 }), kr(I, zt.Loose) || (x.preventDefault(), (D = M.buttonRef.current) == null || D.focus());
2251
- }, M.listboxState === 0);
2252
- let k = re(() => ({ open: M.listboxState === 0, disabled: p, value: s }), [M, p, s]), z = E((x) => {
2253
- let I = M.options.find((D) => D.id === x);
2254
- I && V(I.dataRef.current.value);
2255
- }), ie = E(() => {
2256
- if (M.activeOptionIndex !== null) {
2257
- let { dataRef: x, id: I } = M.options[M.activeOptionIndex];
2258
- V(x.current.value), m({ type: 2, focus: U.Specific, id: I });
2389
+ let u = Ee(t), [a = v ? [] : void 0, c] = jr(n, o, r), [d, h] = In(Sl, { dataRef: _n(), listboxState: 1, options: [], searchQuery: "", labelId: null, activeOptionIndex: null, activationTrigger: 1 }), I = _({ static: !1, hold: !1 }), w = _(null), g = _(null), R = _(null), E = P(typeof f == "string" ? (O, C) => {
2390
+ let $ = f;
2391
+ return O?.[$] === C?.[$];
2392
+ } : f), j = tt((O) => ie(A.mode, { 1: () => a.some((C) => E(C, O)), 0: () => E(a, O) }), [a]), A = fe(() => ({ ...d, value: a, disabled: p, mode: v ? 1 : 0, orientation: l, compare: E, isSelected: j, optionsPropsRef: I, labelRef: w, buttonRef: g, optionsRef: R }), [a, p, v, d]);
2393
+ ae(() => {
2394
+ d.dataRef.current = A;
2395
+ }, [A]), Lr([A.buttonRef, A.optionsRef], (O, C) => {
2396
+ var $;
2397
+ h({ type: 1 }), Pr(C, Jt.Loose) || (O.preventDefault(), ($ = A.buttonRef.current) == null || $.focus());
2398
+ }, A.listboxState === 0);
2399
+ let T = fe(() => ({ open: A.listboxState === 0, disabled: p, value: a }), [A, p, a]), V = P((O) => {
2400
+ let C = A.options.find(($) => $.id === O);
2401
+ C && M(C.dataRef.current.value);
2402
+ }), te = P(() => {
2403
+ if (A.activeOptionIndex !== null) {
2404
+ let { dataRef: O, id: C } = A.options[A.activeOptionIndex];
2405
+ M(O.current.value), h({ type: 2, focus: H.Specific, id: C });
2259
2406
  }
2260
- }), pe = E(() => m({ type: 0 })), _ = E(() => m({ type: 1 })), te = E((x, I, D) => x === U.Specific ? m({ type: 2, focus: U.Specific, id: I, trigger: D }) : m({ type: 2, focus: x, trigger: D })), ee = E((x, I) => (m({ type: 5, id: x, dataRef: I }), () => m({ type: 6, id: x }))), ce = E((x) => (m({ type: 7, id: x }), () => m({ type: 7, id: null }))), V = E((x) => X(M.mode, { 0() {
2261
- return c?.(x);
2407
+ }), G = P(() => h({ type: 0 })), x = P(() => h({ type: 1 })), Z = P((O, C, $) => O === H.Specific ? h({ type: 2, focus: H.Specific, id: C, trigger: $ }) : h({ type: 2, focus: O, trigger: $ })), ne = P((O, C) => (h({ type: 5, id: O, dataRef: C }), () => h({ type: 6, id: O }))), le = P((O) => (h({ type: 7, id: O }), () => h({ type: 7, id: null }))), M = P((O) => ie(A.mode, { 0() {
2408
+ return c?.(O);
2262
2409
  }, 1() {
2263
- let I = M.value.slice(), D = I.findIndex((he) => L(he, x));
2264
- return D === -1 ? I.push(x) : I.splice(D, 1), c?.(I);
2265
- } })), T = E((x) => m({ type: 3, value: x })), R = E(() => m({ type: 4 })), A = re(() => ({ onChange: V, registerOption: ee, registerLabel: ce, goToOption: te, closeListbox: _, openListbox: pe, selectActiveOption: ie, selectOption: z, search: T, clearSearch: R }), []), oe = { ref: u }, ne = C(null), ae = Ne();
2266
- return Z(() => {
2267
- ne.current && r !== void 0 && ae.addEventListener(ne.current, "reset", () => {
2410
+ let C = A.value.slice(), $ = C.findIndex((be) => E(be, O));
2411
+ return $ === -1 ? C.push(O) : C.splice($, 1), c?.(C);
2412
+ } })), oe = P((O) => h({ type: 3, value: O })), J = P(() => h({ type: 4 })), q = fe(() => ({ onChange: M, registerOption: ne, registerLabel: le, goToOption: Z, closeListbox: x, openListbox: G, selectActiveOption: te, selectOption: V, search: oe, clearSearch: J }), []), ue = { ref: u }, se = _(null), re = Ve();
2413
+ return Y(() => {
2414
+ se.current && r !== void 0 && re.addEventListener(se.current, "reset", () => {
2268
2415
  c?.(r);
2269
2416
  });
2270
- }, [ne, c]), Y.createElement(en.Provider, { value: A }, Y.createElement(tn.Provider, { value: M }, Y.createElement(Qt, { value: X(M.listboxState, { 0: se.Open, 1: se.Closed }) }, a != null && s != null && Kt({ [a]: s }).map(([x, I], D) => Y.createElement(Rr, { features: Gt.Hidden, ref: D === 0 ? (he) => {
2271
- var Ae;
2272
- ne.current = (Ae = he?.closest("form")) != null ? Ae : null;
2273
- } : void 0, ...gt({ key: x, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: i, name: x, value: I }) })), me({ ourProps: oe, theirProps: h, slot: k, defaultTag: ml, name: "Listbox" }))));
2417
+ }, [se, c]), ee.createElement(sn.Provider, { value: q }, ee.createElement(cn.Provider, { value: A }, ee.createElement(rn, { value: ie(A.listboxState, { 0: pe.Open, 1: pe.Closed }) }, s != null && a != null && en({ [s]: a }).map(([O, C], $) => ee.createElement(Wr, { features: tn.Hidden, ref: $ === 0 ? (be) => {
2418
+ var Ce;
2419
+ se.current = (Ce = be?.closest("form")) != null ? Ce : null;
2420
+ } : void 0, ..._t({ key: O, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: i, name: O, value: C }) })), ke({ ourProps: ue, theirProps: m, slot: T, defaultTag: Tl, name: "Listbox" }))));
2274
2421
  }
2275
- let wl = "button";
2276
- function gl(e, t) {
2422
+ let Il = "button";
2423
+ function _l(e, t) {
2277
2424
  var n;
2278
- let r = Fe(), { id: i = `headlessui-listbox-button-${r}`, ...a } = e, o = ct("Listbox.Button"), f = st("Listbox.Button"), p = ye(o.buttonRef, t), b = Ne(), v = E((d) => {
2425
+ let r = Be(), { id: i = `headlessui-listbox-button-${r}`, ...s } = e, o = vt("Listbox.Button"), f = bt("Listbox.Button"), p = Ee(o.buttonRef, t), b = Ve(), v = P((d) => {
2279
2426
  switch (d.key) {
2280
- case j.Space:
2281
- case j.Enter:
2282
- case j.ArrowDown:
2427
+ case U.Space:
2428
+ case U.Enter:
2429
+ case U.ArrowDown:
2283
2430
  d.preventDefault(), f.openListbox(), b.nextFrame(() => {
2284
- o.value || f.goToOption(U.First);
2431
+ o.value || f.goToOption(H.First);
2285
2432
  });
2286
2433
  break;
2287
- case j.ArrowUp:
2434
+ case U.ArrowUp:
2288
2435
  d.preventDefault(), f.openListbox(), b.nextFrame(() => {
2289
- o.value || f.goToOption(U.Last);
2436
+ o.value || f.goToOption(H.Last);
2290
2437
  });
2291
2438
  break;
2292
2439
  }
2293
- }), h = E((d) => {
2440
+ }), m = P((d) => {
2294
2441
  switch (d.key) {
2295
- case j.Space:
2442
+ case U.Space:
2296
2443
  d.preventDefault();
2297
2444
  break;
2298
2445
  }
2299
- }), l = E((d) => {
2300
- if (Pr(d.currentTarget))
2446
+ }), l = P((d) => {
2447
+ if (Dr(d.currentTarget))
2301
2448
  return d.preventDefault();
2302
2449
  o.listboxState === 0 ? (f.closeListbox(), b.nextFrame(() => {
2303
- var m;
2304
- return (m = o.buttonRef.current) == null ? void 0 : m.focus({ preventScroll: !0 });
2450
+ var h;
2451
+ return (h = o.buttonRef.current) == null ? void 0 : h.focus({ preventScroll: !0 });
2305
2452
  })) : (d.preventDefault(), f.openListbox());
2306
- }), u = at(() => {
2453
+ }), u = ft(() => {
2307
2454
  if (o.labelId)
2308
2455
  return [o.labelId, i].join(" ");
2309
- }, [o.labelId, i]), s = re(() => ({ open: o.listboxState === 0, disabled: o.disabled, value: o.value }), [o]), c = { ref: p, id: i, type: Ir(e, o.buttonRef), "aria-haspopup": "listbox", "aria-controls": (n = o.optionsRef.current) == null ? void 0 : n.id, "aria-expanded": o.listboxState === 0, "aria-labelledby": u, disabled: o.disabled, onKeyDown: v, onKeyUp: h, onClick: l };
2310
- return me({ ourProps: c, theirProps: a, slot: s, defaultTag: wl, name: "Listbox.Button" });
2311
- }
2312
- let xl = "label";
2313
- function yl(e, t) {
2314
- let n = Fe(), { id: r = `headlessui-listbox-label-${n}`, ...i } = e, a = ct("Listbox.Label"), o = st("Listbox.Label"), f = ye(a.labelRef, t);
2315
- J(() => o.registerLabel(r), [r]);
2316
- let p = E(() => {
2456
+ }, [o.labelId, i]), a = fe(() => ({ open: o.listboxState === 0, disabled: o.disabled, value: o.value }), [o]), c = { ref: p, id: i, type: Nr(e, o.buttonRef), "aria-haspopup": "listbox", "aria-controls": (n = o.optionsRef.current) == null ? void 0 : n.id, "aria-expanded": o.listboxState === 0, "aria-labelledby": u, disabled: o.disabled, onKeyDown: v, onKeyUp: m, onClick: l };
2457
+ return ke({ ourProps: c, theirProps: s, slot: a, defaultTag: Il, name: "Listbox.Button" });
2458
+ }
2459
+ let Cl = "label";
2460
+ function Pl(e, t) {
2461
+ let n = Be(), { id: r = `headlessui-listbox-label-${n}`, ...i } = e, s = vt("Listbox.Label"), o = bt("Listbox.Label"), f = Ee(s.labelRef, t);
2462
+ ae(() => o.registerLabel(r), [r]);
2463
+ let p = P(() => {
2317
2464
  var v;
2318
- return (v = a.buttonRef.current) == null ? void 0 : v.focus({ preventScroll: !0 });
2319
- }), b = re(() => ({ open: a.listboxState === 0, disabled: a.disabled }), [a]);
2320
- return me({ ourProps: { ref: f, id: r, onClick: p }, theirProps: i, slot: b, defaultTag: xl, name: "Listbox.Label" });
2465
+ return (v = s.buttonRef.current) == null ? void 0 : v.focus({ preventScroll: !0 });
2466
+ }), b = fe(() => ({ open: s.listboxState === 0, disabled: s.disabled }), [s]);
2467
+ return ke({ ourProps: { ref: f, id: r, onClick: p }, theirProps: i, slot: b, defaultTag: Cl, name: "Listbox.Label" });
2321
2468
  }
2322
- let Ol = "ul", Sl = Ye.RenderStrategy | Ye.Static;
2323
- function kl(e, t) {
2469
+ let Rl = "ul", Ll = rt.RenderStrategy | rt.Static;
2470
+ function Nl(e, t) {
2324
2471
  var n;
2325
- let r = Fe(), { id: i = `headlessui-listbox-options-${r}`, ...a } = e, o = ct("Listbox.Options"), f = st("Listbox.Options"), p = ye(o.optionsRef, t), b = Ne(), v = Ne(), h = St(), l = (() => h !== null ? (h & se.Open) === se.Open : o.listboxState === 0)();
2326
- Z(() => {
2327
- var m;
2328
- let O = o.optionsRef.current;
2329
- O && o.listboxState === 0 && O !== ((m = Ot(O)) == null ? void 0 : m.activeElement) && O.focus({ preventScroll: !0 });
2472
+ let r = Be(), { id: i = `headlessui-listbox-options-${r}`, ...s } = e, o = vt("Listbox.Options"), f = bt("Listbox.Options"), p = Ee(o.optionsRef, t), b = Ve(), v = Ve(), m = Lt(), l = (() => m !== null ? (m & pe.Open) === pe.Open : o.listboxState === 0)();
2473
+ Y(() => {
2474
+ var h;
2475
+ let I = o.optionsRef.current;
2476
+ I && o.listboxState === 0 && I !== ((h = Rt(I)) == null ? void 0 : h.activeElement) && I.focus({ preventScroll: !0 });
2330
2477
  }, [o.listboxState, o.optionsRef]);
2331
- let u = E((m) => {
2332
- switch (v.dispose(), m.key) {
2333
- case j.Space:
2478
+ let u = P((h) => {
2479
+ switch (v.dispose(), h.key) {
2480
+ case U.Space:
2334
2481
  if (o.searchQuery !== "")
2335
- return m.preventDefault(), m.stopPropagation(), f.search(m.key);
2336
- case j.Enter:
2337
- if (m.preventDefault(), m.stopPropagation(), o.activeOptionIndex !== null) {
2338
- let { dataRef: O } = o.options[o.activeOptionIndex];
2339
- f.onChange(O.current.value);
2482
+ return h.preventDefault(), h.stopPropagation(), f.search(h.key);
2483
+ case U.Enter:
2484
+ if (h.preventDefault(), h.stopPropagation(), o.activeOptionIndex !== null) {
2485
+ let { dataRef: I } = o.options[o.activeOptionIndex];
2486
+ f.onChange(I.current.value);
2340
2487
  }
2341
- o.mode === 0 && (f.closeListbox(), _e().nextFrame(() => {
2342
- var O;
2343
- return (O = o.buttonRef.current) == null ? void 0 : O.focus({ preventScroll: !0 });
2488
+ o.mode === 0 && (f.closeListbox(), Fe().nextFrame(() => {
2489
+ var I;
2490
+ return (I = o.buttonRef.current) == null ? void 0 : I.focus({ preventScroll: !0 });
2344
2491
  }));
2345
2492
  break;
2346
- case X(o.orientation, { vertical: j.ArrowDown, horizontal: j.ArrowRight }):
2347
- return m.preventDefault(), m.stopPropagation(), f.goToOption(U.Next);
2348
- case X(o.orientation, { vertical: j.ArrowUp, horizontal: j.ArrowLeft }):
2349
- return m.preventDefault(), m.stopPropagation(), f.goToOption(U.Previous);
2350
- case j.Home:
2351
- case j.PageUp:
2352
- return m.preventDefault(), m.stopPropagation(), f.goToOption(U.First);
2353
- case j.End:
2354
- case j.PageDown:
2355
- return m.preventDefault(), m.stopPropagation(), f.goToOption(U.Last);
2356
- case j.Escape:
2357
- return m.preventDefault(), m.stopPropagation(), f.closeListbox(), b.nextFrame(() => {
2358
- var O;
2359
- return (O = o.buttonRef.current) == null ? void 0 : O.focus({ preventScroll: !0 });
2493
+ case ie(o.orientation, { vertical: U.ArrowDown, horizontal: U.ArrowRight }):
2494
+ return h.preventDefault(), h.stopPropagation(), f.goToOption(H.Next);
2495
+ case ie(o.orientation, { vertical: U.ArrowUp, horizontal: U.ArrowLeft }):
2496
+ return h.preventDefault(), h.stopPropagation(), f.goToOption(H.Previous);
2497
+ case U.Home:
2498
+ case U.PageUp:
2499
+ return h.preventDefault(), h.stopPropagation(), f.goToOption(H.First);
2500
+ case U.End:
2501
+ case U.PageDown:
2502
+ return h.preventDefault(), h.stopPropagation(), f.goToOption(H.Last);
2503
+ case U.Escape:
2504
+ return h.preventDefault(), h.stopPropagation(), f.closeListbox(), b.nextFrame(() => {
2505
+ var I;
2506
+ return (I = o.buttonRef.current) == null ? void 0 : I.focus({ preventScroll: !0 });
2360
2507
  });
2361
- case j.Tab:
2362
- m.preventDefault(), m.stopPropagation();
2508
+ case U.Tab:
2509
+ h.preventDefault(), h.stopPropagation();
2363
2510
  break;
2364
2511
  default:
2365
- m.key.length === 1 && (f.search(m.key), v.setTimeout(() => f.clearSearch(), 350));
2512
+ h.key.length === 1 && (f.search(h.key), v.setTimeout(() => f.clearSearch(), 350));
2366
2513
  break;
2367
2514
  }
2368
- }), s = at(() => {
2369
- var m, O, w;
2370
- return (w = (m = o.labelRef.current) == null ? void 0 : m.id) != null ? w : (O = o.buttonRef.current) == null ? void 0 : O.id;
2371
- }, [o.labelRef.current, o.buttonRef.current]), c = re(() => ({ open: o.listboxState === 0 }), [o]), d = { "aria-activedescendant": o.activeOptionIndex === null || (n = o.options[o.activeOptionIndex]) == null ? void 0 : n.id, "aria-multiselectable": o.mode === 1 ? !0 : void 0, "aria-labelledby": s, "aria-orientation": o.orientation, id: i, onKeyDown: u, role: "listbox", tabIndex: 0, ref: p };
2372
- return me({ ourProps: d, theirProps: a, slot: c, defaultTag: Ol, features: Sl, visible: l, name: "Listbox.Options" });
2515
+ }), a = ft(() => {
2516
+ var h, I, w;
2517
+ return (w = (h = o.labelRef.current) == null ? void 0 : h.id) != null ? w : (I = o.buttonRef.current) == null ? void 0 : I.id;
2518
+ }, [o.labelRef.current, o.buttonRef.current]), c = fe(() => ({ open: o.listboxState === 0 }), [o]), d = { "aria-activedescendant": o.activeOptionIndex === null || (n = o.options[o.activeOptionIndex]) == null ? void 0 : n.id, "aria-multiselectable": o.mode === 1 ? !0 : void 0, "aria-labelledby": a, "aria-orientation": o.orientation, id: i, onKeyDown: u, role: "listbox", tabIndex: 0, ref: p };
2519
+ return ke({ ourProps: d, theirProps: s, slot: c, defaultTag: Rl, features: Ll, visible: l, name: "Listbox.Options" });
2373
2520
  }
2374
- let Tl = "li";
2375
- function El(e, t) {
2376
- let n = Fe(), { id: r = `headlessui-listbox-option-${n}`, disabled: i = !1, value: a, ...o } = e, f = ct("Listbox.Option"), p = st("Listbox.Option"), b = f.activeOptionIndex !== null ? f.options[f.activeOptionIndex].id === r : !1, v = f.isSelected(a), h = C(null), l = cl(h), u = Se({ disabled: i, value: a, domRef: h, get textValue() {
2521
+ let Al = "li";
2522
+ function Fl(e, t) {
2523
+ let n = Be(), { id: r = `headlessui-listbox-option-${n}`, disabled: i = !1, value: s, ...o } = e, f = vt("Listbox.Option"), p = bt("Listbox.Option"), b = f.activeOptionIndex !== null ? f.options[f.activeOptionIndex].id === r : !1, v = f.isSelected(s), m = _(null), l = wl(m), u = _e({ disabled: i, value: s, domRef: m, get textValue() {
2377
2524
  return l();
2378
- } }), s = ye(t, h);
2379
- J(() => {
2525
+ } }), a = Ee(t, m);
2526
+ ae(() => {
2380
2527
  if (f.listboxState !== 0 || !b || f.activationTrigger === 0)
2381
2528
  return;
2382
- let L = _e();
2383
- return L.requestAnimationFrame(() => {
2384
- var q, M;
2385
- (M = (q = h.current) == null ? void 0 : q.scrollIntoView) == null || M.call(q, { block: "nearest" });
2386
- }), L.dispose;
2387
- }, [h, b, f.listboxState, f.activationTrigger, f.activeOptionIndex]), J(() => p.registerOption(r, u), [u, r]);
2388
- let c = E((L) => {
2529
+ let E = Fe();
2530
+ return E.requestAnimationFrame(() => {
2531
+ var j, A;
2532
+ (A = (j = m.current) == null ? void 0 : j.scrollIntoView) == null || A.call(j, { block: "nearest" });
2533
+ }), E.dispose;
2534
+ }, [m, b, f.listboxState, f.activationTrigger, f.activeOptionIndex]), ae(() => p.registerOption(r, u), [u, r]);
2535
+ let c = P((E) => {
2389
2536
  if (i)
2390
- return L.preventDefault();
2391
- p.onChange(a), f.mode === 0 && (p.closeListbox(), _e().nextFrame(() => {
2392
- var q;
2393
- return (q = f.buttonRef.current) == null ? void 0 : q.focus({ preventScroll: !0 });
2537
+ return E.preventDefault();
2538
+ p.onChange(s), f.mode === 0 && (p.closeListbox(), Fe().nextFrame(() => {
2539
+ var j;
2540
+ return (j = f.buttonRef.current) == null ? void 0 : j.focus({ preventScroll: !0 });
2394
2541
  }));
2395
- }), d = E(() => {
2542
+ }), d = P(() => {
2396
2543
  if (i)
2397
- return p.goToOption(U.Nothing);
2398
- p.goToOption(U.Specific, r);
2399
- }), m = Ar(), O = E((L) => m.update(L)), w = E((L) => {
2400
- m.wasMoved(L) && (i || b || p.goToOption(U.Specific, r, 0));
2401
- }), g = E((L) => {
2402
- m.wasMoved(L) && (i || b && p.goToOption(U.Nothing));
2403
- }), W = re(() => ({ active: b, selected: v, disabled: i }), [b, v, i]);
2404
- return me({ ourProps: { id: r, ref: s, role: "option", tabIndex: i === !0 ? void 0 : -1, "aria-disabled": i === !0 ? !0 : void 0, "aria-selected": v, disabled: void 0, onClick: c, onFocus: d, onPointerEnter: O, onMouseEnter: O, onPointerMove: w, onMouseMove: w, onPointerLeave: g, onMouseLeave: g }, theirProps: o, slot: W, defaultTag: Tl, name: "Listbox.Option" });
2405
- }
2406
- let Il = be(hl), _l = be(gl), Cl = be(yl), Pl = be(kl), Ll = be(El), xt = Object.assign(Il, { Button: _l, Label: Cl, Options: Pl, Option: Ll });
2407
- function Nl(e = 0) {
2408
- let [t, n] = Q(e), r = Jt(), i = Ke((p) => {
2544
+ return p.goToOption(H.Nothing);
2545
+ p.goToOption(H.Specific, r);
2546
+ }), h = Vr(), I = P((E) => h.update(E)), w = P((E) => {
2547
+ h.wasMoved(E) && (i || b || p.goToOption(H.Specific, r, 0));
2548
+ }), g = P((E) => {
2549
+ h.wasMoved(E) && (i || b && p.goToOption(H.Nothing));
2550
+ }), R = fe(() => ({ active: b, selected: v, disabled: i }), [b, v, i]);
2551
+ return ke({ ourProps: { id: r, ref: a, role: "option", tabIndex: i === !0 ? void 0 : -1, "aria-disabled": i === !0 ? !0 : void 0, "aria-selected": v, disabled: void 0, onClick: c, onFocus: d, onPointerEnter: I, onMouseEnter: I, onPointerMove: w, onMouseMove: w, onPointerLeave: g, onMouseLeave: g }, theirProps: o, slot: R, defaultTag: Al, name: "Listbox.Option" });
2552
+ }
2553
+ let Dl = ge(El), Ml = ge(_l), $l = ge(Pl), Wl = ge(Nl), jl = ge(Fl), Ct = Object.assign(Dl, { Button: Ml, Label: $l, Options: Wl, Option: jl });
2554
+ function Vl(e = 0) {
2555
+ let [t, n] = K(e), r = ln(), i = tt((p) => {
2409
2556
  r.current && n((b) => b | p);
2410
- }, [t, r]), a = Ke((p) => !!(t & p), [t]), o = Ke((p) => {
2557
+ }, [t, r]), s = tt((p) => !!(t & p), [t]), o = tt((p) => {
2411
2558
  r.current && n((b) => b & ~p);
2412
- }, [n, r]), f = Ke((p) => {
2559
+ }, [n, r]), f = tt((p) => {
2413
2560
  r.current && n((b) => b ^ p);
2414
2561
  }, [n]);
2415
- return { flags: t, addFlag: i, hasFlag: a, removeFlag: o, toggleFlag: f };
2562
+ return { flags: t, addFlag: i, hasFlag: s, removeFlag: o, toggleFlag: f };
2416
2563
  }
2417
- function Rl(e) {
2564
+ function Bl(e) {
2418
2565
  let t = { called: !1 };
2419
2566
  return (...n) => {
2420
2567
  if (!t.called)
2421
2568
  return t.called = !0, e(...n);
2422
2569
  };
2423
2570
  }
2424
- function Ft(e, ...t) {
2571
+ function Vt(e, ...t) {
2425
2572
  e && t.length > 0 && e.classList.add(...t);
2426
2573
  }
2427
- function At(e, ...t) {
2574
+ function Bt(e, ...t) {
2428
2575
  e && t.length > 0 && e.classList.remove(...t);
2429
2576
  }
2430
- function Fl(e, t) {
2431
- let n = _e();
2577
+ function Ul(e, t) {
2578
+ let n = Fe();
2432
2579
  if (!e)
2433
2580
  return n.dispose;
2434
- let { transitionDuration: r, transitionDelay: i } = getComputedStyle(e), [a, o] = [r, i].map((p) => {
2435
- let [b = 0] = p.split(",").filter(Boolean).map((v) => v.includes("ms") ? parseFloat(v) : parseFloat(v) * 1e3).sort((v, h) => h - v);
2581
+ let { transitionDuration: r, transitionDelay: i } = getComputedStyle(e), [s, o] = [r, i].map((p) => {
2582
+ let [b = 0] = p.split(",").filter(Boolean).map((v) => v.includes("ms") ? parseFloat(v) : parseFloat(v) * 1e3).sort((v, m) => m - v);
2436
2583
  return b;
2437
- }), f = a + o;
2584
+ }), f = s + o;
2438
2585
  if (f !== 0) {
2439
2586
  n.group((b) => {
2440
2587
  b.setTimeout(() => {
@@ -2450,152 +2597,152 @@ function Fl(e, t) {
2450
2597
  t();
2451
2598
  return n.add(() => t()), n.dispose;
2452
2599
  }
2453
- function Al(e, t, n, r) {
2454
- let i = n ? "enter" : "leave", a = _e(), o = r !== void 0 ? Rl(r) : () => {
2600
+ function Hl(e, t, n, r) {
2601
+ let i = n ? "enter" : "leave", s = Fe(), o = r !== void 0 ? Bl(r) : () => {
2455
2602
  };
2456
2603
  i === "enter" && (e.removeAttribute("hidden"), e.style.display = "");
2457
- let f = X(i, { enter: () => t.enter, leave: () => t.leave }), p = X(i, { enter: () => t.enterTo, leave: () => t.leaveTo }), b = X(i, { enter: () => t.enterFrom, leave: () => t.leaveFrom });
2458
- return At(e, ...t.base, ...t.enter, ...t.enterTo, ...t.enterFrom, ...t.leave, ...t.leaveFrom, ...t.leaveTo, ...t.entered), Ft(e, ...t.base, ...f, ...b), a.nextFrame(() => {
2459
- At(e, ...t.base, ...f, ...b), Ft(e, ...t.base, ...f, ...p), Fl(e, () => (At(e, ...t.base, ...f), Ft(e, ...t.base, ...t.entered), o()));
2460
- }), a.dispose;
2461
- }
2462
- function Ml({ immediate: e, container: t, direction: n, classes: r, onStart: i, onStop: a }) {
2463
- let o = Jt(), f = Ne(), p = Se(n);
2464
- J(() => {
2604
+ let f = ie(i, { enter: () => t.enter, leave: () => t.leave }), p = ie(i, { enter: () => t.enterTo, leave: () => t.leaveTo }), b = ie(i, { enter: () => t.enterFrom, leave: () => t.leaveFrom });
2605
+ return Bt(e, ...t.base, ...t.enter, ...t.enterTo, ...t.enterFrom, ...t.leave, ...t.leaveFrom, ...t.leaveTo, ...t.entered), Vt(e, ...t.base, ...f, ...b), s.nextFrame(() => {
2606
+ Bt(e, ...t.base, ...f, ...b), Vt(e, ...t.base, ...f, ...p), Ul(e, () => (Bt(e, ...t.base, ...f), Vt(e, ...t.base, ...t.entered), o()));
2607
+ }), s.dispose;
2608
+ }
2609
+ function zl({ immediate: e, container: t, direction: n, classes: r, onStart: i, onStop: s }) {
2610
+ let o = ln(), f = Ve(), p = _e(n);
2611
+ ae(() => {
2465
2612
  e && (p.current = "enter");
2466
- }, [e]), J(() => {
2467
- let b = _e();
2613
+ }, [e]), ae(() => {
2614
+ let b = Fe();
2468
2615
  f.add(b.dispose);
2469
2616
  let v = t.current;
2470
2617
  if (v && p.current !== "idle" && o.current)
2471
- return b.dispose(), i.current(p.current), b.add(Al(v, r.current, p.current === "enter", () => {
2472
- b.dispose(), a.current(p.current);
2618
+ return b.dispose(), i.current(p.current), b.add(Hl(v, r.current, p.current === "enter", () => {
2619
+ b.dispose(), s.current(p.current);
2473
2620
  })), b.dispose;
2474
2621
  }, [n]);
2475
2622
  }
2476
- function De(e = "") {
2623
+ function ze(e = "") {
2477
2624
  return e.split(" ").filter((t) => t.trim().length > 1);
2478
2625
  }
2479
- let kt = He(null);
2480
- kt.displayName = "TransitionContext";
2481
- var Dl = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(Dl || {});
2482
- function $l() {
2483
- let e = Ve(kt);
2626
+ let Nt = Je(null);
2627
+ Nt.displayName = "TransitionContext";
2628
+ var ql = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(ql || {});
2629
+ function Kl() {
2630
+ let e = Ye(Nt);
2484
2631
  if (e === null)
2485
2632
  throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
2486
2633
  return e;
2487
2634
  }
2488
- function Wl() {
2489
- let e = Ve(Tt);
2635
+ function Yl() {
2636
+ let e = Ye(At);
2490
2637
  if (e === null)
2491
2638
  throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
2492
2639
  return e;
2493
2640
  }
2494
- let Tt = He(null);
2495
- Tt.displayName = "NestingContext";
2496
- function Et(e) {
2497
- return "children" in e ? Et(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
2641
+ let At = Je(null);
2642
+ At.displayName = "NestingContext";
2643
+ function Ft(e) {
2644
+ return "children" in e ? Ft(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
2498
2645
  }
2499
- function Mr(e, t) {
2500
- let n = Se(e), r = C([]), i = Jt(), a = Ne(), o = E((u, s = $e.Hidden) => {
2646
+ function Br(e, t) {
2647
+ let n = _e(e), r = _([]), i = ln(), s = Ve(), o = P((u, a = qe.Hidden) => {
2501
2648
  let c = r.current.findIndex(({ el: d }) => d === u);
2502
- c !== -1 && (X(s, { [$e.Unmount]() {
2649
+ c !== -1 && (ie(a, { [qe.Unmount]() {
2503
2650
  r.current.splice(c, 1);
2504
- }, [$e.Hidden]() {
2651
+ }, [qe.Hidden]() {
2505
2652
  r.current[c].state = "hidden";
2506
- } }), a.microTask(() => {
2653
+ } }), s.microTask(() => {
2507
2654
  var d;
2508
- !Et(r) && i.current && ((d = n.current) == null || d.call(n));
2655
+ !Ft(r) && i.current && ((d = n.current) == null || d.call(n));
2509
2656
  }));
2510
- }), f = E((u) => {
2511
- let s = r.current.find(({ el: c }) => c === u);
2512
- return s ? s.state !== "visible" && (s.state = "visible") : r.current.push({ el: u, state: "visible" }), () => o(u, $e.Unmount);
2513
- }), p = C([]), b = C(Promise.resolve()), v = C({ enter: [], leave: [], idle: [] }), h = E((u, s, c) => {
2514
- p.current.splice(0), t && (t.chains.current[s] = t.chains.current[s].filter(([d]) => d !== u)), t?.chains.current[s].push([u, new Promise((d) => {
2657
+ }), f = P((u) => {
2658
+ let a = r.current.find(({ el: c }) => c === u);
2659
+ return a ? a.state !== "visible" && (a.state = "visible") : r.current.push({ el: u, state: "visible" }), () => o(u, qe.Unmount);
2660
+ }), p = _([]), b = _(Promise.resolve()), v = _({ enter: [], leave: [], idle: [] }), m = P((u, a, c) => {
2661
+ p.current.splice(0), t && (t.chains.current[a] = t.chains.current[a].filter(([d]) => d !== u)), t?.chains.current[a].push([u, new Promise((d) => {
2515
2662
  p.current.push(d);
2516
- })]), t?.chains.current[s].push([u, new Promise((d) => {
2517
- Promise.all(v.current[s].map(([m, O]) => O)).then(() => d());
2518
- })]), s === "enter" ? b.current = b.current.then(() => t?.wait.current).then(() => c(s)) : c(s);
2519
- }), l = E((u, s, c) => {
2520
- Promise.all(v.current[s].splice(0).map(([d, m]) => m)).then(() => {
2663
+ })]), t?.chains.current[a].push([u, new Promise((d) => {
2664
+ Promise.all(v.current[a].map(([h, I]) => I)).then(() => d());
2665
+ })]), a === "enter" ? b.current = b.current.then(() => t?.wait.current).then(() => c(a)) : c(a);
2666
+ }), l = P((u, a, c) => {
2667
+ Promise.all(v.current[a].splice(0).map(([d, h]) => h)).then(() => {
2521
2668
  var d;
2522
2669
  (d = p.current.shift()) == null || d();
2523
- }).then(() => c(s));
2670
+ }).then(() => c(a));
2524
2671
  });
2525
- return re(() => ({ children: r, register: f, unregister: o, onStart: h, onStop: l, wait: b, chains: v }), [f, o, r, h, l, v, b]);
2672
+ return fe(() => ({ children: r, register: f, unregister: o, onStart: m, onStop: l, wait: b, chains: v }), [f, o, r, m, l, v, b]);
2526
2673
  }
2527
- function Vl() {
2674
+ function Gl() {
2528
2675
  }
2529
- let Bl = ["beforeEnter", "afterEnter", "beforeLeave", "afterLeave"];
2530
- function yn(e) {
2676
+ let Ql = ["beforeEnter", "afterEnter", "beforeLeave", "afterLeave"];
2677
+ function Tn(e) {
2531
2678
  var t;
2532
2679
  let n = {};
2533
- for (let r of Bl)
2534
- n[r] = (t = e[r]) != null ? t : Vl;
2680
+ for (let r of Ql)
2681
+ n[r] = (t = e[r]) != null ? t : Gl;
2535
2682
  return n;
2536
2683
  }
2537
- function jl(e) {
2538
- let t = C(yn(e));
2539
- return Z(() => {
2540
- t.current = yn(e);
2684
+ function Xl(e) {
2685
+ let t = _(Tn(e));
2686
+ return Y(() => {
2687
+ t.current = Tn(e);
2541
2688
  }, [e]), t;
2542
2689
  }
2543
- let Ul = "div", Dr = Ye.RenderStrategy;
2544
- function Hl(e, t) {
2690
+ let Zl = "div", Ur = rt.RenderStrategy;
2691
+ function Jl(e, t) {
2545
2692
  var n, r;
2546
- let { beforeEnter: i, afterEnter: a, beforeLeave: o, afterLeave: f, enter: p, enterFrom: b, enterTo: v, entered: h, leave: l, leaveFrom: u, leaveTo: s, ...c } = e, d = C(null), m = ye(d, t), O = (n = c.unmount) == null || n ? $e.Unmount : $e.Hidden, { show: w, appear: g, initial: W } = $l(), [L, q] = Q(w ? "visible" : "hidden"), M = Wl(), { register: k, unregister: z } = M;
2547
- Z(() => k(d), [k, d]), Z(() => {
2548
- if (O === $e.Hidden && d.current) {
2549
- if (w && L !== "visible") {
2550
- q("visible");
2693
+ let { beforeEnter: i, afterEnter: s, beforeLeave: o, afterLeave: f, enter: p, enterFrom: b, enterTo: v, entered: m, leave: l, leaveFrom: u, leaveTo: a, ...c } = e, d = _(null), h = Ee(d, t), I = (n = c.unmount) == null || n ? qe.Unmount : qe.Hidden, { show: w, appear: g, initial: R } = Kl(), [E, j] = K(w ? "visible" : "hidden"), A = Yl(), { register: T, unregister: V } = A;
2694
+ Y(() => T(d), [T, d]), Y(() => {
2695
+ if (I === qe.Hidden && d.current) {
2696
+ if (w && E !== "visible") {
2697
+ j("visible");
2551
2698
  return;
2552
2699
  }
2553
- return X(L, { hidden: () => z(d), visible: () => k(d) });
2700
+ return ie(E, { hidden: () => V(d), visible: () => T(d) });
2554
2701
  }
2555
- }, [L, d, k, z, w, O]);
2556
- let ie = Se({ base: De(c.className), enter: De(p), enterFrom: De(b), enterTo: De(v), entered: De(h), leave: De(l), leaveFrom: De(u), leaveTo: De(s) }), pe = jl({ beforeEnter: i, afterEnter: a, beforeLeave: o, afterLeave: f }), _ = qt();
2557
- Z(() => {
2558
- if (_ && L === "visible" && d.current === null)
2702
+ }, [E, d, T, V, w, I]);
2703
+ let te = _e({ base: ze(c.className), enter: ze(p), enterFrom: ze(b), enterTo: ze(v), entered: ze(m), leave: ze(l), leaveFrom: ze(u), leaveTo: ze(a) }), G = Xl({ beforeEnter: i, afterEnter: s, beforeLeave: o, afterLeave: f }), x = Zt();
2704
+ Y(() => {
2705
+ if (x && E === "visible" && d.current === null)
2559
2706
  throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
2560
- }, [d, L, _]);
2561
- let te = W && !g, ee = g && w && W, ce = (() => !_ || te ? "idle" : w ? "enter" : "leave")(), V = Nl(0), T = E((ae) => X(ae, { enter: () => {
2562
- V.addFlag(se.Opening), pe.current.beforeEnter();
2707
+ }, [d, E, x]);
2708
+ let Z = R && !g, ne = g && w && R, le = (() => !x || Z ? "idle" : w ? "enter" : "leave")(), M = Vl(0), oe = P((re) => ie(re, { enter: () => {
2709
+ M.addFlag(pe.Opening), G.current.beforeEnter();
2563
2710
  }, leave: () => {
2564
- V.addFlag(se.Closing), pe.current.beforeLeave();
2711
+ M.addFlag(pe.Closing), G.current.beforeLeave();
2565
2712
  }, idle: () => {
2566
- } })), R = E((ae) => X(ae, { enter: () => {
2567
- V.removeFlag(se.Opening), pe.current.afterEnter();
2713
+ } })), J = P((re) => ie(re, { enter: () => {
2714
+ M.removeFlag(pe.Opening), G.current.afterEnter();
2568
2715
  }, leave: () => {
2569
- V.removeFlag(se.Closing), pe.current.afterLeave();
2716
+ M.removeFlag(pe.Closing), G.current.afterLeave();
2570
2717
  }, idle: () => {
2571
- } })), A = Mr(() => {
2572
- q("hidden"), z(d);
2573
- }, M);
2574
- Ml({ immediate: ee, container: d, classes: ie, direction: ce, onStart: Se((ae) => {
2575
- A.onStart(d, ae, T);
2576
- }), onStop: Se((ae) => {
2577
- A.onStop(d, ae, R), ae === "leave" && !Et(A) && (q("hidden"), z(d));
2718
+ } })), q = Br(() => {
2719
+ j("hidden"), V(d);
2720
+ }, A);
2721
+ zl({ immediate: ne, container: d, classes: te, direction: le, onStart: _e((re) => {
2722
+ q.onStart(d, re, oe);
2723
+ }), onStop: _e((re) => {
2724
+ q.onStop(d, re, J), re === "leave" && !Ft(q) && (j("hidden"), V(d));
2578
2725
  }) });
2579
- let oe = c, ne = { ref: m };
2580
- return ee ? oe = { ...oe, className: wt(c.className, ...ie.current.enter, ...ie.current.enterFrom) } : (oe.className = wt(c.className, (r = d.current) == null ? void 0 : r.className), oe.className === "" && delete oe.className), Y.createElement(Tt.Provider, { value: A }, Y.createElement(Qt, { value: X(L, { visible: se.Open, hidden: se.Closed }) | V.flags }, me({ ourProps: ne, theirProps: oe, defaultTag: Ul, features: Dr, visible: L === "visible", name: "Transition.Child" })));
2581
- }
2582
- function ql(e, t) {
2583
- let { show: n, appear: r = !1, unmount: i = !0, ...a } = e, o = C(null), f = ye(o, t);
2584
- qt();
2585
- let p = St();
2586
- if (n === void 0 && p !== null && (n = (p & se.Open) === se.Open), ![!0, !1].includes(n))
2726
+ let ue = c, se = { ref: h };
2727
+ return ne ? ue = { ...ue, className: It(c.className, ...te.current.enter, ...te.current.enterFrom) } : (ue.className = It(c.className, (r = d.current) == null ? void 0 : r.className), ue.className === "" && delete ue.className), ee.createElement(At.Provider, { value: q }, ee.createElement(rn, { value: ie(E, { visible: pe.Open, hidden: pe.Closed }) | M.flags }, ke({ ourProps: se, theirProps: ue, defaultTag: Zl, features: Ur, visible: E === "visible", name: "Transition.Child" })));
2728
+ }
2729
+ function es(e, t) {
2730
+ let { show: n, appear: r = !1, unmount: i = !0, ...s } = e, o = _(null), f = Ee(o, t);
2731
+ Zt();
2732
+ let p = Lt();
2733
+ if (n === void 0 && p !== null && (n = (p & pe.Open) === pe.Open), ![!0, !1].includes(n))
2587
2734
  throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
2588
- let [b, v] = Q(n ? "visible" : "hidden"), h = Mr(() => {
2735
+ let [b, v] = K(n ? "visible" : "hidden"), m = Br(() => {
2589
2736
  v("hidden");
2590
- }), [l, u] = Q(!0), s = C([n]);
2591
- J(() => {
2592
- l !== !1 && s.current[s.current.length - 1] !== n && (s.current.push(n), u(!1));
2593
- }, [s, n]);
2594
- let c = re(() => ({ show: n, appear: r, initial: l }), [n, r, l]);
2595
- Z(() => {
2737
+ }), [l, u] = K(!0), a = _([n]);
2738
+ ae(() => {
2739
+ l !== !1 && a.current[a.current.length - 1] !== n && (a.current.push(n), u(!1));
2740
+ }, [a, n]);
2741
+ let c = fe(() => ({ show: n, appear: r, initial: l }), [n, r, l]);
2742
+ Y(() => {
2596
2743
  if (n)
2597
2744
  v("visible");
2598
- else if (!Et(h))
2745
+ else if (!Ft(m))
2599
2746
  v("hidden");
2600
2747
  else {
2601
2748
  let w = o.current;
@@ -2604,150 +2751,236 @@ function ql(e, t) {
2604
2751
  let g = w.getBoundingClientRect();
2605
2752
  g.x === 0 && g.y === 0 && g.width === 0 && g.height === 0 && v("hidden");
2606
2753
  }
2607
- }, [n, h]);
2608
- let d = { unmount: i }, m = E(() => {
2754
+ }, [n, m]);
2755
+ let d = { unmount: i }, h = P(() => {
2609
2756
  var w;
2610
2757
  l && u(!1), (w = e.beforeEnter) == null || w.call(e);
2611
- }), O = E(() => {
2758
+ }), I = P(() => {
2612
2759
  var w;
2613
2760
  l && u(!1), (w = e.beforeLeave) == null || w.call(e);
2614
2761
  });
2615
- return Y.createElement(Tt.Provider, { value: h }, Y.createElement(kt.Provider, { value: c }, me({ ourProps: { ...d, as: Le, children: Y.createElement($r, { ref: f, ...d, ...a, beforeEnter: m, beforeLeave: O }) }, theirProps: {}, defaultTag: Le, features: Dr, visible: b === "visible", name: "Transition" })));
2762
+ return ee.createElement(At.Provider, { value: m }, ee.createElement(Nt.Provider, { value: c }, ke({ ourProps: { ...d, as: je, children: ee.createElement(Hr, { ref: f, ...d, ...s, beforeEnter: h, beforeLeave: I }) }, theirProps: {}, defaultTag: je, features: Ur, visible: b === "visible", name: "Transition" })));
2616
2763
  }
2617
- function zl(e, t) {
2618
- let n = Ve(kt) !== null, r = St() !== null;
2619
- return Y.createElement(Y.Fragment, null, !n && r ? Y.createElement(Vt, { ref: t, ...e }) : Y.createElement($r, { ref: t, ...e }));
2764
+ function ts(e, t) {
2765
+ let n = Ye(Nt) !== null, r = Lt() !== null;
2766
+ return ee.createElement(ee.Fragment, null, !n && r ? ee.createElement(Kt, { ref: t, ...e }) : ee.createElement(Hr, { ref: t, ...e }));
2620
2767
  }
2621
- let Vt = be(ql), $r = be(Hl), Kl = be(zl), Wr = Object.assign(Vt, { Child: Kl, Root: Vt });
2622
- function Gl({
2768
+ let Kt = ge(es), Hr = ge(Jl), ns = ge(ts), zr = Object.assign(Kt, { Child: ns, Root: Kt });
2769
+ function rs({
2623
2770
  title: e,
2624
2771
  titleId: t,
2625
2772
  ...n
2626
2773
  }, r) {
2627
- return /* @__PURE__ */ Pe.createElement("svg", Object.assign({
2774
+ return /* @__PURE__ */ We.createElement("svg", Object.assign({
2628
2775
  xmlns: "http://www.w3.org/2000/svg",
2629
2776
  viewBox: "0 0 20 20",
2630
2777
  fill: "currentColor",
2631
2778
  "aria-hidden": "true",
2632
2779
  ref: r,
2633
2780
  "aria-labelledby": t
2634
- }, n), e ? /* @__PURE__ */ Pe.createElement("title", {
2781
+ }, n), e ? /* @__PURE__ */ We.createElement("title", {
2635
2782
  id: t
2636
- }, e) : null, /* @__PURE__ */ Pe.createElement("path", {
2783
+ }, e) : null, /* @__PURE__ */ We.createElement("path", {
2637
2784
  fillRule: "evenodd",
2638
2785
  d: "M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",
2639
2786
  clipRule: "evenodd"
2640
2787
  }));
2641
2788
  }
2642
- const Yl = Pe.forwardRef(Gl), Vr = Yl, ss = ({ children: e, selected: t, onSelect: n, themeColor: r }) => {
2643
- const [i, a] = Q(!1);
2644
- let o = "#333333";
2645
- const f = (v) => {
2646
- n(v);
2647
- }, p = () => {
2648
- a(!0);
2649
- }, b = () => {
2650
- a(!1);
2789
+ const is = We.forwardRef(rs), qr = is, ws = ({ children: e, selected: t, onSelect: n, themeColor: r }) => {
2790
+ const [i, s] = K(!1), [o, f] = K(!1), p = _(null), b = _(null), [v, m] = K({ left: 0, top: 0 }), l = _(0), u = _(0);
2791
+ let a = "#333333";
2792
+ const c = (R) => {
2793
+ n(R);
2794
+ }, d = () => {
2795
+ s(!0);
2796
+ }, h = () => {
2797
+ s(!1);
2798
+ }, I = () => {
2799
+ l.current = window.innerHeight, u.current = document.body.scrollHeight, f(!0);
2651
2800
  };
2652
- if (r) {
2653
- r = Re.convert3HexTo6(r);
2654
- const v = qe(r);
2655
- (v === "dark" || v === "light") && (o = r === "#ffffff" ? "#c8c8c8" : r);
2801
+ Y(() => (I(), window.addEventListener("resize", I), () => {
2802
+ window.addEventListener("resize", I);
2803
+ }), []);
2804
+ const w = () => u.current - (l.current + window.scrollY), g = () => {
2805
+ if (p.current) {
2806
+ const R = p.current.getBoundingClientRect();
2807
+ setTimeout(() => {
2808
+ const E = b?.current?.getBoundingClientRect(), j = w(), A = l.current - R.bottom;
2809
+ let T;
2810
+ if (E) {
2811
+ const V = R.height, te = R.top, G = E.height, x = G > te + window.scrollY;
2812
+ te < G && (x || x && A < G || j > G || A > G) || te > G && A > G ? T = R.y + V : T = R.y - G, m({
2813
+ left: R.left,
2814
+ top: T ?? R.top
2815
+ });
2816
+ }
2817
+ }, 0);
2818
+ }
2819
+ };
2820
+ if (Y(() => (window.addEventListener("scroll", g), window.addEventListener("resize", g), () => {
2821
+ window.removeEventListener("scroll", g), window.removeEventListener("resize", g);
2822
+ }), []), r) {
2823
+ r = De.convert3HexTo6(r);
2824
+ const R = Ge(r);
2825
+ (R === "dark" || R === "light") && (a = r === "#ffffff" ? "#c8c8c8" : r);
2656
2826
  }
2657
- return /* @__PURE__ */ S(Qe, { children: /* @__PURE__ */ S(xt, { value: t, onChange: f, children: ({ open: v }) => /* @__PURE__ */ we("div", { className: "tw-relative", children: [
2658
- /* @__PURE__ */ S("div", { className: "tw-relative", children: /* @__PURE__ */ we(
2659
- xt.Button,
2827
+ return /* @__PURE__ */ k(Ct, { value: t, onChange: c, children: ({ open: R }) => /* @__PURE__ */ we("div", { className: "tw-relative", children: [
2828
+ /* @__PURE__ */ k("div", { className: "tw-relative", ref: p, children: /* @__PURE__ */ we(
2829
+ Ct.Button,
2660
2830
  {
2661
2831
  "data-testid": "select-options",
2662
- onFocus: p,
2663
- onBlur: b,
2664
- style: { borderBottomColor: r && (i || v) ? o : "" },
2665
- className: "tw-relative tw-h-10 tw-w-full tw-cursor-pointer tw-border-b tw-border-t tw-border-t-transparent tw-bg-white tw-py-1.5 tw-pl-[10px] tw-pr-10 tw-text-left tw-text-[#333333] focus:tw-border-b-2 focus:tw-border-t-2 focus:tw-border-b-[#006bb1] focus:tw-py-[5px] focus:tw-outline-none focus:tw-ring-0 sm:tw-text-sm sm:tw-leading-6" + (v ? " tw-border-b-2 tw-border-t-2 tw-border-b-[#006bb1]" : " tw-border-b-[#333333]"),
2832
+ onFocus: d,
2833
+ onBlur: h,
2834
+ onClick: g,
2835
+ onKeyDown: (E) => {
2836
+ (E.key === " " || E.code === "Space" || E.code === "Enter") && g();
2837
+ },
2838
+ style: { borderBottomColor: r && (i || R) ? a : "" },
2839
+ className: "tw-relative tw-h-10 tw-w-full tw-cursor-pointer tw-border-b tw-border-t tw-border-t-transparent tw-bg-white tw-py-1.5 tw-pl-[10px] tw-pr-8 tw-text-left tw-text-base tw-text-[#333333] focus:tw-border-b-2 focus:tw-border-t-2 focus:tw-border-b-[#006bb1] focus:tw-py-[5px] focus:tw-outline-none focus:tw-ring-0" + (R ? " tw-border-b-2 tw-border-t-2 tw-border-b-[#006bb1]" : " tw-border-b-[#333333]"),
2666
2840
  children: [
2667
2841
  t && /* @__PURE__ */ we("span", { className: "tw-flex tw-items-center", children: [
2668
- t.avatar && /* @__PURE__ */ S("img", { src: t.avatar.src, alt: "", className: "tw-mr-2 tw-h-5 tw-w-5 tw-flex-shrink-0" }),
2669
- /* @__PURE__ */ S("span", { className: "tw-block tw-truncate", children: t.label })
2842
+ t.avatar && /* @__PURE__ */ k("img", { src: t.avatar.src, alt: "", className: "tw-mr-2 tw-h-5 tw-w-5 tw-flex-shrink-0" }),
2843
+ /* @__PURE__ */ k("span", { className: "tw-block tw-truncate", children: t.label })
2670
2844
  ] }),
2671
- /* @__PURE__ */ S("span", { className: "tw-pointer-events-none tw-absolute tw-inset-y-0 tw-right-0 tw-flex tw-items-center tw-pr-2", children: /* @__PURE__ */ S(Vr, { className: "tw-h-5 tw-w-5 tw-text-[#333333]", "aria-hidden": "true" }) })
2845
+ /* @__PURE__ */ k("span", { className: "tw-pointer-events-none tw-absolute tw-inset-y-0 tw-right-0 tw-flex tw-items-center tw-pr-2", children: /* @__PURE__ */ k(qr, { className: "tw-h-5 tw-w-5 tw-text-[#333333]", "aria-hidden": "true" }) })
2672
2846
  ]
2673
2847
  }
2674
2848
  ) }),
2675
- e
2676
- ] }) }) });
2677
- }, cs = ({ children: e, setQuery: t }) => /* @__PURE__ */ S(Qe, { children: /* @__PURE__ */ S(
2678
- Wr,
2849
+ o ? Yt(
2850
+ /* @__PURE__ */ k(it, { children: R && /* @__PURE__ */ k(
2851
+ "div",
2852
+ {
2853
+ style: {
2854
+ position: "fixed",
2855
+ inset: 0,
2856
+ backgroundColor: "rgba(255,255,255,0)",
2857
+ zIndex: 1e3
2858
+ },
2859
+ children: /* @__PURE__ */ k(
2860
+ "div",
2861
+ {
2862
+ ref: b,
2863
+ className: "tw-absolute",
2864
+ style: {
2865
+ opacity: v.left ? 1 : 0,
2866
+ width: p.current ? p.current.clientWidth : "auto",
2867
+ left: v.left,
2868
+ top: v.top
2869
+ },
2870
+ children: e
2871
+ }
2872
+ )
2873
+ }
2874
+ ) }),
2875
+ document.body
2876
+ ) : null
2877
+ ] }) });
2878
+ }, gs = ({ children: e, setQuery: t }) => /* @__PURE__ */ k(
2879
+ zr,
2679
2880
  {
2680
- as: Le,
2881
+ as: je,
2681
2882
  leave: "tw-transition tw-ease-in tw-duration-100",
2682
2883
  leaveFrom: "tw-opacity-100",
2683
2884
  leaveTo: "tw-opacity-0",
2684
2885
  afterLeave: () => t(""),
2685
- children: /* @__PURE__ */ S(xt.Options, { className: "tw-absolute tw-z-10 tw-max-h-[200px] tw-w-full tw-overflow-auto tw-bg-white tw-pb-[10px] tw-pt-[10px] tw-text-base tw-shadow-[0_1px_6px_0_rgba(0,0,0,0.5)] focus:tw-outline-none sm:tw-text-sm", children: e })
2886
+ children: /* @__PURE__ */ k(Ct.Options, { className: "tw-max-h-[200px] tw-w-full tw-overflow-auto tw-bg-white tw-pb-[10px] tw-pt-[10px] tw-text-base tw-shadow-[0_1px_6px_0_rgba(0,0,0,0.5)] focus:tw-outline-none sm:tw-text-sm [&::-webkit-scrollbar-thumb]:tw-rounded-md [&::-webkit-scrollbar-thumb]:tw-bg-[#a9a9a9] [&::-webkit-scrollbar]:tw-w-[6px]", children: e })
2686
2887
  }
2687
- ) }), Ql = We((e, t) => /* @__PURE__ */ S(xt.Option, { ref: t, className: e.className, value: e.value, disabled: e.disable, children: e.children }));
2688
- Ql.displayName = "SelectOption";
2689
- const us = ({
2888
+ ), os = Ke((e, t) => /* @__PURE__ */ k(Ct.Option, { ref: t, className: e.className, value: e.value, disabled: e.disable, children: e.children }));
2889
+ os.displayName = "SelectOption";
2890
+ const xs = ({
2690
2891
  children: e,
2691
2892
  selected: t,
2692
2893
  onSelect: n,
2693
2894
  setQuery: r,
2694
2895
  disable: i,
2695
- clearSearch: a = !1,
2896
+ clearSearch: s = !1,
2696
2897
  themeColor: o
2697
2898
  }) => {
2698
- const f = C(null), p = C(null), [b, v] = Q(!1);
2699
- let h = {};
2700
- Z(() => {
2899
+ const f = _(null), p = _(null), [b, v] = K(!1), [m, l] = K(!1), u = _(null), a = _(null), [c, d] = K({ left: 0, top: 0 }), h = _(0), I = _(0);
2900
+ let w = {};
2901
+ Y(() => {
2701
2902
  f.current && t && (f.current.value = t.label || "");
2702
2903
  }, [t]);
2703
- const l = (O) => {
2704
- n(O), c();
2705
- }, u = () => {
2706
- f.current && p.current && (a && (f.current.value = ""), p.current.click());
2707
- }, s = (O) => (c(), O?.label), c = () => {
2708
- const O = f.current;
2709
- O && O.setSelectionRange(O.value.length, O.value.length);
2710
- }, d = () => {
2904
+ const g = () => {
2905
+ h.current = window.innerHeight, I.current = document.body.scrollHeight, l(!0);
2906
+ };
2907
+ Y(() => (g(), window.addEventListener("resize", g), () => {
2908
+ window.addEventListener("resize", g);
2909
+ }), []);
2910
+ const R = () => I.current - (h.current + window.scrollY), E = () => {
2911
+ if (u.current) {
2912
+ const x = u.current.getBoundingClientRect();
2913
+ setTimeout(() => {
2914
+ const Z = a?.current?.getBoundingClientRect(), ne = R(), le = h.current - x.bottom;
2915
+ let M;
2916
+ if (Z) {
2917
+ const oe = x.height, J = x.top, q = Z.height, ue = q > J + window.scrollY;
2918
+ J < q && (ue || ue && le < q || ne > q || le > q) || J > q && le > q ? M = x.y + oe : M = x.y - q, d({
2919
+ left: x.left,
2920
+ top: M ?? x.top
2921
+ });
2922
+ }
2923
+ }, 0);
2924
+ }
2925
+ };
2926
+ Y(() => (window.addEventListener("scroll", E), window.addEventListener("resize", E), () => {
2927
+ window.removeEventListener("scroll", E), window.removeEventListener("resize", E);
2928
+ }), []);
2929
+ const j = (x) => {
2930
+ n(x), V();
2931
+ }, A = () => {
2932
+ E(), v(!0), f.current && t && (f.current.value = t.label || ""), f.current && p.current && (s && (f.current.value = "", r("")), p.current.click());
2933
+ }, T = (x) => (V(), x?.label), V = () => {
2934
+ const x = f.current;
2935
+ x && x.setSelectionRange(x.value.length, x.value.length);
2936
+ }, te = () => {
2711
2937
  v(!0);
2712
- }, m = () => {
2938
+ }, G = () => {
2713
2939
  v(!1);
2714
2940
  };
2715
2941
  if (o) {
2716
- const O = qe(o);
2717
- o = Re.convert3HexTo6(o), (O === "dark" || O === "light") && (h = {
2942
+ const x = Ge(o);
2943
+ o = De.convert3HexTo6(o), (x === "dark" || x === "light") && (w = {
2718
2944
  borderBottomColor: o === "#ffffff" ? "#c8c8c8" : b ? o : "#333333"
2719
2945
  });
2720
2946
  }
2721
- return /* @__PURE__ */ S(rt, { value: t, onChange: l, disabled: i, children: /* @__PURE__ */ we("div", { className: "tw-relative ", children: [
2947
+ return /* @__PURE__ */ k(ct, { value: t, onChange: j, disabled: i, children: ({ open: x }) => /* @__PURE__ */ we("div", { className: "tw-relative ", children: [
2722
2948
  /* @__PURE__ */ we(
2723
2949
  "div",
2724
2950
  {
2725
- className: `tw-relative tw-h-10 tw-w-full tw-cursor-default tw-overflow-hidden tw-bg-white tw-text-left focus:tw-outline-none focus-visible:tw-ring-1 focus-visible:tw-ring-[#DFDFDF] focus-visible:tw-ring-offset-2 focus-visible:tw-ring-offset-[#DFDFDF] sm:tw-text-sm ${i ? "tw-text-[#A7A7A7]" : "tw-text-[#333333]"}`,
2951
+ ref: u,
2952
+ className: `tw-relative tw-h-10 tw-w-full tw-cursor-default tw-overflow-hidden tw-bg-white tw-text-left focus:tw-outline-none focus-visible:tw-ring-1 focus-visible:tw-ring-[#DFDFDF] focus-visible:tw-ring-offset-2 focus-visible:tw-ring-offset-[#DFDFDF] ${i ? "tw-text-[#A7A7A7]" : "tw-text-[#333333]"}`,
2726
2953
  children: [
2727
- /* @__PURE__ */ S(
2728
- rt.Input,
2954
+ /* @__PURE__ */ k(
2955
+ ct.Input,
2729
2956
  {
2730
2957
  ref: f,
2731
2958
  "data-testid": "select-input",
2732
2959
  className: "tw-h-full tw-w-full tw-border-0 tw-border-b-[1px] tw-border-b-[#333333] tw-pb-2 tw-pl-[10px] tw-pr-10 tw-pt-2 tw-text-base tw-leading-5 tw-placeholder-[#666666] tw-shadow-none focus:tw-border-b-2 focus:tw-border-b-[#006bb1] focus:tw-pb-[7px] focus:tw-outline-none focus:tw-ring-[0px] focus-visible:tw-ring-[0px]",
2733
- displayValue: s,
2734
- onChange: (O) => r(O.target.value),
2735
- onClick: u,
2736
- onFocus: d,
2737
- onBlur: m,
2738
- style: { ...h },
2960
+ displayValue: T,
2961
+ onChange: (Z) => {
2962
+ r(Z.target.value), E();
2963
+ },
2964
+ onClick: A,
2965
+ onFocus: te,
2966
+ onBlur: G,
2967
+ onKeyDown: (Z) => {
2968
+ (Z.key === " " || Z.code === "Space") && E();
2969
+ },
2970
+ style: { ...w },
2739
2971
  placeholder: "Select your option",
2740
2972
  autoComplete: "off"
2741
2973
  }
2742
2974
  ),
2743
- /* @__PURE__ */ S(
2744
- rt.Button,
2975
+ /* @__PURE__ */ k(
2976
+ ct.Button,
2745
2977
  {
2746
2978
  className: "tw-absolute tw-inset-y-0 tw-right-0 tw-flex tw-items-center tw-pr-2",
2747
2979
  "data-testid": "select-button",
2748
2980
  ref: p,
2749
- children: /* @__PURE__ */ S(
2750
- Vr,
2981
+ onClick: E,
2982
+ children: /* @__PURE__ */ k(
2983
+ qr,
2751
2984
  {
2752
2985
  className: `tw-h-5 tw-w-5 ${i ? "tw-text-[#A7A7A7]" : "tw-text-[#333333]"}`,
2753
2986
  "aria-hidden": "true"
@@ -2758,67 +2991,95 @@ const us = ({
2758
2991
  ]
2759
2992
  }
2760
2993
  ),
2761
- e
2994
+ m ? Yt(
2995
+ /* @__PURE__ */ k(it, { children: x && /* @__PURE__ */ k(
2996
+ "div",
2997
+ {
2998
+ style: {
2999
+ position: "fixed",
3000
+ inset: 0,
3001
+ backgroundColor: "rgba(255,255,255,0)",
3002
+ zIndex: 1e3
3003
+ },
3004
+ children: /* @__PURE__ */ k(
3005
+ "div",
3006
+ {
3007
+ ref: a,
3008
+ className: "tw-absolute",
3009
+ style: {
3010
+ opacity: c.left ? 1 : 0,
3011
+ width: u.current ? u.current.clientWidth : "auto",
3012
+ left: c.left,
3013
+ top: c.top
3014
+ },
3015
+ children: e
3016
+ }
3017
+ )
3018
+ }
3019
+ ) }),
3020
+ document.body
3021
+ ) : null
2762
3022
  ] }) });
2763
- }, ds = ({ children: e, setQuery: t }) => /* @__PURE__ */ S(Qe, { children: /* @__PURE__ */ S(
2764
- Wr,
3023
+ }, ys = ({ children: e, setQuery: t }) => /* @__PURE__ */ k(
3024
+ zr,
2765
3025
  {
2766
- as: Le,
3026
+ as: je,
2767
3027
  leave: "tw-transition tw-ease-in tw-duration-100",
2768
3028
  leaveFrom: "tw-opacity-100",
2769
3029
  leaveTo: "tw-opacity-0",
2770
3030
  afterLeave: () => t(""),
2771
- children: /* @__PURE__ */ S(rt.Options, { className: "tw-absolute tw-z-10 tw-max-h-[210px] tw-w-full tw-overflow-auto tw-bg-white tw-pb-[10px] tw-pt-[10px] tw-text-base tw-shadow-[0_1px_6px_0_rgba(0,0,0,0.5)] focus:tw-outline-none sm:tw-text-sm", children: e })
3031
+ children: /* @__PURE__ */ k(ct.Options, { className: "tw-max-h-[210px] tw-w-full tw-overflow-auto tw-bg-white tw-pb-[10px] tw-pt-[10px] tw-text-base tw-shadow-[0_1px_6px_0_rgba(0,0,0,0.5)] focus:tw-outline-none sm:tw-text-sm [&::-webkit-scrollbar-thumb]:tw-rounded-md [&::-webkit-scrollbar-thumb]:tw-bg-[#a9a9a9] [&::-webkit-scrollbar]:tw-w-[6px]", children: e })
2772
3032
  }
2773
- ) }), Xl = We((e, t) => /* @__PURE__ */ S(rt.Option, { ref: t, className: e.className, value: e.value, disabled: e.disable, children: e.children }));
2774
- Xl.displayName = "Option";
2775
- const Zl = "_textInputWrapper_8485r_1", Jl = "_textInput_8485r_1", On = {
2776
- textInputWrapper: Zl,
2777
- textInput: Jl
2778
- }, fs = Y.memo(
2779
- We(
2780
- ({ themeColor: e = "", style: t = {}, className: n = "", onFocus: r, onBlur: i, ...a }, o) => {
2781
- const [f, p] = Q(!1);
3033
+ ), as = Ke((e, t) => /* @__PURE__ */ k(ct.Option, { ref: t, className: e.className, value: e.value, disabled: e.disable, children: e.children }));
3034
+ as.displayName = "AutoCompleteOption";
3035
+ const ls = "_textInputWrapper_gym4n_1", ss = "_textInput_gym4n_1", En = {
3036
+ textInputWrapper: ls,
3037
+ textInput: ss
3038
+ }, ks = ee.memo(
3039
+ Ke(
3040
+ ({ themeColor: e = "", style: t = {}, className: n = "", onFocus: r, onBlur: i, ...s }, o) => {
3041
+ const [f, p] = K(!1);
2782
3042
  let b = {};
2783
- const v = [On.textInput, n].filter(Boolean).join(" ");
2784
- e = Re.convert3HexTo6(e);
2785
- const h = () => {
3043
+ const v = [En.textInput, n].filter(Boolean).join(" ");
3044
+ e = De.convert3HexTo6(e);
3045
+ const m = () => {
2786
3046
  p(!0);
2787
3047
  }, l = () => {
2788
3048
  p(!1);
2789
3049
  };
2790
3050
  return b = {
2791
3051
  borderBottomColor: f ? e !== "#ffffff" ? e : "#c8c8c8" : ""
2792
- }, /* @__PURE__ */ S("div", { className: On.textInputWrapper, children: /* @__PURE__ */ S(
3052
+ }, /* @__PURE__ */ k("div", { className: En.textInputWrapper, children: /* @__PURE__ */ k(
2793
3053
  "input",
2794
3054
  {
2795
3055
  type: "text",
2796
3056
  "data-testid": "textbox-input",
2797
3057
  ref: o,
2798
3058
  className: v,
2799
- onFocus: h,
3059
+ onFocus: m,
2800
3060
  onBlur: l,
2801
3061
  style: { ...b, ...t },
2802
- ...a
3062
+ ...s
2803
3063
  }
2804
3064
  ) });
2805
3065
  }
2806
3066
  )
2807
3067
  );
2808
3068
  export {
2809
- us as AutoComplete,
2810
- Tn as Button,
2811
- Bt as Checkbox,
2812
- rs as MultiLineInput,
2813
- is as MultiSelect,
2814
- Xl as Option,
2815
- ds as Options,
2816
- os as QuickMultiSelect,
2817
- as as QuickSelect,
2818
- va as Scrollbar,
2819
- ss as Select,
2820
- Ql as SelectOption,
2821
- cs as SelectOptions,
2822
- fs as SingleLineInput
3069
+ xs as AutoComplete,
3070
+ as as AutoCompleteOption,
3071
+ ys as AutoCompleteOptions,
3072
+ Cn as Button,
3073
+ Pn as Checkbox,
3074
+ De as ColorsService,
3075
+ ps as MultiLineInput,
3076
+ bs as MultiSelect,
3077
+ vs as QuickMultiSelect,
3078
+ ms as QuickSelect,
3079
+ Sa as Scrollbar,
3080
+ ws as Select,
3081
+ os as SelectOption,
3082
+ gs as SelectOptions,
3083
+ ks as SingleLineInput
2823
3084
  };
2824
3085
  //# sourceMappingURL=ui-react.es.js.map