st-comp 0.0.178 → 0.0.180

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 (185) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +3 -3
  3. package/es/FactorWarning.cjs +1 -1
  4. package/es/FactorWarning.js +29 -33
  5. package/es/Kline.cjs +1 -1
  6. package/es/Kline.js +14 -18
  7. package/es/KlineBasic.cjs +1 -1
  8. package/es/KlineBasic.js +25 -30
  9. package/es/KlineConfig.cjs +1 -1
  10. package/es/KlineConfig.js +457 -419
  11. package/es/KlineNew.cjs +1 -1
  12. package/es/KlineNew.js +13 -16
  13. package/es/KlinePlus.cjs +3 -3
  14. package/es/KlinePlus.js +140 -142
  15. package/es/Pagination.cjs +1 -1
  16. package/es/Pagination.js +274 -276
  17. package/es/PasswordPrompt.cjs +1 -1
  18. package/es/PasswordPrompt.js +3 -3
  19. package/es/Table.cjs +1 -1
  20. package/es/Table.js +21 -23
  21. package/es/User.cjs +1 -1
  22. package/es/User.js +472 -482
  23. package/es/VarSelectDialog.cjs +3 -3
  24. package/es/VarSelectDialog.js +440 -2878
  25. package/es/VarietySearch.cjs +12 -12
  26. package/es/VarietySearch.js +1199 -1176
  27. package/es/VirtualTable.cjs +1 -13
  28. package/es/VirtualTable.js +1547 -1567
  29. package/es/{_initCloneObject-da90eef0.js → _initCloneObject-346b7ee2.js} +25 -26
  30. package/es/_initCloneObject-e2f0deb9.cjs +1 -0
  31. package/es/base-62a70f61.js +288 -0
  32. package/es/base-ef747d02.cjs +5 -0
  33. package/es/config-provider-178bb43c.cjs +1 -0
  34. package/es/config-provider-2e733cae.js +58 -0
  35. package/es/dayjs.min-2c20abe6.cjs +1 -0
  36. package/es/{dayjs.min-54a4e095.js → dayjs.min-8313b006.js} +96 -93
  37. package/es/{debounce-9e323221.cjs → debounce-0b77a317.cjs} +1 -1
  38. package/es/{debounce-3cec4646.js → debounce-5f2ec4be.js} +19 -19
  39. package/es/{dropdown-82b80e8b.js → dropdown-d06edf54.js} +49 -39
  40. package/es/dropdown-f2fec683.cjs +1 -0
  41. package/es/el-button-5b08c08a.js +272 -0
  42. package/es/el-button-fc46a173.cjs +1 -0
  43. package/es/el-dialog-0b7166c9.cjs +1 -0
  44. package/es/el-dialog-d8d0da7a.js +276 -0
  45. package/es/{el-divider-fd2b4e2e.js → el-divider-2f300113.js} +1 -1
  46. package/es/{el-divider-40c50ce7.cjs → el-divider-4713d74c.cjs} +1 -1
  47. package/es/{el-empty-412fc297.js → el-empty-87a86f30.js} +57 -80
  48. package/es/el-empty-bb2b0235.cjs +1 -0
  49. package/es/el-form-item-caffd133.cjs +12 -0
  50. package/es/el-form-item-ff9c7d98.js +1267 -0
  51. package/es/el-input-6db30c8c.js +531 -0
  52. package/es/el-input-9c912678.cjs +1 -0
  53. package/es/el-input-number-05f150e5.js +311 -0
  54. package/es/el-input-number-6fe73563.cjs +1 -0
  55. package/es/el-loading-8514feaa.cjs +1 -0
  56. package/es/el-loading-93842445.js +203 -0
  57. package/es/el-menu-item-7a57c1be.cjs +1 -0
  58. package/es/el-menu-item-a886fbdd.js +768 -0
  59. package/es/el-message-8aa674f2.js +406 -0
  60. package/es/el-message-aad5b42b.cjs +1 -0
  61. package/es/el-message-box-2b6b2b68.js +550 -0
  62. package/es/el-message-box-53f355d7.cjs +1 -0
  63. package/es/el-overlay-540b2a02.js +324 -0
  64. package/es/el-overlay-96630a2e.cjs +1 -0
  65. package/es/el-popconfirm-2afdf6fb.cjs +1 -0
  66. package/es/el-popconfirm-c18d8035.js +162 -0
  67. package/es/el-popper-544fd77e.js +2412 -0
  68. package/es/el-popper-73466d7a.cjs +1 -0
  69. package/es/el-scrollbar-691cfc11.cjs +1 -0
  70. package/es/el-scrollbar-fae984e3.js +763 -0
  71. package/es/el-segmented-a7493831.js +142 -0
  72. package/es/el-segmented-b6bd3c0e.cjs +1 -0
  73. package/es/el-select-5959e837.cjs +1 -0
  74. package/es/el-select-ea8feecf.js +1251 -0
  75. package/es/el-table-column-9ef52443.js +3878 -0
  76. package/es/el-table-column-b824ac5c.cjs +14 -0
  77. package/es/el-tag-2fc9b9eb.js +116 -0
  78. package/es/el-tag-ecad6d02.cjs +1 -0
  79. package/es/index-2e331d74.js +10 -0
  80. package/es/{index-a8e9ec0f.js → index-34592e82.js} +176 -182
  81. package/es/index-3a74eae4.cjs +1 -0
  82. package/es/{index-1c41bd56.js → index-5d4e5c51.js} +3 -3
  83. package/es/{index-e348d5e8.cjs → index-694bb944.cjs} +1 -1
  84. package/es/{index-ee1cebbc.js → index-74fb90c7.js} +5 -5
  85. package/es/{index-d577b81b.js → index-8d7ae5dc.js} +2 -2
  86. package/es/index-a9095b4a.js +163 -0
  87. package/es/index-a93dd9c4.cjs +1 -0
  88. package/es/index-ebd2fd7e.cjs +1 -0
  89. package/es/index-f1c702f6.cjs +1 -0
  90. package/es/{index-19fa1fcf.cjs → index-f6afafaa.cjs} +1 -1
  91. package/es/{raf-bfbf42e4.js → raf-41aed4d4.js} +1 -1
  92. package/es/{raf-07cb6953.cjs → raf-8249652f.cjs} +1 -1
  93. package/es/{scroll-e3cb691f.js → scroll-7d352c1f.js} +2 -2
  94. package/es/{scroll-4769a65d.cjs → scroll-b108dabd.cjs} +1 -1
  95. package/es/style.css +1 -1
  96. package/es/use-global-config-03735617.cjs +1 -0
  97. package/es/use-global-config-4b185eb5.js +71 -0
  98. package/es/validator-0e688e4e.cjs +1 -0
  99. package/es/validator-d12a8f8c.js +5 -0
  100. package/es/vnode-4db20540.cjs +1 -0
  101. package/es/vnode-a0795a4b.js +70 -0
  102. package/es/{zh-cn-d883afa8.js → zh-cn-0ff32188.js} +5 -4
  103. package/es/{zh-cn-b24a7dc9.cjs → zh-cn-adf19c4b.cjs} +1 -1
  104. package/lib/bundle.js +1 -1
  105. package/lib/bundle.umd.cjs +226 -245
  106. package/lib/{index-0f16f8b0.js → index-9341884f.js} +44358 -46367
  107. package/lib/{python-e9c32bc9.js → python-5c9b3e4e.js} +1 -1
  108. package/lib/style.css +1 -1
  109. package/package.json +2 -2
  110. package/packages/KlinePlus/index.vue +2 -1
  111. package/packages/VarSelectDialog/index.vue +43 -67
  112. package/packages/VarietySearch/components/FactorScreen/FactorDescription.vue +4 -2
  113. package/packages/VarietySearch/components/FactorScreen/index.vue +6 -4
  114. package/packages/index.ts +0 -2
  115. package/src/pages/VarSelectDialog/index.vue +1 -1
  116. package/src/router/routes.ts +0 -5
  117. package/es/Dialog.cjs +0 -1
  118. package/es/Dialog.js +0 -95
  119. package/es/_commonjsHelpers-10dfc225.js +0 -8
  120. package/es/_commonjsHelpers-87b0abe8.cjs +0 -1
  121. package/es/_initCloneObject-9ccbb113.cjs +0 -1
  122. package/es/base-bdc10baa.cjs +0 -5
  123. package/es/base-d9284bf0.js +0 -304
  124. package/es/castArray-37eb9980.cjs +0 -1
  125. package/es/castArray-b0ab0165.js +0 -10
  126. package/es/config-provider-ec6b09df.cjs +0 -1
  127. package/es/config-provider-f0151e9f.js +0 -47
  128. package/es/dayjs.min-19fb125f.cjs +0 -1
  129. package/es/dropdown-b2dab5bb.cjs +0 -1
  130. package/es/el-button-34665425.js +0 -237
  131. package/es/el-button-960edd49.cjs +0 -1
  132. package/es/el-dialog-a412484e.js +0 -267
  133. package/es/el-dialog-cd484c1f.cjs +0 -1
  134. package/es/el-empty-627ec09e.cjs +0 -1
  135. package/es/el-form-item-668ba024.js +0 -1263
  136. package/es/el-form-item-e1c3104b.cjs +0 -12
  137. package/es/el-input-22e66e37.js +0 -523
  138. package/es/el-input-5163bda3.cjs +0 -1
  139. package/es/el-input-number-481e21c5.js +0 -284
  140. package/es/el-input-number-eb54cde4.cjs +0 -1
  141. package/es/el-loading-15a5501c.cjs +0 -1
  142. package/es/el-loading-d4e403ab.js +0 -187
  143. package/es/el-menu-item-404c10e5.js +0 -772
  144. package/es/el-menu-item-ac89e804.cjs +0 -1
  145. package/es/el-message-ad87b9dd.cjs +0 -1
  146. package/es/el-message-box-41f39f6d.js +0 -558
  147. package/es/el-message-box-6694f827.cjs +0 -1
  148. package/es/el-message-ef506caa.js +0 -375
  149. package/es/el-overlay-4a9fa4e1.js +0 -269
  150. package/es/el-overlay-e5d318c3.cjs +0 -1
  151. package/es/el-popconfirm-7b9183aa.js +0 -140
  152. package/es/el-popconfirm-a497b279.cjs +0 -1
  153. package/es/el-popper-14a9d493.cjs +0 -1
  154. package/es/el-popper-e73466eb.js +0 -2263
  155. package/es/el-scrollbar-45318df0.js +0 -201
  156. package/es/el-scrollbar-8bf765f2.cjs +0 -1
  157. package/es/el-segmented-3ba6d664.cjs +0 -1
  158. package/es/el-segmented-41820018.js +0 -135
  159. package/es/el-select-1d2309a1.cjs +0 -1
  160. package/es/el-select-d7a00294.js +0 -1130
  161. package/es/el-table-column-a2d0c635.js +0 -3805
  162. package/es/el-table-column-be9a76bb.cjs +0 -14
  163. package/es/el-tag-7f391090.js +0 -280
  164. package/es/el-tag-8d49d4d2.cjs +0 -1
  165. package/es/index-02ca0096.cjs +0 -5
  166. package/es/index-3120be08.js +0 -14
  167. package/es/index-5b81f4da.cjs +0 -1
  168. package/es/index-85a32a00.js +0 -59
  169. package/es/index-8d3c5e96.cjs +0 -3
  170. package/es/index-94f38460.js +0 -306
  171. package/es/index-a99a5307.cjs +0 -1
  172. package/es/index-b90c746b.cjs +0 -1
  173. package/es/index-d94bae37.cjs +0 -1
  174. package/es/index-d99fdc6d.js +0 -159
  175. package/es/use-form-common-props-592797e2.cjs +0 -2
  176. package/es/use-form-common-props-cc347a83.js +0 -171
  177. package/es/use-global-config-584b62f1.cjs +0 -1
  178. package/es/use-global-config-c7f0a7e3.js +0 -73
  179. package/es/validator-10fa54fe.js +0 -5
  180. package/es/validator-af488a9a.cjs +0 -1
  181. package/es/vnode-1b827c99.cjs +0 -1
  182. package/es/vnode-6be33bb1.js +0 -14
  183. package/packages/Dialog/index.ts +0 -8
  184. package/packages/Dialog/index.vue +0 -54
  185. package/src/pages/Dialog/index.vue +0 -16
@@ -0,0 +1,550 @@
1
+ import { defineComponent as Q, ref as k, computed as w, onMounted as me, onUpdated as Se, openBlock as f, createBlock as C, resolveDynamicComponent as I, normalizeClass as r, unref as Ie, normalizeStyle as G, withCtx as E, renderSlot as pe, useAttrs as Ae, nextTick as V, reactive as Re, markRaw as W, watch as se, onBeforeUnmount as $e, toRefs as ze, resolveComponent as z, Transition as Le, withDirectives as U, createVNode as A, createElementVNode as b, withModifiers as K, createElementBlock as j, createCommentVNode as S, toDisplayString as L, withKeys as N, vShow as q, createTextVNode as le, isVNode as ge, render as ve } from "vue";
2
+ import { b as Ve, u as Oe, i as X, _ as he, w as Pe, x as Z, c as Y, s as De, y as ae, f as ye, z as ie } from "./base-62a70f61.js";
3
+ import { k as Fe, e as He, T as Ke, o as re } from "./el-scrollbar-fae984e3.js";
4
+ import { E as Ne } from "./el-button-5b08c08a.js";
5
+ import { E as Ue } from "./el-input-6db30c8c.js";
6
+ import { E as je, b as qe, c as Ge } from "./el-overlay-540b2a02.js";
7
+ import { E as We, l as ue } from "./index-74fb90c7.js";
8
+ import { o as ce, a as Xe, e as Ze } from "./el-popper-544fd77e.js";
9
+ import { i as Je } from "./validator-d12a8f8c.js";
10
+ import { u as Qe } from "./use-global-config-4b185eb5.js";
11
+ import { a as de } from "./index-34592e82.js";
12
+ import { u as Ye } from "./el-dialog-d8d0da7a.js";
13
+ const _e = Ve({
14
+ type: {
15
+ type: String,
16
+ values: ["primary", "success", "info", "warning", "danger", ""],
17
+ default: ""
18
+ },
19
+ size: {
20
+ type: String,
21
+ values: Fe,
22
+ default: ""
23
+ },
24
+ truncated: Boolean,
25
+ lineClamp: {
26
+ type: [String, Number]
27
+ },
28
+ tag: {
29
+ type: String,
30
+ default: "span"
31
+ }
32
+ }), xe = Q({
33
+ name: "ElText"
34
+ }), en = /* @__PURE__ */ Q({
35
+ ...xe,
36
+ props: _e,
37
+ setup(e) {
38
+ const o = e, t = k(), i = He(), l = Oe("text"), s = w(() => [
39
+ l.b(),
40
+ l.m(o.type),
41
+ l.m(i.value),
42
+ l.is("truncated", o.truncated),
43
+ l.is("line-clamp", !X(o.lineClamp))
44
+ ]), c = () => {
45
+ var u, m, n, M, d, P, D;
46
+ if (Ae().title)
47
+ return;
48
+ let h = !1;
49
+ const F = ((u = t.value) == null ? void 0 : u.textContent) || "";
50
+ if (o.truncated) {
51
+ const p = (m = t.value) == null ? void 0 : m.offsetWidth, y = (n = t.value) == null ? void 0 : n.scrollWidth;
52
+ p && y && y > p && (h = !0);
53
+ } else if (!X(o.lineClamp)) {
54
+ const p = (M = t.value) == null ? void 0 : M.offsetHeight, y = (d = t.value) == null ? void 0 : d.scrollHeight;
55
+ p && y && y > p && (h = !0);
56
+ }
57
+ h ? (P = t.value) == null || P.setAttribute("title", F) : (D = t.value) == null || D.removeAttribute("title");
58
+ };
59
+ return me(c), Se(c), (u, m) => (f(), C(I(u.tag), {
60
+ ref_key: "textRef",
61
+ ref: t,
62
+ class: r(Ie(s)),
63
+ style: G({ "-webkit-line-clamp": u.lineClamp })
64
+ }, {
65
+ default: E(() => [
66
+ pe(u.$slots, "default")
67
+ ]),
68
+ _: 3
69
+ }, 8, ["class", "style"]));
70
+ }
71
+ });
72
+ var nn = /* @__PURE__ */ he(en, [["__file", "text.vue"]]);
73
+ const Mn = Pe(nn), J = "_trap-focus-children", T = [], fe = (e) => {
74
+ if (T.length === 0)
75
+ return;
76
+ const o = T[T.length - 1][J];
77
+ if (o.length > 0 && e.code === Xe.tab) {
78
+ if (o.length === 1) {
79
+ e.preventDefault(), document.activeElement !== o[0] && o[0].focus();
80
+ return;
81
+ }
82
+ const t = e.shiftKey, i = e.target === o[0], l = e.target === o[o.length - 1];
83
+ i && t && (e.preventDefault(), o[o.length - 1].focus()), l && !t && (e.preventDefault(), o[0].focus());
84
+ }
85
+ }, on = {
86
+ beforeMount(e) {
87
+ e[J] = ce(e), T.push(e), T.length <= 1 && document.addEventListener("keydown", fe);
88
+ },
89
+ updated(e) {
90
+ V(() => {
91
+ e[J] = ce(e);
92
+ });
93
+ },
94
+ unmounted() {
95
+ T.shift(), T.length === 0 && document.removeEventListener("keydown", fe);
96
+ }
97
+ }, tn = Q({
98
+ name: "ElMessageBox",
99
+ directives: {
100
+ TrapFocus: on
101
+ },
102
+ components: {
103
+ ElButton: Ne,
104
+ ElFocusTrap: Ze,
105
+ ElInput: Ue,
106
+ ElOverlay: je,
107
+ ElIcon: We,
108
+ ...Ke
109
+ },
110
+ inheritAttrs: !1,
111
+ props: {
112
+ buttonSize: {
113
+ type: String,
114
+ validator: Je
115
+ },
116
+ modal: {
117
+ type: Boolean,
118
+ default: !0
119
+ },
120
+ lockScroll: {
121
+ type: Boolean,
122
+ default: !0
123
+ },
124
+ showClose: {
125
+ type: Boolean,
126
+ default: !0
127
+ },
128
+ closeOnClickModal: {
129
+ type: Boolean,
130
+ default: !0
131
+ },
132
+ closeOnPressEscape: {
133
+ type: Boolean,
134
+ default: !0
135
+ },
136
+ closeOnHashChange: {
137
+ type: Boolean,
138
+ default: !0
139
+ },
140
+ center: Boolean,
141
+ draggable: Boolean,
142
+ overflow: Boolean,
143
+ roundButton: Boolean,
144
+ container: {
145
+ type: String,
146
+ default: "body"
147
+ },
148
+ boxType: {
149
+ type: String,
150
+ default: ""
151
+ }
152
+ },
153
+ emits: ["vanish", "action"],
154
+ setup(e, { emit: o }) {
155
+ const {
156
+ locale: t,
157
+ zIndex: i,
158
+ ns: l,
159
+ size: s
160
+ } = Qe("message-box", w(() => e.buttonSize)), { t: c } = t, { nextZIndex: u } = i, m = k(!1), n = Re({
161
+ autofocus: !0,
162
+ beforeClose: null,
163
+ callback: null,
164
+ cancelButtonText: "",
165
+ cancelButtonClass: "",
166
+ confirmButtonText: "",
167
+ confirmButtonClass: "",
168
+ customClass: "",
169
+ customStyle: {},
170
+ dangerouslyUseHTMLString: !1,
171
+ distinguishCancelAndClose: !1,
172
+ icon: "",
173
+ closeIcon: "",
174
+ inputPattern: null,
175
+ inputPlaceholder: "",
176
+ inputType: "text",
177
+ inputValue: "",
178
+ inputValidator: void 0,
179
+ inputErrorMessage: "",
180
+ message: "",
181
+ modalFade: !0,
182
+ modalClass: "",
183
+ showCancelButton: !1,
184
+ showConfirmButton: !0,
185
+ type: "",
186
+ title: void 0,
187
+ showInput: !1,
188
+ action: "",
189
+ confirmButtonLoading: !1,
190
+ cancelButtonLoading: !1,
191
+ confirmButtonLoadingIcon: W(ue),
192
+ cancelButtonLoadingIcon: W(ue),
193
+ confirmButtonDisabled: !1,
194
+ editorErrorMessage: "",
195
+ validateError: !1,
196
+ zIndex: u()
197
+ }), M = w(() => {
198
+ const a = n.type;
199
+ return { [l.bm("icon", a)]: a && re[a] };
200
+ }), d = de(), P = de(), D = w(() => {
201
+ const a = n.type;
202
+ return n.icon || a && re[a] || "";
203
+ }), _ = w(() => !!n.message), h = k(), F = k(), p = k(), y = k(), x = k(), Ce = w(() => n.confirmButtonClass);
204
+ se(() => n.inputValue, async (a) => {
205
+ await V(), e.boxType === "prompt" && a && ne();
206
+ }, { immediate: !0 }), se(() => m.value, (a) => {
207
+ var g, v;
208
+ a && (e.boxType !== "prompt" && (n.autofocus ? p.value = (v = (g = x.value) == null ? void 0 : g.$el) != null ? v : h.value : p.value = h.value), n.zIndex = u()), e.boxType === "prompt" && (a ? V().then(() => {
209
+ var te;
210
+ y.value && y.value.$el && (n.autofocus ? p.value = (te = Te()) != null ? te : h.value : p.value = h.value);
211
+ }) : (n.editorErrorMessage = "", n.validateError = !1));
212
+ });
213
+ const be = w(() => e.draggable), Ee = w(() => e.overflow), { isDragging: we } = Ye(h, F, be, Ee);
214
+ me(async () => {
215
+ await V(), e.closeOnHashChange && window.addEventListener("hashchange", $);
216
+ }), $e(() => {
217
+ e.closeOnHashChange && window.removeEventListener("hashchange", $);
218
+ });
219
+ function $() {
220
+ m.value && (m.value = !1, V(() => {
221
+ n.action && o("action", n.action);
222
+ }));
223
+ }
224
+ const ee = () => {
225
+ e.closeOnClickModal && H(n.distinguishCancelAndClose ? "close" : "cancel");
226
+ }, Be = Ge(ee), ke = (a) => {
227
+ if (n.inputType !== "textarea")
228
+ return a.preventDefault(), H("confirm");
229
+ }, H = (a) => {
230
+ var g;
231
+ e.boxType === "prompt" && a === "confirm" && !ne() || (n.action = a, n.beforeClose ? (g = n.beforeClose) == null || g.call(n, a, n, $) : $());
232
+ }, ne = () => {
233
+ if (e.boxType === "prompt") {
234
+ const a = n.inputPattern;
235
+ if (a && !a.test(n.inputValue || ""))
236
+ return n.editorErrorMessage = n.inputErrorMessage || c("el.messagebox.error"), n.validateError = !0, !1;
237
+ const g = n.inputValidator;
238
+ if (Z(g)) {
239
+ const v = g(n.inputValue);
240
+ if (v === !1)
241
+ return n.editorErrorMessage = n.inputErrorMessage || c("el.messagebox.error"), n.validateError = !0, !1;
242
+ if (Y(v))
243
+ return n.editorErrorMessage = v, n.validateError = !0, !1;
244
+ }
245
+ }
246
+ return n.editorErrorMessage = "", n.validateError = !1, !0;
247
+ }, Te = () => {
248
+ var a, g;
249
+ const v = (a = y.value) == null ? void 0 : a.$refs;
250
+ return (g = v == null ? void 0 : v.input) != null ? g : v == null ? void 0 : v.textarea;
251
+ }, oe = () => {
252
+ H("close");
253
+ }, Me = () => {
254
+ e.closeOnPressEscape && oe();
255
+ };
256
+ return e.lockScroll && qe(m), {
257
+ ...ze(n),
258
+ ns: l,
259
+ overlayEvent: Be,
260
+ visible: m,
261
+ hasMessage: _,
262
+ typeClass: M,
263
+ contentId: d,
264
+ inputId: P,
265
+ btnSize: s,
266
+ iconComponent: D,
267
+ confirmButtonClasses: Ce,
268
+ rootRef: h,
269
+ focusStartRef: p,
270
+ headerRef: F,
271
+ inputRef: y,
272
+ isDragging: we,
273
+ confirmRef: x,
274
+ doClose: $,
275
+ handleClose: oe,
276
+ onCloseRequested: Me,
277
+ handleWrapperClick: ee,
278
+ handleInputEnter: ke,
279
+ handleAction: H,
280
+ t: c
281
+ };
282
+ }
283
+ });
284
+ function sn(e, o, t, i, l, s) {
285
+ const c = z("el-icon"), u = z("el-input"), m = z("el-button"), n = z("el-focus-trap"), M = z("el-overlay");
286
+ return f(), C(Le, {
287
+ name: "fade-in-linear",
288
+ onAfterLeave: (d) => e.$emit("vanish"),
289
+ persisted: ""
290
+ }, {
291
+ default: E(() => [
292
+ U(A(M, {
293
+ "z-index": e.zIndex,
294
+ "overlay-class": [e.ns.is("message-box"), e.modalClass],
295
+ mask: e.modal
296
+ }, {
297
+ default: E(() => [
298
+ b("div", {
299
+ role: "dialog",
300
+ "aria-label": e.title,
301
+ "aria-modal": "true",
302
+ "aria-describedby": e.showInput ? void 0 : e.contentId,
303
+ class: r(`${e.ns.namespace.value}-overlay-message-box`),
304
+ onClick: e.overlayEvent.onClick,
305
+ onMousedown: e.overlayEvent.onMousedown,
306
+ onMouseup: e.overlayEvent.onMouseup
307
+ }, [
308
+ A(n, {
309
+ loop: "",
310
+ trapped: e.visible,
311
+ "focus-trap-el": e.rootRef,
312
+ "focus-start-el": e.focusStartRef,
313
+ onReleaseRequested: e.onCloseRequested
314
+ }, {
315
+ default: E(() => [
316
+ b("div", {
317
+ ref: "rootRef",
318
+ class: r([
319
+ e.ns.b(),
320
+ e.customClass,
321
+ e.ns.is("draggable", e.draggable),
322
+ e.ns.is("dragging", e.isDragging),
323
+ { [e.ns.m("center")]: e.center }
324
+ ]),
325
+ style: G(e.customStyle),
326
+ tabindex: "-1",
327
+ onClick: K(() => {
328
+ }, ["stop"])
329
+ }, [
330
+ e.title !== null && e.title !== void 0 ? (f(), j("div", {
331
+ key: 0,
332
+ ref: "headerRef",
333
+ class: r([e.ns.e("header"), { "show-close": e.showClose }])
334
+ }, [
335
+ b("div", {
336
+ class: r(e.ns.e("title"))
337
+ }, [
338
+ e.iconComponent && e.center ? (f(), C(c, {
339
+ key: 0,
340
+ class: r([e.ns.e("status"), e.typeClass])
341
+ }, {
342
+ default: E(() => [
343
+ (f(), C(I(e.iconComponent)))
344
+ ]),
345
+ _: 1
346
+ }, 8, ["class"])) : S("v-if", !0),
347
+ b("span", null, L(e.title), 1)
348
+ ], 2),
349
+ e.showClose ? (f(), j("button", {
350
+ key: 0,
351
+ type: "button",
352
+ class: r(e.ns.e("headerbtn")),
353
+ "aria-label": e.t("el.messagebox.close"),
354
+ onClick: (d) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"),
355
+ onKeydown: N(K((d) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"])
356
+ }, [
357
+ A(c, {
358
+ class: r(e.ns.e("close"))
359
+ }, {
360
+ default: E(() => [
361
+ (f(), C(I(e.closeIcon || "close")))
362
+ ]),
363
+ _: 1
364
+ }, 8, ["class"])
365
+ ], 42, ["aria-label", "onClick", "onKeydown"])) : S("v-if", !0)
366
+ ], 2)) : S("v-if", !0),
367
+ b("div", {
368
+ id: e.contentId,
369
+ class: r(e.ns.e("content"))
370
+ }, [
371
+ b("div", {
372
+ class: r(e.ns.e("container"))
373
+ }, [
374
+ e.iconComponent && !e.center && e.hasMessage ? (f(), C(c, {
375
+ key: 0,
376
+ class: r([e.ns.e("status"), e.typeClass])
377
+ }, {
378
+ default: E(() => [
379
+ (f(), C(I(e.iconComponent)))
380
+ ]),
381
+ _: 1
382
+ }, 8, ["class"])) : S("v-if", !0),
383
+ e.hasMessage ? (f(), j("div", {
384
+ key: 1,
385
+ class: r(e.ns.e("message"))
386
+ }, [
387
+ pe(e.$slots, "default", {}, () => [
388
+ e.dangerouslyUseHTMLString ? (f(), C(I(e.showInput ? "label" : "p"), {
389
+ key: 1,
390
+ for: e.showInput ? e.inputId : void 0,
391
+ innerHTML: e.message
392
+ }, null, 8, ["for", "innerHTML"])) : (f(), C(I(e.showInput ? "label" : "p"), {
393
+ key: 0,
394
+ for: e.showInput ? e.inputId : void 0,
395
+ textContent: L(e.message)
396
+ }, null, 8, ["for", "textContent"]))
397
+ ])
398
+ ], 2)) : S("v-if", !0)
399
+ ], 2),
400
+ U(b("div", {
401
+ class: r(e.ns.e("input"))
402
+ }, [
403
+ A(u, {
404
+ id: e.inputId,
405
+ ref: "inputRef",
406
+ modelValue: e.inputValue,
407
+ "onUpdate:modelValue": (d) => e.inputValue = d,
408
+ type: e.inputType,
409
+ placeholder: e.inputPlaceholder,
410
+ "aria-invalid": e.validateError,
411
+ class: r({ invalid: e.validateError }),
412
+ onKeydown: N(e.handleInputEnter, ["enter"])
413
+ }, null, 8, ["id", "modelValue", "onUpdate:modelValue", "type", "placeholder", "aria-invalid", "class", "onKeydown"]),
414
+ b("div", {
415
+ class: r(e.ns.e("errormsg")),
416
+ style: G({
417
+ visibility: e.editorErrorMessage ? "visible" : "hidden"
418
+ })
419
+ }, L(e.editorErrorMessage), 7)
420
+ ], 2), [
421
+ [q, e.showInput]
422
+ ])
423
+ ], 10, ["id"]),
424
+ b("div", {
425
+ class: r(e.ns.e("btns"))
426
+ }, [
427
+ e.showCancelButton ? (f(), C(m, {
428
+ key: 0,
429
+ loading: e.cancelButtonLoading,
430
+ "loading-icon": e.cancelButtonLoadingIcon,
431
+ class: r([e.cancelButtonClass]),
432
+ round: e.roundButton,
433
+ size: e.btnSize,
434
+ onClick: (d) => e.handleAction("cancel"),
435
+ onKeydown: N(K((d) => e.handleAction("cancel"), ["prevent"]), ["enter"])
436
+ }, {
437
+ default: E(() => [
438
+ le(L(e.cancelButtonText || e.t("el.messagebox.cancel")), 1)
439
+ ]),
440
+ _: 1
441
+ }, 8, ["loading", "loading-icon", "class", "round", "size", "onClick", "onKeydown"])) : S("v-if", !0),
442
+ U(A(m, {
443
+ ref: "confirmRef",
444
+ type: "primary",
445
+ loading: e.confirmButtonLoading,
446
+ "loading-icon": e.confirmButtonLoadingIcon,
447
+ class: r([e.confirmButtonClasses]),
448
+ round: e.roundButton,
449
+ disabled: e.confirmButtonDisabled,
450
+ size: e.btnSize,
451
+ onClick: (d) => e.handleAction("confirm"),
452
+ onKeydown: N(K((d) => e.handleAction("confirm"), ["prevent"]), ["enter"])
453
+ }, {
454
+ default: E(() => [
455
+ le(L(e.confirmButtonText || e.t("el.messagebox.confirm")), 1)
456
+ ]),
457
+ _: 1
458
+ }, 8, ["loading", "loading-icon", "class", "round", "disabled", "size", "onClick", "onKeydown"]), [
459
+ [q, e.showConfirmButton]
460
+ ])
461
+ ], 2)
462
+ ], 14, ["onClick"])
463
+ ]),
464
+ _: 3
465
+ }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
466
+ ], 42, ["aria-label", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
467
+ ]),
468
+ _: 3
469
+ }, 8, ["z-index", "overlay-class", "mask"]), [
470
+ [q, e.visible]
471
+ ])
472
+ ]),
473
+ _: 3
474
+ }, 8, ["onAfterLeave"]);
475
+ }
476
+ var ln = /* @__PURE__ */ he(tn, [["render", sn], ["__file", "index.vue"]]);
477
+ const O = /* @__PURE__ */ new Map(), an = (e) => {
478
+ let o = document.body;
479
+ return e.appendTo && (Y(e.appendTo) && (o = document.querySelector(e.appendTo)), ie(e.appendTo) && (o = e.appendTo), ie(o) || (o = document.body)), o;
480
+ }, rn = (e, o, t = null) => {
481
+ const i = A(ln, e, Z(e.message) || ge(e.message) ? {
482
+ default: Z(e.message) ? e.message : () => e.message
483
+ } : null);
484
+ return i.appContext = t, ve(i, o), an(e).appendChild(o.firstElementChild), i.component;
485
+ }, un = () => document.createElement("div"), cn = (e, o) => {
486
+ const t = un();
487
+ e.onVanish = () => {
488
+ ve(null, t), O.delete(l);
489
+ }, e.onAction = (s) => {
490
+ const c = O.get(l);
491
+ let u;
492
+ e.showInput ? u = { value: l.inputValue, action: s } : u = s, e.callback ? e.callback(u, i.proxy) : s === "cancel" || s === "close" ? e.distinguishCancelAndClose && s !== "cancel" ? c.reject("close") : c.reject("cancel") : c.resolve(u);
493
+ };
494
+ const i = rn(e, t, o), l = i.proxy;
495
+ for (const s in e)
496
+ ae(e, s) && !ae(l.$props, s) && (s === "closeIcon" && ye(e[s]) ? l[s] = W(e[s]) : l[s] = e[s]);
497
+ return l.visible = !0, l;
498
+ };
499
+ function R(e, o = null) {
500
+ if (!De)
501
+ return Promise.reject();
502
+ let t;
503
+ return Y(e) || ge(e) ? e = {
504
+ message: e
505
+ } : t = e.callback, new Promise((i, l) => {
506
+ const s = cn(e, o ?? R._context);
507
+ O.set(s, {
508
+ options: e,
509
+ callback: t,
510
+ resolve: i,
511
+ reject: l
512
+ });
513
+ });
514
+ }
515
+ const dn = ["alert", "confirm", "prompt"], fn = {
516
+ alert: { closeOnPressEscape: !1, closeOnClickModal: !1 },
517
+ confirm: { showCancelButton: !0 },
518
+ prompt: { showCancelButton: !0, showInput: !0 }
519
+ };
520
+ dn.forEach((e) => {
521
+ R[e] = mn(e);
522
+ });
523
+ function mn(e) {
524
+ return (o, t, i, l) => {
525
+ let s = "";
526
+ return ye(t) ? (i = t, s = "") : X(t) ? s = "" : s = t, R(Object.assign({
527
+ title: s,
528
+ message: o,
529
+ type: "",
530
+ ...fn[e]
531
+ }, i, {
532
+ boxType: e
533
+ }), l);
534
+ };
535
+ }
536
+ R.close = () => {
537
+ O.forEach((e, o) => {
538
+ o.doClose();
539
+ }), O.clear();
540
+ };
541
+ R._context = null;
542
+ const B = R;
543
+ B.install = (e) => {
544
+ B._context = e._context, e.config.globalProperties.$msgbox = B, e.config.globalProperties.$messageBox = B, e.config.globalProperties.$alert = B.alert, e.config.globalProperties.$confirm = B.confirm, e.config.globalProperties.$prompt = B.prompt;
545
+ };
546
+ const Sn = B;
547
+ export {
548
+ Sn as E,
549
+ Mn as a
550
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("vue"),i=require("./base-ef747d02.cjs"),k=require("./el-scrollbar-691cfc11.cjs"),Q=require("./el-button-fc46a173.cjs"),Y=require("./el-input-9c912678.cjs"),A=require("./el-overlay-96630a2e.cjs"),N=require("./index-f6afafaa.cjs"),z=require("./el-popper-73466d7a.cjs"),x=require("./validator-0e688e4e.cjs"),_=require("./use-global-config-03735617.cjs"),F=require("./index-3a74eae4.cjs"),ee=require("./el-dialog-0b7166c9.cjs"),ne=i.buildProps({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:k.componentSizes,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),oe=n.defineComponent({name:"ElText"}),te=n.defineComponent({...oe,props:ne,setup(e){const t=e,l=n.ref(),c=k.useFormSize(),a=i.useNamespace("text"),s=n.computed(()=>[a.b(),a.m(t.type),a.m(c.value),a.is("truncated",t.truncated),a.is("line-clamp",!i.isUndefined(t.lineClamp))]),d=()=>{var u,m,o,B,f,T,M;if(n.useAttrs().title)return;let C=!1;const I=((u=l.value)==null?void 0:u.textContent)||"";if(t.truncated){const p=(m=l.value)==null?void 0:m.offsetWidth,h=(o=l.value)==null?void 0:o.scrollWidth;p&&h&&h>p&&(C=!0)}else if(!i.isUndefined(t.lineClamp)){const p=(B=l.value)==null?void 0:B.offsetHeight,h=(f=l.value)==null?void 0:f.scrollHeight;p&&h&&h>p&&(C=!0)}C?(T=l.value)==null||T.setAttribute("title",I):(M=l.value)==null||M.removeAttribute("title")};return n.onMounted(d),n.onUpdated(d),(u,m)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(u.tag),{ref_key:"textRef",ref:l,class:n.normalizeClass(n.unref(s)),style:n.normalizeStyle({"-webkit-line-clamp":u.lineClamp})},{default:n.withCtx(()=>[n.renderSlot(u.$slots,"default")]),_:3},8,["class","style"]))}});var le=i._export_sfc(te,[["__file","text.vue"]]);const se=i.withInstall(le),D="_trap-focus-children",b=[],K=e=>{if(b.length===0)return;const t=b[b.length-1][D];if(t.length>0&&e.code===z.EVENT_CODE.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const l=e.shiftKey,c=e.target===t[0],a=e.target===t[t.length-1];c&&l&&(e.preventDefault(),t[t.length-1].focus()),a&&!l&&(e.preventDefault(),t[0].focus())}},ae={beforeMount(e){e[D]=z.obtainAllFocusableElements(e),b.push(e),b.length<=1&&document.addEventListener("keydown",K)},updated(e){n.nextTick(()=>{e[D]=z.obtainAllFocusableElements(e)})},unmounted(){b.shift(),b.length===0&&document.removeEventListener("keydown",K)}},re=n.defineComponent({name:"ElMessageBox",directives:{TrapFocus:ae},components:{ElButton:Q.ElButton,ElFocusTrap:z.ElFocusTrap,ElInput:Y.ElInput,ElOverlay:A.ElOverlay,ElIcon:N.ElIcon,...k.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:x.isValidComponentSize},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:l,zIndex:c,ns:a,size:s}=_.useGlobalComponentSettings("message-box",n.computed(()=>e.buttonSize)),{t:d}=l,{nextZIndex:u}=c,m=n.ref(!1),o=n.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:n.markRaw(N.loading_default),cancelButtonLoadingIcon:n.markRaw(N.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:u()}),B=n.computed(()=>{const r=o.type;return{[a.bm("icon",r)]:r&&k.TypeComponentsMap[r]}}),f=F.useId(),T=F.useId(),M=n.computed(()=>{const r=o.type;return o.icon||r&&k.TypeComponentsMap[r]||""}),R=n.computed(()=>!!o.message),C=n.ref(),I=n.ref(),p=n.ref(),h=n.ref(),O=n.ref(),U=n.computed(()=>o.confirmButtonClass);n.watch(()=>o.inputValue,async r=>{await n.nextTick(),e.boxType==="prompt"&&r&&L()},{immediate:!0}),n.watch(()=>m.value,r=>{var v,g;r&&(e.boxType!=="prompt"&&(o.autofocus?p.value=(g=(v=O.value)==null?void 0:v.$el)!=null?g:C.value:p.value=C.value),o.zIndex=u()),e.boxType==="prompt"&&(r?n.nextTick().then(()=>{var q;h.value&&h.value.$el&&(o.autofocus?p.value=(q=Z())!=null?q:C.value:p.value=C.value)}):(o.editorErrorMessage="",o.validateError=!1))});const H=n.computed(()=>e.draggable),j=n.computed(()=>e.overflow),{isDragging:G}=ee.useDraggable(C,I,H,j);n.onMounted(async()=>{await n.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",w)}),n.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",w)});function w(){m.value&&(m.value=!1,n.nextTick(()=>{o.action&&t("action",o.action)}))}const $=()=>{e.closeOnClickModal&&V(o.distinguishCancelAndClose?"close":"cancel")},W=A.useSameTarget($),X=r=>{if(o.inputType!=="textarea")return r.preventDefault(),V("confirm")},V=r=>{var v;e.boxType==="prompt"&&r==="confirm"&&!L()||(o.action=r,o.beforeClose?(v=o.beforeClose)==null||v.call(o,r,o,w):w())},L=()=>{if(e.boxType==="prompt"){const r=o.inputPattern;if(r&&!r.test(o.inputValue||""))return o.editorErrorMessage=o.inputErrorMessage||d("el.messagebox.error"),o.validateError=!0,!1;const v=o.inputValidator;if(i.isFunction(v)){const g=v(o.inputValue);if(g===!1)return o.editorErrorMessage=o.inputErrorMessage||d("el.messagebox.error"),o.validateError=!0,!1;if(i.isString(g))return o.editorErrorMessage=g,o.validateError=!0,!1}}return o.editorErrorMessage="",o.validateError=!1,!0},Z=()=>{var r,v;const g=(r=h.value)==null?void 0:r.$refs;return(v=g==null?void 0:g.input)!=null?v:g==null?void 0:g.textarea},P=()=>{V("close")},J=()=>{e.closeOnPressEscape&&P()};return e.lockScroll&&A.useLockscreen(m),{...n.toRefs(o),ns:a,overlayEvent:W,visible:m,hasMessage:R,typeClass:B,contentId:f,inputId:T,btnSize:s,iconComponent:M,confirmButtonClasses:U,rootRef:C,focusStartRef:p,headerRef:I,inputRef:h,isDragging:G,confirmRef:O,doClose:w,handleClose:P,onCloseRequested:J,handleWrapperClick:$,handleInputEnter:X,handleAction:V,t:d}}});function ie(e,t,l,c,a,s){const d=n.resolveComponent("el-icon"),u=n.resolveComponent("el-input"),m=n.resolveComponent("el-button"),o=n.resolveComponent("el-focus-trap"),B=n.resolveComponent("el-overlay");return n.openBlock(),n.createBlock(n.Transition,{name:"fade-in-linear",onAfterLeave:f=>e.$emit("vanish"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(B,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:n.withCtx(()=>[n.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:n.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[n.createVNode(o,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:n.withCtx(()=>[n.createElementVNode("div",{ref:"rootRef",class:n.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:n.normalizeStyle(e.customStyle),tabindex:"-1",onClick:n.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"headerRef",class:n.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(n.openBlock(),n.createBlock(d,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),n.createElementVNode("span",null,n.toDisplayString(e.title),1)],2),e.showClose?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:n.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[n.createVNode(d,{class:n.normalizeClass(e.ns.e("close"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):n.createCommentVNode("v-if",!0)],2)):n.createCommentVNode("v-if",!0),n.createElementVNode("div",{id:e.contentId,class:n.normalizeClass(e.ns.e("content"))},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(n.openBlock(),n.createBlock(d,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),e.hasMessage?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.ns.e("message"))},[n.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:n.toDisplayString(e.message)},null,8,["for","textContent"]))])],2)):n.createCommentVNode("v-if",!0)],2),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("input"))},[n.createVNode(u,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":f=>e.inputValue=f,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:n.normalizeClass({invalid:e.validateError}),onKeydown:n.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("errormsg")),style:n.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},n.toDisplayString(e.editorErrorMessage),7)],2),[[n.vShow,e.showInput]])],10,["id"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(n.openBlock(),n.createBlock(m,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:n.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:f=>e.handleAction("cancel"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):n.createCommentVNode("v-if",!0),n.withDirectives(n.createVNode(m,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:n.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:f=>e.handleAction("confirm"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[n.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[n.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var ce=i._export_sfc(re,[["render",ie],["__file","index.vue"]]);const S=new Map,ue=e=>{let t=document.body;return e.appendTo&&(i.isString(e.appendTo)&&(t=document.querySelector(e.appendTo)),i.isElement(e.appendTo)&&(t=e.appendTo),i.isElement(t)||(t=document.body)),t},de=(e,t,l=null)=>{const c=n.createVNode(ce,e,i.isFunction(e.message)||n.isVNode(e.message)?{default:i.isFunction(e.message)?e.message:()=>e.message}:null);return c.appContext=l,n.render(c,t),ue(e).appendChild(t.firstElementChild),c.component},fe=()=>document.createElement("div"),me=(e,t)=>{const l=fe();e.onVanish=()=>{n.render(null,l),S.delete(a)},e.onAction=s=>{const d=S.get(a);let u;e.showInput?u={value:a.inputValue,action:s}:u=s,e.callback?e.callback(u,c.proxy):s==="cancel"||s==="close"?e.distinguishCancelAndClose&&s!=="cancel"?d.reject("close"):d.reject("cancel"):d.resolve(u)};const c=de(e,l,t),a=c.proxy;for(const s in e)i.hasOwn(e,s)&&!i.hasOwn(a.$props,s)&&(s==="closeIcon"&&i.isObject(e[s])?a[s]=n.markRaw(e[s]):a[s]=e[s]);return a.visible=!0,a};function E(e,t=null){if(!i.isClient)return Promise.reject();let l;return i.isString(e)||n.isVNode(e)?e={message:e}:l=e.callback,new Promise((c,a)=>{const s=me(e,t??E._context);S.set(s,{options:e,callback:l,resolve:c,reject:a})})}const pe=["alert","confirm","prompt"],ve={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};pe.forEach(e=>{E[e]=ge(e)});function ge(e){return(t,l,c,a)=>{let s="";return i.isObject(l)?(c=l,s=""):i.isUndefined(l)?s="":s=l,E(Object.assign({title:s,message:t,type:"",...ve[e]},c,{boxType:e}),a)}}E.close=()=>{S.forEach((e,t)=>{t.doClose()}),S.clear()};E._context=null;const y=E;y.install=e=>{y._context=e._context,e.config.globalProperties.$msgbox=y,e.config.globalProperties.$messageBox=y,e.config.globalProperties.$alert=y.alert,e.config.globalProperties.$confirm=y.confirm,e.config.globalProperties.$prompt=y.prompt};const Ce=y;exports.ElMessageBox=Ce;exports.ElText=se;