@jctrans-materials/comps-vue3 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,2270 +1 @@
1
- import { ref as E, computed as M, onMounted as ze, onBeforeUnmount as Ct, defineComponent as je, toRef as We, watch as Ve, createElementBlock as x, openBlock as A, createElementVNode as m, createBlock as Xe, createVNode as B, normalizeClass as ae, createCommentVNode as F, withDirectives as De, Fragment as se, renderList as ve, toDisplayString as _, withModifiers as Y, withKeys as Gt, normalizeStyle as Te, vModelText as Ze, unref as h, Teleport as St, renderSlot as He, createTextVNode as et, vShow as qt, reactive as Ke, onUnmounted as Yt, withCtx as N, Transition as dt, nextTick as zt, createApp as jt } from "vue";
2
- import { locationSearchV2 as tt, reportNewTypeDataApi as Xt, emitter as fe, MODAL_ACTION as pe, initSharedConfig as Zt } from "@jctrans-materials/shared";
3
- import { MODAL_ACTION as Kl, emitter as Gl, initSharedConfig as ql } from "@jctrans-materials/shared";
4
- import { ElDialog as en, ElForm as tn, ElRow as Qe, ElCol as be, ElFormItem as he, ElInput as Ce, ElCheckbox as nn, ElButton as ft } from "element-plus";
5
- function on(e) {
6
- const t = E([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", l = M(
7
- () => (e.value || "") + n
8
- ), i = M(
9
- () => !!e.value && e.value !== ""
10
- ), s = (c) => {
11
- if (!c || !o) return;
12
- const r = t.value.filter(
13
- (f) => f.id && f.id !== c.id || f.display !== c.display
14
- );
15
- r.unshift(c);
16
- const u = r.slice(0, 4);
17
- if (i.value) {
18
- t.value = u;
19
- try {
20
- localStorage.setItem(l.value, JSON.stringify(u));
21
- } catch (f) {
22
- console.warn("LocalStorage save failed:", f);
23
- }
24
- }
25
- }, a = () => {
26
- t.value = [], o && localStorage.removeItem(l.value);
27
- };
28
- return ze(() => {
29
- if (o && i.value) {
30
- const c = localStorage.getItem(l.value);
31
- if (c)
32
- try {
33
- t.value = JSON.parse(c);
34
- } catch {
35
- t.value = [];
36
- }
37
- }
38
- }), {
39
- searchHistory: t,
40
- saveToHistory: s,
41
- clearHistory: a,
42
- HasHistory: i
43
- };
44
- }
45
- async function ln(e, t = [
46
- "Continent",
47
- "Country",
48
- "City",
49
- "Seaport",
50
- "Airport"
51
- ], n = {}) {
52
- return tt.searchByName({
53
- keyword: e,
54
- displayInfo: t,
55
- ...n
56
- });
57
- }
58
- const $e = (e, t) => tt.searchByIdWithType(e, t);
59
- function sn(e, t) {
60
- const n = E([]), o = E(!1), l = E(!1), i = E(1), s = E(0), a = E(10), c = M(() => s.value === 0 ? !1 : n.value.length >= s.value), r = M(() => {
61
- const p = [...t.value];
62
- return p.includes("Country") && !p.includes("Region") && p.push("Region"), p;
63
- }), u = (p) => !p || !Array.isArray(p) ? [] : p.filter(
64
- (d) => r.value.includes(d.type)
65
- );
66
- return {
67
- searchResults: n,
68
- loading: o,
69
- isFetchingMore: l,
70
- isFinished: c,
71
- currentPage: i,
72
- total: s,
73
- fetchData: async (p = 1, d = !1) => {
74
- if (!e.value.trim() && !d) {
75
- n.value = [], s.value = 0;
76
- return;
77
- }
78
- if (!(d && (l.value || c.value)) && !(!d && o.value)) {
79
- d ? l.value = !0 : (o.value = !0, i.value = 1);
80
- try {
81
- const v = await ln(
82
- e.value,
83
- t.value,
84
- {
85
- current: p,
86
- // 使用传入的 page 参数
87
- size: a.value
88
- }
89
- ), w = v.records || [], C = u(w);
90
- d ? n.value = [...n.value, ...C] : n.value = C, s.value = v.total || 0, i.value = p;
91
- } catch (v) {
92
- console.error("Failed to fetch search results:", v);
93
- } finally {
94
- o.value = !1, l.value = !1;
95
- }
96
- }
97
- },
98
- filterByTypes: u
99
- };
100
- }
101
- const ye = Math.min, J = Math.max, Be = Math.round, Ee = Math.floor, Z = (e) => ({
102
- x: e,
103
- y: e
104
- }), an = {
105
- left: "right",
106
- right: "left",
107
- bottom: "top",
108
- top: "bottom"
109
- }, rn = {
110
- start: "end",
111
- end: "start"
112
- };
113
- function pt(e, t, n) {
114
- return J(e, ye(t, n));
115
- }
116
- function ke(e, t) {
117
- return typeof e == "function" ? e(t) : e;
118
- }
119
- function re(e) {
120
- return e.split("-")[0];
121
- }
122
- function Re(e) {
123
- return e.split("-")[1];
124
- }
125
- function kt(e) {
126
- return e === "x" ? "y" : "x";
127
- }
128
- function Rt(e) {
129
- return e === "y" ? "height" : "width";
130
- }
131
- const cn = /* @__PURE__ */ new Set(["top", "bottom"]);
132
- function ie(e) {
133
- return cn.has(re(e)) ? "y" : "x";
134
- }
135
- function _t(e) {
136
- return kt(ie(e));
137
- }
138
- function un(e, t, n) {
139
- n === void 0 && (n = !1);
140
- const o = Re(e), l = _t(e), i = Rt(l);
141
- let s = l === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
142
- return t.reference[i] > t.floating[i] && (s = Le(s)), [s, Le(s)];
143
- }
144
- function dn(e) {
145
- const t = Le(e);
146
- return [Ge(e), t, Ge(t)];
147
- }
148
- function Ge(e) {
149
- return e.replace(/start|end/g, (t) => rn[t]);
150
- }
151
- const mt = ["left", "right"], ht = ["right", "left"], fn = ["top", "bottom"], pn = ["bottom", "top"];
152
- function mn(e, t, n) {
153
- switch (e) {
154
- case "top":
155
- case "bottom":
156
- return n ? t ? ht : mt : t ? mt : ht;
157
- case "left":
158
- case "right":
159
- return t ? fn : pn;
160
- default:
161
- return [];
162
- }
163
- }
164
- function hn(e, t, n, o) {
165
- const l = Re(e);
166
- let i = mn(re(e), n === "start", o);
167
- return l && (i = i.map((s) => s + "-" + l), t && (i = i.concat(i.map(Ge)))), i;
168
- }
169
- function Le(e) {
170
- return e.replace(/left|right|bottom|top/g, (t) => an[t]);
171
- }
172
- function vn(e) {
173
- return {
174
- top: 0,
175
- right: 0,
176
- bottom: 0,
177
- left: 0,
178
- ...e
179
- };
180
- }
181
- function gn(e) {
182
- return typeof e != "number" ? vn(e) : {
183
- top: e,
184
- right: e,
185
- bottom: e,
186
- left: e
187
- };
188
- }
189
- function Ne(e) {
190
- const {
191
- x: t,
192
- y: n,
193
- width: o,
194
- height: l
195
- } = e;
196
- return {
197
- width: o,
198
- height: l,
199
- top: n,
200
- left: t,
201
- right: t + o,
202
- bottom: n + l,
203
- x: t,
204
- y: n
205
- };
206
- }
207
- function vt(e, t, n) {
208
- let {
209
- reference: o,
210
- floating: l
211
- } = e;
212
- const i = ie(t), s = _t(t), a = Rt(s), c = re(t), r = i === "y", u = o.x + o.width / 2 - l.width / 2, f = o.y + o.height / 2 - l.height / 2, p = o[a] / 2 - l[a] / 2;
213
- let d;
214
- switch (c) {
215
- case "top":
216
- d = {
217
- x: u,
218
- y: o.y - l.height
219
- };
220
- break;
221
- case "bottom":
222
- d = {
223
- x: u,
224
- y: o.y + o.height
225
- };
226
- break;
227
- case "right":
228
- d = {
229
- x: o.x + o.width,
230
- y: f
231
- };
232
- break;
233
- case "left":
234
- d = {
235
- x: o.x - l.width,
236
- y: f
237
- };
238
- break;
239
- default:
240
- d = {
241
- x: o.x,
242
- y: o.y
243
- };
244
- }
245
- switch (Re(t)) {
246
- case "start":
247
- d[s] -= p * (n && r ? -1 : 1);
248
- break;
249
- case "end":
250
- d[s] += p * (n && r ? -1 : 1);
251
- break;
252
- }
253
- return d;
254
- }
255
- const yn = async (e, t, n) => {
256
- const {
257
- placement: o = "bottom",
258
- strategy: l = "absolute",
259
- middleware: i = [],
260
- platform: s
261
- } = n, a = i.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
262
- let r = await s.getElementRects({
263
- reference: e,
264
- floating: t,
265
- strategy: l
266
- }), {
267
- x: u,
268
- y: f
269
- } = vt(r, o, c), p = o, d = {}, v = 0;
270
- for (let w = 0; w < a.length; w++) {
271
- const {
272
- name: C,
273
- fn: y
274
- } = a[w], {
275
- x: S,
276
- y: D,
277
- data: L,
278
- reset: V
279
- } = await y({
280
- x: u,
281
- y: f,
282
- initialPlacement: o,
283
- placement: p,
284
- strategy: l,
285
- middlewareData: d,
286
- rects: r,
287
- platform: s,
288
- elements: {
289
- reference: e,
290
- floating: t
291
- }
292
- });
293
- u = S ?? u, f = D ?? f, d = {
294
- ...d,
295
- [C]: {
296
- ...d[C],
297
- ...L
298
- }
299
- }, V && v <= 50 && (v++, typeof V == "object" && (V.placement && (p = V.placement), V.rects && (r = V.rects === !0 ? await s.getElementRects({
300
- reference: e,
301
- floating: t,
302
- strategy: l
303
- }) : V.rects), {
304
- x: u,
305
- y: f
306
- } = vt(r, p, c)), w = -1);
307
- }
308
- return {
309
- x: u,
310
- y: f,
311
- placement: p,
312
- strategy: l,
313
- middlewareData: d
314
- };
315
- };
316
- async function nt(e, t) {
317
- var n;
318
- t === void 0 && (t = {});
319
- const {
320
- x: o,
321
- y: l,
322
- platform: i,
323
- rects: s,
324
- elements: a,
325
- strategy: c
326
- } = e, {
327
- boundary: r = "clippingAncestors",
328
- rootBoundary: u = "viewport",
329
- elementContext: f = "floating",
330
- altBoundary: p = !1,
331
- padding: d = 0
332
- } = ke(t, e), v = gn(d), C = a[p ? f === "floating" ? "reference" : "floating" : f], y = Ne(await i.getClippingRect({
333
- element: (n = await (i.isElement == null ? void 0 : i.isElement(C))) == null || n ? C : C.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
334
- boundary: r,
335
- rootBoundary: u,
336
- strategy: c
337
- })), S = f === "floating" ? {
338
- x: o,
339
- y: l,
340
- width: s.floating.width,
341
- height: s.floating.height
342
- } : s.reference, D = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), L = await (i.isElement == null ? void 0 : i.isElement(D)) ? await (i.getScale == null ? void 0 : i.getScale(D)) || {
343
- x: 1,
344
- y: 1
345
- } : {
346
- x: 1,
347
- y: 1
348
- }, V = Ne(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
349
- elements: a,
350
- rect: S,
351
- offsetParent: D,
352
- strategy: c
353
- }) : S);
354
- return {
355
- top: (y.top - V.top + v.top) / L.y,
356
- bottom: (V.bottom - y.bottom + v.bottom) / L.y,
357
- left: (y.left - V.left + v.left) / L.x,
358
- right: (V.right - y.right + v.right) / L.x
359
- };
360
- }
361
- const An = function(e) {
362
- return e === void 0 && (e = {}), {
363
- name: "flip",
364
- options: e,
365
- async fn(t) {
366
- var n, o;
367
- const {
368
- placement: l,
369
- middlewareData: i,
370
- rects: s,
371
- initialPlacement: a,
372
- platform: c,
373
- elements: r
374
- } = t, {
375
- mainAxis: u = !0,
376
- crossAxis: f = !0,
377
- fallbackPlacements: p,
378
- fallbackStrategy: d = "bestFit",
379
- fallbackAxisSideDirection: v = "none",
380
- flipAlignment: w = !0,
381
- ...C
382
- } = ke(e, t);
383
- if ((n = i.arrow) != null && n.alignmentOffset)
384
- return {};
385
- const y = re(l), S = ie(a), D = re(a) === a, L = await (c.isRTL == null ? void 0 : c.isRTL(r.floating)), V = p || (D || !w ? [Le(a)] : dn(a)), Q = v !== "none";
386
- !p && Q && V.push(...hn(a, w, v, L));
387
- const U = [a, ...V], K = await nt(t, C), G = [];
388
- let P = ((o = i.flip) == null ? void 0 : o.overflows) || [];
389
- if (u && G.push(K[y]), f) {
390
- const I = un(l, s, L);
391
- G.push(K[I[0]], K[I[1]]);
392
- }
393
- if (P = [...P, {
394
- placement: l,
395
- overflows: G
396
- }], !G.every((I) => I <= 0)) {
397
- var ne, oe;
398
- const I = (((ne = i.flip) == null ? void 0 : ne.index) || 0) + 1, ue = U[I];
399
- if (ue && (!(f === "alignment" ? S !== ie(ue) : !1) || // We leave the current main axis only if every placement on that axis
400
- // overflows the main axis.
401
- P.every((O) => ie(O.placement) === S ? O.overflows[0] > 0 : !0)))
402
- return {
403
- data: {
404
- index: I,
405
- overflows: P
406
- },
407
- reset: {
408
- placement: ue
409
- }
410
- };
411
- let k = (oe = P.filter((R) => R.overflows[0] <= 0).sort((R, O) => R.overflows[1] - O.overflows[1])[0]) == null ? void 0 : oe.placement;
412
- if (!k)
413
- switch (d) {
414
- case "bestFit": {
415
- var q;
416
- const R = (q = P.filter((O) => {
417
- if (Q) {
418
- const H = ie(O.placement);
419
- return H === S || // Create a bias to the `y` side axis due to horizontal
420
- // reading directions favoring greater width.
421
- H === "y";
422
- }
423
- return !0;
424
- }).map((O) => [O.placement, O.overflows.filter((H) => H > 0).reduce((H, xe) => H + xe, 0)]).sort((O, H) => O[1] - H[1])[0]) == null ? void 0 : q[0];
425
- R && (k = R);
426
- break;
427
- }
428
- case "initialPlacement":
429
- k = a;
430
- break;
431
- }
432
- if (l !== k)
433
- return {
434
- reset: {
435
- placement: k
436
- }
437
- };
438
- }
439
- return {};
440
- }
441
- };
442
- }, wn = /* @__PURE__ */ new Set(["left", "top"]);
443
- async function xn(e, t) {
444
- const {
445
- placement: n,
446
- platform: o,
447
- elements: l
448
- } = e, i = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), s = re(n), a = Re(n), c = ie(n) === "y", r = wn.has(s) ? -1 : 1, u = i && c ? -1 : 1, f = ke(t, e);
449
- let {
450
- mainAxis: p,
451
- crossAxis: d,
452
- alignmentAxis: v
453
- } = typeof f == "number" ? {
454
- mainAxis: f,
455
- crossAxis: 0,
456
- alignmentAxis: null
457
- } : {
458
- mainAxis: f.mainAxis || 0,
459
- crossAxis: f.crossAxis || 0,
460
- alignmentAxis: f.alignmentAxis
461
- };
462
- return a && typeof v == "number" && (d = a === "end" ? v * -1 : v), c ? {
463
- x: d * u,
464
- y: p * r
465
- } : {
466
- x: p * r,
467
- y: d * u
468
- };
469
- }
470
- const bn = function(e) {
471
- return e === void 0 && (e = 0), {
472
- name: "offset",
473
- options: e,
474
- async fn(t) {
475
- var n, o;
476
- const {
477
- x: l,
478
- y: i,
479
- placement: s,
480
- middlewareData: a
481
- } = t, c = await xn(t, e);
482
- return s === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
483
- x: l + c.x,
484
- y: i + c.y,
485
- data: {
486
- ...c,
487
- placement: s
488
- }
489
- };
490
- }
491
- };
492
- }, Cn = function(e) {
493
- return e === void 0 && (e = {}), {
494
- name: "shift",
495
- options: e,
496
- async fn(t) {
497
- const {
498
- x: n,
499
- y: o,
500
- placement: l
501
- } = t, {
502
- mainAxis: i = !0,
503
- crossAxis: s = !1,
504
- limiter: a = {
505
- fn: (C) => {
506
- let {
507
- x: y,
508
- y: S
509
- } = C;
510
- return {
511
- x: y,
512
- y: S
513
- };
514
- }
515
- },
516
- ...c
517
- } = ke(e, t), r = {
518
- x: n,
519
- y: o
520
- }, u = await nt(t, c), f = ie(re(l)), p = kt(f);
521
- let d = r[p], v = r[f];
522
- if (i) {
523
- const C = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", S = d + u[C], D = d - u[y];
524
- d = pt(S, d, D);
525
- }
526
- if (s) {
527
- const C = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", S = v + u[C], D = v - u[y];
528
- v = pt(S, v, D);
529
- }
530
- const w = a.fn({
531
- ...t,
532
- [p]: d,
533
- [f]: v
534
- });
535
- return {
536
- ...w,
537
- data: {
538
- x: w.x - n,
539
- y: w.y - o,
540
- enabled: {
541
- [p]: i,
542
- [f]: s
543
- }
544
- }
545
- };
546
- }
547
- };
548
- }, Sn = function(e) {
549
- return e === void 0 && (e = {}), {
550
- name: "size",
551
- options: e,
552
- async fn(t) {
553
- var n, o;
554
- const {
555
- placement: l,
556
- rects: i,
557
- platform: s,
558
- elements: a
559
- } = t, {
560
- apply: c = () => {
561
- },
562
- ...r
563
- } = ke(e, t), u = await nt(t, r), f = re(l), p = Re(l), d = ie(l) === "y", {
564
- width: v,
565
- height: w
566
- } = i.floating;
567
- let C, y;
568
- f === "top" || f === "bottom" ? (C = f, y = p === (await (s.isRTL == null ? void 0 : s.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (y = f, C = p === "end" ? "top" : "bottom");
569
- const S = w - u.top - u.bottom, D = v - u.left - u.right, L = ye(w - u[C], S), V = ye(v - u[y], D), Q = !t.middlewareData.shift;
570
- let U = L, K = V;
571
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (K = D), (o = t.middlewareData.shift) != null && o.enabled.y && (U = S), Q && !p) {
572
- const P = J(u.left, 0), ne = J(u.right, 0), oe = J(u.top, 0), q = J(u.bottom, 0);
573
- d ? K = v - 2 * (P !== 0 || ne !== 0 ? P + ne : J(u.left, u.right)) : U = w - 2 * (oe !== 0 || q !== 0 ? oe + q : J(u.top, u.bottom));
574
- }
575
- await c({
576
- ...t,
577
- availableWidth: K,
578
- availableHeight: U
579
- });
580
- const G = await s.getDimensions(a.floating);
581
- return v !== G.width || w !== G.height ? {
582
- reset: {
583
- rects: !0
584
- }
585
- } : {};
586
- }
587
- };
588
- };
589
- function Ie() {
590
- return typeof window < "u";
591
- }
592
- function we(e) {
593
- return Ot(e) ? (e.nodeName || "").toLowerCase() : "#document";
594
- }
595
- function W(e) {
596
- var t;
597
- return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
598
- }
599
- function te(e) {
600
- var t;
601
- return (t = (Ot(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
602
- }
603
- function Ot(e) {
604
- return Ie() ? e instanceof Node || e instanceof W(e).Node : !1;
605
- }
606
- function z(e) {
607
- return Ie() ? e instanceof Element || e instanceof W(e).Element : !1;
608
- }
609
- function ee(e) {
610
- return Ie() ? e instanceof HTMLElement || e instanceof W(e).HTMLElement : !1;
611
- }
612
- function gt(e) {
613
- return !Ie() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof W(e).ShadowRoot;
614
- }
615
- const kn = /* @__PURE__ */ new Set(["inline", "contents"]);
616
- function _e(e) {
617
- const {
618
- overflow: t,
619
- overflowX: n,
620
- overflowY: o,
621
- display: l
622
- } = j(e);
623
- return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !kn.has(l);
624
- }
625
- const Rn = /* @__PURE__ */ new Set(["table", "td", "th"]);
626
- function _n(e) {
627
- return Rn.has(we(e));
628
- }
629
- const On = [":popover-open", ":modal"];
630
- function Fe(e) {
631
- return On.some((t) => {
632
- try {
633
- return e.matches(t);
634
- } catch {
635
- return !1;
636
- }
637
- });
638
- }
639
- const Tn = ["transform", "translate", "scale", "rotate", "perspective"], En = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Vn = ["paint", "layout", "strict", "content"];
640
- function ot(e) {
641
- const t = lt(), n = z(e) ? j(e) : e;
642
- return Tn.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) || En.some((o) => (n.willChange || "").includes(o)) || Vn.some((o) => (n.contain || "").includes(o));
643
- }
644
- function Dn(e) {
645
- let t = ce(e);
646
- for (; ee(t) && !Ae(t); ) {
647
- if (ot(t))
648
- return t;
649
- if (Fe(t))
650
- return null;
651
- t = ce(t);
652
- }
653
- return null;
654
- }
655
- function lt() {
656
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
657
- }
658
- const Bn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
659
- function Ae(e) {
660
- return Bn.has(we(e));
661
- }
662
- function j(e) {
663
- return W(e).getComputedStyle(e);
664
- }
665
- function Me(e) {
666
- return z(e) ? {
667
- scrollLeft: e.scrollLeft,
668
- scrollTop: e.scrollTop
669
- } : {
670
- scrollLeft: e.scrollX,
671
- scrollTop: e.scrollY
672
- };
673
- }
674
- function ce(e) {
675
- if (we(e) === "html")
676
- return e;
677
- const t = (
678
- // Step into the shadow DOM of the parent of a slotted node.
679
- e.assignedSlot || // DOM Element detected.
680
- e.parentNode || // ShadowRoot detected.
681
- gt(e) && e.host || // Fallback.
682
- te(e)
683
- );
684
- return gt(t) ? t.host : t;
685
- }
686
- function Tt(e) {
687
- const t = ce(e);
688
- return Ae(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ee(t) && _e(t) ? t : Tt(t);
689
- }
690
- function Se(e, t, n) {
691
- var o;
692
- t === void 0 && (t = []), n === void 0 && (n = !0);
693
- const l = Tt(e), i = l === ((o = e.ownerDocument) == null ? void 0 : o.body), s = W(l);
694
- if (i) {
695
- const a = qe(s);
696
- return t.concat(s, s.visualViewport || [], _e(l) ? l : [], a && n ? Se(a) : []);
697
- }
698
- return t.concat(l, Se(l, [], n));
699
- }
700
- function qe(e) {
701
- return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
702
- }
703
- function Et(e) {
704
- const t = j(e);
705
- let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
706
- const l = ee(e), i = l ? e.offsetWidth : n, s = l ? e.offsetHeight : o, a = Be(n) !== i || Be(o) !== s;
707
- return a && (n = i, o = s), {
708
- width: n,
709
- height: o,
710
- $: a
711
- };
712
- }
713
- function st(e) {
714
- return z(e) ? e : e.contextElement;
715
- }
716
- function ge(e) {
717
- const t = st(e);
718
- if (!ee(t))
719
- return Z(1);
720
- const n = t.getBoundingClientRect(), {
721
- width: o,
722
- height: l,
723
- $: i
724
- } = Et(t);
725
- let s = (i ? Be(n.width) : n.width) / o, a = (i ? Be(n.height) : n.height) / l;
726
- return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
727
- x: s,
728
- y: a
729
- };
730
- }
731
- const Ln = /* @__PURE__ */ Z(0);
732
- function Vt(e) {
733
- const t = W(e);
734
- return !lt() || !t.visualViewport ? Ln : {
735
- x: t.visualViewport.offsetLeft,
736
- y: t.visualViewport.offsetTop
737
- };
738
- }
739
- function Nn(e, t, n) {
740
- return t === void 0 && (t = !1), !n || t && n !== W(e) ? !1 : t;
741
- }
742
- function me(e, t, n, o) {
743
- t === void 0 && (t = !1), n === void 0 && (n = !1);
744
- const l = e.getBoundingClientRect(), i = st(e);
745
- let s = Z(1);
746
- t && (o ? z(o) && (s = ge(o)) : s = ge(e));
747
- const a = Nn(i, n, o) ? Vt(i) : Z(0);
748
- let c = (l.left + a.x) / s.x, r = (l.top + a.y) / s.y, u = l.width / s.x, f = l.height / s.y;
749
- if (i) {
750
- const p = W(i), d = o && z(o) ? W(o) : o;
751
- let v = p, w = qe(v);
752
- for (; w && o && d !== v; ) {
753
- const C = ge(w), y = w.getBoundingClientRect(), S = j(w), D = y.left + (w.clientLeft + parseFloat(S.paddingLeft)) * C.x, L = y.top + (w.clientTop + parseFloat(S.paddingTop)) * C.y;
754
- c *= C.x, r *= C.y, u *= C.x, f *= C.y, c += D, r += L, v = W(w), w = qe(v);
755
- }
756
- }
757
- return Ne({
758
- width: u,
759
- height: f,
760
- x: c,
761
- y: r
762
- });
763
- }
764
- function Ue(e, t) {
765
- const n = Me(e).scrollLeft;
766
- return t ? t.left + n : me(te(e)).left + n;
767
- }
768
- function Dt(e, t) {
769
- const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Ue(e, n), l = n.top + t.scrollTop;
770
- return {
771
- x: o,
772
- y: l
773
- };
774
- }
775
- function In(e) {
776
- let {
777
- elements: t,
778
- rect: n,
779
- offsetParent: o,
780
- strategy: l
781
- } = e;
782
- const i = l === "fixed", s = te(o), a = t ? Fe(t.floating) : !1;
783
- if (o === s || a && i)
784
- return n;
785
- let c = {
786
- scrollLeft: 0,
787
- scrollTop: 0
788
- }, r = Z(1);
789
- const u = Z(0), f = ee(o);
790
- if ((f || !f && !i) && ((we(o) !== "body" || _e(s)) && (c = Me(o)), ee(o))) {
791
- const d = me(o);
792
- r = ge(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
793
- }
794
- const p = s && !f && !i ? Dt(s, c) : Z(0);
795
- return {
796
- width: n.width * r.x,
797
- height: n.height * r.y,
798
- x: n.x * r.x - c.scrollLeft * r.x + u.x + p.x,
799
- y: n.y * r.y - c.scrollTop * r.y + u.y + p.y
800
- };
801
- }
802
- function Fn(e) {
803
- return Array.from(e.getClientRects());
804
- }
805
- function Mn(e) {
806
- const t = te(e), n = Me(e), o = e.ownerDocument.body, l = J(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = J(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
807
- let s = -n.scrollLeft + Ue(e);
808
- const a = -n.scrollTop;
809
- return j(o).direction === "rtl" && (s += J(t.clientWidth, o.clientWidth) - l), {
810
- width: l,
811
- height: i,
812
- x: s,
813
- y: a
814
- };
815
- }
816
- const yt = 25;
817
- function Un(e, t) {
818
- const n = W(e), o = te(e), l = n.visualViewport;
819
- let i = o.clientWidth, s = o.clientHeight, a = 0, c = 0;
820
- if (l) {
821
- i = l.width, s = l.height;
822
- const u = lt();
823
- (!u || u && t === "fixed") && (a = l.offsetLeft, c = l.offsetTop);
824
- }
825
- const r = Ue(o);
826
- if (r <= 0) {
827
- const u = o.ownerDocument, f = u.body, p = getComputedStyle(f), d = u.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, v = Math.abs(o.clientWidth - f.clientWidth - d);
828
- v <= yt && (i -= v);
829
- } else r <= yt && (i += r);
830
- return {
831
- width: i,
832
- height: s,
833
- x: a,
834
- y: c
835
- };
836
- }
837
- const Pn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
838
- function Hn(e, t) {
839
- const n = me(e, !0, t === "fixed"), o = n.top + e.clientTop, l = n.left + e.clientLeft, i = ee(e) ? ge(e) : Z(1), s = e.clientWidth * i.x, a = e.clientHeight * i.y, c = l * i.x, r = o * i.y;
840
- return {
841
- width: s,
842
- height: a,
843
- x: c,
844
- y: r
845
- };
846
- }
847
- function At(e, t, n) {
848
- let o;
849
- if (t === "viewport")
850
- o = Un(e, n);
851
- else if (t === "document")
852
- o = Mn(te(e));
853
- else if (z(t))
854
- o = Hn(t, n);
855
- else {
856
- const l = Vt(e);
857
- o = {
858
- x: t.x - l.x,
859
- y: t.y - l.y,
860
- width: t.width,
861
- height: t.height
862
- };
863
- }
864
- return Ne(o);
865
- }
866
- function Bt(e, t) {
867
- const n = ce(e);
868
- return n === t || !z(n) || Ae(n) ? !1 : j(n).position === "fixed" || Bt(n, t);
869
- }
870
- function Qn(e, t) {
871
- const n = t.get(e);
872
- if (n)
873
- return n;
874
- let o = Se(e, [], !1).filter((a) => z(a) && we(a) !== "body"), l = null;
875
- const i = j(e).position === "fixed";
876
- let s = i ? ce(e) : e;
877
- for (; z(s) && !Ae(s); ) {
878
- const a = j(s), c = ot(s);
879
- !c && a.position === "fixed" && (l = null), (i ? !c && !l : !c && a.position === "static" && !!l && Pn.has(l.position) || _e(s) && !c && Bt(e, s)) ? o = o.filter((u) => u !== s) : l = a, s = ce(s);
880
- }
881
- return t.set(e, o), o;
882
- }
883
- function $n(e) {
884
- let {
885
- element: t,
886
- boundary: n,
887
- rootBoundary: o,
888
- strategy: l
889
- } = e;
890
- const s = [...n === "clippingAncestors" ? Fe(t) ? [] : Qn(t, this._c) : [].concat(n), o], a = s[0], c = s.reduce((r, u) => {
891
- const f = At(t, u, l);
892
- return r.top = J(f.top, r.top), r.right = ye(f.right, r.right), r.bottom = ye(f.bottom, r.bottom), r.left = J(f.left, r.left), r;
893
- }, At(t, a, l));
894
- return {
895
- width: c.right - c.left,
896
- height: c.bottom - c.top,
897
- x: c.left,
898
- y: c.top
899
- };
900
- }
901
- function Jn(e) {
902
- const {
903
- width: t,
904
- height: n
905
- } = Et(e);
906
- return {
907
- width: t,
908
- height: n
909
- };
910
- }
911
- function Wn(e, t, n) {
912
- const o = ee(t), l = te(t), i = n === "fixed", s = me(e, !0, i, t);
913
- let a = {
914
- scrollLeft: 0,
915
- scrollTop: 0
916
- };
917
- const c = Z(0);
918
- function r() {
919
- c.x = Ue(l);
920
- }
921
- if (o || !o && !i)
922
- if ((we(t) !== "body" || _e(l)) && (a = Me(t)), o) {
923
- const d = me(t, !0, i, t);
924
- c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
925
- } else l && r();
926
- i && !o && l && r();
927
- const u = l && !o && !i ? Dt(l, a) : Z(0), f = s.left + a.scrollLeft - c.x - u.x, p = s.top + a.scrollTop - c.y - u.y;
928
- return {
929
- x: f,
930
- y: p,
931
- width: s.width,
932
- height: s.height
933
- };
934
- }
935
- function Je(e) {
936
- return j(e).position === "static";
937
- }
938
- function wt(e, t) {
939
- if (!ee(e) || j(e).position === "fixed")
940
- return null;
941
- if (t)
942
- return t(e);
943
- let n = e.offsetParent;
944
- return te(e) === n && (n = n.ownerDocument.body), n;
945
- }
946
- function Lt(e, t) {
947
- const n = W(e);
948
- if (Fe(e))
949
- return n;
950
- if (!ee(e)) {
951
- let l = ce(e);
952
- for (; l && !Ae(l); ) {
953
- if (z(l) && !Je(l))
954
- return l;
955
- l = ce(l);
956
- }
957
- return n;
958
- }
959
- let o = wt(e, t);
960
- for (; o && _n(o) && Je(o); )
961
- o = wt(o, t);
962
- return o && Ae(o) && Je(o) && !ot(o) ? n : o || Dn(e) || n;
963
- }
964
- const Kn = async function(e) {
965
- const t = this.getOffsetParent || Lt, n = this.getDimensions, o = await n(e.floating);
966
- return {
967
- reference: Wn(e.reference, await t(e.floating), e.strategy),
968
- floating: {
969
- x: 0,
970
- y: 0,
971
- width: o.width,
972
- height: o.height
973
- }
974
- };
975
- };
976
- function Gn(e) {
977
- return j(e).direction === "rtl";
978
- }
979
- const qn = {
980
- convertOffsetParentRelativeRectToViewportRelativeRect: In,
981
- getDocumentElement: te,
982
- getClippingRect: $n,
983
- getOffsetParent: Lt,
984
- getElementRects: Kn,
985
- getClientRects: Fn,
986
- getDimensions: Jn,
987
- getScale: ge,
988
- isElement: z,
989
- isRTL: Gn
990
- };
991
- function Nt(e, t) {
992
- return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
993
- }
994
- function Yn(e, t) {
995
- let n = null, o;
996
- const l = te(e);
997
- function i() {
998
- var a;
999
- clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
1000
- }
1001
- function s(a, c) {
1002
- a === void 0 && (a = !1), c === void 0 && (c = 1), i();
1003
- const r = e.getBoundingClientRect(), {
1004
- left: u,
1005
- top: f,
1006
- width: p,
1007
- height: d
1008
- } = r;
1009
- if (a || t(), !p || !d)
1010
- return;
1011
- const v = Ee(f), w = Ee(l.clientWidth - (u + p)), C = Ee(l.clientHeight - (f + d)), y = Ee(u), D = {
1012
- rootMargin: -v + "px " + -w + "px " + -C + "px " + -y + "px",
1013
- threshold: J(0, ye(1, c)) || 1
1014
- };
1015
- let L = !0;
1016
- function V(Q) {
1017
- const U = Q[0].intersectionRatio;
1018
- if (U !== c) {
1019
- if (!L)
1020
- return s();
1021
- U ? s(!1, U) : o = setTimeout(() => {
1022
- s(!1, 1e-7);
1023
- }, 1e3);
1024
- }
1025
- U === 1 && !Nt(r, e.getBoundingClientRect()) && s(), L = !1;
1026
- }
1027
- try {
1028
- n = new IntersectionObserver(V, {
1029
- ...D,
1030
- // Handle <iframe>s
1031
- root: l.ownerDocument
1032
- });
1033
- } catch {
1034
- n = new IntersectionObserver(V, D);
1035
- }
1036
- n.observe(e);
1037
- }
1038
- return s(!0), i;
1039
- }
1040
- function zn(e, t, n, o) {
1041
- o === void 0 && (o = {});
1042
- const {
1043
- ancestorScroll: l = !0,
1044
- ancestorResize: i = !0,
1045
- elementResize: s = typeof ResizeObserver == "function",
1046
- layoutShift: a = typeof IntersectionObserver == "function",
1047
- animationFrame: c = !1
1048
- } = o, r = st(e), u = l || i ? [...r ? Se(r) : [], ...Se(t)] : [];
1049
- u.forEach((y) => {
1050
- l && y.addEventListener("scroll", n, {
1051
- passive: !0
1052
- }), i && y.addEventListener("resize", n);
1053
- });
1054
- const f = r && a ? Yn(r, n) : null;
1055
- let p = -1, d = null;
1056
- s && (d = new ResizeObserver((y) => {
1057
- let [S] = y;
1058
- S && S.target === r && d && (d.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1059
- var D;
1060
- (D = d) == null || D.observe(t);
1061
- })), n();
1062
- }), r && !c && d.observe(r), d.observe(t));
1063
- let v, w = c ? me(e) : null;
1064
- c && C();
1065
- function C() {
1066
- const y = me(e);
1067
- w && !Nt(w, y) && n(), w = y, v = requestAnimationFrame(C);
1068
- }
1069
- return n(), () => {
1070
- var y;
1071
- u.forEach((S) => {
1072
- l && S.removeEventListener("scroll", n), i && S.removeEventListener("resize", n);
1073
- }), f?.(), (y = d) == null || y.disconnect(), d = null, c && cancelAnimationFrame(v);
1074
- };
1075
- }
1076
- const jn = bn, Xn = Cn, Zn = An, eo = Sn, to = (e, t, n) => {
1077
- const o = /* @__PURE__ */ new Map(), l = {
1078
- platform: qn,
1079
- ...n
1080
- }, i = {
1081
- ...l.platform,
1082
- _c: o
1083
- };
1084
- return yn(e, t, {
1085
- ...l,
1086
- platform: i
1087
- });
1088
- };
1089
- function no(e, t) {
1090
- const n = E({
1091
- position: "fixed",
1092
- left: "0",
1093
- top: "0",
1094
- zIndex: 3e3
1095
- // 确保在 Modal 之上
1096
- });
1097
- let o = null;
1098
- const l = () => {
1099
- !e.value || !t.value || to(e.value, t.value, {
1100
- placement: "bottom-start",
1101
- strategy: "fixed",
1102
- middleware: [
1103
- jn(6),
1104
- // 输入框与下拉列表的间距
1105
- Zn(),
1106
- // 空间不足自动翻转到上方
1107
- Xn({ padding: 10 }),
1108
- // 靠近屏幕边缘时自动位移
1109
- eo({
1110
- apply({ rects: a, elements: c }) {
1111
- const r = `${a.reference.width}px`;
1112
- Object.assign(c.floating.style, {
1113
- width: r,
1114
- // 必须锁定,否则在 body 下它可能由于内容过多撑开到 100vw
1115
- minWidth: r,
1116
- maxWidth: r
1117
- });
1118
- }
1119
- })
1120
- ]
1121
- }).then(({ x: a, y: c }) => {
1122
- Object.assign(n.value, {
1123
- left: `${a}px`,
1124
- top: `${c}px`
1125
- });
1126
- });
1127
- }, i = () => {
1128
- e.value && t.value && (o = zn(e.value, t.value, l));
1129
- }, s = () => {
1130
- o && (o(), o = null);
1131
- };
1132
- return Ct(s), { floatingStyles: n, startTrack: i, stopTrack: s };
1133
- }
1134
- const oo = "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", lo = "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=", so = "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==", io = "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", ao = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==", Ye = "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", ro = "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", co = { class: "search-container" }, uo = { class: "selection-wrapper" }, fo = { class: "tag-text" }, po = ["onClick"], mo = {
1135
- key: 0,
1136
- class: "search-tag collapse"
1137
- }, ho = ["placeholder"], vo = { class: "suffix-area" }, go = {
1138
- key: 1,
1139
- class: "loading-spinner"
1140
- }, yo = { class: "search-icon" }, Ao = ["src"], wo = {
1141
- key: 0,
1142
- class: "history-section"
1143
- }, xo = { class: "history-header" }, bo = ["onMousedown"], Co = ["src"], So = { class: "type-text" }, ko = { class: "result-text" }, Ro = {
1144
- key: 0,
1145
- class: "status-msg"
1146
- }, _o = ["onMousedown"], Oo = ["src"], To = { class: "type-text" }, Eo = { class: "result-text" }, Vo = {
1147
- key: 0,
1148
- class: "load-more-msg"
1149
- }, Do = {
1150
- key: 1,
1151
- class: "load-more-msg no-more"
1152
- }, Bo = {
1153
- key: 2,
1154
- class: "status-msg"
1155
- }, Lo = {
1156
- key: 0,
1157
- class: "no-result-label"
1158
- }, No = {
1159
- key: 1,
1160
- class: "no-result-label"
1161
- }, Io = ["src"], Fo = /* @__PURE__ */ je({
1162
- __name: "index",
1163
- props: {
1164
- modelValue: { default: null },
1165
- multiple: { type: Boolean, default: !1 },
1166
- collapseTags: { type: Boolean, default: !1 },
1167
- searchTypeList: { default: () => [
1168
- "Continent",
1169
- "Country",
1170
- "Region",
1171
- "City",
1172
- "Seaport",
1173
- "Airport"
1174
- ] },
1175
- historyKey: { default: void 0 },
1176
- lang: { default: "" },
1177
- placeholder: {},
1178
- showSearchIcon: { type: Boolean, default: !0 },
1179
- showItemTag: { type: Boolean, default: !0 },
1180
- showApplyData: { type: Boolean, default: !0 }
1181
- },
1182
- emits: [
1183
- "update:modelValue",
1184
- "select",
1185
- "change",
1186
- "submit-search",
1187
- "remove",
1188
- "apply-data"
1189
- ],
1190
- setup(e, { emit: t }) {
1191
- const n = e, o = t, l = E(null), i = E(null), s = E(null), a = E(""), c = E(""), r = E(!1), u = E(!1);
1192
- let f = null;
1193
- const p = E(!1), d = M(() => n.modelValue ? Array.isArray(n.modelValue) ? n.modelValue : [n.modelValue] : []), v = M(() => n.multiple ? n.collapseTags ? d.value.slice(0, 1) : d.value : []), w = M(() => a.value || d.value.length > 0), C = M(() => n.multiple ? a.value ? `${a.value.length * 10 + 20}px` : "10px" : "100%"), { searchHistory: y, saveToHistory: S, clearHistory: D } = on(
1194
- We(n, "historyKey")
1195
- ), {
1196
- searchResults: L,
1197
- loading: V,
1198
- isFetchingMore: Q,
1199
- isFinished: U,
1200
- currentPage: K,
1201
- fetchData: G,
1202
- filterByTypes: P
1203
- } = sn(a, We(n, "searchTypeList")), { floatingStyles: ne, startTrack: oe, stopTrack: q } = no(
1204
- i,
1205
- s
1206
- ), I = M(() => {
1207
- if (n.lang)
1208
- return n.lang === "en" || n.lang === "en-US";
1209
- try {
1210
- if (typeof useCookie == "function") {
1211
- const g = useCookie("jc-language")?.value;
1212
- if (g)
1213
- return /^en(-US)?$/.test(g);
1214
- }
1215
- } catch {
1216
- }
1217
- if (typeof document < "u") {
1218
- const g = document.cookie || "";
1219
- return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(g);
1220
- }
1221
- try {
1222
- if (typeof useNuxtApp == "function") {
1223
- const T = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
1224
- return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(T);
1225
- }
1226
- } catch {
1227
- }
1228
- return !1;
1229
- }), ue = M(() => n.multiple && d.value.length > 0 ? "" : r.value && !n.multiple ? c.value : n.placeholder ? n.placeholder : I.value ? "Please enter..." : "请输入..."), k = () => l.value?.focus(), R = (g) => I.value ? g.displayEn || g.display || "" : g.displayCn || g.display || "", O = (g) => {
1230
- if (S(g), n.multiple) {
1231
- if (!d.value.some((b) => b.id === g.id)) {
1232
- const b = [...d.value, g];
1233
- o("update:modelValue", b);
1234
- }
1235
- a.value = "";
1236
- } else
1237
- c.value = R(g), r.value = !0, a.value = "", u.value = !1, o("update:modelValue", g);
1238
- o("select", g), o("change", g);
1239
- }, H = (g) => {
1240
- const T = d.value.filter((b) => b.id !== g.id);
1241
- o("update:modelValue", T), o("remove", g);
1242
- }, xe = () => {
1243
- n.multiple && !a.value && d.value.length > 0 && H(
1244
- d.value[d.value.length - 1]
1245
- );
1246
- }, at = () => {
1247
- a.value = "", r.value = !1, c.value = "", o("update:modelValue", n.multiple ? [] : null);
1248
- }, Mt = async () => {
1249
- if (u.value = !0, !n.multiple && r.value && L.value.length === 0) {
1250
- const g = n.modelValue;
1251
- if (g?.id) {
1252
- V.value = !0;
1253
- try {
1254
- const T = await $e(
1255
- g.id,
1256
- g.type
1257
- );
1258
- L.value = P(T.records);
1259
- } finally {
1260
- V.value = !1;
1261
- }
1262
- }
1263
- }
1264
- }, Ut = () => setTimeout(() => u.value = !1, 200), Pt = (g) => {
1265
- g.target.value === "" && !n.multiple && at();
1266
- }, Ht = () => {
1267
- o("submit-search", d.value), u.value = !1;
1268
- }, Qt = (g) => {
1269
- const { scrollTop: T, scrollHeight: b, clientHeight: $ } = g.target;
1270
- T + $ >= b - 20 && !V.value && !Q.value && !U.value && a.value && G(K.value + 1, !0);
1271
- }, $t = (g) => {
1272
- console.log("🍉 ~ index.vue:428 ~ handleConfirmApplyData ~ e:", g), o("apply-data", g);
1273
- };
1274
- Ve(u, (g) => {
1275
- g ? oe() : q();
1276
- }), Ve(a, (g) => {
1277
- if (!g.trim()) {
1278
- L.value = [];
1279
- return;
1280
- }
1281
- f && clearTimeout(f), f = setTimeout(() => G(1, !1), 300);
1282
- }), Ve(
1283
- () => n.modelValue,
1284
- async (g, T) => {
1285
- if (JSON.stringify(g) === JSON.stringify(T)) return;
1286
- if (n.multiple && Array.isArray(g)) {
1287
- const $ = [...g], le = $.filter(
1288
- (X) => X && X.id && X.type && !X.display
1289
- );
1290
- if (le.length > 0)
1291
- try {
1292
- const X = le.map((de) => de.id).filter(
1293
- (de) => de != null
1294
- ), Pe = await $e(
1295
- X,
1296
- le[0].type
1297
- );
1298
- if (Pe && Pe.records) {
1299
- let de = !1;
1300
- const Wt = $.map((Oe) => {
1301
- const ut = Pe.records.find((Kt) => Kt.id === Oe.id);
1302
- return ut && !Oe.display ? (de = !0, { ...Oe, ...ut }) : Oe;
1303
- });
1304
- de && o("update:modelValue", Wt);
1305
- }
1306
- } catch (X) {
1307
- console.error("Batch fetch detail failed:", X);
1308
- }
1309
- return;
1310
- }
1311
- const b = g;
1312
- if (!b) {
1313
- r.value = !1, c.value = "";
1314
- return;
1315
- }
1316
- if (typeof b == "object")
1317
- if (b.id && b.type && !b.display)
1318
- try {
1319
- const le = (await $e(
1320
- b.id,
1321
- b.type
1322
- )).records.find(
1323
- (X) => X.id === b.id
1324
- );
1325
- le && (c.value = R(le), r.value = !0);
1326
- } catch ($) {
1327
- console.error("Single fetch detail failed:", $);
1328
- }
1329
- else
1330
- c.value = R(b), r.value = !!c.value;
1331
- else
1332
- c.value = String(b), r.value = !!b;
1333
- },
1334
- { immediate: !0, deep: !0 }
1335
- );
1336
- const rt = (g) => ({
1337
- City: ao,
1338
- Country: io,
1339
- Airport: oo,
1340
- Seaport: so
1341
- })[g] || lo, ct = (g) => {
1342
- const T = {
1343
- City: {
1344
- en: "City",
1345
- cn: "城市"
1346
- },
1347
- Country: {
1348
- en: "Country",
1349
- cn: "国家"
1350
- },
1351
- Region: {
1352
- en: "Region",
1353
- cn: "区域"
1354
- },
1355
- Airport: {
1356
- en: "Airport",
1357
- cn: "机场"
1358
- },
1359
- Seaport: {
1360
- en: "Seaport",
1361
- cn: "港口"
1362
- }
1363
- };
1364
- return I.value ? T[g].en : T[g].cn;
1365
- }, Jt = (g) => d.value.some((T) => T.id === g.id);
1366
- return Ct(q), (g, T) => (A(), x("div", co, [
1367
- m("div", {
1368
- class: ae(["search-input-wrapper", { "is-multiple": e.multiple }]),
1369
- ref_key: "referenceRef",
1370
- ref: i,
1371
- onClick: k
1372
- }, [
1373
- m("div", uo, [
1374
- e.multiple && d.value.length > 0 ? (A(), x(se, { key: 0 }, [
1375
- (A(!0), x(se, null, ve(v.value, (b, $) => (A(), x("div", {
1376
- key: b.id || $,
1377
- class: "search-tag"
1378
- }, [
1379
- m("span", fo, _(R(b)), 1),
1380
- m("span", {
1381
- class: "tag-close",
1382
- onClick: Y((le) => H(b), ["stop"])
1383
- }, "×", 8, po)
1384
- ]))), 128)),
1385
- e.collapseTags && d.value.length > 1 ? (A(), x("div", mo, " + " + _(d.value.length - 1), 1)) : F("", !0)
1386
- ], 64)) : F("", !0),
1387
- De(m("input", {
1388
- ref_key: "inputRef",
1389
- ref: l,
1390
- class: ae({ "is-selected-state": r.value && !e.multiple }),
1391
- "onUpdate:modelValue": T[0] || (T[0] = (b) => a.value = b),
1392
- type: "text",
1393
- placeholder: ue.value,
1394
- style: Te({ width: C.value }),
1395
- onFocus: Mt,
1396
- onBlur: Ut,
1397
- onInput: Pt,
1398
- onKeydown: Gt(xe, ["delete"])
1399
- }, null, 46, ho), [
1400
- [Ze, a.value]
1401
- ])
1402
- ]),
1403
- m("div", vo, [
1404
- w.value ? (A(), x("span", {
1405
- key: 0,
1406
- class: "clear-icon",
1407
- onMousedown: T[1] || (T[1] = Y(() => {
1408
- }, ["prevent"])),
1409
- onClick: Y(at, ["stop"])
1410
- }, "ⓧ", 32)) : F("", !0),
1411
- h(V) && !h(Q) ? (A(), x("div", go)) : !h(V) && e.showSearchIcon ? (A(), x("button", {
1412
- key: 2,
1413
- class: "search-btn",
1414
- onClick: Y(Ht, ["stop"])
1415
- }, [
1416
- m("span", yo, [
1417
- m("img", {
1418
- src: h(Ye),
1419
- alt: "search"
1420
- }, null, 8, Ao)
1421
- ])
1422
- ])) : F("", !0)
1423
- ])
1424
- ], 2),
1425
- (A(), Xe(St, { to: "body" }, [
1426
- De(m("div", {
1427
- ref_key: "floatingRef",
1428
- ref: s,
1429
- class: "dropdown-list",
1430
- style: Te(h(ne)),
1431
- onScroll: Qt
1432
- }, [
1433
- He(g.$slots, "history", { searchHistory: h(y) }, () => [
1434
- h(y).length > 0 && !a.value ? (A(), x("div", wo, [
1435
- m("div", xo, [
1436
- m("span", null, _(I.value ? "Recent search" : "最近搜索"), 1),
1437
- m("span", {
1438
- class: "clear-btn",
1439
- onMousedown: T[2] || (T[2] = Y(() => {
1440
- }, ["prevent"])),
1441
- onClick: T[3] || (T[3] = Y(
1442
- //@ts-ignore
1443
- (...b) => h(D) && h(D)(...b),
1444
- ["stop"]
1445
- ))
1446
- }, _(I.value ? "Clear" : "清空"), 33)
1447
- ]),
1448
- (A(!0), x(se, null, ve(h(y), (b, $) => (A(), x("div", {
1449
- key: "hist-" + $,
1450
- class: "dropdown-item",
1451
- onMousedown: (le) => O(b)
1452
- }, [
1453
- m("div", {
1454
- class: "category-tag",
1455
- style: Te(e.showItemTag ? {} : { display: "none" })
1456
- }, [
1457
- m("img", {
1458
- class: "type-icon",
1459
- src: rt(b.type),
1460
- alt: ""
1461
- }, null, 8, Co),
1462
- m("span", So, _(ct(b.type)), 1)
1463
- ], 4),
1464
- m("div", ko, _(R(b)), 1)
1465
- ], 40, bo))), 128)),
1466
- T[7] || (T[7] = m("hr", { class: "divider" }, null, -1))
1467
- ])) : F("", !0)
1468
- ], !0),
1469
- h(V) && !h(Q) ? (A(), x("div", Ro, _(I.value ? "Searching..." : "正在搜索中..."), 1)) : h(L).length > 0 ? (A(), x(se, { key: 1 }, [
1470
- He(g.$slots, "results", { searchResults: h(L) }, () => [
1471
- (A(!0), x(se, null, ve(h(L), (b, $) => (A(), x("div", {
1472
- key: $,
1473
- class: ae(["dropdown-item", { "is-active": Jt(b) }]),
1474
- onMousedown: (le) => O(b)
1475
- }, [
1476
- m("div", {
1477
- class: "category-tag",
1478
- style: Te(e.showItemTag ? {} : { display: "none" })
1479
- }, [
1480
- m("img", {
1481
- class: "type-icon",
1482
- src: rt(b.type),
1483
- alt: ""
1484
- }, null, 8, Oo),
1485
- m("span", To, _(ct(b.type)), 1)
1486
- ], 4),
1487
- m("div", Eo, _(R(b)), 1)
1488
- ], 42, _o))), 128))
1489
- ], !0),
1490
- h(Q) ? (A(), x("div", Vo, _(I.value ? "Loading more..." : "正在加载更多..."), 1)) : h(U) && a.value ? (A(), x("div", Do, _(I.value ? "All results have been loaded" : "已加载全部结果"), 1)) : F("", !0)
1491
- ], 64)) : a.value && !h(V) ? (A(), x("div", Bo, [
1492
- He(g.$slots, "noData", {}, () => [
1493
- e.showApplyData ? (A(), x("p", No, [
1494
- et(_(I.value ? "No results found ." : "暂无结果,") + " ", 1),
1495
- m("span", {
1496
- class: "apply-data",
1497
- onClick: T[4] || (T[4] = Y(() => p.value = !0, ["stop"]))
1498
- }, _(I.value ? " Apply for data addition" : "申请补充数据 "), 1),
1499
- m("img", {
1500
- src: h(ro),
1501
- alt: "",
1502
- class: "apply-data-more-icon",
1503
- onClick: T[5] || (T[5] = Y(() => p.value = !0, ["stop"]))
1504
- }, null, 8, Io)
1505
- ])) : (A(), x("p", Lo, _(I.value ? `No results found related to "${a.value}".` : `未找到与 "${a.value}" 相关的结果`), 1))
1506
- ], !0)
1507
- ])) : F("", !0)
1508
- ], 36), [
1509
- [
1510
- qt,
1511
- u.value && (h(L).length > 0 || h(V) || a.value || h(y).length > 0)
1512
- ]
1513
- ])
1514
- ])),
1515
- B(Ft, {
1516
- value: p.value,
1517
- "onUpdate:value": T[6] || (T[6] = (b) => p.value = b),
1518
- onConfirm: $t
1519
- }, null, 8, ["value"])
1520
- ]));
1521
- }
1522
- }), it = (e, t) => {
1523
- const n = e.__vccOpts || e;
1524
- for (const [o, l] of t)
1525
- n[o] = l;
1526
- return n;
1527
- }, It = /* @__PURE__ */ it(Fo, [["__scopeId", "data-v-3c09ec64"]]), Mo = { class: "modal-container" }, Uo = { class: "modal-header" }, Po = { class: "header-title" }, Ho = { class: "modal-body" }, Qo = { class: "form-item" }, $o = { class: "required" }, Jo = { class: "input-box" }, Wo = ["placeholder"], Ko = {
1528
- key: 0,
1529
- class: "error-message"
1530
- }, Go = { class: "form-item" }, qo = { class: "required" }, Yo = { class: "type-group" }, zo = ["onClick"], jo = {
1531
- key: 0,
1532
- class: "check-mark"
1533
- }, Xo = { class: "form-item" }, Zo = { class: "required" }, el = {
1534
- key: 0,
1535
- class: "error-message"
1536
- }, tl = { class: "modal-footer" }, nl = {
1537
- __name: "ApplyDataDialog",
1538
- props: {
1539
- // v-model 绑定,默认 false
1540
- value: {
1541
- type: Boolean,
1542
- default: !1
1543
- },
1544
- // 语言设置,默认 'en'
1545
- lang: {
1546
- type: String,
1547
- default: "",
1548
- // 增加校验,确保只能传入 'en' 或 'cn'
1549
- validator: (e) => ["", "en", "en-US", "zh-CN", "cn"].includes(e)
1550
- },
1551
- placeholder: {
1552
- type: String,
1553
- default: ""
1554
- }
1555
- },
1556
- emits: ["update:value", "confirm"],
1557
- setup(e, { emit: t }) {
1558
- const n = e, o = t, l = [
1559
- { typeCn: "城市", typeEn: "City", type: "City" },
1560
- { typeCn: "海运港口", typeEn: "Port", type: "Seaport" },
1561
- { typeCn: "机场", typeEn: "Airport", type: "Airport" }
1562
- ], i = E(null), s = Ke({
1563
- name: "",
1564
- country: ""
1565
- }), a = Ke({
1566
- name: "",
1567
- type: "City"
1568
- }), c = M(() => {
1569
- if (n.lang)
1570
- return n.lang === "en" || n.lang === "en-US";
1571
- try {
1572
- if (typeof useCookie == "function") {
1573
- const f = useCookie("jc-language")?.value;
1574
- if (f)
1575
- return /^en(-US)?$/.test(f);
1576
- }
1577
- } catch {
1578
- }
1579
- if (typeof document < "u") {
1580
- const f = document.cookie || "";
1581
- return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(f);
1582
- }
1583
- try {
1584
- if (typeof useNuxtApp == "function") {
1585
- const p = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
1586
- return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(p);
1587
- }
1588
- } catch {
1589
- }
1590
- return !1;
1591
- }), r = () => {
1592
- s.name = "", s.country = "", o("update:value", !1);
1593
- }, u = () => {
1594
- s.name = "", s.country = "";
1595
- let f = !0;
1596
- a.name.trim() || (s.name = c.value ? "Please enter the data" : "请输入需要补充的数据", f = !1), i.value || (s.country = c.value ? "Please select a country" : "请选择国家", f = !1), f && (Xt({
1597
- reportData: a.name,
1598
- reportType: a.type.toLocaleLowerCase(),
1599
- countryId: i.value.id
1600
- }).then((p) => {
1601
- console.log("🍉 ~ ApplyDataDialog.vue:185 ~ handleConfirm ~ res:", p);
1602
- }).catch((p) => {
1603
- console.log("🍉 ~ ApplyDataDialog.vue:187 ~ handleConfirm ~ err:", p);
1604
- }), o("confirm", { ...a, country: i.value }));
1605
- };
1606
- return (f, p) => e.value ? (A(), x("div", {
1607
- key: 0,
1608
- class: "modal-mask",
1609
- onClick: Y(r, ["self"])
1610
- }, [
1611
- m("div", Mo, [
1612
- m("div", Uo, [
1613
- m("span", Po, _(c.value ? "Apply for data addition" : "申请补充数据"), 1),
1614
- m("div", {
1615
- class: "close-btn",
1616
- onClick: r
1617
- }, "×")
1618
- ]),
1619
- m("div", Ho, [
1620
- m("div", Qo, [
1621
- m("label", $o, _(c.value ? "Data To Add" : "需补充的数据"), 1),
1622
- m("div", Jo, [
1623
- De(m("input", {
1624
- "onUpdate:modelValue": p[0] || (p[0] = (d) => a.name = d),
1625
- type: "text",
1626
- placeholder: e.placeholder ?? (c.value ? " Please enter" : "请输入"),
1627
- class: ae(["custom-input", { "input-error": s.name }]),
1628
- onInput: p[1] || (p[1] = (d) => s.name = "")
1629
- }, null, 42, Wo), [
1630
- [Ze, a.name]
1631
- ])
1632
- ]),
1633
- s.name ? (A(), x("div", Ko, _(s.name), 1)) : F("", !0)
1634
- ]),
1635
- m("div", Go, [
1636
- m("label", qo, _(c.value ? "Type" : "所属类别"), 1),
1637
- m("div", Yo, [
1638
- (A(), x(se, null, ve(l, (d) => m("div", {
1639
- key: d.type,
1640
- class: ae(["type-btn", { active: a.type === d.type }]),
1641
- onClick: (v) => a.type = d.type
1642
- }, [
1643
- et(_(c.value ? d.typeEn : d.typeCn) + " ", 1),
1644
- a.type === d.type ? (A(), x("div", jo)) : F("", !0)
1645
- ], 10, zo)), 64))
1646
- ])
1647
- ]),
1648
- m("div", Xo, [
1649
- m("label", Zo, _(c.value ? "Country" : "国家"), 1),
1650
- m("div", {
1651
- class: ae({ "search-error-wrap": s.country })
1652
- }, [
1653
- B(It, {
1654
- "search-type-list": ["Country"],
1655
- "model-value": i.value,
1656
- "onUpdate:modelValue": [
1657
- p[2] || (p[2] = (d) => i.value = d),
1658
- p[3] || (p[3] = (d) => s.country = "")
1659
- ],
1660
- style: { margin: "0 auto" },
1661
- lang: e.lang,
1662
- "show-apply-data": !1,
1663
- "show-search-icon": !1,
1664
- placeholder: e.placeholder ?? (c.value ? " Please enter" : "请输入")
1665
- }, null, 8, ["model-value", "lang", "placeholder"])
1666
- ], 2),
1667
- s.country ? (A(), x("div", el, _(s.country), 1)) : F("", !0)
1668
- ])
1669
- ]),
1670
- m("div", tl, [
1671
- m("button", {
1672
- class: "confirm-btn",
1673
- onClick: u
1674
- }, _(c.value ? "Submit" : "申请补充"), 1)
1675
- ])
1676
- ])
1677
- ])) : F("", !0);
1678
- }
1679
- }, Ft = /* @__PURE__ */ it(nl, [["__scopeId", "data-v-055673f8"]]), ol = { class: "global-modal-header-custom" }, ll = { class: "global-modal-body-custom" }, sl = { class: "global-modal-footer-custom" }, il = /* @__PURE__ */ je({
1680
- __name: "GlobalModal",
1681
- setup(e) {
1682
- const t = E(), n = E(!1), o = E({
1683
- city: "",
1684
- company: "",
1685
- email: "",
1686
- phone: "",
1687
- name: "",
1688
- agreement: !1
1689
- }), l = Ke({
1690
- city: [{ required: !0, message: "请输入所在地城市", trigger: "blur" }],
1691
- company: [{ required: !0, message: "请输入公司名称", trigger: "blur" }],
1692
- email: [
1693
- { required: !0, message: "请输入邮箱", trigger: "blur" },
1694
- { type: "email", message: "请输入有效的邮箱地址", trigger: "blur" }
1695
- ],
1696
- agreement: [
1697
- {
1698
- validator: (c, r, u) => {
1699
- r ? u() : u(new Error("请同意隐私政策"));
1700
- },
1701
- trigger: "change"
1702
- }
1703
- ]
1704
- }), i = () => {
1705
- n.value = !1, fe.emit(pe.Close, void 0), t.value?.resetFields();
1706
- }, s = async () => {
1707
- t.value && await t.value.validate((c) => {
1708
- c && (fe.emit(pe.Submit, o.value), i(), o.value = {
1709
- city: "",
1710
- company: "",
1711
- email: "",
1712
- phone: "",
1713
- name: "",
1714
- agreement: !1
1715
- });
1716
- });
1717
- }, a = (c) => {
1718
- n.value = !0;
1719
- };
1720
- return ze(() => {
1721
- fe.on(pe.Open, a);
1722
- }), Yt(() => {
1723
- fe.off(pe.Open, a);
1724
- }), (c, r) => (A(), Xe(h(en), {
1725
- modelValue: n.value,
1726
- "onUpdate:modelValue": r[7] || (r[7] = (u) => n.value = u),
1727
- "before-close": i,
1728
- "show-close": !1,
1729
- "close-on-click-modal": !0,
1730
- width: 500,
1731
- class: "global-modal-custom"
1732
- }, {
1733
- header: N(() => [
1734
- m("div", ol, [
1735
- r[9] || (r[9] = m("h2", null, "即刻链接全球货代", -1)),
1736
- B(h(ft), {
1737
- link: "",
1738
- onClick: i,
1739
- class: "close-button-custom",
1740
- "aria-label": "Close"
1741
- }, {
1742
- default: N(() => [...r[8] || (r[8] = [
1743
- m("span", { style: { "font-size": "2rem" } }, "×", -1)
1744
- ])]),
1745
- _: 1
1746
- })
1747
- ])
1748
- ]),
1749
- footer: N(() => [
1750
- m("div", sl, [
1751
- B(h(ft), {
1752
- type: "primary",
1753
- class: "submit-button-custom",
1754
- onClick: s
1755
- }, {
1756
- default: N(() => [...r[11] || (r[11] = [
1757
- et(" 加入会员 ", -1)
1758
- ])]),
1759
- _: 1
1760
- })
1761
- ])
1762
- ]),
1763
- default: N(() => [
1764
- m("div", ll, [
1765
- B(h(tn), {
1766
- model: o.value,
1767
- rules: l,
1768
- ref_key: "formRef",
1769
- ref: t,
1770
- "label-position": "top",
1771
- onSubmit: r[6] || (r[6] = Y(() => {
1772
- }, ["prevent"]))
1773
- }, {
1774
- default: N(() => [
1775
- B(h(Qe), { gutter: 20 }, {
1776
- default: N(() => [
1777
- B(h(be), { span: 12 }, {
1778
- default: N(() => [
1779
- B(h(he), {
1780
- label: "所在地(城市)",
1781
- prop: "city"
1782
- }, {
1783
- default: N(() => [
1784
- B(h(Ce), {
1785
- modelValue: o.value.city,
1786
- "onUpdate:modelValue": r[0] || (r[0] = (u) => o.value.city = u),
1787
- placeholder: "请输入城市"
1788
- }, null, 8, ["modelValue"])
1789
- ]),
1790
- _: 1
1791
- })
1792
- ]),
1793
- _: 1
1794
- }),
1795
- B(h(be), { span: 12 }, {
1796
- default: N(() => [
1797
- B(h(he), {
1798
- label: "公司名称",
1799
- prop: "company"
1800
- }, {
1801
- default: N(() => [
1802
- B(h(Ce), {
1803
- modelValue: o.value.company,
1804
- "onUpdate:modelValue": r[1] || (r[1] = (u) => o.value.company = u),
1805
- placeholder: "请输入公司名称"
1806
- }, null, 8, ["modelValue"])
1807
- ]),
1808
- _: 1
1809
- })
1810
- ]),
1811
- _: 1
1812
- })
1813
- ]),
1814
- _: 1
1815
- }),
1816
- B(h(Qe), { gutter: 20 }, {
1817
- default: N(() => [
1818
- B(h(be), { span: 12 }, {
1819
- default: N(() => [
1820
- B(h(he), {
1821
- label: "邮箱",
1822
- prop: "email"
1823
- }, {
1824
- default: N(() => [
1825
- B(h(Ce), {
1826
- modelValue: o.value.email,
1827
- "onUpdate:modelValue": r[2] || (r[2] = (u) => o.value.email = u),
1828
- placeholder: "请输入邮箱"
1829
- }, null, 8, ["modelValue"])
1830
- ]),
1831
- _: 1
1832
- })
1833
- ]),
1834
- _: 1
1835
- }),
1836
- B(h(be), { span: 12 }, {
1837
- default: N(() => [
1838
- B(h(he), {
1839
- label: "电话",
1840
- prop: "phone"
1841
- }, {
1842
- default: N(() => [
1843
- B(h(Ce), {
1844
- modelValue: o.value.phone,
1845
- "onUpdate:modelValue": r[3] || (r[3] = (u) => o.value.phone = u),
1846
- placeholder: "请输入电话"
1847
- }, null, 8, ["modelValue"])
1848
- ]),
1849
- _: 1
1850
- })
1851
- ]),
1852
- _: 1
1853
- })
1854
- ]),
1855
- _: 1
1856
- }),
1857
- B(h(Qe), null, {
1858
- default: N(() => [
1859
- B(h(be), { span: 24 }, {
1860
- default: N(() => [
1861
- B(h(he), {
1862
- label: "姓名",
1863
- prop: "name"
1864
- }, {
1865
- default: N(() => [
1866
- B(h(Ce), {
1867
- modelValue: o.value.name,
1868
- "onUpdate:modelValue": r[4] || (r[4] = (u) => o.value.name = u),
1869
- placeholder: "请输入您的全名"
1870
- }, null, 8, ["modelValue"])
1871
- ]),
1872
- _: 1
1873
- })
1874
- ]),
1875
- _: 1
1876
- })
1877
- ]),
1878
- _: 1
1879
- }),
1880
- B(h(he), {
1881
- prop: "agreement",
1882
- class: "agreement-item"
1883
- }, {
1884
- default: N(() => [
1885
- B(h(nn), {
1886
- modelValue: o.value.agreement,
1887
- "onUpdate:modelValue": r[5] || (r[5] = (u) => o.value.agreement = u),
1888
- label: "我同意"
1889
- }, null, 8, ["modelValue"]),
1890
- r[10] || (r[10] = m("a", {
1891
- href: "#",
1892
- class: "privacy-link"
1893
- }, "隐私政策", -1))
1894
- ]),
1895
- _: 1
1896
- })
1897
- ]),
1898
- _: 1
1899
- }, 8, ["model", "rules"])
1900
- ])
1901
- ]),
1902
- _: 1
1903
- }, 8, ["modelValue"]));
1904
- }
1905
- });
1906
- function al(e) {
1907
- const t = E([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", l = M(
1908
- () => (e.value || "") + n
1909
- ), i = M(
1910
- () => !!e.value && e.value !== ""
1911
- ), s = (c) => {
1912
- if (!c || !o) return;
1913
- const r = t.value.filter(
1914
- (f) => f.id && f.id !== c.id || f.display !== c.display
1915
- );
1916
- r.unshift(c);
1917
- const u = r.slice(0, 4);
1918
- if (i.value) {
1919
- t.value = u;
1920
- try {
1921
- localStorage.setItem(l.value, JSON.stringify(u));
1922
- } catch (f) {
1923
- console.warn("LocalStorage save failed:", f);
1924
- }
1925
- }
1926
- }, a = () => {
1927
- t.value = [], o && localStorage.removeItem(l.value);
1928
- };
1929
- return ze(() => {
1930
- if (o && i.value) {
1931
- const c = localStorage.getItem(l.value);
1932
- if (c)
1933
- try {
1934
- t.value = JSON.parse(c);
1935
- } catch {
1936
- t.value = [];
1937
- }
1938
- }
1939
- }), {
1940
- searchHistory: t,
1941
- saveToHistory: s,
1942
- clearHistory: a,
1943
- HasHistory: i
1944
- };
1945
- }
1946
- async function rl(e, t = [
1947
- "Continent",
1948
- "Country",
1949
- "City",
1950
- "Seaport",
1951
- "Airport"
1952
- ], n = {}) {
1953
- return tt.searchByName({
1954
- keyword: e,
1955
- displayInfo: t,
1956
- ...n
1957
- });
1958
- }
1959
- function cl(e, t) {
1960
- const n = E([]), o = E(!1), l = E(!1), i = E(!1), s = E(1), a = 10, c = E(0), r = M(() => {
1961
- const p = [...t.value];
1962
- return p.includes("Country") && !p.includes("Region") && p.push("Region"), p;
1963
- }), u = (p) => Array.isArray(p) ? p.filter(
1964
- (d) => r.value.includes(d.type)
1965
- ) : [];
1966
- return {
1967
- searchResults: n,
1968
- loading: o,
1969
- isFetchingMore: l,
1970
- isFinished: i,
1971
- fetchData: async (p = !1) => {
1972
- const d = e.value.trim();
1973
- if (!d) {
1974
- n.value = [], c.value = 0, i.value = !1;
1975
- return;
1976
- }
1977
- if (p) {
1978
- if (l.value || i.value) return;
1979
- l.value = !0, s.value += 1;
1980
- } else {
1981
- if (o.value) return;
1982
- o.value = !0, s.value = 1, i.value = !1;
1983
- }
1984
- try {
1985
- const v = await rl(
1986
- d,
1987
- t.value,
1988
- {
1989
- current: s.value,
1990
- size: a
1991
- }
1992
- ), w = u(v.records || []);
1993
- p ? n.value.push(...w) : n.value = w, c.value = v.total || 0, (n.value.length >= c.value || w.length < a) && (i.value = !0);
1994
- } catch (v) {
1995
- console.error("Search request failed:", v), p && (s.value -= 1);
1996
- } finally {
1997
- o.value = !1, l.value = !1;
1998
- }
1999
- }
2000
- };
2001
- }
2002
- const ul = { class: "h5-search-container" }, dl = { class: "trigger-content" }, fl = ["src"], pl = { class: "placeholder-text" }, ml = {
2003
- key: 0,
2004
- class: "selected-count"
2005
- }, hl = {
2006
- key: 1,
2007
- class: "selected-val"
2008
- }, vl = {
2009
- key: 2,
2010
- class: "placeholder-gray"
2011
- }, gl = {
2012
- key: 0,
2013
- class: "h5-modal-root"
2014
- }, yl = { class: "h5-drawer-card" }, Al = { class: "h5-header" }, wl = { class: "h5-input-wrapper" }, xl = ["src"], bl = ["placeholder"], Cl = {
2015
- key: 0,
2016
- class: "h5-spinner-box"
2017
- }, Sl = {
2018
- key: 1,
2019
- class: "h5-section"
2020
- }, kl = { class: "h5-section-hd" }, Rl = { class: "h5-history-grid" }, _l = ["onClick"], Ol = {
2021
- key: 2,
2022
- class: "h5-result-list"
2023
- }, Tl = ["onClick"], El = { class: "item-info" }, Vl = { class: "item-name" }, Dl = {
2024
- key: 0,
2025
- class: "item-sub"
2026
- }, Bl = { class: "h5-load-status" }, Ll = {
2027
- key: 1,
2028
- class: "no-more"
2029
- }, Nl = {
2030
- key: 3,
2031
- class: "h5-empty"
2032
- }, Il = /* @__PURE__ */ je({
2033
- __name: "index",
2034
- props: {
2035
- modelValue: {},
2036
- multiple: { type: Boolean, default: !1 },
2037
- lang: { default: "zh-CN" },
2038
- placeholder: {},
2039
- historyKey: {}
2040
- },
2041
- emits: ["update:modelValue", "select"],
2042
- setup(e, { emit: t }) {
2043
- const n = e, o = t, l = E(!1), i = E(""), s = E(null), a = E(null);
2044
- let c = null;
2045
- const { searchHistory: r, saveToHistory: u, clearHistory: f } = al(
2046
- We(n, "historyKey")
2047
- ), { searchResults: p, loading: d, isFetchingMore: v, isFinished: w, fetchData: C } = cl(i, E(["City", "Seaport", "Airport"])), y = M(() => {
2048
- if (n.lang)
2049
- return n.lang === "en" || n.lang === "en-US";
2050
- try {
2051
- if (typeof useCookie == "function") {
2052
- const k = useCookie("jc-language")?.value;
2053
- if (k)
2054
- return /^en(-US)?$/.test(k);
2055
- }
2056
- } catch {
2057
- }
2058
- if (typeof document < "u") {
2059
- const k = document.cookie || "";
2060
- return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(k);
2061
- }
2062
- try {
2063
- if (typeof useNuxtApp == "function") {
2064
- const R = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
2065
- return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(R);
2066
- }
2067
- } catch {
2068
- }
2069
- return !1;
2070
- }), S = M(
2071
- () => Array.isArray(n.modelValue) ? n.modelValue : n.modelValue ? [n.modelValue] : []
2072
- ), D = M(() => !n.multiple && !!n.modelValue), L = M(
2073
- () => D.value ? q(n.modelValue) : ""
2074
- ), V = M(() => S.value.length > 0), Q = () => {
2075
- l.value = !0, zt(() => {
2076
- s.value?.focus();
2077
- });
2078
- }, U = () => {
2079
- l.value = !1, i.value = "";
2080
- }, K = (k) => {
2081
- u(k), n.multiple ? S.value.some((O) => O.id === k.id) || o("update:modelValue", [...S.value, k]) : (o("update:modelValue", k), U()), o("select", k);
2082
- }, G = () => {
2083
- o("update:modelValue", n.multiple ? [] : null);
2084
- }, P = E(!1), ne = (k) => {
2085
- const R = k.target;
2086
- if (!R) return;
2087
- R.scrollTop + R.clientHeight >= R.scrollHeight - 80 && i.value && !d.value && !v.value && !w.value && !P.value && (P.value = !0, C(!0));
2088
- };
2089
- Ve(v, (k) => {
2090
- k || (P.value = !1);
2091
- });
2092
- const oe = () => {
2093
- c && clearTimeout(c), c = setTimeout(() => {
2094
- P.value = !1, a.value?.scrollTo({ top: 0 }), console.log("🍉 ~ index.vue:279 ~ onInput ~ fetchData:", C), C(!1);
2095
- }, 300);
2096
- }, q = (k) => y.value ? k.displayEn || k.display : k.displayCn || k.display, I = (k) => {
2097
- const R = { City: "城市", Seaport: "港口", Airport: "机场" };
2098
- return y.value ? k : R[k] || k;
2099
- }, ue = (k) => S.value.some((R) => R.id === k.id);
2100
- return (k, R) => (A(), x("div", ul, [
2101
- m("div", {
2102
- class: "search-trigger",
2103
- onClick: Q
2104
- }, [
2105
- m("div", dl, [
2106
- m("img", {
2107
- src: h(Ye),
2108
- class: "search-icon-m"
2109
- }, null, 8, fl),
2110
- m("div", pl, [
2111
- e.multiple && S.value.length > 0 ? (A(), x("span", ml, _(y.value ? "Selected" : "已选") + " (" + _(S.value.length) + ")", 1)) : !e.multiple && D.value ? (A(), x("span", hl, _(L.value), 1)) : (A(), x("span", vl, _(e.placeholder || (y.value ? "Search" : "搜索")), 1))
2112
- ])
2113
- ]),
2114
- V.value ? (A(), x("span", {
2115
- key: 0,
2116
- class: "clear-trigger",
2117
- onClick: Y(G, ["stop"])
2118
- }, "ⓧ")) : F("", !0)
2119
- ]),
2120
- (A(), Xe(St, { to: "body" }, [
2121
- l.value ? (A(), x("div", gl, [
2122
- B(dt, { name: "fade" }, {
2123
- default: N(() => [
2124
- m("div", {
2125
- class: "h5-mask",
2126
- onClick: U
2127
- })
2128
- ]),
2129
- _: 1
2130
- }),
2131
- B(dt, { name: "slide-up" }, {
2132
- default: N(() => [
2133
- m("div", yl, [
2134
- m("div", {
2135
- class: "drawer-handle",
2136
- onClick: U
2137
- }),
2138
- m("div", Al, [
2139
- m("div", wl, [
2140
- m("img", {
2141
- src: h(Ye),
2142
- class: "inner-icon"
2143
- }, null, 8, xl),
2144
- De(m("input", {
2145
- ref_key: "inputRef",
2146
- ref: s,
2147
- "onUpdate:modelValue": R[0] || (R[0] = (O) => i.value = O),
2148
- placeholder: y.value ? "City/Port/Airport" : "搜索城市/港口/机场",
2149
- onInput: oe
2150
- }, null, 40, bl), [
2151
- [Ze, i.value]
2152
- ]),
2153
- i.value ? (A(), x("div", {
2154
- key: 0,
2155
- class: "h5-clear-btn",
2156
- onClick: R[1] || (R[1] = (O) => i.value = "")
2157
- }, " ✕ ")) : F("", !0)
2158
- ]),
2159
- m("div", {
2160
- class: "h5-cancel-btn",
2161
- onClick: U
2162
- }, _(y.value ? "Cancel" : "取消"), 1)
2163
- ]),
2164
- m("div", {
2165
- class: "h5-main-content",
2166
- ref_key: "scrollContainer",
2167
- ref: a,
2168
- onScroll: ne
2169
- }, [
2170
- h(d) && !h(v) ? (A(), x("div", Cl, [...R[3] || (R[3] = [
2171
- m("div", { class: "h5-spinner" }, null, -1)
2172
- ])])) : F("", !0),
2173
- !i.value && h(r).length > 0 ? (A(), x("div", Sl, [
2174
- m("div", kl, [
2175
- m("span", null, _(y.value ? "Recent" : "最近搜索"), 1),
2176
- m("span", {
2177
- class: "h5-clear-history",
2178
- onClick: R[2] || (R[2] = //@ts-ignore
2179
- (...O) => h(f) && h(f)(...O))
2180
- }, _(y.value ? "Clear" : "清空"), 1)
2181
- ]),
2182
- m("div", Rl, [
2183
- (A(!0), x(se, null, ve(h(r), (O, H) => (A(), x("div", {
2184
- key: H,
2185
- class: "h5-history-tag",
2186
- onClick: (xe) => K(O)
2187
- }, _(q(O)), 9, _l))), 128))
2188
- ])
2189
- ])) : F("", !0),
2190
- h(p).length > 0 ? (A(), x("div", Ol, [
2191
- (A(!0), x(se, null, ve(h(p), (O, H) => (A(), x("div", {
2192
- key: H,
2193
- class: ae(["h5-result-item", { "is-active": ue(O) }]),
2194
- onClick: (xe) => K(O)
2195
- }, [
2196
- m("div", {
2197
- class: ae(["item-type", O.type.toLowerCase()])
2198
- }, _(I(O.type)), 3),
2199
- m("div", El, [
2200
- m("div", Vl, _(q(O)), 1),
2201
- O.parentName ? (A(), x("div", Dl, _(O.parentName), 1)) : F("", !0)
2202
- ])
2203
- ], 10, Tl))), 128)),
2204
- m("div", Bl, [
2205
- h(v) ? (A(), x(se, { key: 0 }, [
2206
- R[4] || (R[4] = m("div", { class: "mini-spinner" }, null, -1)),
2207
- m("span", null, _(y.value ? "Loading..." : "加载中..."), 1)
2208
- ], 64)) : h(w) && i.value ? (A(), x("span", Ll, _(y.value ? "No more results" : "没有更多结果了"), 1)) : F("", !0)
2209
- ])
2210
- ])) : F("", !0),
2211
- i.value && !h(d) && h(p).length === 0 ? (A(), x("div", Nl, _(y.value ? "No Results Found" : "未找到相关结果"), 1)) : F("", !0)
2212
- ], 544)
2213
- ])
2214
- ]),
2215
- _: 1
2216
- })
2217
- ])) : F("", !0)
2218
- ]))
2219
- ]));
2220
- }
2221
- }), Fl = /* @__PURE__ */ it(Il, [["__scopeId", "data-v-c1314e9c"]]);
2222
- let Ml = {
2223
- open() {
2224
- fe.emit(pe.Open);
2225
- },
2226
- close() {
2227
- fe.emit(pe.Close);
2228
- },
2229
- onSubmit(e) {
2230
- fe.on(pe.Submit, e);
2231
- }
2232
- };
2233
- function Ql() {
2234
- let e = !1;
2235
- return {
2236
- install(t) {
2237
- if (typeof window < "u" && !e) {
2238
- const n = document.createElement("div");
2239
- n.setAttribute("id", "global-modal-root"), document.body.appendChild(n), jt(il).mount(n), e = !0;
2240
- }
2241
- t.config.globalProperties.$globalModal = Ml;
2242
- }
2243
- };
2244
- }
2245
- const xt = {
2246
- ApplyDataDialog: Ft,
2247
- JcSearch: It,
2248
- JCMSearch: Fl
2249
- };
2250
- let bt = !1;
2251
- const $l = {
2252
- install(e, t) {
2253
- if (!bt) {
2254
- bt = !0, t?.sharedConfig && Zt(t.sharedConfig);
2255
- for (const n in xt)
2256
- e.component(n, xt[n]);
2257
- }
2258
- }
2259
- };
2260
- export {
2261
- Ft as ApplyDataDialog,
2262
- il as GlobalModal,
2263
- Fl as JCMSearch,
2264
- It as JcSearch,
2265
- Kl as MODAL_ACTION,
2266
- Ql as createGlobalModalPlugin,
2267
- $l as default,
2268
- Gl as emitter,
2269
- ql as initSharedConfig
2270
- };
1
+ import{ref as e,computed as t,onMounted as o,onBeforeUnmount as n,defineComponent as r,toRef as i,watch as a,createElementBlock as l,openBlock as s,createElementVNode as c,createBlock as u,createVNode as d,normalizeClass as p,renderSlot as h,createCommentVNode as f,withDirectives as v,Fragment as g,renderList as m,toDisplayString as y,withModifiers as w,withKeys as b,normalizeStyle as x,vModelText as k,unref as _,Teleport as A,createTextVNode as C,vShow as S,reactive as B,withCtx as E,resolveComponent as R,mergeProps as F,toHandlers as I,resolveDynamicComponent as V,createSlots as H,onUnmounted as T,Transition as O,nextTick as z,createApp as M}from"vue";import{locationSearchV2 as D,reportNewTypeDataApi as P,getCompanyOptionApi as U,emitter as L,MODAL_ACTION as j,findPAreaCodeAPi as N,slideGetApi as W,slideCheckApi as q,initSharedConfig as K}from"@jctrans-materials/shared";import{MODAL_ACTION as Q,emitter as J,initSharedConfig as G}from"@jctrans-materials/shared";import{useFormItem as $,ElSelect as X,ElOption as Y,ElInput as Z,ElDialog as ee,ElForm as te,ElRow as oe,ElCol as ne,ElFormItem as re,ElCheckbox as ie,ElButton as ae,ElRadioButton as le,ElRadioGroup as se}from"element-plus";const ce=(e,t)=>D.searchByIdWithType(e,t);function ue(o,n){const r=e([]),i=e(!1),a=e(!1),l=e(1),s=e(0),c=e(10),u=t(()=>0!==s.value&&r.value.length>=s.value),d=t(()=>{const e=[...n.value];return e.includes("Country")&&!e.includes("Region")&&e.push("Region"),e}),p=e=>e&&Array.isArray(e)?e.filter(e=>d.value.includes(e.type)):[];return{searchResults:r,loading:i,isFetchingMore:a,isFinished:u,currentPage:l,total:s,fetchData:async(e=1,t=!1)=>{if(!o.value.trim()&&!t)return r.value=[],void(s.value=0);if((!t||!a.value&&!u.value)&&(t||!i.value)){t?a.value=!0:(i.value=!0,l.value=1);try{const i=await async function(e,t=["Continent","Country","City","Seaport","Airport"],o={}){return D.searchByName({keyword:e,displayInfo:t,...o})}(o.value,n.value,{current:e,size:c.value}),a=i.records||[],u=p(a);r.value=t?[...r.value,...u]:u,s.value=i.total||0,l.value=e}catch(d){console.error("Failed to fetch search results:",d)}finally{i.value=!1,a.value=!1}}},filterByTypes:p}}const de=Math.min,pe=Math.max,he=Math.round,fe=Math.floor,ve=e=>({x:e,y:e}),ge={left:"right",right:"left",bottom:"top",top:"bottom"},me={start:"end",end:"start"};function ye(e,t,o){return pe(e,de(t,o))}function we(e,t){return"function"==typeof e?e(t):e}function be(e){return e.split("-")[0]}function xe(e){return e.split("-")[1]}function ke(e){return"x"===e?"y":"x"}function _e(e){return"y"===e?"height":"width"}const Ae=/* @__PURE__ */new Set(["top","bottom"]);function Ce(e){return Ae.has(be(e))?"y":"x"}function Se(e){return ke(Ce(e))}function Be(e){return e.replace(/start|end/g,e=>me[e])}const Ee=["left","right"],Re=["right","left"],Fe=["top","bottom"],Ie=["bottom","top"];function Ve(e,t,o,n){const r=xe(e);let i=function(e,t,o){switch(e){case"top":case"bottom":return o?t?Re:Ee:t?Ee:Re;case"left":case"right":return t?Fe:Ie;default:return[]}}(be(e),"start"===o,n);return r&&(i=i.map(e=>e+"-"+r),t&&(i=i.concat(i.map(Be)))),i}function He(e){return e.replace(/left|right|bottom|top/g,e=>ge[e])}function Te(e){const{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function Oe(e,t,o){let{reference:n,floating:r}=e;const i=Ce(t),a=Se(t),l=_e(a),s=be(t),c="y"===i,u=n.x+n.width/2-r.width/2,d=n.y+n.height/2-r.height/2,p=n[l]/2-r[l]/2;let h;switch(s){case"top":h={x:u,y:n.y-r.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-r.width,y:d};break;default:h={x:n.x,y:n.y}}switch(xe(t)){case"start":h[a]-=p*(o&&c?-1:1);break;case"end":h[a]+=p*(o&&c?-1:1)}return h}async function ze(e,t){var o;void 0===t&&(t={});const{x:n,y:r,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=we(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(h),v=l[p?"floating"===d?"reference":"floating":d],g=Te(await i.getClippingRect({element:null==(o=await(null==i.isElement?void 0:i.isElement(v)))||o?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),m="floating"===d?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=Te(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:y,strategy:s}):m);return{top:(g.top-b.top+f.top)/w.y,bottom:(b.bottom-g.bottom+f.bottom)/w.y,left:(g.left-b.left+f.left)/w.x,right:(b.right-g.right+f.right)/w.x}}const Me=/* @__PURE__ */new Set(["left","top"]);function De(){return"undefined"!=typeof window}function Pe(e){return je(e)?(e.nodeName||"").toLowerCase():"#document"}function Ue(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Le(e){var t;return null==(t=(je(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function je(e){return!!De()&&(e instanceof Node||e instanceof Ue(e).Node)}function Ne(e){return!!De()&&(e instanceof Element||e instanceof Ue(e).Element)}function We(e){return!!De()&&(e instanceof HTMLElement||e instanceof Ue(e).HTMLElement)}function qe(e){return!(!De()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ue(e).ShadowRoot)}const Ke=/* @__PURE__ */new Set(["inline","contents"]);function Qe(e){const{overflow:t,overflowX:o,overflowY:n,display:r}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!Ke.has(r)}const Je=/* @__PURE__ */new Set(["table","td","th"]);function Ge(e){return Je.has(Pe(e))}const $e=[":popover-open",":modal"];function Xe(e){return $e.some(t=>{try{return e.matches(t)}catch(o){return!1}})}const Ye=["transform","translate","scale","rotate","perspective"],Ze=["transform","translate","scale","rotate","perspective","filter"],et=["paint","layout","strict","content"];function tt(e){const t=ot(),o=Ne(e)?it(e):e;return Ye.some(e=>!!o[e]&&"none"!==o[e])||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||Ze.some(e=>(o.willChange||"").includes(e))||et.some(e=>(o.contain||"").includes(e))}function ot(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const nt=/* @__PURE__ */new Set(["html","body","#document"]);function rt(e){return nt.has(Pe(e))}function it(e){return Ue(e).getComputedStyle(e)}function at(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lt(e){if("html"===Pe(e))return e;const t=e.assignedSlot||e.parentNode||qe(e)&&e.host||Le(e);return qe(t)?t.host:t}function st(e){const t=lt(e);return rt(t)?e.ownerDocument?e.ownerDocument.body:e.body:We(t)&&Qe(t)?t:st(t)}function ct(e,t,o){var n;void 0===t&&(t=[]),void 0===o&&(o=!0);const r=st(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=Ue(r);if(i){const e=ut(a);return t.concat(a,a.visualViewport||[],Qe(r)?r:[],e&&o?ct(e):[])}return t.concat(r,ct(r,[],o))}function ut(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function dt(e){const t=it(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=We(e),i=r?e.offsetWidth:o,a=r?e.offsetHeight:n,l=he(o)!==i||he(n)!==a;return l&&(o=i,n=a),{width:o,height:n,$:l}}function pt(e){return Ne(e)?e:e.contextElement}function ht(e){const t=pt(e);if(!We(t))return ve(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:i}=dt(t);let a=(i?he(o.width):o.width)/n,l=(i?he(o.height):o.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const ft=/* @__PURE__ */ve(0);function vt(e){const t=Ue(e);return ot()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ft}function gt(e,t,o,n){void 0===t&&(t=!1),void 0===o&&(o=!1);const r=e.getBoundingClientRect(),i=pt(e);let a=ve(1);t&&(n?Ne(n)&&(a=ht(n)):a=ht(e));const l=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==Ue(e))&&t}(i,o,n)?vt(i):ve(0);let s=(r.left+l.x)/a.x,c=(r.top+l.y)/a.y,u=r.width/a.x,d=r.height/a.y;if(i){const e=Ue(i),t=n&&Ne(n)?Ue(n):n;let o=e,r=ut(o);for(;r&&n&&t!==o;){const e=ht(r),t=r.getBoundingClientRect(),n=it(r),i=t.left+(r.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(r.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=a,o=Ue(r),r=ut(o)}}return Te({width:u,height:d,x:s,y:c})}function mt(e,t){const o=at(e).scrollLeft;return t?t.left+o:gt(Le(e)).left+o}function yt(e,t){const o=e.getBoundingClientRect();return{x:o.left+t.scrollLeft-mt(e,o),y:o.top+t.scrollTop}}const wt=/* @__PURE__ */new Set(["absolute","fixed"]);function bt(e,t,o){let n;if("viewport"===t)n=function(e,t){const o=Ue(e),n=Le(e),r=o.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;const e=ot();(!e||e&&"fixed"===t)&&(l=r.offsetLeft,s=r.offsetTop)}const c=mt(n);if(c<=0){const e=n.ownerDocument,t=e.body,o=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(o.marginLeft)+parseFloat(o.marginRight)||0,a=Math.abs(n.clientWidth-t.clientWidth-r);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:l,y:s}}(e,o);else if("document"===t)n=function(e){const t=Le(e),o=at(e),n=e.ownerDocument.body,r=pe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=pe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-o.scrollLeft+mt(e);const l=-o.scrollTop;return"rtl"===it(n).direction&&(a+=pe(t.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:l}}(Le(e));else if(Ne(t))n=function(e,t){const o=gt(e,!0,"fixed"===t),n=o.top+e.clientTop,r=o.left+e.clientLeft,i=We(e)?ht(e):ve(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:n*i.y}}(t,o);else{const o=vt(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Te(n)}function xt(e,t){const o=lt(e);return!(o===t||!Ne(o)||rt(o))&&("fixed"===it(o).position||xt(o,t))}function kt(e,t,o){const n=We(t),r=Le(t),i="fixed"===o,a=gt(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=ve(0);function c(){s.x=mt(r)}if(n||!n&&!i)if(("body"!==Pe(t)||Qe(r))&&(l=at(t)),n){const e=gt(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&c();i&&!n&&r&&c();const u=!r||n||i?ve(0):yt(r,l);return{x:a.left+l.scrollLeft-s.x-u.x,y:a.top+l.scrollTop-s.y-u.y,width:a.width,height:a.height}}function _t(e){return"static"===it(e).position}function At(e,t){if(!We(e)||"fixed"===it(e).position)return null;if(t)return t(e);let o=e.offsetParent;return Le(e)===o&&(o=o.ownerDocument.body),o}function Ct(e,t){const o=Ue(e);if(Xe(e))return o;if(!We(e)){let t=lt(e);for(;t&&!rt(t);){if(Ne(t)&&!_t(t))return t;t=lt(t)}return o}let n=At(e,t);for(;n&&Ge(n)&&_t(n);)n=At(n,t);return n&&rt(n)&&_t(n)&&!tt(n)?o:n||function(e){let t=lt(e);for(;We(t)&&!rt(t);){if(tt(t))return t;if(Xe(t))return null;t=lt(t)}return null}(e)||o}const St={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e;const i="fixed"===r,a=Le(n),l=!!t&&Xe(t.floating);if(n===a||l&&i)return o;let s={scrollLeft:0,scrollTop:0},c=ve(1);const u=ve(0),d=We(n);if((d||!d&&!i)&&(("body"!==Pe(n)||Qe(a))&&(s=at(n)),We(n))){const e=gt(n);c=ht(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const p=!a||d||i?ve(0):yt(a,s);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-s.scrollLeft*c.x+u.x+p.x,y:o.y*c.y-s.scrollTop*c.y+u.y+p.y}},getDocumentElement:Le,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const i=[..."clippingAncestors"===o?Xe(t)?[]:function(e,t){const o=t.get(e);if(o)return o;let n=ct(e,[],!1).filter(e=>Ne(e)&&"body"!==Pe(e)),r=null;const i="fixed"===it(e).position;let a=i?lt(e):e;for(;Ne(a)&&!rt(a);){const t=it(a),o=tt(a);o||"fixed"!==t.position||(r=null),(i?!o&&!r:!o&&"static"===t.position&&r&&wt.has(r.position)||Qe(a)&&!o&&xt(e,a))?n=n.filter(e=>e!==a):r=t,a=lt(a)}return t.set(e,n),n}(t,this._c):[].concat(o),n],a=i[0],l=i.reduce((e,o)=>{const n=bt(t,o,r);return e.top=pe(n.top,e.top),e.right=de(n.right,e.right),e.bottom=de(n.bottom,e.bottom),e.left=pe(n.left,e.left),e},bt(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Ct,getElementRects:async function(e){const t=this.getOffsetParent||Ct,o=this.getDimensions,n=await o(e.floating);return{reference:kt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=dt(e);return{width:t,height:o}},getScale:ht,isElement:Ne,isRTL:function(e){return"rtl"===it(e).direction}};function Bt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Et(e,t,o,n){void 0===n&&(n={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=pt(e),u=r||i?[...c?ct(c):[],...ct(t)]:[];u.forEach(e=>{r&&e.addEventListener("scroll",o,{passive:!0}),i&&e.addEventListener("resize",o)});const d=c&&l?function(e,t){let o,n=null;const r=Le(e);function i(){var e;clearTimeout(o),null==(e=n)||e.disconnect(),n=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(l||t(),!p||!h)return;const f={rootMargin:-fe(d)+"px "+-fe(r.clientWidth-(u+p))+"px "+-fe(r.clientHeight-(d+h))+"px "+-fe(u)+"px",threshold:pe(0,de(1,s))||1};let v=!0;function g(t){const n=t[0].intersectionRatio;if(n!==s){if(!v)return a();n?a(!1,n):o=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==n||Bt(c,e.getBoundingClientRect())||a(),v=!1}try{n=new IntersectionObserver(g,{...f,root:r.ownerDocument})}catch(m){n=new IntersectionObserver(g,f)}n.observe(e)}(!0),i}(c,o):null;let p,h=-1,f=null;a&&(f=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),o()}),c&&!s&&f.observe(c),f.observe(t));let v=s?gt(e):null;return s&&function t(){const n=gt(e);v&&!Bt(v,n)&&o();v=n,p=requestAnimationFrame(t)}(),o(),()=>{var e;u.forEach(e=>{r&&e.removeEventListener("scroll",o),i&&e.removeEventListener("resize",o)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(p)}}const Rt=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:r,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:o,platform:n,elements:r}=e,i=await(null==n.isRTL?void 0:n.isRTL(r.floating)),a=be(o),l=xe(o),s="y"===Ce(o),c=Me.has(a)?-1:1,u=i&&s?-1:1,d=we(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof f&&(h="end"===l?-1*f:f),s?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(o=l.offset)?void 0:o.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ft=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...s}=we(e,t),c={x:o,y:n},u=await ze(t,s),d=Ce(be(r)),p=ke(d);let h=c[p],f=c[d];if(i){const e="y"===p?"bottom":"right";h=ye(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=ye(f+u["y"===d?"top":"left"],f,f-u[e])}const v=l.fn({...t,[p]:h,[d]:f});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[p]:i,[d]:a}}}}}},It=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:r,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:v=!0,...g}=we(e,t);if(null!=(o=i.arrow)&&o.alignmentOffset)return{};const m=be(r),y=Ce(l),w=be(l)===l,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=p||(w||!v?[He(l)]:function(e){const t=He(e);return[Be(e),t,Be(t)]}(l)),k="none"!==f;!p&&k&&x.push(...Ve(l,v,f,b));const _=[l,...x],A=await ze(t,g),C=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&C.push(A[m]),d){const e=function(e,t,o){void 0===o&&(o=!1);const n=xe(e),r=Se(e),i=_e(r);let a="x"===r?n===(o?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=He(a)),[a,He(a)]}(r,a,b);C.push(A[e[0]],A[e[1]])}if(S=[...S,{placement:r,overflows:C}],!C.every(e=>e<=0)){var B,E;const e=((null==(B=i.flip)?void 0:B.index)||0)+1,t=_[e];if(t){if(!("alignment"===d&&y!==Ce(t))||S.every(e=>Ce(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let o=null==(E=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!o)switch(h){case"bestFit":{var R;const e=null==(R=S.filter(e=>{if(k){const t=Ce(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:R[0];e&&(o=e);break}case"initialPlacement":o=l}if(r!==o)return{reset:{placement:o}}}return{}}}},Vt=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var o,n;const{placement:r,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=we(e,t),u=await ze(t,c),d=be(r),p=xe(r),h="y"===Ce(r),{width:f,height:v}=i.floating;let g,m;"top"===d||"bottom"===d?(g=d,m=p===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(m=d,g="end"===p?"top":"bottom");const y=v-u.top-u.bottom,w=f-u.left-u.right,b=de(v-u[g],y),x=de(f-u[m],w),k=!t.middlewareData.shift;let _=b,A=x;if(null!=(o=t.middlewareData.shift)&&o.enabled.x&&(A=w),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(_=y),k&&!p){const e=pe(u.left,0),t=pe(u.right,0),o=pe(u.top,0),n=pe(u.bottom,0);h?A=f-2*(0!==e||0!==t?e+t:pe(u.left,u.right)):_=v-2*(0!==o||0!==n?o+n:pe(u.top,u.bottom))}await s({...t,availableWidth:A,availableHeight:_});const C=await a.getDimensions(l.floating);return f!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}},Ht=(e,t,o)=>{const n=/* @__PURE__ */new Map,r={platform:St,...o},i={...r.platform,_c:n};return(async(e,t,o)=>{const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:a}=o,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=Oe(c,n,s),p=n,h={},f=0;for(let v=0;v<l.length;v++){const{name:o,fn:i}=l[v],{x:g,y:m,data:y,reset:w}=await i({x:u,y:d,initialPlacement:n,placement:p,strategy:r,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=m?m:d,h={...h,[o]:{...h[o],...y}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:r}):w.rects),({x:u,y:d}=Oe(c,p,s))),v=-1)}return{x:u,y:d,placement:p,strategy:r,middlewareData:h}})(e,t,{...r,platform:i})};const Tt="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",Ot={class:"search-container"},zt={class:"selection-wrapper"},Mt={class:"tag-text"},Dt=["onClick"],Pt={key:0,class:"search-tag collapse"},Ut=["placeholder"],Lt={class:"suffix-area"},jt={key:1,class:"loading-spinner"},Nt={class:"search-icon"},Wt=["src"],qt={key:0,class:"history-section"},Kt={class:"history-header"},Qt=["onMousedown"],Jt=["src"],Gt={class:"type-text"},$t={class:"result-text"},Xt={key:0,class:"status-msg"},Yt=["onMousedown"],Zt=["src"],eo={class:"type-text"},to={class:"result-text"},oo={key:0,class:"load-more-msg"},no={key:1,class:"load-more-msg no-more"},ro={key:2,class:"status-msg"},io={key:0,class:"no-result-label"},ao={key:1,class:"no-result-label"},lo=["src"],so=(e,t)=>{const o=e.__vccOpts||e;for(const[n,r]of t)o[n]=r;return o},co=/* @__PURE__ */so(/* @__PURE__ */r({__name:"index",props:{modelValue:{default:null},multiple:{type:Boolean,default:!1},collapseTags:{type:Boolean,default:!1},searchTypeList:{default:()=>["Continent","Country","Region","City","Seaport","Airport"]},historyKey:{default:void 0},lang:{default:""},placeholder:{},showSearchIcon:{type:Boolean,default:!0},showItemTag:{type:Boolean,default:!0},showApplyData:{type:Boolean,default:!0}},emits:["update:modelValue","select","blur","change","submit-search","remove","apply-data"],setup(r,{emit:B}){const E=r,R=B,F=e(null),I=e(null),V=e(null),H=e(""),T=e(""),O=e(!1);let z=null;const M=e(!1),D=t(()=>E.modelValue?Array.isArray(E.modelValue)?E.modelValue:[E.modelValue]:[]),P=t(()=>E.multiple?E.collapseTags?D.value.slice(0,1):D.value:[]),U=t(()=>H.value||D.value.length>0),L=t(()=>E.multiple?H.value?10*H.value.length+20+"px":"10px":"100%"),{searchHistory:j,saveToHistory:N,clearHistory:W}=function(n){const r=e([]),i="undefined"!=typeof window&&"undefined"!=typeof localStorage,a=t(()=>(n.value||"")+"_search_history_cache"),l=t(()=>!!n.value&&""!==n.value);return o(()=>{if(i&&l.value){const t=localStorage.getItem(a.value);if(t)try{r.value=JSON.parse(t)}catch(e){r.value=[]}}}),{searchHistory:r,saveToHistory:e=>{if(!e||!i)return;const t=r.value.filter(t=>t.id&&t.id!==e.id||t.display!==e.display);t.unshift(e);const o=t.slice(0,4);if(l.value){r.value=o;try{localStorage.setItem(a.value,JSON.stringify(o))}catch(n){console.warn("LocalStorage save failed:",n)}}},clearHistory:()=>{r.value=[],i&&localStorage.removeItem(a.value)},HasHistory:l}}(i(E,"historyKey")),{searchResults:q,loading:K,isFetchingMore:Q,isFinished:J,currentPage:G,fetchData:X,filterByTypes:Y}=ue(H,i(E,"searchTypeList")),{floatingStyles:Z,startTrack:ee,stopTrack:te}=function(t,o){const r=e({position:"fixed",left:"0",top:"0",zIndex:3e3});let i=null;const a=()=>{t.value&&o.value&&Ht(t.value,o.value,{placement:"bottom-start",strategy:"fixed",middleware:[Rt(6),It(),Ft({padding:10}),Vt({apply({rects:e,elements:t}){const o=`${e.reference.width}px`;Object.assign(t.floating.style,{width:o,minWidth:o,maxWidth:o})}})]}).then(({x:e,y:t})=>{Object.assign(r.value,{left:`${e}px`,top:`${t}px`})})},l=()=>{i&&(i(),i=null)};return n(l),{floatingStyles:r,startTrack:()=>{t.value&&o.value&&(i=Et(t.value,o.value,a))},stopTrack:l}}(I,V),{isDropdownVisible:oe,openDropdown:ne,handleAfterSelect:re,handleBlur:ie}=function(t,o,n,r){const i=e(!1),a=()=>i.value=!1;return{isDropdownVisible:i,openDropdown:()=>i.value=!0,closeDropdown:a,handleAfterSelect:()=>{t?o.value?.focus():(n.value="",a(),o.value?.blur())},handleBlur:()=>{setTimeout(()=>{a(),r("blur"),t&&(n.value="")},200)}}}(i(E,"multiple").value,F,H,R),{formItem:ae}=$(),le=t(()=>q.value.length>0||K.value||H.value||j.value.length>0),se=t(()=>{if(E.lang)return"en"===E.lang||"en-US"===E.lang;try{if("function"==typeof useCookie){const e=useCookie("jc-language")?.value;if(e)return/^en(-US)?$/.test(e)}}catch(e){}if("undefined"!=typeof document){const e=document.cookie||"";return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e)}try{if("function"==typeof useNuxtApp){const e=useNuxtApp();return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e?.ssrContext?.event?.node?.req?.headers?.cookie||"")}}catch(e){}return!1}),de=t(()=>E.multiple&&D.value.length>0?"":O.value&&!E.multiple?T.value:E.placeholder?E.placeholder:se.value?"Please enter...":"请输入..."),pe=e=>({City:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==",Country:"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",Airport:"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",Seaport:"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=="}[e]||"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="),he=e=>{const t={City:{en:"City",cn:"城市"},Country:{en:"Country",cn:"国家"},Region:{en:"Region",cn:"区域"},Airport:{en:"Airport",cn:"机场"},Seaport:{en:"Seaport",cn:"港口"}};return se.value?t[e].en:t[e].cn},fe=e=>D.value.some(t=>t.id===e.id),ve=()=>F.value?.focus(),ge=e=>se.value?e.displayEn||e.display||"":e.displayCn||e.display||"",me=e=>{if(N(e),E.multiple){if(!fe(e)){const t=[...D.value,e];R("update:modelValue",t)}}else T.value=ge(e),O.value=!0,R("update:modelValue",e);R("select",e),R("change",e),ae?.validate?.("change").catch(()=>{}),re()},ye=e=>{const t=D.value.filter(t=>t.id!==e.id);R("update:modelValue",t),R("remove",e)},we=()=>{E.multiple&&!H.value&&D.value.length>0&&ye(D.value[D.value.length-1])},be=()=>{H.value="",O.value=!1,T.value="";const e=E.multiple?[]:null;R("update:modelValue",e),ae?.validate?.("change").catch(()=>{})},xe=async()=>{if(ne(),!E.multiple&&O.value&&0===q.value.length){const e=E.modelValue;if(e?.id){K.value=!0;try{const t=await ce(e.id,e.type);q.value=Y(t.records)}finally{K.value=!1}}}},ke=e=>{ie(),ae?.validate?.("blur").catch(()=>{})},_e=e=>{""!==e.target.value||E.multiple||be()},Ae=()=>{R("submit-search",D.value),oe.value=!1},Ce=e=>{const{scrollTop:t,scrollHeight:o,clientHeight:n}=e.target;t+n>=o-20&&(K.value||Q.value||J.value||!H.value||X(G.value+1,!0))},Se=e=>{console.log("🍉 ~ index.vue:428 ~ handleConfirmApplyData ~ e:",e),R("apply-data",e)};return a(oe,e=>{e?ee():te()}),a(H,e=>{e.trim()?(z&&clearTimeout(z),z=setTimeout(()=>X(1,!1),300)):q.value=[]}),a(()=>E.modelValue,async(e,t)=>{if(JSON.stringify(e)===JSON.stringify(t))return;if(E.multiple&&Array.isArray(e)){const t=[...e],o=t.filter(e=>e&&e.id&&e.type&&!e.display);if(o.length>0)try{const e=o.map(e=>e.id).filter(e=>null!=e),n=await ce(e,o[0].type);if(n&&n.records){let e=!1;const o=t.map(t=>{const o=n.records.find(e=>e.id===t.id);return o&&!t.display?(e=!0,{...t,...o}):t});e&&R("update:modelValue",o)}}catch(n){console.error("Batch fetch detail failed:",n)}return}const o=e;if(!o)return O.value=!1,void(T.value="");if("object"==typeof o)if(o.id&&o.type&&!o.display)try{const e=(await ce(o.id,o.type)).records.find(e=>e.id===o.id);e&&(T.value=ge(e),O.value=!0)}catch(n){console.error("Single fetch detail failed:",n)}else T.value=ge(o),O.value=!!T.value;else T.value=String(o),O.value=!!o},{immediate:!0,deep:!0}),n(te),(e,t)=>(s(),l("div",Ot,[c("div",{class:p(["search-input-wrapper",{"is-multiple":r.multiple}]),ref_key:"referenceRef",ref:I,onClick:ve},[c("div",zt,[h(e.$slots,"prefix",{},void 0,!0),r.multiple&&D.value.length>0?(s(),l(g,{key:0},[(s(!0),l(g,null,m(P.value,(e,t)=>(s(),l("div",{key:e.id||t,class:"search-tag"},[c("span",Mt,y(ge(e)),1),c("span",{class:"tag-close",onClick:w(t=>ye(e),["stop"])},"×",8,Dt)]))),128)),r.collapseTags&&D.value.length>1?(s(),l("div",Pt," + "+y(D.value.length-1),1)):f("",!0)],64)):f("",!0),v(c("input",{ref_key:"inputRef",ref:F,class:p({"is-selected-state":O.value&&!r.multiple}),"onUpdate:modelValue":t[0]||(t[0]=e=>H.value=e),type:"text",placeholder:de.value,style:x({width:L.value}),onFocus:xe,onBlur:ke,onInput:_e,onKeydown:b(we,["delete"])},null,46,Ut),[[k,H.value]])]),h(e.$slots,"suffix",{},()=>[c("div",Lt,[U.value?(s(),l("span",{key:0,class:"clear-icon",onMousedown:t[1]||(t[1]=w(()=>{},["prevent"])),onClick:w(be,["stop"])},"ⓧ",32)):f("",!0),_(K)&&!_(Q)?(s(),l("div",jt)):!_(K)&&r.showSearchIcon?(s(),l("button",{key:2,class:"search-btn",onClick:w(Ae,["stop"])},[c("span",Nt,[c("img",{src:_(Tt),alt:"search"},null,8,Wt)])])):f("",!0)])],!0)],2),(s(),u(A,{to:"body"},[v(c("div",{ref_key:"floatingRef",ref:V,class:"dropdown-list",style:x(_(Z)),onScroll:Ce},[h(e.$slots,"history",{searchHistory:_(j)},()=>[_(j).length>0&&!H.value?(s(),l("div",qt,[c("div",Kt,[c("span",null,y(se.value?"Recent search":"最近搜索"),1),c("span",{class:"clear-btn",onMousedown:t[2]||(t[2]=w(()=>{},["prevent"])),onClick:t[3]||(t[3]=w((...e)=>_(W)&&_(W)(...e),["stop"]))},y(se.value?"Clear":"清空"),33)]),(s(!0),l(g,null,m(_(j),(e,t)=>(s(),l("div",{key:"hist-"+t,class:"dropdown-item",onMousedown:w(t=>me(e),["prevent"])},[c("div",{class:"category-tag",style:x(r.showItemTag?{}:{display:"none"})},[c("img",{class:"type-icon",src:pe(e.type),alt:""},null,8,Jt),c("span",Gt,y(he(e.type)),1)],4),c("div",$t,y(ge(e)),1)],40,Qt))),128)),t[7]||(t[7]=c("hr",{class:"divider"},null,-1))])):f("",!0)],!0),_(K)&&!_(Q)?(s(),l("div",Xt,y(se.value?"Searching...":"正在搜索中..."),1)):_(q).length>0?(s(),l(g,{key:1},[h(e.$slots,"results",{searchResults:_(q)},()=>[(s(!0),l(g,null,m(_(q),(e,t)=>(s(),l("div",{key:t,class:p(["dropdown-item",{"is-active":fe(e)}]),onMousedown:w(t=>me(e),["prevent"])},[c("div",{class:"category-tag",style:x(r.showItemTag?{}:{display:"none"})},[c("img",{class:"type-icon",src:pe(e.type),alt:""},null,8,Zt),c("span",eo,y(he(e.type)),1)],4),c("div",to,y(ge(e)),1)],42,Yt))),128))],!0),_(Q)?(s(),l("div",oo,y(se.value?"Loading more...":"正在加载更多..."),1)):_(J)&&H.value?(s(),l("div",no,y(se.value?"All results have been loaded":"已加载全部结果"),1)):f("",!0)],64)):H.value&&!_(K)?(s(),l("div",ro,[h(e.$slots,"noData",{},()=>[r.showApplyData?(s(),l("p",ao,[C(y(se.value?"No results found .":"暂无结果,")+" ",1),c("span",{class:"apply-data",onClick:t[4]||(t[4]=w(()=>M.value=!0,["stop"]))},y(se.value?" Apply for data addition":"申请补充数据 "),1),c("img",{src:_("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"),alt:"",class:"apply-data-more-icon",onClick:t[5]||(t[5]=w(()=>M.value=!0,["stop"]))},null,8,lo)])):(s(),l("p",io,y(se.value?`No results found related to "${H.value}".`:`未找到与 "${H.value}" 相关的结果`),1))],!0)])):f("",!0)],36),[[S,_(oe)&&le.value]])])),d(To,{value:M.value,"onUpdate:value":t[6]||(t[6]=e=>M.value=e),onConfirm:Se},null,8,["value"])]))}}),[["__scopeId","data-v-aa5bd7ae"]]),uo=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:co},Symbol.toStringTag,{value:"Module"})),po={key:0,class:"modal-container"},ho={class:"modal-header"},fo={class:"header-title"},vo={class:"modal-body"},go={class:"form-item"},mo={class:"required"},yo={class:"input-box"},wo=["placeholder"],bo={key:0,class:"error-message"},xo={class:"form-item"},ko={class:"required"},_o={class:"type-group"},Ao=["onClick"],Co={key:0,class:"check-mark"},So={class:"form-item"},Bo={class:"required"},Eo={key:0,class:"error-message"},Ro={class:"modal-footer"},Fo={key:1,class:"apply-success-container"},Io={class:"apply-success-container__content"},Vo={class:"desc"},Ho={class:"apply-success-container__btns"},To=/* @__PURE__ */so({__name:"ApplyDataDialog",props:{value:{type:Boolean,default:!1},lang:{type:String,default:"",validator:e=>["","en","en-US","zh-CN","cn"].includes(e)},placeholder:{type:String,default:""}},emits:["update:value","confirm"],setup(o,{emit:n}){const r=o,i=n,a=[{typeCn:"城市",typeEn:"City",type:"City"},{typeCn:"海运港口",typeEn:"Port",type:"Seaport"},{typeCn:"机场",typeEn:"Airport",type:"Airport"}],u=e(null),h=e(!1),b=B({name:"",country:""}),x=B({name:"",type:"City"}),_=t(()=>{if(r.lang)return"en"===r.lang||"en-US"===r.lang;try{if("function"==typeof useCookie){const e=useCookie("jc-language")?.value;if(e)return/^en(-US)?$/.test(e)}}catch(e){}if("undefined"!=typeof document){const e=document.cookie||"";return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e)}try{if("function"==typeof useNuxtApp){const e=useNuxtApp();return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e?.ssrContext?.event?.node?.req?.headers?.cookie||"")}}catch(e){}return!1}),A=()=>{b.name="",b.country="",h.value=!1,i("update:value",!1)},S=()=>{b.name="",b.country="";let e=!0;x.name.trim()||(b.name=_.value?"Please enter the data":"请输入需要补充的数据",e=!1),u.value||(b.country=_.value?"Please select a country":"请选择国家",e=!1),e&&(P({reportData:x.name,reportType:x.type.toLocaleLowerCase(),countryId:u.value.id}).then(e=>{console.log("🍉 ~ ApplyDataDialog.vue:185 ~ handleConfirm ~ res:",e),0===e.data&&(h.value=!0)}).catch(e=>{console.log("🍉 ~ ApplyDataDialog.vue:187 ~ handleConfirm ~ err:",e)}),i("confirm",{...x,country:u.value}))};return(e,t)=>o.value?(s(),l("div",{key:0,class:"modal-mask",onClick:w(A,["self"])},[h.value?(s(),l("div",Fo,[c("div",Io,[t[4]||(t[4]=c("div",{class:"icon"},null,-1)),c("div",Vo,y(_.value?"Submit successfully!":"提交成功!"),1)]),c("div",Ho,[c("div",{class:"button",onClick:w(A,["stop"])},y(_.value?"OK":"好的"),1)])])):(s(),l("div",po,[c("div",ho,[c("span",fo,y(_.value?"Apply for data addition":"申请补充数据"),1),c("div",{class:"close-btn",onClick:A},"×")]),c("div",vo,[c("div",go,[c("label",mo,y(_.value?"Data To Add":"需补充的数据"),1),c("div",yo,[v(c("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>x.name=e),type:"text",placeholder:o.placeholder??(_.value?" Please enter":"请输入"),class:p(["custom-input",{"input-error":b.name}]),onInput:t[1]||(t[1]=e=>b.name="")},null,42,wo),[[k,x.name]])]),b.name?(s(),l("div",bo,y(b.name),1)):f("",!0)]),c("div",xo,[c("label",ko,y(_.value?"Type":"所属类别"),1),c("div",_o,[(s(),l(g,null,m(a,e=>c("div",{key:e.type,class:p(["type-btn",{active:x.type===e.type}]),onClick:t=>x.type=e.type},[C(y(_.value?e.typeEn:e.typeCn)+" ",1),x.type===e.type?(s(),l("div",Co)):f("",!0)],10,Ao)),64))])]),c("div",So,[c("label",Bo,y(_.value?"Country":"国家"),1),c("div",{class:p({"search-error-wrap":b.country})},[d(co,{"search-type-list":["Country"],"model-value":u.value,"onUpdate:modelValue":[t[2]||(t[2]=e=>u.value=e),t[3]||(t[3]=e=>b.country="")],style:{margin:"0 auto"},lang:o.lang,"show-apply-data":!1,"show-search-icon":!1,placeholder:o.placeholder??(_.value?" Please enter":"请输入")},null,8,["model-value","lang","placeholder"])],2),b.country?(s(),l("div",Eo,y(b.country),1)):f("",!0)])]),c("div",Ro,[c("button",{class:"confirm-btn",onClick:S},y(_.value?"Submit":"申请补充"),1)])]))])):f("",!0)}},[["__scopeId","data-v-eef54116"]]),Oo=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:To},Symbol.toStringTag,{value:"Module"}));var zo="object"==typeof global&&global&&global.Object===Object&&global,Mo="object"==typeof self&&self&&self.Object===Object&&self,Do=zo||Mo||Function("return this")(),Po=Do.Symbol,Uo=Object.prototype,Lo=Uo.hasOwnProperty,jo=Uo.toString,No=Po?Po.toStringTag:void 0;var Wo=Object.prototype.toString;var qo=Po?Po.toStringTag:void 0;function Ko(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":qo&&qo in Object(e)?function(e){var t=Lo.call(e,No),o=e[No];try{e[No]=void 0;var n=!0}catch(i){}var r=jo.call(e);return n&&(t?e[No]=o:delete e[No]),r}(e):function(e){return Wo.call(e)}(e)}var Qo=/\s/;var Jo=/^\s+/;function Go(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Qo.test(e.charAt(t)););return t}(e)+1).replace(Jo,""):e}function $o(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Xo=/^[-+]0x[0-9a-f]+$/i,Yo=/^0b[01]+$/i,Zo=/^0o[0-7]+$/i,en=parseInt;function tn(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==Ko(e)}(e))return NaN;if($o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=$o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Go(e);var o=Yo.test(e);return o||Zo.test(e)?en(e.slice(2),o?2:8):Xo.test(e)?NaN:+e}var on=function(){return Do.Date.now()},nn=Math.max,rn=Math.min;function an(e,t,o){var n,r,i,a,l,s,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var o=n,i=r;return n=r=void 0,c=t,a=e.apply(i,o)}function f(e){var o=e-s;return void 0===s||o>=t||o<0||d&&e-c>=i}function v(){var e=on();if(f(e))return g(e);l=setTimeout(v,function(e){var o=t-(e-s);return d?rn(o,i-(e-c)):o}(e))}function g(e){return l=void 0,p&&n?h(e):(n=r=void 0,a)}function m(){var e=on(),o=f(e);if(n=arguments,r=this,s=e,o){if(void 0===l)return function(e){return c=e,l=setTimeout(v,t),u?h(e):a}(s);if(d)return clearTimeout(l),l=setTimeout(v,t),h(s)}return void 0===l&&(l=setTimeout(v,t)),a}return t=tn(t)||0,$o(o)&&(u=!!o.leading,i=(d="maxWait"in o)?nn(tn(o.maxWait)||0,t):i,p="trailing"in o?!!o.trailing:p),m.cancel=function(){void 0!==l&&clearTimeout(l),c=0,n=s=r=l=void 0},m.flush=function(){return void 0===l?a:g(on())},m}const ln={class:"global-company-input"},sn={class:"company-option-item"},cn=/* @__PURE__ */so({__name:"index",props:{lang:{type:String,default:""},companyName:{type:String,default:""},countryId:{type:[String,Number,null],required:!0},useKq:{type:Boolean,default:!1},kqCode:{type:[String,Number],default:""},kqInfo:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1}},emits:["update:companyName","update:useKq","update:kqCode","update:kqInfo","change"],setup(o,{emit:r}){const i=o,d=r,p=e(!1),f=e([]),{isEn:v}=function(e=""){return{isEn:t(()=>{if(e)return"en"===e||"en-US"===e;try{if("function"==typeof useCookie){const e=useCookie("jc-language")?.value;if(e)return/^en(-US)?$/.test(e)}}catch(t){}if("undefined"!=typeof document){const e=document.cookie||"";return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e)}try{if("function"==typeof useNuxtApp){const e=useNuxtApp();return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e?.ssrContext?.event?.node?.req?.headers?.cookie||"")}}catch(t){}return!1})}}(i.lang),w=t({get:()=>i.companyName,set:e=>d("update:companyName",e)}),b=e=>{e?(p.value=!0,x(e)):f.value=[]},x=an(e=>{U({current:1,size:50,compName:e}).then(e=>{f.value=e.data.data.records?.map(e=>({value:e.nameCn,code:e.kqId,...e}))||[]}).catch(e=>{console.error("获取公司选项失败:",e),f.value=[]}).finally(()=>{p.value=!1})},800),k=e=>{const t=f.value.find(t=>t.value===e);console.log("🍉 ~ index.vue:130 ~ handleSelectChange ~ selectedObj:",t),t?(d("update:useKq",!0),d("update:kqCode",t.code),d("update:kqInfo",t)):(d("update:useKq",!1),d("update:kqCode",""),d("update:kqInfo",{})),d("change",t)},A=e=>{d("update:useKq",!1),d("update:kqCode",""),d("change",e)};return a(()=>i.countryId,()=>{d("update:companyName",""),d("update:useKq",!1),d("update:kqCode",""),d("update:kqInfo",{}),f.value=[]}),n(()=>{x.cancel()}),(e,t)=>(s(),l("div",ln,[1===i.countryId?(s(),u(_(X),{key:0,modelValue:w.value,"onUpdate:modelValue":t[0]||(t[0]=e=>w.value=e),filterable:"",remote:"","reserve-keyword":"",clearable:"","allow-create":"","default-first-option":"","remote-method":b,loading:p.value,disabled:i.disabled,placeholder:_(v)?"Company Name in Chinese":"请输入您的公司中文名称",style:{width:"100%"},"popper-class":"company-search dialog-join-us",onChange:k},{prefix:E(()=>[h(e.$slots,"prefix",{},void 0,!0)]),default:E(()=>[(s(!0),l(g,null,m(f.value,e=>(s(),u(_(Y),{key:e.code,label:e.value,value:e.value},{default:E(()=>[c("div",sn,[c("span",null,y(e.value),1)])]),_:2},1032,["label","value"]))),128))]),_:3},8,["modelValue","loading","disabled","placeholder"])):(s(),u(_(Z),{key:1,modelValue:w.value,"onUpdate:modelValue":t[1]||(t[1]=e=>w.value=e),disabled:i.disabled,placeholder:_(v)?"Company name in English":"请输入您的公司英文名称","max-length":"200",style:{width:"100%"},onChange:A},{prepend:E(()=>[h(e.$slots,"prefix",{},void 0,!0)]),_:3},8,["modelValue","disabled","placeholder"]))]))}},[["__scopeId","data-v-a8006a9d"]]),un=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:cn},Symbol.toStringTag,{value:"Module"})),dn={type:"text",name:"fakeUsername",autocomplete:"on"},pn={type:"password",name:"fakePassword",autocomplete:"new-password"},hn={class:"google-input-wrap"},fn={key:0,class:"google-input-wrap-prepend"},vn={class:"google-input-wrap-input"};const gn=/* @__PURE__ */so({name:"GoogleInput",components:{ElInput:Z},inheritAttrs:!1,props:{placeholder:{type:String,default:""},modelValue:{type:[String,Number],default:""}},emits:["update:modelValue","blur","focus"],data:()=>({isFocus:!1}),computed:{isHavePrepend(){return!!this.$slots.prefix},shouldFloat(){return this.isFocus||null!==this.modelValue&&""!==this.modelValue}},mounted(){if(window.navigator.userAgent.indexOf("Chrome")>-1){let e=0;const t=()=>{try{e++;const o=this.$refs.googleInput?.$el.querySelector("input");if(o){"rgb(232, 240, 254)"===window.getComputedStyle(o).getPropertyValue("background-color")?this.isFocus=!0:e<20&&setTimeout(t,100)}}catch(o){console.error("Autofill detection error:",o)}};t()}},methods:{handleInput(e){this.$emit("update:modelValue",e)},localBlur(e){this.isFocus=!1,this.$emit("blur",e)},localFocus(e){this.isFocus=!0,this.$emit("focus",e)}}},[["render",function(e,t,o,n,r,i){const a=R("el-input");return s(),l("div",{class:p(["google-input",{"is-focus":i.shouldFloat,"is-have-prepend":i.isHavePrepend}])},[v(c("input",dn,null,512),[[S,!1]]),v(c("input",pn,null,512),[[S,!1]]),c("div",hn,[i.isHavePrepend?(s(),l("div",fn,[h(e.$slots,"prefix",{},void 0,!0)])):f("",!0),c("div",vn,[d(a,F({ref:"googleInput"},e.$attrs,{"model-value":o.modelValue},I({input:i.handleInput,blur:i.localBlur,focus:i.localFocus})),{suffix:E(()=>[h(e.$slots,"suffix",{},void 0,!0)]),_:3},16,["model-value"]),c("p",{onClick:t[0]||(t[0]=t=>e.$refs.googleInput.focus()),class:"google-input-wrap-input-placeholder"},y(o.placeholder),1)])])],2)}],["__scopeId","data-v-ffc2b32e"]]),mn=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:gn},Symbol.toStringTag,{value:"Module"})),yn={type:"text",name:"fakeUsername",autocomplete:"on"},wn={type:"password",name:"fakePassword",autocomplete:"new-password"},bn={class:"google-input-wrap"},xn={key:0,class:"google-input-wrap-prepend"},kn={class:"google-input-wrap-input"};const _n=/* @__PURE__ */so({name:"GoogleInput",components:{ElInput:Z},inheritAttrs:!1,props:{placeholder:{type:String,default:""},label:{type:String,default:""},modelValue:{type:[String,Number],default:""}},emits:["update:modelValue","blur","focus"],data:()=>({isFocus:!1}),computed:{currentLabel(){return this.label?this.label:this.placeholder},isHavePrepend(){return!!this.$slots.prefix},shouldFloat(){return this.isFocus}},mounted(){if(window.navigator.userAgent.indexOf("Chrome")>-1){let e=0;const t=()=>{try{e++;const o=this.$refs.googleInput?.$el.querySelector("input");if(o){"rgb(232, 240, 254)"===window.getComputedStyle(o).getPropertyValue("background-color")?this.isFocus=!0:e<20&&setTimeout(t,100)}}catch(o){console.error("Autofill detection error:",o)}};t()}},methods:{handleInput(e){this.$emit("update:modelValue",e)},localBlur(e){this.isFocus=!1,this.$emit("blur",e)},localFocus(e){this.isFocus=!0,this.$emit("focus",e)}}},[["render",function(e,t,o,n,r,i){const a=R("el-input");return s(),l("div",{class:p(["google-input",{"is-focus":i.shouldFloat,"is-have-prepend":i.isHavePrepend}])},[v(c("input",yn,null,512),[[S,!1]]),v(c("input",wn,null,512),[[S,!1]]),c("div",bn,[i.isHavePrepend?(s(),l("div",xn,[h(e.$slots,"prefix",{},void 0,!0)])):f("",!0),c("div",kn,[d(a,F({ref:"googleInput"},e.$attrs,{"model-value":o.modelValue,placeholder:o.placeholder},I({input:i.handleInput,blur:i.localBlur,focus:i.localFocus})),{suffix:E(()=>[h(e.$slots,"suffix",{},void 0,!0)]),_:3},16,["model-value","placeholder"]),c("p",{onClick:t[0]||(t[0]=t=>e.$refs.googleInput.focus()),class:"google-input-wrap-input-placeholder"},y(i.currentLabel),1)])])],2)}],["__scopeId","data-v-1f8786a7"]]),An=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:_n},Symbol.toStringTag,{value:"Module"}));const Cn=/* @__PURE__ */so({name:"CodeInput",components:{GoogleInput:gn,JcFloatInput:_n},props:{modelValue:String,placeholder:String,ready:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},duration:{type:Number,default:60},formTypeColor:{type:String,default:"1"},isEn:Boolean},emits:["update:modelValue","send"],data:()=>({isCounting:!1,countdown:0,timer:null}),computed:{statusClass(){return{1:"org",2:"lightBlue",4:"darkOrange"}[this.formTypeColor]||"darkBlue"},btnText(){return this.isCounting?`${this.countdown}s`:this.isEn?"Send Code":"发送验证码"}},methods:{handleSend(){!this.ready||this.isCounting||this.disabled||this.$emit("send",this.startTimer)},startTimer(){this.isCounting||(this.isCounting=!0,this.countdown=this.duration,this.timer=setInterval(()=>{this.countdown--,this.countdown<=0&&this.stopTimer()},1e3))},stopTimer(){this.timer&&(clearInterval(this.timer),this.timer=null),this.isCounting=!1,this.countdown=0}},beforeUnmount(){this.stopTimer()}},[["render",function(e,t,o,n,r,i){return s(),u(V(o.showIcon?"JcFloatInput":"GoogleInput"),{"model-value":o.modelValue,"onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update:modelValue",t)),label:o.placeholder,placeholder:o.placeholder,class:"verify-code-input",autocomplete:"off",maxlength:"6"},H({suffix:E(()=>[c("a",{class:p(["send-code-btn",[i.statusClass,{"is-disabled":o.disabled||r.isCounting||!o.ready}]]),onClick:t[0]||(t[0]=(...e)=>i.handleSend&&i.handleSend(...e))},[c("span",{class:p(r.isCounting||!o.ready?"disabled-color":"obtain-color")},y(i.btnText),3)],2)]),_:2},[o.showIcon?{name:"prefix",fn:E(()=>[t[2]||(t[2]=c("i",{class:"icon-verify"},null,-1))]),key:"0"}:void 0]),1032,["model-value","label","placeholder"])}],["__scopeId","data-v-c976db55"]]),Sn=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:Cn},Symbol.toStringTag,{value:"Module"})),Bn={class:"global-modal-header-custom"},En={class:"global-modal-body-custom"},Rn={class:"global-modal-footer-custom"},Fn=/* @__PURE__ */r({__name:"GlobalModal",setup(t){const n=e(),r=e(!1),i=e({city:"",company:"",email:"",phone:"",name:"",agreement:!1}),a=B({city:[{required:!0,message:"请输入所在地城市",trigger:"blur"}],company:[{required:!0,message:"请输入公司名称",trigger:"blur"}],email:[{required:!0,message:"请输入邮箱",trigger:"blur"},{type:"email",message:"请输入有效的邮箱地址",trigger:"blur"}],agreement:[{validator:(e,t,o)=>{t?o():o(new Error("请同意隐私政策"))},trigger:"change"}]}),l=()=>{r.value=!1,L.emit(j.Close,void 0),n.value?.resetFields()},p=async()=>{n.value&&await n.value.validate(e=>{e&&(L.emit(j.Submit,i.value),l(),i.value={city:"",company:"",email:"",phone:"",name:"",agreement:!1})})},h=e=>{r.value=!0};return o(()=>{L.on(j.Open,h)}),T(()=>{L.off(j.Open,h)}),(e,t)=>(s(),u(_(ee),{modelValue:r.value,"onUpdate:modelValue":t[7]||(t[7]=e=>r.value=e),"before-close":l,"show-close":!1,"close-on-click-modal":!0,width:500,class:"global-modal-custom"},{header:E(()=>[c("div",Bn,[t[9]||(t[9]=c("h2",null,"即刻链接全球货代",-1)),d(_(ae),{link:"",onClick:l,class:"close-button-custom","aria-label":"Close"},{default:E(()=>[...t[8]||(t[8]=[c("span",{style:{"font-size":"2rem"}},"×",-1)])]),_:1})])]),footer:E(()=>[c("div",Rn,[d(_(ae),{type:"primary",class:"submit-button-custom",onClick:p},{default:E(()=>[...t[11]||(t[11]=[C(" 加入会员 ",-1)])]),_:1})])]),default:E(()=>[c("div",En,[d(_(te),{model:i.value,rules:a,ref_key:"formRef",ref:n,"label-position":"top",onSubmit:t[6]||(t[6]=w(()=>{},["prevent"]))},{default:E(()=>[d(_(oe),{gutter:20},{default:E(()=>[d(_(ne),{span:12},{default:E(()=>[d(_(re),{label:"所在地(城市)",prop:"city"},{default:E(()=>[d(_(Z),{modelValue:i.value.city,"onUpdate:modelValue":t[0]||(t[0]=e=>i.value.city=e),placeholder:"请输入城市"},null,8,["modelValue"])]),_:1})]),_:1}),d(_(ne),{span:12},{default:E(()=>[d(_(re),{label:"公司名称",prop:"company"},{default:E(()=>[d(_(Z),{modelValue:i.value.company,"onUpdate:modelValue":t[1]||(t[1]=e=>i.value.company=e),placeholder:"请输入公司名称"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),d(_(oe),{gutter:20},{default:E(()=>[d(_(ne),{span:12},{default:E(()=>[d(_(re),{label:"邮箱",prop:"email"},{default:E(()=>[d(_(Z),{modelValue:i.value.email,"onUpdate:modelValue":t[2]||(t[2]=e=>i.value.email=e),placeholder:"请输入邮箱"},null,8,["modelValue"])]),_:1})]),_:1}),d(_(ne),{span:12},{default:E(()=>[d(_(re),{label:"电话",prop:"phone"},{default:E(()=>[d(_(Z),{modelValue:i.value.phone,"onUpdate:modelValue":t[3]||(t[3]=e=>i.value.phone=e),placeholder:"请输入电话"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),d(_(oe),null,{default:E(()=>[d(_(ne),{span:24},{default:E(()=>[d(_(re),{label:"姓名",prop:"name"},{default:E(()=>[d(_(Z),{modelValue:i.value.name,"onUpdate:modelValue":t[4]||(t[4]=e=>i.value.name=e),placeholder:"请输入您的全名"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),d(_(re),{prop:"agreement",class:"agreement-item"},{default:E(()=>[d(_(ie),{modelValue:i.value.agreement,"onUpdate:modelValue":t[5]||(t[5]=e=>i.value.agreement=e),label:"我同意"},null,8,["modelValue"]),t[10]||(t[10]=c("a",{href:"#",class:"privacy-link"},"隐私政策",-1))]),_:1})]),_:1},8,["model","rules"])])]),_:1},8,["modelValue"]))}}),In=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:Fn},Symbol.toStringTag,{value:"Module"})),Vn={class:"wrapper-container"},Hn={key:0,class:"wrapper-prepend"},Tn={class:"wrapper-main"},On={class:"wrapper-label"},zn={key:1,class:"wrapper-append"};const Mn=/* @__PURE__ */so({name:"JcFloatWrapper",props:{label:{type:String,default:""}},data:()=>({internalFocus:!1}),computed:{isHavePrepend(){return!!this.$slots.prefix},isHaveAppend(){return!!this.$slots.suffix}},methods:{handleFocusIn(){this.internalFocus=!0,this.$emit("focus")},handleFocusOut(){this.internalFocus=!1,this.$emit("blur")}}},[["render",function(e,t,o,n,r,i){return s(),l("div",{class:p(["jc-float-wrapper",{"is-focus":r.internalFocus,"is-have-prepend":i.isHavePrepend}]),onFocusin:t[0]||(t[0]=(...e)=>i.handleFocusIn&&i.handleFocusIn(...e)),onFocusout:t[1]||(t[1]=(...e)=>i.handleFocusOut&&i.handleFocusOut(...e))},[c("div",Vn,[i.isHavePrepend?(s(),l("div",Hn,[h(e.$slots,"prefix",{},void 0,!0)])):f("",!0),c("div",Tn,[h(e.$slots,"default",{},void 0,!0),c("p",On,y(o.label),1)]),i.isHaveAppend?(s(),l("div",zn,[h(e.$slots,"suffix",{},void 0,!0)])):f("",!0)])],34)}],["__scopeId","data-v-f392be75"]]),Dn=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:Mn},Symbol.toStringTag,{value:"Module"})),Pn={name:"RegisterForm",components:{ElDialog:ee,ElForm:te,ElFormItem:re,ElInput:Z,ElButton:ae,ElCheckbox:ie,ElSelect:X,ElOption:Y,ElRadioGroup:se,ElRadioButton:le,JcFloatInput:_n,CodeInput:Cn,JcFloatWrapper:Mn,JcSearch:co,ChineseCompanySearch:cn},props:{isEn:Boolean},emits:["to-login","register"],computed:{isAgree(){return this.form.agree},currentCountryIsChina(){return 1===this.form.city?.raw?.country?.id},currentCompanyLabel(){return this.isEn?this.currentCountryIsChina?"Company Name in Chinese":"Company Name in English":this.currentCountryIsChina?"公司中文名称":"公司英文名称"}},data:()=>({codeReady:!1,form:{city:"",cityId:"",company:"",countryId:"",email:"",code:"",password:"",sector:"forwarder",agree:!1,useKq:!1,kqCode:"",kqInfo:null},sectors:[{cn:"货代",en:"Freight Forwarder",value:"forwarder"},{cn:"贸易商",en:"Trader",value:"trader"},{cn:"供应商",en:"Vendor",value:"vendor"}],rules:{city:[{required:!0,message:"请选择城市",trigger:["change","blur"]}],company:[{required:!0,trigger:"blur"}],email:[{required:!0,type:"email",trigger:"blur"}],code:[{required:!0,trigger:"blur"}],password:[{required:!0,min:6,max:20,trigger:"blur"}],agree:[{validator:(e,t,o)=>t?o():o(new Error),trigger:"change"}]}}),methods:{handleSelectCity(e){console.log("🍉 ~ RegisterForm.vue:265 ~ e:",e),this.form.cityId=e.id,this.form.countryId=e.raw?.country?.id},validateField(e){this.$refs.registerFormRef&&this.$refs.registerFormRef.validateField(e,t=>{console.log("🍉 ~ index.vue:340 ~ errorMessage:",t),"email"===e&&(this.codeReady=!t)})},handleGetCode(e){e(),console.log("发送注册验证码")},handleRegister(){this.$refs.registerFormRef.validate(e=>{e&&this.$emit("register",this.form)})}}},Un={class:"register-form-container"},Ln={class:"register-title"},jn={class:"sector-section"},Nn={class:"sector-label"},Wn={class:"sector-group"},qn=["onClick"],Kn={key:0,class:"icon-checked"},Qn={class:"agree-text"},Jn={class:"link-type"},Gn={class:"link-type"},$n={class:"bottom-tip"};const Xn=/* @__PURE__ */so(Pn,[["render",function(e,t,o,n,r,i){const a=R("JcSearch"),u=R("JcFloatWrapper"),h=R("el-form-item"),v=R("ChineseCompanySearch"),w=R("JcFloatInput"),b=R("CodeInput"),x=R("el-checkbox"),k=R("el-button"),_=R("el-form");return s(),l("div",Un,[c("div",Ln,[c("p",null,y(o.isEn?"New User Registration":"新用户注册"),1)]),d(_,{ref:"registerFormRef",model:r.form,rules:r.rules,class:"auth-form"},{default:E(()=>[d(h,{prop:"city"},{default:E(()=>[d(u,{label:o.isEn?"Location (City)":"所在地(城市)","has-value":!(!r.form.city||!r.form.city.id)},{default:E(()=>[d(a,{modelValue:r.form.city,"onUpdate:modelValue":t[0]||(t[0]=e=>r.form.city=e),class:"jc:my-0! search-city-item","show-search-icon":!1,style:{"--original-text-main":"#232324"},"search-type-list":["City"],onSelect:i.handleSelectCity},{prefix:E(()=>[...t[11]||(t[11]=[c("i",{class:"icon-location"},null,-1)])]),_:1},8,["modelValue","onSelect"])]),_:1},8,["label","has-value"])]),_:1}),d(h,{prop:"company"},{default:E(()=>[d(u,{label:i.currentCompanyLabel},{default:E(()=>[d(v,{class:"jc:my-0! search-company-item","company-name":r.form.company,"onUpdate:companyName":t[1]||(t[1]=e=>r.form.company=e),useKq:r.form.useKq,"onUpdate:useKq":t[2]||(t[2]=e=>r.form.useKq=e),kqCode:r.form.kqCode,"onUpdate:kqCode":t[3]||(t[3]=e=>r.form.kqCode=e),kqInfo:r.form.kqInfo,"onUpdate:kqInfo":t[4]||(t[4]=e=>r.form.kqInfo=e),"country-id":r.form.city?.raw?.country?.id||null},{prefix:E(()=>[...t[12]||(t[12]=[c("i",{class:"icon-company"},null,-1)])]),_:1},8,["company-name","useKq","kqCode","kqInfo","country-id"])]),_:1},8,["label"])]),_:1}),d(h,{prop:"email"},{default:E(()=>[d(w,{modelValue:r.form.email,"onUpdate:modelValue":t[5]||(t[5]=e=>r.form.email=e),label:o.isEn?"Business Email Address":"企业邮箱",placeholder:o.isEn?"Business Email Address, QQ Mail is not available":"请输入您的企业邮箱,暂不支持QQ邮箱",onBlur:t[6]||(t[6]=e=>i.validateField("email"))},{prefix:E(()=>[...t[13]||(t[13]=[c("i",{class:"icon-email"},null,-1)])]),_:1},8,["modelValue","label","placeholder"])]),_:1}),d(h,{prop:"code"},{default:E(()=>[d(b,{modelValue:r.form.code,"onUpdate:modelValue":t[7]||(t[7]=e=>r.form.code=e),placeholder:o.isEn?"Verification Code":"验证码",ready:r.codeReady,"is-en":o.isEn,"show-icon":"","form-type-color":"4",onSend:i.handleGetCode},{prefix:E(()=>[...t[14]||(t[14]=[c("i",{class:"icon-verify"},null,-1)])]),_:1},8,["modelValue","placeholder","ready","is-en","onSend"])]),_:1}),d(h,{prop:"password"},{default:E(()=>[d(w,{modelValue:r.form.password,"onUpdate:modelValue":t[8]||(t[8]=e=>r.form.password=e),type:"password","show-password":"",class:"input-show-pass",label:o.isEn?"Password":"密码",placeholder:o.isEn?"Password, 6-20 characters include letters, numbers and symbols":"密码,6-20位字符,包含字母、数字和符号"},{prefix:E(()=>[...t[15]||(t[15]=[c("i",{class:"icon-password"},null,-1)])]),_:1},8,["modelValue","label","placeholder"])]),_:1}),c("div",jn,[c("p",Nn,y(o.isEn?"Industry Sector":"所属行业"),1),c("div",Wn,[(s(!0),l(g,null,m(r.sectors,e=>(s(),l("div",{key:e.value,class:p(["sector-item",{active:r.form.sector===e.value}]),onClick:t=>r.form.sector=e.value},[C(y(o.isEn?e.en:e.cn)+" ",1),r.form.sector===e.value?(s(),l("i",Kn)):f("",!0)],10,qn))),128))])]),d(h,{prop:"agree",class:"agree-item"},{default:E(()=>[d(x,{modelValue:r.form.agree,"onUpdate:modelValue":t[9]||(t[9]=e=>r.form.agree=e)},{default:E(()=>[c("span",Qn,[C(y(o.isEn?"I agree":"我同意")+" ",1),c("span",Jn,y(o.isEn?"User Agreement":"《用户条款和协议》"),1),C(" "+y(o.isEn?"and":"和")+" ",1),c("span",Gn,y(o.isEn?"Privacy Policy":"《隐私政策》"),1)])]),_:1},8,["modelValue"])]),_:1}),d(k,{class:p(["submit-btn register-btn",{"register-btn-is-active":i.isAgree}]),disabled:!r.form.agree,onClick:i.handleRegister},{default:E(()=>[C(y(o.isEn?"Register and Log in":"注册并登录")+" ",1),t[16]||(t[16]=c("i",{class:"el-icon-right",style:{"margin-left":"8px"}},null,-1))]),_:1},8,["class","disabled","onClick"])]),_:1},8,["model","rules"]),c("div",$n,[C(y(o.isEn?"Already have an account?":"已有账号?")+" ",1),c("span",{class:"action-text",onClick:t[10]||(t[10]=t=>e.$emit("to-login"))},[C(y(o.isEn?"Log in":"去登录")+" ",1),t[17]||(t[17]=c("svg",{t:"1767853448095",class:"icon-more",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8538",width:"200",height:"200"},[c("path",{d:"M456.874667 798.208l-60.416-60.416L622.336 512 396.458667 286.208l60.416-60.416 256 256a42.666667 42.666667 0 0 1 0 60.416l-256 256z",fill:"#FF6A00","p-id":"8539"})],-1))])])])}],["__scopeId","data-v-a1523e5e"]]),Yn=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:Xn},Symbol.toStringTag,{value:"Module"})),Zn={name:"AuthDialog",components:{ElDialog:ee,ElForm:te,ElFormItem:re,ElInput:Z,ElButton:ae,ElCheckbox:ie,ElSelect:X,ElOption:Y,ElRadioGroup:se,ElRadioButton:le,GoogleInput:gn,CodeInput:Cn,RegisterForm:Xn},props:{visible:{type:Boolean,default:!1},lang:{type:String,default:""}},data(){return{currentVisible:this.visible,mode:"code",loginType:"account",loginMethod:"email",areaCodeData:[],isCounting:!1,countdown:60,codeReady:!1,timer:null,loginForm:{type:"email",username:"",password:"",remember:!1,areaCode:"+86",phone:"",email:"",code:""},loginRules:{email:[{required:!0,type:"email",trigger:"blur"}],phone:[{required:!0,trigger:"blur"}],code:[{required:!0,len:4,trigger:"blur"}]},registerForm:{city:"大连",company:"",areaCode:"+86",phone:"",code:"",password:"",agree:!0}}},computed:{isEn(){if(this.lang)return"en"===this.lang||"en-US"===this.lang;try{if("function"==typeof useCookie){const e=useCookie("jc-language")?.value;if(e)return/^en(-US)?$/.test(e)}}catch(e){}if("undefined"!=typeof document){const e=document.cookie||"";return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e)}try{if("function"==typeof useNuxtApp){const e=useNuxtApp();return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e?.ssrContext?.event?.node?.req?.headers?.cookie||"")}}catch(e){}return!1}},watch:{visible(e){this.currentVisible=e},currentVisible(e){this.$emit("update:visible",e)}},methods:{handleRegisterAction(e){console.log("执行注册请求",e)},validateField(e){this.$refs.loginFormRef.validateField(e,e=>{console.log("🍉 ~ index.vue:340 ~ errorMessage:",e),this.codeReady=e})},handleGetCode(){console.log("发送验证码逻辑")},handleLogin(){console.log("Login Action")},handleRegister(){console.log("Register Action")},handleForget(){console.log("Forget Password")},async handleChangeSubType(e){this.loginMethod=e,"mobile"==e&&0===this.areaCodeData.length&&this.getAreaCodeData()},async getAreaCodeData(){const e=await N();this.areaCodeData=e.data.data.records}}},er={class:"auth-container"},tr={key:0,class:"login-section"},or={class:"tab-header"},nr={class:"login-passport"},rr={class:"login-remember"},ir={key:0,class:"login-agreement"},ar={class:"bottom-tip"},lr={key:1,class:"register-section"};const sr=/* @__PURE__ */so(Zn,[["render",function(e,t,o,n,r,i){const a=R("GoogleInput"),h=R("el-form-item"),v=R("el-radio-button"),w=R("el-radio-group"),b=R("el-option"),x=R("el-select"),k=R("google-input"),_=R("CodeInput"),A=R("el-checkbox"),S=R("el-button"),B=R("el-form"),F=R("RegisterForm"),I=R("ElDialog");return s(),u(I,{modelValue:r.currentVisible,"onUpdate:modelValue":t[16]||(t[16]=e=>r.currentVisible=e),"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"",width:"480px",top:"10vh",class:"jc-auth-dialog","show-close":!0},{default:E(()=>[c("div",er,["login"===r.mode?(s(),l("div",tr,[t[24]||(t[24]=c("div",{class:"login-title"},[c("p",null,"Welcome Back to JCtrans")],-1)),c("div",or,[c("span",{class:p(["tab-header-title",{active:"account"===r.loginType}]),onClick:t[0]||(t[0]=e=>r.loginType="account")},"账号登录",2),c("span",{class:p(["tab-header-title",{active:"code"===r.loginType}]),onClick:t[1]||(t[1]=e=>r.loginType="code")},"验证码登录",2)]),d(B,{ref:"loginFormRef",model:r.loginForm,rules:r.loginRules,class:"auth-form login-form-content"},{default:E(()=>["account"===r.loginType?(s(),l(g,{key:0},[d(h,{prop:"username",class:"form-user"},{default:E(()=>[d(a,{modelValue:r.loginForm.username,"onUpdate:modelValue":t[2]||(t[2]=e=>r.loginForm.username=e),placeholder:"用户名/邮箱/手机号"},null,8,["modelValue"])]),_:1}),d(h,{prop:"password",class:"password-item"},{default:E(()=>[d(a,{modelValue:r.loginForm.password,"onUpdate:modelValue":t[3]||(t[3]=e=>r.loginForm.password=e),type:"password",class:"input-show-pass",placeholder:"密码","show-password":""},null,8,["modelValue"])]),_:1})],64)):(s(),l(g,{key:1},[d(h,{prop:"type"},{default:E(()=>[d(w,{class:"radio-box",modelValue:r.loginForm.type,"onUpdate:modelValue":t[4]||(t[4]=e=>r.loginForm.type=e),onChange:i.handleChangeSubType},{default:E(()=>[d(v,{label:"EMAIL",value:"email"},{default:E(()=>[(s(),l("svg",{t:"1767855939824",class:p(["jc:mr-0.5","email"===r.loginForm.type?"svg-icon-active":"svg-icon"]),viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"9824",width:"200",height:"200"},[...t[17]||(t[17]=[c("path",{d:"M113.242353 250.217412l356.352 356.412235a60.235294 60.235294 0 0 0 80.655059 4.156235l4.577882-4.156235 356.111059-356.171294c1.204706 4.397176 1.987765 8.914824 2.409412 13.552941l0.240941 6.987294v481.882353c0 42.345412-32.768 77.101176-74.270118 80.112941l-6.023529 0.240942H190.765176a80.293647 80.293647 0 0 1-80.112941-74.330353l-0.180706-6.02353v-481.882353c0-4.818824 0.421647-9.456941 1.204706-14.034823l1.505883-6.746353z m720.052706-59.512471c4.818824 0 9.637647 0.421647 14.215529 1.204706l6.866824 1.566118-342.136471 342.13647-342.256941-342.13647c4.397176-1.204706 9.035294-2.048 13.673412-2.409412l7.107764-0.361412h642.529883z","p-id":"9825"},null,-1)])],2)),C(" "+y(i.isEn?"Email":"邮箱"),1)]),_:1}),d(v,{label:"MOBILE",value:"mobile"},{default:E(()=>[(s(),l("svg",{class:p(["jc:mr-0.5","mobile"===r.loginForm.type?"svg-icon-active":"svg-icon"]),t:"1767855913184",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"9670",width:"200",height:"200"},[...t[18]||(t[18]=[c("path",{d:"M694.874353 918.949647c-57.825882-2.108235-221.726118-24.696471-393.336471-196.367059-171.610353-171.550118-194.258824-335.450353-196.367058-393.33647-3.252706-88.124235 64.271059-173.778824 142.336-207.209412a59.030588 59.030588 0 0 1 58.006588 6.324706c64.210824 46.863059 108.604235 117.639529 146.672941 173.357176 17.227294 25.178353 13.071059 59.512471-10.24 79.75153L363.52 439.717647a19.275294 19.275294 0 0 0-5.722353 24.696471c17.709176 32.346353 49.332706 80.353882 85.473882 116.495058 36.141176 36.141176 86.437647 69.752471 120.952471 89.509648a19.395765 19.395765 0 0 0 25.840941-6.445177l50.959059-77.703529c19.516235-25.961412 56.018824-31.623529 82.582588-13.251765 56.500706 39.092706 122.458353 82.642824 170.706824 144.444235a59.030588 59.030588 0 0 1 7.589647 59.632941c-33.611294 78.426353-118.663529 145.167059-207.088941 141.914353z","p-id":"9671"},null,-1)])],2)),C(" "+y(i.isEn?"Cell Phone":"手机号"),1)]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),"email"===r.loginForm.type?(s(),u(h,{key:0,prop:"email"},{default:E(()=>[d(a,{modelValue:r.loginForm.email,"onUpdate:modelValue":t[5]||(t[5]=e=>r.loginForm.email=e),placeholder:i.isEn?"Email Address":"邮箱地址",onBlur:t[6]||(t[6]=e=>i.validateField("email"))},null,8,["modelValue","placeholder"])]),_:1})):(s(),u(h,{key:1,ref:"areaCodeCountryId",class:"tel"},{default:E(()=>[(s(),u(h,{prop:"phone",ref:"phone",key:8,class:"tel-mobile","inline-message":!0},{default:E(()=>[d(k,{modelValue:r.loginForm.phone,"onUpdate:modelValue":t[9]||(t[9]=e=>r.loginForm.phone=e),placeholder:i.isEn?"Cell Phone Number":"手机号码",label:i.isEn?"Cell Phone Number":"手机号码",clearable:"",autocomplete:"off",onBlur:t[10]||(t[10]=e=>i.validateField("phone")),maxlength:"15",disabled:r.isCounting},{prefix:E(()=>[d(h,{prop:"areaCode",class:"tel-areacode","inline-message":!0},{default:E(()=>[d(x,{modelValue:r.loginForm.areaCode,"onUpdate:modelValue":t[7]||(t[7]=e=>r.loginForm.areaCode=e),placeholder:i.isEn?"Code":"区号",onChange:t[8]||(t[8]=e=>i.validateField("phone")),disabled:r.isCounting,"popper-class":"jc-area-code-select-wrapper"},{default:E(()=>[(s(!0),l(g,null,m(r.areaCodeData,e=>(s(),u(b,{key:e.id,label:e.telCode,value:e.telCode},null,8,["label","value"]))),128)),d(b,{label:"+86",value:"+86"})]),_:1},8,["modelValue","placeholder","disabled"])]),_:1})]),_:1},8,["modelValue","placeholder","label","disabled"])]),_:1}))]),_:1},512)),d(h,{prop:"code"},{default:E(()=>[d(_,{modelValue:r.loginForm.code,"onUpdate:modelValue":t[11]||(t[11]=e=>r.loginForm.code=e),placeholder:i.isEn?"Verification Code":"验证码",ready:r.codeReady,"is-en":i.isEn,onSend:i.handleGetCode},null,8,["modelValue","placeholder","ready","is-en","onSend"])]),_:1})],64)),c("div",nr,[c("div",rr,[d(h,{prop:"remember",class:"remember-item"},{default:E(()=>[d(A,{modelValue:r.loginForm.remember,"onUpdate:modelValue":t[12]||(t[12]=e=>r.loginForm.remember=e),class:"remember-btn"},{default:E(()=>[...t[19]||(t[19]=[C("30天自动登录",-1)])]),_:1},8,["modelValue"])]),_:1}),"account"===r.loginType?(s(),l("span",{key:0,class:"forget-pwd-btn",onClick:t[13]||(t[13]=(...e)=>i.handleForget&&i.handleForget(...e))},"忘记密码")):f("",!0)]),"code"===r.loginType?(s(),l("div",ir,[...t[20]||(t[20]=[c("div",{class:"login-agreement-text"},[c("span",{class:"login-agreement-text-item"},"未注册验证后自动登录,注册即代表同意"),c("span",{class:"link-type"},"《用户条款和协议》"),c("span",{class:"login-agreement-text-item"},"和"),c("span",{class:"link-type"},"《隐私政策》")],-1)])])):f("",!0),d(S,{class:"submit-btn",onClick:i.handleLogin},{default:E(()=>[C(y("code"===r.loginType?"登录/注册":"登录")+" ",1),t[21]||(t[21]=c("i",{class:"el-icon-right",style:{"margin-left":"8px"}},null,-1))]),_:1},8,["onClick"])])]),_:1},8,["model","rules"]),t[25]||(t[25]=c("div",{class:"third-party-sign-in"},[c("div",{class:"third-party-sign-in-title"},"其他登录方式"),c("div",{class:"third-party-sign-in-group"},[c("div",{class:"third-party-sign-in-btn"},[c("i",{class:"icon-wechat"}),c("span",null,"微信")]),c("div",{class:"third-party-sign-in-btn"},[c("i",{class:"icon-linkedin"}),c("span",null,"LinkedIn")]),c("div",{class:"third-party-sign-in-btn"},[c("i",{class:"icon-facebook"}),c("span",null,"Facebook")])])],-1)),c("div",ar,[t[23]||(t[23]=C(" 没有账户?",-1)),c("span",{class:"action-text",onClick:t[14]||(t[14]=e=>r.mode="register")},[...t[22]||(t[22]=[C("立即注册 ",-1),c("svg",{t:"1767853448095",class:"icon-more",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8538",width:"200",height:"200"},[c("path",{d:"M456.874667 798.208l-60.416-60.416L622.336 512 396.458667 286.208l60.416-60.416 256 256a42.666667 42.666667 0 0 1 0 60.416l-256 256z",fill:"#FF6A00","p-id":"8539"})],-1)])])])])):(s(),l("div",lr,[d(F,{"is-en":i.isEn,onToLogin:t[15]||(t[15]=e=>r.mode="login"),onRegister:i.handleRegisterAction},null,8,["is-en","onRegister"])]))])]),_:1},8,["modelValue"])}],["__scopeId","data-v-df8155a6"]]),cr=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"}));function ur(o,n){const r=e([]),i=e(!1),a=e(!1),l=e(!1),s=e(1),c=e(0),u=t(()=>{const e=[...n.value];return e.includes("Country")&&!e.includes("Region")&&e.push("Region"),e});return{searchResults:r,loading:i,isFetchingMore:a,isFinished:l,fetchData:async(e=!1)=>{const t=o.value.trim();if(!t)return r.value=[],c.value=0,void(l.value=!1);if(e){if(a.value||l.value)return;a.value=!0,s.value+=1}else{if(i.value)return;i.value=!0,s.value=1,l.value=!1}try{const o=await async function(e,t=["Continent","Country","City","Seaport","Airport"],o={}){return D.searchByName({keyword:e,displayInfo:t,...o})}(t,n.value,{current:s.value,size:10}),i=(d=o.records||[],Array.isArray(d)?d.filter(e=>u.value.includes(e.type)):[]);e?r.value.push(...i):r.value=i,c.value=o.total||0,(r.value.length>=c.value||i.length<10)&&(l.value=!0)}catch(p){console.error("Search request failed:",p),e&&(s.value-=1)}finally{i.value=!1,a.value=!1}var d}}}const dr={class:"h5-search-container"},pr={class:"trigger-content"},hr=["src"],fr={class:"placeholder-text"},vr={key:0,class:"selected-count"},gr={key:1,class:"selected-val"},mr={key:2,class:"placeholder-gray"},yr={key:0,class:"h5-modal-root"},wr={class:"h5-drawer-card"},br={class:"h5-header"},xr={class:"h5-input-wrapper"},kr=["src"],_r=["placeholder"],Ar={key:0,class:"h5-spinner-box"},Cr={key:1,class:"h5-section"},Sr={class:"h5-section-hd"},Br={class:"h5-history-grid"},Er=["onClick"],Rr={key:2,class:"h5-result-list"},Fr=["onClick"],Ir={class:"item-info"},Vr={class:"item-name"},Hr={key:0,class:"item-sub"},Tr={class:"h5-load-status"},Or={key:1,class:"no-more"},zr={key:3,class:"h5-empty"},Mr=/* @__PURE__ */so(/* @__PURE__ */r({__name:"index",props:{modelValue:{},multiple:{type:Boolean,default:!1},lang:{default:"zh-CN"},placeholder:{},historyKey:{}},emits:["update:modelValue","select"],setup(n,{emit:r}){const h=n,b=r,x=e(!1),C=e(""),S=e(null),B=e(null);let R=null;const{searchHistory:F,saveToHistory:I,clearHistory:V}=function(n){const r=e([]),i="undefined"!=typeof window&&"undefined"!=typeof localStorage,a=t(()=>(n.value||"")+"_search_history_cache"),l=t(()=>!!n.value&&""!==n.value);return o(()=>{if(i&&l.value){const t=localStorage.getItem(a.value);if(t)try{r.value=JSON.parse(t)}catch(e){r.value=[]}}}),{searchHistory:r,saveToHistory:e=>{if(!e||!i)return;const t=r.value.filter(t=>t.id&&t.id!==e.id||t.display!==e.display);t.unshift(e);const o=t.slice(0,4);if(l.value){r.value=o;try{localStorage.setItem(a.value,JSON.stringify(o))}catch(n){console.warn("LocalStorage save failed:",n)}}},clearHistory:()=>{r.value=[],i&&localStorage.removeItem(a.value)},HasHistory:l}}(i(h,"historyKey")),{searchResults:H,loading:T,isFetchingMore:M,isFinished:D,fetchData:P}=ur(C,e(["City","Seaport","Airport"])),U=t(()=>{if(h.lang)return"en"===h.lang||"en-US"===h.lang;try{if("function"==typeof useCookie){const e=useCookie("jc-language")?.value;if(e)return/^en(-US)?$/.test(e)}}catch(e){}if("undefined"!=typeof document){const e=document.cookie||"";return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e)}try{if("function"==typeof useNuxtApp){const e=useNuxtApp();return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e?.ssrContext?.event?.node?.req?.headers?.cookie||"")}}catch(e){}return!1}),L=t(()=>Array.isArray(h.modelValue)?h.modelValue:h.modelValue?[h.modelValue]:[]),j=t(()=>!h.multiple&&!!h.modelValue),N=t(()=>j.value?Y(h.modelValue):""),W=t(()=>L.value.length>0),q=()=>{x.value=!0,z(()=>{S.value?.focus()})},K=()=>{x.value=!1,C.value=""},Q=e=>{if(I(e),h.multiple){L.value.some(t=>t.id===e.id)||b("update:modelValue",[...L.value,e])}else b("update:modelValue",e),K();b("select",e)},J=()=>{b("update:modelValue",h.multiple?[]:null)},G=e(!1),$=e=>{const t=e.target;if(!t)return;!(t.scrollTop+t.clientHeight>=t.scrollHeight-80)||!C.value||T.value||M.value||D.value||G.value||(G.value=!0,P(!0))};a(M,e=>{e||(G.value=!1)});const X=()=>{R&&clearTimeout(R),R=setTimeout(()=>{G.value=!1,B.value?.scrollTo({top:0}),console.log("🍉 ~ index.vue:279 ~ onInput ~ fetchData:",P),P(!1)},300)},Y=e=>U.value?e.displayEn||e.display:e.displayCn||e.display,Z=e=>L.value.some(t=>t.id===e.id);return(e,t)=>(s(),l("div",dr,[c("div",{class:"search-trigger",onClick:q},[c("div",pr,[c("img",{src:_(Tt),class:"search-icon-m"},null,8,hr),c("div",fr,[n.multiple&&L.value.length>0?(s(),l("span",vr,y(U.value?"Selected":"已选")+" ("+y(L.value.length)+")",1)):!n.multiple&&j.value?(s(),l("span",gr,y(N.value),1)):(s(),l("span",mr,y(n.placeholder||(U.value?"Search":"搜索")),1))])]),W.value?(s(),l("span",{key:0,class:"clear-trigger",onClick:w(J,["stop"])},"ⓧ")):f("",!0)]),(s(),u(A,{to:"body"},[x.value?(s(),l("div",yr,[d(O,{name:"fade"},{default:E(()=>[c("div",{class:"h5-mask",onClick:K})]),_:1}),d(O,{name:"slide-up"},{default:E(()=>[c("div",wr,[c("div",{class:"drawer-handle",onClick:K}),c("div",br,[c("div",xr,[c("img",{src:_(Tt),class:"inner-icon"},null,8,kr),v(c("input",{ref_key:"inputRef",ref:S,"onUpdate:modelValue":t[0]||(t[0]=e=>C.value=e),placeholder:U.value?"City/Port/Airport":"搜索城市/港口/机场",onInput:X},null,40,_r),[[k,C.value]]),C.value?(s(),l("div",{key:0,class:"h5-clear-btn",onClick:t[1]||(t[1]=e=>C.value="")}," ✕ ")):f("",!0)]),c("div",{class:"h5-cancel-btn",onClick:K},y(U.value?"Cancel":"取消"),1)]),c("div",{class:"h5-main-content",ref_key:"scrollContainer",ref:B,onScroll:$},[_(T)&&!_(M)?(s(),l("div",Ar,[...t[3]||(t[3]=[c("div",{class:"h5-spinner"},null,-1)])])):f("",!0),!C.value&&_(F).length>0?(s(),l("div",Cr,[c("div",Sr,[c("span",null,y(U.value?"Recent":"最近搜索"),1),c("span",{class:"h5-clear-history",onClick:t[2]||(t[2]=(...e)=>_(V)&&_(V)(...e))},y(U.value?"Clear":"清空"),1)]),c("div",Br,[(s(!0),l(g,null,m(_(F),(e,t)=>(s(),l("div",{key:t,class:"h5-history-tag",onClick:t=>Q(e)},y(Y(e)),9,Er))),128))])])):f("",!0),_(H).length>0?(s(),l("div",Rr,[(s(!0),l(g,null,m(_(H),(e,t)=>{return s(),l("div",{key:t,class:p(["h5-result-item",{"is-active":Z(e)}]),onClick:t=>Q(e)},[c("div",{class:p(["item-type",e.type.toLowerCase()])},y((o=e.type,U.value?o:{City:"城市",Seaport:"港口",Airport:"机场"}[o]||o)),3),c("div",Ir,[c("div",Vr,y(Y(e)),1),e.parentName?(s(),l("div",Hr,y(e.parentName),1)):f("",!0)])],10,Fr);var o}),128)),c("div",Tr,[_(M)?(s(),l(g,{key:0},[t[4]||(t[4]=c("div",{class:"mini-spinner"},null,-1)),c("span",null,y(U.value?"Loading...":"加载中..."),1)],64)):_(D)&&C.value?(s(),l("span",Or,y(U.value?"No more results":"没有更多结果了"),1)):f("",!0)])])):f("",!0),C.value&&!_(T)&&0===_(H).length?(s(),l("div",zr,y(U.value?"No Results Found":"未找到相关结果"),1)):f("",!0)],544)])]),_:1})])):f("",!0)]))]))}}),[["__scopeId","data-v-854fc8dd"]]),Dr=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:Mr},Symbol.toStringTag,{value:"Module"}));var Pr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ur(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lr(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var o=function e(){var o=!1;try{o=this instanceof e}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),o}var jr={exports:{}};var Nr={exports:{}};const Wr=/* @__PURE__ */Lr(/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var qr;function Kr(){return qr||(qr=1,Nr.exports=(e=e||function(e,t){var o;if("undefined"!=typeof window&&window.crypto&&(o=window.crypto),"undefined"!=typeof self&&self.crypto&&(o=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(o=globalThis.crypto),!o&&"undefined"!=typeof window&&window.msCrypto&&(o=window.msCrypto),!o&&void 0!==Pr&&Pr.crypto&&(o=Pr.crypto),!o)try{o=Wr}catch(v){}var n=function(){if(o){if("function"==typeof o.getRandomValues)try{return o.getRandomValues(new Uint32Array(1))[0]}catch(v){}if("function"==typeof o.randomBytes)try{return o.randomBytes(4).readInt32LE()}catch(v){}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||/* @__PURE__ */function(){function e(){}return function(t){var o;return e.prototype=t,o=new e,e.prototype=null,o}}(),i={},a=i.lib={},l=a.Base=/* @__PURE__ */function(){return{extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=a.WordArray=l.extend({init:function(e,o){e=this.words=e||[],this.sigBytes=o!=t?o:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,o=e.words,n=this.sigBytes,r=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<r;i++){var a=o[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=a<<24-(n+i)%4*8}else for(var l=0;l<r;l+=4)t[n+l>>>2]=o[l>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,o=this.sigBytes;t[o>>>2]&=4294967295<<32-o%4*8,t.length=e.ceil(o/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],o=0;o<e;o+=4)t.push(n());return new s.init(t,e)}}),c=i.enc={},u=c.Hex={stringify:function(e){for(var t=e.words,o=e.sigBytes,n=[],r=0;r<o;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,o=[],n=0;n<t;n+=2)o[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new s.init(o,t/2)}},d=c.Latin1={stringify:function(e){for(var t=e.words,o=e.sigBytes,n=[],r=0;r<o;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,o=[],n=0;n<t;n++)o[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new s.init(o,t)}},p=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},h=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var o,n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,l=i/(4*a),c=(l=t?e.ceil(l):e.max((0|l)-this._minBufferSize,0))*a,u=e.min(4*c,i);if(c){for(var d=0;d<c;d+=a)this._doProcessBlock(r,d);o=r.splice(0,c),n.sigBytes-=u}return new s.init(o,u)},clone:function(){var e=l.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=h.extend({cfg:l.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,o){return new e.init(o).finalize(t)}},_createHmacHelper:function(e){return function(t,o){return new f.HMAC.init(e,o).finalize(t)}}});var f=i.algo={};return i}(Math),e)),Nr.exports;var e}var Qr,Jr={exports:{}};function Gr(){return Qr?Jr.exports:(Qr=1,Jr.exports=(a=Kr(),o=(t=a).lib,n=o.Base,r=o.WordArray,(i=t.x64={}).Word=n.extend({init:function(e,t){this.high=e,this.low=t}}),i.WordArray=n.extend({init:function(t,o){t=this.words=t||[],this.sigBytes=o!=e?o:8*t.length},toX32:function(){for(var e=this.words,t=e.length,o=[],n=0;n<t;n++){var i=e[n];o.push(i.high),o.push(i.low)}return r.create(o,this.sigBytes)},clone:function(){for(var e=n.clone.call(this),t=e.words=this.words.slice(0),o=t.length,r=0;r<o;r++)t[r]=t[r].clone();return e}}),a));var e,t,o,n,r,i,a}var $r,Xr={exports:{}};function Yr(){return $r||($r=1,Xr.exports=(e=Kr(),function(){if("function"==typeof ArrayBuffer){var t=e.lib.WordArray,o=t.init,n=t.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,n=[],r=0;r<t;r++)n[r>>>2]|=e[r]<<24-r%4*8;o.call(this,n,t)}else o.apply(this,arguments)};n.prototype=t}}(),e.lib.WordArray)),Xr.exports;var e}var Zr,ei={exports:{}};function ti(){return Zr?ei.exports:(Zr=1,ei.exports=(e=Kr(),function(){var t=e,o=t.lib.WordArray,n=t.enc;function r(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,o=e.sigBytes,n=[],r=0;r<o;r+=2){var i=t[r>>>2]>>>16-r%4*8&65535;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>1]|=e.charCodeAt(r)<<16-r%2*16;return o.create(n,2*t)}},n.Utf16LE={stringify:function(e){for(var t=e.words,o=e.sigBytes,n=[],i=0;i<o;i+=2){var a=r(t[i>>>2]>>>16-i%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i++)n[i>>>1]|=r(e.charCodeAt(i)<<16-i%2*16);return o.create(n,2*t)}}}(),e.enc.Utf16));var e}var oi,ni={exports:{}};function ri(){return oi?ni.exports:(oi=1,ni.exports=(e=Kr(),function(){var t=e,o=t.lib.WordArray;function n(e,t,n){for(var r=[],i=0,a=0;a<t;a++)if(a%4){var l=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;r[i>>>2]|=l<<24-i%4*8,i++}return o.create(r,i)}t.enc.Base64={stringify:function(e){var t=e.words,o=e.sigBytes,n=this._map;e.clamp();for(var r=[],i=0;i<o;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,l=0;l<4&&i+.75*l<o;l++)r.push(n.charAt(a>>>6*(3-l)&63));var s=n.charAt(64);if(s)for(;r.length%4;)r.push(s);return r.join("")},parse:function(e){var t=e.length,o=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i<o.length;i++)r[o.charCodeAt(i)]=i}var a=o.charAt(64);if(a){var l=e.indexOf(a);-1!==l&&(t=l)}return n(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64));var e}var ii,ai={exports:{}};function li(){return ii?ai.exports:(ii=1,ai.exports=(e=Kr(),function(){var t=e,o=t.lib.WordArray;function n(e,t,n){for(var r=[],i=0,a=0;a<t;a++)if(a%4){var l=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;r[i>>>2]|=l<<24-i%4*8,i++}return o.create(r,i)}t.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var o=e.words,n=e.sigBytes,r=t?this._safe_map:this._map;e.clamp();for(var i=[],a=0;a<n;a+=3)for(var l=(o[a>>>2]>>>24-a%4*8&255)<<16|(o[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|o[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s<n;s++)i.push(r.charAt(l>>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e,t){void 0===t&&(t=!0);var o=e.length,r=t?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a<r.length;a++)i[r.charCodeAt(a)]=a}var l=r.charAt(64);if(l){var s=e.indexOf(l);-1!==s&&(o=s)}return n(e,o,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),e.enc.Base64url));var e}var si,ci={exports:{}};function ui(){return si?ci.exports:(si=1,ci.exports=(e=Kr(),function(t){var o=e,n=o.lib,r=n.WordArray,i=n.Hasher,a=o.algo,l=[];!function(){for(var e=0;e<64;e++)l[e]=4294967296*t.abs(t.sin(e+1))|0}();var s=a.MD5=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var o=0;o<16;o++){var n=t+o,r=e[n];e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var i=this._hash.words,a=e[t+0],s=e[t+1],h=e[t+2],f=e[t+3],v=e[t+4],g=e[t+5],m=e[t+6],y=e[t+7],w=e[t+8],b=e[t+9],x=e[t+10],k=e[t+11],_=e[t+12],A=e[t+13],C=e[t+14],S=e[t+15],B=i[0],E=i[1],R=i[2],F=i[3];B=c(B,E,R,F,a,7,l[0]),F=c(F,B,E,R,s,12,l[1]),R=c(R,F,B,E,h,17,l[2]),E=c(E,R,F,B,f,22,l[3]),B=c(B,E,R,F,v,7,l[4]),F=c(F,B,E,R,g,12,l[5]),R=c(R,F,B,E,m,17,l[6]),E=c(E,R,F,B,y,22,l[7]),B=c(B,E,R,F,w,7,l[8]),F=c(F,B,E,R,b,12,l[9]),R=c(R,F,B,E,x,17,l[10]),E=c(E,R,F,B,k,22,l[11]),B=c(B,E,R,F,_,7,l[12]),F=c(F,B,E,R,A,12,l[13]),R=c(R,F,B,E,C,17,l[14]),B=u(B,E=c(E,R,F,B,S,22,l[15]),R,F,s,5,l[16]),F=u(F,B,E,R,m,9,l[17]),R=u(R,F,B,E,k,14,l[18]),E=u(E,R,F,B,a,20,l[19]),B=u(B,E,R,F,g,5,l[20]),F=u(F,B,E,R,x,9,l[21]),R=u(R,F,B,E,S,14,l[22]),E=u(E,R,F,B,v,20,l[23]),B=u(B,E,R,F,b,5,l[24]),F=u(F,B,E,R,C,9,l[25]),R=u(R,F,B,E,f,14,l[26]),E=u(E,R,F,B,w,20,l[27]),B=u(B,E,R,F,A,5,l[28]),F=u(F,B,E,R,h,9,l[29]),R=u(R,F,B,E,y,14,l[30]),B=d(B,E=u(E,R,F,B,_,20,l[31]),R,F,g,4,l[32]),F=d(F,B,E,R,w,11,l[33]),R=d(R,F,B,E,k,16,l[34]),E=d(E,R,F,B,C,23,l[35]),B=d(B,E,R,F,s,4,l[36]),F=d(F,B,E,R,v,11,l[37]),R=d(R,F,B,E,y,16,l[38]),E=d(E,R,F,B,x,23,l[39]),B=d(B,E,R,F,A,4,l[40]),F=d(F,B,E,R,a,11,l[41]),R=d(R,F,B,E,f,16,l[42]),E=d(E,R,F,B,m,23,l[43]),B=d(B,E,R,F,b,4,l[44]),F=d(F,B,E,R,_,11,l[45]),R=d(R,F,B,E,S,16,l[46]),B=p(B,E=d(E,R,F,B,h,23,l[47]),R,F,a,6,l[48]),F=p(F,B,E,R,y,10,l[49]),R=p(R,F,B,E,C,15,l[50]),E=p(E,R,F,B,g,21,l[51]),B=p(B,E,R,F,_,6,l[52]),F=p(F,B,E,R,f,10,l[53]),R=p(R,F,B,E,x,15,l[54]),E=p(E,R,F,B,s,21,l[55]),B=p(B,E,R,F,w,6,l[56]),F=p(F,B,E,R,S,10,l[57]),R=p(R,F,B,E,m,15,l[58]),E=p(E,R,F,B,A,21,l[59]),B=p(B,E,R,F,v,6,l[60]),F=p(F,B,E,R,k,10,l[61]),R=p(R,F,B,E,h,15,l[62]),E=p(E,R,F,B,b,21,l[63]),i[0]=i[0]+B|0,i[1]=i[1]+E|0,i[2]=i[2]+R|0,i[3]=i[3]+F|0},_doFinalize:function(){var e=this._data,o=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;o[r>>>5]|=128<<24-r%32;var i=t.floor(n/4294967296),a=n;o[15+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),o[14+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(o.length+1),this._process();for(var l=this._hash,s=l.words,c=0;c<4;c++){var u=s[c];s[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return l},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,o,n,r,i,a){var l=e+(t&o|~t&n)+r+a;return(l<<i|l>>>32-i)+t}function u(e,t,o,n,r,i,a){var l=e+(t&n|o&~n)+r+a;return(l<<i|l>>>32-i)+t}function d(e,t,o,n,r,i,a){var l=e+(t^o^n)+r+a;return(l<<i|l>>>32-i)+t}function p(e,t,o,n,r,i,a){var l=e+(o^(t|~n))+r+a;return(l<<i|l>>>32-i)+t}o.MD5=i._createHelper(s),o.HmacMD5=i._createHmacHelper(s)}(Math),e.MD5));var e}var di,pi={exports:{}};function hi(){return di?pi.exports:(di=1,pi.exports=(l=Kr(),t=(e=l).lib,o=t.WordArray,n=t.Hasher,r=e.algo,i=[],a=r.SHA1=n.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var o=this._hash.words,n=o[0],r=o[1],a=o[2],l=o[3],s=o[4],c=0;c<80;c++){if(c<16)i[c]=0|e[t+c];else{var u=i[c-3]^i[c-8]^i[c-14]^i[c-16];i[c]=u<<1|u>>>31}var d=(n<<5|n>>>27)+s+i[c];d+=c<20?1518500249+(r&a|~r&l):c<40?1859775393+(r^a^l):c<60?(r&a|r&l|a&l)-1894007588:(r^a^l)-899497514,s=l,l=a,a=r<<30|r>>>2,r=n,n=d}o[0]=o[0]+n|0,o[1]=o[1]+r|0,o[2]=o[2]+a|0,o[3]=o[3]+l|0,o[4]=o[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,o=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(o/4294967296),t[15+(n+64>>>9<<4)]=o,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=n._createHelper(a),e.HmacSHA1=n._createHmacHelper(a),l.SHA1));var e,t,o,n,r,i,a,l}var fi,vi={exports:{}};function gi(){return fi?vi.exports:(fi=1,vi.exports=(e=Kr(),function(t){var o=e,n=o.lib,r=n.WordArray,i=n.Hasher,a=o.algo,l=[],s=[];!function(){function e(e){for(var o=t.sqrt(e),n=2;n<=o;n++)if(!(e%n))return!1;return!0}function o(e){return 4294967296*(e-(0|e))|0}for(var n=2,r=0;r<64;)e(n)&&(r<8&&(l[r]=o(t.pow(n,.5))),s[r]=o(t.pow(n,1/3)),r++),n++}();var c=[],u=a.SHA256=i.extend({_doReset:function(){this._hash=new r.init(l.slice(0))},_doProcessBlock:function(e,t){for(var o=this._hash.words,n=o[0],r=o[1],i=o[2],a=o[3],l=o[4],u=o[5],d=o[6],p=o[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var f=c[h-15],v=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,g=c[h-2],m=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[h]=v+c[h-7]+m+c[h-16]}var y=n&r^n&i^r&i,w=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=p+((l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25))+(l&u^~l&d)+s[h]+c[h];p=d,d=u,u=l,l=a+b|0,a=i,i=r,r=n,n=b+(w+y)|0}o[0]=o[0]+n|0,o[1]=o[1]+r|0,o[2]=o[2]+i|0,o[3]=o[3]+a|0,o[4]=o[4]+l|0,o[5]=o[5]+u|0,o[6]=o[6]+d|0,o[7]=o[7]+p|0},_doFinalize:function(){var e=this._data,o=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return o[r>>>5]|=128<<24-r%32,o[14+(r+64>>>9<<4)]=t.floor(n/4294967296),o[15+(r+64>>>9<<4)]=n,e.sigBytes=4*o.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});o.SHA256=i._createHelper(u),o.HmacSHA256=i._createHmacHelper(u)}(Math),e.SHA256));var e}var mi,yi={exports:{}};var wi,bi={exports:{}};function xi(){return wi||(wi=1,bi.exports=(e=Kr(),Gr(),function(){var t=e,o=t.lib.Hasher,n=t.x64,r=n.Word,i=n.WordArray,a=t.algo;function l(){return r.create.apply(r,arguments)}var s=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=l()}();var u=a.SHA512=o.extend({_doReset:function(){this._hash=new i.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var o=this._hash.words,n=o[0],r=o[1],i=o[2],a=o[3],l=o[4],u=o[5],d=o[6],p=o[7],h=n.high,f=n.low,v=r.high,g=r.low,m=i.high,y=i.low,w=a.high,b=a.low,x=l.high,k=l.low,_=u.high,A=u.low,C=d.high,S=d.low,B=p.high,E=p.low,R=h,F=f,I=v,V=g,H=m,T=y,O=w,z=b,M=x,D=k,P=_,U=A,L=C,j=S,N=B,W=E,q=0;q<80;q++){var K,Q,J=c[q];if(q<16)Q=J.high=0|e[t+2*q],K=J.low=0|e[t+2*q+1];else{var G=c[q-15],$=G.high,X=G.low,Y=($>>>1|X<<31)^($>>>8|X<<24)^$>>>7,Z=(X>>>1|$<<31)^(X>>>8|$<<24)^(X>>>7|$<<25),ee=c[q-2],te=ee.high,oe=ee.low,ne=(te>>>19|oe<<13)^(te<<3|oe>>>29)^te>>>6,re=(oe>>>19|te<<13)^(oe<<3|te>>>29)^(oe>>>6|te<<26),ie=c[q-7],ae=ie.high,le=ie.low,se=c[q-16],ce=se.high,ue=se.low;Q=(Q=(Q=Y+ae+((K=Z+le)>>>0<Z>>>0?1:0))+ne+((K+=re)>>>0<re>>>0?1:0))+ce+((K+=ue)>>>0<ue>>>0?1:0),J.high=Q,J.low=K}var de,pe=M&P^~M&L,he=D&U^~D&j,fe=R&I^R&H^I&H,ve=F&V^F&T^V&T,ge=(R>>>28|F<<4)^(R<<30|F>>>2)^(R<<25|F>>>7),me=(F>>>28|R<<4)^(F<<30|R>>>2)^(F<<25|R>>>7),ye=(M>>>14|D<<18)^(M>>>18|D<<14)^(M<<23|D>>>9),we=(D>>>14|M<<18)^(D>>>18|M<<14)^(D<<23|M>>>9),be=s[q],xe=be.high,ke=be.low,_e=N+ye+((de=W+we)>>>0<W>>>0?1:0),Ae=me+ve;N=L,W=j,L=P,j=U,P=M,U=D,M=O+(_e=(_e=(_e=_e+pe+((de+=he)>>>0<he>>>0?1:0))+xe+((de+=ke)>>>0<ke>>>0?1:0))+Q+((de+=K)>>>0<K>>>0?1:0))+((D=z+de|0)>>>0<z>>>0?1:0)|0,O=H,z=T,H=I,T=V,I=R,V=F,R=_e+(ge+fe+(Ae>>>0<me>>>0?1:0))+((F=de+Ae|0)>>>0<de>>>0?1:0)|0}f=n.low=f+F,n.high=h+R+(f>>>0<F>>>0?1:0),g=r.low=g+V,r.high=v+I+(g>>>0<V>>>0?1:0),y=i.low=y+T,i.high=m+H+(y>>>0<T>>>0?1:0),b=a.low=b+z,a.high=w+O+(b>>>0<z>>>0?1:0),k=l.low=k+D,l.high=x+M+(k>>>0<D>>>0?1:0),A=u.low=A+U,u.high=_+P+(A>>>0<U>>>0?1:0),S=d.low=S+j,d.high=C+L+(S>>>0<j>>>0?1:0),E=p.low=E+W,p.high=B+N+(E>>>0<W>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,o=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(o/4294967296),t[31+(n+128>>>10<<5)]=o,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=o._createHelper(u),t.HmacSHA512=o._createHmacHelper(u)}(),e.SHA512)),bi.exports;var e}var ki,_i={exports:{}};var Ai,Ci={exports:{}};function Si(){return Ai?Ci.exports:(Ai=1,Ci.exports=(e=Kr(),Gr(),function(t){var o=e,n=o.lib,r=n.WordArray,i=n.Hasher,a=o.x64.Word,l=o.algo,s=[],c=[],u=[];!function(){for(var e=1,t=0,o=0;o<24;o++){s[e+5*t]=(o+1)*(o+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var r=1,i=0;i<24;i++){for(var l=0,d=0,p=0;p<7;p++){if(1&r){var h=(1<<p)-1;h<32?d^=1<<h:l^=1<<h-32}128&r?r=r<<1^113:r<<=1}u[i]=a.create(l,d)}}();var d=[];!function(){for(var e=0;e<25;e++)d[e]=a.create()}();var p=l.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var o=this._state,n=this.blockSize/2,r=0;r<n;r++){var i=e[t+2*r],a=e[t+2*r+1];i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(E=o[r]).high^=a,E.low^=i}for(var l=0;l<24;l++){for(var p=0;p<5;p++){for(var h=0,f=0,v=0;v<5;v++)h^=(E=o[p+5*v]).high,f^=E.low;var g=d[p];g.high=h,g.low=f}for(p=0;p<5;p++){var m=d[(p+4)%5],y=d[(p+1)%5],w=y.high,b=y.low;for(h=m.high^(w<<1|b>>>31),f=m.low^(b<<1|w>>>31),v=0;v<5;v++)(E=o[p+5*v]).high^=h,E.low^=f}for(var x=1;x<25;x++){var k=(E=o[x]).high,_=E.low,A=s[x];A<32?(h=k<<A|_>>>32-A,f=_<<A|k>>>32-A):(h=_<<A-32|k>>>64-A,f=k<<A-32|_>>>64-A);var C=d[c[x]];C.high=h,C.low=f}var S=d[0],B=o[0];for(S.high=B.high,S.low=B.low,p=0;p<5;p++)for(v=0;v<5;v++){var E=o[x=p+5*v],R=d[x],F=d[(p+1)%5+5*v],I=d[(p+2)%5+5*v];E.high=R.high^~F.high&I.high,E.low=R.low^~F.low&I.low}E=o[0];var V=u[l];E.high^=V.high,E.low^=V.low}},_doFinalize:function(){var e=this._data,o=e.words;this._nDataBytes;var n=8*e.sigBytes,i=32*this.blockSize;o[n>>>5]|=1<<24-n%32,o[(t.ceil((n+1)/i)*i>>>5)-1]|=128,e.sigBytes=4*o.length,this._process();for(var a=this._state,l=this.cfg.outputLength/8,s=l/8,c=[],u=0;u<s;u++){var d=a[u],p=d.high,h=d.low;p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),c.push(h),c.push(p)}return new r.init(c,l)},clone:function(){for(var e=i.clone.call(this),t=e._state=this._state.slice(0),o=0;o<25;o++)t[o]=t[o].clone();return e}});o.SHA3=i._createHelper(p),o.HmacSHA3=i._createHmacHelper(p)}(Math),e.SHA3));var e}var Bi,Ei={exports:{}};var Ri,Fi={exports:{}};function Ii(){return Ri?Fi.exports:(Ri=1,Fi.exports=(e=Kr(),o=(t=e).lib.Base,n=t.enc.Utf8,void(t.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var o=e.blockSize,r=4*o;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),l=i.words,s=a.words,c=0;c<o;c++)l[c]^=1549556828,s[c]^=909522486;i.sigBytes=a.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,o=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(o))}}))));var e,t,o,n}var Vi,Hi={exports:{}};var Ti,Oi={exports:{}};function zi(){return Ti?Oi.exports:(Ti=1,Oi.exports=(l=Kr(),hi(),Ii(),t=(e=l).lib,o=t.Base,n=t.WordArray,r=e.algo,i=r.MD5,a=r.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:i,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var o,r=this.cfg,i=r.hasher.create(),a=n.create(),l=a.words,s=r.keySize,c=r.iterations;l.length<s;){o&&i.update(o),o=i.update(e).finalize(t),i.reset();for(var u=1;u<c;u++)o=i.finalize(o),i.reset();a.concat(o)}return a.sigBytes=4*s,a}}),e.EvpKDF=function(e,t,o){return a.create(o).compute(e,t)},l.EvpKDF));var e,t,o,n,r,i,a,l}var Mi,Di={exports:{}};function Pi(){return Mi?Di.exports:(Mi=1,Di.exports=(e=Kr(),zi(),void(e.lib.Cipher||function(t){var o=e,n=o.lib,r=n.Base,i=n.WordArray,a=n.BufferedBlockAlgorithm,l=o.enc;l.Utf8;var s=l.Base64,c=o.algo.EvpKDF,u=n.Cipher=a.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,o){this.cfg=this.cfg.extend(o),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:/* @__PURE__ */function(){function e(e){return"string"==typeof e?w:m}return function(t){return{encrypt:function(o,n,r){return e(n).encrypt(t,o,n,r)},decrypt:function(o,n,r){return e(n).decrypt(t,o,n,r)}}}}()});n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var d=o.mode={},p=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=d.CBC=function(){var e=p.extend();function o(e,o,n){var r,i=this._iv;i?(r=i,this._iv=t):r=this._prevBlock;for(var a=0;a<n;a++)e[o+a]^=r[a]}return e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize;o.call(this,e,t,r),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),e.Decryptor=e.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=e.slice(t,t+r);n.decryptBlock(e,t),o.call(this,e,t,r),this._prevBlock=i}}),e}(),f=(o.pad={}).Pkcs7={pad:function(e,t){for(var o=4*t,n=o-e.sigBytes%o,r=n<<24|n<<16|n<<8|n,a=[],l=0;l<n;l+=4)a.push(r);var s=i.create(a,n);e.concat(s)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:h,padding:f}),reset:function(){var e;u.reset.call(this);var t=this.cfg,o=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,o&&o.words):(this._mode=e.call(n,this,o&&o.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var v=n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(o.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,o=e.salt;return(o?i.create([1398893684,1701076831]).concat(o).concat(t):t).toString(s)},parse:function(e){var t,o=s.parse(e),n=o.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=i.create(n.slice(2,4)),n.splice(0,4),o.sigBytes-=16),v.create({ciphertext:o,salt:t})}},m=n.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,o,n){n=this.cfg.extend(n);var r=e.createEncryptor(o,n),i=r.finalize(t),a=r.cfg;return v.create({ciphertext:i,key:o,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,o,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(o,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(o.kdf={}).OpenSSL={execute:function(e,t,o,n,r){if(n||(n=i.random(8)),r)a=c.create({keySize:t+o,hasher:r}).compute(e,n);else var a=c.create({keySize:t+o}).compute(e,n);var l=i.create(a.words.slice(t),4*o);return a.sigBytes=4*t,v.create({key:a,iv:l,salt:n})}},w=n.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:y}),encrypt:function(e,t,o,n){var r=(n=this.cfg.extend(n)).kdf.execute(o,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=r.iv;var i=m.encrypt.call(this,e,t,r.key,n);return i.mixIn(r),i},decrypt:function(e,t,o,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var r=n.kdf.execute(o,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=r.iv,m.decrypt.call(this,e,t,r.key,n)}})}())));var e}var Ui,Li={exports:{}};var ji,Ni={exports:{}};var Wi,qi={exports:{}};function Ki(){return Wi?qi.exports:(Wi=1,qi.exports=(e=Kr(),Pi(),e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function o(e){if(255&~(e>>24))e+=1<<24;else{var t=e>>16&255,o=e>>8&255,n=255&e;255===t?(t=0,255===o?(o=0,255===n?n=0:++n):++o):++t,e=0,e+=t<<16,e+=o<<8,e+=n}return e}function n(e){return 0===(e[0]=o(e[0]))&&(e[1]=o(e[1])),e}var r=t.Encryptor=t.extend({processBlock:function(e,t){var o=this._cipher,r=o.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0),n(a);var l=a.slice(0);o.encryptBlock(l,0);for(var s=0;s<r;s++)e[t+s]^=l[s]}});return t.Decryptor=r,t}(),e.mode.CTRGladman));var e}var Qi,Ji={exports:{}};var Gi,$i={exports:{}};var Xi,Yi={exports:{}};var Zi,ea={exports:{}};var ta,oa={exports:{}};var na,ra={exports:{}};var ia,aa={exports:{}};var la,sa={exports:{}};var ca,ua={exports:{}};var da,pa={exports:{}};function ha(){return da?pa.exports:(da=1,pa.exports=(e=Kr(),ri(),ui(),zi(),Pi(),function(){var t=e,o=t.lib,n=o.WordArray,r=o.BlockCipher,i=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],s=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=i.DES=r.extend({_doReset:function(){for(var e=this._key.words,t=[],o=0;o<56;o++){var n=a[o]-1;t[o]=e[n>>>5]>>>31-n%32&1}for(var r=this._subKeys=[],i=0;i<16;i++){var c=r[i]=[],u=s[i];for(o=0;o<24;o++)c[o/6|0]|=t[(l[o]-1+u)%28]<<31-o%6,c[4+(o/6|0)]|=t[28+(l[o+24]-1+u)%28]<<31-o%6;for(c[0]=c[0]<<1|c[0]>>>31,o=1;o<7;o++)c[o]=c[o]>>>4*(o-1)+3;c[7]=c[7]<<5|c[7]>>>27}var d=this._invSubKeys=[];for(o=0;o<16;o++)d[o]=r[15-o]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,o){this._lBlock=e[t],this._rBlock=e[t+1],p.call(this,4,252645135),p.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),p.call(this,1,1431655765);for(var n=0;n<16;n++){for(var r=o[n],i=this._lBlock,a=this._rBlock,l=0,s=0;s<8;s++)l|=c[s][((a^r[s])&u[s])>>>0];this._lBlock=a,this._rBlock=i^l}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,p.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(e,t){var o=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=o,this._lBlock^=o<<e}function h(e,t){var o=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=o,this._rBlock^=o<<e}t.DES=r._createHelper(d);var f=i.TripleDES=r.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),o=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(n.create(t)),this._des2=d.createEncryptor(n.create(o)),this._des3=d.createEncryptor(n.create(r))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=r._createHelper(f)}(),e.TripleDES));var e}var fa,va={exports:{}};var ga,ma={exports:{}};var ya,wa={exports:{}};var ba,xa={exports:{}};function ka(){return ba?xa.exports:(ba=1,xa.exports=(e=Kr(),ri(),ui(),zi(),Pi(),function(){var t=e,o=t.lib.BlockCipher,n=t.algo;const r=16,i=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function s(e,t){let o=t>>24&255,n=t>>16&255,r=t>>8&255,i=255&t,a=e.sbox[0][o]+e.sbox[1][n];return a^=e.sbox[2][r],a+=e.sbox[3][i],a}function c(e,t,o){let n,i=t,a=o;for(let l=0;l<r;++l)i^=e.pbox[l],a=s(e,i)^a,n=i,i=a,a=n;return n=i,i=a,a=n,a^=e.pbox[r],i^=e.pbox[r+1],{left:i,right:a}}function u(e,t,o){let n,i=t,a=o;for(let l=r+1;l>1;--l)i^=e.pbox[l],a=s(e,i)^a,n=i,i=a,a=n;return n=i,i=a,a=n,a^=e.pbox[1],i^=e.pbox[0],{left:i,right:a}}function d(e,t,o){for(let r=0;r<4;r++){e.sbox[r]=[];for(let t=0;t<256;t++)e.sbox[r][t]=a[r][t]}let n=0;for(let a=0;a<r+2;a++)e.pbox[a]=i[a]^t[n],n++,n>=o&&(n=0);let l=0,s=0,u=0;for(let i=0;i<r+2;i+=2)u=c(e,l,s),l=u.left,s=u.right,e.pbox[i]=l,e.pbox[i+1]=s;for(let r=0;r<4;r++)for(let t=0;t<256;t+=2)u=c(e,l,s),l=u.left,s=u.right,e.sbox[r][t]=l,e.sbox[r][t+1]=s;return!0}var p=n.Blowfish=o.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,o=e.sigBytes/4;d(l,t,o)}},encryptBlock:function(e,t){var o=c(l,e[t],e[t+1]);e[t]=o.left,e[t+1]=o.right},decryptBlock:function(e,t){var o=u(l,e[t],e[t+1]);e[t]=o.left,e[t+1]=o.right},blockSize:2,keySize:4,ivSize:2});t.Blowfish=o._createHelper(p)}(),e.Blowfish));var e}var _a,Aa,Ca,Sa,Ba,Ea,Ra;const Fa=/* @__PURE__ */Ur(_a?jr.exports:(_a=1,jr.exports=function(e){return e}(Kr(),Gr(),Yr(),ti(),ri(),li(),ui(),hi(),gi(),mi||(mi=1,yi.exports=(Ra=Kr(),gi(),Ca=(Aa=Ra).lib.WordArray,Sa=Aa.algo,Ba=Sa.SHA256,Ea=Sa.SHA224=Ba.extend({_doReset:function(){this._hash=new Ca.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=Ba._doFinalize.call(this);return e.sigBytes-=4,e}}),Aa.SHA224=Ba._createHelper(Ea),Aa.HmacSHA224=Ba._createHmacHelper(Ea),Ra.SHA224)),xi(),function(){return ki?_i.exports:(ki=1,_i.exports=(l=Kr(),Gr(),xi(),t=(e=l).x64,o=t.Word,n=t.WordArray,r=e.algo,i=r.SHA512,a=r.SHA384=i.extend({_doReset:function(){this._hash=new n.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=16,e}}),e.SHA384=i._createHelper(a),e.HmacSHA384=i._createHmacHelper(a),l.SHA384));var e,t,o,n,r,i,a,l}(),Si(),function(){return Bi?Ei.exports:(Bi=1,Ei.exports=(e=Kr(),function(){var t=e,o=t.lib,n=o.WordArray,r=o.Hasher,i=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),s=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),p=i.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var o=0;o<16;o++){var n=t+o,r=e[n];e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var i,p,w,b,x,k,_,A,C,S,B,E=this._hash.words,R=u.words,F=d.words,I=a.words,V=l.words,H=s.words,T=c.words;for(k=i=E[0],_=p=E[1],A=w=E[2],C=b=E[3],S=x=E[4],o=0;o<80;o+=1)B=i+e[t+I[o]]|0,B+=o<16?h(p,w,b)+R[0]:o<32?f(p,w,b)+R[1]:o<48?v(p,w,b)+R[2]:o<64?g(p,w,b)+R[3]:m(p,w,b)+R[4],B=(B=y(B|=0,H[o]))+x|0,i=x,x=b,b=y(w,10),w=p,p=B,B=k+e[t+V[o]]|0,B+=o<16?m(_,A,C)+F[0]:o<32?g(_,A,C)+F[1]:o<48?v(_,A,C)+F[2]:o<64?f(_,A,C)+F[3]:h(_,A,C)+F[4],B=(B=y(B|=0,T[o]))+S|0,k=S,S=C,C=y(A,10),A=_,_=B;B=E[1]+w+C|0,E[1]=E[2]+b+S|0,E[2]=E[3]+x+k|0,E[3]=E[4]+i+_|0,E[4]=E[0]+p+A|0,E[0]=B},_doFinalize:function(){var e=this._data,t=e.words,o=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e.sigBytes=4*(t.length+1),this._process();for(var r=this._hash,i=r.words,a=0;a<5;a++){var l=i[a];i[a]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return r},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,o){return e^t^o}function f(e,t,o){return e&t|~e&o}function v(e,t,o){return(e|~t)^o}function g(e,t,o){return e&o|t&~o}function m(e,t,o){return e^(t|~o)}function y(e,t){return e<<t|e>>>32-t}t.RIPEMD160=r._createHelper(p),t.HmacRIPEMD160=r._createHmacHelper(p)}(),e.RIPEMD160));var e}(),Ii(),function(){return Vi?Hi.exports:(Vi=1,Hi.exports=(s=Kr(),gi(),Ii(),t=(e=s).lib,o=t.Base,n=t.WordArray,r=e.algo,i=r.SHA256,a=r.HMAC,l=r.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var o=this.cfg,r=a.create(o.hasher,e),i=n.create(),l=n.create([1]),s=i.words,c=l.words,u=o.keySize,d=o.iterations;s.length<u;){var p=r.update(t).finalize(l);r.reset();for(var h=p.words,f=h.length,v=p,g=1;g<d;g++){v=r.finalize(v),r.reset();for(var m=v.words,y=0;y<f;y++)h[y]^=m[y]}i.concat(p),c[0]++}return i.sigBytes=4*u,i}}),e.PBKDF2=function(e,t,o){return l.create(o).compute(e,t)},s.PBKDF2));var e,t,o,n,r,i,a,l,s}(),zi(),Pi(),function(){return Ui?Li.exports:(Ui=1,Li.exports=(e=Kr(),Pi(),e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function o(e,t,o,n){var r,i=this._iv;i?(r=i.slice(0),this._iv=void 0):r=this._prevBlock,n.encryptBlock(r,0);for(var a=0;a<o;a++)e[t+a]^=r[a]}return t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize;o.call(this,e,t,r,n),this._prevBlock=e.slice(t,t+r)}}),t.Decryptor=t.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=e.slice(t,t+r);o.call(this,e,t,r,n),this._prevBlock=i}}),t}(),e.mode.CFB));var e}(),function(){return ji?Ni.exports:(ji=1,Ni.exports=(o=Kr(),Pi(),o.mode.CTR=(e=o.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var o=this._cipher,n=o.blockSize,r=this._iv,i=this._counter;r&&(i=this._counter=r.slice(0),this._iv=void 0);var a=i.slice(0);o.encryptBlock(a,0),i[n-1]=i[n-1]+1|0;for(var l=0;l<n;l++)e[t+l]^=a[l]}}),e.Decryptor=t,e),o.mode.CTR));var e,t,o}(),Ki(),function(){return Qi?Ji.exports:(Qi=1,Ji.exports=(o=Kr(),Pi(),o.mode.OFB=(e=o.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var o=this._cipher,n=o.blockSize,r=this._iv,i=this._keystream;r&&(i=this._keystream=r.slice(0),this._iv=void 0),o.encryptBlock(i,0);for(var a=0;a<n;a++)e[t+a]^=i[a]}}),e.Decryptor=t,e),o.mode.OFB));var e,t,o}(),function(){return Gi?$i.exports:(Gi=1,$i.exports=(t=Kr(),Pi(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return Xi?Yi.exports:(Xi=1,Yi.exports=(e=Kr(),Pi(),e.pad.AnsiX923={pad:function(e,t){var o=e.sigBytes,n=4*t,r=n-o%n,i=o+r-1;e.clamp(),e.words[i>>>2]|=r<<24-i%4*8,e.sigBytes+=r},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return Zi?ea.exports:(Zi=1,ea.exports=(e=Kr(),Pi(),e.pad.Iso10126={pad:function(t,o){var n=4*o,r=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(r-1)).concat(e.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return ta?oa.exports:(ta=1,oa.exports=(e=Kr(),Pi(),e.pad.Iso97971={pad:function(t,o){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,o)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return na?ra.exports:(na=1,ra.exports=(e=Kr(),Pi(),e.pad.ZeroPadding={pad:function(e,t){var o=4*t;e.clamp(),e.sigBytes+=o-(e.sigBytes%o||o)},unpad:function(e){var t=e.words,o=e.sigBytes-1;for(o=e.sigBytes-1;o>=0;o--)if(t[o>>>2]>>>24-o%4*8&255){e.sigBytes=o+1;break}}},e.pad.ZeroPadding));var e}(),function(){return ia?aa.exports:(ia=1,aa.exports=(e=Kr(),Pi(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return la?sa.exports:(la=1,sa.exports=(n=Kr(),Pi(),t=(e=n).lib.CipherParams,o=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var n=o.parse(e);return t.create({ciphertext:n})}},n.format.Hex));var e,t,o,n}(),function(){return ca?ua.exports:(ca=1,ua.exports=(e=Kr(),ri(),ui(),zi(),Pi(),function(){var t=e,o=t.lib.BlockCipher,n=t.algo,r=[],i=[],a=[],l=[],s=[],c=[],u=[],d=[],p=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var o=0,n=0;for(t=0;t<256;t++){var f=n^n<<1^n<<2^n<<3^n<<4;f=f>>>8^255&f^99,r[o]=f,i[f]=o;var v=e[o],g=e[v],m=e[g],y=257*e[f]^16843008*f;a[o]=y<<24|y>>>8,l[o]=y<<16|y>>>16,s[o]=y<<8|y>>>24,c[o]=y,y=16843009*m^65537*g^257*v^16843008*o,u[f]=y<<24|y>>>8,d[f]=y<<16|y>>>16,p[f]=y<<8|y>>>24,h[f]=y,o?(o=v^e[e[e[m^v]]],n^=e[e[n]]):o=n=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=o.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,o=e.sigBytes/4,n=4*((this._nRounds=o+6)+1),i=this._keySchedule=[],a=0;a<n;a++)a<o?i[a]=t[a]:(c=i[a-1],a%o?o>6&&a%o==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=r[(c=c<<8|c>>>24)>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=f[a/o|0]<<24),i[a]=i[a-o]^c);for(var l=this._invKeySchedule=[],s=0;s<n;s++){if(a=n-s,s%4)var c=i[a];else c=i[a-4];l[s]=s<4||a<=4?c:u[r[c>>>24]]^d[r[c>>>16&255]]^p[r[c>>>8&255]]^h[r[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,l,s,c,r)},decryptBlock:function(e,t){var o=e[t+1];e[t+1]=e[t+3],e[t+3]=o,this._doCryptBlock(e,t,this._invKeySchedule,u,d,p,h,i),o=e[t+1],e[t+1]=e[t+3],e[t+3]=o},_doCryptBlock:function(e,t,o,n,r,i,a,l){for(var s=this._nRounds,c=e[t]^o[0],u=e[t+1]^o[1],d=e[t+2]^o[2],p=e[t+3]^o[3],h=4,f=1;f<s;f++){var v=n[c>>>24]^r[u>>>16&255]^i[d>>>8&255]^a[255&p]^o[h++],g=n[u>>>24]^r[d>>>16&255]^i[p>>>8&255]^a[255&c]^o[h++],m=n[d>>>24]^r[p>>>16&255]^i[c>>>8&255]^a[255&u]^o[h++],y=n[p>>>24]^r[c>>>16&255]^i[u>>>8&255]^a[255&d]^o[h++];c=v,u=g,d=m,p=y}v=(l[c>>>24]<<24|l[u>>>16&255]<<16|l[d>>>8&255]<<8|l[255&p])^o[h++],g=(l[u>>>24]<<24|l[d>>>16&255]<<16|l[p>>>8&255]<<8|l[255&c])^o[h++],m=(l[d>>>24]<<24|l[p>>>16&255]<<16|l[c>>>8&255]<<8|l[255&u])^o[h++],y=(l[p>>>24]<<24|l[c>>>16&255]<<16|l[u>>>8&255]<<8|l[255&d])^o[h++],e[t]=v,e[t+1]=g,e[t+2]=m,e[t+3]=y},keySize:8});t.AES=o._createHelper(v)}(),e.AES));var e}(),ha(),function(){return fa?va.exports:(fa=1,va.exports=(e=Kr(),ri(),ui(),zi(),Pi(),function(){var t=e,o=t.lib.StreamCipher,n=t.algo,r=n.RC4=o.extend({_doReset:function(){for(var e=this._key,t=e.words,o=e.sigBytes,n=this._S=[],r=0;r<256;r++)n[r]=r;r=0;for(var i=0;r<256;r++){var a=r%o,l=t[a>>>2]>>>24-a%4*8&255;i=(i+n[r]+l)%256;var s=n[r];n[r]=n[i],n[i]=s}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,o=this._j,n=0,r=0;r<4;r++){o=(o+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[o],e[o]=i,n|=e[(e[t]+e[o])%256]<<24-8*r}return this._i=t,this._j=o,n}t.RC4=o._createHelper(r);var a=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=o._createHelper(a)}(),e.RC4));var e}(),function(){return ga?ma.exports:(ga=1,ma.exports=(e=Kr(),ri(),ui(),zi(),Pi(),function(){var t=e,o=t.lib.StreamCipher,n=t.algo,r=[],i=[],a=[],l=n.Rabbit=o.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,o=0;o<4;o++)e[o]=16711935&(e[o]<<8|e[o]>>>24)|4278255360&(e[o]<<24|e[o]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,o=0;o<4;o++)s.call(this);for(o=0;o<8;o++)r[o]^=n[o+4&7];if(t){var i=t.words,a=i[0],l=i[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),d=c>>>16|4294901760&u,p=u<<16|65535&c;for(r[0]^=c,r[1]^=d,r[2]^=u,r[3]^=p,r[4]^=c,r[5]^=d,r[6]^=u,r[7]^=p,o=0;o<4;o++)s.call(this)}},_doProcessBlock:function(e,t){var o=this._X;s.call(this),r[0]=o[0]^o[5]>>>16^o[3]<<16,r[1]=o[2]^o[7]>>>16^o[5]<<16,r[2]=o[4]^o[1]>>>16^o[7]<<16,r[3]=o[6]^o[3]>>>16^o[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),e[t+n]^=r[n]},blockSize:4,ivSize:2});function s(){for(var e=this._X,t=this._C,o=0;o<8;o++)i[o]=t[o];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,o=0;o<8;o++){var n=e[o]+t[o],r=65535&n,l=n>>>16,s=((r*r>>>17)+r*l>>>15)+l*l,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[o]=s^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=o._createHelper(l)}(),e.Rabbit));var e}(),function(){return ya?wa.exports:(ya=1,wa.exports=(e=Kr(),ri(),ui(),zi(),Pi(),function(){var t=e,o=t.lib.StreamCipher,n=t.algo,r=[],i=[],a=[],l=n.RabbitLegacy=o.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,o=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var r=0;r<4;r++)s.call(this);for(r=0;r<8;r++)n[r]^=o[r+4&7];if(t){var i=t.words,a=i[0],l=i[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),d=c>>>16|4294901760&u,p=u<<16|65535&c;for(n[0]^=c,n[1]^=d,n[2]^=u,n[3]^=p,n[4]^=c,n[5]^=d,n[6]^=u,n[7]^=p,r=0;r<4;r++)s.call(this)}},_doProcessBlock:function(e,t){var o=this._X;s.call(this),r[0]=o[0]^o[5]>>>16^o[3]<<16,r[1]=o[2]^o[7]>>>16^o[5]<<16,r[2]=o[4]^o[1]>>>16^o[7]<<16,r[3]=o[6]^o[3]>>>16^o[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),e[t+n]^=r[n]},blockSize:4,ivSize:2});function s(){for(var e=this._X,t=this._C,o=0;o<8;o++)i[o]=t[o];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,o=0;o<8;o++){var n=e[o]+t[o],r=65535&n,l=n>>>16,s=((r*r>>>17)+r*l>>>15)+l*l,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[o]=s^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=o._createHelper(l)}(),e.RabbitLegacy));var e}(),ka())));const Ia={name:"JcVerifySlide",props:{visible:{type:Boolean,default:!1},captchaType:{type:String,default:"blockPuzzle"},mode:{type:String,default:"pop"},vSpace:{type:Number,default:30},explain:{type:String,default:""},lang:{type:String,default:""},imgSize:{type:Object,default:()=>({width:"310px",height:"155px"})},barSize:{type:Object,default:()=>({width:"310px",height:"40px"})},defaultImg:{type:String,default:""}},data:()=>({secretKey:"",passFlag:!1,backImgBase:"",blockBackImgBase:"",backToken:"",startMoveTime:0,endMoveTime:0,startLeft:0,tipWords:"",finishText:"",setSize:{imgHeight:"155px",imgWidth:"340px"},moveBlockLeft:"0px",leftBarWidth:"40px",moveBlockBackgroundColor:"#fff",leftBarBorderColor:"#e4e7eb",iconColor:"#4b4b4b",iconClass:"icon-right",status:!1,isEnd:!1,showRefresh:!0,transitionLeft:"",transitionWidth:"",currentBarHeight:40,loading:!0}),computed:{isEn(){if(this.lang)return"en"===this.lang||"en-US"===this.lang;try{if("function"==typeof useCookie){const e=useCookie("jc-language")?.value;if(e)return/^en(-US)?$/.test(e)}}catch(e){}if("undefined"!=typeof document){const e=document.cookie||"";return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e)}try{if("function"==typeof useNuxtApp){const e=useNuxtApp();return/(^|;\s*)jc-language=en(-US)?(;|$)/.test(e?.ssrContext?.event?.node?.req?.headers?.cookie||"")}}catch(e){}return!1},showBox(){return"pop"!==this.mode||this.visible},barExplain(){return this.isEnd?"":this.isEn?"Swipe right to complete the picture puzzle":this.explain||"向右滑动完成验证"},subBlockStyle(){const e=-(parseInt(this.setSize.imgHeight)+this.vSpace+1);return{width:Math.floor(47*parseInt(this.setSize.imgWidth)/340)+"px",height:this.setSize.imgHeight,top:e+"px",backgroundSize:this.setSize.imgWidth+" "+this.setSize.imgHeight}}},watch:{visible(e){e&&this.$nextTick(()=>{this.handleResize(),this.refresh()})}},mounted(){this.initUuid(),this.handleResize(),window.addEventListener("resize",this.handleResize),window.addEventListener("touchmove",this.move,{passive:!1}),window.addEventListener("mousemove",this.move),window.addEventListener("touchend",this.end),window.addEventListener("mouseup",this.end)},beforeUnmount(){window.removeEventListener("resize",this.handleResize),window.removeEventListener("touchmove",this.move,{passive:!1}),window.removeEventListener("mousemove",this.move),window.removeEventListener("touchend",this.end),window.removeEventListener("mouseup",this.end)},methods:{handleImageLoaded(){this.loading=!1},initUuid(){localStorage.getItem("slider")||localStorage.setItem("slider","slider-"+((e=21)=>{let t="",o=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&o[e]];return t})())},aesEncrypt(e,t="XwKsGlMcdPMEhR1B"){const o=Fa.enc.Utf8.parse(t),n=Fa.enc.Utf8.parse(e);return Fa.AES.encrypt(n,o,{mode:Fa.mode.ECB,padding:Fa.pad.Pkcs7}).toString()},handleResize(){const e=window.innerWidth;let t=340;e<400?(t=e-60,this.currentBarHeight=44):(t=340,this.currentBarHeight=40),this.setSize.imgWidth=t+"px",this.setSize.imgHeight=t/2+"px",this.leftBarWidth=this.currentBarHeight+"px"},start(e){if(this.isEnd)return;const t=e||window.event,o=t.touches?t.touches[0].pageX:t.clientX,n=this.$refs.barArea;this.startLeft=Math.floor(o-n.getBoundingClientRect().left),this.startMoveTime=Date.now(),this.status=!0,this.transitionLeft="",this.transitionWidth="",this.moveBlockBackgroundColor="#1890ff",this.iconColor="#fff"},move(e){if(!this.status||this.isEnd)return;const t=e||window.event,o=t.touches?t.touches[0].pageX:t.clientX,n=this.$refs.barArea;let r=o-n.getBoundingClientRect().left-this.startLeft;const i=n.offsetWidth-this.currentBarHeight;r<=0&&(r=0),r>=i&&(r=i),this.moveBlockLeft=r+"px",this.leftBarWidth=r+this.currentBarHeight+"px",t.cancelable&&t.preventDefault()},end(){if(!this.status||this.isEnd)return;this.status=!1,this.endMoveTime=Date.now();let e=parseInt(this.moveBlockLeft.replace("px",""));e=310*e/parseInt(this.setSize.imgWidth);const t={pointJson:this.secretKey?this.aesEncrypt(JSON.stringify({x:e,y:5}),this.secretKey):JSON.stringify({x:e,y:5}),uuid:this.backToken};q(t).then(e=>{0===e.data.code?this.handleSuccess(e):this.handleError()}).catch(()=>this.handleError())},handleSuccess(e){this.endMoveTime,this.startMoveTime,this.moveBlockBackgroundColor="#52c41a",this.iconClass="icon-check",this.isEnd=!0,this.passFlag=!0,this.tipWords=`${((this.endMoveTime-this.startMoveTime)/1e3).toFixed(2)}s `+(this.isEn?"verified successfully":"验证成功"),setTimeout(()=>{this.closeBox(),this.$emit("success",{uuid:e.data.data.uuid,code:e.data.data.code})},800)},handleError(){this.moveBlockBackgroundColor="#ff4d4f",this.iconClass="icon-close",this.passFlag=!1,this.tipWords=this.isEn?"verification failed":"验证失败",setTimeout(()=>{this.refresh(),this.tipWords=""},1e3)},refresh(){this.loading=!0,this.transitionLeft="left 0.3s",this.transitionWidth="width 0.3s",this.moveBlockLeft="0px",this.leftBarWidth=this.currentBarHeight+"px",this.moveBlockBackgroundColor="#fff",this.iconColor="#4b4b4b",this.iconClass="icon-right",this.isEnd=!1,this.tipWords="",this.getPicture()},getPicture(){this.loading=!0,W({clientUid:localStorage.getItem("slider"),ts:Date.now()}).then(e=>{0===e.data.code?(this.backImgBase=e.data.data.originalImageBase64,this.blockBackImgBase=e.data.data.jigsawImageBase64,this.backToken=e.data.data.uuid,this.secretKey=e.data.data.secretKey):this.loading=!1}).catch(()=>{this.loading=!1})},closeBox(){this.$emit("update:visible",!1)}}},Va={key:0,class:"verify-box-top"},Ha={class:"verify-title"},Ta={class:"captcha-wrapper",style:{position:"relative"}},Oa=["src"],za={key:0,class:"verify-loading"},Ma={class:"loading-text"},Da={class:"verify-msg"},Pa=["textContent"],Ua=["src"];const La=/* @__PURE__ */so(Ia,[["render",function(e,t,o,n,r,i){return v((s(),l("div",{class:p("pop"===o.mode?"captcha-mask":"captcha-relative-wrapper")},[c("div",{class:p("pop"===o.mode?"verify-box":""),style:x({width:"pop"===o.mode?r.setSize.imgWidth+"40px":"100%","max-width":"100%"})},["pop"===o.mode?(s(),l("div",Va,[c("span",Ha,y(i.isEn?"please finish the security verification":"请完成安全验证"),1),c("span",{class:"verify-box-close",onClick:t[0]||(t[0]=(...e)=>i.closeBox&&i.closeBox(...e))}," × ")])):f("",!0),c("div",{class:"verify-box-bottom",style:x({padding:"pop"===o.mode?"15px":"0"})},[c("div",Ta,["blockPuzzle"===o.captchaType?(s(),l("div",{key:0,class:"verify-img-out",style:x({height:parseInt(r.setSize.imgHeight)+o.vSpace+"px"})},[c("div",{class:"verify-img-panel",style:x({width:r.setSize.imgWidth,height:r.setSize.imgHeight})},[c("img",{src:r.backImgBase?"data:image/png;base64,"+r.backImgBase:o.defaultImg,alt:"captcha",class:"main-img",onLoad:t[1]||(t[1]=(...e)=>i.handleImageLoaded&&i.handleImageLoaded(...e))},null,40,Oa),r.loading?(s(),l("div",za,[t[5]||(t[5]=c("div",{class:"loading-icon"},null,-1)),c("p",Ma,y(i.isEn?"Loading...":"加载中..."),1)])):f("",!0),v(c("div",{class:"verify-refresh",onClick:t[2]||(t[2]=(...e)=>i.refresh&&i.refresh(...e))},[...t[6]||(t[6]=[c("svg",{t:"1767753956986",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2523",width:"16",height:"16",fill:"#fff"},[c("path",{d:"M894.481158 505.727133c0 49.589418-9.711176 97.705276-28.867468 143.007041-18.501376 43.74634-44.98454 83.031065-78.712713 116.759237-33.728172 33.728172-73.012897 60.211337-116.759237 78.712713-45.311998 19.156292-93.417623 28.877701-143.007041 28.877701s-97.695043-9.721409-142.996808-28.877701c-43.756573-18.501376-83.031065-44.98454-116.76947-78.712713-33.728172-33.728172-60.211337-73.012897-78.712713-116.759237-19.156292-45.301765-28.867468-93.417623-28.867468-143.007041 0-49.579185 9.711176-97.695043 28.867468-142.996808 18.501376-43.74634 44.98454-83.031065 78.712713-116.759237 33.738405-33.728172 73.012897-60.211337 116.76947-78.712713 45.301765-19.166525 93.40739-28.877701 142.996808-28.877701 52.925397 0 104.008842 11.010775 151.827941 32.745798 46.192042 20.977777 86.909395 50.79692 121.016191 88.608084 4.389984 4.860704 8.646937 9.854439 12.781094 14.97097l0-136.263453c0-11.307533 9.168824-20.466124 20.466124-20.466124 11.307533 0 20.466124 9.15859 20.466124 20.466124l0 183.64253c0 5.433756-2.148943 10.632151-5.986341 14.46955-3.847631 3.837398-9.046027 5.996574-14.479783 5.996574l-183.64253-0.020466c-11.307533 0-20.466124-9.168824-20.466124-20.466124 0-11.307533 9.168824-20.466124 20.466124-20.466124l132.293025 0.020466c-3.960195-4.952802-8.063653-9.782807-12.289907-14.479783-30.320563-33.605376-66.514903-60.098773-107.549481-78.753645-42.467207-19.289322-87.850837-29.072129-134.902456-29.072129-87.195921 0-169.172981 33.9533-230.816946 95.597265-61.654198 61.654198-95.597265 143.621025-95.597265 230.816946s33.943067 169.172981 95.597265 230.816946c61.643965 61.654198 143.621025 95.607498 230.816946 95.607498s169.172981-33.9533 230.816946-95.607498c61.654198-61.643965 95.597265-143.621025 95.597265-230.816946 0-11.2973 9.168824-20.466124 20.466124-20.466124C885.322567 485.261009 894.481158 494.429833 894.481158 505.727133z","p-id":"2524"})],-1)])],512),[[S,r.showRefresh]]),d(O,{name:"tips-fade"},{default:E(()=>[r.tipWords?(s(),l("div",{key:0,class:p(["verify-tips",r.passFlag?"suc-bg":"err-bg"])},y(r.tipWords),3)):f("",!0)]),_:1})],4)],4)):f("",!0),c("div",{class:"verify-bar-area",ref:"barArea",style:x({width:r.setSize.imgWidth,height:r.currentBarHeight+"px",lineHeight:r.currentBarHeight+"px"})},[c("span",Da,y(i.barExplain),1),c("div",{class:"verify-left-bar",style:x({width:r.leftBarWidth,height:r.currentBarHeight+"px",borderColor:r.leftBarBorderColor,transition:r.transitionWidth})},[c("span",{class:"verify-msg",textContent:y(r.finishText)},null,8,Pa),c("div",{class:"verify-move-block",onMousedown:t[3]||(t[3]=(...e)=>i.start&&i.start(...e)),onTouchstart:t[4]||(t[4]=w((...e)=>i.start&&i.start(...e),["prevent"])),style:x({width:r.currentBarHeight+"px",height:r.currentBarHeight-2+"px",backgroundColor:r.moveBlockBackgroundColor,left:r.moveBlockLeft,transition:r.transitionLeft})},[c("i",{class:p(["verify-icon iconfont",r.iconClass]),style:x({color:r.iconColor})},null,6),"blockPuzzle"===o.captchaType?(s(),l("div",{key:0,class:"verify-sub-block",style:x(i.subBlockStyle)},[r.blockBackImgBase?(s(),l("img",{key:0,src:"data:image/png;base64,"+r.blockBackImgBase,class:"sub-img"},null,8,Ua)):f("",!0)],4)):f("",!0)],36)],4)],4)])],4)],6)],2)),[[S,i.showBox]])}],["__scopeId","data-v-f0477210"]]),ja=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:La},Symbol.toStringTag,{value:"Module"}));let Na={open(){L.emit(j.Open)},close(){L.emit(j.Close)},onSubmit(e){L.on(j.Submit,e)}};function Wa(){let e=!1;return{install(t){if("undefined"!=typeof window&&!e){const t=document.createElement("div");t.setAttribute("id","global-modal-root"),document.body.appendChild(t),M(Fn).mount(t),e=!0}t.config.globalProperties.$globalModal=Na}}}const qa=/* @__PURE__ */Object.assign({"./components/ApplyDataDialog.vue":Oo,"./components/ChineseCompanySearch/index.vue":un,"./components/CodeInput.vue":Sn,"./components/GlobalModal.vue":In,"./components/GoogleInput.vue":mn,"./components/JcFloatInput.vue":An,"./components/JcFloatWrapper.vue":Dn,"./components/JcLoginDialog/RegisterForm.vue":Yn,"./components/JcLoginDialog/index.vue":cr,"./components/JcMSearch/index.vue":Dr,"./components/JcSearch/index.vue":uo,"./components/JcVerifySlide/index.vue":ja}),Ka={};Object.entries(qa).forEach(([e,t])=>{const o=e.split("/").filter(e=>"."!==e&&"components"!==e&&!e.endsWith(".vue")&&"index"!==e).pop()||e.split("/").pop()?.replace(/\.\w+$/,"");o&&(Ka[o]=t.default)});const{ApplyDataDialog:Qa,JcSearch:Ja,GlobalModal:Ga,JCMSearch:$a,ChineseCompanySearch:Xa}=Ka;let Ya=!1;const Za={install(e,t){if(!Ya){Ya=!0,t?.sharedConfig&&K(t.sharedConfig);for(const t in Ka)e.component(t,Ka[t]),console.log(`[JcUI] 自动注册组件: ${t}`)}}};export{Qa as ApplyDataDialog,Xa as ChineseCompanySearch,Ga as GlobalModal,$a as JCMSearch,Ja as JcSearch,Q as MODAL_ACTION,Wa as createGlobalModalPlugin,Za as default,J as emitter,G as initSharedConfig};