bj-web-components 0.2.4 → 0.2.5

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,5 +1,5 @@
1
1
  import { jsx as t, jsxs as l, Fragment as ht } from "react/jsx-runtime";
2
- import { useState as P, useCallback as ct, useLayoutEffect as Et, forwardRef as vt, useRef as G, useEffect as ot, useMemo as dt } from "react";
2
+ import { useState as H, useCallback as ct, useLayoutEffect as vt, forwardRef as It, useRef as R, useEffect as ot, useMemo as dt } from "react";
3
3
  import { createPortal as Mt } from "react-dom";
4
4
  const oe = ({ type: n, style: e, onClick: i, className: c, ...u }) => {
5
5
  const s = c ? `bu-icon ${c}` : "bu-icon";
@@ -8,27 +8,27 @@ const oe = ({ type: n, style: e, onClick: i, className: c, ...u }) => {
8
8
  oe.displayName = "BuIcon";
9
9
  const ce = ["top", "right", "bottom", "left"];
10
10
  function Kt(n) {
11
- const [e, i] = P("top"), [c, u] = P(null), s = ct((r) => {
11
+ const [e, i] = H("top"), [c, u] = H(null), s = ct((r) => {
12
12
  u(r);
13
13
  }, []);
14
- return Et(() => {
14
+ return vt(() => {
15
15
  if (n !== "auto" || !c) return;
16
16
  const r = c.parentElement;
17
17
  if (!r) return;
18
- const p = r.getBoundingClientRect(), C = c.offsetWidth, A = c.offsetHeight, g = 12, a = {
18
+ const p = r.getBoundingClientRect(), f = c.offsetWidth, g = c.offsetHeight, h = 12, a = {
19
19
  top: p.top,
20
20
  right: window.innerWidth - p.right,
21
21
  bottom: window.innerHeight - p.bottom,
22
22
  left: p.left
23
- }, f = {
24
- top: A + g,
25
- right: C + g,
26
- bottom: A + g,
27
- left: C + g
23
+ }, y = {
24
+ top: g + h,
25
+ right: f + h,
26
+ bottom: g + h,
27
+ left: f + h
28
28
  };
29
- for (const E of ce)
30
- if (a[E] >= f[E]) {
31
- i(E);
29
+ for (const b of ce)
30
+ if (a[b] >= y[b]) {
31
+ i(b);
32
32
  return;
33
33
  }
34
34
  i("top");
@@ -44,9 +44,9 @@ function Te({
44
44
  className: r,
45
45
  style: p
46
46
  }) {
47
- const [C, A] = Kt(n), g = ["tooltip-popup", `tooltip-popup--${C}`, r].filter(Boolean).join(" ");
48
- return /* @__PURE__ */ l("div", { ref: A, className: g, style: p, children: [
49
- /* @__PURE__ */ t("div", { className: `tooltip-arrow tooltip-arrow--${C}` }),
47
+ const [f, g] = Kt(n), h = ["tooltip-popup", `tooltip-popup--${f}`, r].filter(Boolean).join(" ");
48
+ return /* @__PURE__ */ l("div", { ref: g, className: h, style: p, children: [
49
+ /* @__PURE__ */ t("div", { className: `tooltip-arrow tooltip-arrow--${f}` }),
50
50
  /* @__PURE__ */ t("p", { className: "tooltip-confirm__title", children: e }),
51
51
  /* @__PURE__ */ l("div", { className: "tooltip-confirm__actions", children: [
52
52
  /* @__PURE__ */ t("button", { className: "tooltip-confirm__cancel", onClick: s, children: c }),
@@ -61,8 +61,8 @@ function Ue({
61
61
  className: c,
62
62
  style: u
63
63
  }) {
64
- const [s, r] = Kt(n), p = Math.min(100, Math.max(0, Math.round(i))), C = ["tooltip-popup", `tooltip-popup--${s}`, c].filter(Boolean).join(" ");
65
- return /* @__PURE__ */ l("div", { ref: r, className: C, style: u, children: [
64
+ const [s, r] = Kt(n), p = Math.min(100, Math.max(0, Math.round(i))), f = ["tooltip-popup", `tooltip-popup--${s}`, c].filter(Boolean).join(" ");
65
+ return /* @__PURE__ */ l("div", { ref: r, className: f, style: u, children: [
66
66
  /* @__PURE__ */ t("div", { className: `tooltip-arrow tooltip-arrow--${s}` }),
67
67
  /* @__PURE__ */ l("div", { className: "tooltip-progress", children: [
68
68
  /* @__PURE__ */ l("div", { className: "tooltip-progress__header", children: [
@@ -96,17 +96,17 @@ function le({
96
96
  `tooltip-popup--${s}`,
97
97
  i !== "default" ? `tooltip-popup--${i}` : "",
98
98
  c
99
- ].filter(Boolean).join(" "), C = [
99
+ ].filter(Boolean).join(" "), f = [
100
100
  "tooltip-arrow",
101
101
  `tooltip-arrow--${s}`,
102
102
  i === "tinted" ? "tooltip-arrow--tinted-bg" : ""
103
103
  ].filter(Boolean).join(" ");
104
104
  return /* @__PURE__ */ l("div", { ref: r, className: p, style: u, children: [
105
- /* @__PURE__ */ t("div", { className: C }),
105
+ /* @__PURE__ */ t("div", { className: f }),
106
106
  /* @__PURE__ */ t("p", { className: "bu-tooltip-content__text", children: e })
107
107
  ] });
108
108
  }
109
- const Ht = vt(
109
+ const Ht = It(
110
110
  ({ children: n, style: e, className: i }, c) => {
111
111
  const u = ["tooltip-wrapper", i].filter(Boolean).join(" ");
112
112
  return /* @__PURE__ */ t("div", { ref: c, className: u, style: e, children: n });
@@ -138,7 +138,7 @@ function Ae() {
138
138
  function ge(n, e) {
139
139
  return (typeof n.label == "string" ? n.label : n.value).toLowerCase().includes(e.toLowerCase());
140
140
  }
141
- function Ce({ text: n, keyword: e }) {
141
+ function fe({ text: n, keyword: e }) {
142
142
  if (!e) return /* @__PURE__ */ t(ht, { children: n });
143
143
  const i = n.toLowerCase().indexOf(e.toLowerCase());
144
144
  if (i === -1) return /* @__PURE__ */ t(ht, { children: n });
@@ -158,77 +158,77 @@ function Ye({
158
158
  onLangChange: s,
159
159
  showBody: r = !0,
160
160
  error: p = !1,
161
- onDelete: C,
162
- onPreviewImage: A,
163
- onDeleteImage: g,
161
+ onDelete: f,
162
+ onPreviewImage: g,
163
+ onDeleteImage: h,
164
164
  onUpload: a,
165
- onAssociate: f,
166
- images: E,
167
- labels: v,
168
- inputEvents: O,
169
- className: W,
170
- style: _,
171
- options: j,
172
- optionFilterProp: B,
173
- onSelect: D,
174
- onSearch: H,
175
- open: Y,
176
- onDropdownVisibleChange: L
165
+ onAssociate: y,
166
+ images: b,
167
+ labels: I,
168
+ inputEvents: G,
169
+ className: q,
170
+ style: X,
171
+ options: S,
172
+ optionFilterProp: N,
173
+ onSelect: k,
174
+ onSearch: P,
175
+ open: T,
176
+ onDropdownVisibleChange: D
177
177
  }) {
178
- const Z = (v == null ? void 0 : v.namePlaceholder) ?? "请填写产品名称", T = (v == null ? void 0 : v.uploadLocal) ?? "本地上传", S = (v == null ? void 0 : v.associateImage) ?? "关联图片", y = G(null), m = G(null), N = G(null), w = G(null), [b, Q] = P([]), [q, X] = P(!1), [$, x] = P(!1), [rt, F] = P(!1), tt = Array.isArray(j) && j.length > 0, et = Y !== void 0 ? Y : tt && $, st = tt ? e ? j.filter(
179
- (o) => B ? B(o, e) : ge(o, e)
180
- ) : j : [];
178
+ const W = (I == null ? void 0 : I.namePlaceholder) ?? "请填写产品名称", U = (I == null ? void 0 : I.uploadLocal) ?? "本地上传", V = (I == null ? void 0 : I.associateImage) ?? "关联图片", _ = R(null), $ = R(null), Z = R(null), w = R(null), [v, C] = H([]), [E, j] = H(!1), [L, M] = H(!1), [et, O] = H(!1), F = Array.isArray(S) && S.length > 0, nt = T !== void 0 ? T : F && L, st = F ? e ? S.filter(
179
+ (o) => N ? N(o, e) : ge(o, e)
180
+ ) : S : [];
181
181
  ot(() => {
182
- if (!q) return;
183
- function o(I) {
184
- m.current && !m.current.contains(I.target) && X(!1);
182
+ if (!E) return;
183
+ function o(m) {
184
+ $.current && !$.current.contains(m.target) && j(!1);
185
185
  }
186
186
  return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
187
- }, [q]), ot(() => {
188
- if (!et) return;
189
- function o(I) {
190
- var U, V;
191
- const M = I.target;
192
- (U = N.current) != null && U.contains(M) || (V = w.current) != null && V.contains(M) || (x(!1), L == null || L(!1));
187
+ }, [E]), ot(() => {
188
+ if (!nt) return;
189
+ function o(m) {
190
+ var Y, tt;
191
+ const K = m.target;
192
+ (Y = Z.current) != null && Y.contains(K) || (tt = w.current) != null && tt.contains(K) || (M(!1), D == null || D(!1));
193
193
  }
194
194
  return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
195
- }, [et, L]);
196
- const J = E ?? b;
197
- async function nt(o) {
198
- var M;
199
- const I = (M = o.target.files) == null ? void 0 : M[0];
200
- if (I) {
201
- o.target.value = "", X(!1), F(!0);
195
+ }, [nt, D]);
196
+ const x = b ?? v;
197
+ async function it(o) {
198
+ var K;
199
+ const m = (K = o.target.files) == null ? void 0 : K[0];
200
+ if (m) {
201
+ o.target.value = "", j(!1), O(!0);
202
202
  try {
203
203
  if (a) {
204
- const U = await a(I);
205
- U && E === void 0 && Q((V) => [...V, U]);
204
+ const Y = await a(m);
205
+ Y && b === void 0 && C((tt) => [...tt, Y]);
206
206
  } else {
207
- const U = URL.createObjectURL(I);
208
- Q((V) => [...V, U]);
207
+ const Y = URL.createObjectURL(m);
208
+ C((tt) => [...tt, Y]);
209
209
  }
210
210
  } finally {
211
- F(!1);
211
+ O(!1);
212
212
  }
213
213
  }
214
214
  }
215
215
  function lt() {
216
216
  var o;
217
- (o = y.current) == null || o.click();
217
+ (o = _.current) == null || o.click();
218
218
  }
219
- function h() {
220
- X(!1), f == null || f();
219
+ function A() {
220
+ j(!1), y == null || y();
221
221
  }
222
- const R = [
222
+ const J = [
223
223
  "sku-input-card",
224
224
  p && "sku-input-card--error",
225
- W
226
- ].filter(Boolean).join(" "), k = [
225
+ q
226
+ ].filter(Boolean).join(" "), Q = [
227
227
  "sku-input-card__name-input",
228
228
  c === "bilingual" && "sku-input-card__name-input--with-toggle",
229
229
  p && "sku-input-card__name-input--error"
230
230
  ].filter(Boolean).join(" ");
231
- return /* @__PURE__ */ l("div", { className: R, style: _, children: [
231
+ return /* @__PURE__ */ l("div", { className: J, style: X, children: [
232
232
  /* @__PURE__ */ t("span", { className: "sku-input-card__drag", id: n, children: /* @__PURE__ */ t(ue, {}) }),
233
233
  /* @__PURE__ */ l("div", { className: "sku-input-card__main", children: [
234
234
  /* @__PURE__ */ l("div", { className: "sku-input-card__header", children: [
@@ -236,23 +236,23 @@ function Ye({
236
236
  /* @__PURE__ */ t(
237
237
  "input",
238
238
  {
239
- className: k,
239
+ className: Q,
240
240
  value: e,
241
241
  onChange: (o) => {
242
- i == null || i(o.target.value), H == null || H(o.target.value);
242
+ i == null || i(o.target.value), P == null || P(o.target.value);
243
243
  },
244
244
  onFocus: () => {
245
- tt && Y === void 0 && (x(!0), L == null || L(!0));
245
+ F && T === void 0 && (M(!0), D == null || D(!0));
246
246
  },
247
- placeholder: Z,
248
- ...O
247
+ placeholder: W,
248
+ ...G
249
249
  }
250
250
  ),
251
- et && st.length > 0 && /* 绝对定位锚定在 name-wrap(position: relative)下方,随输入框跟随滚动/视口变化。
251
+ nt && st.length > 0 && /* 绝对定位锚定在 name-wrap(position: relative)下方,随输入框跟随滚动/视口变化。
252
252
  不再用 portal + position:fixed + getBoundingClientRect 定位:iOS 软键盘弹出时
253
253
  fixed 与 getBoundingClientRect 的视口基准不一致,会导致下拉框位置偏移。 */
254
- /* @__PURE__ */ t("div", { className: "sku-input-card__dropdown", ref: N, children: /* @__PURE__ */ t("div", { className: "sku-input-card__dropdown-list", children: st.map((o) => {
255
- const I = typeof o.label == "string" ? o.label : o.value;
254
+ /* @__PURE__ */ t("div", { className: "sku-input-card__dropdown", ref: Z, children: /* @__PURE__ */ t("div", { className: "sku-input-card__dropdown-list", children: st.map((o) => {
255
+ const m = typeof o.label == "string" ? o.label : o.value;
256
256
  return /* @__PURE__ */ t(
257
257
  "div",
258
258
  {
@@ -261,10 +261,10 @@ function Ye({
261
261
  o.disabled && "sku-input-card__dropdown-item--disabled",
262
262
  o.value === e && "sku-input-card__dropdown-item--selected"
263
263
  ].filter(Boolean).join(" "),
264
- onMouseDown: (M) => {
265
- M.preventDefault(), !o.disabled && (i == null || i(o.value), D == null || D(o.value, o), x(!1), L == null || L(!1));
264
+ onMouseDown: (K) => {
265
+ K.preventDefault(), !o.disabled && (i == null || i(o.value), k == null || k(o.value, o), M(!1), D == null || D(!1));
266
266
  },
267
- children: /* @__PURE__ */ t(Ce, { text: I, keyword: e })
267
+ children: /* @__PURE__ */ t(fe, { text: m, keyword: e })
268
268
  },
269
269
  o.value
270
270
  );
@@ -288,29 +288,29 @@ function Ye({
288
288
  )
289
289
  ] })
290
290
  ] }),
291
- /* @__PURE__ */ t("button", { className: "sku-input-card__delete", onClick: C, children: /* @__PURE__ */ t(pe, {}) })
291
+ /* @__PURE__ */ t("button", { className: "sku-input-card__delete", onClick: f, children: /* @__PURE__ */ t(pe, {}) })
292
292
  ] }),
293
293
  r && /* @__PURE__ */ l("div", { className: "sku-input-card__body", children: [
294
294
  /* @__PURE__ */ t(
295
295
  "input",
296
296
  {
297
- ref: y,
297
+ ref: _,
298
298
  type: "file",
299
299
  accept: "image/jpeg,image/png,image/webp",
300
300
  className: "sku-input-card__file-input",
301
- onChange: nt
301
+ onChange: it
302
302
  }
303
303
  ),
304
- rt ? /* @__PURE__ */ t("div", { className: "sku-input-card__loading", children: /* @__PURE__ */ t("img", { src: ae, alt: "上传中", className: "sku-input-card__loading-img" }) }) : J[0] ? (
304
+ et ? /* @__PURE__ */ t("div", { className: "sku-input-card__loading", children: /* @__PURE__ */ t("img", { src: ae, alt: "上传中", className: "sku-input-card__loading-img" }) }) : x[0] ? (
305
305
  /* Single image preview */
306
306
  /* @__PURE__ */ l("div", { className: "sku-input-card__image-item", children: [
307
- /* @__PURE__ */ t("img", { src: J[0], alt: "图片", className: "sku-input-card__image-thumb" }),
307
+ /* @__PURE__ */ t("img", { src: x[0], alt: "图片", className: "sku-input-card__image-thumb" }),
308
308
  /* @__PURE__ */ l("div", { className: "sku-input-card__image-overlay", children: [
309
309
  /* @__PURE__ */ t(
310
310
  "button",
311
311
  {
312
312
  className: "sku-input-card__image-action-btn",
313
- onClick: () => A == null ? void 0 : A(J[0]),
313
+ onClick: () => g == null ? void 0 : g(x[0]),
314
314
  children: /* @__PURE__ */ t(he, {})
315
315
  }
316
316
  ),
@@ -318,17 +318,17 @@ function Ye({
318
318
  "button",
319
319
  {
320
320
  className: "sku-input-card__image-action-btn",
321
- onClick: () => g == null ? void 0 : g(J[0]),
321
+ onClick: () => h == null ? void 0 : h(x[0]),
322
322
  children: /* @__PURE__ */ t(Ae, {})
323
323
  }
324
324
  )
325
325
  ] })
326
326
  ] })
327
- ) : q ? (
327
+ ) : E ? (
328
328
  /* Upload options — local upload / associate image */
329
- /* @__PURE__ */ t("div", { className: "sku-input-card__upload-options", children: /* @__PURE__ */ l("div", { ref: m, className: "sku-input-card__upload-options-box", children: [
330
- /* @__PURE__ */ t("button", { className: "sku-input-card__upload-opt-btn", onClick: lt, children: T }),
331
- /* @__PURE__ */ t("button", { className: "sku-input-card__upload-opt-btn", onClick: h, children: S })
329
+ /* @__PURE__ */ t("div", { className: "sku-input-card__upload-options", children: /* @__PURE__ */ l("div", { ref: $, className: "sku-input-card__upload-options-box", children: [
330
+ /* @__PURE__ */ t("button", { className: "sku-input-card__upload-opt-btn", onClick: lt, children: U }),
331
+ /* @__PURE__ */ t("button", { className: "sku-input-card__upload-opt-btn", onClick: A, children: V })
332
332
  ] }) })
333
333
  ) : (
334
334
  /* Large add button — fills the body */
@@ -336,7 +336,7 @@ function Ye({
336
336
  "button",
337
337
  {
338
338
  className: "sku-input-card__add-btn",
339
- onClick: () => X(!0),
339
+ onClick: () => j(!0),
340
340
  children: /* @__PURE__ */ t(de, {})
341
341
  }
342
342
  )
@@ -345,7 +345,7 @@ function Ye({
345
345
  ] })
346
346
  ] });
347
347
  }
348
- function fe() {
348
+ function Ce() {
349
349
  return /* @__PURE__ */ t("svg", { width: "8", height: "4.5", viewBox: "315 270 365 185", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t(
350
350
  "path",
351
351
  {
@@ -369,7 +369,7 @@ function ye() {
369
369
  /* @__PURE__ */ t("path", { d: "M5 8h6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
370
370
  ] });
371
371
  }
372
- const qe = vt(
372
+ const qe = It(
373
373
  function({
374
374
  type: e = "input",
375
375
  mode: i = "single",
@@ -378,75 +378,75 @@ const qe = vt(
378
378
  value: s = "",
379
379
  onChange: r,
380
380
  label: p,
381
- required: C,
382
- placeholder: A,
383
- maxLength: g,
381
+ required: f,
382
+ placeholder: g,
383
+ maxLength: h,
384
384
  showCount: a,
385
- error: f = !1,
386
- errorMessage: E,
387
- disabled: v,
388
- leftIcon: O,
389
- rightIcon: W,
390
- langToggle: _,
391
- translating: j = !1,
392
- translated: B = !1,
393
- onBlur: D,
394
- min: H,
395
- max: Y,
396
- step: L = 1,
397
- labels: Z,
398
- id: T,
399
- className: S,
400
- style: y
401
- }, m) {
402
- Z == null || Z.zh, Z == null || Z.en;
403
- function N(x) {
404
- let F = (parseFloat(s) || 0) + x;
405
- H !== void 0 && (F = Math.max(H, F)), Y !== void 0 && (F = Math.min(Y, F)), r == null || r(String(F));
385
+ error: y = !1,
386
+ errorMessage: b,
387
+ disabled: I,
388
+ leftIcon: G,
389
+ rightIcon: q,
390
+ langToggle: X,
391
+ translating: S = !1,
392
+ translated: N = !1,
393
+ onBlur: k,
394
+ min: P,
395
+ max: T,
396
+ step: D = 1,
397
+ labels: W,
398
+ id: U,
399
+ className: V,
400
+ style: _
401
+ }, $) {
402
+ W == null || W.zh, W == null || W.en;
403
+ function Z(M) {
404
+ let O = (parseFloat(s) || 0) + M;
405
+ P !== void 0 && (O = Math.max(P, O)), T !== void 0 && (O = Math.min(T, O)), r == null || r(String(O));
406
406
  }
407
- const w = e === "textarea" && !!a, b = w || i === "bilingual" || j || B, Q = g ? `${s.length}/${g}` : `${s.length}`, q = f && !!E && s.length > 0, X = [
407
+ const w = e === "textarea" && !!a, v = w || i === "bilingual" || S || N, C = h ? `${s.length}/${h}` : `${s.length}`, E = y && !!b && s.length > 0, j = [
408
408
  "bu-input__box",
409
409
  (e === "input" || e === "number") && "bu-input__box--single",
410
410
  e === "number" && "bu-input__box--number",
411
411
  e === "textarea" && "bu-input__box--textarea",
412
- f && "bu-input__box--error",
413
- v && "bu-input__box--disabled",
414
- !!O && "bu-input__box--has-left",
415
- !!W && "bu-input__box--has-right"
416
- ].filter(Boolean).join(" "), $ = `bu-input__field bu-input__field--${e}`;
417
- return /* @__PURE__ */ l("div", { className: ["bu-input", S].filter(Boolean).join(" "), style: y, children: [
418
- p && /* @__PURE__ */ l("label", { className: "bu-input__label", htmlFor: T, children: [
419
- C && /* @__PURE__ */ t("span", { className: "bu-input__required", children: "*" }),
412
+ y && "bu-input__box--error",
413
+ I && "bu-input__box--disabled",
414
+ !!G && "bu-input__box--has-left",
415
+ !!q && "bu-input__box--has-right"
416
+ ].filter(Boolean).join(" "), L = `bu-input__field bu-input__field--${e}`;
417
+ return /* @__PURE__ */ l("div", { className: ["bu-input", V].filter(Boolean).join(" "), style: _, children: [
418
+ p && /* @__PURE__ */ l("label", { className: "bu-input__label", htmlFor: U, children: [
419
+ f && /* @__PURE__ */ t("span", { className: "bu-input__required", children: "*" }),
420
420
  p
421
421
  ] }),
422
422
  /* @__PURE__ */ l("div", { className: "bu-input__row", children: [
423
- O && /* @__PURE__ */ t("span", { className: "bu-input__icon bu-input__icon--left", children: O }),
424
- /* @__PURE__ */ l("div", { className: X, children: [
423
+ G && /* @__PURE__ */ t("span", { className: "bu-input__icon bu-input__icon--left", children: G }),
424
+ /* @__PURE__ */ l("div", { className: j, children: [
425
425
  e === "textarea" ? /* @__PURE__ */ t(
426
426
  "textarea",
427
427
  {
428
- ref: m,
429
- id: T,
430
- className: $,
428
+ ref: $,
429
+ id: U,
430
+ className: L,
431
431
  value: s,
432
- onChange: (x) => r == null ? void 0 : r(x.target.value),
433
- onBlur: D,
434
- placeholder: A,
435
- maxLength: g,
436
- disabled: v
432
+ onChange: (M) => r == null ? void 0 : r(M.target.value),
433
+ onBlur: k,
434
+ placeholder: g,
435
+ maxLength: h,
436
+ disabled: I
437
437
  }
438
438
  ) : e === "number" ? /* @__PURE__ */ l(ht, { children: [
439
439
  /* @__PURE__ */ t(
440
440
  "input",
441
441
  {
442
- ref: m,
443
- id: T,
444
- className: $,
442
+ ref: $,
443
+ id: U,
444
+ className: L,
445
445
  value: s,
446
- onChange: (x) => r == null ? void 0 : r(x.target.value),
447
- onBlur: D,
448
- placeholder: A,
449
- disabled: v,
446
+ onChange: (M) => r == null ? void 0 : r(M.target.value),
447
+ onBlur: k,
448
+ placeholder: g,
449
+ disabled: I,
450
450
  inputMode: "numeric"
451
451
  }
452
452
  ),
@@ -456,11 +456,11 @@ const qe = vt(
456
456
  {
457
457
  type: "button",
458
458
  className: "bu-input__stepper-btn bu-input__stepper-btn--up",
459
- onMouseDown: (x) => x.preventDefault(),
460
- onClick: () => N(L),
461
- disabled: v || Y !== void 0 && parseFloat(s || "0") >= Y,
459
+ onMouseDown: (M) => M.preventDefault(),
460
+ onClick: () => Z(D),
461
+ disabled: I || T !== void 0 && parseFloat(s || "0") >= T,
462
462
  tabIndex: -1,
463
- children: /* @__PURE__ */ t(fe, {})
463
+ children: /* @__PURE__ */ t(Ce, {})
464
464
  }
465
465
  ),
466
466
  /* @__PURE__ */ t(
@@ -468,9 +468,9 @@ const qe = vt(
468
468
  {
469
469
  type: "button",
470
470
  className: "bu-input__stepper-btn bu-input__stepper-btn--down",
471
- onMouseDown: (x) => x.preventDefault(),
472
- onClick: () => N(-L),
473
- disabled: v || H !== void 0 && parseFloat(s || "0") <= H,
471
+ onMouseDown: (M) => M.preventDefault(),
472
+ onClick: () => Z(-D),
473
+ disabled: I || P !== void 0 && parseFloat(s || "0") <= P,
474
474
  tabIndex: -1,
475
475
  children: /* @__PURE__ */ t(we, {})
476
476
  }
@@ -479,35 +479,35 @@ const qe = vt(
479
479
  ] }) : /* @__PURE__ */ t(
480
480
  "input",
481
481
  {
482
- ref: m,
483
- id: T,
484
- className: $,
482
+ ref: $,
483
+ id: U,
484
+ className: L,
485
485
  value: s,
486
- onChange: (x) => r == null ? void 0 : r(x.target.value),
487
- onBlur: D,
488
- placeholder: A,
489
- maxLength: g,
490
- disabled: v
486
+ onChange: (M) => r == null ? void 0 : r(M.target.value),
487
+ onBlur: k,
488
+ placeholder: g,
489
+ maxLength: h,
490
+ disabled: I
491
491
  }
492
492
  ),
493
- b && /* @__PURE__ */ l("div", { className: `bu-input__footer${e === "textarea" ? " bu-input__footer--bottom" : ""}`, children: [
494
- w && /* @__PURE__ */ t("span", { className: "bu-input__count", children: Q }),
495
- j && /* @__PURE__ */ l("span", { className: "bu-input__translating", children: [
493
+ v && /* @__PURE__ */ l("div", { className: `bu-input__footer${e === "textarea" ? " bu-input__footer--bottom" : ""}`, children: [
494
+ w && /* @__PURE__ */ t("span", { className: "bu-input__count", children: C }),
495
+ S && /* @__PURE__ */ l("span", { className: "bu-input__translating", children: [
496
496
  /* @__PURE__ */ t("svg", { className: "bu-input__translating-icon", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeDasharray: "14 42" }) }),
497
497
  "翻译中…"
498
498
  ] }),
499
- B && !j && /* @__PURE__ */ l("span", { className: "bu-input__translated", children: [
499
+ N && !S && /* @__PURE__ */ l("span", { className: "bu-input__translated", children: [
500
500
  /* @__PURE__ */ t("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M3 8l3.5 3.5L13 4.5", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) }),
501
501
  "翻译完成"
502
502
  ] }),
503
- i === "bilingual" && !j && !B && (_ ?? /* @__PURE__ */ t("div", { className: "bu-input__lang-toggle" }))
503
+ i === "bilingual" && !S && !N && (X ?? /* @__PURE__ */ t("div", { className: "bu-input__lang-toggle" }))
504
504
  ] })
505
505
  ] }),
506
- W && /* @__PURE__ */ t("span", { className: "bu-input__icon bu-input__icon--right", children: W })
506
+ q && /* @__PURE__ */ t("span", { className: "bu-input__icon bu-input__icon--right", children: q })
507
507
  ] }),
508
- q && /* @__PURE__ */ l("div", { className: "bu-input__error-msg", children: [
508
+ E && /* @__PURE__ */ l("div", { className: "bu-input__error-msg", children: [
509
509
  /* @__PURE__ */ t(ye, {}),
510
- E
510
+ b
511
511
  ] })
512
512
  ] });
513
513
  }
@@ -515,7 +515,7 @@ const qe = vt(
515
515
  function ve() {
516
516
  return /* @__PURE__ */ t("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M14.1667 5.3335C15.1792 5.3335 16 6.15431 16 7.16683V8.00016H19C19.2761 8.00016 19.5 8.22402 19.5 8.50016C19.5 8.7763 19.2761 9.00016 19 9.00016H17.3333V16.8335C17.3333 17.846 16.5125 18.6668 15.5 18.6668H8.5C7.48748 18.6668 6.66667 17.846 6.66667 16.8335V9.00016H5C4.72386 9.00016 4.5 8.7763 4.5 8.50016C4.5 8.22402 4.72386 8.00016 5 8.00016H8V7.16683C8 6.15431 8.82081 5.3335 9.83333 5.3335H14.1667ZM7.66667 16.8335C7.66667 17.2937 8.03976 17.6668 8.5 17.6668H15.5C15.9602 17.6668 16.3333 17.2937 16.3333 16.8335V9.00016H7.66667V16.8335ZM10.5 11.3335C10.7761 11.3335 11 11.5574 11 11.8335V15.0002C11 15.2763 10.7761 15.5002 10.5 15.5002C10.2239 15.5002 10 15.2763 10 15.0002V11.8335C10 11.5574 10.2239 11.3335 10.5 11.3335ZM13.5 11.3335C13.7761 11.3335 14 11.5574 14 11.8335V15.0002C14 15.2763 13.7761 15.5002 13.5 15.5002C13.2239 15.5002 13 15.2763 13 15.0002V11.8335C13 11.5574 13.2239 11.3335 13.5 11.3335ZM9.83333 6.3335C9.3731 6.3335 9 6.70659 9 7.16683V8.00016H15V7.16683C15 6.70659 14.6269 6.3335 14.1667 6.3335H9.83333Z", fill: "currentColor" }) });
517
517
  }
518
- const Fe = vt(
518
+ const Fe = It(
519
519
  function({
520
520
  mode: e = "single",
521
521
  activeLang: i = "zh",
@@ -524,45 +524,45 @@ const Fe = vt(
524
524
  onChange: s,
525
525
  placeholder: r,
526
526
  maxLength: p,
527
- error: C = !1,
528
- disabled: A,
529
- onDelete: g,
527
+ error: f = !1,
528
+ disabled: g,
529
+ onDelete: h,
530
530
  labels: a,
531
- id: f,
532
- className: E,
533
- style: v
534
- }, O) {
535
- const W = (a == null ? void 0 : a.zh) ?? "中文", _ = (a == null ? void 0 : a.en) ?? "EN", j = e === "bilingual", B = !!g, D = [
531
+ id: y,
532
+ className: b,
533
+ style: I
534
+ }, G) {
535
+ const q = (a == null ? void 0 : a.zh) ?? "中文", X = (a == null ? void 0 : a.en) ?? "EN", S = e === "bilingual", N = !!h, k = [
536
536
  "bu-eib__box",
537
- j && B && "bu-eib__box--actions-both",
538
- j && !B && "bu-eib__box--actions-toggle",
539
- !j && B && "bu-eib__box--actions-delete",
540
- C && "bu-eib__box--error",
541
- A && "bu-eib__box--disabled"
537
+ S && N && "bu-eib__box--actions-both",
538
+ S && !N && "bu-eib__box--actions-toggle",
539
+ !S && N && "bu-eib__box--actions-delete",
540
+ f && "bu-eib__box--error",
541
+ g && "bu-eib__box--disabled"
542
542
  ].filter(Boolean).join(" ");
543
- return /* @__PURE__ */ t("div", { className: ["bu-eib", E].filter(Boolean).join(" "), style: v, children: /* @__PURE__ */ l("div", { className: D, children: [
543
+ return /* @__PURE__ */ t("div", { className: ["bu-eib", b].filter(Boolean).join(" "), style: I, children: /* @__PURE__ */ l("div", { className: k, children: [
544
544
  /* @__PURE__ */ t(
545
545
  "input",
546
546
  {
547
- ref: O,
548
- id: f,
547
+ ref: G,
548
+ id: y,
549
549
  className: "bu-eib__field",
550
550
  value: u,
551
- onChange: (H) => s == null ? void 0 : s(H.target.value),
551
+ onChange: (P) => s == null ? void 0 : s(P.target.value),
552
552
  placeholder: r,
553
553
  maxLength: p,
554
- disabled: A
554
+ disabled: g
555
555
  }
556
556
  ),
557
- (j || B) && /* @__PURE__ */ l("div", { className: "bu-eib__actions", children: [
558
- j && /* @__PURE__ */ l("div", { className: "bu-eib__lang-toggle", children: [
557
+ (S || N) && /* @__PURE__ */ l("div", { className: "bu-eib__actions", children: [
558
+ S && /* @__PURE__ */ l("div", { className: "bu-eib__lang-toggle", children: [
559
559
  /* @__PURE__ */ t(
560
560
  "button",
561
561
  {
562
562
  type: "button",
563
563
  className: `bu-eib__lang-btn${i === "zh" ? " bu-eib__lang-btn--active" : ""}`,
564
564
  onClick: () => c == null ? void 0 : c("zh"),
565
- children: W
565
+ children: q
566
566
  }
567
567
  ),
568
568
  /* @__PURE__ */ t(
@@ -571,11 +571,11 @@ const Fe = vt(
571
571
  type: "button",
572
572
  className: `bu-eib__lang-btn${i === "en" ? " bu-eib__lang-btn--active" : ""}`,
573
573
  onClick: () => c == null ? void 0 : c("en"),
574
- children: _
574
+ children: X
575
575
  }
576
576
  )
577
577
  ] }),
578
- B && /* @__PURE__ */ t("button", { type: "button", className: "bu-eib__delete", onClick: g, children: /* @__PURE__ */ t(ve, {}) })
578
+ N && /* @__PURE__ */ t("button", { type: "button", className: "bu-eib__delete", onClick: h, children: /* @__PURE__ */ t(ve, {}) })
579
579
  ] })
580
580
  ] }) });
581
581
  }
@@ -589,64 +589,64 @@ function We({
589
589
  cancelText: s = "取消",
590
590
  onOk: r,
591
591
  onCancel: p,
592
- onClose: C,
593
- activeLang: A = "zh",
594
- onLangChange: g,
592
+ onClose: f,
593
+ activeLang: g = "zh",
594
+ onLangChange: h,
595
595
  labels: a,
596
- hint: f,
597
- confirmLoading: E = !1,
598
- width: v,
599
- className: O,
600
- style: W
596
+ hint: y,
597
+ confirmLoading: b = !1,
598
+ width: I,
599
+ className: G,
600
+ style: q
601
601
  }) {
602
- const _ = (a == null ? void 0 : a.zh) ?? "中文", j = (a == null ? void 0 : a.en) ?? "EN";
602
+ const X = (a == null ? void 0 : a.zh) ?? "中文", S = (a == null ? void 0 : a.en) ?? "EN";
603
603
  if (!n) return null;
604
- const B = i === "bilingual", D = i === "single", H = v != null ? { width: v, ...W } : W;
605
- return /* @__PURE__ */ t("div", { className: ["bu-modal__overlay", O].filter(Boolean).join(" "), onClick: C, children: /* @__PURE__ */ l(
604
+ const N = i === "bilingual", k = i === "single", P = I != null ? { width: I, ...q } : q;
605
+ return /* @__PURE__ */ t("div", { className: ["bu-modal__overlay", G].filter(Boolean).join(" "), onClick: f, children: /* @__PURE__ */ l(
606
606
  "div",
607
607
  {
608
608
  className: "bu-modal__container",
609
- style: H,
610
- onClick: (Y) => Y.stopPropagation(),
609
+ style: P,
610
+ onClick: (T) => T.stopPropagation(),
611
611
  children: [
612
612
  /* @__PURE__ */ l("div", { className: "bu-modal__header", children: [
613
613
  /* @__PURE__ */ t("p", { className: "bu-modal__title", children: e }),
614
- B && /* @__PURE__ */ l("div", { className: "bu-modal__lang-toggle", children: [
614
+ N && /* @__PURE__ */ l("div", { className: "bu-modal__lang-toggle", children: [
615
615
  /* @__PURE__ */ t(
616
616
  "button",
617
617
  {
618
618
  type: "button",
619
- className: `bu-modal__lang-btn${A === "zh" ? " bu-modal__lang-btn--active" : ""}`,
620
- onClick: () => g == null ? void 0 : g("zh"),
621
- children: _
619
+ className: `bu-modal__lang-btn${g === "zh" ? " bu-modal__lang-btn--active" : ""}`,
620
+ onClick: () => h == null ? void 0 : h("zh"),
621
+ children: X
622
622
  }
623
623
  ),
624
624
  /* @__PURE__ */ t(
625
625
  "button",
626
626
  {
627
627
  type: "button",
628
- className: `bu-modal__lang-btn${A === "en" ? " bu-modal__lang-btn--active" : ""}`,
629
- onClick: () => g == null ? void 0 : g("en"),
630
- children: j
628
+ className: `bu-modal__lang-btn${g === "en" ? " bu-modal__lang-btn--active" : ""}`,
629
+ onClick: () => h == null ? void 0 : h("en"),
630
+ children: S
631
631
  }
632
632
  )
633
633
  ] }),
634
- /* @__PURE__ */ t("button", { type: "button", className: "bu-modal__close", onClick: C, children: /* @__PURE__ */ t("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M16.5613 6.73027C16.7558 6.53571 17.0723 6.53442 17.2684 6.72736C17.4644 6.92032 17.4657 7.23444 17.2713 7.42901L12.7036 12.0002L17.2713 16.5714C17.4657 16.766 17.4644 17.0801 17.2684 17.273C17.0723 17.4659 16.7558 17.4646 16.5613 17.2701L11.9996 12.7047L7.43794 17.2701C7.24352 17.4647 6.92699 17.4659 6.73091 17.273C6.53485 17.0801 6.53355 16.7659 6.72798 16.5714L11.2955 12.0002L6.72798 7.42901C6.53355 7.23442 6.53485 6.92032 6.73091 6.72736C6.92698 6.53442 7.2435 6.53571 7.43794 6.73027L11.9996 11.2955L16.5613 6.73027Z", fill: "currentColor" }) }) })
634
+ /* @__PURE__ */ t("button", { type: "button", className: "bu-modal__close", onClick: f, children: /* @__PURE__ */ t("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M16.5613 6.73027C16.7558 6.53571 17.0723 6.53442 17.2684 6.72736C17.4644 6.92032 17.4657 7.23444 17.2713 7.42901L12.7036 12.0002L17.2713 16.5714C17.4657 16.766 17.4644 17.0801 17.2684 17.273C17.0723 17.4659 16.7558 17.4646 16.5613 17.2701L11.9996 12.7047L7.43794 17.2701C7.24352 17.4647 6.92699 17.4659 6.73091 17.273C6.53485 17.0801 6.53355 16.7659 6.72798 16.5714L11.2955 12.0002L6.72798 7.42901C6.53355 7.23442 6.53485 6.92032 6.73091 6.72736C6.92698 6.53442 7.2435 6.53571 7.43794 6.73027L11.9996 11.2955L16.5613 6.73027Z", fill: "currentColor" }) }) })
635
635
  ] }),
636
636
  /* @__PURE__ */ t("div", { className: "bu-modal__body", children: c }),
637
637
  /* @__PURE__ */ l("div", { className: "bu-modal__footer", children: [
638
- f && /* @__PURE__ */ t("p", { className: "bu-modal__hint", children: f }),
638
+ y && /* @__PURE__ */ t("p", { className: "bu-modal__hint", children: y }),
639
639
  /* @__PURE__ */ l("div", { className: "bu-modal__btn-row", children: [
640
- !D && /* @__PURE__ */ t("button", { type: "button", className: "bu-modal__btn-cancel", onClick: p ?? C, children: s }),
640
+ !k && /* @__PURE__ */ t("button", { type: "button", className: "bu-modal__btn-cancel", onClick: p ?? f, children: s }),
641
641
  /* @__PURE__ */ l(
642
642
  "button",
643
643
  {
644
644
  type: "button",
645
- className: ["bu-modal__btn-ok", E ? "bu-modal__btn-ok--loading" : ""].filter(Boolean).join(" "),
646
- disabled: E,
647
- onClick: E ? void 0 : r,
645
+ className: ["bu-modal__btn-ok", b ? "bu-modal__btn-ok--loading" : ""].filter(Boolean).join(" "),
646
+ disabled: b,
647
+ onClick: b ? void 0 : r,
648
648
  children: [
649
- E && /* @__PURE__ */ t("span", { className: "bu-modal__btn-ok-spinner" }),
649
+ b && /* @__PURE__ */ t("span", { className: "bu-modal__btn-ok-spinner" }),
650
650
  u
651
651
  ]
652
652
  }
@@ -670,97 +670,97 @@ function Ze({
670
670
  onManageField: s,
671
671
  multiple: r = !0,
672
672
  showSearch: p = !0,
673
- showSort: C = !0,
674
- addButtonText: A,
675
- onAdd: g,
673
+ showSort: f = !0,
674
+ addButtonText: g,
675
+ onAdd: h,
676
676
  labels: a,
677
- className: f,
678
- style: E,
679
- getPopupContainer: v
677
+ className: y,
678
+ style: b,
679
+ getPopupContainer: I
680
680
  }) {
681
- const O = (a == null ? void 0 : a.searchPlaceholder) ?? "搜索", W = (a == null ? void 0 : a.sortDefault) ?? "默认顺序", _ = (a == null ? void 0 : a.sortAsc) ?? "名称A-Z", j = (a == null ? void 0 : a.sortDesc) ?? "名称Z-A", B = (a == null ? void 0 : a.noMatchText) ?? "暂无选项", D = (a == null ? void 0 : a.manageFieldPre) ?? "请前往", H = (a == null ? void 0 : a.manageFieldLink) ?? "管理字段", Y = (a == null ? void 0 : a.manageFieldPost) ?? "添加", [L, Z] = P(!1), [T, S] = P(""), [y, m] = P("none"), [N, w] = P(!1), b = G(null), Q = G(null), q = G(null), [X, $] = P({ top: 0, left: 0, width: 0 }), x = ct(() => {
682
- if (!b.current) return;
683
- const o = b.current.getBoundingClientRect();
684
- $({
681
+ const G = (a == null ? void 0 : a.searchPlaceholder) ?? "搜索", q = (a == null ? void 0 : a.sortDefault) ?? "默认顺序", X = (a == null ? void 0 : a.sortAsc) ?? "名称A-Z", S = (a == null ? void 0 : a.sortDesc) ?? "名称Z-A", N = (a == null ? void 0 : a.noMatchText) ?? "暂无选项", k = (a == null ? void 0 : a.manageFieldPre) ?? "请前往", P = (a == null ? void 0 : a.manageFieldLink) ?? "管理字段", T = (a == null ? void 0 : a.manageFieldPost) ?? "添加", [D, W] = H(!1), [U, V] = H(""), [_, $] = H("none"), [Z, w] = H(!1), v = R(null), C = R(null), E = R(null), [j, L] = H({ top: 0, left: 0, width: 0 }), M = ct(() => {
682
+ if (!v.current) return;
683
+ const o = v.current.getBoundingClientRect();
684
+ L({
685
685
  top: o.bottom + 4,
686
686
  left: o.left,
687
687
  width: o.width
688
688
  });
689
689
  }, []);
690
- Et(() => {
691
- L && x();
692
- }, [L, x]), ot(() => {
693
- if (!L) return;
694
- const o = (I) => {
695
- var U, V;
696
- const M = I.target;
697
- (U = q.current) != null && U.contains(M) || (V = b.current) != null && V.contains(M) || nt();
690
+ vt(() => {
691
+ D && M();
692
+ }, [D, M]), ot(() => {
693
+ if (!D) return;
694
+ const o = (m) => {
695
+ var Y, tt;
696
+ const K = m.target;
697
+ (Y = E.current) != null && Y.contains(K) || (tt = v.current) != null && tt.contains(K) || it();
698
698
  };
699
- return document.addEventListener("mousedown", o), window.addEventListener("scroll", x, !0), window.addEventListener("resize", x), () => {
700
- document.removeEventListener("mousedown", o), window.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x);
699
+ return document.addEventListener("mousedown", o), window.addEventListener("scroll", M, !0), window.addEventListener("resize", M), () => {
700
+ document.removeEventListener("mousedown", o), window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M);
701
701
  };
702
- }, [L, x]), ot(() => {
703
- if (!N) return;
704
- const o = (I) => {
705
- Q.current && !Q.current.contains(I.target) && w(!1);
702
+ }, [D, M]), ot(() => {
703
+ if (!Z) return;
704
+ const o = (m) => {
705
+ C.current && !C.current.contains(m.target) && w(!1);
706
706
  };
707
707
  return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
708
- }, [N]);
709
- const rt = G(null), F = G(null), tt = G({ dragging: !1, startX: 0, scrollLeft: 0, target: null }), et = ct((o) => ({
710
- onMouseDown: (I) => {
711
- const M = o.current;
712
- M && (tt.current = { dragging: !0, startX: I.clientX, scrollLeft: M.scrollLeft, target: M });
708
+ }, [Z]);
709
+ const et = R(null), O = R(null), F = R({ dragging: !1, startX: 0, scrollLeft: 0, target: null }), nt = ct((o) => ({
710
+ onMouseDown: (m) => {
711
+ const K = o.current;
712
+ K && (F.current = { dragging: !0, startX: m.clientX, scrollLeft: K.scrollLeft, target: K });
713
713
  },
714
- onMouseMove: (I) => {
715
- const { dragging: M, startX: U, scrollLeft: V, target: At } = tt.current;
716
- !M || !At || (I.preventDefault(), At.scrollLeft = V - (I.clientX - U));
714
+ onMouseMove: (m) => {
715
+ const { dragging: K, startX: Y, scrollLeft: tt, target: At } = F.current;
716
+ !K || !At || (m.preventDefault(), At.scrollLeft = tt - (m.clientX - Y));
717
717
  },
718
718
  onMouseUp: () => {
719
- tt.current.dragging = !1;
719
+ F.current.dragging = !1;
720
720
  },
721
721
  onMouseLeave: () => {
722
- tt.current.dragging = !1;
722
+ F.current.dragging = !1;
723
723
  }
724
724
  }), []);
725
725
  function st(o) {
726
726
  if (!r) {
727
- i == null || i(e.includes(o) ? [] : [o]), e.includes(o) || nt();
727
+ i == null || i(e.includes(o) ? [] : [o]), e.includes(o) || it();
728
728
  return;
729
729
  }
730
- const I = e.includes(o) ? e.filter((M) => M !== o) : [...e, o];
731
- i == null || i(I);
730
+ const m = e.includes(o) ? e.filter((K) => K !== o) : [...e, o];
731
+ i == null || i(m);
732
732
  }
733
- function J(o) {
734
- i == null || i(e.filter((I) => I !== o));
733
+ function x(o) {
734
+ i == null || i(e.filter((m) => m !== o));
735
735
  }
736
- function nt() {
737
- Z(!1), S(""), m("none");
736
+ function it() {
737
+ W(!1), V(""), $("none");
738
738
  }
739
739
  function lt(o) {
740
- m(o), w(!1);
740
+ $(o), w(!1);
741
741
  }
742
- const h = dt(() => {
743
- let o = n.filter((M) => (M.searchText ?? (typeof M.label == "string" ? M.label : "")).toLowerCase().includes(T.toLowerCase()));
744
- const I = (M) => M.searchText ?? (typeof M.label == "string" ? M.label : "");
745
- return y === "asc" && (o = [...o].sort((M, U) => I(M).localeCompare(I(U)))), y === "desc" && (o = [...o].sort((M, U) => I(U).localeCompare(I(M)))), o;
746
- }, [n, T, y]), R = n.filter((o) => e.includes(o.value)), k = n.length > 0;
747
- return /* @__PURE__ */ l("div", { ref: b, className: ["bu-pf", f].filter(Boolean).join(" "), style: E, children: [
748
- !L && /* @__PURE__ */ l("div", { className: `bu-pf__trigger${R.length > 0 ? " bu-pf__trigger--selected" : ""}`, onClick: () => Z(!0), children: [
749
- R.length > 0 ? /* @__PURE__ */ t(
742
+ const A = dt(() => {
743
+ let o = n.filter((K) => (K.searchText ?? (typeof K.label == "string" ? K.label : "")).toLowerCase().includes(U.toLowerCase()));
744
+ const m = (K) => K.searchText ?? (typeof K.label == "string" ? K.label : "");
745
+ return _ === "asc" && (o = [...o].sort((K, Y) => m(K).localeCompare(m(Y)))), _ === "desc" && (o = [...o].sort((K, Y) => m(Y).localeCompare(m(K)))), o;
746
+ }, [n, U, _]), J = n.filter((o) => e.includes(o.value)), Q = n.length > 0;
747
+ return /* @__PURE__ */ l("div", { ref: v, className: ["bu-pf", y].filter(Boolean).join(" "), style: b, children: [
748
+ !D && /* @__PURE__ */ l("div", { className: `bu-pf__trigger${J.length > 0 ? " bu-pf__trigger--selected" : ""}`, onClick: () => W(!0), children: [
749
+ J.length > 0 ? /* @__PURE__ */ t(
750
750
  "div",
751
751
  {
752
752
  className: "bu-pf__trigger-tags",
753
- ref: F,
754
- ...et(F),
755
- children: R.map((o) => /* @__PURE__ */ l("span", { className: `bu-pf__tag${r ? "" : " bu-pf__tag--single"}`, children: [
753
+ ref: O,
754
+ ...nt(O),
755
+ children: J.map((o) => /* @__PURE__ */ l("span", { className: `bu-pf__tag${r ? "" : " bu-pf__tag--single"}`, children: [
756
756
  /* @__PURE__ */ t("span", { className: "bu-pf__tag-text", children: o.label }),
757
757
  /* @__PURE__ */ t(
758
758
  "button",
759
759
  {
760
760
  type: "button",
761
761
  className: "bu-pf__tag-close",
762
- onClick: (I) => {
763
- I.stopPropagation(), J(o.value);
762
+ onClick: (m) => {
763
+ m.stopPropagation(), x(o.value);
764
764
  },
765
765
  children: /* @__PURE__ */ t(Lt, { size: 12 })
766
766
  }
@@ -770,83 +770,83 @@ function Ze({
770
770
  ) : /* @__PURE__ */ t("span", { className: "bu-pf__placeholder", children: c }),
771
771
  /* @__PURE__ */ t("span", { className: "bu-pf__arrow", children: /* @__PURE__ */ t("img", { src: Dt, width: 24, height: 24, alt: "" }) })
772
772
  ] }),
773
- L && /* @__PURE__ */ l(ht, { children: [
773
+ D && /* @__PURE__ */ l(ht, { children: [
774
774
  /* @__PURE__ */ t("div", { className: "bu-pf__panel", children: /* @__PURE__ */ l("div", { className: "bu-pf__header", children: [
775
775
  /* @__PURE__ */ t(
776
776
  "div",
777
777
  {
778
778
  className: "bu-pf__tags",
779
- ref: rt,
780
- ...et(rt),
781
- children: R.length > 0 ? R.map((o) => /* @__PURE__ */ l("span", { className: `bu-pf__tag${r ? "" : " bu-pf__tag--single"}`, children: [
779
+ ref: et,
780
+ ...nt(et),
781
+ children: J.length > 0 ? J.map((o) => /* @__PURE__ */ l("span", { className: `bu-pf__tag${r ? "" : " bu-pf__tag--single"}`, children: [
782
782
  /* @__PURE__ */ t("span", { className: "bu-pf__tag-text", children: o.label }),
783
783
  /* @__PURE__ */ t(
784
784
  "button",
785
785
  {
786
786
  type: "button",
787
787
  className: "bu-pf__tag-close",
788
- onClick: () => J(o.value),
788
+ onClick: () => x(o.value),
789
789
  children: /* @__PURE__ */ t(Lt, { size: 12 })
790
790
  }
791
791
  )
792
792
  ] }, o.value)) : /* @__PURE__ */ t("span", { className: "bu-pf__placeholder-inline", children: c })
793
793
  }
794
794
  ),
795
- /* @__PURE__ */ t("button", { type: "button", className: "bu-pf__close", onClick: nt, children: /* @__PURE__ */ t("img", { src: Dt, width: 24, height: 24, alt: "" }) })
795
+ /* @__PURE__ */ t("button", { type: "button", className: "bu-pf__close", onClick: it, children: /* @__PURE__ */ t("img", { src: Dt, width: 24, height: 24, alt: "" }) })
796
796
  ] }) }),
797
797
  Mt(
798
- /* @__PURE__ */ t("div", { ref: q, className: "bu-pf__portal", style: { position: "fixed", top: X.top, left: X.left, width: X.width, zIndex: 1050 }, children: /* @__PURE__ */ l("div", { className: "bu-pf__dropdown", children: [
799
- (p || C) && /* @__PURE__ */ l("div", { className: "bu-pf__toolbar", children: [
798
+ /* @__PURE__ */ t("div", { ref: E, className: "bu-pf__portal", style: { position: "fixed", top: j.top, left: j.left, width: j.width, zIndex: 1050 }, children: /* @__PURE__ */ l("div", { className: "bu-pf__dropdown", children: [
799
+ (p || f) && /* @__PURE__ */ l("div", { className: "bu-pf__toolbar", children: [
800
800
  p && /* @__PURE__ */ l("div", { className: "bu-pf__search", children: [
801
801
  /* @__PURE__ */ t("span", { className: "bu-pf__search-icon", children: /* @__PURE__ */ t("img", { src: be, width: 20, height: 20, alt: "" }) }),
802
802
  /* @__PURE__ */ t(
803
803
  "input",
804
804
  {
805
805
  className: "bu-pf__search-input",
806
- placeholder: O,
807
- value: T,
808
- onChange: (o) => S(o.target.value)
806
+ placeholder: G,
807
+ value: U,
808
+ onChange: (o) => V(o.target.value)
809
809
  }
810
810
  )
811
811
  ] }),
812
- C && /* @__PURE__ */ l("div", { ref: Q, className: "bu-pf__sort-wrap", children: [
812
+ f && /* @__PURE__ */ l("div", { ref: C, className: "bu-pf__sort-wrap", children: [
813
813
  /* @__PURE__ */ t(
814
814
  "button",
815
815
  {
816
816
  type: "button",
817
- className: `bu-pf__sort-btn${y !== "none" ? " bu-pf__sort-btn--active" : ""}`,
817
+ className: `bu-pf__sort-btn${_ !== "none" ? " bu-pf__sort-btn--active" : ""}`,
818
818
  onClick: () => w((o) => !o),
819
819
  children: /* @__PURE__ */ t("img", { src: me, width: 24, height: 24, alt: "" })
820
820
  }
821
821
  ),
822
- N && /* @__PURE__ */ t("div", { className: "bu-pf__sort-dropdown", children: [
823
- { key: "none", label: W },
824
- { key: "asc", label: _ },
825
- { key: "desc", label: j }
826
- ].map(({ key: o, label: I }) => /* @__PURE__ */ t(
822
+ Z && /* @__PURE__ */ t("div", { className: "bu-pf__sort-dropdown", children: [
823
+ { key: "none", label: q },
824
+ { key: "asc", label: X },
825
+ { key: "desc", label: S }
826
+ ].map(({ key: o, label: m }) => /* @__PURE__ */ t(
827
827
  "div",
828
828
  {
829
- className: `bu-pf__sort-option${y === o ? " bu-pf__sort-option--active" : ""}`,
829
+ className: `bu-pf__sort-option${_ === o ? " bu-pf__sort-option--active" : ""}`,
830
830
  onClick: () => lt(o),
831
- children: I
831
+ children: m
832
832
  },
833
833
  o
834
834
  )) })
835
835
  ] })
836
836
  ] }),
837
- /* @__PURE__ */ t("div", { className: "bu-pf__list", children: k && h.length > 0 ? h.map((o) => {
838
- const I = e.includes(o.value);
837
+ /* @__PURE__ */ t("div", { className: "bu-pf__list", children: Q && A.length > 0 ? A.map((o) => {
838
+ const m = e.includes(o.value);
839
839
  return /* @__PURE__ */ l(
840
840
  "div",
841
841
  {
842
- className: `bu-pf__option${r ? " bu-pf__option--multiple" : ""}${I && !r ? " bu-pf__option--selected" : ""}`,
842
+ className: `bu-pf__option${r ? " bu-pf__option--multiple" : ""}${m && !r ? " bu-pf__option--selected" : ""}`,
843
843
  onClick: () => st(o.value),
844
844
  children: [
845
845
  r && /* @__PURE__ */ t(
846
846
  "img",
847
847
  {
848
848
  className: "bu-pf__checkbox-img",
849
- src: I ? Me : Ee,
849
+ src: m ? Me : Ee,
850
850
  alt: ""
851
851
  }
852
852
  ),
@@ -856,17 +856,17 @@ function Ze({
856
856
  o.value
857
857
  );
858
858
  }) : /* @__PURE__ */ l("div", { className: "bu-pf__no-match", children: [
859
- /* @__PURE__ */ t("img", { className: "bu-pf__no-match-img", src: Ie, alt: k ? B : u }),
860
- /* @__PURE__ */ t("p", { className: "bu-pf__no-match-text", children: k ? B : u }),
859
+ /* @__PURE__ */ t("img", { className: "bu-pf__no-match-img", src: Ie, alt: Q ? N : u }),
860
+ /* @__PURE__ */ t("p", { className: "bu-pf__no-match-text", children: Q ? N : u }),
861
861
  /* @__PURE__ */ l("p", { className: "bu-pf__no-match-hint", children: [
862
- D,
863
- /* @__PURE__ */ t("button", { type: "button", className: "bu-pf__manage-btn", onClick: s, children: H }),
864
- Y
862
+ k,
863
+ /* @__PURE__ */ t("button", { type: "button", className: "bu-pf__manage-btn", onClick: s, children: P }),
864
+ T
865
865
  ] })
866
866
  ] }) }),
867
- A && /* @__PURE__ */ t("div", { className: "bu-pf__add-row", onClick: g, children: A })
867
+ g && /* @__PURE__ */ t("div", { className: "bu-pf__add-row", onClick: h, children: g })
868
868
  ] }) }),
869
- (v == null ? void 0 : v()) ?? document.body
869
+ (I == null ? void 0 : I()) ?? document.body
870
870
  )
871
871
  ] })
872
872
  ] });
@@ -878,33 +878,33 @@ function St({
878
878
  placement: c = "top",
879
879
  getPopupContainer: u
880
880
  }) {
881
- const [s, r] = P(!1), p = G(null), C = G(null), [A, g] = P(null);
881
+ const [s, r] = H(!1), p = R(null), f = R(null), [g, h] = H(null);
882
882
  function a() {
883
- var E;
884
- const f = C.current;
885
- f && f.scrollWidth > f.offsetWidth && (g(((E = p.current) == null ? void 0 : E.getBoundingClientRect()) ?? null), r(!0));
883
+ var b;
884
+ const y = f.current;
885
+ y && y.scrollWidth > y.offsetWidth && (h(((b = p.current) == null ? void 0 : b.getBoundingClientRect()) ?? null), r(!0));
886
886
  }
887
887
  return /* @__PURE__ */ l(Ht, { ref: p, style: i, children: [
888
888
  /* @__PURE__ */ t(
889
889
  "span",
890
890
  {
891
- ref: C,
891
+ ref: f,
892
892
  className: e,
893
893
  onMouseEnter: a,
894
894
  onMouseLeave: () => r(!1),
895
895
  children: n
896
896
  }
897
897
  ),
898
- s && A && Mt(
898
+ s && g && Mt(
899
899
  /* @__PURE__ */ t(
900
900
  "span",
901
901
  {
902
902
  style: {
903
903
  position: "fixed",
904
- top: A.top,
905
- left: A.left,
906
- width: A.width,
907
- height: A.height,
904
+ top: g.top,
905
+ left: g.left,
906
+ width: g.width,
907
+ height: g.height,
908
908
  display: "block",
909
909
  pointerEvents: "none",
910
910
  zIndex: 9999999999
@@ -917,7 +917,7 @@ function St({
917
917
  ] });
918
918
  }
919
919
  function Ke() {
920
- return /* @__PURE__ */ t("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M5.57345 8.828C5.41074 8.66528 5.41074 8.40152 5.57345 8.2388C5.73617 8.07608 5.99993 8.07608 6.16265 8.2388L10.0323 12.1084L13.8349 8.24124C13.9963 8.0772 14.26 8.07503 14.4241 8.23636C14.5881 8.39771 14.5903 8.66149 14.429 8.82555L10.5282 12.7924C10.2576 13.0675 9.81477 13.0694 9.54196 12.7966L5.57345 8.828Z", fill: "#333333" }) });
920
+ return /* @__PURE__ */ t("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M5.57345 8.828C5.41074 8.66528 5.41074 8.40152 5.57345 8.2388C5.73617 8.07608 5.99993 8.07608 6.16265 8.2388L10.0323 12.1084L13.8349 8.24124C13.9963 8.0772 14.26 8.07503 14.4241 8.23636C14.5881 8.39771 14.5903 8.66149 14.429 8.82555L10.5282 12.7924C10.2576 13.0675 9.81477 13.0694 9.54196 12.7966L5.57345 8.828Z", fill: "#333333" }) });
921
921
  }
922
922
  function ze() {
923
923
  return (
@@ -959,69 +959,86 @@ function Xe({
959
959
  maxVisible: s = 6,
960
960
  className: r,
961
961
  style: p,
962
- getPopupContainer: C,
963
- dropdownStyle: A
962
+ getPopupContainer: f,
963
+ dropdownStyle: g
964
964
  }) {
965
- const [g, a] = P(!1), [f, E] = P(e), v = G(null), O = G(null), [W, _] = P({}), j = ct(() => {
966
- if (!v.current) return;
967
- const S = v.current.getBoundingClientRect();
968
- let y = 0, m = v.current.parentElement;
969
- for (; m && m !== document.documentElement; ) {
970
- const N = parseInt(window.getComputedStyle(m).zIndex, 10);
971
- if (!isNaN(N) && N > y && (y = N), m.parentElement)
972
- for (const w of m.parentElement.children) {
973
- if (w === m || !(w instanceof HTMLElement)) continue;
974
- const b = parseInt(window.getComputedStyle(w).zIndex, 10);
975
- !isNaN(b) && b > y && (y = b);
965
+ const [h, a] = H(!1), [y, b] = H(e), I = R(null), G = R(null), q = R(null), X = R(!1), [S, N] = H({}), [k, P] = H(), T = ct(() => {
966
+ var et;
967
+ if (!I.current) return;
968
+ const w = I.current.getBoundingClientRect();
969
+ let v = 0, C = I.current.parentElement;
970
+ for (; C && C !== document.documentElement; ) {
971
+ const O = parseInt(window.getComputedStyle(C).zIndex, 10);
972
+ if (!isNaN(O) && O > v && (v = O), C.parentElement)
973
+ for (const F of C.parentElement.children) {
974
+ if (F === C || !(F instanceof HTMLElement)) continue;
975
+ const nt = parseInt(window.getComputedStyle(F).zIndex, 10);
976
+ !isNaN(nt) && nt > v && (v = nt);
976
977
  }
977
- m = m.parentElement;
978
+ C = C.parentElement;
978
979
  }
979
- _({
980
+ const E = ((et = q.current) == null ? void 0 : et.offsetHeight) ?? 0, j = window.innerHeight - w.bottom, L = w.top, M = E > 0 && j < E + 4 && L > j;
981
+ N({
980
982
  position: "fixed",
981
- top: S.bottom + 4,
982
- left: S.left,
983
- zIndex: y > 0 ? y + 10 : 1100,
984
- ...A
983
+ top: M ? w.top - E - 4 : w.bottom + 4,
984
+ left: w.left,
985
+ zIndex: v > 0 ? v + 10 : 1100,
986
+ ...g
985
987
  });
986
- }, [A]);
987
- Et(() => {
988
- g && j();
989
- }, [g, f, j]), ot(() => {
990
- if (!g) return;
991
- function S(m) {
992
- var w, b;
993
- const N = m.target;
994
- (w = v.current) != null && w.contains(N) || (b = O.current) != null && b.contains(N) || a(!1);
988
+ }, [g]);
989
+ vt(() => {
990
+ h && T();
991
+ }, [h, y, T]), vt(() => {
992
+ const w = h && !X.current;
993
+ if (X.current = h, !h || !q.current) return;
994
+ const v = q.current.querySelectorAll(".bu-category-dropdown__col");
995
+ v.forEach((j) => {
996
+ j.style.width = "";
997
+ });
998
+ let C = 0;
999
+ v.forEach((j) => {
1000
+ j.offsetWidth > C && (C = j.offsetWidth);
1001
+ });
1002
+ const E = w ? C : Math.max(k ?? 0, C);
1003
+ v.forEach((j) => {
1004
+ j.style.width = E ? `${E}px` : "";
1005
+ }), E !== k && P(E || void 0);
1006
+ }, [h, y]), ot(() => {
1007
+ if (!h) return;
1008
+ function w(C) {
1009
+ var j, L;
1010
+ const E = C.target;
1011
+ (j = I.current) != null && j.contains(E) || (L = G.current) != null && L.contains(E) || a(!1);
995
1012
  }
996
- function y() {
1013
+ function v() {
997
1014
  a(!1);
998
1015
  }
999
- return document.addEventListener("mousedown", S), document.addEventListener("scroll", y, !0), window.addEventListener("resize", j), () => {
1000
- document.removeEventListener("mousedown", S), document.removeEventListener("scroll", y, !0), window.removeEventListener("resize", j);
1016
+ return document.addEventListener("mousedown", w), document.addEventListener("scroll", v, !0), window.addEventListener("resize", T), () => {
1017
+ document.removeEventListener("mousedown", w), document.removeEventListener("scroll", v, !0), window.removeEventListener("resize", T);
1001
1018
  };
1002
- }, [g, j]);
1003
- const B = xt(n, e), D = B.length > 0, H = D ? B.map((S) => S.label).join(" / ") : null, Y = je(n, f);
1004
- function L(S, y) {
1005
- var N;
1006
- if (y.disabled) return;
1007
- const m = f.slice(0, S + 1);
1008
- if (m[S] = y.value, E(m), !((N = y.children) != null && N.length)) {
1009
- const w = xt(n, m);
1010
- i == null || i(m, w), a(!1);
1019
+ }, [h, T]);
1020
+ const D = xt(n, e), W = D.length > 0, U = W ? D.map((w) => w.label).join(" / ") : null, V = je(n, y);
1021
+ function _(w, v) {
1022
+ var E;
1023
+ if (v.disabled) return;
1024
+ const C = y.slice(0, w + 1);
1025
+ if (C[w] = v.value, b(C), !((E = v.children) != null && E.length)) {
1026
+ const j = xt(n, C);
1027
+ i == null || i(C, j), a(!1);
1011
1028
  }
1012
1029
  }
1013
- function Z() {
1014
- E(e), a(!0);
1030
+ function $() {
1031
+ b(e), a(!0);
1015
1032
  }
1016
- const T = [
1033
+ const Z = [
1017
1034
  "bu-category-dropdown__trigger",
1018
- g ? "bu-category-dropdown__trigger--open" : "",
1019
- D ? "bu-category-dropdown__trigger--has-value" : ""
1035
+ h ? "bu-category-dropdown__trigger--open" : "",
1036
+ W ? "bu-category-dropdown__trigger--has-value" : ""
1020
1037
  ].filter(Boolean).join(" ");
1021
1038
  return /* @__PURE__ */ l(
1022
1039
  "div",
1023
1040
  {
1024
- ref: v,
1041
+ ref: I,
1025
1042
  className: `bu-category-dropdown${r ? ` ${r}` : ""}`,
1026
1043
  style: p,
1027
1044
  children: [
@@ -1029,73 +1046,74 @@ function Xe({
1029
1046
  "button",
1030
1047
  {
1031
1048
  type: "button",
1032
- className: T,
1049
+ className: Z,
1033
1050
  disabled: u,
1034
- onClick: () => g ? a(!1) : Z(),
1051
+ onClick: () => h ? a(!1) : $(),
1035
1052
  children: [
1036
1053
  /* @__PURE__ */ t(
1037
1054
  St,
1038
1055
  {
1039
- text: H ?? c,
1040
- spanClassName: `bu-category-dropdown__trigger-label${D ? "" : " bu-category-dropdown__trigger-label--placeholder"}`,
1056
+ text: U ?? c,
1057
+ spanClassName: `bu-category-dropdown__trigger-label${W ? "" : " bu-category-dropdown__trigger-label--placeholder"}`,
1041
1058
  wrapperStyle: { flex: 1, minWidth: 0, display: "block" },
1042
- getPopupContainer: C
1059
+ getPopupContainer: f
1043
1060
  }
1044
1061
  ),
1045
- /* @__PURE__ */ t("span", { className: `bu-category-dropdown__trigger-chevron${g ? " bu-category-dropdown__trigger-chevron--open" : ""}`, children: /* @__PURE__ */ t(Ke, {}) })
1062
+ /* @__PURE__ */ t("span", { className: `bu-category-dropdown__trigger-chevron${h ? " bu-category-dropdown__trigger-chevron--open" : ""}`, children: /* @__PURE__ */ t(Ke, {}) })
1046
1063
  ]
1047
1064
  }
1048
1065
  ),
1049
- g && Mt(
1050
- /* @__PURE__ */ t("div", { ref: O, style: W, className: "bu-category-dropdown__portal", children: /* @__PURE__ */ t("div", { className: "bu-category-dropdown__panel", children: Y.map((S, y) => {
1051
- const m = S.length > s, N = y === Y.length - 1, w = [
1066
+ h && Mt(
1067
+ /* @__PURE__ */ t("div", { ref: G, style: S, className: "bu-category-dropdown__portal", children: /* @__PURE__ */ t("div", { className: "bu-category-dropdown__panel", ref: q, children: V.map((w, v) => {
1068
+ const C = w.length > s, E = v === V.length - 1, j = [
1052
1069
  "bu-category-dropdown__col",
1053
- y > 0 ? "bu-category-dropdown__col--indent" : "",
1054
- m ? "bu-category-dropdown__col--scrollable" : "",
1055
- N && y > 0 ? "bu-category-dropdown__col--last" : ""
1070
+ v > 0 ? "bu-category-dropdown__col--indent" : "",
1071
+ C ? "bu-category-dropdown__col--scrollable" : "",
1072
+ E && v > 0 ? "bu-category-dropdown__col--last" : ""
1056
1073
  ].filter(Boolean).join(" ");
1057
1074
  return /* @__PURE__ */ l("div", { style: { display: "contents" }, children: [
1058
- y > 0 && /* @__PURE__ */ t("div", { className: "bu-category-dropdown__divider" }),
1075
+ v > 0 && /* @__PURE__ */ t("div", { className: "bu-category-dropdown__divider" }),
1059
1076
  /* @__PURE__ */ t(
1060
1077
  "div",
1061
1078
  {
1062
- className: w,
1063
- onMouseEnter: m ? (b) => b.currentTarget.classList.add("bu-category-dropdown__col--scrollbar-visible") : void 0,
1064
- onMouseLeave: m ? (b) => b.currentTarget.classList.remove("bu-category-dropdown__col--scrollbar-visible") : void 0,
1065
- children: S.map((b) => {
1066
- var $;
1067
- const Q = f[y] === b.value, q = !!(($ = b.children) != null && $.length), X = [
1079
+ className: j,
1080
+ style: k ? { width: k } : void 0,
1081
+ onMouseEnter: C ? (L) => L.currentTarget.classList.add("bu-category-dropdown__col--scrollbar-visible") : void 0,
1082
+ onMouseLeave: C ? (L) => L.currentTarget.classList.remove("bu-category-dropdown__col--scrollbar-visible") : void 0,
1083
+ children: w.map((L) => {
1084
+ var F;
1085
+ const M = y[v] === L.value, et = !!((F = L.children) != null && F.length), O = [
1068
1086
  "bu-category-dropdown__item",
1069
- Q && q ? "bu-category-dropdown__item--selected-branch" : "",
1070
- Q && !q ? "bu-category-dropdown__item--selected-leaf" : "",
1071
- b.disabled ? "bu-category-dropdown__item--disabled" : ""
1087
+ M && et ? "bu-category-dropdown__item--selected-branch" : "",
1088
+ M && !et ? "bu-category-dropdown__item--selected-leaf" : "",
1089
+ L.disabled ? "bu-category-dropdown__item--disabled" : ""
1072
1090
  ].filter(Boolean).join(" ");
1073
1091
  return /* @__PURE__ */ l(
1074
1092
  "button",
1075
1093
  {
1076
1094
  type: "button",
1077
- className: X,
1078
- disabled: b.disabled,
1079
- onClick: () => L(y, b),
1095
+ className: O,
1096
+ disabled: L.disabled,
1097
+ onClick: () => _(v, L),
1080
1098
  children: [
1081
1099
  /* @__PURE__ */ t(
1082
1100
  St,
1083
1101
  {
1084
- text: b.label,
1102
+ text: L.label,
1085
1103
  spanClassName: "bu-category-dropdown__item-label",
1086
1104
  wrapperStyle: { flex: 1, minWidth: 0, display: "block" },
1087
- getPopupContainer: C
1105
+ getPopupContainer: f
1088
1106
  }
1089
1107
  ),
1090
- Q && q && /* @__PURE__ */ t("span", { className: "bu-category-dropdown__item-arrow", children: /* @__PURE__ */ t(ze, {}) })
1108
+ M && et && /* @__PURE__ */ t("span", { className: "bu-category-dropdown__item-arrow", children: /* @__PURE__ */ t(ze, {}) })
1091
1109
  ]
1092
1110
  },
1093
- b.value
1111
+ L.value
1094
1112
  );
1095
1113
  })
1096
1114
  }
1097
1115
  )
1098
- ] }, y);
1116
+ ] }, v);
1099
1117
  }) }) }),
1100
1118
  document.body
1101
1119
  )
@@ -1112,97 +1130,97 @@ const Ve = (n) => {
1112
1130
  total: s = 0,
1113
1131
  onChange: r,
1114
1132
  onShowSizeChange: p,
1115
- showSizeChanger: C = !1,
1116
- showQuickJumper: A = !1,
1117
- pageSizeOptions: g = [10, 20, 50, 100],
1133
+ showSizeChanger: f = !1,
1134
+ showQuickJumper: g = !1,
1135
+ pageSizeOptions: h = [10, 20, 50, 100],
1118
1136
  disabled: a = !1,
1119
- hideOnSinglePage: f = !1,
1120
- showTotal: E,
1121
- size: v = "medium",
1122
- align: O = "start",
1123
- simple: W = !1,
1124
- popupPlacement: _,
1125
- t: j = (h) => h,
1126
- className: B,
1127
- style: D
1128
- } = n, [H, Y] = P(i), [L, Z] = P(u), [T, S] = P(!1), [y, m] = P("bottom"), N = G(null), w = e ?? H, b = c ?? L, Q = Math.ceil(s / b);
1129
- if (f && Q <= 1)
1137
+ hideOnSinglePage: y = !1,
1138
+ showTotal: b,
1139
+ size: I = "medium",
1140
+ align: G = "start",
1141
+ simple: q = !1,
1142
+ popupPlacement: X,
1143
+ t: S = (A) => A,
1144
+ className: N,
1145
+ style: k
1146
+ } = n, [P, T] = H(i), [D, W] = H(u), [U, V] = H(!1), [_, $] = H("bottom"), Z = R(null), w = e ?? P, v = c ?? D, C = Math.ceil(s / v);
1147
+ if (y && C <= 1)
1130
1148
  return null;
1131
- const q = (h) => {
1132
- a || h < 1 || h > Q || h === w || (e === void 0 && Y(h), r == null || r(h, b));
1133
- }, X = (h) => {
1134
- const R = Math.ceil(s / h), k = Math.min(w, R) || 1;
1135
- c === void 0 && (Z(h), e === void 0 && Y(k)), p == null || p(k, h), r == null || r(k, h);
1136
- }, $ = () => {
1149
+ const E = (A) => {
1150
+ a || A < 1 || A > C || A === w || (e === void 0 && T(A), r == null || r(A, v));
1151
+ }, j = (A) => {
1152
+ const J = Math.ceil(s / A), Q = Math.min(w, J) || 1;
1153
+ c === void 0 && (W(A), e === void 0 && T(Q)), p == null || p(Q, A), r == null || r(Q, A);
1154
+ }, L = () => {
1137
1155
  if (!a) {
1138
- if (T) {
1139
- S(!1);
1156
+ if (U) {
1157
+ V(!1);
1140
1158
  return;
1141
1159
  }
1142
- if (_ === void 0 && N.current) {
1143
- const h = N.current.getBoundingClientRect(), R = g.length * 40 + 8, k = window.innerHeight - h.bottom, o = h.top;
1144
- m(k < R && o >= R ? "top" : "bottom");
1160
+ if (X === void 0 && Z.current) {
1161
+ const A = Z.current.getBoundingClientRect(), J = h.length * 40 + 8, Q = window.innerHeight - A.bottom, o = A.top;
1162
+ $(Q < J && o >= J ? "top" : "bottom");
1145
1163
  }
1146
- S(!0);
1164
+ V(!0);
1147
1165
  }
1148
- }, x = (h) => {
1149
- X(h), S(!1);
1166
+ }, M = (A) => {
1167
+ j(A), V(!1);
1150
1168
  };
1151
1169
  ot(() => {
1152
- const h = (R) => {
1153
- N.current && !N.current.contains(R.target) && S(!1);
1170
+ const A = (J) => {
1171
+ Z.current && !Z.current.contains(J.target) && V(!1);
1154
1172
  };
1155
- if (T)
1156
- return document.addEventListener("mousedown", h), () => {
1157
- document.removeEventListener("mousedown", h);
1173
+ if (U)
1174
+ return document.addEventListener("mousedown", A), () => {
1175
+ document.removeEventListener("mousedown", A);
1158
1176
  };
1159
- }, [T]);
1160
- const rt = (h) => {
1161
- const R = parseInt(h.target.value);
1162
- !isNaN(R) && R >= 1 && R <= Q && q(R);
1163
- }, F = dt(() => {
1164
- const h = [];
1165
- if (Q <= 7)
1166
- for (let k = 1; k <= Q; k++)
1167
- h.push(k);
1177
+ }, [U]);
1178
+ const et = (A) => {
1179
+ const J = parseInt(A.target.value);
1180
+ !isNaN(J) && J >= 1 && J <= C && E(J);
1181
+ }, O = dt(() => {
1182
+ const A = [];
1183
+ if (C <= 7)
1184
+ for (let Q = 1; Q <= C; Q++)
1185
+ A.push(Q);
1168
1186
  else if (w <= 4) {
1169
- for (let k = 1; k <= 5; k++)
1170
- h.push(k);
1171
- h.push("..."), h.push(Q);
1172
- } else if (w >= Q - 3) {
1173
- h.push(1), h.push("...");
1174
- for (let k = Q - 4; k <= Q; k++)
1175
- h.push(k);
1187
+ for (let Q = 1; Q <= 5; Q++)
1188
+ A.push(Q);
1189
+ A.push("..."), A.push(C);
1190
+ } else if (w >= C - 3) {
1191
+ A.push(1), A.push("...");
1192
+ for (let Q = C - 4; Q <= C; Q++)
1193
+ A.push(Q);
1176
1194
  } else {
1177
- h.push(1), h.push("...");
1178
- for (let k = w - 1; k <= w + 1; k++)
1179
- h.push(k);
1180
- h.push("..."), h.push(Q);
1195
+ A.push(1), A.push("...");
1196
+ for (let Q = w - 1; Q <= w + 1; Q++)
1197
+ A.push(Q);
1198
+ A.push("..."), A.push(C);
1181
1199
  }
1182
- return h;
1183
- }, [w, Q]), tt = (w - 1) * b + 1, et = Math.min(w * b, s), st = `pagination-${v}`, J = `pagination-${O}`, nt = a ? "pagination-disabled" : "", lt = (h, R) => h === "..." ? /* @__PURE__ */ t("span", { className: "pagination-item pagination-ellipsis", children: "..." }, `ellipsis-${R}`) : /* @__PURE__ */ t(
1200
+ return A;
1201
+ }, [w, C]), F = (w - 1) * v + 1, nt = Math.min(w * v, s), st = `pagination-${I}`, x = `pagination-${G}`, it = a ? "pagination-disabled" : "", lt = (A, J) => A === "..." ? /* @__PURE__ */ t("span", { className: "pagination-item pagination-ellipsis", children: "..." }, `ellipsis-${J}`) : /* @__PURE__ */ t(
1184
1202
  "button",
1185
1203
  {
1186
1204
  type: "button",
1187
- className: `pagination-item ${h === w ? "pagination-item-active" : ""}`,
1188
- onClick: () => q(h),
1205
+ className: `pagination-item ${A === w ? "pagination-item-active" : ""}`,
1206
+ onClick: () => E(A),
1189
1207
  disabled: a,
1190
- children: h
1208
+ children: A
1191
1209
  },
1192
- h
1210
+ A
1193
1211
  );
1194
- return W ? /* @__PURE__ */ t(
1212
+ return q ? /* @__PURE__ */ t(
1195
1213
  "div",
1196
1214
  {
1197
- className: `pagination pagination-simple ${nt} ${B || ""}`,
1198
- style: D,
1215
+ className: `pagination pagination-simple ${it} ${N || ""}`,
1216
+ style: k,
1199
1217
  children: /* @__PURE__ */ l("div", { className: "pagination-simple-list", children: [
1200
1218
  /* @__PURE__ */ t(
1201
1219
  "button",
1202
1220
  {
1203
1221
  type: "button",
1204
1222
  className: "pagination-simple-item pagination-simple-prev",
1205
- onClick: () => q(w - 1),
1223
+ onClick: () => E(w - 1),
1206
1224
  disabled: a || w === 1,
1207
1225
  children: /* @__PURE__ */ t("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ t("path", { d: "M8 2L4 6L8 10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
1208
1226
  }
@@ -1210,15 +1228,15 @@ const Ve = (n) => {
1210
1228
  /* @__PURE__ */ l("span", { className: "pagination-simple-text", children: [
1211
1229
  w,
1212
1230
  " / ",
1213
- Q || 0
1231
+ C || 0
1214
1232
  ] }),
1215
1233
  /* @__PURE__ */ t(
1216
1234
  "button",
1217
1235
  {
1218
1236
  type: "button",
1219
1237
  className: "pagination-simple-item pagination-simple-next",
1220
- onClick: () => q(w + 1),
1221
- disabled: a || w === Q,
1238
+ onClick: () => E(w + 1),
1239
+ disabled: a || w === C,
1222
1240
  children: /* @__PURE__ */ t("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ t("path", { d: "M4 2L8 6L4 10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
1223
1241
  }
1224
1242
  )
@@ -1227,17 +1245,17 @@ const Ve = (n) => {
1227
1245
  ) : /* @__PURE__ */ l(
1228
1246
  "div",
1229
1247
  {
1230
- className: `pagination ${st} ${J} ${nt} ${B || ""}`,
1231
- style: D,
1248
+ className: `pagination ${st} ${x} ${it} ${N || ""}`,
1249
+ style: k,
1232
1250
  children: [
1233
- E && /* @__PURE__ */ t("div", { className: "pagination-total", children: E(s, [tt, et]) }),
1251
+ b && /* @__PURE__ */ t("div", { className: "pagination-total", children: b(s, [F, nt]) }),
1234
1252
  /* @__PURE__ */ l("div", { className: "pagination-list", children: [
1235
1253
  /* @__PURE__ */ t(
1236
1254
  "button",
1237
1255
  {
1238
1256
  type: "button",
1239
1257
  className: "pagination-item pagination-prev",
1240
- onClick: () => q(w - 1),
1258
+ onClick: () => E(w - 1),
1241
1259
  disabled: a || w === 1,
1242
1260
  children: /* @__PURE__ */ l("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1243
1261
  /* @__PURE__ */ t("path", { d: "M11.1749 5.57516C11.3377 5.41245 11.6014 5.41245 11.7641 5.57516C11.9268 5.73788 11.9268 6.00164 11.7641 6.16436L7.8945 10.034L11.7617 13.8366C11.9257 13.998 11.9279 14.2617 11.7666 14.4258C11.6052 14.5899 11.3414 14.592 11.1774 14.4307L7.2105 10.5299C6.93541 10.2594 6.93349 9.81648 7.20629 9.54367L11.1749 5.57516Z", fill: "#333333" }),
@@ -1245,14 +1263,14 @@ const Ve = (n) => {
1245
1263
  ] })
1246
1264
  }
1247
1265
  ),
1248
- F.map((h, R) => lt(h, R)),
1266
+ O.map((A, J) => lt(A, J)),
1249
1267
  /* @__PURE__ */ t(
1250
1268
  "button",
1251
1269
  {
1252
1270
  type: "button",
1253
1271
  className: "pagination-item pagination-next",
1254
- onClick: () => q(w + 1),
1255
- disabled: a || w === Q,
1272
+ onClick: () => E(w + 1),
1273
+ disabled: a || w === C,
1256
1274
  children: /* @__PURE__ */ l("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1257
1275
  /* @__PURE__ */ t("path", { d: "M8.82507 5.57516C8.66235 5.41245 8.39859 5.41245 8.23587 5.57516C8.07315 5.73788 8.07315 6.00164 8.23587 6.16436L12.1055 10.034L8.23831 13.8366C8.07427 13.998 8.0721 14.2617 8.23343 14.4258C8.39478 14.5899 8.65856 14.592 8.82262 14.4307L12.7895 10.5299C13.0646 10.2594 13.0665 9.81648 12.7937 9.54367L8.82507 5.57516Z", fill: "#333333" }),
1258
1276
  /* @__PURE__ */ t("path", { d: "M8.82507 5.57516C8.66235 5.41245 8.39859 5.41245 8.23587 5.57516C8.07315 5.73788 8.07315 6.00164 8.23587 6.16436L12.1055 10.034L8.23831 13.8366C8.07427 13.998 8.0721 14.2617 8.23343 14.4258C8.39478 14.5899 8.65856 14.592 8.82262 14.4307L12.7895 10.5299C13.0646 10.2594 13.0665 9.81648 12.7937 9.54367L8.82507 5.57516Z", fill: "black", "fill-opacity": "0.2" })
@@ -1260,54 +1278,54 @@ const Ve = (n) => {
1260
1278
  }
1261
1279
  )
1262
1280
  ] }),
1263
- C && /* @__PURE__ */ l("div", { className: "pagination-sizer", ref: N, children: [
1281
+ f && /* @__PURE__ */ l("div", { className: "pagination-sizer", ref: Z, children: [
1264
1282
  /* @__PURE__ */ l(
1265
1283
  "button",
1266
1284
  {
1267
1285
  type: "button",
1268
1286
  className: "pagination-sizer-select",
1269
- onClick: $,
1287
+ onClick: L,
1270
1288
  disabled: a,
1271
1289
  children: [
1272
- b,
1273
- j("条每页"),
1274
- /* @__PURE__ */ l("svg", { className: `pagination-sizer-icon${T ? " pagination-sizer-icon-open" : ""}`, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1290
+ v,
1291
+ S("条每页"),
1292
+ /* @__PURE__ */ l("svg", { className: `pagination-sizer-icon${U ? " pagination-sizer-icon-open" : ""}`, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1275
1293
  /* @__PURE__ */ t("path", { d: "M5.57321 8.828C5.41049 8.66528 5.41049 8.40152 5.57321 8.2388C5.73593 8.07608 5.99969 8.07608 6.1624 8.2388L10.032 12.1084L13.8347 8.24124C13.996 8.0772 14.2598 8.07503 14.4239 8.23636C14.5879 8.39771 14.5901 8.66149 14.4287 8.82555L10.5279 12.7924C10.2574 13.0675 9.81452 13.0694 9.54172 12.7966L5.57321 8.828Z", fill: "#333333" }),
1276
1294
  /* @__PURE__ */ t("path", { d: "M5.57321 8.828C5.41049 8.66528 5.41049 8.40152 5.57321 8.2388C5.73593 8.07608 5.99969 8.07608 6.1624 8.2388L10.032 12.1084L13.8347 8.24124C13.996 8.0772 14.2598 8.07503 14.4239 8.23636C14.5879 8.39771 14.5901 8.66149 14.4287 8.82555L10.5279 12.7924C10.2574 13.0675 9.81452 13.0694 9.54172 12.7966L5.57321 8.828Z", fill: "black", fillOpacity: "0.2" })
1277
1295
  ] })
1278
1296
  ]
1279
1297
  }
1280
1298
  ),
1281
- T && /* @__PURE__ */ t("div", { className: `pagination-sizer-dropdown pagination-sizer-dropdown-${_ ?? y}`, children: g.map((h) => /* @__PURE__ */ l(
1299
+ U && /* @__PURE__ */ t("div", { className: `pagination-sizer-dropdown pagination-sizer-dropdown-${X ?? _}`, children: h.map((A) => /* @__PURE__ */ l(
1282
1300
  "button",
1283
1301
  {
1284
1302
  type: "button",
1285
1303
  className: "pagination-sizer-option",
1286
- onClick: () => x(h),
1287
- "data-selected": h === b,
1304
+ onClick: () => M(A),
1305
+ "data-selected": A === v,
1288
1306
  children: [
1289
- h,
1290
- j("条/页")
1307
+ A,
1308
+ S("条/页")
1291
1309
  ]
1292
1310
  },
1293
- h
1311
+ A
1294
1312
  )) })
1295
1313
  ] }),
1296
- A && /* @__PURE__ */ l("div", { className: "pagination-jumper", children: [
1297
- /* @__PURE__ */ t("span", { children: j("跳至") }),
1314
+ g && /* @__PURE__ */ l("div", { className: "pagination-jumper", children: [
1315
+ /* @__PURE__ */ t("span", { children: S("跳至") }),
1298
1316
  /* @__PURE__ */ t(
1299
1317
  "input",
1300
1318
  {
1301
1319
  type: "number",
1302
1320
  className: "pagination-jumper-input",
1303
1321
  min: 1,
1304
- max: Q,
1305
- onChange: rt,
1322
+ max: C,
1323
+ onChange: et,
1306
1324
  disabled: a,
1307
1325
  placeholder: ""
1308
1326
  }
1309
1327
  ),
1310
- /* @__PURE__ */ t("span", { children: j("页") })
1328
+ /* @__PURE__ */ t("span", { children: S("页") })
1311
1329
  ] })
1312
1330
  ]
1313
1331
  }
@@ -1370,17 +1388,17 @@ function Pt() {
1370
1388
  ] });
1371
1389
  }
1372
1390
  function Tt({ fileName: n, onRename: e }) {
1373
- const [i, c] = P(!1), [u, s] = P(n), r = G(null);
1391
+ const [i, c] = H(!1), [u, s] = H(n), r = R(null);
1374
1392
  ot(() => {
1375
- var f, E;
1376
- i && (s(n), (f = r.current) == null || f.focus(), (E = r.current) == null || E.select());
1393
+ var y, b;
1394
+ i && (s(n), (y = r.current) == null || y.focus(), (b = r.current) == null || b.select());
1377
1395
  }, [i, n]);
1378
1396
  const p = async () => {
1379
- const f = u.trim();
1380
- f && f !== n && await (e == null ? void 0 : e(f)), c(!1);
1381
- }, C = () => c(!1), A = (f) => {
1382
- f.key === "Enter" && !f.shiftKey && (f.preventDefault(), p()), f.key === "Escape" && C();
1383
- }, g = () => {
1397
+ const y = u.trim();
1398
+ y && y !== n && await (e == null ? void 0 : e(y)), c(!1);
1399
+ }, f = () => c(!1), g = (y) => {
1400
+ y.key === "Enter" && !y.shiftKey && (y.preventDefault(), p()), y.key === "Escape" && f();
1401
+ }, h = () => {
1384
1402
  p();
1385
1403
  }, a = () => {
1386
1404
  e && c(!0);
@@ -1391,9 +1409,9 @@ function Tt({ fileName: n, onRename: e }) {
1391
1409
  ref: r,
1392
1410
  className: "file-card__edit-input",
1393
1411
  value: u,
1394
- onChange: (f) => s(f.target.value),
1395
- onKeyDown: A,
1396
- onBlur: g,
1412
+ onChange: (y) => s(y.target.value),
1413
+ onKeyDown: g,
1414
+ onBlur: h,
1397
1415
  rows: 2,
1398
1416
  style: { height: "42px" }
1399
1417
  }
@@ -1419,11 +1437,11 @@ function ke({ fileName: n, fileType: e, fileUrl: i, onDelete: c, onRename: u, on
1419
1437
  return /* @__PURE__ */ l("div", { className: `file-card file-card--other ${r || ""}`, style: p, children: [
1420
1438
  /* @__PURE__ */ l("div", { className: "file-card__other-preview", onClick: s, children: [
1421
1439
  (s || c) && /* @__PURE__ */ l("div", { className: "file-card__overlay", children: [
1422
- s && /* @__PURE__ */ t("button", { className: "file-card__overlay-btn", onClick: (C) => {
1423
- C.stopPropagation(), s();
1440
+ s && /* @__PURE__ */ t("button", { className: "file-card__overlay-btn", onClick: (f) => {
1441
+ f.stopPropagation(), s();
1424
1442
  }, children: /* @__PURE__ */ t(Gt, {}) }),
1425
- c && /* @__PURE__ */ t("button", { className: "file-card__overlay-btn", onClick: (C) => {
1426
- C.stopPropagation(), c();
1443
+ c && /* @__PURE__ */ t("button", { className: "file-card__overlay-btn", onClick: (f) => {
1444
+ f.stopPropagation(), c();
1427
1445
  }, children: /* @__PURE__ */ t(Pt, {}) })
1428
1446
  ] }),
1429
1447
  /* @__PURE__ */ t(Ne, { fileType: e, fileUrl: i, fileName: n })
@@ -1443,35 +1461,35 @@ const De = ({
1443
1461
  checkedChildren: s,
1444
1462
  unCheckedChildren: r,
1445
1463
  theme: p = "light",
1446
- activeColor: C,
1447
- inactiveColor: A,
1448
- className: g,
1464
+ activeColor: f,
1465
+ inactiveColor: g,
1466
+ className: h,
1449
1467
  style: a
1450
1468
  }) => {
1451
- const f = n !== void 0, [E, v] = P(e), O = f ? n : E, W = ct(() => {
1469
+ const y = n !== void 0, [b, I] = H(e), G = y ? n : b, q = ct(() => {
1452
1470
  if (c || u) return;
1453
- const H = !O;
1454
- f || v(H), i == null || i(H);
1455
- }, [O, c, u, f, i]), B = O ? C ?? (p === "dark" ? "var(--bu-switch-dark-on)" : "var(--bu-switch-light-on)") : A ?? (p === "dark" ? "var(--bu-switch-dark-off)" : "var(--bu-switch-light-off)"), D = [
1471
+ const P = !G;
1472
+ y || I(P), i == null || i(P);
1473
+ }, [G, c, u, y, i]), N = G ? f ?? (p === "dark" ? "var(--bu-switch-dark-on)" : "var(--bu-switch-light-on)") : g ?? (p === "dark" ? "var(--bu-switch-dark-off)" : "var(--bu-switch-light-off)"), k = [
1456
1474
  "bu-switch",
1457
- O && "bu-switch--checked",
1475
+ G && "bu-switch--checked",
1458
1476
  c && "bu-switch--disabled",
1459
1477
  u && "bu-switch--loading",
1460
- g
1478
+ h
1461
1479
  ].filter(Boolean).join(" ");
1462
1480
  return /* @__PURE__ */ t(
1463
1481
  "button",
1464
1482
  {
1465
1483
  type: "button",
1466
1484
  role: "switch",
1467
- "aria-checked": O,
1485
+ "aria-checked": G,
1468
1486
  "aria-disabled": c,
1469
- className: D,
1487
+ className: k,
1470
1488
  style: {
1471
- "--bu-switch-track-bg": B,
1489
+ "--bu-switch-track-bg": N,
1472
1490
  ...a
1473
1491
  },
1474
- onClick: W,
1492
+ onClick: q,
1475
1493
  children: /* @__PURE__ */ l("span", { className: "bu-switch__track", children: [
1476
1494
  r != null && /* @__PURE__ */ t("span", { className: "bu-switch__label bu-switch__label--left", children: r }),
1477
1495
  /* @__PURE__ */ t("span", { className: "bu-switch__thumb", children: u && /* @__PURE__ */ t("span", { className: "bu-switch__loading-icon", children: /* @__PURE__ */ t("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t(
@@ -1490,7 +1508,7 @@ const De = ({
1490
1508
  };
1491
1509
  De.displayName = "BuSwitch";
1492
1510
  function Le(n, e) {
1493
- const i = G(null);
1511
+ const i = R(null);
1494
1512
  function c() {
1495
1513
  if (n)
1496
1514
  try {
@@ -1508,24 +1526,24 @@ function Le(n, e) {
1508
1526
  function u() {
1509
1527
  if (!(!n || !i.current || !e))
1510
1528
  try {
1511
- const { value: s } = n, { beforeTxt: r, afterTxt: p, start: C } = i.current;
1512
- let A = s.length;
1529
+ const { value: s } = n, { beforeTxt: r, afterTxt: p, start: f } = i.current;
1530
+ let g = s.length;
1513
1531
  if (s.startsWith(r))
1514
- A = r.length;
1532
+ g = r.length;
1515
1533
  else if (s.endsWith(p))
1516
- A = s.length - p.length;
1534
+ g = s.length - p.length;
1517
1535
  else {
1518
- const g = r[C - 1], a = s.indexOf(g, C - 1);
1519
- a !== -1 && (A = a + 1);
1536
+ const h = r[f - 1], a = s.indexOf(h, f - 1);
1537
+ a !== -1 && (g = a + 1);
1520
1538
  }
1521
- n.setSelectionRange(A, A);
1539
+ n.setSelectionRange(g, g);
1522
1540
  } catch {
1523
1541
  }
1524
1542
  }
1525
1543
  return [c, u];
1526
1544
  }
1527
1545
  function Se() {
1528
- const n = G(0), e = () => cancelAnimationFrame(n.current);
1546
+ const n = R(0), e = () => cancelAnimationFrame(n.current);
1529
1547
  return ot(() => e, []), (i) => {
1530
1548
  e(), n.current = requestAnimationFrame(i);
1531
1549
  };
@@ -1541,17 +1559,17 @@ function Jt({ className: n }) {
1541
1559
  ) });
1542
1560
  }
1543
1561
  function Re({ icon: n, upDisabled: e, downDisabled: i, onStep: c }) {
1544
- const u = G(void 0), s = G(c);
1562
+ const u = R(void 0), s = R(c);
1545
1563
  s.current = c;
1546
- const r = () => clearTimeout(u.current), p = (A, g) => {
1547
- A.preventDefault(), r(), s.current(g);
1564
+ const r = () => clearTimeout(u.current), p = (g, h) => {
1565
+ g.preventDefault(), r(), s.current(h);
1548
1566
  function a() {
1549
- s.current(g), u.current = setTimeout(a, Je);
1567
+ s.current(h), u.current = setTimeout(a, Je);
1550
1568
  }
1551
1569
  u.current = setTimeout(a, xe);
1552
1570
  };
1553
1571
  ot(() => r, []);
1554
- const C = {
1572
+ const f = {
1555
1573
  unselectable: "on",
1556
1574
  role: "button",
1557
1575
  onMouseUp: r,
@@ -1565,21 +1583,21 @@ function Re({ icon: n, upDisabled: e, downDisabled: i, onStep: c }) {
1565
1583
  /* @__PURE__ */ t(
1566
1584
  "span",
1567
1585
  {
1568
- ...C,
1586
+ ...f,
1569
1587
  "aria-label": "Increase Value",
1570
1588
  "aria-disabled": e,
1571
1589
  className: e ? "bj-input-number__handler bj-input-number__handler--up bj-input-number__handler--disabled" : "bj-input-number__handler bj-input-number__handler--up",
1572
- onMouseDown: (A) => p(A, !0)
1590
+ onMouseDown: (g) => p(g, !0)
1573
1591
  }
1574
1592
  ),
1575
1593
  /* @__PURE__ */ t(
1576
1594
  "span",
1577
1595
  {
1578
- ...C,
1596
+ ...f,
1579
1597
  "aria-label": "Decrease Value",
1580
1598
  "aria-disabled": i,
1581
1599
  className: i ? "bj-input-number__handler bj-input-number__handler--down bj-input-number__handler--disabled" : "bj-input-number__handler bj-input-number__handler--down",
1582
- onMouseDown: (A) => p(A, !1)
1600
+ onMouseDown: (g) => p(g, !1)
1583
1601
  }
1584
1602
  ),
1585
1603
  n || /* @__PURE__ */ l(ht, { children: [
@@ -1611,7 +1629,7 @@ function Ut(n) {
1611
1629
  const e = String(n);
1612
1630
  return !Number.isNaN(Number(e)) && e.includes("e");
1613
1631
  }
1614
- function Ct(n) {
1632
+ function ft(n) {
1615
1633
  const e = String(n);
1616
1634
  if (Ut(n)) {
1617
1635
  const [, i = "0"] = e.toLowerCase().split("e");
@@ -1621,7 +1639,7 @@ function Ct(n) {
1621
1639
  }
1622
1640
  function Yt(n) {
1623
1641
  const e = String(n);
1624
- return Ut(n) ? n > Number.MAX_SAFE_INTEGER ? String(Number.MAX_SAFE_INTEGER) : n < Number.MIN_SAFE_INTEGER ? String(Number.MIN_SAFE_INTEGER) : gt(n.toFixed(Ct(n))).fullStr : gt(e).fullStr;
1642
+ return Ut(n) ? n > Number.MAX_SAFE_INTEGER ? String(Number.MAX_SAFE_INTEGER) : n < Number.MIN_SAFE_INTEGER ? String(Number.MIN_SAFE_INTEGER) : gt(n.toFixed(ft(n))).fullStr : gt(e).fullStr;
1625
1643
  }
1626
1644
  function qt(n) {
1627
1645
  if (typeof n == "number")
@@ -1650,7 +1668,7 @@ class ut {
1650
1668
  const c = this.number + i;
1651
1669
  if (c > Number.MAX_SAFE_INTEGER) return new ut(Number.MAX_SAFE_INTEGER);
1652
1670
  if (c < Number.MIN_SAFE_INTEGER) return new ut(Number.MIN_SAFE_INTEGER);
1653
- const u = Math.max(Ct(this.number), Ct(i));
1671
+ const u = Math.max(ft(this.number), ft(i));
1654
1672
  return new ut(c.toFixed(u));
1655
1673
  }
1656
1674
  isEmpty() {
@@ -1675,23 +1693,23 @@ class ut {
1675
1693
  return e ? this.isInvalidate() ? "" : Yt(this.number) : this.origin;
1676
1694
  }
1677
1695
  }
1678
- function it(n) {
1696
+ function rt(n) {
1679
1697
  return new ut(n);
1680
1698
  }
1681
1699
  function yt(n, e, i, c = !1) {
1682
1700
  if (n === "") return "";
1683
- const { negativeStr: u, integerStr: s, decimalStr: r } = gt(n), p = `${e}${r}`, C = `${u}${s}`;
1701
+ const { negativeStr: u, integerStr: s, decimalStr: r } = gt(n), p = `${e}${r}`, f = `${u}${s}`;
1684
1702
  if (i !== void 0 && i >= 0) {
1685
- const A = Number(r[i]);
1686
- if (A >= 5 && !c) {
1687
- const g = it(n).add(
1688
- `${u}0.${"0".repeat(i)}${10 - A}`
1703
+ const g = Number(r[i]);
1704
+ if (g >= 5 && !c) {
1705
+ const h = rt(n).add(
1706
+ `${u}0.${"0".repeat(i)}${10 - g}`
1689
1707
  );
1690
- return yt(g.toString(), e, i, c);
1708
+ return yt(h.toString(), e, i, c);
1691
1709
  }
1692
- return i === 0 ? C : `${C}${e}${r.padEnd(i, "0").slice(0, i)}`;
1710
+ return i === 0 ? f : `${f}${e}${r.padEnd(i, "0").slice(0, i)}`;
1693
1711
  }
1694
- return p === ".0" ? C : `${C}${p}`;
1712
+ return p === ".0" ? f : `${f}${p}`;
1695
1713
  }
1696
1714
  function Rt(n) {
1697
1715
  const e = typeof n == "number" ? Yt(n) : gt(String(n)).fullStr;
@@ -1699,10 +1717,10 @@ function Rt(n) {
1699
1717
  }
1700
1718
  function Ot(n) {
1701
1719
  if (n == null) return null;
1702
- const e = it(n);
1720
+ const e = rt(n);
1703
1721
  return e.isInvalidate() ? null : e;
1704
1722
  }
1705
- const $e = vt(function({
1723
+ const $e = It(function({
1706
1724
  value: e,
1707
1725
  defaultValue: i,
1708
1726
  onChange: c,
@@ -1710,183 +1728,183 @@ const $e = vt(function({
1710
1728
  max: s,
1711
1729
  step: r = 1,
1712
1730
  precision: p,
1713
- disabled: C = !1,
1714
- readOnly: A = !1,
1715
- placeholder: g,
1731
+ disabled: f = !1,
1732
+ readOnly: g = !1,
1733
+ placeholder: h,
1716
1734
  autoFocus: a,
1717
- size: f = "middle",
1718
- status: E,
1719
- bordered: v = !0,
1720
- controls: O = !0,
1721
- keyboard: W = !0,
1722
- changeOnWheel: _ = !1,
1723
- changeOnBlur: j = !0,
1724
- addonBefore: B,
1725
- addonAfter: D,
1726
- prefix: H,
1727
- suffix: Y,
1728
- formatter: L,
1729
- parser: Z,
1730
- decimalSeparator: T,
1731
- onStep: S,
1732
- onPressEnter: y,
1733
- onFocus: m,
1734
- onBlur: N,
1735
+ size: y = "middle",
1736
+ status: b,
1737
+ bordered: I = !0,
1738
+ controls: G = !0,
1739
+ keyboard: q = !0,
1740
+ changeOnWheel: X = !1,
1741
+ changeOnBlur: S = !0,
1742
+ addonBefore: N,
1743
+ addonAfter: k,
1744
+ prefix: P,
1745
+ suffix: T,
1746
+ formatter: D,
1747
+ parser: W,
1748
+ decimalSeparator: U,
1749
+ onStep: V,
1750
+ onPressEnter: _,
1751
+ onFocus: $,
1752
+ onBlur: Z,
1735
1753
  id: w,
1736
- name: b,
1737
- className: Q,
1738
- style: q
1739
- }, X) {
1740
- const $ = G(null), [x, rt] = P(!1), F = G(!1), tt = G(!1), et = G(!1), st = G(""), [J, nt] = P(() => it(e ?? i)), lt = (d) => {
1741
- e === void 0 && nt(d);
1742
- }, h = ct(
1743
- (d, K) => {
1744
- if (!K)
1745
- return p !== void 0 && p >= 0 ? p : Math.max(Ct(d), Ct(r));
1754
+ name: v,
1755
+ className: C,
1756
+ style: E
1757
+ }, j) {
1758
+ const L = R(null), [M, et] = H(!1), O = R(!1), F = R(!1), nt = R(!1), st = R(""), [x, it] = H(() => rt(e ?? i)), lt = (d) => {
1759
+ e === void 0 && it(d);
1760
+ }, A = ct(
1761
+ (d, z) => {
1762
+ if (!z)
1763
+ return p !== void 0 && p >= 0 ? p : Math.max(ft(d), ft(r));
1746
1764
  },
1747
1765
  [p, r]
1748
- ), R = ct(
1766
+ ), J = ct(
1749
1767
  (d) => {
1750
- if (Z) return Z(d);
1751
- let K = d;
1752
- return T && (K = K.replace(T, ".")), K.replace(/[^\w.-]+/g, "");
1753
- },
1754
- [Z, T]
1755
- ), k = ct(
1756
- (d, K) => {
1757
- if (L) return L(d, { userTyping: !!K, input: st.current });
1768
+ if (W) return W(d);
1758
1769
  let z = d;
1759
- if (!K) {
1760
- const at = h(z, K);
1761
- qt(z) && (T || (at ?? -1) >= 0) && (z = yt(z, T || ".", at));
1770
+ return U && (z = z.replace(U, ".")), z.replace(/[^\w.-]+/g, "");
1771
+ },
1772
+ [W, U]
1773
+ ), Q = ct(
1774
+ (d, z) => {
1775
+ if (D) return D(d, { userTyping: !!z, input: st.current });
1776
+ let B = d;
1777
+ if (!z) {
1778
+ const at = A(B, z);
1779
+ qt(B) && (U || (at ?? -1) >= 0) && (B = yt(B, U || ".", at));
1762
1780
  }
1763
- return z;
1781
+ return B;
1764
1782
  },
1765
- [L, h, T]
1766
- ), [o, I] = P(() => {
1783
+ [D, A, U]
1784
+ ), [o, m] = H(() => {
1767
1785
  const d = i ?? e;
1768
- return J.isInvalidate() && ["string", "number"].includes(typeof d) ? d == null || Number.isNaN(d) ? "" : String(d) : k(J.toString(), !1);
1786
+ return x.isInvalidate() && ["string", "number"].includes(typeof d) ? d == null || Number.isNaN(d) ? "" : String(d) : Q(x.toString(), !1);
1769
1787
  });
1770
1788
  st.current = o;
1771
- const M = (d, K) => {
1772
- I(
1773
- k(d.isInvalidate() ? d.toString(!1) : d.toString(!K), K)
1789
+ const K = (d, z) => {
1790
+ m(
1791
+ Q(d.isInvalidate() ? d.toString(!1) : d.toString(!z), z)
1774
1792
  );
1775
- }, U = dt(() => Ot(s), [s]), V = dt(() => Ot(u), [u]), At = dt(() => !U || J.isInvalidate() ? !1 : U.lessEquals(J), [U, J]), zt = dt(() => !V || J.isInvalidate() ? !1 : J.lessEquals(V), [V, J]), [Ft] = Le($.current, x), jt = (d) => U && !d.lessEquals(U) ? U : V && !V.lessEquals(d) ? V : null, It = (d) => !jt(d), ft = (d, K) => {
1776
- let z = d, at = It(z) || z.isEmpty();
1777
- if (!z.isEmpty() && !K && (z = jt(z) || z, at = !0), !A && !C && at) {
1778
- const pt = z.toString(), wt = h(pt, K);
1779
- return wt !== void 0 && wt >= 0 && (z = it(yt(pt, ".", wt)), It(z) || (z = it(yt(pt, ".", wt, !0)))), z.equals(J) || (lt(z), c == null || c(z.isEmpty() ? null : z.toNumber()), e === void 0 && M(z, K)), z;
1793
+ }, Y = dt(() => Ot(s), [s]), tt = dt(() => Ot(u), [u]), At = dt(() => !Y || x.isInvalidate() ? !1 : Y.lessEquals(x), [Y, x]), zt = dt(() => !tt || x.isInvalidate() ? !1 : x.lessEquals(tt), [tt, x]), [Ft] = Le(L.current, M), jt = (d) => Y && !d.lessEquals(Y) ? Y : tt && !tt.lessEquals(d) ? tt : null, mt = (d) => !jt(d), Ct = (d, z) => {
1794
+ let B = d, at = mt(B) || B.isEmpty();
1795
+ if (!B.isEmpty() && !z && (B = jt(B) || B, at = !0), !g && !f && at) {
1796
+ const pt = B.toString(), wt = A(pt, z);
1797
+ return wt !== void 0 && wt >= 0 && (B = rt(yt(pt, ".", wt)), mt(B) || (B = rt(yt(pt, ".", wt, !0)))), B.equals(x) || (lt(B), c == null || c(B.isEmpty() ? null : B.toNumber()), e === void 0 && K(B, z)), B;
1780
1798
  }
1781
- return J;
1782
- }, Wt = Se(), mt = (d) => {
1783
- if (Ft(), st.current = d, I(d), !tt.current) {
1784
- const K = R(d), z = it(K);
1785
- z.isNaN() || ft(z, !0);
1799
+ return x;
1800
+ }, Wt = Se(), bt = (d) => {
1801
+ if (Ft(), st.current = d, m(d), !F.current) {
1802
+ const z = J(d), B = rt(z);
1803
+ B.isNaN() || Ct(B, !0);
1786
1804
  }
1787
1805
  Wt(() => {
1788
- const K = Z ? d : d.replace(/。/g, ".");
1789
- K !== d && mt(K);
1806
+ const z = W ? d : d.replace(/。/g, ".");
1807
+ z !== d && bt(z);
1790
1808
  });
1791
1809
  }, Zt = () => {
1792
- tt.current = !0;
1810
+ F.current = !0;
1793
1811
  }, Xt = (d) => {
1794
- tt.current = !1, mt(d.target.value);
1795
- }, Vt = (d) => mt(d.target.value), bt = (d) => {
1812
+ F.current = !1, bt(d.target.value);
1813
+ }, Vt = (d) => bt(d.target.value), Et = (d) => {
1796
1814
  var pt;
1797
1815
  if (d && At || !d && zt) return;
1798
- F.current = !1;
1799
- let K = it(et.current ? Rt(r) : r);
1800
- d || (K = K.negate());
1801
- const z = (J.isInvalidate() ? it(0) : J).add(K.toString()), at = ft(z, !1);
1802
- S == null || S(at.toNumber(), { offset: et.current ? Rt(r) : r, type: d ? "up" : "down" }), (pt = $.current) == null || pt.focus();
1816
+ O.current = !1;
1817
+ let z = rt(nt.current ? Rt(r) : r);
1818
+ d || (z = z.negate());
1819
+ const B = (x.isInvalidate() ? rt(0) : x).add(z.toString()), at = Ct(B, !1);
1820
+ V == null || V(at.toNumber(), { offset: nt.current ? Rt(r) : r, type: d ? "up" : "down" }), (pt = L.current) == null || pt.focus();
1803
1821
  }, Bt = (d) => {
1804
- const K = it(R(o));
1805
- let z;
1806
- K.isNaN() ? z = ft(J, d) : z = ft(K, d), e !== void 0 ? M(J, !1) : z.isNaN() || M(z, !1);
1822
+ const z = rt(J(o));
1823
+ let B;
1824
+ z.isNaN() ? B = Ct(x, d) : B = Ct(z, d), e !== void 0 ? K(x, !1) : B.isNaN() || K(B, !1);
1807
1825
  }, _t = (d) => {
1808
- const { key: K, shiftKey: z } = d;
1809
- F.current = !0, et.current = z, K === "Enter" && (tt.current || (F.current = !1), Bt(!1), y == null || y(d)), W && !tt.current && (K === "ArrowUp" || K === "ArrowDown") && (bt(K === "ArrowUp"), d.preventDefault());
1826
+ const { key: z, shiftKey: B } = d;
1827
+ O.current = !0, nt.current = B, z === "Enter" && (F.current || (O.current = !1), Bt(!1), _ == null || _(d)), q && !F.current && (z === "ArrowUp" || z === "ArrowDown") && (Et(z === "ArrowUp"), d.preventDefault());
1810
1828
  }, $t = () => {
1811
- F.current = !1, et.current = !1;
1829
+ O.current = !1, nt.current = !1;
1812
1830
  }, te = (d) => {
1813
- rt(!0), m == null || m(d);
1831
+ et(!0), $ == null || $(d);
1814
1832
  }, ee = (d) => {
1815
- j && Bt(!1), rt(!1), F.current = !1, N == null || N(d);
1816
- }, Nt = G(e);
1833
+ S && Bt(!1), et(!1), O.current = !1, Z == null || Z(d);
1834
+ }, Nt = R(e);
1817
1835
  if (Nt.current !== e) {
1818
1836
  Nt.current = e;
1819
- const d = it(e);
1820
- if (!d.equals(J)) {
1821
- nt(d);
1822
- const K = it(R(o));
1823
- (!d.equals(K) || !F.current || L) && M(d, F.current);
1837
+ const d = rt(e);
1838
+ if (!d.equals(x)) {
1839
+ it(d);
1840
+ const z = rt(J(o));
1841
+ (!d.equals(z) || !O.current || D) && K(d, O.current);
1824
1842
  }
1825
1843
  }
1826
1844
  const ne = (d) => {
1827
- $.current = d, typeof X == "function" ? X(d) : X && (X.current = d);
1828
- }, Qt = !!O, ie = typeof O == "object" ? O.icon : void 0, re = !J.isInvalidate() && !It(J), se = [
1845
+ L.current = d, typeof j == "function" ? j(d) : j && (j.current = d);
1846
+ }, Qt = !!G, ie = typeof G == "object" ? G.icon : void 0, re = !x.isInvalidate() && !mt(x), se = [
1829
1847
  "bj-input-number",
1830
- `bj-input-number--${f}`,
1831
- x && "bj-input-number--focused",
1832
- C && "bj-input-number--disabled",
1833
- A && "bj-input-number--readonly",
1834
- !v && "bj-input-number--borderless",
1835
- E && `bj-input-number--${E}`,
1848
+ `bj-input-number--${y}`,
1849
+ M && "bj-input-number--focused",
1850
+ f && "bj-input-number--disabled",
1851
+ g && "bj-input-number--readonly",
1852
+ !I && "bj-input-number--borderless",
1853
+ b && `bj-input-number--${b}`,
1836
1854
  re && "bj-input-number--out-of-range",
1837
1855
  Qt && "bj-input-number--with-controls",
1838
- B && "bj-input-number--group-left",
1839
- D && "bj-input-number--group-right"
1856
+ N && "bj-input-number--group-left",
1857
+ k && "bj-input-number--group-right"
1840
1858
  ].filter(Boolean).join(" "), kt = /* @__PURE__ */ l(
1841
1859
  "div",
1842
1860
  {
1843
- className: [se, !(B || D || H || Y) && Q].filter(Boolean).join(" "),
1844
- style: B || D || H || Y ? void 0 : q,
1861
+ className: [se, !(N || k || P || T) && C].filter(Boolean).join(" "),
1862
+ style: N || k || P || T ? void 0 : E,
1845
1863
  onKeyDown: _t,
1846
1864
  onKeyUp: $t,
1847
1865
  children: [
1848
- H && /* @__PURE__ */ t("span", { className: "bj-input-number__prefix", children: H }),
1866
+ P && /* @__PURE__ */ t("span", { className: "bj-input-number__prefix", children: P }),
1849
1867
  /* @__PURE__ */ t("div", { className: "bj-input-number__input-wrap", children: /* @__PURE__ */ t(
1850
1868
  "input",
1851
1869
  {
1852
1870
  ref: ne,
1853
1871
  id: w,
1854
- name: b,
1872
+ name: v,
1855
1873
  className: "bj-input-number__input",
1856
1874
  autoComplete: "off",
1857
1875
  role: "spinbutton",
1858
1876
  "aria-valuemin": u,
1859
1877
  "aria-valuemax": s,
1860
- "aria-valuenow": J.isInvalidate() ? void 0 : J.toNumber(),
1878
+ "aria-valuenow": x.isInvalidate() ? void 0 : x.toNumber(),
1861
1879
  value: o,
1862
- placeholder: g,
1863
- disabled: C,
1864
- readOnly: A,
1880
+ placeholder: h,
1881
+ disabled: f,
1882
+ readOnly: g,
1865
1883
  autoFocus: a,
1866
1884
  onChange: Vt,
1867
1885
  onFocus: te,
1868
1886
  onBlur: ee,
1869
1887
  onCompositionStart: Zt,
1870
1888
  onCompositionEnd: Xt,
1871
- onWheel: _ ? (d) => {
1872
- x && bt(d.deltaY < 0);
1889
+ onWheel: X ? (d) => {
1890
+ M && Et(d.deltaY < 0);
1873
1891
  } : void 0
1874
1892
  }
1875
1893
  ) }),
1876
- Y && /* @__PURE__ */ t("span", { className: "bj-input-number__suffix", children: Y }),
1877
- Qt && /* @__PURE__ */ t(Re, { icon: ie, upDisabled: At, downDisabled: zt, onStep: bt })
1894
+ T && /* @__PURE__ */ t("span", { className: "bj-input-number__suffix", children: T }),
1895
+ Qt && /* @__PURE__ */ t(Re, { icon: ie, upDisabled: At, downDisabled: zt, onStep: Et })
1878
1896
  ]
1879
1897
  }
1880
1898
  );
1881
- return !B && !D ? kt : /* @__PURE__ */ l(
1899
+ return !N && !k ? kt : /* @__PURE__ */ l(
1882
1900
  "div",
1883
1901
  {
1884
- className: ["bj-input-number-group", `bj-input-number-group--${f}`, Q].filter(Boolean).join(" "),
1885
- style: q,
1902
+ className: ["bj-input-number-group", `bj-input-number-group--${y}`, C].filter(Boolean).join(" "),
1903
+ style: E,
1886
1904
  children: [
1887
- B && /* @__PURE__ */ t("div", { className: "bj-input-number-group__addon", children: B }),
1905
+ N && /* @__PURE__ */ t("div", { className: "bj-input-number-group__addon", children: N }),
1888
1906
  kt,
1889
- D && /* @__PURE__ */ t("div", { className: "bj-input-number-group__addon", children: D })
1907
+ k && /* @__PURE__ */ t("div", { className: "bj-input-number-group__addon", children: k })
1890
1908
  ]
1891
1909
  }
1892
1910
  );