@ysolve/ocity-heritage-visualizer 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as F, jsx as
|
|
1
|
+
import { jsxs as F, jsx as g, Fragment as We } from "react/jsx-runtime";
|
|
2
2
|
import { useState as v, useRef as D, useEffect as M } from "react";
|
|
3
3
|
const Jt = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_DEBUG_MODE: "true", VITE_DEFAULT_IMAGE_URL: "https://o-city.org/assets/NO_AVAILABLE_IMG-4d02b370.png", VITE_ELEVENLABS_API_BASE: "https://api.elevenlabs.io/v1", VITE_ELEVENLABS_API_KEY: "sk_fcf711f6cba8630638aef7a7e1802559a1e9d029461b55cf", VITE_GOOGLE_TRANSLATE_BASE: "https://translate.googleapis.com/translate_a/single", VITE_IMAGE_BASE_URL: "https://eu2.contabostorage.com/7fb97413b6c243adb4347dafa02551a9:ocity/heritage/images/" };
|
|
4
4
|
function re(e, t = !0) {
|
|
@@ -7,7 +7,7 @@ function re(e, t = !0) {
|
|
|
7
7
|
throw new Error(`❌ Missing required env variable: ${e}`);
|
|
8
8
|
return n ?? "";
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const we = {
|
|
11
11
|
NODE_ENV: "production",
|
|
12
12
|
ELEVENLABS_API_BASE: re("VITE_ELEVENLABS_API_BASE"),
|
|
13
13
|
ELEVENLABS_API_KEY: re("VITE_ELEVENLABS_API_KEY"),
|
|
@@ -19,7 +19,7 @@ const ye = {
|
|
|
19
19
|
async function Gt(e, t) {
|
|
20
20
|
if (!e.trim()) return e;
|
|
21
21
|
try {
|
|
22
|
-
const n = `${
|
|
22
|
+
const n = `${we.GOOGLE_TRANSLATE_BASE}?client=gtx&sl=auto&tl=${t}&dt=t&q=${encodeURIComponent(e)}`, r = await fetch(n);
|
|
23
23
|
if (!r.ok)
|
|
24
24
|
throw new Error(`Error en la traducción: ${r.status}`);
|
|
25
25
|
const s = await r.json();
|
|
@@ -33,27 +33,27 @@ function lt(e, t) {
|
|
|
33
33
|
return e.apply(t, arguments);
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
const { toString: Wt } = Object.prototype, { getPrototypeOf: Fe } = Object, { iterator:
|
|
36
|
+
const { toString: Wt } = Object.prototype, { getPrototypeOf: Fe } = Object, { iterator: ye, toStringTag: ut } = Symbol, Ee = /* @__PURE__ */ ((e) => (t) => {
|
|
37
37
|
const n = Wt.call(t);
|
|
38
38
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
39
39
|
})(/* @__PURE__ */ Object.create(null)), q = (e) => (e = e.toLowerCase(), (t) => Ee(t) === e), be = (e) => (t) => typeof t === e, { isArray: ee } = Array, ie = be("undefined");
|
|
40
40
|
function Kt(e) {
|
|
41
|
-
return e !== null && !ie(e) && e.constructor !== null && !ie(e.constructor) &&
|
|
41
|
+
return e !== null && !ie(e) && e.constructor !== null && !ie(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
42
42
|
}
|
|
43
43
|
const dt = q("ArrayBuffer");
|
|
44
44
|
function Xt(e) {
|
|
45
45
|
let t;
|
|
46
46
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && dt(e.buffer), t;
|
|
47
47
|
}
|
|
48
|
-
const Zt = be("string"),
|
|
48
|
+
const Zt = be("string"), P = be("function"), ft = be("number"), _e = (e) => e !== null && typeof e == "object", Yt = (e) => e === !0 || e === !1, fe = (e) => {
|
|
49
49
|
if (Ee(e) !== "object")
|
|
50
50
|
return !1;
|
|
51
51
|
const t = Fe(e);
|
|
52
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ut in e) && !(
|
|
53
|
-
}, Qt = q("Date"), en = q("File"), tn = q("Blob"), nn = q("FileList"), rn = (e) => _e(e) &&
|
|
52
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ut in e) && !(ye in e);
|
|
53
|
+
}, Qt = q("Date"), en = q("File"), tn = q("Blob"), nn = q("FileList"), rn = (e) => _e(e) && P(e.pipe), sn = (e) => {
|
|
54
54
|
let t;
|
|
55
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
56
|
-
t === "object" &&
|
|
55
|
+
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = Ee(e)) === "formdata" || // detect form-data instance
|
|
56
|
+
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
57
57
|
}, on = q("URLSearchParams"), [an, cn, ln, un] = ["ReadableStream", "Request", "Response", "Headers"].map(q), dn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
58
58
|
function ae(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
59
59
|
if (e === null || typeof e > "u")
|
|
@@ -89,7 +89,7 @@ function Ne() {
|
|
|
89
89
|
return t;
|
|
90
90
|
}
|
|
91
91
|
const fn = (e, t, n, { allOwnKeys: r } = {}) => (ae(t, (s, i) => {
|
|
92
|
-
n &&
|
|
92
|
+
n && P(s) ? e[i] = lt(s, n) : e[i] = s;
|
|
93
93
|
}, { allOwnKeys: r }), e), pn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), hn = (e, t, n, r) => {
|
|
94
94
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
95
95
|
value: t.prototype
|
|
@@ -104,11 +104,11 @@ const fn = (e, t, n, { allOwnKeys: r } = {}) => (ae(t, (s, i) => {
|
|
|
104
104
|
e = n !== !1 && Fe(e);
|
|
105
105
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
106
106
|
return t;
|
|
107
|
-
},
|
|
107
|
+
}, gn = (e, t, n) => {
|
|
108
108
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
109
109
|
const r = e.indexOf(t, n);
|
|
110
110
|
return r !== -1 && r === n;
|
|
111
|
-
},
|
|
111
|
+
}, wn = (e) => {
|
|
112
112
|
if (!e) return null;
|
|
113
113
|
if (ee(e)) return e;
|
|
114
114
|
let t = e.length;
|
|
@@ -117,8 +117,8 @@ const fn = (e, t, n, { allOwnKeys: r } = {}) => (ae(t, (s, i) => {
|
|
|
117
117
|
for (; t-- > 0; )
|
|
118
118
|
n[t] = e[t];
|
|
119
119
|
return n;
|
|
120
|
-
},
|
|
121
|
-
const r = (e && e[
|
|
120
|
+
}, yn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Fe(Uint8Array)), En = (e, t) => {
|
|
121
|
+
const r = (e && e[ye]).call(e);
|
|
122
122
|
let s;
|
|
123
123
|
for (; (s = r.next()) && !s.done; ) {
|
|
124
124
|
const i = s.value;
|
|
@@ -143,10 +143,10 @@ const fn = (e, t, n, { allOwnKeys: r } = {}) => (ae(t, (s, i) => {
|
|
|
143
143
|
}), Object.defineProperties(e, r);
|
|
144
144
|
}, Tn = (e) => {
|
|
145
145
|
mt(e, (t, n) => {
|
|
146
|
-
if (
|
|
146
|
+
if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
147
147
|
return !1;
|
|
148
148
|
const r = e[n];
|
|
149
|
-
if (
|
|
149
|
+
if (P(r)) {
|
|
150
150
|
if (t.enumerable = !1, "writable" in t) {
|
|
151
151
|
t.writable = !1;
|
|
152
152
|
return;
|
|
@@ -163,10 +163,10 @@ const fn = (e, t, n, { allOwnKeys: r } = {}) => (ae(t, (s, i) => {
|
|
|
163
163
|
});
|
|
164
164
|
};
|
|
165
165
|
return ee(e) ? r(e) : r(String(e).split(t)), n;
|
|
166
|
-
},
|
|
167
|
-
},
|
|
166
|
+
}, On = () => {
|
|
167
|
+
}, xn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
168
168
|
function Cn(e) {
|
|
169
|
-
return !!(e &&
|
|
169
|
+
return !!(e && P(e.append) && e[ut] === "FormData" && e[ye]);
|
|
170
170
|
}
|
|
171
171
|
const Ln = (e) => {
|
|
172
172
|
const t = new Array(10), n = (r, s) => {
|
|
@@ -185,14 +185,14 @@ const Ln = (e) => {
|
|
|
185
185
|
return r;
|
|
186
186
|
};
|
|
187
187
|
return n(e, 0);
|
|
188
|
-
}, vn = q("AsyncFunction"), Nn = (e) => e && (_e(e) ||
|
|
188
|
+
}, vn = q("AsyncFunction"), Nn = (e) => e && (_e(e) || P(e)) && P(e.then) && P(e.catch), gt = ((e, t) => e ? setImmediate : t ? ((n, r) => (X.addEventListener("message", ({ source: s, data: i }) => {
|
|
189
189
|
s === X && i === n && r.length && r.shift()();
|
|
190
190
|
}, !1), (s) => {
|
|
191
191
|
r.push(s), X.postMessage(n, "*");
|
|
192
192
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
193
193
|
typeof setImmediate == "function",
|
|
194
|
-
|
|
195
|
-
),
|
|
194
|
+
P(X.postMessage)
|
|
195
|
+
), kn = typeof queueMicrotask < "u" ? queueMicrotask.bind(X) : typeof process < "u" && process.nextTick || gt, Bn = (e) => e != null && P(e[ye]), a = {
|
|
196
196
|
isArray: ee,
|
|
197
197
|
isArrayBuffer: dt,
|
|
198
198
|
isBuffer: Kt,
|
|
@@ -212,10 +212,10 @@ const Ln = (e) => {
|
|
|
212
212
|
isFile: en,
|
|
213
213
|
isBlob: tn,
|
|
214
214
|
isRegExp: Rn,
|
|
215
|
-
isFunction:
|
|
215
|
+
isFunction: P,
|
|
216
216
|
isStream: rn,
|
|
217
217
|
isURLSearchParams: on,
|
|
218
|
-
isTypedArray:
|
|
218
|
+
isTypedArray: yn,
|
|
219
219
|
isFileList: nn,
|
|
220
220
|
forEach: ae,
|
|
221
221
|
merge: Ne,
|
|
@@ -226,8 +226,8 @@ const Ln = (e) => {
|
|
|
226
226
|
toFlatObject: mn,
|
|
227
227
|
kindOf: Ee,
|
|
228
228
|
kindOfTest: q,
|
|
229
|
-
endsWith:
|
|
230
|
-
toArray:
|
|
229
|
+
endsWith: gn,
|
|
230
|
+
toArray: wn,
|
|
231
231
|
forEachEntry: En,
|
|
232
232
|
matchAll: bn,
|
|
233
233
|
isHTMLForm: _n,
|
|
@@ -238,8 +238,8 @@ const Ln = (e) => {
|
|
|
238
238
|
freezeMethods: Tn,
|
|
239
239
|
toObjectSet: An,
|
|
240
240
|
toCamelCase: Sn,
|
|
241
|
-
noop:
|
|
242
|
-
toFiniteNumber:
|
|
241
|
+
noop: On,
|
|
242
|
+
toFiniteNumber: xn,
|
|
243
243
|
findKey: pt,
|
|
244
244
|
global: X,
|
|
245
245
|
isContextDefined: ht,
|
|
@@ -247,14 +247,14 @@ const Ln = (e) => {
|
|
|
247
247
|
toJSONObject: Ln,
|
|
248
248
|
isAsyncFn: vn,
|
|
249
249
|
isThenable: Nn,
|
|
250
|
-
setImmediate:
|
|
251
|
-
asap:
|
|
252
|
-
isIterable:
|
|
250
|
+
setImmediate: gt,
|
|
251
|
+
asap: kn,
|
|
252
|
+
isIterable: Bn
|
|
253
253
|
};
|
|
254
|
-
function
|
|
254
|
+
function w(e, t, n, r, s) {
|
|
255
255
|
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);
|
|
256
256
|
}
|
|
257
|
-
a.inherits(
|
|
257
|
+
a.inherits(w, Error, {
|
|
258
258
|
toJSON: function() {
|
|
259
259
|
return {
|
|
260
260
|
// Standard
|
|
@@ -275,7 +275,7 @@ a.inherits(y, Error, {
|
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
|
-
const
|
|
278
|
+
const wt = w.prototype, yt = {};
|
|
279
279
|
[
|
|
280
280
|
"ERR_BAD_OPTION_VALUE",
|
|
281
281
|
"ERR_BAD_OPTION",
|
|
@@ -291,18 +291,18 @@ const yt = y.prototype, gt = {};
|
|
|
291
291
|
"ERR_INVALID_URL"
|
|
292
292
|
// eslint-disable-next-line func-names
|
|
293
293
|
].forEach((e) => {
|
|
294
|
-
|
|
294
|
+
yt[e] = { value: e };
|
|
295
295
|
});
|
|
296
|
-
Object.defineProperties(
|
|
297
|
-
Object.defineProperty(
|
|
298
|
-
|
|
299
|
-
const o = Object.create(
|
|
296
|
+
Object.defineProperties(w, yt);
|
|
297
|
+
Object.defineProperty(wt, "isAxiosError", { value: !0 });
|
|
298
|
+
w.from = (e, t, n, r, s, i) => {
|
|
299
|
+
const o = Object.create(wt);
|
|
300
300
|
return a.toFlatObject(e, o, function(l) {
|
|
301
301
|
return l !== Error.prototype;
|
|
302
|
-
}, (c) => c !== "isAxiosError"),
|
|
302
|
+
}, (c) => c !== "isAxiosError"), w.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
303
303
|
};
|
|
304
|
-
const
|
|
305
|
-
function
|
|
304
|
+
const Pn = null;
|
|
305
|
+
function ke(e) {
|
|
306
306
|
return a.isPlainObject(e) || a.isArray(e);
|
|
307
307
|
}
|
|
308
308
|
function Et(e) {
|
|
@@ -314,7 +314,7 @@ function Xe(e, t, n) {
|
|
|
314
314
|
}).join(n ? "." : "") : t;
|
|
315
315
|
}
|
|
316
316
|
function Un(e) {
|
|
317
|
-
return a.isArray(e) && !e.some(
|
|
317
|
+
return a.isArray(e) && !e.some(ke);
|
|
318
318
|
}
|
|
319
319
|
const In = a.toFlatObject(a, {}, null, function(t) {
|
|
320
320
|
return /^is[A-Z]/.test(t);
|
|
@@ -339,7 +339,7 @@ function Se(e, t, n) {
|
|
|
339
339
|
if (a.isBoolean(f))
|
|
340
340
|
return f.toString();
|
|
341
341
|
if (!l && a.isBlob(f))
|
|
342
|
-
throw new
|
|
342
|
+
throw new w("Blob is not supported. Use a Buffer instead.");
|
|
343
343
|
return a.isArrayBuffer(f) || a.isTypedArray(f) ? l && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
344
344
|
}
|
|
345
345
|
function d(f, m, h) {
|
|
@@ -356,12 +356,12 @@ function Se(e, t, n) {
|
|
|
356
356
|
);
|
|
357
357
|
}), !1;
|
|
358
358
|
}
|
|
359
|
-
return
|
|
359
|
+
return ke(f) ? !0 : (t.append(Xe(h, m, i), u(f)), !1);
|
|
360
360
|
}
|
|
361
|
-
const p = [],
|
|
361
|
+
const p = [], y = Object.assign(In, {
|
|
362
362
|
defaultVisitor: d,
|
|
363
363
|
convertValue: u,
|
|
364
|
-
isVisitable:
|
|
364
|
+
isVisitable: ke
|
|
365
365
|
});
|
|
366
366
|
function E(f, m) {
|
|
367
367
|
if (!a.isUndefined(f)) {
|
|
@@ -373,7 +373,7 @@ function Se(e, t, n) {
|
|
|
373
373
|
R,
|
|
374
374
|
a.isString(A) ? A.trim() : A,
|
|
375
375
|
m,
|
|
376
|
-
|
|
376
|
+
y
|
|
377
377
|
)) === !0 && E(R, m ? m.concat(A) : [A]);
|
|
378
378
|
}), p.pop();
|
|
379
379
|
}
|
|
@@ -495,22 +495,22 @@ const St = {
|
|
|
495
495
|
Blob: Mn
|
|
496
496
|
},
|
|
497
497
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
498
|
-
}, je = typeof window < "u" && typeof document < "u",
|
|
498
|
+
}, je = typeof window < "u" && typeof document < "u", Be = typeof navigator == "object" && navigator || void 0, $n = je && (!Be || ["ReactNative", "NativeScript", "NS"].indexOf(Be.product) < 0), Hn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
499
499
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", zn = je && window.location.href || "http://localhost", Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
500
500
|
__proto__: null,
|
|
501
501
|
hasBrowserEnv: je,
|
|
502
502
|
hasStandardBrowserEnv: $n,
|
|
503
503
|
hasStandardBrowserWebWorkerEnv: Hn,
|
|
504
|
-
navigator:
|
|
504
|
+
navigator: Be,
|
|
505
505
|
origin: zn
|
|
506
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
506
|
+
}, Symbol.toStringTag, { value: "Module" })), k = {
|
|
507
507
|
...Vn,
|
|
508
508
|
...qn
|
|
509
509
|
};
|
|
510
510
|
function Jn(e, t) {
|
|
511
|
-
return Se(e, new
|
|
511
|
+
return Se(e, new k.classes.URLSearchParams(), Object.assign({
|
|
512
512
|
visitor: function(n, r, s, i) {
|
|
513
|
-
return
|
|
513
|
+
return k.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
514
514
|
}
|
|
515
515
|
}, t));
|
|
516
516
|
}
|
|
@@ -589,7 +589,7 @@ const ce = {
|
|
|
589
589
|
return JSON.parse(t);
|
|
590
590
|
} catch (c) {
|
|
591
591
|
if (o)
|
|
592
|
-
throw c.name === "SyntaxError" ?
|
|
592
|
+
throw c.name === "SyntaxError" ? w.from(c, w.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
return t;
|
|
@@ -604,8 +604,8 @@ const ce = {
|
|
|
604
604
|
maxContentLength: -1,
|
|
605
605
|
maxBodyLength: -1,
|
|
606
606
|
env: {
|
|
607
|
-
FormData:
|
|
608
|
-
Blob:
|
|
607
|
+
FormData: k.classes.FormData,
|
|
608
|
+
Blob: k.classes.Blob
|
|
609
609
|
},
|
|
610
610
|
validateStatus: function(t) {
|
|
611
611
|
return t >= 200 && t < 300;
|
|
@@ -660,7 +660,7 @@ function Yn(e) {
|
|
|
660
660
|
return t;
|
|
661
661
|
}
|
|
662
662
|
const Qn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
663
|
-
function
|
|
663
|
+
function xe(e, t, n, r, s) {
|
|
664
664
|
if (a.isFunction(r))
|
|
665
665
|
return r.call(this, t, n);
|
|
666
666
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -734,7 +734,7 @@ let U = class {
|
|
|
734
734
|
has(t, n) {
|
|
735
735
|
if (t = se(t), t) {
|
|
736
736
|
const r = a.findKey(this, t);
|
|
737
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
737
|
+
return !!(r && this[r] !== void 0 && (!n || xe(this, this[r], r, n)));
|
|
738
738
|
}
|
|
739
739
|
return !1;
|
|
740
740
|
}
|
|
@@ -744,7 +744,7 @@ let U = class {
|
|
|
744
744
|
function i(o) {
|
|
745
745
|
if (o = se(o), o) {
|
|
746
746
|
const c = a.findKey(r, o);
|
|
747
|
-
c && (!n ||
|
|
747
|
+
c && (!n || xe(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
750
|
return a.isArray(t) ? t.forEach(i) : i(t), s;
|
|
@@ -754,7 +754,7 @@ let U = class {
|
|
|
754
754
|
let r = n.length, s = !1;
|
|
755
755
|
for (; r--; ) {
|
|
756
756
|
const i = n[r];
|
|
757
|
-
(!t ||
|
|
757
|
+
(!t || xe(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
758
758
|
}
|
|
759
759
|
return s;
|
|
760
760
|
}
|
|
@@ -832,16 +832,16 @@ function Tt(e) {
|
|
|
832
832
|
return !!(e && e.__CANCEL__);
|
|
833
833
|
}
|
|
834
834
|
function te(e, t, n) {
|
|
835
|
-
|
|
835
|
+
w.call(this, e ?? "canceled", w.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
836
836
|
}
|
|
837
|
-
a.inherits(te,
|
|
837
|
+
a.inherits(te, w, {
|
|
838
838
|
__CANCEL__: !0
|
|
839
839
|
});
|
|
840
840
|
function At(e, t, n) {
|
|
841
841
|
const r = n.config.validateStatus;
|
|
842
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
842
|
+
!n.status || !r || r(n.status) ? e(n) : t(new w(
|
|
843
843
|
"Request failed with status code " + n.status,
|
|
844
|
-
[
|
|
844
|
+
[w.ERR_BAD_REQUEST, w.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
845
845
|
n.config,
|
|
846
846
|
n.request,
|
|
847
847
|
n
|
|
@@ -858,13 +858,13 @@ function rr(e, t) {
|
|
|
858
858
|
return t = t !== void 0 ? t : 1e3, function(l) {
|
|
859
859
|
const u = Date.now(), d = r[i];
|
|
860
860
|
o || (o = u), n[s] = l, r[s] = u;
|
|
861
|
-
let p = i,
|
|
861
|
+
let p = i, y = 0;
|
|
862
862
|
for (; p !== s; )
|
|
863
|
-
|
|
863
|
+
y += n[p++], p = p % e;
|
|
864
864
|
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), u - o < t)
|
|
865
865
|
return;
|
|
866
866
|
const E = d && u - d;
|
|
867
|
-
return E ? Math.round(
|
|
867
|
+
return E ? Math.round(y * 1e3 / E) : void 0;
|
|
868
868
|
};
|
|
869
869
|
}
|
|
870
870
|
function sr(e, t) {
|
|
@@ -905,10 +905,10 @@ const me = (e, t, n = 3) => {
|
|
|
905
905
|
total: e,
|
|
906
906
|
loaded: r
|
|
907
907
|
}), t[1]];
|
|
908
|
-
}, tt = (e) => (...t) => a.asap(() => e(...t)), or =
|
|
909
|
-
new URL(
|
|
910
|
-
|
|
911
|
-
) : () => !0, ir =
|
|
908
|
+
}, tt = (e) => (...t) => a.asap(() => e(...t)), or = k.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, k.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
909
|
+
new URL(k.origin),
|
|
910
|
+
k.navigator && /(msie|trident)/i.test(k.navigator.userAgent)
|
|
911
|
+
) : () => !0, ir = k.hasStandardBrowserEnv ? (
|
|
912
912
|
// Standard browser envs support document.cookie
|
|
913
913
|
{
|
|
914
914
|
write(e, t, n, r, s, i) {
|
|
@@ -941,7 +941,7 @@ function ar(e) {
|
|
|
941
941
|
function cr(e, t) {
|
|
942
942
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function Ot(e, t, n) {
|
|
945
945
|
let r = !ar(t);
|
|
946
946
|
return e && (r || n == !1) ? cr(e, t) : t;
|
|
947
947
|
}
|
|
@@ -949,14 +949,14 @@ const nt = (e) => e instanceof U ? { ...e } : e;
|
|
|
949
949
|
function Y(e, t) {
|
|
950
950
|
t = t || {};
|
|
951
951
|
const n = {};
|
|
952
|
-
function r(u, d, p,
|
|
953
|
-
return a.isPlainObject(u) && a.isPlainObject(d) ? a.merge.call({ caseless:
|
|
952
|
+
function r(u, d, p, y) {
|
|
953
|
+
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;
|
|
954
954
|
}
|
|
955
|
-
function s(u, d, p,
|
|
955
|
+
function s(u, d, p, y) {
|
|
956
956
|
if (a.isUndefined(d)) {
|
|
957
957
|
if (!a.isUndefined(u))
|
|
958
|
-
return r(void 0, u, p,
|
|
959
|
-
} else return r(u, d, p,
|
|
958
|
+
return r(void 0, u, p, y);
|
|
959
|
+
} else return r(u, d, p, y);
|
|
960
960
|
}
|
|
961
961
|
function i(u, d) {
|
|
962
962
|
if (!a.isUndefined(d))
|
|
@@ -1006,37 +1006,37 @@ function Y(e, t) {
|
|
|
1006
1006
|
headers: (u, d, p) => s(nt(u), nt(d), p, !0)
|
|
1007
1007
|
};
|
|
1008
1008
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(d) {
|
|
1009
|
-
const p = l[d] || s,
|
|
1010
|
-
a.isUndefined(
|
|
1009
|
+
const p = l[d] || s, y = p(e[d], t[d], d);
|
|
1010
|
+
a.isUndefined(y) && p !== c || (n[d] = y);
|
|
1011
1011
|
}), n;
|
|
1012
1012
|
}
|
|
1013
|
-
const
|
|
1013
|
+
const xt = (e) => {
|
|
1014
1014
|
const t = Y({}, e);
|
|
1015
1015
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1016
|
-
t.headers = o = U.from(o), t.url = _t(
|
|
1016
|
+
t.headers = o = U.from(o), t.url = _t(Ot(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
|
|
1017
1017
|
"Authorization",
|
|
1018
1018
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1019
1019
|
);
|
|
1020
1020
|
let l;
|
|
1021
1021
|
if (a.isFormData(n)) {
|
|
1022
|
-
if (
|
|
1022
|
+
if (k.hasStandardBrowserEnv || k.hasStandardBrowserWebWorkerEnv)
|
|
1023
1023
|
o.setContentType(void 0);
|
|
1024
1024
|
else if ((l = o.getContentType()) !== !1) {
|
|
1025
1025
|
const [u, ...d] = l ? l.split(";").map((p) => p.trim()).filter(Boolean) : [];
|
|
1026
1026
|
o.setContentType([u || "multipart/form-data", ...d].join("; "));
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
|
-
if (
|
|
1029
|
+
if (k.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && or(t.url))) {
|
|
1030
1030
|
const u = s && i && ir.read(i);
|
|
1031
1031
|
u && o.set(s, u);
|
|
1032
1032
|
}
|
|
1033
1033
|
return t;
|
|
1034
1034
|
}, lr = typeof XMLHttpRequest < "u", ur = lr && function(e) {
|
|
1035
1035
|
return new Promise(function(n, r) {
|
|
1036
|
-
const s =
|
|
1036
|
+
const s = xt(e);
|
|
1037
1037
|
let i = s.data;
|
|
1038
1038
|
const o = U.from(s.headers).normalize();
|
|
1039
|
-
let { responseType: c, onUploadProgress: l, onDownloadProgress: u } = s, d, p,
|
|
1039
|
+
let { responseType: c, onUploadProgress: l, onDownloadProgress: u } = s, d, p, y, E, f;
|
|
1040
1040
|
function m() {
|
|
1041
1041
|
E && E(), f && f(), s.cancelToken && s.cancelToken.unsubscribe(d), s.signal && s.signal.removeEventListener("abort", d);
|
|
1042
1042
|
}
|
|
@@ -1047,7 +1047,7 @@ const Ot = (e) => {
|
|
|
1047
1047
|
return;
|
|
1048
1048
|
const _ = U.from(
|
|
1049
1049
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1050
|
-
),
|
|
1050
|
+
), x = {
|
|
1051
1051
|
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1052
1052
|
status: h.status,
|
|
1053
1053
|
statusText: h.statusText,
|
|
@@ -1059,31 +1059,31 @@ const Ot = (e) => {
|
|
|
1059
1059
|
n(j), m();
|
|
1060
1060
|
}, function(j) {
|
|
1061
1061
|
r(j), m();
|
|
1062
|
-
},
|
|
1062
|
+
}, x), h = null;
|
|
1063
1063
|
}
|
|
1064
1064
|
"onloadend" in h ? h.onloadend = R : h.onreadystatechange = function() {
|
|
1065
1065
|
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(R);
|
|
1066
1066
|
}, h.onabort = function() {
|
|
1067
|
-
h && (r(new
|
|
1067
|
+
h && (r(new w("Request aborted", w.ECONNABORTED, e, h)), h = null);
|
|
1068
1068
|
}, h.onerror = function() {
|
|
1069
|
-
r(new
|
|
1069
|
+
r(new w("Network Error", w.ERR_NETWORK, e, h)), h = null;
|
|
1070
1070
|
}, h.ontimeout = function() {
|
|
1071
1071
|
let N = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1072
|
-
const
|
|
1073
|
-
s.timeoutErrorMessage && (N = s.timeoutErrorMessage), r(new
|
|
1072
|
+
const x = s.transitional || St;
|
|
1073
|
+
s.timeoutErrorMessage && (N = s.timeoutErrorMessage), r(new w(
|
|
1074
1074
|
N,
|
|
1075
|
-
|
|
1075
|
+
x.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
|
|
1076
1076
|
e,
|
|
1077
1077
|
h
|
|
1078
1078
|
)), h = null;
|
|
1079
|
-
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(N,
|
|
1080
|
-
h.setRequestHeader(
|
|
1081
|
-
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), u && ([
|
|
1079
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(N, x) {
|
|
1080
|
+
h.setRequestHeader(x, N);
|
|
1081
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), u && ([y, f] = me(u, !0), h.addEventListener("progress", y)), l && h.upload && ([p, E] = me(l), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (d = (_) => {
|
|
1082
1082
|
h && (r(!_ || _.type ? new te(null, e, h) : _), h.abort(), h = null);
|
|
1083
1083
|
}, s.cancelToken && s.cancelToken.subscribe(d), s.signal && (s.signal.aborted ? d() : s.signal.addEventListener("abort", d)));
|
|
1084
1084
|
const A = nr(s.url);
|
|
1085
|
-
if (A &&
|
|
1086
|
-
r(new
|
|
1085
|
+
if (A && k.protocols.indexOf(A) === -1) {
|
|
1086
|
+
r(new w("Unsupported protocol " + A + ":", w.ERR_BAD_REQUEST, e));
|
|
1087
1087
|
return;
|
|
1088
1088
|
}
|
|
1089
1089
|
h.send(i || null);
|
|
@@ -1096,11 +1096,11 @@ const Ot = (e) => {
|
|
|
1096
1096
|
if (!s) {
|
|
1097
1097
|
s = !0, c();
|
|
1098
1098
|
const d = u instanceof Error ? u : this.reason;
|
|
1099
|
-
r.abort(d instanceof
|
|
1099
|
+
r.abort(d instanceof w ? d : new te(d instanceof Error ? d.message : d));
|
|
1100
1100
|
}
|
|
1101
1101
|
};
|
|
1102
1102
|
let o = t && setTimeout(() => {
|
|
1103
|
-
o = null, i(new
|
|
1103
|
+
o = null, i(new w(`timeout ${t} of ms exceeded`, w.ETIMEDOUT));
|
|
1104
1104
|
}, t);
|
|
1105
1105
|
const c = () => {
|
|
1106
1106
|
e && (o && clearTimeout(o), o = null, e.forEach((u) => {
|
|
@@ -1154,8 +1154,8 @@ const Ot = (e) => {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
let p = d.byteLength;
|
|
1156
1156
|
if (n) {
|
|
1157
|
-
let
|
|
1158
|
-
n(
|
|
1157
|
+
let y = i += p;
|
|
1158
|
+
n(y);
|
|
1159
1159
|
}
|
|
1160
1160
|
l.enqueue(new Uint8Array(d));
|
|
1161
1161
|
} catch (u) {
|
|
@@ -1174,9 +1174,9 @@ const Ot = (e) => {
|
|
|
1174
1174
|
} catch {
|
|
1175
1175
|
return !1;
|
|
1176
1176
|
}
|
|
1177
|
-
},
|
|
1177
|
+
}, gr = Ct && Lt(() => {
|
|
1178
1178
|
let e = !1;
|
|
1179
|
-
const t = new Request(
|
|
1179
|
+
const t = new Request(k.origin, {
|
|
1180
1180
|
body: new ReadableStream(),
|
|
1181
1181
|
method: "POST",
|
|
1182
1182
|
get duplex() {
|
|
@@ -1184,23 +1184,23 @@ const Ot = (e) => {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
}).headers.has("Content-Type");
|
|
1186
1186
|
return e && !t;
|
|
1187
|
-
}), st = 64 * 1024,
|
|
1188
|
-
stream:
|
|
1187
|
+
}), st = 64 * 1024, Pe = Ct && Lt(() => a.isReadableStream(new Response("").body)), ge = {
|
|
1188
|
+
stream: Pe && ((e) => e.body)
|
|
1189
1189
|
};
|
|
1190
1190
|
Re && ((e) => {
|
|
1191
1191
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1192
|
-
!
|
|
1193
|
-
throw new
|
|
1192
|
+
!ge[t] && (ge[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1193
|
+
throw new w(`Response type '${t}' is not supported`, w.ERR_NOT_SUPPORT, r);
|
|
1194
1194
|
});
|
|
1195
1195
|
});
|
|
1196
1196
|
})(new Response());
|
|
1197
|
-
const
|
|
1197
|
+
const wr = async (e) => {
|
|
1198
1198
|
if (e == null)
|
|
1199
1199
|
return 0;
|
|
1200
1200
|
if (a.isBlob(e))
|
|
1201
1201
|
return e.size;
|
|
1202
1202
|
if (a.isSpecCompliantForm(e))
|
|
1203
|
-
return (await new Request(
|
|
1203
|
+
return (await new Request(k.origin, {
|
|
1204
1204
|
method: "POST",
|
|
1205
1205
|
body: e
|
|
1206
1206
|
}).arrayBuffer()).byteLength;
|
|
@@ -1208,9 +1208,9 @@ const yr = async (e) => {
|
|
|
1208
1208
|
return e.byteLength;
|
|
1209
1209
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1210
1210
|
return (await mr(e)).byteLength;
|
|
1211
|
-
},
|
|
1211
|
+
}, yr = async (e, t) => {
|
|
1212
1212
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1213
|
-
return n ??
|
|
1213
|
+
return n ?? wr(t);
|
|
1214
1214
|
}, Er = Re && (async (e) => {
|
|
1215
1215
|
let {
|
|
1216
1216
|
url: t,
|
|
@@ -1224,8 +1224,8 @@ const yr = async (e) => {
|
|
|
1224
1224
|
responseType: u,
|
|
1225
1225
|
headers: d,
|
|
1226
1226
|
withCredentials: p = "same-origin",
|
|
1227
|
-
fetchOptions:
|
|
1228
|
-
} =
|
|
1227
|
+
fetchOptions: y
|
|
1228
|
+
} = xt(e);
|
|
1229
1229
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1230
1230
|
let E = dr([s, i && i.toAbortSignal()], o), f;
|
|
1231
1231
|
const m = E && E.unsubscribe && (() => {
|
|
@@ -1233,24 +1233,24 @@ const yr = async (e) => {
|
|
|
1233
1233
|
});
|
|
1234
1234
|
let h;
|
|
1235
1235
|
try {
|
|
1236
|
-
if (l &&
|
|
1237
|
-
let
|
|
1236
|
+
if (l && gr && n !== "get" && n !== "head" && (h = await yr(d, r)) !== 0) {
|
|
1237
|
+
let x = new Request(t, {
|
|
1238
1238
|
method: "POST",
|
|
1239
1239
|
body: r,
|
|
1240
1240
|
duplex: "half"
|
|
1241
|
-
}),
|
|
1242
|
-
if (a.isFormData(r) && (
|
|
1241
|
+
}), B;
|
|
1242
|
+
if (a.isFormData(r) && (B = x.headers.get("content-type")) && d.setContentType(B), x.body) {
|
|
1243
1243
|
const [j, b] = et(
|
|
1244
1244
|
h,
|
|
1245
1245
|
me(tt(l))
|
|
1246
1246
|
);
|
|
1247
|
-
r = rt(
|
|
1247
|
+
r = rt(x.body, st, j, b);
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
1250
|
a.isString(p) || (p = p ? "include" : "omit");
|
|
1251
1251
|
const R = "credentials" in Request.prototype;
|
|
1252
1252
|
f = new Request(t, {
|
|
1253
|
-
...
|
|
1253
|
+
...y,
|
|
1254
1254
|
signal: E,
|
|
1255
1255
|
method: n.toUpperCase(),
|
|
1256
1256
|
headers: d.normalize().toJSON(),
|
|
@@ -1258,28 +1258,28 @@ const yr = async (e) => {
|
|
|
1258
1258
|
duplex: "half",
|
|
1259
1259
|
credentials: R ? p : void 0
|
|
1260
1260
|
});
|
|
1261
|
-
let A = await fetch(f,
|
|
1262
|
-
const _ =
|
|
1263
|
-
if (
|
|
1264
|
-
const
|
|
1265
|
-
["status", "statusText", "headers"].forEach((
|
|
1266
|
-
O
|
|
1261
|
+
let A = await fetch(f, y);
|
|
1262
|
+
const _ = Pe && (u === "stream" || u === "response");
|
|
1263
|
+
if (Pe && (c || _ && m)) {
|
|
1264
|
+
const x = {};
|
|
1265
|
+
["status", "statusText", "headers"].forEach((O) => {
|
|
1266
|
+
x[O] = A[O];
|
|
1267
1267
|
});
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1268
|
+
const B = a.toFiniteNumber(A.headers.get("content-length")), [j, b] = c && et(
|
|
1269
|
+
B,
|
|
1270
1270
|
me(tt(c), !0)
|
|
1271
1271
|
) || [];
|
|
1272
1272
|
A = new Response(
|
|
1273
1273
|
rt(A.body, st, j, () => {
|
|
1274
1274
|
b && b(), m && m();
|
|
1275
1275
|
}),
|
|
1276
|
-
|
|
1276
|
+
x
|
|
1277
1277
|
);
|
|
1278
1278
|
}
|
|
1279
1279
|
u = u || "text";
|
|
1280
|
-
let N = await
|
|
1281
|
-
return !_ && m && m(), await new Promise((
|
|
1282
|
-
At(
|
|
1280
|
+
let N = await ge[a.findKey(ge, u) || "text"](A, e);
|
|
1281
|
+
return !_ && m && m(), await new Promise((x, B) => {
|
|
1282
|
+
At(x, B, {
|
|
1283
1283
|
data: N,
|
|
1284
1284
|
headers: U.from(A.headers),
|
|
1285
1285
|
status: A.status,
|
|
@@ -1290,14 +1290,14 @@ const yr = async (e) => {
|
|
|
1290
1290
|
});
|
|
1291
1291
|
} catch (R) {
|
|
1292
1292
|
throw m && m(), R && R.name === "TypeError" && /Load failed|fetch/i.test(R.message) ? Object.assign(
|
|
1293
|
-
new
|
|
1293
|
+
new w("Network Error", w.ERR_NETWORK, e, f),
|
|
1294
1294
|
{
|
|
1295
1295
|
cause: R.cause || R
|
|
1296
1296
|
}
|
|
1297
|
-
) :
|
|
1297
|
+
) : w.from(R, R && R.code, e, f);
|
|
1298
1298
|
}
|
|
1299
1299
|
}), Ue = {
|
|
1300
|
-
http:
|
|
1300
|
+
http: Pn,
|
|
1301
1301
|
xhr: ur,
|
|
1302
1302
|
fetch: Er
|
|
1303
1303
|
};
|
|
@@ -1320,7 +1320,7 @@ const ot = (e) => `- ${e}`, br = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1320
1320
|
n = e[i];
|
|
1321
1321
|
let o;
|
|
1322
1322
|
if (r = n, !br(n) && (r = Ue[(o = String(n)).toLowerCase()], r === void 0))
|
|
1323
|
-
throw new
|
|
1323
|
+
throw new w(`Unknown adapter '${o}'`);
|
|
1324
1324
|
if (r)
|
|
1325
1325
|
break;
|
|
1326
1326
|
s[o || "#" + i] = r;
|
|
@@ -1332,7 +1332,7 @@ const ot = (e) => `- ${e}`, br = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1332
1332
|
let o = t ? i.length > 1 ? `since :
|
|
1333
1333
|
` + i.map(ot).join(`
|
|
1334
1334
|
`) : " " + ot(i[0]) : "as no adapter specified";
|
|
1335
|
-
throw new
|
|
1335
|
+
throw new w(
|
|
1336
1336
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1337
1337
|
"ERR_NOT_SUPPORT"
|
|
1338
1338
|
);
|
|
@@ -1376,9 +1376,9 @@ Te.transitional = function(t, n, r) {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
return (i, o, c) => {
|
|
1378
1378
|
if (t === !1)
|
|
1379
|
-
throw new
|
|
1379
|
+
throw new w(
|
|
1380
1380
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1381
|
-
|
|
1381
|
+
w.ERR_DEPRECATED
|
|
1382
1382
|
);
|
|
1383
1383
|
return n && !at[o] && (at[o] = !0, console.warn(
|
|
1384
1384
|
s(
|
|
@@ -1393,7 +1393,7 @@ Te.spelling = function(t) {
|
|
|
1393
1393
|
};
|
|
1394
1394
|
function _r(e, t, n) {
|
|
1395
1395
|
if (typeof e != "object")
|
|
1396
|
-
throw new
|
|
1396
|
+
throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
|
|
1397
1397
|
const r = Object.keys(e);
|
|
1398
1398
|
let s = r.length;
|
|
1399
1399
|
for (; s-- > 0; ) {
|
|
@@ -1401,11 +1401,11 @@ function _r(e, t, n) {
|
|
|
1401
1401
|
if (o) {
|
|
1402
1402
|
const c = e[i], l = c === void 0 || o(c, i, e);
|
|
1403
1403
|
if (l !== !0)
|
|
1404
|
-
throw new
|
|
1404
|
+
throw new w("option " + i + " must be " + l, w.ERR_BAD_OPTION_VALUE);
|
|
1405
1405
|
continue;
|
|
1406
1406
|
}
|
|
1407
1407
|
if (n !== !0)
|
|
1408
|
-
throw new
|
|
1408
|
+
throw new w("Unknown option " + i, w.ERR_BAD_OPTION);
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
1411
|
const he = {
|
|
@@ -1479,16 +1479,16 @@ let Z = class {
|
|
|
1479
1479
|
this.interceptors.response.forEach(function(m) {
|
|
1480
1480
|
u.push(m.fulfilled, m.rejected);
|
|
1481
1481
|
});
|
|
1482
|
-
let d, p = 0,
|
|
1482
|
+
let d, p = 0, y;
|
|
1483
1483
|
if (!l) {
|
|
1484
1484
|
const f = [it.bind(this), void 0];
|
|
1485
|
-
for (f.unshift.apply(f, c), f.push.apply(f, u),
|
|
1485
|
+
for (f.unshift.apply(f, c), f.push.apply(f, u), y = f.length, d = Promise.resolve(n); p < y; )
|
|
1486
1486
|
d = d.then(f[p++], f[p++]);
|
|
1487
1487
|
return d;
|
|
1488
1488
|
}
|
|
1489
|
-
|
|
1489
|
+
y = c.length;
|
|
1490
1490
|
let E = n;
|
|
1491
|
-
for (p = 0; p <
|
|
1491
|
+
for (p = 0; p < y; ) {
|
|
1492
1492
|
const f = c[p++], m = c[p++];
|
|
1493
1493
|
try {
|
|
1494
1494
|
E = f(E);
|
|
@@ -1502,13 +1502,13 @@ let Z = class {
|
|
|
1502
1502
|
} catch (f) {
|
|
1503
1503
|
return Promise.reject(f);
|
|
1504
1504
|
}
|
|
1505
|
-
for (p = 0,
|
|
1505
|
+
for (p = 0, y = u.length; p < y; )
|
|
1506
1506
|
d = d.then(u[p++], u[p++]);
|
|
1507
1507
|
return d;
|
|
1508
1508
|
}
|
|
1509
1509
|
getUri(t) {
|
|
1510
1510
|
t = Y(this.defaults, t);
|
|
1511
|
-
const n =
|
|
1511
|
+
const n = Ot(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1512
1512
|
return _t(n, t.params, t.paramsSerializer);
|
|
1513
1513
|
}
|
|
1514
1514
|
};
|
|
@@ -1536,7 +1536,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
Z.prototype[t] = n(), Z.prototype[t + "Form"] = n(!0);
|
|
1538
1538
|
});
|
|
1539
|
-
let Sr = class
|
|
1539
|
+
let Sr = class kt {
|
|
1540
1540
|
constructor(t) {
|
|
1541
1541
|
if (typeof t != "function")
|
|
1542
1542
|
throw new TypeError("executor must be a function.");
|
|
@@ -1602,7 +1602,7 @@ let Sr = class Bt {
|
|
|
1602
1602
|
static source() {
|
|
1603
1603
|
let t;
|
|
1604
1604
|
return {
|
|
1605
|
-
token: new
|
|
1605
|
+
token: new kt(function(s) {
|
|
1606
1606
|
t = s;
|
|
1607
1607
|
}),
|
|
1608
1608
|
cancel: t
|
|
@@ -1685,20 +1685,20 @@ const Ie = {
|
|
|
1685
1685
|
Object.entries(Ie).forEach(([e, t]) => {
|
|
1686
1686
|
Ie[t] = e;
|
|
1687
1687
|
});
|
|
1688
|
-
function
|
|
1688
|
+
function Bt(e) {
|
|
1689
1689
|
const t = new Z(e), n = lt(Z.prototype.request, t);
|
|
1690
1690
|
return a.extend(n, Z.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1691
|
-
return
|
|
1691
|
+
return Bt(Y(e, s));
|
|
1692
1692
|
}, n;
|
|
1693
1693
|
}
|
|
1694
|
-
const C =
|
|
1694
|
+
const C = Bt(ce);
|
|
1695
1695
|
C.Axios = Z;
|
|
1696
1696
|
C.CanceledError = te;
|
|
1697
1697
|
C.CancelToken = Sr;
|
|
1698
1698
|
C.isCancel = Tt;
|
|
1699
1699
|
C.VERSION = Nt;
|
|
1700
1700
|
C.toFormData = Se;
|
|
1701
|
-
C.AxiosError =
|
|
1701
|
+
C.AxiosError = w;
|
|
1702
1702
|
C.Cancel = C.CanceledError;
|
|
1703
1703
|
C.all = function(t) {
|
|
1704
1704
|
return Promise.all(t);
|
|
@@ -1717,15 +1717,15 @@ const {
|
|
|
1717
1717
|
CanceledError: Rs,
|
|
1718
1718
|
isCancel: Ts,
|
|
1719
1719
|
CancelToken: As,
|
|
1720
|
-
VERSION:
|
|
1721
|
-
all:
|
|
1720
|
+
VERSION: Os,
|
|
1721
|
+
all: xs,
|
|
1722
1722
|
Cancel: Cs,
|
|
1723
1723
|
isAxiosError: Ls,
|
|
1724
1724
|
spread: vs,
|
|
1725
1725
|
toFormData: Ns,
|
|
1726
|
-
AxiosHeaders:
|
|
1727
|
-
HttpStatusCode:
|
|
1728
|
-
formToJSON:
|
|
1726
|
+
AxiosHeaders: ks,
|
|
1727
|
+
HttpStatusCode: Bs,
|
|
1728
|
+
formToJSON: Ps,
|
|
1729
1729
|
getAdapter: Us,
|
|
1730
1730
|
mergeConfig: Is
|
|
1731
1731
|
} = C;
|
|
@@ -1748,20 +1748,20 @@ function Ar(e, t) {
|
|
|
1748
1748
|
return (s, i) => r().then((o) => i(o.transaction(t, s).objectStore(t)));
|
|
1749
1749
|
}
|
|
1750
1750
|
let ve;
|
|
1751
|
-
function
|
|
1751
|
+
function Pt() {
|
|
1752
1752
|
return ve || (ve = Ar("keyval-store", "keyval")), ve;
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function Or(e, t = Pt()) {
|
|
1755
1755
|
return t("readonly", (n) => Me(n.get(e)));
|
|
1756
1756
|
}
|
|
1757
|
-
function
|
|
1757
|
+
function xr(e, t, n = Pt()) {
|
|
1758
1758
|
return n("readwrite", (r) => (r.put(t, e), Me(r.transaction)));
|
|
1759
1759
|
}
|
|
1760
1760
|
async function Cr(e) {
|
|
1761
|
-
return await
|
|
1761
|
+
return await Or(e) ?? null;
|
|
1762
1762
|
}
|
|
1763
1763
|
async function Lr(e, t) {
|
|
1764
|
-
await
|
|
1764
|
+
await xr(e, t);
|
|
1765
1765
|
}
|
|
1766
1766
|
function vr(e) {
|
|
1767
1767
|
const [t, n] = v({
|
|
@@ -1773,20 +1773,20 @@ function vr(e) {
|
|
|
1773
1773
|
error: null
|
|
1774
1774
|
}), [r, s] = v(
|
|
1775
1775
|
e.autoAdvance || !1
|
|
1776
|
-
), [i, o] = v(!1), [, c] = v(0), l = D(null), u = D(null), d = D(r), p = D(!1),
|
|
1776
|
+
), [i, o] = v(!1), [, c] = v(0), l = D(null), u = D(null), d = D(r), p = D(!1), y = D(null);
|
|
1777
1777
|
M(() => {
|
|
1778
1778
|
d.current = r;
|
|
1779
1779
|
}, [r]);
|
|
1780
1780
|
const E = (b) => {
|
|
1781
1781
|
if (e.avatars.length <= 1) return 0;
|
|
1782
|
-
const
|
|
1783
|
-
return Math.min(Math.floor(b / $),
|
|
1782
|
+
const O = e.avatars.length, $ = 100 / O;
|
|
1783
|
+
return Math.min(Math.floor(b / $), O - 1);
|
|
1784
1784
|
}, f = () => {
|
|
1785
1785
|
u.current && (clearInterval(u.current), u.current = null);
|
|
1786
1786
|
}, m = () => {
|
|
1787
1787
|
l.current && (u.current = setInterval(() => {
|
|
1788
1788
|
if (l.current && l.current.duration) {
|
|
1789
|
-
const b = l.current.currentTime,
|
|
1789
|
+
const b = l.current.currentTime, O = l.current.duration, $ = b / O * 100;
|
|
1790
1790
|
n((Q) => ({
|
|
1791
1791
|
...Q,
|
|
1792
1792
|
progress: Math.min($, 100),
|
|
@@ -1796,8 +1796,8 @@ function vr(e) {
|
|
|
1796
1796
|
}, 100));
|
|
1797
1797
|
}, h = () => {
|
|
1798
1798
|
var b;
|
|
1799
|
-
l.current && !t.isPaused && (l.current.pause(), f(), n((
|
|
1800
|
-
...
|
|
1799
|
+
l.current && !t.isPaused && (l.current.pause(), f(), n((O) => ({
|
|
1800
|
+
...O,
|
|
1801
1801
|
isPlaying: !1,
|
|
1802
1802
|
isPaused: !0
|
|
1803
1803
|
})), (b = e.onPause) == null || b.call(e));
|
|
@@ -1810,8 +1810,8 @@ function vr(e) {
|
|
|
1810
1810
|
isPaused: !1
|
|
1811
1811
|
}));
|
|
1812
1812
|
} catch (b) {
|
|
1813
|
-
console.error("Error al reanudar audio:", b), n((
|
|
1814
|
-
...
|
|
1813
|
+
console.error("Error al reanudar audio:", b), n((O) => ({
|
|
1814
|
+
...O,
|
|
1815
1815
|
error: {
|
|
1816
1816
|
type: "audio",
|
|
1817
1817
|
message: "Error al reanudar la reproducción"
|
|
@@ -1823,20 +1823,20 @@ function vr(e) {
|
|
|
1823
1823
|
}, _ = () => {
|
|
1824
1824
|
s((b) => !b);
|
|
1825
1825
|
}, N = (b = !1) => {
|
|
1826
|
-
f(), l.current && (
|
|
1826
|
+
f(), l.current && (y.current && (l.current.removeEventListener(
|
|
1827
1827
|
"ended",
|
|
1828
|
-
|
|
1829
|
-
),
|
|
1830
|
-
...
|
|
1828
|
+
y.current
|
|
1829
|
+
), y.current = null), l.current.removeEventListener("error", x), l.current.removeEventListener("pause", B), l.current.pause(), l.current.currentTime = 0, l.current.src = "", l.current.load(), l.current = null), n((O) => ({
|
|
1830
|
+
...O,
|
|
1831
1831
|
isPlaying: !1,
|
|
1832
1832
|
isPaused: !1,
|
|
1833
1833
|
progress: 0,
|
|
1834
1834
|
currentPNGTuber: 0
|
|
1835
|
-
})), d.current && !p.current && (p.current = !0, c((
|
|
1836
|
-
var
|
|
1837
|
-
(
|
|
1835
|
+
})), d.current && !p.current && (p.current = !0, c((O) => O + 1)), b || setTimeout(() => {
|
|
1836
|
+
var O;
|
|
1837
|
+
(O = e.onStop) == null || O.call(e);
|
|
1838
1838
|
}, 50);
|
|
1839
|
-
},
|
|
1839
|
+
}, x = () => {
|
|
1840
1840
|
n((b) => ({
|
|
1841
1841
|
...b,
|
|
1842
1842
|
error: {
|
|
@@ -1844,14 +1844,14 @@ function vr(e) {
|
|
|
1844
1844
|
message: "Error al reproducir el audio"
|
|
1845
1845
|
}
|
|
1846
1846
|
})), N();
|
|
1847
|
-
},
|
|
1847
|
+
}, B = () => {
|
|
1848
1848
|
l.current && l.current.currentTime < l.current.duration && n((b) => ({
|
|
1849
1849
|
...b,
|
|
1850
1850
|
isPlaying: !1,
|
|
1851
1851
|
isPaused: !0
|
|
1852
1852
|
}));
|
|
1853
1853
|
}, j = async () => {
|
|
1854
|
-
var
|
|
1854
|
+
var O, $, Q;
|
|
1855
1855
|
if (!e.text.trim()) {
|
|
1856
1856
|
n((L) => ({
|
|
1857
1857
|
...L,
|
|
@@ -1876,7 +1876,7 @@ function vr(e) {
|
|
|
1876
1876
|
if (!L) {
|
|
1877
1877
|
const I = e.model === "standard" ? "eleven_monolingual_v1" : e.model === "enhanced" ? "eleven_turbo_v2" : "eleven_multilingual_v2";
|
|
1878
1878
|
L = (await C.post(
|
|
1879
|
-
`${
|
|
1879
|
+
`${we.ELEVENLABS_API_BASE}/text-to-speech/${e.voiceId}`,
|
|
1880
1880
|
{
|
|
1881
1881
|
text: e.text,
|
|
1882
1882
|
model_id: I,
|
|
@@ -1902,7 +1902,7 @@ function vr(e) {
|
|
|
1902
1902
|
const J = () => {
|
|
1903
1903
|
N(!1), URL.revokeObjectURL(I);
|
|
1904
1904
|
};
|
|
1905
|
-
|
|
1905
|
+
y.current = J, l.current.addEventListener("ended", J), l.current.addEventListener("error", x), l.current.addEventListener("pause", B), l.current.addEventListener("canplaythrough", async () => {
|
|
1906
1906
|
var le;
|
|
1907
1907
|
o(!1), n((G) => ({
|
|
1908
1908
|
...G,
|
|
@@ -1929,7 +1929,7 @@ function vr(e) {
|
|
|
1929
1929
|
message: `Error en la API: ${L.message}`
|
|
1930
1930
|
},
|
|
1931
1931
|
isPlaying: !1
|
|
1932
|
-
})), f(), o(!1), C.isAxiosError(L) ? (console.error("Código de estado:", (
|
|
1932
|
+
})), f(), o(!1), C.isAxiosError(L) ? (console.error("Código de estado:", (O = L.response) == null ? void 0 : O.status), (($ = L.response) == null ? void 0 : $.data) instanceof Blob ? L.response.data.text().then((I) => {
|
|
1933
1933
|
console.error("Respuesta de error (texto):", I);
|
|
1934
1934
|
try {
|
|
1935
1935
|
const J = JSON.parse(I);
|
|
@@ -1962,11 +1962,11 @@ function vr(e) {
|
|
|
1962
1962
|
avatars: e.avatars
|
|
1963
1963
|
};
|
|
1964
1964
|
}
|
|
1965
|
-
const Nr = "_selectorWrapper_1kmif_1",
|
|
1965
|
+
const Nr = "_selectorWrapper_1kmif_1", kr = "_iconButton_1kmif_6", Br = "_dropdown_1kmif_18", Pr = "_dropdownItem_1kmif_31", Ur = "_active_1kmif_44", oe = {
|
|
1966
1966
|
selectorWrapper: Nr,
|
|
1967
|
-
iconButton:
|
|
1968
|
-
dropdown:
|
|
1969
|
-
dropdownItem:
|
|
1967
|
+
iconButton: kr,
|
|
1968
|
+
dropdown: Br,
|
|
1969
|
+
dropdownItem: Pr,
|
|
1970
1970
|
active: Ur
|
|
1971
1971
|
}, Ir = ({
|
|
1972
1972
|
languages: e,
|
|
@@ -1980,13 +1980,13 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
1980
1980
|
};
|
|
1981
1981
|
return document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
|
|
1982
1982
|
}, []), /* @__PURE__ */ F("div", { className: oe.selectorWrapper, ref: c, children: [
|
|
1983
|
-
/* @__PURE__ */
|
|
1983
|
+
/* @__PURE__ */ g(
|
|
1984
1984
|
"button",
|
|
1985
1985
|
{
|
|
1986
1986
|
className: oe.iconButton,
|
|
1987
1987
|
title: "Cambiar idioma",
|
|
1988
1988
|
onClick: () => s(!r),
|
|
1989
|
-
children: /* @__PURE__ */
|
|
1989
|
+
children: /* @__PURE__ */ g(
|
|
1990
1990
|
"svg",
|
|
1991
1991
|
{
|
|
1992
1992
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1994,12 +1994,12 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
1994
1994
|
width: "30px",
|
|
1995
1995
|
height: "30px",
|
|
1996
1996
|
viewBox: "0 0 24 24",
|
|
1997
|
-
children: /* @__PURE__ */
|
|
1997
|
+
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" })
|
|
1998
1998
|
}
|
|
1999
1999
|
)
|
|
2000
2000
|
}
|
|
2001
2001
|
),
|
|
2002
|
-
r && /* @__PURE__ */
|
|
2002
|
+
r && /* @__PURE__ */ g("div", { className: oe.dropdown, children: e.map((l) => /* @__PURE__ */ g(
|
|
2003
2003
|
"button",
|
|
2004
2004
|
{
|
|
2005
2005
|
className: `${oe.dropdownItem} ${l.code === i ? oe.active : ""}`,
|
|
@@ -2011,7 +2011,7 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2011
2011
|
l.code
|
|
2012
2012
|
)) })
|
|
2013
2013
|
] });
|
|
2014
|
-
}, Fr = "
|
|
2014
|
+
}, Fr = "_controlsRow_8wakc_1", Dr = "_select_8wakc_9", jr = "_autoAdvanceButton_8wakc_15", Mr = "_section_8wakc_26", qr = "_textarea_8wakc_36", $r = "_input_8wakc_46", Hr = "_error_8wakc_54", zr = "_buttonPrimary_8wakc_59", Vr = "_buttonSuccess_8wakc_69", Jr = "_infoBox_8wakc_78", Gr = "_viewer_8wakc_86", Wr = "_viewerTopBar_8wakc_97", Kr = "_topRightControls_8wakc_110", Xr = "_itemCounter_8wakc_118", Zr = "_iconButton_8wakc_126", Yr = "_navButton_8wakc_146", Qr = "_navButtonLeft_8wakc_163", es = "_navButtonRight_8wakc_167", ts = "_backgroundImage_8wakc_171", ns = "_avatar_8wakc_178", rs = "_caption_8wakc_188", ss = "_captionTitle_8wakc_201", os = "_captionText_8wakc_211", is = "_loadingOverlay_8wakc_217", as = "_loadingSpinner_8wakc_232", cs = "_spin_8wakc_251", ls = "_loadingButton_8wakc_242", us = "_spinner_8wakc_251", ds = "_progressBar_8wakc_264", fs = "_progressFill_8wakc_273", ps = "_playbackControls_8wakc_279", hs = "_playButton_8wakc_292", ms = "_pauseButton_8wakc_293", S = {
|
|
2015
2015
|
controlsRow: Fr,
|
|
2016
2016
|
select: Dr,
|
|
2017
2017
|
autoAdvanceButton: jr,
|
|
@@ -2045,11 +2045,11 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2045
2045
|
playbackControls: ps,
|
|
2046
2046
|
playButton: hs,
|
|
2047
2047
|
pauseButton: ms
|
|
2048
|
-
},
|
|
2048
|
+
}, gs = [
|
|
2049
2049
|
{ id: "21m00Tcm4TlvDq8ikWAM", name: "Voz Mujer" },
|
|
2050
2050
|
// { id: "iLzHtPh0bW6RGWRG0Xo5", name: "Voz Hombre" },
|
|
2051
2051
|
{ id: "Nh2zY9kknu6z4pZy6FhD", name: "Voz Hombre Joven" }
|
|
2052
|
-
], ct =
|
|
2052
|
+
], ct = we.DEFAULT_IMAGE_URL, Fs = ({
|
|
2053
2053
|
heritageItems: e = [],
|
|
2054
2054
|
targetLanguage: t = "es",
|
|
2055
2055
|
descriptionLength: n = "extended",
|
|
@@ -2057,11 +2057,11 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2057
2057
|
voiceIds: s = [],
|
|
2058
2058
|
avatars: i = []
|
|
2059
2059
|
}) => {
|
|
2060
|
-
const [o] = v(e), [c, l] = v(0), [u, d] = v(n), [p,
|
|
2060
|
+
const [o] = v(e), [c, l] = v(0), [u, d] = v(n), [p, y] = v(
|
|
2061
2061
|
t
|
|
2062
|
-
), [E, f] = v(""), [m, h] = v([]), [R, A] = v(0), [_, N] = v(r), [
|
|
2062
|
+
), [E, f] = v(""), [m, h] = v([]), [R, A] = v(0), [_, N] = v(r), [x, B] = v(!1), [j, b] = v(
|
|
2063
2063
|
s.length > 0 ? s[0] : ""
|
|
2064
|
-
),
|
|
2064
|
+
), O = j || (s.length > 0 ? s[c % s.length] : ""), $ = i[c % i.length], [Q, L] = v(!1), [I, J] = v(!1), [le, G] = v(!0), z = D(null), qe = D(_), $e = D(c), Ae = D(o), K = D(null), ue = D(!1);
|
|
2065
2065
|
M(() => {
|
|
2066
2066
|
qe.current = _, $e.current = c, Ae.current = o;
|
|
2067
2067
|
}, [_, c, o]);
|
|
@@ -2089,23 +2089,23 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2089
2089
|
lang: p,
|
|
2090
2090
|
onStop: () => {
|
|
2091
2091
|
G(!0), qe.current && Ae.current.length > 1 && !ue.current && setTimeout(() => {
|
|
2092
|
-
|
|
2092
|
+
B(!0);
|
|
2093
2093
|
const T = ($e.current + 1) % Ae.current.length;
|
|
2094
2094
|
l(T);
|
|
2095
2095
|
}, 100), ue.current = !1;
|
|
2096
2096
|
},
|
|
2097
|
-
voiceId:
|
|
2097
|
+
voiceId: O,
|
|
2098
2098
|
avatars: [$],
|
|
2099
|
-
apiKey:
|
|
2099
|
+
apiKey: we.ELEVENLABS_API_KEY
|
|
2100
2100
|
});
|
|
2101
2101
|
M(() => {
|
|
2102
|
-
if (
|
|
2102
|
+
if (x && E && !E.includes("JSON válido")) {
|
|
2103
2103
|
const T = setTimeout(() => {
|
|
2104
|
-
W || Ve(),
|
|
2104
|
+
W || Ve(), B(!1);
|
|
2105
2105
|
}, 500);
|
|
2106
2106
|
return () => clearTimeout(T);
|
|
2107
2107
|
}
|
|
2108
|
-
}, [
|
|
2108
|
+
}, [x, E, W]), M(() => {
|
|
2109
2109
|
(async () => {
|
|
2110
2110
|
const V = de.description.local[u];
|
|
2111
2111
|
if (V)
|
|
@@ -2117,7 +2117,7 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2117
2117
|
}
|
|
2118
2118
|
})();
|
|
2119
2119
|
}, [de, u, p]);
|
|
2120
|
-
const
|
|
2120
|
+
const Oe = () => {
|
|
2121
2121
|
G(!0), K.current && clearTimeout(K.current), K.current = setTimeout(() => {
|
|
2122
2122
|
G(!1);
|
|
2123
2123
|
}, 4e3);
|
|
@@ -2126,13 +2126,13 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2126
2126
|
alert("No hay contenido para reproducir");
|
|
2127
2127
|
return;
|
|
2128
2128
|
}
|
|
2129
|
-
It(),
|
|
2129
|
+
It(), Oe();
|
|
2130
2130
|
}, Mt = () => {
|
|
2131
2131
|
Ft();
|
|
2132
2132
|
}, qt = () => {
|
|
2133
|
-
Dt(),
|
|
2133
|
+
Dt(), Oe();
|
|
2134
2134
|
}, Je = () => {
|
|
2135
|
-
jt(),
|
|
2135
|
+
jt(), B(!1), z.current && clearTimeout(z.current), K.current && clearTimeout(K.current), G(!0);
|
|
2136
2136
|
}, $t = () => {
|
|
2137
2137
|
ue.current = !0, Je(), c > 0 && l((T) => T - 1);
|
|
2138
2138
|
}, Ht = () => {
|
|
@@ -2167,8 +2167,8 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2167
2167
|
onChange: (T) => d(T.target.value),
|
|
2168
2168
|
className: S.select,
|
|
2169
2169
|
children: [
|
|
2170
|
-
/* @__PURE__ */
|
|
2171
|
-
/* @__PURE__ */
|
|
2170
|
+
/* @__PURE__ */ g("option", { value: "short", children: "Descripción Corta" }),
|
|
2171
|
+
/* @__PURE__ */ g("option", { value: "extended", children: "Descripción Extendida" })
|
|
2172
2172
|
]
|
|
2173
2173
|
}
|
|
2174
2174
|
),
|
|
@@ -2176,25 +2176,25 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2176
2176
|
"select",
|
|
2177
2177
|
{
|
|
2178
2178
|
value: p,
|
|
2179
|
-
onChange: (T) =>
|
|
2179
|
+
onChange: (T) => y(T.target.value),
|
|
2180
2180
|
className: S.select,
|
|
2181
2181
|
children: [
|
|
2182
|
-
/* @__PURE__ */
|
|
2183
|
-
/* @__PURE__ */
|
|
2184
|
-
/* @__PURE__ */
|
|
2182
|
+
/* @__PURE__ */ g("option", { value: "en", children: "Inglés" }),
|
|
2183
|
+
/* @__PURE__ */ g("option", { value: "es", children: "Español" }),
|
|
2184
|
+
/* @__PURE__ */ g("option", { value: "fr", children: "Francés" })
|
|
2185
2185
|
]
|
|
2186
2186
|
}
|
|
2187
2187
|
),
|
|
2188
|
-
/* @__PURE__ */
|
|
2188
|
+
/* @__PURE__ */ g(
|
|
2189
2189
|
"select",
|
|
2190
2190
|
{
|
|
2191
|
-
value:
|
|
2191
|
+
value: O,
|
|
2192
2192
|
onChange: (T) => Vt(T.target.value),
|
|
2193
2193
|
className: S.select,
|
|
2194
|
-
children:
|
|
2194
|
+
children: gs.map((T) => /* @__PURE__ */ g("option", { value: T.id, children: T.name }, T.id))
|
|
2195
2195
|
}
|
|
2196
2196
|
),
|
|
2197
|
-
/* @__PURE__ */
|
|
2197
|
+
/* @__PURE__ */ g(
|
|
2198
2198
|
"button",
|
|
2199
2199
|
{
|
|
2200
2200
|
onClick: () => N(!_),
|
|
@@ -2204,11 +2204,11 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2204
2204
|
}
|
|
2205
2205
|
)
|
|
2206
2206
|
] }),
|
|
2207
|
-
/* @__PURE__ */ F("div", { className: S.viewer, onClick:
|
|
2207
|
+
/* @__PURE__ */ F("div", { className: S.viewer, onClick: Oe, children: [
|
|
2208
2208
|
/* @__PURE__ */ F("div", { className: S.viewerTopBar, children: [
|
|
2209
|
-
/* @__PURE__ */
|
|
2209
|
+
/* @__PURE__ */ g("div", { className: S.itemCounter, children: o.length > 0 ? `${c + 1}/${o.length}` : "0/0" }),
|
|
2210
2210
|
/* @__PURE__ */ F("div", { className: S.topRightControls, children: [
|
|
2211
|
-
/* @__PURE__ */
|
|
2211
|
+
/* @__PURE__ */ g(
|
|
2212
2212
|
"button",
|
|
2213
2213
|
{
|
|
2214
2214
|
onClick: () => N(!_),
|
|
@@ -2217,14 +2217,14 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2217
2217
|
style: {
|
|
2218
2218
|
backgroundColor: _ ? "rgba(255, 255, 255, 0.7)" : "rgba(0, 0, 0, 0.7)"
|
|
2219
2219
|
},
|
|
2220
|
-
children: /* @__PURE__ */
|
|
2220
|
+
children: /* @__PURE__ */ g(
|
|
2221
2221
|
"svg",
|
|
2222
2222
|
{
|
|
2223
2223
|
width: "20px",
|
|
2224
2224
|
height: "20px",
|
|
2225
2225
|
viewBox: "0 0 16 16",
|
|
2226
2226
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2227
|
-
children: /* @__PURE__ */
|
|
2227
|
+
children: /* @__PURE__ */ g(
|
|
2228
2228
|
"path",
|
|
2229
2229
|
{
|
|
2230
2230
|
style: { fill: _ ? "black" : "white" },
|
|
@@ -2235,7 +2235,7 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2235
2235
|
)
|
|
2236
2236
|
}
|
|
2237
2237
|
),
|
|
2238
|
-
/* @__PURE__ */
|
|
2238
|
+
/* @__PURE__ */ g(
|
|
2239
2239
|
Ir,
|
|
2240
2240
|
{
|
|
2241
2241
|
languages: [
|
|
@@ -2244,12 +2244,12 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2244
2244
|
{ code: "fr", label: "Français" }
|
|
2245
2245
|
],
|
|
2246
2246
|
current: "es",
|
|
2247
|
-
onChange: (T) =>
|
|
2247
|
+
onChange: (T) => y(T)
|
|
2248
2248
|
}
|
|
2249
2249
|
)
|
|
2250
2250
|
] })
|
|
2251
2251
|
] }),
|
|
2252
|
-
/* @__PURE__ */
|
|
2252
|
+
/* @__PURE__ */ g(
|
|
2253
2253
|
"button",
|
|
2254
2254
|
{
|
|
2255
2255
|
onClick: $t,
|
|
@@ -2258,7 +2258,7 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2258
2258
|
title: "Anterior",
|
|
2259
2259
|
onMouseOver: () => L(!0),
|
|
2260
2260
|
onMouseOut: () => L(!1),
|
|
2261
|
-
children: /* @__PURE__ */
|
|
2261
|
+
children: /* @__PURE__ */ g(
|
|
2262
2262
|
"svg",
|
|
2263
2263
|
{
|
|
2264
2264
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2276,12 +2276,12 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2276
2276
|
transition: "transform 0.2s ease-in-out",
|
|
2277
2277
|
transform: Q ? "scale(1.5)" : "scale(1)"
|
|
2278
2278
|
},
|
|
2279
|
-
children: /* @__PURE__ */
|
|
2279
|
+
children: /* @__PURE__ */ g("path", { d: "M15 18l-6-6 6-6" })
|
|
2280
2280
|
}
|
|
2281
2281
|
)
|
|
2282
2282
|
}
|
|
2283
2283
|
),
|
|
2284
|
-
/* @__PURE__ */
|
|
2284
|
+
/* @__PURE__ */ g(
|
|
2285
2285
|
"button",
|
|
2286
2286
|
{
|
|
2287
2287
|
onClick: Ht,
|
|
@@ -2290,7 +2290,7 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2290
2290
|
title: "Siguiente",
|
|
2291
2291
|
onMouseOver: () => J(!0),
|
|
2292
2292
|
onMouseOut: () => J(!1),
|
|
2293
|
-
children: /* @__PURE__ */
|
|
2293
|
+
children: /* @__PURE__ */ g(
|
|
2294
2294
|
"svg",
|
|
2295
2295
|
{
|
|
2296
2296
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2308,12 +2308,12 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2308
2308
|
transition: "transform 0.2s ease-in-out",
|
|
2309
2309
|
transform: I ? "scale(1.5)" : "scale(1)"
|
|
2310
2310
|
},
|
|
2311
|
-
children: /* @__PURE__ */
|
|
2311
|
+
children: /* @__PURE__ */ g("path", { d: "M9 6l6 6-6 6" })
|
|
2312
2312
|
}
|
|
2313
2313
|
)
|
|
2314
2314
|
}
|
|
2315
2315
|
),
|
|
2316
|
-
/* @__PURE__ */
|
|
2316
|
+
/* @__PURE__ */ g(
|
|
2317
2317
|
"img",
|
|
2318
2318
|
{
|
|
2319
2319
|
src: de.imageUrl || ct,
|
|
@@ -2323,7 +2323,7 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2323
2323
|
onError: (T) => T.currentTarget.src = ct
|
|
2324
2324
|
}
|
|
2325
2325
|
),
|
|
2326
|
-
W && /* @__PURE__ */
|
|
2326
|
+
W && /* @__PURE__ */ g(We, { children: /* @__PURE__ */ g(
|
|
2327
2327
|
"img",
|
|
2328
2328
|
{
|
|
2329
2329
|
src: $,
|
|
@@ -2333,16 +2333,16 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2333
2333
|
}
|
|
2334
2334
|
) }),
|
|
2335
2335
|
/* @__PURE__ */ F("div", { className: S.caption, children: [
|
|
2336
|
-
/* @__PURE__ */
|
|
2337
|
-
W && /* @__PURE__ */
|
|
2336
|
+
/* @__PURE__ */ g("h4", { className: S.captionTitle, children: de.name }),
|
|
2337
|
+
W && /* @__PURE__ */ g(We, { children: /* @__PURE__ */ g("p", { className: S.captionText, children: m.length > 0 && m[R] }) })
|
|
2338
2338
|
] }),
|
|
2339
|
-
|
|
2340
|
-
/* @__PURE__ */
|
|
2341
|
-
/* @__PURE__ */
|
|
2339
|
+
x && /* @__PURE__ */ F("div", { className: S.loadingOverlay, children: [
|
|
2340
|
+
/* @__PURE__ */ g("div", { className: S.loadingSpinner }),
|
|
2341
|
+
/* @__PURE__ */ g("p", { children: "Cargando siguiente patrimonio..." })
|
|
2342
2342
|
] }),
|
|
2343
|
-
le && /* @__PURE__ */
|
|
2343
|
+
le && /* @__PURE__ */ g("div", { className: S.playbackControls, children: Ut ? (
|
|
2344
2344
|
// Loading spinner
|
|
2345
|
-
/* @__PURE__ */
|
|
2345
|
+
/* @__PURE__ */ g("button", { disabled: !0, className: S.loadingButton, children: /* @__PURE__ */ F(
|
|
2346
2346
|
"svg",
|
|
2347
2347
|
{
|
|
2348
2348
|
className: S.spinner,
|
|
@@ -2350,7 +2350,7 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2350
2350
|
fill: "none",
|
|
2351
2351
|
viewBox: "0 0 24 24",
|
|
2352
2352
|
children: [
|
|
2353
|
-
/* @__PURE__ */
|
|
2353
|
+
/* @__PURE__ */ g(
|
|
2354
2354
|
"circle",
|
|
2355
2355
|
{
|
|
2356
2356
|
className: "opacity-25",
|
|
@@ -2361,7 +2361,7 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2361
2361
|
strokeWidth: "4"
|
|
2362
2362
|
}
|
|
2363
2363
|
),
|
|
2364
|
-
/* @__PURE__ */
|
|
2364
|
+
/* @__PURE__ */ g(
|
|
2365
2365
|
"path",
|
|
2366
2366
|
{
|
|
2367
2367
|
className: "opacity-75",
|
|
@@ -2374,13 +2374,13 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2374
2374
|
) })
|
|
2375
2375
|
) : !W && !He ? (
|
|
2376
2376
|
// Play (desde cero)
|
|
2377
|
-
/* @__PURE__ */
|
|
2377
|
+
/* @__PURE__ */ g(
|
|
2378
2378
|
"button",
|
|
2379
2379
|
{
|
|
2380
2380
|
onClick: Ve,
|
|
2381
|
-
disabled: o.length === 0 ||
|
|
2381
|
+
disabled: o.length === 0 || x,
|
|
2382
2382
|
className: S.playButton,
|
|
2383
|
-
children: /* @__PURE__ */
|
|
2383
|
+
children: /* @__PURE__ */ g(
|
|
2384
2384
|
"svg",
|
|
2385
2385
|
{
|
|
2386
2386
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2392,14 +2392,14 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2392
2392
|
strokeWidth: "2",
|
|
2393
2393
|
strokeLinecap: "round",
|
|
2394
2394
|
strokeLinejoin: "round",
|
|
2395
|
-
children: /* @__PURE__ */
|
|
2395
|
+
children: /* @__PURE__ */ g("path", { d: "M9 8.5 L9 15.5 L16 12 Z" })
|
|
2396
2396
|
}
|
|
2397
2397
|
)
|
|
2398
2398
|
}
|
|
2399
2399
|
)
|
|
2400
2400
|
) : He ? (
|
|
2401
2401
|
// Resume
|
|
2402
|
-
/* @__PURE__ */
|
|
2402
|
+
/* @__PURE__ */ g("button", { onClick: qt, className: S.playButton, children: /* @__PURE__ */ g(
|
|
2403
2403
|
"svg",
|
|
2404
2404
|
{
|
|
2405
2405
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2411,12 +2411,12 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2411
2411
|
strokeWidth: "2",
|
|
2412
2412
|
strokeLinecap: "round",
|
|
2413
2413
|
strokeLinejoin: "round",
|
|
2414
|
-
children: /* @__PURE__ */
|
|
2414
|
+
children: /* @__PURE__ */ g("path", { d: "M9 8.5 L9 15.5 L16 12 Z" })
|
|
2415
2415
|
}
|
|
2416
2416
|
) })
|
|
2417
2417
|
) : (
|
|
2418
2418
|
// Pause
|
|
2419
|
-
/* @__PURE__ */
|
|
2419
|
+
/* @__PURE__ */ g("button", { onClick: Mt, className: S.pauseButton, children: /* @__PURE__ */ F(
|
|
2420
2420
|
"svg",
|
|
2421
2421
|
{
|
|
2422
2422
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2429,13 +2429,13 @@ const Nr = "_selectorWrapper_1kmif_1", Br = "_iconButton_1kmif_6", Pr = "_dropdo
|
|
|
2429
2429
|
strokeLinecap: "round",
|
|
2430
2430
|
strokeLinejoin: "round",
|
|
2431
2431
|
children: [
|
|
2432
|
-
/* @__PURE__ */
|
|
2433
|
-
/* @__PURE__ */
|
|
2432
|
+
/* @__PURE__ */ g("line", { x1: "10", y1: "8", x2: "10", y2: "16" }),
|
|
2433
|
+
/* @__PURE__ */ g("line", { x1: "14", y1: "8", x2: "14", y2: "16" })
|
|
2434
2434
|
]
|
|
2435
2435
|
}
|
|
2436
2436
|
) })
|
|
2437
2437
|
) }),
|
|
2438
|
-
/* @__PURE__ */
|
|
2438
|
+
/* @__PURE__ */ g("div", { className: S.progressBar, children: /* @__PURE__ */ g(
|
|
2439
2439
|
"div",
|
|
2440
2440
|
{
|
|
2441
2441
|
className: S.progressFill,
|
|
@@ -2450,6 +2450,6 @@ export {
|
|
|
2450
2450
|
oe as LanguageSelectorStyles,
|
|
2451
2451
|
Fs as StoryVisualizer,
|
|
2452
2452
|
S as StoryVisualizerStyles,
|
|
2453
|
-
|
|
2453
|
+
gs as voices
|
|
2454
2454
|
};
|
|
2455
2455
|
//# sourceMappingURL=ocity-heritage-visualizer.es.js.map
|