@telia-ace/widget-conversation-flamingo 1.1.76-rc.2 → 1.1.76-rc.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.js +47 -30
  2. package/index.mjs +187 -155
  3. package/package.json +2 -2
package/index.mjs CHANGED
@@ -184,8 +184,8 @@ function se(s, e, t) {
184
184
  (r || !(n in e)) && (r || (r = Array.prototype.slice.call(e, 0, n)), r[n] = e[n]);
185
185
  return s.concat(r || Array.prototype.slice.call(e));
186
186
  }
187
- function pe(s) {
188
- return this instanceof pe ? (this.v = s, this) : new pe(s);
187
+ function de(s) {
188
+ return this instanceof de ? (this.v = s, this) : new de(s);
189
189
  }
190
190
  function Oi(s, e, t) {
191
191
  if (!Symbol.asyncIterator)
@@ -194,31 +194,31 @@ function Oi(s, e, t) {
194
194
  return i = {}, o("next"), o("throw"), o("return"), i[Symbol.asyncIterator] = function() {
195
195
  return this;
196
196
  }, i;
197
- function o(p) {
198
- n[p] && (i[p] = function(d) {
197
+ function o(d) {
198
+ n[d] && (i[d] = function(p) {
199
199
  return new Promise(function(b, f) {
200
- r.push([p, d, b, f]) > 1 || a(p, d);
200
+ r.push([d, p, b, f]) > 1 || a(d, p);
201
201
  });
202
202
  });
203
203
  }
204
- function a(p, d) {
204
+ function a(d, p) {
205
205
  try {
206
- l(n[p](d));
206
+ l(n[d](p));
207
207
  } catch (b) {
208
208
  u(r[0][3], b);
209
209
  }
210
210
  }
211
- function l(p) {
212
- p.value instanceof pe ? Promise.resolve(p.value.v).then(c, h) : u(r[0][2], p);
211
+ function l(d) {
212
+ d.value instanceof de ? Promise.resolve(d.value.v).then(c, h) : u(r[0][2], d);
213
213
  }
214
- function c(p) {
215
- a("next", p);
214
+ function c(d) {
215
+ a("next", d);
216
216
  }
217
- function h(p) {
218
- a("throw", p);
217
+ function h(d) {
218
+ a("throw", d);
219
219
  }
220
- function u(p, d) {
221
- p(d), r.shift(), r.length && a(r[0][0], r[0][1]);
220
+ function u(d, p) {
221
+ d(p), r.shift(), r.length && a(r[0][0], r[0][1]);
222
222
  }
223
223
  }
224
224
  function Pi(s) {
@@ -304,8 +304,8 @@ var at = function() {
304
304
  if (u) {
305
305
  this._finalizers = null;
306
306
  try {
307
- for (var p = me(u), d = p.next(); !d.done; d = p.next()) {
308
- var b = d.value;
307
+ for (var d = me(u), p = d.next(); !p.done; p = d.next()) {
308
+ var b = p.value;
309
309
  try {
310
310
  _n(b);
311
311
  } catch (f) {
@@ -316,7 +316,7 @@ var at = function() {
316
316
  n = { error: f };
317
317
  } finally {
318
318
  try {
319
- d && !d.done && (i = p.return) && i.call(p);
319
+ p && !p.done && (i = d.return) && i.call(d);
320
320
  } finally {
321
321
  if (n)
322
322
  throw n.error;
@@ -805,13 +805,13 @@ function Es(s) {
805
805
  case 1:
806
806
  o.trys.push([1, , 9, 10]), o.label = 2;
807
807
  case 2:
808
- return [4, pe(t.read())];
808
+ return [4, de(t.read())];
809
809
  case 3:
810
- return n = o.sent(), i = n.value, r = n.done, r ? [4, pe(void 0)] : [3, 5];
810
+ return n = o.sent(), i = n.value, r = n.done, r ? [4, de(void 0)] : [3, 5];
811
811
  case 4:
812
812
  return [2, o.sent()];
813
813
  case 5:
814
- return [4, pe(i)];
814
+ return [4, de(i)];
815
815
  case 6:
816
816
  return [4, o.sent()];
817
817
  case 7:
@@ -1090,19 +1090,19 @@ function hr(s) {
1090
1090
  function ur(s) {
1091
1091
  return s && typeof s == "object" && ar(s) === lr;
1092
1092
  }
1093
- function pr(s, e) {
1093
+ function dr(s, e) {
1094
1094
  return s.reduce(function(t, n, i) {
1095
1095
  return t[n] = e[i], t;
1096
1096
  }, {});
1097
1097
  }
1098
- function dr() {
1098
+ function pr() {
1099
1099
  for (var s = [], e = 0; e < arguments.length; e++)
1100
1100
  s[e] = arguments[e];
1101
1101
  var t = Gt(s), n = xs(s), i = hr(s), r = i.args, o = i.keys;
1102
1102
  if (r.length === 0)
1103
1103
  return lt([], t);
1104
1104
  var a = new A(fr(r, t, o ? function(l) {
1105
- return pr(o, l);
1105
+ return dr(o, l);
1106
1106
  } : Pe));
1107
1107
  return n ? a.pipe(Is(n)) : a;
1108
1108
  }
@@ -1111,9 +1111,9 @@ function fr(s, e, t) {
1111
1111
  An(e, function() {
1112
1112
  for (var i = s.length, r = new Array(i), o = i, a = i, l = function(h) {
1113
1113
  An(e, function() {
1114
- var u = lt(s[h], e), p = !1;
1115
- u.subscribe(P(n, function(d) {
1116
- r[h] = d, p || (p = !0, a--), a || n.next(t(r.slice()));
1114
+ var u = lt(s[h], e), d = !1;
1115
+ u.subscribe(P(n, function(p) {
1116
+ r[h] = p, d || (d = !0, a--), a || n.next(t(r.slice()));
1117
1117
  }, function() {
1118
1118
  --o || n.complete();
1119
1119
  }));
@@ -1127,15 +1127,15 @@ function An(s, e, t) {
1127
1127
  s ? q(t, s, e) : e();
1128
1128
  }
1129
1129
  function gr(s, e, t, n, i, r, o, a) {
1130
- var l = [], c = 0, h = 0, u = !1, p = function() {
1130
+ var l = [], c = 0, h = 0, u = !1, d = function() {
1131
1131
  u && !l.length && !c && e.complete();
1132
- }, d = function(f) {
1132
+ }, p = function(f) {
1133
1133
  return c < n ? b(f) : l.push(f);
1134
1134
  }, b = function(f) {
1135
1135
  r && e.next(f), c++;
1136
1136
  var I = !1;
1137
1137
  B(t(f, h++)).subscribe(P(e, function(N) {
1138
- i == null || i(N), r ? d(N) : e.next(N);
1138
+ i == null || i(N), r ? p(N) : e.next(N);
1139
1139
  }, function() {
1140
1140
  I = !0;
1141
1141
  }, void 0, function() {
@@ -1149,14 +1149,14 @@ function gr(s, e, t, n, i, r, o, a) {
1149
1149
  }) : b(J);
1150
1150
  }; l.length && c < n; )
1151
1151
  N();
1152
- p();
1152
+ d();
1153
1153
  } catch (J) {
1154
1154
  e.error(J);
1155
1155
  }
1156
1156
  }));
1157
1157
  };
1158
- return s.subscribe(P(e, d, function() {
1159
- u = !0, p();
1158
+ return s.subscribe(P(e, p, function() {
1159
+ u = !0, d();
1160
1160
  })), function() {
1161
1161
  a == null || a();
1162
1162
  };
@@ -1231,7 +1231,7 @@ function Mt(s) {
1231
1231
  }));
1232
1232
  });
1233
1233
  }
1234
- function de(s, e) {
1234
+ function pe(s, e) {
1235
1235
  return K(function(t, n) {
1236
1236
  var i = null, r = 0, o = !1, a = function() {
1237
1237
  return o && !i && n.complete();
@@ -1264,15 +1264,15 @@ function Ut() {
1264
1264
  for (var r = s.length, o = new Array(r), a = s.map(function() {
1265
1265
  return !1;
1266
1266
  }), l = !1, c = function(u) {
1267
- B(s[u]).subscribe(P(i, function(p) {
1268
- o[u] = p, !l && !a[u] && (a[u] = !0, (l = a.every(Pe)) && (a = null));
1267
+ B(s[u]).subscribe(P(i, function(d) {
1268
+ o[u] = d, !l && !a[u] && (a[u] = !0, (l = a.every(Pe)) && (a = null));
1269
1269
  }, Ye));
1270
1270
  }, h = 0; h < r; h++)
1271
1271
  c(h);
1272
1272
  n.subscribe(P(i, function(u) {
1273
1273
  if (l) {
1274
- var p = se([u], Q(o));
1275
- i.next(t ? t.apply(void 0, se([], Q(p))) : p);
1274
+ var d = se([u], Q(o));
1275
+ i.next(t ? t.apply(void 0, se([], Q(d))) : d);
1276
1276
  }
1277
1277
  }));
1278
1278
  });
@@ -1313,13 +1313,13 @@ function _r(s) {
1313
1313
  if (!o)
1314
1314
  return t;
1315
1315
  const a = o[1], c = (o[2] || "/").split("?")[0], h = c.split("/").pop(), u = i - a.length;
1316
- let p = c;
1317
- h && h.length < u && c.length > u ? p = c.substring(
1316
+ let d = c;
1317
+ h && h.length < u && c.length > u ? d = c.substring(
1318
1318
  0,
1319
1319
  u - h.length - 4
1320
- ) + ".../" + h : p = c.substring(0, u - 3) + "...";
1321
- const d = `${a}${p}`;
1322
- return jt(t, d);
1320
+ ) + ".../" + h : d = c.substring(0, u - 3) + "...";
1321
+ const p = `${a}${d}`;
1322
+ return jt(t, p);
1323
1323
  }
1324
1324
  return jt(t, n);
1325
1325
  });
@@ -1813,11 +1813,11 @@ const Br = (s, e) => {
1813
1813
  let i, r = e === 2 ? "<svg>" : "", o = $e;
1814
1814
  for (let a = 0; a < t; a++) {
1815
1815
  const l = s[a];
1816
- let c, h, u = -1, p = 0;
1817
- for (; p < l.length && (o.lastIndex = p, h = o.exec(l), h !== null); )
1818
- p = o.lastIndex, o === $e ? h[1] === "!--" ? o = In : h[1] !== void 0 ? o = Mn : h[2] !== void 0 ? (Bs.test(h[2]) && (i = RegExp("</" + h[2], "g")), o = ee) : h[3] !== void 0 && (o = ee) : o === ee ? h[0] === ">" ? (o = i ?? $e, u = -1) : h[1] === void 0 ? u = -2 : (u = o.lastIndex - h[2].length, c = h[1], o = h[3] === void 0 ? ee : h[3] === '"' ? Un : zn) : o === Un || o === zn ? o = ee : o === In || o === Mn ? o = $e : (o = ee, i = void 0);
1819
- const d = o === ee && s[a + 1].startsWith("/>") ? " " : "";
1820
- r += o === $e ? l + jr : u >= 0 ? (n.push(c), l.slice(0, u) + js + l.slice(u) + Z + d) : l + Z + (u === -2 ? a : d);
1816
+ let c, h, u = -1, d = 0;
1817
+ for (; d < l.length && (o.lastIndex = d, h = o.exec(l), h !== null); )
1818
+ d = o.lastIndex, o === $e ? h[1] === "!--" ? o = In : h[1] !== void 0 ? o = Mn : h[2] !== void 0 ? (Bs.test(h[2]) && (i = RegExp("</" + h[2], "g")), o = ee) : h[3] !== void 0 && (o = ee) : o === ee ? h[0] === ">" ? (o = i ?? $e, u = -1) : h[1] === void 0 ? u = -2 : (u = o.lastIndex - h[2].length, c = h[1], o = h[3] === void 0 ? ee : h[3] === '"' ? Un : zn) : o === Un || o === zn ? o = ee : o === In || o === Mn ? o = $e : (o = ee, i = void 0);
1819
+ const p = o === ee && s[a + 1].startsWith("/>") ? " " : "";
1820
+ r += o === $e ? l + jr : u >= 0 ? (n.push(c), l.slice(0, u) + js + l.slice(u) + Z + p) : l + Z + (u === -2 ? a : p);
1821
1821
  }
1822
1822
  return [Ns(s, r + (s[t] || "<?>") + (e === 2 ? "</svg>" : "")), n];
1823
1823
  };
@@ -1836,17 +1836,17 @@ class Te {
1836
1836
  if (i.hasAttributes())
1837
1837
  for (const u of i.getAttributeNames())
1838
1838
  if (u.endsWith(js)) {
1839
- const p = h[o++], d = i.getAttribute(u).split(Z), b = /([.?@])?(.*)/.exec(p);
1840
- l.push({ type: 1, index: r, name: b[2], strings: d, ctor: b[1] === "." ? Fr : b[1] === "?" ? qr : b[1] === "@" ? Zr : ht }), i.removeAttribute(u);
1839
+ const d = h[o++], p = i.getAttribute(u).split(Z), b = /([.?@])?(.*)/.exec(d);
1840
+ l.push({ type: 1, index: r, name: b[2], strings: p, ctor: b[1] === "." ? Fr : b[1] === "?" ? qr : b[1] === "@" ? Zr : ht }), i.removeAttribute(u);
1841
1841
  } else
1842
1842
  u.startsWith(Z) && (l.push({ type: 6, index: r }), i.removeAttribute(u));
1843
1843
  if (Bs.test(i.tagName)) {
1844
- const u = i.textContent.split(Z), p = u.length - 1;
1845
- if (p > 0) {
1844
+ const u = i.textContent.split(Z), d = u.length - 1;
1845
+ if (d > 0) {
1846
1846
  i.textContent = Xe ? Xe.emptyScript : "";
1847
- for (let d = 0; d < p; d++)
1848
- i.append(u[d], Ae()), ne.nextNode(), l.push({ type: 2, index: ++r });
1849
- i.append(u[p], Ae());
1847
+ for (let p = 0; p < d; p++)
1848
+ i.append(u[p], Ae()), ne.nextNode(), l.push({ type: 2, index: ++r });
1849
+ i.append(u[d], Ae());
1850
1850
  }
1851
1851
  }
1852
1852
  } else if (i.nodeType === 8)
@@ -2077,8 +2077,8 @@ let k = class extends le {
2077
2077
  return G;
2078
2078
  }
2079
2079
  };
2080
- var ds;
2081
- k._$litElement$ = !0, k.finalized = !0, (ds = globalThis.litElementHydrateSupport) == null || ds.call(globalThis, { LitElement: k });
2080
+ var ps;
2081
+ k._$litElement$ = !0, k.finalized = !0, (ps = globalThis.litElementHydrateSupport) == null || ps.call(globalThis, { LitElement: k });
2082
2082
  const Ct = globalThis.litElementPolyfillSupport;
2083
2083
  Ct == null || Ct({ LitElement: k });
2084
2084
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
@@ -2167,7 +2167,7 @@ const Qr = { name: "alert", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.
2167
2167
  attachStyles: !0
2168
2168
  };
2169
2169
  let he, Fs, ut, qs = !1, Ve = !1, tn = !1, T = !1, Bn = null, Dt = !1;
2170
- const pt = typeof window < "u" ? window : {}, H = pt.document || { head: {} }, Zs = pt.HTMLElement || class {
2170
+ const dt = typeof window < "u" ? window : {}, H = dt.document || { head: {} }, Zs = dt.HTMLElement || class {
2171
2171
  }, S = {
2172
2172
  $flags$: 0,
2173
2173
  $resourcesUrl$: "",
@@ -2204,7 +2204,7 @@ const pt = typeof window < "u" ? window : {}, H = pt.document || { head: {} }, Z
2204
2204
  } catch (n) {
2205
2205
  Me(n);
2206
2206
  }
2207
- }, ro = (s, e) => e & 4 ? H : e & 8 ? pt : e & 16 ? H.body : s, oo = (s) => to ? {
2207
+ }, ro = (s, e) => e & 4 ? H : e & 8 ? dt : e & 16 ? H.body : s, oo = (s) => to ? {
2208
2208
  passive: (s & 1) !== 0,
2209
2209
  capture: (s & 2) !== 0
2210
2210
  } : (s & 2) !== 0, Nn = "http://www.w3.org/1999/xlink", re = (s, e = "") => () => {
@@ -2227,14 +2227,14 @@ const pt = typeof window < "u" ? window : {}, H = pt.document || { head: {} }, Z
2227
2227
  }, Ys = (s, e) => "sc-" + (e && s.$flags$ & 32 ? s.$tagName$ + "-" + e : s.$tagName$), ho = (s) => Do.map((e) => e(s)).find((e) => !!e), qn = {}, uo = "http://www.w3.org/2000/svg", po = "http://www.w3.org/1999/xhtml", fo = (s) => s != null, nn = (s) => (s = typeof s, s === "object" || s === "function"), fe = (s, e, ...t) => {
2228
2228
  let n = null, i = null, r = null, o = !1, a = !1, l = [];
2229
2229
  const c = (u) => {
2230
- for (let p = 0; p < u.length; p++)
2231
- n = u[p], Array.isArray(n) ? c(n) : n != null && typeof n != "boolean" && ((o = typeof s != "function" && !nn(n)) && (n = String(n)), o && a ? l[l.length - 1].$text$ += n : l.push(o ? Je(null, n) : n), a = o);
2230
+ for (let d = 0; d < u.length; d++)
2231
+ n = u[d], Array.isArray(n) ? c(n) : n != null && typeof n != "boolean" && ((o = typeof s != "function" && !nn(n)) && (n = String(n)), o && a ? l[l.length - 1].$text$ += n : l.push(o ? Je(null, n) : n), a = o);
2232
2232
  };
2233
2233
  if (c(t), e) {
2234
2234
  e.key && (i = e.key), e.name && (r = e.name);
2235
2235
  {
2236
2236
  const u = e.className || e.class;
2237
- u && (e.class = typeof u != "object" ? u : Object.keys(u).filter((p) => u[p]).join(" "));
2237
+ u && (e.class = typeof u != "object" ? u : Object.keys(u).filter((d) => u[d]).join(" "));
2238
2238
  }
2239
2239
  }
2240
2240
  if (typeof s == "function")
@@ -2282,7 +2282,7 @@ const pt = typeof window < "u" ? window : {}, H = pt.document || { head: {} }, Z
2282
2282
  if (e === "ref")
2283
2283
  n && n(s);
2284
2284
  else if (!s.__lookupSetter__(e) && e[0] === "o" && e[1] === "n")
2285
- e[2] === "-" ? e = e.slice(3) : Kn(pt, a) ? e = a.slice(2) : e = a[2] + e.slice(3), t && S.rel(s, e, t, !1), n && S.ael(s, e, n, !1);
2285
+ e[2] === "-" ? e = e.slice(3) : Kn(dt, a) ? e = a.slice(2) : e = a[2] + e.slice(3), t && S.rel(s, e, t, !1), n && S.ael(s, e, n, !1);
2286
2286
  else {
2287
2287
  const l = nn(n);
2288
2288
  if ((o || l && n !== null) && !i)
@@ -2340,31 +2340,31 @@ const pt = typeof window < "u" ? window : {}, H = pt.document || { head: {} }, Z
2340
2340
  for (; e <= t; ++e)
2341
2341
  (n = s[e]) && (i = n.$elm$, ei(n), Ve = !0, i["s-ol"] ? i["s-ol"].remove() : Le(i, !0), i.remove());
2342
2342
  }, yo = (s, e, t, n) => {
2343
- let i = 0, r = 0, o = 0, a = 0, l = e.length - 1, c = e[0], h = e[l], u = n.length - 1, p = n[0], d = n[u], b, f;
2343
+ let i = 0, r = 0, o = 0, a = 0, l = e.length - 1, c = e[0], h = e[l], u = n.length - 1, d = n[0], p = n[u], b, f;
2344
2344
  for (; i <= l && r <= u; )
2345
2345
  if (c == null)
2346
2346
  c = e[++i];
2347
2347
  else if (h == null)
2348
2348
  h = e[--l];
2349
- else if (p == null)
2350
- p = n[++r];
2351
2349
  else if (d == null)
2352
- d = n[--u];
2353
- else if (Ne(c, p))
2354
- ue(c, p), c = e[++i], p = n[++r];
2355
- else if (Ne(h, d))
2356
- ue(h, d), h = e[--l], d = n[--u];
2350
+ d = n[++r];
2351
+ else if (p == null)
2352
+ p = n[--u];
2357
2353
  else if (Ne(c, d))
2358
- (c.$tag$ === "slot" || d.$tag$ === "slot") && Le(c.$elm$.parentNode, !1), ue(c, d), s.insertBefore(c.$elm$, h.$elm$.nextSibling), c = e[++i], d = n[--u];
2354
+ ue(c, d), c = e[++i], d = n[++r];
2359
2355
  else if (Ne(h, p))
2360
- (c.$tag$ === "slot" || d.$tag$ === "slot") && Le(h.$elm$.parentNode, !1), ue(h, p), s.insertBefore(h.$elm$, c.$elm$), h = e[--l], p = n[++r];
2356
+ ue(h, p), h = e[--l], p = n[--u];
2357
+ else if (Ne(c, p))
2358
+ (c.$tag$ === "slot" || p.$tag$ === "slot") && Le(c.$elm$.parentNode, !1), ue(c, p), s.insertBefore(c.$elm$, h.$elm$.nextSibling), c = e[++i], p = n[--u];
2359
+ else if (Ne(h, d))
2360
+ (c.$tag$ === "slot" || p.$tag$ === "slot") && Le(h.$elm$.parentNode, !1), ue(h, d), s.insertBefore(h.$elm$, c.$elm$), h = e[--l], d = n[++r];
2361
2361
  else {
2362
2362
  for (o = -1, a = i; a <= l; ++a)
2363
- if (e[a] && e[a].$key$ !== null && e[a].$key$ === p.$key$) {
2363
+ if (e[a] && e[a].$key$ !== null && e[a].$key$ === d.$key$) {
2364
2364
  o = a;
2365
2365
  break;
2366
2366
  }
2367
- o >= 0 ? (f = e[o], f.$tag$ !== p.$tag$ ? b = et(e && e[r], t, o, s) : (ue(f, p), e[o] = void 0, b = f.$elm$), p = n[++r]) : (b = et(e && e[r], t, r, s), p = n[++r]), b && Xs(c.$elm$).insertBefore(b, rn(c.$elm$));
2367
+ o >= 0 ? (f = e[o], f.$tag$ !== d.$tag$ ? b = et(e && e[r], t, o, s) : (ue(f, d), e[o] = void 0, b = f.$elm$), d = n[++r]) : (b = et(e && e[r], t, r, s), d = n[++r]), b && Xs(c.$elm$).insertBefore(b, rn(c.$elm$));
2368
2368
  }
2369
2369
  i > l ? Gs(s, n[u + 1] == null ? null : n[u + 1].$elm$, t, n, r, u) : r > u && Ks(e, i, l);
2370
2370
  }, Ne = (s, e) => s.$tag$ === e.$tag$ ? s.$tag$ === "slot" ? s.$name$ === e.$name$ : s.$key$ === e.$key$ : !1, rn = (s) => s && s["s-ol"] || s, Xs = (s) => (s["s-ol"] ? s["s-ol"] : s).parentNode, ue = (s, e) => {
@@ -2412,11 +2412,11 @@ const pt = typeof window < "u" ? window : {}, H = pt.document || { head: {} }, Z
2412
2412
  {
2413
2413
  if (S.$flags$ |= 1, tn) {
2414
2414
  Js(r.$elm$);
2415
- let o, a, l, c, h, u, p = 0;
2416
- for (; p < O.length; p++)
2417
- o = O[p], a = o.$nodeToRelocate$, a["s-ol"] || (l = H.createTextNode(""), l["s-nr"] = a, a.parentNode.insertBefore(a["s-ol"] = l, a));
2418
- for (p = 0; p < O.length; p++)
2419
- if (o = O[p], a = o.$nodeToRelocate$, o.$slotRefNode$) {
2415
+ let o, a, l, c, h, u, d = 0;
2416
+ for (; d < O.length; d++)
2417
+ o = O[d], a = o.$nodeToRelocate$, a["s-ol"] || (l = H.createTextNode(""), l["s-nr"] = a, a.parentNode.insertBefore(a["s-ol"] = l, a));
2418
+ for (d = 0; d < O.length; d++)
2419
+ if (o = O[d], a = o.$nodeToRelocate$, o.$slotRefNode$) {
2420
2420
  for (c = o.$slotRefNode$.parentNode, h = o.$slotRefNode$.nextSibling, l = a["s-ol"]; l = l.previousSibling; )
2421
2421
  if (u = l["s-nr"], u && u["s-sn"] === a["s-sn"] && c === u.parentNode && (u = u.nextSibling, !u || !u["s-nr"])) {
2422
2422
  h = u;
@@ -2468,8 +2468,8 @@ const pt = typeof window < "u" ? window : {}, H = pt.document || { head: {} }, Z
2468
2468
  } catch (n) {
2469
2469
  Me(n);
2470
2470
  }
2471
- }, Gn = (s, e) => s && s.then ? s.then(e) : e(), To = (s, e) => s != null && !nn(s) ? e & 4 ? s === "false" ? !1 : s === "" || !!s : e & 2 ? parseFloat(s) : e & 1 ? String(s) : s : s, Lo = (s, e) => dt(s).$instanceValues$.get(e), Oo = (s, e, t, n) => {
2472
- const i = dt(s), r = s, o = i.$instanceValues$.get(e), a = i.$flags$, l = r;
2471
+ }, Gn = (s, e) => s && s.then ? s.then(e) : e(), To = (s, e) => s != null && !nn(s) ? e & 4 ? s === "false" ? !1 : s === "" || !!s : e & 2 ? parseFloat(s) : e & 1 ? String(s) : s : s, Lo = (s, e) => pt(s).$instanceValues$.get(e), Oo = (s, e, t, n) => {
2472
+ const i = pt(s), r = s, o = i.$instanceValues$.get(e), a = i.$flags$, l = r;
2473
2473
  t = To(t, n.$members$[e][0]);
2474
2474
  const c = Number.isNaN(o) && Number.isNaN(t);
2475
2475
  if (t !== o && !c) {
@@ -2477,11 +2477,11 @@ const pt = typeof window < "u" ? window : {}, H = pt.document || { head: {} }, Z
2477
2477
  {
2478
2478
  if (n.$watchers$ && a & 128) {
2479
2479
  const u = n.$watchers$[e];
2480
- u && u.map((p) => {
2480
+ u && u.map((d) => {
2481
2481
  try {
2482
- l[p](t, o, e);
2483
- } catch (d) {
2484
- Me(d, r);
2482
+ l[d](t, o, e);
2483
+ } catch (p) {
2484
+ Me(p, r);
2485
2485
  }
2486
2486
  });
2487
2487
  }
@@ -2543,7 +2543,7 @@ const pt = typeof window < "u" ? window : {}, H = pt.document || { head: {} }, Z
2543
2543
  }, Io = (s) => {
2544
2544
  }, Mo = (s) => {
2545
2545
  if (!(S.$flags$ & 1)) {
2546
- const e = dt(s), t = e.$cmpMeta$, n = re("connectedCallback", t.$tagName$);
2546
+ const e = pt(s), t = e.$cmpMeta$, n = re("connectedCallback", t.$tagName$);
2547
2547
  e.$flags$ & 1 ? (Ws(s, e, t.$listeners$), Io(e.$lazyInstance$)) : (e.$flags$ |= 1, t.$flags$ & 12 && zo(s), t.$members$ && Object.entries(t.$members$).map(([i, [r]]) => {
2548
2548
  if (r & 31 && s.hasOwnProperty(i)) {
2549
2549
  const o = s[i];
@@ -2556,7 +2556,7 @@ const pt = typeof window < "u" ? window : {}, H = pt.document || { head: {} }, Z
2556
2556
  e["s-cn"] = !0, s.insertBefore(e, s.firstChild);
2557
2557
  }, Uo = (s) => {
2558
2558
  if (!(S.$flags$ & 1)) {
2559
- const e = dt(s);
2559
+ const e = pt(s);
2560
2560
  e.$rmListeners$ && (e.$rmListeners$.map((t) => t()), e.$rmListeners$ = void 0);
2561
2561
  }
2562
2562
  }, ni = (s, e) => {
@@ -2583,7 +2583,7 @@ const pt = typeof window < "u" ? window : {}, H = pt.document || { head: {} }, Z
2583
2583
  });
2584
2584
  }
2585
2585
  }), s.is = t.$tagName$, Po(s, t);
2586
- }, si = /* @__PURE__ */ new WeakMap(), dt = (s) => si.get(s), jo = (s, e) => {
2586
+ }, si = /* @__PURE__ */ new WeakMap(), pt = (s) => si.get(s), jo = (s, e) => {
2587
2587
  const t = {
2588
2588
  $flags$: 0,
2589
2589
  $hostElement$: s,
@@ -2963,7 +2963,7 @@ ca([
2963
2963
  ], an.prototype, "anchor", 2);
2964
2964
  const ha = /* @__PURE__ */ new WeakMap();
2965
2965
  let Jn = 0;
2966
- const Et = /* @__PURE__ */ new Map(), es = /* @__PURE__ */ new WeakSet(), ts = () => new Promise((s) => requestAnimationFrame(s)), ua = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], pa = [{ opacity: 0 }], ns = [{ opacity: 0 }, { opacity: 1 }], ss = (s, e) => {
2966
+ const Et = /* @__PURE__ */ new Map(), es = /* @__PURE__ */ new WeakSet(), ts = () => new Promise((s) => requestAnimationFrame(s)), ua = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], da = [{ opacity: 0 }], ns = [{ opacity: 0 }, { opacity: 1 }], ss = (s, e) => {
2967
2967
  const t = s - e;
2968
2968
  return t === 0 ? void 0 : t;
2969
2969
  }, is = (s, e) => {
@@ -2985,7 +2985,7 @@ const Et = /* @__PURE__ */ new Map(), es = /* @__PURE__ */ new WeakSet(), ts = (
2985
2985
  e === 0 && (e = 1, t = { height: "1px" });
2986
2986
  const n = is(s, e);
2987
2987
  return { value: n, overrideFrom: t, transform: n == null || isNaN(n) ? void 0 : `scaleY(${n})` };
2988
- } }, da = { duration: 333, easing: "ease-in-out" }, fa = ["left", "top", "width", "height", "opacity", "color", "background"], rs = /* @__PURE__ */ new WeakMap();
2988
+ } }, pa = { duration: 333, easing: "ease-in-out" }, fa = ["left", "top", "width", "height", "opacity", "color", "background"], rs = /* @__PURE__ */ new WeakMap();
2989
2989
  class ga extends ai {
2990
2990
  constructor(e) {
2991
2991
  if (super(e), this.t = !1, this.i = null, this.o = null, this.h = !0, this.shouldLog = !1, e.type === ft.CHILD)
@@ -3114,7 +3114,7 @@ class ga extends ai {
3114
3114
  }), e;
3115
3115
  }
3116
3116
  j(e, t = this.O()) {
3117
- const n = { ...da };
3117
+ const n = { ...pa };
3118
3118
  return t.forEach((i) => Object.assign(n, i.options.keyframeOptions)), Object.assign(n, e), n;
3119
3119
  }
3120
3120
  N(e, t, n) {
@@ -3135,8 +3135,8 @@ class ga extends ai {
3135
3135
  const u = Tt[l];
3136
3136
  if (c === void 0 || h === void 0)
3137
3137
  continue;
3138
- const p = u(c, h);
3139
- p.transform !== void 0 && (a[l] = p.value, o = !0, i.transform = `${i.transform ?? ""} ${p.transform}`, p.overrideFrom !== void 0 && Object.assign(i, p.overrideFrom));
3138
+ const d = u(c, h);
3139
+ d.transform !== void 0 && (a[l] = d.value, o = !0, i.transform = `${i.transform ?? ""} ${d.transform}`, d.overrideFrom !== void 0 && Object.assign(i, d.overrideFrom));
3140
3140
  } else
3141
3141
  c !== h && c !== void 0 && h !== void 0 && (o = !0, i[l] = c, r[l] = h);
3142
3142
  }
@@ -3222,7 +3222,22 @@ class X extends k {
3222
3222
  );
3223
3223
  return;
3224
3224
  }
3225
- this.active = !this.active, this.active ? (this.application.appendToDOM(), this.widgetActive$.next(!0), this.hideTrigger()) : (this.application.hide(), this.widgetActive$.next(!1), this.showTrigger());
3225
+ this.active = !this.active, this.active ? (this.application.appendToDOM(), this.notify("widget-set-active", {
3226
+ widgetId: this.application.id,
3227
+ active: !0
3228
+ }), this.widgetActive$.next(!0), this.hideTrigger()) : (this.application.hide(), this.notify("widget-set-active", {
3229
+ widgetId: this.application.id,
3230
+ active: !1
3231
+ }), this.widgetActive$.next(!1), this.showTrigger());
3232
+ }
3233
+ notify(e, t = {}) {
3234
+ window != null && window.parent && window.parent.postMessage(
3235
+ {
3236
+ type: e,
3237
+ data: t
3238
+ },
3239
+ "*"
3240
+ );
3226
3241
  }
3227
3242
  _applyBranding() {
3228
3243
  var e;
@@ -3713,7 +3728,7 @@ class cn extends k {
3713
3728
  render() {
3714
3729
  var n, i;
3715
3730
  const e = this.application.settings.components.conversation;
3716
- return ((i = (n = e == null ? void 0 : e.properties) == null ? void 0 : n.chat) == null ? void 0 : i.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === ln.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), m`<div class="widget-container" ${z(this.wrapperRef)}>
3731
+ return ((i = (n = e == null ? void 0 : e.properties) == null ? void 0 : n.chat) == null ? void 0 : i.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === ln.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), window.self !== window.top ? (console.log("This page is embedded in an iframe."), this.renderRoot.host.classList.add("embedded")) : console.log("This page is not embedded in an iframe."), m`<div class="widget-container" ${z(this.wrapperRef)}>
3717
3732
  ${$a(this.nodes, (r) => r)}
3718
3733
  </div>`;
3719
3734
  }
@@ -3763,6 +3778,23 @@ cn.styles = E`
3763
3778
  position: fixed;
3764
3779
  }
3765
3780
 
3781
+ :host(.embedded) {
3782
+ padding: 40px !important;
3783
+ }
3784
+
3785
+ @media screen and (max-device-width: 800px) {
3786
+ :host(.embedded) {
3787
+ padding: 0 !important;
3788
+ }
3789
+ :host(.embedded) .widget-container {
3790
+ border-radius: none !important;
3791
+ }
3792
+ }
3793
+
3794
+ :host(.embedded) .widget-container {
3795
+ border-radius: var(--border-radius) !important;
3796
+ }
3797
+
3766
3798
  @media screen and (max-width: 800px) {
3767
3799
  :host(.floating) {
3768
3800
  inset: 0;
@@ -3935,7 +3967,7 @@ class Oa {
3935
3967
  class as {
3936
3968
  constructor(e, t, n, i, r) {
3937
3969
  this.id = e, this.providerKey = t, this.providerOptions = n, this.component = r, this.provider$ = new U(null), this.entries$ = new U([]), this.removeEntryAction$ = new _(), this.kill$ = new _(), this.isTyping$ = new U(!1), this.data$ = new U({}), this.complete$ = this.provider$.pipe(
3938
- de((l) => l ? l.onComplete() : Re)
3970
+ pe((l) => l ? l.onComplete() : Re)
3939
3971
  );
3940
3972
  const o = this._getProviderFactory(t);
3941
3973
  if (!o)
@@ -3978,7 +4010,7 @@ class as {
3978
4010
  }
3979
4011
  _addEntryRemoveHandler(e) {
3980
4012
  e.remove$.pipe(
3981
- de(() => this.entries$),
4013
+ pe(() => this.entries$),
3982
4014
  Mt(1)
3983
4015
  ).subscribe((t) => {
3984
4016
  this.removeEntryAction$.next(e), this.entries$.next(t.filter((n) => n !== e));
@@ -4089,8 +4121,8 @@ class Pa {
4089
4121
  class Ra {
4090
4122
  constructor(e, t) {
4091
4123
  this.state$ = e, this.component = t, this.entries$ = new U([]), this.session = () => this.session$, this.isTyping = () => this.isTyping$, this.entries = () => this.entries$.asObservable(), this.sessionService = new Pa(this.component), this.session$ = this.sessionService.currentSession(), this.isTyping$ = this.session$.pipe(
4092
- de((n) => n ? n.provider$.pipe(
4093
- de((i) => i ? i.isTyping() : It(!1))
4124
+ pe((n) => n ? n.provider$.pipe(
4125
+ pe((i) => i ? i.isTyping() : It(!1))
4094
4126
  ) : It(!1))
4095
4127
  ), e.subscribe((n) => {
4096
4128
  switch (n) {
@@ -4115,7 +4147,7 @@ class Ra {
4115
4147
  }
4116
4148
  rehydrate() {
4117
4149
  this.session$.pipe(
4118
- de((e) => {
4150
+ pe((e) => {
4119
4151
  if (!e)
4120
4152
  return Re;
4121
4153
  const t = e.removeEntryAction$.pipe(Ut(this.entries$)).pipe(
@@ -4260,7 +4292,7 @@ un.styles = [
4260
4292
  E`
4261
4293
  :host {
4262
4294
  box-sizing: border-box;
4263
- display: block;
4295
+ display: inline;
4264
4296
  }
4265
4297
  * {
4266
4298
  box-sizing: border-box;
@@ -4377,7 +4409,7 @@ un.styles = [
4377
4409
  za([
4378
4410
  w({ attribute: !1 })
4379
4411
  ], un.prototype, "entry", 2);
4380
- var Ua = Object.defineProperty, ja = Object.getOwnPropertyDescriptor, pi = (s, e, t, n) => {
4412
+ var Ua = Object.defineProperty, ja = Object.getOwnPropertyDescriptor, di = (s, e, t, n) => {
4381
4413
  for (var i = n > 1 ? void 0 : n ? ja(e, t) : e, r = s.length - 1, o; r >= 0; r--)
4382
4414
  (o = s[r]) && (i = (n ? o(e, t, i) : o(i)) || i);
4383
4415
  return n && i && Ua(e, t, i), i;
@@ -4410,7 +4442,7 @@ class mt extends k {
4410
4442
  ${Nt({
4411
4443
  keyframeOptions: {},
4412
4444
  in: ns,
4413
- out: pa,
4445
+ out: da,
4414
4446
  stabilizeOut: !0,
4415
4447
  skipInitial: !1
4416
4448
  })}
@@ -4437,10 +4469,10 @@ mt.styles = [
4437
4469
  }
4438
4470
  `
4439
4471
  ];
4440
- pi([
4472
+ di([
4441
4473
  w({ attribute: !1 })
4442
4474
  ], mt.prototype, "entries", 2);
4443
- pi([
4475
+ di([
4444
4476
  w({ type: Boolean })
4445
4477
  ], mt.prototype, "loading", 2);
4446
4478
  /**
@@ -4459,7 +4491,7 @@ var Ha = Object.defineProperty, Ba = Object.getOwnPropertyDescriptor, Na = (s, e
4459
4491
  (o = s[r]) && (i = (n ? o(e, t, i) : o(i)) || i);
4460
4492
  return n && i && Ha(e, t, i), i;
4461
4493
  };
4462
- class pn extends k {
4494
+ class dn extends k {
4463
4495
  render() {
4464
4496
  return m`
4465
4497
  <div class="message-group">
@@ -4488,7 +4520,7 @@ class pn extends k {
4488
4520
  `;
4489
4521
  }
4490
4522
  }
4491
- pn.styles = [
4523
+ dn.styles = [
4492
4524
  E`
4493
4525
  :host {
4494
4526
  box-sizing: border-box;
@@ -4506,8 +4538,8 @@ pn.styles = [
4506
4538
  ];
4507
4539
  Na([
4508
4540
  w({ attribute: !1 })
4509
- ], pn.prototype, "group", 2);
4510
- class di extends k {
4541
+ ], dn.prototype, "group", 2);
4542
+ class pi extends k {
4511
4543
  render() {
4512
4544
  return m`<div class="container">
4513
4545
  <div class="dot"></div>
@@ -4516,7 +4548,7 @@ class di extends k {
4516
4548
  </div>`;
4517
4549
  }
4518
4550
  }
4519
- di.styles = [
4551
+ pi.styles = [
4520
4552
  E`
4521
4553
  :host {
4522
4554
  display: block;
@@ -4584,14 +4616,14 @@ var qa = Object.defineProperty, Za = Object.getOwnPropertyDescriptor, Wa = (s, e
4584
4616
  (o = s[r]) && (i = (n ? o(e, t, i) : o(i)) || i);
4585
4617
  return n && i && qa(e, t, i), i;
4586
4618
  };
4587
- class dn extends k {
4619
+ class pn extends k {
4588
4620
  render() {
4589
4621
  return m`<div class="message-type-html">
4590
4622
  ${Fa(this.message.content)}
4591
4623
  </div>`;
4592
4624
  }
4593
4625
  }
4594
- dn.styles = [
4626
+ pn.styles = [
4595
4627
  E`
4596
4628
  :host {
4597
4629
  box-sizing: border-box;
@@ -4630,7 +4662,7 @@ dn.styles = [
4630
4662
  ];
4631
4663
  Wa([
4632
4664
  w({ attribute: !1 })
4633
- ], dn.prototype, "message", 2);
4665
+ ], pn.prototype, "message", 2);
4634
4666
  function fn() {
4635
4667
  return {
4636
4668
  async: !1,
@@ -4880,29 +4912,29 @@ class st {
4880
4912
  break;
4881
4913
  a = t[0], e = e.substring(a.length);
4882
4914
  let u = t[2].split(`
4883
- `, 1)[0].replace(/^\t+/, (N) => " ".repeat(3 * N.length)), p = e.split(`
4884
- `, 1)[0], d = 0;
4885
- this.options.pedantic ? (d = 2, l = u.trimStart()) : (d = t[2].search(/[^ ]/), d = d > 4 ? 1 : d, l = u.slice(d), d += t[1].length);
4915
+ `, 1)[0].replace(/^\t+/, (N) => " ".repeat(3 * N.length)), d = e.split(`
4916
+ `, 1)[0], p = 0;
4917
+ this.options.pedantic ? (p = 2, l = u.trimStart()) : (p = t[2].search(/[^ ]/), p = p > 4 ? 1 : p, l = u.slice(p), p += t[1].length);
4886
4918
  let b = !1;
4887
- if (!u && /^ *$/.test(p) && (a += p + `
4888
- `, e = e.substring(p.length + 1), h = !0), !h) {
4889
- const N = new RegExp(`^ {0,${Math.min(3, d - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), J = new RegExp(`^ {0,${Math.min(3, d - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), wn = new RegExp(`^ {0,${Math.min(3, d - 1)}}(?:\`\`\`|~~~)`), kn = new RegExp(`^ {0,${Math.min(3, d - 1)}}#`);
4919
+ if (!u && /^ *$/.test(d) && (a += d + `
4920
+ `, e = e.substring(d.length + 1), h = !0), !h) {
4921
+ const N = new RegExp(`^ {0,${Math.min(3, p - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), J = new RegExp(`^ {0,${Math.min(3, p - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), wn = new RegExp(`^ {0,${Math.min(3, p - 1)}}(?:\`\`\`|~~~)`), kn = new RegExp(`^ {0,${Math.min(3, p - 1)}}#`);
4890
4922
  for (; e; ) {
4891
4923
  const yt = e.split(`
4892
4924
  `, 1)[0];
4893
- if (p = yt, this.options.pedantic && (p = p.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), wn.test(p) || kn.test(p) || N.test(p) || J.test(e))
4925
+ if (d = yt, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), wn.test(d) || kn.test(d) || N.test(d) || J.test(e))
4894
4926
  break;
4895
- if (p.search(/[^ ]/) >= d || !p.trim())
4927
+ if (d.search(/[^ ]/) >= p || !d.trim())
4896
4928
  l += `
4897
- ` + p.slice(d);
4929
+ ` + d.slice(p);
4898
4930
  else {
4899
4931
  if (b || u.search(/[^ ]/) >= 4 || wn.test(u) || kn.test(u) || J.test(u))
4900
4932
  break;
4901
4933
  l += `
4902
- ` + p;
4934
+ ` + d;
4903
4935
  }
4904
- !b && !p.trim() && (b = !0), a += yt + `
4905
- `, e = e.substring(yt.length + 1), u = p.slice(d);
4936
+ !b && !d.trim() && (b = !0), a += yt + `
4937
+ `, e = e.substring(yt.length + 1), u = d.slice(p);
4906
4938
  }
4907
4939
  }
4908
4940
  r.loose || (c ? r.loose = !0 : /\n *\n *$/.test(a) && (c = !0));
@@ -4920,8 +4952,8 @@ class st {
4920
4952
  r.items[r.items.length - 1].raw = a.trimEnd(), r.items[r.items.length - 1].text = l.trimEnd(), r.raw = r.raw.trimEnd();
4921
4953
  for (let h = 0; h < r.items.length; h++)
4922
4954
  if (this.lexer.state.top = !1, r.items[h].tokens = this.lexer.blockTokens(r.items[h].text, []), !r.loose) {
4923
- const u = r.items[h].tokens.filter((d) => d.type === "space"), p = u.length > 0 && u.some((d) => /\n.*\n/.test(d.raw));
4924
- r.loose = p;
4955
+ const u = r.items[h].tokens.filter((p) => p.type === "space"), d = u.length > 0 && u.some((p) => /\n.*\n/.test(p.raw));
4956
+ r.loose = d;
4925
4957
  }
4926
4958
  if (r.loose)
4927
4959
  for (let h = 0; h < r.items.length; h++)
@@ -5101,20 +5133,20 @@ class st {
5101
5133
  if (c -= l, c > 0)
5102
5134
  continue;
5103
5135
  l = Math.min(l, l + c + h);
5104
- const p = [...i[0]][0].length, d = e.slice(0, o + i.index + p + l);
5136
+ const d = [...i[0]][0].length, p = e.slice(0, o + i.index + d + l);
5105
5137
  if (Math.min(o, l) % 2) {
5106
- const f = d.slice(1, -1);
5138
+ const f = p.slice(1, -1);
5107
5139
  return {
5108
5140
  type: "em",
5109
- raw: d,
5141
+ raw: p,
5110
5142
  text: f,
5111
5143
  tokens: this.lexer.inlineTokens(f)
5112
5144
  };
5113
5145
  }
5114
- const b = d.slice(2, -2);
5146
+ const b = p.slice(2, -2);
5115
5147
  return {
5116
5148
  type: "strong",
5117
- raw: d,
5149
+ raw: p,
5118
5150
  text: b,
5119
5151
  tokens: this.lexer.inlineTokens(b)
5120
5152
  };
@@ -5225,10 +5257,10 @@ const tl = /^(?: *(?:\n|$))+/, nl = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, sl =
5225
5257
  paragraph: yi,
5226
5258
  table: Se,
5227
5259
  text: rl
5228
- }, ps = y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), hl = {
5260
+ }, ds = y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), hl = {
5229
5261
  ...bn,
5230
- table: ps,
5231
- paragraph: y(gn).replace("hr", je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ps).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex()
5262
+ table: ds,
5263
+ paragraph: y(gn).replace("hr", je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ds).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex()
5232
5264
  }, ul = {
5233
5265
  ...bn,
5234
5266
  html: y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", vn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
@@ -5239,14 +5271,14 @@ const tl = /^(?: *(?:\n|$))+/, nl = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, sl =
5239
5271
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
5240
5272
  paragraph: y(gn).replace("hr", je).replace("heading", ` *#{1,6} *[^
5241
5273
  ]`).replace("lheading", bi).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
5242
- }, $i = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, pl = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, xi = /^( {2,}|\\)\n(?!\s*$)/, dl = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, De = "\\p{P}\\p{S}", fl = y(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, De).getRegex(), gl = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, ml = y(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, De).getRegex(), vl = y("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, De).getRegex(), bl = y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, De).getRegex(), yl = y(/\\([punct])/, "gu").replace(/punct/g, De).getRegex(), $l = y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), xl = y(vn).replace("(?:-->|$)", "-->").getRegex(), wl = y("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", xl).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), it = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, kl = y(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", it).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), wi = y(/^!?\[(label)\]\[(ref)\]/).replace("label", it).replace("ref", mn).getRegex(), ki = y(/^!?\[(ref)\](?:\[\])?/).replace("ref", mn).getRegex(), _l = y("reflink|nolink(?!\\()", "g").replace("reflink", wi).replace("nolink", ki).getRegex(), yn = {
5274
+ }, $i = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, dl = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, xi = /^( {2,}|\\)\n(?!\s*$)/, pl = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, De = "\\p{P}\\p{S}", fl = y(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, De).getRegex(), gl = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, ml = y(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, De).getRegex(), vl = y("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, De).getRegex(), bl = y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, De).getRegex(), yl = y(/\\([punct])/, "gu").replace(/punct/g, De).getRegex(), $l = y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), xl = y(vn).replace("(?:-->|$)", "-->").getRegex(), wl = y("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", xl).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), it = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, kl = y(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", it).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), wi = y(/^!?\[(label)\]\[(ref)\]/).replace("label", it).replace("ref", mn).getRegex(), ki = y(/^!?\[(ref)\](?:\[\])?/).replace("ref", mn).getRegex(), _l = y("reflink|nolink(?!\\()", "g").replace("reflink", wi).replace("nolink", ki).getRegex(), yn = {
5243
5275
  _backpedal: Se,
5244
5276
  // only used for GFM url
5245
5277
  anyPunctuation: yl,
5246
5278
  autolink: $l,
5247
5279
  blockSkip: gl,
5248
5280
  br: xi,
5249
- code: pl,
5281
+ code: dl,
5250
5282
  del: Se,
5251
5283
  emStrongLDelim: ml,
5252
5284
  emStrongRDelimAst: vl,
@@ -5258,7 +5290,7 @@ const tl = /^(?: *(?:\n|$))+/, nl = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, sl =
5258
5290
  reflink: wi,
5259
5291
  reflinkSearch: _l,
5260
5292
  tag: wl,
5261
- text: dl,
5293
+ text: pl,
5262
5294
  url: Se
5263
5295
  }, Sl = {
5264
5296
  ...yn,
@@ -5487,9 +5519,9 @@ class j {
5487
5519
  if (r = e, this.options.extensions && this.options.extensions.startInline) {
5488
5520
  let h = 1 / 0;
5489
5521
  const u = e.slice(1);
5490
- let p;
5491
- this.options.extensions.startInline.forEach((d) => {
5492
- p = d.call({ lexer: this }, u), typeof p == "number" && p >= 0 && (h = Math.min(h, p));
5522
+ let d;
5523
+ this.options.extensions.startInline.forEach((p) => {
5524
+ d = p.call({ lexer: this }, u), typeof d == "number" && d >= 0 && (h = Math.min(h, d));
5493
5525
  }), h < 1 / 0 && h >= 0 && (r = e.substring(0, h + 1));
5494
5526
  }
5495
5527
  if (n = this.tokenizer.inlineText(r)) {
@@ -5699,8 +5731,8 @@ class D {
5699
5731
  for (let h = 0; h < o.rows.length; h++) {
5700
5732
  const u = o.rows[h];
5701
5733
  l = "";
5702
- for (let p = 0; p < u.length; p++)
5703
- l += this.renderer.tablecell(this.parseInline(u[p].tokens), { header: !1, align: o.align[p] });
5734
+ for (let d = 0; d < u.length; d++)
5735
+ l += this.renderer.tablecell(this.parseInline(u[d].tokens), { header: !1, align: o.align[d] });
5704
5736
  c += this.renderer.tablerow(l);
5705
5737
  }
5706
5738
  n += this.renderer.table(a, c);
@@ -5715,16 +5747,16 @@ class D {
5715
5747
  const o = r, a = o.ordered, l = o.start, c = o.loose;
5716
5748
  let h = "";
5717
5749
  for (let u = 0; u < o.items.length; u++) {
5718
- const p = o.items[u], d = p.checked, b = p.task;
5750
+ const d = o.items[u], p = d.checked, b = d.task;
5719
5751
  let f = "";
5720
- if (p.task) {
5721
- const I = this.renderer.checkbox(!!d);
5722
- c ? p.tokens.length > 0 && p.tokens[0].type === "paragraph" ? (p.tokens[0].text = I + " " + p.tokens[0].text, p.tokens[0].tokens && p.tokens[0].tokens.length > 0 && p.tokens[0].tokens[0].type === "text" && (p.tokens[0].tokens[0].text = I + " " + p.tokens[0].tokens[0].text)) : p.tokens.unshift({
5752
+ if (d.task) {
5753
+ const I = this.renderer.checkbox(!!p);
5754
+ c ? d.tokens.length > 0 && d.tokens[0].type === "paragraph" ? (d.tokens[0].text = I + " " + d.tokens[0].text, d.tokens[0].tokens && d.tokens[0].tokens.length > 0 && d.tokens[0].tokens[0].type === "text" && (d.tokens[0].tokens[0].text = I + " " + d.tokens[0].tokens[0].text)) : d.tokens.unshift({
5723
5755
  type: "text",
5724
5756
  text: I + " "
5725
5757
  }) : f += I + " ";
5726
5758
  }
5727
- f += this.parse(p.tokens, c), h += this.renderer.listitem(f, b, !!d);
5759
+ f += this.parse(d.tokens, c), h += this.renderer.listitem(f, b, !!p);
5728
5760
  }
5729
5761
  n += this.renderer.list(h, a, l);
5730
5762
  continue;
@@ -5972,7 +6004,7 @@ class Al {
5972
6004
  const a = o, l = n.hooks[a], c = r[a];
5973
6005
  Ce.passThroughHooks.has(o) ? r[a] = (h) => {
5974
6006
  if (this.defaults.async)
5975
- return Promise.resolve(l.call(r, h)).then((p) => c.call(r, p));
6007
+ return Promise.resolve(l.call(r, h)).then((d) => c.call(r, d));
5976
6008
  const u = l.call(r, h);
5977
6009
  return c.call(r, u);
5978
6010
  } : r[a] = (...h) => {
@@ -6299,16 +6331,16 @@ var Rl = Object.defineProperty, Il = Object.getOwnPropertyDescriptor, V = (s, e,
6299
6331
  };
6300
6332
  customElements.get("conversation-entry") || customElements.define("conversation-entry", un);
6301
6333
  customElements.get("ace-conversation-feed") || customElements.define("ace-conversation-feed", mt);
6302
- customElements.get("conversation-group") || customElements.define("conversation-group", pn);
6303
- customElements.get("ace-typing-state") || customElements.define("ace-typing-state", di);
6304
- customElements.get("message-type-html") || customElements.define("message-type-html", dn);
6334
+ customElements.get("conversation-group") || customElements.define("conversation-group", dn);
6335
+ customElements.get("ace-typing-state") || customElements.define("ace-typing-state", pi);
6336
+ customElements.get("message-type-html") || customElements.define("message-type-html", pn);
6305
6337
  customElements.get("message-type-markdown") || customElements.define("message-type-markdown", bt);
6306
6338
  customElements.get("ace-lightbox") || customElements.define("ace-lightbox", xn);
6307
6339
  const Ci = ci(k);
6308
6340
  class R extends Ci {
6309
6341
  constructor() {
6310
6342
  super(...arguments), this.message = "", this.disabledInput = !1, this.disabledSubmit = !1, this.chatOverlayActive = !1, this.textAreaLength = 0, this.conversationContentRef = M(), this.conversationFeedRef = M(), this.formRef = M(), this.inputRef = M(), this.scrollRef = M(), this.counterRef = M(), this.chatScrollHeight = 0, this.chatCurrentScrollPosition = 0, this.toast = new Oa(this), this.messageMaxLength = 1e3, this.messageMaxLengthLabel = "Maximum character limit reached", this.skipToLatestMessageLabel = "Skip to latest message", this.platform = null, this.entries = [], this.typing = !1, this.conversationState$ = new U("waiting"), this.stateMachine = new Ra(this.conversationState$, this), this.provider$ = this.stateMachine.session().pipe(
6311
- de((e) => e ? e == null ? void 0 : e.provider$ : It(null))
6343
+ pe((e) => e ? e == null ? void 0 : e.provider$ : It(null))
6312
6344
  ), this.userTyping$ = new _();
6313
6345
  }
6314
6346
  async connectedCallback() {
@@ -6321,7 +6353,7 @@ class R extends Ci {
6321
6353
  t && t.widgetActive$.pipe(zt(t.componentIsDestroyed$)).subscribe((n) => {
6322
6354
  const i = this.conversationContentRef.value;
6323
6355
  i && (n ? i.scrollTop = this.chatCurrentScrollPosition : this.chatCurrentScrollPosition = i.scrollTop);
6324
- }), this.stateSubscription = dr([
6356
+ }), this.stateSubscription = pr([
6325
6357
  this.stateMachine.entries(),
6326
6358
  this.stateMachine.isTyping()
6327
6359
  ]).subscribe(([n, i]) => {