hzzt-plus 1.0.3 → 1.0.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.
Files changed (163) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +3101 -247
  4. package/dist/index.full.min.js +20 -14
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +24 -18
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +3097 -249
  9. package/es/component.mjs +5 -1
  10. package/es/component.mjs.map +1 -1
  11. package/es/components/cascader/index.d.ts +5 -0
  12. package/es/components/cascader/index.mjs +9 -0
  13. package/es/components/cascader/index.mjs.map +1 -0
  14. package/es/components/cascader/src/cascader.d.ts +35 -0
  15. package/es/components/cascader/src/cascader.mjs +42 -0
  16. package/es/components/cascader/src/cascader.mjs.map +1 -0
  17. package/es/components/cascader/src/cascader.vue.d.ts +2293 -0
  18. package/es/components/cascader/src/cascader2.mjs +128 -0
  19. package/es/components/cascader/src/cascader2.mjs.map +1 -0
  20. package/es/components/cascader/src/hooks/utils.d.ts +2 -0
  21. package/es/components/cascader/src/hooks/utils.mjs +26 -0
  22. package/es/components/cascader/src/hooks/utils.mjs.map +1 -0
  23. package/es/components/cascader/style/css.d.ts +2 -0
  24. package/es/components/cascader/style/css.mjs +3 -0
  25. package/es/components/cascader/style/css.mjs.map +1 -0
  26. package/es/components/cascader/style/index.d.ts +2 -0
  27. package/es/components/cascader/style/index.mjs +3 -0
  28. package/es/components/cascader/style/index.mjs.map +1 -0
  29. package/es/components/collapse/index.mjs +2 -2
  30. package/es/components/collapse/src/collapse.mjs +0 -67
  31. package/es/components/collapse/src/collapse.mjs.map +1 -1
  32. package/es/components/collapse/src/collapse2.mjs +67 -0
  33. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  34. package/es/components/confirm-password/index.d.ts +1 -1
  35. package/es/components/confirm-password/src/confirm-password.vue.d.ts +1 -1
  36. package/es/components/dropdown/index.d.ts +1 -1
  37. package/es/components/dropdown/src/index.vue.d.ts +1 -1
  38. package/es/components/index.d.ts +2 -0
  39. package/es/components/index.mjs +5 -1
  40. package/es/components/index.mjs.map +1 -1
  41. package/es/components/input-range/src/input-range.vue.d.ts +1 -1
  42. package/es/components/input-range/src/input-range2.mjs +1 -1
  43. package/es/components/input-range/src/input-range2.mjs.map +1 -1
  44. package/es/components/page-size/index.d.ts +54 -54
  45. package/es/components/page-size/src/index.vue.d.ts +54 -54
  46. package/es/components/quarter-picker/index.d.ts +16 -16
  47. package/es/components/quarter-picker/src/index.vue.d.ts +16 -16
  48. package/es/components/scan/index.mjs +2 -2
  49. package/es/components/scan/src/scan.mjs +144 -23
  50. package/es/components/scan/src/scan.mjs.map +1 -1
  51. package/es/components/scan/src/scan.vue.d.ts +2 -2
  52. package/es/components/scan/src/scan2.mjs +23 -144
  53. package/es/components/scan/src/scan2.mjs.map +1 -1
  54. package/es/components/select/index.d.ts +5 -0
  55. package/es/components/select/index.mjs +9 -0
  56. package/es/components/select/index.mjs.map +1 -0
  57. package/es/components/select/src/select.d.ts +37 -0
  58. package/es/components/select/src/select.mjs +39 -0
  59. package/es/components/select/src/select.mjs.map +1 -0
  60. package/es/components/select/src/select.vue.d.ts +13237 -0
  61. package/es/components/select/src/select2.mjs +176 -0
  62. package/es/components/select/src/select2.mjs.map +1 -0
  63. package/es/components/select/style/css.d.ts +2 -0
  64. package/es/components/select/style/css.mjs +3 -0
  65. package/es/components/select/style/css.mjs.map +1 -0
  66. package/es/components/select/style/index.d.ts +2 -0
  67. package/es/components/select/style/index.mjs +3 -0
  68. package/es/components/select/style/index.mjs.map +1 -0
  69. package/es/components/select-input/index.d.ts +16 -16
  70. package/es/components/select-input/src/select-input.d.ts +1 -7
  71. package/es/components/select-input/src/select-input.mjs.map +1 -1
  72. package/es/components/select-input/src/select-input.vue.d.ts +12 -12
  73. package/es/components/select-input/src/select-input2.mjs.map +1 -1
  74. package/es/components/select-textarea/src/select-textarea.vue.d.ts +32 -32
  75. package/es/components/select-textarea/src/select-textarea2.mjs +1 -0
  76. package/es/components/select-textarea/src/select-textarea2.mjs.map +1 -1
  77. package/es/components/tooltip/index.d.ts +14 -14
  78. package/es/components/tooltip/src/tooltip.vue.d.ts +14 -14
  79. package/es/index.mjs +5 -1
  80. package/es/index.mjs.map +1 -1
  81. package/global.d.ts +2 -0
  82. package/lib/component.js +5 -1
  83. package/lib/component.js.map +1 -1
  84. package/lib/components/cascader/index.d.ts +5 -0
  85. package/lib/components/cascader/index.js +16 -0
  86. package/lib/components/cascader/index.js.map +1 -0
  87. package/lib/components/cascader/src/cascader.d.ts +35 -0
  88. package/lib/components/cascader/src/cascader.js +47 -0
  89. package/lib/components/cascader/src/cascader.js.map +1 -0
  90. package/lib/components/cascader/src/cascader.vue.d.ts +2293 -0
  91. package/lib/components/cascader/src/cascader2.js +132 -0
  92. package/lib/components/cascader/src/cascader2.js.map +1 -0
  93. package/lib/components/cascader/src/hooks/utils.d.ts +2 -0
  94. package/lib/components/cascader/src/hooks/utils.js +30 -0
  95. package/lib/components/cascader/src/hooks/utils.js.map +1 -0
  96. package/lib/components/cascader/style/css.d.ts +2 -0
  97. package/lib/components/cascader/style/css.js +6 -0
  98. package/lib/components/cascader/style/css.js.map +1 -0
  99. package/lib/components/cascader/style/index.d.ts +2 -0
  100. package/lib/components/cascader/style/index.js +6 -0
  101. package/lib/components/cascader/style/index.js.map +1 -0
  102. package/lib/components/collapse/index.js +2 -2
  103. package/lib/components/collapse/src/collapse.js +0 -70
  104. package/lib/components/collapse/src/collapse.js.map +1 -1
  105. package/lib/components/collapse/src/collapse2.js +70 -0
  106. package/lib/components/collapse/src/collapse2.js.map +1 -1
  107. package/lib/components/confirm-password/index.d.ts +1 -1
  108. package/lib/components/confirm-password/src/confirm-password.vue.d.ts +1 -1
  109. package/lib/components/dropdown/index.d.ts +1 -1
  110. package/lib/components/dropdown/src/index.vue.d.ts +1 -1
  111. package/lib/components/index.d.ts +2 -0
  112. package/lib/components/index.js +11 -1
  113. package/lib/components/index.js.map +1 -1
  114. package/lib/components/input-range/src/input-range.vue.d.ts +1 -1
  115. package/lib/components/input-range/src/input-range2.js +1 -1
  116. package/lib/components/input-range/src/input-range2.js.map +1 -1
  117. package/lib/components/page-size/index.d.ts +54 -54
  118. package/lib/components/page-size/src/index.vue.d.ts +54 -54
  119. package/lib/components/quarter-picker/index.d.ts +16 -16
  120. package/lib/components/quarter-picker/src/index.vue.d.ts +16 -16
  121. package/lib/components/scan/index.js +2 -2
  122. package/lib/components/scan/src/scan.js +144 -24
  123. package/lib/components/scan/src/scan.js.map +1 -1
  124. package/lib/components/scan/src/scan.vue.d.ts +2 -2
  125. package/lib/components/scan/src/scan2.js +24 -144
  126. package/lib/components/scan/src/scan2.js.map +1 -1
  127. package/lib/components/select/index.d.ts +5 -0
  128. package/lib/components/select/index.js +16 -0
  129. package/lib/components/select/index.js.map +1 -0
  130. package/lib/components/select/src/select.d.ts +37 -0
  131. package/lib/components/select/src/select.js +44 -0
  132. package/lib/components/select/src/select.js.map +1 -0
  133. package/lib/components/select/src/select.vue.d.ts +13237 -0
  134. package/lib/components/select/src/select2.js +180 -0
  135. package/lib/components/select/src/select2.js.map +1 -0
  136. package/lib/components/select/style/css.d.ts +2 -0
  137. package/lib/components/select/style/css.js +6 -0
  138. package/lib/components/select/style/css.js.map +1 -0
  139. package/lib/components/select/style/index.d.ts +2 -0
  140. package/lib/components/select/style/index.js +6 -0
  141. package/lib/components/select/style/index.js.map +1 -0
  142. package/lib/components/select-input/index.d.ts +16 -16
  143. package/lib/components/select-input/src/select-input.d.ts +1 -7
  144. package/lib/components/select-input/src/select-input.js.map +1 -1
  145. package/lib/components/select-input/src/select-input.vue.d.ts +12 -12
  146. package/lib/components/select-input/src/select-input2.js.map +1 -1
  147. package/lib/components/select-textarea/src/select-textarea.vue.d.ts +32 -32
  148. package/lib/components/select-textarea/src/select-textarea2.js +1 -0
  149. package/lib/components/select-textarea/src/select-textarea2.js.map +1 -1
  150. package/lib/components/tooltip/index.d.ts +14 -14
  151. package/lib/components/tooltip/src/tooltip.vue.d.ts +14 -14
  152. package/lib/index.js +41 -31
  153. package/lib/index.js.map +1 -1
  154. package/package.json +1 -1
  155. package/tags.json +1 -1
  156. package/theme/hzzt-cascader.css +1 -0
  157. package/theme/hzzt-select.css +1 -0
  158. package/theme/index.css +1 -1
  159. package/theme/src/cascader.scss +28 -0
  160. package/theme/src/index.scss +2 -0
  161. package/theme/src/mixins/mixins.scss +3 -0
  162. package/theme/src/select.scss +10 -0
  163. package/web-types.json +1 -1
@@ -165,6 +165,27 @@
165
165
  _global[globalKey] = _global[globalKey] || {};
166
166
  _global[globalKey];
167
167
 
168
+ function useCssVar(prop, target, { window = defaultWindow, initialValue = "" } = {}) {
169
+ const variable = vue.ref(initialValue);
170
+ const elRef = vue.computed(() => {
171
+ var _a;
172
+ return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);
173
+ });
174
+ vue.watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {
175
+ var _a;
176
+ if (el && window) {
177
+ const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();
178
+ variable.value = value || initialValue;
179
+ }
180
+ }, { immediate: true });
181
+ vue.watch(variable, (val) => {
182
+ var _a;
183
+ if ((_a = elRef.value) == null ? void 0 : _a.style)
184
+ elRef.value.style.setProperty(resolveUnref(prop), val);
185
+ });
186
+ return variable;
187
+ }
188
+
168
189
  var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
169
190
  var __hasOwnProp$f = Object.prototype.hasOwnProperty;
170
191
  var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
@@ -314,9 +335,20 @@
314
335
  const isFunction$1 = (val) => typeof val === "function";
315
336
  const isString$1 = (val) => typeof val === "string";
316
337
  const isObject$1 = (val) => val !== null && typeof val === "object";
338
+ const isPromise = (val) => {
339
+ return isObject$1(val) && isFunction$1(val.then) && isFunction$1(val.catch);
340
+ };
317
341
  const objectToString$1 = Object.prototype.toString;
318
342
  const toTypeString = (value) => objectToString$1.call(value);
319
343
  const isPlainObject$1 = (val) => toTypeString(val) === "[object Object]";
344
+ const cacheStringFunction = (fn) => {
345
+ const cache = /* @__PURE__ */ Object.create(null);
346
+ return (str) => {
347
+ const hit = cache[str];
348
+ return hit || (cache[str] = fn(str));
349
+ };
350
+ };
351
+ const capitalize$2 = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));
320
352
 
321
353
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
322
354
 
@@ -1986,7 +2018,7 @@
1986
2018
 
1987
2019
  var upperFirst = createCaseFirst("toUpperCase");
1988
2020
 
1989
- function capitalize(string) {
2021
+ function capitalize$1(string) {
1990
2022
  return upperFirst(toString(string).toLowerCase());
1991
2023
  }
1992
2024
 
@@ -2295,10 +2327,10 @@
2295
2327
 
2296
2328
  var camelCase = createCompounder(function(result, word, index) {
2297
2329
  word = word.toLowerCase();
2298
- return result + (index ? capitalize(word) : word);
2330
+ return result + (index ? capitalize$1(word) : word);
2299
2331
  });
2300
2332
 
2301
- function castArray() {
2333
+ function castArray$1() {
2302
2334
  if (!arguments.length) {
2303
2335
  return [];
2304
2336
  }
@@ -4313,7 +4345,7 @@
4313
4345
  var setTag$2 = "[object Set]";
4314
4346
  var objectProto$3 = Object.prototype;
4315
4347
  var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
4316
- function isEmpty$1(value) {
4348
+ function isEmpty$2(value) {
4317
4349
  if (value == null) {
4318
4350
  return true;
4319
4351
  }
@@ -6327,7 +6359,7 @@
6327
6359
  };
6328
6360
 
6329
6361
  var lang = {
6330
- castArray,
6362
+ castArray: castArray$1,
6331
6363
  clone,
6332
6364
  cloneDeep,
6333
6365
  cloneDeepWith,
@@ -6345,7 +6377,7 @@
6345
6377
  isBuffer,
6346
6378
  isDate,
6347
6379
  isElement: isElement$1,
6348
- isEmpty: isEmpty$1,
6380
+ isEmpty: isEmpty$2,
6349
6381
  isEqual: isEqual$1,
6350
6382
  isEqualWith,
6351
6383
  isError,
@@ -6478,7 +6510,7 @@
6478
6510
 
6479
6511
  var string = {
6480
6512
  camelCase,
6481
- capitalize,
6513
+ capitalize: capitalize$1,
6482
6514
  deburr,
6483
6515
  endsWith,
6484
6516
  escape,
@@ -7130,7 +7162,7 @@
7130
7162
 
7131
7163
  const isBoolean$1 = (val) => typeof val === "boolean";
7132
7164
  const isNumber$1 = (val) => typeof val === "number";
7133
- const isEmpty = (val) => !val && val !== 0 || isArray$1(val) && val.length === 0 || isObject$1(val) && !Object.keys(val).length;
7165
+ const isEmpty$1 = (val) => !val && val !== 0 || isArray$1(val) && val.length === 0 || isObject$1(val) && !Object.keys(val).length;
7134
7166
 
7135
7167
  const keysOf = (arr) => Object.keys(arr);
7136
7168
 
@@ -12975,11 +13007,11 @@
12975
13007
  class: "decorative-line"
12976
13008
  };
12977
13009
  const _hoisted_3$7 = { class: "label-name" };
12978
- const __default__$t = vue.defineComponent({
13010
+ const __default__$C = vue.defineComponent({
12979
13011
  name: "HzztTitle"
12980
13012
  });
12981
- const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
12982
- ...__default__$t,
13013
+ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
13014
+ ...__default__$C,
12983
13015
  props: titleProps,
12984
13016
  setup(__props) {
12985
13017
  const props = __props;
@@ -13001,7 +13033,7 @@
13001
13033
  };
13002
13034
  }
13003
13035
  });
13004
- var HzztTitle$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$H, [["__file", "title.vue"]]);
13036
+ var HzztTitle$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$T, [["__file", "title.vue"]]);
13005
13037
 
13006
13038
  const HzztTitle = withInstall$1(HzztTitle$1);
13007
13039
 
@@ -13083,11 +13115,13 @@
13083
13115
  const isUndefined = (val) => val === void 0;
13084
13116
  const isBoolean = (val) => typeof val === "boolean";
13085
13117
  const isNumber = (val) => typeof val === "number";
13118
+ const isEmpty = (val) => !val && val !== 0 || isArray$1(val) && val.length === 0 || isObject$1(val) && !Object.keys(val).length;
13086
13119
  const isElement = (e) => {
13087
13120
  if (typeof Element === "undefined")
13088
13121
  return false;
13089
13122
  return e instanceof Element;
13090
13123
  };
13124
+ const isPropAbsent = (prop) => isNil(prop);
13091
13125
  const isStringNumber = (val) => {
13092
13126
  if (!isString$1(val)) {
13093
13127
  return false;
@@ -13522,12 +13556,12 @@
13522
13556
  }
13523
13557
  });
13524
13558
 
13525
- const __default__$s = vue.defineComponent({
13559
+ const __default__$B = vue.defineComponent({
13526
13560
  name: "ElIcon",
13527
13561
  inheritAttrs: false
13528
13562
  });
13529
- const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
13530
- ...__default__$s,
13563
+ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
13564
+ ...__default__$B,
13531
13565
  props: iconProps,
13532
13566
  setup(__props) {
13533
13567
  const props = __props;
@@ -13551,7 +13585,7 @@
13551
13585
  };
13552
13586
  }
13553
13587
  });
13554
- var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__file", "icon.vue"]]);
13588
+ var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__file", "icon.vue"]]);
13555
13589
 
13556
13590
  const ElIcon = withInstall(Icon);
13557
13591
 
@@ -13989,12 +14023,12 @@
13989
14023
  return [recordCursor, setCursor];
13990
14024
  }
13991
14025
 
13992
- const __default__$r = vue.defineComponent({
14026
+ const __default__$A = vue.defineComponent({
13993
14027
  name: "ElInput",
13994
14028
  inheritAttrs: false
13995
14029
  });
13996
- const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
13997
- ...__default__$r,
14030
+ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
14031
+ ...__default__$A,
13998
14032
  props: inputProps,
13999
14033
  emits: inputEmits,
14000
14034
  setup(__props, { expose, emit }) {
@@ -14399,7 +14433,7 @@
14399
14433
  };
14400
14434
  }
14401
14435
  });
14402
- var Input = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__file", "input.vue"]]);
14436
+ var Input = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__file", "input.vue"]]);
14403
14437
 
14404
14438
  const ElInput = withInstall(Input);
14405
14439
 
@@ -14448,8 +14482,8 @@
14448
14482
  always: Boolean
14449
14483
  });
14450
14484
 
14451
- const COMPONENT_NAME$2 = "Thumb";
14452
- const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
14485
+ const COMPONENT_NAME$3 = "Thumb";
14486
+ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
14453
14487
  __name: "thumb",
14454
14488
  props: thumbProps,
14455
14489
  setup(__props) {
@@ -14457,7 +14491,7 @@
14457
14491
  const scrollbar = vue.inject(scrollbarContextKey);
14458
14492
  const ns = useNamespace("scrollbar");
14459
14493
  if (!scrollbar)
14460
- throwError(COMPONENT_NAME$2, "can not inject scrollbar context");
14494
+ throwError(COMPONENT_NAME$3, "can not inject scrollbar context");
14461
14495
  const instance = vue.ref();
14462
14496
  const thumb = vue.ref();
14463
14497
  const thumbState = vue.ref({});
@@ -14568,7 +14602,7 @@
14568
14602
  };
14569
14603
  }
14570
14604
  });
14571
- var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__file", "thumb.vue"]]);
14605
+ var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__file", "thumb.vue"]]);
14572
14606
 
14573
14607
  const barProps = buildProps({
14574
14608
  always: {
@@ -14581,7 +14615,7 @@
14581
14615
  }
14582
14616
  });
14583
14617
 
14584
- const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
14618
+ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
14585
14619
  __name: "bar",
14586
14620
  props: barProps,
14587
14621
  setup(__props, { expose }) {
@@ -14639,7 +14673,7 @@
14639
14673
  };
14640
14674
  }
14641
14675
  });
14642
- var Bar = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__file", "bar.vue"]]);
14676
+ var Bar = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__file", "bar.vue"]]);
14643
14677
 
14644
14678
  const scrollbarProps = buildProps({
14645
14679
  height: {
@@ -14695,12 +14729,12 @@
14695
14729
  }) => [scrollTop, scrollLeft].every(isNumber)
14696
14730
  };
14697
14731
 
14698
- const COMPONENT_NAME$1 = "ElScrollbar";
14699
- const __default__$q = vue.defineComponent({
14700
- name: COMPONENT_NAME$1
14732
+ const COMPONENT_NAME$2 = "ElScrollbar";
14733
+ const __default__$z = vue.defineComponent({
14734
+ name: COMPONENT_NAME$2
14701
14735
  });
14702
- const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
14703
- ...__default__$q,
14736
+ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
14737
+ ...__default__$z,
14704
14738
  props: scrollbarProps,
14705
14739
  emits: scrollbarEmits,
14706
14740
  setup(__props, { expose, emit }) {
@@ -14852,7 +14886,7 @@
14852
14886
  };
14853
14887
  }
14854
14888
  });
14855
- var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__file", "scrollbar.vue"]]);
14889
+ var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__file", "scrollbar.vue"]]);
14856
14890
 
14857
14891
  const ElScrollbar = withInstall(Scrollbar);
14858
14892
 
@@ -14877,12 +14911,12 @@
14877
14911
  }
14878
14912
  });
14879
14913
 
14880
- const __default__$p = vue.defineComponent({
14914
+ const __default__$y = vue.defineComponent({
14881
14915
  name: "ElPopper",
14882
14916
  inheritAttrs: false
14883
14917
  });
14884
- const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
14885
- ...__default__$p,
14918
+ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
14919
+ ...__default__$y,
14886
14920
  props: popperProps,
14887
14921
  setup(__props, { expose }) {
14888
14922
  const props = __props;
@@ -14905,7 +14939,7 @@
14905
14939
  };
14906
14940
  }
14907
14941
  });
14908
- var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__file", "popper.vue"]]);
14942
+ var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__file", "popper.vue"]]);
14909
14943
 
14910
14944
  const popperArrowProps = buildProps({
14911
14945
  arrowOffset: {
@@ -14914,12 +14948,12 @@
14914
14948
  }
14915
14949
  });
14916
14950
 
14917
- const __default__$o = vue.defineComponent({
14951
+ const __default__$x = vue.defineComponent({
14918
14952
  name: "ElPopperArrow",
14919
14953
  inheritAttrs: false
14920
14954
  });
14921
- const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
14922
- ...__default__$o,
14955
+ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
14956
+ ...__default__$x,
14923
14957
  props: popperArrowProps,
14924
14958
  setup(__props, { expose }) {
14925
14959
  const props = __props;
@@ -14945,7 +14979,7 @@
14945
14979
  };
14946
14980
  }
14947
14981
  });
14948
- var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__file", "arrow.vue"]]);
14982
+ var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__file", "arrow.vue"]]);
14949
14983
 
14950
14984
  const popperTriggerProps = buildProps({
14951
14985
  virtualRef: {
@@ -15024,6 +15058,21 @@
15024
15058
  }
15025
15059
  }
15026
15060
  };
15061
+ const isLeaf = (el) => !el.getAttribute("aria-owns");
15062
+ const getSibling = (el, distance, elClass) => {
15063
+ const { parentNode } = el;
15064
+ if (!parentNode)
15065
+ return null;
15066
+ const siblings = parentNode.querySelectorAll(elClass);
15067
+ const index = Array.prototype.indexOf.call(siblings, el);
15068
+ return siblings[index + distance] || null;
15069
+ };
15070
+ const focusNode = (el) => {
15071
+ if (!el)
15072
+ return;
15073
+ el.focus();
15074
+ !isLeaf(el) && el.click();
15075
+ };
15027
15076
 
15028
15077
  const NAME = "ElOnlyChild";
15029
15078
  const OnlyChild = vue.defineComponent({
@@ -15080,12 +15129,12 @@
15080
15129
  }, [s]);
15081
15130
  }
15082
15131
 
15083
- const __default__$n = vue.defineComponent({
15132
+ const __default__$w = vue.defineComponent({
15084
15133
  name: "ElPopperTrigger",
15085
15134
  inheritAttrs: false
15086
15135
  });
15087
- const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
15088
- ...__default__$n,
15136
+ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
15137
+ ...__default__$w,
15089
15138
  props: popperTriggerProps,
15090
15139
  setup(__props, { expose }) {
15091
15140
  const props = __props;
@@ -15196,7 +15245,7 @@
15196
15245
  };
15197
15246
  }
15198
15247
  });
15199
- var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__file", "trigger.vue"]]);
15248
+ var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__file", "trigger.vue"]]);
15200
15249
 
15201
15250
  const FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
15202
15251
  const FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
@@ -15395,7 +15444,7 @@
15395
15444
  });
15396
15445
  };
15397
15446
 
15398
- const _sfc_main$y = vue.defineComponent({
15447
+ const _sfc_main$K = vue.defineComponent({
15399
15448
  name: "ElFocusTrap",
15400
15449
  inheritAttrs: false,
15401
15450
  props: {
@@ -15637,10 +15686,10 @@
15637
15686
  };
15638
15687
  }
15639
15688
  });
15640
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
15689
+ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
15641
15690
  return vue.renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
15642
15691
  }
15643
- var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$9], ["__file", "focus-trap.vue"]]);
15692
+ var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$c], ["__file", "focus-trap.vue"]]);
15644
15693
 
15645
15694
  var E="top",R="bottom",W="right",P="left",me="auto",G=[E,R,W,P],U="start",J="end",Xe="clippingParents",je="viewport",K="popper",Ye="reference",De=G.reduce(function(t,e){return t.concat([e+"-"+U,e+"-"+J])},[]),Ee=[].concat(G,[me]).reduce(function(t,e){return t.concat([e,e+"-"+U,e+"-"+J])},[]),Ge="beforeRead",Je="read",Ke="afterRead",Qe="beforeMain",Ze="main",et="afterMain",tt="beforeWrite",nt="write",rt="afterWrite",ot=[Ge,Je,Ke,Qe,Ze,et,tt,nt,rt];function C(t){return t?(t.nodeName||"").toLowerCase():null}function H(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Q(t){var e=H(t).Element;return t instanceof e||t instanceof Element}function B(t){var e=H(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Pe(t){if(typeof ShadowRoot=="undefined")return !1;var e=H(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Mt(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!B(i)||!C(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s);}));});}function Rt(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=a.reduce(function(f,c){return f[c]="",f},{});!B(o)||!C(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(f){o.removeAttribute(f);}));});}}var Ae={name:"applyStyles",enabled:!0,phase:"write",fn:Mt,effect:Rt,requires:["computeStyles"]};function q(t){return t.split("-")[0]}var X=Math.max,ve=Math.min,Z=Math.round;function ee(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),r=1,o=1;if(B(t)&&e){var i=t.offsetHeight,a=t.offsetWidth;a>0&&(r=Z(n.width)/a||1),i>0&&(o=Z(n.height)/i||1);}return {width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function ke(t){var e=ee(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function it(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return !0;if(n&&Pe(n)){var r=e;do{if(r&&t.isSameNode(r))return !0;r=r.parentNode||r.host;}while(r)}return !1}function N(t){return H(t).getComputedStyle(t)}function Wt(t){return ["table","td","th"].indexOf(C(t))>=0}function I(t){return ((Q(t)?t.ownerDocument:t.document)||window.document).documentElement}function ge(t){return C(t)==="html"?t:t.assignedSlot||t.parentNode||(Pe(t)?t.host:null)||I(t)}function at(t){return !B(t)||N(t).position==="fixed"?null:t.offsetParent}function Bt(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&B(t)){var r=N(t);if(r.position==="fixed")return null}var o=ge(t);for(Pe(o)&&(o=o.host);B(o)&&["html","body"].indexOf(C(o))<0;){var i=N(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode;}return null}function se(t){for(var e=H(t),n=at(t);n&&Wt(n)&&N(n).position==="static";)n=at(n);return n&&(C(n)==="html"||C(n)==="body"&&N(n).position==="static")?e:n||Bt(t)||e}function Le(t){return ["top","bottom"].indexOf(t)>=0?"x":"y"}function fe(t,e,n){return X(t,ve(e,n))}function St(t,e,n){var r=fe(t,e,n);return r>n?n:r}function st(){return {top:0,right:0,bottom:0,left:0}}function ft(t){return Object.assign({},st(),t)}function ct(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Tt=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,ft(typeof t!="number"?t:ct(t,G))};function Ht(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=q(n.placement),f=Le(s),c=[P,W].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var m=Tt(o.padding,n),v=ke(i),l=f==="y"?E:P,h=f==="y"?R:W,p=n.rects.reference[u]+n.rects.reference[f]-a[f]-n.rects.popper[u],g=a[f]-n.rects.reference[f],x=se(i),y=x?f==="y"?x.clientHeight||0:x.clientWidth||0:0,$=p/2-g/2,d=m[l],b=y-v[u]-m[h],w=y/2-v[u]/2+$,O=fe(d,w,b),j=f;n.modifiersData[r]=(e={},e[j]=O,e.centerOffset=O-w,e);}}function Ct(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||!it(e.elements.popper,o)||(e.elements.arrow=o));}var pt={name:"arrow",enabled:!0,phase:"main",fn:Ht,effect:Ct,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function te(t){return t.split("-")[1]}var qt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vt(t){var e=t.x,n=t.y,r=window,o=r.devicePixelRatio||1;return {x:Z(e*o)/o||0,y:Z(n*o)/o||0}}function ut(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,a=t.offsets,s=t.position,f=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,m=t.isFixed,v=a.x,l=v===void 0?0:v,h=a.y,p=h===void 0?0:h,g=typeof u=="function"?u({x:l,y:p}):{x:l,y:p};l=g.x,p=g.y;var x=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),$=P,d=E,b=window;if(c){var w=se(n),O="clientHeight",j="clientWidth";if(w===H(n)&&(w=I(n),N(w).position!=="static"&&s==="absolute"&&(O="scrollHeight",j="scrollWidth")),w=w,o===E||(o===P||o===W)&&i===J){d=R;var A=m&&w===b&&b.visualViewport?b.visualViewport.height:w[O];p-=A-r.height,p*=f?1:-1;}if(o===P||(o===E||o===R)&&i===J){$=W;var k=m&&w===b&&b.visualViewport?b.visualViewport.width:w[j];l-=k-r.width,l*=f?1:-1;}}var D=Object.assign({position:s},c&&qt),S=u===!0?Vt({x:l,y:p}):{x:l,y:p};if(l=S.x,p=S.y,f){var L;return Object.assign({},D,(L={},L[d]=y?"0":"",L[$]=x?"0":"",L.transform=(b.devicePixelRatio||1)<=1?"translate("+l+"px, "+p+"px)":"translate3d("+l+"px, "+p+"px, 0)",L))}return Object.assign({},D,(e={},e[d]=y?p+"px":"",e[$]=x?l+"px":"",e.transform="",e))}function Nt(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,f=s===void 0?!0:s,c={placement:q(e.placement),variation:te(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ut(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:f})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ut(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement});}var Me={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Nt,data:{}},ye={passive:!0};function It(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,f=H(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,ye);}),s&&f.addEventListener("resize",n.update,ye),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ye);}),s&&f.removeEventListener("resize",n.update,ye);}}var Re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:It,data:{}},_t={left:"right",right:"left",bottom:"top",top:"bottom"};function be(t){return t.replace(/left|right|bottom|top/g,function(e){return _t[e]})}var zt={start:"end",end:"start"};function lt(t){return t.replace(/start|end/g,function(e){return zt[e]})}function We(t){var e=H(t),n=e.pageXOffset,r=e.pageYOffset;return {scrollLeft:n,scrollTop:r}}function Be(t){return ee(I(t)).left+We(t).scrollLeft}function Ft(t){var e=H(t),n=I(t),r=e.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+Be(t),y:s}}function Ut(t){var e,n=I(t),r=We(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=X(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=X(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Be(t),f=-r.scrollTop;return N(o||n).direction==="rtl"&&(s+=X(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:f}}function Se(t){var e=N(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return /auto|scroll|overlay|hidden/.test(n+o+r)}function dt(t){return ["html","body","#document"].indexOf(C(t))>=0?t.ownerDocument.body:B(t)&&Se(t)?t:dt(ge(t))}function ce(t,e){var n;e===void 0&&(e=[]);var r=dt(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=H(r),a=o?[i].concat(i.visualViewport||[],Se(r)?r:[]):r,s=e.concat(a);return o?s:s.concat(ce(ge(a)))}function Te(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Xt(t){var e=ee(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function ht(t,e){return e===je?Te(Ft(t)):Q(e)?Xt(e):Te(Ut(I(t)))}function Yt(t){var e=ce(ge(t)),n=["absolute","fixed"].indexOf(N(t).position)>=0,r=n&&B(t)?se(t):t;return Q(r)?e.filter(function(o){return Q(o)&&it(o,r)&&C(o)!=="body"}):[]}function Gt(t,e,n){var r=e==="clippingParents"?Yt(t):[].concat(e),o=[].concat(r,[n]),i=o[0],a=o.reduce(function(s,f){var c=ht(t,f);return s.top=X(c.top,s.top),s.right=ve(c.right,s.right),s.bottom=ve(c.bottom,s.bottom),s.left=X(c.left,s.left),s},ht(t,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e=t.reference,n=t.element,r=t.placement,o=r?q(r):null,i=r?te(r):null,a=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,f;switch(o){case E:f={x:a,y:e.y-n.height};break;case R:f={x:a,y:e.y+e.height};break;case W:f={x:e.x+e.width,y:s};break;case P:f={x:e.x-n.width,y:s};break;default:f={x:e.x,y:e.y};}var c=o?Le(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case U:f[c]=f[c]-(e[u]/2-n[u]/2);break;case J:f[c]=f[c]+(e[u]/2-n[u]/2);break}}return f}function ne(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.boundary,a=i===void 0?Xe:i,s=n.rootBoundary,f=s===void 0?je:s,c=n.elementContext,u=c===void 0?K:c,m=n.altBoundary,v=m===void 0?!1:m,l=n.padding,h=l===void 0?0:l,p=ft(typeof h!="number"?h:ct(h,G)),g=u===K?Ye:K,x=t.rects.popper,y=t.elements[v?g:u],$=Gt(Q(y)?y:y.contextElement||I(t.elements.popper),a,f),d=ee(t.elements.reference),b=mt({reference:d,element:x,strategy:"absolute",placement:o}),w=Te(Object.assign({},x,b)),O=u===K?w:d,j={top:$.top-O.top+p.top,bottom:O.bottom-$.bottom+p.bottom,left:$.left-O.left+p.left,right:O.right-$.right+p.right},A=t.modifiersData.offset;if(u===K&&A){var k=A[o];Object.keys(j).forEach(function(D){var S=[W,R].indexOf(D)>=0?1:-1,L=[E,R].indexOf(D)>=0?"y":"x";j[D]+=k[L]*S;});}return j}function Jt(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=f===void 0?Ee:f,u=te(r),m=u?s?De:De.filter(function(h){return te(h)===u}):G,v=m.filter(function(h){return c.indexOf(h)>=0});v.length===0&&(v=m);var l=v.reduce(function(h,p){return h[p]=ne(t,{placement:p,boundary:o,rootBoundary:i,padding:a})[q(p)],h},{});return Object.keys(l).sort(function(h,p){return l[h]-l[p]})}function Kt(t){if(q(t)===me)return [];var e=be(t);return [lt(t),e,lt(e)]}function Qt(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,f=n.fallbackPlacements,c=n.padding,u=n.boundary,m=n.rootBoundary,v=n.altBoundary,l=n.flipVariations,h=l===void 0?!0:l,p=n.allowedAutoPlacements,g=e.options.placement,x=q(g),y=x===g,$=f||(y||!h?[be(g)]:Kt(g)),d=[g].concat($).reduce(function(z,V){return z.concat(q(V)===me?Jt(e,{placement:V,boundary:u,rootBoundary:m,padding:c,flipVariations:h,allowedAutoPlacements:p}):V)},[]),b=e.rects.reference,w=e.rects.popper,O=new Map,j=!0,A=d[0],k=0;k<d.length;k++){var D=d[k],S=q(D),L=te(D)===U,re=[E,R].indexOf(S)>=0,oe=re?"width":"height",M=ne(e,{placement:D,boundary:u,rootBoundary:m,altBoundary:v,padding:c}),T=re?L?W:P:L?R:E;b[oe]>w[oe]&&(T=be(T));var pe=be(T),_=[];if(i&&_.push(M[S]<=0),s&&_.push(M[T]<=0,M[pe]<=0),_.every(function(z){return z})){A=D,j=!1;break}O.set(D,_);}if(j)for(var ue=h?3:1,xe=function(z){var V=d.find(function(de){var ae=O.get(de);if(ae)return ae.slice(0,z).every(function(Y){return Y})});if(V)return A=V,"break"},ie=ue;ie>0;ie--){var le=xe(ie);if(le==="break")break}e.placement!==A&&(e.modifiersData[r]._skip=!0,e.placement=A,e.reset=!0);}}var vt={name:"flip",enabled:!0,phase:"main",fn:Qt,requiresIfExists:["offset"],data:{_skip:!1}};function gt(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function yt(t){return [E,W,R,P].some(function(e){return t[e]>=0})}function Zt(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,a=ne(e,{elementContext:"reference"}),s=ne(e,{altBoundary:!0}),f=gt(a,r),c=gt(s,o,i),u=yt(f),m=yt(c);e.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":m});}var bt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zt};function en(t,e,n){var r=q(t),o=[P,E].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,W].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function tn(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,a=Ee.reduce(function(u,m){return u[m]=en(m,e.rects,i),u},{}),s=a[e.placement],f=s.x,c=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=f,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=a;}var wt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:tn};function nn(t){var e=t.state,n=t.name;e.modifiersData[n]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement});}var He={name:"popperOffsets",enabled:!0,phase:"read",fn:nn,data:{}};function rn(t){return t==="x"?"y":"x"}function on(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,f=n.boundary,c=n.rootBoundary,u=n.altBoundary,m=n.padding,v=n.tether,l=v===void 0?!0:v,h=n.tetherOffset,p=h===void 0?0:h,g=ne(e,{boundary:f,rootBoundary:c,padding:m,altBoundary:u}),x=q(e.placement),y=te(e.placement),$=!y,d=Le(x),b=rn(d),w=e.modifiersData.popperOffsets,O=e.rects.reference,j=e.rects.popper,A=typeof p=="function"?p(Object.assign({},e.rects,{placement:e.placement})):p,k=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,S={x:0,y:0};if(w){if(i){var L,re=d==="y"?E:P,oe=d==="y"?R:W,M=d==="y"?"height":"width",T=w[d],pe=T+g[re],_=T-g[oe],ue=l?-j[M]/2:0,xe=y===U?O[M]:j[M],ie=y===U?-j[M]:-O[M],le=e.elements.arrow,z=l&&le?ke(le):{width:0,height:0},V=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:st(),de=V[re],ae=V[oe],Y=fe(0,O[M],z[M]),jt=$?O[M]/2-ue-Y-de-k.mainAxis:xe-Y-de-k.mainAxis,Dt=$?-O[M]/2+ue+Y+ae+k.mainAxis:ie+Y+ae+k.mainAxis,Oe=e.elements.arrow&&se(e.elements.arrow),Et=Oe?d==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,Ce=(L=D==null?void 0:D[d])!=null?L:0,Pt=T+jt-Ce-Et,At=T+Dt-Ce,qe=fe(l?ve(pe,Pt):pe,T,l?X(_,At):_);w[d]=qe,S[d]=qe-T;}if(s){var Ve,kt=d==="x"?E:P,Lt=d==="x"?R:W,F=w[b],he=b==="y"?"height":"width",Ne=F+g[kt],Ie=F-g[Lt],$e=[E,P].indexOf(x)!==-1,_e=(Ve=D==null?void 0:D[b])!=null?Ve:0,ze=$e?Ne:F-O[he]-j[he]-_e+k.altAxis,Fe=$e?F+O[he]+j[he]-_e-k.altAxis:Ie,Ue=l&&$e?St(ze,F,Fe):fe(l?ze:Ne,F,l?Fe:Ie);w[b]=Ue,S[b]=Ue-F;}e.modifiersData[r]=S;}}var xt={name:"preventOverflow",enabled:!0,phase:"main",fn:on,requiresIfExists:["offset"]};function an(t){return {scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function sn(t){return t===H(t)||!B(t)?We(t):an(t)}function fn(t){var e=t.getBoundingClientRect(),n=Z(e.width)/t.offsetWidth||1,r=Z(e.height)/t.offsetHeight||1;return n!==1||r!==1}function cn(t,e,n){n===void 0&&(n=!1);var r=B(e),o=B(e)&&fn(e),i=I(e),a=ee(t,o),s={scrollLeft:0,scrollTop:0},f={x:0,y:0};return (r||!r&&!n)&&((C(e)!=="body"||Se(i))&&(s=sn(e)),B(e)?(f=ee(e,!0),f.x+=e.clientLeft,f.y+=e.clientTop):i&&(f.x=Be(i))),{x:a.left+s.scrollLeft-f.x,y:a.top+s.scrollTop-f.y,width:a.width,height:a.height}}function pn(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i);});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var f=e.get(s);f&&o(f);}}),r.push(i);}return t.forEach(function(i){n.has(i.name)||o(i);}),r}function un(t){var e=pn(t);return ot.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function ln(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t());});})),e}}function dn(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function $t(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return !e.some(function(r){return !(r&&typeof r.getBoundingClientRect=="function")})}function we(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?Ot:o;return function(a,s,f){f===void 0&&(f=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ot,i),modifiersData:{},elements:{reference:a,popper:s},attributes:{},styles:{}},u=[],m=!1,v={state:c,setOptions:function(p){var g=typeof p=="function"?p(c.options):p;h(),c.options=Object.assign({},i,c.options,g),c.scrollParents={reference:Q(a)?ce(a):a.contextElement?ce(a.contextElement):[],popper:ce(s)};var x=un(dn([].concat(r,c.options.modifiers)));return c.orderedModifiers=x.filter(function(y){return y.enabled}),l(),v.update()},forceUpdate:function(){if(!m){var p=c.elements,g=p.reference,x=p.popper;if($t(g,x)){c.rects={reference:cn(g,se(x),c.options.strategy==="fixed"),popper:ke(x)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(j){return c.modifiersData[j.name]=Object.assign({},j.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===!0){c.reset=!1,y=-1;continue}var $=c.orderedModifiers[y],d=$.fn,b=$.options,w=b===void 0?{}:b,O=$.name;typeof d=="function"&&(c=d({state:c,options:w,name:O,instance:v})||c);}}}},update:ln(function(){return new Promise(function(p){v.forceUpdate(),p(c);})}),destroy:function(){h(),m=!0;}};if(!$t(a,s))return v;v.setOptions(f).then(function(p){!m&&f.onFirstUpdate&&f.onFirstUpdate(p);});function l(){c.orderedModifiers.forEach(function(p){var g=p.name,x=p.options,y=x===void 0?{}:x,$=p.effect;if(typeof $=="function"){var d=$({state:c,name:g,instance:v,options:y}),b=function(){};u.push(d||b);}});}function h(){u.forEach(function(p){return p()}),u=[];}return v}}we();var mn=[Re,He,Me,Ae];we({defaultModifiers:mn});var gn=[Re,He,Me,Ae,wt,vt,xt,pt,bt],yn=we({defaultModifiers:gn});
15646
15695
 
@@ -16019,11 +16068,11 @@
16019
16068
  };
16020
16069
  };
16021
16070
 
16022
- const __default__$m = vue.defineComponent({
16071
+ const __default__$v = vue.defineComponent({
16023
16072
  name: "ElPopperContent"
16024
16073
  });
16025
- const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
16026
- ...__default__$m,
16074
+ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
16075
+ ...__default__$v,
16027
16076
  props: popperContentProps,
16028
16077
  emits: popperContentEmits,
16029
16078
  setup(__props, { expose, emit }) {
@@ -16139,7 +16188,7 @@
16139
16188
  };
16140
16189
  }
16141
16190
  });
16142
- var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__file", "content.vue"]]);
16191
+ var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__file", "content.vue"]]);
16143
16192
 
16144
16193
  const ElPopper = withInstall(Popper);
16145
16194
 
@@ -16417,11 +16466,11 @@
16417
16466
  return handleEvent;
16418
16467
  };
16419
16468
 
16420
- const __default__$l = vue.defineComponent({
16469
+ const __default__$u = vue.defineComponent({
16421
16470
  name: "ElTooltipTrigger"
16422
16471
  });
16423
- const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
16424
- ...__default__$l,
16472
+ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
16473
+ ...__default__$u,
16425
16474
  props: useTooltipTriggerProps,
16426
16475
  setup(__props, { expose }) {
16427
16476
  const props = __props;
@@ -16480,7 +16529,7 @@
16480
16529
  };
16481
16530
  }
16482
16531
  });
16483
- var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "trigger.vue"]]);
16532
+ var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__file", "trigger.vue"]]);
16484
16533
 
16485
16534
  const teleportProps = buildProps({
16486
16535
  to: {
@@ -16490,7 +16539,7 @@
16490
16539
  disabled: Boolean
16491
16540
  });
16492
16541
 
16493
- const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
16542
+ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
16494
16543
  __name: "teleport",
16495
16544
  props: teleportProps,
16496
16545
  setup(__props) {
@@ -16504,7 +16553,7 @@
16504
16553
  };
16505
16554
  }
16506
16555
  });
16507
- var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__file", "teleport.vue"]]);
16556
+ var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__file", "teleport.vue"]]);
16508
16557
 
16509
16558
  const ElTeleport = withInstall(Teleport);
16510
16559
 
@@ -16541,12 +16590,12 @@
16541
16590
  };
16542
16591
  };
16543
16592
 
16544
- const __default__$k = vue.defineComponent({
16593
+ const __default__$t = vue.defineComponent({
16545
16594
  name: "ElTooltipContent",
16546
16595
  inheritAttrs: false
16547
16596
  });
16548
- const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
16549
- ...__default__$k,
16597
+ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
16598
+ ...__default__$t,
16550
16599
  props: useTooltipContentProps,
16551
16600
  setup(__props, { expose }) {
16552
16601
  const props = __props;
@@ -16717,13 +16766,13 @@
16717
16766
  };
16718
16767
  }
16719
16768
  });
16720
- var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__file", "content.vue"]]);
16769
+ var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__file", "content.vue"]]);
16721
16770
 
16722
- const __default__$j = vue.defineComponent({
16771
+ const __default__$s = vue.defineComponent({
16723
16772
  name: "ElTooltip"
16724
16773
  });
16725
- const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
16726
- ...__default__$j,
16774
+ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
16775
+ ...__default__$s,
16727
16776
  props: useTooltipProps,
16728
16777
  emits: tooltipEmits,
16729
16778
  setup(__props, { expose, emit }) {
@@ -16873,7 +16922,7 @@
16873
16922
  };
16874
16923
  }
16875
16924
  });
16876
- var Tooltip$1 = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "tooltip.vue"]]);
16925
+ var Tooltip$1 = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__file", "tooltip.vue"]]);
16877
16926
 
16878
16927
  const ElTooltip = withInstall(Tooltip$1);
16879
16928
 
@@ -17947,11 +17996,11 @@
17947
17996
  });
17948
17997
  }
17949
17998
 
17950
- const __default__$i = vue.defineComponent({
17999
+ const __default__$r = vue.defineComponent({
17951
18000
  name: "ElButton"
17952
18001
  });
17953
- const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
17954
- ...__default__$i,
18002
+ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
18003
+ ...__default__$r,
17955
18004
  props: buttonProps,
17956
18005
  emits: buttonEmits,
17957
18006
  setup(__props, { expose, emit }) {
@@ -18017,18 +18066,18 @@
18017
18066
  };
18018
18067
  }
18019
18068
  });
18020
- var Button = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "button.vue"]]);
18069
+ var Button = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__file", "button.vue"]]);
18021
18070
 
18022
18071
  const buttonGroupProps = {
18023
18072
  size: buttonProps.size,
18024
18073
  type: buttonProps.type
18025
18074
  };
18026
18075
 
18027
- const __default__$h = vue.defineComponent({
18076
+ const __default__$q = vue.defineComponent({
18028
18077
  name: "ElButtonGroup"
18029
18078
  });
18030
- const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
18031
- ...__default__$h,
18079
+ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
18080
+ ...__default__$q,
18032
18081
  props: buttonGroupProps,
18033
18082
  setup(__props) {
18034
18083
  const props = __props;
@@ -18046,7 +18095,7 @@
18046
18095
  };
18047
18096
  }
18048
18097
  });
18049
- var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "button-group.vue"]]);
18098
+ var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__file", "button-group.vue"]]);
18050
18099
 
18051
18100
  const ElButton = withInstall(Button, {
18052
18101
  ButtonGroup
@@ -18055,84 +18104,1837 @@
18055
18104
 
18056
18105
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
18057
18106
 
18058
- const escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
18059
-
18060
- const tagProps = buildProps({
18061
- type: {
18062
- type: String,
18063
- values: ["primary", "success", "info", "warning", "danger"],
18064
- default: "primary"
18107
+ const checkboxProps = {
18108
+ modelValue: {
18109
+ type: [Number, String, Boolean],
18110
+ default: void 0
18065
18111
  },
18066
- closable: Boolean,
18067
- disableTransitions: Boolean,
18068
- hit: Boolean,
18069
- color: String,
18070
- size: {
18112
+ label: {
18113
+ type: [String, Boolean, Number, Object],
18114
+ default: void 0
18115
+ },
18116
+ value: {
18117
+ type: [String, Boolean, Number, Object],
18118
+ default: void 0
18119
+ },
18120
+ indeterminate: Boolean,
18121
+ disabled: Boolean,
18122
+ checked: Boolean,
18123
+ name: {
18071
18124
  type: String,
18072
- values: componentSizes
18125
+ default: void 0
18073
18126
  },
18074
- effect: {
18127
+ trueValue: {
18128
+ type: [String, Number],
18129
+ default: void 0
18130
+ },
18131
+ falseValue: {
18132
+ type: [String, Number],
18133
+ default: void 0
18134
+ },
18135
+ trueLabel: {
18136
+ type: [String, Number],
18137
+ default: void 0
18138
+ },
18139
+ falseLabel: {
18140
+ type: [String, Number],
18141
+ default: void 0
18142
+ },
18143
+ id: {
18075
18144
  type: String,
18076
- values: ["dark", "light", "plain"],
18077
- default: "light"
18145
+ default: void 0
18078
18146
  },
18079
- round: Boolean
18080
- });
18081
- const tagEmits = {
18082
- close: (evt) => evt instanceof MouseEvent,
18083
- click: (evt) => evt instanceof MouseEvent
18147
+ border: Boolean,
18148
+ size: useSizeProp,
18149
+ tabindex: [String, Number],
18150
+ validateEvent: {
18151
+ type: Boolean,
18152
+ default: true
18153
+ },
18154
+ ...useAriaProps(["ariaControls"])
18155
+ };
18156
+ const checkboxEmits = {
18157
+ [UPDATE_MODEL_EVENT]: (val) => isString$1(val) || isNumber(val) || isBoolean(val),
18158
+ change: (val) => isString$1(val) || isNumber(val) || isBoolean(val)
18084
18159
  };
18085
18160
 
18086
- const __default__$g = vue.defineComponent({
18087
- name: "ElTag"
18161
+ const checkboxGroupContextKey = Symbol("checkboxGroupContextKey");
18162
+
18163
+ const useCheckboxDisabled = ({
18164
+ model,
18165
+ isChecked
18166
+ }) => {
18167
+ const checkboxGroup = vue.inject(checkboxGroupContextKey, void 0);
18168
+ const isLimitDisabled = vue.computed(() => {
18169
+ var _a, _b;
18170
+ const max = (_a = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a.value;
18171
+ const min = (_b = checkboxGroup == null ? void 0 : checkboxGroup.min) == null ? void 0 : _b.value;
18172
+ return !isUndefined(max) && model.value.length >= max && !isChecked.value || !isUndefined(min) && model.value.length <= min && isChecked.value;
18173
+ });
18174
+ const isDisabled = useFormDisabled(vue.computed(() => (checkboxGroup == null ? void 0 : checkboxGroup.disabled.value) || isLimitDisabled.value));
18175
+ return {
18176
+ isDisabled,
18177
+ isLimitDisabled
18178
+ };
18179
+ };
18180
+
18181
+ const useCheckboxEvent = (props, {
18182
+ model,
18183
+ isLimitExceeded,
18184
+ hasOwnLabel,
18185
+ isDisabled,
18186
+ isLabeledByFormItem
18187
+ }) => {
18188
+ const checkboxGroup = vue.inject(checkboxGroupContextKey, void 0);
18189
+ const { formItem } = useFormItem();
18190
+ const { emit } = vue.getCurrentInstance();
18191
+ function getLabeledValue(value) {
18192
+ var _a, _b, _c, _d;
18193
+ return [true, props.trueValue, props.trueLabel].includes(value) ? (_b = (_a = props.trueValue) != null ? _a : props.trueLabel) != null ? _b : true : (_d = (_c = props.falseValue) != null ? _c : props.falseLabel) != null ? _d : false;
18194
+ }
18195
+ function emitChangeEvent(checked, e) {
18196
+ emit("change", getLabeledValue(checked), e);
18197
+ }
18198
+ function handleChange(e) {
18199
+ if (isLimitExceeded.value)
18200
+ return;
18201
+ const target = e.target;
18202
+ emit("change", getLabeledValue(target.checked), e);
18203
+ }
18204
+ async function onClickRoot(e) {
18205
+ if (isLimitExceeded.value)
18206
+ return;
18207
+ if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {
18208
+ const eventTargets = e.composedPath();
18209
+ const hasLabel = eventTargets.some((item) => item.tagName === "LABEL");
18210
+ if (!hasLabel) {
18211
+ model.value = getLabeledValue([false, props.falseValue, props.falseLabel].includes(model.value));
18212
+ await vue.nextTick();
18213
+ emitChangeEvent(model.value, e);
18214
+ }
18215
+ }
18216
+ }
18217
+ const validateEvent = vue.computed(() => (checkboxGroup == null ? void 0 : checkboxGroup.validateEvent) || props.validateEvent);
18218
+ vue.watch(() => props.modelValue, () => {
18219
+ if (validateEvent.value) {
18220
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn());
18221
+ }
18222
+ });
18223
+ return {
18224
+ handleChange,
18225
+ onClickRoot
18226
+ };
18227
+ };
18228
+
18229
+ const useCheckboxModel = (props) => {
18230
+ const selfModel = vue.ref(false);
18231
+ const { emit } = vue.getCurrentInstance();
18232
+ const checkboxGroup = vue.inject(checkboxGroupContextKey, void 0);
18233
+ const isGroup = vue.computed(() => isUndefined(checkboxGroup) === false);
18234
+ const isLimitExceeded = vue.ref(false);
18235
+ const model = vue.computed({
18236
+ get() {
18237
+ var _a, _b;
18238
+ return isGroup.value ? (_a = checkboxGroup == null ? void 0 : checkboxGroup.modelValue) == null ? void 0 : _a.value : (_b = props.modelValue) != null ? _b : selfModel.value;
18239
+ },
18240
+ set(val) {
18241
+ var _a, _b;
18242
+ if (isGroup.value && isArray$1(val)) {
18243
+ isLimitExceeded.value = ((_a = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a.value) !== void 0 && val.length > (checkboxGroup == null ? void 0 : checkboxGroup.max.value) && val.length > model.value.length;
18244
+ isLimitExceeded.value === false && ((_b = checkboxGroup == null ? void 0 : checkboxGroup.changeEvent) == null ? void 0 : _b.call(checkboxGroup, val));
18245
+ } else {
18246
+ emit(UPDATE_MODEL_EVENT, val);
18247
+ selfModel.value = val;
18248
+ }
18249
+ }
18250
+ });
18251
+ return {
18252
+ model,
18253
+ isGroup,
18254
+ isLimitExceeded
18255
+ };
18256
+ };
18257
+
18258
+ const useCheckboxStatus = (props, slots, { model }) => {
18259
+ const checkboxGroup = vue.inject(checkboxGroupContextKey, void 0);
18260
+ const isFocused = vue.ref(false);
18261
+ const actualValue = vue.computed(() => {
18262
+ if (!isPropAbsent(props.value)) {
18263
+ return props.value;
18264
+ }
18265
+ return props.label;
18266
+ });
18267
+ const isChecked = vue.computed(() => {
18268
+ const value = model.value;
18269
+ if (isBoolean(value)) {
18270
+ return value;
18271
+ } else if (isArray$1(value)) {
18272
+ if (isObject$1(actualValue.value)) {
18273
+ return value.map(vue.toRaw).some((o) => isEqual$1(o, actualValue.value));
18274
+ } else {
18275
+ return value.map(vue.toRaw).includes(actualValue.value);
18276
+ }
18277
+ } else if (value !== null && value !== void 0) {
18278
+ return value === props.trueValue || value === props.trueLabel;
18279
+ } else {
18280
+ return !!value;
18281
+ }
18282
+ });
18283
+ const checkboxButtonSize = useFormSize(vue.computed(() => {
18284
+ var _a;
18285
+ return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value;
18286
+ }), {
18287
+ prop: true
18288
+ });
18289
+ const checkboxSize = useFormSize(vue.computed(() => {
18290
+ var _a;
18291
+ return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value;
18292
+ }));
18293
+ const hasOwnLabel = vue.computed(() => {
18294
+ return !!slots.default || !isPropAbsent(actualValue.value);
18295
+ });
18296
+ return {
18297
+ checkboxButtonSize,
18298
+ isChecked,
18299
+ isFocused,
18300
+ checkboxSize,
18301
+ hasOwnLabel,
18302
+ actualValue
18303
+ };
18304
+ };
18305
+
18306
+ const useCheckbox = (props, slots) => {
18307
+ const { formItem: elFormItem } = useFormItem();
18308
+ const { model, isGroup, isLimitExceeded } = useCheckboxModel(props);
18309
+ const {
18310
+ isFocused,
18311
+ isChecked,
18312
+ checkboxButtonSize,
18313
+ checkboxSize,
18314
+ hasOwnLabel,
18315
+ actualValue
18316
+ } = useCheckboxStatus(props, slots, { model });
18317
+ const { isDisabled } = useCheckboxDisabled({ model, isChecked });
18318
+ const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
18319
+ formItemContext: elFormItem,
18320
+ disableIdGeneration: hasOwnLabel,
18321
+ disableIdManagement: isGroup
18322
+ });
18323
+ const { handleChange, onClickRoot } = useCheckboxEvent(props, {
18324
+ model,
18325
+ isLimitExceeded,
18326
+ hasOwnLabel,
18327
+ isDisabled,
18328
+ isLabeledByFormItem
18329
+ });
18330
+ const setStoreValue = () => {
18331
+ function addToStore() {
18332
+ var _a, _b;
18333
+ if (isArray$1(model.value) && !model.value.includes(actualValue.value)) {
18334
+ model.value.push(actualValue.value);
18335
+ } else {
18336
+ model.value = (_b = (_a = props.trueValue) != null ? _a : props.trueLabel) != null ? _b : true;
18337
+ }
18338
+ }
18339
+ props.checked && addToStore();
18340
+ };
18341
+ setStoreValue();
18342
+ useDeprecated({
18343
+ from: "label act as value",
18344
+ replacement: "value",
18345
+ version: "3.0.0",
18346
+ scope: "el-checkbox",
18347
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
18348
+ }, vue.computed(() => isGroup.value && isPropAbsent(props.value)));
18349
+ useDeprecated({
18350
+ from: "true-label",
18351
+ replacement: "true-value",
18352
+ version: "3.0.0",
18353
+ scope: "el-checkbox",
18354
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
18355
+ }, vue.computed(() => !!props.trueLabel));
18356
+ useDeprecated({
18357
+ from: "false-label",
18358
+ replacement: "false-value",
18359
+ version: "3.0.0",
18360
+ scope: "el-checkbox",
18361
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
18362
+ }, vue.computed(() => !!props.falseLabel));
18363
+ return {
18364
+ inputId,
18365
+ isLabeledByFormItem,
18366
+ isChecked,
18367
+ isDisabled,
18368
+ isFocused,
18369
+ checkboxButtonSize,
18370
+ checkboxSize,
18371
+ hasOwnLabel,
18372
+ model,
18373
+ actualValue,
18374
+ handleChange,
18375
+ onClickRoot
18376
+ };
18377
+ };
18378
+
18379
+ const __default__$p = vue.defineComponent({
18380
+ name: "ElCheckbox"
18088
18381
  });
18089
- const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
18090
- ...__default__$g,
18091
- props: tagProps,
18092
- emits: tagEmits,
18093
- setup(__props, { emit }) {
18382
+ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
18383
+ ...__default__$p,
18384
+ props: checkboxProps,
18385
+ emits: checkboxEmits,
18386
+ setup(__props) {
18094
18387
  const props = __props;
18095
- const tagSize = useFormSize();
18096
- const ns = useNamespace("tag");
18097
- const containerKls = vue.computed(() => {
18098
- const { type, hit, effect, closable, round } = props;
18388
+ const slots = vue.useSlots();
18389
+ const {
18390
+ inputId,
18391
+ isLabeledByFormItem,
18392
+ isChecked,
18393
+ isDisabled,
18394
+ isFocused,
18395
+ checkboxSize,
18396
+ hasOwnLabel,
18397
+ model,
18398
+ actualValue,
18399
+ handleChange,
18400
+ onClickRoot
18401
+ } = useCheckbox(props, slots);
18402
+ const ns = useNamespace("checkbox");
18403
+ const compKls = vue.computed(() => {
18099
18404
  return [
18100
18405
  ns.b(),
18101
- ns.is("closable", closable),
18102
- ns.m(type || "primary"),
18103
- ns.m(tagSize.value),
18104
- ns.m(effect),
18105
- ns.is("hit", hit),
18106
- ns.is("round", round)
18406
+ ns.m(checkboxSize.value),
18407
+ ns.is("disabled", isDisabled.value),
18408
+ ns.is("bordered", props.border),
18409
+ ns.is("checked", isChecked.value)
18410
+ ];
18411
+ });
18412
+ const spanKls = vue.computed(() => {
18413
+ return [
18414
+ ns.e("input"),
18415
+ ns.is("disabled", isDisabled.value),
18416
+ ns.is("checked", isChecked.value),
18417
+ ns.is("indeterminate", props.indeterminate),
18418
+ ns.is("focus", isFocused.value)
18107
18419
  ];
18108
18420
  });
18109
- const handleClose = (event) => {
18110
- emit("close", event);
18111
- };
18112
- const handleClick = (event) => {
18113
- emit("click", event);
18114
- };
18115
- const handleVNodeMounted = (vnode) => {
18116
- var _a, _b, _c;
18117
- if ((_c = (_b = (_a = vnode == null ? void 0 : vnode.component) == null ? void 0 : _a.subTree) == null ? void 0 : _b.component) == null ? void 0 : _c.bum) {
18118
- vnode.component.subTree.component.bum = null;
18119
- }
18120
- };
18121
18421
  return (_ctx, _cache) => {
18122
- return _ctx.disableTransitions ? (vue.openBlock(), vue.createElementBlock("span", {
18123
- key: 0,
18124
- class: vue.normalizeClass(vue.unref(containerKls)),
18125
- style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
18126
- onClick: handleClick
18127
- }, [
18128
- vue.createElementVNode("span", {
18129
- class: vue.normalizeClass(vue.unref(ns).e("content"))
18130
- }, [
18131
- vue.renderSlot(_ctx.$slots, "default")
18132
- ], 2),
18133
- _ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
18134
- key: 0,
18135
- class: vue.normalizeClass(vue.unref(ns).e("close")),
18422
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(!vue.unref(hasOwnLabel) && vue.unref(isLabeledByFormItem) ? "span" : "label"), {
18423
+ class: vue.normalizeClass(vue.unref(compKls)),
18424
+ "aria-controls": _ctx.indeterminate ? _ctx.ariaControls : null,
18425
+ onClick: vue.unref(onClickRoot)
18426
+ }, {
18427
+ default: vue.withCtx(() => {
18428
+ var _a, _b, _c, _d;
18429
+ return [
18430
+ vue.createElementVNode("span", {
18431
+ class: vue.normalizeClass(vue.unref(spanKls))
18432
+ }, [
18433
+ _ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
18434
+ key: 0,
18435
+ id: vue.unref(inputId),
18436
+ "onUpdate:modelValue": ($event) => vue.isRef(model) ? model.value = $event : null,
18437
+ class: vue.normalizeClass(vue.unref(ns).e("original")),
18438
+ type: "checkbox",
18439
+ indeterminate: _ctx.indeterminate,
18440
+ name: _ctx.name,
18441
+ tabindex: _ctx.tabindex,
18442
+ disabled: vue.unref(isDisabled),
18443
+ "true-value": (_b = (_a = _ctx.trueValue) != null ? _a : _ctx.trueLabel) != null ? _b : true,
18444
+ "false-value": (_d = (_c = _ctx.falseValue) != null ? _c : _ctx.falseLabel) != null ? _d : false,
18445
+ onChange: vue.unref(handleChange),
18446
+ onFocus: ($event) => isFocused.value = true,
18447
+ onBlur: ($event) => isFocused.value = false,
18448
+ onClick: vue.withModifiers(() => {
18449
+ }, ["stop"])
18450
+ }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
18451
+ [vue.vModelCheckbox, vue.unref(model)]
18452
+ ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
18453
+ key: 1,
18454
+ id: vue.unref(inputId),
18455
+ "onUpdate:modelValue": ($event) => vue.isRef(model) ? model.value = $event : null,
18456
+ class: vue.normalizeClass(vue.unref(ns).e("original")),
18457
+ type: "checkbox",
18458
+ indeterminate: _ctx.indeterminate,
18459
+ disabled: vue.unref(isDisabled),
18460
+ value: vue.unref(actualValue),
18461
+ name: _ctx.name,
18462
+ tabindex: _ctx.tabindex,
18463
+ onChange: vue.unref(handleChange),
18464
+ onFocus: ($event) => isFocused.value = true,
18465
+ onBlur: ($event) => isFocused.value = false,
18466
+ onClick: vue.withModifiers(() => {
18467
+ }, ["stop"])
18468
+ }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [
18469
+ [vue.vModelCheckbox, vue.unref(model)]
18470
+ ]),
18471
+ vue.createElementVNode("span", {
18472
+ class: vue.normalizeClass(vue.unref(ns).e("inner"))
18473
+ }, null, 2)
18474
+ ], 2),
18475
+ vue.unref(hasOwnLabel) ? (vue.openBlock(), vue.createElementBlock("span", {
18476
+ key: 0,
18477
+ class: vue.normalizeClass(vue.unref(ns).e("label"))
18478
+ }, [
18479
+ vue.renderSlot(_ctx.$slots, "default"),
18480
+ !_ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
18481
+ vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
18482
+ ], 64)) : vue.createCommentVNode("v-if", true)
18483
+ ], 2)) : vue.createCommentVNode("v-if", true)
18484
+ ];
18485
+ }),
18486
+ _: 3
18487
+ }, 8, ["class", "aria-controls", "onClick"]);
18488
+ };
18489
+ }
18490
+ });
18491
+ var Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__file", "checkbox.vue"]]);
18492
+
18493
+ const __default__$o = vue.defineComponent({
18494
+ name: "ElCheckboxButton"
18495
+ });
18496
+ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
18497
+ ...__default__$o,
18498
+ props: checkboxProps,
18499
+ emits: checkboxEmits,
18500
+ setup(__props) {
18501
+ const props = __props;
18502
+ const slots = vue.useSlots();
18503
+ const {
18504
+ isFocused,
18505
+ isChecked,
18506
+ isDisabled,
18507
+ checkboxButtonSize,
18508
+ model,
18509
+ actualValue,
18510
+ handleChange
18511
+ } = useCheckbox(props, slots);
18512
+ const checkboxGroup = vue.inject(checkboxGroupContextKey, void 0);
18513
+ const ns = useNamespace("checkbox");
18514
+ const activeStyle = vue.computed(() => {
18515
+ var _a, _b, _c, _d;
18516
+ const fillValue = (_b = (_a = checkboxGroup == null ? void 0 : checkboxGroup.fill) == null ? void 0 : _a.value) != null ? _b : "";
18517
+ return {
18518
+ backgroundColor: fillValue,
18519
+ borderColor: fillValue,
18520
+ color: (_d = (_c = checkboxGroup == null ? void 0 : checkboxGroup.textColor) == null ? void 0 : _c.value) != null ? _d : "",
18521
+ boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : void 0
18522
+ };
18523
+ });
18524
+ const labelKls = vue.computed(() => {
18525
+ return [
18526
+ ns.b("button"),
18527
+ ns.bm("button", checkboxButtonSize.value),
18528
+ ns.is("disabled", isDisabled.value),
18529
+ ns.is("checked", isChecked.value),
18530
+ ns.is("focus", isFocused.value)
18531
+ ];
18532
+ });
18533
+ return (_ctx, _cache) => {
18534
+ var _a, _b, _c, _d;
18535
+ return vue.openBlock(), vue.createElementBlock("label", {
18536
+ class: vue.normalizeClass(vue.unref(labelKls))
18537
+ }, [
18538
+ _ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
18539
+ key: 0,
18540
+ "onUpdate:modelValue": ($event) => vue.isRef(model) ? model.value = $event : null,
18541
+ class: vue.normalizeClass(vue.unref(ns).be("button", "original")),
18542
+ type: "checkbox",
18543
+ name: _ctx.name,
18544
+ tabindex: _ctx.tabindex,
18545
+ disabled: vue.unref(isDisabled),
18546
+ "true-value": (_b = (_a = _ctx.trueValue) != null ? _a : _ctx.trueLabel) != null ? _b : true,
18547
+ "false-value": (_d = (_c = _ctx.falseValue) != null ? _c : _ctx.falseLabel) != null ? _d : false,
18548
+ onChange: vue.unref(handleChange),
18549
+ onFocus: ($event) => isFocused.value = true,
18550
+ onBlur: ($event) => isFocused.value = false,
18551
+ onClick: vue.withModifiers(() => {
18552
+ }, ["stop"])
18553
+ }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
18554
+ [vue.vModelCheckbox, vue.unref(model)]
18555
+ ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
18556
+ key: 1,
18557
+ "onUpdate:modelValue": ($event) => vue.isRef(model) ? model.value = $event : null,
18558
+ class: vue.normalizeClass(vue.unref(ns).be("button", "original")),
18559
+ type: "checkbox",
18560
+ name: _ctx.name,
18561
+ tabindex: _ctx.tabindex,
18562
+ disabled: vue.unref(isDisabled),
18563
+ value: vue.unref(actualValue),
18564
+ onChange: vue.unref(handleChange),
18565
+ onFocus: ($event) => isFocused.value = true,
18566
+ onBlur: ($event) => isFocused.value = false,
18567
+ onClick: vue.withModifiers(() => {
18568
+ }, ["stop"])
18569
+ }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [
18570
+ [vue.vModelCheckbox, vue.unref(model)]
18571
+ ]),
18572
+ _ctx.$slots.default || _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", {
18573
+ key: 2,
18574
+ class: vue.normalizeClass(vue.unref(ns).be("button", "inner")),
18575
+ style: vue.normalizeStyle(vue.unref(isChecked) ? vue.unref(activeStyle) : void 0)
18576
+ }, [
18577
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
18578
+ vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
18579
+ ])
18580
+ ], 6)) : vue.createCommentVNode("v-if", true)
18581
+ ], 2);
18582
+ };
18583
+ }
18584
+ });
18585
+ var CheckboxButton = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__file", "checkbox-button.vue"]]);
18586
+
18587
+ const checkboxGroupProps = buildProps({
18588
+ modelValue: {
18589
+ type: definePropType(Array),
18590
+ default: () => []
18591
+ },
18592
+ disabled: Boolean,
18593
+ min: Number,
18594
+ max: Number,
18595
+ size: useSizeProp,
18596
+ fill: String,
18597
+ textColor: String,
18598
+ tag: {
18599
+ type: String,
18600
+ default: "div"
18601
+ },
18602
+ validateEvent: {
18603
+ type: Boolean,
18604
+ default: true
18605
+ },
18606
+ ...useAriaProps(["ariaLabel"])
18607
+ });
18608
+ const checkboxGroupEmits = {
18609
+ [UPDATE_MODEL_EVENT]: (val) => isArray$1(val),
18610
+ change: (val) => isArray$1(val)
18611
+ };
18612
+
18613
+ const __default__$n = vue.defineComponent({
18614
+ name: "ElCheckboxGroup"
18615
+ });
18616
+ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
18617
+ ...__default__$n,
18618
+ props: checkboxGroupProps,
18619
+ emits: checkboxGroupEmits,
18620
+ setup(__props, { emit }) {
18621
+ const props = __props;
18622
+ const ns = useNamespace("checkbox");
18623
+ const { formItem } = useFormItem();
18624
+ const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
18625
+ formItemContext: formItem
18626
+ });
18627
+ const changeEvent = async (value) => {
18628
+ emit(UPDATE_MODEL_EVENT, value);
18629
+ await vue.nextTick();
18630
+ emit("change", value);
18631
+ };
18632
+ const modelValue = vue.computed({
18633
+ get() {
18634
+ return props.modelValue;
18635
+ },
18636
+ set(val) {
18637
+ changeEvent(val);
18638
+ }
18639
+ });
18640
+ vue.provide(checkboxGroupContextKey, {
18641
+ ...pick(vue.toRefs(props), [
18642
+ "size",
18643
+ "min",
18644
+ "max",
18645
+ "disabled",
18646
+ "validateEvent",
18647
+ "fill",
18648
+ "textColor"
18649
+ ]),
18650
+ modelValue,
18651
+ changeEvent
18652
+ });
18653
+ vue.watch(() => props.modelValue, () => {
18654
+ if (props.validateEvent) {
18655
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn());
18656
+ }
18657
+ });
18658
+ return (_ctx, _cache) => {
18659
+ var _a;
18660
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
18661
+ id: vue.unref(groupId),
18662
+ class: vue.normalizeClass(vue.unref(ns).b("group")),
18663
+ role: "group",
18664
+ "aria-label": !vue.unref(isLabeledByFormItem) ? _ctx.ariaLabel || "checkbox-group" : void 0,
18665
+ "aria-labelledby": vue.unref(isLabeledByFormItem) ? (_a = vue.unref(formItem)) == null ? void 0 : _a.labelId : void 0
18666
+ }, {
18667
+ default: vue.withCtx(() => [
18668
+ vue.renderSlot(_ctx.$slots, "default")
18669
+ ]),
18670
+ _: 3
18671
+ }, 8, ["id", "class", "aria-label", "aria-labelledby"]);
18672
+ };
18673
+ }
18674
+ });
18675
+ var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__file", "checkbox-group.vue"]]);
18676
+
18677
+ const ElCheckbox = withInstall(Checkbox, {
18678
+ CheckboxButton,
18679
+ CheckboxGroup
18680
+ });
18681
+ withNoopInstall(CheckboxButton);
18682
+ withNoopInstall(CheckboxGroup);
18683
+
18684
+ const radioPropsBase = buildProps({
18685
+ modelValue: {
18686
+ type: [String, Number, Boolean],
18687
+ default: void 0
18688
+ },
18689
+ size: useSizeProp,
18690
+ disabled: Boolean,
18691
+ label: {
18692
+ type: [String, Number, Boolean],
18693
+ default: void 0
18694
+ },
18695
+ value: {
18696
+ type: [String, Number, Boolean],
18697
+ default: void 0
18698
+ },
18699
+ name: {
18700
+ type: String,
18701
+ default: void 0
18702
+ }
18703
+ });
18704
+ const radioProps = buildProps({
18705
+ ...radioPropsBase,
18706
+ border: Boolean
18707
+ });
18708
+ const radioEmits = {
18709
+ [UPDATE_MODEL_EVENT]: (val) => isString$1(val) || isNumber(val) || isBoolean(val),
18710
+ [CHANGE_EVENT]: (val) => isString$1(val) || isNumber(val) || isBoolean(val)
18711
+ };
18712
+
18713
+ const radioGroupKey = Symbol("radioGroupKey");
18714
+
18715
+ const useRadio = (props, emit) => {
18716
+ const radioRef = vue.ref();
18717
+ const radioGroup = vue.inject(radioGroupKey, void 0);
18718
+ const isGroup = vue.computed(() => !!radioGroup);
18719
+ const actualValue = vue.computed(() => {
18720
+ if (!isPropAbsent(props.value)) {
18721
+ return props.value;
18722
+ }
18723
+ return props.label;
18724
+ });
18725
+ const modelValue = vue.computed({
18726
+ get() {
18727
+ return isGroup.value ? radioGroup.modelValue : props.modelValue;
18728
+ },
18729
+ set(val) {
18730
+ if (isGroup.value) {
18731
+ radioGroup.changeEvent(val);
18732
+ } else {
18733
+ emit && emit(UPDATE_MODEL_EVENT, val);
18734
+ }
18735
+ radioRef.value.checked = props.modelValue === actualValue.value;
18736
+ }
18737
+ });
18738
+ const size = useFormSize(vue.computed(() => radioGroup == null ? void 0 : radioGroup.size));
18739
+ const disabled = useFormDisabled(vue.computed(() => radioGroup == null ? void 0 : radioGroup.disabled));
18740
+ const focus = vue.ref(false);
18741
+ const tabIndex = vue.computed(() => {
18742
+ return disabled.value || isGroup.value && modelValue.value !== actualValue.value ? -1 : 0;
18743
+ });
18744
+ useDeprecated({
18745
+ from: "label act as value",
18746
+ replacement: "value",
18747
+ version: "3.0.0",
18748
+ scope: "el-radio",
18749
+ ref: "https://element-plus.org/en-US/component/radio.html"
18750
+ }, vue.computed(() => isGroup.value && isPropAbsent(props.value)));
18751
+ return {
18752
+ radioRef,
18753
+ isGroup,
18754
+ radioGroup,
18755
+ focus,
18756
+ size,
18757
+ disabled,
18758
+ tabIndex,
18759
+ modelValue,
18760
+ actualValue
18761
+ };
18762
+ };
18763
+
18764
+ const __default__$m = vue.defineComponent({
18765
+ name: "ElRadio"
18766
+ });
18767
+ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
18768
+ ...__default__$m,
18769
+ props: radioProps,
18770
+ emits: radioEmits,
18771
+ setup(__props, { emit }) {
18772
+ const props = __props;
18773
+ const ns = useNamespace("radio");
18774
+ const { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } = useRadio(props, emit);
18775
+ function handleChange() {
18776
+ vue.nextTick(() => emit("change", modelValue.value));
18777
+ }
18778
+ return (_ctx, _cache) => {
18779
+ var _a;
18780
+ return vue.openBlock(), vue.createElementBlock("label", {
18781
+ class: vue.normalizeClass([
18782
+ vue.unref(ns).b(),
18783
+ vue.unref(ns).is("disabled", vue.unref(disabled)),
18784
+ vue.unref(ns).is("focus", vue.unref(focus)),
18785
+ vue.unref(ns).is("bordered", _ctx.border),
18786
+ vue.unref(ns).is("checked", vue.unref(modelValue) === vue.unref(actualValue)),
18787
+ vue.unref(ns).m(vue.unref(size))
18788
+ ])
18789
+ }, [
18790
+ vue.createElementVNode("span", {
18791
+ class: vue.normalizeClass([
18792
+ vue.unref(ns).e("input"),
18793
+ vue.unref(ns).is("disabled", vue.unref(disabled)),
18794
+ vue.unref(ns).is("checked", vue.unref(modelValue) === vue.unref(actualValue))
18795
+ ])
18796
+ }, [
18797
+ vue.withDirectives(vue.createElementVNode("input", {
18798
+ ref_key: "radioRef",
18799
+ ref: radioRef,
18800
+ "onUpdate:modelValue": ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null,
18801
+ class: vue.normalizeClass(vue.unref(ns).e("original")),
18802
+ value: vue.unref(actualValue),
18803
+ name: _ctx.name || ((_a = vue.unref(radioGroup)) == null ? void 0 : _a.name),
18804
+ disabled: vue.unref(disabled),
18805
+ checked: vue.unref(modelValue) === vue.unref(actualValue),
18806
+ type: "radio",
18807
+ onFocus: ($event) => focus.value = true,
18808
+ onBlur: ($event) => focus.value = false,
18809
+ onChange: handleChange,
18810
+ onClick: vue.withModifiers(() => {
18811
+ }, ["stop"])
18812
+ }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
18813
+ [vue.vModelRadio, vue.unref(modelValue)]
18814
+ ]),
18815
+ vue.createElementVNode("span", {
18816
+ class: vue.normalizeClass(vue.unref(ns).e("inner"))
18817
+ }, null, 2)
18818
+ ], 2),
18819
+ vue.createElementVNode("span", {
18820
+ class: vue.normalizeClass(vue.unref(ns).e("label")),
18821
+ onKeydown: vue.withModifiers(() => {
18822
+ }, ["stop"])
18823
+ }, [
18824
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
18825
+ vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
18826
+ ])
18827
+ ], 42, ["onKeydown"])
18828
+ ], 2);
18829
+ };
18830
+ }
18831
+ });
18832
+ var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__file", "radio.vue"]]);
18833
+
18834
+ const radioButtonProps = buildProps({
18835
+ ...radioPropsBase
18836
+ });
18837
+
18838
+ const __default__$l = vue.defineComponent({
18839
+ name: "ElRadioButton"
18840
+ });
18841
+ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
18842
+ ...__default__$l,
18843
+ props: radioButtonProps,
18844
+ setup(__props) {
18845
+ const props = __props;
18846
+ const ns = useNamespace("radio");
18847
+ const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio(props);
18848
+ const activeStyle = vue.computed(() => {
18849
+ return {
18850
+ backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
18851
+ borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
18852
+ boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
18853
+ color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
18854
+ };
18855
+ });
18856
+ return (_ctx, _cache) => {
18857
+ var _a;
18858
+ return vue.openBlock(), vue.createElementBlock("label", {
18859
+ class: vue.normalizeClass([
18860
+ vue.unref(ns).b("button"),
18861
+ vue.unref(ns).is("active", vue.unref(modelValue) === vue.unref(actualValue)),
18862
+ vue.unref(ns).is("disabled", vue.unref(disabled)),
18863
+ vue.unref(ns).is("focus", vue.unref(focus)),
18864
+ vue.unref(ns).bm("button", vue.unref(size))
18865
+ ])
18866
+ }, [
18867
+ vue.withDirectives(vue.createElementVNode("input", {
18868
+ ref_key: "radioRef",
18869
+ ref: radioRef,
18870
+ "onUpdate:modelValue": ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null,
18871
+ class: vue.normalizeClass(vue.unref(ns).be("button", "original-radio")),
18872
+ value: vue.unref(actualValue),
18873
+ type: "radio",
18874
+ name: _ctx.name || ((_a = vue.unref(radioGroup)) == null ? void 0 : _a.name),
18875
+ disabled: vue.unref(disabled),
18876
+ onFocus: ($event) => focus.value = true,
18877
+ onBlur: ($event) => focus.value = false,
18878
+ onClick: vue.withModifiers(() => {
18879
+ }, ["stop"])
18880
+ }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
18881
+ [vue.vModelRadio, vue.unref(modelValue)]
18882
+ ]),
18883
+ vue.createElementVNode("span", {
18884
+ class: vue.normalizeClass(vue.unref(ns).be("button", "inner")),
18885
+ style: vue.normalizeStyle(vue.unref(modelValue) === vue.unref(actualValue) ? vue.unref(activeStyle) : {}),
18886
+ onKeydown: vue.withModifiers(() => {
18887
+ }, ["stop"])
18888
+ }, [
18889
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
18890
+ vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
18891
+ ])
18892
+ ], 46, ["onKeydown"])
18893
+ ], 2);
18894
+ };
18895
+ }
18896
+ });
18897
+ var RadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__file", "radio-button.vue"]]);
18898
+
18899
+ const radioGroupProps = buildProps({
18900
+ id: {
18901
+ type: String,
18902
+ default: void 0
18903
+ },
18904
+ size: useSizeProp,
18905
+ disabled: Boolean,
18906
+ modelValue: {
18907
+ type: [String, Number, Boolean],
18908
+ default: void 0
18909
+ },
18910
+ fill: {
18911
+ type: String,
18912
+ default: ""
18913
+ },
18914
+ textColor: {
18915
+ type: String,
18916
+ default: ""
18917
+ },
18918
+ name: {
18919
+ type: String,
18920
+ default: void 0
18921
+ },
18922
+ validateEvent: {
18923
+ type: Boolean,
18924
+ default: true
18925
+ },
18926
+ ...useAriaProps(["ariaLabel"])
18927
+ });
18928
+ const radioGroupEmits = radioEmits;
18929
+
18930
+ const __default__$k = vue.defineComponent({
18931
+ name: "ElRadioGroup"
18932
+ });
18933
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
18934
+ ...__default__$k,
18935
+ props: radioGroupProps,
18936
+ emits: radioGroupEmits,
18937
+ setup(__props, { emit }) {
18938
+ const props = __props;
18939
+ const ns = useNamespace("radio");
18940
+ const radioId = useId();
18941
+ const radioGroupRef = vue.ref();
18942
+ const { formItem } = useFormItem();
18943
+ const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
18944
+ formItemContext: formItem
18945
+ });
18946
+ const changeEvent = (value) => {
18947
+ emit(UPDATE_MODEL_EVENT, value);
18948
+ vue.nextTick(() => emit("change", value));
18949
+ };
18950
+ vue.onMounted(() => {
18951
+ const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
18952
+ const firstLabel = radios[0];
18953
+ if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
18954
+ firstLabel.tabIndex = 0;
18955
+ }
18956
+ });
18957
+ const name = vue.computed(() => {
18958
+ return props.name || radioId.value;
18959
+ });
18960
+ vue.provide(radioGroupKey, vue.reactive({
18961
+ ...vue.toRefs(props),
18962
+ changeEvent,
18963
+ name
18964
+ }));
18965
+ vue.watch(() => props.modelValue, () => {
18966
+ if (props.validateEvent) {
18967
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn());
18968
+ }
18969
+ });
18970
+ return (_ctx, _cache) => {
18971
+ return vue.openBlock(), vue.createElementBlock("div", {
18972
+ id: vue.unref(groupId),
18973
+ ref_key: "radioGroupRef",
18974
+ ref: radioGroupRef,
18975
+ class: vue.normalizeClass(vue.unref(ns).b("group")),
18976
+ role: "radiogroup",
18977
+ "aria-label": !vue.unref(isLabeledByFormItem) ? _ctx.ariaLabel || "radio-group" : void 0,
18978
+ "aria-labelledby": vue.unref(isLabeledByFormItem) ? vue.unref(formItem).labelId : void 0
18979
+ }, [
18980
+ vue.renderSlot(_ctx.$slots, "default")
18981
+ ], 10, ["id", "aria-label", "aria-labelledby"]);
18982
+ };
18983
+ }
18984
+ });
18985
+ var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__file", "radio-group.vue"]]);
18986
+
18987
+ const ElRadio = withInstall(Radio, {
18988
+ RadioButton,
18989
+ RadioGroup
18990
+ });
18991
+ withNoopInstall(RadioGroup);
18992
+ withNoopInstall(RadioButton);
18993
+
18994
+ var NodeContent = vue.defineComponent({
18995
+ name: "NodeContent",
18996
+ setup() {
18997
+ const ns = useNamespace("cascader-node");
18998
+ return {
18999
+ ns
19000
+ };
19001
+ },
19002
+ render() {
19003
+ const { ns } = this;
19004
+ const { node, panel } = this.$parent;
19005
+ const { data, label } = node;
19006
+ const { renderLabelFn } = panel;
19007
+ return vue.h("span", { class: ns.e("label") }, renderLabelFn ? renderLabelFn({ node, data }) : label);
19008
+ }
19009
+ });
19010
+
19011
+ const CASCADER_PANEL_INJECTION_KEY = Symbol();
19012
+
19013
+ const _sfc_main$w = vue.defineComponent({
19014
+ name: "ElCascaderNode",
19015
+ components: {
19016
+ ElCheckbox,
19017
+ ElRadio,
19018
+ NodeContent,
19019
+ ElIcon,
19020
+ Check: check_default,
19021
+ Loading: loading_default,
19022
+ ArrowRight: arrow_right_default
19023
+ },
19024
+ props: {
19025
+ node: {
19026
+ type: Object,
19027
+ required: true
19028
+ },
19029
+ menuId: String
19030
+ },
19031
+ emits: ["expand"],
19032
+ setup(props, { emit }) {
19033
+ const panel = vue.inject(CASCADER_PANEL_INJECTION_KEY);
19034
+ const ns = useNamespace("cascader-node");
19035
+ const isHoverMenu = vue.computed(() => panel.isHoverMenu);
19036
+ const multiple = vue.computed(() => panel.config.multiple);
19037
+ const checkStrictly = vue.computed(() => panel.config.checkStrictly);
19038
+ const checkedNodeId = vue.computed(() => {
19039
+ var _a;
19040
+ return (_a = panel.checkedNodes[0]) == null ? void 0 : _a.uid;
19041
+ });
19042
+ const isDisabled = vue.computed(() => props.node.isDisabled);
19043
+ const isLeaf = vue.computed(() => props.node.isLeaf);
19044
+ const expandable = vue.computed(() => checkStrictly.value && !isLeaf.value || !isDisabled.value);
19045
+ const inExpandingPath = vue.computed(() => isInPath(panel.expandingNode));
19046
+ const inCheckedPath = vue.computed(() => checkStrictly.value && panel.checkedNodes.some(isInPath));
19047
+ const isInPath = (node) => {
19048
+ var _a;
19049
+ const { level, uid } = props.node;
19050
+ return ((_a = node == null ? void 0 : node.pathNodes[level - 1]) == null ? void 0 : _a.uid) === uid;
19051
+ };
19052
+ const doExpand = () => {
19053
+ if (inExpandingPath.value)
19054
+ return;
19055
+ panel.expandNode(props.node);
19056
+ };
19057
+ const doCheck = (checked) => {
19058
+ const { node } = props;
19059
+ if (checked === node.checked)
19060
+ return;
19061
+ panel.handleCheckChange(node, checked);
19062
+ };
19063
+ const doLoad = () => {
19064
+ panel.lazyLoad(props.node, () => {
19065
+ if (!isLeaf.value)
19066
+ doExpand();
19067
+ });
19068
+ };
19069
+ const handleHoverExpand = (e) => {
19070
+ if (!isHoverMenu.value)
19071
+ return;
19072
+ handleExpand();
19073
+ !isLeaf.value && emit("expand", e);
19074
+ };
19075
+ const handleExpand = () => {
19076
+ const { node } = props;
19077
+ if (!expandable.value || node.loading)
19078
+ return;
19079
+ node.loaded ? doExpand() : doLoad();
19080
+ };
19081
+ const handleClick = () => {
19082
+ if (isHoverMenu.value && !isLeaf.value)
19083
+ return;
19084
+ if (isLeaf.value && !isDisabled.value && !checkStrictly.value && !multiple.value) {
19085
+ handleCheck(true);
19086
+ } else {
19087
+ handleExpand();
19088
+ }
19089
+ };
19090
+ const handleSelectCheck = (checked) => {
19091
+ if (checkStrictly.value) {
19092
+ doCheck(checked);
19093
+ if (props.node.loaded) {
19094
+ doExpand();
19095
+ }
19096
+ } else {
19097
+ handleCheck(checked);
19098
+ }
19099
+ };
19100
+ const handleCheck = (checked) => {
19101
+ if (!props.node.loaded) {
19102
+ doLoad();
19103
+ } else {
19104
+ doCheck(checked);
19105
+ !checkStrictly.value && doExpand();
19106
+ }
19107
+ };
19108
+ return {
19109
+ panel,
19110
+ isHoverMenu,
19111
+ multiple,
19112
+ checkStrictly,
19113
+ checkedNodeId,
19114
+ isDisabled,
19115
+ isLeaf,
19116
+ expandable,
19117
+ inExpandingPath,
19118
+ inCheckedPath,
19119
+ ns,
19120
+ handleHoverExpand,
19121
+ handleExpand,
19122
+ handleClick,
19123
+ handleCheck,
19124
+ handleSelectCheck
19125
+ };
19126
+ }
19127
+ });
19128
+ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
19129
+ const _component_el_checkbox = vue.resolveComponent("el-checkbox");
19130
+ const _component_el_radio = vue.resolveComponent("el-radio");
19131
+ const _component_check = vue.resolveComponent("check");
19132
+ const _component_el_icon = vue.resolveComponent("el-icon");
19133
+ const _component_node_content = vue.resolveComponent("node-content");
19134
+ const _component_loading = vue.resolveComponent("loading");
19135
+ const _component_arrow_right = vue.resolveComponent("arrow-right");
19136
+ return vue.openBlock(), vue.createElementBlock("li", {
19137
+ id: `${_ctx.menuId}-${_ctx.node.uid}`,
19138
+ role: "menuitem",
19139
+ "aria-haspopup": !_ctx.isLeaf,
19140
+ "aria-owns": _ctx.isLeaf ? null : _ctx.menuId,
19141
+ "aria-expanded": _ctx.inExpandingPath,
19142
+ tabindex: _ctx.expandable ? -1 : void 0,
19143
+ class: vue.normalizeClass([
19144
+ _ctx.ns.b(),
19145
+ _ctx.ns.is("selectable", _ctx.checkStrictly),
19146
+ _ctx.ns.is("active", _ctx.node.checked),
19147
+ _ctx.ns.is("disabled", !_ctx.expandable),
19148
+ _ctx.inExpandingPath && "in-active-path",
19149
+ _ctx.inCheckedPath && "in-checked-path"
19150
+ ]),
19151
+ onMouseenter: _ctx.handleHoverExpand,
19152
+ onFocus: _ctx.handleHoverExpand,
19153
+ onClick: _ctx.handleClick
19154
+ }, [
19155
+ vue.createCommentVNode(" prefix "),
19156
+ _ctx.multiple ? (vue.openBlock(), vue.createBlock(_component_el_checkbox, {
19157
+ key: 0,
19158
+ "model-value": _ctx.node.checked,
19159
+ indeterminate: _ctx.node.indeterminate,
19160
+ disabled: _ctx.isDisabled,
19161
+ onClick: vue.withModifiers(() => {
19162
+ }, ["stop"]),
19163
+ "onUpdate:modelValue": _ctx.handleSelectCheck
19164
+ }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onUpdate:modelValue"])) : _ctx.checkStrictly ? (vue.openBlock(), vue.createBlock(_component_el_radio, {
19165
+ key: 1,
19166
+ "model-value": _ctx.checkedNodeId,
19167
+ label: _ctx.node.uid,
19168
+ disabled: _ctx.isDisabled,
19169
+ "onUpdate:modelValue": _ctx.handleSelectCheck,
19170
+ onClick: vue.withModifiers(() => {
19171
+ }, ["stop"])
19172
+ }, {
19173
+ default: vue.withCtx(() => [
19174
+ vue.createCommentVNode("\n Add an empty element to avoid render label,\n do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485\n "),
19175
+ vue.createElementVNode("span")
19176
+ ]),
19177
+ _: 1
19178
+ }, 8, ["model-value", "label", "disabled", "onUpdate:modelValue", "onClick"])) : _ctx.isLeaf && _ctx.node.checked ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
19179
+ key: 2,
19180
+ class: vue.normalizeClass(_ctx.ns.e("prefix"))
19181
+ }, {
19182
+ default: vue.withCtx(() => [
19183
+ vue.createVNode(_component_check)
19184
+ ]),
19185
+ _: 1
19186
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
19187
+ vue.createCommentVNode(" content "),
19188
+ vue.createVNode(_component_node_content),
19189
+ vue.createCommentVNode(" postfix "),
19190
+ !_ctx.isLeaf ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
19191
+ _ctx.node.loading ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
19192
+ key: 0,
19193
+ class: vue.normalizeClass([_ctx.ns.is("loading"), _ctx.ns.e("postfix")])
19194
+ }, {
19195
+ default: vue.withCtx(() => [
19196
+ vue.createVNode(_component_loading)
19197
+ ]),
19198
+ _: 1
19199
+ }, 8, ["class"])) : (vue.openBlock(), vue.createBlock(_component_el_icon, {
19200
+ key: 1,
19201
+ class: vue.normalizeClass(["arrow-right", _ctx.ns.e("postfix")])
19202
+ }, {
19203
+ default: vue.withCtx(() => [
19204
+ vue.createVNode(_component_arrow_right)
19205
+ ]),
19206
+ _: 1
19207
+ }, 8, ["class"]))
19208
+ ], 64)) : vue.createCommentVNode("v-if", true)
19209
+ ], 42, ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex", "onMouseenter", "onFocus", "onClick"]);
19210
+ }
19211
+ var ElCascaderNode = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$b], ["__file", "node.vue"]]);
19212
+
19213
+ const _sfc_main$v = vue.defineComponent({
19214
+ name: "ElCascaderMenu",
19215
+ components: {
19216
+ Loading: loading_default,
19217
+ ElIcon,
19218
+ ElScrollbar,
19219
+ ElCascaderNode
19220
+ },
19221
+ props: {
19222
+ nodes: {
19223
+ type: Array,
19224
+ required: true
19225
+ },
19226
+ index: {
19227
+ type: Number,
19228
+ required: true
19229
+ }
19230
+ },
19231
+ setup(props) {
19232
+ const instance = vue.getCurrentInstance();
19233
+ const ns = useNamespace("cascader-menu");
19234
+ const { t } = useLocale();
19235
+ const id = useId();
19236
+ let activeNode = null;
19237
+ let hoverTimer = null;
19238
+ const panel = vue.inject(CASCADER_PANEL_INJECTION_KEY);
19239
+ const hoverZone = vue.ref(null);
19240
+ const isEmpty = vue.computed(() => !props.nodes.length);
19241
+ const isLoading = vue.computed(() => !panel.initialLoaded);
19242
+ const menuId = vue.computed(() => `${id.value}-${props.index}`);
19243
+ const handleExpand = (e) => {
19244
+ activeNode = e.target;
19245
+ };
19246
+ const handleMouseMove = (e) => {
19247
+ if (!panel.isHoverMenu || !activeNode || !hoverZone.value)
19248
+ return;
19249
+ if (activeNode.contains(e.target)) {
19250
+ clearHoverTimer();
19251
+ const el = instance.vnode.el;
19252
+ const { left } = el.getBoundingClientRect();
19253
+ const { offsetWidth, offsetHeight } = el;
19254
+ const startX = e.clientX - left;
19255
+ const top = activeNode.offsetTop;
19256
+ const bottom = top + activeNode.offsetHeight;
19257
+ hoverZone.value.innerHTML = `
19258
+ <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${top} L${offsetWidth} 0 V${top} Z" />
19259
+ <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${bottom} L${offsetWidth} ${offsetHeight} V${bottom} Z" />
19260
+ `;
19261
+ } else if (!hoverTimer) {
19262
+ hoverTimer = window.setTimeout(clearHoverZone, panel.config.hoverThreshold);
19263
+ }
19264
+ };
19265
+ const clearHoverTimer = () => {
19266
+ if (!hoverTimer)
19267
+ return;
19268
+ clearTimeout(hoverTimer);
19269
+ hoverTimer = null;
19270
+ };
19271
+ const clearHoverZone = () => {
19272
+ if (!hoverZone.value)
19273
+ return;
19274
+ hoverZone.value.innerHTML = "";
19275
+ clearHoverTimer();
19276
+ };
19277
+ return {
19278
+ ns,
19279
+ panel,
19280
+ hoverZone,
19281
+ isEmpty,
19282
+ isLoading,
19283
+ menuId,
19284
+ t,
19285
+ handleExpand,
19286
+ handleMouseMove,
19287
+ clearHoverZone
19288
+ };
19289
+ }
19290
+ });
19291
+ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
19292
+ const _component_el_cascader_node = vue.resolveComponent("el-cascader-node");
19293
+ const _component_loading = vue.resolveComponent("loading");
19294
+ const _component_el_icon = vue.resolveComponent("el-icon");
19295
+ const _component_el_scrollbar = vue.resolveComponent("el-scrollbar");
19296
+ return vue.openBlock(), vue.createBlock(_component_el_scrollbar, {
19297
+ key: _ctx.menuId,
19298
+ tag: "ul",
19299
+ role: "menu",
19300
+ class: vue.normalizeClass(_ctx.ns.b()),
19301
+ "wrap-class": _ctx.ns.e("wrap"),
19302
+ "view-class": [_ctx.ns.e("list"), _ctx.ns.is("empty", _ctx.isEmpty)],
19303
+ onMousemove: _ctx.handleMouseMove,
19304
+ onMouseleave: _ctx.clearHoverZone
19305
+ }, {
19306
+ default: vue.withCtx(() => {
19307
+ var _a;
19308
+ return [
19309
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.nodes, (node) => {
19310
+ return vue.openBlock(), vue.createBlock(_component_el_cascader_node, {
19311
+ key: node.uid,
19312
+ node,
19313
+ "menu-id": _ctx.menuId,
19314
+ onExpand: _ctx.handleExpand
19315
+ }, null, 8, ["node", "menu-id", "onExpand"]);
19316
+ }), 128)),
19317
+ _ctx.isLoading ? (vue.openBlock(), vue.createElementBlock("div", {
19318
+ key: 0,
19319
+ class: vue.normalizeClass(_ctx.ns.e("empty-text"))
19320
+ }, [
19321
+ vue.createVNode(_component_el_icon, {
19322
+ size: "14",
19323
+ class: vue.normalizeClass(_ctx.ns.is("loading"))
19324
+ }, {
19325
+ default: vue.withCtx(() => [
19326
+ vue.createVNode(_component_loading)
19327
+ ]),
19328
+ _: 1
19329
+ }, 8, ["class"]),
19330
+ vue.createTextVNode(" " + vue.toDisplayString(_ctx.t("el.cascader.loading")), 1)
19331
+ ], 2)) : _ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("div", {
19332
+ key: 1,
19333
+ class: vue.normalizeClass(_ctx.ns.e("empty-text"))
19334
+ }, [
19335
+ vue.renderSlot(_ctx.$slots, "empty", {}, () => [
19336
+ vue.createTextVNode(vue.toDisplayString(_ctx.t("el.cascader.noData")), 1)
19337
+ ])
19338
+ ], 2)) : ((_a = _ctx.panel) == null ? void 0 : _a.isHoverMenu) ? (vue.openBlock(), vue.createElementBlock("svg", {
19339
+ key: 2,
19340
+ ref: "hoverZone",
19341
+ class: vue.normalizeClass(_ctx.ns.e("hover-zone"))
19342
+ }, null, 2)) : vue.createCommentVNode("v-if", true)
19343
+ ];
19344
+ }),
19345
+ _: 3
19346
+ }, 8, ["class", "wrap-class", "view-class", "onMousemove", "onMouseleave"]);
19347
+ }
19348
+ var ElCascaderMenu = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$a], ["__file", "menu.vue"]]);
19349
+
19350
+ const escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
19351
+ const capitalize = (str) => capitalize$2(str);
19352
+
19353
+ let uid = 0;
19354
+ const calculatePathNodes = (node) => {
19355
+ const nodes = [node];
19356
+ let { parent } = node;
19357
+ while (parent) {
19358
+ nodes.unshift(parent);
19359
+ parent = parent.parent;
19360
+ }
19361
+ return nodes;
19362
+ };
19363
+ class Node {
19364
+ constructor(data, config, parent, root = false) {
19365
+ this.data = data;
19366
+ this.config = config;
19367
+ this.parent = parent;
19368
+ this.root = root;
19369
+ this.uid = uid++;
19370
+ this.checked = false;
19371
+ this.indeterminate = false;
19372
+ this.loading = false;
19373
+ const { value: valueKey, label: labelKey, children: childrenKey } = config;
19374
+ const childrenData = data[childrenKey];
19375
+ const pathNodes = calculatePathNodes(this);
19376
+ this.level = root ? 0 : parent ? parent.level + 1 : 1;
19377
+ this.value = data[valueKey];
19378
+ this.label = data[labelKey];
19379
+ this.pathNodes = pathNodes;
19380
+ this.pathValues = pathNodes.map((node) => node.value);
19381
+ this.pathLabels = pathNodes.map((node) => node.label);
19382
+ this.childrenData = childrenData;
19383
+ this.children = (childrenData || []).map((child) => new Node(child, config, this));
19384
+ this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData);
19385
+ }
19386
+ get isDisabled() {
19387
+ const { data, parent, config } = this;
19388
+ const { disabled, checkStrictly } = config;
19389
+ const isDisabled = isFunction$1(disabled) ? disabled(data, this) : !!data[disabled];
19390
+ return isDisabled || !checkStrictly && (parent == null ? void 0 : parent.isDisabled);
19391
+ }
19392
+ get isLeaf() {
19393
+ const { data, config, childrenData, loaded } = this;
19394
+ const { lazy, leaf } = config;
19395
+ const isLeaf = isFunction$1(leaf) ? leaf(data, this) : data[leaf];
19396
+ return isUndefined(isLeaf) ? lazy && !loaded ? false : !(isArray$1(childrenData) && childrenData.length) : !!isLeaf;
19397
+ }
19398
+ get valueByOption() {
19399
+ return this.config.emitPath ? this.pathValues : this.value;
19400
+ }
19401
+ appendChild(childData) {
19402
+ const { childrenData, children } = this;
19403
+ const node = new Node(childData, this.config, this);
19404
+ if (isArray$1(childrenData)) {
19405
+ childrenData.push(childData);
19406
+ } else {
19407
+ this.childrenData = [childData];
19408
+ }
19409
+ children.push(node);
19410
+ return node;
19411
+ }
19412
+ calcText(allLevels, separator) {
19413
+ const text = allLevels ? this.pathLabels.join(separator) : this.label;
19414
+ this.text = text;
19415
+ return text;
19416
+ }
19417
+ broadcast(event, ...args) {
19418
+ const handlerName = `onParent${capitalize(event)}`;
19419
+ this.children.forEach((child) => {
19420
+ if (child) {
19421
+ child.broadcast(event, ...args);
19422
+ child[handlerName] && child[handlerName](...args);
19423
+ }
19424
+ });
19425
+ }
19426
+ emit(event, ...args) {
19427
+ const { parent } = this;
19428
+ const handlerName = `onChild${capitalize(event)}`;
19429
+ if (parent) {
19430
+ parent[handlerName] && parent[handlerName](...args);
19431
+ parent.emit(event, ...args);
19432
+ }
19433
+ }
19434
+ onParentCheck(checked) {
19435
+ if (!this.isDisabled) {
19436
+ this.setCheckState(checked);
19437
+ }
19438
+ }
19439
+ onChildCheck() {
19440
+ const { children } = this;
19441
+ const validChildren = children.filter((child) => !child.isDisabled);
19442
+ const checked = validChildren.length ? validChildren.every((child) => child.checked) : false;
19443
+ this.setCheckState(checked);
19444
+ }
19445
+ setCheckState(checked) {
19446
+ const totalNum = this.children.length;
19447
+ const checkedNum = this.children.reduce((c, p) => {
19448
+ const num = p.checked ? 1 : p.indeterminate ? 0.5 : 0;
19449
+ return c + num;
19450
+ }, 0);
19451
+ this.checked = this.loaded && this.children.filter((child) => !child.isDisabled).every((child) => child.loaded && child.checked) && checked;
19452
+ this.indeterminate = this.loaded && checkedNum !== totalNum && checkedNum > 0;
19453
+ }
19454
+ doCheck(checked) {
19455
+ if (this.checked === checked)
19456
+ return;
19457
+ const { checkStrictly, multiple } = this.config;
19458
+ if (checkStrictly || !multiple) {
19459
+ this.checked = checked;
19460
+ } else {
19461
+ this.broadcast("check", checked);
19462
+ this.setCheckState(checked);
19463
+ this.emit("check");
19464
+ }
19465
+ }
19466
+ }
19467
+
19468
+ const flatNodes = (nodes, leafOnly) => {
19469
+ return nodes.reduce((res, node) => {
19470
+ if (node.isLeaf) {
19471
+ res.push(node);
19472
+ } else {
19473
+ !leafOnly && res.push(node);
19474
+ res = res.concat(flatNodes(node.children, leafOnly));
19475
+ }
19476
+ return res;
19477
+ }, []);
19478
+ };
19479
+ class Store {
19480
+ constructor(data, config) {
19481
+ this.config = config;
19482
+ const nodes = (data || []).map((nodeData) => new Node(nodeData, this.config));
19483
+ this.nodes = nodes;
19484
+ this.allNodes = flatNodes(nodes, false);
19485
+ this.leafNodes = flatNodes(nodes, true);
19486
+ }
19487
+ getNodes() {
19488
+ return this.nodes;
19489
+ }
19490
+ getFlattedNodes(leafOnly) {
19491
+ return leafOnly ? this.leafNodes : this.allNodes;
19492
+ }
19493
+ appendNode(nodeData, parentNode) {
19494
+ const node = parentNode ? parentNode.appendChild(nodeData) : new Node(nodeData, this.config);
19495
+ if (!parentNode)
19496
+ this.nodes.push(node);
19497
+ this.allNodes.push(node);
19498
+ node.isLeaf && this.leafNodes.push(node);
19499
+ }
19500
+ appendNodes(nodeDataList, parentNode) {
19501
+ nodeDataList.forEach((nodeData) => this.appendNode(nodeData, parentNode));
19502
+ }
19503
+ getNodeByValue(value, leafOnly = false) {
19504
+ if (!value && value !== 0)
19505
+ return null;
19506
+ const node = this.getFlattedNodes(leafOnly).find((node2) => isEqual$1(node2.value, value) || isEqual$1(node2.pathValues, value));
19507
+ return node || null;
19508
+ }
19509
+ getSameNode(node) {
19510
+ if (!node)
19511
+ return null;
19512
+ const node_ = this.getFlattedNodes(false).find(({ value, level }) => isEqual$1(node.value, value) && node.level === level);
19513
+ return node_ || null;
19514
+ }
19515
+ }
19516
+
19517
+ const CommonProps = buildProps({
19518
+ modelValue: {
19519
+ type: definePropType([Number, String, Array])
19520
+ },
19521
+ options: {
19522
+ type: definePropType(Array),
19523
+ default: () => []
19524
+ },
19525
+ props: {
19526
+ type: definePropType(Object),
19527
+ default: () => ({})
19528
+ }
19529
+ });
19530
+ const DefaultProps = {
19531
+ expandTrigger: "click",
19532
+ multiple: false,
19533
+ checkStrictly: false,
19534
+ emitPath: true,
19535
+ lazy: false,
19536
+ lazyLoad: NOOP,
19537
+ value: "value",
19538
+ label: "label",
19539
+ children: "children",
19540
+ leaf: "leaf",
19541
+ disabled: "disabled",
19542
+ hoverThreshold: 500
19543
+ };
19544
+ const useCascaderConfig = (props) => {
19545
+ return vue.computed(() => ({
19546
+ ...DefaultProps,
19547
+ ...props.props
19548
+ }));
19549
+ };
19550
+
19551
+ const getMenuIndex = (el) => {
19552
+ if (!el)
19553
+ return 0;
19554
+ const pieces = el.id.split("-");
19555
+ return Number(pieces[pieces.length - 2]);
19556
+ };
19557
+ const checkNode = (el) => {
19558
+ if (!el)
19559
+ return;
19560
+ const input = el.querySelector("input");
19561
+ if (input) {
19562
+ input.click();
19563
+ } else if (isLeaf(el)) {
19564
+ el.click();
19565
+ }
19566
+ };
19567
+ const sortByOriginalOrder = (oldNodes, newNodes) => {
19568
+ const newNodesCopy = newNodes.slice(0);
19569
+ const newIds = newNodesCopy.map((node) => node.uid);
19570
+ const res = oldNodes.reduce((acc, item) => {
19571
+ const index = newIds.indexOf(item.uid);
19572
+ if (index > -1) {
19573
+ acc.push(item);
19574
+ newNodesCopy.splice(index, 1);
19575
+ newIds.splice(index, 1);
19576
+ }
19577
+ return acc;
19578
+ }, []);
19579
+ res.push(...newNodesCopy);
19580
+ return res;
19581
+ };
19582
+
19583
+ const unique = (arr) => [...new Set(arr)];
19584
+ const castArray = (arr) => {
19585
+ if (!arr && arr !== 0)
19586
+ return [];
19587
+ return isArray$1(arr) ? arr : [arr];
19588
+ };
19589
+
19590
+ const _sfc_main$u = vue.defineComponent({
19591
+ name: "ElCascaderPanel",
19592
+ components: {
19593
+ ElCascaderMenu
19594
+ },
19595
+ props: {
19596
+ ...CommonProps,
19597
+ border: {
19598
+ type: Boolean,
19599
+ default: true
19600
+ },
19601
+ renderLabel: Function
19602
+ },
19603
+ emits: [UPDATE_MODEL_EVENT, CHANGE_EVENT, "close", "expand-change"],
19604
+ setup(props, { emit, slots }) {
19605
+ let manualChecked = false;
19606
+ const ns = useNamespace("cascader");
19607
+ const config = useCascaderConfig(props);
19608
+ let store = null;
19609
+ const initialLoaded = vue.ref(true);
19610
+ const menuList = vue.ref([]);
19611
+ const checkedValue = vue.ref(null);
19612
+ const menus = vue.ref([]);
19613
+ const expandingNode = vue.ref(null);
19614
+ const checkedNodes = vue.ref([]);
19615
+ const isHoverMenu = vue.computed(() => config.value.expandTrigger === "hover");
19616
+ const renderLabelFn = vue.computed(() => props.renderLabel || slots.default);
19617
+ const initStore = () => {
19618
+ const { options } = props;
19619
+ const cfg = config.value;
19620
+ manualChecked = false;
19621
+ store = new Store(options, cfg);
19622
+ menus.value = [store.getNodes()];
19623
+ if (cfg.lazy && isEmpty(props.options)) {
19624
+ initialLoaded.value = false;
19625
+ lazyLoad(void 0, (list) => {
19626
+ if (list) {
19627
+ store = new Store(list, cfg);
19628
+ menus.value = [store.getNodes()];
19629
+ }
19630
+ initialLoaded.value = true;
19631
+ syncCheckedValue(false, true);
19632
+ });
19633
+ } else {
19634
+ syncCheckedValue(false, true);
19635
+ }
19636
+ };
19637
+ const lazyLoad = (node, cb) => {
19638
+ const cfg = config.value;
19639
+ node = node || new Node({}, cfg, void 0, true);
19640
+ node.loading = true;
19641
+ const resolve = (dataList) => {
19642
+ const _node = node;
19643
+ const parent = _node.root ? null : _node;
19644
+ dataList && (store == null ? void 0 : store.appendNodes(dataList, parent));
19645
+ _node.loading = false;
19646
+ _node.loaded = true;
19647
+ _node.childrenData = _node.childrenData || [];
19648
+ cb && cb(dataList);
19649
+ };
19650
+ cfg.lazyLoad(node, resolve);
19651
+ };
19652
+ const expandNode = (node, silent) => {
19653
+ var _a;
19654
+ const { level } = node;
19655
+ const newMenus = menus.value.slice(0, level);
19656
+ let newExpandingNode;
19657
+ if (node.isLeaf) {
19658
+ newExpandingNode = node.pathNodes[level - 2];
19659
+ } else {
19660
+ newExpandingNode = node;
19661
+ newMenus.push(node.children);
19662
+ }
19663
+ if (((_a = expandingNode.value) == null ? void 0 : _a.uid) !== (newExpandingNode == null ? void 0 : newExpandingNode.uid)) {
19664
+ expandingNode.value = node;
19665
+ menus.value = newMenus;
19666
+ !silent && emit("expand-change", (node == null ? void 0 : node.pathValues) || []);
19667
+ }
19668
+ };
19669
+ const handleCheckChange = (node, checked, emitClose = true) => {
19670
+ const { checkStrictly, multiple } = config.value;
19671
+ const oldNode = checkedNodes.value[0];
19672
+ manualChecked = true;
19673
+ !multiple && (oldNode == null ? void 0 : oldNode.doCheck(false));
19674
+ node.doCheck(checked);
19675
+ calculateCheckedValue();
19676
+ emitClose && !multiple && !checkStrictly && emit("close");
19677
+ !emitClose && !multiple && !checkStrictly && expandParentNode(node);
19678
+ };
19679
+ const expandParentNode = (node) => {
19680
+ if (!node)
19681
+ return;
19682
+ node = node.parent;
19683
+ expandParentNode(node);
19684
+ node && expandNode(node);
19685
+ };
19686
+ const getFlattedNodes = (leafOnly) => {
19687
+ return store == null ? void 0 : store.getFlattedNodes(leafOnly);
19688
+ };
19689
+ const getCheckedNodes = (leafOnly) => {
19690
+ var _a;
19691
+ return (_a = getFlattedNodes(leafOnly)) == null ? void 0 : _a.filter((node) => node.checked !== false);
19692
+ };
19693
+ const clearCheckedNodes = () => {
19694
+ checkedNodes.value.forEach((node) => node.doCheck(false));
19695
+ calculateCheckedValue();
19696
+ menus.value = menus.value.slice(0, 1);
19697
+ expandingNode.value = null;
19698
+ emit("expand-change", []);
19699
+ };
19700
+ const calculateCheckedValue = () => {
19701
+ var _a;
19702
+ const { checkStrictly, multiple } = config.value;
19703
+ const oldNodes = checkedNodes.value;
19704
+ const newNodes = getCheckedNodes(!checkStrictly);
19705
+ const nodes = sortByOriginalOrder(oldNodes, newNodes);
19706
+ const values = nodes.map((node) => node.valueByOption);
19707
+ checkedNodes.value = nodes;
19708
+ checkedValue.value = multiple ? values : (_a = values[0]) != null ? _a : null;
19709
+ };
19710
+ const syncCheckedValue = (loaded = false, forced = false) => {
19711
+ const { modelValue } = props;
19712
+ const { lazy, multiple, checkStrictly } = config.value;
19713
+ const leafOnly = !checkStrictly;
19714
+ if (!initialLoaded.value || manualChecked || !forced && isEqual$1(modelValue, checkedValue.value))
19715
+ return;
19716
+ if (lazy && !loaded) {
19717
+ const values = unique(flattenDeep(castArray(modelValue)));
19718
+ const nodes = values.map((val) => store == null ? void 0 : store.getNodeByValue(val)).filter((node) => !!node && !node.loaded && !node.loading);
19719
+ if (nodes.length) {
19720
+ nodes.forEach((node) => {
19721
+ lazyLoad(node, () => syncCheckedValue(false, forced));
19722
+ });
19723
+ } else {
19724
+ syncCheckedValue(true, forced);
19725
+ }
19726
+ } else {
19727
+ const values = multiple ? castArray(modelValue) : [modelValue];
19728
+ const nodes = unique(values.map((val) => store == null ? void 0 : store.getNodeByValue(val, leafOnly)));
19729
+ syncMenuState(nodes, forced);
19730
+ checkedValue.value = cloneDeep(modelValue);
19731
+ }
19732
+ };
19733
+ const syncMenuState = (newCheckedNodes, reserveExpandingState = true) => {
19734
+ const { checkStrictly } = config.value;
19735
+ const oldNodes = checkedNodes.value;
19736
+ const newNodes = newCheckedNodes.filter((node) => !!node && (checkStrictly || node.isLeaf));
19737
+ const oldExpandingNode = store == null ? void 0 : store.getSameNode(expandingNode.value);
19738
+ const newExpandingNode = reserveExpandingState && oldExpandingNode || newNodes[0];
19739
+ if (newExpandingNode) {
19740
+ newExpandingNode.pathNodes.forEach((node) => expandNode(node, true));
19741
+ } else {
19742
+ expandingNode.value = null;
19743
+ }
19744
+ oldNodes.forEach((node) => node.doCheck(false));
19745
+ vue.reactive(newNodes).forEach((node) => node.doCheck(true));
19746
+ checkedNodes.value = newNodes;
19747
+ vue.nextTick(scrollToExpandingNode);
19748
+ };
19749
+ const scrollToExpandingNode = () => {
19750
+ if (!isClient)
19751
+ return;
19752
+ menuList.value.forEach((menu) => {
19753
+ const menuElement = menu == null ? void 0 : menu.$el;
19754
+ if (menuElement) {
19755
+ const container = menuElement.querySelector(`.${ns.namespace.value}-scrollbar__wrap`);
19756
+ const activeNode = menuElement.querySelector(`.${ns.b("node")}.${ns.is("active")}`) || menuElement.querySelector(`.${ns.b("node")}.in-active-path`);
19757
+ scrollIntoView(container, activeNode);
19758
+ }
19759
+ });
19760
+ };
19761
+ const handleKeyDown = (e) => {
19762
+ const target = e.target;
19763
+ const { code } = e;
19764
+ switch (code) {
19765
+ case EVENT_CODE.up:
19766
+ case EVENT_CODE.down: {
19767
+ e.preventDefault();
19768
+ const distance = code === EVENT_CODE.up ? -1 : 1;
19769
+ focusNode(getSibling(target, distance, `.${ns.b("node")}[tabindex="-1"]`));
19770
+ break;
19771
+ }
19772
+ case EVENT_CODE.left: {
19773
+ e.preventDefault();
19774
+ const preMenu = menuList.value[getMenuIndex(target) - 1];
19775
+ const expandedNode = preMenu == null ? void 0 : preMenu.$el.querySelector(`.${ns.b("node")}[aria-expanded="true"]`);
19776
+ focusNode(expandedNode);
19777
+ break;
19778
+ }
19779
+ case EVENT_CODE.right: {
19780
+ e.preventDefault();
19781
+ const nextMenu = menuList.value[getMenuIndex(target) + 1];
19782
+ const firstNode = nextMenu == null ? void 0 : nextMenu.$el.querySelector(`.${ns.b("node")}[tabindex="-1"]`);
19783
+ focusNode(firstNode);
19784
+ break;
19785
+ }
19786
+ case EVENT_CODE.enter:
19787
+ case EVENT_CODE.numpadEnter:
19788
+ checkNode(target);
19789
+ break;
19790
+ }
19791
+ };
19792
+ vue.provide(CASCADER_PANEL_INJECTION_KEY, vue.reactive({
19793
+ config,
19794
+ expandingNode,
19795
+ checkedNodes,
19796
+ isHoverMenu,
19797
+ initialLoaded,
19798
+ renderLabelFn,
19799
+ lazyLoad,
19800
+ expandNode,
19801
+ handleCheckChange
19802
+ }));
19803
+ vue.watch([config, () => props.options], initStore, {
19804
+ deep: true,
19805
+ immediate: true
19806
+ });
19807
+ vue.watch(() => props.modelValue, () => {
19808
+ manualChecked = false;
19809
+ syncCheckedValue();
19810
+ }, {
19811
+ deep: true
19812
+ });
19813
+ vue.watch(() => checkedValue.value, (val) => {
19814
+ if (!isEqual$1(val, props.modelValue)) {
19815
+ emit(UPDATE_MODEL_EVENT, val);
19816
+ emit(CHANGE_EVENT, val);
19817
+ }
19818
+ });
19819
+ vue.onBeforeUpdate(() => menuList.value = []);
19820
+ vue.onMounted(() => !isEmpty(props.modelValue) && syncCheckedValue());
19821
+ return {
19822
+ ns,
19823
+ menuList,
19824
+ menus,
19825
+ checkedNodes,
19826
+ handleKeyDown,
19827
+ handleCheckChange,
19828
+ getFlattedNodes,
19829
+ getCheckedNodes,
19830
+ clearCheckedNodes,
19831
+ calculateCheckedValue,
19832
+ scrollToExpandingNode
19833
+ };
19834
+ }
19835
+ });
19836
+ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
19837
+ const _component_el_cascader_menu = vue.resolveComponent("el-cascader-menu");
19838
+ return vue.openBlock(), vue.createElementBlock("div", {
19839
+ class: vue.normalizeClass([_ctx.ns.b("panel"), _ctx.ns.is("bordered", _ctx.border)]),
19840
+ onKeydown: _ctx.handleKeyDown
19841
+ }, [
19842
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menus, (menu, index) => {
19843
+ return vue.openBlock(), vue.createBlock(_component_el_cascader_menu, {
19844
+ key: index,
19845
+ ref_for: true,
19846
+ ref: (item) => _ctx.menuList[index] = item,
19847
+ index,
19848
+ nodes: [...menu]
19849
+ }, {
19850
+ empty: vue.withCtx(() => [
19851
+ vue.renderSlot(_ctx.$slots, "empty")
19852
+ ]),
19853
+ _: 2
19854
+ }, 1032, ["index", "nodes"]);
19855
+ }), 128))
19856
+ ], 42, ["onKeydown"]);
19857
+ }
19858
+ var CascaderPanel = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$9], ["__file", "index.vue"]]);
19859
+
19860
+ const ElCascaderPanel = withInstall(CascaderPanel);
19861
+
19862
+ const tagProps = buildProps({
19863
+ type: {
19864
+ type: String,
19865
+ values: ["primary", "success", "info", "warning", "danger"],
19866
+ default: "primary"
19867
+ },
19868
+ closable: Boolean,
19869
+ disableTransitions: Boolean,
19870
+ hit: Boolean,
19871
+ color: String,
19872
+ size: {
19873
+ type: String,
19874
+ values: componentSizes
19875
+ },
19876
+ effect: {
19877
+ type: String,
19878
+ values: ["dark", "light", "plain"],
19879
+ default: "light"
19880
+ },
19881
+ round: Boolean
19882
+ });
19883
+ const tagEmits = {
19884
+ close: (evt) => evt instanceof MouseEvent,
19885
+ click: (evt) => evt instanceof MouseEvent
19886
+ };
19887
+
19888
+ const __default__$j = vue.defineComponent({
19889
+ name: "ElTag"
19890
+ });
19891
+ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
19892
+ ...__default__$j,
19893
+ props: tagProps,
19894
+ emits: tagEmits,
19895
+ setup(__props, { emit }) {
19896
+ const props = __props;
19897
+ const tagSize = useFormSize();
19898
+ const ns = useNamespace("tag");
19899
+ const containerKls = vue.computed(() => {
19900
+ const { type, hit, effect, closable, round } = props;
19901
+ return [
19902
+ ns.b(),
19903
+ ns.is("closable", closable),
19904
+ ns.m(type || "primary"),
19905
+ ns.m(tagSize.value),
19906
+ ns.m(effect),
19907
+ ns.is("hit", hit),
19908
+ ns.is("round", round)
19909
+ ];
19910
+ });
19911
+ const handleClose = (event) => {
19912
+ emit("close", event);
19913
+ };
19914
+ const handleClick = (event) => {
19915
+ emit("click", event);
19916
+ };
19917
+ const handleVNodeMounted = (vnode) => {
19918
+ var _a, _b, _c;
19919
+ if ((_c = (_b = (_a = vnode == null ? void 0 : vnode.component) == null ? void 0 : _a.subTree) == null ? void 0 : _b.component) == null ? void 0 : _c.bum) {
19920
+ vnode.component.subTree.component.bum = null;
19921
+ }
19922
+ };
19923
+ return (_ctx, _cache) => {
19924
+ return _ctx.disableTransitions ? (vue.openBlock(), vue.createElementBlock("span", {
19925
+ key: 0,
19926
+ class: vue.normalizeClass(vue.unref(containerKls)),
19927
+ style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
19928
+ onClick: handleClick
19929
+ }, [
19930
+ vue.createElementVNode("span", {
19931
+ class: vue.normalizeClass(vue.unref(ns).e("content"))
19932
+ }, [
19933
+ vue.renderSlot(_ctx.$slots, "default")
19934
+ ], 2),
19935
+ _ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
19936
+ key: 0,
19937
+ class: vue.normalizeClass(vue.unref(ns).e("close")),
18136
19938
  onClick: vue.withModifiers(handleClose, ["stop"])
18137
19939
  }, {
18138
19940
  default: vue.withCtx(() => [
@@ -18174,9 +19976,82 @@
18174
19976
  };
18175
19977
  }
18176
19978
  });
18177
- var Tag = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "tag.vue"]]);
18178
-
18179
- const ElTag = withInstall(Tag);
19979
+ var Tag = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "tag.vue"]]);
19980
+
19981
+ const ElTag = withInstall(Tag);
19982
+
19983
+ const cascaderProps$1 = buildProps({
19984
+ ...CommonProps,
19985
+ size: useSizeProp,
19986
+ placeholder: String,
19987
+ disabled: Boolean,
19988
+ clearable: Boolean,
19989
+ filterable: Boolean,
19990
+ filterMethod: {
19991
+ type: definePropType(Function),
19992
+ default: (node, keyword) => node.text.includes(keyword)
19993
+ },
19994
+ separator: {
19995
+ type: String,
19996
+ default: " / "
19997
+ },
19998
+ showAllLevels: {
19999
+ type: Boolean,
20000
+ default: true
20001
+ },
20002
+ collapseTags: Boolean,
20003
+ maxCollapseTags: {
20004
+ type: Number,
20005
+ default: 1
20006
+ },
20007
+ collapseTagsTooltip: {
20008
+ type: Boolean,
20009
+ default: false
20010
+ },
20011
+ debounce: {
20012
+ type: Number,
20013
+ default: 300
20014
+ },
20015
+ beforeFilter: {
20016
+ type: definePropType(Function),
20017
+ default: () => true
20018
+ },
20019
+ placement: {
20020
+ type: definePropType(String),
20021
+ values: Ee,
20022
+ default: "bottom-start"
20023
+ },
20024
+ fallbackPlacements: {
20025
+ type: definePropType(Array),
20026
+ default: ["bottom-start", "bottom", "top-start", "top", "right", "left"]
20027
+ },
20028
+ popperClass: {
20029
+ type: String,
20030
+ default: ""
20031
+ },
20032
+ teleported: useTooltipContentProps.teleported,
20033
+ tagType: { ...tagProps.type, default: "info" },
20034
+ tagEffect: { ...tagProps.effect, default: "light" },
20035
+ validateEvent: {
20036
+ type: Boolean,
20037
+ default: true
20038
+ },
20039
+ persistent: {
20040
+ type: Boolean,
20041
+ default: true
20042
+ },
20043
+ ...useEmptyValuesProps
20044
+ });
20045
+ const cascaderEmits$1 = {
20046
+ [UPDATE_MODEL_EVENT]: (_) => true,
20047
+ [CHANGE_EVENT]: (_) => true,
20048
+ focus: (evt) => evt instanceof FocusEvent,
20049
+ blur: (evt) => evt instanceof FocusEvent,
20050
+ clear: () => true,
20051
+ visibleChange: (val) => isBoolean(val),
20052
+ expandChange: (val) => !!val,
20053
+ removeTag: (val) => !!val
20054
+ };
18180
20055
 
18181
20056
  const nodeList$1 = /* @__PURE__ */ new Map();
18182
20057
  if (isClient) {
@@ -18247,6 +20122,613 @@
18247
20122
  }
18248
20123
  };
18249
20124
 
20125
+ const COMPONENT_NAME$1 = "ElCascader";
20126
+ const __default__$i = vue.defineComponent({
20127
+ name: COMPONENT_NAME$1
20128
+ });
20129
+ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
20130
+ ...__default__$i,
20131
+ props: cascaderProps$1,
20132
+ emits: cascaderEmits$1,
20133
+ setup(__props, { expose, emit }) {
20134
+ const props = __props;
20135
+ const popperOptions = {
20136
+ modifiers: [
20137
+ {
20138
+ name: "arrowPosition",
20139
+ enabled: true,
20140
+ phase: "main",
20141
+ fn: ({ state }) => {
20142
+ const { modifiersData, placement } = state;
20143
+ if (["right", "left", "bottom", "top"].includes(placement))
20144
+ return;
20145
+ modifiersData.arrow.x = 35;
20146
+ },
20147
+ requires: ["arrow"]
20148
+ }
20149
+ ]
20150
+ };
20151
+ const attrs = vue.useAttrs();
20152
+ let inputInitialHeight = 0;
20153
+ let pressDeleteCount = 0;
20154
+ const nsCascader = useNamespace("cascader");
20155
+ const nsInput = useNamespace("input");
20156
+ const { t } = useLocale();
20157
+ const { form, formItem } = useFormItem();
20158
+ const { valueOnClear } = useEmptyValues(props);
20159
+ const { isComposing, handleComposition } = useComposition({
20160
+ afterComposition(event) {
20161
+ var _a;
20162
+ const text = (_a = event.target) == null ? void 0 : _a.value;
20163
+ handleInput(text);
20164
+ }
20165
+ });
20166
+ const tooltipRef = vue.ref(null);
20167
+ const input = vue.ref(null);
20168
+ const tagWrapper = vue.ref(null);
20169
+ const cascaderPanelRef = vue.ref(null);
20170
+ const suggestionPanel = vue.ref(null);
20171
+ const popperVisible = vue.ref(false);
20172
+ const inputHover = vue.ref(false);
20173
+ const filtering = vue.ref(false);
20174
+ const filterFocus = vue.ref(false);
20175
+ const inputValue = vue.ref("");
20176
+ const searchInputValue = vue.ref("");
20177
+ const presentTags = vue.ref([]);
20178
+ const allPresentTags = vue.ref([]);
20179
+ const suggestions = vue.ref([]);
20180
+ const cascaderStyle = vue.computed(() => {
20181
+ return attrs.style;
20182
+ });
20183
+ const isDisabled = vue.computed(() => props.disabled || (form == null ? void 0 : form.disabled));
20184
+ const inputPlaceholder = vue.computed(() => props.placeholder || t("el.cascader.placeholder"));
20185
+ const currentPlaceholder = vue.computed(() => searchInputValue.value || presentTags.value.length > 0 || isComposing.value ? "" : inputPlaceholder.value);
20186
+ const realSize = useFormSize();
20187
+ const tagSize = vue.computed(() => realSize.value === "small" ? "small" : "default");
20188
+ const multiple = vue.computed(() => !!props.props.multiple);
20189
+ const readonly = vue.computed(() => !props.filterable || multiple.value);
20190
+ const searchKeyword = vue.computed(() => multiple.value ? searchInputValue.value : inputValue.value);
20191
+ const checkedNodes = vue.computed(() => {
20192
+ var _a;
20193
+ return ((_a = cascaderPanelRef.value) == null ? void 0 : _a.checkedNodes) || [];
20194
+ });
20195
+ const clearBtnVisible = vue.computed(() => {
20196
+ if (!props.clearable || isDisabled.value || filtering.value || !inputHover.value)
20197
+ return false;
20198
+ return !!checkedNodes.value.length;
20199
+ });
20200
+ const presentText = vue.computed(() => {
20201
+ const { showAllLevels, separator } = props;
20202
+ const nodes = checkedNodes.value;
20203
+ return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
20204
+ });
20205
+ const validateState = vue.computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
20206
+ const checkedValue = vue.computed({
20207
+ get() {
20208
+ return cloneDeep(props.modelValue);
20209
+ },
20210
+ set(val) {
20211
+ const value = val != null ? val : valueOnClear.value;
20212
+ emit(UPDATE_MODEL_EVENT, value);
20213
+ emit(CHANGE_EVENT, value);
20214
+ if (props.validateEvent) {
20215
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn());
20216
+ }
20217
+ }
20218
+ });
20219
+ const cascaderKls = vue.computed(() => {
20220
+ return [
20221
+ nsCascader.b(),
20222
+ nsCascader.m(realSize.value),
20223
+ nsCascader.is("disabled", isDisabled.value),
20224
+ attrs.class
20225
+ ];
20226
+ });
20227
+ const cascaderIconKls = vue.computed(() => {
20228
+ return [
20229
+ nsInput.e("icon"),
20230
+ "icon-arrow-down",
20231
+ nsCascader.is("reverse", popperVisible.value)
20232
+ ];
20233
+ });
20234
+ const inputClass = vue.computed(() => {
20235
+ return nsCascader.is("focus", popperVisible.value || filterFocus.value);
20236
+ });
20237
+ const contentRef = vue.computed(() => {
20238
+ var _a, _b;
20239
+ return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
20240
+ });
20241
+ const togglePopperVisible = (visible) => {
20242
+ var _a, _b, _c;
20243
+ if (isDisabled.value)
20244
+ return;
20245
+ visible = visible != null ? visible : !popperVisible.value;
20246
+ if (visible !== popperVisible.value) {
20247
+ popperVisible.value = visible;
20248
+ (_b = (_a = input.value) == null ? void 0 : _a.input) == null ? void 0 : _b.setAttribute("aria-expanded", `${visible}`);
20249
+ if (visible) {
20250
+ updatePopperPosition();
20251
+ vue.nextTick((_c = cascaderPanelRef.value) == null ? void 0 : _c.scrollToExpandingNode);
20252
+ } else if (props.filterable) {
20253
+ syncPresentTextValue();
20254
+ }
20255
+ emit("visibleChange", visible);
20256
+ }
20257
+ };
20258
+ const updatePopperPosition = () => {
20259
+ vue.nextTick(() => {
20260
+ var _a;
20261
+ (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper();
20262
+ });
20263
+ };
20264
+ const hideSuggestionPanel = () => {
20265
+ filtering.value = false;
20266
+ };
20267
+ const genTag = (node) => {
20268
+ const { showAllLevels, separator } = props;
20269
+ return {
20270
+ node,
20271
+ key: node.uid,
20272
+ text: node.calcText(showAllLevels, separator),
20273
+ hitState: false,
20274
+ closable: !isDisabled.value && !node.isDisabled,
20275
+ isCollapseTag: false
20276
+ };
20277
+ };
20278
+ const deleteTag = (tag) => {
20279
+ var _a;
20280
+ const node = tag.node;
20281
+ node.doCheck(false);
20282
+ (_a = cascaderPanelRef.value) == null ? void 0 : _a.calculateCheckedValue();
20283
+ emit("removeTag", node.valueByOption);
20284
+ };
20285
+ const calculatePresentTags = () => {
20286
+ if (!multiple.value)
20287
+ return;
20288
+ const nodes = checkedNodes.value;
20289
+ const tags = [];
20290
+ const allTags = [];
20291
+ nodes.forEach((node) => allTags.push(genTag(node)));
20292
+ allPresentTags.value = allTags;
20293
+ if (nodes.length) {
20294
+ nodes.slice(0, props.maxCollapseTags).forEach((node) => tags.push(genTag(node)));
20295
+ const rest = nodes.slice(props.maxCollapseTags);
20296
+ const restCount = rest.length;
20297
+ if (restCount) {
20298
+ if (props.collapseTags) {
20299
+ tags.push({
20300
+ key: -1,
20301
+ text: `+ ${restCount}`,
20302
+ closable: false,
20303
+ isCollapseTag: true
20304
+ });
20305
+ } else {
20306
+ rest.forEach((node) => tags.push(genTag(node)));
20307
+ }
20308
+ }
20309
+ }
20310
+ presentTags.value = tags;
20311
+ };
20312
+ const calculateSuggestions = () => {
20313
+ var _a, _b;
20314
+ const { filterMethod, showAllLevels, separator } = props;
20315
+ const res = (_b = (_a = cascaderPanelRef.value) == null ? void 0 : _a.getFlattedNodes(!props.props.checkStrictly)) == null ? void 0 : _b.filter((node) => {
20316
+ if (node.isDisabled)
20317
+ return false;
20318
+ node.calcText(showAllLevels, separator);
20319
+ return filterMethod(node, searchKeyword.value);
20320
+ });
20321
+ if (multiple.value) {
20322
+ presentTags.value.forEach((tag) => {
20323
+ tag.hitState = false;
20324
+ });
20325
+ allPresentTags.value.forEach((tag) => {
20326
+ tag.hitState = false;
20327
+ });
20328
+ }
20329
+ filtering.value = true;
20330
+ suggestions.value = res;
20331
+ updatePopperPosition();
20332
+ };
20333
+ const focusFirstNode = () => {
20334
+ var _a;
20335
+ let firstNode;
20336
+ if (filtering.value && suggestionPanel.value) {
20337
+ firstNode = suggestionPanel.value.$el.querySelector(`.${nsCascader.e("suggestion-item")}`);
20338
+ } else {
20339
+ firstNode = (_a = cascaderPanelRef.value) == null ? void 0 : _a.$el.querySelector(`.${nsCascader.b("node")}[tabindex="-1"]`);
20340
+ }
20341
+ if (firstNode) {
20342
+ firstNode.focus();
20343
+ !filtering.value && firstNode.click();
20344
+ }
20345
+ };
20346
+ const updateStyle = () => {
20347
+ var _a, _b;
20348
+ const inputInner = (_a = input.value) == null ? void 0 : _a.input;
20349
+ const tagWrapperEl = tagWrapper.value;
20350
+ const suggestionPanelEl = (_b = suggestionPanel.value) == null ? void 0 : _b.$el;
20351
+ if (!isClient || !inputInner)
20352
+ return;
20353
+ if (suggestionPanelEl) {
20354
+ const suggestionList = suggestionPanelEl.querySelector(`.${nsCascader.e("suggestion-list")}`);
20355
+ suggestionList.style.minWidth = `${inputInner.offsetWidth}px`;
20356
+ }
20357
+ if (tagWrapperEl) {
20358
+ const { offsetHeight } = tagWrapperEl;
20359
+ const height = presentTags.value.length > 0 ? `${Math.max(offsetHeight, inputInitialHeight) - 2}px` : `${inputInitialHeight}px`;
20360
+ inputInner.style.height = height;
20361
+ updatePopperPosition();
20362
+ }
20363
+ };
20364
+ const getCheckedNodes = (leafOnly) => {
20365
+ var _a;
20366
+ return (_a = cascaderPanelRef.value) == null ? void 0 : _a.getCheckedNodes(leafOnly);
20367
+ };
20368
+ const handleExpandChange = (value) => {
20369
+ updatePopperPosition();
20370
+ emit("expandChange", value);
20371
+ };
20372
+ const handleKeyDown = (e) => {
20373
+ if (isComposing.value)
20374
+ return;
20375
+ switch (e.code) {
20376
+ case EVENT_CODE.enter:
20377
+ case EVENT_CODE.numpadEnter:
20378
+ togglePopperVisible();
20379
+ break;
20380
+ case EVENT_CODE.down:
20381
+ togglePopperVisible(true);
20382
+ vue.nextTick(focusFirstNode);
20383
+ e.preventDefault();
20384
+ break;
20385
+ case EVENT_CODE.esc:
20386
+ if (popperVisible.value === true) {
20387
+ e.preventDefault();
20388
+ e.stopPropagation();
20389
+ togglePopperVisible(false);
20390
+ }
20391
+ break;
20392
+ case EVENT_CODE.tab:
20393
+ togglePopperVisible(false);
20394
+ break;
20395
+ }
20396
+ };
20397
+ const handleClear = () => {
20398
+ var _a;
20399
+ (_a = cascaderPanelRef.value) == null ? void 0 : _a.clearCheckedNodes();
20400
+ if (!popperVisible.value && props.filterable) {
20401
+ syncPresentTextValue();
20402
+ }
20403
+ togglePopperVisible(false);
20404
+ emit("clear");
20405
+ };
20406
+ const syncPresentTextValue = () => {
20407
+ const { value } = presentText;
20408
+ inputValue.value = value;
20409
+ searchInputValue.value = value;
20410
+ };
20411
+ const handleSuggestionClick = (node) => {
20412
+ var _a, _b;
20413
+ const { checked } = node;
20414
+ if (multiple.value) {
20415
+ (_a = cascaderPanelRef.value) == null ? void 0 : _a.handleCheckChange(node, !checked, false);
20416
+ } else {
20417
+ !checked && ((_b = cascaderPanelRef.value) == null ? void 0 : _b.handleCheckChange(node, true, false));
20418
+ togglePopperVisible(false);
20419
+ }
20420
+ };
20421
+ const handleSuggestionKeyDown = (e) => {
20422
+ const target = e.target;
20423
+ const { code } = e;
20424
+ switch (code) {
20425
+ case EVENT_CODE.up:
20426
+ case EVENT_CODE.down: {
20427
+ const distance = code === EVENT_CODE.up ? -1 : 1;
20428
+ focusNode(getSibling(target, distance, `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`));
20429
+ break;
20430
+ }
20431
+ case EVENT_CODE.enter:
20432
+ case EVENT_CODE.numpadEnter:
20433
+ target.click();
20434
+ break;
20435
+ }
20436
+ };
20437
+ const handleDelete = () => {
20438
+ const tags = presentTags.value;
20439
+ const lastTag = tags[tags.length - 1];
20440
+ pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1;
20441
+ if (!lastTag || !pressDeleteCount || props.collapseTags && tags.length > 1)
20442
+ return;
20443
+ if (lastTag.hitState) {
20444
+ deleteTag(lastTag);
20445
+ } else {
20446
+ lastTag.hitState = true;
20447
+ }
20448
+ };
20449
+ const handleFocus = (e) => {
20450
+ const el = e.target;
20451
+ const name = nsCascader.e("search-input");
20452
+ if (el.className === name) {
20453
+ filterFocus.value = true;
20454
+ }
20455
+ emit("focus", e);
20456
+ };
20457
+ const handleBlur = (e) => {
20458
+ filterFocus.value = false;
20459
+ emit("blur", e);
20460
+ };
20461
+ const handleFilter = debounce(() => {
20462
+ const { value } = searchKeyword;
20463
+ if (!value)
20464
+ return;
20465
+ const passed = props.beforeFilter(value);
20466
+ if (isPromise(passed)) {
20467
+ passed.then(calculateSuggestions).catch(() => {
20468
+ });
20469
+ } else if (passed !== false) {
20470
+ calculateSuggestions();
20471
+ } else {
20472
+ hideSuggestionPanel();
20473
+ }
20474
+ }, props.debounce);
20475
+ const handleInput = (val, e) => {
20476
+ !popperVisible.value && togglePopperVisible(true);
20477
+ if (e == null ? void 0 : e.isComposing)
20478
+ return;
20479
+ val ? handleFilter() : hideSuggestionPanel();
20480
+ };
20481
+ const getInputInnerHeight = (inputInner) => Number.parseFloat(useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2;
20482
+ vue.watch(filtering, updatePopperPosition);
20483
+ vue.watch([checkedNodes, isDisabled, () => props.collapseTags], calculatePresentTags);
20484
+ vue.watch(presentTags, () => {
20485
+ vue.nextTick(() => updateStyle());
20486
+ });
20487
+ vue.watch(realSize, async () => {
20488
+ await vue.nextTick();
20489
+ const inputInner = input.value.input;
20490
+ inputInitialHeight = getInputInnerHeight(inputInner) || inputInitialHeight;
20491
+ updateStyle();
20492
+ });
20493
+ vue.watch(presentText, syncPresentTextValue, { immediate: true });
20494
+ vue.onMounted(() => {
20495
+ const inputInner = input.value.input;
20496
+ const inputInnerHeight = getInputInnerHeight(inputInner);
20497
+ inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
20498
+ useResizeObserver(inputInner, updateStyle);
20499
+ });
20500
+ expose({
20501
+ getCheckedNodes,
20502
+ cascaderPanelRef,
20503
+ togglePopperVisible,
20504
+ contentRef,
20505
+ presentText
20506
+ });
20507
+ return (_ctx, _cache) => {
20508
+ return vue.openBlock(), vue.createBlock(vue.unref(ElTooltip), {
20509
+ ref_key: "tooltipRef",
20510
+ ref: tooltipRef,
20511
+ visible: popperVisible.value,
20512
+ teleported: _ctx.teleported,
20513
+ "popper-class": [vue.unref(nsCascader).e("dropdown"), _ctx.popperClass],
20514
+ "popper-options": popperOptions,
20515
+ "fallback-placements": _ctx.fallbackPlacements,
20516
+ "stop-popper-mouse-event": false,
20517
+ "gpu-acceleration": false,
20518
+ placement: _ctx.placement,
20519
+ transition: `${vue.unref(nsCascader).namespace.value}-zoom-in-top`,
20520
+ effect: "light",
20521
+ pure: "",
20522
+ persistent: _ctx.persistent,
20523
+ onHide: hideSuggestionPanel
20524
+ }, {
20525
+ default: vue.withCtx(() => [
20526
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
20527
+ class: vue.normalizeClass(vue.unref(cascaderKls)),
20528
+ style: vue.normalizeStyle(vue.unref(cascaderStyle)),
20529
+ onClick: () => togglePopperVisible(vue.unref(readonly) ? void 0 : true),
20530
+ onKeydown: handleKeyDown,
20531
+ onMouseenter: ($event) => inputHover.value = true,
20532
+ onMouseleave: ($event) => inputHover.value = false
20533
+ }, [
20534
+ vue.createVNode(vue.unref(ElInput), {
20535
+ ref_key: "input",
20536
+ ref: input,
20537
+ modelValue: inputValue.value,
20538
+ "onUpdate:modelValue": ($event) => inputValue.value = $event,
20539
+ placeholder: vue.unref(currentPlaceholder),
20540
+ readonly: vue.unref(readonly),
20541
+ disabled: vue.unref(isDisabled),
20542
+ "validate-event": false,
20543
+ size: vue.unref(realSize),
20544
+ class: vue.normalizeClass(vue.unref(inputClass)),
20545
+ tabindex: vue.unref(multiple) && _ctx.filterable && !vue.unref(isDisabled) ? -1 : void 0,
20546
+ onCompositionstart: vue.unref(handleComposition),
20547
+ onCompositionupdate: vue.unref(handleComposition),
20548
+ onCompositionend: vue.unref(handleComposition),
20549
+ onFocus: handleFocus,
20550
+ onBlur: handleBlur,
20551
+ onInput: handleInput
20552
+ }, {
20553
+ suffix: vue.withCtx(() => [
20554
+ vue.unref(clearBtnVisible) ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
20555
+ key: "clear",
20556
+ class: vue.normalizeClass([vue.unref(nsInput).e("icon"), "icon-circle-close"]),
20557
+ onClick: vue.withModifiers(handleClear, ["stop"])
20558
+ }, {
20559
+ default: vue.withCtx(() => [
20560
+ vue.createVNode(vue.unref(circle_close_default))
20561
+ ]),
20562
+ _: 1
20563
+ }, 8, ["class", "onClick"])) : (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
20564
+ key: "arrow-down",
20565
+ class: vue.normalizeClass(vue.unref(cascaderIconKls)),
20566
+ onClick: vue.withModifiers(($event) => togglePopperVisible(), ["stop"])
20567
+ }, {
20568
+ default: vue.withCtx(() => [
20569
+ vue.createVNode(vue.unref(arrow_down_default))
20570
+ ]),
20571
+ _: 1
20572
+ }, 8, ["class", "onClick"]))
20573
+ ]),
20574
+ _: 1
20575
+ }, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
20576
+ vue.unref(multiple) ? (vue.openBlock(), vue.createElementBlock("div", {
20577
+ key: 0,
20578
+ ref_key: "tagWrapper",
20579
+ ref: tagWrapper,
20580
+ class: vue.normalizeClass([
20581
+ vue.unref(nsCascader).e("tags"),
20582
+ vue.unref(nsCascader).is("validate", Boolean(vue.unref(validateState)))
20583
+ ])
20584
+ }, [
20585
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(presentTags.value, (tag) => {
20586
+ return vue.openBlock(), vue.createBlock(vue.unref(ElTag), {
20587
+ key: tag.key,
20588
+ type: _ctx.tagType,
20589
+ size: vue.unref(tagSize),
20590
+ effect: _ctx.tagEffect,
20591
+ hit: tag.hitState,
20592
+ closable: tag.closable,
20593
+ "disable-transitions": "",
20594
+ onClose: ($event) => deleteTag(tag)
20595
+ }, {
20596
+ default: vue.withCtx(() => [
20597
+ tag.isCollapseTag === false ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, vue.toDisplayString(tag.text), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(ElTooltip), {
20598
+ key: 1,
20599
+ disabled: popperVisible.value || !_ctx.collapseTagsTooltip,
20600
+ "fallback-placements": ["bottom", "top", "right", "left"],
20601
+ placement: "bottom",
20602
+ effect: "light"
20603
+ }, {
20604
+ default: vue.withCtx(() => [
20605
+ vue.createElementVNode("span", null, vue.toDisplayString(tag.text), 1)
20606
+ ]),
20607
+ content: vue.withCtx(() => [
20608
+ vue.createElementVNode("div", {
20609
+ class: vue.normalizeClass(vue.unref(nsCascader).e("collapse-tags"))
20610
+ }, [
20611
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(allPresentTags.value.slice(_ctx.maxCollapseTags), (tag2, idx) => {
20612
+ return vue.openBlock(), vue.createElementBlock("div", {
20613
+ key: idx,
20614
+ class: vue.normalizeClass(vue.unref(nsCascader).e("collapse-tag"))
20615
+ }, [
20616
+ (vue.openBlock(), vue.createBlock(vue.unref(ElTag), {
20617
+ key: tag2.key,
20618
+ class: "in-tooltip",
20619
+ type: _ctx.tagType,
20620
+ size: vue.unref(tagSize),
20621
+ effect: _ctx.tagEffect,
20622
+ hit: tag2.hitState,
20623
+ closable: tag2.closable,
20624
+ "disable-transitions": "",
20625
+ onClose: ($event) => deleteTag(tag2)
20626
+ }, {
20627
+ default: vue.withCtx(() => [
20628
+ vue.createElementVNode("span", null, vue.toDisplayString(tag2.text), 1)
20629
+ ]),
20630
+ _: 2
20631
+ }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))
20632
+ ], 2);
20633
+ }), 128))
20634
+ ], 2)
20635
+ ]),
20636
+ _: 2
20637
+ }, 1032, ["disabled"]))
20638
+ ]),
20639
+ _: 2
20640
+ }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]);
20641
+ }), 128)),
20642
+ _ctx.filterable && !vue.unref(isDisabled) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
20643
+ key: 0,
20644
+ "onUpdate:modelValue": ($event) => searchInputValue.value = $event,
20645
+ type: "text",
20646
+ class: vue.normalizeClass(vue.unref(nsCascader).e("search-input")),
20647
+ placeholder: vue.unref(presentText) ? "" : vue.unref(inputPlaceholder),
20648
+ onInput: (e) => handleInput(searchInputValue.value, e),
20649
+ onClick: vue.withModifiers(($event) => togglePopperVisible(true), ["stop"]),
20650
+ onKeydown: vue.withKeys(handleDelete, ["delete"]),
20651
+ onCompositionstart: vue.unref(handleComposition),
20652
+ onCompositionupdate: vue.unref(handleComposition),
20653
+ onCompositionend: vue.unref(handleComposition),
20654
+ onFocus: handleFocus,
20655
+ onBlur: handleBlur
20656
+ }, null, 42, ["onUpdate:modelValue", "placeholder", "onInput", "onClick", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend"])), [
20657
+ [vue.vModelText, searchInputValue.value]
20658
+ ]) : vue.createCommentVNode("v-if", true)
20659
+ ], 2)) : vue.createCommentVNode("v-if", true)
20660
+ ], 46, ["onClick", "onMouseenter", "onMouseleave"])), [
20661
+ [vue.unref(ClickOutside), () => togglePopperVisible(false), vue.unref(contentRef)]
20662
+ ])
20663
+ ]),
20664
+ content: vue.withCtx(() => [
20665
+ vue.withDirectives(vue.createVNode(vue.unref(ElCascaderPanel), {
20666
+ ref_key: "cascaderPanelRef",
20667
+ ref: cascaderPanelRef,
20668
+ modelValue: vue.unref(checkedValue),
20669
+ "onUpdate:modelValue": ($event) => vue.isRef(checkedValue) ? checkedValue.value = $event : null,
20670
+ options: _ctx.options,
20671
+ props: props.props,
20672
+ border: false,
20673
+ "render-label": _ctx.$slots.default,
20674
+ onExpandChange: handleExpandChange,
20675
+ onClose: ($event) => _ctx.$nextTick(() => togglePopperVisible(false))
20676
+ }, {
20677
+ empty: vue.withCtx(() => [
20678
+ vue.renderSlot(_ctx.$slots, "empty")
20679
+ ]),
20680
+ _: 3
20681
+ }, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "render-label", "onClose"]), [
20682
+ [vue.vShow, !filtering.value]
20683
+ ]),
20684
+ _ctx.filterable ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(ElScrollbar), {
20685
+ key: 0,
20686
+ ref_key: "suggestionPanel",
20687
+ ref: suggestionPanel,
20688
+ tag: "ul",
20689
+ class: vue.normalizeClass(vue.unref(nsCascader).e("suggestion-panel")),
20690
+ "view-class": vue.unref(nsCascader).e("suggestion-list"),
20691
+ onKeydown: handleSuggestionKeyDown
20692
+ }, {
20693
+ default: vue.withCtx(() => [
20694
+ suggestions.value.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(suggestions.value, (item) => {
20695
+ return vue.openBlock(), vue.createElementBlock("li", {
20696
+ key: item.uid,
20697
+ class: vue.normalizeClass([
20698
+ vue.unref(nsCascader).e("suggestion-item"),
20699
+ vue.unref(nsCascader).is("checked", item.checked)
20700
+ ]),
20701
+ tabindex: -1,
20702
+ onClick: ($event) => handleSuggestionClick(item)
20703
+ }, [
20704
+ vue.createElementVNode("span", null, vue.toDisplayString(item.text), 1),
20705
+ item.checked ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), { key: 0 }, {
20706
+ default: vue.withCtx(() => [
20707
+ vue.createVNode(vue.unref(check_default))
20708
+ ]),
20709
+ _: 1
20710
+ })) : vue.createCommentVNode("v-if", true)
20711
+ ], 10, ["onClick"]);
20712
+ }), 128)) : vue.renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
20713
+ vue.createElementVNode("li", {
20714
+ class: vue.normalizeClass(vue.unref(nsCascader).e("empty-text"))
20715
+ }, vue.toDisplayString(vue.unref(t)("el.cascader.noMatch")), 3)
20716
+ ])
20717
+ ]),
20718
+ _: 3
20719
+ }, 8, ["class", "view-class"])), [
20720
+ [vue.vShow, filtering.value]
20721
+ ]) : vue.createCommentVNode("v-if", true)
20722
+ ]),
20723
+ _: 3
20724
+ }, 8, ["visible", "teleported", "popper-class", "fallback-placements", "placement", "transition", "persistent"]);
20725
+ };
20726
+ }
20727
+ });
20728
+ var Cascader$1 = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "cascader.vue"]]);
20729
+
20730
+ const ElCascader = withInstall(Cascader$1);
20731
+
18250
20732
  const REPEAT_INTERVAL = 100;
18251
20733
  const REPEAT_DELAY = 600;
18252
20734
  const vRepeatClick = {
@@ -18283,22 +20765,22 @@
18283
20765
  }
18284
20766
  };
18285
20767
 
18286
- const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
20768
+ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
18287
20769
  inheritAttrs: false
18288
20770
  });
18289
20771
  function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
18290
20772
  return vue.renderSlot(_ctx.$slots, "default");
18291
20773
  }
18292
- var Collection = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$8], ["__file", "collection.vue"]]);
20774
+ var Collection = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$8], ["__file", "collection.vue"]]);
18293
20775
 
18294
- const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
20776
+ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
18295
20777
  name: "ElCollectionItem",
18296
20778
  inheritAttrs: false
18297
20779
  });
18298
20780
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
18299
20781
  return vue.renderSlot(_ctx.$slots, "default");
18300
20782
  }
18301
- var CollectionItem = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$7], ["__file", "collection-item.vue"]]);
20783
+ var CollectionItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$7], ["__file", "collection-item.vue"]]);
18302
20784
 
18303
20785
  const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
18304
20786
  const createCollectionWithScope = (name) => {
@@ -18444,12 +20926,6 @@
18444
20926
  buildProps({
18445
20927
  onKeydown: { type: definePropType(Function) }
18446
20928
  });
18447
- [
18448
- EVENT_CODE.down,
18449
- EVENT_CODE.pageDown,
18450
- EVENT_CODE.home
18451
- ];
18452
- [EVENT_CODE.up, EVENT_CODE.pageUp, EVENT_CODE.end];
18453
20929
  createCollectionWithScope("Dropdown");
18454
20930
 
18455
20931
  const inputNumberProps = buildProps({
@@ -18508,11 +20984,11 @@
18508
20984
  [UPDATE_MODEL_EVENT]: (val) => isNumber(val) || isNil(val)
18509
20985
  };
18510
20986
 
18511
- const __default__$f = vue.defineComponent({
20987
+ const __default__$h = vue.defineComponent({
18512
20988
  name: "ElInputNumber"
18513
20989
  });
18514
- const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
18515
- ...__default__$f,
20990
+ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
20991
+ ...__default__$h,
18516
20992
  props: inputNumberProps,
18517
20993
  emits: inputNumberEmits,
18518
20994
  setup(__props, { expose, emit }) {
@@ -18838,7 +21314,7 @@
18838
21314
  };
18839
21315
  }
18840
21316
  });
18841
- var InputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "input-number.vue"]]);
21317
+ var InputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "input-number.vue"]]);
18842
21318
 
18843
21319
  const ElInputNumber = withInstall(InputNumber);
18844
21320
 
@@ -18885,11 +21361,11 @@
18885
21361
  click: (evt) => evt instanceof MouseEvent
18886
21362
  };
18887
21363
 
18888
- const __default__$e = vue.defineComponent({
21364
+ const __default__$g = vue.defineComponent({
18889
21365
  name: "ElLink"
18890
21366
  });
18891
- const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
18892
- ...__default__$e,
21367
+ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
21368
+ ...__default__$g,
18893
21369
  props: linkProps,
18894
21370
  emits: linkEmits,
18895
21371
  setup(__props, { emit }) {
@@ -18929,7 +21405,7 @@
18929
21405
  };
18930
21406
  }
18931
21407
  });
18932
- var Link = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "link.vue"]]);
21408
+ var Link = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__file", "link.vue"]]);
18933
21409
 
18934
21410
  const ElLink = withInstall(Link);
18935
21411
 
@@ -18940,12 +21416,12 @@
18940
21416
  const select = vue.inject(selectKey);
18941
21417
  const selectGroup = vue.inject(selectGroupKey, { disabled: false });
18942
21418
  const itemSelected = vue.computed(() => {
18943
- return contains(castArray(select.props.modelValue), props.value);
21419
+ return contains(castArray$1(select.props.modelValue), props.value);
18944
21420
  });
18945
21421
  const limitReached = vue.computed(() => {
18946
21422
  var _a;
18947
21423
  if (select.props.multiple) {
18948
- const modelValue = castArray((_a = select.props.modelValue) != null ? _a : []);
21424
+ const modelValue = castArray$1((_a = select.props.modelValue) != null ? _a : []);
18949
21425
  return !itemSelected.value && modelValue.length >= select.props.multipleLimit && select.props.multipleLimit > 0;
18950
21426
  } else {
18951
21427
  return false;
@@ -19011,7 +21487,7 @@
19011
21487
  };
19012
21488
  }
19013
21489
 
19014
- const _sfc_main$l = vue.defineComponent({
21490
+ const _sfc_main$n = vue.defineComponent({
19015
21491
  name: "ElOption",
19016
21492
  componentName: "ElOption",
19017
21493
  props: {
@@ -19101,9 +21577,9 @@
19101
21577
  [vue.vShow, _ctx.visible]
19102
21578
  ]);
19103
21579
  }
19104
- var Option = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$6], ["__file", "option.vue"]]);
21580
+ var Option = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$6], ["__file", "option.vue"]]);
19105
21581
 
19106
- const _sfc_main$k = vue.defineComponent({
21582
+ const _sfc_main$m = vue.defineComponent({
19107
21583
  name: "ElSelectDropdown",
19108
21584
  componentName: "ElSelectDropdown",
19109
21585
  setup() {
@@ -19150,7 +21626,7 @@
19150
21626
  ], 2)) : vue.createCommentVNode("v-if", true)
19151
21627
  ], 6);
19152
21628
  }
19153
- var ElSelectMenu$1 = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$5], ["__file", "select-dropdown.vue"]]);
21629
+ var ElSelectMenu$1 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$5], ["__file", "select-dropdown.vue"]]);
19154
21630
 
19155
21631
  const useSelect$1 = (props, emit) => {
19156
21632
  const { t } = useLocale();
@@ -19290,7 +21766,7 @@
19290
21766
  });
19291
21767
  const shouldShowPlaceholder = vue.computed(() => {
19292
21768
  if (props.multiple && !isUndefined(props.modelValue)) {
19293
- return castArray(props.modelValue).length === 0 && !states.inputValue;
21769
+ return castArray$1(props.modelValue).length === 0 && !states.inputValue;
19294
21770
  }
19295
21771
  const value = isArray$1(props.modelValue) ? props.modelValue[0] : props.modelValue;
19296
21772
  return props.filterable || isUndefined(value) ? !states.inputValue : true;
@@ -19386,7 +21862,7 @@
19386
21862
  }
19387
21863
  const result = [];
19388
21864
  if (!isUndefined(props.modelValue)) {
19389
- castArray(props.modelValue).forEach((value) => {
21865
+ castArray$1(props.modelValue).forEach((value) => {
19390
21866
  result.push(getOption(value));
19391
21867
  });
19392
21868
  }
@@ -19467,7 +21943,7 @@
19467
21943
  if (e.code === EVENT_CODE.delete)
19468
21944
  return;
19469
21945
  if (e.target.value.length <= 0) {
19470
- const value = castArray(props.modelValue).slice();
21946
+ const value = castArray$1(props.modelValue).slice();
19471
21947
  const lastNotDisabledIndex = getLastNotDisabledIndex(value);
19472
21948
  if (lastNotDisabledIndex < 0)
19473
21949
  return;
@@ -19481,7 +21957,7 @@
19481
21957
  const deleteTag = (event, tag) => {
19482
21958
  const index = states.selected.indexOf(tag);
19483
21959
  if (index > -1 && !selectDisabled.value) {
19484
- const value = castArray(props.modelValue).slice();
21960
+ const value = castArray$1(props.modelValue).slice();
19485
21961
  value.splice(index, 1);
19486
21962
  emit(UPDATE_MODEL_EVENT, value);
19487
21963
  emitChange(value);
@@ -19509,7 +21985,7 @@
19509
21985
  const handleOptionSelect = (option) => {
19510
21986
  var _a;
19511
21987
  if (props.multiple) {
19512
- const value = castArray((_a = props.modelValue) != null ? _a : []).slice();
21988
+ const value = castArray$1((_a = props.modelValue) != null ? _a : []).slice();
19513
21989
  const optionIndex = getValueIndex(value, option);
19514
21990
  if (optionIndex > -1) {
19515
21991
  value.splice(optionIndex, 1);
@@ -19916,7 +22392,7 @@
19916
22392
  });
19917
22393
 
19918
22394
  const COMPONENT_NAME = "ElSelect";
19919
- const _sfc_main$j = vue.defineComponent({
22395
+ const _sfc_main$l = vue.defineComponent({
19920
22396
  name: COMPONENT_NAME,
19921
22397
  componentName: COMPONENT_NAME,
19922
22398
  components: {
@@ -20326,9 +22802,9 @@
20326
22802
  [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
20327
22803
  ]);
20328
22804
  }
20329
- var Select$1 = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$4], ["__file", "select.vue"]]);
22805
+ var Select$2 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$4], ["__file", "select.vue"]]);
20330
22806
 
20331
- const _sfc_main$i = vue.defineComponent({
22807
+ const _sfc_main$k = vue.defineComponent({
20332
22808
  name: "ElOptionGroup",
20333
22809
  componentName: "ElOptionGroup",
20334
22810
  props: {
@@ -20349,7 +22825,7 @@
20349
22825
  return ((_a = node.type) == null ? void 0 : _a.name) === "ElOption" && !!((_b = node.component) == null ? void 0 : _b.proxy);
20350
22826
  };
20351
22827
  const flattedChildren = (node) => {
20352
- const Nodes = castArray(node);
22828
+ const Nodes = castArray$1(node);
20353
22829
  const children2 = [];
20354
22830
  Nodes.forEach((child) => {
20355
22831
  var _a, _b;
@@ -20400,9 +22876,9 @@
20400
22876
  [vue.vShow, _ctx.visible]
20401
22877
  ]);
20402
22878
  }
20403
- var OptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$3], ["__file", "option-group.vue"]]);
22879
+ var OptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$3], ["__file", "option-group.vue"]]);
20404
22880
 
20405
- const ElSelect = withInstall(Select$1, {
22881
+ const ElSelect = withInstall(Select$2, {
20406
22882
  Option,
20407
22883
  OptionGroup
20408
22884
  });
@@ -20471,11 +22947,11 @@
20471
22947
  };
20472
22948
 
20473
22949
  const updateEventKeyRaw = `onUpdate:visible`;
20474
- const __default__$d = vue.defineComponent({
22950
+ const __default__$f = vue.defineComponent({
20475
22951
  name: "ElPopover"
20476
22952
  });
20477
- const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
20478
- ...__default__$d,
22953
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
22954
+ ...__default__$f,
20479
22955
  props: popoverProps,
20480
22956
  emits: popoverEmits,
20481
22957
  setup(__props, { expose, emit }) {
@@ -20574,7 +23050,7 @@
20574
23050
  };
20575
23051
  }
20576
23052
  });
20577
- var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "popover.vue"]]);
23053
+ var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__file", "popover.vue"]]);
20578
23054
 
20579
23055
  const attachEvents = (el, binding) => {
20580
23056
  const popperComponent = binding.arg || binding.value;
@@ -20598,7 +23074,7 @@
20598
23074
  directive: ElPopoverDirective
20599
23075
  });
20600
23076
 
20601
- const _sfc_main$g = vue.defineComponent({
23077
+ const _sfc_main$i = vue.defineComponent({
20602
23078
  props: {
20603
23079
  item: {
20604
23080
  type: Object,
@@ -20622,7 +23098,7 @@
20622
23098
  style: vue.normalizeStyle({ ..._ctx.style, lineHeight: `${_ctx.height}px` })
20623
23099
  }, vue.toDisplayString(_ctx.item.label), 7);
20624
23100
  }
20625
- var GroupItem = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$2], ["__file", "group-item.vue"]]);
23101
+ var GroupItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$2], ["__file", "group-item.vue"]]);
20626
23102
 
20627
23103
  function useOption(props, { emit }) {
20628
23104
  return {
@@ -20799,7 +23275,7 @@
20799
23275
  selected: Boolean,
20800
23276
  created: Boolean
20801
23277
  });
20802
- const selectEmits = {
23278
+ const selectEmits$1 = {
20803
23279
  [UPDATE_MODEL_EVENT]: (val) => true,
20804
23280
  [CHANGE_EVENT]: (val) => true,
20805
23281
  "remove-tag": (val) => true,
@@ -20815,7 +23291,7 @@
20815
23291
 
20816
23292
  const selectV2InjectionKey = Symbol("ElSelectV2Injection");
20817
23293
 
20818
- const _sfc_main$f = vue.defineComponent({
23294
+ const _sfc_main$h = vue.defineComponent({
20819
23295
  props: OptionProps,
20820
23296
  emits: optionEmits,
20821
23297
  setup(props, { emit }) {
@@ -20854,7 +23330,7 @@
20854
23330
  ])
20855
23331
  ], 46, ["aria-selected", "onMousemove", "onClick"]);
20856
23332
  }
20857
- var OptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$1], ["__file", "option-item.vue"]]);
23333
+ var OptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$1], ["__file", "option-item.vue"]]);
20858
23334
 
20859
23335
  var safeIsNaN = Number.isNaN || function ponyfill(value) {
20860
23336
  return typeof value === "number" && value !== value;
@@ -22868,7 +25344,7 @@
22868
25344
  };
22869
25345
  };
22870
25346
 
22871
- const _sfc_main$e = vue.defineComponent({
25347
+ const _sfc_main$g = vue.defineComponent({
22872
25348
  name: "ElSelectV2",
22873
25349
  components: {
22874
25350
  ElSelectMenu,
@@ -22878,7 +25354,7 @@
22878
25354
  },
22879
25355
  directives: { ClickOutside },
22880
25356
  props: SelectProps,
22881
- emits: selectEmits,
25357
+ emits: selectEmits$1,
22882
25358
  setup(props, { emit }) {
22883
25359
  const modelValue = vue.computed(() => {
22884
25360
  const { modelValue: rawModelValue, multiple } = props;
@@ -23255,9 +25731,9 @@
23255
25731
  [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
23256
25732
  ]);
23257
25733
  }
23258
- var Select = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render], ["__file", "select.vue"]]);
25734
+ var Select$1 = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render], ["__file", "select.vue"]]);
23259
25735
 
23260
- const ElSelectV2 = withInstall(Select);
25736
+ const ElSelectV2 = withInstall(Select$1);
23261
25737
 
23262
25738
  const _hoisted_1$b = ["onClick"];
23263
25739
  const _hoisted_2$9 = { class: "hzzt-dropdown-name" };
@@ -23266,11 +25742,11 @@
23266
25742
  const _hoisted_5$3 = ["onClick"];
23267
25743
  const _hoisted_6$3 = { class: "submenu" };
23268
25744
  const _hoisted_7$3 = ["onClick"];
23269
- const __default__$c = vue.defineComponent({
25745
+ const __default__$e = vue.defineComponent({
23270
25746
  name: "HzztDropDown"
23271
25747
  });
23272
- const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
23273
- ...__default__$c,
25748
+ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
25749
+ ...__default__$e,
23274
25750
  props: {
23275
25751
  options: {
23276
25752
  type: definePropType$1(Array),
@@ -23330,7 +25806,7 @@
23330
25806
  vue.createElementVNode("ul", _hoisted_4$5, [
23331
25807
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.options, (option, index) => {
23332
25808
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
23333
- vue.unref(isEmpty)(option[__props.props.children]) ? (vue.openBlock(), vue.createElementBlock("li", {
25809
+ vue.unref(isEmpty$1)(option[__props.props.children]) ? (vue.openBlock(), vue.createElementBlock("li", {
23334
25810
  key: index,
23335
25811
  class: vue.normalizeClass({
23336
25812
  "hzzt-dropdown-menu-item": true,
@@ -23379,7 +25855,7 @@
23379
25855
  };
23380
25856
  }
23381
25857
  });
23382
- var Dropdown = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__file", "index.vue"]]);
25858
+ var Dropdown = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["__file", "index.vue"]]);
23383
25859
 
23384
25860
  const HzztDropdown = withInstall$1(Dropdown);
23385
25861
 
@@ -23393,11 +25869,11 @@
23393
25869
  key: 0,
23394
25870
  class: "hzzt-collapse-text"
23395
25871
  };
23396
- const __default__$b = vue.defineComponent({
25872
+ const __default__$d = vue.defineComponent({
23397
25873
  name: "HzztCollapse"
23398
25874
  });
23399
- const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
23400
- ...__default__$b,
25875
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
25876
+ ...__default__$d,
23401
25877
  props: {
23402
25878
  defaultActive: {
23403
25879
  type: Boolean,
@@ -23443,11 +25919,11 @@
23443
25919
  };
23444
25920
  }
23445
25921
  });
23446
- var Collapse = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__file", "collapse.vue"]]);
25922
+ var Collapse = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__file", "collapse.vue"]]);
23447
25923
 
23448
25924
  const HzztCollapse = withInstall$1(Collapse);
23449
25925
 
23450
- const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
25926
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
23451
25927
  __name: "index",
23452
25928
  props: {
23453
25929
  name: {
@@ -23473,7 +25949,7 @@
23473
25949
  };
23474
25950
  }
23475
25951
  });
23476
- var HzztIcon$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["__file", "index.vue"]]);
25952
+ var HzztIcon$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__file", "index.vue"]]);
23477
25953
 
23478
25954
  const _hoisted_1$9 = { class: "hzzt-tab flex align-items-center justify-content-between wrap" };
23479
25955
  const _hoisted_2$7 = { class: "flex align-items-center" };
@@ -23485,11 +25961,11 @@
23485
25961
  class: "hzzt-tab-badge-count"
23486
25962
  };
23487
25963
  const _hoisted_7$1 = { class: "flex wrap" };
23488
- const __default__$a = vue.defineComponent({
25964
+ const __default__$c = vue.defineComponent({
23489
25965
  name: "HzztTab"
23490
25966
  });
23491
- const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
23492
- ...__default__$a,
25967
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
25968
+ ...__default__$c,
23493
25969
  props: {
23494
25970
  tabList: {
23495
25971
  type: Array,
@@ -23560,7 +26036,7 @@
23560
26036
  };
23561
26037
  }
23562
26038
  });
23563
- var Tab = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__file", "index.vue"]]);
26039
+ var Tab = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__file", "index.vue"]]);
23564
26040
 
23565
26041
  const HzztTab = withInstall$1(Tab);
23566
26042
 
@@ -23580,11 +26056,11 @@
23580
26056
  const _hoisted_2$6 = { class: "flex align-items-center font-12 hzzt-pagination-total" };
23581
26057
  const _hoisted_3$3 = { class: "flex align-items-center hzzt-pagination-page font-14" };
23582
26058
  const _hoisted_4$2 = { class: "flex" };
23583
- const __default__$9 = vue.defineComponent({
26059
+ const __default__$b = vue.defineComponent({
23584
26060
  name: "HzztPagination"
23585
26061
  });
23586
- const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
23587
- ...__default__$9,
26062
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
26063
+ ...__default__$b,
23588
26064
  props: {
23589
26065
  pagination: {
23590
26066
  type: Object,
@@ -23634,18 +26110,18 @@
23634
26110
  };
23635
26111
  }
23636
26112
  });
23637
- var Pagination = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__file", "index.vue"]]);
26113
+ var Pagination = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["__file", "index.vue"]]);
23638
26114
 
23639
26115
  const HzztPagination = withInstall$1(Pagination);
23640
26116
 
23641
26117
  const _hoisted_1$7 = { class: "flex align-content-center" };
23642
26118
  const _hoisted_2$5 = { style: { "max-width": "300px" } };
23643
26119
  const _hoisted_3$2 = { style: { "padding": "0", "margin": "0", "word-break": "break-all", "white-space": "pre-wrap" } };
23644
- const __default__$8 = vue.defineComponent({
26120
+ const __default__$a = vue.defineComponent({
23645
26121
  name: "HzztTooltip"
23646
26122
  });
23647
- const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
23648
- ...__default__$8,
26123
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
26124
+ ...__default__$a,
23649
26125
  props: {
23650
26126
  content: {
23651
26127
  type: String,
@@ -23679,7 +26155,7 @@
23679
26155
  };
23680
26156
  }
23681
26157
  });
23682
- var Tooltip = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["__file", "tooltip.vue"]]);
26158
+ var Tooltip = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__file", "tooltip.vue"]]);
23683
26159
 
23684
26160
  const HzztTooltip = withInstall$1(Tooltip);
23685
26161
 
@@ -23696,11 +26172,11 @@
23696
26172
  key: 0,
23697
26173
  class: "margin-l-1 margin-r-2"
23698
26174
  };
23699
- const __default__$7 = vue.defineComponent({
26175
+ const __default__$9 = vue.defineComponent({
23700
26176
  name: "HzztPageSize"
23701
26177
  });
23702
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
23703
- ...__default__$7,
26178
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
26179
+ ...__default__$9,
23704
26180
  props: {
23705
26181
  modelValue: {
23706
26182
  type: Number,
@@ -23827,15 +26303,15 @@
23827
26303
  };
23828
26304
  }
23829
26305
  });
23830
- var PageSize = /* @__PURE__ */ _export_sfc$1(_sfc_main$7, [["__file", "index.vue"]]);
26306
+ var PageSize = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__file", "index.vue"]]);
23831
26307
 
23832
26308
  const HzztPageSize = withInstall$1(PageSize);
23833
26309
 
23834
- const __default__$6 = vue.defineComponent({
26310
+ const __default__$8 = vue.defineComponent({
23835
26311
  name: "HzztConfirmPassword"
23836
26312
  });
23837
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
23838
- ...__default__$6,
26313
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
26314
+ ...__default__$8,
23839
26315
  props: {
23840
26316
  placeholder: {
23841
26317
  type: String,
@@ -23895,16 +26371,16 @@
23895
26371
  };
23896
26372
  }
23897
26373
  });
23898
- var ConfirmPassword = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__file", "confirm-password.vue"]]);
26374
+ var ConfirmPassword = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["__file", "confirm-password.vue"]]);
23899
26375
 
23900
26376
  const HzztConfirmPassword = withInstall$1(ConfirmPassword);
23901
26377
 
23902
26378
  const _hoisted_1$5 = ["onClick"];
23903
- const __default__$5 = vue.defineComponent({
26379
+ const __default__$7 = vue.defineComponent({
23904
26380
  name: "HzztCheckButton"
23905
26381
  });
23906
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
23907
- ...__default__$5,
26382
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
26383
+ ...__default__$7,
23908
26384
  props: {
23909
26385
  options: {
23910
26386
  type: Array,
@@ -23974,7 +26450,7 @@
23974
26450
  };
23975
26451
  }
23976
26452
  });
23977
- var CheckButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["__file", "index.vue"]]);
26453
+ var CheckButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$7, [["__file", "index.vue"]]);
23978
26454
 
23979
26455
  const HzztCheckButton = withInstall$1(CheckButton);
23980
26456
 
@@ -24187,11 +26663,11 @@
24187
26663
  var dayjs = dayjs_min.exports;
24188
26664
 
24189
26665
  const parseDate = function(date, format, lang) {
24190
- const day = isEmpty(format) || format === "x" ? dayjs(date).locale(lang) : dayjs(date, format).locale(lang);
26666
+ const day = isEmpty$1(format) || format === "x" ? dayjs(date).locale(lang) : dayjs(date, format).locale(lang);
24191
26667
  return day.isValid() ? day : void 0;
24192
26668
  };
24193
26669
  const formatter = function(date, format, lang) {
24194
- if (isEmpty(format))
26670
+ if (isEmpty$1(format))
24195
26671
  return date;
24196
26672
  if (format === "x")
24197
26673
  return +date;
@@ -24232,11 +26708,11 @@
24232
26708
  const _hoisted_9 = { class: "cell" };
24233
26709
  const _hoisted_10 = { class: "cell" };
24234
26710
  const _hoisted_11 = { class: "cell" };
24235
- const __default__$4 = vue.defineComponent({
26711
+ const __default__$6 = vue.defineComponent({
24236
26712
  name: "HzztQuarterPicker"
24237
26713
  });
24238
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
24239
- ...__default__$4,
26714
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
26715
+ ...__default__$6,
24240
26716
  props: {
24241
26717
  size: useSizeProp$1,
24242
26718
  format: {
@@ -24476,7 +26952,7 @@
24476
26952
  };
24477
26953
  }
24478
26954
  });
24479
- var QuarterPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__file", "index.vue"]]);
26955
+ var QuarterPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__file", "index.vue"]]);
24480
26956
 
24481
26957
  const HzztQuarterPicker = withInstall$1(QuarterPicker);
24482
26958
 
@@ -24516,12 +26992,12 @@
24516
26992
  class: "width-100%",
24517
26993
  style: { "overflow": "hidden" }
24518
26994
  };
24519
- const __default__$3 = vue.defineComponent({
26995
+ const __default__$5 = vue.defineComponent({
24520
26996
  inheritAttrs: false,
24521
26997
  name: "HzztScan"
24522
26998
  });
24523
- const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
24524
- ...__default__$3,
26999
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
27000
+ ...__default__$5,
24525
27001
  props: scanProps,
24526
27002
  emits: scanEmits,
24527
27003
  setup(__props, { expose, emit }) {
@@ -24640,7 +27116,7 @@
24640
27116
  };
24641
27117
  }
24642
27118
  });
24643
- var Scan = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__file", "scan.vue"]]);
27119
+ var Scan = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["__file", "scan.vue"]]);
24644
27120
 
24645
27121
  const HzztScan = withInstall$1(Scan);
24646
27122
 
@@ -24686,11 +27162,11 @@
24686
27162
 
24687
27163
  const _hoisted_1$2 = { slot: "append" };
24688
27164
  const _hoisted_2$1 = { key: 0 };
24689
- const __default__$2 = vue.defineComponent({
27165
+ const __default__$4 = vue.defineComponent({
24690
27166
  name: "HzztSelectInput"
24691
27167
  });
24692
- const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
24693
- ...__default__$2,
27168
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
27169
+ ...__default__$4,
24694
27170
  props: selectInputProps,
24695
27171
  emits: selectInputEmits,
24696
27172
  setup(__props, { emit }) {
@@ -24799,7 +27275,7 @@
24799
27275
  };
24800
27276
  }
24801
27277
  });
24802
- var SelectInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["__file", "select-input.vue"]]);
27278
+ var SelectInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__file", "select-input.vue"]]);
24803
27279
 
24804
27280
  const HzztSelectInput = withInstall$1(SelectInput);
24805
27281
 
@@ -24830,11 +27306,11 @@
24830
27306
 
24831
27307
  const _hoisted_1$1 = { class: "flex column" };
24832
27308
  const _hoisted_2 = { class: "flex align-items-center" };
24833
- const __default__$1 = vue.defineComponent({
27309
+ const __default__$3 = vue.defineComponent({
24834
27310
  name: "HzztSelectTextarea"
24835
27311
  });
24836
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
24837
- ...__default__$1,
27312
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
27313
+ ...__default__$3,
24838
27314
  props: selectTextareaProps,
24839
27315
  emits: selectTextareaEmits,
24840
27316
  setup(__props, { emit }) {
@@ -24870,6 +27346,7 @@
24870
27346
  function selectChange(val) {
24871
27347
  if (!inputVal.value && inputVal.value !== 0)
24872
27348
  inputVal.value = "";
27349
+ selectValue.value = "";
24873
27350
  let content = val;
24874
27351
  if (!props.replace) {
24875
27352
  const inputEl = inputRef.value.$el.getElementsByTagName("textarea")[0];
@@ -24919,7 +27396,7 @@
24919
27396
  };
24920
27397
  }
24921
27398
  });
24922
- var SelectTextarea = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__file", "select-textarea.vue"]]);
27399
+ var SelectTextarea = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__file", "select-textarea.vue"]]);
24923
27400
 
24924
27401
  const HzztSelectTextarea = withInstall$1(SelectTextarea);
24925
27402
 
@@ -24945,11 +27422,11 @@
24945
27422
  };
24946
27423
 
24947
27424
  const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("span", { class: "margin-h-1" }, "\u2014\u2014", -1);
24948
- const __default__ = vue.defineComponent({
27425
+ const __default__$2 = vue.defineComponent({
24949
27426
  name: "HzztInputRange"
24950
27427
  });
24951
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
24952
- ...__default__,
27428
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
27429
+ ...__default__$2,
24953
27430
  props: inputRangeProps,
24954
27431
  emits: inputRangeEmits,
24955
27432
  setup(__props, { emit }) {
@@ -24972,7 +27449,7 @@
24972
27449
  deep: true
24973
27450
  });
24974
27451
  function change() {
24975
- if (startValue.value && endValue.value) {
27452
+ if (startValue.value || endValue.value) {
24976
27453
  const modelValue = [startValue.value, endValue.value];
24977
27454
  emit("update:modelValue", modelValue);
24978
27455
  emit("change", modelValue);
@@ -25013,10 +27490,379 @@
25013
27490
  };
25014
27491
  }
25015
27492
  });
25016
- var InputRange = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__file", "input-range.vue"]]);
27493
+ var InputRange = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["__file", "input-range.vue"]]);
25017
27494
 
25018
27495
  const HzztInputRange = withInstall$1(InputRange);
25019
27496
 
27497
+ const cascaderProps = buildProps$1({
27498
+ cascaderProps: {
27499
+ type: Object,
27500
+ default: () => ({
27501
+ showAllLevels: true
27502
+ })
27503
+ },
27504
+ disabled: Boolean,
27505
+ readonly: Boolean,
27506
+ clearable: Boolean,
27507
+ size: useSizeProp$1,
27508
+ options: {
27509
+ type: definePropType$1(Array),
27510
+ default: () => []
27511
+ },
27512
+ placeholder: {
27513
+ type: String,
27514
+ default: ""
27515
+ },
27516
+ modelValue: {
27517
+ type: definePropType$1([
27518
+ String
27519
+ ]),
27520
+ default: ""
27521
+ }
27522
+ });
27523
+ const cascaderEmits = {
27524
+ [UPDATE_MODEL_EVENT$1]: (value) => isString$1(value),
27525
+ input: (value) => isString$1(value),
27526
+ change: (value) => isString$1(value)
27527
+ };
27528
+
27529
+ function getCascaderId(targetId = "", list = []) {
27530
+ function get(list2, arr = []) {
27531
+ var _a;
27532
+ for (let i = 0; i < list2.length; i++) {
27533
+ const item = list2[i];
27534
+ if (item.value === targetId) {
27535
+ arr.unshift(item.value);
27536
+ break;
27537
+ }
27538
+ if ((_a = item == null ? void 0 : item.children) == null ? void 0 : _a.length) {
27539
+ arr = get(item.children, arr);
27540
+ if (arr.length) {
27541
+ if (item.value) {
27542
+ arr.unshift(item.value);
27543
+ }
27544
+ break;
27545
+ }
27546
+ }
27547
+ }
27548
+ return arr;
27549
+ }
27550
+ return get(list, []);
27551
+ }
27552
+
27553
+ const __default__$1 = vue.defineComponent({
27554
+ name: "HzztCascader"
27555
+ });
27556
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
27557
+ ...__default__$1,
27558
+ props: cascaderProps,
27559
+ emits: cascaderEmits,
27560
+ setup(__props, { emit }) {
27561
+ const props = __props;
27562
+ const attrs = vue.useAttrs();
27563
+ const inputVal = vue.ref(props.modelValue);
27564
+ const cascaderVal = vue.ref();
27565
+ const inputRef = vue.ref();
27566
+ const cascaderRef = vue.ref();
27567
+ const nsCascader = useNamespace$1("cascader");
27568
+ const formSize = useFormSize();
27569
+ const formDisabled = useFormDisabled();
27570
+ const trueSize = vue.computed(() => props.size || formSize.value || useGlobalSize$1().value);
27571
+ const trueDisabled = vue.computed(() => props.disabled || formDisabled.value);
27572
+ const containerCls = vue.computed(() => [
27573
+ "relative",
27574
+ nsCascader.b(),
27575
+ nsCascader.m(trueSize.value)
27576
+ ]);
27577
+ const inputCls = vue.computed(() => [
27578
+ nsCascader.e("input")
27579
+ ]);
27580
+ const cascaderCls = vue.computed(() => [
27581
+ nsCascader.e("cascader")
27582
+ ]);
27583
+ const _inputProps = vue.computed(() => ({
27584
+ disabled: trueDisabled.value,
27585
+ size: trueSize.value,
27586
+ clearable: props.clearable,
27587
+ placeholder: props.placeholder,
27588
+ readonly: props.readonly,
27589
+ ...attrs
27590
+ }));
27591
+ const _cascaderProps = vue.computed(() => ({
27592
+ options: props.options,
27593
+ disabled: trueDisabled.value,
27594
+ size: trueSize.value,
27595
+ clearable: props.clearable,
27596
+ placeholder: props.placeholder,
27597
+ props: { checkStrictly: true, expandTrigger: "hover" },
27598
+ filterable: true,
27599
+ separator: "/",
27600
+ showAllLevels: true,
27601
+ ...props.cascaderProps
27602
+ }));
27603
+ vue.watch(() => props.modelValue, (v) => {
27604
+ inputVal.value = v;
27605
+ getCascaderVal();
27606
+ });
27607
+ vue.watch(() => props.options, (v) => {
27608
+ if (!v)
27609
+ return;
27610
+ getCascaderVal();
27611
+ });
27612
+ getCascaderVal();
27613
+ function input(str) {
27614
+ emit("update:modelValue", str);
27615
+ emit("input", str);
27616
+ }
27617
+ function change(str) {
27618
+ emit("change", str);
27619
+ }
27620
+ function click(e) {
27621
+ cascaderRef.value.togglePopperVisible();
27622
+ const target = e.target;
27623
+ target.focus();
27624
+ }
27625
+ function cascaderChange(val) {
27626
+ const separator = _cascaderProps.value.separator || "/";
27627
+ inputVal.value = val ? isArray$1(val) ? val.join(separator) : [val].join(separator) : "";
27628
+ input(inputVal.value);
27629
+ change(inputVal.value);
27630
+ }
27631
+ function getCascaderVal() {
27632
+ const separator = _cascaderProps.value.separator || "/";
27633
+ if (_cascaderProps.value.showAllLevels === false) {
27634
+ const list = getCascaderId(props.modelValue, props.options);
27635
+ cascaderVal.value = list.join(separator);
27636
+ } else {
27637
+ cascaderVal.value = (props.modelValue || "").split(separator);
27638
+ }
27639
+ }
27640
+ return (_ctx, _cache) => {
27641
+ return vue.openBlock(), vue.createElementBlock("div", {
27642
+ class: vue.normalizeClass(vue.unref(containerCls))
27643
+ }, [
27644
+ vue.createVNode(vue.unref(ElInput), vue.mergeProps({
27645
+ class: vue.unref(inputCls),
27646
+ modelValue: inputVal.value,
27647
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputVal.value = $event),
27648
+ ref_key: "inputRef",
27649
+ ref: inputRef
27650
+ }, vue.unref(_inputProps), {
27651
+ onInput: input,
27652
+ onClick: click,
27653
+ onChange: change
27654
+ }), null, 16, ["class", "modelValue"]),
27655
+ vue.createVNode(vue.unref(ElCascader), vue.mergeProps({
27656
+ class: vue.unref(cascaderCls),
27657
+ modelValue: cascaderVal.value,
27658
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => cascaderVal.value = $event),
27659
+ ref_key: "cascaderRef",
27660
+ ref: cascaderRef
27661
+ }, vue.unref(_cascaderProps), { onChange: cascaderChange }), null, 16, ["class", "modelValue"])
27662
+ ], 2);
27663
+ };
27664
+ }
27665
+ });
27666
+ var Cascader = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__file", "cascader.vue"]]);
27667
+
27668
+ const HzztCascader = withInstall$1(Cascader);
27669
+
27670
+ const selectProps = buildProps$1({
27671
+ selectProps: Object,
27672
+ options: {
27673
+ type: definePropType$1(Array),
27674
+ default: () => []
27675
+ },
27676
+ modelValue: {
27677
+ type: definePropType$1([
27678
+ String
27679
+ ]),
27680
+ default: ""
27681
+ },
27682
+ disabled: Boolean,
27683
+ readonly: Boolean,
27684
+ clearable: Boolean,
27685
+ placeholder: String,
27686
+ size: useSizeProp$1
27687
+ });
27688
+ const selectEmits = {
27689
+ [UPDATE_MODEL_EVENT$1]: (value) => isString$1(value),
27690
+ "input": (value) => isString$1(value),
27691
+ "change": (value) => isString$1(value),
27692
+ "arrow-down": (e) => e,
27693
+ "arrow-up": (e) => e,
27694
+ "arrow-left": (e) => e,
27695
+ "arrow-right": (e) => e,
27696
+ "enter": (e) => e
27697
+ };
27698
+
27699
+ const __default__ = vue.defineComponent({
27700
+ name: "HzztSelect",
27701
+ inheritAttrs: false
27702
+ });
27703
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
27704
+ ...__default__,
27705
+ props: selectProps,
27706
+ emits: selectEmits,
27707
+ setup(__props, { emit }) {
27708
+ const props = __props;
27709
+ const attrs = vue.useAttrs();
27710
+ const inputVal = vue.ref(props.modelValue);
27711
+ const selectVal = vue.ref();
27712
+ const inputRef = vue.ref();
27713
+ const selectRef = vue.ref();
27714
+ const arrowName = vue.ref("arrow-down");
27715
+ const nsSelect = useNamespace$1("select");
27716
+ const formSize = useFormSize();
27717
+ const formDisabled = useFormDisabled();
27718
+ const trueSize = vue.computed(() => props.size || formSize.value || useGlobalSize$1().value);
27719
+ const trueDisabled = vue.computed(() => props.disabled || formDisabled.value);
27720
+ const trueReadonly = vue.computed(() => props.readonly || trueDisabled.value);
27721
+ const containerCls = vue.computed(() => [
27722
+ "relative",
27723
+ "line-height-1",
27724
+ attrs.class,
27725
+ nsSelect.b(),
27726
+ nsSelect.m(trueSize.value)
27727
+ ]);
27728
+ const containerStyle = vue.computed(() => attrs.style);
27729
+ const inputCls = vue.computed(() => [
27730
+ nsSelect.e("input"),
27731
+ "width-100%"
27732
+ ]);
27733
+ const selectCls = vue.computed(() => [
27734
+ nsSelect.e("select"),
27735
+ "width-100%"
27736
+ ]);
27737
+ const _inputProps = vue.computed(() => ({
27738
+ disabled: trueDisabled.value,
27739
+ size: trueSize.value,
27740
+ clearable: props.clearable,
27741
+ placeholder: props.placeholder,
27742
+ readonly: props.readonly,
27743
+ ...attrs,
27744
+ class: "",
27745
+ style: {
27746
+ position: trueReadonly.value ? "static" : "absolute",
27747
+ left: 0,
27748
+ top: 0,
27749
+ right: 0,
27750
+ zIndex: 2
27751
+ }
27752
+ }));
27753
+ const _selectProps = vue.computed(() => ({
27754
+ options: props.options,
27755
+ size: trueSize.value,
27756
+ filterable: true,
27757
+ popperClass: "select-v2-popper-min-width-100",
27758
+ ...props.selectProps
27759
+ }));
27760
+ vue.watch(() => props.modelValue, (v) => {
27761
+ inputVal.value = v;
27762
+ });
27763
+ vue.watch(() => inputVal.value, (v) => {
27764
+ selectVal.value = v;
27765
+ });
27766
+ function input(str) {
27767
+ var _a;
27768
+ if ((_a = selectRef.value) == null ? void 0 : _a.dropdownMenuVisible) {
27769
+ selectRef.value.states.inputValue = inputVal.value;
27770
+ selectRef.value.debouncedOnInputChange();
27771
+ }
27772
+ emit("update:modelValue", str);
27773
+ emit("input", str);
27774
+ }
27775
+ function change(str) {
27776
+ emit("change", str);
27777
+ }
27778
+ function keydown(e) {
27779
+ var _a, _b;
27780
+ const key = "key" in e && e.key;
27781
+ if (key === "ArrowDown") {
27782
+ emit("arrow-down", e);
27783
+ selectRef.value.dropdownMenuVisible = false;
27784
+ } else if (key === "ArrowUp") {
27785
+ emit("arrow-up", e);
27786
+ selectRef.value.dropdownMenuVisible = false;
27787
+ } else if (key === "ArrowLeft") {
27788
+ const index = inputRef.value.input.selectionStart;
27789
+ if (index === 0) {
27790
+ emit("arrow-left", e);
27791
+ selectRef.value.dropdownMenuVisible = false;
27792
+ }
27793
+ } else if (key === "ArrowRight") {
27794
+ const index = inputRef.value.input.selectionStart;
27795
+ if (((_b = (_a = inputVal.value) == null ? void 0 : _a.length) != null ? _b : 0) === index) {
27796
+ emit("arrow-right", e);
27797
+ selectRef.value.dropdownMenuVisible = false;
27798
+ }
27799
+ } else if (key === "Enter") {
27800
+ emit("enter", e);
27801
+ selectRef.value.dropdownMenuVisible = false;
27802
+ }
27803
+ }
27804
+ function showSelect() {
27805
+ if (selectRef.value) {
27806
+ selectRef.value.dropdownMenuVisible = !selectRef.value.dropdownMenuVisible;
27807
+ }
27808
+ }
27809
+ function selectChange(v) {
27810
+ emit("update:modelValue", v);
27811
+ inputVal.value = v;
27812
+ setTimeout(() => {
27813
+ inputRef.value.focus();
27814
+ selectRef.value.dropdownMenuVisible = false;
27815
+ });
27816
+ emit("change", inputVal.value);
27817
+ }
27818
+ function selectVisibleChange(v) {
27819
+ arrowName.value = v ? "arrow-up" : "arrow-down";
27820
+ }
27821
+ return (_ctx, _cache) => {
27822
+ return vue.openBlock(), vue.createElementBlock("div", {
27823
+ class: vue.normalizeClass(vue.unref(containerCls)),
27824
+ style: vue.normalizeStyle(vue.unref(containerStyle))
27825
+ }, [
27826
+ vue.createVNode(vue.unref(ElInput), vue.mergeProps({
27827
+ class: vue.unref(inputCls),
27828
+ modelValue: inputVal.value,
27829
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputVal.value = $event),
27830
+ ref_key: "inputRef",
27831
+ ref: inputRef
27832
+ }, vue.unref(_inputProps), {
27833
+ onInput: input,
27834
+ onChange: change,
27835
+ onKeydown: keydown
27836
+ }), {
27837
+ suffix: vue.withCtx(() => [
27838
+ !vue.unref(trueReadonly) ? (vue.openBlock(), vue.createBlock(HzztIcon$1, {
27839
+ key: 0,
27840
+ class: "pointer",
27841
+ name: arrowName.value,
27842
+ onClick: showSelect
27843
+ }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true)
27844
+ ]),
27845
+ _: 1
27846
+ }, 16, ["class", "modelValue"]),
27847
+ !vue.unref(trueReadonly) ? (vue.openBlock(), vue.createBlock(vue.unref(ElSelectV2), vue.mergeProps({
27848
+ key: 0,
27849
+ class: vue.unref(selectCls),
27850
+ modelValue: selectVal.value,
27851
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectVal.value = $event),
27852
+ ref_key: "selectRef",
27853
+ ref: selectRef
27854
+ }, vue.unref(_selectProps), {
27855
+ onChange: selectChange,
27856
+ onVisibleChange: selectVisibleChange
27857
+ }), null, 16, ["class", "modelValue"])) : vue.createCommentVNode("v-if", true)
27858
+ ], 6);
27859
+ };
27860
+ }
27861
+ });
27862
+ var Select = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__file", "select.vue"]]);
27863
+
27864
+ const HzztSelect = withInstall$1(Select);
27865
+
25020
27866
  var Components = [
25021
27867
  HzztConfigProvider,
25022
27868
  HzztTitle,
@@ -25033,7 +27879,9 @@
25033
27879
  HzztScan,
25034
27880
  HzztSelectInput,
25035
27881
  HzztSelectTextarea,
25036
- HzztInputRange
27882
+ HzztInputRange,
27883
+ HzztCascader,
27884
+ HzztSelect
25037
27885
  ];
25038
27886
 
25039
27887
  var Plugins = [];
@@ -25251,6 +28099,7 @@
25251
28099
  exports.Drag = Drag;
25252
28100
  exports.Height = Height;
25253
28101
  exports.Highlight = Highlight;
28102
+ exports.HzztCascader = HzztCascader;
25254
28103
  exports.HzztCheckButton = HzztCheckButton;
25255
28104
  exports.HzztCollapse = HzztCollapse;
25256
28105
  exports.HzztConfigProvider = HzztConfigProvider;
@@ -25262,6 +28111,7 @@
25262
28111
  exports.HzztPagination = HzztPagination;
25263
28112
  exports.HzztQuarterPicker = HzztQuarterPicker;
25264
28113
  exports.HzztScan = HzztScan;
28114
+ exports.HzztSelect = HzztSelect;
25265
28115
  exports.HzztSelectInput = HzztSelectInput;
25266
28116
  exports.HzztSelectTextarea = HzztSelectTextarea;
25267
28117
  exports.HzztTab = HzztTab;
@@ -25274,6 +28124,8 @@
25274
28124
  exports.WEEK_DAYS = WEEK_DAYS;
25275
28125
  exports.buildLocaleContext = buildLocaleContext$1;
25276
28126
  exports.buildTranslator = buildTranslator$1;
28127
+ exports.cascaderEmits = cascaderEmits;
28128
+ exports.cascaderProps = cascaderProps;
25277
28129
  exports.componentSizeMap = componentSizeMap;
25278
28130
  exports.componentSizes = componentSizes$1;
25279
28131
  exports.configProviderContextKey = configProviderContextKey$1;
@@ -25292,8 +28144,10 @@
25292
28144
  exports.provideGlobalConfig = provideGlobalConfig;
25293
28145
  exports.scanEmits = scanEmits;
25294
28146
  exports.scanProps = scanProps;
28147
+ exports.selectEmits = selectEmits;
25295
28148
  exports.selectInputEmits = selectInputEmits;
25296
28149
  exports.selectInputProps = selectInputProps;
28150
+ exports.selectProps = selectProps;
25297
28151
  exports.selectTextareaEmits = selectTextareaEmits;
25298
28152
  exports.selectTextareaProps = selectTextareaProps;
25299
28153
  exports.titleProps = titleProps;