@connorpham/live-chat-widget 17.0.5 → 17.0.7

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.
@@ -115,14 +115,14 @@ function l0() {
115
115
  var q = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
116
116
  function g(i) {
117
117
  {
118
- for (var b = arguments.length, w = new Array(b > 1 ? b - 1 : 0), L = 1; L < b; L++)
119
- w[L - 1] = arguments[L];
118
+ for (var b = arguments.length, w = new Array(b > 1 ? b - 1 : 0), $ = 1; $ < b; $++)
119
+ w[$ - 1] = arguments[$];
120
120
  O("error", i, w);
121
121
  }
122
122
  }
123
123
  function O(i, b, w) {
124
124
  {
125
- var L = q.ReactDebugCurrentFrame, G = L.getStackAddendum();
125
+ var $ = q.ReactDebugCurrentFrame, G = $.getStackAddendum();
126
126
  G !== "" && (b += "%s", w = w.concat([G]));
127
127
  var K = w.map(function(Y) {
128
128
  return "" + Y;
@@ -130,13 +130,13 @@ function l0() {
130
130
  K.unshift("Warning: " + b), Function.prototype.apply.call(console[i], console, K);
131
131
  }
132
132
  }
133
- var $ = !1;
133
+ var L = !1;
134
134
  function hu(i) {
135
- return !!(typeof i == "string" || typeof i == "function" || i === u.Fragment || i === s || i === m || i === r || i === c || i === l || i === T || $ || typeof i == "object" && i !== null && (i.$$typeof === y || i.$$typeof === j || i.$$typeof === F || i.$$typeof === d || i.$$typeof === o || i.$$typeof === x || i.$$typeof === C || i[0] === v));
135
+ return !!(typeof i == "string" || typeof i == "function" || i === u.Fragment || i === s || i === m || i === r || i === c || i === l || i === T || L || typeof i == "object" && i !== null && (i.$$typeof === y || i.$$typeof === j || i.$$typeof === F || i.$$typeof === d || i.$$typeof === o || i.$$typeof === x || i.$$typeof === C || i[0] === v));
136
136
  }
137
137
  function fu(i, b, w) {
138
- var L = b.displayName || b.name || "";
139
- return i.displayName || (L !== "" ? w + "(" + L + ")" : w);
138
+ var $ = b.displayName || b.name || "";
139
+ return i.displayName || ($ !== "" ? w + "(" + $ + ")" : w);
140
140
  }
141
141
  function k(i) {
142
142
  return i.displayName || "Context";
@@ -177,7 +177,7 @@ function l0() {
177
177
  case C:
178
178
  return E(i._render);
179
179
  case y: {
180
- var L = i, G = L._payload, K = L._init;
180
+ var $ = i, G = $._payload, K = $._init;
181
181
  try {
182
182
  return E(K(G));
183
183
  } catch {
@@ -249,39 +249,39 @@ function l0() {
249
249
  h < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
250
250
  }
251
251
  }
252
- var cu = q.ReactCurrentDispatcher, _u;
252
+ var Cu = q.ReactCurrentDispatcher, _u;
253
253
  function Bu(i, b, w) {
254
254
  {
255
255
  if (_u === void 0)
256
256
  try {
257
257
  throw Error();
258
258
  } catch (G) {
259
- var L = G.stack.trim().match(/\n( *(at )?)/);
260
- _u = L && L[1] || "";
259
+ var $ = G.stack.trim().match(/\n( *(at )?)/);
260
+ _u = $ && $[1] || "";
261
261
  }
262
262
  return `
263
263
  ` + _u + i;
264
264
  }
265
265
  }
266
- var ru = !1, du;
266
+ var ru = !1, ou;
267
267
  {
268
268
  var Pu = typeof WeakMap == "function" ? WeakMap : Map;
269
- du = new Pu();
269
+ ou = new Pu();
270
270
  }
271
271
  function Iu(i, b) {
272
272
  if (!i || ru)
273
273
  return "";
274
274
  {
275
- var w = du.get(i);
275
+ var w = ou.get(i);
276
276
  if (w !== void 0)
277
277
  return w;
278
278
  }
279
- var L;
279
+ var $;
280
280
  ru = !0;
281
281
  var G = Error.prepareStackTrace;
282
282
  Error.prepareStackTrace = void 0;
283
283
  var K;
284
- K = cu.current, cu.current = null, Q();
284
+ K = Cu.current, Cu.current = null, Q();
285
285
  try {
286
286
  if (b) {
287
287
  var Y = function() {
@@ -294,50 +294,50 @@ function l0() {
294
294
  }), typeof Reflect == "object" && Reflect.construct) {
295
295
  try {
296
296
  Reflect.construct(Y, []);
297
- } catch ($u) {
298
- L = $u;
297
+ } catch (Lu) {
298
+ $ = Lu;
299
299
  }
300
300
  Reflect.construct(i, [], Y);
301
301
  } else {
302
302
  try {
303
303
  Y.call();
304
- } catch ($u) {
305
- L = $u;
304
+ } catch (Lu) {
305
+ $ = Lu;
306
306
  }
307
307
  i.call(Y.prototype);
308
308
  }
309
309
  } else {
310
310
  try {
311
311
  throw Error();
312
- } catch ($u) {
313
- L = $u;
312
+ } catch (Lu) {
313
+ $ = Lu;
314
314
  }
315
315
  i();
316
316
  }
317
- } catch ($u) {
318
- if ($u && L && typeof $u.stack == "string") {
319
- for (var H = $u.stack.split(`
320
- `), bu = L.stack.split(`
321
- `), nu = H.length - 1, su = bu.length - 1; nu >= 1 && su >= 0 && H[nu] !== bu[su]; )
322
- su--;
323
- for (; nu >= 1 && su >= 0; nu--, su--)
324
- if (H[nu] !== bu[su]) {
325
- if (nu !== 1 || su !== 1)
317
+ } catch (Lu) {
318
+ if (Lu && $ && typeof Lu.stack == "string") {
319
+ for (var H = Lu.stack.split(`
320
+ `), bu = $.stack.split(`
321
+ `), nu = H.length - 1, au = bu.length - 1; nu >= 1 && au >= 0 && H[nu] !== bu[au]; )
322
+ au--;
323
+ for (; nu >= 1 && au >= 0; nu--, au--)
324
+ if (H[nu] !== bu[au]) {
325
+ if (nu !== 1 || au !== 1)
326
326
  do
327
- if (nu--, su--, su < 0 || H[nu] !== bu[su]) {
328
- var Lu = `
327
+ if (nu--, au--, au < 0 || H[nu] !== bu[au]) {
328
+ var $u = `
329
329
  ` + H[nu].replace(" at new ", " at ");
330
- return typeof i == "function" && du.set(i, Lu), Lu;
330
+ return typeof i == "function" && ou.set(i, $u), $u;
331
331
  }
332
- while (nu >= 1 && su >= 0);
332
+ while (nu >= 1 && au >= 0);
333
333
  break;
334
334
  }
335
335
  }
336
336
  } finally {
337
- ru = !1, cu.current = K, tu(), Error.prepareStackTrace = G;
337
+ ru = !1, Cu.current = K, tu(), Error.prepareStackTrace = G;
338
338
  }
339
339
  var fD = i ? i.displayName || i.name : "", Nf = fD ? Bu(fD) : "";
340
- return typeof i == "function" && du.set(i, Nf), Nf;
340
+ return typeof i == "function" && ou.set(i, Nf), Nf;
341
341
  }
342
342
  function S(i, b, w) {
343
343
  return Iu(i, !1);
@@ -346,7 +346,7 @@ function l0() {
346
346
  var b = i.prototype;
347
347
  return !!(b && b.isReactComponent);
348
348
  }
349
- function au(i, b, w) {
349
+ function cu(i, b, w) {
350
350
  if (i == null)
351
351
  return "";
352
352
  if (typeof i == "function")
@@ -364,13 +364,13 @@ function l0() {
364
364
  case o:
365
365
  return S(i.render);
366
366
  case j:
367
- return au(i.type, b, w);
367
+ return cu(i.type, b, w);
368
368
  case C:
369
369
  return S(i._render);
370
370
  case y: {
371
- var L = i, G = L._payload, K = L._init;
371
+ var $ = i, G = $._payload, K = $._init;
372
372
  try {
373
- return au(K(G), b, w);
373
+ return cu(K(G), b, w);
374
374
  } catch {
375
375
  }
376
376
  }
@@ -380,12 +380,12 @@ function l0() {
380
380
  var lu = {}, gu = q.ReactDebugCurrentFrame;
381
381
  function Uu(i) {
382
382
  if (i) {
383
- var b = i._owner, w = au(i.type, i._source, b ? b.type : null);
383
+ var b = i._owner, w = cu(i.type, i._source, b ? b.type : null);
384
384
  gu.setExtraStackFrame(w);
385
385
  } else
386
386
  gu.setExtraStackFrame(null);
387
387
  }
388
- function K1(i, b, w, L, G) {
388
+ function K1(i, b, w, $, G) {
389
389
  {
390
390
  var K = Function.call.bind(Object.prototype.hasOwnProperty);
391
391
  for (var Y in i)
@@ -393,14 +393,14 @@ function l0() {
393
393
  var H = void 0;
394
394
  try {
395
395
  if (typeof i[Y] != "function") {
396
- var bu = Error((L || "React class") + ": " + w + " type `" + Y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[Y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
396
+ var bu = Error(($ || "React class") + ": " + w + " type `" + Y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[Y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
397
397
  throw bu.name = "Invariant Violation", bu;
398
398
  }
399
- H = i[Y](b, Y, L, w, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
399
+ H = i[Y](b, Y, $, w, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
400
400
  } catch (nu) {
401
401
  H = nu;
402
402
  }
403
- H && !(H instanceof Error) && (Uu(G), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", L || "React class", w, Y, typeof H), Uu(null)), H instanceof Error && !(H.message in lu) && (lu[H.message] = !0, Uu(G), g("Failed %s type: %s", w, H.message), Uu(null));
403
+ H && !(H instanceof Error) && (Uu(G), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", $ || "React class", w, Y, typeof H), Uu(null)), H instanceof Error && !(H.message in lu) && (lu[H.message] = !0, Uu(G), g("Failed %s type: %s", w, H.message), Uu(null));
404
404
  }
405
405
  }
406
406
  }
@@ -451,7 +451,7 @@ function l0() {
451
451
  });
452
452
  }
453
453
  }
454
- var D0 = function(i, b, w, L, G, K, Y) {
454
+ var D0 = function(i, b, w, $, G, K, Y) {
455
455
  var H = {
456
456
  // This tag allows us to uniquely identify this as a React Element
457
457
  $$typeof: t,
@@ -472,7 +472,7 @@ function l0() {
472
472
  configurable: !1,
473
473
  enumerable: !1,
474
474
  writable: !1,
475
- value: L
475
+ value: $
476
476
  }), Object.defineProperty(H, "_source", {
477
477
  configurable: !1,
478
478
  enumerable: !1,
@@ -480,7 +480,7 @@ function l0() {
480
480
  value: G
481
481
  }), Object.freeze && (Object.freeze(H.props), Object.freeze(H)), H;
482
482
  };
483
- function f0(i, b, w, L, G) {
483
+ function f0(i, b, w, $, G) {
484
484
  {
485
485
  var K, Y = {}, H = null, bu = null;
486
486
  w !== void 0 && (H = "" + w), X1(b) && (H = "" + b.key), G1(b) && (bu = b.ref, Z1(b, G));
@@ -492,16 +492,16 @@ function l0() {
492
492
  Y[K] === void 0 && (Y[K] = nu[K]);
493
493
  }
494
494
  if (H || bu) {
495
- var su = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
496
- H && Q1(Y, su), bu && u0(Y, su);
495
+ var au = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
496
+ H && Q1(Y, au), bu && u0(Y, au);
497
497
  }
498
- return D0(i, H, bu, G, L, yf.current, Y);
498
+ return D0(i, H, bu, G, $, yf.current, Y);
499
499
  }
500
500
  }
501
501
  var ND = q.ReactCurrentOwner, Af = q.ReactDebugCurrentFrame;
502
502
  function DD(i) {
503
503
  if (i) {
504
- var b = i._owner, w = au(i.type, i._source, b ? b.type : null);
504
+ var b = i._owner, w = cu(i.type, i._source, b ? b.type : null);
505
505
  Af.setExtraStackFrame(w);
506
506
  } else
507
507
  Af.setExtraStackFrame(null);
@@ -548,8 +548,8 @@ Check the top-level render call using <` + w + ">.");
548
548
  if (kf[w])
549
549
  return;
550
550
  kf[w] = !0;
551
- var L = "";
552
- i && i._owner && i._owner !== ND.current && (L = " It was passed a child from " + E(i._owner.type) + "."), DD(i), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', w, L), DD(null);
551
+ var $ = "";
552
+ i && i._owner && i._owner !== ND.current && ($ = " It was passed a child from " + E(i._owner.type) + "."), DD(i), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', w, $), DD(null);
553
553
  }
554
554
  }
555
555
  function Sf(i, b) {
@@ -558,8 +558,8 @@ Check the top-level render call using <` + w + ">.");
558
558
  return;
559
559
  if (Array.isArray(i))
560
560
  for (var w = 0; w < i.length; w++) {
561
- var L = i[w];
562
- RD(L) && jf(L, b);
561
+ var $ = i[w];
562
+ RD($) && jf($, b);
563
563
  }
564
564
  else if (RD(i))
565
565
  i._store && (i._store.validated = !0);
@@ -586,8 +586,8 @@ Check the top-level render call using <` + w + ">.");
586
586
  else
587
587
  return;
588
588
  if (w) {
589
- var L = E(b);
590
- K1(w, i.props, "prop", L, i);
589
+ var $ = E(b);
590
+ K1(w, i.props, "prop", $, i);
591
591
  } else if (b.PropTypes !== void 0 && !OD) {
592
592
  OD = !0;
593
593
  var G = E(b);
@@ -599,16 +599,16 @@ Check the top-level render call using <` + w + ">.");
599
599
  function r0(i) {
600
600
  {
601
601
  for (var b = Object.keys(i.props), w = 0; w < b.length; w++) {
602
- var L = b[w];
603
- if (L !== "children" && L !== "key") {
604
- DD(i), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", L), DD(null);
602
+ var $ = b[w];
603
+ if ($ !== "children" && $ !== "key") {
604
+ DD(i), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), DD(null);
605
605
  break;
606
606
  }
607
607
  }
608
608
  i.ref !== null && (DD(i), g("Invalid attribute `ref` supplied to `React.Fragment`."), DD(null));
609
609
  }
610
610
  }
611
- function Tf(i, b, w, L, G, K) {
611
+ function Tf(i, b, w, $, G, K) {
612
612
  {
613
613
  var Y = hu(i);
614
614
  if (!Y) {
@@ -619,23 +619,23 @@ Check the top-level render call using <` + w + ">.");
619
619
  var nu;
620
620
  i === null ? nu = "null" : Array.isArray(i) ? nu = "array" : i !== void 0 && i.$$typeof === t ? (nu = "<" + (E(i.type) || "Unknown") + " />", H = " Did you accidentally export a JSX literal instead of a component?") : nu = typeof i, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", nu, H);
621
621
  }
622
- var su = f0(i, b, w, G, K);
623
- if (su == null)
624
- return su;
622
+ var au = f0(i, b, w, G, K);
623
+ if (au == null)
624
+ return au;
625
625
  if (Y) {
626
- var Lu = b.children;
627
- if (Lu !== void 0)
628
- if (L)
629
- if (Array.isArray(Lu)) {
630
- for (var fD = 0; fD < Lu.length; fD++)
631
- Sf(Lu[fD], i);
632
- Object.freeze && Object.freeze(Lu);
626
+ var $u = b.children;
627
+ if ($u !== void 0)
628
+ if ($)
629
+ if (Array.isArray($u)) {
630
+ for (var fD = 0; fD < $u.length; fD++)
631
+ Sf($u[fD], i);
632
+ Object.freeze && Object.freeze($u);
633
633
  } else
634
634
  g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
635
635
  else
636
- Sf(Lu, i);
636
+ Sf($u, i);
637
637
  }
638
- return i === u.Fragment ? r0(su) : n0(su), su;
638
+ return i === u.Fragment ? r0(au) : n0(au), au;
639
639
  }
640
640
  }
641
641
  function a0(i, b, w) {
@@ -810,7 +810,7 @@ function j0(u) {
810
810
  const D = sessionStorage.getItem(u);
811
811
  return D === null ? null : JSON.parse(D);
812
812
  }
813
- const Lf = { setItem: k0, getItem: j0 }, Tu = /* @__PURE__ */ Object.create(null);
813
+ const $f = { setItem: k0, getItem: j0 }, Tu = /* @__PURE__ */ Object.create(null);
814
814
  Tu.open = "0";
815
815
  Tu.close = "1";
816
816
  Tu.ping = "2";
@@ -822,7 +822,7 @@ const pD = /* @__PURE__ */ Object.create(null);
822
822
  Object.keys(Tu).forEach((u) => {
823
823
  pD[Tu[u]] = u;
824
824
  });
825
- const JD = { type: "error", data: "parser error" }, r1 = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", a1 = typeof ArrayBuffer == "function", s1 = (u) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(u) : u && u.buffer instanceof ArrayBuffer, of = ({ type: u, data: D }, f, e) => r1 && D instanceof Blob ? f ? e(D) : $f(D, e) : a1 && (D instanceof ArrayBuffer || s1(D)) ? f ? e(D) : $f(new Blob([D]), e) : e(Tu[u] + (D || "")), $f = (u, D) => {
825
+ const JD = { type: "error", data: "parser error" }, r1 = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", a1 = typeof ArrayBuffer == "function", s1 = (u) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(u) : u && u.buffer instanceof ArrayBuffer, of = ({ type: u, data: D }, f, e) => r1 && D instanceof Blob ? f ? e(D) : Lf(D, e) : a1 && (D instanceof ArrayBuffer || s1(D)) ? f ? e(D) : Lf(new Blob([D]), e) : e(Tu[u] + (D || "")), Lf = (u, D) => {
826
826
  const f = new FileReader();
827
827
  return f.onload = function() {
828
828
  const e = f.result.split(",")[1];
@@ -832,14 +832,14 @@ const JD = { type: "error", data: "parser error" }, r1 = typeof Blob == "functio
832
832
  function Mf(u) {
833
833
  return u instanceof Uint8Array ? u : u instanceof ArrayBuffer ? new Uint8Array(u) : new Uint8Array(u.buffer, u.byteOffset, u.byteLength);
834
834
  }
835
- let LD;
835
+ let $D;
836
836
  function S0(u, D) {
837
837
  if (r1 && u.data instanceof Blob)
838
838
  return u.data.arrayBuffer().then(Mf).then(D);
839
839
  if (a1 && (u.data instanceof ArrayBuffer || s1(u.data)))
840
840
  return D(Mf(u.data));
841
841
  of(u, !1, (f) => {
842
- LD || (LD = new TextEncoder()), D(LD.encode(f));
842
+ $D || ($D = new TextEncoder()), D($D.encode(f));
843
843
  });
844
844
  }
845
845
  const qf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", FD = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
@@ -921,7 +921,7 @@ function I0() {
921
921
  }
922
922
  });
923
923
  }
924
- let $D;
924
+ let LD;
925
925
  function ED(u) {
926
926
  return u.reduce((D, f) => D + f.length, 0);
927
927
  }
@@ -934,8 +934,8 @@ function hD(u, D) {
934
934
  f[t] = u[0][e++], e === u[0].length && (u.shift(), e = 0);
935
935
  return u.length && e < u[0].length && (u[0] = u[0].slice(e)), f;
936
936
  }
937
- function L0(u, D) {
938
- $D || ($D = new TextDecoder());
937
+ function $0(u, D) {
938
+ LD || (LD = new TextDecoder());
939
939
  const f = [];
940
940
  let e = 0, t = -1, n = !1;
941
941
  return new TransformStream({
@@ -964,7 +964,7 @@ function L0(u, D) {
964
964
  if (ED(f) < t)
965
965
  break;
966
966
  const F = hD(f, t);
967
- s.enqueue(df(n ? F : $D.decode(F), D)), e = 0;
967
+ s.enqueue(df(n ? F : LD.decode(F), D)), e = 0;
968
968
  }
969
969
  if (t === 0 || t > u) {
970
970
  s.enqueue(JD);
@@ -975,24 +975,24 @@ function L0(u, D) {
975
975
  });
976
976
  }
977
977
  const o1 = 4;
978
- function Fu(u) {
979
- if (u) return $0(u);
978
+ function su(u) {
979
+ if (u) return L0(u);
980
980
  }
981
- function $0(u) {
982
- for (var D in Fu.prototype)
983
- u[D] = Fu.prototype[D];
981
+ function L0(u) {
982
+ for (var D in su.prototype)
983
+ u[D] = su.prototype[D];
984
984
  return u;
985
985
  }
986
- Fu.prototype.on = Fu.prototype.addEventListener = function(u, D) {
986
+ su.prototype.on = su.prototype.addEventListener = function(u, D) {
987
987
  return this._callbacks = this._callbacks || {}, (this._callbacks["$" + u] = this._callbacks["$" + u] || []).push(D), this;
988
988
  };
989
- Fu.prototype.once = function(u, D) {
989
+ su.prototype.once = function(u, D) {
990
990
  function f() {
991
991
  this.off(u, f), D.apply(this, arguments);
992
992
  }
993
993
  return f.fn = D, this.on(u, f), this;
994
994
  };
995
- Fu.prototype.off = Fu.prototype.removeListener = Fu.prototype.removeAllListeners = Fu.prototype.removeEventListener = function(u, D) {
995
+ su.prototype.off = su.prototype.removeListener = su.prototype.removeAllListeners = su.prototype.removeEventListener = function(u, D) {
996
996
  if (this._callbacks = this._callbacks || {}, arguments.length == 0)
997
997
  return this._callbacks = {}, this;
998
998
  var f = this._callbacks["$" + u];
@@ -1006,7 +1006,7 @@ Fu.prototype.off = Fu.prototype.removeListener = Fu.prototype.removeAllListeners
1006
1006
  }
1007
1007
  return f.length === 0 && delete this._callbacks["$" + u], this;
1008
1008
  };
1009
- Fu.prototype.emit = function(u) {
1009
+ su.prototype.emit = function(u) {
1010
1010
  this._callbacks = this._callbacks || {};
1011
1011
  for (var D = new Array(arguments.length - 1), f = this._callbacks["$" + u], e = 1; e < arguments.length; e++)
1012
1012
  D[e - 1] = arguments[e];
@@ -1017,11 +1017,11 @@ Fu.prototype.emit = function(u) {
1017
1017
  }
1018
1018
  return this;
1019
1019
  };
1020
- Fu.prototype.emitReserved = Fu.prototype.emit;
1021
- Fu.prototype.listeners = function(u) {
1020
+ su.prototype.emitReserved = su.prototype.emit;
1021
+ su.prototype.listeners = function(u) {
1022
1022
  return this._callbacks = this._callbacks || {}, this._callbacks["$" + u] || [];
1023
1023
  };
1024
- Fu.prototype.hasListeners = function(u) {
1024
+ su.prototype.hasListeners = function(u) {
1025
1025
  return !!this.listeners(u).length;
1026
1026
  };
1027
1027
  const AD = typeof Promise == "function" && typeof Promise.resolve == "function" ? (D) => Promise.resolve().then(D) : (D, f) => f(D, 0), vu = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(), M0 = "arraybuffer";
@@ -1064,7 +1064,7 @@ class K0 extends Error {
1064
1064
  super(D), this.description = f, this.context = e, this.type = "TransportError";
1065
1065
  }
1066
1066
  }
1067
- class Cf extends Fu {
1067
+ class Cf extends su {
1068
1068
  /**
1069
1069
  * Transport abstract constructor.
1070
1070
  *
@@ -1304,7 +1304,7 @@ class Z0 extends J0 {
1304
1304
  }), this.pollXhr = D;
1305
1305
  }
1306
1306
  }
1307
- class ju extends Fu {
1307
+ class ju extends su {
1308
1308
  /**
1309
1309
  * Request constructor
1310
1310
  *
@@ -1526,7 +1526,7 @@ class ee extends Cf {
1526
1526
  this.onError("webtransport error", D);
1527
1527
  }), this._transport.ready.then(() => {
1528
1528
  this._transport.createBidirectionalStream().then((D) => {
1529
- const f = L0(Number.MAX_SAFE_INTEGER, this.socket.binaryType), e = D.readable.pipeThrough(f).getReader(), t = I0();
1529
+ const f = $0(Number.MAX_SAFE_INTEGER, this.socket.binaryType), e = D.readable.pipeThrough(f).getReader(), t = I0();
1530
1530
  t.readable.pipeTo(D.writable), this._writer = t.writable.getWriter();
1531
1531
  const n = () => {
1532
1532
  e.read().then(({ done: s, value: F }) => {
@@ -1600,7 +1600,7 @@ const XD = typeof addEventListener == "function" && typeof removeEventListener =
1600
1600
  XD && addEventListener("offline", () => {
1601
1601
  BD.forEach((u) => u());
1602
1602
  }, !1);
1603
- class Vu extends Fu {
1603
+ class Vu extends su {
1604
1604
  /**
1605
1605
  * Socket constructor.
1606
1606
  *
@@ -2074,7 +2074,7 @@ class Be {
2074
2074
  function Uf(u) {
2075
2075
  return Object.prototype.toString.call(u) === "[object Object]";
2076
2076
  }
2077
- class lf extends Fu {
2077
+ class lf extends su {
2078
2078
  /**
2079
2079
  * Decoder constructor
2080
2080
  *
@@ -2235,7 +2235,7 @@ const _e = Object.freeze({
2235
2235
  newListener: 1,
2236
2236
  removeListener: 1
2237
2237
  });
2238
- class b1 extends Fu {
2238
+ class b1 extends su {
2239
2239
  /**
2240
2240
  * `Socket` constructor.
2241
2241
  */
@@ -2850,7 +2850,7 @@ nD.prototype.setMax = function(u) {
2850
2850
  nD.prototype.setJitter = function(u) {
2851
2851
  this.jitter = u;
2852
2852
  };
2853
- class uf extends Fu {
2853
+ class uf extends su {
2854
2854
  constructor(D, f) {
2855
2855
  var e;
2856
2856
  super(), this.nsps = {}, this.subs = [], D && typeof D == "object" && (f = D, D = void 0), f = f || {}, f.path = f.path || "/socket.io", this.opts = f, xD(this, f), this.reconnection(f.reconnection !== !1), this.reconnectionAttempts(f.reconnectionAttempts || 1 / 0), this.reconnectionDelay(f.reconnectionDelay || 1e3), this.reconnectionDelayMax(f.reconnectionDelayMax || 5e3), this.randomizationFactor((e = f.randomizationFactor) !== null && e !== void 0 ? e : 0.5), this.backoff = new nD({
@@ -3321,10 +3321,10 @@ const xe = (u, D) => {
3321
3321
  }, g1 = qu(_D), m1 = ({
3322
3322
  children: u
3323
3323
  }) => {
3324
- const { t: D } = zu(), f = Lf.getItem("settings"), [e, t] = U(
3324
+ const { t: D } = zu(), f = $f.getItem("settings"), [e, t] = U(
3325
3325
  f || _D
3326
3326
  ), n = Mu((r) => {
3327
- Lf.setItem("settings", r), t(r);
3327
+ $f.setItem("settings", r), t(r);
3328
3328
  }, []);
3329
3329
  return ff("settings", (r) => {
3330
3330
  var s;
@@ -3461,13 +3461,13 @@ const xe = (u, D) => {
3461
3461
  yu.suggestions
3462
3462
  ), [P, q] = U(
3463
3463
  yu.newIOMessage
3464
- ), [g, O] = U(yu.message), [$, hu] = U(yu.outgoingMessageState), [fu, k] = U(yu.payload), [E, h] = U(yu.file), [A, p] = U(yu.webviewUrl), [R, N] = U(
3464
+ ), [g, O] = U(yu.message), [L, hu] = U(yu.outgoingMessageState), [fu, k] = U(yu.payload), [E, h] = U(yu.file), [A, p] = U(yu.webviewUrl), [R, N] = U(
3465
3465
  yu.isContactFormActive
3466
3466
  ), [M, V] = U(
3467
3467
  yu.isOfflineMode
3468
- ), { send: J } = Cu(), { t: z } = zu(), Q = (S) => {
3468
+ ), { send: J } = du(), { t: z } = zu(), Q = (S) => {
3469
3469
  y(S), S === tD.wantToConnect && u && u(), S === tD.connected && t.alwaysScrollToBottom && s(101);
3470
- }, tu = t.offline_mode, cu = kD(tu), _u = (S) => {
3470
+ }, tu = t.offline_mode, Cu = kD(tu), _u = (S) => {
3471
3471
  if (q(S), X.setItem(
3472
3472
  "isOffline",
3473
3473
  (S == null ? void 0 : S.isOffline) || !1
@@ -3477,7 +3477,7 @@ const xe = (u, D) => {
3477
3477
  ), S && "type" in S && S.type === "typing")
3478
3478
  return T === !0;
3479
3479
  _(!1), S && "mid" in S && !C.find((Du) => S.mid === Du.mid) && ("author" in S && (S.direction = S.author === "chatbot" ? uu.received : uu.sent, S.read = !0, S.delivery = !0), v((Du) => [
3480
- ...Du.filter((au) => au.mid !== S.mid),
3480
+ ...Du.filter((cu) => cu.mid !== S.mid),
3481
3481
  S
3482
3482
  ]), s(0), "direction" in S && S.direction === uu.received && !S.isOffline && V(!1)), S && "data" in S && "quick_replies" in S.data ? I(
3483
3483
  (S.data.quick_replies || []).map(
@@ -3491,39 +3491,32 @@ const xe = (u, D) => {
3491
3491
  }, { socket: Bu } = Gu(), ru = async ({
3492
3492
  data: S
3493
3493
  }) => {
3494
- var au;
3494
+ var Du;
3495
3495
  hu(
3496
3496
  S.type === "file" ? iD.uploading : iD.sending
3497
- ), O("");
3498
- const Du = await o.socket.post(
3497
+ ), O(""), await o.socket.post(
3499
3498
  `/webhook/${e.channel}/`,
3500
3499
  {
3501
3500
  data: {
3502
3501
  ...S,
3503
- author: (S == null ? void 0 : S.author) ?? ((au = c[1]) == null ? void 0 : au.id)
3502
+ author: (S == null ? void 0 : S.author) ?? ((Du = c[1]) == null ? void 0 : Du.id)
3504
3503
  }
3505
3504
  }
3506
3505
  );
3507
- console.log(
3508
- "🚀 ~ ChatProvider.tsx:351 ~ handleSend ~ sentMessage:",
3509
- Du
3510
- ), console.log(
3511
- "=== CALLING handleNewIOMessage from handleSend (API Response) ==="
3512
- );
3513
- }, du = Mu(
3506
+ }, ou = Mu(
3514
3507
  async (S, Du) => {
3515
3508
  try {
3516
3509
  y(2);
3517
- const au = new URLSearchParams();
3510
+ const cu = new URLSearchParams();
3518
3511
  Object.entries({
3519
3512
  ...S && Du ? { first_name: S, last_name: Du } : {},
3520
3513
  _refresh: Date.now().toString()
3521
3514
  // Force fresh data
3522
3515
  }).forEach(([gu, Uu]) => {
3523
- typeof Uu == "string" && Uu.trim() && au.append(gu, Uu);
3524
- }), au.append("owner_id", e.ownerId);
3525
- const { body: lu } = await Bu.get(`/webhook/${e.channel}/?${au.toString()}`);
3526
- console.log("jump here 2"), X.setItem("profileLiveChat", lu.profile), X.setItem("isOffline", cu || !1), X.setItem(
3516
+ typeof Uu == "string" && Uu.trim() && cu.append(gu, Uu);
3517
+ }), cu.append("owner_id", e.ownerId);
3518
+ const { body: lu } = await Bu.get(`/webhook/${e.channel}/?${cu.toString()}`);
3519
+ X.setItem("profileLiveChat", lu.profile), X.setItem("isOffline", Cu || !1), X.setItem(
3527
3520
  "submitedFormLateTime",
3528
3521
  lu.profile.submitedFormLateTime || null
3529
3522
  ), v(
@@ -3554,8 +3547,8 @@ const xe = (u, D) => {
3554
3547
  author: lu.profile.foreignId
3555
3548
  }
3556
3549
  }), y(3), r("chat");
3557
- } catch (au) {
3558
- console.error("Unable to subscribe user", au), r("prechat"), y(0);
3550
+ } catch (cu) {
3551
+ console.error("Unable to subscribe user", cu), r("prechat"), y(0);
3559
3552
  }
3560
3553
  },
3561
3554
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -3569,9 +3562,7 @@ const xe = (u, D) => {
3569
3562
  ]
3570
3563
  );
3571
3564
  ff(YD.message, (S) => {
3572
- console.log(
3573
- "=== CALLING handleNewIOMessage from useSubscribe (Socket Realtime) ==="
3574
- ), _u(S);
3565
+ _u(S);
3575
3566
  }), ff(YD.typing, _);
3576
3567
  const Pu = (S) => {
3577
3568
  S ? (p(S), r("webview")) : r("chat");
@@ -3580,23 +3571,22 @@ const xe = (u, D) => {
3580
3571
  F && d && m(0);
3581
3572
  }, [F, d]), Z(() => {
3582
3573
  if (d && j === tD.connected) {
3583
- console.log("🔄 Widget opened - fetching fresh data");
3584
3574
  const S = X.getItem("profileLiveChat");
3585
3575
  if (S) {
3586
3576
  const Du = S;
3587
- console.log("🔄 Widget opened - fetching fresh data", Du), du(Du.firstName, Du.lastName);
3577
+ ou(Du.firstName, Du.lastName);
3588
3578
  }
3589
- !S && !cu && r("prechat");
3579
+ !S && !Cu && r("prechat");
3590
3580
  }
3591
3581
  }, [d]), b0("logout", () => {
3592
3582
  o.socket.disconnect();
3593
3583
  }), Z(() => {
3594
- n === "chat" && j === tD.connected && du();
3584
+ n === "chat" && j === tD.connected && ou();
3595
3585
  const S = () => {
3596
3586
  const Du = X.getItem("profileLiveChat");
3597
3587
  if (Du) {
3598
- const au = Du;
3599
- du(au.firstName, au.lastName);
3588
+ const cu = Du;
3589
+ ou(cu.firstName, cu.lastName);
3600
3590
  }
3601
3591
  };
3602
3592
  return o.socket.io.on("reconnect", S), () => {
@@ -3609,13 +3599,13 @@ const xe = (u, D) => {
3609
3599
  const Iu = {
3610
3600
  participants: c,
3611
3601
  setParticipants: l,
3612
- outgoingMessageState: $,
3602
+ outgoingMessageState: L,
3613
3603
  setOutgoingMessageState: hu,
3614
3604
  connectionState: j,
3615
3605
  setConnectionState: Q,
3616
3606
  messages: C.sort((S, Du) => {
3617
- const au = Date.parse(S.createdAt), lu = Date.parse(Du.createdAt);
3618
- return +new Date(au) - +new Date(lu);
3607
+ const cu = Date.parse(S.createdAt), lu = Date.parse(Du.createdAt);
3608
+ return +new Date(cu) - +new Date(lu);
3619
3609
  }),
3620
3610
  setMessages: v,
3621
3611
  newMessagesCount: x,
@@ -3635,14 +3625,14 @@ const xe = (u, D) => {
3635
3625
  setFile: h,
3636
3626
  message: g,
3637
3627
  setMessage: O,
3638
- handleSubscription: du,
3628
+ handleSubscription: ou,
3639
3629
  isContactFormActive: R,
3640
3630
  setIsContactFormActive: N,
3641
3631
  isOfflineMode: M,
3642
3632
  setIsOfflineMode: V
3643
3633
  };
3644
3634
  return /* @__PURE__ */ a.jsx(v1.Provider, { value: Iu, children: f });
3645
- }, Cu = () => {
3635
+ }, du = () => {
3646
3636
  const u = Hu(v1);
3647
3637
  if (!u)
3648
3638
  throw new Error("useChat must be used within a ChatContext");
@@ -3976,7 +3966,7 @@ const xe = (u, D) => {
3976
3966
  }
3977
3967
  };
3978
3968
  return /* @__PURE__ */ a.jsx(A1.Provider, { value: { colors: f() }, children: u });
3979
- }, ou = () => {
3969
+ }, iu = () => {
3980
3970
  const u = Hu(A1);
3981
3971
  if (!u)
3982
3972
  throw new Error("useColors must be used within a ColorProvider");
@@ -4009,10 +3999,10 @@ const xe = (u, D) => {
4009
3999
  )
4010
4000
  ]
4011
4001
  }
4012
- ), Le = ({
4002
+ ), $e = ({
4013
4003
  onSendNoticeToStaff: u
4014
4004
  }) => {
4015
- const [D, f] = U(!1), e = mu(null), { send: t } = Cu(), n = async (r) => {
4005
+ const [D, f] = U(!1), e = mu(null), { send: t } = du(), n = async (r) => {
4016
4006
  r.preventDefault(), r.stopPropagation();
4017
4007
  try {
4018
4008
  const s = X.getItem("profileLiveChat");
@@ -4059,8 +4049,8 @@ const xe = (u, D) => {
4059
4049
  }
4060
4050
  ) })
4061
4051
  ] });
4062
- }, $e = ({ children: u }) => {
4063
- const D = pu(), { colors: f } = ou(), e = Nu();
4052
+ }, Le = ({ children: u }) => {
4053
+ const D = pu(), { colors: f } = iu(), e = Nu();
4064
4054
  return /* @__PURE__ */ a.jsxs(
4065
4055
  "div",
4066
4056
  {
@@ -4091,7 +4081,7 @@ const xe = (u, D) => {
4091
4081
  ] }),
4092
4082
  /* @__PURE__ */ a.jsxs("div", { className: "sc-header--actions", children: [
4093
4083
  /* @__PURE__ */ a.jsx(
4094
- Le,
4084
+ $e,
4095
4085
  {
4096
4086
  onChatWithStaff: () => {
4097
4087
  console.log("Chat with staff requested");
@@ -4199,7 +4189,7 @@ const xe = (u, D) => {
4199
4189
  ]
4200
4190
  }
4201
4191
  ), ze = () => {
4202
- const { t: u } = zu(), { connectionState: D, setConnectionState: f } = Cu(), { colors: e } = ou(), t = () => {
4192
+ const { t: u } = zu(), { connectionState: D, setConnectionState: f } = du(), { colors: e } = iu(), t = () => {
4203
4193
  D === 0 && f(1);
4204
4194
  }, n = D > 0;
4205
4195
  return /* @__PURE__ */ a.jsx(
@@ -4280,8 +4270,8 @@ function j1() {
4280
4270
  if (q(k)) return k.clone();
4281
4271
  var h = typeof E == "object" ? E : {};
4282
4272
  return h.date = k, h.args = arguments, new hu(h);
4283
- }, $ = _;
4284
- $.l = g, $.i = q, $.w = function(k, E) {
4273
+ }, L = _;
4274
+ L.l = g, L.i = q, L.w = function(k, E) {
4285
4275
  return O(k, { locale: E.$L, utc: E.$u, x: E.$x, $offset: E.$offset });
4286
4276
  };
4287
4277
  var hu = function() {
@@ -4293,7 +4283,7 @@ function j1() {
4293
4283
  this.$d = function(A) {
4294
4284
  var p = A.date, R = A.utc;
4295
4285
  if (p === null) return /* @__PURE__ */ new Date(NaN);
4296
- if ($.u(p)) return /* @__PURE__ */ new Date();
4286
+ if (L.u(p)) return /* @__PURE__ */ new Date();
4297
4287
  if (p instanceof Date) return new Date(p);
4298
4288
  if (typeof p == "string" && !/Z$/i.test(p)) {
4299
4289
  var N = p.match(v);
@@ -4308,7 +4298,7 @@ function j1() {
4308
4298
  var h = this.$d;
4309
4299
  this.$y = h.getFullYear(), this.$M = h.getMonth(), this.$D = h.getDate(), this.$W = h.getDay(), this.$H = h.getHours(), this.$m = h.getMinutes(), this.$s = h.getSeconds(), this.$ms = h.getMilliseconds();
4310
4300
  }, E.$utils = function() {
4311
- return $;
4301
+ return L;
4312
4302
  }, E.isValid = function() {
4313
4303
  return this.$d.toString() !== C;
4314
4304
  }, E.isSame = function(h, A) {
@@ -4319,17 +4309,17 @@ function j1() {
4319
4309
  }, E.isBefore = function(h, A) {
4320
4310
  return this.endOf(A) < O(h);
4321
4311
  }, E.$g = function(h, A, p) {
4322
- return $.u(h) ? this[A] : this.set(p, h);
4312
+ return L.u(h) ? this[A] : this.set(p, h);
4323
4313
  }, E.unix = function() {
4324
4314
  return Math.floor(this.valueOf() / 1e3);
4325
4315
  }, E.valueOf = function() {
4326
4316
  return this.$d.getTime();
4327
4317
  }, E.startOf = function(h, A) {
4328
- var p = this, R = !!$.u(A) || A, N = $.p(h), M = function(Bu, ru) {
4329
- var du = $.w(p.$u ? Date.UTC(p.$y, ru, Bu) : new Date(p.$y, ru, Bu), p);
4330
- return R ? du : du.endOf(d);
4318
+ var p = this, R = !!L.u(A) || A, N = L.p(h), M = function(Bu, ru) {
4319
+ var ou = L.w(p.$u ? Date.UTC(p.$y, ru, Bu) : new Date(p.$y, ru, Bu), p);
4320
+ return R ? ou : ou.endOf(d);
4331
4321
  }, V = function(Bu, ru) {
4332
- return $.w(p.toDate()[Bu].apply(p.toDate("s"), (R ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ru)), p);
4322
+ return L.w(p.toDate()[Bu].apply(p.toDate("s"), (R ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ru)), p);
4333
4323
  }, J = this.$W, z = this.$M, Q = this.$D, tu = "set" + (this.$u ? "UTC" : "");
4334
4324
  switch (N) {
4335
4325
  case j:
@@ -4337,7 +4327,7 @@ function j1() {
4337
4327
  case c:
4338
4328
  return R ? M(1, z) : M(0, z + 1);
4339
4329
  case o:
4340
- var cu = this.$locale().weekStart || 0, _u = (J < cu ? J + 7 : J) - cu;
4330
+ var Cu = this.$locale().weekStart || 0, _u = (J < Cu ? J + 7 : J) - Cu;
4341
4331
  return M(R ? Q - _u : Q + (6 - _u), z);
4342
4332
  case d:
4343
4333
  case y:
@@ -4354,7 +4344,7 @@ function j1() {
4354
4344
  }, E.endOf = function(h) {
4355
4345
  return this.startOf(h, !1);
4356
4346
  }, E.$set = function(h, A) {
4357
- var p, R = $.p(h), N = "set" + (this.$u ? "UTC" : ""), M = (p = {}, p[d] = N + "Date", p[y] = N + "Date", p[c] = N + "Month", p[j] = N + "FullYear", p[F] = N + "Hours", p[s] = N + "Minutes", p[r] = N + "Seconds", p[n] = N + "Milliseconds", p)[R], V = R === d ? this.$D + (A - this.$W) : A;
4347
+ var p, R = L.p(h), N = "set" + (this.$u ? "UTC" : ""), M = (p = {}, p[d] = N + "Date", p[y] = N + "Date", p[c] = N + "Month", p[j] = N + "FullYear", p[F] = N + "Hours", p[s] = N + "Minutes", p[r] = N + "Seconds", p[n] = N + "Milliseconds", p)[R], V = R === d ? this.$D + (A - this.$W) : A;
4358
4348
  if (R === c || R === j) {
4359
4349
  var J = this.clone().set(y, 1);
4360
4350
  J.$d[M](V), J.init(), this.$d = J.set(y, Math.min(this.$D, J.daysInMonth())).$d;
@@ -4363,64 +4353,64 @@ function j1() {
4363
4353
  }, E.set = function(h, A) {
4364
4354
  return this.clone().$set(h, A);
4365
4355
  }, E.get = function(h) {
4366
- return this[$.p(h)]();
4356
+ return this[L.p(h)]();
4367
4357
  }, E.add = function(h, A) {
4368
4358
  var p, R = this;
4369
4359
  h = Number(h);
4370
- var N = $.p(A), M = function(z) {
4360
+ var N = L.p(A), M = function(z) {
4371
4361
  var Q = O(R);
4372
- return $.w(Q.date(Q.date() + Math.round(z * h)), R);
4362
+ return L.w(Q.date(Q.date() + Math.round(z * h)), R);
4373
4363
  };
4374
4364
  if (N === c) return this.set(c, this.$M + h);
4375
4365
  if (N === j) return this.set(j, this.$y + h);
4376
4366
  if (N === d) return M(1);
4377
4367
  if (N === o) return M(7);
4378
4368
  var V = (p = {}, p[s] = e, p[F] = t, p[r] = f, p)[N] || 1, J = this.$d.getTime() + h * V;
4379
- return $.w(J, this);
4369
+ return L.w(J, this);
4380
4370
  }, E.subtract = function(h, A) {
4381
4371
  return this.add(-1 * h, A);
4382
4372
  }, E.format = function(h) {
4383
4373
  var A = this, p = this.$locale();
4384
4374
  if (!this.isValid()) return p.invalidDate || C;
4385
- var R = h || "YYYY-MM-DDTHH:mm:ssZ", N = $.z(this), M = this.$H, V = this.$m, J = this.$M, z = p.weekdays, Q = p.months, tu = p.meridiem, cu = function(ru, du, Pu, Iu) {
4386
- return ru && (ru[du] || ru(A, R)) || Pu[du].slice(0, Iu);
4375
+ var R = h || "YYYY-MM-DDTHH:mm:ssZ", N = L.z(this), M = this.$H, V = this.$m, J = this.$M, z = p.weekdays, Q = p.months, tu = p.meridiem, Cu = function(ru, ou, Pu, Iu) {
4376
+ return ru && (ru[ou] || ru(A, R)) || Pu[ou].slice(0, Iu);
4387
4377
  }, _u = function(ru) {
4388
- return $.s(M % 12 || 12, ru, "0");
4389
- }, Bu = tu || function(ru, du, Pu) {
4378
+ return L.s(M % 12 || 12, ru, "0");
4379
+ }, Bu = tu || function(ru, ou, Pu) {
4390
4380
  var Iu = ru < 12 ? "AM" : "PM";
4391
4381
  return Pu ? Iu.toLowerCase() : Iu;
4392
4382
  };
4393
- return R.replace(x, function(ru, du) {
4394
- return du || function(Pu) {
4383
+ return R.replace(x, function(ru, ou) {
4384
+ return ou || function(Pu) {
4395
4385
  switch (Pu) {
4396
4386
  case "YY":
4397
4387
  return String(A.$y).slice(-2);
4398
4388
  case "YYYY":
4399
- return $.s(A.$y, 4, "0");
4389
+ return L.s(A.$y, 4, "0");
4400
4390
  case "M":
4401
4391
  return J + 1;
4402
4392
  case "MM":
4403
- return $.s(J + 1, 2, "0");
4393
+ return L.s(J + 1, 2, "0");
4404
4394
  case "MMM":
4405
- return cu(p.monthsShort, J, Q, 3);
4395
+ return Cu(p.monthsShort, J, Q, 3);
4406
4396
  case "MMMM":
4407
- return cu(Q, J);
4397
+ return Cu(Q, J);
4408
4398
  case "D":
4409
4399
  return A.$D;
4410
4400
  case "DD":
4411
- return $.s(A.$D, 2, "0");
4401
+ return L.s(A.$D, 2, "0");
4412
4402
  case "d":
4413
4403
  return String(A.$W);
4414
4404
  case "dd":
4415
- return cu(p.weekdaysMin, A.$W, z, 2);
4405
+ return Cu(p.weekdaysMin, A.$W, z, 2);
4416
4406
  case "ddd":
4417
- return cu(p.weekdaysShort, A.$W, z, 3);
4407
+ return Cu(p.weekdaysShort, A.$W, z, 3);
4418
4408
  case "dddd":
4419
4409
  return z[A.$W];
4420
4410
  case "H":
4421
4411
  return String(M);
4422
4412
  case "HH":
4423
- return $.s(M, 2, "0");
4413
+ return L.s(M, 2, "0");
4424
4414
  case "h":
4425
4415
  return _u(1);
4426
4416
  case "hh":
@@ -4432,13 +4422,13 @@ function j1() {
4432
4422
  case "m":
4433
4423
  return String(V);
4434
4424
  case "mm":
4435
- return $.s(V, 2, "0");
4425
+ return L.s(V, 2, "0");
4436
4426
  case "s":
4437
4427
  return String(A.$s);
4438
4428
  case "ss":
4439
- return $.s(A.$s, 2, "0");
4429
+ return L.s(A.$s, 2, "0");
4440
4430
  case "SSS":
4441
- return $.s(A.$ms, 3, "0");
4431
+ return L.s(A.$ms, 3, "0");
4442
4432
  case "Z":
4443
4433
  return N;
4444
4434
  }
@@ -4448,8 +4438,8 @@ function j1() {
4448
4438
  }, E.utcOffset = function() {
4449
4439
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
4450
4440
  }, E.diff = function(h, A, p) {
4451
- var R, N = this, M = $.p(A), V = O(h), J = (V.utcOffset() - this.utcOffset()) * e, z = this - V, Q = function() {
4452
- return $.m(N, V);
4441
+ var R, N = this, M = L.p(A), V = O(h), J = (V.utcOffset() - this.utcOffset()) * e, z = this - V, Q = function() {
4442
+ return L.m(N, V);
4453
4443
  };
4454
4444
  switch (M) {
4455
4445
  case j:
@@ -4479,7 +4469,7 @@ function j1() {
4479
4469
  default:
4480
4470
  R = z;
4481
4471
  }
4482
- return p ? R : $.a(R);
4472
+ return p ? R : L.a(R);
4483
4473
  }, E.daysInMonth = function() {
4484
4474
  return this.endOf(c).$D;
4485
4475
  }, E.$locale = function() {
@@ -4489,7 +4479,7 @@ function j1() {
4489
4479
  var p = this.clone(), R = g(h, A, !0);
4490
4480
  return R && (p.$L = R), p;
4491
4481
  }, E.clone = function() {
4492
- return $.w(this.$d, this);
4482
+ return L.w(this.$d, this);
4493
4483
  }, E.toDate = function() {
4494
4484
  return new Date(this.valueOf());
4495
4485
  }, E.toJSON = function() {
@@ -4648,7 +4638,7 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
4648
4638
  ] })
4649
4639
  }
4650
4640
  ), vD = ({ message: u }) => {
4651
- const { setPayload: D, send: f, setWebviewUrl: e } = Cu(), t = pu(), { colors: n } = ou(), r = (s, F) => {
4641
+ const { setPayload: D, send: f, setWebviewUrl: e } = du(), t = pu(), { colors: n } = iu(), r = (s, F) => {
4652
4642
  F.type === "web_url" && F.url ? F.messenger_extensions ? e(F.url) : window.open(F.url, "_blank") : F.type === "postback" && (D({ text: F.title, payload: F.payload }), f({
4653
4643
  event: s,
4654
4644
  source: "post-back",
@@ -4708,7 +4698,7 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
4708
4698
  ] }) }), Ze = ({
4709
4699
  messageCarousel: u
4710
4700
  }) => {
4711
- const { colors: D } = ou(), [f, e] = U(0), t = u.data.elements, n = () => {
4701
+ const { colors: D } = iu(), [f, e] = U(0), t = u.data.elements, n = () => {
4712
4702
  e(
4713
4703
  (d) => (d + t.length - 1) % t.length
4714
4704
  );
@@ -4761,7 +4751,7 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
4761
4751
  /* @__PURE__ */ a.jsx("path", { d: "M413.94 191.88h-78.77a50.17 50.17 0 01-50.11-50.11V63a15 15 0 0130 0v78.77a20.13 20.13 0 0020.11 20.11h78.77a15 15 0 010 30zM264.4 375a15 15 0 01-10.61-4.4l-54.45-54.44a15 15 0 1121.21-21.22l43.85 43.84 43.84-43.84a15 15 0 1121.21 21.22L275 370.55a15 15 0 01-10.6 4.45z" }),
4762
4752
  /* @__PURE__ */ a.jsx("path", { d: "M264.4 365a15 15 0 01-15-15V231a15 15 0 0130 0v119a15 15 0 01-15 15z" })
4763
4753
  ] }) }), u3 = ({ message: u }) => {
4764
- const { t: D } = zu(), { colors: f } = ou(), e = f[u.direction || uu.received];
4754
+ const { t: D } = zu(), { colors: f } = iu(), e = f[u.direction || uu.received];
4765
4755
  if (!("type" in u.data))
4766
4756
  throw new Error("Unable to detect type for file message");
4767
4757
  if (u.data && u.data.type !== "image" && u.data.type !== "audio" && u.data.type !== "video" && u.data.type !== "file")
@@ -4812,7 +4802,7 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
4812
4802
  );
4813
4803
  }, D3 = ({ message: u }) => {
4814
4804
  var d;
4815
- const { colors: D } = ou(), f = Nu(), [e, t] = U(!1), n = mu(null);
4805
+ const { colors: D } = iu(), f = Nu(), [e, t] = U(!1), n = mu(null);
4816
4806
  if (Z(() => {
4817
4807
  const o = new IntersectionObserver((c) => {
4818
4808
  !e && c[0].intersectionRatio > 0 && t(!0);
@@ -4849,7 +4839,7 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
4849
4839
  }
4850
4840
  );
4851
4841
  }, f3 = ({ messageList: u }) => {
4852
- const { colors: D } = ou(), f = (r) => {
4842
+ const { colors: D } = iu(), f = (r) => {
4853
4843
  let s = e(r, 50);
4854
4844
  return s = t(r), s;
4855
4845
  }, e = (r, s = 100) => r.length > s ? r.substr(0, s) + "..." : r, t = (r) => r.replace(/\n/g, "<br />");
@@ -4936,14 +4926,14 @@ function CD(u, D) {
4936
4926
  }
4937
4927
  u.prototype = D === null ? Object.create(D) : (f.prototype = D.prototype, new f());
4938
4928
  }
4939
- var iu = function() {
4940
- return iu = Object.assign || function(D) {
4929
+ var Fu = function() {
4930
+ return Fu = Object.assign || function(D) {
4941
4931
  for (var f, e = 1, t = arguments.length; e < t; e++) {
4942
4932
  f = arguments[e];
4943
4933
  for (var n in f) Object.prototype.hasOwnProperty.call(f, n) && (D[n] = f[n]);
4944
4934
  }
4945
4935
  return D;
4946
- }, iu.apply(this, arguments);
4936
+ }, Fu.apply(this, arguments);
4947
4937
  };
4948
4938
  function e3(u, D) {
4949
4939
  var f = typeof Symbol == "function" && u[Symbol.iterator];
@@ -5200,7 +5190,7 @@ var Yu = Qu;
5200
5190
  function pf(u) {
5201
5191
  return u === 95 || Yu(u);
5202
5192
  }
5203
- function L1(u) {
5193
+ function $1(u) {
5204
5194
  return Qu(u) || l3(u) || R1(u);
5205
5195
  }
5206
5196
  function Bf(u) {
@@ -5208,7 +5198,7 @@ function Bf(u) {
5208
5198
  u === 63 || // '?'
5209
5199
  u === 35;
5210
5200
  }
5211
- function $1(u) {
5201
+ function L1(u) {
5212
5202
  return h3.test(u.toLowerCase());
5213
5203
  }
5214
5204
  function m3(u) {
@@ -5228,7 +5218,7 @@ function _3(u) {
5228
5218
  if (e.length < 2)
5229
5219
  return !1;
5230
5220
  var t = e[e.length - 1];
5231
- return !!$1(t);
5221
+ return !!L1(t);
5232
5222
  }
5233
5223
  var y3 = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, v3 = /[:/?#]/;
5234
5224
  function w3(u) {
@@ -5291,7 +5281,7 @@ function gf(u) {
5291
5281
  }
5292
5282
  function P3(u) {
5293
5283
  var D = u.split(".").pop();
5294
- return $1(D);
5284
+ return L1(D);
5295
5285
  }
5296
5286
  var I3 = (
5297
5287
  /** @class */
@@ -5315,10 +5305,10 @@ var I3 = (
5315
5305
  function q1(u) {
5316
5306
  return u === 95 || Qu(u);
5317
5307
  }
5318
- function L3(u) {
5308
+ function $3(u) {
5319
5309
  return u.length <= 140;
5320
5310
  }
5321
- var $3 = [
5311
+ var L3 = [
5322
5312
  "twitter",
5323
5313
  "facebook",
5324
5314
  "instagram",
@@ -5612,10 +5602,10 @@ function Z3(u, D) {
5612
5602
  I2(f, r, e, t);
5613
5603
  break;
5614
5604
  case 40:
5615
- L2(f, r, t);
5605
+ $2(f, r, t);
5616
5606
  break;
5617
5607
  case 41:
5618
- $2(f, r, t);
5608
+ L2(f, r, t);
5619
5609
  break;
5620
5610
  default:
5621
5611
  Xu(r.state);
@@ -5713,7 +5703,7 @@ function D2(u, D, f) {
5713
5703
  ))) : u.removeMachine(D);
5714
5704
  }
5715
5705
  function f2(u, D, f) {
5716
- f === 47 ? D.state = 4 : L1(f) ? (D.state = 10, D.acceptStateReached = !0) : eu(u, D);
5706
+ f === 47 ? D.state = 4 : $1(f) ? (D.state = 10, D.acceptStateReached = !0) : eu(u, D);
5717
5707
  }
5718
5708
  function e2(u, D, f, e) {
5719
5709
  e === 47 ? (D.state = 10, D.acceptStateReached = !0) : Yu(e) ? (D.state = 5, D.acceptStateReached = !0) : u.removeMachine(D);
@@ -5746,7 +5736,7 @@ function d2(u, D, f) {
5746
5736
  Eu(f) || (Bf(f) ? D.state = 10 : eu(u, D));
5747
5737
  }
5748
5738
  function C2(u, D, f) {
5749
- L1(f) || eu(u, D);
5739
+ $1(f) || eu(u, D);
5750
5740
  }
5751
5741
  function c2(u, D, f, e) {
5752
5742
  f.toLowerCase() === "a" ? D.state = 16 : uD(u, D, e);
@@ -5828,10 +5818,10 @@ function P2(u, D, f, e) {
5828
5818
  function I2(u, D, f, e) {
5829
5819
  Eu(e) ? D.state = 38 : e === 40 ? D.state = 32 : (eu(u, D), jD(u, f, e));
5830
5820
  }
5831
- function L2(u, D, f) {
5821
+ function $2(u, D, f) {
5832
5822
  mf(f) || (f === 35 ? D.state = 41 : Eu(f) ? D.state = 38 : eu(u, D));
5833
5823
  }
5834
- function $2(u, D, f) {
5824
+ function L2(u, D, f) {
5835
5825
  mf(f) ? D.state = 40 : Eu(f) ? u.removeMachine(D) : eu(u, D);
5836
5826
  }
5837
5827
  function eu(u, D) {
@@ -5888,7 +5878,7 @@ function eu(u, D) {
5888
5878
  break;
5889
5879
  }
5890
5880
  case 2: {
5891
- L3(l) && f.push(new M3({
5881
+ $3(l) && f.push(new M3({
5892
5882
  tagBuilder: n,
5893
5883
  matchedText: l,
5894
5884
  offset: c,
@@ -6126,10 +6116,10 @@ function K2(u, D) {
6126
6116
  D === "<" && Ou(u);
6127
6117
  }
6128
6118
  function J2(u, D, f) {
6129
- D === "!" ? u.state = 13 : D === "/" ? (u.state = 2, u.currentTag = new Su(iu(iu({}, u.currentTag), { isClosing: !0 }))) : D === "<" ? Ou(u) : rD(f) ? (u.state = 3, u.currentTag = new Su(iu(iu({}, u.currentTag), { isOpening: !0 }))) : (u.state = 0, u.currentTag = _f);
6119
+ D === "!" ? u.state = 13 : D === "/" ? (u.state = 2, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { isClosing: !0 }))) : D === "<" ? Ou(u) : rD(f) ? (u.state = 3, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { isOpening: !0 }))) : (u.state = 0, u.currentTag = _f);
6130
6120
  }
6131
6121
  function G2(u, D, f) {
6132
- Zu(f) ? (u.currentTag = new Su(iu(iu({}, u.currentTag), { name: HD(u) })), u.state = 4) : D === "<" ? Ou(u) : D === "/" ? (u.currentTag = new Su(iu(iu({}, u.currentTag), { name: HD(u) })), u.state = 12) : D === ">" ? (u.currentTag = new Su(iu(iu({}, u.currentTag), { name: HD(u) })), Ru(u)) : !rD(f) && !Eu(f) && D !== ":" && xu(u);
6122
+ Zu(f) ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { name: HD(u) })), u.state = 4) : D === "<" ? Ou(u) : D === "/" ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { name: HD(u) })), u.state = 12) : D === ">" ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { name: HD(u) })), Ru(u)) : !rD(f) && !Eu(f) && D !== ":" && xu(u);
6133
6123
  }
6134
6124
  function X2(u, D, f) {
6135
6125
  D === ">" ? xu(u) : rD(f) ? u.state = 3 : xu(u);
@@ -6159,11 +6149,11 @@ function nt(u, D, f) {
6159
6149
  Zu(f) ? u.state = 4 : D === "/" ? u.state = 12 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : (u.state = 4, Et(u));
6160
6150
  }
6161
6151
  function rt(u, D) {
6162
- D === ">" ? (u.currentTag = new Su(iu(iu({}, u.currentTag), { isClosing: !0 })), Ru(u)) : xu(u);
6152
+ D === ">" ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { isClosing: !0 })), Ru(u)) : xu(u);
6163
6153
  }
6164
6154
  function at(u) {
6165
6155
  var D = u.html, f = u.charIdx;
6166
- D.slice(f, f + 2) === "--" ? (u.charIdx++, u.currentTag = new Su(iu(iu({}, u.currentTag), { type: "comment" })), u.state = 14) : D.slice(f, f + 7).toUpperCase() === "DOCTYPE" ? (u.charIdx += 6, u.currentTag = new Su(iu(iu({}, u.currentTag), { type: "doctype" })), u.state = 20) : xu(u);
6156
+ D.slice(f, f + 2) === "--" ? (u.charIdx++, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { type: "comment" })), u.state = 14) : D.slice(f, f + 7).toUpperCase() === "DOCTYPE" ? (u.charIdx += 6, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { type: "doctype" })), u.state = 20) : xu(u);
6167
6157
  }
6168
6158
  function st(u, D) {
6169
6159
  D === "-" ? u.state = 15 : D === ">" ? xu(u) : u.state = 16;
@@ -6224,7 +6214,7 @@ var ht = (
6224
6214
  if (f !== !1 && U3.indexOf(f) === -1)
6225
6215
  throw new Error("invalid `mention` cfg '".concat(f, "' - see docs"));
6226
6216
  var e = this.hashtag;
6227
- if (e !== !1 && $3.indexOf(e) === -1)
6217
+ if (e !== !1 && L3.indexOf(e) === -1)
6228
6218
  throw new Error("invalid `hashtag` cfg '".concat(e, "' - see docs"));
6229
6219
  this.truncate = Bt(D.truncate), this.className = D.className || this.className, this.replaceFn = D.replaceFn || this.replaceFn, this.context = D.context || this;
6230
6220
  }
@@ -6345,7 +6335,7 @@ function pt(u) {
6345
6335
  };
6346
6336
  }
6347
6337
  function Bt(u) {
6348
- return typeof u == "number" ? { length: u, location: "end" } : iu({ length: Number.POSITIVE_INFINITY, location: "end" }, u);
6338
+ return typeof u == "number" ? { length: u, location: "end" } : Fu({ length: Number.POSITIVE_INFINITY, location: "end" }, u);
6349
6339
  }
6350
6340
  function gt(u, D) {
6351
6341
  return u.getOffset() - D.getOffset();
@@ -6427,7 +6417,7 @@ const V1 = ({
6427
6417
  }
6428
6418
  } else typeof v == "boolean" ? v !== !0 && (x = `${C.label} is required`) : v || (x = `${C.label} is required`);
6429
6419
  if (x && t[C.key])
6430
- return console.log(`[VALIDATE] ${C.key}=${v}, ERROR=${x}`), x;
6420
+ return x;
6431
6421
  if (C.key.toLowerCase().includes("email") || C.label.toLowerCase().includes("email")) {
6432
6422
  const m = String(v || "").trim();
6433
6423
  m && (/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(m) || (x = "Please enter a valid email address"));
@@ -6779,9 +6769,9 @@ const jt = ({
6779
6769
  onSubmit: u,
6780
6770
  onFormStateChange: D
6781
6771
  }) => {
6782
- const { colors: f } = ou(), e = Wu(), t = pu(), { socket: n } = Gu(), { setScreen: r } = Nu();
6772
+ const { colors: f } = iu(), e = Wu(), t = pu(), { socket: n } = Gu(), { setScreen: r } = Nu();
6783
6773
  zu();
6784
- const { setIsOfflineMode: s, send: F, participants: d, setMessages: o, setParticipants: c, setConnectionState: l } = Cu(), { formData: j, renderContactFormField: y, errors: C, validateAll: v } = V1({
6774
+ const { setIsOfflineMode: s, send: F, participants: d, setMessages: o, setParticipants: c, setConnectionState: l } = du(), { formData: j, renderContactFormField: y, errors: C, validateAll: v } = V1({
6785
6775
  initialData: {},
6786
6776
  loadFromDataUserSubs: !0
6787
6777
  }), [x, m] = U(!1), [T, _] = U(!1);
@@ -6798,11 +6788,11 @@ const jt = ({
6798
6788
  var h;
6799
6789
  E.isDisplay && j[E.key] !== void 0 && (O[E.key] = ((h = j[E.key]) == null ? void 0 : h.toString().trim()) || "");
6800
6790
  });
6801
- const $ = kt(O);
6791
+ const L = kt(O);
6802
6792
  if (!X.getItem("profileLiveChat"))
6803
6793
  try {
6804
6794
  const E = new URLSearchParams();
6805
- Object.entries($).forEach(([M, V]) => {
6795
+ Object.entries(L).forEach(([M, V]) => {
6806
6796
  typeof V == "string" && V && E.append(M, V);
6807
6797
  }), E.append("owner_id", e.ownerId), E.append("contactLateTime", (/* @__PURE__ */ new Date()).toISOString());
6808
6798
  const { body: h } = await n.get(`/webhook/${e.channel}/?${E.toString()}`), { messages: A, profile: p } = h;
@@ -6821,12 +6811,12 @@ const jt = ({
6821
6811
  }
6822
6812
  ]), l(3), r("chat"), _(!0);
6823
6813
  const N = {
6824
- text: Object.entries($).map(
6814
+ text: Object.entries(L).map(
6825
6815
  ([M, V]) => `${M.charAt(0).toUpperCase() + M.slice(1)}: ${V}`
6826
6816
  ).join(`
6827
6817
  `),
6828
6818
  contactInfo: {
6829
- ...$,
6819
+ ...L,
6830
6820
  owner_id: e.ownerId
6831
6821
  },
6832
6822
  contactLateTime: /* @__PURE__ */ new Date()
@@ -6845,12 +6835,12 @@ const jt = ({
6845
6835
  console.error("Error in subscription flow:", E);
6846
6836
  }
6847
6837
  const k = {
6848
- text: Object.entries($).map(
6838
+ text: Object.entries(L).map(
6849
6839
  ([E, h]) => `${E.charAt(0).toUpperCase() + E.slice(1)}: ${h}`
6850
6840
  ).join(`
6851
6841
  `),
6852
6842
  contactInfo: {
6853
- ...$,
6843
+ ...L,
6854
6844
  owner_id: e.ownerId
6855
6845
  },
6856
6846
  contactLateTime: /* @__PURE__ */ new Date()
@@ -6912,7 +6902,7 @@ const jt = ({
6912
6902
  message: u,
6913
6903
  onFormSubmitted: D
6914
6904
  }) => {
6915
- const { colors: f } = ou(), { setIsContactFormActive: e } = Cu(), t = mu(null);
6905
+ const { colors: f } = iu(), { setIsContactFormActive: e } = du(), t = mu(null);
6916
6906
  Z(() => {
6917
6907
  n();
6918
6908
  }, [u]);
@@ -6969,7 +6959,7 @@ const jt = ({
6969
6959
  children: /* @__PURE__ */ a.jsx("path", { d: "M20 6L9 17l-5-5" })
6970
6960
  }
6971
6961
  ), Tt = ({ message: u }) => {
6972
- const { colors: D } = ou();
6962
+ const { colors: D } = iu();
6973
6963
  if (!("delivery" in u && "read" in u))
6974
6964
  throw new Error("Unable to find delivery/read attributes");
6975
6965
  return /* @__PURE__ */ a.jsxs("div", { className: "sc--status", style: { color: D.messageStatus.bg }, children: [
@@ -7002,7 +6992,7 @@ const jt = ({
7002
6992
  };
7003
6993
  S1.extend(Ye);
7004
6994
  const Nt = ({ message: u, Avatar: D }) => {
7005
- const { participants: f } = Cu(), { colors: e } = ou(), [t, n] = U(!1), [r, s] = U(!1), F = pu(), d = u.data && "text" in u.data && "isShowForm" in u.data && u.data.isShowForm, o = f.find(
6995
+ const { participants: f } = du(), { colors: e } = iu(), [t, n] = U(!1), [r, s] = U(!1), F = pu(), d = u.data && "text" in u.data && "isShowForm" in u.data && u.data.isShowForm, o = f.find(
7006
6996
  (j) => j.id === u.author
7007
6997
  ) || {
7008
6998
  name: "Anon"
@@ -7056,7 +7046,7 @@ const Nt = ({ message: u, Avatar: D }) => {
7056
7046
  ] })
7057
7047
  ] }) });
7058
7048
  }, Ot = () => {
7059
- const { colors: u } = ou();
7049
+ const { colors: u } = iu();
7060
7050
  return /* @__PURE__ */ a.jsxs(
7061
7051
  "div",
7062
7052
  {
@@ -7076,14 +7066,14 @@ const Nt = ({ message: u, Avatar: D }) => {
7076
7066
  Avatar: u,
7077
7067
  phone: D
7078
7068
  }) => {
7079
- const f = X.getItem("profileLiveChat"), { colors: e } = ou(), t = e[uu.received];
7069
+ const f = X.getItem("profileLiveChat"), { colors: e } = iu(), t = e[uu.received];
7080
7070
  pu();
7081
- const { participants: n } = Cu(), r = n.find(
7071
+ const { participants: n } = du(), r = n.find(
7082
7072
  (o) => o.id === "chatbot"
7083
7073
  ) || {
7084
7074
  name: "Bot"
7085
7075
  }, s = (f == null ? void 0 : f.mobile) || "", d = `${(f == null ? void 0 : f.countryCode) || "+61"} ${s}`;
7086
- return console.log("fullPhone", d), /* @__PURE__ */ a.jsx("div", { className: `sc-message ${uu.received}`, children: /* @__PURE__ */ a.jsxs("div", { className: `sc-message--content ${uu.received}`, children: [
7076
+ return /* @__PURE__ */ a.jsx("div", { className: `sc-message ${uu.received}`, children: /* @__PURE__ */ a.jsxs("div", { className: `sc-message--content ${uu.received}`, children: [
7087
7077
  /* @__PURE__ */ a.jsx(
7088
7078
  "div",
7089
7079
  {
@@ -7121,7 +7111,7 @@ const Nt = ({ message: u, Avatar: D }) => {
7121
7111
  ) })
7122
7112
  ] }) });
7123
7113
  }, Pt = ({ Avatar: u }) => {
7124
- const { scroll: D, setScroll: f, isOpen: e } = Nu(), { messages: t, showTypingIndicator: n, setNewIOMessage: r, setMessages: s } = Cu(), F = pu(), { colors: d } = ou(), { formSettings: o } = pu(), [c, l] = U(""), j = F.offline_mode, y = kD(j), C = (T) => {
7114
+ const { scroll: D, setScroll: f, isOpen: e } = Nu(), { messages: t, showTypingIndicator: n, setNewIOMessage: r, setMessages: s } = du(), F = pu(), { colors: d } = iu(), { formSettings: o } = pu(), [c, l] = U(""), j = F.offline_mode, y = kD(j), C = (T) => {
7125
7115
  if (!("text" in T.data)) return !1;
7126
7116
  const _ = T.data.text || "", B = (g) => g.toLowerCase().replace(/\s+/g, "").replace(/[^a-z0-9_]/g, ""), I = _.split(`
7127
7117
  `).map((g) => g.trim()), P = new Set(
@@ -9819,7 +9809,7 @@ var rf = { exports: {} };
9819
9809
  }());
9820
9810
  })(rf, rf.exports);
9821
9811
  var It = rf.exports;
9822
- const Lt = /* @__PURE__ */ Ff(It), $t = [
9812
+ const $t = /* @__PURE__ */ Ff(It), Lt = [
9823
9813
  {
9824
9814
  name: "People",
9825
9815
  emojis: [
@@ -10474,7 +10464,7 @@ const Lt = /* @__PURE__ */ Ff(It), $t = [
10474
10464
  ]
10475
10465
  }
10476
10466
  ], Mt = ({ onBlur: u, onSelect: D }) => {
10477
- const f = mu(new Lt()), e = mu(null);
10467
+ const f = mu(new $t()), e = mu(null);
10478
10468
  Z(() => {
10479
10469
  const n = e.current;
10480
10470
  n && (n.style.opacity = "0", window.requestAnimationFrame(() => {
@@ -10484,7 +10474,7 @@ const Lt = /* @__PURE__ */ Ff(It), $t = [
10484
10474
  const t = (n, r) => {
10485
10475
  D(n, r), e.current && e.current.blur();
10486
10476
  };
10487
- return /* @__PURE__ */ a.jsx("div", { tabIndex: 0, onBlur: u, className: "sc-emoji-picker", ref: e, children: /* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--content", children: $t.map((n) => /* @__PURE__ */ a.jsxs("div", { className: "sc-emoji-picker--category", children: [
10477
+ return /* @__PURE__ */ a.jsx("div", { tabIndex: 0, onBlur: u, className: "sc-emoji-picker", ref: e, children: /* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--content", children: Lt.map((n) => /* @__PURE__ */ a.jsxs("div", { className: "sc-emoji-picker--category", children: [
10488
10478
  /* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--category-title", children: n.name }),
10489
10479
  n.emojis.map((r) => /* @__PURE__ */ a.jsx(
10490
10480
  "span",
@@ -10616,7 +10606,7 @@ const Lt = /* @__PURE__ */ Ff(It), $t = [
10616
10606
  ]
10617
10607
  }
10618
10608
  ), Vt = () => {
10619
- const { setFile: u } = Cu(), D = (t) => {
10609
+ const { setFile: u } = du(), D = (t) => {
10620
10610
  t.target.value = "";
10621
10611
  }, f = (t) => {
10622
10612
  t.target.files && t.target.files[0] && u && u(t.target.files[0]);
@@ -10657,7 +10647,7 @@ const Lt = /* @__PURE__ */ Ff(It), $t = [
10657
10647
  children: /* @__PURE__ */ a.jsx("path", { d: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5" })
10658
10648
  }
10659
10649
  ), Wt = () => {
10660
- const { setPayload: u, send: D } = Cu(), f = pu(), e = (t) => {
10650
+ const { setPayload: u, send: D } = du(), f = pu(), e = (t) => {
10661
10651
  navigator.geolocation ? navigator.geolocation.getCurrentPosition(
10662
10652
  (n) => {
10663
10653
  u({
@@ -10696,7 +10686,7 @@ const Lt = /* @__PURE__ */ Ff(It), $t = [
10696
10686
  };
10697
10687
  var af = /* @__PURE__ */ ((u) => (u.web_url = "web_url", u.postback = "postback", u.nested = "nested", u))(af || {});
10698
10688
  const Yt = ({ item: u, onPostback: D }) => {
10699
- const { colors: f } = ou(), e = () => {
10689
+ const { colors: f } = iu(), e = () => {
10700
10690
  switch (u.type) {
10701
10691
  case "web_url":
10702
10692
  window.open(u.url, "_blank");
@@ -10717,7 +10707,7 @@ const Yt = ({ item: u, onPostback: D }) => {
10717
10707
  }
10718
10708
  ) });
10719
10709
  }, Kt = () => {
10720
- const u = pu(), { send: D, setPayload: f } = Cu(), [e, t] = U({
10710
+ const u = pu(), { send: D, setPayload: f } = du(), [e, t] = U({
10721
10711
  title: "Menu",
10722
10712
  type: af.nested,
10723
10713
  call_to_actions: (u == null ? void 0 : u.menu) || []
@@ -10781,7 +10771,7 @@ const Yt = ({ item: u, onPostback: D }) => {
10781
10771
  }
10782
10772
  );
10783
10773
  }, Xt = () => {
10784
- const { setPayload: u, send: D, suggestions: f } = Cu(), e = pu(), { colors: t } = ou(), n = (r, s) => {
10774
+ const { setPayload: u, send: D, suggestions: f } = du(), e = pu(), { colors: t } = iu(), n = (r, s) => {
10785
10775
  u(s), D({
10786
10776
  event: r,
10787
10777
  source: "quick-reply",
@@ -10810,7 +10800,7 @@ const Yt = ({ item: u, onPostback: D }) => {
10810
10800
  );
10811
10801
  }, Zt = () => {
10812
10802
  var J;
10813
- const { maxUploadSize: u } = Wu(), { t: D } = zu(), { colors: f } = ou(), {
10803
+ const { maxUploadSize: u } = Wu(), { t: D } = zu(), { colors: f } = iu(), {
10814
10804
  suggestions: e,
10815
10805
  message: t,
10816
10806
  setMessage: n,
@@ -10821,7 +10811,7 @@ const Yt = ({ item: u, onPostback: D }) => {
10821
10811
  isContactFormActive: o,
10822
10812
  isOfflineMode: c,
10823
10813
  messages: l
10824
- } = Cu(), {
10814
+ } = du(), {
10825
10815
  menu: j,
10826
10816
  focusOnOpen: y,
10827
10817
  autoFlush: C,
@@ -10830,7 +10820,7 @@ const Yt = ({ item: u, onPostback: D }) => {
10830
10820
  showLocation: m,
10831
10821
  showFile: T,
10832
10822
  placeholder: _
10833
- } = pu(), B = mu(null), [I, P] = U(null), [q, g] = U(!1), [O, $] = U(!1), [hu, fu] = U(!1);
10823
+ } = pu(), B = mu(null), [I, P] = U(null), [q, g] = U(!1), [O, L] = U(!1), [hu, fu] = U(!1);
10834
10824
  Z(() => {
10835
10825
  y && p();
10836
10826
  }, [t, y]), Z(() => {
@@ -10854,7 +10844,7 @@ const Yt = ({ item: u, onPostback: D }) => {
10854
10844
  return;
10855
10845
  }
10856
10846
  if (t) {
10857
- $(!0);
10847
+ L(!0);
10858
10848
  const tu = t;
10859
10849
  F({
10860
10850
  event: z,
@@ -10867,7 +10857,7 @@ const Yt = ({ item: u, onPostback: D }) => {
10867
10857
  fu(!0), B.current ? (B.current.innerHTML = "", B.current.innerText = "", B.current.textContent = "", B.current.innerHTML = "&nbsp;", setTimeout(() => {
10868
10858
  B.current && (B.current.innerHTML = ""), fu(!1);
10869
10859
  }, 1)) : fu(!1);
10870
- }, 10)) : console.log("autoFlush is false, keeping message"), setTimeout(() => $(!1), 1e3);
10860
+ }, 10)) : console.log("autoFlush is false, keeping message"), setTimeout(() => L(!1), 1e3);
10871
10861
  }
10872
10862
  r && (P(null), v.includes(r.type) || !1 ? r.size > u ? P(D("messages.file_message.unsupported_file_size")) : (F({
10873
10863
  event: z,
@@ -10935,9 +10925,9 @@ const Yt = ({ item: u, onPostback: D }) => {
10935
10925
  onKeyDown: A,
10936
10926
  onInput: E,
10937
10927
  onPaste: async (z) => {
10938
- var cu;
10928
+ var Cu;
10939
10929
  z.preventDefault();
10940
- const Q = await navigator.clipboard.readText(), tu = (cu = window.getSelection()) == null ? void 0 : cu.getRangeAt(0);
10930
+ const Q = await navigator.clipboard.readText(), tu = (Cu = window.getSelection()) == null ? void 0 : Cu.getRangeAt(0);
10941
10931
  if (tu && Q) {
10942
10932
  const _u = document.createTextNode(Q);
10943
10933
  tu.deleteContents(), tu.insertNode(_u), tu.collapse(!1);
@@ -10997,7 +10987,7 @@ const Yt = ({ item: u, onPostback: D }) => {
10997
10987
  children: /* @__PURE__ */ a.jsx("path", { stroke: "#fff", strokeOpacity: "1", d: "M15 18L9 12 15 6" })
10998
10988
  }
10999
10989
  ), u8 = () => {
11000
- const { t: u } = zu(), { colors: D } = ou(), { setWebviewUrl: f, webviewUrl: e } = Cu(), [t, n] = U(!1);
10990
+ const { t: u } = zu(), { colors: D } = iu(), { setWebviewUrl: f, webviewUrl: e } = du(), [t, n] = U(!1);
11001
10991
  Z(() => {
11002
10992
  n(!0);
11003
10993
  }, []);
@@ -11024,9 +11014,9 @@ const Yt = ({ item: u, onPostback: D }) => {
11024
11014
  PreChat: f,
11025
11015
  PostChat: e
11026
11016
  }) => {
11027
- const { connectionState: t } = Cu(), { screen: n, isOpen: r } = Nu();
11017
+ const { connectionState: t } = du(), { screen: n, isOpen: r } = Nu();
11028
11018
  return /* @__PURE__ */ a.jsxs("div", { className: `sc-chat-window ${r ? "opened" : "closed"}`, children: [
11029
- /* @__PURE__ */ a.jsx($e, { children: u && /* @__PURE__ */ a.jsx(u, {}) }),
11019
+ /* @__PURE__ */ a.jsx(Le, { children: u && /* @__PURE__ */ a.jsx(u, {}) }),
11030
11020
  n === "prechat" && f && /* @__PURE__ */ a.jsx(f, {}),
11031
11021
  ["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(Pt, { Avatar: D }),
11032
11022
  n !== "prechat" && n !== "postchat" && t !== 3 && /* @__PURE__ */ a.jsx(ze, {}),
@@ -11042,7 +11032,7 @@ const Yt = ({ item: u, onPostback: D }) => {
11042
11032
  PostChat: t
11043
11033
  }) => {
11044
11034
  zu();
11045
- const n = Wu(), r = Cu(), s = Nu(), { socket: F } = Gu(), { setScreen: d } = Nu(), o = pu(), c = o.offline_mode, l = kD(c), j = (C) => {
11035
+ const n = Wu(), r = du(), s = Nu(), { socket: F } = Gu(), { setScreen: d } = Nu(), o = pu(), c = o.offline_mode, l = kD(c), j = (C) => {
11046
11036
  C.preventDefault(), s.setIsOpen(!s.isOpen);
11047
11037
  };
11048
11038
  return ke(), new URLSearchParams().append("owner_id", n.ownerId), Z(() => {
@@ -11096,21 +11086,16 @@ const Yt = ({ item: u, onPostback: D }) => {
11096
11086
  }, Y1 = ({
11097
11087
  onFormDataSubmit: u
11098
11088
  }) => {
11099
- const D = Wu(), { t: f } = zu(), { colors: e } = ou(), { socket: t } = Gu(), n = pu(), { setScreen: r } = Nu(), {
11089
+ const D = Wu(), { t: f } = zu(), { colors: e } = iu(), { socket: t } = Gu(), n = pu(), { setScreen: r } = Nu(), {
11100
11090
  send: s,
11101
11091
  setMessages: F,
11102
11092
  setConnectionState: d,
11103
11093
  participants: o,
11104
11094
  setParticipants: c
11105
- } = Cu(), { formData: l, setFormData: j, renderFormField: y, errors: C, validateAll: v } = V1({
11095
+ } = du(), { formData: l, setFormData: j, renderFormField: y, errors: C, validateAll: v } = V1({
11106
11096
  loadFromDataUserSubs: !1,
11107
11097
  initialData: {}
11108
- }), x = n.offline_mode, m = kD(x);
11109
- console.log(
11110
- "🚀 ~ UserSubscription.tsx:72 ~ UserSubscription ~ isOffline:",
11111
- m
11112
- );
11113
- const T = mu(!1), _ = Mu(
11098
+ }), x = n.offline_mode, m = kD(x), T = mu(!1), _ = Mu(
11114
11099
  async (B) => {
11115
11100
  if (B == null || B.preventDefault(), B == null || B.stopPropagation(), !(!X.getItem("profileLiveChat") && !v(n.formSettings))) {
11116
11101
  Object.keys(l).length > 0 && X.setItem("dataUserSubs", l);
@@ -11121,7 +11106,7 @@ const Yt = ({ item: u, onPostback: D }) => {
11121
11106
  typeof k == "string" && k.trim() && P.append(fu, k);
11122
11107
  }), P.append("contactLateTime", (/* @__PURE__ */ new Date()).toISOString()), P.append("owner_id", D.ownerId);
11123
11108
  const { body: q } = await t.get(`/webhook/${D.channel}/?${P.toString()}`), { messages: g, profile: O } = q;
11124
- console.log("jump here 1"), X.setItem("profileLiveChat", O), X.setItem("isOffline", m || !1), X.setItem(
11109
+ X.setItem("profileLiveChat", O), X.setItem("isOffline", m || !1), X.setItem(
11125
11110
  "submitedFormLateTime",
11126
11111
  (O == null ? void 0 : O.submitedFormLateTime) || null
11127
11112
  ), g.forEach((fu) => {
@@ -11135,14 +11120,14 @@ const Yt = ({ item: u, onPostback: D }) => {
11135
11120
  name: `${O.firstName} ${O.firstName}`
11136
11121
  }
11137
11122
  ]), d(3), r("chat");
11138
- const $ = Object.entries(l).map(
11123
+ const L = Object.entries(l).map(
11139
11124
  ([fu, k]) => `${fu.charAt(0).toUpperCase() + fu.slice(1)}: ${k}`
11140
11125
  ).join(`
11141
11126
  `);
11142
- if (!$ || $.trim().length === 0)
11127
+ if (!L || L.trim().length === 0)
11143
11128
  return;
11144
11129
  const hu = {
11145
- text: $,
11130
+ text: L,
11146
11131
  contactInfo: {
11147
11132
  ...l,
11148
11133
  owner_id: D.ownerId