magtool 1.4.3 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4301 @@
1
+ import { createElementBlock as M, openBlock as p, normalizeStyle as se, unref as t, createCommentVNode as B, createElementVNode as c, normalizeClass as G, renderSlot as H, toDisplayString as I, createVNode as N, markRaw as ve, resolveComponent as D, mergeProps as K, withCtx as _, resolveDirective as _e, withDirectives as be, createBlock as Y, withKeys as ye, createSlots as ee, Fragment as oe, renderList as le, createTextVNode as te, defineComponent as we, reactive as $e, onBeforeMount as Se, withModifiers as ie, resolveDynamicComponent as Ce, nextTick as pe } from "vue";
2
+ import { _ as ae, d as ke, E as xe } from "./vendor.js";
3
+ import { u as Ve } from "./composition.js";
4
+ import me from "vuedraggable";
5
+ const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
6
+ name: "MvcCard"
7
+ }, {
8
+ __name: "index",
9
+ props: {
10
+ title: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ noheader: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ nobg: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ headerClass: {
23
+ type: String,
24
+ default: ""
25
+ },
26
+ bodyClass: {
27
+ type: String,
28
+ default: ""
29
+ },
30
+ bodyStyle: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ footerClass: {
35
+ type: String,
36
+ default: ""
37
+ },
38
+ color: {
39
+ type: String,
40
+ default: "",
41
+ validate: (A) => ["primary", "green", "red", "purple", "orange", "blue"].indexOf(A) > -1
42
+ },
43
+ headerHide: {
44
+ type: Boolean,
45
+ default: !1
46
+ }
47
+ },
48
+ setup(A) {
49
+ const x = A, { proxy: s } = getCurrentInstance(), e = () => {
50
+ o.toggle = !o.toggle;
51
+ };
52
+ onMounted(() => {
53
+ o.toggle = x.headerHide;
54
+ });
55
+ const o = reactive({
56
+ toggle: !1
57
+ });
58
+ return (h, a) => (p(), M("div", {
59
+ class: "MvcCard",
60
+ style: se(t(o).cardStyle)
61
+ }, [
62
+ x.noheader ? B("", !0) : (p(), M("div", {
63
+ key: 0,
64
+ ref: "header",
65
+ class: G(["cardHeader flexMode vc fs18 txt-dark9", x.headerClass])
66
+ }, [
67
+ c("i", {
68
+ class: G(["mr4 block imicon im-arrow-right fw700 fs14 transition3 hover", !t(o).toggle && "rotateZ90"]),
69
+ onClick: e
70
+ }, null, 2),
71
+ c("div", Te, I(h.$l(x.title)), 1),
72
+ H(h.$slots, "header", {}, void 0, !0)
73
+ ], 2)),
74
+ c("div", {
75
+ class: G(["cardArea transition3", [x.nobg && "nobg", t(o).toggle && "miniArea"]])
76
+ }, [
77
+ c("div", {
78
+ class: G(["cardBody relative nobar", x.bodyClass]),
79
+ style: se(x.bodyStyle)
80
+ }, [
81
+ H(h.$slots, "default", {}, void 0, !0)
82
+ ], 6),
83
+ h.$slots.footer ? (p(), M("div", {
84
+ key: 0,
85
+ class: G(["cardFooter", x.footerClass])
86
+ }, [
87
+ H(h.$slots, "footer", {}, void 0, !0)
88
+ ], 2)) : B("", !0)
89
+ ], 2)
90
+ ], 4));
91
+ }
92
+ }), Me = /* @__PURE__ */ ae(Oe, [["__scopeId", "data-v-d54f1970"]]), Ae = { class: "SuperDatePicker" }, De = /* @__PURE__ */ Object.assign({
93
+ name: "SuperDatePicker"
94
+ }, {
95
+ __name: "index",
96
+ props: {
97
+ source: {
98
+ type: String,
99
+ default: ""
100
+ },
101
+ modelValue: {
102
+ type: [String, Array],
103
+ default: () => []
104
+ },
105
+ withToday: {
106
+ type: Boolean,
107
+ default: !1
108
+ },
109
+ defaultDate: {
110
+ type: Array,
111
+ default: () => [-7, -1]
112
+ },
113
+ // 开始,结束的分割符号,也是v-model str时的分割符号
114
+ separator: {
115
+ type: String,
116
+ default: "~"
117
+ },
118
+ offset: {
119
+ type: [String, Number],
120
+ default: 0
121
+ },
122
+ range: {
123
+ type: [String, Number],
124
+ default: 180
125
+ },
126
+ limit: {
127
+ type: [String, Number],
128
+ default: 30
129
+ },
130
+ // today, yersterday, thisweek, last7days, thismonth, last30days, lastmonth
131
+ shortcuts: {
132
+ type: [Object, Boolean],
133
+ default: !1
134
+ },
135
+ placement: {
136
+ type: String,
137
+ default: "bottom"
138
+ },
139
+ disabled: {
140
+ type: Boolean,
141
+ default: !1
142
+ },
143
+ size: {
144
+ type: String,
145
+ default: "large"
146
+ }
147
+ },
148
+ emits: ["change", "update:modelValue"],
149
+ setup(A, { expose: x, emit: s }) {
150
+ ke.en.weekStart = 7;
151
+ const e = A, o = reactive({
152
+ type: "",
153
+ date: [],
154
+ shortBtn: [],
155
+ firstStamp: 0
156
+ });
157
+ onMounted(() => {
158
+ if (!g.value.length) {
159
+ const l = e.defaultDate[0], n = e.defaultDate[1];
160
+ o.date = [
161
+ window.$m().add(l, "days").format("YYYY-MM-DD"),
162
+ window.$m().add(n, "days").format("YYYY-MM-DD")
163
+ ], k(o.date);
164
+ }
165
+ V();
166
+ });
167
+ const h = s, a = (l) => {
168
+ let { limit: n, range: S } = e;
169
+ n = Number(n), S = Number(S);
170
+ const { firstStamp: L } = o, R = n * 864e5;
171
+ let U = +window.$m().add(-S, "d"), Z = +window.$m();
172
+ if (e.source === "report" && !L)
173
+ return l > Z;
174
+ if (L) {
175
+ if (e.source !== "report") {
176
+ let P = L - R;
177
+ P > U && (U = P);
178
+ } else
179
+ U = L - R;
180
+ let W = L + R;
181
+ W < Z && (Z = W);
182
+ }
183
+ return l < U || l > Z;
184
+ }, y = (l) => {
185
+ l[1] === null ? o.firstStamp = +l[0] : o.firstStamp = 0;
186
+ }, k = (l) => {
187
+ const n = d(l);
188
+ h("change", n, "cpt");
189
+ }, V = () => {
190
+ const { shortcuts: l } = e;
191
+ let n = {};
192
+ if (l === !1)
193
+ o.shortBtn = [];
194
+ else {
195
+ l === !0 ? n = T : n = {
196
+ ...T,
197
+ ...l
198
+ };
199
+ const S = [];
200
+ n.today && S.push(O()), n.yesterday && S.push(b()), n.thisweek && S.push(f()), n.last7days && S.push(r()), n.todaylast7days && S.push(C()), n.thismonth && S.push(u()), n.last30days && S.push(m()), n.lastmonth && S.push($()), o.shortBtn = S;
201
+ }
202
+ }, O = () => ({
203
+ text: window.$l("Today"),
204
+ value: () => {
205
+ const l = window.$m().format("YYYY-MM-DD");
206
+ return [l, l];
207
+ },
208
+ onClick: (l) => {
209
+ }
210
+ }), b = () => ({
211
+ text: window.$l("Yesterday"),
212
+ value: () => {
213
+ const l = window.$m().add(-1, "days").format("YYYY-MM-DD");
214
+ return [l, l];
215
+ },
216
+ onClick: (l) => {
217
+ }
218
+ }), f = () => ({
219
+ text: window.$l("This Week"),
220
+ value: () => {
221
+ let l = 0, n = window.$m().weekday(0), S = window.$m().add(l, "days");
222
+ return +n > +S && (n = n.format("YYYY-MM-DD"), S = n), [n, S];
223
+ },
224
+ onClick: (l) => {
225
+ }
226
+ }), r = () => ({
227
+ text: window.$l("Last 7 Days"),
228
+ value: () => {
229
+ let l = -7, n = -1;
230
+ return e.widthToday && (l += 1, n += 1), [
231
+ window.$m().add(l, "days").format("YYYY-MM-DD"),
232
+ window.$m().add(n, "days").format("YYYY-MM-DD")
233
+ ];
234
+ },
235
+ onClick: (l) => {
236
+ }
237
+ }), C = () => ({
238
+ text: window.$l("Last 7 Days (with Today)"),
239
+ value: () => [
240
+ window.$m().add(-6, "days").format("YYYY-MM-DD"),
241
+ window.$m().add(0, "days").format("YYYY-MM-DD")
242
+ ],
243
+ onClick: (l) => {
244
+ }
245
+ }), u = () => ({
246
+ text: window.$l("This Month"),
247
+ value: () => {
248
+ let l = 0, n = window.$m().date(1), S = window.$m().add(l, "days");
249
+ return +n > +S && (n = n.format("YYYY-MM-DD"), S = n), [n, S];
250
+ },
251
+ onClick: (l) => {
252
+ }
253
+ }), m = () => ({
254
+ text: window.$l("Last 30 Days"),
255
+ value: () => {
256
+ let l = -30, n = -1;
257
+ return e.widthToday && (l += 1, n += 1), [
258
+ window.$m().add(l, "days").format("YYYY-MM-DD"),
259
+ window.$m().add(n, "days").format("YYYY-MM-DD")
260
+ ];
261
+ },
262
+ onClick: (l) => {
263
+ }
264
+ }), $ = () => ({
265
+ text: window.$l("Last Month"),
266
+ value: () => [
267
+ window.$m().date(1).add(-1, "days").date(1).format("YYYY-MM-DD"),
268
+ window.$m().date(1).add(-1, "days").format("YYYY-MM-DD")
269
+ ],
270
+ onClick: (l) => {
271
+ }
272
+ }), d = (l, n = !1) => {
273
+ n && (o.date = l);
274
+ let S;
275
+ return w.value === "Array" ? S = l : w.value === "Object" ? S = {
276
+ startDate: l[0],
277
+ endDate: l[1]
278
+ } : S = l[0] + e.separator + l[1], h("update:modelValue", S), S;
279
+ }, i = computed(() => window.$getLang()), w = computed(() => window.$getType(e.modelValue)), g = computed(() => w.value === "Array" ? e.modelValue : w.value === "Object" ? [e.modelValue.startDate, e.modelValue.endDate] : e.modelValue ? e.modelValue.split(e.separator) : []), z = computed(() => ({
280
+ start: window.$l("Start Date"),
281
+ end: window.$l("End Date")
282
+ }));
283
+ computed(() => {
284
+ let { disabledDate: l, offset: n } = e, S = 0;
285
+ n = Number(n) || 0;
286
+ const L = window.$getType(l);
287
+ return L !== "Function" && L !== "Array" && (S = parseInt(l) || 0, S > -1 && (S = -1), S > n && (S = n)), S;
288
+ });
289
+ const T = {
290
+ today: !0,
291
+ yesterday: !0,
292
+ thisweek: !1,
293
+ last7days: !0,
294
+ todaylast7days: !1,
295
+ thismonth: !0,
296
+ last30days: !0,
297
+ lastmonth: !0
298
+ };
299
+ return watch(
300
+ () => g.value,
301
+ (l, n) => {
302
+ l.length && JSON.stringify(l) !== JSON.stringify(o.date) && (o.date = l, k(l));
303
+ }
304
+ ), x({
305
+ setDate: d
306
+ }), (l, n) => (p(), M("div", Ae, [
307
+ N(t(xe), {
308
+ modelValue: t(o).date,
309
+ "onUpdate:modelValue": n[0] || (n[0] = (S) => t(o).date = S),
310
+ class: "wp100",
311
+ "popper-class": t(i),
312
+ type: "daterange",
313
+ "value-format": "YYYY-MM-DD",
314
+ editable: !1,
315
+ size: e.size,
316
+ clearable: !1,
317
+ "range-separator": e.separator,
318
+ shortcuts: t(o).shortBtn,
319
+ "end-placeholder": l.$l(t(z).end),
320
+ "start-placeholder": l.$l(t(z).start),
321
+ "disabled-date": a,
322
+ placement: e.placement,
323
+ disabled: e.disabled,
324
+ source: e.source,
325
+ onChange: k,
326
+ onCalendarChange: y
327
+ }, null, 8, ["modelValue", "popper-class", "size", "range-separator", "shortcuts", "end-placeholder", "start-placeholder", "placement", "disabled", "source"])
328
+ ]));
329
+ }
330
+ }), Ie = { class: "EChart" }, Ne = ["id"], ze = /* @__PURE__ */ Object.assign({
331
+ name: "EChart"
332
+ }, {
333
+ __name: "index",
334
+ props: {
335
+ options: {
336
+ type: Object,
337
+ default: () => {
338
+ }
339
+ },
340
+ type: {
341
+ type: String,
342
+ default: ""
343
+ },
344
+ height: {
345
+ type: [String, Number],
346
+ default: "300"
347
+ },
348
+ width: {
349
+ type: [String, Number],
350
+ default: ""
351
+ },
352
+ minusWidth: {
353
+ type: String,
354
+ default: ""
355
+ },
356
+ theme: {
357
+ type: String,
358
+ default: "light"
359
+ }
360
+ // tool: {
361
+ // type: Boolean,
362
+ // default: false,
363
+ // },
364
+ },
365
+ setup(A, { expose: x, emit: s }) {
366
+ const e = A, { proxy: o } = getCurrentInstance();
367
+ inject("store").launch();
368
+ const a = reactive({
369
+ chart: {},
370
+ chartID: "",
371
+ defaultOptions: {
372
+ grid: {
373
+ top: 20,
374
+ left: 50,
375
+ right: 20,
376
+ bottom: 72
377
+ },
378
+ legend: {
379
+ id: "bar",
380
+ itemWidth: 18,
381
+ bottom: 14,
382
+ textStyle: {
383
+ color: "#4d4d4d"
384
+ }
385
+ },
386
+ color: window.global.config.color,
387
+ xAxis: {
388
+ animationEasing: "cubicInOut",
389
+ animationDuration: 300,
390
+ axisLine: {
391
+ show: !1
392
+ },
393
+ axisTick: {
394
+ show: !1
395
+ }
396
+ },
397
+ yAxis: {
398
+ animationEasing: "cubicInOut",
399
+ animationDuration: 300,
400
+ splitLine: {
401
+ lineStyle: {
402
+ type: "dotted"
403
+ }
404
+ }
405
+ },
406
+ tooltip: {
407
+ show: !0,
408
+ trigger: "axis",
409
+ padding: [8, 16],
410
+ borderWidth: 0
411
+ },
412
+ mounted: !1
413
+ },
414
+ options: {},
415
+ chartType: ""
416
+ });
417
+ onBeforeMount(() => {
418
+ a.chartID = `chart${+/* @__PURE__ */ new Date()}${parseInt(Math.random() * 1e4)}`;
419
+ }), onMounted(() => {
420
+ a.mounted = !0, a.chart = ve(
421
+ window.$echarts.init(o.$refs.chart, { renderer: "svg" })
422
+ );
423
+ });
424
+ const y = s, k = async () => {
425
+ V();
426
+ }, V = () => {
427
+ nextTick(() => {
428
+ var d;
429
+ a.optioning = !0, a.chart.clear();
430
+ let m = window.$deepClone(e.options);
431
+ ["pie", "radar", "scatter"].indexOf(e.type) > -1 ? (m = {
432
+ color: a.defaultOptions.color,
433
+ animationEasing: "cubicInOut",
434
+ animationDuration: 500,
435
+ ...m
436
+ }, m.tooltip ? (m.tooltip.textStyle ? m.tooltip.textStyle.fontFamily = "Monaco" : m.tooltip.textStyle = {
437
+ fontFamily: "Monaco"
438
+ }, m.tooltip = {
439
+ ...m.tooltip,
440
+ ...u[e.theme]
441
+ }) : m.tooltip = {
442
+ textStyle: {
443
+ fontFamily: "Monaco"
444
+ },
445
+ ...u[e.theme]
446
+ }) : e.type === "map" || (e.tool === !0 && (a.defaultOptions.toolbox = {
447
+ show: !0,
448
+ right: 24,
449
+ emphasis: {
450
+ iconStyle: {
451
+ color: window.global.config.color[0]
452
+ }
453
+ },
454
+ feature: {
455
+ // myRestore: {
456
+ // show: true,
457
+ // title: '',
458
+ // icon: 'path://M486.464 83.584a424.96 424.96 0 0 0-276.928 102.336 48.256 48.256 0 0 0-6.4 6.528l-6.4-6.016-34.24-31.04-10.88-9.152-22.912-20.736-4.928-3.968c-4.864-3.52-7.68-3.84-9.536 0.384l-0.96 3.072-1.152 6.784-0.896 9.472-1.92 36.864-11.392 165.888-0.512 15.616-1.408 27.776 0.128 7.168c0.64 7.936 3.2 11.008 10.368 11.2l3.904-0.128 7.872-1.088 38.272-7.232 160.896-34.56 39.68-7.232 6.912-1.728c6.4-1.92 8.192-4.224 5.696-8.512l-1.984-2.752-4.928-5.248-88.512-80.384 10.56-8.576a328.768 328.768 0 0 1 201.6-68.736c183.616 0 332.608 150.4 332.608 336 0 185.664-148.992 336-332.608 336a331.52 331.52 0 0 1-282.56-158.656 48 48 0 1 0-81.728 50.368 427.52 427.52 0 0 0 364.288 204.288c236.8 0 428.608-193.472 428.608-432 0-238.464-191.808-432-428.608-432z',
459
+ // onclick: () => {
460
+ // state.chart.clear();
461
+ // state.chart.setOption(state.options);
462
+ // },
463
+ // },
464
+ // myLine: {
465
+ // show: true,
466
+ // icon: 'lineChart',
467
+ // onclick: ()=>{}
468
+ // },
469
+ // magicType: {
470
+ // title: {
471
+ // line: '',
472
+ // bar: '',
473
+ // },
474
+ // type: ['line', 'bar'],
475
+ // options: {
476
+ // line: {
477
+ // onclick: () => {
478
+ // state.chartType = 'line';
479
+ // console.info('line click');
480
+ // },
481
+ // },
482
+ // },
483
+ // },
484
+ }
485
+ }), a.defaultOptions.tooltip = {
486
+ ...a.defaultOptions.tooltip,
487
+ ...u[e.theme]
488
+ }, m = O(a.defaultOptions, m)), (d = m.series) == null || d.forEach((i) => {
489
+ i.animation = !0, i.animationDuration = 300, i.type === "line" ? (i.animationEasing = "cubicInOut", i.animationDelay = (w) => w * 100) : (i.animationEasing = "cubicInOut", i.animationDelay = (w) => w * 100);
490
+ }), a.options = m, a.chart.setOption(m), e.type === "wordcloud" && a.chart.on("click", (...i) => {
491
+ y("chart-click", i);
492
+ }), a.optioning = !1;
493
+ });
494
+ }, O = (m, $) => {
495
+ const { yAxis: d } = $, { yAxis: i } = m;
496
+ let w;
497
+ window.$getType(d) === "Array" ? w = d.map((T) => ({
498
+ ...i,
499
+ ...T
500
+ })) : w = {
501
+ ...i,
502
+ ...d
503
+ };
504
+ const g = { ...$, ...m };
505
+ return Object.keys(g).forEach((T) => {
506
+ const l = window.$getType(g[T]);
507
+ if (l === "Array") {
508
+ const n = m[T] || [], S = $[T] || [];
509
+ g[T] = n.length && !S.length ? n : S;
510
+ } else if (l === "Object") {
511
+ const n = m[T] || {}, S = $[T] || {};
512
+ g[T] = { ...n, ...S };
513
+ }
514
+ }), w && (g.yAxis = w), g;
515
+ }, b = () => a.chart, f = computed(() => window.global.config.options.cardWidth), r = computed(() => {
516
+ const m = window.$getType(e.width), $ = Number(e.height);
517
+ let d = e.width;
518
+ return d ? m === "String" && (d.indexOf("%") > -1 ? d = parseInt(parseInt(d) * f.value / 100) : d = Number(d)) : d = f.value, {
519
+ height: $ + "px",
520
+ width: d + "px"
521
+ };
522
+ }), C = computed(() => a.mounted && e.options && Object.keys(e.options).length ? +/* @__PURE__ */ new Date() : !1);
523
+ watch(
524
+ () => C.value,
525
+ (m) => {
526
+ var $;
527
+ m && ($ = e.options.series) != null && $.length && V();
528
+ },
529
+ {
530
+ immediate: !0,
531
+ deep: !0
532
+ }
533
+ ), watch(
534
+ () => e.width,
535
+ (m) => {
536
+ m && a.chart && a.optioning === !1 && a.chart.resize({
537
+ width: m,
538
+ height: e.height
539
+ });
540
+ }
541
+ ), x({
542
+ getChart: b,
543
+ initChart: k
544
+ });
545
+ const u = {
546
+ dark: {
547
+ className: "echart-tooltip",
548
+ extraCssText: "backdrop-filter: blur(8px)",
549
+ animation: !1,
550
+ appendToBody: !0,
551
+ hideDelay: 0,
552
+ transitionDuration: 0,
553
+ backgroundColor: "rgba(50, 50, 50, 0.9)",
554
+ textStyle: {
555
+ color: "rgba(255, 255, 255, 0.9)",
556
+ fontSize: 12,
557
+ fontFamily: "Monaco"
558
+ },
559
+ axisPointer: {
560
+ type: "shadow",
561
+ label: {
562
+ padding: [4, 8],
563
+ color: "rgba(46, 38, 61, 0.5)",
564
+ backgroundColor: "rgba(240, 240, 240, 0.9)"
565
+ },
566
+ lineStyle: {
567
+ color: "rgba(46, 38, 61, 0.2)"
568
+ },
569
+ crossStyle: {
570
+ color: "rgba(46, 38, 61, 0.2)"
571
+ }
572
+ }
573
+ },
574
+ light: {
575
+ className: "echart-tooltip",
576
+ extraCssText: "backdrop-filter: blur(8px)",
577
+ backgroundColor: "rgba(255, 255, 255, 0.9)",
578
+ animation: !1,
579
+ appendToBody: !0,
580
+ hideDelay: 0,
581
+ transitionDuration: 0,
582
+ textStyle: {
583
+ color: "rgba(46, 38, 61, 0.9)",
584
+ fontSize: 14,
585
+ fontFamily: "Monaco"
586
+ },
587
+ axisPointer: {
588
+ type: "shadow",
589
+ label: {
590
+ padding: [4, 8],
591
+ color: "rgba(46, 38, 61, 0.5)",
592
+ backgroundColor: "rgba(240, 240, 240, 0.9)"
593
+ },
594
+ lineStyle: {
595
+ color: "rgba(46, 38, 61, 0.2)"
596
+ },
597
+ crossStyle: {
598
+ color: "rgba(46, 38, 61, 0.2)"
599
+ }
600
+ }
601
+ // position: (pos, params, dom, rect, size) => {
602
+ // // 鼠标在左侧时 tooltip 显示到右侧,鼠标在右侧时 tooltip 显示到左侧。
603
+ // let left = pos[0] + 24;
604
+ // if (size.viewSize[0] < size.contentSize[0]) {
605
+ // left = size.contentSize[0];
606
+ // } else if (pos[0] > size.viewSize[0] - size.contentSize[0]) {
607
+ // left = pos[0] - size.contentSize[0];
608
+ // }
609
+ // // obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
610
+ // return [left, pos[1] + 24];
611
+ // },
612
+ }
613
+ };
614
+ return (m, $) => (p(), M("div", Ie, [
615
+ c("div", {
616
+ ref: "chart",
617
+ style: se(t(r)),
618
+ id: t(a).chartID
619
+ }, null, 12, Ne)
620
+ ]));
621
+ }
622
+ }), je = /* @__PURE__ */ ae(ze, [["__scopeId", "data-v-2dc454ed"]]), Be = {
623
+ class: "MvcIcon",
624
+ "aria-hidden": "true"
625
+ }, Ye = ["xlink:href"], Ee = /* @__PURE__ */ Object.assign({
626
+ name: "MvcIcon"
627
+ }, {
628
+ __name: "index",
629
+ props: {
630
+ name: {
631
+ type: String,
632
+ default: "cloud"
633
+ }
634
+ },
635
+ setup(A) {
636
+ return (x, s) => (p(), M("svg", Be, [
637
+ c("use", {
638
+ "xlink:href": `#imc-${A.name}`
639
+ }, null, 8, Ye)
640
+ ]));
641
+ }
642
+ }), Le = { class: "SuperImage" }, Re = { class: "flexMode hc vc hp100 bg-gray1 radius4" }, Pe = { class: "fs10-i lh1" }, Fe = /* @__PURE__ */ Object.assign({
643
+ name: "SuperImage"
644
+ }, {
645
+ __name: "index",
646
+ props: {
647
+ imageClass: {
648
+ type: String,
649
+ default: ""
650
+ },
651
+ type: {
652
+ type: String,
653
+ default: "icon"
654
+ }
655
+ },
656
+ setup(A, { emit: x }) {
657
+ const s = A, e = reactive({
658
+ style: {},
659
+ diyClass: "hp100"
660
+ }), { proxy: o } = getCurrentInstance();
661
+ onMounted(() => {
662
+ a();
663
+ });
664
+ const h = x, a = async () => {
665
+ const y = await window.$loadImage(o.$attrs.src);
666
+ if (!y)
667
+ return;
668
+ const { height: k, width: V } = y;
669
+ k < V && (e.diyClass = ""), h("load", V, k);
670
+ };
671
+ return (y, k) => {
672
+ const V = D("el-image");
673
+ return p(), M("div", Le, [
674
+ N(V, K({
675
+ "min-scale": 0.9,
676
+ "max-scale": 1.8,
677
+ "zoom-rate": 1.1
678
+ }, y.$attrs, {
679
+ class: [t(e).diyClass, s.imageClass],
680
+ style: t(e).style
681
+ }), {
682
+ placeholder: _(() => k[0] || (k[0] = [
683
+ c("i", { class: "imicon im-loading ani-rotate" }, null, -1)
684
+ ])),
685
+ error: _(() => [
686
+ c("div", Re, [
687
+ c("span", Pe, I(y.$l("Fail")), 1)
688
+ ])
689
+ ]),
690
+ _: 1
691
+ }, 16, ["class", "style"])
692
+ ]);
693
+ };
694
+ }
695
+ }), Ue = { class: "SuperInput" }, Ge = /* @__PURE__ */ Object.assign({
696
+ name: "SuperInput"
697
+ }, {
698
+ __name: "index",
699
+ props: {
700
+ modelValue: {
701
+ type: String,
702
+ default: ""
703
+ },
704
+ placeholder: {
705
+ type: String,
706
+ default: ""
707
+ },
708
+ icon: {
709
+ type: String,
710
+ default: ""
711
+ },
712
+ nobreak: {
713
+ type: Boolean,
714
+ default: !1
715
+ },
716
+ focus: {
717
+ type: Boolean,
718
+ default: !1
719
+ },
720
+ center: {
721
+ type: Boolean,
722
+ default: !1
723
+ }
724
+ },
725
+ emits: ["change", "enter", "update:modelValue"],
726
+ setup(A, { expose: x, emit: s }) {
727
+ const e = A, o = reactive({
728
+ composition: !1,
729
+ v: ""
730
+ }), { proxy: h } = getCurrentInstance(), a = s, y = () => {
731
+ o.composition = !0;
732
+ }, k = () => {
733
+ o.composition = !1;
734
+ }, V = () => {
735
+ o.composition || (a("update:modelValue", o.v), nextTick(() => {
736
+ a("enter", o.v);
737
+ }));
738
+ }, O = () => {
739
+ if (e.nobreak) {
740
+ const u = window.event || arguments[0];
741
+ if (u.key === "Enter" || u.code === "Enter" || u.keyCode === 13)
742
+ return u.returnValue = !1, !1;
743
+ }
744
+ }, b = (u) => {
745
+ e.nobreak ? a("update:modelValue", u.replace(/\n/g, "")) : a("update:modelValue", u), a("change", u);
746
+ }, f = (u) => {
747
+ nextTick(() => {
748
+ h.$refs.input.focus(), u && h.$refs.input.select();
749
+ });
750
+ }, r = computed(() => h.$slots), C = computed(() => e.placeholder ? window.$l(e.placeholder) : " ");
751
+ return watch(
752
+ () => e.modelValue,
753
+ (u) => {
754
+ u !== void 0 && u !== o.v && (o.v = u);
755
+ },
756
+ {
757
+ immediate: !0
758
+ }
759
+ ), x({
760
+ focus: f
761
+ }), (u, m) => {
762
+ const $ = D("el-input"), d = _e("focus");
763
+ return p(), M("div", Ue, [
764
+ be((p(), Y($, K({
765
+ ref: "input",
766
+ modelValue: t(o).v,
767
+ "onUpdate:modelValue": m[0] || (m[0] = (i) => t(o).v = i),
768
+ type: e.nobreak ? "textarea" : "text",
769
+ resize: "none",
770
+ clearable: "",
771
+ "input-style": e.center ? "text-align: center" : ""
772
+ }, u.$attrs, {
773
+ placeholder: t(C),
774
+ onChange: b,
775
+ onCompositionstart: y,
776
+ onCompositionend: k,
777
+ onKeydown: [
778
+ ye(V, ["enter"]),
779
+ ye(O, ["enter", "native"])
780
+ ],
781
+ class: "wp100"
782
+ }), ee({ _: 2 }, [
783
+ t(r).prefix || e.icon ? {
784
+ name: "prefix",
785
+ fn: _(() => [
786
+ t(r).prefix ? H(u.$slots, "prefix", { key: 0 }) : (p(), M("i", {
787
+ key: 1,
788
+ class: G(["imicon", `im-${e.icon}`])
789
+ }, null, 2))
790
+ ]),
791
+ key: "0"
792
+ } : void 0,
793
+ t(r).append ? {
794
+ name: "append",
795
+ fn: _(() => [
796
+ H(u.$slots, "append")
797
+ ]),
798
+ key: "1"
799
+ } : void 0,
800
+ t(r).prepend ? {
801
+ name: "prepend",
802
+ fn: _(() => [
803
+ H(u.$slots, "prepend")
804
+ ]),
805
+ key: "2"
806
+ } : void 0,
807
+ t(r).suffix ? {
808
+ name: "suffix",
809
+ fn: _(() => [
810
+ H(u.$slots, "suffix")
811
+ ]),
812
+ key: "3"
813
+ } : void 0
814
+ ]), 1040, ["modelValue", "type", "input-style", "placeholder"])), [
815
+ [d, e.focus ? 300 : null, "time"]
816
+ ])
817
+ ]);
818
+ };
819
+ }
820
+ }), He = { class: "SuperMultipleSelect relative" }, Je = {
821
+ key: 0,
822
+ class: "flexMode vc hb h40 outsideIgnore"
823
+ }, Ke = {
824
+ key: 1,
825
+ class: "flexMode vc hb h40 outsideIgnore"
826
+ }, We = { class: "flexMode vc g4 fs14 noevent" }, qe = { class: "txt-primary" }, Ze = { class: "txt-dark5" }, Qe = { class: "txt-primary" }, Xe = { class: "txt-dark5" }, et = /* @__PURE__ */ Object.assign({
827
+ name: "SuperMultipleSelect"
828
+ }, {
829
+ __name: "index",
830
+ props: {
831
+ modelValue: {
832
+ type: Array,
833
+ default: () => []
834
+ },
835
+ options: {
836
+ type: Array,
837
+ default: () => []
838
+ },
839
+ label: {
840
+ type: String,
841
+ default: "label"
842
+ },
843
+ value: {
844
+ type: String,
845
+ default: "value"
846
+ }
847
+ },
848
+ emits: ["update:modelValue", "change"],
849
+ setup(A, { expose: x, emit: s }) {
850
+ const e = A, o = reactive({ v: [] }), { proxy: h } = getCurrentInstance(), a = s, y = () => {
851
+ a("update:modelValue", o.v), a("change", o.v);
852
+ }, k = () => {
853
+ o.v = e.options.map((C) => C[e.value]), y();
854
+ }, V = () => {
855
+ o.v = [], y();
856
+ }, O = () => {
857
+ h.$refs.select.blur();
858
+ }, b = computed(() => e.options.length <= o.v.length && e.options.length !== 0), f = computed(() => h.$attrs["multiple-limit"]), r = computed(() => h.$attrs["collapse-tags"] !== void 0);
859
+ return watchPostEffect(() => {
860
+ JSON.stringify(e.modelValue) !== JSON.stringify(o.v) && (o.v = e.modelValue);
861
+ }), x({
862
+ blur: O
863
+ }), (C, u) => {
864
+ const m = D("el-button"), $ = D("el-option"), d = D("el-select");
865
+ return p(), M("div", He, [
866
+ N(d, K({
867
+ ref: "select",
868
+ modelValue: t(o).v,
869
+ "onUpdate:modelValue": u[0] || (u[0] = (i) => t(o).v = i),
870
+ clearable: "",
871
+ placeholder: " ",
872
+ placement: "top"
873
+ }, C.$attrs, {
874
+ multiple: "",
875
+ onChange: y,
876
+ class: ["wp100 MultipleSelect", t(r) && "nowrap"]
877
+ }), ee({
878
+ default: _(() => [
879
+ (p(!0), M(oe, null, le(e.options, (i, w) => (p(), Y($, {
880
+ key: w,
881
+ label: C.$l(i[e.label]),
882
+ value: i[e.value],
883
+ disabled: i.disabled,
884
+ class: G(i.hide && "hide-i")
885
+ }, {
886
+ default: _(() => [
887
+ C.$slots.default ? H(C.$slots, "default", {
888
+ key: 0,
889
+ it: i
890
+ }, void 0, !0) : B("", !0)
891
+ ]),
892
+ _: 2
893
+ }, 1032, ["label", "value", "disabled", "class"]))), 128))
894
+ ]),
895
+ _: 2
896
+ }, [
897
+ C.$slots.prefix ? {
898
+ name: "prefix",
899
+ fn: _(() => [
900
+ H(C.$slots, "prefix", {}, void 0, !0)
901
+ ]),
902
+ key: "0"
903
+ } : void 0,
904
+ t(f) ? void 0 : {
905
+ name: "header",
906
+ fn: _(() => [
907
+ C.$slots.header ? (p(), M("div", Je, [
908
+ H(C.$slots, "header", {}, void 0, !0)
909
+ ])) : (p(), M("div", Ke, [
910
+ t(b) ? (p(), Y(m, {
911
+ key: 0,
912
+ type: "primary",
913
+ size: "default",
914
+ onClick: V
915
+ }, {
916
+ default: _(() => [
917
+ te(I(C.$l("Cancel All")), 1)
918
+ ]),
919
+ _: 1
920
+ })) : (p(), Y(m, {
921
+ key: 1,
922
+ size: "default",
923
+ onClick: k
924
+ }, {
925
+ default: _(() => [
926
+ te(I(C.$l("Select All")), 1)
927
+ ]),
928
+ _: 1
929
+ })),
930
+ c("div", We, [
931
+ c("span", qe, I(t(o).v.length), 1),
932
+ u[1] || (u[1] = c("span", { class: "txt-dark3" }, "/", -1)),
933
+ c("span", Ze, I(t(f) || e.options.length), 1)
934
+ ])
935
+ ]))
936
+ ]),
937
+ key: "1"
938
+ },
939
+ C.$slots.footer ? {
940
+ name: "footer",
941
+ fn: _(() => [
942
+ H(C.$slots, "footer", {}, void 0, !0)
943
+ ]),
944
+ key: "2"
945
+ } : void 0
946
+ ]), 1040, ["modelValue", "class"]),
947
+ t(f) ? (p(), M("div", {
948
+ key: 0,
949
+ class: G(["countArea abs flexMode vc p4 fs12", t(r) && "nowrap"])
950
+ }, [
951
+ c("span", Qe, I(t(o).v.length), 1),
952
+ u[2] || (u[2] = c("span", { class: "txt-dark3" }, "/", -1)),
953
+ c("span", Xe, I(t(f)), 1)
954
+ ], 2)) : B("", !0)
955
+ ]);
956
+ };
957
+ }
958
+ }), tt = /* @__PURE__ */ ae(et, [["__scopeId", "data-v-954e82ab"]]), ot = { class: "SuperNodata" }, he = {
959
+ data: "No Data",
960
+ selection: "Unselected"
961
+ }, lt = /* @__PURE__ */ Object.assign({
962
+ name: "SuperNodata"
963
+ }, {
964
+ __name: "index",
965
+ props: {
966
+ size: {
967
+ type: [String, Number],
968
+ default: "48"
969
+ },
970
+ type: {
971
+ type: String,
972
+ default: "data",
973
+ validate: (A) => he[A]
974
+ },
975
+ txt: {
976
+ type: String,
977
+ default: ""
978
+ }
979
+ },
980
+ setup(A) {
981
+ const x = A, s = computed(() => Number(x.size)), e = computed(() => x.txt ? window.$l(x.txt) : window.$l(he[x.type]));
982
+ return (o, h) => {
983
+ const a = D("el-empty");
984
+ return p(), M("div", ot, [
985
+ N(a, {
986
+ "image-size": t(s),
987
+ description: t(e)
988
+ }, null, 8, ["image-size", "description"])
989
+ ]);
990
+ };
991
+ }
992
+ }), at = /* @__PURE__ */ ae(lt, [["__scopeId", "data-v-325bf284"]]), nt = { class: "Page relative yscroll vh100" }, st = {
993
+ key: 1,
994
+ class: "title fw700 fs24"
995
+ }, rt = {
996
+ class: "PageFooter flexMode vc g8 fs14",
997
+ style: { padding: "14px 30px 24px 30px" }
998
+ }, it = { class: "txt-dark5" }, dt = { class: "txt-primary" }, ut = { class: "txt-dark5" }, ct = /* @__PURE__ */ Object.assign({
999
+ name: "Page"
1000
+ }, {
1001
+ __name: "index",
1002
+ props: {
1003
+ loading: {
1004
+ type: Boolean,
1005
+ default: !1
1006
+ },
1007
+ title: {
1008
+ type: String,
1009
+ default: ""
1010
+ },
1011
+ headerClass: {
1012
+ type: String,
1013
+ default: "sticky"
1014
+ },
1015
+ noheader: {
1016
+ type: Boolean,
1017
+ default: !1
1018
+ }
1019
+ },
1020
+ setup(A) {
1021
+ const x = A, s = computed(() => window.global.config.meta), e = computed(() => ({
1022
+ minHeight: window.global.config.options.pageHeight + "px"
1023
+ }));
1024
+ return (o, h) => {
1025
+ const a = D("Loading");
1026
+ return p(), M("div", nt, [
1027
+ N(a, {
1028
+ loading: x.loading
1029
+ }, null, 8, ["loading"]),
1030
+ x.noheader ? B("", !0) : (p(), M("div", {
1031
+ key: 0,
1032
+ class: G(["PageHeader h80 p0-30 flexMode vc hb z9 xscroll nobar", x.headerClass])
1033
+ }, [
1034
+ o.$slots.title ? H(o.$slots, "title", { key: 0 }, void 0, !0) : x.title ? (p(), M("div", st, I(o.$l(x.title)), 1)) : B("", !0),
1035
+ H(o.$slots, "tool", {}, void 0, !0)
1036
+ ], 2)),
1037
+ c("div", {
1038
+ class: "PageBody relative p0-30 z1",
1039
+ style: se(t(e))
1040
+ }, [
1041
+ H(o.$slots, "default", {}, void 0, !0)
1042
+ ], 4),
1043
+ c("div", rt, [
1044
+ c("span", it, I(t(s).copyright), 1),
1045
+ c("span", dt, I(t(s).campany), 1),
1046
+ c("span", ut, I(t(s).email), 1)
1047
+ ])
1048
+ ]);
1049
+ };
1050
+ }
1051
+ }), pt = /* @__PURE__ */ ae(ct, [["__scopeId", "data-v-5f809937"]]), mt = { class: "MvcTableHeaderTool" }, ft = { class: "ToolArea" }, gt = /* @__PURE__ */ Object.assign({
1052
+ name: "MvcTableHeaderTool",
1053
+ inheritAttrs: !1
1054
+ }, {
1055
+ __name: "Tool",
1056
+ props: {
1057
+ tableName: {
1058
+ type: String,
1059
+ default: ""
1060
+ },
1061
+ list: {
1062
+ type: Array,
1063
+ default: () => []
1064
+ },
1065
+ selection: {
1066
+ type: Array,
1067
+ default: () => []
1068
+ },
1069
+ loadData: {
1070
+ type: [Function, void 0],
1071
+ default: void 0
1072
+ },
1073
+ remote: {
1074
+ type: Boolean,
1075
+ default: !1
1076
+ },
1077
+ filter: {
1078
+ type: Object,
1079
+ default: /* @__PURE__ */ Object.create(null)
1080
+ },
1081
+ tool: {
1082
+ type: [Object, Boolean, void 0],
1083
+ default: /* @__PURE__ */ Object.create(null)
1084
+ },
1085
+ showTotalChosen: {
1086
+ type: Boolean,
1087
+ default: !1
1088
+ },
1089
+ total: {
1090
+ type: Number,
1091
+ default: 0
1092
+ },
1093
+ type: {
1094
+ type: String,
1095
+ default: ""
1096
+ }
1097
+ },
1098
+ setup(A, { emit: x }) {
1099
+ const s = defineAsyncComponent(() => Promise.resolve().then(() => _l)), e = defineAsyncComponent(() => Promise.resolve().then(() => jl)), o = A, h = reactive({
1100
+ drawer: [
1101
+ {
1102
+ title: window.$l("Table Column Customization"),
1103
+ size: 1024,
1104
+ cpt: markRaw(s)
1105
+ },
1106
+ {
1107
+ title: window.$l("Download from Current Table"),
1108
+ cpt: markRaw(e)
1109
+ }
1110
+ ],
1111
+ groupby: [],
1112
+ current: "",
1113
+ searchGroupBy: "",
1114
+ filterVisible: !1,
1115
+ filterTop: 0,
1116
+ loading: !1,
1117
+ dt: []
1118
+ }), { proxy: a } = getCurrentInstance(), y = x, k = (d) => {
1119
+ o.type === "drawer" || (d.target.localName === "span" ? window.$pageScrollTo(d.target.parentNode) : d.target.localName === "i" ? d.target.parentNode.localName === "button" ? window.$pageScrollTo(d.target.parentNode) : window.$pageScrollTo(d.target.parentNode.parentNode) : window.$pageScrollTo(d.target)), y("refresh");
1120
+ }, V = () => {
1121
+ h.drawer[0].params = { tableName: o.tableName }, h.current = 0;
1122
+ }, O = () => {
1123
+ h.drawer[1].params = {
1124
+ showTotalChosen: o.showTotalChosen,
1125
+ tableName: o.tableName,
1126
+ list: o.list,
1127
+ selection: o.selection,
1128
+ remote: o.remote
1129
+ }, h.current = 1;
1130
+ }, b = (d) => {
1131
+ d === "column" ? y("to-init-table") : d === "download" && y("to-download");
1132
+ }, f = async () => {
1133
+ if (o.loadData) {
1134
+ h.loading = !0;
1135
+ const d = await o.loadData({ pageStart: 1, pageSize: o.total });
1136
+ h.loading = !1, d && (h.dt = d, h.drawer[1].params.list = h.dt.list);
1137
+ }
1138
+ }, r = () => {
1139
+ h.drawer[1].params.list = o.list;
1140
+ }, C = computed(() => {
1141
+ var d;
1142
+ return ((d = o.tool) == null ? void 0 : d.download) === void 0;
1143
+ }), u = computed(() => {
1144
+ var d;
1145
+ return ((d = o.tool) == null ? void 0 : d.column) === void 0;
1146
+ }), m = computed(() => {
1147
+ var d;
1148
+ return ((d = o.tool) == null ? void 0 : d.refresh) === void 0;
1149
+ });
1150
+ computed(() => {
1151
+ const d = h.searchGroupBy.toLowerCase();
1152
+ return $.map((i) => (i.label.toLowerCase().includes(d) ? i.hide = !1 : i.hide = !0, i));
1153
+ });
1154
+ const $ = [
1155
+ {
1156
+ label: "Age",
1157
+ value: "Age",
1158
+ width: 100
1159
+ },
1160
+ {
1161
+ label: "Campaign Category",
1162
+ value: "CampaignCategory",
1163
+ width: 200
1164
+ },
1165
+ {
1166
+ label: "Campaign Type",
1167
+ value: "CampaignType",
1168
+ width: 200
1169
+ },
1170
+ {
1171
+ label: "Country",
1172
+ value: "Country",
1173
+ width: 120
1174
+ },
1175
+ {
1176
+ label: "Day",
1177
+ value: "Day",
1178
+ width: 100
1179
+ }
1180
+ ];
1181
+ return (d, i) => {
1182
+ const w = D("el-button"), g = D("Drawer");
1183
+ return p(), M("div", mt, [
1184
+ c("div", ft, [
1185
+ t(m) ? (p(), Y(w, {
1186
+ key: 0,
1187
+ plain: "",
1188
+ onClick: i[0] || (i[0] = (z) => k(z))
1189
+ }, {
1190
+ icon: _(() => i[2] || (i[2] = [
1191
+ c("i", { class: "imicon im-reset" }, null, -1)
1192
+ ])),
1193
+ default: _(() => [
1194
+ te(" " + I(d.$l("Refresh")), 1)
1195
+ ]),
1196
+ _: 1
1197
+ })) : B("", !0),
1198
+ t(u) ? (p(), Y(w, {
1199
+ key: 1,
1200
+ plain: "",
1201
+ onClick: V
1202
+ }, {
1203
+ icon: _(() => i[3] || (i[3] = [
1204
+ c("i", { class: "imicon im-columns1" }, null, -1)
1205
+ ])),
1206
+ default: _(() => [
1207
+ te(" " + I(d.$l("Columns")), 1)
1208
+ ]),
1209
+ _: 1
1210
+ })) : B("", !0),
1211
+ t(C) ? (p(), Y(w, {
1212
+ key: 2,
1213
+ plain: "",
1214
+ onClick: O
1215
+ }, {
1216
+ icon: _(() => i[4] || (i[4] = [
1217
+ c("i", { class: "imicon im-download1" }, null, -1)
1218
+ ])),
1219
+ default: _(() => [
1220
+ te(" " + I(d.$l("Download")), 1)
1221
+ ]),
1222
+ _: 1
1223
+ })) : B("", !0)
1224
+ ]),
1225
+ N(g, {
1226
+ current: t(h).current,
1227
+ "onUpdate:current": i[1] || (i[1] = (z) => t(h).current = z),
1228
+ drawer: t(h).drawer,
1229
+ loading: t(h).loading,
1230
+ dt: t(h).dt,
1231
+ onFetchAllData: f,
1232
+ onRecoverCurrentData: r,
1233
+ onSubmit: b
1234
+ }, null, 8, ["current", "drawer", "loading", "dt"])
1235
+ ]);
1236
+ };
1237
+ }
1238
+ }), yt = /* @__PURE__ */ ae(gt, [["__scopeId", "data-v-54e80741"]]), ht = { class: "HeaderArea" }, _t = {
1239
+ key: 0,
1240
+ class: "flexGrow xscroll nobar"
1241
+ }, bt = {
1242
+ key: 1,
1243
+ class: "titleArea"
1244
+ }, vt = { key: 2 }, wt = {
1245
+ key: 0,
1246
+ class: "filterRowArea"
1247
+ }, $t = /* @__PURE__ */ Object.assign({
1248
+ name: "MvcTableHeader",
1249
+ inheritAttrs: !1
1250
+ }, {
1251
+ __name: "Header",
1252
+ props: {
1253
+ title: {
1254
+ type: String,
1255
+ default: ""
1256
+ },
1257
+ tableName: {
1258
+ type: String,
1259
+ default: ""
1260
+ },
1261
+ noheader: {
1262
+ type: Boolean,
1263
+ default: !1
1264
+ },
1265
+ filterTagShow: {
1266
+ type: Boolean,
1267
+ default: !1
1268
+ },
1269
+ showTotalChosen: {
1270
+ type: Boolean,
1271
+ default: !1
1272
+ },
1273
+ total: {
1274
+ type: Number,
1275
+ default: 0
1276
+ }
1277
+ },
1278
+ setup(A, { emit: x }) {
1279
+ const s = A;
1280
+ return (e, o) => (p(), M("div", {
1281
+ class: "MvcTableHeader",
1282
+ style: se(s.filterTagShow ? "padding-bottom: 2px !important" : "")
1283
+ }, [
1284
+ c("div", ht, [
1285
+ e.$slots.default ? (p(), M("div", _t, [
1286
+ H(e.$slots, "default", {}, void 0, !0)
1287
+ ])) : s.title ? (p(), M("div", bt, I(s.title), 1)) : (p(), M("div", vt)),
1288
+ e.$attrs.tool !== !1 ? (p(), Y(yt, K({ key: 3 }, e.$attrs, {
1289
+ "table-name": s.tableName,
1290
+ total: s.total,
1291
+ "show-total-chosen": s.showTotalChosen
1292
+ }), null, 16, ["table-name", "total", "show-total-chosen"])) : B("", !0)
1293
+ ]),
1294
+ e.$slots.filterRow ? (p(), M("div", wt, [
1295
+ H(e.$slots, "filterRow", {}, void 0, !0)
1296
+ ])) : B("", !0)
1297
+ ], 4));
1298
+ }
1299
+ }), St = /* @__PURE__ */ ae($t, [["__scopeId", "data-v-3becf565"]]), Ct = we({
1300
+ name: "MvcTableColumnFilter",
1301
+ props: {
1302
+ tableName: {
1303
+ type: String,
1304
+ default: ""
1305
+ },
1306
+ group: {
1307
+ type: Object,
1308
+ default: /* @__PURE__ */ Object.create(null)
1309
+ }
1310
+ },
1311
+ setup: (A, x) => {
1312
+ var y;
1313
+ const s = $e({
1314
+ options: [],
1315
+ slots: []
1316
+ }), e = A.tableName + "_Column";
1317
+ let o = [];
1318
+ (() => {
1319
+ const k = x.slots.default()[0].children[0].children, V = {
1320
+ left: [],
1321
+ center: [],
1322
+ right: []
1323
+ }, O = A.tableName ? JSON.parse(localStorage.getItem(e)) : {}, b = [void 0];
1324
+ k.forEach((r) => {
1325
+ window.$getType(r.type) === "Symbol" ? o = o.concat(r.children) : o.push(r);
1326
+ }), o.forEach((r, C) => {
1327
+ var m;
1328
+ const u = window.$getType(r.type);
1329
+ if (((m = r.type) == null ? void 0 : m.name) === "ElTableColumn") {
1330
+ let $ = {
1331
+ ...r.props,
1332
+ labelKey: r.props.label,
1333
+ label: window.$l(r.props.label),
1334
+ sort: C,
1335
+ nomove: r.props.nomove || r.props.nomove === "" || r.props.label === "-" || r.props.type === "selection" || r.props.label === "Operation",
1336
+ resizable: !0,
1337
+ visible: r.props.visible !== !1
1338
+ };
1339
+ if (O != null && O.length && b.indexOf(r.props.prop) === -1) {
1340
+ const { data: d } = O.filter1(
1341
+ (i) => i.prop === r.props.prop
1342
+ );
1343
+ d && ($.sort = d.sort, $.fixed = d.fixed, $.visible = d.visible);
1344
+ }
1345
+ r.props.fixed ? V[r.props.fixed].push($) : V.center.push($), r.props = $;
1346
+ } else u === "Symbol" && r.children;
1347
+ }), s.columnInfo = V;
1348
+ const f = [
1349
+ ...V.left,
1350
+ ...V.center.sort((r, C) => r.sort - C.sort),
1351
+ ...V.right
1352
+ ];
1353
+ A.tableName && localStorage.setItem(e, JSON.stringify(f));
1354
+ })();
1355
+ let a = [];
1356
+ if (o.forEach((k) => {
1357
+ window.$getType(k) !== "String" && k.props.visible && a.push(k);
1358
+ }), (y = A.group) != null && y.label) {
1359
+ const k = {
1360
+ label: "Group By " + A.group.label,
1361
+ // prop: props.group.value,
1362
+ width: A.group.width,
1363
+ fixed: "left",
1364
+ visible: !0,
1365
+ resizable: !0
1366
+ };
1367
+ a[0].props.type === "selection" ? a.splice(1, 0, {
1368
+ ...a[1],
1369
+ props: k
1370
+ }) : a.unshift({
1371
+ ...a[0],
1372
+ props: k
1373
+ });
1374
+ }
1375
+ return a = a.sort((k, V) => k.props.sort - V.props.sort), () => a;
1376
+ }
1377
+ }), kt = { class: "MvcTableFooter" }, xt = { class: "FooterArea xscroll nobar" }, Vt = { class: "flexMode vc g8" }, Tt = {
1378
+ key: 1,
1379
+ class: "flexMode vc g4 fs14"
1380
+ }, Ot = { class: "txt-dark3" }, Mt = { class: "flexMode vc" }, At = { class: "txt-blue" }, Dt = {
1381
+ key: 2,
1382
+ class: "flexMode vc g4 fs14"
1383
+ }, It = { class: "txt-dark3" }, Nt = { class: "flexMode vc" }, zt = { class: "txt-blue" }, jt = { class: "txt-dark7" }, Bt = { class: "flexMode vc g4 fs14" }, Yt = { class: "txt-dark3" }, Et = { class: "txt-dark7" }, Lt = /* @__PURE__ */ Object.assign({
1384
+ name: "MvcTableFooter"
1385
+ }, {
1386
+ __name: "Footer",
1387
+ props: {
1388
+ pageNum: {
1389
+ type: Number,
1390
+ default: 1
1391
+ },
1392
+ pageSize: {
1393
+ type: Number,
1394
+ default: 50
1395
+ },
1396
+ pageCount: {
1397
+ type: Number,
1398
+ default: 0
1399
+ },
1400
+ pageSizes: {
1401
+ type: Array,
1402
+ default: () => [10, 20, 50, 100]
1403
+ },
1404
+ total: {
1405
+ type: Number,
1406
+ default: 0
1407
+ },
1408
+ filterTotal: {
1409
+ type: Number,
1410
+ default: 0
1411
+ },
1412
+ rows: {
1413
+ type: Number,
1414
+ default: 0
1415
+ },
1416
+ filterRows: {
1417
+ type: Number,
1418
+ default: 0
1419
+ },
1420
+ selectionLength: {
1421
+ type: Number,
1422
+ default: 0
1423
+ },
1424
+ remoteData: {
1425
+ type: [String, Number],
1426
+ default: ""
1427
+ },
1428
+ nosummary: {
1429
+ type: Boolean,
1430
+ default: !1
1431
+ },
1432
+ staticTotal: {
1433
+ type: Boolean,
1434
+ default: !1
1435
+ }
1436
+ },
1437
+ setup(A, { emit: x }) {
1438
+ const s = A, e = reactive({
1439
+ summaryMode: 1
1440
+ }), o = x, h = (r) => {
1441
+ o("size-change", r);
1442
+ }, a = (r) => {
1443
+ o("page-change", r);
1444
+ }, y = (r) => {
1445
+ o("summary-mode-change", r);
1446
+ }, k = computed(() => s.staticTotal ? !1 : s.filterTotal !== s.total), V = computed(() => Number(s.pageCount) || 7), O = computed(() => window.$getType(s.remoteData) === "String"), b = computed(() => O.value ? "slot, ->, prev, pager, next, sizes" : "slot, ->"), f = [
1447
+ {
1448
+ label: window.$l("Current Page"),
1449
+ value: 0
1450
+ },
1451
+ {
1452
+ label: window.$l("All Page"),
1453
+ value: 1
1454
+ }
1455
+ ];
1456
+ return (r, C) => {
1457
+ const u = D("el-option"), m = D("el-select"), $ = D("el-pagination");
1458
+ return p(), M("div", kt, [
1459
+ c("div", xt, [
1460
+ N($, {
1461
+ ref: "pagination",
1462
+ background: "",
1463
+ layout: t(b),
1464
+ total: s.total,
1465
+ "current-page": s.pageNum,
1466
+ "onUpdate:currentPage": C[1] || (C[1] = (d) => s.pageNum = d),
1467
+ "page-size": s.pageSize,
1468
+ "page-sizes": s.pageSizes,
1469
+ "pager-count": t(V),
1470
+ onSizeChange: h,
1471
+ onCurrentChange: a,
1472
+ class: "wp100"
1473
+ }, {
1474
+ default: _(() => [
1475
+ c("div", Vt, [
1476
+ s.nosummary ? B("", !0) : (p(), Y(m, {
1477
+ key: 0,
1478
+ modelValue: t(e).summaryMode,
1479
+ "onUpdate:modelValue": C[0] || (C[0] = (d) => t(e).summaryMode = d),
1480
+ placeholder: " ",
1481
+ class: "w160-i",
1482
+ size: "default",
1483
+ onChange: y
1484
+ }, {
1485
+ prefix: _(() => [
1486
+ te(I(r.$l("Sum")), 1)
1487
+ ]),
1488
+ default: _(() => [
1489
+ (p(), M(oe, null, le(f, (d, i) => N(u, {
1490
+ key: i,
1491
+ label: d.label,
1492
+ value: d.value
1493
+ }, null, 8, ["label", "value"])), 64))
1494
+ ]),
1495
+ _: 1
1496
+ }, 8, ["modelValue"])),
1497
+ s.selectionLength ? (p(), M("div", Tt, [
1498
+ c("div", Ot, I(r.$l("Selected")), 1),
1499
+ c("div", Mt, [
1500
+ c("span", At, I(s.selectionLength), 1)
1501
+ ])
1502
+ ])) : B("", !0),
1503
+ t(k) ? (p(), M("div", Dt, [
1504
+ c("div", It, I(r.$l("Current")), 1),
1505
+ c("div", Nt, [
1506
+ c("span", zt, I(r.$fa(s.filterTotal, 0)), 1),
1507
+ C[2] || (C[2] = c("span", { class: "p0-2 txt-dark3" }, "/", -1)),
1508
+ c("span", jt, I(r.$fa(s.rows, 0)), 1)
1509
+ ])
1510
+ ])) : B("", !0),
1511
+ c("div", Bt, [
1512
+ c("div", Yt, I(r.$l("Total")), 1),
1513
+ c("div", Et, I(r.$fa(s.total, 0)), 1)
1514
+ ])
1515
+ ])
1516
+ ]),
1517
+ _: 1
1518
+ }, 8, ["layout", "total", "current-page", "page-size", "page-sizes", "pager-count"])
1519
+ ])
1520
+ ]);
1521
+ };
1522
+ }
1523
+ }), Rt = /* @__PURE__ */ ae(Lt, [["__scopeId", "data-v-3c31d004"]]), Pt = ["id"], Ft = /* @__PURE__ */ Object.assign({
1524
+ name: "MvcTableGroupMain",
1525
+ inheritAttrs: !1
1526
+ }, {
1527
+ __name: "Group",
1528
+ props: {
1529
+ loading: {
1530
+ type: Boolean,
1531
+ default: !1
1532
+ },
1533
+ total: {
1534
+ type: Number,
1535
+ default: 0
1536
+ },
1537
+ tableName: {
1538
+ type: String,
1539
+ default: ""
1540
+ },
1541
+ channel: {
1542
+ type: String,
1543
+ default: ""
1544
+ },
1545
+ cellClassName: {
1546
+ type: [Function, String],
1547
+ default: void 0
1548
+ },
1549
+ loadData: {
1550
+ type: [Function, void 0],
1551
+ default: void 0
1552
+ },
1553
+ list: {
1554
+ type: [Array, void 0],
1555
+ default: void 0
1556
+ },
1557
+ height: {
1558
+ type: [String, Number],
1559
+ default: 0
1560
+ },
1561
+ minusHeight: {
1562
+ type: [String, Number],
1563
+ default: 0
1564
+ },
1565
+ noheader: {
1566
+ type: Boolean,
1567
+ default: !1
1568
+ },
1569
+ nofooter: {
1570
+ type: Boolean,
1571
+ default: !1
1572
+ },
1573
+ noscrolltop: {
1574
+ type: Boolean,
1575
+ default: !1
1576
+ },
1577
+ immediate: {
1578
+ type: Boolean,
1579
+ default: !0
1580
+ },
1581
+ pageSize: {
1582
+ type: Number,
1583
+ default: 0
1584
+ },
1585
+ filter: {
1586
+ type: Object,
1587
+ default: /* @__PURE__ */ Object.create(null)
1588
+ },
1589
+ defaultSort: {
1590
+ type: Object,
1591
+ default: /* @__PURE__ */ Object.create(null)
1592
+ },
1593
+ rowKey: {
1594
+ type: [String, void 0],
1595
+ default: void 0
1596
+ },
1597
+ showSummary: {
1598
+ type: Boolean,
1599
+ default: !1
1600
+ },
1601
+ summaryMethod: {
1602
+ type: Function,
1603
+ default: void 0
1604
+ },
1605
+ groupInfo: {
1606
+ type: Object,
1607
+ default: /* @__PURE__ */ Object.create(null)
1608
+ }
1609
+ },
1610
+ setup(A, { expose: x, emit: s }) {
1611
+ const e = A, o = reactive({
1612
+ loading: !0,
1613
+ tableKey: 0,
1614
+ pageStart: 1,
1615
+ pageSize: 50,
1616
+ search: {},
1617
+ dt: {},
1618
+ filter: {},
1619
+ selection: [],
1620
+ scrollTop: 0,
1621
+ scrollAni: !1,
1622
+ summaryMode: 1,
1623
+ tableId: "",
1624
+ sizeChanged: !1
1625
+ }), { proxy: h } = getCurrentInstance();
1626
+ inject("store").table();
1627
+ const y = ref();
1628
+ Se(() => {
1629
+ o.tableId = `Table${+/* @__PURE__ */ new Date()}_${window.$rn(9999)}`;
1630
+ });
1631
+ const k = s, V = async (j = {}) => {
1632
+ const { refresh: F, remote: E } = j;
1633
+ U.value && F || (j ? (o.pageStart = j.pageStart || 1, j.pageSize && (o.pageSize = j.pageSize), delete j.pageStart, delete j.pageSize, delete j.refresh, delete j.remote, o.search = j) : o.pageStart = 1, await b({ remote: E }));
1634
+ }, O = (j) => {
1635
+ j || o.tableKey++;
1636
+ }, b = async (j = {}, F) => {
1637
+ var q;
1638
+ const { remote: E } = j;
1639
+ if (e.loadData !== void 0) {
1640
+ o.loading = !0;
1641
+ let Q;
1642
+ e.pageSize && o.sizeChanged === !1 ? Q = e.pageSize : Q = o.pageSize;
1643
+ const X = {
1644
+ pageStart: o.pageStart,
1645
+ pageSize: Q,
1646
+ ...o.search
1647
+ };
1648
+ o.pageSize = X.pageSize, o.pageStart = X.pageStart, (q = e.groupInfo) != null && q.value && (X.groupBy = e.groupInfo.value), E && (X.remote = !0);
1649
+ const re = await e.loadData(X);
1650
+ o.loading = !1, re ? (o.dt = re, o.filter = JSON.parse(JSON.stringify(re)), k("update:total", o.dt.total)) : (o.dt = {
1651
+ total: 0,
1652
+ list: []
1653
+ }, o.filter = {
1654
+ total: 0,
1655
+ list: []
1656
+ }), W.value ? C() : k("list-change", re.list || []);
1657
+ }
1658
+ S();
1659
+ }, f = (j) => {
1660
+ o.summaryMode = j;
1661
+ }, r = ({ columns: j, data: F }) => Ve({ columns: j, data: F, currency: window.currency }), C = (j = {}) => {
1662
+ let { v: F = e.filter } = j;
1663
+ F || (F = j);
1664
+ const E = Object.keys(F), q = [];
1665
+ return E.forEach((Q) => {
1666
+ const X = F[Q];
1667
+ X && X.length && q.push(Q);
1668
+ }), q.length ? u(q, F) : (o.dt.list = [...o.filter.list], o.filter.total = o.dt.total, k("list-change", o.dt.list), o.filter.list);
1669
+ }, u = (j, F) => {
1670
+ const E = [];
1671
+ return o.filter.list.forEach((q) => {
1672
+ let Q = !1;
1673
+ j.forEach((X) => {
1674
+ const re = String(q[X]).toLowerCase();
1675
+ let ue = F[X];
1676
+ if (window.$getType(ue) === "Array")
1677
+ try {
1678
+ ue.forEach((ce) => {
1679
+ if (ce && re.includes(String(ce).toLowerCase()))
1680
+ throw Q = !0, new Error();
1681
+ });
1682
+ } catch {
1683
+ }
1684
+ else re.includes(ue.toLowerCase()) && (Q = !0);
1685
+ }), Q && E.push(q);
1686
+ }), o.dt.list = E, o.filter.total = E.length, k("list-change", E), E;
1687
+ }, m = () => {
1688
+ o.dt = {
1689
+ list: e.list,
1690
+ total: e.list.length
1691
+ }, o.filter = JSON.parse(JSON.stringify(o.dt)), k("list-change", e.list);
1692
+ }, $ = ({ row: j = {}, id: F }) => {
1693
+ F === void 0 ? o.dt.list.unshift(j) : o.dt.list = o.dt.list.map((E) => E.id === F ? {
1694
+ ...E,
1695
+ ...j
1696
+ } : E);
1697
+ }, d = (j, F) => {
1698
+ o.dt.list = o.dt.list.filter((E) => E[j] !== F), o.filter.list = o.filter.list.filter((E) => E[j] !== F);
1699
+ }, i = (j) => {
1700
+ y.value.toggleRowExpansion(j);
1701
+ }, w = (j, F) => {
1702
+ y.value.toggleRowSelection(j, F);
1703
+ }, g = (j) => {
1704
+ o.selection = j, k("selection-change", j);
1705
+ }, z = (j) => {
1706
+ k("sort-change", j);
1707
+ }, T = (j) => {
1708
+ o.pageSize = j, o.sizeChanged = !0, b();
1709
+ }, l = (j) => {
1710
+ o.pageStart = j, b();
1711
+ }, n = (j, F, E) => {
1712
+ let q = localStorage.getItem(J.value);
1713
+ if (q) {
1714
+ q = JSON.parse(q);
1715
+ const { data: Q } = q.filter1((X) => X.prop === E.property);
1716
+ Q && (Q.width = E.width, localStorage.setItem(J.value, JSON.stringify(q)));
1717
+ }
1718
+ }, S = () => {
1719
+ y.value && y.value.setScrollTop(0);
1720
+ }, L = () => {
1721
+ o.loading = !1;
1722
+ }, R = (j) => {
1723
+ o.dt.list.unshift(j);
1724
+ }, U = computed(() => e.loading || o.loading), Z = computed(() => {
1725
+ const {
1726
+ options: { tableHeight: j },
1727
+ page: F
1728
+ } = window.global.config;
1729
+ let E = e.height || j;
1730
+ return e.nofooter && (E = E + F.footer), e.noheader && (E = E + F.header), e.minusHeight && (E = E - Number(e.minusHeight)), E < 200 && (E = 200), E;
1731
+ }), W = computed(() => 0), P = computed(() => e.list === void 0 ? String(+/* @__PURE__ */ new Date()) : +/* @__PURE__ */ new Date()), ne = computed(() => window.$getType(P.value) === "String"), J = computed(() => e.tableName + "_Column"), ge = computed(() => o.summaryMode === 0 ? r : e.summaryMethod);
1732
+ watch(
1733
+ () => P.value,
1734
+ (j) => {
1735
+ if (j) {
1736
+ const F = window.$getType(j);
1737
+ F === "String" ? e.immediate && b() : F === "Number" && (o.loading = !1, m());
1738
+ }
1739
+ },
1740
+ {
1741
+ immediate: !0
1742
+ }
1743
+ ), x({
1744
+ toFilter: C,
1745
+ initTable: V,
1746
+ editRow: $,
1747
+ removeRow: d,
1748
+ refreshTable: O,
1749
+ toggleRowExpansion: i,
1750
+ toggleRowSelection: w,
1751
+ toStop: L,
1752
+ toAdd: R
1753
+ });
1754
+ const de = {
1755
+ "popper-class": "maxw300"
1756
+ };
1757
+ return (j, F) => {
1758
+ var Q, X;
1759
+ const E = D("Loading"), q = D("el-table");
1760
+ return p(), M("div", {
1761
+ class: G(["MvcTableGroupMain", t(ne) && "PagiTable"]),
1762
+ id: t(o).tableId
1763
+ }, [
1764
+ N(E, {
1765
+ loading: t(U),
1766
+ class: "loadingRect"
1767
+ }, null, 8, ["loading"]),
1768
+ (p(), Y(q, {
1769
+ ref_key: "table",
1770
+ ref: y,
1771
+ key: t(o).tableKey,
1772
+ data: t(o).dt.list,
1773
+ "row-key": e.rowKey,
1774
+ height: t(Z),
1775
+ stripe: "",
1776
+ border: "",
1777
+ "default-sort": A.defaultSort,
1778
+ "show-summary": e.showSummary,
1779
+ "summary-method": t(ge),
1780
+ "tooltip-options": de,
1781
+ "cell-class-name": e.cellClassName,
1782
+ onHeaderDragend: n,
1783
+ onSelectionChange: g,
1784
+ onSortChange: z,
1785
+ onToggleRowSelection: w
1786
+ }, {
1787
+ default: _(() => [
1788
+ N(t(Ct), {
1789
+ "table-name": e.tableName,
1790
+ group: e.groupInfo
1791
+ }, {
1792
+ default: _(() => [
1793
+ H(j.$slots, "default", {}, void 0, !0)
1794
+ ]),
1795
+ _: 3
1796
+ }, 8, ["table-name", "group"])
1797
+ ]),
1798
+ _: 3
1799
+ }, 8, ["data", "row-key", "height", "default-sort", "show-summary", "summary-method", "cell-class-name"])),
1800
+ e.nofooter ? B("", !0) : (p(), Y(Rt, K({
1801
+ key: 0,
1802
+ ref: "footer"
1803
+ }, j.$attrs, {
1804
+ nosummary: !e.showSummary,
1805
+ "page-num": t(o).pageStart,
1806
+ "page-size": t(o).pageSize,
1807
+ rows: (Q = t(o).filter.list) == null ? void 0 : Q.length,
1808
+ "filter-rows": (X = t(o).dt.list) == null ? void 0 : X.length,
1809
+ total: e.total || t(o).dt.total,
1810
+ "filter-total": t(o).filter.total,
1811
+ "selection-length": t(o).selection.length,
1812
+ "remote-data": t(P),
1813
+ "static-total": !!e.total,
1814
+ onSizeChange: T,
1815
+ onPageChange: l,
1816
+ onSummaryModeChange: f
1817
+ }), null, 16, ["nosummary", "page-num", "page-size", "rows", "filter-rows", "total", "filter-total", "selection-length", "remote-data", "static-total"]))
1818
+ ], 10, Pt);
1819
+ };
1820
+ }
1821
+ }), Ut = /* @__PURE__ */ ae(Ft, [["__scopeId", "data-v-9dba2804"]]), Gt = /* @__PURE__ */ Object.assign({
1822
+ name: "Table",
1823
+ inheritAttrs: !1
1824
+ }, {
1825
+ __name: "index",
1826
+ props: {
1827
+ showTotalChosen: {
1828
+ type: Boolean,
1829
+ default: !1
1830
+ },
1831
+ noheader: {
1832
+ type: Boolean,
1833
+ default: !1
1834
+ },
1835
+ tableClass: {
1836
+ type: String,
1837
+ default: ""
1838
+ },
1839
+ customRefresh: {
1840
+ type: Boolean,
1841
+ default: !1
1842
+ },
1843
+ remote: {
1844
+ type: Boolean,
1845
+ default: !0
1846
+ },
1847
+ filterTagShow: {
1848
+ type: Boolean,
1849
+ default: !1
1850
+ }
1851
+ },
1852
+ setup(A, { expose: x, emit: s }) {
1853
+ const e = s, o = A, h = reactive({
1854
+ columnInfo: {},
1855
+ selection: [],
1856
+ list: [],
1857
+ total: 0,
1858
+ groupInfo: {}
1859
+ }), a = ref();
1860
+ ref();
1861
+ const y = ref(), { proxy: k } = getCurrentInstance(), V = (l) => {
1862
+ y.value.toFilter(l);
1863
+ }, O = (l) => {
1864
+ y.value.initTable(l);
1865
+ }, b = (l) => {
1866
+ y.value.editRow(l);
1867
+ }, f = () => {
1868
+ y.value.refreshTable();
1869
+ }, r = (l) => {
1870
+ h.list = l;
1871
+ }, C = (l) => {
1872
+ h.selection = l;
1873
+ }, u = (l) => {
1874
+ y.value.toggleRowExpansion(l);
1875
+ }, m = (l, n) => {
1876
+ y.value.toggleRowSelection(l, n);
1877
+ }, $ = () => {
1878
+ k.$attrs.list || y.value.initTable({ refresh: !0, remote: o.remote }), o.customRefresh && e("customRefreshFunc");
1879
+ }, d = (l) => {
1880
+ h.groupInfo = l, nextTick(() => {
1881
+ y.value.initTable();
1882
+ });
1883
+ }, i = () => {
1884
+ y.value.$refs.table.clearSelection();
1885
+ }, w = () => {
1886
+ y.value.toStop();
1887
+ }, g = (l) => {
1888
+ y.value.toAdd(l);
1889
+ }, z = (l, n) => {
1890
+ y.value.removeRow(l, n);
1891
+ }, T = computed(() => k.$attrs["table-name"]);
1892
+ return computed(() => `${T.value}_Column`), x({
1893
+ initTable: O,
1894
+ editRow: b,
1895
+ removeRow: z,
1896
+ toFilter: V,
1897
+ toggleRowExpansion: u,
1898
+ toggleRowSelection: m,
1899
+ toInitTable: f,
1900
+ clearSelection: i,
1901
+ toStop: w,
1902
+ toAdd: g
1903
+ }), (l, n) => (p(), M("div", {
1904
+ class: G(["Table", o.tableClass])
1905
+ }, [
1906
+ o.noheader ? B("", !0) : (p(), Y(St, K({
1907
+ key: 0,
1908
+ ref_key: "header",
1909
+ ref: a
1910
+ }, l.$attrs, {
1911
+ filterTagShow: o.filterTagShow,
1912
+ list: t(h).list,
1913
+ selection: t(h).selection,
1914
+ total: t(h).total,
1915
+ showTotalChosen: o.showTotalChosen,
1916
+ onToInitTable: f,
1917
+ onGroupChange: d,
1918
+ onRefresh: $
1919
+ }), ee({
1920
+ default: _(() => [
1921
+ l.$slots.actions ? H(l.$slots, "actions", { key: 0 }, void 0, !0) : B("", !0)
1922
+ ]),
1923
+ _: 2
1924
+ }, [
1925
+ l.$slots.filterRow ? {
1926
+ name: "filterRow",
1927
+ fn: _(() => [
1928
+ H(l.$slots, "filterRow", {}, void 0, !0)
1929
+ ]),
1930
+ key: "0"
1931
+ } : void 0
1932
+ ]), 1040, ["filterTagShow", "list", "selection", "total", "showTotalChosen"])),
1933
+ N(Ut, K({
1934
+ ref_key: "main",
1935
+ ref: y
1936
+ }, l.$attrs, {
1937
+ "group-info": t(h).groupInfo,
1938
+ total: t(h).total,
1939
+ "onUpdate:total": n[0] || (n[0] = (S) => t(h).total = S),
1940
+ onSelectionChange: C,
1941
+ onListChange: r
1942
+ }), {
1943
+ default: _(() => [
1944
+ H(l.$slots, "default", {}, void 0, !0)
1945
+ ]),
1946
+ _: 3
1947
+ }, 16, ["group-info", "total"])
1948
+ ], 2));
1949
+ }
1950
+ }), Ht = /* @__PURE__ */ ae(Gt, [["__scopeId", "data-v-869ef365"]]), Jt = { class: "SuperTextarea relative" }, Kt = {
1951
+ key: 0,
1952
+ class: "absFull flexMode hc vc z9"
1953
+ }, Wt = /* @__PURE__ */ Object.assign({
1954
+ name: "SuperTextarea"
1955
+ }, {
1956
+ __name: "index",
1957
+ props: {
1958
+ modelValue: {
1959
+ type: [String, Array],
1960
+ default: ""
1961
+ },
1962
+ rows: {
1963
+ type: [Number, String],
1964
+ default: 8
1965
+ },
1966
+ max: {
1967
+ type: [String, Number],
1968
+ default: 10
1969
+ },
1970
+ placeholder: {
1971
+ type: String,
1972
+ default: ""
1973
+ },
1974
+ focus: {
1975
+ type: Boolean,
1976
+ default: !1
1977
+ },
1978
+ loading: {
1979
+ type: Boolean,
1980
+ default: !1
1981
+ },
1982
+ disabled: {
1983
+ type: Boolean,
1984
+ default: !1
1985
+ },
1986
+ sep: {
1987
+ type: String,
1988
+ default: `
1989
+ `
1990
+ },
1991
+ resize: {
1992
+ type: String,
1993
+ default: "none"
1994
+ }
1995
+ },
1996
+ emits: ["total", "update:modelValue", "blur"],
1997
+ setup(A, { expose: x, emit: s }) {
1998
+ const e = A, o = reactive({ v: "", total: 0, mounted: !1 }), { proxy: h } = getCurrentInstance();
1999
+ onMounted(() => {
2000
+ e.focus && y(v);
2001
+ });
2002
+ const a = s, y = ($) => {
2003
+ nextTick(() => {
2004
+ h.$refs.input.focus(), $ && h.$refs.input.select();
2005
+ });
2006
+ }, k = ($) => {
2007
+ let d = 0, i = [];
2008
+ const w = [];
2009
+ if ($) {
2010
+ if (i = $.split(`
2011
+ `), i.forEach((g) => {
2012
+ g.trim() && (d++, w.push(g));
2013
+ }), !b.value) {
2014
+ o.v = r.value ? [] : "";
2015
+ return;
2016
+ }
2017
+ b.value > -1 && d > b.value && (i = w.slice(0, b.value), o.v = i.join(e.sep), d = b.value), a("update:modelValue", r.value ? i : o.v);
2018
+ } else
2019
+ a("update:modelValue", r.value ? [] : "");
2020
+ o.total = d, a("total", d);
2021
+ }, V = () => {
2022
+ o.v = "", o.total = 0, a("update:modelValue", ""), a("change", ""), y();
2023
+ }, O = () => {
2024
+ a("blur");
2025
+ }, b = computed(() => Number(e.max) || 0), f = computed(() => o.total === b.value ? "txt-red" : "txt-blue"), r = computed(() => window.$getType(e.modelValue) === "Array"), C = computed(() => window.$l("One per Line")), u = computed(() => e.placeholder ? `${window.$l(e.placeholder)}
2026
+ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.sep) : e.modelValue);
2027
+ return watchPostEffect(() => {
2028
+ m.value && b.value ? m.value !== o.v && (o.v = m.value, k(m.value)) : (o.v = "", o.total = 0);
2029
+ }), x({
2030
+ toFocus: y
2031
+ }), ($, d) => {
2032
+ const i = D("el-input");
2033
+ return p(), M("div", Jt, [
2034
+ e.loading ? (p(), M("div", Kt, d[1] || (d[1] = [
2035
+ c("i", { class: "imicon im-loading ani-rotate" }, null, -1)
2036
+ ]))) : B("", !0),
2037
+ N(i, {
2038
+ ref: "input",
2039
+ modelValue: t(o).v,
2040
+ "onUpdate:modelValue": d[0] || (d[0] = (w) => t(o).v = w),
2041
+ rows: e.rows,
2042
+ resize: e.resize,
2043
+ type: "textarea",
2044
+ placeholder: $.$l(t(u)),
2045
+ class: G(["fullTextArea", $.$slots.prefix && "prefix"]),
2046
+ disabled: e.loading || e.disabled,
2047
+ onInput: k,
2048
+ onBlur: O
2049
+ }, null, 8, ["modelValue", "rows", "resize", "placeholder", "class", "disabled"]),
2050
+ t(b) > -1 ? (p(), M("div", {
2051
+ key: 1,
2052
+ class: G(["countArea abs fs12 txt-blue", e.rows > 1 && "lh20"])
2053
+ }, [
2054
+ c("span", {
2055
+ class: G(t(f))
2056
+ }, I(t(o).total), 3),
2057
+ d[2] || (d[2] = c("span", null, " / ", -1)),
2058
+ c("span", null, I(t(b)), 1)
2059
+ ], 2)) : B("", !0),
2060
+ c("div", {
2061
+ class: G(["clearArea abs txt-dark3 hover-txt-red5", [t(o).v && "content"]]),
2062
+ onClick: V
2063
+ }, d[3] || (d[3] = [
2064
+ c("i", { class: "imicon im-close-circle" }, null, -1)
2065
+ ]), 2),
2066
+ $.$slots.prefix ? (p(), M("div", {
2067
+ key: 2,
2068
+ class: "prefix abs l t",
2069
+ style: { padding: "6px 11px" },
2070
+ onClick: ie((w) => null, ["stop"])
2071
+ }, [
2072
+ H($.$slots, "prefix", {}, void 0, !0)
2073
+ ])) : B("", !0)
2074
+ ]);
2075
+ };
2076
+ }
2077
+ }), qt = /* @__PURE__ */ ae(Wt, [["__scopeId", "data-v-197f3839"]]), Zt = { class: "SuperAiApp relative" }, Qt = { class: "flexMode vc g8" }, Xt = { class: "txt-nowrap" }, eo = { class: "txt-dark5" }, to = /* @__PURE__ */ Object.assign({
2078
+ name: "SuperAiApp"
2079
+ }, {
2080
+ __name: "index",
2081
+ props: {
2082
+ modelValue: {
2083
+ type: Number,
2084
+ default: null
2085
+ },
2086
+ multiple: {
2087
+ type: Boolean,
2088
+ default: !1
2089
+ },
2090
+ placeholder: {
2091
+ type: String,
2092
+ default: ""
2093
+ },
2094
+ useDefault: {
2095
+ type: Boolean,
2096
+ default: !1
2097
+ }
2098
+ },
2099
+ emits: [
2100
+ "success",
2101
+ "update:icon",
2102
+ "update:orgs",
2103
+ "update:name"
2104
+ ],
2105
+ setup(A, { emit: x }) {
2106
+ const s = A, e = reactive({
2107
+ loading: !1,
2108
+ single: "",
2109
+ multiple: [],
2110
+ options: []
2111
+ }), h = inject("store").ai();
2112
+ onMounted(() => {
2113
+ y();
2114
+ });
2115
+ const a = x, y = async () => {
2116
+ if (V.value.length) {
2117
+ a("success");
2118
+ return;
2119
+ }
2120
+ e.loading = !0, await h.getAppOptions(), e.loading = !1, a("success");
2121
+ }, k = (f) => {
2122
+ a("update:modelValue", f);
2123
+ const { data: r } = h.appOptions.filter1((C) => C.id === e.single);
2124
+ r && (a("update:name", r.name), a("update:icon", r.icon), a("update:orgs", r.orgs));
2125
+ }, V = computed(() => h.appOptions), O = computed(() => s.placeholder ? window.$l(s.placeholder) : window.$l("App")), b = computed(() => V.value.filter1((r) => r.id === e.single).data);
2126
+ return watch(
2127
+ () => s.modelValue,
2128
+ (f) => {
2129
+ f && f !== e.v && (e.single = f, k(f));
2130
+ },
2131
+ {
2132
+ immediate: !0
2133
+ }
2134
+ ), watch(
2135
+ () => V.value,
2136
+ (f) => {
2137
+ s.useDefault && (f == null ? void 0 : f.length) === 1 && (e.single = f[0].id, k(f[0].id));
2138
+ },
2139
+ {
2140
+ immediate: !0
2141
+ }
2142
+ ), (f, r) => {
2143
+ const C = D("IconLoading"), u = D("Image"), m = D("el-option"), $ = D("el-select");
2144
+ return p(), M("div", Zt, [
2145
+ t(e).loading ? (p(), Y(C, { key: 0 })) : B("", !0),
2146
+ N($, K({
2147
+ modelValue: t(e).single,
2148
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => t(e).single = d),
2149
+ placeholder: t(O),
2150
+ filterable: "",
2151
+ clearable: "",
2152
+ "default-first-option": "",
2153
+ "fit-input-width": ""
2154
+ }, f.$attrs, { onChange: k }), ee({
2155
+ default: _(() => [
2156
+ (p(!0), M(oe, null, le(t(V), (d, i) => (p(), Y(m, {
2157
+ key: i,
2158
+ label: d.label,
2159
+ value: d.id
2160
+ }, {
2161
+ default: _(() => [
2162
+ c("div", Qt, [
2163
+ N(u, {
2164
+ src: d.icon,
2165
+ class: "noShrink w24 h24 radius radius4 border-dark1"
2166
+ }, null, 8, ["src"]),
2167
+ c("span", Xt, I(d.name), 1),
2168
+ c("span", eo, "(" + I(d.id) + ")", 1)
2169
+ ])
2170
+ ]),
2171
+ _: 2
2172
+ }, 1032, ["label", "value"]))), 128))
2173
+ ]),
2174
+ _: 2
2175
+ }, [
2176
+ t(b) ? {
2177
+ name: "prefix",
2178
+ fn: _(() => [
2179
+ N(u, {
2180
+ src: t(b).icon,
2181
+ class: "noShrink w24 h24 radius radius4 border-dark1"
2182
+ }, null, 8, ["src"])
2183
+ ]),
2184
+ key: "0"
2185
+ } : void 0
2186
+ ]), 1040, ["modelValue", "placeholder"])
2187
+ ]);
2188
+ };
2189
+ }
2190
+ }), oo = { class: "SuperAsaOrg relative" }, lo = { class: "inputGroup" }, ao = { class: "inputGroupLeft noShrink" }, no = { class: "flexMode vc g4" }, so = { class: "txt-dark5" }, ro = /* @__PURE__ */ Object.assign({
2191
+ name: "SuperAsaOrg"
2192
+ }, {
2193
+ __name: "index",
2194
+ props: {
2195
+ app: {
2196
+ type: Number,
2197
+ default: 0
2198
+ },
2199
+ changeImmediately: {
2200
+ type: Boolean,
2201
+ default: !1
2202
+ },
2203
+ modelValue: {
2204
+ type: [Number, String],
2205
+ default: 0
2206
+ },
2207
+ readonly: {
2208
+ type: Boolean,
2209
+ default: !1
2210
+ },
2211
+ unTimezone: {
2212
+ type: Boolean,
2213
+ default: !1
2214
+ }
2215
+ },
2216
+ emits: [
2217
+ "update:modelValue",
2218
+ "update:name",
2219
+ "update:currency",
2220
+ "update:readonly",
2221
+ "success",
2222
+ "error",
2223
+ "change"
2224
+ ],
2225
+ setup(A, { emit: x }) {
2226
+ const s = A, e = reactive({
2227
+ loading: !1,
2228
+ single: "",
2229
+ multiple: [],
2230
+ options: []
2231
+ }), h = inject("store").ai();
2232
+ onMounted(() => {
2233
+ y();
2234
+ });
2235
+ const a = x, y = async () => {
2236
+ f.value.length ? (e.single || k(f.value[0].id), a("success")) : a("error");
2237
+ }, k = (u) => {
2238
+ var m, $, d, i;
2239
+ a("update:modelValue", u), a("update:name", (m = r.value) == null ? void 0 : m.name), a("update:currency", ($ = r.value) == null ? void 0 : $.currency), a("update:timezone", (d = r.value) == null ? void 0 : d.timezone), a("update:readonly", (i = r.value) == null ? void 0 : i.readonly), s.changeImmediately && a("change", u), s.unTimezone || V();
2240
+ }, V = () => {
2241
+ var m;
2242
+ let u = r.value;
2243
+ h.saveData("accountTimezone", {
2244
+ timezoneName: u == null ? void 0 : u.timezone,
2245
+ tip: "Account",
2246
+ timezone: (m = window.$map.common.timezone.filter1(
2247
+ ($) => $.label === (u == null ? void 0 : u.timezone)
2248
+ ).data) == null ? void 0 : m.value
2249
+ });
2250
+ }, O = () => {
2251
+ e.single = "", a("update:modelValue", ""), a("update:name", ""), a("update:currency", ""), a("update:timezone", ""), a("update:readonly", !1);
2252
+ }, b = computed(() => window.$l("Campaign Group")), f = computed(() => {
2253
+ var u;
2254
+ return s.app ? ((u = h.appOptions.filter1((m) => m.id === s.app).data) == null ? void 0 : u.orgs) || [] : [];
2255
+ }), r = computed(() => f.value.filter1((u) => u.id === e.single).data), C = computed(() => !s.app);
2256
+ return watch(
2257
+ () => s.modelValue,
2258
+ (u) => {
2259
+ u ? u !== e.single && (e.single = u, k(u)) : O();
2260
+ },
2261
+ {
2262
+ immediate: !0
2263
+ }
2264
+ ), (u, m) => {
2265
+ const $ = D("IconLoading"), d = D("el-button"), i = D("el-option"), w = D("el-select");
2266
+ return p(), M("div", oo, [
2267
+ t(e).loading ? (p(), Y($, { key: 0 })) : B("", !0),
2268
+ c("div", lo, [
2269
+ c("div", ao, [
2270
+ N(d, {
2271
+ circle: "",
2272
+ onClick: m[0] || (m[0] = (g) => u.$copy(t(e).single, "ID"))
2273
+ }, {
2274
+ icon: _(() => m[2] || (m[2] = [
2275
+ c("i", { class: "imicon im-copy" }, null, -1)
2276
+ ])),
2277
+ _: 1
2278
+ })
2279
+ ]),
2280
+ N(w, K({
2281
+ modelValue: t(e).single,
2282
+ "onUpdate:modelValue": m[1] || (m[1] = (g) => t(e).single = g),
2283
+ placeholder: t(b),
2284
+ disabled: t(C),
2285
+ filterable: ""
2286
+ }, u.$attrs, {
2287
+ class: "inputGroupRight",
2288
+ onChange: k
2289
+ }), {
2290
+ default: _(() => [
2291
+ (p(!0), M(oe, null, le(t(f), (g, z) => (p(), Y(i, {
2292
+ key: z,
2293
+ label: `${g.name} (${g.id})`,
2294
+ value: g.id,
2295
+ disabled: s.readonly && g.readonly
2296
+ }, {
2297
+ default: _(() => [
2298
+ c("div", no, [
2299
+ c("i", {
2300
+ class: G(["imicon", g.readonly ? "" : "im-writing"])
2301
+ }, null, 2),
2302
+ c("span", null, I(g.name), 1),
2303
+ c("span", so, "(" + I(g.id) + ")", 1)
2304
+ ])
2305
+ ]),
2306
+ _: 2
2307
+ }, 1032, ["label", "value", "disabled"]))), 128))
2308
+ ]),
2309
+ _: 1
2310
+ }, 16, ["modelValue", "placeholder", "disabled"])
2311
+ ])
2312
+ ]);
2313
+ };
2314
+ }
2315
+ }), io = { class: "SuperAsaAdGroup relative" }, uo = { class: "outsideIgnore" }, co = { class: "flexMode vc g8" }, po = { class: "flexMode hr outsideIgnore" }, mo = {
2316
+ key: 2,
2317
+ class: "inputGroup"
2318
+ }, fo = { class: "inputGroupLeft noShrink" }, go = { class: "flexMode vc g8" }, yo = /* @__PURE__ */ Object.assign({
2319
+ name: "SuperAsaAdGroup"
2320
+ }, {
2321
+ __name: "index",
2322
+ props: {
2323
+ modelValue: {
2324
+ type: [Number, Array],
2325
+ default: 0
2326
+ },
2327
+ app: {
2328
+ type: [Number, Array],
2329
+ default: 0
2330
+ },
2331
+ org: {
2332
+ type: [String, Number, Array],
2333
+ default: 0
2334
+ },
2335
+ campaign: {
2336
+ type: [String, Number, Array],
2337
+ default: 0
2338
+ },
2339
+ multiple: {
2340
+ type: Boolean,
2341
+ default: !1
2342
+ },
2343
+ value: {
2344
+ type: String,
2345
+ default: "id"
2346
+ },
2347
+ special: {
2348
+ type: Boolean,
2349
+ default: !1
2350
+ },
2351
+ confirmAction: {
2352
+ type: Boolean,
2353
+ default: !1
2354
+ },
2355
+ needNew: {
2356
+ type: Boolean,
2357
+ default: !1
2358
+ }
2359
+ },
2360
+ emits: [
2361
+ "change",
2362
+ "confirm",
2363
+ "update:modelValue",
2364
+ "update:name"
2365
+ ],
2366
+ setup(A, { expose: x, emit: s }) {
2367
+ const e = A, o = reactive({
2368
+ loading: !1,
2369
+ single: "",
2370
+ multiple: [],
2371
+ options: [],
2372
+ filterTxt: ""
2373
+ }), { proxy: h } = getCurrentInstance(), a = s, y = async () => {
2374
+ const i = window.$getType(e.campaign);
2375
+ let w;
2376
+ if (i === "Array" ? w = e.campaign.join(",") : w = e.campaign.toString(), !w)
2377
+ return;
2378
+ let g = {
2379
+ data: {
2380
+ appId: e.app,
2381
+ orgId: e.org,
2382
+ campaignId: w
2383
+ }
2384
+ };
2385
+ e.needNew && (g.ex = +/* @__PURE__ */ new Date()), o.loading = !0;
2386
+ const { code: z, data: T } = await window.$post({
2387
+ url: window.$api.asa.adGroupOptions,
2388
+ ...g
2389
+ });
2390
+ if (o.loading = !1, z === 200) {
2391
+ let l;
2392
+ e.permission ? l = T.filter((n) => n.permission === e.permission) : l = T, o.options = l.map((n) => (n.sort = window.$map.statusMap[n.status].sort, n.ca = `${n.campaignId}_${n.id}`, n.oca = `${n.orgId}_${n.valueCA}`, n)).sort((n, S) => n.sort - S.sort);
2393
+ }
2394
+ if (e.multiple && e.modelValue && e.modelValue.length > 0) {
2395
+ const l = e.modelValue.map((n) => {
2396
+ const { data: S } = m.value.filter1((L) => L[e.value] === n);
2397
+ return S ? S.name : `Unknown Name ${n}`;
2398
+ });
2399
+ a("update:name", l);
2400
+ }
2401
+ !e.multiple && u.value && a("update:name", u.value.name);
2402
+ }, k = (i) => {
2403
+ o.filterTxt = i;
2404
+ }, V = () => {
2405
+ h.$refs.multipleSelect.blur(), e.confirmAction && a("confirm");
2406
+ }, O = (i) => {
2407
+ const w = i.map((g) => {
2408
+ const { data: z } = m.value.filter1((T) => T[e.value] === g);
2409
+ return z ? z.name : `Unknown Name ${g}`;
2410
+ });
2411
+ a("update:modelValue", o.multiple), a("update:name", w), a("change", i);
2412
+ }, b = () => {
2413
+ a("update:modelValue", o.single), a("update:name", u.value.name), a("change", o.single);
2414
+ }, f = () => {
2415
+ o.multiple = m.value.filter((i) => {
2416
+ if (i.hide === !1)
2417
+ return i;
2418
+ }).map((i) => i[e.value]), a("update:modelValue", o.multiple);
2419
+ }, r = () => {
2420
+ y();
2421
+ }, C = computed(() => window.$l("Ad Group")), u = computed(() => o.single ? o.options.filter1((i) => i[e.value] === o.single).data : ""), m = computed(() => o.filterTxt ? o.options.map((i) => (i.name.includes(o.filterTxt) ? i.hide = !1 : i.hide = !0, i)) : (o.options.map((i) => (i.hide = !1, i)), o.options.map((i) => (i.hide = !1, i)))), $ = computed(() => m.value.filter((i) => i.hide === !1).length);
2422
+ computed(() => e.app && e.org && e.campaign);
2423
+ const d = computed(() => {
2424
+ var g, z;
2425
+ let i = !1;
2426
+ const w = window.$getType(e.campaign);
2427
+ return e.multiple && w === "Array" ? i = e.special ? ((g = e.campaign) == null ? void 0 : g.length) !== 1 : !((z = e.campaign) != null && z.length) : i = !e.campaign, i;
2428
+ });
2429
+ return watch(
2430
+ () => e.campaign,
2431
+ (i, w) => {
2432
+ const g = window.$getType(i);
2433
+ e.multiple ? (g === "Array" && i.length || g === "Number" && i) && y() : i && i !== w && y();
2434
+ },
2435
+ {
2436
+ immediate: !0
2437
+ }
2438
+ ), watch(
2439
+ () => e.modelValue,
2440
+ (i) => {
2441
+ e.multiple ? JSON.stringify(o.single) !== JSON.stringify(i) && (o.multiple = i) : i ? o.single !== i && (o.single = i) : o.single = "";
2442
+ },
2443
+ {
2444
+ immediate: !0
2445
+ }
2446
+ ), x({
2447
+ reload: r
2448
+ }), (i, w) => {
2449
+ const g = D("IconLoading"), z = D("el-button"), T = D("el-tag"), l = D("StatusItem"), n = D("MultipleSelect"), S = D("el-option"), L = D("el-select");
2450
+ return p(), M("div", io, [
2451
+ t(o).loading ? (p(), Y(g, { key: 0 })) : B("", !0),
2452
+ e.multiple ? (p(), Y(n, K({
2453
+ key: 1,
2454
+ ref: "multipleSelect",
2455
+ modelValue: t(o).multiple,
2456
+ "onUpdate:modelValue": w[0] || (w[0] = (R) => t(o).multiple = R),
2457
+ options: t(m),
2458
+ placeholder: t(C),
2459
+ label: i.$l("name"),
2460
+ value: e.value,
2461
+ clearable: "",
2462
+ filterable: "",
2463
+ "filter-method": k,
2464
+ "collapse-tags": "",
2465
+ "collapse-tags-tooltip": "",
2466
+ disabled: t(d)
2467
+ }, i.$attrs, { onChange: O }), {
2468
+ header: _(() => [
2469
+ c("div", uo, [
2470
+ t(o).filterTxt ? (p(), Y(z, {
2471
+ key: 0,
2472
+ onClick: f,
2473
+ class: "outsideIgnore"
2474
+ }, {
2475
+ default: _(() => [
2476
+ te(I(i.$l("Select All")), 1)
2477
+ ]),
2478
+ _: 1
2479
+ })) : B("", !0)
2480
+ ]),
2481
+ N(T, {
2482
+ type: "info",
2483
+ effect: "light",
2484
+ round: "",
2485
+ size: "small",
2486
+ class: "noevent"
2487
+ }, {
2488
+ default: _(() => [
2489
+ te(I(t($)), 1)
2490
+ ]),
2491
+ _: 1
2492
+ })
2493
+ ]),
2494
+ default: _(({ it: R }) => [
2495
+ c("div", co, [
2496
+ N(l, {
2497
+ status: R.status,
2498
+ nolabel: ""
2499
+ }, null, 8, ["status"]),
2500
+ c("span", null, I(R.name), 1)
2501
+ ])
2502
+ ]),
2503
+ footer: _(() => [
2504
+ c("div", po, [
2505
+ N(z, {
2506
+ type: "primary",
2507
+ onClick: ie(V, ["stop"])
2508
+ }, {
2509
+ default: _(() => [
2510
+ te(I(i.$l("Confirm")), 1)
2511
+ ]),
2512
+ _: 1
2513
+ })
2514
+ ])
2515
+ ]),
2516
+ _: 1
2517
+ }, 16, ["modelValue", "options", "placeholder", "label", "value", "disabled"])) : (p(), M("div", mo, [
2518
+ c("div", fo, [
2519
+ N(z, {
2520
+ circle: "",
2521
+ onClick: w[1] || (w[1] = (R) => i.$copy(t(o).single, "ID"))
2522
+ }, {
2523
+ icon: _(() => w[3] || (w[3] = [
2524
+ c("i", { class: "imicon im-copy" }, null, -1)
2525
+ ])),
2526
+ _: 1
2527
+ })
2528
+ ]),
2529
+ N(L, K({
2530
+ modelValue: t(o).single,
2531
+ "onUpdate:modelValue": w[2] || (w[2] = (R) => t(o).single = R),
2532
+ placeholder: t(C),
2533
+ clearable: "",
2534
+ filterable: ""
2535
+ }, i.$attrs, {
2536
+ disabled: t(d),
2537
+ class: "inputGroupRight",
2538
+ onChange: b
2539
+ }), ee({
2540
+ default: _(() => [
2541
+ (p(!0), M(oe, null, le(t(o).options, (R, U) => (p(), Y(S, {
2542
+ key: U,
2543
+ label: i.$l(R.name),
2544
+ value: R[e.value]
2545
+ }, {
2546
+ default: _(() => [
2547
+ c("div", go, [
2548
+ N(l, {
2549
+ status: R.status,
2550
+ nolabel: ""
2551
+ }, null, 8, ["status"]),
2552
+ c("span", null, I(R.name), 1)
2553
+ ])
2554
+ ]),
2555
+ _: 2
2556
+ }, 1032, ["label", "value"]))), 128))
2557
+ ]),
2558
+ _: 2
2559
+ }, [
2560
+ t(u) ? {
2561
+ name: "prefix",
2562
+ fn: _(() => [
2563
+ N(l, {
2564
+ status: t(u).status,
2565
+ nolabel: ""
2566
+ }, null, 8, ["status"])
2567
+ ]),
2568
+ key: "0"
2569
+ } : void 0
2570
+ ]), 1040, ["modelValue", "placeholder", "disabled"])
2571
+ ]))
2572
+ ]);
2573
+ };
2574
+ }
2575
+ }), ho = { class: "SuperAsaApp relative" }, _o = { class: "flexMode vc g8" }, bo = { class: "txt-nowrap" }, vo = { class: "txt-dark5" }, wo = /* @__PURE__ */ Object.assign({
2576
+ name: "SuperAsaApp"
2577
+ }, {
2578
+ __name: "index",
2579
+ props: {
2580
+ modelValue: {
2581
+ type: Number,
2582
+ default: null
2583
+ },
2584
+ multiple: {
2585
+ type: Boolean,
2586
+ default: !1
2587
+ },
2588
+ placeholder: {
2589
+ type: String,
2590
+ default: ""
2591
+ },
2592
+ useDefault: {
2593
+ type: Boolean,
2594
+ default: !1
2595
+ },
2596
+ aiDefault: {
2597
+ type: Boolean,
2598
+ default: !1
2599
+ }
2600
+ },
2601
+ emits: [
2602
+ "change",
2603
+ "success",
2604
+ "update:icon",
2605
+ "update:orgs",
2606
+ "update:name"
2607
+ ],
2608
+ setup(A, { emit: x }) {
2609
+ const s = A, e = reactive({
2610
+ loading: !1,
2611
+ single: "",
2612
+ multiple: [],
2613
+ options: []
2614
+ }), h = inject("store").asa();
2615
+ onMounted(() => {
2616
+ y();
2617
+ });
2618
+ const a = x, y = async () => {
2619
+ if (V.value.length) {
2620
+ a("success");
2621
+ return;
2622
+ }
2623
+ e.loading = !0, await h.getAppOptions(), e.loading = !1, a("success");
2624
+ }, k = (f) => {
2625
+ a("update:modelValue", f);
2626
+ const { data: r } = h.appOptions.filter1((C) => C.id === e.single);
2627
+ r && (a("update:name", r.name), a("update:icon", r.icon), a("update:orgs", r.orgs)), a("change", f);
2628
+ }, V = computed(() => h.appOptions), O = computed(() => s.placeholder ? window.$l(s.placeholder) : window.$l("App")), b = computed(() => V.value.filter1((r) => r.id === e.single).data);
2629
+ return watch(
2630
+ () => s.modelValue,
2631
+ (f) => {
2632
+ f && f !== e.v && (e.single = f, k(f));
2633
+ },
2634
+ {
2635
+ immediate: !0
2636
+ }
2637
+ ), watch(
2638
+ () => V.value,
2639
+ (f) => {
2640
+ (s.useDefault && (f == null ? void 0 : f.length) === 1 || s.aiDefault && f.length > 0) && (e.single = f[0].id, k(f[0].id));
2641
+ },
2642
+ {
2643
+ immediate: !0
2644
+ }
2645
+ ), (f, r) => {
2646
+ const C = D("IconLoading"), u = D("Image"), m = D("el-option"), $ = D("el-select");
2647
+ return p(), M("div", ho, [
2648
+ t(e).loading ? (p(), Y(C, { key: 0 })) : B("", !0),
2649
+ N($, K({
2650
+ modelValue: t(e).single,
2651
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => t(e).single = d),
2652
+ placeholder: t(O),
2653
+ filterable: "",
2654
+ clearable: "",
2655
+ "default-first-option": "",
2656
+ "fit-input-width": ""
2657
+ }, f.$attrs, { onChange: k }), ee({
2658
+ default: _(() => [
2659
+ (p(!0), M(oe, null, le(t(V), (d, i) => (p(), Y(m, {
2660
+ key: i,
2661
+ label: d.label,
2662
+ value: d.id
2663
+ }, {
2664
+ default: _(() => [
2665
+ c("div", _o, [
2666
+ N(u, {
2667
+ src: d.icon,
2668
+ class: "noShrink w24 h24 radius radius4 border-dark1"
2669
+ }, null, 8, ["src"]),
2670
+ c("span", bo, I(d.name), 1),
2671
+ c("span", vo, "(" + I(d.id) + ")", 1)
2672
+ ])
2673
+ ]),
2674
+ _: 2
2675
+ }, 1032, ["label", "value"]))), 128))
2676
+ ]),
2677
+ _: 2
2678
+ }, [
2679
+ t(b) ? {
2680
+ name: "prefix",
2681
+ fn: _(() => [
2682
+ N(u, {
2683
+ src: t(b).icon,
2684
+ class: "noShrink w24 h24 radius radius4 border-dark1"
2685
+ }, null, 8, ["src"])
2686
+ ]),
2687
+ key: "0"
2688
+ } : void 0
2689
+ ]), 1040, ["modelValue", "placeholder"])
2690
+ ]);
2691
+ };
2692
+ }
2693
+ }), $o = { class: "SuperAsaCampaign relative" }, So = { class: "outsideIgnore" }, Co = { class: "flexMode vc g8" }, ko = {
2694
+ key: 0,
2695
+ class: "imicon im-writing"
2696
+ }, xo = { class: "txt-nowrap" }, Vo = { class: "flexMode hr outsideIgnore" }, To = {
2697
+ key: 2,
2698
+ class: "inputGroup"
2699
+ }, Oo = { class: "inputGroupLeft noShrink" }, Mo = { class: "flexMode vc g8" }, Ao = {
2700
+ key: 0,
2701
+ class: "imicon im-writing"
2702
+ }, Do = { class: "txt-nowrap" }, Io = /* @__PURE__ */ Object.assign({
2703
+ name: "SuperAsaCampaign"
2704
+ }, {
2705
+ __name: "index",
2706
+ props: {
2707
+ modelValue: {
2708
+ type: [Array, Number],
2709
+ defualt: 0
2710
+ },
2711
+ app: {
2712
+ type: [Number, Array],
2713
+ default: 0
2714
+ },
2715
+ org: {
2716
+ type: [String, Number, Array],
2717
+ default: 0
2718
+ },
2719
+ value: {
2720
+ type: String,
2721
+ default: "id"
2722
+ },
2723
+ multiple: {
2724
+ type: Boolean,
2725
+ default: !1
2726
+ },
2727
+ useex: {
2728
+ type: Boolean,
2729
+ default: !1
2730
+ },
2731
+ type: {
2732
+ type: String,
2733
+ default: "APPSTORE_SEARCH_RESULTS,APPSTORE_SEARCH_TAB,APPSTORE_TODAY_TAB,APPSTORE_PRODUCT_PAGES_BROWSE"
2734
+ },
2735
+ force: {
2736
+ type: Boolean,
2737
+ default: !1
2738
+ }
2739
+ },
2740
+ emits: [
2741
+ "change",
2742
+ "confirm",
2743
+ "update:modelValue",
2744
+ "update:name",
2745
+ "update:adplacement",
2746
+ "success"
2747
+ ],
2748
+ setup(A, { expose: x, emit: s }) {
2749
+ const e = A, o = reactive({
2750
+ loading: !1,
2751
+ single: "",
2752
+ multiple: [],
2753
+ options: [],
2754
+ filterTxt: ""
2755
+ }), { proxy: h } = getCurrentInstance();
2756
+ inject("store").common();
2757
+ const y = s, k = async (T) => {
2758
+ o.loading = !0;
2759
+ const { code: l, data: n } = await window.$post({
2760
+ url: window.$api.asa.campaignOptions,
2761
+ data: {
2762
+ appId: e.app,
2763
+ orgId: e.org
2764
+ },
2765
+ ex: e.useex ? e.org : +/* @__PURE__ */ new Date()
2766
+ });
2767
+ o.loading = !1, l === 200 && (o.options = n.map((S) => (S.oc = `${S.orgId}_${S.id}`, S)).filter((S) => e.type.includes(S.adPlacement)), y("success", o.options));
2768
+ }, V = () => {
2769
+ h.$refs.multipleSelect.blur(), y("confirm");
2770
+ }, O = (T) => {
2771
+ y("update:modelValue", T), y("change", T);
2772
+ const l = {};
2773
+ d.value.filter((S) => T.indexOf(S.id) > -1).forEach((S) => {
2774
+ l[S.adChannelType] = !0;
2775
+ });
2776
+ const n = T.map((S) => {
2777
+ const { data: L } = d.value.filter1((R) => R[e.value] === S);
2778
+ return L ? L.name : `Unknown Name ${S}`;
2779
+ });
2780
+ y("update:name", n), y("update:ad-type", Object.keys(l));
2781
+ }, b = (T) => {
2782
+ var l, n;
2783
+ y("update:modelValue", T), y("update:adplacement", (l = $.value) == null ? void 0 : l.adPlacement), y("update:name", (n = $.value) == null ? void 0 : n.name), y("change", T);
2784
+ }, f = (T) => {
2785
+ var l, n;
2786
+ y("update:modelValue", T), y("update:adplacement", (l = $.value) == null ? void 0 : l.adPlacement), y("update:name", (n = $.value) == null ? void 0 : n.name);
2787
+ }, r = () => {
2788
+ o.multiple = d.value.filter((T) => {
2789
+ if (T.hide === !1)
2790
+ return T;
2791
+ }).map((T) => T[e.value]), y("update:modelValue", o.multiple);
2792
+ }, C = (T) => {
2793
+ o.filterTxt = T;
2794
+ }, u = () => {
2795
+ k();
2796
+ }, m = computed(() => window.$l("Campaign")), $ = computed(() => o.single ? o.options.filter1((T) => T[e.value] === o.single).data : ""), d = computed(() => o.filterTxt ? o.options.map((T) => (T.name.includes(o.filterTxt) && e.type.includes(T.adPlacement) ? T.hide = !1 : T.hide = !0, T)) : o.options.map((l) => (e.type.includes(l.adPlacement) ? l.hide = !1 : l.hide = !0, l))), i = computed(() => d.value.filter((T) => T.hide === !1).length), w = computed(() => window.$getType(e.app) === "Array" ? e.app.join(",") : e.app), g = computed(() => window.$getType(e.org) === "Array" ? e.org.join(",") : e.org);
2797
+ computed(() => `${w.value} ${g.value}`), computed(() => e.app && e.org);
2798
+ const z = computed(() => !e.org);
2799
+ return watch(
2800
+ () => e.org,
2801
+ (T, l) => {
2802
+ T && T !== l && k();
2803
+ },
2804
+ {
2805
+ immediate: !0
2806
+ }
2807
+ ), watch(
2808
+ () => e.modelValue,
2809
+ (T) => {
2810
+ e.multiple ? JSON.stringify(o.multiple) !== JSON.stringify(T) && (o.multiple = T) : o.single !== T && (o.single = T, f(T));
2811
+ },
2812
+ {
2813
+ immediate: !0
2814
+ }
2815
+ ), watch(
2816
+ () => o.options,
2817
+ (T) => {
2818
+ T != null && T.length && !e.multiple && f(e.modelValue);
2819
+ },
2820
+ {
2821
+ immediate: !0
2822
+ }
2823
+ ), x({
2824
+ reload: u
2825
+ }), (T, l) => {
2826
+ const n = D("IconLoading"), S = D("el-button"), L = D("el-tag"), R = D("StatusItem"), U = D("MultipleSelect"), Z = D("el-option"), W = D("el-select");
2827
+ return p(), M("div", $o, [
2828
+ t(o).loading ? (p(), Y(n, { key: 0 })) : B("", !0),
2829
+ e.multiple ? (p(), Y(U, K({
2830
+ key: 1,
2831
+ ref: "multipleSelect",
2832
+ modelValue: t(o).multiple,
2833
+ "onUpdate:modelValue": l[0] || (l[0] = (P) => t(o).multiple = P),
2834
+ options: t(d),
2835
+ placeholder: T.$l(t(m)),
2836
+ clearable: "",
2837
+ label: "name",
2838
+ value: e.value,
2839
+ disabled: t(z),
2840
+ filterable: "",
2841
+ "filter-method": C,
2842
+ "collapse-tags": "",
2843
+ "collapse-tags-tooltip": ""
2844
+ }, T.$attrs, { onChange: O }), {
2845
+ header: _(() => [
2846
+ c("div", So, [
2847
+ t(o).filterTxt ? (p(), Y(S, {
2848
+ key: 0,
2849
+ onClick: r,
2850
+ class: "outsideIgnore"
2851
+ }, {
2852
+ default: _(() => [
2853
+ te(I(T.$l("Select All")), 1)
2854
+ ]),
2855
+ _: 1
2856
+ })) : B("", !0)
2857
+ ]),
2858
+ N(L, {
2859
+ type: "info",
2860
+ effect: "light",
2861
+ round: "",
2862
+ size: "small",
2863
+ class: "noevent"
2864
+ }, {
2865
+ default: _(() => [
2866
+ te(I(t(i)), 1)
2867
+ ]),
2868
+ _: 1
2869
+ })
2870
+ ]),
2871
+ default: _(({ it: P }) => [
2872
+ c("div", Co, [
2873
+ N(R, {
2874
+ status: P.status,
2875
+ nolabel: "",
2876
+ class: "noShrink"
2877
+ }, null, 8, ["status"]),
2878
+ P.readonly === !1 ? (p(), M("i", ko)) : B("", !0),
2879
+ c("span", xo, I(P.name), 1)
2880
+ ])
2881
+ ]),
2882
+ footer: _(() => [
2883
+ c("div", Vo, [
2884
+ N(S, {
2885
+ type: "primary",
2886
+ onClick: ie(V, ["stop"])
2887
+ }, {
2888
+ default: _(() => [
2889
+ te(I(T.$l("Confirm")), 1)
2890
+ ]),
2891
+ _: 1
2892
+ })
2893
+ ])
2894
+ ]),
2895
+ _: 1
2896
+ }, 16, ["modelValue", "options", "placeholder", "value", "disabled"])) : (p(), M("div", To, [
2897
+ c("div", Oo, [
2898
+ N(S, {
2899
+ circle: "",
2900
+ onClick: l[1] || (l[1] = (P) => T.$copy(t(o).single, "ID"))
2901
+ }, {
2902
+ icon: _(() => l[3] || (l[3] = [
2903
+ c("i", { class: "imicon im-copy" }, null, -1)
2904
+ ])),
2905
+ _: 1
2906
+ })
2907
+ ]),
2908
+ N(W, K({
2909
+ modelValue: t(o).single,
2910
+ "onUpdate:modelValue": l[2] || (l[2] = (P) => t(o).single = P),
2911
+ placeholder: t(m),
2912
+ clearable: "",
2913
+ filterable: "",
2914
+ disabled: t(z)
2915
+ }, T.$attrs, {
2916
+ class: "inputGroupRight",
2917
+ onChange: b
2918
+ }), ee({
2919
+ default: _(() => [
2920
+ (p(!0), M(oe, null, le(t(d), (P, ne) => (p(), Y(Z, {
2921
+ key: ne,
2922
+ label: P.name,
2923
+ value: P[e.value]
2924
+ }, {
2925
+ default: _(() => [
2926
+ c("div", Mo, [
2927
+ N(R, {
2928
+ status: P.status,
2929
+ nolabel: "",
2930
+ class: "noShrink"
2931
+ }, null, 8, ["status"]),
2932
+ P.readonly === !1 ? (p(), M("i", Ao)) : B("", !0),
2933
+ c("span", Do, I(P.name), 1)
2934
+ ])
2935
+ ]),
2936
+ _: 2
2937
+ }, 1032, ["label", "value"]))), 128))
2938
+ ]),
2939
+ _: 2
2940
+ }, [
2941
+ t($) ? {
2942
+ name: "prefix",
2943
+ fn: _(() => [
2944
+ N(R, {
2945
+ status: t($).status,
2946
+ nolabel: "",
2947
+ class: "noShrink"
2948
+ }, null, 8, ["status"])
2949
+ ]),
2950
+ key: "0"
2951
+ } : void 0
2952
+ ]), 1040, ["modelValue", "placeholder", "disabled"])
2953
+ ]))
2954
+ ]);
2955
+ };
2956
+ }
2957
+ }), No = { class: "SuperAsaOrg relative" }, zo = { class: "inputGroup" }, jo = { class: "inputGroupLeft noShrink" }, Bo = { class: "flexMode vc g4" }, Yo = { class: "txt-dark5" }, Eo = /* @__PURE__ */ Object.assign({
2958
+ name: "SuperAsaOrg"
2959
+ }, {
2960
+ __name: "index",
2961
+ props: {
2962
+ app: {
2963
+ type: Number,
2964
+ default: 0
2965
+ },
2966
+ changeImmediately: {
2967
+ type: Boolean,
2968
+ default: !1
2969
+ },
2970
+ modelValue: {
2971
+ type: [Number, String],
2972
+ default: 0
2973
+ },
2974
+ readonly: {
2975
+ type: Boolean,
2976
+ default: !1
2977
+ },
2978
+ unTimezone: {
2979
+ type: Boolean,
2980
+ default: !1
2981
+ }
2982
+ },
2983
+ emits: [
2984
+ "update:modelValue",
2985
+ "update:name",
2986
+ "update:currency",
2987
+ "update:readonly",
2988
+ "success",
2989
+ "error",
2990
+ "change"
2991
+ ],
2992
+ setup(A, { emit: x }) {
2993
+ const s = A, e = reactive({
2994
+ loading: !1,
2995
+ single: "",
2996
+ multiple: [],
2997
+ options: []
2998
+ }), h = inject("store").asa();
2999
+ onMounted(() => {
3000
+ y();
3001
+ });
3002
+ const a = x, y = async () => {
3003
+ f.value.length ? (e.single || k(f.value[0].id), a("success")) : a("error");
3004
+ }, k = (u) => {
3005
+ var m, $, d, i;
3006
+ a("update:modelValue", u), a("update:name", (m = r.value) == null ? void 0 : m.name), a("update:currency", ($ = r.value) == null ? void 0 : $.currency), a("update:timezone", (d = r.value) == null ? void 0 : d.timezone), a("update:readonly", (i = r.value) == null ? void 0 : i.readonly), s.changeImmediately && a("change", u), s.unTimezone || V();
3007
+ }, V = () => {
3008
+ var m;
3009
+ let u = r.value;
3010
+ h.saveData("accountTimezone", {
3011
+ timezoneName: u == null ? void 0 : u.timezone,
3012
+ tip: "Account",
3013
+ timezone: (m = window.$map.common.timezone.filter1(
3014
+ ($) => $.label === (u == null ? void 0 : u.timezone)
3015
+ ).data) == null ? void 0 : m.value
3016
+ });
3017
+ }, O = () => {
3018
+ e.single = "", a("update:modelValue", ""), a("update:name", ""), a("update:currency", ""), a("update:timezone", ""), a("update:readonly", !1);
3019
+ }, b = computed(() => window.$l("Campaign Group")), f = computed(() => {
3020
+ var u;
3021
+ return s.app ? ((u = h.appOptions.filter1((m) => m.id === s.app).data) == null ? void 0 : u.orgs) || [] : [];
3022
+ }), r = computed(() => f.value.filter1((u) => u.id === e.single).data), C = computed(() => !s.app);
3023
+ return watch(
3024
+ () => s.modelValue,
3025
+ (u) => {
3026
+ u ? u !== e.single && (e.single = u, k(u)) : O();
3027
+ },
3028
+ {
3029
+ immediate: !0
3030
+ }
3031
+ ), (u, m) => {
3032
+ const $ = D("IconLoading"), d = D("el-button"), i = D("el-option"), w = D("el-select");
3033
+ return p(), M("div", No, [
3034
+ t(e).loading ? (p(), Y($, { key: 0 })) : B("", !0),
3035
+ c("div", zo, [
3036
+ c("div", jo, [
3037
+ N(d, {
3038
+ circle: "",
3039
+ onClick: m[0] || (m[0] = (g) => u.$copy(t(e).single, "ID"))
3040
+ }, {
3041
+ icon: _(() => m[2] || (m[2] = [
3042
+ c("i", { class: "imicon im-copy" }, null, -1)
3043
+ ])),
3044
+ _: 1
3045
+ })
3046
+ ]),
3047
+ N(w, K({
3048
+ modelValue: t(e).single,
3049
+ "onUpdate:modelValue": m[1] || (m[1] = (g) => t(e).single = g),
3050
+ placeholder: t(b),
3051
+ disabled: t(C),
3052
+ filterable: ""
3053
+ }, u.$attrs, {
3054
+ class: "inputGroupRight",
3055
+ onChange: k
3056
+ }), {
3057
+ default: _(() => [
3058
+ (p(!0), M(oe, null, le(t(f), (g, z) => (p(), Y(i, {
3059
+ key: z,
3060
+ label: `${g.name} (${g.id})`,
3061
+ value: g.id,
3062
+ disabled: s.readonly && g.readonly
3063
+ }, {
3064
+ default: _(() => [
3065
+ c("div", Bo, [
3066
+ c("i", {
3067
+ class: G(["imicon", g.readonly ? "" : "im-writing"])
3068
+ }, null, 2),
3069
+ c("span", null, I(g.name), 1),
3070
+ c("span", Yo, "(" + I(g.id) + ")", 1)
3071
+ ])
3072
+ ]),
3073
+ _: 2
3074
+ }, 1032, ["label", "value", "disabled"]))), 128))
3075
+ ]),
3076
+ _: 1
3077
+ }, 16, ["modelValue", "placeholder", "disabled"])
3078
+ ])
3079
+ ]);
3080
+ };
3081
+ }
3082
+ }), Lo = /* @__PURE__ */ Object.assign({
3083
+ name: "SuperCountry"
3084
+ }, {
3085
+ __name: "index",
3086
+ props: {
3087
+ type: {
3088
+ type: String,
3089
+ default: "aso"
3090
+ },
3091
+ nowrap: {
3092
+ type: Boolean,
3093
+ default: !1
3094
+ }
3095
+ },
3096
+ setup(A) {
3097
+ const x = defineAsyncComponent(() => Promise.resolve().then(() => Ll)), s = defineAsyncComponent(() => Promise.resolve().then(() => Ul)), e = {
3098
+ CountryAso: x,
3099
+ CountryDiy: s
3100
+ }, o = A, h = computed(() => e["Country" + window.$toUpperCamel(o.type)]), a = computed(() => o.nowrap);
3101
+ return (y, k) => (p(), M("div", {
3102
+ class: G(["SuperCountry", o.nowrap && "nowrap"])
3103
+ }, [
3104
+ (p(), Y(Ce(t(h)), K(y.$attrs, {
3105
+ "collapse-tags": t(a),
3106
+ "collapse-tags-tooltip": t(a)
3107
+ }), null, 16, ["collapse-tags", "collapse-tags-tooltip"]))
3108
+ ], 2));
3109
+ }
3110
+ }), Ro = ["title"], Po = {
3111
+ key: 0,
3112
+ class: "pl4"
3113
+ }, Fo = /* @__PURE__ */ Object.assign({
3114
+ name: "SuperCountryItem"
3115
+ }, {
3116
+ __name: "index",
3117
+ props: {
3118
+ name: {
3119
+ type: String,
3120
+ default: ""
3121
+ },
3122
+ nolabel: {
3123
+ type: Boolean,
3124
+ default: !1
3125
+ },
3126
+ size: {
3127
+ type: [String, Number],
3128
+ default: 16
3129
+ },
3130
+ radius: {
3131
+ type: [String, Number],
3132
+ default: 8
3133
+ }
3134
+ },
3135
+ setup(A) {
3136
+ const x = A;
3137
+ reactive({});
3138
+ const e = inject("store").common(), o = computed(() => {
3139
+ const V = x.name.toLowerCase();
3140
+ return e.countryObj[V] || window.$map.country.countryAllObj[V] || {};
3141
+ }), h = computed(() => `fi-${o.value.value_lower}`);
3142
+ computed(() => window.$getLang());
3143
+ const a = computed(() => window.$l(o.value.label)), y = computed(() => {
3144
+ const V = parseInt(x.size);
3145
+ return {
3146
+ width: V + "px",
3147
+ height: V + "px"
3148
+ };
3149
+ }), k = computed(() => `radius${Number(x.radius) || 2}`);
3150
+ return window.$map.country.countryAllObj, (V, O) => (p(), M("div", {
3151
+ class: "SuperCountryItem flexMode vc g4",
3152
+ title: t(a)
3153
+ }, [
3154
+ c("span", {
3155
+ class: G(["box-shadow-gray3 fi fis noShrink", [t(h), t(k)]]),
3156
+ style: se(t(y))
3157
+ }, null, 6),
3158
+ x.nolabel ? B("", !0) : (p(), M("span", Po, I(t(a)), 1))
3159
+ ], 8, Ro));
3160
+ }
3161
+ }), Uo = { class: "SuperOrg relative wp100" }, Go = /* @__PURE__ */ Object.assign({
3162
+ name: "SuperOrg",
3163
+ inheritAttrs: !1
3164
+ }, {
3165
+ __name: "index",
3166
+ props: {
3167
+ modelValue: {
3168
+ type: [Number, String],
3169
+ default: ""
3170
+ },
3171
+ permission: {
3172
+ type: String,
3173
+ default: "all"
3174
+ }
3175
+ },
3176
+ emits: "change",
3177
+ setup(A, { emit: x }) {
3178
+ const s = A, e = reactive({
3179
+ loading: !1,
3180
+ v: "",
3181
+ orgOptions: []
3182
+ }), h = inject("store").asa();
3183
+ onMounted(() => {
3184
+ y();
3185
+ });
3186
+ const a = x, y = async () => {
3187
+ if (h.orgOptions.length > 0) {
3188
+ e.orgOptions = h.orgOptions, a("success", e.orgOptions), pe(() => {
3189
+ const f = e.orgOptions.filter1(
3190
+ (r) => r.orgId === e.v
3191
+ ).data;
3192
+ a("update:paymentModel", f == null ? void 0 : f.paymentModel);
3193
+ });
3194
+ return;
3195
+ }
3196
+ e.loading = !0;
3197
+ const { code: O, data: b } = await window.$post({
3198
+ url: window.$api.asa.orgOptions
3199
+ });
3200
+ e.loading = !1, O === 200 && (e.orgOptions = b.map((f) => (f.label = `${f.orgName} (${f.orgId})`, f)), h.saveData("orgOptions", e.orgOptions), pe(() => {
3201
+ const f = e.orgOptions.filter1(
3202
+ (r) => r.orgId === e.v
3203
+ ).data;
3204
+ a("update:paymentModel", f == null ? void 0 : f.paymentModel);
3205
+ }), a("success", e.orgOptions));
3206
+ }, k = (O) => {
3207
+ a("update:modelValue", O);
3208
+ const b = e.orgOptions.filter1((f) => f.orgId === O).data;
3209
+ a("update:currency", b == null ? void 0 : b.currency), a("update:name", b == null ? void 0 : b.orgName), a("update:timezone", b == null ? void 0 : b.timezone), a("update:paymentModel", b == null ? void 0 : b.paymentModel), a("change", O);
3210
+ }, V = computed(() => {
3211
+ if (s.permission === "all")
3212
+ return e.orgOptions;
3213
+ {
3214
+ const O = s.permission === "readonly";
3215
+ return e.orgOptions.filter((f) => f.readonly === O);
3216
+ }
3217
+ });
3218
+ return watch(
3219
+ () => s.modelValue,
3220
+ (O) => {
3221
+ O ? O !== e.v && (e.v = O, pe(() => {
3222
+ const b = e.orgOptions.filter1(
3223
+ (f) => f.orgId === e.v
3224
+ ).data;
3225
+ a("update:paymentModel", b == null ? void 0 : b.paymentModel);
3226
+ })) : e.v = "";
3227
+ },
3228
+ {
3229
+ immediate: !0
3230
+ }
3231
+ ), (O, b) => {
3232
+ const f = D("IconLoading"), r = D("el-option"), C = D("el-select");
3233
+ return p(), M("div", Uo, [
3234
+ t(e).loading ? (p(), Y(f, { key: 0 })) : B("", !0),
3235
+ N(C, {
3236
+ modelValue: t(e).v,
3237
+ "onUpdate:modelValue": b[0] || (b[0] = (u) => t(e).v = u),
3238
+ filterable: "",
3239
+ "collapse-tags": "",
3240
+ placeholder: " ",
3241
+ class: "wp100",
3242
+ onChange: k
3243
+ }, {
3244
+ default: _(() => [
3245
+ (p(!0), M(oe, null, le(t(V), (u, m) => (p(), Y(r, {
3246
+ key: m,
3247
+ label: u.label,
3248
+ value: u.orgId
3249
+ }, null, 8, ["label", "value"]))), 128))
3250
+ ]),
3251
+ _: 1
3252
+ }, 8, ["modelValue"])
3253
+ ]);
3254
+ };
3255
+ }
3256
+ }), Ho = { class: "SuperStatusItem flexMode vc g8" }, Jo = /* @__PURE__ */ Object.assign({
3257
+ name: "SuperStatusItem"
3258
+ }, {
3259
+ __name: "index",
3260
+ props: {
3261
+ status: {
3262
+ type: String,
3263
+ default: ""
3264
+ },
3265
+ nolabel: {
3266
+ type: Boolean,
3267
+ default: !1
3268
+ },
3269
+ size: {
3270
+ type: String,
3271
+ default: "small"
3272
+ },
3273
+ lang: {
3274
+ type: String,
3275
+ default: ""
3276
+ },
3277
+ isButton: {
3278
+ type: Boolean,
3279
+ default: !1
3280
+ },
3281
+ id1: {
3282
+ type: String,
3283
+ default: ""
3284
+ },
3285
+ id2: {
3286
+ type: String,
3287
+ default: ""
3288
+ },
3289
+ id3: {
3290
+ type: String,
3291
+ default: ""
3292
+ }
3293
+ },
3294
+ emits: ["changeStatus"],
3295
+ setup(A, { emit: x }) {
3296
+ const s = A, e = x, o = () => {
3297
+ s.isButton && e("changeStatus", s.status, s.id1, s.id2, s.id3);
3298
+ }, h = computed(() => window.$map.statusMap[s.status] || !1), a = computed(() => window.$toUpperCamel(s.status));
3299
+ computed(() => s.lang || window.$getLang());
3300
+ const y = computed(() => k[s.size] || "fs12"), k = {
3301
+ small: "fs12",
3302
+ default: "fs16",
3303
+ large: "fs24"
3304
+ };
3305
+ return (V, O) => (p(), M("div", Ho, [
3306
+ t(h) ? (p(), M("i", {
3307
+ key: 0,
3308
+ class: G(["imicon", [
3309
+ t(h).class,
3310
+ t(y),
3311
+ s.isButton && s.status !== "DELETED" ? t(h).button_class : ""
3312
+ ]]),
3313
+ onClick: o
3314
+ }, null, 2)) : B("", !0),
3315
+ s.nolabel ? B("", !0) : (p(), M("span", {
3316
+ key: 1,
3317
+ class: G(["txt-h1", t(y)])
3318
+ }, I(V.$l(t(h) ? t(h).label : t(a))), 3))
3319
+ ]));
3320
+ }
3321
+ }), Ko = { class: "SuperStatusSelect" }, Wo = /* @__PURE__ */ Object.assign({
3322
+ name: "SuperStatusSelect"
3323
+ }, {
3324
+ __name: "index",
3325
+ props: {
3326
+ modelValue: {
3327
+ type: String,
3328
+ default: ""
3329
+ },
3330
+ options: {
3331
+ type: Array,
3332
+ default: () => []
3333
+ },
3334
+ placeholder: {
3335
+ type: String,
3336
+ default: ""
3337
+ }
3338
+ },
3339
+ setup(A) {
3340
+ const x = A, s = reactive({
3341
+ v: ""
3342
+ }), { proxy: e } = getCurrentInstance(), o = computed(() => window.$getLang()), h = computed(() => e.$slots), a = computed(() => x.options.length ? x.options : ["RUNNING", "PAUSED"]), y = computed(() => {
3343
+ const V = x.placeholder || "Status";
3344
+ return window.$l(V);
3345
+ });
3346
+ watchEffect(() => {
3347
+ s.v = x.modelValue;
3348
+ });
3349
+ const k = window.$map.statusMap;
3350
+ return (V, O) => {
3351
+ const b = D("StatusItem"), f = D("el-option"), r = D("el-select");
3352
+ return p(), M("div", Ko, [
3353
+ N(r, K({
3354
+ modelValue: t(s).v,
3355
+ "onUpdate:modelValue": O[0] || (O[0] = (C) => t(s).v = C),
3356
+ "collapse-tags": "",
3357
+ "collapse-tags-tooltip": ""
3358
+ }, V.$attrs, {
3359
+ placeholder: t(y),
3360
+ onChange: V.change
3361
+ }), ee({
3362
+ default: _(() => [
3363
+ (p(!0), M(oe, null, le(t(a), (C, u) => (p(), Y(f, {
3364
+ key: C,
3365
+ label: V.$l(t(k)[C].label),
3366
+ value: C
3367
+ }, {
3368
+ default: _(() => [
3369
+ N(b, {
3370
+ status: C,
3371
+ lang: t(o)
3372
+ }, null, 8, ["status", "lang"])
3373
+ ]),
3374
+ _: 2
3375
+ }, 1032, ["label", "value"]))), 128))
3376
+ ]),
3377
+ _: 2
3378
+ }, [
3379
+ t(s).v ? {
3380
+ name: "prefix",
3381
+ fn: _(() => [
3382
+ t(h).prefix ? H(V.$slots, "prefix", { key: 0 }) : (p(), Y(b, {
3383
+ key: 1,
3384
+ status: t(s).v,
3385
+ nolabel: "",
3386
+ lang: t(o)
3387
+ }, null, 8, ["status", "lang"]))
3388
+ ]),
3389
+ key: "0"
3390
+ } : void 0
3391
+ ]), 1040, ["modelValue", "placeholder", "onChange"])
3392
+ ]);
3393
+ };
3394
+ }
3395
+ }), ql = {
3396
+ Card: Me,
3397
+ DatePicker: De,
3398
+ EChart: je,
3399
+ Icon: Ee,
3400
+ Image: Fe,
3401
+ Input: Ge,
3402
+ MultipleSelect: tt,
3403
+ Nodata: at,
3404
+ Page: pt,
3405
+ Table: Ht,
3406
+ Textarea: qt,
3407
+ AiApp: to,
3408
+ AiOrg: ro,
3409
+ AsaAdGroup: yo,
3410
+ AsaApp: wo,
3411
+ AsaCampaign: Io,
3412
+ AsaOrg: Eo,
3413
+ Country: Lo,
3414
+ CountryItem: Fo,
3415
+ Org: Go,
3416
+ StatusItem: Jo,
3417
+ StatusSelect: Wo
3418
+ }, qo = { class: "dragCenter flexMode vc flexGrow txt-nowrap" }, Zo = { class: "pl10 fs14 txt-h2" }, Qo = { class: "pb5 fs12 txt-primary3" }, Xo = /* @__PURE__ */ Object.assign({
3419
+ name: "ColumnConfigDragItem"
3420
+ }, {
3421
+ __name: "DragItem",
3422
+ props: {
3423
+ modelValue: {
3424
+ type: Object,
3425
+ default: /* @__PURE__ */ Object.create(null)
3426
+ },
3427
+ it: {
3428
+ type: Object,
3429
+ default: /* @__PURE__ */ Object.create(null)
3430
+ },
3431
+ index: {
3432
+ type: Number,
3433
+ default: 0
3434
+ },
3435
+ type: {
3436
+ type: String,
3437
+ default: "center"
3438
+ },
3439
+ lang: {
3440
+ type: String,
3441
+ default: "en_us"
3442
+ }
3443
+ },
3444
+ setup(A, { emit: x }) {
3445
+ const s = A, e = reactive({
3446
+ editMode: !1,
3447
+ form: {},
3448
+ info: {}
3449
+ });
3450
+ onMounted(() => {
3451
+ e.form = s.it;
3452
+ });
3453
+ const o = x, h = () => {
3454
+ o("add-left", s);
3455
+ }, a = () => {
3456
+ o("add-right", s);
3457
+ }, y = (O) => {
3458
+ o("change", { it: e.form, index: s.index, type: s.type });
3459
+ };
3460
+ computed(() => e.form.align ? " " : V[0].label);
3461
+ const k = computed(() => s.it.nomove || e.editMode), V = [
3462
+ {
3463
+ label: "Left",
3464
+ value: "left"
3465
+ },
3466
+ {
3467
+ label: "Center",
3468
+ value: "center"
3469
+ },
3470
+ {
3471
+ label: "Right",
3472
+ value: "right"
3473
+ }
3474
+ ];
3475
+ return (O, b) => {
3476
+ const f = D("el-switch");
3477
+ return p(), M("div", {
3478
+ class: G(["ColumnConfigDragItem", [!t(k) && "drag", s.type]])
3479
+ }, [
3480
+ c("div", {
3481
+ class: G(["itemArea relative flexMode vc p4", [
3482
+ t(e).editMode && "edit",
3483
+ t(k) ? "cursor-disabled hover-bg-gray1" : "cursor-grab hover-bg-primary1"
3484
+ ]])
3485
+ }, [
3486
+ c("div", {
3487
+ class: "arrowLeft ml4 mr8 circle24 hover-txt-primary",
3488
+ onClick: ie(h, ["stop"])
3489
+ }, b[1] || (b[1] = [
3490
+ c("i", { class: "imicon im-arrow-left" }, null, -1)
3491
+ ])),
3492
+ c("div", qo, [
3493
+ N(f, {
3494
+ modelValue: t(e).form.visible,
3495
+ "onUpdate:modelValue": b[0] || (b[0] = (r) => t(e).form.visible = r),
3496
+ disabled: t(e).form.nomove,
3497
+ size: "default",
3498
+ onChange: y
3499
+ }, null, 8, ["modelValue", "disabled"]),
3500
+ c("span", Zo, I(t(e).form.label || t(e).form.type), 1)
3501
+ ]),
3502
+ c("span", Qo, I(t(e).form.tips), 1),
3503
+ c("div", {
3504
+ class: "arrowRight mr4 ml8 circle24 hover-txt-primary",
3505
+ onClick: ie(a, ["stop"])
3506
+ }, b[2] || (b[2] = [
3507
+ c("i", { class: "imicon im-arrow-right" }, null, -1)
3508
+ ]))
3509
+ ], 2)
3510
+ ], 2);
3511
+ };
3512
+ }
3513
+ }), fe = /* @__PURE__ */ ae(Xo, [["__scopeId", "data-v-696fbfee"]]), el = { class: "flexMode vs p16 g16" }, tl = { class: "lh12" }, ol = { class: "fs12 txt-primary" }, ll = { class: "fs12 txt-dark5" }, al = {
3514
+ key: 0,
3515
+ class: "fs12 txt-dark3"
3516
+ }, nl = {
3517
+ key: 0,
3518
+ class: "absCenter txt-nowrap txt-dark7 fs12"
3519
+ }, sl = { class: "lh12" }, rl = { class: "fs12 txt-primary" }, il = { class: "fs12 txt-dark5" }, dl = {
3520
+ key: 0,
3521
+ class: "fs12 txt-dark3"
3522
+ }, ul = {
3523
+ key: 0,
3524
+ class: "absCenter txt-nowrap txt-dark7 fs12"
3525
+ }, cl = { class: "lh12" }, pl = { class: "fs12 txt-primary" }, ml = { class: "fs12 txt-dark5" }, fl = {
3526
+ key: 0,
3527
+ class: "fs12 txt-dark3"
3528
+ }, gl = {
3529
+ key: 0,
3530
+ class: "absCenter txt-nowrap txt-dark7 fs12"
3531
+ }, yl = /* @__PURE__ */ Object.assign({
3532
+ name: "TableHeaderColumnConfig",
3533
+ inheritAttrs: !1
3534
+ }, {
3535
+ __name: "ColumnConfig",
3536
+ props: {
3537
+ params: {
3538
+ type: Object,
3539
+ default: /* @__PURE__ */ Object.create(null)
3540
+ }
3541
+ },
3542
+ setup(A, { emit: x }) {
3543
+ const s = A, e = reactive({
3544
+ loading: !1,
3545
+ left: [],
3546
+ center: [],
3547
+ right: [],
3548
+ total: 0
3549
+ });
3550
+ onMounted(() => {
3551
+ h();
3552
+ });
3553
+ const o = x, h = () => {
3554
+ a();
3555
+ }, a = () => {
3556
+ let w = localStorage.getItem(C.value);
3557
+ if (w) {
3558
+ w = JSON.parse(w);
3559
+ let g = 0;
3560
+ w.forEach((z) => {
3561
+ z.label && !z.nomove && (g++, z.fixed ? e[z.fixed].push(z) : e.center.push(z));
3562
+ }), e.total = g;
3563
+ }
3564
+ }, y = ({ it: w, index: g, type: z }) => {
3565
+ e.left.unshift(w), e.center.splice(g, 1);
3566
+ }, k = ({ it: w, index: g, type: z }) => {
3567
+ e.right.unshift(w), e.center.splice(g, 1);
3568
+ }, V = ({ it: w, index: g, type: z }) => {
3569
+ e.center.unshift(w), e.left.splice(g, 1);
3570
+ }, O = ({ it: w, index: g, type: z }) => {
3571
+ e.center.unshift(w), e.right.splice(g, 1);
3572
+ }, b = ({ it: w, index: g, type: z }) => {
3573
+ e[z][g] = w;
3574
+ }, f = async () => {
3575
+ e.loading = !0, localStorage.removeItem(C.value), window.$promise(() => {
3576
+ e.loading = !1, o("submit", "column"), o("close");
3577
+ });
3578
+ }, r = async () => {
3579
+ e.loading = !0, await window.$promise(() => {
3580
+ const { left: w, center: g, right: z } = e;
3581
+ w.forEach((l, n) => {
3582
+ l.fixed = "left", l.sort = n;
3583
+ }), g.forEach((l, n) => {
3584
+ l.fixed = !1, l.sort = n;
3585
+ }), z.forEach((l, n) => {
3586
+ l.fixed = "right", l.sort = n;
3587
+ });
3588
+ const T = [...w, ...g, ...z].sort(
3589
+ (l, n) => l.sort - n.sort
3590
+ );
3591
+ localStorage.setItem(C.value, JSON.stringify(T));
3592
+ }, 10), e.loading = !1, o("submit", "column"), o("close");
3593
+ }, C = computed(() => `${s.params.tableName}_Column`), u = computed(() => ({
3594
+ height: window.global.config.options.drawerHeight - 96 + "px"
3595
+ })), m = computed(() => {
3596
+ let w = 0, g = 0;
3597
+ return e.left.forEach((z) => {
3598
+ z.visible ? w++ : g++;
3599
+ }), {
3600
+ visible: w,
3601
+ hide: g
3602
+ };
3603
+ }), $ = computed(() => {
3604
+ let w = 0, g = 0;
3605
+ return e.center.forEach((z) => {
3606
+ z.visible ? w++ : g++;
3607
+ }), {
3608
+ visible: w,
3609
+ hide: g
3610
+ };
3611
+ }), d = computed(() => {
3612
+ let w = 0, g = 0;
3613
+ return e.right.forEach((z) => {
3614
+ z.visible ? w++ : g++;
3615
+ }), {
3616
+ visible: w,
3617
+ hide: g
3618
+ };
3619
+ }), i = computed(() => window.$getLang());
3620
+ return (w, g) => {
3621
+ const z = D("Card"), T = D("el-button"), l = D("DrawerArea");
3622
+ return p(), Y(l, {
3623
+ class: "TableHeaderColumnConfig",
3624
+ loading: t(e).loading,
3625
+ noscroll: "",
3626
+ onSubmit: r
3627
+ }, {
3628
+ cancel: _(() => [
3629
+ N(T, {
3630
+ plain: "",
3631
+ onClick: f
3632
+ }, {
3633
+ icon: _(() => g[3] || (g[3] = [
3634
+ c("i", { class: "imicon im-reset" }, null, -1)
3635
+ ])),
3636
+ default: _(() => [
3637
+ te(" " + I(w.$l("Reset")), 1)
3638
+ ]),
3639
+ _: 1
3640
+ })
3641
+ ]),
3642
+ default: _(() => [
3643
+ c("div", el, [
3644
+ N(z, {
3645
+ title: "Fixed on Left",
3646
+ class: "flex1"
3647
+ }, ee({
3648
+ default: _(() => [
3649
+ t(e).left.length === 0 ? (p(), M("div", nl, I(w.$l("No Column Fixed on Left")), 1)) : B("", !0),
3650
+ g[0] || (g[0] = c("div", { class: "border-t" }, null, -1)),
3651
+ N(t(me), {
3652
+ list: t(e).left,
3653
+ group: "columnFilter",
3654
+ class: "dragBody p4-0 yscroll nobar",
3655
+ draggable: ".drag",
3656
+ style: se(t(u)),
3657
+ "item-key": (n) => n
3658
+ }, {
3659
+ item: _(({ element: n, index: S }) => [
3660
+ N(fe, {
3661
+ it: n,
3662
+ index: S,
3663
+ lang: t(i),
3664
+ type: "left",
3665
+ onAddRight: V,
3666
+ onChange: b
3667
+ }, null, 8, ["it", "index", "lang"])
3668
+ ]),
3669
+ _: 1
3670
+ }, 8, ["list", "style", "item-key"])
3671
+ ]),
3672
+ _: 2
3673
+ }, [
3674
+ t(m) ? {
3675
+ name: "header",
3676
+ fn: _(() => [
3677
+ c("div", tl, [
3678
+ c("span", ol, I(t(m).visible), 1),
3679
+ c("span", ll, " / " + I(t(e).total), 1),
3680
+ t(m).hide ? (p(), M("span", al, "(" + I(t(m).hide) + ")", 1)) : B("", !0)
3681
+ ])
3682
+ ]),
3683
+ key: "0"
3684
+ } : void 0
3685
+ ]), 1024),
3686
+ N(z, {
3687
+ title: "In Center",
3688
+ class: "flex1"
3689
+ }, ee({
3690
+ default: _(() => [
3691
+ t(e).center.length === 0 ? (p(), M("div", ul, I(w.$l("No Column Fixed on Left")), 1)) : B("", !0),
3692
+ g[1] || (g[1] = c("div", { class: "border-t" }, null, -1)),
3693
+ N(t(me), {
3694
+ list: t(e).center,
3695
+ group: "columnFilter",
3696
+ class: "dragBody p4-0 yscroll nobar",
3697
+ draggable: ".drag",
3698
+ style: se(t(u)),
3699
+ "item-key": (n) => n
3700
+ }, {
3701
+ item: _(({ element: n, index: S }) => [
3702
+ N(fe, {
3703
+ it: n,
3704
+ index: S,
3705
+ onAddLeft: y,
3706
+ lang: t(i),
3707
+ onAddRight: k,
3708
+ onChange: b
3709
+ }, null, 8, ["it", "index", "lang"])
3710
+ ]),
3711
+ _: 1
3712
+ }, 8, ["list", "style", "item-key"])
3713
+ ]),
3714
+ _: 2
3715
+ }, [
3716
+ t($) ? {
3717
+ name: "header",
3718
+ fn: _(() => [
3719
+ c("div", sl, [
3720
+ c("span", rl, I(t($).visible), 1),
3721
+ c("span", il, " / " + I(t(e).total), 1),
3722
+ t($).hide ? (p(), M("span", dl, "(" + I(t($).hide) + ")", 1)) : B("", !0)
3723
+ ])
3724
+ ]),
3725
+ key: "0"
3726
+ } : void 0
3727
+ ]), 1024),
3728
+ N(z, {
3729
+ title: "Fixed on Right",
3730
+ class: "flex1"
3731
+ }, ee({
3732
+ default: _(() => [
3733
+ t(e).right.length === 0 ? (p(), M("div", gl, I(w.$l("No Column Fixed on Right")), 1)) : B("", !0),
3734
+ g[2] || (g[2] = c("div", { class: "border-t" }, null, -1)),
3735
+ N(t(me), {
3736
+ list: t(e).right,
3737
+ group: "columnFilter",
3738
+ class: "dragBody p4-0 yscroll nobar",
3739
+ draggable: ".drag",
3740
+ style: se(t(u)),
3741
+ "item-key": (n) => n
3742
+ }, {
3743
+ item: _(({ element: n, index: S }) => [
3744
+ N(fe, {
3745
+ it: n,
3746
+ index: S,
3747
+ type: "right",
3748
+ lang: t(i),
3749
+ onAddLeft: O,
3750
+ onChange: b
3751
+ }, null, 8, ["it", "index", "lang"])
3752
+ ]),
3753
+ _: 1
3754
+ }, 8, ["list", "style", "item-key"])
3755
+ ]),
3756
+ _: 2
3757
+ }, [
3758
+ t(d) ? {
3759
+ name: "header",
3760
+ fn: _(() => [
3761
+ c("div", cl, [
3762
+ c("span", pl, I(t(d).visible), 1),
3763
+ c("span", ml, " / " + I(t(e).total), 1),
3764
+ t(d).hide ? (p(), M("span", fl, "(" + I(t(d).hide) + ")", 1)) : B("", !0)
3765
+ ])
3766
+ ]),
3767
+ key: "0"
3768
+ } : void 0
3769
+ ]), 1024)
3770
+ ])
3771
+ ]),
3772
+ _: 1
3773
+ }, 8, ["loading"]);
3774
+ };
3775
+ }
3776
+ }), hl = /* @__PURE__ */ ae(yl, [["__scopeId", "data-v-e8053f13"]]), _l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3777
+ __proto__: null,
3778
+ default: hl
3779
+ }, Symbol.toStringTag, { value: "Module" })), bl = { class: "p16 wp100 sticky bg-white9 border-b backdrop z2" }, vl = { class: "p8" }, wl = { class: "txt-dark5" }, $l = { class: "pl8 txt-dark9" }, Sl = {
3780
+ key: 0,
3781
+ class: "flexMode vc p8"
3782
+ }, Cl = {
3783
+ key: 1,
3784
+ class: "flexMode vc p8"
3785
+ }, kl = { class: "txt-dark5" }, xl = { class: "pl8 pr16 txt-dark9" }, Vl = {
3786
+ key: 2,
3787
+ class: "flexMode vc p8"
3788
+ }, Tl = { class: "flexMode hr vc g16" }, Ol = { class: "pr8" }, Ml = { class: "relative wp100 pb8 border-b z1" }, Al = { class: "p16 txt-dark9" }, Dl = { class: "pr8" }, Il = { class: "inputGroup flexMode vc flexGrow" }, Nl = { class: "inputGroupRight" }, zl = /* @__PURE__ */ Object.assign({
3789
+ name: "TableDownload"
3790
+ }, {
3791
+ __name: "TableDownload",
3792
+ props: {
3793
+ params: {
3794
+ type: Object,
3795
+ default: /* @__PURE__ */ Object.create(null)
3796
+ }
3797
+ },
3798
+ setup(A, { emit: x }) {
3799
+ const s = A, e = reactive({
3800
+ columns: [],
3801
+ items: [],
3802
+ downloadAll: !1,
3803
+ onlySelection: !1,
3804
+ // 只下载选中项
3805
+ remoteDownload: !1,
3806
+ // 远程下载
3807
+ filename: "",
3808
+ // 文件名
3809
+ useCountryName: !1,
3810
+ // 使用国家名称
3811
+ widthTableHead: !0
3812
+ }), { proxy: o } = getCurrentInstance(), h = useRoute();
3813
+ onMounted(() => {
3814
+ k();
3815
+ });
3816
+ const a = x, y = () => {
3817
+ e.downloadAll ? a("fetch-all-data") : a("recover-current-data");
3818
+ }, k = () => {
3819
+ V(), O();
3820
+ }, V = () => {
3821
+ z.value.length && (e.onlySelection = !0);
3822
+ }, O = () => {
3823
+ const l = JSON.parse(localStorage.getItem(d.value)) || [], n = [], S = [];
3824
+ l.forEach((L) => {
3825
+ L.prop && (n.push(L), L.visible && S.push(L.prop));
3826
+ }), e.columns = n, e.items = S;
3827
+ }, b = () => {
3828
+ }, f = (l = ",", n) => {
3829
+ const S = e.items.map((U) => w.value[U].label);
3830
+ let L = [];
3831
+ e.onlySelection ? L = z.value : L = g.value;
3832
+ const R = L.map((U) => {
3833
+ const Z = [];
3834
+ return e.items.forEach((W) => {
3835
+ if (["country"].includes(W))
3836
+ if (e.useCountryName) {
3837
+ const P = window.$getType(U[W]);
3838
+ let ne;
3839
+ P === "Array" ? ne = U[W] : ne = U[W].split(","), ne = ne.map((J) => window.$map.country.asaObj[J.toLowerCase()][`label_${u.value}`]), Z.push(`"${ne.join(",")}"`);
3840
+ } else
3841
+ Z.push(`"${U[W]}"`);
3842
+ else if (["spendOrigin"].includes(W)) {
3843
+ const P = U.currency + " " + (U[`${W}Format`] || U[W]);
3844
+ Z.push(`"${P || "-"}"`);
3845
+ } else {
3846
+ const P = U[`${W}Format`] || U[W];
3847
+ Z.push(`"${P || "-"}"`);
3848
+ }
3849
+ }), Z.join(l);
3850
+ });
3851
+ return n && R.unshift(S.join(l)), R.join(`
3852
+ `);
3853
+ }, r = () => {
3854
+ var n;
3855
+ let l = !1;
3856
+ if ((e.onlySelection && ((n = s.params.selection) != null && n.length) || g.value.length) && (l = !0), l) {
3857
+ const S = f(" ", e.withTableHead);
3858
+ window.$copy(S);
3859
+ } else
3860
+ o.$message.info("No Data to Download");
3861
+ }, C = () => {
3862
+ const l = f(",", !0);
3863
+ let n = $.value;
3864
+ e.filename ? n ? n += `_${e.filename}` : n = e.filename : n || (n = i.value), window.$download({
3865
+ type: "csv",
3866
+ name: n,
3867
+ data: l
3868
+ }), o.$message.success(window.$l("Download Mode"));
3869
+ }, u = computed(() => window.$getLang()), m = computed(() => s.params.tableName), $ = computed(() => m.value ? `${window.$l(m.value)}_${window.$moment().format("YYYYMMDD_hhmmss")}` : ""), d = computed(() => s.params.tableName + "_Column"), i = computed(() => `${h.name}_${window.$moment().format("YYYYMMDD_hhmmss")}`), w = computed(() => {
3870
+ const l = {};
3871
+ return e.columns.forEach((n) => {
3872
+ l[n.prop] = n;
3873
+ }), l;
3874
+ }), g = computed(() => {
3875
+ var l;
3876
+ return ((l = s.params) == null ? void 0 : l.list) || [];
3877
+ }), z = computed(() => {
3878
+ var l;
3879
+ return ((l = s.params) == null ? void 0 : l.selection) || [];
3880
+ }), T = computed(() => {
3881
+ var l;
3882
+ return e.items.length === 0 || g.value.length === 0 || !!((l = s.params) != null && l.loading);
3883
+ });
3884
+ return (l, n) => {
3885
+ const S = D("el-checkbox"), L = D("el-button"), R = D("Alert"), U = D("el-switch"), Z = D("el-checkbox-group"), W = D("el-input"), P = D("DrawerArea"), ne = _e("loading");
3886
+ return p(), Y(P, { onSubmit: C }, {
3887
+ footer: _(() => [
3888
+ c("div", Il, [
3889
+ N(W, {
3890
+ modelValue: t(e).filename,
3891
+ "onUpdate:modelValue": n[6] || (n[6] = (J) => t(e).filename = J),
3892
+ clearable: "",
3893
+ placeholder: l.$l(t($)),
3894
+ class: "inputGroupLeft"
3895
+ }, {
3896
+ prefix: _(() => n[8] || (n[8] = [
3897
+ c("i", { class: "imicon im-file" }, null, -1)
3898
+ ])),
3899
+ _: 1
3900
+ }, 8, ["modelValue", "placeholder"]),
3901
+ c("div", Nl, [
3902
+ N(L, {
3903
+ disabled: t(T),
3904
+ plain: "",
3905
+ type: "primary",
3906
+ onClick: C
3907
+ }, {
3908
+ icon: _(() => n[9] || (n[9] = [
3909
+ c("i", { class: "imicon im-download1" }, null, -1)
3910
+ ])),
3911
+ default: _(() => [
3912
+ c("span", null, I(l.$l("Download")), 1)
3913
+ ]),
3914
+ _: 1
3915
+ }, 8, ["disabled"])
3916
+ ])
3917
+ ])
3918
+ ]),
3919
+ default: _(() => [
3920
+ be((p(), M("div", bl, [
3921
+ N(R, null, {
3922
+ default: _(() => [
3923
+ c("div", vl, [
3924
+ c("span", wl, I(t(e).downloadAll ? l.$l("Total in All Pages: ") : l.$l("Total in Current Page: ")), 1),
3925
+ c("span", $l, I(t(g).length), 1)
3926
+ ]),
3927
+ s.params.showTotalChosen ? (p(), M("div", Sl, [
3928
+ N(S, {
3929
+ modelValue: t(e).downloadAll,
3930
+ "onUpdate:modelValue": n[0] || (n[0] = (J) => t(e).downloadAll = J),
3931
+ label: l.$l("Download All Data"),
3932
+ class: "h24-i",
3933
+ onChange: y
3934
+ }, null, 8, ["modelValue", "label"])
3935
+ ])) : B("", !0),
3936
+ t(z).length ? (p(), M("div", Cl, [
3937
+ c("span", kl, I(l.$l("Selected")), 1),
3938
+ c("span", xl, I(t(z).length), 1),
3939
+ N(S, {
3940
+ modelValue: t(e).onlySelection,
3941
+ "onUpdate:modelValue": n[1] || (n[1] = (J) => t(e).onlySelection = J),
3942
+ label: l.$l("Only Selection"),
3943
+ class: "h24-i"
3944
+ }, null, 8, ["modelValue", "label"])
3945
+ ])) : B("", !0),
3946
+ s.params.remote ? (p(), M("div", Vl, [
3947
+ N(S, {
3948
+ modelValue: t(e).remoteDownload,
3949
+ "onUpdate:modelValue": n[2] || (n[2] = (J) => t(e).remoteDownload = J),
3950
+ label: l.$l("Download all data using remote download")
3951
+ }, null, 8, ["modelValue", "label"])
3952
+ ])) : B("", !0),
3953
+ c("div", Tl, [
3954
+ N(L, {
3955
+ plain: "",
3956
+ size: "default",
3957
+ onClick: r
3958
+ }, {
3959
+ icon: _(() => n[7] || (n[7] = [
3960
+ c("i", { class: "imicon im-copy" }, null, -1)
3961
+ ])),
3962
+ default: _(() => [
3963
+ c("span", Ol, I(l.$l("Copy to Clipboard")), 1),
3964
+ N(S, {
3965
+ modelValue: t(e).withTableHead,
3966
+ "onUpdate:modelValue": n[3] || (n[3] = (J) => t(e).withTableHead = J),
3967
+ label: l.$l("With Table Head"),
3968
+ onClick: ie((J) => null, ["stop"])
3969
+ }, null, 8, ["modelValue", "label"])
3970
+ ]),
3971
+ _: 1
3972
+ })
3973
+ ])
3974
+ ]),
3975
+ _: 1
3976
+ })
3977
+ ])), [
3978
+ [ne, s.params.loading]
3979
+ ]),
3980
+ c("div", Ml, [
3981
+ c("div", Al, I(l.$l("What do you want to Download?")), 1),
3982
+ N(Z, {
3983
+ modelValue: t(e).items,
3984
+ "onUpdate:modelValue": n[5] || (n[5] = (J) => t(e).items = J)
3985
+ }, {
3986
+ default: _(() => [
3987
+ (p(!0), M(oe, null, le(t(e).columns, (J, ge) => (p(), Y(S, {
3988
+ key: J.prop,
3989
+ value: J.prop,
3990
+ class: "wp100 p0-16 h36-i hover-bg-gray1"
3991
+ }, {
3992
+ default: _(() => [
3993
+ c("span", Dl, I(J.label), 1),
3994
+ J.prop === "country" ? (p(), Y(U, {
3995
+ key: 0,
3996
+ modelValue: t(e).useCountryName,
3997
+ "onUpdate:modelValue": n[4] || (n[4] = (de) => t(e).useCountryName = de),
3998
+ "inline-prompt": "",
3999
+ "active-text": " Use name  ",
4000
+ "inactive-text": " Use Alpha-2 code ",
4001
+ onChange: b
4002
+ }, null, 8, ["modelValue"])) : B("", !0)
4003
+ ]),
4004
+ _: 2
4005
+ }, 1032, ["value"]))), 128))
4006
+ ]),
4007
+ _: 1
4008
+ }, 8, ["modelValue"])
4009
+ ]),
4010
+ n[10] || (n[10] = c("div", { class: "TheEnd" }, null, -1))
4011
+ ]),
4012
+ _: 1
4013
+ });
4014
+ };
4015
+ }
4016
+ }), jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4017
+ __proto__: null,
4018
+ default: zl
4019
+ }, Symbol.toStringTag, { value: "Module" })), Bl = { class: "SuperCountryAso relative" }, Yl = { class: "flexMode hr" }, El = /* @__PURE__ */ Object.assign({
4020
+ name: "SuperCountryAso"
4021
+ }, {
4022
+ __name: "CountryAso",
4023
+ props: {
4024
+ modelValue: {
4025
+ type: [String, Array],
4026
+ default: ""
4027
+ },
4028
+ multiple: {
4029
+ type: Boolean,
4030
+ default: !1
4031
+ },
4032
+ limit: {
4033
+ type: Number,
4034
+ default: 0
4035
+ },
4036
+ useFooter: {
4037
+ type: Boolean,
4038
+ default: !1
4039
+ },
4040
+ nowrap: {
4041
+ type: Boolean,
4042
+ default: !1
4043
+ },
4044
+ useAll: {
4045
+ type: Boolean,
4046
+ default: !1
4047
+ },
4048
+ allValue: {
4049
+ type: [String, Number],
4050
+ default: "all"
4051
+ }
4052
+ },
4053
+ emits: [
4054
+ "to-change",
4055
+ "update:modelValue",
4056
+ "confirm",
4057
+ "update:name"
4058
+ ],
4059
+ setup(A, { emit: x }) {
4060
+ const s = A, { proxy: e } = getCurrentInstance(), h = inject("store").common(), a = reactive({
4061
+ loading: !1,
4062
+ v: "",
4063
+ arr: []
4064
+ }), y = x, k = (r) => {
4065
+ y("update:modelValue", r), y("to-change", r);
4066
+ }, V = (r) => {
4067
+ let C = [];
4068
+ h.countryOptions.forEach((u) => {
4069
+ r.forEach((m) => {
4070
+ u.value === m && C.push(u.label);
4071
+ });
4072
+ }), y("update:modelValue", r), y("update:name", C.join(", ")), y("to-change", r);
4073
+ }, O = () => {
4074
+ y("update:modelValue", a.arr), y("confirm", a.arr), e.$refs.multiple.blur();
4075
+ }, b = computed(() => h.countryOptions), f = computed(() => window.$l("Countries or Regions"));
4076
+ return watch(
4077
+ () => s.modelValue,
4078
+ (r, C) => {
4079
+ r && JSON.stringify(r) !== JSON.stringify(C) && (s.multiple ? a.arr = r : a.v = r);
4080
+ },
4081
+ {
4082
+ immediate: !0
4083
+ }
4084
+ ), (r, C) => {
4085
+ const u = D("IconLoading"), m = D("CountryItem"), $ = D("el-option"), d = D("el-select"), i = D("el-button"), w = D("MultipleSelect");
4086
+ return p(), M("div", Bl, [
4087
+ t(a).loading ? (p(), Y(u, { key: 0 })) : B("", !0),
4088
+ s.multiple ? (p(), Y(w, K({
4089
+ key: 2,
4090
+ ref: "multiple",
4091
+ modelValue: t(a).arr,
4092
+ "onUpdate:modelValue": C[1] || (C[1] = (g) => t(a).arr = g),
4093
+ options: t(b),
4094
+ placeholder: t(f)
4095
+ }, r.$attrs, {
4096
+ "multiple-limit": s.limit,
4097
+ onChange: V
4098
+ }), ee({
4099
+ default: _(({ it: g }) => [
4100
+ N(m, {
4101
+ name: g.value_lower
4102
+ }, null, 8, ["name"])
4103
+ ]),
4104
+ _: 2
4105
+ }, [
4106
+ s.useFooter ? {
4107
+ name: "footer",
4108
+ fn: _(() => [
4109
+ c("div", Yl, [
4110
+ N(i, {
4111
+ type: "primary",
4112
+ onClick: O
4113
+ }, {
4114
+ icon: _(() => C[2] || (C[2] = [
4115
+ c("i", { class: "imicon im-search" }, null, -1)
4116
+ ])),
4117
+ default: _(() => [
4118
+ te(" " + I(r.$l("Confirm")), 1)
4119
+ ]),
4120
+ _: 1
4121
+ })
4122
+ ])
4123
+ ]),
4124
+ key: "0"
4125
+ } : void 0
4126
+ ]), 1040, ["modelValue", "options", "placeholder", "multiple-limit"])) : (p(), Y(d, K({
4127
+ key: 1,
4128
+ modelValue: t(a).v,
4129
+ "onUpdate:modelValue": C[0] || (C[0] = (g) => t(a).v = g),
4130
+ filterable: "",
4131
+ placeholder: t(f),
4132
+ class: "wp100"
4133
+ }, r.$attrs, { onChange: k }), ee({
4134
+ default: _(() => [
4135
+ s.useAll ? (p(), Y($, {
4136
+ key: 0,
4137
+ label: r.$l("All"),
4138
+ value: s.allValue
4139
+ }, null, 8, ["label", "value"])) : B("", !0),
4140
+ (p(!0), M(oe, null, le(t(b), (g, z) => (p(), Y($, {
4141
+ key: g.value,
4142
+ label: r.$l(g.label),
4143
+ value: g.value_lower
4144
+ }, {
4145
+ default: _(() => [
4146
+ N(m, {
4147
+ name: g.value_lower
4148
+ }, null, 8, ["name"])
4149
+ ]),
4150
+ _: 2
4151
+ }, 1032, ["label", "value"]))), 128))
4152
+ ]),
4153
+ _: 2
4154
+ }, [
4155
+ t(a).v ? {
4156
+ name: "prefix",
4157
+ fn: _(() => [
4158
+ N(m, {
4159
+ name: t(a).v,
4160
+ nolabel: ""
4161
+ }, null, 8, ["name"])
4162
+ ]),
4163
+ key: "0"
4164
+ } : void 0
4165
+ ]), 1040, ["modelValue", "placeholder"]))
4166
+ ]);
4167
+ };
4168
+ }
4169
+ }), Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4170
+ __proto__: null,
4171
+ default: El
4172
+ }, Symbol.toStringTag, { value: "Module" })), Rl = { class: "SuperCountryDiy" }, Pl = { class: "flexMode hr" }, Fl = /* @__PURE__ */ Object.assign({
4173
+ name: "SuperCountryDiy"
4174
+ }, {
4175
+ __name: "CountryDiy",
4176
+ props: {
4177
+ modelValue: {
4178
+ tupe: [Array, String],
4179
+ default: ""
4180
+ },
4181
+ multiple: {
4182
+ type: Boolean,
4183
+ default: !1
4184
+ },
4185
+ useFooter: {
4186
+ type: Boolean,
4187
+ default: !1
4188
+ },
4189
+ placeholder: {
4190
+ type: String,
4191
+ default: ""
4192
+ },
4193
+ options: {
4194
+ type: Array,
4195
+ default: () => []
4196
+ }
4197
+ },
4198
+ emits: ["change", "update:modelValue"],
4199
+ setup(A, { emit: x }) {
4200
+ const s = A, e = reactive({
4201
+ single: "",
4202
+ multiple: []
4203
+ }), { proxy: o } = getCurrentInstance(), h = x, a = () => {
4204
+ o.$refs.multiple.blur();
4205
+ }, y = (O) => {
4206
+ h("update:modelValue", O), h("change", O);
4207
+ }, k = computed(() => s.placeholder ? window.$l(s.placeholder) : window.$l("Country or Region")), V = computed(() => s.options.sort((O, b) => O.label.localeCompare(b.label)));
4208
+ return watch(
4209
+ () => s.modelValue,
4210
+ (O, b) => {
4211
+ JSON.stringify(O) !== JSON.stringify(b) && (s.multiple ? e.multiple = O : e.single = O);
4212
+ },
4213
+ {
4214
+ immediate: !0
4215
+ }
4216
+ ), (O, b) => {
4217
+ const f = D("CountryItem"), r = D("el-button"), C = D("MultipleSelect"), u = D("el-option"), m = D("el-select");
4218
+ return p(), M("div", Rl, [
4219
+ s.multiple ? (p(), Y(C, K({
4220
+ key: 0,
4221
+ ref: "multiple",
4222
+ modelValue: t(e).multiple,
4223
+ "onUpdate:modelValue": b[0] || (b[0] = ($) => t(e).multiple = $),
4224
+ placeholder: t(k)
4225
+ }, O.$attrs, {
4226
+ options: t(V),
4227
+ onChange: y
4228
+ }), ee({
4229
+ default: _(({ it: $ }) => [
4230
+ N(f, {
4231
+ name: $.value
4232
+ }, null, 8, ["name"])
4233
+ ]),
4234
+ _: 2
4235
+ }, [
4236
+ s.useFooter ? {
4237
+ name: "footer",
4238
+ fn: _(() => [
4239
+ c("div", Pl, [
4240
+ N(r, {
4241
+ type: "primary",
4242
+ onClick: a
4243
+ }, {
4244
+ default: _(() => [
4245
+ te(I(O.$l("Confirm")), 1)
4246
+ ]),
4247
+ _: 1
4248
+ })
4249
+ ])
4250
+ ]),
4251
+ key: "0"
4252
+ } : O.$slots.footer ? {
4253
+ name: "footer",
4254
+ fn: _(() => [
4255
+ H(O.$slots, "footer")
4256
+ ]),
4257
+ key: "1"
4258
+ } : void 0
4259
+ ]), 1040, ["modelValue", "placeholder", "options"])) : (p(), Y(m, K({
4260
+ key: 1,
4261
+ modelValue: t(e).single,
4262
+ "onUpdate:modelValue": b[1] || (b[1] = ($) => t(e).single = $),
4263
+ placeholder: t(k)
4264
+ }, O.$attrs, { onChange: y }), ee({
4265
+ default: _(() => [
4266
+ (p(!0), M(oe, null, le(t(V), ($, d) => (p(), Y(u, {
4267
+ key: d,
4268
+ label: O.$l($.label),
4269
+ value: $.value
4270
+ }, {
4271
+ default: _(() => [
4272
+ N(f, {
4273
+ name: $.value
4274
+ }, null, 8, ["name"])
4275
+ ]),
4276
+ _: 2
4277
+ }, 1032, ["label", "value"]))), 128))
4278
+ ]),
4279
+ _: 2
4280
+ }, [
4281
+ t(e).single ? {
4282
+ name: "prefix",
4283
+ fn: _(() => [
4284
+ N(f, {
4285
+ name: t(e).single,
4286
+ nolabel: ""
4287
+ }, null, 8, ["name"])
4288
+ ]),
4289
+ key: "0"
4290
+ } : void 0
4291
+ ]), 1040, ["modelValue", "placeholder"]))
4292
+ ]);
4293
+ };
4294
+ }
4295
+ }), Ul = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4296
+ __proto__: null,
4297
+ default: Fl
4298
+ }, Symbol.toStringTag, { value: "Module" }));
4299
+ export {
4300
+ ql as c
4301
+ };