@oncehub/ui-react 1.3.4 → 1.3.5-beta1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,139 +1,145 @@
1
1
  import "./index.css";
2
- import { jsx as O, Fragment as Ye, jsxs as we } from "react/jsx-runtime";
2
+ import { jsx as S, Fragment as Qe, jsxs as we } from "react/jsx-runtime";
3
3
  import * as Pe from "react";
4
- import Y, { forwardRef as De, useState as Z, useEffect as X, useRef as C, useLayoutEffect as jr, Fragment as Le, isValidElement as qr, cloneElement as Hr, createElement as zr, createContext as je, useContext as We, useMemo as te, useReducer as On, createRef as Sn, useCallback as ze } from "react";
5
- const Kr = "_button_6yspz_1", Gr = "_primary_6yspz_5", Yr = "_secondary_6yspz_12", Qr = "_small_6yspz_19", Xr = "_rounded_6yspz_22", Zr = "_medium_6yspz_26", Jr = "_large_6yspz_33", ei = "_squared_6yspz_40", ut = {
6
- button: Kr,
7
- primary: Gr,
8
- secondary: Yr,
9
- small: Qr,
10
- rounded: Xr,
11
- medium: Zr,
12
- large: Jr,
13
- squared: ei
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
14
  }, qe = (e) => {
15
15
  if (!e)
16
16
  throw new Error("Please provide a hex color code");
17
17
  if (!/^#([A-Fa-f0-9]{3}){1,2}$/.test(e))
18
18
  throw new Error("Please provide a valid hex code");
19
19
  e = e.length === 4 ? e.replace(/^#(.)(.)(.)$/, "#$1$1$2$2$3$3") : e;
20
- const r = e.substring(1), [i, l, o] = [0, 2, 4].map(
20
+ const r = e.substring(1), [i, a, o] = [0, 2, 4].map(
21
21
  (p) => parseInt(r.substring(p, p + 2), 16)
22
22
  );
23
- return (0.2126 * i + 0.7152 * l + 0.0722 * o) / 255 < 0.7 ? "dark" : "light";
24
- }, kn = De(
23
+ return (0.2126 * i + 0.7152 * a + 0.0722 * o) / 255 < 0.7 ? "dark" : "light";
24
+ };
25
+ class Re {
26
+ static convert3HexTo6(t) {
27
+ 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
+ }
30
+ const Tn = We(
25
31
  ({
26
32
  themeColor: e = "",
27
33
  variant: t = "primary",
28
34
  size: n = "small",
29
35
  shape: r = "rounded",
30
36
  children: i,
31
- className: l = "",
37
+ className: a = "",
32
38
  style: o = {},
33
39
  ...f
34
40
  }, p) => {
35
41
  let b = {};
36
42
  if (e) {
37
- const m = qe(e);
38
- if (m === "dark" || m === "light") {
39
- const s = t === "primary" ? e : "#ffffff", c = t === "primary" ? m === "dark" ? "#ffffff" : "#333333" : m === "light" ? "#333333" : e, a = e === "#ffffff" ? "#333333" : 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;
40
46
  b = {
41
- backgroundColor: s,
42
- color: c,
43
- outlineColor: a,
44
- borderColor: a
47
+ backgroundColor: l,
48
+ color: u,
49
+ outlineColor: s,
50
+ borderColor: s
45
51
  };
46
52
  }
47
53
  }
48
- const v = [ut.button, ut[t], ut[n], ut[r], l].filter(Boolean).join(" ");
49
- return /* @__PURE__ */ O(Ye, { children: /* @__PURE__ */ O("button", { ref: p, style: { ...b, ...o }, className: `${v}`, ...f, children: i }) });
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 }) });
50
56
  }
51
57
  );
52
- kn.displayName = "Button";
53
- const ti = "_checkboxLayout_yowbu_1", ni = "_checkboxLabel_yowbu_4", ri = "_checkboxInnerContainer_yowbu_10", ii = "_checkboxInput_yowbu_13", oi = "_checkboxFrame_yowbu_16", ai = "_checkboxCheckMark_yowbu_19", li = "_checkboxCheckMarkPath_yowbu_22", si = "_checkboxUncheckedChecked_yowbu_1", ci = "_checkboxDisabled_yowbu_43", ui = "_medium_yowbu_49", di = "_large_yowbu_55", Ce = {
54
- checkboxLayout: ti,
55
- checkboxLabel: ni,
56
- checkboxInnerContainer: ri,
57
- checkboxInput: ii,
58
- checkboxFrame: oi,
59
- checkboxCheckMark: ai,
60
- checkboxCheckMarkPath: li,
61
- checkboxUncheckedChecked: si,
62
- checkboxDisabled: ci,
63
- medium: ui,
64
- large: di
65
- }, fi = () => `checkbox_${Math.random().toString(36).substring(2, 11)}`, Vt = De(
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(
66
72
  ({
67
73
  children: e,
68
74
  themeColor: t = "",
69
75
  checkboxSize: n = "medium",
70
- id: r = fi(),
76
+ id: r = pi(),
71
77
  checked: i = !1,
72
- disabled: l = !1,
78
+ disabled: a = !1,
73
79
  className: o = "",
74
80
  onChange: f,
75
81
  style: p = {},
76
82
  tabIndex: b,
77
83
  ...v
78
- }, m) => {
79
- const [s, c] = Z(i);
80
- let a = {}, d, u = l ? "#9b9b9b" : "#ffffff";
84
+ }, h) => {
85
+ const [l, u] = Q(i);
86
+ let s = {}, c, d = a ? "#9b9b9b" : "#ffffff";
81
87
  if (t) {
82
88
  const g = qe(t);
83
- if (g === "dark" || g === "light") {
89
+ if (t = Re.convert3HexTo6(t), g === "dark" || g === "light") {
84
90
  switch (g) {
85
91
  case "dark":
86
- u = l ? s ? "#9b9b9b" : "#f9f9f9" : "#ffffff";
92
+ d = a ? l ? "#9b9b9b" : "#f9f9f9" : "#ffffff";
87
93
  break;
88
94
  case "light":
89
- u = l ? s ? "#9b9b9b" : "#f9f9f9" : s ? "#333333" : "#ffffff";
95
+ d = a ? l ? "#9b9b9b" : "#f9f9f9" : l ? "#333333" : "#ffffff";
90
96
  break;
91
97
  default:
92
- u = "#9b9b9b";
98
+ d = "#9b9b9b";
93
99
  break;
94
100
  }
95
- const V = l ? "#f9f9f9" : s ? t : "#ffffff";
96
- d = l ? "#e4e4e4" : t == "#ffffff" || t == "#fff" ? "#333333" : t, s && (a = {
97
- backgroundColor: V,
98
- borderColor: d,
99
- outlineColor: d
101
+ const W = a ? "#f9f9f9" : l ? t : "#ffffff";
102
+ c = a ? "#e4e4e4" : t == "#ffffff" ? "#333333" : t, l && (s = {
103
+ backgroundColor: W,
104
+ borderColor: c,
105
+ outlineColor: c
100
106
  });
101
107
  }
102
108
  }
103
- const h = l ? Ce.checkboxDisabled : "", I = [Ce.checkboxLayout, Ce[n], h, o].filter(Boolean).join(" "), w = (g) => {
104
- g.key != "Enter" && (g.preventDefault(), f?.(g.target.checked), c(!s));
109
+ const m = a ? Ce.checkboxDisabled : "", O = [Ce.checkboxLayout, Ce[n], m, o].filter(Boolean).join(" "), w = (g) => {
110
+ g.key != "Enter" && (g.preventDefault(), f?.(g.target.checked), u(!l));
105
111
  };
106
- return /* @__PURE__ */ O(Ye, { children: /* @__PURE__ */ O("div", { className: I, "data-testid": "checkbox", children: /* @__PURE__ */ we("label", { className: Ce.checkboxLabel, htmlFor: r, onClick: (g) => w(g), children: [
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: [
107
113
  /* @__PURE__ */ we(
108
114
  "div",
109
115
  {
110
116
  className: Ce.checkboxInnerContainer,
111
- tabIndex: b || l ? -1 : 0,
117
+ tabIndex: b || a ? -1 : 0,
112
118
  onKeyPress: (g) => w(g),
113
119
  "data-testid": "checkbox-inner-container",
114
120
  children: [
115
- /* @__PURE__ */ O(
121
+ /* @__PURE__ */ S(
116
122
  "input",
117
123
  {
118
124
  className: Ce.checkboxInput,
119
125
  onChange: (g) => w(g),
120
126
  type: "checkbox",
121
- checked: s,
122
- disabled: l,
127
+ checked: l,
128
+ disabled: a,
123
129
  id: r,
124
- ref: m,
130
+ ref: h,
125
131
  ...v,
126
132
  tabIndex: -1,
127
133
  "data-testid": "checkbox-input"
128
134
  }
129
135
  ),
130
- /* @__PURE__ */ O(
136
+ /* @__PURE__ */ S(
131
137
  "div",
132
138
  {
133
139
  className: Ce.checkboxFrame,
134
- style: { ...a, ...p },
140
+ style: { ...s, ...p },
135
141
  "data-testid": "checkbox-frame",
136
- children: /* @__PURE__ */ O(
142
+ children: /* @__PURE__ */ S(
137
143
  "svg",
138
144
  {
139
145
  version: "1.1",
@@ -141,12 +147,12 @@ const ti = "_checkboxLayout_yowbu_1", ni = "_checkboxLabel_yowbu_4", ri = "_chec
141
147
  className: Ce.checkboxCheckMark,
142
148
  viewBox: "0 0 24 24",
143
149
  "data-testid": "check-mark-svg",
144
- children: /* @__PURE__ */ O(
150
+ children: /* @__PURE__ */ S(
145
151
  "path",
146
152
  {
147
153
  className: Ce.checkboxCheckMarkPath,
148
154
  fill: "none",
149
- stroke: u,
155
+ stroke: d,
150
156
  d: "M4.1,12.7 9,17.6 20.3,6.3"
151
157
  }
152
158
  )
@@ -157,109 +163,109 @@ const ti = "_checkboxLayout_yowbu_1", ni = "_checkboxLabel_yowbu_4", ri = "_chec
157
163
  ]
158
164
  }
159
165
  ),
160
- e && /* @__PURE__ */ O("span", { "data-testid": "checkbox-label", children: e })
166
+ e && /* @__PURE__ */ S("span", { "data-testid": "checkbox-label", children: e })
161
167
  ] }) }) });
162
168
  }
163
169
  );
164
- Vt.displayName = "Checkbox";
165
- const pi = "_textInputWrapper_stjey_1", bi = "_textInput_stjey_1", sn = {
166
- textInputWrapper: pi,
167
- textInput: bi
170
+ Bt.displayName = "Checkbox";
171
+ const bi = "_textInputWrapper_3upxq_1", vi = "_textInput_3upxq_1", cn = {
172
+ textInputWrapper: bi,
173
+ textInput: vi
168
174
  };
169
- var vi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, y = {}, At = { exports: {} };
175
+ var mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, y = {}, Mt = { exports: {} };
170
176
  (function(e, t) {
171
177
  (function(n, r) {
172
- var i = "1.0.37", l = "", o = "?", f = "function", p = "undefined", b = "object", v = "string", m = "major", s = "model", c = "name", a = "type", d = "vendor", u = "version", h = "architecture", I = "console", w = "mobile", g = "tablet", V = "smarttv", F = "wearable", q = "embedded", $ = 500, S = "Amazon", z = "Apple", ee = "ASUS", ne = "BlackBerry", _ = "Browser", T = "Chrome", L = "Edge", A = "Firefox", W = "Google", re = "Huawei", ie = "LG", pe = "Microsoft", me = "Motorola", se = "Opera", oe = "Samsung", x = "Sharp", E = "Sony", M = "Xiaomi", he = "Zebra", Fe = "Facebook", tn = "Chromium OS", nn = "Mac OS", Vr = function(D, H) {
173
- var N = {};
174
- for (var K in D)
175
- H[K] && H[K].length % 2 === 0 ? N[K] = H[K].concat(D[K]) : N[K] = D[K];
176
- return N;
177
- }, st = function(D) {
178
- for (var H = {}, N = 0; N < D.length; N++)
179
- H[D[N].toUpperCase()] = D[N];
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) {
179
+ var F = {};
180
+ for (var K in $)
181
+ H[K] && H[K].length % 2 === 0 ? F[K] = H[K].concat($[K]) : F[K] = $[K];
182
+ return F;
183
+ }, ut = function($) {
184
+ for (var H = {}, F = 0; F < $.length; F++)
185
+ H[$[F].toUpperCase()] = $[F];
180
186
  return H;
181
- }, rn = function(D, H) {
182
- return typeof D === v ? Ze(H).indexOf(Ze(D)) !== -1 : !1;
183
- }, Ze = function(D) {
184
- return D.toLowerCase();
185
- }, Br = function(D) {
186
- return typeof D === v ? D.replace(/[^\d\.]/g, l).split(".")[0] : r;
187
- }, Et = function(D, H) {
188
- if (typeof D === v)
189
- return D = D.replace(/^\s\s*/, l), typeof H === p ? D : D.substring(0, $);
190
- }, Je = function(D, H) {
191
- for (var N = 0, K, Ae, ke, B, R, Te; N < H.length && !R; ) {
192
- var _t = H[N], ln = H[N + 1];
193
- for (K = Ae = 0; K < _t.length && !R && _t[K]; )
194
- if (R = _t[K++].exec(D), R)
195
- for (ke = 0; ke < ln.length; ke++)
196
- Te = R[++Ae], B = ln[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;
197
- N += 2;
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;
203
+ F += 2;
198
204
  }
199
- }, It = function(D, H) {
200
- for (var N in H)
201
- if (typeof H[N] === b && H[N].length > 0) {
202
- for (var K = 0; K < H[N].length; K++)
203
- if (rn(H[N][K], D))
204
- return N === o ? r : N;
205
- } else if (rn(H[N], D))
206
- return N === o ? r : N;
207
- return D;
208
- }, 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", "?": "/" }, on = { 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" }, an = { browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [u, [c, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [u, [c, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [c, u], [/opios[\/ ]+([\w\.]+)/i], [u, [c, se + " Mini"]], [/\bopr\/([\w\.]+)/i], [u, [c, se]], [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i], [u, [c, "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], [c, u], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [u, [c, "UC" + _]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i, /micromessenger\/([\w\.]+)/i], [u, [c, "WeChat"]], [/konqueror\/([\w\.]+)/i], [u, [c, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [u, [c, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [u, [c, "Yandex"]], [/slbrowser\/([\w\.]+)/i], [u, [c, "Smart Lenovo " + _]], [/(avast|avg)\/([\w\.]+)/i], [[c, /(.+)/, "$1 Secure " + _], u], [/\bfocus\/([\w\.]+)/i], [u, [c, A + " Focus"]], [/\bopt\/([\w\.]+)/i], [u, [c, se + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [u, [c, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [u, [c, "Dolphin"]], [/coast\/([\w\.]+)/i], [u, [c, se + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [u, [c, "MIUI " + _]], [/fxios\/([-\w\.]+)/i], [u, [c, A]], [/\bqihu|(qi?ho?o?|360)browser/i], [[c, "360 " + _]], [/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i], [[c, /(.+)/, "$1 " + _], u], [/samsungbrowser\/([\w\.]+)/i], [u, [c, oe + " Internet"]], [/(comodo_dragon)\/([\w\.]+)/i], [[c, /_/g, " "], u], [/metasr[\/ ]?([\d\.]+)/i], [u, [c, "Sogou Explorer"]], [/(sogou)mo\w+\/([\d\.]+)/i], [[c, "Sogou Mobile"], u], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i], [c, u], [/(lbbrowser)/i, /\[(linkedin)app\]/i], [c], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[c, Fe], u], [/(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], [c, u], [/\bgsa\/([\w\.]+) .*safari\//i], [u, [c, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [u, [c, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [u, [c, T + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[c, T + " WebView"], u], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [u, [c, "Android " + _]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [c, u], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [u, [c, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [u, c], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [c, [u, It, Ur]], [/(webkit|khtml)\/([\w\.]+)/i], [c, u], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[c, "Netscape"], u], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [u, [c, A + " 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], [c, u], [/(cobalt)\/([\w\.]+)/i], [c, [u, /master.|lts./, ""]]], cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[h, "amd64"]], [/(ia32(?=;))/i], [[h, Ze]], [/((?: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/, l, Ze]], [/(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, Ze]]], 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], [s, [d, oe], [a, g]], [/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]([-\w]+)/i, /sec-(sgh\w+)/i], [s, [d, oe], [a, w]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [s, [d, z], [a, w]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [s, [d, z], [a, g]], [/(macintosh);/i], [s, [d, z]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [s, [d, x], [a, w]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [s, [d, re], [a, g]], [/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [s, [d, re], [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], [[s, /_/g, " "], [d, M], [a, w]], [/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[s, /_/g, " "], [d, M], [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], [s, [d, "OPPO"], [a, w]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [s, [d, "Vivo"], [a, w]], [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i], [s, [d, "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], [s, [d, me], [a, w]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [s, [d, me], [a, g]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [s, [d, ie], [a, g]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [s, [d, ie], [a, w]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [s, [d, "Lenovo"], [a, g]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[s, /_/g, " "], [d, "Nokia"], [a, w]], [/(pixel c)\b/i], [s, [d, W], [a, g]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [s, [d, W], [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], [s, [d, E], [a, w]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[s, "Xperia Tablet"], [d, E], [a, g]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [s, [d, "OnePlus"], [a, w]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [s, [d, S], [a, g]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[s, /(.+)/g, "Fire Phone $1"], [d, S], [a, w]], [/(playbook);[-\w\),; ]+(rim)/i], [s, d, [a, g]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [s, [d, ne], [a, w]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [s, [d, ee], [a, g]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [s, [d, ee], [a, w]], [/(nexus 9)/i], [s, [d, "HTC"], [a, g]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [d, [s, /_/g, " "], [a, w]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [s, [d, "Acer"], [a, g]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [s, [d, "Meizu"], [a, w]], [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i], [s, [d, "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], [d, s, [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], [d, s, [a, g]], [/(surface duo)/i], [s, [d, pe], [a, g]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [s, [d, "Fairphone"], [a, w]], [/(u304aa)/i], [s, [d, "AT&T"], [a, w]], [/\bsie-(\w*)/i], [s, [d, "Siemens"], [a, w]], [/\b(rct\w+) b/i], [s, [d, "RCA"], [a, g]], [/\b(venue[\d ]{2,7}) b/i], [s, [d, "Dell"], [a, g]], [/\b(q(?:mv|ta)\w+) b/i], [s, [d, "Verizon"], [a, g]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [s, [d, "Barnes & Noble"], [a, g]], [/\b(tm\d{3}\w+) b/i], [s, [d, "NuVision"], [a, g]], [/\b(k88) b/i], [s, [d, "ZTE"], [a, g]], [/\b(nx\d{3}j) b/i], [s, [d, "ZTE"], [a, w]], [/\b(gen\d{3}) b.+49h/i], [s, [d, "Swiss"], [a, w]], [/\b(zur\d{3}) b/i], [s, [d, "Swiss"], [a, g]], [/\b((zeki)?tb.*\b) b/i], [s, [d, "Zeki"], [a, g]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[d, "Dragon Touch"], s, [a, g]], [/\b(ns-?\w{0,9}) b/i], [s, [d, "Insignia"], [a, g]], [/\b((nxa|next)-?\w{0,9}) b/i], [s, [d, "NextBook"], [a, g]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[d, "Voice"], s, [a, w]], [/\b(lvtel\-)?(v1[12]) b/i], [[d, "LvTel"], s, [a, w]], [/\b(ph-1) /i], [s, [d, "Essential"], [a, w]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [s, [d, "Envizen"], [a, g]], [/\b(trio[-\w\. ]+) b/i], [s, [d, "MachSpeed"], [a, g]], [/\btu_(1491) b/i], [s, [d, "Rotor"], [a, g]], [/(shield[\w ]+) b/i], [s, [d, "Nvidia"], [a, g]], [/(sprint) (\w+)/i], [d, s, [a, w]], [/(kin\.[onetw]{3})/i], [[s, /\./g, " "], [d, pe], [a, w]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [s, [d, he], [a, g]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [s, [d, he], [a, w]], [/smart-tv.+(samsung)/i], [d, [a, V]], [/hbbtv.+maple;(\d+)/i], [[s, /^/, "SmartTV"], [d, oe], [a, V]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[d, ie], [a, V]], [/(apple) ?tv/i], [d, [s, z + " TV"], [a, V]], [/crkey/i], [[s, T + "cast"], [d, W], [a, V]], [/droid.+aft(\w+)( bui|\))/i], [s, [d, S], [a, V]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [s, [d, x], [a, V]], [/(bravia[\w ]+)( bui|\))/i], [s, [d, E], [a, V]], [/(mitv-\w{5}) bui/i], [s, [d, M], [a, V]], [/Hbbtv.*(technisat) (.*);/i], [d, s, [a, V]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[d, Et], [s, Et], [a, V]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[a, V]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [d, s, [a, I]], [/droid.+; (shield) bui/i], [s, [d, "Nvidia"], [a, I]], [/(playstation [345portablevi]+)/i], [s, [d, E], [a, I]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [s, [d, pe], [a, I]], [/((pebble))app/i], [d, s, [a, F]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [s, [d, z], [a, F]], [/droid.+; (glass) \d/i], [s, [d, W], [a, F]], [/droid.+; (wt63?0{2,3})\)/i], [s, [d, he], [a, F]], [/(quest( 2| pro)?)/i], [s, [d, Fe], [a, F]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [d, [a, q]], [/(aeobc)\b/i], [s, [d, S], [a, q]], [/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i], [s, [a, w]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [s, [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], [s, [d, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [u, [c, L + "HTML"]], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [u, [c, "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], [c, u], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [u, c]], os: [[/microsoft (windows) (vista|xp)/i], [c, u], [/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i], [c, [u, It, on]], [/windows nt 6\.2; (arm)/i, /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i, /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[u, It, on], [c, "Windows"]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[u, /_/g, "."], [c, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[c, nn], [u, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [u, c], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [c, u], [/\(bb(10);/i], [u, [c, ne]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [u, [c, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [u, [c, A + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [u, [c, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [u, [c, "watchOS"]], [/crkey\/([\d\.]+)/i], [u, [c, T + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[c, tn], u], [/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], [c, u], [/(sunos) ?([\w\.\d]*)/i], [[c, "Solaris"], u], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [c, u]] }, Oe = function(D, H) {
209
- if (typeof D === b && (H = D, D = r), !(this instanceof Oe))
210
- return new Oe(D, H).getResult();
211
- var N = typeof n !== p && n.navigator ? n.navigator : r, K = D || (N && N.userAgent ? N.userAgent : l), Ae = N && N.userAgentData ? N.userAgentData : r, ke = H ? Vr(an, H) : an, B = N && N.userAgent == K;
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], $))
210
+ return F === o ? r : F;
211
+ } else if (on(H[F], $))
212
+ 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;
212
218
  return this.getBrowser = function() {
213
- var R = {};
214
- return R[c] = r, R[u] = r, Je.call(R, K, ke.browser), R[m] = Br(R[u]), B && N && N.brave && typeof N.brave.isBrave == f && (R[c] = "Brave"), R;
219
+ 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;
215
221
  }, this.getCPU = function() {
216
- var R = {};
217
- return R[h] = r, Je.call(R, K, ke.cpu), R;
222
+ var N = {};
223
+ return N[m] = r, et.call(N, K, ke.cpu), N;
218
224
  }, this.getDevice = function() {
219
- var R = {};
220
- return R[d] = r, R[s] = r, R[a] = r, Je.call(R, K, ke.device), B && !R[a] && Ae && Ae.mobile && (R[a] = w), B && R[s] == "Macintosh" && N && typeof N.standalone !== p && N.maxTouchPoints && N.maxTouchPoints > 2 && (R[s] = "iPad", R[a] = g), R;
225
+ 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;
221
227
  }, this.getEngine = function() {
222
- var R = {};
223
- return R[c] = r, R[u] = r, Je.call(R, K, ke.engine), R;
228
+ var N = {};
229
+ return N[u] = r, N[d] = r, et.call(N, K, ke.engine), N;
224
230
  }, this.getOS = function() {
225
- var R = {};
226
- return R[c] = r, R[u] = r, Je.call(R, K, ke.os), B && !R[c] && Ae && Ae.platform != "Unknown" && (R[c] = Ae.platform.replace(/chrome os/i, tn).replace(/macos/i, nn)), R;
231
+ 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;
227
233
  }, this.getResult = function() {
228
234
  return { ua: this.getUA(), browser: this.getBrowser(), engine: this.getEngine(), os: this.getOS(), device: this.getDevice(), cpu: this.getCPU() };
229
235
  }, this.getUA = function() {
230
236
  return K;
231
- }, this.setUA = function(R) {
232
- return K = typeof R === v && R.length > $ ? Et(R, $) : R, this;
237
+ }, this.setUA = function(N) {
238
+ return K = typeof N === v && N.length > M ? It(N, M) : N, this;
233
239
  }, this.setUA(K), this;
234
240
  };
235
- Oe.VERSION = i, Oe.BROWSER = st([c, u, m]), Oe.CPU = st([h]), Oe.DEVICE = st([s, d, a, I, w, V, g, F, q]), Oe.ENGINE = Oe.OS = st([c, u]), e.exports && (t = e.exports = Oe), t.UAParser = Oe;
236
- var He = typeof n !== p && (n.jQuery || n.Zepto);
237
- if (He && !He.ua) {
238
- var ct = new Oe();
239
- He.ua = ct.getResult(), He.ua.get = function() {
240
- return ct.getUA();
241
- }, He.ua.set = function(D) {
242
- ct.setUA(D);
243
- var H = ct.getResult();
244
- for (var N in H)
245
- He.ua[N] = H[N];
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];
246
252
  };
247
253
  }
248
- })(typeof window == "object" ? window : vi);
249
- })(At, At.exports);
250
- var mi = At.exports;
254
+ })(typeof window == "object" ? window : mi);
255
+ })(Mt, Mt.exports);
256
+ var hi = Mt.exports;
251
257
  Object.defineProperty(y, "__esModule", { value: !0 });
252
- function hi(e) {
258
+ function wi(e) {
253
259
  return e && typeof e == "object" && "default" in e ? e.default : e;
254
260
  }
255
- var ue = Y, G = hi(ue), Tn = mi, Ve = new Tn(), de = Ve.getBrowser(), wi = Ve.getCPU(), ge = Ve.getDevice(), Bt = Ve.getEngine(), Be = Ve.getOS(), nt = Ve.getUA(), En = function(t) {
256
- return Ve.setUA(t);
257
- }, rt = function(t) {
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) {
258
264
  if (!t) {
259
265
  console.error("No userAgent string was provided");
260
266
  return;
261
267
  }
262
- var n = new Tn(t);
268
+ var n = new En(t);
263
269
  return {
264
270
  UA: n,
265
271
  browser: n.getBrowser(),
@@ -272,18 +278,18 @@ var ue = Y, G = hi(ue), Tn = mi, Ve = new Tn(), de = Ve.getBrowser(), wi = Ve.ge
272
278
  return n.setUA(i);
273
279
  }
274
280
  };
275
- }, In = /* @__PURE__ */ Object.freeze({
276
- ClientUAInstance: Ve,
277
- browser: de,
278
- cpu: wi,
281
+ }, _n = /* @__PURE__ */ Object.freeze({
282
+ ClientUAInstance: Be,
283
+ browser: fe,
284
+ cpu: gi,
279
285
  device: ge,
280
- engine: Bt,
281
- os: Be,
282
- ua: nt,
283
- setUa: En,
284
- parseUserAgent: rt
286
+ engine: jt,
287
+ os: je,
288
+ ua: it,
289
+ setUa: In,
290
+ parseUserAgent: ot
285
291
  });
286
- function cn(e, t) {
292
+ function un(e, t) {
287
293
  var n = Object.keys(e);
288
294
  if (Object.getOwnPropertySymbols) {
289
295
  var r = Object.getOwnPropertySymbols(e);
@@ -293,39 +299,39 @@ function cn(e, t) {
293
299
  }
294
300
  return n;
295
301
  }
296
- function gi(e) {
302
+ function xi(e) {
297
303
  for (var t = 1; t < arguments.length; t++) {
298
304
  var n = arguments[t] != null ? arguments[t] : {};
299
- t % 2 ? cn(Object(n), !0).forEach(function(r) {
300
- Oi(e, r, n[r]);
301
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : cn(Object(n)).forEach(function(r) {
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) {
302
308
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
303
309
  });
304
310
  }
305
311
  return e;
306
312
  }
307
- function et(e) {
313
+ function nt(e) {
308
314
  "@babel/helpers - typeof";
309
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? et = function(t) {
315
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? nt = function(t) {
310
316
  return typeof t;
311
- } : et = function(t) {
317
+ } : nt = function(t) {
312
318
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
313
- }, et(e);
319
+ }, nt(e);
314
320
  }
315
- function xi(e, t) {
321
+ function yi(e, t) {
316
322
  if (!(e instanceof t))
317
323
  throw new TypeError("Cannot call a class as a function");
318
324
  }
319
- function un(e, t) {
325
+ function dn(e, t) {
320
326
  for (var n = 0; n < t.length; n++) {
321
327
  var r = t[n];
322
328
  r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
323
329
  }
324
330
  }
325
- function yi(e, t, n) {
326
- return t && un(e.prototype, t), n && un(e, n), e;
327
- }
328
331
  function Oi(e, t, n) {
332
+ return t && dn(e.prototype, t), n && dn(e, n), e;
333
+ }
334
+ function Si(e, t, n) {
329
335
  return t in e ? Object.defineProperty(e, t, {
330
336
  value: n,
331
337
  enumerable: !0,
@@ -333,17 +339,17 @@ function Oi(e, t, n) {
333
339
  writable: !0
334
340
  }) : e[t] = n, e;
335
341
  }
336
- function $t() {
337
- return $t = Object.assign || function(e) {
342
+ function Dt() {
343
+ return Dt = Object.assign || function(e) {
338
344
  for (var t = 1; t < arguments.length; t++) {
339
345
  var n = arguments[t];
340
346
  for (var r in n)
341
347
  Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
342
348
  }
343
349
  return e;
344
- }, $t.apply(this, arguments);
350
+ }, Dt.apply(this, arguments);
345
351
  }
346
- function Si(e, t) {
352
+ function ki(e, t) {
347
353
  if (typeof t != "function" && t !== null)
348
354
  throw new TypeError("Super expression must either be null or a function");
349
355
  e.prototype = Object.create(t && t.prototype, {
@@ -352,98 +358,98 @@ function Si(e, t) {
352
358
  writable: !0,
353
359
  configurable: !0
354
360
  }
355
- }), t && Dt(e, t);
361
+ }), t && Wt(e, t);
356
362
  }
357
- function Mt(e) {
358
- return Mt = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) {
363
+ function $t(e) {
364
+ return $t = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) {
359
365
  return n.__proto__ || Object.getPrototypeOf(n);
360
- }, Mt(e);
366
+ }, $t(e);
361
367
  }
362
- function Dt(e, t) {
363
- return Dt = Object.setPrototypeOf || function(r, i) {
368
+ function Wt(e, t) {
369
+ return Wt = Object.setPrototypeOf || function(r, i) {
364
370
  return r.__proto__ = i, r;
365
- }, Dt(e, t);
371
+ }, Wt(e, t);
366
372
  }
367
- function ki(e, t) {
373
+ function Ti(e, t) {
368
374
  if (e == null)
369
375
  return {};
370
- var n = {}, r = Object.keys(e), i, l;
371
- for (l = 0; l < r.length; l++)
372
- i = r[l], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
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]);
373
379
  return n;
374
380
  }
375
381
  function xe(e, t) {
376
382
  if (e == null)
377
383
  return {};
378
- var n = ki(e, t), r, i;
384
+ var n = Ti(e, t), r, i;
379
385
  if (Object.getOwnPropertySymbols) {
380
- var l = Object.getOwnPropertySymbols(e);
381
- for (i = 0; i < l.length; i++)
382
- r = l[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
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]);
383
389
  }
384
390
  return n;
385
391
  }
386
- function bt(e) {
392
+ function vt(e) {
387
393
  if (e === void 0)
388
394
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
389
395
  return e;
390
396
  }
391
- function Ti(e, t) {
397
+ function Ei(e, t) {
392
398
  if (t && (typeof t == "object" || typeof t == "function"))
393
399
  return t;
394
400
  if (t !== void 0)
395
401
  throw new TypeError("Derived constructors may only return object or undefined");
396
- return bt(e);
402
+ return vt(e);
397
403
  }
398
- function Ei(e, t) {
399
- return Ii(e) || _i(e, t) || Ci(e, t) || Pi();
404
+ function Ii(e, t) {
405
+ return _i(e) || Ci(e, t) || Pi(e, t) || Li();
400
406
  }
401
- function Ii(e) {
407
+ function _i(e) {
402
408
  if (Array.isArray(e))
403
409
  return e;
404
410
  }
405
- function _i(e, t) {
411
+ function Ci(e, t) {
406
412
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
407
413
  if (n != null) {
408
- var r = [], i = !0, l = !1, o, f;
414
+ var r = [], i = !0, a = !1, o, f;
409
415
  try {
410
416
  for (n = n.call(e); !(i = (o = n.next()).done) && (r.push(o.value), !(t && r.length === t)); i = !0)
411
417
  ;
412
418
  } catch (p) {
413
- l = !0, f = p;
419
+ a = !0, f = p;
414
420
  } finally {
415
421
  try {
416
422
  !i && n.return != null && n.return();
417
423
  } finally {
418
- if (l)
424
+ if (a)
419
425
  throw f;
420
426
  }
421
427
  }
422
428
  return r;
423
429
  }
424
430
  }
425
- function Ci(e, t) {
431
+ function Pi(e, t) {
426
432
  if (e) {
427
433
  if (typeof e == "string")
428
- return dn(e, t);
434
+ return fn(e, t);
429
435
  var n = Object.prototype.toString.call(e).slice(8, -1);
430
436
  if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set")
431
437
  return Array.from(e);
432
438
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
433
- return dn(e, t);
439
+ return fn(e, t);
434
440
  }
435
441
  }
436
- function dn(e, t) {
442
+ function fn(e, t) {
437
443
  (t == null || t > e.length) && (t = e.length);
438
444
  for (var n = 0, r = new Array(t); n < t; n++)
439
445
  r[n] = e[n];
440
446
  return r;
441
447
  }
442
- function Pi() {
448
+ function Li() {
443
449
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
444
450
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
445
451
  }
446
- var ce = {
452
+ var ue = {
447
453
  Mobile: "mobile",
448
454
  Tablet: "tablet",
449
455
  SmartTv: "smarttv",
@@ -451,7 +457,7 @@ var ce = {
451
457
  Wearable: "wearable",
452
458
  Embedded: "embedded",
453
459
  Browser: void 0
454
- }, be = {
460
+ }, ve = {
455
461
  Chrome: "Chrome",
456
462
  Firefox: "Firefox",
457
463
  Opera: "Opera",
@@ -465,13 +471,13 @@ var ce = {
465
471
  EdgeChromium: "Edge Chromium",
466
472
  MIUI: "MIUI Browser",
467
473
  SamsungBrowser: "Samsung Browser"
468
- }, Qe = {
474
+ }, Xe = {
469
475
  IOS: "iOS",
470
476
  Android: "Android",
471
477
  WindowsPhone: "Windows Phone",
472
478
  Windows: "Windows",
473
479
  MAC_OS: "Mac OS"
474
- }, Li = {
480
+ }, Ni = {
475
481
  isMobile: !1,
476
482
  isTablet: !1,
477
483
  isBrowser: !1,
@@ -480,48 +486,48 @@ var ce = {
480
486
  isWearable: !1
481
487
  }, Ri = function(t) {
482
488
  switch (t) {
483
- case ce.Mobile:
489
+ case ue.Mobile:
484
490
  return {
485
491
  isMobile: !0
486
492
  };
487
- case ce.Tablet:
493
+ case ue.Tablet:
488
494
  return {
489
495
  isTablet: !0
490
496
  };
491
- case ce.SmartTv:
497
+ case ue.SmartTv:
492
498
  return {
493
499
  isSmartTV: !0
494
500
  };
495
- case ce.Console:
501
+ case ue.Console:
496
502
  return {
497
503
  isConsole: !0
498
504
  };
499
- case ce.Wearable:
505
+ case ue.Wearable:
500
506
  return {
501
507
  isWearable: !0
502
508
  };
503
- case ce.Browser:
509
+ case ue.Browser:
504
510
  return {
505
511
  isBrowser: !0
506
512
  };
507
- case ce.Embedded:
513
+ case ue.Embedded:
508
514
  return {
509
515
  isEmbedded: !0
510
516
  };
511
517
  default:
512
- return Li;
518
+ return Ni;
513
519
  }
514
- }, Ni = function(t) {
515
- return En(t);
520
+ }, Fi = function(t) {
521
+ return In(t);
516
522
  }, P = function(t) {
517
523
  var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "none";
518
524
  return t || n;
519
525
  }, Ut = function() {
520
526
  return typeof window < "u" && (window.navigator || navigator) ? window.navigator || navigator : !1;
521
- }, jt = function(t) {
527
+ }, Ht = function(t) {
522
528
  var n = Ut();
523
529
  return n && n.platform && (n.platform.indexOf(t) !== -1 || n.platform === "MacIntel" && n.maxTouchPoints > 1 && !window.MSStream);
524
- }, Fi = function(t, n, r, i, l) {
530
+ }, Ai = function(t, n, r, i, a) {
525
531
  return {
526
532
  isBrowser: t,
527
533
  browserMajorVersion: P(n.major),
@@ -531,17 +537,17 @@ var ce = {
531
537
  engineVersion: P(r.version),
532
538
  osName: P(i.name),
533
539
  osVersion: P(i.version),
534
- userAgent: P(l)
540
+ userAgent: P(a)
535
541
  };
536
- }, fn = function(t, n, r, i) {
537
- return gi({}, t, {
542
+ }, pn = function(t, n, r, i) {
543
+ return xi({}, t, {
538
544
  vendor: P(n.vendor),
539
545
  model: P(n.model),
540
546
  os: P(r.name),
541
547
  osVersion: P(r.version),
542
548
  ua: P(i)
543
549
  });
544
- }, Ai = function(t, n, r, i) {
550
+ }, Mi = function(t, n, r, i) {
545
551
  return {
546
552
  isSmartTV: t,
547
553
  engineName: P(n.name),
@@ -550,7 +556,7 @@ var ce = {
550
556
  osVersion: P(r.version),
551
557
  userAgent: P(i)
552
558
  };
553
- }, $i = function(t, n, r, i) {
559
+ }, Di = function(t, n, r, i) {
554
560
  return {
555
561
  isConsole: t,
556
562
  engineName: P(n.name),
@@ -559,7 +565,7 @@ var ce = {
559
565
  osVersion: P(r.version),
560
566
  userAgent: P(i)
561
567
  };
562
- }, Mi = function(t, n, r, i) {
568
+ }, $i = function(t, n, r, i) {
563
569
  return {
564
570
  isWearable: t,
565
571
  engineName: P(n.name),
@@ -568,7 +574,7 @@ var ce = {
568
574
  osVersion: P(r.version),
569
575
  userAgent: P(i)
570
576
  };
571
- }, Di = function(t, n, r, i, l) {
577
+ }, Wi = function(t, n, r, i, a) {
572
578
  return {
573
579
  isEmbedded: t,
574
580
  vendor: P(n.vendor),
@@ -577,256 +583,256 @@ var ce = {
577
583
  engineVersion: P(r.version),
578
584
  osName: P(i.name),
579
585
  osVersion: P(i.version),
580
- userAgent: P(l)
586
+ userAgent: P(a)
581
587
  };
582
588
  };
583
- function Wi(e) {
584
- var t = e ? rt(e) : In, n = t.device, r = t.browser, i = t.engine, l = t.os, o = t.ua, f = Ri(n.type), p = f.isBrowser, b = f.isMobile, v = f.isTablet, m = f.isSmartTV, s = f.isConsole, c = f.isWearable, a = f.isEmbedded;
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;
585
591
  if (p)
586
- return Fi(p, r, i, l, o);
587
- if (m)
588
- return Ai(m, i, l, o);
589
- if (s)
590
- return $i(s, i, l, o);
592
+ return Ai(p, r, i, a, o);
593
+ if (h)
594
+ return Mi(h, i, a, o);
595
+ if (l)
596
+ return Di(l, i, a, o);
591
597
  if (b || v)
592
- return fn(f, n, l, o);
593
- if (c)
594
- return Mi(c, i, l, o);
595
- if (a)
596
- return Di(a, n, i, l, o);
598
+ return pn(f, n, a, o);
599
+ if (u)
600
+ return $i(u, i, a, o);
601
+ if (s)
602
+ return Wi(s, n, i, a, o);
597
603
  }
598
- var _n = function(t) {
599
- var n = t.type;
600
- return n === ce.Mobile;
601
- }, Cn = function(t) {
604
+ var Cn = function(t) {
602
605
  var n = t.type;
603
- return n === ce.Tablet;
606
+ return n === ue.Mobile;
604
607
  }, Pn = function(t) {
605
608
  var n = t.type;
606
- return n === ce.Mobile || n === ce.Tablet;
609
+ return n === ue.Tablet;
607
610
  }, Ln = function(t) {
608
611
  var n = t.type;
609
- return n === ce.SmartTv;
610
- }, vt = function(t) {
612
+ return n === ue.Mobile || n === ue.Tablet;
613
+ }, Nn = function(t) {
611
614
  var n = t.type;
612
- return n === ce.Browser;
613
- }, Rn = function(t) {
615
+ return n === ue.SmartTv;
616
+ }, mt = function(t) {
614
617
  var n = t.type;
615
- return n === ce.Wearable;
616
- }, Nn = function(t) {
618
+ return n === ue.Browser;
619
+ }, Rn = function(t) {
617
620
  var n = t.type;
618
- return n === ce.Console;
621
+ return n === ue.Wearable;
619
622
  }, Fn = function(t) {
620
623
  var n = t.type;
621
- return n === ce.Embedded;
624
+ return n === ue.Console;
622
625
  }, An = function(t) {
626
+ var n = t.type;
627
+ return n === ue.Embedded;
628
+ }, Mn = function(t) {
623
629
  var n = t.vendor;
624
630
  return P(n);
625
- }, $n = function(t) {
631
+ }, Dn = function(t) {
626
632
  var n = t.model;
627
633
  return P(n);
628
- }, Mn = function(t) {
634
+ }, $n = function(t) {
629
635
  var n = t.type;
630
636
  return P(n, "browser");
631
- }, Dn = function(t) {
632
- var n = t.name;
633
- return n === Qe.Android;
634
637
  }, Wn = function(t) {
635
638
  var n = t.name;
636
- return n === Qe.Windows;
639
+ return n === Xe.Android;
637
640
  }, Vn = function(t) {
638
641
  var n = t.name;
639
- return n === Qe.MAC_OS;
642
+ return n === Xe.Windows;
640
643
  }, Bn = function(t) {
641
644
  var n = t.name;
642
- return n === Qe.WindowsPhone;
645
+ return n === Xe.MAC_OS;
646
+ }, jn = function(t) {
647
+ var n = t.name;
648
+ return n === Xe.WindowsPhone;
643
649
  }, Un = function(t) {
644
650
  var n = t.name;
645
- return n === Qe.IOS;
646
- }, jn = function(t) {
651
+ return n === Xe.IOS;
652
+ }, Hn = function(t) {
647
653
  var n = t.version;
648
654
  return P(n);
649
655
  }, qn = function(t) {
650
656
  var n = t.name;
651
657
  return P(n);
652
- }, Hn = function(t) {
653
- var n = t.name;
654
- return n === be.Chrome;
655
658
  }, zn = function(t) {
656
659
  var n = t.name;
657
- return n === be.Firefox;
660
+ return n === ve.Chrome;
658
661
  }, Kn = function(t) {
659
662
  var n = t.name;
660
- return n === be.Chromium;
661
- }, mt = function(t) {
662
- var n = t.name;
663
- return n === be.Edge;
663
+ return n === ve.Firefox;
664
664
  }, Gn = function(t) {
665
665
  var n = t.name;
666
- return n === be.Yandex;
666
+ return n === ve.Chromium;
667
+ }, ht = function(t) {
668
+ var n = t.name;
669
+ return n === ve.Edge;
667
670
  }, Yn = function(t) {
668
671
  var n = t.name;
669
- return n === be.Safari || n === be.MobileSafari;
672
+ return n === ve.Yandex;
670
673
  }, Qn = function(t) {
671
674
  var n = t.name;
672
- return n === be.MobileSafari;
675
+ return n === ve.Safari || n === ve.MobileSafari;
673
676
  }, Xn = function(t) {
674
677
  var n = t.name;
675
- return n === be.Opera;
678
+ return n === ve.MobileSafari;
676
679
  }, Zn = function(t) {
677
680
  var n = t.name;
678
- return n === be.InternetExplorer || n === be.Ie;
681
+ return n === ve.Opera;
679
682
  }, Jn = function(t) {
680
683
  var n = t.name;
681
- return n === be.MIUI;
684
+ return n === ve.InternetExplorer || n === ve.Ie;
682
685
  }, er = function(t) {
683
686
  var n = t.name;
684
- return n === be.SamsungBrowser;
687
+ return n === ve.MIUI;
685
688
  }, tr = function(t) {
686
- var n = t.version;
687
- return P(n);
689
+ var n = t.name;
690
+ return n === ve.SamsungBrowser;
688
691
  }, nr = function(t) {
689
- var n = t.major;
692
+ var n = t.version;
690
693
  return P(n);
691
694
  }, rr = function(t) {
692
- var n = t.name;
695
+ var n = t.major;
693
696
  return P(n);
694
697
  }, ir = function(t) {
695
698
  var n = t.name;
696
699
  return P(n);
697
700
  }, or = function(t) {
701
+ var n = t.name;
702
+ return P(n);
703
+ }, ar = function(t) {
698
704
  var n = t.version;
699
705
  return P(n);
700
- }, ar = function() {
706
+ }, lr = function() {
701
707
  var t = Ut(), n = t && t.userAgent && t.userAgent.toLowerCase();
702
708
  return typeof n == "string" ? /electron/.test(n) : !1;
703
- }, Ke = function(t) {
709
+ }, Ge = function(t) {
704
710
  return typeof t == "string" && t.indexOf("Edg/") !== -1;
705
- }, lr = function() {
711
+ }, sr = function() {
706
712
  var t = Ut();
707
713
  return t && (/iPad|iPhone|iPod/.test(t.platform) || t.platform === "MacIntel" && t.maxTouchPoints > 1) && !window.MSStream;
708
714
  }, Ie = function() {
709
- return jt("iPad");
710
- }, sr = function() {
711
- return jt("iPhone");
715
+ return Ht("iPad");
712
716
  }, cr = function() {
713
- return jt("iPod");
714
- }, ur = function(t) {
717
+ return Ht("iPhone");
718
+ }, ur = function() {
719
+ return Ht("iPod");
720
+ }, dr = function(t) {
715
721
  return P(t);
716
722
  };
717
- function dr(e) {
718
- var t = e || In, n = t.device, r = t.browser, i = t.os, l = t.engine, o = t.ua;
723
+ function fr(e) {
724
+ var t = e || _n, n = t.device, r = t.browser, i = t.os, a = t.engine, o = t.ua;
719
725
  return {
720
- isSmartTV: Ln(n),
721
- isConsole: Nn(n),
726
+ isSmartTV: Nn(n),
727
+ isConsole: Fn(n),
722
728
  isWearable: Rn(n),
723
- isEmbedded: Fn(n),
724
- isMobileSafari: Qn(r) || Ie(),
725
- isChromium: Kn(r),
726
- isMobile: Pn(n) || Ie(),
727
- isMobileOnly: _n(n),
728
- isTablet: Cn(n) || Ie(),
729
- isBrowser: vt(n),
730
- isDesktop: vt(n),
731
- isAndroid: Dn(i),
732
- isWinPhone: Bn(i),
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),
733
739
  isIOS: Un(i) || Ie(),
734
- isChrome: Hn(r),
735
- isFirefox: zn(r),
736
- isSafari: Yn(r),
737
- isOpera: Xn(r),
738
- isIE: Zn(r),
739
- osVersion: jn(i),
740
+ isChrome: zn(r),
741
+ isFirefox: Kn(r),
742
+ isSafari: Qn(r),
743
+ isOpera: Zn(r),
744
+ isIE: Jn(r),
745
+ osVersion: Hn(i),
740
746
  osName: qn(i),
741
- fullBrowserVersion: tr(r),
742
- browserVersion: nr(r),
743
- browserName: rr(r),
744
- mobileVendor: An(n),
745
- mobileModel: $n(n),
746
- engineName: ir(l),
747
- engineVersion: or(l),
748
- getUA: ur(o),
749
- isEdge: mt(r) || Ke(o),
750
- isYandex: Gn(r),
751
- deviceType: Mn(n),
752
- isIOS13: lr(),
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(),
753
759
  isIPad13: Ie(),
754
- isIPhone13: sr(),
755
- isIPod13: cr(),
756
- isElectron: ar(),
757
- isEdgeChromium: Ke(o),
758
- isLegacyEdge: mt(r) && !Ke(o),
759
- isWindows: Wn(i),
760
- isMacOs: Vn(i),
761
- isMIUI: Jn(r),
762
- isSamsungBrowser: er(r)
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)
763
769
  };
764
770
  }
765
- var fr = Ln(ge), pr = Nn(ge), br = Rn(ge), Vi = Fn(ge), Bi = Qn(de) || Ie(), Ui = Kn(de), xt = Pn(ge) || Ie(), vr = _n(ge), mr = Cn(ge) || Ie(), hr = vt(ge), ji = vt(ge), wr = Dn(Be), gr = Bn(Be), xr = Un(Be) || Ie(), qi = Hn(de), Hi = zn(de), zi = Yn(de), Ki = Xn(de), yr = Zn(de), Gi = jn(Be), Yi = qn(Be), Qi = tr(de), Xi = nr(de), Zi = rr(de), Ji = An(ge), eo = $n(ge), to = ir(Bt), no = or(Bt), ro = ur(nt), io = mt(de) || Ke(nt), oo = Gn(de), ao = Mn(ge), lo = lr(), so = Ie(), co = sr(), uo = cr(), fo = ar(), po = Ke(nt), bo = mt(de) && !Ke(nt), vo = Wn(Be), mo = Vn(Be), ho = Jn(de), wo = er(de), go = function(t) {
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) {
766
772
  if (!t || typeof t != "string") {
767
773
  console.error("No valid user agent string was provided");
768
774
  return;
769
775
  }
770
- var n = rt(t), r = n.device, i = n.browser, l = n.os, o = n.engine, f = n.ua;
771
- return dr({
776
+ var n = ot(t), r = n.device, i = n.browser, a = n.os, o = n.engine, f = n.ua;
777
+ return fr({
772
778
  device: r,
773
779
  browser: i,
774
- os: l,
780
+ os: a,
775
781
  engine: o,
776
782
  ua: f
777
783
  });
778
- }, xo = function(t) {
779
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
780
- return wr ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", i, r) : null;
781
784
  }, yo = function(t) {
782
785
  var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
783
- return hr ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", i, r) : null;
786
+ return gr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
784
787
  }, Oo = function(t) {
785
788
  var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
786
- return yr ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", i, r) : null;
789
+ return wr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
787
790
  }, So = function(t) {
788
791
  var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
789
- return xr ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", i, r) : null;
792
+ return Or ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
790
793
  }, ko = function(t) {
791
794
  var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
792
- return xt ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", i, r) : null;
795
+ return yr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
793
796
  }, To = function(t) {
794
797
  var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
795
- return mr ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", i, r) : null;
798
+ return yt ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
796
799
  }, Eo = function(t) {
797
800
  var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
798
- return gr ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", i, r) : null;
801
+ return hr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
799
802
  }, 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;
805
+ }, _o = function(t) {
800
806
  var n = t.renderWithFragment, r = t.children;
801
807
  t.viewClassName, t.style;
802
808
  var i = xe(t, ["renderWithFragment", "children", "viewClassName", "style"]);
803
- return vr ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", i, r) : null;
804
- }, _o = function(t) {
805
- var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
806
- return fr ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", i, r) : null;
809
+ return mr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
807
810
  }, Co = function(t) {
808
811
  var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
809
- return pr ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", i, r) : null;
812
+ return pr ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
810
813
  }, Po = function(t) {
811
814
  var n = t.renderWithFragment, r = t.children, i = xe(t, ["renderWithFragment", "children"]);
812
- return br ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", i, r) : null;
815
+ return br ? n ? G.createElement(de.Fragment, null, r) : G.createElement("div", i, r) : null;
813
816
  }, 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;
819
+ }, No = function(t) {
814
820
  var n = t.renderWithFragment, r = t.children;
815
821
  t.viewClassName, t.style;
816
- var i = t.condition, l = xe(t, ["renderWithFragment", "children", "viewClassName", "style", "condition"]);
817
- return i ? n ? G.createElement(ue.Fragment, null, r) : G.createElement("div", l, r) : null;
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;
818
824
  };
819
825
  function Ro(e) {
820
826
  return /* @__PURE__ */ function(t) {
821
- Si(n, t);
827
+ ki(n, t);
822
828
  function n(r) {
823
829
  var i;
824
- return xi(this, n), i = Ti(this, Mt(n).call(this, r)), i.isEventListenerAdded = !1, i.handleOrientationChange = i.handleOrientationChange.bind(bt(i)), i.onOrientationChange = i.onOrientationChange.bind(bt(i)), i.onPageLoad = i.onPageLoad.bind(bt(i)), i.state = {
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 = {
825
831
  isLandscape: !1,
826
832
  isPortrait: !1
827
833
  }, i;
828
834
  }
829
- return yi(n, [{
835
+ return Oi(n, [{
830
836
  key: "handleOrientationChange",
831
837
  value: function() {
832
838
  this.isEventListenerAdded || (this.isEventListenerAdded = !0);
@@ -849,7 +855,7 @@ function Ro(e) {
849
855
  }, {
850
856
  key: "componentDidMount",
851
857
  value: function() {
852
- (typeof window > "u" ? "undefined" : et(window)) !== void 0 && xt && (this.isEventListenerAdded ? window.removeEventListener("load", this.onPageLoad, !1) : (this.handleOrientationChange(), window.addEventListener("load", this.onPageLoad, !1)), window.addEventListener("resize", this.onOrientationChange, !1));
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));
853
859
  }
854
860
  }, {
855
861
  key: "componentWillUnmount",
@@ -859,7 +865,7 @@ function Ro(e) {
859
865
  }, {
860
866
  key: "render",
861
867
  value: function() {
862
- return G.createElement(e, $t({}, this.props, {
868
+ return G.createElement(e, Dt({}, this.props, {
863
869
  isLandscape: this.state.isLandscape,
864
870
  isPortrait: this.state.isPortrait
865
871
  }));
@@ -867,242 +873,248 @@ function Ro(e) {
867
873
  }]), n;
868
874
  }(G.Component);
869
875
  }
870
- function No() {
871
- var e = ue.useState(function() {
872
- var l = window.innerWidth > window.innerHeight ? 90 : 0;
876
+ function Fo() {
877
+ var e = de.useState(function() {
878
+ var a = window.innerWidth > window.innerHeight ? 90 : 0;
873
879
  return {
874
- isPortrait: l === 0,
875
- isLandscape: l === 90,
876
- orientation: l === 0 ? "portrait" : "landscape"
880
+ isPortrait: a === 0,
881
+ isLandscape: a === 90,
882
+ orientation: a === 0 ? "portrait" : "landscape"
877
883
  };
878
- }), t = Ei(e, 2), n = t[0], r = t[1], i = ue.useCallback(function() {
879
- var l = window.innerWidth > window.innerHeight ? 90 : 0, o = {
880
- isPortrait: l === 0,
881
- isLandscape: l === 90,
882
- orientation: l === 0 ? "portrait" : "landscape"
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"
883
889
  };
884
890
  n.orientation !== o.orientation && r(o);
885
891
  }, [n.orientation]);
886
- return ue.useEffect(function() {
887
- return (typeof window > "u" ? "undefined" : et(window)) !== void 0 && xt && (i(), window.addEventListener("load", i, !1), window.addEventListener("resize", i, !1)), function() {
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() {
888
894
  window.removeEventListener("resize", i, !1), window.removeEventListener("load", i, !1);
889
895
  };
890
896
  }, [i]), n;
891
897
  }
892
- function Or(e) {
898
+ function Sr(e) {
893
899
  var t = e || window.navigator.userAgent;
894
- return rt(t);
900
+ return ot(t);
895
901
  }
896
- function Fo(e) {
897
- var t = e || window.navigator.userAgent, n = Or(t), r = dr(n);
902
+ function Ao(e) {
903
+ var t = e || window.navigator.userAgent, n = Sr(t), r = fr(n);
898
904
  return [r, n];
899
905
  }
900
- y.AndroidView = xo;
901
- y.BrowserTypes = be;
902
- y.BrowserView = yo;
903
- y.ConsoleView = Co;
904
- y.CustomView = Lo;
905
- y.IEView = Oo;
906
- y.IOSView = So;
907
- y.MobileOnlyView = Io;
908
- y.MobileView = ko;
909
- y.OsTypes = Qe;
910
- y.SmartTVView = _o;
911
- y.TabletView = To;
912
- y.WearableView = Po;
913
- y.WinPhoneView = Eo;
914
- y.browserName = Zi;
915
- y.browserVersion = Xi;
916
- y.deviceDetect = Wi;
917
- y.deviceType = ao;
918
- y.engineName = to;
919
- y.engineVersion = no;
920
- y.fullBrowserVersion = Qi;
921
- y.getSelectorsByUserAgent = go;
922
- y.getUA = ro;
923
- y.isAndroid = wr;
924
- y.isBrowser = hr;
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;
925
931
  y.isChrome = qi;
926
932
  y.isChromium = Ui;
927
- y.isConsole = pr;
928
- y.isDesktop = ji;
929
- y.isEdge = io;
930
- y.isEdgeChromium = po;
931
- y.isElectron = fo;
932
- y.isEmbedded = Vi;
933
- y.isFirefox = Hi;
934
- y.isIE = yr;
935
- y.isIOS = xr;
936
- y.isIOS13 = lo;
937
- y.isIPad13 = so;
938
- y.isIPhone13 = co;
939
- y.isIPod13 = uo;
940
- y.isLegacyEdge = bo;
941
- y.isMIUI = ho;
942
- y.isMacOs = mo;
943
- var Ao = y.isMobile = xt;
944
- y.isMobileOnly = vr;
945
- y.isMobileSafari = Bi;
946
- y.isOpera = Ki;
947
- y.isSafari = zi;
948
- y.isSamsungBrowser = wo;
949
- y.isSmartTV = fr;
950
- y.isTablet = mr;
951
- y.isWearable = br;
952
- y.isWinPhone = gr;
953
- y.isWindows = vo;
954
- y.isYandex = oo;
955
- y.mobileModel = eo;
956
- y.mobileVendor = Ji;
957
- y.osName = Yi;
958
- y.osVersion = Gi;
959
- y.parseUserAgent = rt;
960
- y.setUserAgent = Ni;
961
- y.useDeviceData = Or;
962
- y.useDeviceSelectors = Fo;
963
- y.useMobileOrientation = No;
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;
964
970
  y.withOrientationChange = Ro;
965
- const ns = Y.memo(
966
- De(
967
- ({ themeColor: e = "", onSubmit: t, style: n = {}, className: r = "", onInput: i, onFocus: l, onBlur: o, ...f }, p) => {
968
- const [b, v] = Z(!0), [m, s] = Z(!1);
969
- X(() => {
970
- v(Ao);
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);
971
977
  }, []);
972
- const c = (w) => {
978
+ const u = (w) => {
973
979
  !b && w.key === "Enter" && !w.shiftKey && t && (w.preventDefault(), t());
974
- }, a = (w) => {
980
+ }, s = (w) => {
975
981
  i?.(w), w.target.style.height = "40px", w.target.style.height = 2 + w.target.scrollHeight + "px";
976
982
  };
977
- let d = {};
978
- const u = [sn.textInput, r].filter(Boolean).join(" "), h = () => {
979
- s(!0);
980
- }, I = () => {
981
- s(!1);
983
+ let c = {};
984
+ const d = [cn.textInput, r].filter(Boolean).join(" "), m = () => {
985
+ l(!0);
986
+ }, O = () => {
987
+ l(!1);
982
988
  };
983
- return d = {
984
- borderBottomColor: m && e != "#ffffff" ? e : ""
985
- }, /* @__PURE__ */ O("div", { className: sn.textInputWrapper, children: /* @__PURE__ */ O(
989
+ return c = {
990
+ borderBottomColor: h ? e !== "#ffffff" ? e : "#c8c8c8" : ""
991
+ }, /* @__PURE__ */ S("div", { className: cn.textInputWrapper, children: /* @__PURE__ */ S(
986
992
  "textarea",
987
993
  {
988
994
  "data-testid": "textbox-input",
989
995
  ref: p,
990
- className: u,
991
- style: { ...d, ...n },
992
- onFocus: h,
993
- onBlur: I,
994
- onInput: (w) => a(w),
995
- onKeyDown: c,
996
+ className: d,
997
+ style: { ...c, ...n },
998
+ onFocus: m,
999
+ onBlur: O,
1000
+ onInput: (w) => s(w),
1001
+ onKeyDown: u,
996
1002
  ...f
997
1003
  }
998
1004
  ) });
999
1005
  }
1000
1006
  )
1001
- ), $o = "_multiSelectContainer_eqvx1_1", Mo = "_listOptionsWrap_eqvx1_4", Do = "_selectedValuesWrap_eqvx1_7", Wo = "_selectedValues_eqvx1_7", Vo = "_focused_eqvx1_13", Bo = "_dropDownIcon_eqvx1_16", Uo = "_optionsListContainer_eqvx1_19", jo = "_top_eqvx1_22", qo = "_optionsListWrap_eqvx1_25", Ho = "_searchInputWrap_eqvx1_28", zo = "_searchInput_eqvx1_28", Ko = "_optionsList_eqvx1_19", Go = "_optionsListCheckbox_eqvx1_37", Yo = "_btnContainer_eqvx1_46", ae = {
1002
- multiSelectContainer: $o,
1003
- listOptionsWrap: Mo,
1004
- selectedValuesWrap: Do,
1005
- selectedValues: Wo,
1006
- focused: Vo,
1007
- dropDownIcon: Bo,
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,
1008
1014
  optionsListContainer: Uo,
1009
- top: jo,
1015
+ top: Ho,
1010
1016
  optionsListWrap: qo,
1011
- searchInputWrap: Ho,
1012
- searchInput: zo,
1013
- optionsList: Ko,
1014
- optionsListCheckbox: Go,
1015
- btnContainer: Yo
1016
- }, rs = ({
1017
+ searchInputWrap: zo,
1018
+ searchInput: Ko,
1019
+ optionsList: Go,
1020
+ optionsListCheckbox: Yo,
1021
+ btnContainer: Qo
1022
+ }, is = ({
1017
1023
  options: e,
1018
1024
  checkedValue: t,
1019
1025
  onSelectionChange: n,
1020
1026
  minOptions: r = 0,
1021
1027
  maxOptions: i,
1022
- themeColor: l,
1028
+ themeColor: a,
1023
1029
  className: o = "",
1024
1030
  style: f = {}
1025
1031
  }) => {
1026
- const [p, b] = Z(e), [v, m] = Z(t), [s, c] = Z(""), [a, d] = Z(!1), u = C(null), h = C([]), I = C(null), w = C(null), [g, V] = Z(-1), [F, q] = Z("bottom");
1027
- let $ = {};
1028
- X(() => {
1029
- const T = (L) => {
1030
- u.current && !u.current.contains(L.target) && (d(!1), c(""));
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(""));
1031
1037
  };
1032
1038
  return document.addEventListener("mousedown", T), () => {
1033
1039
  document.removeEventListener("mousedown", T);
1034
1040
  };
1035
- }, []), X(() => {
1036
- if (u.current) {
1037
- const T = u.current.getBoundingClientRect(), L = window.innerHeight;
1038
- T.bottom + 280 > L ? q("top") : q("bottom");
1041
+ }, []), Z(() => {
1042
+ if (O.current) {
1043
+ const T = O.current.getBoundingClientRect(), R = window.innerHeight;
1044
+ T.bottom + 280 > R ? k("top") : k("bottom");
1039
1045
  }
1040
- }, [a]), X(() => {
1041
- const T = e.filter((L) => L.text.toLowerCase().includes(s.toLowerCase()));
1046
+ }, [s]), Z(() => {
1047
+ const T = e.filter((R) => R.text.toLowerCase().includes(l.toLowerCase()));
1042
1048
  b(T);
1043
- }, [e, s]);
1044
- const S = (T) => {
1045
- const A = v.includes(T) ? v.filter((re) => re !== T) : [...v, T];
1046
- (i === void 0 || A.length <= i) && (m(A), n(A));
1047
- }, z = v.map((T) => {
1048
- const L = e.find((A) => A.id === T);
1049
- return L && L.text !== null ? L.text : "";
1050
- }).filter((T) => T !== "").join(", "), ee = (T) => {
1051
- const L = e.find((A) => A.id === T);
1052
- L && !L.disabled && (i === void 0 || v.length <= i) && h.current[T]?.click();
1053
- }, ne = (T) => {
1054
- d(T), !a && p.length > 6 ? setTimeout(() => {
1055
- I.current?.focus();
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();
1056
1062
  }, 0) : setTimeout(() => {
1057
- const L = w.current?.querySelector(`.${ae.optionsList}`);
1058
- L && L.focus();
1063
+ const R = W.current?.querySelector(`.${le.optionsList}`);
1064
+ R && R.focus();
1059
1065
  }, 0);
1060
- }, _ = (T) => {
1061
- const { key: L } = T;
1062
- if (L === "ArrowDown" || L === "ArrowUp") {
1066
+ }, ee = (T) => {
1067
+ const { key: R } = T;
1068
+ if (R === "ArrowDown" || R === "ArrowUp") {
1063
1069
  T.preventDefault();
1064
- let A = g;
1065
- if (L === "ArrowDown" ? A = Math.min(g + 1, p.length - 1) : L === "ArrowUp" && (A = Math.max(g - 1, 0)), V(A), w.current && A >= 0) {
1066
- const W = w.current.querySelectorAll(`.${ae.optionsList}`)[A];
1067
- W && W.scrollIntoView({
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({
1068
1074
  block: "nearest",
1069
1075
  inline: "nearest"
1070
1076
  });
1071
1077
  }
1072
1078
  } else
1073
- L === "Enter" && g !== -1 && ee(p[g].id);
1079
+ R === "Enter" && L !== -1 && _(p[L].id);
1080
+ }, ce = () => {
1081
+ m(!0);
1082
+ }, V = () => {
1083
+ m(!1);
1074
1084
  };
1075
- if (l) {
1076
- const T = qe(l);
1077
- l = l.length === 4 ? l.replace(/^#(.)(.)(.)$/, "#$1$1$2$2$3$3") : l, (T === "dark" || T === "light") && ($ = {
1078
- borderBottomColor: l === "#ffffff" ? "#333333" : l
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"
1079
1089
  });
1080
1090
  }
1081
- return /* @__PURE__ */ O("div", { className: ae.multiSelectContainer, children: /* @__PURE__ */ we("div", { className: ae.listOptionsWrap, ref: u, children: [
1082
- /* @__PURE__ */ we("div", { className: `${o} ${ae.selectedValuesWrap}`, children: [
1083
- /* @__PURE__ */ O(
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(
1084
1094
  "input",
1085
1095
  {
1086
1096
  type: "text",
1087
- className: `${ae.selectedValues} ${a ? ae.focused : ""}`,
1088
- value: z,
1097
+ className: `${le.selectedValues} ${s ? le.focused : ""}`,
1098
+ value: pe,
1089
1099
  readOnly: !0,
1090
- onClick: () => ne(!a),
1100
+ onFocus: ce,
1101
+ onBlur: V,
1102
+ onClick: () => te(!s),
1091
1103
  onKeyPress: (T) => {
1092
- (T.key === " " || T.code === "Space") && (T.preventDefault(), ne(!a));
1104
+ (T.key === " " || T.code === "Space") && (T.preventDefault(), te(!s));
1093
1105
  },
1094
1106
  "data-testid": "selected-input",
1095
- placeholder: "Please select",
1096
- style: { ...$, ...f }
1107
+ placeholder: "Select your option",
1108
+ style: { ...z, ...f }
1097
1109
  }
1098
1110
  ),
1099
- /* @__PURE__ */ O(
1111
+ /* @__PURE__ */ S(
1100
1112
  "span",
1101
1113
  {
1102
- className: ae.dropDownIcon,
1103
- onClick: () => ne(!a),
1114
+ className: le.dropDownIcon,
1115
+ onClick: () => te(!s),
1104
1116
  "data-testid": "arrow-button",
1105
- children: /* @__PURE__ */ O("svg", { width: "12px", height: "7px", viewBox: "0 0 12 7", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ O("g", { stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ O("g", { transform: "translate(-2360.000000, -295.000000)", fill: "#666666", children: /* @__PURE__ */ O("g", { transform: "translate(2006.000000, 248.000000)", children: /* @__PURE__ */ O(
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(
1106
1118
  "path",
1107
1119
  {
1108
1120
  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",
@@ -1112,59 +1124,62 @@ const ns = Y.memo(
1112
1124
  }
1113
1125
  )
1114
1126
  ] }),
1115
- a && /* @__PURE__ */ we("div", { className: ` ${ae.optionsListContainer} ${F === "top" ? ae.top : ""}`, children: [
1116
- /* @__PURE__ */ we("div", { className: ae.optionsListWrap, children: [
1117
- e.length >= 6 && /* @__PURE__ */ O("div", { className: ae.searchInputWrap, children: /* @__PURE__ */ O(
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(
1118
1130
  "input",
1119
1131
  {
1120
1132
  type: "text",
1121
1133
  placeholder: "Type to filter",
1122
- className: ae.searchInput,
1123
- value: s,
1124
- onChange: (T) => c(T.target.value),
1134
+ className: le.searchInput,
1135
+ value: l,
1136
+ onChange: (T) => u(T.target.value),
1125
1137
  "data-testid": "search-input",
1126
- onKeyDown: _,
1127
- ref: I
1138
+ onKeyDown: ee,
1139
+ ref: g
1128
1140
  }
1129
1141
  ) }),
1130
- /* @__PURE__ */ O("ul", { ref: w, children: p.map((T, L) => /* @__PURE__ */ O(
1131
- "li",
1132
- {
1133
- className: `${ae.optionsList} ${L === g ? ae.focused : ""}`,
1134
- onClick: () => ee(T.id),
1135
- onKeyPress: (A) => {
1136
- (A.key === " " || A.code === "Space") && (A.preventDefault(), ee(T.id));
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",
1146
+ {
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));
1151
+ },
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
+ )
1137
1170
  },
1138
- "aria-selected": L === g,
1139
- children: /* @__PURE__ */ O(
1140
- Vt,
1141
- {
1142
- className: ae.optionsListCheckbox,
1143
- tabIndex: -1,
1144
- themeColor: l,
1145
- ref: (A) => {
1146
- h.current[T.id] = A;
1147
- },
1148
- checked: v.includes(T.id),
1149
- onClick: (A) => {
1150
- A.stopPropagation(), S(T.id);
1151
- },
1152
- disabled: T.disabled || i !== void 0 && v.length >= i && !v.includes(T.id),
1153
- children: T.text
1154
- }
1155
- )
1156
- },
1157
- T.id
1171
+ T.id
1172
+ )
1158
1173
  )) })
1159
1174
  ] }),
1160
- /* @__PURE__ */ O("div", { className: ae.btnContainer, children: /* @__PURE__ */ O(
1161
- kn,
1175
+ /* @__PURE__ */ S("div", { className: le.btnContainer, children: /* @__PURE__ */ S(
1176
+ Tn,
1162
1177
  {
1163
- themeColor: l,
1178
+ themeColor: a,
1164
1179
  variant: "primary",
1165
1180
  size: "medium",
1166
1181
  onClick: () => {
1167
- d(!1), c(""), n(v);
1182
+ c(!1), u(""), n(v);
1168
1183
  },
1169
1184
  "data-testid": "done-button",
1170
1185
  children: "Done"
@@ -1172,136 +1187,139 @@ const ns = Y.memo(
1172
1187
  ) })
1173
1188
  ] })
1174
1189
  ] }) });
1175
- }, Qo = "_multiSelectContainer_15bhb_1", Xo = "_quickOptionsWrap_15bhb_4", Zo = "_selected_15bhb_10", Jo = "_disabled_15bhb_16", dt = {
1176
- multiSelectContainer: Qo,
1177
- quickOptionsWrap: Xo,
1178
- selected: Zo,
1179
- disabled: Jo
1180
- }, is = ({
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 = ({
1181
1196
  options: e,
1182
1197
  checkedValue: t,
1183
1198
  onSelectionChange: n,
1184
1199
  minOptions: r = 0,
1185
1200
  maxOptions: i,
1186
- themeColor: l,
1201
+ themeColor: a,
1187
1202
  className: o = "",
1188
1203
  style: f = {}
1189
1204
  }) => {
1190
- const [p, b] = Z(t), v = C([]);
1191
- let m = {};
1192
- const s = (a) => {
1193
- const u = p.includes(a) ? p.filter((I) => I !== a) : [...p, a];
1194
- (i === void 0 || u.length <= i) && (b(u), n(u));
1195
- }, c = (a) => {
1196
- const d = e.find((u) => u.id === a);
1197
- d && !d.disabled && (i === void 0 || p.length <= i) && v.current[a]?.click();
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();
1198
1213
  };
1199
- if (l) {
1200
- const a = qe(l);
1201
- l = l.length === 4 ? l.replace(/^#(.)(.)(.)$/, "#$1$1$2$2$3$3") : l;
1202
- const d = l === "#ffffff" ? "#333333" : l;
1203
- (a === "dark" || a === "light") && (m = {
1204
- outlineColor: d,
1205
- borderColor: d,
1206
- color: "#333333"
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
1207
1221
  });
1208
1222
  }
1209
- return /* @__PURE__ */ O("div", { className: dt.multiSelectContainer, children: /* @__PURE__ */ O("ul", { className: dt.quickOptionsWrap, children: e.map((a) => /* @__PURE__ */ O(
1223
+ return /* @__PURE__ */ S("div", { className: tt.multiSelectContainer, children: /* @__PURE__ */ S("ul", { className: tt.quickOptionsWrap, children: e.map((c) => /* @__PURE__ */ S(
1210
1224
  "li",
1211
1225
  {
1212
- style: { ...m, ...f },
1213
- className: `${o} ${dt.quickOption} ${a.disabled || i !== void 0 && p.length >= i && !p.includes(a.id) ? dt.disabled : ""}`,
1214
- tabIndex: a.disabled ? -1 : 0,
1215
- onClick: () => c(a.id),
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),
1216
1230
  onKeyPress: (d) => {
1217
- (d.key === " " || d.code === "Space") && (d.preventDefault(), c(a.id));
1231
+ (d.key === " " || d.code === "Space") && (d.preventDefault(), s(c.id));
1218
1232
  },
1219
1233
  "data-testid": "option-box",
1220
- children: /* @__PURE__ */ O(
1221
- Vt,
1234
+ children: /* @__PURE__ */ S(
1235
+ Bt,
1222
1236
  {
1223
1237
  checkboxSize: "large",
1224
1238
  tabIndex: -1,
1225
- themeColor: l,
1239
+ themeColor: a,
1226
1240
  ref: (d) => {
1227
- v.current[a.id] = d;
1241
+ v.current[c.id] = d;
1228
1242
  },
1229
- checked: p.includes(a.id),
1243
+ checked: p.includes(c.id),
1230
1244
  onClick: (d) => {
1231
- d.stopPropagation(), s(a.id);
1245
+ d.stopPropagation(), u(c.id);
1232
1246
  },
1233
- disabled: a.disabled || i !== void 0 && p.length >= i && !p.includes(a.id),
1234
- children: /* @__PURE__ */ O(
1247
+ disabled: c.disabled || i !== void 0 && p.length >= i && !p.includes(c.id),
1248
+ children: /* @__PURE__ */ S(
1235
1249
  "span",
1236
1250
  {
1237
1251
  style: {
1238
- color: l || a.disabled || i !== void 0 && p.length >= i && !p.includes(a.id) ? "#333333" : "#006bb1"
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"
1239
1253
  },
1240
- children: a.text
1254
+ children: c.text
1241
1255
  }
1242
1256
  )
1243
1257
  }
1244
1258
  )
1245
1259
  },
1246
- a.id
1260
+ c.id
1247
1261
  )) }) });
1248
- }, ea = "_singleSelectWrapper_1iea9_1", ta = "_quickOption_1iea9_4", na = "_selected_1iea9_10", ra = "_triangle_1iea9_16", ia = "_loader_1iea9_19", oa = "_checkmarkWrap_1iea9_22", aa = "_checkmark_1iea9_22", la = "_fill_1iea9_1", sa = "_scale_1iea9_1", ca = "_checkmarkCheck_1iea9_29", ua = "_stroke_1iea9_1", da = "_disabled_1iea9_34", Ee = {
1249
- singleSelectWrapper: ea,
1250
- quickOption: ta,
1251
- selected: na,
1252
- triangle: ra,
1253
- loader: ia,
1254
- "tw-spin": "_tw-spin_1iea9_1",
1255
- checkmarkWrap: oa,
1256
- checkmark: aa,
1257
- fill: la,
1258
- scale: sa,
1259
- checkmarkCheck: ca,
1260
- stroke: ua,
1261
- disabled: da
1262
- }, os = ({
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,
1268
+ "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 = ({
1263
1277
  options: e,
1264
1278
  onSelect: t,
1265
1279
  selected: n,
1266
1280
  themeColor: r,
1267
1281
  className: i = "",
1268
- style: l = {},
1282
+ style: a = {},
1269
1283
  showLoader: o = !1
1270
1284
  }) => {
1271
- const [f, p] = Z(n);
1272
- let b = {}, v = {}, m = "#ffffff";
1273
- const s = (c) => {
1274
- f?.id !== c.id && (t(c), p(c));
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);
1290
+ return;
1291
+ }
1292
+ t(u), p(u);
1275
1293
  };
1276
1294
  if (r) {
1277
- const c = qe(r);
1278
- r = r.length === 4 ? r.replace(/^#(.)(.)(.)$/, "#$1$1$2$2$3$3") : r;
1279
- const a = r === "#ffffff" ? "#333333" : r;
1280
- (c === "dark" || c === "light") && (m = r === "#ffffff" || c === "dark" ? "#ffffff" : "#333333", b = {
1281
- outlineColor: a,
1282
- borderColor: a,
1283
- color: "#333333"
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
1284
1302
  }, v = {
1285
- borderRightColor: a,
1286
- borderTopColor: a
1303
+ borderRightColor: s,
1304
+ borderTopColor: s
1287
1305
  });
1288
1306
  }
1289
- return /* @__PURE__ */ O("div", { className: Ee.singleSelectWrapper, children: /* @__PURE__ */ O("div", { className: Ee.quickOption, children: /* @__PURE__ */ O("ul", { className: Ee.quickOption, children: e.map((c) => /* @__PURE__ */ we(
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(
1290
1308
  "li",
1291
1309
  {
1292
- tabIndex: c.disabled ? -1 : 0,
1293
- className: `${i} ${f?.id === c.id ? Ee.selected : ""} ${c.disabled ? Ee.disabled : ""}`,
1294
- style: { ...b, ...l },
1295
- onClick: () => s(c),
1296
- onKeyPress: (a) => {
1297
- (a.key === " " || a.code === "Space") && (a.preventDefault(), s(c));
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));
1298
1316
  },
1299
1317
  "data-testid": "checkbox-input",
1300
1318
  children: [
1301
- c.text,
1302
- f?.id === c.id && /* @__PURE__ */ we("div", { className: Ee.triangle, style: { ...v }, children: [
1303
- o && /* @__PURE__ */ O("div", { className: Ee.loader, style: { borderRightColor: r ?? "#006bb1" } }),
1304
- !o && /* @__PURE__ */ O("div", { className: Ee.checkmarkWrap, children: /* @__PURE__ */ O(
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(
1305
1323
  "svg",
1306
1324
  {
1307
1325
  className: Ee.checkmark,
@@ -1310,11 +1328,11 @@ const ns = Y.memo(
1310
1328
  height: "9",
1311
1329
  viewBox: "0 0 11 9",
1312
1330
  fill: "none",
1313
- children: /* @__PURE__ */ O(
1331
+ children: /* @__PURE__ */ S(
1314
1332
  "path",
1315
1333
  {
1316
1334
  className: Ee.checkmarkCheck,
1317
- stroke: m,
1335
+ stroke: h,
1318
1336
  d: "M2.1 4.34286L4.12857 6.40001L8.9 1.60001",
1319
1337
  strokeWidth: "2"
1320
1338
  }
@@ -1324,21 +1342,21 @@ const ns = Y.memo(
1324
1342
  ] })
1325
1343
  ]
1326
1344
  },
1327
- c.id
1345
+ u.id
1328
1346
  )) }) }) });
1329
- }, fa = "_scrollbarContainer_er2uj_1", pa = {
1330
- scrollbarContainer: fa
1331
- }, ba = De(
1347
+ }, pa = "_scrollbarContainer_er2uj_1", ba = {
1348
+ scrollbarContainer: pa
1349
+ }, va = We(
1332
1350
  ({ children: e, className: t = "", style: n = {}, ...r }, i) => {
1333
- const l = [pa.scrollbarContainer, t].filter(Boolean).join(" ");
1334
- return /* @__PURE__ */ O(Ye, { children: /* @__PURE__ */ O("div", { ref: i, style: { ...n }, className: l, ...r, children: e }) });
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 }) });
1335
1353
  }
1336
1354
  );
1337
- ba.displayName = "Scrollbar";
1338
- var va = Object.defineProperty, ma = (e, t, n) => t in e ? va(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ct = (e, t, n) => (ma(e, typeof t != "symbol" ? t + "" : t, n), n);
1339
- let ha = class {
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 {
1340
1358
  constructor() {
1341
- Ct(this, "current", this.detect()), Ct(this, "handoffState", "pending"), Ct(this, "currentId", 0);
1359
+ Pt(this, "current", this.detect()), Pt(this, "handoffState", "pending"), Pt(this, "currentId", 0);
1342
1360
  }
1343
1361
  set(t) {
1344
1362
  this.current !== t && (this.handoffState = "pending", this.currentId = 0, this.current = t);
@@ -1364,8 +1382,8 @@ let ha = class {
1364
1382
  get isHandoffComplete() {
1365
1383
  return this.handoffState === "complete";
1366
1384
  }
1367
- }, Ue = new ha(), J = (e, t) => {
1368
- Ue.isServer ? X(e, t) : jr(e, t);
1385
+ }, Ue = new wa(), J = (e, t) => {
1386
+ Ue.isServer ? Z(e, t) : Hr(e, t);
1369
1387
  };
1370
1388
  function Se(e) {
1371
1389
  let t = C(e);
@@ -1373,18 +1391,18 @@ function Se(e) {
1373
1391
  t.current = e;
1374
1392
  }, [e]), t;
1375
1393
  }
1376
- function it(e, t) {
1377
- let [n, r] = Z(e), i = Se(e);
1394
+ function at(e, t) {
1395
+ let [n, r] = Q(e), i = Se(e);
1378
1396
  return J(() => r(i.current), [i, r, ...t]), n;
1379
1397
  }
1380
- function wa(e) {
1398
+ function ga(e) {
1381
1399
  typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
1382
1400
  throw t;
1383
1401
  }));
1384
1402
  }
1385
1403
  function _e() {
1386
- let e = [], t = { addEventListener(n, r, i, l) {
1387
- return n.addEventListener(r, i, l), t.add(() => n.removeEventListener(r, i, l));
1404
+ let e = [], t = { addEventListener(n, r, i, a) {
1405
+ return n.addEventListener(r, i, a), t.add(() => n.removeEventListener(r, i, a));
1388
1406
  }, requestAnimationFrame(...n) {
1389
1407
  let r = requestAnimationFrame(...n);
1390
1408
  return t.add(() => cancelAnimationFrame(r));
@@ -1395,15 +1413,15 @@ function _e() {
1395
1413
  return t.add(() => clearTimeout(r));
1396
1414
  }, microTask(...n) {
1397
1415
  let r = { current: !0 };
1398
- return wa(() => {
1416
+ return ga(() => {
1399
1417
  r.current && n[0]();
1400
1418
  }), t.add(() => {
1401
1419
  r.current = !1;
1402
1420
  });
1403
1421
  }, style(n, r, i) {
1404
- let l = n.style.getPropertyValue(r);
1422
+ let a = n.style.getPropertyValue(r);
1405
1423
  return Object.assign(n.style, { [r]: i }), this.add(() => {
1406
- Object.assign(n.style, { [r]: l });
1424
+ Object.assign(n.style, { [r]: a });
1407
1425
  });
1408
1426
  }, group(n) {
1409
1427
  let r = _e();
@@ -1421,95 +1439,95 @@ function _e() {
1421
1439
  } };
1422
1440
  return t;
1423
1441
  }
1424
- function Re() {
1425
- let [e] = Z(_e);
1426
- return X(() => () => e.dispose(), [e]), e;
1442
+ function Ne() {
1443
+ let [e] = Q(_e);
1444
+ return Z(() => () => e.dispose(), [e]), e;
1427
1445
  }
1428
- let k = function(e) {
1446
+ let E = function(e) {
1429
1447
  let t = Se(e);
1430
1448
  return Y.useCallback((...n) => t.current(...n), [t]);
1431
1449
  };
1432
- function ga() {
1450
+ function xa() {
1433
1451
  let e = typeof document > "u";
1434
1452
  return "useSyncExternalStore" in Pe ? ((t) => t.useSyncExternalStore)(Pe)(() => () => {
1435
1453
  }, () => !1, () => !e) : !1;
1436
1454
  }
1437
1455
  function qt() {
1438
- let e = ga(), [t, n] = Pe.useState(Ue.isHandoffComplete);
1456
+ let e = xa(), [t, n] = Pe.useState(Ue.isHandoffComplete);
1439
1457
  return t && Ue.isHandoffComplete === !1 && n(!1), Pe.useEffect(() => {
1440
1458
  t !== !0 && n(!0);
1441
1459
  }, [t]), Pe.useEffect(() => Ue.handoff(), []), e ? !1 : t;
1442
1460
  }
1443
- var pn;
1444
- let Ne = (pn = Y.useId) != null ? pn : function() {
1461
+ var bn;
1462
+ let Fe = (bn = Y.useId) != null ? bn : function() {
1445
1463
  let e = qt(), [t, n] = Y.useState(e ? () => Ue.nextId() : null);
1446
1464
  return J(() => {
1447
1465
  t === null && n(Ue.nextId());
1448
1466
  }, [t]), t != null ? "" + t : void 0;
1449
1467
  };
1450
- function Q(e, t, ...n) {
1468
+ function X(e, t, ...n) {
1451
1469
  if (e in t) {
1452
1470
  let i = t[e];
1453
1471
  return typeof i == "function" ? i(...n) : i;
1454
1472
  }
1455
1473
  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(", ")}.`);
1456
- throw Error.captureStackTrace && Error.captureStackTrace(r, Q), r;
1474
+ throw Error.captureStackTrace && Error.captureStackTrace(r, X), r;
1457
1475
  }
1458
- function yt(e) {
1476
+ function Ot(e) {
1459
1477
  return Ue.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
1460
1478
  }
1461
- let bn = ["[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(",");
1462
- var xa = ((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))(xa || {}), ya = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(ya || {}), Oa = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Oa || {}), Ht = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Ht || {});
1463
- function Sr(e, t = 0) {
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) {
1464
1482
  var n;
1465
- return e === ((n = yt(e)) == null ? void 0 : n.body) ? !1 : Q(t, { 0() {
1466
- return e.matches(bn);
1483
+ return e === ((n = Ot(e)) == null ? void 0 : n.body) ? !1 : X(t, { 0() {
1484
+ return e.matches(vn);
1467
1485
  }, 1() {
1468
1486
  let r = e;
1469
1487
  for (; r !== null; ) {
1470
- if (r.matches(bn))
1488
+ if (r.matches(vn))
1471
1489
  return !0;
1472
1490
  r = r.parentElement;
1473
1491
  }
1474
1492
  return !1;
1475
1493
  } });
1476
1494
  }
1477
- var Sa = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Sa || {});
1495
+ var ka = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(ka || {});
1478
1496
  typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
1479
1497
  e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
1480
1498
  }, !0), document.addEventListener("click", (e) => {
1481
1499
  e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
1482
1500
  }, !0));
1483
- function kr(e, t = (n) => n) {
1501
+ function Tr(e, t = (n) => n) {
1484
1502
  return e.slice().sort((n, r) => {
1485
- let i = t(n), l = t(r);
1486
- if (i === null || l === null)
1503
+ let i = t(n), a = t(r);
1504
+ if (i === null || a === null)
1487
1505
  return 0;
1488
- let o = i.compareDocumentPosition(l);
1506
+ let o = i.compareDocumentPosition(a);
1489
1507
  return o & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
1490
1508
  });
1491
1509
  }
1492
- function ft(e, t, n) {
1510
+ function pt(e, t, n) {
1493
1511
  let r = Se(t);
1494
- X(() => {
1495
- function i(l) {
1496
- r.current(l);
1512
+ Z(() => {
1513
+ function i(a) {
1514
+ r.current(a);
1497
1515
  }
1498
1516
  return document.addEventListener(e, i, n), () => document.removeEventListener(e, i, n);
1499
1517
  }, [e, n]);
1500
1518
  }
1501
- function ka(e, t, n) {
1519
+ function Ta(e, t, n) {
1502
1520
  let r = Se(t);
1503
- X(() => {
1504
- function i(l) {
1505
- r.current(l);
1521
+ Z(() => {
1522
+ function i(a) {
1523
+ r.current(a);
1506
1524
  }
1507
1525
  return window.addEventListener(e, i, n), () => window.removeEventListener(e, i, n);
1508
1526
  }, [e, n]);
1509
1527
  }
1510
- function Tr(e, t, n = !0) {
1528
+ function Er(e, t, n = !0) {
1511
1529
  let r = C(!1);
1512
- X(() => {
1530
+ Z(() => {
1513
1531
  requestAnimationFrame(() => {
1514
1532
  r.current = n;
1515
1533
  });
@@ -1520,30 +1538,30 @@ function Tr(e, t, n = !0) {
1520
1538
  let p = f(o);
1521
1539
  if (p === null || !p.getRootNode().contains(p) || !p.isConnected)
1522
1540
  return;
1523
- let b = function v(m) {
1524
- return typeof m == "function" ? v(m()) : Array.isArray(m) || m instanceof Set ? m : [m];
1541
+ let b = function v(h) {
1542
+ return typeof h == "function" ? v(h()) : Array.isArray(h) || h instanceof Set ? h : [h];
1525
1543
  }(e);
1526
1544
  for (let v of b) {
1527
1545
  if (v === null)
1528
1546
  continue;
1529
- let m = v instanceof HTMLElement ? v : v.current;
1530
- if (m != null && m.contains(p) || o.composed && o.composedPath().includes(m))
1547
+ let h = v instanceof HTMLElement ? v : v.current;
1548
+ if (h != null && h.contains(p) || o.composed && o.composedPath().includes(h))
1531
1549
  return;
1532
1550
  }
1533
- return !Sr(p, Ht.Loose) && p.tabIndex !== -1 && o.preventDefault(), t(o, p);
1551
+ return !kr(p, zt.Loose) && p.tabIndex !== -1 && o.preventDefault(), t(o, p);
1534
1552
  }
1535
- let l = C(null);
1536
- ft("pointerdown", (o) => {
1553
+ let a = C(null);
1554
+ pt("pointerdown", (o) => {
1537
1555
  var f, p;
1538
- r.current && (l.current = ((p = (f = o.composedPath) == null ? void 0 : f.call(o)) == null ? void 0 : p[0]) || o.target);
1539
- }, !0), ft("mousedown", (o) => {
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) => {
1540
1558
  var f, p;
1541
- r.current && (l.current = ((p = (f = o.composedPath) == null ? void 0 : f.call(o)) == null ? void 0 : p[0]) || o.target);
1542
- }, !0), ft("click", (o) => {
1543
- l.current && (i(o, () => l.current), l.current = null);
1544
- }, !0), ft("touchend", (o) => i(o, () => o.target instanceof HTMLElement ? o.target : null), !0), ka("blur", (o) => i(o, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
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);
1545
1563
  }
1546
- function vn(e) {
1564
+ function mn(e) {
1547
1565
  var t;
1548
1566
  if (e.type)
1549
1567
  return e.type;
@@ -1551,50 +1569,50 @@ function vn(e) {
1551
1569
  if (typeof n == "string" && n.toLowerCase() === "button")
1552
1570
  return "button";
1553
1571
  }
1554
- function Er(e, t) {
1555
- let [n, r] = Z(() => vn(e));
1572
+ function Ir(e, t) {
1573
+ let [n, r] = Q(() => mn(e));
1556
1574
  return J(() => {
1557
- r(vn(e));
1575
+ r(mn(e));
1558
1576
  }, [e.type, e.as]), J(() => {
1559
1577
  n || t.current && t.current instanceof HTMLButtonElement && !t.current.hasAttribute("type") && r("button");
1560
1578
  }, [n, t]), n;
1561
1579
  }
1562
- let Ta = Symbol();
1580
+ let Ea = Symbol();
1563
1581
  function ye(...e) {
1564
1582
  let t = C(e);
1565
- X(() => {
1583
+ Z(() => {
1566
1584
  t.current = e;
1567
1585
  }, [e]);
1568
- let n = k((r) => {
1586
+ let n = E((r) => {
1569
1587
  for (let i of t.current)
1570
1588
  i != null && (typeof i == "function" ? i(r) : i.current = r);
1571
1589
  });
1572
- return e.every((r) => r == null || r?.[Ta]) ? void 0 : n;
1590
+ return e.every((r) => r == null || r?.[Ea]) ? void 0 : n;
1573
1591
  }
1574
- function Ea({ container: e, accept: t, walk: n, enabled: r = !0 }) {
1575
- let i = C(t), l = C(n);
1576
- X(() => {
1577
- i.current = t, l.current = n;
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;
1578
1596
  }, [t, n]), J(() => {
1579
1597
  if (!e || !r)
1580
1598
  return;
1581
- let o = yt(e);
1599
+ let o = Ot(e);
1582
1600
  if (!o)
1583
1601
  return;
1584
- let f = i.current, p = l.current, b = Object.assign((m) => f(m), { acceptNode: f }), v = o.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, b, !1);
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);
1585
1603
  for (; v.nextNode(); )
1586
1604
  p(v.currentNode);
1587
- }, [e, r, i, l]);
1605
+ }, [e, r, i, a]);
1588
1606
  }
1589
- function Ia(e) {
1607
+ function _a(e) {
1590
1608
  throw new Error("Unexpected object: " + e);
1591
1609
  }
1592
- var j = ((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))(j || {});
1593
- function Ir(e, t) {
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) {
1594
1612
  let n = t.resolveItems();
1595
1613
  if (n.length <= 0)
1596
1614
  return null;
1597
- let r = t.resolveActiveIndex(), i = r ?? -1, l = (() => {
1615
+ let r = t.resolveActiveIndex(), i = r ?? -1, a = (() => {
1598
1616
  switch (e.focus) {
1599
1617
  case 0:
1600
1618
  return n.findIndex((o) => !t.resolveDisabled(o));
@@ -1613,63 +1631,63 @@ function Ir(e, t) {
1613
1631
  case 5:
1614
1632
  return null;
1615
1633
  default:
1616
- Ia(e);
1634
+ _a(e);
1617
1635
  }
1618
1636
  })();
1619
- return l === -1 ? r : l;
1637
+ return a === -1 ? r : a;
1620
1638
  }
1621
- function ht(...e) {
1639
+ function wt(...e) {
1622
1640
  return Array.from(new Set(e.flatMap((t) => typeof t == "string" ? t.split(" ") : []))).filter(Boolean).join(" ");
1623
1641
  }
1624
- var Ge = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ge || {}), Me = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Me || {});
1625
- function ve({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: i, visible: l = !0, name: o }) {
1626
- let f = _r(t, e);
1627
- if (l)
1628
- return pt(f, n, r, o);
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);
1629
1647
  let p = i ?? 0;
1630
1648
  if (p & 2) {
1631
1649
  let { static: b = !1, ...v } = f;
1632
1650
  if (b)
1633
- return pt(v, n, r, o);
1651
+ return bt(v, n, r, o);
1634
1652
  }
1635
1653
  if (p & 1) {
1636
1654
  let { unmount: b = !0, ...v } = f;
1637
- return Q(b ? 0 : 1, { 0() {
1655
+ return X(b ? 0 : 1, { 0() {
1638
1656
  return null;
1639
1657
  }, 1() {
1640
- return pt({ ...v, hidden: !0, style: { display: "none" } }, n, r, o);
1658
+ return bt({ ...v, hidden: !0, style: { display: "none" } }, n, r, o);
1641
1659
  } });
1642
1660
  }
1643
- return pt(f, n, r, o);
1661
+ return bt(f, n, r, o);
1644
1662
  }
1645
- function pt(e, t = {}, n, r) {
1646
- let { as: i = n, children: l, refName: o = "ref", ...f } = Pt(e, ["unmount", "static"]), p = e.ref !== void 0 ? { [o]: e.ref } : {}, b = typeof l == "function" ? l(t) : l;
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;
1647
1665
  "className" in f && f.className && typeof f.className == "function" && (f.className = f.className(t));
1648
1666
  let v = {};
1649
1667
  if (t) {
1650
- let m = !1, s = [];
1651
- for (let [c, a] of Object.entries(t))
1652
- typeof a == "boolean" && (m = !0), a === !0 && s.push(c);
1653
- m && (v["data-headlessui-state"] = s.join(" "));
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(" "));
1654
1672
  }
1655
- if (i === Le && Object.keys(wt(f)).length > 0) {
1673
+ if (i === Le && Object.keys(gt(f)).length > 0) {
1656
1674
  if (!qr(b) || Array.isArray(b) && b.length > 1)
1657
- 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(`
1658
- `), "", "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(`
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(`
1659
1677
  `)].join(`
1660
1678
  `));
1661
- let m = b.props, s = typeof m?.className == "function" ? (...a) => ht(m?.className(...a), f.className) : ht(m?.className, f.className), c = s ? { className: s } : {};
1662
- return Hr(b, Object.assign({}, _r(b.props, wt(Pt(f, ["ref"]))), v, p, _a(b.ref, p.ref), c));
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));
1663
1681
  }
1664
- return zr(i, Object.assign({}, Pt(f, ["ref"]), i !== Le && p, i !== Le && v), b);
1682
+ return Kr(i, Object.assign({}, Lt(f, ["ref"]), i !== Le && p, i !== Le && v), b);
1665
1683
  }
1666
- function _a(...e) {
1684
+ function Ca(...e) {
1667
1685
  return { ref: e.every((t) => t == null) ? void 0 : (t) => {
1668
1686
  for (let n of e)
1669
1687
  n != null && (typeof n == "function" ? n(t) : n.current = t);
1670
1688
  } };
1671
1689
  }
1672
- function _r(...e) {
1690
+ function Cr(...e) {
1673
1691
  if (e.length === 0)
1674
1692
  return {};
1675
1693
  if (e.length === 1)
@@ -1681,40 +1699,40 @@ function _r(...e) {
1681
1699
  if (t.disabled || t["aria-disabled"])
1682
1700
  return Object.assign(t, Object.fromEntries(Object.keys(n).map((r) => [r, void 0])));
1683
1701
  for (let r in n)
1684
- Object.assign(t, { [r](i, ...l) {
1702
+ Object.assign(t, { [r](i, ...a) {
1685
1703
  let o = n[r];
1686
1704
  for (let f of o) {
1687
1705
  if ((i instanceof Event || i?.nativeEvent instanceof Event) && i.defaultPrevented)
1688
1706
  return;
1689
- f(i, ...l);
1707
+ f(i, ...a);
1690
1708
  }
1691
1709
  } });
1692
1710
  return t;
1693
1711
  }
1694
- function fe(e) {
1712
+ function be(e) {
1695
1713
  var t;
1696
- return Object.assign(De(e), { displayName: (t = e.displayName) != null ? t : e.name });
1714
+ return Object.assign(We(e), { displayName: (t = e.displayName) != null ? t : e.name });
1697
1715
  }
1698
- function wt(e) {
1716
+ function gt(e) {
1699
1717
  let t = Object.assign({}, e);
1700
1718
  for (let n in t)
1701
1719
  t[n] === void 0 && delete t[n];
1702
1720
  return t;
1703
1721
  }
1704
- function Pt(e, t = []) {
1722
+ function Lt(e, t = []) {
1705
1723
  let n = Object.assign({}, e);
1706
1724
  for (let r of t)
1707
1725
  r in n && delete n[r];
1708
1726
  return n;
1709
1727
  }
1710
- function Cr(e) {
1728
+ function Pr(e) {
1711
1729
  let t = e.parentElement, n = null;
1712
1730
  for (; t && !(t instanceof HTMLFieldSetElement); )
1713
1731
  t instanceof HTMLLegendElement && (n = t), t = t.parentElement;
1714
1732
  let r = t?.getAttribute("disabled") === "";
1715
- return r && Ca(n) ? !1 : r;
1733
+ return r && Pa(n) ? !1 : r;
1716
1734
  }
1717
- function Ca(e) {
1735
+ function Pa(e) {
1718
1736
  if (!e)
1719
1737
  return !1;
1720
1738
  let t = e.previousElementSibling;
@@ -1725,82 +1743,82 @@ function Ca(e) {
1725
1743
  }
1726
1744
  return !0;
1727
1745
  }
1728
- function zt(e = {}, t = null, n = []) {
1746
+ function Kt(e = {}, t = null, n = []) {
1729
1747
  for (let [r, i] of Object.entries(e))
1730
- Lr(n, Pr(t, r), i);
1748
+ Nr(n, Lr(t, r), i);
1731
1749
  return n;
1732
1750
  }
1733
- function Pr(e, t) {
1751
+ function Lr(e, t) {
1734
1752
  return e ? e + "[" + t + "]" : t;
1735
1753
  }
1736
- function Lr(e, t, n) {
1754
+ function Nr(e, t, n) {
1737
1755
  if (Array.isArray(n))
1738
1756
  for (let [r, i] of n.entries())
1739
- Lr(e, Pr(t, r.toString()), i);
1757
+ Nr(e, Lr(t, r.toString()), i);
1740
1758
  else
1741
- 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, ""]) : zt(n, t, e);
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);
1742
1760
  }
1743
- let Pa = "div";
1744
- var Kt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Kt || {});
1745
- function La(e, t) {
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) {
1746
1764
  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" } } };
1747
- return ve({ ourProps: i, theirProps: r, slot: {}, defaultTag: Pa, name: "Hidden" });
1765
+ return me({ ourProps: i, theirProps: r, slot: {}, defaultTag: La, name: "Hidden" });
1748
1766
  }
1749
- let Rr = fe(La), Gt = je(null);
1750
- Gt.displayName = "OpenClosedContext";
1751
- var le = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(le || {});
1752
- function Ot() {
1753
- return We(Gt);
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);
1754
1772
  }
1755
- function Yt({ value: e, children: t }) {
1756
- return Y.createElement(Gt.Provider, { value: e }, t);
1773
+ function Qt({ value: e, children: t }) {
1774
+ return Y.createElement(Yt.Provider, { value: e }, t);
1757
1775
  }
1758
- 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 || {});
1759
- function Nr(e, t, n) {
1760
- let [r, i] = Z(n), l = e !== void 0, o = C(l), f = C(!1), p = C(!1);
1761
- return l && !o.current && !f.current ? (f.current = !0, o.current = l, 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.")) : !l && o.current && !p.current && (p.current = !0, o.current = l, 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.")), [l ? e : r, k((b) => (l || i(b), t?.(b)))];
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)))];
1762
1780
  }
1763
- function mn(e, t) {
1764
- let n = C([]), r = k(e);
1765
- X(() => {
1781
+ function hn(e, t) {
1782
+ let n = C([]), r = E(e);
1783
+ Z(() => {
1766
1784
  let i = [...n.current];
1767
- for (let [l, o] of t.entries())
1768
- if (n.current[l] !== o) {
1785
+ for (let [a, o] of t.entries())
1786
+ if (n.current[a] !== o) {
1769
1787
  let f = r(t, i);
1770
1788
  return n.current = t, f;
1771
1789
  }
1772
1790
  }, [r, ...t]);
1773
1791
  }
1774
- function hn(e) {
1792
+ function wn(e) {
1775
1793
  return [e.screenX, e.screenY];
1776
1794
  }
1777
- function Fr() {
1795
+ function Ar() {
1778
1796
  let e = C([-1, -1]);
1779
1797
  return { wasMoved(t) {
1780
- let n = hn(t);
1798
+ let n = wn(t);
1781
1799
  return e.current[0] === n[0] && e.current[1] === n[1] ? !1 : (e.current = n, !0);
1782
1800
  }, update(t) {
1783
- e.current = hn(t);
1801
+ e.current = wn(t);
1784
1802
  } };
1785
1803
  }
1786
1804
  function Ra() {
1787
1805
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
1788
1806
  }
1789
- function Na() {
1807
+ function Fa() {
1790
1808
  return /Android/gi.test(window.navigator.userAgent);
1791
1809
  }
1792
- function Fa() {
1793
- return Ra() || Na();
1810
+ function Aa() {
1811
+ return Ra() || Fa();
1794
1812
  }
1795
- function Aa(...e) {
1796
- return te(() => yt(...e), [...e]);
1813
+ function Ma(...e) {
1814
+ return re(() => Ot(...e), [...e]);
1797
1815
  }
1798
- var $a = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))($a || {}), Ma = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(Ma || {}), Da = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(Da || {}), Wa = ((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))(Wa || {});
1799
- function Lt(e, t = (n) => n) {
1800
- let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, r = kr(t(e.options.slice()), (l) => l.dataRef.current.domRef.current), i = n ? r.indexOf(n) : null;
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;
1801
1819
  return i === -1 && (i = null), { options: r, activeOptionIndex: i };
1802
1820
  }
1803
- let Va = { 1(e) {
1821
+ let Ba = { 1(e) {
1804
1822
  var t;
1805
1823
  return (t = e.dataRef.current) != null && t.disabled || e.comboboxState === 1 ? e : { ...e, activeOptionIndex: null, comboboxState: 1 };
1806
1824
  }, 0(e) {
@@ -1809,360 +1827,360 @@ let Va = { 1(e) {
1809
1827
  return e;
1810
1828
  let n = e.activeOptionIndex;
1811
1829
  if (e.dataRef.current) {
1812
- let { isSelected: r } = e.dataRef.current, i = e.options.findIndex((l) => r(l.dataRef.current.value));
1830
+ let { isSelected: r } = e.dataRef.current, i = e.options.findIndex((a) => r(a.dataRef.current.value));
1813
1831
  i !== -1 && (n = i);
1814
1832
  }
1815
1833
  return { ...e, comboboxState: 0, activeOptionIndex: n };
1816
1834
  }, 2(e, t) {
1817
- var n, r, i, l;
1835
+ var n, r, i, a;
1818
1836
  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)
1819
1837
  return e;
1820
- let o = Lt(e);
1838
+ let o = Nt(e);
1821
1839
  if (o.activeOptionIndex === null) {
1822
1840
  let p = o.options.findIndex((b) => !b.dataRef.current.disabled);
1823
1841
  p !== -1 && (o.activeOptionIndex = p);
1824
1842
  }
1825
- let f = Ir(t, { resolveItems: () => o.options, resolveActiveIndex: () => o.activeOptionIndex, resolveId: (p) => p.id, resolveDisabled: (p) => p.dataRef.current.disabled });
1826
- return { ...e, ...o, activeOptionIndex: f, activationTrigger: (l = t.trigger) != null ? l : 1 };
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 };
1827
1845
  }, 3: (e, t) => {
1828
1846
  var n, r;
1829
- let i = { id: t.id, dataRef: t.dataRef }, l = Lt(e, (f) => [...f, i]);
1830
- e.activeOptionIndex === null && (n = e.dataRef.current) != null && n.isSelected(t.dataRef.current.value) && (l.activeOptionIndex = l.options.indexOf(i));
1831
- let o = { ...e, ...l, activationTrigger: 1 };
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 };
1832
1850
  return (r = e.dataRef.current) != null && r.__demoMode && e.dataRef.current.value === void 0 && (o.activeOptionIndex = 0), o;
1833
1851
  }, 4: (e, t) => {
1834
- let n = Lt(e, (r) => {
1835
- let i = r.findIndex((l) => l.id === t.id);
1852
+ let n = Nt(e, (r) => {
1853
+ let i = r.findIndex((a) => a.id === t.id);
1836
1854
  return i !== -1 && r.splice(i, 1), r;
1837
1855
  });
1838
1856
  return { ...e, ...n, activationTrigger: 1 };
1839
- }, 5: (e, t) => ({ ...e, labelId: t.id }) }, Qt = je(null);
1840
- Qt.displayName = "ComboboxActionsContext";
1841
- function ot(e) {
1842
- let t = We(Qt);
1857
+ }, 5: (e, t) => ({ ...e, labelId: t.id }) }, Xt = He(null);
1858
+ Xt.displayName = "ComboboxActionsContext";
1859
+ function lt(e) {
1860
+ let t = Ve(Xt);
1843
1861
  if (t === null) {
1844
1862
  let n = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
1845
- throw Error.captureStackTrace && Error.captureStackTrace(n, ot), n;
1863
+ throw Error.captureStackTrace && Error.captureStackTrace(n, lt), n;
1846
1864
  }
1847
1865
  return t;
1848
1866
  }
1849
- let Xt = je(null);
1850
- Xt.displayName = "ComboboxDataContext";
1851
- function Xe(e) {
1852
- let t = We(Xt);
1867
+ let Zt = He(null);
1868
+ Zt.displayName = "ComboboxDataContext";
1869
+ function Ze(e) {
1870
+ let t = Ve(Zt);
1853
1871
  if (t === null) {
1854
1872
  let n = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
1855
- throw Error.captureStackTrace && Error.captureStackTrace(n, Xe), n;
1873
+ throw Error.captureStackTrace && Error.captureStackTrace(n, Ze), n;
1856
1874
  }
1857
1875
  return t;
1858
1876
  }
1859
- function Ba(e, t) {
1860
- return Q(t.type, Va, e, t);
1877
+ function ja(e, t) {
1878
+ return X(t.type, Ba, e, t);
1861
1879
  }
1862
1880
  let Ua = Le;
1863
- function ja(e, t) {
1864
- let { value: n, defaultValue: r, onChange: i, form: l, name: o, by: f = (x, E) => x === E, disabled: p = !1, __demoMode: b = !1, nullable: v = !1, multiple: m = !1, ...s } = e, [c = m ? [] : void 0, a] = Nr(n, i, r), [d, u] = On(Ba, { dataRef: Sn(), comboboxState: b ? 0 : 1, options: [], activeOptionIndex: null, activationTrigger: 1, labelId: null }), h = C(!1), I = C({ static: !1, hold: !1 }), w = C(null), g = C(null), V = C(null), F = C(null), q = k(typeof f == "string" ? (x, E) => {
1865
- let M = f;
1866
- return x?.[M] === E?.[M];
1867
- } : f), $ = ze((x) => Q(S.mode, { 1: () => c.some((E) => q(E, x)), 0: () => q(c, x) }), [c]), S = te(() => ({ ...d, optionsPropsRef: I, labelRef: w, inputRef: g, buttonRef: V, optionsRef: F, value: c, defaultValue: r, disabled: p, mode: m ? 1 : 0, get activeOptionIndex() {
1868
- if (h.current && d.activeOptionIndex === null && d.options.length > 0) {
1869
- let x = d.options.findIndex((E) => !E.dataRef.current.disabled);
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);
1870
1888
  if (x !== -1)
1871
1889
  return x;
1872
1890
  }
1873
- return d.activeOptionIndex;
1874
- }, compare: q, isSelected: $, nullable: v, __demoMode: b }), [c, r, p, m, v, b, d]), z = C(S.activeOptionIndex !== null ? S.options[S.activeOptionIndex] : null);
1875
- X(() => {
1876
- let x = S.activeOptionIndex !== null ? S.options[S.activeOptionIndex] : null;
1891
+ 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;
1877
1895
  z.current !== x && (z.current = x);
1878
1896
  }), J(() => {
1879
- d.dataRef.current = S;
1880
- }, [S]), Tr([S.buttonRef, S.inputRef, S.optionsRef], () => pe.closeCombobox(), S.comboboxState === 0);
1881
- let ee = te(() => ({ open: S.comboboxState === 0, disabled: p, activeIndex: S.activeOptionIndex, activeOption: S.activeOptionIndex === null ? null : S.options[S.activeOptionIndex].dataRef.current.value, value: c }), [S, p, c]), ne = k((x) => {
1882
- let E = S.options.find((M) => M.id === x);
1883
- E && ie(E.dataRef.current.value);
1884
- }), _ = k(() => {
1885
- if (S.activeOptionIndex !== null) {
1886
- let { dataRef: x, id: E } = S.options[S.activeOptionIndex];
1887
- ie(x.current.value), pe.goToOption(j.Specific, E);
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);
1888
1906
  }
1889
- }), T = k(() => {
1890
- u({ type: 0 }), h.current = !0;
1891
- }), L = k(() => {
1892
- u({ type: 1 }), h.current = !1;
1893
- }), A = k((x, E, M) => (h.current = !1, x === j.Specific ? u({ type: 2, focus: j.Specific, id: E, trigger: M }) : u({ type: 2, focus: x, trigger: M }))), W = k((x, E) => (u({ type: 3, id: x, dataRef: E }), () => {
1894
- var M;
1895
- ((M = z.current) == null ? void 0 : M.id) === x && (h.current = !0), u({ type: 4, id: x });
1896
- })), re = k((x) => (u({ type: 5, id: x }), () => u({ type: 5, id: null }))), ie = k((x) => Q(S.mode, { 0() {
1897
- return a?.(x);
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);
1898
1916
  }, 1() {
1899
- let E = S.value.slice(), M = E.findIndex((he) => q(he, x));
1900
- return M === -1 ? E.push(x) : E.splice(M, 1), a?.(E);
1901
- } })), pe = te(() => ({ onChange: ie, registerOption: W, registerLabel: re, goToOption: A, closeCombobox: L, openCombobox: T, selectActiveOption: _, selectOption: ne }), []), me = t === null ? {} : { ref: t }, se = C(null), oe = Re();
1902
- return X(() => {
1903
- se.current && r !== void 0 && oe.addEventListener(se.current, "reset", () => {
1904
- a?.(r);
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);
1905
1923
  });
1906
- }, [se, a]), Y.createElement(Qt.Provider, { value: pe }, Y.createElement(Xt.Provider, { value: S }, Y.createElement(Yt, { value: Q(S.comboboxState, { 0: le.Open, 1: le.Closed }) }, o != null && c != null && zt({ [o]: c }).map(([x, E], M) => Y.createElement(Rr, { features: Kt.Hidden, ref: M === 0 ? (he) => {
1907
- var Fe;
1908
- se.current = (Fe = he?.closest("form")) != null ? Fe : null;
1909
- } : void 0, ...wt({ key: x, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: l, name: x, value: E }) })), ve({ ourProps: me, theirProps: s, slot: ee, defaultTag: Ua, name: "Combobox" }))));
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" }))));
1910
1928
  }
1911
1929
  let qa = "input";
1912
- function Ha(e, t) {
1913
- var n, r, i, l;
1914
- let o = Ne(), { id: f = `headlessui-combobox-input-${o}`, onChange: p, displayValue: b, type: v = "text", ...m } = e, s = Xe("Combobox.Input"), c = ot("Combobox.Input"), a = ye(s.inputRef, t), d = Aa(s.inputRef), u = C(!1), h = Re(), I = k(() => {
1915
- c.onChange(null), s.optionsRef.current && (s.optionsRef.current.scrollTop = 0), c.goToOption(j.Nothing);
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);
1916
1934
  }), w = function() {
1917
1935
  var _;
1918
- return typeof b == "function" && s.value !== void 0 ? (_ = b(s.value)) != null ? _ : "" : typeof s.value == "string" ? s.value : "";
1936
+ return typeof b == "function" && l.value !== void 0 ? (_ = b(l.value)) != null ? _ : "" : typeof l.value == "string" ? l.value : "";
1919
1937
  }();
1920
- mn(([_, T], [L, A]) => {
1921
- if (u.current)
1938
+ hn(([_, te], [ee, ce]) => {
1939
+ if (d.current)
1922
1940
  return;
1923
- let W = s.inputRef.current;
1924
- W && ((A === 0 && T === 1 || _ !== L) && (W.value = _), requestAnimationFrame(() => {
1925
- if (u.current || !W || d?.activeElement !== W)
1941
+ let V = l.inputRef.current;
1942
+ V && ((ce === 0 && te === 1 || _ !== ee) && (V.value = _), requestAnimationFrame(() => {
1943
+ if (d.current || !V || c?.activeElement !== V)
1926
1944
  return;
1927
- let { selectionStart: re, selectionEnd: ie } = W;
1928
- Math.abs((ie ?? 0) - (re ?? 0)) === 0 && re === 0 && W.setSelectionRange(W.value.length, W.value.length);
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);
1929
1947
  }));
1930
- }, [w, s.comboboxState, d]), mn(([_], [T]) => {
1931
- if (_ === 0 && T === 1) {
1932
- if (u.current)
1948
+ }, [w, l.comboboxState, c]), hn(([_], [te]) => {
1949
+ if (_ === 0 && te === 1) {
1950
+ if (d.current)
1933
1951
  return;
1934
- let L = s.inputRef.current;
1935
- if (!L)
1952
+ let ee = l.inputRef.current;
1953
+ if (!ee)
1936
1954
  return;
1937
- let A = L.value, { selectionStart: W, selectionEnd: re, selectionDirection: ie } = L;
1938
- L.value = "", L.value = A, ie !== null ? L.setSelectionRange(W, re, ie) : L.setSelectionRange(W, re);
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);
1939
1957
  }
1940
- }, [s.comboboxState]);
1941
- let g = C(!1), V = k(() => {
1958
+ }, [l.comboboxState]);
1959
+ let g = C(!1), W = E(() => {
1942
1960
  g.current = !0;
1943
- }), F = k(() => {
1944
- h.nextFrame(() => {
1961
+ }), L = E(() => {
1962
+ m.nextFrame(() => {
1945
1963
  g.current = !1;
1946
1964
  });
1947
- }), q = k((_) => {
1948
- switch (u.current = !0, _.key) {
1949
- case U.Enter:
1950
- if (u.current = !1, s.comboboxState !== 0 || g.current)
1965
+ }), q = E((_) => {
1966
+ switch (d.current = !0, _.key) {
1967
+ case j.Enter:
1968
+ if (d.current = !1, l.comboboxState !== 0 || g.current)
1951
1969
  return;
1952
- if (_.preventDefault(), _.stopPropagation(), s.activeOptionIndex === null) {
1953
- c.closeCombobox();
1970
+ if (_.preventDefault(), _.stopPropagation(), l.activeOptionIndex === null) {
1971
+ u.closeCombobox();
1954
1972
  return;
1955
1973
  }
1956
- c.selectActiveOption(), s.mode === 0 && c.closeCombobox();
1974
+ u.selectActiveOption(), l.mode === 0 && u.closeCombobox();
1957
1975
  break;
1958
- case U.ArrowDown:
1959
- return u.current = !1, _.preventDefault(), _.stopPropagation(), Q(s.comboboxState, { 0: () => {
1960
- c.goToOption(j.Next);
1976
+ case j.ArrowDown:
1977
+ return d.current = !1, _.preventDefault(), _.stopPropagation(), X(l.comboboxState, { 0: () => {
1978
+ u.goToOption(U.Next);
1961
1979
  }, 1: () => {
1962
- c.openCombobox();
1980
+ u.openCombobox();
1963
1981
  } });
1964
- case U.ArrowUp:
1965
- return u.current = !1, _.preventDefault(), _.stopPropagation(), Q(s.comboboxState, { 0: () => {
1966
- c.goToOption(j.Previous);
1982
+ case j.ArrowUp:
1983
+ return d.current = !1, _.preventDefault(), _.stopPropagation(), X(l.comboboxState, { 0: () => {
1984
+ u.goToOption(U.Previous);
1967
1985
  }, 1: () => {
1968
- c.openCombobox(), h.nextFrame(() => {
1969
- s.value || c.goToOption(j.Last);
1986
+ u.openCombobox(), m.nextFrame(() => {
1987
+ l.value || u.goToOption(U.Last);
1970
1988
  });
1971
1989
  } });
1972
- case U.Home:
1990
+ case j.Home:
1973
1991
  if (_.shiftKey)
1974
1992
  break;
1975
- return u.current = !1, _.preventDefault(), _.stopPropagation(), c.goToOption(j.First);
1976
- case U.PageUp:
1977
- return u.current = !1, _.preventDefault(), _.stopPropagation(), c.goToOption(j.First);
1978
- case U.End:
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:
1979
1997
  if (_.shiftKey)
1980
1998
  break;
1981
- return u.current = !1, _.preventDefault(), _.stopPropagation(), c.goToOption(j.Last);
1982
- case U.PageDown:
1983
- return u.current = !1, _.preventDefault(), _.stopPropagation(), c.goToOption(j.Last);
1984
- case U.Escape:
1985
- return u.current = !1, s.comboboxState !== 0 ? void 0 : (_.preventDefault(), s.optionsRef.current && !s.optionsPropsRef.current.static && _.stopPropagation(), s.nullable && s.mode === 0 && s.value === null && I(), c.closeCombobox());
1986
- case U.Tab:
1987
- if (u.current = !1, s.comboboxState !== 0)
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:
2005
+ if (d.current = !1, l.comboboxState !== 0)
1988
2006
  return;
1989
- s.mode === 0 && c.selectActiveOption(), c.closeCombobox();
2007
+ l.mode === 0 && u.selectActiveOption(), u.closeCombobox();
1990
2008
  break;
1991
2009
  }
1992
- }), $ = k((_) => {
1993
- p?.(_), s.nullable && s.mode === 0 && _.target.value === "" && I(), c.openCombobox();
1994
- }), S = k(() => {
1995
- u.current = !1;
1996
- }), z = it(() => {
1997
- if (s.labelId)
1998
- return [s.labelId].join(" ");
1999
- }, [s.labelId]), ee = te(() => ({ open: s.comboboxState === 0, disabled: s.disabled }), [s]), ne = { ref: a, id: f, role: "combobox", type: v, "aria-controls": (n = s.optionsRef.current) == null ? void 0 : n.id, "aria-expanded": s.comboboxState === 0, "aria-activedescendant": s.activeOptionIndex === null || (r = s.options[s.activeOptionIndex]) == null ? void 0 : r.id, "aria-labelledby": z, "aria-autocomplete": "list", defaultValue: (l = (i = e.defaultValue) != null ? i : s.defaultValue !== void 0 ? b?.(s.defaultValue) : null) != null ? l : s.defaultValue, disabled: s.disabled, onCompositionStart: V, onCompositionEnd: F, onKeyDown: q, onChange: $, onBlur: S };
2000
- return ve({ ourProps: ne, theirProps: m, slot: ee, defaultTag: qa, name: "Combobox.Input" });
2001
- }
2002
- let za = "button";
2003
- function Ka(e, t) {
2010
+ }), M = E((_) => {
2011
+ p?.(_), l.nullable && l.mode === 0 && _.target.value === "" && O(), u.openCombobox();
2012
+ }), k = E(() => {
2013
+ d.current = !1;
2014
+ }), z = at(() => {
2015
+ if (l.labelId)
2016
+ 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" });
2019
+ }
2020
+ let Ka = "button";
2021
+ function Ga(e, t) {
2004
2022
  var n;
2005
- let r = Xe("Combobox.Button"), i = ot("Combobox.Button"), l = ye(r.buttonRef, t), o = Ne(), { id: f = `headlessui-combobox-button-${o}`, ...p } = e, b = Re(), v = k((d) => {
2006
- switch (d.key) {
2007
- case U.ArrowDown:
2008
- return d.preventDefault(), d.stopPropagation(), r.comboboxState === 1 && i.openCombobox(), b.nextFrame(() => {
2009
- var u;
2010
- return (u = r.inputRef.current) == null ? void 0 : u.focus({ preventScroll: !0 });
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) => {
2024
+ switch (c.key) {
2025
+ case j.ArrowDown:
2026
+ return c.preventDefault(), c.stopPropagation(), r.comboboxState === 1 && i.openCombobox(), b.nextFrame(() => {
2027
+ var d;
2028
+ return (d = r.inputRef.current) == null ? void 0 : d.focus({ preventScroll: !0 });
2011
2029
  });
2012
- case U.ArrowUp:
2013
- return d.preventDefault(), d.stopPropagation(), r.comboboxState === 1 && (i.openCombobox(), b.nextFrame(() => {
2014
- r.value || i.goToOption(j.Last);
2030
+ case j.ArrowUp:
2031
+ return c.preventDefault(), c.stopPropagation(), r.comboboxState === 1 && (i.openCombobox(), b.nextFrame(() => {
2032
+ r.value || i.goToOption(U.Last);
2015
2033
  })), b.nextFrame(() => {
2016
- var u;
2017
- return (u = r.inputRef.current) == null ? void 0 : u.focus({ preventScroll: !0 });
2034
+ var d;
2035
+ return (d = r.inputRef.current) == null ? void 0 : d.focus({ preventScroll: !0 });
2018
2036
  });
2019
- case U.Escape:
2020
- return r.comboboxState !== 0 ? void 0 : (d.preventDefault(), r.optionsRef.current && !r.optionsPropsRef.current.static && d.stopPropagation(), i.closeCombobox(), b.nextFrame(() => {
2021
- var u;
2022
- return (u = r.inputRef.current) == null ? void 0 : u.focus({ preventScroll: !0 });
2037
+ case j.Escape:
2038
+ return r.comboboxState !== 0 ? void 0 : (c.preventDefault(), r.optionsRef.current && !r.optionsPropsRef.current.static && c.stopPropagation(), i.closeCombobox(), b.nextFrame(() => {
2039
+ var d;
2040
+ return (d = r.inputRef.current) == null ? void 0 : d.focus({ preventScroll: !0 });
2023
2041
  }));
2024
2042
  default:
2025
2043
  return;
2026
2044
  }
2027
- }), m = k((d) => {
2028
- if (Cr(d.currentTarget))
2029
- return d.preventDefault();
2030
- r.comboboxState === 0 ? i.closeCombobox() : (d.preventDefault(), i.openCombobox()), b.nextFrame(() => {
2031
- var u;
2032
- return (u = r.inputRef.current) == null ? void 0 : u.focus({ preventScroll: !0 });
2045
+ }), h = E((c) => {
2046
+ if (Pr(c.currentTarget))
2047
+ return c.preventDefault();
2048
+ r.comboboxState === 0 ? i.closeCombobox() : (c.preventDefault(), i.openCombobox()), b.nextFrame(() => {
2049
+ var d;
2050
+ return (d = r.inputRef.current) == null ? void 0 : d.focus({ preventScroll: !0 });
2033
2051
  });
2034
- }), s = it(() => {
2052
+ }), l = at(() => {
2035
2053
  if (r.labelId)
2036
2054
  return [r.labelId, f].join(" ");
2037
- }, [r.labelId, f]), c = te(() => ({ open: r.comboboxState === 0, disabled: r.disabled, value: r.value }), [r]), a = { ref: l, id: f, type: Er(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": s, disabled: r.disabled, onClick: m, onKeyDown: v };
2038
- return ve({ ourProps: a, theirProps: p, slot: c, defaultTag: za, name: "Combobox.Button" });
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" });
2039
2057
  }
2040
- let Ga = "label";
2041
- function Ya(e, t) {
2042
- let n = Ne(), { id: r = `headlessui-combobox-label-${n}`, ...i } = e, l = Xe("Combobox.Label"), o = ot("Combobox.Label"), f = ye(l.labelRef, t);
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);
2043
2061
  J(() => o.registerLabel(r), [r]);
2044
- let p = k(() => {
2062
+ let p = E(() => {
2045
2063
  var v;
2046
- return (v = l.inputRef.current) == null ? void 0 : v.focus({ preventScroll: !0 });
2047
- }), b = te(() => ({ open: l.comboboxState === 0, disabled: l.disabled }), [l]);
2048
- return ve({ ourProps: { ref: f, id: r, onClick: p }, theirProps: i, slot: b, defaultTag: Ga, name: "Combobox.Label" });
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" });
2049
2067
  }
2050
- let Qa = "ul", Xa = Ge.RenderStrategy | Ge.Static;
2051
- function Za(e, t) {
2052
- let n = Ne(), { id: r = `headlessui-combobox-options-${n}`, hold: i = !1, ...l } = e, o = Xe("Combobox.Options"), f = ye(o.optionsRef, t), p = Ot(), b = (() => p !== null ? (p & le.Open) === le.Open : o.comboboxState === 0)();
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)();
2053
2071
  J(() => {
2054
- var c;
2055
- o.optionsPropsRef.current.static = (c = e.static) != null ? c : !1;
2072
+ var u;
2073
+ o.optionsPropsRef.current.static = (u = e.static) != null ? u : !1;
2056
2074
  }, [o.optionsPropsRef, e.static]), J(() => {
2057
2075
  o.optionsPropsRef.current.hold = i;
2058
- }, [o.optionsPropsRef, i]), Ea({ container: o.optionsRef.current, enabled: o.comboboxState === 0, accept(c) {
2059
- return c.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : c.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
2060
- }, walk(c) {
2061
- c.setAttribute("role", "none");
2076
+ }, [o.optionsPropsRef, i]), Ia({ container: o.optionsRef.current, enabled: o.comboboxState === 0, accept(u) {
2077
+ return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
2078
+ }, walk(u) {
2079
+ u.setAttribute("role", "none");
2062
2080
  } });
2063
- let v = it(() => {
2064
- var c, a;
2065
- return (a = o.labelId) != null ? a : (c = o.buttonRef.current) == null ? void 0 : c.id;
2066
- }, [o.labelId, o.buttonRef.current]), m = te(() => ({ open: o.comboboxState === 0 }), [o]), s = { "aria-labelledby": v, role: "listbox", "aria-multiselectable": o.mode === 1 ? !0 : void 0, id: r, ref: f };
2067
- return ve({ ourProps: s, theirProps: l, slot: m, defaultTag: Qa, features: Xa, visible: b, name: "Combobox.Options" });
2068
- }
2069
- let Ja = "li";
2070
- function el(e, t) {
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) {
2071
2089
  var n, r;
2072
- let i = Ne(), { id: l = `headlessui-combobox-option-${i}`, disabled: o = !1, value: f, ...p } = e, b = Xe("Combobox.Option"), v = ot("Combobox.Option"), m = b.activeOptionIndex !== null ? b.options[b.activeOptionIndex].id === l : !1, s = b.isSelected(f), c = C(null), a = Se({ disabled: o, value: f, domRef: c, textValue: (r = (n = c.current) == null ? void 0 : n.textContent) == null ? void 0 : r.toLowerCase() }), d = ye(t, c), u = k(() => v.selectOption(l));
2073
- J(() => v.registerOption(l, a), [a, l]);
2074
- let h = C(!b.__demoMode);
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);
2075
2093
  J(() => {
2076
2094
  if (!b.__demoMode)
2077
2095
  return;
2078
- let S = _e();
2079
- return S.requestAnimationFrame(() => {
2080
- h.current = !0;
2081
- }), S.dispose;
2096
+ let k = _e();
2097
+ return k.requestAnimationFrame(() => {
2098
+ m.current = !0;
2099
+ }), k.dispose;
2082
2100
  }, []), J(() => {
2083
- if (b.comboboxState !== 0 || !m || !h.current || b.activationTrigger === 0)
2101
+ if (b.comboboxState !== 0 || !h || !m.current || b.activationTrigger === 0)
2084
2102
  return;
2085
- let S = _e();
2086
- return S.requestAnimationFrame(() => {
2087
- var z, ee;
2088
- (ee = (z = c.current) == null ? void 0 : z.scrollIntoView) == null || ee.call(z, { block: "nearest" });
2089
- }), S.dispose;
2090
- }, [c, m, b.comboboxState, b.activationTrigger, b.activeOptionIndex]);
2091
- let I = k((S) => {
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) => {
2092
2110
  if (o)
2093
- return S.preventDefault();
2094
- u(), b.mode === 0 && v.closeCombobox(), Fa() || requestAnimationFrame(() => {
2111
+ return k.preventDefault();
2112
+ d(), b.mode === 0 && v.closeCombobox(), Aa() || requestAnimationFrame(() => {
2095
2113
  var z;
2096
2114
  return (z = b.inputRef.current) == null ? void 0 : z.focus();
2097
2115
  });
2098
- }), w = k(() => {
2116
+ }), w = E(() => {
2099
2117
  if (o)
2100
- return v.goToOption(j.Nothing);
2101
- v.goToOption(j.Specific, l);
2102
- }), g = Fr(), V = k((S) => g.update(S)), F = k((S) => {
2103
- g.wasMoved(S) && (o || m || v.goToOption(j.Specific, l, 0));
2104
- }), q = k((S) => {
2105
- g.wasMoved(S) && (o || m && (b.optionsPropsRef.current.hold || v.goToOption(j.Nothing)));
2106
- }), $ = te(() => ({ active: m, selected: s, disabled: o }), [m, s, o]);
2107
- return ve({ ourProps: { id: l, ref: d, role: "option", tabIndex: o === !0 ? void 0 : -1, "aria-disabled": o === !0 ? !0 : void 0, "aria-selected": s, disabled: void 0, onClick: I, onFocus: w, onPointerEnter: V, onMouseEnter: V, onPointerMove: F, onMouseMove: F, onPointerLeave: q, onMouseLeave: q }, theirProps: p, slot: $, defaultTag: Ja, name: "Combobox.Option" });
2108
- }
2109
- let tl = fe(ja), nl = fe(Ka), rl = fe(Ha), il = fe(Ya), ol = fe(Za), al = fe(el), tt = Object.assign(tl, { Input: rl, Button: nl, Label: il, Options: ol, Option: al });
2110
- function Zt() {
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() {
2111
2129
  let e = C(!1);
2112
2130
  return J(() => (e.current = !0, () => {
2113
2131
  e.current = !1;
2114
2132
  }), []), e;
2115
2133
  }
2116
- let wn = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
2117
- function gn(e) {
2134
+ let gn = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
2135
+ function xn(e) {
2118
2136
  var t, n;
2119
2137
  let r = (t = e.innerText) != null ? t : "", i = e.cloneNode(!0);
2120
2138
  if (!(i instanceof HTMLElement))
2121
2139
  return r;
2122
- let l = !1;
2140
+ let a = !1;
2123
2141
  for (let f of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
2124
- f.remove(), l = !0;
2125
- let o = l ? (n = i.innerText) != null ? n : "" : r;
2126
- return wn.test(o) && (o = o.replace(wn, "")), o;
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;
2127
2145
  }
2128
- function ll(e) {
2146
+ function sl(e) {
2129
2147
  let t = e.getAttribute("aria-label");
2130
2148
  if (typeof t == "string")
2131
2149
  return t.trim();
2132
2150
  let n = e.getAttribute("aria-labelledby");
2133
2151
  if (n) {
2134
2152
  let r = n.split(" ").map((i) => {
2135
- let l = document.getElementById(i);
2136
- if (l) {
2137
- let o = l.getAttribute("aria-label");
2138
- return typeof o == "string" ? o.trim() : gn(l).trim();
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();
2139
2157
  }
2140
2158
  return null;
2141
2159
  }).filter(Boolean);
2142
2160
  if (r.length > 0)
2143
2161
  return r.join(", ");
2144
2162
  }
2145
- return gn(e).trim();
2163
+ return xn(e).trim();
2146
2164
  }
2147
- function sl(e) {
2165
+ function cl(e) {
2148
2166
  let t = C(""), n = C("");
2149
- return k(() => {
2167
+ return E(() => {
2150
2168
  let r = e.current;
2151
2169
  if (!r)
2152
2170
  return "";
2153
2171
  let i = r.innerText;
2154
2172
  if (t.current === i)
2155
2173
  return n.current;
2156
- let l = ll(r).trim().toLowerCase();
2157
- return t.current = i, n.current = l, l;
2174
+ let a = sl(r).trim().toLowerCase();
2175
+ return t.current = i, n.current = a, a;
2158
2176
  });
2159
2177
  }
2160
- var cl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(cl || {}), ul = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(ul || {}), dl = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(dl || {}), fl = ((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))(fl || {});
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 || {});
2161
2179
  function Rt(e, t = (n) => n) {
2162
- let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, r = kr(t(e.options.slice()), (l) => l.dataRef.current.domRef.current), i = n ? r.indexOf(n) : null;
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;
2163
2181
  return i === -1 && (i = null), { options: r, activeOptionIndex: i };
2164
2182
  }
2165
- let pl = { 1(e) {
2183
+ let bl = { 1(e) {
2166
2184
  return e.dataRef.current.disabled || e.listboxState === 1 ? e : { ...e, activeOptionIndex: null, listboxState: 1 };
2167
2185
  }, 0(e) {
2168
2186
  if (e.dataRef.current.disabled || e.listboxState === 0)
@@ -2173,7 +2191,7 @@ let pl = { 1(e) {
2173
2191
  var n;
2174
2192
  if (e.dataRef.current.disabled || e.listboxState === 1)
2175
2193
  return e;
2176
- let r = Rt(e), i = Ir(t, { resolveItems: () => r.options, resolveActiveIndex: () => r.activeOptionIndex, resolveId: (l) => l.id, resolveDisabled: (l) => l.dataRef.current.disabled });
2194
+ let r = Rt(e), i = _r(t, { resolveItems: () => r.options, resolveActiveIndex: () => r.activeOptionIndex, resolveId: (a) => a.id, resolveDisabled: (a) => a.dataRef.current.disabled });
2177
2195
  return { ...e, ...r, searchQuery: "", activeOptionIndex: i, activationTrigger: (n = t.trigger) != null ? n : 1 };
2178
2196
  }, 3: (e, t) => {
2179
2197
  if (e.dataRef.current.disabled || e.listboxState === 1)
@@ -2181,8 +2199,8 @@ let pl = { 1(e) {
2181
2199
  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) => {
2182
2200
  var f;
2183
2201
  return !o.dataRef.current.disabled && ((f = o.dataRef.current.textValue) == null ? void 0 : f.startsWith(r));
2184
- }), l = i ? e.options.indexOf(i) : -1;
2185
- return l === -1 || l === e.activeOptionIndex ? { ...e, searchQuery: r } : { ...e, searchQuery: r, activeOptionIndex: l, activationTrigger: 1 };
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 };
2186
2204
  }, 4(e) {
2187
2205
  return e.dataRef.current.disabled || e.listboxState === 1 || e.searchQuery === "" ? e : { ...e, searchQuery: "" };
2188
2206
  }, 5: (e, t) => {
@@ -2190,211 +2208,211 @@ let pl = { 1(e) {
2190
2208
  return e.activeOptionIndex === null && e.dataRef.current.isSelected(t.dataRef.current.value) && (r.activeOptionIndex = r.options.indexOf(n)), { ...e, ...r };
2191
2209
  }, 6: (e, t) => {
2192
2210
  let n = Rt(e, (r) => {
2193
- let i = r.findIndex((l) => l.id === t.id);
2211
+ let i = r.findIndex((a) => a.id === t.id);
2194
2212
  return i !== -1 && r.splice(i, 1), r;
2195
2213
  });
2196
2214
  return { ...e, ...n, activationTrigger: 1 };
2197
- }, 7: (e, t) => ({ ...e, labelId: t.id }) }, Jt = je(null);
2198
- Jt.displayName = "ListboxActionsContext";
2199
- function at(e) {
2200
- let t = We(Jt);
2215
+ }, 7: (e, t) => ({ ...e, labelId: t.id }) }, en = He(null);
2216
+ en.displayName = "ListboxActionsContext";
2217
+ function st(e) {
2218
+ let t = Ve(en);
2201
2219
  if (t === null) {
2202
2220
  let n = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
2203
- throw Error.captureStackTrace && Error.captureStackTrace(n, at), n;
2221
+ throw Error.captureStackTrace && Error.captureStackTrace(n, st), n;
2204
2222
  }
2205
2223
  return t;
2206
2224
  }
2207
- let en = je(null);
2208
- en.displayName = "ListboxDataContext";
2209
- function lt(e) {
2210
- let t = We(en);
2225
+ let tn = He(null);
2226
+ tn.displayName = "ListboxDataContext";
2227
+ function ct(e) {
2228
+ let t = Ve(tn);
2211
2229
  if (t === null) {
2212
2230
  let n = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
2213
- throw Error.captureStackTrace && Error.captureStackTrace(n, lt), n;
2231
+ throw Error.captureStackTrace && Error.captureStackTrace(n, ct), n;
2214
2232
  }
2215
2233
  return t;
2216
2234
  }
2217
- function bl(e, t) {
2218
- return Q(t.type, pl, e, t);
2219
- }
2220
- let vl = Le;
2221
- function ml(e, t) {
2222
- let { value: n, defaultValue: r, form: i, name: l, onChange: o, by: f = (x, E) => x === E, disabled: p = !1, horizontal: b = !1, multiple: v = !1, ...m } = e;
2223
- const s = b ? "horizontal" : "vertical";
2224
- let c = ye(t), [a = v ? [] : void 0, d] = Nr(n, o, r), [u, h] = On(bl, { dataRef: Sn(), listboxState: 1, options: [], searchQuery: "", labelId: null, activeOptionIndex: null, activationTrigger: 1 }), I = C({ static: !1, hold: !1 }), w = C(null), g = C(null), V = C(null), F = k(typeof f == "string" ? (x, E) => {
2225
- let M = f;
2226
- return x?.[M] === E?.[M];
2227
- } : f), q = ze((x) => Q($.mode, { 1: () => a.some((E) => F(E, x)), 0: () => F(a, x) }), [a]), $ = te(() => ({ ...u, value: a, disabled: p, mode: v ? 1 : 0, orientation: s, compare: F, isSelected: q, optionsPropsRef: I, labelRef: w, buttonRef: g, optionsRef: V }), [a, p, v, u]);
2235
+ function vl(e, t) {
2236
+ return X(t.type, bl, e, t);
2237
+ }
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;
2241
+ 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]);
2228
2246
  J(() => {
2229
- u.dataRef.current = $;
2230
- }, [$]), Tr([$.buttonRef, $.optionsRef], (x, E) => {
2231
- var M;
2232
- h({ type: 1 }), Sr(E, Ht.Loose) || (x.preventDefault(), (M = $.buttonRef.current) == null || M.focus());
2233
- }, $.listboxState === 0);
2234
- let S = te(() => ({ open: $.listboxState === 0, disabled: p, value: a }), [$, p, a]), z = k((x) => {
2235
- let E = $.options.find((M) => M.id === x);
2236
- E && W(E.dataRef.current.value);
2237
- }), ee = k(() => {
2238
- if ($.activeOptionIndex !== null) {
2239
- let { dataRef: x, id: E } = $.options[$.activeOptionIndex];
2240
- W(x.current.value), h({ type: 2, focus: j.Specific, id: E });
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 });
2241
2259
  }
2242
- }), ne = k(() => h({ type: 0 })), _ = k(() => h({ type: 1 })), T = k((x, E, M) => x === j.Specific ? h({ type: 2, focus: j.Specific, id: E, trigger: M }) : h({ type: 2, focus: x, trigger: M })), L = k((x, E) => (h({ type: 5, id: x, dataRef: E }), () => h({ type: 6, id: x }))), A = k((x) => (h({ type: 7, id: x }), () => h({ type: 7, id: null }))), W = k((x) => Q($.mode, { 0() {
2243
- return d?.(x);
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);
2244
2262
  }, 1() {
2245
- let E = $.value.slice(), M = E.findIndex((he) => F(he, x));
2246
- return M === -1 ? E.push(x) : E.splice(M, 1), d?.(E);
2247
- } })), re = k((x) => h({ type: 3, value: x })), ie = k(() => h({ type: 4 })), pe = te(() => ({ onChange: W, registerOption: L, registerLabel: A, goToOption: T, closeListbox: _, openListbox: ne, selectActiveOption: ee, selectOption: z, search: re, clearSearch: ie }), []), me = { ref: c }, se = C(null), oe = Re();
2248
- return X(() => {
2249
- se.current && r !== void 0 && oe.addEventListener(se.current, "reset", () => {
2250
- d?.(r);
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", () => {
2268
+ c?.(r);
2251
2269
  });
2252
- }, [se, d]), Y.createElement(Jt.Provider, { value: pe }, Y.createElement(en.Provider, { value: $ }, Y.createElement(Yt, { value: Q($.listboxState, { 0: le.Open, 1: le.Closed }) }, l != null && a != null && zt({ [l]: a }).map(([x, E], M) => Y.createElement(Rr, { features: Kt.Hidden, ref: M === 0 ? (he) => {
2253
- var Fe;
2254
- se.current = (Fe = he?.closest("form")) != null ? Fe : null;
2255
- } : void 0, ...wt({ key: x, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: i, name: x, value: E }) })), ve({ ourProps: me, theirProps: m, slot: S, defaultTag: vl, name: "Listbox" }))));
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" }))));
2256
2274
  }
2257
- let hl = "button";
2258
- function wl(e, t) {
2275
+ let wl = "button";
2276
+ function gl(e, t) {
2259
2277
  var n;
2260
- let r = Ne(), { id: i = `headlessui-listbox-button-${r}`, ...l } = e, o = lt("Listbox.Button"), f = at("Listbox.Button"), p = ye(o.buttonRef, t), b = Re(), v = k((u) => {
2261
- switch (u.key) {
2262
- case U.Space:
2263
- case U.Enter:
2264
- case U.ArrowDown:
2265
- u.preventDefault(), f.openListbox(), b.nextFrame(() => {
2266
- o.value || f.goToOption(j.First);
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) => {
2279
+ switch (d.key) {
2280
+ case j.Space:
2281
+ case j.Enter:
2282
+ case j.ArrowDown:
2283
+ d.preventDefault(), f.openListbox(), b.nextFrame(() => {
2284
+ o.value || f.goToOption(U.First);
2267
2285
  });
2268
2286
  break;
2269
- case U.ArrowUp:
2270
- u.preventDefault(), f.openListbox(), b.nextFrame(() => {
2271
- o.value || f.goToOption(j.Last);
2287
+ case j.ArrowUp:
2288
+ d.preventDefault(), f.openListbox(), b.nextFrame(() => {
2289
+ o.value || f.goToOption(U.Last);
2272
2290
  });
2273
2291
  break;
2274
2292
  }
2275
- }), m = k((u) => {
2276
- switch (u.key) {
2277
- case U.Space:
2278
- u.preventDefault();
2293
+ }), h = E((d) => {
2294
+ switch (d.key) {
2295
+ case j.Space:
2296
+ d.preventDefault();
2279
2297
  break;
2280
2298
  }
2281
- }), s = k((u) => {
2282
- if (Cr(u.currentTarget))
2283
- return u.preventDefault();
2299
+ }), l = E((d) => {
2300
+ if (Pr(d.currentTarget))
2301
+ return d.preventDefault();
2284
2302
  o.listboxState === 0 ? (f.closeListbox(), b.nextFrame(() => {
2285
- var h;
2286
- return (h = o.buttonRef.current) == null ? void 0 : h.focus({ preventScroll: !0 });
2287
- })) : (u.preventDefault(), f.openListbox());
2288
- }), c = it(() => {
2303
+ var m;
2304
+ return (m = o.buttonRef.current) == null ? void 0 : m.focus({ preventScroll: !0 });
2305
+ })) : (d.preventDefault(), f.openListbox());
2306
+ }), u = at(() => {
2289
2307
  if (o.labelId)
2290
2308
  return [o.labelId, i].join(" ");
2291
- }, [o.labelId, i]), a = te(() => ({ open: o.listboxState === 0, disabled: o.disabled, value: o.value }), [o]), d = { ref: p, id: i, type: Er(e, o.buttonRef), "aria-haspopup": "listbox", "aria-controls": (n = o.optionsRef.current) == null ? void 0 : n.id, "aria-expanded": o.listboxState === 0, "aria-labelledby": c, disabled: o.disabled, onKeyDown: v, onKeyUp: m, onClick: s };
2292
- return ve({ ourProps: d, theirProps: l, slot: a, defaultTag: hl, name: "Listbox.Button" });
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" });
2293
2311
  }
2294
- let gl = "label";
2295
- function xl(e, t) {
2296
- let n = Ne(), { id: r = `headlessui-listbox-label-${n}`, ...i } = e, l = lt("Listbox.Label"), o = at("Listbox.Label"), f = ye(l.labelRef, t);
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);
2297
2315
  J(() => o.registerLabel(r), [r]);
2298
- let p = k(() => {
2316
+ let p = E(() => {
2299
2317
  var v;
2300
- return (v = l.buttonRef.current) == null ? void 0 : v.focus({ preventScroll: !0 });
2301
- }), b = te(() => ({ open: l.listboxState === 0, disabled: l.disabled }), [l]);
2302
- return ve({ ourProps: { ref: f, id: r, onClick: p }, theirProps: i, slot: b, defaultTag: gl, name: "Listbox.Label" });
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" });
2303
2321
  }
2304
- let yl = "ul", Ol = Ge.RenderStrategy | Ge.Static;
2305
- function Sl(e, t) {
2322
+ let Ol = "ul", Sl = Ye.RenderStrategy | Ye.Static;
2323
+ function kl(e, t) {
2306
2324
  var n;
2307
- let r = Ne(), { id: i = `headlessui-listbox-options-${r}`, ...l } = e, o = lt("Listbox.Options"), f = at("Listbox.Options"), p = ye(o.optionsRef, t), b = Re(), v = Re(), m = Ot(), s = (() => m !== null ? (m & le.Open) === le.Open : o.listboxState === 0)();
2308
- X(() => {
2309
- var h;
2310
- let I = o.optionsRef.current;
2311
- I && o.listboxState === 0 && I !== ((h = yt(I)) == null ? void 0 : h.activeElement) && I.focus({ preventScroll: !0 });
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 });
2312
2330
  }, [o.listboxState, o.optionsRef]);
2313
- let c = k((h) => {
2314
- switch (v.dispose(), h.key) {
2315
- case U.Space:
2331
+ let u = E((m) => {
2332
+ switch (v.dispose(), m.key) {
2333
+ case j.Space:
2316
2334
  if (o.searchQuery !== "")
2317
- return h.preventDefault(), h.stopPropagation(), f.search(h.key);
2318
- case U.Enter:
2319
- if (h.preventDefault(), h.stopPropagation(), o.activeOptionIndex !== null) {
2320
- let { dataRef: I } = o.options[o.activeOptionIndex];
2321
- f.onChange(I.current.value);
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);
2322
2340
  }
2323
2341
  o.mode === 0 && (f.closeListbox(), _e().nextFrame(() => {
2324
- var I;
2325
- return (I = o.buttonRef.current) == null ? void 0 : I.focus({ preventScroll: !0 });
2342
+ var O;
2343
+ return (O = o.buttonRef.current) == null ? void 0 : O.focus({ preventScroll: !0 });
2326
2344
  }));
2327
2345
  break;
2328
- case Q(o.orientation, { vertical: U.ArrowDown, horizontal: U.ArrowRight }):
2329
- return h.preventDefault(), h.stopPropagation(), f.goToOption(j.Next);
2330
- case Q(o.orientation, { vertical: U.ArrowUp, horizontal: U.ArrowLeft }):
2331
- return h.preventDefault(), h.stopPropagation(), f.goToOption(j.Previous);
2332
- case U.Home:
2333
- case U.PageUp:
2334
- return h.preventDefault(), h.stopPropagation(), f.goToOption(j.First);
2335
- case U.End:
2336
- case U.PageDown:
2337
- return h.preventDefault(), h.stopPropagation(), f.goToOption(j.Last);
2338
- case U.Escape:
2339
- return h.preventDefault(), h.stopPropagation(), f.closeListbox(), b.nextFrame(() => {
2340
- var I;
2341
- return (I = o.buttonRef.current) == null ? void 0 : I.focus({ preventScroll: !0 });
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 });
2342
2360
  });
2343
- case U.Tab:
2344
- h.preventDefault(), h.stopPropagation();
2361
+ case j.Tab:
2362
+ m.preventDefault(), m.stopPropagation();
2345
2363
  break;
2346
2364
  default:
2347
- h.key.length === 1 && (f.search(h.key), v.setTimeout(() => f.clearSearch(), 350));
2365
+ m.key.length === 1 && (f.search(m.key), v.setTimeout(() => f.clearSearch(), 350));
2348
2366
  break;
2349
2367
  }
2350
- }), a = it(() => {
2351
- var h, I, w;
2352
- return (w = (h = o.labelRef.current) == null ? void 0 : h.id) != null ? w : (I = o.buttonRef.current) == null ? void 0 : I.id;
2353
- }, [o.labelRef.current, o.buttonRef.current]), d = te(() => ({ open: o.listboxState === 0 }), [o]), u = { "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: c, role: "listbox", tabIndex: 0, ref: p };
2354
- return ve({ ourProps: u, theirProps: l, slot: d, defaultTag: yl, features: Ol, visible: s, name: "Listbox.Options" });
2355
- }
2356
- let kl = "li";
2357
- function Tl(e, t) {
2358
- let n = Ne(), { id: r = `headlessui-listbox-option-${n}`, disabled: i = !1, value: l, ...o } = e, f = lt("Listbox.Option"), p = at("Listbox.Option"), b = f.activeOptionIndex !== null ? f.options[f.activeOptionIndex].id === r : !1, v = f.isSelected(l), m = C(null), s = sl(m), c = Se({ disabled: i, value: l, domRef: m, get textValue() {
2359
- return s();
2360
- } }), a = ye(t, m);
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" });
2373
+ }
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() {
2377
+ return l();
2378
+ } }), s = ye(t, h);
2361
2379
  J(() => {
2362
2380
  if (f.listboxState !== 0 || !b || f.activationTrigger === 0)
2363
2381
  return;
2364
- let F = _e();
2365
- return F.requestAnimationFrame(() => {
2366
- var q, $;
2367
- ($ = (q = m.current) == null ? void 0 : q.scrollIntoView) == null || $.call(q, { block: "nearest" });
2368
- }), F.dispose;
2369
- }, [m, b, f.listboxState, f.activationTrigger, f.activeOptionIndex]), J(() => p.registerOption(r, c), [c, r]);
2370
- let d = k((F) => {
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) => {
2371
2389
  if (i)
2372
- return F.preventDefault();
2373
- p.onChange(l), f.mode === 0 && (p.closeListbox(), _e().nextFrame(() => {
2390
+ return L.preventDefault();
2391
+ p.onChange(a), f.mode === 0 && (p.closeListbox(), _e().nextFrame(() => {
2374
2392
  var q;
2375
2393
  return (q = f.buttonRef.current) == null ? void 0 : q.focus({ preventScroll: !0 });
2376
2394
  }));
2377
- }), u = k(() => {
2395
+ }), d = E(() => {
2378
2396
  if (i)
2379
- return p.goToOption(j.Nothing);
2380
- p.goToOption(j.Specific, r);
2381
- }), h = Fr(), I = k((F) => h.update(F)), w = k((F) => {
2382
- h.wasMoved(F) && (i || b || p.goToOption(j.Specific, r, 0));
2383
- }), g = k((F) => {
2384
- h.wasMoved(F) && (i || b && p.goToOption(j.Nothing));
2385
- }), V = te(() => ({ active: b, selected: v, disabled: i }), [b, v, i]);
2386
- return ve({ 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: d, onFocus: u, onPointerEnter: I, onMouseEnter: I, onPointerMove: w, onMouseMove: w, onPointerLeave: g, onMouseLeave: g }, theirProps: o, slot: V, defaultTag: kl, name: "Listbox.Option" });
2387
- }
2388
- let El = fe(ml), Il = fe(wl), _l = fe(xl), Cl = fe(Sl), Pl = fe(Tl), gt = Object.assign(El, { Button: Il, Label: _l, Options: Cl, Option: Pl });
2389
- function Ll(e = 0) {
2390
- let [t, n] = Z(e), r = Zt(), i = ze((p) => {
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) => {
2391
2409
  r.current && n((b) => b | p);
2392
- }, [t, r]), l = ze((p) => !!(t & p), [t]), o = ze((p) => {
2410
+ }, [t, r]), a = Ke((p) => !!(t & p), [t]), o = Ke((p) => {
2393
2411
  r.current && n((b) => b & ~p);
2394
- }, [n, r]), f = ze((p) => {
2412
+ }, [n, r]), f = Ke((p) => {
2395
2413
  r.current && n((b) => b ^ p);
2396
2414
  }, [n]);
2397
- return { flags: t, addFlag: i, hasFlag: l, removeFlag: o, toggleFlag: f };
2415
+ return { flags: t, addFlag: i, hasFlag: a, removeFlag: o, toggleFlag: f };
2398
2416
  }
2399
2417
  function Rl(e) {
2400
2418
  let t = { called: !1 };
@@ -2403,20 +2421,20 @@ function Rl(e) {
2403
2421
  return t.called = !0, e(...n);
2404
2422
  };
2405
2423
  }
2406
- function Nt(e, ...t) {
2424
+ function Ft(e, ...t) {
2407
2425
  e && t.length > 0 && e.classList.add(...t);
2408
2426
  }
2409
- function Ft(e, ...t) {
2427
+ function At(e, ...t) {
2410
2428
  e && t.length > 0 && e.classList.remove(...t);
2411
2429
  }
2412
- function Nl(e, t) {
2430
+ function Fl(e, t) {
2413
2431
  let n = _e();
2414
2432
  if (!e)
2415
2433
  return n.dispose;
2416
- let { transitionDuration: r, transitionDelay: i } = getComputedStyle(e), [l, o] = [r, i].map((p) => {
2417
- let [b = 0] = p.split(",").filter(Boolean).map((v) => v.includes("ms") ? parseFloat(v) : parseFloat(v) * 1e3).sort((v, m) => m - v);
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);
2418
2436
  return b;
2419
- }), f = l + o;
2437
+ }), f = a + o;
2420
2438
  if (f !== 0) {
2421
2439
  n.group((b) => {
2422
2440
  b.setTimeout(() => {
@@ -2432,17 +2450,17 @@ function Nl(e, t) {
2432
2450
  t();
2433
2451
  return n.add(() => t()), n.dispose;
2434
2452
  }
2435
- function Fl(e, t, n, r) {
2436
- let i = n ? "enter" : "leave", l = _e(), o = r !== void 0 ? Rl(r) : () => {
2453
+ function Al(e, t, n, r) {
2454
+ let i = n ? "enter" : "leave", a = _e(), o = r !== void 0 ? Rl(r) : () => {
2437
2455
  };
2438
2456
  i === "enter" && (e.removeAttribute("hidden"), e.style.display = "");
2439
- let f = Q(i, { enter: () => t.enter, leave: () => t.leave }), p = Q(i, { enter: () => t.enterTo, leave: () => t.leaveTo }), b = Q(i, { enter: () => t.enterFrom, leave: () => t.leaveFrom });
2440
- return Ft(e, ...t.base, ...t.enter, ...t.enterTo, ...t.enterFrom, ...t.leave, ...t.leaveFrom, ...t.leaveTo, ...t.entered), Nt(e, ...t.base, ...f, ...b), l.nextFrame(() => {
2441
- Ft(e, ...t.base, ...f, ...b), Nt(e, ...t.base, ...f, ...p), Nl(e, () => (Ft(e, ...t.base, ...f), Nt(e, ...t.base, ...t.entered), o()));
2442
- }), l.dispose;
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;
2443
2461
  }
2444
- function Al({ immediate: e, container: t, direction: n, classes: r, onStart: i, onStop: l }) {
2445
- let o = Zt(), f = Re(), p = Se(n);
2462
+ function Ml({ immediate: e, container: t, direction: n, classes: r, onStart: i, onStop: a }) {
2463
+ let o = Jt(), f = Ne(), p = Se(n);
2446
2464
  J(() => {
2447
2465
  e && (p.current = "enter");
2448
2466
  }, [e]), J(() => {
@@ -2450,134 +2468,134 @@ function Al({ immediate: e, container: t, direction: n, classes: r, onStart: i,
2450
2468
  f.add(b.dispose);
2451
2469
  let v = t.current;
2452
2470
  if (v && p.current !== "idle" && o.current)
2453
- return b.dispose(), i.current(p.current), b.add(Fl(v, r.current, p.current === "enter", () => {
2454
- b.dispose(), l.current(p.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);
2455
2473
  })), b.dispose;
2456
2474
  }, [n]);
2457
2475
  }
2458
- function $e(e = "") {
2476
+ function De(e = "") {
2459
2477
  return e.split(" ").filter((t) => t.trim().length > 1);
2460
2478
  }
2461
- let St = je(null);
2462
- St.displayName = "TransitionContext";
2463
- var $l = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))($l || {});
2464
- function Ml() {
2465
- let e = We(St);
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);
2466
2484
  if (e === null)
2467
2485
  throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
2468
2486
  return e;
2469
2487
  }
2470
- function Dl() {
2471
- let e = We(kt);
2488
+ function Wl() {
2489
+ let e = Ve(Tt);
2472
2490
  if (e === null)
2473
2491
  throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
2474
2492
  return e;
2475
2493
  }
2476
- let kt = je(null);
2477
- kt.displayName = "NestingContext";
2478
- function Tt(e) {
2479
- return "children" in e ? Tt(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
2480
- }
2481
- function Ar(e, t) {
2482
- let n = Se(e), r = C([]), i = Zt(), l = Re(), o = k((c, a = Me.Hidden) => {
2483
- let d = r.current.findIndex(({ el: u }) => u === c);
2484
- d !== -1 && (Q(a, { [Me.Unmount]() {
2485
- r.current.splice(d, 1);
2486
- }, [Me.Hidden]() {
2487
- r.current[d].state = "hidden";
2488
- } }), l.microTask(() => {
2489
- var u;
2490
- !Tt(r) && i.current && ((u = n.current) == null || u.call(n));
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;
2498
+ }
2499
+ function Mr(e, t) {
2500
+ let n = Se(e), r = C([]), i = Jt(), a = Ne(), o = E((u, s = $e.Hidden) => {
2501
+ let c = r.current.findIndex(({ el: d }) => d === u);
2502
+ c !== -1 && (X(s, { [$e.Unmount]() {
2503
+ r.current.splice(c, 1);
2504
+ }, [$e.Hidden]() {
2505
+ r.current[c].state = "hidden";
2506
+ } }), a.microTask(() => {
2507
+ var d;
2508
+ !Et(r) && i.current && ((d = n.current) == null || d.call(n));
2491
2509
  }));
2492
- }), f = k((c) => {
2493
- let a = r.current.find(({ el: d }) => d === c);
2494
- return a ? a.state !== "visible" && (a.state = "visible") : r.current.push({ el: c, state: "visible" }), () => o(c, Me.Unmount);
2495
- }), p = C([]), b = C(Promise.resolve()), v = C({ enter: [], leave: [], idle: [] }), m = k((c, a, d) => {
2496
- p.current.splice(0), t && (t.chains.current[a] = t.chains.current[a].filter(([u]) => u !== c)), t?.chains.current[a].push([c, new Promise((u) => {
2497
- p.current.push(u);
2498
- })]), t?.chains.current[a].push([c, new Promise((u) => {
2499
- Promise.all(v.current[a].map(([h, I]) => I)).then(() => u());
2500
- })]), a === "enter" ? b.current = b.current.then(() => t?.wait.current).then(() => d(a)) : d(a);
2501
- }), s = k((c, a, d) => {
2502
- Promise.all(v.current[a].splice(0).map(([u, h]) => h)).then(() => {
2503
- var u;
2504
- (u = p.current.shift()) == null || u();
2505
- }).then(() => d(a));
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) => {
2515
+ 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(() => {
2521
+ var d;
2522
+ (d = p.current.shift()) == null || d();
2523
+ }).then(() => c(s));
2506
2524
  });
2507
- return te(() => ({ children: r, register: f, unregister: o, onStart: m, onStop: s, wait: b, chains: v }), [f, o, r, m, s, v, b]);
2525
+ return re(() => ({ children: r, register: f, unregister: o, onStart: h, onStop: l, wait: b, chains: v }), [f, o, r, h, l, v, b]);
2508
2526
  }
2509
- function Wl() {
2527
+ function Vl() {
2510
2528
  }
2511
- let Vl = ["beforeEnter", "afterEnter", "beforeLeave", "afterLeave"];
2512
- function xn(e) {
2529
+ let Bl = ["beforeEnter", "afterEnter", "beforeLeave", "afterLeave"];
2530
+ function yn(e) {
2513
2531
  var t;
2514
2532
  let n = {};
2515
- for (let r of Vl)
2516
- n[r] = (t = e[r]) != null ? t : Wl;
2533
+ for (let r of Bl)
2534
+ n[r] = (t = e[r]) != null ? t : Vl;
2517
2535
  return n;
2518
2536
  }
2519
- function Bl(e) {
2520
- let t = C(xn(e));
2521
- return X(() => {
2522
- t.current = xn(e);
2537
+ function jl(e) {
2538
+ let t = C(yn(e));
2539
+ return Z(() => {
2540
+ t.current = yn(e);
2523
2541
  }, [e]), t;
2524
2542
  }
2525
- let Ul = "div", $r = Ge.RenderStrategy;
2526
- function jl(e, t) {
2543
+ let Ul = "div", Dr = Ye.RenderStrategy;
2544
+ function Hl(e, t) {
2527
2545
  var n, r;
2528
- let { beforeEnter: i, afterEnter: l, beforeLeave: o, afterLeave: f, enter: p, enterFrom: b, enterTo: v, entered: m, leave: s, leaveFrom: c, leaveTo: a, ...d } = e, u = C(null), h = ye(u, t), I = (n = d.unmount) == null || n ? Me.Unmount : Me.Hidden, { show: w, appear: g, initial: V } = Ml(), [F, q] = Z(w ? "visible" : "hidden"), $ = Dl(), { register: S, unregister: z } = $;
2529
- X(() => S(u), [S, u]), X(() => {
2530
- if (I === Me.Hidden && u.current) {
2531
- if (w && F !== "visible") {
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") {
2532
2550
  q("visible");
2533
2551
  return;
2534
2552
  }
2535
- return Q(F, { hidden: () => z(u), visible: () => S(u) });
2553
+ return X(L, { hidden: () => z(d), visible: () => k(d) });
2536
2554
  }
2537
- }, [F, u, S, z, w, I]);
2538
- let ee = Se({ base: $e(d.className), enter: $e(p), enterFrom: $e(b), enterTo: $e(v), entered: $e(m), leave: $e(s), leaveFrom: $e(c), leaveTo: $e(a) }), ne = Bl({ beforeEnter: i, afterEnter: l, beforeLeave: o, afterLeave: f }), _ = qt();
2539
- X(() => {
2540
- if (_ && F === "visible" && u.current === null)
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)
2541
2559
  throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
2542
- }, [u, F, _]);
2543
- let T = V && !g, L = g && w && V, A = (() => !_ || T ? "idle" : w ? "enter" : "leave")(), W = Ll(0), re = k((oe) => Q(oe, { enter: () => {
2544
- W.addFlag(le.Opening), ne.current.beforeEnter();
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();
2545
2563
  }, leave: () => {
2546
- W.addFlag(le.Closing), ne.current.beforeLeave();
2564
+ V.addFlag(se.Closing), pe.current.beforeLeave();
2547
2565
  }, idle: () => {
2548
- } })), ie = k((oe) => Q(oe, { enter: () => {
2549
- W.removeFlag(le.Opening), ne.current.afterEnter();
2566
+ } })), R = E((ae) => X(ae, { enter: () => {
2567
+ V.removeFlag(se.Opening), pe.current.afterEnter();
2550
2568
  }, leave: () => {
2551
- W.removeFlag(le.Closing), ne.current.afterLeave();
2569
+ V.removeFlag(se.Closing), pe.current.afterLeave();
2552
2570
  }, idle: () => {
2553
- } })), pe = Ar(() => {
2554
- q("hidden"), z(u);
2555
- }, $);
2556
- Al({ immediate: L, container: u, classes: ee, direction: A, onStart: Se((oe) => {
2557
- pe.onStart(u, oe, re);
2558
- }), onStop: Se((oe) => {
2559
- pe.onStop(u, oe, ie), oe === "leave" && !Tt(pe) && (q("hidden"), z(u));
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));
2560
2578
  }) });
2561
- let me = d, se = { ref: h };
2562
- return L ? me = { ...me, className: ht(d.className, ...ee.current.enter, ...ee.current.enterFrom) } : (me.className = ht(d.className, (r = u.current) == null ? void 0 : r.className), me.className === "" && delete me.className), Y.createElement(kt.Provider, { value: pe }, Y.createElement(Yt, { value: Q(F, { visible: le.Open, hidden: le.Closed }) | W.flags }, ve({ ourProps: se, theirProps: me, defaultTag: Ul, features: $r, visible: F === "visible", name: "Transition.Child" })));
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" })));
2563
2581
  }
2564
2582
  function ql(e, t) {
2565
- let { show: n, appear: r = !1, unmount: i = !0, ...l } = e, o = C(null), f = ye(o, t);
2583
+ let { show: n, appear: r = !1, unmount: i = !0, ...a } = e, o = C(null), f = ye(o, t);
2566
2584
  qt();
2567
- let p = Ot();
2568
- if (n === void 0 && p !== null && (n = (p & le.Open) === le.Open), ![!0, !1].includes(n))
2585
+ let p = St();
2586
+ if (n === void 0 && p !== null && (n = (p & se.Open) === se.Open), ![!0, !1].includes(n))
2569
2587
  throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
2570
- let [b, v] = Z(n ? "visible" : "hidden"), m = Ar(() => {
2588
+ let [b, v] = Q(n ? "visible" : "hidden"), h = Mr(() => {
2571
2589
  v("hidden");
2572
- }), [s, c] = Z(!0), a = C([n]);
2590
+ }), [l, u] = Q(!0), s = C([n]);
2573
2591
  J(() => {
2574
- s !== !1 && a.current[a.current.length - 1] !== n && (a.current.push(n), c(!1));
2575
- }, [a, n]);
2576
- let d = te(() => ({ show: n, appear: r, initial: s }), [n, r, s]);
2577
- X(() => {
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(() => {
2578
2596
  if (n)
2579
2597
  v("visible");
2580
- else if (!Tt(m))
2598
+ else if (!Et(h))
2581
2599
  v("hidden");
2582
2600
  else {
2583
2601
  let w = o.current;
@@ -2586,22 +2604,22 @@ function ql(e, t) {
2586
2604
  let g = w.getBoundingClientRect();
2587
2605
  g.x === 0 && g.y === 0 && g.width === 0 && g.height === 0 && v("hidden");
2588
2606
  }
2589
- }, [n, m]);
2590
- let u = { unmount: i }, h = k(() => {
2607
+ }, [n, h]);
2608
+ let d = { unmount: i }, m = E(() => {
2591
2609
  var w;
2592
- s && c(!1), (w = e.beforeEnter) == null || w.call(e);
2593
- }), I = k(() => {
2610
+ l && u(!1), (w = e.beforeEnter) == null || w.call(e);
2611
+ }), O = E(() => {
2594
2612
  var w;
2595
- s && c(!1), (w = e.beforeLeave) == null || w.call(e);
2613
+ l && u(!1), (w = e.beforeLeave) == null || w.call(e);
2596
2614
  });
2597
- return Y.createElement(kt.Provider, { value: m }, Y.createElement(St.Provider, { value: d }, ve({ ourProps: { ...u, as: Le, children: Y.createElement(Mr, { ref: f, ...u, ...l, beforeEnter: h, beforeLeave: I }) }, theirProps: {}, defaultTag: Le, features: $r, visible: b === "visible", name: "Transition" })));
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" })));
2598
2616
  }
2599
- function Hl(e, t) {
2600
- let n = We(St) !== null, r = Ot() !== null;
2601
- return Y.createElement(Y.Fragment, null, !n && r ? Y.createElement(Wt, { ref: t, ...e }) : Y.createElement(Mr, { ref: t, ...e }));
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 }));
2602
2620
  }
2603
- let Wt = fe(ql), Mr = fe(jl), zl = fe(Hl), Dr = Object.assign(Wt, { Child: zl, Root: Wt });
2604
- function Kl({
2621
+ let Vt = be(ql), $r = be(Hl), Kl = be(zl), Wr = Object.assign(Vt, { Child: Kl, Root: Vt });
2622
+ function Gl({
2605
2623
  title: e,
2606
2624
  titleId: t,
2607
2625
  ...n
@@ -2621,107 +2639,115 @@ function Kl({
2621
2639
  clipRule: "evenodd"
2622
2640
  }));
2623
2641
  }
2624
- const Gl = Pe.forwardRef(Kl), Wr = Gl, ls = ({ children: e, selected: t, onSelect: n, themeColor: r }) => {
2625
- const [i, l] = Z(!1);
2642
+ const Yl = Pe.forwardRef(Gl), Vr = Yl, ss = ({ children: e, selected: t, onSelect: n, themeColor: r }) => {
2643
+ const [i, a] = Q(!1);
2626
2644
  let o = "#333333";
2627
2645
  const f = (v) => {
2628
2646
  n(v);
2629
2647
  }, p = () => {
2630
- l(!0);
2648
+ a(!0);
2631
2649
  }, b = () => {
2632
- l(!1);
2650
+ a(!1);
2633
2651
  };
2634
2652
  if (r) {
2635
- r = r.length === 4 ? r.replace(/^#(.)(.)(.)$/, "#$1$1$2$2$3$3") : r;
2653
+ r = Re.convert3HexTo6(r);
2636
2654
  const v = qe(r);
2637
- (v === "dark" || v === "light") && (o = r === "#ffffff" ? "#006bb1" : r);
2655
+ (v === "dark" || v === "light") && (o = r === "#ffffff" ? "#c8c8c8" : r);
2638
2656
  }
2639
- return /* @__PURE__ */ O(Ye, { children: /* @__PURE__ */ O(gt, { value: t, onChange: f, children: ({ open: v }) => /* @__PURE__ */ we("div", { className: "tw-relative", children: [
2640
- /* @__PURE__ */ O("div", { className: "tw-relative", children: /* @__PURE__ */ we(
2641
- gt.Button,
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,
2642
2660
  {
2643
2661
  "data-testid": "select-options",
2644
2662
  onFocus: p,
2645
2663
  onBlur: b,
2646
2664
  style: { borderBottomColor: r && (i || v) ? o : "" },
2647
- 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-3 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]"),
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]"),
2648
2666
  children: [
2649
2667
  t && /* @__PURE__ */ we("span", { className: "tw-flex tw-items-center", children: [
2650
- t.avatar && /* @__PURE__ */ O("img", { src: t.avatar.src, alt: "", className: "tw-mr-2 tw-h-5 tw-w-5 tw-flex-shrink-0" }),
2651
- /* @__PURE__ */ O("span", { className: "tw-block tw-truncate", children: t.label })
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 })
2652
2670
  ] }),
2653
- /* @__PURE__ */ O("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__ */ O(Wr, { className: "tw-h-5 tw-w-5 tw-text-[#333333]", "aria-hidden": "true" }) })
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" }) })
2654
2672
  ]
2655
2673
  }
2656
2674
  ) }),
2657
2675
  e
2658
2676
  ] }) }) });
2659
- }, ss = ({ children: e, setQuery: t }) => /* @__PURE__ */ O(Ye, { children: /* @__PURE__ */ O(
2660
- Dr,
2677
+ }, cs = ({ children: e, setQuery: t }) => /* @__PURE__ */ S(Qe, { children: /* @__PURE__ */ S(
2678
+ Wr,
2661
2679
  {
2662
2680
  as: Le,
2663
2681
  leave: "tw-transition tw-ease-in tw-duration-100",
2664
2682
  leaveFrom: "tw-opacity-100",
2665
2683
  leaveTo: "tw-opacity-0",
2666
2684
  afterLeave: () => t(""),
2667
- children: /* @__PURE__ */ O(gt.Options, { className: "tw-absolute tw-z-10 tw-max-h-[200px] tw-w-full tw-overflow-auto tw-border-[1px] tw-border-[#979797] tw-bg-white tw-pb-[10px] tw-pt-[10px] tw-text-base focus:tw-outline-none sm:tw-text-sm", children: e })
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 })
2668
2686
  }
2669
- ) }), Yl = De((e, t) => /* @__PURE__ */ O(gt.Option, { ref: t, className: e.className, value: e.value, disabled: e.disable, children: e.children }));
2670
- Yl.displayName = "SelectOption";
2671
- const cs = ({
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 = ({
2672
2690
  children: e,
2673
2691
  selected: t,
2674
2692
  onSelect: n,
2675
2693
  setQuery: r,
2676
2694
  disable: i,
2677
- clearSearch: l = !1,
2695
+ clearSearch: a = !1,
2678
2696
  themeColor: o
2679
2697
  }) => {
2680
- const f = C(null), p = C(null);
2681
- let b = {};
2682
- X(() => {
2698
+ const f = C(null), p = C(null), [b, v] = Q(!1);
2699
+ let h = {};
2700
+ Z(() => {
2683
2701
  f.current && t && (f.current.value = t.label || "");
2684
2702
  }, [t]);
2685
- const v = (a) => {
2686
- n(a), c();
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 = () => {
2711
+ v(!0);
2687
2712
  }, m = () => {
2688
- f.current && p.current && (l && (f.current.value = ""), p.current.click());
2689
- }, s = (a) => (c(), a?.label), c = () => {
2690
- const a = f.current;
2691
- a && (a.focus(), a.setSelectionRange(a.value.length, a.value.length));
2713
+ v(!1);
2692
2714
  };
2693
2715
  if (o) {
2694
- const a = qe(o);
2695
- o = o.length === 4 ? o.replace(/^#(.)(.)(.)$/, "#$1$1$2$2$3$3") : o, (a === "dark" || a === "light") && (b = {
2696
- borderBottomColor: o === "#ffffff" ? "#333333" : o
2716
+ const O = qe(o);
2717
+ o = Re.convert3HexTo6(o), (O === "dark" || O === "light") && (h = {
2718
+ borderBottomColor: o === "#ffffff" ? "#c8c8c8" : b ? o : "#333333"
2697
2719
  });
2698
2720
  }
2699
- return /* @__PURE__ */ O(tt, { value: t, onChange: v, disabled: i, children: /* @__PURE__ */ we("div", { className: "tw-relative ", children: [
2721
+ return /* @__PURE__ */ S(rt, { value: t, onChange: l, disabled: i, children: /* @__PURE__ */ we("div", { className: "tw-relative ", children: [
2700
2722
  /* @__PURE__ */ we(
2701
2723
  "div",
2702
2724
  {
2703
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]"}`,
2704
2726
  children: [
2705
- /* @__PURE__ */ O(
2706
- tt.Input,
2727
+ /* @__PURE__ */ S(
2728
+ rt.Input,
2707
2729
  {
2708
2730
  ref: f,
2709
2731
  "data-testid": "select-input",
2710
- className: "tw-h-full tw-w-full tw-border-0 tw-border-b-[1px] tw-border-b-[#333333] tw-py-2 tw-pl-3 tw-pr-10 tw-text-base tw-leading-5 tw-shadow-none focus:tw-border-b-2 focus:tw-border-b-[#006bb1] focus:tw-outline-none focus:tw-ring-[0px] focus-visible:tw-ring-[0px]",
2732
+ 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]",
2711
2733
  displayValue: s,
2712
- onChange: (a) => r(a.target.value),
2713
- onClick: m,
2714
- style: { ...b }
2734
+ onChange: (O) => r(O.target.value),
2735
+ onClick: u,
2736
+ onFocus: d,
2737
+ onBlur: m,
2738
+ style: { ...h },
2739
+ placeholder: "Select your option",
2740
+ autoComplete: "off"
2715
2741
  }
2716
2742
  ),
2717
- /* @__PURE__ */ O(
2718
- tt.Button,
2743
+ /* @__PURE__ */ S(
2744
+ rt.Button,
2719
2745
  {
2720
2746
  className: "tw-absolute tw-inset-y-0 tw-right-0 tw-flex tw-items-center tw-pr-2",
2721
2747
  "data-testid": "select-button",
2722
2748
  ref: p,
2723
- children: /* @__PURE__ */ O(
2724
- Wr,
2749
+ children: /* @__PURE__ */ S(
2750
+ Vr,
2725
2751
  {
2726
2752
  className: `tw-h-5 tw-w-5 ${i ? "tw-text-[#A7A7A7]" : "tw-text-[#333333]"}`,
2727
2753
  "aria-hidden": "true"
@@ -2734,63 +2760,66 @@ const cs = ({
2734
2760
  ),
2735
2761
  e
2736
2762
  ] }) });
2737
- }, us = ({ children: e, setQuery: t }) => /* @__PURE__ */ O(Ye, { children: /* @__PURE__ */ O(
2738
- Dr,
2763
+ }, ds = ({ children: e, setQuery: t }) => /* @__PURE__ */ S(Qe, { children: /* @__PURE__ */ S(
2764
+ Wr,
2739
2765
  {
2740
2766
  as: Le,
2741
2767
  leave: "tw-transition tw-ease-in tw-duration-100",
2742
2768
  leaveFrom: "tw-opacity-100",
2743
2769
  leaveTo: "tw-opacity-0",
2744
2770
  afterLeave: () => t(""),
2745
- children: /* @__PURE__ */ O(tt.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 })
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 })
2746
2772
  }
2747
- ) }), Ql = De((e, t) => /* @__PURE__ */ O(tt.Option, { ref: t, className: e.className, value: e.value, disabled: e.disable, children: e.children }));
2748
- Ql.displayName = "Option";
2749
- const Xl = "_textInputWrapper_kudnh_1", Zl = "_textInput_kudnh_1", yn = {
2750
- textInputWrapper: Xl,
2751
- textInput: Zl
2752
- }, ds = Y.memo(
2753
- De(
2754
- ({ themeColor: e = "", style: t = {}, className: n = "", onFocus: r, onBlur: i, ...l }, o) => {
2755
- const [f, p] = Z(!1);
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);
2756
2782
  let b = {};
2757
- const v = [yn.textInput, n].filter(Boolean).join(" "), m = () => {
2783
+ const v = [On.textInput, n].filter(Boolean).join(" ");
2784
+ e = Re.convert3HexTo6(e);
2785
+ const h = () => {
2758
2786
  p(!0);
2759
- }, s = () => {
2787
+ }, l = () => {
2760
2788
  p(!1);
2761
2789
  };
2762
2790
  return b = {
2763
- borderBottomColor: f && e != "#ffffff" ? e : ""
2764
- }, /* @__PURE__ */ O("div", { className: yn.textInputWrapper, children: /* @__PURE__ */ O(
2791
+ borderBottomColor: f ? e !== "#ffffff" ? e : "#c8c8c8" : ""
2792
+ }, /* @__PURE__ */ S("div", { className: On.textInputWrapper, children: /* @__PURE__ */ S(
2765
2793
  "input",
2766
2794
  {
2767
2795
  type: "text",
2768
2796
  "data-testid": "textbox-input",
2769
2797
  ref: o,
2770
2798
  className: v,
2771
- onFocus: m,
2772
- onBlur: s,
2799
+ onFocus: h,
2800
+ onBlur: l,
2773
2801
  style: { ...b, ...t },
2774
- ...l
2802
+ ...a
2775
2803
  }
2776
2804
  ) });
2777
2805
  }
2778
2806
  )
2779
2807
  );
2780
2808
  export {
2781
- cs as AutoComplete,
2782
- kn as Button,
2783
- Vt as Checkbox,
2784
- ns as MultiLineInput,
2785
- rs as MultiSelect,
2786
- Ql as Option,
2787
- us as Options,
2788
- is as QuickMultiSelect,
2789
- os as QuickSelect,
2790
- ba as Scrollbar,
2791
- ls as Select,
2792
- Yl as SelectOption,
2793
- ss as SelectOptions,
2794
- ds as SingleLineInput
2809
+ us as AutoComplete,
2810
+ Tn as Button,
2811
+ Bt as Checkbox,
2812
+ Re as ColorsService,
2813
+ rs as MultiLineInput,
2814
+ is as MultiSelect,
2815
+ Xl as Option,
2816
+ ds as Options,
2817
+ os as QuickMultiSelect,
2818
+ as as QuickSelect,
2819
+ va as Scrollbar,
2820
+ ss as Select,
2821
+ Ql as SelectOption,
2822
+ cs as SelectOptions,
2823
+ fs as SingleLineInput
2795
2824
  };
2796
2825
  //# sourceMappingURL=ui-react.es.js.map