hzzt-plus 1.0.2 → 1.0.4

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 (168) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +3029 -276
  4. package/dist/index.full.min.js +23 -17
  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 +3025 -278
  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 +67 -0
  31. package/es/components/collapse/src/collapse.mjs.map +1 -1
  32. package/es/components/collapse/src/collapse2.mjs +0 -67
  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/index.d.ts +5 -0
  42. package/es/components/input-range/index.mjs +9 -0
  43. package/es/components/input-range/index.mjs.map +1 -0
  44. package/es/components/input-range/src/input-range.d.ts +24 -0
  45. package/es/components/input-range/src/input-range.mjs +31 -0
  46. package/es/components/input-range/src/input-range.mjs.map +1 -0
  47. package/es/components/input-range/src/input-range.vue.d.ts +86 -0
  48. package/es/components/input-range/src/input-range2.mjs +81 -0
  49. package/es/components/input-range/src/input-range2.mjs.map +1 -0
  50. package/es/components/input-range/style/css.d.ts +2 -0
  51. package/es/components/input-range/style/css.mjs +3 -0
  52. package/es/components/input-range/style/css.mjs.map +1 -0
  53. package/es/components/input-range/style/index.d.ts +2 -0
  54. package/es/components/input-range/style/index.mjs +3 -0
  55. package/es/components/input-range/style/index.mjs.map +1 -0
  56. package/es/components/page-size/index.d.ts +54 -54
  57. package/es/components/page-size/src/index.vue.d.ts +54 -54
  58. package/es/components/quarter-picker/index.d.ts +16 -16
  59. package/es/components/quarter-picker/src/index.vue.d.ts +16 -16
  60. package/es/components/scan/index.mjs +2 -2
  61. package/es/components/scan/src/scan.mjs +144 -23
  62. package/es/components/scan/src/scan.mjs.map +1 -1
  63. package/es/components/scan/src/scan.vue.d.ts +2 -2
  64. package/es/components/scan/src/scan2.mjs +23 -144
  65. package/es/components/scan/src/scan2.mjs.map +1 -1
  66. package/es/components/select-input/index.d.ts +21 -21
  67. package/es/components/select-input/src/select-input.d.ts +3 -3
  68. package/es/components/select-input/src/select-input.mjs.map +1 -1
  69. package/es/components/select-input/src/select-input.vue.d.ts +21 -21
  70. package/es/components/select-textarea/index.d.ts +3 -13074
  71. package/es/components/select-textarea/index.mjs.map +1 -1
  72. package/es/components/select-textarea/src/select-textarea.d.ts +4 -4
  73. package/es/components/select-textarea/src/select-textarea.mjs +6 -5
  74. package/es/components/select-textarea/src/select-textarea.mjs.map +1 -1
  75. package/es/components/select-textarea/src/select-textarea.vue.d.ts +45 -45
  76. package/es/components/select-textarea/src/select-textarea2.mjs +2 -1
  77. package/es/components/select-textarea/src/select-textarea2.mjs.map +1 -1
  78. package/es/components/tooltip/index.d.ts +14 -14
  79. package/es/components/tooltip/src/tooltip.vue.d.ts +14 -14
  80. package/es/hooks/use-cursor/index.d.ts +1 -1
  81. package/es/hooks/use-cursor/index.mjs.map +1 -1
  82. package/es/index.mjs +5 -1
  83. package/es/index.mjs.map +1 -1
  84. package/global.d.ts +2 -0
  85. package/lib/component.js +5 -1
  86. package/lib/component.js.map +1 -1
  87. package/lib/components/cascader/index.d.ts +5 -0
  88. package/lib/components/cascader/index.js +16 -0
  89. package/lib/components/cascader/index.js.map +1 -0
  90. package/lib/components/cascader/src/cascader.d.ts +35 -0
  91. package/lib/components/cascader/src/cascader.js +47 -0
  92. package/lib/components/cascader/src/cascader.js.map +1 -0
  93. package/lib/components/cascader/src/cascader.vue.d.ts +2293 -0
  94. package/lib/components/cascader/src/cascader2.js +132 -0
  95. package/lib/components/cascader/src/cascader2.js.map +1 -0
  96. package/lib/components/cascader/src/hooks/utils.d.ts +2 -0
  97. package/lib/components/cascader/src/hooks/utils.js +30 -0
  98. package/lib/components/cascader/src/hooks/utils.js.map +1 -0
  99. package/lib/components/cascader/style/css.d.ts +2 -0
  100. package/lib/components/cascader/style/css.js +6 -0
  101. package/lib/components/cascader/style/css.js.map +1 -0
  102. package/lib/components/cascader/style/index.d.ts +2 -0
  103. package/lib/components/cascader/style/index.js +6 -0
  104. package/lib/components/cascader/style/index.js.map +1 -0
  105. package/lib/components/collapse/index.js +2 -2
  106. package/lib/components/collapse/src/collapse.js +70 -0
  107. package/lib/components/collapse/src/collapse.js.map +1 -1
  108. package/lib/components/collapse/src/collapse2.js +0 -70
  109. package/lib/components/collapse/src/collapse2.js.map +1 -1
  110. package/lib/components/confirm-password/index.d.ts +1 -1
  111. package/lib/components/confirm-password/src/confirm-password.vue.d.ts +1 -1
  112. package/lib/components/dropdown/index.d.ts +1 -1
  113. package/lib/components/dropdown/src/index.vue.d.ts +1 -1
  114. package/lib/components/index.d.ts +2 -0
  115. package/lib/components/index.js +11 -1
  116. package/lib/components/index.js.map +1 -1
  117. package/lib/components/input-range/index.d.ts +5 -0
  118. package/lib/components/input-range/index.js +16 -0
  119. package/lib/components/input-range/index.js.map +1 -0
  120. package/lib/components/input-range/src/input-range.d.ts +24 -0
  121. package/lib/components/input-range/src/input-range.js +36 -0
  122. package/lib/components/input-range/src/input-range.js.map +1 -0
  123. package/lib/components/input-range/src/input-range.vue.d.ts +86 -0
  124. package/lib/components/input-range/src/input-range2.js +85 -0
  125. package/lib/components/input-range/src/input-range2.js.map +1 -0
  126. package/lib/components/input-range/style/css.d.ts +2 -0
  127. package/lib/components/input-range/style/css.js +6 -0
  128. package/lib/components/input-range/style/css.js.map +1 -0
  129. package/lib/components/input-range/style/index.d.ts +2 -0
  130. package/lib/components/input-range/style/index.js +6 -0
  131. package/lib/components/input-range/style/index.js.map +1 -0
  132. package/lib/components/page-size/index.d.ts +54 -54
  133. package/lib/components/page-size/src/index.vue.d.ts +54 -54
  134. package/lib/components/quarter-picker/index.d.ts +16 -16
  135. package/lib/components/quarter-picker/src/index.vue.d.ts +16 -16
  136. package/lib/components/scan/index.js +2 -2
  137. package/lib/components/scan/src/scan.js +144 -24
  138. package/lib/components/scan/src/scan.js.map +1 -1
  139. package/lib/components/scan/src/scan.vue.d.ts +2 -2
  140. package/lib/components/scan/src/scan2.js +24 -144
  141. package/lib/components/scan/src/scan2.js.map +1 -1
  142. package/lib/components/select-input/index.d.ts +21 -21
  143. package/lib/components/select-input/src/select-input.d.ts +3 -3
  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 +21 -21
  146. package/lib/components/select-textarea/index.d.ts +3 -13074
  147. package/lib/components/select-textarea/index.js.map +1 -1
  148. package/lib/components/select-textarea/src/select-textarea.d.ts +4 -4
  149. package/lib/components/select-textarea/src/select-textarea.js +5 -4
  150. package/lib/components/select-textarea/src/select-textarea.js.map +1 -1
  151. package/lib/components/select-textarea/src/select-textarea.vue.d.ts +45 -45
  152. package/lib/components/select-textarea/src/select-textarea2.js +2 -1
  153. package/lib/components/select-textarea/src/select-textarea2.js.map +1 -1
  154. package/lib/components/tooltip/index.d.ts +14 -14
  155. package/lib/components/tooltip/src/tooltip.vue.d.ts +14 -14
  156. package/lib/hooks/use-cursor/index.d.ts +1 -1
  157. package/lib/hooks/use-cursor/index.js.map +1 -1
  158. package/lib/index.js +41 -31
  159. package/lib/index.js.map +1 -1
  160. package/package.json +1 -1
  161. package/tags.json +1 -1
  162. package/theme/hzzt-cascader.css +1 -0
  163. package/theme/hzzt-input-range.css +0 -0
  164. package/theme/index.css +1 -1
  165. package/theme/src/cascader.scss +28 -0
  166. package/theme/src/index.scss +2 -0
  167. package/theme/src/input-range.scss +0 -0
  168. package/web-types.json +1 -692
@@ -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
  }
@@ -4293,7 +4325,7 @@
4293
4325
  var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
4294
4326
 
4295
4327
  var boolTag = "[object Boolean]";
4296
- function isBoolean$1(value) {
4328
+ function isBoolean$2(value) {
4297
4329
  return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
4298
4330
  }
4299
4331
 
@@ -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,
@@ -6341,11 +6373,11 @@
6341
6373
  isArrayBuffer,
6342
6374
  isArrayLike,
6343
6375
  isArrayLikeObject,
6344
- isBoolean: isBoolean$1,
6376
+ isBoolean: isBoolean$2,
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,
@@ -7128,8 +7160,9 @@
7128
7160
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
7129
7161
  */
7130
7162
 
7163
+ const isBoolean$1 = (val) => typeof val === "boolean";
7131
7164
  const isNumber$1 = (val) => typeof val === "number";
7132
- 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;
7133
7166
 
7134
7167
  const keysOf = (arr) => Object.keys(arr);
7135
7168
 
@@ -12965,7 +12998,7 @@
12965
12998
  return target;
12966
12999
  };
12967
13000
 
12968
- const _hoisted_1$b = {
13001
+ const _hoisted_1$c = {
12969
13002
  key: 0,
12970
13003
  class: "hzzt-title flex align-items-center"
12971
13004
  };
@@ -12974,11 +13007,11 @@
12974
13007
  class: "decorative-line"
12975
13008
  };
12976
13009
  const _hoisted_3$7 = { class: "label-name" };
12977
- const __default__$s = vue.defineComponent({
13010
+ const __default__$B = vue.defineComponent({
12978
13011
  name: "HzztTitle"
12979
13012
  });
12980
- const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
12981
- ...__default__$s,
13013
+ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
13014
+ ...__default__$B,
12982
13015
  props: titleProps,
12983
13016
  setup(__props) {
12984
13017
  const props = __props;
@@ -12988,7 +13021,7 @@
12988
13021
  return props.label || ((_c = (_b = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b[0]) == null ? void 0 : _c.children);
12989
13022
  });
12990
13023
  return (_ctx, _cache) => {
12991
- return vue.unref(showLabel) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
13024
+ return vue.unref(showLabel) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
12992
13025
  _ctx.sideline ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$a)) : vue.createCommentVNode("v-if", true),
12993
13026
  vue.renderSlot(_ctx.$slots, "before"),
12994
13027
  vue.createElementVNode("label", _hoisted_3$7, [
@@ -13000,7 +13033,7 @@
13000
13033
  };
13001
13034
  }
13002
13035
  });
13003
- var HzztTitle$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$G, [["__file", "title.vue"]]);
13036
+ var HzztTitle$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$S, [["__file", "title.vue"]]);
13004
13037
 
13005
13038
  const HzztTitle = withInstall$1(HzztTitle$1);
13006
13039
 
@@ -13082,11 +13115,13 @@
13082
13115
  const isUndefined = (val) => val === void 0;
13083
13116
  const isBoolean = (val) => typeof val === "boolean";
13084
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;
13085
13119
  const isElement = (e) => {
13086
13120
  if (typeof Element === "undefined")
13087
13121
  return false;
13088
13122
  return e instanceof Element;
13089
13123
  };
13124
+ const isPropAbsent = (prop) => isNil(prop);
13090
13125
  const isStringNumber = (val) => {
13091
13126
  if (!isString$1(val)) {
13092
13127
  return false;
@@ -13521,12 +13556,12 @@
13521
13556
  }
13522
13557
  });
13523
13558
 
13524
- const __default__$r = vue.defineComponent({
13559
+ const __default__$A = vue.defineComponent({
13525
13560
  name: "ElIcon",
13526
13561
  inheritAttrs: false
13527
13562
  });
13528
- const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
13529
- ...__default__$r,
13563
+ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
13564
+ ...__default__$A,
13530
13565
  props: iconProps,
13531
13566
  setup(__props) {
13532
13567
  const props = __props;
@@ -13550,7 +13585,7 @@
13550
13585
  };
13551
13586
  }
13552
13587
  });
13553
- var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__file", "icon.vue"]]);
13588
+ var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__file", "icon.vue"]]);
13554
13589
 
13555
13590
  const ElIcon = withInstall(Icon);
13556
13591
 
@@ -13988,12 +14023,12 @@
13988
14023
  return [recordCursor, setCursor];
13989
14024
  }
13990
14025
 
13991
- const __default__$q = vue.defineComponent({
14026
+ const __default__$z = vue.defineComponent({
13992
14027
  name: "ElInput",
13993
14028
  inheritAttrs: false
13994
14029
  });
13995
- const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
13996
- ...__default__$q,
14030
+ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
14031
+ ...__default__$z,
13997
14032
  props: inputProps,
13998
14033
  emits: inputEmits,
13999
14034
  setup(__props, { expose, emit }) {
@@ -14398,7 +14433,7 @@
14398
14433
  };
14399
14434
  }
14400
14435
  });
14401
- var Input = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__file", "input.vue"]]);
14436
+ var Input = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__file", "input.vue"]]);
14402
14437
 
14403
14438
  const ElInput = withInstall(Input);
14404
14439
 
@@ -14447,8 +14482,8 @@
14447
14482
  always: Boolean
14448
14483
  });
14449
14484
 
14450
- const COMPONENT_NAME$2 = "Thumb";
14451
- const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
14485
+ const COMPONENT_NAME$3 = "Thumb";
14486
+ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
14452
14487
  __name: "thumb",
14453
14488
  props: thumbProps,
14454
14489
  setup(__props) {
@@ -14456,7 +14491,7 @@
14456
14491
  const scrollbar = vue.inject(scrollbarContextKey);
14457
14492
  const ns = useNamespace("scrollbar");
14458
14493
  if (!scrollbar)
14459
- throwError(COMPONENT_NAME$2, "can not inject scrollbar context");
14494
+ throwError(COMPONENT_NAME$3, "can not inject scrollbar context");
14460
14495
  const instance = vue.ref();
14461
14496
  const thumb = vue.ref();
14462
14497
  const thumbState = vue.ref({});
@@ -14567,7 +14602,7 @@
14567
14602
  };
14568
14603
  }
14569
14604
  });
14570
- var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__file", "thumb.vue"]]);
14605
+ var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__file", "thumb.vue"]]);
14571
14606
 
14572
14607
  const barProps = buildProps({
14573
14608
  always: {
@@ -14580,7 +14615,7 @@
14580
14615
  }
14581
14616
  });
14582
14617
 
14583
- const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
14618
+ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
14584
14619
  __name: "bar",
14585
14620
  props: barProps,
14586
14621
  setup(__props, { expose }) {
@@ -14638,7 +14673,7 @@
14638
14673
  };
14639
14674
  }
14640
14675
  });
14641
- var Bar = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__file", "bar.vue"]]);
14676
+ var Bar = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__file", "bar.vue"]]);
14642
14677
 
14643
14678
  const scrollbarProps = buildProps({
14644
14679
  height: {
@@ -14694,12 +14729,12 @@
14694
14729
  }) => [scrollTop, scrollLeft].every(isNumber)
14695
14730
  };
14696
14731
 
14697
- const COMPONENT_NAME$1 = "ElScrollbar";
14698
- const __default__$p = vue.defineComponent({
14699
- name: COMPONENT_NAME$1
14732
+ const COMPONENT_NAME$2 = "ElScrollbar";
14733
+ const __default__$y = vue.defineComponent({
14734
+ name: COMPONENT_NAME$2
14700
14735
  });
14701
- const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
14702
- ...__default__$p,
14736
+ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
14737
+ ...__default__$y,
14703
14738
  props: scrollbarProps,
14704
14739
  emits: scrollbarEmits,
14705
14740
  setup(__props, { expose, emit }) {
@@ -14851,7 +14886,7 @@
14851
14886
  };
14852
14887
  }
14853
14888
  });
14854
- var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__file", "scrollbar.vue"]]);
14889
+ var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__file", "scrollbar.vue"]]);
14855
14890
 
14856
14891
  const ElScrollbar = withInstall(Scrollbar);
14857
14892
 
@@ -14876,12 +14911,12 @@
14876
14911
  }
14877
14912
  });
14878
14913
 
14879
- const __default__$o = vue.defineComponent({
14914
+ const __default__$x = vue.defineComponent({
14880
14915
  name: "ElPopper",
14881
14916
  inheritAttrs: false
14882
14917
  });
14883
- const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
14884
- ...__default__$o,
14918
+ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
14919
+ ...__default__$x,
14885
14920
  props: popperProps,
14886
14921
  setup(__props, { expose }) {
14887
14922
  const props = __props;
@@ -14904,7 +14939,7 @@
14904
14939
  };
14905
14940
  }
14906
14941
  });
14907
- var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__file", "popper.vue"]]);
14942
+ var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__file", "popper.vue"]]);
14908
14943
 
14909
14944
  const popperArrowProps = buildProps({
14910
14945
  arrowOffset: {
@@ -14913,12 +14948,12 @@
14913
14948
  }
14914
14949
  });
14915
14950
 
14916
- const __default__$n = vue.defineComponent({
14951
+ const __default__$w = vue.defineComponent({
14917
14952
  name: "ElPopperArrow",
14918
14953
  inheritAttrs: false
14919
14954
  });
14920
- const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
14921
- ...__default__$n,
14955
+ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
14956
+ ...__default__$w,
14922
14957
  props: popperArrowProps,
14923
14958
  setup(__props, { expose }) {
14924
14959
  const props = __props;
@@ -14944,7 +14979,7 @@
14944
14979
  };
14945
14980
  }
14946
14981
  });
14947
- var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__file", "arrow.vue"]]);
14982
+ var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__file", "arrow.vue"]]);
14948
14983
 
14949
14984
  const popperTriggerProps = buildProps({
14950
14985
  virtualRef: {
@@ -15023,6 +15058,21 @@
15023
15058
  }
15024
15059
  }
15025
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
+ };
15026
15076
 
15027
15077
  const NAME = "ElOnlyChild";
15028
15078
  const OnlyChild = vue.defineComponent({
@@ -15079,12 +15129,12 @@
15079
15129
  }, [s]);
15080
15130
  }
15081
15131
 
15082
- const __default__$m = vue.defineComponent({
15132
+ const __default__$v = vue.defineComponent({
15083
15133
  name: "ElPopperTrigger",
15084
15134
  inheritAttrs: false
15085
15135
  });
15086
- const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
15087
- ...__default__$m,
15136
+ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
15137
+ ...__default__$v,
15088
15138
  props: popperTriggerProps,
15089
15139
  setup(__props, { expose }) {
15090
15140
  const props = __props;
@@ -15195,7 +15245,7 @@
15195
15245
  };
15196
15246
  }
15197
15247
  });
15198
- var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__file", "trigger.vue"]]);
15248
+ var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__file", "trigger.vue"]]);
15199
15249
 
15200
15250
  const FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
15201
15251
  const FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
@@ -15394,7 +15444,7 @@
15394
15444
  });
15395
15445
  };
15396
15446
 
15397
- const _sfc_main$x = vue.defineComponent({
15447
+ const _sfc_main$J = vue.defineComponent({
15398
15448
  name: "ElFocusTrap",
15399
15449
  inheritAttrs: false,
15400
15450
  props: {
@@ -15636,10 +15686,10 @@
15636
15686
  };
15637
15687
  }
15638
15688
  });
15639
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
15689
+ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
15640
15690
  return vue.renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
15641
15691
  }
15642
- var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$9], ["__file", "focus-trap.vue"]]);
15692
+ var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$c], ["__file", "focus-trap.vue"]]);
15643
15693
 
15644
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});
15645
15695
 
@@ -16018,11 +16068,11 @@
16018
16068
  };
16019
16069
  };
16020
16070
 
16021
- const __default__$l = vue.defineComponent({
16071
+ const __default__$u = vue.defineComponent({
16022
16072
  name: "ElPopperContent"
16023
16073
  });
16024
- const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
16025
- ...__default__$l,
16074
+ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
16075
+ ...__default__$u,
16026
16076
  props: popperContentProps,
16027
16077
  emits: popperContentEmits,
16028
16078
  setup(__props, { expose, emit }) {
@@ -16138,7 +16188,7 @@
16138
16188
  };
16139
16189
  }
16140
16190
  });
16141
- var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "content.vue"]]);
16191
+ var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__file", "content.vue"]]);
16142
16192
 
16143
16193
  const ElPopper = withInstall(Popper);
16144
16194
 
@@ -16416,11 +16466,11 @@
16416
16466
  return handleEvent;
16417
16467
  };
16418
16468
 
16419
- const __default__$k = vue.defineComponent({
16469
+ const __default__$t = vue.defineComponent({
16420
16470
  name: "ElTooltipTrigger"
16421
16471
  });
16422
- const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
16423
- ...__default__$k,
16472
+ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
16473
+ ...__default__$t,
16424
16474
  props: useTooltipTriggerProps,
16425
16475
  setup(__props, { expose }) {
16426
16476
  const props = __props;
@@ -16479,7 +16529,7 @@
16479
16529
  };
16480
16530
  }
16481
16531
  });
16482
- var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__file", "trigger.vue"]]);
16532
+ var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__file", "trigger.vue"]]);
16483
16533
 
16484
16534
  const teleportProps = buildProps({
16485
16535
  to: {
@@ -16489,7 +16539,7 @@
16489
16539
  disabled: Boolean
16490
16540
  });
16491
16541
 
16492
- const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
16542
+ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
16493
16543
  __name: "teleport",
16494
16544
  props: teleportProps,
16495
16545
  setup(__props) {
@@ -16503,7 +16553,7 @@
16503
16553
  };
16504
16554
  }
16505
16555
  });
16506
- var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__file", "teleport.vue"]]);
16556
+ var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__file", "teleport.vue"]]);
16507
16557
 
16508
16558
  const ElTeleport = withInstall(Teleport);
16509
16559
 
@@ -16540,12 +16590,12 @@
16540
16590
  };
16541
16591
  };
16542
16592
 
16543
- const __default__$j = vue.defineComponent({
16593
+ const __default__$s = vue.defineComponent({
16544
16594
  name: "ElTooltipContent",
16545
16595
  inheritAttrs: false
16546
16596
  });
16547
- const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
16548
- ...__default__$j,
16597
+ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
16598
+ ...__default__$s,
16549
16599
  props: useTooltipContentProps,
16550
16600
  setup(__props, { expose }) {
16551
16601
  const props = __props;
@@ -16716,13 +16766,13 @@
16716
16766
  };
16717
16767
  }
16718
16768
  });
16719
- var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "content.vue"]]);
16769
+ var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__file", "content.vue"]]);
16720
16770
 
16721
- const __default__$i = vue.defineComponent({
16771
+ const __default__$r = vue.defineComponent({
16722
16772
  name: "ElTooltip"
16723
16773
  });
16724
- const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
16725
- ...__default__$i,
16774
+ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
16775
+ ...__default__$r,
16726
16776
  props: useTooltipProps,
16727
16777
  emits: tooltipEmits,
16728
16778
  setup(__props, { expose, emit }) {
@@ -16872,7 +16922,7 @@
16872
16922
  };
16873
16923
  }
16874
16924
  });
16875
- var Tooltip$1 = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "tooltip.vue"]]);
16925
+ var Tooltip$1 = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__file", "tooltip.vue"]]);
16876
16926
 
16877
16927
  const ElTooltip = withInstall(Tooltip$1);
16878
16928
 
@@ -17946,11 +17996,11 @@
17946
17996
  });
17947
17997
  }
17948
17998
 
17949
- const __default__$h = vue.defineComponent({
17999
+ const __default__$q = vue.defineComponent({
17950
18000
  name: "ElButton"
17951
18001
  });
17952
- const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
17953
- ...__default__$h,
18002
+ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
18003
+ ...__default__$q,
17954
18004
  props: buttonProps,
17955
18005
  emits: buttonEmits,
17956
18006
  setup(__props, { expose, emit }) {
@@ -18016,18 +18066,18 @@
18016
18066
  };
18017
18067
  }
18018
18068
  });
18019
- var Button = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "button.vue"]]);
18069
+ var Button = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__file", "button.vue"]]);
18020
18070
 
18021
18071
  const buttonGroupProps = {
18022
18072
  size: buttonProps.size,
18023
18073
  type: buttonProps.type
18024
18074
  };
18025
18075
 
18026
- const __default__$g = vue.defineComponent({
18076
+ const __default__$p = vue.defineComponent({
18027
18077
  name: "ElButtonGroup"
18028
18078
  });
18029
- const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
18030
- ...__default__$g,
18079
+ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
18080
+ ...__default__$p,
18031
18081
  props: buttonGroupProps,
18032
18082
  setup(__props) {
18033
18083
  const props = __props;
@@ -18045,7 +18095,7 @@
18045
18095
  };
18046
18096
  }
18047
18097
  });
18048
- var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "button-group.vue"]]);
18098
+ var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__file", "button-group.vue"]]);
18049
18099
 
18050
18100
  const ElButton = withInstall(Button, {
18051
18101
  ButtonGroup
@@ -18054,84 +18104,1837 @@
18054
18104
 
18055
18105
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
18056
18106
 
18057
- const escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
18058
-
18059
- const tagProps = buildProps({
18060
- type: {
18061
- type: String,
18062
- values: ["primary", "success", "info", "warning", "danger"],
18063
- default: "primary"
18107
+ const checkboxProps = {
18108
+ modelValue: {
18109
+ type: [Number, String, Boolean],
18110
+ default: void 0
18064
18111
  },
18065
- closable: Boolean,
18066
- disableTransitions: Boolean,
18067
- hit: Boolean,
18068
- color: String,
18069
- 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: {
18070
18124
  type: String,
18071
- values: componentSizes
18125
+ default: void 0
18072
18126
  },
18073
- 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: {
18074
18144
  type: String,
18075
- values: ["dark", "light", "plain"],
18076
- default: "light"
18145
+ default: void 0
18077
18146
  },
18078
- round: Boolean
18079
- });
18080
- const tagEmits = {
18081
- close: (evt) => evt instanceof MouseEvent,
18082
- 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)
18083
18159
  };
18084
18160
 
18085
- const __default__$f = vue.defineComponent({
18086
- 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__$o = vue.defineComponent({
18380
+ name: "ElCheckbox"
18087
18381
  });
18088
- const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
18089
- ...__default__$f,
18090
- props: tagProps,
18091
- emits: tagEmits,
18092
- setup(__props, { emit }) {
18382
+ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
18383
+ ...__default__$o,
18384
+ props: checkboxProps,
18385
+ emits: checkboxEmits,
18386
+ setup(__props) {
18093
18387
  const props = __props;
18094
- const tagSize = useFormSize();
18095
- const ns = useNamespace("tag");
18096
- const containerKls = vue.computed(() => {
18097
- 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(() => {
18098
18404
  return [
18099
18405
  ns.b(),
18100
- ns.is("closable", closable),
18101
- ns.m(type || "primary"),
18102
- ns.m(tagSize.value),
18103
- ns.m(effect),
18104
- ns.is("hit", hit),
18105
- 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)
18106
18419
  ];
18107
18420
  });
18108
- const handleClose = (event) => {
18109
- emit("close", event);
18110
- };
18111
- const handleClick = (event) => {
18112
- emit("click", event);
18113
- };
18114
- const handleVNodeMounted = (vnode) => {
18115
- var _a, _b, _c;
18116
- 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) {
18117
- vnode.component.subTree.component.bum = null;
18118
- }
18119
- };
18120
18421
  return (_ctx, _cache) => {
18121
- return _ctx.disableTransitions ? (vue.openBlock(), vue.createElementBlock("span", {
18122
- key: 0,
18123
- class: vue.normalizeClass(vue.unref(containerKls)),
18124
- style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
18125
- onClick: handleClick
18126
- }, [
18127
- vue.createElementVNode("span", {
18128
- class: vue.normalizeClass(vue.unref(ns).e("content"))
18129
- }, [
18130
- vue.renderSlot(_ctx.$slots, "default")
18131
- ], 2),
18132
- _ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
18133
- key: 0,
18134
- 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$B, [["__file", "checkbox.vue"]]);
18492
+
18493
+ const __default__$n = vue.defineComponent({
18494
+ name: "ElCheckboxButton"
18495
+ });
18496
+ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
18497
+ ...__default__$n,
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$A, [["__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__$m = vue.defineComponent({
18614
+ name: "ElCheckboxGroup"
18615
+ });
18616
+ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
18617
+ ...__default__$m,
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$z, [["__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__$l = vue.defineComponent({
18765
+ name: "ElRadio"
18766
+ });
18767
+ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
18768
+ ...__default__$l,
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$y, [["__file", "radio.vue"]]);
18833
+
18834
+ const radioButtonProps = buildProps({
18835
+ ...radioPropsBase
18836
+ });
18837
+
18838
+ const __default__$k = vue.defineComponent({
18839
+ name: "ElRadioButton"
18840
+ });
18841
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
18842
+ ...__default__$k,
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$x, [["__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__$j = vue.defineComponent({
18931
+ name: "ElRadioGroup"
18932
+ });
18933
+ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
18934
+ ...__default__$j,
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$w, [["__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$v = 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$v, [["render", _sfc_render$b], ["__file", "node.vue"]]);
19212
+
19213
+ const _sfc_main$u = 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$u, [["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$t = 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$t, [["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__$i = vue.defineComponent({
19889
+ name: "ElTag"
19890
+ });
19891
+ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
19892
+ ...__default__$i,
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")),
18135
19938
  onClick: vue.withModifiers(handleClose, ["stop"])
18136
19939
  }, {
18137
19940
  default: vue.withCtx(() => [
@@ -18173,10 +19976,83 @@
18173
19976
  };
18174
19977
  }
18175
19978
  });
18176
- var Tag = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "tag.vue"]]);
19979
+ var Tag = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "tag.vue"]]);
18177
19980
 
18178
19981
  const ElTag = withInstall(Tag);
18179
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
+ };
20055
+
18180
20056
  const nodeList$1 = /* @__PURE__ */ new Map();
18181
20057
  if (isClient) {
18182
20058
  let startClick;
@@ -18235,16 +20111,623 @@
18235
20111
  documentHandler: createDocumentHandler$1(el, binding),
18236
20112
  bindingFn: binding.value
18237
20113
  };
18238
- if (oldHandlerIndex >= 0) {
18239
- handlers.splice(oldHandlerIndex, 1, newHandler);
18240
- } else {
18241
- handlers.push(newHandler);
18242
- }
18243
- },
18244
- unmounted(el) {
18245
- nodeList$1.delete(el);
20114
+ if (oldHandlerIndex >= 0) {
20115
+ handlers.splice(oldHandlerIndex, 1, newHandler);
20116
+ } else {
20117
+ handlers.push(newHandler);
20118
+ }
20119
+ },
20120
+ unmounted(el) {
20121
+ nodeList$1.delete(el);
20122
+ }
20123
+ };
20124
+
20125
+ const COMPONENT_NAME$1 = "ElCascader";
20126
+ const __default__$h = vue.defineComponent({
20127
+ name: COMPONENT_NAME$1
20128
+ });
20129
+ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
20130
+ ...__default__$h,
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
+ };
18246
20726
  }
18247
- };
20727
+ });
20728
+ var Cascader$1 = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "cascader.vue"]]);
20729
+
20730
+ const ElCascader = withInstall(Cascader$1);
18248
20731
 
18249
20732
  const REPEAT_INTERVAL = 100;
18250
20733
  const REPEAT_DELAY = 600;
@@ -18282,22 +20765,22 @@
18282
20765
  }
18283
20766
  };
18284
20767
 
18285
- const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
20768
+ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
18286
20769
  inheritAttrs: false
18287
20770
  });
18288
20771
  function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
18289
20772
  return vue.renderSlot(_ctx.$slots, "default");
18290
20773
  }
18291
- var Collection = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$8], ["__file", "collection.vue"]]);
20774
+ var Collection = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$8], ["__file", "collection.vue"]]);
18292
20775
 
18293
- const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
20776
+ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
18294
20777
  name: "ElCollectionItem",
18295
20778
  inheritAttrs: false
18296
20779
  });
18297
20780
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
18298
20781
  return vue.renderSlot(_ctx.$slots, "default");
18299
20782
  }
18300
- var CollectionItem = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$7], ["__file", "collection-item.vue"]]);
20783
+ var CollectionItem = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$7], ["__file", "collection-item.vue"]]);
18301
20784
 
18302
20785
  const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
18303
20786
  const createCollectionWithScope = (name) => {
@@ -18443,12 +20926,6 @@
18443
20926
  buildProps({
18444
20927
  onKeydown: { type: definePropType(Function) }
18445
20928
  });
18446
- [
18447
- EVENT_CODE.down,
18448
- EVENT_CODE.pageDown,
18449
- EVENT_CODE.home
18450
- ];
18451
- [EVENT_CODE.up, EVENT_CODE.pageUp, EVENT_CODE.end];
18452
20929
  createCollectionWithScope("Dropdown");
18453
20930
 
18454
20931
  const inputNumberProps = buildProps({
@@ -18507,11 +20984,11 @@
18507
20984
  [UPDATE_MODEL_EVENT]: (val) => isNumber(val) || isNil(val)
18508
20985
  };
18509
20986
 
18510
- const __default__$e = vue.defineComponent({
20987
+ const __default__$g = vue.defineComponent({
18511
20988
  name: "ElInputNumber"
18512
20989
  });
18513
- const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
18514
- ...__default__$e,
20990
+ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
20991
+ ...__default__$g,
18515
20992
  props: inputNumberProps,
18516
20993
  emits: inputNumberEmits,
18517
20994
  setup(__props, { expose, emit }) {
@@ -18837,7 +21314,7 @@
18837
21314
  };
18838
21315
  }
18839
21316
  });
18840
- var InputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "input-number.vue"]]);
21317
+ var InputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__file", "input-number.vue"]]);
18841
21318
 
18842
21319
  const ElInputNumber = withInstall(InputNumber);
18843
21320
 
@@ -18884,11 +21361,11 @@
18884
21361
  click: (evt) => evt instanceof MouseEvent
18885
21362
  };
18886
21363
 
18887
- const __default__$d = vue.defineComponent({
21364
+ const __default__$f = vue.defineComponent({
18888
21365
  name: "ElLink"
18889
21366
  });
18890
- const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
18891
- ...__default__$d,
21367
+ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
21368
+ ...__default__$f,
18892
21369
  props: linkProps,
18893
21370
  emits: linkEmits,
18894
21371
  setup(__props, { emit }) {
@@ -18928,7 +21405,7 @@
18928
21405
  };
18929
21406
  }
18930
21407
  });
18931
- var Link = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__file", "link.vue"]]);
21408
+ var Link = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "link.vue"]]);
18932
21409
 
18933
21410
  const ElLink = withInstall(Link);
18934
21411
 
@@ -18939,12 +21416,12 @@
18939
21416
  const select = vue.inject(selectKey);
18940
21417
  const selectGroup = vue.inject(selectGroupKey, { disabled: false });
18941
21418
  const itemSelected = vue.computed(() => {
18942
- return contains(castArray(select.props.modelValue), props.value);
21419
+ return contains(castArray$1(select.props.modelValue), props.value);
18943
21420
  });
18944
21421
  const limitReached = vue.computed(() => {
18945
21422
  var _a;
18946
21423
  if (select.props.multiple) {
18947
- const modelValue = castArray((_a = select.props.modelValue) != null ? _a : []);
21424
+ const modelValue = castArray$1((_a = select.props.modelValue) != null ? _a : []);
18948
21425
  return !itemSelected.value && modelValue.length >= select.props.multipleLimit && select.props.multipleLimit > 0;
18949
21426
  } else {
18950
21427
  return false;
@@ -19010,7 +21487,7 @@
19010
21487
  };
19011
21488
  }
19012
21489
 
19013
- const _sfc_main$k = vue.defineComponent({
21490
+ const _sfc_main$m = vue.defineComponent({
19014
21491
  name: "ElOption",
19015
21492
  componentName: "ElOption",
19016
21493
  props: {
@@ -19100,9 +21577,9 @@
19100
21577
  [vue.vShow, _ctx.visible]
19101
21578
  ]);
19102
21579
  }
19103
- var Option = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$6], ["__file", "option.vue"]]);
21580
+ var Option = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$6], ["__file", "option.vue"]]);
19104
21581
 
19105
- const _sfc_main$j = vue.defineComponent({
21582
+ const _sfc_main$l = vue.defineComponent({
19106
21583
  name: "ElSelectDropdown",
19107
21584
  componentName: "ElSelectDropdown",
19108
21585
  setup() {
@@ -19149,7 +21626,7 @@
19149
21626
  ], 2)) : vue.createCommentVNode("v-if", true)
19150
21627
  ], 6);
19151
21628
  }
19152
- var ElSelectMenu$1 = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$5], ["__file", "select-dropdown.vue"]]);
21629
+ var ElSelectMenu$1 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$5], ["__file", "select-dropdown.vue"]]);
19153
21630
 
19154
21631
  const useSelect$1 = (props, emit) => {
19155
21632
  const { t } = useLocale();
@@ -19289,7 +21766,7 @@
19289
21766
  });
19290
21767
  const shouldShowPlaceholder = vue.computed(() => {
19291
21768
  if (props.multiple && !isUndefined(props.modelValue)) {
19292
- return castArray(props.modelValue).length === 0 && !states.inputValue;
21769
+ return castArray$1(props.modelValue).length === 0 && !states.inputValue;
19293
21770
  }
19294
21771
  const value = isArray$1(props.modelValue) ? props.modelValue[0] : props.modelValue;
19295
21772
  return props.filterable || isUndefined(value) ? !states.inputValue : true;
@@ -19385,7 +21862,7 @@
19385
21862
  }
19386
21863
  const result = [];
19387
21864
  if (!isUndefined(props.modelValue)) {
19388
- castArray(props.modelValue).forEach((value) => {
21865
+ castArray$1(props.modelValue).forEach((value) => {
19389
21866
  result.push(getOption(value));
19390
21867
  });
19391
21868
  }
@@ -19466,7 +21943,7 @@
19466
21943
  if (e.code === EVENT_CODE.delete)
19467
21944
  return;
19468
21945
  if (e.target.value.length <= 0) {
19469
- const value = castArray(props.modelValue).slice();
21946
+ const value = castArray$1(props.modelValue).slice();
19470
21947
  const lastNotDisabledIndex = getLastNotDisabledIndex(value);
19471
21948
  if (lastNotDisabledIndex < 0)
19472
21949
  return;
@@ -19480,7 +21957,7 @@
19480
21957
  const deleteTag = (event, tag) => {
19481
21958
  const index = states.selected.indexOf(tag);
19482
21959
  if (index > -1 && !selectDisabled.value) {
19483
- const value = castArray(props.modelValue).slice();
21960
+ const value = castArray$1(props.modelValue).slice();
19484
21961
  value.splice(index, 1);
19485
21962
  emit(UPDATE_MODEL_EVENT, value);
19486
21963
  emitChange(value);
@@ -19508,7 +21985,7 @@
19508
21985
  const handleOptionSelect = (option) => {
19509
21986
  var _a;
19510
21987
  if (props.multiple) {
19511
- const value = castArray((_a = props.modelValue) != null ? _a : []).slice();
21988
+ const value = castArray$1((_a = props.modelValue) != null ? _a : []).slice();
19512
21989
  const optionIndex = getValueIndex(value, option);
19513
21990
  if (optionIndex > -1) {
19514
21991
  value.splice(optionIndex, 1);
@@ -19915,7 +22392,7 @@
19915
22392
  });
19916
22393
 
19917
22394
  const COMPONENT_NAME = "ElSelect";
19918
- const _sfc_main$i = vue.defineComponent({
22395
+ const _sfc_main$k = vue.defineComponent({
19919
22396
  name: COMPONENT_NAME,
19920
22397
  componentName: COMPONENT_NAME,
19921
22398
  components: {
@@ -20325,9 +22802,9 @@
20325
22802
  [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
20326
22803
  ]);
20327
22804
  }
20328
- var Select$1 = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$4], ["__file", "select.vue"]]);
22805
+ var Select$1 = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$4], ["__file", "select.vue"]]);
20329
22806
 
20330
- const _sfc_main$h = vue.defineComponent({
22807
+ const _sfc_main$j = vue.defineComponent({
20331
22808
  name: "ElOptionGroup",
20332
22809
  componentName: "ElOptionGroup",
20333
22810
  props: {
@@ -20348,7 +22825,7 @@
20348
22825
  return ((_a = node.type) == null ? void 0 : _a.name) === "ElOption" && !!((_b = node.component) == null ? void 0 : _b.proxy);
20349
22826
  };
20350
22827
  const flattedChildren = (node) => {
20351
- const Nodes = castArray(node);
22828
+ const Nodes = castArray$1(node);
20352
22829
  const children2 = [];
20353
22830
  Nodes.forEach((child) => {
20354
22831
  var _a, _b;
@@ -20399,7 +22876,7 @@
20399
22876
  [vue.vShow, _ctx.visible]
20400
22877
  ]);
20401
22878
  }
20402
- var OptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$3], ["__file", "option-group.vue"]]);
22879
+ var OptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$3], ["__file", "option-group.vue"]]);
20403
22880
 
20404
22881
  const ElSelect = withInstall(Select$1, {
20405
22882
  Option,
@@ -20470,11 +22947,11 @@
20470
22947
  };
20471
22948
 
20472
22949
  const updateEventKeyRaw = `onUpdate:visible`;
20473
- const __default__$c = vue.defineComponent({
22950
+ const __default__$e = vue.defineComponent({
20474
22951
  name: "ElPopover"
20475
22952
  });
20476
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
20477
- ...__default__$c,
22953
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
22954
+ ...__default__$e,
20478
22955
  props: popoverProps,
20479
22956
  emits: popoverEmits,
20480
22957
  setup(__props, { expose, emit }) {
@@ -20573,7 +23050,7 @@
20573
23050
  };
20574
23051
  }
20575
23052
  });
20576
- var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "popover.vue"]]);
23053
+ var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "popover.vue"]]);
20577
23054
 
20578
23055
  const attachEvents = (el, binding) => {
20579
23056
  const popperComponent = binding.arg || binding.value;
@@ -20597,7 +23074,7 @@
20597
23074
  directive: ElPopoverDirective
20598
23075
  });
20599
23076
 
20600
- const _sfc_main$f = vue.defineComponent({
23077
+ const _sfc_main$h = vue.defineComponent({
20601
23078
  props: {
20602
23079
  item: {
20603
23080
  type: Object,
@@ -20621,7 +23098,7 @@
20621
23098
  style: vue.normalizeStyle({ ..._ctx.style, lineHeight: `${_ctx.height}px` })
20622
23099
  }, vue.toDisplayString(_ctx.item.label), 7);
20623
23100
  }
20624
- var GroupItem = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$2], ["__file", "group-item.vue"]]);
23101
+ var GroupItem = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$2], ["__file", "group-item.vue"]]);
20625
23102
 
20626
23103
  function useOption(props, { emit }) {
20627
23104
  return {
@@ -20814,7 +23291,7 @@
20814
23291
 
20815
23292
  const selectV2InjectionKey = Symbol("ElSelectV2Injection");
20816
23293
 
20817
- const _sfc_main$e = vue.defineComponent({
23294
+ const _sfc_main$g = vue.defineComponent({
20818
23295
  props: OptionProps,
20819
23296
  emits: optionEmits,
20820
23297
  setup(props, { emit }) {
@@ -20853,7 +23330,7 @@
20853
23330
  ])
20854
23331
  ], 46, ["aria-selected", "onMousemove", "onClick"]);
20855
23332
  }
20856
- var OptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$1], ["__file", "option-item.vue"]]);
23333
+ var OptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$1], ["__file", "option-item.vue"]]);
20857
23334
 
20858
23335
  var safeIsNaN = Number.isNaN || function ponyfill(value) {
20859
23336
  return typeof value === "number" && value !== value;
@@ -22867,7 +25344,7 @@
22867
25344
  };
22868
25345
  };
22869
25346
 
22870
- const _sfc_main$d = vue.defineComponent({
25347
+ const _sfc_main$f = vue.defineComponent({
22871
25348
  name: "ElSelectV2",
22872
25349
  components: {
22873
25350
  ElSelectMenu,
@@ -23254,22 +25731,22 @@
23254
25731
  [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
23255
25732
  ]);
23256
25733
  }
23257
- var Select = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render], ["__file", "select.vue"]]);
25734
+ var Select = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render], ["__file", "select.vue"]]);
23258
25735
 
23259
25736
  const ElSelectV2 = withInstall(Select);
23260
25737
 
23261
- const _hoisted_1$a = ["onClick"];
25738
+ const _hoisted_1$b = ["onClick"];
23262
25739
  const _hoisted_2$9 = { class: "hzzt-dropdown-name" };
23263
25740
  const _hoisted_3$6 = /* @__PURE__ */ vue.createElementVNode("span", { class: "caret" }, null, -1);
23264
25741
  const _hoisted_4$5 = { class: "hzzt-dropdown-menu" };
23265
25742
  const _hoisted_5$3 = ["onClick"];
23266
25743
  const _hoisted_6$3 = { class: "submenu" };
23267
25744
  const _hoisted_7$3 = ["onClick"];
23268
- const __default__$b = vue.defineComponent({
25745
+ const __default__$d = vue.defineComponent({
23269
25746
  name: "HzztDropDown"
23270
25747
  });
23271
- const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
23272
- ...__default__$b,
25748
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
25749
+ ...__default__$d,
23273
25750
  props: {
23274
25751
  options: {
23275
25752
  type: definePropType$1(Array),
@@ -23329,7 +25806,7 @@
23329
25806
  vue.createElementVNode("ul", _hoisted_4$5, [
23330
25807
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.options, (option, index) => {
23331
25808
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
23332
- 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", {
23333
25810
  key: index,
23334
25811
  class: vue.normalizeClass({
23335
25812
  "hzzt-dropdown-menu-item": true,
@@ -23372,17 +25849,17 @@
23372
25849
  }), 256))
23373
25850
  ])
23374
25851
  ], 2)
23375
- ], 8, _hoisted_1$a)), [
25852
+ ], 8, _hoisted_1$b)), [
23376
25853
  [vue.unref(ClickOutside), close]
23377
25854
  ]);
23378
25855
  };
23379
25856
  }
23380
25857
  });
23381
- var Dropdown = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__file", "index.vue"]]);
25858
+ var Dropdown = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__file", "index.vue"]]);
23382
25859
 
23383
25860
  const HzztDropdown = withInstall$1(Dropdown);
23384
25861
 
23385
- const _hoisted_1$9 = { class: "hzzt-collapse" };
25862
+ const _hoisted_1$a = { class: "hzzt-collapse" };
23386
25863
  const _hoisted_2$8 = { class: "flex align-items-center" };
23387
25864
  const _hoisted_3$5 = { class: "hzzt-collapse-title-wrapper" };
23388
25865
  const _hoisted_4$4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
@@ -23392,11 +25869,11 @@
23392
25869
  key: 0,
23393
25870
  class: "hzzt-collapse-text"
23394
25871
  };
23395
- const __default__$a = vue.defineComponent({
25872
+ const __default__$c = vue.defineComponent({
23396
25873
  name: "HzztCollapse"
23397
25874
  });
23398
- const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
23399
- ...__default__$a,
25875
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
25876
+ ...__default__$c,
23400
25877
  props: {
23401
25878
  defaultActive: {
23402
25879
  type: Boolean,
@@ -23422,7 +25899,7 @@
23422
25899
  active.value = !active.value;
23423
25900
  }
23424
25901
  return (_ctx, _cache) => {
23425
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
25902
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
23426
25903
  vue.createElementVNode("div", {
23427
25904
  class: "hzzt-collapse-header",
23428
25905
  onClick: toggle
@@ -23442,11 +25919,11 @@
23442
25919
  };
23443
25920
  }
23444
25921
  });
23445
- var Collapse = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["__file", "collapse.vue"]]);
25922
+ var Collapse = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__file", "collapse.vue"]]);
23446
25923
 
23447
25924
  const HzztCollapse = withInstall$1(Collapse);
23448
25925
 
23449
- const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
25926
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
23450
25927
  __name: "index",
23451
25928
  props: {
23452
25929
  name: {
@@ -23472,9 +25949,9 @@
23472
25949
  };
23473
25950
  }
23474
25951
  });
23475
- var HzztIcon$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__file", "index.vue"]]);
25952
+ var HzztIcon$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__file", "index.vue"]]);
23476
25953
 
23477
- const _hoisted_1$8 = { class: "hzzt-tab flex align-items-center justify-content-between wrap" };
25954
+ const _hoisted_1$9 = { class: "hzzt-tab flex align-items-center justify-content-between wrap" };
23478
25955
  const _hoisted_2$7 = { class: "flex align-items-center" };
23479
25956
  const _hoisted_3$4 = { class: "flex" };
23480
25957
  const _hoisted_4$3 = ["onClick"];
@@ -23484,11 +25961,11 @@
23484
25961
  class: "hzzt-tab-badge-count"
23485
25962
  };
23486
25963
  const _hoisted_7$1 = { class: "flex wrap" };
23487
- const __default__$9 = vue.defineComponent({
25964
+ const __default__$b = vue.defineComponent({
23488
25965
  name: "HzztTab"
23489
25966
  });
23490
- const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
23491
- ...__default__$9,
25967
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
25968
+ ...__default__$b,
23492
25969
  props: {
23493
25970
  tabList: {
23494
25971
  type: Array,
@@ -23525,7 +26002,7 @@
23525
26002
  emit("tab-close", index);
23526
26003
  }
23527
26004
  return (_ctx, _cache) => {
23528
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
26005
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
23529
26006
  vue.createElementVNode("div", _hoisted_2$7, [
23530
26007
  vue.createElementVNode("div", _hoisted_3$4, [
23531
26008
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(customTabList), (tab, index) => {
@@ -23559,7 +26036,7 @@
23559
26036
  };
23560
26037
  }
23561
26038
  });
23562
- var Tab = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__file", "index.vue"]]);
26039
+ var Tab = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["__file", "index.vue"]]);
23563
26040
 
23564
26041
  const HzztTab = withInstall$1(Tab);
23565
26042
 
@@ -23575,15 +26052,15 @@
23575
26052
  return `hzzt-el${name.replace(/[A-Z]/g, (match) => `-${match.toLocaleLowerCase()}`)}`;
23576
26053
  }
23577
26054
 
23578
- const _hoisted_1$7 = { class: "flex justify-content-between hzzt-pagination" };
26055
+ const _hoisted_1$8 = { class: "flex justify-content-between hzzt-pagination" };
23579
26056
  const _hoisted_2$6 = { class: "flex align-items-center font-12 hzzt-pagination-total" };
23580
26057
  const _hoisted_3$3 = { class: "flex align-items-center hzzt-pagination-page font-14" };
23581
26058
  const _hoisted_4$2 = { class: "flex" };
23582
- const __default__$8 = vue.defineComponent({
26059
+ const __default__$a = vue.defineComponent({
23583
26060
  name: "HzztPagination"
23584
26061
  });
23585
- const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
23586
- ...__default__$8,
26062
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
26063
+ ...__default__$a,
23587
26064
  props: {
23588
26065
  pagination: {
23589
26066
  type: Object,
@@ -23613,7 +26090,7 @@
23613
26090
  }
23614
26091
  }
23615
26092
  return (_ctx, _cache) => {
23616
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
26093
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
23617
26094
  vue.createElementVNode("p", _hoisted_2$6, vue.toDisplayString(vue.unref(t)("hzzt.pagination.total")) + vue.toDisplayString(__props.pagination.total) + vue.toDisplayString(vue.unref(t)("hzzt.pagination.strip")), 1),
23618
26095
  vue.createElementVNode("div", _hoisted_3$3, [
23619
26096
  vue.renderSlot(_ctx.$slots, "right"),
@@ -23633,18 +26110,18 @@
23633
26110
  };
23634
26111
  }
23635
26112
  });
23636
- var Pagination = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["__file", "index.vue"]]);
26113
+ var Pagination = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__file", "index.vue"]]);
23637
26114
 
23638
26115
  const HzztPagination = withInstall$1(Pagination);
23639
26116
 
23640
- const _hoisted_1$6 = { class: "flex align-content-center" };
26117
+ const _hoisted_1$7 = { class: "flex align-content-center" };
23641
26118
  const _hoisted_2$5 = { style: { "max-width": "300px" } };
23642
26119
  const _hoisted_3$2 = { style: { "padding": "0", "margin": "0", "word-break": "break-all", "white-space": "pre-wrap" } };
23643
- const __default__$7 = vue.defineComponent({
26120
+ const __default__$9 = vue.defineComponent({
23644
26121
  name: "HzztTooltip"
23645
26122
  });
23646
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
23647
- ...__default__$7,
26123
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
26124
+ ...__default__$9,
23648
26125
  props: {
23649
26126
  content: {
23650
26127
  type: String,
@@ -23655,7 +26132,7 @@
23655
26132
  setup(__props, { emit }) {
23656
26133
  const attrs = vue.useAttrs();
23657
26134
  return (_ctx, _cache) => {
23658
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
26135
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
23659
26136
  vue.createVNode(vue.unref(ElTooltip), vue.mergeProps({ effect: "dark" }, vue.unref(attrs)), {
23660
26137
  content: vue.withCtx(() => [
23661
26138
  vue.renderSlot(_ctx.$slots, "content", {}, () => [
@@ -23678,11 +26155,11 @@
23678
26155
  };
23679
26156
  }
23680
26157
  });
23681
- var Tooltip = /* @__PURE__ */ _export_sfc$1(_sfc_main$7, [["__file", "tooltip.vue"]]);
26158
+ var Tooltip = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__file", "tooltip.vue"]]);
23682
26159
 
23683
26160
  const HzztTooltip = withInstall$1(Tooltip);
23684
26161
 
23685
- const _hoisted_1$5 = {
26162
+ const _hoisted_1$6 = {
23686
26163
  key: 0,
23687
26164
  style: { "white-space": "nowrap" }
23688
26165
  };
@@ -23695,11 +26172,11 @@
23695
26172
  key: 0,
23696
26173
  class: "margin-l-1 margin-r-2"
23697
26174
  };
23698
- const __default__$6 = vue.defineComponent({
26175
+ const __default__$8 = vue.defineComponent({
23699
26176
  name: "HzztPageSize"
23700
26177
  });
23701
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
23702
- ...__default__$6,
26178
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
26179
+ ...__default__$8,
23703
26180
  props: {
23704
26181
  modelValue: {
23705
26182
  type: Number,
@@ -23756,7 +26233,7 @@
23756
26233
  return vue.openBlock(), vue.createElementBlock("main", {
23757
26234
  class: vue.normalizeClass([vue.unref(compKls), "flex wrap align-items-center justify-content-end"])
23758
26235
  }, [
23759
- __props.total > 0 && !__props.isManual ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$5, vue.toDisplayString(vue.unref(t)("hzzt.pageSize.total")) + vue.toDisplayString(__props.total) + vue.toDisplayString(vue.unref(t)("hzzt.pageSize.strip")), 1)) : vue.createCommentVNode("v-if", true),
26236
+ __props.total > 0 && !__props.isManual ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$6, vue.toDisplayString(vue.unref(t)("hzzt.pageSize.total")) + vue.toDisplayString(__props.total) + vue.toDisplayString(vue.unref(t)("hzzt.pageSize.strip")), 1)) : vue.createCommentVNode("v-if", true),
23760
26237
  __props.isManual ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$4, vue.toDisplayString(vue.unref(t)("hzzt.pageSize.d")) + vue.toDisplayString(__props.modelValue) + vue.toDisplayString(vue.unref(t)("hzzt.pageSize.page")), 1)) : vue.createCommentVNode("v-if", true),
23761
26238
  __props.pageSizeOptions.length ? (vue.openBlock(), vue.createElementBlock("div", {
23762
26239
  key: 2,
@@ -23826,15 +26303,15 @@
23826
26303
  };
23827
26304
  }
23828
26305
  });
23829
- var PageSize = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__file", "index.vue"]]);
26306
+ var PageSize = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["__file", "index.vue"]]);
23830
26307
 
23831
26308
  const HzztPageSize = withInstall$1(PageSize);
23832
26309
 
23833
- const __default__$5 = vue.defineComponent({
26310
+ const __default__$7 = vue.defineComponent({
23834
26311
  name: "HzztConfirmPassword"
23835
26312
  });
23836
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
23837
- ...__default__$5,
26313
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
26314
+ ...__default__$7,
23838
26315
  props: {
23839
26316
  placeholder: {
23840
26317
  type: String,
@@ -23894,16 +26371,16 @@
23894
26371
  };
23895
26372
  }
23896
26373
  });
23897
- var ConfirmPassword = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["__file", "confirm-password.vue"]]);
26374
+ var ConfirmPassword = /* @__PURE__ */ _export_sfc$1(_sfc_main$7, [["__file", "confirm-password.vue"]]);
23898
26375
 
23899
26376
  const HzztConfirmPassword = withInstall$1(ConfirmPassword);
23900
26377
 
23901
- const _hoisted_1$4 = ["onClick"];
23902
- const __default__$4 = vue.defineComponent({
26378
+ const _hoisted_1$5 = ["onClick"];
26379
+ const __default__$6 = vue.defineComponent({
23903
26380
  name: "HzztCheckButton"
23904
26381
  });
23905
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
23906
- ...__default__$4,
26382
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
26383
+ ...__default__$6,
23907
26384
  props: {
23908
26385
  options: {
23909
26386
  type: Array,
@@ -23964,7 +26441,7 @@
23964
26441
  ...vue.unref(spanKls)
23965
26442
  ], "flex-1"]),
23966
26443
  onClick: ($event) => selectValue(item.value)
23967
- }, vue.toDisplayString(item.label), 11, _hoisted_1$4)
26444
+ }, vue.toDisplayString(item.label), 11, _hoisted_1$5)
23968
26445
  ]),
23969
26446
  _: 2
23970
26447
  }, 1032, ["hidden", "value"]);
@@ -23973,7 +26450,7 @@
23973
26450
  };
23974
26451
  }
23975
26452
  });
23976
- var CheckButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__file", "index.vue"]]);
26453
+ var CheckButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__file", "index.vue"]]);
23977
26454
 
23978
26455
  const HzztCheckButton = withInstall$1(CheckButton);
23979
26456
 
@@ -24186,11 +26663,11 @@
24186
26663
  var dayjs = dayjs_min.exports;
24187
26664
 
24188
26665
  const parseDate = function(date, format, lang) {
24189
- 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);
24190
26667
  return day.isValid() ? day : void 0;
24191
26668
  };
24192
26669
  const formatter = function(date, format, lang) {
24193
- if (isEmpty(format))
26670
+ if (isEmpty$1(format))
24194
26671
  return date;
24195
26672
  if (format === "x")
24196
26673
  return +date;
@@ -24214,7 +26691,7 @@
24214
26691
  return Array.from({ length: n }).map((_, n2) => n2);
24215
26692
  }
24216
26693
 
24217
- const _hoisted_1$3 = { class: "el-date-picker" };
26694
+ const _hoisted_1$4 = { class: "el-date-picker" };
24218
26695
  const _hoisted_2$3 = { class: "el-picker-panel__body" };
24219
26696
  const _hoisted_3 = {
24220
26697
  class: "el-date-picker__header el-date-picker__header--bordered",
@@ -24231,11 +26708,11 @@
24231
26708
  const _hoisted_9 = { class: "cell" };
24232
26709
  const _hoisted_10 = { class: "cell" };
24233
26710
  const _hoisted_11 = { class: "cell" };
24234
- const __default__$3 = vue.defineComponent({
26711
+ const __default__$5 = vue.defineComponent({
24235
26712
  name: "HzztQuarterPicker"
24236
26713
  });
24237
- const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
24238
- ...__default__$3,
26714
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
26715
+ ...__default__$5,
24239
26716
  props: {
24240
26717
  size: useSizeProp$1,
24241
26718
  format: {
@@ -24413,7 +26890,7 @@
24413
26890
  }, 16, ["disabled", "size", "placeholder", "value"])
24414
26891
  ]),
24415
26892
  default: vue.withCtx(() => [
24416
- vue.createElementVNode("div", _hoisted_1$3, [
26893
+ vue.createElementVNode("div", _hoisted_1$4, [
24417
26894
  vue.createElementVNode("div", _hoisted_2$3, [
24418
26895
  vue.createElementVNode("div", _hoisted_3, [
24419
26896
  vue.createElementVNode("button", {
@@ -24475,7 +26952,7 @@
24475
26952
  };
24476
26953
  }
24477
26954
  });
24478
- var QuarterPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__file", "index.vue"]]);
26955
+ var QuarterPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["__file", "index.vue"]]);
24479
26956
 
24480
26957
  const HzztQuarterPicker = withInstall$1(QuarterPicker);
24481
26958
 
@@ -24499,7 +26976,7 @@
24499
26976
  [INPUT_EVENT$1]: (value) => isString$1(value)
24500
26977
  };
24501
26978
 
24502
- const _hoisted_1$2 = /* @__PURE__ */ vue.createElementVNode("div", { style: { "width": "0", "height": "0", "overflow": "hidden" } }, [
26979
+ const _hoisted_1$3 = /* @__PURE__ */ vue.createElementVNode("div", { style: { "width": "0", "height": "0", "overflow": "hidden" } }, [
24503
26980
  /* @__PURE__ */ vue.createElementVNode("input", {
24504
26981
  readonly: "",
24505
26982
  style: { "width": "0", "height": "0", "overflow": "hidden" }
@@ -24515,12 +26992,12 @@
24515
26992
  class: "width-100%",
24516
26993
  style: { "overflow": "hidden" }
24517
26994
  };
24518
- const __default__$2 = vue.defineComponent({
26995
+ const __default__$4 = vue.defineComponent({
24519
26996
  inheritAttrs: false,
24520
26997
  name: "HzztScan"
24521
26998
  });
24522
- const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
24523
- ...__default__$2,
26999
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
27000
+ ...__default__$4,
24524
27001
  props: scanProps,
24525
27002
  emits: scanEmits,
24526
27003
  setup(__props, { expose, emit }) {
@@ -24599,7 +27076,7 @@
24599
27076
  class: vue.normalizeClass(["hzzt-scan", _ctx.$attrs.class]),
24600
27077
  style: vue.normalizeStyle([{ "position": "relative" }, _ctx.$attrs.style])
24601
27078
  }, [
24602
- _hoisted_1$2,
27079
+ _hoisted_1$3,
24603
27080
  vue.createVNode(vue.unref(ElInput), vue.mergeProps({
24604
27081
  ref_key: "inputRef",
24605
27082
  ref: inputRef,
@@ -24639,7 +27116,7 @@
24639
27116
  };
24640
27117
  }
24641
27118
  });
24642
- var Scan = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["__file", "scan.vue"]]);
27119
+ var Scan = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__file", "scan.vue"]]);
24643
27120
 
24644
27121
  const HzztScan = withInstall$1(Scan);
24645
27122
 
@@ -24683,13 +27160,13 @@
24683
27160
  change: (value) => isString$1(value)
24684
27161
  };
24685
27162
 
24686
- const _hoisted_1$1 = { slot: "append" };
27163
+ const _hoisted_1$2 = { slot: "append" };
24687
27164
  const _hoisted_2$1 = { key: 0 };
24688
- const __default__$1 = vue.defineComponent({
27165
+ const __default__$3 = vue.defineComponent({
24689
27166
  name: "HzztSelectInput"
24690
27167
  });
24691
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
24692
- ...__default__$1,
27168
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
27169
+ ...__default__$3,
24693
27170
  props: selectInputProps,
24694
27171
  emits: selectInputEmits,
24695
27172
  setup(__props, { emit }) {
@@ -24772,7 +27249,7 @@
24772
27249
  onChange: change
24773
27250
  }), {
24774
27251
  default: vue.withCtx(() => [
24775
- vue.createElementVNode("template", _hoisted_1$1, [
27252
+ vue.createElementVNode("template", _hoisted_1$2, [
24776
27253
  vue.renderSlot(_ctx.$slots, "append")
24777
27254
  ])
24778
27255
  ]),
@@ -24798,7 +27275,7 @@
24798
27275
  };
24799
27276
  }
24800
27277
  });
24801
- var SelectInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__file", "select-input.vue"]]);
27278
+ var SelectInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__file", "select-input.vue"]]);
24802
27279
 
24803
27280
  const HzztSelectInput = withInstall$1(SelectInput);
24804
27281
 
@@ -24821,19 +27298,19 @@
24821
27298
  }
24822
27299
  });
24823
27300
  const selectTextareaEmits = {
24824
- [UPDATE_MODEL_EVENT$1]: (value) => isString$1(value),
24825
- input: (value) => isString$1(value),
24826
- change: (value) => isString$1(value),
24827
- select: (value) => isString$1(value)
27301
+ [UPDATE_MODEL_EVENT$1]: (val) => isString$1(val) || isNumber$1(val) || isBoolean$1(val),
27302
+ [CHANGE_EVENT$1]: (val) => isString$1(val) || isNumber$1(val) || isBoolean$1(val),
27303
+ [INPUT_EVENT$1]: (val) => isString$1(val) || isNumber$1(val) || isBoolean$1(val),
27304
+ select: (val) => isString$1(val) || isNumber$1(val) || isBoolean$1(val)
24828
27305
  };
24829
27306
 
24830
- const _hoisted_1 = { class: "flex column" };
27307
+ const _hoisted_1$1 = { class: "flex column" };
24831
27308
  const _hoisted_2 = { class: "flex align-items-center" };
24832
- const __default__ = vue.defineComponent({
27309
+ const __default__$2 = vue.defineComponent({
24833
27310
  name: "HzztSelectTextarea"
24834
27311
  });
24835
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
24836
- ...__default__,
27312
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
27313
+ ...__default__$2,
24837
27314
  props: selectTextareaProps,
24838
27315
  emits: selectTextareaEmits,
24839
27316
  setup(__props, { emit }) {
@@ -24869,9 +27346,10 @@
24869
27346
  function selectChange(val) {
24870
27347
  if (!inputVal.value && inputVal.value !== 0)
24871
27348
  inputVal.value = "";
27349
+ selectValue.value = "";
24872
27350
  let content = val;
24873
27351
  if (!props.replace) {
24874
- const inputEl = inputRef.value.getElementsByTagName("textarea")[0];
27352
+ const inputEl = inputRef.value.$el.getElementsByTagName("textarea")[0];
24875
27353
  content = insertCursorPosition(inputEl, val);
24876
27354
  }
24877
27355
  input(content);
@@ -24882,7 +27360,7 @@
24882
27360
  return vue.openBlock(), vue.createElementBlock("div", {
24883
27361
  class: vue.normalizeClass(vue.unref(containerCls))
24884
27362
  }, [
24885
- vue.createElementVNode("div", _hoisted_1, [
27363
+ vue.createElementVNode("div", _hoisted_1$1, [
24886
27364
  vue.createElementVNode("div", _hoisted_2, [
24887
27365
  vue.renderSlot(_ctx.$slots, "title", {}, () => [
24888
27366
  vue.createVNode(HzztTitle$1, {
@@ -24918,10 +27396,277 @@
24918
27396
  };
24919
27397
  }
24920
27398
  });
24921
- var SelectTextarea = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__file", "select-textarea.vue"]]);
27399
+ var SelectTextarea = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["__file", "select-textarea.vue"]]);
24922
27400
 
24923
27401
  const HzztSelectTextarea = withInstall$1(SelectTextarea);
24924
27402
 
27403
+ const inputRangeProps = buildProps$1({
27404
+ modelValue: {
27405
+ type: Array,
27406
+ default: () => []
27407
+ },
27408
+ size: useSizeProp$1,
27409
+ disabled: Boolean,
27410
+ clearable: {
27411
+ type: Boolean,
27412
+ default: false
27413
+ },
27414
+ startPlaceholder: String,
27415
+ endPlaceholder: String,
27416
+ startProps: Object,
27417
+ endProps: Object
27418
+ });
27419
+ const inputRangeEmits = {
27420
+ [UPDATE_MODEL_EVENT$1]: (val) => isArray$1(val),
27421
+ [CHANGE_EVENT$1]: (val) => isArray$1(val)
27422
+ };
27423
+
27424
+ const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("span", { class: "margin-h-1" }, "\u2014\u2014", -1);
27425
+ const __default__$1 = vue.defineComponent({
27426
+ name: "HzztInputRange"
27427
+ });
27428
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
27429
+ ...__default__$1,
27430
+ props: inputRangeProps,
27431
+ emits: inputRangeEmits,
27432
+ setup(__props, { emit }) {
27433
+ const props = __props;
27434
+ const startValue = vue.ref(props.modelValue[0]);
27435
+ const endValue = vue.ref(props.modelValue[1]);
27436
+ const nsInput = useNamespace$1("input-range");
27437
+ const formSize = useFormSize();
27438
+ const formDisabled = useFormDisabled();
27439
+ const trueSize = vue.computed(() => props.size || formSize.value || useGlobalSize$1().value);
27440
+ const trueDisabled = vue.computed(() => props.disabled || formDisabled.value);
27441
+ const containerCls = vue.computed(() => [
27442
+ nsInput.b(),
27443
+ nsInput.m(trueSize.value)
27444
+ ]);
27445
+ vue.watch(() => props.modelValue, (v) => {
27446
+ startValue.value = v[0];
27447
+ endValue.value = v[1];
27448
+ }, {
27449
+ deep: true
27450
+ });
27451
+ function change() {
27452
+ if (startValue.value || endValue.value) {
27453
+ const modelValue = [startValue.value, endValue.value];
27454
+ emit("update:modelValue", modelValue);
27455
+ emit("change", modelValue);
27456
+ } else if (!startValue.value && !endValue.value) {
27457
+ emit("update:modelValue", []);
27458
+ emit("change", []);
27459
+ }
27460
+ }
27461
+ return (_ctx, _cache) => {
27462
+ const _component_el_input = vue.resolveComponent("el-input");
27463
+ return vue.openBlock(), vue.createElementBlock("div", {
27464
+ class: vue.normalizeClass(["flex align-items-center", vue.unref(containerCls)])
27465
+ }, [
27466
+ vue.createVNode(_component_el_input, vue.mergeProps({
27467
+ modelValue: startValue.value,
27468
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => startValue.value = $event)
27469
+ }, _ctx.startProps, {
27470
+ clearable: _ctx.clearable,
27471
+ placeholder: _ctx.startPlaceholder,
27472
+ size: vue.unref(trueSize),
27473
+ disabled: vue.unref(trueDisabled),
27474
+ class: "flex-1",
27475
+ onChange: change
27476
+ }), null, 16, ["modelValue", "clearable", "placeholder", "size", "disabled"]),
27477
+ _hoisted_1,
27478
+ vue.createVNode(_component_el_input, vue.mergeProps({
27479
+ modelValue: endValue.value,
27480
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => endValue.value = $event)
27481
+ }, _ctx.endProps, {
27482
+ clearable: _ctx.clearable,
27483
+ placeholder: _ctx.endPlaceholder,
27484
+ size: vue.unref(trueSize),
27485
+ disabled: vue.unref(trueDisabled),
27486
+ class: "flex-1",
27487
+ onChange: change
27488
+ }), null, 16, ["modelValue", "clearable", "placeholder", "size", "disabled"])
27489
+ ], 2);
27490
+ };
27491
+ }
27492
+ });
27493
+ var InputRange = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__file", "input-range.vue"]]);
27494
+
27495
+ const HzztInputRange = withInstall$1(InputRange);
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__ = vue.defineComponent({
27554
+ name: "HzztCascader"
27555
+ });
27556
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
27557
+ ...__default__,
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, [["__file", "cascader.vue"]]);
27667
+
27668
+ const HzztCascader = withInstall$1(Cascader);
27669
+
24925
27670
  var Components = [
24926
27671
  HzztConfigProvider,
24927
27672
  HzztTitle,
@@ -24937,7 +27682,9 @@
24937
27682
  HzztQuarterPicker,
24938
27683
  HzztScan,
24939
27684
  HzztSelectInput,
24940
- HzztSelectTextarea
27685
+ HzztSelectTextarea,
27686
+ HzztInputRange,
27687
+ HzztCascader
24941
27688
  ];
24942
27689
 
24943
27690
  var Plugins = [];
@@ -25155,12 +27902,14 @@
25155
27902
  exports.Drag = Drag;
25156
27903
  exports.Height = Height;
25157
27904
  exports.Highlight = Highlight;
27905
+ exports.HzztCascader = HzztCascader;
25158
27906
  exports.HzztCheckButton = HzztCheckButton;
25159
27907
  exports.HzztCollapse = HzztCollapse;
25160
27908
  exports.HzztConfigProvider = HzztConfigProvider;
25161
27909
  exports.HzztConfirmPassword = HzztConfirmPassword;
25162
27910
  exports.HzztDropdown = HzztDropdown;
25163
27911
  exports.HzztIcon = HzztIcon;
27912
+ exports.HzztInputRange = HzztInputRange;
25164
27913
  exports.HzztPageSize = HzztPageSize;
25165
27914
  exports.HzztPagination = HzztPagination;
25166
27915
  exports.HzztQuarterPicker = HzztQuarterPicker;
@@ -25177,6 +27926,8 @@
25177
27926
  exports.WEEK_DAYS = WEEK_DAYS;
25178
27927
  exports.buildLocaleContext = buildLocaleContext$1;
25179
27928
  exports.buildTranslator = buildTranslator$1;
27929
+ exports.cascaderEmits = cascaderEmits;
27930
+ exports.cascaderProps = cascaderProps;
25180
27931
  exports.componentSizeMap = componentSizeMap;
25181
27932
  exports.componentSizes = componentSizes$1;
25182
27933
  exports.configProviderContextKey = configProviderContextKey$1;
@@ -25184,6 +27935,8 @@
25184
27935
  exports.datePickTypes = datePickTypes;
25185
27936
  exports["default"] = installer;
25186
27937
  exports.defaultNamespace = defaultNamespace$1;
27938
+ exports.inputRangeEmits = inputRangeEmits;
27939
+ exports.inputRangeProps = inputRangeProps;
25187
27940
  exports.insertCursorPosition = insertCursorPosition;
25188
27941
  exports.install = install;
25189
27942
  exports.localeContextKey = localeContextKey$1;