@jctrans-materials/comps-vue3 1.0.3 → 1.0.4
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/index.cjs.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +611 -554
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { locationSearchV2 as ze, emitter as ce, MODAL_ACTION as ue, initSharedConfig as
|
|
1
|
+
import { ref as T, computed as M, onMounted as We, onBeforeUnmount as gt, defineComponent as Ke, toRef as Ue, watch as Pe, createElementBlock as b, openBlock as A, createElementVNode as m, createBlock as qe, normalizeClass as le, createCommentVNode as I, withDirectives as Oe, Fragment as ne, renderList as pe, toDisplayString as R, withModifiers as te, withKeys as It, normalizeStyle as Re, vModelText as Ge, unref as h, Teleport as yt, renderSlot as Ie, createTextVNode as Ye, vShow as Ft, reactive as He, createVNode as B, onUnmounted as Mt, withCtx as N, Transition as st, nextTick as Ut, createApp as Pt } from "vue";
|
|
2
|
+
import { locationSearchV2 as ze, emitter as ce, MODAL_ACTION as ue, initSharedConfig as Ht } from "@jctrans-materials/shared";
|
|
3
3
|
import { MODAL_ACTION as Dl, emitter as Bl, initSharedConfig as Ll } from "@jctrans-materials/shared";
|
|
4
|
-
import { ElDialog as
|
|
4
|
+
import { ElDialog as Qt, ElForm as $t, ElRow as Fe, ElCol as Ae, ElFormItem as fe, ElInput as we, ElCheckbox as Jt, ElButton as it } from "element-plus";
|
|
5
5
|
function Wt(e) {
|
|
6
|
-
const t =
|
|
6
|
+
const t = T([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", l = M(
|
|
7
7
|
() => (e.value || "") + n
|
|
8
|
-
), i =
|
|
8
|
+
), i = M(
|
|
9
9
|
() => !!e.value && e.value !== ""
|
|
10
10
|
), s = (c) => {
|
|
11
11
|
if (!c || !o) return;
|
|
12
12
|
const r = t.value.filter(
|
|
13
|
-
(
|
|
13
|
+
(f) => f.id && f.id !== c.id || f.display !== c.display
|
|
14
14
|
);
|
|
15
15
|
r.unshift(c);
|
|
16
16
|
const u = r.slice(0, 4);
|
|
@@ -18,8 +18,8 @@ function Wt(e) {
|
|
|
18
18
|
t.value = u;
|
|
19
19
|
try {
|
|
20
20
|
localStorage.setItem(l.value, JSON.stringify(u));
|
|
21
|
-
} catch (
|
|
22
|
-
console.warn("LocalStorage save failed:",
|
|
21
|
+
} catch (f) {
|
|
22
|
+
console.warn("LocalStorage save failed:", f);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}, a = () => {
|
|
@@ -55,13 +55,13 @@ async function Kt(e, t = [
|
|
|
55
55
|
...n
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
const
|
|
59
|
-
function
|
|
60
|
-
const n =
|
|
58
|
+
const qt = (e, t) => ze.searchByIdWithType(e, t);
|
|
59
|
+
function Gt(e, t) {
|
|
60
|
+
const n = T([]), o = T(!1), l = T(!1), i = T(1), s = T(0), a = T(10), c = M(() => s.value === 0 ? !1 : n.value.length >= s.value), r = M(() => {
|
|
61
61
|
const d = [...t.value];
|
|
62
62
|
return d.includes("Country") && !d.includes("Region") && d.push("Region"), d;
|
|
63
63
|
}), u = (d) => !d || !Array.isArray(d) ? [] : d.filter(
|
|
64
|
-
(
|
|
64
|
+
(p) => r.value.includes(p.type)
|
|
65
65
|
);
|
|
66
66
|
return {
|
|
67
67
|
searchResults: n,
|
|
@@ -70,13 +70,13 @@ function qt(e, t) {
|
|
|
70
70
|
isFinished: c,
|
|
71
71
|
currentPage: i,
|
|
72
72
|
total: s,
|
|
73
|
-
fetchData: async (d = 1,
|
|
74
|
-
if (!e.value.trim() && !
|
|
73
|
+
fetchData: async (d = 1, p = !1) => {
|
|
74
|
+
if (!e.value.trim() && !p) {
|
|
75
75
|
n.value = [], s.value = 0;
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
if (!(
|
|
79
|
-
|
|
78
|
+
if (!(p && (l.value || c.value)) && !(!p && o.value)) {
|
|
79
|
+
p ? l.value = !0 : (o.value = !0, i.value = 1);
|
|
80
80
|
try {
|
|
81
81
|
const v = await Kt(
|
|
82
82
|
e.value,
|
|
@@ -86,8 +86,8 @@ function qt(e, t) {
|
|
|
86
86
|
// 使用传入的 page 参数
|
|
87
87
|
size: a.value
|
|
88
88
|
}
|
|
89
|
-
),
|
|
90
|
-
|
|
89
|
+
), w = v.records || [], x = u(w);
|
|
90
|
+
p ? n.value = [...n.value, ...x] : n.value = x, s.value = v.total || 0, i.value = d;
|
|
91
91
|
} catch (v) {
|
|
92
92
|
console.error("Failed to fetch search results:", v);
|
|
93
93
|
} finally {
|
|
@@ -143,9 +143,9 @@ function jt(e, t, n) {
|
|
|
143
143
|
}
|
|
144
144
|
function Zt(e) {
|
|
145
145
|
const t = Ee(e);
|
|
146
|
-
return [
|
|
146
|
+
return [Qe(e), t, Qe(t)];
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Qe(e) {
|
|
149
149
|
return e.replace(/start|end/g, (t) => zt[t]);
|
|
150
150
|
}
|
|
151
151
|
const rt = ["left", "right"], ct = ["right", "left"], en = ["top", "bottom"], tn = ["bottom", "top"];
|
|
@@ -164,7 +164,7 @@ function nn(e, t, n) {
|
|
|
164
164
|
function on(e, t, n, o) {
|
|
165
165
|
const l = Ce(e);
|
|
166
166
|
let i = nn(se(e), n === "start", o);
|
|
167
|
-
return l && (i = i.map((s) => s + "-" + l), t && (i = i.concat(i.map(
|
|
167
|
+
return l && (i = i.map((s) => s + "-" + l), t && (i = i.concat(i.map(Qe)))), i;
|
|
168
168
|
}
|
|
169
169
|
function Ee(e) {
|
|
170
170
|
return e.replace(/left|right|bottom|top/g, (t) => Yt[t]);
|
|
@@ -209,48 +209,48 @@ function ut(e, t, n) {
|
|
|
209
209
|
reference: o,
|
|
210
210
|
floating: l
|
|
211
211
|
} = e;
|
|
212
|
-
const i = oe(t), s = xt(t), a = wt(s), c = se(t), r = i === "y", u = o.x + o.width / 2 - l.width / 2,
|
|
213
|
-
let
|
|
212
|
+
const i = oe(t), s = xt(t), a = wt(s), c = se(t), r = i === "y", u = o.x + o.width / 2 - l.width / 2, f = o.y + o.height / 2 - l.height / 2, d = o[a] / 2 - l[a] / 2;
|
|
213
|
+
let p;
|
|
214
214
|
switch (c) {
|
|
215
215
|
case "top":
|
|
216
|
-
|
|
216
|
+
p = {
|
|
217
217
|
x: u,
|
|
218
218
|
y: o.y - l.height
|
|
219
219
|
};
|
|
220
220
|
break;
|
|
221
221
|
case "bottom":
|
|
222
|
-
|
|
222
|
+
p = {
|
|
223
223
|
x: u,
|
|
224
224
|
y: o.y + o.height
|
|
225
225
|
};
|
|
226
226
|
break;
|
|
227
227
|
case "right":
|
|
228
|
-
|
|
228
|
+
p = {
|
|
229
229
|
x: o.x + o.width,
|
|
230
|
-
y:
|
|
230
|
+
y: f
|
|
231
231
|
};
|
|
232
232
|
break;
|
|
233
233
|
case "left":
|
|
234
|
-
|
|
234
|
+
p = {
|
|
235
235
|
x: o.x - l.width,
|
|
236
|
-
y:
|
|
236
|
+
y: f
|
|
237
237
|
};
|
|
238
238
|
break;
|
|
239
239
|
default:
|
|
240
|
-
|
|
240
|
+
p = {
|
|
241
241
|
x: o.x,
|
|
242
242
|
y: o.y
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
245
|
switch (Ce(t)) {
|
|
246
246
|
case "start":
|
|
247
|
-
|
|
247
|
+
p[s] -= d * (n && r ? -1 : 1);
|
|
248
248
|
break;
|
|
249
249
|
case "end":
|
|
250
|
-
|
|
250
|
+
p[s] += d * (n && r ? -1 : 1);
|
|
251
251
|
break;
|
|
252
252
|
}
|
|
253
|
-
return
|
|
253
|
+
return p;
|
|
254
254
|
}
|
|
255
255
|
const an = async (e, t, n) => {
|
|
256
256
|
const {
|
|
@@ -265,24 +265,24 @@ const an = async (e, t, n) => {
|
|
|
265
265
|
strategy: l
|
|
266
266
|
}), {
|
|
267
267
|
x: u,
|
|
268
|
-
y:
|
|
269
|
-
} = ut(r, o, c), d = o,
|
|
270
|
-
for (let
|
|
268
|
+
y: f
|
|
269
|
+
} = ut(r, o, c), d = o, p = {}, v = 0;
|
|
270
|
+
for (let w = 0; w < a.length; w++) {
|
|
271
271
|
const {
|
|
272
|
-
name:
|
|
272
|
+
name: x,
|
|
273
273
|
fn: g
|
|
274
|
-
} = a[
|
|
274
|
+
} = a[w], {
|
|
275
275
|
x: C,
|
|
276
|
-
y:
|
|
277
|
-
data:
|
|
278
|
-
reset:
|
|
276
|
+
y: k,
|
|
277
|
+
data: E,
|
|
278
|
+
reset: V
|
|
279
279
|
} = await g({
|
|
280
280
|
x: u,
|
|
281
|
-
y:
|
|
281
|
+
y: f,
|
|
282
282
|
initialPlacement: o,
|
|
283
283
|
placement: d,
|
|
284
284
|
strategy: l,
|
|
285
|
-
middlewareData:
|
|
285
|
+
middlewareData: p,
|
|
286
286
|
rects: r,
|
|
287
287
|
platform: s,
|
|
288
288
|
elements: {
|
|
@@ -290,27 +290,27 @@ const an = async (e, t, n) => {
|
|
|
290
290
|
floating: t
|
|
291
291
|
}
|
|
292
292
|
});
|
|
293
|
-
u = C ?? u,
|
|
294
|
-
...
|
|
295
|
-
[
|
|
296
|
-
...
|
|
297
|
-
...
|
|
293
|
+
u = C ?? u, f = k ?? f, p = {
|
|
294
|
+
...p,
|
|
295
|
+
[x]: {
|
|
296
|
+
...p[x],
|
|
297
|
+
...E
|
|
298
298
|
}
|
|
299
|
-
},
|
|
299
|
+
}, V && v <= 50 && (v++, typeof V == "object" && (V.placement && (d = V.placement), V.rects && (r = V.rects === !0 ? await s.getElementRects({
|
|
300
300
|
reference: e,
|
|
301
301
|
floating: t,
|
|
302
302
|
strategy: l
|
|
303
|
-
}) :
|
|
303
|
+
}) : V.rects), {
|
|
304
304
|
x: u,
|
|
305
|
-
y:
|
|
306
|
-
} = ut(r, d, c)),
|
|
305
|
+
y: f
|
|
306
|
+
} = ut(r, d, c)), w = -1);
|
|
307
307
|
}
|
|
308
308
|
return {
|
|
309
309
|
x: u,
|
|
310
|
-
y:
|
|
310
|
+
y: f,
|
|
311
311
|
placement: d,
|
|
312
312
|
strategy: l,
|
|
313
|
-
middlewareData:
|
|
313
|
+
middlewareData: p
|
|
314
314
|
};
|
|
315
315
|
};
|
|
316
316
|
async function Xe(e, t) {
|
|
@@ -326,36 +326,36 @@ async function Xe(e, t) {
|
|
|
326
326
|
} = e, {
|
|
327
327
|
boundary: r = "clippingAncestors",
|
|
328
328
|
rootBoundary: u = "viewport",
|
|
329
|
-
elementContext:
|
|
329
|
+
elementContext: f = "floating",
|
|
330
330
|
altBoundary: d = !1,
|
|
331
|
-
padding:
|
|
332
|
-
} = be(t, e), v = sn(
|
|
333
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(
|
|
331
|
+
padding: p = 0
|
|
332
|
+
} = be(t, e), v = sn(p), x = a[d ? f === "floating" ? "reference" : "floating" : f], g = Ve(await i.getClippingRect({
|
|
333
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(x))) == null || n ? x : x.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
|
|
334
334
|
boundary: r,
|
|
335
335
|
rootBoundary: u,
|
|
336
336
|
strategy: c
|
|
337
|
-
})), C =
|
|
337
|
+
})), C = f === "floating" ? {
|
|
338
338
|
x: o,
|
|
339
339
|
y: l,
|
|
340
340
|
width: s.floating.width,
|
|
341
341
|
height: s.floating.height
|
|
342
|
-
} : s.reference,
|
|
342
|
+
} : s.reference, k = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), E = await (i.isElement == null ? void 0 : i.isElement(k)) ? await (i.getScale == null ? void 0 : i.getScale(k)) || {
|
|
343
343
|
x: 1,
|
|
344
344
|
y: 1
|
|
345
345
|
} : {
|
|
346
346
|
x: 1,
|
|
347
347
|
y: 1
|
|
348
|
-
},
|
|
348
|
+
}, V = Ve(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
349
349
|
elements: a,
|
|
350
350
|
rect: C,
|
|
351
|
-
offsetParent:
|
|
351
|
+
offsetParent: k,
|
|
352
352
|
strategy: c
|
|
353
353
|
}) : C);
|
|
354
354
|
return {
|
|
355
|
-
top: (g.top -
|
|
356
|
-
bottom: (
|
|
357
|
-
left: (g.left -
|
|
358
|
-
right: (
|
|
355
|
+
top: (g.top - V.top + v.top) / E.y,
|
|
356
|
+
bottom: (V.bottom - g.bottom + v.bottom) / E.y,
|
|
357
|
+
left: (g.left - V.left + v.left) / E.x,
|
|
358
|
+
right: (V.right - g.right + v.right) / E.x
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
const rn = function(e) {
|
|
@@ -373,66 +373,66 @@ const rn = function(e) {
|
|
|
373
373
|
elements: r
|
|
374
374
|
} = t, {
|
|
375
375
|
mainAxis: u = !0,
|
|
376
|
-
crossAxis:
|
|
376
|
+
crossAxis: f = !0,
|
|
377
377
|
fallbackPlacements: d,
|
|
378
|
-
fallbackStrategy:
|
|
378
|
+
fallbackStrategy: p = "bestFit",
|
|
379
379
|
fallbackAxisSideDirection: v = "none",
|
|
380
|
-
flipAlignment:
|
|
381
|
-
...
|
|
380
|
+
flipAlignment: w = !0,
|
|
381
|
+
...x
|
|
382
382
|
} = be(e, t);
|
|
383
383
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
384
384
|
return {};
|
|
385
|
-
const g = se(l), C = oe(a),
|
|
386
|
-
!d && W &&
|
|
387
|
-
const
|
|
388
|
-
let
|
|
389
|
-
if (u && K.push(
|
|
390
|
-
const
|
|
391
|
-
K.push(
|
|
385
|
+
const g = se(l), C = oe(a), k = se(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(r.floating)), V = d || (k || !w ? [Ee(a)] : Zt(a)), W = v !== "none";
|
|
386
|
+
!d && W && V.push(...on(a, w, v, E));
|
|
387
|
+
const U = [a, ...V], Q = await Xe(t, x), K = [];
|
|
388
|
+
let P = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
389
|
+
if (u && K.push(Q[g]), f) {
|
|
390
|
+
const q = jt(l, s, E);
|
|
391
|
+
K.push(Q[q[0]], Q[q[1]]);
|
|
392
392
|
}
|
|
393
|
-
if (
|
|
393
|
+
if (P = [...P, {
|
|
394
394
|
placement: l,
|
|
395
395
|
overflows: K
|
|
396
|
-
}], !K.every((
|
|
396
|
+
}], !K.every((q) => q <= 0)) {
|
|
397
397
|
var ee, z;
|
|
398
|
-
const
|
|
399
|
-
if (ae && (!(
|
|
398
|
+
const q = (((ee = i.flip) == null ? void 0 : ee.index) || 0) + 1, ae = U[q];
|
|
399
|
+
if (ae && (!(f === "alignment" ? C !== oe(ae) : !1) || // We leave the current main axis only if every placement on that axis
|
|
400
400
|
// overflows the main axis.
|
|
401
|
-
|
|
401
|
+
P.every((O) => oe(O.placement) === C ? O.overflows[0] > 0 : !0)))
|
|
402
402
|
return {
|
|
403
403
|
data: {
|
|
404
|
-
index:
|
|
405
|
-
overflows:
|
|
404
|
+
index: q,
|
|
405
|
+
overflows: P
|
|
406
406
|
},
|
|
407
407
|
reset: {
|
|
408
408
|
placement: ae
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
|
-
let
|
|
412
|
-
if (!
|
|
413
|
-
switch (
|
|
411
|
+
let S = (z = P.filter((_) => _.overflows[0] <= 0).sort((_, O) => _.overflows[1] - O.overflows[1])[0]) == null ? void 0 : z.placement;
|
|
412
|
+
if (!S)
|
|
413
|
+
switch (p) {
|
|
414
414
|
case "bestFit": {
|
|
415
|
-
var
|
|
416
|
-
const
|
|
415
|
+
var F;
|
|
416
|
+
const _ = (F = P.filter((O) => {
|
|
417
417
|
if (W) {
|
|
418
|
-
const
|
|
419
|
-
return
|
|
418
|
+
const H = oe(O.placement);
|
|
419
|
+
return H === C || // Create a bias to the `y` side axis due to horizontal
|
|
420
420
|
// reading directions favoring greater width.
|
|
421
|
-
|
|
421
|
+
H === "y";
|
|
422
422
|
}
|
|
423
423
|
return !0;
|
|
424
|
-
}).map((
|
|
425
|
-
|
|
424
|
+
}).map((O) => [O.placement, O.overflows.filter((H) => H > 0).reduce((H, ye) => H + ye, 0)]).sort((O, H) => O[1] - H[1])[0]) == null ? void 0 : F[0];
|
|
425
|
+
_ && (S = _);
|
|
426
426
|
break;
|
|
427
427
|
}
|
|
428
428
|
case "initialPlacement":
|
|
429
|
-
|
|
429
|
+
S = a;
|
|
430
430
|
break;
|
|
431
431
|
}
|
|
432
|
-
if (l !==
|
|
432
|
+
if (l !== S)
|
|
433
433
|
return {
|
|
434
434
|
reset: {
|
|
435
|
-
placement:
|
|
435
|
+
placement: S
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
}
|
|
@@ -445,26 +445,26 @@ async function un(e, t) {
|
|
|
445
445
|
placement: n,
|
|
446
446
|
platform: o,
|
|
447
447
|
elements: l
|
|
448
|
-
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), s = se(n), a = Ce(n), c = oe(n) === "y", r = cn.has(s) ? -1 : 1, u = i && c ? -1 : 1,
|
|
448
|
+
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), s = se(n), a = Ce(n), c = oe(n) === "y", r = cn.has(s) ? -1 : 1, u = i && c ? -1 : 1, f = be(t, e);
|
|
449
449
|
let {
|
|
450
450
|
mainAxis: d,
|
|
451
|
-
crossAxis:
|
|
451
|
+
crossAxis: p,
|
|
452
452
|
alignmentAxis: v
|
|
453
|
-
} = typeof
|
|
454
|
-
mainAxis:
|
|
453
|
+
} = typeof f == "number" ? {
|
|
454
|
+
mainAxis: f,
|
|
455
455
|
crossAxis: 0,
|
|
456
456
|
alignmentAxis: null
|
|
457
457
|
} : {
|
|
458
|
-
mainAxis:
|
|
459
|
-
crossAxis:
|
|
460
|
-
alignmentAxis:
|
|
458
|
+
mainAxis: f.mainAxis || 0,
|
|
459
|
+
crossAxis: f.crossAxis || 0,
|
|
460
|
+
alignmentAxis: f.alignmentAxis
|
|
461
461
|
};
|
|
462
|
-
return a && typeof v == "number" && (
|
|
463
|
-
x:
|
|
462
|
+
return a && typeof v == "number" && (p = a === "end" ? v * -1 : v), c ? {
|
|
463
|
+
x: p * u,
|
|
464
464
|
y: d * r
|
|
465
465
|
} : {
|
|
466
466
|
x: d * r,
|
|
467
|
-
y:
|
|
467
|
+
y: p * u
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
470
|
const dn = function(e) {
|
|
@@ -502,11 +502,11 @@ const dn = function(e) {
|
|
|
502
502
|
mainAxis: i = !0,
|
|
503
503
|
crossAxis: s = !1,
|
|
504
504
|
limiter: a = {
|
|
505
|
-
fn: (
|
|
505
|
+
fn: (x) => {
|
|
506
506
|
let {
|
|
507
507
|
x: g,
|
|
508
508
|
y: C
|
|
509
|
-
} =
|
|
509
|
+
} = x;
|
|
510
510
|
return {
|
|
511
511
|
x: g,
|
|
512
512
|
y: C
|
|
@@ -517,35 +517,35 @@ const dn = function(e) {
|
|
|
517
517
|
} = be(e, t), r = {
|
|
518
518
|
x: n,
|
|
519
519
|
y: o
|
|
520
|
-
}, u = await Xe(t, c),
|
|
521
|
-
let
|
|
520
|
+
}, u = await Xe(t, c), f = oe(se(l)), d = At(f);
|
|
521
|
+
let p = r[d], v = r[f];
|
|
522
522
|
if (i) {
|
|
523
|
-
const
|
|
524
|
-
|
|
523
|
+
const x = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", C = p + u[x], k = p - u[g];
|
|
524
|
+
p = at(C, p, k);
|
|
525
525
|
}
|
|
526
526
|
if (s) {
|
|
527
|
-
const
|
|
528
|
-
v = at(C, v,
|
|
527
|
+
const x = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", C = v + u[x], k = v - u[g];
|
|
528
|
+
v = at(C, v, k);
|
|
529
529
|
}
|
|
530
|
-
const
|
|
530
|
+
const w = a.fn({
|
|
531
531
|
...t,
|
|
532
|
-
[d]:
|
|
533
|
-
[
|
|
532
|
+
[d]: p,
|
|
533
|
+
[f]: v
|
|
534
534
|
});
|
|
535
535
|
return {
|
|
536
|
-
...
|
|
536
|
+
...w,
|
|
537
537
|
data: {
|
|
538
|
-
x:
|
|
539
|
-
y:
|
|
538
|
+
x: w.x - n,
|
|
539
|
+
y: w.y - o,
|
|
540
540
|
enabled: {
|
|
541
541
|
[d]: i,
|
|
542
|
-
[
|
|
542
|
+
[f]: s
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
};
|
|
546
546
|
}
|
|
547
547
|
};
|
|
548
|
-
},
|
|
548
|
+
}, pn = function(e) {
|
|
549
549
|
return e === void 0 && (e = {}), {
|
|
550
550
|
name: "size",
|
|
551
551
|
options: e,
|
|
@@ -560,25 +560,25 @@ const dn = function(e) {
|
|
|
560
560
|
apply: c = () => {
|
|
561
561
|
},
|
|
562
562
|
...r
|
|
563
|
-
} = be(e, t), u = await Xe(t, r),
|
|
563
|
+
} = be(e, t), u = await Xe(t, r), f = se(l), d = Ce(l), p = oe(l) === "y", {
|
|
564
564
|
width: v,
|
|
565
|
-
height:
|
|
565
|
+
height: w
|
|
566
566
|
} = i.floating;
|
|
567
|
-
let
|
|
568
|
-
|
|
569
|
-
const C =
|
|
570
|
-
let
|
|
571
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
572
|
-
const
|
|
573
|
-
|
|
567
|
+
let x, g;
|
|
568
|
+
f === "top" || f === "bottom" ? (x = f, g = d === (await (s.isRTL == null ? void 0 : s.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = f, x = d === "end" ? "top" : "bottom");
|
|
569
|
+
const C = w - u.top - u.bottom, k = v - u.left - u.right, E = he(w - u[x], C), V = he(v - u[g], k), W = !t.middlewareData.shift;
|
|
570
|
+
let U = E, Q = V;
|
|
571
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (Q = k), (o = t.middlewareData.shift) != null && o.enabled.y && (U = C), W && !d) {
|
|
572
|
+
const P = $(u.left, 0), ee = $(u.right, 0), z = $(u.top, 0), F = $(u.bottom, 0);
|
|
573
|
+
p ? Q = v - 2 * (P !== 0 || ee !== 0 ? P + ee : $(u.left, u.right)) : U = w - 2 * (z !== 0 || F !== 0 ? z + F : $(u.top, u.bottom));
|
|
574
574
|
}
|
|
575
575
|
await c({
|
|
576
576
|
...t,
|
|
577
|
-
availableWidth:
|
|
578
|
-
availableHeight:
|
|
577
|
+
availableWidth: Q,
|
|
578
|
+
availableHeight: U
|
|
579
579
|
});
|
|
580
580
|
const K = await s.getDimensions(a.floating);
|
|
581
|
-
return v !== K.width ||
|
|
581
|
+
return v !== K.width || w !== K.height ? {
|
|
582
582
|
reset: {
|
|
583
583
|
rects: !0
|
|
584
584
|
}
|
|
@@ -603,7 +603,7 @@ function Z(e) {
|
|
|
603
603
|
function bt(e) {
|
|
604
604
|
return De() ? e instanceof Node || e instanceof J(e).Node : !1;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function G(e) {
|
|
607
607
|
return De() ? e instanceof Element || e instanceof J(e).Element : !1;
|
|
608
608
|
}
|
|
609
609
|
function j(e) {
|
|
@@ -612,7 +612,7 @@ function j(e) {
|
|
|
612
612
|
function dt(e) {
|
|
613
613
|
return !De() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof J(e).ShadowRoot;
|
|
614
614
|
}
|
|
615
|
-
const
|
|
615
|
+
const mn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
616
616
|
function Se(e) {
|
|
617
617
|
const {
|
|
618
618
|
overflow: t,
|
|
@@ -620,7 +620,7 @@ function Se(e) {
|
|
|
620
620
|
overflowY: o,
|
|
621
621
|
display: l
|
|
622
622
|
} = Y(e);
|
|
623
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !
|
|
623
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !mn.has(l);
|
|
624
624
|
}
|
|
625
625
|
const hn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
626
626
|
function vn(e) {
|
|
@@ -638,7 +638,7 @@ function Be(e) {
|
|
|
638
638
|
}
|
|
639
639
|
const yn = ["transform", "translate", "scale", "rotate", "perspective"], An = ["transform", "translate", "scale", "rotate", "perspective", "filter"], wn = ["paint", "layout", "strict", "content"];
|
|
640
640
|
function je(e) {
|
|
641
|
-
const t = Ze(), n =
|
|
641
|
+
const t = Ze(), n = G(e) ? Y(e) : e;
|
|
642
642
|
return yn.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) || An.some((o) => (n.willChange || "").includes(o)) || wn.some((o) => (n.contain || "").includes(o));
|
|
643
643
|
}
|
|
644
644
|
function xn(e) {
|
|
@@ -663,7 +663,7 @@ function Y(e) {
|
|
|
663
663
|
return J(e).getComputedStyle(e);
|
|
664
664
|
}
|
|
665
665
|
function Le(e) {
|
|
666
|
-
return
|
|
666
|
+
return G(e) ? {
|
|
667
667
|
scrollLeft: e.scrollLeft,
|
|
668
668
|
scrollTop: e.scrollTop
|
|
669
669
|
} : {
|
|
@@ -711,9 +711,9 @@ function St(e) {
|
|
|
711
711
|
};
|
|
712
712
|
}
|
|
713
713
|
function et(e) {
|
|
714
|
-
return
|
|
714
|
+
return G(e) ? e : e.contextElement;
|
|
715
715
|
}
|
|
716
|
-
function
|
|
716
|
+
function me(e) {
|
|
717
717
|
const t = et(e);
|
|
718
718
|
if (!j(t))
|
|
719
719
|
return X(1);
|
|
@@ -743,30 +743,30 @@ function de(e, t, n, o) {
|
|
|
743
743
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
744
744
|
const l = e.getBoundingClientRect(), i = et(e);
|
|
745
745
|
let s = X(1);
|
|
746
|
-
t && (o ?
|
|
746
|
+
t && (o ? G(o) && (s = me(o)) : s = me(e));
|
|
747
747
|
const a = Sn(i, n, o) ? kt(i) : X(0);
|
|
748
|
-
let c = (l.left + a.x) / s.x, r = (l.top + a.y) / s.y, u = l.width / s.x,
|
|
748
|
+
let c = (l.left + a.x) / s.x, r = (l.top + a.y) / s.y, u = l.width / s.x, f = l.height / s.y;
|
|
749
749
|
if (i) {
|
|
750
|
-
const d = J(i),
|
|
751
|
-
let v = d,
|
|
752
|
-
for (;
|
|
753
|
-
const
|
|
754
|
-
c *=
|
|
750
|
+
const d = J(i), p = o && G(o) ? J(o) : o;
|
|
751
|
+
let v = d, w = $e(v);
|
|
752
|
+
for (; w && o && p !== v; ) {
|
|
753
|
+
const x = me(w), g = w.getBoundingClientRect(), C = Y(w), k = g.left + (w.clientLeft + parseFloat(C.paddingLeft)) * x.x, E = g.top + (w.clientTop + parseFloat(C.paddingTop)) * x.y;
|
|
754
|
+
c *= x.x, r *= x.y, u *= x.x, f *= x.y, c += k, r += E, v = J(w), w = $e(v);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
757
|
return Ve({
|
|
758
758
|
width: u,
|
|
759
|
-
height:
|
|
759
|
+
height: f,
|
|
760
760
|
x: c,
|
|
761
761
|
y: r
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function Ne(e, t) {
|
|
765
765
|
const n = Le(e).scrollLeft;
|
|
766
766
|
return t ? t.left + n : de(Z(e)).left + n;
|
|
767
767
|
}
|
|
768
768
|
function Rt(e, t) {
|
|
769
|
-
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft -
|
|
769
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Ne(e, n), l = n.top + t.scrollTop;
|
|
770
770
|
return {
|
|
771
771
|
x: o,
|
|
772
772
|
y: l
|
|
@@ -786,12 +786,12 @@ function kn(e) {
|
|
|
786
786
|
scrollLeft: 0,
|
|
787
787
|
scrollTop: 0
|
|
788
788
|
}, r = X(1);
|
|
789
|
-
const u = X(0),
|
|
790
|
-
if ((
|
|
791
|
-
const
|
|
792
|
-
r =
|
|
789
|
+
const u = X(0), f = j(o);
|
|
790
|
+
if ((f || !f && !i) && ((ge(o) !== "body" || Se(s)) && (c = Le(o)), j(o))) {
|
|
791
|
+
const p = de(o);
|
|
792
|
+
r = me(o), u.x = p.x + o.clientLeft, u.y = p.y + o.clientTop;
|
|
793
793
|
}
|
|
794
|
-
const d = s && !
|
|
794
|
+
const d = s && !f && !i ? Rt(s, c) : X(0);
|
|
795
795
|
return {
|
|
796
796
|
width: n.width * r.x,
|
|
797
797
|
height: n.height * r.y,
|
|
@@ -804,7 +804,7 @@ function Rn(e) {
|
|
|
804
804
|
}
|
|
805
805
|
function _n(e) {
|
|
806
806
|
const t = Z(e), n = Le(e), o = e.ownerDocument.body, l = $(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = $(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
807
|
-
let s = -n.scrollLeft +
|
|
807
|
+
let s = -n.scrollLeft + Ne(e);
|
|
808
808
|
const a = -n.scrollTop;
|
|
809
809
|
return Y(o).direction === "rtl" && (s += $(t.clientWidth, o.clientWidth) - l), {
|
|
810
810
|
width: l,
|
|
@@ -822,9 +822,9 @@ function On(e, t) {
|
|
|
822
822
|
const u = Ze();
|
|
823
823
|
(!u || u && t === "fixed") && (a = l.offsetLeft, c = l.offsetTop);
|
|
824
824
|
}
|
|
825
|
-
const r =
|
|
825
|
+
const r = Ne(o);
|
|
826
826
|
if (r <= 0) {
|
|
827
|
-
const u = o.ownerDocument,
|
|
827
|
+
const u = o.ownerDocument, f = u.body, d = getComputedStyle(f), p = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, v = Math.abs(o.clientWidth - f.clientWidth - p);
|
|
828
828
|
v <= ft && (i -= v);
|
|
829
829
|
} else r <= ft && (i += r);
|
|
830
830
|
return {
|
|
@@ -836,7 +836,7 @@ function On(e, t) {
|
|
|
836
836
|
}
|
|
837
837
|
const Tn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
838
838
|
function En(e, t) {
|
|
839
|
-
const n = de(e, !0, t === "fixed"), o = n.top + e.clientTop, l = n.left + e.clientLeft, i = j(e) ?
|
|
839
|
+
const n = de(e, !0, t === "fixed"), o = n.top + e.clientTop, l = n.left + e.clientLeft, i = j(e) ? me(e) : X(1), s = e.clientWidth * i.x, a = e.clientHeight * i.y, c = l * i.x, r = o * i.y;
|
|
840
840
|
return {
|
|
841
841
|
width: s,
|
|
842
842
|
height: a,
|
|
@@ -844,13 +844,13 @@ function En(e, t) {
|
|
|
844
844
|
y: r
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function pt(e, t, n) {
|
|
848
848
|
let o;
|
|
849
849
|
if (t === "viewport")
|
|
850
850
|
o = On(e, n);
|
|
851
851
|
else if (t === "document")
|
|
852
852
|
o = _n(Z(e));
|
|
853
|
-
else if (
|
|
853
|
+
else if (G(t))
|
|
854
854
|
o = En(t, n);
|
|
855
855
|
else {
|
|
856
856
|
const l = kt(e);
|
|
@@ -865,16 +865,16 @@ function mt(e, t, n) {
|
|
|
865
865
|
}
|
|
866
866
|
function _t(e, t) {
|
|
867
867
|
const n = ie(e);
|
|
868
|
-
return n === t || !
|
|
868
|
+
return n === t || !G(n) || ve(n) ? !1 : Y(n).position === "fixed" || _t(n, t);
|
|
869
869
|
}
|
|
870
870
|
function Vn(e, t) {
|
|
871
871
|
const n = t.get(e);
|
|
872
872
|
if (n)
|
|
873
873
|
return n;
|
|
874
|
-
let o = xe(e, [], !1).filter((a) =>
|
|
874
|
+
let o = xe(e, [], !1).filter((a) => G(a) && ge(a) !== "body"), l = null;
|
|
875
875
|
const i = Y(e).position === "fixed";
|
|
876
876
|
let s = i ? ie(e) : e;
|
|
877
|
-
for (;
|
|
877
|
+
for (; G(s) && !ve(s); ) {
|
|
878
878
|
const a = Y(s), c = je(s);
|
|
879
879
|
!c && a.position === "fixed" && (l = null), (i ? !c && !l : !c && a.position === "static" && !!l && Tn.has(l.position) || Se(s) && !c && _t(e, s)) ? o = o.filter((u) => u !== s) : l = a, s = ie(s);
|
|
880
880
|
}
|
|
@@ -888,9 +888,9 @@ function Dn(e) {
|
|
|
888
888
|
strategy: l
|
|
889
889
|
} = e;
|
|
890
890
|
const s = [...n === "clippingAncestors" ? Be(t) ? [] : Vn(t, this._c) : [].concat(n), o], a = s[0], c = s.reduce((r, u) => {
|
|
891
|
-
const
|
|
892
|
-
return r.top = $(
|
|
893
|
-
},
|
|
891
|
+
const f = pt(t, u, l);
|
|
892
|
+
return r.top = $(f.top, r.top), r.right = he(f.right, r.right), r.bottom = he(f.bottom, r.bottom), r.left = $(f.left, r.left), r;
|
|
893
|
+
}, pt(t, a, l));
|
|
894
894
|
return {
|
|
895
895
|
width: c.right - c.left,
|
|
896
896
|
height: c.bottom - c.top,
|
|
@@ -916,26 +916,26 @@ function Ln(e, t, n) {
|
|
|
916
916
|
};
|
|
917
917
|
const c = X(0);
|
|
918
918
|
function r() {
|
|
919
|
-
c.x =
|
|
919
|
+
c.x = Ne(l);
|
|
920
920
|
}
|
|
921
921
|
if (o || !o && !i)
|
|
922
922
|
if ((ge(t) !== "body" || Se(l)) && (a = Le(t)), o) {
|
|
923
|
-
const
|
|
924
|
-
c.x =
|
|
923
|
+
const p = de(t, !0, i, t);
|
|
924
|
+
c.x = p.x + t.clientLeft, c.y = p.y + t.clientTop;
|
|
925
925
|
} else l && r();
|
|
926
926
|
i && !o && l && r();
|
|
927
|
-
const u = l && !o && !i ? Rt(l, a) : X(0),
|
|
927
|
+
const u = l && !o && !i ? Rt(l, a) : X(0), f = s.left + a.scrollLeft - c.x - u.x, d = s.top + a.scrollTop - c.y - u.y;
|
|
928
928
|
return {
|
|
929
|
-
x:
|
|
929
|
+
x: f,
|
|
930
930
|
y: d,
|
|
931
931
|
width: s.width,
|
|
932
932
|
height: s.height
|
|
933
933
|
};
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function Me(e) {
|
|
936
936
|
return Y(e).position === "static";
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function mt(e, t) {
|
|
939
939
|
if (!j(e) || Y(e).position === "fixed")
|
|
940
940
|
return null;
|
|
941
941
|
if (t)
|
|
@@ -950,18 +950,18 @@ function Ot(e, t) {
|
|
|
950
950
|
if (!j(e)) {
|
|
951
951
|
let l = ie(e);
|
|
952
952
|
for (; l && !ve(l); ) {
|
|
953
|
-
if (
|
|
953
|
+
if (G(l) && !Me(l))
|
|
954
954
|
return l;
|
|
955
955
|
l = ie(l);
|
|
956
956
|
}
|
|
957
957
|
return n;
|
|
958
958
|
}
|
|
959
|
-
let o =
|
|
960
|
-
for (; o && vn(o) &&
|
|
961
|
-
o =
|
|
962
|
-
return o && ve(o) &&
|
|
959
|
+
let o = mt(e, t);
|
|
960
|
+
for (; o && vn(o) && Me(o); )
|
|
961
|
+
o = mt(o, t);
|
|
962
|
+
return o && ve(o) && Me(o) && !je(o) ? n : o || xn(e) || n;
|
|
963
963
|
}
|
|
964
|
-
const
|
|
964
|
+
const Nn = async function(e) {
|
|
965
965
|
const t = this.getOffsetParent || Ot, n = this.getDimensions, o = await n(e.floating);
|
|
966
966
|
return {
|
|
967
967
|
reference: Ln(e.reference, await t(e.floating), e.strategy),
|
|
@@ -973,25 +973,25 @@ const In = async function(e) {
|
|
|
973
973
|
}
|
|
974
974
|
};
|
|
975
975
|
};
|
|
976
|
-
function
|
|
976
|
+
function In(e) {
|
|
977
977
|
return Y(e).direction === "rtl";
|
|
978
978
|
}
|
|
979
|
-
const
|
|
979
|
+
const Fn = {
|
|
980
980
|
convertOffsetParentRelativeRectToViewportRelativeRect: kn,
|
|
981
981
|
getDocumentElement: Z,
|
|
982
982
|
getClippingRect: Dn,
|
|
983
983
|
getOffsetParent: Ot,
|
|
984
|
-
getElementRects:
|
|
984
|
+
getElementRects: Nn,
|
|
985
985
|
getClientRects: Rn,
|
|
986
986
|
getDimensions: Bn,
|
|
987
|
-
getScale:
|
|
988
|
-
isElement:
|
|
989
|
-
isRTL:
|
|
987
|
+
getScale: me,
|
|
988
|
+
isElement: G,
|
|
989
|
+
isRTL: In
|
|
990
990
|
};
|
|
991
991
|
function Tt(e, t) {
|
|
992
992
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function Mn(e, t) {
|
|
995
995
|
let n = null, o;
|
|
996
996
|
const l = Z(e);
|
|
997
997
|
function i() {
|
|
@@ -1002,42 +1002,42 @@ function Nn(e, t) {
|
|
|
1002
1002
|
a === void 0 && (a = !1), c === void 0 && (c = 1), i();
|
|
1003
1003
|
const r = e.getBoundingClientRect(), {
|
|
1004
1004
|
left: u,
|
|
1005
|
-
top:
|
|
1005
|
+
top: f,
|
|
1006
1006
|
width: d,
|
|
1007
|
-
height:
|
|
1007
|
+
height: p
|
|
1008
1008
|
} = r;
|
|
1009
|
-
if (a || t(), !d || !
|
|
1009
|
+
if (a || t(), !d || !p)
|
|
1010
1010
|
return;
|
|
1011
|
-
const v = _e(
|
|
1012
|
-
rootMargin: -v + "px " + -
|
|
1011
|
+
const v = _e(f), w = _e(l.clientWidth - (u + d)), x = _e(l.clientHeight - (f + p)), g = _e(u), k = {
|
|
1012
|
+
rootMargin: -v + "px " + -w + "px " + -x + "px " + -g + "px",
|
|
1013
1013
|
threshold: $(0, he(1, c)) || 1
|
|
1014
1014
|
};
|
|
1015
|
-
let
|
|
1016
|
-
function
|
|
1017
|
-
const
|
|
1018
|
-
if (
|
|
1019
|
-
if (!
|
|
1015
|
+
let E = !0;
|
|
1016
|
+
function V(W) {
|
|
1017
|
+
const U = W[0].intersectionRatio;
|
|
1018
|
+
if (U !== c) {
|
|
1019
|
+
if (!E)
|
|
1020
1020
|
return s();
|
|
1021
|
-
|
|
1021
|
+
U ? s(!1, U) : o = setTimeout(() => {
|
|
1022
1022
|
s(!1, 1e-7);
|
|
1023
1023
|
}, 1e3);
|
|
1024
1024
|
}
|
|
1025
|
-
|
|
1025
|
+
U === 1 && !Tt(r, e.getBoundingClientRect()) && s(), E = !1;
|
|
1026
1026
|
}
|
|
1027
1027
|
try {
|
|
1028
|
-
n = new IntersectionObserver(
|
|
1029
|
-
...
|
|
1028
|
+
n = new IntersectionObserver(V, {
|
|
1029
|
+
...k,
|
|
1030
1030
|
// Handle <iframe>s
|
|
1031
1031
|
root: l.ownerDocument
|
|
1032
1032
|
});
|
|
1033
1033
|
} catch {
|
|
1034
|
-
n = new IntersectionObserver(
|
|
1034
|
+
n = new IntersectionObserver(V, k);
|
|
1035
1035
|
}
|
|
1036
1036
|
n.observe(e);
|
|
1037
1037
|
}
|
|
1038
1038
|
return s(!0), i;
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function Un(e, t, n, o) {
|
|
1041
1041
|
o === void 0 && (o = {});
|
|
1042
1042
|
const {
|
|
1043
1043
|
ancestorScroll: l = !0,
|
|
@@ -1051,31 +1051,31 @@ function Pn(e, t, n, o) {
|
|
|
1051
1051
|
passive: !0
|
|
1052
1052
|
}), i && g.addEventListener("resize", n);
|
|
1053
1053
|
});
|
|
1054
|
-
const
|
|
1055
|
-
let d = -1,
|
|
1056
|
-
s && (
|
|
1054
|
+
const f = r && a ? Mn(r, n) : null;
|
|
1055
|
+
let d = -1, p = null;
|
|
1056
|
+
s && (p = new ResizeObserver((g) => {
|
|
1057
1057
|
let [C] = g;
|
|
1058
|
-
C && C.target === r &&
|
|
1059
|
-
var
|
|
1060
|
-
(
|
|
1058
|
+
C && C.target === r && p && (p.unobserve(t), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1059
|
+
var k;
|
|
1060
|
+
(k = p) == null || k.observe(t);
|
|
1061
1061
|
})), n();
|
|
1062
|
-
}), r && !c &&
|
|
1063
|
-
let v,
|
|
1064
|
-
c &&
|
|
1065
|
-
function
|
|
1062
|
+
}), r && !c && p.observe(r), p.observe(t));
|
|
1063
|
+
let v, w = c ? de(e) : null;
|
|
1064
|
+
c && x();
|
|
1065
|
+
function x() {
|
|
1066
1066
|
const g = de(e);
|
|
1067
|
-
|
|
1067
|
+
w && !Tt(w, g) && n(), w = g, v = requestAnimationFrame(x);
|
|
1068
1068
|
}
|
|
1069
1069
|
return n(), () => {
|
|
1070
1070
|
var g;
|
|
1071
1071
|
u.forEach((C) => {
|
|
1072
1072
|
l && C.removeEventListener("scroll", n), i && C.removeEventListener("resize", n);
|
|
1073
|
-
}),
|
|
1073
|
+
}), f?.(), (g = p) == null || g.disconnect(), p = null, c && cancelAnimationFrame(v);
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
const
|
|
1076
|
+
const Pn = dn, Hn = fn, Qn = rn, $n = pn, Jn = (e, t, n) => {
|
|
1077
1077
|
const o = /* @__PURE__ */ new Map(), l = {
|
|
1078
|
-
platform:
|
|
1078
|
+
platform: Fn,
|
|
1079
1079
|
...n
|
|
1080
1080
|
}, i = {
|
|
1081
1081
|
...l.platform,
|
|
@@ -1087,7 +1087,7 @@ const Hn = dn, Qn = fn, Un = rn, $n = mn, Jn = (e, t, n) => {
|
|
|
1087
1087
|
});
|
|
1088
1088
|
};
|
|
1089
1089
|
function Wn(e, t) {
|
|
1090
|
-
const n =
|
|
1090
|
+
const n = T({
|
|
1091
1091
|
position: "fixed",
|
|
1092
1092
|
left: "0",
|
|
1093
1093
|
top: "0",
|
|
@@ -1100,11 +1100,11 @@ function Wn(e, t) {
|
|
|
1100
1100
|
placement: "bottom-start",
|
|
1101
1101
|
strategy: "fixed",
|
|
1102
1102
|
middleware: [
|
|
1103
|
-
|
|
1103
|
+
Pn(6),
|
|
1104
1104
|
// 输入框与下拉列表的间距
|
|
1105
|
-
|
|
1105
|
+
Qn(),
|
|
1106
1106
|
// 空间不足自动翻转到上方
|
|
1107
|
-
|
|
1107
|
+
Hn({ padding: 10 }),
|
|
1108
1108
|
// 靠近屏幕边缘时自动位移
|
|
1109
1109
|
$n({
|
|
1110
1110
|
apply({ rects: a, elements: c }) {
|
|
@@ -1125,13 +1125,13 @@ function Wn(e, t) {
|
|
|
1125
1125
|
});
|
|
1126
1126
|
});
|
|
1127
1127
|
}, i = () => {
|
|
1128
|
-
e.value && t.value && (o =
|
|
1128
|
+
e.value && t.value && (o = Un(e.value, t.value, l));
|
|
1129
1129
|
}, s = () => {
|
|
1130
1130
|
o && (o(), o = null);
|
|
1131
1131
|
};
|
|
1132
1132
|
return gt(s), { floatingStyles: n, startTrack: i, stopTrack: s };
|
|
1133
1133
|
}
|
|
1134
|
-
const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACT0lEQVR4AaRSO2hTYRT+zn9v2g6CiktFJYoVHXQoOljM2EIEh0orbRKa5qUuDoIZAnXI4FBwcRDikMcNkoQMQjcVESo4OASsW2kLBi3oUKiD1OZx7/H811wJZFF6uOee85/H93/3nKtwQPkvgFKpdKRgVR+UrFrOsurX9N3/DJCvVPxMwx+lKcbgKzbstPhwAXSyWK7eLZZrc4VCNZDPPx/Tt+kCrTqvOrQqfuNrc2OcgW0CduQM9TfJyIB5mQy8UaaxKbftFq3qL9HP1KGGFDe+NDdC/jPnlwgcZEM9lRiU2VFjgngI4FGxa0IvZXecU07XPsc2pkCUIULaa2Z2MsJ7Orkw/8kFiMVCb4XWcQV14w8temL4aJNM47Fh0OHEYqieWAyXT/jPBhzmh7o5EY28Rk/cGWSz2a4GSsTCt3tgs5qmDc726sTQvsS6/c0SFDz97lO/329K4z2Amm1u3ZK11SyrOmNC/ZDYSElWiT5R2resymUZ1pIUv2Qa+iafcrrFretDNJwTf94GUnt7u9u6to3hUW09dQEcIC+BR0LxqgztPnFrotd8wWHclNykaR4dYeCngj0IQNyekOQshLas8hmzLyA3B2UTU6l4eEX8Ld8IZsTu+Mg4hj5xGcTj8f1kLPxChjgO0AdWlAOwnkotbImFrHGFGdOy6u82aJAB+kUZywQ6KaH3ou7TcbguziRApiLWOXjiMvAO2iaic3rH6wxe1Wetd+KRNQKEDV9kwisd83QAQCfkr7uUjEUq2vdUgdJQFExEw++8mLa/AQAA//9h0VsEAAAABklEQVQDAKhs6Pxd3K8TAAAAAElFTkSuQmCC",
|
|
1134
|
+
const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACT0lEQVR4AaRSO2hTYRT+zn9v2g6CiktFJYoVHXQoOljM2EIEh0orbRKa5qUuDoIZAnXI4FBwcRDikMcNkoQMQjcVESo4OASsW2kLBi3oUKiD1OZx7/H811wJZFF6uOee85/H93/3nKtwQPkvgFKpdKRgVR+UrFrOsurX9N3/DJCvVPxMwx+lKcbgKzbstPhwAXSyWK7eLZZrc4VCNZDPPx/Tt+kCrTqvOrQqfuNrc2OcgW0CduQM9TfJyIB5mQy8UaaxKbftFq3qL9HP1KGGFDe+NDdC/jPnlwgcZEM9lRiU2VFjgngI4FGxa0IvZXecU07XPsc2pkCUIULaa2Z2MsJ7Orkw/8kFiMVCb4XWcQV14w8temL4aJNM47Fh0OHEYqieWAyXT/jPBhzmh7o5EY28Rk/cGWSz2a4GSsTCt3tgs5qmDc726sTQvsS6/c0SFDz97lO/329K4z2Amm1u3ZK11SyrOmNC/ZDYSElWiT5R2resymUZ1pIUv2Qa+iafcrrFretDNJwTf94GUnt7u9u6to3hUW09dQEcIC+BR0LxqgztPnFrotd8wWHclNykaR4dYeCngj0IQNyekOQshLas8hmzLyA3B2UTU6l4eEX8Ld8IZsTu+Mg4hj5xGcTj8f1kLPxChjgO0AdWlAOwnkotbImFrHGFGdOy6u82aJAB+kUZywQ6KaH3ou7TcbguziRApiLWOXjiMvAO2iaic3rH6wxe1Wetd+KRNQKEDV9kwisd83QAQCfkr7uUjEUq2vdUgdJQFExEw++8mLa/AQAA//9h0VsEAAAABklEQVQDAKhs6Pxd3K8TAAAAAElFTkSuQmCC", qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgUlEQVR4AXRST0hUYRD/zbfbrqahQpAHlQ3dSurYoaBAwWNQkIT7J/ve09DQsOigkNCha4ckl4Lct0/S3QI7REFEBB08FBHRIYLwIJEodOlUurnfNN+6mq9weMPM+818v2/mm1HYQXK5XH02mz9h1fo7pOE/gkwmU+v5+fuGot8phJdWmSLLnl+4I0RV/xIFCGxCdU3DUwaOkULX18Uve1ydrC4xdwLcwRR9bnO2kwQIoCIDEowpXjsZ4vBCSyx+w/Nnb1KElkkwG4OqGhG79QUImEkT0T2JrpZ4fV5sF0Ad6je9BrBKxLeZuVv8rS9IAG4qGf5oTPSolNxIXOyUNjqlpb0W4xI+Cd62dVqcAAGBVqSCVmPMIoPCttzm2MEBAoeLir4hRK2AWPyVIAHRHMH0Ly0tCBF3M5t+Aq6A0HPJSSyCeZAIz7BNAgQwqxNyc1NL7MCoeyH1xNWpuKsTcet7fv46QI0/zdoEtkmAwHGcHyFQj/Q57vuPzm7m+X5efB6HYj3kOCubuLVlApltfdbPX5uaetCmdeKVAqUN1mdy04XR3PTsqAHPWMztTb24myvEBBuRM+WlUnbzDEXeya2D4XC0zrJqnXwsO3pG3mCMGWMK6lQZk2A0hH2GMSxL9VlI6lVkd90RgGKkVFrrc+9REXubjLH9FxfbbVUVGG5v4i2p8LD8x9ax65C66KTfKGCSDc97fv6DJzuf9QtDtm+iqsM1ot70w9O+YDbmSQ6bkkyCJitnAUcnryqmuExgSsZYKypvgFvS+5xVsJk0MGlps97mFCVXpnNZqoBcbo2QyJz7dCLj6JTj6tRxVyf3izZUtNndwM73SU55JzaO4Q8AAAD//54At5MAAAAGSURBVAMAh2IbMAJQAZQAAAAASUVORK5CYII=", Gn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACC0lEQVR4AXxRv2tTURT+zk1iIjgoOMShkIJVNwf/gQYULOjQwaGvGl8TBMEMDg4ODgF17likvL4HIYm4OLg61K2CooWKDoKCDoJDHASb9N17POf5Enwk6eN+9/z+3nfvNZjxbYS9ymbYXlQ8CbvnZrRhKoEOFMl9zFHuuaJA/E4Jp5FMJTCwZWner/veCYX6ecQVsRNrKsFE1yGJDMFW1Hm4FXX7hnIvADquvkJ9zYn/U3vw35chYOA2Ebcc26uWbVWwnKKqOak9ktmmYLwyBATkY+d2b63d2FYgps9umNtTX6G18WTqmNRmTNB+djaIOqEpmC+FIn8Lom4vaD89n2lKgwkCebYNsvEnAlXI4CIMXSagTNa9l9p6Ojc2CUEYhiW5oE3IxQH4AYNFeb5qvea9SuB7Vc1J7ReDjomidZ2RWNKysyneFHNFovGgxIiizoWR9BGRqiKw76i0qj2JAo7jtwycJDvY1eQIDNM0lu+OYrUHf/BBbEmI9sTKP2VvNGpvAP4Kc1SVSGb2OlLiVQa+12srr7UrUZA6Lx27e0HUu6PnU/kOXGbwaT1Gq9XKa80xmgTa1hlFQiBP1hNWn4AdOd8DpmLfgnakYV/yv/UF5ipn+qLyvgGp2us6I/V/R+DYPiYenpKbv0Y8mGeLS0OmhYbvLQuWiGkeFkuGBwtrvrdyMKA5nVGCvwAAAP//q4xnOgAAAAZJREFUAwCH2O8KfEWHWQAAAABJRU5ErkJggg==", Yn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACmklEQVR4AXRTT0jUQRT+3uyqGxgYeCiy1JAo6JBUp4Q81EEiKKiDa+H+/ENGHgPpZtChQ4EHL+Ku+9t0V7EkQSGPBYGHBIU6RAqt2cFDBw9C+3de3yy7hobDvHm/+d4337x58xuDQ9r4+FRDLJZqG49PtrvvQ2j4TyDmJ7sm/NRqoMpsIYD3RgIL7pvY54lEqvug0J5APB4PxfzUOwFGRWReVJp7I+GjW+nvxxQo0DagOjLhJxcctyK0J6BS/UaAc1nNtXrdnc88rzPtSMPDwwXiM7R2WNwDpMVKzTTKrSRQTq0tq9mOR55XWliOY2wsVQ+RRWZQiyACjiPQ9pg/0+U4JQEoBkXMi4OLmWpdsEZXofY5yYtSzH10HHJHBPYJMZhyhS8X84U5B+y36iaBNPxMr59nPTo9z8uU4jaToL8Yj88eN2xNTG+3r+/BBncMuSLRln1/+iZgdkhEY2NjvfMVo1DarbG20GIqoPMaqL5G38Zb+GBh36roMufpzc3N3xSvi0ZfX6APEYNAg86bjMluCFDr+7OX1JoWQNJed/ipaK6Z6oOi2dbTZ85eVan+YYLBL7yBdRb9IXkha23aPPa8bQBrFoUVqo4qMMU5mOZ2JBKeo98RiwHi8xQ7Qo6vCsdb6e+//4ubgJegLzlmDOQ6i/XKCVQskZg9aaFtRrBGsYytQpQiu+SPOI5xQ2+kK6mQJRJHo8lko8MqxswGhceCzY25mMnLEmOf3Br6f2/BaLaTqhuSl6/xxPRQNDrJehBRrSWxABMaMnmsKfCN9eEfSZS9lAG9O3OmJ9J1C9ABVb1rgoF1PqA/Cokw3k7stgKDvZHwHXcUYqW+J1CacejlcXoi4SvFvD2lRdxAER0s3glirS5Gyr7+FwAA//8Pj6q2AAAABklEQVQDAJPeLlNn5TR8AAAAAElFTkSuQmCC", zn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==", Je = "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", Xn = { class: "search-container" }, jn = { class: "selection-wrapper" }, Zn = { class: "tag-text" }, eo = ["onClick"], to = {
|
|
1135
1135
|
key: 0,
|
|
1136
1136
|
class: "search-tag collapse"
|
|
1137
1137
|
}, no = ["placeholder"], oo = { class: "suffix-area" }, lo = {
|
|
@@ -1140,7 +1140,7 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1140
1140
|
}, so = { class: "search-icon" }, io = ["src"], ao = {
|
|
1141
1141
|
key: 0,
|
|
1142
1142
|
class: "history-section"
|
|
1143
|
-
}, ro = { class: "history-header" }, co = ["onMousedown"], uo = ["src"], fo = { class: "type-text" },
|
|
1143
|
+
}, ro = { class: "history-header" }, co = ["onMousedown"], uo = ["src"], fo = { class: "type-text" }, po = { class: "result-text" }, mo = {
|
|
1144
1144
|
key: 0,
|
|
1145
1145
|
class: "status-msg"
|
|
1146
1146
|
}, ho = ["onMousedown"], vo = ["src"], go = { class: "type-text" }, yo = { class: "result-text" }, Ao = {
|
|
@@ -1180,92 +1180,103 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1180
1180
|
"remove"
|
|
1181
1181
|
],
|
|
1182
1182
|
setup(e, { emit: t }) {
|
|
1183
|
-
const n = e, o = t, l =
|
|
1184
|
-
let
|
|
1185
|
-
const d =
|
|
1186
|
-
|
|
1183
|
+
const n = e, o = t, l = T(null), i = T(null), s = T(null), a = T(""), c = T(""), r = T(!1), u = T(!1);
|
|
1184
|
+
let f = null;
|
|
1185
|
+
const d = M(() => n.modelValue ? Array.isArray(n.modelValue) ? n.modelValue : [n.modelValue] : []), p = M(() => n.multiple ? n.collapseTags ? d.value.slice(0, 1) : d.value : []), v = M(() => a.value || d.value.length > 0), w = M(() => n.multiple ? a.value ? `${a.value.length * 10 + 20}px` : "10px" : "100%"), { searchHistory: x, saveToHistory: g, clearHistory: C } = Wt(
|
|
1186
|
+
Ue(n, "historyKey")
|
|
1187
1187
|
), {
|
|
1188
|
-
searchResults:
|
|
1189
|
-
loading:
|
|
1190
|
-
isFetchingMore:
|
|
1188
|
+
searchResults: k,
|
|
1189
|
+
loading: E,
|
|
1190
|
+
isFetchingMore: V,
|
|
1191
1191
|
isFinished: W,
|
|
1192
|
-
currentPage:
|
|
1193
|
-
fetchData:
|
|
1192
|
+
currentPage: U,
|
|
1193
|
+
fetchData: Q,
|
|
1194
1194
|
filterByTypes: K
|
|
1195
|
-
} =
|
|
1195
|
+
} = Gt(a, Ue(n, "searchTypeList")), { floatingStyles: P, startTrack: ee, stopTrack: z } = Wn(
|
|
1196
1196
|
i,
|
|
1197
1197
|
s
|
|
1198
|
-
),
|
|
1199
|
-
if (n.lang
|
|
1198
|
+
), F = M(() => {
|
|
1199
|
+
if (n.lang)
|
|
1200
1200
|
return n.lang === "en" || n.lang === "en-US";
|
|
1201
|
-
let x = "";
|
|
1202
1201
|
try {
|
|
1203
1202
|
if (typeof useCookie == "function") {
|
|
1204
|
-
const
|
|
1205
|
-
if (
|
|
1203
|
+
const y = useCookie("jc-language")?.value;
|
|
1204
|
+
if (y)
|
|
1205
|
+
return /^en(-US)?$/.test(y);
|
|
1206
1206
|
}
|
|
1207
1207
|
} catch {
|
|
1208
1208
|
}
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1209
|
+
if (typeof document < "u") {
|
|
1210
|
+
const y = document.cookie || "";
|
|
1211
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(y);
|
|
1212
|
+
}
|
|
1213
|
+
try {
|
|
1214
|
+
if (typeof useNuxtApp == "function") {
|
|
1215
|
+
const L = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
|
|
1216
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(L);
|
|
1217
|
+
}
|
|
1218
|
+
} catch {
|
|
1219
|
+
}
|
|
1220
|
+
return !1;
|
|
1221
|
+
}), q = M(() => n.multiple && d.value.length > 0 ? "" : r.value && !n.multiple ? c.value : n.placeholder || F.value ? "Please enter..." : "请输入..."), ae = () => l.value?.focus(), S = (y) => {
|
|
1222
|
+
if (g(y), n.multiple) {
|
|
1223
|
+
if (!d.value.some((D) => D.id === y.id)) {
|
|
1224
|
+
const D = [...d.value, y];
|
|
1225
|
+
o("update:modelValue", D);
|
|
1215
1226
|
}
|
|
1216
1227
|
a.value = "";
|
|
1217
1228
|
} else
|
|
1218
|
-
c.value = ke(
|
|
1219
|
-
o("select",
|
|
1220
|
-
},
|
|
1221
|
-
const
|
|
1222
|
-
o("update:modelValue",
|
|
1223
|
-
},
|
|
1224
|
-
n.multiple && !a.value && d.value.length > 0 &&
|
|
1229
|
+
c.value = ke(y), r.value = !0, a.value = "", u.value = !1, o("update:modelValue", y);
|
|
1230
|
+
o("select", y);
|
|
1231
|
+
}, _ = (y) => {
|
|
1232
|
+
const L = d.value.filter((D) => D.id !== y.id);
|
|
1233
|
+
o("update:modelValue", L), o("remove", y);
|
|
1234
|
+
}, O = () => {
|
|
1235
|
+
n.multiple && !a.value && d.value.length > 0 && _(
|
|
1225
1236
|
d.value[d.value.length - 1]
|
|
1226
1237
|
);
|
|
1227
|
-
},
|
|
1238
|
+
}, H = () => {
|
|
1228
1239
|
a.value = "", r.value = !1, c.value = "", o("update:modelValue", n.multiple ? [] : null);
|
|
1229
1240
|
}, ye = async () => {
|
|
1230
|
-
if (u.value = !0, !n.multiple && r.value &&
|
|
1231
|
-
const
|
|
1232
|
-
if (
|
|
1233
|
-
|
|
1241
|
+
if (u.value = !0, !n.multiple && r.value && k.value.length === 0) {
|
|
1242
|
+
const y = n.modelValue;
|
|
1243
|
+
if (y?.id) {
|
|
1244
|
+
E.value = !0;
|
|
1234
1245
|
try {
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1237
|
-
|
|
1246
|
+
const L = await qt(
|
|
1247
|
+
y.id,
|
|
1248
|
+
y.type
|
|
1238
1249
|
);
|
|
1239
|
-
|
|
1250
|
+
k.value = K(L.records);
|
|
1240
1251
|
} finally {
|
|
1241
|
-
|
|
1252
|
+
E.value = !1;
|
|
1242
1253
|
}
|
|
1243
1254
|
}
|
|
1244
1255
|
}
|
|
1245
|
-
}, Vt = () => setTimeout(() => u.value = !1, 200), Dt = (
|
|
1246
|
-
|
|
1256
|
+
}, Vt = () => setTimeout(() => u.value = !1, 200), Dt = (y) => {
|
|
1257
|
+
y.target.value === "" && !n.multiple && H();
|
|
1247
1258
|
}, Bt = () => {
|
|
1248
1259
|
n.multiple ? o("submit-search", d.value) : r.value && o("submit-search", n.modelValue), u.value = !1;
|
|
1249
|
-
}, Lt = (
|
|
1250
|
-
const { scrollTop:
|
|
1251
|
-
|
|
1260
|
+
}, Lt = (y) => {
|
|
1261
|
+
const { scrollTop: L, scrollHeight: D, clientHeight: re } = y.target;
|
|
1262
|
+
L + re >= D - 20 && !E.value && !V.value && !W.value && a.value && Q(U.value + 1, !0);
|
|
1252
1263
|
};
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
}),
|
|
1256
|
-
if (!
|
|
1257
|
-
|
|
1264
|
+
Pe(u, (y) => {
|
|
1265
|
+
y ? ee() : z();
|
|
1266
|
+
}), Pe(a, (y) => {
|
|
1267
|
+
if (!y.trim()) {
|
|
1268
|
+
k.value = [];
|
|
1258
1269
|
return;
|
|
1259
1270
|
}
|
|
1260
|
-
|
|
1271
|
+
f && clearTimeout(f), f = setTimeout(() => Q(1, !1), 300);
|
|
1261
1272
|
});
|
|
1262
|
-
const nt = (
|
|
1273
|
+
const nt = (y) => ({
|
|
1263
1274
|
City: zn,
|
|
1264
1275
|
Country: Yn,
|
|
1265
1276
|
Airport: Kn,
|
|
1266
|
-
Seaport:
|
|
1267
|
-
})[
|
|
1268
|
-
const
|
|
1277
|
+
Seaport: Gn
|
|
1278
|
+
})[y] || qn, ke = (y) => F.value ? y.displayEn || y.display || "" : y.displayCn || y.display || "", ot = (y) => {
|
|
1279
|
+
const L = {
|
|
1269
1280
|
City: {
|
|
1270
1281
|
en: "City",
|
|
1271
1282
|
cn: "城市"
|
|
@@ -1287,142 +1298,142 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1287
1298
|
cn: "港口"
|
|
1288
1299
|
}
|
|
1289
1300
|
};
|
|
1290
|
-
return
|
|
1291
|
-
},
|
|
1292
|
-
return gt(z), (
|
|
1293
|
-
|
|
1301
|
+
return F.value ? L[y].en : L[y].cn;
|
|
1302
|
+
}, Nt = (y) => d.value.some((L) => L.id === y.id);
|
|
1303
|
+
return gt(z), (y, L) => (A(), b("div", Xn, [
|
|
1304
|
+
m("div", {
|
|
1294
1305
|
class: le(["search-input-wrapper", { "is-multiple": e.multiple }]),
|
|
1295
1306
|
ref_key: "referenceRef",
|
|
1296
1307
|
ref: i,
|
|
1297
1308
|
onClick: ae
|
|
1298
1309
|
}, [
|
|
1299
|
-
|
|
1300
|
-
e.multiple && d.value.length > 0 ? (
|
|
1301
|
-
(
|
|
1302
|
-
key:
|
|
1310
|
+
m("div", jn, [
|
|
1311
|
+
e.multiple && d.value.length > 0 ? (A(), b(ne, { key: 0 }, [
|
|
1312
|
+
(A(!0), b(ne, null, pe(p.value, (D, re) => (A(), b("div", {
|
|
1313
|
+
key: D.id || re,
|
|
1303
1314
|
class: "search-tag"
|
|
1304
1315
|
}, [
|
|
1305
|
-
|
|
1306
|
-
|
|
1316
|
+
m("span", Zn, R(ke(D)), 1),
|
|
1317
|
+
m("span", {
|
|
1307
1318
|
class: "tag-close",
|
|
1308
|
-
onClick: te((lt) =>
|
|
1319
|
+
onClick: te((lt) => _(D), ["stop"])
|
|
1309
1320
|
}, "×", 8, eo)
|
|
1310
1321
|
]))), 128)),
|
|
1311
|
-
e.collapseTags && d.value.length > 1 ? (
|
|
1312
|
-
], 64)) :
|
|
1313
|
-
Oe(
|
|
1322
|
+
e.collapseTags && d.value.length > 1 ? (A(), b("div", to, " + " + R(d.value.length - 1), 1)) : I("", !0)
|
|
1323
|
+
], 64)) : I("", !0),
|
|
1324
|
+
Oe(m("input", {
|
|
1314
1325
|
ref_key: "inputRef",
|
|
1315
1326
|
ref: l,
|
|
1316
1327
|
class: le({ "is-selected-state": r.value && !e.multiple }),
|
|
1317
|
-
"onUpdate:modelValue":
|
|
1328
|
+
"onUpdate:modelValue": L[0] || (L[0] = (D) => a.value = D),
|
|
1318
1329
|
type: "text",
|
|
1319
|
-
placeholder:
|
|
1320
|
-
style: Re({ width:
|
|
1330
|
+
placeholder: q.value,
|
|
1331
|
+
style: Re({ width: w.value }),
|
|
1321
1332
|
onFocus: ye,
|
|
1322
1333
|
onBlur: Vt,
|
|
1323
1334
|
onInput: Dt,
|
|
1324
|
-
onKeydown:
|
|
1335
|
+
onKeydown: It(O, ["delete"])
|
|
1325
1336
|
}, null, 46, no), [
|
|
1326
|
-
[
|
|
1337
|
+
[Ge, a.value]
|
|
1327
1338
|
])
|
|
1328
1339
|
]),
|
|
1329
|
-
|
|
1330
|
-
v.value ? (
|
|
1340
|
+
m("div", oo, [
|
|
1341
|
+
v.value ? (A(), b("span", {
|
|
1331
1342
|
key: 0,
|
|
1332
1343
|
class: "clear-icon",
|
|
1333
|
-
onMousedown:
|
|
1344
|
+
onMousedown: L[1] || (L[1] = te(() => {
|
|
1334
1345
|
}, ["prevent"])),
|
|
1335
|
-
onClick: te(
|
|
1336
|
-
}, "ⓧ", 32)) :
|
|
1337
|
-
h(
|
|
1346
|
+
onClick: te(H, ["stop"])
|
|
1347
|
+
}, "ⓧ", 32)) : I("", !0),
|
|
1348
|
+
h(E) && !h(V) ? (A(), b("div", lo)) : !h(E) && e.showSearchIcon ? (A(), b("button", {
|
|
1338
1349
|
key: 2,
|
|
1339
1350
|
class: "search-btn",
|
|
1340
1351
|
onClick: te(Bt, ["stop"])
|
|
1341
1352
|
}, [
|
|
1342
|
-
|
|
1343
|
-
|
|
1353
|
+
m("span", so, [
|
|
1354
|
+
m("img", {
|
|
1344
1355
|
src: h(Je),
|
|
1345
1356
|
alt: "search"
|
|
1346
1357
|
}, null, 8, io)
|
|
1347
1358
|
])
|
|
1348
|
-
])) :
|
|
1359
|
+
])) : I("", !0)
|
|
1349
1360
|
])
|
|
1350
1361
|
], 2),
|
|
1351
|
-
(
|
|
1352
|
-
Oe(
|
|
1362
|
+
(A(), qe(yt, { to: "body" }, [
|
|
1363
|
+
Oe(m("div", {
|
|
1353
1364
|
ref_key: "floatingRef",
|
|
1354
1365
|
ref: s,
|
|
1355
1366
|
class: "dropdown-list",
|
|
1356
|
-
style: Re(h(
|
|
1367
|
+
style: Re(h(P)),
|
|
1357
1368
|
onScroll: Lt
|
|
1358
1369
|
}, [
|
|
1359
|
-
|
|
1360
|
-
h(
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1370
|
+
Ie(y.$slots, "history", { searchHistory: h(x) }, () => [
|
|
1371
|
+
h(x).length > 0 && !a.value ? (A(), b("div", ao, [
|
|
1372
|
+
m("div", ro, [
|
|
1373
|
+
m("span", null, R(F.value ? "Recent search" : "最近搜索"), 1),
|
|
1374
|
+
m("span", {
|
|
1364
1375
|
class: "clear-btn",
|
|
1365
|
-
onMousedown:
|
|
1376
|
+
onMousedown: L[2] || (L[2] = te(() => {
|
|
1366
1377
|
}, ["prevent"])),
|
|
1367
|
-
onClick:
|
|
1378
|
+
onClick: L[3] || (L[3] = te(
|
|
1368
1379
|
//@ts-ignore
|
|
1369
|
-
(...
|
|
1380
|
+
(...D) => h(C) && h(C)(...D),
|
|
1370
1381
|
["stop"]
|
|
1371
1382
|
))
|
|
1372
|
-
},
|
|
1383
|
+
}, R(F.value ? "Clear" : "清空"), 33)
|
|
1373
1384
|
]),
|
|
1374
|
-
(
|
|
1385
|
+
(A(!0), b(ne, null, pe(h(x), (D, re) => (A(), b("div", {
|
|
1375
1386
|
key: "hist-" + re,
|
|
1376
1387
|
class: "dropdown-item",
|
|
1377
|
-
onMousedown: (lt) =>
|
|
1388
|
+
onMousedown: (lt) => S(D)
|
|
1378
1389
|
}, [
|
|
1379
|
-
|
|
1390
|
+
m("div", {
|
|
1380
1391
|
class: "category-tag",
|
|
1381
1392
|
style: Re(e.showItemTag ? {} : { display: "none" })
|
|
1382
1393
|
}, [
|
|
1383
|
-
|
|
1394
|
+
m("img", {
|
|
1384
1395
|
class: "type-icon",
|
|
1385
|
-
src: nt(
|
|
1396
|
+
src: nt(D.type),
|
|
1386
1397
|
alt: ""
|
|
1387
1398
|
}, null, 8, uo),
|
|
1388
|
-
|
|
1399
|
+
m("span", fo, R(ot(D.type)), 1)
|
|
1389
1400
|
], 4),
|
|
1390
|
-
|
|
1401
|
+
m("div", po, R(ke(D)), 1)
|
|
1391
1402
|
], 40, co))), 128)),
|
|
1392
|
-
|
|
1393
|
-
])) :
|
|
1403
|
+
L[4] || (L[4] = m("hr", { class: "divider" }, null, -1))
|
|
1404
|
+
])) : I("", !0)
|
|
1394
1405
|
], !0),
|
|
1395
|
-
h(
|
|
1396
|
-
|
|
1397
|
-
(
|
|
1406
|
+
h(E) && !h(V) ? (A(), b("div", mo, R(F.value ? "Searching..." : "正在搜索中..."), 1)) : h(k).length > 0 ? (A(), b(ne, { key: 1 }, [
|
|
1407
|
+
Ie(y.$slots, "results", { searchResults: h(k) }, () => [
|
|
1408
|
+
(A(!0), b(ne, null, pe(h(k), (D, re) => (A(), b("div", {
|
|
1398
1409
|
key: re,
|
|
1399
|
-
class: le(["dropdown-item", { "is-active":
|
|
1400
|
-
onMousedown: (lt) =>
|
|
1410
|
+
class: le(["dropdown-item", { "is-active": Nt(D) }]),
|
|
1411
|
+
onMousedown: (lt) => S(D)
|
|
1401
1412
|
}, [
|
|
1402
|
-
|
|
1413
|
+
m("div", {
|
|
1403
1414
|
class: "category-tag",
|
|
1404
1415
|
style: Re(e.showItemTag ? {} : { display: "none" })
|
|
1405
1416
|
}, [
|
|
1406
|
-
|
|
1417
|
+
m("img", {
|
|
1407
1418
|
class: "type-icon",
|
|
1408
|
-
src: nt(
|
|
1419
|
+
src: nt(D.type),
|
|
1409
1420
|
alt: ""
|
|
1410
1421
|
}, null, 8, vo),
|
|
1411
|
-
|
|
1422
|
+
m("span", go, R(ot(D.type)), 1)
|
|
1412
1423
|
], 4),
|
|
1413
|
-
|
|
1424
|
+
m("div", yo, R(ke(D)), 1)
|
|
1414
1425
|
], 42, ho))), 128))
|
|
1415
1426
|
], !0),
|
|
1416
|
-
h(
|
|
1417
|
-
], 64)) : a.value && !h(
|
|
1418
|
-
|
|
1419
|
-
Ye(
|
|
1427
|
+
h(V) ? (A(), b("div", Ao, R(F.value ? "Loading more..." : "正在加载更多..."), 1)) : h(W) && a.value ? (A(), b("div", wo, R(F.value ? "All results have been loaded" : "已加载全部结果"), 1)) : I("", !0)
|
|
1428
|
+
], 64)) : a.value && !h(E) ? (A(), b("div", xo, [
|
|
1429
|
+
Ie(y.$slots, "noData", {}, () => [
|
|
1430
|
+
Ye(R(F.value ? `No results found related to "${a.value}".` : `未找到与 "${a.value}" 相关的结果`), 1)
|
|
1420
1431
|
], !0)
|
|
1421
|
-
])) :
|
|
1432
|
+
])) : I("", !0)
|
|
1422
1433
|
], 36), [
|
|
1423
1434
|
[
|
|
1424
|
-
|
|
1425
|
-
u.value && (h(
|
|
1435
|
+
Ft,
|
|
1436
|
+
u.value && (h(k).length > 0 || h(E) || a.value || h(x).length > 0)
|
|
1426
1437
|
]
|
|
1427
1438
|
])
|
|
1428
1439
|
]))
|
|
@@ -1433,16 +1444,16 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1433
1444
|
for (const [o, l] of t)
|
|
1434
1445
|
n[o] = l;
|
|
1435
1446
|
return n;
|
|
1436
|
-
}, Et = /* @__PURE__ */ tt(bo, [["__scopeId", "data-v-
|
|
1447
|
+
}, Et = /* @__PURE__ */ tt(bo, [["__scopeId", "data-v-53dd1a92"]]), Co = { class: "modal-container" }, So = { class: "modal-header" }, ko = { class: "header-title" }, Ro = { class: "modal-body" }, _o = { class: "form-item" }, Oo = { class: "required" }, To = { class: "input-box" }, Eo = ["placeholder"], Vo = {
|
|
1437
1448
|
key: 0,
|
|
1438
1449
|
class: "error-message"
|
|
1439
|
-
}, Do = { class: "form-item" }, Bo = { class: "required" }, Lo = { class: "type-group" },
|
|
1450
|
+
}, Do = { class: "form-item" }, Bo = { class: "required" }, Lo = { class: "type-group" }, No = ["onClick"], Io = {
|
|
1440
1451
|
key: 0,
|
|
1441
1452
|
class: "check-mark"
|
|
1442
|
-
},
|
|
1453
|
+
}, Fo = { class: "form-item" }, Mo = { class: "required" }, Uo = {
|
|
1443
1454
|
key: 0,
|
|
1444
1455
|
class: "error-message"
|
|
1445
|
-
},
|
|
1456
|
+
}, Po = { class: "modal-footer" }, Ho = {
|
|
1446
1457
|
__name: "ApplyDataDialog",
|
|
1447
1458
|
props: {
|
|
1448
1459
|
// v-model 绑定,默认 false
|
|
@@ -1455,7 +1466,7 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1455
1466
|
type: String,
|
|
1456
1467
|
default: "en",
|
|
1457
1468
|
// 增加校验,确保只能传入 'en' 或 'cn'
|
|
1458
|
-
validator: (e) => ["en", "cn"].includes(e)
|
|
1469
|
+
validator: (e) => ["en", "en-US", "zh-CN", "cn"].includes(e)
|
|
1459
1470
|
},
|
|
1460
1471
|
placeholder: {
|
|
1461
1472
|
type: String,
|
|
@@ -1468,101 +1479,124 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1468
1479
|
{ typeCn: "城市", typeEn: "City", type: "City" },
|
|
1469
1480
|
{ typeCn: "海运港口", typeEn: "Port", type: "Seaport" },
|
|
1470
1481
|
{ typeCn: "机场", typeEn: "Airport", type: "Airport" }
|
|
1471
|
-
], i =
|
|
1482
|
+
], i = T(null), s = He({
|
|
1472
1483
|
name: "",
|
|
1473
1484
|
country: ""
|
|
1474
|
-
}), a =
|
|
1485
|
+
}), a = He({
|
|
1475
1486
|
name: "",
|
|
1476
1487
|
type: "City"
|
|
1477
|
-
}), c =
|
|
1488
|
+
}), c = M(() => {
|
|
1489
|
+
if (n.lang)
|
|
1490
|
+
return n.lang === "en" || n.lang === "en-US";
|
|
1491
|
+
try {
|
|
1492
|
+
if (typeof useCookie == "function") {
|
|
1493
|
+
const f = useCookie("jc-language")?.value;
|
|
1494
|
+
if (f)
|
|
1495
|
+
return /^en(-US)?$/.test(f);
|
|
1496
|
+
}
|
|
1497
|
+
} catch {
|
|
1498
|
+
}
|
|
1499
|
+
if (typeof document < "u") {
|
|
1500
|
+
const f = document.cookie || "";
|
|
1501
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(f);
|
|
1502
|
+
}
|
|
1503
|
+
try {
|
|
1504
|
+
if (typeof useNuxtApp == "function") {
|
|
1505
|
+
const d = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
|
|
1506
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(d);
|
|
1507
|
+
}
|
|
1508
|
+
} catch {
|
|
1509
|
+
}
|
|
1510
|
+
return !1;
|
|
1511
|
+
}), r = () => {
|
|
1478
1512
|
s.name = "", s.country = "", o("update:value", !1);
|
|
1479
1513
|
}, u = () => {
|
|
1480
1514
|
s.name = "", s.country = "";
|
|
1481
|
-
let
|
|
1482
|
-
a.name.trim() || (s.name = "Data name is required",
|
|
1515
|
+
let f = !0;
|
|
1516
|
+
a.name.trim() || (s.name = "Data name is required", f = !1), i.value || (s.country = "Please select a country", f = !1), f && o("confirm", { ...a, country: i.value });
|
|
1483
1517
|
};
|
|
1484
|
-
return (
|
|
1518
|
+
return (f, d) => e.value ? (A(), b("div", {
|
|
1485
1519
|
key: 0,
|
|
1486
1520
|
class: "modal-mask",
|
|
1487
1521
|
onClick: te(r, ["self"])
|
|
1488
1522
|
}, [
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1523
|
+
m("div", Co, [
|
|
1524
|
+
m("div", So, [
|
|
1525
|
+
m("span", ko, R(c.value ? "Apply for data addition" : "申请补充数据"), 1),
|
|
1526
|
+
m("div", {
|
|
1493
1527
|
class: "close-btn",
|
|
1494
1528
|
onClick: r
|
|
1495
1529
|
}, "×")
|
|
1496
1530
|
]),
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
Oe(
|
|
1502
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
1531
|
+
m("div", Ro, [
|
|
1532
|
+
m("div", _o, [
|
|
1533
|
+
m("label", Oo, R(c.value ? "Data To Add" : "需补充的数据"), 1),
|
|
1534
|
+
m("div", To, [
|
|
1535
|
+
Oe(m("input", {
|
|
1536
|
+
"onUpdate:modelValue": d[0] || (d[0] = (p) => a.name = p),
|
|
1503
1537
|
type: "text",
|
|
1504
1538
|
placeholder: e.placeholder ?? (c.value ? " Please enter" : "请输入"),
|
|
1505
1539
|
class: le(["custom-input", { "input-error": s.name }]),
|
|
1506
|
-
onInput: d[1] || (d[1] = (
|
|
1540
|
+
onInput: d[1] || (d[1] = (p) => s.name = "")
|
|
1507
1541
|
}, null, 42, Eo), [
|
|
1508
|
-
[
|
|
1542
|
+
[Ge, a.name]
|
|
1509
1543
|
])
|
|
1510
1544
|
]),
|
|
1511
|
-
s.name ? (
|
|
1545
|
+
s.name ? (A(), b("div", Vo, R(s.name), 1)) : I("", !0)
|
|
1512
1546
|
]),
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
(
|
|
1517
|
-
key:
|
|
1518
|
-
class: le(["type-btn", { active: a.type ===
|
|
1519
|
-
onClick: (v) => a.type =
|
|
1547
|
+
m("div", Do, [
|
|
1548
|
+
m("label", Bo, R(c.value ? "Type" : "所属类别"), 1),
|
|
1549
|
+
m("div", Lo, [
|
|
1550
|
+
(A(), b(ne, null, pe(l, (p) => m("div", {
|
|
1551
|
+
key: p.type,
|
|
1552
|
+
class: le(["type-btn", { active: a.type === p.type }]),
|
|
1553
|
+
onClick: (v) => a.type = p.type
|
|
1520
1554
|
}, [
|
|
1521
|
-
Ye(
|
|
1522
|
-
a.type ===
|
|
1523
|
-
], 10,
|
|
1555
|
+
Ye(R(c.value ? p.typeEn : p.typeCn) + " ", 1),
|
|
1556
|
+
a.type === p.type ? (A(), b("div", Io)) : I("", !0)
|
|
1557
|
+
], 10, No)), 64))
|
|
1524
1558
|
])
|
|
1525
1559
|
]),
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1560
|
+
m("div", Fo, [
|
|
1561
|
+
m("label", Mo, R(c.value ? "Country" : "国家"), 1),
|
|
1562
|
+
m("div", {
|
|
1529
1563
|
class: le({ "search-error-wrap": s.country })
|
|
1530
1564
|
}, [
|
|
1531
|
-
|
|
1565
|
+
B(Et, {
|
|
1532
1566
|
"search-type-list": ["Country"],
|
|
1533
1567
|
"model-value": i.value,
|
|
1534
1568
|
"onUpdate:modelValue": [
|
|
1535
|
-
d[2] || (d[2] = (
|
|
1536
|
-
d[3] || (d[3] = (
|
|
1569
|
+
d[2] || (d[2] = (p) => i.value = p),
|
|
1570
|
+
d[3] || (d[3] = (p) => s.country = "")
|
|
1537
1571
|
],
|
|
1538
1572
|
style: { margin: "0 auto" },
|
|
1539
1573
|
lang: e.lang,
|
|
1540
1574
|
placeholder: e.placeholder ?? (c.value ? " Please enter" : "请输入")
|
|
1541
1575
|
}, null, 8, ["model-value", "lang", "placeholder"])
|
|
1542
1576
|
], 2),
|
|
1543
|
-
s.country ? (
|
|
1577
|
+
s.country ? (A(), b("div", Uo, R(s.country), 1)) : I("", !0)
|
|
1544
1578
|
])
|
|
1545
1579
|
]),
|
|
1546
|
-
|
|
1547
|
-
|
|
1580
|
+
m("div", Po, [
|
|
1581
|
+
m("button", {
|
|
1548
1582
|
class: "confirm-btn",
|
|
1549
1583
|
onClick: u
|
|
1550
|
-
},
|
|
1584
|
+
}, R(c.value ? "Submit" : "申请补充"), 1)
|
|
1551
1585
|
])
|
|
1552
1586
|
])
|
|
1553
|
-
])) :
|
|
1587
|
+
])) : I("", !0);
|
|
1554
1588
|
}
|
|
1555
|
-
},
|
|
1589
|
+
}, Qo = /* @__PURE__ */ tt(Ho, [["__scopeId", "data-v-9c778fb9"]]), $o = { class: "global-modal-header-custom" }, Jo = { class: "global-modal-body-custom" }, Wo = { class: "global-modal-footer-custom" }, Ko = /* @__PURE__ */ Ke({
|
|
1556
1590
|
__name: "GlobalModal",
|
|
1557
1591
|
setup(e) {
|
|
1558
|
-
const t =
|
|
1592
|
+
const t = T(), n = T(!1), o = T({
|
|
1559
1593
|
city: "",
|
|
1560
1594
|
company: "",
|
|
1561
1595
|
email: "",
|
|
1562
1596
|
phone: "",
|
|
1563
1597
|
name: "",
|
|
1564
1598
|
agreement: !1
|
|
1565
|
-
}), l =
|
|
1599
|
+
}), l = He({
|
|
1566
1600
|
city: [{ required: !0, message: "请输入所在地城市", trigger: "blur" }],
|
|
1567
1601
|
company: [{ required: !0, message: "请输入公司名称", trigger: "blur" }],
|
|
1568
1602
|
email: [
|
|
@@ -1595,9 +1629,9 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1595
1629
|
};
|
|
1596
1630
|
return We(() => {
|
|
1597
1631
|
ce.on(ue.Open, a);
|
|
1598
|
-
}),
|
|
1632
|
+
}), Mt(() => {
|
|
1599
1633
|
ce.off(ue.Open, a);
|
|
1600
|
-
}), (c, r) => (
|
|
1634
|
+
}), (c, r) => (A(), qe(h(Qt), {
|
|
1601
1635
|
modelValue: n.value,
|
|
1602
1636
|
"onUpdate:modelValue": r[7] || (r[7] = (u) => n.value = u),
|
|
1603
1637
|
"before-close": i,
|
|
@@ -1606,39 +1640,39 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1606
1640
|
width: 500,
|
|
1607
1641
|
class: "global-modal-custom"
|
|
1608
1642
|
}, {
|
|
1609
|
-
header:
|
|
1610
|
-
|
|
1611
|
-
r[9] || (r[9] =
|
|
1612
|
-
|
|
1643
|
+
header: N(() => [
|
|
1644
|
+
m("div", $o, [
|
|
1645
|
+
r[9] || (r[9] = m("h2", null, "即刻链接全球货代", -1)),
|
|
1646
|
+
B(h(it), {
|
|
1613
1647
|
link: "",
|
|
1614
1648
|
onClick: i,
|
|
1615
1649
|
class: "close-button-custom",
|
|
1616
1650
|
"aria-label": "Close"
|
|
1617
1651
|
}, {
|
|
1618
|
-
default:
|
|
1619
|
-
|
|
1652
|
+
default: N(() => [...r[8] || (r[8] = [
|
|
1653
|
+
m("span", { style: { "font-size": "2rem" } }, "×", -1)
|
|
1620
1654
|
])]),
|
|
1621
1655
|
_: 1
|
|
1622
1656
|
})
|
|
1623
1657
|
])
|
|
1624
1658
|
]),
|
|
1625
|
-
footer:
|
|
1626
|
-
|
|
1627
|
-
|
|
1659
|
+
footer: N(() => [
|
|
1660
|
+
m("div", Wo, [
|
|
1661
|
+
B(h(it), {
|
|
1628
1662
|
type: "primary",
|
|
1629
1663
|
class: "submit-button-custom",
|
|
1630
1664
|
onClick: s
|
|
1631
1665
|
}, {
|
|
1632
|
-
default:
|
|
1666
|
+
default: N(() => [...r[11] || (r[11] = [
|
|
1633
1667
|
Ye(" 加入会员 ", -1)
|
|
1634
1668
|
])]),
|
|
1635
1669
|
_: 1
|
|
1636
1670
|
})
|
|
1637
1671
|
])
|
|
1638
1672
|
]),
|
|
1639
|
-
default:
|
|
1640
|
-
|
|
1641
|
-
|
|
1673
|
+
default: N(() => [
|
|
1674
|
+
m("div", Jo, [
|
|
1675
|
+
B(h($t), {
|
|
1642
1676
|
model: o.value,
|
|
1643
1677
|
rules: l,
|
|
1644
1678
|
ref_key: "formRef",
|
|
@@ -1647,17 +1681,17 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1647
1681
|
onSubmit: r[6] || (r[6] = te(() => {
|
|
1648
1682
|
}, ["prevent"]))
|
|
1649
1683
|
}, {
|
|
1650
|
-
default:
|
|
1651
|
-
|
|
1652
|
-
default:
|
|
1653
|
-
|
|
1654
|
-
default:
|
|
1655
|
-
|
|
1684
|
+
default: N(() => [
|
|
1685
|
+
B(h(Fe), { gutter: 20 }, {
|
|
1686
|
+
default: N(() => [
|
|
1687
|
+
B(h(Ae), { span: 12 }, {
|
|
1688
|
+
default: N(() => [
|
|
1689
|
+
B(h(fe), {
|
|
1656
1690
|
label: "所在地(城市)",
|
|
1657
1691
|
prop: "city"
|
|
1658
1692
|
}, {
|
|
1659
|
-
default:
|
|
1660
|
-
|
|
1693
|
+
default: N(() => [
|
|
1694
|
+
B(h(we), {
|
|
1661
1695
|
modelValue: o.value.city,
|
|
1662
1696
|
"onUpdate:modelValue": r[0] || (r[0] = (u) => o.value.city = u),
|
|
1663
1697
|
placeholder: "请输入城市"
|
|
@@ -1668,14 +1702,14 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1668
1702
|
]),
|
|
1669
1703
|
_: 1
|
|
1670
1704
|
}),
|
|
1671
|
-
|
|
1672
|
-
default:
|
|
1673
|
-
|
|
1705
|
+
B(h(Ae), { span: 12 }, {
|
|
1706
|
+
default: N(() => [
|
|
1707
|
+
B(h(fe), {
|
|
1674
1708
|
label: "公司名称",
|
|
1675
1709
|
prop: "company"
|
|
1676
1710
|
}, {
|
|
1677
|
-
default:
|
|
1678
|
-
|
|
1711
|
+
default: N(() => [
|
|
1712
|
+
B(h(we), {
|
|
1679
1713
|
modelValue: o.value.company,
|
|
1680
1714
|
"onUpdate:modelValue": r[1] || (r[1] = (u) => o.value.company = u),
|
|
1681
1715
|
placeholder: "请输入公司名称"
|
|
@@ -1689,16 +1723,16 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1689
1723
|
]),
|
|
1690
1724
|
_: 1
|
|
1691
1725
|
}),
|
|
1692
|
-
|
|
1693
|
-
default:
|
|
1694
|
-
|
|
1695
|
-
default:
|
|
1696
|
-
|
|
1726
|
+
B(h(Fe), { gutter: 20 }, {
|
|
1727
|
+
default: N(() => [
|
|
1728
|
+
B(h(Ae), { span: 12 }, {
|
|
1729
|
+
default: N(() => [
|
|
1730
|
+
B(h(fe), {
|
|
1697
1731
|
label: "邮箱",
|
|
1698
1732
|
prop: "email"
|
|
1699
1733
|
}, {
|
|
1700
|
-
default:
|
|
1701
|
-
|
|
1734
|
+
default: N(() => [
|
|
1735
|
+
B(h(we), {
|
|
1702
1736
|
modelValue: o.value.email,
|
|
1703
1737
|
"onUpdate:modelValue": r[2] || (r[2] = (u) => o.value.email = u),
|
|
1704
1738
|
placeholder: "请输入邮箱"
|
|
@@ -1709,14 +1743,14 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1709
1743
|
]),
|
|
1710
1744
|
_: 1
|
|
1711
1745
|
}),
|
|
1712
|
-
|
|
1713
|
-
default:
|
|
1714
|
-
|
|
1746
|
+
B(h(Ae), { span: 12 }, {
|
|
1747
|
+
default: N(() => [
|
|
1748
|
+
B(h(fe), {
|
|
1715
1749
|
label: "电话",
|
|
1716
1750
|
prop: "phone"
|
|
1717
1751
|
}, {
|
|
1718
|
-
default:
|
|
1719
|
-
|
|
1752
|
+
default: N(() => [
|
|
1753
|
+
B(h(we), {
|
|
1720
1754
|
modelValue: o.value.phone,
|
|
1721
1755
|
"onUpdate:modelValue": r[3] || (r[3] = (u) => o.value.phone = u),
|
|
1722
1756
|
placeholder: "请输入电话"
|
|
@@ -1730,16 +1764,16 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1730
1764
|
]),
|
|
1731
1765
|
_: 1
|
|
1732
1766
|
}),
|
|
1733
|
-
|
|
1734
|
-
default:
|
|
1735
|
-
|
|
1736
|
-
default:
|
|
1737
|
-
|
|
1767
|
+
B(h(Fe), null, {
|
|
1768
|
+
default: N(() => [
|
|
1769
|
+
B(h(Ae), { span: 24 }, {
|
|
1770
|
+
default: N(() => [
|
|
1771
|
+
B(h(fe), {
|
|
1738
1772
|
label: "姓名",
|
|
1739
1773
|
prop: "name"
|
|
1740
1774
|
}, {
|
|
1741
|
-
default:
|
|
1742
|
-
|
|
1775
|
+
default: N(() => [
|
|
1776
|
+
B(h(we), {
|
|
1743
1777
|
modelValue: o.value.name,
|
|
1744
1778
|
"onUpdate:modelValue": r[4] || (r[4] = (u) => o.value.name = u),
|
|
1745
1779
|
placeholder: "请输入您的全名"
|
|
@@ -1753,17 +1787,17 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1753
1787
|
]),
|
|
1754
1788
|
_: 1
|
|
1755
1789
|
}),
|
|
1756
|
-
|
|
1790
|
+
B(h(fe), {
|
|
1757
1791
|
prop: "agreement",
|
|
1758
1792
|
class: "agreement-item"
|
|
1759
1793
|
}, {
|
|
1760
|
-
default:
|
|
1761
|
-
|
|
1794
|
+
default: N(() => [
|
|
1795
|
+
B(h(Jt), {
|
|
1762
1796
|
modelValue: o.value.agreement,
|
|
1763
1797
|
"onUpdate:modelValue": r[5] || (r[5] = (u) => o.value.agreement = u),
|
|
1764
1798
|
label: "我同意"
|
|
1765
1799
|
}, null, 8, ["modelValue"]),
|
|
1766
|
-
r[10] || (r[10] =
|
|
1800
|
+
r[10] || (r[10] = m("a", {
|
|
1767
1801
|
href: "#",
|
|
1768
1802
|
class: "privacy-link"
|
|
1769
1803
|
}, "隐私政策", -1))
|
|
@@ -1779,15 +1813,15 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1779
1813
|
}, 8, ["modelValue"]));
|
|
1780
1814
|
}
|
|
1781
1815
|
});
|
|
1782
|
-
function
|
|
1783
|
-
const t =
|
|
1816
|
+
function qo(e) {
|
|
1817
|
+
const t = T([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", l = M(
|
|
1784
1818
|
() => (e.value || "") + n
|
|
1785
|
-
), i =
|
|
1819
|
+
), i = M(
|
|
1786
1820
|
() => !!e.value && e.value !== ""
|
|
1787
1821
|
), s = (c) => {
|
|
1788
1822
|
if (!c || !o) return;
|
|
1789
1823
|
const r = t.value.filter(
|
|
1790
|
-
(
|
|
1824
|
+
(f) => f.id && f.id !== c.id || f.display !== c.display
|
|
1791
1825
|
);
|
|
1792
1826
|
r.unshift(c);
|
|
1793
1827
|
const u = r.slice(0, 4);
|
|
@@ -1795,8 +1829,8 @@ function Go(e) {
|
|
|
1795
1829
|
t.value = u;
|
|
1796
1830
|
try {
|
|
1797
1831
|
localStorage.setItem(l.value, JSON.stringify(u));
|
|
1798
|
-
} catch (
|
|
1799
|
-
console.warn("LocalStorage save failed:",
|
|
1832
|
+
} catch (f) {
|
|
1833
|
+
console.warn("LocalStorage save failed:", f);
|
|
1800
1834
|
}
|
|
1801
1835
|
}
|
|
1802
1836
|
}, a = () => {
|
|
@@ -1819,7 +1853,7 @@ function Go(e) {
|
|
|
1819
1853
|
HasHistory: i
|
|
1820
1854
|
};
|
|
1821
1855
|
}
|
|
1822
|
-
async function
|
|
1856
|
+
async function Go(e, t = [
|
|
1823
1857
|
"Continent",
|
|
1824
1858
|
"Country",
|
|
1825
1859
|
"City",
|
|
@@ -1833,11 +1867,11 @@ async function qo(e, t = [
|
|
|
1833
1867
|
});
|
|
1834
1868
|
}
|
|
1835
1869
|
function Yo(e, t) {
|
|
1836
|
-
const n =
|
|
1870
|
+
const n = T([]), o = T(!1), l = T(!1), i = T(!1), s = T(1), a = 10, c = T(0), r = M(() => {
|
|
1837
1871
|
const d = [...t.value];
|
|
1838
1872
|
return d.includes("Country") && !d.includes("Region") && d.push("Region"), d;
|
|
1839
1873
|
}), u = (d) => Array.isArray(d) ? d.filter(
|
|
1840
|
-
(
|
|
1874
|
+
(p) => r.value.includes(p.type)
|
|
1841
1875
|
) : [];
|
|
1842
1876
|
return {
|
|
1843
1877
|
searchResults: n,
|
|
@@ -1845,8 +1879,8 @@ function Yo(e, t) {
|
|
|
1845
1879
|
isFetchingMore: l,
|
|
1846
1880
|
isFinished: i,
|
|
1847
1881
|
fetchData: async (d = !1) => {
|
|
1848
|
-
const
|
|
1849
|
-
if (!
|
|
1882
|
+
const p = e.value.trim();
|
|
1883
|
+
if (!p) {
|
|
1850
1884
|
n.value = [], c.value = 0, i.value = !1;
|
|
1851
1885
|
return;
|
|
1852
1886
|
}
|
|
@@ -1858,15 +1892,15 @@ function Yo(e, t) {
|
|
|
1858
1892
|
o.value = !0, s.value = 1, i.value = !1;
|
|
1859
1893
|
}
|
|
1860
1894
|
try {
|
|
1861
|
-
const v = await
|
|
1862
|
-
|
|
1895
|
+
const v = await Go(
|
|
1896
|
+
p,
|
|
1863
1897
|
t.value,
|
|
1864
1898
|
{
|
|
1865
1899
|
current: s.value,
|
|
1866
1900
|
size: a
|
|
1867
1901
|
}
|
|
1868
|
-
),
|
|
1869
|
-
d ? n.value.push(...
|
|
1902
|
+
), w = u(v.records || []);
|
|
1903
|
+
d ? n.value.push(...w) : n.value = w, c.value = v.total || 0, (n.value.length >= c.value || w.length < a) && (i.value = !0);
|
|
1870
1904
|
} catch (v) {
|
|
1871
1905
|
console.error("Search request failed:", v), d && (s.value -= 1);
|
|
1872
1906
|
} finally {
|
|
@@ -1893,7 +1927,7 @@ const zo = { class: "h5-search-container" }, Xo = { class: "trigger-content" },
|
|
|
1893
1927
|
}, ul = {
|
|
1894
1928
|
key: 1,
|
|
1895
1929
|
class: "h5-section"
|
|
1896
|
-
}, dl = { class: "h5-section-hd" }, fl = { class: "h5-history-grid" },
|
|
1930
|
+
}, dl = { class: "h5-section-hd" }, fl = { class: "h5-history-grid" }, pl = ["onClick"], ml = {
|
|
1897
1931
|
key: 2,
|
|
1898
1932
|
class: "h5-result-list"
|
|
1899
1933
|
}, hl = ["onClick"], vl = { class: "item-info" }, gl = { class: "item-name" }, yl = {
|
|
@@ -1916,162 +1950,185 @@ const zo = { class: "h5-search-container" }, Xo = { class: "trigger-content" },
|
|
|
1916
1950
|
},
|
|
1917
1951
|
emits: ["update:modelValue", "select"],
|
|
1918
1952
|
setup(e, { emit: t }) {
|
|
1919
|
-
const n = e, o = t, l =
|
|
1953
|
+
const n = e, o = t, l = T(!1), i = T(""), s = T(null), a = T(null);
|
|
1920
1954
|
let c = null;
|
|
1921
|
-
const { searchHistory: r, saveToHistory: u, clearHistory:
|
|
1922
|
-
|
|
1923
|
-
), { searchResults: d, loading:
|
|
1955
|
+
const { searchHistory: r, saveToHistory: u, clearHistory: f } = qo(
|
|
1956
|
+
Ue(n, "historyKey")
|
|
1957
|
+
), { searchResults: d, loading: p, isFetchingMore: v, isFinished: w, fetchData: x } = Yo(i, T(["City", "Seaport", "Airport"])), g = M(() => {
|
|
1958
|
+
if (n.lang)
|
|
1959
|
+
return n.lang === "en" || n.lang === "en-US";
|
|
1960
|
+
try {
|
|
1961
|
+
if (typeof useCookie == "function") {
|
|
1962
|
+
const S = useCookie("jc-language")?.value;
|
|
1963
|
+
if (S)
|
|
1964
|
+
return /^en(-US)?$/.test(S);
|
|
1965
|
+
}
|
|
1966
|
+
} catch {
|
|
1967
|
+
}
|
|
1968
|
+
if (typeof document < "u") {
|
|
1969
|
+
const S = document.cookie || "";
|
|
1970
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(S);
|
|
1971
|
+
}
|
|
1972
|
+
try {
|
|
1973
|
+
if (typeof useNuxtApp == "function") {
|
|
1974
|
+
const _ = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
|
|
1975
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(_);
|
|
1976
|
+
}
|
|
1977
|
+
} catch {
|
|
1978
|
+
}
|
|
1979
|
+
return !1;
|
|
1980
|
+
}), C = M(
|
|
1924
1981
|
() => Array.isArray(n.modelValue) ? n.modelValue : n.modelValue ? [n.modelValue] : []
|
|
1925
|
-
),
|
|
1926
|
-
() =>
|
|
1927
|
-
),
|
|
1928
|
-
l.value = !0,
|
|
1982
|
+
), k = M(() => !n.multiple && !!n.modelValue), E = M(
|
|
1983
|
+
() => k.value ? F(n.modelValue) : ""
|
|
1984
|
+
), V = M(() => C.value.length > 0), W = () => {
|
|
1985
|
+
l.value = !0, Ut(() => {
|
|
1929
1986
|
s.value?.focus();
|
|
1930
1987
|
});
|
|
1931
|
-
},
|
|
1988
|
+
}, U = () => {
|
|
1932
1989
|
l.value = !1, i.value = "";
|
|
1933
|
-
},
|
|
1934
|
-
u(
|
|
1990
|
+
}, Q = (S) => {
|
|
1991
|
+
u(S), n.multiple ? C.value.some((O) => O.id === S.id) || o("update:modelValue", [...C.value, S]) : (o("update:modelValue", S), U()), o("select", S);
|
|
1935
1992
|
}, K = () => {
|
|
1936
1993
|
o("update:modelValue", n.multiple ? [] : null);
|
|
1937
|
-
},
|
|
1938
|
-
const
|
|
1939
|
-
if (!
|
|
1940
|
-
|
|
1994
|
+
}, P = T(!1), ee = (S) => {
|
|
1995
|
+
const _ = S.target;
|
|
1996
|
+
if (!_) return;
|
|
1997
|
+
_.scrollTop + _.clientHeight >= _.scrollHeight - 80 && i.value && !p.value && !v.value && !w.value && !P.value && (P.value = !0, x(!0));
|
|
1941
1998
|
};
|
|
1942
|
-
|
|
1943
|
-
|
|
1999
|
+
Pe(v, (S) => {
|
|
2000
|
+
S || (P.value = !1);
|
|
1944
2001
|
});
|
|
1945
2002
|
const z = () => {
|
|
1946
2003
|
c && clearTimeout(c), c = setTimeout(() => {
|
|
1947
|
-
|
|
2004
|
+
P.value = !1, a.value?.scrollTo({ top: 0 }), console.log("🍉 ~ index.vue:279 ~ onInput ~ fetchData:", x), x(!1);
|
|
1948
2005
|
}, 300);
|
|
1949
|
-
},
|
|
1950
|
-
const
|
|
1951
|
-
return g.value ?
|
|
1952
|
-
}, ae = (
|
|
1953
|
-
return (
|
|
1954
|
-
|
|
2006
|
+
}, F = (S) => g.value ? S.displayEn || S.display : S.displayCn || S.display, q = (S) => {
|
|
2007
|
+
const _ = { City: "城市", Seaport: "港口", Airport: "机场" };
|
|
2008
|
+
return g.value ? S : _[S] || S;
|
|
2009
|
+
}, ae = (S) => C.value.some((_) => _.id === S.id);
|
|
2010
|
+
return (S, _) => (A(), b("div", zo, [
|
|
2011
|
+
m("div", {
|
|
1955
2012
|
class: "search-trigger",
|
|
1956
2013
|
onClick: W
|
|
1957
2014
|
}, [
|
|
1958
|
-
|
|
1959
|
-
|
|
2015
|
+
m("div", Xo, [
|
|
2016
|
+
m("img", {
|
|
1960
2017
|
src: h(Je),
|
|
1961
2018
|
class: "search-icon-m"
|
|
1962
2019
|
}, null, 8, jo),
|
|
1963
|
-
|
|
1964
|
-
e.multiple && C.value.length > 0 ? (
|
|
2020
|
+
m("div", Zo, [
|
|
2021
|
+
e.multiple && C.value.length > 0 ? (A(), b("span", el, R(g.value ? "Selected" : "已选") + " (" + R(C.value.length) + ")", 1)) : !e.multiple && k.value ? (A(), b("span", tl, R(E.value), 1)) : (A(), b("span", nl, R(e.placeholder || (g.value ? "Search" : "搜索")), 1))
|
|
1965
2022
|
])
|
|
1966
2023
|
]),
|
|
1967
|
-
|
|
2024
|
+
V.value ? (A(), b("span", {
|
|
1968
2025
|
key: 0,
|
|
1969
2026
|
class: "clear-trigger",
|
|
1970
2027
|
onClick: te(K, ["stop"])
|
|
1971
|
-
}, "ⓧ")) :
|
|
2028
|
+
}, "ⓧ")) : I("", !0)
|
|
1972
2029
|
]),
|
|
1973
|
-
(
|
|
1974
|
-
l.value ? (
|
|
1975
|
-
|
|
1976
|
-
default:
|
|
1977
|
-
|
|
2030
|
+
(A(), qe(yt, { to: "body" }, [
|
|
2031
|
+
l.value ? (A(), b("div", ol, [
|
|
2032
|
+
B(st, { name: "fade" }, {
|
|
2033
|
+
default: N(() => [
|
|
2034
|
+
m("div", {
|
|
1978
2035
|
class: "h5-mask",
|
|
1979
|
-
onClick:
|
|
2036
|
+
onClick: U
|
|
1980
2037
|
})
|
|
1981
2038
|
]),
|
|
1982
2039
|
_: 1
|
|
1983
2040
|
}),
|
|
1984
|
-
|
|
1985
|
-
default:
|
|
1986
|
-
|
|
1987
|
-
|
|
2041
|
+
B(st, { name: "slide-up" }, {
|
|
2042
|
+
default: N(() => [
|
|
2043
|
+
m("div", ll, [
|
|
2044
|
+
m("div", {
|
|
1988
2045
|
class: "drawer-handle",
|
|
1989
|
-
onClick:
|
|
2046
|
+
onClick: U
|
|
1990
2047
|
}),
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
2048
|
+
m("div", sl, [
|
|
2049
|
+
m("div", il, [
|
|
2050
|
+
m("img", {
|
|
1994
2051
|
src: h(Je),
|
|
1995
2052
|
class: "inner-icon"
|
|
1996
2053
|
}, null, 8, al),
|
|
1997
|
-
Oe(
|
|
2054
|
+
Oe(m("input", {
|
|
1998
2055
|
ref_key: "inputRef",
|
|
1999
2056
|
ref: s,
|
|
2000
|
-
"onUpdate:modelValue":
|
|
2057
|
+
"onUpdate:modelValue": _[0] || (_[0] = (O) => i.value = O),
|
|
2001
2058
|
placeholder: g.value ? "City/Port/Airport" : "搜索城市/港口/机场",
|
|
2002
2059
|
onInput: z
|
|
2003
2060
|
}, null, 40, rl), [
|
|
2004
|
-
[
|
|
2061
|
+
[Ge, i.value]
|
|
2005
2062
|
]),
|
|
2006
|
-
i.value ? (
|
|
2063
|
+
i.value ? (A(), b("div", {
|
|
2007
2064
|
key: 0,
|
|
2008
2065
|
class: "h5-clear-btn",
|
|
2009
|
-
onClick:
|
|
2010
|
-
}, " ✕ ")) :
|
|
2066
|
+
onClick: _[1] || (_[1] = (O) => i.value = "")
|
|
2067
|
+
}, " ✕ ")) : I("", !0)
|
|
2011
2068
|
]),
|
|
2012
|
-
|
|
2069
|
+
m("div", {
|
|
2013
2070
|
class: "h5-cancel-btn",
|
|
2014
|
-
onClick:
|
|
2015
|
-
},
|
|
2071
|
+
onClick: U
|
|
2072
|
+
}, R(g.value ? "Cancel" : "取消"), 1)
|
|
2016
2073
|
]),
|
|
2017
|
-
|
|
2074
|
+
m("div", {
|
|
2018
2075
|
class: "h5-main-content",
|
|
2019
2076
|
ref_key: "scrollContainer",
|
|
2020
2077
|
ref: a,
|
|
2021
2078
|
onScroll: ee
|
|
2022
2079
|
}, [
|
|
2023
|
-
h(
|
|
2024
|
-
|
|
2025
|
-
])])) :
|
|
2026
|
-
!i.value && h(r).length > 0 ? (
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2080
|
+
h(p) && !h(v) ? (A(), b("div", cl, [..._[3] || (_[3] = [
|
|
2081
|
+
m("div", { class: "h5-spinner" }, null, -1)
|
|
2082
|
+
])])) : I("", !0),
|
|
2083
|
+
!i.value && h(r).length > 0 ? (A(), b("div", ul, [
|
|
2084
|
+
m("div", dl, [
|
|
2085
|
+
m("span", null, R(g.value ? "Recent" : "最近搜索"), 1),
|
|
2086
|
+
m("span", {
|
|
2030
2087
|
class: "h5-clear-history",
|
|
2031
|
-
onClick:
|
|
2032
|
-
(...
|
|
2033
|
-
},
|
|
2088
|
+
onClick: _[2] || (_[2] = //@ts-ignore
|
|
2089
|
+
(...O) => h(f) && h(f)(...O))
|
|
2090
|
+
}, R(g.value ? "Clear" : "清空"), 1)
|
|
2034
2091
|
]),
|
|
2035
|
-
|
|
2036
|
-
(
|
|
2037
|
-
key:
|
|
2092
|
+
m("div", fl, [
|
|
2093
|
+
(A(!0), b(ne, null, pe(h(r), (O, H) => (A(), b("div", {
|
|
2094
|
+
key: H,
|
|
2038
2095
|
class: "h5-history-tag",
|
|
2039
|
-
onClick: (ye) =>
|
|
2040
|
-
},
|
|
2096
|
+
onClick: (ye) => Q(O)
|
|
2097
|
+
}, R(F(O)), 9, pl))), 128))
|
|
2041
2098
|
])
|
|
2042
|
-
])) :
|
|
2043
|
-
h(d).length > 0 ? (
|
|
2044
|
-
(
|
|
2045
|
-
key:
|
|
2046
|
-
class: le(["h5-result-item", { "is-active": ae(
|
|
2047
|
-
onClick: (ye) =>
|
|
2099
|
+
])) : I("", !0),
|
|
2100
|
+
h(d).length > 0 ? (A(), b("div", ml, [
|
|
2101
|
+
(A(!0), b(ne, null, pe(h(d), (O, H) => (A(), b("div", {
|
|
2102
|
+
key: H,
|
|
2103
|
+
class: le(["h5-result-item", { "is-active": ae(O) }]),
|
|
2104
|
+
onClick: (ye) => Q(O)
|
|
2048
2105
|
}, [
|
|
2049
|
-
|
|
2050
|
-
class: le(["item-type",
|
|
2051
|
-
},
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2106
|
+
m("div", {
|
|
2107
|
+
class: le(["item-type", O.type.toLowerCase()])
|
|
2108
|
+
}, R(q(O.type)), 3),
|
|
2109
|
+
m("div", vl, [
|
|
2110
|
+
m("div", gl, R(F(O)), 1),
|
|
2111
|
+
O.parentName ? (A(), b("div", yl, R(O.parentName), 1)) : I("", !0)
|
|
2055
2112
|
])
|
|
2056
2113
|
], 10, hl))), 128)),
|
|
2057
|
-
|
|
2058
|
-
h(v) ? (
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
], 64)) : h(
|
|
2114
|
+
m("div", Al, [
|
|
2115
|
+
h(v) ? (A(), b(ne, { key: 0 }, [
|
|
2116
|
+
_[4] || (_[4] = m("div", { class: "mini-spinner" }, null, -1)),
|
|
2117
|
+
m("span", null, R(g.value ? "Loading..." : "加载中..."), 1)
|
|
2118
|
+
], 64)) : h(w) && i.value ? (A(), b("span", wl, R(g.value ? "No more results" : "没有更多结果了"), 1)) : I("", !0)
|
|
2062
2119
|
])
|
|
2063
|
-
])) :
|
|
2064
|
-
i.value && !h(
|
|
2120
|
+
])) : I("", !0),
|
|
2121
|
+
i.value && !h(p) && h(d).length === 0 ? (A(), b("div", xl, R(g.value ? "No Results Found" : "未找到相关结果"), 1)) : I("", !0)
|
|
2065
2122
|
], 544)
|
|
2066
2123
|
])
|
|
2067
2124
|
]),
|
|
2068
2125
|
_: 1
|
|
2069
2126
|
})
|
|
2070
|
-
])) :
|
|
2127
|
+
])) : I("", !0)
|
|
2071
2128
|
]))
|
|
2072
2129
|
]));
|
|
2073
2130
|
}
|
|
2074
|
-
}), Cl = /* @__PURE__ */ tt(bl, [["__scopeId", "data-v-
|
|
2131
|
+
}), Cl = /* @__PURE__ */ tt(bl, [["__scopeId", "data-v-c1314e9c"]]);
|
|
2075
2132
|
let Sl = {
|
|
2076
2133
|
open() {
|
|
2077
2134
|
ce.emit(ue.Open);
|
|
@@ -2089,14 +2146,14 @@ function Ol() {
|
|
|
2089
2146
|
install(t) {
|
|
2090
2147
|
if (typeof window < "u" && !e) {
|
|
2091
2148
|
const n = document.createElement("div");
|
|
2092
|
-
n.setAttribute("id", "global-modal-root"), document.body.appendChild(n),
|
|
2149
|
+
n.setAttribute("id", "global-modal-root"), document.body.appendChild(n), Pt(Ko).mount(n), e = !0;
|
|
2093
2150
|
}
|
|
2094
2151
|
t.config.globalProperties.$globalModal = Sl;
|
|
2095
2152
|
}
|
|
2096
2153
|
};
|
|
2097
2154
|
}
|
|
2098
2155
|
const ht = {
|
|
2099
|
-
ApplyDataDialog:
|
|
2156
|
+
ApplyDataDialog: Qo,
|
|
2100
2157
|
JcSearch: Et,
|
|
2101
2158
|
JCMSearch: Cl
|
|
2102
2159
|
};
|
|
@@ -2104,14 +2161,14 @@ let vt = !1;
|
|
|
2104
2161
|
const Tl = {
|
|
2105
2162
|
install(e, t) {
|
|
2106
2163
|
if (!vt) {
|
|
2107
|
-
vt = !0, t?.sharedConfig &&
|
|
2164
|
+
vt = !0, t?.sharedConfig && Ht(t.sharedConfig);
|
|
2108
2165
|
for (const n in ht)
|
|
2109
2166
|
e.component(n, ht[n]);
|
|
2110
2167
|
}
|
|
2111
2168
|
}
|
|
2112
2169
|
};
|
|
2113
2170
|
export {
|
|
2114
|
-
|
|
2171
|
+
Qo as ApplyDataDialog,
|
|
2115
2172
|
Ko as GlobalModal,
|
|
2116
2173
|
Cl as JCMSearch,
|
|
2117
2174
|
Et as JcSearch,
|