@opencx/widget 3.0.47 → 3.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/designs.cjs +1 -1
- package/dist/designs.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/src/headless/core/__tests__/test-utils.d.ts +3 -0
- package/dist/src/headless/core/api/api-caller.d.ts +3 -0
- package/dist/src/headless/core/api/schema.d.ts +3 -0
- package/dist/src/headless/core/types/widget-config.d.ts +5 -0
- package/dist/{useUploadFiles-BKFw7p7U.js → useUploadFiles-Dp5D34Dp.js} +226 -229
- package/dist/useUploadFiles-Dp5D34Dp.js.map +1 -0
- package/dist/{useUploadFiles-CeJKjJNJ.cjs → useUploadFiles-DqC2xlX8.cjs} +4 -4
- package/dist/useUploadFiles-DqC2xlX8.cjs.map +1 -0
- package/dist/widget.ctx-DYom-6yC.cjs +5 -0
- package/dist/widget.ctx-DYom-6yC.cjs.map +1 -0
- package/dist/widget.ctx-QcHsFXpb.js +605 -0
- package/dist/widget.ctx-QcHsFXpb.js.map +1 -0
- package/dist-embed/script.js +106 -106
- package/dist-embed/script.js.map +1 -1
- package/package.json +1 -1
- package/dist/useUploadFiles-BKFw7p7U.js.map +0 -1
- package/dist/useUploadFiles-CeJKjJNJ.cjs.map +0 -1
- package/dist/widget.ctx-BNJO1LYq.cjs +0 -5
- package/dist/widget.ctx-BNJO1LYq.cjs.map +0 -1
- package/dist/widget.ctx-CUZ6Haa_.js +0 -704
- package/dist/widget.ctx-CUZ6Haa_.js.map +0 -1
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import { W as Zt } from "./widget.ctx-CUZ6Haa_.js";
|
|
7
|
-
import { v4 as en } from "uuid";
|
|
8
|
-
class tn {
|
|
1
|
+
import z, { createContext as rt, useContext as ot, useRef as H, useState as st, useMemo as Ve, useEffect as Me, useSyncExternalStore as Kt, useLayoutEffect as zt, useCallback as Ee, useDebugValue as Yt } from "react";
|
|
2
|
+
import { jsx as kt } from "react/jsx-runtime";
|
|
3
|
+
import { W as Jt } from "./widget.ctx-QcHsFXpb.js";
|
|
4
|
+
import { v4 as Xt } from "uuid";
|
|
5
|
+
class Qt {
|
|
9
6
|
constructor(t) {
|
|
10
|
-
|
|
7
|
+
this.components = [];
|
|
11
8
|
const { components: n } = t;
|
|
12
9
|
if (n && n.forEach((r) => this.register(r)), this.components.length === 0)
|
|
13
10
|
throw new Error("No components registered");
|
|
@@ -30,62 +27,62 @@ class tn {
|
|
|
30
27
|
return (n = this.get(t)) == null ? void 0 : n.component;
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
|
-
function
|
|
34
|
-
const t =
|
|
30
|
+
function Zt(e) {
|
|
31
|
+
const t = rt({});
|
|
35
32
|
return [() => {
|
|
36
|
-
const r =
|
|
33
|
+
const r = ot(t);
|
|
37
34
|
if (r === void 0)
|
|
38
35
|
throw new Error("useSafeContext must be used within a Provider");
|
|
39
36
|
return r;
|
|
40
37
|
}, t.Provider];
|
|
41
38
|
}
|
|
42
|
-
const
|
|
43
|
-
function
|
|
39
|
+
const en = "3.0.49", [Y, tn] = Zt();
|
|
40
|
+
function Xn({
|
|
44
41
|
options: e,
|
|
45
42
|
children: t,
|
|
46
43
|
components: n,
|
|
47
44
|
storage: r
|
|
48
45
|
}) {
|
|
49
|
-
const o = H(!1), [s, i] =
|
|
50
|
-
() => new
|
|
46
|
+
const o = H(!1), [s, i] = st(null), d = Ve(
|
|
47
|
+
() => new Qt({
|
|
51
48
|
components: n
|
|
52
49
|
}),
|
|
53
50
|
[n]
|
|
54
51
|
);
|
|
55
52
|
return Me(() => {
|
|
56
|
-
o.current || (o.current = !0,
|
|
57
|
-
}, []), s ? /* @__PURE__ */
|
|
58
|
-
|
|
53
|
+
o.current || (o.current = !0, Jt.initialize({ config: e, storage: r }).then(i));
|
|
54
|
+
}, []), s ? /* @__PURE__ */ kt(
|
|
55
|
+
tn,
|
|
59
56
|
{
|
|
60
57
|
value: {
|
|
61
58
|
widgetCtx: s,
|
|
62
59
|
components: n,
|
|
63
60
|
componentStore: d,
|
|
64
|
-
version:
|
|
61
|
+
version: en
|
|
65
62
|
},
|
|
66
63
|
children: t
|
|
67
64
|
}
|
|
68
65
|
) : null;
|
|
69
66
|
}
|
|
70
|
-
function
|
|
67
|
+
function Qn() {
|
|
71
68
|
const { widgetCtx: e } = Y();
|
|
72
69
|
return e.config;
|
|
73
70
|
}
|
|
74
71
|
function oe(e) {
|
|
75
|
-
return
|
|
72
|
+
return Kt(e.subscribe, e.get, e.get);
|
|
76
73
|
}
|
|
77
|
-
function
|
|
74
|
+
function Zn() {
|
|
78
75
|
const { widgetCtx: e } = Y();
|
|
79
76
|
return {
|
|
80
77
|
contactState: oe(e.contactCtx.state),
|
|
81
78
|
createUnverifiedContact: e.contactCtx.createUnverifiedContact
|
|
82
79
|
};
|
|
83
80
|
}
|
|
84
|
-
function
|
|
81
|
+
function nn() {
|
|
85
82
|
const { widgetCtx: e } = Y();
|
|
86
83
|
return { messagesState: oe(e.messageCtx.state), sendMessage: e.messageCtx.sendMessage };
|
|
87
84
|
}
|
|
88
|
-
function
|
|
85
|
+
function rn() {
|
|
89
86
|
const { widgetCtx: e } = Y(), t = oe(e.sessionCtx.sessionState), n = oe(e.sessionCtx.sessionsState);
|
|
90
87
|
return {
|
|
91
88
|
sessionState: t,
|
|
@@ -93,16 +90,16 @@ function an() {
|
|
|
93
90
|
loadMoreSessions: e.sessionCtx.loadMoreSessions
|
|
94
91
|
};
|
|
95
92
|
}
|
|
96
|
-
function
|
|
97
|
-
var
|
|
98
|
-
const { sessionState: e } =
|
|
99
|
-
return { isAwaitingBotReply: (n || e.isCreatingSession) && (t.isSendingMessage ||
|
|
93
|
+
function er() {
|
|
94
|
+
var i;
|
|
95
|
+
const { sessionState: e } = rn(), { messagesState: t } = nn(), n = ((i = e.session) == null ? void 0 : i.assignee.kind) === "ai", r = t.messages.length > 0 ? t.messages[t.messages.length - 1] : null, o = (r == null ? void 0 : r.type) === "FROM_USER";
|
|
96
|
+
return { isAwaitingBotReply: (n || e.isCreatingSession) && (t.isSendingMessage || o) };
|
|
100
97
|
}
|
|
101
|
-
var
|
|
102
|
-
function
|
|
98
|
+
var tr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
99
|
+
function nr(e) {
|
|
103
100
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
104
101
|
}
|
|
105
|
-
function
|
|
102
|
+
function on(e) {
|
|
106
103
|
if (e.__esModule) return e;
|
|
107
104
|
var t = e.default;
|
|
108
105
|
if (typeof t == "function") {
|
|
@@ -131,10 +128,10 @@ var Te = { exports: {} }, ve = {};
|
|
|
131
128
|
* This source code is licensed under the MIT license found in the
|
|
132
129
|
* LICENSE file in the root directory of this source tree.
|
|
133
130
|
*/
|
|
134
|
-
var
|
|
135
|
-
function
|
|
136
|
-
if (
|
|
137
|
-
|
|
131
|
+
var Je;
|
|
132
|
+
function sn() {
|
|
133
|
+
if (Je) return ve;
|
|
134
|
+
Je = 1;
|
|
138
135
|
var e = z;
|
|
139
136
|
function t(u, l) {
|
|
140
137
|
return u === l && (u !== 0 || 1 / u === 1 / l) || u !== u && l !== l;
|
|
@@ -176,9 +173,9 @@ var Se = {};
|
|
|
176
173
|
* This source code is licensed under the MIT license found in the
|
|
177
174
|
* LICENSE file in the root directory of this source tree.
|
|
178
175
|
*/
|
|
179
|
-
var
|
|
180
|
-
function
|
|
181
|
-
return
|
|
176
|
+
var Xe;
|
|
177
|
+
function an() {
|
|
178
|
+
return Xe || (Xe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
182
179
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
183
180
|
var e = z, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
184
181
|
function n(O) {
|
|
@@ -247,8 +244,8 @@ function fn() {
|
|
|
247
244
|
Se.useSyncExternalStore = k, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
248
245
|
}()), Se;
|
|
249
246
|
}
|
|
250
|
-
process.env.NODE_ENV === "production" ? Te.exports =
|
|
251
|
-
var
|
|
247
|
+
process.env.NODE_ENV === "production" ? Te.exports = sn() : Te.exports = an();
|
|
248
|
+
var un = Te.exports;
|
|
252
249
|
const G = () => {
|
|
253
250
|
}, P = (
|
|
254
251
|
/*#__NOINLINE__*/
|
|
@@ -256,14 +253,14 @@ const G = () => {
|
|
|
256
253
|
), we = Object, g = (e) => e === P, F = (e) => typeof e == "function", $ = (e, t) => ({
|
|
257
254
|
...e,
|
|
258
255
|
...t
|
|
259
|
-
}),
|
|
260
|
-
let
|
|
256
|
+
}), cn = (e) => F(e.then), ce = /* @__PURE__ */ new WeakMap();
|
|
257
|
+
let fn = 0;
|
|
261
258
|
const se = (e) => {
|
|
262
259
|
const t = typeof e, n = e && e.constructor, r = n == Date;
|
|
263
260
|
let o, s;
|
|
264
261
|
if (we(e) === e && !r && n != RegExp) {
|
|
265
262
|
if (o = ce.get(e), o) return o;
|
|
266
|
-
if (o = ++
|
|
263
|
+
if (o = ++fn + "~", ce.set(e, o), n == Array) {
|
|
267
264
|
for (o = "@", s = 0; s < e.length; s++)
|
|
268
265
|
o += se(e[s]) + ",";
|
|
269
266
|
ce.set(e, o);
|
|
@@ -278,7 +275,7 @@ const se = (e) => {
|
|
|
278
275
|
} else
|
|
279
276
|
o = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
|
|
280
277
|
return o;
|
|
281
|
-
}, W = /* @__PURE__ */ new WeakMap(), me = {}, fe = {}, Fe = "undefined", he = typeof window != Fe, De = typeof document != Fe,
|
|
278
|
+
}, W = /* @__PURE__ */ new WeakMap(), me = {}, fe = {}, Fe = "undefined", he = typeof window != Fe, De = typeof document != Fe, ln = () => he && typeof window.requestAnimationFrame != Fe, it = (e, t) => {
|
|
282
279
|
const n = W.get(e);
|
|
283
280
|
return [
|
|
284
281
|
// Getter
|
|
@@ -297,18 +294,18 @@ const se = (e) => {
|
|
|
297
294
|
];
|
|
298
295
|
};
|
|
299
296
|
let Ae = !0;
|
|
300
|
-
const
|
|
297
|
+
const dn = () => Ae, [xe, je] = he && window.addEventListener ? [
|
|
301
298
|
window.addEventListener.bind(window),
|
|
302
299
|
window.removeEventListener.bind(window)
|
|
303
300
|
] : [
|
|
304
301
|
G,
|
|
305
302
|
G
|
|
306
|
-
],
|
|
303
|
+
], pn = () => {
|
|
307
304
|
const e = De && document.visibilityState;
|
|
308
305
|
return g(e) || e !== "hidden";
|
|
309
|
-
},
|
|
306
|
+
}, hn = (e) => (De && document.addEventListener("visibilitychange", e), xe("focus", e), () => {
|
|
310
307
|
De && document.removeEventListener("visibilitychange", e), je("focus", e);
|
|
311
|
-
}),
|
|
308
|
+
}), _n = (e) => {
|
|
312
309
|
const t = () => {
|
|
313
310
|
Ae = !0, e();
|
|
314
311
|
}, n = () => {
|
|
@@ -317,13 +314,13 @@ const _n = () => Ae, [xe, je] = he && window.addEventListener ? [
|
|
|
317
314
|
return xe("online", t), xe("offline", n), () => {
|
|
318
315
|
je("online", t), je("offline", n);
|
|
319
316
|
};
|
|
320
|
-
},
|
|
321
|
-
isOnline:
|
|
322
|
-
isVisible:
|
|
323
|
-
},
|
|
324
|
-
initFocus:
|
|
325
|
-
initReconnect:
|
|
326
|
-
},
|
|
317
|
+
}, yn = {
|
|
318
|
+
isOnline: dn,
|
|
319
|
+
isVisible: pn
|
|
320
|
+
}, gn = {
|
|
321
|
+
initFocus: hn,
|
|
322
|
+
initReconnect: _n
|
|
323
|
+
}, Qe = !z.useId, ie = !he || "Deno" in window, En = (e) => ln() ? window.requestAnimationFrame(e) : setTimeout(e, 1), be = ie ? Me : zt, Oe = typeof navigator < "u" && navigator.connection, Ze = !ie && Oe && ([
|
|
327
324
|
"slow-2g",
|
|
328
325
|
"2g"
|
|
329
326
|
].includes(Oe.effectiveType) || Oe.saveData), Ne = (e) => {
|
|
@@ -339,16 +336,16 @@ const _n = () => Ae, [xe, je] = he && window.addEventListener ? [
|
|
|
339
336
|
t
|
|
340
337
|
];
|
|
341
338
|
};
|
|
342
|
-
let
|
|
343
|
-
const Pe = () => ++
|
|
339
|
+
let vn = 0;
|
|
340
|
+
const Pe = () => ++vn, at = 0, ut = 1, ct = 2, Sn = 3;
|
|
344
341
|
var re = {
|
|
345
342
|
__proto__: null,
|
|
346
|
-
ERROR_REVALIDATE_EVENT:
|
|
347
|
-
FOCUS_EVENT:
|
|
348
|
-
MUTATE_EVENT:
|
|
349
|
-
RECONNECT_EVENT:
|
|
343
|
+
ERROR_REVALIDATE_EVENT: Sn,
|
|
344
|
+
FOCUS_EVENT: at,
|
|
345
|
+
MUTATE_EVENT: ct,
|
|
346
|
+
RECONNECT_EVENT: ut
|
|
350
347
|
};
|
|
351
|
-
async function
|
|
348
|
+
async function ft(...e) {
|
|
352
349
|
const [t, n, r, o] = e, s = $({
|
|
353
350
|
populateCache: !0,
|
|
354
351
|
throwOnError: !0
|
|
@@ -370,9 +367,9 @@ async function lt(...e) {
|
|
|
370
367
|
async function u(l) {
|
|
371
368
|
const [c] = Ne(l);
|
|
372
369
|
if (!c) return;
|
|
373
|
-
const [y, _] =
|
|
370
|
+
const [y, _] = it(t, c), [C, p, k, O] = W.get(t), E = () => {
|
|
374
371
|
const V = C[c];
|
|
375
|
-
return (F(s.revalidate) ? s.revalidate(y().data, l) : s.revalidate !== !1) && (delete k[c], delete O[c], V && V[0]) ? V[0](
|
|
372
|
+
return (F(s.revalidate) ? s.revalidate(y().data, l) : s.revalidate !== !1) && (delete k[c], delete O[c], V && V[0]) ? V[0](ct).then(() => y().data) : y().data;
|
|
376
373
|
};
|
|
377
374
|
if (e.length < 3)
|
|
378
375
|
return E();
|
|
@@ -392,7 +389,7 @@ async function lt(...e) {
|
|
|
392
389
|
} catch (V) {
|
|
393
390
|
v = V;
|
|
394
391
|
}
|
|
395
|
-
if (S &&
|
|
392
|
+
if (S && cn(S))
|
|
396
393
|
if (S = await S.catch((V) => {
|
|
397
394
|
v = V;
|
|
398
395
|
}), L !== p[c][0]) {
|
|
@@ -427,12 +424,12 @@ async function lt(...e) {
|
|
|
427
424
|
return S;
|
|
428
425
|
}
|
|
429
426
|
}
|
|
430
|
-
const
|
|
427
|
+
const et = (e, t) => {
|
|
431
428
|
for (const n in e)
|
|
432
429
|
e[n][0] && e[n][0](t);
|
|
433
|
-
},
|
|
430
|
+
}, wn = (e, t) => {
|
|
434
431
|
if (!W.has(e)) {
|
|
435
|
-
const n = $(
|
|
432
|
+
const n = $(gn, t), r = {}, o = ft.bind(P, e);
|
|
436
433
|
let s = G;
|
|
437
434
|
const i = {}, d = (a, u) => {
|
|
438
435
|
const l = i[a] || [];
|
|
@@ -453,7 +450,7 @@ const tt = (e, t) => {
|
|
|
453
450
|
h,
|
|
454
451
|
d
|
|
455
452
|
]), !ie)) {
|
|
456
|
-
const a = n.initFocus(setTimeout.bind(P,
|
|
453
|
+
const a = n.initFocus(setTimeout.bind(P, et.bind(P, r, at))), u = n.initReconnect(setTimeout.bind(P, et.bind(P, r, ut)));
|
|
457
454
|
s = () => {
|
|
458
455
|
a && a(), u && u(), W.delete(e);
|
|
459
456
|
};
|
|
@@ -470,16 +467,16 @@ const tt = (e, t) => {
|
|
|
470
467
|
e,
|
|
471
468
|
W.get(e)[4]
|
|
472
469
|
];
|
|
473
|
-
},
|
|
470
|
+
}, mn = (e, t, n, r, o) => {
|
|
474
471
|
const s = n.errorRetryCount, i = o.retryCount, d = ~~((Math.random() + 0.5) * (1 << (i < 8 ? i : 8))) * n.errorRetryInterval;
|
|
475
472
|
!g(s) && i > s || setTimeout(r, d, o);
|
|
476
|
-
},
|
|
473
|
+
}, bn = (e, t) => se(e) == se(t), [lt, On] = wn(/* @__PURE__ */ new Map()), Rn = $(
|
|
477
474
|
{
|
|
478
475
|
// events
|
|
479
476
|
onLoadingSlow: G,
|
|
480
477
|
onSuccess: G,
|
|
481
478
|
onError: G,
|
|
482
|
-
onErrorRetry:
|
|
479
|
+
onErrorRetry: mn,
|
|
483
480
|
onDiscarded: G,
|
|
484
481
|
// switches
|
|
485
482
|
revalidateOnFocus: !0,
|
|
@@ -487,29 +484,29 @@ const tt = (e, t) => {
|
|
|
487
484
|
revalidateIfStale: !0,
|
|
488
485
|
shouldRetryOnError: !0,
|
|
489
486
|
// timeouts
|
|
490
|
-
errorRetryInterval:
|
|
487
|
+
errorRetryInterval: Ze ? 1e4 : 5e3,
|
|
491
488
|
focusThrottleInterval: 5 * 1e3,
|
|
492
489
|
dedupingInterval: 2 * 1e3,
|
|
493
|
-
loadingTimeout:
|
|
490
|
+
loadingTimeout: Ze ? 5e3 : 3e3,
|
|
494
491
|
// providers
|
|
495
|
-
compare:
|
|
492
|
+
compare: bn,
|
|
496
493
|
isPaused: () => !1,
|
|
497
|
-
cache:
|
|
498
|
-
mutate:
|
|
494
|
+
cache: lt,
|
|
495
|
+
mutate: On,
|
|
499
496
|
fallback: {}
|
|
500
497
|
},
|
|
501
498
|
// use web preset by default
|
|
502
|
-
|
|
503
|
-
),
|
|
499
|
+
yn
|
|
500
|
+
), Cn = (e, t) => {
|
|
504
501
|
const n = $(e, t);
|
|
505
502
|
if (t) {
|
|
506
503
|
const { use: r, fallback: o } = e, { use: s, fallback: i } = t;
|
|
507
504
|
r && s && (n.use = r.concat(s)), o && i && (n.fallback = $(o, i));
|
|
508
505
|
}
|
|
509
506
|
return n;
|
|
510
|
-
},
|
|
511
|
-
|
|
512
|
-
},
|
|
507
|
+
}, Tn = rt({}), Dn = "$inf$", dt = he && window.__SWR_DEVTOOLS_USE__, An = dt ? window.__SWR_DEVTOOLS_USE__ : [], xn = () => {
|
|
508
|
+
dt && (window.__SWR_DEVTOOLS_REACT__ = z);
|
|
509
|
+
}, jn = (e) => F(e[1]) ? [
|
|
513
510
|
e[0],
|
|
514
511
|
e[1],
|
|
515
512
|
e[2] || {}
|
|
@@ -517,28 +514,28 @@ const tt = (e, t) => {
|
|
|
517
514
|
e[0],
|
|
518
515
|
null,
|
|
519
516
|
(e[1] === null ? e[2] : e[1]) || {}
|
|
520
|
-
],
|
|
521
|
-
const [i] = Ne(t), [, , , d] = W.get(
|
|
522
|
-
if (i.startsWith(
|
|
517
|
+
], Pn = () => $(Rn, ot(Tn)), Ln = (e) => (t, n, r) => e(t, n && ((...s) => {
|
|
518
|
+
const [i] = Ne(t), [, , , d] = W.get(lt);
|
|
519
|
+
if (i.startsWith(Dn))
|
|
523
520
|
return n(...s);
|
|
524
521
|
const h = d[i];
|
|
525
522
|
return g(h) ? n(...s) : (delete d[i], h);
|
|
526
|
-
}), r),
|
|
527
|
-
const r =
|
|
523
|
+
}), r), In = An.concat(Ln), Vn = (e) => function(...n) {
|
|
524
|
+
const r = Pn(), [o, s, i] = jn(n), d = Cn(r, i);
|
|
528
525
|
let h = e;
|
|
529
|
-
const { use: f } = d, a = (f || []).concat(
|
|
526
|
+
const { use: f } = d, a = (f || []).concat(In);
|
|
530
527
|
for (let u = a.length; u--; )
|
|
531
528
|
h = a[u](h);
|
|
532
529
|
return h(o, s || d.fetcher || null, d);
|
|
533
|
-
},
|
|
530
|
+
}, Mn = (e, t, n) => {
|
|
534
531
|
const r = t[e] || (t[e] = []);
|
|
535
532
|
return r.push(n), () => {
|
|
536
533
|
const o = r.indexOf(n);
|
|
537
534
|
o >= 0 && (r[o] = r[r.length - 1], r.pop());
|
|
538
535
|
};
|
|
539
536
|
};
|
|
540
|
-
|
|
541
|
-
const
|
|
537
|
+
xn();
|
|
538
|
+
const tt = z.use || ((e) => {
|
|
542
539
|
if (e.status === "pending")
|
|
543
540
|
throw e;
|
|
544
541
|
if (e.status === "fulfilled")
|
|
@@ -550,8 +547,8 @@ const nt = z.use || ((e) => {
|
|
|
550
547
|
}), e);
|
|
551
548
|
}), Re = {
|
|
552
549
|
dedupe: !0
|
|
553
|
-
},
|
|
554
|
-
const { cache: r, compare: o, suspense: s, fallbackData: i, revalidateOnMount: d, revalidateIfStale: h, refreshInterval: f, refreshWhenHidden: a, refreshWhenOffline: u, keepPreviousData: l } = n, [c, y, _, C] = W.get(r), [p, k] = Ne(e), O = H(!1), E = H(!1), S = H(p), v = H(t), L = H(n), w = () => L.current, T = () => w().isVisible() && w().isOnline(), [j, q, K, V] =
|
|
550
|
+
}, Fn = (e, t, n) => {
|
|
551
|
+
const { cache: r, compare: o, suspense: s, fallbackData: i, revalidateOnMount: d, revalidateIfStale: h, refreshInterval: f, refreshWhenHidden: a, refreshWhenOffline: u, keepPreviousData: l } = n, [c, y, _, C] = W.get(r), [p, k] = Ne(e), O = H(!1), E = H(!1), S = H(p), v = H(t), L = H(n), w = () => L.current, T = () => w().isVisible() && w().isOnline(), [j, q, K, V] = it(r, p), J = H({}).current, qt = g(i) ? n.fallback[p] : i, We = (m, b) => {
|
|
555
552
|
for (const A in J) {
|
|
556
553
|
const R = A;
|
|
557
554
|
if (R === "data") {
|
|
@@ -581,7 +578,7 @@ const nt = z.use || ((e) => {
|
|
|
581
578
|
}, [
|
|
582
579
|
r,
|
|
583
580
|
p
|
|
584
|
-
]), X =
|
|
581
|
+
]), X = un.useSyncExternalStore(Ee(
|
|
585
582
|
(m) => K(p, (b, A) => {
|
|
586
583
|
We(A, b) || m();
|
|
587
584
|
}),
|
|
@@ -590,13 +587,13 @@ const nt = z.use || ((e) => {
|
|
|
590
587
|
r,
|
|
591
588
|
p
|
|
592
589
|
]
|
|
593
|
-
), qe[0], qe[1]), Be = !O.current,
|
|
590
|
+
), qe[0], qe[1]), Be = !O.current, Bt = c[p] && c[p].length > 0, Q = X.data, Z = g(Q) ? qt : Q, ae = X.error, He = H(Z), ue = l ? g(Q) ? He.current : Q : Z, Ge = Bt && !g(ae) ? !1 : Be && !g(d) ? d : w().isPaused() ? !1 : s ? g(Z) ? !1 : h : g(Z) || h, $e = !!(p && t && Be && Ge), Ht = g(X.isValidating) ? $e : X.isValidating, Gt = g(X.isLoading) ? $e : X.isLoading, ne = Ee(
|
|
594
591
|
async (m) => {
|
|
595
592
|
const b = v.current;
|
|
596
593
|
if (!p || !b || E.current || w().isPaused())
|
|
597
594
|
return !1;
|
|
598
595
|
let A, R, M = !0;
|
|
599
|
-
const ee = m || {}, D = !_[p] || !ee.dedupe, x = () =>
|
|
596
|
+
const ee = m || {}, D = !_[p] || !ee.dedupe, x = () => Qe ? !E.current && p === S.current && O.current : p === S.current, N = {
|
|
600
597
|
isValidating: !1,
|
|
601
598
|
isLoading: !1
|
|
602
599
|
}, ze = () => {
|
|
@@ -628,9 +625,9 @@ const nt = z.use || ((e) => {
|
|
|
628
625
|
} catch (I) {
|
|
629
626
|
Ye();
|
|
630
627
|
const U = w(), { shouldRetryOnError: ye } = U;
|
|
631
|
-
U.isPaused() || (N.error = I, D && x() && (U.onError(I, p, U), (ye === !0 || F(ye) && ye(I)) && (!w().revalidateOnFocus || !w().revalidateOnReconnect || T()) && U.onErrorRetry(I, p, U, (
|
|
628
|
+
U.isPaused() || (N.error = I, D && x() && (U.onError(I, p, U), (ye === !0 || F(ye) && ye(I)) && (!w().revalidateOnFocus || !w().revalidateOnReconnect || T()) && U.onErrorRetry(I, p, U, ($t) => {
|
|
632
629
|
const ge = c[p];
|
|
633
|
-
ge && ge[0] && ge[0](re.ERROR_REVALIDATE_EVENT,
|
|
630
|
+
ge && ge[0] && ge[0](re.ERROR_REVALIDATE_EVENT, $t);
|
|
634
631
|
}, {
|
|
635
632
|
retryCount: (ee.retryCount || 0) + 1,
|
|
636
633
|
dedupe: !0
|
|
@@ -655,7 +652,7 @@ const nt = z.use || ((e) => {
|
|
|
655
652
|
]
|
|
656
653
|
), Ke = Ee(
|
|
657
654
|
// Use callback to make sure `keyRef.current` returns latest result every time
|
|
658
|
-
(...m) =>
|
|
655
|
+
(...m) => ft(r, S.current, ...m),
|
|
659
656
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
660
657
|
[]
|
|
661
658
|
);
|
|
@@ -665,7 +662,7 @@ const nt = z.use || ((e) => {
|
|
|
665
662
|
if (!p) return;
|
|
666
663
|
const m = ne.bind(P, Re);
|
|
667
664
|
let b = 0;
|
|
668
|
-
const R =
|
|
665
|
+
const R = Mn(p, c, (M, ee = {}) => {
|
|
669
666
|
if (M == re.FOCUS_EVENT) {
|
|
670
667
|
const D = Date.now();
|
|
671
668
|
w().revalidateOnFocus && D > b && T() && (b = D + w().focusThrottleInterval, m());
|
|
@@ -680,7 +677,7 @@ const nt = z.use || ((e) => {
|
|
|
680
677
|
});
|
|
681
678
|
return E.current = !1, S.current = p, O.current = !0, q({
|
|
682
679
|
_k: k
|
|
683
|
-
}), Ge && (g(Z) || ie ? m() :
|
|
680
|
+
}), Ge && (g(Z) || ie ? m() : En(m)), () => {
|
|
684
681
|
E.current = !0, R();
|
|
685
682
|
};
|
|
686
683
|
}, [
|
|
@@ -702,18 +699,18 @@ const nt = z.use || ((e) => {
|
|
|
702
699
|
a,
|
|
703
700
|
u,
|
|
704
701
|
p
|
|
705
|
-
]),
|
|
706
|
-
if (!
|
|
702
|
+
]), Yt(ue), s && g(Z) && p) {
|
|
703
|
+
if (!Qe && ie)
|
|
707
704
|
throw new Error("Fallback data is required when using suspense in SSR.");
|
|
708
705
|
v.current = t, L.current = n, E.current = !1;
|
|
709
706
|
const m = C[p];
|
|
710
707
|
if (!g(m)) {
|
|
711
708
|
const b = Ke(m);
|
|
712
|
-
|
|
709
|
+
tt(b);
|
|
713
710
|
}
|
|
714
711
|
if (g(ae)) {
|
|
715
712
|
const b = ne(Re);
|
|
716
|
-
g(ue) || (b.status = "fulfilled", b.value = !0),
|
|
713
|
+
g(ue) || (b.status = "fulfilled", b.value = !0), tt(b);
|
|
717
714
|
} else
|
|
718
715
|
throw ae;
|
|
719
716
|
}
|
|
@@ -726,20 +723,20 @@ const nt = z.use || ((e) => {
|
|
|
726
723
|
return J.error = !0, ae;
|
|
727
724
|
},
|
|
728
725
|
get isValidating() {
|
|
729
|
-
return J.isValidating = !0,
|
|
726
|
+
return J.isValidating = !0, Ht;
|
|
730
727
|
},
|
|
731
728
|
get isLoading() {
|
|
732
|
-
return J.isLoading = !0,
|
|
729
|
+
return J.isLoading = !0, Gt;
|
|
733
730
|
}
|
|
734
731
|
};
|
|
735
|
-
},
|
|
736
|
-
function
|
|
732
|
+
}, Nn = Vn(Fn);
|
|
733
|
+
function rr() {
|
|
737
734
|
const { widgetCtx: e } = Y();
|
|
738
|
-
return
|
|
735
|
+
return Nn([e.config.token], e.api.widgetPrelude, {
|
|
739
736
|
revalidateOnFocus: !1
|
|
740
737
|
});
|
|
741
738
|
}
|
|
742
|
-
function
|
|
739
|
+
function or() {
|
|
743
740
|
const { widgetCtx: e } = Y();
|
|
744
741
|
return {
|
|
745
742
|
routerState: oe(e.routerCtx.state),
|
|
@@ -747,14 +744,14 @@ function ur() {
|
|
|
747
744
|
toChatScreen: e.routerCtx.toChatScreen
|
|
748
745
|
};
|
|
749
746
|
}
|
|
750
|
-
var
|
|
747
|
+
var pt = {}, Le = function(e, t) {
|
|
751
748
|
return Le = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
752
749
|
n.__proto__ = r;
|
|
753
750
|
} || function(n, r) {
|
|
754
751
|
for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (n[o] = r[o]);
|
|
755
752
|
}, Le(e, t);
|
|
756
753
|
};
|
|
757
|
-
function
|
|
754
|
+
function ht(e, t) {
|
|
758
755
|
if (typeof t != "function" && t !== null)
|
|
759
756
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
760
757
|
Le(e, t);
|
|
@@ -772,7 +769,7 @@ var de = function() {
|
|
|
772
769
|
return t;
|
|
773
770
|
}, de.apply(this, arguments);
|
|
774
771
|
};
|
|
775
|
-
function
|
|
772
|
+
function _t(e, t) {
|
|
776
773
|
var n = {};
|
|
777
774
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
778
775
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -780,18 +777,18 @@ function yt(e, t) {
|
|
|
780
777
|
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
781
778
|
return n;
|
|
782
779
|
}
|
|
783
|
-
function
|
|
780
|
+
function yt(e, t, n, r) {
|
|
784
781
|
var o = arguments.length, s = o < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, i;
|
|
785
782
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") s = Reflect.decorate(e, t, n, r);
|
|
786
783
|
else for (var d = e.length - 1; d >= 0; d--) (i = e[d]) && (s = (o < 3 ? i(s) : o > 3 ? i(t, n, s) : i(t, n)) || s);
|
|
787
784
|
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
788
785
|
}
|
|
789
|
-
function
|
|
786
|
+
function gt(e, t) {
|
|
790
787
|
return function(n, r) {
|
|
791
788
|
t(n, r, e);
|
|
792
789
|
};
|
|
793
790
|
}
|
|
794
|
-
function
|
|
791
|
+
function Et(e, t, n, r, o, s) {
|
|
795
792
|
function i(p) {
|
|
796
793
|
if (p !== void 0 && typeof p != "function") throw new TypeError("Function expected");
|
|
797
794
|
return p;
|
|
@@ -813,21 +810,21 @@ function vt(e, t, n, r, o, s) {
|
|
|
813
810
|
}
|
|
814
811
|
f && Object.defineProperty(f, r.name, a), l = !0;
|
|
815
812
|
}
|
|
816
|
-
function
|
|
813
|
+
function vt(e, t, n) {
|
|
817
814
|
for (var r = arguments.length > 2, o = 0; o < t.length; o++)
|
|
818
815
|
n = r ? t[o].call(e, n) : t[o].call(e);
|
|
819
816
|
return r ? n : void 0;
|
|
820
817
|
}
|
|
821
|
-
function
|
|
818
|
+
function St(e) {
|
|
822
819
|
return typeof e == "symbol" ? e : "".concat(e);
|
|
823
820
|
}
|
|
824
|
-
function
|
|
821
|
+
function wt(e, t, n) {
|
|
825
822
|
return typeof t == "symbol" && (t = t.description ? "[".concat(t.description, "]") : ""), Object.defineProperty(e, "name", { configurable: !0, value: n ? "".concat(n, " ", t) : t });
|
|
826
823
|
}
|
|
827
|
-
function
|
|
824
|
+
function mt(e, t) {
|
|
828
825
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
|
|
829
826
|
}
|
|
830
|
-
function
|
|
827
|
+
function bt(e, t, n, r) {
|
|
831
828
|
function o(s) {
|
|
832
829
|
return s instanceof n ? s : new n(function(i) {
|
|
833
830
|
i(s);
|
|
@@ -854,7 +851,7 @@ function Ot(e, t, n, r) {
|
|
|
854
851
|
f((r = r.apply(e, t || [])).next());
|
|
855
852
|
});
|
|
856
853
|
}
|
|
857
|
-
function
|
|
854
|
+
function Ot(e, t) {
|
|
858
855
|
var n = { label: 0, sent: function() {
|
|
859
856
|
if (s[0] & 1) throw s[1];
|
|
860
857
|
return s[1];
|
|
@@ -923,7 +920,7 @@ var _e = Object.create ? function(e, t, n, r) {
|
|
|
923
920
|
} : function(e, t, n, r) {
|
|
924
921
|
r === void 0 && (r = n), e[r] = t[n];
|
|
925
922
|
};
|
|
926
|
-
function
|
|
923
|
+
function Rt(e, t) {
|
|
927
924
|
for (var n in e) n !== "default" && !Object.prototype.hasOwnProperty.call(t, n) && _e(t, e, n);
|
|
928
925
|
}
|
|
929
926
|
function pe(e) {
|
|
@@ -953,19 +950,19 @@ function Ue(e, t) {
|
|
|
953
950
|
}
|
|
954
951
|
return s;
|
|
955
952
|
}
|
|
956
|
-
function
|
|
953
|
+
function Ct() {
|
|
957
954
|
for (var e = [], t = 0; t < arguments.length; t++)
|
|
958
955
|
e = e.concat(Ue(arguments[t]));
|
|
959
956
|
return e;
|
|
960
957
|
}
|
|
961
|
-
function
|
|
958
|
+
function Tt() {
|
|
962
959
|
for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
|
|
963
960
|
for (var r = Array(e), o = 0, t = 0; t < n; t++)
|
|
964
961
|
for (var s = arguments[t], i = 0, d = s.length; i < d; i++, o++)
|
|
965
962
|
r[o] = s[i];
|
|
966
963
|
return r;
|
|
967
964
|
}
|
|
968
|
-
function
|
|
965
|
+
function Dt(e, t, n) {
|
|
969
966
|
if (n || arguments.length === 2) for (var r = 0, o = t.length, s; r < o; r++)
|
|
970
967
|
(s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
|
|
971
968
|
return e.concat(s || Array.prototype.slice.call(t));
|
|
@@ -973,7 +970,7 @@ function At(e, t, n) {
|
|
|
973
970
|
function te(e) {
|
|
974
971
|
return this instanceof te ? (this.v = e, this) : new te(e);
|
|
975
972
|
}
|
|
976
|
-
function
|
|
973
|
+
function At(e, t, n) {
|
|
977
974
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
978
975
|
var r = n.apply(e, t || []), o, s = [];
|
|
979
976
|
return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), d("next"), d("throw"), d("return", i), o[Symbol.asyncIterator] = function() {
|
|
@@ -1011,7 +1008,7 @@ function xt(e, t, n) {
|
|
|
1011
1008
|
c(y), s.shift(), s.length && h(s[0][0], s[0][1]);
|
|
1012
1009
|
}
|
|
1013
1010
|
}
|
|
1014
|
-
function
|
|
1011
|
+
function xt(e) {
|
|
1015
1012
|
var t, n;
|
|
1016
1013
|
return t = {}, r("next"), r("throw", function(o) {
|
|
1017
1014
|
throw o;
|
|
@@ -1024,7 +1021,7 @@ function jt(e) {
|
|
|
1024
1021
|
} : s;
|
|
1025
1022
|
}
|
|
1026
1023
|
}
|
|
1027
|
-
function
|
|
1024
|
+
function jt(e) {
|
|
1028
1025
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1029
1026
|
var t = e[Symbol.asyncIterator], n;
|
|
1030
1027
|
return t ? t.call(e) : (e = typeof pe == "function" ? pe(e) : e[Symbol.iterator](), n = {}, r("next"), r("throw"), r("return"), n[Symbol.asyncIterator] = function() {
|
|
@@ -1043,39 +1040,39 @@ function Pt(e) {
|
|
|
1043
1040
|
}, i);
|
|
1044
1041
|
}
|
|
1045
1042
|
}
|
|
1046
|
-
function
|
|
1043
|
+
function Pt(e, t) {
|
|
1047
1044
|
return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : e.raw = t, e;
|
|
1048
1045
|
}
|
|
1049
|
-
var
|
|
1046
|
+
var Un = Object.create ? function(e, t) {
|
|
1050
1047
|
Object.defineProperty(e, "default", { enumerable: !0, value: t });
|
|
1051
1048
|
} : function(e, t) {
|
|
1052
1049
|
e.default = t;
|
|
1053
1050
|
};
|
|
1054
|
-
function
|
|
1051
|
+
function Lt(e) {
|
|
1055
1052
|
if (e && e.__esModule) return e;
|
|
1056
1053
|
var t = {};
|
|
1057
1054
|
if (e != null) for (var n in e) n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && _e(t, e, n);
|
|
1058
|
-
return
|
|
1055
|
+
return Un(t, e), t;
|
|
1059
1056
|
}
|
|
1060
|
-
function
|
|
1057
|
+
function It(e) {
|
|
1061
1058
|
return e && e.__esModule ? e : { default: e };
|
|
1062
1059
|
}
|
|
1063
|
-
function
|
|
1060
|
+
function Vt(e, t, n, r) {
|
|
1064
1061
|
if (n === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
|
|
1065
1062
|
if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1066
1063
|
return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e);
|
|
1067
1064
|
}
|
|
1068
|
-
function
|
|
1065
|
+
function Mt(e, t, n, r, o) {
|
|
1069
1066
|
if (r === "m") throw new TypeError("Private method is not writable");
|
|
1070
1067
|
if (r === "a" && !o) throw new TypeError("Private accessor was defined without a setter");
|
|
1071
1068
|
if (typeof t == "function" ? e !== t || !o : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
1072
1069
|
return r === "a" ? o.call(e, n) : o ? o.value = n : t.set(e, n), n;
|
|
1073
1070
|
}
|
|
1074
|
-
function
|
|
1071
|
+
function Ft(e, t) {
|
|
1075
1072
|
if (t === null || typeof t != "object" && typeof t != "function") throw new TypeError("Cannot use 'in' operator on non-object");
|
|
1076
1073
|
return typeof e == "function" ? t === e : e.has(t);
|
|
1077
1074
|
}
|
|
1078
|
-
function
|
|
1075
|
+
function Nt(e, t, n) {
|
|
1079
1076
|
if (t != null) {
|
|
1080
1077
|
if (typeof t != "object" && typeof t != "function") throw new TypeError("Object expected.");
|
|
1081
1078
|
var r, o;
|
|
@@ -1098,13 +1095,13 @@ function Ut(e, t, n) {
|
|
|
1098
1095
|
} else n && e.stack.push({ async: !0 });
|
|
1099
1096
|
return t;
|
|
1100
1097
|
}
|
|
1101
|
-
var
|
|
1098
|
+
var Wn = typeof SuppressedError == "function" ? SuppressedError : function(e, t, n) {
|
|
1102
1099
|
var r = new Error(n);
|
|
1103
1100
|
return r.name = "SuppressedError", r.error = e, r.suppressed = t, r;
|
|
1104
1101
|
};
|
|
1105
|
-
function
|
|
1102
|
+
function Ut(e) {
|
|
1106
1103
|
function t(s) {
|
|
1107
|
-
e.error = e.hasError ? new
|
|
1104
|
+
e.error = e.hasError ? new Wn(s, e.error, "An error was suppressed during disposal.") : s, e.hasError = !0;
|
|
1108
1105
|
}
|
|
1109
1106
|
var n, r = 0;
|
|
1110
1107
|
function o() {
|
|
@@ -1125,86 +1122,86 @@ function Wt(e) {
|
|
|
1125
1122
|
}
|
|
1126
1123
|
return o();
|
|
1127
1124
|
}
|
|
1128
|
-
function
|
|
1125
|
+
function Wt(e, t) {
|
|
1129
1126
|
return typeof e == "string" && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(n, r, o, s, i) {
|
|
1130
1127
|
return r ? t ? ".jsx" : ".js" : o && (!s || !i) ? n : o + s + "." + i.toLowerCase() + "js";
|
|
1131
1128
|
}) : e;
|
|
1132
1129
|
}
|
|
1133
|
-
const
|
|
1134
|
-
__extends:
|
|
1130
|
+
const qn = {
|
|
1131
|
+
__extends: ht,
|
|
1135
1132
|
__assign: de,
|
|
1136
|
-
__rest:
|
|
1137
|
-
__decorate:
|
|
1138
|
-
__param:
|
|
1139
|
-
__esDecorate:
|
|
1140
|
-
__runInitializers:
|
|
1141
|
-
__propKey:
|
|
1142
|
-
__setFunctionName:
|
|
1143
|
-
__metadata:
|
|
1144
|
-
__awaiter:
|
|
1145
|
-
__generator:
|
|
1133
|
+
__rest: _t,
|
|
1134
|
+
__decorate: yt,
|
|
1135
|
+
__param: gt,
|
|
1136
|
+
__esDecorate: Et,
|
|
1137
|
+
__runInitializers: vt,
|
|
1138
|
+
__propKey: St,
|
|
1139
|
+
__setFunctionName: wt,
|
|
1140
|
+
__metadata: mt,
|
|
1141
|
+
__awaiter: bt,
|
|
1142
|
+
__generator: Ot,
|
|
1146
1143
|
__createBinding: _e,
|
|
1147
|
-
__exportStar:
|
|
1144
|
+
__exportStar: Rt,
|
|
1148
1145
|
__values: pe,
|
|
1149
1146
|
__read: Ue,
|
|
1150
|
-
__spread:
|
|
1151
|
-
__spreadArrays:
|
|
1152
|
-
__spreadArray:
|
|
1147
|
+
__spread: Ct,
|
|
1148
|
+
__spreadArrays: Tt,
|
|
1149
|
+
__spreadArray: Dt,
|
|
1153
1150
|
__await: te,
|
|
1154
|
-
__asyncGenerator:
|
|
1155
|
-
__asyncDelegator:
|
|
1156
|
-
__asyncValues:
|
|
1157
|
-
__makeTemplateObject:
|
|
1158
|
-
__importStar:
|
|
1159
|
-
__importDefault:
|
|
1160
|
-
__classPrivateFieldGet:
|
|
1161
|
-
__classPrivateFieldSet:
|
|
1162
|
-
__classPrivateFieldIn:
|
|
1163
|
-
__addDisposableResource:
|
|
1164
|
-
__disposeResources:
|
|
1165
|
-
__rewriteRelativeImportExtension:
|
|
1166
|
-
},
|
|
1151
|
+
__asyncGenerator: At,
|
|
1152
|
+
__asyncDelegator: xt,
|
|
1153
|
+
__asyncValues: jt,
|
|
1154
|
+
__makeTemplateObject: Pt,
|
|
1155
|
+
__importStar: Lt,
|
|
1156
|
+
__importDefault: It,
|
|
1157
|
+
__classPrivateFieldGet: Vt,
|
|
1158
|
+
__classPrivateFieldSet: Mt,
|
|
1159
|
+
__classPrivateFieldIn: Ft,
|
|
1160
|
+
__addDisposableResource: Nt,
|
|
1161
|
+
__disposeResources: Ut,
|
|
1162
|
+
__rewriteRelativeImportExtension: Wt
|
|
1163
|
+
}, Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1167
1164
|
__proto__: null,
|
|
1168
|
-
__addDisposableResource:
|
|
1165
|
+
__addDisposableResource: Nt,
|
|
1169
1166
|
get __assign() {
|
|
1170
1167
|
return de;
|
|
1171
1168
|
},
|
|
1172
|
-
__asyncDelegator:
|
|
1173
|
-
__asyncGenerator:
|
|
1174
|
-
__asyncValues:
|
|
1169
|
+
__asyncDelegator: xt,
|
|
1170
|
+
__asyncGenerator: At,
|
|
1171
|
+
__asyncValues: jt,
|
|
1175
1172
|
__await: te,
|
|
1176
|
-
__awaiter:
|
|
1177
|
-
__classPrivateFieldGet:
|
|
1178
|
-
__classPrivateFieldIn:
|
|
1179
|
-
__classPrivateFieldSet:
|
|
1173
|
+
__awaiter: bt,
|
|
1174
|
+
__classPrivateFieldGet: Vt,
|
|
1175
|
+
__classPrivateFieldIn: Ft,
|
|
1176
|
+
__classPrivateFieldSet: Mt,
|
|
1180
1177
|
__createBinding: _e,
|
|
1181
|
-
__decorate:
|
|
1182
|
-
__disposeResources:
|
|
1183
|
-
__esDecorate:
|
|
1184
|
-
__exportStar:
|
|
1185
|
-
__extends:
|
|
1186
|
-
__generator:
|
|
1187
|
-
__importDefault:
|
|
1188
|
-
__importStar:
|
|
1189
|
-
__makeTemplateObject:
|
|
1190
|
-
__metadata:
|
|
1191
|
-
__param:
|
|
1192
|
-
__propKey:
|
|
1178
|
+
__decorate: yt,
|
|
1179
|
+
__disposeResources: Ut,
|
|
1180
|
+
__esDecorate: Et,
|
|
1181
|
+
__exportStar: Rt,
|
|
1182
|
+
__extends: ht,
|
|
1183
|
+
__generator: Ot,
|
|
1184
|
+
__importDefault: It,
|
|
1185
|
+
__importStar: Lt,
|
|
1186
|
+
__makeTemplateObject: Pt,
|
|
1187
|
+
__metadata: mt,
|
|
1188
|
+
__param: gt,
|
|
1189
|
+
__propKey: St,
|
|
1193
1190
|
__read: Ue,
|
|
1194
|
-
__rest:
|
|
1195
|
-
__rewriteRelativeImportExtension:
|
|
1196
|
-
__runInitializers:
|
|
1197
|
-
__setFunctionName:
|
|
1198
|
-
__spread:
|
|
1199
|
-
__spreadArray:
|
|
1200
|
-
__spreadArrays:
|
|
1191
|
+
__rest: _t,
|
|
1192
|
+
__rewriteRelativeImportExtension: Wt,
|
|
1193
|
+
__runInitializers: vt,
|
|
1194
|
+
__setFunctionName: wt,
|
|
1195
|
+
__spread: Ct,
|
|
1196
|
+
__spreadArray: Dt,
|
|
1197
|
+
__spreadArrays: Tt,
|
|
1201
1198
|
__values: pe,
|
|
1202
|
-
default:
|
|
1203
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1204
|
-
var le = {},
|
|
1205
|
-
function
|
|
1206
|
-
if (
|
|
1207
|
-
|
|
1199
|
+
default: qn
|
|
1200
|
+
}, Symbol.toStringTag, { value: "Module" })), Hn = /* @__PURE__ */ on(Bn);
|
|
1201
|
+
var le = {}, nt;
|
|
1202
|
+
function Gn() {
|
|
1203
|
+
if (nt) return le;
|
|
1204
|
+
nt = 1, Object.defineProperty(le, "__esModule", { value: !0 });
|
|
1208
1205
|
var e = z;
|
|
1209
1206
|
function t() {
|
|
1210
1207
|
var n = e.useRef(!1), r = e.useCallback(function() {
|
|
@@ -1218,11 +1215,11 @@ function zn() {
|
|
|
1218
1215
|
}
|
|
1219
1216
|
return le.default = t, le;
|
|
1220
1217
|
}
|
|
1221
|
-
Object.defineProperty(
|
|
1222
|
-
var Ie =
|
|
1223
|
-
function
|
|
1218
|
+
Object.defineProperty(pt, "__esModule", { value: !0 });
|
|
1219
|
+
var Ie = Hn, Ce = z, $n = Ie.__importDefault(Gn());
|
|
1220
|
+
function Kn(e, t, n) {
|
|
1224
1221
|
t === void 0 && (t = []), n === void 0 && (n = { loading: !1 });
|
|
1225
|
-
var r = Ce.useRef(0), o =
|
|
1222
|
+
var r = Ce.useRef(0), o = $n.default(), s = Ce.useState(n), i = s[0], d = s[1], h = Ce.useCallback(function() {
|
|
1226
1223
|
for (var f = [], a = 0; a < arguments.length; a++)
|
|
1227
1224
|
f[a] = arguments[a];
|
|
1228
1225
|
var u = ++r.current;
|
|
@@ -1236,16 +1233,16 @@ function kn(e, t, n) {
|
|
|
1236
1233
|
}, t);
|
|
1237
1234
|
return [i, h];
|
|
1238
1235
|
}
|
|
1239
|
-
var
|
|
1236
|
+
var sr = pt.default = Kn;
|
|
1240
1237
|
const B = /* @__PURE__ */ new Map();
|
|
1241
|
-
function
|
|
1242
|
-
const [e, t] =
|
|
1238
|
+
function ir() {
|
|
1239
|
+
const [e, t] = st([]), {
|
|
1243
1240
|
widgetCtx: { api: n }
|
|
1244
1241
|
} = Y();
|
|
1245
1242
|
function r(a) {
|
|
1246
1243
|
const u = a.map((l) => ({
|
|
1247
1244
|
file: l,
|
|
1248
|
-
id:
|
|
1245
|
+
id: Xt(),
|
|
1249
1246
|
status: "pending",
|
|
1250
1247
|
progress: 0
|
|
1251
1248
|
}));
|
|
@@ -1321,22 +1318,22 @@ function fr() {
|
|
|
1321
1318
|
};
|
|
1322
1319
|
}
|
|
1323
1320
|
export {
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1321
|
+
Xn as W,
|
|
1322
|
+
sr as _,
|
|
1323
|
+
Qn as a,
|
|
1324
|
+
Zn as b,
|
|
1325
|
+
er as c,
|
|
1326
|
+
nn as d,
|
|
1327
|
+
rr as e,
|
|
1331
1328
|
oe as f,
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1329
|
+
rn as g,
|
|
1330
|
+
or as h,
|
|
1331
|
+
ir as i,
|
|
1332
|
+
tr as j,
|
|
1333
|
+
nr as k,
|
|
1337
1334
|
de as l,
|
|
1338
|
-
|
|
1339
|
-
|
|
1335
|
+
_t as m,
|
|
1336
|
+
Dt as n,
|
|
1340
1337
|
Y as u
|
|
1341
1338
|
};
|
|
1342
|
-
//# sourceMappingURL=useUploadFiles-
|
|
1339
|
+
//# sourceMappingURL=useUploadFiles-Dp5D34Dp.js.map
|