@connorpham/live-chat-widget 12.0.0 → 14.0.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.
@@ -1,12 +1,12 @@
1
1
  var i0 = Object.defineProperty;
2
2
  var o0 = (u, D, f) => D in u ? i0(u, D, { enumerable: !0, configurable: !0, writable: !0, value: f }) : u[D] = f;
3
3
  var lD = (u, D, f) => o0(u, typeof D != "symbol" ? D + "" : D, f);
4
- import af, { createContext as qu, useRef as pu, useEffect as G, useContext as Yu, useState as U, useCallback as Vu, useMemo as d0 } from "react";
4
+ import af, { createContext as zu, useRef as pu, useEffect as X, useContext as Ku, useState as U, useCallback as qu, useMemo as d0 } from "react";
5
5
  var dD = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6
6
  function sf(u) {
7
7
  return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
8
8
  }
9
- var HD = { exports: {} }, fD = {};
9
+ var WD = { exports: {} }, eD = {};
10
10
  /*
11
11
  object-assign
12
12
  (c) Sindre Sorhus
@@ -68,22 +68,22 @@ function Jf() {
68
68
  */
69
69
  var Of;
70
70
  function C0() {
71
- if (Of) return fD;
71
+ if (Of) return eD;
72
72
  Of = 1, Jf();
73
73
  var u = af, D = 60103;
74
- if (fD.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
74
+ if (eD.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
75
75
  var f = Symbol.for;
76
- D = f("react.element"), fD.Fragment = f("react.fragment");
76
+ D = f("react.element"), eD.Fragment = f("react.fragment");
77
77
  }
78
78
  var e = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, t = Object.prototype.hasOwnProperty, n = { key: !0, ref: !0, __self: !0, __source: !0 };
79
79
  function r(s, F, o) {
80
- var d, c = {}, l = null, A = null;
81
- o !== void 0 && (l = "" + o), F.key !== void 0 && (l = "" + F.key), F.ref !== void 0 && (A = F.ref);
80
+ var d, c = {}, l = null, j = null;
81
+ o !== void 0 && (l = "" + o), F.key !== void 0 && (l = "" + F.key), F.ref !== void 0 && (j = F.ref);
82
82
  for (d in F) t.call(F, d) && !n.hasOwnProperty(d) && (c[d] = F[d]);
83
83
  if (s && s.defaultProps) for (d in F = s.defaultProps, F) c[d] === void 0 && (c[d] = F[d]);
84
- return { $$typeof: D, type: s, key: l, ref: A, props: c, _owner: e.current };
84
+ return { $$typeof: D, type: s, key: l, ref: j, props: c, _owner: e.current };
85
85
  }
86
- return fD.jsx = r, fD.jsxs = r, fD;
86
+ return eD.jsx = r, eD.jsxs = r, eD;
87
87
  }
88
88
  var ID = {}, Rf;
89
89
  function c0() {
@@ -100,51 +100,51 @@ function c0() {
100
100
  D.NODE_ENV !== "production" && function() {
101
101
  var f = af, e = Jf(), t = 60103, n = 60106;
102
102
  u.Fragment = 60107;
103
- var r = 60108, s = 60114, F = 60109, o = 60110, d = 60112, c = 60113, l = 60120, A = 60115, C = 60116, m = 60121, S = 60122, L = 60117, x = 60129, I = 60131;
103
+ var r = 60108, s = 60114, F = 60109, o = 60110, d = 60112, c = 60113, l = 60120, j = 60115, m = 60116, C = 60121, v = 60122, S = 60117, g = 60129, L = 60131;
104
104
  if (typeof Symbol == "function" && Symbol.for) {
105
- var _ = Symbol.for;
106
- t = _("react.element"), n = _("react.portal"), u.Fragment = _("react.fragment"), r = _("react.strict_mode"), s = _("react.profiler"), F = _("react.provider"), o = _("react.context"), d = _("react.forward_ref"), c = _("react.suspense"), l = _("react.suspense_list"), A = _("react.memo"), C = _("react.lazy"), m = _("react.block"), S = _("react.server.block"), L = _("react.fundamental"), _("react.scope"), _("react.opaque.id"), x = _("react.debug_trace_mode"), _("react.offscreen"), I = _("react.legacy_hidden");
105
+ var y = Symbol.for;
106
+ t = y("react.element"), n = y("react.portal"), u.Fragment = y("react.fragment"), r = y("react.strict_mode"), s = y("react.profiler"), F = y("react.provider"), o = y("react.context"), d = y("react.forward_ref"), c = y("react.suspense"), l = y("react.suspense_list"), j = y("react.memo"), m = y("react.lazy"), C = y("react.block"), v = y("react.server.block"), S = y("react.fundamental"), y("react.scope"), y("react.opaque.id"), g = y("react.debug_trace_mode"), y("react.offscreen"), L = y("react.legacy_hidden");
107
107
  }
108
- var B = typeof Symbol == "function" && Symbol.iterator, T = "@@iterator";
109
- function y(i) {
108
+ var b = typeof Symbol == "function" && Symbol.iterator, T = "@@iterator";
109
+ function N(i) {
110
110
  if (i === null || typeof i != "object")
111
111
  return null;
112
- var h = B && i[B] || i[T];
113
- return typeof h == "function" ? h : null;
112
+ var p = b && i[b] || i[T];
113
+ return typeof p == "function" ? p : null;
114
114
  }
115
- var v = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
116
- function q(i) {
115
+ var z = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
116
+ function A(i) {
117
117
  {
118
- for (var h = arguments.length, w = new Array(h > 1 ? h - 1 : 0), M = 1; M < h; M++)
119
- w[M - 1] = arguments[M];
118
+ for (var p = arguments.length, w = new Array(p > 1 ? p - 1 : 0), $ = 1; $ < p; $++)
119
+ w[$ - 1] = arguments[$];
120
120
  P("error", i, w);
121
121
  }
122
122
  }
123
- function P(i, h, w) {
123
+ function P(i, p, w) {
124
124
  {
125
- var M = v.ReactDebugCurrentFrame, Z = M.getStackAddendum();
126
- Z !== "" && (h += "%s", w = w.concat([Z]));
127
- var J = w.map(function(Y) {
128
- return "" + Y;
125
+ var $ = z.ReactDebugCurrentFrame, Q = $.getStackAddendum();
126
+ Q !== "" && (p += "%s", w = w.concat([Q]));
127
+ var G = w.map(function(K) {
128
+ return "" + K;
129
129
  });
130
- J.unshift("Warning: " + h), Function.prototype.apply.call(console[i], console, J);
130
+ G.unshift("Warning: " + p), Function.prototype.apply.call(console[i], console, G);
131
131
  }
132
132
  }
133
- var g = !1;
134
- function $(i) {
135
- return !!(typeof i == "string" || typeof i == "function" || i === u.Fragment || i === s || i === x || i === r || i === c || i === l || i === I || g || typeof i == "object" && i !== null && (i.$$typeof === C || i.$$typeof === A || i.$$typeof === F || i.$$typeof === o || i.$$typeof === d || i.$$typeof === L || i.$$typeof === m || i[0] === S));
133
+ var _ = !1;
134
+ function J(i) {
135
+ return !!(typeof i == "string" || typeof i == "function" || i === u.Fragment || i === s || i === g || i === r || i === c || i === l || i === L || _ || typeof i == "object" && i !== null && (i.$$typeof === m || i.$$typeof === j || i.$$typeof === F || i.$$typeof === o || i.$$typeof === d || i.$$typeof === S || i.$$typeof === C || i[0] === v));
136
136
  }
137
- function Du(i, h, w) {
138
- var M = h.displayName || h.name || "";
139
- return i.displayName || (M !== "" ? w + "(" + M + ")" : w);
137
+ function W(i, p, w) {
138
+ var $ = p.displayName || p.name || "";
139
+ return i.displayName || ($ !== "" ? w + "(" + $ + ")" : w);
140
140
  }
141
- function N(i) {
141
+ function k(i) {
142
142
  return i.displayName || "Context";
143
143
  }
144
144
  function E(i) {
145
145
  if (i == null)
146
146
  return null;
147
- if (typeof i.tag == "number" && q("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof i == "function")
147
+ if (typeof i.tag == "number" && A("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof i == "function")
148
148
  return i.displayName || i.name || null;
149
149
  if (typeof i == "string")
150
150
  return i;
@@ -165,21 +165,21 @@ function c0() {
165
165
  if (typeof i == "object")
166
166
  switch (i.$$typeof) {
167
167
  case o:
168
- var h = i;
169
- return N(h) + ".Consumer";
168
+ var p = i;
169
+ return k(p) + ".Consumer";
170
170
  case F:
171
171
  var w = i;
172
- return N(w._context) + ".Provider";
172
+ return k(w._context) + ".Provider";
173
173
  case d:
174
- return Du(i, i.render, "ForwardRef");
175
- case A:
174
+ return W(i, i.render, "ForwardRef");
175
+ case j:
176
176
  return E(i.type);
177
- case m:
177
+ case C:
178
178
  return E(i._render);
179
- case C: {
180
- var M = i, Z = M._payload, J = M._init;
179
+ case m: {
180
+ var $ = i, Q = $._payload, G = $._init;
181
181
  try {
182
- return E(J(Z));
182
+ return E(G(Q));
183
183
  } catch {
184
184
  return null;
185
185
  }
@@ -187,18 +187,18 @@ function c0() {
187
187
  }
188
188
  return null;
189
189
  }
190
- var p = 0, k, b, O, R, W, K, X;
191
- function z() {
190
+ var h = 0, x, B, I, R, M, V, Z;
191
+ function q() {
192
192
  }
193
- z.__reactDisabledLog = !0;
194
- function Q() {
193
+ q.__reactDisabledLog = !0;
194
+ function uu() {
195
195
  {
196
- if (p === 0) {
197
- k = console.log, b = console.info, O = console.warn, R = console.error, W = console.group, K = console.groupCollapsed, X = console.groupEnd;
196
+ if (h === 0) {
197
+ x = console.log, B = console.info, I = console.warn, R = console.error, M = console.group, V = console.groupCollapsed, Z = console.groupEnd;
198
198
  var i = {
199
199
  configurable: !0,
200
200
  enumerable: !0,
201
- value: z,
201
+ value: q,
202
202
  writable: !0
203
203
  };
204
204
  Object.defineProperties(console, {
@@ -211,12 +211,12 @@ function c0() {
211
211
  groupEnd: i
212
212
  });
213
213
  }
214
- p++;
214
+ h++;
215
215
  }
216
216
  }
217
217
  function nu() {
218
218
  {
219
- if (p--, p === 0) {
219
+ if (h--, h === 0) {
220
220
  var i = {
221
221
  configurable: !0,
222
222
  enumerable: !0,
@@ -224,40 +224,40 @@ function c0() {
224
224
  };
225
225
  Object.defineProperties(console, {
226
226
  log: e({}, i, {
227
- value: k
227
+ value: x
228
228
  }),
229
229
  info: e({}, i, {
230
- value: b
230
+ value: B
231
231
  }),
232
232
  warn: e({}, i, {
233
- value: O
233
+ value: I
234
234
  }),
235
235
  error: e({}, i, {
236
236
  value: R
237
237
  }),
238
238
  group: e({}, i, {
239
- value: W
239
+ value: M
240
240
  }),
241
241
  groupCollapsed: e({}, i, {
242
- value: K
242
+ value: V
243
243
  }),
244
244
  groupEnd: e({}, i, {
245
- value: X
245
+ value: Z
246
246
  })
247
247
  });
248
248
  }
249
- p < 0 && q("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
249
+ h < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
250
250
  }
251
251
  }
252
- var lu = v.ReactCurrentDispatcher, _u;
253
- function gu(i, h, w) {
252
+ var lu = z.ReactCurrentDispatcher, _u;
253
+ function gu(i, p, w) {
254
254
  {
255
255
  if (_u === void 0)
256
256
  try {
257
257
  throw Error();
258
- } catch (Z) {
259
- var M = Z.stack.trim().match(/\n( *(at )?)/);
260
- _u = M && M[1] || "";
258
+ } catch (Q) {
259
+ var $ = Q.stack.trim().match(/\n( *(at )?)/);
260
+ _u = $ && $[1] || "";
261
261
  }
262
262
  return `
263
263
  ` + _u + i;
@@ -268,7 +268,7 @@ function c0() {
268
268
  var Iu = typeof WeakMap == "function" ? WeakMap : Map;
269
269
  Cu = new Iu();
270
270
  }
271
- function Lu(i, h) {
271
+ function Lu(i, p) {
272
272
  if (!i || au)
273
273
  return "";
274
274
  {
@@ -276,57 +276,57 @@ function c0() {
276
276
  if (w !== void 0)
277
277
  return w;
278
278
  }
279
- var M;
279
+ var $;
280
280
  au = !0;
281
- var Z = Error.prepareStackTrace;
281
+ var Q = Error.prepareStackTrace;
282
282
  Error.prepareStackTrace = void 0;
283
- var J;
284
- J = lu.current, lu.current = null, Q();
283
+ var G;
284
+ G = lu.current, lu.current = null, uu();
285
285
  try {
286
- if (h) {
287
- var Y = function() {
286
+ if (p) {
287
+ var K = function() {
288
288
  throw Error();
289
289
  };
290
- if (Object.defineProperty(Y.prototype, "props", {
290
+ if (Object.defineProperty(K.prototype, "props", {
291
291
  set: function() {
292
292
  throw Error();
293
293
  }
294
294
  }), typeof Reflect == "object" && Reflect.construct) {
295
295
  try {
296
- Reflect.construct(Y, []);
296
+ Reflect.construct(K, []);
297
297
  } catch (Mu) {
298
- M = Mu;
298
+ $ = Mu;
299
299
  }
300
- Reflect.construct(i, [], Y);
300
+ Reflect.construct(i, [], K);
301
301
  } else {
302
302
  try {
303
- Y.call();
303
+ K.call();
304
304
  } catch (Mu) {
305
- M = Mu;
305
+ $ = Mu;
306
306
  }
307
- i.call(Y.prototype);
307
+ i.call(K.prototype);
308
308
  }
309
309
  } else {
310
310
  try {
311
311
  throw Error();
312
312
  } catch (Mu) {
313
- M = Mu;
313
+ $ = Mu;
314
314
  }
315
315
  i();
316
316
  }
317
317
  } catch (Mu) {
318
- if (Mu && M && typeof Mu.stack == "string") {
319
- for (var V = Mu.stack.split(`
320
- `), bu = M.stack.split(`
321
- `), ru = V.length - 1, Fu = bu.length - 1; ru >= 1 && Fu >= 0 && V[ru] !== bu[Fu]; )
318
+ if (Mu && $ && typeof Mu.stack == "string") {
319
+ for (var H = Mu.stack.split(`
320
+ `), bu = $.stack.split(`
321
+ `), ru = H.length - 1, Fu = bu.length - 1; ru >= 1 && Fu >= 0 && H[ru] !== bu[Fu]; )
322
322
  Fu--;
323
323
  for (; ru >= 1 && Fu >= 0; ru--, Fu--)
324
- if (V[ru] !== bu[Fu]) {
324
+ if (H[ru] !== bu[Fu]) {
325
325
  if (ru !== 1 || Fu !== 1)
326
326
  do
327
- if (ru--, Fu--, Fu < 0 || V[ru] !== bu[Fu]) {
327
+ if (ru--, Fu--, Fu < 0 || H[ru] !== bu[Fu]) {
328
328
  var $u = `
329
- ` + V[ru].replace(" at new ", " at ");
329
+ ` + H[ru].replace(" at new ", " at ");
330
330
  return typeof i == "function" && Cu.set(i, $u), $u;
331
331
  }
332
332
  while (ru >= 1 && Fu >= 0);
@@ -334,19 +334,19 @@ function c0() {
334
334
  }
335
335
  }
336
336
  } finally {
337
- au = !1, lu.current = J, nu(), Error.prepareStackTrace = Z;
337
+ au = !1, lu.current = G, nu(), Error.prepareStackTrace = Q;
338
338
  }
339
- var DD = i ? i.displayName || i.name : "", Tf = DD ? gu(DD) : "";
339
+ var fD = i ? i.displayName || i.name : "", Tf = fD ? gu(fD) : "";
340
340
  return typeof i == "function" && Cu.set(i, Tf), Tf;
341
341
  }
342
- function j(i, h, w) {
342
+ function O(i, p, w) {
343
343
  return Lu(i, !1);
344
344
  }
345
345
  function fu(i) {
346
- var h = i.prototype;
347
- return !!(h && h.isReactComponent);
346
+ var p = i.prototype;
347
+ return !!(p && p.isReactComponent);
348
348
  }
349
- function su(i, h, w) {
349
+ function su(i, p, w) {
350
350
  if (i == null)
351
351
  return "";
352
352
  if (typeof i == "function")
@@ -362,49 +362,49 @@ function c0() {
362
362
  if (typeof i == "object")
363
363
  switch (i.$$typeof) {
364
364
  case d:
365
- return j(i.render);
366
- case A:
367
- return su(i.type, h, w);
368
- case m:
369
- return j(i._render);
370
- case C: {
371
- var M = i, Z = M._payload, J = M._init;
365
+ return O(i.render);
366
+ case j:
367
+ return su(i.type, p, w);
368
+ case C:
369
+ return O(i._render);
370
+ case m: {
371
+ var $ = i, Q = $._payload, G = $._init;
372
372
  try {
373
- return su(J(Z), h, w);
373
+ return su(G(Q), p, w);
374
374
  } catch {
375
375
  }
376
376
  }
377
377
  }
378
378
  return "";
379
379
  }
380
- var Eu = {}, mu = v.ReactDebugCurrentFrame;
381
- function Uu(i) {
380
+ var Eu = {}, mu = z.ReactDebugCurrentFrame;
381
+ function Vu(i) {
382
382
  if (i) {
383
- var h = i._owner, w = su(i.type, i._source, h ? h.type : null);
383
+ var p = i._owner, w = su(i.type, i._source, p ? p.type : null);
384
384
  mu.setExtraStackFrame(w);
385
385
  } else
386
386
  mu.setExtraStackFrame(null);
387
387
  }
388
- function Y1(i, h, w, M, Z) {
388
+ function Y1(i, p, w, $, Q) {
389
389
  {
390
- var J = Function.call.bind(Object.prototype.hasOwnProperty);
391
- for (var Y in i)
392
- if (J(i, Y)) {
393
- var V = void 0;
390
+ var G = Function.call.bind(Object.prototype.hasOwnProperty);
391
+ for (var K in i)
392
+ if (G(i, K)) {
393
+ var H = void 0;
394
394
  try {
395
- if (typeof i[Y] != "function") {
396
- var bu = Error((M || "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`.");
395
+ if (typeof i[K] != "function") {
396
+ var bu = Error(($ || "React class") + ": " + w + " type `" + K + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[K] + "`.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
- V = i[Y](h, Y, M, w, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
399
+ H = i[K](p, K, $, w, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
400
400
  } catch (ru) {
401
- V = ru;
401
+ H = ru;
402
402
  }
403
- V && !(V instanceof Error) && (Uu(Z), q("%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).", M || "React class", w, Y, typeof V), Uu(null)), V instanceof Error && !(V.message in Eu) && (Eu[V.message] = !0, Uu(Z), q("Failed %s type: %s", w, V.message), Uu(null));
403
+ H && !(H instanceof Error) && (Vu(Q), A("%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, K, typeof H), Vu(null)), H instanceof Error && !(H.message in Eu) && (Eu[H.message] = !0, Vu(Q), A("Failed %s type: %s", w, H.message), Vu(null));
404
404
  }
405
405
  }
406
406
  }
407
- var _f = v.ReactCurrentOwner, TD = Object.prototype.hasOwnProperty, K1 = {
407
+ var _f = z.ReactCurrentOwner, TD = Object.prototype.hasOwnProperty, K1 = {
408
408
  key: !0,
409
409
  ref: !0,
410
410
  __self: !0,
@@ -412,27 +412,27 @@ function c0() {
412
412
  }, yf, vf;
413
413
  function J1(i) {
414
414
  if (TD.call(i, "ref")) {
415
- var h = Object.getOwnPropertyDescriptor(i, "ref").get;
416
- if (h && h.isReactWarning)
415
+ var p = Object.getOwnPropertyDescriptor(i, "ref").get;
416
+ if (p && p.isReactWarning)
417
417
  return !1;
418
418
  }
419
419
  return i.ref !== void 0;
420
420
  }
421
421
  function G1(i) {
422
422
  if (TD.call(i, "key")) {
423
- var h = Object.getOwnPropertyDescriptor(i, "key").get;
424
- if (h && h.isReactWarning)
423
+ var p = Object.getOwnPropertyDescriptor(i, "key").get;
424
+ if (p && p.isReactWarning)
425
425
  return !1;
426
426
  }
427
427
  return i.key !== void 0;
428
428
  }
429
- function X1(i, h) {
429
+ function X1(i, p) {
430
430
  typeof i.ref == "string" && _f.current;
431
431
  }
432
- function Z1(i, h) {
432
+ function Z1(i, p) {
433
433
  {
434
434
  var w = function() {
435
- yf || (yf = !0, q("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
435
+ yf || (yf = !0, A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
436
436
  };
437
437
  w.isReactWarning = !0, Object.defineProperty(i, "key", {
438
438
  get: w,
@@ -440,10 +440,10 @@ function c0() {
440
440
  });
441
441
  }
442
442
  }
443
- function Q1(i, h) {
443
+ function Q1(i, p) {
444
444
  {
445
445
  var w = function() {
446
- vf || (vf = !0, q("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
446
+ vf || (vf = !0, A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
447
447
  };
448
448
  w.isReactWarning = !0, Object.defineProperty(i, "ref", {
449
449
  get: w,
@@ -451,57 +451,57 @@ function c0() {
451
451
  });
452
452
  }
453
453
  }
454
- var u0 = function(i, h, w, M, Z, J, Y) {
455
- var V = {
454
+ var u0 = function(i, p, w, $, Q, G, K) {
455
+ var H = {
456
456
  // This tag allows us to uniquely identify this as a React Element
457
457
  $$typeof: t,
458
458
  // Built-in properties that belong on the element
459
459
  type: i,
460
- key: h,
460
+ key: p,
461
461
  ref: w,
462
- props: Y,
462
+ props: K,
463
463
  // Record the component responsible for creating this element.
464
- _owner: J
464
+ _owner: G
465
465
  };
466
- return V._store = {}, Object.defineProperty(V._store, "validated", {
466
+ return H._store = {}, Object.defineProperty(H._store, "validated", {
467
467
  configurable: !1,
468
468
  enumerable: !1,
469
469
  writable: !0,
470
470
  value: !1
471
- }), Object.defineProperty(V, "_self", {
471
+ }), Object.defineProperty(H, "_self", {
472
472
  configurable: !1,
473
473
  enumerable: !1,
474
474
  writable: !1,
475
- value: M
476
- }), Object.defineProperty(V, "_source", {
475
+ value: $
476
+ }), Object.defineProperty(H, "_source", {
477
477
  configurable: !1,
478
478
  enumerable: !1,
479
479
  writable: !1,
480
- value: Z
481
- }), Object.freeze && (Object.freeze(V.props), Object.freeze(V)), V;
480
+ value: Q
481
+ }), Object.freeze && (Object.freeze(H.props), Object.freeze(H)), H;
482
482
  };
483
- function D0(i, h, w, M, Z) {
483
+ function D0(i, p, w, $, Q) {
484
484
  {
485
- var J, Y = {}, V = null, bu = null;
486
- w !== void 0 && (V = "" + w), G1(h) && (V = "" + h.key), J1(h) && (bu = h.ref, X1(h, Z));
487
- for (J in h)
488
- TD.call(h, J) && !K1.hasOwnProperty(J) && (Y[J] = h[J]);
485
+ var G, K = {}, H = null, bu = null;
486
+ w !== void 0 && (H = "" + w), G1(p) && (H = "" + p.key), J1(p) && (bu = p.ref, X1(p, Q));
487
+ for (G in p)
488
+ TD.call(p, G) && !K1.hasOwnProperty(G) && (K[G] = p[G]);
489
489
  if (i && i.defaultProps) {
490
490
  var ru = i.defaultProps;
491
- for (J in ru)
492
- Y[J] === void 0 && (Y[J] = ru[J]);
491
+ for (G in ru)
492
+ K[G] === void 0 && (K[G] = ru[G]);
493
493
  }
494
- if (V || bu) {
494
+ if (H || bu) {
495
495
  var Fu = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
496
- V && Z1(Y, Fu), bu && Q1(Y, Fu);
496
+ H && Z1(K, Fu), bu && Q1(K, Fu);
497
497
  }
498
- return u0(i, V, bu, Z, M, _f.current, Y);
498
+ return u0(i, H, bu, Q, $, _f.current, K);
499
499
  }
500
500
  }
501
- var ND = v.ReactCurrentOwner, wf = v.ReactDebugCurrentFrame;
502
- function uD(i) {
501
+ var ND = z.ReactCurrentOwner, wf = z.ReactDebugCurrentFrame;
502
+ function DD(i) {
503
503
  if (i) {
504
- var h = i._owner, w = su(i.type, i._source, h ? h.type : null);
504
+ var p = i._owner, w = su(i.type, i._source, p ? p.type : null);
505
505
  wf.setExtraStackFrame(w);
506
506
  } else
507
507
  wf.setExtraStackFrame(null);
@@ -529,120 +529,120 @@ Check the render method of \`` + i + "`.";
529
529
  var xf = {};
530
530
  function e0(i) {
531
531
  {
532
- var h = Af();
533
- if (!h) {
532
+ var p = Af();
533
+ if (!p) {
534
534
  var w = typeof i == "string" ? i : i.displayName || i.name;
535
- w && (h = `
535
+ w && (p = `
536
536
 
537
537
  Check the top-level render call using <` + w + ">.");
538
538
  }
539
- return h;
539
+ return p;
540
540
  }
541
541
  }
542
- function kf(i, h) {
542
+ function kf(i, p) {
543
543
  {
544
544
  if (!i._store || i._store.validated || i.key != null)
545
545
  return;
546
546
  i._store.validated = !0;
547
- var w = e0(h);
547
+ var w = e0(p);
548
548
  if (xf[w])
549
549
  return;
550
550
  xf[w] = !0;
551
- var M = "";
552
- i && i._owner && i._owner !== ND.current && (M = " It was passed a child from " + E(i._owner.type) + "."), uD(i), q('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', w, M), uD(null);
551
+ var $ = "";
552
+ i && i._owner && i._owner !== ND.current && ($ = " It was passed a child from " + E(i._owner.type) + "."), DD(i), A('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
- function jf(i, h) {
555
+ function jf(i, p) {
556
556
  {
557
557
  if (typeof i != "object")
558
558
  return;
559
559
  if (Array.isArray(i))
560
560
  for (var w = 0; w < i.length; w++) {
561
- var M = i[w];
562
- RD(M) && kf(M, h);
561
+ var $ = i[w];
562
+ RD($) && kf($, p);
563
563
  }
564
564
  else if (RD(i))
565
565
  i._store && (i._store.validated = !0);
566
566
  else if (i) {
567
- var Z = y(i);
568
- if (typeof Z == "function" && Z !== i.entries)
569
- for (var J = Z.call(i), Y; !(Y = J.next()).done; )
570
- RD(Y.value) && kf(Y.value, h);
567
+ var Q = N(i);
568
+ if (typeof Q == "function" && Q !== i.entries)
569
+ for (var G = Q.call(i), K; !(K = G.next()).done; )
570
+ RD(K.value) && kf(K.value, p);
571
571
  }
572
572
  }
573
573
  }
574
574
  function t0(i) {
575
575
  {
576
- var h = i.type;
577
- if (h == null || typeof h == "string")
576
+ var p = i.type;
577
+ if (p == null || typeof p == "string")
578
578
  return;
579
579
  var w;
580
- if (typeof h == "function")
581
- w = h.propTypes;
582
- else if (typeof h == "object" && (h.$$typeof === d || // Note: Memo only checks outer props here.
580
+ if (typeof p == "function")
581
+ w = p.propTypes;
582
+ else if (typeof p == "object" && (p.$$typeof === d || // Note: Memo only checks outer props here.
583
583
  // Inner props are checked in the reconciler.
584
- h.$$typeof === A))
585
- w = h.propTypes;
584
+ p.$$typeof === j))
585
+ w = p.propTypes;
586
586
  else
587
587
  return;
588
588
  if (w) {
589
- var M = E(h);
590
- Y1(w, i.props, "prop", M, i);
591
- } else if (h.PropTypes !== void 0 && !OD) {
589
+ var $ = E(p);
590
+ Y1(w, i.props, "prop", $, i);
591
+ } else if (p.PropTypes !== void 0 && !OD) {
592
592
  OD = !0;
593
- var Z = E(h);
594
- q("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Z || "Unknown");
593
+ var Q = E(p);
594
+ A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Q || "Unknown");
595
595
  }
596
- typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && q("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
596
+ typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
597
597
  }
598
598
  }
599
599
  function n0(i) {
600
600
  {
601
- for (var h = Object.keys(i.props), w = 0; w < h.length; w++) {
602
- var M = h[w];
603
- if (M !== "children" && M !== "key") {
604
- uD(i), q("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", M), uD(null);
601
+ for (var p = Object.keys(i.props), w = 0; w < p.length; w++) {
602
+ var $ = p[w];
603
+ if ($ !== "children" && $ !== "key") {
604
+ DD(i), A("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
- i.ref !== null && (uD(i), q("Invalid attribute `ref` supplied to `React.Fragment`."), uD(null));
608
+ i.ref !== null && (DD(i), A("Invalid attribute `ref` supplied to `React.Fragment`."), DD(null));
609
609
  }
610
610
  }
611
- function Sf(i, h, w, M, Z, J) {
611
+ function Sf(i, p, w, $, Q, G) {
612
612
  {
613
- var Y = $(i);
614
- if (!Y) {
615
- var V = "";
616
- (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (V += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
613
+ var K = J(i);
614
+ if (!K) {
615
+ var H = "";
616
+ (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (H += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
617
617
  var bu = f0();
618
- bu ? V += bu : V += Af();
618
+ bu ? H += bu : H += Af();
619
619
  var ru;
620
- i === null ? ru = "null" : Array.isArray(i) ? ru = "array" : i !== void 0 && i.$$typeof === t ? (ru = "<" + (E(i.type) || "Unknown") + " />", V = " Did you accidentally export a JSX literal instead of a component?") : ru = typeof i, q("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ru, V);
620
+ i === null ? ru = "null" : Array.isArray(i) ? ru = "array" : i !== void 0 && i.$$typeof === t ? (ru = "<" + (E(i.type) || "Unknown") + " />", H = " Did you accidentally export a JSX literal instead of a component?") : ru = typeof i, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ru, H);
621
621
  }
622
- var Fu = D0(i, h, w, Z, J);
622
+ var Fu = D0(i, p, w, Q, G);
623
623
  if (Fu == null)
624
624
  return Fu;
625
- if (Y) {
626
- var $u = h.children;
625
+ if (K) {
626
+ var $u = p.children;
627
627
  if ($u !== void 0)
628
- if (M)
628
+ if ($)
629
629
  if (Array.isArray($u)) {
630
- for (var DD = 0; DD < $u.length; DD++)
631
- jf($u[DD], i);
630
+ for (var fD = 0; fD < $u.length; fD++)
631
+ jf($u[fD], i);
632
632
  Object.freeze && Object.freeze($u);
633
633
  } else
634
- q("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
634
+ A("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
636
  jf($u, i);
637
637
  }
638
638
  return i === u.Fragment ? n0(Fu) : t0(Fu), Fu;
639
639
  }
640
640
  }
641
- function r0(i, h, w) {
642
- return Sf(i, h, w, !0);
641
+ function r0(i, p, w) {
642
+ return Sf(i, p, w, !0);
643
643
  }
644
- function a0(i, h, w) {
645
- return Sf(i, h, w, !1);
644
+ function a0(i, p, w) {
645
+ return Sf(i, p, w, !1);
646
646
  }
647
647
  var s0 = a0, F0 = r0;
648
648
  u.jsx = s0, u.jsxs = F0;
@@ -650,16 +650,16 @@ Check the top-level render call using <` + w + ">.");
650
650
  }(ID)), ID;
651
651
  }
652
652
  var l0 = {};
653
- l0.NODE_ENV === "production" ? HD.exports = C0() : HD.exports = c0();
654
- var a = HD.exports;
655
- const Gf = qu(void 0), Xf = ({
653
+ l0.NODE_ENV === "production" ? WD.exports = C0() : WD.exports = c0();
654
+ var a = WD.exports;
655
+ const Gf = zu(void 0), Xf = ({
656
656
  children: u,
657
657
  channelName: D
658
658
  }) => {
659
659
  const f = pu(
660
660
  new BroadcastChannel(D)
661
661
  ), e = pu({});
662
- G(() => {
662
+ X(() => {
663
663
  const r = ({ data: s }) => {
664
664
  e.current[s.event].forEach((F) => F(s));
665
665
  };
@@ -687,7 +687,7 @@ const Gf = qu(void 0), Xf = ({
687
687
  }
688
688
  );
689
689
  }, E0 = () => {
690
- const u = Yu(Gf);
690
+ const u = Ku(Gf);
691
691
  if (!u)
692
692
  throw new Error(
693
693
  "useBroadcastChannel must be used within a BroadcastChannelProvider"
@@ -695,26 +695,26 @@ const Gf = qu(void 0), Xf = ({
695
695
  return u;
696
696
  }, h0 = (...u) => {
697
697
  const { subscribe: D } = E0();
698
- G(() => {
698
+ X(() => {
699
699
  D(...u);
700
700
  }, [D, ...u]);
701
701
  };
702
- var WD = /* @__PURE__ */ ((u) => (u.message = "message", u.delivery = "delivery", u.read = "read", u.typing = "typing", u.follow = "follow", u.echo = "echo", u.unknown = "", u))(WD || {}), uu = /* @__PURE__ */ ((u) => (u.sent = "sent", u.received = "received", u))(uu || {}), Zf = /* @__PURE__ */ ((u) => (u.text = "text", u.location = "location", u))(Zf || {}), Au = /* @__PURE__ */ ((u) => (u.text = "text", u.quick_reply = "quick_reply", u.postback = "postback", u.location = "location", u.file = "file", u.notify = "notify", u))(Au || {}), YD = /* @__PURE__ */ ((u) => (u.text = "text", u.buttons = "buttons", u.quick_replies = "quick_replies", u.file = "file", u.list = "list", u.carousel = "carousel", u))(YD || {}), iD = /* @__PURE__ */ ((u) => (u[u.sent = 0] = "sent", u[u.sending = 1] = "sending", u[u.uploading = 2] = "uploading", u))(iD || {}), eD = /* @__PURE__ */ ((u) => (u[u.disconnected = 0] = "disconnected", u[u.wantToConnect = 1] = "wantToConnect", u[u.tryingToConnect = 2] = "tryingToConnect", u[u.connected = 3] = "connected", u))(eD || {}), rD = {};
702
+ var HD = /* @__PURE__ */ ((u) => (u.message = "message", u.delivery = "delivery", u.read = "read", u.typing = "typing", u.follow = "follow", u.echo = "echo", u.unknown = "", u))(HD || {}), Du = /* @__PURE__ */ ((u) => (u.sent = "sent", u.received = "received", u))(Du || {}), Zf = /* @__PURE__ */ ((u) => (u.text = "text", u.location = "location", u))(Zf || {}), Au = /* @__PURE__ */ ((u) => (u.text = "text", u.quick_reply = "quick_reply", u.postback = "postback", u.location = "location", u.file = "file", u.notify = "notify", u))(Au || {}), YD = /* @__PURE__ */ ((u) => (u.text = "text", u.buttons = "buttons", u.quick_replies = "quick_replies", u.file = "file", u.list = "list", u.carousel = "carousel", u))(YD || {}), iD = /* @__PURE__ */ ((u) => (u[u.sent = 0] = "sent", u[u.sending = 1] = "sending", u[u.uploading = 2] = "uploading", u))(iD || {}), tD = /* @__PURE__ */ ((u) => (u[u.disconnected = 0] = "disconnected", u[u.wantToConnect = 1] = "wantToConnect", u[u.tryingToConnect = 2] = "tryingToConnect", u[u.connected = 3] = "connected", u))(tD || {}), aD = {};
703
703
  const Qf = {
704
- apiUrl: rD.REACT_APP_WIDGET_API_URL || "http://localhost:4000",
705
- channel: rD.REACT_APP_WIDGET_CHANNEL || "console-channel",
704
+ apiUrl: aD.REACT_APP_WIDGET_API_URL || "http://localhost:4000",
705
+ channel: aD.REACT_APP_WIDGET_CHANNEL || "console-channel",
706
706
  language: "en",
707
- maxUploadSize: rD.UPLOAD_MAX_SIZE_IN_BYTES ?? "" ? Number(rD.UPLOAD_MAX_SIZE_IN_BYTES) : 20 * 1024 * 1024,
707
+ maxUploadSize: aD.UPLOAD_MAX_SIZE_IN_BYTES ?? "" ? Number(aD.UPLOAD_MAX_SIZE_IN_BYTES) : 20 * 1024 * 1024,
708
708
  // 20 MB in bytes
709
- ownerId: rD.REACT_APP_WIDGET_OWNER_ID || "68342cec1e3cef0065f1b563"
710
- }, u1 = qu(Qf), D1 = ({ children: u, ...D }) => {
709
+ ownerId: aD.REACT_APP_WIDGET_OWNER_ID || "68342cec1e3cef0065f1b563"
710
+ }, u1 = zu(Qf), D1 = ({ children: u, ...D }) => {
711
711
  const f = pu({
712
712
  ...Qf,
713
713
  ...D
714
714
  });
715
715
  return /* @__PURE__ */ a.jsx(u1.Provider, { value: f.current, children: u });
716
- }, zu = () => {
717
- const u = Yu(u1);
716
+ }, Uu = () => {
717
+ const u = Ku(u1);
718
718
  if (!u)
719
719
  throw new Error("useConfig must be used within a ConfigProvider");
720
720
  return u;
@@ -766,12 +766,12 @@ const Qf = {
766
766
  user_subscription: m0,
767
767
  settings: _0,
768
768
  messages: y0
769
- }, Pf = { en: g0, fr: v0 }, f1 = qu(
769
+ }, Pf = { en: g0, fr: v0 }, f1 = zu(
770
770
  void 0
771
771
  ), e1 = ({
772
772
  children: u
773
773
  }) => {
774
- const f = zu().language, e = (r) => r in Pf, [t, n] = U(
774
+ const f = Uu().language, e = (r) => r in Pf, [t, n] = U(
775
775
  e(f) ? f : "en"
776
776
  );
777
777
  return /* @__PURE__ */ a.jsx(
@@ -782,7 +782,7 @@ const Qf = {
782
782
  }
783
783
  );
784
784
  }, w0 = () => {
785
- const u = Yu(f1);
785
+ const u = Ku(f1);
786
786
  if (!u)
787
787
  throw new Error(
788
788
  "useTranslationContext must be used within a TranslationProvider"
@@ -793,7 +793,7 @@ const Qf = {
793
793
  return f[e];
794
794
  }, u), Ou = () => {
795
795
  const { translations: u, language: D } = w0();
796
- return { t: Vu(
796
+ return { t: qu(
797
797
  (e, t = {}) => (A0(u[D], e) || e).replace(
798
798
  /{(\w+)}/g,
799
799
  (r, s) => t[s] || `{${s}}`
@@ -1045,13 +1045,13 @@ function V0(u) {
1045
1045
  function o1() {
1046
1046
  return Date.now().toString(36).substring(3) + Math.random().toString(36).substring(2, 5);
1047
1047
  }
1048
- function H0(u) {
1048
+ function W0(u) {
1049
1049
  let D = "";
1050
1050
  for (let f in u)
1051
1051
  u.hasOwnProperty(f) && (D.length && (D += "&"), D += encodeURIComponent(f) + "=" + encodeURIComponent(u[f]));
1052
1052
  return D;
1053
1053
  }
1054
- function W0(u) {
1054
+ function H0(u) {
1055
1055
  let D = {}, f = u.split("&");
1056
1056
  for (let e = 0, t = f.length; e < t; e++) {
1057
1057
  let n = f[e].split("=");
@@ -1158,7 +1158,7 @@ class df extends iu {
1158
1158
  return this.opts.port && (this.opts.secure && +(this.opts.port !== 443) || !this.opts.secure && Number(this.opts.port) !== 80) ? ":" + this.opts.port : "";
1159
1159
  }
1160
1160
  _query(D) {
1161
- const f = H0(D);
1161
+ const f = W0(D);
1162
1162
  return f.length ? "?" + f : "";
1163
1163
  }
1164
1164
  }
@@ -1629,7 +1629,7 @@ class Hu extends iu {
1629
1629
  },
1630
1630
  transportOptions: {},
1631
1631
  closeOnBeforeunload: !1
1632
- }, f), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = W0(this.opts.query)), GD && (this.opts.closeOnBeforeunload && (this._beforeunloadEventListener = () => {
1632
+ }, f), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = H0(this.opts.query)), GD && (this.opts.closeOnBeforeunload && (this._beforeunloadEventListener = () => {
1633
1633
  this.transport && (this.transport.removeAllListeners(), this.transport.close());
1634
1634
  }, addEventListener("beforeunload", this._beforeunloadEventListener, !1)), this.hostname !== "localhost" && (this._offlineEventListener = () => {
1635
1635
  this._onClose("transport close", {
@@ -2027,10 +2027,10 @@ const he = [
2027
2027
  "removeListener"
2028
2028
  // used by the Node.js EventEmitter
2029
2029
  ], be = 5;
2030
- var H;
2030
+ var Y;
2031
2031
  (function(u) {
2032
2032
  u[u.CONNECT = 0] = "CONNECT", u[u.DISCONNECT = 1] = "DISCONNECT", u[u.EVENT = 2] = "EVENT", u[u.ACK = 3] = "ACK", u[u.CONNECT_ERROR = 4] = "CONNECT_ERROR", u[u.BINARY_EVENT = 5] = "BINARY_EVENT", u[u.BINARY_ACK = 6] = "BINARY_ACK";
2033
- })(H || (H = {}));
2033
+ })(Y || (Y = {}));
2034
2034
  class pe {
2035
2035
  /**
2036
2036
  * Encoder constructor
@@ -2047,8 +2047,8 @@ class pe {
2047
2047
  * @param {Object} obj - packet object
2048
2048
  */
2049
2049
  encode(D) {
2050
- return (D.type === H.EVENT || D.type === H.ACK) && gD(D) ? this.encodeAsBinary({
2051
- type: D.type === H.EVENT ? H.BINARY_EVENT : H.BINARY_ACK,
2050
+ return (D.type === Y.EVENT || D.type === Y.ACK) && gD(D) ? this.encodeAsBinary({
2051
+ type: D.type === Y.EVENT ? Y.BINARY_EVENT : Y.BINARY_ACK,
2052
2052
  nsp: D.nsp,
2053
2053
  data: D.data,
2054
2054
  id: D.id
@@ -2059,7 +2059,7 @@ class pe {
2059
2059
  */
2060
2060
  encodeAsString(D) {
2061
2061
  let f = "" + D.type;
2062
- return (D.type === H.BINARY_EVENT || D.type === H.BINARY_ACK) && (f += D.attachments + "-"), D.nsp && D.nsp !== "/" && (f += D.nsp + ","), D.id != null && (f += D.id), D.data != null && (f += JSON.stringify(D.data, this.replacer)), f;
2062
+ return (D.type === Y.BINARY_EVENT || D.type === Y.BINARY_ACK) && (f += D.attachments + "-"), D.nsp && D.nsp !== "/" && (f += D.nsp + ","), D.id != null && (f += D.id), D.data != null && (f += JSON.stringify(D.data, this.replacer)), f;
2063
2063
  }
2064
2064
  /**
2065
2065
  * Encode packet as 'buffer sequence' by removing blobs, and
@@ -2094,8 +2094,8 @@ class cf extends iu {
2094
2094
  if (this.reconstructor)
2095
2095
  throw new Error("got plaintext data when reconstructing a packet");
2096
2096
  f = this.decodeString(D);
2097
- const e = f.type === H.BINARY_EVENT;
2098
- e || f.type === H.BINARY_ACK ? (f.type = e ? H.EVENT : H.ACK, this.reconstructor = new Be(f), f.attachments === 0 && super.emitReserved("decoded", f)) : super.emitReserved("decoded", f);
2097
+ const e = f.type === Y.BINARY_EVENT;
2098
+ e || f.type === Y.BINARY_ACK ? (f.type = e ? Y.EVENT : Y.ACK, this.reconstructor = new Be(f), f.attachments === 0 && super.emitReserved("decoded", f)) : super.emitReserved("decoded", f);
2099
2099
  } else if (Cf(D) || D.base64)
2100
2100
  if (this.reconstructor)
2101
2101
  f = this.reconstructor.takeBinaryData(D), f && (this.reconstructor = null, super.emitReserved("decoded", f));
@@ -2115,9 +2115,9 @@ class cf extends iu {
2115
2115
  const e = {
2116
2116
  type: Number(D.charAt(0))
2117
2117
  };
2118
- if (H[e.type] === void 0)
2118
+ if (Y[e.type] === void 0)
2119
2119
  throw new Error("unknown packet type " + e.type);
2120
- if (e.type === H.BINARY_EVENT || e.type === H.BINARY_ACK) {
2120
+ if (e.type === Y.BINARY_EVENT || e.type === Y.BINARY_ACK) {
2121
2121
  const n = f + 1;
2122
2122
  for (; D.charAt(++f) !== "-" && f != D.length; )
2123
2123
  ;
@@ -2165,17 +2165,17 @@ class cf extends iu {
2165
2165
  }
2166
2166
  static isPayloadValid(D, f) {
2167
2167
  switch (D) {
2168
- case H.CONNECT:
2168
+ case Y.CONNECT:
2169
2169
  return zf(f);
2170
- case H.DISCONNECT:
2170
+ case Y.DISCONNECT:
2171
2171
  return f === void 0;
2172
- case H.CONNECT_ERROR:
2172
+ case Y.CONNECT_ERROR:
2173
2173
  return typeof f == "string" || zf(f);
2174
- case H.EVENT:
2175
- case H.BINARY_EVENT:
2174
+ case Y.EVENT:
2175
+ case Y.BINARY_EVENT:
2176
2176
  return Array.isArray(f) && (typeof f[0] == "number" || typeof f[0] == "string" && he.indexOf(f[0]) === -1);
2177
- case H.ACK:
2178
- case H.BINARY_ACK:
2177
+ case Y.ACK:
2178
+ case Y.BINARY_ACK:
2179
2179
  return Array.isArray(f);
2180
2180
  }
2181
2181
  }
@@ -2217,7 +2217,7 @@ const ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2217
2217
  Decoder: cf,
2218
2218
  Encoder: pe,
2219
2219
  get PacketType() {
2220
- return H;
2220
+ return Y;
2221
2221
  },
2222
2222
  protocol: be
2223
2223
  }, Symbol.toStringTag, { value: "Module" }));
@@ -2356,7 +2356,7 @@ class E1 extends iu {
2356
2356
  if (f.unshift(D), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile)
2357
2357
  return this._addToQueue(f), this;
2358
2358
  const r = {
2359
- type: H.EVENT,
2359
+ type: Y.EVENT,
2360
2360
  data: f
2361
2361
  };
2362
2362
  if (r.options = {}, r.options.compress = this.flags.compress !== !1, typeof f[f.length - 1] == "function") {
@@ -2464,7 +2464,7 @@ class E1 extends iu {
2464
2464
  */
2465
2465
  _sendConnectPacket(D) {
2466
2466
  this.packet({
2467
- type: H.CONNECT,
2467
+ type: Y.CONNECT,
2468
2468
  data: this._pid ? Object.assign({ pid: this._pid, offset: this._lastOffset }, D) : D
2469
2469
  });
2470
2470
  }
@@ -2510,21 +2510,21 @@ class E1 extends iu {
2510
2510
  onpacket(D) {
2511
2511
  if (D.nsp === this.nsp)
2512
2512
  switch (D.type) {
2513
- case H.CONNECT:
2513
+ case Y.CONNECT:
2514
2514
  D.data && D.data.sid ? this.onconnect(D.data.sid, D.data.pid) : this.emitReserved("connect_error", new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));
2515
2515
  break;
2516
- case H.EVENT:
2517
- case H.BINARY_EVENT:
2516
+ case Y.EVENT:
2517
+ case Y.BINARY_EVENT:
2518
2518
  this.onevent(D);
2519
2519
  break;
2520
- case H.ACK:
2521
- case H.BINARY_ACK:
2520
+ case Y.ACK:
2521
+ case Y.BINARY_ACK:
2522
2522
  this.onack(D);
2523
2523
  break;
2524
- case H.DISCONNECT:
2524
+ case Y.DISCONNECT:
2525
2525
  this.ondisconnect();
2526
2526
  break;
2527
- case H.CONNECT_ERROR:
2527
+ case Y.CONNECT_ERROR:
2528
2528
  this.destroy();
2529
2529
  const e = new Error(D.data.message);
2530
2530
  e.data = D.data.data, this.emitReserved("connect_error", e);
@@ -2559,7 +2559,7 @@ class E1 extends iu {
2559
2559
  let e = !1;
2560
2560
  return function(...t) {
2561
2561
  e || (e = !0, f.packet({
2562
- type: H.ACK,
2562
+ type: Y.ACK,
2563
2563
  id: D,
2564
2564
  data: t
2565
2565
  }));
@@ -2628,7 +2628,7 @@ class E1 extends iu {
2628
2628
  * @return self
2629
2629
  */
2630
2630
  disconnect() {
2631
- return this.connected && this.packet({ type: H.DISCONNECT }), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
2631
+ return this.connected && this.packet({ type: Y.DISCONNECT }), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
2632
2632
  }
2633
2633
  /**
2634
2634
  * Alias for {@link disconnect()}.
@@ -2827,10 +2827,10 @@ class E1 extends iu {
2827
2827
  }
2828
2828
  }
2829
2829
  }
2830
- function tD(u) {
2830
+ function nD(u) {
2831
2831
  u = u || {}, this.ms = u.min || 100, this.max = u.max || 1e4, this.factor = u.factor || 2, this.jitter = u.jitter > 0 && u.jitter <= 1 ? u.jitter : 0, this.attempts = 0;
2832
2832
  }
2833
- tD.prototype.duration = function() {
2833
+ nD.prototype.duration = function() {
2834
2834
  var u = this.ms * Math.pow(this.factor, this.attempts++);
2835
2835
  if (this.jitter) {
2836
2836
  var D = Math.random(), f = Math.floor(D * this.jitter * u);
@@ -2838,22 +2838,22 @@ tD.prototype.duration = function() {
2838
2838
  }
2839
2839
  return Math.min(u, this.max) | 0;
2840
2840
  };
2841
- tD.prototype.reset = function() {
2841
+ nD.prototype.reset = function() {
2842
2842
  this.attempts = 0;
2843
2843
  };
2844
- tD.prototype.setMin = function(u) {
2844
+ nD.prototype.setMin = function(u) {
2845
2845
  this.ms = u;
2846
2846
  };
2847
- tD.prototype.setMax = function(u) {
2847
+ nD.prototype.setMax = function(u) {
2848
2848
  this.max = u;
2849
2849
  };
2850
- tD.prototype.setJitter = function(u) {
2850
+ nD.prototype.setJitter = function(u) {
2851
2851
  this.jitter = u;
2852
2852
  };
2853
2853
  class QD extends iu {
2854
2854
  constructor(D, f) {
2855
2855
  var e;
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 tD({
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({
2857
2857
  min: this.reconnectionDelay(),
2858
2858
  max: this.reconnectionDelayMax(),
2859
2859
  jitter: this.randomizationFactor()
@@ -3088,12 +3088,12 @@ class QD extends iu {
3088
3088
  this._reconnecting = !1, this.backoff.reset(), this.emitReserved("reconnect", D);
3089
3089
  }
3090
3090
  }
3091
- const aD = {};
3091
+ const sD = {};
3092
3092
  function mD(u, D) {
3093
3093
  typeof u == "object" && (D = u, u = void 0), D = D || {};
3094
- const f = ie(u, D.path || "/socket.io"), e = f.source, t = f.id, n = f.path, r = aD[t] && n in aD[t].nsps, s = D.forceNew || D["force new connection"] || D.multiplex === !1 || r;
3094
+ const f = ie(u, D.path || "/socket.io"), e = f.source, t = f.id, n = f.path, r = sD[t] && n in sD[t].nsps, s = D.forceNew || D["force new connection"] || D.multiplex === !1 || r;
3095
3095
  let F;
3096
- return s ? F = new QD(e, D) : (aD[t] || (aD[t] = new QD(e, D)), F = aD[t]), f.query && !D.query && (D.query = f.queryKey), F.socket(f.path, D);
3096
+ return s ? F = new QD(e, D) : (sD[t] || (sD[t] = new QD(e, D)), F = sD[t]), f.query && !D.query && (D.query = f.queryKey), F.socket(f.path, D);
3097
3097
  }
3098
3098
  Object.assign(mD, {
3099
3099
  Manager: QD,
@@ -3262,10 +3262,10 @@ const Ae = (u, D) => {
3262
3262
  },
3263
3263
  D
3264
3264
  )), qD;
3265
- }, h1 = qu({
3265
+ }, h1 = zu({
3266
3266
  socket: {}
3267
3267
  }), b1 = (u) => {
3268
- const D = zu(), f = pu(
3268
+ const D = Uu(), f = pu(
3269
3269
  Ae(D, {
3270
3270
  onConnect: () => {
3271
3271
  console.info(
@@ -3281,12 +3281,12 @@ const Ae = (u, D) => {
3281
3281
  })
3282
3282
  );
3283
3283
  return /* @__PURE__ */ a.jsx(h1.Provider, { value: { socket: f.current }, children: u.children });
3284
- }, Wu = () => Yu(h1), Df = (u, D) => {
3285
- const { socket: f } = Wu();
3286
- G(() => (f.on(u, D), () => f.off(u, D)), [u, D, f]);
3284
+ }, Yu = () => Ku(h1), Df = (u, D) => {
3285
+ const { socket: f } = Yu();
3286
+ X(() => (f.on(u, D), () => f.off(u, D)), [u, D, f]);
3287
3287
  }, xe = () => {
3288
- const { socket: u } = Wu();
3289
- G(() => (u.connect(), () => {
3288
+ const { socket: u } = Yu();
3289
+ X(() => (u.connect(), () => {
3290
3290
  u.disconnect();
3291
3291
  }), []);
3292
3292
  }, _D = {
@@ -3318,12 +3318,12 @@ const Ae = (u, D) => {
3318
3318
  end_time: "",
3319
3319
  time_zone: "Etc/GMT+12"
3320
3320
  }
3321
- }, p1 = qu(_D), B1 = ({
3321
+ }, p1 = zu(_D), B1 = ({
3322
3322
  children: u
3323
3323
  }) => {
3324
3324
  const { t: D } = Ou(), f = If.getItem("settings"), [e, t] = U(
3325
3325
  f || _D
3326
- ), n = Vu((r) => {
3326
+ ), n = qu((r) => {
3327
3327
  If.setItem("settings", r), t(r);
3328
3328
  }, []);
3329
3329
  return Df("settings", (r) => {
@@ -3348,36 +3348,36 @@ const Ae = (u, D) => {
3348
3348
  offline_mode: r.offline_mode
3349
3349
  });
3350
3350
  }), /* @__PURE__ */ a.jsx(p1.Provider, { value: e, children: u });
3351
- }, Bu = () => Yu(p1), g1 = qu(void 0), m1 = ({
3351
+ }, Bu = () => Ku(p1), g1 = zu(void 0), m1 = ({
3352
3352
  onOpen: u,
3353
3353
  onClose: D,
3354
3354
  onScrollToTop: f,
3355
3355
  defaultScreen: e = "prechat",
3356
3356
  children: t
3357
3357
  }) => {
3358
- const [n, r] = U(!0), [s, F] = U(!1), [o, d] = U(e), [c, l] = U(100), L = {
3358
+ const [n, r] = U(!0), [s, F] = U(!1), [o, d] = U(e), [c, l] = U(100), S = {
3359
3359
  syncState: n,
3360
3360
  isOpen: s,
3361
3361
  screen: o,
3362
3362
  scroll: c,
3363
- setSyncState: (x) => {
3364
- r(x);
3363
+ setSyncState: (g) => {
3364
+ r(g);
3365
3365
  },
3366
- setIsOpen: (x) => {
3367
- F(x), n && (x ? u && u() : D && D());
3366
+ setIsOpen: (g) => {
3367
+ F(g), n && (g ? u && u() : D && D());
3368
3368
  },
3369
- setScreen: (x) => {
3369
+ setScreen: (g) => {
3370
3370
  d(
3371
- ["prechat", "postchat", "webview"].includes(x) ? x : "chat"
3371
+ ["prechat", "postchat", "webview"].includes(g) ? g : "chat"
3372
3372
  );
3373
3373
  },
3374
- setScroll: (x) => {
3375
- l(x), f && n && x === 0 && f();
3374
+ setScroll: (g) => {
3375
+ l(g), f && n && g === 0 && f();
3376
3376
  }
3377
3377
  };
3378
- return /* @__PURE__ */ a.jsx(g1.Provider, { value: L, children: t });
3378
+ return /* @__PURE__ */ a.jsx(g1.Provider, { value: S, children: t });
3379
3379
  }, Nu = () => {
3380
- const u = Yu(g1);
3380
+ const u = Ku(g1);
3381
3381
  if (u === void 0)
3382
3382
  throw new Error("useWidget must be used within a WidgetProvider");
3383
3383
  return u;
@@ -3448,59 +3448,59 @@ const Ae = (u, D) => {
3448
3448
  isOfflineMode: !1,
3449
3449
  setIsOfflineMode: () => {
3450
3450
  }
3451
- }, _1 = qu(yu), y1 = ({ wantToConnect: u, defaultConnectionState: D = 0, children: f }) => {
3452
- const e = zu(), t = Bu(), { screen: n, setScreen: r } = Nu(), { setScroll: s, syncState: F, isOpen: o } = Nu(), d = Wu(), [c, l] = U(
3451
+ }, _1 = zu(yu), y1 = ({ wantToConnect: u, defaultConnectionState: D = 0, children: f }) => {
3452
+ const e = Uu(), t = Bu(), { screen: n, setScreen: r } = Nu(), { setScroll: s, syncState: F, isOpen: o } = Nu(), d = Yu(), [c, l] = U(
3453
3453
  yu.participants
3454
- ), [A, C] = U(
3454
+ ), [j, m] = U(
3455
3455
  D
3456
- ), [m, S] = U([]), [L, x] = U(
3456
+ ), [C, v] = U([]), [S, g] = U(
3457
3457
  yu.newMessagesCount
3458
- ), [I, _] = U(
3458
+ ), [L, y] = U(
3459
3459
  yu.showTypingIndicator
3460
- ), [B, T] = U(
3460
+ ), [b, T] = U(
3461
3461
  yu.suggestions
3462
- ), [y, v] = U(
3462
+ ), [N, z] = U(
3463
3463
  yu.newIOMessage
3464
- ), [q, P] = U(yu.message), [g, $] = U(yu.outgoingMessageState), [Du, N] = U(yu.payload), [E, p] = U(yu.file), [k, b] = U(yu.webviewUrl), [O, R] = U(
3464
+ ), [A, P] = U(yu.message), [_, J] = U(yu.outgoingMessageState), [W, k] = U(yu.payload), [E, h] = U(yu.file), [x, B] = U(yu.webviewUrl), [I, R] = U(
3465
3465
  yu.isContactFormActive
3466
- ), [W, K] = U(
3466
+ ), [M, V] = U(
3467
3467
  yu.isOfflineMode
3468
- ), { send: X } = cu(), { t: z } = Ou(), Q = (j) => {
3469
- C(j), j === eD.wantToConnect && u && u(), j === eD.connected && t.alwaysScrollToBottom && s(101);
3470
- }, nu = t.offline_mode, lu = kD(nu), _u = (j) => {
3471
- if (v(j), eu.setItem(
3468
+ ), { send: Z } = cu(), { t: q } = Ou(), uu = (O) => {
3469
+ m(O), O === tD.wantToConnect && u && u(), O === tD.connected && t.alwaysScrollToBottom && s(101);
3470
+ }, nu = t.offline_mode, lu = kD(nu), _u = (O) => {
3471
+ if (z(O), eu.setItem(
3472
3472
  "isOffline",
3473
- (j == null ? void 0 : j.isOffline) || !1
3473
+ (O == null ? void 0 : O.isOffline) || !1
3474
3474
  ), eu.setItem(
3475
3475
  "submitedFormLateTime",
3476
- (j == null ? void 0 : j.submitedFormLateTime) || null
3477
- ), j && "type" in j && j.type === "typing")
3478
- return I === !0;
3479
- _(!1), j && "mid" in j && !m.find((fu) => j.mid === fu.mid) && ("author" in j && (j.direction = j.author === "chatbot" ? uu.received : uu.sent, j.read = !0, j.delivery = !0), S((fu) => [
3480
- ...fu.filter((su) => su.mid !== j.mid),
3481
- j
3482
- ]), s(0), "direction" in j && j.direction === uu.received && !j.isOffline && K(!1)), j && "data" in j && "quick_replies" in j.data ? T(
3483
- (j.data.quick_replies || []).map(
3476
+ (O == null ? void 0 : O.submitedFormLateTime) || null
3477
+ ), O && "type" in O && O.type === "typing")
3478
+ return L === !0;
3479
+ y(!1), O && "mid" in O && !C.find((fu) => O.mid === fu.mid) && ("author" in O && (O.direction = O.author === "chatbot" ? Du.received : Du.sent, O.read = !0, O.delivery = !0), v((fu) => [
3480
+ ...fu.filter((su) => su.mid !== O.mid),
3481
+ O
3482
+ ]), s(0), "direction" in O && O.direction === Du.received && !O.isOffline && V(!1)), O && "data" in O && "quick_replies" in O.data ? T(
3483
+ (O.data.quick_replies || []).map(
3484
3484
  (fu) => ({
3485
3485
  content_type: Zf.text,
3486
3486
  text: fu.title,
3487
3487
  payload: fu.payload
3488
3488
  })
3489
3489
  )
3490
- ) : T([]), o || x((fu) => fu + 1), t.alwaysScrollToBottom && s(101), $(iD.sent);
3491
- }, { socket: gu } = Wu(), au = async ({
3492
- data: j
3490
+ ) : T([]), o || g((fu) => fu + 1), t.alwaysScrollToBottom && s(101), J(iD.sent);
3491
+ }, { socket: gu } = Yu(), au = async ({
3492
+ data: O
3493
3493
  }) => {
3494
3494
  var su;
3495
- $(
3496
- j.type === "file" ? iD.uploading : iD.sending
3495
+ J(
3496
+ O.type === "file" ? iD.uploading : iD.sending
3497
3497
  ), P("");
3498
3498
  const fu = await d.socket.post(
3499
3499
  `/webhook/${e.channel}/`,
3500
3500
  {
3501
3501
  data: {
3502
- ...j,
3503
- author: (j == null ? void 0 : j.author) ?? ((su = c[1]) == null ? void 0 : su.id)
3502
+ ...O,
3503
+ author: (O == null ? void 0 : O.author) ?? ((su = c[1]) == null ? void 0 : su.id)
3504
3504
  }
3505
3505
  }
3506
3506
  );
@@ -3510,28 +3510,28 @@ const Ae = (u, D) => {
3510
3510
  ), console.log(
3511
3511
  "=== CALLING handleNewIOMessage from handleSend (API Response) ==="
3512
3512
  );
3513
- }, Cu = Vu(
3514
- async (j, fu) => {
3513
+ }, Cu = qu(
3514
+ async (O, fu) => {
3515
3515
  try {
3516
- C(2);
3516
+ m(2);
3517
3517
  const su = new URLSearchParams();
3518
3518
  Object.entries({
3519
- ...j && fu ? { first_name: j, last_name: fu } : {},
3519
+ ...O && fu ? { first_name: O, last_name: fu } : {},
3520
3520
  _refresh: Date.now().toString()
3521
3521
  // Force fresh data
3522
- }).forEach(([mu, Uu]) => {
3523
- typeof Uu == "string" && Uu.trim() && su.append(mu, Uu);
3522
+ }).forEach(([mu, Vu]) => {
3523
+ typeof Vu == "string" && Vu.trim() && su.append(mu, Vu);
3524
3524
  }), su.append("owner_id", e.ownerId);
3525
3525
  const { body: Eu } = await gu.get(`/webhook/${e.channel}/?${su.toString()}`);
3526
3526
  console.log("jump here 2"), eu.setItem("profileLiveChat", Eu.profile), eu.setItem("isOffline", lu || !1), eu.setItem(
3527
3527
  "submitedFormLateTime",
3528
3528
  Eu.profile.submitedFormLateTime || null
3529
- ), S(
3529
+ ), v(
3530
3530
  Eu.messages.map((mu) => ({
3531
3531
  ...mu,
3532
- direction: mu.author === Eu.profile.foreignId || mu.author === Eu.profile.id ? uu.sent : uu.received,
3533
- read: mu.direction === uu.sent || mu.read,
3534
- delivery: mu.direction === uu.sent || mu.delivery,
3532
+ direction: mu.author === Eu.profile.foreignId || mu.author === Eu.profile.id ? Du.sent : Du.received,
3533
+ read: mu.direction === Du.sent || mu.read,
3534
+ delivery: mu.direction === Du.sent || mu.delivery,
3535
3535
  isOffline: mu.isOffline || Eu.profile.isOffline,
3536
3536
  submitedFormLateTime: mu.submitedFormLateTime || Eu.profile.submitedFormLateTime
3537
3537
  }))
@@ -3542,108 +3542,108 @@ const Ae = (u, D) => {
3542
3542
  foreign_id: Eu.profile.foreignId,
3543
3543
  name: `${Eu.profile.firstName} ${Eu.profile.firstName}`
3544
3544
  }
3545
- ]), m.length === 0 && X({
3545
+ ]), C.length === 0 && Z({
3546
3546
  event,
3547
3547
  source: "get_started_button",
3548
3548
  data: {
3549
3549
  type: Au.postback,
3550
3550
  data: {
3551
- text: z("messages.get_started"),
3551
+ text: q("messages.get_started"),
3552
3552
  payload: "GET_STARTED"
3553
3553
  },
3554
3554
  author: Eu.profile.foreignId
3555
3555
  }
3556
- }), C(3), r("chat");
3556
+ }), m(3), r("chat");
3557
3557
  } catch (su) {
3558
- console.error("Unable to subscribe user", su), r("prechat"), C(0);
3558
+ console.error("Unable to subscribe user", su), r("prechat"), m(0);
3559
3559
  }
3560
3560
  },
3561
3561
  // eslint-disable-next-line react-hooks/exhaustive-deps
3562
3562
  [
3563
3563
  c,
3564
- C,
3565
- S,
3564
+ m,
3565
+ v,
3566
3566
  l,
3567
3567
  r,
3568
3568
  d
3569
3569
  ]
3570
3570
  );
3571
- Df(WD.message, (j) => {
3571
+ Df(HD.message, (O) => {
3572
3572
  console.log(
3573
3573
  "=== CALLING handleNewIOMessage from useSubscribe (Socket Realtime) ==="
3574
- ), _u(j);
3575
- }), Df(WD.typing, _);
3576
- const Iu = (j) => {
3577
- j ? (b(j), r("webview")) : r("chat");
3574
+ ), _u(O);
3575
+ }), Df(HD.typing, y);
3576
+ const Iu = (O) => {
3577
+ O ? (B(O), r("webview")) : r("chat");
3578
3578
  };
3579
- G(() => {
3580
- F && o && x(0);
3581
- }, [F, o]), G(() => {
3582
- if (o && A === eD.connected) {
3579
+ X(() => {
3580
+ F && o && g(0);
3581
+ }, [F, o]), X(() => {
3582
+ if (o && j === tD.connected) {
3583
3583
  console.log("🔄 Widget opened - fetching fresh data");
3584
- const j = eu.getItem("profileLiveChat");
3585
- if (j) {
3586
- const fu = j;
3584
+ const O = eu.getItem("profileLiveChat");
3585
+ if (O) {
3586
+ const fu = O;
3587
3587
  console.log("🔄 Widget opened - fetching fresh data", fu), Cu(fu.firstName, fu.lastName);
3588
3588
  }
3589
- !j && !lu && r("prechat");
3589
+ !O && !lu && r("prechat");
3590
3590
  }
3591
3591
  }, [o]), h0("logout", () => {
3592
3592
  d.socket.disconnect();
3593
- }), G(() => {
3594
- n === "chat" && A === eD.connected && Cu();
3595
- const j = () => {
3593
+ }), X(() => {
3594
+ n === "chat" && j === tD.connected && Cu();
3595
+ const O = () => {
3596
3596
  const fu = eu.getItem("profileLiveChat");
3597
3597
  if (fu) {
3598
3598
  const su = fu;
3599
3599
  Cu(su.firstName, su.lastName);
3600
3600
  }
3601
3601
  };
3602
- return d.socket.io.on("reconnect", j), () => {
3603
- d.socket.io.off("reconnect", j);
3602
+ return d.socket.io.on("reconnect", O), () => {
3603
+ d.socket.io.off("reconnect", O);
3604
3604
  };
3605
- }, []), G(() => {
3606
- const j = [...c];
3607
- j[0].imageUrl = t.avatarUrl, l(j);
3605
+ }, []), X(() => {
3606
+ const O = [...c];
3607
+ O[0].imageUrl = t.avatarUrl, l(O);
3608
3608
  }, [t.avatarUrl]);
3609
3609
  const Lu = {
3610
3610
  participants: c,
3611
3611
  setParticipants: l,
3612
- outgoingMessageState: g,
3613
- setOutgoingMessageState: $,
3614
- connectionState: A,
3615
- setConnectionState: Q,
3616
- messages: m.sort((j, fu) => {
3617
- const su = Date.parse(j.createdAt), Eu = Date.parse(fu.createdAt);
3612
+ outgoingMessageState: _,
3613
+ setOutgoingMessageState: J,
3614
+ connectionState: j,
3615
+ setConnectionState: uu,
3616
+ messages: C.sort((O, fu) => {
3617
+ const su = Date.parse(O.createdAt), Eu = Date.parse(fu.createdAt);
3618
3618
  return +new Date(su) - +new Date(Eu);
3619
3619
  }),
3620
- setMessages: S,
3621
- newMessagesCount: L,
3622
- setNewMessagesCount: x,
3623
- newIOMessage: y,
3624
- setNewIOMessage: v,
3620
+ setMessages: v,
3621
+ newMessagesCount: S,
3622
+ setNewMessagesCount: g,
3623
+ newIOMessage: N,
3624
+ setNewIOMessage: z,
3625
3625
  send: au,
3626
- showTypingIndicator: t.showTypingIndicator && I,
3627
- setShowTypingIndicator: _,
3628
- suggestions: B,
3626
+ showTypingIndicator: t.showTypingIndicator && L,
3627
+ setShowTypingIndicator: y,
3628
+ suggestions: b,
3629
3629
  setSuggestions: T,
3630
- webviewUrl: k,
3630
+ webviewUrl: x,
3631
3631
  setWebviewUrl: Iu,
3632
- payload: Du,
3633
- setPayload: N,
3632
+ payload: W,
3633
+ setPayload: k,
3634
3634
  file: E,
3635
- setFile: p,
3636
- message: q,
3635
+ setFile: h,
3636
+ message: A,
3637
3637
  setMessage: P,
3638
3638
  handleSubscription: Cu,
3639
- isContactFormActive: O,
3639
+ isContactFormActive: I,
3640
3640
  setIsContactFormActive: R,
3641
- isOfflineMode: W,
3642
- setIsOfflineMode: K
3641
+ isOfflineMode: M,
3642
+ setIsOfflineMode: V
3643
3643
  };
3644
3644
  return /* @__PURE__ */ a.jsx(_1.Provider, { value: Lu, children: f });
3645
3645
  }, cu = () => {
3646
- const u = Yu(_1);
3646
+ const u = Ku(_1);
3647
3647
  if (!u)
3648
3648
  throw new Error("useChat must be used within a ChatContext");
3649
3649
  return u;
@@ -3956,7 +3956,7 @@ const Ae = (u, D) => {
3956
3956
  // Light gray background
3957
3957
  text: "#000"
3958
3958
  // Black text
3959
- }), Pe = yD.orange, v1 = qu({
3959
+ }), Pe = yD.orange, v1 = zu({
3960
3960
  colors: Pe
3961
3961
  }), w1 = ({
3962
3962
  children: u
@@ -3977,7 +3977,7 @@ const Ae = (u, D) => {
3977
3977
  };
3978
3978
  return /* @__PURE__ */ a.jsx(v1.Provider, { value: { colors: f() }, children: u });
3979
3979
  }, du = () => {
3980
- const u = Yu(v1);
3980
+ const u = Ku(v1);
3981
3981
  if (!u)
3982
3982
  throw new Error("useColors must be used within a ColorProvider");
3983
3983
  return u;
@@ -4013,10 +4013,10 @@ const Ae = (u, D) => {
4013
4013
  onChatWithStaff: u,
4014
4014
  onSendNoticeToStaff: D
4015
4015
  }) => {
4016
- const [f, e] = U(!1), t = pu(null), { socket: n } = Wu();
4017
- zu();
4016
+ const [f, e] = U(!1), t = pu(null), { socket: n } = Yu();
4017
+ Uu();
4018
4018
  const { send: r } = cu();
4019
- Ou(), G(() => {
4019
+ Ou(), X(() => {
4020
4020
  const F = (o) => {
4021
4021
  t.current && !t.current.contains(o.target) && e(!1);
4022
4022
  };
@@ -4025,7 +4025,7 @@ const Ae = (u, D) => {
4025
4025
  };
4026
4026
  }, []);
4027
4027
  const s = async (F) => {
4028
- F.preventDefault();
4028
+ console.log("handleSendNoticeToStaff");
4029
4029
  try {
4030
4030
  const o = eu.getItem("profileLiveChat");
4031
4031
  if (!o) {
@@ -4033,7 +4033,7 @@ const Ae = (u, D) => {
4033
4033
  return;
4034
4034
  }
4035
4035
  r({
4036
- event: {},
4036
+ event: F,
4037
4037
  source: "staff-notice",
4038
4038
  data: {
4039
4039
  type: Au.notify,
@@ -4250,205 +4250,205 @@ var x1 = { exports: {} };
4250
4250
  (function(f, e) {
4251
4251
  u.exports = e();
4252
4252
  })(dD, function() {
4253
- var f = 1e3, e = 6e4, t = 36e5, n = "millisecond", r = "second", s = "minute", F = "hour", o = "day", d = "week", c = "month", l = "quarter", A = "year", C = "date", m = "Invalid Date", S = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, L = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, x = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(N) {
4254
- var E = ["th", "st", "nd", "rd"], p = N % 100;
4255
- return "[" + N + (E[(p - 20) % 10] || E[p] || E[0]) + "]";
4256
- } }, I = function(N, E, p) {
4257
- var k = String(N);
4258
- return !k || k.length >= E ? N : "" + Array(E + 1 - k.length).join(p) + N;
4259
- }, _ = { s: I, z: function(N) {
4260
- var E = -N.utcOffset(), p = Math.abs(E), k = Math.floor(p / 60), b = p % 60;
4261
- return (E <= 0 ? "+" : "-") + I(k, 2, "0") + ":" + I(b, 2, "0");
4262
- }, m: function N(E, p) {
4263
- if (E.date() < p.date()) return -N(p, E);
4264
- var k = 12 * (p.year() - E.year()) + (p.month() - E.month()), b = E.clone().add(k, c), O = p - b < 0, R = E.clone().add(k + (O ? -1 : 1), c);
4265
- return +(-(k + (p - b) / (O ? b - R : R - b)) || 0);
4266
- }, a: function(N) {
4267
- return N < 0 ? Math.ceil(N) || 0 : Math.floor(N);
4268
- }, p: function(N) {
4269
- return { M: c, y: A, w: d, d: o, D: C, h: F, m: s, s: r, ms: n, Q: l }[N] || String(N || "").toLowerCase().replace(/s$/, "");
4270
- }, u: function(N) {
4271
- return N === void 0;
4272
- } }, B = "en", T = {};
4273
- T[B] = x;
4274
- var y = "$isDayjsObject", v = function(N) {
4275
- return N instanceof $ || !(!N || !N[y]);
4276
- }, q = function N(E, p, k) {
4277
- var b;
4278
- if (!E) return B;
4253
+ var f = 1e3, e = 6e4, t = 36e5, n = "millisecond", r = "second", s = "minute", F = "hour", o = "day", d = "week", c = "month", l = "quarter", j = "year", m = "date", C = "Invalid Date", v = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, S = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(k) {
4254
+ var E = ["th", "st", "nd", "rd"], h = k % 100;
4255
+ return "[" + k + (E[(h - 20) % 10] || E[h] || E[0]) + "]";
4256
+ } }, L = function(k, E, h) {
4257
+ var x = String(k);
4258
+ return !x || x.length >= E ? k : "" + Array(E + 1 - x.length).join(h) + k;
4259
+ }, y = { s: L, z: function(k) {
4260
+ var E = -k.utcOffset(), h = Math.abs(E), x = Math.floor(h / 60), B = h % 60;
4261
+ return (E <= 0 ? "+" : "-") + L(x, 2, "0") + ":" + L(B, 2, "0");
4262
+ }, m: function k(E, h) {
4263
+ if (E.date() < h.date()) return -k(h, E);
4264
+ var x = 12 * (h.year() - E.year()) + (h.month() - E.month()), B = E.clone().add(x, c), I = h - B < 0, R = E.clone().add(x + (I ? -1 : 1), c);
4265
+ return +(-(x + (h - B) / (I ? B - R : R - B)) || 0);
4266
+ }, a: function(k) {
4267
+ return k < 0 ? Math.ceil(k) || 0 : Math.floor(k);
4268
+ }, p: function(k) {
4269
+ return { M: c, y: j, w: d, d: o, D: m, h: F, m: s, s: r, ms: n, Q: l }[k] || String(k || "").toLowerCase().replace(/s$/, "");
4270
+ }, u: function(k) {
4271
+ return k === void 0;
4272
+ } }, b = "en", T = {};
4273
+ T[b] = g;
4274
+ var N = "$isDayjsObject", z = function(k) {
4275
+ return k instanceof J || !(!k || !k[N]);
4276
+ }, A = function k(E, h, x) {
4277
+ var B;
4278
+ if (!E) return b;
4279
4279
  if (typeof E == "string") {
4280
- var O = E.toLowerCase();
4281
- T[O] && (b = O), p && (T[O] = p, b = O);
4280
+ var I = E.toLowerCase();
4281
+ T[I] && (B = I), h && (T[I] = h, B = I);
4282
4282
  var R = E.split("-");
4283
- if (!b && R.length > 1) return N(R[0]);
4283
+ if (!B && R.length > 1) return k(R[0]);
4284
4284
  } else {
4285
- var W = E.name;
4286
- T[W] = E, b = W;
4285
+ var M = E.name;
4286
+ T[M] = E, B = M;
4287
4287
  }
4288
- return !k && b && (B = b), b || !k && B;
4289
- }, P = function(N, E) {
4290
- if (v(N)) return N.clone();
4291
- var p = typeof E == "object" ? E : {};
4292
- return p.date = N, p.args = arguments, new $(p);
4293
- }, g = _;
4294
- g.l = q, g.i = v, g.w = function(N, E) {
4295
- return P(N, { locale: E.$L, utc: E.$u, x: E.$x, $offset: E.$offset });
4288
+ return !x && B && (b = B), B || !x && b;
4289
+ }, P = function(k, E) {
4290
+ if (z(k)) return k.clone();
4291
+ var h = typeof E == "object" ? E : {};
4292
+ return h.date = k, h.args = arguments, new J(h);
4293
+ }, _ = y;
4294
+ _.l = A, _.i = z, _.w = function(k, E) {
4295
+ return P(k, { locale: E.$L, utc: E.$u, x: E.$x, $offset: E.$offset });
4296
4296
  };
4297
- var $ = function() {
4298
- function N(p) {
4299
- this.$L = q(p.locale, null, !0), this.parse(p), this.$x = this.$x || p.x || {}, this[y] = !0;
4297
+ var J = function() {
4298
+ function k(h) {
4299
+ this.$L = A(h.locale, null, !0), this.parse(h), this.$x = this.$x || h.x || {}, this[N] = !0;
4300
4300
  }
4301
- var E = N.prototype;
4302
- return E.parse = function(p) {
4303
- this.$d = function(k) {
4304
- var b = k.date, O = k.utc;
4305
- if (b === null) return /* @__PURE__ */ new Date(NaN);
4306
- if (g.u(b)) return /* @__PURE__ */ new Date();
4307
- if (b instanceof Date) return new Date(b);
4308
- if (typeof b == "string" && !/Z$/i.test(b)) {
4309
- var R = b.match(S);
4301
+ var E = k.prototype;
4302
+ return E.parse = function(h) {
4303
+ this.$d = function(x) {
4304
+ var B = x.date, I = x.utc;
4305
+ if (B === null) return /* @__PURE__ */ new Date(NaN);
4306
+ if (_.u(B)) return /* @__PURE__ */ new Date();
4307
+ if (B instanceof Date) return new Date(B);
4308
+ if (typeof B == "string" && !/Z$/i.test(B)) {
4309
+ var R = B.match(v);
4310
4310
  if (R) {
4311
- var W = R[2] - 1 || 0, K = (R[7] || "0").substring(0, 3);
4312
- return O ? new Date(Date.UTC(R[1], W, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, K)) : new Date(R[1], W, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, K);
4311
+ var M = R[2] - 1 || 0, V = (R[7] || "0").substring(0, 3);
4312
+ return I ? new Date(Date.UTC(R[1], M, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, V)) : new Date(R[1], M, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, V);
4313
4313
  }
4314
4314
  }
4315
- return new Date(b);
4316
- }(p), this.init();
4315
+ return new Date(B);
4316
+ }(h), this.init();
4317
4317
  }, E.init = function() {
4318
- var p = this.$d;
4319
- this.$y = p.getFullYear(), this.$M = p.getMonth(), this.$D = p.getDate(), this.$W = p.getDay(), this.$H = p.getHours(), this.$m = p.getMinutes(), this.$s = p.getSeconds(), this.$ms = p.getMilliseconds();
4318
+ var h = this.$d;
4319
+ 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();
4320
4320
  }, E.$utils = function() {
4321
- return g;
4321
+ return _;
4322
4322
  }, E.isValid = function() {
4323
- return this.$d.toString() !== m;
4324
- }, E.isSame = function(p, k) {
4325
- var b = P(p);
4326
- return this.startOf(k) <= b && b <= this.endOf(k);
4327
- }, E.isAfter = function(p, k) {
4328
- return P(p) < this.startOf(k);
4329
- }, E.isBefore = function(p, k) {
4330
- return this.endOf(k) < P(p);
4331
- }, E.$g = function(p, k, b) {
4332
- return g.u(p) ? this[k] : this.set(b, p);
4323
+ return this.$d.toString() !== C;
4324
+ }, E.isSame = function(h, x) {
4325
+ var B = P(h);
4326
+ return this.startOf(x) <= B && B <= this.endOf(x);
4327
+ }, E.isAfter = function(h, x) {
4328
+ return P(h) < this.startOf(x);
4329
+ }, E.isBefore = function(h, x) {
4330
+ return this.endOf(x) < P(h);
4331
+ }, E.$g = function(h, x, B) {
4332
+ return _.u(h) ? this[x] : this.set(B, h);
4333
4333
  }, E.unix = function() {
4334
4334
  return Math.floor(this.valueOf() / 1e3);
4335
4335
  }, E.valueOf = function() {
4336
4336
  return this.$d.getTime();
4337
- }, E.startOf = function(p, k) {
4338
- var b = this, O = !!g.u(k) || k, R = g.p(p), W = function(gu, au) {
4339
- var Cu = g.w(b.$u ? Date.UTC(b.$y, au, gu) : new Date(b.$y, au, gu), b);
4340
- return O ? Cu : Cu.endOf(o);
4341
- }, K = function(gu, au) {
4342
- return g.w(b.toDate()[gu].apply(b.toDate("s"), (O ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(au)), b);
4343
- }, X = this.$W, z = this.$M, Q = this.$D, nu = "set" + (this.$u ? "UTC" : "");
4337
+ }, E.startOf = function(h, x) {
4338
+ var B = this, I = !!_.u(x) || x, R = _.p(h), M = function(gu, au) {
4339
+ var Cu = _.w(B.$u ? Date.UTC(B.$y, au, gu) : new Date(B.$y, au, gu), B);
4340
+ return I ? Cu : Cu.endOf(o);
4341
+ }, V = function(gu, au) {
4342
+ return _.w(B.toDate()[gu].apply(B.toDate("s"), (I ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(au)), B);
4343
+ }, Z = this.$W, q = this.$M, uu = this.$D, nu = "set" + (this.$u ? "UTC" : "");
4344
4344
  switch (R) {
4345
- case A:
4346
- return O ? W(1, 0) : W(31, 11);
4345
+ case j:
4346
+ return I ? M(1, 0) : M(31, 11);
4347
4347
  case c:
4348
- return O ? W(1, z) : W(0, z + 1);
4348
+ return I ? M(1, q) : M(0, q + 1);
4349
4349
  case d:
4350
- var lu = this.$locale().weekStart || 0, _u = (X < lu ? X + 7 : X) - lu;
4351
- return W(O ? Q - _u : Q + (6 - _u), z);
4350
+ var lu = this.$locale().weekStart || 0, _u = (Z < lu ? Z + 7 : Z) - lu;
4351
+ return M(I ? uu - _u : uu + (6 - _u), q);
4352
4352
  case o:
4353
- case C:
4354
- return K(nu + "Hours", 0);
4353
+ case m:
4354
+ return V(nu + "Hours", 0);
4355
4355
  case F:
4356
- return K(nu + "Minutes", 1);
4356
+ return V(nu + "Minutes", 1);
4357
4357
  case s:
4358
- return K(nu + "Seconds", 2);
4358
+ return V(nu + "Seconds", 2);
4359
4359
  case r:
4360
- return K(nu + "Milliseconds", 3);
4360
+ return V(nu + "Milliseconds", 3);
4361
4361
  default:
4362
4362
  return this.clone();
4363
4363
  }
4364
- }, E.endOf = function(p) {
4365
- return this.startOf(p, !1);
4366
- }, E.$set = function(p, k) {
4367
- var b, O = g.p(p), R = "set" + (this.$u ? "UTC" : ""), W = (b = {}, b[o] = R + "Date", b[C] = R + "Date", b[c] = R + "Month", b[A] = R + "FullYear", b[F] = R + "Hours", b[s] = R + "Minutes", b[r] = R + "Seconds", b[n] = R + "Milliseconds", b)[O], K = O === o ? this.$D + (k - this.$W) : k;
4368
- if (O === c || O === A) {
4369
- var X = this.clone().set(C, 1);
4370
- X.$d[W](K), X.init(), this.$d = X.set(C, Math.min(this.$D, X.daysInMonth())).$d;
4371
- } else W && this.$d[W](K);
4364
+ }, E.endOf = function(h) {
4365
+ return this.startOf(h, !1);
4366
+ }, E.$set = function(h, x) {
4367
+ var B, I = _.p(h), R = "set" + (this.$u ? "UTC" : ""), M = (B = {}, B[o] = R + "Date", B[m] = R + "Date", B[c] = R + "Month", B[j] = R + "FullYear", B[F] = R + "Hours", B[s] = R + "Minutes", B[r] = R + "Seconds", B[n] = R + "Milliseconds", B)[I], V = I === o ? this.$D + (x - this.$W) : x;
4368
+ if (I === c || I === j) {
4369
+ var Z = this.clone().set(m, 1);
4370
+ Z.$d[M](V), Z.init(), this.$d = Z.set(m, Math.min(this.$D, Z.daysInMonth())).$d;
4371
+ } else M && this.$d[M](V);
4372
4372
  return this.init(), this;
4373
- }, E.set = function(p, k) {
4374
- return this.clone().$set(p, k);
4375
- }, E.get = function(p) {
4376
- return this[g.p(p)]();
4377
- }, E.add = function(p, k) {
4378
- var b, O = this;
4379
- p = Number(p);
4380
- var R = g.p(k), W = function(z) {
4381
- var Q = P(O);
4382
- return g.w(Q.date(Q.date() + Math.round(z * p)), O);
4373
+ }, E.set = function(h, x) {
4374
+ return this.clone().$set(h, x);
4375
+ }, E.get = function(h) {
4376
+ return this[_.p(h)]();
4377
+ }, E.add = function(h, x) {
4378
+ var B, I = this;
4379
+ h = Number(h);
4380
+ var R = _.p(x), M = function(q) {
4381
+ var uu = P(I);
4382
+ return _.w(uu.date(uu.date() + Math.round(q * h)), I);
4383
4383
  };
4384
- if (R === c) return this.set(c, this.$M + p);
4385
- if (R === A) return this.set(A, this.$y + p);
4386
- if (R === o) return W(1);
4387
- if (R === d) return W(7);
4388
- var K = (b = {}, b[s] = e, b[F] = t, b[r] = f, b)[R] || 1, X = this.$d.getTime() + p * K;
4389
- return g.w(X, this);
4390
- }, E.subtract = function(p, k) {
4391
- return this.add(-1 * p, k);
4392
- }, E.format = function(p) {
4393
- var k = this, b = this.$locale();
4394
- if (!this.isValid()) return b.invalidDate || m;
4395
- var O = p || "YYYY-MM-DDTHH:mm:ssZ", R = g.z(this), W = this.$H, K = this.$m, X = this.$M, z = b.weekdays, Q = b.months, nu = b.meridiem, lu = function(au, Cu, Iu, Lu) {
4396
- return au && (au[Cu] || au(k, O)) || Iu[Cu].slice(0, Lu);
4384
+ if (R === c) return this.set(c, this.$M + h);
4385
+ if (R === j) return this.set(j, this.$y + h);
4386
+ if (R === o) return M(1);
4387
+ if (R === d) return M(7);
4388
+ var V = (B = {}, B[s] = e, B[F] = t, B[r] = f, B)[R] || 1, Z = this.$d.getTime() + h * V;
4389
+ return _.w(Z, this);
4390
+ }, E.subtract = function(h, x) {
4391
+ return this.add(-1 * h, x);
4392
+ }, E.format = function(h) {
4393
+ var x = this, B = this.$locale();
4394
+ if (!this.isValid()) return B.invalidDate || C;
4395
+ var I = h || "YYYY-MM-DDTHH:mm:ssZ", R = _.z(this), M = this.$H, V = this.$m, Z = this.$M, q = B.weekdays, uu = B.months, nu = B.meridiem, lu = function(au, Cu, Iu, Lu) {
4396
+ return au && (au[Cu] || au(x, I)) || Iu[Cu].slice(0, Lu);
4397
4397
  }, _u = function(au) {
4398
- return g.s(W % 12 || 12, au, "0");
4398
+ return _.s(M % 12 || 12, au, "0");
4399
4399
  }, gu = nu || function(au, Cu, Iu) {
4400
4400
  var Lu = au < 12 ? "AM" : "PM";
4401
4401
  return Iu ? Lu.toLowerCase() : Lu;
4402
4402
  };
4403
- return O.replace(L, function(au, Cu) {
4403
+ return I.replace(S, function(au, Cu) {
4404
4404
  return Cu || function(Iu) {
4405
4405
  switch (Iu) {
4406
4406
  case "YY":
4407
- return String(k.$y).slice(-2);
4407
+ return String(x.$y).slice(-2);
4408
4408
  case "YYYY":
4409
- return g.s(k.$y, 4, "0");
4409
+ return _.s(x.$y, 4, "0");
4410
4410
  case "M":
4411
- return X + 1;
4411
+ return Z + 1;
4412
4412
  case "MM":
4413
- return g.s(X + 1, 2, "0");
4413
+ return _.s(Z + 1, 2, "0");
4414
4414
  case "MMM":
4415
- return lu(b.monthsShort, X, Q, 3);
4415
+ return lu(B.monthsShort, Z, uu, 3);
4416
4416
  case "MMMM":
4417
- return lu(Q, X);
4417
+ return lu(uu, Z);
4418
4418
  case "D":
4419
- return k.$D;
4419
+ return x.$D;
4420
4420
  case "DD":
4421
- return g.s(k.$D, 2, "0");
4421
+ return _.s(x.$D, 2, "0");
4422
4422
  case "d":
4423
- return String(k.$W);
4423
+ return String(x.$W);
4424
4424
  case "dd":
4425
- return lu(b.weekdaysMin, k.$W, z, 2);
4425
+ return lu(B.weekdaysMin, x.$W, q, 2);
4426
4426
  case "ddd":
4427
- return lu(b.weekdaysShort, k.$W, z, 3);
4427
+ return lu(B.weekdaysShort, x.$W, q, 3);
4428
4428
  case "dddd":
4429
- return z[k.$W];
4429
+ return q[x.$W];
4430
4430
  case "H":
4431
- return String(W);
4431
+ return String(M);
4432
4432
  case "HH":
4433
- return g.s(W, 2, "0");
4433
+ return _.s(M, 2, "0");
4434
4434
  case "h":
4435
4435
  return _u(1);
4436
4436
  case "hh":
4437
4437
  return _u(2);
4438
4438
  case "a":
4439
- return gu(W, K, !0);
4439
+ return gu(M, V, !0);
4440
4440
  case "A":
4441
- return gu(W, K, !1);
4441
+ return gu(M, V, !1);
4442
4442
  case "m":
4443
- return String(K);
4443
+ return String(V);
4444
4444
  case "mm":
4445
- return g.s(K, 2, "0");
4445
+ return _.s(V, 2, "0");
4446
4446
  case "s":
4447
- return String(k.$s);
4447
+ return String(x.$s);
4448
4448
  case "ss":
4449
- return g.s(k.$s, 2, "0");
4449
+ return _.s(x.$s, 2, "0");
4450
4450
  case "SSS":
4451
- return g.s(k.$ms, 3, "0");
4451
+ return _.s(x.$ms, 3, "0");
4452
4452
  case "Z":
4453
4453
  return R;
4454
4454
  }
@@ -4457,49 +4457,49 @@ var x1 = { exports: {} };
4457
4457
  });
4458
4458
  }, E.utcOffset = function() {
4459
4459
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
4460
- }, E.diff = function(p, k, b) {
4461
- var O, R = this, W = g.p(k), K = P(p), X = (K.utcOffset() - this.utcOffset()) * e, z = this - K, Q = function() {
4462
- return g.m(R, K);
4460
+ }, E.diff = function(h, x, B) {
4461
+ var I, R = this, M = _.p(x), V = P(h), Z = (V.utcOffset() - this.utcOffset()) * e, q = this - V, uu = function() {
4462
+ return _.m(R, V);
4463
4463
  };
4464
- switch (W) {
4465
- case A:
4466
- O = Q() / 12;
4464
+ switch (M) {
4465
+ case j:
4466
+ I = uu() / 12;
4467
4467
  break;
4468
4468
  case c:
4469
- O = Q();
4469
+ I = uu();
4470
4470
  break;
4471
4471
  case l:
4472
- O = Q() / 3;
4472
+ I = uu() / 3;
4473
4473
  break;
4474
4474
  case d:
4475
- O = (z - X) / 6048e5;
4475
+ I = (q - Z) / 6048e5;
4476
4476
  break;
4477
4477
  case o:
4478
- O = (z - X) / 864e5;
4478
+ I = (q - Z) / 864e5;
4479
4479
  break;
4480
4480
  case F:
4481
- O = z / t;
4481
+ I = q / t;
4482
4482
  break;
4483
4483
  case s:
4484
- O = z / e;
4484
+ I = q / e;
4485
4485
  break;
4486
4486
  case r:
4487
- O = z / f;
4487
+ I = q / f;
4488
4488
  break;
4489
4489
  default:
4490
- O = z;
4490
+ I = q;
4491
4491
  }
4492
- return b ? O : g.a(O);
4492
+ return B ? I : _.a(I);
4493
4493
  }, E.daysInMonth = function() {
4494
4494
  return this.endOf(c).$D;
4495
4495
  }, E.$locale = function() {
4496
4496
  return T[this.$L];
4497
- }, E.locale = function(p, k) {
4498
- if (!p) return this.$L;
4499
- var b = this.clone(), O = q(p, k, !0);
4500
- return O && (b.$L = O), b;
4497
+ }, E.locale = function(h, x) {
4498
+ if (!h) return this.$L;
4499
+ var B = this.clone(), I = A(h, x, !0);
4500
+ return I && (B.$L = I), B;
4501
4501
  }, E.clone = function() {
4502
- return g.w(this.$d, this);
4502
+ return _.w(this.$d, this);
4503
4503
  }, E.toDate = function() {
4504
4504
  return new Date(this.valueOf());
4505
4505
  }, E.toJSON = function() {
@@ -4508,17 +4508,17 @@ var x1 = { exports: {} };
4508
4508
  return this.$d.toISOString();
4509
4509
  }, E.toString = function() {
4510
4510
  return this.$d.toUTCString();
4511
- }, N;
4512
- }(), Du = $.prototype;
4513
- return P.prototype = Du, [["$ms", n], ["$s", r], ["$m", s], ["$H", F], ["$W", o], ["$M", c], ["$y", A], ["$D", C]].forEach(function(N) {
4514
- Du[N[1]] = function(E) {
4515
- return this.$g(E, N[0], N[1]);
4511
+ }, k;
4512
+ }(), W = J.prototype;
4513
+ return P.prototype = W, [["$ms", n], ["$s", r], ["$m", s], ["$H", F], ["$W", o], ["$M", c], ["$y", j], ["$D", m]].forEach(function(k) {
4514
+ W[k[1]] = function(E) {
4515
+ return this.$g(E, k[0], k[1]);
4516
4516
  };
4517
- }), P.extend = function(N, E) {
4518
- return N.$i || (N(E, $, P), N.$i = !0), P;
4519
- }, P.locale = q, P.isDayjs = v, P.unix = function(N) {
4520
- return P(1e3 * N);
4521
- }, P.en = T[B], P.Ls = T, P.p = {}, P;
4517
+ }), P.extend = function(k, E) {
4518
+ return k.$i || (k(E, J, P), k.$i = !0), P;
4519
+ }, P.locale = A, P.isDayjs = z, P.unix = function(k) {
4520
+ return P(1e3 * k);
4521
+ }, P.en = T[b], P.Ls = T, P.p = {}, P;
4522
4522
  });
4523
4523
  })(x1);
4524
4524
  var k1 = x1.exports;
@@ -4559,21 +4559,21 @@ var S1 = { exports: {} };
4559
4559
  function s(o, d, c, l) {
4560
4560
  return n.fromToBase(o, d, c, l);
4561
4561
  }
4562
- t.en.relativeTime = r, n.fromToBase = function(o, d, c, l, A) {
4563
- for (var C, m, S, L = c.$locale().relativeTime || r, x = f.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], I = x.length, _ = 0; _ < I; _ += 1) {
4564
- var B = x[_];
4565
- B.d && (C = l ? t(o).diff(c, B.d, !0) : c.diff(o, B.d, !0));
4566
- var T = (f.rounding || Math.round)(Math.abs(C));
4567
- if (S = C > 0, T <= B.r || !B.r) {
4568
- T <= 1 && _ > 0 && (B = x[_ - 1]);
4569
- var y = L[B.l];
4570
- A && (T = A("" + T)), m = typeof y == "string" ? y.replace("%d", T) : y(T, d, B.l, S);
4562
+ t.en.relativeTime = r, n.fromToBase = function(o, d, c, l, j) {
4563
+ for (var m, C, v, S = c.$locale().relativeTime || r, g = f.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], L = g.length, y = 0; y < L; y += 1) {
4564
+ var b = g[y];
4565
+ b.d && (m = l ? t(o).diff(c, b.d, !0) : c.diff(o, b.d, !0));
4566
+ var T = (f.rounding || Math.round)(Math.abs(m));
4567
+ if (v = m > 0, T <= b.r || !b.r) {
4568
+ T <= 1 && y > 0 && (b = g[y - 1]);
4569
+ var N = S[b.l];
4570
+ j && (T = j("" + T)), C = typeof N == "string" ? N.replace("%d", T) : N(T, d, b.l, v);
4571
4571
  break;
4572
4572
  }
4573
4573
  }
4574
- if (d) return m;
4575
- var v = S ? L.future : L.past;
4576
- return typeof v == "function" ? v(m) : v.replace("%s", m);
4574
+ if (d) return C;
4575
+ var z = v ? S.future : S.past;
4576
+ return typeof z == "function" ? z(C) : z.replace("%s", C);
4577
4577
  }, n.to = function(o, d) {
4578
4578
  return s(o, d, this, !0);
4579
4579
  }, n.from = function(o, d) {
@@ -4591,7 +4591,7 @@ var S1 = { exports: {} };
4591
4591
  });
4592
4592
  })(S1);
4593
4593
  var Ve = S1.exports;
4594
- const He = /* @__PURE__ */ sf(Ve), T1 = ({
4594
+ const We = /* @__PURE__ */ sf(Ve), T1 = ({
4595
4595
  width: u = "18",
4596
4596
  height: D = "18",
4597
4597
  ...f
@@ -4686,8 +4686,8 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
4686
4686
  },
4687
4687
  F
4688
4688
  )) });
4689
- }, We = (u, D = 100) => u.length > D ? u.substr(0, D) + "..." : u, Ye = (u) => u.replace(/\n/g, "<br />"), Ke = (u) => {
4690
- let D = We(u, 50);
4689
+ }, He = (u, D = 100) => u.length > D ? u.substr(0, D) + "..." : u, Ye = (u) => u.replace(/\n/g, "<br />"), Ke = (u) => {
4690
+ let D = He(u, 50);
4691
4691
  return D = Ye(u), D;
4692
4692
  }, Je = ({ message: u }) => /* @__PURE__ */ a.jsx("div", { className: "sc-message--carousel-element-wrapper", children: /* @__PURE__ */ a.jsxs("div", { className: "sc-message--carousel-element", children: [
4693
4693
  u.image_url && /* @__PURE__ */ a.jsx(
@@ -4770,7 +4770,7 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
4770
4770
  /* @__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" }),
4771
4771
  /* @__PURE__ */ a.jsx("path", { d: "M264.4 365a15 15 0 01-15-15V231a15 15 0 0130 0v119a15 15 0 01-15 15z" })
4772
4772
  ] }) }), Ze = ({ message: u }) => {
4773
- const { t: D } = Ou(), { colors: f } = du(), e = f[u.direction || uu.received];
4773
+ const { t: D } = Ou(), { colors: f } = du(), e = f[u.direction || Du.received];
4774
4774
  if (!("type" in u.data))
4775
4775
  throw new Error("Unable to detect type for file message");
4776
4776
  if (u.data && u.data.type !== "image" && u.data.type !== "audio" && u.data.type !== "video" && u.data.type !== "file")
@@ -4822,18 +4822,18 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
4822
4822
  }, Qe = ({ message: u }) => {
4823
4823
  var o;
4824
4824
  const { colors: D } = du(), f = Nu(), [e, t] = U(!1), n = pu(null);
4825
- if (G(() => {
4825
+ if (X(() => {
4826
4826
  const d = new IntersectionObserver((c) => {
4827
4827
  !e && c[0].intersectionRatio > 0 && t(!0);
4828
4828
  });
4829
4829
  return n.current && d.observe(n.current), () => {
4830
4830
  n.current && d.unobserve(n.current);
4831
4831
  };
4832
- }, [e]), G(() => {
4832
+ }, [e]), X(() => {
4833
4833
  e && f && f.scroll > 85 && (f.scroll = 101);
4834
4834
  }, [e, f]), !("coordinates" in u.data))
4835
4835
  throw new Error("Unable to find coordinates");
4836
- const r = ((o = u.data) == null ? void 0 : o.coordinates) || { lat: 0, lng: 0 }, s = `https://www.openstreetmap.org/export/embed.html?bbox=${r.lng - 0.1},${r.lat - 0.1},${r.lng + 0.1},${r.lat + 0.1}&layer=mapnik&marker=${r.lat},${r.lng}`, F = D[u.direction || uu.received];
4836
+ const r = ((o = u.data) == null ? void 0 : o.coordinates) || { lat: 0, lng: 0 }, s = `https://www.openstreetmap.org/export/embed.html?bbox=${r.lng - 0.1},${r.lat - 0.1},${r.lng + 0.1},${r.lat + 0.1}&layer=mapnik&marker=${r.lat},${r.lng}`, F = D[u.direction || Du.received];
4837
4837
  return /* @__PURE__ */ a.jsx(
4838
4838
  "div",
4839
4839
  {
@@ -4864,7 +4864,7 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
4864
4864
  }, e = (r, s = 100) => r.length > s ? r.substr(0, s) + "..." : r, t = (r) => r.replace(/\n/g, "<br />");
4865
4865
  if (!("elements" in u.data))
4866
4866
  throw new Error("Unable to find elements");
4867
- const n = D[u.direction || uu.received];
4867
+ const n = D[u.direction || Du.received];
4868
4868
  return /* @__PURE__ */ a.jsxs(
4869
4869
  "div",
4870
4870
  {
@@ -4984,11 +4984,11 @@ function n3(u, D, f) {
4984
4984
  var e;
4985
4985
  return u.length > D && (f == null ? (f = "&hellip;", e = 3) : e = f.length, u = u.substring(0, D - e) + f), u;
4986
4986
  }
4987
- function Ju(u, D) {
4987
+ function Gu(u, D) {
4988
4988
  for (var f = u.length - 1; f >= 0; f--)
4989
4989
  D(u[f]) === !0 && u.splice(f, 1);
4990
4990
  }
4991
- function Gu(u) {
4991
+ function Xu(u) {
4992
4992
  throw new Error("Unhandled case for value: '".concat(u, "'"));
4993
4993
  }
4994
4994
  var bD = /\s+/, N1 = (
@@ -5079,14 +5079,14 @@ function r3(u, D, f) {
5079
5079
  F += c;
5080
5080
  }
5081
5081
  if (r.scheme && r.host) {
5082
- var A = r.scheme + "://";
5083
- if ((F + A).length < n)
5084
- return (A + F).substr(0, D);
5082
+ var j = r.scheme + "://";
5083
+ if ((F + j).length < n)
5084
+ return (j + F).substr(0, D);
5085
5085
  }
5086
5086
  if (F.length <= D)
5087
5087
  return F;
5088
- var C = "";
5089
- return n > 0 && (C = F.substr(-1 * Math.floor(n / 2))), (F.substr(0, Math.ceil(n / 2)) + f + C).substr(0, n + e);
5088
+ var m = "";
5089
+ return n > 0 && (m = F.substr(-1 * Math.floor(n / 2))), (F.substr(0, Math.ceil(n / 2)) + f + m).substr(0, n + e);
5090
5090
  }
5091
5091
  function a3(u) {
5092
5092
  var D = {}, f = u, e = f.match(/^([a-z]+):\/\//i);
@@ -5169,7 +5169,7 @@ var i3 = (
5169
5169
  function o3(u) {
5170
5170
  return u >= 0 && u <= 31 || u == 127;
5171
5171
  }
5172
- function nD(u) {
5172
+ function rD(u) {
5173
5173
  return u >= 65 && u <= 90 || u >= 97 && u <= 122;
5174
5174
  }
5175
5175
  function hu(u) {
@@ -5178,10 +5178,10 @@ function hu(u) {
5178
5178
  function hf(u) {
5179
5179
  return u == 34 || u == 39;
5180
5180
  }
5181
- function Xu(u) {
5181
+ function Zu(u) {
5182
5182
  return u < 8232 ? u < 160 ? u >= 9 && u <= 13 || u == 32 : u < 5760 ? u == 160 : u == 5760 || u >= 8192 && u <= 8202 : u < 8287 ? u >= 8232 && u <= 8233 || u == 8239 : u < 12288 ? u == 8287 : u == 12288 || u == 65279;
5183
5183
  }
5184
- function Zu(u) {
5184
+ function Qu(u) {
5185
5185
  return u < 4800 ? u < 2949 ? u < 2451 ? u < 1425 ? u < 768 ? u < 192 ? u < 169 ? u < 65 ? u >= 48 && u <= 57 : u >= 65 && u <= 90 || u >= 97 && u <= 122 : u < 181 ? u >= 169 && u <= 170 || u == 174 : u == 181 || u == 186 : u < 710 ? u < 216 ? u >= 192 && u <= 214 : u >= 216 && u <= 246 || u >= 248 && u <= 705 : u < 748 ? u >= 710 && u <= 721 || u >= 736 && u <= 740 : u == 748 || u == 750 : u < 910 ? u < 895 ? u < 886 ? u >= 768 && u <= 884 : u >= 886 && u <= 887 || u >= 890 && u <= 893 : u < 904 ? u == 895 || u == 902 : u >= 904 && u <= 906 || u == 908 : u < 1155 ? u < 931 ? u >= 910 && u <= 929 : u >= 931 && u <= 1013 || u >= 1015 && u <= 1153 : u < 1369 ? u >= 1155 && u <= 1327 || u >= 1329 && u <= 1366 : u == 1369 || u >= 1377 && u <= 1415 : u < 1808 ? u < 1552 ? u < 1476 ? u < 1471 ? u >= 1425 && u <= 1469 : u == 1471 || u >= 1473 && u <= 1474 : u < 1488 ? u >= 1476 && u <= 1477 || u == 1479 : u >= 1488 && u <= 1514 || u >= 1520 && u <= 1522 : u < 1749 ? u < 1568 ? u >= 1552 && u <= 1562 : u >= 1568 && u <= 1641 || u >= 1646 && u <= 1747 : u < 1770 ? u >= 1749 && u <= 1756 || u >= 1759 && u <= 1768 : u >= 1770 && u <= 1788 || u == 1791 : u < 2230 ? u < 2042 ? u < 1869 ? u >= 1808 && u <= 1866 : u >= 1869 && u <= 1969 || u >= 1984 && u <= 2037 : u < 2112 ? u == 2042 || u >= 2048 && u <= 2093 : u >= 2112 && u <= 2139 || u >= 2208 && u <= 2228 : u < 2406 ? u < 2260 ? u >= 2230 && u <= 2237 : u >= 2260 && u <= 2273 || u >= 2275 && u <= 2403 : u < 2437 ? u >= 2406 && u <= 2415 || u >= 2417 && u <= 2435 : u >= 2437 && u <= 2444 || u >= 2447 && u <= 2448 : u < 2693 ? u < 2579 ? u < 2519 ? u < 2486 ? u < 2474 ? u >= 2451 && u <= 2472 : u >= 2474 && u <= 2480 || u == 2482 : u < 2503 ? u >= 2486 && u <= 2489 || u >= 2492 && u <= 2500 : u >= 2503 && u <= 2504 || u >= 2507 && u <= 2510 : u < 2534 ? u < 2524 ? u == 2519 : u >= 2524 && u <= 2525 || u >= 2527 && u <= 2531 : u < 2565 ? u >= 2534 && u <= 2545 || u >= 2561 && u <= 2563 : u >= 2565 && u <= 2570 || u >= 2575 && u <= 2576 : u < 2631 ? u < 2613 ? u < 2602 ? u >= 2579 && u <= 2600 : u >= 2602 && u <= 2608 || u >= 2610 && u <= 2611 : u < 2620 ? u >= 2613 && u <= 2614 || u >= 2616 && u <= 2617 : u == 2620 || u >= 2622 && u <= 2626 : u < 2649 ? u < 2635 ? u >= 2631 && u <= 2632 : u >= 2635 && u <= 2637 || u == 2641 : u < 2662 ? u >= 2649 && u <= 2652 || u == 2654 : u >= 2662 && u <= 2677 || u >= 2689 && u <= 2691 : u < 2821 ? u < 2759 ? u < 2730 ? u < 2703 ? u >= 2693 && u <= 2701 : u >= 2703 && u <= 2705 || u >= 2707 && u <= 2728 : u < 2741 ? u >= 2730 && u <= 2736 || u >= 2738 && u <= 2739 : u >= 2741 && u <= 2745 || u >= 2748 && u <= 2757 : u < 2784 ? u < 2763 ? u >= 2759 && u <= 2761 : u >= 2763 && u <= 2765 || u == 2768 : u < 2809 ? u >= 2784 && u <= 2787 || u >= 2790 && u <= 2799 : u == 2809 || u >= 2817 && u <= 2819 : u < 2887 ? u < 2858 ? u < 2831 ? u >= 2821 && u <= 2828 : u >= 2831 && u <= 2832 || u >= 2835 && u <= 2856 : u < 2869 ? u >= 2858 && u <= 2864 || u >= 2866 && u <= 2867 : u >= 2869 && u <= 2873 || u >= 2876 && u <= 2884 : u < 2911 ? u < 2902 ? u >= 2887 && u <= 2888 || u >= 2891 && u <= 2893 : u >= 2902 && u <= 2903 || u >= 2908 && u <= 2909 : u < 2929 ? u >= 2911 && u <= 2915 || u >= 2918 && u <= 2927 : u == 2929 || u >= 2946 && u <= 2947 : u < 3517 ? u < 3205 ? u < 3046 ? u < 2984 ? u < 2969 ? u < 2958 ? u >= 2949 && u <= 2954 : u >= 2958 && u <= 2960 || u >= 2962 && u <= 2965 : u < 2974 ? u >= 2969 && u <= 2970 || u == 2972 : u >= 2974 && u <= 2975 || u >= 2979 && u <= 2980 : u < 3014 ? u < 2990 ? u >= 2984 && u <= 2986 : u >= 2990 && u <= 3001 || u >= 3006 && u <= 3010 : u < 3024 ? u >= 3014 && u <= 3016 || u >= 3018 && u <= 3021 : u == 3024 || u == 3031 : u < 3142 ? u < 3086 ? u < 3072 ? u >= 3046 && u <= 3055 : u >= 3072 && u <= 3075 || u >= 3077 && u <= 3084 : u < 3114 ? u >= 3086 && u <= 3088 || u >= 3090 && u <= 3112 : u >= 3114 && u <= 3129 || u >= 3133 && u <= 3140 : u < 3160 ? u < 3146 ? u >= 3142 && u <= 3144 : u >= 3146 && u <= 3149 || u >= 3157 && u <= 3158 : u < 3174 ? u >= 3160 && u <= 3162 || u >= 3168 && u <= 3171 : u >= 3174 && u <= 3183 || u >= 3200 && u <= 3203 : u < 3333 ? u < 3274 ? u < 3242 ? u < 3214 ? u >= 3205 && u <= 3212 : u >= 3214 && u <= 3216 || u >= 3218 && u <= 3240 : u < 3260 ? u >= 3242 && u <= 3251 || u >= 3253 && u <= 3257 : u >= 3260 && u <= 3268 || u >= 3270 && u <= 3272 : u < 3296 ? u < 3285 ? u >= 3274 && u <= 3277 : u >= 3285 && u <= 3286 || u == 3294 : u < 3313 ? u >= 3296 && u <= 3299 || u >= 3302 && u <= 3311 : u >= 3313 && u <= 3314 || u >= 3329 && u <= 3331 : u < 3423 ? u < 3389 ? u < 3342 ? u >= 3333 && u <= 3340 : u >= 3342 && u <= 3344 || u >= 3346 && u <= 3386 : u < 3402 ? u >= 3389 && u <= 3396 || u >= 3398 && u <= 3400 : u >= 3402 && u <= 3406 || u >= 3412 && u <= 3415 : u < 3458 ? u < 3430 ? u >= 3423 && u <= 3427 : u >= 3430 && u <= 3439 || u >= 3450 && u <= 3455 : u < 3482 ? u >= 3458 && u <= 3459 || u >= 3461 && u <= 3478 : u >= 3482 && u <= 3505 || u >= 3507 && u <= 3515 : u < 3804 ? u < 3722 ? u < 3570 ? u < 3535 ? u < 3520 ? u == 3517 : u >= 3520 && u <= 3526 || u == 3530 : u < 3544 ? u >= 3535 && u <= 3540 || u == 3542 : u >= 3544 && u <= 3551 || u >= 3558 && u <= 3567 : u < 3664 ? u < 3585 ? u >= 3570 && u <= 3571 : u >= 3585 && u <= 3642 || u >= 3648 && u <= 3662 : u < 3716 ? u >= 3664 && u <= 3673 || u >= 3713 && u <= 3714 : u == 3716 || u >= 3719 && u <= 3720 : u < 3754 ? u < 3737 ? u < 3725 ? u == 3722 : u == 3725 || u >= 3732 && u <= 3735 : u < 3749 ? u >= 3737 && u <= 3743 || u >= 3745 && u <= 3747 : u == 3749 || u == 3751 : u < 3776 ? u < 3757 ? u >= 3754 && u <= 3755 : u >= 3757 && u <= 3769 || u >= 3771 && u <= 3773 : u < 3784 ? u >= 3776 && u <= 3780 || u == 3782 : u >= 3784 && u <= 3789 || u >= 3792 && u <= 3801 : u < 4176 ? u < 3902 ? u < 3872 ? u < 3840 ? u >= 3804 && u <= 3807 : u == 3840 || u >= 3864 && u <= 3865 : u < 3895 ? u >= 3872 && u <= 3881 || u == 3893 : u == 3895 || u == 3897 : u < 3974 ? u < 3913 ? u >= 3902 && u <= 3911 : u >= 3913 && u <= 3948 || u >= 3953 && u <= 3972 : u < 4038 ? u >= 3974 && u <= 3991 || u >= 3993 && u <= 4028 : u == 4038 || u >= 4096 && u <= 4169 : u < 4688 ? u < 4301 ? u < 4256 ? u >= 4176 && u <= 4253 : u >= 4256 && u <= 4293 || u == 4295 : u < 4348 ? u == 4301 || u >= 4304 && u <= 4346 : u >= 4348 && u <= 4680 || u >= 4682 && u <= 4685 : u < 4746 ? u < 4698 ? u >= 4688 && u <= 4694 || u == 4696 : u >= 4698 && u <= 4701 || u >= 4704 && u <= 4744 : u < 4786 ? u >= 4746 && u <= 4749 || u >= 4752 && u <= 4784 : u >= 4786 && u <= 4789 || u >= 4792 && u <= 4798 : u < 11035 ? u < 7416 ? u < 6176 ? u < 5873 ? u < 4992 ? u < 4824 ? u < 4802 ? u == 4800 : u >= 4802 && u <= 4805 || u >= 4808 && u <= 4822 : u < 4888 ? u >= 4824 && u <= 4880 || u >= 4882 && u <= 4885 : u >= 4888 && u <= 4954 || u >= 4957 && u <= 4959 : u < 5121 ? u < 5024 ? u >= 4992 && u <= 5007 : u >= 5024 && u <= 5109 || u >= 5112 && u <= 5117 : u < 5761 ? u >= 5121 && u <= 5740 || u >= 5743 && u <= 5759 : u >= 5761 && u <= 5786 || u >= 5792 && u <= 5866 : u < 6002 ? u < 5920 ? u < 5888 ? u >= 5873 && u <= 5880 : u >= 5888 && u <= 5900 || u >= 5902 && u <= 5908 : u < 5984 ? u >= 5920 && u <= 5940 || u >= 5952 && u <= 5971 : u >= 5984 && u <= 5996 || u >= 5998 && u <= 6e3 : u < 6108 ? u < 6016 ? u >= 6002 && u <= 6003 : u >= 6016 && u <= 6099 || u == 6103 : u < 6155 ? u >= 6108 && u <= 6109 || u >= 6112 && u <= 6121 : u >= 6155 && u <= 6157 || u >= 6160 && u <= 6169 : u < 6783 ? u < 6512 ? u < 6400 ? u < 6272 ? u >= 6176 && u <= 6263 : u >= 6272 && u <= 6314 || u >= 6320 && u <= 6389 : u < 6448 ? u >= 6400 && u <= 6430 || u >= 6432 && u <= 6443 : u >= 6448 && u <= 6459 || u >= 6470 && u <= 6509 : u < 6608 ? u < 6528 ? u >= 6512 && u <= 6516 : u >= 6528 && u <= 6571 || u >= 6576 && u <= 6601 : u < 6688 ? u >= 6608 && u <= 6617 || u >= 6656 && u <= 6683 : u >= 6688 && u <= 6750 || u >= 6752 && u <= 6780 : u < 7040 ? u < 6832 ? u < 6800 ? u >= 6783 && u <= 6793 : u >= 6800 && u <= 6809 || u == 6823 : u < 6992 ? u >= 6832 && u <= 6846 || u >= 6912 && u <= 6987 : u >= 6992 && u <= 7001 || u >= 7019 && u <= 7027 : u < 7245 ? u < 7168 ? u >= 7040 && u <= 7155 : u >= 7168 && u <= 7223 || u >= 7232 && u <= 7241 : u < 7376 ? u >= 7245 && u <= 7293 || u >= 7296 && u <= 7304 : u >= 7376 && u <= 7378 || u >= 7380 && u <= 7414 : u < 8450 ? u < 8130 ? u < 8025 ? u < 7960 ? u < 7424 ? u >= 7416 && u <= 7417 : u >= 7424 && u <= 7669 || u >= 7675 && u <= 7957 : u < 8008 ? u >= 7960 && u <= 7965 || u >= 7968 && u <= 8005 : u >= 8008 && u <= 8013 || u >= 8016 && u <= 8023 : u < 8031 ? u < 8027 ? u == 8025 : u == 8027 || u == 8029 : u < 8118 ? u >= 8031 && u <= 8061 || u >= 8064 && u <= 8116 : u >= 8118 && u <= 8124 || u == 8126 : u < 8205 ? u < 8150 ? u < 8134 ? u >= 8130 && u <= 8132 : u >= 8134 && u <= 8140 || u >= 8144 && u <= 8147 : u < 8178 ? u >= 8150 && u <= 8155 || u >= 8160 && u <= 8172 : u >= 8178 && u <= 8180 || u >= 8182 && u <= 8188 : u < 8305 ? u < 8252 ? u == 8205 : u == 8252 || u == 8265 : u < 8336 ? u == 8305 || u == 8319 : u >= 8336 && u <= 8348 || u >= 8400 && u <= 8432 : u < 8579 ? u < 8486 ? u < 8469 ? u < 8455 ? u == 8450 : u == 8455 || u >= 8458 && u <= 8467 : u < 8482 ? u == 8469 || u >= 8473 && u <= 8477 : u == 8482 || u == 8484 : u < 8495 ? u < 8488 ? u == 8486 : u == 8488 || u >= 8490 && u <= 8493 : u < 8517 ? u >= 8495 && u <= 8505 || u >= 8508 && u <= 8511 : u >= 8517 && u <= 8521 || u == 8526 : u < 9410 ? u < 9e3 ? u < 8592 ? u >= 8579 && u <= 8580 : u >= 8592 && u <= 8703 || u >= 8986 && u <= 8987 : u < 9193 ? u == 9e3 || u == 9167 : u >= 9193 && u <= 9203 || u >= 9208 && u <= 9210 : u < 9723 ? u < 9654 ? u == 9410 || u >= 9642 && u <= 9643 : u == 9654 || u == 9664 : u < 10548 ? u >= 9723 && u <= 9726 || u >= 9728 && u <= 10175 : u >= 10548 && u <= 10549 || u >= 11013 && u <= 11015 : u < 43259 ? u < 12445 ? u < 11688 ? u < 11520 ? u < 11264 ? u < 11088 ? u >= 11035 && u <= 11036 : u == 11088 || u == 11093 : u < 11360 ? u >= 11264 && u <= 11310 || u >= 11312 && u <= 11358 : u >= 11360 && u <= 11492 || u >= 11499 && u <= 11507 : u < 11568 ? u < 11559 ? u >= 11520 && u <= 11557 : u == 11559 || u == 11565 : u < 11647 ? u >= 11568 && u <= 11623 || u == 11631 : u >= 11647 && u <= 11670 || u >= 11680 && u <= 11686 : u < 11744 ? u < 11712 ? u < 11696 ? u >= 11688 && u <= 11694 : u >= 11696 && u <= 11702 || u >= 11704 && u <= 11710 : u < 11728 ? u >= 11712 && u <= 11718 || u >= 11720 && u <= 11726 : u >= 11728 && u <= 11734 || u >= 11736 && u <= 11742 : u < 12330 ? u < 11823 ? u >= 11744 && u <= 11775 : u == 11823 || u >= 12293 && u <= 12294 : u < 12353 ? u >= 12330 && u <= 12341 || u >= 12347 && u <= 12349 : u >= 12353 && u <= 12438 || u >= 12441 && u <= 12442 : u < 42512 ? u < 12951 ? u < 12549 ? u < 12449 ? u >= 12445 && u <= 12447 : u >= 12449 && u <= 12538 || u >= 12540 && u <= 12543 : u < 12704 ? u >= 12549 && u <= 12589 || u >= 12593 && u <= 12686 : u >= 12704 && u <= 12730 || u >= 12784 && u <= 12799 : u < 19968 ? u < 12953 ? u == 12951 : u == 12953 || u >= 13312 && u <= 19893 : u < 42192 ? u >= 19968 && u <= 40917 || u >= 40960 && u <= 42124 : u >= 42192 && u <= 42237 || u >= 42240 && u <= 42508 : u < 42891 ? u < 42623 ? u < 42560 ? u >= 42512 && u <= 42539 : u >= 42560 && u <= 42610 || u >= 42612 && u <= 42621 : u < 42775 ? u >= 42623 && u <= 42725 || u >= 42736 && u <= 42737 : u >= 42775 && u <= 42783 || u >= 42786 && u <= 42888 : u < 43072 ? u < 42928 ? u >= 42891 && u <= 42926 : u >= 42928 && u <= 42935 || u >= 42999 && u <= 43047 : u < 43216 ? u >= 43072 && u <= 43123 || u >= 43136 && u <= 43205 : u >= 43216 && u <= 43225 || u >= 43232 && u <= 43255 : u < 55243 ? u < 43744 ? u < 43488 ? u < 43312 ? u < 43261 ? u == 43259 : u == 43261 || u >= 43264 && u <= 43309 : u < 43392 ? u >= 43312 && u <= 43347 || u >= 43360 && u <= 43388 : u >= 43392 && u <= 43456 || u >= 43471 && u <= 43481 : u < 43600 ? u < 43520 ? u >= 43488 && u <= 43518 : u >= 43520 && u <= 43574 || u >= 43584 && u <= 43597 : u < 43642 ? u >= 43600 && u <= 43609 || u >= 43616 && u <= 43638 : u >= 43642 && u <= 43714 || u >= 43739 && u <= 43741 : u < 43824 ? u < 43785 ? u < 43762 ? u >= 43744 && u <= 43759 : u >= 43762 && u <= 43766 || u >= 43777 && u <= 43782 : u < 43808 ? u >= 43785 && u <= 43790 || u >= 43793 && u <= 43798 : u >= 43808 && u <= 43814 || u >= 43816 && u <= 43822 : u < 44012 ? u < 43868 ? u >= 43824 && u <= 43866 : u >= 43868 && u <= 43877 || u >= 43888 && u <= 44010 : u < 44032 ? u >= 44012 && u <= 44013 || u >= 44016 && u <= 44025 : u >= 44032 && u <= 55203 || u >= 55216 && u <= 55238 : u < 64848 ? u < 64298 ? u < 64112 ? u < 55296 ? u >= 55243 && u <= 55291 : u >= 55296 && u <= 57343 || u >= 63744 && u <= 64109 : u < 64275 ? u >= 64112 && u <= 64217 || u >= 64256 && u <= 64262 : u >= 64275 && u <= 64279 || u >= 64285 && u <= 64296 : u < 64320 ? u < 64312 ? u >= 64298 && u <= 64310 : u >= 64312 && u <= 64316 || u == 64318 : u < 64326 ? u >= 64320 && u <= 64321 || u >= 64323 && u <= 64324 : u >= 64326 && u <= 64433 || u >= 64467 && u <= 64829 : u < 65296 ? u < 65024 ? u < 64914 ? u >= 64848 && u <= 64911 : u >= 64914 && u <= 64967 || u >= 65008 && u <= 65019 : u < 65136 ? u >= 65024 && u <= 65039 || u >= 65056 && u <= 65071 : u >= 65136 && u <= 65140 || u >= 65142 && u <= 65276 : u < 65474 ? u < 65345 ? u >= 65296 && u <= 65305 || u >= 65313 && u <= 65338 : u >= 65345 && u <= 65370 || u >= 65382 && u <= 65470 : u < 65490 ? u >= 65474 && u <= 65479 || u >= 65482 && u <= 65487 : u >= 65490 && u <= 65495 || u >= 65498 && u <= 65500;
5186
5186
  }
5187
5187
  function d3(u) {
@@ -5196,21 +5196,21 @@ function O1(u) {
5196
5196
  function c3(u) {
5197
5197
  return u < 91 ? u == 40 : u == 91 || u == 123;
5198
5198
  }
5199
- function Hf(u) {
5199
+ function Wf(u) {
5200
5200
  return u < 93 ? u == 41 : u == 93 || u == 125;
5201
5201
  }
5202
- var l3 = /^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/, R1 = /https?:\/\//i, E3 = new RegExp("^" + R1.source, "i"), h3 = /^(javascript|vbscript):/i, b3 = /^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/, p3 = /^(?:\/\/)?([^/#?:]+)/, oD = nD;
5202
+ var l3 = /^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/, R1 = /https?:\/\//i, E3 = new RegExp("^" + R1.source, "i"), h3 = /^(javascript|vbscript):/i, b3 = /^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/, p3 = /^(?:\/\/)?([^/#?:]+)/, oD = rD;
5203
5203
  function P1(u) {
5204
- return nD(u) || hu(u) || u === 43 || // '+'
5204
+ return rD(u) || hu(u) || u === 43 || // '+'
5205
5205
  u === 45 || // '-'
5206
5206
  u === 46;
5207
5207
  }
5208
- var Ku = Zu;
5208
+ var Ju = Qu;
5209
5209
  function bf(u) {
5210
- return u === 95 || Ku(u);
5210
+ return u === 95 || Ju(u);
5211
5211
  }
5212
5212
  function I1(u) {
5213
- return Zu(u) || C3(u) || O1(u);
5213
+ return Qu(u) || C3(u) || O1(u);
5214
5214
  }
5215
5215
  function pf(u) {
5216
5216
  return u === 47 || // '/'
@@ -5294,7 +5294,7 @@ function T3(u) {
5294
5294
  }
5295
5295
  return D;
5296
5296
  }
5297
- var N3 = /^mailto:/i, $1 = Zu;
5297
+ var N3 = /^mailto:/i, $1 = Qu;
5298
5298
  function Bf(u) {
5299
5299
  return $1(u) || d3(u);
5300
5300
  }
@@ -5322,7 +5322,7 @@ var R3 = (
5322
5322
  }(cD)
5323
5323
  );
5324
5324
  function M1(u) {
5325
- return u === 95 || Zu(u);
5325
+ return u === 95 || Qu(u);
5326
5326
  }
5327
5327
  function P3(u) {
5328
5328
  return u.length <= 140;
@@ -5361,7 +5361,7 @@ var I3 = [
5361
5361
  case "youtube":
5362
5362
  return "https://youtube.com/hashtag/" + e;
5363
5363
  default:
5364
- Gu(f);
5364
+ Xu(f);
5365
5365
  }
5366
5366
  }, D.prototype.getAnchorText = function() {
5367
5367
  return "#" + this.hashtag;
@@ -5386,7 +5386,7 @@ function q1(u) {
5386
5386
  return u === 45 || // '-'
5387
5387
  u === 46 || // '.'
5388
5388
  u === 95 || // '_'
5389
- nD(u) || hu(u);
5389
+ rD(u) || hu(u);
5390
5390
  }
5391
5391
  function M3(u, D) {
5392
5392
  var f = $3[D];
@@ -5425,7 +5425,7 @@ var q3 = [
5425
5425
  case "youtube":
5426
5426
  return "https://youtube.com/@" + this.mention;
5427
5427
  default:
5428
- Gu(this.serviceName);
5428
+ Xu(this.serviceName);
5429
5429
  }
5430
5430
  }, D.prototype.getAnchorText = function() {
5431
5431
  return "@" + this.mention;
@@ -5434,7 +5434,7 @@ var q3 = [
5434
5434
  return e && f.push(e), f;
5435
5435
  }, D;
5436
5436
  }(cD)
5437
- ), U3 = /[-. ()]/, V3 = /(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/, H3 = /(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/, W3 = new RegExp("^".concat(V3.source, "|").concat(H3.source, "$"));
5437
+ ), U3 = /[-. ()]/, V3 = /(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/, W3 = /(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/, H3 = new RegExp("^".concat(V3.source, "|").concat(W3.source, "$"));
5438
5438
  function z1(u) {
5439
5439
  return u === 45 || // '-'
5440
5440
  u === 46 || // '.'
@@ -5446,7 +5446,7 @@ function gf(u) {
5446
5446
  }
5447
5447
  function Y3(u) {
5448
5448
  var D = u.charAt(0) === "+" || U3.test(u);
5449
- return D && W3.test(u);
5449
+ return D && H3.test(u);
5450
5450
  }
5451
5451
  var K3 = (
5452
5452
  /** @class */
@@ -5567,7 +5567,7 @@ function G3(u, D) {
5567
5567
  b2(f, r, t);
5568
5568
  break;
5569
5569
  case 22:
5570
- Qu(f, r, t);
5570
+ uD(f, r, t);
5571
5571
  break;
5572
5572
  case 23:
5573
5573
  p2(f, r, t);
@@ -5627,7 +5627,7 @@ function G3(u, D) {
5627
5627
  I2(f, r, t);
5628
5628
  break;
5629
5629
  default:
5630
- Gu(r.state);
5630
+ Xu(r.state);
5631
5631
  }
5632
5632
  }
5633
5633
  if (!f.hasSchemeUrlMachine() && f.charIdx > 0 && oD(t)) {
@@ -5695,7 +5695,7 @@ function jD(u, D, f) {
5695
5695
  e,
5696
5696
  0
5697
5697
  /* State.SchemeChar */
5698
- )), Zu(f) && u.addMachine(tf(
5698
+ )), Qu(f) && u.addMachine(tf(
5699
5699
  e,
5700
5700
  5
5701
5701
  /* State.DomainLabelChar */
@@ -5715,7 +5715,7 @@ function Z3(u, D, f) {
5715
5715
  }
5716
5716
  function Q3(u, D, f) {
5717
5717
  var e = u.charIdx;
5718
- f === 47 ? D.state = 3 : f === 46 ? u.removeMachine(D) : Ku(f) ? (D.state = 5, oD(f) && u.addMachine(SD(
5718
+ f === 47 ? D.state = 3 : f === 46 ? u.removeMachine(D) : Ju(f) ? (D.state = 5, oD(f) && u.addMachine(SD(
5719
5719
  e,
5720
5720
  0
5721
5721
  /* State.SchemeChar */
@@ -5725,25 +5725,25 @@ function u2(u, D, f) {
5725
5725
  f === 47 ? D.state = 4 : I1(f) ? (D.state = 10, D.acceptStateReached = !0) : tu(u, D);
5726
5726
  }
5727
5727
  function D2(u, D, f, e) {
5728
- e === 47 ? (D.state = 10, D.acceptStateReached = !0) : Ku(e) ? (D.state = 5, D.acceptStateReached = !0) : u.removeMachine(D);
5728
+ e === 47 ? (D.state = 10, D.acceptStateReached = !0) : Ju(e) ? (D.state = 5, D.acceptStateReached = !0) : u.removeMachine(D);
5729
5729
  }
5730
5730
  function f2(u, D, f) {
5731
5731
  f === 47 ? D.state = 12 : u.removeMachine(D);
5732
5732
  }
5733
5733
  function e2(u, D, f) {
5734
- Ku(f) ? D.state = 5 : u.removeMachine(D);
5734
+ Ju(f) ? D.state = 5 : u.removeMachine(D);
5735
5735
  }
5736
5736
  function t2(u, D, f) {
5737
5737
  f === 46 ? D.state = 7 : f === 45 ? D.state = 6 : f === 58 ? D.state = 8 : pf(f) ? D.state = 10 : bf(f) || tu(u, D);
5738
5738
  }
5739
5739
  function n2(u, D, f, e) {
5740
- e === 45 || (e === 46 ? tu(u, D) : Ku(e) ? D.state = 5 : tu(u, D));
5740
+ e === 45 || (e === 46 ? tu(u, D) : Ju(e) ? D.state = 5 : tu(u, D));
5741
5741
  }
5742
5742
  function r2(u, D, f, e) {
5743
- e === 46 ? tu(u, D) : Ku(e) ? (D.state = 5, D.acceptStateReached = !0) : tu(u, D);
5743
+ e === 46 ? tu(u, D) : Ju(e) ? (D.state = 5, D.acceptStateReached = !0) : tu(u, D);
5744
5744
  }
5745
5745
  function a2(u, D, f) {
5746
- f === 46 ? D.state = 14 : f === 58 ? D.state = 8 : hu(f) || (pf(f) ? D.state = 10 : Zu(f) ? u.removeMachine(D) : tu(u, D));
5746
+ f === 46 ? D.state = 14 : f === 58 ? D.state = 8 : hu(f) || (pf(f) ? D.state = 10 : Qu(f) ? u.removeMachine(D) : tu(u, D));
5747
5747
  }
5748
5748
  function s2(u, D, f) {
5749
5749
  hu(f) ? (D.octetsEncountered++, D.octetsEncountered === 4 && (D.acceptStateReached = !0), D.state = 13) : tu(u, D);
@@ -5758,34 +5758,34 @@ function o2(u, D, f) {
5758
5758
  I1(f) || tu(u, D);
5759
5759
  }
5760
5760
  function d2(u, D, f, e) {
5761
- f.toLowerCase() === "a" ? D.state = 16 : Qu(u, D, e);
5761
+ f.toLowerCase() === "a" ? D.state = 16 : uD(u, D, e);
5762
5762
  }
5763
5763
  function C2(u, D, f, e) {
5764
- f.toLowerCase() === "i" ? D.state = 17 : Qu(u, D, e);
5764
+ f.toLowerCase() === "i" ? D.state = 17 : uD(u, D, e);
5765
5765
  }
5766
5766
  function c2(u, D, f, e) {
5767
- f.toLowerCase() === "l" ? D.state = 18 : Qu(u, D, e);
5767
+ f.toLowerCase() === "l" ? D.state = 18 : uD(u, D, e);
5768
5768
  }
5769
5769
  function l2(u, D, f, e) {
5770
- f.toLowerCase() === "t" ? D.state = 19 : Qu(u, D, e);
5770
+ f.toLowerCase() === "t" ? D.state = 19 : uD(u, D, e);
5771
5771
  }
5772
5772
  function E2(u, D, f, e) {
5773
- f.toLowerCase() === "o" ? D.state = 20 : Qu(u, D, e);
5773
+ f.toLowerCase() === "o" ? D.state = 20 : uD(u, D, e);
5774
5774
  }
5775
5775
  function h2(u, D, f) {
5776
- f === 58 ? D.state = 21 : Qu(u, D, f);
5776
+ f === 58 ? D.state = 21 : uD(u, D, f);
5777
5777
  }
5778
5778
  function b2(u, D, f) {
5779
5779
  Bf(f) ? D.state = 22 : u.removeMachine(D);
5780
5780
  }
5781
- function Qu(u, D, f) {
5781
+ function uD(u, D, f) {
5782
5782
  f === 46 ? D.state = 23 : f === 64 ? D.state = 24 : Bf(f) ? D.state = 22 : u.removeMachine(D);
5783
5783
  }
5784
5784
  function p2(u, D, f) {
5785
5785
  f === 46 || f === 64 ? u.removeMachine(D) : Bf(f) ? D.state = 22 : u.removeMachine(D);
5786
5786
  }
5787
5787
  function B2(u, D, f) {
5788
- Ku(f) ? D.state = 25 : u.removeMachine(D);
5788
+ Ju(f) ? D.state = 25 : u.removeMachine(D);
5789
5789
  }
5790
5790
  function g2(u, D, f) {
5791
5791
  f === 46 ? D.state = 27 : f === 45 ? D.state = 26 : bf(f) || tu(u, D);
@@ -5794,7 +5794,7 @@ function m2(u, D, f) {
5794
5794
  f === 45 || f === 46 ? tu(u, D) : bf(f) ? D.state = 25 : tu(u, D);
5795
5795
  }
5796
5796
  function _2(u, D, f) {
5797
- f === 46 || f === 45 ? tu(u, D) : Ku(f) ? (D.state = 25, D.acceptStateReached = !0) : tu(u, D);
5797
+ f === 46 || f === 45 ? tu(u, D) : Ju(f) ? (D.state = 25, D.acceptStateReached = !0) : tu(u, D);
5798
5798
  }
5799
5799
  function y2(u, D, f) {
5800
5800
  M1(f) ? (D.state = 29, D.acceptStateReached = !0) : u.removeMachine(D);
@@ -5806,7 +5806,7 @@ function w2(u, D, f) {
5806
5806
  q1(f) ? (D.state = 31, D.acceptStateReached = !0) : u.removeMachine(D);
5807
5807
  }
5808
5808
  function A2(u, D, f) {
5809
- q1(f) || (Zu(f) ? u.removeMachine(D) : tu(u, D));
5809
+ q1(f) || (Qu(f) ? u.removeMachine(D) : tu(u, D));
5810
5810
  }
5811
5811
  function x2(u, D, f, e) {
5812
5812
  hu(e) ? D.state = 38 : (u.removeMachine(D), jD(u, f, e));
@@ -5849,13 +5849,13 @@ function tu(u, D) {
5849
5849
  var c = D.startIdx, l = e.slice(D.startIdx, t);
5850
5850
  switch (l = $2(l), D.type) {
5851
5851
  case 0: {
5852
- var A = e.charCodeAt(D.startIdx - 1);
5853
- if (A === 64)
5852
+ var j = e.charCodeAt(D.startIdx - 1);
5853
+ if (j === 64)
5854
5854
  return;
5855
5855
  switch (D.matchType) {
5856
5856
  case 0: {
5857
- var C = R1.exec(l);
5858
- if (C && (c = c + C.index, l = l.slice(C.index)), !B3(l))
5857
+ var m = R1.exec(l);
5858
+ if (m && (c = c + m.index, l = l.slice(m.index)), !B3(l))
5859
5859
  return;
5860
5860
  break;
5861
5861
  }
@@ -5870,7 +5870,7 @@ function tu(u, D) {
5870
5870
  break;
5871
5871
  }
5872
5872
  default:
5873
- Gu(D);
5873
+ Xu(D);
5874
5874
  }
5875
5875
  f.push(new A3({
5876
5876
  tagBuilder: n,
@@ -5919,19 +5919,19 @@ function tu(u, D) {
5919
5919
  }
5920
5920
  case 4: {
5921
5921
  if (l = l.replace(/ +$/g, ""), Y3(l)) {
5922
- var m = l.replace(/[^0-9,;#]/g, "");
5922
+ var C = l.replace(/[^0-9,;#]/g, "");
5923
5923
  f.push(new K3({
5924
5924
  tagBuilder: n,
5925
5925
  matchedText: l,
5926
5926
  offset: c,
5927
- number: m,
5927
+ number: C,
5928
5928
  plusSign: l.charAt(0) === "+"
5929
5929
  }));
5930
5930
  }
5931
5931
  break;
5932
5932
  }
5933
5933
  default:
5934
- Gu(D);
5934
+ Xu(D);
5935
5935
  }
5936
5936
  }
5937
5937
  }
@@ -5944,10 +5944,10 @@ function L2(u) {
5944
5944
  case 2:
5945
5945
  return "ipV4";
5946
5946
  default:
5947
- Gu(u);
5947
+ Xu(u);
5948
5948
  }
5949
5949
  }
5950
- var Wf = {
5950
+ var Hf = {
5951
5951
  ")": "(",
5952
5952
  "}": "{",
5953
5953
  "]": "["
@@ -5959,12 +5959,12 @@ function $2(u) {
5959
5959
  "[": 0
5960
5960
  }, f = 0; f < u.length; f++) {
5961
5961
  var e = u.charAt(f), t = u.charCodeAt(f);
5962
- c3(t) ? D[e]++ : Hf(t) && D[Wf[e]]--;
5962
+ c3(t) ? D[e]++ : Wf(t) && D[Hf[e]]--;
5963
5963
  }
5964
5964
  for (var n = u.length - 1; n >= 0; ) {
5965
5965
  var e = u.charAt(n), t = u.charCodeAt(n);
5966
- if (Hf(t)) {
5967
- var r = Wf[e];
5966
+ if (Wf(t)) {
5967
+ var r = Hf[e];
5968
5968
  if (D[r] < 0)
5969
5969
  D[r]++, n--;
5970
5970
  else
@@ -6057,12 +6057,12 @@ var Su = (
6057
6057
  return u;
6058
6058
  }()
6059
6059
  );
6060
- function H2(u, D) {
6060
+ function W2(u, D) {
6061
6061
  for (var f = new V2(u, D), e = u.length; f.charIdx < e; ) {
6062
6062
  var t = u.charAt(f.charIdx), n = u.charCodeAt(f.charIdx);
6063
6063
  switch (f.state) {
6064
6064
  case 0:
6065
- W2(f, t);
6065
+ H2(f, t);
6066
6066
  break;
6067
6067
  case 1:
6068
6068
  Y2(f, t, n);
@@ -6125,35 +6125,35 @@ function H2(u, D) {
6125
6125
  dt(f, t);
6126
6126
  break;
6127
6127
  default:
6128
- Gu(f.state);
6128
+ Xu(f.state);
6129
6129
  }
6130
6130
  f.charIdx++;
6131
6131
  }
6132
6132
  f.currentDataIdx < f.charIdx && Ct(f);
6133
6133
  }
6134
- function W2(u, D) {
6134
+ function H2(u, D) {
6135
6135
  D === "<" && Ru(u);
6136
6136
  }
6137
6137
  function Y2(u, D, f) {
6138
- D === "!" ? u.state = 13 : D === "/" ? (u.state = 2, u.currentTag = new Su(ou(ou({}, u.currentTag), { isClosing: !0 }))) : D === "<" ? Ru(u) : nD(f) ? (u.state = 3, u.currentTag = new Su(ou(ou({}, u.currentTag), { isOpening: !0 }))) : (u.state = 0, u.currentTag = mf);
6138
+ D === "!" ? u.state = 13 : D === "/" ? (u.state = 2, u.currentTag = new Su(ou(ou({}, u.currentTag), { isClosing: !0 }))) : D === "<" ? Ru(u) : rD(f) ? (u.state = 3, u.currentTag = new Su(ou(ou({}, u.currentTag), { isOpening: !0 }))) : (u.state = 0, u.currentTag = mf);
6139
6139
  }
6140
6140
  function K2(u, D, f) {
6141
- Xu(f) ? (u.currentTag = new Su(ou(ou({}, u.currentTag), { name: VD(u) })), u.state = 4) : D === "<" ? Ru(u) : D === "/" ? (u.currentTag = new Su(ou(ou({}, u.currentTag), { name: VD(u) })), u.state = 12) : D === ">" ? (u.currentTag = new Su(ou(ou({}, u.currentTag), { name: VD(u) })), Pu(u)) : !nD(f) && !hu(f) && D !== ":" && xu(u);
6141
+ Zu(f) ? (u.currentTag = new Su(ou(ou({}, u.currentTag), { name: VD(u) })), u.state = 4) : D === "<" ? Ru(u) : D === "/" ? (u.currentTag = new Su(ou(ou({}, u.currentTag), { name: VD(u) })), u.state = 12) : D === ">" ? (u.currentTag = new Su(ou(ou({}, u.currentTag), { name: VD(u) })), Pu(u)) : !rD(f) && !hu(f) && D !== ":" && xu(u);
6142
6142
  }
6143
6143
  function J2(u, D, f) {
6144
- D === ">" ? xu(u) : nD(f) ? u.state = 3 : xu(u);
6144
+ D === ">" ? xu(u) : rD(f) ? u.state = 3 : xu(u);
6145
6145
  }
6146
6146
  function G2(u, D, f) {
6147
- Xu(f) || (D === "/" ? u.state = 12 : D === ">" ? Pu(u) : D === "<" ? Ru(u) : D === "=" || hf(f) || o3(f) ? xu(u) : u.state = 5);
6147
+ Zu(f) || (D === "/" ? u.state = 12 : D === ">" ? Pu(u) : D === "<" ? Ru(u) : D === "=" || hf(f) || o3(f) ? xu(u) : u.state = 5);
6148
6148
  }
6149
6149
  function X2(u, D, f) {
6150
- Xu(f) ? u.state = 6 : D === "/" ? u.state = 12 : D === "=" ? u.state = 7 : D === ">" ? Pu(u) : D === "<" ? Ru(u) : hf(f) && xu(u);
6150
+ Zu(f) ? u.state = 6 : D === "/" ? u.state = 12 : D === "=" ? u.state = 7 : D === ">" ? Pu(u) : D === "<" ? Ru(u) : hf(f) && xu(u);
6151
6151
  }
6152
6152
  function Z2(u, D, f) {
6153
- Xu(f) || (D === "/" ? u.state = 12 : D === "=" ? u.state = 7 : D === ">" ? Pu(u) : D === "<" ? Ru(u) : hf(f) ? xu(u) : u.state = 5);
6153
+ Zu(f) || (D === "/" ? u.state = 12 : D === "=" ? u.state = 7 : D === ">" ? Pu(u) : D === "<" ? Ru(u) : hf(f) ? xu(u) : u.state = 5);
6154
6154
  }
6155
6155
  function Q2(u, D, f) {
6156
- Xu(f) || (D === '"' ? u.state = 8 : D === "'" ? u.state = 9 : /[>=`]/.test(D) ? xu(u) : D === "<" ? Ru(u) : u.state = 10);
6156
+ Zu(f) || (D === '"' ? u.state = 8 : D === "'" ? u.state = 9 : /[>=`]/.test(D) ? xu(u) : D === "<" ? Ru(u) : u.state = 10);
6157
6157
  }
6158
6158
  function ut(u, D) {
6159
6159
  D === '"' && (u.state = 11);
@@ -6162,10 +6162,10 @@ function Dt(u, D) {
6162
6162
  D === "'" && (u.state = 11);
6163
6163
  }
6164
6164
  function ft(u, D, f) {
6165
- Xu(f) ? u.state = 4 : D === ">" ? Pu(u) : D === "<" && Ru(u);
6165
+ Zu(f) ? u.state = 4 : D === ">" ? Pu(u) : D === "<" && Ru(u);
6166
6166
  }
6167
6167
  function et(u, D, f) {
6168
- Xu(f) ? u.state = 4 : D === "/" ? u.state = 12 : D === ">" ? Pu(u) : D === "<" ? Ru(u) : (u.state = 4, ct(u));
6168
+ Zu(f) ? u.state = 4 : D === "/" ? u.state = 12 : D === ">" ? Pu(u) : D === "<" ? Ru(u) : (u.state = 4, ct(u));
6169
6169
  }
6170
6170
  function tt(u, D) {
6171
6171
  D === ">" ? (u.currentTag = new Su(ou(ou({}, u.currentTag), { isClosing: !0 })), Pu(u)) : xu(u);
@@ -6245,7 +6245,7 @@ var lt = (
6245
6245
  return e.parse(D);
6246
6246
  }, u.prototype.parse = function(D) {
6247
6247
  var f = this, e = ["a", "style", "script"], t = 0, n = [];
6248
- return H2(D, {
6248
+ return W2(D, {
6249
6249
  onOpenTag: function(r) {
6250
6250
  e.indexOf(r) >= 0 && t++;
6251
6251
  },
@@ -6254,8 +6254,8 @@ var lt = (
6254
6254
  var F = /(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi, o = r.split(F), d = s;
6255
6255
  o.forEach(function(c, l) {
6256
6256
  if (l % 2 === 0) {
6257
- var A = f.parseText(c, d);
6258
- n.push.apply(n, f3([], D3(A), !1));
6257
+ var j = f.parseText(c, d);
6258
+ n.push.apply(n, f3([], D3(j), !1));
6259
6259
  }
6260
6260
  d += c.length;
6261
6261
  });
@@ -6284,19 +6284,19 @@ var lt = (
6284
6284
  }
6285
6285
  return D;
6286
6286
  }, u.prototype.removeUnwantedMatches = function(D) {
6287
- return this.hashtag || Ju(D, function(f) {
6287
+ return this.hashtag || Gu(D, function(f) {
6288
6288
  return f.getType() === "hashtag";
6289
- }), this.email || Ju(D, function(f) {
6289
+ }), this.email || Gu(D, function(f) {
6290
6290
  return f.getType() === "email";
6291
- }), this.phone || Ju(D, function(f) {
6291
+ }), this.phone || Gu(D, function(f) {
6292
6292
  return f.getType() === "phone";
6293
- }), this.mention || Ju(D, function(f) {
6293
+ }), this.mention || Gu(D, function(f) {
6294
6294
  return f.getType() === "mention";
6295
- }), this.urls.schemeMatches || Ju(D, function(f) {
6295
+ }), this.urls.schemeMatches || Gu(D, function(f) {
6296
6296
  return f.getType() === "url" && f.getUrlMatchType() === "scheme";
6297
- }), this.urls.tldMatches || Ju(D, function(f) {
6297
+ }), this.urls.tldMatches || Gu(D, function(f) {
6298
6298
  return f.getType() === "url" && f.getUrlMatchType() === "tld";
6299
- }), this.urls.ipV4Matches || Ju(D, function(f) {
6299
+ }), this.urls.ipV4Matches || Gu(D, function(f) {
6300
6300
  return f.getType() === "url" && f.getUrlMatchType() === "ipV4";
6301
6301
  }), D;
6302
6302
  }, u.prototype.parseText = function(D, f) {
@@ -6359,23 +6359,105 @@ function bt(u) {
6359
6359
  function pt(u, D) {
6360
6360
  return u.getOffset() - D.getOffset();
6361
6361
  }
6362
- const sD = [
6362
+ const Wu = [
6363
6363
  { name: "Australia", countryCode: "+61", code: "AU", flag: "🇦🇺" },
6364
6364
  { name: "United States", countryCode: "+1", code: "US", flag: "🇺🇸" },
6365
6365
  { name: "New Zealand", countryCode: "+64", code: "NZ", flag: "🇳🇿" },
6366
6366
  { name: "United Kingdom", countryCode: "+44", code: "UK", flag: "🇬🇧" },
6367
6367
  { name: "Indonesia", countryCode: "+62", code: "ID", flag: "🇮🇩" }
6368
- ], U1 = ({
6368
+ ], Bt = {
6369
+ AU: /^(?:\+?(61))? ?(?:\((?=.*\))\))?(0?[4])\)? ?(\d\d(?:[- ](?=\d{3})|(?!\d\d[- ]?\d[- ]))\d\d[- ]?\d[- ]?\d{3})$/gm,
6370
+ US: /^(\+?1\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm,
6371
+ UK: /^(\+?44\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm,
6372
+ NZ: /^(\+?64\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm,
6373
+ ID: /^(\+?62\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm
6374
+ }, gt = {
6375
+ AU: "+61",
6376
+ US: "+1",
6377
+ NZ: "+64",
6378
+ UK: "+44",
6379
+ ID: "+62"
6380
+ }, mt = (u) => u.toUpperCase(), _t = (u) => u.replace(/\s+/g, "").replace(/[^0-9+]/g, "");
6381
+ function yt(u, D) {
6382
+ const f = gt[u];
6383
+ return D.startsWith(f) ? { cleanNumber: D.slice(f.length), countryCode: f } : { cleanNumber: D, countryCode: f };
6384
+ }
6385
+ function vt(u, D) {
6386
+ const f = Bt[u];
6387
+ return new RegExp(f.source, "mi").test(D);
6388
+ }
6389
+ function wt({
6390
+ number: u,
6391
+ region: D,
6392
+ validateDuplicate: f,
6393
+ contacts: e
6394
+ }) {
6395
+ const t = {
6396
+ originalNumber: u,
6397
+ fullNumber: "",
6398
+ cleanNumber: "",
6399
+ errorMessage: "",
6400
+ isValid: !1
6401
+ }, n = mt(D);
6402
+ if (!u)
6403
+ return t.errorMessage = "Number is empty", t;
6404
+ const r = u.trim();
6405
+ let s = _t(u);
6406
+ s = s.startsWith("0") ? s.slice(1) : s;
6407
+ const { cleanNumber: F, countryCode: o } = yt(
6408
+ n,
6409
+ s
6410
+ );
6411
+ s = F, t.fullNumber = `${o}${s}`, t.cleanNumber = s;
6412
+ try {
6413
+ if (!vt(n, r)) throw new Error("Please enter a valid phone number");
6414
+ t.isValid = !0;
6415
+ } catch (d) {
6416
+ t.errorMessage = d.message, t.isValid = !1;
6417
+ }
6418
+ return t;
6419
+ }
6420
+ const U1 = ({
6369
6421
  initialData: u,
6370
6422
  loadFromDataUserSubs: D = !1
6371
6423
  } = {}) => {
6372
6424
  const [f, e] = U(
6373
6425
  u || {}
6374
- ), [t, n] = U({}), [r, s] = U({}), F = (C) => {
6375
- const m = C.replace(/\s+/g, "");
6376
- return /^(\+61|0)[2-478]\d{8}$/.test(m);
6426
+ ), [t, n] = U({}), [r, s] = U({}), F = (C, v) => {
6427
+ let S = "";
6428
+ if (console.log("field", C), C.isRequired)
6429
+ if (typeof v == "string") {
6430
+ const g = v.trim();
6431
+ if (!g) return `${C.label} is required`;
6432
+ if (C.key.toLowerCase().includes("phone") || C.label.toLowerCase().includes("phone")) {
6433
+ const L = g.replace(/\s+/g, ""), y = Wu.find((T) => L.startsWith(T.countryCode)), b = L.replace(/^\+?\d+/, "");
6434
+ if (y && b.length === 0)
6435
+ return "";
6436
+ }
6437
+ } else typeof v == "boolean" ? v !== !0 && (S = `${C.label} is required`) : v || (S = `${C.label} is required`);
6438
+ if (S && t[C.key])
6439
+ return console.log(`[VALIDATE] ${C.key}=${v}, ERROR=${S}`), S;
6440
+ if (C.key.toLowerCase().includes("email") || C.label.toLowerCase().includes("email")) {
6441
+ const g = String(v || "").trim();
6442
+ g && (/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(g) || (S = "Please enter a valid email address"));
6443
+ }
6444
+ if (C.key.toLowerCase().includes("phone") || C.label.toLowerCase().includes("phone")) {
6445
+ const g = String(v || "").trim(), L = g.replace(/\s+/g, ""), y = Wu.find((N) => L.startsWith(N.countryCode)), b = (y == null ? void 0 : y.code) || "AU", T = L.replace(/^\+?\d+/, "");
6446
+ if (!C.isRequired && y && T.length === 0)
6447
+ return "";
6448
+ if (g) {
6449
+ const N = wt({
6450
+ number: g,
6451
+ region: b,
6452
+ validateDuplicate: !1,
6453
+ contacts: /* @__PURE__ */ new Map()
6454
+ });
6455
+ N.isValid || (S = N.errorMessage || "Please enter a valid phone number");
6456
+ }
6457
+ }
6458
+ return console.log(`[VALIDATE] ${C.key}=${v}, ERROR=${S}`), S;
6377
6459
  };
6378
- G(() => {
6460
+ X(() => {
6379
6461
  if (D)
6380
6462
  try {
6381
6463
  const C = eu.getItem("dataUserSubs");
@@ -6384,68 +6466,45 @@ const sD = [
6384
6466
  console.error("Error loading dataUserSubs from localStorage:", C);
6385
6467
  }
6386
6468
  }, [D]);
6387
- const o = Vu(
6388
- (C, m) => {
6469
+ const o = qu(
6470
+ (C, v) => {
6389
6471
  e((S) => ({
6390
6472
  ...S,
6391
- [C]: m
6473
+ [C]: v
6392
6474
  })), s((S) => ({ ...S, [C]: "" }));
6393
6475
  },
6394
6476
  []
6395
- ), d = Vu(
6477
+ ), d = qu(
6396
6478
  (C) => {
6397
- var m;
6398
- if (n((S) => ({ ...S, [C.key]: !0 })), C.isRequired) {
6399
- const S = f[C.key], L = typeof S == "string" ? S.trim() : "";
6400
- s((x) => ({
6401
- ...x,
6402
- [C.key]: L ? "" : `${C.label} is required`
6403
- }));
6404
- }
6405
- if (C.key.toLowerCase().includes("phone")) {
6406
- const S = String(f[C.key] || ""), L = (m = sD.find(
6407
- (x) => S.startsWith(x.countryCode)
6408
- )) == null ? void 0 : m.countryCode;
6409
- if (S) {
6410
- if (L && L !== "+61" && !S.startsWith("0")) {
6411
- s((x) => ({
6412
- ...x,
6413
- [C.key]: "Please enter an number"
6414
- }));
6415
- return;
6416
- }
6417
- (L === "+61" || S.startsWith("0")) && !F(S) ? s((x) => ({
6418
- ...x,
6419
- [C.key]: "Invalid Australian phone number"
6420
- })) : s((x) => ({ ...x, [C.key]: "" }));
6421
- }
6422
- }
6479
+ n((g) => ({ ...g, [C.key]: !0 }));
6480
+ const v = f[C.key], S = F(C, v);
6481
+ s((g) => ({ ...g, [C.key]: S }));
6423
6482
  },
6424
6483
  [f]
6425
6484
  ), c = (C) => {
6426
- const m = {
6485
+ const v = {
6427
6486
  email: "email",
6428
6487
  phone: "tel",
6429
6488
  date: "date",
6430
6489
  password: "password"
6431
- }, S = Object.keys(m).find(
6432
- (L) => C.toLowerCase().includes(L)
6490
+ }, S = Object.keys(v).find(
6491
+ (g) => C.toLowerCase().includes(g)
6433
6492
  );
6434
- return S ? m[S] : "text";
6435
- }, l = Vu(
6493
+ return S ? v[S] : "text";
6494
+ }, l = qu(
6436
6495
  (C) => {
6437
- var x;
6496
+ var L;
6438
6497
  if (!C.isDisplay) return null;
6439
- const m = f[C.key], S = c(C.key), L = !!r[C.key] && t[C.key];
6498
+ const v = f[C.key], S = c(C.key), g = !!r[C.key] && t[C.key];
6440
6499
  if (C.key.includes("language") || C.key.includes("country"))
6441
6500
  return /* @__PURE__ */ a.jsx(
6442
6501
  "select",
6443
6502
  {
6444
- className: `user-subscription-form-input${L ? " error" : ""}`,
6445
- value: m || "",
6446
- onChange: (I) => o(C.key, I.target.value),
6503
+ className: `user-subscription-form-input${g ? " error" : ""}`,
6504
+ value: v || "",
6505
+ onChange: (y) => o(C.key, y.target.value),
6447
6506
  onBlur: () => d(C),
6448
- required: C.isRequired,
6507
+ "aria-invalid": g,
6449
6508
  style: C.color ? { borderColor: C.color } : void 0,
6450
6509
  children: /* @__PURE__ */ a.jsxs("option", { value: "", children: [
6451
6510
  "Select ",
@@ -6461,23 +6520,24 @@ const sD = [
6461
6520
  {
6462
6521
  type: "checkbox",
6463
6522
  id: C.key,
6464
- checked: m || !1,
6465
- onChange: (I) => o(C.key, I.target.checked)
6523
+ checked: v || !1,
6524
+ onChange: (y) => o(C.key, y.target.checked),
6525
+ "aria-invalid": g
6466
6526
  }
6467
6527
  ),
6468
6528
  /* @__PURE__ */ a.jsx("label", { htmlFor: C.key, children: C.label })
6469
6529
  ] }, C.key);
6470
6530
  if (C.key.toLowerCase().includes("phone")) {
6471
- const I = m || "", _ = ((x = sD.find((v) => I.startsWith(v.countryCode))) == null ? void 0 : x.countryCode) || "+61", B = I.replace(/^\+?\d+\s?/, "").trim(), T = (v) => {
6472
- const q = v.replace(/[^0-9\s]/g, "").trim();
6531
+ const y = v || "", b = ((L = Wu.find((A) => y.startsWith(A.countryCode))) == null ? void 0 : L.countryCode) || "+61", T = y.replace(/^\+?\d+\s?/, "").trim(), N = (A) => {
6532
+ const P = A.replace(/[^0-9\s]/g, "").trim();
6473
6533
  o(
6474
6534
  C.key,
6475
- q ? `${_} ${q}` : `${_} `
6535
+ P ? `${b} ${P}` : `${b} `
6476
6536
  );
6477
- }, y = (v) => {
6537
+ }, z = (A) => {
6478
6538
  o(
6479
6539
  C.key,
6480
- B ? `${v} ${B}` : `${v} `
6540
+ T ? `${A} ${T}` : `${A} `
6481
6541
  );
6482
6542
  };
6483
6543
  return /* @__PURE__ */ a.jsxs("div", { className: "user-subscription-form-field", children: [
@@ -6494,22 +6554,23 @@ const sD = [
6494
6554
  /* @__PURE__ */ a.jsxs(
6495
6555
  "select",
6496
6556
  {
6497
- className: `user-subscription-form-input${L ? " error" : ""}`,
6557
+ className: `user-subscription-form-input${g ? " error" : ""}`,
6498
6558
  style: {
6499
6559
  maxWidth: "100px"
6500
6560
  },
6501
- value: _,
6502
- onChange: (v) => y(v.target.value),
6561
+ value: b,
6562
+ onChange: (A) => z(A.target.value),
6503
6563
  onBlur: () => d(C),
6564
+ "aria-invalid": !!g,
6504
6565
  children: [
6505
6566
  /* @__PURE__ */ a.jsx("option", { value: "", children: "+Code" }),
6506
- sD.map((v) => /* @__PURE__ */ a.jsx(
6567
+ Wu.map((A) => /* @__PURE__ */ a.jsx(
6507
6568
  "option",
6508
6569
  {
6509
- value: v.countryCode,
6510
- children: `${v.flag} ${v.countryCode}`
6570
+ value: A.countryCode,
6571
+ children: `${A.flag} ${A.countryCode}`
6511
6572
  },
6512
- v.code
6573
+ A.code
6513
6574
  ))
6514
6575
  ]
6515
6576
  }
@@ -6517,13 +6578,13 @@ const sD = [
6517
6578
  /* @__PURE__ */ a.jsx(
6518
6579
  "input",
6519
6580
  {
6520
- className: `user-subscription-form-input${L ? " error" : ""}`,
6581
+ className: `user-subscription-form-input${g ? " error" : ""}`,
6521
6582
  type: "tel",
6522
- value: B,
6523
- onChange: (v) => T(v.target.value),
6583
+ value: T,
6584
+ onChange: (A) => N(A.target.value),
6524
6585
  onBlur: () => d(C),
6525
6586
  placeholder: C.label,
6526
- required: C.isRequired,
6587
+ "aria-invalid": !!g,
6527
6588
  style: {
6528
6589
  ...C.color ? { borderColor: C.color } : {},
6529
6590
  flex: 1
@@ -6533,48 +6594,48 @@ const sD = [
6533
6594
  ]
6534
6595
  }
6535
6596
  ),
6536
- L && /* @__PURE__ */ a.jsx("div", { className: "user-subscription-error", children: r[C.key] })
6597
+ g && /* @__PURE__ */ a.jsx("div", { className: "user-subscription-error", children: r[C.key] })
6537
6598
  ] }, C.key);
6538
6599
  }
6539
6600
  return /* @__PURE__ */ a.jsxs("div", { className: "user-subscription-form-field", children: [
6540
6601
  /* @__PURE__ */ a.jsx(
6541
6602
  "input",
6542
6603
  {
6543
- className: `user-subscription-form-input${L ? " error" : ""}`,
6604
+ className: `user-subscription-form-input${g ? " error" : ""}`,
6544
6605
  type: S,
6545
- value: m || "",
6546
- onChange: (I) => o(C.key, I.target.value),
6606
+ value: v || "",
6607
+ onChange: (y) => o(C.key, y.target.value),
6547
6608
  onBlur: () => d(C),
6548
6609
  placeholder: C.label,
6549
- required: C.isRequired,
6610
+ "aria-invalid": g,
6550
6611
  style: C.color ? { borderColor: C.color } : void 0
6551
6612
  }
6552
6613
  ),
6553
- L && /* @__PURE__ */ a.jsx("div", { className: "user-subscription-error", children: r[C.key] })
6614
+ g && /* @__PURE__ */ a.jsx("div", { className: "user-subscription-error", children: r[C.key] })
6554
6615
  ] }, C.key);
6555
6616
  },
6556
6617
  [r, t, f, o, d]
6557
- ), A = Vu(
6618
+ ), j = qu(
6558
6619
  (C) => {
6559
- var I;
6620
+ var y;
6560
6621
  if (!C.isDisplay) return null;
6561
- const m = f[C.key], S = c(C.key);
6622
+ const v = f[C.key], S = c(C.key);
6562
6623
  if (C.key.toLowerCase().includes("phone")) {
6563
- const _ = m || "", B = ((I = sD.find(($) => _.startsWith($.countryCode))) == null ? void 0 : I.countryCode) || "+61", T = _.replace(/^\+?\d+\s?/, "").trim(), y = ($) => {
6564
- const Du = $.replace(/[^0-9\s]/g, "").trim();
6565
- e((N) => ({
6566
- ...N,
6567
- [C.key]: Du ? `${B} ${Du}` : `${B} `
6624
+ const b = v || "", T = ((y = Wu.find((W) => b.startsWith(W.countryCode))) == null ? void 0 : y.countryCode) || "+61", N = b.replace(/^\+?\d+\s?/, "").trim(), z = (W) => {
6625
+ const k = W.replace(/[^0-9\s]/g, "").trim();
6626
+ e((E) => ({
6627
+ ...E,
6628
+ [C.key]: k ? `${T} ${k}` : `${T} `
6568
6629
  }));
6569
- }, v = ($) => {
6570
- e((Du) => ({
6571
- ...Du,
6572
- [C.key]: T ? `${$} ${T}` : `${$} `
6630
+ }, A = (W) => {
6631
+ e((k) => ({
6632
+ ...k,
6633
+ [C.key]: N ? `${W} ${N}` : `${W} `
6573
6634
  }));
6574
- }, P = _ && !(($) => {
6575
- const Du = $.replace(/\s/g, "");
6576
- return /^(\+61|0)[2-478]\d{8}$/.test(Du);
6577
- })(_), g = t[C.key] && P;
6635
+ }, _ = !!(b && !((W) => {
6636
+ const k = W.replace(/\s/g, "");
6637
+ return /^(\+61|0)[2-478]\d{8}$/.test(k);
6638
+ })(b)), J = !!(t[C.key] && _);
6578
6639
  return /* @__PURE__ */ a.jsxs("div", { className: "sc-message--contact-form-field", children: [
6579
6640
  /* @__PURE__ */ a.jsx(
6580
6641
  "label",
@@ -6594,17 +6655,18 @@ const sD = [
6594
6655
  {
6595
6656
  className: "sc-message--contact-form-input",
6596
6657
  style: { maxWidth: "100px" },
6597
- value: B,
6598
- onChange: ($) => v($.target.value),
6658
+ value: T,
6659
+ onChange: (W) => A(W.target.value),
6660
+ "aria-invalid": J,
6599
6661
  children: [
6600
6662
  /* @__PURE__ */ a.jsx("option", { value: "", children: "+Code" }),
6601
- sD.map(($) => /* @__PURE__ */ a.jsx(
6663
+ Wu.map((W) => /* @__PURE__ */ a.jsx(
6602
6664
  "option",
6603
6665
  {
6604
- value: $.countryCode,
6605
- children: `${$.flag} ${$.countryCode}`
6666
+ value: W.countryCode,
6667
+ children: `${W.flag} ${W.countryCode}`
6606
6668
  },
6607
- $.code
6669
+ W.code
6608
6670
  ))
6609
6671
  ]
6610
6672
  }
@@ -6614,23 +6676,23 @@ const sD = [
6614
6676
  {
6615
6677
  id: `contact-${C.key}`,
6616
6678
  type: "tel",
6617
- value: T,
6618
- onChange: ($) => y($.target.value),
6619
- onBlur: () => n(($) => ({ ...$, [C.key]: !0 })),
6679
+ value: N,
6680
+ onChange: (W) => z(W.target.value),
6681
+ onBlur: () => n((W) => ({ ...W, [C.key]: !0 })),
6620
6682
  placeholder: "",
6621
- required: C.isRequired,
6622
- className: `sc-message--contact-form-input ${g ? "error" : ""}`,
6683
+ className: `sc-message--contact-form-input ${J ? "error" : ""}`,
6684
+ "aria-invalid": J,
6623
6685
  style: {
6624
6686
  ...C.color ? { borderColor: C.color } : {},
6625
6687
  flex: 1,
6626
- ...g ? { borderColor: "#ff4444" } : {}
6688
+ ...J ? { borderColor: "#ff4444" } : {}
6627
6689
  }
6628
6690
  }
6629
6691
  )
6630
6692
  ]
6631
6693
  }
6632
6694
  ),
6633
- g && /* @__PURE__ */ a.jsx(
6695
+ J && /* @__PURE__ */ a.jsx(
6634
6696
  "div",
6635
6697
  {
6636
6698
  style: {
@@ -6643,7 +6705,7 @@ const sD = [
6643
6705
  )
6644
6706
  ] }, C.key);
6645
6707
  }
6646
- const L = C.isRequired && (!m || typeof m == "string" && m.trim() === ""), x = t[C.key] && L;
6708
+ const g = C.isRequired && (!v || typeof v == "string" && v.trim() === ""), L = t[C.key] && g;
6647
6709
  return /* @__PURE__ */ a.jsxs("div", { className: "sc-message--contact-form-field", children: [
6648
6710
  /* @__PURE__ */ a.jsx(
6649
6711
  "label",
@@ -6658,19 +6720,19 @@ const sD = [
6658
6720
  {
6659
6721
  id: `contact-${C.key}`,
6660
6722
  type: S,
6661
- value: m || "",
6662
- onChange: (_) => e((B) => ({ ...B, [C.key]: _.target.value })),
6663
- onBlur: () => n((_) => ({ ..._, [C.key]: !0 })),
6723
+ value: v || "",
6724
+ onChange: (b) => e((T) => ({ ...T, [C.key]: b.target.value })),
6725
+ onBlur: () => n((b) => ({ ...b, [C.key]: !0 })),
6664
6726
  placeholder: "",
6665
- required: C.isRequired,
6666
- className: `sc-message--contact-form-input ${x ? "error" : ""}`,
6727
+ className: `sc-message--contact-form-input ${L ? "error" : ""}`,
6728
+ "aria-invalid": L,
6667
6729
  style: {
6668
6730
  ...C.color ? { borderColor: C.color } : {},
6669
- ...x ? { borderColor: "#ff4444" } : {}
6731
+ ...L ? { borderColor: "#ff4444" } : {}
6670
6732
  }
6671
6733
  }
6672
6734
  ),
6673
- x && /* @__PURE__ */ a.jsxs(
6735
+ L && /* @__PURE__ */ a.jsxs(
6674
6736
  "div",
6675
6737
  {
6676
6738
  style: {
@@ -6687,7 +6749,13 @@ const sD = [
6687
6749
  ] }, C.key);
6688
6750
  },
6689
6751
  [f, c, t]
6690
- );
6752
+ ), m = qu((C) => {
6753
+ const v = {};
6754
+ return C.filter((S) => S.isDisplay).forEach((S) => {
6755
+ const g = f[S.key];
6756
+ v[S.key] = F(S, g);
6757
+ }), s((S) => ({ ...S, ...v })), C.filter((S) => S.isDisplay && S.isRequired).every((S) => v[S.key] === "");
6758
+ }, [f, F]);
6691
6759
  return {
6692
6760
  formData: f,
6693
6761
  setFormData: e,
@@ -6696,124 +6764,131 @@ const sD = [
6696
6764
  handleFieldChange: o,
6697
6765
  handleFieldBlur: d,
6698
6766
  renderFormField: l,
6699
- renderContactFormField: A,
6700
- getInputType: c
6767
+ renderContactFormField: j,
6768
+ getInputType: c,
6769
+ errors: r,
6770
+ validateAll: m
6701
6771
  };
6702
- }, Bt = ({
6772
+ };
6773
+ function At(u) {
6774
+ const D = {};
6775
+ return Object.entries(u).forEach(([f, e]) => {
6776
+ if (e) {
6777
+ if (f.toLowerCase().includes("phone")) {
6778
+ const t = e.replace(/\s+/g, ""), n = Wu.find((r) => t.startsWith(r.countryCode));
6779
+ if (n && t.slice(n.countryCode.length) === "")
6780
+ return;
6781
+ }
6782
+ D[f] = e;
6783
+ }
6784
+ }), D;
6785
+ }
6786
+ const xt = ({
6703
6787
  onSubmit: u,
6704
6788
  onFormStateChange: D
6705
6789
  }) => {
6706
- const { colors: f } = du(), e = zu(), t = Bu(), { socket: n } = Wu(), { setScreen: r } = Nu();
6790
+ const { colors: f } = du(), e = Uu(), t = Bu(), { socket: n } = Yu(), { setScreen: r } = Nu();
6707
6791
  Ou();
6708
- const { setIsOfflineMode: s, send: F, participants: o, setMessages: d, setParticipants: c, setConnectionState: l } = cu(), { formData: A, renderContactFormField: C } = U1({
6792
+ const { setIsOfflineMode: s, send: F, participants: o, setMessages: d, setParticipants: c, setConnectionState: l } = cu(), { formData: j, renderContactFormField: m, errors: C, validateAll: v } = U1({
6709
6793
  initialData: {},
6710
6794
  loadFromDataUserSubs: !0
6711
- }), [m, S] = U(!1), [L, x] = U(!1);
6712
- G(() => {
6795
+ }), [S, g] = U(!1), [L, y] = U(!1);
6796
+ X(() => {
6713
6797
  D && !L && D(!0), D && L && D(!1);
6714
6798
  }, [L]);
6715
- const I = async (T) => {
6716
- var y;
6717
- T.preventDefault(), S(!0);
6718
- try {
6719
- const v = {};
6720
- if (t.formSettings.forEach(($) => {
6721
- var Du;
6722
- $.isDisplay && A[$.key] !== void 0 && (v[$.key] = ((Du = A[$.key]) == null ? void 0 : Du.toString().trim()) || "");
6723
- }), !eu.getItem("profileLiveChat"))
6724
- try {
6725
- const $ = new URLSearchParams();
6726
- Object.entries(v).forEach(([b, O]) => {
6727
- typeof O == "string" && O.trim() && $.append(b, O);
6728
- }), $.append("owner_id", e.ownerId), $.append("contactLateTime", (/* @__PURE__ */ new Date()).toISOString());
6729
- const { body: Du } = await n.get(`/webhook/${e.channel}/?${$.toString()}`), { messages: N, profile: E } = Du;
6730
- eu.setItem("profileLiveChat", E), eu.setItem("isOffline", !1), eu.setItem(
6731
- "submitedFormLateTime",
6732
- (E == null ? void 0 : E.submitedFormLateTime) || null
6733
- ), N.forEach((b) => {
6734
- const O = b.author === E.foreignId || b.author === E.id ? uu.sent : uu.received;
6735
- b.direction = O, b.direction === uu.sent && (b.read = !0, b.delivery = !1);
6736
- }), d(N), c([
6737
- o[0],
6738
- {
6739
- id: E.foreignId,
6740
- foreign_id: E.foreignId,
6741
- name: `${E.firstName} ${E.lastName}`
6742
- }
6743
- ]), l(3), r("chat"), x(!0);
6744
- const k = {
6745
- text: Object.entries(v).map(
6746
- ([b, O]) => `${b.charAt(0).toUpperCase() + b.slice(1)}: ${O}`
6747
- ).join(`
6799
+ const b = async (N) => {
6800
+ var A;
6801
+ if (N.preventDefault(), !!v(t.formSettings)) {
6802
+ g(!0);
6803
+ try {
6804
+ const P = {};
6805
+ t.formSettings.forEach((E) => {
6806
+ var h;
6807
+ E.isDisplay && j[E.key] !== void 0 && (P[E.key] = ((h = j[E.key]) == null ? void 0 : h.toString().trim()) || "");
6808
+ });
6809
+ const _ = At(P);
6810
+ if (!eu.getItem("profileLiveChat"))
6811
+ try {
6812
+ const E = new URLSearchParams();
6813
+ Object.entries(_).forEach(([M, V]) => {
6814
+ typeof V == "string" && V && E.append(M, V);
6815
+ }), E.append("owner_id", e.ownerId), E.append("contactLateTime", (/* @__PURE__ */ new Date()).toISOString());
6816
+ const { body: h } = await n.get(`/webhook/${e.channel}/?${E.toString()}`), { messages: x, profile: B } = h;
6817
+ eu.setItem("profileLiveChat", B), eu.setItem("isOffline", !1), eu.setItem(
6818
+ "submitedFormLateTime",
6819
+ (B == null ? void 0 : B.submitedFormLateTime) || null
6820
+ ), x.forEach((M) => {
6821
+ const V = M.author === B.foreignId || M.author === B.id ? Du.sent : Du.received;
6822
+ M.direction = V, M.direction === Du.sent && (M.read = !0, M.delivery = !1);
6823
+ }), d(x), c([
6824
+ o[0],
6825
+ {
6826
+ id: B.foreignId,
6827
+ foreign_id: B.foreignId,
6828
+ name: `${B.firstName} ${B.lastName}`
6829
+ }
6830
+ ]), l(3), r("chat"), y(!0);
6831
+ const R = {
6832
+ text: Object.entries(_).map(
6833
+ ([M, V]) => `${M.charAt(0).toUpperCase() + M.slice(1)}: ${V}`
6834
+ ).join(`
6748
6835
  `),
6749
- contactInfo: {
6750
- ...v,
6751
- owner_id: e.ownerId
6752
- },
6753
- contactLateTime: /* @__PURE__ */ new Date()
6754
- };
6755
- F({
6756
- event: T,
6757
- source: "contact-form",
6758
- data: {
6759
- type: Au.text,
6760
- data: k,
6761
- author: E.foreignId
6762
- }
6763
- }), s(!0), u && u(v.name, v.phone);
6764
- return;
6765
- } catch ($) {
6766
- console.error("Error in subscription flow:", $);
6767
- }
6768
- const g = {
6769
- text: Object.entries(v).map(
6770
- ([$, Du]) => `${$.charAt(0).toUpperCase() + $.slice(1)}: ${Du}`
6771
- ).join(`
6836
+ contactInfo: {
6837
+ ..._,
6838
+ owner_id: e.ownerId
6839
+ },
6840
+ contactLateTime: /* @__PURE__ */ new Date()
6841
+ };
6842
+ F({
6843
+ event: N,
6844
+ source: "contact-form",
6845
+ data: {
6846
+ type: Au.text,
6847
+ data: R,
6848
+ author: B.foreignId
6849
+ }
6850
+ }), s(!0), u && u(P.name, P.phone);
6851
+ return;
6852
+ } catch (E) {
6853
+ console.error("Error in subscription flow:", E);
6854
+ }
6855
+ const k = {
6856
+ text: Object.entries(_).map(
6857
+ ([E, h]) => `${E.charAt(0).toUpperCase() + E.slice(1)}: ${h}`
6858
+ ).join(`
6772
6859
  `),
6773
- contactInfo: {
6774
- ...v,
6775
- owner_id: e.ownerId
6776
- },
6777
- contactLateTime: /* @__PURE__ */ new Date()
6778
- };
6779
- F({
6780
- event: T,
6781
- source: "contact-form",
6782
- data: {
6783
- type: Au.text,
6784
- data: g,
6785
- author: (y = o[1]) == null ? void 0 : y.id
6786
- }
6787
- }), x(!0), s(!0), u && u(v.name, v.phone);
6788
- } catch (v) {
6789
- console.error("Error sending contact form to webhook:", v);
6790
- } finally {
6791
- S(!1);
6792
- }
6793
- }, _ = f[uu.received], B = () => {
6794
- const T = (y) => {
6795
- const v = y.replace(/\s/g, "");
6796
- return /^(\+61|0)[2-478]\d{8}$/.test(v);
6797
- };
6798
- return t.formSettings.filter((y) => y.isDisplay && y.isRequired).every((y) => {
6799
- const v = A[y.key];
6800
- if (typeof v == "string") {
6801
- const q = v.trim();
6802
- return q === "" ? !1 : y.key.toLowerCase().includes("phone") ? T(q) : !0;
6860
+ contactInfo: {
6861
+ ..._,
6862
+ owner_id: e.ownerId
6863
+ },
6864
+ contactLateTime: /* @__PURE__ */ new Date()
6865
+ };
6866
+ F({
6867
+ event: N,
6868
+ source: "contact-form",
6869
+ data: {
6870
+ type: Au.text,
6871
+ data: k,
6872
+ author: (A = o[1]) == null ? void 0 : A.id
6873
+ }
6874
+ }), y(!0), s(!0), u && u(P.name, P.phone);
6875
+ } catch (P) {
6876
+ console.error("Error sending contact form to webhook:", P);
6877
+ } finally {
6878
+ g(!1);
6803
6879
  }
6804
- return typeof v == "boolean" ? v === !0 : !1;
6805
- });
6806
- };
6880
+ }
6881
+ }, T = f[Du.received];
6807
6882
  return L ? null : /* @__PURE__ */ a.jsx(
6808
6883
  "div",
6809
6884
  {
6810
6885
  className: "sc-message--contact-form",
6811
6886
  style: {
6812
- color: _.text,
6813
- backgroundColor: _.bg
6887
+ color: T.text,
6888
+ backgroundColor: T.bg
6814
6889
  },
6815
- children: /* @__PURE__ */ a.jsx("div", { className: "sc-message--contact-form-content", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: I, className: "sc-message--contact-form-form", children: [
6816
- t.formSettings.sort((T, y) => T.order - y.order).map(C),
6890
+ children: /* @__PURE__ */ a.jsx("div", { className: "sc-message--contact-form-content", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: b, className: "sc-message--contact-form-form", noValidate: !0, children: [
6891
+ t.formSettings.sort((N, z) => N.order - z.order).map(m),
6817
6892
  /* @__PURE__ */ a.jsx("div", { className: "sc-message--contact-form-authorization", children: /* @__PURE__ */ a.jsx(
6818
6893
  "a",
6819
6894
  {
@@ -6834,23 +6909,23 @@ const sD = [
6834
6909
  color: f.header.text,
6835
6910
  width: "40%"
6836
6911
  },
6837
- disabled: m || !B(),
6912
+ disabled: S || Object.values(C).some((N) => N !== ""),
6838
6913
  children: "Send"
6839
6914
  }
6840
6915
  )
6841
6916
  ] }) })
6842
6917
  }
6843
6918
  );
6844
- }, gt = ({
6919
+ }, kt = ({
6845
6920
  message: u,
6846
6921
  onFormSubmitted: D
6847
6922
  }) => {
6848
6923
  const { colors: f } = du(), { setIsContactFormActive: e } = cu(), t = pu(null);
6849
- G(() => {
6924
+ X(() => {
6850
6925
  n();
6851
6926
  }, [u]);
6852
6927
  const n = () => {
6853
- if (u.direction === uu.received && t.current) {
6928
+ if (u.direction === Du.received && t.current) {
6854
6929
  const F = t.current.innerText;
6855
6930
  let o = lt.link(F, {
6856
6931
  className: "chatLink",
@@ -6861,9 +6936,9 @@ const sD = [
6861
6936
  };
6862
6937
  if (!("text" in u.data))
6863
6938
  throw new Error("Unable to find text.");
6864
- const r = f[u.direction || uu.received];
6939
+ const r = f[u.direction || Du.received];
6865
6940
  return "isShowForm" in u.data && u.data.isShowForm ? /* @__PURE__ */ a.jsx(
6866
- Bt,
6941
+ xt,
6867
6942
  {
6868
6943
  onFormStateChange: (F) => {
6869
6944
  e(F), !F && D && D(!0);
@@ -6901,7 +6976,7 @@ const sD = [
6901
6976
  ...r,
6902
6977
  children: /* @__PURE__ */ a.jsx("path", { d: "M20 6L9 17l-5-5" })
6903
6978
  }
6904
- ), mt = ({ message: u }) => {
6979
+ ), jt = ({ message: u }) => {
6905
6980
  const { colors: D } = du();
6906
6981
  if (!("delivery" in u && "read" in u))
6907
6982
  throw new Error("Unable to find delivery/read attributes");
@@ -6933,15 +7008,15 @@ const sD = [
6933
7008
  )
6934
7009
  ] });
6935
7010
  };
6936
- j1.extend(He);
6937
- const _t = ({ message: u, Avatar: D }) => {
7011
+ j1.extend(We);
7012
+ const St = ({ message: u, Avatar: D }) => {
6938
7013
  const { participants: f } = cu(), { colors: e } = du(), [t, n] = U(!1), [r, s] = U(!1), F = Bu(), o = u.data && "text" in u.data && "isShowForm" in u.data && u.data.isShowForm, d = f.find(
6939
- (A) => A.id === u.author
7014
+ (j) => j.id === u.author
6940
7015
  ) || {
6941
7016
  name: "Anon"
6942
7017
  }, c = () => {
6943
7018
  n(!t);
6944
- }, l = (A) => j1(A).fromNow();
7019
+ }, l = (j) => j1(j).fromNow();
6945
7020
  return /* @__PURE__ */ a.jsx("div", { className: `sc-message ${u.direction}`, children: /* @__PURE__ */ a.jsxs("div", { className: `sc-message--content ${u.direction}`, children: [
6946
7021
  (!r || !o) && /* @__PURE__ */ a.jsx(
6947
7022
  "div",
@@ -6964,7 +7039,7 @@ const _t = ({ message: u, Avatar: D }) => {
6964
7039
  ),
6965
7040
  /* @__PURE__ */ a.jsxs("div", { className: "sc-message--wrapper", onClick: c, children: [
6966
7041
  u.data && "text" in u.data && /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(
6967
- gt,
7042
+ kt,
6968
7043
  {
6969
7044
  message: u,
6970
7045
  onFormSubmitted: s
@@ -6976,7 +7051,7 @@ const _t = ({ message: u, Avatar: D }) => {
6976
7051
  u.type === "carousel" && /* @__PURE__ */ a.jsx(Ge, { messageCarousel: u }),
6977
7052
  u.type === "buttons" && /* @__PURE__ */ a.jsx(vD, { message: u }),
6978
7053
  /* @__PURE__ */ a.jsxs("div", { className: "sc-message--meta", children: [
6979
- u.direction === "sent" && /* @__PURE__ */ a.jsx(mt, { message: u }),
7054
+ u.direction === "sent" && /* @__PURE__ */ a.jsx(jt, { message: u }),
6980
7055
  /* @__PURE__ */ a.jsx(
6981
7056
  "div",
6982
7057
  {
@@ -6988,7 +7063,7 @@ const _t = ({ message: u, Avatar: D }) => {
6988
7063
  ] })
6989
7064
  ] })
6990
7065
  ] }) });
6991
- }, yt = () => {
7066
+ }, Tt = () => {
6992
7067
  const { colors: u } = du();
6993
7068
  return /* @__PURE__ */ a.jsxs(
6994
7069
  "div",
@@ -7005,18 +7080,18 @@ const _t = ({ message: u, Avatar: D }) => {
7005
7080
  ]
7006
7081
  }
7007
7082
  );
7008
- }, vt = ({
7083
+ }, Nt = ({
7009
7084
  Avatar: u,
7010
7085
  phone: D
7011
7086
  }) => {
7012
- const { colors: f } = du(), e = f[uu.received];
7087
+ const { colors: f } = du(), e = f[Du.received];
7013
7088
  Bu();
7014
7089
  const { participants: t } = cu(), n = t.find(
7015
7090
  (r) => r.id === "chatbot"
7016
7091
  ) || {
7017
7092
  name: "Bot"
7018
7093
  };
7019
- return /* @__PURE__ */ a.jsx("div", { className: `sc-message ${uu.received}`, children: /* @__PURE__ */ a.jsxs("div", { className: `sc-message--content ${uu.received}`, children: [
7094
+ return /* @__PURE__ */ a.jsx("div", { className: `sc-message ${Du.received}`, children: /* @__PURE__ */ a.jsxs("div", { className: `sc-message--content ${Du.received}`, children: [
7020
7095
  /* @__PURE__ */ a.jsx(
7021
7096
  "div",
7022
7097
  {
@@ -7053,38 +7128,38 @@ const _t = ({ message: u, Avatar: D }) => {
7053
7128
  }
7054
7129
  ) })
7055
7130
  ] }) });
7056
- }, wt = ({ Avatar: u }) => {
7057
- const { scroll: D, setScroll: f, isOpen: e } = Nu(), { messages: t, showTypingIndicator: n, setNewIOMessage: r, setMessages: s } = cu(), F = Bu(), { colors: o } = du(), { formSettings: d } = Bu(), [c, l] = U(""), A = pu(""), C = F.offline_mode, m = kD(C), S = (B) => {
7058
- if (!("text" in B.data)) return null;
7059
- const T = B.data.text || "", y = (g) => g.toLowerCase().replace(/\s+/g, "").replace(/[^a-z0-9_]/g, ""), q = T.split(`
7060
- `).map((g) => g.trim()).find(
7061
- (g) => y(g.split(":")[0]) === "phone"
7131
+ }, Ot = ({ Avatar: u }) => {
7132
+ const { scroll: D, setScroll: f, isOpen: e } = Nu(), { messages: t, showTypingIndicator: n, setNewIOMessage: r, setMessages: s } = cu(), F = Bu(), { colors: o } = du(), { formSettings: d } = Bu(), [c, l] = U(""), j = pu(""), m = F.offline_mode, C = kD(m), v = (b) => {
7133
+ if (!("text" in b.data)) return null;
7134
+ const T = b.data.text || "", N = (_) => _.toLowerCase().replace(/\s+/g, "").replace(/[^a-z0-9_]/g, ""), A = T.split(`
7135
+ `).map((_) => _.trim()).find(
7136
+ (_) => N(_.split(":")[0]) === "phone"
7062
7137
  );
7063
- if (!q) return null;
7064
- const [, P = ""] = q.split(":");
7138
+ if (!A) return null;
7139
+ const [, P = ""] = A.split(":");
7065
7140
  return P.trim();
7066
- }, L = (B) => {
7067
- if (!("text" in B.data)) return !1;
7068
- const T = B.data.text || "", y = (g) => g.toLowerCase().replace(/\s+/g, "").replace(/[^a-z0-9_]/g, ""), v = T.split(`
7069
- `).map((g) => g.trim()), q = new Set(
7070
- v.map((g) => g.split(":")[0] || "").map((g) => y(g))
7141
+ }, S = (b) => {
7142
+ if (!("text" in b.data)) return !1;
7143
+ const T = b.data.text || "", N = (_) => _.toLowerCase().replace(/\s+/g, "").replace(/[^a-z0-9_]/g, ""), z = T.split(`
7144
+ `).map((_) => _.trim()), A = new Set(
7145
+ z.map((_) => _.split(":")[0] || "").map((_) => N(_))
7071
7146
  ), P = d == null ? void 0 : d.filter(
7072
- (g) => g.isDisplay && g.isRequired
7147
+ (_) => _.isDisplay && _.isRequired
7073
7148
  );
7074
7149
  return P == null ? void 0 : P.every(
7075
- (g) => q.has(y(g.label)) || q.has(y(g.key))
7150
+ (_) => A.has(N(_.label)) || A.has(N(_.key))
7076
7151
  );
7077
- }, x = pu(null), [I, _] = U();
7078
- return G(() => {
7079
- const B = (T) => {
7080
- if (x.current) {
7081
- const y = Math.round(
7082
- 100 * x.current.scrollTop / (x.current.scrollHeight || 1)
7152
+ }, g = pu(null), [L, y] = U();
7153
+ return X(() => {
7154
+ const b = (T) => {
7155
+ if (g.current) {
7156
+ const N = Math.round(
7157
+ 100 * g.current.scrollTop / (g.current.scrollHeight || 1)
7083
7158
  );
7084
- (Math.abs(y - T) > 1 || T === 100) && requestAnimationFrame(() => {
7085
- x.current && x.current.scrollTo({
7159
+ (Math.abs(N - T) > 1 || T === 100) && requestAnimationFrame(() => {
7160
+ g.current && g.current.scrollTo({
7086
7161
  top: Math.round(
7087
- T * x.current.scrollHeight / 100
7162
+ T * g.current.scrollHeight / 100
7088
7163
  ),
7089
7164
  behavior: "instant",
7090
7165
  left: 0
@@ -7093,19 +7168,19 @@ const _t = ({ message: u, Avatar: D }) => {
7093
7168
  }
7094
7169
  };
7095
7170
  e && setTimeout(() => {
7096
- B(D);
7171
+ b(D);
7097
7172
  }, 100);
7098
- }, [D, e]), G(() => {
7099
- const B = () => {
7100
- const y = eu.getItem("profileLiveChat") || {}, v = eu.getItem("submitedFormLateTime") || y.submitedFormLateTime, q = t.some(
7173
+ }, [D, e]), X(() => {
7174
+ const b = () => {
7175
+ const N = eu.getItem("profileLiveChat") || {}, z = eu.getItem("submitedFormLateTime") || N.submitedFormLateTime, A = t.some(
7101
7176
  (P) => P.data && "isShowForm" in P.data && P.data.isShowForm
7102
7177
  );
7103
- if (m && !v && !q) {
7178
+ if (C && !z && !A) {
7104
7179
  const P = {
7105
7180
  mid: `show-text-${Date.now()}`,
7106
7181
  author: "system",
7107
7182
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
7108
- direction: uu.received,
7183
+ direction: Du.received,
7109
7184
  read: !0,
7110
7185
  delivery: !0,
7111
7186
  type: YD.text,
@@ -7117,11 +7192,11 @@ const _t = ({ message: u, Avatar: D }) => {
7117
7192
  handover: !1,
7118
7193
  isOffline: !0,
7119
7194
  submitedFormLateTime: null
7120
- }, g = {
7195
+ }, _ = {
7121
7196
  mid: `show-form-${Date.now()}`,
7122
7197
  author: "user",
7123
7198
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
7124
- direction: uu.received,
7199
+ direction: Du.received,
7125
7200
  read: !0,
7126
7201
  delivery: !0,
7127
7202
  type: YD.text,
@@ -7134,25 +7209,25 @@ const _t = ({ message: u, Avatar: D }) => {
7134
7209
  isOffline: !0,
7135
7210
  submitedFormLateTime: null
7136
7211
  };
7137
- y.id ? s([...t]) : s([...t, P, g]);
7212
+ N.id ? s([...t]) : s([...t, P, _]);
7138
7213
  }
7139
7214
  };
7140
- B();
7141
- const T = (y) => {
7142
- (y.key === "isOffline" || y.key === "submitedFormLateTime") && B();
7215
+ b();
7216
+ const T = (N) => {
7217
+ (N.key === "isOffline" || N.key === "submitedFormLateTime") && b();
7143
7218
  };
7144
7219
  return window.addEventListener("storage", T), () => {
7145
7220
  window.removeEventListener("storage", T);
7146
7221
  };
7147
- }, [m]), G(() => {
7222
+ }, [C]), X(() => {
7148
7223
  r(t[t.length - 1]);
7149
- }, []), G(() => {
7150
- const B = t[t.length - 1];
7151
- (I == null ? void 0 : I.mid) !== (B == null ? void 0 : B.mid) && (_(B), f(100));
7224
+ }, []), X(() => {
7225
+ const b = t[t.length - 1];
7226
+ (L == null ? void 0 : L.mid) !== (b == null ? void 0 : b.mid) && (y(b), f(100));
7152
7227
  for (let T = t.length - 1; T >= 0; T--) {
7153
- const y = S(t[T]);
7154
- if (y && y !== A.current) {
7155
- A.current = y, l(y);
7228
+ const N = v(t[T]);
7229
+ if (N && N !== j.current) {
7230
+ j.current = N, l(N);
7156
7231
  break;
7157
7232
  }
7158
7233
  }
@@ -7160,14 +7235,14 @@ const _t = ({ message: u, Avatar: D }) => {
7160
7235
  "div",
7161
7236
  {
7162
7237
  className: "sc-message-list",
7163
- ref: x,
7238
+ ref: g,
7164
7239
  style: { backgroundColor: o.messageList.bg },
7165
7240
  children: [
7166
- t.map((B) => /* @__PURE__ */ a.jsxs(af.Fragment, { children: [
7167
- /* @__PURE__ */ a.jsx(_t, { message: B, Avatar: u }),
7168
- L(B) && m && /* @__PURE__ */ a.jsx(vt, { phone: c })
7169
- ] }, B.mid)),
7170
- n && /* @__PURE__ */ a.jsx(yt, {})
7241
+ t.map((b) => /* @__PURE__ */ a.jsxs(af.Fragment, { children: [
7242
+ /* @__PURE__ */ a.jsx(St, { message: b, Avatar: u }),
7243
+ S(b) && C && /* @__PURE__ */ a.jsx(Nt, { phone: c })
7244
+ ] }, b.mid)),
7245
+ n && /* @__PURE__ */ a.jsx(Tt, {})
7171
7246
  ]
7172
7247
  }
7173
7248
  );
@@ -7192,27 +7267,27 @@ var nf = { exports: {} };
7192
7267
  }, t.prototype.replace_emoticons_with_colons = function(n) {
7193
7268
  var r = this;
7194
7269
  r.init_emoticons();
7195
- var s = 0, F = [], o = n.replace(r.rx_emoticons, function(l, A, C, m) {
7196
- var S = s;
7197
- s = m + l.length;
7198
- var L = C.indexOf("(") !== -1, x = C.indexOf(")") !== -1;
7199
- if ((L || x) && F.indexOf(C) == -1 && F.push(C), x && !L) {
7200
- var I = n.substring(S, m);
7201
- if (I.indexOf("(") !== -1 && I.indexOf(")") === -1) return l;
7270
+ var s = 0, F = [], o = n.replace(r.rx_emoticons, function(l, j, m, C) {
7271
+ var v = s;
7272
+ s = C + l.length;
7273
+ var S = m.indexOf("(") !== -1, g = m.indexOf(")") !== -1;
7274
+ if ((S || g) && F.indexOf(m) == -1 && F.push(m), g && !S) {
7275
+ var L = n.substring(v, C);
7276
+ if (L.indexOf("(") !== -1 && L.indexOf(")") === -1) return l;
7202
7277
  }
7203
7278
  if (l === `
7204
7279
  8)`) {
7205
- var _ = n.substring(0, m);
7206
- if (/\n?(6\)|7\))/.test(_)) return l;
7280
+ var y = n.substring(0, C);
7281
+ if (/\n?(6\)|7\))/.test(y)) return l;
7207
7282
  }
7208
- var B = r.data[r.map.emoticons[C]][3][0];
7209
- return B ? A + ":" + B + ":" : l;
7283
+ var b = r.data[r.map.emoticons[m]][3][0];
7284
+ return b ? j + ":" + b + ":" : l;
7210
7285
  });
7211
7286
  if (F.length) {
7212
7287
  var d = F.map(r.escape_rx), c = new RegExp("(\\(.+)(" + d.join("|") + ")(.+\\))", "g");
7213
- o = o.replace(c, function(l, A, C, m) {
7214
- var S = r.data[r.map.emoticons[C]][3][0];
7215
- return S ? A + ":" + S + ":" + m : l;
7288
+ o = o.replace(c, function(l, j, m, C) {
7289
+ var v = r.data[r.map.emoticons[m]][3][0];
7290
+ return v ? j + ":" + v + ":" + C : l;
7216
7291
  });
7217
7292
  }
7218
7293
  return o;
@@ -7272,19 +7347,19 @@ var nf = { exports: {} };
7272
7347
  }, t.prototype.replacement = function(n, r, s, F, o) {
7273
7348
  var d = this, c = "", l = null;
7274
7349
  if (typeof F == "object" && (c = d.replacement(F.idx, F.actual, F.wrapper, void 0, !0), l = F.idx), s = s || "", d.colons_mode) return ":" + d.data[n][3][0] + ":" + c;
7275
- var A = r ? s + r + s : d.data[n][8] || s + d.data[n][3][0] + s;
7276
- if (d.text_mode) return A + c;
7277
- var C = d.find_image(n, l);
7350
+ var j = r ? s + r + s : d.data[n][8] || s + d.data[n][3][0] + s;
7351
+ if (d.text_mode) return j + c;
7352
+ var m = d.find_image(n, l);
7278
7353
  if (d.init_env(), d.replace_mode == "softbank" && d.allow_native && d.data[n][1]) return d.format_native(d.data[n][1] + c, !o);
7279
7354
  if (d.replace_mode == "google" && d.allow_native && d.data[n][2]) return d.format_native(d.data[n][2] + c, !o);
7280
- if (C.is_var && (c = ""), d.replace_mode == "unified" && d.allow_native) return d.format_native(C.unified + c, !o);
7281
- var m = d.include_title ? ' title="' + (r || d.data[n][3][0]) + '"' : "", S = d.include_text ? s + (r || d.data[n][3][0]) + s : "";
7282
- if (d.data[n][7] && (C.path = d.data[n][7], C.px = null, C.py = null, C.is_var = !1), C.is_var && d.include_text && F && F.actual && F.wrapper && (S += F.wrapper + F.actual + F.wrapper), d.replace_mode == "css")
7283
- if (d.use_sheet && C.px != null && C.py != null) {
7284
- var L = 100 * C.px / (d.sheet_size - 1), x = 100 * C.py / (d.sheet_size - 1), I = 100 * d.sheet_size, _ = "background: url(" + C.sheet + ");background-position:" + L + "% " + x + "%;background-size:" + I + "% " + I + "%";
7285
- return '<span class="emoji-outer emoji-sizer"><span class="emoji-inner" style="' + _ + '"' + m + ' data-codepoints="' + C.full_idx + '">' + S + "</span></span>" + c;
7286
- } else return d.use_css_imgs ? '<span class="emoji emoji-' + n + '"' + m + ' data-codepoints="' + C.full_idx + '">' + S + "</span>" + c : '<span class="emoji emoji-sizer" style="background-image:url(' + C.path + ')"' + m + ' data-codepoints="' + C.full_idx + '">' + S + "</span>" + c;
7287
- return '<img src="' + C.path + '" class="emoji" data-codepoints="' + C.full_idx + '" ' + m + "/>" + c;
7355
+ if (m.is_var && (c = ""), d.replace_mode == "unified" && d.allow_native) return d.format_native(m.unified + c, !o);
7356
+ var C = d.include_title ? ' title="' + (r || d.data[n][3][0]) + '"' : "", v = d.include_text ? s + (r || d.data[n][3][0]) + s : "";
7357
+ if (d.data[n][7] && (m.path = d.data[n][7], m.px = null, m.py = null, m.is_var = !1), m.is_var && d.include_text && F && F.actual && F.wrapper && (v += F.wrapper + F.actual + F.wrapper), d.replace_mode == "css")
7358
+ if (d.use_sheet && m.px != null && m.py != null) {
7359
+ var S = 100 * m.px / (d.sheet_size - 1), g = 100 * m.py / (d.sheet_size - 1), L = 100 * d.sheet_size, y = "background: url(" + m.sheet + ");background-position:" + S + "% " + g + "%;background-size:" + L + "% " + L + "%";
7360
+ return '<span class="emoji-outer emoji-sizer"><span class="emoji-inner" style="' + y + '"' + C + ' data-codepoints="' + m.full_idx + '">' + v + "</span></span>" + c;
7361
+ } else return d.use_css_imgs ? '<span class="emoji emoji-' + n + '"' + C + ' data-codepoints="' + m.full_idx + '">' + v + "</span>" + c : '<span class="emoji emoji-sizer" style="background-image:url(' + m.path + ')"' + C + ' data-codepoints="' + m.full_idx + '">' + v + "</span>" + c;
7362
+ return '<img src="' + m.path + '" class="emoji" data-codepoints="' + m.full_idx + '" ' + C + "/>" + c;
7288
7363
  }, t.prototype.format_native = function(n, r) {
7289
7364
  var s = this;
7290
7365
  return s.wrap_native && r ? '<span class="emoji-native">' + n + "</span>" : n;
@@ -7309,9 +7384,9 @@ var nf = { exports: {} };
7309
7384
  if (o & s.img_sets[c[l]].mask)
7310
7385
  return F.path = s.img_sets[c[l]].path + F.full_idx + ".png" + s.img_suffix, F.sheet = s.img_sets[s.img_set].sheet, F.sheet_size = s.img_sets[s.img_set].sheet_size, F;
7311
7386
  if (s.obsoletes_data[F.full_idx]) {
7312
- var A = s.obsoletes_data[F.full_idx];
7313
- if (A[3] & s.img_sets[c[l]].mask)
7314
- return F.path = s.img_sets[c[l]].path + A[0] + ".png" + s.img_suffix, F.sheet = s.img_sets[c[l]].sheet, F.sheet_size = s.img_sets[c[l]].sheet_size, F.px = A[1], F.py = A[2], F;
7387
+ var j = s.obsoletes_data[F.full_idx];
7388
+ if (j[3] & s.img_sets[c[l]].mask)
7389
+ return F.path = s.img_sets[c[l]].path + j[0] + ".png" + s.img_suffix, F.sheet = s.img_sets[c[l]].sheet, F.sheet_size = s.img_sets[c[l]].sheet_size, F.px = j[1], F.py = j[2], F;
7315
7390
  }
7316
7391
  }
7317
7392
  return F;
@@ -9762,8 +9837,8 @@ var nf = { exports: {} };
9762
9837
  return this || (typeof window < "u" ? window : dD);
9763
9838
  }());
9764
9839
  })(nf, nf.exports);
9765
- var At = nf.exports;
9766
- const xt = /* @__PURE__ */ sf(At), kt = [
9840
+ var Rt = nf.exports;
9841
+ const Pt = /* @__PURE__ */ sf(Rt), It = [
9767
9842
  {
9768
9843
  name: "People",
9769
9844
  emojis: [
@@ -10417,9 +10492,9 @@ const xt = /* @__PURE__ */ sf(At), kt = [
10417
10492
  "🔹"
10418
10493
  ]
10419
10494
  }
10420
- ], jt = ({ onBlur: u, onSelect: D }) => {
10421
- const f = pu(new xt()), e = pu(null);
10422
- G(() => {
10495
+ ], Lt = ({ onBlur: u, onSelect: D }) => {
10496
+ const f = pu(new Pt()), e = pu(null);
10497
+ X(() => {
10423
10498
  const n = e.current;
10424
10499
  n && (n.style.opacity = "0", window.requestAnimationFrame(() => {
10425
10500
  n.style.transition = "opacity 350ms", n.style.opacity = "1";
@@ -10428,7 +10503,7 @@ const xt = /* @__PURE__ */ sf(At), kt = [
10428
10503
  const t = (n, r) => {
10429
10504
  D(n, r), e.current && e.current.blur();
10430
10505
  };
10431
- 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: kt.map((n) => /* @__PURE__ */ a.jsxs("div", { className: "sc-emoji-picker--category", children: [
10506
+ 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: It.map((n) => /* @__PURE__ */ a.jsxs("div", { className: "sc-emoji-picker--category", children: [
10432
10507
  /* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--category-title", children: n.name }),
10433
10508
  n.emojis.map((r) => /* @__PURE__ */ a.jsx(
10434
10509
  "span",
@@ -10440,7 +10515,7 @@ const xt = /* @__PURE__ */ sf(At), kt = [
10440
10515
  r
10441
10516
  ))
10442
10517
  ] }, n.name)) }) });
10443
- }, St = ({
10518
+ }, $t = ({
10444
10519
  x: u = "0",
10445
10520
  y: D = "0",
10446
10521
  className: f = "sc-user-input--emoji-icon",
@@ -10463,7 +10538,7 @@ const xt = /* @__PURE__ */ sf(At), kt = [
10463
10538
  /* @__PURE__ */ a.jsx("path", { d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-2.5c2.33 0 4.32-1.45 5.12-3.5h-1.67c-.69 1.19-1.97 2-3.45 2s-2.75-.81-3.45-2H6.88c.8 2.05 2.79 3.5 5.12 3.5" })
10464
10539
  ]
10465
10540
  }
10466
- ), Tt = ({ inputRef: u, onInput: D }) => {
10541
+ ), Mt = ({ inputRef: u, onInput: D }) => {
10467
10542
  const [f, e] = U(!1), t = pu(null), n = () => {
10468
10543
  e(!f);
10469
10544
  }, r = (o) => {
@@ -10479,7 +10554,7 @@ const xt = /* @__PURE__ */ sf(At), kt = [
10479
10554
  }
10480
10555
  };
10481
10556
  return /* @__PURE__ */ a.jsxs("div", { className: "sc-user-input--picker-wrapper", children: [
10482
- f && /* @__PURE__ */ a.jsx(jt, { onBlur: r, onSelect: s }),
10557
+ f && /* @__PURE__ */ a.jsx(Lt, { onBlur: r, onSelect: s }),
10483
10558
  /* @__PURE__ */ a.jsx(
10484
10559
  "button",
10485
10560
  {
@@ -10489,11 +10564,11 @@ const xt = /* @__PURE__ */ sf(At), kt = [
10489
10564
  id: "sc-emoji-button",
10490
10565
  className: "sc-user-input--emoji-icon-wrapper",
10491
10566
  ref: t,
10492
- children: /* @__PURE__ */ a.jsx(St, {})
10567
+ children: /* @__PURE__ */ a.jsx($t, {})
10493
10568
  }
10494
10569
  )
10495
10570
  ] });
10496
- }, Nt = {
10571
+ }, qt = {
10497
10572
  images: ["image/jpeg", "image/png", "image/webp", "image/bmp"],
10498
10573
  videos: [
10499
10574
  "video/mp4",
@@ -10559,13 +10634,13 @@ const xt = /* @__PURE__ */ sf(At), kt = [
10559
10634
  " "
10560
10635
  ]
10561
10636
  }
10562
- ), Ot = () => {
10637
+ ), zt = () => {
10563
10638
  const { setFile: u } = cu(), D = (t) => {
10564
10639
  t.target.value = "";
10565
10640
  }, f = (t) => {
10566
10641
  t.target.files && t.target.files[0] && u && u(t.target.files[0]);
10567
10642
  }, e = d0(
10568
- () => Object.values(Nt).flat().join(","),
10643
+ () => Object.values(qt).flat().join(","),
10569
10644
  []
10570
10645
  );
10571
10646
  return /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--file-wrapper", children: /* @__PURE__ */ a.jsxs("button", { className: "sc-user-input--file-icon-wrapper", type: "button", children: [
@@ -10581,7 +10656,7 @@ const xt = /* @__PURE__ */ sf(At), kt = [
10581
10656
  }
10582
10657
  )
10583
10658
  ] }) });
10584
- }, Rt = ({
10659
+ }, Ut = ({
10585
10660
  x: u = "0",
10586
10661
  y: D = "0",
10587
10662
  className: f = "sc-user-input--location-icon",
@@ -10600,7 +10675,7 @@ const xt = /* @__PURE__ */ sf(At), kt = [
10600
10675
  ...n,
10601
10676
  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" })
10602
10677
  }
10603
- ), Pt = () => {
10678
+ ), Vt = () => {
10604
10679
  const { setPayload: u, send: D } = cu(), f = Bu(), e = (t) => {
10605
10680
  navigator.geolocation ? navigator.geolocation.getCurrentPosition(
10606
10681
  (n) => {
@@ -10634,12 +10709,12 @@ const xt = /* @__PURE__ */ sf(At), kt = [
10634
10709
  onClick: e,
10635
10710
  type: "button",
10636
10711
  className: "sc-user-input--location-icon-wrapper",
10637
- children: /* @__PURE__ */ a.jsx(Rt, {})
10712
+ children: /* @__PURE__ */ a.jsx(Ut, {})
10638
10713
  }
10639
10714
  ) });
10640
10715
  };
10641
10716
  var rf = /* @__PURE__ */ ((u) => (u.web_url = "web_url", u.postback = "postback", u.nested = "nested", u))(rf || {});
10642
- const It = ({ item: u, onPostback: D }) => {
10717
+ const Wt = ({ item: u, onPostback: D }) => {
10643
10718
  const { colors: f } = du(), e = () => {
10644
10719
  switch (u.type) {
10645
10720
  case "web_url":
@@ -10660,13 +10735,13 @@ const It = ({ item: u, onPostback: D }) => {
10660
10735
  children: /* @__PURE__ */ a.jsx("span", { className: "sc-menu-item-text", children: u.title })
10661
10736
  }
10662
10737
  ) });
10663
- }, Lt = () => {
10738
+ }, Ht = () => {
10664
10739
  const u = Bu(), { send: D, setPayload: f } = cu(), [e, t] = U({
10665
10740
  title: "Menu",
10666
10741
  type: rf.nested,
10667
10742
  call_to_actions: (u == null ? void 0 : u.menu) || []
10668
10743
  }), n = pu(null);
10669
- G(() => {
10744
+ X(() => {
10670
10745
  t({
10671
10746
  title: "Menu",
10672
10747
  type: rf.nested,
@@ -10697,7 +10772,7 @@ const It = ({ item: u, onPostback: D }) => {
10697
10772
  ref: n,
10698
10773
  className: "sc-menu-elements-carousel sc-menu-always-visible",
10699
10774
  children: e.call_to_actions && /* @__PURE__ */ a.jsx(a.Fragment, { children: e.call_to_actions.map((F, o) => /* @__PURE__ */ a.jsx("div", { className: "sc-menu-carousel-card", children: /* @__PURE__ */ a.jsx(
10700
- It,
10775
+ Wt,
10701
10776
  {
10702
10777
  item: F,
10703
10778
  parent: e,
@@ -10707,13 +10782,13 @@ const It = ({ item: u, onPostback: D }) => {
10707
10782
  ) }, o)) })
10708
10783
  }
10709
10784
  ) });
10710
- }, $t = ({
10785
+ }, Yt = ({
10711
10786
  viewBox: u = "0 0 48 48",
10712
10787
  ...D
10713
10788
  }) => /* @__PURE__ */ a.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: u, ...D, children: [
10714
10789
  /* @__PURE__ */ a.jsx("path", { d: "M4.02 42L46 24 4.02 6 4 20l30 4-30 4z" }),
10715
10790
  /* @__PURE__ */ a.jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
10716
- ] }), Mt = (u) => {
10791
+ ] }), Kt = (u) => {
10717
10792
  const { onClick: D, ...f } = u;
10718
10793
  return /* @__PURE__ */ a.jsx(
10719
10794
  "button",
@@ -10721,10 +10796,10 @@ const It = ({ item: u, onPostback: D }) => {
10721
10796
  onClick: D,
10722
10797
  ...f,
10723
10798
  className: "sc-user-input--button-icon-wrapper",
10724
- children: /* @__PURE__ */ a.jsx($t, {})
10799
+ children: /* @__PURE__ */ a.jsx(Yt, {})
10725
10800
  }
10726
10801
  );
10727
- }, qt = () => {
10802
+ }, Jt = () => {
10728
10803
  const { setPayload: u, send: D, suggestions: f } = cu(), e = Bu(), { colors: t } = du(), n = (r, s) => {
10729
10804
  u(s), D({
10730
10805
  event: r,
@@ -10752,9 +10827,9 @@ const It = ({ item: u, onPostback: D }) => {
10752
10827
  ))
10753
10828
  }
10754
10829
  );
10755
- }, zt = () => {
10756
- var X;
10757
- const { maxUploadSize: u } = zu(), { t: D } = Ou(), { colors: f } = du(), {
10830
+ }, Gt = () => {
10831
+ var Z;
10832
+ const { maxUploadSize: u } = Uu(), { t: D } = Ou(), { colors: f } = du(), {
10758
10833
  suggestions: e,
10759
10834
  message: t,
10760
10835
  setMessage: n,
@@ -10766,56 +10841,56 @@ const It = ({ item: u, onPostback: D }) => {
10766
10841
  isOfflineMode: c,
10767
10842
  messages: l
10768
10843
  } = cu(), {
10769
- menu: A,
10770
- focusOnOpen: C,
10771
- autoFlush: m,
10772
- allowedUploadTypes: S,
10773
- showEmoji: L,
10774
- showLocation: x,
10775
- showFile: I,
10776
- placeholder: _
10777
- } = Bu(), B = pu(null), [T, y] = U(null), [v, q] = U(!1), [P, g] = U(!1), [$, Du] = U(!1);
10778
- G(() => {
10779
- C && b();
10780
- }, [t, C]), G(() => {
10781
- t === "" && B.current && (B.current.innerHTML = "", B.current.innerText = "");
10782
- }, [t]), G(() => {
10783
- y(null);
10844
+ menu: j,
10845
+ focusOnOpen: m,
10846
+ autoFlush: C,
10847
+ allowedUploadTypes: v,
10848
+ showEmoji: S,
10849
+ showLocation: g,
10850
+ showFile: L,
10851
+ placeholder: y
10852
+ } = Bu(), b = pu(null), [T, N] = U(null), [z, A] = U(!1), [P, _] = U(!1), [J, W] = U(!1);
10853
+ X(() => {
10854
+ m && B();
10855
+ }, [t, m]), X(() => {
10856
+ t === "" && b.current && (b.current.innerHTML = "", b.current.innerText = "");
10857
+ }, [t]), X(() => {
10858
+ N(null);
10784
10859
  }, [r]);
10785
- const N = () => {
10786
- s(null), y(null);
10860
+ const k = () => {
10861
+ s(null), N(null);
10787
10862
  }, E = () => {
10788
- var Q, nu;
10789
- if ($) {
10863
+ var uu, nu;
10864
+ if (J) {
10790
10865
  console.log("handleInput called but isClearing is true, ignoring");
10791
10866
  return;
10792
10867
  }
10793
- const z = ((Q = B.current) == null ? void 0 : Q.innerText) || ((nu = B.current) == null ? void 0 : nu.textContent) || "";
10794
- n(z);
10795
- }, p = (z, Q = "send-button") => {
10868
+ const q = ((uu = b.current) == null ? void 0 : uu.innerText) || ((nu = b.current) == null ? void 0 : nu.textContent) || "";
10869
+ n(q);
10870
+ }, h = (q, uu = "send-button") => {
10796
10871
  if (P) {
10797
10872
  console.log("Already sending, ignoring duplicate call");
10798
10873
  return;
10799
10874
  }
10800
10875
  if (t) {
10801
- g(!0);
10876
+ _(!0);
10802
10877
  const nu = t;
10803
10878
  F({
10804
- event: z,
10805
- source: Q,
10879
+ event: q,
10880
+ source: uu,
10806
10881
  data: {
10807
10882
  type: Au.text,
10808
10883
  data: { text: nu }
10809
10884
  }
10810
- }), m ? (console.log("autoFlush is true, clearing message state and input"), n(""), setTimeout(() => {
10811
- Du(!0), B.current ? (B.current.innerHTML = "", B.current.innerText = "", B.current.textContent = "", B.current.innerHTML = "&nbsp;", setTimeout(() => {
10812
- B.current && (B.current.innerHTML = ""), Du(!1);
10813
- }, 1)) : Du(!1);
10814
- }, 10)) : console.log("autoFlush is false, keeping message"), setTimeout(() => g(!1), 1e3);
10885
+ }), C ? (console.log("autoFlush is true, clearing message state and input"), n(""), setTimeout(() => {
10886
+ W(!0), b.current ? (b.current.innerHTML = "", b.current.innerText = "", b.current.textContent = "", b.current.innerHTML = "&nbsp;", setTimeout(() => {
10887
+ b.current && (b.current.innerHTML = ""), W(!1);
10888
+ }, 1)) : W(!1);
10889
+ }, 10)) : console.log("autoFlush is false, keeping message"), setTimeout(() => _(!1), 1e3);
10815
10890
  }
10816
- r && (y(null), S.includes(r.type) || !1 ? r.size > u ? y(D("messages.file_message.unsupported_file_size")) : (F({
10817
- event: z,
10818
- source: Q,
10891
+ r && (N(null), v.includes(r.type) || !1 ? r.size > u ? N(D("messages.file_message.unsupported_file_size")) : (F({
10892
+ event: q,
10893
+ source: uu,
10819
10894
  data: {
10820
10895
  type: Au.file,
10821
10896
  data: {
@@ -10825,18 +10900,18 @@ const It = ({ item: u, onPostback: D }) => {
10825
10900
  file: r
10826
10901
  }
10827
10902
  }
10828
- }), m && s(null)) : y(D("messages.file_message.unsupported_file_type")));
10829
- }, k = (z) => {
10830
- z.key === "Enter" && !z.shiftKey && (z.preventDefault(), z.stopPropagation(), p(z, "enter-key"));
10831
- }, b = () => {
10832
- var z;
10833
- (z = B.current) == null || z.focus();
10834
- }, O = o === iD.uploading, R = eu.getItem("profileLiveChat") || {}, W = eu.getItem("isOffline") || (R == null ? void 0 : R.isOffline), K = ((X = R == null ? void 0 : R.channel) == null ? void 0 : X.name) === "console-channel";
10835
- return (W || !(R != null && R.id)) && !K ? null : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
10836
- A.length > 0 && /* @__PURE__ */ a.jsx(Lt, {}),
10903
+ }), C && s(null)) : N(D("messages.file_message.unsupported_file_type")));
10904
+ }, x = (q) => {
10905
+ q.key === "Enter" && !q.shiftKey && (q.preventDefault(), q.stopPropagation(), h(q, "enter-key"));
10906
+ }, B = () => {
10907
+ var q;
10908
+ (q = b.current) == null || q.focus();
10909
+ }, I = o === iD.uploading, R = eu.getItem("profileLiveChat") || {}, M = eu.getItem("isOffline") || (R == null ? void 0 : R.isOffline), V = ((Z = R == null ? void 0 : R.channel) == null ? void 0 : Z.name) === "console-channel";
10910
+ return (M || !(R != null && R.id)) && !V ? null : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
10911
+ j.length > 0 && /* @__PURE__ */ a.jsx(Ht, {}),
10837
10912
  /* @__PURE__ */ a.jsxs("div", { className: "sc-user-input-wrapper", children: [
10838
- e.length > 0 && /* @__PURE__ */ a.jsx(qt, {}),
10839
- (r || O) && /* @__PURE__ */ a.jsxs(
10913
+ e.length > 0 && /* @__PURE__ */ a.jsx(Jt, {}),
10914
+ (r || I) && /* @__PURE__ */ a.jsxs(
10840
10915
  "div",
10841
10916
  {
10842
10917
  className: "sc-file-container",
@@ -10854,19 +10929,19 @@ const It = ({ item: u, onPostback: D }) => {
10854
10929
  }
10855
10930
  ),
10856
10931
  T && /* @__PURE__ */ a.jsx("span", { children: T }),
10857
- O && /* @__PURE__ */ a.jsx("span", { children: "Loading..." }),
10932
+ I && /* @__PURE__ */ a.jsx("span", { children: "Loading..." }),
10858
10933
  r && r.name && !T && /* @__PURE__ */ a.jsx("span", { children: r.name.length > 23 ? `${r.name.substring(0, 23)}...` : r.name }),
10859
- /* @__PURE__ */ a.jsx("span", { className: "delete-file-message", onClick: N, children: /* @__PURE__ */ a.jsx(Ef, { height: "10" }) })
10934
+ /* @__PURE__ */ a.jsx("span", { className: "delete-file-message", onClick: k, children: /* @__PURE__ */ a.jsx(Ef, { height: "10" }) })
10860
10935
  ]
10861
10936
  }
10862
10937
  ),
10863
10938
  /* @__PURE__ */ a.jsxs(
10864
10939
  "form",
10865
10940
  {
10866
- className: `sc-user-input ${v ? "active" : ""}`,
10941
+ className: `sc-user-input ${z ? "active" : ""}`,
10867
10942
  style: { background: f.userInput.bg },
10868
- onSubmit: (z) => {
10869
- z.preventDefault(), t && p(z, "form-submit");
10943
+ onSubmit: (q) => {
10944
+ q.preventDefault(), t && h(q, "form-submit");
10870
10945
  },
10871
10946
  children: [
10872
10947
  /* @__PURE__ */ a.jsx(
@@ -10874,16 +10949,16 @@ const It = ({ item: u, onPostback: D }) => {
10874
10949
  {
10875
10950
  role: "textbox",
10876
10951
  tabIndex: 0,
10877
- onFocus: () => q(!0),
10878
- onBlur: () => q(!1),
10879
- onKeyDown: k,
10952
+ onFocus: () => A(!0),
10953
+ onBlur: () => A(!1),
10954
+ onKeyDown: x,
10880
10955
  onInput: E,
10881
- onPaste: async (z) => {
10956
+ onPaste: async (q) => {
10882
10957
  var lu;
10883
- z.preventDefault();
10884
- const Q = await navigator.clipboard.readText(), nu = (lu = window.getSelection()) == null ? void 0 : lu.getRangeAt(0);
10885
- if (nu && Q) {
10886
- const _u = document.createTextNode(Q);
10958
+ q.preventDefault();
10959
+ const uu = await navigator.clipboard.readText(), nu = (lu = window.getSelection()) == null ? void 0 : lu.getRangeAt(0);
10960
+ if (nu && uu) {
10961
+ const _u = document.createTextNode(uu);
10887
10962
  nu.deleteContents(), nu.insertNode(_u), nu.collapse(!1);
10888
10963
  }
10889
10964
  E();
@@ -10892,21 +10967,21 @@ const It = ({ item: u, onPostback: D }) => {
10892
10967
  suppressContentEditableWarning: !0,
10893
10968
  spellCheck: !0,
10894
10969
  "aria-autocomplete": "list",
10895
- placeholder: _,
10970
+ placeholder: y,
10896
10971
  className: "sc-user-input--text",
10897
- ref: B,
10972
+ ref: b,
10898
10973
  style: { color: f.userInput.text }
10899
10974
  }
10900
10975
  ),
10901
10976
  /* @__PURE__ */ a.jsxs("div", { className: "sc-user-input--buttons", children: [
10902
- L && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Tt, { inputRef: B, onInput: E }) }),
10903
- x && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Pt, {}) }),
10904
- I && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Ot, {}) }),
10977
+ S && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Mt, { inputRef: b, onInput: E }) }),
10978
+ g && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Vt, {}) }),
10979
+ L && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(zt, {}) }),
10905
10980
  /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(
10906
- Mt,
10981
+ Kt,
10907
10982
  {
10908
10983
  disabled: !t,
10909
- onClick: (z) => p(z)
10984
+ onClick: (q) => h(q)
10910
10985
  }
10911
10986
  ) })
10912
10987
  ] })
@@ -10915,7 +10990,7 @@ const It = ({ item: u, onPostback: D }) => {
10915
10990
  )
10916
10991
  ] })
10917
10992
  ] });
10918
- }, Ut = ({
10993
+ }, Xt = ({
10919
10994
  width: u = "24",
10920
10995
  height: D = "24",
10921
10996
  fill: f = "none",
@@ -10940,9 +11015,9 @@ const It = ({ item: u, onPostback: D }) => {
10940
11015
  ...F,
10941
11016
  children: /* @__PURE__ */ a.jsx("path", { stroke: "#fff", strokeOpacity: "1", d: "M15 18L9 12 15 6" })
10942
11017
  }
10943
- ), Vt = () => {
11018
+ ), Zt = () => {
10944
11019
  const { t: u } = Ou(), { colors: D } = du(), { setWebviewUrl: f, webviewUrl: e } = cu(), [t, n] = U(!1);
10945
- G(() => {
11020
+ X(() => {
10946
11021
  n(!0);
10947
11022
  }, []);
10948
11023
  const r = () => {
@@ -10956,13 +11031,13 @@ const It = ({ item: u, onPostback: D }) => {
10956
11031
  className: "sc-webview--footer",
10957
11032
  style: { background: D.header.bg, color: D.header.text },
10958
11033
  children: /* @__PURE__ */ a.jsxs("h3", { className: "sc-webview--button", onClick: r, children: [
10959
- /* @__PURE__ */ a.jsx(Ut, { width: "16px", height: "16px" }),
11034
+ /* @__PURE__ */ a.jsx(Xt, { width: "16px", height: "16px" }),
10960
11035
  u("settings.back")
10961
11036
  ] })
10962
11037
  }
10963
11038
  )
10964
11039
  ] });
10965
- }, Ht = ({
11040
+ }, Qt = ({
10966
11041
  CustomHeader: u,
10967
11042
  CustomAvatar: D,
10968
11043
  PreChat: f,
@@ -10972,13 +11047,13 @@ const It = ({ item: u, onPostback: D }) => {
10972
11047
  return /* @__PURE__ */ a.jsxs("div", { className: `sc-chat-window ${r ? "opened" : "closed"}`, children: [
10973
11048
  /* @__PURE__ */ a.jsx(Le, { children: u && /* @__PURE__ */ a.jsx(u, {}) }),
10974
11049
  n === "prechat" && f && /* @__PURE__ */ a.jsx(f, {}),
10975
- ["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(wt, { Avatar: D }),
11050
+ ["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(Ot, { Avatar: D }),
10976
11051
  n !== "prechat" && n !== "postchat" && t !== 3 && /* @__PURE__ */ a.jsx(qe, {}),
10977
11052
  n === "postchat" && e && /* @__PURE__ */ a.jsx(e, {}),
10978
- ["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(zt, {}),
10979
- n === "webview" && /* @__PURE__ */ a.jsx(Vt, {})
11053
+ ["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(Gt, {}),
11054
+ n === "webview" && /* @__PURE__ */ a.jsx(Zt, {})
10980
11055
  ] });
10981
- }, H1 = ({
11056
+ }, W1 = ({
10982
11057
  CustomLauncher: u,
10983
11058
  CustomHeader: D,
10984
11059
  CustomAvatar: f,
@@ -10986,25 +11061,25 @@ const It = ({ item: u, onPostback: D }) => {
10986
11061
  PostChat: t
10987
11062
  }) => {
10988
11063
  Ou();
10989
- const n = zu(), r = cu(), s = Nu(), { socket: F } = Wu(), { setScreen: o } = Nu(), d = Bu(), c = d.offline_mode, l = kD(c), A = (m) => {
10990
- m.preventDefault(), s.setIsOpen(!s.isOpen);
11064
+ const n = Uu(), r = cu(), s = Nu(), { socket: F } = Yu(), { setScreen: o } = Nu(), d = Bu(), c = d.offline_mode, l = kD(c), j = (C) => {
11065
+ C.preventDefault(), s.setIsOpen(!s.isOpen);
10991
11066
  };
10992
- return xe(), new URLSearchParams().append("owner_id", n.ownerId), G(() => {
11067
+ return xe(), new URLSearchParams().append("owner_id", n.ownerId), X(() => {
10993
11068
  if (!l && !eu.getItem("profileLiveChat")) {
10994
11069
  o("prechat");
10995
11070
  return;
10996
11071
  }
10997
11072
  try {
10998
11073
  r.setConnectionState(2), l && (o("chat"), r.setConnectionState(3));
10999
- } catch (m) {
11000
- console.error("Offline init failed", m), o("prechat");
11074
+ } catch (C) {
11075
+ console.error("Offline init failed", C), o("prechat");
11001
11076
  }
11002
11077
  }, []), /* @__PURE__ */ a.jsxs("div", { children: [
11003
11078
  /* @__PURE__ */ a.jsx(
11004
11079
  "div",
11005
11080
  {
11006
11081
  className: `sc-launcher-wrapper ${s.isOpen ? "opened" : ""}`,
11007
- onClick: A,
11082
+ onClick: j,
11008
11083
  children: u ? /* @__PURE__ */ a.jsx(u, { widget: s }) : /* @__PURE__ */ a.jsxs(
11009
11084
  "div",
11010
11085
  {
@@ -11028,7 +11103,7 @@ const It = ({ item: u, onPostback: D }) => {
11028
11103
  }
11029
11104
  ),
11030
11105
  s.isOpen && /* @__PURE__ */ a.jsx(
11031
- Ht,
11106
+ Qt,
11032
11107
  {
11033
11108
  CustomHeader: D,
11034
11109
  CustomAvatar: f,
@@ -11037,72 +11112,94 @@ const It = ({ item: u, onPostback: D }) => {
11037
11112
  }
11038
11113
  )
11039
11114
  ] });
11040
- }, W1 = ({
11115
+ };
11116
+ function u8(u) {
11117
+ const D = {};
11118
+ return Object.entries(u).forEach(([f, e]) => {
11119
+ if (!(typeof e != "string" || !e)) {
11120
+ if (f.toLowerCase().includes("phone")) {
11121
+ const t = e.replace(/\s+/g, ""), n = Wu.find((r) => t.startsWith(r.countryCode));
11122
+ if (n && t.slice(n.countryCode.length) === "")
11123
+ return;
11124
+ }
11125
+ D[f] = e;
11126
+ }
11127
+ }), D;
11128
+ }
11129
+ const H1 = ({
11041
11130
  onFormDataSubmit: u
11042
11131
  }) => {
11043
- const D = zu(), { t: f } = Ou(), { colors: e } = du(), { socket: t } = Wu(), n = Bu(), { setScreen: r } = Nu(), {
11132
+ const D = Uu(), { t: f } = Ou(), { colors: e } = du(), { socket: t } = Yu(), n = Bu(), { setScreen: r } = Nu(), {
11044
11133
  send: s,
11045
11134
  setMessages: F,
11046
11135
  setConnectionState: o,
11047
11136
  participants: d,
11048
11137
  setParticipants: c
11049
- } = cu(), { formData: l, setFormData: A, renderFormField: C } = U1({
11138
+ } = cu(), { formData: l, setFormData: j, renderFormField: m, errors: C, validateAll: v } = U1({
11050
11139
  loadFromDataUserSubs: !1,
11051
11140
  initialData: {}
11052
- }), m = n.offline_mode, S = kD(m);
11141
+ }), S = n.offline_mode, g = kD(S);
11053
11142
  console.log(
11054
11143
  "🚀 ~ UserSubscription.tsx:72 ~ UserSubscription ~ isOffline:",
11055
- S
11144
+ g
11056
11145
  );
11057
- const L = pu(!1), x = Vu(
11058
- async (I) => {
11059
- I == null || I.preventDefault(), I == null || I.stopPropagation(), Object.keys(l).length > 0 && eu.setItem("dataUserSubs", l);
11146
+ const L = pu(!1), y = qu(
11147
+ async (b) => {
11148
+ if (b == null || b.preventDefault(), b == null || b.stopPropagation(), !v(n.formSettings))
11149
+ return;
11150
+ const N = {};
11151
+ Object.entries(l).forEach(([A, P]) => {
11152
+ N[A] = typeof P == "string" ? P.trim() : P;
11153
+ });
11154
+ const z = u8(N);
11155
+ Object.keys(z).length > 0 && eu.setItem("dataUserSubs", z);
11060
11156
  try {
11061
11157
  o(2);
11062
- const _ = new URLSearchParams();
11063
- Object.entries(l).forEach(([P, g]) => {
11064
- typeof g == "string" && g.trim() && _.append(P, g);
11065
- }), _.append("contactLateTime", (/* @__PURE__ */ new Date()).toISOString()), _.append("owner_id", D.ownerId);
11066
- const { body: B } = await t.get(`/webhook/${D.channel}/?${_.toString()}`), { messages: T, profile: y } = B;
11067
- console.log("jump here 1"), eu.setItem("profileLiveChat", y), eu.setItem("isOffline", S || !1), eu.setItem(
11158
+ const A = new URLSearchParams();
11159
+ Object.entries(z).forEach(([E, h]) => {
11160
+ typeof h == "string" && h && A.append(E, h);
11161
+ }), A.append("contactLateTime", (/* @__PURE__ */ new Date()).toISOString()), A.append("owner_id", D.ownerId);
11162
+ const { body: P } = await t.get(`/webhook/${D.channel}/?${A.toString()}`), { messages: _, profile: J } = P;
11163
+ if (console.log("jump here 1"), eu.setItem("profileLiveChat", J), eu.setItem("isOffline", g || !1), eu.setItem(
11068
11164
  "submitedFormLateTime",
11069
- (y == null ? void 0 : y.submitedFormLateTime) || null
11070
- ), T.forEach((P) => {
11071
- const g = P.author === y.foreignId || P.author === y.id ? uu.sent : uu.received;
11072
- P.direction = g, P.direction === uu.sent && (P.read = !0, P.delivery = !1);
11073
- }), F(T), c([
11165
+ (J == null ? void 0 : J.submitedFormLateTime) || null
11166
+ ), _.forEach((E) => {
11167
+ const h = E.author === J.foreignId || E.author === J.id ? Du.sent : Du.received;
11168
+ E.direction = h, E.direction === Du.sent && (E.read = !0, E.delivery = !1);
11169
+ }), F(_), c([
11074
11170
  d[0],
11075
11171
  {
11076
- id: y.foreignId,
11077
- foreign_id: y.foreignId,
11078
- name: `${y.firstName} ${y.firstName}`
11172
+ id: J.foreignId,
11173
+ foreign_id: J.foreignId,
11174
+ name: `${J.firstName} ${J.firstName}`
11079
11175
  }
11080
- ]), o(3), r("chat");
11081
- const v = Object.entries(l).map(
11082
- ([P, g]) => `${P.charAt(0).toUpperCase() + P.slice(1)}: ${g}`
11176
+ ]), o(3), r("chat"), Object.keys(z).length === 0)
11177
+ return;
11178
+ const W = Object.entries(z).map(
11179
+ ([E, h]) => `${E.charAt(0).toUpperCase() + E.slice(1)}: ${h}`
11083
11180
  ).join(`
11084
11181
  `);
11085
- if (!v || v.trim().length === 0)
11182
+ if (!W || W.trim().length === 0)
11086
11183
  return;
11087
- const q = {
11088
- text: v,
11184
+ const k = {
11185
+ text: W,
11089
11186
  contactInfo: {
11090
- ...l,
11187
+ ...z,
11091
11188
  owner_id: D.ownerId
11092
11189
  },
11093
11190
  contactLateTime: /* @__PURE__ */ new Date()
11094
11191
  };
11095
11192
  s({
11096
- event: I,
11193
+ event: b,
11097
11194
  source: "contact-form",
11098
11195
  data: {
11099
11196
  type: Au.text,
11100
- data: q,
11101
- author: y.foreignId
11197
+ data: k,
11198
+ author: J.foreignId
11102
11199
  }
11103
11200
  });
11104
- } catch (_) {
11105
- console.error("Unable to subscribe user", _), r("prechat"), o(0);
11201
+ } catch (A) {
11202
+ console.error("Unable to subscribe user", A), r("prechat"), o(0);
11106
11203
  }
11107
11204
  },
11108
11205
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -11114,24 +11211,26 @@ const It = ({ item: u, onPostback: D }) => {
11114
11211
  F,
11115
11212
  c,
11116
11213
  r,
11117
- t
11214
+ t,
11215
+ v,
11216
+ n.formSettings
11118
11217
  ]
11119
11218
  );
11120
- return G(() => {
11219
+ return X(() => {
11121
11220
  if (!L.current) {
11122
11221
  L.current = !0;
11123
- const I = eu.getItem("profileLiveChat");
11124
- if (I) {
11125
- const _ = I, B = {};
11126
- Object.entries(_).forEach(([T, y]) => {
11127
- y && (B[T] = y);
11128
- }), A(B), x();
11222
+ const b = eu.getItem("profileLiveChat");
11223
+ if (b) {
11224
+ const T = b, N = {};
11225
+ Object.entries(T).forEach(([z, A]) => {
11226
+ A && (N[z] = A);
11227
+ }), j(N), y();
11129
11228
  }
11130
11229
  }
11131
- }, [x, r, S]), /* @__PURE__ */ a.jsx("div", { className: "user-subscription-wrapper", children: /* @__PURE__ */ a.jsxs("form", { className: "user-subscription", onSubmit: x, children: [
11230
+ }, [y, r, g]), /* @__PURE__ */ a.jsx("div", { className: "user-subscription-wrapper", children: /* @__PURE__ */ a.jsxs("form", { className: "user-subscription", onSubmit: y, noValidate: !0, children: [
11132
11231
  /* @__PURE__ */ a.jsx("div", { className: "user-subscription-title", children: n == null ? void 0 : n.greetingMessage }),
11133
11232
  /* @__PURE__ */ a.jsxs("div", { className: "user-subscription-form", children: [
11134
- /* @__PURE__ */ a.jsx("div", { className: "user-subscription-inputs", children: n.formSettings.sort((I, _) => I.order - _.order).map(C) }),
11233
+ /* @__PURE__ */ a.jsx("div", { className: "user-subscription-inputs", children: n.formSettings.sort((b, T) => b.order - T.order).map(m) }),
11135
11234
  /* @__PURE__ */ a.jsx("div", { className: "sc-message--contact-form-authorization", children: /* @__PURE__ */ a.jsx(
11136
11235
  "a",
11137
11236
  {
@@ -11151,15 +11250,16 @@ const It = ({ item: u, onPostback: D }) => {
11151
11250
  color: e.header.text
11152
11251
  },
11153
11252
  className: "user-subscription-form-button-submit",
11253
+ disabled: Object.values(C).some((b) => b !== ""),
11154
11254
  children: f("user_subscription.get_started")
11155
11255
  }
11156
11256
  ) })
11157
11257
  ] })
11158
11258
  ] }) });
11159
- }, Wt = qu({}), Yt = ({
11259
+ }, D8 = zu({}), f8 = ({
11160
11260
  children: u
11161
11261
  }) => {
11162
- const D = zu(), [f, e] = U(!1), t = async () => {
11262
+ const D = Uu(), [f, e] = U(!1), t = async () => {
11163
11263
  try {
11164
11264
  await fetch(`${D.apiUrl}/__getcookie`, {
11165
11265
  credentials: "include"
@@ -11168,14 +11268,14 @@ const It = ({ item: u, onPostback: D }) => {
11168
11268
  console.warn("Unable to get cookies ...");
11169
11269
  }
11170
11270
  };
11171
- return G(() => {
11271
+ return X(() => {
11172
11272
  f || t();
11173
- }, []), f ? /* @__PURE__ */ a.jsx(Wt.Provider, { value: {}, children: u }) : null;
11273
+ }, []), f ? /* @__PURE__ */ a.jsx(D8.Provider, { value: {}, children: u }) : null;
11174
11274
  };
11175
- function Xt(u) {
11176
- return /* @__PURE__ */ a.jsx(D1, { ...u, children: /* @__PURE__ */ a.jsx(e1, { children: /* @__PURE__ */ a.jsx(Yt, { children: /* @__PURE__ */ a.jsx(b1, { children: /* @__PURE__ */ a.jsx(B1, { children: /* @__PURE__ */ a.jsx(w1, { children: /* @__PURE__ */ a.jsx(m1, { children: /* @__PURE__ */ a.jsx(Xf, { channelName: "main-channel", children: /* @__PURE__ */ a.jsx(y1, { children: /* @__PURE__ */ a.jsx(H1, { PreChat: W1 }) }) }) }) }) }) }) }) }) });
11275
+ function r8(u) {
11276
+ return /* @__PURE__ */ a.jsx(D1, { ...u, children: /* @__PURE__ */ a.jsx(e1, { children: /* @__PURE__ */ a.jsx(f8, { children: /* @__PURE__ */ a.jsx(b1, { children: /* @__PURE__ */ a.jsx(B1, { children: /* @__PURE__ */ a.jsx(w1, { children: /* @__PURE__ */ a.jsx(m1, { children: /* @__PURE__ */ a.jsx(Xf, { channelName: "main-channel", children: /* @__PURE__ */ a.jsx(y1, { children: /* @__PURE__ */ a.jsx(W1, { PreChat: H1 }) }) }) }) }) }) }) }) }) });
11177
11277
  }
11178
- function Zt({
11278
+ function a8({
11179
11279
  CustomHeader: u,
11180
11280
  CustomAvatar: D,
11181
11281
  config: f
@@ -11183,20 +11283,20 @@ function Zt({
11183
11283
  return /* @__PURE__ */ a.jsx(D1, { ...f, children: /* @__PURE__ */ a.jsx(e1, { children: /* @__PURE__ */ a.jsx(b1, { children: /* @__PURE__ */ a.jsx(B1, { children: /* @__PURE__ */ a.jsx(w1, { children: /* @__PURE__ */ a.jsx(Xf, { channelName: "main-channel", children: /* @__PURE__ */ a.jsx(m1, { defaultScreen: "chat", children: /* @__PURE__ */ a.jsx(
11184
11284
  y1,
11185
11285
  {
11186
- defaultConnectionState: eD.connected,
11286
+ defaultConnectionState: tD.connected,
11187
11287
  children: /* @__PURE__ */ a.jsx(
11188
- H1,
11288
+ W1,
11189
11289
  {
11190
11290
  CustomHeader: u,
11191
11291
  CustomAvatar: D,
11192
- PreChat: W1
11292
+ PreChat: H1
11193
11293
  }
11194
11294
  )
11195
11295
  }
11196
11296
  ) }) }) }) }) }) }) });
11197
11297
  }
11198
11298
  export {
11199
- Xt as ChatWidget,
11299
+ r8 as ChatWidget,
11200
11300
  eu as LocalStorageScoped,
11201
- Zt as UiChatWidget
11301
+ a8 as UiChatWidget
11202
11302
  };