@jctrans-materials/shared 1.0.1 → 1.0.3

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
@@ -4,23 +4,23 @@ function et(e, t) {
4
4
  return e.apply(t, arguments);
5
5
  };
6
6
  }
7
- const { toString: Dt } = Object.prototype, { getPrototypeOf: Ne } = Object, { iterator: ue, toStringTag: tt } = Symbol, le = /* @__PURE__ */ ((e) => (t) => {
7
+ const { toString: Dt } = Object.prototype, { getPrototypeOf: Ne } = Object, { iterator: le, toStringTag: tt } = Symbol, de = /* @__PURE__ */ ((e) => (t) => {
8
8
  const n = Dt.call(t);
9
9
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
10
- })(/* @__PURE__ */ Object.create(null)), B = (e) => (e = e.toLowerCase(), (t) => le(t) === e), de = (e) => (t) => typeof t === e, { isArray: V } = Array, J = de("undefined");
10
+ })(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => de(t) === e), fe = (e) => (t) => typeof t === e, { isArray: V } = Array, J = fe("undefined");
11
11
  function Q(e) {
12
12
  return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && O(e.constructor.isBuffer) && e.constructor.isBuffer(e);
13
13
  }
14
- const nt = B("ArrayBuffer");
14
+ const nt = P("ArrayBuffer");
15
15
  function vt(e) {
16
16
  let t;
17
17
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && nt(e.buffer), t;
18
18
  }
19
- const zt = de("string"), O = de("function"), rt = de("number"), Y = (e) => e !== null && typeof e == "object", qt = (e) => e === !0 || e === !1, oe = (e) => {
20
- if (le(e) !== "object")
19
+ const zt = fe("string"), O = fe("function"), rt = fe("number"), Y = (e) => e !== null && typeof e == "object", qt = (e) => e === !0 || e === !1, oe = (e) => {
20
+ if (de(e) !== "object")
21
21
  return !1;
22
22
  const t = Ne(e);
23
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(tt in e) && !(ue in e);
23
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(tt in e) && !(le in e);
24
24
  }, jt = (e) => {
25
25
  if (!Y(e) || Q(e))
26
26
  return !1;
@@ -29,11 +29,11 @@ const zt = de("string"), O = de("function"), rt = de("number"), Y = (e) => e !==
29
29
  } catch {
30
30
  return !1;
31
31
  }
32
- }, $t = B("Date"), Mt = B("File"), Ht = B("Blob"), Jt = B("FileList"), Vt = (e) => Y(e) && O(e.pipe), Wt = (e) => {
32
+ }, $t = P("Date"), Mt = P("File"), Ht = P("Blob"), Jt = P("FileList"), Vt = (e) => Y(e) && O(e.pipe), Wt = (e) => {
33
33
  let t;
34
- return e && (typeof FormData == "function" && e instanceof FormData || O(e.append) && ((t = le(e)) === "formdata" || // detect form-data instance
34
+ return e && (typeof FormData == "function" && e instanceof FormData || O(e.append) && ((t = de(e)) === "formdata" || // detect form-data instance
35
35
  t === "object" && O(e.toString) && e.toString() === "[object FormData]"));
36
- }, Kt = B("URLSearchParams"), [Xt, Gt, Qt, Yt] = ["ReadableStream", "Request", "Response", "Headers"].map(B), Zt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
36
+ }, Kt = P("URLSearchParams"), [Xt, Gt, Qt, Yt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), Zt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
37
37
  function Z(e, t, { allOwnKeys: n = !1 } = {}) {
38
38
  if (e === null || typeof e > "u")
39
39
  return;
@@ -62,10 +62,10 @@ function st(e, t) {
62
62
  return null;
63
63
  }
64
64
  const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ot = (e) => !J(e) && e !== q;
65
- function Se() {
65
+ function Ce() {
66
66
  const { caseless: e, skipUndefined: t } = ot(this) && this || {}, n = {}, r = (s, o) => {
67
67
  const i = e && st(n, o) || o;
68
- oe(n[i]) && oe(s) ? n[i] = Se(n[i], s) : oe(s) ? n[i] = Se({}, s) : V(s) ? n[i] = s.slice() : (!t || !J(s)) && (n[i] = s);
68
+ oe(n[i]) && oe(s) ? n[i] = Ce(n[i], s) : oe(s) ? n[i] = Ce({}, s) : V(s) ? n[i] = s.slice() : (!t || !J(s)) && (n[i] = s);
69
69
  };
70
70
  for (let s = 0, o = arguments.length; s < o; s++)
71
71
  arguments[s] && Z(arguments[s], r);
@@ -101,7 +101,7 @@ const en = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (s, o) => {
101
101
  n[t] = e[t];
102
102
  return n;
103
103
  }, an = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ne(Uint8Array)), cn = (e, t) => {
104
- const r = (e && e[ue]).call(e);
104
+ const r = (e && e[le]).call(e);
105
105
  let s;
106
106
  for (; (s = r.next()) && !s.done; ) {
107
107
  const o = s.value;
@@ -113,12 +113,12 @@ const en = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (s, o) => {
113
113
  for (; (n = e.exec(t)) !== null; )
114
114
  r.push(n);
115
115
  return r;
116
- }, ln = B("HTMLFormElement"), dn = (e) => e.toLowerCase().replace(
116
+ }, ln = P("HTMLFormElement"), dn = (e) => e.toLowerCase().replace(
117
117
  /[-_\s]([a-z\d])(\w*)/g,
118
118
  function(n, r, s) {
119
119
  return r.toUpperCase() + s;
120
120
  }
121
- ), ve = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), fn = B("RegExp"), it = (e, t) => {
121
+ ), ve = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), fn = P("RegExp"), it = (e, t) => {
122
122
  const n = Object.getOwnPropertyDescriptors(e), r = {};
123
123
  Z(n, (s, o) => {
124
124
  let i;
@@ -139,17 +139,17 @@ const en = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (s, o) => {
139
139
  });
140
140
  }
141
141
  });
142
- }, yn = (e, t) => {
142
+ }, hn = (e, t) => {
143
143
  const n = {}, r = (s) => {
144
144
  s.forEach((o) => {
145
145
  n[o] = !0;
146
146
  });
147
147
  };
148
148
  return V(e) ? r(e) : r(String(e).split(t)), n;
149
- }, hn = () => {
149
+ }, yn = () => {
150
150
  }, mn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
151
151
  function wn(e) {
152
- return !!(e && O(e.append) && e[tt] === "FormData" && e[ue]);
152
+ return !!(e && O(e.append) && e[tt] === "FormData" && e[le]);
153
153
  }
154
154
  const gn = (e) => {
155
155
  const t = new Array(10), n = (r, s) => {
@@ -170,14 +170,14 @@ const gn = (e) => {
170
170
  return r;
171
171
  };
172
172
  return n(e, 0);
173
- }, bn = B("AsyncFunction"), En = (e) => e && (Y(e) || O(e)) && O(e.then) && O(e.catch), at = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: s, data: o }) => {
173
+ }, bn = P("AsyncFunction"), En = (e) => e && (Y(e) || O(e)) && O(e.then) && O(e.catch), at = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: s, data: o }) => {
174
174
  s === q && o === n && r.length && r.shift()();
175
175
  }, !1), (s) => {
176
176
  r.push(s), q.postMessage(n, "*");
177
177
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
178
178
  typeof setImmediate == "function",
179
179
  O(q.postMessage)
180
- ), Sn = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || at, Cn = (e) => e != null && O(e[ue]), a = {
180
+ ), Sn = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || at, Cn = (e) => e != null && O(e[le]), a = {
181
181
  isArray: V,
182
182
  isArrayBuffer: nt,
183
183
  isBuffer: Q,
@@ -204,14 +204,14 @@ const gn = (e) => {
204
204
  isTypedArray: an,
205
205
  isFileList: Jt,
206
206
  forEach: Z,
207
- merge: Se,
207
+ merge: Ce,
208
208
  extend: en,
209
209
  trim: Zt,
210
210
  stripBOM: tn,
211
211
  inherits: nn,
212
212
  toFlatObject: rn,
213
- kindOf: le,
214
- kindOfTest: B,
213
+ kindOf: de,
214
+ kindOfTest: P,
215
215
  endsWith: sn,
216
216
  toArray: on,
217
217
  forEachEntry: cn,
@@ -222,9 +222,9 @@ const gn = (e) => {
222
222
  // an alias to avoid ESLint no-prototype-builtins detection
223
223
  reduceDescriptors: it,
224
224
  freezeMethods: pn,
225
- toObjectSet: yn,
225
+ toObjectSet: hn,
226
226
  toCamelCase: dn,
227
- noop: hn,
227
+ noop: yn,
228
228
  toFiniteNumber: mn,
229
229
  findKey: st,
230
230
  global: q,
@@ -290,7 +290,7 @@ m.from = (e, t, n, r, s, o) => {
290
290
  return m.call(i, c, f, n, r, s), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", o && Object.assign(i, o), i;
291
291
  };
292
292
  const An = null;
293
- function Ce(e) {
293
+ function Ae(e) {
294
294
  return a.isPlainObject(e) || a.isArray(e);
295
295
  }
296
296
  function lt(e) {
@@ -302,20 +302,20 @@ function ze(e, t, n) {
302
302
  }).join(n ? "." : "") : t;
303
303
  }
304
304
  function Rn(e) {
305
- return a.isArray(e) && !e.some(Ce);
305
+ return a.isArray(e) && !e.some(Ae);
306
306
  }
307
307
  const On = a.toFlatObject(a, {}, null, function(t) {
308
308
  return /^is[A-Z]/.test(t);
309
309
  });
310
- function fe(e, t, n) {
310
+ function pe(e, t, n) {
311
311
  if (!a.isObject(e))
312
312
  throw new TypeError("target must be an object");
313
313
  t = t || new FormData(), n = a.toFlatObject(n, {
314
314
  metaTokens: !0,
315
315
  dots: !1,
316
316
  indexes: !1
317
- }, !1, function(h, y) {
318
- return !a.isUndefined(y[h]);
317
+ }, !1, function(y, h) {
318
+ return !a.isUndefined(h[y]);
319
319
  });
320
320
  const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
321
321
  if (!a.isFunction(s))
@@ -330,39 +330,39 @@ function fe(e, t, n) {
330
330
  throw new m("Blob is not supported. Use a Buffer instead.");
331
331
  return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
332
332
  }
333
- function l(d, h, y) {
333
+ function l(d, y, h) {
334
334
  let b = d;
335
- if (d && !y && typeof d == "object") {
336
- if (a.endsWith(h, "{}"))
337
- h = r ? h : h.slice(0, -2), d = JSON.stringify(d);
338
- else if (a.isArray(d) && Rn(d) || (a.isFileList(d) || a.endsWith(h, "[]")) && (b = a.toArray(d)))
339
- return h = lt(h), b.forEach(function(E, R) {
335
+ if (d && !h && typeof d == "object") {
336
+ if (a.endsWith(y, "{}"))
337
+ y = r ? y : y.slice(0, -2), d = JSON.stringify(d);
338
+ else if (a.isArray(d) && Rn(d) || (a.isFileList(d) || a.endsWith(y, "[]")) && (b = a.toArray(d)))
339
+ return y = lt(y), b.forEach(function(E, R) {
340
340
  !(a.isUndefined(E) || E === null) && t.append(
341
341
  // eslint-disable-next-line no-nested-ternary
342
- i === !0 ? ze([h], R, o) : i === null ? h : h + "[]",
342
+ i === !0 ? ze([y], R, o) : i === null ? y : y + "[]",
343
343
  u(E)
344
344
  );
345
345
  }), !1;
346
346
  }
347
- return Ce(d) ? !0 : (t.append(ze(y, h, o), u(d)), !1);
347
+ return Ae(d) ? !0 : (t.append(ze(h, y, o), u(d)), !1);
348
348
  }
349
349
  const p = [], w = Object.assign(On, {
350
350
  defaultVisitor: l,
351
351
  convertValue: u,
352
- isVisitable: Ce
352
+ isVisitable: Ae
353
353
  });
354
- function S(d, h) {
354
+ function S(d, y) {
355
355
  if (!a.isUndefined(d)) {
356
356
  if (p.indexOf(d) !== -1)
357
- throw Error("Circular reference detected in " + h.join("."));
357
+ throw Error("Circular reference detected in " + y.join("."));
358
358
  p.push(d), a.forEach(d, function(b, T) {
359
359
  (!(a.isUndefined(b) || b === null) && s.call(
360
360
  t,
361
361
  b,
362
362
  a.isString(T) ? T.trim() : T,
363
- h,
363
+ y,
364
364
  w
365
- )) === !0 && S(b, h ? h.concat(T) : [T]);
365
+ )) === !0 && S(b, y ? y.concat(T) : [T]);
366
366
  }), p.pop();
367
367
  }
368
368
  }
@@ -385,7 +385,7 @@ function qe(e) {
385
385
  });
386
386
  }
387
387
  function xe(e, t) {
388
- this._pairs = [], e && fe(e, this, t);
388
+ this._pairs = [], e && pe(e, this, t);
389
389
  }
390
390
  const dt = xe.prototype;
391
391
  dt.append = function(t, n) {
@@ -475,7 +475,7 @@ const pt = {
475
475
  silentJSONParsing: !0,
476
476
  forcedJSONParsing: !0,
477
477
  clarifyTimeoutError: !1
478
- }, Tn = typeof URLSearchParams < "u" ? URLSearchParams : xe, Nn = typeof FormData < "u" ? FormData : null, xn = typeof Blob < "u" ? Blob : null, Bn = {
478
+ }, Tn = typeof URLSearchParams < "u" ? URLSearchParams : xe, Nn = typeof FormData < "u" ? FormData : null, xn = typeof Blob < "u" ? Blob : null, Pn = {
479
479
  isBrowser: !0,
480
480
  classes: {
481
481
  URLSearchParams: Tn,
@@ -483,20 +483,20 @@ const pt = {
483
483
  Blob: xn
484
484
  },
485
485
  protocols: ["http", "https", "file", "blob", "url", "data"]
486
- }, Be = typeof window < "u" && typeof document < "u", Ae = typeof navigator == "object" && navigator || void 0, Pn = Be && (!Ae || ["ReactNative", "NativeScript", "NS"].indexOf(Ae.product) < 0), Ln = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
487
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Fn = Be && window.location.href || "http://localhost", _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
486
+ }, Pe = typeof window < "u" && typeof document < "u", Re = typeof navigator == "object" && navigator || void 0, Bn = Pe && (!Re || ["ReactNative", "NativeScript", "NS"].indexOf(Re.product) < 0), Ln = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
487
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Fn = Pe && window.location.href || "http://localhost", _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
488
488
  __proto__: null,
489
- hasBrowserEnv: Be,
490
- hasStandardBrowserEnv: Pn,
489
+ hasBrowserEnv: Pe,
490
+ hasStandardBrowserEnv: Bn,
491
491
  hasStandardBrowserWebWorkerEnv: Ln,
492
- navigator: Ae,
492
+ navigator: Re,
493
493
  origin: Fn
494
494
  }, Symbol.toStringTag, { value: "Module" })), C = {
495
495
  ..._n,
496
- ...Bn
496
+ ...Pn
497
497
  };
498
498
  function kn(e, t) {
499
- return fe(e, new C.classes.URLSearchParams(), {
499
+ return pe(e, new C.classes.URLSearchParams(), {
500
500
  visitor: function(n, r, s, o) {
501
501
  return C.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
502
502
  },
@@ -515,7 +515,7 @@ function Dn(e) {
515
515
  o = n[r], t[o] = e[o];
516
516
  return t;
517
517
  }
518
- function yt(e) {
518
+ function ht(e) {
519
519
  function t(n, r, s, o) {
520
520
  let i = n[o++];
521
521
  if (i === "__proto__") return !0;
@@ -546,7 +546,7 @@ const ee = {
546
546
  transformRequest: [function(t, n) {
547
547
  const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
548
548
  if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
549
- return s ? JSON.stringify(yt(t)) : t;
549
+ return s ? JSON.stringify(ht(t)) : t;
550
550
  if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
551
551
  return t;
552
552
  if (a.isArrayBufferView(t))
@@ -559,7 +559,7 @@ const ee = {
559
559
  return kn(t, this.formSerializer).toString();
560
560
  if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
561
561
  const f = this.env && this.env.FormData;
562
- return fe(
562
+ return pe(
563
563
  c ? { "files[]": t } : t,
564
564
  f && new f(),
565
565
  this.formSerializer
@@ -649,7 +649,7 @@ function jn(e) {
649
649
  return t;
650
650
  }
651
651
  const $n = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
652
- function we(e, t, n, r, s) {
652
+ function ge(e, t, n, r, s) {
653
653
  if (a.isFunction(r))
654
654
  return r.call(this, t, n);
655
655
  if (s && (t = n), !!a.isString(t)) {
@@ -723,7 +723,7 @@ let I = class {
723
723
  has(t, n) {
724
724
  if (t = X(t), t) {
725
725
  const r = a.findKey(this, t);
726
- return !!(r && this[r] !== void 0 && (!n || we(this, this[r], r, n)));
726
+ return !!(r && this[r] !== void 0 && (!n || ge(this, this[r], r, n)));
727
727
  }
728
728
  return !1;
729
729
  }
@@ -733,7 +733,7 @@ let I = class {
733
733
  function o(i) {
734
734
  if (i = X(i), i) {
735
735
  const c = a.findKey(r, i);
736
- c && (!n || we(r, r[c], c, n)) && (delete r[c], s = !0);
736
+ c && (!n || ge(r, r[c], c, n)) && (delete r[c], s = !0);
737
737
  }
738
738
  }
739
739
  return a.isArray(t) ? t.forEach(o) : o(t), s;
@@ -743,7 +743,7 @@ let I = class {
743
743
  let r = n.length, s = !1;
744
744
  for (; r--; ) {
745
745
  const o = n[r];
746
- (!t || we(this, this[o], o, t, !0)) && (delete this[o], s = !0);
746
+ (!t || ge(this, this[o], o, t, !0)) && (delete this[o], s = !0);
747
747
  }
748
748
  return s;
749
749
  }
@@ -810,14 +810,14 @@ a.reduceDescriptors(I.prototype, ({ value: e }, t) => {
810
810
  };
811
811
  });
812
812
  a.freezeMethods(I);
813
- function ge(e, t) {
813
+ function be(e, t) {
814
814
  const n = this || ee, r = t || n, s = I.from(r.headers);
815
815
  let o = r.data;
816
816
  return a.forEach(e, function(c) {
817
817
  o = c.call(n, o, s.normalize(), t ? t.status : void 0);
818
818
  }), s.normalize(), o;
819
819
  }
820
- function ht(e) {
820
+ function yt(e) {
821
821
  return !!(e && e.__CANCEL__);
822
822
  }
823
823
  function W(e, t, n) {
@@ -1028,57 +1028,57 @@ const gt = (e) => {
1028
1028
  let o = s.data;
1029
1029
  const i = I.from(s.headers).normalize();
1030
1030
  let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, p, w, S, d;
1031
- function h() {
1031
+ function y() {
1032
1032
  S && S(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
1033
1033
  }
1034
- let y = new XMLHttpRequest();
1035
- y.open(s.method.toUpperCase(), s.url, !0), y.timeout = s.timeout;
1034
+ let h = new XMLHttpRequest();
1035
+ h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1036
1036
  function b() {
1037
- if (!y)
1037
+ if (!h)
1038
1038
  return;
1039
1039
  const E = I.from(
1040
- "getAllResponseHeaders" in y && y.getAllResponseHeaders()
1040
+ "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1041
1041
  ), x = {
1042
- data: !c || c === "text" || c === "json" ? y.responseText : y.response,
1043
- status: y.status,
1044
- statusText: y.statusText,
1042
+ data: !c || c === "text" || c === "json" ? h.responseText : h.response,
1043
+ status: h.status,
1044
+ statusText: h.statusText,
1045
1045
  headers: E,
1046
1046
  config: e,
1047
- request: y
1047
+ request: h
1048
1048
  };
1049
1049
  mt(function(N) {
1050
- n(N), h();
1050
+ n(N), y();
1051
1051
  }, function(N) {
1052
- r(N), h();
1053
- }, x), y = null;
1052
+ r(N), y();
1053
+ }, x), h = null;
1054
1054
  }
1055
- "onloadend" in y ? y.onloadend = b : y.onreadystatechange = function() {
1056
- !y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(b);
1057
- }, y.onabort = function() {
1058
- y && (r(new m("Request aborted", m.ECONNABORTED, e, y)), y = null);
1059
- }, y.onerror = function(R) {
1060
- const x = R && R.message ? R.message : "Network Error", v = new m(x, m.ERR_NETWORK, e, y);
1061
- v.event = R || null, r(v), y = null;
1062
- }, y.ontimeout = function() {
1055
+ "onloadend" in h ? h.onloadend = b : h.onreadystatechange = function() {
1056
+ !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(b);
1057
+ }, h.onabort = function() {
1058
+ h && (r(new m("Request aborted", m.ECONNABORTED, e, h)), h = null);
1059
+ }, h.onerror = function(R) {
1060
+ const x = R && R.message ? R.message : "Network Error", v = new m(x, m.ERR_NETWORK, e, h);
1061
+ v.event = R || null, r(v), h = null;
1062
+ }, h.ontimeout = function() {
1063
1063
  let R = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1064
1064
  const x = s.transitional || pt;
1065
1065
  s.timeoutErrorMessage && (R = s.timeoutErrorMessage), r(new m(
1066
1066
  R,
1067
1067
  x.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1068
1068
  e,
1069
- y
1070
- )), y = null;
1071
- }, o === void 0 && i.setContentType(null), "setRequestHeader" in y && a.forEach(i.toJSON(), function(R, x) {
1072
- y.setRequestHeader(x, R);
1073
- }), a.isUndefined(s.withCredentials) || (y.withCredentials = !!s.withCredentials), c && c !== "json" && (y.responseType = s.responseType), u && ([w, d] = ce(u, !0), y.addEventListener("progress", w)), f && y.upload && ([p, S] = ce(f), y.upload.addEventListener("progress", p), y.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (l = (E) => {
1074
- y && (r(!E || E.type ? new W(null, e, y) : E), y.abort(), y = null);
1069
+ h
1070
+ )), h = null;
1071
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(R, x) {
1072
+ h.setRequestHeader(x, R);
1073
+ }), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), u && ([w, d] = ce(u, !0), h.addEventListener("progress", w)), f && h.upload && ([p, S] = ce(f), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (l = (E) => {
1074
+ h && (r(!E || E.type ? new W(null, e, h) : E), h.abort(), h = null);
1075
1075
  }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
1076
1076
  const T = Jn(s.url);
1077
1077
  if (T && C.protocols.indexOf(T) === -1) {
1078
1078
  r(new m("Unsupported protocol " + T + ":", m.ERR_BAD_REQUEST, e));
1079
1079
  return;
1080
1080
  }
1081
- y.send(o || null);
1081
+ h.send(o || null);
1082
1082
  });
1083
1083
  }, er = (e, t) => {
1084
1084
  const { length: n } = e = e ? e.filter(Boolean) : [];
@@ -1179,25 +1179,25 @@ const gt = (e) => {
1179
1179
  const { fetch: t, Request: n, Response: r } = e, s = t ? se(t) : typeof fetch == "function", o = se(n), i = se(r);
1180
1180
  if (!s)
1181
1181
  return !1;
1182
- const c = s && se(Ke), f = s && (typeof Xe == "function" ? /* @__PURE__ */ ((d) => (h) => d.encode(h))(new Xe()) : async (d) => new Uint8Array(await new n(d).arrayBuffer())), u = o && c && Ge(() => {
1182
+ const c = s && se(Ke), f = s && (typeof Xe == "function" ? /* @__PURE__ */ ((d) => (y) => d.encode(y))(new Xe()) : async (d) => new Uint8Array(await new n(d).arrayBuffer())), u = o && c && Ge(() => {
1183
1183
  let d = !1;
1184
- const h = new n(C.origin, {
1184
+ const y = new n(C.origin, {
1185
1185
  body: new Ke(),
1186
1186
  method: "POST",
1187
1187
  get duplex() {
1188
1188
  return d = !0, "half";
1189
1189
  }
1190
1190
  }).headers.has("Content-Type");
1191
- return d && !h;
1191
+ return d && !y;
1192
1192
  }), l = i && c && Ge(() => a.isReadableStream(new r("").body)), p = {
1193
1193
  stream: l && ((d) => d.body)
1194
1194
  };
1195
1195
  s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
1196
- !p[d] && (p[d] = (h, y) => {
1197
- let b = h && h[d];
1196
+ !p[d] && (p[d] = (y, h) => {
1197
+ let b = y && y[d];
1198
1198
  if (b)
1199
- return b.call(h);
1200
- throw new m(`Response type '${d}' is not supported`, m.ERR_NOT_SUPPORT, y);
1199
+ return b.call(y);
1200
+ throw new m(`Response type '${d}' is not supported`, m.ERR_NOT_SUPPORT, h);
1201
1201
  });
1202
1202
  });
1203
1203
  const w = async (d) => {
@@ -1214,14 +1214,14 @@ const gt = (e) => {
1214
1214
  return d.byteLength;
1215
1215
  if (a.isURLSearchParams(d) && (d = d + ""), a.isString(d))
1216
1216
  return (await f(d)).byteLength;
1217
- }, S = async (d, h) => {
1218
- const y = a.toFiniteNumber(d.getContentLength());
1219
- return y ?? w(h);
1217
+ }, S = async (d, y) => {
1218
+ const h = a.toFiniteNumber(d.getContentLength());
1219
+ return h ?? w(y);
1220
1220
  };
1221
1221
  return async (d) => {
1222
1222
  let {
1223
- url: h,
1224
- method: y,
1223
+ url: y,
1224
+ method: h,
1225
1225
  data: b,
1226
1226
  signal: T,
1227
1227
  cancelToken: E,
@@ -1229,7 +1229,7 @@ const gt = (e) => {
1229
1229
  onDownloadProgress: x,
1230
1230
  onUploadProgress: v,
1231
1231
  responseType: N,
1232
- headers: he,
1232
+ headers: me,
1233
1233
  withCredentials: te = "same-origin",
1234
1234
  fetchOptions: Le
1235
1235
  } = gt(d), Fe = t || fetch;
@@ -1240,44 +1240,44 @@ const gt = (e) => {
1240
1240
  });
1241
1241
  let _e;
1242
1242
  try {
1243
- if (v && u && y !== "get" && y !== "head" && (_e = await S(he, b)) !== 0) {
1244
- let D = new n(h, {
1243
+ if (v && u && h !== "get" && h !== "head" && (_e = await S(me, b)) !== 0) {
1244
+ let D = new n(y, {
1245
1245
  method: "POST",
1246
1246
  body: b,
1247
1247
  duplex: "half"
1248
1248
  }), M;
1249
- if (a.isFormData(b) && (M = D.headers.get("content-type")) && he.setContentType(M), D.body) {
1250
- const [me, re] = Me(
1249
+ if (a.isFormData(b) && (M = D.headers.get("content-type")) && me.setContentType(M), D.body) {
1250
+ const [we, re] = Me(
1251
1251
  _e,
1252
1252
  ce(He(v))
1253
1253
  );
1254
- b = Ve(D.body, We, me, re);
1254
+ b = Ve(D.body, We, we, re);
1255
1255
  }
1256
1256
  }
1257
1257
  a.isString(te) || (te = te ? "include" : "omit");
1258
- const P = o && "credentials" in n.prototype, ke = {
1258
+ const B = o && "credentials" in n.prototype, ke = {
1259
1259
  ...Le,
1260
1260
  signal: ne,
1261
- method: y.toUpperCase(),
1262
- headers: he.normalize().toJSON(),
1261
+ method: h.toUpperCase(),
1262
+ headers: me.normalize().toJSON(),
1263
1263
  body: b,
1264
1264
  duplex: "half",
1265
- credentials: P ? te : void 0
1265
+ credentials: B ? te : void 0
1266
1266
  };
1267
- K = o && new n(h, ke);
1268
- let U = await (o ? Fe(K, Le) : Fe(h, ke));
1267
+ K = o && new n(y, ke);
1268
+ let U = await (o ? Fe(K, Le) : Fe(y, ke));
1269
1269
  const Ue = l && (N === "stream" || N === "response");
1270
1270
  if (l && (x || Ue && z)) {
1271
1271
  const D = {};
1272
1272
  ["status", "statusText", "headers"].forEach((De) => {
1273
1273
  D[De] = U[De];
1274
1274
  });
1275
- const M = a.toFiniteNumber(U.headers.get("content-length")), [me, re] = x && Me(
1275
+ const M = a.toFiniteNumber(U.headers.get("content-length")), [we, re] = x && Me(
1276
1276
  M,
1277
1277
  ce(He(x), !0)
1278
1278
  ) || [];
1279
1279
  U = new r(
1280
- Ve(U.body, We, me, () => {
1280
+ Ve(U.body, We, we, () => {
1281
1281
  re && re(), z && z();
1282
1282
  }),
1283
1283
  D
@@ -1295,13 +1295,13 @@ const gt = (e) => {
1295
1295
  request: K
1296
1296
  });
1297
1297
  });
1298
- } catch (P) {
1299
- throw z && z(), P && P.name === "TypeError" && /Load failed|fetch/i.test(P.message) ? Object.assign(
1298
+ } catch (B) {
1299
+ throw z && z(), B && B.name === "TypeError" && /Load failed|fetch/i.test(B.message) ? Object.assign(
1300
1300
  new m("Network Error", m.ERR_NETWORK, d, K),
1301
1301
  {
1302
- cause: P.cause || P
1302
+ cause: B.cause || B
1303
1303
  }
1304
- ) : m.from(P, P && P.code, d, K);
1304
+ ) : m.from(B, B && B.code, d, K);
1305
1305
  }
1306
1306
  };
1307
1307
  }, ir = /* @__PURE__ */ new Map(), bt = (e) => {
@@ -1317,14 +1317,14 @@ const gt = (e) => {
1317
1317
  return u;
1318
1318
  };
1319
1319
  bt();
1320
- const Pe = {
1320
+ const Be = {
1321
1321
  http: An,
1322
1322
  xhr: Zn,
1323
1323
  fetch: {
1324
1324
  get: bt
1325
1325
  }
1326
1326
  };
1327
- a.forEach(Pe, (e, t) => {
1327
+ a.forEach(Be, (e, t) => {
1328
1328
  if (e) {
1329
1329
  try {
1330
1330
  Object.defineProperty(e, "name", { value: t });
@@ -1342,7 +1342,7 @@ function cr(e, t) {
1342
1342
  for (let i = 0; i < n; i++) {
1343
1343
  r = e[i];
1344
1344
  let c;
1345
- if (s = r, !ar(r) && (s = Pe[(c = String(r)).toLowerCase()], s === void 0))
1345
+ if (s = r, !ar(r) && (s = Be[(c = String(r)).toLowerCase()], s === void 0))
1346
1346
  throw new m(`Unknown adapter '${c}'`);
1347
1347
  if (s && (a.isFunction(s) || (s = s.get(t))))
1348
1348
  break;
@@ -1372,38 +1372,38 @@ const Et = {
1372
1372
  * Exposes all known adapters
1373
1373
  * @type {Object<string, Function|Object>}
1374
1374
  */
1375
- adapters: Pe
1375
+ adapters: Be
1376
1376
  };
1377
- function be(e) {
1377
+ function Ee(e) {
1378
1378
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1379
1379
  throw new W(null, e);
1380
1380
  }
1381
1381
  function Ye(e) {
1382
- return be(e), e.headers = I.from(e.headers), e.data = ge.call(
1382
+ return Ee(e), e.headers = I.from(e.headers), e.data = be.call(
1383
1383
  e,
1384
1384
  e.transformRequest
1385
1385
  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Et.getAdapter(e.adapter || ee.adapter, e)(e).then(function(r) {
1386
- return be(e), r.data = ge.call(
1386
+ return Ee(e), r.data = be.call(
1387
1387
  e,
1388
1388
  e.transformResponse,
1389
1389
  r
1390
1390
  ), r.headers = I.from(r.headers), r;
1391
1391
  }, function(r) {
1392
- return ht(r) || (be(e), r && r.response && (r.response.data = ge.call(
1392
+ return yt(r) || (Ee(e), r && r.response && (r.response.data = be.call(
1393
1393
  e,
1394
1394
  e.transformResponse,
1395
1395
  r.response
1396
1396
  ), r.response.headers = I.from(r.response.headers))), Promise.reject(r);
1397
1397
  });
1398
1398
  }
1399
- const St = "1.13.2", pe = {};
1399
+ const St = "1.13.2", he = {};
1400
1400
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1401
- pe[e] = function(r) {
1401
+ he[e] = function(r) {
1402
1402
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1403
1403
  };
1404
1404
  });
1405
1405
  const Ze = {};
1406
- pe.transitional = function(t, n, r) {
1406
+ he.transitional = function(t, n, r) {
1407
1407
  function s(o, i) {
1408
1408
  return "[Axios v" + St + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1409
1409
  }
@@ -1421,7 +1421,7 @@ pe.transitional = function(t, n, r) {
1421
1421
  )), t ? t(o, i, c) : !0;
1422
1422
  };
1423
1423
  };
1424
- pe.spelling = function(t) {
1424
+ he.spelling = function(t) {
1425
1425
  return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
1426
1426
  };
1427
1427
  function ur(e, t, n) {
@@ -1443,7 +1443,7 @@ function ur(e, t, n) {
1443
1443
  }
1444
1444
  const ae = {
1445
1445
  assertOptions: ur,
1446
- validators: pe
1446
+ validators: he
1447
1447
  }, L = ae.validators;
1448
1448
  let j = class {
1449
1449
  constructor(t) {
@@ -1505,12 +1505,12 @@ let j = class {
1505
1505
  ), n.headers = I.concat(i, o);
1506
1506
  const c = [];
1507
1507
  let f = !0;
1508
- this.interceptors.request.forEach(function(h) {
1509
- typeof h.runWhen == "function" && h.runWhen(n) === !1 || (f = f && h.synchronous, c.unshift(h.fulfilled, h.rejected));
1508
+ this.interceptors.request.forEach(function(y) {
1509
+ typeof y.runWhen == "function" && y.runWhen(n) === !1 || (f = f && y.synchronous, c.unshift(y.fulfilled, y.rejected));
1510
1510
  });
1511
1511
  const u = [];
1512
- this.interceptors.response.forEach(function(h) {
1513
- u.push(h.fulfilled, h.rejected);
1512
+ this.interceptors.response.forEach(function(y) {
1513
+ u.push(y.fulfilled, y.rejected);
1514
1514
  });
1515
1515
  let l, p = 0, w;
1516
1516
  if (!f) {
@@ -1522,11 +1522,11 @@ let j = class {
1522
1522
  w = c.length;
1523
1523
  let S = n;
1524
1524
  for (; p < w; ) {
1525
- const d = c[p++], h = c[p++];
1525
+ const d = c[p++], y = c[p++];
1526
1526
  try {
1527
1527
  S = d(S);
1528
- } catch (y) {
1529
- h.call(this, y);
1528
+ } catch (h) {
1529
+ y.call(this, h);
1530
1530
  break;
1531
1531
  }
1532
1532
  }
@@ -1650,7 +1650,7 @@ function dr(e) {
1650
1650
  function fr(e) {
1651
1651
  return a.isObject(e) && e.isAxiosError === !0;
1652
1652
  }
1653
- const Re = {
1653
+ const Oe = {
1654
1654
  Continue: 100,
1655
1655
  SwitchingProtocols: 101,
1656
1656
  Processing: 102,
@@ -1721,8 +1721,8 @@ const Re = {
1721
1721
  SslHandshakeFailed: 525,
1722
1722
  InvalidSslCertificate: 526
1723
1723
  };
1724
- Object.entries(Re).forEach(([e, t]) => {
1725
- Re[t] = e;
1724
+ Object.entries(Oe).forEach(([e, t]) => {
1725
+ Oe[t] = e;
1726
1726
  });
1727
1727
  function At(e) {
1728
1728
  const t = new j(e), n = et(j.prototype.request, t);
@@ -1734,9 +1734,9 @@ const g = At(ee);
1734
1734
  g.Axios = j;
1735
1735
  g.CanceledError = W;
1736
1736
  g.CancelToken = lr;
1737
- g.isCancel = ht;
1737
+ g.isCancel = yt;
1738
1738
  g.VERSION = St;
1739
- g.toFormData = fe;
1739
+ g.toFormData = pe;
1740
1740
  g.AxiosError = m;
1741
1741
  g.Cancel = g.CanceledError;
1742
1742
  g.all = function(t) {
@@ -1746,38 +1746,38 @@ g.spread = dr;
1746
1746
  g.isAxiosError = fr;
1747
1747
  g.mergeConfig = $;
1748
1748
  g.AxiosHeaders = I;
1749
- g.formToJSON = (e) => yt(a.isHTMLForm(e) ? new FormData(e) : e);
1749
+ g.formToJSON = (e) => ht(a.isHTMLForm(e) ? new FormData(e) : e);
1750
1750
  g.getAdapter = Et.getAdapter;
1751
- g.HttpStatusCode = Re;
1751
+ g.HttpStatusCode = Oe;
1752
1752
  g.default = g;
1753
1753
  const {
1754
- Axios: Nr,
1755
- AxiosError: xr,
1754
+ Axios: xr,
1755
+ AxiosError: Pr,
1756
1756
  CanceledError: Br,
1757
- isCancel: Pr,
1758
- CancelToken: Lr,
1759
- VERSION: Fr,
1760
- all: _r,
1761
- Cancel: kr,
1762
- isAxiosError: Ur,
1763
- spread: Dr,
1764
- toFormData: vr,
1765
- AxiosHeaders: zr,
1766
- HttpStatusCode: qr,
1767
- formToJSON: jr,
1768
- getAdapter: $r,
1769
- mergeConfig: Mr
1770
- } = g, Oe = g.create({
1757
+ isCancel: Lr,
1758
+ CancelToken: Fr,
1759
+ VERSION: _r,
1760
+ all: kr,
1761
+ Cancel: Ur,
1762
+ isAxiosError: Dr,
1763
+ spread: vr,
1764
+ toFormData: zr,
1765
+ AxiosHeaders: qr,
1766
+ HttpStatusCode: jr,
1767
+ formToJSON: $r,
1768
+ getAdapter: Mr,
1769
+ mergeConfig: Hr
1770
+ } = g, Ie = g.create({
1771
1771
  timeout: 15e3
1772
1772
  // withCredentials: true,
1773
1773
  });
1774
- Oe.interceptors.response.use(
1774
+ Ie.interceptors.response.use(
1775
1775
  (e) => e,
1776
1776
  (e) => Promise.reject(e)
1777
1777
  );
1778
1778
  const Rt = {
1779
1779
  async get(e, t) {
1780
- const n = await Oe.get(e, {
1780
+ const n = await Ie.get(e, {
1781
1781
  params: t?.params,
1782
1782
  headers: t?.headers
1783
1783
  });
@@ -1788,7 +1788,7 @@ const Rt = {
1788
1788
  };
1789
1789
  },
1790
1790
  async post(e, t, n) {
1791
- const r = await Oe.post(e, t, {
1791
+ const r = await Ie.post(e, t, {
1792
1792
  params: n?.params,
1793
1793
  headers: n?.headers
1794
1794
  });
@@ -1828,19 +1828,22 @@ function pr(e) {
1828
1828
  };
1829
1829
  }
1830
1830
  let G = Rt;
1831
- function Hr(e, t) {
1831
+ function Jr(e, t) {
1832
1832
  return e === "fetch" ? G = pr(t?.fetch ?? fetch) : G = Rt, G;
1833
1833
  }
1834
1834
  const Ot = {
1835
1835
  get: (...e) => G.get(...e),
1836
1836
  post: (...e) => G.post(...e)
1837
- };
1838
- let Ie = {
1839
- basePath: "https://cloudapi-sit2.jctrans.net.cn/system/dms/fr/aggr/getLocationOptions"
1840
- };
1841
- const Jr = (e) => {
1842
- Ie = { ...Ie, ...e };
1843
- }, It = () => Ie, Tt = () => {
1837
+ }, ue = {
1838
+ prefixPath: "https://cloudapi-sit2.jctrans.net.cn",
1839
+ searchPath: "/system/dms/fr/aggr/getLocationOptions"
1840
+ }, hr = {
1841
+ get basePath() {
1842
+ return ue.prefixPath + ue.searchPath;
1843
+ }
1844
+ }, Vr = (e) => {
1845
+ e && (e.prefixPath !== void 0 && (ue.prefixPath = e.prefixPath), e.searchPath !== void 0 && (ue.searchPath = e.searchPath));
1846
+ }, It = () => hr, Tt = () => {
1844
1847
  try {
1845
1848
  const n = globalThis.useCookie;
1846
1849
  if (typeof n == "function") {
@@ -1860,14 +1863,14 @@ const Jr = (e) => {
1860
1863
  t = "";
1861
1864
  }
1862
1865
  return /jc-language=en-US/i.test(t) || /jc-language=en/i.test(t);
1863
- }, yr = () => It().basePath, hr = {
1866
+ }, yr = () => It().basePath, mr = {
1864
1867
  Continent: "continentId",
1865
1868
  Country: "countryId",
1866
1869
  City: "cityId",
1867
1870
  Province: "provinceId",
1868
1871
  Seaport: "seaportId",
1869
1872
  Airport: "airportId"
1870
- }, mr = [
1873
+ }, wr = [
1871
1874
  "City",
1872
1875
  "Seaport",
1873
1876
  "Airport",
@@ -1877,11 +1880,11 @@ const Jr = (e) => {
1877
1880
  function H(e, t) {
1878
1881
  return e === "allCityByCountryId" ? Array.isArray(t) ? String(t[0]) : String(t) : Array.isArray(t) ? JSON.stringify(t) : JSON.stringify([Number(t)]);
1879
1882
  }
1880
- function wr(e) {
1883
+ function gr(e) {
1881
1884
  const t = [];
1882
1885
  if (e.ids)
1883
1886
  for (const n of e.ids) {
1884
- const r = hr[n.type];
1887
+ const r = mr[n.type];
1885
1888
  t.push({
1886
1889
  name: r,
1887
1890
  val: H(r, n.ids)
@@ -1904,9 +1907,9 @@ function k(e) {
1904
1907
  size: e.size ?? 10,
1905
1908
  level: e.level,
1906
1909
  searchContent: e.keyword ?? void 0,
1907
- displayInfo: e.displayInfo ?? mr,
1910
+ displayInfo: e.displayInfo ?? wr,
1908
1911
  sort: e.sort
1909
- }, n = wr({
1912
+ }, n = gr({
1910
1913
  ids: e.ids,
1911
1914
  scope: e.scope
1912
1915
  });
@@ -1914,7 +1917,7 @@ function k(e) {
1914
1917
  t[r] === void 0 && delete t[r];
1915
1918
  }), t;
1916
1919
  }
1917
- function gr(e, t, n) {
1920
+ function br(e, t, n) {
1918
1921
  const r = Tt(), s = (u, l) => {
1919
1922
  if (!u) return "";
1920
1923
  const p = u.nameCn ?? u[`${l.toLowerCase()}NameCn`] ?? u.name, w = u.nameEn ?? u[`${l.toLowerCase()}NameEn`];
@@ -1940,7 +1943,7 @@ function F(e = [], t = []) {
1940
1943
  if (!o || !t.includes(i)) return;
1941
1944
  const f = o.id ?? o[i.toLowerCase() + "Id"] ?? null;
1942
1945
  if (f == null) return;
1943
- const u = o.nameCn ?? o[`${i.toLowerCase()}NameCn`] ?? o.name ?? void 0, l = o.nameEn ?? o[`${i.toLowerCase()}NameEn`] ?? void 0, p = gr(o, i, c) || u || l || "";
1946
+ const u = o.nameCn ?? o[`${i.toLowerCase()}NameCn`] ?? o.name ?? void 0, l = o.nameEn ?? o[`${i.toLowerCase()}NameEn`] ?? void 0, p = br(o, i, c) || u || l || "";
1944
1947
  n.push({
1945
1948
  id: f,
1946
1949
  type: i,
@@ -2019,7 +2022,7 @@ async function Nt(e) {
2019
2022
  sort: e.sort
2020
2023
  });
2021
2024
  }
2022
- async function br(e, t) {
2025
+ async function Er(e, t) {
2023
2026
  const n = Array.isArray(t) ? t : [t], r = [e], s = k({
2024
2027
  displayInfo: r,
2025
2028
  ids: [{ type: e, ids: n }]
@@ -2029,10 +2032,10 @@ async function br(e, t) {
2029
2032
  r
2030
2033
  ).filter((c) => c.type === e);
2031
2034
  }
2032
- async function Vr(e, t) {
2033
- return (await br(e, [t]))[0] ?? null;
2034
- }
2035
2035
  async function Wr(e, t) {
2036
+ return (await Er(e, [t]))[0] ?? null;
2037
+ }
2038
+ async function Kr(e, t) {
2036
2039
  const n = ["City"], r = k({
2037
2040
  displayInfo: n,
2038
2041
  page: t?.page ?? 1,
@@ -2049,7 +2052,7 @@ async function Wr(e, t) {
2049
2052
  records: F(s.records || [], n)
2050
2053
  };
2051
2054
  }
2052
- async function Kr(e, t, n) {
2055
+ async function Xr(e, t, n) {
2053
2056
  if (!t || t.length === 0)
2054
2057
  throw new Error("childTypes 必须至少包含一个:Seaport | Airport");
2055
2058
  const r = t, s = k({
@@ -2068,7 +2071,7 @@ async function Kr(e, t, n) {
2068
2071
  records: F(o.records || [], r)
2069
2072
  };
2070
2073
  }
2071
- function Xr(e, t) {
2074
+ function Gr(e, t) {
2072
2075
  return Nt({
2073
2076
  keyword: e,
2074
2077
  types: ["Country"],
@@ -2076,7 +2079,7 @@ function Xr(e, t) {
2076
2079
  size: t?.size
2077
2080
  });
2078
2081
  }
2079
- function Gr(e, t) {
2082
+ function Qr(e, t) {
2080
2083
  return t?.countryId ? ye({
2081
2084
  keyword: e,
2082
2085
  displayInfo: ["City"],
@@ -2090,7 +2093,7 @@ function Gr(e, t) {
2090
2093
  size: t?.size
2091
2094
  });
2092
2095
  }
2093
- function Qr(e, t) {
2096
+ function Yr(e, t) {
2094
2097
  return ye({
2095
2098
  keyword: e,
2096
2099
  displayInfo: ["Seaport"],
@@ -2099,7 +2102,7 @@ function Qr(e, t) {
2099
2102
  size: t?.size
2100
2103
  });
2101
2104
  }
2102
- function Yr(e, t) {
2105
+ function Zr(e, t) {
2103
2106
  return ye({
2104
2107
  keyword: e,
2105
2108
  displayInfo: ["Airport"],
@@ -2108,7 +2111,7 @@ function Yr(e, t) {
2108
2111
  size: t?.size
2109
2112
  });
2110
2113
  }
2111
- async function Zr(e = {}) {
2114
+ async function es(e = {}) {
2112
2115
  const t = ["Continent"], n = await _({
2113
2116
  current: e.page ?? 1,
2114
2117
  size: e.size ?? 10,
@@ -2120,7 +2123,7 @@ async function Zr(e = {}) {
2120
2123
  records: F(n.records || [], t)
2121
2124
  };
2122
2125
  }
2123
- async function es(e = {}) {
2126
+ async function ts(e = {}) {
2124
2127
  const t = ["Country"], n = k({
2125
2128
  displayInfo: t,
2126
2129
  page: e.page ?? 1,
@@ -2132,7 +2135,7 @@ async function es(e = {}) {
2132
2135
  records: F(r.records || [], t)
2133
2136
  };
2134
2137
  }
2135
- async function ts(e = {}) {
2138
+ async function ns(e = {}) {
2136
2139
  const t = ["City"], n = k({
2137
2140
  displayInfo: t,
2138
2141
  page: e.page ?? 1,
@@ -2145,7 +2148,7 @@ async function ts(e = {}) {
2145
2148
  records: F(r.records || [], t)
2146
2149
  };
2147
2150
  }
2148
- async function ns(e = {}) {
2151
+ async function rs(e = {}) {
2149
2152
  const t = ["Province"], n = k({
2150
2153
  displayInfo: t,
2151
2154
  page: e.page ?? 1,
@@ -2158,7 +2161,7 @@ async function ns(e = {}) {
2158
2161
  records: F(r.records || [], t)
2159
2162
  };
2160
2163
  }
2161
- async function rs(e = {}) {
2164
+ async function ss(e = {}) {
2162
2165
  const t = ["Seaport"], n = k({
2163
2166
  displayInfo: t,
2164
2167
  page: e.page ?? 1,
@@ -2171,7 +2174,7 @@ async function rs(e = {}) {
2171
2174
  records: F(r.records || [], t)
2172
2175
  };
2173
2176
  }
2174
- async function ss(e = {}) {
2177
+ async function os(e = {}) {
2175
2178
  const t = ["Airport"], n = k({
2176
2179
  displayInfo: t,
2177
2180
  page: e.page ?? 1,
@@ -2184,7 +2187,7 @@ async function ss(e = {}) {
2184
2187
  records: F(r.records || [], t)
2185
2188
  };
2186
2189
  }
2187
- const Er = "2.0", Sr = () => It().basePath;
2190
+ const Sr = "2.0", Cr = () => It().basePath;
2188
2191
  function xt(e) {
2189
2192
  let t = e.type;
2190
2193
  return t === "Country" && e.region && !e.country ? {
@@ -2195,7 +2198,7 @@ function xt(e) {
2195
2198
  finalType: t
2196
2199
  };
2197
2200
  }
2198
- function Ee(e, t) {
2201
+ function Se(e, t) {
2199
2202
  const { target: n, finalType: r } = xt(e), s = (u) => {
2200
2203
  if (!u) return "";
2201
2204
  const l = u.nameCn || u.displayNameCn || u.name || "", p = u.nameEn || u.displayNameEn || u.nameEnShow || "";
@@ -2207,7 +2210,7 @@ function Ee(e, t) {
2207
2210
  }
2208
2211
  return ["City", "Province"].includes(r) && c ? `${o} (${c})` : o;
2209
2212
  }
2210
- function Cr(e = []) {
2213
+ function Ar(e = []) {
2211
2214
  return e.map((t) => {
2212
2215
  const { target: n, finalType: r } = xt(t);
2213
2216
  return {
@@ -2216,9 +2219,9 @@ function Cr(e = []) {
2216
2219
  type: r,
2217
2220
  nameCn: n.nameCn || n.name,
2218
2221
  nameEn: n.nameEn || n.nameEnShow,
2219
- display: Ee(t, Tt()),
2220
- displayEn: Ee(t, !0),
2221
- displayCn: Ee(t, !1),
2222
+ display: Se(t, Tt()),
2223
+ displayEn: Se(t, !0),
2224
+ displayCn: Se(t, !1),
2222
2225
  // continent: rec.continent,
2223
2226
  // 统一输出时,将 region 映射到 country 字段或保留原样,取决于业务需求
2224
2227
  // country: rec.country || rec.region,
@@ -2235,13 +2238,13 @@ async function A(e) {
2235
2238
  size: 10,
2236
2239
  // 默认每页 10 条
2237
2240
  ...e
2238
- }, r = (await Ot.post(Sr(), t)).data.data || {};
2241
+ }, r = (await Ot.post(Cr(), t)).data.data || {};
2239
2242
  return {
2240
2243
  ...r,
2241
- records: Cr(r.records || [])
2244
+ records: Ar(r.records || [])
2242
2245
  };
2243
2246
  }
2244
- const Bt = {
2247
+ const Pt = {
2245
2248
  searchByName: (e) => A({
2246
2249
  searchContent: e.keyword,
2247
2250
  searchMode: e.searchMode,
@@ -2249,7 +2252,7 @@ const Bt = {
2249
2252
  displayInfo: ["Country"]
2250
2253
  }),
2251
2254
  getByIds: (e) => A({ countryIds: e, displayInfo: ["Country"] })
2252
- }, Pt = {
2255
+ }, Bt = {
2253
2256
  searchByName: (e) => A({
2254
2257
  searchContent: e.keyword,
2255
2258
  searchMode: e.searchMode,
@@ -2285,19 +2288,19 @@ const Bt = {
2285
2288
  getByIds: (e) => A({ airportIds: e, displayInfo: ["Airport"] })
2286
2289
  }, _t = {
2287
2290
  getByIds: (e) => A({ wharfIds: e, displayInfo: ["Wharf"] })
2288
- }, Ar = (e) => A({
2291
+ }, Rr = (e) => A({
2289
2292
  searchContent: e.keyword,
2290
2293
  ...e
2291
2294
  // displayInfo: params.displayInfo,
2292
2295
  // current: params.current,
2293
2296
  // size: params.size,
2294
- }), Rr = (e, t) => {
2297
+ }), Or = (e, t) => {
2295
2298
  const n = Array.isArray(e) ? e : [e];
2296
2299
  switch (t) {
2297
2300
  case "Country":
2298
- return Bt.getByIds(n);
2299
- case "Region":
2300
2301
  return Pt.getByIds(n);
2302
+ case "Region":
2303
+ return Bt.getByIds(n);
2301
2304
  case "City":
2302
2305
  return Te.getByIds(n);
2303
2306
  case "Seaport":
@@ -2312,12 +2315,12 @@ const Bt = {
2312
2315
  displayInfo: [t]
2313
2316
  });
2314
2317
  }
2315
- }, os = {
2316
- SEARCH_VERSION: Er,
2317
- searchByName: Ar,
2318
- searchByIdWithType: Rr,
2319
- country: Bt,
2320
- region: Pt,
2318
+ }, is = {
2319
+ SEARCH_VERSION: Sr,
2320
+ searchByName: Rr,
2321
+ searchByIdWithType: Or,
2322
+ country: Pt,
2323
+ region: Bt,
2321
2324
  city: Te,
2322
2325
  seaport: Lt,
2323
2326
  airport: Ft,
@@ -2326,33 +2329,34 @@ const Bt = {
2326
2329
  getCitiesByCountry: Te.getCitiesByCountry,
2327
2330
  /** 获取某个城市下的子实体(港口、机场、码头等) */
2328
2331
  getChildrenByCity: (e, t, n) => A({ cityIds: [e], displayInfo: t, ...n })
2329
- }, is = {
2332
+ }, as = {
2330
2333
  Open: "GLOBAL_MODAL_OPEN",
2331
2334
  Close: "GLOBAL_MODAL_CLOSE",
2332
2335
  Submit: "GLOBAL_MODAL_SUBMIT"
2333
- }, as = Ut();
2336
+ }, cs = Ut();
2334
2337
  export {
2335
- is as MODAL_ACTION,
2336
- Hr as createRequest,
2337
- as as emitter,
2338
- ss as getAirport,
2339
- Vr as getById,
2340
- br as getByIds,
2341
- Kr as getChildrenByCity,
2342
- Wr as getCitiesByCountry,
2343
- ts as getCity,
2344
- Zr as getContinent,
2345
- es as getCountry,
2338
+ as as MODAL_ACTION,
2339
+ Jr as createRequest,
2340
+ hr as currentConfig,
2341
+ cs as emitter,
2342
+ os as getAirport,
2343
+ Wr as getById,
2344
+ Er as getByIds,
2345
+ Xr as getChildrenByCity,
2346
+ Kr as getCitiesByCountry,
2347
+ ns as getCity,
2348
+ es as getContinent,
2349
+ ts as getCountry,
2346
2350
  Tt as getIsEn,
2347
- ns as getProvince,
2348
- rs as getSeaport,
2351
+ rs as getProvince,
2352
+ ss as getSeaport,
2349
2353
  It as getSharedConfig,
2350
- Jr as initSharedConfig,
2351
- os as locationSearchV2,
2354
+ Vr as initSharedConfig,
2355
+ is as locationSearchV2,
2352
2356
  ye as search,
2353
- Yr as searchAirportByName,
2357
+ Zr as searchAirportByName,
2354
2358
  Nt as searchByName,
2355
- Gr as searchCityByName,
2356
- Xr as searchCountryByName,
2357
- Qr as searchSeaportByName
2359
+ Qr as searchCityByName,
2360
+ Gr as searchCountryByName,
2361
+ Yr as searchSeaportByName
2358
2362
  };