hzzt-plus 1.0.1 → 1.0.3

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 (154) hide show
  1. package/attributes.json +1 -0
  2. package/dist/index.full.js +3204 -304
  3. package/dist/index.full.min.js +16 -16
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +18 -18
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +3199 -306
  8. package/dist/locale/en.js +1 -1
  9. package/dist/locale/en.min.js +1 -1
  10. package/dist/locale/en.min.mjs +1 -1
  11. package/dist/locale/en.mjs +1 -1
  12. package/dist/locale/zh-cn.js +1 -1
  13. package/dist/locale/zh-cn.min.js +1 -1
  14. package/dist/locale/zh-cn.min.mjs +1 -1
  15. package/dist/locale/zh-cn.mjs +1 -1
  16. package/es/component.mjs +5 -1
  17. package/es/component.mjs.map +1 -1
  18. package/es/components/collapse/index.mjs +2 -2
  19. package/es/components/collapse/src/collapse.mjs +67 -0
  20. package/es/components/collapse/src/collapse.mjs.map +1 -1
  21. package/es/components/collapse/src/collapse2.mjs +0 -67
  22. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  23. package/es/components/dropdown/index.d.ts +5 -5
  24. package/es/components/dropdown/src/index.mjs +3 -2
  25. package/es/components/dropdown/src/index.mjs.map +1 -1
  26. package/es/components/dropdown/src/index.vue.d.ts +6 -5
  27. package/es/components/index.d.ts +2 -0
  28. package/es/components/index.mjs +4 -0
  29. package/es/components/index.mjs.map +1 -1
  30. package/es/components/input-range/index.d.ts +5 -0
  31. package/es/components/input-range/index.mjs +9 -0
  32. package/es/components/input-range/index.mjs.map +1 -0
  33. package/es/components/input-range/src/input-range.d.ts +24 -0
  34. package/es/components/input-range/src/input-range.mjs +31 -0
  35. package/es/components/input-range/src/input-range.mjs.map +1 -0
  36. package/es/components/input-range/src/input-range.vue.d.ts +86 -0
  37. package/es/components/input-range/src/input-range2.mjs +81 -0
  38. package/es/components/input-range/src/input-range2.mjs.map +1 -0
  39. package/es/components/input-range/style/css.d.ts +2 -0
  40. package/es/components/input-range/style/css.mjs +3 -0
  41. package/es/components/input-range/style/css.mjs.map +1 -0
  42. package/es/components/input-range/style/index.d.ts +2 -0
  43. package/es/components/input-range/style/index.mjs +3 -0
  44. package/es/components/input-range/style/index.mjs.map +1 -0
  45. package/es/components/page-size/index.d.ts +1 -1
  46. package/es/components/page-size/src/index.mjs.map +1 -1
  47. package/es/components/page-size/src/index.vue.d.ts +1 -1
  48. package/es/components/scan/src/scan2.mjs.map +1 -1
  49. package/es/components/select-input/index.d.ts +10 -10
  50. package/es/components/select-input/src/select-input.d.ts +3 -3
  51. package/es/components/select-input/src/select-input.mjs.map +1 -1
  52. package/es/components/select-input/src/select-input.vue.d.ts +10 -10
  53. package/es/components/select-textarea/index.d.ts +5 -0
  54. package/es/components/select-textarea/index.mjs +9 -0
  55. package/es/components/select-textarea/index.mjs.map +1 -0
  56. package/es/components/select-textarea/src/select-textarea.d.ts +26 -0
  57. package/es/components/select-textarea/src/select-textarea.mjs +36 -0
  58. package/es/components/select-textarea/src/select-textarea.mjs.map +1 -0
  59. package/es/components/select-textarea/src/select-textarea.vue.d.ts +13075 -0
  60. package/es/components/select-textarea/src/select-textarea2.mjs +105 -0
  61. package/es/components/select-textarea/src/select-textarea2.mjs.map +1 -0
  62. package/es/components/select-textarea/style/css.d.ts +2 -0
  63. package/es/components/select-textarea/style/css.mjs +3 -0
  64. package/es/components/select-textarea/style/css.mjs.map +1 -0
  65. package/es/components/select-textarea/style/index.d.ts +2 -0
  66. package/es/components/select-textarea/style/index.mjs +3 -0
  67. package/es/components/select-textarea/style/index.mjs.map +1 -0
  68. package/es/components/title/src/title2.mjs +1 -2
  69. package/es/components/title/src/title2.mjs.map +1 -1
  70. package/es/hooks/index.d.ts +1 -0
  71. package/es/hooks/index.mjs +1 -0
  72. package/es/hooks/index.mjs.map +1 -1
  73. package/es/hooks/use-cursor/index.d.ts +1 -0
  74. package/es/hooks/use-cursor/index.mjs +14 -0
  75. package/es/hooks/use-cursor/index.mjs.map +1 -0
  76. package/es/index.mjs +5 -0
  77. package/es/index.mjs.map +1 -1
  78. package/es/version.d.ts +1 -1
  79. package/es/version.mjs +1 -1
  80. package/es/version.mjs.map +1 -1
  81. package/global.d.ts +2 -0
  82. package/lib/component.js +5 -1
  83. package/lib/component.js.map +1 -1
  84. package/lib/components/collapse/index.js +2 -2
  85. package/lib/components/collapse/src/collapse.js +70 -0
  86. package/lib/components/collapse/src/collapse.js.map +1 -1
  87. package/lib/components/collapse/src/collapse2.js +0 -70
  88. package/lib/components/collapse/src/collapse2.js.map +1 -1
  89. package/lib/components/dropdown/index.d.ts +5 -5
  90. package/lib/components/dropdown/src/index.js +3 -2
  91. package/lib/components/dropdown/src/index.js.map +1 -1
  92. package/lib/components/dropdown/src/index.vue.d.ts +6 -5
  93. package/lib/components/index.d.ts +2 -0
  94. package/lib/components/index.js +10 -0
  95. package/lib/components/index.js.map +1 -1
  96. package/lib/components/input-range/index.d.ts +5 -0
  97. package/lib/components/input-range/index.js +16 -0
  98. package/lib/components/input-range/index.js.map +1 -0
  99. package/lib/components/input-range/src/input-range.d.ts +24 -0
  100. package/lib/components/input-range/src/input-range.js +36 -0
  101. package/lib/components/input-range/src/input-range.js.map +1 -0
  102. package/lib/components/input-range/src/input-range.vue.d.ts +86 -0
  103. package/lib/components/input-range/src/input-range2.js +85 -0
  104. package/lib/components/input-range/src/input-range2.js.map +1 -0
  105. package/lib/components/input-range/style/css.d.ts +2 -0
  106. package/lib/components/input-range/style/css.js +6 -0
  107. package/lib/components/input-range/style/css.js.map +1 -0
  108. package/lib/components/input-range/style/index.d.ts +2 -0
  109. package/lib/components/input-range/style/index.js +6 -0
  110. package/lib/components/input-range/style/index.js.map +1 -0
  111. package/lib/components/page-size/index.d.ts +1 -1
  112. package/lib/components/page-size/src/index.js.map +1 -1
  113. package/lib/components/page-size/src/index.vue.d.ts +1 -1
  114. package/lib/components/scan/src/scan2.js.map +1 -1
  115. package/lib/components/select-input/index.d.ts +10 -10
  116. package/lib/components/select-input/src/select-input.d.ts +3 -3
  117. package/lib/components/select-input/src/select-input.js.map +1 -1
  118. package/lib/components/select-input/src/select-input.vue.d.ts +10 -10
  119. package/lib/components/select-textarea/index.d.ts +5 -0
  120. package/lib/components/select-textarea/index.js +16 -0
  121. package/lib/components/select-textarea/index.js.map +1 -0
  122. package/lib/components/select-textarea/src/select-textarea.d.ts +26 -0
  123. package/lib/components/select-textarea/src/select-textarea.js +41 -0
  124. package/lib/components/select-textarea/src/select-textarea.js.map +1 -0
  125. package/lib/components/select-textarea/src/select-textarea.vue.d.ts +13075 -0
  126. package/lib/components/select-textarea/src/select-textarea2.js +109 -0
  127. package/lib/components/select-textarea/src/select-textarea2.js.map +1 -0
  128. package/lib/components/select-textarea/style/css.d.ts +2 -0
  129. package/lib/components/select-textarea/style/css.js +6 -0
  130. package/lib/components/select-textarea/style/css.js.map +1 -0
  131. package/lib/components/select-textarea/style/index.d.ts +2 -0
  132. package/lib/components/select-textarea/style/index.js +6 -0
  133. package/lib/components/select-textarea/style/index.js.map +1 -0
  134. package/lib/components/title/src/title2.js +1 -2
  135. package/lib/components/title/src/title2.js.map +1 -1
  136. package/lib/hooks/index.d.ts +1 -0
  137. package/lib/hooks/index.js +2 -0
  138. package/lib/hooks/index.js.map +1 -1
  139. package/lib/hooks/use-cursor/index.d.ts +1 -0
  140. package/lib/hooks/use-cursor/index.js +18 -0
  141. package/lib/hooks/use-cursor/index.js.map +1 -0
  142. package/lib/index.js +40 -28
  143. package/lib/index.js.map +1 -1
  144. package/lib/version.d.ts +1 -1
  145. package/lib/version.js +1 -1
  146. package/lib/version.js.map +1 -1
  147. package/package.json +1 -1
  148. package/tags.json +1 -0
  149. package/theme/hzzt-input-range.css +0 -0
  150. package/theme/hzzt-select-textarea.css +0 -0
  151. package/theme/src/index.scss +2 -0
  152. package/theme/src/input-range.scss +0 -0
  153. package/theme/src/select-textarea.scss +0 -0
  154. package/web-types.json +1 -0
@@ -1,4 +1,4 @@
1
- /*! Hzzt Plus v0.0.1 */
1
+ /*! Hzzt Plus v1.0.2 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
@@ -4293,7 +4293,7 @@
4293
4293
  var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
4294
4294
 
4295
4295
  var boolTag = "[object Boolean]";
4296
- function isBoolean$1(value) {
4296
+ function isBoolean$2(value) {
4297
4297
  return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
4298
4298
  }
4299
4299
 
@@ -4335,7 +4335,7 @@
4335
4335
  return true;
4336
4336
  }
4337
4337
 
4338
- function isEqual(value, other) {
4338
+ function isEqual$1(value, other) {
4339
4339
  return baseIsEqual(value, other);
4340
4340
  }
4341
4341
 
@@ -6341,12 +6341,12 @@
6341
6341
  isArrayBuffer,
6342
6342
  isArrayLike,
6343
6343
  isArrayLikeObject,
6344
- isBoolean: isBoolean$1,
6344
+ isBoolean: isBoolean$2,
6345
6345
  isBuffer,
6346
6346
  isDate,
6347
6347
  isElement: isElement$1,
6348
6348
  isEmpty: isEmpty$1,
6349
- isEqual,
6349
+ isEqual: isEqual$1,
6350
6350
  isEqualWith,
6351
6351
  isError,
6352
6352
  isFinite,
@@ -7128,6 +7128,7 @@
7128
7128
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
7129
7129
  */
7130
7130
 
7131
+ const isBoolean$1 = (val) => typeof val === "boolean";
7131
7132
  const isNumber$1 = (val) => typeof val === "number";
7132
7133
  const isEmpty = (val) => !val && val !== 0 || isArray$1(val) && val.length === 0 || isObject$1(val) && !Object.keys(val).length;
7133
7134
 
@@ -12846,6 +12847,18 @@
12846
12847
  }
12847
12848
  }
12848
12849
 
12850
+ function insertCursorPosition(inputEl, content) {
12851
+ const startPos = inputEl.selectionStart || 0;
12852
+ const endPos = inputEl.selectionEnd || 0;
12853
+ const restoreTop = inputEl.scrollTop;
12854
+ inputEl.value = inputEl.value.substring(0, startPos) + content + inputEl.value.substring(endPos, inputEl.value.length);
12855
+ inputEl.focus();
12856
+ inputEl.scrollTop = restoreTop;
12857
+ inputEl.selectionStart = startPos + content.length;
12858
+ inputEl.selectionEnd = startPos + content.length;
12859
+ return inputEl.value;
12860
+ }
12861
+
12849
12862
  const configProviderContextKey$1 = Symbol();
12850
12863
 
12851
12864
  const globalConfig$1 = vue.ref();
@@ -12920,7 +12933,7 @@
12920
12933
 
12921
12934
  const HzztConfigProvider = withInstall$1(ConfigProvider$1);
12922
12935
 
12923
- const version$1 = "0.0.1";
12936
+ const version$1 = "1.0.2";
12924
12937
 
12925
12938
  const makeInstaller = (components = []) => {
12926
12939
  const install = (app, options) => {
@@ -12937,6 +12950,61 @@
12937
12950
  };
12938
12951
  };
12939
12952
 
12953
+ const titleProps = buildProps$1({
12954
+ label: String,
12955
+ sideline: {
12956
+ type: Boolean,
12957
+ default: true
12958
+ }
12959
+ });
12960
+
12961
+ var _export_sfc$1 = (sfc, props) => {
12962
+ const target = sfc.__vccOpts || sfc;
12963
+ for (const [key, val] of props) {
12964
+ target[key] = val;
12965
+ }
12966
+ return target;
12967
+ };
12968
+
12969
+ const _hoisted_1$c = {
12970
+ key: 0,
12971
+ class: "hzzt-title flex align-items-center"
12972
+ };
12973
+ const _hoisted_2$a = {
12974
+ key: 0,
12975
+ class: "decorative-line"
12976
+ };
12977
+ const _hoisted_3$7 = { class: "label-name" };
12978
+ const __default__$t = vue.defineComponent({
12979
+ name: "HzztTitle"
12980
+ });
12981
+ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
12982
+ ...__default__$t,
12983
+ props: titleProps,
12984
+ setup(__props) {
12985
+ const props = __props;
12986
+ const slots = vue.useSlots();
12987
+ const showLabel = vue.computed(() => {
12988
+ var _a, _b, _c;
12989
+ 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);
12990
+ });
12991
+ return (_ctx, _cache) => {
12992
+ return vue.unref(showLabel) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
12993
+ _ctx.sideline ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$a)) : vue.createCommentVNode("v-if", true),
12994
+ vue.renderSlot(_ctx.$slots, "before"),
12995
+ vue.createElementVNode("label", _hoisted_3$7, [
12996
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
12997
+ vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
12998
+ ])
12999
+ ])
13000
+ ])) : vue.createCommentVNode("v-if", true);
13001
+ };
13002
+ }
13003
+ });
13004
+ var HzztTitle$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$H, [["__file", "title.vue"]]);
13005
+
13006
+ const HzztTitle = withInstall$1(HzztTitle$1);
13007
+
12940
13008
  const configProviderContextKey = Symbol();
12941
13009
 
12942
13010
  const defaultNamespace = "el";
@@ -13376,7 +13444,7 @@
13376
13444
  const CHANGE_EVENT = "change";
13377
13445
  const INPUT_EVENT = "input";
13378
13446
 
13379
- var _export_sfc$1 = (sfc, props) => {
13447
+ var _export_sfc = (sfc, props) => {
13380
13448
  const target = sfc.__vccOpts || sfc;
13381
13449
  for (const [key, val] of props) {
13382
13450
  target[key] = val;
@@ -13384,6 +13452,9 @@
13384
13452
  return target;
13385
13453
  };
13386
13454
 
13455
+ const rAF = (fn) => isClient ? window.requestAnimationFrame(fn) : setTimeout(fn, 16);
13456
+ const cAF = (handle) => isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle);
13457
+
13387
13458
  function addUnit(value, defaultUnit = "px") {
13388
13459
  if (!value)
13389
13460
  return "";
@@ -13451,12 +13522,12 @@
13451
13522
  }
13452
13523
  });
13453
13524
 
13454
- const __default__$r = vue.defineComponent({
13525
+ const __default__$s = vue.defineComponent({
13455
13526
  name: "ElIcon",
13456
13527
  inheritAttrs: false
13457
13528
  });
13458
- const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
13459
- ...__default__$r,
13529
+ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
13530
+ ...__default__$s,
13460
13531
  props: iconProps,
13461
13532
  setup(__props) {
13462
13533
  const props = __props;
@@ -13480,7 +13551,7 @@
13480
13551
  };
13481
13552
  }
13482
13553
  });
13483
- var Icon = /* @__PURE__ */ _export_sfc$1(_sfc_main$C, [["__file", "icon.vue"]]);
13554
+ var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__file", "icon.vue"]]);
13484
13555
 
13485
13556
  const ElIcon = withInstall(Icon);
13486
13557
 
@@ -13918,12 +13989,12 @@
13918
13989
  return [recordCursor, setCursor];
13919
13990
  }
13920
13991
 
13921
- const __default__$q = vue.defineComponent({
13992
+ const __default__$r = vue.defineComponent({
13922
13993
  name: "ElInput",
13923
13994
  inheritAttrs: false
13924
13995
  });
13925
- const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
13926
- ...__default__$q,
13996
+ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
13997
+ ...__default__$r,
13927
13998
  props: inputProps,
13928
13999
  emits: inputEmits,
13929
14000
  setup(__props, { expose, emit }) {
@@ -14328,7 +14399,7 @@
14328
14399
  };
14329
14400
  }
14330
14401
  });
14331
- var Input = /* @__PURE__ */ _export_sfc$1(_sfc_main$B, [["__file", "input.vue"]]);
14402
+ var Input = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__file", "input.vue"]]);
14332
14403
 
14333
14404
  const ElInput = withInstall(Input);
14334
14405
 
@@ -14355,7 +14426,7 @@
14355
14426
  direction: "left"
14356
14427
  }
14357
14428
  };
14358
- const renderThumbStyle = ({
14429
+ const renderThumbStyle$1 = ({
14359
14430
  move,
14360
14431
  size,
14361
14432
  bar
@@ -14378,7 +14449,7 @@
14378
14449
  });
14379
14450
 
14380
14451
  const COMPONENT_NAME$2 = "Thumb";
14381
- const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
14452
+ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
14382
14453
  __name: "thumb",
14383
14454
  props: thumbProps,
14384
14455
  setup(__props) {
@@ -14395,7 +14466,7 @@
14395
14466
  let cursorLeave = false;
14396
14467
  let originalOnSelectStart = isClient ? document.onselectstart : null;
14397
14468
  const bar = vue.computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]);
14398
- const thumbStyle = vue.computed(() => renderThumbStyle({
14469
+ const thumbStyle = vue.computed(() => renderThumbStyle$1({
14399
14470
  size: props.size,
14400
14471
  move: props.move,
14401
14472
  bar: bar.value
@@ -14497,7 +14568,7 @@
14497
14568
  };
14498
14569
  }
14499
14570
  });
14500
- var Thumb = /* @__PURE__ */ _export_sfc$1(_sfc_main$A, [["__file", "thumb.vue"]]);
14571
+ var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__file", "thumb.vue"]]);
14501
14572
 
14502
14573
  const barProps = buildProps({
14503
14574
  always: {
@@ -14510,7 +14581,7 @@
14510
14581
  }
14511
14582
  });
14512
14583
 
14513
- const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
14584
+ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
14514
14585
  __name: "bar",
14515
14586
  props: barProps,
14516
14587
  setup(__props, { expose }) {
@@ -14568,7 +14639,7 @@
14568
14639
  };
14569
14640
  }
14570
14641
  });
14571
- var Bar = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["__file", "bar.vue"]]);
14642
+ var Bar = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__file", "bar.vue"]]);
14572
14643
 
14573
14644
  const scrollbarProps = buildProps({
14574
14645
  height: {
@@ -14625,11 +14696,11 @@
14625
14696
  };
14626
14697
 
14627
14698
  const COMPONENT_NAME$1 = "ElScrollbar";
14628
- const __default__$p = vue.defineComponent({
14699
+ const __default__$q = vue.defineComponent({
14629
14700
  name: COMPONENT_NAME$1
14630
14701
  });
14631
- const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
14632
- ...__default__$p,
14702
+ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
14703
+ ...__default__$q,
14633
14704
  props: scrollbarProps,
14634
14705
  emits: scrollbarEmits,
14635
14706
  setup(__props, { expose, emit }) {
@@ -14781,7 +14852,7 @@
14781
14852
  };
14782
14853
  }
14783
14854
  });
14784
- var Scrollbar = /* @__PURE__ */ _export_sfc$1(_sfc_main$y, [["__file", "scrollbar.vue"]]);
14855
+ var Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__file", "scrollbar.vue"]]);
14785
14856
 
14786
14857
  const ElScrollbar = withInstall(Scrollbar);
14787
14858
 
@@ -14806,12 +14877,12 @@
14806
14877
  }
14807
14878
  });
14808
14879
 
14809
- const __default__$o = vue.defineComponent({
14880
+ const __default__$p = vue.defineComponent({
14810
14881
  name: "ElPopper",
14811
14882
  inheritAttrs: false
14812
14883
  });
14813
- const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
14814
- ...__default__$o,
14884
+ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
14885
+ ...__default__$p,
14815
14886
  props: popperProps,
14816
14887
  setup(__props, { expose }) {
14817
14888
  const props = __props;
@@ -14834,7 +14905,7 @@
14834
14905
  };
14835
14906
  }
14836
14907
  });
14837
- var Popper = /* @__PURE__ */ _export_sfc$1(_sfc_main$x, [["__file", "popper.vue"]]);
14908
+ var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__file", "popper.vue"]]);
14838
14909
 
14839
14910
  const popperArrowProps = buildProps({
14840
14911
  arrowOffset: {
@@ -14843,12 +14914,12 @@
14843
14914
  }
14844
14915
  });
14845
14916
 
14846
- const __default__$n = vue.defineComponent({
14917
+ const __default__$o = vue.defineComponent({
14847
14918
  name: "ElPopperArrow",
14848
14919
  inheritAttrs: false
14849
14920
  });
14850
- const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
14851
- ...__default__$n,
14921
+ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
14922
+ ...__default__$o,
14852
14923
  props: popperArrowProps,
14853
14924
  setup(__props, { expose }) {
14854
14925
  const props = __props;
@@ -14874,7 +14945,7 @@
14874
14945
  };
14875
14946
  }
14876
14947
  });
14877
- var ElPopperArrow = /* @__PURE__ */ _export_sfc$1(_sfc_main$w, [["__file", "arrow.vue"]]);
14948
+ var ElPopperArrow = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__file", "arrow.vue"]]);
14878
14949
 
14879
14950
  const popperTriggerProps = buildProps({
14880
14951
  virtualRef: {
@@ -15009,12 +15080,12 @@
15009
15080
  }, [s]);
15010
15081
  }
15011
15082
 
15012
- const __default__$m = vue.defineComponent({
15083
+ const __default__$n = vue.defineComponent({
15013
15084
  name: "ElPopperTrigger",
15014
15085
  inheritAttrs: false
15015
15086
  });
15016
- const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
15017
- ...__default__$m,
15087
+ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
15088
+ ...__default__$n,
15018
15089
  props: popperTriggerProps,
15019
15090
  setup(__props, { expose }) {
15020
15091
  const props = __props;
@@ -15125,7 +15196,7 @@
15125
15196
  };
15126
15197
  }
15127
15198
  });
15128
- var ElPopperTrigger = /* @__PURE__ */ _export_sfc$1(_sfc_main$v, [["__file", "trigger.vue"]]);
15199
+ var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__file", "trigger.vue"]]);
15129
15200
 
15130
15201
  const FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
15131
15202
  const FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
@@ -15324,7 +15395,7 @@
15324
15395
  });
15325
15396
  };
15326
15397
 
15327
- const _sfc_main$u = vue.defineComponent({
15398
+ const _sfc_main$y = vue.defineComponent({
15328
15399
  name: "ElFocusTrap",
15329
15400
  inheritAttrs: false,
15330
15401
  props: {
@@ -15566,10 +15637,10 @@
15566
15637
  };
15567
15638
  }
15568
15639
  });
15569
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
15640
+ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
15570
15641
  return vue.renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
15571
15642
  }
15572
- var ElFocusTrap = /* @__PURE__ */ _export_sfc$1(_sfc_main$u, [["render", _sfc_render$6], ["__file", "focus-trap.vue"]]);
15643
+ var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$9], ["__file", "focus-trap.vue"]]);
15573
15644
 
15574
15645
  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});
15575
15646
 
@@ -15948,11 +16019,11 @@
15948
16019
  };
15949
16020
  };
15950
16021
 
15951
- const __default__$l = vue.defineComponent({
16022
+ const __default__$m = vue.defineComponent({
15952
16023
  name: "ElPopperContent"
15953
16024
  });
15954
- const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
15955
- ...__default__$l,
16025
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
16026
+ ...__default__$m,
15956
16027
  props: popperContentProps,
15957
16028
  emits: popperContentEmits,
15958
16029
  setup(__props, { expose, emit }) {
@@ -16068,7 +16139,7 @@
16068
16139
  };
16069
16140
  }
16070
16141
  });
16071
- var ElPopperContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$t, [["__file", "content.vue"]]);
16142
+ var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__file", "content.vue"]]);
16072
16143
 
16073
16144
  const ElPopper = withInstall(Popper);
16074
16145
 
@@ -16346,11 +16417,11 @@
16346
16417
  return handleEvent;
16347
16418
  };
16348
16419
 
16349
- const __default__$k = vue.defineComponent({
16420
+ const __default__$l = vue.defineComponent({
16350
16421
  name: "ElTooltipTrigger"
16351
16422
  });
16352
- const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
16353
- ...__default__$k,
16423
+ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
16424
+ ...__default__$l,
16354
16425
  props: useTooltipTriggerProps,
16355
16426
  setup(__props, { expose }) {
16356
16427
  const props = __props;
@@ -16409,7 +16480,7 @@
16409
16480
  };
16410
16481
  }
16411
16482
  });
16412
- var ElTooltipTrigger = /* @__PURE__ */ _export_sfc$1(_sfc_main$s, [["__file", "trigger.vue"]]);
16483
+ var ElTooltipTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "trigger.vue"]]);
16413
16484
 
16414
16485
  const teleportProps = buildProps({
16415
16486
  to: {
@@ -16419,7 +16490,7 @@
16419
16490
  disabled: Boolean
16420
16491
  });
16421
16492
 
16422
- const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
16493
+ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
16423
16494
  __name: "teleport",
16424
16495
  props: teleportProps,
16425
16496
  setup(__props) {
@@ -16433,7 +16504,7 @@
16433
16504
  };
16434
16505
  }
16435
16506
  });
16436
- var Teleport = /* @__PURE__ */ _export_sfc$1(_sfc_main$r, [["__file", "teleport.vue"]]);
16507
+ var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__file", "teleport.vue"]]);
16437
16508
 
16438
16509
  const ElTeleport = withInstall(Teleport);
16439
16510
 
@@ -16470,12 +16541,12 @@
16470
16541
  };
16471
16542
  };
16472
16543
 
16473
- const __default__$j = vue.defineComponent({
16544
+ const __default__$k = vue.defineComponent({
16474
16545
  name: "ElTooltipContent",
16475
16546
  inheritAttrs: false
16476
16547
  });
16477
- const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
16478
- ...__default__$j,
16548
+ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
16549
+ ...__default__$k,
16479
16550
  props: useTooltipContentProps,
16480
16551
  setup(__props, { expose }) {
16481
16552
  const props = __props;
@@ -16646,13 +16717,13 @@
16646
16717
  };
16647
16718
  }
16648
16719
  });
16649
- var ElTooltipContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$q, [["__file", "content.vue"]]);
16720
+ var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__file", "content.vue"]]);
16650
16721
 
16651
- const __default__$i = vue.defineComponent({
16722
+ const __default__$j = vue.defineComponent({
16652
16723
  name: "ElTooltip"
16653
16724
  });
16654
- const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
16655
- ...__default__$i,
16725
+ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
16726
+ ...__default__$j,
16656
16727
  props: useTooltipProps,
16657
16728
  emits: tooltipEmits,
16658
16729
  setup(__props, { expose, emit }) {
@@ -16802,7 +16873,7 @@
16802
16873
  };
16803
16874
  }
16804
16875
  });
16805
- var Tooltip$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$p, [["__file", "tooltip.vue"]]);
16876
+ var Tooltip$1 = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "tooltip.vue"]]);
16806
16877
 
16807
16878
  const ElTooltip = withInstall(Tooltip$1);
16808
16879
 
@@ -17876,11 +17947,11 @@
17876
17947
  });
17877
17948
  }
17878
17949
 
17879
- const __default__$h = vue.defineComponent({
17950
+ const __default__$i = vue.defineComponent({
17880
17951
  name: "ElButton"
17881
17952
  });
17882
- const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
17883
- ...__default__$h,
17953
+ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
17954
+ ...__default__$i,
17884
17955
  props: buttonProps,
17885
17956
  emits: buttonEmits,
17886
17957
  setup(__props, { expose, emit }) {
@@ -17946,18 +18017,18 @@
17946
18017
  };
17947
18018
  }
17948
18019
  });
17949
- var Button = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["__file", "button.vue"]]);
18020
+ var Button = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "button.vue"]]);
17950
18021
 
17951
18022
  const buttonGroupProps = {
17952
18023
  size: buttonProps.size,
17953
18024
  type: buttonProps.type
17954
18025
  };
17955
18026
 
17956
- const __default__$g = vue.defineComponent({
18027
+ const __default__$h = vue.defineComponent({
17957
18028
  name: "ElButtonGroup"
17958
18029
  });
17959
- const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
17960
- ...__default__$g,
18030
+ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
18031
+ ...__default__$h,
17961
18032
  props: buttonGroupProps,
17962
18033
  setup(__props) {
17963
18034
  const props = __props;
@@ -17975,7 +18046,7 @@
17975
18046
  };
17976
18047
  }
17977
18048
  });
17978
- var ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$n, [["__file", "button-group.vue"]]);
18049
+ var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "button-group.vue"]]);
17979
18050
 
17980
18051
  const ElButton = withInstall(Button, {
17981
18052
  ButtonGroup
@@ -18012,11 +18083,11 @@
18012
18083
  click: (evt) => evt instanceof MouseEvent
18013
18084
  };
18014
18085
 
18015
- const __default__$f = vue.defineComponent({
18086
+ const __default__$g = vue.defineComponent({
18016
18087
  name: "ElTag"
18017
18088
  });
18018
- const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
18019
- ...__default__$f,
18089
+ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
18090
+ ...__default__$g,
18020
18091
  props: tagProps,
18021
18092
  emits: tagEmits,
18022
18093
  setup(__props, { emit }) {
@@ -18103,7 +18174,7 @@
18103
18174
  };
18104
18175
  }
18105
18176
  });
18106
- var Tag = /* @__PURE__ */ _export_sfc$1(_sfc_main$m, [["__file", "tag.vue"]]);
18177
+ var Tag = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "tag.vue"]]);
18107
18178
 
18108
18179
  const ElTag = withInstall(Tag);
18109
18180
 
@@ -18212,22 +18283,22 @@
18212
18283
  }
18213
18284
  };
18214
18285
 
18215
- const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
18286
+ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
18216
18287
  inheritAttrs: false
18217
18288
  });
18218
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
18289
+ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
18219
18290
  return vue.renderSlot(_ctx.$slots, "default");
18220
18291
  }
18221
- var Collection = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$5], ["__file", "collection.vue"]]);
18292
+ var Collection = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$8], ["__file", "collection.vue"]]);
18222
18293
 
18223
- const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
18294
+ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
18224
18295
  name: "ElCollectionItem",
18225
18296
  inheritAttrs: false
18226
18297
  });
18227
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
18298
+ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
18228
18299
  return vue.renderSlot(_ctx.$slots, "default");
18229
18300
  }
18230
- var CollectionItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["render", _sfc_render$4], ["__file", "collection-item.vue"]]);
18301
+ var CollectionItem = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$7], ["__file", "collection-item.vue"]]);
18231
18302
 
18232
18303
  const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
18233
18304
  const createCollectionWithScope = (name) => {
@@ -18437,11 +18508,11 @@
18437
18508
  [UPDATE_MODEL_EVENT]: (val) => isNumber(val) || isNil(val)
18438
18509
  };
18439
18510
 
18440
- const __default__$e = vue.defineComponent({
18511
+ const __default__$f = vue.defineComponent({
18441
18512
  name: "ElInputNumber"
18442
18513
  });
18443
- const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
18444
- ...__default__$e,
18514
+ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
18515
+ ...__default__$f,
18445
18516
  props: inputNumberProps,
18446
18517
  emits: inputNumberEmits,
18447
18518
  setup(__props, { expose, emit }) {
@@ -18767,7 +18838,7 @@
18767
18838
  };
18768
18839
  }
18769
18840
  });
18770
- var InputNumber = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["__file", "input-number.vue"]]);
18841
+ var InputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "input-number.vue"]]);
18771
18842
 
18772
18843
  const ElInputNumber = withInstall(InputNumber);
18773
18844
 
@@ -18814,11 +18885,11 @@
18814
18885
  click: (evt) => evt instanceof MouseEvent
18815
18886
  };
18816
18887
 
18817
- const __default__$d = vue.defineComponent({
18888
+ const __default__$e = vue.defineComponent({
18818
18889
  name: "ElLink"
18819
18890
  });
18820
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
18821
- ...__default__$d,
18891
+ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
18892
+ ...__default__$e,
18822
18893
  props: linkProps,
18823
18894
  emits: linkEmits,
18824
18895
  setup(__props, { emit }) {
@@ -18858,14 +18929,14 @@
18858
18929
  };
18859
18930
  }
18860
18931
  });
18861
- var Link = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["__file", "link.vue"]]);
18932
+ var Link = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "link.vue"]]);
18862
18933
 
18863
18934
  const ElLink = withInstall(Link);
18864
18935
 
18865
18936
  const selectGroupKey = Symbol("ElSelectGroup");
18866
18937
  const selectKey = Symbol("ElSelect");
18867
18938
 
18868
- function useOption(props, states) {
18939
+ function useOption$1(props, states) {
18869
18940
  const select = vue.inject(selectKey);
18870
18941
  const selectGroup = vue.inject(selectGroupKey, { disabled: false });
18871
18942
  const itemSelected = vue.computed(() => {
@@ -18940,7 +19011,7 @@
18940
19011
  };
18941
19012
  }
18942
19013
 
18943
- const _sfc_main$h = vue.defineComponent({
19014
+ const _sfc_main$l = vue.defineComponent({
18944
19015
  name: "ElOption",
18945
19016
  componentName: "ElOption",
18946
19017
  props: {
@@ -18974,7 +19045,7 @@
18974
19045
  select,
18975
19046
  hoverItem,
18976
19047
  updateOption
18977
- } = useOption(props, states);
19048
+ } = useOption$1(props, states);
18978
19049
  const { visible, hover } = vue.toRefs(states);
18979
19050
  const vm = vue.getCurrentInstance().proxy;
18980
19051
  select.onOptionCreate(vm);
@@ -19013,7 +19084,7 @@
19013
19084
  };
19014
19085
  }
19015
19086
  });
19016
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
19087
+ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
19017
19088
  return vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
19018
19089
  id: _ctx.id,
19019
19090
  class: vue.normalizeClass(_ctx.containerKls),
@@ -19030,9 +19101,9 @@
19030
19101
  [vue.vShow, _ctx.visible]
19031
19102
  ]);
19032
19103
  }
19033
- var Option = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["render", _sfc_render$3], ["__file", "option.vue"]]);
19104
+ var Option = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$6], ["__file", "option.vue"]]);
19034
19105
 
19035
- const _sfc_main$g = vue.defineComponent({
19106
+ const _sfc_main$k = vue.defineComponent({
19036
19107
  name: "ElSelectDropdown",
19037
19108
  componentName: "ElSelectDropdown",
19038
19109
  setup() {
@@ -19059,7 +19130,7 @@
19059
19130
  };
19060
19131
  }
19061
19132
  });
19062
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
19133
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
19063
19134
  return vue.openBlock(), vue.createElementBlock("div", {
19064
19135
  class: vue.normalizeClass([_ctx.ns.b("dropdown"), _ctx.ns.is("multiple", _ctx.isMultiple), _ctx.popperClass]),
19065
19136
  style: vue.normalizeStyle({ [_ctx.isFitInputWidth ? "width" : "minWidth"]: _ctx.minWidth })
@@ -19079,9 +19150,9 @@
19079
19150
  ], 2)) : vue.createCommentVNode("v-if", true)
19080
19151
  ], 6);
19081
19152
  }
19082
- var ElSelectMenu = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["render", _sfc_render$2], ["__file", "select-dropdown.vue"]]);
19153
+ var ElSelectMenu$1 = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$5], ["__file", "select-dropdown.vue"]]);
19083
19154
 
19084
- const useSelect = (props, emit) => {
19155
+ const useSelect$1 = (props, emit) => {
19085
19156
  const { t } = useLocale();
19086
19157
  const contentId = useId();
19087
19158
  const nsSelect = useNamespace("select");
@@ -19238,7 +19309,7 @@
19238
19309
  }
19239
19310
  }
19240
19311
  setSelected();
19241
- if (!isEqual(val, oldVal) && props.validateEvent) {
19312
+ if (!isEqual$1(val, oldVal) && props.validateEvent) {
19242
19313
  formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn());
19243
19314
  }
19244
19315
  }, {
@@ -19382,7 +19453,7 @@
19382
19453
  onInputChange();
19383
19454
  }, debounce$1.value);
19384
19455
  const emitChange = (val) => {
19385
- if (!isEqual(props.modelValue, val)) {
19456
+ if (!isEqual$1(props.modelValue, val)) {
19386
19457
  emit(CHANGE_EVENT, val);
19387
19458
  }
19388
19459
  };
@@ -19471,7 +19542,7 @@
19471
19542
  if (!isObject$1(option.value))
19472
19543
  return arr.indexOf(option.value);
19473
19544
  return arr.findIndex((item) => {
19474
- return isEqual(get(item, props.valueKey), getValueKey(option));
19545
+ return isEqual$1(get(item, props.valueKey), getValueKey(option));
19475
19546
  });
19476
19547
  };
19477
19548
  const scrollToOption = (option) => {
@@ -19727,7 +19798,7 @@
19727
19798
  if (children.length) {
19728
19799
  filterOptions((_b = children[0]) == null ? void 0 : _b.children);
19729
19800
  }
19730
- if (!isEqual(valueList, cachedValueList)) {
19801
+ if (!isEqual$1(valueList, cachedValueList)) {
19731
19802
  cachedValueList = valueList;
19732
19803
  if (select) {
19733
19804
  select.states.optionValues = valueList;
@@ -19738,7 +19809,7 @@
19738
19809
  }
19739
19810
  });
19740
19811
 
19741
- const SelectProps = buildProps({
19812
+ const SelectProps$1 = buildProps({
19742
19813
  name: String,
19743
19814
  id: String,
19744
19815
  modelValue: {
@@ -19845,11 +19916,11 @@
19845
19916
  });
19846
19917
 
19847
19918
  const COMPONENT_NAME = "ElSelect";
19848
- const _sfc_main$f = vue.defineComponent({
19919
+ const _sfc_main$j = vue.defineComponent({
19849
19920
  name: COMPONENT_NAME,
19850
19921
  componentName: COMPONENT_NAME,
19851
19922
  components: {
19852
- ElSelectMenu,
19923
+ ElSelectMenu: ElSelectMenu$1,
19853
19924
  ElOption: Option,
19854
19925
  ElOptions,
19855
19926
  ElTag,
@@ -19858,7 +19929,7 @@
19858
19929
  ElIcon
19859
19930
  },
19860
19931
  directives: { ClickOutside },
19861
- props: SelectProps,
19932
+ props: SelectProps$1,
19862
19933
  emits: [
19863
19934
  UPDATE_MODEL_EVENT,
19864
19935
  CHANGE_EVENT,
@@ -19881,7 +19952,7 @@
19881
19952
  ...vue.toRefs(props),
19882
19953
  modelValue
19883
19954
  });
19884
- const API = useSelect(_props, emit);
19955
+ const API = useSelect$1(_props, emit);
19885
19956
  const { calculatorRef, inputStyle } = useCalcInputWidth();
19886
19957
  vue.provide(selectKey, vue.reactive({
19887
19958
  props: _props,
@@ -19908,7 +19979,7 @@
19908
19979
  };
19909
19980
  }
19910
19981
  });
19911
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
19982
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
19912
19983
  const _component_el_tag = vue.resolveComponent("el-tag");
19913
19984
  const _component_el_tooltip = vue.resolveComponent("el-tooltip");
19914
19985
  const _component_el_icon = vue.resolveComponent("el-icon");
@@ -20255,9 +20326,9 @@
20255
20326
  [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
20256
20327
  ]);
20257
20328
  }
20258
- var Select = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["render", _sfc_render$1], ["__file", "select.vue"]]);
20329
+ var Select$1 = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$4], ["__file", "select.vue"]]);
20259
20330
 
20260
- const _sfc_main$e = vue.defineComponent({
20331
+ const _sfc_main$i = vue.defineComponent({
20261
20332
  name: "ElOptionGroup",
20262
20333
  componentName: "ElOptionGroup",
20263
20334
  props: {
@@ -20310,7 +20381,7 @@
20310
20381
  };
20311
20382
  }
20312
20383
  });
20313
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
20384
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
20314
20385
  return vue.withDirectives((vue.openBlock(), vue.createElementBlock("ul", {
20315
20386
  ref: "groupRef",
20316
20387
  class: vue.normalizeClass(_ctx.ns.be("group", "wrap"))
@@ -20329,9 +20400,9 @@
20329
20400
  [vue.vShow, _ctx.visible]
20330
20401
  ]);
20331
20402
  }
20332
- var OptionGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["render", _sfc_render], ["__file", "option-group.vue"]]);
20403
+ var OptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$3], ["__file", "option-group.vue"]]);
20333
20404
 
20334
- const ElSelect = withInstall(Select, {
20405
+ const ElSelect = withInstall(Select$1, {
20335
20406
  Option,
20336
20407
  OptionGroup
20337
20408
  });
@@ -20400,11 +20471,11 @@
20400
20471
  };
20401
20472
 
20402
20473
  const updateEventKeyRaw = `onUpdate:visible`;
20403
- const __default__$c = vue.defineComponent({
20474
+ const __default__$d = vue.defineComponent({
20404
20475
  name: "ElPopover"
20405
20476
  });
20406
- const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
20407
- ...__default__$c,
20477
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
20478
+ ...__default__$d,
20408
20479
  props: popoverProps,
20409
20480
  emits: popoverEmits,
20410
20481
  setup(__props, { expose, emit }) {
@@ -20503,7 +20574,7 @@
20503
20574
  };
20504
20575
  }
20505
20576
  });
20506
- var Popover = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__file", "popover.vue"]]);
20577
+ var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "popover.vue"]]);
20507
20578
 
20508
20579
  const attachEvents = (el, binding) => {
20509
20580
  const popperComponent = binding.arg || binding.value;
@@ -20527,97 +20598,2750 @@
20527
20598
  directive: ElPopoverDirective
20528
20599
  });
20529
20600
 
20530
- var _export_sfc = (sfc, props) => {
20531
- const target = sfc.__vccOpts || sfc;
20532
- for (const [key, val] of props) {
20533
- target[key] = val;
20534
- }
20535
- return target;
20536
- };
20537
-
20538
- const _hoisted_1$a = ["onClick"];
20539
- const _hoisted_2$9 = { class: "hzzt-dropdown-name" };
20540
- const _hoisted_3$7 = /* @__PURE__ */ vue.createElementVNode("span", { class: "caret" }, null, -1);
20541
- const _hoisted_4$5 = { class: "hzzt-dropdown-menu" };
20542
- const _hoisted_5$3 = ["onClick"];
20543
- const _hoisted_6$3 = { class: "submenu" };
20544
- const _hoisted_7$3 = ["onClick"];
20545
- const __default__$b = vue.defineComponent({
20546
- name: "HzztDropDown"
20547
- });
20548
- const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
20549
- ...__default__$b,
20601
+ const _sfc_main$g = vue.defineComponent({
20550
20602
  props: {
20551
- options: {
20552
- type: Array,
20553
- default: () => []
20554
- },
20555
- label: String,
20556
- value: String,
20557
- defaultValue: {
20558
- type: Array,
20559
- default: () => []
20560
- },
20561
- position: {
20562
- type: String,
20563
- default: "right"
20564
- },
20565
- props: {
20603
+ item: {
20566
20604
  type: Object,
20567
- default: () => ({
20568
- children: "children",
20569
- label: "label",
20570
- value: "value"
20571
- })
20605
+ required: true
20572
20606
  },
20573
- returnType: {
20574
- type: String,
20575
- default: "Array"
20576
- }
20607
+ style: {
20608
+ type: Object
20609
+ },
20610
+ height: Number
20577
20611
  },
20578
- emits: ["change"],
20579
- setup(__props, { emit: emits }) {
20580
- const dProps = __props;
20581
- const toggle = vue.ref(false);
20582
- function dropToggle() {
20583
- toggle.value = !toggle.value;
20584
- }
20585
- function close() {
20586
- toggle.value = false;
20587
- }
20588
- function selectValue(val) {
20589
- if (dProps.returnType === "Array") {
20590
- emits("change", val);
20612
+ setup() {
20613
+ const ns = useNamespace("select");
20614
+ return {
20615
+ ns
20616
+ };
20617
+ }
20618
+ });
20619
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
20620
+ return vue.openBlock(), vue.createElementBlock("div", {
20621
+ class: vue.normalizeClass(_ctx.ns.be("group", "title")),
20622
+ style: vue.normalizeStyle({ ..._ctx.style, lineHeight: `${_ctx.height}px` })
20623
+ }, vue.toDisplayString(_ctx.item.label), 7);
20624
+ }
20625
+ var GroupItem = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$2], ["__file", "group-item.vue"]]);
20626
+
20627
+ function useOption(props, { emit }) {
20628
+ return {
20629
+ hoverItem: () => {
20630
+ if (!props.disabled) {
20631
+ emit("hover", props.index);
20591
20632
  }
20592
- if (dProps.returnType === "String") {
20593
- emits("change", val.last);
20633
+ },
20634
+ selectOptionClick: () => {
20635
+ if (!props.disabled) {
20636
+ emit("select", props.item, props.index);
20594
20637
  }
20595
20638
  }
20596
- return (_ctx, _cache) => {
20597
- return vue.withDirectives((vue.openBlock(), vue.createElementBlock("ul", {
20598
- class: "hzzt-dropdown",
20599
- onClick: vue.withModifiers(dropToggle, ["stop"])
20600
- }, [
20601
- vue.createElementVNode("li", {
20602
- class: vue.normalizeClass({ "hzzt-dropdown-li": true, "hzzt-dropdown-li-show": toggle.value })
20603
- }, [
20604
- vue.createElementVNode("span", _hoisted_2$9, vue.toDisplayString(__props.label), 1),
20605
- _hoisted_3$7,
20606
- vue.createElementVNode("ul", _hoisted_4$5, [
20607
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.options, (option, index) => {
20608
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
20609
- vue.unref(isEmpty)(option[__props.props.children]) ? (vue.openBlock(), vue.createElementBlock("li", {
20610
- key: index,
20611
- class: vue.normalizeClass({
20612
- "hzzt-dropdown-menu-item": true,
20613
- selected: __props.defaultValue.includes(option[__props.props.value])
20614
- })
20615
- }, [
20616
- vue.createElementVNode("a", {
20617
- class: "hzzt-dropdown-menu-item-label",
20618
- onClick: ($event) => selectValue([option[__props.props.value]])
20619
- }, vue.toDisplayString(option[__props.props.label]), 9, _hoisted_5$3)
20620
- ], 2)) : (vue.openBlock(), vue.createElementBlock("li", {
20639
+ };
20640
+ }
20641
+
20642
+ const defaultProps = {
20643
+ label: "label",
20644
+ value: "value",
20645
+ disabled: "disabled",
20646
+ options: "options"
20647
+ };
20648
+ function useProps(props) {
20649
+ const aliasProps = vue.computed(() => ({ ...defaultProps, ...props.props }));
20650
+ const getLabel = (option) => get(option, aliasProps.value.label);
20651
+ const getValue = (option) => get(option, aliasProps.value.value);
20652
+ const getDisabled = (option) => get(option, aliasProps.value.disabled);
20653
+ const getOptions = (option) => get(option, aliasProps.value.options);
20654
+ return {
20655
+ aliasProps,
20656
+ getLabel,
20657
+ getValue,
20658
+ getDisabled,
20659
+ getOptions
20660
+ };
20661
+ }
20662
+
20663
+ const SelectProps = buildProps({
20664
+ allowCreate: Boolean,
20665
+ autocomplete: {
20666
+ type: definePropType(String),
20667
+ default: "none"
20668
+ },
20669
+ automaticDropdown: Boolean,
20670
+ clearable: Boolean,
20671
+ clearIcon: {
20672
+ type: iconPropType,
20673
+ default: circle_close_default
20674
+ },
20675
+ effect: {
20676
+ type: definePropType(String),
20677
+ default: "light"
20678
+ },
20679
+ collapseTags: Boolean,
20680
+ collapseTagsTooltip: Boolean,
20681
+ maxCollapseTags: {
20682
+ type: Number,
20683
+ default: 1
20684
+ },
20685
+ defaultFirstOption: Boolean,
20686
+ disabled: Boolean,
20687
+ estimatedOptionHeight: {
20688
+ type: Number,
20689
+ default: void 0
20690
+ },
20691
+ filterable: Boolean,
20692
+ filterMethod: Function,
20693
+ height: {
20694
+ type: Number,
20695
+ default: 274
20696
+ },
20697
+ itemHeight: {
20698
+ type: Number,
20699
+ default: 34
20700
+ },
20701
+ id: String,
20702
+ loading: Boolean,
20703
+ loadingText: String,
20704
+ modelValue: {
20705
+ type: definePropType([Array, String, Number, Boolean, Object])
20706
+ },
20707
+ multiple: Boolean,
20708
+ multipleLimit: {
20709
+ type: Number,
20710
+ default: 0
20711
+ },
20712
+ name: String,
20713
+ noDataText: String,
20714
+ noMatchText: String,
20715
+ remoteMethod: Function,
20716
+ reserveKeyword: {
20717
+ type: Boolean,
20718
+ default: true
20719
+ },
20720
+ options: {
20721
+ type: definePropType(Array),
20722
+ required: true
20723
+ },
20724
+ placeholder: {
20725
+ type: String
20726
+ },
20727
+ teleported: useTooltipContentProps.teleported,
20728
+ persistent: {
20729
+ type: Boolean,
20730
+ default: true
20731
+ },
20732
+ popperClass: {
20733
+ type: String,
20734
+ default: ""
20735
+ },
20736
+ popperOptions: {
20737
+ type: definePropType(Object),
20738
+ default: () => ({})
20739
+ },
20740
+ remote: Boolean,
20741
+ size: useSizeProp,
20742
+ props: {
20743
+ type: definePropType(Object),
20744
+ default: () => defaultProps
20745
+ },
20746
+ valueKey: {
20747
+ type: String,
20748
+ default: "value"
20749
+ },
20750
+ scrollbarAlwaysOn: Boolean,
20751
+ validateEvent: {
20752
+ type: Boolean,
20753
+ default: true
20754
+ },
20755
+ offset: {
20756
+ type: Number,
20757
+ default: 12
20758
+ },
20759
+ showArrow: {
20760
+ type: Boolean,
20761
+ default: true
20762
+ },
20763
+ placement: {
20764
+ type: definePropType(String),
20765
+ values: Ee,
20766
+ default: "bottom-start"
20767
+ },
20768
+ fallbackPlacements: {
20769
+ type: definePropType(Array),
20770
+ default: ["bottom-start", "top-start", "right", "left"]
20771
+ },
20772
+ tagType: { ...tagProps.type, default: "info" },
20773
+ tagEffect: { ...tagProps.effect, default: "light" },
20774
+ tabindex: {
20775
+ type: [String, Number],
20776
+ default: 0
20777
+ },
20778
+ appendTo: String,
20779
+ fitInputWidth: {
20780
+ type: [Boolean, Number],
20781
+ default: true,
20782
+ validator(val) {
20783
+ return isBoolean(val) || isNumber(val);
20784
+ }
20785
+ },
20786
+ ...useEmptyValuesProps,
20787
+ ...useAriaProps(["ariaLabel"])
20788
+ });
20789
+ const OptionProps = buildProps({
20790
+ data: Array,
20791
+ disabled: Boolean,
20792
+ hovering: Boolean,
20793
+ item: {
20794
+ type: definePropType(Object),
20795
+ required: true
20796
+ },
20797
+ index: Number,
20798
+ style: Object,
20799
+ selected: Boolean,
20800
+ created: Boolean
20801
+ });
20802
+ const selectEmits = {
20803
+ [UPDATE_MODEL_EVENT]: (val) => true,
20804
+ [CHANGE_EVENT]: (val) => true,
20805
+ "remove-tag": (val) => true,
20806
+ "visible-change": (visible) => true,
20807
+ focus: (evt) => evt instanceof FocusEvent,
20808
+ blur: (evt) => evt instanceof FocusEvent,
20809
+ clear: () => true
20810
+ };
20811
+ const optionEmits = {
20812
+ hover: (index) => isNumber(index),
20813
+ select: (val, index) => true
20814
+ };
20815
+
20816
+ const selectV2InjectionKey = Symbol("ElSelectV2Injection");
20817
+
20818
+ const _sfc_main$f = vue.defineComponent({
20819
+ props: OptionProps,
20820
+ emits: optionEmits,
20821
+ setup(props, { emit }) {
20822
+ const select = vue.inject(selectV2InjectionKey);
20823
+ const ns = useNamespace("select");
20824
+ const { hoverItem, selectOptionClick } = useOption(props, { emit });
20825
+ const { getLabel } = useProps(select.props);
20826
+ return {
20827
+ ns,
20828
+ hoverItem,
20829
+ selectOptionClick,
20830
+ getLabel
20831
+ };
20832
+ }
20833
+ });
20834
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
20835
+ return vue.openBlock(), vue.createElementBlock("li", {
20836
+ "aria-selected": _ctx.selected,
20837
+ style: vue.normalizeStyle(_ctx.style),
20838
+ class: vue.normalizeClass([
20839
+ _ctx.ns.be("dropdown", "item"),
20840
+ _ctx.ns.is("selected", _ctx.selected),
20841
+ _ctx.ns.is("disabled", _ctx.disabled),
20842
+ _ctx.ns.is("created", _ctx.created),
20843
+ _ctx.ns.is("hovering", _ctx.hovering)
20844
+ ]),
20845
+ onMousemove: _ctx.hoverItem,
20846
+ onClick: vue.withModifiers(_ctx.selectOptionClick, ["stop"])
20847
+ }, [
20848
+ vue.renderSlot(_ctx.$slots, "default", {
20849
+ item: _ctx.item,
20850
+ index: _ctx.index,
20851
+ disabled: _ctx.disabled
20852
+ }, () => [
20853
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.getLabel(_ctx.item)), 1)
20854
+ ])
20855
+ ], 46, ["aria-selected", "onMousemove", "onClick"]);
20856
+ }
20857
+ var OptionItem = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$1], ["__file", "option-item.vue"]]);
20858
+
20859
+ var safeIsNaN = Number.isNaN || function ponyfill(value) {
20860
+ return typeof value === "number" && value !== value;
20861
+ };
20862
+ function isEqual(first, second) {
20863
+ if (first === second) {
20864
+ return true;
20865
+ }
20866
+ if (safeIsNaN(first) && safeIsNaN(second)) {
20867
+ return true;
20868
+ }
20869
+ return false;
20870
+ }
20871
+ function areInputsEqual(newInputs, lastInputs) {
20872
+ if (newInputs.length !== lastInputs.length) {
20873
+ return false;
20874
+ }
20875
+ for (var i = 0; i < newInputs.length; i++) {
20876
+ if (!isEqual(newInputs[i], lastInputs[i])) {
20877
+ return false;
20878
+ }
20879
+ }
20880
+ return true;
20881
+ }
20882
+ function memoizeOne(resultFn, isEqual2) {
20883
+ if (isEqual2 === void 0) {
20884
+ isEqual2 = areInputsEqual;
20885
+ }
20886
+ var cache = null;
20887
+ function memoized() {
20888
+ var newArgs = [];
20889
+ for (var _i = 0; _i < arguments.length; _i++) {
20890
+ newArgs[_i] = arguments[_i];
20891
+ }
20892
+ if (cache && cache.lastThis === this && isEqual2(newArgs, cache.lastArgs)) {
20893
+ return cache.lastResult;
20894
+ }
20895
+ var lastResult = resultFn.apply(this, newArgs);
20896
+ cache = {
20897
+ lastResult,
20898
+ lastArgs: newArgs,
20899
+ lastThis: this
20900
+ };
20901
+ return lastResult;
20902
+ }
20903
+ memoized.clear = function clear() {
20904
+ cache = null;
20905
+ };
20906
+ return memoized;
20907
+ }
20908
+
20909
+ const useCache = () => {
20910
+ const vm = vue.getCurrentInstance();
20911
+ const props = vm.proxy.$props;
20912
+ return vue.computed(() => {
20913
+ const _getItemStyleCache = (_, __, ___) => ({});
20914
+ return props.perfMode ? memoize(_getItemStyleCache) : memoizeOne(_getItemStyleCache);
20915
+ });
20916
+ };
20917
+
20918
+ const DEFAULT_DYNAMIC_LIST_ITEM_SIZE = 50;
20919
+ const ITEM_RENDER_EVT = "itemRendered";
20920
+ const SCROLL_EVT = "scroll";
20921
+ const FORWARD = "forward";
20922
+ const BACKWARD = "backward";
20923
+ const AUTO_ALIGNMENT = "auto";
20924
+ const SMART_ALIGNMENT = "smart";
20925
+ const START_ALIGNMENT = "start";
20926
+ const CENTERED_ALIGNMENT = "center";
20927
+ const END_ALIGNMENT = "end";
20928
+ const HORIZONTAL = "horizontal";
20929
+ const VERTICAL = "vertical";
20930
+ const LTR = "ltr";
20931
+ const RTL = "rtl";
20932
+ const RTL_OFFSET_NAG = "negative";
20933
+ const RTL_OFFSET_POS_ASC = "positive-ascending";
20934
+ const RTL_OFFSET_POS_DESC = "positive-descending";
20935
+ const ScrollbarDirKey = {
20936
+ [HORIZONTAL]: "left",
20937
+ [VERTICAL]: "top"
20938
+ };
20939
+ const SCROLLBAR_MIN_SIZE = 20;
20940
+
20941
+ const LayoutKeys = {
20942
+ [HORIZONTAL]: "deltaX",
20943
+ [VERTICAL]: "deltaY"
20944
+ };
20945
+ const useWheel = ({ atEndEdge, atStartEdge, layout }, onWheelDelta) => {
20946
+ let frameHandle;
20947
+ let offset = 0;
20948
+ const hasReachedEdge = (offset2) => {
20949
+ const edgeReached = offset2 < 0 && atStartEdge.value || offset2 > 0 && atEndEdge.value;
20950
+ return edgeReached;
20951
+ };
20952
+ const onWheel = (e) => {
20953
+ cAF(frameHandle);
20954
+ const newOffset = e[LayoutKeys[layout.value]];
20955
+ if (hasReachedEdge(offset) && hasReachedEdge(offset + newOffset))
20956
+ return;
20957
+ offset += newOffset;
20958
+ if (!isFirefox()) {
20959
+ e.preventDefault();
20960
+ }
20961
+ frameHandle = rAF(() => {
20962
+ onWheelDelta(offset);
20963
+ offset = 0;
20964
+ });
20965
+ };
20966
+ return {
20967
+ hasReachedEdge,
20968
+ onWheel
20969
+ };
20970
+ };
20971
+
20972
+ const itemSize = buildProp({
20973
+ type: definePropType([Number, Function]),
20974
+ required: true
20975
+ });
20976
+ const estimatedItemSize = buildProp({
20977
+ type: Number
20978
+ });
20979
+ const cache = buildProp({
20980
+ type: Number,
20981
+ default: 2
20982
+ });
20983
+ const direction = buildProp({
20984
+ type: String,
20985
+ values: ["ltr", "rtl"],
20986
+ default: "ltr"
20987
+ });
20988
+ const initScrollOffset = buildProp({
20989
+ type: Number,
20990
+ default: 0
20991
+ });
20992
+ const total = buildProp({
20993
+ type: Number,
20994
+ required: true
20995
+ });
20996
+ const layout = buildProp({
20997
+ type: String,
20998
+ values: ["horizontal", "vertical"],
20999
+ default: VERTICAL
21000
+ });
21001
+ const virtualizedProps = buildProps({
21002
+ className: {
21003
+ type: String,
21004
+ default: ""
21005
+ },
21006
+ containerElement: {
21007
+ type: definePropType([String, Object]),
21008
+ default: "div"
21009
+ },
21010
+ data: {
21011
+ type: definePropType(Array),
21012
+ default: () => mutable([])
21013
+ },
21014
+ direction,
21015
+ height: {
21016
+ type: [String, Number],
21017
+ required: true
21018
+ },
21019
+ innerElement: {
21020
+ type: [String, Object],
21021
+ default: "div"
21022
+ },
21023
+ style: {
21024
+ type: definePropType([Object, String, Array])
21025
+ },
21026
+ useIsScrolling: {
21027
+ type: Boolean,
21028
+ default: false
21029
+ },
21030
+ width: {
21031
+ type: [Number, String],
21032
+ required: false
21033
+ },
21034
+ perfMode: {
21035
+ type: Boolean,
21036
+ default: true
21037
+ },
21038
+ scrollbarAlwaysOn: {
21039
+ type: Boolean,
21040
+ default: false
21041
+ }
21042
+ });
21043
+ const virtualizedListProps = buildProps({
21044
+ cache,
21045
+ estimatedItemSize,
21046
+ layout,
21047
+ initScrollOffset,
21048
+ total,
21049
+ itemSize,
21050
+ ...virtualizedProps
21051
+ });
21052
+ const scrollbarSize = {
21053
+ type: Number,
21054
+ default: 6
21055
+ };
21056
+ const startGap = { type: Number, default: 0 };
21057
+ const endGap = { type: Number, default: 2 };
21058
+ buildProps({
21059
+ columnCache: cache,
21060
+ columnWidth: itemSize,
21061
+ estimatedColumnWidth: estimatedItemSize,
21062
+ estimatedRowHeight: estimatedItemSize,
21063
+ initScrollLeft: initScrollOffset,
21064
+ initScrollTop: initScrollOffset,
21065
+ itemKey: {
21066
+ type: definePropType(Function),
21067
+ default: ({
21068
+ columnIndex,
21069
+ rowIndex
21070
+ }) => `${rowIndex}:${columnIndex}`
21071
+ },
21072
+ rowCache: cache,
21073
+ rowHeight: itemSize,
21074
+ totalColumn: total,
21075
+ totalRow: total,
21076
+ hScrollbarSize: scrollbarSize,
21077
+ vScrollbarSize: scrollbarSize,
21078
+ scrollbarStartGap: startGap,
21079
+ scrollbarEndGap: endGap,
21080
+ role: String,
21081
+ ...virtualizedProps
21082
+ });
21083
+ const virtualizedScrollbarProps = buildProps({
21084
+ alwaysOn: Boolean,
21085
+ class: String,
21086
+ layout,
21087
+ total,
21088
+ ratio: {
21089
+ type: Number,
21090
+ required: true
21091
+ },
21092
+ clientSize: {
21093
+ type: Number,
21094
+ required: true
21095
+ },
21096
+ scrollFrom: {
21097
+ type: Number,
21098
+ required: true
21099
+ },
21100
+ scrollbarSize,
21101
+ startGap,
21102
+ endGap,
21103
+ visible: Boolean
21104
+ });
21105
+
21106
+ const getScrollDir = (prev, cur) => prev < cur ? FORWARD : BACKWARD;
21107
+ const isHorizontal = (dir) => dir === LTR || dir === RTL || dir === HORIZONTAL;
21108
+ let cachedRTLResult = null;
21109
+ function getRTLOffsetType(recalculate = false) {
21110
+ if (cachedRTLResult === null || recalculate) {
21111
+ const outerDiv = document.createElement("div");
21112
+ const outerStyle = outerDiv.style;
21113
+ outerStyle.width = "50px";
21114
+ outerStyle.height = "50px";
21115
+ outerStyle.overflow = "scroll";
21116
+ outerStyle.direction = "rtl";
21117
+ const innerDiv = document.createElement("div");
21118
+ const innerStyle = innerDiv.style;
21119
+ innerStyle.width = "100px";
21120
+ innerStyle.height = "100px";
21121
+ outerDiv.appendChild(innerDiv);
21122
+ document.body.appendChild(outerDiv);
21123
+ if (outerDiv.scrollLeft > 0) {
21124
+ cachedRTLResult = RTL_OFFSET_POS_DESC;
21125
+ } else {
21126
+ outerDiv.scrollLeft = 1;
21127
+ if (outerDiv.scrollLeft === 0) {
21128
+ cachedRTLResult = RTL_OFFSET_NAG;
21129
+ } else {
21130
+ cachedRTLResult = RTL_OFFSET_POS_ASC;
21131
+ }
21132
+ }
21133
+ document.body.removeChild(outerDiv);
21134
+ return cachedRTLResult;
21135
+ }
21136
+ return cachedRTLResult;
21137
+ }
21138
+ function renderThumbStyle({ move, size, bar }, layout) {
21139
+ const style = {};
21140
+ const translate = `translate${bar.axis}(${move}px)`;
21141
+ style[bar.size] = size;
21142
+ style.transform = translate;
21143
+ style.msTransform = translate;
21144
+ style.webkitTransform = translate;
21145
+ if (layout === "horizontal") {
21146
+ style.height = "100%";
21147
+ } else {
21148
+ style.width = "100%";
21149
+ }
21150
+ return style;
21151
+ }
21152
+
21153
+ const ScrollBar = vue.defineComponent({
21154
+ name: "ElVirtualScrollBar",
21155
+ props: virtualizedScrollbarProps,
21156
+ emits: ["scroll", "start-move", "stop-move"],
21157
+ setup(props, { emit }) {
21158
+ const GAP = vue.computed(() => props.startGap + props.endGap);
21159
+ const nsVirtualScrollbar = useNamespace("virtual-scrollbar");
21160
+ const nsScrollbar = useNamespace("scrollbar");
21161
+ const trackRef = vue.ref();
21162
+ const thumbRef = vue.ref();
21163
+ let frameHandle = null;
21164
+ let onselectstartStore = null;
21165
+ const state = vue.reactive({
21166
+ isDragging: false,
21167
+ traveled: 0
21168
+ });
21169
+ const bar = vue.computed(() => BAR_MAP[props.layout]);
21170
+ const trackSize = vue.computed(() => props.clientSize - vue.unref(GAP));
21171
+ const trackStyle = vue.computed(() => ({
21172
+ position: "absolute",
21173
+ width: `${HORIZONTAL === props.layout ? trackSize.value : props.scrollbarSize}px`,
21174
+ height: `${HORIZONTAL === props.layout ? props.scrollbarSize : trackSize.value}px`,
21175
+ [ScrollbarDirKey[props.layout]]: "2px",
21176
+ right: "2px",
21177
+ bottom: "2px",
21178
+ borderRadius: "4px"
21179
+ }));
21180
+ const thumbSize = vue.computed(() => {
21181
+ const ratio = props.ratio;
21182
+ const clientSize = props.clientSize;
21183
+ if (ratio >= 100) {
21184
+ return Number.POSITIVE_INFINITY;
21185
+ }
21186
+ if (ratio >= 50) {
21187
+ return ratio * clientSize / 100;
21188
+ }
21189
+ const SCROLLBAR_MAX_SIZE = clientSize / 3;
21190
+ return Math.floor(Math.min(Math.max(ratio * clientSize, SCROLLBAR_MIN_SIZE), SCROLLBAR_MAX_SIZE));
21191
+ });
21192
+ const thumbStyle = vue.computed(() => {
21193
+ if (!Number.isFinite(thumbSize.value)) {
21194
+ return {
21195
+ display: "none"
21196
+ };
21197
+ }
21198
+ const thumb = `${thumbSize.value}px`;
21199
+ const style = renderThumbStyle({
21200
+ bar: bar.value,
21201
+ size: thumb,
21202
+ move: state.traveled
21203
+ }, props.layout);
21204
+ return style;
21205
+ });
21206
+ const totalSteps = vue.computed(() => Math.floor(props.clientSize - thumbSize.value - vue.unref(GAP)));
21207
+ const attachEvents = () => {
21208
+ window.addEventListener("mousemove", onMouseMove);
21209
+ window.addEventListener("mouseup", onMouseUp);
21210
+ const thumbEl = vue.unref(thumbRef);
21211
+ if (!thumbEl)
21212
+ return;
21213
+ onselectstartStore = document.onselectstart;
21214
+ document.onselectstart = () => false;
21215
+ thumbEl.addEventListener("touchmove", onMouseMove, { passive: true });
21216
+ thumbEl.addEventListener("touchend", onMouseUp);
21217
+ };
21218
+ const detachEvents = () => {
21219
+ window.removeEventListener("mousemove", onMouseMove);
21220
+ window.removeEventListener("mouseup", onMouseUp);
21221
+ document.onselectstart = onselectstartStore;
21222
+ onselectstartStore = null;
21223
+ const thumbEl = vue.unref(thumbRef);
21224
+ if (!thumbEl)
21225
+ return;
21226
+ thumbEl.removeEventListener("touchmove", onMouseMove);
21227
+ thumbEl.removeEventListener("touchend", onMouseUp);
21228
+ };
21229
+ const onThumbMouseDown = (e) => {
21230
+ e.stopImmediatePropagation();
21231
+ if (e.ctrlKey || [1, 2].includes(e.button)) {
21232
+ return;
21233
+ }
21234
+ state.isDragging = true;
21235
+ state[bar.value.axis] = e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]);
21236
+ emit("start-move");
21237
+ attachEvents();
21238
+ };
21239
+ const onMouseUp = () => {
21240
+ state.isDragging = false;
21241
+ state[bar.value.axis] = 0;
21242
+ emit("stop-move");
21243
+ detachEvents();
21244
+ };
21245
+ const onMouseMove = (e) => {
21246
+ const { isDragging } = state;
21247
+ if (!isDragging)
21248
+ return;
21249
+ if (!thumbRef.value || !trackRef.value)
21250
+ return;
21251
+ const prevPage = state[bar.value.axis];
21252
+ if (!prevPage)
21253
+ return;
21254
+ cAF(frameHandle);
21255
+ const offset = (trackRef.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1;
21256
+ const thumbClickPosition = thumbRef.value[bar.value.offset] - prevPage;
21257
+ const distance = offset - thumbClickPosition;
21258
+ frameHandle = rAF(() => {
21259
+ state.traveled = Math.max(props.startGap, Math.min(distance, totalSteps.value));
21260
+ emit("scroll", distance, totalSteps.value);
21261
+ });
21262
+ };
21263
+ const clickTrackHandler = (e) => {
21264
+ const offset = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]);
21265
+ const thumbHalf = thumbRef.value[bar.value.offset] / 2;
21266
+ const distance = offset - thumbHalf;
21267
+ state.traveled = Math.max(0, Math.min(distance, totalSteps.value));
21268
+ emit("scroll", distance, totalSteps.value);
21269
+ };
21270
+ vue.watch(() => props.scrollFrom, (v) => {
21271
+ if (state.isDragging)
21272
+ return;
21273
+ state.traveled = Math.ceil(v * totalSteps.value);
21274
+ });
21275
+ vue.onBeforeUnmount(() => {
21276
+ detachEvents();
21277
+ });
21278
+ return () => {
21279
+ return vue.h("div", {
21280
+ role: "presentation",
21281
+ ref: trackRef,
21282
+ class: [
21283
+ nsVirtualScrollbar.b(),
21284
+ props.class,
21285
+ (props.alwaysOn || state.isDragging) && "always-on"
21286
+ ],
21287
+ style: trackStyle.value,
21288
+ onMousedown: vue.withModifiers(clickTrackHandler, ["stop", "prevent"]),
21289
+ onTouchstartPrevent: onThumbMouseDown
21290
+ }, vue.h("div", {
21291
+ ref: thumbRef,
21292
+ class: nsScrollbar.e("thumb"),
21293
+ style: thumbStyle.value,
21294
+ onMousedown: onThumbMouseDown
21295
+ }, []));
21296
+ };
21297
+ }
21298
+ });
21299
+
21300
+ const createList = ({
21301
+ name,
21302
+ getOffset,
21303
+ getItemSize,
21304
+ getItemOffset,
21305
+ getEstimatedTotalSize,
21306
+ getStartIndexForOffset,
21307
+ getStopIndexForStartIndex,
21308
+ initCache,
21309
+ clearCache,
21310
+ validateProps
21311
+ }) => {
21312
+ return vue.defineComponent({
21313
+ name: name != null ? name : "ElVirtualList",
21314
+ props: virtualizedListProps,
21315
+ emits: [ITEM_RENDER_EVT, SCROLL_EVT],
21316
+ setup(props, { emit, expose }) {
21317
+ validateProps(props);
21318
+ const instance = vue.getCurrentInstance();
21319
+ const ns = useNamespace("vl");
21320
+ const dynamicSizeCache = vue.ref(initCache(props, instance));
21321
+ const getItemStyleCache = useCache();
21322
+ const windowRef = vue.ref();
21323
+ const innerRef = vue.ref();
21324
+ const scrollbarRef = vue.ref();
21325
+ const states = vue.ref({
21326
+ isScrolling: false,
21327
+ scrollDir: "forward",
21328
+ scrollOffset: isNumber(props.initScrollOffset) ? props.initScrollOffset : 0,
21329
+ updateRequested: false,
21330
+ isScrollbarDragging: false,
21331
+ scrollbarAlwaysOn: props.scrollbarAlwaysOn
21332
+ });
21333
+ const itemsToRender = vue.computed(() => {
21334
+ const { total, cache } = props;
21335
+ const { isScrolling, scrollDir, scrollOffset } = vue.unref(states);
21336
+ if (total === 0) {
21337
+ return [0, 0, 0, 0];
21338
+ }
21339
+ const startIndex = getStartIndexForOffset(props, scrollOffset, vue.unref(dynamicSizeCache));
21340
+ const stopIndex = getStopIndexForStartIndex(props, startIndex, scrollOffset, vue.unref(dynamicSizeCache));
21341
+ const cacheBackward = !isScrolling || scrollDir === BACKWARD ? Math.max(1, cache) : 1;
21342
+ const cacheForward = !isScrolling || scrollDir === FORWARD ? Math.max(1, cache) : 1;
21343
+ return [
21344
+ Math.max(0, startIndex - cacheBackward),
21345
+ Math.max(0, Math.min(total - 1, stopIndex + cacheForward)),
21346
+ startIndex,
21347
+ stopIndex
21348
+ ];
21349
+ });
21350
+ const estimatedTotalSize = vue.computed(() => getEstimatedTotalSize(props, vue.unref(dynamicSizeCache)));
21351
+ const _isHorizontal = vue.computed(() => isHorizontal(props.layout));
21352
+ const windowStyle = vue.computed(() => [
21353
+ {
21354
+ position: "relative",
21355
+ [`overflow-${_isHorizontal.value ? "x" : "y"}`]: "scroll",
21356
+ WebkitOverflowScrolling: "touch",
21357
+ willChange: "transform"
21358
+ },
21359
+ {
21360
+ direction: props.direction,
21361
+ height: isNumber(props.height) ? `${props.height}px` : props.height,
21362
+ width: isNumber(props.width) ? `${props.width}px` : props.width
21363
+ },
21364
+ props.style
21365
+ ]);
21366
+ const innerStyle = vue.computed(() => {
21367
+ const size = vue.unref(estimatedTotalSize);
21368
+ const horizontal = vue.unref(_isHorizontal);
21369
+ return {
21370
+ height: horizontal ? "100%" : `${size}px`,
21371
+ pointerEvents: vue.unref(states).isScrolling ? "none" : void 0,
21372
+ width: horizontal ? `${size}px` : "100%"
21373
+ };
21374
+ });
21375
+ const clientSize = vue.computed(() => _isHorizontal.value ? props.width : props.height);
21376
+ const { onWheel } = useWheel({
21377
+ atStartEdge: vue.computed(() => states.value.scrollOffset <= 0),
21378
+ atEndEdge: vue.computed(() => states.value.scrollOffset >= estimatedTotalSize.value),
21379
+ layout: vue.computed(() => props.layout)
21380
+ }, (offset) => {
21381
+ var _a, _b;
21382
+ (_b = (_a = scrollbarRef.value).onMouseUp) == null ? void 0 : _b.call(_a);
21383
+ scrollTo(Math.min(states.value.scrollOffset + offset, estimatedTotalSize.value - clientSize.value));
21384
+ });
21385
+ useEventListener(windowRef, "wheel", onWheel, {
21386
+ passive: false
21387
+ });
21388
+ const emitEvents = () => {
21389
+ const { total } = props;
21390
+ if (total > 0) {
21391
+ const [cacheStart, cacheEnd, visibleStart, visibleEnd] = vue.unref(itemsToRender);
21392
+ emit(ITEM_RENDER_EVT, cacheStart, cacheEnd, visibleStart, visibleEnd);
21393
+ }
21394
+ const { scrollDir, scrollOffset, updateRequested } = vue.unref(states);
21395
+ emit(SCROLL_EVT, scrollDir, scrollOffset, updateRequested);
21396
+ };
21397
+ const scrollVertically = (e) => {
21398
+ const { clientHeight, scrollHeight, scrollTop } = e.currentTarget;
21399
+ const _states = vue.unref(states);
21400
+ if (_states.scrollOffset === scrollTop) {
21401
+ return;
21402
+ }
21403
+ const scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
21404
+ states.value = {
21405
+ ..._states,
21406
+ isScrolling: true,
21407
+ scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),
21408
+ scrollOffset,
21409
+ updateRequested: false
21410
+ };
21411
+ vue.nextTick(resetIsScrolling);
21412
+ };
21413
+ const scrollHorizontally = (e) => {
21414
+ const { clientWidth, scrollLeft, scrollWidth } = e.currentTarget;
21415
+ const _states = vue.unref(states);
21416
+ if (_states.scrollOffset === scrollLeft) {
21417
+ return;
21418
+ }
21419
+ const { direction } = props;
21420
+ let scrollOffset = scrollLeft;
21421
+ if (direction === RTL) {
21422
+ switch (getRTLOffsetType()) {
21423
+ case RTL_OFFSET_NAG: {
21424
+ scrollOffset = -scrollLeft;
21425
+ break;
21426
+ }
21427
+ case RTL_OFFSET_POS_DESC: {
21428
+ scrollOffset = scrollWidth - clientWidth - scrollLeft;
21429
+ break;
21430
+ }
21431
+ }
21432
+ }
21433
+ scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
21434
+ states.value = {
21435
+ ..._states,
21436
+ isScrolling: true,
21437
+ scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),
21438
+ scrollOffset,
21439
+ updateRequested: false
21440
+ };
21441
+ vue.nextTick(resetIsScrolling);
21442
+ };
21443
+ const onScroll = (e) => {
21444
+ vue.unref(_isHorizontal) ? scrollHorizontally(e) : scrollVertically(e);
21445
+ emitEvents();
21446
+ };
21447
+ const onScrollbarScroll = (distanceToGo, totalSteps) => {
21448
+ const offset = (estimatedTotalSize.value - clientSize.value) / totalSteps * distanceToGo;
21449
+ scrollTo(Math.min(estimatedTotalSize.value - clientSize.value, offset));
21450
+ };
21451
+ const scrollTo = (offset) => {
21452
+ offset = Math.max(offset, 0);
21453
+ if (offset === vue.unref(states).scrollOffset) {
21454
+ return;
21455
+ }
21456
+ states.value = {
21457
+ ...vue.unref(states),
21458
+ scrollOffset: offset,
21459
+ scrollDir: getScrollDir(vue.unref(states).scrollOffset, offset),
21460
+ updateRequested: true
21461
+ };
21462
+ vue.nextTick(resetIsScrolling);
21463
+ };
21464
+ const scrollToItem = (idx, alignment = AUTO_ALIGNMENT) => {
21465
+ const { scrollOffset } = vue.unref(states);
21466
+ idx = Math.max(0, Math.min(idx, props.total - 1));
21467
+ scrollTo(getOffset(props, idx, alignment, scrollOffset, vue.unref(dynamicSizeCache)));
21468
+ };
21469
+ const getItemStyle = (idx) => {
21470
+ const { direction, itemSize, layout } = props;
21471
+ const itemStyleCache = getItemStyleCache.value(clearCache && itemSize, clearCache && layout, clearCache && direction);
21472
+ let style;
21473
+ if (hasOwn(itemStyleCache, String(idx))) {
21474
+ style = itemStyleCache[idx];
21475
+ } else {
21476
+ const offset = getItemOffset(props, idx, vue.unref(dynamicSizeCache));
21477
+ const size = getItemSize(props, idx, vue.unref(dynamicSizeCache));
21478
+ const horizontal = vue.unref(_isHorizontal);
21479
+ const isRtl = direction === RTL;
21480
+ const offsetHorizontal = horizontal ? offset : 0;
21481
+ itemStyleCache[idx] = style = {
21482
+ position: "absolute",
21483
+ left: isRtl ? void 0 : `${offsetHorizontal}px`,
21484
+ right: isRtl ? `${offsetHorizontal}px` : void 0,
21485
+ top: !horizontal ? `${offset}px` : 0,
21486
+ height: !horizontal ? `${size}px` : "100%",
21487
+ width: horizontal ? `${size}px` : "100%"
21488
+ };
21489
+ }
21490
+ return style;
21491
+ };
21492
+ const resetIsScrolling = () => {
21493
+ states.value.isScrolling = false;
21494
+ vue.nextTick(() => {
21495
+ getItemStyleCache.value(-1, null, null);
21496
+ });
21497
+ };
21498
+ const resetScrollTop = () => {
21499
+ const window = windowRef.value;
21500
+ if (window) {
21501
+ window.scrollTop = 0;
21502
+ }
21503
+ };
21504
+ vue.onMounted(() => {
21505
+ if (!isClient)
21506
+ return;
21507
+ const { initScrollOffset } = props;
21508
+ const windowElement = vue.unref(windowRef);
21509
+ if (isNumber(initScrollOffset) && windowElement) {
21510
+ if (vue.unref(_isHorizontal)) {
21511
+ windowElement.scrollLeft = initScrollOffset;
21512
+ } else {
21513
+ windowElement.scrollTop = initScrollOffset;
21514
+ }
21515
+ }
21516
+ emitEvents();
21517
+ });
21518
+ vue.onUpdated(() => {
21519
+ const { direction, layout } = props;
21520
+ const { scrollOffset, updateRequested } = vue.unref(states);
21521
+ const windowElement = vue.unref(windowRef);
21522
+ if (updateRequested && windowElement) {
21523
+ if (layout === HORIZONTAL) {
21524
+ if (direction === RTL) {
21525
+ switch (getRTLOffsetType()) {
21526
+ case RTL_OFFSET_NAG: {
21527
+ windowElement.scrollLeft = -scrollOffset;
21528
+ break;
21529
+ }
21530
+ case RTL_OFFSET_POS_ASC: {
21531
+ windowElement.scrollLeft = scrollOffset;
21532
+ break;
21533
+ }
21534
+ default: {
21535
+ const { clientWidth, scrollWidth } = windowElement;
21536
+ windowElement.scrollLeft = scrollWidth - clientWidth - scrollOffset;
21537
+ break;
21538
+ }
21539
+ }
21540
+ } else {
21541
+ windowElement.scrollLeft = scrollOffset;
21542
+ }
21543
+ } else {
21544
+ windowElement.scrollTop = scrollOffset;
21545
+ }
21546
+ }
21547
+ });
21548
+ vue.onActivated(() => {
21549
+ vue.unref(windowRef).scrollTop = vue.unref(states).scrollOffset;
21550
+ });
21551
+ const api = {
21552
+ ns,
21553
+ clientSize,
21554
+ estimatedTotalSize,
21555
+ windowStyle,
21556
+ windowRef,
21557
+ innerRef,
21558
+ innerStyle,
21559
+ itemsToRender,
21560
+ scrollbarRef,
21561
+ states,
21562
+ getItemStyle,
21563
+ onScroll,
21564
+ onScrollbarScroll,
21565
+ onWheel,
21566
+ scrollTo,
21567
+ scrollToItem,
21568
+ resetScrollTop
21569
+ };
21570
+ expose({
21571
+ windowRef,
21572
+ innerRef,
21573
+ getItemStyleCache,
21574
+ scrollTo,
21575
+ scrollToItem,
21576
+ resetScrollTop,
21577
+ states
21578
+ });
21579
+ return api;
21580
+ },
21581
+ render(ctx) {
21582
+ var _a;
21583
+ const {
21584
+ $slots,
21585
+ className,
21586
+ clientSize,
21587
+ containerElement,
21588
+ data,
21589
+ getItemStyle,
21590
+ innerElement,
21591
+ itemsToRender,
21592
+ innerStyle,
21593
+ layout,
21594
+ total,
21595
+ onScroll,
21596
+ onScrollbarScroll,
21597
+ states,
21598
+ useIsScrolling,
21599
+ windowStyle,
21600
+ ns
21601
+ } = ctx;
21602
+ const [start, end] = itemsToRender;
21603
+ const Container = vue.resolveDynamicComponent(containerElement);
21604
+ const Inner = vue.resolveDynamicComponent(innerElement);
21605
+ const children = [];
21606
+ if (total > 0) {
21607
+ for (let i = start; i <= end; i++) {
21608
+ children.push(vue.h(vue.Fragment, { key: i }, (_a = $slots.default) == null ? void 0 : _a.call($slots, {
21609
+ data,
21610
+ index: i,
21611
+ isScrolling: useIsScrolling ? states.isScrolling : void 0,
21612
+ style: getItemStyle(i)
21613
+ })));
21614
+ }
21615
+ }
21616
+ const InnerNode = [
21617
+ vue.h(Inner, {
21618
+ style: innerStyle,
21619
+ ref: "innerRef"
21620
+ }, !isString$1(Inner) ? {
21621
+ default: () => children
21622
+ } : children)
21623
+ ];
21624
+ const scrollbar = vue.h(ScrollBar, {
21625
+ ref: "scrollbarRef",
21626
+ clientSize,
21627
+ layout,
21628
+ onScroll: onScrollbarScroll,
21629
+ ratio: clientSize * 100 / this.estimatedTotalSize,
21630
+ scrollFrom: states.scrollOffset / (this.estimatedTotalSize - clientSize),
21631
+ total
21632
+ });
21633
+ const listContainer = vue.h(Container, {
21634
+ class: [ns.e("window"), className],
21635
+ style: windowStyle,
21636
+ onScroll,
21637
+ ref: "windowRef",
21638
+ key: 0
21639
+ }, !isString$1(Container) ? { default: () => [InnerNode] } : [InnerNode]);
21640
+ return vue.h("div", {
21641
+ key: 0,
21642
+ class: [ns.e("wrapper"), states.scrollbarAlwaysOn ? "always-on" : ""]
21643
+ }, [listContainer, scrollbar]);
21644
+ }
21645
+ });
21646
+ };
21647
+
21648
+ const FixedSizeList = createList({
21649
+ name: "ElFixedSizeList",
21650
+ getItemOffset: ({ itemSize }, index) => index * itemSize,
21651
+ getItemSize: ({ itemSize }) => itemSize,
21652
+ getEstimatedTotalSize: ({ total, itemSize }) => itemSize * total,
21653
+ getOffset: ({ height, total, itemSize, layout, width }, index, alignment, scrollOffset) => {
21654
+ const size = isHorizontal(layout) ? width : height;
21655
+ const lastItemOffset = Math.max(0, total * itemSize - size);
21656
+ const maxOffset = Math.min(lastItemOffset, index * itemSize);
21657
+ const minOffset = Math.max(0, (index + 1) * itemSize - size);
21658
+ if (alignment === SMART_ALIGNMENT) {
21659
+ if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {
21660
+ alignment = AUTO_ALIGNMENT;
21661
+ } else {
21662
+ alignment = CENTERED_ALIGNMENT;
21663
+ }
21664
+ }
21665
+ switch (alignment) {
21666
+ case START_ALIGNMENT: {
21667
+ return maxOffset;
21668
+ }
21669
+ case END_ALIGNMENT: {
21670
+ return minOffset;
21671
+ }
21672
+ case CENTERED_ALIGNMENT: {
21673
+ const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
21674
+ if (middleOffset < Math.ceil(size / 2)) {
21675
+ return 0;
21676
+ } else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {
21677
+ return lastItemOffset;
21678
+ } else {
21679
+ return middleOffset;
21680
+ }
21681
+ }
21682
+ case AUTO_ALIGNMENT:
21683
+ default: {
21684
+ if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
21685
+ return scrollOffset;
21686
+ } else if (scrollOffset < minOffset) {
21687
+ return minOffset;
21688
+ } else {
21689
+ return maxOffset;
21690
+ }
21691
+ }
21692
+ }
21693
+ },
21694
+ getStartIndexForOffset: ({ total, itemSize }, offset) => Math.max(0, Math.min(total - 1, Math.floor(offset / itemSize))),
21695
+ getStopIndexForStartIndex: ({ height, total, itemSize, layout, width }, startIndex, scrollOffset) => {
21696
+ const offset = startIndex * itemSize;
21697
+ const size = isHorizontal(layout) ? width : height;
21698
+ const numVisibleItems = Math.ceil((size + scrollOffset - offset) / itemSize);
21699
+ return Math.max(0, Math.min(total - 1, startIndex + numVisibleItems - 1));
21700
+ },
21701
+ initCache() {
21702
+ return void 0;
21703
+ },
21704
+ clearCache: true,
21705
+ validateProps() {
21706
+ }
21707
+ });
21708
+
21709
+ const getItemFromCache = (props, index, listCache) => {
21710
+ const { itemSize } = props;
21711
+ const { items, lastVisitedIndex } = listCache;
21712
+ if (index > lastVisitedIndex) {
21713
+ let offset = 0;
21714
+ if (lastVisitedIndex >= 0) {
21715
+ const item = items[lastVisitedIndex];
21716
+ offset = item.offset + item.size;
21717
+ }
21718
+ for (let i = lastVisitedIndex + 1; i <= index; i++) {
21719
+ const size = itemSize(i);
21720
+ items[i] = {
21721
+ offset,
21722
+ size
21723
+ };
21724
+ offset += size;
21725
+ }
21726
+ listCache.lastVisitedIndex = index;
21727
+ }
21728
+ return items[index];
21729
+ };
21730
+ const findItem = (props, listCache, offset) => {
21731
+ const { items, lastVisitedIndex } = listCache;
21732
+ const lastVisitedOffset = lastVisitedIndex > 0 ? items[lastVisitedIndex].offset : 0;
21733
+ if (lastVisitedOffset >= offset) {
21734
+ return bs(props, listCache, 0, lastVisitedIndex, offset);
21735
+ }
21736
+ return es(props, listCache, Math.max(0, lastVisitedIndex), offset);
21737
+ };
21738
+ const bs = (props, listCache, low, high, offset) => {
21739
+ while (low <= high) {
21740
+ const mid = low + Math.floor((high - low) / 2);
21741
+ const currentOffset = getItemFromCache(props, mid, listCache).offset;
21742
+ if (currentOffset === offset) {
21743
+ return mid;
21744
+ } else if (currentOffset < offset) {
21745
+ low = mid + 1;
21746
+ } else if (currentOffset > offset) {
21747
+ high = mid - 1;
21748
+ }
21749
+ }
21750
+ return Math.max(0, low - 1);
21751
+ };
21752
+ const es = (props, listCache, index, offset) => {
21753
+ const { total } = props;
21754
+ let exponent = 1;
21755
+ while (index < total && getItemFromCache(props, index, listCache).offset < offset) {
21756
+ index += exponent;
21757
+ exponent *= 2;
21758
+ }
21759
+ return bs(props, listCache, Math.floor(index / 2), Math.min(index, total - 1), offset);
21760
+ };
21761
+ const getEstimatedTotalSize = ({ total }, { items, estimatedItemSize, lastVisitedIndex }) => {
21762
+ let totalSizeOfMeasuredItems = 0;
21763
+ if (lastVisitedIndex >= total) {
21764
+ lastVisitedIndex = total - 1;
21765
+ }
21766
+ if (lastVisitedIndex >= 0) {
21767
+ const item = items[lastVisitedIndex];
21768
+ totalSizeOfMeasuredItems = item.offset + item.size;
21769
+ }
21770
+ const numUnmeasuredItems = total - lastVisitedIndex - 1;
21771
+ const totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;
21772
+ return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;
21773
+ };
21774
+ const DynamicSizeList = createList({
21775
+ name: "ElDynamicSizeList",
21776
+ getItemOffset: (props, index, listCache) => getItemFromCache(props, index, listCache).offset,
21777
+ getItemSize: (_, index, { items }) => items[index].size,
21778
+ getEstimatedTotalSize,
21779
+ getOffset: (props, index, alignment, scrollOffset, listCache) => {
21780
+ const { height, layout, width } = props;
21781
+ const size = isHorizontal(layout) ? width : height;
21782
+ const item = getItemFromCache(props, index, listCache);
21783
+ const estimatedTotalSize = getEstimatedTotalSize(props, listCache);
21784
+ const maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, item.offset));
21785
+ const minOffset = Math.max(0, item.offset - size + item.size);
21786
+ if (alignment === SMART_ALIGNMENT) {
21787
+ if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {
21788
+ alignment = AUTO_ALIGNMENT;
21789
+ } else {
21790
+ alignment = CENTERED_ALIGNMENT;
21791
+ }
21792
+ }
21793
+ switch (alignment) {
21794
+ case START_ALIGNMENT: {
21795
+ return maxOffset;
21796
+ }
21797
+ case END_ALIGNMENT: {
21798
+ return minOffset;
21799
+ }
21800
+ case CENTERED_ALIGNMENT: {
21801
+ return Math.round(minOffset + (maxOffset - minOffset) / 2);
21802
+ }
21803
+ case AUTO_ALIGNMENT:
21804
+ default: {
21805
+ if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
21806
+ return scrollOffset;
21807
+ } else if (scrollOffset < minOffset) {
21808
+ return minOffset;
21809
+ } else {
21810
+ return maxOffset;
21811
+ }
21812
+ }
21813
+ }
21814
+ },
21815
+ getStartIndexForOffset: (props, offset, listCache) => findItem(props, listCache, offset),
21816
+ getStopIndexForStartIndex: (props, startIndex, scrollOffset, listCache) => {
21817
+ const { height, total, layout, width } = props;
21818
+ const size = isHorizontal(layout) ? width : height;
21819
+ const item = getItemFromCache(props, startIndex, listCache);
21820
+ const maxOffset = scrollOffset + size;
21821
+ let offset = item.offset + item.size;
21822
+ let stopIndex = startIndex;
21823
+ while (stopIndex < total - 1 && offset < maxOffset) {
21824
+ stopIndex++;
21825
+ offset += getItemFromCache(props, stopIndex, listCache).size;
21826
+ }
21827
+ return stopIndex;
21828
+ },
21829
+ initCache({ estimatedItemSize = DEFAULT_DYNAMIC_LIST_ITEM_SIZE }, instance) {
21830
+ const cache = {
21831
+ items: {},
21832
+ estimatedItemSize,
21833
+ lastVisitedIndex: -1
21834
+ };
21835
+ cache.clearCacheAfterIndex = (index, forceUpdate = true) => {
21836
+ var _a, _b;
21837
+ cache.lastVisitedIndex = Math.min(cache.lastVisitedIndex, index - 1);
21838
+ (_a = instance.exposed) == null ? void 0 : _a.getItemStyleCache(-1);
21839
+ if (forceUpdate) {
21840
+ (_b = instance.proxy) == null ? void 0 : _b.$forceUpdate();
21841
+ }
21842
+ };
21843
+ return cache;
21844
+ },
21845
+ clearCache: false,
21846
+ validateProps: ({ itemSize }) => {
21847
+ }
21848
+ });
21849
+
21850
+ const props = {
21851
+ loading: Boolean,
21852
+ data: {
21853
+ type: Array,
21854
+ required: true
21855
+ },
21856
+ hoveringIndex: Number,
21857
+ width: Number
21858
+ };
21859
+ var ElSelectMenu = vue.defineComponent({
21860
+ name: "ElSelectDropdown",
21861
+ props,
21862
+ setup(props2, {
21863
+ slots,
21864
+ expose
21865
+ }) {
21866
+ const select = vue.inject(selectV2InjectionKey);
21867
+ const ns = useNamespace("select");
21868
+ const {
21869
+ getLabel,
21870
+ getValue,
21871
+ getDisabled
21872
+ } = useProps(select.props);
21873
+ const cachedHeights = vue.ref([]);
21874
+ const listRef = vue.ref();
21875
+ const size = vue.computed(() => props2.data.length);
21876
+ vue.watch(() => size.value, () => {
21877
+ var _a, _b;
21878
+ (_b = (_a = select.tooltipRef.value).updatePopper) == null ? void 0 : _b.call(_a);
21879
+ });
21880
+ const isSized = vue.computed(() => isUndefined(select.props.estimatedOptionHeight));
21881
+ const listProps = vue.computed(() => {
21882
+ if (isSized.value) {
21883
+ return {
21884
+ itemSize: select.props.itemHeight
21885
+ };
21886
+ }
21887
+ return {
21888
+ estimatedSize: select.props.estimatedOptionHeight,
21889
+ itemSize: (idx) => cachedHeights.value[idx]
21890
+ };
21891
+ });
21892
+ const contains = (arr = [], target) => {
21893
+ const {
21894
+ props: {
21895
+ valueKey
21896
+ }
21897
+ } = select;
21898
+ if (!isObject$1(target)) {
21899
+ return arr.includes(target);
21900
+ }
21901
+ return arr && arr.some((item) => {
21902
+ return vue.toRaw(get(item, valueKey)) === get(target, valueKey);
21903
+ });
21904
+ };
21905
+ const isEqual = (selected, target) => {
21906
+ if (!isObject$1(target)) {
21907
+ return selected === target;
21908
+ } else {
21909
+ const {
21910
+ valueKey
21911
+ } = select.props;
21912
+ return get(selected, valueKey) === get(target, valueKey);
21913
+ }
21914
+ };
21915
+ const isItemSelected = (modelValue, target) => {
21916
+ if (select.props.multiple) {
21917
+ return contains(modelValue, getValue(target));
21918
+ }
21919
+ return isEqual(modelValue, getValue(target));
21920
+ };
21921
+ const isItemDisabled = (modelValue, selected) => {
21922
+ const {
21923
+ disabled,
21924
+ multiple,
21925
+ multipleLimit
21926
+ } = select.props;
21927
+ return disabled || !selected && (multiple ? multipleLimit > 0 && modelValue.length >= multipleLimit : false);
21928
+ };
21929
+ const isItemHovering = (target) => props2.hoveringIndex === target;
21930
+ const scrollToItem = (index) => {
21931
+ const list = listRef.value;
21932
+ if (list) {
21933
+ list.scrollToItem(index);
21934
+ }
21935
+ };
21936
+ const resetScrollTop = () => {
21937
+ const list = listRef.value;
21938
+ if (list) {
21939
+ list.resetScrollTop();
21940
+ }
21941
+ };
21942
+ const exposed = {
21943
+ listRef,
21944
+ isSized,
21945
+ isItemDisabled,
21946
+ isItemHovering,
21947
+ isItemSelected,
21948
+ scrollToItem,
21949
+ resetScrollTop
21950
+ };
21951
+ expose(exposed);
21952
+ const Item = (itemProps) => {
21953
+ const {
21954
+ index,
21955
+ data,
21956
+ style
21957
+ } = itemProps;
21958
+ const sized = vue.unref(isSized);
21959
+ const {
21960
+ itemSize,
21961
+ estimatedSize
21962
+ } = vue.unref(listProps);
21963
+ const {
21964
+ modelValue
21965
+ } = select.props;
21966
+ const {
21967
+ onSelect,
21968
+ onHover
21969
+ } = select;
21970
+ const item = data[index];
21971
+ if (item.type === "Group") {
21972
+ return vue.createVNode(GroupItem, {
21973
+ "item": item,
21974
+ "style": style,
21975
+ "height": sized ? itemSize : estimatedSize
21976
+ }, null);
21977
+ }
21978
+ const isSelected = isItemSelected(modelValue, item);
21979
+ const isDisabled = isItemDisabled(modelValue, isSelected);
21980
+ const isHovering = isItemHovering(index);
21981
+ return vue.createVNode(OptionItem, vue.mergeProps(itemProps, {
21982
+ "selected": isSelected,
21983
+ "disabled": getDisabled(item) || isDisabled,
21984
+ "created": !!item.created,
21985
+ "hovering": isHovering,
21986
+ "item": item,
21987
+ "onSelect": onSelect,
21988
+ "onHover": onHover
21989
+ }), {
21990
+ default: (props3) => {
21991
+ var _a;
21992
+ return ((_a = slots.default) == null ? void 0 : _a.call(slots, props3)) || vue.createVNode("span", null, [getLabel(item)]);
21993
+ }
21994
+ });
21995
+ };
21996
+ const {
21997
+ onKeyboardNavigate,
21998
+ onKeyboardSelect
21999
+ } = select;
22000
+ const onForward = () => {
22001
+ onKeyboardNavigate("forward");
22002
+ };
22003
+ const onBackward = () => {
22004
+ onKeyboardNavigate("backward");
22005
+ };
22006
+ const onKeydown = (e) => {
22007
+ const {
22008
+ code
22009
+ } = e;
22010
+ const {
22011
+ tab,
22012
+ esc,
22013
+ down,
22014
+ up,
22015
+ enter,
22016
+ numpadEnter
22017
+ } = EVENT_CODE;
22018
+ if (code !== tab) {
22019
+ e.preventDefault();
22020
+ e.stopPropagation();
22021
+ }
22022
+ switch (code) {
22023
+ case tab:
22024
+ case esc:
22025
+ break;
22026
+ case down:
22027
+ onForward();
22028
+ break;
22029
+ case up:
22030
+ onBackward();
22031
+ break;
22032
+ case enter:
22033
+ case numpadEnter:
22034
+ onKeyboardSelect();
22035
+ break;
22036
+ }
22037
+ };
22038
+ return () => {
22039
+ var _a, _b, _c, _d;
22040
+ const {
22041
+ data,
22042
+ width
22043
+ } = props2;
22044
+ const {
22045
+ height,
22046
+ multiple,
22047
+ scrollbarAlwaysOn
22048
+ } = select.props;
22049
+ const List = vue.unref(isSized) ? FixedSizeList : DynamicSizeList;
22050
+ return vue.createVNode("div", {
22051
+ "class": [ns.b("dropdown"), ns.is("multiple", multiple)],
22052
+ "style": {
22053
+ width: `${width}px`
22054
+ }
22055
+ }, [(_a = slots.header) == null ? void 0 : _a.call(slots), ((_b = slots.loading) == null ? void 0 : _b.call(slots)) || ((_c = slots.empty) == null ? void 0 : _c.call(slots)) || vue.createVNode(List, vue.mergeProps({
22056
+ "ref": listRef
22057
+ }, vue.unref(listProps), {
22058
+ "className": ns.be("dropdown", "list"),
22059
+ "scrollbarAlwaysOn": scrollbarAlwaysOn,
22060
+ "data": data,
22061
+ "height": height,
22062
+ "width": width,
22063
+ "total": data.length,
22064
+ "onKeydown": onKeydown
22065
+ }), {
22066
+ default: (props3) => vue.createVNode(Item, props3, null)
22067
+ }), (_d = slots.footer) == null ? void 0 : _d.call(slots)]);
22068
+ };
22069
+ }
22070
+ });
22071
+
22072
+ function useAllowCreate(props, states) {
22073
+ const { aliasProps, getLabel, getValue } = useProps(props);
22074
+ const createOptionCount = vue.ref(0);
22075
+ const cachedSelectedOption = vue.ref();
22076
+ const enableAllowCreateMode = vue.computed(() => {
22077
+ return props.allowCreate && props.filterable;
22078
+ });
22079
+ function hasExistingOption(query) {
22080
+ const hasOption = (option) => getLabel(option) === query;
22081
+ return props.options && props.options.some(hasOption) || states.createdOptions.some(hasOption);
22082
+ }
22083
+ function selectNewOption(option) {
22084
+ if (!enableAllowCreateMode.value) {
22085
+ return;
22086
+ }
22087
+ if (props.multiple && option.created) {
22088
+ createOptionCount.value++;
22089
+ } else {
22090
+ cachedSelectedOption.value = option;
22091
+ }
22092
+ }
22093
+ function createNewOption(query) {
22094
+ if (enableAllowCreateMode.value) {
22095
+ if (query && query.length > 0) {
22096
+ if (hasExistingOption(query)) {
22097
+ return;
22098
+ }
22099
+ const newOption = {
22100
+ [aliasProps.value.value]: query,
22101
+ [aliasProps.value.label]: query,
22102
+ created: true,
22103
+ [aliasProps.value.disabled]: false
22104
+ };
22105
+ if (states.createdOptions.length >= createOptionCount.value) {
22106
+ states.createdOptions[createOptionCount.value] = newOption;
22107
+ } else {
22108
+ states.createdOptions.push(newOption);
22109
+ }
22110
+ } else {
22111
+ if (props.multiple) {
22112
+ states.createdOptions.length = createOptionCount.value;
22113
+ } else {
22114
+ const selectedOption = cachedSelectedOption.value;
22115
+ states.createdOptions.length = 0;
22116
+ if (selectedOption && selectedOption.created) {
22117
+ states.createdOptions.push(selectedOption);
22118
+ }
22119
+ }
22120
+ }
22121
+ }
22122
+ }
22123
+ function removeNewOption(option) {
22124
+ if (!enableAllowCreateMode.value || !option || !option.created || option.created && props.reserveKeyword && states.inputValue === getLabel(option)) {
22125
+ return;
22126
+ }
22127
+ const idx = states.createdOptions.findIndex((it) => getValue(it) === getValue(option));
22128
+ if (~idx) {
22129
+ states.createdOptions.splice(idx, 1);
22130
+ createOptionCount.value--;
22131
+ }
22132
+ }
22133
+ function clearAllNewOption() {
22134
+ if (enableAllowCreateMode.value) {
22135
+ states.createdOptions.length = 0;
22136
+ createOptionCount.value = 0;
22137
+ }
22138
+ }
22139
+ return {
22140
+ createNewOption,
22141
+ removeNewOption,
22142
+ selectNewOption,
22143
+ clearAllNewOption
22144
+ };
22145
+ }
22146
+
22147
+ const useSelect = (props, emit) => {
22148
+ const { t } = useLocale();
22149
+ const nsSelect = useNamespace("select");
22150
+ const nsInput = useNamespace("input");
22151
+ const { form: elForm, formItem: elFormItem } = useFormItem();
22152
+ const { inputId } = useFormItemInputId(props, {
22153
+ formItemContext: elFormItem
22154
+ });
22155
+ const { aliasProps, getLabel, getValue, getDisabled, getOptions } = useProps(props);
22156
+ const { valueOnClear, isEmptyValue } = useEmptyValues(props);
22157
+ const states = vue.reactive({
22158
+ inputValue: "",
22159
+ cachedOptions: [],
22160
+ createdOptions: [],
22161
+ hoveringIndex: -1,
22162
+ inputHovering: false,
22163
+ selectionWidth: 0,
22164
+ collapseItemWidth: 0,
22165
+ previousQuery: null,
22166
+ previousValue: void 0,
22167
+ selectedLabel: "",
22168
+ menuVisibleOnFocus: false,
22169
+ isBeforeHide: false
22170
+ });
22171
+ const popperSize = vue.ref(-1);
22172
+ const selectRef = vue.ref();
22173
+ const selectionRef = vue.ref();
22174
+ const tooltipRef = vue.ref();
22175
+ const tagTooltipRef = vue.ref();
22176
+ const inputRef = vue.ref();
22177
+ const prefixRef = vue.ref();
22178
+ const suffixRef = vue.ref();
22179
+ const menuRef = vue.ref();
22180
+ const tagMenuRef = vue.ref();
22181
+ const collapseItemRef = vue.ref();
22182
+ const {
22183
+ isComposing,
22184
+ handleCompositionStart,
22185
+ handleCompositionEnd,
22186
+ handleCompositionUpdate
22187
+ } = useComposition({
22188
+ afterComposition: (e) => onInput(e)
22189
+ });
22190
+ const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
22191
+ beforeFocus() {
22192
+ return selectDisabled.value;
22193
+ },
22194
+ afterFocus() {
22195
+ if (props.automaticDropdown && !expanded.value) {
22196
+ expanded.value = true;
22197
+ states.menuVisibleOnFocus = true;
22198
+ }
22199
+ },
22200
+ beforeBlur(event) {
22201
+ var _a, _b;
22202
+ return ((_a = tooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event)) || ((_b = tagTooltipRef.value) == null ? void 0 : _b.isFocusInsideContent(event));
22203
+ },
22204
+ afterBlur() {
22205
+ expanded.value = false;
22206
+ states.menuVisibleOnFocus = false;
22207
+ }
22208
+ });
22209
+ const allOptions = vue.ref([]);
22210
+ const filteredOptions = vue.ref([]);
22211
+ const expanded = vue.ref(false);
22212
+ const selectDisabled = vue.computed(() => props.disabled || (elForm == null ? void 0 : elForm.disabled));
22213
+ const needStatusIcon = vue.computed(() => {
22214
+ var _a;
22215
+ return (_a = elForm == null ? void 0 : elForm.statusIcon) != null ? _a : false;
22216
+ });
22217
+ const popupHeight = vue.computed(() => {
22218
+ const totalHeight = filteredOptions.value.length * props.itemHeight;
22219
+ return totalHeight > props.height ? props.height : totalHeight;
22220
+ });
22221
+ const hasModelValue = vue.computed(() => {
22222
+ return props.multiple ? isArray$1(props.modelValue) && props.modelValue.length > 0 : !isEmptyValue(props.modelValue);
22223
+ });
22224
+ const showClearBtn = vue.computed(() => {
22225
+ return props.clearable && !selectDisabled.value && states.inputHovering && hasModelValue.value;
22226
+ });
22227
+ const iconComponent = vue.computed(() => props.remote && props.filterable ? "" : arrow_down_default);
22228
+ const iconReverse = vue.computed(() => iconComponent.value && nsSelect.is("reverse", expanded.value));
22229
+ const validateState = vue.computed(() => (elFormItem == null ? void 0 : elFormItem.validateState) || "");
22230
+ const validateIcon = vue.computed(() => {
22231
+ if (!validateState.value)
22232
+ return;
22233
+ return ValidateComponentsMap[validateState.value];
22234
+ });
22235
+ const debounce$1 = vue.computed(() => props.remote ? 300 : 0);
22236
+ const emptyText = vue.computed(() => {
22237
+ if (props.loading) {
22238
+ return props.loadingText || t("el.select.loading");
22239
+ } else {
22240
+ if (props.remote && !states.inputValue && allOptions.value.length === 0)
22241
+ return false;
22242
+ if (props.filterable && states.inputValue && allOptions.value.length > 0 && filteredOptions.value.length === 0) {
22243
+ return props.noMatchText || t("el.select.noMatch");
22244
+ }
22245
+ if (allOptions.value.length === 0) {
22246
+ return props.noDataText || t("el.select.noData");
22247
+ }
22248
+ }
22249
+ return null;
22250
+ });
22251
+ const filterOptions = (query) => {
22252
+ const isValidOption = (o) => {
22253
+ if (props.filterable && isFunction$1(props.filterMethod))
22254
+ return true;
22255
+ if (props.filterable && props.remote && isFunction$1(props.remoteMethod))
22256
+ return true;
22257
+ const regexp = new RegExp(escapeStringRegexp(query), "i");
22258
+ return query ? regexp.test(getLabel(o) || "") : true;
22259
+ };
22260
+ if (props.loading) {
22261
+ return [];
22262
+ }
22263
+ return [...states.createdOptions, ...props.options].reduce((all, item) => {
22264
+ const options = getOptions(item);
22265
+ if (isArray$1(options)) {
22266
+ const filtered = options.filter(isValidOption);
22267
+ if (filtered.length > 0) {
22268
+ all.push({
22269
+ label: getLabel(item),
22270
+ type: "Group"
22271
+ }, ...filtered);
22272
+ }
22273
+ } else if (props.remote || isValidOption(item)) {
22274
+ all.push(item);
22275
+ }
22276
+ return all;
22277
+ }, []);
22278
+ };
22279
+ const updateOptions = () => {
22280
+ allOptions.value = filterOptions("");
22281
+ filteredOptions.value = filterOptions(states.inputValue);
22282
+ };
22283
+ const allOptionsValueMap = vue.computed(() => {
22284
+ const valueMap = /* @__PURE__ */ new Map();
22285
+ allOptions.value.forEach((option, index) => {
22286
+ valueMap.set(getValueKey(getValue(option)), { option, index });
22287
+ });
22288
+ return valueMap;
22289
+ });
22290
+ const filteredOptionsValueMap = vue.computed(() => {
22291
+ const valueMap = /* @__PURE__ */ new Map();
22292
+ filteredOptions.value.forEach((option, index) => {
22293
+ valueMap.set(getValueKey(getValue(option)), { option, index });
22294
+ });
22295
+ return valueMap;
22296
+ });
22297
+ const optionsAllDisabled = vue.computed(() => filteredOptions.value.every((option) => getDisabled(option)));
22298
+ const selectSize = useFormSize();
22299
+ const collapseTagSize = vue.computed(() => selectSize.value === "small" ? "small" : "default");
22300
+ const calculatePopperSize = () => {
22301
+ var _a;
22302
+ if (isNumber(props.fitInputWidth)) {
22303
+ popperSize.value = props.fitInputWidth;
22304
+ return;
22305
+ }
22306
+ const width = ((_a = selectRef.value) == null ? void 0 : _a.offsetWidth) || 200;
22307
+ if (!props.fitInputWidth && allOptions.value.length > 0) {
22308
+ vue.nextTick(() => {
22309
+ popperSize.value = Math.max(width, calculateLabelMaxWidth());
22310
+ });
22311
+ } else {
22312
+ popperSize.value = width;
22313
+ }
22314
+ };
22315
+ const calculateLabelMaxWidth = () => {
22316
+ var _a, _b;
22317
+ const canvas = document.createElement("canvas");
22318
+ const ctx = canvas.getContext("2d");
22319
+ const selector = nsSelect.be("dropdown", "item");
22320
+ const dom = ((_b = (_a = menuRef.value) == null ? void 0 : _a.listRef) == null ? void 0 : _b.innerRef) || document;
22321
+ const dropdownItemEl = dom.querySelector(`.${selector}`);
22322
+ if (dropdownItemEl === null || ctx === null)
22323
+ return 0;
22324
+ const style = getComputedStyle(dropdownItemEl);
22325
+ const padding = Number.parseFloat(style.paddingLeft) + Number.parseFloat(style.paddingRight);
22326
+ ctx.font = style.font;
22327
+ const maxWidth = filteredOptions.value.reduce((max, option) => {
22328
+ const metrics = ctx.measureText(getLabel(option));
22329
+ return Math.max(metrics.width, max);
22330
+ }, 0);
22331
+ return maxWidth + padding;
22332
+ };
22333
+ const getGapWidth = () => {
22334
+ if (!selectionRef.value)
22335
+ return 0;
22336
+ const style = window.getComputedStyle(selectionRef.value);
22337
+ return Number.parseFloat(style.gap || "6px");
22338
+ };
22339
+ const tagStyle = vue.computed(() => {
22340
+ const gapWidth = getGapWidth();
22341
+ const maxWidth = collapseItemRef.value && props.maxCollapseTags === 1 ? states.selectionWidth - states.collapseItemWidth - gapWidth : states.selectionWidth;
22342
+ return { maxWidth: `${maxWidth}px` };
22343
+ });
22344
+ const collapseTagStyle = vue.computed(() => {
22345
+ return { maxWidth: `${states.selectionWidth}px` };
22346
+ });
22347
+ const shouldShowPlaceholder = vue.computed(() => {
22348
+ if (isArray$1(props.modelValue)) {
22349
+ return props.modelValue.length === 0 && !states.inputValue;
22350
+ }
22351
+ return props.filterable ? !states.inputValue : true;
22352
+ });
22353
+ const currentPlaceholder = vue.computed(() => {
22354
+ var _a;
22355
+ const _placeholder = (_a = props.placeholder) != null ? _a : t("el.select.placeholder");
22356
+ return props.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel;
22357
+ });
22358
+ const popperRef = vue.computed(() => {
22359
+ var _a, _b;
22360
+ return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
22361
+ });
22362
+ const indexRef = vue.computed(() => {
22363
+ if (props.multiple) {
22364
+ const len = props.modelValue.length;
22365
+ if (props.modelValue.length > 0 && filteredOptionsValueMap.value.has(props.modelValue[len - 1])) {
22366
+ const { index } = filteredOptionsValueMap.value.get(props.modelValue[len - 1]);
22367
+ return index;
22368
+ }
22369
+ } else {
22370
+ if (!isEmptyValue(props.modelValue) && filteredOptionsValueMap.value.has(props.modelValue)) {
22371
+ const { index } = filteredOptionsValueMap.value.get(props.modelValue);
22372
+ return index;
22373
+ }
22374
+ }
22375
+ return -1;
22376
+ });
22377
+ const dropdownMenuVisible = vue.computed({
22378
+ get() {
22379
+ return expanded.value && emptyText.value !== false;
22380
+ },
22381
+ set(val) {
22382
+ expanded.value = val;
22383
+ }
22384
+ });
22385
+ const showTagList = vue.computed(() => {
22386
+ if (!props.multiple) {
22387
+ return [];
22388
+ }
22389
+ return props.collapseTags ? states.cachedOptions.slice(0, props.maxCollapseTags) : states.cachedOptions;
22390
+ });
22391
+ const collapseTagList = vue.computed(() => {
22392
+ if (!props.multiple) {
22393
+ return [];
22394
+ }
22395
+ return props.collapseTags ? states.cachedOptions.slice(props.maxCollapseTags) : [];
22396
+ });
22397
+ const {
22398
+ createNewOption,
22399
+ removeNewOption,
22400
+ selectNewOption,
22401
+ clearAllNewOption
22402
+ } = useAllowCreate(props, states);
22403
+ const toggleMenu = () => {
22404
+ if (selectDisabled.value)
22405
+ return;
22406
+ if (states.menuVisibleOnFocus) {
22407
+ states.menuVisibleOnFocus = false;
22408
+ } else {
22409
+ expanded.value = !expanded.value;
22410
+ }
22411
+ };
22412
+ const onInputChange = () => {
22413
+ if (states.inputValue.length > 0 && !expanded.value) {
22414
+ expanded.value = true;
22415
+ }
22416
+ createNewOption(states.inputValue);
22417
+ handleQueryChange(states.inputValue);
22418
+ };
22419
+ const debouncedOnInputChange = debounce(onInputChange, debounce$1.value);
22420
+ const handleQueryChange = (val) => {
22421
+ if (states.previousQuery === val || isComposing.value) {
22422
+ return;
22423
+ }
22424
+ states.previousQuery = val;
22425
+ if (props.filterable && isFunction$1(props.filterMethod)) {
22426
+ props.filterMethod(val);
22427
+ } else if (props.filterable && props.remote && isFunction$1(props.remoteMethod)) {
22428
+ props.remoteMethod(val);
22429
+ }
22430
+ if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptions.value.length) {
22431
+ vue.nextTick(checkDefaultFirstOption);
22432
+ } else {
22433
+ vue.nextTick(updateHoveringIndex);
22434
+ }
22435
+ };
22436
+ const checkDefaultFirstOption = () => {
22437
+ const optionsInDropdown = filteredOptions.value.filter((n) => !n.disabled && n.type !== "Group");
22438
+ const userCreatedOption = optionsInDropdown.find((n) => n.created);
22439
+ const firstOriginOption = optionsInDropdown[0];
22440
+ states.hoveringIndex = getValueIndex(filteredOptions.value, userCreatedOption || firstOriginOption);
22441
+ };
22442
+ const emitChange = (val) => {
22443
+ if (!isEqual$1(props.modelValue, val)) {
22444
+ emit(CHANGE_EVENT, val);
22445
+ }
22446
+ };
22447
+ const update = (val) => {
22448
+ emit(UPDATE_MODEL_EVENT, val);
22449
+ emitChange(val);
22450
+ states.previousValue = props.multiple ? String(val) : val;
22451
+ };
22452
+ const getValueIndex = (arr = [], value) => {
22453
+ if (!isObject$1(value)) {
22454
+ return arr.indexOf(value);
22455
+ }
22456
+ const valueKey = props.valueKey;
22457
+ let index = -1;
22458
+ arr.some((item, i) => {
22459
+ if (get(item, valueKey) === get(value, valueKey)) {
22460
+ index = i;
22461
+ return true;
22462
+ }
22463
+ return false;
22464
+ });
22465
+ return index;
22466
+ };
22467
+ const getValueKey = (item) => {
22468
+ return isObject$1(item) ? get(item, props.valueKey) : item;
22469
+ };
22470
+ const handleResize = () => {
22471
+ calculatePopperSize();
22472
+ };
22473
+ const resetSelectionWidth = () => {
22474
+ states.selectionWidth = selectionRef.value.getBoundingClientRect().width;
22475
+ };
22476
+ const resetCollapseItemWidth = () => {
22477
+ states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
22478
+ };
22479
+ const updateTooltip = () => {
22480
+ var _a, _b;
22481
+ (_b = (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
22482
+ };
22483
+ const updateTagTooltip = () => {
22484
+ var _a, _b;
22485
+ (_b = (_a = tagTooltipRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
22486
+ };
22487
+ const onSelect = (option) => {
22488
+ if (props.multiple) {
22489
+ let selectedOptions = props.modelValue.slice();
22490
+ const index = getValueIndex(selectedOptions, getValue(option));
22491
+ if (index > -1) {
22492
+ selectedOptions = [
22493
+ ...selectedOptions.slice(0, index),
22494
+ ...selectedOptions.slice(index + 1)
22495
+ ];
22496
+ states.cachedOptions.splice(index, 1);
22497
+ removeNewOption(option);
22498
+ } else if (props.multipleLimit <= 0 || selectedOptions.length < props.multipleLimit) {
22499
+ selectedOptions = [...selectedOptions, getValue(option)];
22500
+ states.cachedOptions.push(option);
22501
+ selectNewOption(option);
22502
+ }
22503
+ update(selectedOptions);
22504
+ if (option.created) {
22505
+ handleQueryChange("");
22506
+ }
22507
+ if (props.filterable && !props.reserveKeyword) {
22508
+ states.inputValue = "";
22509
+ }
22510
+ } else {
22511
+ states.selectedLabel = getLabel(option);
22512
+ update(getValue(option));
22513
+ expanded.value = false;
22514
+ selectNewOption(option);
22515
+ if (!option.created) {
22516
+ clearAllNewOption();
22517
+ }
22518
+ }
22519
+ focus();
22520
+ };
22521
+ const deleteTag = (event, option) => {
22522
+ let selectedOptions = props.modelValue.slice();
22523
+ const index = getValueIndex(selectedOptions, getValue(option));
22524
+ if (index > -1 && !selectDisabled.value) {
22525
+ selectedOptions = [
22526
+ ...props.modelValue.slice(0, index),
22527
+ ...props.modelValue.slice(index + 1)
22528
+ ];
22529
+ states.cachedOptions.splice(index, 1);
22530
+ update(selectedOptions);
22531
+ emit("remove-tag", getValue(option));
22532
+ removeNewOption(option);
22533
+ }
22534
+ event.stopPropagation();
22535
+ focus();
22536
+ };
22537
+ const focus = () => {
22538
+ var _a;
22539
+ (_a = inputRef.value) == null ? void 0 : _a.focus();
22540
+ };
22541
+ const blur = () => {
22542
+ var _a;
22543
+ if (expanded.value) {
22544
+ expanded.value = false;
22545
+ vue.nextTick(() => {
22546
+ var _a2;
22547
+ return (_a2 = inputRef.value) == null ? void 0 : _a2.blur();
22548
+ });
22549
+ return;
22550
+ }
22551
+ (_a = inputRef.value) == null ? void 0 : _a.blur();
22552
+ };
22553
+ const handleEsc = () => {
22554
+ if (states.inputValue.length > 0) {
22555
+ states.inputValue = "";
22556
+ } else {
22557
+ expanded.value = false;
22558
+ }
22559
+ };
22560
+ const getLastNotDisabledIndex = (value) => findLastIndex(value, (it) => !states.cachedOptions.some((option) => getValue(option) === it && getDisabled(option)));
22561
+ const handleDel = (e) => {
22562
+ if (!props.multiple)
22563
+ return;
22564
+ if (e.code === EVENT_CODE.delete)
22565
+ return;
22566
+ if (states.inputValue.length === 0) {
22567
+ e.preventDefault();
22568
+ const selected = props.modelValue.slice();
22569
+ const lastNotDisabledIndex = getLastNotDisabledIndex(selected);
22570
+ if (lastNotDisabledIndex < 0)
22571
+ return;
22572
+ const removeTagValue = selected[lastNotDisabledIndex];
22573
+ selected.splice(lastNotDisabledIndex, 1);
22574
+ const option = states.cachedOptions[lastNotDisabledIndex];
22575
+ states.cachedOptions.splice(lastNotDisabledIndex, 1);
22576
+ removeNewOption(option);
22577
+ update(selected);
22578
+ emit("remove-tag", removeTagValue);
22579
+ }
22580
+ };
22581
+ const handleClear = () => {
22582
+ let emptyValue;
22583
+ if (isArray$1(props.modelValue)) {
22584
+ emptyValue = [];
22585
+ } else {
22586
+ emptyValue = valueOnClear.value;
22587
+ }
22588
+ if (props.multiple) {
22589
+ states.cachedOptions = [];
22590
+ } else {
22591
+ states.selectedLabel = "";
22592
+ }
22593
+ expanded.value = false;
22594
+ update(emptyValue);
22595
+ emit("clear");
22596
+ clearAllNewOption();
22597
+ focus();
22598
+ };
22599
+ const onKeyboardNavigate = (direction, hoveringIndex = void 0) => {
22600
+ const options = filteredOptions.value;
22601
+ if (!["forward", "backward"].includes(direction) || selectDisabled.value || options.length <= 0 || optionsAllDisabled.value || isComposing.value) {
22602
+ return;
22603
+ }
22604
+ if (!expanded.value) {
22605
+ return toggleMenu();
22606
+ }
22607
+ if (hoveringIndex === void 0) {
22608
+ hoveringIndex = states.hoveringIndex;
22609
+ }
22610
+ let newIndex = -1;
22611
+ if (direction === "forward") {
22612
+ newIndex = hoveringIndex + 1;
22613
+ if (newIndex >= options.length) {
22614
+ newIndex = 0;
22615
+ }
22616
+ } else if (direction === "backward") {
22617
+ newIndex = hoveringIndex - 1;
22618
+ if (newIndex < 0 || newIndex >= options.length) {
22619
+ newIndex = options.length - 1;
22620
+ }
22621
+ }
22622
+ const option = options[newIndex];
22623
+ if (getDisabled(option) || option.type === "Group") {
22624
+ return onKeyboardNavigate(direction, newIndex);
22625
+ } else {
22626
+ states.hoveringIndex = newIndex;
22627
+ scrollToItem(newIndex);
22628
+ }
22629
+ };
22630
+ const onKeyboardSelect = () => {
22631
+ if (!expanded.value) {
22632
+ return toggleMenu();
22633
+ } else if (~states.hoveringIndex && filteredOptions.value[states.hoveringIndex]) {
22634
+ onSelect(filteredOptions.value[states.hoveringIndex]);
22635
+ }
22636
+ };
22637
+ const onHoverOption = (idx) => {
22638
+ states.hoveringIndex = idx != null ? idx : -1;
22639
+ };
22640
+ const updateHoveringIndex = () => {
22641
+ if (!props.multiple) {
22642
+ states.hoveringIndex = filteredOptions.value.findIndex((item) => {
22643
+ return getValueKey(item) === getValueKey(props.modelValue);
22644
+ });
22645
+ } else {
22646
+ states.hoveringIndex = filteredOptions.value.findIndex((item) => props.modelValue.some((modelValue) => getValueKey(modelValue) === getValueKey(item)));
22647
+ }
22648
+ };
22649
+ const onInput = (event) => {
22650
+ states.inputValue = event.target.value;
22651
+ if (props.remote) {
22652
+ debouncedOnInputChange();
22653
+ } else {
22654
+ return onInputChange();
22655
+ }
22656
+ };
22657
+ const handleClickOutside = (event) => {
22658
+ expanded.value = false;
22659
+ if (isFocused.value) {
22660
+ const _event = new FocusEvent("focus", event);
22661
+ handleBlur(_event);
22662
+ }
22663
+ };
22664
+ const handleMenuEnter = () => {
22665
+ states.isBeforeHide = false;
22666
+ return vue.nextTick(() => {
22667
+ if (~indexRef.value) {
22668
+ scrollToItem(states.hoveringIndex);
22669
+ }
22670
+ });
22671
+ };
22672
+ const scrollToItem = (index) => {
22673
+ menuRef.value.scrollToItem(index);
22674
+ };
22675
+ const getOption = (value, cachedOptions) => {
22676
+ const selectValue = getValueKey(value);
22677
+ if (allOptionsValueMap.value.has(selectValue)) {
22678
+ const { option } = allOptionsValueMap.value.get(selectValue);
22679
+ return option;
22680
+ }
22681
+ if (cachedOptions && cachedOptions.length) {
22682
+ const option = cachedOptions.find((option2) => getValueKey(getValue(option2)) === selectValue);
22683
+ if (option) {
22684
+ return option;
22685
+ }
22686
+ }
22687
+ return {
22688
+ [aliasProps.value.value]: value,
22689
+ [aliasProps.value.label]: value
22690
+ };
22691
+ };
22692
+ const initStates = (needUpdateSelectedLabel = false) => {
22693
+ if (props.multiple) {
22694
+ if (props.modelValue.length > 0) {
22695
+ const cachedOptions = states.cachedOptions.slice();
22696
+ states.cachedOptions.length = 0;
22697
+ states.previousValue = props.modelValue.toString();
22698
+ for (const value of props.modelValue) {
22699
+ const option = getOption(value, cachedOptions);
22700
+ states.cachedOptions.push(option);
22701
+ }
22702
+ } else {
22703
+ states.cachedOptions = [];
22704
+ states.previousValue = void 0;
22705
+ }
22706
+ } else {
22707
+ if (hasModelValue.value) {
22708
+ states.previousValue = props.modelValue;
22709
+ const options = filteredOptions.value;
22710
+ const selectedItemIndex = options.findIndex((option) => getValueKey(getValue(option)) === getValueKey(props.modelValue));
22711
+ if (~selectedItemIndex) {
22712
+ states.selectedLabel = getLabel(options[selectedItemIndex]);
22713
+ } else {
22714
+ if (!states.selectedLabel || needUpdateSelectedLabel) {
22715
+ states.selectedLabel = getValueKey(props.modelValue);
22716
+ }
22717
+ }
22718
+ } else {
22719
+ states.selectedLabel = "";
22720
+ states.previousValue = void 0;
22721
+ }
22722
+ }
22723
+ clearAllNewOption();
22724
+ calculatePopperSize();
22725
+ };
22726
+ vue.watch(() => props.fitInputWidth, () => {
22727
+ calculatePopperSize();
22728
+ });
22729
+ vue.watch(expanded, (val) => {
22730
+ if (val) {
22731
+ if (!props.persistent) {
22732
+ calculatePopperSize();
22733
+ }
22734
+ handleQueryChange("");
22735
+ } else {
22736
+ states.inputValue = "";
22737
+ states.previousQuery = null;
22738
+ states.isBeforeHide = true;
22739
+ createNewOption("");
22740
+ }
22741
+ emit("visible-change", val);
22742
+ });
22743
+ vue.watch(() => props.modelValue, (val, oldVal) => {
22744
+ var _a;
22745
+ const isValEmpty = !val || isArray$1(val) && val.length === 0;
22746
+ if (isValEmpty || props.multiple && !isEqual$1(val.toString(), states.previousValue) || !props.multiple && getValueKey(val) !== getValueKey(states.previousValue)) {
22747
+ initStates(true);
22748
+ }
22749
+ if (!isEqual$1(val, oldVal) && props.validateEvent) {
22750
+ (_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change").catch((err) => debugWarn());
22751
+ }
22752
+ }, {
22753
+ deep: true
22754
+ });
22755
+ vue.watch(() => props.options, () => {
22756
+ const input = inputRef.value;
22757
+ if (!input || input && document.activeElement !== input) {
22758
+ initStates();
22759
+ }
22760
+ }, {
22761
+ deep: true,
22762
+ flush: "post"
22763
+ });
22764
+ vue.watch(() => filteredOptions.value, () => {
22765
+ calculatePopperSize();
22766
+ return menuRef.value && vue.nextTick(menuRef.value.resetScrollTop);
22767
+ });
22768
+ vue.watchEffect(() => {
22769
+ if (states.isBeforeHide)
22770
+ return;
22771
+ updateOptions();
22772
+ });
22773
+ vue.watchEffect(() => {
22774
+ const { valueKey, options } = props;
22775
+ const duplicateValue = /* @__PURE__ */ new Map();
22776
+ for (const item of options) {
22777
+ const optionValue = getValue(item);
22778
+ let v = optionValue;
22779
+ if (isObject$1(v)) {
22780
+ v = get(optionValue, valueKey);
22781
+ }
22782
+ if (duplicateValue.get(v)) {
22783
+ break;
22784
+ } else {
22785
+ duplicateValue.set(v, true);
22786
+ }
22787
+ }
22788
+ });
22789
+ vue.onMounted(() => {
22790
+ initStates();
22791
+ });
22792
+ useResizeObserver(selectRef, handleResize);
22793
+ useResizeObserver(selectionRef, resetSelectionWidth);
22794
+ useResizeObserver(menuRef, updateTooltip);
22795
+ useResizeObserver(wrapperRef, updateTooltip);
22796
+ useResizeObserver(tagMenuRef, updateTagTooltip);
22797
+ useResizeObserver(collapseItemRef, resetCollapseItemWidth);
22798
+ return {
22799
+ inputId,
22800
+ collapseTagSize,
22801
+ currentPlaceholder,
22802
+ expanded,
22803
+ emptyText,
22804
+ popupHeight,
22805
+ debounce: debounce$1,
22806
+ allOptions,
22807
+ filteredOptions,
22808
+ iconComponent,
22809
+ iconReverse,
22810
+ tagStyle,
22811
+ collapseTagStyle,
22812
+ popperSize,
22813
+ dropdownMenuVisible,
22814
+ hasModelValue,
22815
+ shouldShowPlaceholder,
22816
+ selectDisabled,
22817
+ selectSize,
22818
+ needStatusIcon,
22819
+ showClearBtn,
22820
+ states,
22821
+ isFocused,
22822
+ nsSelect,
22823
+ nsInput,
22824
+ inputRef,
22825
+ menuRef,
22826
+ tagMenuRef,
22827
+ tooltipRef,
22828
+ tagTooltipRef,
22829
+ selectRef,
22830
+ wrapperRef,
22831
+ selectionRef,
22832
+ prefixRef,
22833
+ suffixRef,
22834
+ collapseItemRef,
22835
+ popperRef,
22836
+ validateState,
22837
+ validateIcon,
22838
+ showTagList,
22839
+ collapseTagList,
22840
+ debouncedOnInputChange,
22841
+ deleteTag,
22842
+ getLabel,
22843
+ getValue,
22844
+ getDisabled,
22845
+ getValueKey,
22846
+ handleClear,
22847
+ handleClickOutside,
22848
+ handleDel,
22849
+ handleEsc,
22850
+ focus,
22851
+ blur,
22852
+ handleMenuEnter,
22853
+ handleResize,
22854
+ resetSelectionWidth,
22855
+ updateTooltip,
22856
+ updateTagTooltip,
22857
+ updateOptions,
22858
+ toggleMenu,
22859
+ scrollTo: scrollToItem,
22860
+ onInput,
22861
+ onKeyboardNavigate,
22862
+ onKeyboardSelect,
22863
+ onSelect,
22864
+ onHover: onHoverOption,
22865
+ handleCompositionStart,
22866
+ handleCompositionEnd,
22867
+ handleCompositionUpdate
22868
+ };
22869
+ };
22870
+
22871
+ const _sfc_main$e = vue.defineComponent({
22872
+ name: "ElSelectV2",
22873
+ components: {
22874
+ ElSelectMenu,
22875
+ ElTag,
22876
+ ElTooltip,
22877
+ ElIcon
22878
+ },
22879
+ directives: { ClickOutside },
22880
+ props: SelectProps,
22881
+ emits: selectEmits,
22882
+ setup(props, { emit }) {
22883
+ const modelValue = vue.computed(() => {
22884
+ const { modelValue: rawModelValue, multiple } = props;
22885
+ const fallback = multiple ? [] : void 0;
22886
+ if (isArray$1(rawModelValue)) {
22887
+ return multiple ? rawModelValue : fallback;
22888
+ }
22889
+ return multiple ? fallback : rawModelValue;
22890
+ });
22891
+ const API = useSelect(vue.reactive({
22892
+ ...vue.toRefs(props),
22893
+ modelValue
22894
+ }), emit);
22895
+ const { calculatorRef, inputStyle } = useCalcInputWidth();
22896
+ vue.provide(selectV2InjectionKey, {
22897
+ props: vue.reactive({
22898
+ ...vue.toRefs(props),
22899
+ height: API.popupHeight,
22900
+ modelValue
22901
+ }),
22902
+ expanded: API.expanded,
22903
+ tooltipRef: API.tooltipRef,
22904
+ onSelect: API.onSelect,
22905
+ onHover: API.onHover,
22906
+ onKeyboardNavigate: API.onKeyboardNavigate,
22907
+ onKeyboardSelect: API.onKeyboardSelect
22908
+ });
22909
+ const selectedLabel = vue.computed(() => {
22910
+ if (!props.multiple) {
22911
+ return API.states.selectedLabel;
22912
+ }
22913
+ return API.states.cachedOptions.map((i) => i.label);
22914
+ });
22915
+ return {
22916
+ ...API,
22917
+ modelValue,
22918
+ selectedLabel,
22919
+ calculatorRef,
22920
+ inputStyle
22921
+ };
22922
+ }
22923
+ });
22924
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
22925
+ const _component_el_tag = vue.resolveComponent("el-tag");
22926
+ const _component_el_tooltip = vue.resolveComponent("el-tooltip");
22927
+ const _component_el_icon = vue.resolveComponent("el-icon");
22928
+ const _component_el_select_menu = vue.resolveComponent("el-select-menu");
22929
+ const _directive_click_outside = vue.resolveDirective("click-outside");
22930
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
22931
+ ref: "selectRef",
22932
+ class: vue.normalizeClass([_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]),
22933
+ onMouseenter: ($event) => _ctx.states.inputHovering = true,
22934
+ onMouseleave: ($event) => _ctx.states.inputHovering = false
22935
+ }, [
22936
+ vue.createVNode(_component_el_tooltip, {
22937
+ ref: "tooltipRef",
22938
+ visible: _ctx.dropdownMenuVisible,
22939
+ teleported: _ctx.teleported,
22940
+ "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
22941
+ "gpu-acceleration": false,
22942
+ "stop-popper-mouse-event": false,
22943
+ "popper-options": _ctx.popperOptions,
22944
+ "fallback-placements": _ctx.fallbackPlacements,
22945
+ effect: _ctx.effect,
22946
+ placement: _ctx.placement,
22947
+ pure: "",
22948
+ transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
22949
+ trigger: "click",
22950
+ persistent: _ctx.persistent,
22951
+ "append-to": _ctx.appendTo,
22952
+ "show-arrow": _ctx.showArrow,
22953
+ offset: _ctx.offset,
22954
+ onBeforeShow: _ctx.handleMenuEnter,
22955
+ onHide: ($event) => _ctx.states.isBeforeHide = false
22956
+ }, {
22957
+ default: vue.withCtx(() => [
22958
+ vue.createElementVNode("div", {
22959
+ ref: "wrapperRef",
22960
+ class: vue.normalizeClass([
22961
+ _ctx.nsSelect.e("wrapper"),
22962
+ _ctx.nsSelect.is("focused", _ctx.isFocused),
22963
+ _ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
22964
+ _ctx.nsSelect.is("filterable", _ctx.filterable),
22965
+ _ctx.nsSelect.is("disabled", _ctx.selectDisabled)
22966
+ ]),
22967
+ onClick: vue.withModifiers(_ctx.toggleMenu, ["prevent"])
22968
+ }, [
22969
+ _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("div", {
22970
+ key: 0,
22971
+ ref: "prefixRef",
22972
+ class: vue.normalizeClass(_ctx.nsSelect.e("prefix"))
22973
+ }, [
22974
+ vue.renderSlot(_ctx.$slots, "prefix")
22975
+ ], 2)) : vue.createCommentVNode("v-if", true),
22976
+ vue.createElementVNode("div", {
22977
+ ref: "selectionRef",
22978
+ class: vue.normalizeClass([
22979
+ _ctx.nsSelect.e("selection"),
22980
+ _ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.modelValue.length)
22981
+ ])
22982
+ }, [
22983
+ _ctx.multiple ? vue.renderSlot(_ctx.$slots, "tag", { key: 0 }, () => [
22984
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.showTagList, (item) => {
22985
+ return vue.openBlock(), vue.createElementBlock("div", {
22986
+ key: _ctx.getValueKey(_ctx.getValue(item)),
22987
+ class: vue.normalizeClass(_ctx.nsSelect.e("selected-item"))
22988
+ }, [
22989
+ vue.createVNode(_component_el_tag, {
22990
+ closable: !_ctx.selectDisabled && !_ctx.getDisabled(item),
22991
+ size: _ctx.collapseTagSize,
22992
+ type: _ctx.tagType,
22993
+ effect: _ctx.tagEffect,
22994
+ "disable-transitions": "",
22995
+ style: vue.normalizeStyle(_ctx.tagStyle),
22996
+ onClose: ($event) => _ctx.deleteTag($event, item)
22997
+ }, {
22998
+ default: vue.withCtx(() => [
22999
+ vue.createElementVNode("span", {
23000
+ class: vue.normalizeClass(_ctx.nsSelect.e("tags-text"))
23001
+ }, [
23002
+ vue.renderSlot(_ctx.$slots, "label", {
23003
+ label: _ctx.getLabel(item),
23004
+ value: _ctx.getValue(item)
23005
+ }, () => [
23006
+ vue.createTextVNode(vue.toDisplayString(_ctx.getLabel(item)), 1)
23007
+ ])
23008
+ ], 2)
23009
+ ]),
23010
+ _: 2
23011
+ }, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
23012
+ ], 2);
23013
+ }), 128)),
23014
+ _ctx.collapseTags && _ctx.modelValue.length > _ctx.maxCollapseTags ? (vue.openBlock(), vue.createBlock(_component_el_tooltip, {
23015
+ key: 0,
23016
+ ref: "tagTooltipRef",
23017
+ disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
23018
+ "fallback-placements": ["bottom", "top", "right", "left"],
23019
+ effect: _ctx.effect,
23020
+ placement: "bottom",
23021
+ teleported: _ctx.teleported
23022
+ }, {
23023
+ default: vue.withCtx(() => [
23024
+ vue.createElementVNode("div", {
23025
+ ref: "collapseItemRef",
23026
+ class: vue.normalizeClass(_ctx.nsSelect.e("selected-item"))
23027
+ }, [
23028
+ vue.createVNode(_component_el_tag, {
23029
+ closable: false,
23030
+ size: _ctx.collapseTagSize,
23031
+ type: _ctx.tagType,
23032
+ effect: _ctx.tagEffect,
23033
+ style: vue.normalizeStyle(_ctx.collapseTagStyle),
23034
+ "disable-transitions": ""
23035
+ }, {
23036
+ default: vue.withCtx(() => [
23037
+ vue.createElementVNode("span", {
23038
+ class: vue.normalizeClass(_ctx.nsSelect.e("tags-text"))
23039
+ }, " + " + vue.toDisplayString(_ctx.modelValue.length - _ctx.maxCollapseTags), 3)
23040
+ ]),
23041
+ _: 1
23042
+ }, 8, ["size", "type", "effect", "style"])
23043
+ ], 2)
23044
+ ]),
23045
+ content: vue.withCtx(() => [
23046
+ vue.createElementVNode("div", {
23047
+ ref: "tagMenuRef",
23048
+ class: vue.normalizeClass(_ctx.nsSelect.e("selection"))
23049
+ }, [
23050
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.collapseTagList, (selected) => {
23051
+ return vue.openBlock(), vue.createElementBlock("div", {
23052
+ key: _ctx.getValueKey(_ctx.getValue(selected)),
23053
+ class: vue.normalizeClass(_ctx.nsSelect.e("selected-item"))
23054
+ }, [
23055
+ vue.createVNode(_component_el_tag, {
23056
+ class: "in-tooltip",
23057
+ closable: !_ctx.selectDisabled && !_ctx.getDisabled(selected),
23058
+ size: _ctx.collapseTagSize,
23059
+ type: _ctx.tagType,
23060
+ effect: _ctx.tagEffect,
23061
+ "disable-transitions": "",
23062
+ onClose: ($event) => _ctx.deleteTag($event, selected)
23063
+ }, {
23064
+ default: vue.withCtx(() => [
23065
+ vue.createElementVNode("span", {
23066
+ class: vue.normalizeClass(_ctx.nsSelect.e("tags-text"))
23067
+ }, [
23068
+ vue.renderSlot(_ctx.$slots, "label", {
23069
+ label: _ctx.getLabel(selected),
23070
+ value: _ctx.getValue(selected)
23071
+ }, () => [
23072
+ vue.createTextVNode(vue.toDisplayString(_ctx.getLabel(selected)), 1)
23073
+ ])
23074
+ ], 2)
23075
+ ]),
23076
+ _: 2
23077
+ }, 1032, ["closable", "size", "type", "effect", "onClose"])
23078
+ ], 2);
23079
+ }), 128))
23080
+ ], 2)
23081
+ ]),
23082
+ _: 3
23083
+ }, 8, ["disabled", "effect", "teleported"])) : vue.createCommentVNode("v-if", true)
23084
+ ]) : vue.createCommentVNode("v-if", true),
23085
+ vue.createElementVNode("div", {
23086
+ class: vue.normalizeClass([
23087
+ _ctx.nsSelect.e("selected-item"),
23088
+ _ctx.nsSelect.e("input-wrapper"),
23089
+ _ctx.nsSelect.is("hidden", !_ctx.filterable)
23090
+ ])
23091
+ }, [
23092
+ vue.withDirectives(vue.createElementVNode("input", {
23093
+ id: _ctx.inputId,
23094
+ ref: "inputRef",
23095
+ "onUpdate:modelValue": ($event) => _ctx.states.inputValue = $event,
23096
+ style: vue.normalizeStyle(_ctx.inputStyle),
23097
+ autocomplete: _ctx.autocomplete,
23098
+ tabindex: _ctx.tabindex,
23099
+ "aria-autocomplete": "list",
23100
+ "aria-haspopup": "listbox",
23101
+ autocapitalize: "off",
23102
+ "aria-expanded": _ctx.expanded,
23103
+ "aria-label": _ctx.ariaLabel,
23104
+ class: vue.normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
23105
+ disabled: _ctx.selectDisabled,
23106
+ role: "combobox",
23107
+ readonly: !_ctx.filterable,
23108
+ spellcheck: "false",
23109
+ type: "text",
23110
+ name: _ctx.name,
23111
+ onInput: _ctx.onInput,
23112
+ onCompositionstart: _ctx.handleCompositionStart,
23113
+ onCompositionupdate: _ctx.handleCompositionUpdate,
23114
+ onCompositionend: _ctx.handleCompositionEnd,
23115
+ onKeydown: [
23116
+ vue.withKeys(vue.withModifiers(($event) => _ctx.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"]),
23117
+ vue.withKeys(vue.withModifiers(($event) => _ctx.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"]),
23118
+ vue.withKeys(vue.withModifiers(_ctx.onKeyboardSelect, ["stop", "prevent"]), ["enter"]),
23119
+ vue.withKeys(vue.withModifiers(_ctx.handleEsc, ["stop", "prevent"]), ["esc"]),
23120
+ vue.withKeys(vue.withModifiers(_ctx.handleDel, ["stop"]), ["delete"])
23121
+ ],
23122
+ onClick: vue.withModifiers(_ctx.toggleMenu, ["stop"])
23123
+ }, null, 46, ["id", "onUpdate:modelValue", "autocomplete", "tabindex", "aria-expanded", "aria-label", "disabled", "readonly", "name", "onInput", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onKeydown", "onClick"]), [
23124
+ [vue.vModelText, _ctx.states.inputValue]
23125
+ ]),
23126
+ _ctx.filterable ? (vue.openBlock(), vue.createElementBlock("span", {
23127
+ key: 0,
23128
+ ref: "calculatorRef",
23129
+ "aria-hidden": "true",
23130
+ class: vue.normalizeClass(_ctx.nsSelect.e("input-calculator")),
23131
+ textContent: vue.toDisplayString(_ctx.states.inputValue)
23132
+ }, null, 10, ["textContent"])) : vue.createCommentVNode("v-if", true)
23133
+ ], 2),
23134
+ _ctx.shouldShowPlaceholder ? (vue.openBlock(), vue.createElementBlock("div", {
23135
+ key: 1,
23136
+ class: vue.normalizeClass([
23137
+ _ctx.nsSelect.e("selected-item"),
23138
+ _ctx.nsSelect.e("placeholder"),
23139
+ _ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
23140
+ ])
23141
+ }, [
23142
+ _ctx.hasModelValue ? vue.renderSlot(_ctx.$slots, "label", {
23143
+ key: 0,
23144
+ label: _ctx.currentPlaceholder,
23145
+ value: _ctx.modelValue
23146
+ }, () => [
23147
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.currentPlaceholder), 1)
23148
+ ]) : (vue.openBlock(), vue.createElementBlock("span", { key: 1 }, vue.toDisplayString(_ctx.currentPlaceholder), 1))
23149
+ ], 2)) : vue.createCommentVNode("v-if", true)
23150
+ ], 2),
23151
+ vue.createElementVNode("div", {
23152
+ ref: "suffixRef",
23153
+ class: vue.normalizeClass(_ctx.nsSelect.e("suffix"))
23154
+ }, [
23155
+ _ctx.iconComponent ? vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_icon, {
23156
+ key: 0,
23157
+ class: vue.normalizeClass([_ctx.nsSelect.e("caret"), _ctx.nsInput.e("icon"), _ctx.iconReverse])
23158
+ }, {
23159
+ default: vue.withCtx(() => [
23160
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.iconComponent)))
23161
+ ]),
23162
+ _: 1
23163
+ }, 8, ["class"])), [
23164
+ [vue.vShow, !_ctx.showClearBtn]
23165
+ ]) : vue.createCommentVNode("v-if", true),
23166
+ _ctx.showClearBtn && _ctx.clearIcon ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
23167
+ key: 1,
23168
+ class: vue.normalizeClass([
23169
+ _ctx.nsSelect.e("caret"),
23170
+ _ctx.nsInput.e("icon"),
23171
+ _ctx.nsSelect.e("clear")
23172
+ ]),
23173
+ onClick: vue.withModifiers(_ctx.handleClear, ["prevent", "stop"])
23174
+ }, {
23175
+ default: vue.withCtx(() => [
23176
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.clearIcon)))
23177
+ ]),
23178
+ _: 1
23179
+ }, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true),
23180
+ _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
23181
+ key: 2,
23182
+ class: vue.normalizeClass([
23183
+ _ctx.nsInput.e("icon"),
23184
+ _ctx.nsInput.e("validateIcon"),
23185
+ _ctx.nsInput.is("loading", _ctx.validateState === "validating")
23186
+ ])
23187
+ }, {
23188
+ default: vue.withCtx(() => [
23189
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.validateIcon)))
23190
+ ]),
23191
+ _: 1
23192
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
23193
+ ], 2)
23194
+ ], 10, ["onClick"])
23195
+ ]),
23196
+ content: vue.withCtx(() => [
23197
+ vue.createVNode(_component_el_select_menu, {
23198
+ ref: "menuRef",
23199
+ data: _ctx.filteredOptions,
23200
+ width: _ctx.popperSize,
23201
+ "hovering-index": _ctx.states.hoveringIndex,
23202
+ "scrollbar-always-on": _ctx.scrollbarAlwaysOn
23203
+ }, vue.createSlots({
23204
+ default: vue.withCtx((scope) => [
23205
+ vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(scope)))
23206
+ ]),
23207
+ _: 2
23208
+ }, [
23209
+ _ctx.$slots.header ? {
23210
+ name: "header",
23211
+ fn: vue.withCtx(() => [
23212
+ vue.createElementVNode("div", {
23213
+ class: vue.normalizeClass(_ctx.nsSelect.be("dropdown", "header"))
23214
+ }, [
23215
+ vue.renderSlot(_ctx.$slots, "header")
23216
+ ], 2)
23217
+ ])
23218
+ } : void 0,
23219
+ _ctx.$slots.loading && _ctx.loading ? {
23220
+ name: "loading",
23221
+ fn: vue.withCtx(() => [
23222
+ vue.createElementVNode("div", {
23223
+ class: vue.normalizeClass(_ctx.nsSelect.be("dropdown", "loading"))
23224
+ }, [
23225
+ vue.renderSlot(_ctx.$slots, "loading")
23226
+ ], 2)
23227
+ ])
23228
+ } : _ctx.loading || _ctx.filteredOptions.length === 0 ? {
23229
+ name: "empty",
23230
+ fn: vue.withCtx(() => [
23231
+ vue.createElementVNode("div", {
23232
+ class: vue.normalizeClass(_ctx.nsSelect.be("dropdown", "empty"))
23233
+ }, [
23234
+ vue.renderSlot(_ctx.$slots, "empty", {}, () => [
23235
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.emptyText), 1)
23236
+ ])
23237
+ ], 2)
23238
+ ])
23239
+ } : void 0,
23240
+ _ctx.$slots.footer ? {
23241
+ name: "footer",
23242
+ fn: vue.withCtx(() => [
23243
+ vue.createElementVNode("div", {
23244
+ class: vue.normalizeClass(_ctx.nsSelect.be("dropdown", "footer"))
23245
+ }, [
23246
+ vue.renderSlot(_ctx.$slots, "footer")
23247
+ ], 2)
23248
+ ])
23249
+ } : void 0
23250
+ ]), 1032, ["data", "width", "hovering-index", "scrollbar-always-on"])
23251
+ ]),
23252
+ _: 3
23253
+ }, 8, ["visible", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "placement", "transition", "persistent", "append-to", "show-arrow", "offset", "onBeforeShow", "onHide"])
23254
+ ], 42, ["onMouseenter", "onMouseleave"])), [
23255
+ [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
23256
+ ]);
23257
+ }
23258
+ var Select = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render], ["__file", "select.vue"]]);
23259
+
23260
+ const ElSelectV2 = withInstall(Select);
23261
+
23262
+ const _hoisted_1$b = ["onClick"];
23263
+ const _hoisted_2$9 = { class: "hzzt-dropdown-name" };
23264
+ const _hoisted_3$6 = /* @__PURE__ */ vue.createElementVNode("span", { class: "caret" }, null, -1);
23265
+ const _hoisted_4$5 = { class: "hzzt-dropdown-menu" };
23266
+ const _hoisted_5$3 = ["onClick"];
23267
+ const _hoisted_6$3 = { class: "submenu" };
23268
+ const _hoisted_7$3 = ["onClick"];
23269
+ const __default__$c = vue.defineComponent({
23270
+ name: "HzztDropDown"
23271
+ });
23272
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
23273
+ ...__default__$c,
23274
+ props: {
23275
+ options: {
23276
+ type: definePropType$1(Array),
23277
+ default: () => []
23278
+ },
23279
+ label: String,
23280
+ value: String,
23281
+ defaultValue: {
23282
+ type: Array,
23283
+ default: () => []
23284
+ },
23285
+ position: {
23286
+ type: String,
23287
+ default: "right"
23288
+ },
23289
+ props: {
23290
+ type: Object,
23291
+ default: () => ({
23292
+ children: "children",
23293
+ label: "label",
23294
+ value: "value"
23295
+ })
23296
+ },
23297
+ returnType: {
23298
+ type: String,
23299
+ default: "Array"
23300
+ }
23301
+ },
23302
+ emits: ["change"],
23303
+ setup(__props, { emit: emits }) {
23304
+ const dProps = __props;
23305
+ const toggle = vue.ref(false);
23306
+ function dropToggle() {
23307
+ toggle.value = !toggle.value;
23308
+ }
23309
+ function close() {
23310
+ toggle.value = false;
23311
+ }
23312
+ function selectValue(val) {
23313
+ if (dProps.returnType === "Array") {
23314
+ emits("change", val);
23315
+ }
23316
+ if (dProps.returnType === "String") {
23317
+ emits("change", val[val.length - 1]);
23318
+ }
23319
+ }
23320
+ return (_ctx, _cache) => {
23321
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("ul", {
23322
+ class: "hzzt-dropdown",
23323
+ onClick: vue.withModifiers(dropToggle, ["stop"])
23324
+ }, [
23325
+ vue.createElementVNode("li", {
23326
+ class: vue.normalizeClass({ "hzzt-dropdown-li": true, "hzzt-dropdown-li-show": toggle.value })
23327
+ }, [
23328
+ vue.createElementVNode("span", _hoisted_2$9, vue.toDisplayString(__props.label), 1),
23329
+ _hoisted_3$6,
23330
+ vue.createElementVNode("ul", _hoisted_4$5, [
23331
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.options, (option, index) => {
23332
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
23333
+ vue.unref(isEmpty)(option[__props.props.children]) ? (vue.openBlock(), vue.createElementBlock("li", {
23334
+ key: index,
23335
+ class: vue.normalizeClass({
23336
+ "hzzt-dropdown-menu-item": true,
23337
+ selected: __props.defaultValue.includes(option[__props.props.value])
23338
+ })
23339
+ }, [
23340
+ vue.createElementVNode("a", {
23341
+ class: "hzzt-dropdown-menu-item-label",
23342
+ onClick: ($event) => selectValue([option[__props.props.value]])
23343
+ }, vue.toDisplayString(option[__props.props.label]), 9, _hoisted_5$3)
23344
+ ], 2)) : (vue.openBlock(), vue.createElementBlock("li", {
20621
23345
  key: index + "submenu",
20622
23346
  class: "hzzt-dropdown-menu-item hzzt-dropdown-submenu"
20623
23347
  }, [
@@ -20649,19 +23373,19 @@
20649
23373
  }), 256))
20650
23374
  ])
20651
23375
  ], 2)
20652
- ], 8, _hoisted_1$a)), [
23376
+ ], 8, _hoisted_1$b)), [
20653
23377
  [vue.unref(ClickOutside), close]
20654
23378
  ]);
20655
23379
  };
20656
23380
  }
20657
23381
  });
20658
- var Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "index.vue"]]);
23382
+ var Dropdown = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__file", "index.vue"]]);
20659
23383
 
20660
23384
  const HzztDropdown = withInstall$1(Dropdown);
20661
23385
 
20662
- const _hoisted_1$9 = { class: "hzzt-collapse" };
23386
+ const _hoisted_1$a = { class: "hzzt-collapse" };
20663
23387
  const _hoisted_2$8 = { class: "flex align-items-center" };
20664
- const _hoisted_3$6 = { class: "hzzt-collapse-title-wrapper" };
23388
+ const _hoisted_3$5 = { class: "hzzt-collapse-title-wrapper" };
20665
23389
  const _hoisted_4$4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
20666
23390
  const _hoisted_5$2 = { class: "hzzt-collapse-title" };
20667
23391
  const _hoisted_6$2 = /* @__PURE__ */ vue.createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
@@ -20669,11 +23393,11 @@
20669
23393
  key: 0,
20670
23394
  class: "hzzt-collapse-text"
20671
23395
  };
20672
- const __default__$a = vue.defineComponent({
23396
+ const __default__$b = vue.defineComponent({
20673
23397
  name: "HzztCollapse"
20674
23398
  });
20675
- const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
20676
- ...__default__$a,
23399
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
23400
+ ...__default__$b,
20677
23401
  props: {
20678
23402
  defaultActive: {
20679
23403
  type: Boolean,
@@ -20699,13 +23423,13 @@
20699
23423
  active.value = !active.value;
20700
23424
  }
20701
23425
  return (_ctx, _cache) => {
20702
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
23426
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
20703
23427
  vue.createElementVNode("div", {
20704
23428
  class: "hzzt-collapse-header",
20705
23429
  onClick: toggle
20706
23430
  }, [
20707
23431
  vue.createElementVNode("div", _hoisted_2$8, [
20708
- vue.createElementVNode("div", _hoisted_3$6, [
23432
+ vue.createElementVNode("div", _hoisted_3$5, [
20709
23433
  _hoisted_4$4,
20710
23434
  vue.createElementVNode("div", _hoisted_5$2, vue.toDisplayString(__props.title), 1)
20711
23435
  ]),
@@ -20719,11 +23443,11 @@
20719
23443
  };
20720
23444
  }
20721
23445
  });
20722
- var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "collapse.vue"]]);
23446
+ var Collapse = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__file", "collapse.vue"]]);
20723
23447
 
20724
23448
  const HzztCollapse = withInstall$1(Collapse);
20725
23449
 
20726
- const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
23450
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
20727
23451
  __name: "index",
20728
23452
  props: {
20729
23453
  name: {
@@ -20749,11 +23473,11 @@
20749
23473
  };
20750
23474
  }
20751
23475
  });
20752
- var HzztIcon$1 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "index.vue"]]);
23476
+ var HzztIcon$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["__file", "index.vue"]]);
20753
23477
 
20754
- const _hoisted_1$8 = { class: "hzzt-tab flex align-items-center justify-content-between wrap" };
23478
+ const _hoisted_1$9 = { class: "hzzt-tab flex align-items-center justify-content-between wrap" };
20755
23479
  const _hoisted_2$7 = { class: "flex align-items-center" };
20756
- const _hoisted_3$5 = { class: "flex" };
23480
+ const _hoisted_3$4 = { class: "flex" };
20757
23481
  const _hoisted_4$3 = ["onClick"];
20758
23482
  const _hoisted_5$1 = { class: "hzzt-tab-badge" };
20759
23483
  const _hoisted_6$1 = {
@@ -20761,11 +23485,11 @@
20761
23485
  class: "hzzt-tab-badge-count"
20762
23486
  };
20763
23487
  const _hoisted_7$1 = { class: "flex wrap" };
20764
- const __default__$9 = vue.defineComponent({
23488
+ const __default__$a = vue.defineComponent({
20765
23489
  name: "HzztTab"
20766
23490
  });
20767
- const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
20768
- ...__default__$9,
23491
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
23492
+ ...__default__$a,
20769
23493
  props: {
20770
23494
  tabList: {
20771
23495
  type: Array,
@@ -20802,9 +23526,9 @@
20802
23526
  emit("tab-close", index);
20803
23527
  }
20804
23528
  return (_ctx, _cache) => {
20805
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
23529
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
20806
23530
  vue.createElementVNode("div", _hoisted_2$7, [
20807
- vue.createElementVNode("div", _hoisted_3$5, [
23531
+ vue.createElementVNode("div", _hoisted_3$4, [
20808
23532
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(customTabList), (tab, index) => {
20809
23533
  return vue.openBlock(), vue.createElementBlock("div", {
20810
23534
  key: tab.key,
@@ -20836,7 +23560,7 @@
20836
23560
  };
20837
23561
  }
20838
23562
  });
20839
- var Tab = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "index.vue"]]);
23563
+ var Tab = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__file", "index.vue"]]);
20840
23564
 
20841
23565
  const HzztTab = withInstall$1(Tab);
20842
23566
 
@@ -20852,15 +23576,15 @@
20852
23576
  return `hzzt-el${name.replace(/[A-Z]/g, (match) => `-${match.toLocaleLowerCase()}`)}`;
20853
23577
  }
20854
23578
 
20855
- const _hoisted_1$7 = { class: "flex justify-content-between hzzt-pagination" };
23579
+ const _hoisted_1$8 = { class: "flex justify-content-between hzzt-pagination" };
20856
23580
  const _hoisted_2$6 = { class: "flex align-items-center font-12 hzzt-pagination-total" };
20857
- const _hoisted_3$4 = { class: "flex align-items-center hzzt-pagination-page font-14" };
23581
+ const _hoisted_3$3 = { class: "flex align-items-center hzzt-pagination-page font-14" };
20858
23582
  const _hoisted_4$2 = { class: "flex" };
20859
- const __default__$8 = vue.defineComponent({
23583
+ const __default__$9 = vue.defineComponent({
20860
23584
  name: "HzztPagination"
20861
23585
  });
20862
- const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
20863
- ...__default__$8,
23586
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
23587
+ ...__default__$9,
20864
23588
  props: {
20865
23589
  pagination: {
20866
23590
  type: Object,
@@ -20890,9 +23614,9 @@
20890
23614
  }
20891
23615
  }
20892
23616
  return (_ctx, _cache) => {
20893
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
23617
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
20894
23618
  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),
20895
- vue.createElementVNode("div", _hoisted_3$4, [
23619
+ vue.createElementVNode("div", _hoisted_3$3, [
20896
23620
  vue.renderSlot(_ctx.$slots, "right"),
20897
23621
  vue.createVNode(HzztIcon$1, {
20898
23622
  class: vue.normalizeClass(["hzzt-pagination-arrow", { active: __props.pagination.current_page > 1 }]),
@@ -20910,18 +23634,18 @@
20910
23634
  };
20911
23635
  }
20912
23636
  });
20913
- var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "index.vue"]]);
23637
+ var Pagination = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__file", "index.vue"]]);
20914
23638
 
20915
23639
  const HzztPagination = withInstall$1(Pagination);
20916
23640
 
20917
- const _hoisted_1$6 = { class: "flex align-content-center" };
23641
+ const _hoisted_1$7 = { class: "flex align-content-center" };
20918
23642
  const _hoisted_2$5 = { style: { "max-width": "300px" } };
20919
- const _hoisted_3$3 = { style: { "padding": "0", "margin": "0", "word-break": "break-all", "white-space": "pre-wrap" } };
20920
- const __default__$7 = vue.defineComponent({
23643
+ const _hoisted_3$2 = { style: { "padding": "0", "margin": "0", "word-break": "break-all", "white-space": "pre-wrap" } };
23644
+ const __default__$8 = vue.defineComponent({
20921
23645
  name: "HzztTooltip"
20922
23646
  });
20923
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
20924
- ...__default__$7,
23647
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
23648
+ ...__default__$8,
20925
23649
  props: {
20926
23650
  content: {
20927
23651
  type: String,
@@ -20932,12 +23656,12 @@
20932
23656
  setup(__props, { emit }) {
20933
23657
  const attrs = vue.useAttrs();
20934
23658
  return (_ctx, _cache) => {
20935
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
23659
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
20936
23660
  vue.createVNode(vue.unref(ElTooltip), vue.mergeProps({ effect: "dark" }, vue.unref(attrs)), {
20937
23661
  content: vue.withCtx(() => [
20938
23662
  vue.renderSlot(_ctx.$slots, "content", {}, () => [
20939
23663
  vue.createElementVNode("div", _hoisted_2$5, [
20940
- vue.createElementVNode("pre", _hoisted_3$3, vue.toDisplayString(__props.content), 1)
23664
+ vue.createElementVNode("pre", _hoisted_3$2, vue.toDisplayString(__props.content), 1)
20941
23665
  ])
20942
23666
  ])
20943
23667
  ]),
@@ -20955,11 +23679,11 @@
20955
23679
  };
20956
23680
  }
20957
23681
  });
20958
- var Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "tooltip.vue"]]);
23682
+ var Tooltip = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["__file", "tooltip.vue"]]);
20959
23683
 
20960
23684
  const HzztTooltip = withInstall$1(Tooltip);
20961
23685
 
20962
- const _hoisted_1$5 = {
23686
+ const _hoisted_1$6 = {
20963
23687
  key: 0,
20964
23688
  style: { "white-space": "nowrap" }
20965
23689
  };
@@ -20967,16 +23691,16 @@
20967
23691
  key: 1,
20968
23692
  style: { "white-space": "nowrap" }
20969
23693
  };
20970
- const _hoisted_3$2 = { class: "line-height-1" };
23694
+ const _hoisted_3$1 = { class: "line-height-1" };
20971
23695
  const _hoisted_4$1 = {
20972
23696
  key: 0,
20973
23697
  class: "margin-l-1 margin-r-2"
20974
23698
  };
20975
- const __default__$6 = vue.defineComponent({
23699
+ const __default__$7 = vue.defineComponent({
20976
23700
  name: "HzztPageSize"
20977
23701
  });
20978
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
20979
- ...__default__$6,
23702
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
23703
+ ...__default__$7,
20980
23704
  props: {
20981
23705
  modelValue: {
20982
23706
  type: Number,
@@ -21033,13 +23757,13 @@
21033
23757
  return vue.openBlock(), vue.createElementBlock("main", {
21034
23758
  class: vue.normalizeClass([vue.unref(compKls), "flex wrap align-items-center justify-content-end"])
21035
23759
  }, [
21036
- __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),
23760
+ __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),
21037
23761
  __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),
21038
23762
  __props.pageSizeOptions.length ? (vue.openBlock(), vue.createElementBlock("div", {
21039
23763
  key: 2,
21040
23764
  class: vue.normalizeClass([vue.unref(ns).e("option"), "flex align-items-center"])
21041
23765
  }, [
21042
- vue.createElementVNode("span", _hoisted_3$2, vue.toDisplayString(vue.unref(t)("hzzt.pageSize.per_page")), 1),
23766
+ vue.createElementVNode("span", _hoisted_3$1, vue.toDisplayString(vue.unref(t)("hzzt.pageSize.per_page")), 1),
21043
23767
  vue.createVNode(vue.unref(ElSelect), {
21044
23768
  modelValue: sizeValue.value,
21045
23769
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sizeValue.value = $event),
@@ -21103,15 +23827,15 @@
21103
23827
  };
21104
23828
  }
21105
23829
  });
21106
- var PageSize = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "index.vue"]]);
23830
+ var PageSize = /* @__PURE__ */ _export_sfc$1(_sfc_main$7, [["__file", "index.vue"]]);
21107
23831
 
21108
23832
  const HzztPageSize = withInstall$1(PageSize);
21109
23833
 
21110
- const __default__$5 = vue.defineComponent({
23834
+ const __default__$6 = vue.defineComponent({
21111
23835
  name: "HzztConfirmPassword"
21112
23836
  });
21113
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
21114
- ...__default__$5,
23837
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
23838
+ ...__default__$6,
21115
23839
  props: {
21116
23840
  placeholder: {
21117
23841
  type: String,
@@ -21171,16 +23895,16 @@
21171
23895
  };
21172
23896
  }
21173
23897
  });
21174
- var ConfirmPassword = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "confirm-password.vue"]]);
23898
+ var ConfirmPassword = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__file", "confirm-password.vue"]]);
21175
23899
 
21176
23900
  const HzztConfirmPassword = withInstall$1(ConfirmPassword);
21177
23901
 
21178
- const _hoisted_1$4 = ["onClick"];
21179
- const __default__$4 = vue.defineComponent({
23902
+ const _hoisted_1$5 = ["onClick"];
23903
+ const __default__$5 = vue.defineComponent({
21180
23904
  name: "HzztCheckButton"
21181
23905
  });
21182
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
21183
- ...__default__$4,
23906
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
23907
+ ...__default__$5,
21184
23908
  props: {
21185
23909
  options: {
21186
23910
  type: Array,
@@ -21241,7 +23965,7 @@
21241
23965
  ...vue.unref(spanKls)
21242
23966
  ], "flex-1"]),
21243
23967
  onClick: ($event) => selectValue(item.value)
21244
- }, vue.toDisplayString(item.label), 11, _hoisted_1$4)
23968
+ }, vue.toDisplayString(item.label), 11, _hoisted_1$5)
21245
23969
  ]),
21246
23970
  _: 2
21247
23971
  }, 1032, ["hidden", "value"]);
@@ -21250,7 +23974,7 @@
21250
23974
  };
21251
23975
  }
21252
23976
  });
21253
- var CheckButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "index.vue"]]);
23977
+ var CheckButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["__file", "index.vue"]]);
21254
23978
 
21255
23979
  const HzztCheckButton = withInstall$1(CheckButton);
21256
23980
 
@@ -21491,9 +24215,9 @@
21491
24215
  return Array.from({ length: n }).map((_, n2) => n2);
21492
24216
  }
21493
24217
 
21494
- const _hoisted_1$3 = { class: "el-date-picker" };
24218
+ const _hoisted_1$4 = { class: "el-date-picker" };
21495
24219
  const _hoisted_2$3 = { class: "el-picker-panel__body" };
21496
- const _hoisted_3$1 = {
24220
+ const _hoisted_3 = {
21497
24221
  class: "el-date-picker__header el-date-picker__header--bordered",
21498
24222
  style: { "margin": "0px", "line-height": "30px" }
21499
24223
  };
@@ -21508,11 +24232,11 @@
21508
24232
  const _hoisted_9 = { class: "cell" };
21509
24233
  const _hoisted_10 = { class: "cell" };
21510
24234
  const _hoisted_11 = { class: "cell" };
21511
- const __default__$3 = vue.defineComponent({
24235
+ const __default__$4 = vue.defineComponent({
21512
24236
  name: "HzztQuarterPicker"
21513
24237
  });
21514
- const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
21515
- ...__default__$3,
24238
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
24239
+ ...__default__$4,
21516
24240
  props: {
21517
24241
  size: useSizeProp$1,
21518
24242
  format: {
@@ -21690,9 +24414,9 @@
21690
24414
  }, 16, ["disabled", "size", "placeholder", "value"])
21691
24415
  ]),
21692
24416
  default: vue.withCtx(() => [
21693
- vue.createElementVNode("div", _hoisted_1$3, [
24417
+ vue.createElementVNode("div", _hoisted_1$4, [
21694
24418
  vue.createElementVNode("div", _hoisted_2$3, [
21695
- vue.createElementVNode("div", _hoisted_3$1, [
24419
+ vue.createElementVNode("div", _hoisted_3, [
21696
24420
  vue.createElementVNode("button", {
21697
24421
  type: "button",
21698
24422
  "aria-label": vue.unref(t)(`hzzt.quarterpicker.prevYear`),
@@ -21752,7 +24476,7 @@
21752
24476
  };
21753
24477
  }
21754
24478
  });
21755
- var QuarterPicker = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "index.vue"]]);
24479
+ var QuarterPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__file", "index.vue"]]);
21756
24480
 
21757
24481
  const HzztQuarterPicker = withInstall$1(QuarterPicker);
21758
24482
 
@@ -21776,7 +24500,7 @@
21776
24500
  [INPUT_EVENT$1]: (value) => isString$1(value)
21777
24501
  };
21778
24502
 
21779
- const _hoisted_1$2 = /* @__PURE__ */ vue.createElementVNode("div", { style: { "width": "0", "height": "0", "overflow": "hidden" } }, [
24503
+ const _hoisted_1$3 = /* @__PURE__ */ vue.createElementVNode("div", { style: { "width": "0", "height": "0", "overflow": "hidden" } }, [
21780
24504
  /* @__PURE__ */ vue.createElementVNode("input", {
21781
24505
  readonly: "",
21782
24506
  style: { "width": "0", "height": "0", "overflow": "hidden" }
@@ -21792,12 +24516,12 @@
21792
24516
  class: "width-100%",
21793
24517
  style: { "overflow": "hidden" }
21794
24518
  };
21795
- const __default__$2 = vue.defineComponent({
24519
+ const __default__$3 = vue.defineComponent({
21796
24520
  inheritAttrs: false,
21797
24521
  name: "HzztScan"
21798
24522
  });
21799
- const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
21800
- ...__default__$2,
24523
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
24524
+ ...__default__$3,
21801
24525
  props: scanProps,
21802
24526
  emits: scanEmits,
21803
24527
  setup(__props, { expose, emit }) {
@@ -21876,7 +24600,7 @@
21876
24600
  class: vue.normalizeClass(["hzzt-scan", _ctx.$attrs.class]),
21877
24601
  style: vue.normalizeStyle([{ "position": "relative" }, _ctx.$attrs.style])
21878
24602
  }, [
21879
- _hoisted_1$2,
24603
+ _hoisted_1$3,
21880
24604
  vue.createVNode(vue.unref(ElInput), vue.mergeProps({
21881
24605
  ref_key: "inputRef",
21882
24606
  ref: inputRef,
@@ -21916,7 +24640,7 @@
21916
24640
  };
21917
24641
  }
21918
24642
  });
21919
- var Scan = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "scan.vue"]]);
24643
+ var Scan = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__file", "scan.vue"]]);
21920
24644
 
21921
24645
  const HzztScan = withInstall$1(Scan);
21922
24646
 
@@ -21960,13 +24684,13 @@
21960
24684
  change: (value) => isString$1(value)
21961
24685
  };
21962
24686
 
21963
- const _hoisted_1$1 = { slot: "append" };
24687
+ const _hoisted_1$2 = { slot: "append" };
21964
24688
  const _hoisted_2$1 = { key: 0 };
21965
- const __default__$1 = vue.defineComponent({
24689
+ const __default__$2 = vue.defineComponent({
21966
24690
  name: "HzztSelectInput"
21967
24691
  });
21968
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
21969
- ...__default__$1,
24692
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
24693
+ ...__default__$2,
21970
24694
  props: selectInputProps,
21971
24695
  emits: selectInputEmits,
21972
24696
  setup(__props, { emit }) {
@@ -22037,7 +24761,7 @@
22037
24761
  class: vue.normalizeClass(vue.unref(inputContainerCls))
22038
24762
  }, [
22039
24763
  vue.renderSlot(_ctx.$slots, "title", {}, () => [
22040
- vue.createVNode(Title, { label: _ctx.label }, null, 8, ["label"])
24764
+ vue.createVNode(HzztTitle$1, { label: _ctx.label }, null, 8, ["label"])
22041
24765
  ]),
22042
24766
  vue.createVNode(vue.unref(ElInput), vue.mergeProps({
22043
24767
  ref: "inputRef",
@@ -22049,7 +24773,7 @@
22049
24773
  onChange: change
22050
24774
  }), {
22051
24775
  default: vue.withCtx(() => [
22052
- vue.createElementVNode("template", _hoisted_1$1, [
24776
+ vue.createElementVNode("template", _hoisted_1$2, [
22053
24777
  vue.renderSlot(_ctx.$slots, "append")
22054
24778
  ])
22055
24779
  ]),
@@ -22075,56 +24799,223 @@
22075
24799
  };
22076
24800
  }
22077
24801
  });
22078
- var SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "select-input.vue"]]);
24802
+ var SelectInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["__file", "select-input.vue"]]);
22079
24803
 
22080
24804
  const HzztSelectInput = withInstall$1(SelectInput);
22081
24805
 
22082
- const _hoisted_1 = {
22083
- key: 0,
22084
- class: "hzzt-title flex align-items-center"
22085
- };
22086
- const _hoisted_2 = {
22087
- key: 0,
22088
- class: "decorative-line"
24806
+ const selectTextareaProps = buildProps$1({
24807
+ size: useSizeProp$1,
24808
+ disabled: Boolean,
24809
+ label: String,
24810
+ data: {
24811
+ type: definePropType$1(Array),
24812
+ default: () => []
24813
+ },
24814
+ inputProps: Object,
24815
+ replace: Boolean,
24816
+ modelValue: {
24817
+ type: definePropType$1([
24818
+ String,
24819
+ Number
24820
+ ]),
24821
+ default: ""
24822
+ }
24823
+ });
24824
+ const selectTextareaEmits = {
24825
+ [UPDATE_MODEL_EVENT$1]: (val) => isString$1(val) || isNumber$1(val) || isBoolean$1(val),
24826
+ [CHANGE_EVENT$1]: (val) => isString$1(val) || isNumber$1(val) || isBoolean$1(val),
24827
+ [INPUT_EVENT$1]: (val) => isString$1(val) || isNumber$1(val) || isBoolean$1(val),
24828
+ select: (val) => isString$1(val) || isNumber$1(val) || isBoolean$1(val)
22089
24829
  };
22090
- const _hoisted_3 = { class: "label-name" };
22091
- const __default__ = vue.defineComponent({
22092
- name: "HzztTitle"
24830
+
24831
+ const _hoisted_1$1 = { class: "flex column" };
24832
+ const _hoisted_2 = { class: "flex align-items-center" };
24833
+ const __default__$1 = vue.defineComponent({
24834
+ name: "HzztSelectTextarea"
22093
24835
  });
22094
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22095
- ...__default__,
22096
- props: titleProps,
22097
- setup(__props) {
24836
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
24837
+ ...__default__$1,
24838
+ props: selectTextareaProps,
24839
+ emits: selectTextareaEmits,
24840
+ setup(__props, { emit }) {
22098
24841
  const props = __props;
22099
- const slots = vue.useSlots();
22100
- const showLabel = vue.computed(() => {
22101
- var _a, _b, _c;
22102
- 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);
24842
+ const inputVal = vue.ref(props.modelValue);
24843
+ const selectValue = vue.ref("");
24844
+ const inputRef = vue.ref();
24845
+ const nsInput = useNamespace$1("select-textarea");
24846
+ const formSize = useFormSize();
24847
+ const formDisabled = useFormDisabled();
24848
+ const trueSize = vue.computed(() => props.size || formSize.value || useGlobalSize$1().value);
24849
+ const trueDisabled = vue.computed(() => props.disabled || formDisabled.value);
24850
+ const containerCls = vue.computed(() => [
24851
+ nsInput.b(),
24852
+ nsInput.m(trueSize.value)
24853
+ ]);
24854
+ const _inputProps = vue.computed(() => ({
24855
+ disabled: trueDisabled.value,
24856
+ clearable: true,
24857
+ ...props.inputProps,
24858
+ type: "textarea"
24859
+ }));
24860
+ vue.watch(() => props.modelValue, (v) => {
24861
+ inputVal.value = v;
22103
24862
  });
24863
+ function input(val) {
24864
+ emit("update:modelValue", val);
24865
+ emit("input", val);
24866
+ }
24867
+ function change(val) {
24868
+ emit("change", val);
24869
+ }
24870
+ function selectChange(val) {
24871
+ if (!inputVal.value && inputVal.value !== 0)
24872
+ inputVal.value = "";
24873
+ let content = val;
24874
+ if (!props.replace) {
24875
+ const inputEl = inputRef.value.$el.getElementsByTagName("textarea")[0];
24876
+ content = insertCursorPosition(inputEl, val);
24877
+ }
24878
+ input(content);
24879
+ change(content);
24880
+ emit("select", val);
24881
+ }
22104
24882
  return (_ctx, _cache) => {
22105
- return vue.unref(showLabel) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
22106
- _ctx.sideline ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2)) : vue.createCommentVNode("v-if", true),
22107
- vue.renderSlot(_ctx.$slots, "before"),
22108
- vue.createElementVNode("label", _hoisted_3, [
22109
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
22110
- vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
22111
- ])
24883
+ return vue.openBlock(), vue.createElementBlock("div", {
24884
+ class: vue.normalizeClass(vue.unref(containerCls))
24885
+ }, [
24886
+ vue.createElementVNode("div", _hoisted_1$1, [
24887
+ vue.createElementVNode("div", _hoisted_2, [
24888
+ vue.renderSlot(_ctx.$slots, "title", {}, () => [
24889
+ vue.createVNode(HzztTitle$1, {
24890
+ class: "margin-l-1",
24891
+ label: _ctx.label
24892
+ }, null, 8, ["label"])
24893
+ ]),
24894
+ !vue.unref(trueDisabled) ? (vue.openBlock(), vue.createBlock(vue.unref(ElSelectV2), {
24895
+ key: 0,
24896
+ class: "flex-1",
24897
+ modelValue: selectValue.value,
24898
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
24899
+ "allow-create": "",
24900
+ filterable: "",
24901
+ clearable: "",
24902
+ onChange: selectChange,
24903
+ options: _ctx.data
24904
+ }, null, 8, ["modelValue", "options"])) : vue.createCommentVNode("v-if", true),
24905
+ vue.renderSlot(_ctx.$slots, "right")
24906
+ ]),
24907
+ vue.createVNode(vue.unref(ElInput), vue.mergeProps({
24908
+ ref_key: "inputRef",
24909
+ ref: inputRef,
24910
+ class: "flex-1 margin-t-1",
24911
+ modelValue: inputVal.value,
24912
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputVal.value = $event)
24913
+ }, vue.unref(_inputProps), {
24914
+ onInput: input,
24915
+ onChange: change
24916
+ }), null, 16, ["modelValue"])
22112
24917
  ])
22113
- ])) : vue.createCommentVNode("v-if", true);
24918
+ ], 2);
22114
24919
  };
22115
24920
  }
22116
24921
  });
22117
- var Title = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "title.vue"]]);
24922
+ var SelectTextarea = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__file", "select-textarea.vue"]]);
22118
24923
 
22119
- const titleProps = buildProps$1({
22120
- label: String,
22121
- sideline: {
24924
+ const HzztSelectTextarea = withInstall$1(SelectTextarea);
24925
+
24926
+ const inputRangeProps = buildProps$1({
24927
+ modelValue: {
24928
+ type: Array,
24929
+ default: () => []
24930
+ },
24931
+ size: useSizeProp$1,
24932
+ disabled: Boolean,
24933
+ clearable: {
22122
24934
  type: Boolean,
22123
- default: true
24935
+ default: false
24936
+ },
24937
+ startPlaceholder: String,
24938
+ endPlaceholder: String,
24939
+ startProps: Object,
24940
+ endProps: Object
24941
+ });
24942
+ const inputRangeEmits = {
24943
+ [UPDATE_MODEL_EVENT$1]: (val) => isArray$1(val),
24944
+ [CHANGE_EVENT$1]: (val) => isArray$1(val)
24945
+ };
24946
+
24947
+ const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("span", { class: "margin-h-1" }, "\u2014\u2014", -1);
24948
+ const __default__ = vue.defineComponent({
24949
+ name: "HzztInputRange"
24950
+ });
24951
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
24952
+ ...__default__,
24953
+ props: inputRangeProps,
24954
+ emits: inputRangeEmits,
24955
+ setup(__props, { emit }) {
24956
+ const props = __props;
24957
+ const startValue = vue.ref(props.modelValue[0]);
24958
+ const endValue = vue.ref(props.modelValue[1]);
24959
+ const nsInput = useNamespace$1("input-range");
24960
+ const formSize = useFormSize();
24961
+ const formDisabled = useFormDisabled();
24962
+ const trueSize = vue.computed(() => props.size || formSize.value || useGlobalSize$1().value);
24963
+ const trueDisabled = vue.computed(() => props.disabled || formDisabled.value);
24964
+ const containerCls = vue.computed(() => [
24965
+ nsInput.b(),
24966
+ nsInput.m(trueSize.value)
24967
+ ]);
24968
+ vue.watch(() => props.modelValue, (v) => {
24969
+ startValue.value = v[0];
24970
+ endValue.value = v[1];
24971
+ }, {
24972
+ deep: true
24973
+ });
24974
+ function change() {
24975
+ if (startValue.value && endValue.value) {
24976
+ const modelValue = [startValue.value, endValue.value];
24977
+ emit("update:modelValue", modelValue);
24978
+ emit("change", modelValue);
24979
+ } else if (!startValue.value && !endValue.value) {
24980
+ emit("update:modelValue", []);
24981
+ emit("change", []);
24982
+ }
24983
+ }
24984
+ return (_ctx, _cache) => {
24985
+ const _component_el_input = vue.resolveComponent("el-input");
24986
+ return vue.openBlock(), vue.createElementBlock("div", {
24987
+ class: vue.normalizeClass(["flex align-items-center", vue.unref(containerCls)])
24988
+ }, [
24989
+ vue.createVNode(_component_el_input, vue.mergeProps({
24990
+ modelValue: startValue.value,
24991
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => startValue.value = $event)
24992
+ }, _ctx.startProps, {
24993
+ clearable: _ctx.clearable,
24994
+ placeholder: _ctx.startPlaceholder,
24995
+ size: vue.unref(trueSize),
24996
+ disabled: vue.unref(trueDisabled),
24997
+ class: "flex-1",
24998
+ onChange: change
24999
+ }), null, 16, ["modelValue", "clearable", "placeholder", "size", "disabled"]),
25000
+ _hoisted_1,
25001
+ vue.createVNode(_component_el_input, vue.mergeProps({
25002
+ modelValue: endValue.value,
25003
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => endValue.value = $event)
25004
+ }, _ctx.endProps, {
25005
+ clearable: _ctx.clearable,
25006
+ placeholder: _ctx.endPlaceholder,
25007
+ size: vue.unref(trueSize),
25008
+ disabled: vue.unref(trueDisabled),
25009
+ class: "flex-1",
25010
+ onChange: change
25011
+ }), null, 16, ["modelValue", "clearable", "placeholder", "size", "disabled"])
25012
+ ], 2);
25013
+ };
22124
25014
  }
22125
25015
  });
25016
+ var InputRange = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__file", "input-range.vue"]]);
22126
25017
 
22127
- const HzztTitle = withInstall$1(Title);
25018
+ const HzztInputRange = withInstall$1(InputRange);
22128
25019
 
22129
25020
  var Components = [
22130
25021
  HzztConfigProvider,
@@ -22140,7 +25031,9 @@
22140
25031
  HzztCheckButton,
22141
25032
  HzztQuarterPicker,
22142
25033
  HzztScan,
22143
- HzztSelectInput
25034
+ HzztSelectInput,
25035
+ HzztSelectTextarea,
25036
+ HzztInputRange
22144
25037
  ];
22145
25038
 
22146
25039
  var Plugins = [];
@@ -22364,11 +25257,13 @@
22364
25257
  exports.HzztConfirmPassword = HzztConfirmPassword;
22365
25258
  exports.HzztDropdown = HzztDropdown;
22366
25259
  exports.HzztIcon = HzztIcon;
25260
+ exports.HzztInputRange = HzztInputRange;
22367
25261
  exports.HzztPageSize = HzztPageSize;
22368
25262
  exports.HzztPagination = HzztPagination;
22369
25263
  exports.HzztQuarterPicker = HzztQuarterPicker;
22370
25264
  exports.HzztScan = HzztScan;
22371
25265
  exports.HzztSelectInput = HzztSelectInput;
25266
+ exports.HzztSelectTextarea = HzztSelectTextarea;
22372
25267
  exports.HzztTab = HzztTab;
22373
25268
  exports.HzztTitle = HzztTitle;
22374
25269
  exports.HzztTooltip = HzztTooltip;
@@ -22386,6 +25281,9 @@
22386
25281
  exports.datePickTypes = datePickTypes;
22387
25282
  exports["default"] = installer;
22388
25283
  exports.defaultNamespace = defaultNamespace$1;
25284
+ exports.inputRangeEmits = inputRangeEmits;
25285
+ exports.inputRangeProps = inputRangeProps;
25286
+ exports.insertCursorPosition = insertCursorPosition;
22389
25287
  exports.install = install;
22390
25288
  exports.localeContextKey = localeContextKey$1;
22391
25289
  exports.makeInstaller = makeInstaller;
@@ -22396,6 +25294,8 @@
22396
25294
  exports.scanProps = scanProps;
22397
25295
  exports.selectInputEmits = selectInputEmits;
22398
25296
  exports.selectInputProps = selectInputProps;
25297
+ exports.selectTextareaEmits = selectTextareaEmits;
25298
+ exports.selectTextareaProps = selectTextareaProps;
22399
25299
  exports.titleProps = titleProps;
22400
25300
  exports.translate = translate$1;
22401
25301
  exports.useGetDerivedNamespace = useGetDerivedNamespace$1;