@jctrans-materials/comps-vue2 1.0.3 → 1.0.5
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 +4 -2
- package/dist/index.cjs.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.esm.js +519 -462
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { locationSearchV2 as
|
|
1
|
+
import se, { ref as C, computed as X, onMounted as ie, onBeforeUnmount as qt, defineComponent as re, toRef as bt, watch as mt, reactive as Ct } from "vue";
|
|
2
|
+
import { locationSearchV2 as Wt, emitter as K, MODAL_ACTION as Y, initSharedConfig as le } from "@jctrans-materials/shared";
|
|
3
3
|
import { MODAL_ACTION as Mn, emitter as Pn } from "@jctrans-materials/shared";
|
|
4
|
-
import { Col as
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
const t = C([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", s =
|
|
4
|
+
import { Col as St, Row as Rt, Checkbox as Dt, Button as Et, Input as Ot, FormItem as _t, Form as kt, Dialog as Tt } from "jctrans-ui";
|
|
5
|
+
se.util.warn;
|
|
6
|
+
function ae(e) {
|
|
7
|
+
const t = C([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", s = X(
|
|
8
8
|
() => (e.value || "") + n
|
|
9
|
-
), i =
|
|
9
|
+
), i = X(
|
|
10
10
|
() => !!e.value && e.value !== ""
|
|
11
11
|
), r = (a) => {
|
|
12
12
|
if (!a || !o) return;
|
|
13
|
-
const
|
|
14
|
-
(
|
|
13
|
+
const u = t.value.filter(
|
|
14
|
+
(f) => f.id && f.id !== a.id || f.display !== a.display
|
|
15
15
|
);
|
|
16
|
-
|
|
17
|
-
const
|
|
16
|
+
u.unshift(a);
|
|
17
|
+
const c = u.slice(0, 4);
|
|
18
18
|
if (i.value) {
|
|
19
|
-
t.value =
|
|
19
|
+
t.value = c;
|
|
20
20
|
try {
|
|
21
|
-
localStorage.setItem(s.value, JSON.stringify(
|
|
22
|
-
} catch (
|
|
23
|
-
console.warn("LocalStorage save failed:",
|
|
21
|
+
localStorage.setItem(s.value, JSON.stringify(c));
|
|
22
|
+
} catch (f) {
|
|
23
|
+
console.warn("LocalStorage save failed:", f);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}, l = () => {
|
|
27
27
|
t.value = [], o && localStorage.removeItem(s.value);
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return ie(() => {
|
|
30
30
|
if (o && i.value) {
|
|
31
31
|
const a = localStorage.getItem(s.value);
|
|
32
32
|
if (a)
|
|
@@ -43,26 +43,26 @@ function le(e) {
|
|
|
43
43
|
HasHistory: i
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
async function
|
|
46
|
+
async function ce(e, t = [
|
|
47
47
|
"Continent",
|
|
48
48
|
"Country",
|
|
49
49
|
"City",
|
|
50
50
|
"Seaport",
|
|
51
51
|
"Airport"
|
|
52
52
|
], n = {}) {
|
|
53
|
-
return
|
|
53
|
+
return Wt.searchByName({
|
|
54
54
|
keyword: e,
|
|
55
55
|
displayInfo: t,
|
|
56
56
|
...n
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
const
|
|
59
|
+
const It = (e, t) => Wt.searchByIdWithType(e, t);
|
|
60
60
|
function ue(e, t) {
|
|
61
|
-
const n = C([]), o = C(!1), s = C(!1), i = C(1), r = C(0), l = C(10), a =
|
|
61
|
+
const n = C([]), o = C(!1), s = C(!1), i = C(1), r = C(0), l = C(10), a = X(() => r.value === 0 ? !1 : n.value.length >= r.value), u = X(() => {
|
|
62
62
|
const m = [...t.value];
|
|
63
63
|
return m.includes("Country") && !m.includes("Region") && m.push("Region"), m;
|
|
64
|
-
}),
|
|
65
|
-
(
|
|
64
|
+
}), c = (m) => !m || !Array.isArray(m) ? [] : m.filter(
|
|
65
|
+
(d) => u.value.includes(d.type)
|
|
66
66
|
);
|
|
67
67
|
return {
|
|
68
68
|
searchResults: n,
|
|
@@ -71,15 +71,15 @@ function ue(e, t) {
|
|
|
71
71
|
isFinished: a,
|
|
72
72
|
currentPage: i,
|
|
73
73
|
total: r,
|
|
74
|
-
fetchData: async (m = 1,
|
|
75
|
-
if (!e.value.trim() && !
|
|
74
|
+
fetchData: async (m = 1, d = !1) => {
|
|
75
|
+
if (!e.value.trim() && !d) {
|
|
76
76
|
n.value = [], r.value = 0;
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
if (!(
|
|
80
|
-
|
|
79
|
+
if (!(d && (s.value || a.value)) && !(!d && o.value)) {
|
|
80
|
+
d ? s.value = !0 : (o.value = !0, i.value = 1);
|
|
81
81
|
try {
|
|
82
|
-
const p = await
|
|
82
|
+
const p = await ce(
|
|
83
83
|
e.value,
|
|
84
84
|
t.value,
|
|
85
85
|
{
|
|
@@ -87,8 +87,8 @@ function ue(e, t) {
|
|
|
87
87
|
// 使用传入的 page 参数
|
|
88
88
|
size: l.value
|
|
89
89
|
}
|
|
90
|
-
), h = p.records || [], y =
|
|
91
|
-
|
|
90
|
+
), h = p.records || [], y = c(h);
|
|
91
|
+
d ? n.value = [...n.value, ...y] : n.value = y, r.value = p.total || 0, i.value = m;
|
|
92
92
|
} catch (p) {
|
|
93
93
|
console.error("Failed to fetch search results:", p);
|
|
94
94
|
} finally {
|
|
@@ -96,10 +96,10 @@ function ue(e, t) {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
filterByTypes:
|
|
99
|
+
filterByTypes: c
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const $ = Math.min, E = Math.max, rt = Math.round, it = Math.floor, B = (e) => ({
|
|
103
103
|
x: e,
|
|
104
104
|
y: e
|
|
105
105
|
}), fe = {
|
|
@@ -111,50 +111,50 @@ const Y = Math.min, R = Math.max, it = Math.round, st = Math.floor, I = (e) => (
|
|
|
111
111
|
start: "end",
|
|
112
112
|
end: "start"
|
|
113
113
|
};
|
|
114
|
-
function
|
|
115
|
-
return
|
|
114
|
+
function Lt(e, t, n) {
|
|
115
|
+
return E(e, $(t, n));
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function nt(e, t) {
|
|
118
118
|
return typeof e == "function" ? e(t) : e;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function W(e) {
|
|
121
121
|
return e.split("-")[0];
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function ot(e) {
|
|
124
124
|
return e.split("-")[1];
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Jt(e) {
|
|
127
127
|
return e === "x" ? "y" : "x";
|
|
128
128
|
}
|
|
129
129
|
function Gt(e) {
|
|
130
130
|
return e === "y" ? "height" : "width";
|
|
131
131
|
}
|
|
132
132
|
const me = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
133
|
-
function
|
|
134
|
-
return me.has(
|
|
133
|
+
function Q(e) {
|
|
134
|
+
return me.has(W(e)) ? "y" : "x";
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
return
|
|
136
|
+
function Kt(e) {
|
|
137
|
+
return Jt(Q(e));
|
|
138
138
|
}
|
|
139
139
|
function pe(e, t, n) {
|
|
140
140
|
n === void 0 && (n = !1);
|
|
141
|
-
const o =
|
|
141
|
+
const o = ot(e), s = Kt(e), i = Gt(s);
|
|
142
142
|
let r = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
143
|
-
return t.reference[i] > t.floating[i] && (r =
|
|
143
|
+
return t.reference[i] > t.floating[i] && (r = lt(r)), [r, lt(r)];
|
|
144
144
|
}
|
|
145
145
|
function he(e) {
|
|
146
|
-
const t =
|
|
147
|
-
return [
|
|
146
|
+
const t = lt(e);
|
|
147
|
+
return [ht(e), t, ht(t)];
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function ht(e) {
|
|
150
150
|
return e.replace(/start|end/g, (t) => de[t]);
|
|
151
151
|
}
|
|
152
|
-
const Ft = ["left", "right"],
|
|
152
|
+
const Ft = ["left", "right"], Bt = ["right", "left"], ge = ["top", "bottom"], ye = ["bottom", "top"];
|
|
153
153
|
function ve(e, t, n) {
|
|
154
154
|
switch (e) {
|
|
155
155
|
case "top":
|
|
156
156
|
case "bottom":
|
|
157
|
-
return n ? t ?
|
|
157
|
+
return n ? t ? Bt : Ft : t ? Ft : Bt;
|
|
158
158
|
case "left":
|
|
159
159
|
case "right":
|
|
160
160
|
return t ? ge : ye;
|
|
@@ -163,11 +163,11 @@ function ve(e, t, n) {
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
function Ae(e, t, n, o) {
|
|
166
|
-
const s =
|
|
167
|
-
let i = ve(
|
|
168
|
-
return s && (i = i.map((r) => r + "-" + s), t && (i = i.concat(i.map(
|
|
166
|
+
const s = ot(e);
|
|
167
|
+
let i = ve(W(e), n === "start", o);
|
|
168
|
+
return s && (i = i.map((r) => r + "-" + s), t && (i = i.concat(i.map(ht)))), i;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function lt(e) {
|
|
171
171
|
return e.replace(/left|right|bottom|top/g, (t) => fe[t]);
|
|
172
172
|
}
|
|
173
173
|
function we(e) {
|
|
@@ -187,7 +187,7 @@ function xe(e) {
|
|
|
187
187
|
left: e
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function at(e) {
|
|
191
191
|
const {
|
|
192
192
|
x: t,
|
|
193
193
|
y: n,
|
|
@@ -205,53 +205,53 @@ function lt(e) {
|
|
|
205
205
|
y: n
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Mt(e, t, n) {
|
|
209
209
|
let {
|
|
210
210
|
reference: o,
|
|
211
211
|
floating: s
|
|
212
212
|
} = e;
|
|
213
|
-
const i =
|
|
214
|
-
let
|
|
213
|
+
const i = Q(t), r = Kt(t), l = Gt(r), a = W(t), u = i === "y", c = o.x + o.width / 2 - s.width / 2, f = o.y + o.height / 2 - s.height / 2, m = o[l] / 2 - s[l] / 2;
|
|
214
|
+
let d;
|
|
215
215
|
switch (a) {
|
|
216
216
|
case "top":
|
|
217
|
-
|
|
218
|
-
x:
|
|
217
|
+
d = {
|
|
218
|
+
x: c,
|
|
219
219
|
y: o.y - s.height
|
|
220
220
|
};
|
|
221
221
|
break;
|
|
222
222
|
case "bottom":
|
|
223
|
-
|
|
224
|
-
x:
|
|
223
|
+
d = {
|
|
224
|
+
x: c,
|
|
225
225
|
y: o.y + o.height
|
|
226
226
|
};
|
|
227
227
|
break;
|
|
228
228
|
case "right":
|
|
229
|
-
|
|
229
|
+
d = {
|
|
230
230
|
x: o.x + o.width,
|
|
231
|
-
y:
|
|
231
|
+
y: f
|
|
232
232
|
};
|
|
233
233
|
break;
|
|
234
234
|
case "left":
|
|
235
|
-
|
|
235
|
+
d = {
|
|
236
236
|
x: o.x - s.width,
|
|
237
|
-
y:
|
|
237
|
+
y: f
|
|
238
238
|
};
|
|
239
239
|
break;
|
|
240
240
|
default:
|
|
241
|
-
|
|
241
|
+
d = {
|
|
242
242
|
x: o.x,
|
|
243
243
|
y: o.y
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
|
-
switch (
|
|
246
|
+
switch (ot(t)) {
|
|
247
247
|
case "start":
|
|
248
|
-
|
|
248
|
+
d[r] -= m * (n && u ? -1 : 1);
|
|
249
249
|
break;
|
|
250
250
|
case "end":
|
|
251
|
-
|
|
251
|
+
d[r] += m * (n && u ? -1 : 1);
|
|
252
252
|
break;
|
|
253
253
|
}
|
|
254
|
-
return
|
|
254
|
+
return d;
|
|
255
255
|
}
|
|
256
256
|
const be = async (e, t, n) => {
|
|
257
257
|
const {
|
|
@@ -260,61 +260,61 @@ const be = async (e, t, n) => {
|
|
|
260
260
|
middleware: i = [],
|
|
261
261
|
platform: r
|
|
262
262
|
} = n, l = i.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(t));
|
|
263
|
-
let
|
|
263
|
+
let u = await r.getElementRects({
|
|
264
264
|
reference: e,
|
|
265
265
|
floating: t,
|
|
266
266
|
strategy: s
|
|
267
267
|
}), {
|
|
268
|
-
x:
|
|
269
|
-
y:
|
|
270
|
-
} =
|
|
268
|
+
x: c,
|
|
269
|
+
y: f
|
|
270
|
+
} = Mt(u, o, a), m = o, d = {}, p = 0;
|
|
271
271
|
for (let h = 0; h < l.length; h++) {
|
|
272
272
|
const {
|
|
273
273
|
name: y,
|
|
274
274
|
fn: g
|
|
275
275
|
} = l[h], {
|
|
276
276
|
x: v,
|
|
277
|
-
y:
|
|
277
|
+
y: w,
|
|
278
278
|
data: b,
|
|
279
|
-
reset:
|
|
279
|
+
reset: x
|
|
280
280
|
} = await g({
|
|
281
|
-
x:
|
|
282
|
-
y:
|
|
281
|
+
x: c,
|
|
282
|
+
y: f,
|
|
283
283
|
initialPlacement: o,
|
|
284
284
|
placement: m,
|
|
285
285
|
strategy: s,
|
|
286
|
-
middlewareData:
|
|
287
|
-
rects:
|
|
286
|
+
middlewareData: d,
|
|
287
|
+
rects: u,
|
|
288
288
|
platform: r,
|
|
289
289
|
elements: {
|
|
290
290
|
reference: e,
|
|
291
291
|
floating: t
|
|
292
292
|
}
|
|
293
293
|
});
|
|
294
|
-
|
|
295
|
-
...
|
|
294
|
+
c = v ?? c, f = w ?? f, d = {
|
|
295
|
+
...d,
|
|
296
296
|
[y]: {
|
|
297
|
-
...
|
|
297
|
+
...d[y],
|
|
298
298
|
...b
|
|
299
299
|
}
|
|
300
|
-
},
|
|
300
|
+
}, x && p <= 50 && (p++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (u = x.rects === !0 ? await r.getElementRects({
|
|
301
301
|
reference: e,
|
|
302
302
|
floating: t,
|
|
303
303
|
strategy: s
|
|
304
|
-
}) :
|
|
305
|
-
x:
|
|
306
|
-
y:
|
|
307
|
-
} =
|
|
304
|
+
}) : x.rects), {
|
|
305
|
+
x: c,
|
|
306
|
+
y: f
|
|
307
|
+
} = Mt(u, m, a)), h = -1);
|
|
308
308
|
}
|
|
309
309
|
return {
|
|
310
|
-
x:
|
|
311
|
-
y:
|
|
310
|
+
x: c,
|
|
311
|
+
y: f,
|
|
312
312
|
placement: m,
|
|
313
313
|
strategy: s,
|
|
314
|
-
middlewareData:
|
|
314
|
+
middlewareData: d
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
|
-
async function
|
|
317
|
+
async function yt(e, t) {
|
|
318
318
|
var n;
|
|
319
319
|
t === void 0 && (t = {});
|
|
320
320
|
const {
|
|
@@ -325,38 +325,38 @@ async function gt(e, t) {
|
|
|
325
325
|
elements: l,
|
|
326
326
|
strategy: a
|
|
327
327
|
} = e, {
|
|
328
|
-
boundary:
|
|
329
|
-
rootBoundary:
|
|
330
|
-
elementContext:
|
|
328
|
+
boundary: u = "clippingAncestors",
|
|
329
|
+
rootBoundary: c = "viewport",
|
|
330
|
+
elementContext: f = "floating",
|
|
331
331
|
altBoundary: m = !1,
|
|
332
|
-
padding:
|
|
333
|
-
} =
|
|
332
|
+
padding: d = 0
|
|
333
|
+
} = nt(t, e), p = xe(d), y = l[m ? f === "floating" ? "reference" : "floating" : f], g = at(await i.getClippingRect({
|
|
334
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(l.floating)),
|
|
335
|
-
boundary:
|
|
336
|
-
rootBoundary:
|
|
335
|
+
boundary: u,
|
|
336
|
+
rootBoundary: c,
|
|
337
337
|
strategy: a
|
|
338
|
-
})), v =
|
|
338
|
+
})), v = f === "floating" ? {
|
|
339
339
|
x: o,
|
|
340
340
|
y: s,
|
|
341
341
|
width: r.floating.width,
|
|
342
342
|
height: r.floating.height
|
|
343
|
-
} : r.reference,
|
|
343
|
+
} : r.reference, w = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.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
|
-
},
|
|
349
|
+
}, x = at(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
350
350
|
elements: l,
|
|
351
351
|
rect: v,
|
|
352
|
-
offsetParent:
|
|
352
|
+
offsetParent: w,
|
|
353
353
|
strategy: a
|
|
354
354
|
}) : v);
|
|
355
355
|
return {
|
|
356
|
-
top: (g.top -
|
|
357
|
-
bottom: (
|
|
358
|
-
left: (g.left -
|
|
359
|
-
right: (
|
|
356
|
+
top: (g.top - x.top + p.top) / b.y,
|
|
357
|
+
bottom: (x.bottom - g.bottom + p.bottom) / b.y,
|
|
358
|
+
left: (g.left - x.left + p.left) / b.x,
|
|
359
|
+
right: (x.right - g.right + p.right) / b.x
|
|
360
360
|
};
|
|
361
361
|
}
|
|
362
362
|
const Ce = function(e) {
|
|
@@ -371,101 +371,101 @@ const Ce = function(e) {
|
|
|
371
371
|
rects: r,
|
|
372
372
|
initialPlacement: l,
|
|
373
373
|
platform: a,
|
|
374
|
-
elements:
|
|
374
|
+
elements: u
|
|
375
375
|
} = t, {
|
|
376
|
-
mainAxis:
|
|
377
|
-
crossAxis:
|
|
376
|
+
mainAxis: c = !0,
|
|
377
|
+
crossAxis: f = !0,
|
|
378
378
|
fallbackPlacements: m,
|
|
379
|
-
fallbackStrategy:
|
|
379
|
+
fallbackStrategy: d = "bestFit",
|
|
380
380
|
fallbackAxisSideDirection: p = "none",
|
|
381
381
|
flipAlignment: h = !0,
|
|
382
382
|
...y
|
|
383
|
-
} =
|
|
383
|
+
} = nt(e, t);
|
|
384
384
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
385
385
|
return {};
|
|
386
|
-
const g =
|
|
387
|
-
!m &&
|
|
388
|
-
const
|
|
389
|
-
let
|
|
390
|
-
if (
|
|
391
|
-
const
|
|
392
|
-
|
|
386
|
+
const g = W(s), v = Q(l), w = W(l) === l, b = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), x = m || (w || !h ? [lt(l)] : he(l)), k = p !== "none";
|
|
387
|
+
!m && k && x.push(...Ae(l, h, p, b));
|
|
388
|
+
const _ = [l, ...x], N = await yt(t, y), V = [];
|
|
389
|
+
let T = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
390
|
+
if (c && V.push(N[g]), f) {
|
|
391
|
+
const R = pe(s, r, b);
|
|
392
|
+
V.push(N[R[0]], N[R[1]]);
|
|
393
393
|
}
|
|
394
|
-
if (
|
|
394
|
+
if (T = [...T, {
|
|
395
395
|
placement: s,
|
|
396
|
-
overflows:
|
|
397
|
-
}], !
|
|
398
|
-
var
|
|
399
|
-
const
|
|
400
|
-
if (
|
|
396
|
+
overflows: V
|
|
397
|
+
}], !V.every((R) => R <= 0)) {
|
|
398
|
+
var G, H;
|
|
399
|
+
const R = (((G = i.flip) == null ? void 0 : G.index) || 0) + 1, S = _[R];
|
|
400
|
+
if (S && (!(f === "alignment" ? v !== Q(S) : !1) || // We leave the current main axis only if every placement on that axis
|
|
401
401
|
// overflows the main axis.
|
|
402
|
-
|
|
402
|
+
T.every((D) => Q(D.placement) === v ? D.overflows[0] > 0 : !0)))
|
|
403
403
|
return {
|
|
404
404
|
data: {
|
|
405
|
-
index:
|
|
406
|
-
overflows:
|
|
405
|
+
index: R,
|
|
406
|
+
overflows: T
|
|
407
407
|
},
|
|
408
408
|
reset: {
|
|
409
|
-
placement:
|
|
409
|
+
placement: S
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
|
-
let
|
|
413
|
-
if (
|
|
414
|
-
switch (
|
|
412
|
+
let U = (H = T.filter((F) => F.overflows[0] <= 0).sort((F, D) => F.overflows[1] - D.overflows[1])[0]) == null ? void 0 : H.placement;
|
|
413
|
+
if (!U)
|
|
414
|
+
switch (d) {
|
|
415
415
|
case "bestFit": {
|
|
416
|
-
var
|
|
417
|
-
const
|
|
418
|
-
if (
|
|
419
|
-
const
|
|
420
|
-
return
|
|
416
|
+
var A;
|
|
417
|
+
const F = (A = T.filter((D) => {
|
|
418
|
+
if (k) {
|
|
419
|
+
const q = Q(D.placement);
|
|
420
|
+
return q === v || // Create a bias to the `y` side axis due to horizontal
|
|
421
421
|
// reading directions favoring greater width.
|
|
422
|
-
|
|
422
|
+
q === "y";
|
|
423
423
|
}
|
|
424
424
|
return !0;
|
|
425
|
-
}).map((
|
|
426
|
-
|
|
425
|
+
}).map((D) => [D.placement, D.overflows.filter((q) => q > 0).reduce((q, oe) => q + oe, 0)]).sort((D, q) => D[1] - q[1])[0]) == null ? void 0 : A[0];
|
|
426
|
+
F && (U = F);
|
|
427
427
|
break;
|
|
428
428
|
}
|
|
429
429
|
case "initialPlacement":
|
|
430
|
-
|
|
430
|
+
U = l;
|
|
431
431
|
break;
|
|
432
432
|
}
|
|
433
|
-
if (s !==
|
|
433
|
+
if (s !== U)
|
|
434
434
|
return {
|
|
435
435
|
reset: {
|
|
436
|
-
placement:
|
|
436
|
+
placement: U
|
|
437
437
|
}
|
|
438
438
|
};
|
|
439
439
|
}
|
|
440
440
|
return {};
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
|
-
},
|
|
444
|
-
async function
|
|
443
|
+
}, Se = /* @__PURE__ */ new Set(["left", "top"]);
|
|
444
|
+
async function Re(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)), r =
|
|
449
|
+
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = W(n), l = ot(n), a = Q(n) === "y", u = Se.has(r) ? -1 : 1, c = i && a ? -1 : 1, f = nt(t, e);
|
|
450
450
|
let {
|
|
451
451
|
mainAxis: m,
|
|
452
|
-
crossAxis:
|
|
452
|
+
crossAxis: d,
|
|
453
453
|
alignmentAxis: p
|
|
454
|
-
} = typeof
|
|
455
|
-
mainAxis:
|
|
454
|
+
} = typeof f == "number" ? {
|
|
455
|
+
mainAxis: f,
|
|
456
456
|
crossAxis: 0,
|
|
457
457
|
alignmentAxis: null
|
|
458
458
|
} : {
|
|
459
|
-
mainAxis:
|
|
460
|
-
crossAxis:
|
|
461
|
-
alignmentAxis:
|
|
459
|
+
mainAxis: f.mainAxis || 0,
|
|
460
|
+
crossAxis: f.crossAxis || 0,
|
|
461
|
+
alignmentAxis: f.alignmentAxis
|
|
462
462
|
};
|
|
463
|
-
return l && typeof p == "number" && (
|
|
464
|
-
x:
|
|
465
|
-
y: m *
|
|
463
|
+
return l && typeof p == "number" && (d = l === "end" ? p * -1 : p), a ? {
|
|
464
|
+
x: d * c,
|
|
465
|
+
y: m * u
|
|
466
466
|
} : {
|
|
467
|
-
x: m *
|
|
468
|
-
y:
|
|
467
|
+
x: m * u,
|
|
468
|
+
y: d * c
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
471
|
const De = function(e) {
|
|
@@ -479,7 +479,7 @@ const De = function(e) {
|
|
|
479
479
|
y: i,
|
|
480
480
|
placement: r,
|
|
481
481
|
middlewareData: l
|
|
482
|
-
} = t, a = await
|
|
482
|
+
} = t, a = await Re(t, e);
|
|
483
483
|
return r === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
|
|
484
484
|
x: s + a.x,
|
|
485
485
|
y: i + a.y,
|
|
@@ -515,23 +515,23 @@ const De = function(e) {
|
|
|
515
515
|
}
|
|
516
516
|
},
|
|
517
517
|
...a
|
|
518
|
-
} =
|
|
518
|
+
} = nt(e, t), u = {
|
|
519
519
|
x: n,
|
|
520
520
|
y: o
|
|
521
|
-
},
|
|
522
|
-
let
|
|
521
|
+
}, c = await yt(t, a), f = Q(W(s)), m = Jt(f);
|
|
522
|
+
let d = u[m], p = u[f];
|
|
523
523
|
if (i) {
|
|
524
|
-
const y = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", v =
|
|
525
|
-
|
|
524
|
+
const y = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", v = d + c[y], w = d - c[g];
|
|
525
|
+
d = Lt(v, d, w);
|
|
526
526
|
}
|
|
527
527
|
if (r) {
|
|
528
|
-
const y =
|
|
529
|
-
p =
|
|
528
|
+
const y = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", v = p + c[y], w = p - c[g];
|
|
529
|
+
p = Lt(v, p, w);
|
|
530
530
|
}
|
|
531
531
|
const h = l.fn({
|
|
532
532
|
...t,
|
|
533
|
-
[m]:
|
|
534
|
-
[
|
|
533
|
+
[m]: d,
|
|
534
|
+
[f]: p
|
|
535
535
|
});
|
|
536
536
|
return {
|
|
537
537
|
...h,
|
|
@@ -540,7 +540,7 @@ const De = function(e) {
|
|
|
540
540
|
y: h.y - o,
|
|
541
541
|
enabled: {
|
|
542
542
|
[m]: i,
|
|
543
|
-
[
|
|
543
|
+
[f]: r
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
};
|
|
@@ -560,26 +560,26 @@ const De = function(e) {
|
|
|
560
560
|
} = t, {
|
|
561
561
|
apply: a = () => {
|
|
562
562
|
},
|
|
563
|
-
...
|
|
564
|
-
} =
|
|
563
|
+
...u
|
|
564
|
+
} = nt(e, t), c = await yt(t, u), f = W(s), m = ot(s), d = Q(s) === "y", {
|
|
565
565
|
width: p,
|
|
566
566
|
height: h
|
|
567
567
|
} = i.floating;
|
|
568
568
|
let y, g;
|
|
569
|
-
|
|
570
|
-
const v = h -
|
|
571
|
-
let
|
|
572
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
573
|
-
const
|
|
574
|
-
|
|
569
|
+
f === "top" || f === "bottom" ? (y = f, g = m === (await (r.isRTL == null ? void 0 : r.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (g = f, y = m === "end" ? "top" : "bottom");
|
|
570
|
+
const v = h - c.top - c.bottom, w = p - c.left - c.right, b = $(h - c[y], v), x = $(p - c[g], w), k = !t.middlewareData.shift;
|
|
571
|
+
let _ = b, N = x;
|
|
572
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (N = w), (o = t.middlewareData.shift) != null && o.enabled.y && (_ = v), k && !m) {
|
|
573
|
+
const T = E(c.left, 0), G = E(c.right, 0), H = E(c.top, 0), A = E(c.bottom, 0);
|
|
574
|
+
d ? N = p - 2 * (T !== 0 || G !== 0 ? T + G : E(c.left, c.right)) : _ = h - 2 * (H !== 0 || A !== 0 ? H + A : E(c.top, c.bottom));
|
|
575
575
|
}
|
|
576
576
|
await a({
|
|
577
577
|
...t,
|
|
578
|
-
availableWidth:
|
|
579
|
-
availableHeight:
|
|
578
|
+
availableWidth: N,
|
|
579
|
+
availableHeight: _
|
|
580
580
|
});
|
|
581
|
-
const
|
|
582
|
-
return p !==
|
|
581
|
+
const V = await r.getDimensions(l.floating);
|
|
582
|
+
return p !== V.width || h !== V.height ? {
|
|
583
583
|
reset: {
|
|
584
584
|
rects: !0
|
|
585
585
|
}
|
|
@@ -587,48 +587,48 @@ const De = function(e) {
|
|
|
587
587
|
}
|
|
588
588
|
};
|
|
589
589
|
};
|
|
590
|
-
function
|
|
590
|
+
function ct() {
|
|
591
591
|
return typeof window < "u";
|
|
592
592
|
}
|
|
593
|
-
function
|
|
594
|
-
return
|
|
593
|
+
function tt(e) {
|
|
594
|
+
return Yt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function O(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 P(e) {
|
|
601
601
|
var t;
|
|
602
|
-
return (t = (
|
|
602
|
+
return (t = (Yt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
return
|
|
604
|
+
function Yt(e) {
|
|
605
|
+
return ct() ? e instanceof Node || e instanceof O(e).Node : !1;
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
return
|
|
607
|
+
function I(e) {
|
|
608
|
+
return ct() ? e instanceof Element || e instanceof O(e).Element : !1;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return
|
|
610
|
+
function M(e) {
|
|
611
|
+
return ct() ? e instanceof HTMLElement || e instanceof O(e).HTMLElement : !1;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
return !
|
|
613
|
+
function Pt(e) {
|
|
614
|
+
return !ct() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof O(e).ShadowRoot;
|
|
615
615
|
}
|
|
616
616
|
const _e = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
617
|
-
function
|
|
617
|
+
function st(e) {
|
|
618
618
|
const {
|
|
619
619
|
overflow: t,
|
|
620
620
|
overflowX: n,
|
|
621
621
|
overflowY: o,
|
|
622
622
|
display: s
|
|
623
|
-
} =
|
|
623
|
+
} = L(e);
|
|
624
624
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !_e.has(s);
|
|
625
625
|
}
|
|
626
|
-
const
|
|
627
|
-
function
|
|
628
|
-
return
|
|
626
|
+
const ke = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
627
|
+
function Te(e) {
|
|
628
|
+
return ke.has(tt(e));
|
|
629
629
|
}
|
|
630
630
|
const Ie = [":popover-open", ":modal"];
|
|
631
|
-
function
|
|
631
|
+
function ut(e) {
|
|
632
632
|
return Ie.some((t) => {
|
|
633
633
|
try {
|
|
634
634
|
return e.matches(t);
|
|
@@ -637,34 +637,34 @@ function ct(e) {
|
|
|
637
637
|
}
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
|
-
const
|
|
641
|
-
function
|
|
642
|
-
const t =
|
|
643
|
-
return
|
|
640
|
+
const Le = ["transform", "translate", "scale", "rotate", "perspective"], Fe = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Be = ["paint", "layout", "strict", "content"];
|
|
641
|
+
function vt(e) {
|
|
642
|
+
const t = At(), n = I(e) ? L(e) : e;
|
|
643
|
+
return Le.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Fe.some((o) => (n.willChange || "").includes(o)) || Be.some((o) => (n.contain || "").includes(o));
|
|
644
644
|
}
|
|
645
645
|
function Me(e) {
|
|
646
|
-
let t =
|
|
647
|
-
for (;
|
|
648
|
-
if (
|
|
646
|
+
let t = J(e);
|
|
647
|
+
for (; M(t) && !Z(t); ) {
|
|
648
|
+
if (vt(t))
|
|
649
649
|
return t;
|
|
650
|
-
if (
|
|
650
|
+
if (ut(t))
|
|
651
651
|
return null;
|
|
652
|
-
t =
|
|
652
|
+
t = J(t);
|
|
653
653
|
}
|
|
654
654
|
return null;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function At() {
|
|
657
657
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
658
658
|
}
|
|
659
659
|
const Pe = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
660
|
-
function
|
|
661
|
-
return Pe.has(
|
|
660
|
+
function Z(e) {
|
|
661
|
+
return Pe.has(tt(e));
|
|
662
662
|
}
|
|
663
|
-
function
|
|
664
|
-
return
|
|
663
|
+
function L(e) {
|
|
664
|
+
return O(e).getComputedStyle(e);
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
return
|
|
666
|
+
function ft(e) {
|
|
667
|
+
return I(e) ? {
|
|
668
668
|
scrollLeft: e.scrollLeft,
|
|
669
669
|
scrollTop: e.scrollTop
|
|
670
670
|
} : {
|
|
@@ -672,162 +672,162 @@ function ut(e) {
|
|
|
672
672
|
scrollTop: e.scrollY
|
|
673
673
|
};
|
|
674
674
|
}
|
|
675
|
-
function
|
|
676
|
-
if (
|
|
675
|
+
function J(e) {
|
|
676
|
+
if (tt(e) === "html")
|
|
677
677
|
return e;
|
|
678
678
|
const t = (
|
|
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
|
+
Pt(e) && e.host || // Fallback.
|
|
683
|
+
P(e)
|
|
684
684
|
);
|
|
685
|
-
return
|
|
685
|
+
return Pt(t) ? t.host : t;
|
|
686
686
|
}
|
|
687
|
-
function
|
|
688
|
-
const t =
|
|
689
|
-
return
|
|
687
|
+
function jt(e) {
|
|
688
|
+
const t = J(e);
|
|
689
|
+
return Z(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : M(t) && st(t) ? t : jt(t);
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function et(e, t, n) {
|
|
692
692
|
var o;
|
|
693
693
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
694
|
-
const s =
|
|
694
|
+
const s = jt(e), i = s === ((o = e.ownerDocument) == null ? void 0 : o.body), r = O(s);
|
|
695
695
|
if (i) {
|
|
696
|
-
const l =
|
|
697
|
-
return t.concat(r, r.visualViewport || [],
|
|
696
|
+
const l = gt(r);
|
|
697
|
+
return t.concat(r, r.visualViewport || [], st(s) ? s : [], l && n ? et(l) : []);
|
|
698
698
|
}
|
|
699
|
-
return t.concat(s,
|
|
699
|
+
return t.concat(s, et(s, [], n));
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function gt(e) {
|
|
702
702
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
const t =
|
|
704
|
+
function zt(e) {
|
|
705
|
+
const t = L(e);
|
|
706
706
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
707
|
-
const s =
|
|
707
|
+
const s = M(e), i = s ? e.offsetWidth : n, r = s ? e.offsetHeight : o, l = rt(n) !== i || rt(o) !== r;
|
|
708
708
|
return l && (n = i, o = r), {
|
|
709
709
|
width: n,
|
|
710
710
|
height: o,
|
|
711
711
|
$: l
|
|
712
712
|
};
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
return
|
|
714
|
+
function wt(e) {
|
|
715
|
+
return I(e) ? e : e.contextElement;
|
|
716
716
|
}
|
|
717
|
-
function
|
|
718
|
-
const t =
|
|
719
|
-
if (!
|
|
720
|
-
return
|
|
717
|
+
function z(e) {
|
|
718
|
+
const t = wt(e);
|
|
719
|
+
if (!M(t))
|
|
720
|
+
return B(1);
|
|
721
721
|
const n = t.getBoundingClientRect(), {
|
|
722
722
|
width: o,
|
|
723
723
|
height: s,
|
|
724
724
|
$: i
|
|
725
|
-
} =
|
|
726
|
-
let r = (i ?
|
|
725
|
+
} = zt(t);
|
|
726
|
+
let r = (i ? rt(n.width) : n.width) / o, l = (i ? rt(n.height) : n.height) / s;
|
|
727
727
|
return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
728
728
|
x: r,
|
|
729
729
|
y: l
|
|
730
730
|
};
|
|
731
731
|
}
|
|
732
|
-
const
|
|
733
|
-
function
|
|
734
|
-
const t =
|
|
735
|
-
return !
|
|
732
|
+
const Ne = /* @__PURE__ */ B(0);
|
|
733
|
+
function Xt(e) {
|
|
734
|
+
const t = O(e);
|
|
735
|
+
return !At() || !t.visualViewport ? Ne : {
|
|
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 Ve(e, t, n) {
|
|
741
|
+
return t === void 0 && (t = !1), !n || t && n !== O(e) ? !1 : t;
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function j(e, t, n, o) {
|
|
744
744
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
745
|
-
const s = e.getBoundingClientRect(), i =
|
|
746
|
-
let r =
|
|
747
|
-
t && (o ?
|
|
748
|
-
const l =
|
|
749
|
-
let a = (s.left + l.x) / r.x,
|
|
745
|
+
const s = e.getBoundingClientRect(), i = wt(e);
|
|
746
|
+
let r = B(1);
|
|
747
|
+
t && (o ? I(o) && (r = z(o)) : r = z(e));
|
|
748
|
+
const l = Ve(i, n, o) ? Xt(i) : B(0);
|
|
749
|
+
let a = (s.left + l.x) / r.x, u = (s.top + l.y) / r.y, c = s.width / r.x, f = s.height / r.y;
|
|
750
750
|
if (i) {
|
|
751
|
-
const m =
|
|
752
|
-
let p = m, h =
|
|
753
|
-
for (; h && o &&
|
|
754
|
-
const y =
|
|
755
|
-
a *= y.x,
|
|
751
|
+
const m = O(i), d = o && I(o) ? O(o) : o;
|
|
752
|
+
let p = m, h = gt(p);
|
|
753
|
+
for (; h && o && d !== p; ) {
|
|
754
|
+
const y = z(h), g = h.getBoundingClientRect(), v = L(h), w = g.left + (h.clientLeft + parseFloat(v.paddingLeft)) * y.x, b = g.top + (h.clientTop + parseFloat(v.paddingTop)) * y.y;
|
|
755
|
+
a *= y.x, u *= y.y, c *= y.x, f *= y.y, a += w, u += b, p = O(h), h = gt(p);
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
|
-
return
|
|
759
|
-
width:
|
|
760
|
-
height:
|
|
758
|
+
return at({
|
|
759
|
+
width: c,
|
|
760
|
+
height: f,
|
|
761
761
|
x: a,
|
|
762
|
-
y:
|
|
762
|
+
y: u
|
|
763
763
|
});
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
const n =
|
|
767
|
-
return t ? t.left + n :
|
|
765
|
+
function dt(e, t) {
|
|
766
|
+
const n = ft(e).scrollLeft;
|
|
767
|
+
return t ? t.left + n : j(P(e)).left + n;
|
|
768
768
|
}
|
|
769
|
-
function
|
|
770
|
-
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft -
|
|
769
|
+
function $t(e, t) {
|
|
770
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - dt(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 Qe(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", r =
|
|
783
|
+
const i = s === "fixed", r = P(o), l = t ? ut(t.floating) : !1;
|
|
784
784
|
if (o === r || l && i)
|
|
785
785
|
return n;
|
|
786
786
|
let a = {
|
|
787
787
|
scrollLeft: 0,
|
|
788
788
|
scrollTop: 0
|
|
789
|
-
},
|
|
790
|
-
const
|
|
791
|
-
if ((
|
|
792
|
-
const
|
|
793
|
-
|
|
789
|
+
}, u = B(1);
|
|
790
|
+
const c = B(0), f = M(o);
|
|
791
|
+
if ((f || !f && !i) && ((tt(o) !== "body" || st(r)) && (a = ft(o)), M(o))) {
|
|
792
|
+
const d = j(o);
|
|
793
|
+
u = z(o), c.x = d.x + o.clientLeft, c.y = d.y + o.clientTop;
|
|
794
794
|
}
|
|
795
|
-
const m = r && !
|
|
795
|
+
const m = r && !f && !i ? $t(r, a) : B(0);
|
|
796
796
|
return {
|
|
797
|
-
width: n.width *
|
|
798
|
-
height: n.height *
|
|
799
|
-
x: n.x *
|
|
800
|
-
y: n.y *
|
|
797
|
+
width: n.width * u.x,
|
|
798
|
+
height: n.height * u.y,
|
|
799
|
+
x: n.x * u.x - a.scrollLeft * u.x + c.x + m.x,
|
|
800
|
+
y: n.y * u.y - a.scrollTop * u.y + c.y + m.y
|
|
801
801
|
};
|
|
802
802
|
}
|
|
803
803
|
function He(e) {
|
|
804
804
|
return Array.from(e.getClientRects());
|
|
805
805
|
}
|
|
806
|
-
function
|
|
807
|
-
const t =
|
|
808
|
-
let r = -n.scrollLeft +
|
|
806
|
+
function Ue(e) {
|
|
807
|
+
const t = P(e), n = ft(e), o = e.ownerDocument.body, s = E(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = E(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
808
|
+
let r = -n.scrollLeft + dt(e);
|
|
809
809
|
const l = -n.scrollTop;
|
|
810
|
-
return
|
|
810
|
+
return L(o).direction === "rtl" && (r += E(t.clientWidth, o.clientWidth) - s), {
|
|
811
811
|
width: s,
|
|
812
812
|
height: i,
|
|
813
813
|
x: r,
|
|
814
814
|
y: l
|
|
815
815
|
};
|
|
816
816
|
}
|
|
817
|
-
const
|
|
818
|
-
function
|
|
819
|
-
const n =
|
|
817
|
+
const Nt = 25;
|
|
818
|
+
function qe(e, t) {
|
|
819
|
+
const n = O(e), o = P(e), s = n.visualViewport;
|
|
820
820
|
let i = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
|
|
821
821
|
if (s) {
|
|
822
822
|
i = s.width, r = s.height;
|
|
823
|
-
const
|
|
824
|
-
(!
|
|
823
|
+
const c = At();
|
|
824
|
+
(!c || c && t === "fixed") && (l = s.offsetLeft, a = s.offsetTop);
|
|
825
825
|
}
|
|
826
|
-
const
|
|
827
|
-
if (
|
|
828
|
-
const
|
|
829
|
-
p <=
|
|
830
|
-
} else
|
|
826
|
+
const u = dt(o);
|
|
827
|
+
if (u <= 0) {
|
|
828
|
+
const c = o.ownerDocument, f = c.body, m = getComputedStyle(f), d = c.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, p = Math.abs(o.clientWidth - f.clientWidth - d);
|
|
829
|
+
p <= Nt && (i -= p);
|
|
830
|
+
} else u <= Nt && (i += u);
|
|
831
831
|
return {
|
|
832
832
|
width: i,
|
|
833
833
|
height: r,
|
|
@@ -836,25 +836,25 @@ function Ue(e, t) {
|
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
838
|
const We = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
839
|
-
function
|
|
840
|
-
const n =
|
|
839
|
+
function Je(e, t) {
|
|
840
|
+
const n = j(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, i = M(e) ? z(e) : B(1), r = e.clientWidth * i.x, l = e.clientHeight * i.y, a = s * i.x, u = o * i.y;
|
|
841
841
|
return {
|
|
842
842
|
width: r,
|
|
843
843
|
height: l,
|
|
844
844
|
x: a,
|
|
845
|
-
y:
|
|
845
|
+
y: u
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
848
|
function Vt(e, t, n) {
|
|
849
849
|
let o;
|
|
850
850
|
if (t === "viewport")
|
|
851
|
-
o =
|
|
851
|
+
o = qe(e, n);
|
|
852
852
|
else if (t === "document")
|
|
853
|
-
o =
|
|
854
|
-
else if (
|
|
855
|
-
o =
|
|
853
|
+
o = Ue(P(e));
|
|
854
|
+
else if (I(t))
|
|
855
|
+
o = Je(t, n);
|
|
856
856
|
else {
|
|
857
|
-
const s =
|
|
857
|
+
const s = Xt(e);
|
|
858
858
|
o = {
|
|
859
859
|
x: t.x - s.x,
|
|
860
860
|
y: t.y - s.y,
|
|
@@ -862,22 +862,22 @@ function Vt(e, t, n) {
|
|
|
862
862
|
height: t.height
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
|
-
return
|
|
865
|
+
return at(o);
|
|
866
866
|
}
|
|
867
|
-
function
|
|
868
|
-
const n =
|
|
869
|
-
return n === t || !
|
|
867
|
+
function Zt(e, t) {
|
|
868
|
+
const n = J(e);
|
|
869
|
+
return n === t || !I(n) || Z(n) ? !1 : L(n).position === "fixed" || Zt(n, t);
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function Ge(e, t) {
|
|
872
872
|
const n = t.get(e);
|
|
873
873
|
if (n)
|
|
874
874
|
return n;
|
|
875
|
-
let o =
|
|
876
|
-
const i =
|
|
877
|
-
let r = i ?
|
|
878
|
-
for (;
|
|
879
|
-
const l =
|
|
880
|
-
!a && l.position === "fixed" && (s = null), (i ? !a && !s : !a && l.position === "static" && !!s && We.has(s.position) ||
|
|
875
|
+
let o = et(e, [], !1).filter((l) => I(l) && tt(l) !== "body"), s = null;
|
|
876
|
+
const i = L(e).position === "fixed";
|
|
877
|
+
let r = i ? J(e) : e;
|
|
878
|
+
for (; I(r) && !Z(r); ) {
|
|
879
|
+
const l = L(r), a = vt(r);
|
|
880
|
+
!a && l.position === "fixed" && (s = null), (i ? !a && !s : !a && l.position === "static" && !!s && We.has(s.position) || st(r) && !a && Zt(e, r)) ? o = o.filter((c) => c !== r) : s = l, r = J(r);
|
|
881
881
|
}
|
|
882
882
|
return t.set(e, o), o;
|
|
883
883
|
}
|
|
@@ -888,9 +888,9 @@ function Ke(e) {
|
|
|
888
888
|
rootBoundary: o,
|
|
889
889
|
strategy: s
|
|
890
890
|
} = e;
|
|
891
|
-
const r = [...n === "clippingAncestors" ?
|
|
892
|
-
const
|
|
893
|
-
return
|
|
891
|
+
const r = [...n === "clippingAncestors" ? ut(t) ? [] : Ge(t, this._c) : [].concat(n), o], l = r[0], a = r.reduce((u, c) => {
|
|
892
|
+
const f = Vt(t, c, s);
|
|
893
|
+
return u.top = E(f.top, u.top), u.right = $(f.right, u.right), u.bottom = $(f.bottom, u.bottom), u.left = E(f.left, u.left), u;
|
|
894
894
|
}, Vt(t, l, s));
|
|
895
895
|
return {
|
|
896
896
|
width: a.right - a.left,
|
|
@@ -903,69 +903,69 @@ function Ye(e) {
|
|
|
903
903
|
const {
|
|
904
904
|
width: t,
|
|
905
905
|
height: n
|
|
906
|
-
} =
|
|
906
|
+
} = zt(e);
|
|
907
907
|
return {
|
|
908
908
|
width: t,
|
|
909
909
|
height: n
|
|
910
910
|
};
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
const o =
|
|
912
|
+
function je(e, t, n) {
|
|
913
|
+
const o = M(t), s = P(t), i = n === "fixed", r = j(e, !0, i, t);
|
|
914
914
|
let l = {
|
|
915
915
|
scrollLeft: 0,
|
|
916
916
|
scrollTop: 0
|
|
917
917
|
};
|
|
918
|
-
const a =
|
|
919
|
-
function
|
|
920
|
-
a.x =
|
|
918
|
+
const a = B(0);
|
|
919
|
+
function u() {
|
|
920
|
+
a.x = dt(s);
|
|
921
921
|
}
|
|
922
922
|
if (o || !o && !i)
|
|
923
|
-
if ((
|
|
924
|
-
const
|
|
925
|
-
a.x =
|
|
926
|
-
} else s &&
|
|
927
|
-
i && !o && s &&
|
|
928
|
-
const
|
|
923
|
+
if ((tt(t) !== "body" || st(s)) && (l = ft(t)), o) {
|
|
924
|
+
const d = j(t, !0, i, t);
|
|
925
|
+
a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
|
|
926
|
+
} else s && u();
|
|
927
|
+
i && !o && s && u();
|
|
928
|
+
const c = s && !o && !i ? $t(s, l) : B(0), f = r.left + l.scrollLeft - a.x - c.x, m = r.top + l.scrollTop - a.y - c.y;
|
|
929
929
|
return {
|
|
930
|
-
x:
|
|
930
|
+
x: f,
|
|
931
931
|
y: m,
|
|
932
932
|
width: r.width,
|
|
933
933
|
height: r.height
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
|
-
function
|
|
937
|
-
return
|
|
936
|
+
function pt(e) {
|
|
937
|
+
return L(e).position === "static";
|
|
938
938
|
}
|
|
939
939
|
function Qt(e, t) {
|
|
940
|
-
if (!
|
|
940
|
+
if (!M(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 P(e) === n && (n = n.ownerDocument.body), n;
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
const n =
|
|
949
|
-
if (
|
|
947
|
+
function te(e, t) {
|
|
948
|
+
const n = O(e);
|
|
949
|
+
if (ut(e))
|
|
950
950
|
return n;
|
|
951
|
-
if (!
|
|
952
|
-
let s =
|
|
953
|
-
for (; s && !
|
|
954
|
-
if (
|
|
951
|
+
if (!M(e)) {
|
|
952
|
+
let s = J(e);
|
|
953
|
+
for (; s && !Z(s); ) {
|
|
954
|
+
if (I(s) && !pt(s))
|
|
955
955
|
return s;
|
|
956
|
-
s =
|
|
956
|
+
s = J(s);
|
|
957
957
|
}
|
|
958
958
|
return n;
|
|
959
959
|
}
|
|
960
960
|
let o = Qt(e, t);
|
|
961
|
-
for (; o &&
|
|
961
|
+
for (; o && Te(o) && pt(o); )
|
|
962
962
|
o = Qt(o, t);
|
|
963
|
-
return o &&
|
|
963
|
+
return o && Z(o) && pt(o) && !vt(o) ? n : o || Me(e) || n;
|
|
964
964
|
}
|
|
965
965
|
const ze = async function(e) {
|
|
966
|
-
const t = this.getOffsetParent ||
|
|
966
|
+
const t = this.getOffsetParent || te, n = this.getDimensions, o = await n(e.floating);
|
|
967
967
|
return {
|
|
968
|
-
reference:
|
|
968
|
+
reference: je(e.reference, await t(e.floating), e.strategy),
|
|
969
969
|
floating: {
|
|
970
970
|
x: 0,
|
|
971
971
|
y: 0,
|
|
@@ -974,65 +974,65 @@ const ze = async function(e) {
|
|
|
974
974
|
}
|
|
975
975
|
};
|
|
976
976
|
};
|
|
977
|
-
function
|
|
978
|
-
return
|
|
977
|
+
function Xe(e) {
|
|
978
|
+
return L(e).direction === "rtl";
|
|
979
979
|
}
|
|
980
980
|
const $e = {
|
|
981
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
982
|
-
getDocumentElement:
|
|
981
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Qe,
|
|
982
|
+
getDocumentElement: P,
|
|
983
983
|
getClippingRect: Ke,
|
|
984
|
-
getOffsetParent:
|
|
984
|
+
getOffsetParent: te,
|
|
985
985
|
getElementRects: ze,
|
|
986
986
|
getClientRects: He,
|
|
987
987
|
getDimensions: Ye,
|
|
988
|
-
getScale:
|
|
989
|
-
isElement:
|
|
990
|
-
isRTL:
|
|
988
|
+
getScale: z,
|
|
989
|
+
isElement: I,
|
|
990
|
+
isRTL: Xe
|
|
991
991
|
};
|
|
992
|
-
function
|
|
992
|
+
function ee(e, t) {
|
|
993
993
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
994
994
|
}
|
|
995
995
|
function Ze(e, t) {
|
|
996
996
|
let n = null, o;
|
|
997
|
-
const s =
|
|
997
|
+
const s = P(e);
|
|
998
998
|
function i() {
|
|
999
999
|
var l;
|
|
1000
1000
|
clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
|
|
1001
1001
|
}
|
|
1002
1002
|
function r(l, a) {
|
|
1003
1003
|
l === void 0 && (l = !1), a === void 0 && (a = 1), i();
|
|
1004
|
-
const
|
|
1005
|
-
left:
|
|
1006
|
-
top:
|
|
1004
|
+
const u = e.getBoundingClientRect(), {
|
|
1005
|
+
left: c,
|
|
1006
|
+
top: f,
|
|
1007
1007
|
width: m,
|
|
1008
|
-
height:
|
|
1009
|
-
} =
|
|
1010
|
-
if (l || t(), !m || !
|
|
1008
|
+
height: d
|
|
1009
|
+
} = u;
|
|
1010
|
+
if (l || t(), !m || !d)
|
|
1011
1011
|
return;
|
|
1012
|
-
const p =
|
|
1012
|
+
const p = it(f), h = it(s.clientWidth - (c + m)), y = it(s.clientHeight - (f + d)), g = it(c), w = {
|
|
1013
1013
|
rootMargin: -p + "px " + -h + "px " + -y + "px " + -g + "px",
|
|
1014
|
-
threshold:
|
|
1014
|
+
threshold: E(0, $(1, a)) || 1
|
|
1015
1015
|
};
|
|
1016
1016
|
let b = !0;
|
|
1017
|
-
function
|
|
1018
|
-
const
|
|
1019
|
-
if (
|
|
1017
|
+
function x(k) {
|
|
1018
|
+
const _ = k[0].intersectionRatio;
|
|
1019
|
+
if (_ !== a) {
|
|
1020
1020
|
if (!b)
|
|
1021
1021
|
return r();
|
|
1022
|
-
|
|
1022
|
+
_ ? r(!1, _) : o = setTimeout(() => {
|
|
1023
1023
|
r(!1, 1e-7);
|
|
1024
1024
|
}, 1e3);
|
|
1025
1025
|
}
|
|
1026
|
-
|
|
1026
|
+
_ === 1 && !ee(u, e.getBoundingClientRect()) && r(), b = !1;
|
|
1027
1027
|
}
|
|
1028
1028
|
try {
|
|
1029
|
-
n = new IntersectionObserver(
|
|
1030
|
-
...
|
|
1029
|
+
n = new IntersectionObserver(x, {
|
|
1030
|
+
...w,
|
|
1031
1031
|
// Handle <iframe>s
|
|
1032
1032
|
root: s.ownerDocument
|
|
1033
1033
|
});
|
|
1034
1034
|
} catch {
|
|
1035
|
-
n = new IntersectionObserver(
|
|
1035
|
+
n = new IntersectionObserver(x, w);
|
|
1036
1036
|
}
|
|
1037
1037
|
n.observe(e);
|
|
1038
1038
|
}
|
|
@@ -1046,32 +1046,32 @@ function tn(e, t, n, o) {
|
|
|
1046
1046
|
elementResize: r = typeof ResizeObserver == "function",
|
|
1047
1047
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
1048
1048
|
animationFrame: a = !1
|
|
1049
|
-
} = o,
|
|
1050
|
-
|
|
1049
|
+
} = o, u = wt(e), c = s || i ? [...u ? et(u) : [], ...et(t)] : [];
|
|
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
|
|
1056
|
-
let m = -1,
|
|
1057
|
-
r && (
|
|
1055
|
+
const f = u && l ? Ze(u, n) : null;
|
|
1056
|
+
let m = -1, d = null;
|
|
1057
|
+
r && (d = new ResizeObserver((g) => {
|
|
1058
1058
|
let [v] = g;
|
|
1059
|
-
v && v.target ===
|
|
1060
|
-
var
|
|
1061
|
-
(
|
|
1059
|
+
v && v.target === u && d && (d.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1060
|
+
var w;
|
|
1061
|
+
(w = d) == null || w.observe(t);
|
|
1062
1062
|
})), n();
|
|
1063
|
-
}),
|
|
1064
|
-
let p, h = a ?
|
|
1063
|
+
}), u && !a && d.observe(u), d.observe(t));
|
|
1064
|
+
let p, h = a ? j(e) : null;
|
|
1065
1065
|
a && y();
|
|
1066
1066
|
function y() {
|
|
1067
|
-
const g =
|
|
1068
|
-
h && !
|
|
1067
|
+
const g = j(e);
|
|
1068
|
+
h && !ee(h, g) && n(), h = g, p = requestAnimationFrame(y);
|
|
1069
1069
|
}
|
|
1070
1070
|
return n(), () => {
|
|
1071
1071
|
var g;
|
|
1072
|
-
|
|
1072
|
+
c.forEach((v) => {
|
|
1073
1073
|
s && v.removeEventListener("scroll", n), i && v.removeEventListener("resize", n);
|
|
1074
|
-
}),
|
|
1074
|
+
}), f?.(), (g = d) == null || g.disconnect(), d = null, a && cancelAnimationFrame(p);
|
|
1075
1075
|
};
|
|
1076
1076
|
}
|
|
1077
1077
|
const en = De, nn = Ee, on = Ce, sn = Oe, rn = (e, t, n) => {
|
|
@@ -1109,12 +1109,12 @@ function ln(e, t) {
|
|
|
1109
1109
|
// 靠近屏幕边缘时自动位移
|
|
1110
1110
|
sn({
|
|
1111
1111
|
apply({ rects: l, elements: a }) {
|
|
1112
|
-
const
|
|
1112
|
+
const u = `${l.reference.width}px`;
|
|
1113
1113
|
Object.assign(a.floating.style, {
|
|
1114
|
-
width:
|
|
1114
|
+
width: u,
|
|
1115
1115
|
// 必须锁定,否则在 body 下它可能由于内容过多撑开到 100vw
|
|
1116
|
-
minWidth:
|
|
1117
|
-
maxWidth:
|
|
1116
|
+
minWidth: u,
|
|
1117
|
+
maxWidth: u
|
|
1118
1118
|
});
|
|
1119
1119
|
}
|
|
1120
1120
|
})
|
|
@@ -1132,7 +1132,7 @@ function ln(e, t) {
|
|
|
1132
1132
|
};
|
|
1133
1133
|
return qt(r), { floatingStyles: n, startTrack: i, stopTrack: r };
|
|
1134
1134
|
}
|
|
1135
|
-
const an = "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", cn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==", un = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACC0lEQVR4AXxRv2tTURT+zk1iIjgoOMShkIJVNwf/gQYULOjQwaGvGl8TBMEMDg4ODgF17likvL4HIYm4OLg61K2CooWKDoKCDoJDHASb9N17POf5Enwk6eN+9/z+3nfvNZjxbYS9ymbYXlQ8CbvnZrRhKoEOFMl9zFH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2p8LD8x9ax65C66KTfKGCSDc97fv6DJzuf9QtDtm+iqsM1ot70w9O+YDbmSQ6bkkyCJitnAUcnryqmuExgSsZYKypvgFvS+5xVsJk0MGlps97mFCVXpnNZqoBcbo2QyJz7dCLj6JTj6tRxVyf3izZUtNndwM73SU55JzaO4Q8AAAD//54At5MAAAAGSURBVAMAh2IbMAJQAZQAAAAASUVORK5CYII=", pn =
|
|
1135
|
+
const an = "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", cn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==", un = "data:image/png;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fv46QI0/zdoEtkmAwHGcHyFQj/Q57vuPzm7m+X5efB6HYj3kOCubuLVlApltfdbPX5uaetCmdeKVAqUN1mdy04XR3PTsqAHPWMztTb24myvEBBuRM+WlUnbzDEXeya2D4XC0zrJqnXwsO3pG3mCMGWMK6lQZk2A0hH2GMSxL9VlI6lVkd90RgGKkVFrrc+9REXubjLH9FxfbbVUVGG5v4i2p8LD8x9ax65C66KTfKGCSDc97fv6DJzuf9QtDtm+iqsM1ot70w9O+YDbmSQ6bkkyCJitnAUcnryqmuExgSsZYKypvgFvS+5xVsJk0MGlps97mFCVXpnNZqoBcbo2QyJz7dCLj6JTj6tRxVyf3izZUtNndwM73SU55JzaO4Q8AAAD//54At5MAAAAGSURBVAMAh2IbMAJQAZQAAAAASUVORK5CYII=", pn = re({
|
|
1136
1136
|
name: "GlobalSearch",
|
|
1137
1137
|
model: { prop: "value", event: "input" },
|
|
1138
1138
|
props: {
|
|
@@ -1150,55 +1150,78 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1150
1150
|
showItemTag: { type: Boolean, default: !0 }
|
|
1151
1151
|
},
|
|
1152
1152
|
setup(e, { emit: t }) {
|
|
1153
|
-
const n = C(""), o = C(!1), s = C(!1), i = C(""), r = C(null), l = C(null), a = C(null),
|
|
1154
|
-
|
|
1153
|
+
const n = C(""), o = C(!1), s = C(!1), i = C(""), r = C(null), l = C(null), a = C(null), u = C(null), { searchHistory: c, saveToHistory: f, clearHistory: m } = ae(
|
|
1154
|
+
bt(e, "historyKey")
|
|
1155
1155
|
), {
|
|
1156
|
-
searchResults:
|
|
1156
|
+
searchResults: d,
|
|
1157
1157
|
loading: p,
|
|
1158
1158
|
isFetchingMore: h,
|
|
1159
1159
|
isFinished: y,
|
|
1160
1160
|
currentPage: g,
|
|
1161
1161
|
fetchData: v,
|
|
1162
|
-
filterByTypes:
|
|
1163
|
-
} = ue(n,
|
|
1162
|
+
filterByTypes: w
|
|
1163
|
+
} = ue(n, bt(e, "searchTypeList")), { floatingStyles: b, startTrack: x, stopTrack: k } = ln(
|
|
1164
1164
|
a,
|
|
1165
|
-
|
|
1166
|
-
),
|
|
1167
|
-
if (s.value = !0,
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
o.value
|
|
1171
|
-
), !e.multiple && o.value && f.value.length === 0) {
|
|
1172
|
-
const x = e.value;
|
|
1173
|
-
if (console.log("🍉 ~ index.vue:221 ~ onFocus ~ val:", x), x?.id) {
|
|
1165
|
+
u
|
|
1166
|
+
), _ = async () => {
|
|
1167
|
+
if (s.value = !0, !e.multiple && o.value && d.value.length === 0) {
|
|
1168
|
+
const A = e.value;
|
|
1169
|
+
if (A?.id) {
|
|
1174
1170
|
p.value = !0;
|
|
1175
1171
|
try {
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1172
|
+
const R = await It(A.id, A.type);
|
|
1173
|
+
d.value = w(R.records);
|
|
1178
1174
|
} finally {
|
|
1179
1175
|
p.value = !1;
|
|
1180
1176
|
}
|
|
1181
1177
|
}
|
|
1182
1178
|
}
|
|
1183
|
-
},
|
|
1179
|
+
}, N = () => {
|
|
1184
1180
|
setTimeout(() => {
|
|
1185
1181
|
s.value = !1;
|
|
1186
1182
|
}, 200);
|
|
1187
|
-
},
|
|
1188
|
-
|
|
1189
|
-
},
|
|
1183
|
+
}, V = (A) => {
|
|
1184
|
+
A.target.value === "" && !e.multiple && (o.value = !1, t("input", null), t("update:value", null));
|
|
1185
|
+
}, T = () => {
|
|
1190
1186
|
if (e.multiple && !n.value && e.value?.length > 0) {
|
|
1191
|
-
const
|
|
1192
|
-
t("input",
|
|
1187
|
+
const A = [...e.value], R = A.pop();
|
|
1188
|
+
t("input", A), t("update:value", A), t("remove", R);
|
|
1193
1189
|
}
|
|
1194
1190
|
};
|
|
1195
|
-
|
|
1196
|
-
if (!
|
|
1197
|
-
|
|
1191
|
+
mt(s, (A) => A ? x() : k()), mt(n, (A) => {
|
|
1192
|
+
if (!A.trim()) {
|
|
1193
|
+
d.value = [];
|
|
1198
1194
|
return;
|
|
1199
1195
|
}
|
|
1200
1196
|
r.value && clearTimeout(r.value), r.value = setTimeout(() => v(1, !1), 300);
|
|
1201
|
-
})
|
|
1197
|
+
});
|
|
1198
|
+
const G = X(() => e.lang ? e.lang === "en" || e.lang === "en-US" : typeof document < "u" ? /(^|;\s*)jc-language=en(-US)?(;|$)/.test(document.cookie || "") : !1), H = (A) => G.value ? A.displayEn || A.display || A.nameEn || "" : A.displayCn || A.display || A.nameCn || A.name || "";
|
|
1199
|
+
return mt(
|
|
1200
|
+
() => e.value,
|
|
1201
|
+
async (A, R) => {
|
|
1202
|
+
if (e.multiple || JSON.stringify(A) === JSON.stringify(R) && o.value)
|
|
1203
|
+
return;
|
|
1204
|
+
const S = A;
|
|
1205
|
+
if (!S) {
|
|
1206
|
+
i.value = "", o.value = !1;
|
|
1207
|
+
return;
|
|
1208
|
+
}
|
|
1209
|
+
if (typeof S == "object")
|
|
1210
|
+
if (S.id && S.type && !S.display)
|
|
1211
|
+
try {
|
|
1212
|
+
const F = (await It(S.id, S.type)).records.find(
|
|
1213
|
+
(D) => D.id === S.id
|
|
1214
|
+
);
|
|
1215
|
+
F && (i.value = H(F), o.value = !0);
|
|
1216
|
+
} catch (U) {
|
|
1217
|
+
console.error("Failed to fetch search item detail:", U);
|
|
1218
|
+
}
|
|
1219
|
+
else
|
|
1220
|
+
i.value = H(S), o.value = !!i.value;
|
|
1221
|
+
else typeof S == "string" && (i.value = S, o.value = !!S);
|
|
1222
|
+
},
|
|
1223
|
+
{ immediate: !0, deep: !0 }
|
|
1224
|
+
), qt(k), {
|
|
1202
1225
|
// 状态
|
|
1203
1226
|
query: n,
|
|
1204
1227
|
isSelected: o,
|
|
@@ -1206,44 +1229,55 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1206
1229
|
selectedLabel: i,
|
|
1207
1230
|
inputRef: l,
|
|
1208
1231
|
referenceRef: a,
|
|
1209
|
-
floatingRef:
|
|
1232
|
+
floatingRef: u,
|
|
1210
1233
|
// Hook 状态
|
|
1211
|
-
searchHistory:
|
|
1212
|
-
searchResults:
|
|
1234
|
+
searchHistory: c,
|
|
1235
|
+
searchResults: d,
|
|
1213
1236
|
loading: p,
|
|
1214
1237
|
isFetchingMore: h,
|
|
1215
1238
|
isFinished: y,
|
|
1216
1239
|
currentPage: g,
|
|
1217
1240
|
floatingStyles: b,
|
|
1218
1241
|
// Hook 方法
|
|
1219
|
-
saveToHistory:
|
|
1242
|
+
saveToHistory: f,
|
|
1220
1243
|
clearHistory: m,
|
|
1221
1244
|
fetchData: v,
|
|
1222
|
-
filterByTypes:
|
|
1223
|
-
startTrack:
|
|
1224
|
-
stopTrack:
|
|
1245
|
+
filterByTypes: w,
|
|
1246
|
+
startTrack: x,
|
|
1247
|
+
stopTrack: k,
|
|
1225
1248
|
// 组件方法
|
|
1226
|
-
onFocus:
|
|
1227
|
-
handleBlur:
|
|
1228
|
-
onInput:
|
|
1229
|
-
handleDelete:
|
|
1249
|
+
onFocus: _,
|
|
1250
|
+
handleBlur: N,
|
|
1251
|
+
onInput: V,
|
|
1252
|
+
handleDelete: T,
|
|
1230
1253
|
// 资源
|
|
1231
1254
|
SearchIcon: an
|
|
1232
1255
|
};
|
|
1233
1256
|
},
|
|
1234
1257
|
computed: {
|
|
1235
1258
|
isEn() {
|
|
1236
|
-
if (this.lang !== "")
|
|
1259
|
+
if (this.lang && this.lang !== "")
|
|
1237
1260
|
return this.lang === "en" || this.lang === "en-US";
|
|
1238
|
-
let e = "";
|
|
1239
1261
|
try {
|
|
1240
1262
|
if (typeof useCookie == "function") {
|
|
1241
|
-
const
|
|
1242
|
-
if (
|
|
1263
|
+
const e = useCookie("jc-language")?.value;
|
|
1264
|
+
if (e)
|
|
1265
|
+
return /^en(-US)?$/.test(e);
|
|
1243
1266
|
}
|
|
1244
1267
|
} catch {
|
|
1245
1268
|
}
|
|
1246
|
-
|
|
1269
|
+
if (typeof document < "u") {
|
|
1270
|
+
const e = document.cookie || "";
|
|
1271
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(e);
|
|
1272
|
+
}
|
|
1273
|
+
try {
|
|
1274
|
+
if (typeof useNuxtApp == "function") {
|
|
1275
|
+
const t = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
|
|
1276
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(t);
|
|
1277
|
+
}
|
|
1278
|
+
} catch {
|
|
1279
|
+
}
|
|
1280
|
+
return !1;
|
|
1247
1281
|
},
|
|
1248
1282
|
selectedItems() {
|
|
1249
1283
|
return this.value ? Array.isArray(this.value) ? this.value : [this.value] : [];
|
|
@@ -1324,7 +1358,7 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1324
1358
|
}
|
|
1325
1359
|
}
|
|
1326
1360
|
});
|
|
1327
|
-
function
|
|
1361
|
+
function xt(e, t, n, o, s, i, r, l) {
|
|
1328
1362
|
var a = typeof e == "function" ? e.options : e;
|
|
1329
1363
|
return t && (a.render = t, a.staticRenderFns = n, a._compiled = !0), i && (a._scopeId = "data-v-" + i), {
|
|
1330
1364
|
exports: e,
|
|
@@ -1372,15 +1406,15 @@ var hn = function() {
|
|
|
1372
1406
|
}, { 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() {
|
|
1373
1407
|
return [t._v(" " + t._s(t.isEn ? `No results found related to "${t.query}".` : `未找到与 "${t.query}" 相关的结果`) + " ")];
|
|
1374
1408
|
})], 2) : t._e()], 2)]);
|
|
1375
|
-
}, gn = [], yn = /* @__PURE__ */
|
|
1409
|
+
}, gn = [], yn = /* @__PURE__ */ xt(
|
|
1376
1410
|
pn,
|
|
1377
1411
|
hn,
|
|
1378
1412
|
gn,
|
|
1379
1413
|
!1,
|
|
1380
1414
|
null,
|
|
1381
|
-
"
|
|
1415
|
+
"9028fb16"
|
|
1382
1416
|
);
|
|
1383
|
-
const
|
|
1417
|
+
const ne = yn.exports, vn = {
|
|
1384
1418
|
__name: "ApplyDataDialog",
|
|
1385
1419
|
props: {
|
|
1386
1420
|
// v-model 绑定,默认 false
|
|
@@ -1393,7 +1427,7 @@ const ee = yn.exports, vn = {
|
|
|
1393
1427
|
type: String,
|
|
1394
1428
|
default: "en",
|
|
1395
1429
|
// 增加校验,确保只能传入 'en' 或 'cn'
|
|
1396
|
-
validator: (e) => ["en", "cn"].includes(e)
|
|
1430
|
+
validator: (e) => ["en", "en-US", "zh-CN", "cn"].includes(e)
|
|
1397
1431
|
},
|
|
1398
1432
|
placeholder: {
|
|
1399
1433
|
type: String,
|
|
@@ -1412,17 +1446,40 @@ const ee = yn.exports, vn = {
|
|
|
1412
1446
|
}), r = Ct({
|
|
1413
1447
|
name: "",
|
|
1414
1448
|
type: "City"
|
|
1415
|
-
}), l =
|
|
1449
|
+
}), l = X(() => {
|
|
1450
|
+
if (n.lang && n.lang !== "")
|
|
1451
|
+
return n.lang === "en" || n.lang === "en-US";
|
|
1452
|
+
try {
|
|
1453
|
+
if (typeof useCookie == "function") {
|
|
1454
|
+
const c = useCookie("jc-language")?.value;
|
|
1455
|
+
if (c)
|
|
1456
|
+
return /^en(-US)?$/.test(c);
|
|
1457
|
+
}
|
|
1458
|
+
} catch {
|
|
1459
|
+
}
|
|
1460
|
+
if (typeof document < "u") {
|
|
1461
|
+
const c = document.cookie || "";
|
|
1462
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(c);
|
|
1463
|
+
}
|
|
1464
|
+
try {
|
|
1465
|
+
if (typeof useNuxtApp == "function") {
|
|
1466
|
+
const f = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
|
|
1467
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(f);
|
|
1468
|
+
}
|
|
1469
|
+
} catch {
|
|
1470
|
+
}
|
|
1471
|
+
return !1;
|
|
1472
|
+
});
|
|
1416
1473
|
return { __sfc: !0, props: n, emit: t, typeOptions: o, displayQuery: s, errors: i, formData: r, isEn: l, handleClose: () => {
|
|
1417
1474
|
i.name = "", i.country = "", t("update:value", !1);
|
|
1418
1475
|
}, handleConfirm: () => {
|
|
1419
1476
|
i.name = "", i.country = "";
|
|
1420
|
-
let
|
|
1421
|
-
r.name.trim() || (i.name = "Data name is required",
|
|
1477
|
+
let c = !0;
|
|
1478
|
+
r.name.trim() || (i.name = "Data name is required", c = !1), s.value || (i.country = "Please select a country", c = !1), c && (console.log("🍉 ~ ApplyDataDialog.vue:115 ~ handleConfirm ~ data:", {
|
|
1422
1479
|
...r,
|
|
1423
1480
|
country: s.value
|
|
1424
1481
|
}), t("confirm", { ...r, country: s.value }));
|
|
1425
|
-
}, Search:
|
|
1482
|
+
}, Search: ne };
|
|
1426
1483
|
}
|
|
1427
1484
|
};
|
|
1428
1485
|
var An = function() {
|
|
@@ -1442,25 +1499,25 @@ var An = function() {
|
|
|
1442
1499
|
} }, model: { value: o.displayQuery, callback: function(s) {
|
|
1443
1500
|
o.displayQuery = s;
|
|
1444
1501
|
}, 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();
|
|
1445
|
-
}, wn = [], xn = /* @__PURE__ */
|
|
1502
|
+
}, wn = [], xn = /* @__PURE__ */ xt(
|
|
1446
1503
|
vn,
|
|
1447
1504
|
An,
|
|
1448
1505
|
wn,
|
|
1449
1506
|
!1,
|
|
1450
1507
|
null,
|
|
1451
|
-
"
|
|
1508
|
+
"77035ea3"
|
|
1452
1509
|
);
|
|
1453
1510
|
const bn = xn.exports, Cn = {
|
|
1454
1511
|
// 2. 局部注册组件
|
|
1455
1512
|
components: {
|
|
1456
|
-
[kt.name]: kt,
|
|
1457
1513
|
[Tt.name]: Tt,
|
|
1514
|
+
[kt.name]: kt,
|
|
1458
1515
|
[_t.name]: _t,
|
|
1459
1516
|
[Ot.name]: Ot,
|
|
1460
1517
|
[Et.name]: Et,
|
|
1461
1518
|
[Dt.name]: Dt,
|
|
1462
|
-
[
|
|
1463
|
-
[
|
|
1519
|
+
[Rt.name]: Rt,
|
|
1520
|
+
[St.name]: St
|
|
1464
1521
|
},
|
|
1465
1522
|
data() {
|
|
1466
1523
|
return {
|
|
@@ -1496,10 +1553,10 @@ const bn = xn.exports, Cn = {
|
|
|
1496
1553
|
};
|
|
1497
1554
|
},
|
|
1498
1555
|
mounted() {
|
|
1499
|
-
|
|
1556
|
+
K.on(Y.Open, this.handleOpen);
|
|
1500
1557
|
},
|
|
1501
1558
|
beforeDestroy() {
|
|
1502
|
-
|
|
1559
|
+
K.off(Y.Open, this.handleOpen);
|
|
1503
1560
|
},
|
|
1504
1561
|
methods: {
|
|
1505
1562
|
handleOpen() {
|
|
@@ -1509,16 +1566,16 @@ const bn = xn.exports, Cn = {
|
|
|
1509
1566
|
), this.isVisible = !0;
|
|
1510
1567
|
},
|
|
1511
1568
|
closeModal() {
|
|
1512
|
-
this.isVisible = !1,
|
|
1569
|
+
this.isVisible = !1, K.emit(Y.Close), this.$refs.formRef.resetFields();
|
|
1513
1570
|
},
|
|
1514
1571
|
handleSubmit() {
|
|
1515
1572
|
this.$refs.formRef.validate((e) => {
|
|
1516
|
-
e && (
|
|
1573
|
+
e && (K.emit(Y.Submit, { ...this.formData }), this.closeModal());
|
|
1517
1574
|
});
|
|
1518
1575
|
}
|
|
1519
1576
|
}
|
|
1520
1577
|
};
|
|
1521
|
-
var
|
|
1578
|
+
var Sn = function() {
|
|
1522
1579
|
var t = this, n = t._self._c;
|
|
1523
1580
|
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) {
|
|
1524
1581
|
t.isVisible = o;
|
|
@@ -1537,10 +1594,10 @@ var Rn = function() {
|
|
|
1537
1594
|
}, 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) {
|
|
1538
1595
|
t.$set(t.formData, "agreement", o);
|
|
1539
1596
|
}, 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)]);
|
|
1540
|
-
},
|
|
1597
|
+
}, Rn = [], Dn = /* @__PURE__ */ xt(
|
|
1541
1598
|
Cn,
|
|
1542
|
-
Rn,
|
|
1543
1599
|
Sn,
|
|
1600
|
+
Rn,
|
|
1544
1601
|
!1,
|
|
1545
1602
|
null,
|
|
1546
1603
|
null
|
|
@@ -1548,13 +1605,13 @@ var Rn = function() {
|
|
|
1548
1605
|
const En = Dn.exports;
|
|
1549
1606
|
let On = {
|
|
1550
1607
|
open() {
|
|
1551
|
-
|
|
1608
|
+
K.emit(Y.Open);
|
|
1552
1609
|
},
|
|
1553
1610
|
close() {
|
|
1554
|
-
|
|
1611
|
+
K.emit(Y.Close);
|
|
1555
1612
|
},
|
|
1556
1613
|
onSubmit(e) {
|
|
1557
|
-
|
|
1614
|
+
K.on(Y.Submit, e);
|
|
1558
1615
|
}
|
|
1559
1616
|
};
|
|
1560
1617
|
function In() {
|
|
@@ -1571,28 +1628,28 @@ function In() {
|
|
|
1571
1628
|
}
|
|
1572
1629
|
};
|
|
1573
1630
|
}
|
|
1574
|
-
const
|
|
1631
|
+
const Ht = {
|
|
1575
1632
|
ApplyDataDialog: bn,
|
|
1576
|
-
JcSearch:
|
|
1633
|
+
JcSearch: ne
|
|
1577
1634
|
};
|
|
1578
|
-
let
|
|
1579
|
-
const
|
|
1635
|
+
let Ut = !1;
|
|
1636
|
+
const Ln = {
|
|
1580
1637
|
/**
|
|
1581
1638
|
* Vue 2 插件安装方法
|
|
1582
1639
|
* @param Vue Vue 的构造函数
|
|
1583
1640
|
*/
|
|
1584
1641
|
install(e, t) {
|
|
1585
|
-
|
|
1586
|
-
e.component(n,
|
|
1642
|
+
Ut || (Ut = !0, t?.sharedConfig && le(t.sharedConfig), Object.keys(Ht).forEach((n) => {
|
|
1643
|
+
e.component(n, Ht[n]);
|
|
1587
1644
|
}));
|
|
1588
1645
|
}
|
|
1589
1646
|
};
|
|
1590
1647
|
export {
|
|
1591
1648
|
bn as ApplyDataDialog,
|
|
1592
1649
|
En as GlobalModal,
|
|
1593
|
-
|
|
1650
|
+
ne as JcSearch,
|
|
1594
1651
|
Mn as MODAL_ACTION,
|
|
1595
1652
|
In as createGlobalModalPlugin,
|
|
1596
|
-
|
|
1653
|
+
Ln as default,
|
|
1597
1654
|
Pn as emitter
|
|
1598
1655
|
};
|