@das-fed/ui 6.4.0-dev.9 → 6.4.0-hot.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/package.json +8 -6
  2. package/packages/business-components/app-container/index.js +46 -252
  3. package/packages/business-components/app-container/index.js.gz +0 -0
  4. package/packages/business-components/app-container/style.css +1 -1
  5. package/packages/business-components/app-container/style.css.gz +0 -0
  6. package/packages/business-components/change-enterprises/index.js +89 -295
  7. package/packages/business-components/change-enterprises/index.js.gz +0 -0
  8. package/packages/business-components/change-enterprises/style.css +1 -1
  9. package/packages/business-components/change-enterprises/style.css.gz +0 -0
  10. package/packages/business-components/device-panel/index.js +24047 -29070
  11. package/packages/business-components/device-panel/index.js.gz +0 -0
  12. package/packages/business-components/device-panel/style.css +1 -1
  13. package/packages/business-components/device-panel/style.css.gz +0 -0
  14. package/packages/business-components/export-button/index.js +152 -432
  15. package/packages/business-components/export-button/index.js.gz +0 -0
  16. package/packages/business-components/import-button/index.js +323 -603
  17. package/packages/business-components/import-button/index.js.gz +0 -0
  18. package/packages/business-components/process-form/index.js +788 -1276
  19. package/packages/business-components/process-form/index.js.gz +0 -0
  20. package/packages/business-components/process-form/style.css +1 -1
  21. package/packages/business-components/process-log/ProcessLogItem.vue.d.ts +1 -1
  22. package/packages/business-components/process-log/index.d.ts +21 -21
  23. package/packages/business-components/process-log/index.js +329 -3948
  24. package/packages/business-components/process-log/index.js.gz +0 -0
  25. package/packages/business-components/process-search-form/index.js +439 -719
  26. package/packages/business-components/process-search-form/index.js.gz +0 -0
  27. package/packages/business-components/process-table/index.js +538 -819
  28. package/packages/business-components/process-table/index.js.gz +0 -0
  29. package/packages/business-components/urgent-panel/index.js +1587 -2700
  30. package/packages/business-components/urgent-panel/index.js.gz +0 -0
  31. package/packages/business-components/urgent-panel/src/components/urgentPanelModal/apis.d.ts +1 -0
  32. package/packages/business-components/urgent-panel/src/components/urgentPanelModal/components/use-schedule-track/Track.vue.d.ts +2 -2
  33. package/packages/business-components/urgent-panel/src/components/urgentPanelModal/components/use-schedule-track/track.d.ts +1 -1
  34. package/packages/business-components/urgent-panel/style.css +1 -1
  35. package/packages/business-components/urgent-panel/style.css.gz +0 -0
  36. package/packages/business-components/video-dialog/index.js +338 -619
  37. package/packages/business-components/video-dialog/index.js.gz +0 -0
  38. package/packages/components/alert/index.js +52 -3418
  39. package/packages/components/alert/index.js.gz +0 -0
  40. package/packages/components/alert/style.css +1 -1
  41. package/packages/components/alert/style.css.gz +0 -0
  42. package/packages/components/autocomplete/index.js +456 -2872
  43. package/packages/components/autocomplete/index.js.gz +0 -0
  44. package/packages/components/autocomplete/style.css +1 -1
  45. package/packages/components/autocomplete/style.css.gz +0 -0
  46. package/packages/components/breadcrumb/index.js +47 -269
  47. package/packages/components/breadcrumb/index.js.gz +0 -0
  48. package/packages/components/breadcrumb/style.css +1 -1
  49. package/packages/components/breadcrumb/style.css.gz +0 -0
  50. package/packages/components/button/index.js +215 -9801
  51. package/packages/components/button/index.js.gz +0 -0
  52. package/packages/components/button/style.css +1 -1
  53. package/packages/components/button/style.css.gz +0 -0
  54. package/packages/components/calendar/index.js +257 -614
  55. package/packages/components/calendar/index.js.gz +0 -0
  56. package/packages/components/cascader/index.js +139 -6397
  57. package/packages/components/cascader/index.js.gz +0 -0
  58. package/packages/components/cascader/style.css +1 -1
  59. package/packages/components/cascader/style.css.gz +0 -0
  60. package/packages/components/checkbox/index.js +180 -3837
  61. package/packages/components/checkbox/index.js.gz +0 -0
  62. package/packages/components/checkbox/style.css +1 -1
  63. package/packages/components/checkbox/style.css.gz +0 -0
  64. package/packages/components/collapse-panel/index.js +31 -3624
  65. package/packages/components/collapse-panel/index.js.gz +0 -0
  66. package/packages/components/collapse-panel/style.css +1 -1
  67. package/packages/components/collapse-panel/style.css.gz +0 -0
  68. package/packages/components/collaspe/index.js +31 -3624
  69. package/packages/components/collaspe/index.js.gz +0 -0
  70. package/packages/components/collaspe/style.css +1 -1
  71. package/packages/components/color-picker/index.js +106 -5342
  72. package/packages/components/color-picker/index.js.gz +0 -0
  73. package/packages/components/color-picker/style.css +1 -1
  74. package/packages/components/color-picker/style.css.gz +0 -0
  75. package/packages/components/date-picker/index.js +539 -14894
  76. package/packages/components/date-picker/index.js.gz +0 -0
  77. package/packages/components/date-picker/style.css +1 -1
  78. package/packages/components/date-picker/style.css.gz +0 -0
  79. package/packages/components/dialog/index.js +186 -1832
  80. package/packages/components/dialog/index.js.gz +0 -0
  81. package/packages/components/dialog/style.css +1 -1
  82. package/packages/components/dialog/style.css.gz +0 -0
  83. package/packages/components/drawer/index.js +38 -1611
  84. package/packages/components/drawer/index.js.gz +0 -0
  85. package/packages/components/drawer/style.css +1 -1
  86. package/packages/components/dropdown/index.js +54 -4607
  87. package/packages/components/dropdown/index.js.gz +0 -0
  88. package/packages/components/dropdown/style.css +1 -1
  89. package/packages/components/dropdown/style.css.gz +0 -0
  90. package/packages/components/empty/index.js +39 -800
  91. package/packages/components/empty/index.js.gz +0 -0
  92. package/packages/components/image-preview/index.js +34 -1282
  93. package/packages/components/image-preview/index.js.gz +0 -0
  94. package/packages/components/image-upload/index.js +112 -11722
  95. package/packages/components/image-upload/index.js.gz +0 -0
  96. package/packages/components/image-upload/style.css +1 -1
  97. package/packages/components/image-upload/style.css.gz +0 -0
  98. package/packages/components/image-viewer/index.d.ts +9 -0
  99. package/packages/components/image-viewer/index.js +389 -13162
  100. package/packages/components/image-viewer/index.js.gz +0 -0
  101. package/packages/components/image-viewer/src/Index.vue.d.ts +3 -0
  102. package/packages/components/image-viewer/src/hooks/use-handler-image-src.d.ts +2 -1
  103. package/packages/components/image-viewer/src/type.d.ts +3 -0
  104. package/packages/components/image-viewer/style.css +1 -1
  105. package/packages/components/image-viewer/style.css.gz +0 -0
  106. package/packages/components/input/index.js +157 -1084
  107. package/packages/components/input/index.js.gz +0 -0
  108. package/packages/components/input/style.css +1 -1
  109. package/packages/components/input/style.css.gz +0 -0
  110. package/packages/components/input-dialog-select/index.js +2 -2
  111. package/packages/components/input-dialog-select/index.js.gz +0 -0
  112. package/packages/components/input-dialog-select/style.css +1 -1
  113. package/packages/components/input-dialog-select/style.css.gz +0 -0
  114. package/packages/components/input-number/index.js +145 -1828
  115. package/packages/components/input-number/index.js.gz +0 -0
  116. package/packages/components/input-number/style.css +1 -1
  117. package/packages/components/input-number/style.css.gz +0 -0
  118. package/packages/components/live-player/index.js +2883 -3667
  119. package/packages/components/live-player/index.js.gz +0 -0
  120. package/packages/components/live-player/style.css +1 -1
  121. package/packages/components/map/index.js +1189 -5207
  122. package/packages/components/map/index.js.gz +0 -0
  123. package/packages/components/map/style.css +1 -1
  124. package/packages/components/menu-aside/index.js +610 -8303
  125. package/packages/components/menu-aside/index.js.gz +0 -0
  126. package/packages/components/menu-aside/style.css +1 -1
  127. package/packages/components/menu-aside/style.css.gz +0 -0
  128. package/packages/components/menu-header/index.js +39 -10077
  129. package/packages/components/menu-header/index.js.gz +0 -0
  130. package/packages/components/menu-header/style.css +1 -1
  131. package/packages/components/menu-header/style.css.gz +0 -0
  132. package/packages/components/message/index.js +53 -1286
  133. package/packages/components/message/index.js.gz +0 -0
  134. package/packages/components/message/style.css +1 -1
  135. package/packages/components/message/style.css.gz +0 -0
  136. package/packages/components/notification/index.js +48 -3269
  137. package/packages/components/notification/index.js.gz +0 -0
  138. package/packages/components/notification/style.css +1 -1
  139. package/packages/components/notification/style.css.gz +0 -0
  140. package/packages/components/pagination/index.js +153 -8015
  141. package/packages/components/pagination/index.js.gz +0 -0
  142. package/packages/components/pagination/style.css +1 -1
  143. package/packages/components/pagination/style.css.gz +0 -0
  144. package/packages/components/popover/index.js +44 -2492
  145. package/packages/components/popover/index.js.gz +0 -0
  146. package/packages/components/popover/style.css +1 -1
  147. package/packages/components/popover/style.css.gz +0 -0
  148. package/packages/components/progress/index.js +107 -514
  149. package/packages/components/progress/index.js.gz +0 -0
  150. package/packages/components/progress/style.css +1 -1
  151. package/packages/components/progress/style.css.gz +0 -0
  152. package/packages/components/radio/index.js +160 -3724
  153. package/packages/components/radio/index.js.gz +0 -0
  154. package/packages/components/radio/style.css +1 -1
  155. package/packages/components/radio/style.css.gz +0 -0
  156. package/packages/components/scrollbar/index.js +915 -1440
  157. package/packages/components/scrollbar/index.js.gz +0 -0
  158. package/packages/components/scrollbar/style.css +9 -9
  159. package/packages/components/scrollbar/style.css.gz +0 -0
  160. package/packages/components/search/index.js +90 -5261
  161. package/packages/components/search/index.js.gz +0 -0
  162. package/packages/components/search/style.css +1 -1
  163. package/packages/components/search/style.css.gz +0 -0
  164. package/packages/components/search-form/index.js +920 -1008
  165. package/packages/components/search-form/index.js.gz +0 -0
  166. package/packages/components/select/index.js +380 -10505
  167. package/packages/components/select/index.js.gz +0 -0
  168. package/packages/components/select/style.css +1 -1
  169. package/packages/components/select/style.css.gz +0 -0
  170. package/packages/components/select-list/index.js +1173 -1431
  171. package/packages/components/select-list/index.js.gz +0 -0
  172. package/packages/components/select-list/style.css +1 -1
  173. package/packages/components/select-list/style.css.gz +0 -0
  174. package/packages/components/special-range-picker-month/index.js +196 -2645
  175. package/packages/components/special-range-picker-month/index.js.gz +0 -0
  176. package/packages/components/special-range-picker-year/index.js +259 -2707
  177. package/packages/components/special-range-picker-year/index.js.gz +0 -0
  178. package/packages/components/special-range-picker-year/style.css +1 -1
  179. package/packages/components/special-range-picker-year/style.css.gz +0 -0
  180. package/packages/components/spin/index.js +49 -3534
  181. package/packages/components/spin/index.js.gz +0 -0
  182. package/packages/components/spin/style.css +1 -1
  183. package/packages/components/spin/style.css.gz +0 -0
  184. package/packages/components/step/index.js +29 -4085
  185. package/packages/components/step/index.js.gz +0 -0
  186. package/packages/components/step/style.css +1 -1
  187. package/packages/components/steps/index.js +15 -4070
  188. package/packages/components/steps/style.css +1 -1
  189. package/packages/components/steps/style.css.gz +0 -0
  190. package/packages/components/switch/index.js +31 -545
  191. package/packages/components/switch/index.js.gz +0 -0
  192. package/packages/components/switch/style.css +1 -1
  193. package/packages/components/switch/style.css.gz +0 -0
  194. package/packages/components/table/index.js +6287 -18573
  195. package/packages/components/table/index.js.gz +0 -0
  196. package/packages/components/table/src/Table.vue.d.ts +2 -2
  197. package/packages/components/table/style.css +1 -1
  198. package/packages/components/table/style.css.gz +0 -0
  199. package/packages/components/tabs/index.js +173 -12627
  200. package/packages/components/tabs/index.js.gz +0 -0
  201. package/packages/components/tabs/style.css +1 -1
  202. package/packages/components/tabs/style.css.gz +0 -0
  203. package/packages/components/tag/index.js +55 -323
  204. package/packages/components/tag/index.js.gz +0 -0
  205. package/packages/components/tag/style.css +1 -1
  206. package/packages/components/tag/style.css.gz +0 -0
  207. package/packages/components/time-line/index.js +61 -3397
  208. package/packages/components/time-line/index.js.gz +0 -0
  209. package/packages/components/time-line/style.css +1 -1
  210. package/packages/components/time-line/style.css.gz +0 -0
  211. package/packages/components/tooltip/index.js +65 -2171
  212. package/packages/components/tooltip/index.js.gz +0 -0
  213. package/packages/components/tooltip/style.css +1 -1
  214. package/packages/components/tooltip/style.css.gz +0 -0
  215. package/packages/components/tree/index.js +1887 -6747
  216. package/packages/components/tree/index.js.gz +0 -0
  217. package/packages/components/tree/style.css +1 -1
  218. package/packages/components/tree/style.css.gz +0 -0
  219. package/packages/components/tree-select/index.js +358 -2776
  220. package/packages/components/tree-select/index.js.gz +0 -0
  221. package/packages/components/tree-select/style.css +1 -1
  222. package/packages/components/tree-select/style.css.gz +0 -0
  223. package/packages/components/upload/index.js +116 -11726
  224. package/packages/components/upload/index.js.gz +0 -0
  225. package/packages/components/upload/style.css +1 -1
  226. package/packages/components/upload/style.css.gz +0 -0
  227. package/packages/components/virtual-tree/index.js +86 -2923
  228. package/packages/components/virtual-tree/index.js.gz +0 -0
  229. package/packages/components/virtual-tree/style.css +1 -1
  230. package/packages/components/virtual-tree/style.css.gz +0 -0
  231. package/packages/components/watermark/index.js +17 -368
  232. package/packages/business-components/process-form/style.css.gz +0 -0
  233. package/packages/components/collaspe/style.css.gz +0 -0
  234. package/packages/components/drawer/style.css.gz +0 -0
  235. package/packages/components/image-preview/style.css +0 -1
  236. package/packages/components/image-preview/style.css.gz +0 -0
  237. package/packages/components/live-player/style.css.gz +0 -0
  238. package/packages/components/map/style.css.gz +0 -0
  239. package/packages/components/step/style.css.gz +0 -0
  240. package/packages/components/steps/index.js.gz +0 -0
  241. package/packages/components/watermark/index.js.gz +0 -0
@@ -1,2466 +1,18 @@
1
1
  import '@das-fed/ui/packages/components/popover/style.css';
2
- import { withInstall as yo } from "@das-fed/utils/with-install/index";
3
- import { i18n as Xt, setI18nRule as ho } from "@das-fed/web/packages/i18n/index";
4
- import { getCurrentScope as bo, onScopeDispose as wo, unref as v, watch as L, warn as Eo, getCurrentInstance as at, inject as G, ref as A, computed as T, onMounted as ve, shallowRef as Oo, onBeforeUnmount as le, onBeforeMount as To, provide as fe, defineComponent as B, renderSlot as W, openBlock as D, createElementBlock as pe, normalizeClass as Tt, normalizeStyle as Co, withDirectives as Ct, cloneVNode as Io, Fragment as Po, Text as _o, Comment as So, createVNode as Oe, createBlock as de, mergeProps as Ue, withCtx as K, createCommentVNode as ae, nextTick as en, toRef as xe, Teleport as Ao, Transition as Ro, vShow as No, readonly as ko, onDeactivated as $o, toDisplayString as be, createTextVNode as tt, useAttrs as Fo, createElementVNode as xo } from "vue";
5
- import { DasButton as tn } from "@das-fed/ui/packages/components/button/index";
2
+ import { withInstall as w } from "@das-fed/utils/with-install/index";
3
+ import { i18n as m, setI18nRule as _ } from "@das-fed/web/packages/i18n/index";
4
+ import { defineComponent as b, useAttrs as g, ref as D, computed as O, openBlock as s, createBlock as V, unref as t, mergeProps as E, withCtx as r, renderSlot as d, withDirectives as I, createElementBlock as p, toDisplayString as n, createCommentVNode as u, createElementVNode as P, createTextVNode as a, createVNode as f } from "vue";
5
+ import { ElPopover as R, ClickOutside as z } from "element-plus";
6
+ import { DasButton as v } from "@das-fed/ui/packages/components/button/index";
7
+ import "element-plus/es/components/popover/style/css";
6
8
  import "@das-fed/ui/packages/global/theme";
7
- const se = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => {
8
- const s = e == null ? void 0 : e(r);
9
- if (n === !1 || !s)
10
- return t == null ? void 0 : t(r);
11
- };
12
- var nn;
13
- const Y = typeof window < "u", Bo = (e) => typeof e == "string", Bn = () => {
14
- }, Lo = Y && ((nn = window == null ? void 0 : window.navigator) == null ? void 0 : nn.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
15
- function Ln(e) {
16
- return typeof e == "function" ? e() : v(e);
17
- }
18
- function Mo(e) {
19
- return e;
20
- }
21
- function Mn(e) {
22
- return bo() ? (wo(e), !0) : !1;
23
- }
24
- function we(e) {
25
- var t;
26
- const n = Ln(e);
27
- return (t = n == null ? void 0 : n.$el) != null ? t : n;
28
- }
29
- const Dn = Y ? window : void 0;
30
- function dt(...e) {
31
- let t, n, o, r;
32
- if (Bo(e[0]) || Array.isArray(e[0]) ? ([n, o, r] = e, t = Dn) : [t, n, o, r] = e, !t)
33
- return Bn;
34
- Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
35
- const s = [], a = () => {
36
- s.forEach((d) => d()), s.length = 0;
37
- }, u = (d, g, y, h) => (d.addEventListener(g, y, h), () => d.removeEventListener(g, y, h)), l = L(() => [we(t), Ln(r)], ([d, g]) => {
38
- a(), d && s.push(...n.flatMap((y) => o.map((h) => u(d, y, h, g))));
39
- }, { immediate: !0, flush: "post" }), i = () => {
40
- l(), a();
41
- };
42
- return Mn(i), i;
43
- }
44
- let on = !1;
45
- function Do(e, t, n = {}) {
46
- const { window: o = Dn, ignore: r = [], capture: s = !0, detectIframe: a = !1 } = n;
47
- if (!o)
48
- return;
49
- Lo && !on && (on = !0, Array.from(o.document.body.children).forEach((y) => y.addEventListener("click", Bn)));
50
- let u = !0;
51
- const l = (y) => r.some((h) => {
52
- if (typeof h == "string")
53
- return Array.from(o.document.querySelectorAll(h)).some((f) => f === y.target || y.composedPath().includes(f));
54
- {
55
- const f = we(h);
56
- return f && (y.target === f || y.composedPath().includes(f));
57
- }
58
- }), d = [
59
- dt(o, "click", (y) => {
60
- const h = we(e);
61
- if (!(!h || h === y.target || y.composedPath().includes(h))) {
62
- if (y.detail === 0 && (u = !l(y)), !u) {
63
- u = !0;
64
- return;
65
- }
66
- t(y);
67
- }
68
- }, { passive: !0, capture: s }),
69
- dt(o, "pointerdown", (y) => {
70
- const h = we(e);
71
- h && (u = !y.composedPath().includes(h) && !l(y));
72
- }, { passive: !0 }),
73
- a && dt(o, "blur", (y) => {
74
- var h;
75
- const f = we(e);
76
- ((h = o.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(f != null && f.contains(o.document.activeElement)) && t(y);
77
- })
78
- ].filter(Boolean);
79
- return () => d.forEach((y) => y());
80
- }
81
- const rn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, sn = "__vueuse_ssr_handlers__";
82
- rn[sn] = rn[sn] || {};
83
- var an;
84
- (function(e) {
85
- e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
86
- })(an || (an = {}));
87
- var jo = Object.defineProperty, ln = Object.getOwnPropertySymbols, Ho = Object.prototype.hasOwnProperty, Ko = Object.prototype.propertyIsEnumerable, un = (e, t, n) => t in e ? jo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Uo = (e, t) => {
88
- for (var n in t || (t = {}))
89
- Ho.call(t, n) && un(e, n, t[n]);
90
- if (ln)
91
- for (var n of ln(t))
92
- Ko.call(t, n) && un(e, n, t[n]);
93
- return e;
94
- };
95
- const Vo = {
96
- easeInSine: [0.12, 0, 0.39, 0],
97
- easeOutSine: [0.61, 1, 0.88, 1],
98
- easeInOutSine: [0.37, 0, 0.63, 1],
99
- easeInQuad: [0.11, 0, 0.5, 0],
100
- easeOutQuad: [0.5, 1, 0.89, 1],
101
- easeInOutQuad: [0.45, 0, 0.55, 1],
102
- easeInCubic: [0.32, 0, 0.67, 0],
103
- easeOutCubic: [0.33, 1, 0.68, 1],
104
- easeInOutCubic: [0.65, 0, 0.35, 1],
105
- easeInQuart: [0.5, 0, 0.75, 0],
106
- easeOutQuart: [0.25, 1, 0.5, 1],
107
- easeInOutQuart: [0.76, 0, 0.24, 1],
108
- easeInQuint: [0.64, 0, 0.78, 0],
109
- easeOutQuint: [0.22, 1, 0.36, 1],
110
- easeInOutQuint: [0.83, 0, 0.17, 1],
111
- easeInExpo: [0.7, 0, 0.84, 0],
112
- easeOutExpo: [0.16, 1, 0.3, 1],
113
- easeInOutExpo: [0.87, 0, 0.13, 1],
114
- easeInCirc: [0.55, 0, 1, 0.45],
115
- easeOutCirc: [0, 0.55, 0.45, 1],
116
- easeInOutCirc: [0.85, 0, 0.15, 1],
117
- easeInBack: [0.36, 0, 0.66, -0.56],
118
- easeOutBack: [0.34, 1.56, 0.64, 1],
119
- easeInOutBack: [0.68, -0.6, 0.32, 1.6]
120
- };
121
- Uo({
122
- linear: Mo
123
- }, Vo);
124
- /**
125
- * @vue/shared v3.4.35
126
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
127
- * @license MIT
128
- **/
129
- process.env.NODE_ENV !== "production" && Object.freeze({});
130
- process.env.NODE_ENV !== "production" && Object.freeze([]);
131
- const bt = () => {
132
- }, Wo = Object.prototype.hasOwnProperty, cn = (e, t) => Wo.call(e, t), zo = Array.isArray, Qe = (e) => typeof e == "function", it = (e) => typeof e == "string", It = (e) => e !== null && typeof e == "object";
133
- function wt(e) {
134
- for (var t = -1, n = e == null ? 0 : e.length, o = {}; ++t < n; ) {
135
- var r = e[t];
136
- o[r[0]] = r[1];
137
- }
138
- return o;
139
- }
140
- function Pt(e) {
141
- return e == null;
142
- }
143
- function qo(e) {
144
- return e === void 0;
145
- }
146
- const _t = (e) => typeof e == "boolean", Me = (e) => typeof e == "number", De = (e) => typeof Element > "u" ? !1 : e instanceof Element, Jo = (e) => it(e) ? !Number.isNaN(Number(e)) : !1;
147
- class Zo extends Error {
148
- constructor(t) {
149
- super(t), this.name = "ElementPlusError";
150
- }
151
- }
152
- function ot(e, t) {
153
- if (process.env.NODE_ENV !== "production") {
154
- const n = it(e) ? new Zo(`[${e}] ${t}`) : e;
155
- }
156
- }
157
- const Qo = "utils/dom/style";
158
- function Yo(e, t = "px") {
159
- if (!e)
160
- return "";
161
- if (Me(e) || Jo(e))
162
- return `${e}${t}`;
163
- if (it(e))
164
- return e;
165
- ot(Qo, "binding value must be a string or number");
166
- }
167
- const jn = "__epPropKey", S = (e) => e, Go = (e) => It(e) && !!e[jn], St = (e, t) => {
168
- if (!It(e) || Go(e))
169
- return e;
170
- const { values: n, required: o, default: r, type: s, validator: a } = e, l = {
171
- type: s,
172
- required: !!o,
173
- validator: n || a ? (i) => {
174
- let d = !1, g = [];
175
- if (n && (g = Array.from(n), cn(e, "default") && g.push(r), d || (d = g.includes(i))), a && (d || (d = a(i))), !d && g.length > 0) {
176
- const y = [...new Set(g)].map((h) => JSON.stringify(h)).join(", ");
177
- Eo(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${y}], got value ${JSON.stringify(i)}.`);
178
- }
179
- return d;
180
- } : void 0,
181
- [jn]: !0
182
- };
183
- return cn(e, "default") && (l.default = r), l;
184
- }, z = (e) => wt(Object.entries(e).map(([t, n]) => [
185
- t,
186
- St(n, t)
187
- ])), Xo = S([
188
- String,
189
- Object,
190
- Function
191
- ]), At = (e, t) => {
192
- if (e.install = (n) => {
193
- for (const o of [e, ...Object.values(t ?? {})])
194
- n.component(o.name, o);
195
- }, t)
196
- for (const [n, o] of Object.entries(t))
197
- e[n] = o;
198
- return e;
199
- }, er = (e, t) => (e.install = (n) => {
200
- n.directive(t, e);
201
- }, e), rt = {
202
- tab: "Tab",
203
- enter: "Enter",
204
- space: "Space",
205
- left: "ArrowLeft",
206
- up: "ArrowUp",
207
- right: "ArrowRight",
208
- down: "ArrowDown",
209
- esc: "Escape",
210
- delete: "Delete",
211
- backspace: "Backspace",
212
- numpadEnter: "NumpadEnter",
213
- pageUp: "PageUp",
214
- pageDown: "PageDown",
215
- home: "Home",
216
- end: "End"
217
- }, vt = "el", tr = "is-", he = (e, t, n, o, r) => {
218
- let s = `${e}-${t}`;
219
- return n && (s += `-${n}`), o && (s += `__${o}`), r && (s += `--${r}`), s;
220
- }, nr = Symbol("namespaceContextKey"), Rt = (e) => {
221
- const t = at() ? G(nr, A(vt)) : A(vt);
222
- return T(() => v(t) || vt);
223
- }, Ne = (e, t) => {
224
- const n = Rt();
225
- return {
226
- namespace: n,
227
- b: (p = "") => he(n.value, e, p, "", ""),
228
- e: (p) => p ? he(n.value, e, "", p, "") : "",
229
- m: (p) => p ? he(n.value, e, "", "", p) : "",
230
- be: (p, m) => p && m ? he(n.value, e, p, m, "") : "",
231
- em: (p, m) => p && m ? he(n.value, e, "", p, m) : "",
232
- bm: (p, m) => p && m ? he(n.value, e, p, "", m) : "",
233
- bem: (p, m, c) => p && m && c ? he(n.value, e, p, m, c) : "",
234
- is: (p, ...m) => {
235
- const c = m.length >= 1 ? m[0] : !0;
236
- return p && c ? `${tr}${p}` : "";
237
- },
238
- cssVar: (p) => {
239
- const m = {};
240
- for (const c in p)
241
- p[c] && (m[`--${n.value}-${c}`] = p[c]);
242
- return m;
243
- },
244
- cssVarName: (p) => `--${n.value}-${p}`,
245
- cssVarBlock: (p) => {
246
- const m = {};
247
- for (const c in p)
248
- p[c] && (m[`--${n.value}-${e}-${c}`] = p[c]);
249
- return m;
250
- },
251
- cssVarBlockName: (p) => `--${n.value}-${e}-${p}`
252
- };
253
- }, or = St({
254
- type: S(Boolean),
255
- default: null
256
- }), rr = St({
257
- type: S(Function)
258
- }), Hn = (e) => {
259
- const t = `update:${e}`, n = `onUpdate:${e}`, o = [t], r = {
260
- [e]: or,
261
- [n]: rr
262
- };
263
- return {
264
- useModelToggle: ({
265
- indicator: a,
266
- toggleReason: u,
267
- shouldHideWhenRouteChanges: l,
268
- shouldProceed: i,
269
- onShow: d,
270
- onHide: g
271
- }) => {
272
- const y = at(), { emit: h } = y, f = y.props, p = T(() => Qe(f[n])), m = T(() => f[e] === null), c = (O) => {
273
- a.value !== !0 && (a.value = !0, u && (u.value = O), Qe(d) && d(O));
274
- }, w = (O) => {
275
- a.value !== !1 && (a.value = !1, u && (u.value = O), Qe(g) && g(O));
276
- }, C = (O) => {
277
- if (f.disabled === !0 || Qe(i) && !i())
278
- return;
279
- const P = p.value && Y;
280
- P && h(t, !0), (m.value || !P) && c(O);
281
- }, b = (O) => {
282
- if (f.disabled === !0 || !Y)
283
- return;
284
- const P = p.value && Y;
285
- P && h(t, !1), (m.value || !P) && w(O);
286
- }, I = (O) => {
287
- _t(O) && (f.disabled && O ? p.value && h(t, !1) : a.value !== O && (O ? c() : w()));
288
- }, _ = () => {
289
- a.value ? b() : C();
290
- };
291
- return L(() => f[e], I), l && y.appContext.config.globalProperties.$route !== void 0 && L(() => ({
292
- ...y.proxy.$route
293
- }), () => {
294
- l.value && a.value && b();
295
- }), ve(() => {
296
- I(f[e]);
297
- }), {
298
- hide: b,
299
- show: C,
300
- toggle: _,
301
- hasUpdateHandler: p
302
- };
303
- },
304
- useModelToggleProps: r,
305
- useModelToggleEmits: o
306
- };
307
- };
308
- Hn("modelValue");
309
- var U = "top", Z = "bottom", Q = "right", V = "left", Nt = "auto", Ve = [U, Z, Q, V], Pe = "start", je = "end", sr = "clippingParents", Kn = "viewport", Fe = "popper", ar = "reference", pn = Ve.reduce(function(e, t) {
310
- return e.concat([t + "-" + Pe, t + "-" + je]);
311
- }, []), kt = [].concat(Ve, [Nt]).reduce(function(e, t) {
312
- return e.concat([t, t + "-" + Pe, t + "-" + je]);
313
- }, []), ir = "beforeRead", lr = "read", ur = "afterRead", cr = "beforeMain", pr = "main", fr = "afterMain", dr = "beforeWrite", vr = "write", mr = "afterWrite", gr = [ir, lr, ur, cr, pr, fr, dr, vr, mr];
314
- function oe(e) {
315
- return e ? (e.nodeName || "").toLowerCase() : null;
316
- }
317
- function X(e) {
318
- if (e == null) return window;
319
- if (e.toString() !== "[object Window]") {
320
- var t = e.ownerDocument;
321
- return t && t.defaultView || window;
322
- }
323
- return e;
324
- }
325
- function _e(e) {
326
- var t = X(e).Element;
327
- return e instanceof t || e instanceof Element;
328
- }
329
- function J(e) {
330
- var t = X(e).HTMLElement;
331
- return e instanceof t || e instanceof HTMLElement;
332
- }
333
- function $t(e) {
334
- if (typeof ShadowRoot > "u") return !1;
335
- var t = X(e).ShadowRoot;
336
- return e instanceof t || e instanceof ShadowRoot;
337
- }
338
- function yr(e) {
339
- var t = e.state;
340
- Object.keys(t.elements).forEach(function(n) {
341
- var o = t.styles[n] || {}, r = t.attributes[n] || {}, s = t.elements[n];
342
- !J(s) || !oe(s) || (Object.assign(s.style, o), Object.keys(r).forEach(function(a) {
343
- var u = r[a];
344
- u === !1 ? s.removeAttribute(a) : s.setAttribute(a, u === !0 ? "" : u);
345
- }));
346
- });
347
- }
348
- function hr(e) {
349
- var t = e.state, n = { popper: { position: t.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
350
- return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
351
- Object.keys(t.elements).forEach(function(o) {
352
- var r = t.elements[o], s = t.attributes[o] || {}, a = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), u = a.reduce(function(l, i) {
353
- return l[i] = "", l;
354
- }, {});
355
- !J(r) || !oe(r) || (Object.assign(r.style, u), Object.keys(s).forEach(function(l) {
356
- r.removeAttribute(l);
357
- }));
358
- });
359
- };
360
- }
361
- var Un = { name: "applyStyles", enabled: !0, phase: "write", fn: yr, effect: hr, requires: ["computeStyles"] };
362
- function ne(e) {
363
- return e.split("-")[0];
364
- }
365
- var Ee = Math.max, st = Math.min, Se = Math.round;
366
- function Ae(e, t) {
367
- t === void 0 && (t = !1);
368
- var n = e.getBoundingClientRect(), o = 1, r = 1;
369
- if (J(e) && t) {
370
- var s = e.offsetHeight, a = e.offsetWidth;
371
- a > 0 && (o = Se(n.width) / a || 1), s > 0 && (r = Se(n.height) / s || 1);
372
- }
373
- return { width: n.width / o, height: n.height / r, top: n.top / r, right: n.right / o, bottom: n.bottom / r, left: n.left / o, x: n.left / o, y: n.top / r };
374
- }
375
- function Ft(e) {
376
- var t = Ae(e), n = e.offsetWidth, o = e.offsetHeight;
377
- return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: o };
378
- }
379
- function Vn(e, t) {
380
- var n = t.getRootNode && t.getRootNode();
381
- if (e.contains(t)) return !0;
382
- if (n && $t(n)) {
383
- var o = t;
384
- do {
385
- if (o && e.isSameNode(o)) return !0;
386
- o = o.parentNode || o.host;
387
- } while (o);
388
- }
389
- return !1;
390
- }
391
- function ie(e) {
392
- return X(e).getComputedStyle(e);
393
- }
394
- function br(e) {
395
- return ["table", "td", "th"].indexOf(oe(e)) >= 0;
396
- }
397
- function me(e) {
398
- return ((_e(e) ? e.ownerDocument : e.document) || window.document).documentElement;
399
- }
400
- function lt(e) {
401
- return oe(e) === "html" ? e : e.assignedSlot || e.parentNode || ($t(e) ? e.host : null) || me(e);
402
- }
403
- function fn(e) {
404
- return !J(e) || ie(e).position === "fixed" ? null : e.offsetParent;
405
- }
406
- function wr(e) {
407
- var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
408
- if (n && J(e)) {
409
- var o = ie(e);
410
- if (o.position === "fixed") return null;
411
- }
412
- var r = lt(e);
413
- for ($t(r) && (r = r.host); J(r) && ["html", "body"].indexOf(oe(r)) < 0; ) {
414
- var s = ie(r);
415
- if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || t && s.willChange === "filter" || t && s.filter && s.filter !== "none") return r;
416
- r = r.parentNode;
417
- }
418
- return null;
419
- }
420
- function We(e) {
421
- for (var t = X(e), n = fn(e); n && br(n) && ie(n).position === "static"; ) n = fn(n);
422
- return n && (oe(n) === "html" || oe(n) === "body" && ie(n).position === "static") ? t : n || wr(e) || t;
423
- }
424
- function xt(e) {
425
- return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
426
- }
427
- function Be(e, t, n) {
428
- return Ee(e, st(t, n));
429
- }
430
- function Er(e, t, n) {
431
- var o = Be(e, t, n);
432
- return o > n ? n : o;
433
- }
434
- function Wn() {
435
- return { top: 0, right: 0, bottom: 0, left: 0 };
436
- }
437
- function zn(e) {
438
- return Object.assign({}, Wn(), e);
439
- }
440
- function qn(e, t) {
441
- return t.reduce(function(n, o) {
442
- return n[o] = e, n;
443
- }, {});
444
- }
445
- var Or = function(e, t) {
446
- return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, zn(typeof e != "number" ? e : qn(e, Ve));
447
- };
448
- function Tr(e) {
449
- var t, n = e.state, o = e.name, r = e.options, s = n.elements.arrow, a = n.modifiersData.popperOffsets, u = ne(n.placement), l = xt(u), i = [V, Q].indexOf(u) >= 0, d = i ? "height" : "width";
450
- if (!(!s || !a)) {
451
- var g = Or(r.padding, n), y = Ft(s), h = l === "y" ? U : V, f = l === "y" ? Z : Q, p = n.rects.reference[d] + n.rects.reference[l] - a[l] - n.rects.popper[d], m = a[l] - n.rects.reference[l], c = We(s), w = c ? l === "y" ? c.clientHeight || 0 : c.clientWidth || 0 : 0, C = p / 2 - m / 2, b = g[h], I = w - y[d] - g[f], _ = w / 2 - y[d] / 2 + C, O = Be(b, _, I), P = l;
452
- n.modifiersData[o] = (t = {}, t[P] = O, t.centerOffset = O - _, t);
453
- }
454
- }
455
- function Cr(e) {
456
- var t = e.state, n = e.options, o = n.element, r = o === void 0 ? "[data-popper-arrow]" : o;
457
- r != null && (typeof r == "string" && (r = t.elements.popper.querySelector(r), !r) || !Vn(t.elements.popper, r) || (t.elements.arrow = r));
458
- }
459
- var Ir = { name: "arrow", enabled: !0, phase: "main", fn: Tr, effect: Cr, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
460
- function Re(e) {
461
- return e.split("-")[1];
462
- }
463
- var Pr = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
464
- function _r(e) {
465
- var t = e.x, n = e.y, o = window, r = o.devicePixelRatio || 1;
466
- return { x: Se(t * r) / r || 0, y: Se(n * r) / r || 0 };
467
- }
468
- function dn(e) {
469
- var t, n = e.popper, o = e.popperRect, r = e.placement, s = e.variation, a = e.offsets, u = e.position, l = e.gpuAcceleration, i = e.adaptive, d = e.roundOffsets, g = e.isFixed, y = a.x, h = y === void 0 ? 0 : y, f = a.y, p = f === void 0 ? 0 : f, m = typeof d == "function" ? d({ x: h, y: p }) : { x: h, y: p };
470
- h = m.x, p = m.y;
471
- var c = a.hasOwnProperty("x"), w = a.hasOwnProperty("y"), C = V, b = U, I = window;
472
- if (i) {
473
- var _ = We(n), O = "clientHeight", P = "clientWidth";
474
- if (_ === X(n) && (_ = me(n), ie(_).position !== "static" && u === "absolute" && (O = "scrollHeight", P = "scrollWidth")), _ = _, r === U || (r === V || r === Q) && s === je) {
475
- b = Z;
476
- var k = g && _ === I && I.visualViewport ? I.visualViewport.height : _[O];
477
- p -= k - o.height, p *= l ? 1 : -1;
478
- }
479
- if (r === V || (r === U || r === Z) && s === je) {
480
- C = Q;
481
- var R = g && _ === I && I.visualViewport ? I.visualViewport.width : _[P];
482
- h -= R - o.width, h *= l ? 1 : -1;
483
- }
484
- }
485
- var $ = Object.assign({ position: u }, i && Pr), N = d === !0 ? _r({ x: h, y: p }) : { x: h, y: p };
486
- if (h = N.x, p = N.y, l) {
487
- var F;
488
- return Object.assign({}, $, (F = {}, F[b] = w ? "0" : "", F[C] = c ? "0" : "", F.transform = (I.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + p + "px)" : "translate3d(" + h + "px, " + p + "px, 0)", F));
489
- }
490
- return Object.assign({}, $, (t = {}, t[b] = w ? p + "px" : "", t[C] = c ? h + "px" : "", t.transform = "", t));
491
- }
492
- function Sr(e) {
493
- var t = e.state, n = e.options, o = n.gpuAcceleration, r = o === void 0 ? !0 : o, s = n.adaptive, a = s === void 0 ? !0 : s, u = n.roundOffsets, l = u === void 0 ? !0 : u, i = { placement: ne(t.placement), variation: Re(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: r, isFixed: t.options.strategy === "fixed" };
494
- t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, dn(Object.assign({}, i, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: a, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, dn(Object.assign({}, i, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
495
- }
496
- var Jn = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: Sr, data: {} }, Ye = { passive: !0 };
497
- function Ar(e) {
498
- var t = e.state, n = e.instance, o = e.options, r = o.scroll, s = r === void 0 ? !0 : r, a = o.resize, u = a === void 0 ? !0 : a, l = X(t.elements.popper), i = [].concat(t.scrollParents.reference, t.scrollParents.popper);
499
- return s && i.forEach(function(d) {
500
- d.addEventListener("scroll", n.update, Ye);
501
- }), u && l.addEventListener("resize", n.update, Ye), function() {
502
- s && i.forEach(function(d) {
503
- d.removeEventListener("scroll", n.update, Ye);
504
- }), u && l.removeEventListener("resize", n.update, Ye);
505
- };
506
- }
507
- var Zn = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
508
- }, effect: Ar, data: {} }, Rr = { left: "right", right: "left", bottom: "top", top: "bottom" };
509
- function nt(e) {
510
- return e.replace(/left|right|bottom|top/g, function(t) {
511
- return Rr[t];
512
- });
513
- }
514
- var Nr = { start: "end", end: "start" };
515
- function vn(e) {
516
- return e.replace(/start|end/g, function(t) {
517
- return Nr[t];
518
- });
519
- }
520
- function Bt(e) {
521
- var t = X(e), n = t.pageXOffset, o = t.pageYOffset;
522
- return { scrollLeft: n, scrollTop: o };
523
- }
524
- function Lt(e) {
525
- return Ae(me(e)).left + Bt(e).scrollLeft;
526
- }
527
- function kr(e) {
528
- var t = X(e), n = me(e), o = t.visualViewport, r = n.clientWidth, s = n.clientHeight, a = 0, u = 0;
529
- return o && (r = o.width, s = o.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (a = o.offsetLeft, u = o.offsetTop)), { width: r, height: s, x: a + Lt(e), y: u };
530
- }
531
- function $r(e) {
532
- var t, n = me(e), o = Bt(e), r = (t = e.ownerDocument) == null ? void 0 : t.body, s = Ee(n.scrollWidth, n.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), a = Ee(n.scrollHeight, n.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), u = -o.scrollLeft + Lt(e), l = -o.scrollTop;
533
- return ie(r || n).direction === "rtl" && (u += Ee(n.clientWidth, r ? r.clientWidth : 0) - s), { width: s, height: a, x: u, y: l };
534
- }
535
- function Mt(e) {
536
- var t = ie(e), n = t.overflow, o = t.overflowX, r = t.overflowY;
537
- return /auto|scroll|overlay|hidden/.test(n + r + o);
538
- }
539
- function Qn(e) {
540
- return ["html", "body", "#document"].indexOf(oe(e)) >= 0 ? e.ownerDocument.body : J(e) && Mt(e) ? e : Qn(lt(e));
541
- }
542
- function Le(e, t) {
543
- var n;
544
- t === void 0 && (t = []);
545
- var o = Qn(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), s = X(o), a = r ? [s].concat(s.visualViewport || [], Mt(o) ? o : []) : o, u = t.concat(a);
546
- return r ? u : u.concat(Le(lt(a)));
547
- }
548
- function Et(e) {
549
- return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height });
550
- }
551
- function Fr(e) {
552
- var t = Ae(e);
553
- return t.top = t.top + e.clientTop, t.left = t.left + e.clientLeft, t.bottom = t.top + e.clientHeight, t.right = t.left + e.clientWidth, t.width = e.clientWidth, t.height = e.clientHeight, t.x = t.left, t.y = t.top, t;
554
- }
555
- function mn(e, t) {
556
- return t === Kn ? Et(kr(e)) : _e(t) ? Fr(t) : Et($r(me(e)));
557
- }
558
- function xr(e) {
559
- var t = Le(lt(e)), n = ["absolute", "fixed"].indexOf(ie(e).position) >= 0, o = n && J(e) ? We(e) : e;
560
- return _e(o) ? t.filter(function(r) {
561
- return _e(r) && Vn(r, o) && oe(r) !== "body";
562
- }) : [];
563
- }
564
- function Br(e, t, n) {
565
- var o = t === "clippingParents" ? xr(e) : [].concat(t), r = [].concat(o, [n]), s = r[0], a = r.reduce(function(u, l) {
566
- var i = mn(e, l);
567
- return u.top = Ee(i.top, u.top), u.right = st(i.right, u.right), u.bottom = st(i.bottom, u.bottom), u.left = Ee(i.left, u.left), u;
568
- }, mn(e, s));
569
- return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
570
- }
571
- function Yn(e) {
572
- var t = e.reference, n = e.element, o = e.placement, r = o ? ne(o) : null, s = o ? Re(o) : null, a = t.x + t.width / 2 - n.width / 2, u = t.y + t.height / 2 - n.height / 2, l;
573
- switch (r) {
574
- case U:
575
- l = { x: a, y: t.y - n.height };
576
- break;
577
- case Z:
578
- l = { x: a, y: t.y + t.height };
579
- break;
580
- case Q:
581
- l = { x: t.x + t.width, y: u };
582
- break;
583
- case V:
584
- l = { x: t.x - n.width, y: u };
585
- break;
586
- default:
587
- l = { x: t.x, y: t.y };
588
- }
589
- var i = r ? xt(r) : null;
590
- if (i != null) {
591
- var d = i === "y" ? "height" : "width";
592
- switch (s) {
593
- case Pe:
594
- l[i] = l[i] - (t[d] / 2 - n[d] / 2);
595
- break;
596
- case je:
597
- l[i] = l[i] + (t[d] / 2 - n[d] / 2);
598
- break;
599
- }
600
- }
601
- return l;
602
- }
603
- function He(e, t) {
604
- t === void 0 && (t = {});
605
- var n = t, o = n.placement, r = o === void 0 ? e.placement : o, s = n.boundary, a = s === void 0 ? sr : s, u = n.rootBoundary, l = u === void 0 ? Kn : u, i = n.elementContext, d = i === void 0 ? Fe : i, g = n.altBoundary, y = g === void 0 ? !1 : g, h = n.padding, f = h === void 0 ? 0 : h, p = zn(typeof f != "number" ? f : qn(f, Ve)), m = d === Fe ? ar : Fe, c = e.rects.popper, w = e.elements[y ? m : d], C = Br(_e(w) ? w : w.contextElement || me(e.elements.popper), a, l), b = Ae(e.elements.reference), I = Yn({ reference: b, element: c, strategy: "absolute", placement: r }), _ = Et(Object.assign({}, c, I)), O = d === Fe ? _ : b, P = { top: C.top - O.top + p.top, bottom: O.bottom - C.bottom + p.bottom, left: C.left - O.left + p.left, right: O.right - C.right + p.right }, k = e.modifiersData.offset;
606
- if (d === Fe && k) {
607
- var R = k[r];
608
- Object.keys(P).forEach(function($) {
609
- var N = [Q, Z].indexOf($) >= 0 ? 1 : -1, F = [U, Z].indexOf($) >= 0 ? "y" : "x";
610
- P[$] += R[F] * N;
611
- });
612
- }
613
- return P;
614
- }
615
- function Lr(e, t) {
616
- t === void 0 && (t = {});
617
- var n = t, o = n.placement, r = n.boundary, s = n.rootBoundary, a = n.padding, u = n.flipVariations, l = n.allowedAutoPlacements, i = l === void 0 ? kt : l, d = Re(o), g = d ? u ? pn : pn.filter(function(f) {
618
- return Re(f) === d;
619
- }) : Ve, y = g.filter(function(f) {
620
- return i.indexOf(f) >= 0;
621
- });
622
- y.length === 0 && (y = g);
623
- var h = y.reduce(function(f, p) {
624
- return f[p] = He(e, { placement: p, boundary: r, rootBoundary: s, padding: a })[ne(p)], f;
625
- }, {});
626
- return Object.keys(h).sort(function(f, p) {
627
- return h[f] - h[p];
628
- });
629
- }
630
- function Mr(e) {
631
- if (ne(e) === Nt) return [];
632
- var t = nt(e);
633
- return [vn(e), t, vn(t)];
634
- }
635
- function Dr(e) {
636
- var t = e.state, n = e.options, o = e.name;
637
- if (!t.modifiersData[o]._skip) {
638
- for (var r = n.mainAxis, s = r === void 0 ? !0 : r, a = n.altAxis, u = a === void 0 ? !0 : a, l = n.fallbackPlacements, i = n.padding, d = n.boundary, g = n.rootBoundary, y = n.altBoundary, h = n.flipVariations, f = h === void 0 ? !0 : h, p = n.allowedAutoPlacements, m = t.options.placement, c = ne(m), w = c === m, C = l || (w || !f ? [nt(m)] : Mr(m)), b = [m].concat(C).reduce(function(ge, re) {
639
- return ge.concat(ne(re) === Nt ? Lr(t, { placement: re, boundary: d, rootBoundary: g, padding: i, flipVariations: f, allowedAutoPlacements: p }) : re);
640
- }, []), I = t.rects.reference, _ = t.rects.popper, O = /* @__PURE__ */ new Map(), P = !0, k = b[0], R = 0; R < b.length; R++) {
641
- var $ = b[R], N = ne($), F = Re($) === Pe, j = [U, Z].indexOf(N) >= 0, M = j ? "width" : "height", x = He(t, { placement: $, boundary: d, rootBoundary: g, altBoundary: y, padding: i }), E = j ? F ? Q : V : F ? Z : U;
642
- I[M] > _[M] && (E = nt(E));
643
- var H = nt(E), te = [];
644
- if (s && te.push(x[N] <= 0), u && te.push(x[E] <= 0, x[H] <= 0), te.every(function(ge) {
645
- return ge;
646
- })) {
647
- k = $, P = !1;
648
- break;
649
- }
650
- O.set($, te);
651
- }
652
- if (P) for (var ze = f ? 3 : 1, ct = function(ge) {
653
- var re = b.find(function(Je) {
654
- var $e = O.get(Je);
655
- if ($e) return $e.slice(0, ge).every(function(Te) {
656
- return Te;
657
- });
658
- });
659
- if (re) return k = re, "break";
660
- }, ke = ze; ke > 0; ke--) {
661
- var qe = ct(ke);
662
- if (qe === "break") break;
663
- }
664
- t.placement !== k && (t.modifiersData[o]._skip = !0, t.placement = k, t.reset = !0);
665
- }
666
- }
667
- var jr = { name: "flip", enabled: !0, phase: "main", fn: Dr, requiresIfExists: ["offset"], data: { _skip: !1 } };
668
- function gn(e, t, n) {
669
- return n === void 0 && (n = { x: 0, y: 0 }), { top: e.top - t.height - n.y, right: e.right - t.width + n.x, bottom: e.bottom - t.height + n.y, left: e.left - t.width - n.x };
670
- }
671
- function yn(e) {
672
- return [U, Q, Z, V].some(function(t) {
673
- return e[t] >= 0;
674
- });
675
- }
676
- function Hr(e) {
677
- var t = e.state, n = e.name, o = t.rects.reference, r = t.rects.popper, s = t.modifiersData.preventOverflow, a = He(t, { elementContext: "reference" }), u = He(t, { altBoundary: !0 }), l = gn(a, o), i = gn(u, r, s), d = yn(l), g = yn(i);
678
- t.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: i, isReferenceHidden: d, hasPopperEscaped: g }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": d, "data-popper-escaped": g });
679
- }
680
- var Kr = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: Hr };
681
- function Ur(e, t, n) {
682
- var o = ne(e), r = [V, U].indexOf(o) >= 0 ? -1 : 1, s = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, a = s[0], u = s[1];
683
- return a = a || 0, u = (u || 0) * r, [V, Q].indexOf(o) >= 0 ? { x: u, y: a } : { x: a, y: u };
684
- }
685
- function Vr(e) {
686
- var t = e.state, n = e.options, o = e.name, r = n.offset, s = r === void 0 ? [0, 0] : r, a = kt.reduce(function(d, g) {
687
- return d[g] = Ur(g, t.rects, s), d;
688
- }, {}), u = a[t.placement], l = u.x, i = u.y;
689
- t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += i), t.modifiersData[o] = a;
690
- }
691
- var Wr = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: Vr };
692
- function zr(e) {
693
- var t = e.state, n = e.name;
694
- t.modifiersData[n] = Yn({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement });
695
- }
696
- var Gn = { name: "popperOffsets", enabled: !0, phase: "read", fn: zr, data: {} };
697
- function qr(e) {
698
- return e === "x" ? "y" : "x";
699
- }
700
- function Jr(e) {
701
- var t = e.state, n = e.options, o = e.name, r = n.mainAxis, s = r === void 0 ? !0 : r, a = n.altAxis, u = a === void 0 ? !1 : a, l = n.boundary, i = n.rootBoundary, d = n.altBoundary, g = n.padding, y = n.tether, h = y === void 0 ? !0 : y, f = n.tetherOffset, p = f === void 0 ? 0 : f, m = He(t, { boundary: l, rootBoundary: i, padding: g, altBoundary: d }), c = ne(t.placement), w = Re(t.placement), C = !w, b = xt(c), I = qr(b), _ = t.modifiersData.popperOffsets, O = t.rects.reference, P = t.rects.popper, k = typeof p == "function" ? p(Object.assign({}, t.rects, { placement: t.placement })) : p, R = typeof k == "number" ? { mainAxis: k, altAxis: k } : Object.assign({ mainAxis: 0, altAxis: 0 }, k), $ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, N = { x: 0, y: 0 };
702
- if (_) {
703
- if (s) {
704
- var F, j = b === "y" ? U : V, M = b === "y" ? Z : Q, x = b === "y" ? "height" : "width", E = _[b], H = E + m[j], te = E - m[M], ze = h ? -P[x] / 2 : 0, ct = w === Pe ? O[x] : P[x], ke = w === Pe ? -P[x] : -O[x], qe = t.elements.arrow, ge = h && qe ? Ft(qe) : { width: 0, height: 0 }, re = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Wn(), Je = re[j], $e = re[M], Te = Be(0, O[x], ge[x]), uo = C ? O[x] / 2 - ze - Te - Je - R.mainAxis : ct - Te - Je - R.mainAxis, co = C ? -O[x] / 2 + ze + Te + $e + R.mainAxis : ke + Te + $e + R.mainAxis, pt = t.elements.arrow && We(t.elements.arrow), po = pt ? b === "y" ? pt.clientTop || 0 : pt.clientLeft || 0 : 0, Vt = (F = $ == null ? void 0 : $[b]) != null ? F : 0, fo = E + uo - Vt - po, vo = E + co - Vt, Wt = Be(h ? st(H, fo) : H, E, h ? Ee(te, vo) : te);
705
- _[b] = Wt, N[b] = Wt - E;
706
- }
707
- if (u) {
708
- var zt, mo = b === "x" ? U : V, go = b === "x" ? Z : Q, ye = _[I], Ze = I === "y" ? "height" : "width", qt = ye + m[mo], Jt = ye - m[go], ft = [U, V].indexOf(c) !== -1, Zt = (zt = $ == null ? void 0 : $[I]) != null ? zt : 0, Qt = ft ? qt : ye - O[Ze] - P[Ze] - Zt + R.altAxis, Yt = ft ? ye + O[Ze] + P[Ze] - Zt - R.altAxis : Jt, Gt = h && ft ? Er(Qt, ye, Yt) : Be(h ? Qt : qt, ye, h ? Yt : Jt);
709
- _[I] = Gt, N[I] = Gt - ye;
710
- }
711
- t.modifiersData[o] = N;
712
- }
713
- }
714
- var Zr = { name: "preventOverflow", enabled: !0, phase: "main", fn: Jr, requiresIfExists: ["offset"] };
715
- function Qr(e) {
716
- return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop };
717
- }
718
- function Yr(e) {
719
- return e === X(e) || !J(e) ? Bt(e) : Qr(e);
720
- }
721
- function Gr(e) {
722
- var t = e.getBoundingClientRect(), n = Se(t.width) / e.offsetWidth || 1, o = Se(t.height) / e.offsetHeight || 1;
723
- return n !== 1 || o !== 1;
724
- }
725
- function Xr(e, t, n) {
726
- n === void 0 && (n = !1);
727
- var o = J(t), r = J(t) && Gr(t), s = me(t), a = Ae(e, r), u = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 };
728
- return (o || !o && !n) && ((oe(t) !== "body" || Mt(s)) && (u = Yr(t)), J(t) ? (l = Ae(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : s && (l.x = Lt(s))), { x: a.left + u.scrollLeft - l.x, y: a.top + u.scrollTop - l.y, width: a.width, height: a.height };
729
- }
730
- function es(e) {
731
- var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), o = [];
732
- e.forEach(function(s) {
733
- t.set(s.name, s);
734
- });
735
- function r(s) {
736
- n.add(s.name);
737
- var a = [].concat(s.requires || [], s.requiresIfExists || []);
738
- a.forEach(function(u) {
739
- if (!n.has(u)) {
740
- var l = t.get(u);
741
- l && r(l);
742
- }
743
- }), o.push(s);
744
- }
745
- return e.forEach(function(s) {
746
- n.has(s.name) || r(s);
747
- }), o;
748
- }
749
- function ts(e) {
750
- var t = es(e);
751
- return gr.reduce(function(n, o) {
752
- return n.concat(t.filter(function(r) {
753
- return r.phase === o;
754
- }));
755
- }, []);
756
- }
757
- function ns(e) {
758
- var t;
759
- return function() {
760
- return t || (t = new Promise(function(n) {
761
- Promise.resolve().then(function() {
762
- t = void 0, n(e());
763
- });
764
- })), t;
765
- };
766
- }
767
- function os(e) {
768
- var t = e.reduce(function(n, o) {
769
- var r = n[o.name];
770
- return n[o.name] = r ? Object.assign({}, r, o, { options: Object.assign({}, r.options, o.options), data: Object.assign({}, r.data, o.data) }) : o, n;
771
- }, {});
772
- return Object.keys(t).map(function(n) {
773
- return t[n];
774
- });
775
- }
776
- var hn = { placement: "bottom", modifiers: [], strategy: "absolute" };
777
- function bn() {
778
- for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
779
- return !t.some(function(o) {
780
- return !(o && typeof o.getBoundingClientRect == "function");
781
- });
782
- }
783
- function Dt(e) {
784
- e === void 0 && (e = {});
785
- var t = e, n = t.defaultModifiers, o = n === void 0 ? [] : n, r = t.defaultOptions, s = r === void 0 ? hn : r;
786
- return function(a, u, l) {
787
- l === void 0 && (l = s);
788
- var i = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, hn, s), modifiersData: {}, elements: { reference: a, popper: u }, attributes: {}, styles: {} }, d = [], g = !1, y = { state: i, setOptions: function(p) {
789
- var m = typeof p == "function" ? p(i.options) : p;
790
- f(), i.options = Object.assign({}, s, i.options, m), i.scrollParents = { reference: _e(a) ? Le(a) : a.contextElement ? Le(a.contextElement) : [], popper: Le(u) };
791
- var c = ts(os([].concat(o, i.options.modifiers)));
792
- return i.orderedModifiers = c.filter(function(w) {
793
- return w.enabled;
794
- }), h(), y.update();
795
- }, forceUpdate: function() {
796
- if (!g) {
797
- var p = i.elements, m = p.reference, c = p.popper;
798
- if (bn(m, c)) {
799
- i.rects = { reference: Xr(m, We(c), i.options.strategy === "fixed"), popper: Ft(c) }, i.reset = !1, i.placement = i.options.placement, i.orderedModifiers.forEach(function(P) {
800
- return i.modifiersData[P.name] = Object.assign({}, P.data);
801
- });
802
- for (var w = 0; w < i.orderedModifiers.length; w++) {
803
- if (i.reset === !0) {
804
- i.reset = !1, w = -1;
805
- continue;
806
- }
807
- var C = i.orderedModifiers[w], b = C.fn, I = C.options, _ = I === void 0 ? {} : I, O = C.name;
808
- typeof b == "function" && (i = b({ state: i, options: _, name: O, instance: y }) || i);
809
- }
810
- }
811
- }
812
- }, update: ns(function() {
813
- return new Promise(function(p) {
814
- y.forceUpdate(), p(i);
815
- });
816
- }), destroy: function() {
817
- f(), g = !0;
818
- } };
819
- if (!bn(a, u)) return y;
820
- y.setOptions(l).then(function(p) {
821
- !g && l.onFirstUpdate && l.onFirstUpdate(p);
822
- });
823
- function h() {
824
- i.orderedModifiers.forEach(function(p) {
825
- var m = p.name, c = p.options, w = c === void 0 ? {} : c, C = p.effect;
826
- if (typeof C == "function") {
827
- var b = C({ state: i, name: m, instance: y, options: w }), I = function() {
828
- };
829
- d.push(b || I);
830
- }
831
- });
832
- }
833
- function f() {
834
- d.forEach(function(p) {
835
- return p();
836
- }), d = [];
837
- }
838
- return y;
839
- };
840
- }
841
- Dt();
842
- var rs = [Zn, Gn, Jn, Un];
843
- Dt({ defaultModifiers: rs });
844
- var ss = [Zn, Gn, Jn, Un, Wr, jr, Zr, Ir, Kr], as = Dt({ defaultModifiers: ss });
845
- const is = (e, t, n = {}) => {
846
- const o = {
847
- name: "updateState",
848
- enabled: !0,
849
- phase: "write",
850
- fn: ({ state: l }) => {
851
- const i = ls(l);
852
- Object.assign(a.value, i);
853
- },
854
- requires: ["computeStyles"]
855
- }, r = T(() => {
856
- const { onFirstUpdate: l, placement: i, strategy: d, modifiers: g } = v(n);
857
- return {
858
- onFirstUpdate: l,
859
- placement: i || "bottom",
860
- strategy: d || "absolute",
861
- modifiers: [
862
- ...g || [],
863
- o,
864
- { name: "applyStyles", enabled: !1 }
865
- ]
866
- };
867
- }), s = Oo(), a = A({
868
- styles: {
869
- popper: {
870
- position: v(r).strategy,
871
- left: "0",
872
- top: "0"
873
- },
874
- arrow: {
875
- position: "absolute"
876
- }
877
- },
878
- attributes: {}
879
- }), u = () => {
880
- s.value && (s.value.destroy(), s.value = void 0);
881
- };
882
- return L(r, (l) => {
883
- const i = v(s);
884
- i && i.setOptions(l);
885
- }, {
886
- deep: !0
887
- }), L([e, t], ([l, i]) => {
888
- u(), !(!l || !i) && (s.value = as(l, i, v(r)));
889
- }), le(() => {
890
- u();
891
- }), {
892
- state: T(() => {
893
- var l;
894
- return { ...((l = v(s)) == null ? void 0 : l.state) || {} };
895
- }),
896
- styles: T(() => v(a).styles),
897
- attributes: T(() => v(a).attributes),
898
- update: () => {
899
- var l;
900
- return (l = v(s)) == null ? void 0 : l.update();
901
- },
902
- forceUpdate: () => {
903
- var l;
904
- return (l = v(s)) == null ? void 0 : l.forceUpdate();
905
- },
906
- instanceRef: T(() => v(s))
907
- };
908
- };
909
- function ls(e) {
910
- const t = Object.keys(e.elements), n = wt(t.map((r) => [r, e.styles[r] || {}])), o = wt(t.map((r) => [r, e.attributes[r]]));
911
- return {
912
- styles: n,
913
- attributes: o
914
- };
915
- }
916
- function wn() {
917
- let e;
918
- const t = (o, r) => {
919
- n(), e = window.setTimeout(o, r);
920
- }, n = () => window.clearTimeout(e);
921
- return Mn(() => n()), {
922
- registerTimeout: t,
923
- cancelTimeout: n
924
- };
925
- }
926
- const Ot = {
927
- prefix: Math.floor(Math.random() * 1e4),
928
- current: 0
929
- }, us = Symbol("elIdInjection"), Xn = () => at() ? G(us, Ot) : Ot, cs = (e) => {
930
- const t = Xn();
931
- !Y && t === Ot && ot("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
932
- usage: app.provide(ID_INJECTION_KEY, {
933
- prefix: number,
934
- current: number,
935
- })`);
936
- const n = Rt();
937
- return T(() => v(e) || `${n.value}-id-${t.prefix}-${t.current++}`);
938
- };
939
- let Ie = [];
940
- const En = (e) => {
941
- const t = e;
942
- t.key === rt.esc && Ie.forEach((n) => n(t));
943
- }, ps = (e) => {
944
- ve(() => {
945
- Ie.length === 0 && document.addEventListener("keydown", En), Y && Ie.push(e);
946
- }), le(() => {
947
- Ie = Ie.filter((t) => t !== e), Ie.length === 0 && Y && document.removeEventListener("keydown", En);
948
- });
949
- };
950
- let On;
951
- const eo = () => {
952
- const e = Rt(), t = Xn(), n = T(() => `${e.value}-popper-container-${t.prefix}`), o = T(() => `#${n.value}`);
953
- return {
954
- id: n,
955
- selector: o
956
- };
957
- }, fs = (e) => {
958
- const t = document.createElement("div");
959
- return t.id = e, document.body.appendChild(t), t;
960
- }, ds = () => {
961
- const { id: e, selector: t } = eo();
962
- return To(() => {
963
- Y && (process.env.NODE_ENV === "test" || !On && !document.body.querySelector(t.value)) && (On = fs(e.value));
964
- }), {
965
- id: e,
966
- selector: t
967
- };
968
- }, vs = z({
969
- showAfter: {
970
- type: Number,
971
- default: 0
972
- },
973
- hideAfter: {
974
- type: Number,
975
- default: 200
976
- },
977
- autoClose: {
978
- type: Number,
979
- default: 0
980
- }
981
- }), ms = ({
982
- showAfter: e,
983
- hideAfter: t,
984
- autoClose: n,
985
- open: o,
986
- close: r
987
- }) => {
988
- const { registerTimeout: s } = wn(), {
989
- registerTimeout: a,
990
- cancelTimeout: u
991
- } = wn();
992
- return {
993
- onOpen: (d) => {
994
- s(() => {
995
- o(d);
996
- const g = v(n);
997
- Me(g) && g > 0 && a(() => {
998
- r(d);
999
- }, g);
1000
- }, v(e));
1001
- },
1002
- onClose: (d) => {
1003
- u(), s(() => {
1004
- r(d);
1005
- }, v(t));
1006
- }
1007
- };
1008
- }, to = Symbol("elForwardRef"), gs = (e) => {
1009
- fe(to, {
1010
- setForwardRef: (n) => {
1011
- e.value = n;
1012
- }
1013
- });
1014
- }, ys = (e) => ({
1015
- mounted(t) {
1016
- e(t);
1017
- },
1018
- updated(t) {
1019
- e(t);
1020
- },
1021
- unmounted() {
1022
- e(null);
1023
- }
1024
- }), Tn = A(0), hs = 2e3, bs = Symbol("zIndexContextKey"), ws = (e) => {
1025
- const t = at() ? G(bs, void 0) : void 0, n = T(() => {
1026
- const s = v(t);
1027
- return Me(s) ? s : hs;
1028
- }), o = T(() => n.value + Tn.value);
1029
- return {
1030
- initialZIndex: n,
1031
- currentZIndex: o,
1032
- nextZIndex: () => (Tn.value++, o.value)
1033
- };
1034
- };
1035
- var ee = (e, t) => {
1036
- const n = e.__vccOpts || e;
1037
- for (const [o, r] of t)
1038
- n[o] = r;
1039
- return n;
1040
- };
1041
- const Cn = Symbol("formItemContextKey"), jt = Symbol("popper"), no = Symbol("popperContent"), Es = [
1042
- "dialog",
1043
- "grid",
1044
- "group",
1045
- "listbox",
1046
- "menu",
1047
- "navigation",
1048
- "tooltip",
1049
- "tree"
1050
- ], oo = z({
1051
- role: {
1052
- type: String,
1053
- values: Es,
1054
- default: "tooltip"
1055
- }
1056
- }), Os = B({
1057
- name: "ElPopper",
1058
- inheritAttrs: !1
1059
- }), Ts = /* @__PURE__ */ B({
1060
- ...Os,
1061
- props: oo,
1062
- setup(e, { expose: t }) {
1063
- const n = e, o = A(), r = A(), s = A(), a = A(), u = T(() => n.role), l = {
1064
- triggerRef: o,
1065
- popperInstanceRef: r,
1066
- contentRef: s,
1067
- referenceRef: a,
1068
- role: u
1069
- };
1070
- return t(l), fe(jt, l), (i, d) => W(i.$slots, "default");
1071
- }
1072
- });
1073
- var Cs = /* @__PURE__ */ ee(Ts, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]);
1074
- const ro = z({
1075
- arrowOffset: {
1076
- type: Number,
1077
- default: 5
1078
- }
1079
- }), Is = B({
1080
- name: "ElPopperArrow",
1081
- inheritAttrs: !1
1082
- }), Ps = /* @__PURE__ */ B({
1083
- ...Is,
1084
- props: ro,
1085
- setup(e, { expose: t }) {
1086
- const n = e, o = Ne("popper"), { arrowOffset: r, arrowRef: s, arrowStyle: a } = G(no, void 0);
1087
- return L(() => n.arrowOffset, (u) => {
1088
- r.value = u;
1089
- }), le(() => {
1090
- s.value = void 0;
1091
- }), t({
1092
- arrowRef: s
1093
- }), (u, l) => (D(), pe("span", {
1094
- ref_key: "arrowRef",
1095
- ref: s,
1096
- class: Tt(v(o).e("arrow")),
1097
- style: Co(v(a)),
1098
- "data-popper-arrow": ""
1099
- }, null, 6));
1100
- }
1101
- });
1102
- var _s = /* @__PURE__ */ ee(Ps, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]);
1103
- const mt = "ElOnlyChild", Ss = B({
1104
- name: mt,
1105
- setup(e, {
1106
- slots: t,
1107
- attrs: n
1108
- }) {
1109
- var o;
1110
- const r = G(to), s = ys((o = r == null ? void 0 : r.setForwardRef) != null ? o : bt);
1111
- return () => {
1112
- var a;
1113
- const u = (a = t.default) == null ? void 0 : a.call(t, n);
1114
- if (!u)
1115
- return null;
1116
- if (u.length > 1)
1117
- return ot(mt, "requires exact only one valid child."), null;
1118
- const l = so(u);
1119
- return l ? Ct(Io(l, n), [[s]]) : (ot(mt, "no valid child node found"), null);
1120
- };
1121
- }
1122
- });
1123
- function so(e) {
1124
- if (!e)
1125
- return null;
1126
- const t = e;
1127
- for (const n of t) {
1128
- if (It(n))
1129
- switch (n.type) {
1130
- case So:
1131
- continue;
1132
- case _o:
1133
- case "svg":
1134
- return In(n);
1135
- case Po:
1136
- return so(n.children);
1137
- default:
1138
- return n;
1139
- }
1140
- return In(n);
1141
- }
1142
- return null;
1143
- }
1144
- function In(e) {
1145
- const t = Ne("only-child");
1146
- return Oe("span", {
1147
- class: t.e("content")
1148
- }, [e]);
1149
- }
1150
- const ao = z({
1151
- virtualRef: {
1152
- type: S(Object)
1153
- },
1154
- virtualTriggering: Boolean,
1155
- onMouseenter: {
1156
- type: S(Function)
1157
- },
1158
- onMouseleave: {
1159
- type: S(Function)
1160
- },
1161
- onClick: {
1162
- type: S(Function)
1163
- },
1164
- onKeydown: {
1165
- type: S(Function)
1166
- },
1167
- onFocus: {
1168
- type: S(Function)
1169
- },
1170
- onBlur: {
1171
- type: S(Function)
1172
- },
1173
- onContextmenu: {
1174
- type: S(Function)
1175
- },
1176
- id: String,
1177
- open: Boolean
1178
- }), As = B({
1179
- name: "ElPopperTrigger",
1180
- inheritAttrs: !1
1181
- }), Rs = /* @__PURE__ */ B({
1182
- ...As,
1183
- props: ao,
1184
- setup(e, { expose: t }) {
1185
- const n = e, { role: o, triggerRef: r } = G(jt, void 0);
1186
- gs(r);
1187
- const s = T(() => u.value ? n.id : void 0), a = T(() => {
1188
- if (o && o.value === "tooltip")
1189
- return n.open && n.id ? n.id : void 0;
1190
- }), u = T(() => {
1191
- if (o && o.value !== "tooltip")
1192
- return o.value;
1193
- }), l = T(() => u.value ? `${n.open}` : void 0);
1194
- let i;
1195
- return ve(() => {
1196
- L(() => n.virtualRef, (d) => {
1197
- d && (r.value = we(d));
1198
- }, {
1199
- immediate: !0
1200
- }), L(r, (d, g) => {
1201
- i == null || i(), i = void 0, De(d) && ([
1202
- "onMouseenter",
1203
- "onMouseleave",
1204
- "onClick",
1205
- "onKeydown",
1206
- "onFocus",
1207
- "onBlur",
1208
- "onContextmenu"
1209
- ].forEach((y) => {
1210
- var h;
1211
- const f = n[y];
1212
- f && (d.addEventListener(y.slice(2).toLowerCase(), f), (h = g == null ? void 0 : g.removeEventListener) == null || h.call(g, y.slice(2).toLowerCase(), f));
1213
- }), i = L([s, a, u, l], (y) => {
1214
- [
1215
- "aria-controls",
1216
- "aria-describedby",
1217
- "aria-haspopup",
1218
- "aria-expanded"
1219
- ].forEach((h, f) => {
1220
- Pt(y[f]) ? d.removeAttribute(h) : d.setAttribute(h, y[f]);
1221
- });
1222
- }, { immediate: !0 })), De(g) && [
1223
- "aria-controls",
1224
- "aria-describedby",
1225
- "aria-haspopup",
1226
- "aria-expanded"
1227
- ].forEach((y) => g.removeAttribute(y));
1228
- }, {
1229
- immediate: !0
1230
- });
1231
- }), le(() => {
1232
- i == null || i(), i = void 0;
1233
- }), t({
1234
- triggerRef: r
1235
- }), (d, g) => d.virtualTriggering ? ae("v-if", !0) : (D(), de(v(Ss), Ue({ key: 0 }, d.$attrs, {
1236
- "aria-controls": v(s),
1237
- "aria-describedby": v(a),
1238
- "aria-expanded": v(l),
1239
- "aria-haspopup": v(u)
1240
- }), {
1241
- default: K(() => [
1242
- W(d.$slots, "default")
1243
- ]),
1244
- _: 3
1245
- }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
1246
- }
1247
- });
1248
- var Ns = /* @__PURE__ */ ee(Rs, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);
1249
- const gt = "focus-trap.focus-after-trapped", yt = "focus-trap.focus-after-released", ks = "focus-trap.focusout-prevented", Pn = {
1250
- cancelable: !0,
1251
- bubbles: !1
1252
- }, $s = {
1253
- cancelable: !0,
1254
- bubbles: !1
1255
- }, _n = "focusAfterTrapped", Sn = "focusAfterReleased", Fs = Symbol("elFocusTrap"), Ht = A(), ut = A(0), Kt = A(0);
1256
- let Ge = 0;
1257
- const io = (e) => {
1258
- const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
1259
- acceptNode: (o) => {
1260
- const r = o.tagName === "INPUT" && o.type === "hidden";
1261
- return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 || o === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1262
- }
1263
- });
1264
- for (; n.nextNode(); )
1265
- t.push(n.currentNode);
1266
- return t;
1267
- }, An = (e, t) => {
1268
- for (const n of e)
1269
- if (!xs(n, t))
1270
- return n;
1271
- }, xs = (e, t) => {
1272
- if (process.env.NODE_ENV === "test")
1273
- return !1;
1274
- if (getComputedStyle(e).visibility === "hidden")
1275
- return !0;
1276
- for (; e; ) {
1277
- if (t && e === t)
1278
- return !1;
1279
- if (getComputedStyle(e).display === "none")
1280
- return !0;
1281
- e = e.parentElement;
1282
- }
1283
- return !1;
1284
- }, Bs = (e) => {
1285
- const t = io(e), n = An(t, e), o = An(t.reverse(), e);
1286
- return [n, o];
1287
- }, Ls = (e) => e instanceof HTMLInputElement && "select" in e, ue = (e, t) => {
1288
- if (e && e.focus) {
1289
- const n = document.activeElement;
1290
- e.focus({ preventScroll: !0 }), Kt.value = window.performance.now(), e !== n && Ls(e) && t && e.select();
1291
- }
1292
- };
1293
- function Rn(e, t) {
1294
- const n = [...e], o = e.indexOf(t);
1295
- return o !== -1 && n.splice(o, 1), n;
1296
- }
1297
- const Ms = () => {
1298
- let e = [];
1299
- return {
1300
- push: (o) => {
1301
- const r = e[0];
1302
- r && o !== r && r.pause(), e = Rn(e, o), e.unshift(o);
1303
- },
1304
- remove: (o) => {
1305
- var r, s;
1306
- e = Rn(e, o), (s = (r = e[0]) == null ? void 0 : r.resume) == null || s.call(r);
1307
- }
1308
- };
1309
- }, Ds = (e, t = !1) => {
1310
- const n = document.activeElement;
1311
- for (const o of e)
1312
- if (ue(o, t), document.activeElement !== n)
1313
- return;
1314
- }, Nn = Ms(), js = () => ut.value > Kt.value, Xe = () => {
1315
- Ht.value = "pointer", ut.value = window.performance.now();
1316
- }, kn = () => {
1317
- Ht.value = "keyboard", ut.value = window.performance.now();
1318
- }, Hs = () => (ve(() => {
1319
- Ge === 0 && (document.addEventListener("mousedown", Xe), document.addEventListener("touchstart", Xe), document.addEventListener("keydown", kn)), Ge++;
1320
- }), le(() => {
1321
- Ge--, Ge <= 0 && (document.removeEventListener("mousedown", Xe), document.removeEventListener("touchstart", Xe), document.removeEventListener("keydown", kn));
1322
- }), {
1323
- focusReason: Ht,
1324
- lastUserFocusTimestamp: ut,
1325
- lastAutomatedFocusTimestamp: Kt
1326
- }), et = (e) => new CustomEvent(ks, {
1327
- ...$s,
1328
- detail: e
1329
- }), Ks = B({
1330
- name: "ElFocusTrap",
1331
- inheritAttrs: !1,
1332
- props: {
1333
- loop: Boolean,
1334
- trapped: Boolean,
1335
- focusTrapEl: Object,
1336
- focusStartEl: {
1337
- type: [Object, String],
1338
- default: "first"
1339
- }
1340
- },
1341
- emits: [
1342
- _n,
1343
- Sn,
1344
- "focusin",
1345
- "focusout",
1346
- "focusout-prevented",
1347
- "release-requested"
1348
- ],
1349
- setup(e, { emit: t }) {
1350
- const n = A();
1351
- let o, r;
1352
- const { focusReason: s } = Hs();
1353
- ps((f) => {
1354
- e.trapped && !a.paused && t("release-requested", f);
1355
- });
1356
- const a = {
1357
- paused: !1,
1358
- pause() {
1359
- this.paused = !0;
1360
- },
1361
- resume() {
1362
- this.paused = !1;
1363
- }
1364
- }, u = (f) => {
1365
- if (!e.loop && !e.trapped || a.paused)
1366
- return;
1367
- const { key: p, altKey: m, ctrlKey: c, metaKey: w, currentTarget: C, shiftKey: b } = f, { loop: I } = e, _ = p === rt.tab && !m && !c && !w, O = document.activeElement;
1368
- if (_ && O) {
1369
- const P = C, [k, R] = Bs(P);
1370
- if (k && R) {
1371
- if (!b && O === R) {
1372
- const N = et({
1373
- focusReason: s.value
1374
- });
1375
- t("focusout-prevented", N), N.defaultPrevented || (f.preventDefault(), I && ue(k, !0));
1376
- } else if (b && [k, P].includes(O)) {
1377
- const N = et({
1378
- focusReason: s.value
1379
- });
1380
- t("focusout-prevented", N), N.defaultPrevented || (f.preventDefault(), I && ue(R, !0));
1381
- }
1382
- } else if (O === P) {
1383
- const N = et({
1384
- focusReason: s.value
1385
- });
1386
- t("focusout-prevented", N), N.defaultPrevented || f.preventDefault();
1387
- }
1388
- }
1389
- };
1390
- fe(Fs, {
1391
- focusTrapRef: n,
1392
- onKeydown: u
1393
- }), L(() => e.focusTrapEl, (f) => {
1394
- f && (n.value = f);
1395
- }, { immediate: !0 }), L([n], ([f], [p]) => {
1396
- f && (f.addEventListener("keydown", u), f.addEventListener("focusin", d), f.addEventListener("focusout", g)), p && (p.removeEventListener("keydown", u), p.removeEventListener("focusin", d), p.removeEventListener("focusout", g));
1397
- });
1398
- const l = (f) => {
1399
- t(_n, f);
1400
- }, i = (f) => t(Sn, f), d = (f) => {
1401
- const p = v(n);
1402
- if (!p)
1403
- return;
1404
- const m = f.target, c = f.relatedTarget, w = m && p.contains(m);
1405
- e.trapped || c && p.contains(c) || (o = c), w && t("focusin", f), !a.paused && e.trapped && (w ? r = m : ue(r, !0));
1406
- }, g = (f) => {
1407
- const p = v(n);
1408
- if (!(a.paused || !p))
1409
- if (e.trapped) {
1410
- const m = f.relatedTarget;
1411
- !Pt(m) && !p.contains(m) && setTimeout(() => {
1412
- if (!a.paused && e.trapped) {
1413
- const c = et({
1414
- focusReason: s.value
1415
- });
1416
- t("focusout-prevented", c), c.defaultPrevented || ue(r, !0);
1417
- }
1418
- }, 0);
1419
- } else {
1420
- const m = f.target;
1421
- m && p.contains(m) || t("focusout", f);
1422
- }
1423
- };
1424
- async function y() {
1425
- await en();
1426
- const f = v(n);
1427
- if (f) {
1428
- Nn.push(a);
1429
- const p = f.contains(document.activeElement) ? o : document.activeElement;
1430
- if (o = p, !f.contains(p)) {
1431
- const c = new Event(gt, Pn);
1432
- f.addEventListener(gt, l), f.dispatchEvent(c), c.defaultPrevented || en(() => {
1433
- let w = e.focusStartEl;
1434
- it(w) || (ue(w), document.activeElement !== w && (w = "first")), w === "first" && Ds(io(f), !0), (document.activeElement === p || w === "container") && ue(f);
1435
- });
1436
- }
1437
- }
1438
- }
1439
- function h() {
1440
- const f = v(n);
1441
- if (f) {
1442
- f.removeEventListener(gt, l);
1443
- const p = new CustomEvent(yt, {
1444
- ...Pn,
1445
- detail: {
1446
- focusReason: s.value
1447
- }
1448
- });
1449
- f.addEventListener(yt, i), f.dispatchEvent(p), !p.defaultPrevented && (s.value == "keyboard" || !js() || f.contains(document.activeElement)) && ue(o ?? document.body), f.removeEventListener(yt, i), Nn.remove(a);
1450
- }
1451
- }
1452
- return ve(() => {
1453
- e.trapped && y(), L(() => e.trapped, (f) => {
1454
- f ? y() : h();
1455
- });
1456
- }), le(() => {
1457
- e.trapped && h();
1458
- }), {
1459
- onKeydown: u
1460
- };
1461
- }
1462
- });
1463
- function Us(e, t, n, o, r, s) {
1464
- return W(e.$slots, "default", { handleKeydown: e.onKeydown });
1465
- }
1466
- var Vs = /* @__PURE__ */ ee(Ks, [["render", Us], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);
1467
- const Ws = ["fixed", "absolute"], zs = z({
1468
- boundariesPadding: {
1469
- type: Number,
1470
- default: 0
1471
- },
1472
- fallbackPlacements: {
1473
- type: S(Array),
1474
- default: void 0
1475
- },
1476
- gpuAcceleration: {
1477
- type: Boolean,
1478
- default: !0
1479
- },
1480
- offset: {
1481
- type: Number,
1482
- default: 12
1483
- },
1484
- placement: {
1485
- type: String,
1486
- values: kt,
1487
- default: "bottom"
1488
- },
1489
- popperOptions: {
1490
- type: S(Object),
1491
- default: () => ({})
1492
- },
1493
- strategy: {
1494
- type: String,
1495
- values: Ws,
1496
- default: "absolute"
1497
- }
1498
- }), lo = z({
1499
- ...zs,
1500
- id: String,
1501
- style: {
1502
- type: S([String, Array, Object])
1503
- },
1504
- className: {
1505
- type: S([String, Array, Object])
1506
- },
1507
- effect: {
1508
- type: String,
1509
- default: "dark"
1510
- },
1511
- visible: Boolean,
1512
- enterable: {
1513
- type: Boolean,
1514
- default: !0
1515
- },
1516
- pure: Boolean,
1517
- focusOnShow: {
1518
- type: Boolean,
1519
- default: !1
1520
- },
1521
- trapping: {
1522
- type: Boolean,
1523
- default: !1
1524
- },
1525
- popperClass: {
1526
- type: S([String, Array, Object])
1527
- },
1528
- popperStyle: {
1529
- type: S([String, Array, Object])
1530
- },
1531
- referenceEl: {
1532
- type: S(Object)
1533
- },
1534
- triggerTargetEl: {
1535
- type: S(Object)
1536
- },
1537
- stopPopperMouseEvent: {
1538
- type: Boolean,
1539
- default: !0
1540
- },
1541
- ariaLabel: {
1542
- type: String,
1543
- default: void 0
1544
- },
1545
- virtualTriggering: Boolean,
1546
- zIndex: Number
1547
- }), qs = {
1548
- mouseenter: (e) => e instanceof MouseEvent,
1549
- mouseleave: (e) => e instanceof MouseEvent,
1550
- focus: () => !0,
1551
- blur: () => !0,
1552
- close: () => !0
1553
- }, Js = (e, t = []) => {
1554
- const { placement: n, strategy: o, popperOptions: r } = e, s = {
1555
- placement: n,
1556
- strategy: o,
1557
- ...r,
1558
- modifiers: [...Qs(e), ...t]
1559
- };
1560
- return Ys(s, r == null ? void 0 : r.modifiers), s;
1561
- }, Zs = (e) => {
1562
- if (Y)
1563
- return we(e);
1564
- };
1565
- function Qs(e) {
1566
- const { offset: t, gpuAcceleration: n, fallbackPlacements: o } = e;
1567
- return [
1568
- {
1569
- name: "offset",
1570
- options: {
1571
- offset: [0, t ?? 12]
1572
- }
1573
- },
1574
- {
1575
- name: "preventOverflow",
1576
- options: {
1577
- padding: {
1578
- top: 2,
1579
- bottom: 2,
1580
- left: 5,
1581
- right: 5
1582
- }
1583
- }
1584
- },
1585
- {
1586
- name: "flip",
1587
- options: {
1588
- padding: 5,
1589
- fallbackPlacements: o
1590
- }
1591
- },
1592
- {
1593
- name: "computeStyles",
1594
- options: {
1595
- gpuAcceleration: n
1596
- }
1597
- }
1598
- ];
1599
- }
1600
- function Ys(e, t) {
1601
- t && (e.modifiers = [...e.modifiers, ...t ?? []]);
1602
- }
1603
- const Gs = 0, Xs = (e) => {
1604
- const { popperInstanceRef: t, contentRef: n, triggerRef: o, role: r } = G(jt, void 0), s = A(), a = A(), u = T(() => ({
1605
- name: "eventListeners",
1606
- enabled: !!e.visible
1607
- })), l = T(() => {
1608
- var c;
1609
- const w = v(s), C = (c = v(a)) != null ? c : Gs;
1610
- return {
1611
- name: "arrow",
1612
- enabled: !qo(w),
1613
- options: {
1614
- element: w,
1615
- padding: C
1616
- }
1617
- };
1618
- }), i = T(() => ({
1619
- onFirstUpdate: () => {
1620
- f();
1621
- },
1622
- ...Js(e, [
1623
- v(l),
1624
- v(u)
1625
- ])
1626
- })), d = T(() => Zs(e.referenceEl) || v(o)), { attributes: g, state: y, styles: h, update: f, forceUpdate: p, instanceRef: m } = is(d, n, i);
1627
- return L(m, (c) => t.value = c), ve(() => {
1628
- L(() => {
1629
- var c;
1630
- return (c = v(d)) == null ? void 0 : c.getBoundingClientRect();
1631
- }, () => {
1632
- f();
1633
- });
1634
- }), {
1635
- attributes: g,
1636
- arrowRef: s,
1637
- contentRef: n,
1638
- instanceRef: m,
1639
- state: y,
1640
- styles: h,
1641
- role: r,
1642
- forceUpdate: p,
1643
- update: f
1644
- };
1645
- }, ea = (e, {
1646
- attributes: t,
1647
- styles: n,
1648
- role: o
1649
- }) => {
1650
- const { nextZIndex: r } = ws(), s = Ne("popper"), a = T(() => v(t).popper), u = A(Me(e.zIndex) ? e.zIndex : r()), l = T(() => [
1651
- s.b(),
1652
- s.is("pure", e.pure),
1653
- s.is(e.effect),
1654
- e.popperClass
1655
- ]), i = T(() => [
1656
- { zIndex: v(u) },
1657
- v(n).popper,
1658
- e.popperStyle || {}
1659
- ]), d = T(() => o.value === "dialog" ? "false" : void 0), g = T(() => v(n).arrow || {});
1660
- return {
1661
- ariaModal: d,
1662
- arrowStyle: g,
1663
- contentAttrs: a,
1664
- contentClass: l,
1665
- contentStyle: i,
1666
- contentZIndex: u,
1667
- updateZIndex: () => {
1668
- u.value = Me(e.zIndex) ? e.zIndex : r();
1669
- }
1670
- };
1671
- }, ta = (e, t) => {
1672
- const n = A(!1), o = A();
1673
- return {
1674
- focusStartRef: o,
1675
- trapped: n,
1676
- onFocusAfterReleased: (i) => {
1677
- var d;
1678
- ((d = i.detail) == null ? void 0 : d.focusReason) !== "pointer" && (o.value = "first", t("blur"));
1679
- },
1680
- onFocusAfterTrapped: () => {
1681
- t("focus");
1682
- },
1683
- onFocusInTrap: (i) => {
1684
- e.visible && !n.value && (i.target && (o.value = i.target), n.value = !0);
1685
- },
1686
- onFocusoutPrevented: (i) => {
1687
- e.trapping || (i.detail.focusReason === "pointer" && i.preventDefault(), n.value = !1);
1688
- },
1689
- onReleaseRequested: () => {
1690
- n.value = !1, t("close");
1691
- }
1692
- };
1693
- }, na = B({
1694
- name: "ElPopperContent"
1695
- }), oa = /* @__PURE__ */ B({
1696
- ...na,
1697
- props: lo,
1698
- emits: qs,
1699
- setup(e, { expose: t, emit: n }) {
1700
- const o = e, {
1701
- focusStartRef: r,
1702
- trapped: s,
1703
- onFocusAfterReleased: a,
1704
- onFocusAfterTrapped: u,
1705
- onFocusInTrap: l,
1706
- onFocusoutPrevented: i,
1707
- onReleaseRequested: d
1708
- } = ta(o, n), { attributes: g, arrowRef: y, contentRef: h, styles: f, instanceRef: p, role: m, update: c } = Xs(o), {
1709
- ariaModal: w,
1710
- arrowStyle: C,
1711
- contentAttrs: b,
1712
- contentClass: I,
1713
- contentStyle: _,
1714
- updateZIndex: O
1715
- } = ea(o, {
1716
- styles: f,
1717
- attributes: g,
1718
- role: m
1719
- }), P = G(Cn, void 0), k = A();
1720
- fe(no, {
1721
- arrowStyle: C,
1722
- arrowRef: y,
1723
- arrowOffset: k
1724
- }), P && (P.addInputId || P.removeInputId) && fe(Cn, {
1725
- ...P,
1726
- addInputId: bt,
1727
- removeInputId: bt
1728
- });
1729
- let R;
1730
- const $ = (F = !0) => {
1731
- c(), F && O();
1732
- }, N = () => {
1733
- $(!1), o.visible && o.focusOnShow ? s.value = !0 : o.visible === !1 && (s.value = !1);
1734
- };
1735
- return ve(() => {
1736
- L(() => o.triggerTargetEl, (F, j) => {
1737
- R == null || R(), R = void 0;
1738
- const M = v(F || h.value), x = v(j || h.value);
1739
- De(M) && (R = L([m, () => o.ariaLabel, w, () => o.id], (E) => {
1740
- ["role", "aria-label", "aria-modal", "id"].forEach((H, te) => {
1741
- Pt(E[te]) ? M.removeAttribute(H) : M.setAttribute(H, E[te]);
1742
- });
1743
- }, { immediate: !0 })), x !== M && De(x) && ["role", "aria-label", "aria-modal", "id"].forEach((E) => {
1744
- x.removeAttribute(E);
1745
- });
1746
- }, { immediate: !0 }), L(() => o.visible, N, { immediate: !0 });
1747
- }), le(() => {
1748
- R == null || R(), R = void 0;
1749
- }), t({
1750
- popperContentRef: h,
1751
- popperInstanceRef: p,
1752
- updatePopper: $,
1753
- contentStyle: _
1754
- }), (F, j) => (D(), pe("div", Ue({
1755
- ref_key: "contentRef",
1756
- ref: h
1757
- }, v(b), {
1758
- style: v(_),
1759
- class: v(I),
1760
- tabindex: "-1",
1761
- onMouseenter: j[0] || (j[0] = (M) => F.$emit("mouseenter", M)),
1762
- onMouseleave: j[1] || (j[1] = (M) => F.$emit("mouseleave", M))
1763
- }), [
1764
- Oe(v(Vs), {
1765
- trapped: v(s),
1766
- "trap-on-focus-in": !0,
1767
- "focus-trap-el": v(h),
1768
- "focus-start-el": v(r),
1769
- onFocusAfterTrapped: v(u),
1770
- onFocusAfterReleased: v(a),
1771
- onFocusin: v(l),
1772
- onFocusoutPrevented: v(i),
1773
- onReleaseRequested: v(d)
1774
- }, {
1775
- default: K(() => [
1776
- W(F.$slots, "default")
1777
- ]),
1778
- _: 3
1779
- }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
1780
- ], 16));
1781
- }
1782
- });
1783
- var ra = /* @__PURE__ */ ee(oa, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]);
1784
- const sa = At(Cs), Ut = Symbol("elTooltip"), q = z({
1785
- ...vs,
1786
- ...lo,
1787
- appendTo: {
1788
- type: S([String, Object])
1789
- },
1790
- content: {
1791
- type: String,
1792
- default: ""
1793
- },
1794
- rawContent: {
1795
- type: Boolean,
1796
- default: !1
1797
- },
1798
- persistent: Boolean,
1799
- ariaLabel: String,
1800
- visible: {
1801
- type: S(Boolean),
1802
- default: null
1803
- },
1804
- transition: String,
1805
- teleported: {
1806
- type: Boolean,
1807
- default: !0
1808
- },
1809
- disabled: Boolean
1810
- }), Ke = z({
1811
- ...ao,
1812
- disabled: Boolean,
1813
- trigger: {
1814
- type: S([String, Array]),
1815
- default: "hover"
1816
- },
1817
- triggerKeys: {
1818
- type: S(Array),
1819
- default: () => [rt.enter, rt.space]
1820
- }
1821
- }), {
1822
- useModelToggleProps: aa,
1823
- useModelToggleEmits: ia,
1824
- useModelToggle: la
1825
- } = Hn("visible"), ua = z({
1826
- ...oo,
1827
- ...aa,
1828
- ...q,
1829
- ...Ke,
1830
- ...ro,
1831
- showArrow: {
1832
- type: Boolean,
1833
- default: !0
1834
- }
1835
- }), ca = [
1836
- ...ia,
1837
- "before-show",
1838
- "before-hide",
1839
- "show",
1840
- "hide",
1841
- "open",
1842
- "close"
1843
- ], pa = (e, t) => zo(e) ? e.includes(t) : e === t, Ce = (e, t, n) => (o) => {
1844
- pa(v(e), t) && n(o);
1845
- }, fa = B({
1846
- name: "ElTooltipTrigger"
1847
- }), da = /* @__PURE__ */ B({
1848
- ...fa,
1849
- props: Ke,
1850
- setup(e, { expose: t }) {
1851
- const n = e, o = Ne("tooltip"), { controlled: r, id: s, open: a, onOpen: u, onClose: l, onToggle: i } = G(Ut, void 0), d = A(null), g = () => {
1852
- if (v(r) || n.disabled)
1853
- return !0;
1854
- }, y = xe(n, "trigger"), h = se(g, Ce(y, "hover", u)), f = se(g, Ce(y, "hover", l)), p = se(g, Ce(y, "click", (b) => {
1855
- b.button === 0 && i(b);
1856
- })), m = se(g, Ce(y, "focus", u)), c = se(g, Ce(y, "focus", l)), w = se(g, Ce(y, "contextmenu", (b) => {
1857
- b.preventDefault(), i(b);
1858
- })), C = se(g, (b) => {
1859
- const { code: I } = b;
1860
- n.triggerKeys.includes(I) && (b.preventDefault(), i(b));
1861
- });
1862
- return t({
1863
- triggerRef: d
1864
- }), (b, I) => (D(), de(v(Ns), {
1865
- id: v(s),
1866
- "virtual-ref": b.virtualRef,
1867
- open: v(a),
1868
- "virtual-triggering": b.virtualTriggering,
1869
- class: Tt(v(o).e("trigger")),
1870
- onBlur: v(c),
1871
- onClick: v(p),
1872
- onContextmenu: v(w),
1873
- onFocus: v(m),
1874
- onMouseenter: v(h),
1875
- onMouseleave: v(f),
1876
- onKeydown: v(C)
1877
- }, {
1878
- default: K(() => [
1879
- W(b.$slots, "default")
1880
- ]),
1881
- _: 3
1882
- }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
1883
- }
1884
- });
1885
- var va = /* @__PURE__ */ ee(da, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]);
1886
- const ma = B({
1887
- name: "ElTooltipContent",
1888
- inheritAttrs: !1
1889
- }), ga = /* @__PURE__ */ B({
1890
- ...ma,
1891
- props: q,
1892
- setup(e, { expose: t }) {
1893
- const n = e, { selector: o } = eo(), r = Ne("tooltip"), s = A(null), a = A(!1), {
1894
- controlled: u,
1895
- id: l,
1896
- open: i,
1897
- trigger: d,
1898
- onClose: g,
1899
- onOpen: y,
1900
- onShow: h,
1901
- onHide: f,
1902
- onBeforeShow: p,
1903
- onBeforeHide: m
1904
- } = G(Ut, void 0), c = T(() => n.transition || `${r.namespace.value}-fade-in-linear`), w = T(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
1905
- le(() => {
1906
- a.value = !0;
1907
- });
1908
- const C = T(() => v(w) ? !0 : v(i)), b = T(() => n.disabled ? !1 : v(i)), I = T(() => n.appendTo || o.value), _ = T(() => {
1909
- var E;
1910
- return (E = n.style) != null ? E : {};
1911
- }), O = T(() => !v(i)), P = () => {
1912
- f();
1913
- }, k = () => {
1914
- if (v(u))
1915
- return !0;
1916
- }, R = se(k, () => {
1917
- n.enterable && v(d) === "hover" && y();
1918
- }), $ = se(k, () => {
1919
- v(d) === "hover" && g();
1920
- }), N = () => {
1921
- var E, H;
1922
- (H = (E = s.value) == null ? void 0 : E.updatePopper) == null || H.call(E), p == null || p();
1923
- }, F = () => {
1924
- m == null || m();
1925
- }, j = () => {
1926
- h(), x = Do(T(() => {
1927
- var E;
1928
- return (E = s.value) == null ? void 0 : E.popperContentRef;
1929
- }), () => {
1930
- if (v(u))
1931
- return;
1932
- v(d) !== "hover" && g();
1933
- });
1934
- }, M = () => {
1935
- n.virtualTriggering || g();
1936
- };
1937
- let x;
1938
- return L(() => v(i), (E) => {
1939
- E || x == null || x();
1940
- }, {
1941
- flush: "post"
1942
- }), L(() => n.content, () => {
1943
- var E, H;
1944
- (H = (E = s.value) == null ? void 0 : E.updatePopper) == null || H.call(E);
1945
- }), t({
1946
- contentRef: s
1947
- }), (E, H) => (D(), de(Ao, {
1948
- disabled: !E.teleported,
1949
- to: v(I)
1950
- }, [
1951
- Oe(Ro, {
1952
- name: v(c),
1953
- onAfterLeave: P,
1954
- onBeforeEnter: N,
1955
- onAfterEnter: j,
1956
- onBeforeLeave: F
1957
- }, {
1958
- default: K(() => [
1959
- v(C) ? Ct((D(), de(v(ra), Ue({
1960
- key: 0,
1961
- id: v(l),
1962
- ref_key: "contentRef",
1963
- ref: s
1964
- }, E.$attrs, {
1965
- "aria-label": E.ariaLabel,
1966
- "aria-hidden": v(O),
1967
- "boundaries-padding": E.boundariesPadding,
1968
- "fallback-placements": E.fallbackPlacements,
1969
- "gpu-acceleration": E.gpuAcceleration,
1970
- offset: E.offset,
1971
- placement: E.placement,
1972
- "popper-options": E.popperOptions,
1973
- strategy: E.strategy,
1974
- effect: E.effect,
1975
- enterable: E.enterable,
1976
- pure: E.pure,
1977
- "popper-class": E.popperClass,
1978
- "popper-style": [E.popperStyle, v(_)],
1979
- "reference-el": E.referenceEl,
1980
- "trigger-target-el": E.triggerTargetEl,
1981
- visible: v(b),
1982
- "z-index": E.zIndex,
1983
- onMouseenter: v(R),
1984
- onMouseleave: v($),
1985
- onBlur: M,
1986
- onClose: v(g)
1987
- }), {
1988
- default: K(() => [
1989
- a.value ? ae("v-if", !0) : W(E.$slots, "default", { key: 0 })
1990
- ]),
1991
- _: 3
1992
- }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
1993
- [No, v(b)]
1994
- ]) : ae("v-if", !0)
1995
- ]),
1996
- _: 3
1997
- }, 8, ["name"])
1998
- ], 8, ["disabled", "to"]));
1999
- }
2000
- });
2001
- var ya = /* @__PURE__ */ ee(ga, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);
2002
- const ha = ["innerHTML"], ba = { key: 1 }, wa = B({
2003
- name: "ElTooltip"
2004
- }), Ea = /* @__PURE__ */ B({
2005
- ...wa,
2006
- props: ua,
2007
- emits: ca,
2008
- setup(e, { expose: t, emit: n }) {
2009
- const o = e;
2010
- ds();
2011
- const r = cs(), s = A(), a = A(), u = () => {
2012
- var c;
2013
- const w = v(s);
2014
- w && ((c = w.popperInstanceRef) == null || c.update());
2015
- }, l = A(!1), i = A(), { show: d, hide: g, hasUpdateHandler: y } = la({
2016
- indicator: l,
2017
- toggleReason: i
2018
- }), { onOpen: h, onClose: f } = ms({
2019
- showAfter: xe(o, "showAfter"),
2020
- hideAfter: xe(o, "hideAfter"),
2021
- autoClose: xe(o, "autoClose"),
2022
- open: d,
2023
- close: g
2024
- }), p = T(() => _t(o.visible) && !y.value);
2025
- fe(Ut, {
2026
- controlled: p,
2027
- id: r,
2028
- open: ko(l),
2029
- trigger: xe(o, "trigger"),
2030
- onOpen: (c) => {
2031
- h(c);
2032
- },
2033
- onClose: (c) => {
2034
- f(c);
2035
- },
2036
- onToggle: (c) => {
2037
- v(l) ? f(c) : h(c);
2038
- },
2039
- onShow: () => {
2040
- n("show", i.value);
2041
- },
2042
- onHide: () => {
2043
- n("hide", i.value);
2044
- },
2045
- onBeforeShow: () => {
2046
- n("before-show", i.value);
2047
- },
2048
- onBeforeHide: () => {
2049
- n("before-hide", i.value);
2050
- },
2051
- updatePopper: u
2052
- }), L(() => o.disabled, (c) => {
2053
- c && l.value && (l.value = !1);
2054
- });
2055
- const m = (c) => {
2056
- var w, C;
2057
- const b = (C = (w = a.value) == null ? void 0 : w.contentRef) == null ? void 0 : C.popperContentRef, I = (c == null ? void 0 : c.relatedTarget) || document.activeElement;
2058
- return b && b.contains(I);
2059
- };
2060
- return $o(() => l.value && g()), t({
2061
- popperRef: s,
2062
- contentRef: a,
2063
- isFocusInsideContent: m,
2064
- updatePopper: u,
2065
- onOpen: h,
2066
- onClose: f,
2067
- hide: g
2068
- }), (c, w) => (D(), de(v(sa), {
2069
- ref_key: "popperRef",
2070
- ref: s,
2071
- role: c.role
2072
- }, {
2073
- default: K(() => [
2074
- Oe(va, {
2075
- disabled: c.disabled,
2076
- trigger: c.trigger,
2077
- "trigger-keys": c.triggerKeys,
2078
- "virtual-ref": c.virtualRef,
2079
- "virtual-triggering": c.virtualTriggering
2080
- }, {
2081
- default: K(() => [
2082
- c.$slots.default ? W(c.$slots, "default", { key: 0 }) : ae("v-if", !0)
2083
- ]),
2084
- _: 3
2085
- }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
2086
- Oe(ya, {
2087
- ref_key: "contentRef",
2088
- ref: a,
2089
- "aria-label": c.ariaLabel,
2090
- "boundaries-padding": c.boundariesPadding,
2091
- content: c.content,
2092
- disabled: c.disabled,
2093
- effect: c.effect,
2094
- enterable: c.enterable,
2095
- "fallback-placements": c.fallbackPlacements,
2096
- "hide-after": c.hideAfter,
2097
- "gpu-acceleration": c.gpuAcceleration,
2098
- offset: c.offset,
2099
- persistent: c.persistent,
2100
- "popper-class": c.popperClass,
2101
- "popper-style": c.popperStyle,
2102
- placement: c.placement,
2103
- "popper-options": c.popperOptions,
2104
- pure: c.pure,
2105
- "raw-content": c.rawContent,
2106
- "reference-el": c.referenceEl,
2107
- "trigger-target-el": c.triggerTargetEl,
2108
- "show-after": c.showAfter,
2109
- strategy: c.strategy,
2110
- teleported: c.teleported,
2111
- transition: c.transition,
2112
- "virtual-triggering": c.virtualTriggering,
2113
- "z-index": c.zIndex,
2114
- "append-to": c.appendTo
2115
- }, {
2116
- default: K(() => [
2117
- W(c.$slots, "content", {}, () => [
2118
- c.rawContent ? (D(), pe("span", {
2119
- key: 0,
2120
- innerHTML: c.content
2121
- }, null, 8, ha)) : (D(), pe("span", ba, be(c.content), 1))
2122
- ]),
2123
- c.showArrow ? (D(), de(v(_s), {
2124
- key: 0,
2125
- "arrow-offset": c.arrowOffset
2126
- }, null, 8, ["arrow-offset"])) : ae("v-if", !0)
2127
- ]),
2128
- _: 3
2129
- }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"])
2130
- ]),
2131
- _: 3
2132
- }, 8, ["role"]));
2133
- }
2134
- });
2135
- var Oa = /* @__PURE__ */ ee(Ea, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]);
2136
- const Ta = At(Oa), ce = /* @__PURE__ */ new Map();
2137
- let $n;
2138
- Y && (document.addEventListener("mousedown", (e) => $n = e), document.addEventListener("mouseup", (e) => {
2139
- for (const t of ce.values())
2140
- for (const { documentHandler: n } of t)
2141
- n(e, $n);
2142
- }));
2143
- function Fn(e, t) {
2144
- let n = [];
2145
- return Array.isArray(t.arg) ? n = t.arg : De(t.arg) && n.push(t.arg), function(o, r) {
2146
- const s = t.instance.popperRef, a = o.target, u = r == null ? void 0 : r.target, l = !t || !t.instance, i = !a || !u, d = e.contains(a) || e.contains(u), g = e === a, y = n.length && n.some((f) => f == null ? void 0 : f.contains(a)) || n.length && n.includes(u), h = s && (s.contains(a) || s.contains(u));
2147
- l || i || d || g || y || h || t.value(o, r);
2148
- };
2149
- }
2150
- const Ca = {
2151
- beforeMount(e, t) {
2152
- ce.has(e) || ce.set(e, []), ce.get(e).push({
2153
- documentHandler: Fn(e, t),
2154
- bindingFn: t.value
2155
- });
2156
- },
2157
- updated(e, t) {
2158
- ce.has(e) || ce.set(e, []);
2159
- const n = ce.get(e), o = n.findIndex((s) => s.bindingFn === t.oldValue), r = {
2160
- documentHandler: Fn(e, t),
2161
- bindingFn: t.value
2162
- };
2163
- o >= 0 ? n.splice(o, 1, r) : n.push(r);
2164
- },
2165
- unmounted(e) {
2166
- ce.delete(e);
2167
- }
2168
- }, Ia = /* @__PURE__ */ B({
2169
- inheritAttrs: !1
2170
- });
2171
- function Pa(e, t, n, o, r, s) {
2172
- return W(e.$slots, "default");
2173
- }
2174
- var _a = /* @__PURE__ */ ee(Ia, [["render", Pa], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);
2175
- const Sa = /* @__PURE__ */ B({
2176
- name: "ElCollectionItem",
2177
- inheritAttrs: !1
2178
- });
2179
- function Aa(e, t, n, o, r, s) {
2180
- return W(e.$slots, "default");
2181
- }
2182
- var Ra = /* @__PURE__ */ ee(Sa, [["render", Aa], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);
2183
- const Na = "data-el-collection-item", ka = (e) => {
2184
- const t = `El${e}Collection`, n = `${t}Item`, o = Symbol(t), r = Symbol(n), s = {
2185
- ..._a,
2186
- name: t,
2187
- setup() {
2188
- const u = A(null), l = /* @__PURE__ */ new Map();
2189
- fe(o, {
2190
- itemMap: l,
2191
- getItems: () => {
2192
- const d = v(u);
2193
- if (!d)
2194
- return [];
2195
- const g = Array.from(d.querySelectorAll(`[${Na}]`));
2196
- return [...l.values()].sort((h, f) => g.indexOf(h.ref) - g.indexOf(f.ref));
2197
- },
2198
- collectionRef: u
2199
- });
2200
- }
2201
- }, a = {
2202
- ...Ra,
2203
- name: n,
2204
- setup(u, { attrs: l }) {
2205
- const i = A(null), d = G(o, void 0);
2206
- fe(r, {
2207
- collectionItemRef: i
2208
- }), ve(() => {
2209
- const g = v(i);
2210
- g && d.itemMap.set(g, {
2211
- ref: g,
2212
- ...l
2213
- });
2214
- }), le(() => {
2215
- const g = v(i);
2216
- d.itemMap.delete(g);
2217
- });
2218
- }
2219
- };
2220
- return {
2221
- COLLECTION_INJECTION_KEY: o,
2222
- COLLECTION_ITEM_INJECTION_KEY: r,
2223
- ElCollection: s,
2224
- ElCollectionItem: a
2225
- };
2226
- }, ht = z({
2227
- trigger: Ke.trigger,
2228
- effect: {
2229
- ...q.effect,
2230
- default: "light"
2231
- },
2232
- type: {
2233
- type: S(String)
2234
- },
2235
- placement: {
2236
- type: S(String),
2237
- default: "bottom"
2238
- },
2239
- popperOptions: {
2240
- type: S(Object),
2241
- default: () => ({})
2242
- },
2243
- id: String,
2244
- size: {
2245
- type: String,
2246
- default: ""
2247
- },
2248
- splitButton: Boolean,
2249
- hideOnClick: {
2250
- type: Boolean,
2251
- default: !0
2252
- },
2253
- loop: {
2254
- type: Boolean,
2255
- default: !0
2256
- },
2257
- showTimeout: {
2258
- type: Number,
2259
- default: 150
2260
- },
2261
- hideTimeout: {
2262
- type: Number,
2263
- default: 150
2264
- },
2265
- tabindex: {
2266
- type: S([Number, String]),
2267
- default: 0
2268
- },
2269
- maxHeight: {
2270
- type: S([Number, String]),
2271
- default: ""
2272
- },
2273
- popperClass: {
2274
- type: String,
2275
- default: ""
2276
- },
2277
- disabled: {
2278
- type: Boolean,
2279
- default: !1
2280
- },
2281
- role: {
2282
- type: String,
2283
- default: "menu"
2284
- },
2285
- buttonProps: {
2286
- type: S(Object)
2287
- },
2288
- teleported: q.teleported
2289
- });
2290
- z({
2291
- command: {
2292
- type: [Object, String, Number],
2293
- default: () => ({})
2294
- },
2295
- disabled: Boolean,
2296
- divided: Boolean,
2297
- textValue: String,
2298
- icon: {
2299
- type: Xo
2300
- }
2301
- });
2302
- z({
2303
- onKeydown: { type: S(Function) }
2304
- });
2305
- ka("Dropdown");
2306
- const $a = z({
2307
- trigger: Ke.trigger,
2308
- placement: ht.placement,
2309
- disabled: Ke.disabled,
2310
- visible: q.visible,
2311
- transition: q.transition,
2312
- popperOptions: ht.popperOptions,
2313
- tabindex: ht.tabindex,
2314
- content: q.content,
2315
- popperStyle: q.popperStyle,
2316
- popperClass: q.popperClass,
2317
- enterable: {
2318
- ...q.enterable,
2319
- default: !0
2320
- },
2321
- effect: {
2322
- ...q.effect,
2323
- default: "light"
2324
- },
2325
- teleported: q.teleported,
2326
- title: String,
2327
- width: {
2328
- type: [String, Number],
2329
- default: 150
2330
- },
2331
- offset: {
2332
- type: Number,
2333
- default: void 0
2334
- },
2335
- showAfter: {
2336
- type: Number,
2337
- default: 0
2338
- },
2339
- hideAfter: {
2340
- type: Number,
2341
- default: 200
2342
- },
2343
- autoClose: {
2344
- type: Number,
2345
- default: 0
2346
- },
2347
- showArrow: {
2348
- type: Boolean,
2349
- default: !0
2350
- },
2351
- persistent: {
2352
- type: Boolean,
2353
- default: !0
2354
- },
2355
- "onUpdate:visible": {
2356
- type: Function
2357
- }
2358
- }), Fa = {
2359
- "update:visible": (e) => _t(e),
2360
- "before-enter": () => !0,
2361
- "before-leave": () => !0,
2362
- "after-enter": () => !0,
2363
- "after-leave": () => !0
2364
- }, xa = "onUpdate:visible", Ba = B({
2365
- name: "ElPopover"
2366
- }), La = /* @__PURE__ */ B({
2367
- ...Ba,
2368
- props: $a,
2369
- emits: Fa,
2370
- setup(e, { expose: t, emit: n }) {
2371
- const o = e, r = T(() => o[xa]), s = Ne("popover"), a = A(), u = T(() => {
2372
- var m;
2373
- return (m = v(a)) == null ? void 0 : m.popperRef;
2374
- }), l = T(() => [
2375
- {
2376
- width: Yo(o.width)
2377
- },
2378
- o.popperStyle
2379
- ]), i = T(() => [s.b(), o.popperClass, { [s.m("plain")]: !!o.content }]), d = T(() => o.transition === `${s.namespace.value}-fade-in-linear`), g = () => {
2380
- var m;
2381
- (m = a.value) == null || m.hide();
2382
- }, y = () => {
2383
- n("before-enter");
2384
- }, h = () => {
2385
- n("before-leave");
2386
- }, f = () => {
2387
- n("after-enter");
2388
- }, p = () => {
2389
- n("update:visible", !1), n("after-leave");
2390
- };
2391
- return t({
2392
- popperRef: u,
2393
- hide: g
2394
- }), (m, c) => (D(), de(v(Ta), Ue({
2395
- ref_key: "tooltipRef",
2396
- ref: a
2397
- }, m.$attrs, {
2398
- trigger: m.trigger,
2399
- placement: m.placement,
2400
- disabled: m.disabled,
2401
- visible: m.visible,
2402
- transition: m.transition,
2403
- "popper-options": m.popperOptions,
2404
- tabindex: m.tabindex,
2405
- content: m.content,
2406
- offset: m.offset,
2407
- "show-after": m.showAfter,
2408
- "hide-after": m.hideAfter,
2409
- "auto-close": m.autoClose,
2410
- "show-arrow": m.showArrow,
2411
- "aria-label": m.title,
2412
- effect: m.effect,
2413
- enterable: m.enterable,
2414
- "popper-class": v(i),
2415
- "popper-style": v(l),
2416
- teleported: m.teleported,
2417
- persistent: m.persistent,
2418
- "gpu-acceleration": v(d),
2419
- "onUpdate:visible": v(r),
2420
- onBeforeShow: y,
2421
- onBeforeHide: h,
2422
- onShow: f,
2423
- onHide: p
2424
- }), {
2425
- content: K(() => [
2426
- m.title ? (D(), pe("div", {
2427
- key: 0,
2428
- class: Tt(v(s).e("title")),
2429
- role: "title"
2430
- }, be(m.title), 3)) : ae("v-if", !0),
2431
- W(m.$slots, "default", {}, () => [
2432
- tt(be(m.content), 1)
2433
- ])
2434
- ]),
2435
- default: K(() => [
2436
- m.$slots.reference ? W(m.$slots, "reference", { key: 0 }) : ae("v-if", !0)
2437
- ]),
2438
- _: 3
2439
- }, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"]));
2440
- }
2441
- });
2442
- var Ma = /* @__PURE__ */ ee(La, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popover/src/popover.vue"]]);
2443
- const xn = (e, t) => {
2444
- const n = t.arg || t.value, o = n == null ? void 0 : n.popperRef;
2445
- o && (o.triggerRef = e);
2446
- };
2447
- var Da = {
2448
- mounted(e, t) {
2449
- xn(e, t);
2450
- },
2451
- updated(e, t) {
2452
- xn(e, t);
2453
- }
2454
- };
2455
- const ja = "popover", Ha = er(Da, ja), Ka = At(Ma, {
2456
- directive: Ha
2457
- }), Ua = { class: "das-ui-popover-container" }, Va = {
9
+ const S = { class: "das-ui-popover-container" }, T = {
2458
10
  key: 0,
2459
11
  class: "das-ui-popover-title"
2460
- }, Wa = { class: "das-ui-popover-content" }, za = {
12
+ }, A = { class: "das-ui-popover-content" }, j = {
2461
13
  key: 0,
2462
14
  class: "btn-groups"
2463
- }, qa = /* @__PURE__ */ B({
15
+ }, q = /* @__PURE__ */ b({
2464
16
  __name: "Index",
2465
17
  props: {
2466
18
  title: {},
@@ -2470,65 +22,65 @@ const ja = "popover", Ha = er(Da, ja), Ka = At(Ma, {
2470
22
  placement: { default: "bottom-start" }
2471
23
  },
2472
24
  emits: ["cancel", "confirm", "clickOutside"],
2473
- setup(e, { expose: t, emit: n }) {
2474
- const o = e, r = n, s = Fo(), a = A(null), u = T(() => {
2475
- let i = "das-ui-popover-over-container";
2476
- return o.popperClass && (i = `${i} ${o.popperClass}`), i;
2477
- }), l = () => {
2478
- s.visible !== void 0 && r("clickOutside");
25
+ setup(C, { expose: k, emit: $ }) {
26
+ const l = C, i = $, h = g(), c = D(null), y = O(() => {
27
+ let e = "das-ui-popover-over-container";
28
+ return l.popperClass && (e = `${e} ${l.popperClass}`), e;
29
+ }), N = () => {
30
+ h.visible !== void 0 && i("clickOutside");
2479
31
  };
2480
- return t({ $popoverRef: a }), (i, d) => (D(), de(v(Ka), Ue({
32
+ return k({ $popoverRef: c }), (e, o) => (s(), V(t(R), E({
2481
33
  ref_key: "$popoverRef",
2482
- ref: a,
34
+ ref: c,
2483
35
  class: "das-ui-popover",
2484
- placement: i.placement,
36
+ placement: e.placement,
2485
37
  width: "240px",
2486
- "popper-class": u.value
2487
- }, i.$attrs), {
2488
- reference: K(() => [
2489
- W(i.$slots, "reference")
38
+ "popper-class": y.value
39
+ }, e.$attrs), {
40
+ reference: r(() => [
41
+ d(e.$slots, "reference")
2490
42
  ]),
2491
- default: K(() => [
2492
- Ct((D(), pe("div", Ua, [
2493
- i.title ? (D(), pe("div", Va, be(i.title), 1)) : ae("", !0),
2494
- W(i.$slots, "default", {}, () => [
2495
- xo("div", Wa, [
2496
- tt(be(i.content) + " ", 1),
2497
- i.showBtns ? (D(), pe("div", za, [
2498
- Oe(v(tn), {
2499
- onClick: d[0] || (d[0] = (g) => r("cancel"))
43
+ default: r(() => [
44
+ I((s(), p("div", S, [
45
+ e.title ? (s(), p("div", T, n(e.title), 1)) : u("", !0),
46
+ d(e.$slots, "default", {}, () => [
47
+ P("div", A, [
48
+ a(n(e.content) + " ", 1),
49
+ e.showBtns ? (s(), p("div", j, [
50
+ f(t(v), {
51
+ onClick: o[0] || (o[0] = (B) => i("cancel"))
2500
52
  }, {
2501
- default: K(() => [
2502
- tt(be(v(Xt)("das-ui-popover-cancel").value), 1)
53
+ default: r(() => [
54
+ a(n(t(m)("das-ui-popover-cancel").value), 1)
2503
55
  ]),
2504
56
  _: 1
2505
57
  }),
2506
- Oe(v(tn), {
58
+ f(t(v), {
2507
59
  btnType: "primary",
2508
- onClick: d[1] || (d[1] = (g) => r("confirm")),
60
+ onClick: o[1] || (o[1] = (B) => i("confirm")),
2509
61
  style: { "margin-left": "12px" }
2510
62
  }, {
2511
- default: K(() => [
2512
- tt(be(v(Xt)("das-ui-popover-confirm").value), 1)
63
+ default: r(() => [
64
+ a(n(t(m)("das-ui-popover-confirm").value), 1)
2513
65
  ]),
2514
66
  _: 1
2515
67
  })
2516
- ])) : ae("", !0)
68
+ ])) : u("", !0)
2517
69
  ])
2518
70
  ])
2519
71
  ])), [
2520
- [v(Ca), l]
72
+ [t(z), N]
2521
73
  ])
2522
74
  ]),
2523
75
  _: 3
2524
76
  }, 16, ["placement", "popper-class"]));
2525
77
  }
2526
- }), Ja = {
78
+ }), x = {
2527
79
  "das-ui-popover-confirm": { "zh-CN": "确定", en: "Confirm" },
2528
80
  "das-ui-popover-cancel": { "zh-CN": "取消", en: "Cancel" }
2529
- }, ei = yo(qa);
2530
- ho(Ja);
81
+ }, Q = w(q);
82
+ _(x);
2531
83
  export {
2532
- ei as DasPopover,
2533
- ei as default
84
+ Q as DasPopover,
85
+ Q as default
2534
86
  };