@pungfe/element 0.6.6 → 0.6.7

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 (64) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +156 -156
  3. package/dist/advance-BaWqV-Gy.cjs +1 -0
  4. package/dist/advance-CcFBMdgY.js +2078 -0
  5. package/dist/advance.cjs +1 -0
  6. package/dist/advance.d.ts +25 -0
  7. package/dist/advance.js +2 -0
  8. package/dist/basic-CHngH3v0.js +1051 -0
  9. package/dist/basic-QaGJh7c5.cjs +1 -0
  10. package/dist/basic.cjs +1 -0
  11. package/dist/basic.d.ts +33 -0
  12. package/dist/basic.js +2 -0
  13. package/dist/components/advance/XButtonAsync.vue.d.ts +17 -0
  14. package/dist/components/advance/XButtonConfirm.vue.d.ts +23 -0
  15. package/dist/components/advance/XCascaderRequest.vue.d.ts +60 -0
  16. package/dist/components/advance/XFormFlex.vue.d.ts +23 -0
  17. package/dist/components/advance/XFormRequest.vue.d.ts +58 -0
  18. package/dist/components/advance/XRequest.vue.d.ts +71 -0
  19. package/dist/components/advance/XSelectRequest.vue.d.ts +58 -0
  20. package/dist/components/advance/XTableConfig.vue.d.ts +54 -0
  21. package/dist/components/advance/XTableFlex.vue.d.ts +64 -0
  22. package/dist/components/advance/XTableRequest.vue.d.ts +103 -0
  23. package/dist/components/advance/XTableRequestConfig.vue.d.ts +91 -0
  24. package/dist/components/advance/XUploadOss.vue.d.ts +31 -0
  25. package/dist/components/basic/Button.vue.d.ts +33 -0
  26. package/dist/components/basic/Cascader.vue.d.ts +40 -0
  27. package/dist/components/basic/Checkbox.vue.d.ts +24 -0
  28. package/dist/components/basic/ConfigProvider.vue.d.ts +17 -0
  29. package/dist/components/basic/DatePicker.vue.d.ts +43 -0
  30. package/dist/components/basic/Dialog.vue.d.ts +36 -0
  31. package/dist/components/basic/Form.vue.d.ts +37 -0
  32. package/dist/components/basic/FormItem.vue.d.ts +36 -0
  33. package/dist/components/basic/Input.vue.d.ts +44 -0
  34. package/dist/components/basic/InputNumber.vue.d.ts +41 -0
  35. package/dist/components/basic/Pagination.vue.d.ts +41 -0
  36. package/dist/components/basic/Select.vue.d.ts +57 -0
  37. package/dist/components/basic/TabPane.vue.d.ts +28 -0
  38. package/dist/components/basic/Table.vue.d.ts +125 -0
  39. package/dist/components/basic/Tabs.vue.d.ts +41 -0
  40. package/dist/components/basic/Upload.vue.d.ts +34 -0
  41. package/dist/composables/useElementConfig.d.ts +8 -0
  42. package/dist/composables/useFormValidation.d.ts +1 -0
  43. package/dist/composables/useXConfig.d.ts +3 -0
  44. package/dist/constants/index.d.ts +18 -0
  45. package/dist/index.cjs +1 -0
  46. package/dist/index.d.ts +6 -0
  47. package/dist/index.js +36 -0
  48. package/dist/install.d.ts +12 -0
  49. package/dist/locales/ar.d.ts +2 -0
  50. package/dist/locales/en.d.ts +2 -0
  51. package/dist/locales/th.d.ts +2 -0
  52. package/dist/locales/zh-cn.d.ts +2 -0
  53. package/dist/locales-BCty7For.cjs +1 -0
  54. package/dist/locales-C7JFCxgs.js +865 -0
  55. package/dist/locales.cjs +1 -0
  56. package/dist/locales.d.ts +4 -0
  57. package/dist/locales.js +2 -0
  58. package/dist/package.json.d.ts +142 -0
  59. package/dist/resolver.cjs +1 -0
  60. package/dist/resolver.d.ts +5 -0
  61. package/dist/resolver.js +66 -0
  62. package/dist/style.css +3 -0
  63. package/dist/types.d.ts +32 -0
  64. package/package.json +6 -10
@@ -0,0 +1,2078 @@
1
+ import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, d as u, g as d, k as f, l as p, n as m, o as h, s as g, u as _, w as v, x as y, y as b } from "./basic-CHngH3v0.js";
2
+ import { ElFormItem as x, ElMessage as ee, ElPopconfirm as te, ElPopover as ne, ElScrollbar as S, ElSpace as re, ElSwitch as ie, ElText as C, genFileId as w, useLocale as T } from "element-plus";
3
+ import { Fragment as ae, computed as E, createBlock as oe, createCommentVNode as se, createElementBlock as D, createElementVNode as ce, createSlots as le, createTextVNode as ue, createVNode as O, defineComponent as k, guardReactiveProps as de, inject as fe, isRef as pe, isVNode as me, mergeModels as he, mergeProps as ge, nextTick as _e, normalizeProps as ve, openBlock as A, ref as ye, renderSlot as be, resolveComponent as xe, resolveDirective as Se, toDisplayString as Ce, toValue as we, unref as j, useModel as Te, useTemplateRef as Ee, watch as De, withCtx as Oe, withDirectives as ke } from "vue";
4
+ //#endregion
5
+ //#region src/components/advance/XButtonAsync.vue
6
+ var Ae = /* @__PURE__ */ k({
7
+ __name: "XButtonAsync",
8
+ props: {
9
+ action: { type: Function },
10
+ disabled: {
11
+ type: Boolean,
12
+ default: () => void 0
13
+ },
14
+ icon: {},
15
+ link: {
16
+ type: Boolean,
17
+ default: () => void 0
18
+ },
19
+ size: {},
20
+ text: { type: Boolean },
21
+ type: { default: "primary" }
22
+ },
23
+ setup(e) {
24
+ let t = f(async () => {
25
+ try {
26
+ await e.action?.();
27
+ } catch (e) {
28
+ console.log(e);
29
+ }
30
+ }), n = fe(b, void 0), r = E(() => e.link ?? n);
31
+ return (n, i) => (A(), oe(j(y), ge({
32
+ disabled: e.disabled,
33
+ icon: e.icon,
34
+ type: e.type,
35
+ link: r.value,
36
+ size: e.size,
37
+ text: e.text
38
+ }, { onClick: j(t) }), {
39
+ default: Oe(() => [be(n.$slots, "default")]),
40
+ _: 3
41
+ }, 16, ["onClick"]));
42
+ }
43
+ }), je = /* @__PURE__ */ k({
44
+ __name: "XButtonConfirm",
45
+ props: {
46
+ title: {},
47
+ disabled: { type: Boolean },
48
+ icon: {},
49
+ link: {
50
+ type: Boolean,
51
+ default: () => void 0
52
+ },
53
+ size: {},
54
+ text: { type: Boolean },
55
+ type: {}
56
+ },
57
+ emits: ["cancel", "confirm"],
58
+ setup(e, { emit: t }) {
59
+ let n = t, { t: r } = T(fe(l, void 0)), i = fe(b, void 0), a = E(() => e.link ?? i);
60
+ return (t, i) => (A(), oe(j(te), {
61
+ title: e.title ?? j(r)("el.common.confirmExecute"),
62
+ width: "auto",
63
+ onCancel: i[0] ||= () => n("cancel"),
64
+ onConfirm: i[1] ||= () => n("confirm")
65
+ }, {
66
+ reference: Oe(() => [O(j(y), ve(de({
67
+ disabled: e.disabled,
68
+ icon: e.icon,
69
+ type: e.type,
70
+ link: a.value,
71
+ size: e.size,
72
+ text: e.text
73
+ })), {
74
+ default: Oe(() => [be(t.$slots, "default")]),
75
+ _: 3
76
+ }, 16)]),
77
+ actions: Oe(({ confirm: e, cancel: t }) => [O(j(y), {
78
+ size: "small",
79
+ disabled: !1,
80
+ onClick: t
81
+ }, {
82
+ default: Oe(() => [ue(Ce(j(r)("el.common.cancel")), 1)]),
83
+ _: 1
84
+ }, 8, ["onClick"]), O(j(y), {
85
+ type: "danger",
86
+ disabled: !1,
87
+ size: "small",
88
+ onClick: e
89
+ }, {
90
+ default: Oe(() => [ue(Ce(j(r)("el.common.confirm")), 1)]),
91
+ _: 1
92
+ }, 8, ["onClick"])]),
93
+ _: 3
94
+ }, 8, ["title"]));
95
+ }
96
+ }), Me = /* @__PURE__ */ k({
97
+ __name: "XCascaderRequest",
98
+ props: /*@__PURE__*/ he({
99
+ clearable: { type: Boolean },
100
+ disabled: {
101
+ type: Boolean,
102
+ default: () => void 0
103
+ },
104
+ filterable: { type: Boolean },
105
+ request: { type: Function },
106
+ placeholder: {},
107
+ props: {},
108
+ size: {}
109
+ }, {
110
+ modelValue: {},
111
+ modelModifiers: {}
112
+ }),
113
+ emits: /*@__PURE__*/ he(["change", "prepare"], ["update:modelValue"]),
114
+ setup(e, { expose: t, emit: n }) {
115
+ let r = n, i = Te(e, "modelValue"), { data: a, execute: o, path: s, query: c, url: l } = e.request();
116
+ return t({
117
+ data: a,
118
+ execute: o,
119
+ path: s,
120
+ query: c,
121
+ search: f(async () => {
122
+ r("prepare", {
123
+ path: s.value,
124
+ query: c.value
125
+ }), o();
126
+ }),
127
+ url: l
128
+ }), (t, n) => (A(), oe(j(d), ge({
129
+ modelValue: i.value,
130
+ "onUpdate:modelValue": n[0] ||= (e) => i.value = e
131
+ }, {
132
+ clearable: e.clearable,
133
+ disabled: e.disabled,
134
+ filterable: e.filterable,
135
+ data: j(a),
136
+ props: e.props
137
+ }), null, 16, ["modelValue"]));
138
+ }
139
+ }), Ne = { class: "flex-1 overflow-hidden" }, Pe = /* @__PURE__ */ k({
140
+ __name: "XFormFlex",
141
+ props: {
142
+ content: { type: Function },
143
+ data: {},
144
+ disabled: { type: Boolean },
145
+ inline: { type: Boolean },
146
+ labelPosition: {},
147
+ labelSuffix: {},
148
+ labelWidth: {},
149
+ size: {}
150
+ },
151
+ setup(e, { expose: t }) {
152
+ let n = Ee("form");
153
+ t({
154
+ clearValidate: () => n.value?.clearValidate(),
155
+ validate: () => n.value?.validate()
156
+ });
157
+ let r = () => e.content?.({ data: e.data ?? {} });
158
+ return (e, t) => (A(), D("div", Ne, [O(j(S), null, {
159
+ default: Oe(() => [O(j(u), ge({
160
+ ref_key: "form",
161
+ ref: n
162
+ }, e.$props, { content: r }), null, 16)]),
163
+ _: 1
164
+ })]));
165
+ }
166
+ }), Fe = /* @__PURE__ */ k({
167
+ __name: "XFormRequest",
168
+ props: {
169
+ content: { type: Function },
170
+ disabled: {
171
+ type: [Function, Boolean],
172
+ default: void 0
173
+ },
174
+ request: { type: Function },
175
+ inline: { type: Boolean },
176
+ labelPosition: {},
177
+ labelSuffix: {},
178
+ labelWidth: { default: "auto" },
179
+ size: {}
180
+ },
181
+ emits: ["prepare"],
182
+ setup(e, { expose: t, emit: n }) {
183
+ let r = n, { data: i, execute: a, isFetching: o, path: s, query: c, url: l } = e.request(), d = JSON.stringify(i.value), p = E(() => o.value || (typeof e.disabled == "function" ? e.disabled({ data: i.value }) : e.disabled)), m = Ee("form"), h = () => i.value = JSON.parse(d), g = () => m.value?.validate(), _ = () => m.value?.clearValidate(), v = () => {
184
+ h(), m.value?.resetFields();
185
+ }, y = f(async () => {
186
+ r("prepare", {
187
+ path: s.value,
188
+ query: c.value
189
+ }), a();
190
+ }), b = () => e.content?.({ data: i.value });
191
+ return t({
192
+ clearValidate: _,
193
+ data: i,
194
+ reset: h,
195
+ resetFields: v,
196
+ search: y,
197
+ url: l,
198
+ validate: g
199
+ }), (t, n) => {
200
+ let r = Se("loading");
201
+ return ke((A(), oe(j(u), ge({
202
+ ref_key: "form",
203
+ ref: m,
204
+ class: "flex flex-1 flex-col gap-2 overflow-hidden"
205
+ }, {
206
+ data: j(i),
207
+ disabled: p.value,
208
+ inline: e.inline,
209
+ labelPosition: e.labelPosition,
210
+ labelSuffix: e.labelSuffix,
211
+ labelWidth: e.labelWidth,
212
+ content: b
213
+ }), null, 16)), [[r, j(o)]]);
214
+ };
215
+ }
216
+ }), Ie = /* @__PURE__ */ k({
217
+ __name: "XRequest",
218
+ props: {
219
+ content: { type: Function },
220
+ request: { type: Function }
221
+ },
222
+ emits: ["prepare"],
223
+ setup(e, { expose: t, emit: n }) {
224
+ let r = n, { data: i, execute: a, isFetching: o, paging: s, path: c, query: l, url: u } = e.request(), d = f(async () => {
225
+ r("prepare", {
226
+ path: c.value,
227
+ query: l.value
228
+ }), a();
229
+ }), p = () => e.content?.({
230
+ data: i.value,
231
+ isFetching: o.value,
232
+ paging: s.value,
233
+ path: c.value,
234
+ query: l.value,
235
+ search: d
236
+ });
237
+ return t({
238
+ data: i,
239
+ execute: a,
240
+ isFetching: o,
241
+ paging: s,
242
+ path: c,
243
+ query: l,
244
+ search: d,
245
+ url: u
246
+ }), (e, t) => be(e.$slots, "default", {
247
+ data: j(i),
248
+ paging: j(s),
249
+ path: j(c),
250
+ query: j(l),
251
+ isFetching: j(o),
252
+ search: j(d)
253
+ }, () => [O(p)]);
254
+ }
255
+ }), Le = /* @__PURE__ */ k({
256
+ __name: "XSelectRequest",
257
+ props: /*@__PURE__*/ he({
258
+ request: { type: Function },
259
+ supplement: { type: Function },
260
+ allowCreate: { type: Boolean },
261
+ clearable: { type: Boolean },
262
+ collapseTags: { type: Boolean },
263
+ collapseTagsTooltip: { type: Boolean },
264
+ data: {},
265
+ defaultFirstOption: { type: Boolean },
266
+ disabled: {
267
+ type: Boolean,
268
+ default: () => void 0
269
+ },
270
+ factory: { type: Function },
271
+ filterable: { type: Boolean },
272
+ identify: { type: Function },
273
+ loading: { type: Boolean },
274
+ multiple: {
275
+ type: Boolean,
276
+ default: () => void 0
277
+ },
278
+ placeholder: {},
279
+ remote: { type: Boolean },
280
+ remoteMethod: { type: Function },
281
+ size: {}
282
+ }, {
283
+ modelValue: {},
284
+ modelModifiers: {}
285
+ }),
286
+ emits: /*@__PURE__*/ he([
287
+ "prepare",
288
+ "blur",
289
+ "change",
290
+ "focus"
291
+ ], ["update:modelValue"]),
292
+ setup(e, { expose: t, emit: n }) {
293
+ let r = n, i = Te(e, "modelValue"), { data: a, execute: o, isFetching: s, path: c, query: l, url: u } = e.request(), d = 0, p = "", m = f(async (e) => {
294
+ (!d || e !== p) && (r("prepare", {
295
+ path: c.value,
296
+ query: l.value
297
+ }, e), p = e ?? "", d += 1, o());
298
+ }), g = e.supplement && ((t) => e.supplement(t, u));
299
+ return t({
300
+ data: a,
301
+ execute: o,
302
+ path: c,
303
+ query: l,
304
+ search: m,
305
+ url: u
306
+ }), (t, n) => (A(), oe(j(h), ge({
307
+ data: j(a),
308
+ supplement: j(g),
309
+ remoteMethod: j(m),
310
+ factory: e.factory,
311
+ allowCreate: e.allowCreate,
312
+ clearable: e.clearable,
313
+ collapseTags: e.collapseTags,
314
+ identify: e.identify,
315
+ remote: e.remote,
316
+ filterable: e.remote || e.filterable,
317
+ disabled: e.disabled,
318
+ loading: j(s) || e.loading,
319
+ multiple: e.multiple,
320
+ size: e.size
321
+ }, {
322
+ modelValue: i.value,
323
+ "onUpdate:modelValue": n[0] ||= (e) => i.value = e,
324
+ onBlur: n[1] ||= (e) => t.$emit("blur", e),
325
+ onFocus: n[2] ||= (e) => t.$emit("focus", e),
326
+ onChange: n[3] ||= (e) => t.$emit("change", e)
327
+ }), null, 16, ["modelValue"]));
328
+ }
329
+ }), Re = /* @__PURE__ */ k({
330
+ name: "Rank",
331
+ __name: "rank",
332
+ setup(e) {
333
+ return (e, t) => (A(), D("svg", {
334
+ xmlns: "http://www.w3.org/2000/svg",
335
+ viewBox: "0 0 1024 1024"
336
+ }, [ce("path", {
337
+ fill: "currentColor",
338
+ d: "m186.496 544 41.408 41.344a32 32 0 1 1-45.248 45.312l-96-96a32 32 0 0 1 0-45.312l96-96a32 32 0 1 1 45.248 45.312L186.496 480h290.816V186.432l-41.472 41.472a32 32 0 1 1-45.248-45.184l96-96.128a32 32 0 0 1 45.312 0l96 96.064a32 32 0 0 1-45.248 45.184l-41.344-41.28V480H832l-41.344-41.344a32 32 0 0 1 45.248-45.312l96 96a32 32 0 0 1 0 45.312l-96 96a32 32 0 0 1-45.248-45.312L832 544H541.312v293.44l41.344-41.28a32 32 0 1 1 45.248 45.248l-96 96a32 32 0 0 1-45.312 0l-96-96a32 32 0 1 1 45.312-45.248l41.408 41.408V544z"
339
+ })]));
340
+ }
341
+ }), ze = /* @__PURE__ */ k({
342
+ name: "Setting",
343
+ __name: "setting",
344
+ setup(e) {
345
+ return (e, t) => (A(), D("svg", {
346
+ xmlns: "http://www.w3.org/2000/svg",
347
+ viewBox: "0 0 1024 1024"
348
+ }, [ce("path", {
349
+ fill: "currentColor",
350
+ d: "M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"
351
+ })]));
352
+ }
353
+ });
354
+ //#endregion
355
+ //#region node_modules/.pnpm/sortablejs@1.15.7/node_modules/sortablejs/modular/sortable.esm.js
356
+ function Be(e, t, n) {
357
+ return (t = qe(t)) in e ? Object.defineProperty(e, t, {
358
+ value: n,
359
+ enumerable: !0,
360
+ configurable: !0,
361
+ writable: !0
362
+ }) : e[t] = n, e;
363
+ }
364
+ function Ve() {
365
+ return Ve = Object.assign ? Object.assign.bind() : function(e) {
366
+ for (var t = 1; t < arguments.length; t++) {
367
+ var n = arguments[t];
368
+ for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
369
+ }
370
+ return e;
371
+ }, Ve.apply(null, arguments);
372
+ }
373
+ function He(e, t) {
374
+ var n = Object.keys(e);
375
+ if (Object.getOwnPropertySymbols) {
376
+ var r = Object.getOwnPropertySymbols(e);
377
+ t && (r = r.filter(function(t) {
378
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
379
+ })), n.push.apply(n, r);
380
+ }
381
+ return n;
382
+ }
383
+ function Ue(e) {
384
+ for (var t = 1; t < arguments.length; t++) {
385
+ var n = arguments[t] == null ? {} : arguments[t];
386
+ t % 2 ? He(Object(n), !0).forEach(function(t) {
387
+ Be(e, t, n[t]);
388
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : He(Object(n)).forEach(function(t) {
389
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
390
+ });
391
+ }
392
+ return e;
393
+ }
394
+ function We(e, t) {
395
+ if (e == null) return {};
396
+ var n, r, i = Ge(e, t);
397
+ if (Object.getOwnPropertySymbols) {
398
+ var a = Object.getOwnPropertySymbols(e);
399
+ for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
400
+ }
401
+ return i;
402
+ }
403
+ function Ge(e, t) {
404
+ if (e == null) return {};
405
+ var n = {};
406
+ for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
407
+ if (t.indexOf(r) !== -1) continue;
408
+ n[r] = e[r];
409
+ }
410
+ return n;
411
+ }
412
+ function Ke(e, t) {
413
+ if (typeof e != "object" || !e) return e;
414
+ var n = e[Symbol.toPrimitive];
415
+ if (n !== void 0) {
416
+ var r = n.call(e, t || "default");
417
+ if (typeof r != "object") return r;
418
+ throw TypeError("@@toPrimitive must return a primitive value.");
419
+ }
420
+ return (t === "string" ? String : Number)(e);
421
+ }
422
+ function qe(e) {
423
+ var t = Ke(e, "string");
424
+ return typeof t == "symbol" ? t : t + "";
425
+ }
426
+ function Je(e) {
427
+ "@babel/helpers - typeof";
428
+ return Je = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
429
+ return typeof e;
430
+ } : function(e) {
431
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
432
+ }, Je(e);
433
+ }
434
+ var Ye = "1.15.7";
435
+ function Xe(e) {
436
+ if (typeof window < "u" && window.navigator) return !!/*@__PURE__*/ navigator.userAgent.match(e);
437
+ }
438
+ var Ze = Xe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Qe = Xe(/Edge/i), $e = Xe(/firefox/i), et = Xe(/safari/i) && !Xe(/chrome/i) && !Xe(/android/i), tt = Xe(/iP(ad|od|hone)/i), nt = Xe(/chrome/i) && Xe(/android/i), rt = {
439
+ capture: !1,
440
+ passive: !1
441
+ };
442
+ function M(e, t, n) {
443
+ e.addEventListener(t, n, !Ze && rt);
444
+ }
445
+ function N(e, t, n) {
446
+ e.removeEventListener(t, n, !Ze && rt);
447
+ }
448
+ function it(e, t) {
449
+ if (t) {
450
+ if (t[0] === ">" && (t = t.substring(1)), e) try {
451
+ if (e.matches) return e.matches(t);
452
+ if (e.msMatchesSelector) return e.msMatchesSelector(t);
453
+ if (e.webkitMatchesSelector) return e.webkitMatchesSelector(t);
454
+ } catch {
455
+ return !1;
456
+ }
457
+ return !1;
458
+ }
459
+ }
460
+ function at(e) {
461
+ return e.host && e !== document && e.host.nodeType && e.host !== e ? e.host : e.parentNode;
462
+ }
463
+ function P(e, t, n, r) {
464
+ if (e) {
465
+ n ||= document;
466
+ do {
467
+ if (t != null && (t[0] === ">" ? e.parentNode === n && it(e, t) : it(e, t)) || r && e === n) return e;
468
+ if (e === n) break;
469
+ } while (e = at(e));
470
+ }
471
+ return null;
472
+ }
473
+ var ot = /\s+/g;
474
+ function F(e, t, n) {
475
+ e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ot, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ot, " "));
476
+ }
477
+ function I(e, t, n) {
478
+ var r = e && e.style;
479
+ if (r) {
480
+ if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
481
+ !(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
482
+ }
483
+ }
484
+ function st(e, t) {
485
+ var n = "";
486
+ if (typeof e == "string") n = e;
487
+ else do {
488
+ var r = I(e, "transform");
489
+ r && r !== "none" && (n = r + " " + n);
490
+ } while (!t && (e = e.parentNode));
491
+ var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
492
+ return i && new i(n);
493
+ }
494
+ function ct(e, t, n) {
495
+ if (e) {
496
+ var r = e.getElementsByTagName(t), i = 0, a = r.length;
497
+ if (n) for (; i < a; i++) n(r[i], i);
498
+ return r;
499
+ }
500
+ return [];
501
+ }
502
+ function L() {
503
+ return document.scrollingElement || document.documentElement;
504
+ }
505
+ function R(e, t, n, r, i) {
506
+ if (!(!e.getBoundingClientRect && e !== window)) {
507
+ var a, o, s, c, l, u, d;
508
+ if (e !== window && e.parentNode && e !== L() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Ze)) do
509
+ if (i && i.getBoundingClientRect && (I(i, "transform") !== "none" || n && I(i, "position") !== "static")) {
510
+ var f = i.getBoundingClientRect();
511
+ o -= f.top + parseInt(I(i, "border-top-width")), s -= f.left + parseInt(I(i, "border-left-width")), c = o + a.height, l = s + a.width;
512
+ break;
513
+ }
514
+ while (i = i.parentNode);
515
+ if (r && e !== window) {
516
+ var p = st(i || e), m = p && p.a, h = p && p.d;
517
+ p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
518
+ }
519
+ return {
520
+ top: o,
521
+ left: s,
522
+ bottom: c,
523
+ right: l,
524
+ width: d,
525
+ height: u
526
+ };
527
+ }
528
+ }
529
+ function lt(e, t, n) {
530
+ for (var r = mt(e, !0), i = R(e)[t]; r;) {
531
+ var a = R(r)[n], o = void 0;
532
+ if (o = n === "top" || n === "left" ? i >= a : i <= a, !o) return r;
533
+ if (r === L()) break;
534
+ r = mt(r, !1);
535
+ }
536
+ return !1;
537
+ }
538
+ function ut(e, t, n, r) {
539
+ for (var i = 0, a = 0, o = e.children; a < o.length;) {
540
+ if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && P(o[a], n.draggable, e, !1)) {
541
+ if (i === t) return o[a];
542
+ i++;
543
+ }
544
+ a++;
545
+ }
546
+ return null;
547
+ }
548
+ function dt(e, t) {
549
+ for (var n = e.lastElementChild; n && (n === Q.ghost || I(n, "display") === "none" || t && !it(n, t));) n = n.previousElementSibling;
550
+ return n || null;
551
+ }
552
+ function z(e, t) {
553
+ var n = 0;
554
+ if (!e || !e.parentNode) return -1;
555
+ for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || it(e, t)) && n++;
556
+ return n;
557
+ }
558
+ function ft(e) {
559
+ var t = 0, n = 0, r = L();
560
+ if (e) do {
561
+ var i = st(e), a = i.a, o = i.d;
562
+ t += e.scrollLeft * a, n += e.scrollTop * o;
563
+ } while (e !== r && (e = e.parentNode));
564
+ return [t, n];
565
+ }
566
+ function pt(e, t) {
567
+ for (var n in e) if (e.hasOwnProperty(n)) {
568
+ for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
569
+ }
570
+ return -1;
571
+ }
572
+ function mt(e, t) {
573
+ if (!e || !e.getBoundingClientRect) return L();
574
+ var n = e, r = !1;
575
+ do
576
+ if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
577
+ var i = I(n);
578
+ if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
579
+ if (!n.getBoundingClientRect || n === document.body) return L();
580
+ if (r || t) return n;
581
+ r = !0;
582
+ }
583
+ }
584
+ while (n = n.parentNode);
585
+ return L();
586
+ }
587
+ function ht(e, t) {
588
+ if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
589
+ return e;
590
+ }
591
+ function gt(e, t) {
592
+ return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
593
+ }
594
+ var _t;
595
+ function vt(e, t) {
596
+ return function() {
597
+ if (!_t) {
598
+ var n = arguments, r = this;
599
+ n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), _t = setTimeout(function() {
600
+ _t = void 0;
601
+ }, t);
602
+ }
603
+ };
604
+ }
605
+ function yt() {
606
+ clearTimeout(_t), _t = void 0;
607
+ }
608
+ function bt(e, t, n) {
609
+ e.scrollLeft += t, e.scrollTop += n;
610
+ }
611
+ function xt(e) {
612
+ var t = window.Polymer, n = window.jQuery || window.Zepto;
613
+ return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
614
+ }
615
+ function St(e, t, n) {
616
+ var r = {};
617
+ return Array.from(e.children).forEach(function(i) {
618
+ if (!(!P(i, t.draggable, e, !1) || i.animated || i === n)) {
619
+ var a = R(i);
620
+ r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
621
+ }
622
+ }), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
623
+ }
624
+ var B = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
625
+ function Ct() {
626
+ var e = [], t;
627
+ return {
628
+ captureAnimationState: function() {
629
+ e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
630
+ if (!(I(t, "display") === "none" || t === Q.ghost)) {
631
+ e.push({
632
+ target: t,
633
+ rect: R(t)
634
+ });
635
+ var n = Ue({}, e[e.length - 1].rect);
636
+ if (t.thisAnimationDuration) {
637
+ var r = st(t, !0);
638
+ r && (n.top -= r.f, n.left -= r.e);
639
+ }
640
+ t.fromRect = n;
641
+ }
642
+ });
643
+ },
644
+ addAnimationState: function(t) {
645
+ e.push(t);
646
+ },
647
+ removeAnimationState: function(t) {
648
+ e.splice(pt(e, { target: t }), 1);
649
+ },
650
+ animateAll: function(n) {
651
+ var r = this;
652
+ if (!this.options.animation) {
653
+ clearTimeout(t), typeof n == "function" && n();
654
+ return;
655
+ }
656
+ var i = !1, a = 0;
657
+ e.forEach(function(e) {
658
+ var t = 0, n = e.target, o = n.fromRect, s = R(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = st(n, !0);
659
+ d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && gt(c, s) && !gt(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Tt(u, c, l, r.options)), gt(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
660
+ n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
661
+ }, t), n.thisAnimationDuration = t);
662
+ }), clearTimeout(t), i ? t = setTimeout(function() {
663
+ typeof n == "function" && n();
664
+ }, a) : typeof n == "function" && n(), e = [];
665
+ },
666
+ animate: function(e, t, n, r) {
667
+ if (r) {
668
+ I(e, "transition", ""), I(e, "transform", "");
669
+ var i = st(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
670
+ e.animatingX = !!s, e.animatingY = !!c, I(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = wt(e), I(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), I(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
671
+ I(e, "transition", ""), I(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
672
+ }, r);
673
+ }
674
+ }
675
+ };
676
+ }
677
+ function wt(e) {
678
+ return e.offsetWidth;
679
+ }
680
+ function Tt(e, t, n, r) {
681
+ return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
682
+ }
683
+ var Et = [], Dt = { initializeByDefault: !0 }, Ot = {
684
+ mount: function(e) {
685
+ for (var t in Dt) Dt.hasOwnProperty(t) && !(t in e) && (e[t] = Dt[t]);
686
+ Et.forEach(function(t) {
687
+ if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
688
+ }), Et.push(e);
689
+ },
690
+ pluginEvent: function(e, t, n) {
691
+ var r = this;
692
+ this.eventCanceled = !1, n.cancel = function() {
693
+ r.eventCanceled = !0;
694
+ };
695
+ var i = e + "Global";
696
+ Et.forEach(function(r) {
697
+ t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Ue({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Ue({ sortable: t }, n)));
698
+ });
699
+ },
700
+ initializePlugins: function(e, t, n, r) {
701
+ for (var i in Et.forEach(function(r) {
702
+ var i = r.pluginName;
703
+ if (!(!e.options[i] && !r.initializeByDefault)) {
704
+ var a = new r(e, t, e.options);
705
+ a.sortable = e, a.options = e.options, e[i] = a, Ve(n, a.defaults);
706
+ }
707
+ }), e.options) if (e.options.hasOwnProperty(i)) {
708
+ var a = this.modifyOption(e, i, e.options[i]);
709
+ a !== void 0 && (e.options[i] = a);
710
+ }
711
+ },
712
+ getEventProperties: function(e, t) {
713
+ var n = {};
714
+ return Et.forEach(function(r) {
715
+ typeof r.eventProperties == "function" && Ve(n, r.eventProperties.call(t[r.pluginName], e));
716
+ }), n;
717
+ },
718
+ modifyOption: function(e, t, n) {
719
+ var r;
720
+ return Et.forEach(function(i) {
721
+ e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
722
+ }), r;
723
+ }
724
+ };
725
+ function kt(e) {
726
+ var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
727
+ if (t ||= n && n[B], t) {
728
+ var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
729
+ window.CustomEvent && !Ze && !Qe ? h = new CustomEvent(r, {
730
+ bubbles: !0,
731
+ cancelable: !0
732
+ }) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
733
+ var v = Ue(Ue({}, m), Ot.getEventProperties(r, t));
734
+ for (var y in v) h[y] = v[y];
735
+ n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
736
+ }
737
+ }
738
+ var At = ["evt"], V = function(e, t) {
739
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = We(n, At);
740
+ Ot.pluginEvent.bind(Q)(e, t, Ue({
741
+ dragEl: U,
742
+ parentEl: W,
743
+ ghostEl: G,
744
+ rootEl: K,
745
+ nextEl: jt,
746
+ lastDownEl: Mt,
747
+ cloneEl: q,
748
+ cloneHidden: Nt,
749
+ dragStarted: Kt,
750
+ putSortable: Y,
751
+ activeSortable: Q.active,
752
+ originalEvent: r,
753
+ oldIndex: Pt,
754
+ oldDraggableIndex: Ft,
755
+ newIndex: J,
756
+ newDraggableIndex: It,
757
+ hideGhostForTarget: dn,
758
+ unhideGhostForTarget: fn,
759
+ cloneNowHidden: function() {
760
+ Nt = !0;
761
+ },
762
+ cloneNowShown: function() {
763
+ Nt = !1;
764
+ },
765
+ dispatchSortableEvent: function(e) {
766
+ H({
767
+ sortable: t,
768
+ name: e,
769
+ originalEvent: r
770
+ });
771
+ }
772
+ }, i));
773
+ };
774
+ function H(e) {
775
+ kt(Ue({
776
+ putSortable: Y,
777
+ cloneEl: q,
778
+ targetEl: U,
779
+ rootEl: K,
780
+ oldIndex: Pt,
781
+ oldDraggableIndex: Ft,
782
+ newIndex: J,
783
+ newDraggableIndex: It
784
+ }, e));
785
+ }
786
+ var U, W, G, K, jt, Mt, q, Nt, Pt, J, Ft, It, Lt, Y, Rt = !1, zt = !1, Bt = [], Vt, X, Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt = !1, Xt = !1, Zt, Z, Qt = [], $t = !1, en = [], tn = typeof document < "u", nn = tt, rn = Qe || Ze ? "cssFloat" : "float", an = tn && !nt && !tt && "draggable" in document.createElement("div"), on = function() {
787
+ if (tn) {
788
+ if (Ze) return !1;
789
+ var e = document.createElement("x");
790
+ return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
791
+ }
792
+ }(), sn = function(e, t) {
793
+ var n = I(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = ut(e, 0, t), a = ut(e, 1, t), o = i && I(i), s = a && I(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + R(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + R(a).width;
794
+ if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
795
+ if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
796
+ if (i && o.float && o.float !== "none") {
797
+ var u = o.float === "left" ? "left" : "right";
798
+ return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
799
+ }
800
+ return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[rn] === "none" || a && n[rn] === "none" && c + l > r) ? "vertical" : "horizontal";
801
+ }, cn = function(e, t, n) {
802
+ var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
803
+ return r === o || i === s || r + a / 2 === o + c / 2;
804
+ }, ln = function(e, t) {
805
+ var n;
806
+ return Bt.some(function(r) {
807
+ var i = r[B].options.emptyInsertThreshold;
808
+ if (!(!i || dt(r))) {
809
+ var a = R(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
810
+ if (o && s) return n = r;
811
+ }
812
+ }), n;
813
+ }, un = function(e) {
814
+ function t(e, n) {
815
+ return function(r, i, a, o) {
816
+ var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
817
+ if (e == null && (n || s)) return !0;
818
+ if (e == null || e === !1) return !1;
819
+ if (n && e === "clone") return e;
820
+ if (typeof e == "function") return t(e(r, i, a, o), n)(r, i, a, o);
821
+ var c = (n ? r : i).options.group.name;
822
+ return e === !0 || typeof e == "string" && e === c || e.join && e.indexOf(c) > -1;
823
+ };
824
+ }
825
+ var n = {}, r = e.group;
826
+ (!r || Je(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
827
+ }, dn = function() {
828
+ !on && G && I(G, "display", "none");
829
+ }, fn = function() {
830
+ !on && G && I(G, "display", "");
831
+ };
832
+ tn && !nt && document.addEventListener("click", function(e) {
833
+ if (zt) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), zt = !1, !1;
834
+ }, !0);
835
+ var pn = function(e) {
836
+ if (U) {
837
+ e = e.touches ? e.touches[0] : e;
838
+ var t = ln(e.clientX, e.clientY);
839
+ if (t) {
840
+ var n = {};
841
+ for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
842
+ n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[B]._onDragOver(n);
843
+ }
844
+ }
845
+ }, mn = function(e) {
846
+ U && U.parentNode[B]._isOutsideThisEl(e.target);
847
+ };
848
+ function Q(e, t) {
849
+ if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
850
+ this.el = e, this.options = t = Ve({}, t), e[B] = this;
851
+ var n = {
852
+ group: null,
853
+ sort: !0,
854
+ disabled: !1,
855
+ store: null,
856
+ handle: null,
857
+ draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
858
+ swapThreshold: 1,
859
+ invertSwap: !1,
860
+ invertedSwapThreshold: null,
861
+ removeCloneOnHide: !0,
862
+ direction: function() {
863
+ return sn(e, this.options);
864
+ },
865
+ ghostClass: "sortable-ghost",
866
+ chosenClass: "sortable-chosen",
867
+ dragClass: "sortable-drag",
868
+ ignore: "a, img",
869
+ filter: null,
870
+ preventOnFilter: !0,
871
+ animation: 0,
872
+ easing: null,
873
+ setData: function(e, t) {
874
+ e.setData("Text", t.textContent);
875
+ },
876
+ dropBubble: !1,
877
+ dragoverBubble: !1,
878
+ dataIdAttr: "data-id",
879
+ delay: 0,
880
+ delayOnTouchOnly: !1,
881
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
882
+ forceFallback: !1,
883
+ fallbackClass: "sortable-fallback",
884
+ fallbackOnBody: !1,
885
+ fallbackTolerance: 0,
886
+ fallbackOffset: {
887
+ x: 0,
888
+ y: 0
889
+ },
890
+ supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && (!et || tt),
891
+ emptyInsertThreshold: 5
892
+ };
893
+ for (var r in Ot.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
894
+ for (var i in un(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
895
+ this.nativeDraggable = t.forceFallback ? !1 : an, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? M(e, "pointerdown", this._onTapStart) : (M(e, "mousedown", this._onTapStart), M(e, "touchstart", this._onTapStart)), this.nativeDraggable && (M(e, "dragover", this), M(e, "dragenter", this)), Bt.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Ve(this, Ct());
896
+ }
897
+ Q.prototype = {
898
+ constructor: Q,
899
+ _isOutsideThisEl: function(e) {
900
+ !this.el.contains(e) && e !== this.el && (qt = null);
901
+ },
902
+ _getDirection: function(e, t) {
903
+ return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, U) : this.options.direction;
904
+ },
905
+ _onTapStart: function(e) {
906
+ if (e.cancelable) {
907
+ var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
908
+ if (wn(n), !U && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && et && s && s.tagName.toUpperCase() === "SELECT") && (s = P(s, r.draggable, n, !1), !(s && s.animated) && Mt !== s)) {
909
+ if (Pt = z(s), Ft = z(s, r.draggable), typeof l == "function") {
910
+ if (l.call(this, e, s, this)) {
911
+ H({
912
+ sortable: t,
913
+ rootEl: c,
914
+ name: "filter",
915
+ targetEl: s,
916
+ toEl: n,
917
+ fromEl: n
918
+ }), V("filter", t, { evt: e }), i && e.preventDefault();
919
+ return;
920
+ }
921
+ } else if (l && (l = l.split(",").some(function(r) {
922
+ if (r = P(c, r.trim(), n, !1), r) return H({
923
+ sortable: t,
924
+ rootEl: r,
925
+ name: "filter",
926
+ targetEl: s,
927
+ fromEl: n,
928
+ toEl: n
929
+ }), V("filter", t, { evt: e }), !0;
930
+ }), l)) {
931
+ i && e.preventDefault();
932
+ return;
933
+ }
934
+ r.handle && !P(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
935
+ }
936
+ }
937
+ },
938
+ _prepareDragStart: function(e, t, n) {
939
+ var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
940
+ if (n && !U && n.parentNode === i) {
941
+ var c = R(n);
942
+ if (K = i, U = n, W = U.parentNode, jt = U.nextSibling, Mt = n, Lt = a.group, Q.dragged = U, Vt = {
943
+ target: U,
944
+ clientX: (t || e).clientX,
945
+ clientY: (t || e).clientY
946
+ }, Wt = Vt.clientX - c.left, Gt = Vt.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, U.style["will-change"] = "all", s = function() {
947
+ if (V("delayEnded", r, { evt: e }), Q.eventCanceled) {
948
+ r._onDrop();
949
+ return;
950
+ }
951
+ r._disableDelayedDragEvents(), !$e && r.nativeDraggable && (U.draggable = !0), r._triggerDragStart(e, t), H({
952
+ sortable: r,
953
+ name: "choose",
954
+ originalEvent: e
955
+ }), F(U, a.chosenClass, !0);
956
+ }, a.ignore.split(",").forEach(function(e) {
957
+ ct(U, e.trim(), _n);
958
+ }), M(o, "dragover", pn), M(o, "mousemove", pn), M(o, "touchmove", pn), a.supportPointer ? (M(o, "pointerup", r._onDrop), !this.nativeDraggable && M(o, "pointercancel", r._onDrop)) : (M(o, "mouseup", r._onDrop), M(o, "touchend", r._onDrop), M(o, "touchcancel", r._onDrop)), $e && this.nativeDraggable && (this.options.touchStartThreshold = 4, U.draggable = !0), V("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Qe || Ze))) {
959
+ if (Q.eventCanceled) {
960
+ this._onDrop();
961
+ return;
962
+ }
963
+ a.supportPointer ? (M(o, "pointerup", r._disableDelayedDrag), M(o, "pointercancel", r._disableDelayedDrag)) : (M(o, "mouseup", r._disableDelayedDrag), M(o, "touchend", r._disableDelayedDrag), M(o, "touchcancel", r._disableDelayedDrag)), M(o, "mousemove", r._delayedDragTouchMoveHandler), M(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && M(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
964
+ } else s();
965
+ }
966
+ },
967
+ _delayedDragTouchMoveHandler: function(e) {
968
+ var t = e.touches ? e.touches[0] : e;
969
+ Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
970
+ },
971
+ _disableDelayedDrag: function() {
972
+ U && _n(U), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
973
+ },
974
+ _disableDelayedDragEvents: function() {
975
+ var e = this.el.ownerDocument;
976
+ N(e, "mouseup", this._disableDelayedDrag), N(e, "touchend", this._disableDelayedDrag), N(e, "touchcancel", this._disableDelayedDrag), N(e, "pointerup", this._disableDelayedDrag), N(e, "pointercancel", this._disableDelayedDrag), N(e, "mousemove", this._delayedDragTouchMoveHandler), N(e, "touchmove", this._delayedDragTouchMoveHandler), N(e, "pointermove", this._delayedDragTouchMoveHandler);
977
+ },
978
+ _triggerDragStart: function(e, t) {
979
+ t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? M(document, "pointermove", this._onTouchMove) : t ? M(document, "touchmove", this._onTouchMove) : M(document, "mousemove", this._onTouchMove) : (M(U, "dragend", this), M(K, "dragstart", this._onDragStart));
980
+ try {
981
+ document.selection ? Tn(function() {
982
+ document.selection.empty();
983
+ }) : window.getSelection().removeAllRanges();
984
+ } catch {}
985
+ },
986
+ _dragStarted: function(e, t) {
987
+ if (Rt = !1, K && U) {
988
+ V("dragStarted", this, { evt: t }), this.nativeDraggable && M(document, "dragover", mn);
989
+ var n = this.options;
990
+ !e && F(U, n.dragClass, !1), F(U, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), H({
991
+ sortable: this,
992
+ name: "start",
993
+ originalEvent: t
994
+ });
995
+ } else this._nulling();
996
+ },
997
+ _emulateDragOver: function() {
998
+ if (X) {
999
+ this._lastX = X.clientX, this._lastY = X.clientY, dn();
1000
+ for (var e = document.elementFromPoint(X.clientX, X.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(X.clientX, X.clientY), e !== t);) t = e;
1001
+ if (U.parentNode[B]._isOutsideThisEl(e), t) do {
1002
+ if (t[B]) {
1003
+ var n = void 0;
1004
+ if (n = t[B]._onDragOver({
1005
+ clientX: X.clientX,
1006
+ clientY: X.clientY,
1007
+ target: e,
1008
+ rootEl: t
1009
+ }), n && !this.options.dragoverBubble) break;
1010
+ }
1011
+ e = t;
1012
+ } while (t = at(t));
1013
+ fn();
1014
+ }
1015
+ },
1016
+ _onTouchMove: function(e) {
1017
+ if (Vt) {
1018
+ var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = G && st(G, !0), o = G && a && a.a, s = G && a && a.d, c = nn && Z && ft(Z), l = (i.clientX - Vt.clientX + r.x) / (o || 1) + (c ? c[0] - Qt[0] : 0) / (o || 1), u = (i.clientY - Vt.clientY + r.y) / (s || 1) + (c ? c[1] - Qt[1] : 0) / (s || 1);
1019
+ if (!Q.active && !Rt) {
1020
+ if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
1021
+ this._onDragStart(e, !0);
1022
+ }
1023
+ if (G) {
1024
+ a ? (a.e += l - (Ht || 0), a.f += u - (Ut || 0)) : a = {
1025
+ a: 1,
1026
+ b: 0,
1027
+ c: 0,
1028
+ d: 1,
1029
+ e: l,
1030
+ f: u
1031
+ };
1032
+ var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
1033
+ I(G, "webkitTransform", d), I(G, "mozTransform", d), I(G, "msTransform", d), I(G, "transform", d), Ht = l, Ut = u, X = i;
1034
+ }
1035
+ e.cancelable && e.preventDefault();
1036
+ }
1037
+ },
1038
+ _appendGhost: function() {
1039
+ if (!G) {
1040
+ var e = this.options.fallbackOnBody ? document.body : K, t = R(U, !0, nn, !0, e), n = this.options;
1041
+ if (nn) {
1042
+ for (Z = e; I(Z, "position") === "static" && I(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
1043
+ Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = L()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = L(), Qt = ft(Z);
1044
+ }
1045
+ G = U.cloneNode(!0), F(G, n.ghostClass, !1), F(G, n.fallbackClass, !0), F(G, n.dragClass, !0), I(G, "transition", ""), I(G, "transform", ""), I(G, "box-sizing", "border-box"), I(G, "margin", 0), I(G, "top", t.top), I(G, "left", t.left), I(G, "width", t.width), I(G, "height", t.height), I(G, "opacity", "0.8"), I(G, "position", nn ? "absolute" : "fixed"), I(G, "zIndex", "100000"), I(G, "pointerEvents", "none"), Q.ghost = G, e.appendChild(G), I(G, "transform-origin", Wt / parseInt(G.style.width) * 100 + "% " + Gt / parseInt(G.style.height) * 100 + "%");
1046
+ }
1047
+ },
1048
+ _onDragStart: function(e, t) {
1049
+ var n = this, r = e.dataTransfer, i = n.options;
1050
+ if (V("dragStart", this, { evt: e }), Q.eventCanceled) {
1051
+ this._onDrop();
1052
+ return;
1053
+ }
1054
+ V("setupClone", this), Q.eventCanceled || (q = xt(U), q.removeAttribute("id"), q.draggable = !1, q.style["will-change"] = "", this._hideClone(), F(q, this.options.chosenClass, !1), Q.clone = q), n.cloneId = Tn(function() {
1055
+ V("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || K.insertBefore(q, U), n._hideClone(), H({
1056
+ sortable: n,
1057
+ name: "clone"
1058
+ }));
1059
+ }), !t && F(U, i.dragClass, !0), t ? (zt = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (N(document, "mouseup", n._onDrop), N(document, "touchend", n._onDrop), N(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, U)), M(document, "drop", n), I(U, "transform", "translateZ(0)")), Rt = !0, n._dragStartId = Tn(n._dragStarted.bind(n, t, e)), M(document, "selectstart", n), Kt = !0, window.getSelection().removeAllRanges(), et && I(document.body, "user-select", "none");
1060
+ },
1061
+ _onDragOver: function(e) {
1062
+ var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Lt === s, u = o.sort, d = Y || c, f, p = this, m = !1;
1063
+ if ($t) return;
1064
+ function h(o, s) {
1065
+ V(o, p, Ue({
1066
+ evt: e,
1067
+ isOwner: l,
1068
+ axis: f ? "vertical" : "horizontal",
1069
+ revert: a,
1070
+ dragRect: r,
1071
+ targetRect: i,
1072
+ canSort: u,
1073
+ fromSortable: d,
1074
+ target: n,
1075
+ completed: _,
1076
+ onMove: function(n, i) {
1077
+ return gn(K, t, U, r, n, R(n), e, i);
1078
+ },
1079
+ changed: v
1080
+ }, s));
1081
+ }
1082
+ function g() {
1083
+ h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
1084
+ }
1085
+ function _(r) {
1086
+ return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (F(U, Y ? Y.options.ghostClass : c.options.ghostClass, !1), F(U, o.ghostClass, !0)), Y !== p && p !== Q.active ? Y = p : p === Q.active && Y && (Y = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
1087
+ h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
1088
+ }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === U && !U.animated || n === t && !n.animated) && (qt = null), !o.dragoverBubble && !e.rootEl && n !== document && (U.parentNode[B]._isOutsideThisEl(e.target), !r && pn(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
1089
+ }
1090
+ function v() {
1091
+ J = z(U), It = z(U, o.draggable), H({
1092
+ sortable: p,
1093
+ name: "change",
1094
+ toEl: t,
1095
+ newIndex: J,
1096
+ newDraggableIndex: It,
1097
+ originalEvent: e
1098
+ });
1099
+ }
1100
+ if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = P(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
1101
+ if (U.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
1102
+ if (zt = !1, c && !o.disabled && (l ? u || (a = W !== K) : Y === this || (this.lastPutMode = Lt.checkPull(this, c, U, e)) && s.checkPut(this, c, U, e))) {
1103
+ if (f = this._getDirection(e, n) === "vertical", r = R(U), h("dragOverValid"), Q.eventCanceled) return m;
1104
+ if (a) return W = K, g(), this._hideClone(), h("revert"), Q.eventCanceled || (jt ? K.insertBefore(U, jt) : K.appendChild(U)), _(!0);
1105
+ var y = dt(t, o.draggable);
1106
+ if (!y || bn(e, f, this) && !y.animated) {
1107
+ if (y === U) return _(!1);
1108
+ if (y && t === e.target && (n = y), n && (i = R(n)), gn(K, t, U, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(U, y.nextSibling) : t.appendChild(U), W = t, v(), _(!0);
1109
+ } else if (y && yn(e, f, this)) {
1110
+ var b = ut(t, 0, o, !0);
1111
+ if (b === U) return _(!1);
1112
+ if (n = b, i = R(n), gn(K, t, U, r, n, i, e, !1) !== !1) return g(), t.insertBefore(U, b), W = t, v(), _(!0);
1113
+ } else if (n.parentNode === t) {
1114
+ i = R(n);
1115
+ var x = 0, ee, te = U.parentNode !== t, ne = !cn(U.animated && U.toRect || r, n.animated && n.toRect || i, f), S = f ? "top" : "left", re = lt(n, "top", "top") || lt(U, "top", "top"), ie = re ? re.scrollTop : void 0;
1116
+ qt !== n && (ee = i[S], Yt = !1, Xt = !ne && o.invertSwap || te), x = xn(e, n, i, f, ne ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Xt, qt === n);
1117
+ var C;
1118
+ if (x !== 0) {
1119
+ var w = z(U);
1120
+ do
1121
+ w -= x, C = W.children[w];
1122
+ while (C && (I(C, "display") === "none" || C === G));
1123
+ }
1124
+ if (x === 0 || C === n) return _(!1);
1125
+ qt = n, Jt = x;
1126
+ var T = n.nextElementSibling, ae = !1;
1127
+ ae = x === 1;
1128
+ var E = gn(K, t, U, r, n, i, e, ae);
1129
+ if (E !== !1) return (E === 1 || E === -1) && (ae = E === 1), $t = !0, setTimeout(vn, 30), g(), ae && !T ? t.appendChild(U) : n.parentNode.insertBefore(U, ae ? T : n), re && bt(re, 0, ie - re.scrollTop), W = U.parentNode, ee !== void 0 && !Xt && (Zt = Math.abs(ee - R(n)[S])), v(), _(!0);
1130
+ }
1131
+ if (t.contains(U)) return _(!1);
1132
+ }
1133
+ return !1;
1134
+ },
1135
+ _ignoreWhileAnimating: null,
1136
+ _offMoveEvents: function() {
1137
+ N(document, "mousemove", this._onTouchMove), N(document, "touchmove", this._onTouchMove), N(document, "pointermove", this._onTouchMove), N(document, "dragover", pn), N(document, "mousemove", pn), N(document, "touchmove", pn);
1138
+ },
1139
+ _offUpEvents: function() {
1140
+ var e = this.el.ownerDocument;
1141
+ N(e, "mouseup", this._onDrop), N(e, "touchend", this._onDrop), N(e, "pointerup", this._onDrop), N(e, "pointercancel", this._onDrop), N(e, "touchcancel", this._onDrop), N(document, "selectstart", this);
1142
+ },
1143
+ _onDrop: function(e) {
1144
+ var t = this.el, n = this.options;
1145
+ if (J = z(U), It = z(U, n.draggable), V("drop", this, { evt: e }), W = U && U.parentNode, J = z(U), It = z(U, n.draggable), Q.eventCanceled) {
1146
+ this._nulling();
1147
+ return;
1148
+ }
1149
+ Rt = !1, Xt = !1, Yt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), En(this.cloneId), En(this._dragStartId), this.nativeDraggable && (N(document, "drop", this), N(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), et && I(document.body, "user-select", ""), I(U, "transform", ""), e && (Kt && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), G && G.parentNode && G.parentNode.removeChild(G), (K === W || Y && Y.lastPutMode !== "clone") && q && q.parentNode && q.parentNode.removeChild(q), U && (this.nativeDraggable && N(U, "dragend", this), _n(U), U.style["will-change"] = "", Kt && !Rt && F(U, Y ? Y.options.ghostClass : this.options.ghostClass, !1), F(U, this.options.chosenClass, !1), H({
1150
+ sortable: this,
1151
+ name: "unchoose",
1152
+ toEl: W,
1153
+ newIndex: null,
1154
+ newDraggableIndex: null,
1155
+ originalEvent: e
1156
+ }), K === W ? J !== Pt && J >= 0 && (H({
1157
+ sortable: this,
1158
+ name: "update",
1159
+ toEl: W,
1160
+ originalEvent: e
1161
+ }), H({
1162
+ sortable: this,
1163
+ name: "sort",
1164
+ toEl: W,
1165
+ originalEvent: e
1166
+ })) : (J >= 0 && (H({
1167
+ rootEl: W,
1168
+ name: "add",
1169
+ toEl: W,
1170
+ fromEl: K,
1171
+ originalEvent: e
1172
+ }), H({
1173
+ sortable: this,
1174
+ name: "remove",
1175
+ toEl: W,
1176
+ originalEvent: e
1177
+ }), H({
1178
+ rootEl: W,
1179
+ name: "sort",
1180
+ toEl: W,
1181
+ fromEl: K,
1182
+ originalEvent: e
1183
+ }), H({
1184
+ sortable: this,
1185
+ name: "sort",
1186
+ toEl: W,
1187
+ originalEvent: e
1188
+ })), Y && Y.save()), Q.active && ((J == null || J === -1) && (J = Pt, It = Ft), H({
1189
+ sortable: this,
1190
+ name: "end",
1191
+ toEl: W,
1192
+ originalEvent: e
1193
+ }), this.save()))), this._nulling();
1194
+ },
1195
+ _nulling: function() {
1196
+ V("nulling", this), K = U = W = G = jt = q = Mt = Nt = Vt = X = Kt = J = It = Pt = Ft = qt = Jt = Y = Lt = Q.dragged = Q.ghost = Q.clone = Q.active = null;
1197
+ var e = this.el;
1198
+ en.forEach(function(t) {
1199
+ e.contains(t) && (t.checked = !0);
1200
+ }), en.length = Ht = Ut = 0;
1201
+ },
1202
+ handleEvent: function(e) {
1203
+ switch (e.type) {
1204
+ case "drop":
1205
+ case "dragend":
1206
+ this._onDrop(e);
1207
+ break;
1208
+ case "dragenter":
1209
+ case "dragover":
1210
+ U && (this._onDragOver(e), hn(e));
1211
+ break;
1212
+ case "selectstart":
1213
+ e.preventDefault();
1214
+ break;
1215
+ }
1216
+ },
1217
+ toArray: function() {
1218
+ for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], P(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Cn(t));
1219
+ return e;
1220
+ },
1221
+ sort: function(e, t) {
1222
+ var n = {}, r = this.el;
1223
+ this.toArray().forEach(function(e, t) {
1224
+ var i = r.children[t];
1225
+ P(i, this.options.draggable, r, !1) && (n[e] = i);
1226
+ }, this), t && this.captureAnimationState(), e.forEach(function(e) {
1227
+ n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
1228
+ }), t && this.animateAll();
1229
+ },
1230
+ save: function() {
1231
+ var e = this.options.store;
1232
+ e && e.set && e.set(this);
1233
+ },
1234
+ closest: function(e, t) {
1235
+ return P(e, t || this.options.draggable, this.el, !1);
1236
+ },
1237
+ option: function(e, t) {
1238
+ var n = this.options;
1239
+ if (t === void 0) return n[e];
1240
+ var r = Ot.modifyOption(this, e, t);
1241
+ r === void 0 ? n[e] = t : n[e] = r, e === "group" && un(n);
1242
+ },
1243
+ destroy: function() {
1244
+ V("destroy", this);
1245
+ var e = this.el;
1246
+ e[B] = null, N(e, "mousedown", this._onTapStart), N(e, "touchstart", this._onTapStart), N(e, "pointerdown", this._onTapStart), this.nativeDraggable && (N(e, "dragover", this), N(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
1247
+ e.removeAttribute("draggable");
1248
+ }), this._onDrop(), this._disableDelayedDragEvents(), Bt.splice(Bt.indexOf(this.el), 1), this.el = e = null;
1249
+ },
1250
+ _hideClone: function() {
1251
+ if (!Nt) {
1252
+ if (V("hideClone", this), Q.eventCanceled) return;
1253
+ I(q, "display", "none"), this.options.removeCloneOnHide && q.parentNode && q.parentNode.removeChild(q), Nt = !0;
1254
+ }
1255
+ },
1256
+ _showClone: function(e) {
1257
+ if (e.lastPutMode !== "clone") {
1258
+ this._hideClone();
1259
+ return;
1260
+ }
1261
+ if (Nt) {
1262
+ if (V("showClone", this), Q.eventCanceled) return;
1263
+ U.parentNode == K && !this.options.group.revertClone ? K.insertBefore(q, U) : jt ? K.insertBefore(q, jt) : K.appendChild(q), this.options.group.revertClone && this.animate(U, q), I(q, "display", ""), Nt = !1;
1264
+ }
1265
+ }
1266
+ };
1267
+ function hn(e) {
1268
+ e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
1269
+ }
1270
+ function gn(e, t, n, r, i, a, o, s) {
1271
+ var c, l = e[B], u = l.options.onMove, d;
1272
+ return window.CustomEvent && !Ze && !Qe ? c = new CustomEvent("move", {
1273
+ bubbles: !0,
1274
+ cancelable: !0
1275
+ }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || R(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
1276
+ }
1277
+ function _n(e) {
1278
+ e.draggable = !1;
1279
+ }
1280
+ function vn() {
1281
+ $t = !1;
1282
+ }
1283
+ function yn(e, t, n) {
1284
+ var r = R(ut(n.el, 0, n.options, !0)), i = St(n.el, n.options, G), a = 10;
1285
+ return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
1286
+ }
1287
+ function bn(e, t, n) {
1288
+ var r = R(dt(n.el, n.options.draggable)), i = St(n.el, n.options, G), a = 10;
1289
+ return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
1290
+ }
1291
+ function xn(e, t, n, r, i, a, o, s) {
1292
+ var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
1293
+ if (!o) {
1294
+ if (s && Zt < l * i) {
1295
+ if (!Yt && (Jt === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Yt = !0), Yt) f = !0;
1296
+ else if (Jt === 1 ? c < u + Zt : c > d - Zt) return -Jt;
1297
+ } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Sn(t);
1298
+ }
1299
+ return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
1300
+ }
1301
+ function Sn(e) {
1302
+ return z(U) < z(e) ? 1 : -1;
1303
+ }
1304
+ function Cn(e) {
1305
+ for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
1306
+ return r.toString(36);
1307
+ }
1308
+ function wn(e) {
1309
+ en.length = 0;
1310
+ for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
1311
+ var r = t[n];
1312
+ r.checked && en.push(r);
1313
+ }
1314
+ }
1315
+ function Tn(e) {
1316
+ return setTimeout(e, 0);
1317
+ }
1318
+ function En(e) {
1319
+ return clearTimeout(e);
1320
+ }
1321
+ tn && M(document, "touchmove", function(e) {
1322
+ (Q.active || Rt) && e.cancelable && e.preventDefault();
1323
+ }), Q.utils = {
1324
+ on: M,
1325
+ off: N,
1326
+ css: I,
1327
+ find: ct,
1328
+ is: function(e, t) {
1329
+ return !!P(e, t, e, !1);
1330
+ },
1331
+ extend: ht,
1332
+ throttle: vt,
1333
+ closest: P,
1334
+ toggleClass: F,
1335
+ clone: xt,
1336
+ index: z,
1337
+ nextTick: Tn,
1338
+ cancelNextTick: En,
1339
+ detectDirection: sn,
1340
+ getChild: ut,
1341
+ expando: B
1342
+ }, Q.get = function(e) {
1343
+ return e[B];
1344
+ }, Q.mount = function() {
1345
+ var e = [...arguments];
1346
+ e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
1347
+ if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
1348
+ e.utils && (Q.utils = Ue(Ue({}, Q.utils), e.utils)), Ot.mount(e);
1349
+ });
1350
+ }, Q.create = function(e, t) {
1351
+ return new Q(e, t);
1352
+ }, Q.version = Ye;
1353
+ var $ = [], Dn, On, kn = !1, An, jn, Mn, Nn;
1354
+ function Pn() {
1355
+ function e() {
1356
+ for (var e in this.defaults = {
1357
+ scroll: !0,
1358
+ forceAutoScrollFallback: !1,
1359
+ scrollSensitivity: 30,
1360
+ scrollSpeed: 10,
1361
+ bubbleScroll: !0
1362
+ }, this) e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
1363
+ }
1364
+ return e.prototype = {
1365
+ dragStarted: function(e) {
1366
+ var t = e.originalEvent;
1367
+ this.sortable.nativeDraggable ? M(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? M(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? M(document, "touchmove", this._handleFallbackAutoScroll) : M(document, "mousemove", this._handleFallbackAutoScroll);
1368
+ },
1369
+ dragOverCompleted: function(e) {
1370
+ var t = e.originalEvent;
1371
+ !this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
1372
+ },
1373
+ drop: function() {
1374
+ this.sortable.nativeDraggable ? N(document, "dragover", this._handleAutoScroll) : (N(document, "pointermove", this._handleFallbackAutoScroll), N(document, "touchmove", this._handleFallbackAutoScroll), N(document, "mousemove", this._handleFallbackAutoScroll)), In(), Fn(), yt();
1375
+ },
1376
+ nulling: function() {
1377
+ Mn = On = Dn = kn = Nn = An = jn = null, $.length = 0;
1378
+ },
1379
+ _handleFallbackAutoScroll: function(e) {
1380
+ this._handleAutoScroll(e, !0);
1381
+ },
1382
+ _handleAutoScroll: function(e, t) {
1383
+ var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
1384
+ if (Mn = e, t || this.options.forceAutoScrollFallback || Qe || Ze || et) {
1385
+ Ln(e, this.options, a, t);
1386
+ var o = mt(a, !0);
1387
+ kn && (!Nn || r !== An || i !== jn) && (Nn && In(), Nn = setInterval(function() {
1388
+ var a = mt(document.elementFromPoint(r, i), !0);
1389
+ a !== o && (o = a, Fn()), Ln(e, n.options, a, t);
1390
+ }, 10), An = r, jn = i);
1391
+ } else {
1392
+ if (!this.options.bubbleScroll || mt(a, !0) === L()) {
1393
+ Fn();
1394
+ return;
1395
+ }
1396
+ Ln(e, this.options, mt(a, !1), !1);
1397
+ }
1398
+ }
1399
+ }, Ve(e, {
1400
+ pluginName: "scroll",
1401
+ initializeByDefault: !0
1402
+ });
1403
+ }
1404
+ function Fn() {
1405
+ $.forEach(function(e) {
1406
+ clearInterval(e.pid);
1407
+ }), $ = [];
1408
+ }
1409
+ function In() {
1410
+ clearInterval(Nn);
1411
+ }
1412
+ var Ln = vt(function(e, t, n, r) {
1413
+ if (t.scroll) {
1414
+ var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = L(), l = !1, u;
1415
+ On !== n && (On = n, Fn(), Dn = t.scroll, u = t.scrollFn, Dn === !0 && (Dn = mt(n, !0)));
1416
+ var d = 0, f = Dn;
1417
+ do {
1418
+ var p = f, m = R(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, ee = void 0, te = p.scrollWidth, ne = p.scrollHeight, S = I(p), re = p.scrollLeft, ie = p.scrollTop;
1419
+ p === c ? (x = y < te && (S.overflowX === "auto" || S.overflowX === "scroll" || S.overflowX === "visible"), ee = b < ne && (S.overflowY === "auto" || S.overflowY === "scroll" || S.overflowY === "visible")) : (x = y < te && (S.overflowX === "auto" || S.overflowX === "scroll"), ee = b < ne && (S.overflowY === "auto" || S.overflowY === "scroll"));
1420
+ var C = x && (Math.abs(v - i) <= o && re + y < te) - (Math.abs(_ - i) <= o && !!re), w = ee && (Math.abs(g - a) <= o && ie + b < ne) - (Math.abs(h - a) <= o && !!ie);
1421
+ if (!$[d]) for (var T = 0; T <= d; T++) $[T] || ($[T] = {});
1422
+ ($[d].vx != C || $[d].vy != w || $[d].el !== p) && ($[d].el = p, $[d].vx = C, $[d].vy = w, clearInterval($[d].pid), (C != 0 || w != 0) && (l = !0, $[d].pid = setInterval(function() {
1423
+ r && this.layer === 0 && Q.active._onTouchMove(Mn);
1424
+ var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
1425
+ typeof u == "function" && u.call(Q.dragged.parentNode[B], n, t, e, Mn, $[this.layer].el) !== "continue" || bt($[this.layer].el, n, t);
1426
+ }.bind({ layer: d }), 24))), d++;
1427
+ } while (t.bubbleScroll && f !== c && (f = mt(f, !1)));
1428
+ kn = l;
1429
+ }
1430
+ }, 30), Rn = function(e) {
1431
+ var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
1432
+ if (t) {
1433
+ var c = n || i;
1434
+ o();
1435
+ var l = t.changedTouches && t.changedTouches.length ? t.changedTouches[0] : t, u = document.elementFromPoint(l.clientX, l.clientY);
1436
+ s(), c && !c.el.contains(u) && (a("spill"), this.onSpill({
1437
+ dragEl: r,
1438
+ putSortable: n
1439
+ }));
1440
+ }
1441
+ };
1442
+ function zn() {}
1443
+ zn.prototype = {
1444
+ startIndex: null,
1445
+ dragStart: function(e) {
1446
+ var t = e.oldDraggableIndex;
1447
+ this.startIndex = t;
1448
+ },
1449
+ onSpill: function(e) {
1450
+ var t = e.dragEl, n = e.putSortable;
1451
+ this.sortable.captureAnimationState(), n && n.captureAnimationState();
1452
+ var r = ut(this.sortable.el, this.startIndex, this.options);
1453
+ r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
1454
+ },
1455
+ drop: Rn
1456
+ }, Ve(zn, { pluginName: "revertOnSpill" });
1457
+ function Bn() {}
1458
+ Bn.prototype = {
1459
+ onSpill: function(e) {
1460
+ var t = e.dragEl, n = e.putSortable || this.sortable;
1461
+ n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
1462
+ },
1463
+ drop: Rn
1464
+ }, Ve(Bn, { pluginName: "removeOnSpill" }), Q.mount(new Pn()), Q.mount(Bn, zn);
1465
+ //#endregion
1466
+ //#region node_modules/.pnpm/@vueuse+integrations@14.3.0_85a542de98dc51d5a03ee7d49e7d9259/node_modules/@vueuse/integrations/dist/useSortable.js
1467
+ function Vn(e, n, i = {}) {
1468
+ let s, { document: c = a, watchElement: l = !1, ...u } = i, d = { onUpdate: (e) => {
1469
+ Wn(n, e.oldIndex, e.newIndex, e);
1470
+ } }, f = () => {
1471
+ s?.destroy(), s = void 0;
1472
+ }, p = (e) => {
1473
+ !e || s !== void 0 || (s = new Q(e, {
1474
+ ...d,
1475
+ ...u
1476
+ }));
1477
+ }, m = () => {
1478
+ let n = typeof e == "string" ? c?.querySelector(e) : t(e);
1479
+ n && p(n);
1480
+ }, h = (e, t) => {
1481
+ if (t !== void 0) s?.option(e, t);
1482
+ else return s?.option(e);
1483
+ }, g;
1484
+ return l && typeof e != "string" ? g = De(() => t(e), (e) => {
1485
+ f(), e && p(e);
1486
+ }, {
1487
+ immediate: !0,
1488
+ flush: "post"
1489
+ }) : o(m), r(() => {
1490
+ g?.(), f();
1491
+ }), {
1492
+ stop: () => {
1493
+ f();
1494
+ },
1495
+ start: m,
1496
+ option: h
1497
+ };
1498
+ }
1499
+ function Hn(e, t, n) {
1500
+ let r = e.children[n];
1501
+ e.insertBefore(t, r);
1502
+ }
1503
+ function Un(e) {
1504
+ e.parentNode && e.parentNode.removeChild(e);
1505
+ }
1506
+ function Wn(e, t, n, r = null) {
1507
+ r != null && (Un(r.item), Hn(r.from, r.item, t));
1508
+ let i = pe(e), a = i ? [...we(e)] : we(e);
1509
+ if (n >= 0 && n < a.length) {
1510
+ let r = a.splice(t, 1)[0];
1511
+ _e(() => {
1512
+ a.splice(n, 0, r), i && (e.value = a);
1513
+ });
1514
+ }
1515
+ }
1516
+ //#endregion
1517
+ //#region src/components/advance/XTableConfig.vue?vue&type=script&setup=true&lang.tsx
1518
+ var Gn = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" };
1519
+ function Kn(e) {
1520
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !me(e);
1521
+ }
1522
+ //#endregion
1523
+ //#region src/components/advance/XTableConfig.vue
1524
+ var qn = /* @__PURE__ */ k({
1525
+ __name: "XTableConfig",
1526
+ props: {
1527
+ config: {},
1528
+ data: {},
1529
+ fields: { type: Function },
1530
+ cellClassName: { type: [Function, String] },
1531
+ cellStyle: { type: [Function, Object] },
1532
+ rowClassName: { type: [Function, String] },
1533
+ rowStyle: { type: [Function, Object] },
1534
+ height: {},
1535
+ rowKey: { type: [Function, String] },
1536
+ showSummary: { type: Boolean },
1537
+ size: {},
1538
+ spanMethod: { type: Function },
1539
+ summaryMethod: { type: Function },
1540
+ align: {},
1541
+ border: { type: Boolean },
1542
+ emptyText: {},
1543
+ fit: { type: Boolean },
1544
+ headerAlign: {}
1545
+ },
1546
+ emits: [
1547
+ "rowClick",
1548
+ "headerDragend",
1549
+ "rowDblclick",
1550
+ "scroll",
1551
+ "selectionChange"
1552
+ ],
1553
+ setup(e, { expose: t, emit: r }) {
1554
+ let a = r, { data: o, loading: s, update: c } = e.fields(), u = i(n(o, (e) => e.visible), (t) => {
1555
+ let n = e.config[t.code];
1556
+ return {
1557
+ columnKey: t.code,
1558
+ content: n?.content,
1559
+ label: n?.label ?? t.label,
1560
+ minWidth: t.width,
1561
+ prop: n?.prop ?? t.prop
1562
+ };
1563
+ }), d = ye();
1564
+ Vn(d, o, {
1565
+ animation: 150,
1566
+ ghostClass: "bg-(--el-color-primary-light-7)",
1567
+ handle: ".cursor-grab",
1568
+ onUpdate: (e) => {
1569
+ Wn(o.value, e.oldIndex, e.newIndex, e), _e(() => {
1570
+ c(o.value);
1571
+ });
1572
+ }
1573
+ });
1574
+ let { t: f } = T(fe(l, void 0)), p = () => O(Jn, {
1575
+ border: !0,
1576
+ columns: u.value,
1577
+ data: e.data,
1578
+ onHeaderDragend: (e, t, n) => {
1579
+ let r = o.value.find((e) => e.code === n.columnKey);
1580
+ r && (r.width = e, _e(() => {
1581
+ c(o.value);
1582
+ }));
1583
+ },
1584
+ onRowClick: (e) => a("rowClick", e),
1585
+ showOverflowTooltip: !0
1586
+ }, null), m = () => O(ne, {
1587
+ "popper-class": "shadow-xl bg-(--el-bg-color)",
1588
+ trigger: "click",
1589
+ width: "auto"
1590
+ }, {
1591
+ default: () => {
1592
+ let e;
1593
+ return O("div", { class: "flex flex-col gap-2" }, [O(C, { size: "large" }, Kn(e = f("el.common.tableConfigTitle")) ? e : { default: () => [e] }), O(S, { "max-height": 500 }, { default: () => [O("div", {
1594
+ class: "flex flex-col divide-y divide-[#f2f6fc]",
1595
+ ref: d
1596
+ }, { default: () => o.value.map((e) => O("div", { class: "flex w-50 items-center gap-2 py-2" }, [
1597
+ O(y, {
1598
+ class: "cursor-grab",
1599
+ disabled: !1,
1600
+ icon: Re,
1601
+ size: "small",
1602
+ text: !0,
1603
+ type: "primary"
1604
+ }, null),
1605
+ O(C, { class: "flex-1 text-ellipsis" }, { default: () => [e.label] }),
1606
+ O(ie, {
1607
+ disabled: !1,
1608
+ modelValue: e.visible,
1609
+ "onUpdate:modelValue": (t) => {
1610
+ e.visible = t, _e(() => {
1611
+ c(o.value);
1612
+ });
1613
+ },
1614
+ size: "small"
1615
+ }, null)
1616
+ ])) })] })]);
1617
+ },
1618
+ reference: () => O(y, {
1619
+ class: "absolute top-0 right-0 z-1000",
1620
+ disabled: !1,
1621
+ icon: ze,
1622
+ text: !0
1623
+ }, null)
1624
+ });
1625
+ return t({ data: e.data }), (e, t) => {
1626
+ let n = Se("loading");
1627
+ return ke((A(), D("div", Gn, [O(m), O(p)])), [[n, j(s)]]);
1628
+ };
1629
+ }
1630
+ }), Jn = /* @__PURE__ */ k({
1631
+ __name: "XTableFlex",
1632
+ props: {
1633
+ cellClassName: {},
1634
+ cellStyle: {},
1635
+ rowClassName: {},
1636
+ rowStyle: {},
1637
+ columns: {},
1638
+ data: {},
1639
+ height: {},
1640
+ rowKey: {},
1641
+ showSummary: { type: Boolean },
1642
+ size: {},
1643
+ spanMethod: {},
1644
+ summaryMethod: {},
1645
+ align: {},
1646
+ border: {
1647
+ type: Boolean,
1648
+ default: void 0
1649
+ },
1650
+ emptyText: {},
1651
+ fit: {
1652
+ type: Boolean,
1653
+ default: void 0
1654
+ },
1655
+ headerAlign: {},
1656
+ showOverflowTooltip: {
1657
+ type: [Boolean, Object],
1658
+ default: void 0
1659
+ }
1660
+ },
1661
+ emits: [
1662
+ "headerDragend",
1663
+ "rowClick",
1664
+ "rowDblclick",
1665
+ "scroll",
1666
+ "selectionChange"
1667
+ ],
1668
+ setup(e, { expose: t }) {
1669
+ let n = e, r = Ee("container"), i = v(r), a = Ee("table");
1670
+ return t({
1671
+ clearSelection: () => a.value?.clearSelection(),
1672
+ getSelectionRows: () => a.value?.getSelectionRows(),
1673
+ scrollTo: (e, t) => a.value?.scrollTo(e, t),
1674
+ setCurrentRow: (e) => a.value?.setCurrentRow(e),
1675
+ setScrollLeft: (e) => a.value?.setScrollLeft(e),
1676
+ setScrollTop: (e) => a.value?.setScrollTop(e),
1677
+ toggleRowSelection: (e, t, n) => a.value?.toggleRowSelection(e, t, n)
1678
+ }), (e, t) => (A(), D("div", {
1679
+ ref_key: "container",
1680
+ ref: r,
1681
+ class: "flex-1 overflow-hidden"
1682
+ }, [O(j(c), ge({
1683
+ ref_key: "table",
1684
+ ref: a
1685
+ }, { ...n }, {
1686
+ height: j(i).height.value,
1687
+ onScroll: t[0] ||= ({ scrollLeft: t, scrollTop: n }) => e.$emit("scroll", {
1688
+ scrollLeft: t,
1689
+ scrollTop: n
1690
+ }),
1691
+ onRowClick: t[1] ||= (t) => e.$emit("rowClick", t),
1692
+ onRowDblclick: t[2] ||= (t) => e.$emit("rowDblclick", t),
1693
+ onSelectionChange: t[3] ||= (t) => e.$emit("selectionChange", t),
1694
+ onHeaderDragend: t[4] ||= (t, n, r) => e.$emit("headerDragend", t, n, r)
1695
+ }), null, 16, ["height"])], 512));
1696
+ }
1697
+ }), Yn = { class: "flex flex-1 flex-col gap-2 overflow-hidden" }, Xn = {
1698
+ key: 0,
1699
+ class: "flex justify-end"
1700
+ }, Zn = /* @__PURE__ */ k({
1701
+ __name: "XTableRequest",
1702
+ props: {
1703
+ cellClassName: { type: [Function, String] },
1704
+ cellStyle: { type: [Function, Object] },
1705
+ columns: {},
1706
+ footer: { type: Function },
1707
+ header: { type: Function },
1708
+ pagination: {
1709
+ type: Boolean,
1710
+ default: !0
1711
+ },
1712
+ paginationLayout: {},
1713
+ request: { type: Function },
1714
+ rowClassName: { type: [Function, String] },
1715
+ rowStyle: { type: [Function, Object] },
1716
+ height: {},
1717
+ rowKey: { type: [Function, String] },
1718
+ showSummary: { type: Boolean },
1719
+ size: {},
1720
+ spanMethod: { type: Function },
1721
+ summaryMethod: { type: Function },
1722
+ align: {},
1723
+ border: { type: Boolean },
1724
+ emptyText: {},
1725
+ fit: {
1726
+ type: Boolean,
1727
+ default: () => void 0
1728
+ },
1729
+ headerAlign: {},
1730
+ showOverflowTooltip: {
1731
+ type: [Boolean, Object],
1732
+ default: () => void 0
1733
+ }
1734
+ },
1735
+ emits: [
1736
+ "prepare",
1737
+ "headerDragend",
1738
+ "rowClick",
1739
+ "rowDblclick",
1740
+ "scroll",
1741
+ "selectionChange"
1742
+ ],
1743
+ setup(e, { expose: t, emit: n }) {
1744
+ let r = n, { data: i, execute: a, isFetching: o, paging: s, path: c, query: l, url: u } = e.request(), d = JSON.stringify(l.value), p = f(async () => {
1745
+ r("prepare", {
1746
+ path: c.value,
1747
+ query: l.value
1748
+ }), a();
1749
+ });
1750
+ t({
1751
+ data: i,
1752
+ isFetching: o,
1753
+ paging: s,
1754
+ path: c,
1755
+ query: l,
1756
+ reset: f(async () => {
1757
+ l.value = JSON.parse(d), p();
1758
+ }),
1759
+ search: p,
1760
+ url: u
1761
+ });
1762
+ let m = () => e.header?.({ query: l.value }), h = () => O(Jn, {
1763
+ cellClassName: e.cellClassName,
1764
+ cellStyle: e.cellStyle,
1765
+ columns: e.columns,
1766
+ data: i.value,
1767
+ fit: e.fit,
1768
+ onHeaderDragend: (e, t, n) => r("headerDragend", e, t, n),
1769
+ onRowClick: (e) => r("rowClick", e),
1770
+ onRowDblclick: (e) => r("rowDblclick", e),
1771
+ onScroll: ({ scrollLeft: e, scrollTop: t }) => r("scroll", {
1772
+ scrollLeft: e,
1773
+ scrollTop: t
1774
+ }),
1775
+ onSelectionChange: (e) => r("selectionChange", e),
1776
+ rowClassName: e.rowClassName,
1777
+ rowStyle: e.rowStyle,
1778
+ showOverflowTooltip: e.showOverflowTooltip
1779
+ }, null), _ = () => O(g, {
1780
+ currentPage: s.value.pageIndex,
1781
+ layout: e.paginationLayout,
1782
+ onCurrentChange: () => a(),
1783
+ onSizeChange: () => {
1784
+ let e = l.value;
1785
+ e.pageIndex = 1, a();
1786
+ },
1787
+ "onUpdate:currentPage": (e) => l.value.pageIndex = e ?? 0,
1788
+ "onUpdate:pageSize": (e) => l.value.pageSize = e ?? 0,
1789
+ pageSize: s.value.pageSize,
1790
+ size: "small",
1791
+ total: s.value.itemCount
1792
+ }, null), v = () => e.footer?.({ query: l.value });
1793
+ return (t, n) => {
1794
+ let r = Se("loading");
1795
+ return ke((A(), D("div", Yn, [
1796
+ O(m),
1797
+ O(h),
1798
+ e.pagination ? (A(), D("div", Xn, [O(_)])) : se("", !0),
1799
+ O(v)
1800
+ ])), [[r, j(o)]]);
1801
+ };
1802
+ }
1803
+ }), Qn = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, $n = {
1804
+ key: 0,
1805
+ class: "flex justify-end"
1806
+ };
1807
+ function er(e) {
1808
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !me(e);
1809
+ }
1810
+ //#endregion
1811
+ //#region src/components/advance/XTableRequestConfig.vue
1812
+ var tr = /* @__PURE__ */ k({
1813
+ __name: "XTableRequestConfig",
1814
+ props: {
1815
+ config: {},
1816
+ fields: { type: Function },
1817
+ header: { type: Function },
1818
+ pagination: {
1819
+ type: Boolean,
1820
+ default: !0
1821
+ },
1822
+ paginationLayout: {},
1823
+ request: { type: Function },
1824
+ cellClassName: { type: [Function, String] },
1825
+ cellStyle: { type: [Function, Object] },
1826
+ rowClassName: { type: [Function, String] },
1827
+ rowStyle: { type: [Function, Object] },
1828
+ data: {},
1829
+ height: {},
1830
+ rowKey: { type: [Function, String] },
1831
+ showSummary: { type: Boolean },
1832
+ size: {},
1833
+ spanMethod: { type: Function },
1834
+ summaryMethod: { type: Function },
1835
+ align: {},
1836
+ border: { type: Boolean },
1837
+ emptyText: {},
1838
+ fit: { type: Boolean },
1839
+ headerAlign: {}
1840
+ },
1841
+ emits: [
1842
+ "prepare",
1843
+ "headerDragend",
1844
+ "rowClick",
1845
+ "rowDblclick",
1846
+ "scroll",
1847
+ "selectionChange"
1848
+ ],
1849
+ setup(e, { expose: t, emit: r }) {
1850
+ let a = r, { data: o, execute: s, isFetching: c, paging: d, path: m, query: h, url: v } = e.request(), b = JSON.stringify(h.value), ee = f(async () => {
1851
+ a("prepare", {
1852
+ path: m.value,
1853
+ query: h.value
1854
+ }), s();
1855
+ }), te = f(async () => {
1856
+ h.value = JSON.parse(b), ee();
1857
+ }), { data: w, loading: ce, update: le } = e.fields(), ue = n(w, (e) => e.visible), k = i(ue, (t) => {
1858
+ let n = e.config[t.code];
1859
+ return {
1860
+ columnKey: t.code,
1861
+ content: n?.content,
1862
+ label: n?.label ?? t.label,
1863
+ minWidth: t.width,
1864
+ prop: n?.prop ?? t.prop
1865
+ };
1866
+ }), de = n(ue, (e) => e.search), pe = E(() => !!de.value.length), me = ye();
1867
+ Vn(me, w, {
1868
+ animation: 150,
1869
+ ghostClass: "bg-(--el-color-primary-light-7)",
1870
+ handle: ".cursor-grab",
1871
+ onUpdate: (e) => {
1872
+ Wn(w.value, e.oldIndex, e.newIndex, e), _e(() => {
1873
+ le(w.value);
1874
+ });
1875
+ }
1876
+ });
1877
+ let he = fe(l, void 0), { t: ge } = T(he), ve = () => O(u, {
1878
+ content: ({ data: t }) => O("div", { class: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-x-2" }, [[...de.value.map((n) => {
1879
+ let r = e.config[n.code];
1880
+ return O(_, {
1881
+ content: () => r?.search?.({ query: t }) ?? O(p, {
1882
+ disabled: !0,
1883
+ modelValue: n.code
1884
+ }, null),
1885
+ label: r?.label ?? n.label
1886
+ }, null);
1887
+ }), O(x, null, {
1888
+ default: () => {
1889
+ let e, t;
1890
+ return O(re, null, { default: () => [O(Ae, { action: () => {
1891
+ let e = h.value;
1892
+ e.pageIndex = void 0, e.pageSize = void 0, ee();
1893
+ } }, er(e = ge("el.common.query")) ? e : { default: () => [e] }), O(y, { onClick: () => te() }, er(t = ge("el.common.reset")) ? t : { default: () => [t] })] });
1894
+ },
1895
+ label: () => O("div", { style: "height: 22px" }, null)
1896
+ })]]),
1897
+ data: h.value,
1898
+ disabled: ce.value || c.value,
1899
+ labelPosition: he?.value.name.toLowerCase() === "zh-cn" ? "left" : "top"
1900
+ }, null), be = () => e.header?.({
1901
+ data: o.value,
1902
+ isFetching: c.value,
1903
+ paging: d.value,
1904
+ path: m.value,
1905
+ query: h.value
1906
+ }), xe = () => O(Jn, {
1907
+ border: !0,
1908
+ columns: k.value,
1909
+ data: o.value,
1910
+ onHeaderDragend: (e, t, n) => {
1911
+ let r = w.value.find((e) => e.code === n.columnKey);
1912
+ r && (r.width = e, _e(() => {
1913
+ le(w.value);
1914
+ }));
1915
+ },
1916
+ onScroll: ({ scrollLeft: e, scrollTop: t }) => a("scroll", {
1917
+ scrollLeft: e,
1918
+ scrollTop: t
1919
+ }),
1920
+ showOverflowTooltip: !0
1921
+ }, null), Ce = () => O(ne, {
1922
+ "popper-class": "shadow-xl bg-(--el-bg-color)",
1923
+ trigger: "click",
1924
+ width: "auto"
1925
+ }, {
1926
+ default: () => {
1927
+ let e;
1928
+ return O("div", { class: "flex flex-col gap-2" }, [O(C, { size: "large" }, er(e = ge("el.common.tableConfigTitle")) ? e : { default: () => [e] }), O(S, { "max-height": 500 }, { default: () => [O("div", {
1929
+ class: "flex flex-col divide-y divide-[#f2f6fc]",
1930
+ ref: me
1931
+ }, { default: () => w.value.map((e) => O("div", { class: "flex w-50 items-center gap-2 py-2" }, [
1932
+ O(y, {
1933
+ class: "cursor-grab",
1934
+ disabled: !1,
1935
+ icon: Re,
1936
+ size: "small",
1937
+ text: !0,
1938
+ type: "primary"
1939
+ }, null),
1940
+ O(C, { class: "flex-1 text-ellipsis" }, { default: () => [e.label] }),
1941
+ O(ie, {
1942
+ disabled: !1,
1943
+ modelValue: e.visible,
1944
+ "onUpdate:modelValue": (t) => {
1945
+ e.visible = t, _e(() => {
1946
+ le(w.value);
1947
+ });
1948
+ },
1949
+ size: "small"
1950
+ }, null)
1951
+ ])) })] })]);
1952
+ },
1953
+ reference: () => O(y, {
1954
+ class: "absolute top-0 right-0 z-1000",
1955
+ disabled: !1,
1956
+ icon: ze,
1957
+ text: !0
1958
+ }, null)
1959
+ }), we = () => O(g, {
1960
+ currentPage: d.value.pageIndex,
1961
+ layout: e.paginationLayout,
1962
+ onCurrentChange: () => s(),
1963
+ onSizeChange: () => {
1964
+ let e = h.value;
1965
+ e.pageIndex = 1, s();
1966
+ },
1967
+ "onUpdate:currentPage": (e) => h.value.pageIndex = e ?? 0,
1968
+ "onUpdate:pageSize": (e) => h.value.pageSize = e ?? 0,
1969
+ pageSize: d.value.pageSize,
1970
+ size: "small",
1971
+ total: d.value.itemCount
1972
+ }, null);
1973
+ return t({
1974
+ data: o,
1975
+ isFetching: c,
1976
+ paging: d,
1977
+ path: m,
1978
+ query: h,
1979
+ reset: te,
1980
+ search: ee,
1981
+ url: v
1982
+ }), (t, n) => {
1983
+ let r = Se("loading");
1984
+ return A(), D(ae, null, [
1985
+ pe.value ? (A(), oe(ve, {
1986
+ key: 0,
1987
+ class: "rounded bg-(--el-fill-color-darker) px-2 pt-4"
1988
+ })) : se("", !0),
1989
+ O(be),
1990
+ ke((A(), D("div", Qn, [
1991
+ O(Ce),
1992
+ O(xe),
1993
+ e.pagination ? (A(), D("div", $n, [O(we)])) : se("", !0)
1994
+ ])), [[r, j(ce) || j(c)]])
1995
+ ], 64);
1996
+ };
1997
+ }
1998
+ }), nr = /* @__PURE__ */ k({
1999
+ __name: "XUploadOss",
2000
+ props: /*@__PURE__*/ he({
2001
+ maxSize: { default: () => 50 * 1024 * 1024 },
2002
+ accept: {},
2003
+ disabled: { type: Boolean },
2004
+ limit: {},
2005
+ multiple: { type: Boolean },
2006
+ onPreview: { type: Function },
2007
+ onRemove: { type: Function },
2008
+ onSuccess: { type: Function },
2009
+ showFileList: { type: Boolean }
2010
+ }, {
2011
+ modelValue: {},
2012
+ modelModifiers: {}
2013
+ }),
2014
+ emits: ["update:modelValue"],
2015
+ setup(e) {
2016
+ let t = Te(e, "modelValue"), n = fe(s), r = E(() => typeof n?.oss == "function" ? n.oss() : n?.oss), i = ye(""), a = (e) => {
2017
+ let t = `${r.value?.dir}/${Date.now()}/${e.name}`;
2018
+ return i.value = `${r.value?.host}/${t}`, {
2019
+ ...r.value,
2020
+ key: t,
2021
+ OSSAccessKeyId: r.value?.accessId,
2022
+ success_action_status: "200"
2023
+ };
2024
+ }, o = (t) => (t.size > e.maxSize && ee.warning("文件过大,请重新选择"), t.size < e.maxSize), c = (e, n) => t.value = Array.isArray(t.value) ? n.map((e) => e.url) : void 0, u = () => t.value = Array.isArray(t.value) ? t.value.concat(i.value) : i.value, d = (e) => window.open(e.url), f = (e) => {
2025
+ if (!/^\d+$/.test(e)) return !1;
2026
+ let t = Number(e);
2027
+ return !Number.isSafeInteger(t) || e.length < 12 || e.length > 16 ? !1 : t >= Date.UTC(2e3, 0, 1) && t <= Date.UTC(2100, 0, 1);
2028
+ }, p = E(() => [].concat(t.value ?? []).reverse().map((e) => {
2029
+ let t = e.split("/"), n = t.at(-1), r = n?.split("_").at(0);
2030
+ return (!r || !f(r)) && (r = t.at(-2)), r && !f(r) && (r = `${w()}`), {
2031
+ name: n,
2032
+ uid: Number(r),
2033
+ url: e
2034
+ };
2035
+ })), { t: h } = T(fe(l, void 0));
2036
+ return (t, n) => {
2037
+ let i = xe("XButton");
2038
+ return A(), oe(j(m), ge({
2039
+ accept: e.accept,
2040
+ action: r.value?.host,
2041
+ data: a,
2042
+ fileList: p.value,
2043
+ beforeUpload: o,
2044
+ onRemove: c,
2045
+ onSuccess: u,
2046
+ onPreview: d
2047
+ }, { "show-file-list": "" }), le({
2048
+ default: Oe(() => [be(t.$slots, "default", {}, () => [O(i, {
2049
+ type: "primary",
2050
+ size: "small"
2051
+ }, {
2052
+ default: Oe(() => [ue(Ce(j(h)("el.uploadOss.placeholder")), 1)]),
2053
+ _: 1
2054
+ })])]),
2055
+ _: 2
2056
+ }, ["tip" in t.$slots ? {
2057
+ name: "tip",
2058
+ fn: Oe(() => [be(t.$slots, "tip")]),
2059
+ key: "0"
2060
+ } : void 0]), 1040);
2061
+ };
2062
+ }
2063
+ }), rr = /* @__PURE__ */ e({
2064
+ XButtonAsync: () => Ae,
2065
+ XButtonConfirm: () => je,
2066
+ XCascaderRequest: () => Me,
2067
+ XFormFlex: () => Pe,
2068
+ XFormRequest: () => Fe,
2069
+ XRequest: () => Ie,
2070
+ XSelectRequest: () => Le,
2071
+ XTableConfig: () => qn,
2072
+ XTableFlex: () => Jn,
2073
+ XTableRequest: () => Zn,
2074
+ XTableRequestConfig: () => tr,
2075
+ XUploadOss: () => nr
2076
+ });
2077
+ //#endregion
2078
+ export { Jn as a, Ie as c, Me as d, je as f, Zn as i, Fe as l, nr as n, qn as o, Ae as p, tr as r, Le as s, rr as t, Pe as u };