@ysolve/ocity-heritage-visualizer 1.1.3 → 2.0.0
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.
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsxs as
|
|
5
|
-
import { useState as
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
const n =
|
|
1
|
+
var sn = Object.defineProperty;
|
|
2
|
+
var on = (e, t, n) => t in e ? sn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Be = (e, t, n) => on(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { jsxs as j, jsx as g, Fragment as rt } from "react/jsx-runtime";
|
|
5
|
+
import { useState as C, useRef as U, useEffect as z } from "react";
|
|
6
|
+
const an = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_DEBUG_MODE: "false", VITE_DEFAULT_IMAGE_URL: "https://o-city.org/assets/NO_AVAILABLE_IMG-4d02b370.png", VITE_GOOGLE_TRANSLATE_BASE: "https://translate.googleapis.com/translate_a/single", VITE_IMAGE_BASE_URL: "https://eu2.contabostorage.com/7fb97413b6c243adb4347dafa02551a9:ocity/heritage/images/", VITE_QWEN_TTS_API_URL: "http://localhost:3010" };
|
|
7
|
+
function pe(e, t = !0) {
|
|
8
|
+
const n = an[e];
|
|
9
9
|
if (!n && t)
|
|
10
10
|
throw new Error(`❌ Missing required env variable: ${e}`);
|
|
11
11
|
return n ?? "";
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const be = {
|
|
14
14
|
NODE_ENV: "production",
|
|
15
|
-
QWEN_TTS_API_URL:
|
|
15
|
+
QWEN_TTS_API_URL: pe("VITE_QWEN_TTS_API_URL"),
|
|
16
16
|
DEBUG_MODE: !1,
|
|
17
|
-
GOOGLE_TRANSLATE_BASE:
|
|
18
|
-
IMAGE_BASE_URL:
|
|
19
|
-
DEFAULT_IMAGE_URL:
|
|
17
|
+
GOOGLE_TRANSLATE_BASE: pe("VITE_GOOGLE_TRANSLATE_BASE"),
|
|
18
|
+
IMAGE_BASE_URL: pe("VITE_IMAGE_BASE_URL"),
|
|
19
|
+
DEFAULT_IMAGE_URL: pe("VITE_DEFAULT_IMAGE_URL")
|
|
20
20
|
};
|
|
21
|
-
async function
|
|
21
|
+
async function st(e, t) {
|
|
22
22
|
if (!e.trim()) return e;
|
|
23
23
|
try {
|
|
24
|
-
const n = `${
|
|
24
|
+
const n = `${be.GOOGLE_TRANSLATE_BASE}?client=gtx&sl=auto&tl=${t}&dt=t&q=${encodeURIComponent(e)}`, r = await fetch(n);
|
|
25
25
|
if (!r.ok)
|
|
26
26
|
throw new Error(`Error en la traducción: ${r.status}`);
|
|
27
27
|
const s = await r.json();
|
|
@@ -30,72 +30,72 @@ async function Xe(e, t) {
|
|
|
30
30
|
return console.error("Error al traducir:", n), e;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function qe(e) {
|
|
34
34
|
return new Promise((t, n) => {
|
|
35
35
|
e.oncomplete = e.onsuccess = () => t(e.result), e.onabort = e.onerror = () => n(e.error);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function cn(e, t) {
|
|
39
39
|
let n;
|
|
40
40
|
const r = () => {
|
|
41
41
|
if (n)
|
|
42
42
|
return n;
|
|
43
43
|
const s = indexedDB.open(e);
|
|
44
|
-
return s.onupgradeneeded = () => s.result.createObjectStore(t), n =
|
|
44
|
+
return s.onupgradeneeded = () => s.result.createObjectStore(t), n = qe(s), n.then((o) => {
|
|
45
45
|
o.onclose = () => n = void 0;
|
|
46
46
|
}, () => {
|
|
47
47
|
}), n;
|
|
48
48
|
};
|
|
49
49
|
return (s, o) => r().then((i) => o(i.transaction(t, s).objectStore(t)));
|
|
50
50
|
}
|
|
51
|
-
let
|
|
52
|
-
function
|
|
53
|
-
return
|
|
51
|
+
let Pe;
|
|
52
|
+
function Et() {
|
|
53
|
+
return Pe || (Pe = cn("keyval-store", "keyval")), Pe;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return t("readonly", (n) =>
|
|
55
|
+
function ln(e, t = Et()) {
|
|
56
|
+
return t("readonly", (n) => qe(n.get(e)));
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
return n("readwrite", (r) => (r.put(t, e),
|
|
58
|
+
function un(e, t, n = Et()) {
|
|
59
|
+
return n("readwrite", (r) => (r.put(t, e), qe(r.transaction)));
|
|
60
60
|
}
|
|
61
|
-
async function
|
|
62
|
-
return await
|
|
61
|
+
async function dn(e) {
|
|
62
|
+
return await ln(e) ?? null;
|
|
63
63
|
}
|
|
64
|
-
async function
|
|
65
|
-
await
|
|
64
|
+
async function fn(e, t) {
|
|
65
|
+
await un(e, t);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function bt(e, t) {
|
|
68
68
|
return function() {
|
|
69
69
|
return e.apply(t, arguments);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
const { toString:
|
|
73
|
-
const n =
|
|
72
|
+
const { toString: hn } = Object.prototype, { getPrototypeOf: He } = Object, { iterator: Te, toStringTag: Tt } = Symbol, Se = /* @__PURE__ */ ((e) => (t) => {
|
|
73
|
+
const n = hn.call(t);
|
|
74
74
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
75
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
76
|
-
function
|
|
77
|
-
return e !== null && !
|
|
75
|
+
})(/* @__PURE__ */ Object.create(null)), q = (e) => (e = e.toLowerCase(), (t) => Se(t) === e), _e = (e) => (t) => typeof t === e, { isArray: ne } = Array, ce = _e("undefined");
|
|
76
|
+
function pn(e) {
|
|
77
|
+
return e !== null && !ce(e) && e.constructor !== null && !ce(e.constructor) && I(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
function
|
|
79
|
+
const St = q("ArrayBuffer");
|
|
80
|
+
function mn(e) {
|
|
81
81
|
let t;
|
|
82
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
82
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && St(e.buffer), t;
|
|
83
83
|
}
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
84
|
+
const wn = _e("string"), I = _e("function"), _t = _e("number"), Re = (e) => e !== null && typeof e == "object", gn = (e) => e === !0 || e === !1, me = (e) => {
|
|
85
|
+
if (Se(e) !== "object")
|
|
86
86
|
return !1;
|
|
87
|
-
const t =
|
|
88
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
89
|
-
},
|
|
87
|
+
const t = He(e);
|
|
88
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Tt in e) && !(Te in e);
|
|
89
|
+
}, yn = q("Date"), En = q("File"), bn = q("Blob"), Tn = q("FileList"), Sn = (e) => Re(e) && I(e.pipe), _n = (e) => {
|
|
90
90
|
let t;
|
|
91
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
92
|
-
t === "object" &&
|
|
93
|
-
},
|
|
94
|
-
function
|
|
91
|
+
return e && (typeof FormData == "function" && e instanceof FormData || I(e.append) && ((t = Se(e)) === "formdata" || // detect form-data instance
|
|
92
|
+
t === "object" && I(e.toString) && e.toString() === "[object FormData]"));
|
|
93
|
+
}, Rn = q("URLSearchParams"), [An, xn, On, Cn] = ["ReadableStream", "Request", "Response", "Headers"].map(q), vn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
94
|
+
function le(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
95
95
|
if (e === null || typeof e > "u")
|
|
96
96
|
return;
|
|
97
97
|
let r, s;
|
|
98
|
-
if (typeof e != "object" && (e = [e]),
|
|
98
|
+
if (typeof e != "object" && (e = [e]), ne(e))
|
|
99
99
|
for (r = 0, s = e.length; r < s; r++)
|
|
100
100
|
t.call(null, e[r], r, e);
|
|
101
101
|
else {
|
|
@@ -105,7 +105,7 @@ function ie(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
105
105
|
l = o[r], t.call(null, e[l], l, e);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Rt(e, t) {
|
|
109
109
|
t = t.toLowerCase();
|
|
110
110
|
const n = Object.keys(e);
|
|
111
111
|
let r = n.length, s;
|
|
@@ -114,75 +114,75 @@ function gt(e, t) {
|
|
|
114
114
|
return s;
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
|
-
const
|
|
118
|
-
function
|
|
119
|
-
const { caseless: e } =
|
|
120
|
-
const o = e &&
|
|
121
|
-
|
|
117
|
+
const Z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, At = (e) => !ce(e) && e !== Z;
|
|
118
|
+
function Fe() {
|
|
119
|
+
const { caseless: e } = At(this) && this || {}, t = {}, n = (r, s) => {
|
|
120
|
+
const o = e && Rt(t, s) || s;
|
|
121
|
+
me(t[o]) && me(r) ? t[o] = Fe(t[o], r) : me(r) ? t[o] = Fe({}, r) : ne(r) ? t[o] = r.slice() : t[o] = r;
|
|
122
122
|
};
|
|
123
123
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
124
|
-
arguments[r] &&
|
|
124
|
+
arguments[r] && le(arguments[r], n);
|
|
125
125
|
return t;
|
|
126
126
|
}
|
|
127
|
-
const
|
|
128
|
-
n &&
|
|
129
|
-
}, { allOwnKeys: r }), e),
|
|
127
|
+
const Ln = (e, t, n, { allOwnKeys: r } = {}) => (le(t, (s, o) => {
|
|
128
|
+
n && I(s) ? e[o] = bt(s, n) : e[o] = s;
|
|
129
|
+
}, { allOwnKeys: r }), e), Nn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Bn = (e, t, n, r) => {
|
|
130
130
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
131
131
|
value: t.prototype
|
|
132
132
|
}), n && Object.assign(e.prototype, n);
|
|
133
|
-
},
|
|
133
|
+
}, Pn = (e, t, n, r) => {
|
|
134
134
|
let s, o, i;
|
|
135
135
|
const l = {};
|
|
136
136
|
if (t = t || {}, e == null) return t;
|
|
137
137
|
do {
|
|
138
138
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
139
139
|
i = s[o], (!r || r(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0);
|
|
140
|
-
e = n !== !1 &&
|
|
140
|
+
e = n !== !1 && He(e);
|
|
141
141
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
142
142
|
return t;
|
|
143
|
-
},
|
|
143
|
+
}, kn = (e, t, n) => {
|
|
144
144
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
145
145
|
const r = e.indexOf(t, n);
|
|
146
146
|
return r !== -1 && r === n;
|
|
147
|
-
},
|
|
147
|
+
}, Un = (e) => {
|
|
148
148
|
if (!e) return null;
|
|
149
|
-
if (
|
|
149
|
+
if (ne(e)) return e;
|
|
150
150
|
let t = e.length;
|
|
151
|
-
if (!
|
|
151
|
+
if (!_t(t)) return null;
|
|
152
152
|
const n = new Array(t);
|
|
153
153
|
for (; t-- > 0; )
|
|
154
154
|
n[t] = e[t];
|
|
155
155
|
return n;
|
|
156
|
-
},
|
|
157
|
-
const r = (e && e[
|
|
156
|
+
}, In = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && He(Uint8Array)), Fn = (e, t) => {
|
|
157
|
+
const r = (e && e[Te]).call(e);
|
|
158
158
|
let s;
|
|
159
159
|
for (; (s = r.next()) && !s.done; ) {
|
|
160
160
|
const o = s.value;
|
|
161
161
|
t.call(e, o[0], o[1]);
|
|
162
162
|
}
|
|
163
|
-
},
|
|
163
|
+
}, Dn = (e, t) => {
|
|
164
164
|
let n;
|
|
165
165
|
const r = [];
|
|
166
166
|
for (; (n = e.exec(t)) !== null; )
|
|
167
167
|
r.push(n);
|
|
168
168
|
return r;
|
|
169
|
-
},
|
|
169
|
+
}, zn = q("HTMLFormElement"), Mn = (e) => e.toLowerCase().replace(
|
|
170
170
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
171
171
|
function(n, r, s) {
|
|
172
172
|
return r.toUpperCase() + s;
|
|
173
173
|
}
|
|
174
|
-
),
|
|
174
|
+
), ot = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), jn = q("RegExp"), xt = (e, t) => {
|
|
175
175
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
176
|
-
|
|
176
|
+
le(n, (s, o) => {
|
|
177
177
|
let i;
|
|
178
178
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
179
179
|
}), Object.defineProperties(e, r);
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
if (
|
|
180
|
+
}, $n = (e) => {
|
|
181
|
+
xt(e, (t, n) => {
|
|
182
|
+
if (I(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
183
183
|
return !1;
|
|
184
184
|
const r = e[n];
|
|
185
|
-
if (
|
|
185
|
+
if (I(r)) {
|
|
186
186
|
if (t.enumerable = !1, "writable" in t) {
|
|
187
187
|
t.writable = !1;
|
|
188
188
|
return;
|
|
@@ -192,105 +192,105 @@ const Sn = (e, t, n, { allOwnKeys: r } = {}) => (ie(t, (s, o) => {
|
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
|
-
},
|
|
195
|
+
}, qn = (e, t) => {
|
|
196
196
|
const n = {}, r = (s) => {
|
|
197
197
|
s.forEach((o) => {
|
|
198
198
|
n[o] = !0;
|
|
199
199
|
});
|
|
200
200
|
};
|
|
201
|
-
return
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
function
|
|
205
|
-
return !!(e &&
|
|
201
|
+
return ne(e) ? r(e) : r(String(e).split(t)), n;
|
|
202
|
+
}, Hn = () => {
|
|
203
|
+
}, Vn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
204
|
+
function Wn(e) {
|
|
205
|
+
return !!(e && I(e.append) && e[Tt] === "FormData" && e[Te]);
|
|
206
206
|
}
|
|
207
|
-
const
|
|
207
|
+
const Gn = (e) => {
|
|
208
208
|
const t = new Array(10), n = (r, s) => {
|
|
209
|
-
if (
|
|
209
|
+
if (Re(r)) {
|
|
210
210
|
if (t.indexOf(r) >= 0)
|
|
211
211
|
return;
|
|
212
212
|
if (!("toJSON" in r)) {
|
|
213
213
|
t[s] = r;
|
|
214
|
-
const o =
|
|
215
|
-
return
|
|
214
|
+
const o = ne(r) ? [] : {};
|
|
215
|
+
return le(r, (i, l) => {
|
|
216
216
|
const c = n(i, s + 1);
|
|
217
|
-
!
|
|
217
|
+
!ce(c) && (o[l] = c);
|
|
218
218
|
}), t[s] = void 0, o;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
return r;
|
|
222
222
|
};
|
|
223
223
|
return n(e, 0);
|
|
224
|
-
},
|
|
225
|
-
s ===
|
|
224
|
+
}, Jn = q("AsyncFunction"), Qn = (e) => e && (Re(e) || I(e)) && I(e.then) && I(e.catch), Ot = ((e, t) => e ? setImmediate : t ? ((n, r) => (Z.addEventListener("message", ({ source: s, data: o }) => {
|
|
225
|
+
s === Z && o === n && r.length && r.shift()();
|
|
226
226
|
}, !1), (s) => {
|
|
227
|
-
r.push(s),
|
|
227
|
+
r.push(s), Z.postMessage(n, "*");
|
|
228
228
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
229
229
|
typeof setImmediate == "function",
|
|
230
|
-
|
|
231
|
-
),
|
|
232
|
-
isArray:
|
|
233
|
-
isArrayBuffer:
|
|
234
|
-
isBuffer:
|
|
235
|
-
isFormData:
|
|
236
|
-
isArrayBufferView:
|
|
237
|
-
isString:
|
|
238
|
-
isNumber:
|
|
239
|
-
isBoolean:
|
|
240
|
-
isObject:
|
|
241
|
-
isPlainObject:
|
|
242
|
-
isReadableStream:
|
|
243
|
-
isRequest:
|
|
244
|
-
isResponse:
|
|
245
|
-
isHeaders:
|
|
246
|
-
isUndefined:
|
|
247
|
-
isDate:
|
|
248
|
-
isFile:
|
|
249
|
-
isBlob:
|
|
250
|
-
isRegExp:
|
|
251
|
-
isFunction:
|
|
252
|
-
isStream:
|
|
253
|
-
isURLSearchParams:
|
|
254
|
-
isTypedArray:
|
|
255
|
-
isFileList:
|
|
256
|
-
forEach:
|
|
257
|
-
merge:
|
|
258
|
-
extend:
|
|
259
|
-
trim:
|
|
260
|
-
stripBOM:
|
|
261
|
-
inherits:
|
|
262
|
-
toFlatObject:
|
|
263
|
-
kindOf:
|
|
264
|
-
kindOfTest:
|
|
265
|
-
endsWith:
|
|
266
|
-
toArray:
|
|
267
|
-
forEachEntry:
|
|
268
|
-
matchAll:
|
|
269
|
-
isHTMLForm:
|
|
270
|
-
hasOwnProperty:
|
|
271
|
-
hasOwnProp:
|
|
230
|
+
I(Z.postMessage)
|
|
231
|
+
), Kn = typeof queueMicrotask < "u" ? queueMicrotask.bind(Z) : typeof process < "u" && process.nextTick || Ot, Xn = (e) => e != null && I(e[Te]), a = {
|
|
232
|
+
isArray: ne,
|
|
233
|
+
isArrayBuffer: St,
|
|
234
|
+
isBuffer: pn,
|
|
235
|
+
isFormData: _n,
|
|
236
|
+
isArrayBufferView: mn,
|
|
237
|
+
isString: wn,
|
|
238
|
+
isNumber: _t,
|
|
239
|
+
isBoolean: gn,
|
|
240
|
+
isObject: Re,
|
|
241
|
+
isPlainObject: me,
|
|
242
|
+
isReadableStream: An,
|
|
243
|
+
isRequest: xn,
|
|
244
|
+
isResponse: On,
|
|
245
|
+
isHeaders: Cn,
|
|
246
|
+
isUndefined: ce,
|
|
247
|
+
isDate: yn,
|
|
248
|
+
isFile: En,
|
|
249
|
+
isBlob: bn,
|
|
250
|
+
isRegExp: jn,
|
|
251
|
+
isFunction: I,
|
|
252
|
+
isStream: Sn,
|
|
253
|
+
isURLSearchParams: Rn,
|
|
254
|
+
isTypedArray: In,
|
|
255
|
+
isFileList: Tn,
|
|
256
|
+
forEach: le,
|
|
257
|
+
merge: Fe,
|
|
258
|
+
extend: Ln,
|
|
259
|
+
trim: vn,
|
|
260
|
+
stripBOM: Nn,
|
|
261
|
+
inherits: Bn,
|
|
262
|
+
toFlatObject: Pn,
|
|
263
|
+
kindOf: Se,
|
|
264
|
+
kindOfTest: q,
|
|
265
|
+
endsWith: kn,
|
|
266
|
+
toArray: Un,
|
|
267
|
+
forEachEntry: Fn,
|
|
268
|
+
matchAll: Dn,
|
|
269
|
+
isHTMLForm: zn,
|
|
270
|
+
hasOwnProperty: ot,
|
|
271
|
+
hasOwnProp: ot,
|
|
272
272
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
273
|
-
reduceDescriptors:
|
|
274
|
-
freezeMethods:
|
|
275
|
-
toObjectSet:
|
|
276
|
-
toCamelCase:
|
|
277
|
-
noop:
|
|
278
|
-
toFiniteNumber:
|
|
279
|
-
findKey:
|
|
280
|
-
global:
|
|
281
|
-
isContextDefined:
|
|
282
|
-
isSpecCompliantForm:
|
|
283
|
-
toJSONObject:
|
|
284
|
-
isAsyncFn:
|
|
285
|
-
isThenable:
|
|
286
|
-
setImmediate:
|
|
287
|
-
asap:
|
|
288
|
-
isIterable:
|
|
273
|
+
reduceDescriptors: xt,
|
|
274
|
+
freezeMethods: $n,
|
|
275
|
+
toObjectSet: qn,
|
|
276
|
+
toCamelCase: Mn,
|
|
277
|
+
noop: Hn,
|
|
278
|
+
toFiniteNumber: Vn,
|
|
279
|
+
findKey: Rt,
|
|
280
|
+
global: Z,
|
|
281
|
+
isContextDefined: At,
|
|
282
|
+
isSpecCompliantForm: Wn,
|
|
283
|
+
toJSONObject: Gn,
|
|
284
|
+
isAsyncFn: Jn,
|
|
285
|
+
isThenable: Qn,
|
|
286
|
+
setImmediate: Ot,
|
|
287
|
+
asap: Kn,
|
|
288
|
+
isIterable: Xn
|
|
289
289
|
};
|
|
290
|
-
function
|
|
290
|
+
function E(e, t, n, r, s) {
|
|
291
291
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
292
292
|
}
|
|
293
|
-
a.inherits(
|
|
293
|
+
a.inherits(E, Error, {
|
|
294
294
|
toJSON: function() {
|
|
295
295
|
return {
|
|
296
296
|
// Standard
|
|
@@ -311,7 +311,7 @@ a.inherits(y, Error, {
|
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
313
|
});
|
|
314
|
-
const
|
|
314
|
+
const Ct = E.prototype, vt = {};
|
|
315
315
|
[
|
|
316
316
|
"ERR_BAD_OPTION_VALUE",
|
|
317
317
|
"ERR_BAD_OPTION",
|
|
@@ -327,89 +327,89 @@ const Tt = y.prototype, St = {};
|
|
|
327
327
|
"ERR_INVALID_URL"
|
|
328
328
|
// eslint-disable-next-line func-names
|
|
329
329
|
].forEach((e) => {
|
|
330
|
-
|
|
330
|
+
vt[e] = { value: e };
|
|
331
331
|
});
|
|
332
|
-
Object.defineProperties(
|
|
333
|
-
Object.defineProperty(
|
|
334
|
-
|
|
335
|
-
const i = Object.create(
|
|
332
|
+
Object.defineProperties(E, vt);
|
|
333
|
+
Object.defineProperty(Ct, "isAxiosError", { value: !0 });
|
|
334
|
+
E.from = (e, t, n, r, s, o) => {
|
|
335
|
+
const i = Object.create(Ct);
|
|
336
336
|
return a.toFlatObject(e, i, function(c) {
|
|
337
337
|
return c !== Error.prototype;
|
|
338
|
-
}, (l) => l !== "isAxiosError"),
|
|
338
|
+
}, (l) => l !== "isAxiosError"), E.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
339
339
|
};
|
|
340
|
-
const
|
|
341
|
-
function
|
|
340
|
+
const Zn = null;
|
|
341
|
+
function De(e) {
|
|
342
342
|
return a.isPlainObject(e) || a.isArray(e);
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function Lt(e) {
|
|
345
345
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function it(e, t, n) {
|
|
348
348
|
return e ? e.concat(t).map(function(s, o) {
|
|
349
|
-
return s =
|
|
349
|
+
return s = Lt(s), !n && o ? "[" + s + "]" : s;
|
|
350
350
|
}).join(n ? "." : "") : t;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
return a.isArray(e) && !e.some(
|
|
352
|
+
function Yn(e) {
|
|
353
|
+
return a.isArray(e) && !e.some(De);
|
|
354
354
|
}
|
|
355
|
-
const
|
|
355
|
+
const er = a.toFlatObject(a, {}, null, function(t) {
|
|
356
356
|
return /^is[A-Z]/.test(t);
|
|
357
357
|
});
|
|
358
|
-
function
|
|
358
|
+
function Ae(e, t, n) {
|
|
359
359
|
if (!a.isObject(e))
|
|
360
360
|
throw new TypeError("target must be an object");
|
|
361
361
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
362
362
|
metaTokens: !0,
|
|
363
363
|
dots: !1,
|
|
364
364
|
indexes: !1
|
|
365
|
-
}, !1, function(w,
|
|
366
|
-
return !a.isUndefined(
|
|
365
|
+
}, !1, function(w, p) {
|
|
366
|
+
return !a.isUndefined(p[w]);
|
|
367
367
|
});
|
|
368
368
|
const r = n.metaTokens, s = n.visitor || d, o = n.dots, i = n.indexes, c = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
369
369
|
if (!a.isFunction(s))
|
|
370
370
|
throw new TypeError("visitor must be a function");
|
|
371
|
-
function u(
|
|
372
|
-
if (
|
|
373
|
-
if (a.isDate(
|
|
374
|
-
return
|
|
375
|
-
if (a.isBoolean(
|
|
376
|
-
return
|
|
377
|
-
if (!c && a.isBlob(
|
|
378
|
-
throw new
|
|
379
|
-
return a.isArrayBuffer(
|
|
380
|
-
}
|
|
381
|
-
function d(
|
|
382
|
-
let S =
|
|
383
|
-
if (
|
|
371
|
+
function u(h) {
|
|
372
|
+
if (h === null) return "";
|
|
373
|
+
if (a.isDate(h))
|
|
374
|
+
return h.toISOString();
|
|
375
|
+
if (a.isBoolean(h))
|
|
376
|
+
return h.toString();
|
|
377
|
+
if (!c && a.isBlob(h))
|
|
378
|
+
throw new E("Blob is not supported. Use a Buffer instead.");
|
|
379
|
+
return a.isArrayBuffer(h) || a.isTypedArray(h) ? c && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
380
|
+
}
|
|
381
|
+
function d(h, w, p) {
|
|
382
|
+
let S = h;
|
|
383
|
+
if (h && !p && typeof h == "object") {
|
|
384
384
|
if (a.endsWith(w, "{}"))
|
|
385
|
-
w = r ? w : w.slice(0, -2),
|
|
386
|
-
else if (a.isArray(
|
|
387
|
-
return w =
|
|
385
|
+
w = r ? w : w.slice(0, -2), h = JSON.stringify(h);
|
|
386
|
+
else if (a.isArray(h) && Yn(h) || (a.isFileList(h) || a.endsWith(w, "[]")) && (S = a.toArray(h)))
|
|
387
|
+
return w = Lt(w), S.forEach(function(T, x) {
|
|
388
388
|
!(a.isUndefined(T) || T === null) && t.append(
|
|
389
389
|
// eslint-disable-next-line no-nested-ternary
|
|
390
|
-
i === !0 ?
|
|
390
|
+
i === !0 ? it([w], x, o) : i === null ? w : w + "[]",
|
|
391
391
|
u(T)
|
|
392
392
|
);
|
|
393
393
|
}), !1;
|
|
394
394
|
}
|
|
395
|
-
return
|
|
395
|
+
return De(h) ? !0 : (t.append(it(p, w, o), u(h)), !1);
|
|
396
396
|
}
|
|
397
|
-
const f = [],
|
|
397
|
+
const f = [], y = Object.assign(er, {
|
|
398
398
|
defaultVisitor: d,
|
|
399
399
|
convertValue: u,
|
|
400
|
-
isVisitable:
|
|
400
|
+
isVisitable: De
|
|
401
401
|
});
|
|
402
|
-
function R(
|
|
403
|
-
if (!a.isUndefined(
|
|
404
|
-
if (f.indexOf(
|
|
402
|
+
function R(h, w) {
|
|
403
|
+
if (!a.isUndefined(h)) {
|
|
404
|
+
if (f.indexOf(h) !== -1)
|
|
405
405
|
throw Error("Circular reference detected in " + w.join("."));
|
|
406
|
-
f.push(
|
|
406
|
+
f.push(h), a.forEach(h, function(S, _) {
|
|
407
407
|
(!(a.isUndefined(S) || S === null) && s.call(
|
|
408
408
|
t,
|
|
409
409
|
S,
|
|
410
410
|
a.isString(_) ? _.trim() : _,
|
|
411
411
|
w,
|
|
412
|
-
|
|
412
|
+
y
|
|
413
413
|
)) === !0 && R(S, w ? w.concat(_) : [_]);
|
|
414
414
|
}), f.pop();
|
|
415
415
|
}
|
|
@@ -418,7 +418,7 @@ function Te(e, t, n) {
|
|
|
418
418
|
throw new TypeError("data must be an object");
|
|
419
419
|
return R(e), t;
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function at(e) {
|
|
422
422
|
const t = {
|
|
423
423
|
"!": "%21",
|
|
424
424
|
"'": "%27",
|
|
@@ -432,40 +432,40 @@ function et(e) {
|
|
|
432
432
|
return t[r];
|
|
433
433
|
});
|
|
434
434
|
}
|
|
435
|
-
function
|
|
436
|
-
this._pairs = [], e &&
|
|
435
|
+
function Ve(e, t) {
|
|
436
|
+
this._pairs = [], e && Ae(e, this, t);
|
|
437
437
|
}
|
|
438
|
-
const
|
|
439
|
-
|
|
438
|
+
const Nt = Ve.prototype;
|
|
439
|
+
Nt.append = function(t, n) {
|
|
440
440
|
this._pairs.push([t, n]);
|
|
441
441
|
};
|
|
442
|
-
|
|
442
|
+
Nt.toString = function(t) {
|
|
443
443
|
const n = t ? function(r) {
|
|
444
|
-
return t.call(this, r,
|
|
445
|
-
} :
|
|
444
|
+
return t.call(this, r, at);
|
|
445
|
+
} : at;
|
|
446
446
|
return this._pairs.map(function(s) {
|
|
447
447
|
return n(s[0]) + "=" + n(s[1]);
|
|
448
448
|
}, "").join("&");
|
|
449
449
|
};
|
|
450
|
-
function
|
|
450
|
+
function tr(e) {
|
|
451
451
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Bt(e, t, n) {
|
|
454
454
|
if (!t)
|
|
455
455
|
return e;
|
|
456
|
-
const r = n && n.encode ||
|
|
456
|
+
const r = n && n.encode || tr;
|
|
457
457
|
a.isFunction(n) && (n = {
|
|
458
458
|
serialize: n
|
|
459
459
|
});
|
|
460
460
|
const s = n && n.serialize;
|
|
461
461
|
let o;
|
|
462
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
462
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Ve(t, n).toString(r), o) {
|
|
463
463
|
const i = e.indexOf("#");
|
|
464
464
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
465
465
|
}
|
|
466
466
|
return e;
|
|
467
467
|
}
|
|
468
|
-
class
|
|
468
|
+
class ct {
|
|
469
469
|
constructor() {
|
|
470
470
|
this.handlers = [];
|
|
471
471
|
}
|
|
@@ -519,41 +519,41 @@ class tt {
|
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
const
|
|
522
|
+
const Pt = {
|
|
523
523
|
silentJSONParsing: !0,
|
|
524
524
|
forcedJSONParsing: !0,
|
|
525
525
|
clarifyTimeoutError: !1
|
|
526
|
-
},
|
|
526
|
+
}, nr = typeof URLSearchParams < "u" ? URLSearchParams : Ve, rr = typeof FormData < "u" ? FormData : null, sr = typeof Blob < "u" ? Blob : null, or = {
|
|
527
527
|
isBrowser: !0,
|
|
528
528
|
classes: {
|
|
529
|
-
URLSearchParams:
|
|
530
|
-
FormData:
|
|
531
|
-
Blob:
|
|
529
|
+
URLSearchParams: nr,
|
|
530
|
+
FormData: rr,
|
|
531
|
+
Blob: sr
|
|
532
532
|
},
|
|
533
533
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
534
|
-
},
|
|
535
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
534
|
+
}, We = typeof window < "u" && typeof document < "u", ze = typeof navigator == "object" && navigator || void 0, ir = We && (!ze || ["ReactNative", "NativeScript", "NS"].indexOf(ze.product) < 0), ar = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
535
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cr = We && window.location.href || "http://localhost", lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
536
536
|
__proto__: null,
|
|
537
|
-
hasBrowserEnv:
|
|
538
|
-
hasStandardBrowserEnv:
|
|
539
|
-
hasStandardBrowserWebWorkerEnv:
|
|
540
|
-
navigator:
|
|
541
|
-
origin:
|
|
542
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
543
|
-
...
|
|
544
|
-
...
|
|
537
|
+
hasBrowserEnv: We,
|
|
538
|
+
hasStandardBrowserEnv: ir,
|
|
539
|
+
hasStandardBrowserWebWorkerEnv: ar,
|
|
540
|
+
navigator: ze,
|
|
541
|
+
origin: cr
|
|
542
|
+
}, Symbol.toStringTag, { value: "Module" })), B = {
|
|
543
|
+
...lr,
|
|
544
|
+
...or
|
|
545
545
|
};
|
|
546
|
-
function
|
|
547
|
-
return
|
|
546
|
+
function ur(e, t) {
|
|
547
|
+
return Ae(e, new B.classes.URLSearchParams(), Object.assign({
|
|
548
548
|
visitor: function(n, r, s, o) {
|
|
549
|
-
return
|
|
549
|
+
return B.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
550
550
|
}
|
|
551
551
|
}, t));
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function dr(e) {
|
|
554
554
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function fr(e) {
|
|
557
557
|
const t = {}, n = Object.keys(e);
|
|
558
558
|
let r;
|
|
559
559
|
const s = n.length;
|
|
@@ -562,22 +562,22 @@ function sr(e) {
|
|
|
562
562
|
o = n[r], t[o] = e[o];
|
|
563
563
|
return t;
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function kt(e) {
|
|
566
566
|
function t(n, r, s, o) {
|
|
567
567
|
let i = n[o++];
|
|
568
568
|
if (i === "__proto__") return !0;
|
|
569
569
|
const l = Number.isFinite(+i), c = o >= n.length;
|
|
570
|
-
return i = !i && a.isArray(s) ? s.length : i, c ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !l) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] =
|
|
570
|
+
return i = !i && a.isArray(s) ? s.length : i, c ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !l) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = fr(s[i])), !l);
|
|
571
571
|
}
|
|
572
572
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
573
573
|
const n = {};
|
|
574
574
|
return a.forEachEntry(e, (r, s) => {
|
|
575
|
-
t(
|
|
575
|
+
t(dr(r), s, n, 0);
|
|
576
576
|
}), n;
|
|
577
577
|
}
|
|
578
578
|
return null;
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function hr(e, t, n) {
|
|
581
581
|
if (a.isString(e))
|
|
582
582
|
try {
|
|
583
583
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -587,13 +587,13 @@ function or(e, t, n) {
|
|
|
587
587
|
}
|
|
588
588
|
return (n || JSON.stringify)(e);
|
|
589
589
|
}
|
|
590
|
-
const
|
|
591
|
-
transitional:
|
|
590
|
+
const ue = {
|
|
591
|
+
transitional: Pt,
|
|
592
592
|
adapter: ["xhr", "http", "fetch"],
|
|
593
593
|
transformRequest: [function(t, n) {
|
|
594
594
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
595
595
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
596
|
-
return s ? JSON.stringify(
|
|
596
|
+
return s ? JSON.stringify(kt(t)) : t;
|
|
597
597
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
598
598
|
return t;
|
|
599
599
|
if (a.isArrayBufferView(t))
|
|
@@ -603,20 +603,20 @@ const ae = {
|
|
|
603
603
|
let l;
|
|
604
604
|
if (o) {
|
|
605
605
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
606
|
-
return
|
|
606
|
+
return ur(t, this.formSerializer).toString();
|
|
607
607
|
if ((l = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
608
608
|
const c = this.env && this.env.FormData;
|
|
609
|
-
return
|
|
609
|
+
return Ae(
|
|
610
610
|
l ? { "files[]": t } : t,
|
|
611
611
|
c && new c(),
|
|
612
612
|
this.formSerializer
|
|
613
613
|
);
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
616
|
+
return o || s ? (n.setContentType("application/json", !1), hr(t)) : t;
|
|
617
617
|
}],
|
|
618
618
|
transformResponse: [function(t) {
|
|
619
|
-
const n = this.transitional ||
|
|
619
|
+
const n = this.transitional || ue.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
620
620
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
621
621
|
return t;
|
|
622
622
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
@@ -625,7 +625,7 @@ const ae = {
|
|
|
625
625
|
return JSON.parse(t);
|
|
626
626
|
} catch (l) {
|
|
627
627
|
if (i)
|
|
628
|
-
throw l.name === "SyntaxError" ?
|
|
628
|
+
throw l.name === "SyntaxError" ? E.from(l, E.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
return t;
|
|
@@ -640,8 +640,8 @@ const ae = {
|
|
|
640
640
|
maxContentLength: -1,
|
|
641
641
|
maxBodyLength: -1,
|
|
642
642
|
env: {
|
|
643
|
-
FormData:
|
|
644
|
-
Blob:
|
|
643
|
+
FormData: B.classes.FormData,
|
|
644
|
+
Blob: B.classes.Blob
|
|
645
645
|
},
|
|
646
646
|
validateStatus: function(t) {
|
|
647
647
|
return t >= 200 && t < 300;
|
|
@@ -654,9 +654,9 @@ const ae = {
|
|
|
654
654
|
}
|
|
655
655
|
};
|
|
656
656
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
657
|
-
|
|
657
|
+
ue.headers[e] = {};
|
|
658
658
|
});
|
|
659
|
-
const
|
|
659
|
+
const pr = a.toObjectSet([
|
|
660
660
|
"age",
|
|
661
661
|
"authorization",
|
|
662
662
|
"content-length",
|
|
@@ -674,29 +674,29 @@ const ir = a.toObjectSet([
|
|
|
674
674
|
"referer",
|
|
675
675
|
"retry-after",
|
|
676
676
|
"user-agent"
|
|
677
|
-
]),
|
|
677
|
+
]), mr = (e) => {
|
|
678
678
|
const t = {};
|
|
679
679
|
let n, r, s;
|
|
680
680
|
return e && e.split(`
|
|
681
681
|
`).forEach(function(i) {
|
|
682
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
682
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && pr[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
683
683
|
}), t;
|
|
684
|
-
},
|
|
685
|
-
function
|
|
684
|
+
}, lt = Symbol("internals");
|
|
685
|
+
function ie(e) {
|
|
686
686
|
return e && String(e).trim().toLowerCase();
|
|
687
687
|
}
|
|
688
|
-
function
|
|
689
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
688
|
+
function we(e) {
|
|
689
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(we) : String(e);
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function wr(e) {
|
|
692
692
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
693
693
|
let r;
|
|
694
694
|
for (; r = n.exec(e); )
|
|
695
695
|
t[r[1]] = r[2];
|
|
696
696
|
return t;
|
|
697
697
|
}
|
|
698
|
-
const
|
|
699
|
-
function
|
|
698
|
+
const gr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
699
|
+
function ke(e, t, n, r, s) {
|
|
700
700
|
if (a.isFunction(r))
|
|
701
701
|
return r.call(this, t, n);
|
|
702
702
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -706,10 +706,10 @@ function Ce(e, t, n, r, s) {
|
|
|
706
706
|
return r.test(t);
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function yr(e) {
|
|
710
710
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function Er(e, t) {
|
|
713
713
|
const n = a.toCamelCase(" " + t);
|
|
714
714
|
["get", "set", "has"].forEach((r) => {
|
|
715
715
|
Object.defineProperty(e, r + n, {
|
|
@@ -720,24 +720,24 @@ function dr(e, t) {
|
|
|
720
720
|
});
|
|
721
721
|
});
|
|
722
722
|
}
|
|
723
|
-
let
|
|
723
|
+
let F = class {
|
|
724
724
|
constructor(t) {
|
|
725
725
|
t && this.set(t);
|
|
726
726
|
}
|
|
727
727
|
set(t, n, r) {
|
|
728
728
|
const s = this;
|
|
729
729
|
function o(l, c, u) {
|
|
730
|
-
const d =
|
|
730
|
+
const d = ie(c);
|
|
731
731
|
if (!d)
|
|
732
732
|
throw new Error("header name must be a non-empty string");
|
|
733
733
|
const f = a.findKey(s, d);
|
|
734
|
-
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || c] =
|
|
734
|
+
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || c] = we(l));
|
|
735
735
|
}
|
|
736
736
|
const i = (l, c) => a.forEach(l, (u, d) => o(u, d, c));
|
|
737
737
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
738
738
|
i(t, n);
|
|
739
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
740
|
-
i(
|
|
739
|
+
else if (a.isString(t) && (t = t.trim()) && !gr(t))
|
|
740
|
+
i(mr(t), n);
|
|
741
741
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
742
742
|
let l = {}, c, u;
|
|
743
743
|
for (const d of t) {
|
|
@@ -751,14 +751,14 @@ let P = class {
|
|
|
751
751
|
return this;
|
|
752
752
|
}
|
|
753
753
|
get(t, n) {
|
|
754
|
-
if (t =
|
|
754
|
+
if (t = ie(t), t) {
|
|
755
755
|
const r = a.findKey(this, t);
|
|
756
756
|
if (r) {
|
|
757
757
|
const s = this[r];
|
|
758
758
|
if (!n)
|
|
759
759
|
return s;
|
|
760
760
|
if (n === !0)
|
|
761
|
-
return
|
|
761
|
+
return wr(s);
|
|
762
762
|
if (a.isFunction(n))
|
|
763
763
|
return n.call(this, s, r);
|
|
764
764
|
if (a.isRegExp(n))
|
|
@@ -768,9 +768,9 @@ let P = class {
|
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
770
|
has(t, n) {
|
|
771
|
-
if (t =
|
|
771
|
+
if (t = ie(t), t) {
|
|
772
772
|
const r = a.findKey(this, t);
|
|
773
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
773
|
+
return !!(r && this[r] !== void 0 && (!n || ke(this, this[r], r, n)));
|
|
774
774
|
}
|
|
775
775
|
return !1;
|
|
776
776
|
}
|
|
@@ -778,9 +778,9 @@ let P = class {
|
|
|
778
778
|
const r = this;
|
|
779
779
|
let s = !1;
|
|
780
780
|
function o(i) {
|
|
781
|
-
if (i =
|
|
781
|
+
if (i = ie(i), i) {
|
|
782
782
|
const l = a.findKey(r, i);
|
|
783
|
-
l && (!n ||
|
|
783
|
+
l && (!n || ke(r, r[l], l, n)) && (delete r[l], s = !0);
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
786
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -790,7 +790,7 @@ let P = class {
|
|
|
790
790
|
let r = n.length, s = !1;
|
|
791
791
|
for (; r--; ) {
|
|
792
792
|
const o = n[r];
|
|
793
|
-
(!t ||
|
|
793
|
+
(!t || ke(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
794
794
|
}
|
|
795
795
|
return s;
|
|
796
796
|
}
|
|
@@ -799,11 +799,11 @@ let P = class {
|
|
|
799
799
|
return a.forEach(this, (s, o) => {
|
|
800
800
|
const i = a.findKey(r, o);
|
|
801
801
|
if (i) {
|
|
802
|
-
n[i] =
|
|
802
|
+
n[i] = we(s), delete n[o];
|
|
803
803
|
return;
|
|
804
804
|
}
|
|
805
|
-
const l = t ?
|
|
806
|
-
l !== o && delete n[o], n[l] =
|
|
805
|
+
const l = t ? yr(o) : String(o).trim();
|
|
806
|
+
l !== o && delete n[o], n[l] = we(s), r[l] = !0;
|
|
807
807
|
}), this;
|
|
808
808
|
}
|
|
809
809
|
concat(...t) {
|
|
@@ -836,18 +836,18 @@ let P = class {
|
|
|
836
836
|
return n.forEach((s) => r.set(s)), r;
|
|
837
837
|
}
|
|
838
838
|
static accessor(t) {
|
|
839
|
-
const r = (this[
|
|
839
|
+
const r = (this[lt] = this[lt] = {
|
|
840
840
|
accessors: {}
|
|
841
841
|
}).accessors, s = this.prototype;
|
|
842
842
|
function o(i) {
|
|
843
|
-
const l =
|
|
844
|
-
r[l] || (
|
|
843
|
+
const l = ie(i);
|
|
844
|
+
r[l] || (Er(s, i), r[l] = !0);
|
|
845
845
|
}
|
|
846
846
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
847
847
|
}
|
|
848
848
|
};
|
|
849
|
-
|
|
850
|
-
a.reduceDescriptors(
|
|
849
|
+
F.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
850
|
+
a.reduceDescriptors(F.prototype, ({ value: e }, t) => {
|
|
851
851
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
852
852
|
return {
|
|
853
853
|
get: () => e,
|
|
@@ -856,54 +856,54 @@ a.reduceDescriptors(P.prototype, ({ value: e }, t) => {
|
|
|
856
856
|
}
|
|
857
857
|
};
|
|
858
858
|
});
|
|
859
|
-
a.freezeMethods(
|
|
860
|
-
function
|
|
861
|
-
const n = this ||
|
|
859
|
+
a.freezeMethods(F);
|
|
860
|
+
function Ue(e, t) {
|
|
861
|
+
const n = this || ue, r = t || n, s = F.from(r.headers);
|
|
862
862
|
let o = r.data;
|
|
863
863
|
return a.forEach(e, function(l) {
|
|
864
864
|
o = l.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
865
865
|
}), s.normalize(), o;
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function Ut(e) {
|
|
868
868
|
return !!(e && e.__CANCEL__);
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
|
|
870
|
+
function re(e, t, n) {
|
|
871
|
+
E.call(this, e ?? "canceled", E.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
872
872
|
}
|
|
873
|
-
a.inherits(
|
|
873
|
+
a.inherits(re, E, {
|
|
874
874
|
__CANCEL__: !0
|
|
875
875
|
});
|
|
876
|
-
function
|
|
876
|
+
function It(e, t, n) {
|
|
877
877
|
const r = n.config.validateStatus;
|
|
878
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
878
|
+
!n.status || !r || r(n.status) ? e(n) : t(new E(
|
|
879
879
|
"Request failed with status code " + n.status,
|
|
880
|
-
[
|
|
880
|
+
[E.ERR_BAD_REQUEST, E.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
881
881
|
n.config,
|
|
882
882
|
n.request,
|
|
883
883
|
n
|
|
884
884
|
));
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function br(e) {
|
|
887
887
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
888
888
|
return t && t[1] || "";
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function Tr(e, t) {
|
|
891
891
|
e = e || 10;
|
|
892
892
|
const n = new Array(e), r = new Array(e);
|
|
893
893
|
let s = 0, o = 0, i;
|
|
894
894
|
return t = t !== void 0 ? t : 1e3, function(c) {
|
|
895
895
|
const u = Date.now(), d = r[o];
|
|
896
896
|
i || (i = u), n[s] = c, r[s] = u;
|
|
897
|
-
let f = o,
|
|
897
|
+
let f = o, y = 0;
|
|
898
898
|
for (; f !== s; )
|
|
899
|
-
|
|
899
|
+
y += n[f++], f = f % e;
|
|
900
900
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
901
901
|
return;
|
|
902
902
|
const R = d && u - d;
|
|
903
|
-
return R ? Math.round(
|
|
903
|
+
return R ? Math.round(y * 1e3 / R) : void 0;
|
|
904
904
|
};
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function Sr(e, t) {
|
|
907
907
|
let n = 0, r = 1e3 / t, s, o;
|
|
908
908
|
const i = (u, d = Date.now()) => {
|
|
909
909
|
n = d, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
@@ -915,10 +915,10 @@ function hr(e, t) {
|
|
|
915
915
|
}, r - f)));
|
|
916
916
|
}, () => s && i(s)];
|
|
917
917
|
}
|
|
918
|
-
const
|
|
918
|
+
const ye = (e, t, n = 3) => {
|
|
919
919
|
let r = 0;
|
|
920
|
-
const s =
|
|
921
|
-
return
|
|
920
|
+
const s = Tr(50, 250);
|
|
921
|
+
return Sr((o) => {
|
|
922
922
|
const i = o.loaded, l = o.lengthComputable ? o.total : void 0, c = i - r, u = s(c), d = i <= l;
|
|
923
923
|
r = i;
|
|
924
924
|
const f = {
|
|
@@ -934,17 +934,17 @@ const he = (e, t, n = 3) => {
|
|
|
934
934
|
};
|
|
935
935
|
e(f);
|
|
936
936
|
}, n);
|
|
937
|
-
},
|
|
937
|
+
}, ut = (e, t) => {
|
|
938
938
|
const n = e != null;
|
|
939
939
|
return [(r) => t[0]({
|
|
940
940
|
lengthComputable: n,
|
|
941
941
|
total: e,
|
|
942
942
|
loaded: r
|
|
943
943
|
}), t[1]];
|
|
944
|
-
},
|
|
945
|
-
new URL(
|
|
946
|
-
|
|
947
|
-
) : () => !0,
|
|
944
|
+
}, dt = (e) => (...t) => a.asap(() => e(...t)), _r = B.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, B.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
945
|
+
new URL(B.origin),
|
|
946
|
+
B.navigator && /(msie|trident)/i.test(B.navigator.userAgent)
|
|
947
|
+
) : () => !0, Rr = B.hasStandardBrowserEnv ? (
|
|
948
948
|
// Standard browser envs support document.cookie
|
|
949
949
|
{
|
|
950
950
|
write(e, t, n, r, s, o) {
|
|
@@ -971,28 +971,28 @@ const he = (e, t, n = 3) => {
|
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
);
|
|
974
|
-
function
|
|
974
|
+
function Ar(e) {
|
|
975
975
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
976
976
|
}
|
|
977
|
-
function
|
|
977
|
+
function xr(e, t) {
|
|
978
978
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
979
979
|
}
|
|
980
|
-
function
|
|
981
|
-
let r = !
|
|
982
|
-
return e && (r || n == !1) ?
|
|
980
|
+
function Ft(e, t, n) {
|
|
981
|
+
let r = !Ar(t);
|
|
982
|
+
return e && (r || n == !1) ? xr(e, t) : t;
|
|
983
983
|
}
|
|
984
|
-
const
|
|
985
|
-
function
|
|
984
|
+
const ft = (e) => e instanceof F ? { ...e } : e;
|
|
985
|
+
function ee(e, t) {
|
|
986
986
|
t = t || {};
|
|
987
987
|
const n = {};
|
|
988
|
-
function r(u, d, f,
|
|
989
|
-
return a.isPlainObject(u) && a.isPlainObject(d) ? a.merge.call({ caseless:
|
|
988
|
+
function r(u, d, f, y) {
|
|
989
|
+
return a.isPlainObject(u) && a.isPlainObject(d) ? a.merge.call({ caseless: y }, u, d) : a.isPlainObject(d) ? a.merge({}, d) : a.isArray(d) ? d.slice() : d;
|
|
990
990
|
}
|
|
991
|
-
function s(u, d, f,
|
|
991
|
+
function s(u, d, f, y) {
|
|
992
992
|
if (a.isUndefined(d)) {
|
|
993
993
|
if (!a.isUndefined(u))
|
|
994
|
-
return r(void 0, u, f,
|
|
995
|
-
} else return r(u, d, f,
|
|
994
|
+
return r(void 0, u, f, y);
|
|
995
|
+
} else return r(u, d, f, y);
|
|
996
996
|
}
|
|
997
997
|
function o(u, d) {
|
|
998
998
|
if (!a.isUndefined(d))
|
|
@@ -1039,92 +1039,92 @@ function X(e, t) {
|
|
|
1039
1039
|
socketPath: i,
|
|
1040
1040
|
responseEncoding: i,
|
|
1041
1041
|
validateStatus: l,
|
|
1042
|
-
headers: (u, d, f) => s(
|
|
1042
|
+
headers: (u, d, f) => s(ft(u), ft(d), f, !0)
|
|
1043
1043
|
};
|
|
1044
1044
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(d) {
|
|
1045
|
-
const f = c[d] || s,
|
|
1046
|
-
a.isUndefined(
|
|
1045
|
+
const f = c[d] || s, y = f(e[d], t[d], d);
|
|
1046
|
+
a.isUndefined(y) && f !== l || (n[d] = y);
|
|
1047
1047
|
}), n;
|
|
1048
1048
|
}
|
|
1049
|
-
const
|
|
1050
|
-
const t =
|
|
1049
|
+
const Dt = (e) => {
|
|
1050
|
+
const t = ee({}, e);
|
|
1051
1051
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: l } = t;
|
|
1052
|
-
t.headers = i =
|
|
1052
|
+
t.headers = i = F.from(i), t.url = Bt(Ft(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && i.set(
|
|
1053
1053
|
"Authorization",
|
|
1054
1054
|
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
1055
1055
|
);
|
|
1056
1056
|
let c;
|
|
1057
1057
|
if (a.isFormData(n)) {
|
|
1058
|
-
if (
|
|
1058
|
+
if (B.hasStandardBrowserEnv || B.hasStandardBrowserWebWorkerEnv)
|
|
1059
1059
|
i.setContentType(void 0);
|
|
1060
1060
|
else if ((c = i.getContentType()) !== !1) {
|
|
1061
1061
|
const [u, ...d] = c ? c.split(";").map((f) => f.trim()).filter(Boolean) : [];
|
|
1062
1062
|
i.setContentType([u || "multipart/form-data", ...d].join("; "));
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
|
-
if (
|
|
1066
|
-
const u = s && o &&
|
|
1065
|
+
if (B.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && _r(t.url))) {
|
|
1066
|
+
const u = s && o && Rr.read(o);
|
|
1067
1067
|
u && i.set(s, u);
|
|
1068
1068
|
}
|
|
1069
1069
|
return t;
|
|
1070
|
-
},
|
|
1070
|
+
}, Or = typeof XMLHttpRequest < "u", Cr = Or && function(e) {
|
|
1071
1071
|
return new Promise(function(n, r) {
|
|
1072
|
-
const s =
|
|
1072
|
+
const s = Dt(e);
|
|
1073
1073
|
let o = s.data;
|
|
1074
|
-
const i =
|
|
1075
|
-
let { responseType: l, onUploadProgress: c, onDownloadProgress: u } = s, d, f,
|
|
1074
|
+
const i = F.from(s.headers).normalize();
|
|
1075
|
+
let { responseType: l, onUploadProgress: c, onDownloadProgress: u } = s, d, f, y, R, h;
|
|
1076
1076
|
function w() {
|
|
1077
|
-
R && R(),
|
|
1077
|
+
R && R(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(d), s.signal && s.signal.removeEventListener("abort", d);
|
|
1078
1078
|
}
|
|
1079
|
-
let
|
|
1080
|
-
|
|
1079
|
+
let p = new XMLHttpRequest();
|
|
1080
|
+
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1081
1081
|
function S() {
|
|
1082
|
-
if (!
|
|
1082
|
+
if (!p)
|
|
1083
1083
|
return;
|
|
1084
|
-
const T =
|
|
1085
|
-
"getAllResponseHeaders" in
|
|
1086
|
-
),
|
|
1087
|
-
data: !l || l === "text" || l === "json" ?
|
|
1088
|
-
status:
|
|
1089
|
-
statusText:
|
|
1084
|
+
const T = F.from(
|
|
1085
|
+
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1086
|
+
), N = {
|
|
1087
|
+
data: !l || l === "text" || l === "json" ? p.responseText : p.response,
|
|
1088
|
+
status: p.status,
|
|
1089
|
+
statusText: p.statusText,
|
|
1090
1090
|
headers: T,
|
|
1091
1091
|
config: e,
|
|
1092
|
-
request:
|
|
1092
|
+
request: p
|
|
1093
1093
|
};
|
|
1094
|
-
|
|
1095
|
-
n(
|
|
1096
|
-
}, function(
|
|
1097
|
-
r(
|
|
1098
|
-
},
|
|
1094
|
+
It(function(D) {
|
|
1095
|
+
n(D), w();
|
|
1096
|
+
}, function(D) {
|
|
1097
|
+
r(D), w();
|
|
1098
|
+
}, N), p = null;
|
|
1099
1099
|
}
|
|
1100
|
-
"onloadend" in
|
|
1101
|
-
!
|
|
1102
|
-
},
|
|
1103
|
-
|
|
1104
|
-
},
|
|
1105
|
-
r(new
|
|
1106
|
-
},
|
|
1107
|
-
let
|
|
1108
|
-
const
|
|
1109
|
-
s.timeoutErrorMessage && (
|
|
1110
|
-
|
|
1111
|
-
|
|
1100
|
+
"onloadend" in p ? p.onloadend = S : p.onreadystatechange = function() {
|
|
1101
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1102
|
+
}, p.onabort = function() {
|
|
1103
|
+
p && (r(new E("Request aborted", E.ECONNABORTED, e, p)), p = null);
|
|
1104
|
+
}, p.onerror = function() {
|
|
1105
|
+
r(new E("Network Error", E.ERR_NETWORK, e, p)), p = null;
|
|
1106
|
+
}, p.ontimeout = function() {
|
|
1107
|
+
let x = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1108
|
+
const N = s.transitional || Pt;
|
|
1109
|
+
s.timeoutErrorMessage && (x = s.timeoutErrorMessage), r(new E(
|
|
1110
|
+
x,
|
|
1111
|
+
N.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
1112
1112
|
e,
|
|
1113
|
-
|
|
1114
|
-
)),
|
|
1115
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1116
|
-
|
|
1117
|
-
}), a.isUndefined(s.withCredentials) || (
|
|
1118
|
-
|
|
1113
|
+
p
|
|
1114
|
+
)), p = null;
|
|
1115
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(x, N) {
|
|
1116
|
+
p.setRequestHeader(N, x);
|
|
1117
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), l && l !== "json" && (p.responseType = s.responseType), u && ([y, h] = ye(u, !0), p.addEventListener("progress", y)), c && p.upload && ([f, R] = ye(c), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (d = (T) => {
|
|
1118
|
+
p && (r(!T || T.type ? new re(null, e, p) : T), p.abort(), p = null);
|
|
1119
1119
|
}, s.cancelToken && s.cancelToken.subscribe(d), s.signal && (s.signal.aborted ? d() : s.signal.addEventListener("abort", d)));
|
|
1120
|
-
const _ =
|
|
1121
|
-
if (_ &&
|
|
1122
|
-
r(new
|
|
1120
|
+
const _ = br(s.url);
|
|
1121
|
+
if (_ && B.protocols.indexOf(_) === -1) {
|
|
1122
|
+
r(new E("Unsupported protocol " + _ + ":", E.ERR_BAD_REQUEST, e));
|
|
1123
1123
|
return;
|
|
1124
1124
|
}
|
|
1125
|
-
|
|
1125
|
+
p.send(o || null);
|
|
1126
1126
|
});
|
|
1127
|
-
},
|
|
1127
|
+
}, vr = (e, t) => {
|
|
1128
1128
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1129
1129
|
if (t || n) {
|
|
1130
1130
|
let r = new AbortController(), s;
|
|
@@ -1132,11 +1132,11 @@ const kt = (e) => {
|
|
|
1132
1132
|
if (!s) {
|
|
1133
1133
|
s = !0, l();
|
|
1134
1134
|
const d = u instanceof Error ? u : this.reason;
|
|
1135
|
-
r.abort(d instanceof
|
|
1135
|
+
r.abort(d instanceof E ? d : new re(d instanceof Error ? d.message : d));
|
|
1136
1136
|
}
|
|
1137
1137
|
};
|
|
1138
1138
|
let i = t && setTimeout(() => {
|
|
1139
|
-
i = null, o(new
|
|
1139
|
+
i = null, o(new E(`timeout ${t} of ms exceeded`, E.ETIMEDOUT));
|
|
1140
1140
|
}, t);
|
|
1141
1141
|
const l = () => {
|
|
1142
1142
|
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
@@ -1147,7 +1147,7 @@ const kt = (e) => {
|
|
|
1147
1147
|
const { signal: c } = r;
|
|
1148
1148
|
return c.unsubscribe = () => a.asap(l), c;
|
|
1149
1149
|
}
|
|
1150
|
-
},
|
|
1150
|
+
}, Lr = function* (e, t) {
|
|
1151
1151
|
let n = e.byteLength;
|
|
1152
1152
|
if (n < t) {
|
|
1153
1153
|
yield e;
|
|
@@ -1156,10 +1156,10 @@ const kt = (e) => {
|
|
|
1156
1156
|
let r = 0, s;
|
|
1157
1157
|
for (; r < n; )
|
|
1158
1158
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1159
|
-
},
|
|
1160
|
-
for await (const n of
|
|
1161
|
-
yield*
|
|
1162
|
-
},
|
|
1159
|
+
}, Nr = async function* (e, t) {
|
|
1160
|
+
for await (const n of Br(e))
|
|
1161
|
+
yield* Lr(n, t);
|
|
1162
|
+
}, Br = async function* (e) {
|
|
1163
1163
|
if (e[Symbol.asyncIterator]) {
|
|
1164
1164
|
yield* e;
|
|
1165
1165
|
return;
|
|
@@ -1175,8 +1175,8 @@ const kt = (e) => {
|
|
|
1175
1175
|
} finally {
|
|
1176
1176
|
await t.cancel();
|
|
1177
1177
|
}
|
|
1178
|
-
},
|
|
1179
|
-
const s =
|
|
1178
|
+
}, ht = (e, t, n, r) => {
|
|
1179
|
+
const s = Nr(e, t);
|
|
1180
1180
|
let o = 0, i, l = (c) => {
|
|
1181
1181
|
i || (i = !0, r && r(c));
|
|
1182
1182
|
};
|
|
@@ -1190,8 +1190,8 @@ const kt = (e) => {
|
|
|
1190
1190
|
}
|
|
1191
1191
|
let f = d.byteLength;
|
|
1192
1192
|
if (n) {
|
|
1193
|
-
let
|
|
1194
|
-
n(
|
|
1193
|
+
let y = o += f;
|
|
1194
|
+
n(y);
|
|
1195
1195
|
}
|
|
1196
1196
|
c.enqueue(new Uint8Array(d));
|
|
1197
1197
|
} catch (u) {
|
|
@@ -1204,15 +1204,15 @@ const kt = (e) => {
|
|
|
1204
1204
|
}, {
|
|
1205
1205
|
highWaterMark: 2
|
|
1206
1206
|
});
|
|
1207
|
-
},
|
|
1207
|
+
}, xe = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", zt = xe && typeof ReadableStream == "function", Pr = xe && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Mt = (e, ...t) => {
|
|
1208
1208
|
try {
|
|
1209
1209
|
return !!e(...t);
|
|
1210
1210
|
} catch {
|
|
1211
1211
|
return !1;
|
|
1212
1212
|
}
|
|
1213
|
-
},
|
|
1213
|
+
}, kr = zt && Mt(() => {
|
|
1214
1214
|
let e = !1;
|
|
1215
|
-
const t = new Request(
|
|
1215
|
+
const t = new Request(B.origin, {
|
|
1216
1216
|
body: new ReadableStream(),
|
|
1217
1217
|
method: "POST",
|
|
1218
1218
|
get duplex() {
|
|
@@ -1220,34 +1220,34 @@ const kt = (e) => {
|
|
|
1220
1220
|
}
|
|
1221
1221
|
}).headers.has("Content-Type");
|
|
1222
1222
|
return e && !t;
|
|
1223
|
-
}),
|
|
1224
|
-
stream:
|
|
1223
|
+
}), pt = 64 * 1024, Me = zt && Mt(() => a.isReadableStream(new Response("").body)), Ee = {
|
|
1224
|
+
stream: Me && ((e) => e.body)
|
|
1225
1225
|
};
|
|
1226
|
-
|
|
1226
|
+
xe && ((e) => {
|
|
1227
1227
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1228
|
-
!
|
|
1229
|
-
throw new
|
|
1228
|
+
!Ee[t] && (Ee[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1229
|
+
throw new E(`Response type '${t}' is not supported`, E.ERR_NOT_SUPPORT, r);
|
|
1230
1230
|
});
|
|
1231
1231
|
});
|
|
1232
1232
|
})(new Response());
|
|
1233
|
-
const
|
|
1233
|
+
const Ur = async (e) => {
|
|
1234
1234
|
if (e == null)
|
|
1235
1235
|
return 0;
|
|
1236
1236
|
if (a.isBlob(e))
|
|
1237
1237
|
return e.size;
|
|
1238
1238
|
if (a.isSpecCompliantForm(e))
|
|
1239
|
-
return (await new Request(
|
|
1239
|
+
return (await new Request(B.origin, {
|
|
1240
1240
|
method: "POST",
|
|
1241
1241
|
body: e
|
|
1242
1242
|
}).arrayBuffer()).byteLength;
|
|
1243
1243
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1244
1244
|
return e.byteLength;
|
|
1245
1245
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1246
|
-
return (await
|
|
1247
|
-
},
|
|
1246
|
+
return (await Pr(e)).byteLength;
|
|
1247
|
+
}, Ir = async (e, t) => {
|
|
1248
1248
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1249
|
-
return n ??
|
|
1250
|
-
},
|
|
1249
|
+
return n ?? Ur(t);
|
|
1250
|
+
}, Fr = xe && (async (e) => {
|
|
1251
1251
|
let {
|
|
1252
1252
|
url: t,
|
|
1253
1253
|
method: n,
|
|
@@ -1260,33 +1260,33 @@ const xr = async (e) => {
|
|
|
1260
1260
|
responseType: u,
|
|
1261
1261
|
headers: d,
|
|
1262
1262
|
withCredentials: f = "same-origin",
|
|
1263
|
-
fetchOptions:
|
|
1264
|
-
} =
|
|
1263
|
+
fetchOptions: y
|
|
1264
|
+
} = Dt(e);
|
|
1265
1265
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1266
|
-
let R =
|
|
1266
|
+
let R = vr([s, o && o.toAbortSignal()], i), h;
|
|
1267
1267
|
const w = R && R.unsubscribe && (() => {
|
|
1268
1268
|
R.unsubscribe();
|
|
1269
1269
|
});
|
|
1270
|
-
let
|
|
1270
|
+
let p;
|
|
1271
1271
|
try {
|
|
1272
|
-
if (c &&
|
|
1273
|
-
let
|
|
1272
|
+
if (c && kr && n !== "get" && n !== "head" && (p = await Ir(d, r)) !== 0) {
|
|
1273
|
+
let N = new Request(t, {
|
|
1274
1274
|
method: "POST",
|
|
1275
1275
|
body: r,
|
|
1276
1276
|
duplex: "half"
|
|
1277
|
-
}),
|
|
1278
|
-
if (a.isFormData(r) && (
|
|
1279
|
-
const [
|
|
1280
|
-
|
|
1281
|
-
|
|
1277
|
+
}), L;
|
|
1278
|
+
if (a.isFormData(r) && (L = N.headers.get("content-type")) && d.setContentType(L), N.body) {
|
|
1279
|
+
const [D, W] = ut(
|
|
1280
|
+
p,
|
|
1281
|
+
ye(dt(c))
|
|
1282
1282
|
);
|
|
1283
|
-
r =
|
|
1283
|
+
r = ht(N.body, pt, D, W);
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
1286
|
a.isString(f) || (f = f ? "include" : "omit");
|
|
1287
1287
|
const S = "credentials" in Request.prototype;
|
|
1288
|
-
|
|
1289
|
-
...
|
|
1288
|
+
h = new Request(t, {
|
|
1289
|
+
...y,
|
|
1290
1290
|
signal: R,
|
|
1291
1291
|
method: n.toUpperCase(),
|
|
1292
1292
|
headers: d.normalize().toJSON(),
|
|
@@ -1294,50 +1294,50 @@ const xr = async (e) => {
|
|
|
1294
1294
|
duplex: "half",
|
|
1295
1295
|
credentials: S ? f : void 0
|
|
1296
1296
|
});
|
|
1297
|
-
let _ = await fetch(
|
|
1298
|
-
const T =
|
|
1299
|
-
if (
|
|
1300
|
-
const
|
|
1297
|
+
let _ = await fetch(h, y);
|
|
1298
|
+
const T = Me && (u === "stream" || u === "response");
|
|
1299
|
+
if (Me && (l || T && w)) {
|
|
1300
|
+
const N = {};
|
|
1301
1301
|
["status", "statusText", "headers"].forEach((m) => {
|
|
1302
|
-
|
|
1302
|
+
N[m] = _[m];
|
|
1303
1303
|
});
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1306
|
-
|
|
1304
|
+
const L = a.toFiniteNumber(_.headers.get("content-length")), [D, W] = l && ut(
|
|
1305
|
+
L,
|
|
1306
|
+
ye(dt(l), !0)
|
|
1307
1307
|
) || [];
|
|
1308
1308
|
_ = new Response(
|
|
1309
|
-
|
|
1310
|
-
|
|
1309
|
+
ht(_.body, pt, D, () => {
|
|
1310
|
+
W && W(), w && w();
|
|
1311
1311
|
}),
|
|
1312
|
-
|
|
1312
|
+
N
|
|
1313
1313
|
);
|
|
1314
1314
|
}
|
|
1315
1315
|
u = u || "text";
|
|
1316
|
-
let
|
|
1317
|
-
return !T && w && w(), await new Promise((
|
|
1318
|
-
|
|
1319
|
-
data:
|
|
1320
|
-
headers:
|
|
1316
|
+
let x = await Ee[a.findKey(Ee, u) || "text"](_, e);
|
|
1317
|
+
return !T && w && w(), await new Promise((N, L) => {
|
|
1318
|
+
It(N, L, {
|
|
1319
|
+
data: x,
|
|
1320
|
+
headers: F.from(_.headers),
|
|
1321
1321
|
status: _.status,
|
|
1322
1322
|
statusText: _.statusText,
|
|
1323
1323
|
config: e,
|
|
1324
|
-
request:
|
|
1324
|
+
request: h
|
|
1325
1325
|
});
|
|
1326
1326
|
});
|
|
1327
1327
|
} catch (S) {
|
|
1328
1328
|
throw w && w(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
|
|
1329
|
-
new
|
|
1329
|
+
new E("Network Error", E.ERR_NETWORK, e, h),
|
|
1330
1330
|
{
|
|
1331
1331
|
cause: S.cause || S
|
|
1332
1332
|
}
|
|
1333
|
-
) :
|
|
1333
|
+
) : E.from(S, S && S.code, e, h);
|
|
1334
1334
|
}
|
|
1335
|
-
}),
|
|
1336
|
-
http:
|
|
1337
|
-
xhr:
|
|
1338
|
-
fetch:
|
|
1335
|
+
}), je = {
|
|
1336
|
+
http: Zn,
|
|
1337
|
+
xhr: Cr,
|
|
1338
|
+
fetch: Fr
|
|
1339
1339
|
};
|
|
1340
|
-
a.forEach(
|
|
1340
|
+
a.forEach(je, (e, t) => {
|
|
1341
1341
|
if (e) {
|
|
1342
1342
|
try {
|
|
1343
1343
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1346,7 +1346,7 @@ a.forEach(Ue, (e, t) => {
|
|
|
1346
1346
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1347
1347
|
}
|
|
1348
1348
|
});
|
|
1349
|
-
const
|
|
1349
|
+
const mt = (e) => `- ${e}`, Dr = (e) => a.isFunction(e) || e === null || e === !1, jt = {
|
|
1350
1350
|
getAdapter: (e) => {
|
|
1351
1351
|
e = a.isArray(e) ? e : [e];
|
|
1352
1352
|
const { length: t } = e;
|
|
@@ -1355,8 +1355,8 @@ const ct = (e) => `- ${e}`, Nr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1355
1355
|
for (let o = 0; o < t; o++) {
|
|
1356
1356
|
n = e[o];
|
|
1357
1357
|
let i;
|
|
1358
|
-
if (r = n, !
|
|
1359
|
-
throw new
|
|
1358
|
+
if (r = n, !Dr(n) && (r = je[(i = String(n)).toLowerCase()], r === void 0))
|
|
1359
|
+
throw new E(`Unknown adapter '${i}'`);
|
|
1360
1360
|
if (r)
|
|
1361
1361
|
break;
|
|
1362
1362
|
s[i || "#" + o] = r;
|
|
@@ -1366,57 +1366,57 @@ const ct = (e) => `- ${e}`, Nr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1366
1366
|
([l, c]) => `adapter ${l} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1367
1367
|
);
|
|
1368
1368
|
let i = t ? o.length > 1 ? `since :
|
|
1369
|
-
` + o.map(
|
|
1370
|
-
`) : " " +
|
|
1371
|
-
throw new
|
|
1369
|
+
` + o.map(mt).join(`
|
|
1370
|
+
`) : " " + mt(o[0]) : "as no adapter specified";
|
|
1371
|
+
throw new E(
|
|
1372
1372
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1373
1373
|
"ERR_NOT_SUPPORT"
|
|
1374
1374
|
);
|
|
1375
1375
|
}
|
|
1376
1376
|
return r;
|
|
1377
1377
|
},
|
|
1378
|
-
adapters:
|
|
1378
|
+
adapters: je
|
|
1379
1379
|
};
|
|
1380
|
-
function
|
|
1380
|
+
function Ie(e) {
|
|
1381
1381
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1382
|
-
throw new
|
|
1382
|
+
throw new re(null, e);
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
return
|
|
1384
|
+
function wt(e) {
|
|
1385
|
+
return Ie(e), e.headers = F.from(e.headers), e.data = Ue.call(
|
|
1386
1386
|
e,
|
|
1387
1387
|
e.transformRequest
|
|
1388
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1389
|
-
return
|
|
1388
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), jt.getAdapter(e.adapter || ue.adapter)(e).then(function(r) {
|
|
1389
|
+
return Ie(e), r.data = Ue.call(
|
|
1390
1390
|
e,
|
|
1391
1391
|
e.transformResponse,
|
|
1392
1392
|
r
|
|
1393
|
-
), r.headers =
|
|
1393
|
+
), r.headers = F.from(r.headers), r;
|
|
1394
1394
|
}, function(r) {
|
|
1395
|
-
return
|
|
1395
|
+
return Ut(r) || (Ie(e), r && r.response && (r.response.data = Ue.call(
|
|
1396
1396
|
e,
|
|
1397
1397
|
e.transformResponse,
|
|
1398
1398
|
r.response
|
|
1399
|
-
), r.response.headers =
|
|
1399
|
+
), r.response.headers = F.from(r.response.headers))), Promise.reject(r);
|
|
1400
1400
|
});
|
|
1401
1401
|
}
|
|
1402
|
-
const
|
|
1402
|
+
const $t = "1.10.0", Oe = {};
|
|
1403
1403
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1404
|
-
|
|
1404
|
+
Oe[e] = function(r) {
|
|
1405
1405
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1406
1406
|
};
|
|
1407
1407
|
});
|
|
1408
|
-
const
|
|
1409
|
-
|
|
1408
|
+
const gt = {};
|
|
1409
|
+
Oe.transitional = function(t, n, r) {
|
|
1410
1410
|
function s(o, i) {
|
|
1411
|
-
return "[Axios v" +
|
|
1411
|
+
return "[Axios v" + $t + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1412
1412
|
}
|
|
1413
1413
|
return (o, i, l) => {
|
|
1414
1414
|
if (t === !1)
|
|
1415
|
-
throw new
|
|
1415
|
+
throw new E(
|
|
1416
1416
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1417
|
-
|
|
1417
|
+
E.ERR_DEPRECATED
|
|
1418
1418
|
);
|
|
1419
|
-
return n && !
|
|
1419
|
+
return n && !gt[i] && (gt[i] = !0, console.warn(
|
|
1420
1420
|
s(
|
|
1421
1421
|
i,
|
|
1422
1422
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1424,12 +1424,12 @@ _e.transitional = function(t, n, r) {
|
|
|
1424
1424
|
)), t ? t(o, i, l) : !0;
|
|
1425
1425
|
};
|
|
1426
1426
|
};
|
|
1427
|
-
|
|
1427
|
+
Oe.spelling = function(t) {
|
|
1428
1428
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1429
1429
|
};
|
|
1430
|
-
function
|
|
1430
|
+
function zr(e, t, n) {
|
|
1431
1431
|
if (typeof e != "object")
|
|
1432
|
-
throw new
|
|
1432
|
+
throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
|
|
1433
1433
|
const r = Object.keys(e);
|
|
1434
1434
|
let s = r.length;
|
|
1435
1435
|
for (; s-- > 0; ) {
|
|
@@ -1437,22 +1437,22 @@ function kr(e, t, n) {
|
|
|
1437
1437
|
if (i) {
|
|
1438
1438
|
const l = e[o], c = l === void 0 || i(l, o, e);
|
|
1439
1439
|
if (c !== !0)
|
|
1440
|
-
throw new
|
|
1440
|
+
throw new E("option " + o + " must be " + c, E.ERR_BAD_OPTION_VALUE);
|
|
1441
1441
|
continue;
|
|
1442
1442
|
}
|
|
1443
1443
|
if (n !== !0)
|
|
1444
|
-
throw new
|
|
1444
|
+
throw new E("Unknown option " + o, E.ERR_BAD_OPTION);
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
|
-
const
|
|
1448
|
-
assertOptions:
|
|
1449
|
-
validators:
|
|
1450
|
-
},
|
|
1451
|
-
let
|
|
1447
|
+
const ge = {
|
|
1448
|
+
assertOptions: zr,
|
|
1449
|
+
validators: Oe
|
|
1450
|
+
}, H = ge.validators;
|
|
1451
|
+
let Y = class {
|
|
1452
1452
|
constructor(t) {
|
|
1453
1453
|
this.defaults = t || {}, this.interceptors = {
|
|
1454
|
-
request: new
|
|
1455
|
-
response: new
|
|
1454
|
+
request: new ct(),
|
|
1455
|
+
response: new ct()
|
|
1456
1456
|
};
|
|
1457
1457
|
}
|
|
1458
1458
|
/**
|
|
@@ -1481,20 +1481,20 @@ let K = class {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
1483
|
_request(t, n) {
|
|
1484
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1484
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = ee(this.defaults, n);
|
|
1485
1485
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1486
|
-
r !== void 0 &&
|
|
1487
|
-
silentJSONParsing:
|
|
1488
|
-
forcedJSONParsing:
|
|
1489
|
-
clarifyTimeoutError:
|
|
1486
|
+
r !== void 0 && ge.assertOptions(r, {
|
|
1487
|
+
silentJSONParsing: H.transitional(H.boolean),
|
|
1488
|
+
forcedJSONParsing: H.transitional(H.boolean),
|
|
1489
|
+
clarifyTimeoutError: H.transitional(H.boolean)
|
|
1490
1490
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1491
1491
|
serialize: s
|
|
1492
|
-
} :
|
|
1493
|
-
encode:
|
|
1494
|
-
serialize:
|
|
1495
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1496
|
-
baseUrl:
|
|
1497
|
-
withXsrfToken:
|
|
1492
|
+
} : ge.assertOptions(s, {
|
|
1493
|
+
encode: H.function,
|
|
1494
|
+
serialize: H.function
|
|
1495
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ge.assertOptions(n, {
|
|
1496
|
+
baseUrl: H.spelling("baseURL"),
|
|
1497
|
+
withXsrfToken: H.spelling("withXSRFToken")
|
|
1498
1498
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1499
1499
|
let i = o && a.merge(
|
|
1500
1500
|
o.common,
|
|
@@ -1502,10 +1502,10 @@ let K = class {
|
|
|
1502
1502
|
);
|
|
1503
1503
|
o && a.forEach(
|
|
1504
1504
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1505
|
-
(
|
|
1506
|
-
delete o[
|
|
1505
|
+
(h) => {
|
|
1506
|
+
delete o[h];
|
|
1507
1507
|
}
|
|
1508
|
-
), n.headers =
|
|
1508
|
+
), n.headers = F.concat(i, o);
|
|
1509
1509
|
const l = [];
|
|
1510
1510
|
let c = !0;
|
|
1511
1511
|
this.interceptors.request.forEach(function(w) {
|
|
@@ -1515,42 +1515,42 @@ let K = class {
|
|
|
1515
1515
|
this.interceptors.response.forEach(function(w) {
|
|
1516
1516
|
u.push(w.fulfilled, w.rejected);
|
|
1517
1517
|
});
|
|
1518
|
-
let d, f = 0,
|
|
1518
|
+
let d, f = 0, y;
|
|
1519
1519
|
if (!c) {
|
|
1520
|
-
const
|
|
1521
|
-
for (
|
|
1522
|
-
d = d.then(
|
|
1520
|
+
const h = [wt.bind(this), void 0];
|
|
1521
|
+
for (h.unshift.apply(h, l), h.push.apply(h, u), y = h.length, d = Promise.resolve(n); f < y; )
|
|
1522
|
+
d = d.then(h[f++], h[f++]);
|
|
1523
1523
|
return d;
|
|
1524
1524
|
}
|
|
1525
|
-
|
|
1525
|
+
y = l.length;
|
|
1526
1526
|
let R = n;
|
|
1527
|
-
for (f = 0; f <
|
|
1528
|
-
const
|
|
1527
|
+
for (f = 0; f < y; ) {
|
|
1528
|
+
const h = l[f++], w = l[f++];
|
|
1529
1529
|
try {
|
|
1530
|
-
R =
|
|
1531
|
-
} catch (
|
|
1532
|
-
w.call(this,
|
|
1530
|
+
R = h(R);
|
|
1531
|
+
} catch (p) {
|
|
1532
|
+
w.call(this, p);
|
|
1533
1533
|
break;
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
1536
|
try {
|
|
1537
|
-
d =
|
|
1538
|
-
} catch (
|
|
1539
|
-
return Promise.reject(
|
|
1537
|
+
d = wt.call(this, R);
|
|
1538
|
+
} catch (h) {
|
|
1539
|
+
return Promise.reject(h);
|
|
1540
1540
|
}
|
|
1541
|
-
for (f = 0,
|
|
1541
|
+
for (f = 0, y = u.length; f < y; )
|
|
1542
1542
|
d = d.then(u[f++], u[f++]);
|
|
1543
1543
|
return d;
|
|
1544
1544
|
}
|
|
1545
1545
|
getUri(t) {
|
|
1546
|
-
t =
|
|
1547
|
-
const n =
|
|
1548
|
-
return
|
|
1546
|
+
t = ee(this.defaults, t);
|
|
1547
|
+
const n = Ft(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1548
|
+
return Bt(n, t.params, t.paramsSerializer);
|
|
1549
1549
|
}
|
|
1550
1550
|
};
|
|
1551
1551
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1552
|
-
|
|
1553
|
-
return this.request(
|
|
1552
|
+
Y.prototype[t] = function(n, r) {
|
|
1553
|
+
return this.request(ee(r || {}, {
|
|
1554
1554
|
method: t,
|
|
1555
1555
|
url: n,
|
|
1556
1556
|
data: (r || {}).data
|
|
@@ -1560,7 +1560,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1560
1560
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1561
1561
|
function n(r) {
|
|
1562
1562
|
return function(o, i, l) {
|
|
1563
|
-
return this.request(
|
|
1563
|
+
return this.request(ee(l || {}, {
|
|
1564
1564
|
method: t,
|
|
1565
1565
|
headers: r ? {
|
|
1566
1566
|
"Content-Type": "multipart/form-data"
|
|
@@ -1570,9 +1570,9 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1570
1570
|
}));
|
|
1571
1571
|
};
|
|
1572
1572
|
}
|
|
1573
|
-
|
|
1573
|
+
Y.prototype[t] = n(), Y.prototype[t + "Form"] = n(!0);
|
|
1574
1574
|
});
|
|
1575
|
-
let
|
|
1575
|
+
let Mr = class qt {
|
|
1576
1576
|
constructor(t) {
|
|
1577
1577
|
if (typeof t != "function")
|
|
1578
1578
|
throw new TypeError("executor must be a function.");
|
|
@@ -1596,7 +1596,7 @@ let vr = class It {
|
|
|
1596
1596
|
r.unsubscribe(o);
|
|
1597
1597
|
}, i;
|
|
1598
1598
|
}, t(function(o, i, l) {
|
|
1599
|
-
r.reason || (r.reason = new
|
|
1599
|
+
r.reason || (r.reason = new re(o, i, l), n(r.reason));
|
|
1600
1600
|
});
|
|
1601
1601
|
}
|
|
1602
1602
|
/**
|
|
@@ -1638,22 +1638,22 @@ let vr = class It {
|
|
|
1638
1638
|
static source() {
|
|
1639
1639
|
let t;
|
|
1640
1640
|
return {
|
|
1641
|
-
token: new
|
|
1641
|
+
token: new qt(function(s) {
|
|
1642
1642
|
t = s;
|
|
1643
1643
|
}),
|
|
1644
1644
|
cancel: t
|
|
1645
1645
|
};
|
|
1646
1646
|
}
|
|
1647
1647
|
};
|
|
1648
|
-
function
|
|
1648
|
+
function jr(e) {
|
|
1649
1649
|
return function(n) {
|
|
1650
1650
|
return e.apply(null, n);
|
|
1651
1651
|
};
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function $r(e) {
|
|
1654
1654
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1655
1655
|
}
|
|
1656
|
-
const
|
|
1656
|
+
const $e = {
|
|
1657
1657
|
Continue: 100,
|
|
1658
1658
|
SwitchingProtocols: 101,
|
|
1659
1659
|
Processing: 102,
|
|
@@ -1718,59 +1718,59 @@ const Ie = {
|
|
|
1718
1718
|
NotExtended: 510,
|
|
1719
1719
|
NetworkAuthenticationRequired: 511
|
|
1720
1720
|
};
|
|
1721
|
-
Object.entries(
|
|
1722
|
-
|
|
1721
|
+
Object.entries($e).forEach(([e, t]) => {
|
|
1722
|
+
$e[t] = e;
|
|
1723
1723
|
});
|
|
1724
|
-
function
|
|
1725
|
-
const t = new
|
|
1726
|
-
return a.extend(n,
|
|
1727
|
-
return
|
|
1724
|
+
function Ht(e) {
|
|
1725
|
+
const t = new Y(e), n = bt(Y.prototype.request, t);
|
|
1726
|
+
return a.extend(n, Y.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1727
|
+
return Ht(ee(e, s));
|
|
1728
1728
|
}, n;
|
|
1729
1729
|
}
|
|
1730
|
-
const
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1730
|
+
const v = Ht(ue);
|
|
1731
|
+
v.Axios = Y;
|
|
1732
|
+
v.CanceledError = re;
|
|
1733
|
+
v.CancelToken = Mr;
|
|
1734
|
+
v.isCancel = Ut;
|
|
1735
|
+
v.VERSION = $t;
|
|
1736
|
+
v.toFormData = Ae;
|
|
1737
|
+
v.AxiosError = E;
|
|
1738
|
+
v.Cancel = v.CanceledError;
|
|
1739
|
+
v.all = function(t) {
|
|
1740
1740
|
return Promise.all(t);
|
|
1741
1741
|
};
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1742
|
+
v.spread = jr;
|
|
1743
|
+
v.isAxiosError = $r;
|
|
1744
|
+
v.mergeConfig = ee;
|
|
1745
|
+
v.AxiosHeaders = F;
|
|
1746
|
+
v.formToJSON = (e) => kt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1747
|
+
v.getAdapter = jt.getAdapter;
|
|
1748
|
+
v.HttpStatusCode = $e;
|
|
1749
|
+
v.default = v;
|
|
1750
1750
|
const {
|
|
1751
|
-
Axios:
|
|
1752
|
-
AxiosError:
|
|
1753
|
-
CanceledError:
|
|
1754
|
-
isCancel:
|
|
1755
|
-
CancelToken:
|
|
1756
|
-
VERSION:
|
|
1757
|
-
all:
|
|
1758
|
-
Cancel:
|
|
1759
|
-
isAxiosError:
|
|
1760
|
-
spread:
|
|
1761
|
-
toFormData:
|
|
1762
|
-
AxiosHeaders:
|
|
1763
|
-
HttpStatusCode:
|
|
1764
|
-
formToJSON:
|
|
1765
|
-
getAdapter:
|
|
1766
|
-
mergeConfig:
|
|
1767
|
-
} =
|
|
1768
|
-
class
|
|
1751
|
+
Axios: Ms,
|
|
1752
|
+
AxiosError: js,
|
|
1753
|
+
CanceledError: $s,
|
|
1754
|
+
isCancel: qs,
|
|
1755
|
+
CancelToken: Hs,
|
|
1756
|
+
VERSION: Vs,
|
|
1757
|
+
all: Ws,
|
|
1758
|
+
Cancel: Gs,
|
|
1759
|
+
isAxiosError: Js,
|
|
1760
|
+
spread: Qs,
|
|
1761
|
+
toFormData: Ks,
|
|
1762
|
+
AxiosHeaders: Xs,
|
|
1763
|
+
HttpStatusCode: Zs,
|
|
1764
|
+
formToJSON: Ys,
|
|
1765
|
+
getAdapter: eo,
|
|
1766
|
+
mergeConfig: to
|
|
1767
|
+
} = v;
|
|
1768
|
+
class qr {
|
|
1769
1769
|
// 30 segundos
|
|
1770
1770
|
constructor() {
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
this.apiUrl =
|
|
1771
|
+
Be(this, "apiUrl");
|
|
1772
|
+
Be(this, "timeout", 3e4);
|
|
1773
|
+
this.apiUrl = be.QWEN_TTS_API_URL;
|
|
1774
1774
|
}
|
|
1775
1775
|
/**
|
|
1776
1776
|
* Sintetiza texto a voz usando Qwen3-TTS-Flash a través de ocity_tts API
|
|
@@ -1783,11 +1783,11 @@ class Ur {
|
|
|
1783
1783
|
try {
|
|
1784
1784
|
const {
|
|
1785
1785
|
text: f,
|
|
1786
|
-
voice:
|
|
1786
|
+
voice: y = "Peter",
|
|
1787
1787
|
languageType: R = "English",
|
|
1788
|
-
emotion:
|
|
1788
|
+
emotion: h,
|
|
1789
1789
|
speed: w,
|
|
1790
|
-
pitch:
|
|
1790
|
+
pitch: p,
|
|
1791
1791
|
purpose: S,
|
|
1792
1792
|
preset: _
|
|
1793
1793
|
} = t;
|
|
@@ -1798,21 +1798,21 @@ class Ur {
|
|
|
1798
1798
|
"[Qwen TTS] Text must not exceed 512 characters (Qwen3-TTS limit)"
|
|
1799
1799
|
);
|
|
1800
1800
|
console.log(
|
|
1801
|
-
`[Qwen TTS] Processing request: text="${f.substring(0, 50)}..." voice=${
|
|
1801
|
+
`[Qwen TTS] Processing request: text="${f.substring(0, 50)}..." voice=${y}`
|
|
1802
1802
|
);
|
|
1803
1803
|
const T = {
|
|
1804
1804
|
text: f,
|
|
1805
|
-
voice:
|
|
1805
|
+
voice: y,
|
|
1806
1806
|
languageType: R
|
|
1807
1807
|
};
|
|
1808
|
-
_ && (T.preset = _, console.log(`[Qwen TTS] Preset: ${_}`)),
|
|
1809
|
-
const
|
|
1808
|
+
_ && (T.preset = _, console.log(`[Qwen TTS] Preset: ${_}`)), h && (T.emotion = h, console.log(`[Qwen TTS] Emotion: ${h}`)), w !== void 0 && (T.speed = w, console.log(`[Qwen TTS] Speed: ${w}`)), p !== void 0 && (T.pitch = p, console.log(`[Qwen TTS] Pitch: ${p}`)), S && (T.purpose = S, console.log(`[Qwen TTS] Purpose: ${S}`));
|
|
1809
|
+
const x = T;
|
|
1810
1810
|
console.log(
|
|
1811
1811
|
`[Qwen TTS] Sending request to ${this.apiUrl}/api/v1/tts/audio`
|
|
1812
1812
|
);
|
|
1813
|
-
const
|
|
1813
|
+
const L = (await v.post(
|
|
1814
1814
|
`${this.apiUrl}/api/v1/tts/audio`,
|
|
1815
|
-
|
|
1815
|
+
x,
|
|
1816
1816
|
{
|
|
1817
1817
|
headers: {
|
|
1818
1818
|
"Content-Type": "application/json"
|
|
@@ -1821,17 +1821,17 @@ class Ur {
|
|
|
1821
1821
|
timeout: this.timeout
|
|
1822
1822
|
}
|
|
1823
1823
|
)).data;
|
|
1824
|
-
if (!
|
|
1824
|
+
if (!L || L.size === 0)
|
|
1825
1825
|
throw new Error("[Qwen TTS] No audio content received from server");
|
|
1826
1826
|
return console.log(
|
|
1827
|
-
`[Qwen TTS] Successfully received audio (${
|
|
1827
|
+
`[Qwen TTS] Successfully received audio (${L.size} bytes)`
|
|
1828
1828
|
), {
|
|
1829
|
-
audio:
|
|
1829
|
+
audio: L,
|
|
1830
1830
|
mimeType: "audio/wav"
|
|
1831
1831
|
};
|
|
1832
1832
|
} catch (f) {
|
|
1833
|
-
const
|
|
1834
|
-
if (console.error(`[Qwen TTS] Error: ${
|
|
1833
|
+
const y = f instanceof Error ? f.message : String(f);
|
|
1834
|
+
if (console.error(`[Qwen TTS] Error: ${y}`), f instanceof v.AxiosError) {
|
|
1835
1835
|
if (((n = f.response) == null ? void 0 : n.status) === 401 || ((r = f.response) == null ? void 0 : r.status) === 403)
|
|
1836
1836
|
throw new Error(
|
|
1837
1837
|
"[Qwen TTS] Unauthorized: Invalid credentials or API key on server"
|
|
@@ -1849,46 +1849,46 @@ class Ur {
|
|
|
1849
1849
|
) : f.code === "ERR_NETWORK" ? new Error(
|
|
1850
1850
|
`[Qwen TTS] Network error: Cannot reach Qwen TTS service at ${this.apiUrl}`
|
|
1851
1851
|
) : new Error(
|
|
1852
|
-
`[Qwen TTS] API Error (${(c = f.response) == null ? void 0 : c.status}): ${((d = (u = f.response) == null ? void 0 : u.data) == null ? void 0 : d.message) ||
|
|
1852
|
+
`[Qwen TTS] API Error (${(c = f.response) == null ? void 0 : c.status}): ${((d = (u = f.response) == null ? void 0 : u.data) == null ? void 0 : d.message) || y}`
|
|
1853
1853
|
);
|
|
1854
1854
|
}
|
|
1855
1855
|
throw f;
|
|
1856
1856
|
}
|
|
1857
1857
|
}
|
|
1858
1858
|
}
|
|
1859
|
-
const
|
|
1860
|
-
function
|
|
1861
|
-
const [t, n] =
|
|
1859
|
+
const Hr = new qr();
|
|
1860
|
+
function Vr(e) {
|
|
1861
|
+
const [t, n] = C({
|
|
1862
1862
|
isPlaying: !1,
|
|
1863
1863
|
isPaused: !1,
|
|
1864
1864
|
progress: 0,
|
|
1865
1865
|
currentPNGTuber: 0,
|
|
1866
1866
|
avatars: e.avatars,
|
|
1867
1867
|
error: null
|
|
1868
|
-
}), [r, s] =
|
|
1869
|
-
|
|
1868
|
+
}), [r, s] = C(e.autoAdvance || !1), [o, i] = C(!1), [, l] = C(0), c = U(null), u = U(null), d = U(r), f = U(!1), y = U(null);
|
|
1869
|
+
z(() => {
|
|
1870
1870
|
d.current = r;
|
|
1871
1871
|
}, [r]);
|
|
1872
1872
|
const R = (m) => {
|
|
1873
1873
|
if (e.avatars.length <= 1) return 0;
|
|
1874
|
-
const b = e.avatars.length,
|
|
1875
|
-
return Math.min(Math.floor(m /
|
|
1876
|
-
},
|
|
1874
|
+
const b = e.avatars.length, M = 100 / b;
|
|
1875
|
+
return Math.min(Math.floor(m / M), b - 1);
|
|
1876
|
+
}, h = () => {
|
|
1877
1877
|
u.current && (clearInterval(u.current), u.current = null);
|
|
1878
1878
|
}, w = () => {
|
|
1879
1879
|
c.current && (u.current = setInterval(() => {
|
|
1880
1880
|
if (c.current && c.current.duration) {
|
|
1881
|
-
const m = c.current.currentTime, b = c.current.duration,
|
|
1882
|
-
n((
|
|
1883
|
-
...
|
|
1884
|
-
progress: Math.min(
|
|
1885
|
-
currentPNGTuber: R(
|
|
1881
|
+
const m = c.current.currentTime, b = c.current.duration, M = m / b * 100;
|
|
1882
|
+
n((V) => ({
|
|
1883
|
+
...V,
|
|
1884
|
+
progress: Math.min(M, 100),
|
|
1885
|
+
currentPNGTuber: R(M)
|
|
1886
1886
|
}));
|
|
1887
1887
|
}
|
|
1888
1888
|
}, 100));
|
|
1889
|
-
},
|
|
1889
|
+
}, p = () => {
|
|
1890
1890
|
var m;
|
|
1891
|
-
c.current && !t.isPaused && (c.current.pause(),
|
|
1891
|
+
c.current && !t.isPaused && (c.current.pause(), h(), n((b) => ({ ...b, isPlaying: !1, isPaused: !0 })), (m = e.onPause) == null || m.call(e));
|
|
1892
1892
|
}, S = async () => {
|
|
1893
1893
|
if (c.current && t.isPaused)
|
|
1894
1894
|
try {
|
|
@@ -1899,8 +1899,8 @@ function Fr(e) {
|
|
|
1899
1899
|
error: { type: "audio", message: "Error al reanudar la reproducción" }
|
|
1900
1900
|
}));
|
|
1901
1901
|
}
|
|
1902
|
-
}, _ = () =>
|
|
1903
|
-
|
|
1902
|
+
}, _ = () => x(!0), T = () => s((m) => !m), x = (m = !1) => {
|
|
1903
|
+
h(), c.current && (y.current && (c.current.removeEventListener("ended", y.current), y.current = null), c.current.removeEventListener("error", N), c.current.removeEventListener("pause", L), c.current.pause(), c.current.currentTime = 0, c.current.src = "", c.current.load(), c.current = null), n((b) => ({
|
|
1904
1904
|
...b,
|
|
1905
1905
|
isPlaying: !1,
|
|
1906
1906
|
isPaused: !1,
|
|
@@ -1910,14 +1910,14 @@ function Fr(e) {
|
|
|
1910
1910
|
var b;
|
|
1911
1911
|
return (b = e.onStop) == null ? void 0 : b.call(e);
|
|
1912
1912
|
}, 50);
|
|
1913
|
-
},
|
|
1913
|
+
}, N = () => {
|
|
1914
1914
|
n((m) => ({
|
|
1915
1915
|
...m,
|
|
1916
1916
|
error: { type: "audio", message: "Error al reproducir el audio" }
|
|
1917
|
-
})),
|
|
1918
|
-
},
|
|
1917
|
+
})), x();
|
|
1918
|
+
}, L = () => {
|
|
1919
1919
|
c.current && c.current.currentTime < c.current.duration && n((m) => ({ ...m, isPlaying: !1, isPaused: !0 }));
|
|
1920
|
-
},
|
|
1920
|
+
}, D = async () => {
|
|
1921
1921
|
if (!e.text.trim()) {
|
|
1922
1922
|
n((m) => ({
|
|
1923
1923
|
...m,
|
|
@@ -1925,27 +1925,27 @@ function Fr(e) {
|
|
|
1925
1925
|
}));
|
|
1926
1926
|
return;
|
|
1927
1927
|
}
|
|
1928
|
-
f.current = !1,
|
|
1928
|
+
f.current = !1, x(!0);
|
|
1929
1929
|
try {
|
|
1930
|
-
i(!0), n((
|
|
1931
|
-
...
|
|
1930
|
+
i(!0), n((te) => ({
|
|
1931
|
+
...te,
|
|
1932
1932
|
isPlaying: !1,
|
|
1933
1933
|
progress: 0,
|
|
1934
1934
|
currentPNGTuber: 0,
|
|
1935
1935
|
error: null
|
|
1936
1936
|
}));
|
|
1937
|
-
const m = e.voiceConfig, b = (m == null ? void 0 : m.voice) ?? e.voiceId,
|
|
1938
|
-
let
|
|
1939
|
-
|
|
1937
|
+
const m = e.voiceConfig, b = (m == null ? void 0 : m.voice) ?? e.voiceId, M = (m == null ? void 0 : m.languageType) ?? e.lang ?? "Spanish", V = `qwen-${b}-${M}-${(m == null ? void 0 : m.preset) ?? ""}-${(m == null ? void 0 : m.emotion) ?? ""}-${(m == null ? void 0 : m.speed) ?? ""}-${(m == null ? void 0 : m.pitch) ?? ""}-${e.text}`;
|
|
1938
|
+
let $ = await dn(V);
|
|
1939
|
+
$ ? console.log("[TTS] Cache hit") : ($ = (await Hr.synthesizeSpeech({
|
|
1940
1940
|
text: e.text,
|
|
1941
1941
|
voice: b,
|
|
1942
|
-
languageType:
|
|
1942
|
+
languageType: M,
|
|
1943
1943
|
preset: (m == null ? void 0 : m.preset) ?? void 0,
|
|
1944
1944
|
emotion: (m == null ? void 0 : m.emotion) ?? void 0,
|
|
1945
1945
|
speed: (m == null ? void 0 : m.speed) ?? void 0,
|
|
1946
1946
|
pitch: (m == null ? void 0 : m.pitch) ?? void 0,
|
|
1947
1947
|
purpose: (m == null ? void 0 : m.purpose) ?? void 0
|
|
1948
|
-
})).audio, await
|
|
1948
|
+
})).audio, await fn(V, $)), W($);
|
|
1949
1949
|
} catch (m) {
|
|
1950
1950
|
console.error("Error al reproducir TTS:", m), n((b) => ({
|
|
1951
1951
|
...b,
|
|
@@ -1954,31 +1954,31 @@ function Fr(e) {
|
|
|
1954
1954
|
message: `Error en la síntesis: ${m.message}`
|
|
1955
1955
|
},
|
|
1956
1956
|
isPlaying: !1
|
|
1957
|
-
})),
|
|
1957
|
+
})), h(), i(!1);
|
|
1958
1958
|
}
|
|
1959
|
-
},
|
|
1959
|
+
}, W = (m) => {
|
|
1960
1960
|
const b = URL.createObjectURL(m);
|
|
1961
1961
|
c.current = new Audio(b);
|
|
1962
|
-
const
|
|
1963
|
-
|
|
1962
|
+
const M = () => {
|
|
1963
|
+
x(!1), URL.revokeObjectURL(b);
|
|
1964
1964
|
};
|
|
1965
|
-
|
|
1966
|
-
var
|
|
1967
|
-
i(!1), n((
|
|
1965
|
+
y.current = M, c.current.addEventListener("ended", M), c.current.addEventListener("error", N), c.current.addEventListener("pause", L), c.current.addEventListener("canplaythrough", async () => {
|
|
1966
|
+
var V;
|
|
1967
|
+
i(!1), n(($) => ({ ...$, isPlaying: !0 })), w();
|
|
1968
1968
|
try {
|
|
1969
|
-
await ((
|
|
1970
|
-
} catch (
|
|
1971
|
-
console.error("Error al iniciar reproducción:",
|
|
1972
|
-
...
|
|
1969
|
+
await ((V = c.current) == null ? void 0 : V.play());
|
|
1970
|
+
} catch ($) {
|
|
1971
|
+
console.error("Error al iniciar reproducción:", $), n((te) => ({
|
|
1972
|
+
...te,
|
|
1973
1973
|
error: { type: "audio", message: "Error al iniciar la reproducción" }
|
|
1974
|
-
})),
|
|
1974
|
+
})), x();
|
|
1975
1975
|
}
|
|
1976
1976
|
});
|
|
1977
1977
|
};
|
|
1978
|
-
return
|
|
1979
|
-
|
|
1980
|
-
}, []),
|
|
1981
|
-
e.voiceId && (c.current && (c.current.pause(), c.current.src = "", c.current.load(), c.current = null),
|
|
1978
|
+
return z(() => () => {
|
|
1979
|
+
h(), c.current && (c.current.pause(), c.current.src = "", c.current.load(), c.current = null);
|
|
1980
|
+
}, []), z(() => {
|
|
1981
|
+
e.voiceId && (c.current && (c.current.pause(), c.current.src = "", c.current.load(), c.current = null), h(), n((m) => ({
|
|
1982
1982
|
...m,
|
|
1983
1983
|
isPlaying: !1,
|
|
1984
1984
|
isPaused: !1,
|
|
@@ -1987,8 +1987,8 @@ function Fr(e) {
|
|
|
1987
1987
|
})));
|
|
1988
1988
|
}, [e.voiceId]), {
|
|
1989
1989
|
...t,
|
|
1990
|
-
play:
|
|
1991
|
-
pause:
|
|
1990
|
+
play: D,
|
|
1991
|
+
pause: p,
|
|
1992
1992
|
resume: S,
|
|
1993
1993
|
stop: _,
|
|
1994
1994
|
toggleAutoAdvance: T,
|
|
@@ -1997,31 +1997,31 @@ function Fr(e) {
|
|
|
1997
1997
|
avatars: e.avatars
|
|
1998
1998
|
};
|
|
1999
1999
|
}
|
|
2000
|
-
const
|
|
2001
|
-
selectorWrapper:
|
|
2002
|
-
iconButton:
|
|
2003
|
-
dropdown:
|
|
2004
|
-
dropdownItem:
|
|
2005
|
-
active:
|
|
2006
|
-
},
|
|
2000
|
+
const Wr = "_selectorWrapper_1kmif_1", Gr = "_iconButton_1kmif_6", Jr = "_dropdown_1kmif_18", Qr = "_dropdownItem_1kmif_31", Kr = "_active_1kmif_44", ae = {
|
|
2001
|
+
selectorWrapper: Wr,
|
|
2002
|
+
iconButton: Gr,
|
|
2003
|
+
dropdown: Jr,
|
|
2004
|
+
dropdownItem: Qr,
|
|
2005
|
+
active: Kr
|
|
2006
|
+
}, Xr = ({
|
|
2007
2007
|
languages: e,
|
|
2008
2008
|
current: t,
|
|
2009
2009
|
onChange: n
|
|
2010
2010
|
}) => {
|
|
2011
|
-
const [r, s] =
|
|
2012
|
-
return
|
|
2011
|
+
const [r, s] = C(!1), [o, i] = C(t || e[0].code), l = U(null);
|
|
2012
|
+
return z(() => {
|
|
2013
2013
|
const c = (u) => {
|
|
2014
2014
|
l.current && !l.current.contains(u.target) && s(!1);
|
|
2015
2015
|
};
|
|
2016
2016
|
return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
|
|
2017
|
-
}, []), /* @__PURE__ */
|
|
2018
|
-
/* @__PURE__ */
|
|
2017
|
+
}, []), /* @__PURE__ */ j("div", { className: ae.selectorWrapper, ref: l, children: [
|
|
2018
|
+
/* @__PURE__ */ g(
|
|
2019
2019
|
"button",
|
|
2020
2020
|
{
|
|
2021
|
-
className:
|
|
2021
|
+
className: ae.iconButton,
|
|
2022
2022
|
title: "Cambiar idioma",
|
|
2023
2023
|
onClick: () => s(!r),
|
|
2024
|
-
children: /* @__PURE__ */
|
|
2024
|
+
children: /* @__PURE__ */ g(
|
|
2025
2025
|
"svg",
|
|
2026
2026
|
{
|
|
2027
2027
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2029,15 +2029,15 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2029
2029
|
width: "30px",
|
|
2030
2030
|
height: "30px",
|
|
2031
2031
|
viewBox: "0 0 24 24",
|
|
2032
|
-
children: /* @__PURE__ */
|
|
2032
|
+
children: /* @__PURE__ */ g("path", { d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z" })
|
|
2033
2033
|
}
|
|
2034
2034
|
)
|
|
2035
2035
|
}
|
|
2036
2036
|
),
|
|
2037
|
-
r && /* @__PURE__ */
|
|
2037
|
+
r && /* @__PURE__ */ g("div", { className: ae.dropdown, children: e.map((c) => /* @__PURE__ */ g(
|
|
2038
2038
|
"button",
|
|
2039
2039
|
{
|
|
2040
|
-
className: `${
|
|
2040
|
+
className: `${ae.dropdownItem} ${c.code === o ? ae.active : ""}`,
|
|
2041
2041
|
onClick: () => {
|
|
2042
2042
|
i(c.code), n == null || n(c.code), s(!1);
|
|
2043
2043
|
},
|
|
@@ -2046,45 +2046,48 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2046
2046
|
c.code
|
|
2047
2047
|
)) })
|
|
2048
2048
|
] });
|
|
2049
|
-
},
|
|
2050
|
-
controlsRow:
|
|
2051
|
-
select:
|
|
2052
|
-
autoAdvanceButton:
|
|
2053
|
-
section:
|
|
2054
|
-
textarea:
|
|
2055
|
-
input:
|
|
2056
|
-
error:
|
|
2057
|
-
buttonPrimary:
|
|
2058
|
-
buttonSuccess:
|
|
2059
|
-
infoBox:
|
|
2060
|
-
viewer:
|
|
2061
|
-
viewerTopBar:
|
|
2062
|
-
topRightControls:
|
|
2063
|
-
itemCounter:
|
|
2064
|
-
iconButton:
|
|
2065
|
-
navButton:
|
|
2066
|
-
navButtonLeft:
|
|
2067
|
-
navButtonRight:
|
|
2068
|
-
backgroundImage:
|
|
2069
|
-
avatar:
|
|
2070
|
-
caption:
|
|
2071
|
-
captionTitle:
|
|
2072
|
-
captionText:
|
|
2073
|
-
loadingOverlay:
|
|
2074
|
-
loadingSpinner:
|
|
2075
|
-
spin:
|
|
2076
|
-
loadingButton:
|
|
2077
|
-
spinner:
|
|
2078
|
-
progressBar:
|
|
2079
|
-
progressFill:
|
|
2080
|
-
playbackControls:
|
|
2081
|
-
playButton:
|
|
2082
|
-
pauseButton:
|
|
2083
|
-
|
|
2049
|
+
}, Zr = "_controlsRow_22zwh_1", Yr = "_select_22zwh_9", es = "_autoAdvanceButton_22zwh_15", ts = "_section_22zwh_26", ns = "_textarea_22zwh_36", rs = "_input_22zwh_46", ss = "_error_22zwh_54", os = "_buttonPrimary_22zwh_59", is = "_buttonSuccess_22zwh_69", as = "_infoBox_22zwh_78", cs = "_viewer_22zwh_86", ls = "_viewerTopBar_22zwh_97", us = "_topRightControls_22zwh_110", ds = "_itemCounter_22zwh_118", fs = "_iconButton_22zwh_126", hs = "_navButton_22zwh_146", ps = "_navButtonLeft_22zwh_163", ms = "_navButtonRight_22zwh_167", ws = "_backgroundImage_22zwh_171", gs = "_avatar_22zwh_178", ys = "_caption_22zwh_188", Es = "_captionTitle_22zwh_201", bs = "_captionText_22zwh_211", Ts = "_loadingOverlay_22zwh_217", Ss = "_loadingSpinner_22zwh_232", _s = "_spin_22zwh_251", Rs = "_loadingButton_22zwh_242", As = "_spinner_22zwh_251", xs = "_progressBar_22zwh_264", Os = "_progressFill_22zwh_273", Cs = "_playbackControls_22zwh_279", vs = "_playButton_22zwh_292", Ls = "_pauseButton_22zwh_293", Ns = "_elementAudioControl_22zwh_300", Bs = "_elementAudioButton_22zwh_313", Ps = "_volumeSlider_22zwh_331", A = {
|
|
2050
|
+
controlsRow: Zr,
|
|
2051
|
+
select: Yr,
|
|
2052
|
+
autoAdvanceButton: es,
|
|
2053
|
+
section: ts,
|
|
2054
|
+
textarea: ns,
|
|
2055
|
+
input: rs,
|
|
2056
|
+
error: ss,
|
|
2057
|
+
buttonPrimary: os,
|
|
2058
|
+
buttonSuccess: is,
|
|
2059
|
+
infoBox: as,
|
|
2060
|
+
viewer: cs,
|
|
2061
|
+
viewerTopBar: ls,
|
|
2062
|
+
topRightControls: us,
|
|
2063
|
+
itemCounter: ds,
|
|
2064
|
+
iconButton: fs,
|
|
2065
|
+
navButton: hs,
|
|
2066
|
+
navButtonLeft: ps,
|
|
2067
|
+
navButtonRight: ms,
|
|
2068
|
+
backgroundImage: ws,
|
|
2069
|
+
avatar: gs,
|
|
2070
|
+
caption: ys,
|
|
2071
|
+
captionTitle: Es,
|
|
2072
|
+
captionText: bs,
|
|
2073
|
+
loadingOverlay: Ts,
|
|
2074
|
+
loadingSpinner: Ss,
|
|
2075
|
+
spin: _s,
|
|
2076
|
+
loadingButton: Rs,
|
|
2077
|
+
spinner: As,
|
|
2078
|
+
progressBar: xs,
|
|
2079
|
+
progressFill: Os,
|
|
2080
|
+
playbackControls: Cs,
|
|
2081
|
+
playButton: vs,
|
|
2082
|
+
pauseButton: Ls,
|
|
2083
|
+
elementAudioControl: Ns,
|
|
2084
|
+
elementAudioButton: Bs,
|
|
2085
|
+
volumeSlider: Ps
|
|
2086
|
+
}, no = [
|
|
2084
2087
|
{ id: "Ebona", name: "Voz Mujer" },
|
|
2085
2088
|
{ id: "Bodega", name: "Voz Hombre" },
|
|
2086
2089
|
{ id: "Peter", name: "Voz Narrador" }
|
|
2087
|
-
],
|
|
2090
|
+
], yt = be.DEFAULT_IMAGE_URL, ro = ({
|
|
2088
2091
|
heritageItems: e = [],
|
|
2089
2092
|
targetLanguage: t = "es",
|
|
2090
2093
|
descriptionLength: n = "extended",
|
|
@@ -2093,15 +2096,19 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2093
2096
|
voiceIds: o = [],
|
|
2094
2097
|
avatars: i = []
|
|
2095
2098
|
}) => {
|
|
2096
|
-
const [l] =
|
|
2099
|
+
const [l] = C(e), [c, u] = C(0), [d, f] = C(n), [y, R] = C(
|
|
2097
2100
|
t
|
|
2098
|
-
), [
|
|
2101
|
+
), [h, w] = C(""), [p, S] = C([]), [_, T] = C(0), [x, N] = C(r), [L, D] = C(!1), [W, m] = C(
|
|
2099
2102
|
o.length > 0 ? o[0] : ""
|
|
2100
|
-
), b = s.length > 0 ? s.map((
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
}, [
|
|
2104
|
-
|
|
2103
|
+
), b = s.length > 0 ? s.map((O) => O.voice) : o, M = W || (b.length > 0 ? b[c % b.length] : ""), V = s.length > 0 ? s[c % s.length] : void 0, $ = i[c % i.length], [te, Ge] = C(!1), [Vt, Je] = C(!1), [Wt, de] = C(!0), Q = U(null), Qe = U(x), Ce = U(c), fe = U(l), K = U(null), he = U(!1), P = U(null), [se, Gt] = C(0.3), [ve, oe] = C(!1), Ke = U(0.3);
|
|
2104
|
+
z(() => {
|
|
2105
|
+
Qe.current = x, Ce.current = c, fe.current = l;
|
|
2106
|
+
}, [x, c, l]), z(() => {
|
|
2107
|
+
Ke.current = se, P.current && (P.current.volume = se);
|
|
2108
|
+
}, [se]), z(() => {
|
|
2109
|
+
P.current && (P.current.pause(), P.current.src = "", P.current = null, oe(!1));
|
|
2110
|
+
}, [c]);
|
|
2111
|
+
const G = l[c] || {
|
|
2105
2112
|
id: "default",
|
|
2106
2113
|
name: "Patrimonio Cultural",
|
|
2107
2114
|
description: {
|
|
@@ -2112,112 +2119,154 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2112
2119
|
},
|
|
2113
2120
|
imageUrl: ""
|
|
2114
2121
|
}, {
|
|
2115
|
-
isPlaying:
|
|
2116
|
-
isPaused:
|
|
2117
|
-
isLoadingAudio:
|
|
2118
|
-
progress:
|
|
2119
|
-
play:
|
|
2120
|
-
pause:
|
|
2121
|
-
resume:
|
|
2122
|
-
stop:
|
|
2123
|
-
} =
|
|
2124
|
-
text:
|
|
2125
|
-
lang:
|
|
2126
|
-
voiceConfig:
|
|
2122
|
+
isPlaying: J,
|
|
2123
|
+
isPaused: Xe,
|
|
2124
|
+
isLoadingAudio: Jt,
|
|
2125
|
+
progress: Ze,
|
|
2126
|
+
play: Qt,
|
|
2127
|
+
pause: Kt,
|
|
2128
|
+
resume: Xt,
|
|
2129
|
+
stop: Zt
|
|
2130
|
+
} = Vr({
|
|
2131
|
+
text: h,
|
|
2132
|
+
lang: y,
|
|
2133
|
+
voiceConfig: V,
|
|
2127
2134
|
onStop: () => {
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
const
|
|
2131
|
-
u(
|
|
2132
|
-
}, 100),
|
|
2135
|
+
de(!0), Qe.current && fe.current.length > 1 && !he.current && setTimeout(() => {
|
|
2136
|
+
D(!0);
|
|
2137
|
+
const O = (Ce.current + 1) % fe.current.length;
|
|
2138
|
+
u(O);
|
|
2139
|
+
}, 100), he.current = !1;
|
|
2133
2140
|
},
|
|
2134
|
-
voiceId:
|
|
2135
|
-
avatars: [
|
|
2141
|
+
voiceId: M,
|
|
2142
|
+
avatars: [$]
|
|
2136
2143
|
});
|
|
2137
|
-
|
|
2138
|
-
if (
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2144
|
+
z(() => {
|
|
2145
|
+
if (L && h && !h.includes("JSON válido")) {
|
|
2146
|
+
const O = setTimeout(() => {
|
|
2147
|
+
J || et(), D(!1);
|
|
2141
2148
|
}, 500);
|
|
2142
|
-
return () => clearTimeout(
|
|
2149
|
+
return () => clearTimeout(O);
|
|
2143
2150
|
}
|
|
2144
|
-
}, [
|
|
2151
|
+
}, [L, h, J]), z(() => {
|
|
2145
2152
|
(async () => {
|
|
2146
|
-
|
|
2147
|
-
|
|
2153
|
+
var X;
|
|
2154
|
+
const k = ((X = G.description.english) == null ? void 0 : X[d]) || G.description.local[d];
|
|
2155
|
+
if (k)
|
|
2148
2156
|
try {
|
|
2149
|
-
const
|
|
2150
|
-
w(`${
|
|
2151
|
-
} catch (
|
|
2152
|
-
console.error("Error en traducción:",
|
|
2157
|
+
const Ne = await st(G.name, y), rn = await st(k, y);
|
|
2158
|
+
w(`${Ne}. ${rn}`);
|
|
2159
|
+
} catch (Ne) {
|
|
2160
|
+
console.error("Error en traducción:", Ne), w(`${G.name}. ${k}`);
|
|
2153
2161
|
}
|
|
2154
2162
|
})();
|
|
2155
|
-
}, [
|
|
2156
|
-
const
|
|
2157
|
-
|
|
2158
|
-
|
|
2163
|
+
}, [G, d, y]);
|
|
2164
|
+
const Le = () => {
|
|
2165
|
+
de(!0), K.current && clearTimeout(K.current), K.current = setTimeout(() => {
|
|
2166
|
+
de(!1);
|
|
2159
2167
|
}, 4e3);
|
|
2160
|
-
},
|
|
2161
|
-
|
|
2168
|
+
}, Ye = () => {
|
|
2169
|
+
var X;
|
|
2170
|
+
if (P.current) return;
|
|
2171
|
+
const O = (X = fe.current[Ce.current]) == null ? void 0 : X.audioUrl;
|
|
2172
|
+
if (!O) return;
|
|
2173
|
+
const k = new Audio(O);
|
|
2174
|
+
k.volume = Ke.current, k.loop = !0, P.current = k, k.play().then(() => oe(!0)).catch(() => oe(!1));
|
|
2175
|
+
}, et = () => {
|
|
2176
|
+
if (!h.trim() || h.includes("JSON válido")) {
|
|
2162
2177
|
alert("No hay contenido para reproducir");
|
|
2163
2178
|
return;
|
|
2164
2179
|
}
|
|
2165
|
-
|
|
2166
|
-
},
|
|
2167
|
-
|
|
2168
|
-
},
|
|
2169
|
-
|
|
2170
|
-
},
|
|
2171
|
-
|
|
2172
|
-
},
|
|
2173
|
-
|
|
2174
|
-
},
|
|
2175
|
-
|
|
2180
|
+
Ye(), Qt(), Le();
|
|
2181
|
+
}, Yt = () => {
|
|
2182
|
+
Kt();
|
|
2183
|
+
}, en = () => {
|
|
2184
|
+
Ye(), Xt(), Le();
|
|
2185
|
+
}, tt = () => {
|
|
2186
|
+
Zt(), D(!1), Q.current && clearTimeout(Q.current), K.current && clearTimeout(K.current), de(!0);
|
|
2187
|
+
}, tn = () => {
|
|
2188
|
+
he.current = !0, tt(), c > 0 && u((O) => O - 1);
|
|
2189
|
+
}, nn = () => {
|
|
2190
|
+
he.current = !0, tt(), c < l.length - 1 && u((O) => O + 1);
|
|
2176
2191
|
};
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
}, []),
|
|
2180
|
-
if (
|
|
2181
|
-
const
|
|
2182
|
-
S(
|
|
2192
|
+
z(() => () => {
|
|
2193
|
+
Q.current && clearTimeout(Q.current), K.current && clearTimeout(K.current), P.current && (P.current.pause(), P.current.src = "", P.current = null);
|
|
2194
|
+
}, []), z(() => {
|
|
2195
|
+
if (h) {
|
|
2196
|
+
const O = h.split(new RegExp("(?<=[.!?])\\s+", "g")).map((k) => k.trim()).filter((k) => k.length > 0);
|
|
2197
|
+
S(O), T(0);
|
|
2183
2198
|
}
|
|
2184
|
-
}, [
|
|
2185
|
-
if (!
|
|
2186
|
-
|
|
2187
|
-
const
|
|
2188
|
-
|
|
2189
|
-
T((
|
|
2190
|
-
},
|
|
2191
|
-
}, [
|
|
2192
|
-
const [
|
|
2193
|
-
return
|
|
2194
|
-
!
|
|
2195
|
-
}, [c, b,
|
|
2196
|
-
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */
|
|
2199
|
-
/* @__PURE__ */
|
|
2200
|
-
|
|
2201
|
-
|
|
2199
|
+
}, [h]), z(() => {
|
|
2200
|
+
if (!J || p.length === 0) return;
|
|
2201
|
+
Q.current && clearTimeout(Q.current);
|
|
2202
|
+
const k = 1500 + p[_].length * 50;
|
|
2203
|
+
Q.current = setTimeout(() => {
|
|
2204
|
+
T((X) => (X + 1) % p.length);
|
|
2205
|
+
}, k);
|
|
2206
|
+
}, [J, p, _]);
|
|
2207
|
+
const [nt, ks] = C(!1);
|
|
2208
|
+
return z(() => {
|
|
2209
|
+
!nt && b.length > 0 && m(b[c % b.length]);
|
|
2210
|
+
}, [c, b, nt]), /* @__PURE__ */ j("div", { children: [
|
|
2211
|
+
be.DEBUG_MODE,
|
|
2212
|
+
/* @__PURE__ */ j("div", { className: A.viewer, onClick: Le, children: [
|
|
2213
|
+
G.audioUrl && /* @__PURE__ */ j("div", { className: A.elementAudioControl, onClick: (O) => O.stopPropagation(), children: [
|
|
2214
|
+
/* @__PURE__ */ g(
|
|
2215
|
+
"button",
|
|
2216
|
+
{
|
|
2217
|
+
className: A.elementAudioButton,
|
|
2218
|
+
title: ve ? "Pausar audio ambiente" : "Reproducir audio ambiente",
|
|
2219
|
+
onClick: () => {
|
|
2220
|
+
P.current && (ve ? (P.current.pause(), oe(!1)) : P.current.play().then(() => oe(!0)).catch(() => {
|
|
2221
|
+
}));
|
|
2222
|
+
},
|
|
2223
|
+
children: ve ? /* @__PURE__ */ j("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "white", children: [
|
|
2224
|
+
/* @__PURE__ */ g("rect", { x: "6", y: "4", width: "4", height: "16", rx: "1" }),
|
|
2225
|
+
/* @__PURE__ */ g("rect", { x: "14", y: "4", width: "4", height: "16", rx: "1" })
|
|
2226
|
+
] }) : /* @__PURE__ */ j("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "white", strokeWidth: "2", children: [
|
|
2227
|
+
/* @__PURE__ */ g("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
2228
|
+
/* @__PURE__ */ g("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" }),
|
|
2229
|
+
/* @__PURE__ */ g("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" })
|
|
2230
|
+
] })
|
|
2231
|
+
}
|
|
2232
|
+
),
|
|
2233
|
+
/* @__PURE__ */ g(
|
|
2234
|
+
"input",
|
|
2235
|
+
{
|
|
2236
|
+
type: "range",
|
|
2237
|
+
min: "0",
|
|
2238
|
+
max: "1",
|
|
2239
|
+
step: "0.05",
|
|
2240
|
+
value: se,
|
|
2241
|
+
className: A.volumeSlider,
|
|
2242
|
+
title: `Volumen ambiente: ${Math.round(se * 100)}%`,
|
|
2243
|
+
onChange: (O) => Gt(parseFloat(O.target.value))
|
|
2244
|
+
}
|
|
2245
|
+
)
|
|
2246
|
+
] }),
|
|
2247
|
+
/* @__PURE__ */ j("div", { className: A.viewerTopBar, children: [
|
|
2248
|
+
/* @__PURE__ */ g("div", { className: A.itemCounter, children: l.length > 0 ? `${c + 1}/${l.length}` : "0/0" }),
|
|
2249
|
+
/* @__PURE__ */ j("div", { className: A.topRightControls, children: [
|
|
2250
|
+
/* @__PURE__ */ g(
|
|
2202
2251
|
"button",
|
|
2203
2252
|
{
|
|
2204
|
-
onClick: () =>
|
|
2205
|
-
className:
|
|
2253
|
+
onClick: () => N(!x),
|
|
2254
|
+
className: A.iconButton,
|
|
2206
2255
|
title: "Autoplay",
|
|
2207
2256
|
style: {
|
|
2208
|
-
backgroundColor:
|
|
2257
|
+
backgroundColor: x ? "rgba(255, 255, 255, 0.7)" : "rgba(0, 0, 0, 0.7)"
|
|
2209
2258
|
},
|
|
2210
|
-
children: /* @__PURE__ */
|
|
2259
|
+
children: /* @__PURE__ */ g(
|
|
2211
2260
|
"svg",
|
|
2212
2261
|
{
|
|
2213
2262
|
width: "20px",
|
|
2214
2263
|
height: "20px",
|
|
2215
2264
|
viewBox: "0 0 16 16",
|
|
2216
2265
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2217
|
-
children: /* @__PURE__ */
|
|
2266
|
+
children: /* @__PURE__ */ g(
|
|
2218
2267
|
"path",
|
|
2219
2268
|
{
|
|
2220
|
-
style: { fill:
|
|
2269
|
+
style: { fill: x ? "black" : "white" },
|
|
2221
2270
|
d: "M5.23331,0.493645 C6.8801,-0.113331 8.6808,-0.161915 10.3579,0.355379 C11.4019,0.6773972 12.361984,1.20757325 13.1838415,1.90671757 L13.4526,2.14597 L14.2929,1.30564 C14.8955087,0.703065739 15.9071843,1.0850774 15.994017,1.89911843 L16,2.01275 L16,6.00002 L12.0127,6.00002 C11.1605348,6.00002 10.7153321,5.01450817 11.2294893,4.37749065 L11.3056,4.29291 L12.0372,3.56137 C11.389,2.97184 10.6156,2.52782 9.76845,2.26653 C8.5106,1.87856 7.16008,1.915 5.92498,2.37023 C4.68989,2.82547 3.63877,3.67423 2.93361,4.78573 C2.22844,5.89723 1.90836,7.20978 2.02268,8.52112 C2.13701,9.83246 2.6794,11.0698 3.56627,12.0425 C4.45315,13.0152 5.63528,13.6693 6.93052,13.9039 C8.22576,14.1385 9.56221,13.9407 10.7339,13.3409 C11.9057,12.7412 12.8476,11.7727 13.4147,10.5848 C13.6526,10.0864 14.2495,9.8752 14.748,10.1131 C15.2464,10.351 15.4575,10.948 15.2196,11.4464 C14.4635,13.0302 13.2076,14.3215 11.6453,15.1213 C10.0829,15.921 8.30101,16.1847 6.57402,15.8719 C4.84704,15.559 3.27086,14.687 2.08836,13.39 C0.905861,12.0931 0.182675,10.4433 0.0302394,8.69483 C-0.122195,6.94637 0.304581,5.1963 1.2448,3.7143 C2.18503,2.2323 3.58652,1.10062 5.23331,0.493645 Z M6,5.46077 C6,5.09472714 6.37499031,4.86235811 6.69509872,5.0000726 L6.7678,5.03853 L10.7714,7.57776 C11.0528545,7.75626909 11.0784413,8.14585256 10.8481603,8.36273881 L10.7714,8.42224 L6.7678,10.9615 C6.45867857,11.1575214 6.06160816,10.965274 6.00646097,10.6211914 L6,10.5392 L6,5.46077 Z"
|
|
2222
2271
|
}
|
|
2223
2272
|
)
|
|
@@ -2225,8 +2274,8 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2225
2274
|
)
|
|
2226
2275
|
}
|
|
2227
2276
|
),
|
|
2228
|
-
/* @__PURE__ */
|
|
2229
|
-
|
|
2277
|
+
/* @__PURE__ */ g(
|
|
2278
|
+
Xr,
|
|
2230
2279
|
{
|
|
2231
2280
|
languages: [
|
|
2232
2281
|
{ code: "es", label: "Español" },
|
|
@@ -2234,21 +2283,21 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2234
2283
|
{ code: "fr", label: "Français" }
|
|
2235
2284
|
],
|
|
2236
2285
|
current: "es",
|
|
2237
|
-
onChange: (
|
|
2286
|
+
onChange: (O) => R(O)
|
|
2238
2287
|
}
|
|
2239
2288
|
)
|
|
2240
2289
|
] })
|
|
2241
2290
|
] }),
|
|
2242
|
-
/* @__PURE__ */
|
|
2291
|
+
/* @__PURE__ */ g(
|
|
2243
2292
|
"button",
|
|
2244
2293
|
{
|
|
2245
|
-
onClick:
|
|
2294
|
+
onClick: tn,
|
|
2246
2295
|
disabled: l.length === 0,
|
|
2247
|
-
className: `${
|
|
2296
|
+
className: `${A.navButton} ${A.navButtonLeft}`,
|
|
2248
2297
|
title: "Anterior",
|
|
2249
|
-
onMouseOver: () =>
|
|
2250
|
-
onMouseOut: () =>
|
|
2251
|
-
children: /* @__PURE__ */
|
|
2298
|
+
onMouseOver: () => Ge(!0),
|
|
2299
|
+
onMouseOut: () => Ge(!1),
|
|
2300
|
+
children: /* @__PURE__ */ g(
|
|
2252
2301
|
"svg",
|
|
2253
2302
|
{
|
|
2254
2303
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2264,23 +2313,23 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2264
2313
|
width: "24px",
|
|
2265
2314
|
height: "24px",
|
|
2266
2315
|
transition: "transform 0.2s ease-in-out",
|
|
2267
|
-
transform:
|
|
2316
|
+
transform: te ? "scale(1.5)" : "scale(1)"
|
|
2268
2317
|
},
|
|
2269
|
-
children: /* @__PURE__ */
|
|
2318
|
+
children: /* @__PURE__ */ g("path", { d: "M15 18l-6-6 6-6" })
|
|
2270
2319
|
}
|
|
2271
2320
|
)
|
|
2272
2321
|
}
|
|
2273
2322
|
),
|
|
2274
|
-
/* @__PURE__ */
|
|
2323
|
+
/* @__PURE__ */ g(
|
|
2275
2324
|
"button",
|
|
2276
2325
|
{
|
|
2277
|
-
onClick:
|
|
2326
|
+
onClick: nn,
|
|
2278
2327
|
disabled: l.length === 0,
|
|
2279
|
-
className: `${
|
|
2328
|
+
className: `${A.navButton} ${A.navButtonRight}`,
|
|
2280
2329
|
title: "Siguiente",
|
|
2281
|
-
onMouseOver: () =>
|
|
2282
|
-
onMouseOut: () =>
|
|
2283
|
-
children: /* @__PURE__ */
|
|
2330
|
+
onMouseOver: () => Je(!0),
|
|
2331
|
+
onMouseOut: () => Je(!1),
|
|
2332
|
+
children: /* @__PURE__ */ g(
|
|
2284
2333
|
"svg",
|
|
2285
2334
|
{
|
|
2286
2335
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2296,51 +2345,51 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2296
2345
|
width: "24px",
|
|
2297
2346
|
height: "24px",
|
|
2298
2347
|
transition: "transform 0.2s ease-in-out",
|
|
2299
|
-
transform:
|
|
2348
|
+
transform: Vt ? "scale(1.5)" : "scale(1)"
|
|
2300
2349
|
},
|
|
2301
|
-
children: /* @__PURE__ */
|
|
2350
|
+
children: /* @__PURE__ */ g("path", { d: "M9 6l6 6-6 6" })
|
|
2302
2351
|
}
|
|
2303
2352
|
)
|
|
2304
2353
|
}
|
|
2305
2354
|
),
|
|
2306
|
-
/* @__PURE__ */
|
|
2355
|
+
/* @__PURE__ */ g(
|
|
2307
2356
|
"img",
|
|
2308
2357
|
{
|
|
2309
|
-
src:
|
|
2358
|
+
src: G.imageUrl || yt,
|
|
2310
2359
|
alt: "Background",
|
|
2311
|
-
className:
|
|
2312
|
-
style: { opacity:
|
|
2313
|
-
onError: (
|
|
2360
|
+
className: A.backgroundImage,
|
|
2361
|
+
style: { opacity: J ? 1 : 0.7 },
|
|
2362
|
+
onError: (O) => O.currentTarget.src = yt
|
|
2314
2363
|
}
|
|
2315
2364
|
),
|
|
2316
|
-
|
|
2365
|
+
J && /* @__PURE__ */ g(rt, { children: /* @__PURE__ */ g(
|
|
2317
2366
|
"img",
|
|
2318
2367
|
{
|
|
2319
|
-
src:
|
|
2368
|
+
src: $,
|
|
2320
2369
|
alt: "Avatar",
|
|
2321
|
-
className:
|
|
2322
|
-
style: { transform: `scale(${
|
|
2370
|
+
className: A.avatar,
|
|
2371
|
+
style: { transform: `scale(${Ze % 10 < 5 ? 4 : 4.05})` }
|
|
2323
2372
|
}
|
|
2324
2373
|
) }),
|
|
2325
|
-
/* @__PURE__ */
|
|
2326
|
-
/* @__PURE__ */
|
|
2327
|
-
|
|
2374
|
+
/* @__PURE__ */ j("div", { className: A.caption, children: [
|
|
2375
|
+
/* @__PURE__ */ g("h4", { className: A.captionTitle, children: G.name }),
|
|
2376
|
+
J && /* @__PURE__ */ g(rt, { children: /* @__PURE__ */ g("p", { className: A.captionText, children: p.length > 0 && p[_] }) })
|
|
2328
2377
|
] }),
|
|
2329
|
-
|
|
2330
|
-
/* @__PURE__ */
|
|
2331
|
-
/* @__PURE__ */
|
|
2378
|
+
L && /* @__PURE__ */ j("div", { className: A.loadingOverlay, children: [
|
|
2379
|
+
/* @__PURE__ */ g("div", { className: A.loadingSpinner }),
|
|
2380
|
+
/* @__PURE__ */ g("p", { children: "Cargando siguiente patrimonio..." })
|
|
2332
2381
|
] }),
|
|
2333
|
-
|
|
2382
|
+
Wt && /* @__PURE__ */ g("div", { className: A.playbackControls, children: Jt ? (
|
|
2334
2383
|
// Loading spinner
|
|
2335
|
-
/* @__PURE__ */
|
|
2384
|
+
/* @__PURE__ */ g("button", { disabled: !0, className: A.loadingButton, children: /* @__PURE__ */ j(
|
|
2336
2385
|
"svg",
|
|
2337
2386
|
{
|
|
2338
|
-
className:
|
|
2387
|
+
className: A.spinner,
|
|
2339
2388
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2340
2389
|
fill: "none",
|
|
2341
2390
|
viewBox: "0 0 24 24",
|
|
2342
2391
|
children: [
|
|
2343
|
-
/* @__PURE__ */
|
|
2392
|
+
/* @__PURE__ */ g(
|
|
2344
2393
|
"circle",
|
|
2345
2394
|
{
|
|
2346
2395
|
className: "opacity-25",
|
|
@@ -2351,7 +2400,7 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2351
2400
|
strokeWidth: "4"
|
|
2352
2401
|
}
|
|
2353
2402
|
),
|
|
2354
|
-
/* @__PURE__ */
|
|
2403
|
+
/* @__PURE__ */ g(
|
|
2355
2404
|
"path",
|
|
2356
2405
|
{
|
|
2357
2406
|
className: "opacity-75",
|
|
@@ -2362,15 +2411,15 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2362
2411
|
]
|
|
2363
2412
|
}
|
|
2364
2413
|
) })
|
|
2365
|
-
) : !
|
|
2414
|
+
) : !J && !Xe ? (
|
|
2366
2415
|
// Play (desde cero)
|
|
2367
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ g(
|
|
2368
2417
|
"button",
|
|
2369
2418
|
{
|
|
2370
|
-
onClick:
|
|
2371
|
-
disabled: l.length === 0 ||
|
|
2372
|
-
className:
|
|
2373
|
-
children: /* @__PURE__ */
|
|
2419
|
+
onClick: et,
|
|
2420
|
+
disabled: l.length === 0 || L,
|
|
2421
|
+
className: A.playButton,
|
|
2422
|
+
children: /* @__PURE__ */ g(
|
|
2374
2423
|
"svg",
|
|
2375
2424
|
{
|
|
2376
2425
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2382,14 +2431,14 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2382
2431
|
strokeWidth: "2",
|
|
2383
2432
|
strokeLinecap: "round",
|
|
2384
2433
|
strokeLinejoin: "round",
|
|
2385
|
-
children: /* @__PURE__ */
|
|
2434
|
+
children: /* @__PURE__ */ g("path", { d: "M9 8.5 L9 15.5 L16 12 Z" })
|
|
2386
2435
|
}
|
|
2387
2436
|
)
|
|
2388
2437
|
}
|
|
2389
2438
|
)
|
|
2390
|
-
) :
|
|
2439
|
+
) : Xe ? (
|
|
2391
2440
|
// Resume
|
|
2392
|
-
/* @__PURE__ */
|
|
2441
|
+
/* @__PURE__ */ g("button", { onClick: en, className: A.playButton, children: /* @__PURE__ */ g(
|
|
2393
2442
|
"svg",
|
|
2394
2443
|
{
|
|
2395
2444
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2401,12 +2450,12 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2401
2450
|
strokeWidth: "2",
|
|
2402
2451
|
strokeLinecap: "round",
|
|
2403
2452
|
strokeLinejoin: "round",
|
|
2404
|
-
children: /* @__PURE__ */
|
|
2453
|
+
children: /* @__PURE__ */ g("path", { d: "M9 8.5 L9 15.5 L16 12 Z" })
|
|
2405
2454
|
}
|
|
2406
2455
|
) })
|
|
2407
2456
|
) : (
|
|
2408
2457
|
// Pause
|
|
2409
|
-
/* @__PURE__ */
|
|
2458
|
+
/* @__PURE__ */ g("button", { onClick: Yt, className: A.pauseButton, children: /* @__PURE__ */ j(
|
|
2410
2459
|
"svg",
|
|
2411
2460
|
{
|
|
2412
2461
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2419,27 +2468,27 @@ const Dr = "_selectorWrapper_1kmif_1", Mr = "_iconButton_1kmif_6", jr = "_dropdo
|
|
|
2419
2468
|
strokeLinecap: "round",
|
|
2420
2469
|
strokeLinejoin: "round",
|
|
2421
2470
|
children: [
|
|
2422
|
-
/* @__PURE__ */
|
|
2423
|
-
/* @__PURE__ */
|
|
2471
|
+
/* @__PURE__ */ g("line", { x1: "10", y1: "8", x2: "10", y2: "16" }),
|
|
2472
|
+
/* @__PURE__ */ g("line", { x1: "14", y1: "8", x2: "14", y2: "16" })
|
|
2424
2473
|
]
|
|
2425
2474
|
}
|
|
2426
2475
|
) })
|
|
2427
2476
|
) }),
|
|
2428
|
-
/* @__PURE__ */
|
|
2477
|
+
/* @__PURE__ */ g("div", { className: A.progressBar, children: /* @__PURE__ */ g(
|
|
2429
2478
|
"div",
|
|
2430
2479
|
{
|
|
2431
|
-
className:
|
|
2432
|
-
style: { width: `${
|
|
2480
|
+
className: A.progressFill,
|
|
2481
|
+
style: { width: `${Ze}%` }
|
|
2433
2482
|
}
|
|
2434
2483
|
) })
|
|
2435
2484
|
] })
|
|
2436
2485
|
] });
|
|
2437
2486
|
};
|
|
2438
2487
|
export {
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2488
|
+
Xr as LanguageSelector,
|
|
2489
|
+
ae as LanguageSelectorStyles,
|
|
2490
|
+
ro as StoryVisualizer,
|
|
2491
|
+
A as StoryVisualizerStyles,
|
|
2492
|
+
no as voices
|
|
2444
2493
|
};
|
|
2445
2494
|
//# sourceMappingURL=ocity-heritage-visualizer.es.js.map
|