@yqg/permission 1.2.1 → 1.3.0-alpha.1

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.
Files changed (36) hide show
  1. package/README.md +50 -38
  2. package/dist/apply-modal-CpmDDWWV.js +12865 -0
  3. package/dist/category-selector-BQ0-kg3o.js +1275 -0
  4. package/dist/index-D_0ZQip-.js +2972 -0
  5. package/dist/index-wLkVeDMW.js +5040 -0
  6. package/dist/index.js +2 -2
  7. package/dist/permission-item-Df_aagL1.js +1266 -0
  8. package/dist/{yqg-permission-DfFns5kK.js → yqg-permission-BjVCs5lN.js} +3483 -3538
  9. package/dist/yqg-permission.umd.js +250 -0
  10. package/package.json +13 -3
  11. package/plugins/alioss.ts +237 -0
  12. package/src/App.vue +7 -8
  13. package/src/assets/category.png +0 -0
  14. package/src/axios/index.ts +6 -1
  15. package/src/components/apply-modal.vue +254 -157
  16. package/src/components/category-selector.vue +130 -0
  17. package/src/components/permission-item.vue +230 -0
  18. package/src/components/success-modal.vue +4 -4
  19. package/src/components/yqg-permission.vue +23 -110
  20. package/src/hooks/useAttributesCache.ts +21 -0
  21. package/src/hooks/useCategory.ts +20 -0
  22. package/src/hooks/useDragable.ts +9 -10
  23. package/src/hooks/useFormat.ts +56 -0
  24. package/src/hooks/useStatus.ts +82 -0
  25. package/src/i18n/zh-CH.ts +9 -2
  26. package/src/main.ts +2 -0
  27. package/src/typings/index.d.ts +35 -2
  28. package/src/utils/index.ts +9 -0
  29. package/src/yqg-permission/index.ts +13 -1
  30. package/vite.config.ts +18 -2
  31. package/dist/apply-modal-COwJCSGK.js +0 -8742
  32. package/dist/checkbox-item-DyKSHMQJ.js +0 -4991
  33. package/dist/index-DKDl-l25.js +0 -6164
  34. package/dist/index.umd.cjs +0 -259
  35. package/src/assets/apply.png +0 -0
  36. package/src/components/checkbox-item.vue +0 -201
@@ -0,0 +1,2972 @@
1
+ import { _ as g, P as c, a as B, c as ae, b4 as tt, ap as pn, ae as ot, a1 as it, Z as at, I as mn, ab as lt, ac as rt, aD as st, b5 as gn, ao as Y, Q as We, b6 as Le, R as ie, b7 as vn, N as ut, O as ct } from "./yqg-permission-BjVCs5lN.js";
2
+ import { d as ne, c as R, r as le, e as f, i as dt, m as ft, a as Ie, p as Ce, x as pt, s as A, w as oe, b as hn, l as ge, S as Ae, F as we, o as _e, X as mt, G as on, $ as gt } from "./index-wLkVeDMW.js";
3
+ import { B as vt, R as yn, p as bn, K as P, j as Sn, S as ht } from "./apply-modal-CpmDDWWV.js";
4
+ function an(e, n) {
5
+ const {
6
+ key: o
7
+ } = e;
8
+ let t;
9
+ return "value" in e && ({
10
+ value: t
11
+ } = e), o ?? (t !== void 0 ? t : `rc-index-key-${n}`);
12
+ }
13
+ function yt(e, n) {
14
+ const {
15
+ label: o,
16
+ value: t,
17
+ options: i
18
+ } = e || {};
19
+ return {
20
+ label: o || (n ? "children" : "label"),
21
+ value: t || "value",
22
+ options: i || "options"
23
+ };
24
+ }
25
+ function To(e) {
26
+ let {
27
+ fieldNames: n,
28
+ childrenAsData: o
29
+ } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
30
+ const t = [], {
31
+ label: i,
32
+ value: a,
33
+ options: p
34
+ } = yt(n, !1);
35
+ function d(b, h) {
36
+ b.forEach((l) => {
37
+ const S = l[i];
38
+ if (h || !(p in l)) {
39
+ const x = l[a];
40
+ t.push({
41
+ key: an(l, t.length),
42
+ groupOption: h,
43
+ data: l,
44
+ label: S,
45
+ value: x
46
+ });
47
+ } else {
48
+ let x = S;
49
+ x === void 0 && o && (x = l.label), t.push({
50
+ key: an(l, t.length),
51
+ group: !0,
52
+ data: l,
53
+ label: x
54
+ }), d(l[p], !0);
55
+ }
56
+ });
57
+ }
58
+ return d(e, !1), t;
59
+ }
60
+ function Mo(e) {
61
+ const n = g({}, e);
62
+ return "props" in n || Object.defineProperty(n, "props", {
63
+ get() {
64
+ return n;
65
+ }
66
+ }), n;
67
+ }
68
+ function bt(e, n) {
69
+ if (!n || !n.length)
70
+ return null;
71
+ let o = !1;
72
+ function t(a, p) {
73
+ let [d, ...b] = p;
74
+ if (!d)
75
+ return [a];
76
+ const h = a.split(d);
77
+ return o = o || h.length > 1, h.reduce((l, S) => [...l, ...t(S, b)], []).filter((l) => l);
78
+ }
79
+ const i = t(e, n);
80
+ return o ? i : null;
81
+ }
82
+ var St = function(e, n) {
83
+ var o = {};
84
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
85
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++)
86
+ n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]);
87
+ return o;
88
+ };
89
+ const wt = (e) => {
90
+ const n = e === !0 ? 0 : 1;
91
+ return {
92
+ bottomLeft: {
93
+ points: ["tl", "bl"],
94
+ offset: [0, 4],
95
+ overflow: {
96
+ adjustX: n,
97
+ adjustY: 1
98
+ }
99
+ },
100
+ bottomRight: {
101
+ points: ["tr", "br"],
102
+ offset: [0, 4],
103
+ overflow: {
104
+ adjustX: n,
105
+ adjustY: 1
106
+ }
107
+ },
108
+ topLeft: {
109
+ points: ["bl", "tl"],
110
+ offset: [0, -4],
111
+ overflow: {
112
+ adjustX: n,
113
+ adjustY: 1
114
+ }
115
+ },
116
+ topRight: {
117
+ points: ["br", "tr"],
118
+ offset: [0, -4],
119
+ overflow: {
120
+ adjustX: n,
121
+ adjustY: 1
122
+ }
123
+ }
124
+ };
125
+ }, It = ne({
126
+ name: "SelectTrigger",
127
+ inheritAttrs: !1,
128
+ props: {
129
+ dropdownAlign: Object,
130
+ visible: {
131
+ type: Boolean,
132
+ default: void 0
133
+ },
134
+ disabled: {
135
+ type: Boolean,
136
+ default: void 0
137
+ },
138
+ dropdownClassName: String,
139
+ dropdownStyle: c.object,
140
+ placement: String,
141
+ empty: {
142
+ type: Boolean,
143
+ default: void 0
144
+ },
145
+ prefixCls: String,
146
+ popupClassName: String,
147
+ animation: String,
148
+ transitionName: String,
149
+ getPopupContainer: Function,
150
+ dropdownRender: Function,
151
+ containerWidth: Number,
152
+ dropdownMatchSelectWidth: c.oneOfType([Number, Boolean]).def(!0),
153
+ popupElement: c.any,
154
+ direction: String,
155
+ getTriggerDOMNode: Function,
156
+ onPopupVisibleChange: Function,
157
+ onPopupMouseEnter: Function,
158
+ onPopupFocusin: Function,
159
+ onPopupFocusout: Function
160
+ },
161
+ setup(e, n) {
162
+ let {
163
+ slots: o,
164
+ attrs: t,
165
+ expose: i
166
+ } = n;
167
+ const a = R(() => {
168
+ const {
169
+ dropdownMatchSelectWidth: d
170
+ } = e;
171
+ return wt(d);
172
+ }), p = le();
173
+ return i({
174
+ getPopupElement: () => p.value
175
+ }), () => {
176
+ const d = g(g({}, e), t), {
177
+ empty: b = !1
178
+ } = d, h = St(d, ["empty"]), {
179
+ visible: l,
180
+ dropdownAlign: S,
181
+ prefixCls: x,
182
+ popupElement: F,
183
+ dropdownClassName: y,
184
+ dropdownStyle: w,
185
+ direction: I = "ltr",
186
+ placement: m,
187
+ dropdownMatchSelectWidth: v,
188
+ containerWidth: D,
189
+ dropdownRender: O,
190
+ animation: E,
191
+ transitionName: T,
192
+ getPopupContainer: C,
193
+ getTriggerDOMNode: G,
194
+ onPopupVisibleChange: z,
195
+ onPopupMouseEnter: j,
196
+ onPopupFocusin: V,
197
+ onPopupFocusout: Z
198
+ } = h, X = `${x}-dropdown`;
199
+ let Q = F;
200
+ O && (Q = O({
201
+ menuNode: F,
202
+ props: e
203
+ }));
204
+ const u = E ? `${X}-${E}` : T, $ = g({
205
+ minWidth: `${D}px`
206
+ }, w);
207
+ return typeof v == "number" ? $.width = `${v}px` : v && ($.width = `${D}px`), f(tt, B(B({}, e), {}, {
208
+ showAction: z ? ["click"] : [],
209
+ hideAction: z ? ["click"] : [],
210
+ popupPlacement: m || (I === "rtl" ? "bottomRight" : "bottomLeft"),
211
+ builtinPlacements: a.value,
212
+ prefixCls: X,
213
+ popupTransitionName: u,
214
+ popupAlign: S,
215
+ popupVisible: l,
216
+ getPopupContainer: C,
217
+ popupClassName: ae(y, {
218
+ [`${X}-empty`]: b
219
+ }),
220
+ popupStyle: $,
221
+ getTriggerDOMNode: G,
222
+ onPopupVisibleChange: z
223
+ }), {
224
+ default: o.default,
225
+ popup: () => f("div", {
226
+ ref: p,
227
+ onMouseenter: j,
228
+ onFocusin: V,
229
+ onFocusout: Z
230
+ }, [Q])
231
+ });
232
+ };
233
+ }
234
+ }), ve = (e, n) => {
235
+ let {
236
+ slots: o
237
+ } = n;
238
+ var t;
239
+ const {
240
+ class: i,
241
+ customizeIcon: a,
242
+ customizeIconProps: p,
243
+ onMousedown: d,
244
+ onClick: b
245
+ } = e;
246
+ let h;
247
+ return typeof a == "function" ? h = a(p) : h = dt(a) ? ft(a) : a, f("span", {
248
+ class: i,
249
+ onMousedown: (l) => {
250
+ l.preventDefault(), d && d(l);
251
+ },
252
+ style: {
253
+ userSelect: "none",
254
+ WebkitUserSelect: "none"
255
+ },
256
+ unselectable: "on",
257
+ onClick: b,
258
+ "aria-hidden": !0
259
+ }, [h !== void 0 ? h : f("span", {
260
+ class: i.split(/\s+/).map((l) => `${l}-icon`)
261
+ }, [(t = o.default) === null || t === void 0 ? void 0 : t.call(o)])]);
262
+ };
263
+ ve.inheritAttrs = !1;
264
+ ve.displayName = "TransBtn";
265
+ ve.props = {
266
+ class: String,
267
+ customizeIcon: c.any,
268
+ customizeIconProps: c.any,
269
+ onMousedown: Function,
270
+ onClick: Function
271
+ };
272
+ const Ct = {
273
+ inputRef: c.any,
274
+ prefixCls: String,
275
+ id: String,
276
+ inputElement: c.VueNode,
277
+ disabled: {
278
+ type: Boolean,
279
+ default: void 0
280
+ },
281
+ autofocus: {
282
+ type: Boolean,
283
+ default: void 0
284
+ },
285
+ autocomplete: String,
286
+ editable: {
287
+ type: Boolean,
288
+ default: void 0
289
+ },
290
+ activeDescendantId: String,
291
+ value: String,
292
+ open: {
293
+ type: Boolean,
294
+ default: void 0
295
+ },
296
+ tabindex: c.oneOfType([c.number, c.string]),
297
+ /** Pass accessibility props to input */
298
+ attrs: c.object,
299
+ onKeydown: {
300
+ type: Function
301
+ },
302
+ onMousedown: {
303
+ type: Function
304
+ },
305
+ onChange: {
306
+ type: Function
307
+ },
308
+ onPaste: {
309
+ type: Function
310
+ },
311
+ onCompositionstart: {
312
+ type: Function
313
+ },
314
+ onCompositionend: {
315
+ type: Function
316
+ },
317
+ onFocus: {
318
+ type: Function
319
+ },
320
+ onBlur: {
321
+ type: Function
322
+ }
323
+ }, wn = ne({
324
+ compatConfig: {
325
+ MODE: 3
326
+ },
327
+ name: "SelectInput",
328
+ inheritAttrs: !1,
329
+ props: Ct,
330
+ setup(e) {
331
+ let n = null;
332
+ const o = Ie("VCSelectContainerEvent");
333
+ return () => {
334
+ var t;
335
+ const {
336
+ prefixCls: i,
337
+ id: a,
338
+ inputElement: p,
339
+ disabled: d,
340
+ tabindex: b,
341
+ autofocus: h,
342
+ autocomplete: l,
343
+ editable: S,
344
+ activeDescendantId: x,
345
+ value: F,
346
+ onKeydown: y,
347
+ onMousedown: w,
348
+ onChange: I,
349
+ onPaste: m,
350
+ onCompositionstart: v,
351
+ onCompositionend: D,
352
+ onFocus: O,
353
+ onBlur: E,
354
+ open: T,
355
+ inputRef: C,
356
+ attrs: G
357
+ } = e;
358
+ let z = p || f(vt, null, null);
359
+ const j = z.props || {}, {
360
+ onKeydown: V,
361
+ onInput: Z,
362
+ onFocus: X,
363
+ onBlur: Q,
364
+ onMousedown: u,
365
+ onCompositionstart: $,
366
+ onCompositionend: L,
367
+ style: H
368
+ } = j;
369
+ return z = pn(z, g(g(g(g(g({
370
+ type: "search"
371
+ }, j), {
372
+ id: a,
373
+ ref: C,
374
+ disabled: d,
375
+ tabindex: b,
376
+ lazy: !1,
377
+ autocomplete: l || "off",
378
+ autofocus: h,
379
+ class: ae(`${i}-selection-search-input`, (t = z == null ? void 0 : z.props) === null || t === void 0 ? void 0 : t.class),
380
+ role: "combobox",
381
+ "aria-expanded": T,
382
+ "aria-haspopup": "listbox",
383
+ "aria-owns": `${a}_list`,
384
+ "aria-autocomplete": "list",
385
+ "aria-controls": `${a}_list`,
386
+ "aria-activedescendant": x
387
+ }), G), {
388
+ value: S ? F : "",
389
+ readonly: !S,
390
+ unselectable: S ? null : "on",
391
+ style: g(g({}, H), {
392
+ opacity: S ? null : 0
393
+ }),
394
+ onKeydown: (N) => {
395
+ y(N), V && V(N);
396
+ },
397
+ onMousedown: (N) => {
398
+ w(N), u && u(N);
399
+ },
400
+ onInput: (N) => {
401
+ I(N), Z && Z(N);
402
+ },
403
+ onCompositionstart(N) {
404
+ v(N), $ && $(N);
405
+ },
406
+ onCompositionend(N) {
407
+ D(N), L && L(N);
408
+ },
409
+ onPaste: m,
410
+ onFocus: function() {
411
+ clearTimeout(n), X && X(arguments.length <= 0 ? void 0 : arguments[0]), O && O(arguments.length <= 0 ? void 0 : arguments[0]), o == null || o.focus(arguments.length <= 0 ? void 0 : arguments[0]);
412
+ },
413
+ onBlur: function() {
414
+ for (var N = arguments.length, J = new Array(N), te = 0; te < N; te++)
415
+ J[te] = arguments[te];
416
+ n = setTimeout(() => {
417
+ Q && Q(J[0]), E && E(J[0]), o == null || o.blur(J[0]);
418
+ }, 100);
419
+ }
420
+ }), z.type === "textarea" ? {} : {
421
+ type: "search"
422
+ }), !0, !0), z;
423
+ };
424
+ }
425
+ }), In = Symbol("OverflowContextProviderKey"), Ve = ne({
426
+ compatConfig: {
427
+ MODE: 3
428
+ },
429
+ name: "OverflowContextProvider",
430
+ inheritAttrs: !1,
431
+ props: {
432
+ value: {
433
+ type: Object
434
+ }
435
+ },
436
+ setup(e, n) {
437
+ let {
438
+ slots: o
439
+ } = n;
440
+ return Ce(In, R(() => e.value)), () => {
441
+ var t;
442
+ return (t = o.default) === null || t === void 0 ? void 0 : t.call(o);
443
+ };
444
+ }
445
+ }), xt = () => Ie(In, R(() => null));
446
+ var $t = function(e, n) {
447
+ var o = {};
448
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
449
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++)
450
+ n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]);
451
+ return o;
452
+ };
453
+ const pe = void 0, Se = ne({
454
+ compatConfig: {
455
+ MODE: 3
456
+ },
457
+ name: "Item",
458
+ props: {
459
+ prefixCls: String,
460
+ item: c.any,
461
+ renderItem: Function,
462
+ responsive: Boolean,
463
+ itemKey: {
464
+ type: [String, Number]
465
+ },
466
+ registerSize: Function,
467
+ display: Boolean,
468
+ order: Number,
469
+ component: c.any,
470
+ invalidate: Boolean
471
+ },
472
+ setup(e, n) {
473
+ let {
474
+ slots: o,
475
+ expose: t
476
+ } = n;
477
+ const i = R(() => e.responsive && !e.display), a = le();
478
+ t({
479
+ itemNodeRef: a
480
+ });
481
+ function p(d) {
482
+ e.registerSize(e.itemKey, d);
483
+ }
484
+ return pt(() => {
485
+ p(null);
486
+ }), () => {
487
+ var d;
488
+ const {
489
+ prefixCls: b,
490
+ invalidate: h,
491
+ item: l,
492
+ renderItem: S,
493
+ responsive: x,
494
+ registerSize: F,
495
+ itemKey: y,
496
+ display: w,
497
+ order: I,
498
+ component: m = "div"
499
+ } = e, v = $t(e, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), D = (d = o.default) === null || d === void 0 ? void 0 : d.call(o), O = S && l !== pe ? S(l) : D;
500
+ let E;
501
+ h || (E = {
502
+ opacity: i.value ? 0 : 1,
503
+ height: i.value ? 0 : pe,
504
+ overflowY: i.value ? "hidden" : pe,
505
+ order: x ? I : pe,
506
+ pointerEvents: i.value ? "none" : pe,
507
+ position: i.value ? "absolute" : pe
508
+ });
509
+ const T = {};
510
+ return i.value && (T["aria-hidden"] = !0), f(yn, {
511
+ disabled: !x,
512
+ onResize: (C) => {
513
+ let {
514
+ offsetWidth: G
515
+ } = C;
516
+ p(G);
517
+ }
518
+ }, {
519
+ default: () => f(m, B(B(B({
520
+ class: ae(!h && b),
521
+ style: E
522
+ }, T), v), {}, {
523
+ ref: a
524
+ }), {
525
+ default: () => [O]
526
+ })
527
+ });
528
+ };
529
+ }
530
+ });
531
+ var ze = function(e, n) {
532
+ var o = {};
533
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
534
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++)
535
+ n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]);
536
+ return o;
537
+ };
538
+ const Ot = ne({
539
+ compatConfig: {
540
+ MODE: 3
541
+ },
542
+ name: "RawItem",
543
+ inheritAttrs: !1,
544
+ props: {
545
+ component: c.any,
546
+ title: c.any,
547
+ id: String,
548
+ onMouseenter: {
549
+ type: Function
550
+ },
551
+ onMouseleave: {
552
+ type: Function
553
+ },
554
+ onClick: {
555
+ type: Function
556
+ },
557
+ onKeydown: {
558
+ type: Function
559
+ },
560
+ onFocus: {
561
+ type: Function
562
+ },
563
+ role: String,
564
+ tabindex: Number
565
+ },
566
+ setup(e, n) {
567
+ let {
568
+ slots: o,
569
+ attrs: t
570
+ } = n;
571
+ const i = xt();
572
+ return () => {
573
+ var a;
574
+ if (!i.value) {
575
+ const {
576
+ component: S = "div"
577
+ } = e, x = ze(e, ["component"]);
578
+ return f(S, B(B({}, x), t), {
579
+ default: () => [(a = o.default) === null || a === void 0 ? void 0 : a.call(o)]
580
+ });
581
+ }
582
+ const p = i.value, {
583
+ className: d
584
+ } = p, b = ze(p, ["className"]), {
585
+ class: h
586
+ } = t, l = ze(t, ["class"]);
587
+ return f(Ve, {
588
+ value: null
589
+ }, {
590
+ default: () => [f(Se, B(B(B({
591
+ class: ae(d, h)
592
+ }, b), l), e), o)]
593
+ });
594
+ };
595
+ }
596
+ });
597
+ var Pt = function(e, n) {
598
+ var o = {};
599
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
600
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++)
601
+ n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]);
602
+ return o;
603
+ };
604
+ const Cn = "responsive", xn = "invalidate";
605
+ function Ft(e) {
606
+ return `+ ${e.length} ...`;
607
+ }
608
+ const Et = () => ({
609
+ id: String,
610
+ prefixCls: String,
611
+ data: Array,
612
+ itemKey: [String, Number, Function],
613
+ /** Used for `responsive`. It will limit render node to avoid perf issue */
614
+ itemWidth: {
615
+ type: Number,
616
+ default: 10
617
+ },
618
+ renderItem: Function,
619
+ /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
620
+ renderRawItem: Function,
621
+ maxCount: [Number, String],
622
+ renderRest: Function,
623
+ /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
624
+ renderRawRest: Function,
625
+ suffix: c.any,
626
+ component: String,
627
+ itemComponent: c.any,
628
+ /** @private This API may be refactor since not well design */
629
+ onVisibleChange: Function,
630
+ /** When set to `full`, ssr will render full items by default and remove at client side */
631
+ ssr: String,
632
+ onMousedown: Function,
633
+ role: String
634
+ }), xe = ne({
635
+ name: "Overflow",
636
+ inheritAttrs: !1,
637
+ props: Et(),
638
+ emits: ["visibleChange"],
639
+ setup(e, n) {
640
+ let {
641
+ attrs: o,
642
+ emit: t,
643
+ slots: i
644
+ } = n;
645
+ const a = R(() => e.ssr === "full"), p = A(null), d = R(() => p.value || 0), b = A(/* @__PURE__ */ new Map()), h = A(0), l = A(0), S = A(0), x = A(null), F = A(null), y = R(() => F.value === null && a.value ? Number.MAX_SAFE_INTEGER : F.value || 0), w = A(!1), I = R(() => `${e.prefixCls}-item`), m = R(() => Math.max(h.value, l.value)), v = R(() => !!(e.data.length && e.maxCount === Cn)), D = R(() => e.maxCount === xn), O = R(() => v.value || typeof e.maxCount == "number" && e.data.length > e.maxCount), E = R(() => {
646
+ let u = e.data;
647
+ return v.value ? p.value === null && a.value ? u = e.data : u = e.data.slice(0, Math.min(e.data.length, d.value / e.itemWidth)) : typeof e.maxCount == "number" && (u = e.data.slice(0, e.maxCount)), u;
648
+ }), T = R(() => v.value ? e.data.slice(y.value + 1) : e.data.slice(E.value.length)), C = (u, $) => {
649
+ var L;
650
+ return typeof e.itemKey == "function" ? e.itemKey(u) : (L = e.itemKey && (u == null ? void 0 : u[e.itemKey])) !== null && L !== void 0 ? L : $;
651
+ }, G = R(() => e.renderItem || ((u) => u)), z = (u, $) => {
652
+ F.value = u, $ || (w.value = u < e.data.length - 1, t("visibleChange", u));
653
+ }, j = (u, $) => {
654
+ p.value = $.clientWidth;
655
+ }, V = (u, $) => {
656
+ const L = new Map(b.value);
657
+ $ === null ? L.delete(u) : L.set(u, $), b.value = L;
658
+ }, Z = (u, $) => {
659
+ h.value = l.value, l.value = $;
660
+ }, X = (u, $) => {
661
+ S.value = $;
662
+ }, Q = (u) => b.value.get(C(E.value[u], u));
663
+ return oe([d, b, l, S, () => e.itemKey, E], () => {
664
+ if (d.value && m.value && E.value) {
665
+ let u = S.value;
666
+ const $ = E.value.length, L = $ - 1;
667
+ if (!$) {
668
+ z(0), x.value = null;
669
+ return;
670
+ }
671
+ for (let H = 0; H < $; H += 1) {
672
+ const N = Q(H);
673
+ if (N === void 0) {
674
+ z(H - 1, !0);
675
+ break;
676
+ }
677
+ if (u += N, // Only one means `totalWidth` is the final width
678
+ L === 0 && u <= d.value || // Last two width will be the final width
679
+ H === L - 1 && u + Q(L) <= d.value) {
680
+ z(L), x.value = null;
681
+ break;
682
+ } else if (u + m.value > d.value) {
683
+ z(H - 1), x.value = u - N - S.value + l.value;
684
+ break;
685
+ }
686
+ }
687
+ e.suffix && Q(0) + S.value > d.value && (x.value = null);
688
+ }
689
+ }), () => {
690
+ const u = w.value && !!T.value.length, {
691
+ itemComponent: $,
692
+ renderRawItem: L,
693
+ renderRawRest: H,
694
+ renderRest: N,
695
+ prefixCls: J = "rc-overflow",
696
+ suffix: te,
697
+ component: re = "div",
698
+ id: $e,
699
+ onMousedown: Oe
700
+ } = e, {
701
+ class: Pe,
702
+ style: k
703
+ } = o, Fe = Pt(o, ["class", "style"]);
704
+ let fe = {};
705
+ x.value !== null && v.value && (fe = {
706
+ position: "absolute",
707
+ left: `${x.value}px`,
708
+ top: 0
709
+ });
710
+ const se = {
711
+ prefixCls: I.value,
712
+ responsive: v.value,
713
+ component: $,
714
+ invalidate: D.value
715
+ }, r = L ? (M, K) => {
716
+ const _ = C(M, K);
717
+ return f(Ve, {
718
+ key: _,
719
+ value: g(g({}, se), {
720
+ order: K,
721
+ item: M,
722
+ itemKey: _,
723
+ registerSize: V,
724
+ display: K <= y.value
725
+ })
726
+ }, {
727
+ default: () => [L(M, K)]
728
+ });
729
+ } : (M, K) => {
730
+ const _ = C(M, K);
731
+ return f(Se, B(B({}, se), {}, {
732
+ order: K,
733
+ key: _,
734
+ item: M,
735
+ renderItem: G.value,
736
+ itemKey: _,
737
+ registerSize: V,
738
+ display: K <= y.value
739
+ }), null);
740
+ };
741
+ let s = () => null;
742
+ const W = {
743
+ order: u ? y.value : Number.MAX_SAFE_INTEGER,
744
+ className: `${I.value} ${I.value}-rest`,
745
+ registerSize: Z,
746
+ display: u
747
+ };
748
+ if (H)
749
+ H && (s = () => f(Ve, {
750
+ value: g(g({}, se), W)
751
+ }, {
752
+ default: () => [H(T.value)]
753
+ }));
754
+ else {
755
+ const M = N || Ft;
756
+ s = () => f(Se, B(B({}, se), W), {
757
+ default: () => typeof M == "function" ? M(T.value) : M
758
+ });
759
+ }
760
+ const U = () => {
761
+ var M;
762
+ return f(re, B({
763
+ id: $e,
764
+ class: ae(!D.value && J, Pe),
765
+ style: k,
766
+ onMousedown: Oe,
767
+ role: e.role
768
+ }, Fe), {
769
+ default: () => [E.value.map(r), O.value ? s() : null, te && f(Se, B(B({}, se), {}, {
770
+ order: y.value,
771
+ class: `${I.value}-suffix`,
772
+ registerSize: X,
773
+ display: !0,
774
+ style: fe
775
+ }), {
776
+ default: () => te
777
+ }), (M = i.default) === null || M === void 0 ? void 0 : M.call(i)]
778
+ });
779
+ };
780
+ return f(yn, {
781
+ disabled: !v.value,
782
+ onResize: j
783
+ }, {
784
+ default: U
785
+ });
786
+ };
787
+ }
788
+ });
789
+ xe.Item = Ot;
790
+ xe.RESPONSIVE = Cn;
791
+ xe.INVALIDATE = xn;
792
+ const $n = Symbol("TreeSelectLegacyContextPropsKey");
793
+ function zo(e) {
794
+ return Ce($n, e);
795
+ }
796
+ function He() {
797
+ return Ie($n, {});
798
+ }
799
+ const Rt = {
800
+ id: String,
801
+ prefixCls: String,
802
+ values: c.array,
803
+ open: {
804
+ type: Boolean,
805
+ default: void 0
806
+ },
807
+ searchValue: String,
808
+ inputRef: c.any,
809
+ placeholder: c.any,
810
+ disabled: {
811
+ type: Boolean,
812
+ default: void 0
813
+ },
814
+ mode: String,
815
+ showSearch: {
816
+ type: Boolean,
817
+ default: void 0
818
+ },
819
+ autofocus: {
820
+ type: Boolean,
821
+ default: void 0
822
+ },
823
+ autocomplete: String,
824
+ activeDescendantId: String,
825
+ tabindex: c.oneOfType([c.number, c.string]),
826
+ compositionStatus: Boolean,
827
+ removeIcon: c.any,
828
+ choiceTransitionName: String,
829
+ maxTagCount: c.oneOfType([c.number, c.string]),
830
+ maxTagTextLength: Number,
831
+ maxTagPlaceholder: c.any.def(() => (e) => `+ ${e.length} ...`),
832
+ tagRender: Function,
833
+ onToggleOpen: {
834
+ type: Function
835
+ },
836
+ onRemove: Function,
837
+ onInputChange: Function,
838
+ onInputPaste: Function,
839
+ onInputKeyDown: Function,
840
+ onInputMouseDown: Function,
841
+ onInputCompositionStart: Function,
842
+ onInputCompositionEnd: Function
843
+ }, ln = (e) => {
844
+ e.preventDefault(), e.stopPropagation();
845
+ }, Dt = ne({
846
+ name: "MultipleSelectSelector",
847
+ inheritAttrs: !1,
848
+ props: Rt,
849
+ setup(e) {
850
+ const n = A(), o = A(0), t = A(!1), i = He(), a = R(() => `${e.prefixCls}-selection`), p = R(() => e.open || e.mode === "tags" ? e.searchValue : ""), d = R(() => e.mode === "tags" || e.showSearch && (e.open || t.value)), b = le("");
851
+ hn(() => {
852
+ b.value = p.value;
853
+ }), ge(() => {
854
+ oe(b, () => {
855
+ o.value = n.value.scrollWidth;
856
+ }, {
857
+ flush: "post",
858
+ immediate: !0
859
+ });
860
+ });
861
+ function h(y, w, I, m, v) {
862
+ return f("span", {
863
+ class: ae(`${a.value}-item`, {
864
+ [`${a.value}-item-disabled`]: I
865
+ }),
866
+ title: typeof y == "string" || typeof y == "number" ? y.toString() : void 0
867
+ }, [f("span", {
868
+ class: `${a.value}-item-content`
869
+ }, [w]), m && f(ve, {
870
+ class: `${a.value}-item-remove`,
871
+ onMousedown: ln,
872
+ onClick: v,
873
+ customizeIcon: e.removeIcon
874
+ }, {
875
+ default: () => [Ae("×")]
876
+ })]);
877
+ }
878
+ function l(y, w, I, m, v, D) {
879
+ var O;
880
+ const E = (C) => {
881
+ ln(C), e.onToggleOpen(!open);
882
+ };
883
+ let T = D;
884
+ return i.keyEntities && (T = ((O = i.keyEntities[y]) === null || O === void 0 ? void 0 : O.node) || {}), f("span", {
885
+ key: y,
886
+ onMousedown: E
887
+ }, [e.tagRender({
888
+ label: w,
889
+ value: y,
890
+ disabled: I,
891
+ closable: m,
892
+ onClose: v,
893
+ option: T
894
+ })]);
895
+ }
896
+ function S(y) {
897
+ const {
898
+ disabled: w,
899
+ label: I,
900
+ value: m,
901
+ option: v
902
+ } = y, D = !e.disabled && !w;
903
+ let O = I;
904
+ if (typeof e.maxTagTextLength == "number" && (typeof I == "string" || typeof I == "number")) {
905
+ const T = String(O);
906
+ T.length > e.maxTagTextLength && (O = `${T.slice(0, e.maxTagTextLength)}...`);
907
+ }
908
+ const E = (T) => {
909
+ var C;
910
+ T && T.stopPropagation(), (C = e.onRemove) === null || C === void 0 || C.call(e, y);
911
+ };
912
+ return typeof e.tagRender == "function" ? l(m, O, w, D, E, v) : h(I, O, w, D, E);
913
+ }
914
+ function x(y) {
915
+ const {
916
+ maxTagPlaceholder: w = (m) => `+ ${m.length} ...`
917
+ } = e, I = typeof w == "function" ? w(y) : w;
918
+ return h(I, I, !1);
919
+ }
920
+ const F = (y) => {
921
+ const w = y.target.composing;
922
+ b.value = y.target.value, w || e.onInputChange(y);
923
+ };
924
+ return () => {
925
+ const {
926
+ id: y,
927
+ prefixCls: w,
928
+ values: I,
929
+ open: m,
930
+ inputRef: v,
931
+ placeholder: D,
932
+ disabled: O,
933
+ autofocus: E,
934
+ autocomplete: T,
935
+ activeDescendantId: C,
936
+ tabindex: G,
937
+ compositionStatus: z,
938
+ onInputPaste: j,
939
+ onInputKeyDown: V,
940
+ onInputMouseDown: Z,
941
+ onInputCompositionStart: X,
942
+ onInputCompositionEnd: Q
943
+ } = e, u = f("div", {
944
+ class: `${a.value}-search`,
945
+ style: {
946
+ width: o.value + "px"
947
+ },
948
+ key: "input"
949
+ }, [f(wn, {
950
+ inputRef: v,
951
+ open: m,
952
+ prefixCls: w,
953
+ id: y,
954
+ inputElement: null,
955
+ disabled: O,
956
+ autofocus: E,
957
+ autocomplete: T,
958
+ editable: d.value,
959
+ activeDescendantId: C,
960
+ value: b.value,
961
+ onKeydown: V,
962
+ onMousedown: Z,
963
+ onChange: F,
964
+ onPaste: j,
965
+ onCompositionstart: X,
966
+ onCompositionend: Q,
967
+ tabindex: G,
968
+ attrs: bn(e, !0),
969
+ onFocus: () => t.value = !0,
970
+ onBlur: () => t.value = !1
971
+ }, null), f("span", {
972
+ ref: n,
973
+ class: `${a.value}-search-mirror`,
974
+ "aria-hidden": !0
975
+ }, [b.value, Ae(" ")])]), $ = f(xe, {
976
+ prefixCls: `${a.value}-overflow`,
977
+ data: I,
978
+ renderItem: S,
979
+ renderRest: x,
980
+ suffix: u,
981
+ itemKey: "key",
982
+ maxCount: e.maxTagCount,
983
+ key: "overflow"
984
+ }, null);
985
+ return f(we, null, [$, !I.length && !p.value && !z && f("span", {
986
+ class: `${a.value}-placeholder`
987
+ }, [D])]);
988
+ };
989
+ }
990
+ }), Tt = {
991
+ inputElement: c.any,
992
+ id: String,
993
+ prefixCls: String,
994
+ values: c.array,
995
+ open: {
996
+ type: Boolean,
997
+ default: void 0
998
+ },
999
+ searchValue: String,
1000
+ inputRef: c.any,
1001
+ placeholder: c.any,
1002
+ compositionStatus: {
1003
+ type: Boolean,
1004
+ default: void 0
1005
+ },
1006
+ disabled: {
1007
+ type: Boolean,
1008
+ default: void 0
1009
+ },
1010
+ mode: String,
1011
+ showSearch: {
1012
+ type: Boolean,
1013
+ default: void 0
1014
+ },
1015
+ autofocus: {
1016
+ type: Boolean,
1017
+ default: void 0
1018
+ },
1019
+ autocomplete: String,
1020
+ activeDescendantId: String,
1021
+ tabindex: c.oneOfType([c.number, c.string]),
1022
+ activeValue: String,
1023
+ backfill: {
1024
+ type: Boolean,
1025
+ default: void 0
1026
+ },
1027
+ optionLabelRender: Function,
1028
+ onInputChange: Function,
1029
+ onInputPaste: Function,
1030
+ onInputKeyDown: Function,
1031
+ onInputMouseDown: Function,
1032
+ onInputCompositionStart: Function,
1033
+ onInputCompositionEnd: Function
1034
+ }, je = ne({
1035
+ name: "SingleSelector",
1036
+ setup(e) {
1037
+ const n = A(!1), o = R(() => e.mode === "combobox"), t = R(() => o.value || e.showSearch), i = R(() => {
1038
+ let l = e.searchValue || "";
1039
+ return o.value && e.activeValue && !n.value && (l = e.activeValue), l;
1040
+ }), a = He();
1041
+ oe([o, () => e.activeValue], () => {
1042
+ o.value && (n.value = !1);
1043
+ }, {
1044
+ immediate: !0
1045
+ });
1046
+ const p = R(() => e.mode !== "combobox" && !e.open && !e.showSearch ? !1 : !!i.value || e.compositionStatus), d = R(() => {
1047
+ const l = e.values[0];
1048
+ return l && (typeof l.label == "string" || typeof l.label == "number") ? l.label.toString() : void 0;
1049
+ }), b = () => {
1050
+ if (e.values[0])
1051
+ return null;
1052
+ const l = p.value ? {
1053
+ visibility: "hidden"
1054
+ } : void 0;
1055
+ return f("span", {
1056
+ class: `${e.prefixCls}-selection-placeholder`,
1057
+ style: l
1058
+ }, [e.placeholder]);
1059
+ }, h = (l) => {
1060
+ l.target.composing || (n.value = !0, e.onInputChange(l));
1061
+ };
1062
+ return () => {
1063
+ var l, S, x, F;
1064
+ const {
1065
+ inputElement: y,
1066
+ prefixCls: w,
1067
+ id: I,
1068
+ values: m,
1069
+ inputRef: v,
1070
+ disabled: D,
1071
+ autofocus: O,
1072
+ autocomplete: E,
1073
+ activeDescendantId: T,
1074
+ open: C,
1075
+ tabindex: G,
1076
+ optionLabelRender: z,
1077
+ onInputKeyDown: j,
1078
+ onInputMouseDown: V,
1079
+ onInputPaste: Z,
1080
+ onInputCompositionStart: X,
1081
+ onInputCompositionEnd: Q
1082
+ } = e, u = m[0];
1083
+ let $ = null;
1084
+ if (u && a.customSlots) {
1085
+ const L = (l = u.key) !== null && l !== void 0 ? l : u.value, H = ((S = a.keyEntities[L]) === null || S === void 0 ? void 0 : S.node) || {};
1086
+ $ = a.customSlots[(x = H.slots) === null || x === void 0 ? void 0 : x.title] || a.customSlots.title || u.label, typeof $ == "function" && ($ = $(H));
1087
+ } else
1088
+ $ = z && u ? z(u.option) : u == null ? void 0 : u.label;
1089
+ return f(we, null, [f("span", {
1090
+ class: `${w}-selection-search`
1091
+ }, [f(wn, {
1092
+ inputRef: v,
1093
+ prefixCls: w,
1094
+ id: I,
1095
+ open: C,
1096
+ inputElement: y,
1097
+ disabled: D,
1098
+ autofocus: O,
1099
+ autocomplete: E,
1100
+ editable: t.value,
1101
+ activeDescendantId: T,
1102
+ value: i.value,
1103
+ onKeydown: j,
1104
+ onMousedown: V,
1105
+ onChange: h,
1106
+ onPaste: Z,
1107
+ onCompositionstart: X,
1108
+ onCompositionend: Q,
1109
+ tabindex: G,
1110
+ attrs: bn(e, !0)
1111
+ }, null)]), !o.value && u && !p.value && f("span", {
1112
+ class: `${w}-selection-item`,
1113
+ title: d.value
1114
+ }, [f(we, {
1115
+ key: (F = u.key) !== null && F !== void 0 ? F : u.value
1116
+ }, [$])]), b()]);
1117
+ };
1118
+ }
1119
+ });
1120
+ je.props = Tt;
1121
+ je.inheritAttrs = !1;
1122
+ function Mt(e) {
1123
+ return ![
1124
+ // System function button
1125
+ P.ESC,
1126
+ P.SHIFT,
1127
+ P.BACKSPACE,
1128
+ P.TAB,
1129
+ P.WIN_KEY,
1130
+ P.ALT,
1131
+ P.META,
1132
+ P.WIN_KEY_RIGHT,
1133
+ P.CTRL,
1134
+ P.SEMICOLON,
1135
+ P.EQUALS,
1136
+ P.CAPS_LOCK,
1137
+ P.CONTEXT_MENU,
1138
+ // F1-F12
1139
+ P.F1,
1140
+ P.F2,
1141
+ P.F3,
1142
+ P.F4,
1143
+ P.F5,
1144
+ P.F6,
1145
+ P.F7,
1146
+ P.F8,
1147
+ P.F9,
1148
+ P.F10,
1149
+ P.F11,
1150
+ P.F12
1151
+ ].includes(e);
1152
+ }
1153
+ function On() {
1154
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, n = null, o;
1155
+ _e(() => {
1156
+ clearTimeout(o);
1157
+ });
1158
+ function t(i) {
1159
+ (i || n === null) && (n = i), clearTimeout(o), o = setTimeout(() => {
1160
+ n = null;
1161
+ }, e);
1162
+ }
1163
+ return [() => n, t];
1164
+ }
1165
+ const zt = ne({
1166
+ name: "Selector",
1167
+ inheritAttrs: !1,
1168
+ props: {
1169
+ id: String,
1170
+ prefixCls: String,
1171
+ showSearch: {
1172
+ type: Boolean,
1173
+ default: void 0
1174
+ },
1175
+ open: {
1176
+ type: Boolean,
1177
+ default: void 0
1178
+ },
1179
+ /** Display in the Selector value, it's not same as `value` prop */
1180
+ values: c.array,
1181
+ multiple: {
1182
+ type: Boolean,
1183
+ default: void 0
1184
+ },
1185
+ mode: String,
1186
+ searchValue: String,
1187
+ activeValue: String,
1188
+ inputElement: c.any,
1189
+ autofocus: {
1190
+ type: Boolean,
1191
+ default: void 0
1192
+ },
1193
+ activeDescendantId: String,
1194
+ tabindex: c.oneOfType([c.number, c.string]),
1195
+ disabled: {
1196
+ type: Boolean,
1197
+ default: void 0
1198
+ },
1199
+ placeholder: c.any,
1200
+ removeIcon: c.any,
1201
+ // Tags
1202
+ maxTagCount: c.oneOfType([c.number, c.string]),
1203
+ maxTagTextLength: Number,
1204
+ maxTagPlaceholder: c.any,
1205
+ tagRender: Function,
1206
+ optionLabelRender: Function,
1207
+ /** Check if `tokenSeparators` contains `\n` or `\r\n` */
1208
+ tokenWithEnter: {
1209
+ type: Boolean,
1210
+ default: void 0
1211
+ },
1212
+ // Motion
1213
+ choiceTransitionName: String,
1214
+ onToggleOpen: {
1215
+ type: Function
1216
+ },
1217
+ /** `onSearch` returns go next step boolean to check if need do toggle open */
1218
+ onSearch: Function,
1219
+ onSearchSubmit: Function,
1220
+ onRemove: Function,
1221
+ onInputKeyDown: {
1222
+ type: Function
1223
+ },
1224
+ /**
1225
+ * @private get real dom for trigger align.
1226
+ * This may be removed after React provides replacement of `findDOMNode`
1227
+ */
1228
+ domRef: Function
1229
+ },
1230
+ setup(e, n) {
1231
+ let {
1232
+ expose: o
1233
+ } = n;
1234
+ const t = Sn(), i = le(!1), [a, p] = On(0), d = (m) => {
1235
+ const {
1236
+ which: v
1237
+ } = m;
1238
+ (v === P.UP || v === P.DOWN) && m.preventDefault(), e.onInputKeyDown && e.onInputKeyDown(m), v === P.ENTER && e.mode === "tags" && !i.value && !e.open && e.onSearchSubmit(m.target.value), Mt(v) && e.onToggleOpen(!0);
1239
+ }, b = () => {
1240
+ p(!0);
1241
+ };
1242
+ let h = null;
1243
+ const l = (m) => {
1244
+ e.onSearch(m, !0, i.value) !== !1 && e.onToggleOpen(!0);
1245
+ }, S = () => {
1246
+ i.value = !0;
1247
+ }, x = (m) => {
1248
+ i.value = !1, e.mode !== "combobox" && l(m.target.value);
1249
+ }, F = (m) => {
1250
+ let {
1251
+ target: {
1252
+ value: v
1253
+ }
1254
+ } = m;
1255
+ if (e.tokenWithEnter && h && /[\r\n]/.test(h)) {
1256
+ const D = h.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
1257
+ v = v.replace(D, h);
1258
+ }
1259
+ h = null, l(v);
1260
+ }, y = (m) => {
1261
+ const {
1262
+ clipboardData: v
1263
+ } = m;
1264
+ h = v.getData("text");
1265
+ }, w = (m) => {
1266
+ let {
1267
+ target: v
1268
+ } = m;
1269
+ v !== t.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
1270
+ t.current.focus();
1271
+ }) : t.current.focus());
1272
+ }, I = (m) => {
1273
+ const v = a();
1274
+ m.target !== t.current && !v && m.preventDefault(), (e.mode !== "combobox" && (!e.showSearch || !v) || !e.open) && (e.open && e.onSearch("", !0, !1), e.onToggleOpen());
1275
+ };
1276
+ return o({
1277
+ focus: () => {
1278
+ t.current.focus();
1279
+ },
1280
+ blur: () => {
1281
+ t.current.blur();
1282
+ }
1283
+ }), () => {
1284
+ const {
1285
+ prefixCls: m,
1286
+ domRef: v,
1287
+ mode: D
1288
+ } = e, O = {
1289
+ inputRef: t,
1290
+ onInputKeyDown: d,
1291
+ onInputMouseDown: b,
1292
+ onInputChange: F,
1293
+ onInputPaste: y,
1294
+ compositionStatus: i.value,
1295
+ onInputCompositionStart: S,
1296
+ onInputCompositionEnd: x
1297
+ }, E = D === "multiple" || D === "tags" ? f(Dt, B(B({}, e), O), null) : f(je, B(B({}, e), O), null);
1298
+ return f("div", {
1299
+ ref: v,
1300
+ class: `${m}-selector`,
1301
+ onClick: w,
1302
+ onMousedown: I
1303
+ }, [E]);
1304
+ };
1305
+ }
1306
+ });
1307
+ function Nt(e, n, o) {
1308
+ function t(i) {
1309
+ var a, p, d;
1310
+ let b = i.target;
1311
+ b.shadowRoot && i.composed && (b = i.composedPath()[0] || b);
1312
+ const h = [(a = e[0]) === null || a === void 0 ? void 0 : a.value, (d = (p = e[1]) === null || p === void 0 ? void 0 : p.value) === null || d === void 0 ? void 0 : d.getPopupElement()];
1313
+ n.value && h.every((l) => l && !l.contains(b) && l !== b) && o(!1);
1314
+ }
1315
+ ge(() => {
1316
+ window.addEventListener("mousedown", t);
1317
+ }), _e(() => {
1318
+ window.removeEventListener("mousedown", t);
1319
+ });
1320
+ }
1321
+ function Bt() {
1322
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
1323
+ const n = A(!1);
1324
+ let o;
1325
+ const t = () => {
1326
+ clearTimeout(o);
1327
+ };
1328
+ return ge(() => {
1329
+ t();
1330
+ }), [n, (a, p) => {
1331
+ t(), o = setTimeout(() => {
1332
+ n.value = a, p && p();
1333
+ }, e);
1334
+ }, t];
1335
+ }
1336
+ const Pn = Symbol("BaseSelectContextKey");
1337
+ function Kt(e) {
1338
+ return Ce(Pn, e);
1339
+ }
1340
+ function No() {
1341
+ return Ie(Pn, {});
1342
+ }
1343
+ const Lt = () => {
1344
+ if (typeof navigator > "u" || typeof window > "u")
1345
+ return !1;
1346
+ const e = navigator.userAgent || navigator.vendor || window.opera;
1347
+ return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e == null ? void 0 : e.substring(0, 4));
1348
+ };
1349
+ function At(e) {
1350
+ if (!mt(e)) return on(e);
1351
+ const n = new Proxy({}, {
1352
+ get(o, t, i) {
1353
+ return Reflect.get(e.value, t, i);
1354
+ },
1355
+ set(o, t, i) {
1356
+ return e.value[t] = i, !0;
1357
+ },
1358
+ deleteProperty(o, t) {
1359
+ return Reflect.deleteProperty(e.value, t);
1360
+ },
1361
+ has(o, t) {
1362
+ return Reflect.has(e.value, t);
1363
+ },
1364
+ ownKeys() {
1365
+ return Object.keys(e.value);
1366
+ },
1367
+ getOwnPropertyDescriptor() {
1368
+ return {
1369
+ enumerable: !0,
1370
+ configurable: !0
1371
+ };
1372
+ }
1373
+ });
1374
+ return on(n);
1375
+ }
1376
+ var Vt = function(e, n) {
1377
+ var o = {};
1378
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
1379
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++)
1380
+ n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]);
1381
+ return o;
1382
+ };
1383
+ const Wt = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], _t = () => ({
1384
+ prefixCls: String,
1385
+ id: String,
1386
+ omitDomProps: Array,
1387
+ // >>> Value
1388
+ displayValues: Array,
1389
+ onDisplayValuesChange: Function,
1390
+ // >>> Active
1391
+ /** Current dropdown list active item string value */
1392
+ activeValue: String,
1393
+ /** Link search input with target element */
1394
+ activeDescendantId: String,
1395
+ onActiveValueChange: Function,
1396
+ // >>> Search
1397
+ searchValue: String,
1398
+ /** Trigger onSearch, return false to prevent trigger open event */
1399
+ onSearch: Function,
1400
+ /** Trigger when search text match the `tokenSeparators`. Will provide split content */
1401
+ onSearchSplit: Function,
1402
+ maxLength: Number,
1403
+ OptionList: c.any,
1404
+ /** Tell if provided `options` is empty */
1405
+ emptyOptions: Boolean
1406
+ }), Ht = () => ({
1407
+ showSearch: {
1408
+ type: Boolean,
1409
+ default: void 0
1410
+ },
1411
+ tagRender: {
1412
+ type: Function
1413
+ },
1414
+ optionLabelRender: {
1415
+ type: Function
1416
+ },
1417
+ direction: {
1418
+ type: String
1419
+ },
1420
+ // MISC
1421
+ tabindex: Number,
1422
+ autofocus: Boolean,
1423
+ notFoundContent: c.any,
1424
+ placeholder: c.any,
1425
+ onClear: Function,
1426
+ choiceTransitionName: String,
1427
+ // >>> Mode
1428
+ mode: String,
1429
+ // >>> Status
1430
+ disabled: {
1431
+ type: Boolean,
1432
+ default: void 0
1433
+ },
1434
+ loading: {
1435
+ type: Boolean,
1436
+ default: void 0
1437
+ },
1438
+ // >>> Open
1439
+ open: {
1440
+ type: Boolean,
1441
+ default: void 0
1442
+ },
1443
+ defaultOpen: {
1444
+ type: Boolean,
1445
+ default: void 0
1446
+ },
1447
+ onDropdownVisibleChange: {
1448
+ type: Function
1449
+ },
1450
+ // >>> Customize Input
1451
+ /** @private Internal usage. Do not use in your production. */
1452
+ getInputElement: {
1453
+ type: Function
1454
+ },
1455
+ /** @private Internal usage. Do not use in your production. */
1456
+ getRawInputElement: {
1457
+ type: Function
1458
+ },
1459
+ // >>> Selector
1460
+ maxTagTextLength: Number,
1461
+ maxTagCount: {
1462
+ type: [String, Number]
1463
+ },
1464
+ maxTagPlaceholder: c.any,
1465
+ // >>> Search
1466
+ tokenSeparators: {
1467
+ type: Array
1468
+ },
1469
+ // >>> Icons
1470
+ allowClear: {
1471
+ type: Boolean,
1472
+ default: void 0
1473
+ },
1474
+ showArrow: {
1475
+ type: Boolean,
1476
+ default: void 0
1477
+ },
1478
+ inputIcon: c.any,
1479
+ /** Clear all icon */
1480
+ clearIcon: c.any,
1481
+ /** Selector remove icon */
1482
+ removeIcon: c.any,
1483
+ // >>> Dropdown
1484
+ animation: String,
1485
+ transitionName: String,
1486
+ dropdownStyle: {
1487
+ type: Object
1488
+ },
1489
+ dropdownClassName: String,
1490
+ dropdownMatchSelectWidth: {
1491
+ type: [Boolean, Number],
1492
+ default: void 0
1493
+ },
1494
+ dropdownRender: {
1495
+ type: Function
1496
+ },
1497
+ dropdownAlign: Object,
1498
+ placement: {
1499
+ type: String
1500
+ },
1501
+ getPopupContainer: {
1502
+ type: Function
1503
+ },
1504
+ // >>> Focus
1505
+ showAction: {
1506
+ type: Array
1507
+ },
1508
+ onBlur: {
1509
+ type: Function
1510
+ },
1511
+ onFocus: {
1512
+ type: Function
1513
+ },
1514
+ // >>> Rest Events
1515
+ onKeyup: Function,
1516
+ onKeydown: Function,
1517
+ onMousedown: Function,
1518
+ onPopupScroll: Function,
1519
+ onInputKeyDown: Function,
1520
+ onMouseenter: Function,
1521
+ onMouseleave: Function,
1522
+ onClick: Function
1523
+ }), jt = () => g(g({}, _t()), Ht());
1524
+ function Xt(e) {
1525
+ return e === "tags" || e === "multiple";
1526
+ }
1527
+ const Bo = ne({
1528
+ compatConfig: {
1529
+ MODE: 3
1530
+ },
1531
+ name: "BaseSelect",
1532
+ inheritAttrs: !1,
1533
+ props: ot(jt(), {
1534
+ showAction: [],
1535
+ notFoundContent: "Not Found"
1536
+ }),
1537
+ setup(e, n) {
1538
+ let {
1539
+ attrs: o,
1540
+ expose: t,
1541
+ slots: i
1542
+ } = n;
1543
+ const a = R(() => Xt(e.mode)), p = R(() => e.showSearch !== void 0 ? e.showSearch : a.value || e.mode === "combobox"), d = A(!1);
1544
+ ge(() => {
1545
+ d.value = Lt();
1546
+ });
1547
+ const b = He(), h = A(null), l = Sn(), S = A(null), x = A(null), F = A(null), y = le(!1), [w, I, m] = Bt();
1548
+ t({
1549
+ focus: () => {
1550
+ var r;
1551
+ (r = x.value) === null || r === void 0 || r.focus();
1552
+ },
1553
+ blur: () => {
1554
+ var r;
1555
+ (r = x.value) === null || r === void 0 || r.blur();
1556
+ },
1557
+ scrollTo: (r) => {
1558
+ var s;
1559
+ return (s = F.value) === null || s === void 0 ? void 0 : s.scrollTo(r);
1560
+ }
1561
+ });
1562
+ const O = R(() => {
1563
+ var r;
1564
+ if (e.mode !== "combobox")
1565
+ return e.searchValue;
1566
+ const s = (r = e.displayValues[0]) === null || r === void 0 ? void 0 : r.value;
1567
+ return typeof s == "string" || typeof s == "number" ? String(s) : "";
1568
+ }), E = e.open !== void 0 ? e.open : e.defaultOpen, T = A(E), C = A(E), G = (r) => {
1569
+ T.value = e.open !== void 0 ? e.open : r, C.value = T.value;
1570
+ };
1571
+ oe(() => e.open, () => {
1572
+ G(e.open);
1573
+ });
1574
+ const z = R(() => !e.notFoundContent && e.emptyOptions);
1575
+ hn(() => {
1576
+ C.value = T.value, (e.disabled || z.value && C.value && e.mode === "combobox") && (C.value = !1);
1577
+ });
1578
+ const j = R(() => z.value ? !1 : C.value), V = (r) => {
1579
+ const s = r !== void 0 ? r : !C.value;
1580
+ C.value !== s && !e.disabled && (G(s), e.onDropdownVisibleChange && e.onDropdownVisibleChange(s), !s && re.value && (re.value = !1, I(!1, () => {
1581
+ J.value = !1, y.value = !1;
1582
+ })));
1583
+ }, Z = R(() => (e.tokenSeparators || []).some((r) => [`
1584
+ `, `\r
1585
+ `].includes(r))), X = (r, s, W) => {
1586
+ var U, M;
1587
+ let K = !0, _ = r;
1588
+ (U = e.onActiveValueChange) === null || U === void 0 || U.call(e, null);
1589
+ const q = W ? null : bt(r, e.tokenSeparators);
1590
+ return e.mode !== "combobox" && q && (_ = "", (M = e.onSearchSplit) === null || M === void 0 || M.call(e, q), V(!1), K = !1), e.onSearch && O.value !== _ && e.onSearch(_, {
1591
+ source: s ? "typing" : "effect"
1592
+ }), K;
1593
+ }, Q = (r) => {
1594
+ var s;
1595
+ !r || !r.trim() || (s = e.onSearch) === null || s === void 0 || s.call(e, r, {
1596
+ source: "submit"
1597
+ });
1598
+ };
1599
+ oe(C, () => {
1600
+ !C.value && !a.value && e.mode !== "combobox" && X("", !1, !1);
1601
+ }, {
1602
+ immediate: !0,
1603
+ flush: "post"
1604
+ }), oe(() => e.disabled, () => {
1605
+ T.value && e.disabled && G(!1), e.disabled && !y.value && I(!1);
1606
+ }, {
1607
+ immediate: !0
1608
+ });
1609
+ const [u, $] = On(), L = function(r) {
1610
+ var s;
1611
+ const W = u(), {
1612
+ which: U
1613
+ } = r;
1614
+ if (U === P.ENTER && (e.mode !== "combobox" && r.preventDefault(), C.value || V(!0)), $(!!O.value), U === P.BACKSPACE && !W && a.value && !O.value && e.displayValues.length) {
1615
+ const q = [...e.displayValues];
1616
+ let ue = null;
1617
+ for (let ee = q.length - 1; ee >= 0; ee -= 1) {
1618
+ const ce = q[ee];
1619
+ if (!ce.disabled) {
1620
+ q.splice(ee, 1), ue = ce;
1621
+ break;
1622
+ }
1623
+ }
1624
+ ue && e.onDisplayValuesChange(q, {
1625
+ type: "remove",
1626
+ values: [ue]
1627
+ });
1628
+ }
1629
+ for (var M = arguments.length, K = new Array(M > 1 ? M - 1 : 0), _ = 1; _ < M; _++)
1630
+ K[_ - 1] = arguments[_];
1631
+ C.value && F.value && F.value.onKeydown(r, ...K), (s = e.onKeydown) === null || s === void 0 || s.call(e, r, ...K);
1632
+ }, H = function(r) {
1633
+ for (var s = arguments.length, W = new Array(s > 1 ? s - 1 : 0), U = 1; U < s; U++)
1634
+ W[U - 1] = arguments[U];
1635
+ C.value && F.value && F.value.onKeyup(r, ...W), e.onKeyup && e.onKeyup(r, ...W);
1636
+ }, N = (r) => {
1637
+ const s = e.displayValues.filter((W) => W !== r);
1638
+ e.onDisplayValuesChange(s, {
1639
+ type: "remove",
1640
+ values: [r]
1641
+ });
1642
+ }, J = A(!1), te = function() {
1643
+ I(!0), e.disabled || (e.onFocus && !J.value && e.onFocus(...arguments), e.showAction && e.showAction.includes("focus") && V(!0)), J.value = !0;
1644
+ }, re = le(!1), $e = function() {
1645
+ if (re.value || (y.value = !0, I(!1, () => {
1646
+ J.value = !1, y.value = !1, V(!1);
1647
+ }), e.disabled))
1648
+ return;
1649
+ const r = O.value;
1650
+ r && (e.mode === "tags" ? e.onSearch(r, {
1651
+ source: "submit"
1652
+ }) : e.mode === "multiple" && e.onSearch("", {
1653
+ source: "blur"
1654
+ })), e.onBlur && e.onBlur(...arguments);
1655
+ }, Oe = () => {
1656
+ re.value = !0;
1657
+ }, Pe = () => {
1658
+ re.value = !1;
1659
+ };
1660
+ Ce("VCSelectContainerEvent", {
1661
+ focus: te,
1662
+ blur: $e
1663
+ });
1664
+ const k = [];
1665
+ ge(() => {
1666
+ k.forEach((r) => clearTimeout(r)), k.splice(0, k.length);
1667
+ }), _e(() => {
1668
+ k.forEach((r) => clearTimeout(r)), k.splice(0, k.length);
1669
+ });
1670
+ const Fe = function(r) {
1671
+ var s, W;
1672
+ const {
1673
+ target: U
1674
+ } = r, M = (s = S.value) === null || s === void 0 ? void 0 : s.getPopupElement();
1675
+ if (M && M.contains(U)) {
1676
+ const ue = setTimeout(() => {
1677
+ var ee;
1678
+ const ce = k.indexOf(ue);
1679
+ ce !== -1 && k.splice(ce, 1), m(), !d.value && !M.contains(document.activeElement) && ((ee = x.value) === null || ee === void 0 || ee.focus());
1680
+ });
1681
+ k.push(ue);
1682
+ }
1683
+ for (var K = arguments.length, _ = new Array(K > 1 ? K - 1 : 0), q = 1; q < K; q++)
1684
+ _[q - 1] = arguments[q];
1685
+ (W = e.onMousedown) === null || W === void 0 || W.call(e, r, ..._);
1686
+ }, fe = A(null), se = () => {
1687
+ };
1688
+ return ge(() => {
1689
+ oe(j, () => {
1690
+ var r;
1691
+ if (j.value) {
1692
+ const s = Math.ceil((r = h.value) === null || r === void 0 ? void 0 : r.offsetWidth);
1693
+ fe.value !== s && !Number.isNaN(s) && (fe.value = s);
1694
+ }
1695
+ }, {
1696
+ immediate: !0,
1697
+ flush: "post"
1698
+ });
1699
+ }), Nt([h, S], j, V), Kt(At(g(g({}, gt(e)), {
1700
+ open: C,
1701
+ triggerOpen: j,
1702
+ showSearch: p,
1703
+ multiple: a,
1704
+ toggleOpen: V
1705
+ }))), () => {
1706
+ const r = g(g({}, e), o), {
1707
+ prefixCls: s,
1708
+ id: W,
1709
+ open: U,
1710
+ defaultOpen: M,
1711
+ mode: K,
1712
+ // Search related
1713
+ showSearch: _,
1714
+ searchValue: q,
1715
+ onSearch: ue,
1716
+ // Icons
1717
+ allowClear: ee,
1718
+ clearIcon: ce,
1719
+ showArrow: Ye,
1720
+ inputIcon: Mn,
1721
+ // Others
1722
+ disabled: Ee,
1723
+ loading: ye,
1724
+ getInputElement: Ge,
1725
+ getPopupContainer: zn,
1726
+ placement: Nn,
1727
+ // Dropdown
1728
+ animation: Bn,
1729
+ transitionName: Kn,
1730
+ dropdownStyle: Ln,
1731
+ dropdownClassName: An,
1732
+ dropdownMatchSelectWidth: Vn,
1733
+ dropdownRender: Wn,
1734
+ dropdownAlign: _n,
1735
+ showAction: So,
1736
+ direction: Hn,
1737
+ // Tags
1738
+ tokenSeparators: wo,
1739
+ tagRender: jn,
1740
+ optionLabelRender: Xn,
1741
+ // Events
1742
+ onPopupScroll: Io,
1743
+ onDropdownVisibleChange: Co,
1744
+ onFocus: xo,
1745
+ onBlur: $o,
1746
+ onKeyup: Oo,
1747
+ onKeydown: Po,
1748
+ onMousedown: Fo,
1749
+ onClear: Re,
1750
+ omitDomProps: De,
1751
+ getRawInputElement: Qe,
1752
+ displayValues: be,
1753
+ onDisplayValuesChange: Un,
1754
+ emptyOptions: Yn,
1755
+ activeDescendantId: Gn,
1756
+ activeValue: Qn,
1757
+ OptionList: qn
1758
+ } = r, Zn = Vt(r, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]), qe = K === "combobox" && Ge && Ge() || null, he = typeof Qe == "function" && Qe(), Te = g({}, Zn);
1759
+ let Ze;
1760
+ he && (Ze = (de) => {
1761
+ V(de);
1762
+ }), Wt.forEach((de) => {
1763
+ delete Te[de];
1764
+ }), De == null || De.forEach((de) => {
1765
+ delete Te[de];
1766
+ });
1767
+ const Je = Ye !== void 0 ? Ye : ye || !a.value && K !== "combobox";
1768
+ let ke;
1769
+ Je && (ke = f(ve, {
1770
+ class: ae(`${s}-arrow`, {
1771
+ [`${s}-arrow-loading`]: ye
1772
+ }),
1773
+ customizeIcon: Mn,
1774
+ customizeIconProps: {
1775
+ loading: ye,
1776
+ searchValue: O.value,
1777
+ open: C.value,
1778
+ focused: w.value,
1779
+ showSearch: p.value
1780
+ }
1781
+ }, null));
1782
+ let en;
1783
+ const Jn = () => {
1784
+ Re == null || Re(), Un([], {
1785
+ type: "clear",
1786
+ values: be
1787
+ }), X("", !1, !1);
1788
+ };
1789
+ !Ee && ee && (be.length || O.value) && (en = f(ve, {
1790
+ class: `${s}-clear`,
1791
+ onMousedown: Jn,
1792
+ customizeIcon: ce
1793
+ }, {
1794
+ default: () => [Ae("×")]
1795
+ }));
1796
+ const kn = f(qn, {
1797
+ ref: F
1798
+ }, g(g({}, b.customSlots), {
1799
+ option: i.option
1800
+ })), et = ae(s, o.class, {
1801
+ [`${s}-focused`]: w.value,
1802
+ [`${s}-multiple`]: a.value,
1803
+ [`${s}-single`]: !a.value,
1804
+ [`${s}-allow-clear`]: ee,
1805
+ [`${s}-show-arrow`]: Je,
1806
+ [`${s}-disabled`]: Ee,
1807
+ [`${s}-loading`]: ye,
1808
+ [`${s}-open`]: C.value,
1809
+ [`${s}-customize-input`]: qe,
1810
+ [`${s}-show-search`]: p.value
1811
+ }), nn = f(It, {
1812
+ ref: S,
1813
+ disabled: Ee,
1814
+ prefixCls: s,
1815
+ visible: j.value,
1816
+ popupElement: kn,
1817
+ containerWidth: fe.value,
1818
+ animation: Bn,
1819
+ transitionName: Kn,
1820
+ dropdownStyle: Ln,
1821
+ dropdownClassName: An,
1822
+ direction: Hn,
1823
+ dropdownMatchSelectWidth: Vn,
1824
+ dropdownRender: Wn,
1825
+ dropdownAlign: _n,
1826
+ placement: Nn,
1827
+ getPopupContainer: zn,
1828
+ empty: Yn,
1829
+ getTriggerDOMNode: () => l.current,
1830
+ onPopupVisibleChange: Ze,
1831
+ onPopupMouseEnter: se,
1832
+ onPopupFocusin: Oe,
1833
+ onPopupFocusout: Pe
1834
+ }, {
1835
+ default: () => he ? it(he) && pn(he, {
1836
+ ref: l
1837
+ }, !1, !0) : f(zt, B(B({}, e), {}, {
1838
+ domRef: l,
1839
+ prefixCls: s,
1840
+ inputElement: qe,
1841
+ ref: x,
1842
+ id: W,
1843
+ showSearch: p.value,
1844
+ mode: K,
1845
+ activeDescendantId: Gn,
1846
+ tagRender: jn,
1847
+ optionLabelRender: Xn,
1848
+ values: be,
1849
+ open: C.value,
1850
+ onToggleOpen: V,
1851
+ activeValue: Qn,
1852
+ searchValue: O.value,
1853
+ onSearch: X,
1854
+ onSearchSubmit: Q,
1855
+ onRemove: N,
1856
+ tokenWithEnter: Z.value
1857
+ }), null)
1858
+ });
1859
+ let Me;
1860
+ return he ? Me = nn : Me = f("div", B(B({}, Te), {}, {
1861
+ class: et,
1862
+ ref: h,
1863
+ onMousedown: Fe,
1864
+ onKeydown: L,
1865
+ onKeyup: H
1866
+ }), [w.value && !C.value && f("span", {
1867
+ style: {
1868
+ width: 0,
1869
+ height: 0,
1870
+ position: "absolute",
1871
+ overflow: "hidden",
1872
+ opacity: 0
1873
+ },
1874
+ "aria-live": "polite"
1875
+ }, [`${be.map((de) => {
1876
+ let {
1877
+ label: tn,
1878
+ value: nt
1879
+ } = de;
1880
+ return ["number", "string"].includes(typeof tn) ? tn : nt;
1881
+ }).join(", ")}`]), nn, ke, en]), Me;
1882
+ };
1883
+ }
1884
+ });
1885
+ function Ko(e, n, o) {
1886
+ const t = le(e());
1887
+ return oe(n, (i, a) => {
1888
+ o ? o(i, a) && (t.value = e()) : t.value = e();
1889
+ }), t;
1890
+ }
1891
+ let rn = 0;
1892
+ const Ut = at();
1893
+ function Yt() {
1894
+ let e;
1895
+ return Ut ? (e = rn, rn += 1) : e = "TEST_OR_SSR", e;
1896
+ }
1897
+ function Lo() {
1898
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : le("");
1899
+ const n = `rc_select_${Yt()}`;
1900
+ return e.value || n;
1901
+ }
1902
+ var Gt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, name: "down", theme: "outlined" };
1903
+ function sn(e) {
1904
+ for (var n = 1; n < arguments.length; n++) {
1905
+ var o = arguments[n] != null ? Object(arguments[n]) : {}, t = Object.keys(o);
1906
+ typeof Object.getOwnPropertySymbols == "function" && (t = t.concat(Object.getOwnPropertySymbols(o).filter(function(i) {
1907
+ return Object.getOwnPropertyDescriptor(o, i).enumerable;
1908
+ }))), t.forEach(function(i) {
1909
+ Qt(e, i, o[i]);
1910
+ });
1911
+ }
1912
+ return e;
1913
+ }
1914
+ function Qt(e, n, o) {
1915
+ return n in e ? Object.defineProperty(e, n, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = o, e;
1916
+ }
1917
+ var Xe = function(n, o) {
1918
+ var t = sn({}, n, o.attrs);
1919
+ return f(mn, sn({}, t, {
1920
+ icon: Gt
1921
+ }), null);
1922
+ };
1923
+ Xe.displayName = "DownOutlined";
1924
+ Xe.inheritAttrs = !1;
1925
+ var qt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, name: "check", theme: "outlined" };
1926
+ function un(e) {
1927
+ for (var n = 1; n < arguments.length; n++) {
1928
+ var o = arguments[n] != null ? Object(arguments[n]) : {}, t = Object.keys(o);
1929
+ typeof Object.getOwnPropertySymbols == "function" && (t = t.concat(Object.getOwnPropertySymbols(o).filter(function(i) {
1930
+ return Object.getOwnPropertyDescriptor(o, i).enumerable;
1931
+ }))), t.forEach(function(i) {
1932
+ Zt(e, i, o[i]);
1933
+ });
1934
+ }
1935
+ return e;
1936
+ }
1937
+ function Zt(e, n, o) {
1938
+ return n in e ? Object.defineProperty(e, n, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = o, e;
1939
+ }
1940
+ var Ue = function(n, o) {
1941
+ var t = un({}, n, o.attrs);
1942
+ return f(mn, un({}, t, {
1943
+ icon: qt
1944
+ }), null);
1945
+ };
1946
+ Ue.displayName = "CheckOutlined";
1947
+ Ue.inheritAttrs = !1;
1948
+ function Ao(e) {
1949
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1950
+ const {
1951
+ loading: o,
1952
+ multiple: t,
1953
+ prefixCls: i,
1954
+ hasFeedback: a,
1955
+ feedbackIcon: p,
1956
+ showArrow: d
1957
+ } = e, b = e.suffixIcon || n.suffixIcon && n.suffixIcon(), h = e.clearIcon || n.clearIcon && n.clearIcon(), l = e.menuItemSelectedIcon || n.menuItemSelectedIcon && n.menuItemSelectedIcon(), S = e.removeIcon || n.removeIcon && n.removeIcon(), x = h ?? f(lt, null, null), F = (m) => f(we, null, [d !== !1 && m, a && p]);
1958
+ let y = null;
1959
+ if (b !== void 0)
1960
+ y = F(b);
1961
+ else if (o)
1962
+ y = F(f(rt, {
1963
+ spin: !0
1964
+ }, null));
1965
+ else {
1966
+ const m = `${i}-suffix`;
1967
+ y = (v) => {
1968
+ let {
1969
+ open: D,
1970
+ showSearch: O
1971
+ } = v;
1972
+ return F(D && O ? f(ht, {
1973
+ class: m
1974
+ }, null) : f(Xe, {
1975
+ class: m
1976
+ }, null));
1977
+ };
1978
+ }
1979
+ let w = null;
1980
+ l !== void 0 ? w = l : t ? w = f(Ue, null, null) : w = null;
1981
+ let I = null;
1982
+ return S !== void 0 ? I = S : I = f(st, null, null), {
1983
+ clearIcon: x,
1984
+ suffixIcon: y,
1985
+ itemIcon: w,
1986
+ removeIcon: I
1987
+ };
1988
+ }
1989
+ const Jt = new Y("antMoveDownIn", {
1990
+ "0%": {
1991
+ transform: "translate3d(0, 100%, 0)",
1992
+ transformOrigin: "0 0",
1993
+ opacity: 0
1994
+ },
1995
+ "100%": {
1996
+ transform: "translate3d(0, 0, 0)",
1997
+ transformOrigin: "0 0",
1998
+ opacity: 1
1999
+ }
2000
+ }), kt = new Y("antMoveDownOut", {
2001
+ "0%": {
2002
+ transform: "translate3d(0, 0, 0)",
2003
+ transformOrigin: "0 0",
2004
+ opacity: 1
2005
+ },
2006
+ "100%": {
2007
+ transform: "translate3d(0, 100%, 0)",
2008
+ transformOrigin: "0 0",
2009
+ opacity: 0
2010
+ }
2011
+ }), eo = new Y("antMoveLeftIn", {
2012
+ "0%": {
2013
+ transform: "translate3d(-100%, 0, 0)",
2014
+ transformOrigin: "0 0",
2015
+ opacity: 0
2016
+ },
2017
+ "100%": {
2018
+ transform: "translate3d(0, 0, 0)",
2019
+ transformOrigin: "0 0",
2020
+ opacity: 1
2021
+ }
2022
+ }), no = new Y("antMoveLeftOut", {
2023
+ "0%": {
2024
+ transform: "translate3d(0, 0, 0)",
2025
+ transformOrigin: "0 0",
2026
+ opacity: 1
2027
+ },
2028
+ "100%": {
2029
+ transform: "translate3d(-100%, 0, 0)",
2030
+ transformOrigin: "0 0",
2031
+ opacity: 0
2032
+ }
2033
+ }), to = new Y("antMoveRightIn", {
2034
+ "0%": {
2035
+ transform: "translate3d(100%, 0, 0)",
2036
+ transformOrigin: "0 0",
2037
+ opacity: 0
2038
+ },
2039
+ "100%": {
2040
+ transform: "translate3d(0, 0, 0)",
2041
+ transformOrigin: "0 0",
2042
+ opacity: 1
2043
+ }
2044
+ }), oo = new Y("antMoveRightOut", {
2045
+ "0%": {
2046
+ transform: "translate3d(0, 0, 0)",
2047
+ transformOrigin: "0 0",
2048
+ opacity: 1
2049
+ },
2050
+ "100%": {
2051
+ transform: "translate3d(100%, 0, 0)",
2052
+ transformOrigin: "0 0",
2053
+ opacity: 0
2054
+ }
2055
+ }), io = new Y("antMoveUpIn", {
2056
+ "0%": {
2057
+ transform: "translate3d(0, -100%, 0)",
2058
+ transformOrigin: "0 0",
2059
+ opacity: 0
2060
+ },
2061
+ "100%": {
2062
+ transform: "translate3d(0, 0, 0)",
2063
+ transformOrigin: "0 0",
2064
+ opacity: 1
2065
+ }
2066
+ }), ao = new Y("antMoveUpOut", {
2067
+ "0%": {
2068
+ transform: "translate3d(0, 0, 0)",
2069
+ transformOrigin: "0 0",
2070
+ opacity: 1
2071
+ },
2072
+ "100%": {
2073
+ transform: "translate3d(0, -100%, 0)",
2074
+ transformOrigin: "0 0",
2075
+ opacity: 0
2076
+ }
2077
+ }), lo = {
2078
+ "move-up": {
2079
+ inKeyframes: io,
2080
+ outKeyframes: ao
2081
+ },
2082
+ "move-down": {
2083
+ inKeyframes: Jt,
2084
+ outKeyframes: kt
2085
+ },
2086
+ "move-left": {
2087
+ inKeyframes: eo,
2088
+ outKeyframes: no
2089
+ },
2090
+ "move-right": {
2091
+ inKeyframes: to,
2092
+ outKeyframes: oo
2093
+ }
2094
+ }, cn = (e, n) => {
2095
+ const {
2096
+ antCls: o
2097
+ } = e, t = `${o}-${n}`, {
2098
+ inKeyframes: i,
2099
+ outKeyframes: a
2100
+ } = lo[n];
2101
+ return [gn(t, i, a, e.motionDurationMid), {
2102
+ [`
2103
+ ${t}-enter,
2104
+ ${t}-appear
2105
+ `]: {
2106
+ opacity: 0,
2107
+ animationTimingFunction: e.motionEaseOutCirc
2108
+ },
2109
+ [`${t}-leave`]: {
2110
+ animationTimingFunction: e.motionEaseInOutCirc
2111
+ }
2112
+ }];
2113
+ }, Fn = new Y("antSlideUpIn", {
2114
+ "0%": {
2115
+ transform: "scaleY(0.8)",
2116
+ transformOrigin: "0% 0%",
2117
+ opacity: 0
2118
+ },
2119
+ "100%": {
2120
+ transform: "scaleY(1)",
2121
+ transformOrigin: "0% 0%",
2122
+ opacity: 1
2123
+ }
2124
+ }), En = new Y("antSlideUpOut", {
2125
+ "0%": {
2126
+ transform: "scaleY(1)",
2127
+ transformOrigin: "0% 0%",
2128
+ opacity: 1
2129
+ },
2130
+ "100%": {
2131
+ transform: "scaleY(0.8)",
2132
+ transformOrigin: "0% 0%",
2133
+ opacity: 0
2134
+ }
2135
+ }), Rn = new Y("antSlideDownIn", {
2136
+ "0%": {
2137
+ transform: "scaleY(0.8)",
2138
+ transformOrigin: "100% 100%",
2139
+ opacity: 0
2140
+ },
2141
+ "100%": {
2142
+ transform: "scaleY(1)",
2143
+ transformOrigin: "100% 100%",
2144
+ opacity: 1
2145
+ }
2146
+ }), Dn = new Y("antSlideDownOut", {
2147
+ "0%": {
2148
+ transform: "scaleY(1)",
2149
+ transformOrigin: "100% 100%",
2150
+ opacity: 1
2151
+ },
2152
+ "100%": {
2153
+ transform: "scaleY(0.8)",
2154
+ transformOrigin: "100% 100%",
2155
+ opacity: 0
2156
+ }
2157
+ }), ro = new Y("antSlideLeftIn", {
2158
+ "0%": {
2159
+ transform: "scaleX(0.8)",
2160
+ transformOrigin: "0% 0%",
2161
+ opacity: 0
2162
+ },
2163
+ "100%": {
2164
+ transform: "scaleX(1)",
2165
+ transformOrigin: "0% 0%",
2166
+ opacity: 1
2167
+ }
2168
+ }), so = new Y("antSlideLeftOut", {
2169
+ "0%": {
2170
+ transform: "scaleX(1)",
2171
+ transformOrigin: "0% 0%",
2172
+ opacity: 1
2173
+ },
2174
+ "100%": {
2175
+ transform: "scaleX(0.8)",
2176
+ transformOrigin: "0% 0%",
2177
+ opacity: 0
2178
+ }
2179
+ }), uo = new Y("antSlideRightIn", {
2180
+ "0%": {
2181
+ transform: "scaleX(0.8)",
2182
+ transformOrigin: "100% 0%",
2183
+ opacity: 0
2184
+ },
2185
+ "100%": {
2186
+ transform: "scaleX(1)",
2187
+ transformOrigin: "100% 0%",
2188
+ opacity: 1
2189
+ }
2190
+ }), co = new Y("antSlideRightOut", {
2191
+ "0%": {
2192
+ transform: "scaleX(1)",
2193
+ transformOrigin: "100% 0%",
2194
+ opacity: 1
2195
+ },
2196
+ "100%": {
2197
+ transform: "scaleX(0.8)",
2198
+ transformOrigin: "100% 0%",
2199
+ opacity: 0
2200
+ }
2201
+ }), fo = {
2202
+ "slide-up": {
2203
+ inKeyframes: Fn,
2204
+ outKeyframes: En
2205
+ },
2206
+ "slide-down": {
2207
+ inKeyframes: Rn,
2208
+ outKeyframes: Dn
2209
+ },
2210
+ "slide-left": {
2211
+ inKeyframes: ro,
2212
+ outKeyframes: so
2213
+ },
2214
+ "slide-right": {
2215
+ inKeyframes: uo,
2216
+ outKeyframes: co
2217
+ }
2218
+ }, dn = (e, n) => {
2219
+ const {
2220
+ antCls: o
2221
+ } = e, t = `${o}-${n}`, {
2222
+ inKeyframes: i,
2223
+ outKeyframes: a
2224
+ } = fo[n];
2225
+ return [gn(t, i, a, e.motionDurationMid), {
2226
+ [`
2227
+ ${t}-enter,
2228
+ ${t}-appear
2229
+ `]: {
2230
+ transform: "scale(0)",
2231
+ transformOrigin: "0% 0%",
2232
+ opacity: 0,
2233
+ animationTimingFunction: e.motionEaseOutQuint
2234
+ },
2235
+ [`${t}-leave`]: {
2236
+ animationTimingFunction: e.motionEaseInQuint
2237
+ }
2238
+ }];
2239
+ }, fn = (e) => {
2240
+ const {
2241
+ controlPaddingHorizontal: n
2242
+ } = e;
2243
+ return {
2244
+ position: "relative",
2245
+ display: "block",
2246
+ minHeight: e.controlHeight,
2247
+ padding: `${(e.controlHeight - e.fontSize * e.lineHeight) / 2}px ${n}px`,
2248
+ color: e.colorText,
2249
+ fontWeight: "normal",
2250
+ fontSize: e.fontSize,
2251
+ lineHeight: e.lineHeight,
2252
+ boxSizing: "border-box"
2253
+ };
2254
+ }, po = (e) => {
2255
+ const {
2256
+ antCls: n,
2257
+ componentCls: o
2258
+ } = e, t = `${o}-item`;
2259
+ return [
2260
+ {
2261
+ [`${o}-dropdown`]: g(g({}, We(e)), {
2262
+ position: "absolute",
2263
+ top: -9999,
2264
+ zIndex: e.zIndexPopup,
2265
+ boxSizing: "border-box",
2266
+ padding: e.paddingXXS,
2267
+ overflow: "hidden",
2268
+ fontSize: e.fontSize,
2269
+ // Fix select render lag of long text in chrome
2270
+ // https://github.com/ant-design/ant-design/issues/11456
2271
+ // https://github.com/ant-design/ant-design/issues/11843
2272
+ fontVariant: "initial",
2273
+ backgroundColor: e.colorBgElevated,
2274
+ borderRadius: e.borderRadiusLG,
2275
+ outline: "none",
2276
+ boxShadow: e.boxShadowSecondary,
2277
+ [`
2278
+ &${n}-slide-up-enter${n}-slide-up-enter-active${o}-dropdown-placement-bottomLeft,
2279
+ &${n}-slide-up-appear${n}-slide-up-appear-active${o}-dropdown-placement-bottomLeft
2280
+ `]: {
2281
+ animationName: Fn
2282
+ },
2283
+ [`
2284
+ &${n}-slide-up-enter${n}-slide-up-enter-active${o}-dropdown-placement-topLeft,
2285
+ &${n}-slide-up-appear${n}-slide-up-appear-active${o}-dropdown-placement-topLeft
2286
+ `]: {
2287
+ animationName: Rn
2288
+ },
2289
+ [`&${n}-slide-up-leave${n}-slide-up-leave-active${o}-dropdown-placement-bottomLeft`]: {
2290
+ animationName: En
2291
+ },
2292
+ [`&${n}-slide-up-leave${n}-slide-up-leave-active${o}-dropdown-placement-topLeft`]: {
2293
+ animationName: Dn
2294
+ },
2295
+ "&-hidden": {
2296
+ display: "none"
2297
+ },
2298
+ "&-empty": {
2299
+ color: e.colorTextDisabled
2300
+ },
2301
+ // ========================= Options =========================
2302
+ [`${t}-empty`]: g(g({}, fn(e)), {
2303
+ color: e.colorTextDisabled
2304
+ }),
2305
+ [`${t}`]: g(g({}, fn(e)), {
2306
+ cursor: "pointer",
2307
+ transition: `background ${e.motionDurationSlow} ease`,
2308
+ borderRadius: e.borderRadiusSM,
2309
+ // =========== Group ============
2310
+ "&-group": {
2311
+ color: e.colorTextDescription,
2312
+ fontSize: e.fontSizeSM,
2313
+ cursor: "default"
2314
+ },
2315
+ // =========== Option ===========
2316
+ "&-option": {
2317
+ display: "flex",
2318
+ "&-content": g({
2319
+ flex: "auto"
2320
+ }, Le),
2321
+ "&-state": {
2322
+ flex: "none"
2323
+ },
2324
+ [`&-active:not(${t}-option-disabled)`]: {
2325
+ backgroundColor: e.controlItemBgHover
2326
+ },
2327
+ [`&-selected:not(${t}-option-disabled)`]: {
2328
+ color: e.colorText,
2329
+ fontWeight: e.fontWeightStrong,
2330
+ backgroundColor: e.controlItemBgActive,
2331
+ [`${t}-option-state`]: {
2332
+ color: e.colorPrimary
2333
+ }
2334
+ },
2335
+ "&-disabled": {
2336
+ [`&${t}-option-selected`]: {
2337
+ backgroundColor: e.colorBgContainerDisabled
2338
+ },
2339
+ color: e.colorTextDisabled,
2340
+ cursor: "not-allowed"
2341
+ },
2342
+ "&-grouped": {
2343
+ paddingInlineStart: e.controlPaddingHorizontal * 2
2344
+ }
2345
+ }
2346
+ }),
2347
+ // =========================== RTL ===========================
2348
+ "&-rtl": {
2349
+ direction: "rtl"
2350
+ }
2351
+ })
2352
+ },
2353
+ // Follow code may reuse in other components
2354
+ dn(e, "slide-up"),
2355
+ dn(e, "slide-down"),
2356
+ cn(e, "move-up"),
2357
+ cn(e, "move-down")
2358
+ ];
2359
+ }, me = 2;
2360
+ function Tn(e) {
2361
+ let {
2362
+ controlHeightSM: n,
2363
+ controlHeight: o,
2364
+ lineWidth: t
2365
+ } = e;
2366
+ const i = (o - n) / 2 - t, a = Math.ceil(i / 2);
2367
+ return [i, a];
2368
+ }
2369
+ function Ne(e, n) {
2370
+ const {
2371
+ componentCls: o,
2372
+ iconCls: t
2373
+ } = e, i = `${o}-selection-overflow`, a = e.controlHeightSM, [p] = Tn(e), d = n ? `${o}-${n}` : "";
2374
+ return {
2375
+ [`${o}-multiple${d}`]: {
2376
+ fontSize: e.fontSize,
2377
+ /**
2378
+ * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
2379
+ * may update to redesign with its align logic.
2380
+ */
2381
+ // =========================== Overflow ===========================
2382
+ [i]: {
2383
+ position: "relative",
2384
+ display: "flex",
2385
+ flex: "auto",
2386
+ flexWrap: "wrap",
2387
+ maxWidth: "100%",
2388
+ "&-item": {
2389
+ flex: "none",
2390
+ alignSelf: "center",
2391
+ maxWidth: "100%",
2392
+ display: "inline-flex"
2393
+ }
2394
+ },
2395
+ // ========================= Selector =========================
2396
+ [`${o}-selector`]: {
2397
+ display: "flex",
2398
+ flexWrap: "wrap",
2399
+ alignItems: "center",
2400
+ // Multiple is little different that horizontal is follow the vertical
2401
+ padding: `${p - me}px ${me * 2}px`,
2402
+ borderRadius: e.borderRadius,
2403
+ [`${o}-show-search&`]: {
2404
+ cursor: "text"
2405
+ },
2406
+ [`${o}-disabled&`]: {
2407
+ background: e.colorBgContainerDisabled,
2408
+ cursor: "not-allowed"
2409
+ },
2410
+ "&:after": {
2411
+ display: "inline-block",
2412
+ width: 0,
2413
+ margin: `${me}px 0`,
2414
+ lineHeight: `${a}px`,
2415
+ content: '"\\a0"'
2416
+ }
2417
+ },
2418
+ [`
2419
+ &${o}-show-arrow ${o}-selector,
2420
+ &${o}-allow-clear ${o}-selector
2421
+ `]: {
2422
+ paddingInlineEnd: e.fontSizeIcon + e.controlPaddingHorizontal
2423
+ },
2424
+ // ======================== Selections ========================
2425
+ [`${o}-selection-item`]: {
2426
+ position: "relative",
2427
+ display: "flex",
2428
+ flex: "none",
2429
+ boxSizing: "border-box",
2430
+ maxWidth: "100%",
2431
+ height: a,
2432
+ marginTop: me,
2433
+ marginBottom: me,
2434
+ lineHeight: `${a - e.lineWidth * 2}px`,
2435
+ background: e.colorFillSecondary,
2436
+ border: `${e.lineWidth}px solid ${e.colorSplit}`,
2437
+ borderRadius: e.borderRadiusSM,
2438
+ cursor: "default",
2439
+ transition: `font-size ${e.motionDurationSlow}, line-height ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,
2440
+ userSelect: "none",
2441
+ marginInlineEnd: me * 2,
2442
+ paddingInlineStart: e.paddingXS,
2443
+ paddingInlineEnd: e.paddingXS / 2,
2444
+ [`${o}-disabled&`]: {
2445
+ color: e.colorTextDisabled,
2446
+ borderColor: e.colorBorder,
2447
+ cursor: "not-allowed"
2448
+ },
2449
+ // It's ok not to do this, but 24px makes bottom narrow in view should adjust
2450
+ "&-content": {
2451
+ display: "inline-block",
2452
+ marginInlineEnd: e.paddingXS / 2,
2453
+ overflow: "hidden",
2454
+ whiteSpace: "pre",
2455
+ textOverflow: "ellipsis"
2456
+ },
2457
+ "&-remove": g(g({}, vn()), {
2458
+ display: "inline-block",
2459
+ color: e.colorIcon,
2460
+ fontWeight: "bold",
2461
+ fontSize: 10,
2462
+ lineHeight: "inherit",
2463
+ cursor: "pointer",
2464
+ [`> ${t}`]: {
2465
+ verticalAlign: "-0.2em"
2466
+ },
2467
+ "&:hover": {
2468
+ color: e.colorIconHover
2469
+ }
2470
+ })
2471
+ },
2472
+ // ========================== Input ==========================
2473
+ [`${i}-item + ${i}-item`]: {
2474
+ [`${o}-selection-search`]: {
2475
+ marginInlineStart: 0
2476
+ }
2477
+ },
2478
+ [`${o}-selection-search`]: {
2479
+ display: "inline-flex",
2480
+ position: "relative",
2481
+ maxWidth: "100%",
2482
+ marginInlineStart: e.inputPaddingHorizontalBase - p,
2483
+ "\n &-input,\n &-mirror\n ": {
2484
+ height: a,
2485
+ fontFamily: e.fontFamily,
2486
+ lineHeight: `${a}px`,
2487
+ transition: `all ${e.motionDurationSlow}`
2488
+ },
2489
+ "&-input": {
2490
+ width: "100%",
2491
+ minWidth: 4.1
2492
+ // fix search cursor missing
2493
+ },
2494
+ "&-mirror": {
2495
+ position: "absolute",
2496
+ top: 0,
2497
+ insetInlineStart: 0,
2498
+ insetInlineEnd: "auto",
2499
+ zIndex: 999,
2500
+ whiteSpace: "pre",
2501
+ visibility: "hidden"
2502
+ }
2503
+ },
2504
+ // ======================= Placeholder =======================
2505
+ [`${o}-selection-placeholder `]: {
2506
+ position: "absolute",
2507
+ top: "50%",
2508
+ insetInlineStart: e.inputPaddingHorizontalBase,
2509
+ insetInlineEnd: e.inputPaddingHorizontalBase,
2510
+ transform: "translateY(-50%)",
2511
+ transition: `all ${e.motionDurationSlow}`
2512
+ }
2513
+ }
2514
+ };
2515
+ }
2516
+ function mo(e) {
2517
+ const {
2518
+ componentCls: n
2519
+ } = e, o = ie(e, {
2520
+ controlHeight: e.controlHeightSM,
2521
+ controlHeightSM: e.controlHeightXS,
2522
+ borderRadius: e.borderRadiusSM,
2523
+ borderRadiusSM: e.borderRadiusXS
2524
+ }), [, t] = Tn(e);
2525
+ return [
2526
+ Ne(e),
2527
+ // ======================== Small ========================
2528
+ // Shared
2529
+ Ne(o, "sm"),
2530
+ // Padding
2531
+ {
2532
+ [`${n}-multiple${n}-sm`]: {
2533
+ [`${n}-selection-placeholder`]: {
2534
+ insetInlineStart: e.controlPaddingHorizontalSM - e.lineWidth,
2535
+ insetInlineEnd: "auto"
2536
+ },
2537
+ // https://github.com/ant-design/ant-design/issues/29559
2538
+ [`${n}-selection-search`]: {
2539
+ marginInlineStart: t
2540
+ }
2541
+ }
2542
+ },
2543
+ // ======================== Large ========================
2544
+ // Shared
2545
+ Ne(ie(e, {
2546
+ fontSize: e.fontSizeLG,
2547
+ controlHeight: e.controlHeightLG,
2548
+ controlHeightSM: e.controlHeight,
2549
+ borderRadius: e.borderRadiusLG,
2550
+ borderRadiusSM: e.borderRadius
2551
+ }), "lg")
2552
+ ];
2553
+ }
2554
+ function Be(e, n) {
2555
+ const {
2556
+ componentCls: o,
2557
+ inputPaddingHorizontalBase: t,
2558
+ borderRadius: i
2559
+ } = e, a = e.controlHeight - e.lineWidth * 2, p = Math.ceil(e.fontSize * 1.25), d = n ? `${o}-${n}` : "";
2560
+ return {
2561
+ [`${o}-single${d}`]: {
2562
+ fontSize: e.fontSize,
2563
+ // ========================= Selector =========================
2564
+ [`${o}-selector`]: g(g({}, We(e)), {
2565
+ display: "flex",
2566
+ borderRadius: i,
2567
+ [`${o}-selection-search`]: {
2568
+ position: "absolute",
2569
+ top: 0,
2570
+ insetInlineStart: t,
2571
+ insetInlineEnd: t,
2572
+ bottom: 0,
2573
+ "&-input": {
2574
+ width: "100%"
2575
+ }
2576
+ },
2577
+ [`
2578
+ ${o}-selection-item,
2579
+ ${o}-selection-placeholder
2580
+ `]: {
2581
+ padding: 0,
2582
+ lineHeight: `${a}px`,
2583
+ transition: `all ${e.motionDurationSlow}`,
2584
+ // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
2585
+ "@supports (-moz-appearance: meterbar)": {
2586
+ lineHeight: `${a}px`
2587
+ }
2588
+ },
2589
+ [`${o}-selection-item`]: {
2590
+ position: "relative",
2591
+ userSelect: "none"
2592
+ },
2593
+ [`${o}-selection-placeholder`]: {
2594
+ transition: "none",
2595
+ pointerEvents: "none"
2596
+ },
2597
+ // For common baseline align
2598
+ [[
2599
+ "&:after",
2600
+ /* For '' value baseline align */
2601
+ `${o}-selection-item:after`,
2602
+ /* For undefined value baseline align */
2603
+ `${o}-selection-placeholder:after`
2604
+ ].join(",")]: {
2605
+ display: "inline-block",
2606
+ width: 0,
2607
+ visibility: "hidden",
2608
+ content: '"\\a0"'
2609
+ }
2610
+ }),
2611
+ [`
2612
+ &${o}-show-arrow ${o}-selection-item,
2613
+ &${o}-show-arrow ${o}-selection-placeholder
2614
+ `]: {
2615
+ paddingInlineEnd: p
2616
+ },
2617
+ // Opacity selection if open
2618
+ [`&${o}-open ${o}-selection-item`]: {
2619
+ color: e.colorTextPlaceholder
2620
+ },
2621
+ // ========================== Input ==========================
2622
+ // We only change the style of non-customize input which is only support by `combobox` mode.
2623
+ // Not customize
2624
+ [`&:not(${o}-customize-input)`]: {
2625
+ [`${o}-selector`]: {
2626
+ width: "100%",
2627
+ height: e.controlHeight,
2628
+ padding: `0 ${t}px`,
2629
+ [`${o}-selection-search-input`]: {
2630
+ height: a
2631
+ },
2632
+ "&:after": {
2633
+ lineHeight: `${a}px`
2634
+ }
2635
+ }
2636
+ },
2637
+ [`&${o}-customize-input`]: {
2638
+ [`${o}-selector`]: {
2639
+ "&:after": {
2640
+ display: "none"
2641
+ },
2642
+ [`${o}-selection-search`]: {
2643
+ position: "static",
2644
+ width: "100%"
2645
+ },
2646
+ [`${o}-selection-placeholder`]: {
2647
+ position: "absolute",
2648
+ insetInlineStart: 0,
2649
+ insetInlineEnd: 0,
2650
+ padding: `0 ${t}px`,
2651
+ "&:after": {
2652
+ display: "none"
2653
+ }
2654
+ }
2655
+ }
2656
+ }
2657
+ }
2658
+ };
2659
+ }
2660
+ function go(e) {
2661
+ const {
2662
+ componentCls: n
2663
+ } = e, o = e.controlPaddingHorizontalSM - e.lineWidth;
2664
+ return [
2665
+ Be(e),
2666
+ // ======================== Small ========================
2667
+ // Shared
2668
+ Be(ie(e, {
2669
+ controlHeight: e.controlHeightSM,
2670
+ borderRadius: e.borderRadiusSM
2671
+ }), "sm"),
2672
+ // padding
2673
+ {
2674
+ [`${n}-single${n}-sm`]: {
2675
+ [`&:not(${n}-customize-input)`]: {
2676
+ [`${n}-selection-search`]: {
2677
+ insetInlineStart: o,
2678
+ insetInlineEnd: o
2679
+ },
2680
+ [`${n}-selector`]: {
2681
+ padding: `0 ${o}px`
2682
+ },
2683
+ // With arrow should provides `padding-right` to show the arrow
2684
+ [`&${n}-show-arrow ${n}-selection-search`]: {
2685
+ insetInlineEnd: o + e.fontSize * 1.5
2686
+ },
2687
+ [`
2688
+ &${n}-show-arrow ${n}-selection-item,
2689
+ &${n}-show-arrow ${n}-selection-placeholder
2690
+ `]: {
2691
+ paddingInlineEnd: e.fontSize * 1.5
2692
+ }
2693
+ }
2694
+ }
2695
+ },
2696
+ // ======================== Large ========================
2697
+ // Shared
2698
+ Be(ie(e, {
2699
+ controlHeight: e.controlHeightLG,
2700
+ fontSize: e.fontSizeLG,
2701
+ borderRadius: e.borderRadiusLG
2702
+ }), "lg")
2703
+ ];
2704
+ }
2705
+ const vo = (e) => {
2706
+ const {
2707
+ componentCls: n
2708
+ } = e;
2709
+ return {
2710
+ position: "relative",
2711
+ backgroundColor: e.colorBgContainer,
2712
+ border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
2713
+ transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
2714
+ input: {
2715
+ cursor: "pointer"
2716
+ },
2717
+ [`${n}-show-search&`]: {
2718
+ cursor: "text",
2719
+ input: {
2720
+ cursor: "auto",
2721
+ color: "inherit"
2722
+ }
2723
+ },
2724
+ [`${n}-disabled&`]: {
2725
+ color: e.colorTextDisabled,
2726
+ background: e.colorBgContainerDisabled,
2727
+ cursor: "not-allowed",
2728
+ [`${n}-multiple&`]: {
2729
+ background: e.colorBgContainerDisabled
2730
+ },
2731
+ input: {
2732
+ cursor: "not-allowed"
2733
+ }
2734
+ }
2735
+ };
2736
+ }, Ke = function(e, n) {
2737
+ let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
2738
+ const {
2739
+ componentCls: t,
2740
+ borderHoverColor: i,
2741
+ outlineColor: a,
2742
+ antCls: p
2743
+ } = n, d = o ? {
2744
+ [`${t}-selector`]: {
2745
+ borderColor: i
2746
+ }
2747
+ } : {};
2748
+ return {
2749
+ [e]: {
2750
+ [`&:not(${t}-disabled):not(${t}-customize-input):not(${p}-pagination-size-changer)`]: g(g({}, d), {
2751
+ [`${t}-focused& ${t}-selector`]: {
2752
+ borderColor: i,
2753
+ boxShadow: `0 0 0 ${n.controlOutlineWidth}px ${a}`,
2754
+ borderInlineEndWidth: `${n.controlLineWidth}px !important`,
2755
+ outline: 0
2756
+ },
2757
+ [`&:hover ${t}-selector`]: {
2758
+ borderColor: i,
2759
+ borderInlineEndWidth: `${n.controlLineWidth}px !important`
2760
+ }
2761
+ })
2762
+ }
2763
+ };
2764
+ }, ho = (e) => {
2765
+ const {
2766
+ componentCls: n
2767
+ } = e;
2768
+ return {
2769
+ [`${n}-selection-search-input`]: {
2770
+ margin: 0,
2771
+ padding: 0,
2772
+ background: "transparent",
2773
+ border: "none",
2774
+ outline: "none",
2775
+ appearance: "none",
2776
+ "&::-webkit-search-cancel-button": {
2777
+ display: "none",
2778
+ "-webkit-appearance": "none"
2779
+ }
2780
+ }
2781
+ };
2782
+ }, yo = (e) => {
2783
+ const {
2784
+ componentCls: n,
2785
+ inputPaddingHorizontalBase: o,
2786
+ iconCls: t
2787
+ } = e;
2788
+ return {
2789
+ [n]: g(g({}, We(e)), {
2790
+ position: "relative",
2791
+ display: "inline-block",
2792
+ cursor: "pointer",
2793
+ [`&:not(${n}-customize-input) ${n}-selector`]: g(g({}, vo(e)), ho(e)),
2794
+ // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
2795
+ // ...genHoverStyle(token),
2796
+ // },
2797
+ // ======================== Selection ========================
2798
+ [`${n}-selection-item`]: g({
2799
+ flex: 1,
2800
+ fontWeight: "normal"
2801
+ }, Le),
2802
+ // ======================= Placeholder =======================
2803
+ [`${n}-selection-placeholder`]: g(g({}, Le), {
2804
+ flex: 1,
2805
+ color: e.colorTextPlaceholder,
2806
+ pointerEvents: "none"
2807
+ }),
2808
+ // ========================== Arrow ==========================
2809
+ [`${n}-arrow`]: g(g({}, vn()), {
2810
+ position: "absolute",
2811
+ top: "50%",
2812
+ insetInlineStart: "auto",
2813
+ insetInlineEnd: o,
2814
+ height: e.fontSizeIcon,
2815
+ marginTop: -e.fontSizeIcon / 2,
2816
+ color: e.colorTextQuaternary,
2817
+ fontSize: e.fontSizeIcon,
2818
+ lineHeight: 1,
2819
+ textAlign: "center",
2820
+ pointerEvents: "none",
2821
+ display: "flex",
2822
+ alignItems: "center",
2823
+ [t]: {
2824
+ verticalAlign: "top",
2825
+ transition: `transform ${e.motionDurationSlow}`,
2826
+ "> svg": {
2827
+ verticalAlign: "top"
2828
+ },
2829
+ [`&:not(${n}-suffix)`]: {
2830
+ pointerEvents: "auto"
2831
+ }
2832
+ },
2833
+ [`${n}-disabled &`]: {
2834
+ cursor: "not-allowed"
2835
+ },
2836
+ "> *:not(:last-child)": {
2837
+ marginInlineEnd: 8
2838
+ // FIXME: magic
2839
+ }
2840
+ }),
2841
+ // ========================== Clear ==========================
2842
+ [`${n}-clear`]: {
2843
+ position: "absolute",
2844
+ top: "50%",
2845
+ insetInlineStart: "auto",
2846
+ insetInlineEnd: o,
2847
+ zIndex: 1,
2848
+ display: "inline-block",
2849
+ width: e.fontSizeIcon,
2850
+ height: e.fontSizeIcon,
2851
+ marginTop: -e.fontSizeIcon / 2,
2852
+ color: e.colorTextQuaternary,
2853
+ fontSize: e.fontSizeIcon,
2854
+ fontStyle: "normal",
2855
+ lineHeight: 1,
2856
+ textAlign: "center",
2857
+ textTransform: "none",
2858
+ background: e.colorBgContainer,
2859
+ cursor: "pointer",
2860
+ opacity: 0,
2861
+ transition: `color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,
2862
+ textRendering: "auto",
2863
+ "&:before": {
2864
+ display: "block"
2865
+ },
2866
+ "&:hover": {
2867
+ color: e.colorTextTertiary
2868
+ }
2869
+ },
2870
+ "&:hover": {
2871
+ [`${n}-clear`]: {
2872
+ opacity: 1
2873
+ }
2874
+ }
2875
+ }),
2876
+ // ========================= Feedback ==========================
2877
+ [`${n}-has-feedback`]: {
2878
+ [`${n}-clear`]: {
2879
+ insetInlineEnd: o + e.fontSize + e.paddingXXS
2880
+ }
2881
+ }
2882
+ };
2883
+ }, bo = (e) => {
2884
+ const {
2885
+ componentCls: n
2886
+ } = e;
2887
+ return [
2888
+ {
2889
+ [n]: {
2890
+ // ==================== BorderLess ====================
2891
+ [`&-borderless ${n}-selector`]: {
2892
+ backgroundColor: "transparent !important",
2893
+ borderColor: "transparent !important",
2894
+ boxShadow: "none !important"
2895
+ },
2896
+ // ==================== In Form ====================
2897
+ [`&${n}-in-form-item`]: {
2898
+ width: "100%"
2899
+ }
2900
+ }
2901
+ },
2902
+ // =====================================================
2903
+ // == LTR ==
2904
+ // =====================================================
2905
+ // Base
2906
+ yo(e),
2907
+ // Single
2908
+ go(e),
2909
+ // Multiple
2910
+ mo(e),
2911
+ // Dropdown
2912
+ po(e),
2913
+ // =====================================================
2914
+ // == RTL ==
2915
+ // =====================================================
2916
+ {
2917
+ [`${n}-rtl`]: {
2918
+ direction: "rtl"
2919
+ }
2920
+ },
2921
+ // =====================================================
2922
+ // == Status ==
2923
+ // =====================================================
2924
+ Ke(n, ie(e, {
2925
+ borderHoverColor: e.colorPrimaryHover,
2926
+ outlineColor: e.controlOutline
2927
+ })),
2928
+ Ke(`${n}-status-error`, ie(e, {
2929
+ borderHoverColor: e.colorErrorHover,
2930
+ outlineColor: e.colorErrorOutline
2931
+ }), !0),
2932
+ Ke(`${n}-status-warning`, ie(e, {
2933
+ borderHoverColor: e.colorWarningHover,
2934
+ outlineColor: e.colorWarningOutline
2935
+ }), !0),
2936
+ // =====================================================
2937
+ // == Space Compact ==
2938
+ // =====================================================
2939
+ ct(e, {
2940
+ borderElCls: `${n}-selector`,
2941
+ focusElCls: `${n}-focused`
2942
+ })
2943
+ ];
2944
+ }, Vo = ut("Select", (e, n) => {
2945
+ let {
2946
+ rootPrefixCls: o
2947
+ } = n;
2948
+ const t = ie(e, {
2949
+ rootPrefixCls: o,
2950
+ inputPaddingHorizontalBase: e.paddingSM - 1
2951
+ });
2952
+ return [bo(t)];
2953
+ }, (e) => ({
2954
+ zIndexPopup: e.zIndexPopupBase + 50
2955
+ }));
2956
+ export {
2957
+ Bo as B,
2958
+ ve as T,
2959
+ He as a,
2960
+ Ko as b,
2961
+ Lo as c,
2962
+ zo as d,
2963
+ Ht as e,
2964
+ Vo as f,
2965
+ Ao as g,
2966
+ Xt as h,
2967
+ Mo as i,
2968
+ yt as j,
2969
+ To as k,
2970
+ At as t,
2971
+ No as u
2972
+ };