@jctrans-materials/comps-vue2 1.0.0 → 1.0.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.
- package/dist/components/search/hooks/useSearchHistory.d.ts +4 -2
- package/dist/components/search/hooks/useSearchLogic.d.ts +2 -0
- package/dist/components/search/index.d.ts +26 -7
- package/dist/index.cjs.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.esm.js +477 -427
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { locationSearchV2 as
|
|
3
|
-
import { MODAL_ACTION as
|
|
4
|
-
import { Col as
|
|
5
|
-
|
|
1
|
+
import ne, { ref as R, computed as L, onMounted as oe, onBeforeUnmount as Ht, defineComponent as se, toRef as bt, watch as xt, reactive as Ct } from "vue";
|
|
2
|
+
import { locationSearchV2 as Ut, emitter as K, MODAL_ACTION as Y } from "@jctrans-materials/shared";
|
|
3
|
+
import { MODAL_ACTION as Ln, emitter as Bn } from "@jctrans-materials/shared";
|
|
4
|
+
import { Col as Rt, Row as St, Checkbox as Dt, Button as Ot, Input as Et, FormItem as _t, Form as kt, Dialog as Tt } from "jctrans-ui";
|
|
5
|
+
ne.util.warn;
|
|
6
6
|
function ie(e) {
|
|
7
|
-
const t =
|
|
7
|
+
const t = R([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", s = L(
|
|
8
8
|
() => (e.value || "") + n
|
|
9
|
-
), i =
|
|
10
|
-
() => e.value && e.value !== ""
|
|
9
|
+
), i = L(
|
|
10
|
+
() => !!e.value && e.value !== ""
|
|
11
11
|
), l = (a) => {
|
|
12
12
|
if (!a || !o) return;
|
|
13
13
|
const c = t.value.filter(
|
|
@@ -15,16 +15,18 @@ function ie(e) {
|
|
|
15
15
|
);
|
|
16
16
|
c.unshift(a);
|
|
17
17
|
const u = c.slice(0, 4);
|
|
18
|
-
if (
|
|
18
|
+
if (i.value) {
|
|
19
|
+
t.value = u;
|
|
19
20
|
try {
|
|
20
21
|
localStorage.setItem(s.value, JSON.stringify(u));
|
|
21
22
|
} catch (d) {
|
|
22
23
|
console.warn("LocalStorage save failed:", d);
|
|
23
24
|
}
|
|
25
|
+
}
|
|
24
26
|
}, r = () => {
|
|
25
27
|
t.value = [], o && localStorage.removeItem(s.value);
|
|
26
28
|
};
|
|
27
|
-
return
|
|
29
|
+
return oe(() => {
|
|
28
30
|
if (o && i.value) {
|
|
29
31
|
const a = localStorage.getItem(s.value);
|
|
30
32
|
if (a)
|
|
@@ -48,15 +50,15 @@ async function le(e, t = [
|
|
|
48
50
|
"Seaport",
|
|
49
51
|
"Airport"
|
|
50
52
|
], n = {}) {
|
|
51
|
-
return
|
|
53
|
+
return Ut.searchByName({
|
|
52
54
|
keyword: e,
|
|
53
55
|
displayInfo: t,
|
|
54
56
|
...n
|
|
55
57
|
});
|
|
56
58
|
}
|
|
57
|
-
const re = (e, t) =>
|
|
59
|
+
const re = (e, t) => Ut.searchByIdWithType(e, t);
|
|
58
60
|
function ae(e, t) {
|
|
59
|
-
const n =
|
|
61
|
+
const n = R([]), o = R(!1), s = R(!1), i = R(1), l = R(0), r = R(10), a = L(() => l.value === 0 ? !1 : n.value.length >= l.value), c = L(() => {
|
|
60
62
|
const m = [...t.value];
|
|
61
63
|
return m.includes("Country") && !m.includes("Region") && m.push("Region"), m;
|
|
62
64
|
}), u = (m) => !m || !Array.isArray(m) ? [] : m.filter(
|
|
@@ -85,8 +87,8 @@ function ae(e, t) {
|
|
|
85
87
|
// 使用传入的 page 参数
|
|
86
88
|
size: r.value
|
|
87
89
|
}
|
|
88
|
-
),
|
|
89
|
-
f ? n.value = [...n.value, ...
|
|
90
|
+
), g = p.records || [], y = u(g);
|
|
91
|
+
f ? n.value = [...n.value, ...y] : n.value = y, l.value = p.total || 0, i.value = m;
|
|
90
92
|
} catch (p) {
|
|
91
93
|
console.error("Failed to fetch search results:", p);
|
|
92
94
|
} finally {
|
|
@@ -97,7 +99,7 @@ function ae(e, t) {
|
|
|
97
99
|
filterByTypes: u
|
|
98
100
|
};
|
|
99
101
|
}
|
|
100
|
-
const
|
|
102
|
+
const j = Math.min, S = Math.max, lt = Math.round, it = Math.floor, B = (e) => ({
|
|
101
103
|
x: e,
|
|
102
104
|
y: e
|
|
103
105
|
}), ce = {
|
|
@@ -109,50 +111,50 @@ const Y = Math.min, R = Math.max, it = Math.round, ot = Math.floor, F = (e) => (
|
|
|
109
111
|
start: "end",
|
|
110
112
|
end: "start"
|
|
111
113
|
};
|
|
112
|
-
function
|
|
113
|
-
return
|
|
114
|
+
function Ft(e, t, n) {
|
|
115
|
+
return S(e, j(t, n));
|
|
114
116
|
}
|
|
115
|
-
function
|
|
117
|
+
function nt(e, t) {
|
|
116
118
|
return typeof e == "function" ? e(t) : e;
|
|
117
119
|
}
|
|
118
|
-
function
|
|
120
|
+
function U(e) {
|
|
119
121
|
return e.split("-")[0];
|
|
120
122
|
}
|
|
121
|
-
function
|
|
123
|
+
function ot(e) {
|
|
122
124
|
return e.split("-")[1];
|
|
123
125
|
}
|
|
124
126
|
function qt(e) {
|
|
125
127
|
return e === "x" ? "y" : "x";
|
|
126
128
|
}
|
|
127
|
-
function
|
|
129
|
+
function Wt(e) {
|
|
128
130
|
return e === "y" ? "height" : "width";
|
|
129
131
|
}
|
|
130
132
|
const fe = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
131
|
-
function
|
|
132
|
-
return fe.has(
|
|
133
|
+
function H(e) {
|
|
134
|
+
return fe.has(U(e)) ? "y" : "x";
|
|
133
135
|
}
|
|
134
|
-
function
|
|
135
|
-
return qt(
|
|
136
|
+
function Gt(e) {
|
|
137
|
+
return qt(H(e));
|
|
136
138
|
}
|
|
137
139
|
function de(e, t, n) {
|
|
138
140
|
n === void 0 && (n = !1);
|
|
139
|
-
const o =
|
|
141
|
+
const o = ot(e), s = Gt(e), i = Wt(s);
|
|
140
142
|
let l = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
141
|
-
return t.reference[i] > t.floating[i] && (l =
|
|
143
|
+
return t.reference[i] > t.floating[i] && (l = rt(l)), [l, rt(l)];
|
|
142
144
|
}
|
|
143
145
|
function me(e) {
|
|
144
|
-
const t =
|
|
146
|
+
const t = rt(e);
|
|
145
147
|
return [pt(e), t, pt(t)];
|
|
146
148
|
}
|
|
147
149
|
function pt(e) {
|
|
148
150
|
return e.replace(/start|end/g, (t) => ue[t]);
|
|
149
151
|
}
|
|
150
|
-
const
|
|
152
|
+
const It = ["left", "right"], Lt = ["right", "left"], pe = ["top", "bottom"], he = ["bottom", "top"];
|
|
151
153
|
function ge(e, t, n) {
|
|
152
154
|
switch (e) {
|
|
153
155
|
case "top":
|
|
154
156
|
case "bottom":
|
|
155
|
-
return n ? t ? Lt :
|
|
157
|
+
return n ? t ? Lt : It : t ? It : Lt;
|
|
156
158
|
case "left":
|
|
157
159
|
case "right":
|
|
158
160
|
return t ? pe : he;
|
|
@@ -161,11 +163,11 @@ function ge(e, t, n) {
|
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
function ve(e, t, n, o) {
|
|
164
|
-
const s =
|
|
165
|
-
let i = ge(
|
|
166
|
+
const s = ot(e);
|
|
167
|
+
let i = ge(U(e), n === "start", o);
|
|
166
168
|
return s && (i = i.map((l) => l + "-" + s), t && (i = i.concat(i.map(pt)))), i;
|
|
167
169
|
}
|
|
168
|
-
function
|
|
170
|
+
function rt(e) {
|
|
169
171
|
return e.replace(/left|right|bottom|top/g, (t) => ce[t]);
|
|
170
172
|
}
|
|
171
173
|
function ye(e) {
|
|
@@ -185,7 +187,7 @@ function Ae(e) {
|
|
|
185
187
|
left: e
|
|
186
188
|
};
|
|
187
189
|
}
|
|
188
|
-
function
|
|
190
|
+
function at(e) {
|
|
189
191
|
const {
|
|
190
192
|
x: t,
|
|
191
193
|
y: n,
|
|
@@ -203,12 +205,12 @@ function rt(e) {
|
|
|
203
205
|
y: n
|
|
204
206
|
};
|
|
205
207
|
}
|
|
206
|
-
function
|
|
208
|
+
function Bt(e, t, n) {
|
|
207
209
|
let {
|
|
208
210
|
reference: o,
|
|
209
211
|
floating: s
|
|
210
212
|
} = e;
|
|
211
|
-
const i =
|
|
213
|
+
const i = H(t), l = Gt(t), r = Wt(l), a = U(t), c = i === "y", u = o.x + o.width / 2 - s.width / 2, d = o.y + o.height / 2 - s.height / 2, m = o[r] / 2 - s[r] / 2;
|
|
212
214
|
let f;
|
|
213
215
|
switch (a) {
|
|
214
216
|
case "top":
|
|
@@ -241,7 +243,7 @@ function It(e, t, n) {
|
|
|
241
243
|
y: o.y
|
|
242
244
|
};
|
|
243
245
|
}
|
|
244
|
-
switch (
|
|
246
|
+
switch (ot(t)) {
|
|
245
247
|
case "start":
|
|
246
248
|
f[l] -= m * (n && c ? -1 : 1);
|
|
247
249
|
break;
|
|
@@ -265,17 +267,17 @@ const we = async (e, t, n) => {
|
|
|
265
267
|
}), {
|
|
266
268
|
x: u,
|
|
267
269
|
y: d
|
|
268
|
-
} =
|
|
269
|
-
for (let
|
|
270
|
+
} = Bt(c, o, a), m = o, f = {}, p = 0;
|
|
271
|
+
for (let g = 0; g < r.length; g++) {
|
|
270
272
|
const {
|
|
271
|
-
name:
|
|
272
|
-
fn:
|
|
273
|
-
} = r[
|
|
274
|
-
x:
|
|
275
|
-
y:
|
|
276
|
-
data:
|
|
277
|
-
reset:
|
|
278
|
-
} = await
|
|
273
|
+
name: y,
|
|
274
|
+
fn: v
|
|
275
|
+
} = r[g], {
|
|
276
|
+
x: A,
|
|
277
|
+
y: w,
|
|
278
|
+
data: C,
|
|
279
|
+
reset: b
|
|
280
|
+
} = await v({
|
|
279
281
|
x: u,
|
|
280
282
|
y: d,
|
|
281
283
|
initialPlacement: o,
|
|
@@ -289,20 +291,20 @@ const we = async (e, t, n) => {
|
|
|
289
291
|
floating: t
|
|
290
292
|
}
|
|
291
293
|
});
|
|
292
|
-
u =
|
|
294
|
+
u = A ?? u, d = w ?? d, f = {
|
|
293
295
|
...f,
|
|
294
|
-
[
|
|
295
|
-
...f[
|
|
296
|
-
...
|
|
296
|
+
[y]: {
|
|
297
|
+
...f[y],
|
|
298
|
+
...C
|
|
297
299
|
}
|
|
298
|
-
},
|
|
300
|
+
}, b && p <= 50 && (p++, typeof b == "object" && (b.placement && (m = b.placement), b.rects && (c = b.rects === !0 ? await l.getElementRects({
|
|
299
301
|
reference: e,
|
|
300
302
|
floating: t,
|
|
301
303
|
strategy: s
|
|
302
|
-
}) :
|
|
304
|
+
}) : b.rects), {
|
|
303
305
|
x: u,
|
|
304
306
|
y: d
|
|
305
|
-
} =
|
|
307
|
+
} = Bt(c, m, a)), g = -1);
|
|
306
308
|
}
|
|
307
309
|
return {
|
|
308
310
|
x: u,
|
|
@@ -328,36 +330,36 @@ async function gt(e, t) {
|
|
|
328
330
|
elementContext: d = "floating",
|
|
329
331
|
altBoundary: m = !1,
|
|
330
332
|
padding: f = 0
|
|
331
|
-
} =
|
|
332
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(
|
|
333
|
+
} = nt(t, e), p = Ae(f), y = r[m ? d === "floating" ? "reference" : "floating" : d], v = at(await i.getClippingRect({
|
|
334
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(r.floating)),
|
|
333
335
|
boundary: c,
|
|
334
336
|
rootBoundary: u,
|
|
335
337
|
strategy: a
|
|
336
|
-
})),
|
|
338
|
+
})), A = d === "floating" ? {
|
|
337
339
|
x: o,
|
|
338
340
|
y: s,
|
|
339
341
|
width: l.floating.width,
|
|
340
342
|
height: l.floating.height
|
|
341
|
-
} : l.reference,
|
|
343
|
+
} : l.reference, w = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(r.floating)), C = await (i.isElement == null ? void 0 : i.isElement(w)) ? await (i.getScale == null ? void 0 : i.getScale(w)) || {
|
|
342
344
|
x: 1,
|
|
343
345
|
y: 1
|
|
344
346
|
} : {
|
|
345
347
|
x: 1,
|
|
346
348
|
y: 1
|
|
347
|
-
},
|
|
349
|
+
}, b = at(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
348
350
|
elements: r,
|
|
349
|
-
rect:
|
|
350
|
-
offsetParent:
|
|
351
|
+
rect: A,
|
|
352
|
+
offsetParent: w,
|
|
351
353
|
strategy: a
|
|
352
|
-
}) :
|
|
354
|
+
}) : A);
|
|
353
355
|
return {
|
|
354
|
-
top: (
|
|
355
|
-
bottom: (
|
|
356
|
-
left: (
|
|
357
|
-
right: (
|
|
356
|
+
top: (v.top - b.top + p.top) / C.y,
|
|
357
|
+
bottom: (b.bottom - v.bottom + p.bottom) / C.y,
|
|
358
|
+
left: (v.left - b.left + p.left) / C.x,
|
|
359
|
+
right: (b.right - v.right + p.right) / C.x
|
|
358
360
|
};
|
|
359
361
|
}
|
|
360
|
-
const
|
|
362
|
+
const be = function(e) {
|
|
361
363
|
return e === void 0 && (e = {}), {
|
|
362
364
|
name: "flip",
|
|
363
365
|
options: e,
|
|
@@ -376,75 +378,75 @@ const xe = function(e) {
|
|
|
376
378
|
fallbackPlacements: m,
|
|
377
379
|
fallbackStrategy: f = "bestFit",
|
|
378
380
|
fallbackAxisSideDirection: p = "none",
|
|
379
|
-
flipAlignment:
|
|
380
|
-
...
|
|
381
|
-
} =
|
|
381
|
+
flipAlignment: g = !0,
|
|
382
|
+
...y
|
|
383
|
+
} = nt(e, t);
|
|
382
384
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
383
385
|
return {};
|
|
384
|
-
const
|
|
385
|
-
!m &&
|
|
386
|
-
const
|
|
387
|
-
let
|
|
388
|
-
if (u &&
|
|
389
|
-
const
|
|
390
|
-
|
|
386
|
+
const v = U(s), A = H(r), w = U(r) === r, C = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), b = m || (w || !g ? [rt(r)] : me(r)), _ = p !== "none";
|
|
387
|
+
!m && _ && b.push(...ve(r, g, p, C));
|
|
388
|
+
const O = [r, ...b], V = await gt(t, y), Q = [];
|
|
389
|
+
let k = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
390
|
+
if (u && Q.push(V[v]), d) {
|
|
391
|
+
const E = de(s, l, C);
|
|
392
|
+
Q.push(V[E[0]], V[E[1]]);
|
|
391
393
|
}
|
|
392
|
-
if (
|
|
394
|
+
if (k = [...k, {
|
|
393
395
|
placement: s,
|
|
394
|
-
overflows:
|
|
395
|
-
}], !
|
|
396
|
-
var
|
|
397
|
-
const
|
|
398
|
-
if (
|
|
396
|
+
overflows: Q
|
|
397
|
+
}], !Q.every((E) => E <= 0)) {
|
|
398
|
+
var W, G;
|
|
399
|
+
const E = (((W = i.flip) == null ? void 0 : W.index) || 0) + 1, tt = O[E];
|
|
400
|
+
if (tt && (!(d === "alignment" ? A !== H(tt) : !1) || // We leave the current main axis only if every placement on that axis
|
|
399
401
|
// overflows the main axis.
|
|
400
|
-
|
|
402
|
+
k.every((h) => H(h.placement) === A ? h.overflows[0] > 0 : !0)))
|
|
401
403
|
return {
|
|
402
404
|
data: {
|
|
403
|
-
index:
|
|
404
|
-
overflows:
|
|
405
|
+
index: E,
|
|
406
|
+
overflows: k
|
|
405
407
|
},
|
|
406
408
|
reset: {
|
|
407
|
-
placement:
|
|
409
|
+
placement: tt
|
|
408
410
|
}
|
|
409
411
|
};
|
|
410
|
-
let
|
|
411
|
-
if (
|
|
412
|
+
let J = (G = k.filter((N) => N.overflows[0] <= 0).sort((N, h) => N.overflows[1] - h.overflows[1])[0]) == null ? void 0 : G.placement;
|
|
413
|
+
if (!J)
|
|
412
414
|
switch (f) {
|
|
413
415
|
case "bestFit": {
|
|
414
|
-
var
|
|
415
|
-
const
|
|
416
|
-
if (
|
|
417
|
-
const
|
|
418
|
-
return
|
|
416
|
+
var T;
|
|
417
|
+
const N = (T = k.filter((h) => {
|
|
418
|
+
if (_) {
|
|
419
|
+
const x = H(h.placement);
|
|
420
|
+
return x === A || // Create a bias to the `y` side axis due to horizontal
|
|
419
421
|
// reading directions favoring greater width.
|
|
420
|
-
|
|
422
|
+
x === "y";
|
|
421
423
|
}
|
|
422
424
|
return !0;
|
|
423
|
-
}).map((
|
|
424
|
-
|
|
425
|
+
}).map((h) => [h.placement, h.overflows.filter((x) => x > 0).reduce((x, ee) => x + ee, 0)]).sort((h, x) => h[1] - x[1])[0]) == null ? void 0 : T[0];
|
|
426
|
+
N && (J = N);
|
|
425
427
|
break;
|
|
426
428
|
}
|
|
427
429
|
case "initialPlacement":
|
|
428
|
-
|
|
430
|
+
J = r;
|
|
429
431
|
break;
|
|
430
432
|
}
|
|
431
|
-
if (s !==
|
|
433
|
+
if (s !== J)
|
|
432
434
|
return {
|
|
433
435
|
reset: {
|
|
434
|
-
placement:
|
|
436
|
+
placement: J
|
|
435
437
|
}
|
|
436
438
|
};
|
|
437
439
|
}
|
|
438
440
|
return {};
|
|
439
441
|
}
|
|
440
442
|
};
|
|
441
|
-
},
|
|
443
|
+
}, xe = /* @__PURE__ */ new Set(["left", "top"]);
|
|
442
444
|
async function Ce(e, t) {
|
|
443
445
|
const {
|
|
444
446
|
placement: n,
|
|
445
447
|
platform: o,
|
|
446
448
|
elements: s
|
|
447
|
-
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), l =
|
|
449
|
+
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), l = U(n), r = ot(n), a = H(n) === "y", c = xe.has(l) ? -1 : 1, u = i && a ? -1 : 1, d = nt(t, e);
|
|
448
450
|
let {
|
|
449
451
|
mainAxis: m,
|
|
450
452
|
crossAxis: f,
|
|
@@ -488,7 +490,7 @@ const Re = function(e) {
|
|
|
488
490
|
};
|
|
489
491
|
}
|
|
490
492
|
};
|
|
491
|
-
},
|
|
493
|
+
}, Se = function(e) {
|
|
492
494
|
return e === void 0 && (e = {}), {
|
|
493
495
|
name: "shift",
|
|
494
496
|
options: e,
|
|
@@ -501,41 +503,41 @@ const Re = function(e) {
|
|
|
501
503
|
mainAxis: i = !0,
|
|
502
504
|
crossAxis: l = !1,
|
|
503
505
|
limiter: r = {
|
|
504
|
-
fn: (
|
|
506
|
+
fn: (y) => {
|
|
505
507
|
let {
|
|
506
|
-
x:
|
|
507
|
-
y
|
|
508
|
-
} =
|
|
508
|
+
x: v,
|
|
509
|
+
y: A
|
|
510
|
+
} = y;
|
|
509
511
|
return {
|
|
510
|
-
x:
|
|
511
|
-
y
|
|
512
|
+
x: v,
|
|
513
|
+
y: A
|
|
512
514
|
};
|
|
513
515
|
}
|
|
514
516
|
},
|
|
515
517
|
...a
|
|
516
|
-
} =
|
|
518
|
+
} = nt(e, t), c = {
|
|
517
519
|
x: n,
|
|
518
520
|
y: o
|
|
519
|
-
}, u = await gt(t, a), d =
|
|
521
|
+
}, u = await gt(t, a), d = H(U(s)), m = qt(d);
|
|
520
522
|
let f = c[m], p = c[d];
|
|
521
523
|
if (i) {
|
|
522
|
-
const
|
|
523
|
-
f =
|
|
524
|
+
const y = m === "y" ? "top" : "left", v = m === "y" ? "bottom" : "right", A = f + u[y], w = f - u[v];
|
|
525
|
+
f = Ft(A, f, w);
|
|
524
526
|
}
|
|
525
527
|
if (l) {
|
|
526
|
-
const
|
|
527
|
-
p =
|
|
528
|
+
const y = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right", A = p + u[y], w = p - u[v];
|
|
529
|
+
p = Ft(A, p, w);
|
|
528
530
|
}
|
|
529
|
-
const
|
|
531
|
+
const g = r.fn({
|
|
530
532
|
...t,
|
|
531
533
|
[m]: f,
|
|
532
534
|
[d]: p
|
|
533
535
|
});
|
|
534
536
|
return {
|
|
535
|
-
...
|
|
537
|
+
...g,
|
|
536
538
|
data: {
|
|
537
|
-
x:
|
|
538
|
-
y:
|
|
539
|
+
x: g.x - n,
|
|
540
|
+
y: g.y - o,
|
|
539
541
|
enabled: {
|
|
540
542
|
[m]: i,
|
|
541
543
|
[d]: l
|
|
@@ -544,7 +546,7 @@ const Re = function(e) {
|
|
|
544
546
|
};
|
|
545
547
|
}
|
|
546
548
|
};
|
|
547
|
-
},
|
|
549
|
+
}, De = function(e) {
|
|
548
550
|
return e === void 0 && (e = {}), {
|
|
549
551
|
name: "size",
|
|
550
552
|
options: e,
|
|
@@ -559,25 +561,25 @@ const Re = function(e) {
|
|
|
559
561
|
apply: a = () => {
|
|
560
562
|
},
|
|
561
563
|
...c
|
|
562
|
-
} =
|
|
564
|
+
} = nt(e, t), u = await gt(t, c), d = U(s), m = ot(s), f = H(s) === "y", {
|
|
563
565
|
width: p,
|
|
564
|
-
height:
|
|
566
|
+
height: g
|
|
565
567
|
} = i.floating;
|
|
566
|
-
let
|
|
567
|
-
d === "top" || d === "bottom" ? (
|
|
568
|
-
const
|
|
569
|
-
let
|
|
570
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
571
|
-
const
|
|
572
|
-
f ?
|
|
568
|
+
let y, v;
|
|
569
|
+
d === "top" || d === "bottom" ? (y = d, v = m === (await (l.isRTL == null ? void 0 : l.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (v = d, y = m === "end" ? "top" : "bottom");
|
|
570
|
+
const A = g - u.top - u.bottom, w = p - u.left - u.right, C = j(g - u[y], A), b = j(p - u[v], w), _ = !t.middlewareData.shift;
|
|
571
|
+
let O = C, V = b;
|
|
572
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (V = w), (o = t.middlewareData.shift) != null && o.enabled.y && (O = A), _ && !m) {
|
|
573
|
+
const k = S(u.left, 0), W = S(u.right, 0), G = S(u.top, 0), T = S(u.bottom, 0);
|
|
574
|
+
f ? V = p - 2 * (k !== 0 || W !== 0 ? k + W : S(u.left, u.right)) : O = g - 2 * (G !== 0 || T !== 0 ? G + T : S(u.top, u.bottom));
|
|
573
575
|
}
|
|
574
576
|
await a({
|
|
575
577
|
...t,
|
|
576
|
-
availableWidth:
|
|
577
|
-
availableHeight:
|
|
578
|
+
availableWidth: V,
|
|
579
|
+
availableHeight: O
|
|
578
580
|
});
|
|
579
|
-
const
|
|
580
|
-
return p !==
|
|
581
|
+
const Q = await l.getDimensions(r.floating);
|
|
582
|
+
return p !== Q.width || g !== Q.height ? {
|
|
581
583
|
reset: {
|
|
582
584
|
rects: !0
|
|
583
585
|
}
|
|
@@ -585,49 +587,49 @@ const Re = function(e) {
|
|
|
585
587
|
}
|
|
586
588
|
};
|
|
587
589
|
};
|
|
588
|
-
function
|
|
590
|
+
function ct() {
|
|
589
591
|
return typeof window < "u";
|
|
590
592
|
}
|
|
591
|
-
function
|
|
592
|
-
return
|
|
593
|
+
function Z(e) {
|
|
594
|
+
return Jt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
593
595
|
}
|
|
594
596
|
function D(e) {
|
|
595
597
|
var t;
|
|
596
598
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
597
599
|
}
|
|
598
|
-
function
|
|
600
|
+
function P(e) {
|
|
599
601
|
var t;
|
|
600
|
-
return (t = (
|
|
602
|
+
return (t = (Jt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
601
603
|
}
|
|
602
|
-
function
|
|
603
|
-
return
|
|
604
|
+
function Jt(e) {
|
|
605
|
+
return ct() ? e instanceof Node || e instanceof D(e).Node : !1;
|
|
604
606
|
}
|
|
605
|
-
function
|
|
606
|
-
return
|
|
607
|
+
function F(e) {
|
|
608
|
+
return ct() ? e instanceof Element || e instanceof D(e).Element : !1;
|
|
607
609
|
}
|
|
608
|
-
function
|
|
609
|
-
return
|
|
610
|
+
function M(e) {
|
|
611
|
+
return ct() ? e instanceof HTMLElement || e instanceof D(e).HTMLElement : !1;
|
|
610
612
|
}
|
|
611
|
-
function
|
|
612
|
-
return !
|
|
613
|
+
function Mt(e) {
|
|
614
|
+
return !ct() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof D(e).ShadowRoot;
|
|
613
615
|
}
|
|
614
616
|
const Oe = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
615
|
-
function
|
|
617
|
+
function st(e) {
|
|
616
618
|
const {
|
|
617
619
|
overflow: t,
|
|
618
620
|
overflowX: n,
|
|
619
621
|
overflowY: o,
|
|
620
622
|
display: s
|
|
621
|
-
} =
|
|
623
|
+
} = I(e);
|
|
622
624
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !Oe.has(s);
|
|
623
625
|
}
|
|
624
626
|
const Ee = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
625
|
-
function
|
|
626
|
-
return Ee.has(
|
|
627
|
+
function _e(e) {
|
|
628
|
+
return Ee.has(Z(e));
|
|
627
629
|
}
|
|
628
|
-
const
|
|
629
|
-
function
|
|
630
|
-
return
|
|
630
|
+
const ke = [":popover-open", ":modal"];
|
|
631
|
+
function ut(e) {
|
|
632
|
+
return ke.some((t) => {
|
|
631
633
|
try {
|
|
632
634
|
return e.matches(t);
|
|
633
635
|
} catch {
|
|
@@ -635,19 +637,19 @@ function ct(e) {
|
|
|
635
637
|
}
|
|
636
638
|
});
|
|
637
639
|
}
|
|
638
|
-
const Te = ["transform", "translate", "scale", "rotate", "perspective"], Fe = ["transform", "translate", "scale", "rotate", "perspective", "filter"],
|
|
640
|
+
const Te = ["transform", "translate", "scale", "rotate", "perspective"], Fe = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ie = ["paint", "layout", "strict", "content"];
|
|
639
641
|
function vt(e) {
|
|
640
|
-
const t = yt(), n =
|
|
641
|
-
return Te.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Fe.some((o) => (n.willChange || "").includes(o)) ||
|
|
642
|
+
const t = yt(), n = F(e) ? I(e) : e;
|
|
643
|
+
return Te.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Fe.some((o) => (n.willChange || "").includes(o)) || Ie.some((o) => (n.contain || "").includes(o));
|
|
642
644
|
}
|
|
643
|
-
function
|
|
644
|
-
let t =
|
|
645
|
-
for (;
|
|
645
|
+
function Le(e) {
|
|
646
|
+
let t = q(e);
|
|
647
|
+
for (; M(t) && !$(t); ) {
|
|
646
648
|
if (vt(t))
|
|
647
649
|
return t;
|
|
648
|
-
if (
|
|
650
|
+
if (ut(t))
|
|
649
651
|
return null;
|
|
650
|
-
t =
|
|
652
|
+
t = q(t);
|
|
651
653
|
}
|
|
652
654
|
return null;
|
|
653
655
|
}
|
|
@@ -655,14 +657,14 @@ function yt() {
|
|
|
655
657
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
656
658
|
}
|
|
657
659
|
const Be = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
658
|
-
function
|
|
659
|
-
return Be.has(
|
|
660
|
+
function $(e) {
|
|
661
|
+
return Be.has(Z(e));
|
|
660
662
|
}
|
|
661
|
-
function
|
|
663
|
+
function I(e) {
|
|
662
664
|
return D(e).getComputedStyle(e);
|
|
663
665
|
}
|
|
664
|
-
function
|
|
665
|
-
return
|
|
666
|
+
function ft(e) {
|
|
667
|
+
return F(e) ? {
|
|
666
668
|
scrollLeft: e.scrollLeft,
|
|
667
669
|
scrollTop: e.scrollTop
|
|
668
670
|
} : {
|
|
@@ -670,39 +672,39 @@ function ut(e) {
|
|
|
670
672
|
scrollTop: e.scrollY
|
|
671
673
|
};
|
|
672
674
|
}
|
|
673
|
-
function
|
|
674
|
-
if (
|
|
675
|
+
function q(e) {
|
|
676
|
+
if (Z(e) === "html")
|
|
675
677
|
return e;
|
|
676
678
|
const t = (
|
|
677
679
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
678
680
|
e.assignedSlot || // DOM Element detected.
|
|
679
681
|
e.parentNode || // ShadowRoot detected.
|
|
680
|
-
|
|
681
|
-
|
|
682
|
+
Mt(e) && e.host || // Fallback.
|
|
683
|
+
P(e)
|
|
682
684
|
);
|
|
683
|
-
return
|
|
685
|
+
return Mt(t) ? t.host : t;
|
|
684
686
|
}
|
|
685
|
-
function
|
|
686
|
-
const t =
|
|
687
|
-
return
|
|
687
|
+
function Kt(e) {
|
|
688
|
+
const t = q(e);
|
|
689
|
+
return $(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : M(t) && st(t) ? t : Kt(t);
|
|
688
690
|
}
|
|
689
|
-
function
|
|
691
|
+
function et(e, t, n) {
|
|
690
692
|
var o;
|
|
691
693
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
692
|
-
const s =
|
|
694
|
+
const s = Kt(e), i = s === ((o = e.ownerDocument) == null ? void 0 : o.body), l = D(s);
|
|
693
695
|
if (i) {
|
|
694
696
|
const r = ht(l);
|
|
695
|
-
return t.concat(l, l.visualViewport || [],
|
|
697
|
+
return t.concat(l, l.visualViewport || [], st(s) ? s : [], r && n ? et(r) : []);
|
|
696
698
|
}
|
|
697
|
-
return t.concat(s,
|
|
699
|
+
return t.concat(s, et(s, [], n));
|
|
698
700
|
}
|
|
699
701
|
function ht(e) {
|
|
700
702
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
701
703
|
}
|
|
702
|
-
function
|
|
703
|
-
const t =
|
|
704
|
+
function Yt(e) {
|
|
705
|
+
const t = I(e);
|
|
704
706
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
705
|
-
const s =
|
|
707
|
+
const s = M(e), i = s ? e.offsetWidth : n, l = s ? e.offsetHeight : o, r = lt(n) !== i || lt(o) !== l;
|
|
706
708
|
return r && (n = i, o = l), {
|
|
707
709
|
width: n,
|
|
708
710
|
height: o,
|
|
@@ -710,25 +712,25 @@ function Kt(e) {
|
|
|
710
712
|
};
|
|
711
713
|
}
|
|
712
714
|
function At(e) {
|
|
713
|
-
return
|
|
715
|
+
return F(e) ? e : e.contextElement;
|
|
714
716
|
}
|
|
715
|
-
function
|
|
717
|
+
function X(e) {
|
|
716
718
|
const t = At(e);
|
|
717
|
-
if (!
|
|
718
|
-
return
|
|
719
|
+
if (!M(t))
|
|
720
|
+
return B(1);
|
|
719
721
|
const n = t.getBoundingClientRect(), {
|
|
720
722
|
width: o,
|
|
721
723
|
height: s,
|
|
722
724
|
$: i
|
|
723
|
-
} =
|
|
724
|
-
let l = (i ?
|
|
725
|
+
} = Yt(t);
|
|
726
|
+
let l = (i ? lt(n.width) : n.width) / o, r = (i ? lt(n.height) : n.height) / s;
|
|
725
727
|
return (!l || !Number.isFinite(l)) && (l = 1), (!r || !Number.isFinite(r)) && (r = 1), {
|
|
726
728
|
x: l,
|
|
727
729
|
y: r
|
|
728
730
|
};
|
|
729
731
|
}
|
|
730
|
-
const Me = /* @__PURE__ */
|
|
731
|
-
function
|
|
732
|
+
const Me = /* @__PURE__ */ B(0);
|
|
733
|
+
function zt(e) {
|
|
732
734
|
const t = D(e);
|
|
733
735
|
return !yt() || !t.visualViewport ? Me : {
|
|
734
736
|
x: t.visualViewport.offsetLeft,
|
|
@@ -738,34 +740,34 @@ function Yt(e) {
|
|
|
738
740
|
function Pe(e, t, n) {
|
|
739
741
|
return t === void 0 && (t = !1), !n || t && n !== D(e) ? !1 : t;
|
|
740
742
|
}
|
|
741
|
-
function
|
|
743
|
+
function z(e, t, n, o) {
|
|
742
744
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
743
745
|
const s = e.getBoundingClientRect(), i = At(e);
|
|
744
|
-
let l =
|
|
745
|
-
t && (o ?
|
|
746
|
-
const r = Pe(i, n, o) ?
|
|
746
|
+
let l = B(1);
|
|
747
|
+
t && (o ? F(o) && (l = X(o)) : l = X(e));
|
|
748
|
+
const r = Pe(i, n, o) ? zt(i) : B(0);
|
|
747
749
|
let a = (s.left + r.x) / l.x, c = (s.top + r.y) / l.y, u = s.width / l.x, d = s.height / l.y;
|
|
748
750
|
if (i) {
|
|
749
|
-
const m = D(i), f = o &&
|
|
750
|
-
let p = m,
|
|
751
|
-
for (;
|
|
752
|
-
const
|
|
753
|
-
a *=
|
|
751
|
+
const m = D(i), f = o && F(o) ? D(o) : o;
|
|
752
|
+
let p = m, g = ht(p);
|
|
753
|
+
for (; g && o && f !== p; ) {
|
|
754
|
+
const y = X(g), v = g.getBoundingClientRect(), A = I(g), w = v.left + (g.clientLeft + parseFloat(A.paddingLeft)) * y.x, C = v.top + (g.clientTop + parseFloat(A.paddingTop)) * y.y;
|
|
755
|
+
a *= y.x, c *= y.y, u *= y.x, d *= y.y, a += w, c += C, p = D(g), g = ht(p);
|
|
754
756
|
}
|
|
755
757
|
}
|
|
756
|
-
return
|
|
758
|
+
return at({
|
|
757
759
|
width: u,
|
|
758
760
|
height: d,
|
|
759
761
|
x: a,
|
|
760
762
|
y: c
|
|
761
763
|
});
|
|
762
764
|
}
|
|
763
|
-
function
|
|
764
|
-
const n =
|
|
765
|
-
return t ? t.left + n :
|
|
765
|
+
function dt(e, t) {
|
|
766
|
+
const n = ft(e).scrollLeft;
|
|
767
|
+
return t ? t.left + n : z(P(e)).left + n;
|
|
766
768
|
}
|
|
767
769
|
function Xt(e, t) {
|
|
768
|
-
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft -
|
|
770
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - dt(e, n), s = n.top + t.scrollTop;
|
|
769
771
|
return {
|
|
770
772
|
x: o,
|
|
771
773
|
y: s
|
|
@@ -778,19 +780,19 @@ function Ve(e) {
|
|
|
778
780
|
offsetParent: o,
|
|
779
781
|
strategy: s
|
|
780
782
|
} = e;
|
|
781
|
-
const i = s === "fixed", l =
|
|
783
|
+
const i = s === "fixed", l = P(o), r = t ? ut(t.floating) : !1;
|
|
782
784
|
if (o === l || r && i)
|
|
783
785
|
return n;
|
|
784
786
|
let a = {
|
|
785
787
|
scrollLeft: 0,
|
|
786
788
|
scrollTop: 0
|
|
787
|
-
}, c =
|
|
788
|
-
const u =
|
|
789
|
-
if ((d || !d && !i) && ((
|
|
790
|
-
const f =
|
|
791
|
-
c =
|
|
789
|
+
}, c = B(1);
|
|
790
|
+
const u = B(0), d = M(o);
|
|
791
|
+
if ((d || !d && !i) && ((Z(o) !== "body" || st(l)) && (a = ft(o)), M(o))) {
|
|
792
|
+
const f = z(o);
|
|
793
|
+
c = X(o), u.x = f.x + o.clientLeft, u.y = f.y + o.clientTop;
|
|
792
794
|
}
|
|
793
|
-
const m = l && !d && !i ? Xt(l, a) :
|
|
795
|
+
const m = l && !d && !i ? Xt(l, a) : B(0);
|
|
794
796
|
return {
|
|
795
797
|
width: n.width * c.x,
|
|
796
798
|
height: n.height * c.y,
|
|
@@ -802,30 +804,30 @@ function Qe(e) {
|
|
|
802
804
|
return Array.from(e.getClientRects());
|
|
803
805
|
}
|
|
804
806
|
function Ne(e) {
|
|
805
|
-
const t =
|
|
806
|
-
let l = -n.scrollLeft +
|
|
807
|
+
const t = P(e), n = ft(e), o = e.ownerDocument.body, s = S(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = S(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
808
|
+
let l = -n.scrollLeft + dt(e);
|
|
807
809
|
const r = -n.scrollTop;
|
|
808
|
-
return
|
|
810
|
+
return I(o).direction === "rtl" && (l += S(t.clientWidth, o.clientWidth) - s), {
|
|
809
811
|
width: s,
|
|
810
812
|
height: i,
|
|
811
813
|
x: l,
|
|
812
814
|
y: r
|
|
813
815
|
};
|
|
814
816
|
}
|
|
815
|
-
const
|
|
817
|
+
const Pt = 25;
|
|
816
818
|
function He(e, t) {
|
|
817
|
-
const n = D(e), o =
|
|
819
|
+
const n = D(e), o = P(e), s = n.visualViewport;
|
|
818
820
|
let i = o.clientWidth, l = o.clientHeight, r = 0, a = 0;
|
|
819
821
|
if (s) {
|
|
820
822
|
i = s.width, l = s.height;
|
|
821
823
|
const u = yt();
|
|
822
824
|
(!u || u && t === "fixed") && (r = s.offsetLeft, a = s.offsetTop);
|
|
823
825
|
}
|
|
824
|
-
const c =
|
|
826
|
+
const c = dt(o);
|
|
825
827
|
if (c <= 0) {
|
|
826
828
|
const u = o.ownerDocument, d = u.body, m = getComputedStyle(d), f = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, p = Math.abs(o.clientWidth - d.clientWidth - f);
|
|
827
|
-
p <=
|
|
828
|
-
} else c <=
|
|
829
|
+
p <= Pt && (i -= p);
|
|
830
|
+
} else c <= Pt && (i += c);
|
|
829
831
|
return {
|
|
830
832
|
width: i,
|
|
831
833
|
height: l,
|
|
@@ -833,9 +835,9 @@ function He(e, t) {
|
|
|
833
835
|
y: a
|
|
834
836
|
};
|
|
835
837
|
}
|
|
836
|
-
const
|
|
837
|
-
function
|
|
838
|
-
const n =
|
|
838
|
+
const Ue = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
839
|
+
function qe(e, t) {
|
|
840
|
+
const n = z(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, i = M(e) ? X(e) : B(1), l = e.clientWidth * i.x, r = e.clientHeight * i.y, a = s * i.x, c = o * i.y;
|
|
839
841
|
return {
|
|
840
842
|
width: l,
|
|
841
843
|
height: r,
|
|
@@ -843,16 +845,16 @@ function Ue(e, t) {
|
|
|
843
845
|
y: c
|
|
844
846
|
};
|
|
845
847
|
}
|
|
846
|
-
function
|
|
848
|
+
function Vt(e, t, n) {
|
|
847
849
|
let o;
|
|
848
850
|
if (t === "viewport")
|
|
849
851
|
o = He(e, n);
|
|
850
852
|
else if (t === "document")
|
|
851
|
-
o = Ne(
|
|
852
|
-
else if (
|
|
853
|
-
o =
|
|
853
|
+
o = Ne(P(e));
|
|
854
|
+
else if (F(t))
|
|
855
|
+
o = qe(t, n);
|
|
854
856
|
else {
|
|
855
|
-
const s =
|
|
857
|
+
const s = zt(e);
|
|
856
858
|
o = {
|
|
857
859
|
x: t.x - s.x,
|
|
858
860
|
y: t.y - s.y,
|
|
@@ -860,22 +862,22 @@ function Pt(e, t, n) {
|
|
|
860
862
|
height: t.height
|
|
861
863
|
};
|
|
862
864
|
}
|
|
863
|
-
return
|
|
865
|
+
return at(o);
|
|
864
866
|
}
|
|
865
|
-
function
|
|
866
|
-
const n =
|
|
867
|
-
return n === t || !
|
|
867
|
+
function jt(e, t) {
|
|
868
|
+
const n = q(e);
|
|
869
|
+
return n === t || !F(n) || $(n) ? !1 : I(n).position === "fixed" || jt(n, t);
|
|
868
870
|
}
|
|
869
871
|
function We(e, t) {
|
|
870
872
|
const n = t.get(e);
|
|
871
873
|
if (n)
|
|
872
874
|
return n;
|
|
873
|
-
let o =
|
|
874
|
-
const i =
|
|
875
|
-
let l = i ?
|
|
876
|
-
for (;
|
|
877
|
-
const r =
|
|
878
|
-
!a && r.position === "fixed" && (s = null), (i ? !a && !s : !a && r.position === "static" && !!s &&
|
|
875
|
+
let o = et(e, [], !1).filter((r) => F(r) && Z(r) !== "body"), s = null;
|
|
876
|
+
const i = I(e).position === "fixed";
|
|
877
|
+
let l = i ? q(e) : e;
|
|
878
|
+
for (; F(l) && !$(l); ) {
|
|
879
|
+
const r = I(l), a = vt(l);
|
|
880
|
+
!a && r.position === "fixed" && (s = null), (i ? !a && !s : !a && r.position === "static" && !!s && Ue.has(s.position) || st(l) && !a && jt(e, l)) ? o = o.filter((u) => u !== l) : s = r, l = q(l);
|
|
879
881
|
}
|
|
880
882
|
return t.set(e, o), o;
|
|
881
883
|
}
|
|
@@ -886,10 +888,10 @@ function Ge(e) {
|
|
|
886
888
|
rootBoundary: o,
|
|
887
889
|
strategy: s
|
|
888
890
|
} = e;
|
|
889
|
-
const l = [...n === "clippingAncestors" ?
|
|
890
|
-
const d =
|
|
891
|
-
return c.top =
|
|
892
|
-
},
|
|
891
|
+
const l = [...n === "clippingAncestors" ? ut(t) ? [] : We(t, this._c) : [].concat(n), o], r = l[0], a = l.reduce((c, u) => {
|
|
892
|
+
const d = Vt(t, u, s);
|
|
893
|
+
return c.top = S(d.top, c.top), c.right = j(d.right, c.right), c.bottom = j(d.bottom, c.bottom), c.left = S(d.left, c.left), c;
|
|
894
|
+
}, Vt(t, r, s));
|
|
893
895
|
return {
|
|
894
896
|
width: a.right - a.left,
|
|
895
897
|
height: a.bottom - a.top,
|
|
@@ -901,29 +903,29 @@ function Je(e) {
|
|
|
901
903
|
const {
|
|
902
904
|
width: t,
|
|
903
905
|
height: n
|
|
904
|
-
} =
|
|
906
|
+
} = Yt(e);
|
|
905
907
|
return {
|
|
906
908
|
width: t,
|
|
907
909
|
height: n
|
|
908
910
|
};
|
|
909
911
|
}
|
|
910
912
|
function Ke(e, t, n) {
|
|
911
|
-
const o =
|
|
913
|
+
const o = M(t), s = P(t), i = n === "fixed", l = z(e, !0, i, t);
|
|
912
914
|
let r = {
|
|
913
915
|
scrollLeft: 0,
|
|
914
916
|
scrollTop: 0
|
|
915
917
|
};
|
|
916
|
-
const a =
|
|
918
|
+
const a = B(0);
|
|
917
919
|
function c() {
|
|
918
|
-
a.x =
|
|
920
|
+
a.x = dt(s);
|
|
919
921
|
}
|
|
920
922
|
if (o || !o && !i)
|
|
921
|
-
if ((
|
|
922
|
-
const f =
|
|
923
|
+
if ((Z(t) !== "body" || st(s)) && (r = ft(t)), o) {
|
|
924
|
+
const f = z(t, !0, i, t);
|
|
923
925
|
a.x = f.x + t.clientLeft, a.y = f.y + t.clientTop;
|
|
924
926
|
} else s && c();
|
|
925
927
|
i && !o && s && c();
|
|
926
|
-
const u = s && !o && !i ? Xt(s, r) :
|
|
928
|
+
const u = s && !o && !i ? Xt(s, r) : B(0), d = l.left + r.scrollLeft - a.x - u.x, m = l.top + r.scrollTop - a.y - u.y;
|
|
927
929
|
return {
|
|
928
930
|
x: d,
|
|
929
931
|
y: m,
|
|
@@ -932,36 +934,36 @@ function Ke(e, t, n) {
|
|
|
932
934
|
};
|
|
933
935
|
}
|
|
934
936
|
function mt(e) {
|
|
935
|
-
return
|
|
937
|
+
return I(e).position === "static";
|
|
936
938
|
}
|
|
937
|
-
function
|
|
938
|
-
if (!
|
|
939
|
+
function Qt(e, t) {
|
|
940
|
+
if (!M(e) || I(e).position === "fixed")
|
|
939
941
|
return null;
|
|
940
942
|
if (t)
|
|
941
943
|
return t(e);
|
|
942
944
|
let n = e.offsetParent;
|
|
943
|
-
return
|
|
945
|
+
return P(e) === n && (n = n.ownerDocument.body), n;
|
|
944
946
|
}
|
|
945
|
-
function
|
|
947
|
+
function $t(e, t) {
|
|
946
948
|
const n = D(e);
|
|
947
|
-
if (
|
|
949
|
+
if (ut(e))
|
|
948
950
|
return n;
|
|
949
|
-
if (!
|
|
950
|
-
let s =
|
|
951
|
-
for (; s &&
|
|
952
|
-
if (
|
|
951
|
+
if (!M(e)) {
|
|
952
|
+
let s = q(e);
|
|
953
|
+
for (; s && !$(s); ) {
|
|
954
|
+
if (F(s) && !mt(s))
|
|
953
955
|
return s;
|
|
954
|
-
s =
|
|
956
|
+
s = q(s);
|
|
955
957
|
}
|
|
956
958
|
return n;
|
|
957
959
|
}
|
|
958
|
-
let o =
|
|
959
|
-
for (; o &&
|
|
960
|
-
o =
|
|
961
|
-
return o &&
|
|
960
|
+
let o = Qt(e, t);
|
|
961
|
+
for (; o && _e(o) && mt(o); )
|
|
962
|
+
o = Qt(o, t);
|
|
963
|
+
return o && $(o) && mt(o) && !vt(o) ? n : o || Le(e) || n;
|
|
962
964
|
}
|
|
963
965
|
const Ye = async function(e) {
|
|
964
|
-
const t = this.getOffsetParent ||
|
|
966
|
+
const t = this.getOffsetParent || $t, n = this.getDimensions, o = await n(e.floating);
|
|
965
967
|
return {
|
|
966
968
|
reference: Ke(e.reference, await t(e.floating), e.strategy),
|
|
967
969
|
floating: {
|
|
@@ -972,27 +974,27 @@ const Ye = async function(e) {
|
|
|
972
974
|
}
|
|
973
975
|
};
|
|
974
976
|
};
|
|
975
|
-
function
|
|
976
|
-
return
|
|
977
|
+
function ze(e) {
|
|
978
|
+
return I(e).direction === "rtl";
|
|
977
979
|
}
|
|
978
|
-
const
|
|
980
|
+
const Xe = {
|
|
979
981
|
convertOffsetParentRelativeRectToViewportRelativeRect: Ve,
|
|
980
|
-
getDocumentElement:
|
|
982
|
+
getDocumentElement: P,
|
|
981
983
|
getClippingRect: Ge,
|
|
982
|
-
getOffsetParent:
|
|
984
|
+
getOffsetParent: $t,
|
|
983
985
|
getElementRects: Ye,
|
|
984
986
|
getClientRects: Qe,
|
|
985
987
|
getDimensions: Je,
|
|
986
|
-
getScale:
|
|
987
|
-
isElement:
|
|
988
|
-
isRTL:
|
|
988
|
+
getScale: X,
|
|
989
|
+
isElement: F,
|
|
990
|
+
isRTL: ze
|
|
989
991
|
};
|
|
990
|
-
function
|
|
992
|
+
function Zt(e, t) {
|
|
991
993
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
992
994
|
}
|
|
993
995
|
function je(e, t) {
|
|
994
996
|
let n = null, o;
|
|
995
|
-
const s =
|
|
997
|
+
const s = P(e);
|
|
996
998
|
function i() {
|
|
997
999
|
var r;
|
|
998
1000
|
clearTimeout(o), (r = n) == null || r.disconnect(), n = null;
|
|
@@ -1007,30 +1009,30 @@ function je(e, t) {
|
|
|
1007
1009
|
} = c;
|
|
1008
1010
|
if (r || t(), !m || !f)
|
|
1009
1011
|
return;
|
|
1010
|
-
const p =
|
|
1011
|
-
rootMargin: -p + "px " + -
|
|
1012
|
-
threshold:
|
|
1012
|
+
const p = it(d), g = it(s.clientWidth - (u + m)), y = it(s.clientHeight - (d + f)), v = it(u), w = {
|
|
1013
|
+
rootMargin: -p + "px " + -g + "px " + -y + "px " + -v + "px",
|
|
1014
|
+
threshold: S(0, j(1, a)) || 1
|
|
1013
1015
|
};
|
|
1014
|
-
let
|
|
1015
|
-
function
|
|
1016
|
-
const
|
|
1017
|
-
if (
|
|
1018
|
-
if (!
|
|
1016
|
+
let C = !0;
|
|
1017
|
+
function b(_) {
|
|
1018
|
+
const O = _[0].intersectionRatio;
|
|
1019
|
+
if (O !== a) {
|
|
1020
|
+
if (!C)
|
|
1019
1021
|
return l();
|
|
1020
|
-
|
|
1022
|
+
O ? l(!1, O) : o = setTimeout(() => {
|
|
1021
1023
|
l(!1, 1e-7);
|
|
1022
1024
|
}, 1e3);
|
|
1023
1025
|
}
|
|
1024
|
-
|
|
1026
|
+
O === 1 && !Zt(c, e.getBoundingClientRect()) && l(), C = !1;
|
|
1025
1027
|
}
|
|
1026
1028
|
try {
|
|
1027
|
-
n = new IntersectionObserver(
|
|
1028
|
-
...
|
|
1029
|
+
n = new IntersectionObserver(b, {
|
|
1030
|
+
...w,
|
|
1029
1031
|
// Handle <iframe>s
|
|
1030
1032
|
root: s.ownerDocument
|
|
1031
1033
|
});
|
|
1032
1034
|
} catch {
|
|
1033
|
-
n = new IntersectionObserver(
|
|
1035
|
+
n = new IntersectionObserver(b, w);
|
|
1034
1036
|
}
|
|
1035
1037
|
n.observe(e);
|
|
1036
1038
|
}
|
|
@@ -1044,37 +1046,37 @@ function $e(e, t, n, o) {
|
|
|
1044
1046
|
elementResize: l = typeof ResizeObserver == "function",
|
|
1045
1047
|
layoutShift: r = typeof IntersectionObserver == "function",
|
|
1046
1048
|
animationFrame: a = !1
|
|
1047
|
-
} = o, c = At(e), u = s || i ? [...c ?
|
|
1048
|
-
u.forEach((
|
|
1049
|
-
s &&
|
|
1049
|
+
} = o, c = At(e), u = s || i ? [...c ? et(c) : [], ...et(t)] : [];
|
|
1050
|
+
u.forEach((v) => {
|
|
1051
|
+
s && v.addEventListener("scroll", n, {
|
|
1050
1052
|
passive: !0
|
|
1051
|
-
}), i &&
|
|
1053
|
+
}), i && v.addEventListener("resize", n);
|
|
1052
1054
|
});
|
|
1053
1055
|
const d = c && r ? je(c, n) : null;
|
|
1054
1056
|
let m = -1, f = null;
|
|
1055
|
-
l && (f = new ResizeObserver((
|
|
1056
|
-
let [
|
|
1057
|
-
|
|
1058
|
-
var
|
|
1059
|
-
(
|
|
1057
|
+
l && (f = new ResizeObserver((v) => {
|
|
1058
|
+
let [A] = v;
|
|
1059
|
+
A && A.target === c && f && (f.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1060
|
+
var w;
|
|
1061
|
+
(w = f) == null || w.observe(t);
|
|
1060
1062
|
})), n();
|
|
1061
1063
|
}), c && !a && f.observe(c), f.observe(t));
|
|
1062
|
-
let p,
|
|
1063
|
-
a &&
|
|
1064
|
-
function
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1064
|
+
let p, g = a ? z(e) : null;
|
|
1065
|
+
a && y();
|
|
1066
|
+
function y() {
|
|
1067
|
+
const v = z(e);
|
|
1068
|
+
g && !Zt(g, v) && n(), g = v, p = requestAnimationFrame(y);
|
|
1067
1069
|
}
|
|
1068
1070
|
return n(), () => {
|
|
1069
|
-
var
|
|
1070
|
-
u.forEach((
|
|
1071
|
-
s &&
|
|
1072
|
-
}), d?.(), (
|
|
1071
|
+
var v;
|
|
1072
|
+
u.forEach((A) => {
|
|
1073
|
+
s && A.removeEventListener("scroll", n), i && A.removeEventListener("resize", n);
|
|
1074
|
+
}), d?.(), (v = f) == null || v.disconnect(), f = null, a && cancelAnimationFrame(p);
|
|
1073
1075
|
};
|
|
1074
1076
|
}
|
|
1075
|
-
const Ze = Re, tn =
|
|
1077
|
+
const Ze = Re, tn = Se, en = be, nn = De, on = (e, t, n) => {
|
|
1076
1078
|
const o = /* @__PURE__ */ new Map(), s = {
|
|
1077
|
-
platform:
|
|
1079
|
+
platform: Xe,
|
|
1078
1080
|
...n
|
|
1079
1081
|
}, i = {
|
|
1080
1082
|
...s.platform,
|
|
@@ -1086,7 +1088,7 @@ const Ze = Re, tn = De, en = xe, nn = Se, on = (e, t, n) => {
|
|
|
1086
1088
|
});
|
|
1087
1089
|
};
|
|
1088
1090
|
function sn(e, t) {
|
|
1089
|
-
const n =
|
|
1091
|
+
const n = R({
|
|
1090
1092
|
position: "fixed",
|
|
1091
1093
|
left: "0",
|
|
1092
1094
|
top: "0",
|
|
@@ -1128,9 +1130,9 @@ function sn(e, t) {
|
|
|
1128
1130
|
}, l = () => {
|
|
1129
1131
|
o && (o(), o = null);
|
|
1130
1132
|
};
|
|
1131
|
-
return
|
|
1133
|
+
return Ht(l), { floatingStyles: n, startTrack: i, stopTrack: l };
|
|
1132
1134
|
}
|
|
1133
|
-
const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='2534'%20width='200'%20height='200'%3e%3cpath%20d='M448%2085.333333a362.666667%20362.666667%200%201%200%20224.512%20647.509334l155.818667%20155.818666a42.666667%2042.666667%200%200%200%2060.330666-60.330666l-155.818666-155.818667A362.666667%20362.666667%200%200%200%20448%2085.333333zM170.666667%20448a277.333333%20277.333333%200%201%201%20554.666666%200%20277.333333%20277.333333%200%200%201-554.666666%200z'%20p-id='2535'%3e%3c/path%3e%3c/svg%3e", rn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==", an = "data:image/png;base64,iVBORw0K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tkmAwHGcHyFQj/Q57vuPzm7m+X5efB6HYj3kOCubuLVlApltfdbPX5uaetCmdeKVAqUN1mdy04XR3PTsqAHPWMztTb24myvEBBuRM+WlUnbzDEXeya2D4XC0zrJqnXwsO3pG3mCMGWMK6lQZk2A0hH2GMSxL9VlI6lVkd90RgGKkVFrrc+9REXubjLH9FxfbbVUVGG5v4i2p8LD8x9ax65C66KTfKGCSDc97fv6DJzuf9QtDtm+iqsM1ot70w9O+YDbmSQ6bkkyCJitnAUcnryqmuExgSsZYKypvgFvS+5xVsJk0MGlps97mFCVXpnNZqoBcbo2QyJz7dCLj6JTj6tRxVyf3izZUtNndwM73SU55JzaO4Q8AAAD//54At5MAAAAGSURBVAMAh2IbMAJQAZQAAAAASUVORK5CYII=", dn =
|
|
1135
|
+
const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='2534'%20width='200'%20height='200'%3e%3cpath%20d='M448%2085.333333a362.666667%20362.666667%200%201%200%20224.512%20647.509334l155.818667%20155.818666a42.666667%2042.666667%200%200%200%2060.330666-60.330666l-155.818666-155.818667A362.666667%20362.666667%200%200%200%20448%2085.333333zM170.666667%20448a277.333333%20277.333333%200%201%201%20554.666666%200%20277.333333%20277.333333%200%200%201-554.666666%200z'%20p-id='2535'%3e%3c/path%3e%3c/svg%3e", rn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5en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kT0T2JrpZ4fV5sF0Ad6je9BrBKxLeZuVv8rS9IAG4qGf5oTPSolNxIXOyUNjqlpb0W4xI+Cd62dVqcAAGBVqSCVmPMIoPCttzm2MEBAoeLir4hRK2AWPyVIAHRHMH0Ly0tCBF3M5t+Aq6A0HPJSSyCeZAIz7BNAgQwqxNyc1NL7MCoeyH1xNWpuKsTcet7fv46QI0/zdoEtkmAwHGcHyFQj/Q57vuPzm7m+X5efB6HYj3kOCubuLVlApltfdbPX5uaetCmdeKVAqUN1mdy04XR3PTsqAHPWMztTb24myvEBBuRM+WlUnbzDEXeya2D4XC0zrJqnXwsO3pG3mCMGWMK6lQZk2A0hH2GMSxL9VlI6lVkd90RgGKkVFrrc+9REXubjLH9FxfbbVUVGG5v4i2p8LD8x9ax65C66KTfKGCSDc97fv6DJzuf9QtDtm+iqsM1ot70w9O+YDbmSQ6bkkyCJitnAUcnryqmuExgSsZYKypvgFvS+5xVsJk0MGlps97mFCVXpnNZqoBcbo2QyJz7dCLj6JTj6tRxVyf3izZUtNndwM73SU55JzaO4Q8AAAD//54At5MAAAAGSURBVAMAh2IbMAJQAZQAAAAASUVORK5CYII=", dn = se({
|
|
1134
1136
|
name: "GlobalSearch",
|
|
1135
1137
|
model: { prop: "value", event: "input" },
|
|
1136
1138
|
props: {
|
|
@@ -1141,58 +1143,101 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1141
1143
|
type: Array,
|
|
1142
1144
|
default: () => ["City", "Seaport", "Airport", "Country"]
|
|
1143
1145
|
},
|
|
1144
|
-
historyKey: { type: String, default:
|
|
1146
|
+
historyKey: { type: String, default: void 0 },
|
|
1147
|
+
lang: {
|
|
1148
|
+
type: String,
|
|
1149
|
+
default: "en",
|
|
1150
|
+
validator: (e) => ["", "en", "cn", "en-US", "zh-CN"].includes(e)
|
|
1151
|
+
}
|
|
1145
1152
|
},
|
|
1146
1153
|
setup(e, { emit: t }) {
|
|
1147
|
-
const n =
|
|
1148
|
-
|
|
1154
|
+
const n = R(""), o = R(!1), s = R(!1), i = R(""), l = R(null), r = R(null), a = R(null), c = R(null), { searchHistory: u, saveToHistory: d, clearHistory: m } = ie(
|
|
1155
|
+
bt(e, "historyKey")
|
|
1149
1156
|
), {
|
|
1150
1157
|
searchResults: f,
|
|
1151
1158
|
loading: p,
|
|
1152
|
-
isFetchingMore:
|
|
1153
|
-
isFinished:
|
|
1154
|
-
currentPage:
|
|
1155
|
-
fetchData:
|
|
1156
|
-
filterByTypes:
|
|
1157
|
-
} = ae(n,
|
|
1159
|
+
isFetchingMore: g,
|
|
1160
|
+
isFinished: y,
|
|
1161
|
+
currentPage: v,
|
|
1162
|
+
fetchData: A,
|
|
1163
|
+
filterByTypes: w
|
|
1164
|
+
} = ae(n, bt(e, "searchTypeList")), { floatingStyles: C, startTrack: b, stopTrack: _ } = sn(
|
|
1158
1165
|
a,
|
|
1159
1166
|
c
|
|
1160
|
-
),
|
|
1167
|
+
), O = async () => {
|
|
1161
1168
|
if (s.value = !0, console.log(
|
|
1162
1169
|
"🍉 ~ index.vue:210 ~ onFocus ~ searchResults.value:",
|
|
1163
1170
|
f.value,
|
|
1164
1171
|
o.value
|
|
1165
1172
|
), !e.multiple && o.value && f.value.length === 0) {
|
|
1166
|
-
const
|
|
1167
|
-
if (console.log("🍉 ~ index.vue:221 ~ onFocus ~ val:",
|
|
1173
|
+
const h = e.value;
|
|
1174
|
+
if (console.log("🍉 ~ index.vue:221 ~ onFocus ~ val:", h), h?.id) {
|
|
1168
1175
|
p.value = !0;
|
|
1169
1176
|
try {
|
|
1170
|
-
const
|
|
1171
|
-
f.value =
|
|
1177
|
+
const x = await re(h.id, h.type);
|
|
1178
|
+
f.value = w(x.records);
|
|
1172
1179
|
} finally {
|
|
1173
1180
|
p.value = !1;
|
|
1174
1181
|
}
|
|
1175
1182
|
}
|
|
1176
1183
|
}
|
|
1177
|
-
},
|
|
1184
|
+
}, V = () => {
|
|
1178
1185
|
setTimeout(() => {
|
|
1179
1186
|
s.value = !1;
|
|
1180
1187
|
}, 200);
|
|
1181
|
-
},
|
|
1182
|
-
|
|
1183
|
-
},
|
|
1188
|
+
}, Q = (h) => {
|
|
1189
|
+
h.target.value === "" && !e.multiple && (o.value = !1, t("input", null), t("update:value", null));
|
|
1190
|
+
}, k = () => {
|
|
1184
1191
|
if (e.multiple && !n.value && e.value?.length > 0) {
|
|
1185
|
-
const
|
|
1186
|
-
t("input",
|
|
1192
|
+
const h = [...e.value], x = h.pop();
|
|
1193
|
+
t("input", h), t("update:value", h), t("remove", x);
|
|
1187
1194
|
}
|
|
1195
|
+
}, W = (h) => T.value ? h.displayEn || h.display || "" : h.displayCn || h.display || "", G = (h) => {
|
|
1196
|
+
const x = {
|
|
1197
|
+
City: {
|
|
1198
|
+
en: "City",
|
|
1199
|
+
cn: "城市"
|
|
1200
|
+
},
|
|
1201
|
+
Country: {
|
|
1202
|
+
en: "Country",
|
|
1203
|
+
cn: "国家"
|
|
1204
|
+
},
|
|
1205
|
+
Region: {
|
|
1206
|
+
en: "Region",
|
|
1207
|
+
cn: "区域"
|
|
1208
|
+
},
|
|
1209
|
+
Airport: {
|
|
1210
|
+
en: "Airport",
|
|
1211
|
+
cn: "机场"
|
|
1212
|
+
},
|
|
1213
|
+
Seaport: {
|
|
1214
|
+
en: "Seaport",
|
|
1215
|
+
cn: "港口"
|
|
1216
|
+
}
|
|
1217
|
+
};
|
|
1218
|
+
return console.log("🍉 ~ index.vue:434 ~ getItemType ~ isEn.value:", T.value), T.value ? x[h].en : x[h].cn;
|
|
1188
1219
|
};
|
|
1189
|
-
|
|
1190
|
-
if (!
|
|
1220
|
+
xt(s, (h) => h ? b() : _()), xt(n, (h) => {
|
|
1221
|
+
if (!h.trim()) {
|
|
1191
1222
|
f.value = [];
|
|
1192
1223
|
return;
|
|
1193
1224
|
}
|
|
1194
|
-
l.value && clearTimeout(l.value), l.value = setTimeout(() =>
|
|
1195
|
-
}),
|
|
1225
|
+
l.value && clearTimeout(l.value), l.value = setTimeout(() => A(1, !1), 300);
|
|
1226
|
+
}), Ht(_);
|
|
1227
|
+
const T = L(() => {
|
|
1228
|
+
if (e.lang !== "")
|
|
1229
|
+
return e.lang === "en" || e.lang === "en-US";
|
|
1230
|
+
let h = "";
|
|
1231
|
+
try {
|
|
1232
|
+
if (typeof useCookie == "function") {
|
|
1233
|
+
const x = useCookie("jc-language").value;
|
|
1234
|
+
if (x) return /en/.test(x) || /en-US/.test(x);
|
|
1235
|
+
}
|
|
1236
|
+
} catch {
|
|
1237
|
+
}
|
|
1238
|
+
return typeof process < "u" && process.client ? h = document.cookie || "" : typeof process < "u" && process.server && (h = useNuxtApp?.()?.ssrContext?.event.node.req.headers.cookie || ""), /jc-language=en-US/.test(h) || /jc-language=en/.test(h);
|
|
1239
|
+
}), E = L(() => e.modelValue ? Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue] : []), tt = L(() => e.multiple && E.value.length > 0 ? "" : o.value && !e.multiple ? i.value : T.value ? "Please enter..." : "请输入..."), J = L(() => e.multiple ? e.collapseTags ? E.value.slice(0, 1) : E.value : []), N = L(() => e.multiple ? n.value ? `${n.value.length * 10 + 20}px` : "10px" : "100%");
|
|
1240
|
+
return {
|
|
1196
1241
|
// 状态
|
|
1197
1242
|
query: n,
|
|
1198
1243
|
isSelected: o,
|
|
@@ -1205,52 +1250,36 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1205
1250
|
searchHistory: u,
|
|
1206
1251
|
searchResults: f,
|
|
1207
1252
|
loading: p,
|
|
1208
|
-
isFetchingMore:
|
|
1209
|
-
isFinished:
|
|
1210
|
-
currentPage:
|
|
1211
|
-
floatingStyles:
|
|
1253
|
+
isFetchingMore: g,
|
|
1254
|
+
isFinished: y,
|
|
1255
|
+
currentPage: v,
|
|
1256
|
+
floatingStyles: C,
|
|
1212
1257
|
// Hook 方法
|
|
1213
1258
|
saveToHistory: d,
|
|
1214
1259
|
clearHistory: m,
|
|
1215
|
-
fetchData:
|
|
1216
|
-
filterByTypes:
|
|
1217
|
-
startTrack:
|
|
1218
|
-
stopTrack:
|
|
1260
|
+
fetchData: A,
|
|
1261
|
+
filterByTypes: w,
|
|
1262
|
+
startTrack: b,
|
|
1263
|
+
stopTrack: _,
|
|
1219
1264
|
// 组件方法
|
|
1220
|
-
onFocus:
|
|
1221
|
-
handleBlur:
|
|
1222
|
-
onInput:
|
|
1223
|
-
handleDelete:
|
|
1265
|
+
onFocus: O,
|
|
1266
|
+
handleBlur: V,
|
|
1267
|
+
onInput: Q,
|
|
1268
|
+
handleDelete: k,
|
|
1224
1269
|
// 资源
|
|
1225
|
-
SearchIcon: ln
|
|
1270
|
+
SearchIcon: ln,
|
|
1271
|
+
isEn: T,
|
|
1272
|
+
getItemType: G,
|
|
1273
|
+
getItemLabel: W,
|
|
1274
|
+
selectedItems: E,
|
|
1275
|
+
currentPlaceholder: tt,
|
|
1276
|
+
displayedTags: J,
|
|
1277
|
+
inputWidth: N
|
|
1226
1278
|
};
|
|
1227
1279
|
},
|
|
1228
1280
|
computed: {
|
|
1229
|
-
isEn() {
|
|
1230
|
-
let e = "";
|
|
1231
|
-
try {
|
|
1232
|
-
if (typeof useCookie == "function") {
|
|
1233
|
-
const t = useCookie("jc-language").value;
|
|
1234
|
-
if (t) return /en/.test(t) || /en-US/.test(t);
|
|
1235
|
-
}
|
|
1236
|
-
} catch {
|
|
1237
|
-
}
|
|
1238
|
-
return process.client ? e = document.cookie || "" : process.server && (e = useNuxtApp?.()?.ssrContext?.event.node.req.headers.cookie || ""), /jc-language=en-US/.test(e) || /jc-language=en/.test(e);
|
|
1239
|
-
},
|
|
1240
|
-
selectedItems() {
|
|
1241
|
-
return this.value ? Array.isArray(this.value) ? this.value : [this.value] : [];
|
|
1242
|
-
},
|
|
1243
|
-
displayedTags() {
|
|
1244
|
-
return this.collapseTags ? this.selectedItems.slice(0, 1) : this.selectedItems;
|
|
1245
|
-
},
|
|
1246
1281
|
hasValue() {
|
|
1247
1282
|
return this.query || this.selectedItems.length > 0;
|
|
1248
|
-
},
|
|
1249
|
-
inputWidth() {
|
|
1250
|
-
return this.multiple ? this.query ? `${this.query.length * 10 + 20}px` : "10px" : "100%";
|
|
1251
|
-
},
|
|
1252
|
-
currentPlaceholder() {
|
|
1253
|
-
return this.multiple && this.selectedItems.length > 0 ? "" : this.isSelected && !this.multiple ? this.selectedLabel : this.isEn ? "Please enter..." : "请输入...";
|
|
1254
1283
|
}
|
|
1255
1284
|
},
|
|
1256
1285
|
methods: {
|
|
@@ -1274,7 +1303,7 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1274
1303
|
this.query = "", this.isSelected = !1, this.selectedLabel = "", this.$emit("input", this.multiple ? [] : null), this.$emit("update:value", this.multiple ? [] : null);
|
|
1275
1304
|
},
|
|
1276
1305
|
handleSearch() {
|
|
1277
|
-
const e = this.multiple ? this.selectedItems : this.isSelected ? this.value :
|
|
1306
|
+
const e = this.multiple ? this.selectedItems : this.isSelected ? this.value : null;
|
|
1278
1307
|
this.$emit("submit-search", e), this.isDropdownVisible = !1;
|
|
1279
1308
|
},
|
|
1280
1309
|
getIconUrl(e) {
|
|
@@ -1312,7 +1341,9 @@ var mn = function() {
|
|
|
1312
1341
|
o.preventDefault();
|
|
1313
1342
|
}, click: function(o) {
|
|
1314
1343
|
return o.stopPropagation(), t.clearAll.apply(null, arguments);
|
|
1315
|
-
} } }, [t._v("ⓧ")]) : t._e(), t.loading && !t.isFetchingMore ? n("div", { staticClass: "loading-spinner" }) : n("button", { staticClass: "search-btn", on: { click:
|
|
1344
|
+
} } }, [t._v("ⓧ")]) : t._e(), t.loading && !t.isFetchingMore ? n("div", { staticClass: "loading-spinner" }) : n("button", { staticClass: "search-btn", on: { click: function(o) {
|
|
1345
|
+
return o.stopPropagation(), t.handleSearch.apply(null, arguments);
|
|
1346
|
+
} } }, [n("span", { staticClass: "search-icon" }, [n("img", { attrs: { src: t.SearchIcon, alt: "search" } })])])])]), n("div", { directives: [{ name: "show", rawName: "v-show", value: t.isDropdownVisible && (t.searchResults.length > 0 || t.loading || t.query || t.searchHistory.length > 0), expression: `
|
|
1316
1347
|
isDropdownVisible &&
|
|
1317
1348
|
(searchResults.length > 0 ||
|
|
1318
1349
|
loading ||
|
|
@@ -1326,13 +1357,13 @@ var mn = function() {
|
|
|
1326
1357
|
} } }, [t._v(" " + t._s(t.isEn ? "Clear" : "清空") + " ")])]), t._l(t.searchHistory, function(o, s) {
|
|
1327
1358
|
return n("div", { key: "hist-" + s, staticClass: "dropdown-item", on: { mousedown: function(i) {
|
|
1328
1359
|
return t.selectItem(o);
|
|
1329
|
-
} } }, [n("div", { staticClass: "category-tag" }, [n("img", { staticClass: "type-icon", attrs: { src: t.getIconUrl(o.type), alt: "" } }), n("span", { staticClass: "type-text" }, [t._v(t._s(o.type))])]), n("div", { staticClass: "result-text" }, [t._v(t._s(t.getItemLabel(o)))])]);
|
|
1360
|
+
} } }, [n("div", { staticClass: "category-tag" }, [n("img", { staticClass: "type-icon", attrs: { src: t.getIconUrl(o.type), alt: "" } }), n("span", { staticClass: "type-text" }, [t._v(t._s(t.getItemType(o.type)))])]), n("div", { staticClass: "result-text" }, [t._v(t._s(t.getItemLabel(o)))])]);
|
|
1330
1361
|
}), n("hr", { staticClass: "divider" })], 2) : t._e()];
|
|
1331
1362
|
}, { searchHistory: t.searchHistory }), t.loading && !t.isFetchingMore ? n("div", { staticClass: "status-msg" }, [t._v(" " + t._s(t.isEn ? "Searching..." : "正在搜索中...") + " ")]) : t.searchResults.length > 0 ? [t._t("results", function() {
|
|
1332
1363
|
return t._l(t.searchResults, function(o, s) {
|
|
1333
1364
|
return n("div", { key: s, staticClass: "dropdown-item", class: { "is-active": t.isItemActive(o) }, on: { mousedown: function(i) {
|
|
1334
1365
|
return t.selectItem(o);
|
|
1335
|
-
} } }, [n("div", { staticClass: "category-tag" }, [n("img", { staticClass: "type-icon", attrs: { src: t.getIconUrl(o.type), alt: "" } }), n("span", { staticClass: "type-text" }, [t._v(t._s(o.type))])]), n("div", { staticClass: "result-text" }, [t._v(t._s(t.getItemLabel(o)))])]);
|
|
1366
|
+
} } }, [n("div", { staticClass: "category-tag" }, [n("img", { staticClass: "type-icon", attrs: { src: t.getIconUrl(o.type), alt: "" } }), n("span", { staticClass: "type-text" }, [t._v(t._s(t.getItemType(o.type)))])]), n("div", { staticClass: "result-text" }, [t._v(t._s(t.getItemLabel(o)))])]);
|
|
1336
1367
|
});
|
|
1337
1368
|
}, { searchResults: t.searchResults }), t.isFetchingMore ? n("div", { staticClass: "load-more-msg" }, [t._v(" " + t._s(t.isEn ? "Loading more..." : "正在加载更多...") + " ")]) : t.isFinished && t.query ? n("div", { staticClass: "load-more-msg no-more" }, [t._v(" " + t._s(t.isEn ? "All results have been loaded" : "已加载全部结果") + " ")]) : t._e()] : t.query && !t.loading ? n("div", { staticClass: "status-msg" }, [t._t("noData", function() {
|
|
1338
1369
|
return [t._v(" " + t._s(t.isEn ? `No results found related to "${t.query}".` : `未找到与 "${t.query}" 相关的结果`) + " ")];
|
|
@@ -1343,66 +1374,85 @@ var mn = function() {
|
|
|
1343
1374
|
pn,
|
|
1344
1375
|
!1,
|
|
1345
1376
|
null,
|
|
1346
|
-
"
|
|
1377
|
+
"cebbea71"
|
|
1347
1378
|
);
|
|
1348
|
-
const
|
|
1379
|
+
const te = hn.exports, gn = {
|
|
1349
1380
|
__name: "ApplyDataDialog",
|
|
1350
1381
|
props: {
|
|
1351
|
-
|
|
1352
|
-
|
|
1382
|
+
// v-model 绑定,默认 false
|
|
1383
|
+
value: {
|
|
1384
|
+
type: Boolean,
|
|
1385
|
+
default: !1
|
|
1386
|
+
},
|
|
1387
|
+
// 语言设置,默认 'en'
|
|
1388
|
+
lang: {
|
|
1389
|
+
type: String,
|
|
1390
|
+
default: "en",
|
|
1391
|
+
// 增加校验,确保只能传入 'en' 或 'cn'
|
|
1392
|
+
validator: (e) => ["en", "cn"].includes(e)
|
|
1393
|
+
}
|
|
1353
1394
|
},
|
|
1354
1395
|
emits: ["update:value", "confirm"],
|
|
1355
1396
|
setup(e, { emit: t }) {
|
|
1356
|
-
const n = e, o = [
|
|
1397
|
+
const n = e, o = [
|
|
1398
|
+
{ typeCn: "城市", typeEn: "City", type: "City" },
|
|
1399
|
+
{ typeCn: "海运港口", typeEn: "Port", type: "Seaport" },
|
|
1400
|
+
{ typeCn: "机场", typeEn: "Airport", type: "Airport" }
|
|
1401
|
+
], s = R(null), i = Ct({
|
|
1357
1402
|
name: "",
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1403
|
+
country: ""
|
|
1404
|
+
}), l = Ct({
|
|
1405
|
+
name: "",
|
|
1406
|
+
type: "City"
|
|
1407
|
+
}), r = L(() => n.lang === "en" || n.lang === "en-US");
|
|
1408
|
+
return { __sfc: !0, props: n, emit: t, typeOptions: o, displayQuery: s, errors: i, formData: l, isEn: r, handleClose: () => {
|
|
1409
|
+
i.name = "", i.country = "", t("update:value", !1);
|
|
1363
1410
|
}, handleConfirm: () => {
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1411
|
+
i.name = "", i.country = "";
|
|
1412
|
+
let u = !0;
|
|
1413
|
+
l.name.trim() || (i.name = "Data name is required", u = !1), s.value || (i.country = "Please select a country", u = !1), u && (console.log("🍉 ~ ApplyDataDialog.vue:115 ~ handleConfirm ~ data:", {
|
|
1414
|
+
...l,
|
|
1415
|
+
country: s.value
|
|
1416
|
+
}), t("confirm", { ...l, country: s.value }));
|
|
1417
|
+
}, Search: te };
|
|
1370
1418
|
}
|
|
1371
1419
|
};
|
|
1372
1420
|
var vn = function() {
|
|
1373
1421
|
var t = this, n = t._self._c, o = t._self._setupProxy;
|
|
1374
1422
|
return t.value ? n("div", { staticClass: "modal-mask", on: { click: function(s) {
|
|
1375
1423
|
return s.target !== s.currentTarget ? null : o.handleClose.apply(null, arguments);
|
|
1376
|
-
} } }, [n("div", { staticClass: "modal-container" }, [n("div", { staticClass: "modal-header" }, [n("span", { staticClass: "header-title" }, [t._v("Apply for data addition")]), n("div", { staticClass: "close-btn", on: { click: o.handleClose } }, [t._v("×")])]), n("div", { staticClass: "modal-body" }, [n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v("Data To Add")]), n("div", { staticClass: "input-box" }, [n("input", { directives: [{ name: "model", rawName: "v-model", value: o.formData.name, expression: "formData.name" }],
|
|
1424
|
+
} } }, [n("div", { staticClass: "modal-container" }, [n("div", { staticClass: "modal-header" }, [n("span", { staticClass: "header-title" }, [t._v(t._s(o.isEn ? "Apply for data addition" : "申请补充数据"))]), n("div", { staticClass: "close-btn", on: { click: o.handleClose } }, [t._v("×")])]), n("div", { staticClass: "modal-body" }, [n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v(t._s(o.isEn ? "Data To Add" : "需补充的数据"))]), n("div", { staticClass: "input-box" }, [n("input", { directives: [{ name: "model", rawName: "v-model", value: o.formData.name, expression: "formData.name" }], class: ["custom-input", { "input-error": o.errors.name }], attrs: { type: "text", placeholder: "Please enter your data" }, domProps: { value: o.formData.name }, on: { input: [function(s) {
|
|
1377
1425
|
s.target.composing || t.$set(o.formData, "name", s.target.value);
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
}, attrs: { "search-type-list": ["Country"] },
|
|
1426
|
+
}, function(s) {
|
|
1427
|
+
o.errors.name = "";
|
|
1428
|
+
}] } })]), o.errors.name ? n("div", { staticClass: "error-message" }, [t._v(t._s(o.errors.name))]) : t._e()]), n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v(t._s(o.isEn ? "Type" : "所属类别"))]), n("div", { staticClass: "type-group" }, t._l(o.typeOptions, function(s) {
|
|
1429
|
+
return n("div", { key: s, class: ["type-btn", { active: o.formData.type === s.type }], on: { click: function(i) {
|
|
1430
|
+
o.formData.type = s.type;
|
|
1431
|
+
} } }, [t._v(" " + t._s(o.isEn ? s.typeEn : s.typeCn) + " "), o.formData.type === s.type ? n("div", { staticClass: "check-mark" }) : t._e()]);
|
|
1432
|
+
}), 0)]), n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v(t._s(o.isEn ? "Country" : "国家"))]), n("div", { class: { "search-error-wrap": o.errors.country } }, [n(o.Search, { style: { margin: "0 auto" }, attrs: { "search-type-list": ["Country"], lang: t.lang }, on: { "update:model-value": function(s) {
|
|
1433
|
+
o.errors.country = "";
|
|
1434
|
+
} }, model: { value: o.displayQuery, callback: function(s) {
|
|
1385
1435
|
o.displayQuery = s;
|
|
1386
|
-
}, expression: "displayQuery" } })], 1)]), n("div", { staticClass: "modal-footer" }, [n("button", { staticClass: "confirm-btn", on: { click: o.handleConfirm } }, [t._v("
|
|
1436
|
+
}, expression: "displayQuery" } })], 1), o.errors.country ? n("div", { staticClass: "error-message" }, [t._v(" " + t._s(o.errors.country) + " ")]) : t._e()])]), n("div", { staticClass: "modal-footer" }, [n("button", { staticClass: "confirm-btn", on: { click: o.handleConfirm } }, [t._v(" " + t._s(o.isEn ? "Submit" : "申请补充") + " ")])])])]) : t._e();
|
|
1387
1437
|
}, yn = [], An = /* @__PURE__ */ wt(
|
|
1388
1438
|
gn,
|
|
1389
1439
|
vn,
|
|
1390
1440
|
yn,
|
|
1391
1441
|
!1,
|
|
1392
1442
|
null,
|
|
1393
|
-
"
|
|
1443
|
+
"e8983beb"
|
|
1394
1444
|
);
|
|
1395
|
-
const wn = An.exports,
|
|
1445
|
+
const wn = An.exports, bn = {
|
|
1396
1446
|
// 2. 局部注册组件
|
|
1397
1447
|
components: {
|
|
1398
|
-
[
|
|
1448
|
+
[Tt.name]: Tt,
|
|
1399
1449
|
[kt.name]: kt,
|
|
1450
|
+
[_t.name]: _t,
|
|
1400
1451
|
[Et.name]: Et,
|
|
1401
1452
|
[Ot.name]: Ot,
|
|
1402
|
-
[St.name]: St,
|
|
1403
1453
|
[Dt.name]: Dt,
|
|
1404
|
-
[
|
|
1405
|
-
[
|
|
1454
|
+
[St.name]: St,
|
|
1455
|
+
[Rt.name]: Rt
|
|
1406
1456
|
},
|
|
1407
1457
|
data() {
|
|
1408
1458
|
return {
|
|
@@ -1438,10 +1488,10 @@ const wn = An.exports, xn = {
|
|
|
1438
1488
|
};
|
|
1439
1489
|
},
|
|
1440
1490
|
mounted() {
|
|
1441
|
-
|
|
1491
|
+
K.on(Y.Open, this.handleOpen);
|
|
1442
1492
|
},
|
|
1443
1493
|
beforeDestroy() {
|
|
1444
|
-
|
|
1494
|
+
K.off(Y.Open, this.handleOpen);
|
|
1445
1495
|
},
|
|
1446
1496
|
methods: {
|
|
1447
1497
|
handleOpen() {
|
|
@@ -1451,16 +1501,16 @@ const wn = An.exports, xn = {
|
|
|
1451
1501
|
), this.isVisible = !0;
|
|
1452
1502
|
},
|
|
1453
1503
|
closeModal() {
|
|
1454
|
-
this.isVisible = !1,
|
|
1504
|
+
this.isVisible = !1, K.emit(Y.Close), this.$refs.formRef.resetFields();
|
|
1455
1505
|
},
|
|
1456
1506
|
handleSubmit() {
|
|
1457
1507
|
this.$refs.formRef.validate((e) => {
|
|
1458
|
-
e && (
|
|
1508
|
+
e && (K.emit(Y.Submit, { ...this.formData }), this.closeModal());
|
|
1459
1509
|
});
|
|
1460
1510
|
}
|
|
1461
1511
|
}
|
|
1462
1512
|
};
|
|
1463
|
-
var
|
|
1513
|
+
var xn = function() {
|
|
1464
1514
|
var t = this, n = t._self._c;
|
|
1465
1515
|
return n("el-dialog", { attrs: { visible: t.isVisible, "before-close": t.closeModal, "show-close": !1, "close-on-click-modal": !0, width: "500px", "custom-class": "global-modal-custom" }, on: { "update:visible": function(o) {
|
|
1466
1516
|
t.isVisible = o;
|
|
@@ -1480,59 +1530,59 @@ var bn = function() {
|
|
|
1480
1530
|
t.$set(t.formData, "agreement", o);
|
|
1481
1531
|
}, expression: "formData.agreement" } }, [t._v("我同意")]), n("a", { staticClass: "privacy-link", attrs: { href: "#" } }, [t._v("隐私政策")])], 1)], 1)], 1), n("div", { staticClass: "global-modal-footer-custom", attrs: { slot: "footer" }, slot: "footer" }, [n("el-button", { staticClass: "submit-button-custom", attrs: { type: "primary" }, on: { click: t.handleSubmit } }, [t._v(" 加入会员 ")])], 1)]);
|
|
1482
1532
|
}, Cn = [], Rn = /* @__PURE__ */ wt(
|
|
1483
|
-
xn,
|
|
1484
1533
|
bn,
|
|
1534
|
+
xn,
|
|
1485
1535
|
Cn,
|
|
1486
1536
|
!1,
|
|
1487
1537
|
null,
|
|
1488
1538
|
null
|
|
1489
1539
|
);
|
|
1490
|
-
const
|
|
1491
|
-
let
|
|
1540
|
+
const Sn = Rn.exports;
|
|
1541
|
+
let Dn = {
|
|
1492
1542
|
open() {
|
|
1493
|
-
|
|
1543
|
+
K.emit(Y.Open);
|
|
1494
1544
|
},
|
|
1495
1545
|
close() {
|
|
1496
|
-
|
|
1546
|
+
K.emit(Y.Close);
|
|
1497
1547
|
},
|
|
1498
1548
|
onSubmit(e) {
|
|
1499
|
-
|
|
1549
|
+
K.on(Y.Submit, e);
|
|
1500
1550
|
}
|
|
1501
1551
|
};
|
|
1502
|
-
function
|
|
1552
|
+
function kn() {
|
|
1503
1553
|
let e = !1;
|
|
1504
1554
|
return {
|
|
1505
1555
|
install(t) {
|
|
1506
1556
|
if (typeof window < "u" && !e) {
|
|
1507
1557
|
const n = document.createElement("div");
|
|
1508
1558
|
n.setAttribute("id", "global-modal-root"), document.body.appendChild(n);
|
|
1509
|
-
const o = t.extend(
|
|
1559
|
+
const o = t.extend(Sn);
|
|
1510
1560
|
new o().$mount(n), e = !0;
|
|
1511
1561
|
}
|
|
1512
|
-
t.prototype.$globalModal =
|
|
1562
|
+
t.prototype.$globalModal = Dn;
|
|
1513
1563
|
}
|
|
1514
1564
|
};
|
|
1515
1565
|
}
|
|
1516
|
-
const
|
|
1566
|
+
const Nt = {
|
|
1517
1567
|
ApplyDataDialog: wn,
|
|
1518
|
-
JcSearch:
|
|
1568
|
+
JcSearch: te
|
|
1519
1569
|
}, Tn = {
|
|
1520
1570
|
/**
|
|
1521
1571
|
* Vue 2 插件安装方法
|
|
1522
1572
|
* @param Vue Vue 的构造函数
|
|
1523
1573
|
*/
|
|
1524
1574
|
install(e) {
|
|
1525
|
-
Object.keys(
|
|
1526
|
-
e.component(t,
|
|
1575
|
+
Object.keys(Nt).forEach((t) => {
|
|
1576
|
+
e.component(t, Nt[t]);
|
|
1527
1577
|
});
|
|
1528
1578
|
}
|
|
1529
1579
|
};
|
|
1530
1580
|
export {
|
|
1531
1581
|
wn as ApplyDataDialog,
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1582
|
+
Sn as GlobalModal,
|
|
1583
|
+
te as JcSearch,
|
|
1584
|
+
Ln as MODAL_ACTION,
|
|
1585
|
+
kn as createGlobalModalPlugin,
|
|
1536
1586
|
Tn as default,
|
|
1537
1587
|
Bn as emitter
|
|
1538
1588
|
};
|