@jctrans-materials/comps-vue3 1.0.0 → 1.0.2
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/H5/mSearch/common.d.ts +16 -0
- package/dist/components/H5/mSearch/hooks/useFloating.d.ts +8 -0
- package/dist/components/H5/mSearch/hooks/useSearchHistory.d.ts +29 -0
- package/dist/components/H5/mSearch/hooks/useSearchLogic.d.ts +30 -0
- package/dist/components/H5/mSearch/index.d.ts +41 -0
- package/dist/components/search/hooks/useSearchHistory.d.ts +6 -2
- package/dist/components/search/hooks/useSearchLogic.d.ts +4 -0
- package/dist/components/search/index.d.ts +20 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.esm.js +1231 -859
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,173 +1,175 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { locationSearchV2 as
|
|
3
|
-
import { MODAL_ACTION as
|
|
4
|
-
import { ElDialog as
|
|
5
|
-
function
|
|
6
|
-
const t =
|
|
1
|
+
import { ref as _, computed as N, onMounted as We, onBeforeUnmount as gt, defineComponent as Ke, toRef as Pe, watch as He, createElementBlock as b, openBlock as y, createElementVNode as p, createBlock as Ge, normalizeClass as le, createCommentVNode as F, withDirectives as Oe, Fragment as ne, renderList as me, toDisplayString as k, withModifiers as te, withKeys as Ft, normalizeStyle as Re, vModelText as qe, unref as h, Teleport as yt, renderSlot as Fe, createTextVNode as Ye, vShow as Mt, reactive as Qe, createVNode as L, onUnmounted as Nt, withCtx as I, Transition as st, nextTick as Pt, createApp as Ht } from "vue";
|
|
2
|
+
import { locationSearchV2 as ze, emitter as ce, MODAL_ACTION as ue, initSharedConfig as Qt } from "@jctrans-materials/shared";
|
|
3
|
+
import { MODAL_ACTION as Dl, emitter as Bl } from "@jctrans-materials/shared";
|
|
4
|
+
import { ElDialog as Ut, ElForm as $t, ElRow as Me, ElCol as Ae, ElFormItem as fe, ElInput as we, ElCheckbox as Jt, ElButton as it } from "element-plus";
|
|
5
|
+
function Wt(e) {
|
|
6
|
+
const t = _([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", l = N(
|
|
7
7
|
() => (e.value || "") + n
|
|
8
|
-
), i =
|
|
9
|
-
() => e.value && e.value !== ""
|
|
10
|
-
),
|
|
11
|
-
if (!
|
|
12
|
-
const
|
|
13
|
-
(
|
|
8
|
+
), i = N(
|
|
9
|
+
() => !!e.value && e.value !== ""
|
|
10
|
+
), s = (c) => {
|
|
11
|
+
if (!c || !o) return;
|
|
12
|
+
const r = t.value.filter(
|
|
13
|
+
(m) => m.id && m.id !== c.id || m.display !== c.display
|
|
14
14
|
);
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
15
|
+
r.unshift(c);
|
|
16
|
+
const u = r.slice(0, 4);
|
|
17
|
+
if (i.value) {
|
|
18
|
+
t.value = u;
|
|
18
19
|
try {
|
|
19
|
-
localStorage.setItem(l.value, JSON.stringify(
|
|
20
|
-
} catch (
|
|
21
|
-
console.warn("LocalStorage save failed:",
|
|
20
|
+
localStorage.setItem(l.value, JSON.stringify(u));
|
|
21
|
+
} catch (m) {
|
|
22
|
+
console.warn("LocalStorage save failed:", m);
|
|
22
23
|
}
|
|
24
|
+
}
|
|
23
25
|
}, a = () => {
|
|
24
26
|
t.value = [], o && localStorage.removeItem(l.value);
|
|
25
27
|
};
|
|
26
|
-
return
|
|
28
|
+
return We(() => {
|
|
27
29
|
if (o && i.value) {
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
+
const c = localStorage.getItem(l.value);
|
|
31
|
+
if (c)
|
|
30
32
|
try {
|
|
31
|
-
t.value = JSON.parse(
|
|
33
|
+
t.value = JSON.parse(c);
|
|
32
34
|
} catch {
|
|
33
35
|
t.value = [];
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
}), {
|
|
37
39
|
searchHistory: t,
|
|
38
|
-
saveToHistory:
|
|
40
|
+
saveToHistory: s,
|
|
39
41
|
clearHistory: a,
|
|
40
42
|
HasHistory: i
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
|
-
async function
|
|
45
|
+
async function Kt(e, t = [
|
|
44
46
|
"Continent",
|
|
45
47
|
"Country",
|
|
46
48
|
"City",
|
|
47
49
|
"Seaport",
|
|
48
50
|
"Airport"
|
|
49
51
|
], n = {}) {
|
|
50
|
-
return
|
|
52
|
+
return ze.searchByName({
|
|
51
53
|
keyword: e,
|
|
52
54
|
displayInfo: t,
|
|
53
55
|
...n
|
|
54
56
|
});
|
|
55
57
|
}
|
|
56
|
-
const
|
|
57
|
-
function
|
|
58
|
-
const n =
|
|
59
|
-
const
|
|
60
|
-
return
|
|
61
|
-
}),
|
|
62
|
-
(
|
|
58
|
+
const Gt = (e, t) => ze.searchByIdWithType(e, t);
|
|
59
|
+
function qt(e, t) {
|
|
60
|
+
const n = _([]), o = _(!1), l = _(!1), i = _(1), s = _(0), a = _(10), c = N(() => s.value === 0 ? !1 : n.value.length >= s.value), r = N(() => {
|
|
61
|
+
const d = [...t.value];
|
|
62
|
+
return d.includes("Country") && !d.includes("Region") && d.push("Region"), d;
|
|
63
|
+
}), u = (d) => !d || !Array.isArray(d) ? [] : d.filter(
|
|
64
|
+
(f) => r.value.includes(f.type)
|
|
63
65
|
);
|
|
64
66
|
return {
|
|
65
67
|
searchResults: n,
|
|
66
68
|
loading: o,
|
|
67
69
|
isFetchingMore: l,
|
|
68
|
-
isFinished:
|
|
70
|
+
isFinished: c,
|
|
69
71
|
currentPage: i,
|
|
70
|
-
total:
|
|
71
|
-
fetchData: async (
|
|
72
|
-
if (!e.value.trim() && !
|
|
73
|
-
n.value = [],
|
|
72
|
+
total: s,
|
|
73
|
+
fetchData: async (d = 1, f = !1) => {
|
|
74
|
+
if (!e.value.trim() && !f) {
|
|
75
|
+
n.value = [], s.value = 0;
|
|
74
76
|
return;
|
|
75
77
|
}
|
|
76
|
-
if (!(
|
|
77
|
-
|
|
78
|
+
if (!(f && (l.value || c.value)) && !(!f && o.value)) {
|
|
79
|
+
f ? l.value = !0 : (o.value = !0, i.value = 1);
|
|
78
80
|
try {
|
|
79
|
-
const
|
|
81
|
+
const v = await Kt(
|
|
80
82
|
e.value,
|
|
81
83
|
t.value,
|
|
82
84
|
{
|
|
83
|
-
current:
|
|
85
|
+
current: d,
|
|
84
86
|
// 使用传入的 page 参数
|
|
85
87
|
size: a.value
|
|
86
88
|
}
|
|
87
|
-
), A =
|
|
88
|
-
|
|
89
|
-
} catch (
|
|
90
|
-
console.error("Failed to fetch search results:",
|
|
89
|
+
), A = v.records || [], w = u(A);
|
|
90
|
+
f ? n.value = [...n.value, ...w] : n.value = w, s.value = v.total || 0, i.value = d;
|
|
91
|
+
} catch (v) {
|
|
92
|
+
console.error("Failed to fetch search results:", v);
|
|
91
93
|
} finally {
|
|
92
94
|
o.value = !1, l.value = !1;
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
},
|
|
96
|
-
filterByTypes:
|
|
98
|
+
filterByTypes: u
|
|
97
99
|
};
|
|
98
100
|
}
|
|
99
|
-
const
|
|
101
|
+
const he = Math.min, $ = Math.max, Te = Math.round, _e = Math.floor, X = (e) => ({
|
|
100
102
|
x: e,
|
|
101
103
|
y: e
|
|
102
|
-
}),
|
|
104
|
+
}), Yt = {
|
|
103
105
|
left: "right",
|
|
104
106
|
right: "left",
|
|
105
107
|
bottom: "top",
|
|
106
108
|
top: "bottom"
|
|
107
|
-
},
|
|
109
|
+
}, zt = {
|
|
108
110
|
start: "end",
|
|
109
111
|
end: "start"
|
|
110
112
|
};
|
|
111
|
-
function
|
|
112
|
-
return
|
|
113
|
+
function at(e, t, n) {
|
|
114
|
+
return $(e, he(t, n));
|
|
113
115
|
}
|
|
114
|
-
function
|
|
116
|
+
function be(e, t) {
|
|
115
117
|
return typeof e == "function" ? e(t) : e;
|
|
116
118
|
}
|
|
117
|
-
function
|
|
119
|
+
function se(e) {
|
|
118
120
|
return e.split("-")[0];
|
|
119
121
|
}
|
|
120
|
-
function
|
|
122
|
+
function Ce(e) {
|
|
121
123
|
return e.split("-")[1];
|
|
122
124
|
}
|
|
123
|
-
function
|
|
125
|
+
function At(e) {
|
|
124
126
|
return e === "x" ? "y" : "x";
|
|
125
127
|
}
|
|
126
|
-
function
|
|
128
|
+
function wt(e) {
|
|
127
129
|
return e === "y" ? "height" : "width";
|
|
128
130
|
}
|
|
129
|
-
const
|
|
130
|
-
function
|
|
131
|
-
return
|
|
131
|
+
const Xt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
132
|
+
function oe(e) {
|
|
133
|
+
return Xt.has(se(e)) ? "y" : "x";
|
|
132
134
|
}
|
|
133
|
-
function
|
|
134
|
-
return
|
|
135
|
+
function xt(e) {
|
|
136
|
+
return At(oe(e));
|
|
135
137
|
}
|
|
136
|
-
function
|
|
138
|
+
function jt(e, t, n) {
|
|
137
139
|
n === void 0 && (n = !1);
|
|
138
|
-
const o =
|
|
139
|
-
let
|
|
140
|
-
return t.reference[i] > t.floating[i] && (
|
|
140
|
+
const o = Ce(e), l = xt(e), i = wt(l);
|
|
141
|
+
let s = l === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
142
|
+
return t.reference[i] > t.floating[i] && (s = Ee(s)), [s, Ee(s)];
|
|
141
143
|
}
|
|
142
|
-
function
|
|
143
|
-
const t =
|
|
144
|
-
return [
|
|
144
|
+
function Zt(e) {
|
|
145
|
+
const t = Ee(e);
|
|
146
|
+
return [Ue(e), t, Ue(t)];
|
|
145
147
|
}
|
|
146
|
-
function
|
|
147
|
-
return e.replace(/start|end/g, (t) =>
|
|
148
|
+
function Ue(e) {
|
|
149
|
+
return e.replace(/start|end/g, (t) => zt[t]);
|
|
148
150
|
}
|
|
149
|
-
const
|
|
150
|
-
function
|
|
151
|
+
const rt = ["left", "right"], ct = ["right", "left"], en = ["top", "bottom"], tn = ["bottom", "top"];
|
|
152
|
+
function nn(e, t, n) {
|
|
151
153
|
switch (e) {
|
|
152
154
|
case "top":
|
|
153
155
|
case "bottom":
|
|
154
|
-
return n ? t ?
|
|
156
|
+
return n ? t ? ct : rt : t ? rt : ct;
|
|
155
157
|
case "left":
|
|
156
158
|
case "right":
|
|
157
|
-
return t ?
|
|
159
|
+
return t ? en : tn;
|
|
158
160
|
default:
|
|
159
161
|
return [];
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
|
-
function
|
|
163
|
-
const l =
|
|
164
|
-
let i =
|
|
165
|
-
return l && (i = i.map((
|
|
164
|
+
function on(e, t, n, o) {
|
|
165
|
+
const l = Ce(e);
|
|
166
|
+
let i = nn(se(e), n === "start", o);
|
|
167
|
+
return l && (i = i.map((s) => s + "-" + l), t && (i = i.concat(i.map(Ue)))), i;
|
|
166
168
|
}
|
|
167
|
-
function
|
|
168
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
169
|
+
function Ee(e) {
|
|
170
|
+
return e.replace(/left|right|bottom|top/g, (t) => Yt[t]);
|
|
169
171
|
}
|
|
170
|
-
function
|
|
172
|
+
function ln(e) {
|
|
171
173
|
return {
|
|
172
174
|
top: 0,
|
|
173
175
|
right: 0,
|
|
@@ -176,15 +178,15 @@ function Zt(e) {
|
|
|
176
178
|
...e
|
|
177
179
|
};
|
|
178
180
|
}
|
|
179
|
-
function
|
|
180
|
-
return typeof e != "number" ?
|
|
181
|
+
function sn(e) {
|
|
182
|
+
return typeof e != "number" ? ln(e) : {
|
|
181
183
|
top: e,
|
|
182
184
|
right: e,
|
|
183
185
|
bottom: e,
|
|
184
186
|
left: e
|
|
185
187
|
};
|
|
186
188
|
}
|
|
187
|
-
function
|
|
189
|
+
function Ve(e) {
|
|
188
190
|
const {
|
|
189
191
|
x: t,
|
|
190
192
|
y: n,
|
|
@@ -202,161 +204,161 @@ function Ee(e) {
|
|
|
202
204
|
y: n
|
|
203
205
|
};
|
|
204
206
|
}
|
|
205
|
-
function
|
|
207
|
+
function ut(e, t, n) {
|
|
206
208
|
let {
|
|
207
209
|
reference: o,
|
|
208
210
|
floating: l
|
|
209
211
|
} = e;
|
|
210
|
-
const i =
|
|
211
|
-
let
|
|
212
|
-
switch (
|
|
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, m = o.y + o.height / 2 - l.height / 2, d = o[a] / 2 - l[a] / 2;
|
|
213
|
+
let f;
|
|
214
|
+
switch (c) {
|
|
213
215
|
case "top":
|
|
214
|
-
|
|
215
|
-
x:
|
|
216
|
+
f = {
|
|
217
|
+
x: u,
|
|
216
218
|
y: o.y - l.height
|
|
217
219
|
};
|
|
218
220
|
break;
|
|
219
221
|
case "bottom":
|
|
220
|
-
|
|
221
|
-
x:
|
|
222
|
+
f = {
|
|
223
|
+
x: u,
|
|
222
224
|
y: o.y + o.height
|
|
223
225
|
};
|
|
224
226
|
break;
|
|
225
227
|
case "right":
|
|
226
|
-
|
|
228
|
+
f = {
|
|
227
229
|
x: o.x + o.width,
|
|
228
|
-
y:
|
|
230
|
+
y: m
|
|
229
231
|
};
|
|
230
232
|
break;
|
|
231
233
|
case "left":
|
|
232
|
-
|
|
234
|
+
f = {
|
|
233
235
|
x: o.x - l.width,
|
|
234
|
-
y:
|
|
236
|
+
y: m
|
|
235
237
|
};
|
|
236
238
|
break;
|
|
237
239
|
default:
|
|
238
|
-
|
|
240
|
+
f = {
|
|
239
241
|
x: o.x,
|
|
240
242
|
y: o.y
|
|
241
243
|
};
|
|
242
244
|
}
|
|
243
|
-
switch (
|
|
245
|
+
switch (Ce(t)) {
|
|
244
246
|
case "start":
|
|
245
|
-
|
|
247
|
+
f[s] -= d * (n && r ? -1 : 1);
|
|
246
248
|
break;
|
|
247
249
|
case "end":
|
|
248
|
-
|
|
250
|
+
f[s] += d * (n && r ? -1 : 1);
|
|
249
251
|
break;
|
|
250
252
|
}
|
|
251
|
-
return
|
|
253
|
+
return f;
|
|
252
254
|
}
|
|
253
|
-
const
|
|
255
|
+
const an = async (e, t, n) => {
|
|
254
256
|
const {
|
|
255
257
|
placement: o = "bottom",
|
|
256
258
|
strategy: l = "absolute",
|
|
257
259
|
middleware: i = [],
|
|
258
|
-
platform:
|
|
259
|
-
} = n, a = i.filter(Boolean),
|
|
260
|
-
let
|
|
260
|
+
platform: s
|
|
261
|
+
} = n, a = i.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
262
|
+
let r = await s.getElementRects({
|
|
261
263
|
reference: e,
|
|
262
264
|
floating: t,
|
|
263
265
|
strategy: l
|
|
264
266
|
}), {
|
|
265
|
-
x:
|
|
266
|
-
y:
|
|
267
|
-
} =
|
|
267
|
+
x: u,
|
|
268
|
+
y: m
|
|
269
|
+
} = ut(r, o, c), d = o, f = {}, v = 0;
|
|
268
270
|
for (let A = 0; A < a.length; A++) {
|
|
269
271
|
const {
|
|
270
|
-
name:
|
|
271
|
-
fn:
|
|
272
|
+
name: w,
|
|
273
|
+
fn: g
|
|
272
274
|
} = a[A], {
|
|
273
|
-
x,
|
|
274
|
-
y:
|
|
275
|
-
data:
|
|
276
|
-
reset:
|
|
277
|
-
} = await
|
|
278
|
-
x:
|
|
279
|
-
y:
|
|
275
|
+
x: C,
|
|
276
|
+
y: S,
|
|
277
|
+
data: V,
|
|
278
|
+
reset: D
|
|
279
|
+
} = await g({
|
|
280
|
+
x: u,
|
|
281
|
+
y: m,
|
|
280
282
|
initialPlacement: o,
|
|
281
|
-
placement:
|
|
283
|
+
placement: d,
|
|
282
284
|
strategy: l,
|
|
283
|
-
middlewareData:
|
|
284
|
-
rects:
|
|
285
|
-
platform:
|
|
285
|
+
middlewareData: f,
|
|
286
|
+
rects: r,
|
|
287
|
+
platform: s,
|
|
286
288
|
elements: {
|
|
287
289
|
reference: e,
|
|
288
290
|
floating: t
|
|
289
291
|
}
|
|
290
292
|
});
|
|
291
|
-
|
|
292
|
-
...
|
|
293
|
-
[
|
|
294
|
-
...
|
|
295
|
-
...
|
|
293
|
+
u = C ?? u, m = S ?? m, f = {
|
|
294
|
+
...f,
|
|
295
|
+
[w]: {
|
|
296
|
+
...f[w],
|
|
297
|
+
...V
|
|
296
298
|
}
|
|
297
|
-
},
|
|
299
|
+
}, D && v <= 50 && (v++, typeof D == "object" && (D.placement && (d = D.placement), D.rects && (r = D.rects === !0 ? await s.getElementRects({
|
|
298
300
|
reference: e,
|
|
299
301
|
floating: t,
|
|
300
302
|
strategy: l
|
|
301
|
-
}) :
|
|
302
|
-
x:
|
|
303
|
-
y:
|
|
304
|
-
} =
|
|
303
|
+
}) : D.rects), {
|
|
304
|
+
x: u,
|
|
305
|
+
y: m
|
|
306
|
+
} = ut(r, d, c)), A = -1);
|
|
305
307
|
}
|
|
306
308
|
return {
|
|
307
|
-
x:
|
|
308
|
-
y:
|
|
309
|
-
placement:
|
|
309
|
+
x: u,
|
|
310
|
+
y: m,
|
|
311
|
+
placement: d,
|
|
310
312
|
strategy: l,
|
|
311
|
-
middlewareData:
|
|
313
|
+
middlewareData: f
|
|
312
314
|
};
|
|
313
315
|
};
|
|
314
|
-
async function
|
|
316
|
+
async function Xe(e, t) {
|
|
315
317
|
var n;
|
|
316
318
|
t === void 0 && (t = {});
|
|
317
319
|
const {
|
|
318
320
|
x: o,
|
|
319
321
|
y: l,
|
|
320
322
|
platform: i,
|
|
321
|
-
rects:
|
|
323
|
+
rects: s,
|
|
322
324
|
elements: a,
|
|
323
|
-
strategy:
|
|
325
|
+
strategy: c
|
|
324
326
|
} = e, {
|
|
325
|
-
boundary:
|
|
326
|
-
rootBoundary:
|
|
327
|
-
elementContext:
|
|
328
|
-
altBoundary:
|
|
329
|
-
padding:
|
|
330
|
-
} =
|
|
331
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(
|
|
332
|
-
boundary:
|
|
333
|
-
rootBoundary:
|
|
334
|
-
strategy:
|
|
335
|
-
})),
|
|
327
|
+
boundary: r = "clippingAncestors",
|
|
328
|
+
rootBoundary: u = "viewport",
|
|
329
|
+
elementContext: m = "floating",
|
|
330
|
+
altBoundary: d = !1,
|
|
331
|
+
padding: f = 0
|
|
332
|
+
} = be(t, e), v = sn(f), w = a[d ? m === "floating" ? "reference" : "floating" : m], g = Ve(await i.getClippingRect({
|
|
333
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
|
|
334
|
+
boundary: r,
|
|
335
|
+
rootBoundary: u,
|
|
336
|
+
strategy: c
|
|
337
|
+
})), C = m === "floating" ? {
|
|
336
338
|
x: o,
|
|
337
339
|
y: l,
|
|
338
|
-
width:
|
|
339
|
-
height:
|
|
340
|
-
} :
|
|
340
|
+
width: s.floating.width,
|
|
341
|
+
height: s.floating.height
|
|
342
|
+
} : s.reference, S = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), V = await (i.isElement == null ? void 0 : i.isElement(S)) ? await (i.getScale == null ? void 0 : i.getScale(S)) || {
|
|
341
343
|
x: 1,
|
|
342
344
|
y: 1
|
|
343
345
|
} : {
|
|
344
346
|
x: 1,
|
|
345
347
|
y: 1
|
|
346
|
-
},
|
|
348
|
+
}, D = Ve(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
347
349
|
elements: a,
|
|
348
|
-
rect:
|
|
349
|
-
offsetParent:
|
|
350
|
-
strategy:
|
|
351
|
-
}) :
|
|
350
|
+
rect: C,
|
|
351
|
+
offsetParent: S,
|
|
352
|
+
strategy: c
|
|
353
|
+
}) : C);
|
|
352
354
|
return {
|
|
353
|
-
top: (
|
|
354
|
-
bottom: (
|
|
355
|
-
left: (
|
|
356
|
-
right: (
|
|
355
|
+
top: (g.top - D.top + v.top) / V.y,
|
|
356
|
+
bottom: (D.bottom - g.bottom + v.bottom) / V.y,
|
|
357
|
+
left: (g.left - D.left + v.left) / V.x,
|
|
358
|
+
right: (D.right - g.right + v.right) / V.x
|
|
357
359
|
};
|
|
358
360
|
}
|
|
359
|
-
const
|
|
361
|
+
const rn = function(e) {
|
|
360
362
|
return e === void 0 && (e = {}), {
|
|
361
363
|
name: "flip",
|
|
362
364
|
options: e,
|
|
@@ -365,107 +367,107 @@ const tn = function(e) {
|
|
|
365
367
|
const {
|
|
366
368
|
placement: l,
|
|
367
369
|
middlewareData: i,
|
|
368
|
-
rects:
|
|
370
|
+
rects: s,
|
|
369
371
|
initialPlacement: a,
|
|
370
|
-
platform:
|
|
371
|
-
elements:
|
|
372
|
+
platform: c,
|
|
373
|
+
elements: r
|
|
372
374
|
} = t, {
|
|
373
|
-
mainAxis:
|
|
374
|
-
crossAxis:
|
|
375
|
-
fallbackPlacements:
|
|
376
|
-
fallbackStrategy:
|
|
377
|
-
fallbackAxisSideDirection:
|
|
375
|
+
mainAxis: u = !0,
|
|
376
|
+
crossAxis: m = !0,
|
|
377
|
+
fallbackPlacements: d,
|
|
378
|
+
fallbackStrategy: f = "bestFit",
|
|
379
|
+
fallbackAxisSideDirection: v = "none",
|
|
378
380
|
flipAlignment: A = !0,
|
|
379
|
-
...
|
|
380
|
-
} =
|
|
381
|
+
...w
|
|
382
|
+
} = be(e, t);
|
|
381
383
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
382
384
|
return {};
|
|
383
|
-
const
|
|
384
|
-
!
|
|
385
|
-
const
|
|
386
|
-
let
|
|
387
|
-
if (
|
|
388
|
-
const
|
|
389
|
-
|
|
385
|
+
const g = se(l), C = oe(a), S = se(a) === a, V = await (c.isRTL == null ? void 0 : c.isRTL(r.floating)), D = d || (S || !A ? [Ee(a)] : Zt(a)), W = v !== "none";
|
|
386
|
+
!d && W && D.push(...on(a, A, v, V));
|
|
387
|
+
const P = [a, ...D], U = await Xe(t, w), K = [];
|
|
388
|
+
let H = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
389
|
+
if (u && K.push(U[g]), m) {
|
|
390
|
+
const G = jt(l, s, V);
|
|
391
|
+
K.push(U[G[0]], U[G[1]]);
|
|
390
392
|
}
|
|
391
|
-
if (
|
|
393
|
+
if (H = [...H, {
|
|
392
394
|
placement: l,
|
|
393
|
-
overflows:
|
|
394
|
-
}], !
|
|
395
|
-
var
|
|
396
|
-
const
|
|
397
|
-
if (
|
|
395
|
+
overflows: K
|
|
396
|
+
}], !K.every((G) => G <= 0)) {
|
|
397
|
+
var ee, z;
|
|
398
|
+
const G = (((ee = i.flip) == null ? void 0 : ee.index) || 0) + 1, ae = P[G];
|
|
399
|
+
if (ae && (!(m === "alignment" ? C !== oe(ae) : !1) || // We leave the current main axis only if every placement on that axis
|
|
398
400
|
// overflows the main axis.
|
|
399
|
-
|
|
401
|
+
H.every((R) => oe(R.placement) === C ? R.overflows[0] > 0 : !0)))
|
|
400
402
|
return {
|
|
401
403
|
data: {
|
|
402
|
-
index:
|
|
403
|
-
overflows:
|
|
404
|
+
index: G,
|
|
405
|
+
overflows: H
|
|
404
406
|
},
|
|
405
407
|
reset: {
|
|
406
|
-
placement:
|
|
408
|
+
placement: ae
|
|
407
409
|
}
|
|
408
410
|
};
|
|
409
|
-
let
|
|
410
|
-
if (
|
|
411
|
-
switch (
|
|
411
|
+
let T = (z = H.filter((O) => O.overflows[0] <= 0).sort((O, R) => O.overflows[1] - R.overflows[1])[0]) == null ? void 0 : z.placement;
|
|
412
|
+
if (!T)
|
|
413
|
+
switch (f) {
|
|
412
414
|
case "bestFit": {
|
|
413
|
-
var
|
|
414
|
-
const
|
|
415
|
-
if (
|
|
416
|
-
const Q =
|
|
417
|
-
return Q ===
|
|
415
|
+
var M;
|
|
416
|
+
const O = (M = H.filter((R) => {
|
|
417
|
+
if (W) {
|
|
418
|
+
const Q = oe(R.placement);
|
|
419
|
+
return Q === C || // Create a bias to the `y` side axis due to horizontal
|
|
418
420
|
// reading directions favoring greater width.
|
|
419
421
|
Q === "y";
|
|
420
422
|
}
|
|
421
423
|
return !0;
|
|
422
|
-
}).map((
|
|
423
|
-
|
|
424
|
+
}).map((R) => [R.placement, R.overflows.filter((Q) => Q > 0).reduce((Q, ye) => Q + ye, 0)]).sort((R, Q) => R[1] - Q[1])[0]) == null ? void 0 : M[0];
|
|
425
|
+
O && (T = O);
|
|
424
426
|
break;
|
|
425
427
|
}
|
|
426
428
|
case "initialPlacement":
|
|
427
|
-
|
|
429
|
+
T = a;
|
|
428
430
|
break;
|
|
429
431
|
}
|
|
430
|
-
if (l !==
|
|
432
|
+
if (l !== T)
|
|
431
433
|
return {
|
|
432
434
|
reset: {
|
|
433
|
-
placement:
|
|
435
|
+
placement: T
|
|
434
436
|
}
|
|
435
437
|
};
|
|
436
438
|
}
|
|
437
439
|
return {};
|
|
438
440
|
}
|
|
439
441
|
};
|
|
440
|
-
},
|
|
441
|
-
async function
|
|
442
|
+
}, cn = /* @__PURE__ */ new Set(["left", "top"]);
|
|
443
|
+
async function un(e, t) {
|
|
442
444
|
const {
|
|
443
445
|
placement: n,
|
|
444
446
|
platform: o,
|
|
445
447
|
elements: l
|
|
446
|
-
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)),
|
|
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, m = be(t, e);
|
|
447
449
|
let {
|
|
448
|
-
mainAxis: f,
|
|
449
|
-
crossAxis: m,
|
|
450
|
-
alignmentAxis: p
|
|
451
|
-
} = typeof d == "number" ? {
|
|
452
450
|
mainAxis: d,
|
|
451
|
+
crossAxis: f,
|
|
452
|
+
alignmentAxis: v
|
|
453
|
+
} = typeof m == "number" ? {
|
|
454
|
+
mainAxis: m,
|
|
453
455
|
crossAxis: 0,
|
|
454
456
|
alignmentAxis: null
|
|
455
457
|
} : {
|
|
456
|
-
mainAxis:
|
|
457
|
-
crossAxis:
|
|
458
|
-
alignmentAxis:
|
|
458
|
+
mainAxis: m.mainAxis || 0,
|
|
459
|
+
crossAxis: m.crossAxis || 0,
|
|
460
|
+
alignmentAxis: m.alignmentAxis
|
|
459
461
|
};
|
|
460
|
-
return a && typeof
|
|
461
|
-
x:
|
|
462
|
-
y:
|
|
462
|
+
return a && typeof v == "number" && (f = a === "end" ? v * -1 : v), c ? {
|
|
463
|
+
x: f * u,
|
|
464
|
+
y: d * r
|
|
463
465
|
} : {
|
|
464
|
-
x:
|
|
465
|
-
y:
|
|
466
|
+
x: d * r,
|
|
467
|
+
y: f * u
|
|
466
468
|
};
|
|
467
469
|
}
|
|
468
|
-
const
|
|
470
|
+
const dn = function(e) {
|
|
469
471
|
return e === void 0 && (e = 0), {
|
|
470
472
|
name: "offset",
|
|
471
473
|
options: e,
|
|
@@ -474,20 +476,20 @@ const ln = function(e) {
|
|
|
474
476
|
const {
|
|
475
477
|
x: l,
|
|
476
478
|
y: i,
|
|
477
|
-
placement:
|
|
479
|
+
placement: s,
|
|
478
480
|
middlewareData: a
|
|
479
|
-
} = t,
|
|
480
|
-
return
|
|
481
|
-
x: l +
|
|
482
|
-
y: i +
|
|
481
|
+
} = t, c = await un(t, e);
|
|
482
|
+
return s === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
483
|
+
x: l + c.x,
|
|
484
|
+
y: i + c.y,
|
|
483
485
|
data: {
|
|
484
|
-
...
|
|
485
|
-
placement:
|
|
486
|
+
...c,
|
|
487
|
+
placement: s
|
|
486
488
|
}
|
|
487
489
|
};
|
|
488
490
|
}
|
|
489
491
|
};
|
|
490
|
-
},
|
|
492
|
+
}, fn = function(e) {
|
|
491
493
|
return e === void 0 && (e = {}), {
|
|
492
494
|
name: "shift",
|
|
493
495
|
options: e,
|
|
@@ -498,37 +500,37 @@ const ln = function(e) {
|
|
|
498
500
|
placement: l
|
|
499
501
|
} = t, {
|
|
500
502
|
mainAxis: i = !0,
|
|
501
|
-
crossAxis:
|
|
503
|
+
crossAxis: s = !1,
|
|
502
504
|
limiter: a = {
|
|
503
|
-
fn: (
|
|
505
|
+
fn: (w) => {
|
|
504
506
|
let {
|
|
505
|
-
x:
|
|
506
|
-
y:
|
|
507
|
-
} =
|
|
507
|
+
x: g,
|
|
508
|
+
y: C
|
|
509
|
+
} = w;
|
|
508
510
|
return {
|
|
509
|
-
x:
|
|
510
|
-
y:
|
|
511
|
+
x: g,
|
|
512
|
+
y: C
|
|
511
513
|
};
|
|
512
514
|
}
|
|
513
515
|
},
|
|
514
|
-
...
|
|
515
|
-
} =
|
|
516
|
+
...c
|
|
517
|
+
} = be(e, t), r = {
|
|
516
518
|
x: n,
|
|
517
519
|
y: o
|
|
518
|
-
},
|
|
519
|
-
let
|
|
520
|
+
}, u = await Xe(t, c), m = oe(se(l)), d = At(m);
|
|
521
|
+
let f = r[d], v = r[m];
|
|
520
522
|
if (i) {
|
|
521
|
-
const
|
|
522
|
-
|
|
523
|
+
const w = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", C = f + u[w], S = f - u[g];
|
|
524
|
+
f = at(C, f, S);
|
|
523
525
|
}
|
|
524
|
-
if (
|
|
525
|
-
const
|
|
526
|
-
|
|
526
|
+
if (s) {
|
|
527
|
+
const w = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", C = v + u[w], S = v - u[g];
|
|
528
|
+
v = at(C, v, S);
|
|
527
529
|
}
|
|
528
530
|
const A = a.fn({
|
|
529
531
|
...t,
|
|
530
|
-
[
|
|
531
|
-
[
|
|
532
|
+
[d]: f,
|
|
533
|
+
[m]: v
|
|
532
534
|
});
|
|
533
535
|
return {
|
|
534
536
|
...A,
|
|
@@ -536,14 +538,14 @@ const ln = function(e) {
|
|
|
536
538
|
x: A.x - n,
|
|
537
539
|
y: A.y - o,
|
|
538
540
|
enabled: {
|
|
539
|
-
[
|
|
540
|
-
[
|
|
541
|
+
[d]: i,
|
|
542
|
+
[m]: s
|
|
541
543
|
}
|
|
542
544
|
}
|
|
543
545
|
};
|
|
544
546
|
}
|
|
545
547
|
};
|
|
546
|
-
},
|
|
548
|
+
}, mn = function(e) {
|
|
547
549
|
return e === void 0 && (e = {}), {
|
|
548
550
|
name: "size",
|
|
549
551
|
options: e,
|
|
@@ -552,31 +554,31 @@ const ln = function(e) {
|
|
|
552
554
|
const {
|
|
553
555
|
placement: l,
|
|
554
556
|
rects: i,
|
|
555
|
-
platform:
|
|
557
|
+
platform: s,
|
|
556
558
|
elements: a
|
|
557
559
|
} = t, {
|
|
558
|
-
apply:
|
|
560
|
+
apply: c = () => {
|
|
559
561
|
},
|
|
560
|
-
...
|
|
561
|
-
} =
|
|
562
|
-
width:
|
|
562
|
+
...r
|
|
563
|
+
} = be(e, t), u = await Xe(t, r), m = se(l), d = Ce(l), f = oe(l) === "y", {
|
|
564
|
+
width: v,
|
|
563
565
|
height: A
|
|
564
566
|
} = i.floating;
|
|
565
|
-
let
|
|
566
|
-
|
|
567
|
-
const
|
|
568
|
-
let
|
|
569
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
570
|
-
const
|
|
571
|
-
|
|
567
|
+
let w, g;
|
|
568
|
+
m === "top" || m === "bottom" ? (w = m, g = d === (await (s.isRTL == null ? void 0 : s.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = m, w = d === "end" ? "top" : "bottom");
|
|
569
|
+
const C = A - u.top - u.bottom, S = v - u.left - u.right, V = he(A - u[w], C), D = he(v - u[g], S), W = !t.middlewareData.shift;
|
|
570
|
+
let P = V, U = D;
|
|
571
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (U = S), (o = t.middlewareData.shift) != null && o.enabled.y && (P = C), W && !d) {
|
|
572
|
+
const H = $(u.left, 0), ee = $(u.right, 0), z = $(u.top, 0), M = $(u.bottom, 0);
|
|
573
|
+
f ? U = v - 2 * (H !== 0 || ee !== 0 ? H + ee : $(u.left, u.right)) : P = A - 2 * (z !== 0 || M !== 0 ? z + M : $(u.top, u.bottom));
|
|
572
574
|
}
|
|
573
|
-
await
|
|
575
|
+
await c({
|
|
574
576
|
...t,
|
|
575
|
-
availableWidth:
|
|
576
|
-
availableHeight:
|
|
577
|
+
availableWidth: U,
|
|
578
|
+
availableHeight: P
|
|
577
579
|
});
|
|
578
|
-
const
|
|
579
|
-
return
|
|
580
|
+
const K = await s.getDimensions(a.floating);
|
|
581
|
+
return v !== K.width || A !== K.height ? {
|
|
580
582
|
reset: {
|
|
581
583
|
rects: !0
|
|
582
584
|
}
|
|
@@ -584,49 +586,49 @@ const ln = function(e) {
|
|
|
584
586
|
}
|
|
585
587
|
};
|
|
586
588
|
};
|
|
587
|
-
function
|
|
589
|
+
function De() {
|
|
588
590
|
return typeof window < "u";
|
|
589
591
|
}
|
|
590
|
-
function
|
|
591
|
-
return
|
|
592
|
+
function ge(e) {
|
|
593
|
+
return bt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
592
594
|
}
|
|
593
|
-
function
|
|
595
|
+
function J(e) {
|
|
594
596
|
var t;
|
|
595
597
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
596
598
|
}
|
|
597
|
-
function
|
|
599
|
+
function Z(e) {
|
|
598
600
|
var t;
|
|
599
|
-
return (t = (
|
|
600
|
-
}
|
|
601
|
-
function gt(e) {
|
|
602
|
-
return Ve() ? e instanceof Node || e instanceof _(e).Node : !1;
|
|
601
|
+
return (t = (bt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
603
602
|
}
|
|
604
|
-
function
|
|
605
|
-
return
|
|
603
|
+
function bt(e) {
|
|
604
|
+
return De() ? e instanceof Node || e instanceof J(e).Node : !1;
|
|
606
605
|
}
|
|
607
606
|
function q(e) {
|
|
608
|
-
return
|
|
607
|
+
return De() ? e instanceof Element || e instanceof J(e).Element : !1;
|
|
608
|
+
}
|
|
609
|
+
function j(e) {
|
|
610
|
+
return De() ? e instanceof HTMLElement || e instanceof J(e).HTMLElement : !1;
|
|
609
611
|
}
|
|
610
|
-
function
|
|
611
|
-
return !
|
|
612
|
+
function dt(e) {
|
|
613
|
+
return !De() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof J(e).ShadowRoot;
|
|
612
614
|
}
|
|
613
|
-
const
|
|
614
|
-
function
|
|
615
|
+
const pn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
616
|
+
function Se(e) {
|
|
615
617
|
const {
|
|
616
618
|
overflow: t,
|
|
617
619
|
overflowX: n,
|
|
618
620
|
overflowY: o,
|
|
619
621
|
display: l
|
|
620
|
-
} =
|
|
621
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !
|
|
622
|
+
} = Y(e);
|
|
623
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !pn.has(l);
|
|
622
624
|
}
|
|
623
|
-
const
|
|
624
|
-
function
|
|
625
|
-
return
|
|
625
|
+
const hn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
626
|
+
function vn(e) {
|
|
627
|
+
return hn.has(ge(e));
|
|
626
628
|
}
|
|
627
|
-
const
|
|
628
|
-
function
|
|
629
|
-
return
|
|
629
|
+
const gn = [":popover-open", ":modal"];
|
|
630
|
+
function Be(e) {
|
|
631
|
+
return gn.some((t) => {
|
|
630
632
|
try {
|
|
631
633
|
return e.matches(t);
|
|
632
634
|
} catch {
|
|
@@ -634,34 +636,34 @@ function Te(e) {
|
|
|
634
636
|
}
|
|
635
637
|
});
|
|
636
638
|
}
|
|
637
|
-
const
|
|
638
|
-
function
|
|
639
|
-
const t =
|
|
640
|
-
return
|
|
639
|
+
const yn = ["transform", "translate", "scale", "rotate", "perspective"], An = ["transform", "translate", "scale", "rotate", "perspective", "filter"], wn = ["paint", "layout", "strict", "content"];
|
|
640
|
+
function je(e) {
|
|
641
|
+
const t = Ze(), n = q(e) ? Y(e) : e;
|
|
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));
|
|
641
643
|
}
|
|
642
|
-
function
|
|
643
|
-
let t =
|
|
644
|
-
for (;
|
|
645
|
-
if (
|
|
644
|
+
function xn(e) {
|
|
645
|
+
let t = ie(e);
|
|
646
|
+
for (; j(t) && !ve(t); ) {
|
|
647
|
+
if (je(t))
|
|
646
648
|
return t;
|
|
647
|
-
if (
|
|
649
|
+
if (Be(t))
|
|
648
650
|
return null;
|
|
649
|
-
t =
|
|
651
|
+
t = ie(t);
|
|
650
652
|
}
|
|
651
653
|
return null;
|
|
652
654
|
}
|
|
653
|
-
function
|
|
655
|
+
function Ze() {
|
|
654
656
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
655
657
|
}
|
|
656
|
-
const
|
|
657
|
-
function
|
|
658
|
-
return
|
|
658
|
+
const bn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
659
|
+
function ve(e) {
|
|
660
|
+
return bn.has(ge(e));
|
|
659
661
|
}
|
|
660
|
-
function
|
|
661
|
-
return
|
|
662
|
+
function Y(e) {
|
|
663
|
+
return J(e).getComputedStyle(e);
|
|
662
664
|
}
|
|
663
|
-
function
|
|
664
|
-
return
|
|
665
|
+
function Le(e) {
|
|
666
|
+
return q(e) ? {
|
|
665
667
|
scrollLeft: e.scrollLeft,
|
|
666
668
|
scrollTop: e.scrollTop
|
|
667
669
|
} : {
|
|
@@ -669,189 +671,189 @@ function De(e) {
|
|
|
669
671
|
scrollTop: e.scrollY
|
|
670
672
|
};
|
|
671
673
|
}
|
|
672
|
-
function
|
|
673
|
-
if (
|
|
674
|
+
function ie(e) {
|
|
675
|
+
if (ge(e) === "html")
|
|
674
676
|
return e;
|
|
675
677
|
const t = (
|
|
676
678
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
677
679
|
e.assignedSlot || // DOM Element detected.
|
|
678
680
|
e.parentNode || // ShadowRoot detected.
|
|
679
|
-
|
|
680
|
-
|
|
681
|
+
dt(e) && e.host || // Fallback.
|
|
682
|
+
Z(e)
|
|
681
683
|
);
|
|
682
|
-
return
|
|
684
|
+
return dt(t) ? t.host : t;
|
|
683
685
|
}
|
|
684
|
-
function
|
|
685
|
-
const t =
|
|
686
|
-
return
|
|
686
|
+
function Ct(e) {
|
|
687
|
+
const t = ie(e);
|
|
688
|
+
return ve(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : j(t) && Se(t) ? t : Ct(t);
|
|
687
689
|
}
|
|
688
|
-
function
|
|
690
|
+
function xe(e, t, n) {
|
|
689
691
|
var o;
|
|
690
692
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
691
|
-
const l =
|
|
693
|
+
const l = Ct(e), i = l === ((o = e.ownerDocument) == null ? void 0 : o.body), s = J(l);
|
|
692
694
|
if (i) {
|
|
693
|
-
const a =
|
|
694
|
-
return t.concat(
|
|
695
|
+
const a = $e(s);
|
|
696
|
+
return t.concat(s, s.visualViewport || [], Se(l) ? l : [], a && n ? xe(a) : []);
|
|
695
697
|
}
|
|
696
|
-
return t.concat(l,
|
|
698
|
+
return t.concat(l, xe(l, [], n));
|
|
697
699
|
}
|
|
698
|
-
function
|
|
700
|
+
function $e(e) {
|
|
699
701
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
700
702
|
}
|
|
701
|
-
function
|
|
702
|
-
const t =
|
|
703
|
+
function St(e) {
|
|
704
|
+
const t = Y(e);
|
|
703
705
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
704
|
-
const l =
|
|
705
|
-
return a && (n = i, o =
|
|
706
|
+
const l = j(e), i = l ? e.offsetWidth : n, s = l ? e.offsetHeight : o, a = Te(n) !== i || Te(o) !== s;
|
|
707
|
+
return a && (n = i, o = s), {
|
|
706
708
|
width: n,
|
|
707
709
|
height: o,
|
|
708
710
|
$: a
|
|
709
711
|
};
|
|
710
712
|
}
|
|
711
|
-
function
|
|
712
|
-
return
|
|
713
|
+
function et(e) {
|
|
714
|
+
return q(e) ? e : e.contextElement;
|
|
713
715
|
}
|
|
714
|
-
function
|
|
715
|
-
const t =
|
|
716
|
-
if (!
|
|
717
|
-
return
|
|
716
|
+
function pe(e) {
|
|
717
|
+
const t = et(e);
|
|
718
|
+
if (!j(t))
|
|
719
|
+
return X(1);
|
|
718
720
|
const n = t.getBoundingClientRect(), {
|
|
719
721
|
width: o,
|
|
720
722
|
height: l,
|
|
721
723
|
$: i
|
|
722
|
-
} =
|
|
723
|
-
let
|
|
724
|
-
return (!
|
|
725
|
-
x:
|
|
724
|
+
} = St(t);
|
|
725
|
+
let s = (i ? Te(n.width) : n.width) / o, a = (i ? Te(n.height) : n.height) / l;
|
|
726
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
727
|
+
x: s,
|
|
726
728
|
y: a
|
|
727
729
|
};
|
|
728
730
|
}
|
|
729
|
-
const
|
|
730
|
-
function
|
|
731
|
-
const t =
|
|
732
|
-
return !
|
|
731
|
+
const Cn = /* @__PURE__ */ X(0);
|
|
732
|
+
function kt(e) {
|
|
733
|
+
const t = J(e);
|
|
734
|
+
return !Ze() || !t.visualViewport ? Cn : {
|
|
733
735
|
x: t.visualViewport.offsetLeft,
|
|
734
736
|
y: t.visualViewport.offsetTop
|
|
735
737
|
};
|
|
736
738
|
}
|
|
737
|
-
function
|
|
738
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
739
|
+
function Sn(e, t, n) {
|
|
740
|
+
return t === void 0 && (t = !1), !n || t && n !== J(e) ? !1 : t;
|
|
739
741
|
}
|
|
740
|
-
function
|
|
742
|
+
function de(e, t, n, o) {
|
|
741
743
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
742
|
-
const l = e.getBoundingClientRect(), i =
|
|
743
|
-
let
|
|
744
|
-
t && (o ?
|
|
745
|
-
const a =
|
|
746
|
-
let
|
|
744
|
+
const l = e.getBoundingClientRect(), i = et(e);
|
|
745
|
+
let s = X(1);
|
|
746
|
+
t && (o ? q(o) && (s = pe(o)) : s = pe(e));
|
|
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, m = l.height / s.y;
|
|
747
749
|
if (i) {
|
|
748
|
-
const
|
|
749
|
-
let
|
|
750
|
-
for (; A && o &&
|
|
751
|
-
const
|
|
752
|
-
|
|
750
|
+
const d = J(i), f = o && q(o) ? J(o) : o;
|
|
751
|
+
let v = d, A = $e(v);
|
|
752
|
+
for (; A && o && f !== v; ) {
|
|
753
|
+
const w = pe(A), g = A.getBoundingClientRect(), C = Y(A), S = g.left + (A.clientLeft + parseFloat(C.paddingLeft)) * w.x, V = g.top + (A.clientTop + parseFloat(C.paddingTop)) * w.y;
|
|
754
|
+
c *= w.x, r *= w.y, u *= w.x, m *= w.y, c += S, r += V, v = J(A), A = $e(v);
|
|
753
755
|
}
|
|
754
756
|
}
|
|
755
|
-
return
|
|
756
|
-
width:
|
|
757
|
-
height:
|
|
758
|
-
x:
|
|
759
|
-
y:
|
|
757
|
+
return Ve({
|
|
758
|
+
width: u,
|
|
759
|
+
height: m,
|
|
760
|
+
x: c,
|
|
761
|
+
y: r
|
|
760
762
|
});
|
|
761
763
|
}
|
|
762
|
-
function
|
|
763
|
-
const n =
|
|
764
|
-
return t ? t.left + n :
|
|
764
|
+
function Ie(e, t) {
|
|
765
|
+
const n = Le(e).scrollLeft;
|
|
766
|
+
return t ? t.left + n : de(Z(e)).left + n;
|
|
765
767
|
}
|
|
766
|
-
function
|
|
767
|
-
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft -
|
|
768
|
+
function Rt(e, t) {
|
|
769
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Ie(e, n), l = n.top + t.scrollTop;
|
|
768
770
|
return {
|
|
769
771
|
x: o,
|
|
770
772
|
y: l
|
|
771
773
|
};
|
|
772
774
|
}
|
|
773
|
-
function
|
|
775
|
+
function kn(e) {
|
|
774
776
|
let {
|
|
775
777
|
elements: t,
|
|
776
778
|
rect: n,
|
|
777
779
|
offsetParent: o,
|
|
778
780
|
strategy: l
|
|
779
781
|
} = e;
|
|
780
|
-
const i = l === "fixed",
|
|
781
|
-
if (o ===
|
|
782
|
+
const i = l === "fixed", s = Z(o), a = t ? Be(t.floating) : !1;
|
|
783
|
+
if (o === s || a && i)
|
|
782
784
|
return n;
|
|
783
|
-
let
|
|
785
|
+
let c = {
|
|
784
786
|
scrollLeft: 0,
|
|
785
787
|
scrollTop: 0
|
|
786
|
-
},
|
|
787
|
-
const
|
|
788
|
-
if ((
|
|
789
|
-
const
|
|
790
|
-
|
|
788
|
+
}, r = X(1);
|
|
789
|
+
const u = X(0), m = j(o);
|
|
790
|
+
if ((m || !m && !i) && ((ge(o) !== "body" || Se(s)) && (c = Le(o)), j(o))) {
|
|
791
|
+
const f = de(o);
|
|
792
|
+
r = pe(o), u.x = f.x + o.clientLeft, u.y = f.y + o.clientTop;
|
|
791
793
|
}
|
|
792
|
-
const
|
|
794
|
+
const d = s && !m && !i ? Rt(s, c) : X(0);
|
|
793
795
|
return {
|
|
794
|
-
width: n.width *
|
|
795
|
-
height: n.height *
|
|
796
|
-
x: n.x *
|
|
797
|
-
y: n.y *
|
|
796
|
+
width: n.width * r.x,
|
|
797
|
+
height: n.height * r.y,
|
|
798
|
+
x: n.x * r.x - c.scrollLeft * r.x + u.x + d.x,
|
|
799
|
+
y: n.y * r.y - c.scrollTop * r.y + u.y + d.y
|
|
798
800
|
};
|
|
799
801
|
}
|
|
800
|
-
function
|
|
802
|
+
function Rn(e) {
|
|
801
803
|
return Array.from(e.getClientRects());
|
|
802
804
|
}
|
|
803
|
-
function
|
|
804
|
-
const t =
|
|
805
|
-
let
|
|
805
|
+
function _n(e) {
|
|
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 + Ie(e);
|
|
806
808
|
const a = -n.scrollTop;
|
|
807
|
-
return
|
|
809
|
+
return Y(o).direction === "rtl" && (s += $(t.clientWidth, o.clientWidth) - l), {
|
|
808
810
|
width: l,
|
|
809
811
|
height: i,
|
|
810
|
-
x:
|
|
812
|
+
x: s,
|
|
811
813
|
y: a
|
|
812
814
|
};
|
|
813
815
|
}
|
|
814
|
-
const
|
|
815
|
-
function
|
|
816
|
-
const n =
|
|
817
|
-
let i = o.clientWidth,
|
|
816
|
+
const ft = 25;
|
|
817
|
+
function On(e, t) {
|
|
818
|
+
const n = J(e), o = Z(e), l = n.visualViewport;
|
|
819
|
+
let i = o.clientWidth, s = o.clientHeight, a = 0, c = 0;
|
|
818
820
|
if (l) {
|
|
819
|
-
i = l.width,
|
|
820
|
-
const
|
|
821
|
-
(!
|
|
821
|
+
i = l.width, s = l.height;
|
|
822
|
+
const u = Ze();
|
|
823
|
+
(!u || u && t === "fixed") && (a = l.offsetLeft, c = l.offsetTop);
|
|
822
824
|
}
|
|
823
|
-
const
|
|
824
|
-
if (
|
|
825
|
-
const
|
|
826
|
-
|
|
827
|
-
} else
|
|
825
|
+
const r = Ie(o);
|
|
826
|
+
if (r <= 0) {
|
|
827
|
+
const u = o.ownerDocument, m = u.body, d = getComputedStyle(m), f = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, v = Math.abs(o.clientWidth - m.clientWidth - f);
|
|
828
|
+
v <= ft && (i -= v);
|
|
829
|
+
} else r <= ft && (i += r);
|
|
828
830
|
return {
|
|
829
831
|
width: i,
|
|
830
|
-
height:
|
|
832
|
+
height: s,
|
|
831
833
|
x: a,
|
|
832
|
-
y:
|
|
834
|
+
y: c
|
|
833
835
|
};
|
|
834
836
|
}
|
|
835
|
-
const
|
|
836
|
-
function
|
|
837
|
-
const n =
|
|
837
|
+
const Tn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
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) ? pe(e) : X(1), s = e.clientWidth * i.x, a = e.clientHeight * i.y, c = l * i.x, r = o * i.y;
|
|
838
840
|
return {
|
|
839
|
-
width:
|
|
841
|
+
width: s,
|
|
840
842
|
height: a,
|
|
841
|
-
x:
|
|
842
|
-
y:
|
|
843
|
+
x: c,
|
|
844
|
+
y: r
|
|
843
845
|
};
|
|
844
846
|
}
|
|
845
|
-
function
|
|
847
|
+
function mt(e, t, n) {
|
|
846
848
|
let o;
|
|
847
849
|
if (t === "viewport")
|
|
848
|
-
o =
|
|
850
|
+
o = On(e, n);
|
|
849
851
|
else if (t === "document")
|
|
850
|
-
o =
|
|
851
|
-
else if (
|
|
852
|
-
o =
|
|
852
|
+
o = _n(Z(e));
|
|
853
|
+
else if (q(t))
|
|
854
|
+
o = En(t, n);
|
|
853
855
|
else {
|
|
854
|
-
const l =
|
|
856
|
+
const l = kt(e);
|
|
855
857
|
o = {
|
|
856
858
|
x: t.x - l.x,
|
|
857
859
|
y: t.y - l.y,
|
|
@@ -859,110 +861,110 @@ function ot(e, t, n) {
|
|
|
859
861
|
height: t.height
|
|
860
862
|
};
|
|
861
863
|
}
|
|
862
|
-
return
|
|
864
|
+
return Ve(o);
|
|
863
865
|
}
|
|
864
|
-
function
|
|
865
|
-
const n =
|
|
866
|
-
return n === t || !
|
|
866
|
+
function _t(e, t) {
|
|
867
|
+
const n = ie(e);
|
|
868
|
+
return n === t || !q(n) || ve(n) ? !1 : Y(n).position === "fixed" || _t(n, t);
|
|
867
869
|
}
|
|
868
|
-
function
|
|
870
|
+
function Vn(e, t) {
|
|
869
871
|
const n = t.get(e);
|
|
870
872
|
if (n)
|
|
871
873
|
return n;
|
|
872
|
-
let o =
|
|
873
|
-
const i =
|
|
874
|
-
let
|
|
875
|
-
for (;
|
|
876
|
-
const a =
|
|
877
|
-
!
|
|
874
|
+
let o = xe(e, [], !1).filter((a) => q(a) && ge(a) !== "body"), l = null;
|
|
875
|
+
const i = Y(e).position === "fixed";
|
|
876
|
+
let s = i ? ie(e) : e;
|
|
877
|
+
for (; q(s) && !ve(s); ) {
|
|
878
|
+
const a = Y(s), c = je(s);
|
|
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);
|
|
878
880
|
}
|
|
879
881
|
return t.set(e, o), o;
|
|
880
882
|
}
|
|
881
|
-
function
|
|
883
|
+
function Dn(e) {
|
|
882
884
|
let {
|
|
883
885
|
element: t,
|
|
884
886
|
boundary: n,
|
|
885
887
|
rootBoundary: o,
|
|
886
888
|
strategy: l
|
|
887
889
|
} = e;
|
|
888
|
-
const
|
|
889
|
-
const
|
|
890
|
-
return
|
|
891
|
-
},
|
|
890
|
+
const s = [...n === "clippingAncestors" ? Be(t) ? [] : Vn(t, this._c) : [].concat(n), o], a = s[0], c = s.reduce((r, u) => {
|
|
891
|
+
const m = mt(t, u, l);
|
|
892
|
+
return r.top = $(m.top, r.top), r.right = he(m.right, r.right), r.bottom = he(m.bottom, r.bottom), r.left = $(m.left, r.left), r;
|
|
893
|
+
}, mt(t, a, l));
|
|
892
894
|
return {
|
|
893
|
-
width:
|
|
894
|
-
height:
|
|
895
|
-
x:
|
|
896
|
-
y:
|
|
895
|
+
width: c.right - c.left,
|
|
896
|
+
height: c.bottom - c.top,
|
|
897
|
+
x: c.left,
|
|
898
|
+
y: c.top
|
|
897
899
|
};
|
|
898
900
|
}
|
|
899
|
-
function
|
|
901
|
+
function Bn(e) {
|
|
900
902
|
const {
|
|
901
903
|
width: t,
|
|
902
904
|
height: n
|
|
903
|
-
} =
|
|
905
|
+
} = St(e);
|
|
904
906
|
return {
|
|
905
907
|
width: t,
|
|
906
908
|
height: n
|
|
907
909
|
};
|
|
908
910
|
}
|
|
909
|
-
function
|
|
910
|
-
const o =
|
|
911
|
+
function Ln(e, t, n) {
|
|
912
|
+
const o = j(t), l = Z(t), i = n === "fixed", s = de(e, !0, i, t);
|
|
911
913
|
let a = {
|
|
912
914
|
scrollLeft: 0,
|
|
913
915
|
scrollTop: 0
|
|
914
916
|
};
|
|
915
|
-
const
|
|
916
|
-
function
|
|
917
|
-
|
|
917
|
+
const c = X(0);
|
|
918
|
+
function r() {
|
|
919
|
+
c.x = Ie(l);
|
|
918
920
|
}
|
|
919
921
|
if (o || !o && !i)
|
|
920
|
-
if ((
|
|
921
|
-
const
|
|
922
|
-
|
|
923
|
-
} else l &&
|
|
924
|
-
i && !o && l &&
|
|
925
|
-
const
|
|
922
|
+
if ((ge(t) !== "body" || Se(l)) && (a = Le(t)), o) {
|
|
923
|
+
const f = de(t, !0, i, t);
|
|
924
|
+
c.x = f.x + t.clientLeft, c.y = f.y + t.clientTop;
|
|
925
|
+
} else l && r();
|
|
926
|
+
i && !o && l && r();
|
|
927
|
+
const u = l && !o && !i ? Rt(l, a) : X(0), m = s.left + a.scrollLeft - c.x - u.x, d = s.top + a.scrollTop - c.y - u.y;
|
|
926
928
|
return {
|
|
927
|
-
x:
|
|
928
|
-
y:
|
|
929
|
-
width:
|
|
930
|
-
height:
|
|
929
|
+
x: m,
|
|
930
|
+
y: d,
|
|
931
|
+
width: s.width,
|
|
932
|
+
height: s.height
|
|
931
933
|
};
|
|
932
934
|
}
|
|
933
|
-
function
|
|
934
|
-
return
|
|
935
|
+
function Ne(e) {
|
|
936
|
+
return Y(e).position === "static";
|
|
935
937
|
}
|
|
936
|
-
function
|
|
937
|
-
if (!
|
|
938
|
+
function pt(e, t) {
|
|
939
|
+
if (!j(e) || Y(e).position === "fixed")
|
|
938
940
|
return null;
|
|
939
941
|
if (t)
|
|
940
942
|
return t(e);
|
|
941
943
|
let n = e.offsetParent;
|
|
942
|
-
return
|
|
944
|
+
return Z(e) === n && (n = n.ownerDocument.body), n;
|
|
943
945
|
}
|
|
944
|
-
function
|
|
945
|
-
const n =
|
|
946
|
-
if (
|
|
946
|
+
function Ot(e, t) {
|
|
947
|
+
const n = J(e);
|
|
948
|
+
if (Be(e))
|
|
947
949
|
return n;
|
|
948
|
-
if (!
|
|
949
|
-
let l =
|
|
950
|
-
for (; l && !
|
|
951
|
-
if (
|
|
950
|
+
if (!j(e)) {
|
|
951
|
+
let l = ie(e);
|
|
952
|
+
for (; l && !ve(l); ) {
|
|
953
|
+
if (q(l) && !Ne(l))
|
|
952
954
|
return l;
|
|
953
|
-
l =
|
|
955
|
+
l = ie(l);
|
|
954
956
|
}
|
|
955
957
|
return n;
|
|
956
958
|
}
|
|
957
|
-
let o =
|
|
958
|
-
for (; o &&
|
|
959
|
-
o =
|
|
960
|
-
return o &&
|
|
959
|
+
let o = pt(e, t);
|
|
960
|
+
for (; o && vn(o) && Ne(o); )
|
|
961
|
+
o = pt(o, t);
|
|
962
|
+
return o && ve(o) && Ne(o) && !je(o) ? n : o || xn(e) || n;
|
|
961
963
|
}
|
|
962
|
-
const
|
|
963
|
-
const t = this.getOffsetParent ||
|
|
964
|
+
const In = async function(e) {
|
|
965
|
+
const t = this.getOffsetParent || Ot, n = this.getDimensions, o = await n(e.floating);
|
|
964
966
|
return {
|
|
965
|
-
reference:
|
|
967
|
+
reference: Ln(e.reference, await t(e.floating), e.strategy),
|
|
966
968
|
floating: {
|
|
967
969
|
x: 0,
|
|
968
970
|
y: 0,
|
|
@@ -971,121 +973,121 @@ const Vn = async function(e) {
|
|
|
971
973
|
}
|
|
972
974
|
};
|
|
973
975
|
};
|
|
974
|
-
function
|
|
975
|
-
return
|
|
976
|
-
}
|
|
977
|
-
const
|
|
978
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
979
|
-
getDocumentElement:
|
|
980
|
-
getClippingRect:
|
|
981
|
-
getOffsetParent:
|
|
982
|
-
getElementRects:
|
|
983
|
-
getClientRects:
|
|
984
|
-
getDimensions:
|
|
985
|
-
getScale:
|
|
986
|
-
isElement:
|
|
987
|
-
isRTL:
|
|
976
|
+
function Fn(e) {
|
|
977
|
+
return Y(e).direction === "rtl";
|
|
978
|
+
}
|
|
979
|
+
const Mn = {
|
|
980
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: kn,
|
|
981
|
+
getDocumentElement: Z,
|
|
982
|
+
getClippingRect: Dn,
|
|
983
|
+
getOffsetParent: Ot,
|
|
984
|
+
getElementRects: In,
|
|
985
|
+
getClientRects: Rn,
|
|
986
|
+
getDimensions: Bn,
|
|
987
|
+
getScale: pe,
|
|
988
|
+
isElement: q,
|
|
989
|
+
isRTL: Fn
|
|
988
990
|
};
|
|
989
|
-
function
|
|
991
|
+
function Tt(e, t) {
|
|
990
992
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
991
993
|
}
|
|
992
|
-
function
|
|
994
|
+
function Nn(e, t) {
|
|
993
995
|
let n = null, o;
|
|
994
|
-
const l =
|
|
996
|
+
const l = Z(e);
|
|
995
997
|
function i() {
|
|
996
998
|
var a;
|
|
997
999
|
clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
|
|
998
1000
|
}
|
|
999
|
-
function
|
|
1000
|
-
a === void 0 && (a = !1),
|
|
1001
|
-
const
|
|
1002
|
-
left:
|
|
1003
|
-
top:
|
|
1004
|
-
width:
|
|
1005
|
-
height:
|
|
1006
|
-
} =
|
|
1007
|
-
if (a || t(), !
|
|
1001
|
+
function s(a, c) {
|
|
1002
|
+
a === void 0 && (a = !1), c === void 0 && (c = 1), i();
|
|
1003
|
+
const r = e.getBoundingClientRect(), {
|
|
1004
|
+
left: u,
|
|
1005
|
+
top: m,
|
|
1006
|
+
width: d,
|
|
1007
|
+
height: f
|
|
1008
|
+
} = r;
|
|
1009
|
+
if (a || t(), !d || !f)
|
|
1008
1010
|
return;
|
|
1009
|
-
const
|
|
1010
|
-
rootMargin: -
|
|
1011
|
-
threshold:
|
|
1011
|
+
const v = _e(m), A = _e(l.clientWidth - (u + d)), w = _e(l.clientHeight - (m + f)), g = _e(u), S = {
|
|
1012
|
+
rootMargin: -v + "px " + -A + "px " + -w + "px " + -g + "px",
|
|
1013
|
+
threshold: $(0, he(1, c)) || 1
|
|
1012
1014
|
};
|
|
1013
|
-
let
|
|
1014
|
-
function
|
|
1015
|
-
const
|
|
1016
|
-
if (
|
|
1017
|
-
if (!
|
|
1018
|
-
return
|
|
1019
|
-
|
|
1020
|
-
|
|
1015
|
+
let V = !0;
|
|
1016
|
+
function D(W) {
|
|
1017
|
+
const P = W[0].intersectionRatio;
|
|
1018
|
+
if (P !== c) {
|
|
1019
|
+
if (!V)
|
|
1020
|
+
return s();
|
|
1021
|
+
P ? s(!1, P) : o = setTimeout(() => {
|
|
1022
|
+
s(!1, 1e-7);
|
|
1021
1023
|
}, 1e3);
|
|
1022
1024
|
}
|
|
1023
|
-
|
|
1025
|
+
P === 1 && !Tt(r, e.getBoundingClientRect()) && s(), V = !1;
|
|
1024
1026
|
}
|
|
1025
1027
|
try {
|
|
1026
|
-
n = new IntersectionObserver(
|
|
1027
|
-
...
|
|
1028
|
+
n = new IntersectionObserver(D, {
|
|
1029
|
+
...S,
|
|
1028
1030
|
// Handle <iframe>s
|
|
1029
1031
|
root: l.ownerDocument
|
|
1030
1032
|
});
|
|
1031
1033
|
} catch {
|
|
1032
|
-
n = new IntersectionObserver(
|
|
1034
|
+
n = new IntersectionObserver(D, S);
|
|
1033
1035
|
}
|
|
1034
1036
|
n.observe(e);
|
|
1035
1037
|
}
|
|
1036
|
-
return
|
|
1038
|
+
return s(!0), i;
|
|
1037
1039
|
}
|
|
1038
|
-
function
|
|
1040
|
+
function Pn(e, t, n, o) {
|
|
1039
1041
|
o === void 0 && (o = {});
|
|
1040
1042
|
const {
|
|
1041
1043
|
ancestorScroll: l = !0,
|
|
1042
1044
|
ancestorResize: i = !0,
|
|
1043
|
-
elementResize:
|
|
1045
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
1044
1046
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1045
|
-
animationFrame:
|
|
1046
|
-
} = o,
|
|
1047
|
-
|
|
1048
|
-
l &&
|
|
1047
|
+
animationFrame: c = !1
|
|
1048
|
+
} = o, r = et(e), u = l || i ? [...r ? xe(r) : [], ...xe(t)] : [];
|
|
1049
|
+
u.forEach((g) => {
|
|
1050
|
+
l && g.addEventListener("scroll", n, {
|
|
1049
1051
|
passive: !0
|
|
1050
|
-
}), i &&
|
|
1052
|
+
}), i && g.addEventListener("resize", n);
|
|
1051
1053
|
});
|
|
1052
|
-
const
|
|
1053
|
-
let
|
|
1054
|
-
|
|
1055
|
-
let [
|
|
1056
|
-
|
|
1057
|
-
var
|
|
1058
|
-
(
|
|
1054
|
+
const m = r && a ? Nn(r, n) : null;
|
|
1055
|
+
let d = -1, f = null;
|
|
1056
|
+
s && (f = new ResizeObserver((g) => {
|
|
1057
|
+
let [C] = g;
|
|
1058
|
+
C && C.target === r && f && (f.unobserve(t), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1059
|
+
var S;
|
|
1060
|
+
(S = f) == null || S.observe(t);
|
|
1059
1061
|
})), n();
|
|
1060
|
-
}),
|
|
1061
|
-
let
|
|
1062
|
-
|
|
1063
|
-
function
|
|
1064
|
-
const
|
|
1065
|
-
A && !
|
|
1062
|
+
}), r && !c && f.observe(r), f.observe(t));
|
|
1063
|
+
let v, A = c ? de(e) : null;
|
|
1064
|
+
c && w();
|
|
1065
|
+
function w() {
|
|
1066
|
+
const g = de(e);
|
|
1067
|
+
A && !Tt(A, g) && n(), A = g, v = requestAnimationFrame(w);
|
|
1066
1068
|
}
|
|
1067
1069
|
return n(), () => {
|
|
1068
|
-
var
|
|
1069
|
-
|
|
1070
|
-
l &&
|
|
1071
|
-
}),
|
|
1070
|
+
var g;
|
|
1071
|
+
u.forEach((C) => {
|
|
1072
|
+
l && C.removeEventListener("scroll", n), i && C.removeEventListener("resize", n);
|
|
1073
|
+
}), m?.(), (g = f) == null || g.disconnect(), f = null, c && cancelAnimationFrame(v);
|
|
1072
1074
|
};
|
|
1073
1075
|
}
|
|
1074
|
-
const
|
|
1076
|
+
const Hn = dn, Qn = fn, Un = rn, $n = mn, Jn = (e, t, n) => {
|
|
1075
1077
|
const o = /* @__PURE__ */ new Map(), l = {
|
|
1076
|
-
platform:
|
|
1078
|
+
platform: Mn,
|
|
1077
1079
|
...n
|
|
1078
1080
|
}, i = {
|
|
1079
1081
|
...l.platform,
|
|
1080
1082
|
_c: o
|
|
1081
1083
|
};
|
|
1082
|
-
return
|
|
1084
|
+
return an(e, t, {
|
|
1083
1085
|
...l,
|
|
1084
1086
|
platform: i
|
|
1085
1087
|
});
|
|
1086
1088
|
};
|
|
1087
|
-
function
|
|
1088
|
-
const n =
|
|
1089
|
+
function Wn(e, t) {
|
|
1090
|
+
const n = _({
|
|
1089
1091
|
position: "fixed",
|
|
1090
1092
|
left: "0",
|
|
1091
1093
|
top: "0",
|
|
@@ -1094,63 +1096,63 @@ function Qn(e, t) {
|
|
|
1094
1096
|
});
|
|
1095
1097
|
let o = null;
|
|
1096
1098
|
const l = () => {
|
|
1097
|
-
!e.value || !t.value ||
|
|
1099
|
+
!e.value || !t.value || Jn(e.value, t.value, {
|
|
1098
1100
|
placement: "bottom-start",
|
|
1099
1101
|
strategy: "fixed",
|
|
1100
1102
|
middleware: [
|
|
1101
|
-
|
|
1103
|
+
Hn(6),
|
|
1102
1104
|
// 输入框与下拉列表的间距
|
|
1103
|
-
|
|
1105
|
+
Un(),
|
|
1104
1106
|
// 空间不足自动翻转到上方
|
|
1105
|
-
|
|
1107
|
+
Qn({ padding: 10 }),
|
|
1106
1108
|
// 靠近屏幕边缘时自动位移
|
|
1107
|
-
|
|
1108
|
-
apply({ rects: a, elements:
|
|
1109
|
-
const
|
|
1110
|
-
Object.assign(
|
|
1111
|
-
width:
|
|
1109
|
+
$n({
|
|
1110
|
+
apply({ rects: a, elements: c }) {
|
|
1111
|
+
const r = `${a.reference.width}px`;
|
|
1112
|
+
Object.assign(c.floating.style, {
|
|
1113
|
+
width: r,
|
|
1112
1114
|
// 必须锁定,否则在 body 下它可能由于内容过多撑开到 100vw
|
|
1113
|
-
minWidth:
|
|
1114
|
-
maxWidth:
|
|
1115
|
+
minWidth: r,
|
|
1116
|
+
maxWidth: r
|
|
1115
1117
|
});
|
|
1116
1118
|
}
|
|
1117
1119
|
})
|
|
1118
1120
|
]
|
|
1119
|
-
}).then(({ x: a, y:
|
|
1121
|
+
}).then(({ x: a, y: c }) => {
|
|
1120
1122
|
Object.assign(n.value, {
|
|
1121
1123
|
left: `${a}px`,
|
|
1122
|
-
top: `${
|
|
1124
|
+
top: `${c}px`
|
|
1123
1125
|
});
|
|
1124
1126
|
});
|
|
1125
1127
|
}, i = () => {
|
|
1126
|
-
e.value && t.value && (o =
|
|
1127
|
-
},
|
|
1128
|
+
e.value && t.value && (o = Pn(e.value, t.value, l));
|
|
1129
|
+
}, s = () => {
|
|
1128
1130
|
o && (o(), o = null);
|
|
1129
1131
|
};
|
|
1130
|
-
return
|
|
1132
|
+
return gt(s), { floatingStyles: n, startTrack: i, stopTrack: s };
|
|
1131
1133
|
}
|
|
1132
|
-
const
|
|
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", Gn = "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=", qn = "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 = {
|
|
1133
1135
|
key: 0,
|
|
1134
1136
|
class: "search-tag collapse"
|
|
1135
|
-
},
|
|
1137
|
+
}, no = ["placeholder"], oo = { class: "suffix-area" }, lo = {
|
|
1136
1138
|
key: 1,
|
|
1137
1139
|
class: "loading-spinner"
|
|
1138
|
-
},
|
|
1140
|
+
}, so = { class: "search-icon" }, io = ["src"], ao = {
|
|
1139
1141
|
key: 0,
|
|
1140
1142
|
class: "history-section"
|
|
1141
|
-
},
|
|
1143
|
+
}, ro = { class: "history-header" }, co = ["onMousedown"], uo = ["src"], fo = { class: "type-text" }, mo = { class: "result-text" }, po = {
|
|
1142
1144
|
key: 0,
|
|
1143
1145
|
class: "status-msg"
|
|
1144
|
-
},
|
|
1146
|
+
}, ho = ["onMousedown"], vo = ["src"], go = { class: "type-text" }, yo = { class: "result-text" }, Ao = {
|
|
1145
1147
|
key: 0,
|
|
1146
1148
|
class: "load-more-msg"
|
|
1147
|
-
},
|
|
1149
|
+
}, wo = {
|
|
1148
1150
|
key: 1,
|
|
1149
1151
|
class: "load-more-msg no-more"
|
|
1150
|
-
},
|
|
1152
|
+
}, xo = {
|
|
1151
1153
|
key: 2,
|
|
1152
1154
|
class: "status-msg"
|
|
1153
|
-
},
|
|
1155
|
+
}, bo = /* @__PURE__ */ Ke({
|
|
1154
1156
|
__name: "index",
|
|
1155
1157
|
props: {
|
|
1156
1158
|
modelValue: { default: null },
|
|
@@ -1164,7 +1166,11 @@ const In = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1164
1166
|
"Seaport",
|
|
1165
1167
|
"Airport"
|
|
1166
1168
|
] },
|
|
1167
|
-
historyKey: { default:
|
|
1169
|
+
historyKey: { default: void 0 },
|
|
1170
|
+
lang: { default: "" },
|
|
1171
|
+
placeholder: {},
|
|
1172
|
+
showSearchIcon: { type: Boolean, default: !0 },
|
|
1173
|
+
showItemTag: { type: Boolean, default: !0 }
|
|
1168
1174
|
},
|
|
1169
1175
|
emits: [
|
|
1170
1176
|
"update:modelValue",
|
|
@@ -1174,323 +1180,389 @@ const In = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1174
1180
|
"remove"
|
|
1175
1181
|
],
|
|
1176
1182
|
setup(e, { emit: t }) {
|
|
1177
|
-
const n = e, o = t, l =
|
|
1178
|
-
let
|
|
1179
|
-
const
|
|
1180
|
-
|
|
1183
|
+
const n = e, o = t, l = _(null), i = _(null), s = _(null), a = _(""), c = _(""), r = _(!1), u = _(!1);
|
|
1184
|
+
let m = null;
|
|
1185
|
+
const d = N(() => n.modelValue ? Array.isArray(n.modelValue) ? n.modelValue : [n.modelValue] : []), f = N(() => n.multiple ? n.collapseTags ? d.value.slice(0, 1) : d.value : []), v = N(() => a.value || d.value.length > 0), A = N(() => n.multiple ? a.value ? `${a.value.length * 10 + 20}px` : "10px" : "100%"), { searchHistory: w, saveToHistory: g, clearHistory: C } = Wt(
|
|
1186
|
+
Pe(n, "historyKey")
|
|
1181
1187
|
), {
|
|
1182
|
-
searchResults:
|
|
1183
|
-
loading:
|
|
1184
|
-
isFetchingMore:
|
|
1185
|
-
isFinished:
|
|
1186
|
-
currentPage:
|
|
1187
|
-
fetchData:
|
|
1188
|
-
filterByTypes:
|
|
1189
|
-
} =
|
|
1188
|
+
searchResults: S,
|
|
1189
|
+
loading: V,
|
|
1190
|
+
isFetchingMore: D,
|
|
1191
|
+
isFinished: W,
|
|
1192
|
+
currentPage: P,
|
|
1193
|
+
fetchData: U,
|
|
1194
|
+
filterByTypes: K
|
|
1195
|
+
} = qt(a, Pe(n, "searchTypeList")), { floatingStyles: H, startTrack: ee, stopTrack: z } = Wn(
|
|
1190
1196
|
i,
|
|
1191
|
-
|
|
1192
|
-
),
|
|
1193
|
-
|
|
1197
|
+
s
|
|
1198
|
+
), M = N(() => {
|
|
1199
|
+
if (n.lang !== "")
|
|
1200
|
+
return n.lang === "en" || n.lang === "en-US";
|
|
1201
|
+
let x = "";
|
|
1194
1202
|
try {
|
|
1195
1203
|
if (typeof useCookie == "function") {
|
|
1196
|
-
const
|
|
1197
|
-
if (
|
|
1204
|
+
const E = useCookie("jc-language").value;
|
|
1205
|
+
if (E) return /en/.test(E) || /en-US/.test(E);
|
|
1198
1206
|
}
|
|
1199
1207
|
} catch {
|
|
1200
1208
|
}
|
|
1201
|
-
return process.client ?
|
|
1202
|
-
}),
|
|
1203
|
-
if (
|
|
1204
|
-
if (!
|
|
1205
|
-
const
|
|
1206
|
-
o("update:modelValue",
|
|
1209
|
+
return typeof process < "u" && process.client ? x = document.cookie || "" : typeof process < "u" && process.server && (x = useNuxtApp?.()?.ssrContext?.event.node.req.headers.cookie || ""), /jc-language=en-US/.test(x) || /jc-language=en/.test(x);
|
|
1210
|
+
}), G = N(() => n.multiple && d.value.length > 0 ? "" : r.value && !n.multiple ? c.value : n.placeholder || M.value ? "Please enter..." : "请输入..."), ae = () => l.value?.focus(), T = (x) => {
|
|
1211
|
+
if (g(x), n.multiple) {
|
|
1212
|
+
if (!d.value.some((B) => B.id === x.id)) {
|
|
1213
|
+
const B = [...d.value, x];
|
|
1214
|
+
o("update:modelValue", B);
|
|
1207
1215
|
}
|
|
1208
1216
|
a.value = "";
|
|
1209
1217
|
} else
|
|
1210
|
-
|
|
1211
|
-
o("select",
|
|
1212
|
-
},
|
|
1213
|
-
const
|
|
1214
|
-
o("update:modelValue",
|
|
1215
|
-
},
|
|
1216
|
-
n.multiple && !a.value &&
|
|
1217
|
-
|
|
1218
|
+
c.value = ke(x), r.value = !0, a.value = "", u.value = !1, o("update:modelValue", x);
|
|
1219
|
+
o("select", x);
|
|
1220
|
+
}, O = (x) => {
|
|
1221
|
+
const E = d.value.filter((B) => B.id !== x.id);
|
|
1222
|
+
o("update:modelValue", E), o("remove", x);
|
|
1223
|
+
}, R = () => {
|
|
1224
|
+
n.multiple && !a.value && d.value.length > 0 && O(
|
|
1225
|
+
d.value[d.value.length - 1]
|
|
1218
1226
|
);
|
|
1219
1227
|
}, Q = () => {
|
|
1220
|
-
a.value = "",
|
|
1221
|
-
},
|
|
1222
|
-
if (
|
|
1223
|
-
const
|
|
1224
|
-
if (
|
|
1225
|
-
|
|
1228
|
+
a.value = "", r.value = !1, c.value = "", o("update:modelValue", n.multiple ? [] : null);
|
|
1229
|
+
}, ye = async () => {
|
|
1230
|
+
if (u.value = !0, !n.multiple && r.value && S.value.length === 0) {
|
|
1231
|
+
const x = n.modelValue;
|
|
1232
|
+
if (x?.id) {
|
|
1233
|
+
V.value = !0;
|
|
1226
1234
|
try {
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1229
|
-
|
|
1235
|
+
const E = await Gt(
|
|
1236
|
+
x.id,
|
|
1237
|
+
x.type
|
|
1230
1238
|
);
|
|
1231
|
-
|
|
1239
|
+
S.value = K(E.records);
|
|
1232
1240
|
} finally {
|
|
1233
|
-
|
|
1241
|
+
V.value = !1;
|
|
1234
1242
|
}
|
|
1235
1243
|
}
|
|
1236
1244
|
}
|
|
1237
|
-
},
|
|
1238
|
-
|
|
1239
|
-
},
|
|
1240
|
-
n.multiple ? o("submit-search",
|
|
1241
|
-
},
|
|
1242
|
-
const { scrollTop:
|
|
1243
|
-
|
|
1245
|
+
}, Vt = () => setTimeout(() => u.value = !1, 200), Dt = (x) => {
|
|
1246
|
+
x.target.value === "" && !n.multiple && Q();
|
|
1247
|
+
}, Bt = () => {
|
|
1248
|
+
n.multiple ? o("submit-search", d.value) : r.value && o("submit-search", n.modelValue), u.value = !1;
|
|
1249
|
+
}, Lt = (x) => {
|
|
1250
|
+
const { scrollTop: E, scrollHeight: B, clientHeight: re } = x.target;
|
|
1251
|
+
E + re >= B - 20 && !V.value && !D.value && !W.value && a.value && U(P.value + 1, !0);
|
|
1244
1252
|
};
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
}),
|
|
1248
|
-
if (!
|
|
1249
|
-
|
|
1253
|
+
He(u, (x) => {
|
|
1254
|
+
x ? ee() : z();
|
|
1255
|
+
}), He(a, (x) => {
|
|
1256
|
+
if (!x.trim()) {
|
|
1257
|
+
S.value = [];
|
|
1250
1258
|
return;
|
|
1251
1259
|
}
|
|
1252
|
-
|
|
1260
|
+
m && clearTimeout(m), m = setTimeout(() => U(1, !1), 300);
|
|
1253
1261
|
});
|
|
1254
|
-
const
|
|
1255
|
-
City:
|
|
1256
|
-
Country:
|
|
1257
|
-
Airport:
|
|
1258
|
-
Seaport:
|
|
1259
|
-
})[
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1262
|
+
const nt = (x) => ({
|
|
1263
|
+
City: zn,
|
|
1264
|
+
Country: Yn,
|
|
1265
|
+
Airport: Kn,
|
|
1266
|
+
Seaport: qn
|
|
1267
|
+
})[x] || Gn, ke = (x) => M.value ? x.displayEn || x.display || "" : x.displayCn || x.display || "", ot = (x) => {
|
|
1268
|
+
const E = {
|
|
1269
|
+
City: {
|
|
1270
|
+
en: "City",
|
|
1271
|
+
cn: "城市"
|
|
1272
|
+
},
|
|
1273
|
+
Country: {
|
|
1274
|
+
en: "Country",
|
|
1275
|
+
cn: "国家"
|
|
1276
|
+
},
|
|
1277
|
+
Region: {
|
|
1278
|
+
en: "Region",
|
|
1279
|
+
cn: "区域"
|
|
1280
|
+
},
|
|
1281
|
+
Airport: {
|
|
1282
|
+
en: "Airport",
|
|
1283
|
+
cn: "机场"
|
|
1284
|
+
},
|
|
1285
|
+
Seaport: {
|
|
1286
|
+
en: "Seaport",
|
|
1287
|
+
cn: "港口"
|
|
1288
|
+
}
|
|
1289
|
+
};
|
|
1290
|
+
return M.value ? E[x].en : E[x].cn;
|
|
1291
|
+
}, It = (x) => d.value.some((E) => E.id === x.id);
|
|
1292
|
+
return gt(z), (x, E) => (y(), b("div", Xn, [
|
|
1293
|
+
p("div", {
|
|
1294
|
+
class: le(["search-input-wrapper", { "is-multiple": e.multiple }]),
|
|
1263
1295
|
ref_key: "referenceRef",
|
|
1264
1296
|
ref: i,
|
|
1265
|
-
onClick:
|
|
1297
|
+
onClick: ae
|
|
1266
1298
|
}, [
|
|
1267
|
-
|
|
1268
|
-
e.multiple &&
|
|
1269
|
-
(
|
|
1270
|
-
key:
|
|
1299
|
+
p("div", jn, [
|
|
1300
|
+
e.multiple && d.value.length > 0 ? (y(), b(ne, { key: 0 }, [
|
|
1301
|
+
(y(!0), b(ne, null, me(f.value, (B, re) => (y(), b("div", {
|
|
1302
|
+
key: B.id || re,
|
|
1271
1303
|
class: "search-tag"
|
|
1272
1304
|
}, [
|
|
1273
|
-
|
|
1274
|
-
|
|
1305
|
+
p("span", Zn, k(ke(B)), 1),
|
|
1306
|
+
p("span", {
|
|
1275
1307
|
class: "tag-close",
|
|
1276
|
-
onClick:
|
|
1277
|
-
}, "×", 8,
|
|
1308
|
+
onClick: te((lt) => O(B), ["stop"])
|
|
1309
|
+
}, "×", 8, eo)
|
|
1278
1310
|
]))), 128)),
|
|
1279
|
-
e.collapseTags &&
|
|
1280
|
-
], 64)) :
|
|
1281
|
-
|
|
1311
|
+
e.collapseTags && d.value.length > 1 ? (y(), b("div", to, " + " + k(d.value.length - 1), 1)) : F("", !0)
|
|
1312
|
+
], 64)) : F("", !0),
|
|
1313
|
+
Oe(p("input", {
|
|
1282
1314
|
ref_key: "inputRef",
|
|
1283
1315
|
ref: l,
|
|
1284
|
-
class:
|
|
1285
|
-
"onUpdate:modelValue":
|
|
1316
|
+
class: le({ "is-selected-state": r.value && !e.multiple }),
|
|
1317
|
+
"onUpdate:modelValue": E[0] || (E[0] = (B) => a.value = B),
|
|
1286
1318
|
type: "text",
|
|
1287
|
-
placeholder:
|
|
1288
|
-
style:
|
|
1289
|
-
onFocus:
|
|
1290
|
-
onBlur:
|
|
1291
|
-
onInput:
|
|
1292
|
-
onKeydown:
|
|
1293
|
-
}, null, 46,
|
|
1294
|
-
[
|
|
1319
|
+
placeholder: G.value,
|
|
1320
|
+
style: Re({ width: A.value }),
|
|
1321
|
+
onFocus: ye,
|
|
1322
|
+
onBlur: Vt,
|
|
1323
|
+
onInput: Dt,
|
|
1324
|
+
onKeydown: Ft(R, ["delete"])
|
|
1325
|
+
}, null, 46, no), [
|
|
1326
|
+
[qe, a.value]
|
|
1295
1327
|
])
|
|
1296
1328
|
]),
|
|
1297
|
-
|
|
1298
|
-
|
|
1329
|
+
p("div", oo, [
|
|
1330
|
+
v.value ? (y(), b("span", {
|
|
1299
1331
|
key: 0,
|
|
1300
1332
|
class: "clear-icon",
|
|
1301
|
-
onMousedown:
|
|
1333
|
+
onMousedown: E[1] || (E[1] = te(() => {
|
|
1302
1334
|
}, ["prevent"])),
|
|
1303
|
-
onClick:
|
|
1304
|
-
}, "ⓧ", 32)) :
|
|
1305
|
-
h(
|
|
1335
|
+
onClick: te(Q, ["stop"])
|
|
1336
|
+
}, "ⓧ", 32)) : F("", !0),
|
|
1337
|
+
h(V) && !h(D) ? (y(), b("div", lo)) : !h(V) && e.showSearchIcon ? (y(), b("button", {
|
|
1306
1338
|
key: 2,
|
|
1307
1339
|
class: "search-btn",
|
|
1308
|
-
onClick:
|
|
1340
|
+
onClick: te(Bt, ["stop"])
|
|
1309
1341
|
}, [
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
src: h(
|
|
1342
|
+
p("span", so, [
|
|
1343
|
+
p("img", {
|
|
1344
|
+
src: h(Je),
|
|
1313
1345
|
alt: "search"
|
|
1314
|
-
}, null, 8,
|
|
1346
|
+
}, null, 8, io)
|
|
1315
1347
|
])
|
|
1316
|
-
]))
|
|
1348
|
+
])) : F("", !0)
|
|
1317
1349
|
])
|
|
1318
1350
|
], 2),
|
|
1319
|
-
(
|
|
1320
|
-
|
|
1351
|
+
(y(), Ge(yt, { to: "body" }, [
|
|
1352
|
+
Oe(p("div", {
|
|
1321
1353
|
ref_key: "floatingRef",
|
|
1322
|
-
ref:
|
|
1354
|
+
ref: s,
|
|
1323
1355
|
class: "dropdown-list",
|
|
1324
|
-
style:
|
|
1325
|
-
onScroll:
|
|
1356
|
+
style: Re(h(H)),
|
|
1357
|
+
onScroll: Lt
|
|
1326
1358
|
}, [
|
|
1327
|
-
|
|
1328
|
-
h(
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1359
|
+
Fe(x.$slots, "history", { searchHistory: h(w) }, () => [
|
|
1360
|
+
h(w).length > 0 && !a.value ? (y(), b("div", ao, [
|
|
1361
|
+
p("div", ro, [
|
|
1362
|
+
p("span", null, k(M.value ? "Recent search" : "最近搜索"), 1),
|
|
1363
|
+
p("span", {
|
|
1332
1364
|
class: "clear-btn",
|
|
1333
|
-
onMousedown:
|
|
1365
|
+
onMousedown: E[2] || (E[2] = te(() => {
|
|
1334
1366
|
}, ["prevent"])),
|
|
1335
|
-
onClick:
|
|
1367
|
+
onClick: E[3] || (E[3] = te(
|
|
1336
1368
|
//@ts-ignore
|
|
1337
|
-
(...
|
|
1369
|
+
(...B) => h(C) && h(C)(...B),
|
|
1338
1370
|
["stop"]
|
|
1339
1371
|
))
|
|
1340
|
-
}, M
|
|
1372
|
+
}, k(M.value ? "Clear" : "清空"), 33)
|
|
1341
1373
|
]),
|
|
1342
|
-
(
|
|
1343
|
-
key: "hist-" +
|
|
1374
|
+
(y(!0), b(ne, null, me(h(w), (B, re) => (y(), b("div", {
|
|
1375
|
+
key: "hist-" + re,
|
|
1344
1376
|
class: "dropdown-item",
|
|
1345
|
-
onMousedown: (
|
|
1377
|
+
onMousedown: (lt) => T(B)
|
|
1346
1378
|
}, [
|
|
1347
|
-
|
|
1348
|
-
|
|
1379
|
+
p("div", {
|
|
1380
|
+
class: "category-tag",
|
|
1381
|
+
style: Re(e.showItemTag ? {} : { display: "none" })
|
|
1382
|
+
}, [
|
|
1383
|
+
p("img", {
|
|
1349
1384
|
class: "type-icon",
|
|
1350
|
-
src:
|
|
1385
|
+
src: nt(B.type),
|
|
1351
1386
|
alt: ""
|
|
1352
|
-
}, null, 8,
|
|
1353
|
-
|
|
1354
|
-
]),
|
|
1355
|
-
|
|
1356
|
-
], 40,
|
|
1357
|
-
|
|
1358
|
-
])) :
|
|
1387
|
+
}, null, 8, uo),
|
|
1388
|
+
p("span", fo, k(ot(B.type)), 1)
|
|
1389
|
+
], 4),
|
|
1390
|
+
p("div", mo, k(ke(B)), 1)
|
|
1391
|
+
], 40, co))), 128)),
|
|
1392
|
+
E[4] || (E[4] = p("hr", { class: "divider" }, null, -1))
|
|
1393
|
+
])) : F("", !0)
|
|
1359
1394
|
], !0),
|
|
1360
|
-
h(
|
|
1361
|
-
|
|
1362
|
-
(
|
|
1363
|
-
key:
|
|
1364
|
-
class:
|
|
1365
|
-
onMousedown: (
|
|
1395
|
+
h(V) && !h(D) ? (y(), b("div", po, k(M.value ? "Searching..." : "正在搜索中..."), 1)) : h(S).length > 0 ? (y(), b(ne, { key: 1 }, [
|
|
1396
|
+
Fe(x.$slots, "results", { searchResults: h(S) }, () => [
|
|
1397
|
+
(y(!0), b(ne, null, me(h(S), (B, re) => (y(), b("div", {
|
|
1398
|
+
key: re,
|
|
1399
|
+
class: le(["dropdown-item", { "is-active": It(B) }]),
|
|
1400
|
+
onMousedown: (lt) => T(B)
|
|
1366
1401
|
}, [
|
|
1367
|
-
|
|
1368
|
-
|
|
1402
|
+
p("div", {
|
|
1403
|
+
class: "category-tag",
|
|
1404
|
+
style: Re(e.showItemTag ? {} : { display: "none" })
|
|
1405
|
+
}, [
|
|
1406
|
+
p("img", {
|
|
1369
1407
|
class: "type-icon",
|
|
1370
|
-
src:
|
|
1408
|
+
src: nt(B.type),
|
|
1371
1409
|
alt: ""
|
|
1372
|
-
}, null, 8,
|
|
1373
|
-
|
|
1374
|
-
]),
|
|
1375
|
-
|
|
1376
|
-
], 42,
|
|
1410
|
+
}, null, 8, vo),
|
|
1411
|
+
p("span", go, k(ot(B.type)), 1)
|
|
1412
|
+
], 4),
|
|
1413
|
+
p("div", yo, k(ke(B)), 1)
|
|
1414
|
+
], 42, ho))), 128))
|
|
1377
1415
|
], !0),
|
|
1378
|
-
h(
|
|
1379
|
-
], 64)) : a.value && !h(
|
|
1380
|
-
|
|
1381
|
-
|
|
1416
|
+
h(D) ? (y(), b("div", Ao, k(M.value ? "Loading more..." : "正在加载更多..."), 1)) : h(W) && a.value ? (y(), b("div", wo, k(M.value ? "All results have been loaded" : "已加载全部结果"), 1)) : F("", !0)
|
|
1417
|
+
], 64)) : a.value && !h(V) ? (y(), b("div", xo, [
|
|
1418
|
+
Fe(x.$slots, "noData", {}, () => [
|
|
1419
|
+
Ye(k(M.value ? `No results found related to "${a.value}".` : `未找到与 "${a.value}" 相关的结果`), 1)
|
|
1382
1420
|
], !0)
|
|
1383
|
-
])) :
|
|
1421
|
+
])) : F("", !0)
|
|
1384
1422
|
], 36), [
|
|
1385
1423
|
[
|
|
1386
|
-
|
|
1387
|
-
|
|
1424
|
+
Mt,
|
|
1425
|
+
u.value && (h(S).length > 0 || h(V) || a.value || h(w).length > 0)
|
|
1388
1426
|
]
|
|
1389
1427
|
])
|
|
1390
1428
|
]))
|
|
1391
1429
|
]));
|
|
1392
1430
|
}
|
|
1393
|
-
}),
|
|
1431
|
+
}), tt = (e, t) => {
|
|
1394
1432
|
const n = e.__vccOpts || e;
|
|
1395
1433
|
for (const [o, l] of t)
|
|
1396
1434
|
n[o] = l;
|
|
1397
1435
|
return n;
|
|
1398
|
-
},
|
|
1436
|
+
}, Et = /* @__PURE__ */ tt(bo, [["__scopeId", "data-v-e158c7a1"]]), 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
|
+
key: 0,
|
|
1438
|
+
class: "error-message"
|
|
1439
|
+
}, Do = { class: "form-item" }, Bo = { class: "required" }, Lo = { class: "type-group" }, Io = ["onClick"], Fo = {
|
|
1399
1440
|
key: 0,
|
|
1400
1441
|
class: "check-mark"
|
|
1401
|
-
},
|
|
1442
|
+
}, Mo = { class: "form-item" }, No = { class: "required" }, Po = {
|
|
1443
|
+
key: 0,
|
|
1444
|
+
class: "error-message"
|
|
1445
|
+
}, Ho = { class: "modal-footer" }, Qo = {
|
|
1402
1446
|
__name: "ApplyDataDialog",
|
|
1403
1447
|
props: {
|
|
1404
|
-
|
|
1405
|
-
|
|
1448
|
+
// v-model 绑定,默认 false
|
|
1449
|
+
value: {
|
|
1450
|
+
type: Boolean,
|
|
1451
|
+
default: !1
|
|
1452
|
+
},
|
|
1453
|
+
// 语言设置,默认 'en'
|
|
1454
|
+
lang: {
|
|
1455
|
+
type: String,
|
|
1456
|
+
default: "en",
|
|
1457
|
+
// 增加校验,确保只能传入 'en' 或 'cn'
|
|
1458
|
+
validator: (e) => ["en", "cn"].includes(e)
|
|
1459
|
+
},
|
|
1460
|
+
placeholder: {
|
|
1461
|
+
type: String,
|
|
1462
|
+
default: ""
|
|
1463
|
+
}
|
|
1406
1464
|
},
|
|
1407
1465
|
emits: ["update:value", "confirm"],
|
|
1408
1466
|
setup(e, { emit: t }) {
|
|
1409
|
-
const n =
|
|
1467
|
+
const n = e, o = t, l = [
|
|
1468
|
+
{ typeCn: "城市", typeEn: "City", type: "City" },
|
|
1469
|
+
{ typeCn: "海运港口", typeEn: "Port", type: "Seaport" },
|
|
1470
|
+
{ typeCn: "机场", typeEn: "Airport", type: "Airport" }
|
|
1471
|
+
], i = _(null), s = Qe({
|
|
1410
1472
|
name: "",
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
},
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1473
|
+
country: ""
|
|
1474
|
+
}), a = Qe({
|
|
1475
|
+
name: "",
|
|
1476
|
+
type: "City"
|
|
1477
|
+
}), c = N(() => n.lang === "en" || n.lang === "en-US"), r = () => {
|
|
1478
|
+
s.name = "", s.country = "", o("update:value", !1);
|
|
1479
|
+
}, u = () => {
|
|
1480
|
+
s.name = "", s.country = "";
|
|
1481
|
+
let m = !0;
|
|
1482
|
+
a.name.trim() || (s.name = "Data name is required", m = !1), i.value || (s.country = "Please select a country", m = !1), m && o("confirm", { ...a, country: i.value });
|
|
1421
1483
|
};
|
|
1422
|
-
return (
|
|
1484
|
+
return (m, d) => e.value ? (y(), b("div", {
|
|
1423
1485
|
key: 0,
|
|
1424
1486
|
class: "modal-mask",
|
|
1425
|
-
onClick:
|
|
1487
|
+
onClick: te(r, ["self"])
|
|
1426
1488
|
}, [
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1489
|
+
p("div", Co, [
|
|
1490
|
+
p("div", So, [
|
|
1491
|
+
p("span", ko, k(c.value ? "Apply for data addition" : "申请补充数据"), 1),
|
|
1492
|
+
p("div", {
|
|
1431
1493
|
class: "close-btn",
|
|
1432
1494
|
onClick: r
|
|
1433
1495
|
}, "×")
|
|
1434
1496
|
]),
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
"onUpdate:modelValue":
|
|
1497
|
+
p("div", Ro, [
|
|
1498
|
+
p("div", _o, [
|
|
1499
|
+
p("label", Oo, k(c.value ? "Data To Add" : "需补充的数据"), 1),
|
|
1500
|
+
p("div", To, [
|
|
1501
|
+
Oe(p("input", {
|
|
1502
|
+
"onUpdate:modelValue": d[0] || (d[0] = (f) => a.name = f),
|
|
1441
1503
|
type: "text",
|
|
1442
|
-
placeholder: "Please enter
|
|
1443
|
-
class: "custom-input"
|
|
1444
|
-
|
|
1445
|
-
|
|
1504
|
+
placeholder: e.placeholder ?? (c.value ? " Please enter" : "请输入"),
|
|
1505
|
+
class: le(["custom-input", { "input-error": s.name }]),
|
|
1506
|
+
onInput: d[1] || (d[1] = (f) => s.name = "")
|
|
1507
|
+
}, null, 42, Eo), [
|
|
1508
|
+
[qe, a.name]
|
|
1446
1509
|
])
|
|
1447
|
-
])
|
|
1510
|
+
]),
|
|
1511
|
+
s.name ? (y(), b("div", Vo, k(s.name), 1)) : F("", !0)
|
|
1448
1512
|
]),
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
(
|
|
1453
|
-
key:
|
|
1454
|
-
class:
|
|
1455
|
-
onClick: (
|
|
1513
|
+
p("div", Do, [
|
|
1514
|
+
p("label", Bo, k(c.value ? "Type" : "所属类别"), 1),
|
|
1515
|
+
p("div", Lo, [
|
|
1516
|
+
(y(), b(ne, null, me(l, (f) => p("div", {
|
|
1517
|
+
key: f.type,
|
|
1518
|
+
class: le(["type-btn", { active: a.type === f.type }]),
|
|
1519
|
+
onClick: (v) => a.type = f.type
|
|
1456
1520
|
}, [
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
], 10,
|
|
1521
|
+
Ye(k(c.value ? f.typeEn : f.typeCn) + " ", 1),
|
|
1522
|
+
a.type === f.type ? (y(), b("div", Fo)) : F("", !0)
|
|
1523
|
+
], 10, Io)), 64))
|
|
1460
1524
|
])
|
|
1461
1525
|
]),
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
"search-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1526
|
+
p("div", Mo, [
|
|
1527
|
+
p("label", No, k(c.value ? "Country" : "国家"), 1),
|
|
1528
|
+
p("div", {
|
|
1529
|
+
class: le({ "search-error-wrap": s.country })
|
|
1530
|
+
}, [
|
|
1531
|
+
L(Et, {
|
|
1532
|
+
"search-type-list": ["Country"],
|
|
1533
|
+
"model-value": i.value,
|
|
1534
|
+
"onUpdate:modelValue": [
|
|
1535
|
+
d[2] || (d[2] = (f) => i.value = f),
|
|
1536
|
+
d[3] || (d[3] = (f) => s.country = "")
|
|
1537
|
+
],
|
|
1538
|
+
style: { margin: "0 auto" },
|
|
1539
|
+
lang: e.lang,
|
|
1540
|
+
placeholder: e.placeholder ?? (c.value ? " Please enter" : "请输入")
|
|
1541
|
+
}, null, 8, ["model-value", "lang", "placeholder"])
|
|
1542
|
+
], 2),
|
|
1543
|
+
s.country ? (y(), b("div", Po, k(s.country), 1)) : F("", !0)
|
|
1472
1544
|
])
|
|
1473
1545
|
]),
|
|
1474
|
-
|
|
1475
|
-
|
|
1546
|
+
p("div", Ho, [
|
|
1547
|
+
p("button", {
|
|
1476
1548
|
class: "confirm-btn",
|
|
1477
|
-
onClick:
|
|
1478
|
-
}, "
|
|
1549
|
+
onClick: u
|
|
1550
|
+
}, k(c.value ? "Submit" : "申请补充"), 1)
|
|
1479
1551
|
])
|
|
1480
1552
|
])
|
|
1481
|
-
])) :
|
|
1553
|
+
])) : F("", !0);
|
|
1482
1554
|
}
|
|
1483
|
-
},
|
|
1555
|
+
}, Uo = /* @__PURE__ */ tt(Qo, [["__scopeId", "data-v-257bbed9"]]), $o = { class: "global-modal-header-custom" }, Jo = { class: "global-modal-body-custom" }, Wo = { class: "global-modal-footer-custom" }, Ko = /* @__PURE__ */ Ke({
|
|
1484
1556
|
__name: "GlobalModal",
|
|
1485
1557
|
setup(e) {
|
|
1486
|
-
const t =
|
|
1558
|
+
const t = _(), n = _(!1), o = _({
|
|
1487
1559
|
city: "",
|
|
1488
1560
|
company: "",
|
|
1489
1561
|
email: "",
|
|
1490
1562
|
phone: "",
|
|
1491
1563
|
name: "",
|
|
1492
1564
|
agreement: !1
|
|
1493
|
-
}), l =
|
|
1565
|
+
}), l = Qe({
|
|
1494
1566
|
city: [{ required: !0, message: "请输入所在地城市", trigger: "blur" }],
|
|
1495
1567
|
company: [{ required: !0, message: "请输入公司名称", trigger: "blur" }],
|
|
1496
1568
|
email: [
|
|
@@ -1499,17 +1571,17 @@ const In = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1499
1571
|
],
|
|
1500
1572
|
agreement: [
|
|
1501
1573
|
{
|
|
1502
|
-
validator: (
|
|
1503
|
-
|
|
1574
|
+
validator: (c, r, u) => {
|
|
1575
|
+
r ? u() : u(new Error("请同意隐私政策"));
|
|
1504
1576
|
},
|
|
1505
1577
|
trigger: "change"
|
|
1506
1578
|
}
|
|
1507
1579
|
]
|
|
1508
1580
|
}), i = () => {
|
|
1509
|
-
n.value = !1,
|
|
1510
|
-
},
|
|
1511
|
-
t.value && await t.value.validate((
|
|
1512
|
-
|
|
1581
|
+
n.value = !1, ce.emit(ue.Close, void 0), t.value?.resetFields();
|
|
1582
|
+
}, s = async () => {
|
|
1583
|
+
t.value && await t.value.validate((c) => {
|
|
1584
|
+
c && (ce.emit(ue.Submit, o.value), i(), o.value = {
|
|
1513
1585
|
city: "",
|
|
1514
1586
|
company: "",
|
|
1515
1587
|
email: "",
|
|
@@ -1518,76 +1590,76 @@ const In = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1518
1590
|
agreement: !1
|
|
1519
1591
|
});
|
|
1520
1592
|
});
|
|
1521
|
-
}, a = (
|
|
1593
|
+
}, a = (c) => {
|
|
1522
1594
|
n.value = !0;
|
|
1523
1595
|
};
|
|
1524
|
-
return
|
|
1525
|
-
|
|
1526
|
-
}),
|
|
1527
|
-
|
|
1528
|
-
}), (
|
|
1596
|
+
return We(() => {
|
|
1597
|
+
ce.on(ue.Open, a);
|
|
1598
|
+
}), Nt(() => {
|
|
1599
|
+
ce.off(ue.Open, a);
|
|
1600
|
+
}), (c, r) => (y(), Ge(h(Ut), {
|
|
1529
1601
|
modelValue: n.value,
|
|
1530
|
-
"onUpdate:modelValue":
|
|
1602
|
+
"onUpdate:modelValue": r[7] || (r[7] = (u) => n.value = u),
|
|
1531
1603
|
"before-close": i,
|
|
1532
1604
|
"show-close": !1,
|
|
1533
1605
|
"close-on-click-modal": !0,
|
|
1534
1606
|
width: 500,
|
|
1535
1607
|
class: "global-modal-custom"
|
|
1536
1608
|
}, {
|
|
1537
|
-
header:
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1609
|
+
header: I(() => [
|
|
1610
|
+
p("div", $o, [
|
|
1611
|
+
r[9] || (r[9] = p("h2", null, "即刻链接全球货代", -1)),
|
|
1612
|
+
L(h(it), {
|
|
1541
1613
|
link: "",
|
|
1542
1614
|
onClick: i,
|
|
1543
1615
|
class: "close-button-custom",
|
|
1544
1616
|
"aria-label": "Close"
|
|
1545
1617
|
}, {
|
|
1546
|
-
default:
|
|
1547
|
-
|
|
1618
|
+
default: I(() => [...r[8] || (r[8] = [
|
|
1619
|
+
p("span", { style: { "font-size": "2rem" } }, "×", -1)
|
|
1548
1620
|
])]),
|
|
1549
1621
|
_: 1
|
|
1550
1622
|
})
|
|
1551
1623
|
])
|
|
1552
1624
|
]),
|
|
1553
|
-
footer:
|
|
1554
|
-
|
|
1555
|
-
|
|
1625
|
+
footer: I(() => [
|
|
1626
|
+
p("div", Wo, [
|
|
1627
|
+
L(h(it), {
|
|
1556
1628
|
type: "primary",
|
|
1557
1629
|
class: "submit-button-custom",
|
|
1558
|
-
onClick:
|
|
1630
|
+
onClick: s
|
|
1559
1631
|
}, {
|
|
1560
|
-
default:
|
|
1561
|
-
|
|
1632
|
+
default: I(() => [...r[11] || (r[11] = [
|
|
1633
|
+
Ye(" 加入会员 ", -1)
|
|
1562
1634
|
])]),
|
|
1563
1635
|
_: 1
|
|
1564
1636
|
})
|
|
1565
1637
|
])
|
|
1566
1638
|
]),
|
|
1567
|
-
default:
|
|
1568
|
-
|
|
1569
|
-
|
|
1639
|
+
default: I(() => [
|
|
1640
|
+
p("div", Jo, [
|
|
1641
|
+
L(h($t), {
|
|
1570
1642
|
model: o.value,
|
|
1571
1643
|
rules: l,
|
|
1572
1644
|
ref_key: "formRef",
|
|
1573
1645
|
ref: t,
|
|
1574
1646
|
"label-position": "top",
|
|
1575
|
-
onSubmit:
|
|
1647
|
+
onSubmit: r[6] || (r[6] = te(() => {
|
|
1576
1648
|
}, ["prevent"]))
|
|
1577
1649
|
}, {
|
|
1578
|
-
default:
|
|
1579
|
-
|
|
1580
|
-
default:
|
|
1581
|
-
|
|
1582
|
-
default:
|
|
1583
|
-
|
|
1650
|
+
default: I(() => [
|
|
1651
|
+
L(h(Me), { gutter: 20 }, {
|
|
1652
|
+
default: I(() => [
|
|
1653
|
+
L(h(Ae), { span: 12 }, {
|
|
1654
|
+
default: I(() => [
|
|
1655
|
+
L(h(fe), {
|
|
1584
1656
|
label: "所在地(城市)",
|
|
1585
1657
|
prop: "city"
|
|
1586
1658
|
}, {
|
|
1587
|
-
default:
|
|
1588
|
-
|
|
1659
|
+
default: I(() => [
|
|
1660
|
+
L(h(we), {
|
|
1589
1661
|
modelValue: o.value.city,
|
|
1590
|
-
"onUpdate:modelValue":
|
|
1662
|
+
"onUpdate:modelValue": r[0] || (r[0] = (u) => o.value.city = u),
|
|
1591
1663
|
placeholder: "请输入城市"
|
|
1592
1664
|
}, null, 8, ["modelValue"])
|
|
1593
1665
|
]),
|
|
@@ -1596,16 +1668,16 @@ const In = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1596
1668
|
]),
|
|
1597
1669
|
_: 1
|
|
1598
1670
|
}),
|
|
1599
|
-
|
|
1600
|
-
default:
|
|
1601
|
-
|
|
1671
|
+
L(h(Ae), { span: 12 }, {
|
|
1672
|
+
default: I(() => [
|
|
1673
|
+
L(h(fe), {
|
|
1602
1674
|
label: "公司名称",
|
|
1603
1675
|
prop: "company"
|
|
1604
1676
|
}, {
|
|
1605
|
-
default:
|
|
1606
|
-
|
|
1677
|
+
default: I(() => [
|
|
1678
|
+
L(h(we), {
|
|
1607
1679
|
modelValue: o.value.company,
|
|
1608
|
-
"onUpdate:modelValue":
|
|
1680
|
+
"onUpdate:modelValue": r[1] || (r[1] = (u) => o.value.company = u),
|
|
1609
1681
|
placeholder: "请输入公司名称"
|
|
1610
1682
|
}, null, 8, ["modelValue"])
|
|
1611
1683
|
]),
|
|
@@ -1617,18 +1689,18 @@ const In = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1617
1689
|
]),
|
|
1618
1690
|
_: 1
|
|
1619
1691
|
}),
|
|
1620
|
-
|
|
1621
|
-
default:
|
|
1622
|
-
|
|
1623
|
-
default:
|
|
1624
|
-
|
|
1692
|
+
L(h(Me), { gutter: 20 }, {
|
|
1693
|
+
default: I(() => [
|
|
1694
|
+
L(h(Ae), { span: 12 }, {
|
|
1695
|
+
default: I(() => [
|
|
1696
|
+
L(h(fe), {
|
|
1625
1697
|
label: "邮箱",
|
|
1626
1698
|
prop: "email"
|
|
1627
1699
|
}, {
|
|
1628
|
-
default:
|
|
1629
|
-
|
|
1700
|
+
default: I(() => [
|
|
1701
|
+
L(h(we), {
|
|
1630
1702
|
modelValue: o.value.email,
|
|
1631
|
-
"onUpdate:modelValue":
|
|
1703
|
+
"onUpdate:modelValue": r[2] || (r[2] = (u) => o.value.email = u),
|
|
1632
1704
|
placeholder: "请输入邮箱"
|
|
1633
1705
|
}, null, 8, ["modelValue"])
|
|
1634
1706
|
]),
|
|
@@ -1637,16 +1709,16 @@ const In = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1637
1709
|
]),
|
|
1638
1710
|
_: 1
|
|
1639
1711
|
}),
|
|
1640
|
-
|
|
1641
|
-
default:
|
|
1642
|
-
|
|
1712
|
+
L(h(Ae), { span: 12 }, {
|
|
1713
|
+
default: I(() => [
|
|
1714
|
+
L(h(fe), {
|
|
1643
1715
|
label: "电话",
|
|
1644
1716
|
prop: "phone"
|
|
1645
1717
|
}, {
|
|
1646
|
-
default:
|
|
1647
|
-
|
|
1718
|
+
default: I(() => [
|
|
1719
|
+
L(h(we), {
|
|
1648
1720
|
modelValue: o.value.phone,
|
|
1649
|
-
"onUpdate:modelValue":
|
|
1721
|
+
"onUpdate:modelValue": r[3] || (r[3] = (u) => o.value.phone = u),
|
|
1650
1722
|
placeholder: "请输入电话"
|
|
1651
1723
|
}, null, 8, ["modelValue"])
|
|
1652
1724
|
]),
|
|
@@ -1658,18 +1730,18 @@ const In = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1658
1730
|
]),
|
|
1659
1731
|
_: 1
|
|
1660
1732
|
}),
|
|
1661
|
-
|
|
1662
|
-
default:
|
|
1663
|
-
|
|
1664
|
-
default:
|
|
1665
|
-
|
|
1733
|
+
L(h(Me), null, {
|
|
1734
|
+
default: I(() => [
|
|
1735
|
+
L(h(Ae), { span: 24 }, {
|
|
1736
|
+
default: I(() => [
|
|
1737
|
+
L(h(fe), {
|
|
1666
1738
|
label: "姓名",
|
|
1667
1739
|
prop: "name"
|
|
1668
1740
|
}, {
|
|
1669
|
-
default:
|
|
1670
|
-
|
|
1741
|
+
default: I(() => [
|
|
1742
|
+
L(h(we), {
|
|
1671
1743
|
modelValue: o.value.name,
|
|
1672
|
-
"onUpdate:modelValue":
|
|
1744
|
+
"onUpdate:modelValue": r[4] || (r[4] = (u) => o.value.name = u),
|
|
1673
1745
|
placeholder: "请输入您的全名"
|
|
1674
1746
|
}, null, 8, ["modelValue"])
|
|
1675
1747
|
]),
|
|
@@ -1681,17 +1753,17 @@ const In = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1681
1753
|
]),
|
|
1682
1754
|
_: 1
|
|
1683
1755
|
}),
|
|
1684
|
-
|
|
1756
|
+
L(h(fe), {
|
|
1685
1757
|
prop: "agreement",
|
|
1686
1758
|
class: "agreement-item"
|
|
1687
1759
|
}, {
|
|
1688
|
-
default:
|
|
1689
|
-
|
|
1760
|
+
default: I(() => [
|
|
1761
|
+
L(h(Jt), {
|
|
1690
1762
|
modelValue: o.value.agreement,
|
|
1691
|
-
"onUpdate:modelValue":
|
|
1763
|
+
"onUpdate:modelValue": r[5] || (r[5] = (u) => o.value.agreement = u),
|
|
1692
1764
|
label: "我同意"
|
|
1693
1765
|
}, null, 8, ["modelValue"]),
|
|
1694
|
-
|
|
1766
|
+
r[10] || (r[10] = p("a", {
|
|
1695
1767
|
href: "#",
|
|
1696
1768
|
class: "privacy-link"
|
|
1697
1769
|
}, "隐私政策", -1))
|
|
@@ -1707,44 +1779,344 @@ const In = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1707
1779
|
}, 8, ["modelValue"]));
|
|
1708
1780
|
}
|
|
1709
1781
|
});
|
|
1710
|
-
|
|
1782
|
+
function Go(e) {
|
|
1783
|
+
const t = _([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", l = N(
|
|
1784
|
+
() => (e.value || "") + n
|
|
1785
|
+
), i = N(
|
|
1786
|
+
() => !!e.value && e.value !== ""
|
|
1787
|
+
), s = (c) => {
|
|
1788
|
+
if (!c || !o) return;
|
|
1789
|
+
const r = t.value.filter(
|
|
1790
|
+
(m) => m.id && m.id !== c.id || m.display !== c.display
|
|
1791
|
+
);
|
|
1792
|
+
r.unshift(c);
|
|
1793
|
+
const u = r.slice(0, 4);
|
|
1794
|
+
if (i.value) {
|
|
1795
|
+
t.value = u;
|
|
1796
|
+
try {
|
|
1797
|
+
localStorage.setItem(l.value, JSON.stringify(u));
|
|
1798
|
+
} catch (m) {
|
|
1799
|
+
console.warn("LocalStorage save failed:", m);
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
}, a = () => {
|
|
1803
|
+
t.value = [], o && localStorage.removeItem(l.value);
|
|
1804
|
+
};
|
|
1805
|
+
return We(() => {
|
|
1806
|
+
if (o && i.value) {
|
|
1807
|
+
const c = localStorage.getItem(l.value);
|
|
1808
|
+
if (c)
|
|
1809
|
+
try {
|
|
1810
|
+
t.value = JSON.parse(c);
|
|
1811
|
+
} catch {
|
|
1812
|
+
t.value = [];
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
}), {
|
|
1816
|
+
searchHistory: t,
|
|
1817
|
+
saveToHistory: s,
|
|
1818
|
+
clearHistory: a,
|
|
1819
|
+
HasHistory: i
|
|
1820
|
+
};
|
|
1821
|
+
}
|
|
1822
|
+
async function qo(e, t = [
|
|
1823
|
+
"Continent",
|
|
1824
|
+
"Country",
|
|
1825
|
+
"City",
|
|
1826
|
+
"Seaport",
|
|
1827
|
+
"Airport"
|
|
1828
|
+
], n = {}) {
|
|
1829
|
+
return ze.searchByName({
|
|
1830
|
+
keyword: e,
|
|
1831
|
+
displayInfo: t,
|
|
1832
|
+
...n
|
|
1833
|
+
});
|
|
1834
|
+
}
|
|
1835
|
+
function Yo(e, t) {
|
|
1836
|
+
const n = _([]), o = _(!1), l = _(!1), i = _(!1), s = _(1), a = 10, c = _(0), r = N(() => {
|
|
1837
|
+
const d = [...t.value];
|
|
1838
|
+
return d.includes("Country") && !d.includes("Region") && d.push("Region"), d;
|
|
1839
|
+
}), u = (d) => Array.isArray(d) ? d.filter(
|
|
1840
|
+
(f) => r.value.includes(f.type)
|
|
1841
|
+
) : [];
|
|
1842
|
+
return {
|
|
1843
|
+
searchResults: n,
|
|
1844
|
+
loading: o,
|
|
1845
|
+
isFetchingMore: l,
|
|
1846
|
+
isFinished: i,
|
|
1847
|
+
fetchData: async (d = !1) => {
|
|
1848
|
+
const f = e.value.trim();
|
|
1849
|
+
if (!f) {
|
|
1850
|
+
n.value = [], c.value = 0, i.value = !1;
|
|
1851
|
+
return;
|
|
1852
|
+
}
|
|
1853
|
+
if (d) {
|
|
1854
|
+
if (l.value || i.value) return;
|
|
1855
|
+
l.value = !0, s.value += 1;
|
|
1856
|
+
} else {
|
|
1857
|
+
if (o.value) return;
|
|
1858
|
+
o.value = !0, s.value = 1, i.value = !1;
|
|
1859
|
+
}
|
|
1860
|
+
try {
|
|
1861
|
+
const v = await qo(
|
|
1862
|
+
f,
|
|
1863
|
+
t.value,
|
|
1864
|
+
{
|
|
1865
|
+
current: s.value,
|
|
1866
|
+
size: a
|
|
1867
|
+
}
|
|
1868
|
+
), A = u(v.records || []);
|
|
1869
|
+
d ? n.value.push(...A) : n.value = A, c.value = v.total || 0, (n.value.length >= c.value || A.length < a) && (i.value = !0);
|
|
1870
|
+
} catch (v) {
|
|
1871
|
+
console.error("Search request failed:", v), d && (s.value -= 1);
|
|
1872
|
+
} finally {
|
|
1873
|
+
o.value = !1, l.value = !1;
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
};
|
|
1877
|
+
}
|
|
1878
|
+
const zo = { class: "h5-search-container" }, Xo = { class: "trigger-content" }, jo = ["src"], Zo = { class: "placeholder-text" }, el = {
|
|
1879
|
+
key: 0,
|
|
1880
|
+
class: "selected-count"
|
|
1881
|
+
}, tl = {
|
|
1882
|
+
key: 1,
|
|
1883
|
+
class: "selected-val"
|
|
1884
|
+
}, nl = {
|
|
1885
|
+
key: 2,
|
|
1886
|
+
class: "placeholder-gray"
|
|
1887
|
+
}, ol = {
|
|
1888
|
+
key: 0,
|
|
1889
|
+
class: "h5-modal-root"
|
|
1890
|
+
}, ll = { class: "h5-drawer-card" }, sl = { class: "h5-header" }, il = { class: "h5-input-wrapper" }, al = ["src"], rl = ["placeholder"], cl = {
|
|
1891
|
+
key: 0,
|
|
1892
|
+
class: "h5-spinner-box"
|
|
1893
|
+
}, ul = {
|
|
1894
|
+
key: 1,
|
|
1895
|
+
class: "h5-section"
|
|
1896
|
+
}, dl = { class: "h5-section-hd" }, fl = { class: "h5-history-grid" }, ml = ["onClick"], pl = {
|
|
1897
|
+
key: 2,
|
|
1898
|
+
class: "h5-result-list"
|
|
1899
|
+
}, hl = ["onClick"], vl = { class: "item-info" }, gl = { class: "item-name" }, yl = {
|
|
1900
|
+
key: 0,
|
|
1901
|
+
class: "item-sub"
|
|
1902
|
+
}, Al = { class: "h5-load-status" }, wl = {
|
|
1903
|
+
key: 1,
|
|
1904
|
+
class: "no-more"
|
|
1905
|
+
}, xl = {
|
|
1906
|
+
key: 3,
|
|
1907
|
+
class: "h5-empty"
|
|
1908
|
+
}, bl = /* @__PURE__ */ Ke({
|
|
1909
|
+
__name: "index",
|
|
1910
|
+
props: {
|
|
1911
|
+
modelValue: {},
|
|
1912
|
+
multiple: { type: Boolean, default: !1 },
|
|
1913
|
+
lang: { default: "zh-CN" },
|
|
1914
|
+
placeholder: {},
|
|
1915
|
+
historyKey: {}
|
|
1916
|
+
},
|
|
1917
|
+
emits: ["update:modelValue", "select"],
|
|
1918
|
+
setup(e, { emit: t }) {
|
|
1919
|
+
const n = e, o = t, l = _(!1), i = _(""), s = _(null), a = _(null);
|
|
1920
|
+
let c = null;
|
|
1921
|
+
const { searchHistory: r, saveToHistory: u, clearHistory: m } = Go(
|
|
1922
|
+
Pe(n, "historyKey")
|
|
1923
|
+
), { searchResults: d, loading: f, isFetchingMore: v, isFinished: A, fetchData: w } = Yo(i, _(["City", "Seaport", "Airport"])), g = N(() => n.lang.includes("en")), C = N(
|
|
1924
|
+
() => Array.isArray(n.modelValue) ? n.modelValue : n.modelValue ? [n.modelValue] : []
|
|
1925
|
+
), S = N(() => !n.multiple && !!n.modelValue), V = N(
|
|
1926
|
+
() => S.value ? M(n.modelValue) : ""
|
|
1927
|
+
), D = N(() => C.value.length > 0), W = () => {
|
|
1928
|
+
l.value = !0, Pt(() => {
|
|
1929
|
+
s.value?.focus();
|
|
1930
|
+
});
|
|
1931
|
+
}, P = () => {
|
|
1932
|
+
l.value = !1, i.value = "";
|
|
1933
|
+
}, U = (T) => {
|
|
1934
|
+
u(T), n.multiple ? C.value.some((R) => R.id === T.id) || o("update:modelValue", [...C.value, T]) : (o("update:modelValue", T), P()), o("select", T);
|
|
1935
|
+
}, K = () => {
|
|
1936
|
+
o("update:modelValue", n.multiple ? [] : null);
|
|
1937
|
+
}, H = _(!1), ee = (T) => {
|
|
1938
|
+
const O = T.target;
|
|
1939
|
+
if (!O) return;
|
|
1940
|
+
O.scrollTop + O.clientHeight >= O.scrollHeight - 80 && i.value && !f.value && !v.value && !A.value && !H.value && (H.value = !0, w(!0));
|
|
1941
|
+
};
|
|
1942
|
+
He(v, (T) => {
|
|
1943
|
+
T || (H.value = !1);
|
|
1944
|
+
});
|
|
1945
|
+
const z = () => {
|
|
1946
|
+
c && clearTimeout(c), c = setTimeout(() => {
|
|
1947
|
+
H.value = !1, a.value?.scrollTo({ top: 0 }), console.log("🍉 ~ index.vue:279 ~ onInput ~ fetchData:", w), w(!1);
|
|
1948
|
+
}, 300);
|
|
1949
|
+
}, M = (T) => g.value ? T.displayEn || T.display : T.displayCn || T.display, G = (T) => {
|
|
1950
|
+
const O = { City: "城市", Seaport: "港口", Airport: "机场" };
|
|
1951
|
+
return g.value ? T : O[T] || T;
|
|
1952
|
+
}, ae = (T) => C.value.some((O) => O.id === T.id);
|
|
1953
|
+
return (T, O) => (y(), b("div", zo, [
|
|
1954
|
+
p("div", {
|
|
1955
|
+
class: "search-trigger",
|
|
1956
|
+
onClick: W
|
|
1957
|
+
}, [
|
|
1958
|
+
p("div", Xo, [
|
|
1959
|
+
p("img", {
|
|
1960
|
+
src: h(Je),
|
|
1961
|
+
class: "search-icon-m"
|
|
1962
|
+
}, null, 8, jo),
|
|
1963
|
+
p("div", Zo, [
|
|
1964
|
+
e.multiple && C.value.length > 0 ? (y(), b("span", el, k(g.value ? "Selected" : "已选") + " (" + k(C.value.length) + ")", 1)) : !e.multiple && S.value ? (y(), b("span", tl, k(V.value), 1)) : (y(), b("span", nl, k(e.placeholder || (g.value ? "Search" : "搜索")), 1))
|
|
1965
|
+
])
|
|
1966
|
+
]),
|
|
1967
|
+
D.value ? (y(), b("span", {
|
|
1968
|
+
key: 0,
|
|
1969
|
+
class: "clear-trigger",
|
|
1970
|
+
onClick: te(K, ["stop"])
|
|
1971
|
+
}, "ⓧ")) : F("", !0)
|
|
1972
|
+
]),
|
|
1973
|
+
(y(), Ge(yt, { to: "body" }, [
|
|
1974
|
+
l.value ? (y(), b("div", ol, [
|
|
1975
|
+
L(st, { name: "fade" }, {
|
|
1976
|
+
default: I(() => [
|
|
1977
|
+
p("div", {
|
|
1978
|
+
class: "h5-mask",
|
|
1979
|
+
onClick: P
|
|
1980
|
+
})
|
|
1981
|
+
]),
|
|
1982
|
+
_: 1
|
|
1983
|
+
}),
|
|
1984
|
+
L(st, { name: "slide-up" }, {
|
|
1985
|
+
default: I(() => [
|
|
1986
|
+
p("div", ll, [
|
|
1987
|
+
p("div", {
|
|
1988
|
+
class: "drawer-handle",
|
|
1989
|
+
onClick: P
|
|
1990
|
+
}),
|
|
1991
|
+
p("div", sl, [
|
|
1992
|
+
p("div", il, [
|
|
1993
|
+
p("img", {
|
|
1994
|
+
src: h(Je),
|
|
1995
|
+
class: "inner-icon"
|
|
1996
|
+
}, null, 8, al),
|
|
1997
|
+
Oe(p("input", {
|
|
1998
|
+
ref_key: "inputRef",
|
|
1999
|
+
ref: s,
|
|
2000
|
+
"onUpdate:modelValue": O[0] || (O[0] = (R) => i.value = R),
|
|
2001
|
+
placeholder: g.value ? "City/Port/Airport" : "搜索城市/港口/机场",
|
|
2002
|
+
onInput: z
|
|
2003
|
+
}, null, 40, rl), [
|
|
2004
|
+
[qe, i.value]
|
|
2005
|
+
]),
|
|
2006
|
+
i.value ? (y(), b("div", {
|
|
2007
|
+
key: 0,
|
|
2008
|
+
class: "h5-clear-btn",
|
|
2009
|
+
onClick: O[1] || (O[1] = (R) => i.value = "")
|
|
2010
|
+
}, " ✕ ")) : F("", !0)
|
|
2011
|
+
]),
|
|
2012
|
+
p("div", {
|
|
2013
|
+
class: "h5-cancel-btn",
|
|
2014
|
+
onClick: P
|
|
2015
|
+
}, k(g.value ? "Cancel" : "取消"), 1)
|
|
2016
|
+
]),
|
|
2017
|
+
p("div", {
|
|
2018
|
+
class: "h5-main-content",
|
|
2019
|
+
ref_key: "scrollContainer",
|
|
2020
|
+
ref: a,
|
|
2021
|
+
onScroll: ee
|
|
2022
|
+
}, [
|
|
2023
|
+
h(f) && !h(v) ? (y(), b("div", cl, [...O[3] || (O[3] = [
|
|
2024
|
+
p("div", { class: "h5-spinner" }, null, -1)
|
|
2025
|
+
])])) : F("", !0),
|
|
2026
|
+
!i.value && h(r).length > 0 ? (y(), b("div", ul, [
|
|
2027
|
+
p("div", dl, [
|
|
2028
|
+
p("span", null, k(g.value ? "Recent" : "最近搜索"), 1),
|
|
2029
|
+
p("span", {
|
|
2030
|
+
class: "h5-clear-history",
|
|
2031
|
+
onClick: O[2] || (O[2] = //@ts-ignore
|
|
2032
|
+
(...R) => h(m) && h(m)(...R))
|
|
2033
|
+
}, k(g.value ? "Clear" : "清空"), 1)
|
|
2034
|
+
]),
|
|
2035
|
+
p("div", fl, [
|
|
2036
|
+
(y(!0), b(ne, null, me(h(r), (R, Q) => (y(), b("div", {
|
|
2037
|
+
key: Q,
|
|
2038
|
+
class: "h5-history-tag",
|
|
2039
|
+
onClick: (ye) => U(R)
|
|
2040
|
+
}, k(M(R)), 9, ml))), 128))
|
|
2041
|
+
])
|
|
2042
|
+
])) : F("", !0),
|
|
2043
|
+
h(d).length > 0 ? (y(), b("div", pl, [
|
|
2044
|
+
(y(!0), b(ne, null, me(h(d), (R, Q) => (y(), b("div", {
|
|
2045
|
+
key: Q,
|
|
2046
|
+
class: le(["h5-result-item", { "is-active": ae(R) }]),
|
|
2047
|
+
onClick: (ye) => U(R)
|
|
2048
|
+
}, [
|
|
2049
|
+
p("div", {
|
|
2050
|
+
class: le(["item-type", R.type.toLowerCase()])
|
|
2051
|
+
}, k(G(R.type)), 3),
|
|
2052
|
+
p("div", vl, [
|
|
2053
|
+
p("div", gl, k(M(R)), 1),
|
|
2054
|
+
R.parentName ? (y(), b("div", yl, k(R.parentName), 1)) : F("", !0)
|
|
2055
|
+
])
|
|
2056
|
+
], 10, hl))), 128)),
|
|
2057
|
+
p("div", Al, [
|
|
2058
|
+
h(v) ? (y(), b(ne, { key: 0 }, [
|
|
2059
|
+
O[4] || (O[4] = p("div", { class: "mini-spinner" }, null, -1)),
|
|
2060
|
+
p("span", null, k(g.value ? "Loading..." : "加载中..."), 1)
|
|
2061
|
+
], 64)) : h(A) && i.value ? (y(), b("span", wl, k(g.value ? "No more results" : "没有更多结果了"), 1)) : F("", !0)
|
|
2062
|
+
])
|
|
2063
|
+
])) : F("", !0),
|
|
2064
|
+
i.value && !h(f) && h(d).length === 0 ? (y(), b("div", xl, k(g.value ? "No Results Found" : "未找到相关结果"), 1)) : F("", !0)
|
|
2065
|
+
], 544)
|
|
2066
|
+
])
|
|
2067
|
+
]),
|
|
2068
|
+
_: 1
|
|
2069
|
+
})
|
|
2070
|
+
])) : F("", !0)
|
|
2071
|
+
]))
|
|
2072
|
+
]));
|
|
2073
|
+
}
|
|
2074
|
+
}), Cl = /* @__PURE__ */ tt(bl, [["__scopeId", "data-v-95bd2748"]]);
|
|
2075
|
+
let Sl = {
|
|
1711
2076
|
open() {
|
|
1712
|
-
|
|
2077
|
+
ce.emit(ue.Open);
|
|
1713
2078
|
},
|
|
1714
2079
|
close() {
|
|
1715
|
-
|
|
2080
|
+
ce.emit(ue.Close);
|
|
1716
2081
|
},
|
|
1717
2082
|
onSubmit(e) {
|
|
1718
|
-
|
|
2083
|
+
ce.on(ue.Submit, e);
|
|
1719
2084
|
}
|
|
1720
2085
|
};
|
|
1721
|
-
function
|
|
2086
|
+
function Ol() {
|
|
1722
2087
|
let e = !1;
|
|
1723
2088
|
return {
|
|
1724
2089
|
install(t) {
|
|
1725
2090
|
if (typeof window < "u" && !e) {
|
|
1726
2091
|
const n = document.createElement("div");
|
|
1727
|
-
n.setAttribute("id", "global-modal-root"), document.body.appendChild(n),
|
|
2092
|
+
n.setAttribute("id", "global-modal-root"), document.body.appendChild(n), Ht(Ko).mount(n), e = !0;
|
|
1728
2093
|
}
|
|
1729
|
-
t.config.globalProperties.$globalModal =
|
|
2094
|
+
t.config.globalProperties.$globalModal = Sl;
|
|
1730
2095
|
}
|
|
1731
2096
|
};
|
|
1732
2097
|
}
|
|
1733
|
-
const
|
|
1734
|
-
ApplyDataDialog:
|
|
1735
|
-
JcSearch:
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
2098
|
+
const ht = {
|
|
2099
|
+
ApplyDataDialog: Uo,
|
|
2100
|
+
JcSearch: Et,
|
|
2101
|
+
JCMSearch: Cl
|
|
2102
|
+
};
|
|
2103
|
+
let vt = !1;
|
|
2104
|
+
const Tl = {
|
|
2105
|
+
install(e, t) {
|
|
2106
|
+
if (!vt) {
|
|
2107
|
+
vt = !0, t?.sharedConfig && Qt(t.sharedConfig);
|
|
2108
|
+
for (const n in ht)
|
|
2109
|
+
e.component(n, ht[n]);
|
|
2110
|
+
}
|
|
1740
2111
|
}
|
|
1741
2112
|
};
|
|
1742
2113
|
export {
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
2114
|
+
Uo as ApplyDataDialog,
|
|
2115
|
+
Ko as GlobalModal,
|
|
2116
|
+
Cl as JCMSearch,
|
|
2117
|
+
Et as JcSearch,
|
|
2118
|
+
Dl as MODAL_ACTION,
|
|
2119
|
+
Ol as createGlobalModalPlugin,
|
|
2120
|
+
Tl as default,
|
|
2121
|
+
Bl as emitter
|
|
1750
2122
|
};
|