@jctrans-materials/comps-vue2 1.0.7 → 1.0.8
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/index.d.ts +14 -4
- package/dist/index.cjs.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.esm.js +570 -549
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { locationSearchV2 as
|
|
3
|
-
import { MODAL_ACTION as
|
|
4
|
-
import { Col as
|
|
5
|
-
|
|
6
|
-
function
|
|
1
|
+
import ue, { ref as S, computed as X, onMounted as fe, onBeforeUnmount as jt, defineComponent as de, toRef as kt, watch as yt, reactive as _t } from "vue";
|
|
2
|
+
import { locationSearchV2 as $t, reportNewTypeDataApi as pe, emitter as Y, MODAL_ACTION as j, initSharedConfig as me } from "@jctrans-materials/shared";
|
|
3
|
+
import { MODAL_ACTION as Wn, emitter as Jn } from "@jctrans-materials/shared";
|
|
4
|
+
import { Col as Tt, Row as It, Checkbox as Ft, Button as Lt, Input as Bt, FormItem as Mt, Form as Pt, Dialog as Nt } from "jctrans-ui";
|
|
5
|
+
ue.util.warn;
|
|
6
|
+
function he(e) {
|
|
7
7
|
const t = S([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", s = X(
|
|
8
8
|
() => (e.value || "") + n
|
|
9
9
|
), i = X(
|
|
10
10
|
() => !!e.value && e.value !== ""
|
|
11
|
-
),
|
|
11
|
+
), a = (l) => {
|
|
12
12
|
if (!l || !o) return;
|
|
13
13
|
const u = t.value.filter(
|
|
14
14
|
(f) => f.id && f.id !== l.id || f.display !== l.display
|
|
@@ -23,10 +23,10 @@ function de(e) {
|
|
|
23
23
|
console.warn("LocalStorage save failed:", f);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
},
|
|
26
|
+
}, r = () => {
|
|
27
27
|
t.value = [], o && localStorage.removeItem(s.value);
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return fe(() => {
|
|
30
30
|
if (o && i.value) {
|
|
31
31
|
const l = localStorage.getItem(s.value);
|
|
32
32
|
if (l)
|
|
@@ -38,30 +38,30 @@ function de(e) {
|
|
|
38
38
|
}
|
|
39
39
|
}), {
|
|
40
40
|
searchHistory: t,
|
|
41
|
-
saveToHistory:
|
|
42
|
-
clearHistory:
|
|
41
|
+
saveToHistory: a,
|
|
42
|
+
clearHistory: r,
|
|
43
43
|
HasHistory: i
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
async function
|
|
46
|
+
async function ge(e, t = [
|
|
47
47
|
"Continent",
|
|
48
48
|
"Country",
|
|
49
49
|
"City",
|
|
50
50
|
"Seaport",
|
|
51
51
|
"Airport"
|
|
52
52
|
], n = {}) {
|
|
53
|
-
return
|
|
53
|
+
return $t.searchByName({
|
|
54
54
|
keyword: e,
|
|
55
55
|
displayInfo: t,
|
|
56
56
|
...n
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
const
|
|
60
|
-
function
|
|
61
|
-
const n = S([]), o = S(!1), s = S(!1), i = S(1),
|
|
62
|
-
const
|
|
63
|
-
return
|
|
64
|
-
}), c = (
|
|
59
|
+
const vt = (e, t) => $t.searchByIdWithType(e, t);
|
|
60
|
+
function ye(e, t) {
|
|
61
|
+
const n = S([]), o = S(!1), s = S(!1), i = S(1), a = S(0), r = S(10), l = X(() => a.value === 0 ? !1 : n.value.length >= a.value), u = X(() => {
|
|
62
|
+
const p = [...t.value];
|
|
63
|
+
return p.includes("Country") && !p.includes("Region") && p.push("Region"), p;
|
|
64
|
+
}), c = (p) => !p || !Array.isArray(p) ? [] : p.filter(
|
|
65
65
|
(d) => u.value.includes(d.type)
|
|
66
66
|
);
|
|
67
67
|
return {
|
|
@@ -70,27 +70,27 @@ function pe(e, t) {
|
|
|
70
70
|
isFetchingMore: s,
|
|
71
71
|
isFinished: l,
|
|
72
72
|
currentPage: i,
|
|
73
|
-
total:
|
|
74
|
-
fetchData: async (
|
|
73
|
+
total: a,
|
|
74
|
+
fetchData: async (p = 1, d = !1) => {
|
|
75
75
|
if (!e.value.trim() && !d) {
|
|
76
|
-
n.value = [],
|
|
76
|
+
n.value = [], a.value = 0;
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
if (!(d && (s.value || l.value)) && !(!d && o.value)) {
|
|
80
80
|
d ? s.value = !0 : (o.value = !0, i.value = 1);
|
|
81
81
|
try {
|
|
82
|
-
const
|
|
82
|
+
const m = await ge(
|
|
83
83
|
e.value,
|
|
84
84
|
t.value,
|
|
85
85
|
{
|
|
86
|
-
current:
|
|
86
|
+
current: p,
|
|
87
87
|
// 使用传入的 page 参数
|
|
88
|
-
size:
|
|
88
|
+
size: r.value
|
|
89
89
|
}
|
|
90
|
-
), h =
|
|
91
|
-
d ? n.value = [...n.value, ...y] : n.value = y,
|
|
92
|
-
} catch (
|
|
93
|
-
console.error("Failed to fetch search results:",
|
|
90
|
+
), h = m.records || [], y = c(h);
|
|
91
|
+
d ? n.value = [...n.value, ...y] : n.value = y, a.value = m.total || 0, i.value = p;
|
|
92
|
+
} catch (m) {
|
|
93
|
+
console.error("Failed to fetch search results:", m);
|
|
94
94
|
} finally {
|
|
95
95
|
o.value = !1, s.value = !1;
|
|
96
96
|
}
|
|
@@ -99,19 +99,19 @@ function pe(e, t) {
|
|
|
99
99
|
filterByTypes: c
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
const Z = Math.min, O = Math.max,
|
|
102
|
+
const Z = Math.min, O = Math.max, ct = Math.round, lt = Math.floor, M = (e) => ({
|
|
103
103
|
x: e,
|
|
104
104
|
y: e
|
|
105
|
-
}),
|
|
105
|
+
}), ve = {
|
|
106
106
|
left: "right",
|
|
107
107
|
right: "left",
|
|
108
108
|
bottom: "top",
|
|
109
109
|
top: "bottom"
|
|
110
|
-
},
|
|
110
|
+
}, Ae = {
|
|
111
111
|
start: "end",
|
|
112
112
|
end: "start"
|
|
113
113
|
};
|
|
114
|
-
function
|
|
114
|
+
function Vt(e, t, n) {
|
|
115
115
|
return O(e, Z(t, n));
|
|
116
116
|
}
|
|
117
117
|
function ot(e, t) {
|
|
@@ -123,54 +123,54 @@ function W(e) {
|
|
|
123
123
|
function st(e) {
|
|
124
124
|
return e.split("-")[1];
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function zt(e) {
|
|
127
127
|
return e === "x" ? "y" : "x";
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Xt(e) {
|
|
130
130
|
return e === "y" ? "height" : "width";
|
|
131
131
|
}
|
|
132
|
-
const
|
|
132
|
+
const we = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
133
133
|
function U(e) {
|
|
134
|
-
return
|
|
134
|
+
return we.has(W(e)) ? "y" : "x";
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
return
|
|
136
|
+
function Zt(e) {
|
|
137
|
+
return zt(U(e));
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function xe(e, t, n) {
|
|
140
140
|
n === void 0 && (n = !1);
|
|
141
|
-
const o = st(e), s =
|
|
142
|
-
let
|
|
143
|
-
return t.reference[i] > t.floating[i] && (
|
|
141
|
+
const o = st(e), s = Zt(e), i = Xt(s);
|
|
142
|
+
let a = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
143
|
+
return t.reference[i] > t.floating[i] && (a = ut(a)), [a, ut(a)];
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
const t =
|
|
147
|
-
return [
|
|
145
|
+
function be(e) {
|
|
146
|
+
const t = ut(e);
|
|
147
|
+
return [wt(e), t, wt(t)];
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
return e.replace(/start|end/g, (t) =>
|
|
149
|
+
function wt(e) {
|
|
150
|
+
return e.replace(/start|end/g, (t) => Ae[t]);
|
|
151
151
|
}
|
|
152
|
-
const
|
|
153
|
-
function
|
|
152
|
+
const Qt = ["left", "right"], Ht = ["right", "left"], Ce = ["top", "bottom"], Se = ["bottom", "top"];
|
|
153
|
+
function De(e, t, n) {
|
|
154
154
|
switch (e) {
|
|
155
155
|
case "top":
|
|
156
156
|
case "bottom":
|
|
157
|
-
return n ? t ?
|
|
157
|
+
return n ? t ? Ht : Qt : t ? Qt : Ht;
|
|
158
158
|
case "left":
|
|
159
159
|
case "right":
|
|
160
|
-
return t ?
|
|
160
|
+
return t ? Ce : Se;
|
|
161
161
|
default:
|
|
162
162
|
return [];
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function Re(e, t, n, o) {
|
|
166
166
|
const s = st(e);
|
|
167
|
-
let i =
|
|
168
|
-
return s && (i = i.map((
|
|
167
|
+
let i = De(W(e), n === "start", o);
|
|
168
|
+
return s && (i = i.map((a) => a + "-" + s), t && (i = i.concat(i.map(wt)))), i;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
170
|
+
function ut(e) {
|
|
171
|
+
return e.replace(/left|right|bottom|top/g, (t) => ve[t]);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function Ee(e) {
|
|
174
174
|
return {
|
|
175
175
|
top: 0,
|
|
176
176
|
right: 0,
|
|
@@ -179,15 +179,15 @@ function Se(e) {
|
|
|
179
179
|
...e
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
return typeof e != "number" ?
|
|
182
|
+
function Oe(e) {
|
|
183
|
+
return typeof e != "number" ? Ee(e) : {
|
|
184
184
|
top: e,
|
|
185
185
|
right: e,
|
|
186
186
|
bottom: e,
|
|
187
187
|
left: e
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function ft(e) {
|
|
191
191
|
const {
|
|
192
192
|
x: t,
|
|
193
193
|
y: n,
|
|
@@ -205,12 +205,12 @@ function ut(e) {
|
|
|
205
205
|
y: n
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Ut(e, t, n) {
|
|
209
209
|
let {
|
|
210
210
|
reference: o,
|
|
211
211
|
floating: s
|
|
212
212
|
} = e;
|
|
213
|
-
const i = U(t),
|
|
213
|
+
const i = U(t), a = Zt(t), r = Xt(a), l = W(t), u = i === "y", c = o.x + o.width / 2 - s.width / 2, f = o.y + o.height / 2 - s.height / 2, p = o[r] / 2 - s[r] / 2;
|
|
214
214
|
let d;
|
|
215
215
|
switch (l) {
|
|
216
216
|
case "top":
|
|
@@ -245,47 +245,47 @@ function Vt(e, t, n) {
|
|
|
245
245
|
}
|
|
246
246
|
switch (st(t)) {
|
|
247
247
|
case "start":
|
|
248
|
-
d[
|
|
248
|
+
d[a] -= p * (n && u ? -1 : 1);
|
|
249
249
|
break;
|
|
250
250
|
case "end":
|
|
251
|
-
d[
|
|
251
|
+
d[a] += p * (n && u ? -1 : 1);
|
|
252
252
|
break;
|
|
253
253
|
}
|
|
254
254
|
return d;
|
|
255
255
|
}
|
|
256
|
-
const
|
|
256
|
+
const ke = async (e, t, n) => {
|
|
257
257
|
const {
|
|
258
258
|
placement: o = "bottom",
|
|
259
259
|
strategy: s = "absolute",
|
|
260
260
|
middleware: i = [],
|
|
261
|
-
platform:
|
|
262
|
-
} = n,
|
|
263
|
-
let u = await
|
|
261
|
+
platform: a
|
|
262
|
+
} = n, r = i.filter(Boolean), l = await (a.isRTL == null ? void 0 : a.isRTL(t));
|
|
263
|
+
let u = await a.getElementRects({
|
|
264
264
|
reference: e,
|
|
265
265
|
floating: t,
|
|
266
266
|
strategy: s
|
|
267
267
|
}), {
|
|
268
268
|
x: c,
|
|
269
269
|
y: f
|
|
270
|
-
} =
|
|
271
|
-
for (let h = 0; h <
|
|
270
|
+
} = Ut(u, o, l), p = o, d = {}, m = 0;
|
|
271
|
+
for (let h = 0; h < r.length; h++) {
|
|
272
272
|
const {
|
|
273
273
|
name: y,
|
|
274
274
|
fn: g
|
|
275
|
-
} =
|
|
275
|
+
} = r[h], {
|
|
276
276
|
x: A,
|
|
277
277
|
y: w,
|
|
278
|
-
data:
|
|
278
|
+
data: b,
|
|
279
279
|
reset: x
|
|
280
280
|
} = await g({
|
|
281
281
|
x: c,
|
|
282
282
|
y: f,
|
|
283
283
|
initialPlacement: o,
|
|
284
|
-
placement:
|
|
284
|
+
placement: p,
|
|
285
285
|
strategy: s,
|
|
286
286
|
middlewareData: d,
|
|
287
287
|
rects: u,
|
|
288
|
-
platform:
|
|
288
|
+
platform: a,
|
|
289
289
|
elements: {
|
|
290
290
|
reference: e,
|
|
291
291
|
floating: t
|
|
@@ -295,71 +295,71 @@ const De = async (e, t, n) => {
|
|
|
295
295
|
...d,
|
|
296
296
|
[y]: {
|
|
297
297
|
...d[y],
|
|
298
|
-
...
|
|
298
|
+
...b
|
|
299
299
|
}
|
|
300
|
-
}, x &&
|
|
300
|
+
}, x && m <= 50 && (m++, typeof x == "object" && (x.placement && (p = x.placement), x.rects && (u = x.rects === !0 ? await a.getElementRects({
|
|
301
301
|
reference: e,
|
|
302
302
|
floating: t,
|
|
303
303
|
strategy: s
|
|
304
304
|
}) : x.rects), {
|
|
305
305
|
x: c,
|
|
306
306
|
y: f
|
|
307
|
-
} =
|
|
307
|
+
} = Ut(u, p, l)), h = -1);
|
|
308
308
|
}
|
|
309
309
|
return {
|
|
310
310
|
x: c,
|
|
311
311
|
y: f,
|
|
312
|
-
placement:
|
|
312
|
+
placement: p,
|
|
313
313
|
strategy: s,
|
|
314
314
|
middlewareData: d
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
|
-
async function
|
|
317
|
+
async function bt(e, t) {
|
|
318
318
|
var n;
|
|
319
319
|
t === void 0 && (t = {});
|
|
320
320
|
const {
|
|
321
321
|
x: o,
|
|
322
322
|
y: s,
|
|
323
323
|
platform: i,
|
|
324
|
-
rects:
|
|
325
|
-
elements:
|
|
324
|
+
rects: a,
|
|
325
|
+
elements: r,
|
|
326
326
|
strategy: l
|
|
327
327
|
} = e, {
|
|
328
328
|
boundary: u = "clippingAncestors",
|
|
329
329
|
rootBoundary: c = "viewport",
|
|
330
330
|
elementContext: f = "floating",
|
|
331
|
-
altBoundary:
|
|
331
|
+
altBoundary: p = !1,
|
|
332
332
|
padding: d = 0
|
|
333
|
-
} = ot(t, e),
|
|
334
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(
|
|
333
|
+
} = ot(t, e), m = Oe(d), y = r[p ? f === "floating" ? "reference" : "floating" : f], g = ft(await i.getClippingRect({
|
|
334
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(r.floating)),
|
|
335
335
|
boundary: u,
|
|
336
336
|
rootBoundary: c,
|
|
337
337
|
strategy: l
|
|
338
338
|
})), A = f === "floating" ? {
|
|
339
339
|
x: o,
|
|
340
340
|
y: s,
|
|
341
|
-
width:
|
|
342
|
-
height:
|
|
343
|
-
} :
|
|
341
|
+
width: a.floating.width,
|
|
342
|
+
height: a.floating.height
|
|
343
|
+
} : a.reference, w = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(r.floating)), b = await (i.isElement == null ? void 0 : i.isElement(w)) ? await (i.getScale == null ? void 0 : i.getScale(w)) || {
|
|
344
344
|
x: 1,
|
|
345
345
|
y: 1
|
|
346
346
|
} : {
|
|
347
347
|
x: 1,
|
|
348
348
|
y: 1
|
|
349
|
-
}, x =
|
|
350
|
-
elements:
|
|
349
|
+
}, x = ft(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
350
|
+
elements: r,
|
|
351
351
|
rect: A,
|
|
352
352
|
offsetParent: w,
|
|
353
353
|
strategy: l
|
|
354
354
|
}) : A);
|
|
355
355
|
return {
|
|
356
|
-
top: (g.top - x.top +
|
|
357
|
-
bottom: (x.bottom - g.bottom +
|
|
358
|
-
left: (g.left - x.left +
|
|
359
|
-
right: (x.right - g.right +
|
|
356
|
+
top: (g.top - x.top + m.top) / b.y,
|
|
357
|
+
bottom: (x.bottom - g.bottom + m.bottom) / b.y,
|
|
358
|
+
left: (g.left - x.left + m.left) / b.x,
|
|
359
|
+
right: (x.right - g.right + m.right) / b.x
|
|
360
360
|
};
|
|
361
361
|
}
|
|
362
|
-
const
|
|
362
|
+
const _e = function(e) {
|
|
363
363
|
return e === void 0 && (e = {}), {
|
|
364
364
|
name: "flip",
|
|
365
365
|
options: e,
|
|
@@ -368,89 +368,89 @@ const Ee = function(e) {
|
|
|
368
368
|
const {
|
|
369
369
|
placement: s,
|
|
370
370
|
middlewareData: i,
|
|
371
|
-
rects:
|
|
372
|
-
initialPlacement:
|
|
371
|
+
rects: a,
|
|
372
|
+
initialPlacement: r,
|
|
373
373
|
platform: l,
|
|
374
374
|
elements: u
|
|
375
375
|
} = t, {
|
|
376
376
|
mainAxis: c = !0,
|
|
377
377
|
crossAxis: f = !0,
|
|
378
|
-
fallbackPlacements:
|
|
378
|
+
fallbackPlacements: p,
|
|
379
379
|
fallbackStrategy: d = "bestFit",
|
|
380
|
-
fallbackAxisSideDirection:
|
|
380
|
+
fallbackAxisSideDirection: m = "none",
|
|
381
381
|
flipAlignment: h = !0,
|
|
382
382
|
...y
|
|
383
383
|
} = ot(e, t);
|
|
384
384
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
385
385
|
return {};
|
|
386
|
-
const g = W(s), A = U(
|
|
387
|
-
!
|
|
388
|
-
const
|
|
389
|
-
let
|
|
390
|
-
if (c &&
|
|
391
|
-
const
|
|
392
|
-
|
|
386
|
+
const g = W(s), A = U(r), w = W(r) === r, b = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), x = p || (w || !h ? [ut(r)] : be(r)), B = m !== "none";
|
|
387
|
+
!p && B && x.push(...Re(r, h, m, b));
|
|
388
|
+
const E = [r, ...x], V = await bt(t, y), Q = [];
|
|
389
|
+
let _ = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
390
|
+
if (c && Q.push(V[g]), f) {
|
|
391
|
+
const H = xe(s, a, b);
|
|
392
|
+
Q.push(V[H[0]], V[H[1]]);
|
|
393
393
|
}
|
|
394
|
-
if (
|
|
394
|
+
if (_ = [..._, {
|
|
395
395
|
placement: s,
|
|
396
|
-
overflows:
|
|
397
|
-
}], !
|
|
398
|
-
var G,
|
|
399
|
-
const
|
|
400
|
-
if (
|
|
396
|
+
overflows: Q
|
|
397
|
+
}], !Q.every((H) => H <= 0)) {
|
|
398
|
+
var G, K;
|
|
399
|
+
const H = (((G = i.flip) == null ? void 0 : G.index) || 0) + 1, v = E[H];
|
|
400
|
+
if (v && (!(f === "alignment" ? A !== U(v) : !1) || // We leave the current main axis only if every placement on that axis
|
|
401
401
|
// overflows the main axis.
|
|
402
|
-
|
|
402
|
+
_.every((D) => U(D.placement) === A ? D.overflows[0] > 0 : !0)))
|
|
403
403
|
return {
|
|
404
404
|
data: {
|
|
405
|
-
index:
|
|
406
|
-
overflows:
|
|
405
|
+
index: H,
|
|
406
|
+
overflows: _
|
|
407
407
|
},
|
|
408
408
|
reset: {
|
|
409
|
-
placement:
|
|
409
|
+
placement: v
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
|
-
let
|
|
413
|
-
if (!
|
|
412
|
+
let T = (K = _.filter((C) => C.overflows[0] <= 0).sort((C, D) => C.overflows[1] - D.overflows[1])[0]) == null ? void 0 : K.placement;
|
|
413
|
+
if (!T)
|
|
414
414
|
switch (d) {
|
|
415
415
|
case "bestFit": {
|
|
416
|
-
var
|
|
417
|
-
const
|
|
418
|
-
if (
|
|
419
|
-
const
|
|
420
|
-
return
|
|
416
|
+
var q;
|
|
417
|
+
const C = (q = _.filter((D) => {
|
|
418
|
+
if (B) {
|
|
419
|
+
const R = U(D.placement);
|
|
420
|
+
return R === A || // Create a bias to the `y` side axis due to horizontal
|
|
421
421
|
// reading directions favoring greater width.
|
|
422
|
-
|
|
422
|
+
R === "y";
|
|
423
423
|
}
|
|
424
424
|
return !0;
|
|
425
|
-
}).map((
|
|
426
|
-
|
|
425
|
+
}).map((D) => [D.placement, D.overflows.filter((R) => R > 0).reduce((R, I) => R + I, 0)]).sort((D, R) => D[1] - R[1])[0]) == null ? void 0 : q[0];
|
|
426
|
+
C && (T = C);
|
|
427
427
|
break;
|
|
428
428
|
}
|
|
429
429
|
case "initialPlacement":
|
|
430
|
-
|
|
430
|
+
T = r;
|
|
431
431
|
break;
|
|
432
432
|
}
|
|
433
|
-
if (s !==
|
|
433
|
+
if (s !== T)
|
|
434
434
|
return {
|
|
435
435
|
reset: {
|
|
436
|
-
placement:
|
|
436
|
+
placement: T
|
|
437
437
|
}
|
|
438
438
|
};
|
|
439
439
|
}
|
|
440
440
|
return {};
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
|
-
},
|
|
444
|
-
async function
|
|
443
|
+
}, Te = /* @__PURE__ */ new Set(["left", "top"]);
|
|
444
|
+
async function Ie(e, t) {
|
|
445
445
|
const {
|
|
446
446
|
placement: n,
|
|
447
447
|
platform: o,
|
|
448
448
|
elements: s
|
|
449
|
-
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)),
|
|
449
|
+
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = W(n), r = st(n), l = U(n) === "y", u = Te.has(a) ? -1 : 1, c = i && l ? -1 : 1, f = ot(t, e);
|
|
450
450
|
let {
|
|
451
|
-
mainAxis:
|
|
451
|
+
mainAxis: p,
|
|
452
452
|
crossAxis: d,
|
|
453
|
-
alignmentAxis:
|
|
453
|
+
alignmentAxis: m
|
|
454
454
|
} = typeof f == "number" ? {
|
|
455
455
|
mainAxis: f,
|
|
456
456
|
crossAxis: 0,
|
|
@@ -460,15 +460,15 @@ async function _e(e, t) {
|
|
|
460
460
|
crossAxis: f.crossAxis || 0,
|
|
461
461
|
alignmentAxis: f.alignmentAxis
|
|
462
462
|
};
|
|
463
|
-
return
|
|
463
|
+
return r && typeof m == "number" && (d = r === "end" ? m * -1 : m), l ? {
|
|
464
464
|
x: d * c,
|
|
465
|
-
y:
|
|
465
|
+
y: p * u
|
|
466
466
|
} : {
|
|
467
|
-
x:
|
|
467
|
+
x: p * u,
|
|
468
468
|
y: d * c
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
|
-
const
|
|
471
|
+
const Fe = function(e) {
|
|
472
472
|
return e === void 0 && (e = 0), {
|
|
473
473
|
name: "offset",
|
|
474
474
|
options: e,
|
|
@@ -477,20 +477,20 @@ const ke = function(e) {
|
|
|
477
477
|
const {
|
|
478
478
|
x: s,
|
|
479
479
|
y: i,
|
|
480
|
-
placement:
|
|
481
|
-
middlewareData:
|
|
482
|
-
} = t, l = await
|
|
483
|
-
return
|
|
480
|
+
placement: a,
|
|
481
|
+
middlewareData: r
|
|
482
|
+
} = t, l = await Ie(t, e);
|
|
483
|
+
return a === ((n = r.offset) == null ? void 0 : n.placement) && (o = r.arrow) != null && o.alignmentOffset ? {} : {
|
|
484
484
|
x: s + l.x,
|
|
485
485
|
y: i + l.y,
|
|
486
486
|
data: {
|
|
487
487
|
...l,
|
|
488
|
-
placement:
|
|
488
|
+
placement: a
|
|
489
489
|
}
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
|
-
},
|
|
493
|
+
}, Le = function(e) {
|
|
494
494
|
return e === void 0 && (e = {}), {
|
|
495
495
|
name: "shift",
|
|
496
496
|
options: e,
|
|
@@ -501,8 +501,8 @@ const ke = function(e) {
|
|
|
501
501
|
placement: s
|
|
502
502
|
} = t, {
|
|
503
503
|
mainAxis: i = !0,
|
|
504
|
-
crossAxis:
|
|
505
|
-
limiter:
|
|
504
|
+
crossAxis: a = !1,
|
|
505
|
+
limiter: r = {
|
|
506
506
|
fn: (y) => {
|
|
507
507
|
let {
|
|
508
508
|
x: g,
|
|
@@ -518,20 +518,20 @@ const ke = function(e) {
|
|
|
518
518
|
} = ot(e, t), u = {
|
|
519
519
|
x: n,
|
|
520
520
|
y: o
|
|
521
|
-
}, c = await
|
|
522
|
-
let d = u[
|
|
521
|
+
}, c = await bt(t, l), f = U(W(s)), p = zt(f);
|
|
522
|
+
let d = u[p], m = u[f];
|
|
523
523
|
if (i) {
|
|
524
|
-
const y =
|
|
525
|
-
d =
|
|
524
|
+
const y = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", A = d + c[y], w = d - c[g];
|
|
525
|
+
d = Vt(A, d, w);
|
|
526
526
|
}
|
|
527
|
-
if (
|
|
528
|
-
const y = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", A =
|
|
529
|
-
|
|
527
|
+
if (a) {
|
|
528
|
+
const y = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", A = m + c[y], w = m - c[g];
|
|
529
|
+
m = Vt(A, m, w);
|
|
530
530
|
}
|
|
531
|
-
const h =
|
|
531
|
+
const h = r.fn({
|
|
532
532
|
...t,
|
|
533
|
-
[
|
|
534
|
-
[f]:
|
|
533
|
+
[p]: d,
|
|
534
|
+
[f]: m
|
|
535
535
|
});
|
|
536
536
|
return {
|
|
537
537
|
...h,
|
|
@@ -539,14 +539,14 @@ const ke = function(e) {
|
|
|
539
539
|
x: h.x - n,
|
|
540
540
|
y: h.y - o,
|
|
541
541
|
enabled: {
|
|
542
|
-
[
|
|
543
|
-
[f]:
|
|
542
|
+
[p]: i,
|
|
543
|
+
[f]: a
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
|
-
},
|
|
549
|
+
}, Be = function(e) {
|
|
550
550
|
return e === void 0 && (e = {}), {
|
|
551
551
|
name: "size",
|
|
552
552
|
options: e,
|
|
@@ -555,31 +555,31 @@ const ke = function(e) {
|
|
|
555
555
|
const {
|
|
556
556
|
placement: s,
|
|
557
557
|
rects: i,
|
|
558
|
-
platform:
|
|
559
|
-
elements:
|
|
558
|
+
platform: a,
|
|
559
|
+
elements: r
|
|
560
560
|
} = t, {
|
|
561
561
|
apply: l = () => {
|
|
562
562
|
},
|
|
563
563
|
...u
|
|
564
|
-
} = ot(e, t), c = await
|
|
565
|
-
width:
|
|
564
|
+
} = ot(e, t), c = await bt(t, u), f = W(s), p = st(s), d = U(s) === "y", {
|
|
565
|
+
width: m,
|
|
566
566
|
height: h
|
|
567
567
|
} = i.floating;
|
|
568
568
|
let y, g;
|
|
569
|
-
f === "top" || f === "bottom" ? (y = f, g =
|
|
570
|
-
const A = h - c.top - c.bottom, w =
|
|
571
|
-
let
|
|
572
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (V = w), (o = t.middlewareData.shift) != null && o.enabled.y && (
|
|
573
|
-
const
|
|
574
|
-
d ? V =
|
|
569
|
+
f === "top" || f === "bottom" ? (y = f, g = p === (await (a.isRTL == null ? void 0 : a.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (g = f, y = p === "end" ? "top" : "bottom");
|
|
570
|
+
const A = h - c.top - c.bottom, w = m - c.left - c.right, b = Z(h - c[y], A), x = Z(m - c[g], w), B = !t.middlewareData.shift;
|
|
571
|
+
let E = b, V = x;
|
|
572
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (V = w), (o = t.middlewareData.shift) != null && o.enabled.y && (E = A), B && !p) {
|
|
573
|
+
const _ = O(c.left, 0), G = O(c.right, 0), K = O(c.top, 0), q = O(c.bottom, 0);
|
|
574
|
+
d ? V = m - 2 * (_ !== 0 || G !== 0 ? _ + G : O(c.left, c.right)) : E = h - 2 * (K !== 0 || q !== 0 ? K + q : O(c.top, c.bottom));
|
|
575
575
|
}
|
|
576
576
|
await l({
|
|
577
577
|
...t,
|
|
578
578
|
availableWidth: V,
|
|
579
|
-
availableHeight:
|
|
579
|
+
availableHeight: E
|
|
580
580
|
});
|
|
581
|
-
const
|
|
582
|
-
return
|
|
581
|
+
const Q = await a.getDimensions(r.floating);
|
|
582
|
+
return m !== Q.width || h !== Q.height ? {
|
|
583
583
|
reset: {
|
|
584
584
|
rects: !0
|
|
585
585
|
}
|
|
@@ -587,49 +587,49 @@ const ke = function(e) {
|
|
|
587
587
|
}
|
|
588
588
|
};
|
|
589
589
|
};
|
|
590
|
-
function
|
|
590
|
+
function dt() {
|
|
591
591
|
return typeof window < "u";
|
|
592
592
|
}
|
|
593
593
|
function et(e) {
|
|
594
|
-
return
|
|
594
|
+
return te(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function k(e) {
|
|
597
597
|
var t;
|
|
598
598
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function N(e) {
|
|
601
601
|
var t;
|
|
602
|
-
return (t = (
|
|
602
|
+
return (t = (te(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
return
|
|
604
|
+
function te(e) {
|
|
605
|
+
return dt() ? e instanceof Node || e instanceof k(e).Node : !1;
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
return
|
|
607
|
+
function F(e) {
|
|
608
|
+
return dt() ? e instanceof Element || e instanceof k(e).Element : !1;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return
|
|
610
|
+
function P(e) {
|
|
611
|
+
return dt() ? e instanceof HTMLElement || e instanceof k(e).HTMLElement : !1;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
return !
|
|
613
|
+
function qt(e) {
|
|
614
|
+
return !dt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof k(e).ShadowRoot;
|
|
615
615
|
}
|
|
616
|
-
const
|
|
616
|
+
const Me = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
617
617
|
function it(e) {
|
|
618
618
|
const {
|
|
619
619
|
overflow: t,
|
|
620
620
|
overflowX: n,
|
|
621
621
|
overflowY: o,
|
|
622
622
|
display: s
|
|
623
|
-
} =
|
|
624
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !
|
|
623
|
+
} = L(e);
|
|
624
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !Me.has(s);
|
|
625
625
|
}
|
|
626
|
-
const
|
|
627
|
-
function
|
|
628
|
-
return
|
|
626
|
+
const Pe = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
627
|
+
function Ne(e) {
|
|
628
|
+
return Pe.has(et(e));
|
|
629
629
|
}
|
|
630
|
-
const
|
|
631
|
-
function
|
|
632
|
-
return
|
|
630
|
+
const Ve = [":popover-open", ":modal"];
|
|
631
|
+
function pt(e) {
|
|
632
|
+
return Ve.some((t) => {
|
|
633
633
|
try {
|
|
634
634
|
return e.matches(t);
|
|
635
635
|
} catch {
|
|
@@ -637,34 +637,34 @@ function dt(e) {
|
|
|
637
637
|
}
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
|
-
const
|
|
641
|
-
function
|
|
642
|
-
const t =
|
|
643
|
-
return
|
|
640
|
+
const Qe = ["transform", "translate", "scale", "rotate", "perspective"], He = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ue = ["paint", "layout", "strict", "content"];
|
|
641
|
+
function Ct(e) {
|
|
642
|
+
const t = St(), n = F(e) ? L(e) : e;
|
|
643
|
+
return Qe.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) || He.some((o) => (n.willChange || "").includes(o)) || Ue.some((o) => (n.contain || "").includes(o));
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function qe(e) {
|
|
646
646
|
let t = J(e);
|
|
647
|
-
for (;
|
|
648
|
-
if (
|
|
647
|
+
for (; P(t) && !tt(t); ) {
|
|
648
|
+
if (Ct(t))
|
|
649
649
|
return t;
|
|
650
|
-
if (
|
|
650
|
+
if (pt(t))
|
|
651
651
|
return null;
|
|
652
652
|
t = J(t);
|
|
653
653
|
}
|
|
654
654
|
return null;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function St() {
|
|
657
657
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
658
658
|
}
|
|
659
|
-
const
|
|
659
|
+
const We = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
660
660
|
function tt(e) {
|
|
661
|
-
return
|
|
661
|
+
return We.has(et(e));
|
|
662
662
|
}
|
|
663
|
-
function
|
|
664
|
-
return
|
|
663
|
+
function L(e) {
|
|
664
|
+
return k(e).getComputedStyle(e);
|
|
665
665
|
}
|
|
666
666
|
function mt(e) {
|
|
667
|
-
return
|
|
667
|
+
return F(e) ? {
|
|
668
668
|
scrollLeft: e.scrollLeft,
|
|
669
669
|
scrollTop: e.scrollTop
|
|
670
670
|
} : {
|
|
@@ -679,182 +679,182 @@ function J(e) {
|
|
|
679
679
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
680
680
|
e.assignedSlot || // DOM Element detected.
|
|
681
681
|
e.parentNode || // ShadowRoot detected.
|
|
682
|
-
|
|
683
|
-
|
|
682
|
+
qt(e) && e.host || // Fallback.
|
|
683
|
+
N(e)
|
|
684
684
|
);
|
|
685
|
-
return
|
|
685
|
+
return qt(t) ? t.host : t;
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function ee(e) {
|
|
688
688
|
const t = J(e);
|
|
689
|
-
return tt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body :
|
|
689
|
+
return tt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : P(t) && it(t) ? t : ee(t);
|
|
690
690
|
}
|
|
691
691
|
function nt(e, t, n) {
|
|
692
692
|
var o;
|
|
693
693
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
694
|
-
const s =
|
|
694
|
+
const s = ee(e), i = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = k(s);
|
|
695
695
|
if (i) {
|
|
696
|
-
const
|
|
697
|
-
return t.concat(
|
|
696
|
+
const r = xt(a);
|
|
697
|
+
return t.concat(a, a.visualViewport || [], it(s) ? s : [], r && n ? nt(r) : []);
|
|
698
698
|
}
|
|
699
699
|
return t.concat(s, nt(s, [], n));
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function xt(e) {
|
|
702
702
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
const t =
|
|
704
|
+
function ne(e) {
|
|
705
|
+
const t = L(e);
|
|
706
706
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
707
|
-
const s =
|
|
708
|
-
return
|
|
707
|
+
const s = P(e), i = s ? e.offsetWidth : n, a = s ? e.offsetHeight : o, r = ct(n) !== i || ct(o) !== a;
|
|
708
|
+
return r && (n = i, o = a), {
|
|
709
709
|
width: n,
|
|
710
710
|
height: o,
|
|
711
|
-
$:
|
|
711
|
+
$: r
|
|
712
712
|
};
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
return
|
|
714
|
+
function Dt(e) {
|
|
715
|
+
return F(e) ? e : e.contextElement;
|
|
716
716
|
}
|
|
717
717
|
function z(e) {
|
|
718
|
-
const t =
|
|
719
|
-
if (!
|
|
720
|
-
return
|
|
718
|
+
const t = Dt(e);
|
|
719
|
+
if (!P(t))
|
|
720
|
+
return M(1);
|
|
721
721
|
const n = t.getBoundingClientRect(), {
|
|
722
722
|
width: o,
|
|
723
723
|
height: s,
|
|
724
724
|
$: i
|
|
725
|
-
} =
|
|
726
|
-
let
|
|
727
|
-
return (!
|
|
728
|
-
x:
|
|
729
|
-
y:
|
|
725
|
+
} = ne(t);
|
|
726
|
+
let a = (i ? ct(n.width) : n.width) / o, r = (i ? ct(n.height) : n.height) / s;
|
|
727
|
+
return (!a || !Number.isFinite(a)) && (a = 1), (!r || !Number.isFinite(r)) && (r = 1), {
|
|
728
|
+
x: a,
|
|
729
|
+
y: r
|
|
730
730
|
};
|
|
731
731
|
}
|
|
732
|
-
const
|
|
733
|
-
function
|
|
734
|
-
const t =
|
|
735
|
-
return !
|
|
732
|
+
const Je = /* @__PURE__ */ M(0);
|
|
733
|
+
function oe(e) {
|
|
734
|
+
const t = k(e);
|
|
735
|
+
return !St() || !t.visualViewport ? Je : {
|
|
736
736
|
x: t.visualViewport.offsetLeft,
|
|
737
737
|
y: t.visualViewport.offsetTop
|
|
738
738
|
};
|
|
739
739
|
}
|
|
740
|
-
function
|
|
741
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
740
|
+
function Ge(e, t, n) {
|
|
741
|
+
return t === void 0 && (t = !1), !n || t && n !== k(e) ? !1 : t;
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function $(e, t, n, o) {
|
|
744
744
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
745
|
-
const s = e.getBoundingClientRect(), i =
|
|
746
|
-
let
|
|
747
|
-
t && (o ?
|
|
748
|
-
const
|
|
749
|
-
let l = (s.left +
|
|
745
|
+
const s = e.getBoundingClientRect(), i = Dt(e);
|
|
746
|
+
let a = M(1);
|
|
747
|
+
t && (o ? F(o) && (a = z(o)) : a = z(e));
|
|
748
|
+
const r = Ge(i, n, o) ? oe(i) : M(0);
|
|
749
|
+
let l = (s.left + r.x) / a.x, u = (s.top + r.y) / a.y, c = s.width / a.x, f = s.height / a.y;
|
|
750
750
|
if (i) {
|
|
751
|
-
const
|
|
752
|
-
let
|
|
753
|
-
for (; h && o && d !==
|
|
754
|
-
const y = z(h), g = h.getBoundingClientRect(), A =
|
|
755
|
-
l *= y.x, u *= y.y, c *= y.x, f *= y.y, l += w, u +=
|
|
751
|
+
const p = k(i), d = o && F(o) ? k(o) : o;
|
|
752
|
+
let m = p, h = xt(m);
|
|
753
|
+
for (; h && o && d !== m; ) {
|
|
754
|
+
const y = z(h), g = h.getBoundingClientRect(), A = L(h), w = g.left + (h.clientLeft + parseFloat(A.paddingLeft)) * y.x, b = g.top + (h.clientTop + parseFloat(A.paddingTop)) * y.y;
|
|
755
|
+
l *= y.x, u *= y.y, c *= y.x, f *= y.y, l += w, u += b, m = k(h), h = xt(m);
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
|
-
return
|
|
758
|
+
return ft({
|
|
759
759
|
width: c,
|
|
760
760
|
height: f,
|
|
761
761
|
x: l,
|
|
762
762
|
y: u
|
|
763
763
|
});
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function ht(e, t) {
|
|
766
766
|
const n = mt(e).scrollLeft;
|
|
767
|
-
return t ? t.left + n :
|
|
767
|
+
return t ? t.left + n : $(N(e)).left + n;
|
|
768
768
|
}
|
|
769
|
-
function
|
|
770
|
-
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft -
|
|
769
|
+
function se(e, t) {
|
|
770
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - ht(e, n), s = n.top + t.scrollTop;
|
|
771
771
|
return {
|
|
772
772
|
x: o,
|
|
773
773
|
y: s
|
|
774
774
|
};
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function Ke(e) {
|
|
777
777
|
let {
|
|
778
778
|
elements: t,
|
|
779
779
|
rect: n,
|
|
780
780
|
offsetParent: o,
|
|
781
781
|
strategy: s
|
|
782
782
|
} = e;
|
|
783
|
-
const i = s === "fixed",
|
|
784
|
-
if (o ===
|
|
783
|
+
const i = s === "fixed", a = N(o), r = t ? pt(t.floating) : !1;
|
|
784
|
+
if (o === a || r && i)
|
|
785
785
|
return n;
|
|
786
786
|
let l = {
|
|
787
787
|
scrollLeft: 0,
|
|
788
788
|
scrollTop: 0
|
|
789
|
-
}, u =
|
|
790
|
-
const c =
|
|
791
|
-
if ((f || !f && !i) && ((et(o) !== "body" || it(
|
|
792
|
-
const d =
|
|
789
|
+
}, u = M(1);
|
|
790
|
+
const c = M(0), f = P(o);
|
|
791
|
+
if ((f || !f && !i) && ((et(o) !== "body" || it(a)) && (l = mt(o)), P(o))) {
|
|
792
|
+
const d = $(o);
|
|
793
793
|
u = z(o), c.x = d.x + o.clientLeft, c.y = d.y + o.clientTop;
|
|
794
794
|
}
|
|
795
|
-
const
|
|
795
|
+
const p = a && !f && !i ? se(a, l) : M(0);
|
|
796
796
|
return {
|
|
797
797
|
width: n.width * u.x,
|
|
798
798
|
height: n.height * u.y,
|
|
799
|
-
x: n.x * u.x - l.scrollLeft * u.x + c.x +
|
|
800
|
-
y: n.y * u.y - l.scrollTop * u.y + c.y +
|
|
799
|
+
x: n.x * u.x - l.scrollLeft * u.x + c.x + p.x,
|
|
800
|
+
y: n.y * u.y - l.scrollTop * u.y + c.y + p.y
|
|
801
801
|
};
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function Ye(e) {
|
|
804
804
|
return Array.from(e.getClientRects());
|
|
805
805
|
}
|
|
806
|
-
function
|
|
807
|
-
const t =
|
|
808
|
-
let
|
|
809
|
-
const
|
|
810
|
-
return
|
|
806
|
+
function je(e) {
|
|
807
|
+
const t = N(e), n = mt(e), o = e.ownerDocument.body, s = O(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = O(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
808
|
+
let a = -n.scrollLeft + ht(e);
|
|
809
|
+
const r = -n.scrollTop;
|
|
810
|
+
return L(o).direction === "rtl" && (a += O(t.clientWidth, o.clientWidth) - s), {
|
|
811
811
|
width: s,
|
|
812
812
|
height: i,
|
|
813
|
-
x:
|
|
814
|
-
y:
|
|
813
|
+
x: a,
|
|
814
|
+
y: r
|
|
815
815
|
};
|
|
816
816
|
}
|
|
817
|
-
const
|
|
818
|
-
function
|
|
819
|
-
const n =
|
|
820
|
-
let i = o.clientWidth,
|
|
817
|
+
const Wt = 25;
|
|
818
|
+
function $e(e, t) {
|
|
819
|
+
const n = k(e), o = N(e), s = n.visualViewport;
|
|
820
|
+
let i = o.clientWidth, a = o.clientHeight, r = 0, l = 0;
|
|
821
821
|
if (s) {
|
|
822
|
-
i = s.width,
|
|
823
|
-
const c =
|
|
824
|
-
(!c || c && t === "fixed") && (
|
|
822
|
+
i = s.width, a = s.height;
|
|
823
|
+
const c = St();
|
|
824
|
+
(!c || c && t === "fixed") && (r = s.offsetLeft, l = s.offsetTop);
|
|
825
825
|
}
|
|
826
|
-
const u =
|
|
826
|
+
const u = ht(o);
|
|
827
827
|
if (u <= 0) {
|
|
828
|
-
const c = o.ownerDocument, f = c.body,
|
|
829
|
-
|
|
830
|
-
} else u <=
|
|
828
|
+
const c = o.ownerDocument, f = c.body, p = getComputedStyle(f), d = c.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, m = Math.abs(o.clientWidth - f.clientWidth - d);
|
|
829
|
+
m <= Wt && (i -= m);
|
|
830
|
+
} else u <= Wt && (i += u);
|
|
831
831
|
return {
|
|
832
832
|
width: i,
|
|
833
|
-
height:
|
|
834
|
-
x:
|
|
833
|
+
height: a,
|
|
834
|
+
x: r,
|
|
835
835
|
y: l
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
|
-
const
|
|
839
|
-
function
|
|
840
|
-
const n =
|
|
838
|
+
const ze = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
839
|
+
function Xe(e, t) {
|
|
840
|
+
const n = $(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, i = P(e) ? z(e) : M(1), a = e.clientWidth * i.x, r = e.clientHeight * i.y, l = s * i.x, u = o * i.y;
|
|
841
841
|
return {
|
|
842
|
-
width:
|
|
843
|
-
height:
|
|
842
|
+
width: a,
|
|
843
|
+
height: r,
|
|
844
844
|
x: l,
|
|
845
845
|
y: u
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function Jt(e, t, n) {
|
|
849
849
|
let o;
|
|
850
850
|
if (t === "viewport")
|
|
851
|
-
o =
|
|
851
|
+
o = $e(e, n);
|
|
852
852
|
else if (t === "document")
|
|
853
|
-
o =
|
|
854
|
-
else if (
|
|
855
|
-
o =
|
|
853
|
+
o = je(N(e));
|
|
854
|
+
else if (F(t))
|
|
855
|
+
o = Xe(t, n);
|
|
856
856
|
else {
|
|
857
|
-
const s =
|
|
857
|
+
const s = oe(e);
|
|
858
858
|
o = {
|
|
859
859
|
x: t.x - s.x,
|
|
860
860
|
y: t.y - s.y,
|
|
@@ -862,36 +862,36 @@ function qt(e, t, n) {
|
|
|
862
862
|
height: t.height
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
|
-
return
|
|
865
|
+
return ft(o);
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function ie(e, t) {
|
|
868
868
|
const n = J(e);
|
|
869
|
-
return n === t || !
|
|
869
|
+
return n === t || !F(n) || tt(n) ? !1 : L(n).position === "fixed" || ie(n, t);
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function Ze(e, t) {
|
|
872
872
|
const n = t.get(e);
|
|
873
873
|
if (n)
|
|
874
874
|
return n;
|
|
875
|
-
let o = nt(e, [], !1).filter((
|
|
876
|
-
const i =
|
|
877
|
-
let
|
|
878
|
-
for (;
|
|
879
|
-
const
|
|
880
|
-
!l &&
|
|
875
|
+
let o = nt(e, [], !1).filter((r) => F(r) && et(r) !== "body"), s = null;
|
|
876
|
+
const i = L(e).position === "fixed";
|
|
877
|
+
let a = i ? J(e) : e;
|
|
878
|
+
for (; F(a) && !tt(a); ) {
|
|
879
|
+
const r = L(a), l = Ct(a);
|
|
880
|
+
!l && r.position === "fixed" && (s = null), (i ? !l && !s : !l && r.position === "static" && !!s && ze.has(s.position) || it(a) && !l && ie(e, a)) ? o = o.filter((c) => c !== a) : s = r, a = J(a);
|
|
881
881
|
}
|
|
882
882
|
return t.set(e, o), o;
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function tn(e) {
|
|
885
885
|
let {
|
|
886
886
|
element: t,
|
|
887
887
|
boundary: n,
|
|
888
888
|
rootBoundary: o,
|
|
889
889
|
strategy: s
|
|
890
890
|
} = e;
|
|
891
|
-
const
|
|
892
|
-
const f =
|
|
891
|
+
const a = [...n === "clippingAncestors" ? pt(t) ? [] : Ze(t, this._c) : [].concat(n), o], r = a[0], l = a.reduce((u, c) => {
|
|
892
|
+
const f = Jt(t, c, s);
|
|
893
893
|
return u.top = O(f.top, u.top), u.right = Z(f.right, u.right), u.bottom = Z(f.bottom, u.bottom), u.left = O(f.left, u.left), u;
|
|
894
|
-
},
|
|
894
|
+
}, Jt(t, r, s));
|
|
895
895
|
return {
|
|
896
896
|
width: l.right - l.left,
|
|
897
897
|
height: l.bottom - l.top,
|
|
@@ -899,73 +899,73 @@ function ze(e) {
|
|
|
899
899
|
y: l.top
|
|
900
900
|
};
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function en(e) {
|
|
903
903
|
const {
|
|
904
904
|
width: t,
|
|
905
905
|
height: n
|
|
906
|
-
} =
|
|
906
|
+
} = ne(e);
|
|
907
907
|
return {
|
|
908
908
|
width: t,
|
|
909
909
|
height: n
|
|
910
910
|
};
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
const o =
|
|
914
|
-
let
|
|
912
|
+
function nn(e, t, n) {
|
|
913
|
+
const o = P(t), s = N(t), i = n === "fixed", a = $(e, !0, i, t);
|
|
914
|
+
let r = {
|
|
915
915
|
scrollLeft: 0,
|
|
916
916
|
scrollTop: 0
|
|
917
917
|
};
|
|
918
|
-
const l =
|
|
918
|
+
const l = M(0);
|
|
919
919
|
function u() {
|
|
920
|
-
l.x =
|
|
920
|
+
l.x = ht(s);
|
|
921
921
|
}
|
|
922
922
|
if (o || !o && !i)
|
|
923
|
-
if ((et(t) !== "body" || it(s)) && (
|
|
924
|
-
const d =
|
|
923
|
+
if ((et(t) !== "body" || it(s)) && (r = mt(t)), o) {
|
|
924
|
+
const d = $(t, !0, i, t);
|
|
925
925
|
l.x = d.x + t.clientLeft, l.y = d.y + t.clientTop;
|
|
926
926
|
} else s && u();
|
|
927
927
|
i && !o && s && u();
|
|
928
|
-
const c = s && !o && !i ?
|
|
928
|
+
const c = s && !o && !i ? se(s, r) : M(0), f = a.left + r.scrollLeft - l.x - c.x, p = a.top + r.scrollTop - l.y - c.y;
|
|
929
929
|
return {
|
|
930
930
|
x: f,
|
|
931
|
-
y:
|
|
932
|
-
width:
|
|
933
|
-
height:
|
|
931
|
+
y: p,
|
|
932
|
+
width: a.width,
|
|
933
|
+
height: a.height
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
|
-
function
|
|
937
|
-
return
|
|
936
|
+
function At(e) {
|
|
937
|
+
return L(e).position === "static";
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
if (!
|
|
939
|
+
function Gt(e, t) {
|
|
940
|
+
if (!P(e) || L(e).position === "fixed")
|
|
941
941
|
return null;
|
|
942
942
|
if (t)
|
|
943
943
|
return t(e);
|
|
944
944
|
let n = e.offsetParent;
|
|
945
|
-
return
|
|
945
|
+
return N(e) === n && (n = n.ownerDocument.body), n;
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
const n =
|
|
949
|
-
if (
|
|
947
|
+
function ae(e, t) {
|
|
948
|
+
const n = k(e);
|
|
949
|
+
if (pt(e))
|
|
950
950
|
return n;
|
|
951
|
-
if (!
|
|
951
|
+
if (!P(e)) {
|
|
952
952
|
let s = J(e);
|
|
953
953
|
for (; s && !tt(s); ) {
|
|
954
|
-
if (
|
|
954
|
+
if (F(s) && !At(s))
|
|
955
955
|
return s;
|
|
956
956
|
s = J(s);
|
|
957
957
|
}
|
|
958
958
|
return n;
|
|
959
959
|
}
|
|
960
|
-
let o =
|
|
961
|
-
for (; o &&
|
|
962
|
-
o =
|
|
963
|
-
return o && tt(o) &&
|
|
960
|
+
let o = Gt(e, t);
|
|
961
|
+
for (; o && Ne(o) && At(o); )
|
|
962
|
+
o = Gt(o, t);
|
|
963
|
+
return o && tt(o) && At(o) && !Ct(o) ? n : o || qe(e) || n;
|
|
964
964
|
}
|
|
965
|
-
const
|
|
966
|
-
const t = this.getOffsetParent ||
|
|
965
|
+
const on = async function(e) {
|
|
966
|
+
const t = this.getOffsetParent || ae, n = this.getDimensions, o = await n(e.floating);
|
|
967
967
|
return {
|
|
968
|
-
reference:
|
|
968
|
+
reference: nn(e.reference, await t(e.floating), e.strategy),
|
|
969
969
|
floating: {
|
|
970
970
|
x: 0,
|
|
971
971
|
y: 0,
|
|
@@ -974,56 +974,56 @@ const tn = async function(e) {
|
|
|
974
974
|
}
|
|
975
975
|
};
|
|
976
976
|
};
|
|
977
|
-
function
|
|
978
|
-
return
|
|
979
|
-
}
|
|
980
|
-
const
|
|
981
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
982
|
-
getDocumentElement:
|
|
983
|
-
getClippingRect:
|
|
984
|
-
getOffsetParent:
|
|
985
|
-
getElementRects:
|
|
986
|
-
getClientRects:
|
|
987
|
-
getDimensions:
|
|
977
|
+
function sn(e) {
|
|
978
|
+
return L(e).direction === "rtl";
|
|
979
|
+
}
|
|
980
|
+
const an = {
|
|
981
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ke,
|
|
982
|
+
getDocumentElement: N,
|
|
983
|
+
getClippingRect: tn,
|
|
984
|
+
getOffsetParent: ae,
|
|
985
|
+
getElementRects: on,
|
|
986
|
+
getClientRects: Ye,
|
|
987
|
+
getDimensions: en,
|
|
988
988
|
getScale: z,
|
|
989
|
-
isElement:
|
|
990
|
-
isRTL:
|
|
989
|
+
isElement: F,
|
|
990
|
+
isRTL: sn
|
|
991
991
|
};
|
|
992
|
-
function
|
|
992
|
+
function re(e, t) {
|
|
993
993
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
994
994
|
}
|
|
995
|
-
function
|
|
995
|
+
function rn(e, t) {
|
|
996
996
|
let n = null, o;
|
|
997
|
-
const s =
|
|
997
|
+
const s = N(e);
|
|
998
998
|
function i() {
|
|
999
|
-
var
|
|
1000
|
-
clearTimeout(o), (
|
|
999
|
+
var r;
|
|
1000
|
+
clearTimeout(o), (r = n) == null || r.disconnect(), n = null;
|
|
1001
1001
|
}
|
|
1002
|
-
function r
|
|
1003
|
-
|
|
1002
|
+
function a(r, l) {
|
|
1003
|
+
r === void 0 && (r = !1), l === void 0 && (l = 1), i();
|
|
1004
1004
|
const u = e.getBoundingClientRect(), {
|
|
1005
1005
|
left: c,
|
|
1006
1006
|
top: f,
|
|
1007
|
-
width:
|
|
1007
|
+
width: p,
|
|
1008
1008
|
height: d
|
|
1009
1009
|
} = u;
|
|
1010
|
-
if (
|
|
1010
|
+
if (r || t(), !p || !d)
|
|
1011
1011
|
return;
|
|
1012
|
-
const
|
|
1013
|
-
rootMargin: -
|
|
1012
|
+
const m = lt(f), h = lt(s.clientWidth - (c + p)), y = lt(s.clientHeight - (f + d)), g = lt(c), w = {
|
|
1013
|
+
rootMargin: -m + "px " + -h + "px " + -y + "px " + -g + "px",
|
|
1014
1014
|
threshold: O(0, Z(1, l)) || 1
|
|
1015
1015
|
};
|
|
1016
|
-
let
|
|
1017
|
-
function x(
|
|
1018
|
-
const
|
|
1019
|
-
if (
|
|
1020
|
-
if (!
|
|
1021
|
-
return
|
|
1022
|
-
|
|
1023
|
-
|
|
1016
|
+
let b = !0;
|
|
1017
|
+
function x(B) {
|
|
1018
|
+
const E = B[0].intersectionRatio;
|
|
1019
|
+
if (E !== l) {
|
|
1020
|
+
if (!b)
|
|
1021
|
+
return a();
|
|
1022
|
+
E ? a(!1, E) : o = setTimeout(() => {
|
|
1023
|
+
a(!1, 1e-7);
|
|
1024
1024
|
}, 1e3);
|
|
1025
1025
|
}
|
|
1026
|
-
|
|
1026
|
+
E === 1 && !re(u, e.getBoundingClientRect()) && a(), b = !1;
|
|
1027
1027
|
}
|
|
1028
1028
|
try {
|
|
1029
1029
|
n = new IntersectionObserver(x, {
|
|
@@ -1036,58 +1036,58 @@ function on(e, t) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
n.observe(e);
|
|
1038
1038
|
}
|
|
1039
|
-
return
|
|
1039
|
+
return a(!0), i;
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function ln(e, t, n, o) {
|
|
1042
1042
|
o === void 0 && (o = {});
|
|
1043
1043
|
const {
|
|
1044
1044
|
ancestorScroll: s = !0,
|
|
1045
1045
|
ancestorResize: i = !0,
|
|
1046
|
-
elementResize:
|
|
1047
|
-
layoutShift:
|
|
1046
|
+
elementResize: a = typeof ResizeObserver == "function",
|
|
1047
|
+
layoutShift: r = typeof IntersectionObserver == "function",
|
|
1048
1048
|
animationFrame: l = !1
|
|
1049
|
-
} = o, u =
|
|
1049
|
+
} = o, u = Dt(e), c = s || i ? [...u ? nt(u) : [], ...nt(t)] : [];
|
|
1050
1050
|
c.forEach((g) => {
|
|
1051
1051
|
s && g.addEventListener("scroll", n, {
|
|
1052
1052
|
passive: !0
|
|
1053
1053
|
}), i && g.addEventListener("resize", n);
|
|
1054
1054
|
});
|
|
1055
|
-
const f = u &&
|
|
1056
|
-
let
|
|
1057
|
-
|
|
1055
|
+
const f = u && r ? rn(u, n) : null;
|
|
1056
|
+
let p = -1, d = null;
|
|
1057
|
+
a && (d = new ResizeObserver((g) => {
|
|
1058
1058
|
let [A] = g;
|
|
1059
|
-
A && A.target === u && d && (d.unobserve(t), cancelAnimationFrame(
|
|
1059
|
+
A && A.target === u && d && (d.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1060
1060
|
var w;
|
|
1061
1061
|
(w = d) == null || w.observe(t);
|
|
1062
1062
|
})), n();
|
|
1063
1063
|
}), u && !l && d.observe(u), d.observe(t));
|
|
1064
|
-
let
|
|
1064
|
+
let m, h = l ? $(e) : null;
|
|
1065
1065
|
l && y();
|
|
1066
1066
|
function y() {
|
|
1067
|
-
const g =
|
|
1068
|
-
h && !
|
|
1067
|
+
const g = $(e);
|
|
1068
|
+
h && !re(h, g) && n(), h = g, m = requestAnimationFrame(y);
|
|
1069
1069
|
}
|
|
1070
1070
|
return n(), () => {
|
|
1071
1071
|
var g;
|
|
1072
1072
|
c.forEach((A) => {
|
|
1073
1073
|
s && A.removeEventListener("scroll", n), i && A.removeEventListener("resize", n);
|
|
1074
|
-
}), f?.(), (g = d) == null || g.disconnect(), d = null, l && cancelAnimationFrame(
|
|
1074
|
+
}), f?.(), (g = d) == null || g.disconnect(), d = null, l && cancelAnimationFrame(m);
|
|
1075
1075
|
};
|
|
1076
1076
|
}
|
|
1077
|
-
const
|
|
1077
|
+
const cn = Fe, un = Le, fn = _e, dn = Be, pn = (e, t, n) => {
|
|
1078
1078
|
const o = /* @__PURE__ */ new Map(), s = {
|
|
1079
|
-
platform:
|
|
1079
|
+
platform: an,
|
|
1080
1080
|
...n
|
|
1081
1081
|
}, i = {
|
|
1082
1082
|
...s.platform,
|
|
1083
1083
|
_c: o
|
|
1084
1084
|
};
|
|
1085
|
-
return
|
|
1085
|
+
return ke(e, t, {
|
|
1086
1086
|
...s,
|
|
1087
1087
|
platform: i
|
|
1088
1088
|
});
|
|
1089
1089
|
};
|
|
1090
|
-
function
|
|
1090
|
+
function mn(e, t) {
|
|
1091
1091
|
const n = S({
|
|
1092
1092
|
position: "fixed",
|
|
1093
1093
|
left: "0",
|
|
@@ -1097,19 +1097,19 @@ function fn(e, t) {
|
|
|
1097
1097
|
});
|
|
1098
1098
|
let o = null;
|
|
1099
1099
|
const s = () => {
|
|
1100
|
-
!e.value || !t.value ||
|
|
1100
|
+
!e.value || !t.value || pn(e.value, t.value, {
|
|
1101
1101
|
placement: "bottom-start",
|
|
1102
1102
|
strategy: "fixed",
|
|
1103
1103
|
middleware: [
|
|
1104
|
-
|
|
1104
|
+
cn(6),
|
|
1105
1105
|
// 输入框与下拉列表的间距
|
|
1106
|
-
|
|
1106
|
+
fn(),
|
|
1107
1107
|
// 空间不足自动翻转到上方
|
|
1108
|
-
|
|
1108
|
+
un({ padding: 10 }),
|
|
1109
1109
|
// 靠近屏幕边缘时自动位移
|
|
1110
|
-
|
|
1111
|
-
apply({ rects:
|
|
1112
|
-
const u = `${
|
|
1110
|
+
dn({
|
|
1111
|
+
apply({ rects: r, elements: l }) {
|
|
1112
|
+
const u = `${r.reference.width}px`;
|
|
1113
1113
|
Object.assign(l.floating.style, {
|
|
1114
1114
|
width: u,
|
|
1115
1115
|
// 必须锁定,否则在 body 下它可能由于内容过多撑开到 100vw
|
|
@@ -1119,20 +1119,20 @@ function fn(e, t) {
|
|
|
1119
1119
|
}
|
|
1120
1120
|
})
|
|
1121
1121
|
]
|
|
1122
|
-
}).then(({ x:
|
|
1122
|
+
}).then(({ x: r, y: l }) => {
|
|
1123
1123
|
Object.assign(n.value, {
|
|
1124
|
-
left: `${
|
|
1124
|
+
left: `${r}px`,
|
|
1125
1125
|
top: `${l}px`
|
|
1126
1126
|
});
|
|
1127
1127
|
});
|
|
1128
1128
|
}, i = () => {
|
|
1129
|
-
e.value && t.value && (o =
|
|
1130
|
-
},
|
|
1129
|
+
e.value && t.value && (o = ln(e.value, t.value, s));
|
|
1130
|
+
}, a = () => {
|
|
1131
1131
|
o && (o(), o = null);
|
|
1132
1132
|
};
|
|
1133
|
-
return
|
|
1133
|
+
return jt(a), { floatingStyles: n, startTrack: i, stopTrack: a };
|
|
1134
1134
|
}
|
|
1135
|
-
const
|
|
1135
|
+
const hn = "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", gn = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='icon/more'%3e%3cg%20id='&%23231;&%23188;&%23150;&%23231;&%23187;&%23132;'%3e%3cpath%20id='Stroke%201'%20d='M1.56628%207.79421H14.0959'%20stroke='%23FF6A00'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%203'%20d='M14.0667%207.79292C11.5075%207.79292%209.43396%205.71938%209.43396%203.16016'%20stroke='%23FF6A00'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20id='Stroke%205'%20d='M14.0667%207.79297C11.5075%207.79297%209.43396%209.86651%209.43396%2012.4257'%20stroke='%23FF6A00'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", yn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==", vn = "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==", An = "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", wn = "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", xn = "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=", bn = de({
|
|
1136
1136
|
name: "GlobalSearch",
|
|
1137
1137
|
model: { prop: "value", event: "input" },
|
|
1138
1138
|
props: {
|
|
@@ -1147,137 +1147,143 @@ const dn = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1147
1147
|
lang: { type: String, default: "" },
|
|
1148
1148
|
placeholder: { type: String, default: "" },
|
|
1149
1149
|
showSearchIcon: { type: Boolean, default: !0 },
|
|
1150
|
-
showItemTag: { type: Boolean, default: !0 }
|
|
1150
|
+
showItemTag: { type: Boolean, default: !0 },
|
|
1151
|
+
showApplyData: { type: Boolean, default: !0 }
|
|
1151
1152
|
},
|
|
1152
1153
|
setup(e, { emit: t }) {
|
|
1153
|
-
const n = S(""), o = S(!1), s = S(!1), i = S(""),
|
|
1154
|
-
|
|
1154
|
+
const n = S(""), o = S(!1), s = S(!1), i = S(""), a = S(null), r = S(null), l = S(null), u = S(null), c = S(!1), { searchHistory: f, saveToHistory: p, clearHistory: d } = he(
|
|
1155
|
+
kt(e, "historyKey")
|
|
1155
1156
|
), {
|
|
1156
|
-
searchResults:
|
|
1157
|
-
loading:
|
|
1158
|
-
isFetchingMore:
|
|
1159
|
-
isFinished:
|
|
1160
|
-
currentPage:
|
|
1161
|
-
fetchData:
|
|
1162
|
-
filterByTypes:
|
|
1163
|
-
} =
|
|
1157
|
+
searchResults: m,
|
|
1158
|
+
loading: h,
|
|
1159
|
+
isFetchingMore: y,
|
|
1160
|
+
isFinished: g,
|
|
1161
|
+
currentPage: A,
|
|
1162
|
+
fetchData: w,
|
|
1163
|
+
filterByTypes: b
|
|
1164
|
+
} = ye(n, kt(e, "searchTypeList")), { floatingStyles: x, startTrack: B, stopTrack: E } = mn(
|
|
1164
1165
|
l,
|
|
1165
1166
|
u
|
|
1166
|
-
),
|
|
1167
|
-
if (s.value = !0, !e.multiple && o.value &&
|
|
1167
|
+
), V = async () => {
|
|
1168
|
+
if (s.value = !0, !e.multiple && o.value && m.value.length === 0) {
|
|
1168
1169
|
const v = e.value;
|
|
1169
1170
|
if (v?.id) {
|
|
1170
|
-
|
|
1171
|
+
h.value = !0;
|
|
1171
1172
|
try {
|
|
1172
|
-
const
|
|
1173
|
-
|
|
1173
|
+
const T = await vt(v.id, v.type);
|
|
1174
|
+
m.value = b(T.records);
|
|
1174
1175
|
} finally {
|
|
1175
|
-
|
|
1176
|
+
h.value = !1;
|
|
1176
1177
|
}
|
|
1177
1178
|
}
|
|
1178
1179
|
}
|
|
1179
|
-
},
|
|
1180
|
+
}, Q = () => {
|
|
1180
1181
|
setTimeout(() => {
|
|
1181
1182
|
s.value = !1;
|
|
1182
1183
|
}, 200);
|
|
1183
|
-
},
|
|
1184
|
+
}, _ = (v) => {
|
|
1184
1185
|
v.target.value === "" && !e.multiple && (o.value = !1, t("input", null), t("update:value", null));
|
|
1185
|
-
},
|
|
1186
|
+
}, G = () => {
|
|
1186
1187
|
if (e.multiple && !n.value && e.value?.length > 0) {
|
|
1187
|
-
const v = [...e.value],
|
|
1188
|
-
t("input", v), t("update:value", v), t("remove",
|
|
1188
|
+
const v = [...e.value], T = v.pop();
|
|
1189
|
+
t("input", v), t("update:value", v), t("remove", T);
|
|
1189
1190
|
}
|
|
1190
1191
|
};
|
|
1191
|
-
|
|
1192
|
+
yt(s, (v) => v ? B() : E()), yt(n, (v) => {
|
|
1192
1193
|
if (!v.trim()) {
|
|
1193
|
-
|
|
1194
|
+
m.value = [];
|
|
1194
1195
|
return;
|
|
1195
1196
|
}
|
|
1196
|
-
|
|
1197
|
+
a.value && clearTimeout(a.value), a.value = setTimeout(() => w(1, !1), 300);
|
|
1197
1198
|
});
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1199
|
+
const K = X(() => e.lang ? e.lang === "en" || e.lang === "en-US" : typeof document < "u" ? /(^|;\s*)jc-language=en(-US)?(;|$)/.test(document.cookie || "") : !1), q = (v) => K.value ? v.displayEn || v.display || v.nameEn || "" : v.displayCn || v.display || v.nameCn || v.name || "", H = (v) => {
|
|
1200
|
+
console.log("🍉 ~ index.vue:428 ~ handleConfirmApplyData ~ e:", v), t("apply-data", v);
|
|
1201
|
+
};
|
|
1202
|
+
return yt(
|
|
1200
1203
|
() => e.value,
|
|
1201
|
-
async (v,
|
|
1202
|
-
if (console.log("🍉 ~ index.vue:304 ~ newVal:", v), JSON.stringify(v) === JSON.stringify(
|
|
1204
|
+
async (v, T) => {
|
|
1205
|
+
if (console.log("🍉 ~ index.vue:304 ~ newVal:", v), JSON.stringify(v) === JSON.stringify(T)) return;
|
|
1203
1206
|
if (e.multiple && Array.isArray(v)) {
|
|
1204
|
-
const
|
|
1205
|
-
(
|
|
1207
|
+
const D = [...v], R = D.filter(
|
|
1208
|
+
(I) => I && I.id && I.type
|
|
1206
1209
|
);
|
|
1207
|
-
if (
|
|
1210
|
+
if (R.length > 0)
|
|
1208
1211
|
try {
|
|
1209
|
-
const
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
+
const I = R.map((at) => at.id), gt = await vt(
|
|
1213
|
+
I,
|
|
1214
|
+
R[0].type
|
|
1212
1215
|
);
|
|
1213
|
-
if (
|
|
1214
|
-
let
|
|
1215
|
-
const
|
|
1216
|
-
const
|
|
1217
|
-
return
|
|
1216
|
+
if (gt && gt.records) {
|
|
1217
|
+
let at = !1;
|
|
1218
|
+
const Et = D.map((rt) => {
|
|
1219
|
+
const Ot = gt.records.find((ce) => ce.id === rt.id);
|
|
1220
|
+
return Ot && !rt.display ? (at = !0, { ...rt, ...Ot }) : rt;
|
|
1218
1221
|
});
|
|
1219
|
-
|
|
1222
|
+
at && (t("input", Et), t("update:value", Et));
|
|
1220
1223
|
}
|
|
1221
|
-
} catch (
|
|
1222
|
-
console.error("Batch fetch detail failed:",
|
|
1224
|
+
} catch (I) {
|
|
1225
|
+
console.error("Batch fetch detail failed:", I);
|
|
1223
1226
|
}
|
|
1224
1227
|
return;
|
|
1225
1228
|
}
|
|
1226
|
-
const
|
|
1227
|
-
if (!
|
|
1229
|
+
const C = v;
|
|
1230
|
+
if (!C) {
|
|
1228
1231
|
o.value = !1, i.value = "";
|
|
1229
1232
|
return;
|
|
1230
1233
|
}
|
|
1231
|
-
if (typeof
|
|
1232
|
-
if (
|
|
1234
|
+
if (typeof C == "object")
|
|
1235
|
+
if (C.id && C.type && !C.display)
|
|
1233
1236
|
try {
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
+
const R = (await vt(
|
|
1238
|
+
C.id,
|
|
1239
|
+
C.type
|
|
1237
1240
|
)).records.find(
|
|
1238
|
-
(
|
|
1241
|
+
(I) => I.id === C.id
|
|
1239
1242
|
);
|
|
1240
|
-
|
|
1241
|
-
} catch (
|
|
1242
|
-
console.error("Single fetch detail failed:",
|
|
1243
|
+
R && (i.value = q(R), o.value = !0);
|
|
1244
|
+
} catch (D) {
|
|
1245
|
+
console.error("Single fetch detail failed:", D);
|
|
1243
1246
|
}
|
|
1244
1247
|
else
|
|
1245
|
-
i.value = q(
|
|
1248
|
+
i.value = q(C), o.value = !!i.value;
|
|
1246
1249
|
else
|
|
1247
|
-
i.value = String(
|
|
1250
|
+
i.value = String(C), o.value = !!C;
|
|
1248
1251
|
},
|
|
1249
1252
|
{ immediate: !0, deep: !0 }
|
|
1250
|
-
),
|
|
1253
|
+
), jt(E), {
|
|
1251
1254
|
// 状态
|
|
1252
1255
|
query: n,
|
|
1253
1256
|
isSelected: o,
|
|
1254
1257
|
isDropdownVisible: s,
|
|
1258
|
+
applyDataVisible: c,
|
|
1255
1259
|
selectedLabel: i,
|
|
1256
|
-
inputRef:
|
|
1260
|
+
inputRef: r,
|
|
1257
1261
|
referenceRef: l,
|
|
1258
1262
|
floatingRef: u,
|
|
1259
1263
|
// Hook 状态
|
|
1260
|
-
searchHistory:
|
|
1261
|
-
searchResults:
|
|
1262
|
-
loading:
|
|
1263
|
-
isFetchingMore:
|
|
1264
|
-
isFinished:
|
|
1265
|
-
currentPage:
|
|
1266
|
-
floatingStyles:
|
|
1264
|
+
searchHistory: f,
|
|
1265
|
+
searchResults: m,
|
|
1266
|
+
loading: h,
|
|
1267
|
+
isFetchingMore: y,
|
|
1268
|
+
isFinished: g,
|
|
1269
|
+
currentPage: A,
|
|
1270
|
+
floatingStyles: x,
|
|
1267
1271
|
// Hook 方法
|
|
1268
|
-
saveToHistory:
|
|
1269
|
-
clearHistory:
|
|
1270
|
-
fetchData:
|
|
1271
|
-
filterByTypes:
|
|
1272
|
-
startTrack:
|
|
1273
|
-
stopTrack:
|
|
1272
|
+
saveToHistory: p,
|
|
1273
|
+
clearHistory: d,
|
|
1274
|
+
fetchData: w,
|
|
1275
|
+
filterByTypes: b,
|
|
1276
|
+
startTrack: B,
|
|
1277
|
+
stopTrack: E,
|
|
1274
1278
|
// 组件方法
|
|
1275
|
-
onFocus:
|
|
1276
|
-
handleBlur:
|
|
1277
|
-
onInput:
|
|
1278
|
-
handleDelete:
|
|
1279
|
+
onFocus: V,
|
|
1280
|
+
handleBlur: Q,
|
|
1281
|
+
onInput: _,
|
|
1282
|
+
handleDelete: G,
|
|
1283
|
+
handleConfirmApplyData: H,
|
|
1279
1284
|
// 资源
|
|
1280
|
-
SearchIcon:
|
|
1285
|
+
SearchIcon: hn,
|
|
1286
|
+
ICON_MORE: gn
|
|
1281
1287
|
};
|
|
1282
1288
|
},
|
|
1283
1289
|
computed: {
|
|
@@ -1372,11 +1378,11 @@ const dn = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1372
1378
|
},
|
|
1373
1379
|
getIconUrl(e) {
|
|
1374
1380
|
return {
|
|
1375
|
-
City:
|
|
1376
|
-
Seaport:
|
|
1377
|
-
Airport:
|
|
1378
|
-
Country:
|
|
1379
|
-
}[e] ||
|
|
1381
|
+
City: yn,
|
|
1382
|
+
Seaport: vn,
|
|
1383
|
+
Airport: An,
|
|
1384
|
+
Country: wn
|
|
1385
|
+
}[e] || xn;
|
|
1380
1386
|
},
|
|
1381
1387
|
handleScroll(e) {
|
|
1382
1388
|
const { scrollTop: t, scrollHeight: n, clientHeight: o } = e.target;
|
|
@@ -1384,14 +1390,14 @@ const dn = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1384
1390
|
}
|
|
1385
1391
|
}
|
|
1386
1392
|
});
|
|
1387
|
-
function
|
|
1393
|
+
function Rt(e, t, n, o, s, i, a, r) {
|
|
1388
1394
|
var l = typeof e == "function" ? e.options : e;
|
|
1389
1395
|
return t && (l.render = t, l.staticRenderFns = n, l._compiled = !0), i && (l._scopeId = "data-v-" + i), {
|
|
1390
1396
|
exports: e,
|
|
1391
1397
|
options: l
|
|
1392
1398
|
};
|
|
1393
1399
|
}
|
|
1394
|
-
var
|
|
1400
|
+
var Cn = function() {
|
|
1395
1401
|
var t = this, n = t._self._c;
|
|
1396
1402
|
return t._self._setupProxy, n("div", { staticClass: "search-container" }, [n("div", { ref: "referenceRef", staticClass: "search-input-wrapper", class: { "is-multiple": t.multiple }, on: { click: t.focusInput } }, [n("div", { staticClass: "selection-wrapper" }, [t.multiple && t.selectedItems.length > 0 ? [t._l(t.displayedTags, function(o, s) {
|
|
1397
1403
|
return n("div", { key: o.id || s, staticClass: "search-tag" }, [n("span", { staticClass: "tag-text" }, [t._v(t._s(t.getItemLabel(o)))]), n("span", { staticClass: "tag-close", on: { click: function(i) {
|
|
@@ -1430,17 +1436,23 @@ var An = function() {
|
|
|
1430
1436
|
} } }, [n("div", { staticClass: "category-tag", style: t.showItemTag ? {} : { display: "none" } }, [n("img", { staticClass: "type-icon", attrs: { src: t.getIconUrl(o.type), alt: "" } }), n("span", { staticClass: "type-text" }, [t._v(t._s(t.getItemType(o.type)))])]), n("div", { staticClass: "result-text" }, [t._v(t._s(t.getItemLabel(o)))])]);
|
|
1431
1437
|
});
|
|
1432
1438
|
}, { searchResults: t.searchResults }), t.isFetchingMore ? n("div", { staticClass: "load-more-msg" }, [t._v(" " + t._s(t.isEn ? "Loading more..." : "正在加载更多...") + " ")]) : t.isFinished && t.query ? n("div", { staticClass: "load-more-msg no-more" }, [t._v(" " + t._s(t.isEn ? "All results have been loaded" : "已加载全部结果") + " ")]) : t._e()] : t.query && !t.loading ? n("div", { staticClass: "status-msg" }, [t._t("noData", function() {
|
|
1433
|
-
return [t._v(" " + t._s(t.isEn ?
|
|
1434
|
-
|
|
1435
|
-
},
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
+
return [t.showApplyData ? n("p", { staticClass: "no-result-label" }, [t._v(" " + t._s(t.isEn ? "No results found ." : "暂无结果,") + " "), n("span", { staticClass: "apply-data", on: { click: function(o) {
|
|
1440
|
+
return o.stopPropagation(), (() => t.applyDataVisible = !0).apply(null, arguments);
|
|
1441
|
+
} } }, [t._v(" " + t._s(t.isEn ? "Apply for data addition" : "申请补充数据 "))]), n("img", { staticClass: "apply-data-more-icon", attrs: { src: t.ICON_MORE, alt: "" }, on: { click: function(o) {
|
|
1442
|
+
return o.stopPropagation(), (() => t.applyDataVisible = !0).apply(null, arguments);
|
|
1443
|
+
} } })]) : n("p", { staticClass: "no-result-label" }, [t._v(" " + t._s(t.isEn ? `No results found related to "${t.query}".` : `未找到与 "${t.query}" 相关的结果`) + " ")])];
|
|
1444
|
+
})], 2) : t._e()], 2), n("ApplyDataDialog", { attrs: { value: t.applyDataVisible }, on: { "update:value": function(o) {
|
|
1445
|
+
t.applyDataVisible = o;
|
|
1446
|
+
}, confirm: t.handleConfirmApplyData } })], 1);
|
|
1447
|
+
}, Sn = [], Dn = /* @__PURE__ */ Rt(
|
|
1448
|
+
bn,
|
|
1449
|
+
Cn,
|
|
1450
|
+
Sn,
|
|
1439
1451
|
!1,
|
|
1440
1452
|
null,
|
|
1441
|
-
"
|
|
1453
|
+
"d41f13f3"
|
|
1442
1454
|
);
|
|
1443
|
-
const
|
|
1455
|
+
const le = Dn.exports, Rn = {
|
|
1444
1456
|
__name: "ApplyDataDialog",
|
|
1445
1457
|
props: {
|
|
1446
1458
|
// v-model 绑定,默认 false
|
|
@@ -1451,9 +1463,9 @@ const re = xn.exports, bn = {
|
|
|
1451
1463
|
// 语言设置,默认 'en'
|
|
1452
1464
|
lang: {
|
|
1453
1465
|
type: String,
|
|
1454
|
-
default: "
|
|
1466
|
+
default: "",
|
|
1455
1467
|
// 增加校验,确保只能传入 'en' 或 'cn'
|
|
1456
|
-
validator: (e) => ["en", "en-US", "zh-CN", "cn"].includes(e)
|
|
1468
|
+
validator: (e) => ["", "en", "en-US", "zh-CN", "cn"].includes(e)
|
|
1457
1469
|
},
|
|
1458
1470
|
placeholder: {
|
|
1459
1471
|
type: String,
|
|
@@ -1466,13 +1478,13 @@ const re = xn.exports, bn = {
|
|
|
1466
1478
|
{ typeCn: "城市", typeEn: "City", type: "City" },
|
|
1467
1479
|
{ typeCn: "海运港口", typeEn: "Port", type: "Seaport" },
|
|
1468
1480
|
{ typeCn: "机场", typeEn: "Airport", type: "Airport" }
|
|
1469
|
-
], s = S(null), i =
|
|
1481
|
+
], s = S(null), i = _t({
|
|
1470
1482
|
name: "",
|
|
1471
1483
|
country: ""
|
|
1472
|
-
}),
|
|
1484
|
+
}), a = _t({
|
|
1473
1485
|
name: "",
|
|
1474
1486
|
type: "City"
|
|
1475
|
-
}),
|
|
1487
|
+
}), r = X(() => {
|
|
1476
1488
|
if (n.lang && n.lang !== "")
|
|
1477
1489
|
return n.lang === "en" || n.lang === "en-US";
|
|
1478
1490
|
try {
|
|
@@ -1495,20 +1507,29 @@ const re = xn.exports, bn = {
|
|
|
1495
1507
|
} catch {
|
|
1496
1508
|
}
|
|
1497
1509
|
return !1;
|
|
1498
|
-
})
|
|
1499
|
-
return { __sfc: !0, props: n, emit: t, typeOptions: o, displayQuery: s, errors: i, formData: r, isEn: a, handleClose: () => {
|
|
1510
|
+
}), l = () => {
|
|
1500
1511
|
i.name = "", i.country = "", t("update:value", !1);
|
|
1501
|
-
}
|
|
1512
|
+
};
|
|
1513
|
+
function u() {
|
|
1502
1514
|
i.name = "", i.country = "";
|
|
1503
1515
|
let c = !0;
|
|
1504
|
-
|
|
1505
|
-
...
|
|
1516
|
+
a.name.trim() || (i.name = r.value ? "Please enter the data" : "请输入需要补充的数据", c = !1), s.value || (i.country = r.value ? "Please select a country" : "请选择国家", c = !1), c && (console.log("🍉 ~ ApplyDataDialog.vue:115 ~ handleConfirm ~ data:", {
|
|
1517
|
+
...a,
|
|
1506
1518
|
country: s.value
|
|
1507
|
-
}),
|
|
1508
|
-
|
|
1519
|
+
}), pe({
|
|
1520
|
+
reportData: a.name,
|
|
1521
|
+
reportType: a.type.toLocaleLowerCase(),
|
|
1522
|
+
countryId: s.value.id
|
|
1523
|
+
}).then((f) => {
|
|
1524
|
+
console.log("🍉 ~ ApplyDataDialog.vue:185 ~ handleConfirm ~ res:", f);
|
|
1525
|
+
}).catch((f) => {
|
|
1526
|
+
console.log("🍉 ~ ApplyDataDialog.vue:187 ~ handleConfirm ~ err:", f);
|
|
1527
|
+
}), t("confirm", { ...a, country: s.value }));
|
|
1528
|
+
}
|
|
1529
|
+
return { __sfc: !0, props: n, emit: t, typeOptions: o, displayQuery: s, errors: i, formData: a, isEn: r, handleClose: l, handleConfirm: u, Search: le };
|
|
1509
1530
|
}
|
|
1510
1531
|
};
|
|
1511
|
-
var
|
|
1532
|
+
var En = function() {
|
|
1512
1533
|
var t = this, n = t._self._c, o = t._self._setupProxy;
|
|
1513
1534
|
return t.value ? n("div", { staticClass: "modal-mask", on: { click: function(s) {
|
|
1514
1535
|
return s.target !== s.currentTarget ? null : o.handleClose.apply(null, arguments);
|
|
@@ -1520,30 +1541,30 @@ var Cn = function() {
|
|
|
1520
1541
|
return n("div", { key: s.type, class: ["type-btn", { active: o.formData.type === s.type }], on: { click: function(i) {
|
|
1521
1542
|
o.formData.type = s.type;
|
|
1522
1543
|
} } }, [t._v(" " + t._s(o.isEn ? s.typeEn : s.typeCn) + " "), o.formData.type === s.type ? n("div", { staticClass: "check-mark" }) : t._e()]);
|
|
1523
|
-
}), 0)]), n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v(t._s(o.isEn ? "Country" : "国家"))]), n("div", { class: { "search-error-wrap": o.errors.country } }, [n(o.Search, { style: { margin: "0 auto" }, attrs: { "search-type-list": ["Country"], lang: t.lang, placeholder: t.placeholder ?? (o.isEn ? " Please enter" : "请输入") }, on: { "update:model-value": function(s) {
|
|
1544
|
+
}), 0)]), n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v(t._s(o.isEn ? "Country" : "国家"))]), n("div", { class: { "search-error-wrap": o.errors.country } }, [n(o.Search, { style: { margin: "0 auto" }, attrs: { "search-type-list": ["Country"], lang: t.lang, "show-apply-data": !1, "show-search-icon": !1, placeholder: t.placeholder ?? (o.isEn ? " Please enter" : "请输入") }, on: { "update:model-value": function(s) {
|
|
1524
1545
|
o.errors.country = "";
|
|
1525
1546
|
} }, model: { value: o.displayQuery, callback: function(s) {
|
|
1526
1547
|
o.displayQuery = s;
|
|
1527
1548
|
}, expression: "displayQuery" } })], 1), o.errors.country ? n("div", { staticClass: "error-message" }, [t._v(" " + t._s(o.errors.country) + " ")]) : t._e()])]), n("div", { staticClass: "modal-footer" }, [n("button", { staticClass: "confirm-btn", on: { click: o.handleConfirm } }, [t._v(" " + t._s(o.isEn ? "Submit" : "申请补充") + " ")])])])]) : t._e();
|
|
1528
|
-
},
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1549
|
+
}, On = [], kn = /* @__PURE__ */ Rt(
|
|
1550
|
+
Rn,
|
|
1551
|
+
En,
|
|
1552
|
+
On,
|
|
1532
1553
|
!1,
|
|
1533
1554
|
null,
|
|
1534
|
-
"
|
|
1555
|
+
"93a70c74"
|
|
1535
1556
|
);
|
|
1536
|
-
const
|
|
1557
|
+
const _n = kn.exports, Tn = {
|
|
1537
1558
|
// 2. 局部注册组件
|
|
1538
1559
|
components: {
|
|
1560
|
+
[Nt.name]: Nt,
|
|
1561
|
+
[Pt.name]: Pt,
|
|
1539
1562
|
[Mt.name]: Mt,
|
|
1540
1563
|
[Bt.name]: Bt,
|
|
1541
|
-
[Ft.name]: Ft,
|
|
1542
1564
|
[Lt.name]: Lt,
|
|
1565
|
+
[Ft.name]: Ft,
|
|
1543
1566
|
[It.name]: It,
|
|
1544
|
-
[Tt.name]: Tt
|
|
1545
|
-
[kt.name]: kt,
|
|
1546
|
-
[_t.name]: _t
|
|
1567
|
+
[Tt.name]: Tt
|
|
1547
1568
|
},
|
|
1548
1569
|
data() {
|
|
1549
1570
|
return {
|
|
@@ -1579,10 +1600,10 @@ const Dn = Rn.exports, En = {
|
|
|
1579
1600
|
};
|
|
1580
1601
|
},
|
|
1581
1602
|
mounted() {
|
|
1582
|
-
|
|
1603
|
+
Y.on(j.Open, this.handleOpen);
|
|
1583
1604
|
},
|
|
1584
1605
|
beforeDestroy() {
|
|
1585
|
-
|
|
1606
|
+
Y.off(j.Open, this.handleOpen);
|
|
1586
1607
|
},
|
|
1587
1608
|
methods: {
|
|
1588
1609
|
handleOpen() {
|
|
@@ -1592,16 +1613,16 @@ const Dn = Rn.exports, En = {
|
|
|
1592
1613
|
), this.isVisible = !0;
|
|
1593
1614
|
},
|
|
1594
1615
|
closeModal() {
|
|
1595
|
-
this.isVisible = !1,
|
|
1616
|
+
this.isVisible = !1, Y.emit(j.Close), this.$refs.formRef.resetFields();
|
|
1596
1617
|
},
|
|
1597
1618
|
handleSubmit() {
|
|
1598
1619
|
this.$refs.formRef.validate((e) => {
|
|
1599
|
-
e && (
|
|
1620
|
+
e && (Y.emit(j.Submit, { ...this.formData }), this.closeModal());
|
|
1600
1621
|
});
|
|
1601
1622
|
}
|
|
1602
1623
|
}
|
|
1603
1624
|
};
|
|
1604
|
-
var
|
|
1625
|
+
var In = function() {
|
|
1605
1626
|
var t = this, n = t._self._c;
|
|
1606
1627
|
return n("el-dialog", { attrs: { visible: t.isVisible, "before-close": t.closeModal, "show-close": !1, "close-on-click-modal": !0, width: "500px", "custom-class": "global-modal-custom" }, on: { "update:visible": function(o) {
|
|
1607
1628
|
t.isVisible = o;
|
|
@@ -1620,62 +1641,62 @@ var On = function() {
|
|
|
1620
1641
|
}, expression: "formData.name" } })], 1)], 1)], 1), n("el-form-item", { staticClass: "agreement-item", attrs: { prop: "agreement" } }, [n("el-checkbox", { model: { value: t.formData.agreement, callback: function(o) {
|
|
1621
1642
|
t.$set(t.formData, "agreement", o);
|
|
1622
1643
|
}, expression: "formData.agreement" } }, [t._v("我同意")]), n("a", { staticClass: "privacy-link", attrs: { href: "#" } }, [t._v("隐私政策")])], 1)], 1)], 1), n("div", { staticClass: "global-modal-footer-custom", attrs: { slot: "footer" }, slot: "footer" }, [n("el-button", { staticClass: "submit-button-custom", attrs: { type: "primary" }, on: { click: t.handleSubmit } }, [t._v(" 加入会员 ")])], 1)]);
|
|
1623
|
-
},
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1644
|
+
}, Fn = [], Ln = /* @__PURE__ */ Rt(
|
|
1645
|
+
Tn,
|
|
1646
|
+
In,
|
|
1647
|
+
Fn,
|
|
1627
1648
|
!1,
|
|
1628
1649
|
null,
|
|
1629
1650
|
null
|
|
1630
1651
|
);
|
|
1631
|
-
const
|
|
1632
|
-
let
|
|
1652
|
+
const Bn = Ln.exports;
|
|
1653
|
+
let Mn = {
|
|
1633
1654
|
open() {
|
|
1634
|
-
|
|
1655
|
+
Y.emit(j.Open);
|
|
1635
1656
|
},
|
|
1636
1657
|
close() {
|
|
1637
|
-
|
|
1658
|
+
Y.emit(j.Close);
|
|
1638
1659
|
},
|
|
1639
1660
|
onSubmit(e) {
|
|
1640
|
-
|
|
1661
|
+
Y.on(j.Submit, e);
|
|
1641
1662
|
}
|
|
1642
1663
|
};
|
|
1643
|
-
function
|
|
1664
|
+
function Qn() {
|
|
1644
1665
|
let e = !1;
|
|
1645
1666
|
return {
|
|
1646
1667
|
install(t) {
|
|
1647
1668
|
if (typeof window < "u" && !e) {
|
|
1648
1669
|
const n = document.createElement("div");
|
|
1649
1670
|
n.setAttribute("id", "global-modal-root"), document.body.appendChild(n);
|
|
1650
|
-
const o = t.extend(
|
|
1671
|
+
const o = t.extend(Bn);
|
|
1651
1672
|
new o().$mount(n), e = !0;
|
|
1652
1673
|
}
|
|
1653
|
-
t.prototype.$globalModal =
|
|
1674
|
+
t.prototype.$globalModal = Mn;
|
|
1654
1675
|
}
|
|
1655
1676
|
};
|
|
1656
1677
|
}
|
|
1657
|
-
const
|
|
1658
|
-
ApplyDataDialog:
|
|
1659
|
-
JcSearch:
|
|
1678
|
+
const Kt = {
|
|
1679
|
+
ApplyDataDialog: _n,
|
|
1680
|
+
JcSearch: le
|
|
1660
1681
|
};
|
|
1661
|
-
let
|
|
1662
|
-
const
|
|
1682
|
+
let Yt = !1;
|
|
1683
|
+
const Hn = {
|
|
1663
1684
|
/**
|
|
1664
1685
|
* Vue 2 插件安装方法
|
|
1665
1686
|
* @param Vue Vue 的构造函数
|
|
1666
1687
|
*/
|
|
1667
1688
|
install(e, t) {
|
|
1668
|
-
|
|
1669
|
-
e.component(n,
|
|
1689
|
+
Yt || (Yt = !0, t?.sharedConfig && me(t.sharedConfig), Object.keys(Kt).forEach((n) => {
|
|
1690
|
+
e.component(n, Kt[n]);
|
|
1670
1691
|
}));
|
|
1671
1692
|
}
|
|
1672
1693
|
};
|
|
1673
1694
|
export {
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1695
|
+
_n as ApplyDataDialog,
|
|
1696
|
+
Bn as GlobalModal,
|
|
1697
|
+
le as JcSearch,
|
|
1698
|
+
Wn as MODAL_ACTION,
|
|
1699
|
+
Qn as createGlobalModalPlugin,
|
|
1700
|
+
Hn as default,
|
|
1701
|
+
Jn as emitter
|
|
1681
1702
|
};
|