@spscommerce/max 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -387,7 +387,7 @@ function Ev() {
387
387
  }
388
388
  }
389
389
  var j0 = Array.isArray;
390
- function I0($) {
390
+ function T0($) {
391
391
  return j0($);
392
392
  }
393
393
  function N0($) {
@@ -398,17 +398,17 @@ function Ev() {
398
398
  }
399
399
  function F0($) {
400
400
  try {
401
- return T0($), !1;
401
+ return I0($), !1;
402
402
  } catch {
403
403
  return !0;
404
404
  }
405
405
  }
406
- function T0($) {
406
+ function I0($) {
407
407
  return "" + $;
408
408
  }
409
409
  function o0($) {
410
410
  if (F0($))
411
- return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", N0($)), T0($);
411
+ return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", N0($)), I0($);
412
412
  }
413
413
  var m0 = g.ReactCurrentOwner, H0 = {
414
414
  key: !0,
@@ -562,7 +562,7 @@ Check the top-level render call using <` + B0 + ">.");
562
562
  {
563
563
  if (typeof $ != "object")
564
564
  return;
565
- if (I0($))
565
+ if (T0($))
566
566
  for (var B0 = 0; B0 < $.length; B0++) {
567
567
  var Y0 = $[B0];
568
568
  X0(Y0) && P1(Y0, v0);
@@ -624,7 +624,7 @@ Check the top-level render call using <` + B0 + ">.");
624
624
  var l2 = y2();
625
625
  l2 ? M1 += l2 : M1 += B1();
626
626
  var o2;
627
- $ === null ? o2 = "null" : I0($) ? o2 = "array" : $ !== void 0 && $.$$typeof === t ? (o2 = "<" + (w($.type) || "Unknown") + " />", M1 = " Did you accidentally export a JSX literal instead of a component?") : o2 = typeof $, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", o2, M1);
627
+ $ === null ? o2 = "null" : T0($) ? o2 = "array" : $ !== void 0 && $.$$typeof === t ? (o2 = "<" + (w($.type) || "Unknown") + " />", M1 = " Did you accidentally export a JSX literal instead of a component?") : o2 = typeof $, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", o2, M1);
628
628
  }
629
629
  var c2 = K1($, v0, B0, h1, O1);
630
630
  if (c2 == null)
@@ -633,7 +633,7 @@ Check the top-level render call using <` + B0 + ">.");
633
633
  var f2 = v0.children;
634
634
  if (f2 !== void 0)
635
635
  if (Y0)
636
- if (I0(f2)) {
636
+ if (T0(f2)) {
637
637
  for (var de = 0; de < f2.length; de++)
638
638
  t2(f2[de], $);
639
639
  Object.freeze && Object.freeze(f2);
@@ -8150,9 +8150,9 @@ function QS(e, t, o = {}) {
8150
8150
  `);
8151
8151
  }
8152
8152
  function s0(N0) {
8153
- return N0.map((F0, T0) => ({ message: F0, index: T0 })).sort((F0, T0) => {
8154
- const o0 = F0.message.createdDateTime, m0 = T0.message.createdDateTime;
8155
- return o0 && m0 ? o0 !== m0 ? o0 < m0 ? -1 : 1 : F0.index - T0.index : o0 ? -1 : m0 ? 1 : F0.index - T0.index;
8153
+ return N0.map((F0, I0) => ({ message: F0, index: I0 })).sort((F0, I0) => {
8154
+ const o0 = F0.message.createdDateTime, m0 = I0.message.createdDateTime;
8155
+ return o0 && m0 ? o0 !== m0 ? o0 < m0 ? -1 : 1 : F0.index - I0.index : o0 ? -1 : m0 ? 1 : F0.index - I0.index;
8156
8156
  }).map(({ message: F0 }) => F0);
8157
8157
  }
8158
8158
  const l0 = h.useCallback(() => {
@@ -8169,14 +8169,14 @@ function QS(e, t, o = {}) {
8169
8169
  e0.current && (cancelAnimationFrame(e0.current), e0.current = void 0), S.current = "", r(!1), U();
8170
8170
  const m0 = o0.detail.content, H0 = o0.detail.messageId;
8171
8171
  o0.detail.conversationId && o.onConversationIdAssignedByStream?.(o0.detail.conversationId), q(o0.detail.conversationId), u((G0) => [...G0, { role: "agent", content: m0, id: H0 }]), f("");
8172
- }, T0 = (o0) => {
8172
+ }, I0 = (o0) => {
8173
8173
  e0.current && (cancelAnimationFrame(e0.current), e0.current = void 0), S.current = "", r(!1), U(), f(""), o0.detail?.code === "conversation_frozen" ? p(!0) : s(!0);
8174
8174
  };
8175
- return document.addEventListener("agentChatStreamResponse", N0), document.addEventListener("agentChatStreamDone", F0), document.addEventListener("agentChatStreamError", T0), () => {
8175
+ return document.addEventListener("agentChatStreamResponse", N0), document.addEventListener("agentChatStreamDone", F0), document.addEventListener("agentChatStreamError", I0), () => {
8176
8176
  document.removeEventListener(
8177
8177
  "agentChatStreamResponse",
8178
8178
  N0
8179
- ), document.removeEventListener("agentChatStreamDone", F0), document.removeEventListener("agentChatStreamError", T0);
8179
+ ), document.removeEventListener("agentChatStreamDone", F0), document.removeEventListener("agentChatStreamError", I0);
8180
8180
  };
8181
8181
  }, [N, G, U, l0]);
8182
8182
  const k0 = h.useCallback(() => {
@@ -8196,7 +8196,7 @@ function QS(e, t, o = {}) {
8196
8196
  U2.error(F0);
8197
8197
  }
8198
8198
  }, [Q, e, w, g0]), u0 = h.useCallback(
8199
- async (N0, F0, T0) => {
8199
+ async (N0, F0, I0) => {
8200
8200
  if (g0() && !v && !l) {
8201
8201
  if (await X() !== "active")
8202
8202
  return;
@@ -8215,7 +8215,7 @@ function QS(e, t, o = {}) {
8215
8215
  try {
8216
8216
  await e.postChat(
8217
8217
  j(N0),
8218
- T0 || "",
8218
+ I0 || "",
8219
8219
  N,
8220
8220
  H0,
8221
8221
  G0,
@@ -8264,10 +8264,10 @@ function QS(e, t, o = {}) {
8264
8264
  async (N0, F0) => {
8265
8265
  r(!0), s(!1), p(!!F0), T(null), z(!1), q(N0), k0();
8266
8266
  try {
8267
- const T0 = await e.fetchConversationMessages(N0, {
8267
+ const I0 = await e.fetchConversationMessages(N0, {
8268
8268
  limit: zb
8269
- }), o0 = s0(T0.results), m0 = h0(o0);
8270
- u(m0), T(T0.next), r(!1);
8269
+ }), o0 = s0(I0.results), m0 = h0(o0);
8270
+ u(m0), T(I0.next), r(!1);
8271
8271
  } catch {
8272
8272
  r(!1), s(!0);
8273
8273
  }
@@ -8280,8 +8280,8 @@ function QS(e, t, o = {}) {
8280
8280
  const N0 = await e.fetchConversationMessages(N, {
8281
8281
  cursor: L,
8282
8282
  limit: zb
8283
- }), F0 = s0(N0.results), T0 = h0(F0);
8284
- u((o0) => [...T0, ...o0]), T(N0.next);
8283
+ }), F0 = s0(N0.results), I0 = h0(F0);
8284
+ u((o0) => [...I0, ...o0]), T(N0.next);
8285
8285
  } catch (N0) {
8286
8286
  U2.error("Error loading older messages:", N0);
8287
8287
  } finally {
@@ -8292,7 +8292,7 @@ function QS(e, t, o = {}) {
8292
8292
  async (N0) => {
8293
8293
  try {
8294
8294
  if (N)
8295
- return (await e.fetchConversationMessages(N)).results.find((T0) => T0.id === N0);
8295
+ return (await e.fetchConversationMessages(N)).results.find((I0) => I0.id === N0);
8296
8296
  } catch (F0) {
8297
8297
  U2.error("Error fetching message", F0);
8298
8298
  return;
@@ -8303,16 +8303,16 @@ function QS(e, t, o = {}) {
8303
8303
  r(!0), s(!1);
8304
8304
  try {
8305
8305
  const F0 = (await e.fetchConversationList()).results.sort(
8306
- (T0, o0) => new Date(T0.modifiedDateTime).getTime() - new Date(o0.modifiedDateTime).getTime()
8306
+ (I0, o0) => new Date(I0.modifiedDateTime).getTime() - new Date(o0.modifiedDateTime).getTime()
8307
8307
  );
8308
8308
  C(F0), r(!1);
8309
8309
  } catch {
8310
8310
  r(!1), s(!0);
8311
8311
  }
8312
8312
  }, [e]), j0 = h.useCallback(
8313
- async (N0, F0, T0) => {
8313
+ async (N0, F0, I0) => {
8314
8314
  try {
8315
- await e.postFeedback(N0, F0, T0);
8315
+ await e.postFeedback(N0, F0, I0);
8316
8316
  } catch (o0) {
8317
8317
  U2.error(o0);
8318
8318
  }
@@ -17093,16 +17093,16 @@ const Ja = h.forwardRef((e, t) => {
17093
17093
  captionKey: "caption"
17094
17094
  }) : null,
17095
17095
  [Q]
17096
- ), [l0, k0] = h.useState(-1), [z0, d0] = h.useState(L), g0 = t || h.useRef(null), X = h.useRef(null), u0 = h.useRef(null), h0 = Za("sps-option-list-portal"), C0 = h.useContext(Pe), [L0, U0] = I || [l1.BOTTOM_LEFT, l1.TOP_LEFT], [[o1, K0], j0] = h.useState([{}, !1]), I0 = h.useRef(null), [
17096
+ ), [l0, k0] = h.useState(-1), [z0, d0] = h.useState(L), g0 = t || h.useRef(null), X = h.useRef(null), u0 = h.useRef(null), h0 = Za("sps-option-list-portal"), C0 = h.useContext(Pe), [L0, U0] = I || [l1.BOTTOM_LEFT, l1.TOP_LEFT], [[o1, K0], j0] = h.useState([{}, !1]), T0 = h.useRef(null), [
17097
17097
  N0,
17098
17098
  F0,
17099
- T0
17099
+ I0
17100
17100
  ] = YI(
17101
- { ...e, searchInputRef: I0 }
17101
+ { ...e, searchInputRef: T0 }
17102
17102
  ), [o0, m0] = jI(
17103
17103
  e,
17104
17104
  F0,
17105
- T0
17105
+ I0
17106
17106
  );
17107
17107
  h.useEffect(() => {
17108
17108
  U && K1(U);
@@ -17149,7 +17149,7 @@ const Ja = h.forwardRef((e, t) => {
17149
17149
  x || "sps-option-list__options",
17150
17150
  r && "sps-option-list__options--tall"
17151
17151
  ), W0 = h.useCallback(() => {
17152
- z0 || (d0(!0), I0.current && I0.current.focus(), k0(-1), H && H(!0));
17152
+ z0 || (d0(!0), T0.current && T0.current.focus(), k0(-1), H && H(!0));
17153
17153
  }, [z0, H]), f0 = h.useCallback(() => {
17154
17154
  z0 && (d0(!1), k0(-1), H && H(!1));
17155
17155
  }, [z0, H]), V0 = h.useCallback((Q0, X0) => {
@@ -17236,11 +17236,11 @@ const Ja = h.forwardRef((e, t) => {
17236
17236
  inline: "nearest"
17237
17237
  });
17238
17238
  }, [l0, z0]), h.useEffect(() => {
17239
- d0(L), L ? I0.current && I0.current.focus() : k0(-1);
17239
+ d0(L), L ? T0.current && T0.current.focus() : k0(-1);
17240
17240
  }, [L]), h.useEffect(() => {
17241
17241
  F && K1(F);
17242
17242
  }, [F]), h.useEffect(() => {
17243
- !z0 && X.current && (T0({ value: "" }), X.current.scrollTop = 0), z0 && B && B(K0);
17243
+ !z0 && X.current && (I0({ value: "" }), X.current.scrollTop = 0), z0 && B && B(K0);
17244
17244
  }, [z0]);
17245
17245
  const N1 = S ? S / 16 : e0, i2 = N1 ? { maxHeight: `${N1}rem` } : {};
17246
17246
  function m2(Q0, X0) {
@@ -19465,8 +19465,8 @@ function xN(e, t) {
19465
19465
  };
19466
19466
  function w(Q) {
19467
19467
  var x = E1(function() {
19468
- var I0 = Q.reactReduxForwardedRef, N0 = Ki(Q, yN);
19469
- return [Q.context, I0, N0];
19468
+ var T0 = Q.reactReduxForwardedRef, N0 = Ki(Q, yN);
19469
+ return [Q.context, T0, N0];
19470
19470
  }, [Q]), Y = x[0], J = x[1], S = x[2], e0 = E1(function() {
19471
19471
  return Y && Y.Consumer && Uh.isContextConsumer(/* @__PURE__ */ r0.createElement(Y.Consumer, null)) ? Y : L;
19472
19472
  }, [Y, L]), a0 = M2(e0), D = !!Q.store && !!Q.store.getState && !!Q.store.dispatch, G = !!a0 && !!a0.store;
@@ -19476,8 +19476,8 @@ function xN(e, t) {
19476
19476
  return B(U);
19477
19477
  }, [U]), s0 = E1(function() {
19478
19478
  if (!p) return BN;
19479
- var I0 = dA(U, D ? null : a0.subscription), N0 = I0.notifyNestedSubs.bind(I0);
19480
- return [I0, N0];
19479
+ var T0 = dA(U, D ? null : a0.subscription), N0 = T0.notifyNestedSubs.bind(T0);
19480
+ return [T0, N0];
19481
19481
  }, [U, D, a0]), l0 = s0[0], k0 = s0[1], z0 = E1(function() {
19482
19482
  return D ? a0 : e1({}, a0, {
19483
19483
  subscription: l0
@@ -27332,15 +27332,15 @@ const AH = Nc || Bd, mH = {
27332
27332
  opensUpward: !1,
27333
27333
  optionIds: ""
27334
27334
  }), [l0, k0] = h.useState();
27335
- function z0(I0) {
27335
+ function z0(T0) {
27336
27336
  s0({
27337
- value: I0,
27338
- text: I0 && L ? I0[L] : I0
27337
+ value: T0,
27338
+ text: T0 && L ? T0[L] : T0
27339
27339
  });
27340
27340
  }
27341
- async function d0(I0) {
27342
- const N0 = I0 && T && typeof I0 == "object" ? I0[T] : I0;
27343
- x && !await x(N0) || (z0(I0), J && (J.setValue(N0), J.markAsDirty()), f && f(
27341
+ async function d0(T0) {
27342
+ const N0 = T0 && T && typeof T0 == "object" ? T0[T] : T0;
27343
+ x && !await x(N0) || (z0(T0), J && (J.setValue(N0), J.markAsDirty()), f && f(
27344
27344
  new nn({ value: N0 })
27345
27345
  ));
27346
27346
  }
@@ -27353,10 +27353,10 @@ const AH = Nc || Bd, mH = {
27353
27353
  function X() {
27354
27354
  s0({ isOpen: !1 });
27355
27355
  }
27356
- function u0(I0) {
27357
- I0.nativeEvent.stopImmediatePropagation(), c || s0({ isOpen: !j.isOpen });
27356
+ function u0(T0) {
27357
+ T0.nativeEvent.stopImmediatePropagation(), c || s0({ isOpen: !j.isOpen });
27358
27358
  }
27359
- function h0(I0) {
27359
+ function h0(T0) {
27360
27360
  c || ([
27361
27361
  "Up",
27362
27362
  "ArrowUp",
@@ -27364,20 +27364,20 @@ const AH = Nc || Bd, mH = {
27364
27364
  "ArrowDown",
27365
27365
  " ",
27366
27366
  "Spacebar"
27367
- ].indexOf(I0.key) > -1 && I0.preventDefault(), nA.includes(I0.key) && (k0(I0), I0.preventDefault()), I0.persist(), s0({ keyDown: I0 }));
27367
+ ].indexOf(T0.key) > -1 && T0.preventDefault(), nA.includes(T0.key) && (k0(T0), T0.preventDefault()), T0.persist(), s0({ keyDown: T0 }));
27368
27368
  }
27369
- function C0(I0) {
27370
- s0({ isOpen: I0 });
27369
+ function C0(T0) {
27370
+ s0({ isOpen: T0 });
27371
27371
  }
27372
- function L0(I0) {
27373
- s0({ opensUpward: I0 });
27372
+ function L0(T0) {
27373
+ s0({ opensUpward: T0 });
27374
27374
  }
27375
- function U0(I0) {
27376
- I0.detail !== S && s0({ isOpen: !1 });
27375
+ function U0(T0) {
27376
+ T0.detail !== S && s0({ isOpen: !1 });
27377
27377
  }
27378
- function o1(I0) {
27378
+ function o1(T0) {
27379
27379
  s0({
27380
- optionIds: new Array(I0).fill("").map((N0, F0) => `${S}-options-option-${F0}`).join(",")
27380
+ optionIds: new Array(T0).fill("").map((N0, F0) => `${S}-options-option-${F0}`).join(",")
27381
27381
  });
27382
27382
  }
27383
27383
  h.useEffect(() => (document.addEventListener("click", X), document.addEventListener("DropdownOpened", U0), () => {
@@ -27385,27 +27385,27 @@ const AH = Nc || Bd, mH = {
27385
27385
  }), []), h.useLayoutEffect(() => {
27386
27386
  if (n && G.current && a0.current) {
27387
27387
  a0.current.style.width = "";
27388
- const I0 = `${a0.current.getBoundingClientRect().width + 6}px`;
27389
- a0.current.style.width = I0, G.current.style.width = I0, G.current.style.maxWidth = I0;
27388
+ const T0 = `${a0.current.getBoundingClientRect().width + 6}px`;
27389
+ a0.current.style.width = T0, G.current.style.width = T0, G.current.style.maxWidth = T0;
27390
27390
  }
27391
27391
  }), sA(() => {
27392
27392
  if (j.isOpen) {
27393
27393
  D.current && AH(D.current, {
27394
27394
  scrollMode: "if-needed"
27395
27395
  }), O?.();
27396
- const I0 = document.createEvent("CustomEvent");
27397
- I0.initCustomEvent("DropdownOpened", !1, !1, S), document.dispatchEvent(I0);
27396
+ const T0 = document.createEvent("CustomEvent");
27397
+ T0.initCustomEvent("DropdownOpened", !1, !1, S), document.dispatchEvent(T0);
27398
27398
  }
27399
27399
  }, [j.isOpen]), h.useImperativeHandle(t, () => ({
27400
27400
  focus: () => {
27401
27401
  D.current?.focus();
27402
27402
  }
27403
27403
  })), h.useEffect(() => {
27404
- let I0;
27405
- return j.isOpen && (I0 = () => {
27404
+ let T0;
27405
+ return j.isOpen && (T0 = () => {
27406
27406
  s0({ isOpen: !1 });
27407
- }, window.addEventListener("resize", I0)), () => {
27408
- I0 && window.removeEventListener("resize", I0);
27407
+ }, window.addEventListener("resize", T0)), () => {
27408
+ T0 && window.removeEventListener("resize", T0);
27409
27409
  };
27410
27410
  }, [j.isOpen]), er({ isOpen: j.isOpen, rootRef: D });
27411
27411
  const K0 = c0(
@@ -28006,7 +28006,7 @@ function kH({
28006
28006
  function j0(f0) {
28007
28007
  Q(f0.target.value);
28008
28008
  }
28009
- function I0(f0) {
28009
+ function T0(f0) {
28010
28010
  A0.validateTimeString(f0.target.value, p) && S(f0.target.value);
28011
28011
  }
28012
28012
  function N0(f0, V0, n1) {
@@ -28032,7 +28032,7 @@ function kH({
28032
28032
  A0.padIncompleteTimeString(f0 ?? J, p)
28033
28033
  ), setTimeout(() => N0(void 0, f0), 0));
28034
28034
  }
28035
- function T0(f0) {
28035
+ function I0(f0) {
28036
28036
  G(f0.target.value);
28037
28037
  }
28038
28038
  function o0(f0) {
@@ -28234,7 +28234,7 @@ function kH({
28234
28234
  suggestions: Q3,
28235
28235
  zeroState: "Custom time",
28236
28236
  value: J,
28237
- onChange: I0,
28237
+ onChange: T0,
28238
28238
  onBlur: () => F0(),
28239
28239
  onSelectionChange: o0,
28240
28240
  disabled: t,
@@ -28249,7 +28249,7 @@ function kH({
28249
28249
  suggestions: F3,
28250
28250
  zeroState: "Custom time",
28251
28251
  value: J,
28252
- onChange: I0,
28252
+ onChange: T0,
28253
28253
  onBlur: () => F0(),
28254
28254
  onSelectionChange: o0,
28255
28255
  disabled: t,
@@ -28261,7 +28261,7 @@ function kH({
28261
28261
  {
28262
28262
  options: NM,
28263
28263
  value: D,
28264
- onChange: T0,
28264
+ onChange: I0,
28265
28265
  disabled: t,
28266
28266
  notClearable: !0
28267
28267
  }
@@ -28816,7 +28816,7 @@ Arguments: ` + Array.prototype.slice.call(y).join("") + `
28816
28816
  function j0(b) {
28817
28817
  return typeof b == "string" ? K0[b] || K0[b.toLowerCase()] : void 0;
28818
28818
  }
28819
- function I0(b) {
28819
+ function T0(b) {
28820
28820
  var _ = {}, k, y;
28821
28821
  for (y in b)
28822
28822
  i(b, y) && (k = j0(y), k && (_[k] = b[y]));
@@ -28848,7 +28848,7 @@ Arguments: ` + Array.prototype.slice.call(y).join("") + `
28848
28848
  return y.priority - P.priority;
28849
28849
  }), _;
28850
28850
  }
28851
- var T0 = /\d/, o0 = /\d\d/, m0 = /\d{3}/, H0 = /\d{4}/, G0 = /[+-]?\d{6}/, W0 = /\d\d?/, f0 = /\d\d\d\d?/, V0 = /\d\d\d\d\d\d?/, n1 = /\d{1,3}/, a1 = /\d{1,4}/, z1 = /[+-]?\d{1,6}/, d1 = /\d+/, K1 = /[+-]?\d+/, N1 = /Z|[+-]\d\d:?\d\d/gi, i2 = /Z|[+-]\d\d(?::?\d\d)?/gi, m2 = /[+-]?\d+(\.\d{1,3})?/, Q0 = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, X0 = /^[1-9]\d?/, B1 = /^([1-9]\d|\d)/, y2;
28851
+ var I0 = /\d/, o0 = /\d\d/, m0 = /\d{3}/, H0 = /\d{4}/, G0 = /[+-]?\d{6}/, W0 = /\d\d?/, f0 = /\d\d\d\d?/, V0 = /\d\d\d\d\d\d?/, n1 = /\d{1,3}/, a1 = /\d{1,4}/, z1 = /[+-]?\d{1,6}/, d1 = /\d+/, K1 = /[+-]?\d+/, N1 = /Z|[+-]\d\d:?\d\d/gi, i2 = /Z|[+-]\d\d(?::?\d\d)?/gi, m2 = /[+-]?\d+(\.\d{1,3})?/, Q0 = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, X0 = /^[1-9]\d?/, B1 = /^([1-9]\d|\d)/, y2;
28852
28852
  y2 = {};
28853
28853
  function O0(b, _, k) {
28854
28854
  y2[b] = w(_) ? _ : function(y, P) {
@@ -28982,7 +28982,7 @@ Arguments: ` + Array.prototype.slice.call(y).join("") + `
28982
28982
  }
28983
28983
  function Cs(b, _) {
28984
28984
  if (typeof b == "object") {
28985
- b = I0(b);
28985
+ b = T0(b);
28986
28986
  var k = F0(b), y, P = k.length;
28987
28987
  for (y = 0; y < P; y++)
28988
28988
  this[k[y].unit](b[k[y].unit]);
@@ -29653,7 +29653,7 @@ Arguments: ` + Array.prototype.slice.call(y).join("") + `
29653
29653
  }
29654
29654
  function $g(b) {
29655
29655
  if (!b._d) {
29656
- var _ = I0(b._i), k = _.day === void 0 ? _.date : _.day;
29656
+ var _ = T0(b._i), k = _.day === void 0 ? _.date : _.day;
29657
29657
  b._a = u(
29658
29658
  [_.year, _.month, k, _.hour, _.minute, _.second, _.millisecond],
29659
29659
  function(y) {
@@ -29745,7 +29745,7 @@ Arguments: ` + Array.prototype.slice.call(y).join("") + `
29745
29745
  return ve(NaN);
29746
29746
  }
29747
29747
  function Ar(b) {
29748
- var _ = I0(b), k = _.year || 0, y = _.quarter || 0, P = _.month || 0, t0 = _.week || _.isoWeek || 0, _0 = _.day || 0, D0 = _.hour || 0, r1 = _.minute || 0, g1 = _.second || 0, F2 = _.millisecond || 0;
29748
+ var _ = T0(b), k = _.year || 0, y = _.quarter || 0, P = _.month || 0, t0 = _.week || _.isoWeek || 0, _0 = _.day || 0, D0 = _.hour || 0, r1 = _.minute || 0, g1 = _.second || 0, F2 = _.millisecond || 0;
29749
29749
  this._isValid = iC(_), this._milliseconds = +F2 + g1 * 1e3 + // 1000
29750
29750
  r1 * 6e4 + // 1000 * 60
29751
29751
  D0 * 1e3 * 60 * 60, this._days = +_0 + t0 * 7, this._months = +P + y * 3 + k * 12, this._data = {}, this._locale = ct(), this._bubble();
@@ -30426,7 +30426,7 @@ Arguments: ` + Array.prototype.slice.call(y).join("") + `
30426
30426
  var t0 = Xu(b, _, k, y, P), _0 = ks(t0.year, 0, t0.dayOfYear);
30427
30427
  return this.year(_0.getUTCFullYear()), this.month(_0.getUTCMonth()), this.date(_0.getUTCDate()), this;
30428
30428
  }
30429
- U("Q", 0, "Qo", "quarter"), O0("Q", T0), c1("Q", function(b, _) {
30429
+ U("Q", 0, "Qo", "quarter"), O0("Q", I0), c1("Q", function(b, _) {
30430
30430
  _[$] = (s1(b) - 1) * 3;
30431
30431
  });
30432
30432
  function wk(b) {
@@ -30467,7 +30467,7 @@ Arguments: ` + Array.prototype.slice.call(y).join("") + `
30467
30467
  return this.millisecond() * 1e5;
30468
30468
  }), U(0, ["SSSSSSSSS", 9], 0, function() {
30469
30469
  return this.millisecond() * 1e6;
30470
- }), O0("S", n1, T0), O0("SS", n1, o0), O0("SSS", n1, m0);
30470
+ }), O0("S", n1, I0), O0("SS", n1, o0), O0("SSS", n1, m0);
30471
30471
  var Ft, O5;
30472
30472
  for (Ft = "SSSS"; Ft.length <= 9; Ft += "S")
30473
30473
  O0(Ft, d1);
@@ -36815,31 +36815,31 @@ function TV({
36815
36815
  G.current?.focus();
36816
36816
  }, 0);
36817
36817
  }
36818
- function X(T0) {
36819
- if (j.current && j.current.children.length && typeof T0 == "number") {
36820
- const o0 = j.current.children[T0]?.querySelector(".sps-clickable-tag__icon");
36818
+ function X(I0) {
36819
+ if (j.current && j.current.children.length && typeof I0 == "number") {
36820
+ const o0 = j.current.children[I0]?.querySelector(".sps-clickable-tag__icon");
36821
36821
  o0 && o0.focus();
36822
36822
  }
36823
36823
  }
36824
- function u0(T0) {
36825
- e0({ searchText: "" }), x && (x.setValue(T0), x.markAsDirty()), f && f(
36826
- new nn({ value: T0 })
36824
+ function u0(I0) {
36825
+ e0({ searchText: "" }), x && (x.setValue(I0), x.markAsDirty()), f && f(
36826
+ new nn({ value: I0 })
36827
36827
  );
36828
36828
  }
36829
- function h0(T0) {
36830
- Q.indexOf(T0) === -1 && u0([...Q, T0]), g0();
36829
+ function h0(I0) {
36830
+ Q.indexOf(I0) === -1 && u0([...Q, I0]), g0();
36831
36831
  }
36832
- function C0(T0) {
36833
- const o0 = Q.filter((m0, H0) => H0 !== T0);
36832
+ function C0(I0) {
36833
+ const o0 = Q.filter((m0, H0) => H0 !== I0);
36834
36834
  u0(o0);
36835
36835
  }
36836
- function L0(T0) {
36837
- e0({ searchText: T0.target.value });
36836
+ function L0(I0) {
36837
+ e0({ searchText: I0.target.value });
36838
36838
  }
36839
- function U0(T0) {
36839
+ function U0(I0) {
36840
36840
  if (!i) {
36841
- const o0 = !u && !T0.target.selectionStart && Q && Q.length;
36842
- switch (T0.key) {
36841
+ const o0 = !u && !I0.target.selectionStart && Q && Q.length;
36842
+ switch (I0.key) {
36843
36843
  case "Backspace":
36844
36844
  if (S.activeTagIndex === Q.length - 1) {
36845
36845
  C0(S.activeTagIndex), g0();
@@ -36864,7 +36864,7 @@ function TV({
36864
36864
  case "ArrowUp":
36865
36865
  case "Down":
36866
36866
  case "ArrowDown":
36867
- T0.preventDefault();
36867
+ I0.preventDefault();
36868
36868
  break;
36869
36869
  case "Left":
36870
36870
  case "ArrowLeft":
@@ -36890,21 +36890,21 @@ function TV({
36890
36890
  s && e0({ searchText: "" });
36891
36891
  break;
36892
36892
  }
36893
- T0.persist(), e0({ keyDown: T0 });
36893
+ I0.persist(), e0({ keyDown: I0 });
36894
36894
  }
36895
36895
  }
36896
- function o1(T0) {
36897
- e0({ opensUpward: T0 });
36896
+ function o1(I0) {
36897
+ e0({ opensUpward: I0 });
36898
36898
  }
36899
- function K0(T0) {
36900
- u0([]), T0.stopPropagation();
36899
+ function K0(I0) {
36900
+ u0([]), I0.stopPropagation();
36901
36901
  }
36902
- function j0(T0) {
36902
+ function j0(I0) {
36903
36903
  e0({
36904
- optionIds: new Array(T0).fill("").map((o0, m0) => `${Y}-options-option-${m0}`).join(",")
36904
+ optionIds: new Array(I0).fill("").map((o0, m0) => `${Y}-options-option-${m0}`).join(",")
36905
36905
  });
36906
36906
  }
36907
- const I0 = h.useCallback(() => {
36907
+ const T0 = h.useCallback(() => {
36908
36908
  e0({
36909
36909
  searchText: ""
36910
36910
  }), g0();
@@ -36915,13 +36915,13 @@ function TV({
36915
36915
  S.opensUpward && "sps-multi-select--opens-upward",
36916
36916
  i && "sps-form-control--disabled",
36917
36917
  o
36918
- ), F0 = new Array(Q.length).fill(0).map((T0, o0) => `${Y}_tag-${o0}`);
36918
+ ), F0 = new Array(Q.length).fill(0).map((I0, o0) => `${Y}_tag-${o0}`);
36919
36919
  return h.useEffect(() => {
36920
- let T0;
36921
- return l0 && (T0 = () => {
36920
+ let I0;
36921
+ return l0 && (I0 = () => {
36922
36922
  z0();
36923
- }, window.addEventListener("resize", T0)), () => {
36924
- T0 && window.removeEventListener("resize", T0);
36923
+ }, window.addEventListener("resize", I0)), () => {
36924
+ I0 && window.removeEventListener("resize", I0);
36925
36925
  };
36926
36926
  }, [l0]), er({ isOpen: l0, rootRef: a0 }), /* @__PURE__ */ h.createElement(
36927
36927
  E2,
@@ -36954,7 +36954,7 @@ function TV({
36954
36954
  )
36955
36955
  },
36956
36956
  N && /* @__PURE__ */ h.createElement("i", { className: c0("sps-text-input__icon", "sps-icon", `sps-icon-${N}`) }),
36957
- /* @__PURE__ */ h.createElement("div", { className: "sps-multi-select__tags-and-input", ref: j }, u ? null : Q.map((T0, o0) => /* @__PURE__ */ h.createElement(
36957
+ /* @__PURE__ */ h.createElement("div", { className: "sps-multi-select__tags-and-input", ref: j }, u ? null : Q.map((I0, o0) => /* @__PURE__ */ h.createElement(
36958
36958
  Wd,
36959
36959
  {
36960
36960
  id: F0[o0],
@@ -36965,7 +36965,7 @@ function TV({
36965
36965
  onRemove: () => C0(o0),
36966
36966
  wrap: I
36967
36967
  },
36968
- E ? T0[E] : T0
36968
+ E ? I0[E] : I0
36969
36969
  )), /* @__PURE__ */ h.createElement(
36970
36970
  "input",
36971
36971
  {
@@ -36991,7 +36991,7 @@ function TV({
36991
36991
  "i",
36992
36992
  {
36993
36993
  className: "sps-icon sps-icon-x-circle sps-form-control__clear-btn",
36994
- onClick: (T0) => K0(T0)
36994
+ onClick: (I0) => K0(I0)
36995
36995
  }
36996
36996
  ) : null
36997
36997
  )
@@ -37026,7 +37026,7 @@ function TV({
37026
37026
  maxHeightPx: q,
37027
37027
  maxHeightRem: B,
37028
37028
  disableOptionsMemoization: H,
37029
- onSpecialActionSelect: I0,
37029
+ onSpecialActionSelect: T0,
37030
37030
  conformWidth: a
37031
37031
  }
37032
37032
  )
@@ -48499,7 +48499,7 @@ function QG(e) {
48499
48499
  }
48500
48500
  var HG = (e) => {
48501
48501
  var t, o, n, s, a, r, i, c, l, p, d;
48502
- let { invert: u, toast: M, unstyled: f, interacting: A, setHeights: O, visibleToasts: g, heights: C, index: E, toasts: W, expanded: L, removeToast: T, defaultRichColors: F, closeButton: z, style: N, cancelButtonStyle: q, actionButtonStyle: B, className: H = "", descriptionClassName: w = "", duration: I, position: v, gap: Q, loadingIcon: x, expandByDefault: Y, classNames: J, icons: S, closeButtonAriaLabel: e0 = "Close toast", pauseWhenPageIsHidden: a0 } = e, [D, G] = r0.useState(null), [U, j] = r0.useState(null), [s0, l0] = r0.useState(!1), [k0, z0] = r0.useState(!1), [d0, g0] = r0.useState(!1), [X, u0] = r0.useState(!1), [h0, C0] = r0.useState(!1), [L0, U0] = r0.useState(0), [o1, K0] = r0.useState(0), j0 = r0.useRef(M.duration || I || _8), I0 = r0.useRef(null), N0 = r0.useRef(null), F0 = E === 0, T0 = E + 1 <= g, o0 = M.type, m0 = M.dismissible !== !1, H0 = M.className || "", G0 = M.descriptionClassName || "", W0 = r0.useMemo(() => C.findIndex((O0) => O0.toastId === M.id) || 0, [C, M.id]), f0 = r0.useMemo(() => {
48502
+ let { invert: u, toast: M, unstyled: f, interacting: A, setHeights: O, visibleToasts: g, heights: C, index: E, toasts: W, expanded: L, removeToast: T, defaultRichColors: F, closeButton: z, style: N, cancelButtonStyle: q, actionButtonStyle: B, className: H = "", descriptionClassName: w = "", duration: I, position: v, gap: Q, loadingIcon: x, expandByDefault: Y, classNames: J, icons: S, closeButtonAriaLabel: e0 = "Close toast", pauseWhenPageIsHidden: a0 } = e, [D, G] = r0.useState(null), [U, j] = r0.useState(null), [s0, l0] = r0.useState(!1), [k0, z0] = r0.useState(!1), [d0, g0] = r0.useState(!1), [X, u0] = r0.useState(!1), [h0, C0] = r0.useState(!1), [L0, U0] = r0.useState(0), [o1, K0] = r0.useState(0), j0 = r0.useRef(M.duration || I || _8), T0 = r0.useRef(null), N0 = r0.useRef(null), F0 = E === 0, I0 = E + 1 <= g, o0 = M.type, m0 = M.dismissible !== !1, H0 = M.className || "", G0 = M.descriptionClassName || "", W0 = r0.useMemo(() => C.findIndex((O0) => O0.toastId === M.id) || 0, [C, M.id]), f0 = r0.useMemo(() => {
48503
48503
  var O0;
48504
48504
  return (O0 = M.closeButton) != null ? O0 : z;
48505
48505
  }, [M.closeButton, z]), V0 = r0.useMemo(() => M.duration || I || _8, [M.duration, I]), n1 = r0.useRef(0), a1 = r0.useRef(0), z1 = r0.useRef(0), d1 = r0.useRef(null), [K1, N1] = v.split("-"), i2 = r0.useMemo(() => C.reduce((O0, k1, P1) => P1 >= W0 ? O0 : O0 + k1.height, 0), [C, W0]), m2 = wG(), Q0 = M.invert || u, X0 = o0 === "loading";
@@ -48545,15 +48545,15 @@ var HG = (e) => {
48545
48545
  var O0, k1, P1;
48546
48546
  return S != null && S.loading ? r0.createElement("div", { className: we(J?.loader, (O0 = M?.classNames) == null ? void 0 : O0.loader, "sonner-loader"), "data-visible": o0 === "loading" }, S.loading) : x ? r0.createElement("div", { className: we(J?.loader, (k1 = M?.classNames) == null ? void 0 : k1.loader, "sonner-loader"), "data-visible": o0 === "loading" }, x) : r0.createElement(OG, { className: we(J?.loader, (P1 = M?.classNames) == null ? void 0 : P1.loader), visible: o0 === "loading" });
48547
48547
  }
48548
- return r0.createElement("li", { tabIndex: 0, ref: N0, className: we(H, H0, J?.toast, (t = M?.classNames) == null ? void 0 : t.toast, J?.default, J?.[o0], (o = M?.classNames) == null ? void 0 : o[o0]), "data-sonner-toast": "", "data-rich-colors": (n = M.richColors) != null ? n : F, "data-styled": !(M.jsx || M.unstyled || f), "data-mounted": s0, "data-promise": !!M.promise, "data-swiped": h0, "data-removed": k0, "data-visible": T0, "data-y-position": K1, "data-x-position": N1, "data-index": E, "data-front": F0, "data-swiping": d0, "data-dismissible": m0, "data-type": o0, "data-invert": Q0, "data-swipe-out": X, "data-swipe-direction": U, "data-expanded": !!(L || Y && s0), style: { "--index": E, "--toasts-before": E, "--z-index": W.length - E, "--offset": `${k0 ? L0 : a1.current}px`, "--initial-height": Y ? "auto" : `${o1}px`, ...N, ...M.style }, onDragEnd: () => {
48548
+ return r0.createElement("li", { tabIndex: 0, ref: N0, className: we(H, H0, J?.toast, (t = M?.classNames) == null ? void 0 : t.toast, J?.default, J?.[o0], (o = M?.classNames) == null ? void 0 : o[o0]), "data-sonner-toast": "", "data-rich-colors": (n = M.richColors) != null ? n : F, "data-styled": !(M.jsx || M.unstyled || f), "data-mounted": s0, "data-promise": !!M.promise, "data-swiped": h0, "data-removed": k0, "data-visible": I0, "data-y-position": K1, "data-x-position": N1, "data-index": E, "data-front": F0, "data-swiping": d0, "data-dismissible": m0, "data-type": o0, "data-invert": Q0, "data-swipe-out": X, "data-swipe-direction": U, "data-expanded": !!(L || Y && s0), style: { "--index": E, "--toasts-before": E, "--z-index": W.length - E, "--offset": `${k0 ? L0 : a1.current}px`, "--initial-height": Y ? "auto" : `${o1}px`, ...N, ...M.style }, onDragEnd: () => {
48549
48549
  g0(!1), G(null), d1.current = null;
48550
48550
  }, onPointerDown: (O0) => {
48551
- X0 || !m0 || (I0.current = /* @__PURE__ */ new Date(), U0(a1.current), O0.target.setPointerCapture(O0.pointerId), O0.target.tagName !== "BUTTON" && (g0(!0), d1.current = { x: O0.clientX, y: O0.clientY }));
48551
+ X0 || !m0 || (T0.current = /* @__PURE__ */ new Date(), U0(a1.current), O0.target.setPointerCapture(O0.pointerId), O0.target.tagName !== "BUTTON" && (g0(!0), d1.current = { x: O0.clientX, y: O0.clientY }));
48552
48552
  }, onPointerUp: () => {
48553
48553
  var O0, k1, P1, t2;
48554
48554
  if (X || !m0) return;
48555
48555
  d1.current = null;
48556
- let j1 = Number(((O0 = N0.current) == null ? void 0 : O0.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), s1 = Number(((k1 = N0.current) == null ? void 0 : k1.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), G2 = (/* @__PURE__ */ new Date()).getTime() - ((P1 = I0.current) == null ? void 0 : P1.getTime()), c1 = D === "x" ? j1 : s1, R2 = Math.abs(c1) / G2;
48556
+ let j1 = Number(((O0 = N0.current) == null ? void 0 : O0.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), s1 = Number(((k1 = N0.current) == null ? void 0 : k1.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), G2 = (/* @__PURE__ */ new Date()).getTime() - ((P1 = T0.current) == null ? void 0 : P1.getTime()), c1 = D === "x" ? j1 : s1, R2 = Math.abs(c1) / G2;
48557
48557
  if (Math.abs(c1) >= PG || R2 > 0.11) {
48558
48558
  U0(a1.current), (t2 = M.onDismiss) == null || t2.call(M, M), j(D === "x" ? j1 > 0 ? "right" : "left" : s1 > 0 ? "down" : "up"), B1(), u0(!0), C0(!1);
48559
48559
  return;
@@ -56660,14 +56660,14 @@ function C00(e) {
56660
56660
  listItemValue: u,
56661
56661
  listOrdered: a(K0, d),
56662
56662
  listUnordered: a(K0),
56663
- paragraph: a(I0),
56663
+ paragraph: a(T0),
56664
56664
  reference: D,
56665
56665
  referenceString: r,
56666
56666
  resourceDestinationString: r,
56667
56667
  resourceTitleString: r,
56668
56668
  setextHeading: a(h0),
56669
56669
  strong: a(N0),
56670
- thematicBreak: a(T0)
56670
+ thematicBreak: a(I0)
56671
56671
  },
56672
56672
  exit: {
56673
56673
  atxHeading: c(),
@@ -57114,7 +57114,7 @@ function C00(e) {
57114
57114
  children: []
57115
57115
  };
57116
57116
  }
57117
- function I0() {
57117
+ function T0() {
57118
57118
  return {
57119
57119
  type: "paragraph",
57120
57120
  children: []
@@ -57132,7 +57132,7 @@ function C00(e) {
57132
57132
  value: ""
57133
57133
  };
57134
57134
  }
57135
- function T0() {
57135
+ function I0() {
57136
57136
  return {
57137
57137
  type: "thematicBreak"
57138
57138
  };
@@ -68610,7 +68610,7 @@ function na0({
68610
68610
  [i, B, C0]
68611
68611
  ), j0 = h.useCallback(() => {
68612
68612
  Da.clarity.setEvent("View conversation list"), D || w(), G((f0) => !f0);
68613
- }, [w, D]), I0 = h.useCallback(() => {
68613
+ }, [w, D]), T0 = h.useCallback(() => {
68614
68614
  r(), a0(!1);
68615
68615
  }, [r]), N0 = h.useCallback(() => {
68616
68616
  Da.clarity.setEvent("Start new conversation"), G(!1), q();
@@ -68618,7 +68618,7 @@ function na0({
68618
68618
  if (!a || !i) return !1;
68619
68619
  const f0 = H.find((V0) => V0.id === i);
68620
68620
  return f0 ? f0.initiatedByCurrentUser === !1 : !1;
68621
- }, [a, i, H]), T0 = h.useMemo(
68621
+ }, [a, i, H]), I0 = h.useMemo(
68622
68622
  () => a ? /* @__PURE__ */ i0.jsx("div", { className: "obo-banner", children: /* @__PURE__ */ i0.jsx(Ln, { kind: "warning", children: S("oboBannerMessage", {
68623
68623
  defaultValue: "You are acting on behalf of a customer. Messages sent will not be visible to them."
68624
68624
  }) }) }) : null,
@@ -68660,7 +68660,7 @@ function na0({
68660
68660
  closePanelLabel: G0,
68661
68661
  onToggleConversationList: j0,
68662
68662
  onStartNewConversation: N0,
68663
- onClosePanel: I0
68663
+ onClosePanel: T0
68664
68664
  }
68665
68665
  )
68666
68666
  ] }),
@@ -68691,24 +68691,21 @@ function na0({
68691
68691
  closePanelLabel: G0,
68692
68692
  onToggleConversationList: j0,
68693
68693
  onStartNewConversation: N0,
68694
- onClosePanel: I0
68694
+ onClosePanel: T0
68695
68695
  }
68696
68696
  )
68697
68697
  ] }),
68698
- D ? /* @__PURE__ */ i0.jsxs(i0.Fragment, { children: [
68699
- T0,
68700
- /* @__PURE__ */ i0.jsx(
68701
- eZ,
68702
- {
68703
- conversations: H,
68704
- setShowConversationList: G,
68705
- onLoadConversation: K0,
68706
- onRefreshConversationList: w,
68707
- onLoading: C,
68708
- isInCustomerView: a
68709
- }
68710
- )
68711
- ] }) : /* @__PURE__ */ i0.jsxs(i0.Fragment, { children: [
68698
+ D ? /* @__PURE__ */ i0.jsx(i0.Fragment, { children: /* @__PURE__ */ i0.jsx(
68699
+ eZ,
68700
+ {
68701
+ conversations: H,
68702
+ setShowConversationList: G,
68703
+ onLoadConversation: K0,
68704
+ onRefreshConversationList: w,
68705
+ onLoading: C,
68706
+ isInCustomerView: a
68707
+ }
68708
+ ) }) : /* @__PURE__ */ i0.jsxs(i0.Fragment, { children: [
68712
68709
  /* @__PURE__ */ i0.jsxs(
68713
68710
  "div",
68714
68711
  {
@@ -68840,7 +68837,7 @@ function na0({
68840
68837
  }
68841
68838
  ),
68842
68839
  /* @__PURE__ */ i0.jsxs("div", { className: "message-section", children: [
68843
- T0,
68840
+ I0,
68844
68841
  l === "restricted" && /* @__PURE__ */ i0.jsx(Ln, { kind: "error", children: S("restrictedErrorMessage", {
68845
68842
  defaultValue: "I want to flag that this request isn't something I can help with. Repeated requests like this may affect your account."
68846
68843
  }) }),