@epam/statgpt-ui-components 0.2.0-rc.8 → 0.2.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.
package/index.mjs CHANGED
@@ -1,435 +1,484 @@
1
- import { jsx as t, jsxs as l, Fragment as Y } from "react/jsx-runtime";
2
- import { useEffect as k, useRef as j, useCallback as C, useState as P, useMemo as z } from "react";
3
- import h from "classnames";
4
- import { IconX as X, IconCalendarEvent as Z, IconChevronDown as B } from "@tabler/icons-react";
5
- import J from "react-flatpickr";
6
- import { CalendarResolution as S } from "@epam/statgpt-shared-toolkit";
7
- import { useFloating as I, useRole as K, useDismiss as G, useInteractions as H, FloatingPortal as V, FloatingOverlay as D, FloatingFocusManager as M, autoUpdate as nn, offset as en, flip as rn, shift as cn, useClick as tn } from "@floating-ui/react";
8
- const q = () => /* @__PURE__ */ t("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ t("div", { className: "loader" }) }), T = ({
9
- title: n,
10
- btnClassNames: e,
11
- iconWidth: c,
12
- iconHeight: r,
13
- onClick: o
14
- }) => /* @__PURE__ */ t(
1
+ import { jsx as r, jsxs as o, Fragment as Y } from "react/jsx-runtime";
2
+ import { useEffect as _, useState as A, useRef as P, useCallback as L, useMemo as D, createContext as j, useContext as G } from "react";
3
+ import m from "classnames";
4
+ import { IconX as K, IconCalendarEvent as ee, IconChevronDown as te } from "@tabler/icons-react";
5
+ import { extendTailwindMerge as ne } from "tailwind-merge";
6
+ import re from "react-flatpickr";
7
+ import { CalendarResolution as k } from "@epam/statgpt-shared-toolkit";
8
+ import { useFloating as $, useRole as le, useDismiss as H, useInteractions as B, FloatingPortal as se, FloatingOverlay as ae, FloatingFocusManager as oe, autoUpdate as ce, offset as ie, flip as de, shift as ue, useClick as me } from "@floating-ui/react";
9
+ const U = () => /* @__PURE__ */ r("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ r("div", { className: "loader" }) }), W = ({
10
+ title: e,
11
+ btnClassNames: t,
12
+ iconWidth: n,
13
+ iconHeight: l,
14
+ onClick: s
15
+ }) => /* @__PURE__ */ r(
15
16
  "button",
16
17
  {
17
18
  type: "button",
18
19
  "aria-label": "button",
19
- className: e,
20
- title: n,
21
- onClick: o,
22
- children: /* @__PURE__ */ t(X, { height: r || 20, width: c || 20 })
20
+ className: t,
21
+ title: e,
22
+ onClick: s,
23
+ children: /* @__PURE__ */ r(K, { height: l || 20, width: n || 20 })
23
24
  }
24
25
  );
25
- var E = /* @__PURE__ */ ((n) => (n.ERROR = "error", n.SUCCESS = "success", n.IN_PROGRESS = "in_progress", n))(E || {});
26
- const bn = ({
27
- alertDetails: n,
28
- successIcon: e,
29
- errorIcon: c,
30
- onClose: r,
31
- closeButtonTitle: o
26
+ var y = /* @__PURE__ */ ((e) => (e.ERROR = "error", e.SUCCESS = "success", e.IN_PROGRESS = "in_progress", e))(y || {});
27
+ const Oe = ({
28
+ alertDetails: e,
29
+ successIcon: t,
30
+ errorIcon: n,
31
+ onClose: l,
32
+ closeButtonTitle: s
32
33
  }) => {
33
- const a = () => (n == null ? void 0 : n.type) === E.IN_PROGRESS ? "alert-in-progress" : (n == null ? void 0 : n.type) === E.SUCCESS ? "alert-success" : "alert-error";
34
- return k(() => {
35
- (n == null ? void 0 : n.type) !== E.IN_PROGRESS && setTimeout(() => {
36
- r == null || r();
34
+ const a = () => e?.type === y.IN_PROGRESS ? "alert-in-progress" : e?.type === y.SUCCESS ? "alert-success" : "alert-error";
35
+ return _(() => {
36
+ e?.type !== y.IN_PROGRESS && setTimeout(() => {
37
+ l?.();
37
38
  }, 5e3);
38
- }, [n == null ? void 0 : n.type, r]), /* @__PURE__ */ t(
39
+ }, [e?.type, l]), /* @__PURE__ */ r(
39
40
  "div",
40
41
  {
41
- className: h(
42
+ className: m(
42
43
  "alert alert-shadow fixed bottom-3 right-3 z-10",
43
44
  a()
44
45
  ),
45
- children: /* @__PURE__ */ l("div", { className: "alert-content flex items-start", children: [
46
- /* @__PURE__ */ t("div", { className: "alert-icon", children: (n == null ? void 0 : n.type) === E.IN_PROGRESS ? /* @__PURE__ */ t(q, {}) : (n == null ? void 0 : n.type) === E.SUCCESS ? e : c }),
47
- /* @__PURE__ */ l("div", { className: "flex flex-col gap-2 max-w-[300px]", children: [
48
- /* @__PURE__ */ t("h3", { className: "truncate", children: n == null ? void 0 : n.title }),
49
- (n == null ? void 0 : n.text) && /* @__PURE__ */ t("div", { className: "alert-text truncate", title: n == null ? void 0 : n.text, children: n == null ? void 0 : n.text })
46
+ children: /* @__PURE__ */ o("div", { className: "alert-content flex items-start", children: [
47
+ /* @__PURE__ */ r("div", { className: "alert-icon", children: e?.type === y.IN_PROGRESS ? /* @__PURE__ */ r(U, {}) : e?.type === y.SUCCESS ? t : n }),
48
+ /* @__PURE__ */ o("div", { className: "flex flex-col gap-2 max-w-[300px]", children: [
49
+ /* @__PURE__ */ r("h3", { className: "truncate", children: e?.title }),
50
+ e?.text && /* @__PURE__ */ r("div", { className: "alert-text truncate", title: e?.text, children: e?.text })
50
51
  ] }),
51
- /* @__PURE__ */ t(T, { title: o, onClick: r })
52
+ /* @__PURE__ */ r(W, { title: s, onClick: l })
52
53
  ] })
53
54
  }
54
55
  );
55
- }, xn = ({
56
- buttonClassName: n,
57
- isLoading: e = !1,
58
- title: c,
59
- disabled: r,
60
- iconAfter: o,
61
- iconBefore: a,
56
+ }, he = ne({
57
+ extend: {
58
+ classGroups: {
59
+ typography: [
60
+ "h1",
61
+ "h2",
62
+ "h3",
63
+ "h4",
64
+ "h5",
65
+ "body-1",
66
+ "body-2",
67
+ "body-3",
68
+ "caption"
69
+ ]
70
+ }
71
+ }
72
+ });
73
+ function v(...e) {
74
+ return he(m(...e));
75
+ }
76
+ const pe = ({
77
+ buttonClassName: e,
78
+ textClassName: t,
79
+ isLoading: n = !1,
80
+ title: l,
81
+ disabled: s,
82
+ iconAfter: a,
83
+ iconBefore: c,
62
84
  onClick: u,
63
85
  isSmallButton: d
64
86
  }) => {
65
- const s = h(
87
+ const h = v([
66
88
  d ? "font-semibold" : "",
67
- o ? "mr-2" : "",
68
- a ? "ml-2" : ""
69
- );
70
- return /* @__PURE__ */ l(
89
+ a ? "mr-2" : "",
90
+ c ? "ml-2" : "",
91
+ t
92
+ ]);
93
+ return /* @__PURE__ */ o(
71
94
  "button",
72
95
  {
73
96
  type: "button",
74
- className: h(
97
+ className: m(
75
98
  "base-button",
76
- n,
99
+ e,
77
100
  d ? "small-button" : ""
78
101
  ),
79
- disabled: r || e,
102
+ disabled: s || n,
80
103
  "aria-label": "button",
81
- onClick: (m) => u == null ? void 0 : u(m),
82
- title: c,
104
+ onClick: (f) => u?.(f),
105
+ title: l,
83
106
  children: [
84
- a,
85
- e && /* @__PURE__ */ t(q, {}),
86
- c ? d ? /* @__PURE__ */ t("h4", { className: s, children: c }) : /* @__PURE__ */ t("h3", { className: s, children: c }) : null,
87
- o
107
+ c,
108
+ n && /* @__PURE__ */ r(U, {}),
109
+ l ? d ? /* @__PURE__ */ r("h4", { className: h, children: l }) : /* @__PURE__ */ r("h3", { className: h, children: l }) : null,
110
+ a
88
111
  ]
89
112
  }
90
113
  );
91
- }, Nn = ({
92
- label: n,
93
- onChange: e,
94
- value: c,
95
- options: r,
96
- calendarResolution: o = S.DAY,
114
+ };
115
+ function fe(e = 719) {
116
+ const [t, n] = A(
117
+ () => typeof window < "u" ? window.innerWidth < e : !1
118
+ );
119
+ return _(() => {
120
+ const l = window.matchMedia(`(max-width: ${e}px)`), s = (a) => {
121
+ n(a.matches);
122
+ };
123
+ return n(l.matches), l.addEventListener("change", s), () => l.removeEventListener("change", s);
124
+ }, [e]), t;
125
+ }
126
+ function Te(e, t) {
127
+ const n = P(null);
128
+ return L(
129
+ (...s) => {
130
+ n.current && clearTimeout(n.current), n.current = setTimeout(() => {
131
+ e(...s);
132
+ }, t);
133
+ },
134
+ [e, t]
135
+ );
136
+ }
137
+ const Pe = 24, De = 24, M = 1e3, xe = 24, Me = ({
138
+ label: e,
139
+ onChange: t,
140
+ value: n,
141
+ options: l,
142
+ calendarResolution: s = k.DAY,
97
143
  id: a,
98
- icon: u
144
+ icon: c,
145
+ isEndDate: u
99
146
  }) => {
100
- var N;
101
- const d = j(null);
102
- k(() => {
103
- var w;
104
- const b = d == null ? void 0 : d.current;
105
- b && ((w = b.querySelector("input")) == null || w.setAttribute("aria-label", n));
106
- }, [n]);
107
- const s = {
108
- ...r,
109
- defaultDate: o === S.MONTH ? new Date(c.getFullYear(), c.getMonth()) : c
110
- }, m = (b, w, y) => {
111
- const x = `calendar__${o === S.MONTH ? "month" : "day"}`;
112
- y.calendarContainer && y.calendarContainer.classList.add(x);
113
- }, i = (b, w, y) => {
114
- if (o === S.MONTH && b.length > 0) {
115
- const x = r.minDate, p = r.maxDate, f = b[0].getFullYear(), F = y.calendarContainer, _ = "flatpickr-disabled", $ = F.querySelectorAll(
147
+ const d = P(null), h = fe();
148
+ _(() => {
149
+ const x = d?.current;
150
+ x && x.querySelector("input")?.setAttribute("aria-label", e);
151
+ }, [e]);
152
+ const f = {
153
+ ...l,
154
+ disableMobile: !0,
155
+ defaultDate: s === k.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n
156
+ }, g = (x, E, b) => {
157
+ const i = `calendar__${s === k.MONTH ? "month" : "day"}`;
158
+ b.calendarContainer && b.calendarContainer.classList.add(i);
159
+ }, N = (x, E, b) => {
160
+ if (s === k.MONTH && x.length > 0) {
161
+ const i = l.minDate, p = l.maxDate, C = x[0].getFullYear(), R = b.calendarContainer, F = "flatpickr-disabled", V = R.querySelectorAll(
116
162
  ".flatpickr-monthSelect-month"
117
- ), A = F.querySelectorAll(
163
+ ), z = R.querySelectorAll(
118
164
  ".flatpickr-next-month"
119
- )[0], W = F.querySelectorAll(
165
+ )[0], X = R.querySelectorAll(
120
166
  ".flatpickr-prev-month"
121
167
  )[0];
122
- f === p.getFullYear() && A.classList.add(_), f === x.getFullYear() && W.classList.add(_), (f === x.getFullYear() || f === p.getFullYear()) && $.forEach((L) => {
123
- L.classList.remove(_);
124
- const v = new Date(L.getAttribute("aria-label")), Q = v.getFullYear() === x.getFullYear() && v.getMonth() === x.getMonth(), U = v.getFullYear() === p.getFullYear() && v.getMonth() === p.getMonth();
125
- Q || U || (v < x || v > p) && L.classList.add(_);
168
+ C === p.getFullYear() && z.classList.add(F), C === i.getFullYear() && X.classList.add(F), (C === i.getFullYear() || C === p.getFullYear()) && V.forEach((O) => {
169
+ O.classList.remove(F);
170
+ const w = new Date(O.getAttribute("aria-label")), Z = w.getFullYear() === i.getFullYear() && w.getMonth() === i.getMonth(), J = w.getFullYear() === p.getFullYear() && w.getMonth() === p.getMonth();
171
+ Z || J || (w < i || w > p) && O.classList.add(F);
126
172
  });
127
173
  }
174
+ setTimeout(() => {
175
+ const i = b.calendarContainer, p = b._input?.getBoundingClientRect();
176
+ i && (i.style.top = `${p.top - i.offsetHeight - 8}px`, i.style.width = `${i.style.width}px`, u ? (i.style.right = `${window.innerWidth - p.right - (h ? xe : 0)}px`, i.style.left = "auto") : i.style.left = `${p.left}px`);
177
+ }, 0);
128
178
  };
129
- return /* @__PURE__ */ l("div", { className: "relative calendar", ref: d, children: [
130
- /* @__PURE__ */ t("div", { className: "mb-1 calendar-title", children: n }),
131
- /* @__PURE__ */ t(
179
+ return /* @__PURE__ */ o("div", { className: "relative calendar", ref: d, children: [
180
+ /* @__PURE__ */ r("div", { className: "mb-1 calendar-title", children: e }),
181
+ /* @__PURE__ */ r(
132
182
  "label",
133
183
  {
134
184
  htmlFor: a,
135
185
  className: "absolute cursor-pointer right-[11px] top-[29px]",
136
- children: u || /* @__PURE__ */ t(Z, {})
186
+ children: c || /* @__PURE__ */ r(ee, {})
137
187
  }
138
188
  ),
139
- /* @__PURE__ */ t(
140
- J,
189
+ /* @__PURE__ */ r(
190
+ re,
141
191
  {
142
- defaultValue: (N = o === S.MONTH ? new Date(c.getFullYear(), c.getMonth()) : c) == null ? void 0 : N.toDateString(),
143
- options: s,
144
- onChange: (b) => {
145
- e(b[0]);
192
+ defaultValue: (s === k.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n)?.toDateString(),
193
+ options: f,
194
+ onChange: (x) => {
195
+ t(x[0]);
146
196
  },
147
- onOpen: [i],
148
- onReady: [m],
197
+ onOpen: [N],
198
+ onReady: [g],
149
199
  id: a
150
200
  }
151
201
  )
152
202
  ] });
153
- }, wn = ({
154
- label: n,
155
- id: e,
156
- checked: c,
157
- checkboxIcon: r,
158
- onChange: o
203
+ }, Ye = ({
204
+ label: e,
205
+ id: t,
206
+ checked: n,
207
+ checkboxIcon: l,
208
+ onChange: s
159
209
  }) => {
160
- const a = C(
161
- (u) => {
162
- u.stopPropagation(), o == null || o(e, u.target.checked);
210
+ const a = L(
211
+ (c) => {
212
+ c.stopPropagation(), s?.(t, c.target.checked);
163
213
  },
164
- [o, e]
214
+ [s, t]
165
215
  );
166
- return /* @__PURE__ */ l(
216
+ return /* @__PURE__ */ o(
167
217
  "label",
168
218
  {
169
219
  className: "flex items-center cursor-pointer min-w-0 py-1",
170
- htmlFor: e,
220
+ htmlFor: t,
171
221
  children: [
172
- /* @__PURE__ */ t(
222
+ /* @__PURE__ */ r(
173
223
  "span",
174
224
  {
175
- className: h(
225
+ className: m(
176
226
  "flex justify-center items-center w-4 h-4 mr-2 relative",
177
227
  "checkbox-button"
178
228
  ),
179
- children: c && r
229
+ children: n && l
180
230
  }
181
231
  ),
182
- n && /* @__PURE__ */ t(
232
+ e && /* @__PURE__ */ r(
183
233
  "p",
184
234
  {
185
- className: h(
235
+ className: m(
186
236
  "text-neutrals-1000 flex-1 min-w-0 truncate pr-2",
187
237
  "checkbox-button-text"
188
238
  ),
189
- title: n,
190
- children: n
239
+ title: e,
240
+ children: e
191
241
  }
192
242
  ),
193
- /* @__PURE__ */ t(
243
+ /* @__PURE__ */ r(
194
244
  "input",
195
245
  {
196
246
  type: "checkbox",
197
247
  onChange: a,
198
- id: e,
199
- checked: c,
248
+ id: t,
249
+ checked: n,
200
250
  className: "hidden"
201
251
  }
202
252
  )
203
253
  ]
204
254
  }
205
255
  );
206
- }, yn = ({
207
- title: n,
208
- icon: e,
209
- children: c,
210
- value: r
256
+ }, je = ({
257
+ title: e,
258
+ icon: t,
259
+ children: n,
260
+ value: l
211
261
  }) => {
212
- const [o, a] = P(!1);
213
- return /* @__PURE__ */ l(
262
+ const [s, a] = A(!1);
263
+ return /* @__PURE__ */ o(
214
264
  "div",
215
265
  {
216
- className: `collapsible-block flex flex-col border-t-2 border-neutrals-600 ${o ? "collapsible-block-open" : ""}`,
266
+ className: `collapsible-block flex flex-col border-t-2 border-neutrals-600 ${s ? "collapsible-block-open" : ""}`,
217
267
  children: [
218
- /* @__PURE__ */ l(
268
+ /* @__PURE__ */ o(
219
269
  "div",
220
270
  {
221
271
  className: "collapsible-block-title flex cursor-pointer items-center py-4",
222
- onClick: () => a(!o),
272
+ onClick: () => a(!s),
223
273
  children: [
224
- /* @__PURE__ */ t("div", { className: `${o ? "rotate-180" : ""} transition-transform`, children: e || /* @__PURE__ */ t(B, { className: "w-5 h-5 mr-3" }) }),
225
- /* @__PURE__ */ l("div", { className: "flex flex-1 items-center justify-between", children: [
226
- /* @__PURE__ */ t("span", { children: n }),
227
- r && /* @__PURE__ */ t("p", { className: "body-1 text-neutrals-800", children: r })
274
+ /* @__PURE__ */ r("div", { className: `${s ? "rotate-180" : ""} transition-transform`, children: t || /* @__PURE__ */ r(te, { className: "w-5 h-5 mr-3" }) }),
275
+ /* @__PURE__ */ o("div", { className: "flex flex-1 items-center justify-between", children: [
276
+ /* @__PURE__ */ r("span", { children: e }),
277
+ l && /* @__PURE__ */ r("p", { className: "body-1 text-neutrals-800", children: l })
228
278
  ] })
229
279
  ]
230
280
  }
231
281
  ),
232
- o && /* @__PURE__ */ t("div", { className: "collapsible-block-content pb-4", children: c })
282
+ s && /* @__PURE__ */ r("div", { className: "collapsible-block-content pb-4", children: n })
233
283
  ]
234
284
  }
235
285
  );
236
- }, vn = ({ text: n, highlightText: e }) => {
237
- const c = z(() => {
238
- var u;
239
- const r = [];
240
- if (!e)
241
- return [{ id: 0, text: n, highlight: !1 }];
242
- const o = (e == null ? void 0 : e.toLowerCase()) || "", a = ((u = n == null ? void 0 : n.toLowerCase()) == null ? void 0 : u.split(o)) || "";
243
- for (let d = 0, s = 0; d < (a == null ? void 0 : a.length); d++) {
244
- const m = a == null ? void 0 : a[d], i = m.length;
245
- m !== "" && r.push({
246
- id: r.length,
286
+ }, Ge = ({ text: e, highlightText: t }) => {
287
+ const n = D(() => {
288
+ const l = [];
289
+ if (!t)
290
+ return [{ id: 0, text: e, highlight: !1 }];
291
+ const s = t?.toLowerCase() || "", a = e?.toLowerCase()?.split(s) || "";
292
+ for (let c = 0, u = 0; c < a?.length; c++) {
293
+ const d = a?.[c], h = d.length;
294
+ d !== "" && l.push({
295
+ id: l.length,
247
296
  highlight: !1,
248
- text: n == null ? void 0 : n.substring(
249
- s,
250
- s + i
297
+ text: e?.substring(
298
+ u,
299
+ u + h
251
300
  )
252
- }), s += i, d !== (a == null ? void 0 : a.length) - 1 && (r.push({
253
- id: r.length,
301
+ }), u += h, c !== a?.length - 1 && (l.push({
302
+ id: l.length,
254
303
  highlight: !0,
255
- text: n == null ? void 0 : n.substring(
256
- s,
257
- s + e.length
304
+ text: e?.substring(
305
+ u,
306
+ u + t.length
258
307
  )
259
- }), s += e.length);
308
+ }), u += t.length);
260
309
  }
261
- return r;
262
- }, [e, n]);
263
- return /* @__PURE__ */ t(Y, { children: c.map((r) => /* @__PURE__ */ t(
310
+ return l;
311
+ }, [t, e]);
312
+ return /* @__PURE__ */ r(Y, { children: n.map((l) => /* @__PURE__ */ r(
264
313
  "span",
265
314
  {
266
- className: h((r == null ? void 0 : r.highlight) && "bg-highlight"),
267
- children: r == null ? void 0 : r.text
315
+ className: m(l?.highlight && "bg-highlight"),
316
+ children: l?.text
268
317
  },
269
- r == null ? void 0 : r.id
318
+ l?.id
270
319
  )) });
271
- }, En = ({
272
- icon: n,
273
- onClick: e,
274
- buttonClassName: c,
275
- disabled: r,
276
- title: o,
320
+ }, $e = ({
321
+ icon: e,
322
+ onClick: t,
323
+ buttonClassName: n,
324
+ disabled: l,
325
+ title: s,
277
326
  isBaseIconStyles: a = !0
278
- }) => /* @__PURE__ */ t(
327
+ }) => /* @__PURE__ */ r(
279
328
  "button",
280
329
  {
281
330
  type: "button",
282
- className: h(
331
+ className: m(
283
332
  a && "base-icon-button",
284
- c
333
+ n
285
334
  ),
286
- onClick: (u) => e == null ? void 0 : e(u),
287
- disabled: r,
288
- title: o,
335
+ onClick: (c) => t?.(c),
336
+ disabled: l,
337
+ title: s,
289
338
  "aria-label": "button",
290
- children: n
339
+ children: e
291
340
  }
292
- ), on = ({
293
- value: n,
294
- inputId: e,
295
- placeholder: c = "",
296
- cssClass: r = "",
297
- type: o = "text",
341
+ ), ge = ({
342
+ value: e,
343
+ inputId: t,
344
+ placeholder: n = "",
345
+ cssClass: l = "",
346
+ type: s = "text",
298
347
  disabled: a,
299
- readonly: u,
300
- onChange: d,
301
- onKeyDown: s
348
+ readonly: c,
349
+ onChange: u,
350
+ onKeyDown: d
302
351
  }) => {
303
- const m = h(
352
+ const h = m(
304
353
  "truncate outline-none shadow-none body-1",
305
- r,
306
- u ? "pointer-events-none" : ""
354
+ l,
355
+ c ? "pointer-events-none" : ""
307
356
  );
308
- return /* @__PURE__ */ t(
357
+ return /* @__PURE__ */ r(
309
358
  "input",
310
359
  {
311
- type: o,
360
+ type: s,
312
361
  autoComplete: "off",
313
- id: e,
314
- placeholder: c,
315
- value: n || "",
316
- title: n ? String(n) : "",
362
+ id: t,
363
+ placeholder: n,
364
+ value: e || "",
365
+ title: e ? String(e) : "",
317
366
  disabled: a,
318
- className: m,
319
- onKeyDown: s,
320
- onChange: (i) => d == null ? void 0 : d(i.currentTarget.value)
367
+ className: h,
368
+ onKeyDown: d,
369
+ onChange: (f) => u?.(f.currentTarget.value)
321
370
  }
322
371
  );
323
- }, Fn = ({
324
- iconBeforeInput: n,
325
- iconAfterInput: e,
326
- containerClasses: c,
327
- cssClass: r,
328
- ...o
329
- }) => /* @__PURE__ */ l("div", { className: h("input w-full flex flex-row", c), children: [
330
- n,
331
- /* @__PURE__ */ t(
332
- on,
372
+ }, He = ({
373
+ iconBeforeInput: e,
374
+ iconAfterInput: t,
375
+ containerClasses: n,
376
+ cssClass: l,
377
+ ...s
378
+ }) => /* @__PURE__ */ o("div", { className: m("input w-full flex flex-row", n), children: [
379
+ e,
380
+ /* @__PURE__ */ r(
381
+ ge,
333
382
  {
334
- cssClass: h(
383
+ cssClass: m(
335
384
  "border-0 bg-transparent p-0 h-full shadow-none flex-1 min-w-0 rounded-none",
336
- r
385
+ l
337
386
  ),
338
- ...o
387
+ ...s
339
388
  }
340
389
  ),
341
- e
342
- ] }), Sn = ({
343
- url: n,
344
- title: e,
345
- linkClassName: c = "",
346
- iconBefore: r,
347
- iconAfter: o
390
+ t
391
+ ] }), Be = ({
392
+ url: e,
393
+ title: t,
394
+ linkClassName: n = "",
395
+ iconBefore: l,
396
+ iconAfter: s
348
397
  }) => {
349
- const a = h(
350
- o ? "mr-2" : "",
351
- r ? "ml-2" : ""
398
+ const a = m(
399
+ s ? "mr-2" : "",
400
+ l ? "ml-2" : ""
352
401
  );
353
- return /* @__PURE__ */ l(
402
+ return /* @__PURE__ */ o(
354
403
  "a",
355
404
  {
356
- href: n,
405
+ href: e,
357
406
  target: "_blank",
358
407
  rel: "noopener noreferrer",
359
- className: h("base-link", c),
360
- title: e,
408
+ className: m("base-link", n),
409
+ title: t,
361
410
  children: [
362
- r,
363
- /* @__PURE__ */ t("span", { className: a, children: e }),
364
- o
411
+ l,
412
+ /* @__PURE__ */ r("span", { className: a, children: t }),
413
+ s
365
414
  ]
366
415
  }
367
416
  );
368
- }, Rn = ({ title: n, text: e, onClick: c }) => /* @__PURE__ */ t(
417
+ }, Ue = ({ title: e, text: t, onClick: n }) => /* @__PURE__ */ r(
369
418
  "button",
370
419
  {
371
420
  type: "button",
372
421
  className: "tag flex items-center justify-center",
373
- onClick: () => c == null ? void 0 : c(e || n),
422
+ onClick: () => n?.(t || e),
374
423
  "aria-label": "button",
375
- children: /* @__PURE__ */ t("h4", { children: n })
424
+ children: /* @__PURE__ */ r("h4", { children: e })
376
425
  }
377
- ), _n = ({
378
- label: n,
379
- id: e,
380
- checked: c,
381
- radioIcon: r,
382
- description: o,
426
+ ), We = ({
427
+ label: e,
428
+ id: t,
429
+ checked: n,
430
+ radioIcon: l,
431
+ description: s,
383
432
  onChange: a
384
433
  }) => {
385
- const u = C(
386
- (d) => {
387
- d.stopPropagation(), a == null || a(e, d.target.checked);
434
+ const c = L(
435
+ (u) => {
436
+ u.stopPropagation(), a?.(t, u.target.checked);
388
437
  },
389
- [a, e]
438
+ [a, t]
390
439
  );
391
- return /* @__PURE__ */ l(
440
+ return /* @__PURE__ */ o(
392
441
  "label",
393
442
  {
394
443
  className: "flex flex-col cursor-pointer min-w-0 py-[6px]",
395
- htmlFor: e,
444
+ htmlFor: t,
396
445
  children: [
397
- /* @__PURE__ */ l("p", { className: "radio-label flex items-center min-w-0", children: [
398
- /* @__PURE__ */ t(
446
+ /* @__PURE__ */ o("p", { className: "radio-label flex items-center min-w-0", children: [
447
+ /* @__PURE__ */ r(
399
448
  "span",
400
449
  {
401
- className: h(
450
+ className: m(
402
451
  "flex justify-center items-center w-4 h-4 mr-2 relative",
403
452
  "radio-button",
404
- c ? "radio-button-active" : ""
453
+ n ? "radio-button-active" : ""
405
454
  ),
406
- children: c && r
455
+ children: n && l
407
456
  }
408
457
  ),
409
- n && /* @__PURE__ */ t(
458
+ e && /* @__PURE__ */ r(
410
459
  "span",
411
460
  {
412
461
  className: "radio-title body-1 text-neutrals-1000 flex-1 min-w-0 truncate pr-2",
413
- title: n,
414
- children: n
462
+ title: e,
463
+ children: e
415
464
  }
416
465
  )
417
466
  ] }),
418
- o && /* @__PURE__ */ t(
467
+ s && /* @__PURE__ */ r(
419
468
  "span",
420
469
  {
421
470
  className: "radio-description ml-6 text-neutrals-800 body-2 w-auto flex items-center",
422
- title: o,
423
- children: o
471
+ title: s,
472
+ children: s
424
473
  }
425
474
  ),
426
- /* @__PURE__ */ t(
475
+ /* @__PURE__ */ r(
427
476
  "input",
428
477
  {
429
478
  type: "radio",
430
- onChange: u,
431
- id: e,
432
- checked: c,
479
+ onChange: c,
480
+ id: t,
481
+ checked: n,
433
482
  className: "hidden"
434
483
  }
435
484
  )
@@ -437,242 +486,345 @@ const bn = ({
437
486
  }
438
487
  );
439
488
  };
440
- var R = /* @__PURE__ */ ((n) => (n.Closed = "Closed", n.Opened = "Opened", n))(R || {}), O = /* @__PURE__ */ ((n) => (n.LG = "Large", n.SM = "Small", n))(O || {});
441
- const an = ({
442
- portalId: n,
443
- state: e = R.Opened,
444
- heading: c,
445
- size: r,
446
- onClose: o,
489
+ var S = /* @__PURE__ */ ((e) => (e.Closed = "Closed", e.Opened = "Opened", e))(S || {}), T = /* @__PURE__ */ ((e) => (e.LG = "Large", e.SM = "Small", e))(T || {});
490
+ const be = ({
491
+ portalId: e,
492
+ state: t = S.Opened,
493
+ heading: n,
494
+ size: l,
495
+ onClose: s,
447
496
  children: a,
448
- overlayClassName: u,
449
- containerClassName: d,
450
- dividers: s = !0,
451
- closeButtonTitle: m
497
+ overlayClassName: c,
498
+ containerClassName: u,
499
+ dividers: d = !0,
500
+ closeButtonTitle: h
452
501
  }) => {
453
- const { refs: i, context: N } = I({
454
- open: e !== R.Closed && !!e,
455
- onOpenChange: o
456
- }), b = K(N, { role: "dialog" }), w = G(N, { outsidePress: !0 }), { getFloatingProps: y } = H([b, w]), x = C(
457
- (p) => {
458
- p == null || p.preventDefault(), p == null || p.stopPropagation(), o();
502
+ const { refs: f, context: g } = $({
503
+ open: t !== S.Closed && !!t,
504
+ onOpenChange: s
505
+ }), N = le(g, { role: "dialog" }), x = H(g, { outsidePress: !0 }), { getFloatingProps: E } = B([N, x]), b = L(
506
+ (i) => {
507
+ i?.preventDefault(), i?.stopPropagation(), s();
459
508
  },
460
- [o]
509
+ [s]
461
510
  );
462
- return /* @__PURE__ */ t(V, { id: n, children: e !== R.Closed && /* @__PURE__ */ t(
463
- D,
511
+ return /* @__PURE__ */ r(se, { id: e, children: t !== S.Closed && /* @__PURE__ */ r(
512
+ ae,
464
513
  {
465
- className: h(
514
+ className: m(
466
515
  "z-modal flex items-center justify-center bg-blackout p-4",
467
- u
516
+ c
468
517
  ),
469
- children: /* @__PURE__ */ t(M, { context: N, children: /* @__PURE__ */ l(
518
+ children: /* @__PURE__ */ r(oe, { context: g, children: /* @__PURE__ */ o(
470
519
  "div",
471
520
  {
472
- className: h(
521
+ className: m(
473
522
  "relative max-h-full modal rounded bg-white flex flex-col shadow w-full",
474
- r === O.LG && "max-w-[65%]",
475
- r === O.SM && "max-w-[30%]",
476
- s && "divide-neutrals-400 divide-y",
477
- d,
523
+ l === T.LG && "max-w-[65%]",
524
+ l === T.SM && "max-w-[30%]",
525
+ d && "divide-neutrals-400 divide-y",
526
+ u,
478
527
  "sm:w-full sm:max-w-full sm:px-4 sm:py-6"
479
528
  ),
480
- ref: i.setFloating,
481
- ...y({
482
- onClick(p) {
483
- p.stopPropagation();
529
+ ref: f.setFloating,
530
+ ...E({
531
+ onClick(i) {
532
+ i.stopPropagation();
484
533
  }
485
534
  }),
486
535
  children: [
487
- /* @__PURE__ */ l("div", { className: "flex flex-row justify-between py-3 px-6 items-center mb-2 modal-heading sm:p-0 sm:pb-2", children: [
488
- c && (typeof c == "string" ? /* @__PURE__ */ t("h2", { className: "flex-1 min-w-0 mr-3 modal-heading-title sm:h3", children: c }) : c),
489
- /* @__PURE__ */ t(
490
- T,
536
+ /* @__PURE__ */ o("div", { className: "flex flex-row justify-between py-3 px-6 items-center mb-2 modal-heading sm:p-0 sm:pb-2", children: [
537
+ n && (typeof n == "string" ? /* @__PURE__ */ r("h2", { className: "flex-1 min-w-0 mr-3 modal-heading-title sm:h3", children: n }) : n),
538
+ /* @__PURE__ */ r(
539
+ W,
491
540
  {
492
- title: m,
493
- onClick: x,
541
+ title: h,
542
+ onClick: b,
494
543
  btnClassNames: "sm:h-[24px] sm:w-[24px] sm:top-4"
495
544
  }
496
545
  )
497
546
  ] }),
498
- a.map((p) => p)
547
+ a.map((i) => i)
499
548
  ]
500
549
  }
501
550
  ) })
502
551
  }
503
552
  ) });
504
- }, Cn = (n) => n.state === R.Closed ? null : /* @__PURE__ */ t(an, { ...n }), Ln = ({
505
- triggerButton: n,
506
- options: e,
507
- content: c,
508
- selectedOption: r,
509
- disabled: o,
553
+ }, qe = (e) => e.state === S.Closed ? null : /* @__PURE__ */ r(be, { ...e }), Qe = ({
554
+ triggerButton: e,
555
+ options: t,
556
+ content: n,
557
+ selectedOption: l,
558
+ disabled: s,
510
559
  containerClassName: a,
511
- openedClassName: u,
512
- onOptionSelect: d
560
+ openedClassName: c,
561
+ onOptionSelect: u
513
562
  }) => {
514
- const [s, m] = P(!1), { refs: i, floatingStyles: N, context: b } = I({
515
- open: s,
516
- onOpenChange: o ? void 0 : m,
563
+ const [d, h] = A(!1), { refs: f, floatingStyles: g, context: N } = $({
564
+ open: d,
565
+ onOpenChange: s ? void 0 : h,
517
566
  placement: "bottom-end",
518
- middleware: [en(8), rn(), cn()],
519
- whileElementsMounted: nn
520
- }), w = tn(b), y = G(b, { outsidePress: !0 }), { getReferenceProps: x, getFloatingProps: p } = H([
521
- w,
522
- y
567
+ middleware: [ie(8), de(), ue()],
568
+ whileElementsMounted: ce
569
+ }), x = me(N), E = H(N, { outsidePress: !0 }), { getReferenceProps: b, getFloatingProps: i } = B([
570
+ x,
571
+ E
523
572
  ]);
524
- return /* @__PURE__ */ l(Y, { children: [
525
- /* @__PURE__ */ t(
573
+ return /* @__PURE__ */ o(Y, { children: [
574
+ /* @__PURE__ */ r(
526
575
  "div",
527
576
  {
528
- ref: i.setReference,
529
- ...x({
530
- onClick(f) {
531
- f.stopPropagation();
577
+ ref: f.setReference,
578
+ ...b({
579
+ onClick(p) {
580
+ p.stopPropagation();
532
581
  }
533
582
  }),
534
- className: h(a, s && u),
535
- children: n
583
+ className: m(a, d && c),
584
+ children: e
536
585
  }
537
586
  ),
538
- s && /* @__PURE__ */ l(
587
+ d && /* @__PURE__ */ o(
539
588
  "div",
540
589
  {
541
- ref: i.setFloating,
542
- style: N,
590
+ ref: f.setFloating,
591
+ style: g,
543
592
  className: "flex flex-col z-10 dropdown-menu-shadow bg-white dropdown-container rounded",
544
- ...p(),
593
+ ...i(),
545
594
  children: [
546
- c && c,
547
- e && e.map((f) => /* @__PURE__ */ t(
595
+ n && n,
596
+ t && t.map((p) => /* @__PURE__ */ r(
548
597
  "div",
549
598
  {
550
- onClick: (F) => {
551
- F.stopPropagation(), d == null || d(f.key), m(!1);
599
+ onClick: (C) => {
600
+ C.stopPropagation(), u?.(p.key), h(!1);
552
601
  },
553
- className: h(
602
+ className: m(
554
603
  "text-neutrals-900 body-3 cursor-pointer dropdown-item min-w-[200px]",
555
- r === f.key && "bg-hues-100"
604
+ l === p.key && "bg-hues-100"
556
605
  ),
557
- children: /* @__PURE__ */ l(
606
+ children: /* @__PURE__ */ o(
558
607
  "div",
559
608
  {
560
609
  className: "p-2 hover:bg-hues-100 h-full dropdown-item-text flex items-center gap-x-2",
561
- title: f.title,
610
+ title: p.title,
562
611
  children: [
563
- f.icon ? f.icon : null,
564
- /* @__PURE__ */ t("p", { children: f == null ? void 0 : f.title })
612
+ p.icon ? p.icon : null,
613
+ /* @__PURE__ */ r("p", { children: p?.title })
565
614
  ]
566
615
  }
567
616
  )
568
617
  },
569
- f.key
618
+ p.key
570
619
  ))
571
620
  ]
572
621
  }
573
622
  )
574
623
  ] });
575
- }, On = ({ limitMessages: n, query: e }) => /* @__PURE__ */ l("div", { className: "bg-hues-100 px-2 py-1 flex justify-between flex-wrap items-center", children: [
576
- /* @__PURE__ */ t("div", { className: "flex gap-x-[4px]", children: /* @__PURE__ */ t("div", { className: "flex flex-col", children: /* @__PURE__ */ l("div", { className: "flex gap-x-[4px]", children: [
577
- /* @__PURE__ */ l("span", { className: "text-primary h5", children: [
578
- n == null ? void 0 : n.excelFormatTitle,
624
+ }, Ve = ({ limitMessages: e, query: t }) => /* @__PURE__ */ o("div", { className: "bg-hues-100 px-2 py-1 flex justify-between flex-wrap items-center", children: [
625
+ /* @__PURE__ */ r("div", { className: "flex gap-x-[4px]", children: /* @__PURE__ */ r("div", { className: "flex flex-col", children: /* @__PURE__ */ o("div", { className: "flex gap-x-[4px]", children: [
626
+ /* @__PURE__ */ o("span", { className: "text-primary h5", children: [
627
+ e?.excelFormatTitle,
579
628
  " "
580
629
  ] }),
581
- /* @__PURE__ */ t("span", { className: "text-neutrals-800 body-3", children: n == null ? void 0 : n.excelFormatText })
630
+ /* @__PURE__ */ r("span", { className: "text-neutrals-800 body-3", children: e?.excelFormatText })
582
631
  ] }) }) }),
583
- /* @__PURE__ */ t("a", { href: e, target: "_blank", children: /* @__PURE__ */ l("span", { className: "flex gap-x-[4px] body-3 cursor-pointer items-center", children: [
584
- n == null ? void 0 : n.dataExplorerIcon,
585
- n == null ? void 0 : n.dataExplorer
632
+ /* @__PURE__ */ r("a", { href: t, target: "_blank", children: /* @__PURE__ */ o("span", { className: "flex gap-x-[4px] body-3 cursor-pointer items-center", children: [
633
+ e?.dataExplorerIcon,
634
+ e?.dataExplorer
586
635
  ] }) })
587
- ] }), g = 1e3, kn = ({
588
- limitMessages: n,
589
- isDownload: e,
590
- showAdvancedViewButton: c,
591
- onAdvancedViewClick: r,
592
- query: o
593
- }) => {
594
- var a, u;
595
- return /* @__PURE__ */ l("div", { className: "bg-accent-300 px-2 py-1 flex justify-between flex-wrap items-center", children: [
596
- /* @__PURE__ */ l("div", { className: "flex gap-x-[4px]", children: [
597
- /* @__PURE__ */ t("span", { children: n == null ? void 0 : n.warningIcon }),
598
- /* @__PURE__ */ l("div", { className: "flex flex-col", children: [
599
- /* @__PURE__ */ l("div", { className: "flex gap-x-[4px]", children: [
600
- /* @__PURE__ */ l("span", { className: "text-primary h5", children: [
601
- n == null ? void 0 : n.largeQuery,
602
- ":",
603
- " "
636
+ ] }), ze = ({
637
+ limitMessages: e,
638
+ isDownload: t,
639
+ showAdvancedViewButton: n,
640
+ onAdvancedViewClick: l,
641
+ query: s
642
+ }) => /* @__PURE__ */ o(
643
+ "div",
644
+ {
645
+ className: m(
646
+ "bg-semantic-warning-light px-2 py-1 flex justify-between flex-wrap items-center",
647
+ e?.containerClassName
648
+ ),
649
+ children: [
650
+ /* @__PURE__ */ o("div", { className: "flex gap-x-2 items-center", children: [
651
+ /* @__PURE__ */ r("span", { children: e?.warningIcon }),
652
+ /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
653
+ /* @__PURE__ */ o("div", { className: "flex gap-x-[4px]", children: [
654
+ /* @__PURE__ */ o(
655
+ "span",
656
+ {
657
+ className: m(
658
+ "text-primary h5",
659
+ e?.largeQueryClassName
660
+ ),
661
+ children: [
662
+ e?.largeQuery,
663
+ ":",
664
+ " "
665
+ ]
666
+ }
667
+ ),
668
+ /* @__PURE__ */ r(
669
+ "span",
670
+ {
671
+ className: m(
672
+ "text-neutrals-800 body-3",
673
+ e?.limitMessageClassName
674
+ ),
675
+ children: t ? e?.downloadMessage?.(M) : e?.showingLimit?.(M)
676
+ }
677
+ )
604
678
  ] }),
605
- /* @__PURE__ */ t("span", { className: "text-neutrals-800 body-3", children: e ? (a = n == null ? void 0 : n.downloadMessage) == null ? void 0 : a.call(n, g) : (u = n == null ? void 0 : n.showingLimit) == null ? void 0 : u.call(n, g) })
606
- ] }),
607
- e && /* @__PURE__ */ t("span", { className: "text-neutrals-800 body-3", children: n == null ? void 0 : n.fullLimitMessage })
608
- ] })
609
- ] }),
610
- c && /* @__PURE__ */ l(
611
- "span",
679
+ t && /* @__PURE__ */ r(
680
+ "span",
681
+ {
682
+ className: m(
683
+ "text-neutrals-800 body-3",
684
+ e?.limitMessageClassName
685
+ ),
686
+ children: e?.fullLimitMessage
687
+ }
688
+ )
689
+ ] })
690
+ ] }),
691
+ n && /* @__PURE__ */ o(
692
+ "span",
693
+ {
694
+ onClick: () => l?.(),
695
+ className: "flex gap-x-[4px] h4 cursor-pointer items-center text-primary",
696
+ children: [
697
+ e?.editIcon,
698
+ e?.refineInAdvancedView
699
+ ]
700
+ }
701
+ ),
702
+ t && /* @__PURE__ */ r("a", { href: s || "", target: "_blank", children: /* @__PURE__ */ o("span", { className: "flex gap-x-[4px] body-3 cursor-pointer items-center", children: [
703
+ e?.dataExplorerIcon,
704
+ e?.dataExplorer
705
+ ] }) })
706
+ ]
707
+ }
708
+ ), q = j(null);
709
+ function Xe({
710
+ value: e,
711
+ children: t
712
+ }) {
713
+ const n = D(() => e ?? {}, [e]);
714
+ return /* @__PURE__ */ r(q.Provider, { value: n, children: t });
715
+ }
716
+ function Ne() {
717
+ return G(q);
718
+ }
719
+ var I = /* @__PURE__ */ ((e) => (e.Info = "info", e.Error = "error", e.Warning = "warning", e))(I || {});
720
+ const Ce = {
721
+ [I.Info]: "border-neutrals-800 bg-neutrals-300 text-neutrals-1000",
722
+ [I.Error]: "border-semantic-error bg-semantic-error-light text-neutrals-1000",
723
+ [I.Warning]: "border-semantic-warning bg-semantic-warning-light text-neutrals-1000"
724
+ }, we = "shrink-0", ye = "min-w-0 body-2", ve = "flex items-start gap-2 min-w-0 border-l-2 rounded py-2 px-4 items-center";
725
+ function Ze({
726
+ type: e,
727
+ icon: t,
728
+ children: n,
729
+ className: l,
730
+ contentClassName: s
731
+ }) {
732
+ const a = Ne(), c = t ?? a?.icons?.[e], u = a?.classes?.container ?? ve, d = a?.classes?.types?.[e] ?? Ce[e], h = v(u, d, l), f = v(we, a?.classes?.icon), g = v(
733
+ ye,
734
+ a?.classes?.content,
735
+ s
736
+ );
737
+ return /* @__PURE__ */ o("div", { "data-type": e, className: h, children: [
738
+ c ? /* @__PURE__ */ r("span", { className: f, children: c }) : null,
739
+ n ? /* @__PURE__ */ r("div", { className: g, children: n }) : null
740
+ ] });
741
+ }
742
+ const Je = ({
743
+ title: e,
744
+ copiedTitle: t,
745
+ tooltip: n,
746
+ icon: l,
747
+ copiedIcon: s,
748
+ className: a,
749
+ buttonTextClassName: c,
750
+ onClick: u
751
+ }) => {
752
+ const [d, h] = A(!1), f = P(null), g = () => {
753
+ u(), h(!0), f.current && clearTimeout(f.current), f.current = setTimeout(() => {
754
+ h(!1);
755
+ }, 1e3);
756
+ };
757
+ return _(() => () => {
758
+ f.current && clearTimeout(f.current);
759
+ }, []), /* @__PURE__ */ o("div", { className: "relative w-fit", children: [
760
+ /* @__PURE__ */ r(
761
+ pe,
612
762
  {
613
- onClick: () => r == null ? void 0 : r(),
614
- className: "flex gap-x-[4px] body-3 cursor-pointer items-center",
615
- children: [
616
- n == null ? void 0 : n.editIcon,
617
- n == null ? void 0 : n.refineInAdvancedView
618
- ]
763
+ title: d ? t : e,
764
+ isSmallButton: !0,
765
+ disabled: d,
766
+ buttonClassName: v([
767
+ "text-button-tertiary small-icon-button !h-6 !p-0",
768
+ a
769
+ ]),
770
+ textClassName: v(["ml-1", c]),
771
+ onClick: g,
772
+ iconBefore: d ? s : l
619
773
  }
620
774
  ),
621
- e && /* @__PURE__ */ t("a", { href: o || "", target: "_blank", children: /* @__PURE__ */ l("span", { className: "flex gap-x-[4px] body-3 cursor-pointer items-center", children: [
622
- n == null ? void 0 : n.dataExplorerIcon,
623
- n == null ? void 0 : n.dataExplorer
624
- ] }) })
775
+ n && d && /* @__PURE__ */ r("div", { className: "absolute left-1/2 top-full z-50 mt-1 -translate-x-1/2 whitespace-nowrap rounded border border-neutrals-400 bg-white px-3 py-4 text-neutrals-900 h4 shadow", children: n })
625
776
  ] });
626
- }, Pn = 24, gn = 24;
627
- function Yn(n = 719) {
628
- const [e, c] = P(
629
- () => typeof window < "u" ? window.innerWidth < n : !1
630
- );
631
- return k(() => {
632
- const r = window.matchMedia(`(max-width: ${n}px)`), o = (a) => {
633
- c(a.matches);
634
- };
635
- return c(r.matches), r.addEventListener("change", o), () => r.removeEventListener("change", o);
636
- }, [n]), e;
777
+ };
778
+ var Ee = /* @__PURE__ */ ((e) => (e.Enter = "Enter", e))(Ee || {});
779
+ const Q = j(null);
780
+ function Ke({
781
+ children: e,
782
+ isAgentAvailable: t
783
+ }) {
784
+ const n = D(() => ({ isAgentAvailable: t }), [t]);
785
+ return /* @__PURE__ */ r(Q.Provider, { value: n, children: e });
637
786
  }
638
- function jn(n, e) {
639
- const c = j(null);
640
- return C(
641
- (...o) => {
642
- c.current && clearTimeout(c.current), c.current = setTimeout(() => {
643
- n(...o);
644
- }, e);
645
- },
646
- [n, e]
647
- );
787
+ function et() {
788
+ const e = G(Q);
789
+ if (!e)
790
+ throw new Error(
791
+ "useAgentAvailability must be used within AgentAvailabilityProvider"
792
+ );
793
+ return e;
648
794
  }
649
- var ln = /* @__PURE__ */ ((n) => (n.Enter = "Enter", n))(ln || {});
650
795
  export {
651
- bn as Alert,
652
- E as AlertType,
653
- xn as Button,
654
- Nn as Calendar,
655
- wn as Checkbox,
656
- T as CloseButton,
657
- yn as CollapsibleBlock,
658
- On as DownloadFormatMessage,
659
- Ln as Dropdown,
660
- vn as HighlightText,
661
- En as IconButton,
662
- on as Input,
663
- Fn as InputWithIcon,
664
- ln as KeyboardKey,
665
- Sn as Link,
666
- q as Loader,
667
- O as PopUpSize,
668
- R as PopUpState,
669
- Cn as Popup,
670
- _n as Radio,
671
- kn as RequestLimitMessage,
672
- g as SERIES_LIMIT,
673
- Pn as TREE_NODE_ARROW_SIZE,
674
- gn as TREE_NODE_PADDING,
675
- Rn as Tag,
676
- jn as useDebounce,
677
- Yn as useIsMobile
796
+ Ke as AgentAvailabilityProvider,
797
+ Oe as Alert,
798
+ y as AlertType,
799
+ pe as Button,
800
+ xe as CALENDAR_MOBILE_PADDING,
801
+ Me as Calendar,
802
+ Ye as Checkbox,
803
+ W as CloseButton,
804
+ je as CollapsibleBlock,
805
+ Je as CopyButton,
806
+ Ve as DownloadFormatMessage,
807
+ Qe as Dropdown,
808
+ Ge as HighlightText,
809
+ $e as IconButton,
810
+ Ze as InlineAlert,
811
+ Xe as InlineAlertProvider,
812
+ I as InlineAlertType,
813
+ ge as Input,
814
+ He as InputWithIcon,
815
+ Ee as KeyboardKey,
816
+ Be as Link,
817
+ U as Loader,
818
+ T as PopUpSize,
819
+ S as PopUpState,
820
+ qe as Popup,
821
+ We as Radio,
822
+ ze as RequestLimitMessage,
823
+ M as SERIES_LIMIT,
824
+ Pe as TREE_NODE_ARROW_SIZE,
825
+ De as TREE_NODE_PADDING,
826
+ Ue as Tag,
827
+ et as useAgentAvailability,
828
+ Te as useDebounce,
829
+ fe as useIsMobile
678
830
  };