@leadbot/components 2.24.0 → 2.24.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.
@@ -1,7 +1,7 @@
1
1
  import { A as e, C as t, D as n, E as r, O as i, T as a, c as o, d as s, f as c, g as l, k as u, l as d, o as f, p, s as m, t as h, w as g, y as _ } from "./jsxRuntime.module-DsRxbn3o.js";
2
- import { CHAT_ERROR_CODE_MAP as v, FIXED_ANSWER_TYPING_MS as y, TYPING_INDICATOR_MS as b, buildAnalytics as x, buildGaUserData as S, buildSubmitPayload as C, createClient as w, createWhatsAppUrl as T, createWhatsAppWebUrl as E, generateUUID as D, getAttributionParams as O, getFieldOptions as k, getOrCreateVisitorId as A, getTracker as ee, getVariableValue as j, isPlausiblePhone as M, normalizePhoneInput as te, onUrlChange as N, processVariables as P, readEntry as F, removeEntry as I, resolveApiBase as L, resolveFieldType as R, resolveLanguage as ne, sanitizeConversationStarters as re, sanitizeTrackedUrl as z, sendChatFeedback as ie, sessionStore as ae, setActiveChatSession as oe, streamChat as se, trackClick as ce, writeEntry as B } from "@leadbot/core";
2
+ import { CHAT_ERROR_CODE_MAP as v, FIXED_ANSWER_TYPING_MS as y, MAX_WIRE_HISTORY as b, TYPING_INDICATOR_MS as x, buildAnalytics as S, buildGaUserData as C, buildSubmitPayload as w, createClient as T, createWhatsAppUrl as E, createWhatsAppWebUrl as D, generateUUID as O, getAttributionParams as k, getFieldOptions as A, getOrCreateVisitorId as ee, getTracker as j, getVariableValue as M, isPlausiblePhone as te, normalizePhoneInput as ne, onUrlChange as N, processVariables as P, readEntry as F, removeEntry as I, resolveApiBase as re, resolveFieldType as ie, resolveLanguage as ae, sanitizeConversationStarters as oe, sanitizeTrackedUrl as L, sendChatExchange as se, sendChatFeedback as ce, sessionStore as le, setActiveChatSession as ue, streamChat as R, trackClick as de, writeEntry as z } from "@leadbot/core";
3
3
  //#region ../../src/components/errorBoundary.tsx
4
- var le = class extends g {
4
+ var fe = class extends g {
5
5
  constructor(...e) {
6
6
  super(...e), this.state = { hasError: !1 };
7
7
  }
@@ -21,7 +21,7 @@ var le = class extends g {
21
21
  };
22
22
  //#endregion
23
23
  //#region ../../src/conditions/day.ts
24
- function V(e) {
24
+ function B(e) {
25
25
  let t = (/* @__PURE__ */ new Date()).getDay();
26
26
  if (!e || e.length === 0) return !1;
27
27
  let n = [
@@ -37,7 +37,7 @@ function V(e) {
37
37
  }
38
38
  //#endregion
39
39
  //#region ../../src/utils/device.ts
40
- function ue() {
40
+ function pe() {
41
41
  let e = window.matchMedia("(pointer: coarse)").matches, t = window.matchMedia("(pointer: fine)").matches, n = "ontouchstart" in window || navigator.maxTouchPoints > 0, r = window.matchMedia("(max-width: 768px)").matches, i = navigator.userAgent.toLowerCase(), a = navigator.userAgent || navigator.platform || "", o = /iphone|ipad|ipod/.test(i) || (a === "macOS" || a === "MacIntel") && n, s = /android/.test(i), c = "desktop";
42
42
  return e && !t ? c = r ? "mobile" : "tablet" : r && n && (c = "mobile"), {
43
43
  deviceType: c,
@@ -52,14 +52,14 @@ function ue() {
52
52
  }
53
53
  //#endregion
54
54
  //#region ../../src/conditions/device.ts
55
- function H(e) {
55
+ function me(e) {
56
56
  if (!e || e.length === 0) return !1;
57
- let { deviceType: t } = ue();
57
+ let { deviceType: t } = pe();
58
58
  return e.includes(t);
59
59
  }
60
60
  //#endregion
61
61
  //#region ../../src/conditions/time.ts
62
- function de(e) {
62
+ function he(e) {
63
63
  if (!e || e.length === 0) return !1;
64
64
  let t = /* @__PURE__ */ new Date(), n = t.getHours() * 60 + t.getMinutes();
65
65
  return e.some((e) => {
@@ -76,183 +76,183 @@ function de(e) {
76
76
  }
77
77
  //#endregion
78
78
  //#region ../../src/conditions/index.ts
79
- var fe = {
80
- device: H,
81
- day: V,
82
- time: de
79
+ var ge = {
80
+ device: me,
81
+ day: B,
82
+ time: he
83
83
  };
84
- function pe(e) {
85
- let { condition_type: t, eval: n, evaluates: r } = e, i = fe[t];
84
+ function _e(e) {
85
+ let { condition_type: t, eval: n, evaluates: r } = e, i = ge[t];
86
86
  if (!i) return console.warn(`Unknown condition type: ${t}`), !0;
87
87
  let a = i(n);
88
88
  return r ? a : !a;
89
89
  }
90
- function me(e) {
91
- return !e.conditions || e.conditions.length === 0 || e.conditions.every((e) => pe(e));
90
+ function ve(e) {
91
+ return !e.conditions || e.conditions.length === 0 || e.conditions.every((e) => _e(e));
92
92
  }
93
- function he(e) {
94
- return e.filter((e) => me(e));
93
+ function ye(e) {
94
+ return e.filter((e) => ve(e));
95
95
  }
96
96
  //#endregion
97
97
  //#region ../../src/utils/domainKey.ts
98
- function ge(e) {
98
+ function be(e) {
99
99
  return e?.leadbot?.domain?.domain_key || null;
100
100
  }
101
101
  //#endregion
102
102
  //#region ../../src/config.ts
103
- var _e = {
103
+ var xe = {
104
104
  API_BASE: "https://collector.leadbot.com/api",
105
105
  CSS_CLASSES: {
106
106
  CONTAINER: "leadbot-widget",
107
107
  HIDDEN: "leadbot-hidden",
108
108
  LOADING: "leadbot-loading"
109
109
  }
110
- }, U = null;
111
- function ve(e) {
112
- U = e ? e.replace(/\/+$/, "") : null;
110
+ }, V = null;
111
+ function Se(e) {
112
+ V = e ? e.replace(/\/+$/, "") : null;
113
113
  }
114
- function ye(e) {
115
- if (U) return U + e;
116
- let t = be();
117
- return L(t ? { apiHost: t } : { apiBase: _e.API_BASE }) + e;
114
+ function Ce(e) {
115
+ if (V) return V + e;
116
+ let t = we();
117
+ return re(t ? { apiHost: t } : { apiBase: xe.API_BASE }) + e;
118
118
  }
119
- function be() {
119
+ function we() {
120
120
  let e = document.getElementsByTagName("script");
121
121
  for (let t of e) if (t.src && t.src.includes("script.js") && t.dataset.apiHost) return t.dataset.apiHost;
122
122
  return null;
123
123
  }
124
124
  //#endregion
125
125
  //#region ../../src/utils/leadbot.ts
126
- function xe(e) {
126
+ function Te(e) {
127
127
  return e?.leadbot?.id || null;
128
128
  }
129
129
  //#endregion
130
130
  //#region ../../src/utils/previewToken.ts
131
- var Se = null;
132
- function Ce() {
133
- return Se;
131
+ var Ee = null;
132
+ function De() {
133
+ return Ee;
134
134
  }
135
135
  //#endregion
136
136
  //#region ../../src/utils/icon.ts
137
- var we = "fa-kit fa-leadbot", W = {};
138
- function Te(e) {
139
- Object.assign(W, e);
137
+ var Oe = "fa-kit fa-leadbot", ke = {};
138
+ function Ae(e) {
139
+ Object.assign(ke, e);
140
140
  }
141
- function Ee(e) {
142
- return W[e] || (e && console.warn(`[Icons] Icon "${e}" not found, using default`), W[we] ?? "");
141
+ function je(e) {
142
+ return ke[e] || (e && console.warn(`[Icons] Icon "${e}" not found, using default`), ke[Oe] ?? "");
143
143
  }
144
- var G = {
144
+ var H = {
145
145
  get chevronRight() {
146
- return W["__internal-chevron-right"] ?? "";
146
+ return ke["__internal-chevron-right"] ?? "";
147
147
  },
148
148
  get defaultAvatar() {
149
- return W["fa-kit fa-default-avatar"] ?? "";
149
+ return ke["fa-kit fa-default-avatar"] ?? "";
150
150
  },
151
151
  get whatsapp() {
152
- return W["fab fa-whatsapp"] ?? "";
152
+ return ke["fab fa-whatsapp"] ?? "";
153
153
  },
154
154
  get phone() {
155
- return W["fal fa-phone"] ?? "";
155
+ return ke["fal fa-phone"] ?? "";
156
156
  },
157
157
  get envelope() {
158
- return W["fal fa-envelope"] ?? "";
158
+ return ke["fal fa-envelope"] ?? "";
159
159
  },
160
160
  close: "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 6L6 18M6 6L18 18\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>",
161
161
  send: "<svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M2 21l21-9L2 3v7l15 2-15 2v7z\" fill=\"currentColor\"/>\n </svg>",
162
162
  checkDouble: "<svg width=\"16\" height=\"12\" viewBox=\"0 0 16 12\" fill=\"none\">\n <path d=\"M4.0 6.5l2.0 2.0 5.0-5.5\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M2.0 6.5l2.0 2.0 5.0-5.5\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>"
163
- }, De = [...new Set(/* @__PURE__ */ "com.org.net.edu.gov.mil.int.info.biz.name.pro.app.dev.io.ai.co.me.tv.cc.ly.sh.xyz.online.site.store.tech.blog.shop.club.news.today.link.page.cloud.studio.design.group.media.life.world.agency.nl.be.de.fr.uk.es.it.pl.pt.se.no.dk.fi.ie.ch.at.cz.sk.gr.hu.ro.bg.hr.si.ee.lv.lt.ru.ua.tr.is.lu.li.mt.ca.us.mx.br.ar.cl.pe.ve.uy.au.nz.jp.kr.cn.tw.hk.sg.in.id.my.th.ph.vn.ae.sa.il.za.eg.ma.ke.ng".split("."))].sort((e, t) => t.length - e.length).join("|");
163
+ }, Me = [...new Set(/* @__PURE__ */ "com.org.net.edu.gov.mil.int.info.biz.name.pro.app.dev.io.ai.co.me.tv.cc.ly.sh.xyz.online.site.store.tech.blog.shop.club.news.today.link.page.cloud.studio.design.group.media.life.world.agency.nl.be.de.fr.uk.es.it.pl.pt.se.no.dk.fi.ie.ch.at.cz.sk.gr.hu.ro.bg.hr.si.ee.lv.lt.ru.ua.tr.is.lu.li.mt.ca.us.mx.br.ar.cl.pe.ve.uy.au.nz.jp.kr.cn.tw.hk.sg.in.id.my.th.ph.vn.ae.sa.il.za.eg.ma.ke.ng".split("."))].sort((e, t) => t.length - e.length).join("|");
164
164
  //#endregion
165
165
  //#region ../../src/utils/markdown.ts
166
- function Oe(e) {
166
+ function Ne(e) {
167
167
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
168
168
  }
169
- function K(e) {
169
+ function U(e) {
170
170
  let t = e.trim();
171
171
  return /^https?:\/\//i.test(t) || /^mailto:/i.test(t) || t.startsWith("/") || t.startsWith("#") ? t : "#";
172
172
  }
173
- function ke(e) {
173
+ function Pe(e) {
174
174
  let t = e.trim();
175
- return /^tel:/i.test(t) ? t : K(t);
175
+ return /^tel:/i.test(t) ? t : U(t);
176
176
  }
177
- var Ae = "", je = RegExp(`${Ae}LBLINK(\\d+)${Ae}`, "g"), Me = RegExp(`\\b(?:https?:\\/\\/|www\\.)[^\\s<>"'${Ae}]+`, "gi"), Ne = /[.,!?)\]'">]+$/, Pe = RegExp(String.raw`\b([a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*\.(?:${De}))(?![a-z0-9-])((?:[\/:?#][^\s<>"'` + "]*)?)", "gi"), Fe = new RegExp(String.raw`\b([a-z0-9._%+-]+@[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*\.(?:${De}))\b`, "gi");
178
- function Ie(e, t) {
177
+ var Fe = "", Ie = RegExp(`${Fe}LBLINK(\\d+)${Fe}`, "g"), Le = RegExp(`\\b(?:https?:\\/\\/|www\\.)[^\\s<>"'${Fe}]+`, "gi"), Re = /[.,!?)\]'">]+$/, ze = RegExp(String.raw`\b([a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*\.(?:${Me}))(?![a-z0-9-])((?:[\/:?#][^\s<>"'` + "]*)?)", "gi"), Be = new RegExp(String.raw`\b([a-z0-9._%+-]+@[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*\.(?:${Me}))\b`, "gi");
178
+ function W(e, t) {
179
179
  let n = e.length;
180
- return e.push(t), `${Ae}LBLINK${n}${Ae}`;
180
+ return e.push(t), `${Fe}LBLINK${n}${Fe}`;
181
181
  }
182
- function Le(e, t) {
183
- return e.replace(Me, (e) => {
184
- let n = "", r = e.match(Ne);
182
+ function Ve(e, t) {
183
+ return e.replace(Le, (e) => {
184
+ let n = "", r = e.match(Re);
185
185
  r && (n = r[0], e = e.slice(0, -n.length));
186
- let i = K(/^www\./i.test(e) ? `https://${e}` : e);
187
- return i === "#" ? e + n : Ie(t, `<a href="${i}" target="_blank" rel="noopener noreferrer">${e}</a>`) + n;
186
+ let i = U(/^www\./i.test(e) ? `https://${e}` : e);
187
+ return i === "#" ? e + n : W(t, `<a href="${i}" target="_blank" rel="noopener noreferrer">${e}</a>`) + n;
188
188
  });
189
189
  }
190
- function Re(e, t) {
191
- return e.replace(Fe, (e) => {
192
- let n = K(`mailto:${e}`);
193
- return n === "#" ? e : Ie(t, `<a href="${n}" target="_blank" rel="noopener noreferrer">${e}</a>`);
190
+ function He(e, t) {
191
+ return e.replace(Be, (e) => {
192
+ let n = U(`mailto:${e}`);
193
+ return n === "#" ? e : W(t, `<a href="${n}" target="_blank" rel="noopener noreferrer">${e}</a>`);
194
194
  });
195
195
  }
196
- function ze(e, t) {
197
- return e.replace(Pe, (e, n, r) => {
198
- let i = r || "", a = "", o = i.match(Ne);
196
+ function Ue(e, t) {
197
+ return e.replace(ze, (e, n, r) => {
198
+ let i = r || "", a = "", o = i.match(Re);
199
199
  o && (a = o[0], i = i.slice(0, -a.length));
200
- let s = n + i, c = K(`https://${s}`);
201
- return c === "#" ? s + a : Ie(t, `<a href="${c}" target="_blank" rel="noopener noreferrer">${s}</a>`) + a;
200
+ let s = n + i, c = U(`https://${s}`);
201
+ return c === "#" ? s + a : W(t, `<a href="${c}" target="_blank" rel="noopener noreferrer">${s}</a>`) + a;
202
202
  });
203
203
  }
204
- function Be(e) {
204
+ function We(e) {
205
205
  if (!e) return "";
206
- let t = Oe(e.split(Ae).join("")), n = [];
206
+ let t = Ne(e.split(Fe).join("")), n = [];
207
207
  return t = t.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (e, t, r) => {
208
- let i = K(r), a = t.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/__(.+?)__/g, "<strong>$1</strong>").replace(/\*(.+?)\*/g, "<em>$1</em>").replace(/_(.+?)_/g, "<em>$1</em>");
209
- return Ie(n, `<a href="${i}" target="_blank" rel="noopener noreferrer">${a}</a>`);
208
+ let i = U(r), a = t.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/__(.+?)__/g, "<strong>$1</strong>").replace(/\*(.+?)\*/g, "<em>$1</em>").replace(/_(.+?)_/g, "<em>$1</em>");
209
+ return W(n, `<a href="${i}" target="_blank" rel="noopener noreferrer">${a}</a>`);
210
210
  }), t = t.replace(/&lt;(https?:\/\/\S+?)&gt;/gi, (e, t) => {
211
- let r = K(t);
212
- return r === "#" ? e : Ie(n, `<a href="${r}" target="_blank" rel="noopener noreferrer">${t}</a>`);
213
- }), t = Re(t, n), t = Le(t, n), t = ze(t, n), t = t.replace(/\n[-*_]{3,}\n/g, "\n<hr class=\"leadbot-markdown-hr\">\n"), t = t.replace(/\n######\s+(.+)/g, "\n<h6>$1</h6>"), t = t.replace(/\n#####\s+(.+)/g, "\n<h5>$1</h5>"), t = t.replace(/\n####\s+(.+)/g, "\n<h4>$1</h4>"), t = t.replace(/\n###\s+(.+)/g, "\n<h3>$1</h3>"), t = t.replace(/\n##\s+(.+)/g, "\n<h2>$1</h2>"), t = t.replace(/\n#\s+(.+)/g, "\n<h1>$1</h1>"), t = t.replace(/\n(\|.+\|)\n(\|[-:\s|]+\|)\n((?:\|.+\|\n?)*)/g, (e, t, n, r) => `\n<table class="leadbot-markdown-table"><thead><tr>${t.split("|").filter((e) => e.trim()).map((e) => `<th>${e.trim()}</th>`).join("")}</tr></thead><tbody>${r.trim().split("\n").map((e) => `<tr>${e.split("|").filter((e) => e.trim()).map((e) => `<td>${e.trim()}</td>`).join("")}</tr>`).join("")}</tbody></table>\n`), t = t.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__(.+?)__/g, "<strong>$1</strong>"), t = t.replace(/\*(.+?)\*/g, "<em>$1</em>"), t = t.replace(/_(.+?)_/g, "<em>$1</em>"), t = t.replace(/\n[-*+] (.+)/g, "\n<li>$1</li>"), t = t.replace(/(<li>.+<\/li>\n?)+/g, "<ul>$&</ul>"), t = t.replace(/\n\d+\. (.+)/g, "\n<li>$1</li>"), t = t.replace(/(<li>.+<\/li>\n?)+/g, (e) => e.includes("<ul>") ? e : `<ol>${e}</ol>`), t = t.replace(/\n?<\/(h[1-6]|table|ul|ol|hr)>\n?/g, "</$1>"), t = t.replace(/\n?<(h[1-6]|table|ul|ol|hr)/g, "<$1"), t = t.replace(/\n\n+/g, "<br><br>"), t = t.replace(/\n/g, "<br>"), t = t.replace(je, (e, t) => {
211
+ let r = U(t);
212
+ return r === "#" ? e : W(n, `<a href="${r}" target="_blank" rel="noopener noreferrer">${t}</a>`);
213
+ }), t = He(t, n), t = Ve(t, n), t = Ue(t, n), t = t.replace(/\n[-*_]{3,}\n/g, "\n<hr class=\"leadbot-markdown-hr\">\n"), t = t.replace(/\n######\s+(.+)/g, "\n<h6>$1</h6>"), t = t.replace(/\n#####\s+(.+)/g, "\n<h5>$1</h5>"), t = t.replace(/\n####\s+(.+)/g, "\n<h4>$1</h4>"), t = t.replace(/\n###\s+(.+)/g, "\n<h3>$1</h3>"), t = t.replace(/\n##\s+(.+)/g, "\n<h2>$1</h2>"), t = t.replace(/\n#\s+(.+)/g, "\n<h1>$1</h1>"), t = t.replace(/\n(\|.+\|)\n(\|[-:\s|]+\|)\n((?:\|.+\|\n?)*)/g, (e, t, n, r) => `\n<table class="leadbot-markdown-table"><thead><tr>${t.split("|").filter((e) => e.trim()).map((e) => `<th>${e.trim()}</th>`).join("")}</tr></thead><tbody>${r.trim().split("\n").map((e) => `<tr>${e.split("|").filter((e) => e.trim()).map((e) => `<td>${e.trim()}</td>`).join("")}</tr>`).join("")}</tbody></table>\n`), t = t.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__(.+?)__/g, "<strong>$1</strong>"), t = t.replace(/\*(.+?)\*/g, "<em>$1</em>"), t = t.replace(/_(.+?)_/g, "<em>$1</em>"), t = t.replace(/\n[-*+] (.+)/g, "\n<li>$1</li>"), t = t.replace(/(<li>.+<\/li>\n?)+/g, "<ul>$&</ul>"), t = t.replace(/\n\d+\. (.+)/g, "\n<li>$1</li>"), t = t.replace(/(<li>.+<\/li>\n?)+/g, (e) => e.includes("<ul>") ? e : `<ol>${e}</ol>`), t = t.replace(/\n?<\/(h[1-6]|table|ul|ol|hr)>\n?/g, "</$1>"), t = t.replace(/\n?<(h[1-6]|table|ul|ol|hr)/g, "<$1"), t = t.replace(/\n\n+/g, "<br><br>"), t = t.replace(/\n/g, "<br>"), t = t.replace(Ie, (e, t) => {
214
214
  let r = n[parseInt(t, 10)];
215
215
  return r === void 0 ? "" : r;
216
216
  }), t;
217
217
  }
218
- function Ve(e) {
219
- return e ? Oe(e).replace(/\n/g, "<br>") : "";
218
+ function Ge(e) {
219
+ return e ? Ne(e).replace(/\n/g, "<br>") : "";
220
220
  }
221
- var He = /\[\[C(\d+)\]\]/g;
222
- function Ue(e, t) {
221
+ var Ke = /\[\[C(\d+)\]\]/g;
222
+ function qe(e, t) {
223
223
  if (!t || t.length === 0) return {
224
- html: e.replace(He, ""),
224
+ html: e.replace(Ke, ""),
225
225
  sources: []
226
226
  };
227
227
  let n = /* @__PURE__ */ new Map();
228
228
  for (let e of t) n.set(e.chunk_id, e);
229
229
  let r = [], i = /* @__PURE__ */ new Map();
230
230
  return {
231
- html: e.replace(He, (e, t) => {
231
+ html: e.replace(Ke, (e, t) => {
232
232
  let a = parseInt(t, 10), o = n.get(a);
233
233
  if (!o || !/^https?:\/\//i.test(o.filename)) return "";
234
234
  let s = i.get(a);
235
235
  s === void 0 && (s = r.length + 1, i.set(a, s), r.push({
236
236
  index: s,
237
- url: K(o.filename)
237
+ url: U(o.filename)
238
238
  }));
239
- let c = K(o.filename), l = o.filename.replace(/^https?:\/\//, "");
240
- return `<a href="${Oe(c)}" target="_blank" rel="noopener noreferrer" class="leadbot-citation-link" title="${Oe(l)}">${s}</a>`;
239
+ let c = U(o.filename), l = o.filename.replace(/^https?:\/\//, "");
240
+ return `<a href="${Ne(c)}" target="_blank" rel="noopener noreferrer" class="leadbot-citation-link" title="${Ne(l)}">${s}</a>`;
241
241
  }),
242
242
  sources: r
243
243
  };
244
244
  }
245
245
  //#endregion
246
246
  //#region ../../node_modules/.pnpm/dompurify@3.4.14/node_modules/dompurify/dist/purify.es.mjs
247
- function We(e, t) {
247
+ function Je(e, t) {
248
248
  (t == null || t > e.length) && (t = e.length);
249
249
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
250
250
  return r;
251
251
  }
252
- function Ge(e) {
252
+ function Ye(e) {
253
253
  if (Array.isArray(e)) return e;
254
254
  }
255
- function Ke(e, t) {
255
+ function Xe(e, t) {
256
256
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
257
257
  if (n != null) {
258
258
  var r, i, a, o, s = [], c = !0, l = !1;
@@ -270,113 +270,113 @@ function Ke(e, t) {
270
270
  return s;
271
271
  }
272
272
  }
273
- function qe() {
273
+ function Ze() {
274
274
  throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
275
275
  }
276
- function Je(e, t) {
277
- return Ge(e) || Ke(e, t) || Ye(e, t) || qe();
276
+ function G(e, t) {
277
+ return Ye(e) || Xe(e, t) || Qe(e, t) || Ze();
278
278
  }
279
- function Ye(e, t) {
279
+ function Qe(e, t) {
280
280
  if (e) {
281
- if (typeof e == "string") return We(e, t);
281
+ if (typeof e == "string") return Je(e, t);
282
282
  var n = {}.toString.call(e).slice(8, -1);
283
- return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? We(e, t) : void 0;
283
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Je(e, t) : void 0;
284
284
  }
285
285
  }
286
- var Xe = Object.entries, q = Object.setPrototypeOf, Ze = Object.isFrozen, Qe = Object.getPrototypeOf, $e = Object.getOwnPropertyDescriptor, J = Object.freeze, Y = Object.seal, et = Object.create, tt = typeof Reflect < "u" && Reflect, nt = tt.apply, rt = tt.construct;
287
- J ||= function(e) {
286
+ var $e = Object.entries, et = Object.setPrototypeOf, tt = Object.isFrozen, nt = Object.getPrototypeOf, rt = Object.getOwnPropertyDescriptor, K = Object.freeze, q = Object.seal, it = Object.create, at = typeof Reflect < "u" && Reflect, ot = at.apply, st = at.construct;
287
+ K ||= function(e) {
288
288
  return e;
289
- }, Y ||= function(e) {
289
+ }, q ||= function(e) {
290
290
  return e;
291
- }, nt ||= function(e, t) {
291
+ }, ot ||= function(e, t) {
292
292
  var n = [...arguments].slice(2);
293
293
  return e.apply(t, n);
294
- }, rt ||= function(e) {
294
+ }, st ||= function(e) {
295
295
  return new e(...[...arguments].slice(1));
296
296
  };
297
- var it = Q(Array.prototype.forEach), at = Q(Array.prototype.lastIndexOf), ot = Q(Array.prototype.pop), st = Q(Array.prototype.push), ct = Q(Array.prototype.splice), lt = Array.isArray, ut = Q(String.prototype.toLowerCase), dt = Q(String.prototype.toString), ft = Q(String.prototype.match), pt = Q(String.prototype.replace), mt = Q(String.prototype.indexOf), ht = Q(String.prototype.trim), gt = Q(Number.prototype.toString), _t = Q(Boolean.prototype.toString), vt = typeof BigInt > "u" ? null : Q(BigInt.prototype.toString), yt = typeof Symbol > "u" ? null : Q(Symbol.prototype.toString), X = Q(Object.prototype.hasOwnProperty), bt = Q(Object.prototype.toString), Z = Q(RegExp.prototype.test), xt = St(TypeError);
298
- function Q(e) {
297
+ var ct = X(Array.prototype.forEach), lt = X(Array.prototype.lastIndexOf), ut = X(Array.prototype.pop), dt = X(Array.prototype.push), ft = X(Array.prototype.splice), pt = Array.isArray, mt = X(String.prototype.toLowerCase), ht = X(String.prototype.toString), gt = X(String.prototype.match), _t = X(String.prototype.replace), vt = X(String.prototype.indexOf), yt = X(String.prototype.trim), bt = X(Number.prototype.toString), xt = X(Boolean.prototype.toString), St = typeof BigInt > "u" ? null : X(BigInt.prototype.toString), Ct = typeof Symbol > "u" ? null : X(Symbol.prototype.toString), J = X(Object.prototype.hasOwnProperty), wt = X(Object.prototype.toString), Y = X(RegExp.prototype.test), Tt = Et(TypeError);
298
+ function X(e) {
299
299
  return function(t) {
300
300
  t instanceof RegExp && (t.lastIndex = 0);
301
301
  var n = [...arguments].slice(1);
302
- return nt(e, t, n);
302
+ return ot(e, t, n);
303
303
  };
304
304
  }
305
- function St(e) {
305
+ function Et(e) {
306
306
  return function() {
307
- return rt(e, [...arguments]);
307
+ return st(e, [...arguments]);
308
308
  };
309
309
  }
310
- function $(e, t) {
311
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ut;
312
- if (q && q(e, null), !lt(t)) return e;
310
+ function Z(e, t) {
311
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : mt;
312
+ if (et && et(e, null), !pt(t)) return e;
313
313
  let r = t.length;
314
314
  for (; r--;) {
315
315
  let i = t[r];
316
316
  if (typeof i == "string") {
317
317
  let e = n(i);
318
- e !== i && (Ze(t) || (t[r] = e), i = e);
318
+ e !== i && (tt(t) || (t[r] = e), i = e);
319
319
  }
320
320
  e[i] = !0;
321
321
  }
322
322
  return e;
323
323
  }
324
- function Ct(e) {
325
- for (let t = 0; t < e.length; t++) X(e, t) || (e[t] = null);
324
+ function Dt(e) {
325
+ for (let t = 0; t < e.length; t++) J(e, t) || (e[t] = null);
326
326
  return e;
327
327
  }
328
- function wt(e) {
329
- let t = et(null);
330
- for (let r of Xe(e)) {
331
- var n = Je(r, 2);
328
+ function Q(e) {
329
+ let t = it(null);
330
+ for (let r of $e(e)) {
331
+ var n = G(r, 2);
332
332
  let i = n[0], a = n[1];
333
- X(e, i) && (t[i] = lt(a) ? Ct(a) : a && typeof a == "object" && a.constructor === Object ? wt(a) : a);
333
+ J(e, i) && (t[i] = pt(a) ? Dt(a) : a && typeof a == "object" && a.constructor === Object ? Q(a) : a);
334
334
  }
335
335
  return t;
336
336
  }
337
- function Tt(e) {
337
+ function Ot(e) {
338
338
  switch (typeof e) {
339
339
  case "string": return e;
340
- case "number": return gt(e);
341
- case "boolean": return _t(e);
342
- case "bigint": return vt ? vt(e) : "0";
343
- case "symbol": return yt ? yt(e) : "Symbol()";
344
- case "undefined": return bt(e);
340
+ case "number": return bt(e);
341
+ case "boolean": return xt(e);
342
+ case "bigint": return St ? St(e) : "0";
343
+ case "symbol": return Ct ? Ct(e) : "Symbol()";
344
+ case "undefined": return wt(e);
345
345
  case "function":
346
346
  case "object": {
347
- if (e === null) return bt(e);
348
- let t = e, n = Et(t, "toString");
347
+ if (e === null) return wt(e);
348
+ let t = e, n = kt(t, "toString");
349
349
  if (typeof n == "function") {
350
350
  let e = n(t);
351
- return typeof e == "string" ? e : bt(e);
351
+ return typeof e == "string" ? e : wt(e);
352
352
  }
353
- return bt(e);
353
+ return wt(e);
354
354
  }
355
- default: return bt(e);
355
+ default: return wt(e);
356
356
  }
357
357
  }
358
- function Et(e, t) {
358
+ function kt(e, t) {
359
359
  for (; e !== null;) {
360
- let n = $e(e, t);
360
+ let n = rt(e, t);
361
361
  if (n) {
362
- if (n.get) return Q(n.get);
363
- if (typeof n.value == "function") return Q(n.value);
362
+ if (n.get) return X(n.get);
363
+ if (typeof n.value == "function") return X(n.value);
364
364
  }
365
- e = Qe(e);
365
+ e = nt(e);
366
366
  }
367
367
  function n() {
368
368
  return null;
369
369
  }
370
370
  return n;
371
371
  }
372
- function Dt(e) {
372
+ function At(e) {
373
373
  try {
374
- return Z(e, ""), !0;
374
+ return Y(e, ""), !0;
375
375
  } catch {
376
376
  return !1;
377
377
  }
378
378
  }
379
- var Ot = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), kt = J(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), At = J([
379
+ var jt = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Mt = K(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Nt = K([
380
380
  "feBlend",
381
381
  "feColorMatrix",
382
382
  "feComponentTransfer",
@@ -402,7 +402,7 @@ var Ot = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
402
402
  "feSpotLight",
403
403
  "feTile",
404
404
  "feTurbulence"
405
- ]), jt = J([
405
+ ]), Pt = K([
406
406
  "animate",
407
407
  "color-profile",
408
408
  "cursor",
@@ -425,7 +425,7 @@ var Ot = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
425
425
  "solidcolor",
426
426
  "unknown",
427
427
  "use"
428
- ]), Mt = J(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Nt = J([
428
+ ]), Ft = K(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), It = K([
429
429
  "maction",
430
430
  "maligngroup",
431
431
  "malignmark",
@@ -441,13 +441,13 @@ var Ot = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
441
441
  "annotation-xml",
442
442
  "mprescripts",
443
443
  "none"
444
- ]), Pt = J(["#text"]), Ft = J(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), It = J(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Lt = J(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Rt = J([
444
+ ]), Lt = K(["#text"]), Rt = K(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), zt = K(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Bt = K(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Vt = K([
445
445
  "xlink:href",
446
446
  "xml:id",
447
447
  "xlink:title",
448
448
  "xml:space",
449
449
  "xmlns:xlink"
450
- ]), zt = Y(/{{[\w\W]*|^[\w\W]*}}/g), Bt = Y(/<%[\w\W]*|^[\w\W]*%>/g), Vt = Y(/\${[\w\W]*/g), Ht = Y(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ut = Y(/^aria-[\-\w]+$/), Wt = Y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Gt = Y(/^(?:\w+script|data):/i), Kt = Y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), qt = Y(/^html$/i), Jt = Y(/^[a-z][.\w]*(-[.\w]+)+$/i), Yt = Y(/<[/\w!]/g), Xt = Y(/<[/\w]/g), Zt = Y(/<\/no(script|embed|frames)/i), Qt = Y(/\/>/i), $t = {
450
+ ]), Ht = q(/{{[\w\W]*|^[\w\W]*}}/g), Ut = q(/<%[\w\W]*|^[\w\W]*%>/g), Wt = q(/\${[\w\W]*/g), Gt = q(/^data-[\-\w.\u00B7-\uFFFF]+$/), Kt = q(/^aria-[\-\w]+$/), qt = q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Jt = q(/^(?:\w+script|data):/i), Yt = q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Xt = q(/^html$/i), Zt = q(/^[a-z][.\w]*(-[.\w]+)+$/i), Qt = q(/<[/\w!]/g), $t = q(/<[/\w]/g), en = q(/<\/no(script|embed|frames)/i), tn = q(/\/>/i), $ = {
451
451
  element: 1,
452
452
  attribute: 2,
453
453
  text: 3,
@@ -460,7 +460,7 @@ var Ot = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
460
460
  documentType: 10,
461
461
  documentFragment: 11,
462
462
  notation: 12
463
- }, en = [
463
+ }, nn = [
464
464
  "style",
465
465
  "script",
466
466
  "xmp",
@@ -469,14 +469,14 @@ var Ot = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
469
469
  "noframes",
470
470
  "plaintext",
471
471
  "noscript"
472
- ], tn = J($({}, en)), nn = function() {
472
+ ], rn = K(Z({}, nn)), an = function() {
473
473
  let e = {};
474
- return it(en, (t) => {
475
- e[t] = Y(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
476
- }), J(e);
477
- }(), rn = function() {
474
+ return ct(nn, (t) => {
475
+ e[t] = q(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
476
+ }), K(e);
477
+ }(), on = function() {
478
478
  return typeof window > "u" ? null : window;
479
- }, an = function(e, t) {
479
+ }, sn = function(e, t) {
480
480
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
481
481
  let n = null, r = "data-tt-policy-suffix";
482
482
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -493,7 +493,7 @@ var Ot = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
493
493
  } catch {
494
494
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
495
495
  }
496
- }, on = function() {
496
+ }, cn = function() {
497
497
  return {
498
498
  afterSanitizeAttributes: [],
499
499
  afterSanitizeElements: [],
@@ -505,20 +505,20 @@ var Ot = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
505
505
  uponSanitizeElement: [],
506
506
  uponSanitizeShadowNode: []
507
507
  };
508
- }, sn = function(e, t, n, r) {
509
- return X(e, t) && lt(e[t]) ? $(r.base ? wt(r.base) : {}, e[t], r.transform) : n;
510
- }, cn = function(e, t, n) {
511
- let r = X(e, t) ? e[t] : void 0;
512
- return r && typeof r == "object" ? wt(r) : n();
508
+ }, ln = function(e, t, n, r) {
509
+ return J(e, t) && pt(e[t]) ? Z(r.base ? Q(r.base) : {}, e[t], r.transform) : n;
510
+ }, un = function(e, t, n) {
511
+ let r = J(e, t) ? e[t] : void 0;
512
+ return r && typeof r == "object" ? Q(r) : n();
513
513
  };
514
- function ln() {
515
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : rn(), t = (e) => ln(e);
516
- if (t.version = "3.4.14", t.removed = [], !e || !e.document || e.document.nodeType !== $t.document || !e.Element) return t.isSupported = !1, t;
514
+ function dn() {
515
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : on(), t = (e) => dn(e);
516
+ if (t.version = "3.4.14", t.removed = [], !e || !e.document || e.document.nodeType !== $.document || !e.Element) return t.isSupported = !1, t;
517
517
  let n = e.document, r = n, i = r.currentScript;
518
518
  e.DocumentFragment;
519
519
  let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
520
520
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
521
- let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Et(d, "cloneNode"), p = Et(d, "remove"), m = Et(d, "nextSibling"), h = Et(d, "childNodes"), g = Et(d, "parentNode"), _ = Et(d, "shadowRoot"), v = Et(d, "attributes"), y = o && o.prototype ? Et(o.prototype, "nodeType") : null, b = o && o.prototype ? Et(o.prototype, "nodeName") : null, x = o && o.prototype ? Et(o.prototype, "ownerDocument") : null, S = function(e) {
521
+ let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = kt(d, "cloneNode"), p = kt(d, "remove"), m = kt(d, "nextSibling"), h = kt(d, "childNodes"), g = kt(d, "parentNode"), _ = kt(d, "shadowRoot"), v = kt(d, "attributes"), y = o && o.prototype ? kt(o.prototype, "nodeType") : null, b = o && o.prototype ? kt(o.prototype, "nodeName") : null, x = o && o.prototype ? kt(o.prototype, "ownerDocument") : null, S = function(e) {
522
522
  return y ? y(e) : e.nodeType;
523
523
  }, C = function(e) {
524
524
  return b ? b(e) : e.nodeName;
@@ -528,7 +528,7 @@ function ln() {
528
528
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
529
529
  }
530
530
  let w, T = "", E, D = !1, O = 0, k = function() {
531
- if (O > 0) throw xt("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
531
+ if (O > 0) throw Tt("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
532
532
  }, A = function(e) {
533
533
  k(), O++;
534
534
  try {
@@ -544,21 +544,21 @@ function ln() {
544
544
  O--;
545
545
  }
546
546
  }, j = function() {
547
- return D ||= (E = an(u, i), !0), E;
548
- }, M = n, te = M.implementation, N = M.createNodeIterator, P = M.createDocumentFragment, F = M.getElementsByTagName, I = r.importNode, L = on();
549
- t.isSupported = typeof Xe == "function" && typeof g == "function" && te && te.createHTMLDocument !== void 0;
550
- let R = zt, ne = Bt, re = Vt, z = Ht, ie = Ut, ae = Gt, oe = Kt, se = Jt, ce = Wt, B = null, le = $({}, [
551
- ...Ot,
552
- ...kt,
553
- ...At,
547
+ return D ||= (E = sn(u, i), !0), E;
548
+ }, M = n, te = M.implementation, ne = M.createNodeIterator, N = M.createDocumentFragment, P = M.getElementsByTagName, F = r.importNode, I = cn();
549
+ t.isSupported = typeof $e == "function" && typeof g == "function" && te && te.createHTMLDocument !== void 0;
550
+ let re = Ht, ie = Ut, ae = Wt, oe = Gt, L = Kt, se = Jt, ce = Yt, le = Zt, ue = qt, R = null, de = Z({}, [
551
+ ...jt,
554
552
  ...Mt,
555
- ...Pt
556
- ]), V = null, ue = $({}, [
553
+ ...Nt,
557
554
  ...Ft,
558
- ...It,
559
- ...Lt,
560
- ...Rt
561
- ]), H = Object.seal(et(null, {
555
+ ...Lt
556
+ ]), z = null, fe = Z({}, [
557
+ ...Rt,
558
+ ...zt,
559
+ ...Bt,
560
+ ...Vt
561
+ ]), B = Object.seal(it(null, {
562
562
  tagNameCheck: {
563
563
  writable: !0,
564
564
  configurable: !1,
@@ -577,7 +577,7 @@ function ln() {
577
577
  enumerable: !0,
578
578
  value: !1
579
579
  }
580
- })), de = null, fe = null, pe = Object.seal(et(null, {
580
+ })), pe = null, me = null, he = Object.seal(it(null, {
581
581
  tagCheck: {
582
582
  writable: !0,
583
583
  configurable: !1,
@@ -590,14 +590,14 @@ function ln() {
590
590
  enumerable: !0,
591
591
  value: null
592
592
  }
593
- })), me = !0, he = !0, ge = !1, _e = !0, U = !1, ve = !0, ye = !1, be = !1, xe = null, Se = null, Ce = !1, we = !1, W = !1, Te = !1, Ee = !0, G = !1, De = "user-content-", Oe = !0, K = !1, ke = {}, Ae = null, je = $({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Me = null, Ne = $({}, [
593
+ })), ge = !0, _e = !0, ve = !1, ye = !0, be = !1, xe = !0, V = !1, Se = !1, Ce = null, we = null, Te = !1, Ee = !1, De = !1, Oe = !1, ke = !0, Ae = !1, je = "user-content-", H = !0, Me = !1, Ne = {}, U = null, Pe = Z({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Fe = null, Ie = Z({}, [
594
594
  "audio",
595
595
  "video",
596
596
  "img",
597
597
  "source",
598
598
  "image",
599
599
  "track"
600
- ]), Pe = null, Fe = $({}, [
600
+ ]), Le = null, Re = Z({}, [
601
601
  "alt",
602
602
  "class",
603
603
  "for",
@@ -612,42 +612,42 @@ function ln() {
612
612
  "value",
613
613
  "style",
614
614
  "xmlns"
615
- ]), Ie = "http://www.w3.org/1998/Math/MathML", Le = "http://www.w3.org/2000/svg", Re = "http://www.w3.org/1999/xhtml", ze = Re, Be = !1, Ve = null, He = $({}, [
616
- Ie,
617
- Le,
618
- Re
619
- ], dt), Ue = J([
615
+ ]), ze = "http://www.w3.org/1998/Math/MathML", Be = "http://www.w3.org/2000/svg", W = "http://www.w3.org/1999/xhtml", Ve = W, He = !1, Ue = null, We = Z({}, [
616
+ ze,
617
+ Be,
618
+ W
619
+ ], ht), Ge = K([
620
620
  "mi",
621
621
  "mo",
622
622
  "mn",
623
623
  "ms",
624
624
  "mtext"
625
- ]), We = $({}, Ue), Ge = J(["annotation-xml"]), Ke = $({}, Ge), qe = $({}, [
625
+ ]), Ke = Z({}, Ge), qe = K(["annotation-xml"]), Je = Z({}, qe), Ye = Z({}, [
626
626
  "title",
627
627
  "style",
628
628
  "font",
629
629
  "a",
630
630
  "script"
631
- ]), Je = null, Ye = ["application/xhtml+xml", "text/html"], q = null, Ze = null, Qe = n.createElement("form"), $e = function(e) {
631
+ ]), Xe = null, Ze = ["application/xhtml+xml", "text/html"], G = null, Qe = null, et = n.createElement("form"), tt = function(e) {
632
632
  return e instanceof RegExp || e instanceof Function;
633
- }, tt = function() {
633
+ }, nt = function() {
634
634
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
635
- if (Ze && Ze === e) return;
636
- (!e || typeof e != "object") && (e = {}), e = wt(e), Je = Ye.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, q = Je === "application/xhtml+xml" ? dt : ut, B = sn(e, "ALLOWED_TAGS", le, { transform: q }), V = sn(e, "ALLOWED_ATTR", ue, { transform: q }), Ve = sn(e, "ALLOWED_NAMESPACES", He, { transform: dt }), Pe = sn(e, "ADD_URI_SAFE_ATTR", Fe, {
637
- transform: q,
638
- base: Fe
639
- }), Me = sn(e, "ADD_DATA_URI_TAGS", Ne, {
640
- transform: q,
641
- base: Ne
642
- }), Ae = sn(e, "FORBID_CONTENTS", je, { transform: q }), de = sn(e, "FORBID_TAGS", wt({}), { transform: q }), fe = sn(e, "FORBID_ATTR", wt({}), { transform: q }), ke = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? wt(e.USE_PROFILES) : e.USE_PROFILES : !1, me = e.ALLOW_ARIA_ATTR !== !1, he = e.ALLOW_DATA_ATTR !== !1, ge = e.ALLOW_UNKNOWN_PROTOCOLS || !1, _e = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, U = e.SAFE_FOR_TEMPLATES || !1, ve = e.SAFE_FOR_XML !== !1, ye = e.WHOLE_DOCUMENT || !1, we = e.RETURN_DOM || !1, W = e.RETURN_DOM_FRAGMENT || !1, Te = e.RETURN_TRUSTED_TYPE || !1, Ce = e.FORCE_BODY || !1, Ee = e.SANITIZE_DOM !== !1, G = e.SANITIZE_NAMED_PROPS || !1, Oe = e.KEEP_CONTENT !== !1, K = e.IN_PLACE || !1, ce = Dt(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Wt, ze = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Re, We = cn(e, "MATHML_TEXT_INTEGRATION_POINTS", () => $({}, Ue)), Ke = cn(e, "HTML_INTEGRATION_POINTS", () => $({}, Ge));
643
- let t = cn(e, "CUSTOM_ELEMENT_HANDLING", () => et(null));
644
- if (H = et(null), X(t, "tagNameCheck") && $e(t.tagNameCheck) && (H.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && $e(t.attributeNameCheck) && (H.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (H.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), Y(H), U && (he = !1), W && (we = !0), ke && (B = $({}, Pt), V = et(null), ke.html === !0 && ($(B, Ot), $(V, Ft)), ke.svg === !0 && ($(B, kt), $(V, It), $(V, Rt)), ke.svgFilters === !0 && ($(B, At), $(V, It), $(V, Rt)), ke.mathMl === !0 && ($(B, Mt), $(V, Lt), $(V, Rt))), pe.tagCheck = null, pe.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? pe.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (B === le && (B = wt(B)), $(B, e.ADD_TAGS, q))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? pe.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (V === ue && (V = wt(V)), $(V, e.ADD_ATTR, q))), X(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (Ae === je && (Ae = wt(Ae)), $(Ae, e.ADD_FORBID_CONTENTS, q)), Oe && (B["#text"] = !0), ye && $(B, [
635
+ if (Qe && Qe === e) return;
636
+ (!e || typeof e != "object") && (e = {}), e = Q(e), Xe = Ze.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, G = Xe === "application/xhtml+xml" ? ht : mt, R = ln(e, "ALLOWED_TAGS", de, { transform: G }), z = ln(e, "ALLOWED_ATTR", fe, { transform: G }), Ue = ln(e, "ALLOWED_NAMESPACES", We, { transform: ht }), Le = ln(e, "ADD_URI_SAFE_ATTR", Re, {
637
+ transform: G,
638
+ base: Re
639
+ }), Fe = ln(e, "ADD_DATA_URI_TAGS", Ie, {
640
+ transform: G,
641
+ base: Ie
642
+ }), U = ln(e, "FORBID_CONTENTS", Pe, { transform: G }), pe = ln(e, "FORBID_TAGS", Q({}), { transform: G }), me = ln(e, "FORBID_ATTR", Q({}), { transform: G }), Ne = J(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Q(e.USE_PROFILES) : e.USE_PROFILES : !1, ge = e.ALLOW_ARIA_ATTR !== !1, _e = e.ALLOW_DATA_ATTR !== !1, ve = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ye = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, be = e.SAFE_FOR_TEMPLATES || !1, xe = e.SAFE_FOR_XML !== !1, V = e.WHOLE_DOCUMENT || !1, Ee = e.RETURN_DOM || !1, De = e.RETURN_DOM_FRAGMENT || !1, Oe = e.RETURN_TRUSTED_TYPE || !1, Te = e.FORCE_BODY || !1, ke = e.SANITIZE_DOM !== !1, Ae = e.SANITIZE_NAMED_PROPS || !1, H = e.KEEP_CONTENT !== !1, Me = e.IN_PLACE || !1, ue = At(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : qt, Ve = typeof e.NAMESPACE == "string" ? e.NAMESPACE : W, Ke = un(e, "MATHML_TEXT_INTEGRATION_POINTS", () => Z({}, Ge)), Je = un(e, "HTML_INTEGRATION_POINTS", () => Z({}, qe));
643
+ let t = un(e, "CUSTOM_ELEMENT_HANDLING", () => it(null));
644
+ if (B = it(null), J(t, "tagNameCheck") && tt(t.tagNameCheck) && (B.tagNameCheck = t.tagNameCheck), J(t, "attributeNameCheck") && tt(t.attributeNameCheck) && (B.attributeNameCheck = t.attributeNameCheck), J(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (B.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), q(B), be && (_e = !1), De && (Ee = !0), Ne && (R = Z({}, Lt), z = it(null), Ne.html === !0 && (Z(R, jt), Z(z, Rt)), Ne.svg === !0 && (Z(R, Mt), Z(z, zt), Z(z, Vt)), Ne.svgFilters === !0 && (Z(R, Nt), Z(z, zt), Z(z, Vt)), Ne.mathMl === !0 && (Z(R, Ft), Z(z, Bt), Z(z, Vt))), he.tagCheck = null, he.attributeCheck = null, J(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? he.tagCheck = e.ADD_TAGS : pt(e.ADD_TAGS) && (R === de && (R = Q(R)), Z(R, e.ADD_TAGS, G))), J(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? he.attributeCheck = e.ADD_ATTR : pt(e.ADD_ATTR) && (z === fe && (z = Q(z)), Z(z, e.ADD_ATTR, G))), J(e, "ADD_FORBID_CONTENTS") && pt(e.ADD_FORBID_CONTENTS) && (U === Pe && (U = Q(U)), Z(U, e.ADD_FORBID_CONTENTS, G)), H && (R["#text"] = !0), V && Z(R, [
645
645
  "html",
646
646
  "head",
647
647
  "body"
648
- ]), B.table && ($(B, ["tbody"]), delete de.tbody), e.TRUSTED_TYPES_POLICY) {
649
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw xt("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
650
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw xt("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
648
+ ]), R.table && (Z(R, ["tbody"]), delete pe.tbody), e.TRUSTED_TYPES_POLICY) {
649
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Tt("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
650
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Tt("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
651
651
  let t = w;
652
652
  w = e.TRUSTED_TYPES_POLICY;
653
653
  try {
@@ -656,33 +656,33 @@ function ln() {
656
656
  throw w = t, e;
657
657
  }
658
658
  } else e.TRUSTED_TYPES_POLICY === null ? (w = void 0, T = "") : (w === void 0 && (w = j()), w && typeof T == "string" && (T = A("")));
659
- J && J(e), Ze = e;
660
- }, nt = $({}, [
661
- ...kt,
662
- ...At,
663
- ...jt
664
- ]), rt = $({}, [...Mt, ...Nt]), gt = function(e, t, n) {
665
- return t.namespaceURI === Re ? e === "svg" : t.namespaceURI === Ie ? e === "svg" && (n === "annotation-xml" || We[n]) : !!nt[e];
666
- }, _t = function(e, t, n) {
667
- return t.namespaceURI === Re ? e === "math" : t.namespaceURI === Le ? e === "math" && Ke[n] : !!rt[e];
668
- }, vt = function(e, t, n) {
669
- return t.namespaceURI === Le && !Ke[n] || t.namespaceURI === Ie && !We[n] ? !1 : !rt[e] && (qe[e] || !nt[e]);
670
- }, yt = function(e) {
659
+ K && K(e), Qe = e;
660
+ }, rt = Z({}, [
661
+ ...Mt,
662
+ ...Nt,
663
+ ...Pt
664
+ ]), at = Z({}, [...Ft, ...It]), ot = function(e, t, n) {
665
+ return t.namespaceURI === W ? e === "svg" : t.namespaceURI === ze ? e === "svg" && (n === "annotation-xml" || Ke[n]) : !!rt[e];
666
+ }, st = function(e, t, n) {
667
+ return t.namespaceURI === W ? e === "math" : t.namespaceURI === Be ? e === "math" && Je[n] : !!at[e];
668
+ }, bt = function(e, t, n) {
669
+ return t.namespaceURI === Be && !Je[n] || t.namespaceURI === ze && !Ke[n] ? !1 : !at[e] && (Ye[e] || !rt[e]);
670
+ }, xt = function(e) {
671
671
  let t = g(e);
672
672
  (!t || !t.tagName) && (t = {
673
- namespaceURI: ze,
673
+ namespaceURI: Ve,
674
674
  tagName: "template"
675
675
  });
676
- let n = ut(e.tagName), r = ut(t.tagName);
677
- return Ve[e.namespaceURI] ? e.namespaceURI === Le ? gt(n, t, r) : e.namespaceURI === Ie ? _t(n, t, r) : e.namespaceURI === Re ? vt(n, t, r) : !!(Je === "application/xhtml+xml" && Ve[e.namespaceURI]) : !1;
678
- }, bt = function(e) {
679
- st(t.removed, { element: e });
676
+ let n = mt(e.tagName), r = mt(t.tagName);
677
+ return Ue[e.namespaceURI] ? e.namespaceURI === Be ? ot(n, t, r) : e.namespaceURI === ze ? st(n, t, r) : e.namespaceURI === W ? bt(n, t, r) : !!(Xe === "application/xhtml+xml" && Ue[e.namespaceURI]) : !1;
678
+ }, St = function(e) {
679
+ dt(t.removed, { element: e });
680
680
  try {
681
681
  g(e).removeChild(e);
682
682
  } catch {
683
- if (p(e), !g(e)) throw xt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
683
+ if (p(e), !g(e)) throw Tt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
684
684
  }
685
- }, Q = function(e, t, n) {
685
+ }, Ct = function(e, t, n) {
686
686
  try {
687
687
  e.removeAttributeNode(t);
688
688
  } catch {
@@ -690,14 +690,14 @@ function ln() {
690
690
  e.removeAttribute(n);
691
691
  } catch {}
692
692
  }
693
- }, St = function(e) {
694
- un(e);
693
+ }, wt = function(e) {
694
+ Dt(e);
695
695
  let t = h(e);
696
696
  if (t) {
697
697
  let e = [];
698
- it(t, (t) => {
699
- st(e, t);
700
- }), it(e, (e) => {
698
+ ct(t, (t) => {
699
+ dt(e, t);
700
+ }), ct(e, (e) => {
701
701
  try {
702
702
  p(e);
703
703
  } catch {}
@@ -706,15 +706,15 @@ function ln() {
706
706
  let n = v(e);
707
707
  if (n) for (let t = n.length - 1; t >= 0; --t) {
708
708
  let r = n[t], i = r && r.name;
709
- typeof i == "string" && Q(e, r, i);
709
+ typeof i == "string" && Ct(e, r, i);
710
710
  }
711
- }, Ct = function(e, n, r) {
711
+ }, X = function(e, n, r) {
712
712
  if (!r) try {
713
713
  r = n.getAttributeNode(e);
714
714
  } catch {
715
715
  r = null;
716
716
  }
717
- st(t.removed, {
717
+ dt(t.removed, {
718
718
  attribute: r || null,
719
719
  from: n
720
720
  });
@@ -726,44 +726,44 @@ function ln() {
726
726
  } catch {}
727
727
  }
728
728
  if (e === "is") {
729
- if (we || W) try {
730
- bt(n);
729
+ if (Ee || De) try {
730
+ St(n);
731
731
  } catch {}
732
732
  else try {
733
733
  n.setAttribute(e, "");
734
734
  } catch {}
735
735
  }
736
- }, en = function(e) {
736
+ }, Et = function(e) {
737
737
  let t = v(e);
738
738
  if (t) for (let n = t.length - 1; n >= 0; --n) {
739
739
  let r = t[n], i = r && r.name;
740
- typeof i != "string" || V[q(i)] || Q(e, r, i);
740
+ typeof i != "string" || z[G(i)] || Ct(e, r, i);
741
741
  }
742
- }, un = function(e) {
742
+ }, Dt = function(e) {
743
743
  let t = [e];
744
744
  for (; t.length > 0;) {
745
745
  let e = t.pop();
746
- S(e) === $t.element && en(e);
746
+ S(e) === $.element && Et(e);
747
747
  let n = h(e);
748
748
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
749
749
  }
750
- }, dn = function(e, t) {
751
- return ve ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
750
+ }, nn = function(e, t) {
751
+ return xe ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
752
752
  }, fn = function(e) {
753
- if (!ve) return;
753
+ if (!xe) return;
754
754
  let t = [e];
755
755
  for (; t.length > 0;) {
756
756
  let e = t.pop(), n = S(e);
757
- if (n === $t.processingInstruction || n === $t.comment && Z(Xt, e.data)) {
757
+ if (n === $.processingInstruction || n === $.comment && Y($t, e.data)) {
758
758
  try {
759
759
  p(e);
760
760
  } catch {}
761
761
  continue;
762
762
  }
763
- if (n === $t.element) {
764
- let t = e, n = q(C(e));
763
+ if (n === $.element) {
764
+ let t = e, n = G(C(e));
765
765
  try {
766
- t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && dn("for", n) && t.removeAttribute("for");
766
+ t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && nn("for", n) && t.removeAttribute("for");
767
767
  } catch {}
768
768
  }
769
769
  let r = h(e);
@@ -771,44 +771,44 @@ function ln() {
771
771
  }
772
772
  }, pn = function(e) {
773
773
  let t = null, r = null;
774
- if (Ce) e = "<remove></remove>" + e;
774
+ if (Te) e = "<remove></remove>" + e;
775
775
  else {
776
- let t = ft(e, /^[\r\n\t ]+/);
776
+ let t = gt(e, /^[\r\n\t ]+/);
777
777
  r = t && t[0];
778
778
  }
779
- Je === "application/xhtml+xml" && ze === Re && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
779
+ Xe === "application/xhtml+xml" && Ve === W && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
780
780
  let i = w ? A(e) : e;
781
- if (ze === Re) try {
782
- t = new l().parseFromString(i, Je);
781
+ if (Ve === W) try {
782
+ t = new l().parseFromString(i, Xe);
783
783
  } catch {}
784
784
  if (!t || !t.documentElement) {
785
- t = te.createDocument(ze, "template", null);
785
+ t = te.createDocument(Ve, "template", null);
786
786
  try {
787
- t.documentElement.innerHTML = Be ? T : i;
787
+ t.documentElement.innerHTML = He ? T : i;
788
788
  } catch {}
789
789
  }
790
790
  let a = t.body || t.documentElement;
791
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), ze === Re ? F.call(t, ye ? "html" : "body")[0] : ye ? t.documentElement : a;
791
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Ve === W ? P.call(t, V ? "html" : "body")[0] : V ? t.documentElement : a;
792
792
  }, mn = function(e) {
793
793
  let t = x ? x(e) : e.ownerDocument;
794
- return N.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
794
+ return ne.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
795
795
  }, hn = function(e) {
796
- return e = pt(e, R, " "), e = pt(e, ne, " "), e = pt(e, re, " "), e;
796
+ return e = _t(e, re, " "), e = _t(e, ie, " "), e = _t(e, ae, " "), e;
797
797
  }, gn = function(e) {
798
798
  e.normalize();
799
- let t = x ? x(e) : e.ownerDocument, n = N.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
799
+ let t = x ? x(e) : e.ownerDocument, n = ne.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
800
800
  for (; r;) r.data = hn(r.data), r = n.nextNode();
801
801
  let i = e.querySelectorAll?.call(e, "template");
802
- i && it(i, (e) => {
802
+ i && ct(i, (e) => {
803
803
  vn(e.content) && gn(e.content);
804
804
  });
805
805
  }, _n = function(e) {
806
806
  let t = b ? b(e) : null;
807
- return typeof t != "string" || q(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== v(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== y(e) || e.childNodes !== h(e);
807
+ return typeof t != "string" || G(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== v(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== y(e) || e.childNodes !== h(e);
808
808
  }, vn = function(e) {
809
809
  if (!y || typeof e != "object" || !e) return !1;
810
810
  try {
811
- return y(e) === $t.documentFragment;
811
+ return y(e) === $.documentFragment;
812
812
  } catch {
813
813
  return !1;
814
814
  }
@@ -821,17 +821,17 @@ function ln() {
821
821
  }
822
822
  };
823
823
  function bn(e, n, r) {
824
- e.length !== 0 && it(e, (e) => {
825
- e.call(t, n, r, Ze);
824
+ e.length !== 0 && ct(e, (e) => {
825
+ e.call(t, n, r, Qe);
826
826
  });
827
827
  }
828
828
  let xn = function(e, t) {
829
- return !!(ve && e.hasChildNodes() && !yn(e.firstElementChild) && Z(Yt, e.textContent) && Z(Yt, e.innerHTML) || ve && e.namespaceURI === Re && tn[t] && (yn(e.firstElementChild) || typeof e.textContent == "string" && Z(nn[t], e.textContent)) || e.nodeType === $t.processingInstruction || ve && e.nodeType === $t.comment && Z(Xt, e.data));
829
+ return !!(xe && e.hasChildNodes() && !yn(e.firstElementChild) && Y(Qt, e.textContent) && Y(Qt, e.innerHTML) || xe && e.namespaceURI === W && rn[t] && (yn(e.firstElementChild) || typeof e.textContent == "string" && Y(an[t], e.textContent)) || e.nodeType === $.processingInstruction || xe && e.nodeType === $.comment && Y($t, e.data));
830
830
  }, Sn = function(e, t) {
831
- return e instanceof RegExp ? Z(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
831
+ return e instanceof RegExp ? Y(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
832
832
  }, Cn = function(e, t, n) {
833
- if (!de[t] && kn(t) && Sn(H.tagNameCheck, t)) return !1;
834
- if (Oe && !Ae[t]) {
833
+ if (!pe[t] && kn(t) && Sn(B.tagNameCheck, t)) return !1;
834
+ if (H && !U[t]) {
835
835
  let t = g(e), r = h(e);
836
836
  if (r && t) {
837
837
  let i = r.length;
@@ -841,35 +841,35 @@ function ln() {
841
841
  }
842
842
  }
843
843
  }
844
- return bt(e), !0;
844
+ return St(e), !0;
845
845
  }, wn = function(e, t, n, r) {
846
- return e.length === 0 ? t : t === n || t === r ? wt(t) : t;
846
+ return e.length === 0 ? t : t === n || t === r ? Q(t) : t;
847
847
  }, Tn = function(e, t) {
848
- return e === t || g(e) !== null ? !1 : (K && un(e), !0);
848
+ return e === t || g(e) !== null ? !1 : (Me && Dt(e), !0);
849
849
  }, En = function(e, n) {
850
- if (bn(L.beforeSanitizeElements, e, null), Tn(e, n)) return !0;
851
- if (_n(e)) return bt(e), !0;
852
- let r = q(C(e));
853
- if (B = wn(L.uponSanitizeElement, B, le, xe), bn(L.uponSanitizeElement, e, {
850
+ if (bn(I.beforeSanitizeElements, e, null), Tn(e, n)) return !0;
851
+ if (_n(e)) return St(e), !0;
852
+ let r = G(C(e));
853
+ if (R = wn(I.uponSanitizeElement, R, de, Ce), bn(I.uponSanitizeElement, e, {
854
854
  tagName: r,
855
- allowedTags: B
855
+ allowedTags: R
856
856
  }), Tn(e, n)) return !0;
857
- if (xn(e, r)) return bt(e), !0;
858
- if (de[r] || !(pe.tagCheck instanceof Function && pe.tagCheck(r)) && !B[r]) {
857
+ if (xn(e, r)) return St(e), !0;
858
+ if (pe[r] || !(he.tagCheck instanceof Function && he.tagCheck(r)) && !R[r]) {
859
859
  let t = Cn(e, r, n);
860
- return t === !1 && bn(L.afterSanitizeElements, e, null), t;
860
+ return t === !1 && bn(I.afterSanitizeElements, e, null), t;
861
861
  }
862
- if (S(e) === $t.element && !yt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && Z(Zt, e.innerHTML)) return bt(e), !0;
863
- if (U && e.nodeType === $t.text) {
862
+ if (S(e) === $.element && !xt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && Y(en, e.innerHTML)) return St(e), !0;
863
+ if (be && e.nodeType === $.text) {
864
864
  let n = hn(e.textContent);
865
- e.textContent !== n && (st(t.removed, { element: e.cloneNode() }), e.textContent = n);
865
+ e.textContent !== n && (dt(t.removed, { element: e.cloneNode() }), e.textContent = n);
866
866
  }
867
- return bn(L.afterSanitizeElements, e, null), !1;
867
+ return bn(I.afterSanitizeElements, e, null), !1;
868
868
  }, Dn = function(e, t, r) {
869
- if (fe[t] || dn(t, e) || Ee && (t === "id" || t === "name") && (r in n || r in Qe)) return !1;
870
- let i = V[t] || pe.attributeCheck instanceof Function && pe.attributeCheck(t, e);
871
- return he && Z(z, t) || me && Z(ie, t) ? !0 : i ? Pe[t] || Z(ce, pt(r, oe, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && mt(r, "data:") === 0 && Me[e] || ge && !Z(ae, pt(r, oe, "")) ? !0 : !r : kn(e) && Sn(H.tagNameCheck, e) && Sn(H.attributeNameCheck, t, e) || t === "is" && H.allowCustomizedBuiltInElements && Sn(H.tagNameCheck, r);
872
- }, On = $({}, [
869
+ if (me[t] || nn(t, e) || ke && (t === "id" || t === "name") && (r in n || r in et)) return !1;
870
+ let i = z[t] || he.attributeCheck instanceof Function && he.attributeCheck(t, e);
871
+ return _e && Y(oe, t) || ge && Y(L, t) ? !0 : i ? Le[t] || Y(ue, _t(r, ce, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && vt(r, "data:") === 0 && Fe[e] || ve && !Y(se, _t(r, ce, "")) ? !0 : !r : kn(e) && Sn(B.tagNameCheck, e) && Sn(B.attributeNameCheck, t, e) || t === "is" && B.allowCustomizedBuiltInElements && Sn(B.tagNameCheck, r);
872
+ }, On = Z({}, [
873
873
  "annotation-xml",
874
874
  "color-profile",
875
875
  "font-face",
@@ -879,7 +879,7 @@ function ln() {
879
879
  "font-face-uri",
880
880
  "missing-glyph"
881
881
  ]), kn = function(e) {
882
- return !On[ut(e)] && Z(se, e);
882
+ return !On[mt(e)] && Y(le, e);
883
883
  }, An = function(e, t, n, r) {
884
884
  if (w && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
885
885
  case "TrustedHTML": return A(r);
@@ -888,56 +888,56 @@ function ln() {
888
888
  return r;
889
889
  }, jn = function(e, n, r, i) {
890
890
  try {
891
- r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), _n(e) ? bt(e) : ot(t.removed);
891
+ r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), _n(e) ? St(e) : ut(t.removed);
892
892
  } catch {
893
- Ct(n, e);
893
+ X(n, e);
894
894
  }
895
895
  }, Mn = function(e) {
896
- bn(L.beforeSanitizeAttributes, e, null);
896
+ bn(I.beforeSanitizeAttributes, e, null);
897
897
  let t = e.attributes;
898
898
  if (!t || _n(e)) return;
899
- V = wn(L.uponSanitizeAttribute, V, ue, Se);
899
+ z = wn(I.uponSanitizeAttribute, z, fe, we);
900
900
  let n = {
901
901
  attrName: "",
902
902
  attrValue: "",
903
903
  keepAttr: !0,
904
- allowedAttributes: V,
904
+ allowedAttributes: z,
905
905
  forceKeepAttr: void 0
906
- }, r = t.length, i = q(e.nodeName);
906
+ }, r = t.length, i = G(e.nodeName);
907
907
  for (; r--;) {
908
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = q(o), u = c, d = o === "value" ? u : ht(u);
909
- if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bn(L.uponSanitizeAttribute, e, n), d = n.attrValue, G && (l === "id" || l === "name") && mt(d, De) !== 0 && (Ct(o, e, a), d = De + d), ve && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
910
- Ct(o, e, a);
908
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = G(o), u = c, d = o === "value" ? u : yt(u);
909
+ if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bn(I.uponSanitizeAttribute, e, n), d = n.attrValue, Ae && (l === "id" || l === "name") && vt(d, je) !== 0 && (X(o, e, a), d = je + d), xe && Y(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
910
+ X(o, e, a);
911
911
  continue;
912
912
  }
913
- if (l === "attributename" && ft(d, "href")) {
914
- Ct(o, e, a);
913
+ if (l === "attributename" && gt(d, "href")) {
914
+ X(o, e, a);
915
915
  continue;
916
916
  }
917
917
  if (!n.forceKeepAttr) {
918
918
  if (!n.keepAttr) {
919
- Ct(o, e, a);
919
+ X(o, e, a);
920
920
  continue;
921
921
  }
922
- if (!_e && Z(Qt, d)) {
923
- Ct(o, e, a);
922
+ if (!ye && Y(tn, d)) {
923
+ X(o, e, a);
924
924
  continue;
925
925
  }
926
- if (U && (d = hn(d)), !Dn(i, l, d)) {
927
- Ct(o, e, a);
926
+ if (be && (d = hn(d)), !Dn(i, l, d)) {
927
+ X(o, e, a);
928
928
  continue;
929
929
  }
930
930
  d = An(i, l, s, d), d !== u && jn(e, o, s, d);
931
931
  }
932
932
  }
933
- bn(L.afterSanitizeAttributes, e, null);
933
+ bn(I.afterSanitizeAttributes, e, null);
934
934
  }, Nn = function(e) {
935
935
  let t = null, n = mn(e);
936
- for (bn(L.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bn(L.uponSanitizeShadowNode, t, null), En(t, e), Mn(t), vn(t.content) && Nn(t.content), S(t) === $t.element) {
936
+ for (bn(I.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bn(I.uponSanitizeShadowNode, t, null), En(t, e), Mn(t), vn(t.content) && Nn(t.content), S(t) === $.element) {
937
937
  let e = _(t);
938
938
  vn(e) && (Pn(e), Nn(e));
939
939
  }
940
- bn(L.afterSanitizeShadowDOM, e, null);
940
+ bn(I.afterSanitizeShadowDOM, e, null);
941
941
  }, Pn = function(e) {
942
942
  let t = [{
943
943
  node: e,
@@ -949,14 +949,14 @@ function ln() {
949
949
  Nn(e.shadow);
950
950
  continue;
951
951
  }
952
- let n = e.node, r = S(n) === $t.element, i = h(n);
952
+ let n = e.node, r = S(n) === $.element, i = h(n);
953
953
  if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
954
954
  node: i[e],
955
955
  shadow: null
956
956
  });
957
957
  if (r) {
958
958
  let e = b ? b(n) : null;
959
- if (typeof e == "string" && q(e) === "template") {
959
+ if (typeof e == "string" && G(e) === "template") {
960
960
  let e = n.content;
961
961
  vn(e) && t.push({
962
962
  node: e,
@@ -978,102 +978,102 @@ function ln() {
978
978
  };
979
979
  return t.sanitize = function(e) {
980
980
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
981
- if (Be = !e, Be && (e = "<!-->"), typeof e != "string" && !yn(e) && (e = Tt(e), typeof e != "string")) throw xt("dirty is not a string, aborting");
981
+ if (He = !e, He && (e = "<!-->"), typeof e != "string" && !yn(e) && (e = Ot(e), typeof e != "string")) throw Tt("dirty is not a string, aborting");
982
982
  if (!t.isSupported) return e;
983
- be ? (B = xe, V = Se) : tt(n), (L.uponSanitizeElement.length > 0 || L.uponSanitizeAttribute.length > 0) && (B = wt(B)), L.uponSanitizeAttribute.length > 0 && (V = wt(V)), t.removed = [];
984
- let c = K && typeof e != "string" && yn(e);
983
+ Se ? (R = Ce, z = we) : nt(n), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && (R = Q(R)), I.uponSanitizeAttribute.length > 0 && (z = Q(z)), t.removed = [];
984
+ let c = Me && typeof e != "string" && yn(e);
985
985
  if (c) {
986
986
  fn(e);
987
987
  let t = C(e);
988
988
  if (typeof t == "string") {
989
- let n = q(t);
990
- if (!B[n] || de[n]) throw St(e), xt("root node is forbidden and cannot be sanitized in-place");
989
+ let n = G(t);
990
+ if (!R[n] || pe[n]) throw wt(e), Tt("root node is forbidden and cannot be sanitized in-place");
991
991
  }
992
- if (_n(e)) throw St(e), xt("root node is clobbered and cannot be sanitized in-place");
992
+ if (_n(e)) throw wt(e), Tt("root node is clobbered and cannot be sanitized in-place");
993
993
  try {
994
994
  Pn(e);
995
995
  } catch (t) {
996
- throw St(e), t;
996
+ throw wt(e), t;
997
997
  }
998
- } else if (yn(e)) i = pn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === $t.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Pn(a);
998
+ } else if (yn(e)) i = pn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === $.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Pn(a);
999
999
  else {
1000
- if (!we && !U && !ye && e.indexOf("<") === -1) return w && Te ? A(e) : e;
1001
- if (i = pn(e), !i) return we ? null : Te ? T : "";
1000
+ if (!Ee && !be && !V && e.indexOf("<") === -1) return w && Oe ? A(e) : e;
1001
+ if (i = pn(e), !i) return Ee ? null : Oe ? T : "";
1002
1002
  }
1003
- i && Ce && bt(i.firstChild);
1003
+ i && Te && St(i.firstChild);
1004
1004
  let l = c ? e : i;
1005
1005
  try {
1006
1006
  let e = mn(l);
1007
1007
  for (; o = e.nextNode();) En(o, l), Mn(o), vn(o.content) && Nn(o.content);
1008
1008
  } catch (n) {
1009
- throw c && (St(e), it(t.removed, (e) => {
1010
- e.element && un(e.element);
1009
+ throw c && (wt(e), ct(t.removed, (e) => {
1010
+ e.element && Dt(e.element);
1011
1011
  })), n;
1012
1012
  }
1013
- if (c) return it(t.removed, (e) => {
1014
- e.element && un(e.element);
1015
- }), U && gn(e), e;
1016
- if (we) {
1017
- if (U && gn(i), W) for (s = P.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
1013
+ if (c) return ct(t.removed, (e) => {
1014
+ e.element && Dt(e.element);
1015
+ }), be && gn(e), e;
1016
+ if (Ee) {
1017
+ if (be && gn(i), De) for (s = N.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
1018
1018
  else s = i;
1019
- return (V.shadowroot || V.shadowrootmode) && (s = I.call(r, s, !0)), s;
1019
+ return (z.shadowroot || z.shadowrootmode) && (s = F.call(r, s, !0)), s;
1020
1020
  }
1021
- let u = ye ? i.outerHTML : i.innerHTML;
1022
- return ye && B["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && Z(qt, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), U && (u = hn(u)), w && Te ? A(u) : u;
1021
+ let u = V ? i.outerHTML : i.innerHTML;
1022
+ return V && R["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && Y(Xt, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), be && (u = hn(u)), w && Oe ? A(u) : u;
1023
1023
  }, t.setConfig = function() {
1024
1024
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1025
- tt(e), be = !0, xe = B, Se = V;
1025
+ nt(e), Se = !0, Ce = R, we = z;
1026
1026
  }, t.clearConfig = function() {
1027
- Ze = null, be = !1, xe = null, Se = null, w = E, T = "";
1027
+ Qe = null, Se = !1, Ce = null, we = null, w = E, T = "";
1028
1028
  }, t.isValidAttribute = function(e, t, n) {
1029
- Ze || tt({});
1030
- let r = q(e), i = q(t);
1029
+ Qe || nt({});
1030
+ let r = G(e), i = G(t);
1031
1031
  return Dn(r, i, n);
1032
1032
  }, t.addHook = function(e, t) {
1033
- typeof t == "function" && X(L, e) && st(L[e], t);
1033
+ typeof t == "function" && J(I, e) && dt(I[e], t);
1034
1034
  }, t.removeHook = function(e, t) {
1035
- if (X(L, e)) {
1035
+ if (J(I, e)) {
1036
1036
  if (t !== void 0) {
1037
- let n = at(L[e], t);
1038
- return n === -1 ? void 0 : ct(L[e], n, 1)[0];
1037
+ let n = lt(I[e], t);
1038
+ return n === -1 ? void 0 : ft(I[e], n, 1)[0];
1039
1039
  }
1040
- return ot(L[e]);
1040
+ return ut(I[e]);
1041
1041
  }
1042
1042
  }, t.removeHooks = function(e) {
1043
- X(L, e) && (L[e] = []);
1043
+ J(I, e) && (I[e] = []);
1044
1044
  }, t.removeAllHooks = function() {
1045
- L = on();
1045
+ I = cn();
1046
1046
  }, t;
1047
1047
  }
1048
- var un = ln(), dn = typeof un.addHook == "function", fn = dn ? un.addHook.bind(un) : (() => {}), pn = /* @__PURE__ */ new Set(["color"]), mn = /* @__PURE__ */ new Set(/* @__PURE__ */ "width.height.max-width.max-height.min-width.min-height.margin.margin-top.margin-right.margin-bottom.margin-left.padding.padding-top.padding-right.padding-bottom.padding-left.border.border-width.border-style.border-color.border-radius.box-shadow.outline.background.background-color.color.opacity.display.aspect-ratio.object-fit.vertical-align.float.clear.flex.flex-direction.flex-wrap.flex-grow.flex-shrink.flex-basis.justify-content.align-items.align-content.gap.row-gap.column-gap.align-self.text-align.overflow.box-sizing".split(".")), hn = /url\s*\(|expression\s*\(|javascript:/i, gn = !1;
1049
- fn("afterSanitizeAttributes", (e) => {
1048
+ var fn = dn(), pn = typeof fn.addHook == "function", mn = pn ? fn.addHook.bind(fn) : (() => {}), hn = /* @__PURE__ */ new Set(["color"]), gn = /* @__PURE__ */ new Set(/* @__PURE__ */ "width.height.max-width.max-height.min-width.min-height.margin.margin-top.margin-right.margin-bottom.margin-left.padding.padding-top.padding-right.padding-bottom.padding-left.border.border-width.border-style.border-color.border-radius.box-shadow.outline.background.background-color.color.opacity.display.aspect-ratio.object-fit.vertical-align.float.clear.flex.flex-direction.flex-wrap.flex-grow.flex-shrink.flex-basis.justify-content.align-items.align-content.gap.row-gap.column-gap.align-self.text-align.overflow.box-sizing".split(".")), _n = /url\s*\(|expression\s*\(|javascript:/i, vn = !1;
1049
+ mn("afterSanitizeAttributes", (e) => {
1050
1050
  if (e.hasAttribute("style")) {
1051
- let t = gn ? mn : pn, n = (e.getAttribute("style") ?? "").split(";").map((e) => e.trim()).filter((e) => {
1051
+ let t = vn ? gn : hn, n = (e.getAttribute("style") ?? "").split(";").map((e) => e.trim()).filter((e) => {
1052
1052
  let n = e.split(":")[0]?.trim().toLowerCase(), r = e.slice(e.indexOf(":") + 1).replace(/\\([0-9a-f]{1,6})\s?/gi, (e, t) => {
1053
1053
  let n = parseInt(t, 16);
1054
1054
  return n > 0 && n <= 1114111 ? String.fromCodePoint(n) : "";
1055
1055
  }).replace(/\\(.)/g, "$1").replace(/\\/g, "");
1056
- return n && t.has(n) && !hn.test(r);
1056
+ return n && t.has(n) && !_n.test(r);
1057
1057
  }).join("; ");
1058
1058
  n ? e.setAttribute("style", n) : e.removeAttribute("style");
1059
1059
  }
1060
1060
  });
1061
- var _n = /* @__PURE__ */ new Set([
1061
+ var yn = /* @__PURE__ */ new Set([
1062
1062
  "iframe",
1063
1063
  "object",
1064
1064
  "embed"
1065
- ]), vn = /* @__PURE__ */ new Set(["src", "data"]);
1066
- fn("uponSanitizeAttribute", (e, t) => {
1065
+ ]), bn = /* @__PURE__ */ new Set(["src", "data"]);
1066
+ mn("uponSanitizeAttribute", (e, t) => {
1067
1067
  let n = e.nodeName?.toLowerCase();
1068
- !n || !_n.has(n) || vn.has(t.attrName) && (/^https:\/\//i.test((t.attrValue ?? "").trim()) || (t.keepAttr = !1));
1069
- }), fn("uponSanitizeAttribute", (e, t) => {
1068
+ !n || !yn.has(n) || bn.has(t.attrName) && (/^https:\/\//i.test((t.attrValue ?? "").trim()) || (t.keepAttr = !1));
1069
+ }), mn("uponSanitizeAttribute", (e, t) => {
1070
1070
  t.attrName === "srcdoc" && (t.keepAttr = !1);
1071
1071
  });
1072
- var yn = "allow-scripts allow-popups allow-forms allow-presentation";
1073
- fn("afterSanitizeAttributes", (e) => {
1074
- e.nodeName?.toLowerCase() === "iframe" && !e.hasAttribute("sandbox") && e.setAttribute("sandbox", yn);
1072
+ var xn = "allow-scripts allow-popups allow-forms allow-presentation";
1073
+ mn("afterSanitizeAttributes", (e) => {
1074
+ e.nodeName?.toLowerCase() === "iframe" && !e.hasAttribute("sandbox") && e.setAttribute("sandbox", xn);
1075
1075
  });
1076
- var bn = {
1076
+ var Sn = {
1077
1077
  ALLOWED_TAGS: /* @__PURE__ */ "p.br.strong.b.em.i.u.a.ul.ol.li.span.h1.h2.h3.h4.h5.h6.blockquote.code.pre.hr.table.thead.tbody.tr.th.td".split("."),
1078
1078
  ALLOWED_ATTR: [
1079
1079
  "href",
@@ -1084,9 +1084,9 @@ var bn = {
1084
1084
  "style"
1085
1085
  ],
1086
1086
  ALLOW_DATA_ATTR: !1
1087
- }, xn = {
1087
+ }, Cn = {
1088
1088
  ALLOWED_TAGS: [
1089
- ...bn.ALLOWED_TAGS,
1089
+ ...Sn.ALLOWED_TAGS,
1090
1090
  "iframe",
1091
1091
  "video",
1092
1092
  "audio",
@@ -1095,7 +1095,7 @@ var bn = {
1095
1095
  "div"
1096
1096
  ],
1097
1097
  ALLOWED_ATTR: [
1098
- ...bn.ALLOWED_ATTR,
1098
+ ...Sn.ALLOWED_ATTR,
1099
1099
  "src",
1100
1100
  "alt",
1101
1101
  "sandbox",
@@ -1114,21 +1114,21 @@ var bn = {
1114
1114
  ],
1115
1115
  ALLOW_DATA_ATTR: !1
1116
1116
  };
1117
- function Sn(e) {
1118
- return dn ? un.sanitize(e, bn) : Ve(e);
1117
+ function wn(e) {
1118
+ return pn ? fn.sanitize(e, Sn) : Ge(e);
1119
1119
  }
1120
- function Cn(e) {
1121
- if (!dn) return Ve(e);
1122
- gn = !0;
1120
+ function Tn(e) {
1121
+ if (!pn) return Ge(e);
1122
+ vn = !0;
1123
1123
  try {
1124
- return un.sanitize(e, xn);
1124
+ return fn.sanitize(e, Cn);
1125
1125
  } finally {
1126
- gn = !1;
1126
+ vn = !1;
1127
1127
  }
1128
1128
  }
1129
1129
  //#endregion
1130
1130
  //#region ../../src/components/avatar.tsx
1131
- function wn({ imageUrl: e, alt: t = "Avatar", variant: n, showOnlineDot: r = !1 }) {
1131
+ function En({ imageUrl: e, alt: t = "Avatar", variant: n, showOnlineDot: r = !1 }) {
1132
1132
  return n === "whatsapp" ? e ? /* @__PURE__ */ h("img", {
1133
1133
  src: e,
1134
1134
  className: "leadbot-whatsapp-avatar",
@@ -1137,7 +1137,7 @@ function wn({ imageUrl: e, alt: t = "Avatar", variant: n, showOnlineDot: r = !1
1137
1137
  className: "leadbot-whatsapp-avatar-placeholder",
1138
1138
  children: /* @__PURE__ */ h("span", {
1139
1139
  className: "leadbot-avatar-fallback",
1140
- dangerouslySetInnerHTML: { __html: G.defaultAvatar }
1140
+ dangerouslySetInnerHTML: { __html: H.defaultAvatar }
1141
1141
  })
1142
1142
  }) : /* @__PURE__ */ h("div", {
1143
1143
  className: n === "chatbot" ? "leadbot-chatbot-header-avatar" : "leadbot-floating-avatar",
@@ -1146,21 +1146,21 @@ function wn({ imageUrl: e, alt: t = "Avatar", variant: n, showOnlineDot: r = !1
1146
1146
  alt: t
1147
1147
  }) : /* @__PURE__ */ h("span", {
1148
1148
  className: "leadbot-avatar-fallback",
1149
- dangerouslySetInnerHTML: { __html: G.defaultAvatar }
1149
+ dangerouslySetInnerHTML: { __html: H.defaultAvatar }
1150
1150
  }), r && /* @__PURE__ */ h("div", { className: "leadbot-online-dot" })]
1151
1151
  });
1152
1152
  }
1153
1153
  //#endregion
1154
1154
  //#region ../../src/utils/logo.ts
1155
- var Tn = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 7 420 120\">\n<style>.lb-logo-mark{fill:#0074FF;}</style>\n<g>\n <path class=\"lb-logo-mark\" d=\"M91.2,50.5c-5.8-9.7-14-18.1-22.6-25.5C62.1,19.5,55,14.1,46.8,11.3c-2.4-0.8-5-1.4-7.6-1.2\n c-1.4,0.1-2.7,1.1-2.7,2.6c0,1.3,1.2,2.7,2.7,2.6c0.4,0,0.9,0,1.3,0c0.2,0,0.5,0,0.7,0c0.1,0,0.2,0,0.2,0h0c0.1,0,0.1,0,0.2,0\n c1.2,0.2,2.4,0.5,3.6,1c2.6,0.9,5.5,2.4,8.2,4.1c8.4,5.2,15.9,11.9,22.6,19.1c5.9,6.3,11.6,13.7,14.5,21.9c0.5,1.5,1,3.1,1.3,4.7\n c0.3,1.5,0.4,2.2,0.4,3.9c0,0.6,0,1.3-0.1,1.9c0,0.2,0,0.5-0.1,0.7c0,0.1-0.1,0.6-0.1,0.8c-0.1,0.5-0.3,1.1-0.4,1.6\n c-0.1,0.3-0.2,0.5-0.3,0.8c0,0,0,0,0,0.1c0,0,0,0,0,0c0,0,0,0.1,0,0.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0.1-0.1,0.1-0.1,0.2\n c-0.2,0.5-0.5,0.9-0.8,1.4c-0.1,0.2-0.2,0.4-0.4,0.5c-0.1,0-0.3,0.4-0.4,0.5c-0.3,0.4-0.7,0.7-1.1,1.1c-0.1,0.1-0.2,0.2-0.3,0.2\n c0,0,0,0,0,0c-0.2,0.2-0.4,0.3-0.6,0.4c-0.4,0.3-0.9,0.5-1.4,0.8c-0.1,0-0.3,0.1-0.4,0.2l0,0c0,0,0,0,0,0v0c0,0,0,0,0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0.6l0.3,28.1l-0.3,30.9c0,0.3,0.3,0.6,0.6,0.6H164.6z\"/>\n <path fill=\"currentColor\" d=\"M197.2,81.1c-0.3,0-0.6,0.3-0.7,0.6c-1.3,6.5-5.2,10.1-11.8,10.1c-8.7,0-13.2-5.7-13.5-16.3h33c0.3,0,0.6-0.3,0.6-0.6\n c-0.2-14.8-7.8-23.7-20.7-23.7c-12.9,0-20.8,9.5-20.8,23.3c0,13.5,7.4,23.1,21.2,23.1c11.5,0,18.2-6.7,19.5-15.8\n c0.1-0.3-0.2-0.6-0.5-0.6H197.2z M196.5,69.9h-24.9c1.1-8.3,5.4-13.1,12.8-13.1C192.1,56.8,196.2,62.8,196.5,69.9z\"/>\n <path fill=\"currentColor\" d=\"M214.5,73.8c0-9.7,3.8-16.5,11.9-16.8c0.3,0,1.2,0,1.5,0c7.3,0.5,11.5,6.9,11.4,17.6c-0.1,11.2-4.7,16.9-12.4,16.9\n C218.5,91.6,214.5,84.4,214.5,73.8z M246.2,96.5c0.3,0,0.6-0.3,0.6-0.6l-0.3-21.9l0.3-21.2c0-0.3-0.3-0.6-0.6-0.6h-6.7\n c-0.3,0-0.6,0.3-0.6,0.6l0.2,6.1c-2.9-4.9-7.7-7.6-14-7.6c-11.7,0-18.5,10.3-18.5,23.1c0,12.8,6.4,22.9,18.4,22.9\n c6.5,0,11.2-3,14.2-8l-0.2,6.5c0,0.3,0.3,0.6,0.6,0.6H246.2z\"/>\n <path fill=\"currentColor\" d=\"M257.9,73.8c0-10,4-17,12.5-16.9c7.8,0.1,12.3,6.6,12.2,17.8c-0.1,11.3-4.8,16.9-12.4,16.9\n C261.9,91.6,257.9,84.5,257.9,73.8z M289.6,96.5c0.3,0,0.6-0.3,0.6-0.6L290,63.1l0.2-26.2c0-0.3-0.3-0.6-0.6-0.6h-6.7\n c-0.3,0-0.6,0.3-0.6,0.6l0.1,21.8c-3-4.8-7.8-7.4-13.9-7.4c-11.7,0-18.5,10.3-18.5,23.1c0,12.9,6.4,22.9,18.4,22.9\n c6.4,0,11.2-2.9,14.1-7.8l-0.2,6.4c0,0.3,0.3,0.6,0.6,0.6H289.6z\"/>\n <path fill=\"currentColor\" d=\"M341.1,78.6c-0.2-7-4.1-12.3-13.1-14.3c7.3-1.9,11.3-6,11.3-13.6c0-9.5-8.5-14.5-20.7-14.5h-23c-0.3,0-0.6,0.3-0.6,0.6\n l0.3,28.6L295,95.9c0,0.3,0.3,0.6,0.6,0.6h23.2C330.8,96.5,341.1,91.4,341.1,78.6z M303.2,42.4h15.4c7.4,0,12.6,3.1,12.6,9.8\n c0,6.7-4.8,9.5-12.6,9.5h-15.7L303.2,42.4z M302.9,67.7h15.7c7.6,0,14.3,3,14.3,10.9c0,8.6-5.9,11.6-14.3,11.6h-15.4L302.9,67.7z\"/>\n <path fill=\"currentColor\" d=\"M385.6,74.3c0-13.9-7.5-23.1-21-23.1c-13.5,0-21,9.3-21,23.3c0,13.9,7.6,23.1,21,23.1C378.1,97.5,385.6,88.2,385.6,74.3z\n M351.4,74.4c0-11.1,4.3-17.5,13.1-17.5c8.6,0,12.9,6.5,12.9,17.5c0,11.1-4.2,17.3-12.9,17.3S351.4,85.5,351.4,74.4z\"/>\n <path fill=\"currentColor\" d=\"M409.9,90.9c0-0.3-0.3-0.5-0.6-0.4c-1.2,0.3-2.9,0.6-4.7,0.6c-3.7,0-5.5-1.6-5.5-7L399,58.3h10.4c0.3,0,0.6-0.3,0.6-0.6\n v-4.9c0-0.3-0.3-0.6-0.6-0.6H399l0.2-10.5c0-0.3-0.3-0.6-0.6-0.6h-6.7c-0.3,0-0.6,0.3-0.6,0.6l0.1,10.5h-5.2\n c-0.3,0-0.6,0.3-0.6,0.6v4.9c0,0.3,0.3,0.6,0.6,0.6h5.2l-0.1,26c0,9.6,5.5,13,12,13c2.1,0,4.3-0.6,6.1-1.1c0.3-0.1,0.6-0.4,0.6-0.8\n V90.9z\"/>\n</g>\n</svg>";
1155
+ var Dn = "<svg xmlns=\"http://www.w3.org/2000/svg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3,0,0.6-0.3,0.6-0.6\n c-0.2-14.8-7.8-23.7-20.7-23.7c-12.9,0-20.8,9.5-20.8,23.3c0,13.5,7.4,23.1,21.2,23.1c11.5,0,18.2-6.7,19.5-15.8\n c0.1-0.3-0.2-0.6-0.5-0.6H197.2z M196.5,69.9h-24.9c1.1-8.3,5.4-13.1,12.8-13.1C192.1,56.8,196.2,62.8,196.5,69.9z\"/>\n <path fill=\"currentColor\" d=\"M214.5,73.8c0-9.7,3.8-16.5,11.9-16.8c0.3,0,1.2,0,1.5,0c7.3,0.5,11.5,6.9,11.4,17.6c-0.1,11.2-4.7,16.9-12.4,16.9\n C218.5,91.6,214.5,84.4,214.5,73.8z M246.2,96.5c0.3,0,0.6-0.3,0.6-0.6l-0.3-21.9l0.3-21.2c0-0.3-0.3-0.6-0.6-0.6h-6.7\n c-0.3,0-0.6,0.3-0.6,0.6l0.2,6.1c-2.9-4.9-7.7-7.6-14-7.6c-11.7,0-18.5,10.3-18.5,23.1c0,12.8,6.4,22.9,18.4,22.9\n c6.5,0,11.2-3,14.2-8l-0.2,6.5c0,0.3,0.3,0.6,0.6,0.6H246.2z\"/>\n <path fill=\"currentColor\" d=\"M257.9,73.8c0-10,4-17,12.5-16.9c7.8,0.1,12.3,6.6,12.2,17.8c-0.1,11.3-4.8,16.9-12.4,16.9\n C261.9,91.6,257.9,84.5,257.9,73.8z M289.6,96.5c0.3,0,0.6-0.3,0.6-0.6L290,63.1l0.2-26.2c0-0.3-0.3-0.6-0.6-0.6h-6.7\n c-0.3,0-0.6,0.3-0.6,0.6l0.1,21.8c-3-4.8-7.8-7.4-13.9-7.4c-11.7,0-18.5,10.3-18.5,23.1c0,12.9,6.4,22.9,18.4,22.9\n c6.4,0,11.2-2.9,14.1-7.8l-0.2,6.4c0,0.3,0.3,0.6,0.6,0.6H289.6z\"/>\n <path fill=\"currentColor\" d=\"M341.1,78.6c-0.2-7-4.1-12.3-13.1-14.3c7.3-1.9,11.3-6,11.3-13.6c0-9.5-8.5-14.5-20.7-14.5h-23c-0.3,0-0.6,0.3-0.6,0.6\n l0.3,28.6L295,95.9c0,0.3,0.3,0.6,0.6,0.6h23.2C330.8,96.5,341.1,91.4,341.1,78.6z M303.2,42.4h15.4c7.4,0,12.6,3.1,12.6,9.8\n c0,6.7-4.8,9.5-12.6,9.5h-15.7L303.2,42.4z M302.9,67.7h15.7c7.6,0,14.3,3,14.3,10.9c0,8.6-5.9,11.6-14.3,11.6h-15.4L302.9,67.7z\"/>\n <path fill=\"currentColor\" d=\"M385.6,74.3c0-13.9-7.5-23.1-21-23.1c-13.5,0-21,9.3-21,23.3c0,13.9,7.6,23.1,21,23.1C378.1,97.5,385.6,88.2,385.6,74.3z\n M351.4,74.4c0-11.1,4.3-17.5,13.1-17.5c8.6,0,12.9,6.5,12.9,17.5c0,11.1-4.2,17.3-12.9,17.3S351.4,85.5,351.4,74.4z\"/>\n <path fill=\"currentColor\" d=\"M409.9,90.9c0-0.3-0.3-0.5-0.6-0.4c-1.2,0.3-2.9,0.6-4.7,0.6c-3.7,0-5.5-1.6-5.5-7L399,58.3h10.4c0.3,0,0.6-0.3,0.6-0.6\n v-4.9c0-0.3-0.3-0.6-0.6-0.6H399l0.2-10.5c0-0.3-0.3-0.6-0.6-0.6h-6.7c-0.3,0-0.6,0.3-0.6,0.6l0.1,10.5h-5.2\n c-0.3,0-0.6,0.3-0.6,0.6v4.9c0,0.3,0.3,0.6,0.6,0.6h5.2l-0.1,26c0,9.6,5.5,13,12,13c2.1,0,4.3-0.6,6.1-1.1c0.3-0.1,0.6-0.4,0.6-0.8\n V90.9z\"/>\n</g>\n</svg>";
1156
1156
  //#endregion
1157
1157
  //#region ../../src/components/poweredBy.tsx
1158
- function En(e, t) {
1158
+ function On(e, t) {
1159
1159
  return e ? `${t ? "https://leadbot.nl/welkom-ai" : "https://leadbot.nl/welkom"}?r=${encodeURIComponent(e)}` : "https://leadbot.com?ref=widget";
1160
1160
  }
1161
- function Dn({ leadbot: e, align: t = "right", className: n, asLink: r = !1, language: i = "en", isChatbot: a = !1 }) {
1161
+ function kn({ leadbot: e, align: t = "right", className: n, asLink: r = !1, language: i = "en", isChatbot: a = !1 }) {
1162
1162
  if (e?.is_white_label) return null;
1163
- let o = e?.partner, s = o?.custom_branding ?? !1, c = o?.partner_logo_url && /^https?:\/\//i.test(K(o.partner_logo_url)) ? K(o.partner_logo_url) : null, l = o?.partner_website, u = e?.domain?.display_name, d = l && /^https?:\/\//i.test(K(l)) ? K(l) : null, f = d ? `${d}${d.includes("?") ? "&" : "?"}ref=widget` : null, p = t === "center" ? "leadbot-powered-by--center" : "leadbot-powered-by--right", m = n ? ` ${n}` : "", g = j("powered_by", i);
1163
+ let o = e?.partner, s = o?.custom_branding ?? !1, c = o?.partner_logo_url && /^https?:\/\//i.test(U(o.partner_logo_url)) ? U(o.partner_logo_url) : null, l = o?.partner_website, u = e?.domain?.display_name, d = l && /^https?:\/\//i.test(U(l)) ? U(l) : null, f = d ? `${d}${d.includes("?") ? "&" : "?"}ref=widget` : null, p = t === "center" ? "leadbot-powered-by--center" : "leadbot-powered-by--right", m = n ? ` ${n}` : "", g = M("powered_by", i);
1164
1164
  if (r) {
1165
1165
  let e = s && c, t = `leadbot-powered-by ${p}${m}`, n = e ? /* @__PURE__ */ h("img", {
1166
1166
  src: c,
@@ -1168,13 +1168,13 @@ function Dn({ leadbot: e, align: t = "right", className: n, asLink: r = !1, lang
1168
1168
  }) : /* @__PURE__ */ h("span", {
1169
1169
  className: "leadbot-powered-by__logo",
1170
1170
  "aria-label": "LeadBot",
1171
- dangerouslySetInnerHTML: { __html: Tn }
1171
+ dangerouslySetInnerHTML: { __html: Dn }
1172
1172
  });
1173
1173
  if (e && !f) return /* @__PURE__ */ h("div", {
1174
1174
  className: t,
1175
1175
  children: [/* @__PURE__ */ h("span", { children: g }), n]
1176
1176
  });
1177
- let r = e && f ? f : En(u, a);
1177
+ let r = e && f ? f : On(u, a);
1178
1178
  return /* @__PURE__ */ h("a", {
1179
1179
  href: r,
1180
1180
  target: "_blank",
@@ -1185,10 +1185,10 @@ function Dn({ leadbot: e, align: t = "right", className: n, asLink: r = !1, lang
1185
1185
  }
1186
1186
  return /* @__PURE__ */ h("div", {
1187
1187
  className: `leadbot-powered-by ${p}${m}`,
1188
- children: [/* @__PURE__ */ h("span", { children: g }), s && c ? On(f, c) : kn(u, a)]
1188
+ children: [/* @__PURE__ */ h("span", { children: g }), s && c ? An(f, c) : jn(u, a)]
1189
1189
  });
1190
1190
  }
1191
- function On(e, t) {
1191
+ function An(e, t) {
1192
1192
  return e ? /* @__PURE__ */ h("a", {
1193
1193
  href: e,
1194
1194
  target: "_blank",
@@ -1202,21 +1202,21 @@ function On(e, t) {
1202
1202
  alt: "Partner"
1203
1203
  });
1204
1204
  }
1205
- function kn(e, t) {
1205
+ function jn(e, t) {
1206
1206
  return /* @__PURE__ */ h("a", {
1207
- href: En(e, t),
1207
+ href: On(e, t),
1208
1208
  target: "_blank",
1209
1209
  rel: "noopener noreferrer",
1210
1210
  children: /* @__PURE__ */ h("span", {
1211
1211
  className: "leadbot-powered-by__logo",
1212
1212
  "aria-label": "LeadBot",
1213
- dangerouslySetInnerHTML: { __html: Tn }
1213
+ dangerouslySetInnerHTML: { __html: Dn }
1214
1214
  })
1215
1215
  });
1216
1216
  }
1217
1217
  //#endregion
1218
1218
  //#region ../../src/components/messageCard.tsx
1219
- function An({ senderName: e = "", companyName: t, contentHtml: n, isFirstStep: r = !1, className: i, poweredByAlign: a = "right", leadbot: o, language: s = "en" }) {
1219
+ function Mn({ senderName: e = "", companyName: t, contentHtml: n, isFirstStep: r = !1, className: i, poweredByAlign: a = "right", leadbot: o, language: s = "en" }) {
1220
1220
  let c = r && !o?.is_white_label, l = [
1221
1221
  "leadbot-card",
1222
1222
  i,
@@ -1234,7 +1234,7 @@ function An({ senderName: e = "", companyName: t, contentHtml: n, isFirstStep: r
1234
1234
  }),
1235
1235
  /* @__PURE__ */ h("span", {
1236
1236
  className: "leadbot-title-row__arrow",
1237
- dangerouslySetInnerHTML: { __html: G.chevronRight }
1237
+ dangerouslySetInnerHTML: { __html: H.chevronRight }
1238
1238
  }),
1239
1239
  /* @__PURE__ */ h("span", {
1240
1240
  className: "leadbot-title-row__company",
@@ -1244,9 +1244,9 @@ function An({ senderName: e = "", companyName: t, contentHtml: n, isFirstStep: r
1244
1244
  }),
1245
1245
  /* @__PURE__ */ h("div", {
1246
1246
  className: "leadbot-card__content",
1247
- dangerouslySetInnerHTML: { __html: Sn(n) }
1247
+ dangerouslySetInnerHTML: { __html: wn(n) }
1248
1248
  }),
1249
- c && /* @__PURE__ */ h(Dn, {
1249
+ c && /* @__PURE__ */ h(kn, {
1250
1250
  align: a,
1251
1251
  leadbot: o,
1252
1252
  language: s
@@ -1256,7 +1256,7 @@ function An({ senderName: e = "", companyName: t, contentHtml: n, isFirstStep: r
1256
1256
  }
1257
1257
  //#endregion
1258
1258
  //#region ../../src/steps/messageStep.tsx
1259
- function jn(e) {
1259
+ function Nn(e) {
1260
1260
  let { step: t, config: r, isFirstStep: i } = e, { attributes: a } = t, o = a.message || "", s = a.sender_name || "", c = a.sender_image?.url || null, l = P(o, r.leadbot.language, {
1261
1261
  name: r.leadbot.default_contact_information?.label,
1262
1262
  website_name: r.leadbot.domain.display_name,
@@ -1265,11 +1265,11 @@ function jn(e) {
1265
1265
  });
1266
1266
  return /* @__PURE__ */ h(n, { children: /* @__PURE__ */ h("div", {
1267
1267
  className: "leadbot-message-row leadbot-message-has-avatar",
1268
- children: [/* @__PURE__ */ h(wn, {
1268
+ children: [/* @__PURE__ */ h(En, {
1269
1269
  imageUrl: c,
1270
1270
  variant: "message",
1271
1271
  showOnlineDot: !0
1272
- }), /* @__PURE__ */ h(An, {
1272
+ }), /* @__PURE__ */ h(Mn, {
1273
1273
  senderName: s,
1274
1274
  companyName: r.leadbot.domain.display_name,
1275
1275
  contentHtml: l,
@@ -1282,21 +1282,21 @@ function jn(e) {
1282
1282
  }
1283
1283
  //#endregion
1284
1284
  //#region ../../src/steps/startStep.tsx
1285
- function Mn(e) {
1285
+ function Pn(e) {
1286
1286
  let { step: t, config: n, isCurrent: r } = e;
1287
1287
  if (!r) return null;
1288
- let i = he(t.options);
1288
+ let i = ye(t.options);
1289
1289
  if (i.length === 0) return null;
1290
1290
  let a = i[0], o = n.steps.find((e) => e.uuid === a.next_step_uuid);
1291
1291
  if (!o) return null;
1292
1292
  if (o.step_type === "button") {
1293
- let t = to("button").component;
1293
+ let t = io("button").component;
1294
1294
  return /* @__PURE__ */ h(t, {
1295
1295
  ...e,
1296
1296
  step: o
1297
1297
  });
1298
1298
  }
1299
- let s = to(o.step_type).component;
1299
+ let s = io(o.step_type).component;
1300
1300
  return /* @__PURE__ */ h(s, {
1301
1301
  ...e,
1302
1302
  step: o
@@ -1304,7 +1304,7 @@ function Mn(e) {
1304
1304
  }
1305
1305
  //#endregion
1306
1306
  //#region ../../src/steps/notificationStep.tsx
1307
- function Nn(e) {
1307
+ function Fn(e) {
1308
1308
  let { step: t, config: r, isFirstStep: i } = e, { attributes: a } = t, o = a.message || "", s = a.sender_name || "", c = P(o, r.leadbot.language, {
1309
1309
  name: r.leadbot.default_contact_information?.label,
1310
1310
  website_name: r.leadbot.domain.display_name,
@@ -1313,7 +1313,7 @@ function Nn(e) {
1313
1313
  });
1314
1314
  return /* @__PURE__ */ h(n, { children: /* @__PURE__ */ h("div", {
1315
1315
  className: "leadbot-message-row",
1316
- children: /* @__PURE__ */ h(An, {
1316
+ children: /* @__PURE__ */ h(Mn, {
1317
1317
  senderName: s,
1318
1318
  companyName: r.leadbot.domain.display_name,
1319
1319
  contentHtml: c,
@@ -1327,23 +1327,36 @@ function Nn(e) {
1327
1327
  }
1328
1328
  //#endregion
1329
1329
  //#region ../../src/dataSubmitter.ts
1330
- var Pn = class {
1330
+ var In = class {
1331
1331
  constructor(e) {
1332
- this.domainKey = ge(e), this.leadbotId = xe(e), this.apiUrl = ye("/client/submit"), this.client = w({
1332
+ this.domainKey = be(e), this.leadbotId = Te(e), this.apiUrl = Ce("/client/submit"), this.client = T({
1333
1333
  domainKey: this.domainKey,
1334
- apiBase: ye("")
1335
- }), this.previewToken = Ce() ?? void 0, this.preview = this.previewToken ? !0 : void 0, this.visitorId = A(), O();
1334
+ apiBase: Ce("")
1335
+ }), this.previewToken = De() ?? void 0, this.preview = this.previewToken ? !0 : void 0, this.visitorId = ee(), k();
1336
1336
  }
1337
1337
  submitChatFeedback(e) {
1338
- ie(this.client, {
1338
+ ce(this.client, {
1339
1339
  visitorId: this.visitorId,
1340
1340
  preview: this.preview,
1341
1341
  previewToken: this.previewToken,
1342
1342
  ...e
1343
1343
  });
1344
1344
  }
1345
+ submitChatExchange(e) {
1346
+ se(this.client, {
1347
+ leadbotId: this.leadbotId,
1348
+ visitorId: this.visitorId,
1349
+ analytics: S(),
1350
+ preview: this.preview,
1351
+ previewToken: this.previewToken,
1352
+ stepUuid: e.step_uuid,
1353
+ chatSessionId: e.chat_session_id,
1354
+ messages: e.messages,
1355
+ answer: e.answer
1356
+ });
1357
+ }
1345
1358
  trackClick(e) {
1346
- ce(this.client, {
1359
+ de(this.client, {
1347
1360
  stepUuid: e,
1348
1361
  visitorId: this.visitorId,
1349
1362
  preview: this.preview,
@@ -1355,14 +1368,14 @@ var Pn = class {
1355
1368
  let i = await fetch(this.apiUrl, {
1356
1369
  method: "POST",
1357
1370
  headers: { "Content-Type": "application/json" },
1358
- body: JSON.stringify(C({
1371
+ body: JSON.stringify(w({
1359
1372
  domainKey: this.domainKey,
1360
1373
  leadbotId: this.leadbotId,
1361
1374
  stepUuid: t,
1362
1375
  stepType: e,
1363
1376
  visitorId: this.visitorId,
1364
1377
  userData: n,
1365
- analytics: x(),
1378
+ analytics: S(),
1366
1379
  preview: this.preview,
1367
1380
  previewToken: this.previewToken,
1368
1381
  extraFields: r
@@ -1397,25 +1410,25 @@ var Pn = class {
1397
1410
  };
1398
1411
  //#endregion
1399
1412
  //#region ../../src/hooks/useDataSubmitter.ts
1400
- function Fn(e) {
1413
+ function Ln(e) {
1401
1414
  let t = f(null);
1402
- return t.current === null && (t.current = new Pn(e)), t.current;
1415
+ return t.current === null && (t.current = new In(e)), t.current;
1403
1416
  }
1404
1417
  //#endregion
1405
1418
  //#region ../../src/steps/buttonStep.tsx
1406
- function In(e) {
1407
- return e ? e.startsWith("tel:") ? G.phone : e.startsWith("mailto:") ? G.envelope : null : null;
1419
+ function Rn(e) {
1420
+ return e ? e.startsWith("tel:") ? H.phone : e.startsWith("mailto:") ? H.envelope : null : null;
1408
1421
  }
1409
- function Ln(e) {
1410
- let t = Fn(e.config), { step: n, isCurrent: r, onOptionSelect: i } = e, a = n.attributes?.text || n.label || "Click here", o = n.attributes?.url, s = n.attributes?.target || "_self", c = n.attributes?.continue_after_cta === !0, l = () => {
1422
+ function zn(e) {
1423
+ let t = Ln(e.config), { step: n, isCurrent: r, onOptionSelect: i } = e, a = n.attributes?.text || n.label || "Click here", o = n.attributes?.url, s = n.attributes?.target || "_self", c = n.attributes?.continue_after_cta === !0, l = () => {
1411
1424
  if (!r) return;
1412
1425
  if (t.trackClick(n.uuid), e.analyticsTracker?.trackButtonClick(n), o) {
1413
- let e = ke(o);
1426
+ let e = Pe(o);
1414
1427
  if (e !== "#" && window.open(e, s, "noopener,noreferrer"), !c) return;
1415
1428
  }
1416
- let a = he(n.options).map((e) => e.next_step_uuid).filter((e) => !!e);
1429
+ let a = ye(n.options).map((e) => e.next_step_uuid).filter((e) => !!e);
1417
1430
  a.length > 0 && i(a);
1418
- }, u = (e) => e.split(/(\*\*.+?\*\*)/g).map((e, t) => e.startsWith("**") && e.endsWith("**") ? /* @__PURE__ */ h("strong", { children: e.slice(2, -2) }, t) : e), d = n.background_color?.trim(), f = d?.toLowerCase(), p = !d || f === "#fff" || f === "#ffffff" || f === "white" || f === "rgb(255, 255, 255)" || f === "rgba(255, 255, 255, 1)", m = !d, g = In(o);
1431
+ }, u = (e) => e.split(/(\*\*.+?\*\*)/g).map((e, t) => e.startsWith("**") && e.endsWith("**") ? /* @__PURE__ */ h("strong", { children: e.slice(2, -2) }, t) : e), d = n.background_color?.trim(), f = d?.toLowerCase(), p = !d || f === "#fff" || f === "#ffffff" || f === "white" || f === "rgb(255, 255, 255)" || f === "rgba(255, 255, 255, 1)", m = !d, g = Rn(o);
1419
1432
  return /* @__PURE__ */ h("button", {
1420
1433
  className: `leadbot-option-btn${m ? " leadbot-option-btn-secondary" : ""}${r ? "" : " leadbot-option-disabled"}`,
1421
1434
  style: {
@@ -1433,7 +1446,7 @@ function Ln(e) {
1433
1446
  }
1434
1447
  //#endregion
1435
1448
  //#region ../../src/steps/htmlEmbedStep.tsx
1436
- function Rn(e) {
1449
+ function Bn(e) {
1437
1450
  let { step: t } = e, n = f(null), [r, i] = d(!1), a = t.attributes?.html_content || t.attributes?.html || "", o = t.attributes?.title || "", c = t.background_color?.trim() || void 0;
1438
1451
  return s(() => {
1439
1452
  i(!1);
@@ -1455,37 +1468,37 @@ function Rn(e) {
1455
1468
  style: c ? { backgroundColor: c } : void 0,
1456
1469
  children: [o && /* @__PURE__ */ h("div", {
1457
1470
  className: "leadbot-embed-title",
1458
- dangerouslySetInnerHTML: { __html: Sn(o) }
1471
+ dangerouslySetInnerHTML: { __html: wn(o) }
1459
1472
  }), /* @__PURE__ */ h("div", {
1460
1473
  ref: n,
1461
1474
  className: "leadbot-embed-content",
1462
- dangerouslySetInnerHTML: { __html: Cn(a) }
1475
+ dangerouslySetInnerHTML: { __html: Tn(a) }
1463
1476
  })]
1464
1477
  });
1465
1478
  }
1466
1479
  //#endregion
1467
1480
  //#region ../../src/steps/chatbot/chatSessionContext.ts
1468
- var zn = i(null);
1481
+ var Vn = i(null);
1469
1482
  //#endregion
1470
1483
  //#region ../../src/handlers/i18n.ts
1471
- function Bn(e) {
1472
- let t = ne(e);
1484
+ function Hn(e) {
1485
+ let t = ae(e);
1473
1486
  return {
1474
1487
  language: t,
1475
1488
  t: (e, n) => {
1476
- let r = j(e, t);
1489
+ let r = M(e, t);
1477
1490
  return r === `[${e}]` ? n ?? e : r;
1478
1491
  }
1479
1492
  };
1480
1493
  }
1481
1494
  //#endregion
1482
1495
  //#region ../../node_modules/.pnpm/uqr@0.1.3/node_modules/uqr/dist/index.mjs
1483
- var Vn = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "Data", e[e.Function = 1] = "Function", e[e.Position = 2] = "Position", e[e.Timing = 3] = "Timing", e[e.Alignment = 4] = "Alignment", e))(Vn || {}), Hn = [0, 1], Un = [1, 0], Wn = [2, 3], Gn = [3, 2], Kn = {
1484
- L: Hn,
1485
- M: Un,
1486
- Q: Wn,
1487
- H: Gn
1488
- }, qn = /^\d*$/, Jn = /^[A-Z0-9 $%*+./:-]*$/, Yn = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:", Xn = 1, Zn = 40, Qn = 3, $n = 3, er = 40, tr = 10, nr = [
1496
+ var Un = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "Data", e[e.Function = 1] = "Function", e[e.Position = 2] = "Position", e[e.Timing = 3] = "Timing", e[e.Alignment = 4] = "Alignment", e))(Un || {}), Wn = [0, 1], Gn = [1, 0], Kn = [2, 3], qn = [3, 2], Jn = {
1497
+ L: Wn,
1498
+ M: Gn,
1499
+ Q: Kn,
1500
+ H: qn
1501
+ }, Yn = /^\d*$/, Xn = /^[A-Z0-9 $%*+./:-]*$/, Zn = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:", Qn = 1, $n = 40, er = 3, tr = 3, nr = 40, rr = 10, ir = [
1489
1502
  [
1490
1503
  -1,
1491
1504
  7,
@@ -1658,7 +1671,7 @@ var Vn = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "
1658
1671
  30,
1659
1672
  30
1660
1673
  ]
1661
- ], rr = [
1674
+ ], ar = [
1662
1675
  [
1663
1676
  -1,
1664
1677
  1,
@@ -1831,9 +1844,9 @@ var Vn = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "
1831
1844
  77,
1832
1845
  81
1833
1846
  ]
1834
- ], ir = class {
1847
+ ], or = class {
1835
1848
  constructor(e, t, n, r) {
1836
- if (this.version = e, this.ecc = t, e < Xn || e > Zn) throw RangeError("Version value out of range");
1849
+ if (this.version = e, this.ecc = t, e < Qn || e > $n) throw RangeError("Version value out of range");
1837
1850
  if (r < -1 || r > 7) throw RangeError("Mask value out of range");
1838
1851
  this.size = e * 4 + 17;
1839
1852
  let i = Array.from({ length: this.size }).fill(!1);
@@ -1858,7 +1871,7 @@ var Vn = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "
1858
1871
  return e >= 0 && e < this.size && t >= 0 && t < this.size && this.modules[t][e];
1859
1872
  }
1860
1873
  drawFunctionPatterns() {
1861
- for (let e = 0; e < this.size; e++) this.setFunctionModule(6, e, e % 2 == 0, Vn.Timing), this.setFunctionModule(e, 6, e % 2 == 0, Vn.Timing);
1874
+ for (let e = 0; e < this.size; e++) this.setFunctionModule(6, e, e % 2 == 0, Un.Timing), this.setFunctionModule(e, 6, e % 2 == 0, Un.Timing);
1862
1875
  this.drawFinderPattern(3, 3), this.drawFinderPattern(this.size - 4, 3), this.drawFinderPattern(3, this.size - 4);
1863
1876
  let e = this.getAlignmentPatternPositions(), t = e.length;
1864
1877
  for (let n = 0; n < t; n++) for (let r = 0; r < t; r++) n === 0 && r === 0 || n === 0 && r === t - 1 || n === t - 1 && r === 0 || this.drawAlignmentPattern(e[n], e[r]);
@@ -1868,11 +1881,11 @@ var Vn = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "
1868
1881
  let t = this.ecc[1] << 3 | e, n = t;
1869
1882
  for (let e = 0; e < 10; e++) n = n << 1 ^ (n >>> 9) * 1335;
1870
1883
  let r = (t << 10 | n) ^ 21522;
1871
- for (let e = 0; e <= 5; e++) this.setFunctionModule(8, e, or(r, e));
1872
- this.setFunctionModule(8, 7, or(r, 6)), this.setFunctionModule(8, 8, or(r, 7)), this.setFunctionModule(7, 8, or(r, 8));
1873
- for (let e = 9; e < 15; e++) this.setFunctionModule(14 - e, 8, or(r, e));
1874
- for (let e = 0; e < 8; e++) this.setFunctionModule(this.size - 1 - e, 8, or(r, e));
1875
- for (let e = 8; e < 15; e++) this.setFunctionModule(8, this.size - 15 + e, or(r, e));
1884
+ for (let e = 0; e <= 5; e++) this.setFunctionModule(8, e, cr(r, e));
1885
+ this.setFunctionModule(8, 7, cr(r, 6)), this.setFunctionModule(8, 8, cr(r, 7)), this.setFunctionModule(7, 8, cr(r, 8));
1886
+ for (let e = 9; e < 15; e++) this.setFunctionModule(14 - e, 8, cr(r, e));
1887
+ for (let e = 0; e < 8; e++) this.setFunctionModule(this.size - 1 - e, 8, cr(r, e));
1888
+ for (let e = 8; e < 15; e++) this.setFunctionModule(8, this.size - 15 + e, cr(r, e));
1876
1889
  this.setFunctionModule(8, this.size - 8, !0);
1877
1890
  }
1878
1891
  drawVersion() {
@@ -1881,30 +1894,30 @@ var Vn = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "
1881
1894
  for (let t = 0; t < 12; t++) e = e << 1 ^ (e >>> 11) * 7973;
1882
1895
  let t = this.version << 12 | e;
1883
1896
  for (let e = 0; e < 18; e++) {
1884
- let n = or(t, e), r = this.size - 11 + e % 3, i = Math.floor(e / 3);
1897
+ let n = cr(t, e), r = this.size - 11 + e % 3, i = Math.floor(e / 3);
1885
1898
  this.setFunctionModule(r, i, n), this.setFunctionModule(i, r, n);
1886
1899
  }
1887
1900
  }
1888
1901
  drawFinderPattern(e, t) {
1889
1902
  for (let n = -4; n <= 4; n++) for (let r = -4; r <= 4; r++) {
1890
1903
  let i = Math.max(Math.abs(r), Math.abs(n)), a = e + r, o = t + n;
1891
- a >= 0 && a < this.size && o >= 0 && o < this.size && this.setFunctionModule(a, o, i !== 2 && i !== 4, Vn.Position);
1904
+ a >= 0 && a < this.size && o >= 0 && o < this.size && this.setFunctionModule(a, o, i !== 2 && i !== 4, Un.Position);
1892
1905
  }
1893
1906
  }
1894
1907
  drawAlignmentPattern(e, t) {
1895
- for (let n = -2; n <= 2; n++) for (let r = -2; r <= 2; r++) this.setFunctionModule(e + r, t + n, Math.max(Math.abs(r), Math.abs(n)) !== 1, Vn.Alignment);
1908
+ for (let n = -2; n <= 2; n++) for (let r = -2; r <= 2; r++) this.setFunctionModule(e + r, t + n, Math.max(Math.abs(r), Math.abs(n)) !== 1, Un.Alignment);
1896
1909
  }
1897
- setFunctionModule(e, t, n, r = Vn.Function) {
1910
+ setFunctionModule(e, t, n, r = Un.Function) {
1898
1911
  this.modules[t][e] = n, this.types[t][e] = r;
1899
1912
  }
1900
1913
  addEccAndInterleave(e) {
1901
1914
  let t = this.version, n = this.ecc;
1902
- if (e.length !== xr(t, n)) throw RangeError("Invalid argument");
1903
- let r = rr[n[0]][t], i = nr[n[0]][t], a = Math.floor(br(t) / 8), o = r - a % r, s = Math.floor(a / r), c = [], l = Sr(i);
1915
+ if (e.length !== Cr(t, n)) throw RangeError("Invalid argument");
1916
+ let r = ar[n[0]][t], i = ir[n[0]][t], a = Math.floor(Sr(t) / 8), o = r - a % r, s = Math.floor(a / r), c = [], l = wr(i);
1904
1917
  for (let t = 0, n = 0; t < r; t++) {
1905
1918
  let r = e.slice(n, n + s - i + (t < o ? 0 : 1));
1906
1919
  n += r.length;
1907
- let a = Cr(r, l);
1920
+ let a = Tr(r, l);
1908
1921
  t < o && r.push(0), c.push(r.concat(a));
1909
1922
  }
1910
1923
  let u = [];
@@ -1914,13 +1927,13 @@ var Vn = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "
1914
1927
  return u;
1915
1928
  }
1916
1929
  drawCodewords(e) {
1917
- if (e.length !== Math.floor(br(this.version) / 8)) throw RangeError("Invalid argument");
1930
+ if (e.length !== Math.floor(Sr(this.version) / 8)) throw RangeError("Invalid argument");
1918
1931
  let t = 0;
1919
1932
  for (let n = this.size - 1; n >= 1; n -= 2) {
1920
1933
  n === 6 && (n = 5);
1921
1934
  for (let r = 0; r < this.size; r++) for (let i = 0; i < 2; i++) {
1922
1935
  let a = n - i, o = n + 1 & 2 ? r : this.size - 1 - r;
1923
- !this.types[o][a] && t < e.length * 8 && (this.modules[o][a] = or(e[t >>> 3], 7 - (t & 7)), t++);
1936
+ !this.types[o][a] && t < e.length * 8 && (this.modules[o][a] = cr(e[t >>> 3], 7 - (t & 7)), t++);
1924
1937
  }
1925
1938
  }
1926
1939
  }
@@ -1970,8 +1983,8 @@ var Vn = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "
1970
1983
  0,
1971
1984
  0
1972
1985
  ];
1973
- for (let a = 0; a < this.size; a++) this.modules[t][a] === n ? (r++, r === 5 ? e += Qn : r > 5 && e++) : (this.finderPenaltyAddHistory(r, i), n || (e += this.finderPenaltyCountPatterns(i) * er), n = this.modules[t][a], r = 1);
1974
- e += this.finderPenaltyTerminateAndCount(n, r, i) * er;
1986
+ for (let a = 0; a < this.size; a++) this.modules[t][a] === n ? (r++, r === 5 ? e += er : r > 5 && e++) : (this.finderPenaltyAddHistory(r, i), n || (e += this.finderPenaltyCountPatterns(i) * nr), n = this.modules[t][a], r = 1);
1987
+ e += this.finderPenaltyTerminateAndCount(n, r, i) * nr;
1975
1988
  }
1976
1989
  for (let t = 0; t < this.size; t++) {
1977
1990
  let n = !1, r = 0, i = [
@@ -1983,17 +1996,17 @@ var Vn = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "
1983
1996
  0,
1984
1997
  0
1985
1998
  ];
1986
- for (let a = 0; a < this.size; a++) this.modules[a][t] === n ? (r++, r === 5 ? e += Qn : r > 5 && e++) : (this.finderPenaltyAddHistory(r, i), n || (e += this.finderPenaltyCountPatterns(i) * er), n = this.modules[a][t], r = 1);
1987
- e += this.finderPenaltyTerminateAndCount(n, r, i) * er;
1999
+ for (let a = 0; a < this.size; a++) this.modules[a][t] === n ? (r++, r === 5 ? e += er : r > 5 && e++) : (this.finderPenaltyAddHistory(r, i), n || (e += this.finderPenaltyCountPatterns(i) * nr), n = this.modules[a][t], r = 1);
2000
+ e += this.finderPenaltyTerminateAndCount(n, r, i) * nr;
1988
2001
  }
1989
2002
  for (let t = 0; t < this.size - 1; t++) for (let n = 0; n < this.size - 1; n++) {
1990
2003
  let r = this.modules[t][n];
1991
- r === this.modules[t][n + 1] && r === this.modules[t + 1][n] && r === this.modules[t + 1][n + 1] && (e += $n);
2004
+ r === this.modules[t][n + 1] && r === this.modules[t + 1][n] && r === this.modules[t + 1][n + 1] && (e += tr);
1992
2005
  }
1993
2006
  let t = 0;
1994
2007
  for (let e of this.modules) t = e.reduce((e, t) => e + +!!t, t);
1995
2008
  let n = this.size * this.size, r = Math.ceil(Math.abs(t * 20 - n * 10) / n) - 1;
1996
- return e += r * tr, e;
2009
+ return e += r * rr, e;
1997
2010
  }
1998
2011
  getAlignmentPatternPositions() {
1999
2012
  if (this.version === 1) return [];
@@ -2014,14 +2027,14 @@ var Vn = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "
2014
2027
  t[0] === 0 && (e += this.size), t.pop(), t.unshift(e);
2015
2028
  }
2016
2029
  };
2017
- function ar(e, t, n) {
2030
+ function sr(e, t, n) {
2018
2031
  if (t < 0 || t > 31 || e >>> t) throw RangeError("Value out of range");
2019
2032
  for (let r = t - 1; r >= 0; r--) n.push(e >>> r & 1);
2020
2033
  }
2021
- function or(e, t) {
2034
+ function cr(e, t) {
2022
2035
  return !!(e >>> t & 1);
2023
2036
  }
2024
- var sr = class {
2037
+ var lr = class {
2025
2038
  constructor(e, t, n) {
2026
2039
  if (this.mode = e, this.numChars = t, this.bitData = n, t < 0) throw RangeError("Invalid argument");
2027
2040
  this.bitData = n.slice();
@@ -2029,74 +2042,74 @@ var sr = class {
2029
2042
  getData() {
2030
2043
  return this.bitData.slice();
2031
2044
  }
2032
- }, cr = [
2045
+ }, ur = [
2033
2046
  1,
2034
2047
  10,
2035
2048
  12,
2036
2049
  14
2037
- ], lr = [
2050
+ ], dr = [
2038
2051
  2,
2039
2052
  9,
2040
2053
  11,
2041
2054
  13
2042
- ], ur = [
2055
+ ], fr = [
2043
2056
  4,
2044
2057
  8,
2045
2058
  16,
2046
2059
  16
2047
2060
  ];
2048
- function dr(e, t) {
2061
+ function pr(e, t) {
2049
2062
  return e[Math.floor((t + 7) / 17) + 1];
2050
2063
  }
2051
- function fr(e) {
2064
+ function mr(e) {
2052
2065
  let t = [];
2053
- for (let n of e) ar(n, 8, t);
2054
- return new sr(ur, e.length, t);
2066
+ for (let n of e) sr(n, 8, t);
2067
+ return new lr(fr, e.length, t);
2055
2068
  }
2056
- function pr(e) {
2057
- if (!gr(e)) throw RangeError("String contains non-numeric characters");
2069
+ function hr(e) {
2070
+ if (!vr(e)) throw RangeError("String contains non-numeric characters");
2058
2071
  let t = [];
2059
2072
  for (let n = 0; n < e.length;) {
2060
2073
  let r = Math.min(e.length - n, 3);
2061
- ar(Number.parseInt(e.substring(n, n + r), 10), r * 3 + 1, t), n += r;
2074
+ sr(Number.parseInt(e.substring(n, n + r), 10), r * 3 + 1, t), n += r;
2062
2075
  }
2063
- return new sr(cr, e.length, t);
2076
+ return new lr(ur, e.length, t);
2064
2077
  }
2065
- function mr(e) {
2066
- if (!_r(e)) throw RangeError("String contains unencodable characters in alphanumeric mode");
2078
+ function gr(e) {
2079
+ if (!yr(e)) throw RangeError("String contains unencodable characters in alphanumeric mode");
2067
2080
  let t = [], n;
2068
2081
  for (n = 0; n + 2 <= e.length; n += 2) {
2069
- let r = Yn.indexOf(e.charAt(n)) * 45;
2070
- r += Yn.indexOf(e.charAt(n + 1)), ar(r, 11, t);
2082
+ let r = Zn.indexOf(e.charAt(n)) * 45;
2083
+ r += Zn.indexOf(e.charAt(n + 1)), sr(r, 11, t);
2071
2084
  }
2072
- return n < e.length && ar(Yn.indexOf(e.charAt(n)), 6, t), new sr(lr, e.length, t);
2085
+ return n < e.length && sr(Zn.indexOf(e.charAt(n)), 6, t), new lr(dr, e.length, t);
2073
2086
  }
2074
- function hr(e) {
2075
- return e === "" ? [] : gr(e) ? [pr(e)] : _r(e) ? [mr(e)] : [fr(yr(e))];
2087
+ function _r(e) {
2088
+ return e === "" ? [] : vr(e) ? [hr(e)] : yr(e) ? [gr(e)] : [mr(xr(e))];
2076
2089
  }
2077
- function gr(e) {
2078
- return qn.test(e);
2090
+ function vr(e) {
2091
+ return Yn.test(e);
2079
2092
  }
2080
- function _r(e) {
2081
- return Jn.test(e);
2093
+ function yr(e) {
2094
+ return Xn.test(e);
2082
2095
  }
2083
- function vr(e, t) {
2096
+ function br(e, t) {
2084
2097
  let n = 0;
2085
2098
  for (let r of e) {
2086
- let e = dr(r.mode, t);
2099
+ let e = pr(r.mode, t);
2087
2100
  if (r.numChars >= 1 << e) return Infinity;
2088
2101
  n += 4 + e + r.bitData.length;
2089
2102
  }
2090
2103
  return n;
2091
2104
  }
2092
- function yr(e) {
2105
+ function xr(e) {
2093
2106
  e = encodeURI(e);
2094
2107
  let t = [];
2095
2108
  for (let n = 0; n < e.length; n++) e.charAt(n) === "%" ? (t.push(Number.parseInt(e.substring(n + 1, n + 3), 16)), n += 2) : t.push(e.charCodeAt(n));
2096
2109
  return t;
2097
2110
  }
2098
- function br(e) {
2099
- if (e < Xn || e > Zn) throw RangeError("Version number out of range");
2111
+ function Sr(e) {
2112
+ if (e < Qn || e > $n) throw RangeError("Version number out of range");
2100
2113
  let t = (16 * e + 128) * e + 64;
2101
2114
  if (e >= 2) {
2102
2115
  let n = Math.floor(e / 7) + 2;
@@ -2104,40 +2117,40 @@ function br(e) {
2104
2117
  }
2105
2118
  return t;
2106
2119
  }
2107
- function xr(e, t) {
2108
- return Math.floor(br(e) / 8) - nr[t[0]][e] * rr[t[0]][e];
2120
+ function Cr(e, t) {
2121
+ return Math.floor(Sr(e) / 8) - ir[t[0]][e] * ar[t[0]][e];
2109
2122
  }
2110
- function Sr(e) {
2123
+ function wr(e) {
2111
2124
  if (e < 1 || e > 255) throw RangeError("Degree out of range");
2112
2125
  let t = [];
2113
2126
  for (let n = 0; n < e - 1; n++) t.push(0);
2114
2127
  t.push(1);
2115
2128
  let n = 1;
2116
2129
  for (let r = 0; r < e; r++) {
2117
- for (let e = 0; e < t.length; e++) t[e] = wr(t[e], n), e + 1 < t.length && (t[e] ^= t[e + 1]);
2118
- n = wr(n, 2);
2130
+ for (let e = 0; e < t.length; e++) t[e] = Er(t[e], n), e + 1 < t.length && (t[e] ^= t[e + 1]);
2131
+ n = Er(n, 2);
2119
2132
  }
2120
2133
  return t;
2121
2134
  }
2122
- function Cr(e, t) {
2135
+ function Tr(e, t) {
2123
2136
  let n = t.map((e) => 0);
2124
2137
  for (let r of e) {
2125
2138
  let e = r ^ n.shift();
2126
- n.push(0), t.forEach((t, r) => n[r] ^= wr(t, e));
2139
+ n.push(0), t.forEach((t, r) => n[r] ^= Er(t, e));
2127
2140
  }
2128
2141
  return n;
2129
2142
  }
2130
- function wr(e, t) {
2143
+ function Er(e, t) {
2131
2144
  if (e >>> 8 || t >>> 8) throw RangeError("Byte out of range");
2132
2145
  let n = 0;
2133
2146
  for (let r = 7; r >= 0; r--) n = n << 1 ^ (n >>> 7) * 285, n ^= (t >>> r & 1) * e;
2134
2147
  return n;
2135
2148
  }
2136
- function Tr(e, t, n = 1, r = 40, i = -1, a = !0) {
2137
- if (!(Xn <= n && n <= r && r <= Zn) || i < -1 || i > 7) throw RangeError("Invalid value");
2149
+ function Dr(e, t, n = 1, r = 40, i = -1, a = !0) {
2150
+ if (!(Qn <= n && n <= r && r <= $n) || i < -1 || i > 7) throw RangeError("Invalid value");
2138
2151
  let o, s;
2139
2152
  for (o = n;; o++) {
2140
- let n = xr(o, t) * 8, i = vr(e, o);
2153
+ let n = Cr(o, t) * 8, i = br(e, o);
2141
2154
  if (i <= n) {
2142
2155
  s = i;
2143
2156
  break;
@@ -2145,25 +2158,25 @@ function Tr(e, t, n = 1, r = 40, i = -1, a = !0) {
2145
2158
  if (o >= r) throw RangeError("Data too long");
2146
2159
  }
2147
2160
  for (let e of [
2148
- Un,
2149
- Wn,
2150
- Gn
2151
- ]) a && s <= xr(o, e) * 8 && (t = e);
2161
+ Gn,
2162
+ Kn,
2163
+ qn
2164
+ ]) a && s <= Cr(o, e) * 8 && (t = e);
2152
2165
  let c = [];
2153
2166
  for (let t of e) {
2154
- ar(t.mode[0], 4, c), ar(t.numChars, dr(t.mode, o), c);
2167
+ sr(t.mode[0], 4, c), sr(t.numChars, pr(t.mode, o), c);
2155
2168
  for (let e of t.getData()) c.push(e);
2156
2169
  }
2157
- let l = xr(o, t) * 8;
2158
- ar(0, Math.min(4, l - c.length), c), ar(0, (8 - c.length % 8) % 8, c);
2159
- for (let e = 236; c.length < l; e ^= 253) ar(e, 8, c);
2170
+ let l = Cr(o, t) * 8;
2171
+ sr(0, Math.min(4, l - c.length), c), sr(0, (8 - c.length % 8) % 8, c);
2172
+ for (let e = 236; c.length < l; e ^= 253) sr(e, 8, c);
2160
2173
  let u = Array.from({ length: Math.ceil(c.length / 8) }, () => 0);
2161
- return c.forEach((e, t) => u[t >>> 3] |= e << 7 - (t & 7)), new ir(o, t, u, i);
2174
+ return c.forEach((e, t) => u[t >>> 3] |= e << 7 - (t & 7)), new or(o, t, u, i);
2162
2175
  }
2163
- function Er(e, t) {
2164
- let { ecc: n = "L", boostEcc: r = !1, minVersion: i = 1, maxVersion: a = 40, maskPattern: o = -1, border: s = 1 } = t || {}, c = typeof e == "string" ? hr(e) : Array.isArray(e) ? [fr(e)] : void 0;
2176
+ function Or(e, t) {
2177
+ let { ecc: n = "L", boostEcc: r = !1, minVersion: i = 1, maxVersion: a = 40, maskPattern: o = -1, border: s = 1 } = t || {}, c = typeof e == "string" ? _r(e) : Array.isArray(e) ? [mr(e)] : void 0;
2165
2178
  if (!c) throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);
2166
- let l = Tr(c, Kn[n], i, a, o, r), u = Dr({
2179
+ let l = Dr(c, Jn[n], i, a, o, r), u = kr({
2167
2180
  version: l.version,
2168
2181
  maskPattern: l.mask,
2169
2182
  size: l.size,
@@ -2172,14 +2185,14 @@ function Er(e, t) {
2172
2185
  }, s);
2173
2186
  return t?.invert && (u.data = u.data.map((e) => e.map((e) => !e))), t?.onEncoded?.(u), u;
2174
2187
  }
2175
- function Dr(e, t = 1) {
2188
+ function kr(e, t = 1) {
2176
2189
  if (!t) return e;
2177
2190
  let { size: n } = e, r = n + t * 2;
2178
2191
  e.size = r, e.data.forEach((e) => {
2179
2192
  for (let n = 0; n < t; n++) e.unshift(!1), e.push(!1);
2180
2193
  });
2181
2194
  for (let n = 0; n < t; n++) e.data.unshift(Array.from({ length: r }, (e) => !1)), e.data.push(Array.from({ length: r }, (e) => !1));
2182
- let i = Vn.Border;
2195
+ let i = Un.Border;
2183
2196
  e.types.forEach((e) => {
2184
2197
  for (let n = 0; n < t; n++) e.unshift(i), e.push(i);
2185
2198
  });
@@ -2188,23 +2201,23 @@ function Dr(e, t = 1) {
2188
2201
  }
2189
2202
  //#endregion
2190
2203
  //#region ../../src/steps/whatsapp/whatsappUtils.ts
2191
- function Or(e, t) {
2204
+ function Ar(e, t) {
2192
2205
  let n = Object.entries(e).find(([, e]) => e.name === t);
2193
2206
  return n ? {
2194
2207
  uuid: n[0],
2195
2208
  ...n[1]
2196
2209
  } : null;
2197
2210
  }
2198
- function kr(e) {
2199
- let t = Or(e, "message");
2211
+ function jr(e) {
2212
+ let t = Ar(e, "message");
2200
2213
  if (t) return t;
2201
- let n = Or(e, "phone")?.uuid, r = Object.entries(e).find(([e]) => e !== n);
2214
+ let n = Ar(e, "phone")?.uuid, r = Object.entries(e).find(([e]) => e !== n);
2202
2215
  return r ? {
2203
2216
  uuid: r[0],
2204
2217
  ...r[1]
2205
2218
  } : null;
2206
2219
  }
2207
- function Ar(e, t, n) {
2220
+ function Mr(e, t, n) {
2208
2221
  let r = e.trim(), i = n?.trim();
2209
2222
  return [
2210
2223
  t.trim(),
@@ -2212,9 +2225,9 @@ function Ar(e, t, n) {
2212
2225
  i && `*telefoonnummer:*\n\n${i}`
2213
2226
  ].filter(Boolean).join("\n\n");
2214
2227
  }
2215
- function jr(e) {
2228
+ function Nr(e) {
2216
2229
  try {
2217
- let { data: t, size: n } = Er(e), r = n + 4, i = "";
2230
+ let { data: t, size: n } = Or(e), r = n + 4, i = "";
2218
2231
  for (let e = 0; e < n; e++) for (let r = 0; r < n; r++) t[e][r] && (i += `M${r + 2},${e + 2}h1v1h-1z`);
2219
2232
  return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${r} ${r}"><rect width="${r}" height="${r}" fill="#fff"/><path d="${i}" fill="#111b21"/></svg>`;
2220
2233
  } catch (e) {
@@ -2223,96 +2236,96 @@ function jr(e) {
2223
2236
  }
2224
2237
  //#endregion
2225
2238
  //#region ../../src/steps/whatsappStep.tsx
2226
- var Mr = "whatsapp";
2227
- function Nr(e) {
2228
- let { step: t, config: r, isCurrent: i, onOptionSelect: a } = e, o = Fn(r), c = p(zn), [l, u] = d(!1), [m, g] = d(null), [_, v] = d(null), [y, x] = d(null), [S, C] = d(null), [w, D] = d(!1), O = f(null), k = f(null), A = f(void 0);
2239
+ var Pr = "whatsapp";
2240
+ function Fr(e) {
2241
+ let { step: t, config: r, isCurrent: i, onOptionSelect: a } = e, o = Ln(r), c = p(Vn), [l, u] = d(!1), [m, g] = d(null), [_, v] = d(null), [y, b] = d(null), [S, C] = d(null), [w, T] = d(!1), O = f(null), k = f(null), A = f(void 0);
2229
2242
  s(() => () => clearTimeout(A.current), []);
2230
- let ee = t.attributes?.show_qr_code === !0, { isDesktop: j } = ue(), N = ee && j, F = ne(r.leadbot?.language), { t: I } = Bn(F), L = t.attributes?.sender_name || I("whatsapp_default_contact", "Support"), R = t.attributes?.sender_image?.url || null, re = t.attributes?.text || "", ie = P(re, F, {
2243
+ let ee = t.attributes?.show_qr_code === !0, { isDesktop: j } = pe(), M = ee && j, N = ae(r.leadbot?.language), { t: F } = Hn(N), I = t.attributes?.sender_name || F("whatsapp_default_contact", "Support"), re = t.attributes?.sender_image?.url || null, ie = t.attributes?.text || "", oe = P(ie, N, {
2231
2244
  name: r.leadbot.default_contact_information?.label,
2232
2245
  website_name: r.leadbot.domain.display_name,
2233
2246
  email: r.leadbot.default_contact_information?.email,
2234
2247
  phonenumber: r.leadbot.default_contact_information?.phone
2235
- }), ae = t.attributes?.form_schema?.fields || {}, oe = kr(ae), se = Or(ae, "phone"), ce = t.attributes?.ask_phone_number === !0 && !!se, B = y !== null;
2248
+ }), se = t.attributes?.form_schema?.fields || {}, ce = jr(se), le = Ar(se, "phone"), ue = t.attributes?.ask_phone_number === !0 && !!le, R = y !== null;
2236
2249
  s(() => {
2237
2250
  if (!i) return;
2238
2251
  let e = k.current?.closest(".leadbot-steps-container");
2239
2252
  e && (e.scrollTop = e.scrollHeight);
2240
2253
  }, [
2241
2254
  i,
2242
- B,
2255
+ R,
2243
2256
  w,
2244
2257
  _,
2245
2258
  m
2246
2259
  ]);
2247
- let le = I("whatsapp_placeholder", "Type a message"), V = I("whatsapp_phone_placeholder", "Your phone number"), H = I("whatsapp_phone_prompt", "What is your phone number? Then we will continue in WhatsApp."), de = I("whatsapp_phone_invalid", "Please enter a valid phone number."), fe = I("whatsapp_status_online", "Online"), pe = () => {
2260
+ let de = F("whatsapp_placeholder", "Type a message"), z = F("whatsapp_phone_placeholder", "Your phone number"), fe = F("whatsapp_phone_prompt", "What is your phone number? Then we will continue in WhatsApp."), B = F("whatsapp_phone_invalid", "Please enter a valid phone number."), me = F("whatsapp_status_online", "Online"), he = () => {
2248
2261
  let e = /* @__PURE__ */ new Date();
2249
2262
  return e.getHours().toString().padStart(2, "0") + ":" + e.getMinutes().toString().padStart(2, "0");
2250
- }, me = t.attributes?.sender_number || t.attributes?.phone_number || "", he = I("whatsapp_error_submission", "We could not save your message. You can still continue in WhatsApp."), ge = I("whatsapp_error_phone_missing", "WhatsApp is not configured for this step."), _e = z(window.location.href), U = async (n, r) => {
2251
- if (!oe) return null;
2252
- let i = { [oe.uuid]: n };
2253
- r && se && (i[se.uuid] = r);
2254
- let a = await o.submitUserData(Mr, t.uuid, i, c ? { chat_session_id: c } : void 0);
2263
+ }, ge = t.attributes?.sender_number || t.attributes?.phone_number || "", _e = F("whatsapp_error_submission", "We could not save your message. You can still continue in WhatsApp."), ve = F("whatsapp_error_phone_missing", "WhatsApp is not configured for this step."), ye = L(window.location.href), be = async (n, r) => {
2264
+ if (!ce) return null;
2265
+ let i = { [ce.uuid]: n };
2266
+ r && le && (i[le.uuid] = r);
2267
+ let a = await o.submitUserData(Pr, t.uuid, i, c ? { chat_session_id: c } : void 0);
2255
2268
  if (a?.success === !1) throw Error(a.error || "Submission failed");
2256
2269
  return e.onSubmitted?.(i), null;
2257
- }, ve = I("whatsapp_error_redirect", "WhatsApp could not be opened. Please check your pop-up settings."), ye = (e, t) => {
2258
- let n = Ar(e, _e, t), r = T(me, n);
2270
+ }, xe = F("whatsapp_error_redirect", "WhatsApp could not be opened. Please check your pop-up settings."), V = (e, t) => {
2271
+ let n = Mr(e, ye, t), r = E(ge, n);
2259
2272
  return r ? (window.open(r, "_blank", "noopener,noreferrer"), !0) : !1;
2260
- }, be = () => {
2273
+ }, Se = () => {
2261
2274
  let e = t.options?.[0];
2262
2275
  e?.next_step_uuid && a(e.next_step_uuid);
2263
- }, xe = (e, t) => {
2264
- let n = jr(e);
2276
+ }, Ce = (e, t) => {
2277
+ let n = Nr(e);
2265
2278
  return n ? (v(n), C(t), !0) : !1;
2266
- }, Se = async (n) => {
2279
+ }, we = async (n) => {
2267
2280
  if (n.preventDefault(), !i || l || w) return;
2268
2281
  let r = O.current?.value?.trim();
2269
2282
  if (!r) return;
2270
- if (g(null), ce && !B) {
2271
- x(r), D(!0), A.current = setTimeout(() => D(!1), b), O.current && (O.current.value = "");
2283
+ if (g(null), ue && !R) {
2284
+ b(r), T(!0), A.current = setTimeout(() => T(!1), x), O.current && (O.current.value = "");
2272
2285
  return;
2273
2286
  }
2274
- let a = B ? y : r, o = B ? te(r) : void 0;
2275
- if (o !== void 0 && !M(o)) {
2276
- g(de);
2287
+ let a = R ? y : r, o = R ? ne(r) : void 0;
2288
+ if (o !== void 0 && !te(o)) {
2289
+ g(B);
2277
2290
  return;
2278
2291
  }
2279
2292
  u(!0);
2280
2293
  try {
2281
2294
  try {
2282
- await U(a, o);
2295
+ await be(a, o);
2283
2296
  } catch (e) {
2284
- console.error("WhatsApp data submission failed:", e), g(he);
2297
+ console.error("WhatsApp data submission failed:", e), g(_e);
2285
2298
  }
2286
- if (!me || !me.trim()) {
2287
- g(ge);
2299
+ if (!ge || !ge.trim()) {
2300
+ g(ve);
2288
2301
  return;
2289
2302
  }
2290
- if (N) {
2291
- let n = Ar(a, _e, o), r = T(me, n), i = E(me, n);
2292
- if (!r || !i || !xe(r, i)) {
2293
- g(ve);
2303
+ if (M) {
2304
+ let n = Mr(a, ye, o), r = E(ge, n), i = D(ge, n);
2305
+ if (!r || !i || !Ce(r, i)) {
2306
+ g(xe);
2294
2307
  return;
2295
2308
  }
2296
- e.analyticsTracker?.trackWhatsAppRedirect(t), O.current && (O.current.value = ""), x(null);
2309
+ e.analyticsTracker?.trackWhatsAppRedirect(t), O.current && (O.current.value = ""), b(null);
2297
2310
  return;
2298
2311
  }
2299
- if (!ye(a, o)) {
2300
- g(ve);
2312
+ if (!V(a, o)) {
2313
+ g(xe);
2301
2314
  return;
2302
2315
  }
2303
- e.analyticsTracker?.trackWhatsAppRedirect(t), O.current && (O.current.value = ""), x(null), be();
2316
+ e.analyticsTracker?.trackWhatsAppRedirect(t), O.current && (O.current.value = ""), b(null), Se();
2304
2317
  } catch (e) {
2305
- console.error("WhatsApp submission failed:", e), g(he);
2318
+ console.error("WhatsApp submission failed:", e), g(_e);
2306
2319
  } finally {
2307
2320
  u(!1);
2308
2321
  }
2309
- }, Ce = /* @__PURE__ */ h(Dn, {
2322
+ }, Te = /* @__PURE__ */ h(kn, {
2310
2323
  align: "right",
2311
2324
  className: "leadbot-whatsapp-branding",
2312
2325
  leadbot: r.leadbot,
2313
- language: F,
2326
+ language: N,
2314
2327
  asLink: !0
2315
- }), we = I("whatsapp_qr_title", "Open in WhatsApp"), W = I("whatsapp_qr_scan_label", "Scan this QR code with your phone to continue on WhatsApp"), Te = I("whatsapp_qr_open_web", "Open WhatsApp Web");
2328
+ }), Ee = F("whatsapp_qr_title", "Open in WhatsApp"), De = F("whatsapp_qr_scan_label", "Scan this QR code with your phone to continue on WhatsApp"), Oe = F("whatsapp_qr_open_web", "Open WhatsApp Web");
2316
2329
  return /* @__PURE__ */ h("div", {
2317
2330
  className: "leadbot-whatsapp-interface",
2318
2331
  ref: k,
@@ -2321,44 +2334,44 @@ function Nr(e) {
2321
2334
  className: "leadbot-whatsapp-header",
2322
2335
  children: /* @__PURE__ */ h("div", {
2323
2336
  className: "leadbot-whatsapp-contact-info",
2324
- children: [/* @__PURE__ */ h(wn, {
2325
- imageUrl: R,
2326
- alt: L,
2337
+ children: [/* @__PURE__ */ h(En, {
2338
+ imageUrl: re,
2339
+ alt: I,
2327
2340
  variant: "whatsapp"
2328
2341
  }), /* @__PURE__ */ h("div", {
2329
2342
  className: "leadbot-whatsapp-contact-details",
2330
2343
  children: [/* @__PURE__ */ h("div", {
2331
2344
  className: "leadbot-whatsapp-name",
2332
- children: L
2345
+ children: I
2333
2346
  }), /* @__PURE__ */ h("div", {
2334
2347
  className: "leadbot-whatsapp-status",
2335
- children: fe
2348
+ children: me
2336
2349
  })]
2337
2350
  })]
2338
2351
  })
2339
2352
  }),
2340
2353
  /* @__PURE__ */ h("div", {
2341
2354
  className: "leadbot-whatsapp-chat",
2342
- children: [ie && /* @__PURE__ */ h("div", {
2355
+ children: [oe && /* @__PURE__ */ h("div", {
2343
2356
  className: "leadbot-whatsapp-message",
2344
2357
  children: [/* @__PURE__ */ h("div", {
2345
2358
  className: "leadbot-whatsapp-message-content",
2346
- dangerouslySetInnerHTML: { __html: Sn(ie) }
2359
+ dangerouslySetInnerHTML: { __html: wn(oe) }
2347
2360
  }), /* @__PURE__ */ h("div", {
2348
2361
  className: "leadbot-whatsapp-message-time",
2349
- children: [pe(), /* @__PURE__ */ h("span", {
2362
+ children: [he(), /* @__PURE__ */ h("span", {
2350
2363
  className: "leadbot-whatsapp-checkmarks",
2351
- dangerouslySetInnerHTML: { __html: G.checkDouble }
2364
+ dangerouslySetInnerHTML: { __html: H.checkDouble }
2352
2365
  })]
2353
2366
  })]
2354
- }), B && /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ h("div", {
2367
+ }), R && /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ h("div", {
2355
2368
  className: "leadbot-whatsapp-message leadbot-whatsapp-message-outgoing",
2356
2369
  children: [/* @__PURE__ */ h("div", {
2357
2370
  className: "leadbot-whatsapp-message-content",
2358
2371
  children: y
2359
2372
  }), /* @__PURE__ */ h("div", {
2360
2373
  className: "leadbot-whatsapp-message-time",
2361
- children: pe()
2374
+ children: he()
2362
2375
  })]
2363
2376
  }), w ? /* @__PURE__ */ h("div", {
2364
2377
  className: "leadbot-whatsapp-message leadbot-whatsapp-typing",
@@ -2375,7 +2388,7 @@ function Nr(e) {
2375
2388
  className: "leadbot-whatsapp-message",
2376
2389
  children: /* @__PURE__ */ h("div", {
2377
2390
  className: "leadbot-whatsapp-message-content",
2378
- children: H
2391
+ children: fe
2379
2392
  })
2380
2393
  })] })]
2381
2394
  }),
@@ -2387,7 +2400,7 @@ function Nr(e) {
2387
2400
  children: [
2388
2401
  /* @__PURE__ */ h("div", {
2389
2402
  className: "leadbot-whatsapp-qr-title",
2390
- children: we
2403
+ children: Ee
2391
2404
  }),
2392
2405
  /* @__PURE__ */ h("div", {
2393
2406
  className: "leadbot-whatsapp-qr-image",
@@ -2395,7 +2408,7 @@ function Nr(e) {
2395
2408
  }),
2396
2409
  /* @__PURE__ */ h("div", {
2397
2410
  className: "leadbot-whatsapp-qr-label",
2398
- children: W
2411
+ children: De
2399
2412
  })
2400
2413
  ]
2401
2414
  }),
@@ -2408,11 +2421,11 @@ function Nr(e) {
2408
2421
  className: "leadbot-whatsapp-qr-btn leadbot-whatsapp-qr-btn-web",
2409
2422
  children: [/* @__PURE__ */ h("span", {
2410
2423
  className: "leadbot-whatsapp-qr-btn-icon",
2411
- dangerouslySetInnerHTML: { __html: G.whatsapp }
2412
- }), Te]
2424
+ dangerouslySetInnerHTML: { __html: H.whatsapp }
2425
+ }), Oe]
2413
2426
  })
2414
2427
  }),
2415
- Ce
2428
+ Te
2416
2429
  ]
2417
2430
  }) : /* @__PURE__ */ h("div", {
2418
2431
  className: "leadbot-whatsapp-input-container",
@@ -2422,28 +2435,28 @@ function Nr(e) {
2422
2435
  children: m
2423
2436
  }),
2424
2437
  /* @__PURE__ */ h("form", {
2425
- onSubmit: Se,
2438
+ onSubmit: we,
2426
2439
  children: /* @__PURE__ */ h("div", {
2427
2440
  className: "leadbot-whatsapp-input-bar",
2428
2441
  children: [/* @__PURE__ */ h("input", {
2429
2442
  ref: O,
2430
- type: B ? "tel" : "text",
2443
+ type: R ? "tel" : "text",
2431
2444
  className: "leadbot-whatsapp-message-field",
2432
- placeholder: B ? V : le,
2433
- "aria-label": B ? V : le,
2434
- autoComplete: B ? "tel" : "off",
2445
+ placeholder: R ? z : de,
2446
+ "aria-label": R ? z : de,
2447
+ autoComplete: R ? "tel" : "off",
2435
2448
  required: !0,
2436
2449
  disabled: !i || l || w
2437
2450
  }), /* @__PURE__ */ h("button", {
2438
2451
  type: "submit",
2439
2452
  className: `leadbot-whatsapp-send-btn${l ? " leadbot-whatsapp-send-disabled" : ""}`,
2440
- "aria-label": I("whatsapp_send_label", "Send message"),
2453
+ "aria-label": F("whatsapp_send_label", "Send message"),
2441
2454
  disabled: !i || l,
2442
- children: /* @__PURE__ */ h("span", { dangerouslySetInnerHTML: { __html: G.send } })
2455
+ children: /* @__PURE__ */ h("span", { dangerouslySetInnerHTML: { __html: H.send } })
2443
2456
  })]
2444
2457
  })
2445
2458
  }),
2446
- Ce
2459
+ Te
2447
2460
  ]
2448
2461
  })
2449
2462
  ]
@@ -2451,62 +2464,62 @@ function Nr(e) {
2451
2464
  }
2452
2465
  //#endregion
2453
2466
  //#region ../../node_modules/.pnpm/preact@10.29.8_preact-render-to-string@6.7.0/node_modules/preact/compat/dist/compat.module.js
2454
- function Pr(e, t) {
2467
+ function Ir(e, t) {
2455
2468
  for (var n in t) e[n] = t[n];
2456
2469
  return e;
2457
2470
  }
2458
- function Fr(e, t) {
2471
+ function Lr(e, t) {
2459
2472
  for (var n in e) if (n !== "__source" && !(n in t)) return !0;
2460
2473
  for (var r in t) if (r !== "__source" && e[r] !== t[r]) return !0;
2461
2474
  return !1;
2462
2475
  }
2463
- function Ir(e, t) {
2476
+ function Rr(e, t) {
2464
2477
  this.props = e, this.context = t;
2465
2478
  }
2466
- (Ir.prototype = new g()).isPureReactComponent = !0, Ir.prototype.shouldComponentUpdate = function(e, t) {
2467
- return Fr(this.props, e) || Fr(this.state, t);
2479
+ (Rr.prototype = new g()).isPureReactComponent = !0, Rr.prototype.shouldComponentUpdate = function(e, t) {
2480
+ return Lr(this.props, e) || Lr(this.state, t);
2468
2481
  };
2469
- var Lr = e.__b;
2482
+ var zr = e.__b;
2470
2483
  e.__b = function(e) {
2471
- e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), Lr && Lr(e);
2484
+ e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), zr && zr(e);
2472
2485
  }, typeof Symbol < "u" && Symbol.for;
2473
- var Rr = e.__e;
2486
+ var Br = e.__e;
2474
2487
  e.__e = function(e, t, n, r) {
2475
2488
  if (e.then) {
2476
2489
  for (var i, a = t; a = a.__;) if ((i = a.__c) && i.__c) return t.__e ?? (t.__e = n.__e, t.__k = n.__k || []), i.__c(e, t);
2477
2490
  }
2478
- Rr(e, t, n, r);
2491
+ Br(e, t, n, r);
2479
2492
  };
2480
- var zr = e.unmount;
2481
- function Br(e, t, n) {
2493
+ var Vr = e.unmount;
2494
+ function Hr(e, t, n) {
2482
2495
  return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(e) {
2483
2496
  typeof e.__c == "function" && e.__c();
2484
- }), e.__c.__H = null), (e = Pr({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c.__e = !0, e.__c = null), e.__k = e.__k && e.__k.map(function(e) {
2485
- return Br(e, t, n);
2497
+ }), e.__c.__H = null), (e = Ir({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c.__e = !0, e.__c = null), e.__k = e.__k && e.__k.map(function(e) {
2498
+ return Hr(e, t, n);
2486
2499
  })), e;
2487
2500
  }
2488
- function Vr(e, t, n) {
2501
+ function Ur(e, t, n) {
2489
2502
  return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(e) {
2490
- return Vr(e, t, n);
2503
+ return Ur(e, t, n);
2491
2504
  }), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
2492
2505
  }
2493
- function Hr() {
2506
+ function Wr() {
2494
2507
  this.__u = 0, this.o = null, this.__b = null;
2495
2508
  }
2496
- function Ur(e) {
2509
+ function Gr(e) {
2497
2510
  var t = e.__ && e.__.__c;
2498
2511
  return t && t.__a && t.__a(e);
2499
2512
  }
2500
- function Wr() {
2513
+ function Kr() {
2501
2514
  this.i = null, this.l = null;
2502
2515
  }
2503
2516
  e.unmount = function(e) {
2504
2517
  var t = e.__c;
2505
- t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), zr && zr(e);
2506
- }, (Hr.prototype = new g()).__c = function(e, t) {
2518
+ t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), Vr && Vr(e);
2519
+ }, (Wr.prototype = new g()).__c = function(e, t) {
2507
2520
  var n = t.__c, r = this;
2508
2521
  r.o ??= [], r.o.push(n);
2509
- var i = Ur(r.__v), a = !1, o = function() {
2522
+ var i = Gr(r.__v), a = !1, o = function() {
2510
2523
  a || r.__z || (a = !0, n.__R = null, i ? i(c) : c());
2511
2524
  };
2512
2525
  n.__R = o;
@@ -2516,39 +2529,39 @@ e.unmount = function(e) {
2516
2529
  if (!--r.__u) {
2517
2530
  if (r.state.__a) {
2518
2531
  var e = r.state.__a;
2519
- r.__v.__k[0] = Vr(e, e.__c.__P, e.__c.__O);
2532
+ r.__v.__k[0] = Ur(e, e.__c.__P, e.__c.__O);
2520
2533
  }
2521
2534
  var t;
2522
2535
  for (r.setState({ __a: r.__b = null }); t = r.o.pop();) t.__P = s, t.forceUpdate();
2523
2536
  }
2524
2537
  };
2525
2538
  r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(o, o);
2526
- }, Hr.prototype.componentWillUnmount = function() {
2539
+ }, Wr.prototype.componentWillUnmount = function() {
2527
2540
  this.o = [];
2528
- }, Hr.prototype.render = function(e, t) {
2541
+ }, Wr.prototype.render = function(e, t) {
2529
2542
  if (this.__b) {
2530
2543
  if (this.__v.__k) {
2531
2544
  var r = document.createElement("div"), i = this.__v.__k[0].__c;
2532
- this.__v.__k[0] = Br(this.__b, r, i.__O = i.__P);
2545
+ this.__v.__k[0] = Hr(this.__b, r, i.__O = i.__P);
2533
2546
  }
2534
2547
  this.__b = null;
2535
2548
  }
2536
2549
  var a = t.__a && u(n, null, e.fallback);
2537
2550
  return a && (a.__u &= -33), [u(n, null, t.__a ? null : e.children), a];
2538
2551
  };
2539
- var Gr = function(e, t, n) {
2552
+ var qr = function(e, t, n) {
2540
2553
  if (++n[1] === n[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (n = e.i; n;) {
2541
2554
  for (; n.length > 3;) n.pop()();
2542
2555
  if (n[1] < n[0]) break;
2543
2556
  e.i = n = n[2];
2544
2557
  }
2545
2558
  };
2546
- function Kr(e) {
2559
+ function Jr(e) {
2547
2560
  return this.getChildContext = function() {
2548
2561
  return e.context;
2549
2562
  }, e.children;
2550
2563
  }
2551
- function qr(e) {
2564
+ function Yr(e) {
2552
2565
  var t = this, n = e.h;
2553
2566
  if (t.componentWillUnmount = function() {
2554
2567
  r(null, t.v), t.v = null, t.h = null;
@@ -2571,24 +2584,24 @@ function qr(e) {
2571
2584
  }
2572
2585
  };
2573
2586
  }
2574
- r(u(Kr, { context: t.context }, e.__v), t.v);
2587
+ r(u(Jr, { context: t.context }, e.__v), t.v);
2575
2588
  }
2576
- function Jr(e, t) {
2577
- var n = u(qr, {
2589
+ function Xr(e, t) {
2590
+ var n = u(Yr, {
2578
2591
  __v: e,
2579
2592
  h: t
2580
2593
  });
2581
2594
  return n.containerInfo = t, n;
2582
2595
  }
2583
- (Wr.prototype = new g()).__a = function(e) {
2584
- var t = this, n = Ur(t.__v), r = t.l.get(e);
2596
+ (Kr.prototype = new g()).__a = function(e) {
2597
+ var t = this, n = Gr(t.__v), r = t.l.get(e);
2585
2598
  return r[0]++, function(i) {
2586
2599
  var a = function() {
2587
- t.props.revealOrder ? (r.push(i), Gr(t, e, r)) : i();
2600
+ t.props.revealOrder ? (r.push(i), qr(t, e, r)) : i();
2588
2601
  };
2589
2602
  n ? n(a) : a();
2590
2603
  };
2591
- }, Wr.prototype.render = function(e) {
2604
+ }, Kr.prototype.render = function(e) {
2592
2605
  this.i = null, this.l = /* @__PURE__ */ new Map();
2593
2606
  var t = a(e.children);
2594
2607
  e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
@@ -2598,13 +2611,13 @@ function Jr(e, t) {
2598
2611
  this.i
2599
2612
  ]);
2600
2613
  return e.children;
2601
- }, Wr.prototype.componentDidUpdate = Wr.prototype.componentDidMount = function() {
2614
+ }, Kr.prototype.componentDidUpdate = Kr.prototype.componentDidMount = function() {
2602
2615
  var e = this;
2603
2616
  this.l.forEach(function(t, n) {
2604
- Gr(e, n, t);
2617
+ qr(e, n, t);
2605
2618
  });
2606
2619
  };
2607
- var Yr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Xr = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Zr = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Qr = /[A-Z0-9]/g, $r = typeof document < "u", ei = function(e) {
2620
+ var Zr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Qr = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, $r = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, ei = /[A-Z0-9]/g, ti = typeof document < "u", ni = function(e) {
2608
2621
  return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
2609
2622
  };
2610
2623
  g.prototype.isReactComponent = !0, [
@@ -2626,59 +2639,59 @@ g.prototype.isReactComponent = !0, [
2626
2639
  }
2627
2640
  });
2628
2641
  });
2629
- var ti = e.event;
2642
+ var ri = e.event;
2630
2643
  e.event = function(e) {
2631
- return ti && (e = ti(e)), e.persist = function() {}, e.isPropagationStopped = function() {
2644
+ return ri && (e = ri(e)), e.persist = function() {}, e.isPropagationStopped = function() {
2632
2645
  return this.cancelBubble;
2633
2646
  }, e.isDefaultPrevented = function() {
2634
2647
  return this.defaultPrevented;
2635
2648
  }, e.nativeEvent = e;
2636
2649
  };
2637
- var ni = {
2650
+ var ii = {
2638
2651
  configurable: !0,
2639
2652
  get: function() {
2640
2653
  return this.class;
2641
2654
  }
2642
- }, ri = e.vnode;
2655
+ }, ai = e.vnode;
2643
2656
  e.vnode = function(e) {
2644
2657
  typeof e.type == "string" && function(e) {
2645
2658
  var t = e.props, n = e.type, r = {}, i = n.indexOf("-") == -1;
2646
2659
  for (var o in t) {
2647
2660
  var s = t[o];
2648
- if (!(o === "value" && "defaultValue" in t && s == null || $r && o === "children" && n === "noscript" || o === "class" || o === "className")) {
2661
+ if (!(o === "value" && "defaultValue" in t && s == null || ti && o === "children" && n === "noscript" || o === "class" || o === "className")) {
2649
2662
  var c = o.toLowerCase();
2650
- o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && !0 === s ? s = "" : c === "translate" && s === "no" ? s = !1 : c[0] === "o" && c[1] === "n" ? c === "ondoubleclick" ? o = "ondblclick" : c !== "onchange" || n !== "input" && n !== "textarea" || ei(t.type) ? c === "onfocus" ? o = "onfocusin" : c === "onblur" ? o = "onfocusout" : Zr.test(o) && (o = c) : c = o = "oninput" : i && Xr.test(o) ? o = o.replace(Qr, "-$&").toLowerCase() : s === null && (s = void 0), c === "oninput" && r[o = c] && (o = "oninputCapture"), r[o] = s;
2663
+ o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && !0 === s ? s = "" : c === "translate" && s === "no" ? s = !1 : c[0] === "o" && c[1] === "n" ? c === "ondoubleclick" ? o = "ondblclick" : c !== "onchange" || n !== "input" && n !== "textarea" || ni(t.type) ? c === "onfocus" ? o = "onfocusin" : c === "onblur" ? o = "onfocusout" : $r.test(o) && (o = c) : c = o = "oninput" : i && Qr.test(o) ? o = o.replace(ei, "-$&").toLowerCase() : s === null && (s = void 0), c === "oninput" && r[o = c] && (o = "oninputCapture"), r[o] = s;
2651
2664
  }
2652
2665
  }
2653
2666
  n == "select" && (r.multiple && Array.isArray(r.value) && (r.value = a(t.children).forEach(function(e) {
2654
2667
  e.props.selected = r.value.indexOf(e.props.value) != -1;
2655
2668
  })), r.defaultValue != null && (r.value = a(t.children).forEach(function(e) {
2656
2669
  e.props.selected = r.multiple ? r.defaultValue.indexOf(e.props.value) != -1 : r.defaultValue == e.props.value;
2657
- }))), t.class && !t.className ? (r.class = t.class, Object.defineProperty(r, "className", ni)) : t.className && (r.class = r.className = t.className), e.props = r;
2658
- }(e), e.$$typeof = Yr, ri && ri(e);
2670
+ }))), t.class && !t.className ? (r.class = t.class, Object.defineProperty(r, "className", ii)) : t.className && (r.class = r.className = t.className), e.props = r;
2671
+ }(e), e.$$typeof = Zr, ai && ai(e);
2659
2672
  };
2660
- var ii = e.__r;
2673
+ var oi = e.__r;
2661
2674
  e.__r = function(e) {
2662
- ii && ii(e), e.__c;
2675
+ oi && oi(e), e.__c;
2663
2676
  };
2664
- var ai = e.diffed;
2677
+ var si = e.diffed;
2665
2678
  e.diffed = function(e) {
2666
- ai && ai(e);
2679
+ si && si(e);
2667
2680
  var t = e.props, n = e.__e;
2668
2681
  n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value);
2669
2682
  };
2670
2683
  //#endregion
2671
2684
  //#region ../../src/hooks/useAnchoredPanel.ts
2672
- var oi = ".leadbot-widget", si = 6, ci = 8, li = 32;
2673
- function ui(e) {
2685
+ var ci = ".leadbot-widget", li = 6, ui = 8, di = 32;
2686
+ function fi(e) {
2674
2687
  let { isOpen: t, onRequestClose: n, remeasureKey: r, minWidth: i = 0 } = e, a = f(null), c = f(null), l = f(null), u = f(null), [p, m] = d(null), [h, g] = d(null), _ = () => {
2675
2688
  let e = c.current, t = l.current;
2676
2689
  if (!e || !t) return;
2677
- let n = e.getBoundingClientRect(), r = window.innerWidth, a = window.innerHeight, o = Math.min(Math.max(n.width, i), r - 16), s = Math.min(Math.max(n.left, ci), Math.max(ci, r - o - ci)), d = `${o}px`;
2690
+ let n = e.getBoundingClientRect(), r = window.innerWidth, a = window.innerHeight, o = Math.min(Math.max(n.width, i), r - 16), s = Math.min(Math.max(n.left, ui), Math.max(ui, r - o - ui)), d = `${o}px`;
2678
2691
  t.style.width !== d && (t.style.width = d);
2679
- let f = t.offsetHeight, p = a - n.bottom - si - ci, h = n.top - si - ci, g = f <= p, _ = f <= h, v = u.current;
2680
- v ? v === "below" && f > p + li && _ && h > p + li ? v = "above" : v === "above" && !_ && f <= p + li && (v = "below") : v = !g && _ && h > p ? "above" : "below", u.current = v;
2681
- let y = v === "above", b = y ? Math.max(ci, n.top - si - f) : Math.min(n.bottom + si, Math.max(ci, a - f - ci));
2692
+ let f = t.offsetHeight, p = a - n.bottom - li - ui, h = n.top - li - ui, g = f <= p, _ = f <= h, v = u.current;
2693
+ v ? v === "below" && f > p + di && _ && h > p + di ? v = "above" : v === "above" && !_ && f <= p + di && (v = "below") : v = !g && _ && h > p ? "above" : "below", u.current = v;
2694
+ let y = v === "above", b = y ? Math.max(ui, n.top - li - f) : Math.min(n.bottom + li, Math.max(ui, a - f - ui));
2682
2695
  m((e) => e && e.top === b && e.left === s && e.width === o && e.above === y ? e : {
2683
2696
  top: b,
2684
2697
  left: s,
@@ -2691,7 +2704,7 @@ function ui(e) {
2691
2704
  u.current = null, m(null), g(null);
2692
2705
  return;
2693
2706
  }
2694
- g(c.current?.closest(oi) ?? a.current ?? null);
2707
+ g(c.current?.closest(ci) ?? a.current ?? null);
2695
2708
  }, [t]), o(() => {
2696
2709
  !t || !h || _();
2697
2710
  }, [
@@ -2723,25 +2736,25 @@ function ui(e) {
2723
2736
  }
2724
2737
  //#endregion
2725
2738
  //#region ../../src/components/datePicker.tsx
2726
- var di = /^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2}))?$/, fi = (e) => String(e).padStart(2, "0"), pi = (e) => `${e.getFullYear()}-${fi(e.getMonth() + 1)}-${fi(e.getDate())}`;
2727
- function mi(e) {
2728
- let t = e?.match(di);
2739
+ var pi = /^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2}))?$/, mi = (e) => String(e).padStart(2, "0"), hi = (e) => `${e.getFullYear()}-${mi(e.getMonth() + 1)}-${mi(e.getDate())}`;
2740
+ function gi(e) {
2741
+ let t = e?.match(pi);
2729
2742
  if (!t) return null;
2730
2743
  let [, n, r, i, a, o] = t, s = new Date(Number(n), Number(r) - 1, Number(i), Number(a ?? 12), Number(o ?? 0));
2731
2744
  return isNaN(s.getTime()) ? null : s;
2732
2745
  }
2733
- function hi(e) {
2746
+ function _i(e) {
2734
2747
  try {
2735
2748
  let t = new Intl.Locale(e), n = t.weekInfo ?? t.getWeekInfo?.();
2736
2749
  if (n?.firstDay) return n.firstDay % 7;
2737
2750
  } catch {}
2738
2751
  return 1;
2739
2752
  }
2740
- function gi(e, t) {
2753
+ function vi(e, t) {
2741
2754
  let n = new Intl.DateTimeFormat(e, { weekday: "short" });
2742
2755
  return Array.from({ length: 7 }, (e, r) => n.format(new Date(2024, 0, 7 + (t + r) % 7)));
2743
2756
  }
2744
- var _i = 260, vi = 20, yi = /* @__PURE__ */ h("svg", {
2757
+ var yi = 260, bi = 20, xi = /* @__PURE__ */ h("svg", {
2745
2758
  width: "16",
2746
2759
  height: "16",
2747
2760
  viewBox: "0 0 24 24",
@@ -2761,7 +2774,7 @@ var _i = 260, vi = 20, yi = /* @__PURE__ */ h("svg", {
2761
2774
  "stroke-width": "2",
2762
2775
  "stroke-linecap": "round"
2763
2776
  })]
2764
- }), bi = (e) => /* @__PURE__ */ h("svg", {
2777
+ }), Si = (e) => /* @__PURE__ */ h("svg", {
2765
2778
  width: "14",
2766
2779
  height: "14",
2767
2780
  viewBox: "0 0 16 16",
@@ -2776,8 +2789,8 @@ var _i = 260, vi = 20, yi = /* @__PURE__ */ h("svg", {
2776
2789
  "stroke-linejoin": "round"
2777
2790
  })
2778
2791
  });
2779
- function xi(e) {
2780
- let { field: t, locale: r, t: i, prefillValue: a, error: o, onEdit: s } = e, c = m(() => mi(a), [a]), [l, u] = d(c), [f, p] = d(!1), [g, _] = d("days"), [v, y] = d(() => {
2792
+ function Ci(e) {
2793
+ let { field: t, locale: r, t: i, prefillValue: a, error: o, onEdit: s } = e, c = m(() => gi(a), [a]), [l, u] = d(c), [f, p] = d(!1), [g, _] = d("days"), [v, y] = d(() => {
2781
2794
  let e = c ?? /* @__PURE__ */ new Date();
2782
2795
  return {
2783
2796
  year: e.getFullYear(),
@@ -2785,15 +2798,15 @@ function xi(e) {
2785
2798
  };
2786
2799
  }), [b, x] = d(0), S = () => {
2787
2800
  _("days"), p(!0);
2788
- }, { wrapperRef: C, anchorRef: w, panelRef: T, panelPos: E, portalTarget: D } = ui({
2801
+ }, { wrapperRef: C, anchorRef: w, panelRef: T, panelPos: E, portalTarget: D } = fi({
2789
2802
  isOpen: f,
2790
2803
  onRequestClose: () => p(!1),
2791
2804
  remeasureKey: `${v.year}-${v.month}-${g}-${b}`,
2792
- minWidth: _i
2793
- }), O = m(() => hi(r), [r]), k = m(() => gi(r, O), [r, O]), A = m(() => new Intl.DateTimeFormat(r, {
2805
+ minWidth: yi
2806
+ }), O = m(() => _i(r), [r]), k = m(() => vi(r, O), [r, O]), A = m(() => new Intl.DateTimeFormat(r, {
2794
2807
  month: "long",
2795
2808
  year: "numeric"
2796
- }), [r]), ee = m(() => new Intl.DateTimeFormat(r, { dateStyle: "medium" }), [r]), j = l ? pi(l) : "", M = l ? ee.format(l) : "", te = new Date(v.year, v.month + 1, 0).getDate(), N = (new Date(v.year, v.month, 1).getDay() - O + 7) % 7, P = 42 - N - te, F = /* @__PURE__ */ new Date(), I = (e) => {
2809
+ }), [r]), ee = m(() => new Intl.DateTimeFormat(r, { dateStyle: "medium" }), [r]), j = l ? hi(l) : "", M = l ? ee.format(l) : "", te = new Date(v.year, v.month + 1, 0).getDate(), ne = (new Date(v.year, v.month, 1).getDay() - O + 7) % 7, N = 42 - ne - te, P = /* @__PURE__ */ new Date(), F = (e) => {
2797
2810
  y(({ year: t, month: n }) => {
2798
2811
  let r = new Date(t, n + e, 1);
2799
2812
  return {
@@ -2801,28 +2814,28 @@ function xi(e) {
2801
2814
  month: r.getMonth()
2802
2815
  };
2803
2816
  });
2804
- }, L = () => {
2817
+ }, I = () => {
2805
2818
  if (g === "years") {
2806
2819
  _("days");
2807
2820
  return;
2808
2821
  }
2809
- x(v.year - vi + 1), _("years");
2810
- }, R = (e) => {
2822
+ x(v.year - bi + 1), _("years");
2823
+ }, re = (e) => {
2811
2824
  y(({ month: t }) => ({
2812
2825
  year: e,
2813
2826
  month: t
2814
2827
  })), _("days");
2815
- }, ne = (e) => {
2828
+ }, ie = (e) => {
2816
2829
  u(new Date(v.year, v.month, e)), p(!1), s?.();
2817
- }, re = () => {
2830
+ }, ae = () => {
2818
2831
  t.required || (u(null), p(!1), s?.(), w.current?.focus());
2819
- }, z = (e) => {
2832
+ }, oe = (e) => {
2820
2833
  if (!t.required && l && (e.key === "Backspace" || e.key === "Delete")) {
2821
- e.preventDefault(), re();
2834
+ e.preventDefault(), ae();
2822
2835
  return;
2823
2836
  }
2824
2837
  e.key === "Enter" || e.key === " " || e.key === "ArrowDown" ? (e.preventDefault(), S()) : e.key === "Escape" && f && (e.stopPropagation(), p(!1));
2825
- }, ie = t.required ? /* @__PURE__ */ h("span", {
2838
+ }, L = t.required ? /* @__PURE__ */ h("span", {
2826
2839
  className: "leadbot-required-asterisk",
2827
2840
  children: "*"
2828
2841
  }) : null;
@@ -2831,7 +2844,7 @@ function xi(e) {
2831
2844
  children: [
2832
2845
  /* @__PURE__ */ h("label", {
2833
2846
  htmlFor: t.uuid,
2834
- children: [t.label, ie]
2847
+ children: [t.label, L]
2835
2848
  }),
2836
2849
  /* @__PURE__ */ h("div", {
2837
2850
  className: `leadbot-datepicker${!t.required && l ? " has-clear" : ""}`,
@@ -2840,7 +2853,7 @@ function xi(e) {
2840
2853
  /* @__PURE__ */ h("span", {
2841
2854
  className: "leadbot-datepicker-icon",
2842
2855
  "aria-hidden": "true",
2843
- children: yi
2856
+ children: xi
2844
2857
  }),
2845
2858
  /* @__PURE__ */ h("input", {
2846
2859
  ref: w,
@@ -2859,13 +2872,13 @@ function xi(e) {
2859
2872
  "aria-describedby": o ? `${t.uuid}-error` : void 0,
2860
2873
  onBeforeInput: (e) => e.preventDefault(),
2861
2874
  onClick: () => f ? p(!1) : S(),
2862
- onKeyDown: z
2875
+ onKeyDown: oe
2863
2876
  }),
2864
2877
  !t.required && l && /* @__PURE__ */ h("button", {
2865
2878
  type: "button",
2866
2879
  className: "leadbot-datepicker-clear",
2867
2880
  "aria-label": i("datepicker_clear", "Clear date"),
2868
- onClick: re,
2881
+ onClick: ae,
2869
2882
  children: "×"
2870
2883
  }),
2871
2884
  /* @__PURE__ */ h("input", {
@@ -2874,7 +2887,7 @@ function xi(e) {
2874
2887
  "data-field-uuid": t.uuid,
2875
2888
  value: j
2876
2889
  }),
2877
- f && D && Jr(/* @__PURE__ */ h("div", {
2890
+ f && D && Xr(/* @__PURE__ */ h("div", {
2878
2891
  ref: T,
2879
2892
  className: `leadbot-datepicker-panel${E?.above ? " is-above" : ""}`,
2880
2893
  role: "dialog",
@@ -2894,34 +2907,34 @@ function xi(e) {
2894
2907
  type: "button",
2895
2908
  className: "leadbot-datepicker-nav",
2896
2909
  "aria-label": g === "years" ? i("datepicker_prev_years", "Previous years") : i("datepicker_prev_month", "Previous month"),
2897
- onClick: () => g === "years" ? x((e) => e - vi) : I(-1),
2898
- children: bi(!1)
2910
+ onClick: () => g === "years" ? x((e) => e - bi) : F(-1),
2911
+ children: Si(!1)
2899
2912
  }),
2900
2913
  /* @__PURE__ */ h("button", {
2901
2914
  type: "button",
2902
2915
  className: "leadbot-datepicker-month",
2903
2916
  "aria-label": i("datepicker_select_year", "Select a year"),
2904
2917
  "aria-expanded": g === "years",
2905
- onClick: L,
2906
- children: g === "years" ? `${b} \u{2013} ${b + vi - 1}` : A.format(new Date(v.year, v.month))
2918
+ onClick: I,
2919
+ children: g === "years" ? `${b} \u{2013} ${b + bi - 1}` : A.format(new Date(v.year, v.month))
2907
2920
  }),
2908
2921
  /* @__PURE__ */ h("button", {
2909
2922
  type: "button",
2910
2923
  className: "leadbot-datepicker-nav",
2911
2924
  "aria-label": g === "years" ? i("datepicker_next_years", "Next years") : i("datepicker_next_month", "Next month"),
2912
- onClick: () => g === "years" ? x((e) => e + vi) : I(1),
2913
- children: bi(!0)
2925
+ onClick: () => g === "years" ? x((e) => e + bi) : F(1),
2926
+ children: Si(!0)
2914
2927
  })
2915
2928
  ]
2916
2929
  }), g === "years" ? /* @__PURE__ */ h("div", {
2917
2930
  className: "leadbot-datepicker-years",
2918
- children: Array.from({ length: vi }, (e, t) => {
2931
+ children: Array.from({ length: bi }, (e, t) => {
2919
2932
  let n = b + t;
2920
2933
  return /* @__PURE__ */ h("button", {
2921
2934
  type: "button",
2922
2935
  className: `leadbot-datepicker-year${n === v.year ? " is-selected" : ""}`,
2923
2936
  "aria-pressed": n === v.year,
2924
- onClick: () => R(n),
2937
+ onClick: () => re(n),
2925
2938
  children: n
2926
2939
  }, n);
2927
2940
  })
@@ -2931,22 +2944,22 @@ function xi(e) {
2931
2944
  }), /* @__PURE__ */ h("div", {
2932
2945
  className: "leadbot-datepicker-grid",
2933
2946
  children: [
2934
- Array.from({ length: N }, (e, t) => /* @__PURE__ */ h("span", {
2947
+ Array.from({ length: ne }, (e, t) => /* @__PURE__ */ h("span", {
2935
2948
  className: "leadbot-datepicker-blank",
2936
2949
  "aria-hidden": "true"
2937
2950
  }, `leading-blank-${t}`)),
2938
2951
  Array.from({ length: te }, (e, t) => {
2939
- let n = t + 1, r = !!l && l.getFullYear() === v.year && l.getMonth() === v.month && l.getDate() === n, i = F.getFullYear() === v.year && F.getMonth() === v.month && F.getDate() === n;
2952
+ let n = t + 1, r = !!l && l.getFullYear() === v.year && l.getMonth() === v.month && l.getDate() === n, i = P.getFullYear() === v.year && P.getMonth() === v.month && P.getDate() === n;
2940
2953
  return /* @__PURE__ */ h("button", {
2941
2954
  type: "button",
2942
2955
  className: `leadbot-datepicker-day${r ? " is-selected" : ""}${i ? " is-today" : ""}`,
2943
2956
  "aria-pressed": r,
2944
2957
  "aria-current": i ? "date" : void 0,
2945
- onClick: () => ne(n),
2958
+ onClick: () => ie(n),
2946
2959
  children: n
2947
2960
  }, n);
2948
2961
  }),
2949
- Array.from({ length: P }, (e, t) => /* @__PURE__ */ h("span", {
2962
+ Array.from({ length: N }, (e, t) => /* @__PURE__ */ h("span", {
2950
2963
  className: "leadbot-datepicker-blank",
2951
2964
  "aria-hidden": "true"
2952
2965
  }, `trailing-blank-${t}`))
@@ -2966,7 +2979,7 @@ function xi(e) {
2966
2979
  }
2967
2980
  //#endregion
2968
2981
  //#region ../../src/components/timePicker.tsx
2969
- var Si = /^(\d{2}):(\d{2})/, Ci = 5, wi = 220, Ti = (e) => String(e).padStart(2, "0"), Ei = Array.from({ length: 24 }, (e, t) => Ti(t)), Di = Array.from({ length: 60 / Ci }, (e, t) => Ti(t * Ci)), Oi = /* @__PURE__ */ h("svg", {
2982
+ var wi = /^(\d{2}):(\d{2})/, Ti = 5, Ei = 220, Di = (e) => String(e).padStart(2, "0"), Oi = Array.from({ length: 24 }, (e, t) => Di(t)), ki = Array.from({ length: 60 / Ti }, (e, t) => Di(t * Ti)), Ai = /* @__PURE__ */ h("svg", {
2970
2983
  width: "16",
2971
2984
  height: "16",
2972
2985
  viewBox: "0 0 24 24",
@@ -2986,8 +2999,8 @@ var Si = /^(\d{2}):(\d{2})/, Ci = 5, wi = 220, Ti = (e) => String(e).padStart(2,
2986
2999
  "stroke-linejoin": "round"
2987
3000
  })]
2988
3001
  });
2989
- function ki(e) {
2990
- let t = e?.match(Si);
3002
+ function ji(e) {
3003
+ let t = e?.match(wi);
2991
3004
  if (!t) return {
2992
3005
  hour: "",
2993
3006
  minute: ""
@@ -2997,15 +3010,15 @@ function ki(e) {
2997
3010
  hour: "",
2998
3011
  minute: ""
2999
3012
  } : {
3000
- hour: Ti(n),
3001
- minute: Ti(r - r % Ci)
3013
+ hour: Di(n),
3014
+ minute: Di(r - r % Ti)
3002
3015
  };
3003
3016
  }
3004
- function Ai(e) {
3005
- let { field: t, t: n, prefillValue: r, error: i, onEdit: a } = e, s = ki(r), [c, l] = d(s.hour), [u, p] = d(s.minute), [m, g] = d(!1), _ = f(null), v = f(null), { wrapperRef: y, anchorRef: b, panelRef: x, panelPos: S, portalTarget: C } = ui({
3017
+ function Mi(e) {
3018
+ let { field: t, t: n, prefillValue: r, error: i, onEdit: a } = e, s = ji(r), [c, l] = d(s.hour), [u, p] = d(s.minute), [m, g] = d(!1), _ = f(null), v = f(null), { wrapperRef: y, anchorRef: b, panelRef: x, panelPos: S, portalTarget: C } = fi({
3006
3019
  isOpen: m,
3007
3020
  onRequestClose: () => g(!1),
3008
- minWidth: wi
3021
+ minWidth: Ei
3009
3022
  });
3010
3023
  o(() => {
3011
3024
  if (!m) return;
@@ -3045,7 +3058,7 @@ function Ai(e) {
3045
3058
  /* @__PURE__ */ h("span", {
3046
3059
  className: "leadbot-timepicker-icon",
3047
3060
  "aria-hidden": "true",
3048
- children: Oi
3061
+ children: Ai
3049
3062
  }),
3050
3063
  /* @__PURE__ */ h("input", {
3051
3064
  ref: b,
@@ -3079,7 +3092,7 @@ function Ai(e) {
3079
3092
  "data-field-uuid": t.uuid,
3080
3093
  value: w
3081
3094
  }),
3082
- m && C && Jr(/* @__PURE__ */ h("div", {
3095
+ m && C && Xr(/* @__PURE__ */ h("div", {
3083
3096
  ref: x,
3084
3097
  className: `leadbot-timepicker-panel${S?.above ? " is-above" : ""}`,
3085
3098
  role: "dialog",
@@ -3100,7 +3113,7 @@ function Ai(e) {
3100
3113
  role: "listbox",
3101
3114
  "aria-label": n("timepicker_hours_label", "Hours"),
3102
3115
  ref: _,
3103
- children: Ei.map((e) => /* @__PURE__ */ h("button", {
3116
+ children: Oi.map((e) => /* @__PURE__ */ h("button", {
3104
3117
  type: "button",
3105
3118
  className: `leadbot-timepicker-option${c === e ? " is-selected" : ""}`,
3106
3119
  role: "option",
@@ -3119,7 +3132,7 @@ function Ai(e) {
3119
3132
  role: "listbox",
3120
3133
  "aria-label": n("timepicker_minutes_label", "Minutes"),
3121
3134
  ref: v,
3122
- children: Di.map((e) => /* @__PURE__ */ h("button", {
3135
+ children: ki.map((e) => /* @__PURE__ */ h("button", {
3123
3136
  type: "button",
3124
3137
  className: `leadbot-timepicker-option${u === e ? " is-selected" : ""}`,
3125
3138
  role: "option",
@@ -3144,19 +3157,19 @@ function Ai(e) {
3144
3157
  }
3145
3158
  //#endregion
3146
3159
  //#region ../../src/steps/baseFormStep.tsx
3147
- var ji = {
3160
+ var Ni = {
3148
3161
  "submit-form": "form_submit",
3149
3162
  "submit-callback": "callback_request",
3150
3163
  "submit-email": "email_request",
3151
3164
  "submit-whatsapp": "whatsapp"
3152
3165
  };
3153
- function Mi(e, t) {
3166
+ function Pi(e, t) {
3154
3167
  return t ? {
3155
3168
  "aria-invalid": "true",
3156
3169
  "aria-describedby": `${e.uuid}-error`
3157
3170
  } : {};
3158
3171
  }
3159
- function Ni(e, t) {
3172
+ function Fi(e, t) {
3160
3173
  return t ? /* @__PURE__ */ h("p", {
3161
3174
  className: "leadbot-field-error",
3162
3175
  id: `${e.uuid}-error`,
@@ -3164,10 +3177,10 @@ function Ni(e, t) {
3164
3177
  children: t
3165
3178
  }) : null;
3166
3179
  }
3167
- function Pi(e) {
3180
+ function Ii(e) {
3168
3181
  e.key === "Enter" && e.stopPropagation();
3169
3182
  }
3170
- function Fi(e, t, n) {
3183
+ function Li(e, t, n) {
3171
3184
  let r = e.required ? /* @__PURE__ */ h("span", {
3172
3185
  className: "leadbot-required-asterisk",
3173
3186
  children: "*"
@@ -3193,13 +3206,13 @@ function Fi(e, t, n) {
3193
3206
  max: c ? s : void 0,
3194
3207
  inputMode: t === "number" ? "decimal" : void 0,
3195
3208
  onInput: n.onEdit,
3196
- ...Mi(e, n.error)
3209
+ ...Pi(e, n.error)
3197
3210
  }),
3198
- Ni(e, n.error)
3211
+ Fi(e, n.error)
3199
3212
  ]
3200
3213
  }, e.uuid);
3201
3214
  }
3202
- function Ii(e, t) {
3215
+ function Ri(e, t) {
3203
3216
  let n = e.required ? /* @__PURE__ */ h("span", {
3204
3217
  className: "leadbot-required-asterisk",
3205
3218
  children: "*"
@@ -3219,15 +3232,15 @@ function Ii(e, t) {
3219
3232
  required: e.required,
3220
3233
  minLength: e.validation?.min_length,
3221
3234
  maxLength: e.validation?.max_length,
3222
- onKeyDown: Pi,
3235
+ onKeyDown: Ii,
3223
3236
  onInput: t.onEdit,
3224
- ...Mi(e, t.error)
3237
+ ...Pi(e, t.error)
3225
3238
  }),
3226
- Ni(e, t.error)
3239
+ Fi(e, t.error)
3227
3240
  ]
3228
3241
  }, e.uuid);
3229
3242
  }
3230
- function Li(e, t) {
3243
+ function zi(e, t) {
3231
3244
  let n = e.required ? /* @__PURE__ */ h("span", {
3232
3245
  className: "leadbot-required-asterisk",
3233
3246
  children: "*"
@@ -3242,14 +3255,14 @@ function Li(e, t) {
3242
3255
  "data-field-uuid": e.uuid,
3243
3256
  required: e.required,
3244
3257
  onChange: t.onEdit,
3245
- ...Mi(e, t.error)
3258
+ ...Pi(e, t.error)
3246
3259
  }),
3247
3260
  e.label,
3248
3261
  n
3249
- ] }), Ni(e, t.error)]
3262
+ ] }), Fi(e, t.error)]
3250
3263
  }, e.uuid);
3251
3264
  }
3252
- function Ri(e, t) {
3265
+ function Bi(e, t) {
3253
3266
  let n = e.required ? /* @__PURE__ */ h("span", {
3254
3267
  className: "leadbot-required-asterisk",
3255
3268
  children: "*"
@@ -3270,7 +3283,7 @@ function Ri(e, t) {
3270
3283
  }),
3271
3284
  /* @__PURE__ */ h("div", {
3272
3285
  className: "leadbot-field-options",
3273
- children: k(e).map((n, r) => /* @__PURE__ */ h("label", {
3286
+ children: A(e).map((n, r) => /* @__PURE__ */ h("label", {
3274
3287
  className: "leadbot-field-option",
3275
3288
  children: [/* @__PURE__ */ h("input", {
3276
3289
  type: "checkbox",
@@ -3281,15 +3294,15 @@ function Ri(e, t) {
3281
3294
  n && !i.includes(n) && (i.push(n), e.required && n.setCustomValidity(t.t("form_checklist_required", "Please select at least one option")));
3282
3295
  },
3283
3296
  onChange: a,
3284
- ...Mi(e, t.error)
3297
+ ...Pi(e, t.error)
3285
3298
  }), /* @__PURE__ */ h("span", { children: n.label })]
3286
3299
  }, `${e.uuid}-${n.value}-${r}`))
3287
3300
  }),
3288
- Ni(e, t.error)
3301
+ Fi(e, t.error)
3289
3302
  ]
3290
3303
  }, e.uuid);
3291
3304
  }
3292
- function zi(e, t) {
3305
+ function Vi(e, t) {
3293
3306
  let n = e.required ? /* @__PURE__ */ h("span", {
3294
3307
  className: "leadbot-required-asterisk",
3295
3308
  children: "*"
@@ -3306,7 +3319,7 @@ function zi(e, t) {
3306
3319
  className: "leadbot-field-options",
3307
3320
  role: "radiogroup",
3308
3321
  "aria-labelledby": r,
3309
- children: k(e).map((n, r) => /* @__PURE__ */ h("label", {
3322
+ children: A(e).map((n, r) => /* @__PURE__ */ h("label", {
3310
3323
  className: "leadbot-field-option",
3311
3324
  children: [/* @__PURE__ */ h("input", {
3312
3325
  type: "radio",
@@ -3315,15 +3328,15 @@ function zi(e, t) {
3315
3328
  value: n.value,
3316
3329
  required: e.required,
3317
3330
  onChange: t.onEdit,
3318
- ...Mi(e, t.error)
3331
+ ...Pi(e, t.error)
3319
3332
  }), /* @__PURE__ */ h("span", { children: n.label })]
3320
3333
  }, `${e.uuid}-${n.value}-${r}`))
3321
3334
  }),
3322
- Ni(e, t.error)
3335
+ Fi(e, t.error)
3323
3336
  ]
3324
3337
  }, e.uuid);
3325
3338
  }
3326
- function Bi(e, t) {
3339
+ function Hi(e, t) {
3327
3340
  let n = e.required ? /* @__PURE__ */ h("span", {
3328
3341
  className: "leadbot-required-asterisk",
3329
3342
  children: "*"
@@ -3341,32 +3354,32 @@ function Bi(e, t) {
3341
3354
  "data-field-uuid": e.uuid,
3342
3355
  required: e.required,
3343
3356
  onChange: t.onEdit,
3344
- ...Mi(e, t.error),
3357
+ ...Pi(e, t.error),
3345
3358
  children: [/* @__PURE__ */ h("option", {
3346
3359
  value: "",
3347
3360
  children: r
3348
- }), k(e).map((e) => /* @__PURE__ */ h("option", {
3361
+ }), A(e).map((e) => /* @__PURE__ */ h("option", {
3349
3362
  value: e.value,
3350
3363
  children: e.label
3351
3364
  }, e.value))]
3352
3365
  }),
3353
- Ni(e, t.error)
3366
+ Fi(e, t.error)
3354
3367
  ]
3355
3368
  }, e.uuid);
3356
3369
  }
3357
- function Vi(e, t) {
3358
- let n = R(t);
3370
+ function Ui(e, t) {
3371
+ let n = ie(t);
3359
3372
  if (n === "checklist") return Array.from(e.querySelectorAll(`[data-field-uuid="${t.uuid}"]`)).filter((e) => e.checked).map((e) => e.value);
3360
3373
  if (n === "radiolist") return e.querySelector(`[data-field-uuid="${t.uuid}"]:checked`)?.value || "";
3361
3374
  let r = e.querySelector(`[data-field-uuid="${t.uuid}"]`);
3362
3375
  return r ? n === "checkbox" || r.type === "checkbox" ? r.checked ? "true" : "false" : r.value : "";
3363
3376
  }
3364
- var Hi = {
3365
- text: (e, t) => Fi(e, "text", t),
3366
- email: (e, t) => Fi(e, "email", t),
3367
- tel: (e, t) => Fi(e, "tel", t),
3368
- number: (e, t) => Fi(e, "number", t),
3369
- date: (e, t) => /* @__PURE__ */ h(xi, {
3377
+ var Wi = {
3378
+ text: (e, t) => Li(e, "text", t),
3379
+ email: (e, t) => Li(e, "email", t),
3380
+ tel: (e, t) => Li(e, "tel", t),
3381
+ number: (e, t) => Li(e, "number", t),
3382
+ date: (e, t) => /* @__PURE__ */ h(Ci, {
3370
3383
  field: e,
3371
3384
  locale: t.locale || "en",
3372
3385
  t: t.t,
@@ -3374,28 +3387,28 @@ var Hi = {
3374
3387
  error: t.error,
3375
3388
  onEdit: t.onEdit
3376
3389
  }, e.uuid),
3377
- time: (e, t) => /* @__PURE__ */ h(Ai, {
3390
+ time: (e, t) => /* @__PURE__ */ h(Mi, {
3378
3391
  field: e,
3379
3392
  t: t.t,
3380
3393
  prefillValue: t.prefillValue,
3381
3394
  error: t.error,
3382
3395
  onEdit: t.onEdit
3383
3396
  }, e.uuid),
3384
- textarea: (e, t) => Ii(e, t),
3385
- checkbox: (e, t) => Li(e, t),
3386
- checklist: (e, t) => Ri(e, t),
3387
- radiolist: (e, t) => zi(e, t),
3388
- select: (e, t) => Bi(e, t)
3397
+ textarea: (e, t) => Ri(e, t),
3398
+ checkbox: (e, t) => zi(e, t),
3399
+ checklist: (e, t) => Bi(e, t),
3400
+ radiolist: (e, t) => Vi(e, t),
3401
+ select: (e, t) => Hi(e, t)
3389
3402
  };
3390
- function Ui(e, t) {
3391
- let n = R(e), r = n ? Hi[n] : null;
3403
+ function Gi(e, t) {
3404
+ let n = ie(e), r = n ? Wi[n] : null;
3392
3405
  return !r || !n ? (console.warn(`Unsupported field type: ${e.type}`), null) : r(e, t);
3393
3406
  }
3394
- function Wi(e) {
3395
- let { step: t, config: n, isCurrent: r, onOptionSelect: i, formConfig: a } = e, o = Fn(n), s = p(zn), [c, l] = d(!1), [u, m] = d(!1), [g, _] = d(null), [v, y] = d({}), b = f(null), x = ne(n.leadbot?.language), C = t.attributes?.form_schema, w = C?.fields || {}, { t: T } = Bn(x), E = Object.keys(w).map((e) => ({
3407
+ function Ki(e) {
3408
+ let { step: t, config: n, isCurrent: r, onOptionSelect: i, formConfig: a } = e, o = Ln(n), s = p(Vn), [c, l] = d(!1), [u, m] = d(!1), [g, _] = d(null), [v, y] = d({}), b = f(null), x = ae(n.leadbot?.language), S = t.attributes?.form_schema, w = S?.fields || {}, { t: T } = Hn(x), E = Object.keys(w).map((e) => ({
3396
3409
  uuid: e,
3397
3410
  ...w[e]
3398
- })).sort((e, t) => (e.order || 0) - (t.order || 0)), D = C?.title || "", O = C?.show_title !== !1 && !!D, k = t.attributes?.button_text || a.defaultButtonText || T("form_submit_button", "Submit"), A = t.attributes?.success_message || T(`submit-${a.action}`, "Thank you for your submission!"), ee = (e) => {
3411
+ })).sort((e, t) => (e.order || 0) - (t.order || 0)), D = S?.title || "", O = S?.show_title !== !1 && !!D, k = t.attributes?.button_text || a.defaultButtonText || T("form_submit_button", "Submit"), A = t.attributes?.success_message || T(`submit-${a.action}`, "Thank you for your submission!"), ee = (e) => {
3399
3412
  y((t) => {
3400
3413
  if (!(e in t)) return t;
3401
3414
  let n = { ...t };
@@ -3410,7 +3423,7 @@ function Wi(e) {
3410
3423
  children: /* @__PURE__ */ h("div", {
3411
3424
  className: "leadbot-success-message",
3412
3425
  role: "status",
3413
- dangerouslySetInnerHTML: { __html: Sn(A) }
3426
+ dangerouslySetInnerHTML: { __html: wn(A) }
3414
3427
  })
3415
3428
  }) : /* @__PURE__ */ h("div", {
3416
3429
  className: a.containerClass,
@@ -3423,13 +3436,13 @@ function Wi(e) {
3423
3436
  if (!d) return;
3424
3437
  let f = {};
3425
3438
  for (let e of E) {
3426
- let t = Vi(d, e);
3427
- f[e.uuid] = R(e) === "tel" && typeof t == "string" ? te(t) : t;
3439
+ let t = Ui(d, e);
3440
+ f[e.uuid] = ie(e) === "tel" && typeof t == "string" ? ne(t) : t;
3428
3441
  }
3429
3442
  let p = {};
3430
3443
  for (let e of E) {
3431
3444
  let t = f[e.uuid];
3432
- R(e) === "tel" && typeof t == "string" && t && !M(t) && (p[e.uuid] = T("form_invalid_phone", "Enter a valid phone number (e.g. 0614526333)"));
3445
+ ie(e) === "tel" && typeof t == "string" && t && !te(t) && (p[e.uuid] = T("form_invalid_phone", "Enter a valid phone number (e.g. 0614526333)"));
3433
3446
  }
3434
3447
  let h = E.find((e) => p[e.uuid]);
3435
3448
  if (h) {
@@ -3438,9 +3451,9 @@ function Wi(e) {
3438
3451
  }
3439
3452
  _(null), y({}), l(!0);
3440
3453
  try {
3441
- let n = ji[a.action] || "form_submit", r = await o.submitUserData(n, t.uuid, f, s ? { chat_session_id: s } : void 0);
3454
+ let n = Ni[a.action] || "form_submit", r = await o.submitUserData(n, t.uuid, f, s ? { chat_session_id: s } : void 0);
3442
3455
  if (r?.success === !1) throw Error(r.error || "Submission failed");
3443
- e.analyticsTracker?.trackFormSubmit(t, n, S(E, R, (e) => f[e.uuid])), m(!0), e.onSubmitted?.(f);
3456
+ e.analyticsTracker?.trackFormSubmit(t, n, C(E, ie, (e) => f[e.uuid])), m(!0), e.onSubmitted?.(f);
3444
3457
  let c = t.options?.[0];
3445
3458
  c?.next_step_uuid && i(c.next_step_uuid);
3446
3459
  } catch (e) {
@@ -3467,7 +3480,7 @@ function Wi(e) {
3467
3480
  children: [
3468
3481
  O && /* @__PURE__ */ h("div", {
3469
3482
  className: "leadbot-form-title",
3470
- dangerouslySetInnerHTML: { __html: Sn(D) }
3483
+ dangerouslySetInnerHTML: { __html: wn(D) }
3471
3484
  }),
3472
3485
  g && /* @__PURE__ */ h("div", {
3473
3486
  className: "leadbot-form-error",
@@ -3477,7 +3490,7 @@ function Wi(e) {
3477
3490
  /* @__PURE__ */ h("fieldset", {
3478
3491
  className: "leadbot-form-fields",
3479
3492
  disabled: c,
3480
- children: E.map((t) => Ui(t, {
3493
+ children: E.map((t) => Gi(t, {
3481
3494
  t: T,
3482
3495
  prefillValue: e.prefillValues?.[t.uuid],
3483
3496
  locale: x,
@@ -3500,8 +3513,8 @@ function Wi(e) {
3500
3513
  }
3501
3514
  //#endregion
3502
3515
  //#region ../../src/steps/callbackStep.tsx
3503
- function Gi(e) {
3504
- return /* @__PURE__ */ h(Wi, {
3516
+ function qi(e) {
3517
+ return /* @__PURE__ */ h(Ki, {
3505
3518
  ...e,
3506
3519
  formConfig: {
3507
3520
  action: "submit-callback",
@@ -3512,8 +3525,8 @@ function Gi(e) {
3512
3525
  }
3513
3526
  //#endregion
3514
3527
  //#region ../../src/steps/emailRequestStep.tsx
3515
- function Ki(e) {
3516
- return /* @__PURE__ */ h(Wi, {
3528
+ function Ji(e) {
3529
+ return /* @__PURE__ */ h(Ki, {
3517
3530
  ...e,
3518
3531
  formConfig: {
3519
3532
  action: "submit-email",
@@ -3524,8 +3537,8 @@ function Ki(e) {
3524
3537
  }
3525
3538
  //#endregion
3526
3539
  //#region ../../src/steps/formStep.tsx
3527
- function qi(e) {
3528
- return /* @__PURE__ */ h(Wi, {
3540
+ function Yi(e) {
3541
+ return /* @__PURE__ */ h(Ki, {
3529
3542
  ...e,
3530
3543
  formConfig: {
3531
3544
  action: "submit-form",
@@ -3536,26 +3549,26 @@ function qi(e) {
3536
3549
  }
3537
3550
  //#endregion
3538
3551
  //#region ../../src/steps/fallbackStep.tsx
3539
- function Ji() {
3552
+ function Xi() {
3540
3553
  return null;
3541
3554
  }
3542
3555
  //#endregion
3543
3556
  //#region ../../src/steps/chatbot/chatWhatsAppCard.tsx
3544
- var Yi = "whatsapp";
3545
- function Xi(e) {
3546
- let { step: t, config: n, isPending: r, prefillMessage: i, onCompleted: a, onDismissed: o } = e, s = Fn(n), c = p(zn), [l, u] = d(null), [f, m] = d(null), [g, _] = d(null), v = ne(n.leadbot?.language), { t: y } = Bn(v), b = t.attributes?.sender_name || y("whatsapp_default_contact", "Support"), x = t.attributes?.sender_image?.url || null, S = t.attributes?.text || "", C = P(S, v, {
3557
+ var Zi = "whatsapp";
3558
+ function Qi(e) {
3559
+ let { step: t, config: n, isPending: r, prefillMessage: i, onCompleted: a, onDismissed: o } = e, s = Ln(n), c = p(Vn), [l, u] = d(null), [f, m] = d(null), [g, _] = d(null), v = ae(n.leadbot?.language), { t: y } = Hn(v), b = t.attributes?.sender_name || y("whatsapp_default_contact", "Support"), x = t.attributes?.sender_image?.url || null, S = t.attributes?.text || "", C = P(S, v, {
3547
3560
  name: n.leadbot.default_contact_information?.label,
3548
3561
  website_name: n.leadbot.domain.display_name,
3549
3562
  email: n.leadbot.default_contact_information?.email,
3550
3563
  phonenumber: n.leadbot.default_contact_information?.phone
3551
- }), w = t.attributes?.sender_number || t.attributes?.phone_number || "", D = kr(t.attributes?.form_schema?.fields || {}), O = t.attributes?.show_qr_code === !0, { isDesktop: k } = ue(), A = O && k, ee = y("whatsapp_error_submission", "We could not save your message. You can still continue in WhatsApp."), j = y("whatsapp_error_phone_missing", "WhatsApp is not configured for this step."), M = y("whatsapp_error_redirect", "WhatsApp could not be opened. Please check your pop-up settings."), te = async (e) => {
3552
- if (!(!D || !e)) try {
3553
- let n = await s.submitUserData(Yi, t.uuid, { [D.uuid]: e }, c ? { chat_session_id: c } : void 0);
3564
+ }), w = t.attributes?.sender_number || t.attributes?.phone_number || "", T = jr(t.attributes?.form_schema?.fields || {}), O = t.attributes?.show_qr_code === !0, { isDesktop: k } = pe(), A = O && k, ee = y("whatsapp_error_submission", "We could not save your message. You can still continue in WhatsApp."), j = y("whatsapp_error_phone_missing", "WhatsApp is not configured for this step."), M = y("whatsapp_error_redirect", "WhatsApp could not be opened. Please check your pop-up settings."), te = async (e) => {
3565
+ if (!(!T || !e)) try {
3566
+ let n = await s.submitUserData(Zi, t.uuid, { [T.uuid]: e }, c ? { chat_session_id: c } : void 0);
3554
3567
  if (n?.success === !1) throw Error(n.error || "Submission failed");
3555
3568
  } catch (e) {
3556
3569
  console.error("WhatsApp data submission failed:", e), u(ee);
3557
3570
  }
3558
- }, N = async () => {
3571
+ }, ne = async () => {
3559
3572
  if (!r) return;
3560
3573
  u(null);
3561
3574
  let n = (i || "").trim();
@@ -3563,13 +3576,13 @@ function Xi(e) {
3563
3576
  u(j);
3564
3577
  return;
3565
3578
  }
3566
- let o = Ar(n, z(window.location.href)), s = T(w, o);
3579
+ let o = Mr(n, L(window.location.href)), s = E(w, o);
3567
3580
  if (!s) {
3568
3581
  u(j);
3569
3582
  return;
3570
3583
  }
3571
3584
  if (A) {
3572
- let e = E(w, o), t = jr(s);
3585
+ let e = D(w, o), t = Nr(s);
3573
3586
  if (!t || !e) {
3574
3587
  u(M);
3575
3588
  return;
@@ -3579,14 +3592,14 @@ function Xi(e) {
3579
3592
  webUrl: e
3580
3593
  });
3581
3594
  } else window.open(s, "_blank", "noopener,noreferrer"), _(s);
3582
- e.analyticsTracker?.trackWhatsAppRedirect(t), await te(n), a(D && n ? { [D.uuid]: n } : {});
3583
- }, F = !f && !g, I = y("chatbot_whatsapp_open", "Open WhatsApp"), L = y("chatbot_whatsapp_dismiss", "No thanks, continue chatting here");
3595
+ e.analyticsTracker?.trackWhatsAppRedirect(t), await te(n), a(T && n ? { [T.uuid]: n } : {});
3596
+ }, N = !f && !g, F = y("chatbot_whatsapp_open", "Open WhatsApp"), I = y("chatbot_whatsapp_dismiss", "No thanks, continue chatting here");
3584
3597
  return /* @__PURE__ */ h("div", {
3585
3598
  className: "leadbot-chatbot-wa",
3586
3599
  children: [
3587
- F && /* @__PURE__ */ h("div", {
3600
+ N && /* @__PURE__ */ h("div", {
3588
3601
  className: "leadbot-chatbot-wa-contact",
3589
- children: [/* @__PURE__ */ h(wn, {
3602
+ children: [/* @__PURE__ */ h(En, {
3590
3603
  imageUrl: x,
3591
3604
  alt: b,
3592
3605
  variant: "whatsapp"
@@ -3597,23 +3610,23 @@ function Xi(e) {
3597
3610
  children: b
3598
3611
  }), /* @__PURE__ */ h("span", {
3599
3612
  className: "leadbot-chatbot-wa-via",
3600
- children: [/* @__PURE__ */ h("span", { dangerouslySetInnerHTML: { __html: G.whatsapp } }), "WhatsApp"]
3613
+ children: [/* @__PURE__ */ h("span", { dangerouslySetInnerHTML: { __html: H.whatsapp } }), "WhatsApp"]
3601
3614
  })]
3602
3615
  })]
3603
3616
  }),
3604
- F && C && /* @__PURE__ */ h("div", {
3617
+ N && C && /* @__PURE__ */ h("div", {
3605
3618
  className: "leadbot-chatbot-wa-text",
3606
- dangerouslySetInnerHTML: { __html: Sn(C) }
3619
+ dangerouslySetInnerHTML: { __html: wn(C) }
3607
3620
  }),
3608
3621
  l && /* @__PURE__ */ h("div", {
3609
3622
  className: "leadbot-form-error",
3610
3623
  children: l
3611
3624
  }),
3612
- F && r && /* @__PURE__ */ h("button", {
3625
+ N && r && /* @__PURE__ */ h("button", {
3613
3626
  type: "button",
3614
3627
  className: "leadbot-chatbot-wa-open-btn",
3615
- onClick: N,
3616
- children: [/* @__PURE__ */ h("span", { dangerouslySetInnerHTML: { __html: G.whatsapp } }), I]
3628
+ onClick: ne,
3629
+ children: [/* @__PURE__ */ h("span", { dangerouslySetInnerHTML: { __html: H.whatsapp } }), F]
3617
3630
  }),
3618
3631
  f && /* @__PURE__ */ h("div", {
3619
3632
  className: "leadbot-chatbot-wa-qr",
@@ -3635,7 +3648,7 @@ function Xi(e) {
3635
3648
  target: "_blank",
3636
3649
  rel: "noopener noreferrer",
3637
3650
  className: "leadbot-chatbot-wa-link",
3638
- children: [/* @__PURE__ */ h("span", { dangerouslySetInnerHTML: { __html: G.whatsapp } }), y("whatsapp_qr_open_web", "Open WhatsApp Web")]
3651
+ children: [/* @__PURE__ */ h("span", { dangerouslySetInnerHTML: { __html: H.whatsapp } }), y("whatsapp_qr_open_web", "Open WhatsApp Web")]
3639
3652
  })
3640
3653
  ]
3641
3654
  }),
@@ -3649,66 +3662,66 @@ function Xi(e) {
3649
3662
  children: y("chatbot_whatsapp_reopen", "Open again")
3650
3663
  })]
3651
3664
  }),
3652
- F && r && /* @__PURE__ */ h("button", {
3665
+ N && r && /* @__PURE__ */ h("button", {
3653
3666
  type: "button",
3654
3667
  className: "leadbot-chatbot-wa-dismiss",
3655
3668
  onClick: o,
3656
- children: L
3669
+ children: I
3657
3670
  })
3658
3671
  ]
3659
3672
  });
3660
3673
  }
3661
- var Zi = 8, Qi = /* @__PURE__ */ new Set([
3674
+ var $i = 8, ea = /* @__PURE__ */ new Set([
3662
3675
  "text",
3663
3676
  "email",
3664
3677
  "tel",
3665
3678
  "phone",
3666
3679
  "name"
3667
- ]), $i = [
3680
+ ]), ta = [
3668
3681
  "email",
3669
3682
  "phone",
3670
3683
  "name"
3671
- ], ea = /^[\d\s\-+()]{7,}$/;
3672
- function ta(e) {
3684
+ ], na = /^[\d\s\-+()]{7,}$/;
3685
+ function ra(e) {
3673
3686
  if (typeof e != "object" || !e || Array.isArray(e)) return {};
3674
3687
  let t = {}, n = 0;
3675
3688
  for (let [r, i] of Object.entries(e)) {
3676
- if (n >= Zi) break;
3689
+ if (n >= $i) break;
3677
3690
  if (typeof i != "string") continue;
3678
3691
  let e = i.trim();
3679
3692
  !e || e.length > 254 || (t[r] = e, n++);
3680
3693
  }
3681
3694
  return t;
3682
3695
  }
3683
- function na(e, t) {
3684
- return e === "email" ? t.includes("@") && !/\s/.test(t) : e !== "phone" || ea.test(t);
3696
+ function ia(e, t) {
3697
+ return e === "email" ? t.includes("@") && !/\s/.test(t) : e !== "phone" || na.test(t);
3685
3698
  }
3686
- function ra(e, t) {
3699
+ function aa(e, t) {
3687
3700
  let n = String(t.type || "").toLowerCase();
3688
- if (!Qi.has(n)) return !1;
3701
+ if (!ea.has(n)) return !1;
3689
3702
  let r = String(t.name || "").toLowerCase();
3690
3703
  return e === "email" ? n === "email" || r.includes("email") : e === "phone" ? n === "tel" || n === "phone" || r.includes("phone") || r.includes("tel") : n === "name" || r.includes("name");
3691
3704
  }
3692
- function ia(e, t) {
3705
+ function oa(e, t) {
3693
3706
  let n = {}, r = /* @__PURE__ */ new Set();
3694
- for (let i of $i) {
3707
+ for (let i of ta) {
3695
3708
  let a = e[i];
3696
- if (!a || !na(i, a)) continue;
3697
- let o = Object.keys(t).find((e) => !r.has(e) && ra(i, t[e]));
3709
+ if (!a || !ia(i, a)) continue;
3710
+ let o = Object.keys(t).find((e) => !r.has(e) && aa(i, t[e]));
3698
3711
  o && (r.add(o), n[o] = a);
3699
3712
  }
3700
3713
  return n;
3701
3714
  }
3702
3715
  //#endregion
3703
3716
  //#region ../../src/steps/chatbot/chatToolCard.tsx
3704
- function aa(e) {
3717
+ function sa(e) {
3705
3718
  let t = e.attributes?.form_schema?.title;
3706
3719
  return e.label || t || e.step_type;
3707
3720
  }
3708
- function oa(e) {
3721
+ function ca(e) {
3709
3722
  let { message: t, config: n, onCompleted: r, analyticsTracker: i } = e, a = n.steps?.find((e) => e.uuid === t.step_uuid);
3710
3723
  if (!a) return console.warn(`ChatToolCard: no step found for tool_call step_uuid "${t.step_uuid}"`), null;
3711
- let { component: o } = to(a.step_type), s = a.step_type === "whatsapp", c = t.status === "pending", l = t.status === "completed", u = t.status === "dismissed";
3724
+ let { component: o } = io(a.step_type), s = a.step_type === "whatsapp", c = t.status === "pending", l = t.status === "completed", u = t.status === "dismissed";
3712
3725
  return /* @__PURE__ */ h("div", {
3713
3726
  className: `leadbot-chatbot-message leadbot-chatbot-message-bot leadbot-chatbot-tool-card${l ? " leadbot-chatbot-tool-card--completed" : u ? " leadbot-chatbot-tool-card--dismissed" : ""}${s ? " leadbot-chatbot-tool-card--whatsapp" : ""}`,
3714
3727
  children: [/* @__PURE__ */ h("div", {
@@ -3717,21 +3730,21 @@ function oa(e) {
3717
3730
  /* @__PURE__ */ h("span", {
3718
3731
  className: "leadbot-chatbot-tool-card-icon",
3719
3732
  "aria-hidden": "true",
3720
- children: /* @__PURE__ */ h(ca, { stepType: a.step_type })
3733
+ children: /* @__PURE__ */ h(ua, { stepType: a.step_type })
3721
3734
  }),
3722
3735
  /* @__PURE__ */ h("span", {
3723
3736
  className: "leadbot-chatbot-tool-card-title",
3724
- children: aa(a)
3737
+ children: sa(a)
3725
3738
  }),
3726
3739
  l && /* @__PURE__ */ h("span", {
3727
3740
  className: "leadbot-chatbot-tool-card-check",
3728
3741
  "aria-hidden": "true",
3729
- children: /* @__PURE__ */ h(sa, {})
3742
+ children: /* @__PURE__ */ h(la, {})
3730
3743
  })
3731
3744
  ]
3732
3745
  }), !u && /* @__PURE__ */ h("div", {
3733
3746
  className: "leadbot-chatbot-tool-card-body",
3734
- children: s ? /* @__PURE__ */ h(Xi, {
3747
+ children: s ? /* @__PURE__ */ h(Qi, {
3735
3748
  step: a,
3736
3749
  config: n,
3737
3750
  isPending: c,
@@ -3746,13 +3759,13 @@ function oa(e) {
3746
3759
  isFirstStep: !1,
3747
3760
  onOptionSelect: () => {},
3748
3761
  onSubmitted: r,
3749
- prefillValues: ia(t.args || {}, a.attributes?.form_schema?.fields || {}),
3762
+ prefillValues: oa(t.args || {}, a.attributes?.form_schema?.fields || {}),
3750
3763
  analyticsTracker: i
3751
3764
  })
3752
3765
  })]
3753
3766
  });
3754
3767
  }
3755
- function sa() {
3768
+ function la() {
3756
3769
  return /* @__PURE__ */ h("svg", {
3757
3770
  width: "10",
3758
3771
  height: "10",
@@ -3767,7 +3780,7 @@ function sa() {
3767
3780
  })
3768
3781
  });
3769
3782
  }
3770
- function ca(e) {
3783
+ function ua(e) {
3771
3784
  let t = {
3772
3785
  callback_request: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",
3773
3786
  email_request: "M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zm18 3-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",
@@ -3790,135 +3803,138 @@ function ca(e) {
3790
3803
  }
3791
3804
  //#endregion
3792
3805
  //#region ../../src/utils/persistence.ts
3793
- var la = "__leadbot_", ua = 100, da = 64;
3794
- function fa(e) {
3795
- return `${la}session_${e || "default"}`;
3806
+ var da = "__leadbot_", fa = 100, pa = 64;
3807
+ function ma(e) {
3808
+ return `${da}session_${e || "default"}`;
3809
+ }
3810
+ function ha(e) {
3811
+ return `${da}closed_${e || "default"}`;
3796
3812
  }
3797
- function pa(e) {
3798
- return `${la}chat_${e || "default"}_`;
3813
+ function ga(e) {
3814
+ return `${da}chat_${e || "default"}_`;
3799
3815
  }
3800
- function ma(e, t) {
3801
- return `${pa(e)}${t}`;
3816
+ function _a(e, t) {
3817
+ return `${ga(e)}${t}`;
3802
3818
  }
3803
- function ha(e, t) {
3804
- B(fa(e), t.slice(-100));
3819
+ function va(e, t) {
3820
+ z(ma(e), t.slice(-100));
3805
3821
  }
3806
- function ga(e) {
3807
- let t = F(fa(e));
3808
- return !Array.isArray(t) || t.length === 0 || t.length > ua || !t.every((e) => typeof e == "string" && e.length > 0 && e.length <= da) ? null : t;
3822
+ function ya(e) {
3823
+ let t = F(ma(e));
3824
+ return !Array.isArray(t) || t.length === 0 || t.length > fa || !t.every((e) => typeof e == "string" && e.length > 0 && e.length <= pa) ? null : t;
3809
3825
  }
3810
- function _a(e, t = e, n) {
3826
+ function ba(e, t = e, n) {
3811
3827
  try {
3812
- let r = fa(t), i = ae();
3828
+ let r = ma(t), i = ha(t), a = le();
3813
3829
  if (n) {
3814
- i.removeItem(r);
3815
- for (let t of n) i.removeItem(ma(e, t));
3830
+ a.removeItem(r), a.removeItem(i);
3831
+ for (let t of n) a.removeItem(_a(e, t));
3816
3832
  return;
3817
3833
  }
3818
- let a = pa(e);
3819
- for (let e = i.length - 1; e >= 0; e--) {
3820
- let t = i.key(e);
3821
- (t === r || t?.startsWith(a)) && i.removeItem(t);
3834
+ let o = ga(e);
3835
+ for (let e = a.length - 1; e >= 0; e--) {
3836
+ let t = a.key(e);
3837
+ (t === r || t === i || t?.startsWith(o)) && a.removeItem(t);
3822
3838
  }
3823
3839
  } catch {}
3824
3840
  }
3825
3841
  //#endregion
3826
3842
  //#region ../../src/steps/chatbot/chatPersistence.ts
3827
- var va = 2e4, ya = 1e3, ba = 25, xa = 2e3, Sa = 50, Ca = 5e3, wa = 50, Ta = 64, Ea = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, Da = /* @__PURE__ */ new Set([
3843
+ var xa = 2e4, Sa = 1e3, Ca = 25, wa = 2e3, Ta = 50, Ea = 5e3, Da = 50, Oa = 64, ka = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, Aa = /* @__PURE__ */ new Set([
3828
3844
  "pending",
3829
3845
  "completed",
3830
3846
  "dismissed"
3831
3847
  ]);
3832
- function Oa(e) {
3848
+ function ja(e) {
3833
3849
  if (!Array.isArray(e)) return;
3834
- let t = e.filter((e) => !!e && typeof e == "object" && typeof e.chunk_id == "number" && typeof e.filename == "string" && e.filename.length <= xa).slice(0, ba).map((e) => ({
3850
+ let t = e.filter((e) => !!e && typeof e == "object" && typeof e.chunk_id == "number" && typeof e.filename == "string" && e.filename.length <= wa).slice(0, Ca).map((e) => ({
3835
3851
  chunk_id: e.chunk_id,
3836
3852
  filename: e.filename
3837
3853
  }));
3838
3854
  return t.length > 0 ? t : void 0;
3839
3855
  }
3840
- function ka(e) {
3856
+ function Ma(e) {
3841
3857
  if (!e || typeof e != "object") return;
3842
3858
  let t = e;
3843
3859
  if (t.rating !== "positive" && t.rating !== "negative") return;
3844
3860
  let n = { rating: t.rating };
3845
3861
  return typeof t.comment == "string" && t.comment !== "" && t.comment.length <= 1e3 && (n.comment = t.comment), n;
3846
3862
  }
3847
- function Aa(e) {
3848
- if (e.role !== "user" && e.role !== "assistant" || typeof e.content != "string" || e.content === "" || e.content.length > va) return null;
3863
+ function Na(e) {
3864
+ if (e.role !== "user" && e.role !== "assistant" || typeof e.content != "string" || e.content === "" || e.content.length > xa) return null;
3849
3865
  let t = {
3850
3866
  role: e.role,
3851
3867
  content: e.content
3852
- }, n = Oa(e.citations);
3868
+ }, n = ja(e.citations);
3853
3869
  if (n && (t.citations = n), e.role === "assistant" && e.ai === !0) {
3854
3870
  t.ai = !0;
3855
- let n = ka(e.feedback);
3871
+ let n = Ma(e.feedback);
3856
3872
  n && (t.feedback = n);
3857
3873
  }
3858
3874
  return t;
3859
3875
  }
3860
- function ja(e, t, n) {
3876
+ function Pa(e, t, n) {
3861
3877
  return Array.isArray(e) ? e.some((e) => !e || typeof e != "object" ? !1 : (e.tool_type || "step") === "step" && e.name === t && e.step_uuid === n) : !1;
3862
3878
  }
3863
- function Ma(e) {
3864
- if (typeof e == "string") return e.length <= Ca ? e : void 0;
3865
- if (!(!Array.isArray(e) || e.length > wa) && !e.some((e) => typeof e != "string" || e.length > Ca)) return [...e];
3879
+ function Fa(e) {
3880
+ if (typeof e == "string") return e.length <= Ea ? e : void 0;
3881
+ if (!(!Array.isArray(e) || e.length > Da) && !e.some((e) => typeof e != "string" || e.length > Ea)) return [...e];
3866
3882
  }
3867
- function Na(e) {
3883
+ function Ia(e) {
3868
3884
  if (typeof e != "object" || !e || Array.isArray(e)) return {};
3869
3885
  let t = {}, n = 0;
3870
3886
  for (let [r, i] of Object.entries(e)) {
3871
- if (n >= Sa) break;
3872
- let e = Ma(i);
3887
+ if (n >= Ta) break;
3888
+ let e = Fa(i);
3873
3889
  e !== void 0 && (t[r] = e, n++);
3874
3890
  }
3875
3891
  return t;
3876
3892
  }
3877
- function Pa(e, t) {
3878
- if (e.role !== "tool" || typeof e.tool != "string" || !e.tool || typeof e.step_uuid != "string" || !e.step_uuid || e.step_uuid.length > Ta || typeof e.status != "string" || !Da.has(e.status) || !ja(t, e.tool, e.step_uuid)) return null;
3893
+ function La(e, t) {
3894
+ if (e.role !== "tool" || typeof e.tool != "string" || !e.tool || typeof e.step_uuid != "string" || !e.step_uuid || e.step_uuid.length > Oa || typeof e.status != "string" || !Aa.has(e.status) || !Pa(t, e.tool, e.step_uuid)) return null;
3879
3895
  let n = {
3880
3896
  role: "tool",
3881
3897
  tool: e.tool,
3882
3898
  step_uuid: e.step_uuid,
3883
3899
  status: e.status,
3884
- args: ta(e.args)
3900
+ args: ra(e.args)
3885
3901
  };
3886
- return n.status === "completed" && (n.result = Na(e.result)), n;
3902
+ return n.status === "completed" && (n.result = Ia(e.result)), n;
3887
3903
  }
3888
- function Fa(e, t) {
3904
+ function Ra(e, t) {
3889
3905
  if (!Array.isArray(e)) return null;
3890
3906
  let n = [];
3891
3907
  for (let r of e.slice(-50)) {
3892
3908
  if (!r || typeof r != "object") return null;
3893
- let e = r, i = e.role === "tool" ? Pa(e, t) : Aa(e);
3909
+ let e = r, i = e.role === "tool" ? La(e, t) : Na(e);
3894
3910
  if (!i) return null;
3895
3911
  n.push(i);
3896
3912
  }
3897
3913
  return n;
3898
3914
  }
3899
- function Ia(e, t, n) {
3900
- let r = F(ma(e, t));
3915
+ function za(e, t, n) {
3916
+ let r = F(_a(e, t));
3901
3917
  if (!r || typeof r != "object") return null;
3902
- let i = r, a = Fa(i.messages, n);
3918
+ let i = r, a = Ra(i.messages, n);
3903
3919
  return !a || a.length === 0 ? null : {
3904
- sessionId: typeof i.sessionId == "string" && Ea.test(i.sessionId) ? i.sessionId : null,
3920
+ sessionId: typeof i.sessionId == "string" && ka.test(i.sessionId) ? i.sessionId : null,
3905
3921
  messages: a
3906
3922
  };
3907
3923
  }
3908
- function La(e, t, n, r) {
3924
+ function Ba(e, t, n, r) {
3909
3925
  if (!n) return;
3910
3926
  let i = r.filter((e) => e.role === "tool" || e.content !== "").slice(-50);
3911
- B(ma(e, t), {
3927
+ z(_a(e, t), {
3912
3928
  sessionId: n,
3913
3929
  messages: i
3914
3930
  });
3915
3931
  }
3916
- function Ra(e, t) {
3917
- I(ma(e, t));
3932
+ function Va(e, t) {
3933
+ I(_a(e, t));
3918
3934
  }
3919
3935
  //#endregion
3920
3936
  //#region ../../src/steps/chatbot/chatFeedback.ts
3921
- function za(e, t) {
3937
+ function Ha(e, t) {
3922
3938
  let n = e[t];
3923
3939
  if (!n || n.role === "tool") return null;
3924
3940
  let r = -1, i = 0;
@@ -3926,13 +3942,13 @@ function za(e, t) {
3926
3942
  let a = e[n];
3927
3943
  (a.role !== "tool" || a.status !== "pending") && (i++, n <= t && r++);
3928
3944
  }
3929
- let a = Math.max(0, i - 51);
3945
+ let a = Math.max(0, i - (b + 1));
3930
3946
  return r < a ? null : r - a;
3931
3947
  }
3932
3948
  //#endregion
3933
3949
  //#region ../../src/steps/chatbot/chatFeedbackControls.tsx
3934
- var Ba = 2500;
3935
- function Va({ feedback: e, language: t, onRate: n, onLayoutChange: r }) {
3950
+ var Ua = 2500;
3951
+ function Wa({ feedback: e, language: t, onRate: n, onLayoutChange: r }) {
3936
3952
  let [i, a] = d(!1), [o, c] = d(""), [l, u] = d(!1), p = f(null);
3937
3953
  s(() => () => {
3938
3954
  p.current && clearTimeout(p.current);
@@ -3940,7 +3956,7 @@ function Va({ feedback: e, language: t, onRate: n, onLayoutChange: r }) {
3940
3956
  let m = () => {
3941
3957
  u(!0), p.current = setTimeout(() => {
3942
3958
  p.current = null, u(!1), r();
3943
- }, Ba);
3959
+ }, Ua);
3944
3960
  }, g = (t) => {
3945
3961
  e?.rating !== t && (n(t), c(""), a(!0), u(!1), r());
3946
3962
  };
@@ -3952,31 +3968,31 @@ function Va({ feedback: e, language: t, onRate: n, onLayoutChange: r }) {
3952
3968
  children: [/* @__PURE__ */ h("button", {
3953
3969
  type: "button",
3954
3970
  className: `leadbot-chatbot-feedback-btn${e?.rating === "positive" ? " leadbot-chatbot-feedback-btn--selected" : ""}`,
3955
- "aria-label": j("chatbot_feedback_positive", t),
3971
+ "aria-label": M("chatbot_feedback_positive", t),
3956
3972
  "aria-pressed": e?.rating === "positive",
3957
3973
  onClick: () => g("positive"),
3958
- dangerouslySetInnerHTML: { __html: Ee("fal fa-thumbs-up") }
3974
+ dangerouslySetInnerHTML: { __html: je("fal fa-thumbs-up") }
3959
3975
  }), /* @__PURE__ */ h("button", {
3960
3976
  type: "button",
3961
3977
  className: `leadbot-chatbot-feedback-btn${e?.rating === "negative" ? " leadbot-chatbot-feedback-btn--selected" : ""}`,
3962
- "aria-label": j("chatbot_feedback_negative", t),
3978
+ "aria-label": M("chatbot_feedback_negative", t),
3963
3979
  "aria-pressed": e?.rating === "negative",
3964
3980
  onClick: () => g("negative"),
3965
- dangerouslySetInnerHTML: { __html: Ee("fal fa-thumbs-down") }
3981
+ dangerouslySetInnerHTML: { __html: je("fal fa-thumbs-down") }
3966
3982
  })]
3967
3983
  }),
3968
3984
  i && e && /* @__PURE__ */ h("form", {
3969
3985
  className: "leadbot-chatbot-feedback-comment",
3970
3986
  onSubmit: (t) => {
3971
3987
  if (t.preventDefault(), !e) return;
3972
- let i = o.trim().slice(0, ya);
3988
+ let i = o.trim().slice(0, Sa);
3973
3989
  i && n(e.rating, i), a(!1), c(""), m(), r();
3974
3990
  },
3975
3991
  children: [/* @__PURE__ */ h("textarea", {
3976
3992
  className: "leadbot-chatbot-feedback-textarea",
3977
3993
  rows: 2,
3978
3994
  maxLength: 1e3,
3979
- placeholder: j("chatbot_feedback_comment_placeholder", t),
3995
+ placeholder: M("chatbot_feedback_comment_placeholder", t),
3980
3996
  value: o,
3981
3997
  onInput: (e) => c(e.target.value)
3982
3998
  }), /* @__PURE__ */ h("div", {
@@ -3984,39 +4000,39 @@ function Va({ feedback: e, language: t, onRate: n, onLayoutChange: r }) {
3984
4000
  children: [/* @__PURE__ */ h("button", {
3985
4001
  type: "submit",
3986
4002
  className: "leadbot-chatbot-feedback-send",
3987
- children: j("chatbot_feedback_comment_submit", t)
4003
+ children: M("chatbot_feedback_comment_submit", t)
3988
4004
  }), /* @__PURE__ */ h("button", {
3989
4005
  type: "button",
3990
4006
  className: "leadbot-chatbot-feedback-skip",
3991
4007
  onClick: () => {
3992
4008
  a(!1), c(""), r();
3993
4009
  },
3994
- children: j("chatbot_feedback_comment_skip", t)
4010
+ children: M("chatbot_feedback_comment_skip", t)
3995
4011
  })]
3996
4012
  })]
3997
4013
  }),
3998
4014
  l && /* @__PURE__ */ h("div", {
3999
4015
  className: "leadbot-chatbot-feedback-thanks",
4000
- children: j("chatbot_feedback_thanks", t)
4016
+ children: M("chatbot_feedback_thanks", t)
4001
4017
  })
4002
4018
  ]
4003
4019
  });
4004
4020
  }
4005
4021
  //#endregion
4006
4022
  //#region ../../src/steps/chatbotStep.tsx
4007
- var Ha = 50, Ua = 5e3;
4008
- function Wa(e, t, n) {
4023
+ var Ga = 5e3;
4024
+ function Ka(e, t, n) {
4009
4025
  return Array.isArray(e) && e.find((e) => !e || typeof e != "object" ? !1 : (e.tool_type || "step") === "step" && e.name === t && e.step_uuid === n) || null;
4010
4026
  }
4011
- function Ga(e, t) {
4027
+ function qa(e, t) {
4012
4028
  if (e.status === "dismissed") return "The visitor dismissed this step without completing it.";
4013
4029
  let n = (t.steps?.find((t) => t.uuid === e.step_uuid))?.attributes?.form_schema?.fields || {}, r = Object.entries(e.result || {}).map(([e, t]) => {
4014
4030
  let r = n[e];
4015
4031
  return `${r?.label || r?.name || e}: ${t}`;
4016
4032
  }).join("; ");
4017
- return (r ? `The visitor submitted the form. ${r}` : "The visitor submitted the form.").slice(0, Ua);
4033
+ return (r ? `The visitor submitted the form. ${r}` : "The visitor submitted the form.").slice(0, Ga);
4018
4034
  }
4019
- function Ka(e, t) {
4035
+ function Ja(e, t) {
4020
4036
  let n = [];
4021
4037
  for (let r of e) {
4022
4038
  if (r.role !== "tool") {
@@ -4030,18 +4046,18 @@ function Ka(e, t) {
4030
4046
  role: "tool_result",
4031
4047
  tool: r.tool,
4032
4048
  status: r.status,
4033
- content: Ga(r, t)
4049
+ content: qa(r, t)
4034
4050
  });
4035
4051
  }
4036
4052
  return n;
4037
4053
  }
4038
- function qa(e, t) {
4054
+ function Ya(e, t) {
4039
4055
  for (let n = t - 1; n >= 0; n--) {
4040
4056
  let t = e[n];
4041
4057
  if (t.role === "user") return t.content;
4042
4058
  }
4043
4059
  }
4044
- function Ja(e, t) {
4060
+ function Xa(e, t) {
4045
4061
  let n = -1;
4046
4062
  for (let t = e.length - 1; t >= 0; t--) if (e[t].role === "assistant") {
4047
4063
  n = t;
@@ -4053,7 +4069,17 @@ function Ja(e, t) {
4053
4069
  } : e) : e;
4054
4070
  return i.filter((e, t) => e.role !== "assistant" || e.content !== "" || !i.slice(t + 1).some((e) => e.role === "tool"));
4055
4071
  }
4056
- function Ya(e, t) {
4072
+ function Za(e, t) {
4073
+ let n = e[e.length - 1];
4074
+ return n?.role === "assistant" && n.content === "" ? [...e.slice(0, -1), {
4075
+ role: "assistant",
4076
+ content: t
4077
+ }] : [...e, {
4078
+ role: "assistant",
4079
+ content: t
4080
+ }];
4081
+ }
4082
+ function Qa(e, t) {
4057
4083
  let n = e[e.length - 1];
4058
4084
  return n?.role === "assistant" ? [...e.slice(0, -1), {
4059
4085
  ...n,
@@ -4065,7 +4091,7 @@ function Ya(e, t) {
4065
4091
  ai: !0
4066
4092
  }];
4067
4093
  }
4068
- function Xa(e, t) {
4094
+ function $a(e, t) {
4069
4095
  for (let n = e.length - 1; n >= 0; n--) {
4070
4096
  let r = e[n];
4071
4097
  if (r.role === "user") break;
@@ -4085,46 +4111,49 @@ function Xa(e, t) {
4085
4111
  ai: !0
4086
4112
  }];
4087
4113
  }
4088
- function Za(e) {
4089
- let { step: t, config: n, isCurrent: r } = e, i = Fn(n), a = t.attributes?.sender_name || "AI Assistant", o = t.attributes?.sender_image?.url || null, c = t.attributes?.initial_message || "", l = re(t.attributes?.conversation_starters), u = ne(n.leadbot?.language), p = j("chatbot_placeholder", u), m = ge(n), [g] = d(() => Ia(m, t.uuid, t.attributes?.tools)), [_, b] = d(() => g ? g.messages : c ? [{
4114
+ function eo(e) {
4115
+ let { step: t, config: n, isCurrent: r } = e, i = Ln(n), a = t.attributes?.sender_name || "AI Assistant", o = t.attributes?.sender_image?.url || null, c = t.attributes?.initial_message || "", l = oe(t.attributes?.conversation_starters), u = ae(n.leadbot?.language), p = M("chatbot_placeholder", u), m = be(n), [g] = d(() => za(m, t.uuid, t.attributes?.tools)), [_, b] = d(() => g ? g.messages : c ? [{
4090
4116
  role: "assistant",
4091
4117
  content: c
4092
- }] : []), [S, C] = d(!1), [w, T] = d(null), [E, O] = d(!1), [k, A] = d(!1), ee = f(null), M = f(null), te = f(null), N = f(null), P = f(g?.sessionId ?? null), F = f(_), I = f(!1), L = f(!1), R = f(null);
4118
+ }] : []), [x, C] = d(!1), [w, T] = d(null), [E, D] = d(!1), [k, A] = d(!1), ee = f(null), j = f(null), te = f(null), ne = f(null), N = f(g?.sessionId ?? null), P = f(_), F = f(!1), I = f(!1), re = f(null), ie = f(null);
4093
4119
  s(() => {
4094
- E && N.current?.focus({ preventScroll: !0 });
4120
+ E && ne.current?.focus({ preventScroll: !0 });
4095
4121
  }, [E]);
4096
- let z = (e) => {
4122
+ let L = (e) => {
4097
4123
  b((t) => {
4098
4124
  let n = typeof e == "function" ? e(t) : e;
4099
- return F.current = n, n;
4125
+ return P.current = n, n;
4100
4126
  });
4101
- }, ie = (e) => {
4102
- I.current = e, C(e);
4103
- }, ae = () => (P.current ||= D(), oe(P.current), P.current), ce = () => {
4127
+ }, se = (e) => {
4128
+ F.current = e, C(e);
4129
+ }, ce = () => (N.current ||= O(), ue(N.current), N.current), le = () => {
4104
4130
  setTimeout(() => {
4105
4131
  ee.current && (ee.current.scrollTop = ee.current.scrollHeight);
4106
4132
  }, 100);
4107
4133
  };
4108
4134
  s(() => {
4109
- F.current = _;
4135
+ P.current = _;
4110
4136
  }, [_]), s(() => {
4111
- La(m, t.uuid, P.current, _);
4137
+ Ba(m, t.uuid, N.current, _);
4112
4138
  }, [
4113
4139
  m,
4114
4140
  t.uuid,
4115
4141
  _
4116
4142
  ]), s(() => {
4117
- I.current = S;
4118
- }, [S]), s(() => () => {
4119
- R.current && clearTimeout(R.current);
4143
+ F.current = x;
4144
+ }, [x]), s(() => () => {
4145
+ if (!re.current) return;
4146
+ clearTimeout(re.current);
4147
+ let e = ie.current;
4148
+ e && za(m, t.uuid, t.attributes?.tools) && Ba(m, t.uuid, N.current, Za(P.current, e));
4120
4149
  }, []), s(() => {
4121
- ce();
4150
+ le();
4122
4151
  }, [
4123
4152
  _,
4124
- S,
4153
+ x,
4125
4154
  w
4126
4155
  ]);
4127
- let B = f(null), le = (e) => {
4156
+ let de = f(null), z = (e) => {
4128
4157
  if (typeof e.tool != "string" || !e.tool) return;
4129
4158
  if (typeof e.step_uuid != "string" || !e.step_uuid) {
4130
4159
  T("tool");
@@ -4135,7 +4164,7 @@ function Za(e) {
4135
4164
  console.warn(`Chatbot tool_call references unknown step: ${r}`);
4136
4165
  return;
4137
4166
  }
4138
- let a = Wa(t.attributes?.tools, e.tool, r);
4167
+ let a = Ka(t.attributes?.tools, e.tool, r);
4139
4168
  if (!a) {
4140
4169
  console.warn(`Chatbot tool_call references unconfigured step tool: ${e.tool}`);
4141
4170
  return;
@@ -4149,113 +4178,122 @@ function Za(e) {
4149
4178
  tool: e.tool,
4150
4179
  step_uuid: r,
4151
4180
  status: "pending",
4152
- args: ta(e.args)
4181
+ args: ra(e.args)
4153
4182
  };
4154
- z((e) => [...e.map((e) => e.role === "tool" && e.step_uuid === r && e.status === "pending" ? {
4183
+ L((e) => [...e.map((e) => e.role === "tool" && e.step_uuid === r && e.status === "pending" ? {
4155
4184
  ...e,
4156
4185
  status: "dismissed"
4157
4186
  } : e), o]);
4158
- }, V = async (e) => {
4187
+ }, fe = async (e) => {
4159
4188
  let r = i.visitorId;
4160
4189
  if (!m || !t.uuid) throw Error("chatbot_error_default");
4161
- let a = Ka(e, n), o = a.length > Ha ? a.slice(-50) : a, s = new AbortController();
4162
- B.current = s;
4163
- let c = [], l = !1, d = se({
4164
- url: ye("/client/chat/stream"),
4190
+ let a = Ja(e, n), o = new AbortController();
4191
+ de.current = o;
4192
+ let s = [], c = !1, l = R({
4193
+ url: Ce("/client/chat/stream"),
4165
4194
  domainKey: m,
4166
- leadbotId: xe(n),
4195
+ leadbotId: Te(n),
4167
4196
  stepUuid: t.uuid,
4168
4197
  visitorId: r,
4169
- chatSessionId: ae(),
4170
- messages: o,
4171
- previewToken: Ce() ?? void 0,
4172
- analytics: x(),
4173
- signal: s.signal
4198
+ chatSessionId: ce(),
4199
+ messages: a,
4200
+ previewToken: De() ?? void 0,
4201
+ analytics: S(),
4202
+ signal: o.signal
4174
4203
  });
4175
- for await (let e of d) {
4204
+ for await (let e of l) {
4176
4205
  if (e.type === "reasoning") {
4177
- l || (l = !0, T("thinking"));
4206
+ c || (c = !0, T("thinking"));
4178
4207
  continue;
4179
4208
  }
4180
- if (l && (l = !1, T("searching"), await new Promise((e) => setTimeout(e, 0))), e.type === "token" && typeof e.content == "string") T(null), z((t) => Ya(t, e.content)), await new Promise((e) => setTimeout(e, 0));
4181
- else if (e.type === "correction" && typeof e.content == "string") z((t) => Xa(t, e.content)), await new Promise((e) => setTimeout(e, 0));
4182
- else if (e.type === "citations" && Array.isArray(e.citations)) c = e.citations;
4183
- else if (e.type === "tool_call") le(e), await new Promise((e) => setTimeout(e, 0));
4209
+ if (c && (c = !1, T("searching"), await new Promise((e) => setTimeout(e, 0))), e.type === "token" && typeof e.content == "string") T(null), L((t) => Qa(t, e.content)), await new Promise((e) => setTimeout(e, 0));
4210
+ else if (e.type === "correction" && typeof e.content == "string") L((t) => $a(t, e.content)), await new Promise((e) => setTimeout(e, 0));
4211
+ else if (e.type === "citations" && Array.isArray(e.citations)) s = e.citations;
4212
+ else if (e.type === "tool_call") z(e), await new Promise((e) => setTimeout(e, 0));
4184
4213
  else if (e.type === "done") {
4185
- z((e) => Ja(e, c));
4214
+ L((e) => Xa(e, s));
4186
4215
  break;
4187
4216
  } else if (e.type === "error") {
4188
4217
  let t = v[e.error_code] || "chatbot_error_default";
4189
- z((e) => {
4190
- let n = Ja(e, []), r = n[n.length - 1];
4218
+ L((e) => {
4219
+ let n = Xa(e, []), r = n[n.length - 1];
4191
4220
  return r?.role === "assistant" && r.content === "" ? [...n.slice(0, -1), {
4192
4221
  ...r,
4193
- content: j(t, u)
4222
+ content: M(t, u)
4194
4223
  }] : [...n, {
4195
4224
  role: "assistant",
4196
- content: j(t, u)
4225
+ content: M(t, u)
4197
4226
  }];
4198
4227
  });
4199
4228
  break;
4200
4229
  }
4201
4230
  }
4202
- }, ue = async (e) => {
4203
- z([...e, {
4231
+ }, B = async (e) => {
4232
+ L([...e, {
4204
4233
  role: "assistant",
4205
4234
  content: ""
4206
- }]), ie(!0), T("thinking");
4235
+ }]), se(!0), T("thinking");
4207
4236
  try {
4208
- await V(e);
4237
+ await fe(e);
4209
4238
  } catch (e) {
4210
4239
  console.error("Failed to send chatbot message:", e);
4211
4240
  let t = e instanceof Error && e.message.startsWith("chatbot_error_") ? e.message : "chatbot_error_default";
4212
- z((e) => {
4213
- let n = Ja(e, []), r = n[n.length - 1];
4241
+ L((e) => {
4242
+ let n = Xa(e, []), r = n[n.length - 1];
4214
4243
  return r?.role === "assistant" && r.content === "" ? [...n.slice(0, -1), {
4215
4244
  role: "assistant",
4216
- content: j(t, u)
4245
+ content: M(t, u)
4217
4246
  }] : r?.role === "assistant" ? [...n.slice(0, -1), {
4218
4247
  ...r,
4219
- content: `${r.content}\n\n${j(t, u)}`
4248
+ content: `${r.content}\n\n${M(t, u)}`
4220
4249
  }] : r?.role === "tool" ? [...n, {
4221
4250
  role: "assistant",
4222
- content: j(t, u)
4251
+ content: M(t, u)
4223
4252
  }] : n;
4224
4253
  });
4225
4254
  } finally {
4226
- ie(!1), T(null), B.current = null, L.current && (L.current = !1, setTimeout(() => {
4227
- I.current || ue(F.current);
4255
+ se(!1), T(null), de.current = null, I.current && (I.current = !1, setTimeout(() => {
4256
+ F.current || B(P.current);
4228
4257
  }, 0));
4229
4258
  }
4230
- }, H = async (e) => {
4231
- await ue([...F.current, {
4259
+ }, pe = async (e) => {
4260
+ await B([...P.current, {
4232
4261
  role: "user",
4233
4262
  content: e
4234
4263
  }]);
4235
4264
  };
4236
4265
  s(() => {
4237
4266
  let t = e.pendingMessage;
4238
- if (!(t === void 0 || !r || I.current)) {
4267
+ if (!(t === void 0 || !r || F.current)) {
4239
4268
  if (e.onPendingMessageConsumed?.(), t) {
4240
4269
  let e = t.trim().toLowerCase(), n = l.find((t) => t.question.trim().toLowerCase() === e);
4241
- n ? de(n) : H(t);
4242
- } else M.current?.focus({ preventScroll: !0 });
4270
+ n ? me(n) : pe(t);
4271
+ } else j.current?.focus({ preventScroll: !0 });
4243
4272
  }
4244
4273
  }, [
4245
4274
  e.pendingMessage,
4246
4275
  r,
4247
- S
4276
+ x
4248
4277
  ]);
4249
- let de = (e) => {
4250
- if (!(!r || I.current)) {
4278
+ let me = (e) => {
4279
+ if (!(!r || F.current)) {
4251
4280
  if (e.answer) {
4252
- fe(e.question, e.answer);
4281
+ he(e.question, e.answer);
4253
4282
  return;
4254
4283
  }
4255
- H(e.question);
4284
+ pe(e.question);
4256
4285
  }
4257
- }, fe = (e, t) => {
4258
- z((t) => [
4286
+ }, he = (e, r) => {
4287
+ let a = ce();
4288
+ i.submitChatExchange({
4289
+ step_uuid: t.uuid,
4290
+ chat_session_id: a,
4291
+ messages: Ja([...P.current, {
4292
+ role: "user",
4293
+ content: e
4294
+ }], n),
4295
+ answer: r
4296
+ }), L((t) => [
4259
4297
  ...t,
4260
4298
  {
4261
4299
  role: "user",
@@ -4265,43 +4303,34 @@ function Za(e) {
4265
4303
  role: "assistant",
4266
4304
  content: ""
4267
4305
  }
4268
- ]), ie(!0), T("thinking"), R.current = setTimeout(() => {
4269
- R.current = null, z((e) => {
4270
- let n = e[e.length - 1];
4271
- return n?.role === "assistant" && n.content === "" ? [...e.slice(0, -1), {
4272
- role: "assistant",
4273
- content: t
4274
- }] : [...e, {
4275
- role: "assistant",
4276
- content: t
4277
- }];
4278
- }), ie(!1), T(null);
4306
+ ]), se(!0), T("thinking"), ie.current = r, re.current = setTimeout(() => {
4307
+ re.current = null, ie.current = null, L((e) => Za(e, r)), se(!1), T(null);
4279
4308
  }, y);
4280
- }, pe = (e, t) => {
4281
- let n = F.current, r = n[e];
4309
+ }, ge = (e, t) => {
4310
+ let n = P.current, r = n[e];
4282
4311
  if (r?.role !== "tool" || r.status !== "pending") return;
4283
4312
  let i = n.map((n, r) => r === e && n.role === "tool" ? {
4284
4313
  ...n,
4285
4314
  status: "completed",
4286
4315
  result: t
4287
4316
  } : n);
4288
- if (z(i), I.current) {
4289
- L.current = !0;
4317
+ if (L(i), F.current) {
4318
+ I.current = !0;
4290
4319
  return;
4291
4320
  }
4292
- ue(i);
4293
- }, me = (e) => {
4294
- z((t) => t.map((t, n) => n === e && t.role === "tool" && t.status === "pending" ? {
4321
+ B(i);
4322
+ }, _e = (e) => {
4323
+ L((t) => t.map((t, n) => n === e && t.role === "tool" && t.status === "pending" ? {
4295
4324
  ...t,
4296
4325
  status: "dismissed"
4297
4326
  } : t));
4298
- }, he = (e, n, r) => {
4299
- let a = P.current;
4327
+ }, ve = (e, n, r) => {
4328
+ let a = N.current;
4300
4329
  if (!a) return;
4301
- let o = F.current, s = o[e];
4330
+ let o = P.current, s = o[e];
4302
4331
  if (s?.role !== "assistant") return;
4303
- let c = za(o, e);
4304
- c !== null && (z((t) => t.map((t, i) => i === e && t.role === "assistant" ? {
4332
+ let c = Ha(o, e);
4333
+ c !== null && (L((t) => t.map((t, i) => i === e && t.role === "assistant" ? {
4305
4334
  ...t,
4306
4335
  feedback: {
4307
4336
  rating: n,
@@ -4315,29 +4344,29 @@ function Za(e) {
4315
4344
  comment: r,
4316
4345
  message_content: s.content.slice(0, 5e3)
4317
4346
  }));
4318
- }, _e = (e) => {
4347
+ }, ye = (e) => {
4319
4348
  e.preventDefault();
4320
- let t = M.current?.value?.trim();
4321
- !t || !r || S || (M.current.value = "", A(!1), H(t));
4322
- }, U = () => {
4323
- A(!!M.current?.value?.trim());
4324
- }, ve = (e) => {
4325
- e.key === "Enter" && !e.shiftKey && _e(e);
4326
- }, be = (e) => {
4327
- e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), O(!1), te.current?.focus({ preventScroll: !0 }));
4328
- }, Se = () => {
4329
- B.current?.abort(), B.current = null, P.current = null, L.current = !1, Ra(m, t.uuid), R.current &&= (clearTimeout(R.current), null), ie(!1), T(null), z(c ? [{
4349
+ let t = j.current?.value?.trim();
4350
+ !t || !r || x || (j.current.value = "", A(!1), pe(t));
4351
+ }, xe = () => {
4352
+ A(!!j.current?.value?.trim());
4353
+ }, V = (e) => {
4354
+ e.key === "Enter" && !e.shiftKey && ye(e);
4355
+ }, Se = (e) => {
4356
+ e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), D(!1), te.current?.focus({ preventScroll: !0 }));
4357
+ }, we = () => {
4358
+ de.current?.abort(), de.current = null, N.current = null, I.current = !1, Va(m, t.uuid), re.current &&= (clearTimeout(re.current), null), se(!1), T(null), L(c ? [{
4330
4359
  role: "assistant",
4331
4360
  content: c
4332
- }] : []), O(!1);
4333
- }, we = _.some((e) => e.role !== "assistant"), W = l.length > 0 && !we && !S, Te = _[_.length - 1], G = S && w !== null && Te?.role === "assistant" && Te.content !== "";
4361
+ }] : []), D(!1);
4362
+ }, Ee = _.some((e) => e.role !== "assistant"), Oe = l.length > 0 && !Ee && !x, ke = _[_.length - 1], Ae = x && w !== null && ke?.role === "assistant" && ke.content !== "";
4334
4363
  return /* @__PURE__ */ h("div", {
4335
4364
  className: "leadbot-chatbot-interface",
4336
4365
  children: [
4337
4366
  /* @__PURE__ */ h("div", {
4338
4367
  className: "leadbot-chatbot-header",
4339
4368
  children: [
4340
- /* @__PURE__ */ h(wn, {
4369
+ /* @__PURE__ */ h(En, {
4341
4370
  imageUrl: o,
4342
4371
  alt: a,
4343
4372
  variant: "chatbot"
@@ -4356,10 +4385,10 @@ function Za(e) {
4356
4385
  ref: te,
4357
4386
  type: "button",
4358
4387
  className: "leadbot-chatbot-menu-btn",
4359
- "aria-label": j("chatbot_menu_label", u),
4388
+ "aria-label": M("chatbot_menu_label", u),
4360
4389
  "aria-expanded": E,
4361
4390
  "aria-haspopup": "menu",
4362
- onClick: () => O(!E),
4391
+ onClick: () => D(!E),
4363
4392
  children: /* @__PURE__ */ h("svg", {
4364
4393
  width: "18",
4365
4394
  height: "18",
@@ -4391,16 +4420,16 @@ function Za(e) {
4391
4420
  E && /* @__PURE__ */ h("div", {
4392
4421
  className: "leadbot-chatbot-menu",
4393
4422
  role: "menu",
4394
- onKeyDown: be,
4423
+ onKeyDown: Se,
4395
4424
  children: /* @__PURE__ */ h("button", {
4396
- ref: N,
4425
+ ref: ne,
4397
4426
  type: "button",
4398
4427
  className: "leadbot-chatbot-menu-item",
4399
4428
  role: "menuitem",
4400
- onClick: Se,
4429
+ onClick: we,
4401
4430
  children: [/* @__PURE__ */ h("span", {
4402
4431
  className: "leadbot-chatbot-menu-item-icon",
4403
- dangerouslySetInnerHTML: { __html: Ee("fal fa-rotate-left") }
4432
+ dangerouslySetInnerHTML: { __html: je("fal fa-rotate-left") }
4404
4433
  }), /* @__PURE__ */ h("span", { children: "Reset chat" })]
4405
4434
  })
4406
4435
  })
@@ -4410,41 +4439,41 @@ function Za(e) {
4410
4439
  className: "leadbot-chatbot-messages",
4411
4440
  ref: ee,
4412
4441
  role: "log",
4413
- "aria-label": j("chatbot_messages_label", u),
4442
+ "aria-label": M("chatbot_messages_label", u),
4414
4443
  tabIndex: 0,
4415
4444
  children: [_.map((t, r) => {
4416
4445
  if (t.role === "user") return /* @__PURE__ */ h("div", {
4417
4446
  className: "leadbot-chatbot-message leadbot-chatbot-message-user",
4418
4447
  children: /* @__PURE__ */ h("div", {
4419
4448
  className: "leadbot-chatbot-message-content",
4420
- dangerouslySetInnerHTML: { __html: Ve(t.content) }
4449
+ dangerouslySetInnerHTML: { __html: Ge(t.content) }
4421
4450
  })
4422
4451
  }, r);
4423
- if (t.role === "tool") return /* @__PURE__ */ h(zn.Provider, {
4424
- value: P.current,
4425
- children: /* @__PURE__ */ h(oa, {
4452
+ if (t.role === "tool") return /* @__PURE__ */ h(Vn.Provider, {
4453
+ value: N.current,
4454
+ children: /* @__PURE__ */ h(ca, {
4426
4455
  message: t,
4427
4456
  config: n,
4428
4457
  analyticsTracker: e.analyticsTracker,
4429
- onCompleted: (e) => pe(r, e),
4430
- onDismissed: () => me(r),
4431
- prefillMessage: qa(_, r)
4458
+ onCompleted: (e) => ge(r, e),
4459
+ onDismissed: () => _e(r),
4460
+ prefillMessage: Ya(_, r)
4432
4461
  })
4433
4462
  }, r);
4434
- if (S && t.content === "" && r === _.length - 1) return /* @__PURE__ */ h("div", {
4463
+ if (x && t.content === "" && r === _.length - 1) return /* @__PURE__ */ h("div", {
4435
4464
  className: "leadbot-chatbot-message leadbot-chatbot-message-bot leadbot-chatbot-message-typing",
4436
- children: /* @__PURE__ */ h($a, {
4465
+ children: /* @__PURE__ */ h(no, {
4437
4466
  language: u,
4438
4467
  phase: w || "thinking"
4439
4468
  })
4440
4469
  }, r);
4441
- let { html: i, sources: a } = Ue(Be(t.content), t.citations || []), o = t.ai === !0 && t.content !== "" && !(S && r === _.length - 1) && za(_, r) !== null;
4470
+ let { html: i, sources: a } = qe(We(t.content), t.citations || []), o = t.ai === !0 && t.content !== "" && !(x && r === _.length - 1) && Ha(_, r) !== null;
4442
4471
  return /* @__PURE__ */ h("div", {
4443
4472
  className: "leadbot-chatbot-message leadbot-chatbot-message-bot",
4444
4473
  children: [
4445
4474
  /* @__PURE__ */ h("div", {
4446
4475
  className: "leadbot-chatbot-message-content",
4447
- dangerouslySetInnerHTML: { __html: Sn(i) }
4476
+ dangerouslySetInnerHTML: { __html: wn(i) }
4448
4477
  }),
4449
4478
  a.length > 0 && /* @__PURE__ */ h("div", {
4450
4479
  className: "leadbot-chatbot-citations",
@@ -4465,28 +4494,28 @@ function Za(e) {
4465
4494
  }, e.index);
4466
4495
  })
4467
4496
  }),
4468
- o && /* @__PURE__ */ h(Va, {
4497
+ o && /* @__PURE__ */ h(Wa, {
4469
4498
  feedback: t.feedback,
4470
4499
  language: u,
4471
- onRate: (e, t) => he(r, e, t),
4472
- onLayoutChange: ce
4500
+ onRate: (e, t) => ve(r, e, t),
4501
+ onLayoutChange: le
4473
4502
  })
4474
4503
  ]
4475
4504
  }, r);
4476
- }), G && /* @__PURE__ */ h("div", {
4505
+ }), Ae && /* @__PURE__ */ h("div", {
4477
4506
  className: "leadbot-chatbot-message leadbot-chatbot-message-bot leadbot-chatbot-message-typing",
4478
- children: /* @__PURE__ */ h($a, {
4507
+ children: /* @__PURE__ */ h(no, {
4479
4508
  language: u,
4480
4509
  phase: w || "thinking"
4481
4510
  })
4482
4511
  })]
4483
4512
  }),
4484
- W && /* @__PURE__ */ h(Qa, {
4513
+ Oe && /* @__PURE__ */ h(to, {
4485
4514
  starters: l,
4486
4515
  disabled: !r,
4487
- onSelect: de
4516
+ onSelect: me
4488
4517
  }),
4489
- /* @__PURE__ */ h(Dn, {
4518
+ /* @__PURE__ */ h(kn, {
4490
4519
  align: "center",
4491
4520
  className: "leadbot-chatbot-branding",
4492
4521
  leadbot: n.leadbot,
@@ -4499,18 +4528,18 @@ function Za(e) {
4499
4528
  children: /* @__PURE__ */ h("div", {
4500
4529
  className: "leadbot-chatbot-input-field",
4501
4530
  children: [/* @__PURE__ */ h("input", {
4502
- ref: M,
4531
+ ref: j,
4503
4532
  type: "text",
4504
4533
  placeholder: p,
4505
4534
  className: "leadbot-chatbot-message-input",
4506
- onKeyDown: ve,
4507
- onInput: U,
4508
- disabled: !r || S
4535
+ onKeyDown: V,
4536
+ onInput: xe,
4537
+ disabled: !r || x
4509
4538
  }), /* @__PURE__ */ h("button", {
4510
- className: `leadbot-chatbot-send-btn${k && !S ? " leadbot-chatbot-send-btn--active" : ""}`,
4511
- "aria-label": j("chatbot_send_label", u),
4512
- onClick: _e,
4513
- disabled: !r || S || !k,
4539
+ className: `leadbot-chatbot-send-btn${k && !x ? " leadbot-chatbot-send-btn--active" : ""}`,
4540
+ "aria-label": M("chatbot_send_label", u),
4541
+ onClick: ye,
4542
+ disabled: !r || x || !k,
4514
4543
  children: /* @__PURE__ */ h("svg", {
4515
4544
  width: "20",
4516
4545
  height: "20",
@@ -4530,7 +4559,7 @@ function Za(e) {
4530
4559
  ]
4531
4560
  });
4532
4561
  }
4533
- function Qa({ starters: e, disabled: t, onSelect: n }) {
4562
+ function to({ starters: e, disabled: t, onSelect: n }) {
4534
4563
  return /* @__PURE__ */ h("div", {
4535
4564
  className: "leadbot-chatbot-starters",
4536
4565
  children: e.map((e) => /* @__PURE__ */ h("button", {
@@ -4542,8 +4571,8 @@ function Qa({ starters: e, disabled: t, onSelect: n }) {
4542
4571
  }, e.question))
4543
4572
  });
4544
4573
  }
4545
- function $a({ language: e, phase: t }) {
4546
- let n = j(t === "searching" ? "chatbot_searching" : t === "tool" ? "chatbot_using_tool" : "chatbot_thinking", e);
4574
+ function no({ language: e, phase: t }) {
4575
+ let n = M(t === "searching" ? "chatbot_searching" : t === "tool" ? "chatbot_using_tool" : "chatbot_thinking", e);
4547
4576
  return /* @__PURE__ */ h("div", {
4548
4577
  className: "leadbot-chatbot-thinking",
4549
4578
  children: [/* @__PURE__ */ h("span", {
@@ -4561,65 +4590,65 @@ function $a({ language: e, phase: t }) {
4561
4590
  }
4562
4591
  //#endregion
4563
4592
  //#region ../../src/steps/index.ts
4564
- var eo = {
4593
+ var ro = {
4565
4594
  start: {
4566
- component: Mn,
4595
+ component: Pn,
4567
4596
  autoAdvance: !0
4568
4597
  },
4569
4598
  message: {
4570
- component: jn,
4599
+ component: Nn,
4571
4600
  autoAdvance: !0
4572
4601
  },
4573
4602
  notification: {
4574
- component: Nn,
4603
+ component: Fn,
4575
4604
  autoAdvance: !0
4576
4605
  },
4577
4606
  button: {
4578
- component: Ln,
4607
+ component: zn,
4579
4608
  autoAdvance: !1
4580
4609
  },
4581
4610
  html_embed: {
4582
- component: Rn,
4611
+ component: Bn,
4583
4612
  autoAdvance: !0
4584
4613
  },
4585
4614
  whatsapp: {
4586
- component: Nr,
4615
+ component: Fr,
4587
4616
  autoAdvance: !1
4588
4617
  },
4589
4618
  callback_request: {
4590
- component: Gi,
4619
+ component: qi,
4591
4620
  autoAdvance: !1
4592
4621
  },
4593
4622
  email_request: {
4594
- component: Ki,
4623
+ component: Ji,
4595
4624
  autoAdvance: !1
4596
4625
  },
4597
4626
  form_submit: {
4598
- component: qi,
4627
+ component: Yi,
4599
4628
  autoAdvance: !1
4600
4629
  },
4601
4630
  chatbot: {
4602
- component: Za,
4631
+ component: eo,
4603
4632
  autoAdvance: !1
4604
4633
  }
4605
- }, to = (e) => eo[e] || (console.warn(`No component found for step type: ${e}`), {
4606
- component: Ji,
4634
+ }, io = (e) => ro[e] || (console.warn(`No component found for step type: ${e}`), {
4635
+ component: Xi,
4607
4636
  autoAdvance: !1
4608
4637
  });
4609
4638
  //#endregion
4610
4639
  //#region ../../src/stepRenderer.tsx
4611
- function no(e) {
4612
- let { step: t } = e, n = to(t.step_type).component;
4640
+ function ao(e) {
4641
+ let { step: t } = e, n = io(t.step_type).component;
4613
4642
  return /* @__PURE__ */ h(n, { ...e });
4614
4643
  }
4615
4644
  //#endregion
4616
4645
  //#region ../../src/stepHistory.ts
4617
- function ro(e) {
4646
+ function oo(e) {
4618
4647
  let t = e?.attributes?.tools;
4619
4648
  return Array.isArray(t) ? t.map((e) => typeof e?.step_uuid == "string" ? e.step_uuid : null).filter((e) => !!e) : [];
4620
4649
  }
4621
- function io(e) {
4622
- let t = new Set(e.flatMap((e) => [...e.options.map((e) => e.next_step_uuid), ...ro(e)])), n = e.filter((e) => !t.has(e.uuid));
4650
+ function so(e) {
4651
+ let t = new Set(e.flatMap((e) => [...e.options.map((e) => e.next_step_uuid), ...oo(e)])), n = e.filter((e) => !t.has(e.uuid));
4623
4652
  if (n.length === 0 && e.length > 0) {
4624
4653
  let t = 0;
4625
4654
  for (let n = 1; n < e.length; n++) (e[n].order ?? Infinity) < (e[t].order ?? Infinity) && (t = n);
@@ -4627,33 +4656,45 @@ function io(e) {
4627
4656
  }
4628
4657
  return n.map((t) => e.indexOf(t));
4629
4658
  }
4630
- function ao(e, t, n) {
4659
+ function co(e, t, n) {
4631
4660
  let r = e[t[n]]?.uuid;
4632
4661
  if (!r) return null;
4633
4662
  for (let i = n - 1; i >= 0; i--) {
4634
4663
  let n = e[t[i]];
4635
- if (he(n?.options ?? []).some((e) => e.next_step_uuid === r)) return i;
4664
+ if (ye(n?.options ?? []).some((e) => e.next_step_uuid === r)) return i;
4636
4665
  }
4637
4666
  return null;
4638
4667
  }
4639
- function oo(e, t, n) {
4668
+ function lo(e, t, n) {
4640
4669
  if (n === void 0 || n < 0 || n >= t.length) return t;
4641
4670
  let r = n;
4642
4671
  if (e[t[n]]?.step_type === "button") {
4643
- let i = ao(e, t, n);
4644
- for (; r + 1 < t.length && e[t[r + 1]]?.step_type === "button" && ao(e, t, r + 1) === i;) r++;
4672
+ let i = co(e, t, n);
4673
+ for (; r + 1 < t.length && e[t[r + 1]]?.step_type === "button" && co(e, t, r + 1) === i;) r++;
4645
4674
  }
4646
4675
  return t.slice(0, r + 1);
4647
4676
  }
4648
- function* so(e, t) {
4677
+ function uo(e, t) {
4678
+ return (e?.options ?? []).some((e) => e.next_step_uuid === t) || oo(e).includes(t);
4679
+ }
4680
+ function fo(e, t, n = []) {
4681
+ let r = new Set(n), i = [t], a = /* @__PURE__ */ new Set([t]), o = e[t]?.uuid;
4682
+ for (; o;) {
4683
+ let t = o, n = e.flatMap((e, n) => uo(e, t) ? [n] : []), s = n.find((e) => r.has(e)) ?? n[0];
4684
+ if (s === void 0 || a.has(s)) break;
4685
+ i.unshift(s), a.add(s), o = e[s].uuid;
4686
+ }
4687
+ return i;
4688
+ }
4689
+ function* po(e, t) {
4649
4690
  let n = 0;
4650
4691
  for (; n < t.length;) {
4651
4692
  if (e[t[n]]?.step_type !== "button") {
4652
4693
  n++;
4653
4694
  continue;
4654
4695
  }
4655
- let r = n, i = ao(e, t, n);
4656
- for (n++; n < t.length && e[t[n]]?.step_type === "button" && ao(e, t, n) === i;) n++;
4696
+ let r = n, i = co(e, t, n);
4697
+ for (n++; n < t.length && e[t[n]]?.step_type === "button" && co(e, t, n) === i;) n++;
4657
4698
  yield {
4658
4699
  start: r,
4659
4700
  end: n,
@@ -4661,12 +4702,12 @@ function* so(e, t) {
4661
4702
  };
4662
4703
  }
4663
4704
  }
4664
- function co(e, t) {
4705
+ function mo(e, t) {
4665
4706
  let n = /* @__PURE__ */ new Set(), r = t.map((n, r) => {
4666
- let i = e[n], a = /* @__PURE__ */ new Set([...(i?.options ?? []).map((e) => e.next_step_uuid), ...ro(i)]);
4707
+ let i = e[n], a = /* @__PURE__ */ new Set([...(i?.options ?? []).map((e) => e.next_step_uuid), ...oo(i)]);
4667
4708
  return t.slice(r + 1).some((t) => a.has(e[t]?.uuid));
4668
4709
  }), i = /* @__PURE__ */ new Set();
4669
- for (let { start: a, end: o, parent: s } of so(e, t)) {
4710
+ for (let { start: a, end: o, parent: s } of po(e, t)) {
4670
4711
  let e = !1;
4671
4712
  for (let t = a; t < o; t++) e ||= r[t];
4672
4713
  if (e) for (let e = a; e < o; e++) n.add(e);
@@ -4678,20 +4719,20 @@ function co(e, t) {
4678
4719
  }
4679
4720
  //#endregion
4680
4721
  //#region ../../src/flowConversation.tsx
4681
- var lo = /* @__PURE__ */ new Set();
4682
- function uo(e, t) {
4722
+ var ho = /* @__PURE__ */ new Set();
4723
+ function go(e, t) {
4683
4724
  if (e.leadbot?.keep_open_on_navigation !== !0) return null;
4684
- let n = ga(t);
4725
+ let n = ya(t);
4685
4726
  if (!n) return null;
4686
4727
  let r = n.map((t) => e.steps.findIndex((e) => e.uuid === t));
4687
4728
  return r.every((e) => e !== -1) ? r : null;
4688
4729
  }
4689
- function fo({ config: e, active: t, sessionScope: n, restoredStepHistory: r, typingIndicator: i = !0, resetRef: a, openIntent: o, clearOpenIntent: l }) {
4690
- let u = ge(e), p = e.leadbot?.keep_open_on_navigation === !0, g = e.leadbot?.hide_historical_steps === !0, [_, v] = d(r ?? []), [y, x] = d(!1), S = f(null), C = f([]), w = f(!1), T = ee(), { t: E } = Bn(e.leadbot?.language), D = m(() => e.steps.map((e) => e.uuid), [e.steps]), O = () => {
4730
+ function _o({ config: e, active: t, sessionScope: n, restoredStepHistory: r, typingIndicator: i = !0, resetRef: a, openIntent: o, clearOpenIntent: l }) {
4731
+ let u = be(e), p = e.leadbot?.keep_open_on_navigation === !0, g = e.leadbot?.hide_historical_steps === !0, [_, v] = d(r ?? []), [y, b] = d(!1), S = f(null), C = f([]), w = f(!1), T = j(), { t: E } = Hn(e.leadbot?.language), D = m(() => e.steps.map((e) => e.uuid), [e.steps]), O = () => {
4691
4732
  for (let e of C.current) window.clearTimeout(e);
4692
- C.current = [];
4733
+ C.current = [], b(!1);
4693
4734
  }, k = c(() => {
4694
- O(), x(!1), v([]), _a(u, n, D);
4735
+ O(), v([]), ba(u, n, D);
4695
4736
  }, [
4696
4737
  u,
4697
4738
  n,
@@ -4702,16 +4743,16 @@ function fo({ config: e, active: t, sessionScope: n, restoredStepHistory: r, typ
4702
4743
  a.current = void 0;
4703
4744
  };
4704
4745
  }, [a, k]);
4705
- let [A, j] = d(null);
4746
+ let [A, ee] = d(null);
4706
4747
  s(() => {
4707
- p || _a(u, n, D);
4748
+ p || ba(u, n, D);
4708
4749
  }, [
4709
4750
  p,
4710
4751
  u,
4711
4752
  n,
4712
4753
  D
4713
4754
  ]), s(() => {
4714
- p && (!t || _.length === 0 || ha(n, _.map((t) => e.steps[t]?.uuid).filter((e) => !!e)));
4755
+ p && (!t || _.length === 0 || va(n, _.map((t) => e.steps[t]?.uuid).filter((e) => !!e)));
4715
4756
  }, [
4716
4757
  e.steps,
4717
4758
  n,
@@ -4723,16 +4764,16 @@ function fo({ config: e, active: t, sessionScope: n, restoredStepHistory: r, typ
4723
4764
  }, [t]), s(() => O, []);
4724
4765
  let M = (e) => {
4725
4766
  if (!e) return;
4726
- let t = to(e.step_type), n = he(e.options);
4767
+ let t = io(e.step_type), n = ye(e.options);
4727
4768
  if (!t?.autoAdvance || n.length === 0) return;
4728
4769
  let r = e.attributes?.timer_next_action_enabled ? e.attributes.timer_next_action ?? 0 : 0, a = () => {
4729
4770
  let e = n.map((e) => e.next_step_uuid).filter((e) => !!e);
4730
- e.length > 0 && N(e);
4771
+ e.length > 0 && ne(e);
4731
4772
  };
4732
4773
  if (r > 0) {
4733
- i && x(!0);
4774
+ i && b(!0);
4734
4775
  let e = window.setTimeout(() => {
4735
- x(!1), a();
4776
+ b(!1), a();
4736
4777
  }, r);
4737
4778
  C.current.push(e);
4738
4779
  } else a();
@@ -4740,20 +4781,20 @@ function fo({ config: e, active: t, sessionScope: n, restoredStepHistory: r, typ
4740
4781
  let r = !w.current;
4741
4782
  w.current = !0;
4742
4783
  try {
4743
- v((r) => [...oo(e.steps, r, n), ...t]), r && O();
4784
+ v((r) => [...lo(e.steps, r, n), ...t]), r && O();
4744
4785
  for (let n of t) M(e.steps[n]);
4745
4786
  } finally {
4746
4787
  r && (w.current = !1);
4747
4788
  }
4748
- }, N = (t, n) => {
4789
+ }, ne = (t, n) => {
4749
4790
  if (!t || Array.isArray(t) && t.length === 0) return;
4750
4791
  let r = (Array.isArray(t) ? t : [t]).map((t) => e.steps.findIndex((e) => e.uuid === t)).filter((e) => e !== -1);
4751
4792
  if (r.length !== 0) {
4752
4793
  if (n !== void 0 && i) {
4753
- x(!0);
4794
+ b(!0);
4754
4795
  let e = window.setTimeout(() => {
4755
- x(!1), te(r, n);
4756
- }, b);
4796
+ b(!1), te(r, n);
4797
+ }, x);
4757
4798
  C.current.push(e);
4758
4799
  return;
4759
4800
  }
@@ -4762,7 +4803,7 @@ function fo({ config: e, active: t, sessionScope: n, restoredStepHistory: r, typ
4762
4803
  };
4763
4804
  s(() => {
4764
4805
  if (!t || _.length > 0) return;
4765
- let n = io(e.steps);
4806
+ let n = so(e.steps);
4766
4807
  n.length !== 0 && (v(n), M(e.steps[n[0]]));
4767
4808
  }, [
4768
4809
  e.steps,
@@ -4774,7 +4815,7 @@ function fo({ config: e, active: t, sessionScope: n, restoredStepHistory: r, typ
4774
4815
  let n = e.steps.findIndex((e) => e.uuid === o.stepUuid);
4775
4816
  if (n === -1) return;
4776
4817
  let r = _.lastIndexOf(n), i = r !== -1;
4777
- e.steps[n].step_type === "chatbot" && (!i || F(n, r)) && j(o), i || N(o.stepUuid);
4818
+ e.steps[n].step_type === "chatbot" && (!i || P(n, r)) && ee(o), i || (O(), v((t) => [...t, ...fo(e.steps, n, t).filter((e) => !t.includes(e))]), M(e.steps[n]));
4778
4819
  }, [
4779
4820
  l,
4780
4821
  e.steps,
@@ -4782,39 +4823,39 @@ function fo({ config: e, active: t, sessionScope: n, restoredStepHistory: r, typ
4782
4823
  o,
4783
4824
  _
4784
4825
  ]);
4785
- let P = f(!1);
4826
+ let N = f(!1);
4786
4827
  s(() => {
4787
- if (!t || P.current || (P.current = !0, !r || r.length === 0)) return;
4828
+ if (!t || N.current || (N.current = !0, !r || r.length === 0)) return;
4788
4829
  let n = e.steps[r[r.length - 1]];
4789
4830
  if (!n) return;
4790
4831
  let i = new Set(r.map((t) => e.steps[t]?.uuid));
4791
- he(n.options).some((e) => e.next_step_uuid && i.has(e.next_step_uuid)) || M(n);
4832
+ ye(n.options).some((e) => e.next_step_uuid && i.has(e.next_step_uuid)) || M(n);
4792
4833
  }, [t]), s(() => {
4793
4834
  S.current && (S.current.scrollTop = S.current.scrollHeight);
4794
4835
  }, [_, y]);
4795
- let F = (t, n) => {
4836
+ let P = (t, n) => {
4796
4837
  let r = e.steps[t], i = new Set(r?.options?.map((e) => e.next_step_uuid) ?? []);
4797
4838
  return !_.slice(n + 1).some((t) => i.has(e.steps[t]?.uuid));
4798
- }, I = m(() => g ? co(e.steps, _) : lo, [
4839
+ }, F = m(() => g ? mo(e.steps, _) : ho, [
4799
4840
  g,
4800
4841
  e.steps,
4801
4842
  _
4802
- ]), L = m(() => {
4843
+ ]), I = m(() => {
4803
4844
  let t = /* @__PURE__ */ new Map();
4804
- for (let { start: n, end: r } of so(e.steps, _)) t.set(n, r);
4845
+ for (let { start: n, end: r } of po(e.steps, _)) t.set(n, r);
4805
4846
  return t;
4806
- }, [e.steps, _]), R = (t, n) => /* @__PURE__ */ h("div", {
4847
+ }, [e.steps, _]), re = (t, n) => /* @__PURE__ */ h("div", {
4807
4848
  className: "leadbot-step-wrapper leadbot-step-buttons leadbot-step-current",
4808
4849
  children: /* @__PURE__ */ h("div", {
4809
4850
  className: "leadbot-options",
4810
4851
  children: _.slice(t, n).map((n, r) => {
4811
4852
  let i = e.steps[n], a = t + r;
4812
- return /* @__PURE__ */ h(no, {
4853
+ return /* @__PURE__ */ h(ao, {
4813
4854
  step: i,
4814
4855
  config: e,
4815
- isCurrent: F(n, a),
4856
+ isCurrent: P(n, a),
4816
4857
  isFirstStep: !1,
4817
- onOptionSelect: (e) => N(e, a),
4858
+ onOptionSelect: (e) => ne(e, a),
4818
4859
  analyticsTracker: T
4819
4860
  }, `${i.uuid}-${a}`);
4820
4861
  })
@@ -4828,28 +4869,28 @@ function fo({ config: e, active: t, sessionScope: n, restoredStepHistory: r, typ
4828
4869
  children: [(() => {
4829
4870
  let t = [], n = _.findIndex((t) => e.steps[t]?.step_type !== "start"), r = 0;
4830
4871
  for (; r < _.length;) {
4831
- let i = L.get(r);
4872
+ let i = I.get(r);
4832
4873
  if (i !== void 0) {
4833
- I.has(r) || t.push(R(r, i)), r = i;
4874
+ F.has(r) || t.push(re(r, i)), r = i;
4834
4875
  continue;
4835
4876
  }
4836
4877
  let a = e.steps[_[r]];
4837
- if (!a || I.has(r)) {
4878
+ if (!a || F.has(r)) {
4838
4879
  r++;
4839
4880
  continue;
4840
4881
  }
4841
- let o = F(_[r], r);
4882
+ let o = P(_[r], r);
4842
4883
  t.push(/* @__PURE__ */ h("div", {
4843
- className: `leadbot-step-wrapper ${o ? "leadbot-step-current" : ""}`,
4844
- children: /* @__PURE__ */ h(no, {
4884
+ className: `leadbot-step-wrapper ${a.step_type === "chatbot" ? "leadbot-step-wrapper--chat" : ""} ${o ? "leadbot-step-current" : ""}`,
4885
+ children: /* @__PURE__ */ h(ao, {
4845
4886
  step: a,
4846
4887
  config: e,
4847
4888
  isCurrent: o,
4848
4889
  isFirstStep: r === n,
4849
- onOptionSelect: (e) => N(e, r),
4890
+ onOptionSelect: (e) => ne(e, r),
4850
4891
  analyticsTracker: T,
4851
4892
  pendingMessage: A?.stepUuid === a.uuid ? A.message : void 0,
4852
- onPendingMessageConsumed: () => j(null)
4893
+ onPendingMessageConsumed: () => ee(null)
4853
4894
  })
4854
4895
  }, `${a.uuid}-${r}`)), r++;
4855
4896
  }
@@ -4872,51 +4913,51 @@ function fo({ config: e, active: t, sessionScope: n, restoredStepHistory: r, typ
4872
4913
  }
4873
4914
  //#endregion
4874
4915
  //#region ../../src/utils/iconSetup.svg.ts
4875
- function po(e, t) {
4916
+ function vo(e, t) {
4876
4917
  return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e}" aria-hidden="true" focusable="false" fill="currentColor">${t}</svg>`;
4877
4918
  }
4878
- function mo(e) {
4919
+ function yo(e) {
4879
4920
  return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">${e}</svg>`;
4880
4921
  }
4881
- function ho(e = "", t = !1) {
4882
- return mo(`${t ? "<path d=\"M20 3.5H10a2 2 0 0 0-2 2v3\" opacity=\"0.5\"/>" : ""}<path d="M4 6.5h14a2 2 0 0 1 2 2V15a2 2 0 0 1-2 2H10l-4.5 3.5V17H4a2 2 0 0 1-2-2V8.5a2 2 0 0 1 2-2Z"/>${e}`);
4883
- }
4884
- var go = "<path d=\"M6.5 10.5h9M6.5 13.5h6\"/>", _o = "<path d=\"M8.5 12s.9 1.5 2.5 1.5 2.5-1.5 2.5-1.5\"/><circle cx=\"8.3\" cy=\"10\" r=\"0.6\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"12.7\" cy=\"10\" r=\"0.6\" fill=\"currentColor\" stroke=\"none\"/>", vo = "<path d=\"M9.5 9.5v3\"/><circle cx=\"9.5\" cy=\"14.5\" r=\"0.75\" fill=\"currentColor\" stroke=\"none\"/>";
4885
- Te({
4886
- "fal fa-paperclip": mo("<path d=\"M16.5 6.5 8.7 14.3a3 3 0 1 0 4.2 4.2l7.4-7.4a5 5 0 1 0-7.1-7.1L5.8 11.4a7 7 0 0 0 9.9 9.9\"/>"),
4887
- "fal fa-paper-plane": mo("<path d=\"M21 3 3 10.5l7.5 3L13.5 21 21 3Z\"/><path d=\"M10.5 13.5 21 3\"/>"),
4888
- "fal fa-phone": mo("<path d=\"M6.6 10.8c1.4 2.8 3.8 5.2 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.3 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.9 21 3 13.1 3 3.7c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8Z\"/>"),
4889
- "fal fa-envelope": mo("<rect x=\"3\" y=\"5.5\" width=\"18\" height=\"13\" rx=\"2\"/><path d=\"m3.5 6.5 8.5 7 8.5-7\"/>"),
4890
- "fab fa-whatsapp": po("0 0 448 512", "<path d=\"M380.9 97.1c-41.9-42-97.7-65.1-157-65.1-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480 117.7 449.1c32.4 17.7 68.9 27 106.1 27l.1 0c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3 18.6-68.1-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1s56.2 81.2 56.1 130.5c0 101.8-84.9 184.6-186.6 184.6zM325.1 300.5c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8s-14.3 18-17.6 21.8c-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7 .9-6.9-.5-9.7s-12.5-30.1-17.1-41.2c-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2s-9.7 1.4-14.8 6.9c-5.1 5.6-19.4 19-19.4 46.3s19.9 53.7 22.6 57.4c2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4s4.6-24.1 3.2-26.4c-1.3-2.5-5-3.9-10.5-6.6z\"/>"),
4891
- "fal fa-comment": ho(),
4892
- "fal fa-comment-lines": ho(go),
4893
- "fal fa-comment-smile": ho(_o),
4894
- "fal fa-comments": ho("", !0),
4895
- "fal fa-comment-exclamation": ho(vo),
4896
- "fal fa-comment-alt": ho(),
4897
- "fal fa-comment-alt-lines": ho(go),
4898
- "fal fa-comment-alt-smile": ho(_o),
4899
- "fal fa-comments-alt": ho("", !0),
4900
- "fal fa-comment-alt-exclamation": ho(vo),
4901
- "fal fa-rotate-left": mo("<path d=\"M4 9.5A8 8 0 1 1 5 15\"/><path d=\"M4 4v5.5h5.5\"/>"),
4902
- "fal fa-thumbs-up": mo("<path d=\"M7 21H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h3m0 11V10m0 11 5.4-.1c1.9 0 3.6-1.1 4.3-2.9l2.1-5.4a1.6 1.6 0 0 0-1.5-2.2h-4.7l.7-4.2a2.1 2.1 0 0 0-3.8-1.6L7 10\"/>"),
4903
- "fal fa-thumbs-down": mo("<path d=\"M17 3h3a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-3M17 3v11m0-11-5.4.1c-1.9 0-3.6 1.1-4.3 2.9l-2.1 5.4a1.6 1.6 0 0 0 1.5 2.2h4.7l-.7 4.2a2.1 2.1 0 0 0 3.8 1.6L17 14\"/>"),
4904
- "fa-kit fa-leadbot": po("0 0 448 512", "<path d=\"M4 452.4c31.6 31.2 74.2 60.3 120.6 59.5 33-.5 63.7-20.2 69.8-54 8.2-45.2-20.9-89-49.7-121-19-21.1-40.6-40.6-63.7-57.2-13.3-9.5-28.9-19.6-45.4-22.6-13.8-2.5-28.7 1.1-33.7 15.7-4.5 13.2 1.5 28 7.4 39.7 10.1 20.3 25.1 38.5 40.3 55.2 19.5 21.7 40.9 41.7 64.8 58.7 34 24.1 75.4 43 117.9 42.3 32.3-.5 63.9-13.7 82-41.3 19.5-29.8 17.1-68.6 5.6-100.8-18.7-52.4-57.2-94.5-97.1-132.1-19.3-18.2-39.3-35.5-60.5-51.4-14.4-10.8-29.5-21.2-45.8-29.1-17.8-8.6-49.2-20-61.3 3.5-5.2 10.2-3.3 22.6 .1 33 5 14.9 12.9 28.7 21.5 41.7 29.3 44.4 67.1 85.1 106.5 120.6 36.2 32.6 77.8 62 124.8 76.8 30.9 9.8 66.3 12.7 96.1-2.3 26.8-13.5 40.9-40.7 43.3-69.7 3.2-38.7-13.4-77.8-32.8-110.3-29.8-49.9-71.5-92.7-115.4-130.4-33.1-28.3-69.7-56-111.4-70.5-12.2-4.3-25.7-7.3-38.7-6.3-7.3 .5-13.5 5.8-13.5 13.5 0 6.9 6.2 14 13.5 13.5 2.3-.2 4.6-.2 6.9-.1 1.2 .1 2.5 .2 3.7 .3 3.9 .3-1.7-.5 2.3 .3 6.3 1.2 12.5 2.8 18.6 4.9 13.5 4.7 28.2 12.4 42.1 21 42.8 26.4 81 61.2 115.2 97.8 30.3 32.5 59 70.1 73.9 112 2.8 7.8 5.1 15.8 6.7 23.9 1.5 7.6 2.1 11.4 2.2 20.2 .1 3.2 0 6.5-.3 9.7-.1 1.6-.3 3.1-.5 4.6 .4-3.2-.4 2.2-.6 3.1-.6 2.8-1.3 5.7-2.2 8.4-.4 1.3-.9 2.7-1.4 4-.2 .6-1 2.4 .2-.3-.3 .8-.7 1.6-1.1 2.3-1.2 2.4-2.5 4.8-3.9 7.1-.8 1.3-1.7 2.5-2.5 3.7 1.9-2.6-.6 .7-1.3 1.5-1.8 2-3.7 3.7-5.6 5.5-.5 .4-1 .8-1.5 1.3-1.4 1.2 1.9-1.4 .4-.3-1.2 .9-2.4 1.7-3.7 2.6-2.3 1.5-4.6 2.8-7.1 4-.9 .4-4.3 1.8-1.5 .7-1.6 .6-3.3 1.3-5 1.8-2.8 .9-5.6 1.6-8.5 2.2-1.5 .3-3 .6-4.5 .8-2.6 .4-.3 .1 .2 0-1.2 .1-2.3 .3-3.5 .4-15.7 1.3-26.9-.2-41.2-3.9-18.2-4.6-34.7-11.7-51.1-20.7-44.9-24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2.9s-.4-.9-.6-1.4c-.8-1.6 1.2 3.1 .4 .8-1.8-4.8-3.3-9.6-4.4-14.6-.3-1.4-.5-2.9-.8-4.4s-.5-.8 0 .5c-.2-.8-.3-1.7-.3-2.5-.3-3.2-.5-6.5-.5-9.8s0-7.1 .5-10.7c0-1 .2-2.1 .4-3.1-.2 2.2-.2 1.1 0-.3 .3-2.1 .7-4.1 1.1-6.2 .9-4.3 2-8.4 3.3-12.6 .7-2.2 1.4-4.3 2.2-6.4 .4-1.1 .8-2.2 1.2-3.2l1.1-2.9c.4-1.1 2.3-5.3 3.5-7.6s2.7-5.6 4.2-8.3c3.2-5.9 6.7-11.7 10.4-17.4 9.1-13.5 19.2-26.3 30.3-38.2 2.3-2.4 3.6-5.6 3.6-9s-1.3-6.6-3.6-9c-2.4-2.4-5.6-3.7-9-3.7s-6.6 1.3-9 3.7l.3 .1zm-14.3 255c1.4 50.6 5.4 103.2 22.2 151.4 10.2 29.1 25.7 56.7 51.1 75.1 18.8 13.6 41.8 19.2 64.7 20.4 42.7 2.2 84.7-12 112.8-45.1 28.9-34 41.1-78.2 46.2-121.8 .6-5.4 1.1-10.8 1.5-16.2l-9.4 12.2c24.8-8.6 49-28.4 48.3-57.1-.1-6.8-1.7-13.5-4.8-19.5s-7.6-11.3-13-15.3c-5.7-3.8-12.2-6.2-18.9-7.2s-13.7-.4-20.2 1.6l16.1 12.3c-1.5-15.2-4.6-30.2-9.1-44.8-4.3-12.5-10.8-24.1-19.2-34.4-12.9-16.5-31.2-27.9-51.7-32.1-36.6-6.8-71.3 9.8-102.2 27.6-28.9 16.6-61.3 38.4-96.4 32.6-3.2-.8-6.7-.3-9.6 1.3s-5.1 4.3-6.1 7.5c-1.7 6.1 2.1 14.5 8.9 15.6 33.5 5.5 64.2-6 93.1-22 13.6-7.5 26.8-15.6 40.6-22.9 11.5-5.9 23.6-10.5 36.2-13.8 2.4-.6 4.8-1.3 7.2-1.7l1.7-.3c2-.4-3.3 .4-1.2 0 1.4 0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8-.9-7.2-1.4-4.9-1.1-9.7-2.6-14.3-4.4l-1.6-.7c-.4 0 2.9 1.3 .5 .2l-3.5-1.7c-2.3-1.1-4.5-2.4-6.7-3.7s-4.6-3-6.8-4.6-.6 0 .5 .4c-.6-.3-1.1-.8-1.5-1.2l-3.2-2.8c-4.4-4-8.5-8.3-12.2-13-1.1-1.4-.8-1.2 0 .2l-1.6-2.1c-1-1.4-1.9-2.7-2.9-4.1-1.9-2.9-3.7-5.7-5.4-8.7s-3.6-6.6-5.2-10.1c-.8-1.6-1.6-3.3-2.3-5-.2-.4-1.3-3.1-.7-1.5s-.6-1.5-.8-2.1c-7-18-12.2-36.6-15.6-55.6-2.3-12-3.9-22.2-5-33.6-1.6-13.8-2.6-27.6-3.4-41.4-.4-7.8-.7-15.6-.9-23.5-.1-3.3-1.4-6.5-3.8-8.9s-5.6-3.7-8.9-3.8c-3.4 0-6.6 1.4-9 3.8s-3.7 5.6-3.8 9l.1 .2z\"/>"),
4906
- "__internal-chevron-right": mo("<path d=\"m9 6 6 6-6 6\"/>")
4922
+ function bo(e = "", t = !1) {
4923
+ return yo(`${t ? "<path d=\"M20 3.5H10a2 2 0 0 0-2 2v3\" opacity=\"0.5\"/>" : ""}<path d="M4 6.5h14a2 2 0 0 1 2 2V15a2 2 0 0 1-2 2H10l-4.5 3.5V17H4a2 2 0 0 1-2-2V8.5a2 2 0 0 1 2-2Z"/>${e}`);
4924
+ }
4925
+ var xo = "<path d=\"M6.5 10.5h9M6.5 13.5h6\"/>", So = "<path d=\"M8.5 12s.9 1.5 2.5 1.5 2.5-1.5 2.5-1.5\"/><circle cx=\"8.3\" cy=\"10\" r=\"0.6\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"12.7\" cy=\"10\" r=\"0.6\" fill=\"currentColor\" stroke=\"none\"/>", Co = "<path d=\"M9.5 9.5v3\"/><circle cx=\"9.5\" cy=\"14.5\" r=\"0.75\" fill=\"currentColor\" stroke=\"none\"/>";
4926
+ Ae({
4927
+ "fal fa-paperclip": yo("<path d=\"M16.5 6.5 8.7 14.3a3 3 0 1 0 4.2 4.2l7.4-7.4a5 5 0 1 0-7.1-7.1L5.8 11.4a7 7 0 0 0 9.9 9.9\"/>"),
4928
+ "fal fa-paper-plane": yo("<path d=\"M21 3 3 10.5l7.5 3L13.5 21 21 3Z\"/><path d=\"M10.5 13.5 21 3\"/>"),
4929
+ "fal fa-phone": yo("<path d=\"M6.6 10.8c1.4 2.8 3.8 5.2 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.3 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.9 21 3 13.1 3 3.7c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8Z\"/>"),
4930
+ "fal fa-envelope": yo("<rect x=\"3\" y=\"5.5\" width=\"18\" height=\"13\" rx=\"2\"/><path d=\"m3.5 6.5 8.5 7 8.5-7\"/>"),
4931
+ "fab fa-whatsapp": vo("0 0 448 512", "<path d=\"M380.9 97.1c-41.9-42-97.7-65.1-157-65.1-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480 117.7 449.1c32.4 17.7 68.9 27 106.1 27l.1 0c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3 18.6-68.1-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1s56.2 81.2 56.1 130.5c0 101.8-84.9 184.6-186.6 184.6zM325.1 300.5c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8s-14.3 18-17.6 21.8c-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7 .9-6.9-.5-9.7s-12.5-30.1-17.1-41.2c-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2s-9.7 1.4-14.8 6.9c-5.1 5.6-19.4 19-19.4 46.3s19.9 53.7 22.6 57.4c2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4s4.6-24.1 3.2-26.4c-1.3-2.5-5-3.9-10.5-6.6z\"/>"),
4932
+ "fal fa-comment": bo(),
4933
+ "fal fa-comment-lines": bo(xo),
4934
+ "fal fa-comment-smile": bo(So),
4935
+ "fal fa-comments": bo("", !0),
4936
+ "fal fa-comment-exclamation": bo(Co),
4937
+ "fal fa-comment-alt": bo(),
4938
+ "fal fa-comment-alt-lines": bo(xo),
4939
+ "fal fa-comment-alt-smile": bo(So),
4940
+ "fal fa-comments-alt": bo("", !0),
4941
+ "fal fa-comment-alt-exclamation": bo(Co),
4942
+ "fal fa-rotate-left": yo("<path d=\"M4 9.5A8 8 0 1 1 5 15\"/><path d=\"M4 4v5.5h5.5\"/>"),
4943
+ "fal fa-thumbs-up": yo("<path d=\"M7 21H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h3m0 11V10m0 11 5.4-.1c1.9 0 3.6-1.1 4.3-2.9l2.1-5.4a1.6 1.6 0 0 0-1.5-2.2h-4.7l.7-4.2a2.1 2.1 0 0 0-3.8-1.6L7 10\"/>"),
4944
+ "fal fa-thumbs-down": yo("<path d=\"M17 3h3a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-3M17 3v11m0-11-5.4.1c-1.9 0-3.6 1.1-4.3 2.9l-2.1 5.4a1.6 1.6 0 0 0 1.5 2.2h4.7l-.7 4.2a2.1 2.1 0 0 0 3.8 1.6L17 14\"/>"),
4945
+ "fa-kit fa-leadbot": vo("0 0 448 512", "<path d=\"M4 452.4c31.6 31.2 74.2 60.3 120.6 59.5 33-.5 63.7-20.2 69.8-54 8.2-45.2-20.9-89-49.7-121-19-21.1-40.6-40.6-63.7-57.2-13.3-9.5-28.9-19.6-45.4-22.6-13.8-2.5-28.7 1.1-33.7 15.7-4.5 13.2 1.5 28 7.4 39.7 10.1 20.3 25.1 38.5 40.3 55.2 19.5 21.7 40.9 41.7 64.8 58.7 34 24.1 75.4 43 117.9 42.3 32.3-.5 63.9-13.7 82-41.3 19.5-29.8 17.1-68.6 5.6-100.8-18.7-52.4-57.2-94.5-97.1-132.1-19.3-18.2-39.3-35.5-60.5-51.4-14.4-10.8-29.5-21.2-45.8-29.1-17.8-8.6-49.2-20-61.3 3.5-5.2 10.2-3.3 22.6 .1 33 5 14.9 12.9 28.7 21.5 41.7 29.3 44.4 67.1 85.1 106.5 120.6 36.2 32.6 77.8 62 124.8 76.8 30.9 9.8 66.3 12.7 96.1-2.3 26.8-13.5 40.9-40.7 43.3-69.7 3.2-38.7-13.4-77.8-32.8-110.3-29.8-49.9-71.5-92.7-115.4-130.4-33.1-28.3-69.7-56-111.4-70.5-12.2-4.3-25.7-7.3-38.7-6.3-7.3 .5-13.5 5.8-13.5 13.5 0 6.9 6.2 14 13.5 13.5 2.3-.2 4.6-.2 6.9-.1 1.2 .1 2.5 .2 3.7 .3 3.9 .3-1.7-.5 2.3 .3 6.3 1.2 12.5 2.8 18.6 4.9 13.5 4.7 28.2 12.4 42.1 21 42.8 26.4 81 61.2 115.2 97.8 30.3 32.5 59 70.1 73.9 112 2.8 7.8 5.1 15.8 6.7 23.9 1.5 7.6 2.1 11.4 2.2 20.2 .1 3.2 0 6.5-.3 9.7-.1 1.6-.3 3.1-.5 4.6 .4-3.2-.4 2.2-.6 3.1-.6 2.8-1.3 5.7-2.2 8.4-.4 1.3-.9 2.7-1.4 4-.2 .6-1 2.4 .2-.3-.3 .8-.7 1.6-1.1 2.3-1.2 2.4-2.5 4.8-3.9 7.1-.8 1.3-1.7 2.5-2.5 3.7 1.9-2.6-.6 .7-1.3 1.5-1.8 2-3.7 3.7-5.6 5.5-.5 .4-1 .8-1.5 1.3-1.4 1.2 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0 0l-3.2 2.3c-3.9 2.7-8 5.2-12.3 7.4-2.1 1.1-4.2 2.1-6.3 3 2-.9-1.3 .5-1.9 .8l-3.9 1.4c-4.9 1.7-9.9 3.1-15 4.1-1.3 .2-2.5 .5-3.9 .7l-2.9 .5c-1.3 0-5.9 .6-8.4 .8-4.5 .3-9 .4-13.5 .4s-9.9-.3-14.8-.9c-.8 0-4.6-.5-2-.2s-1.7-.3-2.6-.4c-2.4-.4-4.8-.9-7.2-1.4-4.9-1.1-9.7-2.6-14.3-4.4l-1.6-.7c-.4 0 2.9 1.3 .5 .2l-3.5-1.7c-2.3-1.1-4.5-2.4-6.7-3.7s-4.6-3-6.8-4.6-.6 0 .5 .4c-.6-.3-1.1-.8-1.5-1.2l-3.2-2.8c-4.4-4-8.5-8.3-12.2-13-1.1-1.4-.8-1.2 0 .2l-1.6-2.1c-1-1.4-1.9-2.7-2.9-4.1-1.9-2.9-3.7-5.7-5.4-8.7s-3.6-6.6-5.2-10.1c-.8-1.6-1.6-3.3-2.3-5-.2-.4-1.3-3.1-.7-1.5s-.6-1.5-.8-2.1c-7-18-12.2-36.6-15.6-55.6-2.3-12-3.9-22.2-5-33.6-1.6-13.8-2.6-27.6-3.4-41.4-.4-7.8-.7-15.6-.9-23.5-.1-3.3-1.4-6.5-3.8-8.9s-5.6-3.7-8.9-3.8c-3.4 0-6.6 1.4-9 3.8s-3.7 5.6-3.8 9l.1 .2z\"/>"),
4947
+ "__internal-chevron-right": yo("<path d=\"m9 6 6 6-6 6\"/>")
4907
4948
  });
4908
4949
  //#endregion
4909
4950
  //#region ../../src/embeddedFlow.tsx
4910
- function yo(e) {
4951
+ function wo(e) {
4911
4952
  return !!e?.styling && Array.isArray(e?.steps);
4912
4953
  }
4913
- function bo({ config: e, sessionScope: t, baseColor: n, typingIndicator: r }) {
4914
- let [i] = d(() => yo(e) ? uo(e, t) : null);
4915
- return yo(e) ? /* @__PURE__ */ h(le, { children: /* @__PURE__ */ h("div", {
4954
+ function To({ config: e, sessionScope: t, baseColor: n, typingIndicator: r }) {
4955
+ let [i] = d(() => wo(e) ? go(e, t) : null);
4956
+ return wo(e) ? /* @__PURE__ */ h(fe, { children: /* @__PURE__ */ h("div", {
4916
4957
  className: "leadbot-flow-conversation",
4917
4958
  lang: e.leadbot?.language || void 0,
4918
4959
  style: { "--leadbot-primary": n || e.styling.base_color || "#2563eb" },
4919
- children: /* @__PURE__ */ h(fo, {
4960
+ children: /* @__PURE__ */ h(_o, {
4920
4961
  config: e,
4921
4962
  active: !0,
4922
4963
  sessionScope: t,
@@ -4927,21 +4968,21 @@ function bo({ config: e, sessionScope: t, baseColor: n, typingIndicator: r }) {
4927
4968
  }
4928
4969
  //#endregion
4929
4970
  //#region src/flow.ts
4930
- function xo(e, t) {
4931
- So(e, "--leadbot-flow-max-width", t?.maxWidth), So(e, "--leadbot-flow-align", t?.align);
4971
+ function Eo(e, t) {
4972
+ Do(e, "--leadbot-flow-max-width", t?.maxWidth), Do(e, "--leadbot-flow-align", t?.align);
4932
4973
  }
4933
- function So(e, t, n) {
4974
+ function Do(e, t, n) {
4934
4975
  n ? e.style.setProperty(t, n) : e.style.removeProperty(t);
4935
4976
  }
4936
- function Co(e) {
4977
+ function Oo(e) {
4937
4978
  try {
4938
- return L(e);
4979
+ return re(e);
4939
4980
  } catch {
4940
4981
  return null;
4941
4982
  }
4942
4983
  }
4943
- var wo = "leadbot-flow";
4944
- function To(e) {
4984
+ var ko = "leadbot-flow";
4985
+ function Ao(e) {
4945
4986
  let [n, r] = d(null), [i, a] = d(0);
4946
4987
  s(() => {
4947
4988
  if (!e.path) return N(() => a((e) => e + 1));
@@ -4975,14 +5016,14 @@ function To(e) {
4975
5016
  e = !1;
4976
5017
  };
4977
5018
  }, [g]);
4978
- let v = Co(t(e));
5019
+ let v = Oo(t(e));
4979
5020
  s(() => {
4980
- ve(v);
5021
+ Se(v);
4981
5022
  }, [v]);
4982
5023
  let y = n?.key === g ? n.flow : null;
4983
5024
  if (!y) return null;
4984
5025
  let b = t(e), x = `${b.domainKey ?? "default"}#flow-${b.leadbotId ?? ""}`;
4985
- return u(bo, {
5026
+ return u(To, {
4986
5027
  key: `${i}:${b.leadbotId ?? ""}:${e.path ?? ""}`,
4987
5028
  config: y,
4988
5029
  sessionScope: x,
@@ -4990,17 +5031,17 @@ function To(e) {
4990
5031
  typingIndicator: e.typingIndicator
4991
5032
  });
4992
5033
  }
4993
- function Eo(e, t = {}) {
4994
- e.classList.add(wo), xo(e, t.layout);
4995
- let n = l(To, e, t);
5034
+ function jo(e, t = {}) {
5035
+ e.classList.add(ko), Eo(e, t.layout);
5036
+ let n = l(Ao, e, t);
4996
5037
  return {
4997
5038
  update(t) {
4998
- "layout" in t && xo(e, t.layout), n.update(t);
5039
+ "layout" in t && Eo(e, t.layout), n.update(t);
4999
5040
  },
5000
5041
  destroy() {
5001
- xo(e, void 0), e.classList.remove(wo), n.destroy();
5042
+ Eo(e, void 0), e.classList.remove(ko), n.destroy();
5002
5043
  }
5003
5044
  };
5004
5045
  }
5005
5046
  //#endregion
5006
- export { Eo as n, wo as t };
5047
+ export { jo as n, ko as t };