@2uinc/frontend-component-xpert-chatbot 1.20.2 → 1.21.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/lib/index.min.js +189 -183
  2. package/package.json +1 -1
@@ -203,8 +203,8 @@ const g = /* @__PURE__ */ at(wo);
203
203
  var On = { exports: {} };
204
204
  On.exports;
205
205
  (function(e, t) {
206
- var n = 200, r = "__lodash_hash_undefined__", i = 800, a = 16, o = 9007199254740991, l = "[object Arguments]", u = "[object Array]", s = "[object AsyncFunction]", c = "[object Boolean]", f = "[object Date]", b = "[object Error]", d = "[object Function]", C = "[object GeneratorFunction]", x = "[object Map]", _ = "[object Number]", k = "[object Null]", B = "[object Object]", M = "[object Proxy]", U = "[object RegExp]", j = "[object Set]", v = "[object String]", D = "[object Undefined]", H = "[object WeakMap]", V = "[object ArrayBuffer]", q = "[object DataView]", P = "[object Float32Array]", S = "[object Float64Array]", I = "[object Int8Array]", A = "[object Int16Array]", E = "[object Int32Array]", O = "[object Uint8Array]", N = "[object Uint8ClampedArray]", L = "[object Uint16Array]", $ = "[object Uint32Array]", p = /[\\^$.*+?()[\]{}|]/g, G = /^\[object .+?Constructor\]$/, J = /^(?:0|[1-9]\d*)$/, m = {};
207
- m[P] = m[S] = m[I] = m[A] = m[E] = m[O] = m[N] = m[L] = m[$] = !0, m[l] = m[u] = m[V] = m[c] = m[q] = m[f] = m[b] = m[d] = m[x] = m[_] = m[B] = m[U] = m[j] = m[v] = m[H] = !1;
206
+ var n = 200, r = "__lodash_hash_undefined__", i = 800, a = 16, o = 9007199254740991, l = "[object Arguments]", u = "[object Array]", s = "[object AsyncFunction]", c = "[object Boolean]", f = "[object Date]", b = "[object Error]", d = "[object Function]", C = "[object GeneratorFunction]", x = "[object Map]", _ = "[object Number]", k = "[object Null]", B = "[object Object]", L = "[object Proxy]", U = "[object RegExp]", j = "[object Set]", v = "[object String]", D = "[object Undefined]", H = "[object WeakMap]", V = "[object ArrayBuffer]", q = "[object DataView]", P = "[object Float32Array]", S = "[object Float64Array]", I = "[object Int8Array]", A = "[object Int16Array]", E = "[object Int32Array]", O = "[object Uint8Array]", N = "[object Uint8ClampedArray]", M = "[object Uint16Array]", $ = "[object Uint32Array]", p = /[\\^$.*+?()[\]{}|]/g, G = /^\[object .+?Constructor\]$/, J = /^(?:0|[1-9]\d*)$/, m = {};
207
+ m[P] = m[S] = m[I] = m[A] = m[E] = m[O] = m[N] = m[M] = m[$] = !0, m[l] = m[u] = m[V] = m[c] = m[q] = m[f] = m[b] = m[d] = m[x] = m[_] = m[B] = m[U] = m[j] = m[v] = m[H] = !1;
208
208
  var te = typeof he == "object" && he && he.Object === Object && he, fe = typeof self == "object" && self && self.Object === Object && self, re = te || fe || Function("return this")(), xe = t && !t.nodeType && t, ke = xe && !0 && e && !e.nodeType && e, Ee = ke && ke.exports === xe, de = Ee && te.process, Oe = function() {
209
209
  try {
210
210
  var h = ke && ke.require && ke.require("util").types;
@@ -632,7 +632,7 @@ On.exports;
632
632
  if (!xt(h))
633
633
  return !1;
634
634
  var w = hn(h);
635
- return w == d || w == C || w == s || w == M;
635
+ return w == d || w == C || w == s || w == L;
636
636
  }
637
637
  function Wi(h) {
638
638
  return typeof h == "number" && h > -1 && h % 1 == 0 && h <= o;
@@ -893,23 +893,28 @@ const oi = /* @__PURE__ */ at(fu), du = {
893
893
  payloadParams: null
894
894
  },
895
895
  webExperimentation: {
896
- enabled: !0,
897
- experimentName: "xpertChatbotExperiment"
896
+ enabled: !1,
897
+ experimentName: null
898
898
  },
899
899
  launchButton: {
900
900
  message: null,
901
- logoType: "edx",
901
+ logoType: null,
902
902
  animatedGraduate: {
903
- enabled: !1,
904
- delayMs: null
903
+ enabled: !0,
904
+ delayMs: 7e3
905
905
  },
906
906
  style: {
907
- backgroundColor: "#0E3639",
908
- padding: "0.9375rem 1.5625rem",
909
- iconWidth: "5rem",
907
+ backgroundColor: "transparent",
908
+ border: "none",
909
+ borderRadius: 0,
910
+ padding: 0,
911
+ iconWidth: "4.5rem",
910
912
  mobile: {
911
- backgroundColor: "#0E3639",
912
- padding: "0.9375rem 1.5625rem"
913
+ backgroundColor: "transparent",
914
+ border: "none",
915
+ borderRadius: 0,
916
+ padding: 0,
917
+ iconWidth: "4.5rem"
913
918
  }
914
919
  }
915
920
  },
@@ -920,11 +925,11 @@ const oi = /* @__PURE__ */ at(fu), du = {
920
925
  text: "I'm Xpert, an AI assistant to help you find things.",
921
926
  delayMs: 4e3,
922
927
  style: {
923
- bottom: "6.75rem",
924
- right: "1.75rem",
928
+ bottom: "7.5rem",
929
+ right: "2rem",
925
930
  mobile: {
926
- bottom: "10.75rem",
927
- right: "1.75rem"
931
+ bottom: "11.5rem",
932
+ right: "2rem"
928
933
  }
929
934
  }
930
935
  },
@@ -1631,8 +1636,8 @@ eyes follow your mouse when you hover near it.`, li = ({
1631
1636
  };
1632
1637
  }, [l]), Se(() => {
1633
1638
  const k = (B) => {
1634
- const M = window.devicePixelRatio > 1.5;
1635
- if (!(o != null && o.current) || c || M)
1639
+ const L = window.devicePixelRatio > 1.5;
1640
+ if (!(o != null && o.current) || c || L)
1636
1641
  return;
1637
1642
  a.current.querySelectorAll(
1638
1643
  ".xpert_chatbot__animated_graduate__pupil"
@@ -2167,14 +2172,14 @@ function Hu(e, t) {
2167
2172
  let a = n.body;
2168
2173
  [n, r].forEach((x) => {
2169
2174
  const _ = [], k = x.hFlip, B = x.vFlip;
2170
- let M = x.rotate;
2171
- k ? B ? M += 2 : (_.push(
2175
+ let L = x.rotate;
2176
+ k ? B ? L += 2 : (_.push(
2172
2177
  "translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"
2173
2178
  ), _.push("scale(-1 1)"), i.top = i.left = 0) : B && (_.push(
2174
2179
  "translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"
2175
2180
  ), _.push("scale(1 -1)"), i.top = i.left = 0);
2176
2181
  let U;
2177
- switch (M < 0 && (M -= Math.floor(M / 4) * 4), M = M % 4, M) {
2182
+ switch (L < 0 && (L -= Math.floor(L / 4) * 4), L = L % 4, L) {
2178
2183
  case 1:
2179
2184
  U = i.height / 2 + i.top, _.unshift(
2180
2185
  "rotate(90 " + U.toString() + " " + U.toString() + ")"
@@ -2191,7 +2196,7 @@ function Hu(e, t) {
2191
2196
  );
2192
2197
  break;
2193
2198
  }
2194
- M % 2 === 1 && (i.left !== i.top && (U = i.left, i.left = i.top, i.top = U), i.width !== i.height && (U = i.width, i.width = i.height, i.height = U)), _.length && (a = Bu(
2199
+ L % 2 === 1 && (i.left !== i.top && (U = i.left, i.left = i.top, i.top = U), i.width !== i.height && (U = i.width, i.width = i.height, i.height = U)), _.length && (a = Bu(
2195
2200
  a,
2196
2201
  '<g transform="' + _.join(" ") + '">',
2197
2202
  "</g>"
@@ -2526,7 +2531,7 @@ function lc(e, t, n, r) {
2526
2531
  v(void 0, c);
2527
2532
  });
2528
2533
  }
2529
- function M() {
2534
+ function L() {
2530
2535
  b.forEach((v) => {
2531
2536
  v.status === "pending" && (v.status = "aborted");
2532
2537
  }), b = [];
@@ -2551,7 +2556,7 @@ function lc(e, t, n, r) {
2551
2556
  c = H, b.length || (o.length ? j() : B());
2552
2557
  return;
2553
2558
  }
2554
- if (C(), M(), !e.random) {
2559
+ if (C(), L(), !e.random) {
2555
2560
  const q = e.resources.indexOf(v.resource);
2556
2561
  q !== -1 && q !== e.index && (e.index = q);
2557
2562
  }
@@ -2567,7 +2572,7 @@ function lc(e, t, n, r) {
2567
2572
  if (v === void 0) {
2568
2573
  if (b.length) {
2569
2574
  f = setTimeout(() => {
2570
- C(), u === "pending" && (M(), B());
2575
+ C(), u === "pending" && (L(), B());
2571
2576
  }, e.timeout);
2572
2577
  return;
2573
2578
  }
@@ -2983,8 +2988,8 @@ const Ac = (e, t, n) => {
2983
2988
  "provider",
2984
2989
  "prefix"
2985
2990
  ];
2986
- for (const M of B)
2987
- _[M] && k.push("iconify--" + _[M]);
2991
+ for (const L of B)
2992
+ _[L] && k.push("iconify--" + _[L]);
2988
2993
  u.className = k.join(" ");
2989
2994
  }
2990
2995
  }
@@ -3289,7 +3294,7 @@ function Xn({
3289
3294
  text: o,
3290
3295
  userTrackingName: l
3291
3296
  }) {
3292
- var k, B, M, U;
3297
+ var k, B, L, U;
3293
3298
  const [u, s] = ee(!0), { primaryColor: c, id: f, userTracking: b, conversationScreen: d } = ne(Te), C = St(
3294
3299
  (j) => {
3295
3300
  var v, D, H, V;
@@ -3323,7 +3328,7 @@ function Xn({
3323
3328
  }, [
3324
3329
  (k = d == null ? void 0 : d.liveChat) == null ? void 0 : k.enabled,
3325
3330
  (B = d == null ? void 0 : d.liveChat) == null ? void 0 : B.options,
3326
- (M = d == null ? void 0 : d.liveChat) == null ? void 0 : M.sourceCode,
3331
+ (L = d == null ? void 0 : d.liveChat) == null ? void 0 : L.sourceCode,
3327
3332
  (U = d == null ? void 0 : d.liveChat) == null ? void 0 : U.useOwnChat,
3328
3333
  C,
3329
3334
  x
@@ -3983,7 +3988,7 @@ function Yo() {
3983
3988
  if (Fr("use", r), x != null) if (typeof x == "function")
3984
3989
  j(x, ..._);
3985
3990
  else if (typeof x == "object")
3986
- Array.isArray(x) ? U(x) : M(x);
3991
+ Array.isArray(x) ? U(x) : L(x);
3987
3992
  else
3988
3993
  throw new TypeError("Expected usable value, not `" + x + "`");
3989
3994
  return k && (n.settings = Object.assign(n.settings || {}, k)), a;
@@ -3995,11 +4000,11 @@ function Yo() {
3995
4000
  const [D, ...H] = v;
3996
4001
  j(D, ...H);
3997
4002
  } else
3998
- M(v);
4003
+ L(v);
3999
4004
  else
4000
4005
  throw new TypeError("Expected usable value, not `" + v + "`");
4001
4006
  }
4002
- function M(v) {
4007
+ function L(v) {
4003
4008
  U(v.plugins), v.settings && (k = Object.assign(k || {}, v.settings));
4004
4009
  }
4005
4010
  function U(v) {
@@ -4036,17 +4041,17 @@ function Yo() {
4036
4041
  if (Ea(x), a.freeze(), !k && typeof _ == "function" && (k = _, _ = void 0), !k)
4037
4042
  return new Promise(B);
4038
4043
  B(null, k);
4039
- function B(M, U) {
4044
+ function B(L, U) {
4040
4045
  e.run(x, Xt(_), j);
4041
4046
  function j(v, D, H) {
4042
- D = D || x, v ? U(v) : M ? M(D) : k(null, D, H);
4047
+ D = D || x, v ? U(v) : L ? L(D) : k(null, D, H);
4043
4048
  }
4044
4049
  }
4045
4050
  }
4046
4051
  function b(x, _) {
4047
4052
  let k, B;
4048
- return a.run(x, _, M), Ta("runSync", "run", B), k;
4049
- function M(U, j) {
4053
+ return a.run(x, _, L), Ta("runSync", "run", B), k;
4054
+ function L(U, j) {
4050
4055
  ya(U), k = j, B = !0;
4051
4056
  }
4052
4057
  }
@@ -4054,7 +4059,7 @@ function Yo() {
4054
4059
  if (a.freeze(), Ir("process", a.Parser), Ar("process", a.Compiler), !_)
4055
4060
  return new Promise(k);
4056
4061
  k(null, _);
4057
- function k(B, M) {
4062
+ function k(B, L) {
4058
4063
  const U = Xt(x);
4059
4064
  a.run(a.parse(U), U, (v, D, H) => {
4060
4065
  if (v || !D || !H)
@@ -4065,7 +4070,7 @@ function Yo() {
4065
4070
  }
4066
4071
  });
4067
4072
  function j(v, D) {
4068
- v || !D ? M(v) : B ? B(D) : _(null, D);
4073
+ v || !D ? L(v) : B ? B(D) : _(null, D);
4069
4074
  }
4070
4075
  }
4071
4076
  }
@@ -4074,8 +4079,8 @@ function Yo() {
4074
4079
  a.freeze(), Ir("processSync", a.Parser), Ar("processSync", a.Compiler);
4075
4080
  const k = Xt(x);
4076
4081
  return a.process(k, B), Ta("processSync", "process", _), k;
4077
- function B(M) {
4078
- _ = !0, ya(M);
4082
+ function B(L) {
4083
+ _ = !0, ya(L);
4079
4084
  }
4080
4085
  }
4081
4086
  }
@@ -4279,18 +4284,18 @@ function mf(e) {
4279
4284
  const t = this, n = [];
4280
4285
  let r = 0, i, a, o;
4281
4286
  return l;
4282
- function l(M) {
4287
+ function l(L) {
4283
4288
  if (r < n.length) {
4284
4289
  const U = n[r];
4285
4290
  return t.containerState = U[1], e.attempt(
4286
4291
  U[0].continuation,
4287
4292
  u,
4288
4293
  s
4289
- )(M);
4294
+ )(L);
4290
4295
  }
4291
- return s(M);
4296
+ return s(L);
4292
4297
  }
4293
- function u(M) {
4298
+ function u(L) {
4294
4299
  if (r++, t.containerState._closeFlow) {
4295
4300
  t.containerState._closeFlow = void 0, i && B();
4296
4301
  const U = t.events.length;
@@ -4309,61 +4314,61 @@ function mf(e) {
4309
4314
  j + 1,
4310
4315
  0,
4311
4316
  t.events.slice(U)
4312
- ), t.events.length = D, s(M);
4317
+ ), t.events.length = D, s(L);
4313
4318
  }
4314
- return l(M);
4319
+ return l(L);
4315
4320
  }
4316
- function s(M) {
4321
+ function s(L) {
4317
4322
  if (r === n.length) {
4318
4323
  if (!i)
4319
- return b(M);
4324
+ return b(L);
4320
4325
  if (i.currentConstruct && i.currentConstruct.concrete)
4321
- return C(M);
4326
+ return C(L);
4322
4327
  t.interrupt = !!(i.currentConstruct && !i._gfmTableDynamicInterruptHack);
4323
4328
  }
4324
4329
  return t.containerState = {}, e.check(
4325
4330
  Ia,
4326
4331
  c,
4327
4332
  f
4328
- )(M);
4333
+ )(L);
4329
4334
  }
4330
- function c(M) {
4331
- return i && B(), k(r), b(M);
4335
+ function c(L) {
4336
+ return i && B(), k(r), b(L);
4332
4337
  }
4333
- function f(M) {
4334
- return t.parser.lazy[t.now().line] = r !== n.length, o = t.now().offset, C(M);
4338
+ function f(L) {
4339
+ return t.parser.lazy[t.now().line] = r !== n.length, o = t.now().offset, C(L);
4335
4340
  }
4336
- function b(M) {
4341
+ function b(L) {
4337
4342
  return t.containerState = {}, e.attempt(
4338
4343
  Ia,
4339
4344
  d,
4340
4345
  C
4341
- )(M);
4346
+ )(L);
4342
4347
  }
4343
- function d(M) {
4344
- return r++, n.push([t.currentConstruct, t.containerState]), b(M);
4348
+ function d(L) {
4349
+ return r++, n.push([t.currentConstruct, t.containerState]), b(L);
4345
4350
  }
4346
- function C(M) {
4347
- if (M === null) {
4348
- i && B(), k(0), e.consume(M);
4351
+ function C(L) {
4352
+ if (L === null) {
4353
+ i && B(), k(0), e.consume(L);
4349
4354
  return;
4350
4355
  }
4351
4356
  return i = i || t.parser.flow(t.now()), e.enter("chunkFlow", {
4352
4357
  contentType: "flow",
4353
4358
  previous: a,
4354
4359
  _tokenizer: i
4355
- }), x(M);
4360
+ }), x(L);
4356
4361
  }
4357
- function x(M) {
4358
- if (M === null) {
4359
- _(e.exit("chunkFlow"), !0), k(0), e.consume(M);
4362
+ function x(L) {
4363
+ if (L === null) {
4364
+ _(e.exit("chunkFlow"), !0), k(0), e.consume(L);
4360
4365
  return;
4361
4366
  }
4362
- return Y(M) ? (e.consume(M), _(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, l) : (e.consume(M), x);
4367
+ return Y(L) ? (e.consume(L), _(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, l) : (e.consume(L), x);
4363
4368
  }
4364
- function _(M, U) {
4365
- const j = t.sliceStream(M);
4366
- if (U && j.push(null), M.previous = a, a && (a.next = M), a = M, i.defineSkip(M.start), i.write(j), t.parser.lazy[M.start.line]) {
4369
+ function _(L, U) {
4370
+ const j = t.sliceStream(L);
4371
+ if (U && j.push(null), L.previous = a, a && (a.next = L), a = L, i.defineSkip(L.start), i.write(j), t.parser.lazy[L.start.line]) {
4367
4372
  let v = i.events.length;
4368
4373
  for (; v--; )
4369
4374
  if (
@@ -4393,13 +4398,13 @@ function mf(e) {
4393
4398
  ), t.events.length = v;
4394
4399
  }
4395
4400
  }
4396
- function k(M) {
4401
+ function k(L) {
4397
4402
  let U = n.length;
4398
- for (; U-- > M; ) {
4403
+ for (; U-- > L; ) {
4399
4404
  const j = n[U];
4400
4405
  t.containerState = j[1], j[0].exit.call(t, e);
4401
4406
  }
4402
- n.length = M;
4407
+ n.length = L;
4403
4408
  }
4404
4409
  function B() {
4405
4410
  i.write([null]), a = void 0, i = void 0, t.containerState._closeFlow = void 0;
@@ -4703,10 +4708,10 @@ function Tf(e, t, n) {
4703
4708
  )(v) : B(v);
4704
4709
  }
4705
4710
  function B(v) {
4706
- return v === null || Y(v) ? e.check(La, x, U)(v) : (e.enter("codeFlowValue"), M(v));
4711
+ return v === null || Y(v) ? e.check(La, x, U)(v) : (e.enter("codeFlowValue"), L(v));
4707
4712
  }
4708
- function M(v) {
4709
- return v === null || Y(v) ? (e.exit("codeFlowValue"), B(v)) : (e.consume(v), M);
4713
+ function L(v) {
4714
+ return v === null || Y(v) ? (e.exit("codeFlowValue"), B(v)) : (e.consume(v), L);
4710
4715
  }
4711
4716
  function U(v) {
4712
4717
  return e.exit("codeFenced"), t(v);
@@ -5247,7 +5252,7 @@ function nd(e, t, n) {
5247
5252
  function _(m) {
5248
5253
  if (m === null || m === 47 || m === 62 || Me(m)) {
5249
5254
  const te = m === 47, fe = o.toLowerCase();
5250
- return !te && !a && ja.includes(fe) ? (i = 1, r.interrupt ? t(m) : S(m)) : Yf.includes(o.toLowerCase()) ? (i = 6, te ? (e.consume(m), k) : r.interrupt ? t(m) : S(m)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(m) : a ? B(m) : M(m));
5255
+ return !te && !a && ja.includes(fe) ? (i = 1, r.interrupt ? t(m) : S(m)) : Yf.includes(o.toLowerCase()) ? (i = 6, te ? (e.consume(m), k) : r.interrupt ? t(m) : S(m)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(m) : a ? B(m) : L(m));
5251
5256
  }
5252
5257
  return m === 45 || He(m) ? (e.consume(m), o += String.fromCharCode(m), _) : n(m);
5253
5258
  }
@@ -5257,14 +5262,14 @@ function nd(e, t, n) {
5257
5262
  function B(m) {
5258
5263
  return se(m) ? (e.consume(m), B) : q(m);
5259
5264
  }
5260
- function M(m) {
5261
- return m === 47 ? (e.consume(m), q) : m === 58 || m === 95 || tt(m) ? (e.consume(m), U) : se(m) ? (e.consume(m), M) : q(m);
5265
+ function L(m) {
5266
+ return m === 47 ? (e.consume(m), q) : m === 58 || m === 95 || tt(m) ? (e.consume(m), U) : se(m) ? (e.consume(m), L) : q(m);
5262
5267
  }
5263
5268
  function U(m) {
5264
5269
  return m === 45 || m === 46 || m === 58 || m === 95 || He(m) ? (e.consume(m), U) : j(m);
5265
5270
  }
5266
5271
  function j(m) {
5267
- return m === 61 ? (e.consume(m), v) : se(m) ? (e.consume(m), j) : M(m);
5272
+ return m === 61 ? (e.consume(m), v) : se(m) ? (e.consume(m), j) : L(m);
5268
5273
  }
5269
5274
  function v(m) {
5270
5275
  return m === null || m === 60 || m === 61 || m === 62 || m === 96 ? n(m) : m === 34 || m === 39 ? (e.consume(m), u = m, D) : se(m) ? (e.consume(m), v) : H(m);
@@ -5276,7 +5281,7 @@ function nd(e, t, n) {
5276
5281
  return m === null || m === 34 || m === 39 || m === 47 || m === 60 || m === 61 || m === 62 || m === 96 || Me(m) ? j(m) : (e.consume(m), H);
5277
5282
  }
5278
5283
  function V(m) {
5279
- return m === 47 || m === 62 || se(m) ? M(m) : n(m);
5284
+ return m === 47 || m === 62 || se(m) ? L(m) : n(m);
5280
5285
  }
5281
5286
  function q(m) {
5282
5287
  return m === 62 ? (e.consume(m), P) : n(m);
@@ -5308,14 +5313,14 @@ function nd(e, t, n) {
5308
5313
  return m === 45 ? (e.consume(m), p) : S(m);
5309
5314
  }
5310
5315
  function N(m) {
5311
- return m === 47 ? (e.consume(m), o = "", L) : S(m);
5316
+ return m === 47 ? (e.consume(m), o = "", M) : S(m);
5312
5317
  }
5313
- function L(m) {
5318
+ function M(m) {
5314
5319
  if (m === 62) {
5315
5320
  const te = o.toLowerCase();
5316
5321
  return ja.includes(te) ? (e.consume(m), G) : S(m);
5317
5322
  }
5318
- return tt(m) && o.length < 8 ? (e.consume(m), o += String.fromCharCode(m), L) : S(m);
5323
+ return tt(m) && o.length < 8 ? (e.consume(m), o += String.fromCharCode(m), M) : S(m);
5319
5324
  }
5320
5325
  function $(m) {
5321
5326
  return m === 93 ? (e.consume(m), p) : S(m);
@@ -5358,7 +5363,7 @@ function od(e, t, n) {
5358
5363
  return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(p), u;
5359
5364
  }
5360
5365
  function u(p) {
5361
- return p === 33 ? (e.consume(p), s) : p === 47 ? (e.consume(p), j) : p === 63 ? (e.consume(p), M) : tt(p) ? (e.consume(p), H) : n(p);
5366
+ return p === 33 ? (e.consume(p), s) : p === 47 ? (e.consume(p), j) : p === 63 ? (e.consume(p), L) : tt(p) ? (e.consume(p), H) : n(p);
5362
5367
  }
5363
5368
  function s(p) {
5364
5369
  return p === 45 ? (e.consume(p), c) : p === 91 ? (e.consume(p), a = 0, C) : tt(p) ? (e.consume(p), B) : n(p);
@@ -5391,11 +5396,11 @@ function od(e, t, n) {
5391
5396
  function B(p) {
5392
5397
  return p === null || p === 62 ? O(p) : Y(p) ? (o = B, N(p)) : (e.consume(p), B);
5393
5398
  }
5394
- function M(p) {
5395
- return p === null ? n(p) : p === 63 ? (e.consume(p), U) : Y(p) ? (o = M, N(p)) : (e.consume(p), M);
5399
+ function L(p) {
5400
+ return p === null ? n(p) : p === 63 ? (e.consume(p), U) : Y(p) ? (o = L, N(p)) : (e.consume(p), L);
5396
5401
  }
5397
5402
  function U(p) {
5398
- return p === 62 ? O(p) : M(p);
5403
+ return p === 62 ? O(p) : L(p);
5399
5404
  }
5400
5405
  function j(p) {
5401
5406
  return tt(p) ? (e.consume(p), v) : n(p);
@@ -5434,9 +5439,9 @@ function od(e, t, n) {
5434
5439
  return p === 62 ? (e.consume(p), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(p);
5435
5440
  }
5436
5441
  function N(p) {
5437
- return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(p), e.exit("lineEnding"), L;
5442
+ return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(p), e.exit("lineEnding"), M;
5438
5443
  }
5439
- function L(p) {
5444
+ function M(p) {
5440
5445
  return se(p) ? ge(
5441
5446
  e,
5442
5447
  $,
@@ -5997,7 +6002,7 @@ function Dd(e, t, n) {
5997
6002
  let o = [], l = [];
5998
6003
  const u = {
5999
6004
  consume: B,
6000
- enter: M,
6005
+ enter: L,
6001
6006
  exit: U,
6002
6007
  attempt: D(j),
6003
6008
  check: D(v),
@@ -6057,7 +6062,7 @@ function Dd(e, t, n) {
6057
6062
  function B(P) {
6058
6063
  Y(P) ? (r.line++, r.column = 1, r.offset += P === -3 ? 2 : 1, q()) : P !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === o[r._index].length && (r._bufferIndex = -1, r._index++)), s.previous = P;
6059
6064
  }
6060
- function M(P, S) {
6065
+ function L(P, S) {
6061
6066
  const I = S || {};
6062
6067
  return I.type = P, I.start = C(), s.events.push(["enter", I, s]), l.push(I), I;
6063
6068
  }
@@ -6074,7 +6079,7 @@ function Dd(e, t, n) {
6074
6079
  function D(P, S) {
6075
6080
  return I;
6076
6081
  function I(A, E, O) {
6077
- let N, L, $, p;
6082
+ let N, M, $, p;
6078
6083
  return Array.isArray(A) ? J(A) : "tokenize" in A ? (
6079
6084
  // @ts-expect-error Looks like a construct.
6080
6085
  J([A])
@@ -6092,7 +6097,7 @@ function Dd(e, t, n) {
6092
6097
  }
6093
6098
  }
6094
6099
  function J(re) {
6095
- return N = re, L = 0, re.length === 0 ? O : m(re[L]);
6100
+ return N = re, M = 0, re.length === 0 ? O : m(re[M]);
6096
6101
  }
6097
6102
  function m(re) {
6098
6103
  return xe;
@@ -6112,7 +6117,7 @@ function Dd(e, t, n) {
6112
6117
  return P($, p), E;
6113
6118
  }
6114
6119
  function fe(re) {
6115
- return p.restore(), ++L < N.length ? m(N[L]) : O;
6120
+ return p.restore(), ++M < N.length ? m(N[M]) : O;
6116
6121
  }
6117
6122
  }
6118
6123
  }
@@ -6428,7 +6433,7 @@ function rp(e) {
6428
6433
  codeFencedFenceInfo: x,
6429
6434
  codeFencedFenceMeta: _,
6430
6435
  codeFlowValue: S,
6431
- codeIndented: c(M),
6436
+ codeIndented: c(L),
6432
6437
  codeText: c(N),
6433
6438
  codeTextData: S,
6434
6439
  data: S,
@@ -6447,7 +6452,7 @@ function rp(e) {
6447
6452
  label: G,
6448
6453
  labelText: p,
6449
6454
  lineEnding: I,
6450
- link: c(L),
6455
+ link: c(M),
6451
6456
  listItem: c(),
6452
6457
  listOrdered: c(),
6453
6458
  listUnordered: c(),
@@ -6624,7 +6629,7 @@ function rp(e) {
6624
6629
  const F = this.resume(), R = this.stack[this.stack.length - 1];
6625
6630
  R.value = F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), a("flowCodeInside");
6626
6631
  }
6627
- function M() {
6632
+ function L() {
6628
6633
  const F = this.resume(), R = this.stack[this.stack.length - 1];
6629
6634
  R.value = F.replace(/(\r?\n|\r)$/g, "");
6630
6635
  }
@@ -6694,7 +6699,7 @@ function rp(e) {
6694
6699
  const F = this.resume(), R = this.stack[this.stack.length - 1];
6695
6700
  R.value = F;
6696
6701
  }
6697
- function L() {
6702
+ function M() {
6698
6703
  const F = this.stack[this.stack.length - 1];
6699
6704
  if (o("inReference")) {
6700
6705
  const R = o("referenceType") || "shortcut";
@@ -9315,16 +9320,16 @@ var Il = { exports: {} };
9315
9320
  var n = 1e3, r = 6e4, i = 36e5, a = "millisecond", o = "second", l = "minute", u = "hour", s = "day", c = "week", f = "month", b = "quarter", d = "year", C = "date", x = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, k = /\[([^\]]+)]|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, B = { 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(A) {
9316
9321
  var E = ["th", "st", "nd", "rd"], O = A % 100;
9317
9322
  return "[" + A + (E[(O - 20) % 10] || E[O] || E[0]) + "]";
9318
- } }, M = function(A, E, O) {
9323
+ } }, L = function(A, E, O) {
9319
9324
  var N = String(A);
9320
9325
  return !N || N.length >= E ? A : "" + Array(E + 1 - N.length).join(O) + A;
9321
- }, U = { s: M, z: function(A) {
9322
- var E = -A.utcOffset(), O = Math.abs(E), N = Math.floor(O / 60), L = O % 60;
9323
- return (E <= 0 ? "+" : "-") + M(N, 2, "0") + ":" + M(L, 2, "0");
9326
+ }, U = { s: L, z: function(A) {
9327
+ var E = -A.utcOffset(), O = Math.abs(E), N = Math.floor(O / 60), M = O % 60;
9328
+ return (E <= 0 ? "+" : "-") + L(N, 2, "0") + ":" + L(M, 2, "0");
9324
9329
  }, m: function A(E, O) {
9325
9330
  if (E.date() < O.date()) return -A(O, E);
9326
- var N = 12 * (O.year() - E.year()) + (O.month() - E.month()), L = E.clone().add(N, f), $ = O - L < 0, p = E.clone().add(N + ($ ? -1 : 1), f);
9327
- return +(-(N + (O - L) / ($ ? L - p : p - L)) || 0);
9331
+ var N = 12 * (O.year() - E.year()) + (O.month() - E.month()), M = E.clone().add(N, f), $ = O - M < 0, p = E.clone().add(N + ($ ? -1 : 1), f);
9332
+ return +(-(N + (O - M) / ($ ? M - p : p - M)) || 0);
9328
9333
  }, a: function(A) {
9329
9334
  return A < 0 ? Math.ceil(A) || 0 : Math.floor(A);
9330
9335
  }, p: function(A) {
@@ -9336,18 +9341,18 @@ var Il = { exports: {} };
9336
9341
  var D = "$isDayjsObject", H = function(A) {
9337
9342
  return A instanceof S || !(!A || !A[D]);
9338
9343
  }, V = function A(E, O, N) {
9339
- var L;
9344
+ var M;
9340
9345
  if (!E) return j;
9341
9346
  if (typeof E == "string") {
9342
9347
  var $ = E.toLowerCase();
9343
- v[$] && (L = $), O && (v[$] = O, L = $);
9348
+ v[$] && (M = $), O && (v[$] = O, M = $);
9344
9349
  var p = E.split("-");
9345
- if (!L && p.length > 1) return A(p[0]);
9350
+ if (!M && p.length > 1) return A(p[0]);
9346
9351
  } else {
9347
9352
  var G = E.name;
9348
- v[G] = E, L = G;
9353
+ v[G] = E, M = G;
9349
9354
  }
9350
- return !N && L && (j = L), L || !N && j;
9355
+ return !N && M && (j = M), M || !N && j;
9351
9356
  }, q = function(A, E) {
9352
9357
  if (H(A)) return A.clone();
9353
9358
  var O = typeof E == "object" ? E : {};
@@ -9363,18 +9368,18 @@ var Il = { exports: {} };
9363
9368
  var E = A.prototype;
9364
9369
  return E.parse = function(O) {
9365
9370
  this.$d = function(N) {
9366
- var L = N.date, $ = N.utc;
9367
- if (L === null) return /* @__PURE__ */ new Date(NaN);
9368
- if (P.u(L)) return /* @__PURE__ */ new Date();
9369
- if (L instanceof Date) return new Date(L);
9370
- if (typeof L == "string" && !/Z$/i.test(L)) {
9371
- var p = L.match(_);
9371
+ var M = N.date, $ = N.utc;
9372
+ if (M === null) return /* @__PURE__ */ new Date(NaN);
9373
+ if (P.u(M)) return /* @__PURE__ */ new Date();
9374
+ if (M instanceof Date) return new Date(M);
9375
+ if (typeof M == "string" && !/Z$/i.test(M)) {
9376
+ var p = M.match(_);
9372
9377
  if (p) {
9373
9378
  var G = p[2] - 1 || 0, J = (p[7] || "0").substring(0, 3);
9374
9379
  return $ ? new Date(Date.UTC(p[1], G, p[3] || 1, p[4] || 0, p[5] || 0, p[6] || 0, J)) : new Date(p[1], G, p[3] || 1, p[4] || 0, p[5] || 0, p[6] || 0, J);
9375
9380
  }
9376
9381
  }
9377
- return new Date(L);
9382
+ return new Date(M);
9378
9383
  }(O), this.init();
9379
9384
  }, E.init = function() {
9380
9385
  var O = this.$d;
@@ -9384,24 +9389,24 @@ var Il = { exports: {} };
9384
9389
  }, E.isValid = function() {
9385
9390
  return this.$d.toString() !== x;
9386
9391
  }, E.isSame = function(O, N) {
9387
- var L = q(O);
9388
- return this.startOf(N) <= L && L <= this.endOf(N);
9392
+ var M = q(O);
9393
+ return this.startOf(N) <= M && M <= this.endOf(N);
9389
9394
  }, E.isAfter = function(O, N) {
9390
9395
  return q(O) < this.startOf(N);
9391
9396
  }, E.isBefore = function(O, N) {
9392
9397
  return this.endOf(N) < q(O);
9393
- }, E.$g = function(O, N, L) {
9394
- return P.u(O) ? this[N] : this.set(L, O);
9398
+ }, E.$g = function(O, N, M) {
9399
+ return P.u(O) ? this[N] : this.set(M, O);
9395
9400
  }, E.unix = function() {
9396
9401
  return Math.floor(this.valueOf() / 1e3);
9397
9402
  }, E.valueOf = function() {
9398
9403
  return this.$d.getTime();
9399
9404
  }, E.startOf = function(O, N) {
9400
- var L = this, $ = !!P.u(N) || N, p = P.p(O), G = function(Ee, de) {
9401
- var Oe = P.w(L.$u ? Date.UTC(L.$y, de, Ee) : new Date(L.$y, de, Ee), L);
9405
+ var M = this, $ = !!P.u(N) || N, p = P.p(O), G = function(Ee, de) {
9406
+ var Oe = P.w(M.$u ? Date.UTC(M.$y, de, Ee) : new Date(M.$y, de, Ee), M);
9402
9407
  return $ ? Oe : Oe.endOf(s);
9403
9408
  }, J = function(Ee, de) {
9404
- return P.w(L.toDate()[Ee].apply(L.toDate("s"), ($ ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(de)), L);
9409
+ return P.w(M.toDate()[Ee].apply(M.toDate("s"), ($ ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(de)), M);
9405
9410
  }, m = this.$W, te = this.$M, fe = this.$D, re = "set" + (this.$u ? "UTC" : "");
9406
9411
  switch (p) {
9407
9412
  case d:
@@ -9426,7 +9431,7 @@ var Il = { exports: {} };
9426
9431
  }, E.endOf = function(O) {
9427
9432
  return this.startOf(O, !1);
9428
9433
  }, E.$set = function(O, N) {
9429
- var L, $ = P.p(O), p = "set" + (this.$u ? "UTC" : ""), G = (L = {}, L[s] = p + "Date", L[C] = p + "Date", L[f] = p + "Month", L[d] = p + "FullYear", L[u] = p + "Hours", L[l] = p + "Minutes", L[o] = p + "Seconds", L[a] = p + "Milliseconds", L)[$], J = $ === s ? this.$D + (N - this.$W) : N;
9434
+ var M, $ = P.p(O), p = "set" + (this.$u ? "UTC" : ""), G = (M = {}, M[s] = p + "Date", M[C] = p + "Date", M[f] = p + "Month", M[d] = p + "FullYear", M[u] = p + "Hours", M[l] = p + "Minutes", M[o] = p + "Seconds", M[a] = p + "Milliseconds", M)[$], J = $ === s ? this.$D + (N - this.$W) : N;
9430
9435
  if ($ === f || $ === d) {
9431
9436
  var m = this.clone().set(C, 1);
9432
9437
  m.$d[G](J), m.init(), this.$d = m.set(C, Math.min(this.$D, m.daysInMonth())).$d;
@@ -9437,7 +9442,7 @@ var Il = { exports: {} };
9437
9442
  }, E.get = function(O) {
9438
9443
  return this[P.p(O)]();
9439
9444
  }, E.add = function(O, N) {
9440
- var L, $ = this;
9445
+ var M, $ = this;
9441
9446
  O = Number(O);
9442
9447
  var p = P.p(N), G = function(te) {
9443
9448
  var fe = q($);
@@ -9447,14 +9452,14 @@ var Il = { exports: {} };
9447
9452
  if (p === d) return this.set(d, this.$y + O);
9448
9453
  if (p === s) return G(1);
9449
9454
  if (p === c) return G(7);
9450
- var J = (L = {}, L[l] = r, L[u] = i, L[o] = n, L)[p] || 1, m = this.$d.getTime() + O * J;
9455
+ var J = (M = {}, M[l] = r, M[u] = i, M[o] = n, M)[p] || 1, m = this.$d.getTime() + O * J;
9451
9456
  return P.w(m, this);
9452
9457
  }, E.subtract = function(O, N) {
9453
9458
  return this.add(-1 * O, N);
9454
9459
  }, E.format = function(O) {
9455
- var N = this, L = this.$locale();
9456
- if (!this.isValid()) return L.invalidDate || x;
9457
- var $ = O || "YYYY-MM-DDTHH:mm:ssZ", p = P.z(this), G = this.$H, J = this.$m, m = this.$M, te = L.weekdays, fe = L.months, re = L.meridiem, xe = function(de, Oe, Ae, Ye) {
9460
+ var N = this, M = this.$locale();
9461
+ if (!this.isValid()) return M.invalidDate || x;
9462
+ var $ = O || "YYYY-MM-DDTHH:mm:ssZ", p = P.z(this), G = this.$H, J = this.$m, m = this.$M, te = M.weekdays, fe = M.months, re = M.meridiem, xe = function(de, Oe, Ae, Ye) {
9458
9463
  return de && (de[Oe] || de(N, $)) || Ae[Oe].slice(0, Ye);
9459
9464
  }, ke = function(de) {
9460
9465
  return P.s(G % 12 || 12, de, "0");
@@ -9474,7 +9479,7 @@ var Il = { exports: {} };
9474
9479
  case "MM":
9475
9480
  return P.s(m + 1, 2, "0");
9476
9481
  case "MMM":
9477
- return xe(L.monthsShort, m, fe, 3);
9482
+ return xe(M.monthsShort, m, fe, 3);
9478
9483
  case "MMMM":
9479
9484
  return xe(fe, m);
9480
9485
  case "D":
@@ -9484,9 +9489,9 @@ var Il = { exports: {} };
9484
9489
  case "d":
9485
9490
  return String(N.$W);
9486
9491
  case "dd":
9487
- return xe(L.weekdaysMin, N.$W, te, 2);
9492
+ return xe(M.weekdaysMin, N.$W, te, 2);
9488
9493
  case "ddd":
9489
- return xe(L.weekdaysShort, N.$W, te, 3);
9494
+ return xe(M.weekdaysShort, N.$W, te, 3);
9490
9495
  case "dddd":
9491
9496
  return te[N.$W];
9492
9497
  case "H":
@@ -9519,7 +9524,7 @@ var Il = { exports: {} };
9519
9524
  });
9520
9525
  }, E.utcOffset = function() {
9521
9526
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
9522
- }, E.diff = function(O, N, L) {
9527
+ }, E.diff = function(O, N, M) {
9523
9528
  var $, p = this, G = P.p(N), J = q(O), m = (J.utcOffset() - this.utcOffset()) * r, te = this - J, fe = function() {
9524
9529
  return P.m(p, J);
9525
9530
  };
@@ -9551,15 +9556,15 @@ var Il = { exports: {} };
9551
9556
  default:
9552
9557
  $ = te;
9553
9558
  }
9554
- return L ? $ : P.a($);
9559
+ return M ? $ : P.a($);
9555
9560
  }, E.daysInMonth = function() {
9556
9561
  return this.endOf(f).$D;
9557
9562
  }, E.$locale = function() {
9558
9563
  return v[this.$L];
9559
9564
  }, E.locale = function(O, N) {
9560
9565
  if (!O) return this.$L;
9561
- var L = this.clone(), $ = V(O, N, !0);
9562
- return $ && (L.$L = $), L;
9566
+ var M = this.clone(), $ = V(O, N, !0);
9567
+ return $ && (M.$L = $), M;
9563
9568
  }, E.clone = function() {
9564
9569
  return P.w(this.$d, this);
9565
9570
  }, E.toDate = function() {
@@ -9672,17 +9677,18 @@ const Vh = "Sure, I can get you to someone who can help.", fn = ({
9672
9677
  Ti,
9673
9678
  {
9674
9679
  components: {
9675
- a: (M) => /* @__PURE__ */ y.jsx(
9680
+ a: (L) => /* @__PURE__ */ y.jsx(
9676
9681
  "a",
9677
9682
  {
9678
- ...M,
9683
+ ...L,
9679
9684
  role: "link",
9680
9685
  tabIndex: 0,
9681
9686
  onClick: a,
9682
9687
  onKeyDown: void 0,
9683
- children: M.children
9688
+ children: L.children
9684
9689
  }
9685
- )
9690
+ ),
9691
+ p: (L) => /* @__PURE__ */ y.jsx("p", { ...L, style: k[d].bubbleStyle, children: L.children })
9686
9692
  },
9687
9693
  linkTarget: "_blank",
9688
9694
  transformLinkUri: qh,
@@ -10606,7 +10612,7 @@ $t.useWebSocket = function(e, t, n) {
10606
10612
  }, [i]), c = Ie.useRef(null), f = Ie.useRef(null), b = Ie.useRef(function() {
10607
10613
  }), d = Ie.useRef(0), C = Ie.useRef([]), x = Ie.useRef(null), _ = Ie.useRef(t);
10608
10614
  _.current = t;
10609
- var k = c.current && l[c.current] !== void 0 ? l[c.current] : e !== null && n === !0 ? lt.ReadyState.CONNECTING : lt.ReadyState.UNINSTANTIATED, B = t.queryParams ? JSON.stringify(t.queryParams) : null, M = Ie.useCallback(function(v, D) {
10615
+ var k = c.current && l[c.current] !== void 0 ? l[c.current] : e !== null && n === !0 ? lt.ReadyState.CONNECTING : lt.ReadyState.UNINSTANTIATED, B = t.queryParams ? JSON.stringify(t.queryParams) : null, L = Ie.useCallback(function(v, D) {
10610
10616
  var H;
10611
10617
  if (D === void 0 && (D = !0), lt.isEventSourceSupported && f.current instanceof EventSource) {
10612
10618
  console.warn("Unable to send a message from an eventSource");
@@ -10614,8 +10620,8 @@ $t.useWebSocket = function(e, t, n) {
10614
10620
  }
10615
10621
  ((H = f.current) === null || H === void 0 ? void 0 : H.readyState) === lt.ReadyState.OPEN ? (to.assertIsWebSocket(f.current), f.current.send(v)) : D && C.current.push(v);
10616
10622
  }, []), U = Ie.useCallback(function(v, D) {
10617
- D === void 0 && (D = !0), M(JSON.stringify(v), D);
10618
- }, [M]), j = Ie.useCallback(function() {
10623
+ D === void 0 && (D = !0), L(JSON.stringify(v), D);
10624
+ }, [L]), j = Ie.useCallback(function() {
10619
10625
  return _.current.share !== !0 || lt.isEventSourceSupported && f.current instanceof EventSource ? f.current : (x.current === null && f.current && (to.assertIsWebSocket(f.current), x.current = v0.default(f.current, b)), x.current);
10620
10626
  }, []);
10621
10627
  return Ie.useEffect(function() {
@@ -10635,7 +10641,7 @@ $t.useWebSocket = function(e, t, n) {
10635
10641
  var E;
10636
10642
  return jt(jt({}, A), c.current && (E = {}, E[c.current] = I, E));
10637
10643
  });
10638
- }, v = y0.createOrJoinSocket(f, c.current, P, _, q, b, d, M), [
10644
+ }, v = y0.createOrJoinSocket(f, c.current, P, _, q, b, d, L), [
10639
10645
  2
10640
10646
  /*return*/
10641
10647
  ];
@@ -10652,12 +10658,12 @@ $t.useWebSocket = function(e, t, n) {
10652
10658
  var q;
10653
10659
  return jt(jt({}, V), c.current && (q = {}, q[c.current] = lt.ReadyState.CLOSED, q));
10654
10660
  }));
10655
- }, [e, n, B, M]), Ie.useEffect(function() {
10661
+ }, [e, n, B, L]), Ie.useEffect(function() {
10656
10662
  k === lt.ReadyState.OPEN && C.current.splice(0).forEach(function(v) {
10657
- M(v);
10663
+ L(v);
10658
10664
  });
10659
10665
  }, [k]), {
10660
- sendMessage: M,
10666
+ sendMessage: L,
10661
10667
  sendJsonMessage: U,
10662
10668
  lastMessage: i,
10663
10669
  lastJsonMessage: s,
@@ -10787,8 +10793,8 @@ const T0 = "This conversation with a live agent has ended. Please note that a tr
10787
10793
  CONVERSATION: "CONVERSATION",
10788
10794
  FORM: "FORM"
10789
10795
  }, Pt = $n({}), Ml = ({ children: e }) => {
10790
- const { conversationScreen: t } = ne(Te), { pushXpertMessage: n } = ne(Un), { setHasError: r, setMode: i } = ne(je), [a, o] = ee(""), [l, u] = ee(!1), [, s] = ee(""), [c, f] = ee([]), [b, d] = ee(null), [C, x] = ee(st.FORM), [_, k] = ee(null), B = (N) => f((L) => [...L, N]), M = async (N) => {
10791
- const L = await E0(N.data), { conversation_id: $, event_type: p, body: G } = L;
10796
+ const { conversationScreen: t } = ne(Te), { pushXpertMessage: n } = ne(Un), { setHasError: r, setMode: i } = ne(je), [a, o] = ee(""), [l, u] = ee(!1), [, s] = ee(""), [c, f] = ee([]), [b, d] = ee(null), [C, x] = ee(st.FORM), [_, k] = ee(null), B = (N) => f((M) => [...M, N]), L = async (N) => {
10797
+ const M = await E0(N.data), { conversation_id: $, event_type: p, body: G } = M;
10792
10798
  switch (p) {
10793
10799
  case "AGENT_TYPING":
10794
10800
  return V();
@@ -10814,7 +10820,7 @@ const T0 = "This conversation with a live agent has ended. Please note that a tr
10814
10820
  return;
10815
10821
  }
10816
10822
  }, { sendJsonMessage: U } = _0(b, {
10817
- onMessage: M
10823
+ onMessage: L
10818
10824
  }), j = () => {
10819
10825
  x(st.FORM);
10820
10826
  }, v = () => {
@@ -10836,20 +10842,20 @@ const T0 = "This conversation with a live agent has ended. Please note that a tr
10836
10842
  }, 5e3);
10837
10843
  k(N);
10838
10844
  }, q = (N) => {
10839
- const { displayName: L } = N;
10840
- f([]), o(L ?? "An agent"), x(st.CONVERSATION);
10845
+ const { displayName: M } = N;
10846
+ f([]), o(M ?? "An agent"), x(st.CONVERSATION);
10841
10847
  }, P = (N) => {
10842
- const { messageId: L, text: $, timestamp: p } = N;
10848
+ const { messageId: M, text: $, timestamp: p } = N;
10843
10849
  B({
10844
10850
  content: $ ?? "",
10845
- id: L ?? "",
10851
+ id: M ?? "",
10846
10852
  role: "agent",
10847
10853
  timestamp: p ? new Date(p) : void 0
10848
10854
  }), U({
10849
10855
  action: "sendmessage",
10850
10856
  messages: [
10851
10857
  {
10852
- messageId: L,
10858
+ messageId: M,
10853
10859
  type: "DELIVERED"
10854
10860
  }
10855
10861
  ],
@@ -10884,10 +10890,10 @@ const T0 = "This conversation with a live agent has ended. Please note that a tr
10884
10890
  step: C,
10885
10891
  setStep: x,
10886
10892
  startLiveChat: (N) => {
10887
- var L;
10893
+ var M;
10888
10894
  try {
10889
10895
  x(st.CONNECTING), d(
10890
- `${(L = t == null ? void 0 : t.liveChat) == null ? void 0 : L.socketUrl}?${new URLSearchParams(N).toString()}`
10896
+ `${(M = t == null ? void 0 : t.liveChat) == null ? void 0 : M.socketUrl}?${new URLSearchParams(N).toString()}`
10891
10897
  );
10892
10898
  } catch {
10893
10899
  r(!0), H();
@@ -11070,7 +11076,7 @@ function Rl({
11070
11076
  setIsMounted: n,
11071
11077
  onClose: r
11072
11078
  }) {
11073
- var s, c, f, b, d, C, x, _, k, B, M, U, j, v, D;
11079
+ var s, c, f, b, d, C, x, _, k, B, L, U, j, v, D;
11074
11080
  const { primaryColor: i, conversationScreen: a } = ne(Te), { isMobile: o, mode: l } = ne(je), { step: u } = ne(Pt);
11075
11081
  return u === st.CONNECTING && l === _t.LIVECHAT ? null : /* @__PURE__ */ y.jsxs(
11076
11082
  "div",
@@ -11108,7 +11114,7 @@ function Rl({
11108
11114
  Ai,
11109
11115
  {
11110
11116
  backgroundColor: (k = a == null ? void 0 : a.header.logo.style) == null ? void 0 : k.backgroundColor,
11111
- textColor: ((U = (M = (B = a == null ? void 0 : a.header) == null ? void 0 : B.logo) == null ? void 0 : M.style) == null ? void 0 : U.color) || "#FFFFFF"
11117
+ textColor: ((U = (L = (B = a == null ? void 0 : a.header) == null ? void 0 : B.logo) == null ? void 0 : L.style) == null ? void 0 : U.color) || "#FFFFFF"
11112
11118
  }
11113
11119
  ),
11114
11120
  /* @__PURE__ */ y.jsx(
@@ -11479,8 +11485,8 @@ var so = {
11479
11485
  // web components if the `tabbableOptions.getShadowRoot` option was used for
11480
11486
  // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
11481
11487
  // look inside web components even if open)
11482
- (A == null ? void 0 : A.includes(O)) || N.find(function(L) {
11483
- return L === S;
11488
+ (A == null ? void 0 : A.includes(O)) || N.find(function(M) {
11489
+ return M === S;
11484
11490
  });
11485
11491
  });
11486
11492
  }, c = function(S) {
@@ -11517,7 +11523,7 @@ var so = {
11517
11523
  if (o.containerGroups = o.containers.map(function(S) {
11518
11524
  var I = Vl(S, a.tabbableOptions), A = Wl(S, a.tabbableOptions), E = I.length > 0 ? I[0] : void 0, O = I.length > 0 ? I[I.length - 1] : void 0, N = A.find(function(p) {
11519
11525
  return wt(p);
11520
- }), L = A.slice().reverse().find(function(p) {
11526
+ }), M = A.slice().reverse().find(function(p) {
11521
11527
  return wt(p);
11522
11528
  }), $ = !!I.find(function(p) {
11523
11529
  return ht(p) > 0;
@@ -11542,7 +11548,7 @@ var so = {
11542
11548
  /** First tabbable node in container, __DOM__ order; `undefined` if none. */
11543
11549
  firstDomTabbableNode: N,
11544
11550
  /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
11545
- lastDomTabbableNode: L,
11551
+ lastDomTabbableNode: M,
11546
11552
  /**
11547
11553
  * Finds the __tabbable__ node that follows the given node in the specified direction,
11548
11554
  * in this container, if any.
@@ -11590,15 +11596,15 @@ var so = {
11590
11596
  I = I || wn(A), b();
11591
11597
  var N = null;
11592
11598
  if (o.tabbableGroups.length > 0) {
11593
- var L = s(I, A), $ = L >= 0 ? o.containerGroups[L] : void 0;
11594
- if (L < 0)
11599
+ var M = s(I, A), $ = M >= 0 ? o.containerGroups[M] : void 0;
11600
+ if (M < 0)
11595
11601
  O ? N = o.tabbableGroups[o.tabbableGroups.length - 1].lastTabbableNode : N = o.tabbableGroups[0].firstTabbableNode;
11596
11602
  else if (O) {
11597
11603
  var p = co(o.tabbableGroups, function(re) {
11598
11604
  var xe = re.firstTabbableNode;
11599
11605
  return I === xe;
11600
11606
  });
11601
- if (p < 0 && ($.container === I || Tn(I, a.tabbableOptions) && !wt(I, a.tabbableOptions) && !$.nextTabbableNode(I, !1)) && (p = L), p >= 0) {
11607
+ if (p < 0 && ($.container === I || Tn(I, a.tabbableOptions) && !wt(I, a.tabbableOptions) && !$.nextTabbableNode(I, !1)) && (p = M), p >= 0) {
11602
11608
  var G = p === 0 ? o.tabbableGroups.length - 1 : p - 1, J = o.tabbableGroups[G];
11603
11609
  N = ht(I) >= 0 ? J.lastTabbableNode : J.lastDomTabbableNode;
11604
11610
  } else rn(A) || (N = $.nextTabbableNode(I, !1));
@@ -11607,7 +11613,7 @@ var so = {
11607
11613
  var xe = re.lastTabbableNode;
11608
11614
  return I === xe;
11609
11615
  });
11610
- if (m < 0 && ($.container === I || Tn(I, a.tabbableOptions) && !wt(I, a.tabbableOptions) && !$.nextTabbableNode(I)) && (m = L), m >= 0) {
11616
+ if (m < 0 && ($.container === I || Tn(I, a.tabbableOptions) && !wt(I, a.tabbableOptions) && !$.nextTabbableNode(I)) && (m = M), m >= 0) {
11611
11617
  var te = m === o.tabbableGroups.length - 1 ? 0 : m + 1, fe = o.tabbableGroups[te];
11612
11618
  N = ht(I) >= 0 ? fe.firstTabbableNode : fe.firstDomTabbableNode;
11613
11619
  } else rn(A) || (N = $.nextTabbableNode(I));
@@ -11641,12 +11647,12 @@ var so = {
11641
11647
  var E, O = !0;
11642
11648
  if (o.mostRecentlyFocusedNode)
11643
11649
  if (ht(o.mostRecentlyFocusedNode) > 0) {
11644
- var N = s(o.mostRecentlyFocusedNode), L = o.containerGroups[N].tabbableNodes;
11645
- if (L.length > 0) {
11646
- var $ = L.findIndex(function(p) {
11650
+ var N = s(o.mostRecentlyFocusedNode), M = o.containerGroups[N].tabbableNodes;
11651
+ if (M.length > 0) {
11652
+ var $ = M.findIndex(function(p) {
11647
11653
  return p === o.mostRecentlyFocusedNode;
11648
11654
  });
11649
- $ >= 0 && (a.isKeyForward(o.recentNavEvent) ? $ + 1 < L.length && (E = L[$ + 1], O = !1) : $ - 1 >= 0 && (E = L[$ - 1], O = !1));
11655
+ $ >= 0 && (a.isKeyForward(o.recentNavEvent) ? $ + 1 < M.length && (E = M[$ + 1], O = !1) : $ - 1 >= 0 && (E = M[$ - 1], O = !1));
11650
11656
  }
11651
11657
  } else
11652
11658
  o.containerGroups.some(function(p) {
@@ -11664,7 +11670,7 @@ var so = {
11664
11670
  })), C(E || o.mostRecentlyFocusedNode || f());
11665
11671
  }
11666
11672
  o.recentNavEvent = void 0;
11667
- }, M = function(S) {
11673
+ }, L = function(S) {
11668
11674
  var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
11669
11675
  o.recentNavEvent = S;
11670
11676
  var A = _({
@@ -11677,7 +11683,7 @@ var so = {
11677
11683
  S.preventDefault(), l.deactivate();
11678
11684
  return;
11679
11685
  }
11680
- (a.isKeyForward(S) || a.isKeyBackward(S)) && M(S, a.isKeyBackward(S));
11686
+ (a.isKeyForward(S) || a.isKeyBackward(S)) && L(S, a.isKeyBackward(S));
11681
11687
  }, j = function(S) {
11682
11688
  var I = wn(S);
11683
11689
  s(I, S) >= 0 || Zt(a.clickOutsideDeactivates, S) || Zt(a.allowOutsideClick, S) || (S.preventDefault(), S.stopImmediatePropagation());
@@ -11745,12 +11751,12 @@ var so = {
11745
11751
  clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, D(), o.active = !1, o.paused = !1, q(), so.deactivateTrap(i, l);
11746
11752
  var A = u(I, "onDeactivate"), E = u(I, "onPostDeactivate"), O = u(I, "checkCanReturnFocus"), N = u(I, "returnFocus", "returnFocusOnDeactivate");
11747
11753
  A == null || A();
11748
- var L = function() {
11754
+ var M = function() {
11749
11755
  uo(function() {
11750
11756
  N && C(x(o.nodeFocusedBeforeActivation)), E == null || E();
11751
11757
  });
11752
11758
  };
11753
- return N && O ? (O(x(o.nodeFocusedBeforeActivation)).then(L, L), this) : (L(), this);
11759
+ return N && O ? (O(x(o.nodeFocusedBeforeActivation)).then(M, M), this) : (M(), this);
11754
11760
  },
11755
11761
  pause: function(S) {
11756
11762
  if (o.paused || !o.active)
@@ -12408,7 +12414,7 @@ function Di() {
12408
12414
  }, B = (j, v) => {
12409
12415
  const D = j.target.value;
12410
12416
  b(v), s(v, D);
12411
- }, M = () => {
12417
+ }, L = () => {
12412
12418
  U() && n(u);
12413
12419
  }, U = () => {
12414
12420
  const j = i.reduce((v, D) => {
@@ -12499,7 +12505,7 @@ function Di() {
12499
12505
  {
12500
12506
  className: "live-chat-start-button",
12501
12507
  style: { backgroundColor: t },
12502
- onClick: M,
12508
+ onClick: L,
12503
12509
  children: "Start chat"
12504
12510
  }
12505
12511
  )
@@ -12708,7 +12714,7 @@ function Bi({ submitEventExternal: e }) {
12708
12714
  setHasNewMessage: _,
12709
12715
  setIsNormalSize: k,
12710
12716
  setLoading: B
12711
- } = ne(je), [, M] = ee(!1), [, U] = ee(!1), [j, v] = ee(!1), [D, H] = ee(!1), [V, q] = ee(""), [P, S] = ee(!1), I = Ue(null), A = Ue(null), E = Ue(null), O = Le.get(`${u}-test`) === "1";
12717
+ } = ne(je), [, L] = ee(!1), [, U] = ee(!1), [j, v] = ee(!1), [D, H] = ee(!1), [V, q] = ee(""), [P, S] = ee(!1), I = Ue(null), A = Ue(null), E = Ue(null), O = Le.get(`${u}-test`) === "1";
12712
12718
  Tm(
12713
12719
  (It = r == null ? void 0 : r.liveChat) == null ? void 0 : It.enabled,
12714
12720
  D,
@@ -12730,7 +12736,7 @@ function Bi({ submitEventExternal: e }) {
12730
12736
  o == null ? void 0 : o.enabled,
12731
12737
  o == null ? void 0 : o.payloadParams
12732
12738
  ]
12733
- ), L = St(async () => {
12739
+ ), M = St(async () => {
12734
12740
  if (window != null && window.OnetrustActiveGroups && window.OnetrustActiveGroups.split(",").includes("C0003"))
12735
12741
  try {
12736
12742
  const Z = Le.get(
@@ -12774,12 +12780,12 @@ function Bi({ submitEventExternal: e }) {
12774
12780
  C,
12775
12781
  _
12776
12782
  ]);
12777
- Pm(L), Se(() => {
12783
+ Pm(M), Se(() => {
12778
12784
  let Z, ae;
12779
12785
  if (n)
12780
12786
  return o != null && o.enabled && (Z = setInterval(() => {
12781
12787
  var we;
12782
- console.log("Chatbot - Finding Segment"), ((we = window.analytics) != null && we.track || e) && (console.log("Chatbot - Segment found"), E.current = window.analytics, clearInterval(Z), clearTimeout(ae), M(!0));
12788
+ console.log("Chatbot - Finding Segment"), ((we = window.analytics) != null && we.track || e) && (console.log("Chatbot - Segment found"), E.current = window.analytics, clearInterval(Z), clearTimeout(ae), L(!0));
12783
12789
  }, 1e3), ae = setTimeout(() => {
12784
12790
  clearInterval(Z);
12785
12791
  }, 6e4)), () => {
@@ -12994,7 +13000,7 @@ function Bi({ submitEventExternal: e }) {
12994
13000
  feedbackThumbType: ae
12995
13001
  }) : we);
12996
13002
  c(ye), C(!1);
12997
- }, Ae = ((yt = i == null ? void 0 : i.animatedGraduate) == null ? void 0 : yt.enabled) && l.enabled && p === "A", Ye = a != null && a.enabled ? b ? (bt = a == null ? void 0 : a.style) == null ? void 0 : bt.mobile : a == null ? void 0 : a.style : null;
13003
+ }, Ae = (yt = i.animatedGraduate) == null ? void 0 : yt.enabled, Ye = a != null && a.enabled ? b ? (bt = a == null ? void 0 : a.style) == null ? void 0 : bt.mobile : a == null ? void 0 : a.style : null;
12998
13004
  return (
12999
13005
  // do not remove this class as it's needed to turn off chatbot
13000
13006
  /* @__PURE__ */ y.jsxs("div", { className: "xpert_chatbot", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2uinc/frontend-component-xpert-chatbot",
3
- "version": "1.20.2",
3
+ "version": "1.21.0-beta.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/2uinc/frontend-component-xpert-chatbot.git"