@reportportal/ui-kit 0.0.1-alpha.220 → 0.0.1-alpha.222

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,110 +1,111 @@
1
- import { jsx as r, jsxs as B, Fragment as he } from "react/jsx-runtime";
2
- import { useState as oe, useRef as ze, useEffect as we, useCallback as Y, forwardRef as Te, useLayoutEffect as je, useMemo as He } from "react";
1
+ import { jsx as r, jsxs as D, Fragment as he } from "react/jsx-runtime";
2
+ import { useState as oe, useRef as Me, useEffect as we, useCallback as Y, forwardRef as Te, useLayoutEffect as je, useMemo as He } from "react";
3
3
  import { c as Q } from "./bind-06a7ff84.js";
4
4
  import { Scrollbars as We } from "rc-scrollbars";
5
5
  import { B as Ye } from "./bubblesLoader-f3ffa240.js";
6
6
  import { B as Ke } from "./button-7ab874f3.js";
7
7
  import { S as Xe } from "./plus-199fb2a8.js";
8
- import { i as Me } from "./isEmpty-ccacb5ff.js";
8
+ import { i as ze } from "./isEmpty-ccacb5ff.js";
9
9
  import { createPortal as Ge } from "react-dom";
10
10
  import pe from "downshift";
11
- import { useFloating as Be, autoUpdate as Pe, flip as Je, size as Qe } from "@floating-ui/react";
11
+ import { useFloating as Be, autoUpdate as De, flip as Je, size as Qe } from "@floating-ui/react";
12
12
  import { F as Ze } from "./fieldText-1749da7a.js";
13
- import { S as Le } from "./dropdown-0260bb66.js";
14
- import { S as qe } from "./close-4d480ef7.js";
15
- import { S as Ue } from "./clear-53660571.js";
13
+ import { S as Fe } from "./dropdown-0260bb66.js";
14
+ import { E as Oe, A as qe, T as Ue } from "./constants-85822a6b.js";
15
+ import { S as Ve } from "./close-4d480ef7.js";
16
+ import { S as et } from "./clear-53660571.js";
16
17
  import "./openEye-950159cb.js";
17
18
  import "./baseIconButton-251479f7.js";
18
19
  import "./spinLoader-c4a53718.js";
19
20
  import "./maxValueDisplay-9be01a75.js";
20
21
  import "./fieldLabel.js";
21
- const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
22
+ const tt = "_disabled_1rpph_43", ot = "_input_1rpph_107", st = {
22
23
  "selected-item": "_selected-item_1rpph_16",
23
24
  "validation-error": "_validation-error_1rpph_35",
24
25
  "highlight-un-stored-item": "_highlight-un-stored-item_1rpph_40",
25
- disabled: Ve,
26
+ disabled: tt,
26
27
  "mobile-disabled": "_mobile-disabled_1rpph_48",
27
28
  "selected-item-text": "_selected-item-text_1rpph_54",
28
29
  "single-line": "_single-line_1rpph_58",
29
30
  "cross-icon": "_cross-icon_1rpph_64",
30
- input: et
31
- }, me = Q.bind(tt), ot = (t) => t.scrollWidth > t.clientWidth, st = ({
31
+ input: ot
32
+ }, me = Q.bind(st), nt = (t) => t.scrollWidth > t.clientWidth, rt = ({
32
33
  item: t,
33
34
  onRemoveItem: e,
34
35
  disabled: n = !1,
35
36
  mobileDisabled: o = !1,
36
37
  parseValueToString: s,
37
- error: c = !1,
38
+ error: l = !1,
38
39
  editItem: h,
39
40
  editable: u = !1,
40
- getAdditionalCreationCondition: S = () => !0,
41
- storedOption: y = !0,
41
+ getAdditionalCreationCondition: v = () => !0,
42
+ storedOption: g = !0,
42
43
  highlightUnStoredItem: p = !1,
43
- variant: C = "light",
44
- getItemName: I,
44
+ variant: z = "light",
45
+ getItemName: k,
45
46
  singleLine: m = !1,
46
- className: M,
47
- textClassName: R
47
+ className: L,
48
+ textClassName: P
48
49
  }) => {
49
- const [g, v] = oe(!1), [A, z] = oe(""), [d, a] = oe(!1), l = ze(null), _ = () => {
50
- !n && u && !y && (z((I == null ? void 0 : I(t)) || (s == null ? void 0 : s(t)) || ""), v(!0));
51
- }, i = (F) => {
52
- z(F.target.value);
53
- }, b = (F) => {
54
- const T = S(A);
55
- F.key === "Enter" && T && (h(t, A), v(!1), z(""));
56
- }, D = () => {
57
- v(!1), z("");
58
- }, L = (F) => {
59
- F.stopPropagation(), e(t);
60
- }, j = (s == null ? void 0 : s(t)) || "";
50
+ const [b, x] = oe(!1), [A, F] = oe(""), [c, i] = oe(!1), a = Me(null), d = () => {
51
+ !n && u && !g && (F((k == null ? void 0 : k(t)) || (s == null ? void 0 : s(t)) || ""), x(!0));
52
+ }, y = (B) => {
53
+ F(B.target.value);
54
+ }, C = (B) => {
55
+ const j = v(A);
56
+ B.key === "Enter" && j && (h(t, A), x(!1), F(""));
57
+ }, _ = () => {
58
+ x(!1), F("");
59
+ }, N = (B) => {
60
+ B.stopPropagation(), e(t);
61
+ }, R = (s == null ? void 0 : s(t)) || "";
61
62
  we(() => {
62
- if (l.current && m) {
63
- const F = () => {
64
- l.current && a(ot(l.current));
63
+ if (a.current && m) {
64
+ const B = () => {
65
+ a.current && i(nt(a.current));
65
66
  };
66
- if (F(), typeof ResizeObserver < "u") {
67
- const T = new ResizeObserver(F);
68
- return T.observe(l.current), () => T.disconnect();
67
+ if (B(), typeof ResizeObserver < "u") {
68
+ const j = new ResizeObserver(B);
69
+ return j.observe(a.current), () => j.disconnect();
69
70
  }
70
71
  } else
71
- a(!1);
72
- }, [j, m]);
72
+ i(!1);
73
+ }, [R, m]);
73
74
  const ee = me(
74
75
  "selected-item-text",
75
76
  {
76
77
  "single-line": m
77
78
  },
78
- R
79
- ), O = me(
79
+ P
80
+ ), $ = me(
80
81
  "selected-item",
81
- C,
82
+ z,
82
83
  {
83
- [`validation-${c}`]: c,
84
+ [`validation-${l}`]: l,
84
85
  disabled: n,
85
86
  "mobile-disabled": o,
86
- "highlight-un-stored-item": p && !y
87
+ "highlight-un-stored-item": p && !g
87
88
  },
88
- M
89
+ L
89
90
  );
90
- return g ? /* @__PURE__ */ r(
91
+ return b ? /* @__PURE__ */ r(
91
92
  "input",
92
93
  {
93
94
  autoFocus: !0,
94
95
  value: A,
95
- onChange: i,
96
- onKeyDown: b,
97
- onBlur: D,
96
+ onChange: y,
97
+ onKeyDown: C,
98
+ onBlur: _,
98
99
  className: me("input")
99
100
  }
100
- ) : /* @__PURE__ */ B("div", { className: O, onClick: _, children: [
101
+ ) : /* @__PURE__ */ D("div", { className: $, onClick: d, children: [
101
102
  /* @__PURE__ */ r(
102
103
  "span",
103
104
  {
104
- ref: l,
105
+ ref: a,
105
106
  className: ee,
106
- title: m && d ? j : void 0,
107
- children: j
107
+ title: m && c ? R : void 0,
108
+ children: R
108
109
  }
109
110
  ),
110
111
  !n && /* @__PURE__ */ r(
@@ -112,28 +113,28 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
112
113
  {
113
114
  type: "button",
114
115
  className: me("cross-icon", {
115
- [`validation-${c}`]: c,
116
+ [`validation-${l}`]: l,
116
117
  "mobile-disabled": o,
117
118
  disabled: n
118
119
  }),
119
- onClick: L,
120
- children: /* @__PURE__ */ r(qe, {})
120
+ onClick: N,
121
+ children: /* @__PURE__ */ r(Ve, {})
121
122
  }
122
123
  )
123
124
  ] });
124
- }, nt = ({
125
+ }, lt = ({
125
126
  items: t = [],
126
127
  parseValueToString: e,
127
128
  getItemValidationErrorType: n,
128
129
  storedItemsMap: o = {},
129
130
  highlightUnStoredItem: s = !1,
130
- renderCustomSelectedItem: c,
131
+ renderCustomSelectedItem: l,
131
132
  selectedItemSingleLine: h,
132
133
  selectedItemClassName: u,
133
- selectedItemTextClassName: S,
134
- ...y
135
- }) => t.map((p) => c ? c(p) : /* @__PURE__ */ r(
136
- st,
134
+ selectedItemTextClassName: v,
135
+ ...g
136
+ }) => t.map((p) => l ? l(p) : /* @__PURE__ */ r(
137
+ rt,
137
138
  {
138
139
  parseValueToString: e,
139
140
  error: (n == null ? void 0 : n(p)) || "",
@@ -142,40 +143,40 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
142
143
  highlightUnStoredItem: s,
143
144
  singleLine: h,
144
145
  className: u,
145
- textClassName: S,
146
- ...y
146
+ textClassName: v,
147
+ ...g
147
148
  },
148
149
  e == null ? void 0 : e(p)
149
- )), rt = "_prompt_1xfmd_16", lt = {
150
- prompt: rt
151
- }, ct = Q.bind(lt), it = ({ children: t = null }) => /* @__PURE__ */ r("div", { className: ct("prompt"), children: t }), at = "_item_zw4ux_16", dt = "_divider_zw4ux_24", ut = "_active_zw4ux_49", mt = "_value_zw4ux_55", ft = "_tag_zw4ux_69", pt = "_disabled_zw4ux_80", _t = {
152
- item: at,
153
- divider: dt,
150
+ )), ct = "_prompt_1xfmd_16", it = {
151
+ prompt: ct
152
+ }, at = Q.bind(it), dt = ({ children: t = null }) => /* @__PURE__ */ r("div", { className: at("prompt"), children: t }), ut = "_item_zw4ux_16", mt = "_divider_zw4ux_24", ft = "_active_zw4ux_49", pt = "_value_zw4ux_55", _t = "_tag_zw4ux_69", ht = "_disabled_zw4ux_80", wt = {
153
+ item: ut,
154
+ divider: mt,
154
155
  "new-item": "_new-item_zw4ux_31",
155
- active: ut,
156
- value: mt,
156
+ active: ft,
157
+ value: pt,
157
158
  "key-variant": "_key-variant_zw4ux_66",
158
- tag: ft,
159
+ tag: _t,
159
160
  "button-active": "_button-active_zw4ux_80",
160
- disabled: pt,
161
+ disabled: ht,
161
162
  "value-variant": "_value-variant_zw4ux_100"
162
- }, V = Q.bind(_t), Ae = ({
163
+ }, V = Q.bind(wt), Re = ({
163
164
  isActive: t = !1,
164
165
  isSelected: e = !1,
165
166
  isNew: n = !1,
166
167
  children: o = null,
167
168
  disabled: s = !1,
168
- optionVariant: c = "",
169
+ optionVariant: l = "",
169
170
  newItemButtonText: h = "",
170
171
  ...u
171
172
  }) => {
172
- const S = () => h || (c === "key-variant" ? "New key" : "New value");
173
- return n ? /* @__PURE__ */ B(he, { children: [
173
+ const v = () => h || (l === "key-variant" ? "New key" : "New value");
174
+ return n ? /* @__PURE__ */ D(he, { children: [
174
175
  /* @__PURE__ */ r("div", { className: V("divider") }),
175
- /* @__PURE__ */ B(
176
+ /* @__PURE__ */ D(
176
177
  "li",
177
178
  {
178
- className: V("new-item", c, {
179
+ className: V("new-item", l, {
179
180
  active: t,
180
181
  selected: e,
181
182
  disabled: s
@@ -190,7 +191,7 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
190
191
  className: V({ "button-active": t }),
191
192
  icon: /* @__PURE__ */ r(Xe, {}),
192
193
  variant: "text",
193
- children: S()
194
+ children: v()
194
195
  }
195
196
  )
196
197
  ]
@@ -199,7 +200,7 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
199
200
  ] }) : /* @__PURE__ */ r(
200
201
  "li",
201
202
  {
202
- className: V("item", c, {
203
+ className: V("item", l, {
203
204
  active: t,
204
205
  selected: e,
205
206
  disabled: s
@@ -208,233 +209,239 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
208
209
  children: /* @__PURE__ */ r("span", { className: V("label", "tag"), children: o })
209
210
  }
210
211
  );
211
- }, ht = "_container_12uzd_16", wt = {
212
- container: ht,
212
+ }, vt = "_container_12uzd_16", bt = {
213
+ container: vt,
213
214
  "empty-list-message": "_empty-list-message_12uzd_20",
214
215
  "limitation-item": "_limitation-item_12uzd_28"
215
- }, fe = Q.bind(wt), vt = (t) => {
216
+ }, fe = Q.bind(bt), yt = (t) => {
216
217
  const {
217
218
  options: e,
218
219
  async: n,
219
220
  inputValue: o,
220
221
  loading: s,
221
- createWithoutConfirmation: c,
222
+ createWithoutConfirmation: l,
222
223
  customEmptyListMessage: h,
223
224
  customNoMatchesMessage: u,
224
- optionVariant: S,
225
- newItemButtonText: y,
225
+ optionVariant: v,
226
+ newItemButtonText: g,
226
227
  renderOption: p,
227
- getUniqKey: C,
228
- getItemProps: I,
228
+ getUniqKey: z,
229
+ getItemProps: k,
229
230
  parseValueToString: m,
230
- limitationText: M = "Too many results. Type to search",
231
- optionsLimit: R = 0
232
- } = t, g = Y(() => (e || []).filter((i) => m(i).toUpperCase().indexOf((o.toUpperCase() || "").trim()) > -1), [o, e, m]), v = Y(
233
- (i, b, D = !1) => p ? p(i, b, D, I) : /* @__PURE__ */ r(
234
- Ae,
231
+ limitationText: L = "Too many results. Type to search",
232
+ optionsLimit: P = 0,
233
+ shouldShowEmptyListMessage: b = !0
234
+ } = t, x = Y(() => (e || []).filter((_) => m(_).toUpperCase().indexOf((o.toUpperCase() || "").trim()) > -1), [o, e, m]), A = Y(
235
+ (_, N, R = !1) => p ? p(_, N, R, k) : /* @__PURE__ */ r(
236
+ Re,
235
237
  {
236
- optionVariant: S,
237
- ...I({ item: i, index: b }),
238
- isNew: D,
239
- newItemButtonText: y,
240
- children: m(i)
238
+ optionVariant: v,
239
+ ...k({ item: _, index: N }),
240
+ isNew: R,
241
+ newItemButtonText: g,
242
+ children: m(_)
241
243
  },
242
- (C == null ? void 0 : C(i)) || m(i)
244
+ (z == null ? void 0 : z(_)) || m(_)
243
245
  ),
244
- [I, C, y, S, m, p]
245
- ), A = Y(
246
- (i) => i.length ? i.map((b, D) => v(b, D)) : "",
247
- [v]
248
- ), z = Y(
249
- (i) => {
250
- const b = i.length;
251
- return /* @__PURE__ */ r("div", { className: fe({ container: !b }), children: /* @__PURE__ */ r(
252
- Ae,
246
+ [k, z, g, v, m, p]
247
+ ), F = Y(
248
+ (_) => _.length ? _.map((N, R) => A(N, R)) : "",
249
+ [A]
250
+ ), c = Y(
251
+ (_) => {
252
+ const N = _.length;
253
+ return /* @__PURE__ */ r("div", { className: fe({ container: !N }), children: /* @__PURE__ */ r(
254
+ Re,
253
255
  {
254
- optionVariant: S,
256
+ optionVariant: v,
255
257
  isNew: !0,
256
- newItemButtonText: y,
257
- ...I({ item: o, index: b }),
258
+ newItemButtonText: g,
259
+ ...k({ item: o, index: N }),
258
260
  children: m(o)
259
261
  },
260
262
  m(o)
261
263
  ) });
262
264
  },
263
- [I, o, y, S, m]
264
- ), d = Y(
265
- (i) => s ? /* @__PURE__ */ B(he, { children: [
266
- /* @__PURE__ */ r(it, { children: /* @__PURE__ */ r(Ye, {}) }),
267
- !c && z(i)
265
+ [k, o, g, v, m]
266
+ ), i = Y(
267
+ (_) => s ? /* @__PURE__ */ D(he, { children: [
268
+ /* @__PURE__ */ r(dt, { children: /* @__PURE__ */ r(Ye, {}) }),
269
+ !l && c(_)
268
270
  ] }) : "",
269
- [c, s, z]
271
+ [l, s, c]
270
272
  ), a = Y(() => {
271
- const i = (e == null ? void 0 : e.length) === 0 ? h || "No available options" : u || "No matches found";
272
- return /* @__PURE__ */ r("div", { className: fe("empty-list-message"), children: i });
273
- }, [h, u, e == null ? void 0 : e.length]), l = n ? e : g(), _ = d(e);
274
- return _ || /* @__PURE__ */ B("div", { className: fe({ container: e.length }), children: [
275
- /* @__PURE__ */ B(We, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: [
276
- Me(l) ? a() : A(l),
277
- (l == null ? void 0 : l.length) > R && R > 0 && M ? /* @__PURE__ */ r("li", { className: fe("limitation-item"), "aria-hidden": "true", children: M }) : null
273
+ const _ = (e == null ? void 0 : e.length) === 0 ? h || "No available options" : u || "No matches found";
274
+ return /* @__PURE__ */ r("div", { className: fe("empty-list-message"), children: _ });
275
+ }, [h, u, e == null ? void 0 : e.length]), d = n ? e : x(), y = i(e);
276
+ if (y)
277
+ return y;
278
+ const C = ze(d);
279
+ return C && !b && l ? null : /* @__PURE__ */ D("div", { className: fe({ container: e.length }), children: [
280
+ /* @__PURE__ */ D(We, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: [
281
+ C ? b && a() : F(d),
282
+ (d == null ? void 0 : d.length) > P && P > 0 && L ? /* @__PURE__ */ r("li", { className: fe("limitation-item"), "aria-hidden": "true", children: L }) : null
278
283
  ] }),
279
- !c && z(l)
284
+ !l && c(d)
280
285
  ] });
281
- }, bt = "_menu_f64z5_16", yt = "_opened_f64z5_34", gt = "_dark_f64z5_37", xt = {
282
- menu: bt,
283
- opened: yt,
284
- dark: gt
285
- }, Nt = Q.bind(xt), St = (t, e) => !t || t <= e.trim().length, $e = Te(
286
+ }, gt = "_menu_f64z5_16", xt = "_opened_f64z5_34", Nt = "_dark_f64z5_37", Et = {
287
+ menu: gt,
288
+ opened: xt,
289
+ dark: Nt
290
+ }, St = Q.bind(Et), It = (t, e) => !t || t <= e.trim().length, $e = Te(
286
291
  ({
287
292
  isOpen: t = !1,
288
293
  style: e = {},
289
294
  minLength: n = 1,
290
295
  isDropdownMode: o,
291
296
  inputValue: s = "",
292
- className: c = "",
293
- ...h
294
- }, u) => /* @__PURE__ */ r(
297
+ className: l = "",
298
+ portalMenuAttribute: h = null,
299
+ ...u
300
+ }, v) => /* @__PURE__ */ r(
295
301
  "ul",
296
302
  {
297
- ref: u,
298
- className: Nt(
303
+ ref: v,
304
+ className: St(
299
305
  "menu",
300
- { opened: t && (o || St(n, s)) },
301
- c
306
+ { opened: t && (o || It(n, s)) },
307
+ l
302
308
  ),
303
309
  style: e,
304
- children: /* @__PURE__ */ r(vt, { inputValue: s, ...h })
310
+ ...h ? { [h]: "" } : {},
311
+ children: /* @__PURE__ */ r(yt, { inputValue: s, ...u })
305
312
  }
306
313
  )
307
- ), De = (t, e) => typeof t == "string" ? t : e ? String(t[e(t)]) : "", _e = (t, e) => {
314
+ ), Le = (t, e) => typeof t == "string" ? t : e ? String(t[e(t)]) : "", _e = (t, e) => {
308
315
  var o;
309
- return t === e ? !0 : !!(t && e && typeof t == "object" && typeof e == "object" && Object.keys(t).length === Object.keys(e).length && ((o = Object.entries(t)) != null && o.every(([s, c]) => _e(c, e[s]))));
310
- }, Et = (t, e, n) => typeof t == "string" ? t === e : n ? (() => {
316
+ return t === e ? !0 : !!(t && e && typeof t == "object" && typeof e == "object" && Object.keys(t).length === Object.keys(e).length && ((o = Object.entries(t)) != null && o.every(([s, l]) => _e(l, e[s]))));
317
+ }, kt = (t, e, n) => typeof t == "string" ? t === e : n ? (() => {
311
318
  const o = n(t);
312
319
  return t[o] === e[o];
313
- })() : !1, It = ({
320
+ })() : !1, Ct = ({
314
321
  options: t = [],
315
322
  onChange: e,
316
323
  selectedItems: n = [],
317
324
  handleUnStoredItemCb: o = null,
318
325
  existingItemsMap: s = {},
319
- children: c,
326
+ children: l,
320
327
  customizeNewSelectedValue: h = (p) => p,
321
328
  getOptionUniqKey: u,
322
- getOptionUniqKeyValue: S,
323
- ...y
329
+ getOptionUniqKeyValue: v,
330
+ ...g
324
331
  }) => {
325
- const [p, C] = oe(s), I = (d, a) => {
326
- const l = {
332
+ const [p, z] = oe(s), k = (c, i) => {
333
+ const a = {
327
334
  ...p
328
335
  };
329
- d.forEach((_) => {
330
- if (t.find((i) => Et(i, _, u))) {
331
- const i = De(_, u);
332
- l[i] = !0;
336
+ c.forEach((d) => {
337
+ if (t.find((y) => kt(y, d, u))) {
338
+ const y = Le(d, u);
339
+ a[y] = !0;
333
340
  }
334
- }), C(l), a(l);
335
- }, m = (d, a) => {
336
- const l = De(d, u);
337
- if (l in p) {
338
- const _ = { ...p };
339
- delete _[l], C(_), a(_);
341
+ }), z(a), i(a);
342
+ }, m = (c, i) => {
343
+ const a = Le(c, u);
344
+ if (a in p) {
345
+ const d = { ...p };
346
+ delete d[a], z(d), i(d);
340
347
  } else
341
- a(p);
342
- }, M = (d, a) => {
343
- const l = h(d), _ = Array.isArray(l) ? l : [l], b = [...n.filter((L) => _.indexOf(L) < 0), ..._];
344
- e == null || e(b, a), I(_, (L) => o == null ? void 0 : o(b, L));
345
- }, R = (d, a) => {
346
- const l = n.indexOf(d), _ = [...n];
347
- _.splice(l, 1, a), e == null || e(_, null);
348
- }, g = (d, a) => {
349
- const l = n.filter((i) => !_e(i, d));
350
- e == null || e(l, a), m(d, (i) => o == null ? void 0 : o(l, i));
351
- }, v = (d, a) => {
352
- d && M(d, a);
353
- }, A = (d) => ({
354
- removeItem: g,
355
- editItem: R,
348
+ i(p);
349
+ }, L = (c, i) => {
350
+ const a = h(c), d = Array.isArray(a) ? a : [a], C = [...n.filter((N) => d.indexOf(N) < 0), ...d];
351
+ e == null || e(C, i), k(d, (N) => o == null ? void 0 : o(C, N));
352
+ }, P = (c, i) => {
353
+ const a = n.indexOf(c), d = [...n];
354
+ d.splice(a, 1, i), e == null || e(d, null);
355
+ }, b = (c, i) => {
356
+ const a = n.filter((y) => !_e(y, c));
357
+ e == null || e(a, i), m(c, (y) => o == null ? void 0 : o(a, y));
358
+ }, x = (c, i) => {
359
+ c && L(c, i);
360
+ }, A = (c) => ({
361
+ removeItem: b,
362
+ editItem: P,
356
363
  handleChange: e,
357
- getOptionUniqKeyValue: S,
364
+ getOptionUniqKeyValue: v,
358
365
  storedItemsMap: p,
359
- ...d
366
+ ...c
360
367
  });
361
368
  return /* @__PURE__ */ r(
362
369
  pe,
363
370
  {
364
- ...y,
365
- stateReducer: (d, a) => {
366
- switch (a.type) {
371
+ ...g,
372
+ stateReducer: (c, i) => {
373
+ switch (i.type) {
367
374
  case pe.stateChangeTypes.keyDownEnter:
368
375
  case pe.stateChangeTypes.clickItem:
369
376
  return {
370
- ...a,
371
- highlightedIndex: d.highlightedIndex,
377
+ ...i,
378
+ highlightedIndex: c.highlightedIndex,
372
379
  inputValue: ""
373
380
  };
374
381
  default:
375
- return a;
382
+ return i;
376
383
  }
377
384
  },
378
- onChange: v,
385
+ onChange: x,
379
386
  selectedItem: null,
380
- children: (d) => c == null ? void 0 : c(A(d))
387
+ children: (c) => l == null ? void 0 : l(A(c))
381
388
  }
382
389
  );
383
- }, Oe = "Enter", kt = "Tab", Ct = "_autocomplete_1so4a_16", zt = "_disabled_1so4a_32", Mt = "_error_1so4a_35", Rt = "_touched_1so4a_35", At = "_input_1so4a_77", Dt = {
384
- autocomplete: Ct,
390
+ }, Mt = "_autocomplete_1so4a_16", zt = "_disabled_1so4a_32", At = "_error_1so4a_35", Rt = "_touched_1so4a_35", Lt = "_input_1so4a_77", Pt = {
391
+ autocomplete: Mt,
385
392
  "autocomplete-wrapper": "_autocomplete-wrapper_1so4a_28",
386
393
  disabled: zt,
387
- error: Mt,
394
+ error: At,
388
395
  touched: Rt,
389
396
  "clear-icon": "_clear-icon_1so4a_46",
390
397
  "clear-icon--disabled": "_clear-icon--disabled_1so4a_56",
391
398
  "autocomplete-input": "_autocomplete-input_1so4a_60",
392
399
  "single-line-mode": "_single-line-mode_1so4a_68",
393
400
  "mobile-disabled": "_mobile-disabled_1so4a_72",
394
- input: At,
401
+ input: Lt,
395
402
  "type-number": "_type-number_1so4a_101",
396
403
  "error-text": "_error-text_1so4a_112",
397
404
  "dropdown-button": "_dropdown-button_1so4a_121",
398
405
  "icon-reversed": "_icon-reversed_1so4a_129"
399
- }, J = Q.bind(Dt), co = (t) => {
406
+ }, J = Q.bind(Pt), ao = (t) => {
400
407
  const {
401
408
  options: e = [],
402
409
  loading: n = !1,
403
410
  onStateChange: o = () => {
404
411
  },
405
412
  value: s = [],
406
- placeholder: c = "",
413
+ placeholder: l = "",
407
414
  error: h = "",
408
415
  touched: u = !1,
409
- creatable: S = !1,
410
- editable: y = !1,
416
+ creatable: v = !1,
417
+ editable: g = !1,
411
418
  onChange: p = () => {
412
419
  },
413
- onFocus: C = () => {
420
+ onFocus: z = () => {
414
421
  },
415
- onBlur: I = () => {
422
+ onBlur: k = () => {
416
423
  },
417
424
  disabled: m = !1,
418
- isDropdownMode: M = !1,
419
- mobileDisabled: R = !1,
420
- inputProps: g = {},
421
- parseValueToString: v = (f) => f == null ? "" : String(f),
425
+ isDropdownMode: L = !1,
426
+ mobileDisabled: P = !1,
427
+ inputProps: b = {},
428
+ parseValueToString: x = (f) => f == null ? "" : String(f),
422
429
  maxLength: A = null,
423
- async: z = !1,
424
- customClass: d = "",
425
- createWithoutConfirmation: a = !1,
426
- getItemValidationErrorType: l = null,
427
- clearItemsError: _ = () => {
430
+ async: F = !1,
431
+ customClass: c = "",
432
+ createWithoutConfirmation: i = !1,
433
+ getItemValidationErrorType: a = null,
434
+ clearItemsError: d = () => {
428
435
  },
429
- getAdditionalCreationCondition: i = () => !0,
430
- highlightUnStoredItem: b = !1,
431
- parseInputValueFn: D = null,
432
- handleUnStoredItemCb: L = null,
433
- dataAutomationId: j = "",
436
+ getAdditionalCreationCondition: y = () => !0,
437
+ highlightUnStoredItem: C = !1,
438
+ parseInputValueFn: _ = null,
439
+ handleUnStoredItemCb: N = null,
440
+ dataAutomationId: R = "",
434
441
  existingItemsMap: ee = {},
435
- customizeNewSelectedValue: O = (f) => f,
436
- renderCustomSelectedItem: F,
437
- useFixedPositioning: T,
442
+ customizeNewSelectedValue: $ = (f) => f,
443
+ renderCustomSelectedItem: B,
444
+ useFixedPositioning: j,
438
445
  newItemButtonText: ve = "",
439
446
  menuClassName: K = "",
440
447
  selectedItemSingleLine: se,
@@ -443,55 +450,55 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
443
450
  ...be
444
451
  } = t, { refs: le, floatingStyles: Z } = Be({
445
452
  placement: "bottom-start",
446
- strategy: T ? "fixed" : "absolute",
447
- whileElementsMounted: Pe
448
- }), ye = s.length === 0 && !m ? c : "", te = ze(null);
453
+ strategy: j ? "fixed" : "absolute",
454
+ whileElementsMounted: De
455
+ }), ye = s.length === 0 && !m ? l : "", te = Me(null);
449
456
  we(() => {
450
- _();
451
- }, [_, s]);
452
- const ge = (f, x) => {
453
- p(f, x);
454
- }, xe = (f, x, E) => ({ item: N, index: G, ...H }) => f({
455
- item: N,
457
+ d();
458
+ }, [d, s]);
459
+ const ge = (f, E) => {
460
+ p(f, E);
461
+ }, xe = (f, E, I) => ({ item: S, index: G, ...H }) => f({
462
+ item: S,
456
463
  index: G,
457
- isSelected: E.some((W) => _e(W, N)),
464
+ isSelected: I.some((W) => _e(W, S)),
458
465
  ...H,
459
- isActive: x === G
466
+ isActive: E === G
460
467
  }), w = ({
461
468
  event: f,
462
- removeItem: x,
463
- inputValue: E
469
+ removeItem: E,
470
+ inputValue: I
464
471
  }) => {
465
- f.key === "Backspace" && !E && s.length && x(s[s.length - 1], null);
466
- }, $ = ({
472
+ f.key === "Backspace" && !I && s.length && E(s[s.length - 1], null);
473
+ }, T = ({
467
474
  inputValue: f,
468
- selectItem: x,
469
- clearSelection: E
475
+ selectItem: E,
476
+ clearSelection: I
470
477
  }) => {
471
- if (D) {
472
- const N = D(f);
473
- (N.length ? N : [f]).forEach((H) => x(H)), E();
478
+ if (_) {
479
+ const S = _(f);
480
+ (S.length ? S : [f]).forEach((H) => E(H)), I();
474
481
  } else
475
- x(f), E();
476
- }, q = (f) => (x) => {
477
- f(x, null), te.current && te.current.focus();
478
- }, X = e.filter((f) => s.every((x) => !_e(x, f)));
482
+ E(f), I();
483
+ }, q = (f) => (E) => {
484
+ f(E, null), te.current && te.current.focus();
485
+ }, X = e.filter((f) => s.every((E) => !_e(E, f)));
479
486
  return /* @__PURE__ */ r(
480
- It,
487
+ Ct,
481
488
  {
482
489
  onChange: ge,
483
- itemToString: v,
490
+ itemToString: x,
484
491
  selectedItems: s,
485
492
  onStateChange: o,
486
493
  options: e,
487
494
  existingItemsMap: ee,
488
- handleUnStoredItemCb: L,
489
- customizeNewSelectedValue: O,
495
+ handleUnStoredItemCb: N,
496
+ customizeNewSelectedValue: $,
490
497
  children: ({
491
498
  getInputProps: f,
492
- getItemProps: x,
493
- isOpen: E,
494
- inputValue: N = "",
499
+ getItemProps: E,
500
+ isOpen: I,
501
+ inputValue: S = "",
495
502
  highlightedIndex: G,
496
503
  removeItem: H,
497
504
  editItem: W,
@@ -500,47 +507,47 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
500
507
  clearSelection: ae,
501
508
  toggleMenu: U,
502
509
  storedItemsMap: Ne,
503
- getRootProps: Se
510
+ getRootProps: Ee
504
511
  }) => {
505
- const Ee = Se(void 0, { suppressRefError: !0 }), de = {
506
- ...Ee,
507
- ref: (k) => (le.setReference(k), Ee.ref(k))
508
- }, Ie = N ?? "";
509
- return /* @__PURE__ */ B("div", { ...de, className: J("autocomplete-wrapper"), children: [
510
- /* @__PURE__ */ B(he, { children: [
511
- /* @__PURE__ */ B(
512
+ const Se = Ee(void 0, { suppressRefError: !0 }), de = {
513
+ ...Se,
514
+ ref: (M) => (le.setReference(M), Se.ref(M))
515
+ }, Ie = S ?? "";
516
+ return /* @__PURE__ */ D("div", { ...de, className: J("autocomplete-wrapper"), children: [
517
+ /* @__PURE__ */ D(he, { children: [
518
+ /* @__PURE__ */ D(
512
519
  "div",
513
520
  {
514
- className: J("autocomplete", d, {
515
- "mobile-disabled": R,
521
+ className: J("autocomplete", c, {
522
+ "mobile-disabled": P,
516
523
  error: h,
517
524
  touched: u,
518
525
  disabled: m
519
526
  }),
520
527
  children: [
521
- /* @__PURE__ */ B(
528
+ /* @__PURE__ */ D(
522
529
  "div",
523
530
  {
524
531
  className: J("autocomplete-input", {
525
- "mobile-disabled": R,
532
+ "mobile-disabled": P,
526
533
  "single-line-mode": se
527
534
  }),
528
535
  children: [
529
536
  /* @__PURE__ */ r(
530
- nt,
537
+ lt,
531
538
  {
532
539
  items: s,
533
540
  onRemoveItem: q(H),
534
541
  disabled: m,
535
- mobileDisabled: R,
536
- parseValueToString: v,
537
- getItemValidationErrorType: l,
538
- renderCustomSelectedItem: F,
542
+ mobileDisabled: P,
543
+ parseValueToString: x,
544
+ getItemValidationErrorType: a,
545
+ renderCustomSelectedItem: B,
539
546
  editItem: W,
540
- editable: y,
541
- getAdditionalCreationCondition: i,
547
+ editable: g,
548
+ getAdditionalCreationCondition: y,
542
549
  storedItemsMap: Ne,
543
- highlightUnStoredItem: b,
550
+ highlightUnStoredItem: C,
544
551
  selectedItemSingleLine: se,
545
552
  selectedItemClassName: ne,
546
553
  selectedItemTextClassName: re
@@ -554,54 +561,54 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
554
561
  placeholder: ye,
555
562
  maxLength: A,
556
563
  onFocus: () => {
557
- M && ce(), C();
564
+ L && ce(), z();
558
565
  },
559
- onKeyDown: (k) => {
560
- k.key === Oe && N && S && i(N) && $({
561
- inputValue: N,
566
+ onKeyDown: (M) => {
567
+ M.key === Oe && S && v && y(S) && T({
568
+ inputValue: S,
562
569
  selectItem: ie,
563
570
  clearSelection: ae
564
- }), w({ event: k, removeItem: H, inputValue: N });
571
+ }), w({ event: M, removeItem: H, inputValue: S });
565
572
  },
566
573
  onBlur: () => {
567
- I(), N && S && i(N) && $({
568
- inputValue: N,
574
+ k(), S && v && y(S) && T({
575
+ inputValue: S,
569
576
  selectItem: ie,
570
577
  clearSelection: ae
571
578
  });
572
579
  },
573
580
  disabled: m,
574
- ...g
581
+ ...b
575
582
  }),
576
- className: J("input", { disabled: m }, g.className),
577
- "data-automation-id": j
583
+ className: J("input", { disabled: m }, b.className),
584
+ "data-automation-id": R
578
585
  }
579
586
  )
580
587
  ]
581
588
  }
582
589
  ),
583
- (g == null ? void 0 : g.clearable) && !Me(s) && /* @__PURE__ */ r(
590
+ (b == null ? void 0 : b.clearable) && !ze(s) && /* @__PURE__ */ r(
584
591
  "button",
585
592
  {
586
593
  type: "button",
587
594
  className: J("clear-icon", { "clear-icon--disabled": m }),
588
595
  onClick: () => {
589
- var k;
590
- return !m && ((k = g == null ? void 0 : g.onClear) == null ? void 0 : k.call(g));
596
+ var M;
597
+ return !m && ((M = b == null ? void 0 : b.onClear) == null ? void 0 : M.call(b));
591
598
  },
592
- onMouseDown: (k) => k.preventDefault(),
593
- children: /* @__PURE__ */ r(Ue, {})
599
+ onMouseDown: (M) => M.preventDefault(),
600
+ children: /* @__PURE__ */ r(et, {})
594
601
  }
595
602
  ),
596
- M && /* @__PURE__ */ r(
603
+ L && /* @__PURE__ */ r(
597
604
  "button",
598
605
  {
599
606
  type: "button",
600
- className: J("dropdown-button", { "icon-reversed": E }),
607
+ className: J("dropdown-button", { "icon-reversed": I }),
601
608
  onClick: () => U(),
602
609
  "aria-label": "Toggle dropdown",
603
- "aria-expanded": E,
604
- children: /* @__PURE__ */ r(Le, {})
610
+ "aria-expanded": I,
611
+ children: /* @__PURE__ */ r(Fe, {})
605
612
  }
606
613
  )
607
614
  ]
@@ -612,17 +619,17 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
612
619
  /* @__PURE__ */ r(
613
620
  $e,
614
621
  {
615
- isOpen: E,
622
+ isOpen: I,
616
623
  loading: n,
617
- async: z,
624
+ async: F,
618
625
  ref: le.setFloating,
619
626
  newItemButtonText: ve,
620
- isDropdownMode: M,
627
+ isDropdownMode: L,
621
628
  style: Z,
622
629
  inputValue: Ie.trim(),
623
- getItemProps: xe(x, G, s),
624
- parseValueToString: v,
625
- createWithoutConfirmation: a,
630
+ getItemProps: xe(E, G, s),
631
+ parseValueToString: x,
632
+ createWithoutConfirmation: i,
626
633
  options: X,
627
634
  className: K,
628
635
  ...be
@@ -632,7 +639,7 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
632
639
  }
633
640
  }
634
641
  );
635
- }, Ft = ({ skip: t }) => {
642
+ }, Bt = ({ skip: t }) => {
636
643
  je(() => {
637
644
  if (t)
638
645
  return;
@@ -641,20 +648,20 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
641
648
  if (!n)
642
649
  return;
643
650
  window.scrollY !== e && window.scrollTo(0, e);
644
- }, c = (u) => {
651
+ }, l = (u) => {
645
652
  n && (u.preventDefault(), u.stopImmediatePropagation(), s());
646
653
  };
647
- e = window.scrollY, window.addEventListener("scroll", c, { passive: !1, capture: !0 }), requestAnimationFrame(() => {
654
+ e = window.scrollY, window.addEventListener("scroll", l, { passive: !1, capture: !0 }), requestAnimationFrame(() => {
648
655
  e = window.scrollY, s();
649
656
  });
650
657
  const h = setTimeout(() => {
651
658
  n = !1;
652
659
  }, o);
653
660
  return () => {
654
- clearTimeout(h), window.removeEventListener("scroll", c, { capture: !0 });
661
+ clearTimeout(h), window.removeEventListener("scroll", l, { capture: !0 });
655
662
  };
656
663
  }, [t]);
657
- }, Bt = ({ skip: t, reference: e }) => {
664
+ }, Dt = ({ skip: t, reference: e }) => {
658
665
  we(() => {
659
666
  if (t)
660
667
  return;
@@ -666,198 +673,199 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
666
673
  window.removeEventListener("resize", n);
667
674
  };
668
675
  }, [t, e]);
669
- }, Pt = ({ skip: t, onClose: e, menuRef: n }) => {
676
+ }, Ft = ({ skip: t, onClose: e, menuRef: n }) => {
670
677
  we(() => {
671
678
  if (t)
672
679
  return;
673
680
  const o = (s) => {
674
- var c;
675
- (c = n.current) != null && c.contains(s.target) || e();
681
+ var l;
682
+ (l = n.current) != null && l.contains(s.target) || e();
676
683
  };
677
684
  return window.addEventListener("scroll", o, !0), () => {
678
685
  window.removeEventListener("scroll", o, !0);
679
686
  };
680
687
  }, [t, e, n]);
681
- }, Lt = {
688
+ }, Ot = {
682
689
  "input-wrapper": "_input-wrapper_d9vma_1",
683
690
  "dropdown-button": "_dropdown-button_d9vma_6",
684
691
  "icon-reversed": "_icon-reversed_d9vma_14"
685
- }, Fe = Q.bind(Lt), $t = 0, Ot = Je({
692
+ }, Pe = Q.bind(Ot), $t = 0, Tt = Je({
686
693
  fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"],
687
694
  boundary: document == null ? void 0 : document.documentElement,
688
695
  rootBoundary: "viewport"
689
- }), Tt = Qe({
696
+ }), jt = Qe({
690
697
  apply({ rects: t, elements: e }) {
691
698
  Object.assign(e.floating.style, {
692
699
  width: `${t.reference.width}px`
693
700
  });
694
701
  }
695
- }), io = (t) => {
702
+ }), uo = (t) => {
696
703
  const {
697
704
  options: e = [],
698
705
  value: n,
699
706
  placeholder: o = "",
700
707
  onChange: s = () => {
701
708
  },
702
- onFocus: c = () => {
709
+ onFocus: l = () => {
703
710
  },
704
711
  onBlur: h = () => {
705
712
  },
706
713
  disabled: u = !1,
707
- inputProps: S = {},
708
- parseValueToString: y = (w) => w === null ? "" : String(w),
714
+ inputProps: v = {},
715
+ parseValueToString: g = (w) => w === null ? "" : String(w),
709
716
  minLength: p = 1,
710
- skipOptionCreation: C = !1,
711
- maxLength: I = null,
717
+ skipOptionCreation: z = !1,
718
+ maxLength: k = null,
712
719
  optionVariant: m = "",
713
- isRequired: M = !1,
714
- error: R = "",
715
- touched: g = !1,
716
- setTouch: v = () => {
720
+ isRequired: L = !1,
721
+ error: P = "",
722
+ touched: b = !1,
723
+ setTouch: x = () => {
717
724
  },
718
725
  createWithoutConfirmation: A = !1,
719
- menuClassName: z = "",
720
- icon: d,
721
- isDropdownMode: a = !1,
722
- isOptionUnique: l,
723
- refFunction: _,
724
- stateReducer: i,
725
- onStateChange: b,
726
- useFixedPositioning: D,
727
- dropdownMatchInputWidth: L = !1,
728
- withMenuFlip: j = !1,
726
+ menuClassName: F = "",
727
+ icon: c,
728
+ isDropdownMode: i = !1,
729
+ isOptionUnique: a,
730
+ refFunction: d,
731
+ stateReducer: y,
732
+ onStateChange: C,
733
+ useFixedPositioning: _,
734
+ dropdownMatchInputWidth: N = !1,
735
+ withMenuFlip: R = !1,
729
736
  newItemButtonText: ee = "",
730
- menuPortalRoot: O,
731
- ...F
732
- } = t, [T, ve] = oe(!1), K = ze(null), se = Y(() => {
737
+ menuPortalRoot: $,
738
+ ...B
739
+ } = t, [j, ve] = oe(!1), K = Me(null), se = Y(() => {
733
740
  var w;
734
741
  return (w = K.current) == null ? void 0 : w.call(K);
735
- }, []), ne = !T || !O, re = O || D ? "fixed" : "absolute", be = !T || re === "absolute", le = He(
742
+ }, []), ne = !j || !$, re = $ || _ ? "fixed" : "absolute", be = !j || re === "absolute", le = He(
736
743
  () => [
737
- ...j ? [Ot] : [],
738
- ...L ? [Tt] : []
744
+ ...R ? [Tt] : [],
745
+ ...N ? [jt] : []
739
746
  ],
740
- [j, L]
747
+ [R, N]
741
748
  ), { refs: Z, floatingStyles: ye } = Be({
742
749
  placement: "bottom-start",
743
- whileElementsMounted: Pe,
750
+ whileElementsMounted: De,
744
751
  strategy: re,
745
752
  middleware: le
746
753
  });
747
- Ft({ skip: ne }), Bt({ skip: ne, reference: Z.reference }), Pt({
754
+ Bt({ skip: ne }), Dt({ skip: ne, reference: Z.reference }), Ft({
748
755
  skip: be,
749
756
  onClose: se,
750
757
  menuRef: Z.floating
751
758
  });
752
- const te = (w, $, q) => ({ item: X, index: f, ...x }) => w({
759
+ const te = (w, T, q) => ({ item: X, index: f, ...E }) => w({
753
760
  item: X,
754
761
  index: f,
755
762
  isSelected: q !== null && q === X,
756
- ...x,
757
- isActive: $ === f
758
- }), ge = (w, $) => {
759
- w.key === kt && (w.preventDefault(), $(e.length));
763
+ ...E,
764
+ isActive: T === f
765
+ }), ge = (w, T) => {
766
+ w.key === Ue && (w.preventDefault(), T(e.length));
760
767
  }, xe = Y(
761
- (w, ...$) => {
762
- (w == null ? void 0 : w.isOpen) !== void 0 && ve(w.isOpen), b == null || b(w, ...$);
768
+ (w, ...T) => {
769
+ (w == null ? void 0 : w.isOpen) !== void 0 && ve(w.isOpen), C == null || C(w, ...T);
763
770
  },
764
- [b]
771
+ [C]
765
772
  );
766
773
  return /* @__PURE__ */ r(
767
774
  pe,
768
775
  {
769
776
  onChange: s,
770
- itemToString: y,
777
+ itemToString: g,
771
778
  selectedItem: n,
772
779
  onStateChange: xe,
773
780
  defaultHighlightedIndex: $t,
774
- stateReducer: i,
781
+ stateReducer: y,
775
782
  children: ({
776
783
  getInputProps: w,
777
- getItemProps: $,
784
+ getItemProps: T,
778
785
  setHighlightedIndex: q,
779
786
  toggleMenu: X,
780
787
  openMenu: f,
781
- closeMenu: x,
782
- isOpen: E,
783
- inputValue: N,
788
+ closeMenu: E,
789
+ isOpen: I,
790
+ inputValue: S,
784
791
  highlightedIndex: G,
785
792
  getRootProps: H,
786
793
  selectItem: W
787
794
  }) => {
788
795
  const ce = H(void 0, { suppressRefError: !0 }), ie = {
789
796
  ...ce,
790
- ref: (P) => (Z.setReference(P), ce.ref(P))
797
+ ref: (O) => (Z.setReference(O), ce.ref(O))
791
798
  };
792
- K.current || (K.current = x);
793
- const ae = N ?? "", { onClear: U, clearable: Ne, ...Se } = S, de = Ne && n !== null, Ie = (...P) => {
794
- W(null), U == null || U(...P);
795
- }, k = /* @__PURE__ */ r(
799
+ K.current || (K.current = E);
800
+ const ae = S ?? "", { onClear: U, clearable: Ne, ...Ee } = v, de = Ne && n !== null, Ie = (...O) => {
801
+ W(null), U == null || U(...O);
802
+ }, M = /* @__PURE__ */ r(
796
803
  $e,
797
804
  {
798
- isOpen: E,
799
- isDropdownMode: a,
805
+ isOpen: I,
806
+ isDropdownMode: i,
800
807
  style: ye,
801
808
  ref: Z.setFloating,
809
+ portalMenuAttribute: $ ? qe : null,
802
810
  minLength: p,
803
- inputValue: (N || "").trim(),
804
- getItemProps: te($, G, n),
805
- parseValueToString: y,
811
+ inputValue: (S || "").trim(),
812
+ getItemProps: te(T, G, n),
813
+ parseValueToString: g,
806
814
  optionVariant: m,
807
815
  createWithoutConfirmation: A,
808
- className: z,
816
+ className: F,
809
817
  options: e,
810
818
  newItemButtonText: ee,
811
- ...F
819
+ ...B
812
820
  }
813
821
  );
814
- return /* @__PURE__ */ B(he, { children: [
815
- /* @__PURE__ */ B("div", { className: Fe("input-wrapper"), ...ie, children: [
822
+ return /* @__PURE__ */ D(he, { children: [
823
+ /* @__PURE__ */ D("div", { className: Pe("input-wrapper"), ...ie, children: [
816
824
  /* @__PURE__ */ r(
817
825
  Ze,
818
826
  {
819
827
  ...w({
820
828
  placeholder: u ? "" : o,
821
- maxLength: I || void 0,
829
+ maxLength: k || void 0,
822
830
  onFocus: () => {
823
- a && !E && (f(), v == null || v(!0)), c();
831
+ i && !I && (f(), x == null || x(!0)), l();
824
832
  },
825
- ref: _,
826
- onKeyDown: (P) => {
827
- P.key === Oe && P.preventDefault(), N && E && ge(P, q);
833
+ ref: d,
834
+ onKeyDown: (O) => {
835
+ O.key === Oe && O.preventDefault(), S && I && ge(O, q);
828
836
  },
829
- onBlur: (P) => {
830
- const ue = ae.trim(), ke = !Me(ue), Re = ke ? e.find((Ce) => y(Ce) === ue) : void 0;
831
- W(Re || (!C && A && ke ? ue : null)), h(P), l == null || l(
832
- ke ? !e.some((Ce) => y(Ce) === ue) : null
833
- ), a && E && X(), v == null || v(!0);
837
+ onBlur: (O) => {
838
+ const ue = ae.trim(), ke = !ze(ue), Ae = ke ? e.find((Ce) => g(Ce) === ue) : void 0;
839
+ W(Ae || (!z && A && ke ? ue : null)), h(O), a == null || a(
840
+ ke ? !e.some((Ce) => g(Ce) === ue) : null
841
+ ), i && I && X(), x == null || x(!0);
834
842
  },
835
843
  disabled: u,
836
844
  defaultWidth: !1,
837
- isRequired: M,
838
- touched: g,
839
- error: R,
840
- ...Se,
845
+ isRequired: L,
846
+ touched: b,
847
+ error: P,
848
+ ...Ee,
841
849
  clearable: de,
842
850
  onClear: de ? Ie : U,
843
- endIcon: a && !d ? /* @__PURE__ */ r(
851
+ endIcon: i && !c ? /* @__PURE__ */ r(
844
852
  "button",
845
853
  {
846
854
  type: "button",
847
- className: Fe("dropdown-button", { "icon-reversed": E }),
855
+ className: Pe("dropdown-button", { "icon-reversed": I }),
848
856
  onClick: () => X(),
849
857
  "aria-label": "Toggle dropdown",
850
- "aria-expanded": E,
851
- children: /* @__PURE__ */ r(Le, {})
858
+ "aria-expanded": I,
859
+ children: /* @__PURE__ */ r(Fe, {})
852
860
  }
853
- ) : d,
854
- minLength: a ? 0 : p
861
+ ) : c,
862
+ minLength: i ? 0 : p
855
863
  })
856
864
  }
857
865
  ),
858
- !O && k
866
+ !$ && M
859
867
  ] }),
860
- O && Ge(k, O)
868
+ $ && Ge(M, $)
861
869
  ] });
862
870
  }
863
871
  }
@@ -865,9 +873,9 @@ const Ve = "_disabled_1rpph_43", et = "_input_1rpph_107", tt = {
865
873
  };
866
874
  export {
867
875
  $e as AutocompleteMenu,
868
- Ae as AutocompleteOption,
869
- vt as AutocompleteOptions,
870
- it as AutocompletePrompt,
871
- co as MultipleAutocomplete,
872
- io as SingleAutocomplete
876
+ Re as AutocompleteOption,
877
+ yt as AutocompleteOptions,
878
+ dt as AutocompletePrompt,
879
+ ao as MultipleAutocomplete,
880
+ uo as SingleAutocomplete
873
881
  };