mvframe 1.0.10 → 1.0.11

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.
package/dist/vendor.js ADDED
@@ -0,0 +1,2492 @@
1
+ import { u as Ae } from "./util.js";
2
+ import { d as Ve } from "./directive.js";
3
+ import { s as Oe, p as Ie, a as je } from "./store.js";
4
+ import { createRouter as Le, createWebHistory as ze, useRoute as Ce, useRouter as we } from "vue-router";
5
+ import { computed as O, openBlock as h, createElementBlock as k, normalizeClass as B, unref as l, Fragment as Q, renderList as se, toDisplayString as I, reactive as R, onUnmounted as ie, watch as te, markRaw as ue, resolveComponent as L, createVNode as z, withCtx as V, createElementVNode as c, createCommentVNode as N, renderSlot as H, createBlock as P, resolveDynamicComponent as xe, mergeProps as le, nextTick as pe, getCurrentInstance as ae, ref as J, onMounted as ne, normalizeStyle as Ee, defineComponent as Se, inject as ge, withModifiers as be, createTextVNode as ee, defineAsyncComponent as Ne, normalizeProps as de, guardReactiveProps as me, createSlots as he, useAttrs as ye, isRef as ke, onBeforeMount as De } from "vue";
6
+ /* empty css */
7
+ import { deepEqual as ve, isInView as Ke, loadMvframeTheme as Be, useOptions as Te, download as Fe, useRemoteSummary as Pe, useLang as He } from "./composition.js";
8
+ import _e from "vuedraggable";
9
+ const Re = {
10
+ "Theme color": "Theme color",
11
+ "Restore default": "Restore default",
12
+ Appearance: "Appearance",
13
+ "Light / dark mode": "Light / dark mode",
14
+ Dark: "Dark",
15
+ Light: "Light",
16
+ Language: "Language",
17
+ English: "English",
18
+ "Simplified Chinese": "Simplified Chinese",
19
+ "Traditional Chinese": "Traditional Chinese",
20
+ Japanese: "Japanese",
21
+ Korean: "Korean",
22
+ Vietnamese: "Vietnamese",
23
+ "Frame Config": "Frame Config",
24
+ Cancel: "Cancel",
25
+ Submit: "Submit"
26
+ }, Ue = {
27
+ "Theme color": "主题色",
28
+ "Restore default": "恢复默认",
29
+ Appearance: "外观",
30
+ "Light / dark mode": "明暗模式",
31
+ Dark: "暗色",
32
+ Light: "浅色",
33
+ Language: "语言",
34
+ English: "English",
35
+ "Simplified Chinese": "中文-简体",
36
+ "Traditional Chinese": "中文-繁體",
37
+ Japanese: "日本語",
38
+ Korean: "한국어",
39
+ Vietnamese: "Tiếng Việt",
40
+ "Frame Config": "框架设置",
41
+ Cancel: "取消",
42
+ Submit: "确定"
43
+ }, Je = {
44
+ "Theme color": "主題色",
45
+ "Restore default": "還原預設",
46
+ Appearance: "外觀",
47
+ "Light / dark mode": "明暗模式",
48
+ Dark: "深色",
49
+ Light: "淺色",
50
+ Language: "語言",
51
+ English: "English",
52
+ "Simplified Chinese": "中文-简体",
53
+ "Traditional Chinese": "中文-繁體",
54
+ Japanese: "日本語",
55
+ Korean: "한국어",
56
+ Vietnamese: "Tiếng Việt",
57
+ "Frame Config": "框架設定",
58
+ Cancel: "取消",
59
+ Submit: "確定"
60
+ }, Ge = {
61
+ "Theme color": "テーマカラー",
62
+ "Restore default": "既定に戻す",
63
+ Appearance: "外観",
64
+ "Light / dark mode": "ライト/ダーク",
65
+ Dark: "ダーク",
66
+ Light: "ライト",
67
+ Language: "言語",
68
+ English: "English",
69
+ "Simplified Chinese": "簡体字中国語",
70
+ "Traditional Chinese": "繁体字中国語",
71
+ Japanese: "日本語",
72
+ Korean: "韓国語",
73
+ Vietnamese: "ベトナム語",
74
+ "Frame Config": "フレーム設定",
75
+ Cancel: "キャンセル",
76
+ Submit: "確定"
77
+ }, We = {
78
+ "Theme color": "테마 색",
79
+ "Restore default": "기본값으로 복원",
80
+ Appearance: "모양",
81
+ "Light / dark mode": "라이트/다크 모드",
82
+ Dark: "다크",
83
+ Light: "라이트",
84
+ Language: "언어",
85
+ English: "English",
86
+ "Simplified Chinese": "중국어(간체)",
87
+ "Traditional Chinese": "중국어(번체)",
88
+ Japanese: "일본어",
89
+ Korean: "한국어",
90
+ Vietnamese: "베트남어",
91
+ "Frame Config": "프레임 설정",
92
+ Cancel: "취소",
93
+ Submit: "확인"
94
+ }, qe = {
95
+ "Theme color": "Màu chủ đề",
96
+ "Restore default": "Khôi phục mặc định",
97
+ Appearance: "Giao diện",
98
+ "Light / dark mode": "Sáng / tối",
99
+ Dark: "Tối",
100
+ Light: "Sáng",
101
+ Language: "Ngôn ngữ",
102
+ English: "English",
103
+ "Simplified Chinese": "Tiếng Trung (Giản thể)",
104
+ "Traditional Chinese": "Tiếng Trung (Phồn thể)",
105
+ Japanese: "Tiếng Nhật",
106
+ Korean: "Tiếng Hàn",
107
+ Vietnamese: "Tiếng Việt",
108
+ "Frame Config": "Cấu hình khung",
109
+ Cancel: "Hủy",
110
+ Submit: "Gửi"
111
+ }, fe = {
112
+ en_us: Re,
113
+ zh_cn: Ue,
114
+ zh_tw: Je,
115
+ ja_jp: Ge,
116
+ ko_kr: We,
117
+ vi_vn: qe
118
+ };
119
+ function Ye(f) {
120
+ return String(f || "en_us").toLowerCase().replace(/-/g, "_");
121
+ }
122
+ const No = fe;
123
+ function Do(f) {
124
+ const b = Ye(f);
125
+ return { ...fe[b] || fe.en_us };
126
+ }
127
+ const Ze = ({ router: f, useAdmin: b, adminPermission: o, noaccess: e }) => {
128
+ f.beforeEach((n, i, u) => {
129
+ b ? n.meta.admin && o() ? u() : e && e(u) : u();
130
+ }), f.afterEach((n, i) => {
131
+ const u = Oe.tab(Ie);
132
+ document.title = n.meta.title, u.saveTab(n);
133
+ });
134
+ }, Qe = (f, { routes: b, guard: o, useAdmin: e = !1, adminPermission: n = () => !0, noaccess: i }) => {
135
+ const u = Le({
136
+ history: ze(),
137
+ routes: b
138
+ });
139
+ o && o(u), Ze({ router: u, useAdmin: e, adminPermission: n, noaccess: i }), f.use(u), globalThis.$router = u;
140
+ }, W = (f, b) => {
141
+ const o = f.__vccOpts || f;
142
+ for (const [e, n] of b)
143
+ o[e] = n;
144
+ return o;
145
+ }, Xe = ["disabled", "onClick"], et = /* @__PURE__ */ Object.assign({
146
+ name: "MvcBtnGroup",
147
+ inheritAttrs: !1
148
+ }, {
149
+ __name: "index",
150
+ props: {
151
+ modelValue: {
152
+ type: [String, Number, Boolean],
153
+ default: void 0
154
+ },
155
+ options: {
156
+ type: Array,
157
+ default: () => []
158
+ },
159
+ valueKey: {
160
+ type: String,
161
+ default: "value"
162
+ },
163
+ labelKey: {
164
+ type: String,
165
+ default: "label"
166
+ },
167
+ disabled: {
168
+ type: Boolean,
169
+ default: !1
170
+ },
171
+ size: {
172
+ type: String,
173
+ default: "default",
174
+ validator: (f) => ["default", "small", "large"].includes(f)
175
+ }
176
+ },
177
+ emits: ["update:modelValue", "change"],
178
+ setup(f, { emit: b }) {
179
+ const o = f, e = b, n = (d) => d == null ? d : ["Object", "Array"].includes(globalThis.$getType(d)) ? d[o.valueKey] : d, i = (d) => d == null ? "" : ["Object", "Array"].includes(globalThis.$getType(d)) ? d[o.labelKey] : String(d), u = (d) => {
180
+ const w = n(d);
181
+ return w === o.modelValue && (w !== void 0 || o.modelValue !== void 0);
182
+ }, x = (d) => {
183
+ if (o.disabled) return;
184
+ const w = n(d);
185
+ e("update:modelValue", w), e("change", w);
186
+ }, g = O(() => ({ small: "g4", default: "g6", large: "g8" })[o.size] ?? "g6"), T = O(() => o.size === "small" ? "sizeSmall" : o.size === "large" ? "sizeLarge" : "");
187
+ return (d, w) => (h(), k("div", {
188
+ class: B(["MvcBtnGroup flexMode", [l(g), l(T)]]),
189
+ role: "group"
190
+ }, [
191
+ (h(!0), k(Q, null, se(o.options, (v) => (h(), k("button", {
192
+ key: n(v),
193
+ type: "button",
194
+ class: B(["btnItem", { isActive: u(v) }]),
195
+ disabled: o.disabled,
196
+ onClick: (_) => x(v)
197
+ }, I(i(v)), 11, Xe))), 128))
198
+ ], 2));
199
+ }
200
+ }), tt = /* @__PURE__ */ W(et, [["__scopeId", "data-v-6b3d8cb4"]]), nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
201
+ __proto__: null,
202
+ default: tt
203
+ }, Symbol.toStringTag, { value: "Module" })), ot = { class: "MvcDrawer" }, lt = { class: "dragArea" }, st = {
204
+ key: 0,
205
+ class: "flexMode vc hc h56 w64 abs r t z9"
206
+ }, at = /* @__PURE__ */ Object.assign({
207
+ name: "MvcDrawer",
208
+ inheritAttrs: !1
209
+ }, {
210
+ __name: "index",
211
+ props: {
212
+ drawer: {
213
+ type: [Array, Object],
214
+ default: () => []
215
+ },
216
+ current: {
217
+ type: [Number, String],
218
+ default: ""
219
+ },
220
+ keepalive: {
221
+ type: Boolean,
222
+ default: !1
223
+ }
224
+ },
225
+ emits: ["update:current"],
226
+ setup(f, { emit: b }) {
227
+ const o = f, e = () => ({
228
+ visible: !1,
229
+ title: "",
230
+ cpt: "",
231
+ size: 640,
232
+ params: {},
233
+ direction: "rtl"
234
+ }), n = R({
235
+ drawerInfo: e(),
236
+ cpt: null,
237
+ mounted: !1,
238
+ dragMode: !1
239
+ }), i = b, u = () => {
240
+ n.mounted = !0;
241
+ }, x = () => {
242
+ i("update:current", ""), n.mounted = !1, m.value ? n.drawerInfo = e() : pe(() => {
243
+ delete n.drawerInfo.cpt;
244
+ });
245
+ }, g = () => {
246
+ n.drawerInfo.visible && (i("update:current", ""), n.drawerInfo.visible = !1);
247
+ }, T = () => {
248
+ n.drawerInfo.cpt = n.cpt;
249
+ }, d = (r) => {
250
+ n.dragMode = !0, document.addEventListener("mousemove", w), document.addEventListener("mouseup", v);
251
+ }, w = (r) => {
252
+ var t, s;
253
+ if (r.x > 80) {
254
+ const A = (((s = (t = globalThis.$config) == null ? void 0 : t.options) == null ? void 0 : s.innerWidth) ?? window.innerWidth) - r.x;
255
+ A > 480 && (n.drawerInfo.size = A);
256
+ }
257
+ }, v = () => {
258
+ n.dragMode = !1, _();
259
+ }, _ = () => {
260
+ document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", v);
261
+ }, M = O(() => !!n.drawerInfo.title), m = O(() => !o.keepalive);
262
+ return ie(() => {
263
+ _();
264
+ }), te(
265
+ () => o.current,
266
+ (r) => {
267
+ if (o.drawer.length)
268
+ if (window.$getType(r) === "Number") {
269
+ const t = o.drawer[r], s = {
270
+ ...t,
271
+ size: t.size || 640,
272
+ direction: t.direction || "rtl",
273
+ visible: !0
274
+ };
275
+ s.cpt ? (n.cpt = ue(s.cpt), delete s.cpt) : (n.cpt = null, u()), n.drawerInfo = s;
276
+ } else
277
+ g();
278
+ }
279
+ ), (r, t) => {
280
+ const s = L("Loading"), y = L("el-drawer");
281
+ return h(), k("div", ot, [
282
+ z(y, {
283
+ modelValue: l(n).drawerInfo.visible,
284
+ "onUpdate:modelValue": t[0] || (t[0] = (A) => l(n).drawerInfo.visible = A),
285
+ title: r.$l(l(n).drawerInfo.title),
286
+ "with-header": l(M),
287
+ "append-to-body": "",
288
+ size: l(n).drawerInfo.size,
289
+ direction: l(n).drawerInfo.direction,
290
+ "destroy-on-close": l(m),
291
+ onClosed: x,
292
+ onOpened: T,
293
+ class: B(l(n).dragMode && "notransition noevent noselect")
294
+ }, {
295
+ default: V(() => [
296
+ c("div", lt, [
297
+ c("div", {
298
+ class: B(["dragHandle", l(n).dragMode && "active"]),
299
+ onMousedown: d
300
+ }, [...t[1] || (t[1] = [
301
+ c("i", { class: "imicon im-handle fs12" }, null, -1)
302
+ ])], 34)
303
+ ]),
304
+ l(M) ? N("", !0) : (h(), k("div", st, [
305
+ c("i", {
306
+ class: "imicon im-close fs20 txt-dark7 hover-txt-primary",
307
+ onClick: g
308
+ })
309
+ ])),
310
+ z(s, {
311
+ loading: !l(n).mounted
312
+ }, null, 8, ["loading"]),
313
+ r.$slots.default ? H(r.$slots, "default", { key: 1 }, void 0, !0) : (h(), P(xe(l(n).drawerInfo.cpt), le({ key: 2 }, r.$attrs, {
314
+ params: l(n).drawerInfo.params,
315
+ onClose: g,
316
+ onMounted: u
317
+ }), null, 16, ["params"]))
318
+ ]),
319
+ _: 3
320
+ }, 8, ["modelValue", "title", "with-header", "size", "direction", "destroy-on-close", "class"])
321
+ ]);
322
+ };
323
+ }
324
+ }), rt = /* @__PURE__ */ W(at, [["__scopeId", "data-v-665c2158"]]), it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
325
+ __proto__: null,
326
+ default: rt
327
+ }, Symbol.toStringTag, { value: "Module" })), ct = {
328
+ key: 1,
329
+ class: "flexMode vc"
330
+ }, ut = { class: "pl4" }, dt = { class: "pl4" }, pt = /* @__PURE__ */ Object.assign({
331
+ name: "MvcDrawerArea",
332
+ inheritAttrs: !1
333
+ }, {
334
+ __name: "index",
335
+ props: {
336
+ noscroll: {
337
+ type: Boolean,
338
+ default: !1
339
+ },
340
+ nofooter: {
341
+ type: Boolean,
342
+ default: !1
343
+ },
344
+ loading: {
345
+ type: Boolean,
346
+ default: !1
347
+ },
348
+ loadingTxt: {
349
+ type: String,
350
+ default: "... ... ..."
351
+ },
352
+ footerClass: {
353
+ type: String,
354
+ default: "hc"
355
+ },
356
+ showCancel: {
357
+ type: Boolean,
358
+ default: !0
359
+ },
360
+ cancelTxt: {
361
+ type: String,
362
+ default: "Cancel"
363
+ },
364
+ cancelIcon: {
365
+ type: String,
366
+ default: "im-left"
367
+ },
368
+ showConfirm: {
369
+ type: Boolean,
370
+ default: !0
371
+ },
372
+ confirmTxt: {
373
+ type: String,
374
+ default: "Submit"
375
+ },
376
+ confirmIcon: {
377
+ type: String,
378
+ default: "im-check"
379
+ },
380
+ minusHeight: {
381
+ type: [String, Number],
382
+ default: 0
383
+ }
384
+ },
385
+ emits: ["close", "submit", "cancel", "mounted"],
386
+ setup(f, { expose: b, emit: o }) {
387
+ const e = f, { proxy: n } = ae(), i = J(), u = o;
388
+ ne(() => {
389
+ u("mounted");
390
+ });
391
+ const x = () => {
392
+ u("close"), u("cancel");
393
+ }, g = () => {
394
+ u("submit");
395
+ };
396
+ b({
397
+ toClose: x,
398
+ scrollTo: (v) => {
399
+ var _;
400
+ (_ = i.value) == null || _.setScrollTop(v);
401
+ }
402
+ });
403
+ const d = O(() => [e.loading && "noevent", n.$attrs.class]), w = O(() => ({
404
+ height: `calc(100vh - 56px - ${e.nofooter ? 0 : 64}px - ${e.minusHeight}px)`
405
+ }));
406
+ return (v, _) => {
407
+ const M = L("Loading"), m = L("el-scrollbar"), r = L("el-button");
408
+ return h(), k(Q, null, [
409
+ c("div", {
410
+ class: B(["MvcDrawerBody VAfter", l(d)]),
411
+ style: Ee(l(w))
412
+ }, [
413
+ z(M, {
414
+ loading: e.loading,
415
+ txt: e.loadingTxt
416
+ }, null, 8, ["loading", "txt"]),
417
+ e.noscroll ? H(v.$slots, "default", { key: 0 }, void 0, !0) : (h(), P(m, {
418
+ key: 1,
419
+ ref_key: "scrollbar",
420
+ ref: i,
421
+ class: "wp100"
422
+ }, {
423
+ default: V(() => [
424
+ H(v.$slots, "default", {}, void 0, !0)
425
+ ]),
426
+ _: 3
427
+ }, 512))
428
+ ], 6),
429
+ e.nofooter ? N("", !0) : (h(), k("div", {
430
+ key: 0,
431
+ class: B(["drawerFooter relative flexMode vc hb h64", e.footerClass])
432
+ }, [
433
+ v.$slots.footer ? H(v.$slots, "footer", { key: 0 }, void 0, !0) : (h(), k("div", ct, [
434
+ v.$slots.cancel ? H(v.$slots, "cancel", { key: 0 }, void 0, !0) : e.showCancel ? (h(), P(r, {
435
+ key: 1,
436
+ plain: "",
437
+ size: "large",
438
+ onClick: x
439
+ }, {
440
+ icon: V(() => [
441
+ c("i", {
442
+ class: B(["imicon", e.cancelIcon])
443
+ }, null, 2)
444
+ ]),
445
+ default: V(() => [
446
+ c("span", ut, I(v.$l(e.cancelTxt)), 1)
447
+ ]),
448
+ _: 1
449
+ })) : N("", !0),
450
+ v.$slots.submit ? H(v.$slots, "submit", { key: 2 }, void 0, !0) : e.showConfirm ? (h(), P(r, {
451
+ key: 3,
452
+ type: "primary",
453
+ size: "large",
454
+ loading: e.loading,
455
+ onClick: g
456
+ }, {
457
+ icon: V(() => [
458
+ c("i", {
459
+ class: B(["imicon", e.confirmIcon])
460
+ }, null, 2)
461
+ ]),
462
+ default: V(() => [
463
+ c("span", dt, I(v.$l(e.confirmTxt)), 1)
464
+ ]),
465
+ _: 1
466
+ }, 8, ["loading"])) : N("", !0),
467
+ v.$slots.footerright ? H(v.$slots, "footerright", { key: 4 }, void 0, !0) : N("", !0)
468
+ ]))
469
+ ], 2))
470
+ ], 64);
471
+ };
472
+ }
473
+ }), mt = /* @__PURE__ */ W(pt, [["__scopeId", "data-v-f61caca0"]]), ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
474
+ __proto__: null,
475
+ default: mt
476
+ }, Symbol.toStringTag, { value: "Module" })), gt = Se({
477
+ name: "MvcFormItemFilter",
478
+ setup: (f, b) => {
479
+ var i, u;
480
+ const o = (x) => Array.isArray(x) ? x.filter((g) => g.children !== "v-if").map((g) => {
481
+ var d, w, v, _;
482
+ return g && (window.$getType(g.children) === "Array" ? g.children = o(g.children) : ((d = g.type) == null ? void 0 : d.name) === "ElFormItem" && (w = g.props) != null && w.label && (g.props.label = ((_ = (v = g.props.label).$l) == null ? void 0 : _.call(v)) || g.props.label), g);
483
+ }) : [], e = (u = (i = b.slots).default) == null ? void 0 : u.call(i), n = e == null ? void 0 : e[0];
484
+ return () => o((n == null ? void 0 : n.children) ?? []);
485
+ }
486
+ }), ht = { class: "MvcForm" }, yt = /* @__PURE__ */ Object.assign({
487
+ name: "MvcForm"
488
+ }, {
489
+ __name: "index",
490
+ props: {
491
+ modelValue: {
492
+ type: Object,
493
+ default: /* @__PURE__ */ Object.create(null)
494
+ },
495
+ rules: {
496
+ type: Object,
497
+ default: /* @__PURE__ */ Object.create(null)
498
+ },
499
+ size: {
500
+ type: String,
501
+ default: "large"
502
+ }
503
+ },
504
+ setup(f, { expose: b, emit: o }) {
505
+ const e = f, n = R({
506
+ form: {}
507
+ }), { proxy: i } = ae(), u = o, x = async () => {
508
+ var d;
509
+ try {
510
+ return (d = i.$refs) != null && d.form ? (await i.$refs.form.validate(), g()) : !1;
511
+ } catch {
512
+ return !1;
513
+ }
514
+ }, g = () => n.form, T = O(() => {
515
+ const d = {};
516
+ for (let w in e.rules)
517
+ d[w] = e.rules[w].map((v) => ({
518
+ ...v,
519
+ ...v.message && { message: window.$l(v.message) }
520
+ }));
521
+ return d;
522
+ });
523
+ return te(
524
+ () => n.form,
525
+ (d) => {
526
+ d && !ve(d, e.modelValue) && u("update:modelValue", d);
527
+ },
528
+ {
529
+ deep: !0
530
+ }
531
+ ), te(
532
+ () => e.modelValue,
533
+ (d) => {
534
+ d && !ve(d, n.form) && (n.form = d);
535
+ },
536
+ {
537
+ immediate: !0,
538
+ deep: !0
539
+ }
540
+ ), b({
541
+ validate: x
542
+ }), (d, w) => {
543
+ const v = L("el-form");
544
+ return h(), k("div", ht, [
545
+ z(v, {
546
+ ref: "form",
547
+ model: l(n).form,
548
+ rules: l(T),
549
+ size: e.size,
550
+ "validate-on-rule-change": !1,
551
+ "label-position": "top"
552
+ }, {
553
+ default: V(() => [
554
+ z(l(gt), null, {
555
+ default: V(() => [
556
+ H(d.$slots, "default")
557
+ ]),
558
+ _: 3
559
+ })
560
+ ]),
561
+ _: 3
562
+ }, 8, ["model", "rules", "size"])
563
+ ]);
564
+ };
565
+ }
566
+ }), bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
567
+ __proto__: null,
568
+ default: yt
569
+ }, Symbol.toStringTag, { value: "Module" })), vt = { class: "FrameTab sticky h36 pl16 pt4 xscroll nobar fadeout flexGrow backdrop z9" }, _t = { class: "relative flexMode vr g4 z2" }, $t = ["id", "onContextmenu", "onClick", "onDblclick"], Ct = ["onClick"], wt = /* @__PURE__ */ Object.assign({
570
+ name: "FrameTab",
571
+ inheritAttrs: !1
572
+ }, {
573
+ __name: "Tab",
574
+ setup(f) {
575
+ R({
576
+ active: 2
577
+ });
578
+ const b = ge("store"), o = b.tab(), e = b.rmenu(), n = Ce(), i = we(), { proxy: u } = ae();
579
+ ne(() => {
580
+ x();
581
+ });
582
+ const x = () => {
583
+ u.$el.addEventListener("scroll", T);
584
+ }, g = () => {
585
+ const s = localStorage.getItem("tabsScroll");
586
+ s && (u.$el.scrollLeft = Number(s));
587
+ }, T = (s) => {
588
+ let y = null;
589
+ y !== null && clearTimeout(y), y = setTimeout(function() {
590
+ const { scrollLeft: A } = s.target;
591
+ localStorage.setItem("tabsScroll", A);
592
+ }, 100);
593
+ }, d = () => {
594
+ pe(() => {
595
+ const s = u.$el.querySelector(`#tab_${r.value}`);
596
+ Ke(u.$el, s) ? g() : u.$el.scrollLeft = (s == null ? void 0 : s.offsetLeft) - 16;
597
+ });
598
+ }, w = (s, y, A) => {
599
+ e.saveData("type", "tabManager"), e.saveData("options", [
600
+ {
601
+ label: "Close",
602
+ value: "close",
603
+ icon: "im-close",
604
+ disabled: m.value.length === 1,
605
+ cb: () => {
606
+ o.closeTab(y, A);
607
+ }
608
+ },
609
+ {
610
+ label: "Close Right",
611
+ value: "closeRight",
612
+ icon: "im-right",
613
+ disabled: A === m.value.length - 1,
614
+ cb: () => {
615
+ o.closeRightTab(y, A);
616
+ }
617
+ },
618
+ {
619
+ label: "Close Left",
620
+ value: "closeLeft",
621
+ icon: "im-left",
622
+ disabled: A === 0,
623
+ cb: () => {
624
+ o.closeLeftTab(y, A);
625
+ }
626
+ },
627
+ {
628
+ label: "Close Other",
629
+ value: "closeOther",
630
+ icon: "im-left",
631
+ disabled: m.value.length === 1,
632
+ cb: () => {
633
+ o.closeOtherTab(y, A);
634
+ }
635
+ }
636
+ ]), e.show({ el: s.target });
637
+ }, v = (s) => {
638
+ s.name !== r.value && i.push({ name: s.name });
639
+ }, _ = (s) => {
640
+ s.name === r.value ? i.replace({ name: s.name, query: { t: +/* @__PURE__ */ new Date() } }) : v(s);
641
+ }, M = (s, y) => {
642
+ o.closeTab(s, y);
643
+ }, m = O(() => o.tabs), r = O(() => n.name), t = O(() => m.value.length);
644
+ return te(
645
+ () => t.value,
646
+ (s) => {
647
+ s && (localStorage.setItem("tabs", JSON.stringify(m.value)), d());
648
+ },
649
+ {
650
+ immediate: !0
651
+ }
652
+ ), ie(() => {
653
+ u.$el.removeEventListener("scroll", T);
654
+ }), (s, y) => (h(), k("div", vt, [
655
+ c("div", _t, [
656
+ (h(!0), k(Q, null, se(l(m), (A, S) => (h(), k("div", {
657
+ key: A.name,
658
+ id: `tab_${A.name}`,
659
+ class: B(["relative flexMode vc g4 noShrink tabItem h32 p0-8 fs12 radius4 point noselect", [
660
+ A.name === l(r) && "active",
661
+ l(m).length > 1 && "hoverItem"
662
+ ]]),
663
+ onContextmenu: be((a) => w(a, A, S), ["prevent", "stop"]),
664
+ onClick: (a) => v(A),
665
+ onDblclick: (a) => _(A)
666
+ }, [
667
+ A.icon ? (h(), k("i", {
668
+ key: 0,
669
+ class: B(["imicon", A.icon])
670
+ }, null, 2)) : N("", !0),
671
+ ee(" " + I(A.meta.title) + " ", 1),
672
+ c("div", {
673
+ class: "abs r flexMode hc vc w20 h20",
674
+ onClick: be((a) => M(A, S), ["stop"])
675
+ }, [...y[0] || (y[0] = [
676
+ c("span", null, "✕", -1)
677
+ ])], 8, Ct)
678
+ ], 42, $t))), 128)),
679
+ y[1] || (y[1] = c("div", { class: "w16 h16 noShrink" }, null, -1))
680
+ ])
681
+ ]));
682
+ }
683
+ }), xt = /* @__PURE__ */ W(wt, [["__scopeId", "data-v-bc298ab0"]]), St = { class: "LogoArea flexMode vc h64 p0-16 relative" }, kt = { class: "logo" }, Tt = { class: "logomini" }, Mt = { class: "MenuArea p4 yscroll" }, At = ["onClick"], Vt = { class: "itemIcon w24 txt-c txt-tip fs18" }, Ot = { key: 1 }, It = {
684
+ key: 0,
685
+ class: "itemChildrenArea mt2 p4"
686
+ }, jt = ["onClick"], Lt = { class: "itemIcon w24 txt-c txt-tip fs18" }, zt = /* @__PURE__ */ Object.assign({
687
+ name: "FrameMenu",
688
+ inheritAttrs: !1
689
+ }, {
690
+ __name: "Menu",
691
+ props: {
692
+ iconClass: {
693
+ type: String,
694
+ default: ""
695
+ },
696
+ routes: {
697
+ type: Array,
698
+ default: () => []
699
+ }
700
+ },
701
+ setup(f, { emit: b }) {
702
+ const o = f, e = R({
703
+ collapse: !1
704
+ }), n = Ce(), i = we();
705
+ ne(() => {
706
+ x();
707
+ });
708
+ const u = b, x = () => {
709
+ const m = localStorage.getItem("collapse");
710
+ m && (e.collapse = JSON.parse(m)), document.addEventListener("keydown", T);
711
+ }, g = (m) => {
712
+ e.collapse === !0 ? e.collapse = !1 : e.collapse === !1 ? e.collapse = !0 : e.collapse = m, localStorage.setItem("collapse", e.collapse), u("on-collapse-change", e.collapse);
713
+ }, T = (m) => {
714
+ m.shiftKey && (m.metaKey || m.ctrlKey) && (m.keyCode === 37 ? g(!0) : m.keyCode === 39 && g(!1));
715
+ }, d = (m) => {
716
+ var r;
717
+ return (r = m == null ? void 0 : m.children) != null && r.length ? d(m.children[0]) : m;
718
+ }, w = (m) => {
719
+ var r;
720
+ return ((r = m == null ? void 0 : m.children) == null ? void 0 : r.some((t) => t.name === n.name || w(t))) ?? !1;
721
+ }, v = (m) => {
722
+ const r = d(m);
723
+ r != null && r.name && i.push({ name: r.name });
724
+ }, _ = () => {
725
+ const m = { ...n.query, _: Date.now() }, r = n.name ? { name: n.name, params: n.params, query: m } : { path: n.path, query: m };
726
+ i.replace(r).catch(() => {
727
+ });
728
+ }, M = O(() => e.collapse ? "im-verticalleft" : "im-verticalright");
729
+ return ie(() => {
730
+ document.removeEventListener("keydown", T);
731
+ }), (m, r) => (h(), k("div", {
732
+ class: B(["FrameMenu sticky vh100 noselect noShrink", l(e).collapse && "collapse"])
733
+ }, [
734
+ c("div", St, [
735
+ c("div", kt, [
736
+ H(m.$slots, "logo", {}, void 0, !0)
737
+ ]),
738
+ c("div", Tt, [
739
+ H(m.$slots, "logomini", {}, void 0, !0)
740
+ ]),
741
+ c("div", {
742
+ class: "collapseArea hover abs",
743
+ onClick: r[0] || (r[0] = (t) => g(l(e).collapse))
744
+ }, [
745
+ c("i", {
746
+ class: B(["imicon fs20", l(M)])
747
+ }, null, 2)
748
+ ])
749
+ ]),
750
+ c("div", Mt, [
751
+ (h(!0), k(Q, null, se(o.routes, (t, s) => {
752
+ var y, A;
753
+ return h(), k("div", {
754
+ key: s,
755
+ class: "menuItemWrap mb2"
756
+ }, [
757
+ c("div", {
758
+ class: B(["menuItem flexMode vc g8 radius4 p0-16", [
759
+ l(n).name === t.name && "active bg-primary",
760
+ l(e).collapse && "hc",
761
+ l(e).collapse && w(t) && "activeChild"
762
+ ]]),
763
+ onClick: (S) => v(t),
764
+ onDblclick: _
765
+ }, [
766
+ c("div", Vt, [
767
+ t.meta.icon ? (h(), k("i", {
768
+ key: 0,
769
+ class: B([o.iconClass, t.meta.icon])
770
+ }, null, 2)) : (h(), k("span", Ot, I(((y = t.meta.title) == null ? void 0 : y.substr(0, 1)) || "U"), 1))
771
+ ]),
772
+ l(e).collapse ? N("", !0) : (h(), k("div", {
773
+ key: 0,
774
+ class: B(["itemTitle txt-nowrap fs14", l(n).name === t.name ? "txt-white" : "txt-h1"])
775
+ }, I(t.meta.title), 3))
776
+ ], 42, At),
777
+ (A = t.children) != null && A.length ? (h(), k("div", It, [
778
+ (h(!0), k(Q, null, se(t.children, (S, a) => (h(), k("div", {
779
+ key: a,
780
+ class: B(["childrenItem flexMode vc g8 radius4 h40 p0-16", l(n).name === S.name && "active bg-primary"]),
781
+ onClick: (p) => v(S),
782
+ onDblclick: _
783
+ }, [
784
+ c("div", Lt, [
785
+ S.meta.icon ? (h(), k("i", {
786
+ key: 0,
787
+ class: B([o.iconClass, S.meta.icon])
788
+ }, null, 2)) : N("", !0)
789
+ ]),
790
+ l(e).collapse ? N("", !0) : (h(), k("div", {
791
+ key: 0,
792
+ class: B(["itemTitle txt-nowrap fs14", l(n).name === S.name ? "txt-white" : "txt-h1"])
793
+ }, I(S.meta.title), 3))
794
+ ], 42, jt))), 128))
795
+ ])) : N("", !0)
796
+ ]);
797
+ }), 128))
798
+ ])
799
+ ], 2));
800
+ }
801
+ }), Et = /* @__PURE__ */ W(zt, [["__scopeId", "data-v-9db97f10"]]), Nt = { class: "FrameFooter" }, Dt = { class: "txt-tip" }, Kt = { class: "txt-primary" }, Bt = /* @__PURE__ */ Object.assign({
802
+ name: "FrameFooter",
803
+ inheritAttrs: !1
804
+ }, {
805
+ __name: "Footer",
806
+ setup(f) {
807
+ R({});
808
+ const b = O(() => globalThis.$config);
809
+ return (o, e) => (h(), k("div", Nt, [
810
+ c("span", Dt, I(l(b).copyright), 1),
811
+ c("span", Kt, I(l(b).author), 1)
812
+ ]));
813
+ }
814
+ }), Ft = /* @__PURE__ */ W(Bt, [["__scopeId", "data-v-c3ba0162"]]), Pt = /* @__PURE__ */ Object.assign({
815
+ name: "FrameTool",
816
+ inheritAttrs: !1
817
+ }, {
818
+ __name: "Tool",
819
+ setup(f) {
820
+ const b = Ne(() => import("./Config.js"));
821
+ R({});
822
+ const o = R({
823
+ current: "",
824
+ list: [
825
+ {
826
+ title: "Frame Config",
827
+ cpt: ue(b)
828
+ }
829
+ ]
830
+ }), e = () => {
831
+ o.current = 0;
832
+ };
833
+ return (n, i) => {
834
+ const u = L("Drawer");
835
+ return h(), k(Q, null, [
836
+ c("div", { class: "FrameTool fixed r t flexMode vc g8 p0-8 w40 h40 noShrink z9" }, [
837
+ c("div", {
838
+ class: "hover w24 h24 flexMode hc vc",
839
+ onClick: e
840
+ }, [...i[1] || (i[1] = [
841
+ c("i", { class: "imicon im-setting fs20" }, null, -1)
842
+ ])])
843
+ ]),
844
+ z(u, {
845
+ current: l(o).current,
846
+ "onUpdate:current": i[0] || (i[0] = (x) => l(o).current = x),
847
+ drawer: l(o).list
848
+ }, null, 8, ["current", "drawer"])
849
+ ], 64);
850
+ };
851
+ }
852
+ }), Ht = { class: "MvcFrame" }, Rt = { class: "PageArea" }, Ut = /* @__PURE__ */ Object.assign({
853
+ name: "MvcFrame",
854
+ inheritAttrs: !1
855
+ }, {
856
+ __name: "index",
857
+ props: {
858
+ /* menu包含:
859
+ @params
860
+ options: vue-router的路由表
861
+ iconClass: 菜单图标样式名,iconfont创建时的样式名或其它自定义规则
862
+ logo: 菜单logo, vue dom
863
+ logomini: 菜单logo缩小时的样子, vue dom
864
+ */
865
+ menu: {
866
+ type: Object,
867
+ default: /* @__PURE__ */ Object.create(null)
868
+ },
869
+ page: {
870
+ type: Object,
871
+ default: /* @__PURE__ */ Object.create(null)
872
+ }
873
+ },
874
+ setup(f) {
875
+ const b = f;
876
+ R({});
877
+ const e = ge("store").tab();
878
+ ne(() => {
879
+ n();
880
+ });
881
+ const n = () => {
882
+ Be(), i(), Te();
883
+ }, i = () => {
884
+ var u, x, g, T, d, w;
885
+ if ((x = (u = globalThis.$config) == null ? void 0 : u.iconfont) != null && x.url) {
886
+ const v = document.createElement("script");
887
+ if (v.id = "iconfont", v.type = "text/javascript", v.src = (T = (g = globalThis.$config) == null ? void 0 : g.iconfont) == null ? void 0 : T.url, document.getElementById("iconfont"))
888
+ return;
889
+ document.head.appendChild(v), (w = (d = globalThis.$config) == null ? void 0 : d.iconfont) == null || delete w.url;
890
+ }
891
+ };
892
+ return (u, x) => {
893
+ const g = L("router-view");
894
+ return h(), k("div", Ht, [
895
+ z(Et, de(me(b.menu)), he({ _: 2 }, [
896
+ u.$slots.logo ? {
897
+ name: "logo",
898
+ fn: V(() => [
899
+ H(u.$slots, "logo", {}, void 0, !0)
900
+ ]),
901
+ key: "0"
902
+ } : void 0,
903
+ u.$slots.logomini ? {
904
+ name: "logomini",
905
+ fn: V(() => [
906
+ H(u.$slots, "logomini", {}, void 0, !0)
907
+ ]),
908
+ key: "1"
909
+ } : void 0
910
+ ]), 1040),
911
+ c("div", Rt, [
912
+ l(e).useTab ? (h(), P(xt, { key: 0 })) : N("", !0),
913
+ z(Pt),
914
+ z(g, de(me(b.page)), null, 16),
915
+ z(Ft)
916
+ ])
917
+ ]);
918
+ };
919
+ }
920
+ }), Jt = /* @__PURE__ */ W(Ut, [["__scopeId", "data-v-e46376d7"]]), Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
921
+ __proto__: null,
922
+ default: Jt
923
+ }, Symbol.toStringTag, { value: "Module" })), Wt = {
924
+ class: "MvcIcon",
925
+ "aria-hidden": "true"
926
+ }, qt = ["xlink:href"], Yt = /* @__PURE__ */ Object.assign({
927
+ name: "MvcIcon"
928
+ }, {
929
+ __name: "index",
930
+ props: {
931
+ name: {
932
+ type: String,
933
+ default: "cloud"
934
+ }
935
+ },
936
+ setup(f) {
937
+ const b = R({
938
+ prefix: "imc"
939
+ });
940
+ return ne(() => {
941
+ var o, e;
942
+ (e = (o = globalThis.$config) == null ? void 0 : o.iconfont) != null && e.prefix && (b.prefix = globalThis.$config.iconfont.prefix);
943
+ }), (o, e) => (h(), k("svg", Wt, [
944
+ c("use", {
945
+ "xlink:href": `#${l(b).prefix}-${f.name}`
946
+ }, null, 8, qt)
947
+ ]));
948
+ }
949
+ }), Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
950
+ __proto__: null,
951
+ default: Yt
952
+ }, Symbol.toStringTag, { value: "Module" })), Qt = /* @__PURE__ */ Object.assign({
953
+ name: "MvcInput"
954
+ }, {
955
+ __name: "index",
956
+ props: {
957
+ modelValue: {
958
+ type: [String, Number],
959
+ default: ""
960
+ }
961
+ },
962
+ emits: [
963
+ "update:modelValue",
964
+ "input",
965
+ "change",
966
+ "blur",
967
+ "focus"
968
+ ],
969
+ setup(f, { emit: b }) {
970
+ const o = f, e = J(null);
971
+ let n = null;
972
+ const i = R({
973
+ val: "",
974
+ isComposing: !1
975
+ }), u = b, { proxy: x } = ae();
976
+ ne(() => {
977
+ var m, r, t;
978
+ const M = (m = e.value) == null ? void 0 : m.$el;
979
+ n = ((r = M == null ? void 0 : M.querySelector) == null ? void 0 : r.call(M, "input")) || ((t = M == null ? void 0 : M.querySelector) == null ? void 0 : t.call(M, "textarea")), n && (n.addEventListener("compositionstart", g), n.addEventListener("compositionend", T));
980
+ });
981
+ const g = () => {
982
+ i.isComposing = !0;
983
+ }, T = () => {
984
+ i.isComposing = !1, pe(() => w(i.val));
985
+ }, d = (M) => {
986
+ i.isComposing || w(M);
987
+ }, w = (M) => {
988
+ u("update:modelValue", M), u("input", M);
989
+ }, v = O(() => !!(x.$attrs.maxlength || _.value)), _ = O(() => x.$attrs.max);
990
+ return te(
991
+ () => o.modelValue,
992
+ (M) => {
993
+ const m = String(M ?? "");
994
+ String(i.val) !== m && (i.val = m);
995
+ },
996
+ { immediate: !0 }
997
+ ), ie(() => {
998
+ n && (n.removeEventListener("compositionstart", g), n.removeEventListener("compositionend", T), n = null);
999
+ }), (M, m) => {
1000
+ const r = L("el-input");
1001
+ return h(), P(r, le({
1002
+ ref_key: "inputRef",
1003
+ ref: e,
1004
+ modelValue: l(i).val,
1005
+ "onUpdate:modelValue": m[0] || (m[0] = (t) => l(i).val = t),
1006
+ "show-word-limit": l(v),
1007
+ maxlength: l(_),
1008
+ class: "MvcInput"
1009
+ }, M.$attrs, { onInput: d }), null, 16, ["modelValue", "show-word-limit", "maxlength"]);
1010
+ };
1011
+ }
1012
+ }), Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1013
+ __proto__: null,
1014
+ default: Qt
1015
+ }, Symbol.toStringTag, { value: "Module" })), en = { class: "MvcPage" }, tn = {
1016
+ key: 0,
1017
+ class: "PageHeader"
1018
+ }, nn = { class: "PageHeaderLeft" }, on = { class: "PageHeaderTitle" }, ln = { class: "PageHeaderSubTitle" }, sn = { class: "PageHeaderRight" }, an = { class: "PageBody" }, rn = /* @__PURE__ */ Object.assign({
1019
+ name: "MvcPage",
1020
+ inheritAttrs: !1
1021
+ }, {
1022
+ __name: "index",
1023
+ props: {
1024
+ title: {
1025
+ type: String,
1026
+ default: ""
1027
+ },
1028
+ subtitle: {
1029
+ type: String,
1030
+ default: ""
1031
+ },
1032
+ noheader: {
1033
+ type: Boolean,
1034
+ default: !1
1035
+ }
1036
+ },
1037
+ setup(f) {
1038
+ const b = f, { proxy: o } = ae(), n = ge("store").tab(), i = O(() => b.title || b.subtitle);
1039
+ return O(() => n.useTab ? {
1040
+ minHeight: "calc(100vh - 48px - 36px)"
1041
+ } : {
1042
+ minHeight: "calc(100vh - 48px)"
1043
+ }), (u, x) => (h(), k("div", en, [
1044
+ b.noheader ? N("", !0) : (h(), k("div", tn, [
1045
+ c("div", nn, [
1046
+ u.$slots.header ? H(u.$slots, "header", { key: 0 }, void 0, !0) : l(i) ? (h(), k(Q, { key: 1 }, [
1047
+ c("h3", on, I(b.title), 1),
1048
+ c("p", ln, I(b.subtitle), 1)
1049
+ ], 64)) : N("", !0)
1050
+ ]),
1051
+ c("div", sn, [
1052
+ u.$slots.right ? H(u.$slots, "right", { key: 0 }, void 0, !0) : N("", !0)
1053
+ ])
1054
+ ])),
1055
+ c("div", an, [
1056
+ H(u.$slots, "default", {}, void 0, !0)
1057
+ ])
1058
+ ]));
1059
+ }
1060
+ }), cn = /* @__PURE__ */ W(rn, [["__scopeId", "data-v-7d18d3b1"]]), un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1061
+ __proto__: null,
1062
+ default: cn
1063
+ }, Symbol.toStringTag, { value: "Module" })), dn = { class: "flexMode hb vc" }, pn = { key: 1 }, mn = { class: "tag" }, fn = { class: "flexMode hr" }, gn = /* @__PURE__ */ Object.assign({
1064
+ name: "MvcSelect",
1065
+ inheritAttrs: !1
1066
+ }, {
1067
+ __name: "index",
1068
+ props: {
1069
+ modelValue: {
1070
+ type: [String, Number, Array],
1071
+ default: void 0
1072
+ },
1073
+ multiple: {
1074
+ type: Boolean,
1075
+ default: !1
1076
+ },
1077
+ filterable: {
1078
+ type: Boolean,
1079
+ default: !1
1080
+ },
1081
+ options: {
1082
+ type: Array,
1083
+ default: () => []
1084
+ },
1085
+ valueKey: {
1086
+ type: String,
1087
+ default: "value"
1088
+ },
1089
+ labelKey: {
1090
+ type: String,
1091
+ default: "label"
1092
+ },
1093
+ selectAllTxt: {
1094
+ type: String,
1095
+ default: "All"
1096
+ },
1097
+ confirmTxt: {
1098
+ type: String,
1099
+ default: "Confirm"
1100
+ },
1101
+ nowrap: {
1102
+ type: Boolean,
1103
+ default: !1
1104
+ }
1105
+ },
1106
+ emits: ["update:modelValue", "change"],
1107
+ setup(f, { emit: b }) {
1108
+ const o = f, e = J(null), n = J([]), i = J(!1), u = J(!1), x = J(!1), g = b, T = (a) => {
1109
+ o.multiple ? (n.value = Array.isArray(a) ? [...a] : [], m()) : (g("update:modelValue", a), g("change", a));
1110
+ }, d = (a) => {
1111
+ if (i.value = a, a && o.multiple) {
1112
+ const p = o.modelValue;
1113
+ n.value = Array.isArray(p) ? [...p] : p ? [p] : [], m();
1114
+ }
1115
+ }, w = () => {
1116
+ var C;
1117
+ if (!o.filterable || !i.value) return M();
1118
+ const a = e.value, p = ((C = a == null ? void 0 : a.optionsArray) == null ? void 0 : C.value) ?? (a == null ? void 0 : a.optionsArray) ?? [];
1119
+ return Array.isArray(p) ? p.filter(($) => $.visible && !$.isDisabled).map(($) => $.value) : M();
1120
+ }, v = (a) => {
1121
+ x.value = !1;
1122
+ const p = w();
1123
+ if (a)
1124
+ n.value = [.../* @__PURE__ */ new Set([...n.value, ...p])];
1125
+ else {
1126
+ const C = new Set(p);
1127
+ n.value = n.value.filter(($) => !C.has($));
1128
+ }
1129
+ }, _ = () => {
1130
+ var a, p;
1131
+ o.multiple && (g("update:modelValue", n.value), g("change", n.value), (p = (a = e.value) == null ? void 0 : a.blur) == null || p.call(a));
1132
+ }, M = () => {
1133
+ const a = o.valueKey;
1134
+ return (o.options || []).map((p) => typeof p == "object" ? p[a] : p);
1135
+ }, m = () => {
1136
+ const a = w(), p = new Set(n.value ?? []), C = a.filter((D) => p.has(D)).length, $ = a.length;
1137
+ u.value = $ > 0 && C === $, x.value = C > 0 && C < $;
1138
+ }, r = O(() => o.multiple && i.value ? n.value : o.modelValue), t = O(() => {
1139
+ const {
1140
+ modelValue: a,
1141
+ valueKey: p,
1142
+ labelKey: C,
1143
+ selectAllTxt: $,
1144
+ confirmTxt: D,
1145
+ nowrap: E,
1146
+ ...F
1147
+ } = o, q = F.props ?? {};
1148
+ return {
1149
+ ...F,
1150
+ props: {
1151
+ ...q,
1152
+ value: p,
1153
+ label: C
1154
+ }
1155
+ };
1156
+ }), s = O(
1157
+ () => o.nowrap ? {
1158
+ collapseTags: !0,
1159
+ collapseTagsTooltip: !0,
1160
+ maxCollapseTags: 1,
1161
+ tagTooltip: { popperStyle: { maxWidth: "400px" } }
1162
+ } : {}
1163
+ ), y = O(() => ({
1164
+ ...s.value,
1165
+ ...ye(),
1166
+ ...t.value
1167
+ })), A = O(() => {
1168
+ const a = o.multiple && i.value ? n.value : o.modelValue, p = Array.isArray(a) ? a : a ? [a] : [];
1169
+ if (!o.filterable || !i.value) return p.length;
1170
+ const C = w();
1171
+ return p.filter(($) => C.includes($)).length;
1172
+ }), S = O(() => w().length);
1173
+ return te(n, () => m(), { deep: !0 }), te(
1174
+ () => o.modelValue,
1175
+ (a) => {
1176
+ if (o.multiple && i.value) {
1177
+ const p = Array.isArray(a) ? [...a] : a ? [a] : [];
1178
+ JSON.stringify(p) !== JSON.stringify(n.value) && (n.value = p, m());
1179
+ }
1180
+ }
1181
+ ), (a, p) => {
1182
+ const C = L("el-checkbox"), $ = L("el-button"), D = L("el-select");
1183
+ return h(), P(D, le({
1184
+ ref_key: "selectRef",
1185
+ ref: e,
1186
+ "model-value": l(r),
1187
+ "tag-effect": "plain",
1188
+ class: "MvcSelect"
1189
+ }, l(y), {
1190
+ "onUpdate:modelValue": T,
1191
+ onVisibleChange: d
1192
+ }), he({
1193
+ default: V(() => [
1194
+ H(a.$slots, "default")
1195
+ ]),
1196
+ _: 2
1197
+ }, [
1198
+ o.filterable ? {
1199
+ name: "header",
1200
+ fn: V(() => [
1201
+ c("div", dn, [
1202
+ o.multiple ? (h(), P(C, {
1203
+ key: 0,
1204
+ modelValue: l(u),
1205
+ "onUpdate:modelValue": p[0] || (p[0] = (E) => ke(u) ? u.value = E : null),
1206
+ indeterminate: l(x),
1207
+ class: "h24",
1208
+ onChange: v
1209
+ }, {
1210
+ default: V(() => [
1211
+ ee(I(f.selectAllTxt), 1)
1212
+ ]),
1213
+ _: 1
1214
+ }, 8, ["modelValue", "indeterminate"])) : (h(), k("span", pn)),
1215
+ c("span", mn, I(l(A)) + "/" + I(l(S)), 1)
1216
+ ])
1217
+ ]),
1218
+ key: "0"
1219
+ } : void 0,
1220
+ o.multiple ? {
1221
+ name: "footer",
1222
+ fn: V(() => [
1223
+ c("div", fn, [
1224
+ z($, {
1225
+ type: "primary",
1226
+ size: "small",
1227
+ onClick: _
1228
+ }, {
1229
+ default: V(() => [
1230
+ ee(I(f.confirmTxt), 1)
1231
+ ]),
1232
+ _: 1
1233
+ })
1234
+ ])
1235
+ ]),
1236
+ key: "1"
1237
+ } : void 0
1238
+ ]), 1040, ["model-value"]);
1239
+ };
1240
+ }
1241
+ }), hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1242
+ __proto__: null,
1243
+ default: gn
1244
+ }, Symbol.toStringTag, { value: "Module" })), yn = { class: "flexMode hb vc" }, bn = { key: 1 }, vn = { class: "tag" }, _n = { class: "flexMode hr" }, $n = /* @__PURE__ */ Object.assign({
1245
+ name: "MvcSelectV2",
1246
+ inheritAttrs: !1
1247
+ }, {
1248
+ __name: "index",
1249
+ props: {
1250
+ modelValue: {
1251
+ type: [String, Number, Array],
1252
+ default: void 0
1253
+ },
1254
+ multiple: {
1255
+ type: Boolean,
1256
+ default: !1
1257
+ },
1258
+ filterable: {
1259
+ type: Boolean,
1260
+ default: !1
1261
+ },
1262
+ options: {
1263
+ type: Array,
1264
+ default: () => []
1265
+ },
1266
+ valueKey: {
1267
+ type: String,
1268
+ default: "value"
1269
+ },
1270
+ labelKey: {
1271
+ type: String,
1272
+ default: "label"
1273
+ },
1274
+ selectAllTxt: {
1275
+ type: String,
1276
+ default: "All"
1277
+ },
1278
+ confirmTxt: {
1279
+ type: String,
1280
+ default: "Confirm"
1281
+ },
1282
+ nowrap: {
1283
+ type: Boolean,
1284
+ default: !1
1285
+ }
1286
+ },
1287
+ emits: ["update:modelValue", "change"],
1288
+ setup(f, { emit: b }) {
1289
+ const o = f, e = J(null), n = J([]), i = J(!1), u = J(!1), x = J(!1), g = b, T = (a) => {
1290
+ o.multiple ? (n.value = Array.isArray(a) ? [...a] : [], m()) : (g("update:modelValue", a), g("change", a));
1291
+ }, d = (a) => {
1292
+ if (i.value = a, a && o.multiple) {
1293
+ const p = o.modelValue;
1294
+ n.value = Array.isArray(p) ? [...p] : p ? [p] : [], m();
1295
+ }
1296
+ }, w = () => {
1297
+ var $;
1298
+ if (!o.filterable || !i.value) return M();
1299
+ const a = e.value, p = (($ = a == null ? void 0 : a.filteredOptions) == null ? void 0 : $.value) ?? (a == null ? void 0 : a.filteredOptions) ?? [];
1300
+ if (!Array.isArray(p)) return M();
1301
+ const C = o.valueKey;
1302
+ return p.filter((D) => D.type !== "Group" && !D.disabled).map((D) => typeof D == "object" ? D[C] : D);
1303
+ }, v = (a) => {
1304
+ x.value = !1;
1305
+ const p = w();
1306
+ if (a)
1307
+ n.value = [.../* @__PURE__ */ new Set([...n.value, ...p])];
1308
+ else {
1309
+ const C = new Set(p);
1310
+ n.value = n.value.filter(($) => !C.has($));
1311
+ }
1312
+ }, _ = () => {
1313
+ var a, p;
1314
+ o.multiple && (g("update:modelValue", n.value), g("change", n.value), (p = (a = e.value) == null ? void 0 : a.blur) == null || p.call(a));
1315
+ }, M = () => {
1316
+ const a = o.valueKey;
1317
+ return (o.options || []).map((p) => typeof p == "object" ? p[a] : p);
1318
+ }, m = () => {
1319
+ const a = w(), p = new Set(n.value ?? []), C = a.filter((D) => p.has(D)).length, $ = a.length;
1320
+ u.value = $ > 0 && C === $, x.value = C > 0 && C < $;
1321
+ }, r = O(() => o.multiple && i.value ? n.value : o.modelValue), t = O(() => {
1322
+ const {
1323
+ modelValue: a,
1324
+ valueKey: p,
1325
+ labelKey: C,
1326
+ selectAllTxt: $,
1327
+ confirmTxt: D,
1328
+ nowrap: E,
1329
+ ...F
1330
+ } = o, q = F.props ?? {};
1331
+ return {
1332
+ ...F,
1333
+ props: {
1334
+ ...q,
1335
+ value: p,
1336
+ label: C
1337
+ }
1338
+ };
1339
+ }), s = O(
1340
+ () => o.nowrap ? {
1341
+ collapseTags: !0,
1342
+ collapseTagsTooltip: !0,
1343
+ maxCollapseTags: 1,
1344
+ tagTooltip: { popperStyle: { maxWidth: "400px" } }
1345
+ } : {}
1346
+ ), y = O(() => ({
1347
+ ...s.value,
1348
+ ...ye(),
1349
+ ...t.value
1350
+ })), A = O(() => {
1351
+ const a = o.multiple && i.value ? n.value : o.modelValue, p = Array.isArray(a) ? a : a ? [a] : [];
1352
+ if (!o.filterable || !i.value) return p.length;
1353
+ const C = w();
1354
+ return p.filter(($) => C.includes($)).length;
1355
+ }), S = O(() => w().length);
1356
+ return te(n, () => m(), { deep: !0 }), te(
1357
+ () => o.modelValue,
1358
+ (a) => {
1359
+ if (o.multiple && i.value) {
1360
+ const p = Array.isArray(a) ? [...a] : a ? [a] : [];
1361
+ JSON.stringify(p) !== JSON.stringify(n.value) && (n.value = p, m());
1362
+ }
1363
+ }
1364
+ ), (a, p) => {
1365
+ const C = L("el-checkbox"), $ = L("el-button"), D = L("el-select-v2");
1366
+ return h(), P(D, le({
1367
+ ref_key: "selectRef",
1368
+ ref: e,
1369
+ "model-value": l(r),
1370
+ class: "MvcSelectV2"
1371
+ }, l(y), {
1372
+ "onUpdate:modelValue": T,
1373
+ onVisibleChange: d
1374
+ }), he({ _: 2 }, [
1375
+ o.filterable ? {
1376
+ name: "header",
1377
+ fn: V(() => [
1378
+ c("div", yn, [
1379
+ o.multiple ? (h(), P(C, {
1380
+ key: 0,
1381
+ modelValue: l(u),
1382
+ "onUpdate:modelValue": p[0] || (p[0] = (E) => ke(u) ? u.value = E : null),
1383
+ indeterminate: l(x),
1384
+ class: "h24",
1385
+ onChange: v
1386
+ }, {
1387
+ default: V(() => [
1388
+ ee(I(f.selectAllTxt), 1)
1389
+ ]),
1390
+ _: 1
1391
+ }, 8, ["modelValue", "indeterminate"])) : (h(), k("span", bn)),
1392
+ c("span", vn, I(l(A)) + "/" + I(l(S)), 1)
1393
+ ])
1394
+ ]),
1395
+ key: "0"
1396
+ } : void 0,
1397
+ a.$slots.default ? {
1398
+ name: "default",
1399
+ fn: V((E) => [
1400
+ H(a.$slots, "default", de(me(E)))
1401
+ ]),
1402
+ key: "1"
1403
+ } : void 0,
1404
+ o.multiple ? {
1405
+ name: "footer",
1406
+ fn: V(() => [
1407
+ c("div", _n, [
1408
+ z($, {
1409
+ type: "primary",
1410
+ size: "small",
1411
+ onClick: _
1412
+ }, {
1413
+ default: V(() => [
1414
+ ee(I(f.confirmTxt), 1)
1415
+ ]),
1416
+ _: 1
1417
+ })
1418
+ ])
1419
+ ]),
1420
+ key: "2"
1421
+ } : void 0
1422
+ ]), 1040, ["model-value"]);
1423
+ };
1424
+ }
1425
+ }), Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1426
+ __proto__: null,
1427
+ default: $n
1428
+ }, Symbol.toStringTag, { value: "Module" })), wn = Se({
1429
+ name: "MvcTableColumnFilter",
1430
+ props: {
1431
+ tableName: {
1432
+ type: String,
1433
+ default: ""
1434
+ },
1435
+ group: {
1436
+ type: Object,
1437
+ default: /* @__PURE__ */ Object.create(null)
1438
+ },
1439
+ column: {
1440
+ type: Boolean,
1441
+ default: !1
1442
+ }
1443
+ },
1444
+ setup: (f, b) => {
1445
+ var x;
1446
+ const o = R({
1447
+ options: [],
1448
+ slots: []
1449
+ }), e = f.tableName + "_Column";
1450
+ let n = [];
1451
+ (() => {
1452
+ const g = b.slots.default()[0].children, T = {
1453
+ normal: [],
1454
+ mmp: [],
1455
+ asa: [],
1456
+ fixed: [],
1457
+ columns: []
1458
+ }, d = f.tableName ? JSON.parse(localStorage.getItem(e)) : null, w = [void 0];
1459
+ g.forEach((_) => {
1460
+ window.$getType(_.type) === "Symbol" ? n = n.concat(_.children) : n.push(_);
1461
+ }), n.forEach((_, M) => {
1462
+ var m;
1463
+ if (window.$getType(_.type), ((m = _.type) == null ? void 0 : m.name) === "ElTableColumn") {
1464
+ let r = {
1465
+ ..._.props,
1466
+ sort: M,
1467
+ nomove: _.props.nomove || _.props.nomove === "" || _.props.type === "selection" || _.props.label === "Operation",
1468
+ resizable: !0,
1469
+ visible: _.props.visible !== !1
1470
+ };
1471
+ if (r.labelKey || (r.labelKey = r.label), r.label = window.$l(r.labelKey), f.column && (d != null && d.length) && w.indexOf(_.props.prop) === -1) {
1472
+ const { data: t } = d.filter1((s) => s.prop === _.props.prop);
1473
+ t && (r.sort = t.sort, r.fixed = t.fixed, r.visible = t.visible);
1474
+ }
1475
+ _.props.fixed && T.fixed.push(r), _.props.type === "mmp" ? T.mmp.push(r) : _.props.type === "asa" ? T.asa.push(r) : T.normal.push(r), _.props = r;
1476
+ }
1477
+ }), o.columnInfo = T;
1478
+ let v = [...T.normal, ...T.mmp, ...T.asa];
1479
+ f.tableName && (v = v.sort((_, M) => _.sort - M.sort), localStorage.setItem(e, JSON.stringify(v)));
1480
+ })();
1481
+ let u = [];
1482
+ if (n.forEach((g) => {
1483
+ window.$getType(g) !== "String" && g.props.visible && u.push(g);
1484
+ }), (x = f.group) != null && x.label) {
1485
+ const g = {
1486
+ label: "Group By " + f.group.label,
1487
+ // prop: props.group.value,
1488
+ width: f.group.width,
1489
+ fixed: "left",
1490
+ visible: !0,
1491
+ resizable: !0
1492
+ };
1493
+ u[0].props.type === "selection" ? u.splice(1, 0, {
1494
+ ...u[1],
1495
+ props: g
1496
+ }) : u.unshift({
1497
+ ...u[0],
1498
+ props: g
1499
+ });
1500
+ }
1501
+ return u = u.sort((g, T) => g.props.sort - T.props.sort), () => u;
1502
+ }
1503
+ }), xn = { class: "hp100 flexMode" }, Sn = { class: "w200 hp100 border-r fs14" }, kn = { class: "flexMode vc h36 p8 bg-gray3 border-b txt-nowrap" }, Tn = { class: "p4" }, Mn = ["onClick"], An = {
1504
+ class: "flexMode vs hp100",
1505
+ style: { width: "calc(100% - 200px)" }
1506
+ }, Vn = { class: "wp50 border-r fs14" }, On = { class: "flexMode vc g8 h36 p8 bg-gray3 border-b txt-nowrap" }, In = { class: "tagArea blue small" }, jn = { class: "p4" }, Ln = {
1507
+ key: 0,
1508
+ class: "absCenter fs12 txt-dark5 txt-nowrap"
1509
+ }, zn = { class: "flexMode vc g8" }, En = ["txt", "onClick"], Nn = { class: "wp50 border-r fs14" }, Dn = { class: "flexMode vc g8 h36 p8 bg-gray3 border-b txt-nowrap" }, Kn = { class: "tagArea blue small" }, Bn = {
1510
+ class: "relative p4",
1511
+ style: { height: "calc(100% - 36px)" }
1512
+ }, Fn = {
1513
+ class: "relative",
1514
+ style: { height: "30%" }
1515
+ }, Pn = {
1516
+ key: 0,
1517
+ class: "absCenter fs12 txt-dark5 txt-nowrap"
1518
+ }, Hn = { class: "columnItem flexMode vc hb h40 g8 p4-8 mb4 radius4" }, Rn = { class: "flexMode vc g8 txt-nowrap" }, Un = { class: "flexMode vc g8" }, Jn = ["txt", "onClick"], Gn = {
1519
+ class: "relative",
1520
+ style: { height: "calc(70% - 10px)" }
1521
+ }, Wn = {
1522
+ key: 0,
1523
+ class: "absCenter fs12 txt-dark5 txt-nowrap"
1524
+ }, qn = { class: "columnItem flexMode vc hb h40 g8 p4-8 mb4 radius4" }, Yn = { class: "flexMode vc g8 txt-nowrap" }, Zn = { class: "flexMode vc" }, Qn = ["txt", "onClick"], Xn = ["txt", "onClick"], eo = /* @__PURE__ */ Object.assign({
1525
+ name: "MvcTableColumnConfig",
1526
+ inheritAttrs: !1
1527
+ }, {
1528
+ __name: "ColumnConfig",
1529
+ props: {
1530
+ tableName: {
1531
+ type: String,
1532
+ default: ""
1533
+ }
1534
+ },
1535
+ emits: "close",
1536
+ setup(f, { emit: b }) {
1537
+ const o = f, e = R({
1538
+ loading: !1,
1539
+ type: "normal",
1540
+ columns: {
1541
+ normal: [],
1542
+ mmp: [],
1543
+ asa: []
1544
+ },
1545
+ fixed: [],
1546
+ visible: [],
1547
+ selection: [],
1548
+ operation: [],
1549
+ columnType: {},
1550
+ mounted: !1
1551
+ });
1552
+ ne(() => {
1553
+ i();
1554
+ });
1555
+ const n = b, i = () => {
1556
+ n("mounted");
1557
+ const t = JSON.parse(localStorage.getItem(`${o.tableName}_Column`)), s = {};
1558
+ t.forEach((y) => {
1559
+ y.type && (s[y.type] = !0), y.visible ? y.type === "selection" ? e.selection.push(y) : y.type === "operation" ? e.operation.push(y) : y.label && (y.fixed ? e.fixed.push(y) : e.visible.push(y)) : y.type === "mmp" ? e.columns.mmp.push(y) : y.type === "asa" ? e.columns.asa.push(y) : e.columns.normal.push(y);
1560
+ }), e.columnType = s;
1561
+ }, u = (t) => {
1562
+ e.type = t;
1563
+ }, x = (t, s) => {
1564
+ t.visible = !0, e.visible.unshift(t), t.type ? e.columns[t.type].splice(s, 1) : e.columns.normal.splice(s, 1);
1565
+ }, g = (t, s) => {
1566
+ e.fixed.unshift(t), e.visible.splice(s, 1);
1567
+ }, T = (t, s) => {
1568
+ e.visible.unshift(t), e.fixed.splice(s, 1);
1569
+ }, d = (t, s) => {
1570
+ e.visible.splice(s, 1), t.type ? e.columns[t.type].unshift(t) : e.columns.normal.unshift(t);
1571
+ }, w = async () => {
1572
+ e.loading = !0, window.$pm(() => {
1573
+ const { fixed: t, visible: s, columns: y, selection: A, operation: S } = e;
1574
+ let a = [];
1575
+ Object.keys(y).map((C) => {
1576
+ a = a.concat(y[C]);
1577
+ }), t.forEach((C) => C.fixed = "left"), a.forEach((C) => C.visible = !1);
1578
+ const p = A.concat(t, s, a, S);
1579
+ p.forEach((C, $) => C.sort = $), localStorage.setItem(`${o.tableName}_Column`, JSON.stringify(p)), e.loading = !1, n("close"), n("init-column");
1580
+ });
1581
+ }, v = () => {
1582
+ e.loading = !0, localStorage.removeItem(`${o.tableName}_Column`), window.$pm(() => {
1583
+ e.loading = !1, n("close"), n("init-column");
1584
+ }, 4);
1585
+ }, _ = O(() => window.config.options.drawerHeight - 36 - 64), M = O(() => (_.value * 0.3).toFixed(0)), m = O(() => (_.value * 0.7 - 10).toFixed(0)), r = O(() => [
1586
+ {
1587
+ label: "Base Info",
1588
+ value: "normal"
1589
+ },
1590
+ {
1591
+ label: "Asa Metrics",
1592
+ value: "asa",
1593
+ hide: !e.columnType.asa
1594
+ },
1595
+ {
1596
+ label: "MMP Metrics",
1597
+ value: "mmp",
1598
+ hide: !e.columnType.mmp
1599
+ }
1600
+ ]);
1601
+ return (t, s) => {
1602
+ const y = L("el-scrollbar"), A = L("DrawerArea");
1603
+ return h(), P(A, {
1604
+ loading: l(e).loading,
1605
+ noscroll: "",
1606
+ "cancel-txt": "Reset",
1607
+ "cancel-icon": "im-sync",
1608
+ class: "MvcTableColumnConfig",
1609
+ onCancel: v,
1610
+ onSubmit: w
1611
+ }, {
1612
+ default: V(() => [
1613
+ c("div", xn, [
1614
+ c("div", Sn, [
1615
+ c("div", kn, I(t.$l("Column Type")), 1),
1616
+ c("div", Tn, [
1617
+ (h(!0), k(Q, null, se(l(r), (S) => (h(), k("div", {
1618
+ key: S.value,
1619
+ class: B(["typeItem p8-16 mb4 radius4 txt-nowrap", [l(e).type === S.value && "active", S.hide && "hide"]]),
1620
+ onClick: (a) => u(S.value)
1621
+ }, I(S.label), 11, Mn))), 128))
1622
+ ])
1623
+ ]),
1624
+ c("div", An, [
1625
+ c("div", Vn, [
1626
+ c("div", On, [
1627
+ c("span", null, I(t.$l("Columns")), 1),
1628
+ c("span", In, I(l(e).columns[l(e).type].length), 1)
1629
+ ]),
1630
+ z(y, { style: { height: "calc(100% - 36px)" } }, {
1631
+ default: V(() => [
1632
+ c("div", jn, [
1633
+ l(e).columns[l(e).type].length === 0 ? (h(), k("span", Ln, I(t.$l("No Columns")), 1)) : N("", !0),
1634
+ (h(!0), k(Q, null, se(l(e).columns[l(e).type], (S, a) => (h(), k("div", {
1635
+ key: S.prop,
1636
+ class: "columnItem flexMode vc hb h40 g8 p4-8 mb4 radius4 txt-nowrap"
1637
+ }, [
1638
+ c("span", null, I(t.$l(S.label)), 1),
1639
+ c("div", zn, [
1640
+ c("div", {
1641
+ class: "tipbtn left",
1642
+ txt: t.$l("Visible"),
1643
+ onClick: (p) => x(S, a)
1644
+ }, [...s[0] || (s[0] = [
1645
+ c("i", { class: "imicon im-plus fs16" }, null, -1)
1646
+ ])], 8, En)
1647
+ ])
1648
+ ]))), 128))
1649
+ ])
1650
+ ]),
1651
+ _: 1
1652
+ })
1653
+ ]),
1654
+ c("div", Nn, [
1655
+ c("div", Dn, [
1656
+ c("span", null, I(t.$l("Visible Columns")), 1),
1657
+ c("span", Kn, I(l(e).visible.length), 1)
1658
+ ]),
1659
+ c("div", Bn, [
1660
+ c("div", Fn, [
1661
+ l(e).fixed.length === 0 ? (h(), k("span", Pn, I(t.$l("No Fixed Columns")), 1)) : N("", !0),
1662
+ z(y, { height: l(M) }, {
1663
+ default: V(() => [
1664
+ z(l(_e), {
1665
+ list: l(e).fixed,
1666
+ "item-key": (S) => S,
1667
+ handle: ".im-handle",
1668
+ "ghost-class": "ghost"
1669
+ }, {
1670
+ item: V(({ element: S, index: a }) => [
1671
+ c("div", Hn, [
1672
+ c("div", Rn, [
1673
+ s[1] || (s[1] = c("i", { class: "imicon im-handle cursor-grab" }, null, -1)),
1674
+ c("span", null, I(t.$l(S.label)), 1)
1675
+ ]),
1676
+ c("div", Un, [
1677
+ c("div", {
1678
+ class: "tipbtn red left",
1679
+ txt: t.$l("Unfixed"),
1680
+ onClick: (p) => T(S, a)
1681
+ }, [...s[2] || (s[2] = [
1682
+ c("i", { class: "imicon im-download1 fs14" }, null, -1)
1683
+ ])], 8, Jn)
1684
+ ])
1685
+ ])
1686
+ ]),
1687
+ _: 1
1688
+ }, 8, ["list", "item-key"])
1689
+ ]),
1690
+ _: 1
1691
+ }, 8, ["height"])
1692
+ ]),
1693
+ s[6] || (s[6] = c("div", { class: "p4-0" }, [
1694
+ c("div", { class: "border-t" })
1695
+ ], -1)),
1696
+ c("div", Gn, [
1697
+ l(e).visible.length === 0 ? (h(), k("span", Wn, I(t.$l("No Columns")), 1)) : N("", !0),
1698
+ z(y, { height: l(m) }, {
1699
+ default: V(() => [
1700
+ z(l(_e), {
1701
+ list: l(e).visible,
1702
+ "item-key": (S) => S,
1703
+ options: { lockAxis: "y" },
1704
+ handle: ".im-handle",
1705
+ "ghost-class": "ghost"
1706
+ }, {
1707
+ item: V(({ element: S, index: a }) => [
1708
+ c("div", qn, [
1709
+ c("div", Yn, [
1710
+ s[3] || (s[3] = c("i", { class: "imicon im-handle cursor-grab" }, null, -1)),
1711
+ c("span", null, I(t.$l(S.label)), 1)
1712
+ ]),
1713
+ c("div", Zn, [
1714
+ c("div", {
1715
+ class: "tipbtn left",
1716
+ txt: t.$l("Fixed"),
1717
+ onClick: (p) => g(S, a)
1718
+ }, [...s[4] || (s[4] = [
1719
+ c("i", { class: "imicon im-download1 fs14 rotateZ180" }, null, -1)
1720
+ ])], 8, Qn),
1721
+ c("div", {
1722
+ class: "tipbtn red left",
1723
+ txt: t.$l("Hide"),
1724
+ onClick: (p) => d(S, a)
1725
+ }, [...s[5] || (s[5] = [
1726
+ c("i", { class: "imicon im-close fs14" }, null, -1)
1727
+ ])], 8, Xn)
1728
+ ])
1729
+ ])
1730
+ ]),
1731
+ _: 1
1732
+ }, 8, ["list", "item-key"])
1733
+ ]),
1734
+ _: 1
1735
+ }, 8, ["height"])
1736
+ ])
1737
+ ])
1738
+ ])
1739
+ ])
1740
+ ])
1741
+ ]),
1742
+ _: 1
1743
+ }, 8, ["loading"]);
1744
+ };
1745
+ }
1746
+ }), to = /* @__PURE__ */ W(eo, [["__scopeId", "data-v-01691821"]]), no = { class: "p16 border-b" }, oo = { class: "flexMode vc g8" }, lo = {
1747
+ key: 0,
1748
+ class: "flexMode vc g8"
1749
+ }, so = { class: "flexMode g16 hr vc" }, ao = { class: "TheEnd p16" }, ro = { class: "sticky flexMode vc hb p4-8 mt16 mb8 fs14 txt-dark9 z9 backdrop border-l4-primary bg-gray3 radius4" }, io = { class: "fw700" }, co = { class: "flexMode vc g8" }, uo = /* @__PURE__ */ Object.assign({
1750
+ name: "MvcTableColumnDownload",
1751
+ inheritAttrs: !1
1752
+ }, {
1753
+ __name: "ColumnDownload",
1754
+ props: {
1755
+ tableName: {
1756
+ type: String,
1757
+ default: ""
1758
+ },
1759
+ list: {
1760
+ type: Array,
1761
+ default: () => []
1762
+ },
1763
+ selection: {
1764
+ type: Array,
1765
+ default: () => []
1766
+ }
1767
+ },
1768
+ emits: ["mounted"],
1769
+ setup(f, { emit: b }) {
1770
+ const o = f, e = R({
1771
+ loading: !1,
1772
+ columns: [],
1773
+ checked: [],
1774
+ useHead: !1,
1775
+ onlySelection: !1,
1776
+ mounted: !1
1777
+ });
1778
+ ne(() => {
1779
+ i();
1780
+ });
1781
+ const n = b, i = () => {
1782
+ n("mounted"), u(), x();
1783
+ }, u = () => {
1784
+ const r = JSON.parse(localStorage.getItem(`${o.tableName}_Column`)), t = ["selection", "operation"];
1785
+ e.columns = r.filter((s) => !t.includes(s.type) && s.label);
1786
+ }, x = () => {
1787
+ o.selection.length && (e.onlySelection = !0);
1788
+ }, g = (r, t) => {
1789
+ r ? t.children.forEach((s) => {
1790
+ s.visible = !0;
1791
+ }) : t.children.forEach((s) => {
1792
+ s.visible = !1;
1793
+ });
1794
+ }, T = () => {
1795
+ window.$copy(w());
1796
+ }, d = async () => {
1797
+ e.loading = !0;
1798
+ try {
1799
+ const r = w("download");
1800
+ let t = e.fileName || v.value;
1801
+ t && !t.toLowerCase().endsWith(".csv") && (t = `${t}.csv`), await Fe({ content: r, filename: t, bom: !0 });
1802
+ } finally {
1803
+ e.loading = !1;
1804
+ }
1805
+ }, w = (r) => {
1806
+ const t = e.onlySelection ? o.selection : o.list, s = {}, y = [];
1807
+ e.columns.filter(($) => $.visible).forEach(($) => {
1808
+ y.push(window.$l($.label)), s[$.prop] = !0;
1809
+ });
1810
+ let A = "", S = [], a = r === "download" ? "," : " ";
1811
+ (e.useHead || r) && (A = y.join(a) + `
1812
+ `);
1813
+ let p = [], C;
1814
+ return Object.keys(s).forEach(($, D) => {
1815
+ $.includes("country") && (C = D);
1816
+ const E = [];
1817
+ t.forEach((F) => {
1818
+ F[$] !== void 0 && E.push(F[$]);
1819
+ }), p.push(E);
1820
+ }), p.forEach(($, D) => {
1821
+ !e.useCountryCode && C === D ? $.forEach((E, F) => {
1822
+ let q = E;
1823
+ window.$getType(E) === "Array" ? q = E.map((ce) => m[ce.toUpperCase()].label.$l()).join(",") : window.$getType(E) === "String" ? q = E.split(",").map((ce) => m[ce.toUpperCase()].label.$l()).join(",") : q = JSON.stringify(E), S[F] ? S[F] += q + a : S[F] = q + a;
1824
+ }) : $.forEach((E, F) => {
1825
+ S[F] ? S[F] += E + a : S[F] = E + a;
1826
+ });
1827
+ }), `${A}${S.join(`
1828
+ `)}`;
1829
+ }, v = O(() => {
1830
+ const r = window.$m().format("YYYYMMDDHHmmss");
1831
+ return `${o.tableName}_${r}`;
1832
+ }), _ = O(() => {
1833
+ const r = {};
1834
+ return e.columns.forEach((t) => {
1835
+ const s = t.type ? t.type : "normal", y = {
1836
+ label: M[s],
1837
+ type: s,
1838
+ visible: 0
1839
+ };
1840
+ r[s] ? (r[s].children.push(t), t.visible && r[s].visible++) : (y.children = [t], t.visible && y.visible++, r[s] = y);
1841
+ }), Object.keys(r).forEach((t) => {
1842
+ const s = r[t].visible === r[t].children.length, y = r[t].visible === 0;
1843
+ s ? (r[t].checkstatus = !0, r[t].indeterminate = !1) : y ? (r[t].checkstatus = !1, r[t].indeterminate = !1) : (r[t].checkstatus = !1, r[t].indeterminate = !0);
1844
+ }), r;
1845
+ }), M = {
1846
+ asa: "Asa Metrics",
1847
+ normal: "Base Info",
1848
+ mmp: "MMP Metrics"
1849
+ };
1850
+ "Check All".$l(), "Cancel All".$l();
1851
+ const m = useMap("asa.countryAll.obj");
1852
+ return (r, t) => {
1853
+ const s = L("el-checkbox"), y = L("el-button"), A = L("MvcAlert"), S = L("el-switch"), a = L("Input"), p = L("DrawerArea");
1854
+ return h(), P(p, le(r.$attrs, { class: "MvcTableColumnDownload" }), {
1855
+ cancel: V(() => [
1856
+ z(a, {
1857
+ modelValue: l(e).fileName,
1858
+ "onUpdate:modelValue": t[3] || (t[3] = (C) => l(e).fileName = C),
1859
+ icon: "catalog",
1860
+ placeholder: l(v),
1861
+ class: "w600"
1862
+ }, {
1863
+ append: V(() => [
1864
+ z(y, {
1865
+ loading: l(e).loading,
1866
+ onClick: d
1867
+ }, {
1868
+ icon: V(() => [...t[5] || (t[5] = [
1869
+ c("i", { class: "imicon im-download1" }, null, -1)
1870
+ ])]),
1871
+ default: V(() => [
1872
+ ee(" " + I(r.$l("Download")), 1)
1873
+ ]),
1874
+ _: 1
1875
+ }, 8, ["loading"])
1876
+ ]),
1877
+ _: 1
1878
+ }, 8, ["modelValue", "placeholder"])
1879
+ ]),
1880
+ submit: V(() => [...t[6] || (t[6] = [])]),
1881
+ default: V(() => [
1882
+ c("div", no, [
1883
+ z(A, null, {
1884
+ default: V(() => [
1885
+ c("div", oo, [
1886
+ c("span", null, I(r.$l("Total")), 1),
1887
+ c("span", null, I(o.list.length), 1)
1888
+ ]),
1889
+ o.selection.length ? (h(), k("div", lo, [
1890
+ c("span", null, I(r.$l("Selection")), 1),
1891
+ c("span", null, I(o.selection.length), 1),
1892
+ z(s, {
1893
+ modelValue: l(e).onlySelection,
1894
+ "onUpdate:modelValue": t[0] || (t[0] = (C) => l(e).onlySelection = C),
1895
+ label: r.$l("Only Selection")
1896
+ }, null, 8, ["modelValue", "label"])
1897
+ ])) : N("", !0),
1898
+ c("div", so, [
1899
+ z(y, { onClick: T }, {
1900
+ icon: V(() => [...t[4] || (t[4] = [
1901
+ c("i", { class: "imicon im-copy" }, null, -1)
1902
+ ])]),
1903
+ default: V(() => [
1904
+ ee(" " + I(r.$l("Copy to Clipboard")), 1)
1905
+ ]),
1906
+ _: 1
1907
+ }),
1908
+ z(s, {
1909
+ modelValue: l(e).useHead,
1910
+ "onUpdate:modelValue": t[1] || (t[1] = (C) => l(e).useHead = C),
1911
+ label: r.$l("With Table Head")
1912
+ }, null, 8, ["modelValue", "label"])
1913
+ ])
1914
+ ]),
1915
+ _: 1
1916
+ })
1917
+ ]),
1918
+ c("div", ao, [
1919
+ (h(!0), k(Q, null, se(l(_), (C) => (h(), k("div", {
1920
+ key: C.type
1921
+ }, [
1922
+ c("div", ro, [
1923
+ c("span", io, I(C.label), 1),
1924
+ z(s, {
1925
+ modelValue: C.checkstatus,
1926
+ "onUpdate:modelValue": ($) => C.checkstatus = $,
1927
+ indeterminate: C.indeterminate,
1928
+ label: r.$l("Check"),
1929
+ onChange: ($) => g($, C)
1930
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "indeterminate", "label", "onChange"])
1931
+ ]),
1932
+ (h(!0), k(Q, null, se(C.children, ($, D) => (h(), P(s, {
1933
+ modelValue: $.visible,
1934
+ "onUpdate:modelValue": (E) => $.visible = E,
1935
+ key: D,
1936
+ label: $.label,
1937
+ value: $.value,
1938
+ class: "fullCheckbox p8-12 mb4 radius2 hover-txt-primary hover-bg-gray3"
1939
+ }, {
1940
+ default: V(() => {
1941
+ var E;
1942
+ return [
1943
+ c("div", co, [
1944
+ c("span", null, I($.label), 1),
1945
+ (E = $.prop) != null && E.includes("country") ? (h(), P(S, {
1946
+ key: 0,
1947
+ modelValue: l(e).useCountryCode,
1948
+ "onUpdate:modelValue": t[2] || (t[2] = (F) => l(e).useCountryCode = F),
1949
+ "inline-prompt": "",
1950
+ "active-text": "Use Alpha-2 Code",
1951
+ "inactive-text": "Use Country Name",
1952
+ class: "primarySwitch"
1953
+ }, null, 8, ["modelValue"])) : N("", !0)
1954
+ ])
1955
+ ];
1956
+ }),
1957
+ _: 2
1958
+ }, 1032, ["modelValue", "onUpdate:modelValue", "label", "value"]))), 128))
1959
+ ]))), 128))
1960
+ ])
1961
+ ]),
1962
+ _: 1
1963
+ }, 16);
1964
+ };
1965
+ }
1966
+ }), po = { class: "MvcTable" }, mo = {
1967
+ key: 0,
1968
+ class: "flexMode vc"
1969
+ }, fo = { class: "tableArea relative radius ctx-auto" }, go = {
1970
+ key: 1,
1971
+ class: "flexMode vc h56 p16 xscroll nobar fadeout"
1972
+ }, ho = /* @__PURE__ */ Object.assign({
1973
+ name: "MvcTable",
1974
+ inheritAttrs: !1
1975
+ }, {
1976
+ __name: "index",
1977
+ props: {
1978
+ defaultLoading: {
1979
+ type: Boolean,
1980
+ default: !0
1981
+ },
1982
+ tableName: {
1983
+ type: String,
1984
+ default: ""
1985
+ },
1986
+ autoHeader: {
1987
+ type: Boolean,
1988
+ default: !0
1989
+ },
1990
+ headerClass: {
1991
+ type: String,
1992
+ default: ""
1993
+ },
1994
+ height: {
1995
+ type: [String, Number],
1996
+ default: 0
1997
+ },
1998
+ minusHeight: {
1999
+ type: [String, Number],
2000
+ default: 0
2001
+ },
2002
+ defer: {
2003
+ type: Boolean,
2004
+ default: !1
2005
+ },
2006
+ rowKey: {
2007
+ type: String,
2008
+ default: ""
2009
+ },
2010
+ defaultExpandAll: {
2011
+ type: Boolean,
2012
+ default: !1
2013
+ },
2014
+ tool: {
2015
+ type: [Object, Boolean],
2016
+ default: () => ({
2017
+ download: !0,
2018
+ refresh: !0,
2019
+ column: !0
2020
+ })
2021
+ },
2022
+ noheader: {
2023
+ type: Boolean,
2024
+ default: !1
2025
+ },
2026
+ nofooter: {
2027
+ type: Boolean,
2028
+ default: !1
2029
+ },
2030
+ loadData: {
2031
+ type: Function,
2032
+ default: () => ({
2033
+ list: [],
2034
+ total: 0
2035
+ })
2036
+ },
2037
+ pageSize: {
2038
+ type: Number,
2039
+ default: 0
2040
+ },
2041
+ pageSizes: {
2042
+ type: Array,
2043
+ default: () => [10, 20, 50, 100]
2044
+ },
2045
+ /**
2046
+ * 远程汇总行按列格式化:与 util `$fu` 的 metric 形态一致。
2047
+ * 未传时使用全局 `$config.table.summaryMetric`(应用入口一次配置即可)。
2048
+ * 对象:`{ spend: { unit: 'currency', precision: 2 }, rate: { unit: '%', precision: 2 } }`
2049
+ * 函数:`(prop) => ({ unit, precision, currency })`。
2050
+ */
2051
+ summaryMetric: {
2052
+ type: [Object, Function],
2053
+ default: null
2054
+ }
2055
+ },
2056
+ emits: ["selection-change", "refresh"],
2057
+ setup(f, { expose: b, emit: o }) {
2058
+ const e = f, n = R({
2059
+ loading: !0,
2060
+ selection: []
2061
+ }), i = R({
2062
+ list: [],
2063
+ total: 0,
2064
+ page: 1,
2065
+ pageSize: 50,
2066
+ summary: !1,
2067
+ summaryType: "remote",
2068
+ nopagination: !1,
2069
+ params: {}
2070
+ }), u = R({
2071
+ tabelKey: 0,
2072
+ current: "",
2073
+ list: [
2074
+ {
2075
+ title: "Table Column Customization",
2076
+ size: 1024,
2077
+ cpt: ue(to)
2078
+ },
2079
+ {
2080
+ title: "Download from Current Table",
2081
+ cpt: ue(uo)
2082
+ }
2083
+ ]
2084
+ }), x = J(null), { proxy: g } = ae();
2085
+ De(() => {
2086
+ d();
2087
+ }), ne(() => {
2088
+ w();
2089
+ });
2090
+ const T = o, d = () => {
2091
+ n.loading = e.defaultLoading, e.pageSize && (i.pageSize = e.pageSize);
2092
+ }, w = () => {
2093
+ C(), e.defer === !1 && _();
2094
+ }, v = (j) => {
2095
+ _(j);
2096
+ }, _ = async (j = {}) => {
2097
+ if (j.refresh && n.loading)
2098
+ return;
2099
+ n.loading = !0;
2100
+ const K = {
2101
+ pageSize: j.pageSize || i.pageSize,
2102
+ pageStart: j.pageStart || i.page
2103
+ };
2104
+ j.refresh && (K.remote = !0);
2105
+ const { list: Y = [], total: U, summary: G } = await e.loadData(K) || {};
2106
+ i.list = Y.map((X, oe) => (X.index = oe, X)), U === void 0 ? (i.total = i.list.length, i.nopagination = !0) : (i.total = U, i.nopagination = !1), window.config.table.scrollToTop && r(), M(G), n.loading = !1;
2107
+ }, M = (j) => {
2108
+ j ? i.summary = j : i.summary = !1;
2109
+ }, m = (j) => {
2110
+ if (i.summaryType === "locale")
2111
+ return [];
2112
+ if (i.summaryType === "remote") {
2113
+ const K = (U, G) => {
2114
+ if (U != null)
2115
+ return typeof U == "function" ? U(G) : U[G];
2116
+ }, Y = (U) => {
2117
+ var X, oe;
2118
+ const G = K(e.summaryMetric, U);
2119
+ return G !== void 0 ? G : K((oe = (X = globalThis.$config) == null ? void 0 : X.table) == null ? void 0 : oe.summaryMetric, U);
2120
+ };
2121
+ return Pe(j, i.summary, { resolveMetric: Y });
2122
+ }
2123
+ return [];
2124
+ }, r = () => {
2125
+ x.value.$refs.scrollBarRef.setScrollTop(0);
2126
+ }, t = () => {
2127
+ _({
2128
+ pageStart: 1
2129
+ });
2130
+ }, s = () => {
2131
+ _();
2132
+ }, y = (j) => {
2133
+ if (n.selection = j, T("selection-change", j), n.shiftKey) {
2134
+ const K = j[j.length - 2], Y = j[j.length - 1], U = i.list.filter1((Z) => Z.id === K.id).index || 0, G = i.list.filter1((Z) => Z.id === Y.id).index;
2135
+ let X = U, oe = G;
2136
+ U > G && (X = G, oe = U);
2137
+ for (let Z = X; Z <= oe; Z++)
2138
+ g.$refs.body.toggleRowSelection(i.list[Z], !0);
2139
+ }
2140
+ }, A = () => {
2141
+ n.loading || (_({ refresh: !0 }), T("refresh"));
2142
+ }, S = () => {
2143
+ u.current = 0;
2144
+ }, a = () => {
2145
+ u.current = 1;
2146
+ }, p = () => {
2147
+ n.tableKey++;
2148
+ }, C = () => {
2149
+ document.addEventListener("keydown", $), document.addEventListener("keyup", D);
2150
+ }, $ = (j) => {
2151
+ j.keyCode === 16 && (n.shiftKey = !0);
2152
+ }, D = (j) => {
2153
+ j.keyCode === 16 && (n.shiftKey = !1);
2154
+ }, E = () => {
2155
+ document.removeEventListener("keydown", $), document.removeEventListener("keyup", D);
2156
+ }, F = ({ i: j, row: K }) => {
2157
+ i.list[j] = K;
2158
+ }, q = O(() => {
2159
+ let j = e.height || window.config.options.pageHeight;
2160
+ return e.noheader === !1 && (j -= 64), e.nofooter === !1 && (j -= 56), j -= e.minusHeight, j;
2161
+ }), ce = O(() => !!i.summary), Me = O(() => i.nopagination === !0 ? "total" : "total,->,prev,pager,next,sizes"), re = O(() => {
2162
+ if (e.tool) {
2163
+ const { column: j = !0, download: K = !0, refresh: Y = !0 } = e.tool;
2164
+ return {
2165
+ column: j,
2166
+ download: K,
2167
+ refresh: Y
2168
+ };
2169
+ } else
2170
+ return !1;
2171
+ });
2172
+ return ie(() => {
2173
+ E();
2174
+ }), b({
2175
+ initTable: v,
2176
+ editRow: F
2177
+ }), (j, K) => {
2178
+ const Y = L("el-button"), U = L("Loading"), G = L("el-table"), X = L("el-pagination"), oe = L("Drawer");
2179
+ return h(), k("div", po, [
2180
+ e.noheader === !1 ? (h(), k("div", {
2181
+ key: 0,
2182
+ class: B(["flexMode hb g12 p16 bg-white", e.autoHeader ? "minh64" : "h64"])
2183
+ }, [
2184
+ c("div", {
2185
+ class: B(["flexMode vc flexGrow maxwp100", e.headerClass])
2186
+ }, [
2187
+ H(j.$slots, "header", {}, void 0, !0)
2188
+ ], 2),
2189
+ l(re) ? (h(), k("div", mo, [
2190
+ l(re).refresh ? (h(), P(Y, {
2191
+ key: 0,
2192
+ onClick: A
2193
+ }, {
2194
+ icon: V(() => [...K[2] || (K[2] = [
2195
+ c("i", { class: "imicon im-sync" }, null, -1)
2196
+ ])]),
2197
+ default: V(() => [
2198
+ ee(" " + I(j.$l("Refresh")), 1)
2199
+ ]),
2200
+ _: 1
2201
+ })) : N("", !0),
2202
+ l(re).column ? (h(), P(Y, {
2203
+ key: 1,
2204
+ onClick: S
2205
+ }, {
2206
+ icon: V(() => [...K[3] || (K[3] = [
2207
+ c("i", { class: "imicon im-column" }, null, -1)
2208
+ ])]),
2209
+ default: V(() => [
2210
+ ee(" " + I(j.$l("Columns")), 1)
2211
+ ]),
2212
+ _: 1
2213
+ })) : N("", !0),
2214
+ l(re).download ? (h(), P(Y, {
2215
+ key: 2,
2216
+ onClick: a
2217
+ }, {
2218
+ icon: V(() => [...K[4] || (K[4] = [
2219
+ c("i", { class: "imicon im-download1" }, null, -1)
2220
+ ])]),
2221
+ default: V(() => [
2222
+ ee(" " + I(j.$l("Download")), 1)
2223
+ ]),
2224
+ _: 1
2225
+ })) : N("", !0)
2226
+ ])) : N("", !0)
2227
+ ], 2)) : N("", !0),
2228
+ c("div", fo, [
2229
+ z(U, {
2230
+ loading: l(n).loading
2231
+ }, null, 8, ["loading"]),
2232
+ (h(), P(G, {
2233
+ ref_key: "body",
2234
+ ref: x,
2235
+ key: l(n).tableKey,
2236
+ height: l(q),
2237
+ data: l(i).list,
2238
+ "default-expand-all": e.defaultExpandAll,
2239
+ "row-key": e.rowKey,
2240
+ stripe: "",
2241
+ border: "",
2242
+ "show-summary": l(ce),
2243
+ "summary-method": m,
2244
+ class: "MainTable",
2245
+ onSelectionChange: y
2246
+ }, {
2247
+ default: V(() => [
2248
+ z(l(wn), le({
2249
+ "table-name": e.tableName,
2250
+ column: l(re) ? l(re).column : !1
2251
+ }, j.$attrs), {
2252
+ default: V(() => [
2253
+ H(j.$slots, "default", {}, void 0, !0)
2254
+ ]),
2255
+ _: 3
2256
+ }, 16, ["table-name", "column"])
2257
+ ]),
2258
+ _: 3
2259
+ }, 8, ["height", "data", "default-expand-all", "row-key", "show-summary"]))
2260
+ ]),
2261
+ e.nofooter === !1 ? (h(), k("div", go, [
2262
+ z(X, {
2263
+ "current-page": l(i).page,
2264
+ "onUpdate:currentPage": K[0] || (K[0] = (Z) => l(i).page = Z),
2265
+ background: "",
2266
+ total: l(i).total,
2267
+ "default-page-size": l(i).pageSize,
2268
+ "page-sizes": e.pageSizes,
2269
+ "pager-count": 5,
2270
+ layout: l(Me),
2271
+ class: "wp100",
2272
+ onSizeChange: t,
2273
+ onCurrentChange: s
2274
+ }, null, 8, ["current-page", "total", "default-page-size", "page-sizes", "layout"])
2275
+ ])) : N("", !0),
2276
+ z(oe, {
2277
+ current: l(u).current,
2278
+ "onUpdate:current": K[1] || (K[1] = (Z) => l(u).current = Z),
2279
+ "table-name": e.tableName,
2280
+ drawer: l(u).list,
2281
+ list: l(i).list,
2282
+ selection: l(n).selection,
2283
+ onInitColumn: p
2284
+ }, null, 8, ["current", "table-name", "drawer", "list", "selection"])
2285
+ ]);
2286
+ };
2287
+ }
2288
+ }), yo = /* @__PURE__ */ W(ho, [["__scopeId", "data-v-e72098dd"]]), bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2289
+ __proto__: null,
2290
+ default: yo
2291
+ }, Symbol.toStringTag, { value: "Module" })), vo = { class: "panelWrap" }, _o = /* @__PURE__ */ Object.assign({
2292
+ name: "MvcTabs",
2293
+ inheritAttrs: !1
2294
+ }, {
2295
+ __name: "index",
2296
+ props: {
2297
+ modelValue: {
2298
+ type: [String, Number, Boolean],
2299
+ default: void 0
2300
+ },
2301
+ /** 与 BtnGroup 一致;每项需含 `component`(或 `componentKey` 指定字段)指向要渲染的组件 */
2302
+ options: {
2303
+ type: Array,
2304
+ default: () => []
2305
+ },
2306
+ valueKey: {
2307
+ type: String,
2308
+ default: "value"
2309
+ },
2310
+ labelKey: {
2311
+ type: String,
2312
+ default: "label"
2313
+ },
2314
+ componentKey: {
2315
+ type: String,
2316
+ default: "component"
2317
+ },
2318
+ /** 选项对象上用于 `v-bind` 到当前面板的字段名,如 `{ paneProps: { id: 1 } }` */
2319
+ panePropsKey: {
2320
+ type: String,
2321
+ default: "paneProps"
2322
+ },
2323
+ disabled: {
2324
+ type: Boolean,
2325
+ default: !1
2326
+ }
2327
+ },
2328
+ emits: ["update:modelValue", "change"],
2329
+ setup(f, { emit: b }) {
2330
+ const o = f, e = b, n = ye(), i = (d) => d == null ? d : ["Object", "Array"].includes(globalThis.$getType(d)) ? d[o.valueKey] : d, u = (d) => {
2331
+ e("update:modelValue", d);
2332
+ const w = o.options.find((v) => i(v) === d);
2333
+ e("change", d, w);
2334
+ }, x = O(
2335
+ () => o.options.find((d) => i(d) === o.modelValue)
2336
+ ), g = O(() => {
2337
+ const d = x.value;
2338
+ if (!(!d || !["Object", "Array"].includes(globalThis.$getType(d))))
2339
+ return d[o.componentKey];
2340
+ }), T = O(() => {
2341
+ const d = x.value;
2342
+ return !d || !["Object", "Array"].includes(globalThis.$getType(d)) ? {} : d[o.panePropsKey] ?? {};
2343
+ });
2344
+ return (d, w) => {
2345
+ const v = L("BtnGroup");
2346
+ return h(), k("div", le({ class: "MvcTabs flexMode flexV g12" }, l(n)), [
2347
+ z(v, {
2348
+ "model-value": o.modelValue,
2349
+ options: o.options,
2350
+ "value-key": o.valueKey,
2351
+ "label-key": o.labelKey,
2352
+ disabled: o.disabled,
2353
+ "onUpdate:modelValue": u
2354
+ }, null, 8, ["model-value", "options", "value-key", "label-key", "disabled"]),
2355
+ c("div", vo, [
2356
+ l(g) ? (h(), P(xe(l(g)), de(le({ key: 0 }, l(T))), null, 16)) : N("", !0)
2357
+ ])
2358
+ ], 16);
2359
+ };
2360
+ }
2361
+ }), $o = /* @__PURE__ */ W(_o, [["__scopeId", "data-v-62303cd8"]]), Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2362
+ __proto__: null,
2363
+ default: $o
2364
+ }, Symbol.toStringTag, { value: "Module" })), wo = /* @__PURE__ */ Object.assign({
2365
+ name: "MvcTextarea",
2366
+ inheritAttrs: !1
2367
+ }, {
2368
+ __name: "index",
2369
+ props: {
2370
+ modelValue: {
2371
+ type: [String, Number, Array],
2372
+ default: ""
2373
+ },
2374
+ rows: {
2375
+ type: Number,
2376
+ default: 3
2377
+ },
2378
+ height: {
2379
+ type: [String, Number],
2380
+ default: ""
2381
+ },
2382
+ output: {
2383
+ type: String,
2384
+ default: "string",
2385
+ validator: (f) => ["string", "array"].includes(f)
2386
+ },
2387
+ resize: {
2388
+ type: String,
2389
+ default: "vertical",
2390
+ validator: (f) => ["none", "vertical"].includes(f)
2391
+ }
2392
+ },
2393
+ emits: [
2394
+ "update:modelValue",
2395
+ "input",
2396
+ "change",
2397
+ "blur",
2398
+ "focus"
2399
+ ],
2400
+ setup(f, { emit: b }) {
2401
+ const o = f, e = J(null);
2402
+ let n = null;
2403
+ const i = R({
2404
+ val: "",
2405
+ isComposing: !1
2406
+ }), u = b, { proxy: x } = ae();
2407
+ ne(() => {
2408
+ var s, y;
2409
+ const t = (s = e.value) == null ? void 0 : s.$el;
2410
+ n = (y = t == null ? void 0 : t.querySelector) == null ? void 0 : y.call(t, "textarea"), n && (n.addEventListener("compositionstart", g), n.addEventListener("compositionend", T));
2411
+ });
2412
+ const g = () => {
2413
+ i.isComposing = !0;
2414
+ }, T = () => {
2415
+ i.isComposing = !1, pe(() => _(i.val));
2416
+ }, d = (t) => {
2417
+ i.isComposing || _(t);
2418
+ }, w = (t) => {
2419
+ const s = String(t ?? "").split(/\r?\n/);
2420
+ return o.output === "array" ? s : s.join(",");
2421
+ }, v = (t) => Array.isArray(t) ? t.join(`
2422
+ `) : String(t ?? "").replace(/,/g, `
2423
+ `), _ = (t) => {
2424
+ const s = w(t);
2425
+ u("update:modelValue", s), u("input", s);
2426
+ }, M = O(() => {
2427
+ if (!o.height) return x.$attrs["input-style"];
2428
+ const t = typeof o.height == "number" ? `${o.height}px` : o.height;
2429
+ return { ...x.$attrs["input-style"] && typeof x.$attrs["input-style"] == "object" ? { ...x.$attrs["input-style"] } : {}, height: t, minHeight: t };
2430
+ }), m = O(() => !!(x.$attrs.maxlength || r.value)), r = O(() => x.$attrs.max);
2431
+ return te(
2432
+ () => o.modelValue,
2433
+ (t) => {
2434
+ const s = v(t);
2435
+ i.val !== s && (i.val = s);
2436
+ },
2437
+ { immediate: !0 }
2438
+ ), ie(() => {
2439
+ n && (n.removeEventListener("compositionstart", g), n.removeEventListener("compositionend", T), n = null);
2440
+ }), (t, s) => {
2441
+ const y = L("el-input");
2442
+ return h(), P(y, le({
2443
+ ref_key: "inputRef",
2444
+ ref: e,
2445
+ type: "textarea",
2446
+ modelValue: l(i).val,
2447
+ "onUpdate:modelValue": s[0] || (s[0] = (A) => l(i).val = A),
2448
+ rows: o.rows,
2449
+ style: t.$attrs.style,
2450
+ "input-style": l(M),
2451
+ "show-word-limit": l(m),
2452
+ maxlength: l(r),
2453
+ class: "MvcTextarea"
2454
+ }, t.$attrs, { onInput: d }), null, 16, ["modelValue", "rows", "style", "input-style", "show-word-limit", "maxlength"]);
2455
+ };
2456
+ }
2457
+ }), xo = /* @__PURE__ */ W(wo, [["__scopeId", "data-v-4dba94bf"]]), So = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2458
+ __proto__: null,
2459
+ default: xo
2460
+ }, Symbol.toStringTag, { value: "Module" })), $e = /* @__PURE__ */ Object.assign({ "../component/BtnGroup/index.vue": nt, "../component/Drawer/index.vue": it, "../component/DrawerArea/index.vue": ft, "../component/Form/index.vue": bt, "../component/Frame/index.vue": Gt, "../component/Icon/index.vue": Zt, "../component/Input/index.vue": Xt, "../component/Page/index.vue": un, "../component/Select/index.vue": hn, "../component/SelectV2/index.vue": Cn, "../component/Table/index.vue": bo, "../component/Tabs/index.vue": Co, "../component/Textarea/index.vue": So }), ko = (f) => {
2461
+ for (let b in $e) {
2462
+ let o = b.match(/\.\.\/component\/(.*)\/index.vue/)[1];
2463
+ f.component(o, $e[b].default);
2464
+ }
2465
+ }, To = {
2466
+ name: "Matt Avias Frame",
2467
+ copyright: "©2026",
2468
+ version: "1.0.11",
2469
+ author: "Matt Avias",
2470
+ date: "2026-02-26",
2471
+ /** 默认语言 key,与 `$getLang`、localStorage `lang` 一致;业务在 app.use(mvframe, { config }) 里覆盖 */
2472
+ lang: "en_us",
2473
+ /** Table 等表格默认;业务在 app.use(mvframe, { config }) 里覆盖 */
2474
+ table: {
2475
+ /** 同 Table 的 summary-metric:{ [prop]: { unit, precision, currency } } 或 (prop) => metric */
2476
+ summaryMetric: null
2477
+ }
2478
+ }, Mo = (f, b = {}) => {
2479
+ globalThis.$config = {
2480
+ ...To,
2481
+ ...b
2482
+ };
2483
+ }, Ko = (f, b) => {
2484
+ f.use(Mo, b.config).use(Te).use(ko).use(Ae).use(Ve).use(je, b.pinia).use(Qe, b.vueRouter).use(He, b.lang);
2485
+ };
2486
+ export {
2487
+ W as _,
2488
+ No as b,
2489
+ Do as g,
2490
+ Ko as i,
2491
+ Ye as n
2492
+ };