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