st-comp 0.0.279 → 0.0.280

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 (229) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +13 -14
  3. package/es/CustomFunction.cjs +2 -2
  4. package/es/CustomFunction.js +342 -547
  5. package/es/FactorWarning.cjs +1 -1
  6. package/es/FactorWarning.js +294 -294
  7. package/es/Kline.cjs +1 -1
  8. package/es/Kline.js +19 -19
  9. package/es/KlineBasic.cjs +1 -1
  10. package/es/KlineBasic.js +253 -253
  11. package/es/KlineConfig.cjs +1 -1
  12. package/es/KlineConfig.js +579 -553
  13. package/es/KlineNew.cjs +1 -1
  14. package/es/KlineNew.js +17 -17
  15. package/es/KlinePlus.cjs +2 -2
  16. package/es/KlinePlus.js +23 -24
  17. package/es/MonacoEditor.cjs +1 -1
  18. package/es/MonacoEditor.js +30 -29
  19. package/es/Pagination.cjs +1 -1
  20. package/es/Pagination.js +517 -425
  21. package/es/PasswordPrompt.cjs +1 -1
  22. package/es/PasswordPrompt.js +3 -3
  23. package/es/Table.cjs +1 -1
  24. package/es/Table.js +46 -46
  25. package/es/User.cjs +1 -1
  26. package/es/User.js +898 -866
  27. package/es/VarSelectDialog.cjs +3 -3
  28. package/es/VarSelectDialog.js +110 -109
  29. package/es/VarietyAiHelper.cjs +7 -7
  30. package/es/VarietyAiHelper.js +605 -443
  31. package/es/VarietyAutoComplete.cjs +1 -1
  32. package/es/VarietyAutoComplete.js +11 -11
  33. package/es/VarietySearch.cjs +18 -18
  34. package/es/VarietySearch.js +3079 -2913
  35. package/es/{VarietySelect-d58eee29.cjs → VarietySelect-aa082a9c.cjs} +1 -1
  36. package/es/{VarietySelect-41daac7b.js → VarietySelect-c402bade.js} +5 -5
  37. package/es/VarietyTextCopy.cjs +3 -3
  38. package/es/VarietyTextCopy.js +51 -51
  39. package/es/VirtualTable.cjs +13 -1
  40. package/es/VirtualTable.js +1929 -2261
  41. package/es/_baseClone-10bdb989.cjs +1 -0
  42. package/es/_baseClone-98af8b33.js +210 -0
  43. package/es/base-d987e5c9.cjs +5 -0
  44. package/es/base-dd156b8e.js +790 -0
  45. package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
  46. package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
  47. package/es/clamp-17c4d8aa.cjs +1 -0
  48. package/es/clamp-c7512966.js +10 -0
  49. package/es/config-provider-33a127c4.cjs +1 -0
  50. package/es/config-provider-563023c9.js +86 -0
  51. package/es/debounce-0a98a9c6.js +57 -0
  52. package/es/debounce-37b17615.cjs +1 -0
  53. package/es/dropdown-ce7496c7.cjs +1 -0
  54. package/es/dropdown-feea8702.js +178 -0
  55. package/es/el-autocomplete-d9253bba.cjs +1 -0
  56. package/es/el-autocomplete-eac54f9f.js +434 -0
  57. package/es/el-button-8259594b.cjs +1 -0
  58. package/es/el-button-8a9721f8.js +343 -0
  59. package/es/el-checkbox-6303fc92.cjs +1 -0
  60. package/es/el-checkbox-c328b097.js +566 -0
  61. package/es/el-dialog-67536fac.js +252 -0
  62. package/es/el-dialog-8788bcc1.cjs +1 -0
  63. package/es/el-divider-3f0320be.cjs +1 -0
  64. package/es/el-divider-c5d72961.js +51 -0
  65. package/es/el-empty-552baf04.js +159 -0
  66. package/es/el-empty-58bc2a10.cjs +1 -0
  67. package/es/el-form-item-8efcf2c3.js +1265 -0
  68. package/es/el-form-item-95e68669.cjs +12 -0
  69. package/es/el-input-c8a9bb71.cjs +1 -0
  70. package/es/el-input-e66500b7.js +761 -0
  71. package/es/el-input-number-68ee0d65.js +390 -0
  72. package/es/el-input-number-d7a81922.cjs +1 -0
  73. package/es/el-loading-62132db2.cjs +1 -0
  74. package/es/el-loading-db4c6d13.js +190 -0
  75. package/es/el-menu-item-4b8e7794.cjs +1 -0
  76. package/es/el-menu-item-c2523d82.js +824 -0
  77. package/es/el-message-box-7c13546c.js +481 -0
  78. package/es/el-message-box-fed174f0.cjs +1 -0
  79. package/es/el-overlay-17299785.cjs +1 -0
  80. package/es/el-overlay-36f223e9.js +444 -0
  81. package/es/el-popconfirm-520b2928.cjs +1 -0
  82. package/es/el-popconfirm-a857c54a.js +190 -0
  83. package/es/el-popper-852446fd.js +2235 -0
  84. package/es/el-popper-f824c63b.cjs +1 -0
  85. package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
  86. package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
  87. package/es/el-segmented-45dcc036.cjs +1 -0
  88. package/es/el-segmented-bf08279f.js +168 -0
  89. package/es/el-select-a34348e1.js +1535 -0
  90. package/es/el-select-d2958ae8.cjs +1 -0
  91. package/es/el-table-column-ad70ee0e.cjs +14 -0
  92. package/es/el-table-column-e2be313e.js +3651 -0
  93. package/es/el-tag-527f06f0.cjs +1 -0
  94. package/es/el-tag-9bcfae32.js +77 -0
  95. package/es/el-text-f9379288.js +84 -0
  96. package/es/el-text-fc345ffd.cjs +1 -0
  97. package/es/index-2419d69a.js +468 -0
  98. package/es/index-3806160e.js +710 -0
  99. package/es/index-3a0a7c36.cjs +1 -0
  100. package/es/index-3e7d5ffb.cjs +1 -0
  101. package/es/index-3ed0c678.cjs +1 -0
  102. package/es/index-47d30a52.js +372 -0
  103. package/es/index-5dec535a.cjs +1 -0
  104. package/es/index-5e76a22d.cjs +1 -0
  105. package/es/{index-eb96e074.js → index-60900c6c.js} +223 -254
  106. package/es/{index-a33b2fb8.js → index-69d2353a.js} +5090 -5090
  107. package/es/index-71ba4c28.cjs +1 -0
  108. package/es/index-7711aa69.cjs +1 -0
  109. package/es/index-7c4d8f5d.js +47 -0
  110. package/es/index-86678b72.js +131 -0
  111. package/es/index-99bb359f.cjs +1 -0
  112. package/es/index-99d4335d.cjs +1 -0
  113. package/es/index-a0522466.js +413 -0
  114. package/es/index-a181f161.js +429 -0
  115. package/es/index-b9a26e7f.js +141 -0
  116. package/es/{index-a9246d17.cjs → index-bb0bc131.cjs} +109 -109
  117. package/es/index-d372e68f.cjs +5 -0
  118. package/es/index-de9ad85c.js +12 -0
  119. package/es/{index-44a382a5.js → index-dfb34e00.js} +12 -12
  120. package/es/index-f5474dcc.cjs +3 -0
  121. package/es/{python-8a1664e6.js → python-6eafa04b.js} +32 -31
  122. package/es/{python-a3db9620.cjs → python-922eca89.cjs} +1 -1
  123. package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
  124. package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
  125. package/es/scroll-07bade1e.cjs +1 -0
  126. package/es/scroll-70271cb1.js +35 -0
  127. package/es/style.css +1 -1
  128. package/es/toNumber-b47ceb68.cjs +1 -0
  129. package/es/toNumber-f077c66a.js +31 -0
  130. package/es/use-form-item-0a831287.cjs +2 -0
  131. package/es/use-form-item-187cd7db.js +422 -0
  132. package/es/use-global-config-17dafd40.js +71 -0
  133. package/es/use-global-config-c90c91f7.cjs +1 -0
  134. package/es/{validator-c60a8956.js → validator-800ed2ba.js} +1 -1
  135. package/es/validator-ee5bc3eb.cjs +1 -0
  136. package/es/vnode-6f7b84f0.cjs +1 -0
  137. package/es/vnode-8ee9bf4e.js +12 -0
  138. package/es/{zh-cn-b59a0910.js → zh-cn-26cc7233.js} +36 -33
  139. package/es/zh-cn-a22a6792.cjs +1 -0
  140. package/lib/bundle.js +1 -1
  141. package/lib/bundle.umd.cjs +271 -252
  142. package/lib/{index-62fa175a.js → index-74ed48c6.js} +54107 -52151
  143. package/lib/{python-4a48fa39.js → python-7aaa84e4.js} +1 -1
  144. package/lib/style.css +1 -1
  145. package/package.json +1 -1
  146. package/es/_initCloneObject-5e73c9c8.js +0 -81
  147. package/es/_initCloneObject-a5832933.cjs +0 -1
  148. package/es/base-a5af3db3.js +0 -288
  149. package/es/base-ef747d02.cjs +0 -5
  150. package/es/config-provider-06ea6b42.cjs +0 -1
  151. package/es/config-provider-88b637a8.js +0 -59
  152. package/es/dayjs.min-2c20abe6.cjs +0 -1
  153. package/es/dayjs.min-8313b006.js +0 -299
  154. package/es/debounce-62f5b6e8.cjs +0 -1
  155. package/es/debounce-8d53f4dd.js +0 -83
  156. package/es/dropdown-4ce4c3e2.cjs +0 -1
  157. package/es/dropdown-72fbc15d.js +0 -178
  158. package/es/el-autocomplete-6cafcdf1.js +0 -329
  159. package/es/el-autocomplete-e0857c5b.cjs +0 -1
  160. package/es/el-button-613e0bb2.cjs +0 -1
  161. package/es/el-button-94d3de38.js +0 -272
  162. package/es/el-checkbox-6d4cb393.js +0 -459
  163. package/es/el-checkbox-e90762df.cjs +0 -1
  164. package/es/el-dialog-02942e22.cjs +0 -1
  165. package/es/el-dialog-5e30161f.js +0 -276
  166. package/es/el-divider-4713d74c.cjs +0 -1
  167. package/es/el-divider-4e059794.js +0 -45
  168. package/es/el-empty-1697ded8.cjs +0 -1
  169. package/es/el-empty-33cb66f1.js +0 -183
  170. package/es/el-form-item-44f060d8.cjs +0 -12
  171. package/es/el-form-item-9e8969ea.js +0 -1269
  172. package/es/el-input-342b2def.js +0 -531
  173. package/es/el-input-9a9a7f7f.cjs +0 -1
  174. package/es/el-input-number-65c847d6.cjs +0 -1
  175. package/es/el-input-number-c22b803a.js +0 -311
  176. package/es/el-loading-8179b497.cjs +0 -1
  177. package/es/el-loading-bcc51e3d.js +0 -203
  178. package/es/el-menu-item-339baf6d.js +0 -768
  179. package/es/el-menu-item-83186444.cjs +0 -1
  180. package/es/el-message-box-035b699c.js +0 -489
  181. package/es/el-message-box-c62d3217.cjs +0 -1
  182. package/es/el-overlay-3e17604b.js +0 -324
  183. package/es/el-overlay-8f1da9e8.cjs +0 -1
  184. package/es/el-popconfirm-4e32ec1b.cjs +0 -1
  185. package/es/el-popconfirm-f8a86e2c.js +0 -162
  186. package/es/el-popper-a4f3ae4d.cjs +0 -1
  187. package/es/el-popper-fbd0dcea.js +0 -2094
  188. package/es/el-segmented-56bd58a8.js +0 -142
  189. package/es/el-segmented-833ac177.cjs +0 -1
  190. package/es/el-select-44fa547d.js +0 -1256
  191. package/es/el-select-70806166.cjs +0 -1
  192. package/es/el-table-column-3e2cdfca.cjs +0 -14
  193. package/es/el-table-column-b74a857d.js +0 -3432
  194. package/es/el-tag-66c83156.js +0 -117
  195. package/es/el-tag-9c2f329f.cjs +0 -1
  196. package/es/el-text-034bd3f4.js +0 -67
  197. package/es/el-text-6b2374bb.cjs +0 -1
  198. package/es/index-00f6ca75.cjs +0 -1
  199. package/es/index-185792a7.cjs +0 -1
  200. package/es/index-1e2a38ab.js +0 -113
  201. package/es/index-2e331d74.js +0 -10
  202. package/es/index-3153c1db.cjs +0 -1
  203. package/es/index-5216d5f5.js +0 -406
  204. package/es/index-5c0dd943.cjs +0 -1
  205. package/es/index-657047bb.js +0 -513
  206. package/es/index-870b6c9d.cjs +0 -1
  207. package/es/index-8c2d7e05.js +0 -368
  208. package/es/index-960806da.js +0 -314
  209. package/es/index-9780a537.cjs +0 -1
  210. package/es/index-9d16cea8.cjs +0 -1
  211. package/es/index-ac8dc53d.cjs +0 -1
  212. package/es/index-bb833443.cjs +0 -1
  213. package/es/index-c5f2d372.js +0 -326
  214. package/es/index-c6584658.js +0 -163
  215. package/es/index-d77a7336.js +0 -204
  216. package/es/index-eea0bcb3.cjs +0 -1
  217. package/es/index-f034b910.js +0 -60
  218. package/es/index-f1c702f6.cjs +0 -1
  219. package/es/index-f58b2920.cjs +0 -1
  220. package/es/scroll-679bd6bf.js +0 -35
  221. package/es/scroll-b108dabd.cjs +0 -1
  222. package/es/use-form-common-props-ac666630.cjs +0 -1
  223. package/es/use-form-common-props-ed72e914.js +0 -364
  224. package/es/use-global-config-23472471.cjs +0 -1
  225. package/es/use-global-config-ee406d58.js +0 -72
  226. package/es/validator-366dbf39.cjs +0 -1
  227. package/es/vnode-5ddb7ed1.js +0 -14
  228. package/es/vnode-b906ae6d.cjs +0 -1
  229. package/es/zh-cn-c21d12d8.cjs +0 -1
@@ -0,0 +1,481 @@
1
+ import { D as x, B as j, a as W, y as he, E as _, k as ie, i as Ee, F as ee, v as Be } from "./base-dd156b8e.js";
2
+ import { g as we, a as Te, f as Me, _ as ke } from "./el-popper-852446fd.js";
3
+ import { T as Ie, m as ne } from "./use-form-item-187cd7db.js";
4
+ import { i as Se } from "./validator-800ed2ba.js";
5
+ import { nextTick as O, defineComponent as Ae, computed as b, ref as w, reactive as Le, markRaw as q, watch as oe, onMounted as $e, onBeforeUnmount as Oe, toRefs as Ve, resolveComponent as A, openBlock as c, createBlock as p, Transition as Re, withCtx as v, withDirectives as N, createVNode as T, createElementVNode as y, normalizeClass as i, normalizeStyle as te, withModifiers as z, createElementBlock as D, resolveDynamicComponent as L, createCommentVNode as h, toDisplayString as $, withKeys as P, renderSlot as ze, vShow as U, createTextVNode as se, isVNode as ue, render as de } from "vue";
6
+ import { u as De } from "./el-dialog-67536fac.js";
7
+ import { E as Pe, b as Fe, c as He } from "./el-overlay-36f223e9.js";
8
+ import { a as ae } from "./index-a181f161.js";
9
+ import { E as Ne, l as le } from "./index-60900c6c.js";
10
+ import { E as Ue } from "./el-input-e66500b7.js";
11
+ import { u as Ke } from "./use-global-config-17dafd40.js";
12
+ import { E as je } from "./el-button-8a9721f8.js";
13
+ const G = "_trap-focus-children", E = [], re = (e) => {
14
+ if (E.length === 0)
15
+ return;
16
+ const n = we(e), t = E[E.length - 1][G];
17
+ if (t.length > 0 && n === Te.tab) {
18
+ if (t.length === 1) {
19
+ e.preventDefault(), document.activeElement !== t[0] && t[0].focus();
20
+ return;
21
+ }
22
+ const l = e.shiftKey, r = e.target === t[0], a = e.target === t[t.length - 1];
23
+ r && l && (e.preventDefault(), t[t.length - 1].focus()), a && !l && (e.preventDefault(), t[0].focus());
24
+ }
25
+ }, qe = {
26
+ beforeMount(e) {
27
+ e[G] = x(e), E.push(e), E.length <= 1 && document.addEventListener("keydown", re);
28
+ },
29
+ updated(e) {
30
+ O(() => {
31
+ e[G] = x(e);
32
+ });
33
+ },
34
+ unmounted() {
35
+ E.shift(), E.length === 0 && document.removeEventListener("keydown", re);
36
+ }
37
+ };
38
+ var Ge = Ae({
39
+ name: "ElMessageBox",
40
+ directives: { TrapFocus: qe },
41
+ components: {
42
+ ElButton: je,
43
+ ElFocusTrap: Me,
44
+ ElInput: Ue,
45
+ ElOverlay: Pe,
46
+ ElIcon: Ne,
47
+ ...Ie
48
+ },
49
+ inheritAttrs: !1,
50
+ props: {
51
+ buttonSize: {
52
+ type: String,
53
+ validator: Se
54
+ },
55
+ modal: {
56
+ type: Boolean,
57
+ default: !0
58
+ },
59
+ lockScroll: {
60
+ type: Boolean,
61
+ default: !0
62
+ },
63
+ showClose: {
64
+ type: Boolean,
65
+ default: !0
66
+ },
67
+ closeOnClickModal: {
68
+ type: Boolean,
69
+ default: !0
70
+ },
71
+ closeOnPressEscape: {
72
+ type: Boolean,
73
+ default: !0
74
+ },
75
+ closeOnHashChange: {
76
+ type: Boolean,
77
+ default: !0
78
+ },
79
+ center: Boolean,
80
+ draggable: Boolean,
81
+ overflow: Boolean,
82
+ roundButton: Boolean,
83
+ container: {
84
+ type: String,
85
+ default: "body"
86
+ },
87
+ boxType: {
88
+ type: String,
89
+ default: ""
90
+ }
91
+ },
92
+ emits: ["vanish", "action"],
93
+ setup(e, { emit: n }) {
94
+ const { locale: t, zIndex: l, ns: r, size: a } = Ke("message-box", b(() => e.buttonSize)), { t: f } = t, { nextZIndex: m } = l, g = w(!1), o = Le({
95
+ autofocus: !0,
96
+ beforeClose: null,
97
+ callback: null,
98
+ cancelButtonText: "",
99
+ cancelButtonClass: "",
100
+ confirmButtonText: "",
101
+ confirmButtonClass: "",
102
+ cancelButtonType: "",
103
+ confirmButtonType: "primary",
104
+ customClass: "",
105
+ customStyle: {},
106
+ dangerouslyUseHTMLString: !1,
107
+ distinguishCancelAndClose: !1,
108
+ icon: "",
109
+ closeIcon: "",
110
+ inputPattern: null,
111
+ inputPlaceholder: "",
112
+ inputType: "text",
113
+ inputValue: "",
114
+ inputValidator: void 0,
115
+ inputErrorMessage: "",
116
+ message: "",
117
+ modalFade: !0,
118
+ modalClass: "",
119
+ showCancelButton: !1,
120
+ showConfirmButton: !0,
121
+ type: "",
122
+ title: void 0,
123
+ showInput: !1,
124
+ action: "",
125
+ confirmButtonLoading: !1,
126
+ cancelButtonLoading: !1,
127
+ confirmButtonLoadingIcon: q(le),
128
+ cancelButtonLoadingIcon: q(le),
129
+ confirmButtonDisabled: !1,
130
+ editorErrorMessage: "",
131
+ validateError: !1,
132
+ zIndex: m()
133
+ }), F = b(() => {
134
+ const s = o.type;
135
+ return { [r.bm("icon", s)]: s && ne[s] };
136
+ }), u = ae(), ce = ae(), fe = b(() => {
137
+ const s = o.type;
138
+ return o.icon || s && ne[s] || "";
139
+ }), me = b(() => !!o.message), B = w(), X = w(), k = w(), I = w(), Z = w(), pe = b(() => o.confirmButtonClass);
140
+ oe(() => o.inputValue, async (s) => {
141
+ await O(), e.boxType === "prompt" && s && Q();
142
+ }, { immediate: !0 }), oe(() => g.value, (s) => {
143
+ var d;
144
+ s && (e.boxType !== "prompt" && (o.autofocus ? k.value = ((d = Z.value) == null ? void 0 : d.$el) ?? B.value : k.value = B.value), o.zIndex = m()), e.boxType === "prompt" && (s ? O().then(() => {
145
+ I.value && I.value.$el && (o.autofocus ? k.value = Ce() ?? B.value : k.value = B.value);
146
+ }) : (o.editorErrorMessage = "", o.validateError = !1));
147
+ });
148
+ const { isDragging: ge } = De(B, X, b(() => e.draggable), b(() => e.overflow));
149
+ $e(async () => {
150
+ await O(), e.closeOnHashChange && window.addEventListener("hashchange", S);
151
+ }), Oe(() => {
152
+ e.closeOnHashChange && window.removeEventListener("hashchange", S);
153
+ });
154
+ function S() {
155
+ g.value && (g.value = !1, O(() => {
156
+ o.action && n("action", o.action);
157
+ }));
158
+ }
159
+ const J = () => {
160
+ e.closeOnClickModal && R(o.distinguishCancelAndClose ? "close" : "cancel");
161
+ }, ve = He(J), ye = (s) => {
162
+ var d;
163
+ if (o.inputType !== "textarea" && !((d = I.value) != null && d.isComposing))
164
+ return s.preventDefault(), R("confirm");
165
+ }, R = (s) => {
166
+ var d;
167
+ e.boxType === "prompt" && s === "confirm" && !Q() || (o.action = s, o.beforeClose ? (d = o.beforeClose) == null || d.call(o, s, o, S) : S());
168
+ }, Q = () => {
169
+ if (e.boxType === "prompt") {
170
+ const s = o.inputPattern;
171
+ if (s && !s.test(o.inputValue || ""))
172
+ return o.editorErrorMessage = o.inputErrorMessage || f("el.messagebox.error"), o.validateError = !0, !1;
173
+ const d = o.inputValidator;
174
+ if (j(d)) {
175
+ const H = d(o.inputValue);
176
+ if (H === !1)
177
+ return o.editorErrorMessage = o.inputErrorMessage || f("el.messagebox.error"), o.validateError = !0, !1;
178
+ if (W(H))
179
+ return o.editorErrorMessage = H, o.validateError = !0, !1;
180
+ }
181
+ }
182
+ return o.editorErrorMessage = "", o.validateError = !1, !0;
183
+ }, Ce = () => {
184
+ var d;
185
+ const s = (d = I.value) == null ? void 0 : d.$refs;
186
+ return (s == null ? void 0 : s.input) ?? (s == null ? void 0 : s.textarea);
187
+ }, Y = () => {
188
+ R("close");
189
+ }, be = () => {
190
+ e.closeOnPressEscape && Y();
191
+ };
192
+ return e.lockScroll && Fe(g, { ns: r }), {
193
+ ...Ve(o),
194
+ ns: r,
195
+ overlayEvent: ve,
196
+ visible: g,
197
+ hasMessage: me,
198
+ typeClass: F,
199
+ contentId: u,
200
+ inputId: ce,
201
+ btnSize: a,
202
+ iconComponent: fe,
203
+ confirmButtonClasses: pe,
204
+ rootRef: B,
205
+ focusStartRef: k,
206
+ headerRef: X,
207
+ inputRef: I,
208
+ isDragging: ge,
209
+ confirmRef: Z,
210
+ doClose: S,
211
+ handleClose: Y,
212
+ onCloseRequested: be,
213
+ handleWrapperClick: J,
214
+ handleInputEnter: ye,
215
+ handleAction: R,
216
+ t: f
217
+ };
218
+ }
219
+ });
220
+ const We = ["aria-label", "aria-describedby"], Xe = ["aria-label"], Ze = ["id"];
221
+ function Je(e, n, t, l, r, a) {
222
+ const f = A("el-icon"), m = A("el-input"), g = A("el-button"), o = A("el-focus-trap"), F = A("el-overlay");
223
+ return c(), p(Re, {
224
+ name: "fade-in-linear",
225
+ onAfterLeave: n[11] || (n[11] = (u) => e.$emit("vanish")),
226
+ persisted: ""
227
+ }, {
228
+ default: v(() => [N(T(F, {
229
+ "z-index": e.zIndex,
230
+ "overlay-class": [e.ns.is("message-box"), e.modalClass],
231
+ mask: e.modal
232
+ }, {
233
+ default: v(() => [y("div", {
234
+ role: "dialog",
235
+ "aria-label": e.title,
236
+ "aria-modal": "true",
237
+ "aria-describedby": e.showInput ? void 0 : e.contentId,
238
+ class: i(`${e.ns.namespace.value}-overlay-message-box`),
239
+ onClick: n[8] || (n[8] = (...u) => e.overlayEvent.onClick && e.overlayEvent.onClick(...u)),
240
+ onMousedown: n[9] || (n[9] = (...u) => e.overlayEvent.onMousedown && e.overlayEvent.onMousedown(...u)),
241
+ onMouseup: n[10] || (n[10] = (...u) => e.overlayEvent.onMouseup && e.overlayEvent.onMouseup(...u))
242
+ }, [T(o, {
243
+ loop: "",
244
+ trapped: e.visible,
245
+ "focus-trap-el": e.rootRef,
246
+ "focus-start-el": e.focusStartRef,
247
+ onReleaseRequested: e.onCloseRequested
248
+ }, {
249
+ default: v(() => [y("div", {
250
+ ref: "rootRef",
251
+ class: i([
252
+ e.ns.b(),
253
+ e.customClass,
254
+ e.ns.is("draggable", e.draggable),
255
+ e.ns.is("dragging", e.isDragging),
256
+ { [e.ns.m("center")]: e.center }
257
+ ]),
258
+ style: te(e.customStyle),
259
+ tabindex: "-1",
260
+ onClick: n[7] || (n[7] = z(() => {
261
+ }, ["stop"]))
262
+ }, [
263
+ e.title !== null && e.title !== void 0 ? (c(), D("div", {
264
+ key: 0,
265
+ ref: "headerRef",
266
+ class: i([e.ns.e("header"), { "show-close": e.showClose }])
267
+ }, [y("div", { class: i(e.ns.e("title")) }, [e.iconComponent && e.center ? (c(), p(f, {
268
+ key: 0,
269
+ class: i([e.ns.e("status"), e.typeClass])
270
+ }, {
271
+ default: v(() => [(c(), p(L(e.iconComponent)))]),
272
+ _: 1
273
+ }, 8, ["class"])) : h("v-if", !0), y("span", null, $(e.title), 1)], 2), e.showClose ? (c(), D("button", {
274
+ key: 0,
275
+ type: "button",
276
+ class: i(e.ns.e("headerbtn")),
277
+ "aria-label": e.t("el.messagebox.close"),
278
+ onClick: n[0] || (n[0] = (u) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel")),
279
+ onKeydown: n[1] || (n[1] = P(z((u) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
280
+ }, [T(f, { class: i(e.ns.e("close")) }, {
281
+ default: v(() => [(c(), p(L(e.closeIcon || "close")))]),
282
+ _: 1
283
+ }, 8, ["class"])], 42, Xe)) : h("v-if", !0)], 2)) : h("v-if", !0),
284
+ y("div", {
285
+ id: e.contentId,
286
+ class: i(e.ns.e("content"))
287
+ }, [y("div", { class: i(e.ns.e("container")) }, [e.iconComponent && !e.center && e.hasMessage ? (c(), p(f, {
288
+ key: 0,
289
+ class: i([e.ns.e("status"), e.typeClass])
290
+ }, {
291
+ default: v(() => [(c(), p(L(e.iconComponent)))]),
292
+ _: 1
293
+ }, 8, ["class"])) : h("v-if", !0), e.hasMessage ? (c(), D("div", {
294
+ key: 1,
295
+ class: i(e.ns.e("message"))
296
+ }, [ze(e.$slots, "default", {}, () => [e.dangerouslyUseHTMLString ? (c(), p(L(e.showInput ? "label" : "p"), {
297
+ key: 1,
298
+ for: e.showInput ? e.inputId : void 0,
299
+ innerHTML: e.message
300
+ }, null, 8, ["for", "innerHTML"])) : (c(), p(L(e.showInput ? "label" : "p"), {
301
+ key: 0,
302
+ for: e.showInput ? e.inputId : void 0,
303
+ textContent: $(e.message)
304
+ }, null, 8, ["for", "textContent"]))])], 2)) : h("v-if", !0)], 2), N(y("div", { class: i(e.ns.e("input")) }, [T(m, {
305
+ id: e.inputId,
306
+ ref: "inputRef",
307
+ modelValue: e.inputValue,
308
+ "onUpdate:modelValue": n[2] || (n[2] = (u) => e.inputValue = u),
309
+ type: e.inputType,
310
+ placeholder: e.inputPlaceholder,
311
+ "aria-invalid": e.validateError,
312
+ class: i({ invalid: e.validateError }),
313
+ onKeydown: P(e.handleInputEnter, ["enter"])
314
+ }, null, 8, [
315
+ "id",
316
+ "modelValue",
317
+ "type",
318
+ "placeholder",
319
+ "aria-invalid",
320
+ "class",
321
+ "onKeydown"
322
+ ]), y("div", {
323
+ class: i(e.ns.e("errormsg")),
324
+ style: te({ visibility: e.editorErrorMessage ? "visible" : "hidden" })
325
+ }, $(e.editorErrorMessage), 7)], 2), [[U, e.showInput]])], 10, Ze),
326
+ e.showCancelButton || e.showConfirmButton ? (c(), D("div", {
327
+ key: 1,
328
+ class: i(e.ns.e("btns"))
329
+ }, [e.showCancelButton ? (c(), p(g, {
330
+ key: 0,
331
+ type: e.cancelButtonType === "text" ? "" : e.cancelButtonType,
332
+ text: e.cancelButtonType === "text",
333
+ loading: e.cancelButtonLoading,
334
+ "loading-icon": e.cancelButtonLoadingIcon,
335
+ class: i([e.cancelButtonClass]),
336
+ round: e.roundButton,
337
+ size: e.btnSize,
338
+ onClick: n[3] || (n[3] = (u) => e.handleAction("cancel")),
339
+ onKeydown: n[4] || (n[4] = P(z((u) => e.handleAction("cancel"), ["prevent"]), ["enter"]))
340
+ }, {
341
+ default: v(() => [se($(e.cancelButtonText || e.t("el.messagebox.cancel")), 1)]),
342
+ _: 1
343
+ }, 8, [
344
+ "type",
345
+ "text",
346
+ "loading",
347
+ "loading-icon",
348
+ "class",
349
+ "round",
350
+ "size"
351
+ ])) : h("v-if", !0), N(T(g, {
352
+ ref: "confirmRef",
353
+ type: e.confirmButtonType === "text" ? "" : e.confirmButtonType,
354
+ text: e.confirmButtonType === "text",
355
+ loading: e.confirmButtonLoading,
356
+ "loading-icon": e.confirmButtonLoadingIcon,
357
+ class: i([e.confirmButtonClasses]),
358
+ round: e.roundButton,
359
+ disabled: e.confirmButtonDisabled,
360
+ size: e.btnSize,
361
+ onClick: n[5] || (n[5] = (u) => e.handleAction("confirm")),
362
+ onKeydown: n[6] || (n[6] = P(z((u) => e.handleAction("confirm"), ["prevent"]), ["enter"]))
363
+ }, {
364
+ default: v(() => [se($(e.confirmButtonText || e.t("el.messagebox.confirm")), 1)]),
365
+ _: 1
366
+ }, 8, [
367
+ "type",
368
+ "text",
369
+ "loading",
370
+ "loading-icon",
371
+ "class",
372
+ "round",
373
+ "disabled",
374
+ "size"
375
+ ]), [[U, e.showConfirmButton]])], 2)) : h("v-if", !0)
376
+ ], 6)]),
377
+ _: 3
378
+ }, 8, [
379
+ "trapped",
380
+ "focus-trap-el",
381
+ "focus-start-el",
382
+ "onReleaseRequested"
383
+ ])], 42, We)]),
384
+ _: 3
385
+ }, 8, [
386
+ "z-index",
387
+ "overlay-class",
388
+ "mask"
389
+ ]), [[U, e.visible]])]),
390
+ _: 3
391
+ });
392
+ }
393
+ var Qe = /* @__PURE__ */ ke(Ge, [["render", Je]]);
394
+ const V = /* @__PURE__ */ new Map(), Ye = (e) => {
395
+ let n = document.body;
396
+ return e.appendTo && (W(e.appendTo) && (n = document.querySelector(e.appendTo)), ee(e.appendTo) && (n = e.appendTo), ee(n) || (Be("ElMessageBox", "the appendTo option is not an HTMLElement. Falling back to document.body."), n = document.body)), n;
397
+ }, K = (e, n) => {
398
+ var l;
399
+ const t = (l = e.component) == null ? void 0 : l.proxy;
400
+ return () => t.handleAction(n);
401
+ }, xe = (e, n, t = null) => {
402
+ const l = T(Qe, e, j(e.message) || ue(e.message) ? { default: j(e.message) ? () => e.message({
403
+ confirm: K(l, "confirm"),
404
+ cancel: K(l, "cancel"),
405
+ close: K(l, "close")
406
+ }) : () => e.message } : null);
407
+ return l.appContext = t, de(l, n), Ye(e).appendChild(n.firstElementChild), l.component;
408
+ }, _e = () => document.createElement("div"), en = (e, n) => {
409
+ const t = _e();
410
+ e.onVanish = () => {
411
+ de(null, t), V.delete(r);
412
+ }, e.onAction = (a) => {
413
+ const f = V.get(r);
414
+ let m;
415
+ e.showInput ? m = {
416
+ value: r.inputValue,
417
+ action: a
418
+ } : m = a, e.callback ? e.callback(m, l.proxy) : a === "cancel" || a === "close" ? e.distinguishCancelAndClose && a !== "cancel" ? f.reject("close") : f.reject("cancel") : f.resolve(m);
419
+ };
420
+ const l = xe(e, t, n), r = l.proxy;
421
+ for (const a in e)
422
+ _(e, a) && !_(r.$props, a) && (a === "closeIcon" && ie(e[a]) ? r[a] = q(e[a]) : r[a] = e[a]);
423
+ return r.visible = !0, r;
424
+ };
425
+ function M(e, n = null) {
426
+ if (!he)
427
+ return Promise.reject();
428
+ let t;
429
+ return W(e) || ue(e) ? e = { message: e } : t = e.callback, new Promise((l, r) => {
430
+ const a = en(e, n ?? M._context);
431
+ V.set(a, {
432
+ options: e,
433
+ callback: t,
434
+ resolve: l,
435
+ reject: r
436
+ });
437
+ });
438
+ }
439
+ const nn = [
440
+ "alert",
441
+ "confirm",
442
+ "prompt"
443
+ ], on = {
444
+ alert: {
445
+ closeOnPressEscape: !1,
446
+ closeOnClickModal: !1
447
+ },
448
+ confirm: { showCancelButton: !0 },
449
+ prompt: {
450
+ showCancelButton: !0,
451
+ showInput: !0
452
+ }
453
+ };
454
+ nn.forEach((e) => {
455
+ M[e] = tn(e);
456
+ });
457
+ function tn(e) {
458
+ return (n, t, l, r) => {
459
+ let a = "";
460
+ return ie(t) ? (l = t, a = "") : Ee(t) ? a = "" : a = t, M(Object.assign({
461
+ title: a,
462
+ message: n,
463
+ type: "",
464
+ ...on[e]
465
+ }, l, { boxType: e }), r);
466
+ };
467
+ }
468
+ M.close = () => {
469
+ V.forEach((e, n) => {
470
+ n.doClose();
471
+ }), V.clear();
472
+ };
473
+ M._context = null;
474
+ const C = M;
475
+ C.install = (e) => {
476
+ C._context = e._context, e.config.globalProperties.$msgbox = C, e.config.globalProperties.$messageBox = C, e.config.globalProperties.$alert = C.alert, e.config.globalProperties.$confirm = C.confirm, e.config.globalProperties.$prompt = C.prompt;
477
+ };
478
+ const yn = C;
479
+ export {
480
+ yn as E
481
+ };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("./base-d987e5c9.cjs"),k=require("./el-popper-f824c63b.cjs"),S=require("./use-form-item-0a831287.cjs"),Z=require("./validator-ee5bc3eb.cjs"),n=require("vue"),J=require("./el-dialog-8788bcc1.cjs"),I=require("./el-overlay-17299785.cjs"),R=require("./index-d372e68f.cjs"),V=require("./index-3e7d5ffb.cjs"),Q=require("./el-input-c8a9bb71.cjs"),Y=require("./use-global-config-c90c91f7.cjs"),x=require("./el-button-8259594b.cjs"),N="_trap-focus-children",v=[],q=e=>{if(v.length===0)return;const o=k.getEventCode(e),l=v[v.length-1][N];if(l.length>0&&o===k.EVENT_CODE.tab){if(l.length===1){e.preventDefault(),document.activeElement!==l[0]&&l[0].focus();return}const r=e.shiftKey,i=e.target===l[0],a=e.target===l[l.length-1];i&&r&&(e.preventDefault(),l[l.length-1].focus()),a&&!r&&(e.preventDefault(),l[0].focus())}},_={beforeMount(e){e[N]=u.obtainAllFocusableElements(e),v.push(e),v.length<=1&&document.addEventListener("keydown",q)},updated(e){n.nextTick(()=>{e[N]=u.obtainAllFocusableElements(e)})},unmounted(){v.shift(),v.length===0&&document.removeEventListener("keydown",q)}};var ee=n.defineComponent({name:"ElMessageBox",directives:{TrapFocus:_},components:{ElButton:x.ElButton,ElFocusTrap:k.focus_trap_default$1,ElInput:Q.ElInput,ElOverlay:I.ElOverlay,ElIcon:V.ElIcon,...S.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:Z.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:o}){const{locale:l,zIndex:r,ns:i,size:a}=Y.useGlobalComponentSettings("message-box",n.computed(()=>e.buttonSize)),{t:m}=l,{nextZIndex:f}=r,p=n.ref(!1),t=n.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",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(V.loading_default),cancelButtonLoadingIcon:n.markRaw(V.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:f()}),T=n.computed(()=>{const s=t.type;return{[i.bm("icon",s)]:s&&S.TypeComponentsMap[s]}}),c=R.useId(),P=R.useId(),F=n.computed(()=>{const s=t.type;return t.icon||s&&S.TypeComponentsMap[s]||""}),K=n.computed(()=>!!t.message),C=n.ref(),A=n.ref(),h=n.ref(),B=n.ref(),D=n.ref(),H=n.computed(()=>t.confirmButtonClass);n.watch(()=>t.inputValue,async s=>{await n.nextTick(),e.boxType==="prompt"&&s&&$()},{immediate:!0}),n.watch(()=>p.value,s=>{var d;s&&(e.boxType!=="prompt"&&(t.autofocus?h.value=((d=D.value)==null?void 0:d.$el)??C.value:h.value=C.value),t.zIndex=f()),e.boxType==="prompt"&&(s?n.nextTick().then(()=>{B.value&&B.value.$el&&(t.autofocus?h.value=W()??C.value:h.value=C.value)}):(t.editorErrorMessage="",t.validateError=!1))});const{isDragging:U}=J.useDraggable(C,A,n.computed(()=>e.draggable),n.computed(()=>e.overflow));n.onMounted(async()=>{await n.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",E)}),n.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",E)});function E(){p.value&&(p.value=!1,n.nextTick(()=>{t.action&&o("action",t.action)}))}const O=()=>{e.closeOnClickModal&&w(t.distinguishCancelAndClose?"close":"cancel")},j=I.useSameTarget(O),G=s=>{var d;if(t.inputType!=="textarea"&&!((d=B.value)!=null&&d.isComposing))return s.preventDefault(),w("confirm")},w=s=>{var d;e.boxType==="prompt"&&s==="confirm"&&!$()||(t.action=s,t.beforeClose?(d=t.beforeClose)==null||d.call(t,s,t,E):E())},$=()=>{if(e.boxType==="prompt"){const s=t.inputPattern;if(s&&!s.test(t.inputValue||""))return t.editorErrorMessage=t.inputErrorMessage||m("el.messagebox.error"),t.validateError=!0,!1;const d=t.inputValidator;if(u.isFunction(d)){const M=d(t.inputValue);if(M===!1)return t.editorErrorMessage=t.inputErrorMessage||m("el.messagebox.error"),t.validateError=!0,!1;if(u.isString(M))return t.editorErrorMessage=M,t.validateError=!0,!1}}return t.editorErrorMessage="",t.validateError=!1,!0},W=()=>{var d;const s=(d=B.value)==null?void 0:d.$refs;return(s==null?void 0:s.input)??(s==null?void 0:s.textarea)},L=()=>{w("close")},X=()=>{e.closeOnPressEscape&&L()};return e.lockScroll&&I.useLockscreen(p,{ns:i}),{...n.toRefs(t),ns:i,overlayEvent:j,visible:p,hasMessage:K,typeClass:T,contentId:c,inputId:P,btnSize:a,iconComponent:F,confirmButtonClasses:H,rootRef:C,focusStartRef:h,headerRef:A,inputRef:B,isDragging:U,confirmRef:D,doClose:E,handleClose:L,onCloseRequested:X,handleWrapperClick:O,handleInputEnter:G,handleAction:w,t:m}}});const ne=["aria-label","aria-describedby"],oe=["aria-label"],te=["id"];function le(e,o,l,r,i,a){const m=n.resolveComponent("el-icon"),f=n.resolveComponent("el-input"),p=n.resolveComponent("el-button"),t=n.resolveComponent("el-focus-trap"),T=n.resolveComponent("el-overlay");return n.openBlock(),n.createBlock(n.Transition,{name:"fade-in-linear",onAfterLeave:o[11]||(o[11]=c=>e.$emit("vanish")),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(T,{"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:o[8]||(o[8]=(...c)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...c)),onMousedown:o[9]||(o[9]=(...c)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...c)),onMouseup:o[10]||(o[10]=(...c)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...c))},[n.createVNode(t,{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:o[7]||(o[7]=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(m,{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:o[0]||(o[0]=c=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:o[1]||(o[1]=n.withKeys(n.withModifiers(c=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[n.createVNode(m,{class:n.normalizeClass(e.ns.e("close"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,oe)):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(m,{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(f,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":o[2]||(o[2]=c=>e.inputValue=c),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","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,te),e.showCancelButton||e.showConfirmButton?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(n.openBlock(),n.createBlock(p,{key:0,type:e.cancelButtonType==="text"?"":e.cancelButtonType,text:e.cancelButtonType==="text",loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:n.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:o[3]||(o[3]=c=>e.handleAction("cancel")),onKeydown:o[4]||(o[4]=n.withKeys(n.withModifiers(c=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):n.createCommentVNode("v-if",!0),n.withDirectives(n.createVNode(p,{ref:"confirmRef",type:e.confirmButtonType==="text"?"":e.confirmButtonType,text:e.confirmButtonType==="text",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:n.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:o[5]||(o[5]=c=>e.handleAction("confirm")),onKeydown:o[6]||(o[6]=n.withKeys(n.withModifiers(c=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[n.vShow,e.showConfirmButton]])],2)):n.createCommentVNode("v-if",!0)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,ne)]),_:3},8,["z-index","overlay-class","mask"]),[[n.vShow,e.visible]])]),_:3})}var se=k._plugin_vue_export_helper_default(ee,[["render",le]]);const b=new Map,ae=e=>{let o=document.body;return e.appendTo&&(u.isString(e.appendTo)&&(o=document.querySelector(e.appendTo)),u.isElement(e.appendTo)&&(o=e.appendTo),u.isElement(o)||(u.debugWarn("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),o=document.body)),o},z=(e,o)=>{var r;const l=(r=e.component)==null?void 0:r.proxy;return()=>l.handleAction(o)},re=(e,o,l=null)=>{const r=n.createVNode(se,e,u.isFunction(e.message)||n.isVNode(e.message)?{default:u.isFunction(e.message)?()=>e.message({confirm:z(r,"confirm"),cancel:z(r,"cancel"),close:z(r,"close")}):()=>e.message}:null);return r.appContext=l,n.render(r,o),ae(e).appendChild(o.firstElementChild),r.component},ie=()=>document.createElement("div"),ue=(e,o)=>{const l=ie();e.onVanish=()=>{n.render(null,l),b.delete(i)},e.onAction=a=>{const m=b.get(i);let f;e.showInput?f={value:i.inputValue,action:a}:f=a,e.callback?e.callback(f,r.proxy):a==="cancel"||a==="close"?e.distinguishCancelAndClose&&a!=="cancel"?m.reject("close"):m.reject("cancel"):m.resolve(f)};const r=re(e,l,o),i=r.proxy;for(const a in e)u.hasOwn(e,a)&&!u.hasOwn(i.$props,a)&&(a==="closeIcon"&&u.isObject(e[a])?i[a]=n.markRaw(e[a]):i[a]=e[a]);return i.visible=!0,i};function y(e,o=null){if(!u.isClient)return Promise.reject();let l;return u.isString(e)||n.isVNode(e)?e={message:e}:l=e.callback,new Promise((r,i)=>{const a=ue(e,o??y._context);b.set(a,{options:e,callback:l,resolve:r,reject:i})})}const ce=["alert","confirm","prompt"],de={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};ce.forEach(e=>{y[e]=me(e)});function me(e){return(o,l,r,i)=>{let a="";return u.isObject(l)?(r=l,a=""):u.isUndefined(l)?a="":a=l,y(Object.assign({title:a,message:o,type:"",...de[e]},r,{boxType:e}),i)}}y.close=()=>{b.forEach((e,o)=>{o.doClose()}),b.clear()};y._context=null;const g=y;g.install=e=>{g._context=e._context,e.config.globalProperties.$msgbox=g,e.config.globalProperties.$messageBox=g,e.config.globalProperties.$alert=g.alert,e.config.globalProperties.$confirm=g.confirm,e.config.globalProperties.$prompt=g.prompt};const fe=g;exports.ElMessageBox=fe;
@@ -0,0 +1 @@
1
+ "use strict";const z=require("./el-popper-f824c63b.cjs"),o=require("./base-d987e5c9.cjs"),_=require("./use-form-item-0a831287.cjs"),n=require("vue"),te=require("./scroll-07bade1e.cjs"),F=require("./index-d372e68f.cjs"),ne=require("./use-global-config-c90c91f7.cjs"),q=(e,l={})=>{n.isRef(e)||o.throwError("[useLockscreen]","You need to pass a ref param to this function");const a=l.ns||o.useNamespace("popup"),i=n.computed(()=>a.bm("parent","hidden"));let r=0,c=!1,s="0",u=!1;const y=()=>{u||(u=!0,setTimeout(()=>{typeof document>"u"||c&&document&&(document.body.style.width=s,o.removeClass(document.body,i.value))},200))};n.watch(e,g=>{if(!g){y();return}u=!1,c=!o.hasClass(document.body,i.value),c&&(s=document.body.style.width,o.addClass(document.body,i.value)),r=te.getScrollBarWidth(a.namespace.value);const p=document.documentElement.clientHeight<document.body.scrollHeight,b=o.getStyle(document.body,"overflowY");r>0&&(p||b==="scroll")&&c&&(document.body.style.width=`calc(100% - ${r}px)`)}),n.onScopeDispose(()=>y())},V=e=>{if(!e)return{onClick:o.NOOP,onMousedown:o.NOOP,onMouseup:o.NOOP};let l=!1,a=!1;return{onClick:s=>{l&&a&&e(s),l=a=!1},onMousedown:s=>{l=s.target===s.currentTarget},onMouseup:s=>{a=s.target===s.currentTarget}}},$=o.buildProps({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:_.iconPropType},draggable:{type:Boolean,default:void 0},overflow:{type:Boolean,default:void 0},fullscreen:Boolean,headerClass:{type:o.definePropType([String,Array,Object,Boolean]),default:void 0},bodyClass:{type:o.definePropType([String,Array,Object,Boolean]),default:void 0},footerClass:{type:o.definePropType([String,Array,Object,Boolean]),default:void 0},showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),le={close:()=>!0},ae=o.buildProps({...$,appendToBody:Boolean,appendTo:{type:o.definePropType([String,Object]),default:"body"},beforeClose:{type:o.definePropType(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalPenetrable:Boolean,openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:{type:o.definePropType([String,Array,Object,Boolean]),default:void 0},width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"},transition:{type:o.definePropType([String,Object]),default:void 0}}),se={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[z.UPDATE_MODEL_EVENT]:e=>o.isBoolean(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},ue=o.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:o.definePropType([String,Array,Object,Boolean]),default:void 0},zIndex:{type:o.definePropType([String,Number])}}),ie={click:e=>e instanceof MouseEvent},re="overlay";var ce=n.defineComponent({name:"ElOverlay",props:ue,emits:ie,setup(e,{slots:l,emit:a}){const i=o.useNamespace(re),r=y=>{a("click",y)},{onClick:c,onMousedown:s,onMouseup:u}=V(e.customMaskEvent?void 0:r);return()=>e.mask?n.createVNode("div",{class:[i.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:c,onMousedown:s,onMouseup:u},[n.renderSlot(l,"default")],14,["onClick","onMouseup","onMousedown"]):n.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[n.renderSlot(l,"default")])}});const de=ce,fe=Symbol("dialogInjectionKey"),j="dialog-fade",ye="ElDialog",ve=(e,l)=>{const a=n.getCurrentInstance().emit,{nextZIndex:i}=_.useZIndex();let r="";const c=F.useId(),s=F.useId(),u=n.ref(!1),y=n.ref(!1),g=n.ref(!1),p=n.ref(e.zIndex??i()),b=n.ref(!1);let v,m;const A=ne.useGlobalConfig(),K=n.computed(()=>{var t;return((t=A.value)==null?void 0:t.namespace)??"el"}),O=n.computed(()=>{var t;return(t=A.value)==null?void 0:t.dialog}),U=n.computed(()=>{const t={},d=`--${K.value}-dialog`;if(!e.fullscreen){e.top&&(t[`${d}-margin-top`]=e.top);const C=o.addUnit(e.width);C&&(t[`${d}-width`]=C)}return t}),W=n.computed(()=>{var t;return(e.draggable??((t=O.value)==null?void 0:t.draggable)??!1)&&!e.fullscreen}),S=n.computed(()=>{var t;return e.alignCenter??((t=O.value)==null?void 0:t.alignCenter)??!1}),G=n.computed(()=>{var t;return e.overflow??((t=O.value)==null?void 0:t.overflow)??!1}),M=n.computed(()=>e.modalPenetrable&&!e.modal&&!e.fullscreen),Y=n.computed(()=>S.value?{display:"flex"}:{}),H=n.computed(()=>{var C;const t=e.transition??((C=O.value)==null?void 0:C.transition)??"dialog-fade",d={name:t,onAfterEnter:P,onBeforeLeave:B,onAfterLeave:h};if(o.isObject(t)){const f={...t},x=(E,oe)=>L=>{o.isArray(E)?E.forEach(N=>{o.isFunction(N)&&N(L)}):o.isFunction(E)&&E(L),oe()};return f.onAfterEnter=x(f.onAfterEnter,P),f.onBeforeLeave=x(f.onBeforeLeave,B),f.onAfterLeave=x(f.onAfterLeave,h),f.name||(f.name=j,o.debugWarn(ye,`transition.name is missing when using object syntax, fallback to '${j}'`)),f}return d});function P(){a("opened")}function h(){a("closed"),a(z.UPDATE_MODEL_EVENT,!1),e.destroyOnClose&&(g.value=!1),b.value=!1}function B(){b.value=!0,a("close")}function k(){m==null||m(),v==null||v(),e.openDelay&&e.openDelay>0?{stop:v}=o.useTimeoutFn(()=>D(),e.openDelay):D()}function w(){v==null||v(),m==null||m(),e.closeDelay&&e.closeDelay>0?{stop:m}=o.useTimeoutFn(()=>T(),e.closeDelay):T()}function I(){function t(d){d||(y.value=!0,u.value=!1)}e.beforeClose?e.beforeClose(t):w()}function Z(){e.closeOnClickModal&&I()}function D(){o.isClient&&(u.value=!0)}function T(){u.value=!1}function J(){a("openAutoFocus")}function Q(){a("closeAutoFocus")}function X(t){var d;((d=t.detail)==null?void 0:d.focusReason)==="pointer"&&t.preventDefault()}e.lockScroll&&q(u);function R(){e.closeOnPressEscape&&I()}function ee(){!u.value||!M.value||e.zIndex!==void 0||(p.value=i())}return n.watch(()=>e.zIndex,()=>{p.value=e.zIndex??i()}),n.watch(()=>e.modelValue,t=>{t?(y.value=!1,b.value=!1,k(),g.value=!0,p.value=e.zIndex??i(),n.nextTick(()=>{a("open"),l.value&&(l.value.parentElement.scrollTop=0,l.value.parentElement.scrollLeft=0,l.value.scrollTop=0)})):u.value&&w()}),n.watch(()=>e.fullscreen,t=>{l.value&&(t?(r=l.value.style.transform,l.value.style.transform=""):l.value.style.transform=r)}),n.onMounted(()=>{e.modelValue&&(u.value=!0,g.value=!0,k())}),{afterEnter:P,afterLeave:h,beforeLeave:B,handleClose:I,onModalClick:Z,close:w,doClose:T,onOpenAutoFocus:J,onCloseAutoFocus:Q,onCloseRequested:R,onFocusoutPrevented:X,bringToFront:ee,titleId:c,bodyId:s,closed:y,style:U,overlayDialogStyle:Y,rendered:g,visible:u,zIndex:p,transitionConfig:H,_draggable:W,_alignCenter:S,_overflow:G,closing:b,penetrable:M}};exports.ElOverlay=de;exports.dialogContentEmits=le;exports.dialogContentProps=$;exports.dialogEmits=se;exports.dialogInjectionKey=fe;exports.dialogProps=ae;exports.useDialog=ve;exports.useLockscreen=q;exports.useSameTarget=V;