@opencx/widget 3.0.0 → 3.0.2

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.
Files changed (107) hide show
  1. package/dist/basic.cjs +3 -3
  2. package/dist/basic.cjs.map +1 -1
  3. package/dist/basic.js +432 -429
  4. package/dist/basic.js.map +1 -1
  5. package/dist/index.cjs +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/react.cjs +1 -1
  8. package/dist/react.js +2 -2
  9. package/dist/{src → types/src}/designs/react/basic/index.d.ts +1 -1
  10. package/dist/{src → types/src}/designs/react/basic/utils/group-messages-by-type.d.ts +1 -1
  11. package/dist/{src → types/src}/designs/react/components/BotOrAgentMessage.d.ts +1 -1
  12. package/dist/{src → types/src}/designs/react/components/BotOrAgentMessageGroup.d.ts +1 -1
  13. package/dist/{src → types/src}/designs/react/components/Fallback.component.d.ts +1 -1
  14. package/dist/{src → types/src}/designs/react/components/RenderFile.d.ts +1 -1
  15. package/dist/{src/designs/react/components/keyboard.d.ts → types/src/designs/react/components/SuggestedReplies.d.ts} +2 -2
  16. package/dist/{src → types/src}/designs/react/components/Text.component.d.ts +1 -1
  17. package/dist/{src → types/src}/designs/react/components/UserMessageGroup.d.ts +1 -1
  18. package/dist/{src → types/src}/designs/react/components/lib/button.d.ts +1 -1
  19. package/dist/{src → types/src}/designs/react/components/lib/dialog.d.ts +7 -7
  20. package/dist/{src → types/src}/designs/react/components/lib/dropdown-menu.d.ts +2 -2
  21. package/dist/types/src/designs/react/hooks/useLocale.d.ts +6 -0
  22. package/dist/{src → types/src}/designs/react/index.d.ts +1 -1
  23. package/dist/{src → types/src}/headless/core/context/contact.d.ts +6 -7
  24. package/dist/{src → types/src}/headless/core/context/message.d.ts +5 -3
  25. package/dist/{src → types/src}/headless/core/context/session.d.ts +3 -3
  26. package/dist/{src → types/src}/headless/core/context/widget.d.ts +1 -1
  27. package/dist/types/src/headless/core/index.d.ts +10 -0
  28. package/dist/{src → types/src}/headless/core/types/messages.d.ts +1 -1
  29. package/dist/{src → types/src}/headless/core/types/schemas.d.ts +1 -1
  30. package/dist/{src → types/src}/headless/core/utils/Poller.d.ts +1 -1
  31. package/dist/{src → types/src}/headless/react/WidgetProvider.d.ts +1 -1
  32. package/dist/types/src/headless/react/hooks/useConfig.d.ts +1 -0
  33. package/dist/{src → types/src}/headless/react/hooks/useContact.d.ts +1 -1
  34. package/dist/{src → types/src}/headless/react/hooks/useMessages.d.ts +1 -1
  35. package/dist/{src → types/src}/headless/react/hooks/usePubsub.d.ts +1 -1
  36. package/dist/{src → types/src}/headless/react/index.d.ts +0 -1
  37. package/dist/{src → types/src}/headless/react/types/components.d.ts +1 -2
  38. package/dist/{useUploadFiles-BaCcqTwX.js → useUploadFiles-DJElNIQi.js} +87 -87
  39. package/dist/useUploadFiles-DJElNIQi.js.map +1 -0
  40. package/dist/{useUploadFiles-BZa0DENN.cjs → useUploadFiles-DMskqhR-.cjs} +4 -4
  41. package/dist/useUploadFiles-DMskqhR-.cjs.map +1 -0
  42. package/dist/{widget-DbgWez1r.js → widget-BeNOCqB5.js} +46 -43
  43. package/dist/widget-BeNOCqB5.js.map +1 -0
  44. package/dist/{widget-BlvH6dre.cjs → widget-DlAUwHzU.cjs} +2 -2
  45. package/dist/widget-DlAUwHzU.cjs.map +1 -0
  46. package/dist-embed/script.js +100 -100
  47. package/dist-embed/script.js.map +1 -1
  48. package/package.json +8 -13
  49. package/dist/basic.d.ts +0 -2
  50. package/dist/index.d.ts +0 -2
  51. package/dist/react.d.ts +0 -2
  52. package/dist/src/designs/react/hooks/useLocale.d.ts +0 -6
  53. package/dist/src/headless/core/index.d.ts +0 -7
  54. package/dist/src/headless/react/hooks/useConfig.d.ts +0 -1
  55. package/dist/useUploadFiles-BZa0DENN.cjs.map +0 -1
  56. package/dist/useUploadFiles-BaCcqTwX.js.map +0 -1
  57. package/dist/vitest/setup.d.ts +0 -1
  58. package/dist/widget-BlvH6dre.cjs.map +0 -1
  59. package/dist/widget-DbgWez1r.js.map +0 -1
  60. /package/dist/{src → types/src}/designs/react/basic/WidgetPopoverTrigger.d.ts +0 -0
  61. /package/dist/{src → types/src}/designs/react/basic/screens/chat-screen/ChatFooter.d.ts +0 -0
  62. /package/dist/{src → types/src}/designs/react/basic/screens/chat-screen/ChatHeader.d.ts +0 -0
  63. /package/dist/{src → types/src}/designs/react/basic/screens/chat-screen/ChatMain.d.ts +0 -0
  64. /package/dist/{src → types/src}/designs/react/basic/screens/chat-screen/ChatScreen.d.ts +0 -0
  65. /package/dist/{src → types/src}/designs/react/basic/screens/root-screen.d.ts +0 -0
  66. /package/dist/{src → types/src}/designs/react/basic/screens/welcome-screen/WelcomeScreen.d.ts +0 -0
  67. /package/dist/{src → types/src}/designs/react/basic/widget-interaction-tests/widget.test.d.ts +0 -0
  68. /package/dist/{src → types/src}/designs/react/components/BotOrAgentMessageWrapper.d.ts +0 -0
  69. /package/dist/{src → types/src}/designs/react/components/Loading.component.d.ts +0 -0
  70. /package/dist/{src → types/src}/designs/react/components/OpenLogoSvg.d.ts +0 -0
  71. /package/dist/{src → types/src}/designs/react/components/VoteButtons.d.ts +0 -0
  72. /package/dist/{src → types/src}/designs/react/components/lib/MotionDiv.d.ts +0 -0
  73. /package/dist/{src → types/src}/designs/react/components/lib/avatar.d.ts +0 -0
  74. /package/dist/{src → types/src}/designs/react/components/lib/input.d.ts +0 -0
  75. /package/dist/{src → types/src}/designs/react/components/lib/popover.d.ts +0 -0
  76. /package/dist/{src → types/src}/designs/react/components/lib/skeleton.d.ts +0 -0
  77. /package/dist/{src → types/src}/designs/react/components/lib/switch.d.ts +0 -0
  78. /package/dist/{src → types/src}/designs/react/components/lib/tooltip.d.ts +0 -0
  79. /package/dist/{src → types/src}/designs/react/components/lib/utils/cn.d.ts +0 -0
  80. /package/dist/{src → types/src}/designs/react/components/lib/wobble.d.ts +0 -0
  81. /package/dist/{src → types/src}/designs/react/components/markdown.d.ts +0 -0
  82. /package/dist/{src → types/src}/designs/react/constants.d.ts +0 -0
  83. /package/dist/{src → types/src}/designs/react/hooks/useWidgetContentHeight.d.ts +0 -0
  84. /package/dist/{src → types/src}/designs/react/render.d.ts +0 -0
  85. /package/dist/{src → types/src}/designs/translation/ar.locale.d.ts +0 -0
  86. /package/dist/{src → types/src}/designs/translation/de.locale.d.ts +0 -0
  87. /package/dist/{src → types/src}/designs/translation/en.locale.d.ts +0 -0
  88. /package/dist/{src → types/src}/designs/translation/fr.locale.d.ts +0 -0
  89. /package/dist/{src → types/src}/designs/translation/index.d.ts +0 -0
  90. /package/dist/{src → types/src}/designs/translation/nl.locale.d.ts +0 -0
  91. /package/dist/{src → types/src}/designs/translation/pt.locale.d.ts +0 -0
  92. /package/dist/{src → types/src}/designs/translation/translation.types.d.ts +0 -0
  93. /package/dist/{src → types/src}/headless/core/api.d.ts +0 -0
  94. /package/dist/{src → types/src}/headless/core/sdk/index.d.ts +0 -0
  95. /package/dist/{src → types/src}/headless/core/types/WidgetConfig.d.ts +0 -0
  96. /package/dist/{src → types/src}/headless/core/types/agent-or-bot.d.ts +0 -0
  97. /package/dist/{src → types/src}/headless/core/types/helpers.d.ts +0 -0
  98. /package/dist/{src → types/src}/headless/core/utils/PubSub.d.ts +0 -0
  99. /package/dist/{src → types/src}/headless/core/utils/PubSub.test.d.ts +0 -0
  100. /package/dist/{src → types/src}/headless/core/utils/uuid.d.ts +0 -0
  101. /package/dist/{src → types/src}/headless/react/ComponentRegistry.d.ts +0 -0
  102. /package/dist/{src → types/src}/headless/react/hooks/useIsAwaitingBotReply.d.ts +0 -0
  103. /package/dist/{src → types/src}/headless/react/hooks/usePreludeData.d.ts +0 -0
  104. /package/dist/{src → types/src}/headless/react/hooks/useSession.d.ts +0 -0
  105. /package/dist/{src → types/src}/headless/react/hooks/useUploadFiles.d.ts +0 -0
  106. /package/dist/{src → types/src}/headless/react/hooks/useVote.d.ts +0 -0
  107. /package/dist/{src → types/src}/headless/react/utils/create-safe-context.d.ts +0 -0
@@ -3,7 +3,7 @@ var kt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var Ye = (e, t, n) => kt(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import k, { createContext as rt, useContext as ot, useMemo as le, useSyncExternalStore as zt, useEffect as st, useLayoutEffect as Yt, useRef as K, useCallback as Ee, useDebugValue as Jt, useState as Xt } from "react";
5
5
  import { jsx as Qt } from "react/jsx-runtime";
6
- import { W as Zt } from "./widget-DbgWez1r.js";
6
+ import { W as Zt } from "./widget-BeNOCqB5.js";
7
7
  import { v4 as en } from "uuid";
8
8
  class tn {
9
9
  constructor(t) {
@@ -50,8 +50,8 @@ function nn(e) {
50
50
  return r;
51
51
  }, t.Provider];
52
52
  }
53
- const [te, rn] = nn();
54
- function er({
53
+ const rn = "3.0.2", [te, on] = nn();
54
+ function tr({
55
55
  options: e,
56
56
  children: t,
57
57
  components: n
@@ -66,50 +66,50 @@ function er({
66
66
  [n]
67
67
  );
68
68
  return /* @__PURE__ */ Qt(
69
- rn,
69
+ on,
70
70
  {
71
71
  value: {
72
72
  widgetCtx: r,
73
73
  components: n,
74
74
  componentStore: o,
75
- version: void 0
75
+ version: rn
76
76
  },
77
77
  children: t
78
78
  }
79
79
  );
80
80
  }
81
- function tr() {
81
+ function nr() {
82
82
  const { widgetCtx: e } = te();
83
83
  return e.config;
84
84
  }
85
85
  function Ve(e) {
86
86
  return zt(e.subscribe, e.get, e.get);
87
87
  }
88
- function nr() {
88
+ function rr() {
89
89
  const { widgetCtx: e } = te();
90
90
  return {
91
91
  state: Ve(e.contactCtx.state),
92
92
  contactCtx: e.contactCtx
93
93
  };
94
94
  }
95
- function on() {
95
+ function sn() {
96
96
  const { widgetCtx: e } = te();
97
97
  return { messages: Ve(e.messageCtx.state), messageCtx: e.messageCtx };
98
98
  }
99
- function sn() {
99
+ function an() {
100
100
  const { widgetCtx: e } = te();
101
101
  return { session: Ve(e.sessionCtx.state) };
102
102
  }
103
- function rr() {
103
+ function or() {
104
104
  var r;
105
- const { session: e } = sn(), { messages: t } = on();
105
+ const { session: e } = an(), { messages: t } = sn();
106
106
  return { isAwaitingBotReply: (!((r = e.session) != null && r.isHandedOff) || e.session.assignee.kind === "ai" || e.isCreatingSession) && t.isSendingMessage };
107
107
  }
108
- var or = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
109
- function sr(e) {
108
+ var sr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
109
+ function ir(e) {
110
110
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
111
111
  }
112
- function an(e) {
112
+ function un(e) {
113
113
  if (e.__esModule) return e;
114
114
  var t = e.default;
115
115
  if (typeof t == "function") {
@@ -139,7 +139,7 @@ var Ce = { exports: {} }, ve = {};
139
139
  * LICENSE file in the root directory of this source tree.
140
140
  */
141
141
  var Je;
142
- function un() {
142
+ function cn() {
143
143
  if (Je) return ve;
144
144
  Je = 1;
145
145
  var e = k;
@@ -184,7 +184,7 @@ var we = {};
184
184
  * LICENSE file in the root directory of this source tree.
185
185
  */
186
186
  var Xe;
187
- function cn() {
187
+ function fn() {
188
188
  return Xe || (Xe = 1, process.env.NODE_ENV !== "production" && function() {
189
189
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
190
190
  var e = k, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -254,8 +254,8 @@ function cn() {
254
254
  we.useSyncExternalStore = z, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
255
255
  }()), we;
256
256
  }
257
- process.env.NODE_ENV === "production" ? Ce.exports = un() : Ce.exports = cn();
258
- var fn = Ce.exports;
257
+ process.env.NODE_ENV === "production" ? Ce.exports = cn() : Ce.exports = fn();
258
+ var ln = Ce.exports;
259
259
  const H = () => {
260
260
  }, P = (
261
261
  /*#__NOINLINE__*/
@@ -263,14 +263,14 @@ const H = () => {
263
263
  ), me = Object, g = (e) => e === P, N = (e) => typeof e == "function", G = (e, t) => ({
264
264
  ...e,
265
265
  ...t
266
- }), ln = (e) => N(e.then), ue = /* @__PURE__ */ new WeakMap();
267
- let dn = 0;
266
+ }), dn = (e) => N(e.then), ue = /* @__PURE__ */ new WeakMap();
267
+ let pn = 0;
268
268
  const oe = (e) => {
269
269
  const t = typeof e, n = e && e.constructor, r = n == Date;
270
270
  let o, s;
271
271
  if (me(e) === e && !r && n != RegExp) {
272
272
  if (o = ue.get(e), o) return o;
273
- if (o = ++dn + "~", ue.set(e, o), n == Array) {
273
+ if (o = ++pn + "~", ue.set(e, o), n == Array) {
274
274
  for (o = "@", s = 0; s < e.length; s++)
275
275
  o += oe(e[s]) + ",";
276
276
  ue.set(e, o);
@@ -285,7 +285,7 @@ const oe = (e) => {
285
285
  } else
286
286
  o = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
287
287
  return o;
288
- }, W = /* @__PURE__ */ new WeakMap(), be = {}, ce = {}, Fe = "undefined", he = typeof window != Fe, De = typeof document != Fe, pn = () => he && typeof window.requestAnimationFrame != Fe, it = (e, t) => {
288
+ }, W = /* @__PURE__ */ new WeakMap(), be = {}, ce = {}, Fe = "undefined", he = typeof window != Fe, De = typeof document != Fe, hn = () => he && typeof window.requestAnimationFrame != Fe, it = (e, t) => {
289
289
  const n = W.get(e);
290
290
  return [
291
291
  // Getter
@@ -304,18 +304,18 @@ const oe = (e) => {
304
304
  ];
305
305
  };
306
306
  let Ae = !0;
307
- const hn = () => Ae, [je, xe] = he && window.addEventListener ? [
307
+ const _n = () => Ae, [je, xe] = he && window.addEventListener ? [
308
308
  window.addEventListener.bind(window),
309
309
  window.removeEventListener.bind(window)
310
310
  ] : [
311
311
  H,
312
312
  H
313
- ], _n = () => {
313
+ ], yn = () => {
314
314
  const e = De && document.visibilityState;
315
315
  return g(e) || e !== "hidden";
316
- }, yn = (e) => (De && document.addEventListener("visibilitychange", e), je("focus", e), () => {
316
+ }, gn = (e) => (De && document.addEventListener("visibilitychange", e), je("focus", e), () => {
317
317
  De && document.removeEventListener("visibilitychange", e), xe("focus", e);
318
- }), gn = (e) => {
318
+ }), En = (e) => {
319
319
  const t = () => {
320
320
  Ae = !0, e();
321
321
  }, n = () => {
@@ -324,13 +324,13 @@ const hn = () => Ae, [je, xe] = he && window.addEventListener ? [
324
324
  return je("online", t), je("offline", n), () => {
325
325
  xe("online", t), xe("offline", n);
326
326
  };
327
- }, En = {
328
- isOnline: hn,
329
- isVisible: _n
330
327
  }, vn = {
331
- initFocus: yn,
332
- initReconnect: gn
333
- }, Qe = !k.useId, se = !he || "Deno" in window, wn = (e) => pn() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Se = se ? st : Yt, Oe = typeof navigator < "u" && navigator.connection, Ze = !se && Oe && ([
328
+ isOnline: _n,
329
+ isVisible: yn
330
+ }, wn = {
331
+ initFocus: gn,
332
+ initReconnect: En
333
+ }, Qe = !k.useId, se = !he || "Deno" in window, mn = (e) => hn() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Se = se ? st : Yt, Oe = typeof navigator < "u" && navigator.connection, Ze = !se && Oe && ([
334
334
  "slow-2g",
335
335
  "2g"
336
336
  ].includes(Oe.effectiveType) || Oe.saveData), Ne = (e) => {
@@ -346,11 +346,11 @@ const hn = () => Ae, [je, xe] = he && window.addEventListener ? [
346
346
  t
347
347
  ];
348
348
  };
349
- let mn = 0;
350
- const Pe = () => ++mn, at = 0, ut = 1, ct = 2, bn = 3;
349
+ let bn = 0;
350
+ const Pe = () => ++bn, at = 0, ut = 1, ct = 2, Sn = 3;
351
351
  var re = {
352
352
  __proto__: null,
353
- ERROR_REVALIDATE_EVENT: bn,
353
+ ERROR_REVALIDATE_EVENT: Sn,
354
354
  FOCUS_EVENT: at,
355
355
  MUTATE_EVENT: ct,
356
356
  RECONNECT_EVENT: ut
@@ -399,7 +399,7 @@ async function ft(...e) {
399
399
  } catch (V) {
400
400
  v = V;
401
401
  }
402
- if (w && ln(w))
402
+ if (w && dn(w))
403
403
  if (w = await w.catch((V) => {
404
404
  v = V;
405
405
  }), L !== p[c][0]) {
@@ -437,9 +437,9 @@ async function ft(...e) {
437
437
  const et = (e, t) => {
438
438
  for (const n in e)
439
439
  e[n][0] && e[n][0](t);
440
- }, Sn = (e, t) => {
440
+ }, On = (e, t) => {
441
441
  if (!W.has(e)) {
442
- const n = G(vn, t), r = {}, o = ft.bind(P, e);
442
+ const n = G(wn, t), r = {}, o = ft.bind(P, e);
443
443
  let s = H;
444
444
  const i = {}, d = (a, u) => {
445
445
  const l = i[a] || [];
@@ -477,16 +477,16 @@ const et = (e, t) => {
477
477
  e,
478
478
  W.get(e)[4]
479
479
  ];
480
- }, On = (e, t, n, r, o) => {
480
+ }, Rn = (e, t, n, r, o) => {
481
481
  const s = n.errorRetryCount, i = o.retryCount, d = ~~((Math.random() + 0.5) * (1 << (i < 8 ? i : 8))) * n.errorRetryInterval;
482
482
  !g(s) && i > s || setTimeout(r, d, o);
483
- }, Rn = (e, t) => oe(e) == oe(t), [lt, Tn] = Sn(/* @__PURE__ */ new Map()), Cn = G(
483
+ }, Tn = (e, t) => oe(e) == oe(t), [lt, Cn] = On(/* @__PURE__ */ new Map()), Dn = G(
484
484
  {
485
485
  // events
486
486
  onLoadingSlow: H,
487
487
  onSuccess: H,
488
488
  onError: H,
489
- onErrorRetry: On,
489
+ onErrorRetry: Rn,
490
490
  onDiscarded: H,
491
491
  // switches
492
492
  revalidateOnFocus: !0,
@@ -499,24 +499,24 @@ const et = (e, t) => {
499
499
  dedupingInterval: 2 * 1e3,
500
500
  loadingTimeout: Ze ? 5e3 : 3e3,
501
501
  // providers
502
- compare: Rn,
502
+ compare: Tn,
503
503
  isPaused: () => !1,
504
504
  cache: lt,
505
- mutate: Tn,
505
+ mutate: Cn,
506
506
  fallback: {}
507
507
  },
508
508
  // use web preset by default
509
- En
510
- ), Dn = (e, t) => {
509
+ vn
510
+ ), An = (e, t) => {
511
511
  const n = G(e, t);
512
512
  if (t) {
513
513
  const { use: r, fallback: o } = e, { use: s, fallback: i } = t;
514
514
  r && s && (n.use = r.concat(s)), o && i && (n.fallback = G(o, i));
515
515
  }
516
516
  return n;
517
- }, An = rt({}), jn = "$inf$", dt = he && window.__SWR_DEVTOOLS_USE__, xn = dt ? window.__SWR_DEVTOOLS_USE__ : [], Pn = () => {
517
+ }, jn = rt({}), xn = "$inf$", dt = he && window.__SWR_DEVTOOLS_USE__, Pn = dt ? window.__SWR_DEVTOOLS_USE__ : [], Ln = () => {
518
518
  dt && (window.__SWR_DEVTOOLS_REACT__ = k);
519
- }, Ln = (e) => N(e[1]) ? [
519
+ }, In = (e) => N(e[1]) ? [
520
520
  e[0],
521
521
  e[1],
522
522
  e[2] || {}
@@ -524,27 +524,27 @@ const et = (e, t) => {
524
524
  e[0],
525
525
  null,
526
526
  (e[1] === null ? e[2] : e[1]) || {}
527
- ], In = () => G(Cn, ot(An)), Vn = (e) => (t, n, r) => e(t, n && ((...s) => {
527
+ ], Vn = () => G(Dn, ot(jn)), Fn = (e) => (t, n, r) => e(t, n && ((...s) => {
528
528
  const [i] = Ne(t), [, , , d] = W.get(lt);
529
- if (i.startsWith(jn))
529
+ if (i.startsWith(xn))
530
530
  return n(...s);
531
531
  const h = d[i];
532
532
  return g(h) ? n(...s) : (delete d[i], h);
533
- }), r), Fn = xn.concat(Vn), Nn = (e) => function(...n) {
534
- const r = In(), [o, s, i] = Ln(n), d = Dn(r, i);
533
+ }), r), Nn = Pn.concat(Fn), Mn = (e) => function(...n) {
534
+ const r = Vn(), [o, s, i] = In(n), d = An(r, i);
535
535
  let h = e;
536
- const { use: f } = d, a = (f || []).concat(Fn);
536
+ const { use: f } = d, a = (f || []).concat(Nn);
537
537
  for (let u = a.length; u--; )
538
538
  h = a[u](h);
539
539
  return h(o, s || d.fetcher || null, d);
540
- }, Mn = (e, t, n) => {
540
+ }, Un = (e, t, n) => {
541
541
  const r = t[e] || (t[e] = []);
542
542
  return r.push(n), () => {
543
543
  const o = r.indexOf(n);
544
544
  o >= 0 && (r[o] = r[r.length - 1], r.pop());
545
545
  };
546
546
  };
547
- Pn();
547
+ Ln();
548
548
  const tt = k.use || ((e) => {
549
549
  if (e.status === "pending")
550
550
  throw e;
@@ -557,7 +557,7 @@ const tt = k.use || ((e) => {
557
557
  }), e);
558
558
  }), Re = {
559
559
  dedupe: !0
560
- }, Un = (e, t, n) => {
560
+ }, Wn = (e, t, n) => {
561
561
  const { cache: r, compare: o, suspense: s, fallbackData: i, revalidateOnMount: d, revalidateIfStale: h, refreshInterval: f, refreshWhenHidden: a, refreshWhenOffline: u, keepPreviousData: l } = n, [c, y, _, T] = W.get(r), [p, z] = Ne(e), O = K(!1), E = K(!1), w = K(p), v = K(t), L = K(n), m = () => L.current, C = () => m().isVisible() && m().isOnline(), [x, q, $, V] = it(r, p), Y = K({}).current, qt = g(i) ? n.fallback[p] : i, Ue = (b, S) => {
562
562
  for (const A in Y) {
563
563
  const R = A;
@@ -588,7 +588,7 @@ const tt = k.use || ((e) => {
588
588
  }, [
589
589
  r,
590
590
  p
591
- ]), J = fn.useSyncExternalStore(Ee(
591
+ ]), J = ln.useSyncExternalStore(Ee(
592
592
  (b) => $(p, (S, A) => {
593
593
  Ue(A, S) || b();
594
594
  }),
@@ -672,7 +672,7 @@ const tt = k.use || ((e) => {
672
672
  if (!p) return;
673
673
  const b = ne.bind(P, Re);
674
674
  let S = 0;
675
- const R = Mn(p, c, (F, Z = {}) => {
675
+ const R = Un(p, c, (F, Z = {}) => {
676
676
  if (F == re.FOCUS_EVENT) {
677
677
  const D = Date.now();
678
678
  m().revalidateOnFocus && D > S && C() && (S = D + m().focusThrottleInterval, b());
@@ -687,7 +687,7 @@ const tt = k.use || ((e) => {
687
687
  });
688
688
  return E.current = !1, w.current = p, O.current = !0, q({
689
689
  _k: z
690
- }), He && (g(Q) || se ? b() : wn(b)), () => {
690
+ }), He && (g(Q) || se ? b() : mn(b)), () => {
691
691
  E.current = !0, R();
692
692
  };
693
693
  }, [
@@ -739,10 +739,10 @@ const tt = k.use || ((e) => {
739
739
  return Y.isLoading = !0, Gt;
740
740
  }
741
741
  };
742
- }, Wn = Nn(Un);
743
- function ir() {
742
+ }, qn = Mn(Wn);
743
+ function ar() {
744
744
  const { widgetCtx: e } = te();
745
- return Wn([e.config.token], e.api.widgetPrelude);
745
+ return qn([e.config.token], e.api.widgetPrelude);
746
746
  }
747
747
  var pt = {}, Le = function(e, t) {
748
748
  return Le = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
@@ -1043,7 +1043,7 @@ function xt(e) {
1043
1043
  function Pt(e, t) {
1044
1044
  return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : e.raw = t, e;
1045
1045
  }
1046
- var qn = Object.create ? function(e, t) {
1046
+ var Bn = Object.create ? function(e, t) {
1047
1047
  Object.defineProperty(e, "default", { enumerable: !0, value: t });
1048
1048
  } : function(e, t) {
1049
1049
  e.default = t;
@@ -1052,7 +1052,7 @@ function Lt(e) {
1052
1052
  if (e && e.__esModule) return e;
1053
1053
  var t = {};
1054
1054
  if (e != null) for (var n in e) n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && _e(t, e, n);
1055
- return qn(t, e), t;
1055
+ return Bn(t, e), t;
1056
1056
  }
1057
1057
  function It(e) {
1058
1058
  return e && e.__esModule ? e : { default: e };
@@ -1095,13 +1095,13 @@ function Mt(e, t, n) {
1095
1095
  } else n && e.stack.push({ async: !0 });
1096
1096
  return t;
1097
1097
  }
1098
- var Bn = typeof SuppressedError == "function" ? SuppressedError : function(e, t, n) {
1098
+ var Hn = typeof SuppressedError == "function" ? SuppressedError : function(e, t, n) {
1099
1099
  var r = new Error(n);
1100
1100
  return r.name = "SuppressedError", r.error = e, r.suppressed = t, r;
1101
1101
  };
1102
1102
  function Ut(e) {
1103
1103
  function t(s) {
1104
- e.error = e.hasError ? new Bn(s, e.error, "An error was suppressed during disposal.") : s, e.hasError = !0;
1104
+ e.error = e.hasError ? new Hn(s, e.error, "An error was suppressed during disposal.") : s, e.hasError = !0;
1105
1105
  }
1106
1106
  var n, r = 0;
1107
1107
  function o() {
@@ -1127,7 +1127,7 @@ function Wt(e, t) {
1127
1127
  return r ? t ? ".jsx" : ".js" : o && (!s || !i) ? n : o + s + "." + i.toLowerCase() + "js";
1128
1128
  }) : e;
1129
1129
  }
1130
- const Hn = {
1130
+ const Gn = {
1131
1131
  __extends: ht,
1132
1132
  __assign: de,
1133
1133
  __rest: _t,
@@ -1160,7 +1160,7 @@ const Hn = {
1160
1160
  __addDisposableResource: Mt,
1161
1161
  __disposeResources: Ut,
1162
1162
  __rewriteRelativeImportExtension: Wt
1163
- }, Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1163
+ }, $n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1164
1164
  __proto__: null,
1165
1165
  __addDisposableResource: Mt,
1166
1166
  get __assign() {
@@ -1196,10 +1196,10 @@ const Hn = {
1196
1196
  __spreadArray: Dt,
1197
1197
  __spreadArrays: Ct,
1198
1198
  __values: pe,
1199
- default: Hn
1200
- }, Symbol.toStringTag, { value: "Module" })), $n = /* @__PURE__ */ an(Gn);
1199
+ default: Gn
1200
+ }, Symbol.toStringTag, { value: "Module" })), Kn = /* @__PURE__ */ un($n);
1201
1201
  var fe = {}, nt;
1202
- function Kn() {
1202
+ function kn() {
1203
1203
  if (nt) return fe;
1204
1204
  nt = 1, Object.defineProperty(fe, "__esModule", { value: !0 });
1205
1205
  var e = k;
@@ -1216,10 +1216,10 @@ function Kn() {
1216
1216
  return fe.default = t, fe;
1217
1217
  }
1218
1218
  Object.defineProperty(pt, "__esModule", { value: !0 });
1219
- var Ie = $n, Te = k, kn = Ie.__importDefault(Kn());
1220
- function zn(e, t, n) {
1219
+ var Ie = Kn, Te = k, zn = Ie.__importDefault(kn());
1220
+ function Yn(e, t, n) {
1221
1221
  t === void 0 && (t = []), n === void 0 && (n = { loading: !1 });
1222
- var r = Te.useRef(0), o = kn.default(), s = Te.useState(n), i = s[0], d = s[1], h = Te.useCallback(function() {
1222
+ var r = Te.useRef(0), o = zn.default(), s = Te.useState(n), i = s[0], d = s[1], h = Te.useCallback(function() {
1223
1223
  for (var f = [], a = 0; a < arguments.length; a++)
1224
1224
  f[a] = arguments[a];
1225
1225
  var u = ++r.current;
@@ -1233,9 +1233,9 @@ function zn(e, t, n) {
1233
1233
  }, t);
1234
1234
  return [i, h];
1235
1235
  }
1236
- var ar = pt.default = zn;
1236
+ var ur = pt.default = Yn;
1237
1237
  const B = /* @__PURE__ */ new Map();
1238
- function ur() {
1238
+ function cr() {
1239
1239
  const [e, t] = Xt([]), { widgetCtx: { api: n } } = te();
1240
1240
  function r(a) {
1241
1241
  const u = a.map((l) => ({
@@ -1316,21 +1316,21 @@ function ur() {
1316
1316
  };
1317
1317
  }
1318
1318
  export {
1319
- er as W,
1320
- ar as _,
1321
- tr as a,
1322
- nr as b,
1323
- rr as c,
1324
- on as d,
1325
- ir as e,
1319
+ tr as W,
1320
+ ur as _,
1321
+ nr as a,
1322
+ rr as b,
1323
+ or as c,
1324
+ sn as d,
1325
+ ar as e,
1326
1326
  Ve as f,
1327
- sn as g,
1328
- ur as h,
1327
+ an as g,
1328
+ cr as h,
1329
1329
  de as i,
1330
1330
  _t as j,
1331
1331
  Dt as k,
1332
- or as l,
1333
- sr as m,
1332
+ sr as l,
1333
+ ir as m,
1334
1334
  te as u
1335
1335
  };
1336
- //# sourceMappingURL=useUploadFiles-BaCcqTwX.js.map
1336
+ //# sourceMappingURL=useUploadFiles-DJElNIQi.js.map