@connorpham/live-chat-widget 17.0.7 → 17.0.9
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.
- package/debug.log +7 -0
- package/dist/cellcast-bot-widget.es.js +767 -759
- package/dist/cellcast-bot-widget.umd.js +12 -12
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var o0 = Object.defineProperty;
|
|
2
2
|
var d0 = (u, D, f) => D in u ? o0(u, D, { enumerable: !0, configurable: !0, writable: !0, value: f }) : u[D] = f;
|
|
3
3
|
var lD = (u, D, f) => d0(u, typeof D != "symbol" ? D + "" : D, f);
|
|
4
|
-
import sf, { createContext as qu, useRef as
|
|
4
|
+
import sf, { createContext as qu, useRef as gu, useEffect as Z, useContext as Hu, useState as U, useCallback as Mu, useMemo as C0 } from "react";
|
|
5
5
|
var dD = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
6
6
|
function Ff(u) {
|
|
7
7
|
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
8
8
|
}
|
|
9
|
-
var WD = { exports: {} },
|
|
9
|
+
var WD = { exports: {} }, fD = {};
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
@@ -68,12 +68,12 @@ function Xf() {
|
|
|
68
68
|
*/
|
|
69
69
|
var Rf;
|
|
70
70
|
function c0() {
|
|
71
|
-
if (Rf) return
|
|
71
|
+
if (Rf) return fD;
|
|
72
72
|
Rf = 1, Xf();
|
|
73
73
|
var u = sf, D = 60103;
|
|
74
|
-
if (
|
|
74
|
+
if (fD.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
75
75
|
var f = Symbol.for;
|
|
76
|
-
D = f("react.element"),
|
|
76
|
+
D = f("react.element"), fD.Fragment = f("react.fragment");
|
|
77
77
|
}
|
|
78
78
|
var e = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, t = Object.prototype.hasOwnProperty, n = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
79
79
|
function r(s, F, d) {
|
|
@@ -83,7 +83,7 @@ function c0() {
|
|
|
83
83
|
if (s && s.defaultProps) for (o in F = s.defaultProps, F) c[o] === void 0 && (c[o] = F[o]);
|
|
84
84
|
return { $$typeof: D, type: s, key: l, ref: j, props: c, _owner: e.current };
|
|
85
85
|
}
|
|
86
|
-
return
|
|
86
|
+
return fD.jsx = r, fD.jsxs = r, fD;
|
|
87
87
|
}
|
|
88
88
|
var ID = {}, Pf;
|
|
89
89
|
function l0() {
|
|
@@ -100,10 +100,10 @@ function l0() {
|
|
|
100
100
|
D.NODE_ENV !== "production" && function() {
|
|
101
101
|
var f = sf, e = Xf(), t = 60103, n = 60106;
|
|
102
102
|
u.Fragment = 60107;
|
|
103
|
-
var r = 60108, s = 60114, F = 60109, d = 60110, o = 60112, c = 60113, l = 60120, j = 60115,
|
|
103
|
+
var r = 60108, s = 60114, F = 60109, d = 60110, o = 60112, c = 60113, l = 60120, j = 60115, v = 60116, C = 60121, y = 60122, x = 60117, g = 60129, T = 60131;
|
|
104
104
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
105
105
|
var _ = Symbol.for;
|
|
106
|
-
t = _("react.element"), n = _("react.portal"), u.Fragment = _("react.fragment"), r = _("react.strict_mode"), s = _("react.profiler"), F = _("react.provider"), d = _("react.context"), o = _("react.forward_ref"), c = _("react.suspense"), l = _("react.suspense_list"), j = _("react.memo"),
|
|
106
|
+
t = _("react.element"), n = _("react.portal"), u.Fragment = _("react.fragment"), r = _("react.strict_mode"), s = _("react.profiler"), F = _("react.provider"), d = _("react.context"), o = _("react.forward_ref"), c = _("react.suspense"), l = _("react.suspense_list"), j = _("react.memo"), v = _("react.lazy"), C = _("react.block"), y = _("react.server.block"), x = _("react.fundamental"), _("react.scope"), _("react.opaque.id"), g = _("react.debug_trace_mode"), _("react.offscreen"), T = _("react.legacy_hidden");
|
|
107
107
|
}
|
|
108
108
|
var B = typeof Symbol == "function" && Symbol.iterator, I = "@@iterator";
|
|
109
109
|
function P(i) {
|
|
@@ -113,7 +113,7 @@ function l0() {
|
|
|
113
113
|
return typeof b == "function" ? b : null;
|
|
114
114
|
}
|
|
115
115
|
var q = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
116
|
-
function
|
|
116
|
+
function m(i) {
|
|
117
117
|
{
|
|
118
118
|
for (var b = arguments.length, w = new Array(b > 1 ? b - 1 : 0), $ = 1; $ < b; $++)
|
|
119
119
|
w[$ - 1] = arguments[$];
|
|
@@ -132,7 +132,7 @@ function l0() {
|
|
|
132
132
|
}
|
|
133
133
|
var L = !1;
|
|
134
134
|
function hu(i) {
|
|
135
|
-
return !!(typeof i == "string" || typeof i == "function" || i === u.Fragment || i === s || i ===
|
|
135
|
+
return !!(typeof i == "string" || typeof i == "function" || i === u.Fragment || i === s || i === g || i === r || i === c || i === l || i === T || L || typeof i == "object" && i !== null && (i.$$typeof === v || i.$$typeof === j || i.$$typeof === F || i.$$typeof === d || i.$$typeof === o || i.$$typeof === x || i.$$typeof === C || i[0] === y));
|
|
136
136
|
}
|
|
137
137
|
function fu(i, b, w) {
|
|
138
138
|
var $ = b.displayName || b.name || "";
|
|
@@ -144,7 +144,7 @@ function l0() {
|
|
|
144
144
|
function E(i) {
|
|
145
145
|
if (i == null)
|
|
146
146
|
return null;
|
|
147
|
-
if (typeof i.tag == "number" &&
|
|
147
|
+
if (typeof i.tag == "number" && m("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof i == "function")
|
|
148
148
|
return i.displayName || i.name || null;
|
|
149
149
|
if (typeof i == "string")
|
|
150
150
|
return i;
|
|
@@ -176,7 +176,7 @@ function l0() {
|
|
|
176
176
|
return E(i.type);
|
|
177
177
|
case C:
|
|
178
178
|
return E(i._render);
|
|
179
|
-
case
|
|
179
|
+
case v: {
|
|
180
180
|
var $ = i, G = $._payload, K = $._init;
|
|
181
181
|
try {
|
|
182
182
|
return E(K(G));
|
|
@@ -246,7 +246,7 @@ function l0() {
|
|
|
246
246
|
})
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
|
-
h < 0 &&
|
|
249
|
+
h < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
var Cu = q.ReactCurrentDispatcher, _u;
|
|
@@ -336,7 +336,7 @@ function l0() {
|
|
|
336
336
|
} finally {
|
|
337
337
|
ru = !1, Cu.current = K, tu(), Error.prepareStackTrace = G;
|
|
338
338
|
}
|
|
339
|
-
var
|
|
339
|
+
var DD = i ? i.displayName || i.name : "", Nf = DD ? Bu(DD) : "";
|
|
340
340
|
return typeof i == "function" && ou.set(i, Nf), Nf;
|
|
341
341
|
}
|
|
342
342
|
function S(i, b, w) {
|
|
@@ -367,7 +367,7 @@ function l0() {
|
|
|
367
367
|
return cu(i.type, b, w);
|
|
368
368
|
case C:
|
|
369
369
|
return S(i._render);
|
|
370
|
-
case
|
|
370
|
+
case v: {
|
|
371
371
|
var $ = i, G = $._payload, K = $._init;
|
|
372
372
|
try {
|
|
373
373
|
return cu(K(G), b, w);
|
|
@@ -377,13 +377,13 @@ function l0() {
|
|
|
377
377
|
}
|
|
378
378
|
return "";
|
|
379
379
|
}
|
|
380
|
-
var lu = {},
|
|
380
|
+
var lu = {}, mu = q.ReactDebugCurrentFrame;
|
|
381
381
|
function Uu(i) {
|
|
382
382
|
if (i) {
|
|
383
383
|
var b = i._owner, w = cu(i.type, i._source, b ? b.type : null);
|
|
384
|
-
|
|
384
|
+
mu.setExtraStackFrame(w);
|
|
385
385
|
} else
|
|
386
|
-
|
|
386
|
+
mu.setExtraStackFrame(null);
|
|
387
387
|
}
|
|
388
388
|
function K1(i, b, w, $, G) {
|
|
389
389
|
{
|
|
@@ -400,7 +400,7 @@ function l0() {
|
|
|
400
400
|
} catch (nu) {
|
|
401
401
|
H = nu;
|
|
402
402
|
}
|
|
403
|
-
H && !(H instanceof Error) && (Uu(G),
|
|
403
|
+
H && !(H instanceof Error) && (Uu(G), m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", $ || "React class", w, Y, typeof H), Uu(null)), H instanceof Error && !(H.message in lu) && (lu[H.message] = !0, Uu(G), m("Failed %s type: %s", w, H.message), Uu(null));
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
}
|
|
@@ -432,7 +432,7 @@ function l0() {
|
|
|
432
432
|
function Q1(i, b) {
|
|
433
433
|
{
|
|
434
434
|
var w = function() {
|
|
435
|
-
vf || (vf = !0,
|
|
435
|
+
vf || (vf = !0, m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
|
|
436
436
|
};
|
|
437
437
|
w.isReactWarning = !0, Object.defineProperty(i, "key", {
|
|
438
438
|
get: w,
|
|
@@ -443,7 +443,7 @@ function l0() {
|
|
|
443
443
|
function u0(i, b) {
|
|
444
444
|
{
|
|
445
445
|
var w = function() {
|
|
446
|
-
wf || (wf = !0,
|
|
446
|
+
wf || (wf = !0, m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
|
|
447
447
|
};
|
|
448
448
|
w.isReactWarning = !0, Object.defineProperty(i, "ref", {
|
|
449
449
|
get: w,
|
|
@@ -499,7 +499,7 @@ function l0() {
|
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
var ND = q.ReactCurrentOwner, Af = q.ReactDebugCurrentFrame;
|
|
502
|
-
function
|
|
502
|
+
function uD(i) {
|
|
503
503
|
if (i) {
|
|
504
504
|
var b = i._owner, w = cu(i.type, i._source, b ? b.type : null);
|
|
505
505
|
Af.setExtraStackFrame(w);
|
|
@@ -549,7 +549,7 @@ Check the top-level render call using <` + w + ">.");
|
|
|
549
549
|
return;
|
|
550
550
|
kf[w] = !0;
|
|
551
551
|
var $ = "";
|
|
552
|
-
i && i._owner && i._owner !== ND.current && ($ = " It was passed a child from " + E(i._owner.type) + "."),
|
|
552
|
+
i && i._owner && i._owner !== ND.current && ($ = " It was passed a child from " + E(i._owner.type) + "."), uD(i), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', w, $), uD(null);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
function Sf(i, b) {
|
|
@@ -591,9 +591,9 @@ Check the top-level render call using <` + w + ">.");
|
|
|
591
591
|
} else if (b.PropTypes !== void 0 && !OD) {
|
|
592
592
|
OD = !0;
|
|
593
593
|
var G = E(b);
|
|
594
|
-
|
|
594
|
+
m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", G || "Unknown");
|
|
595
595
|
}
|
|
596
|
-
typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved &&
|
|
596
|
+
typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
function r0(i) {
|
|
@@ -601,11 +601,11 @@ Check the top-level render call using <` + w + ">.");
|
|
|
601
601
|
for (var b = Object.keys(i.props), w = 0; w < b.length; w++) {
|
|
602
602
|
var $ = b[w];
|
|
603
603
|
if ($ !== "children" && $ !== "key") {
|
|
604
|
-
|
|
604
|
+
uD(i), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), uD(null);
|
|
605
605
|
break;
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
i.ref !== null && (
|
|
608
|
+
i.ref !== null && (uD(i), m("Invalid attribute `ref` supplied to `React.Fragment`."), uD(null));
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
611
|
function Tf(i, b, w, $, G, K) {
|
|
@@ -617,7 +617,7 @@ Check the top-level render call using <` + w + ">.");
|
|
|
617
617
|
var bu = e0();
|
|
618
618
|
bu ? H += bu : H += xf();
|
|
619
619
|
var nu;
|
|
620
|
-
i === null ? nu = "null" : Array.isArray(i) ? nu = "array" : i !== void 0 && i.$$typeof === t ? (nu = "<" + (E(i.type) || "Unknown") + " />", H = " Did you accidentally export a JSX literal instead of a component?") : nu = typeof i,
|
|
620
|
+
i === null ? nu = "null" : Array.isArray(i) ? nu = "array" : i !== void 0 && i.$$typeof === t ? (nu = "<" + (E(i.type) || "Unknown") + " />", H = " Did you accidentally export a JSX literal instead of a component?") : nu = typeof i, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", nu, H);
|
|
621
621
|
}
|
|
622
622
|
var au = f0(i, b, w, G, K);
|
|
623
623
|
if (au == null)
|
|
@@ -627,11 +627,11 @@ Check the top-level render call using <` + w + ">.");
|
|
|
627
627
|
if ($u !== void 0)
|
|
628
628
|
if ($)
|
|
629
629
|
if (Array.isArray($u)) {
|
|
630
|
-
for (var
|
|
631
|
-
Sf($u[
|
|
630
|
+
for (var DD = 0; DD < $u.length; DD++)
|
|
631
|
+
Sf($u[DD], i);
|
|
632
632
|
Object.freeze && Object.freeze($u);
|
|
633
633
|
} else
|
|
634
|
-
|
|
634
|
+
m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
635
635
|
else
|
|
636
636
|
Sf($u, i);
|
|
637
637
|
}
|
|
@@ -656,9 +656,9 @@ const Zf = qu(void 0), Qf = ({
|
|
|
656
656
|
children: u,
|
|
657
657
|
channelName: D
|
|
658
658
|
}) => {
|
|
659
|
-
const f =
|
|
659
|
+
const f = gu(
|
|
660
660
|
new BroadcastChannel(D)
|
|
661
|
-
), e =
|
|
661
|
+
), e = gu({});
|
|
662
662
|
Z(() => {
|
|
663
663
|
const r = ({ data: s }) => {
|
|
664
664
|
e.current[s.event].forEach((F) => F(s));
|
|
@@ -699,7 +699,7 @@ const Zf = qu(void 0), Qf = ({
|
|
|
699
699
|
D(...u);
|
|
700
700
|
}, [D, ...u]);
|
|
701
701
|
};
|
|
702
|
-
var YD = /* @__PURE__ */ ((u) => (u.message = "message", u.delivery = "delivery", u.read = "read", u.typing = "typing", u.follow = "follow", u.echo = "echo", u.unknown = "", u))(YD || {}), uu = /* @__PURE__ */ ((u) => (u.sent = "sent", u.received = "received", u))(uu || {}), u1 = /* @__PURE__ */ ((u) => (u.text = "text", u.location = "location", u))(u1 || {}), Au = /* @__PURE__ */ ((u) => (u.text = "text", u.quick_reply = "quick_reply", u.postback = "postback", u.location = "location", u.file = "file", u.notify = "notify", u))(Au || {}), KD = /* @__PURE__ */ ((u) => (u.text = "text", u.buttons = "buttons", u.quick_replies = "quick_replies", u.file = "file", u.list = "list", u.carousel = "carousel", u))(KD || {}), iD = /* @__PURE__ */ ((u) => (u[u.sent = 0] = "sent", u[u.sending = 1] = "sending", u[u.uploading = 2] = "uploading", u))(iD || {}),
|
|
702
|
+
var YD = /* @__PURE__ */ ((u) => (u.message = "message", u.delivery = "delivery", u.read = "read", u.typing = "typing", u.follow = "follow", u.echo = "echo", u.unknown = "", u))(YD || {}), uu = /* @__PURE__ */ ((u) => (u.sent = "sent", u.received = "received", u))(uu || {}), u1 = /* @__PURE__ */ ((u) => (u.text = "text", u.location = "location", u))(u1 || {}), Au = /* @__PURE__ */ ((u) => (u.text = "text", u.quick_reply = "quick_reply", u.postback = "postback", u.location = "location", u.file = "file", u.notify = "notify", u))(Au || {}), KD = /* @__PURE__ */ ((u) => (u.text = "text", u.buttons = "buttons", u.quick_replies = "quick_replies", u.file = "file", u.list = "list", u.carousel = "carousel", u))(KD || {}), iD = /* @__PURE__ */ ((u) => (u[u.sent = 0] = "sent", u[u.sending = 1] = "sending", u[u.uploading = 2] = "uploading", u))(iD || {}), eD = /* @__PURE__ */ ((u) => (u[u.disconnected = 0] = "disconnected", u[u.wantToConnect = 1] = "wantToConnect", u[u.tryingToConnect = 2] = "tryingToConnect", u[u.connected = 3] = "connected", u))(eD || {}), aD = {};
|
|
703
703
|
const D1 = {
|
|
704
704
|
apiUrl: aD.REACT_APP_WIDGET_API_URL || "http://localhost:4000",
|
|
705
705
|
channel: aD.REACT_APP_WIDGET_CHANNEL || "console-channel",
|
|
@@ -708,7 +708,7 @@ const D1 = {
|
|
|
708
708
|
// 20 MB in bytes
|
|
709
709
|
ownerId: aD.REACT_APP_WIDGET_OWNER_ID || "68342cec1e3cef0065f1b563"
|
|
710
710
|
}, f1 = qu(D1), e1 = ({ children: u, ...D }) => {
|
|
711
|
-
const f =
|
|
711
|
+
const f = gu({
|
|
712
712
|
...D1,
|
|
713
713
|
...D
|
|
714
714
|
});
|
|
@@ -729,6 +729,9 @@ const D1 = {
|
|
|
729
729
|
placeholder: "Write something...",
|
|
730
730
|
connection_lost: "Connection Lost",
|
|
731
731
|
back: "Back"
|
|
732
|
+
}, m0 = {
|
|
733
|
+
help_prompt: "We’re here if you need help",
|
|
734
|
+
dismiss: "Dismiss"
|
|
732
735
|
}, g0 = {
|
|
733
736
|
get_started: "Start Chat",
|
|
734
737
|
file_message: {
|
|
@@ -738,22 +741,23 @@ const D1 = {
|
|
|
738
741
|
unsupported_file_type: "This file type is not supported.",
|
|
739
742
|
unsupported_file_size: "This file size is not supported."
|
|
740
743
|
}
|
|
741
|
-
},
|
|
744
|
+
}, _0 = {
|
|
742
745
|
user_subscription: p0,
|
|
743
746
|
settings: B0,
|
|
747
|
+
launcher: m0,
|
|
744
748
|
messages: g0
|
|
745
|
-
},
|
|
749
|
+
}, y0 = {
|
|
746
750
|
get_started: "Commencer",
|
|
747
751
|
first_name: "Prénom",
|
|
748
752
|
last_name: "Nom",
|
|
749
753
|
phone: "Numéro de Téléphone",
|
|
750
754
|
email: "Adresse Email"
|
|
751
|
-
},
|
|
755
|
+
}, v0 = {
|
|
752
756
|
greeting: "Bienvenue !",
|
|
753
757
|
placeholder: "Écrivez quelque chose...",
|
|
754
758
|
connection_lost: "Connexion perdue",
|
|
755
759
|
back: "Retour"
|
|
756
|
-
},
|
|
760
|
+
}, w0 = {
|
|
757
761
|
get_started: "Démarrer",
|
|
758
762
|
file_message: {
|
|
759
763
|
browser_audio_unsupport: "Le navigateur ne prend pas en charge l'élément audio.",
|
|
@@ -762,11 +766,11 @@ const D1 = {
|
|
|
762
766
|
unsupported_file_type: "Ce type de fichier n'est pas pris en charge.",
|
|
763
767
|
unsupported_file_size: "Cette taille de fichier n'est pas prise en charge."
|
|
764
768
|
}
|
|
765
|
-
},
|
|
766
|
-
user_subscription:
|
|
767
|
-
settings:
|
|
768
|
-
messages:
|
|
769
|
-
}, If = { en:
|
|
769
|
+
}, A0 = {
|
|
770
|
+
user_subscription: y0,
|
|
771
|
+
settings: v0,
|
|
772
|
+
messages: w0
|
|
773
|
+
}, If = { en: _0, fr: A0 }, t1 = qu(
|
|
770
774
|
void 0
|
|
771
775
|
), n1 = ({
|
|
772
776
|
children: u
|
|
@@ -781,36 +785,36 @@ const D1 = {
|
|
|
781
785
|
children: u
|
|
782
786
|
}
|
|
783
787
|
);
|
|
784
|
-
},
|
|
788
|
+
}, x0 = () => {
|
|
785
789
|
const u = Hu(t1);
|
|
786
790
|
if (!u)
|
|
787
791
|
throw new Error(
|
|
788
792
|
"useTranslationContext must be used within a TranslationProvider"
|
|
789
793
|
);
|
|
790
794
|
return u;
|
|
791
|
-
},
|
|
795
|
+
}, k0 = (u, D) => D.split(".").reduce((f, e) => {
|
|
792
796
|
if (typeof f == "object" && f !== null)
|
|
793
797
|
return f[e];
|
|
794
798
|
}, u), zu = () => {
|
|
795
|
-
const { translations: u, language: D } =
|
|
799
|
+
const { translations: u, language: D } = x0();
|
|
796
800
|
return { t: Mu(
|
|
797
|
-
(e, t = {}) => (
|
|
801
|
+
(e, t = {}) => (k0(u[D], e) || e).replace(
|
|
798
802
|
/{(\w+)}/g,
|
|
799
803
|
(r, s) => t[s] || `{${s}}`
|
|
800
804
|
),
|
|
801
805
|
[D, u]
|
|
802
806
|
) };
|
|
803
807
|
};
|
|
804
|
-
function
|
|
808
|
+
function j0(u, D) {
|
|
805
809
|
if (typeof D > "u")
|
|
806
810
|
throw new Error("Value cannot be undefined");
|
|
807
811
|
return sessionStorage.setItem(u, JSON.stringify(D)), !0;
|
|
808
812
|
}
|
|
809
|
-
function
|
|
813
|
+
function S0(u) {
|
|
810
814
|
const D = sessionStorage.getItem(u);
|
|
811
815
|
return D === null ? null : JSON.parse(D);
|
|
812
816
|
}
|
|
813
|
-
const $f = { setItem:
|
|
817
|
+
const $f = { setItem: j0, getItem: S0 }, Tu = /* @__PURE__ */ Object.create(null);
|
|
814
818
|
Tu.open = "0";
|
|
815
819
|
Tu.close = "1";
|
|
816
820
|
Tu.ping = "2";
|
|
@@ -833,7 +837,7 @@ function Mf(u) {
|
|
|
833
837
|
return u instanceof Uint8Array ? u : u instanceof ArrayBuffer ? new Uint8Array(u) : new Uint8Array(u.buffer, u.byteOffset, u.byteLength);
|
|
834
838
|
}
|
|
835
839
|
let $D;
|
|
836
|
-
function
|
|
840
|
+
function T0(u, D) {
|
|
837
841
|
if (r1 && u.data instanceof Blob)
|
|
838
842
|
return u.data.arrayBuffer().then(Mf).then(D);
|
|
839
843
|
if (a1 && (u.data instanceof ArrayBuffer || s1(u.data)))
|
|
@@ -845,14 +849,14 @@ function S0(u, D) {
|
|
|
845
849
|
const qf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", FD = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
|
846
850
|
for (let u = 0; u < qf.length; u++)
|
|
847
851
|
FD[qf.charCodeAt(u)] = u;
|
|
848
|
-
const
|
|
852
|
+
const N0 = (u) => {
|
|
849
853
|
let D = u.length * 0.75, f = u.length, e, t = 0, n, r, s, F;
|
|
850
854
|
u[u.length - 1] === "=" && (D--, u[u.length - 2] === "=" && D--);
|
|
851
855
|
const d = new ArrayBuffer(D), o = new Uint8Array(d);
|
|
852
856
|
for (e = 0; e < f; e += 4)
|
|
853
857
|
n = FD[u.charCodeAt(e)], r = FD[u.charCodeAt(e + 1)], s = FD[u.charCodeAt(e + 2)], F = FD[u.charCodeAt(e + 3)], o[t++] = n << 2 | r >> 4, o[t++] = (r & 15) << 4 | s >> 2, o[t++] = (s & 3) << 6 | F & 63;
|
|
854
858
|
return d;
|
|
855
|
-
},
|
|
859
|
+
}, O0 = typeof ArrayBuffer == "function", df = (u, D) => {
|
|
856
860
|
if (typeof u != "string")
|
|
857
861
|
return {
|
|
858
862
|
type: "message",
|
|
@@ -861,16 +865,16 @@ const T0 = (u) => {
|
|
|
861
865
|
const f = u.charAt(0);
|
|
862
866
|
return f === "b" ? {
|
|
863
867
|
type: "message",
|
|
864
|
-
data:
|
|
868
|
+
data: R0(u.substring(1), D)
|
|
865
869
|
} : pD[f] ? u.length > 1 ? {
|
|
866
870
|
type: pD[f],
|
|
867
871
|
data: u.substring(1)
|
|
868
872
|
} : {
|
|
869
873
|
type: pD[f]
|
|
870
874
|
} : JD;
|
|
871
|
-
},
|
|
872
|
-
if (
|
|
873
|
-
const f =
|
|
875
|
+
}, R0 = (u, D) => {
|
|
876
|
+
if (O0) {
|
|
877
|
+
const f = N0(u);
|
|
874
878
|
return F1(f, D);
|
|
875
879
|
} else
|
|
876
880
|
return { base64: !0, data: u };
|
|
@@ -882,7 +886,7 @@ const T0 = (u) => {
|
|
|
882
886
|
default:
|
|
883
887
|
return u instanceof ArrayBuffer ? u : u.buffer;
|
|
884
888
|
}
|
|
885
|
-
}, i1 = "",
|
|
889
|
+
}, i1 = "", P0 = (u, D) => {
|
|
886
890
|
const f = u.length, e = new Array(f);
|
|
887
891
|
let t = 0;
|
|
888
892
|
u.forEach((n, r) => {
|
|
@@ -890,7 +894,7 @@ const T0 = (u) => {
|
|
|
890
894
|
e[r] = s, ++t === f && D(e.join(i1));
|
|
891
895
|
});
|
|
892
896
|
});
|
|
893
|
-
},
|
|
897
|
+
}, I0 = (u, D) => {
|
|
894
898
|
const f = u.split(i1), e = [];
|
|
895
899
|
for (let t = 0; t < f.length; t++) {
|
|
896
900
|
const n = df(f[t], D);
|
|
@@ -899,10 +903,10 @@ const T0 = (u) => {
|
|
|
899
903
|
}
|
|
900
904
|
return e;
|
|
901
905
|
};
|
|
902
|
-
function
|
|
906
|
+
function $0() {
|
|
903
907
|
return new TransformStream({
|
|
904
908
|
transform(u, D) {
|
|
905
|
-
|
|
909
|
+
T0(u, (f) => {
|
|
906
910
|
const e = f.length;
|
|
907
911
|
let t;
|
|
908
912
|
if (e < 126)
|
|
@@ -934,7 +938,7 @@ function hD(u, D) {
|
|
|
934
938
|
f[t] = u[0][e++], e === u[0].length && (u.shift(), e = 0);
|
|
935
939
|
return u.length && e < u[0].length && (u[0] = u[0].slice(e)), f;
|
|
936
940
|
}
|
|
937
|
-
function
|
|
941
|
+
function L0(u, D) {
|
|
938
942
|
LD || (LD = new TextDecoder());
|
|
939
943
|
const f = [];
|
|
940
944
|
let e = 0, t = -1, n = !1;
|
|
@@ -976,9 +980,9 @@ function $0(u, D) {
|
|
|
976
980
|
}
|
|
977
981
|
const o1 = 4;
|
|
978
982
|
function su(u) {
|
|
979
|
-
if (u) return
|
|
983
|
+
if (u) return M0(u);
|
|
980
984
|
}
|
|
981
|
-
function
|
|
985
|
+
function M0(u) {
|
|
982
986
|
for (var D in su.prototype)
|
|
983
987
|
u[D] = su.prototype[D];
|
|
984
988
|
return u;
|
|
@@ -1024,19 +1028,19 @@ su.prototype.listeners = function(u) {
|
|
|
1024
1028
|
su.prototype.hasListeners = function(u) {
|
|
1025
1029
|
return !!this.listeners(u).length;
|
|
1026
1030
|
};
|
|
1027
|
-
const AD = typeof Promise == "function" && typeof Promise.resolve == "function" ? (D) => Promise.resolve().then(D) : (D, f) => f(D, 0), vu = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(),
|
|
1031
|
+
const AD = typeof Promise == "function" && typeof Promise.resolve == "function" ? (D) => Promise.resolve().then(D) : (D, f) => f(D, 0), vu = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(), q0 = "arraybuffer";
|
|
1028
1032
|
function d1(u, ...D) {
|
|
1029
1033
|
return D.reduce((f, e) => (u.hasOwnProperty(e) && (f[e] = u[e]), f), {});
|
|
1030
1034
|
}
|
|
1031
|
-
const
|
|
1035
|
+
const z0 = vu.setTimeout, U0 = vu.clearTimeout;
|
|
1032
1036
|
function xD(u, D) {
|
|
1033
|
-
D.useNativeTimers ? (u.setTimeoutFn =
|
|
1034
|
-
}
|
|
1035
|
-
const U0 = 1.33;
|
|
1036
|
-
function V0(u) {
|
|
1037
|
-
return typeof u == "string" ? H0(u) : Math.ceil((u.byteLength || u.size) * U0);
|
|
1037
|
+
D.useNativeTimers ? (u.setTimeoutFn = z0.bind(vu), u.clearTimeoutFn = U0.bind(vu)) : (u.setTimeoutFn = vu.setTimeout.bind(vu), u.clearTimeoutFn = vu.clearTimeout.bind(vu));
|
|
1038
1038
|
}
|
|
1039
|
+
const V0 = 1.33;
|
|
1039
1040
|
function H0(u) {
|
|
1041
|
+
return typeof u == "string" ? W0(u) : Math.ceil((u.byteLength || u.size) * V0);
|
|
1042
|
+
}
|
|
1043
|
+
function W0(u) {
|
|
1040
1044
|
let D = 0, f = 0;
|
|
1041
1045
|
for (let e = 0, t = u.length; e < t; e++)
|
|
1042
1046
|
D = u.charCodeAt(e), D < 128 ? f += 1 : D < 2048 ? f += 2 : D < 55296 || D >= 57344 ? f += 3 : (e++, f += 4);
|
|
@@ -1045,13 +1049,13 @@ function H0(u) {
|
|
|
1045
1049
|
function C1() {
|
|
1046
1050
|
return Date.now().toString(36).substring(3) + Math.random().toString(36).substring(2, 5);
|
|
1047
1051
|
}
|
|
1048
|
-
function
|
|
1052
|
+
function Y0(u) {
|
|
1049
1053
|
let D = "";
|
|
1050
1054
|
for (let f in u)
|
|
1051
1055
|
u.hasOwnProperty(f) && (D.length && (D += "&"), D += encodeURIComponent(f) + "=" + encodeURIComponent(u[f]));
|
|
1052
1056
|
return D;
|
|
1053
1057
|
}
|
|
1054
|
-
function
|
|
1058
|
+
function K0(u) {
|
|
1055
1059
|
let D = {}, f = u.split("&");
|
|
1056
1060
|
for (let e = 0, t = f.length; e < t; e++) {
|
|
1057
1061
|
let n = f[e].split("=");
|
|
@@ -1059,7 +1063,7 @@ function Y0(u) {
|
|
|
1059
1063
|
}
|
|
1060
1064
|
return D;
|
|
1061
1065
|
}
|
|
1062
|
-
class
|
|
1066
|
+
class J0 extends Error {
|
|
1063
1067
|
constructor(D, f, e) {
|
|
1064
1068
|
super(D), this.description = f, this.context = e, this.type = "TransportError";
|
|
1065
1069
|
}
|
|
@@ -1084,7 +1088,7 @@ class Cf extends su {
|
|
|
1084
1088
|
* @protected
|
|
1085
1089
|
*/
|
|
1086
1090
|
onError(D, f, e) {
|
|
1087
|
-
return super.emitReserved("error", new
|
|
1091
|
+
return super.emitReserved("error", new J0(D, f, e)), this;
|
|
1088
1092
|
}
|
|
1089
1093
|
/**
|
|
1090
1094
|
* Opens the transport.
|
|
@@ -1158,11 +1162,11 @@ class Cf extends su {
|
|
|
1158
1162
|
return this.opts.port && (this.opts.secure && +(this.opts.port !== 443) || !this.opts.secure && Number(this.opts.port) !== 80) ? ":" + this.opts.port : "";
|
|
1159
1163
|
}
|
|
1160
1164
|
_query(D) {
|
|
1161
|
-
const f =
|
|
1165
|
+
const f = Y0(D);
|
|
1162
1166
|
return f.length ? "?" + f : "";
|
|
1163
1167
|
}
|
|
1164
1168
|
}
|
|
1165
|
-
class
|
|
1169
|
+
class G0 extends Cf {
|
|
1166
1170
|
constructor() {
|
|
1167
1171
|
super(...arguments), this._polling = !1;
|
|
1168
1172
|
}
|
|
@@ -1218,7 +1222,7 @@ class J0 extends Cf {
|
|
|
1218
1222
|
return this.onClose({ description: "transport closed by the server" }), !1;
|
|
1219
1223
|
this.onPacket(e);
|
|
1220
1224
|
};
|
|
1221
|
-
|
|
1225
|
+
I0(D, this.socket.binaryType).forEach(f), this.readyState !== "closed" && (this._polling = !1, this.emitReserved("pollComplete"), this.readyState === "open" && this._poll());
|
|
1222
1226
|
}
|
|
1223
1227
|
/**
|
|
1224
1228
|
* For polling, send a close packet.
|
|
@@ -1238,7 +1242,7 @@ class J0 extends Cf {
|
|
|
1238
1242
|
* @protected
|
|
1239
1243
|
*/
|
|
1240
1244
|
write(D) {
|
|
1241
|
-
this.writable = !1,
|
|
1245
|
+
this.writable = !1, P0(D, (f) => {
|
|
1242
1246
|
this.doWrite(f, () => {
|
|
1243
1247
|
this.writable = !0, this.emitReserved("drain");
|
|
1244
1248
|
});
|
|
@@ -1259,10 +1263,10 @@ try {
|
|
|
1259
1263
|
c1 = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
|
|
1260
1264
|
} catch {
|
|
1261
1265
|
}
|
|
1262
|
-
const
|
|
1263
|
-
function
|
|
1266
|
+
const X0 = c1;
|
|
1267
|
+
function Z0() {
|
|
1264
1268
|
}
|
|
1265
|
-
class
|
|
1269
|
+
class Q0 extends G0 {
|
|
1266
1270
|
/**
|
|
1267
1271
|
* XHR Polling constructor.
|
|
1268
1272
|
*
|
|
@@ -1375,7 +1379,7 @@ class ju extends su {
|
|
|
1375
1379
|
*/
|
|
1376
1380
|
_cleanup(D) {
|
|
1377
1381
|
if (!(typeof this._xhr > "u" || this._xhr === null)) {
|
|
1378
|
-
if (this._xhr.onreadystatechange =
|
|
1382
|
+
if (this._xhr.onreadystatechange = Z0, D)
|
|
1379
1383
|
try {
|
|
1380
1384
|
this._xhr.abort();
|
|
1381
1385
|
} catch {
|
|
@@ -1415,17 +1419,17 @@ function zf() {
|
|
|
1415
1419
|
for (let u in ju.requests)
|
|
1416
1420
|
ju.requests.hasOwnProperty(u) && ju.requests[u].abort();
|
|
1417
1421
|
}
|
|
1418
|
-
const
|
|
1422
|
+
const ue = function() {
|
|
1419
1423
|
const u = l1({
|
|
1420
1424
|
xdomain: !1
|
|
1421
1425
|
});
|
|
1422
1426
|
return u && u.responseType !== null;
|
|
1423
1427
|
}();
|
|
1424
|
-
class
|
|
1428
|
+
class De extends Q0 {
|
|
1425
1429
|
constructor(D) {
|
|
1426
1430
|
super(D);
|
|
1427
1431
|
const f = D && D.forceBase64;
|
|
1428
|
-
this.supportsBinary =
|
|
1432
|
+
this.supportsBinary = ue && !f;
|
|
1429
1433
|
}
|
|
1430
1434
|
request(D = {}) {
|
|
1431
1435
|
return Object.assign(D, { xd: this.xd }, this.opts), new ju(l1, this.uri(), D);
|
|
@@ -1434,7 +1438,7 @@ class ue extends Z0 {
|
|
|
1434
1438
|
function l1(u) {
|
|
1435
1439
|
const D = u.xdomain;
|
|
1436
1440
|
try {
|
|
1437
|
-
if (typeof XMLHttpRequest < "u" && (!D ||
|
|
1441
|
+
if (typeof XMLHttpRequest < "u" && (!D || X0))
|
|
1438
1442
|
return new XMLHttpRequest();
|
|
1439
1443
|
} catch {
|
|
1440
1444
|
}
|
|
@@ -1445,7 +1449,7 @@ function l1(u) {
|
|
|
1445
1449
|
}
|
|
1446
1450
|
}
|
|
1447
1451
|
const E1 = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
|
|
1448
|
-
class
|
|
1452
|
+
class fe extends Cf {
|
|
1449
1453
|
get name() {
|
|
1450
1454
|
return "websocket";
|
|
1451
1455
|
}
|
|
@@ -1502,7 +1506,7 @@ class De extends Cf {
|
|
|
1502
1506
|
}
|
|
1503
1507
|
}
|
|
1504
1508
|
const MD = vu.WebSocket || vu.MozWebSocket;
|
|
1505
|
-
class
|
|
1509
|
+
class ee extends fe {
|
|
1506
1510
|
createSocket(D, f, e) {
|
|
1507
1511
|
return E1 ? new MD(D, f, e) : f ? new MD(D, f) : new MD(D);
|
|
1508
1512
|
}
|
|
@@ -1510,7 +1514,7 @@ class fe extends De {
|
|
|
1510
1514
|
this.ws.send(f);
|
|
1511
1515
|
}
|
|
1512
1516
|
}
|
|
1513
|
-
class
|
|
1517
|
+
class te extends Cf {
|
|
1514
1518
|
get name() {
|
|
1515
1519
|
return "webtransport";
|
|
1516
1520
|
}
|
|
@@ -1526,7 +1530,7 @@ class ee extends Cf {
|
|
|
1526
1530
|
this.onError("webtransport error", D);
|
|
1527
1531
|
}), this._transport.ready.then(() => {
|
|
1528
1532
|
this._transport.createBidirectionalStream().then((D) => {
|
|
1529
|
-
const f =
|
|
1533
|
+
const f = L0(Number.MAX_SAFE_INTEGER, this.socket.binaryType), e = D.readable.pipeThrough(f).getReader(), t = $0();
|
|
1530
1534
|
t.readable.pipeTo(D.writable), this._writer = t.writable.getWriter();
|
|
1531
1535
|
const n = () => {
|
|
1532
1536
|
e.read().then(({ done: s, value: F }) => {
|
|
@@ -1556,11 +1560,11 @@ class ee extends Cf {
|
|
|
1556
1560
|
(D = this._transport) === null || D === void 0 || D.close();
|
|
1557
1561
|
}
|
|
1558
1562
|
}
|
|
1559
|
-
const
|
|
1560
|
-
websocket:
|
|
1561
|
-
webtransport:
|
|
1562
|
-
polling:
|
|
1563
|
-
},
|
|
1563
|
+
const ne = {
|
|
1564
|
+
websocket: ee,
|
|
1565
|
+
webtransport: te,
|
|
1566
|
+
polling: De
|
|
1567
|
+
}, re = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, ae = [
|
|
1564
1568
|
"source",
|
|
1565
1569
|
"protocol",
|
|
1566
1570
|
"authority",
|
|
@@ -1581,16 +1585,16 @@ function GD(u) {
|
|
|
1581
1585
|
throw "URI too long";
|
|
1582
1586
|
const D = u, f = u.indexOf("["), e = u.indexOf("]");
|
|
1583
1587
|
f != -1 && e != -1 && (u = u.substring(0, f) + u.substring(f, e).replace(/:/g, ";") + u.substring(e, u.length));
|
|
1584
|
-
let t =
|
|
1588
|
+
let t = re.exec(u || ""), n = {}, r = 14;
|
|
1585
1589
|
for (; r--; )
|
|
1586
|
-
n[
|
|
1587
|
-
return f != -1 && e != -1 && (n.source = D, n.host = n.host.substring(1, n.host.length - 1).replace(/;/g, ":"), n.authority = n.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), n.ipv6uri = !0), n.pathNames =
|
|
1590
|
+
n[ae[r]] = t[r] || "";
|
|
1591
|
+
return f != -1 && e != -1 && (n.source = D, n.host = n.host.substring(1, n.host.length - 1).replace(/;/g, ":"), n.authority = n.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), n.ipv6uri = !0), n.pathNames = se(n, n.path), n.queryKey = Fe(n, n.query), n;
|
|
1588
1592
|
}
|
|
1589
|
-
function
|
|
1593
|
+
function se(u, D) {
|
|
1590
1594
|
const f = /\/{2,9}/g, e = D.replace(f, "/").split("/");
|
|
1591
1595
|
return (D.slice(0, 1) == "/" || D.length === 0) && e.splice(0, 1), D.slice(-1) == "/" && e.splice(e.length - 1, 1), e;
|
|
1592
1596
|
}
|
|
1593
|
-
function
|
|
1597
|
+
function Fe(u, D) {
|
|
1594
1598
|
const f = {};
|
|
1595
1599
|
return D.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function(e, t, n) {
|
|
1596
1600
|
t && (f[t] = n);
|
|
@@ -1608,7 +1612,7 @@ class Vu extends su {
|
|
|
1608
1612
|
* @param {Object} opts - options
|
|
1609
1613
|
*/
|
|
1610
1614
|
constructor(D, f) {
|
|
1611
|
-
if (super(), this.binaryType =
|
|
1615
|
+
if (super(), this.binaryType = q0, this.writeBuffer = [], this._prevBufferLen = 0, this._pingInterval = -1, this._pingTimeout = -1, this._maxPayload = -1, this._pingTimeoutTime = 1 / 0, D && typeof D == "object" && (f = D, D = null), D) {
|
|
1612
1616
|
const e = GD(D);
|
|
1613
1617
|
f.hostname = e.host, f.secure = e.protocol === "https" || e.protocol === "wss", f.port = e.port, e.query && (f.query = e.query);
|
|
1614
1618
|
} else f.host && (f.hostname = GD(f.host).host);
|
|
@@ -1629,7 +1633,7 @@ class Vu extends su {
|
|
|
1629
1633
|
},
|
|
1630
1634
|
transportOptions: {},
|
|
1631
1635
|
closeOnBeforeunload: !1
|
|
1632
|
-
}, f), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query =
|
|
1636
|
+
}, f), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = K0(this.opts.query)), XD && (this.opts.closeOnBeforeunload && (this._beforeunloadEventListener = () => {
|
|
1633
1637
|
this.transport && (this.transport.removeAllListeners(), this.transport.close());
|
|
1634
1638
|
}, addEventListener("beforeunload", this._beforeunloadEventListener, !1)), this.hostname !== "localhost" && (this._offlineEventListener = () => {
|
|
1635
1639
|
this._onClose("transport close", {
|
|
@@ -1764,7 +1768,7 @@ class Vu extends su {
|
|
|
1764
1768
|
let f = 1;
|
|
1765
1769
|
for (let e = 0; e < this.writeBuffer.length; e++) {
|
|
1766
1770
|
const t = this.writeBuffer[e].data;
|
|
1767
|
-
if (t && (f +=
|
|
1771
|
+
if (t && (f += H0(t)), e > 0 && f > this._maxPayload)
|
|
1768
1772
|
return this.writeBuffer.slice(0, e);
|
|
1769
1773
|
f += 2;
|
|
1770
1774
|
}
|
|
@@ -1871,7 +1875,7 @@ class Vu extends su {
|
|
|
1871
1875
|
}
|
|
1872
1876
|
}
|
|
1873
1877
|
Vu.protocol = o1;
|
|
1874
|
-
class
|
|
1878
|
+
class ie extends Vu {
|
|
1875
1879
|
constructor() {
|
|
1876
1880
|
super(...arguments), this._upgrades = [];
|
|
1877
1881
|
}
|
|
@@ -1943,41 +1947,41 @@ class Fe extends Vu {
|
|
|
1943
1947
|
return f;
|
|
1944
1948
|
}
|
|
1945
1949
|
}
|
|
1946
|
-
let
|
|
1950
|
+
let oe = class extends ie {
|
|
1947
1951
|
constructor(D, f = {}) {
|
|
1948
1952
|
const e = typeof D == "object" ? D : f;
|
|
1949
|
-
(!e.transports || e.transports && typeof e.transports[0] == "string") && (e.transports = (e.transports || ["polling", "websocket", "webtransport"]).map((t) =>
|
|
1953
|
+
(!e.transports || e.transports && typeof e.transports[0] == "string") && (e.transports = (e.transports || ["polling", "websocket", "webtransport"]).map((t) => ne[t]).filter((t) => !!t)), super(D, e);
|
|
1950
1954
|
}
|
|
1951
1955
|
};
|
|
1952
|
-
function
|
|
1956
|
+
function de(u, D = "", f) {
|
|
1953
1957
|
let e = u;
|
|
1954
1958
|
f = f || typeof location < "u" && location, u == null && (u = f.protocol + "//" + f.host), typeof u == "string" && (u.charAt(0) === "/" && (u.charAt(1) === "/" ? u = f.protocol + u : u = f.host + u), /^(https?|wss?):\/\//.test(u) || (typeof f < "u" ? u = f.protocol + "//" + u : u = "https://" + u), e = GD(u)), e.port || (/^(http|ws)$/.test(e.protocol) ? e.port = "80" : /^(http|ws)s$/.test(e.protocol) && (e.port = "443")), e.path = e.path || "/";
|
|
1955
1959
|
const n = e.host.indexOf(":") !== -1 ? "[" + e.host + "]" : e.host;
|
|
1956
1960
|
return e.id = e.protocol + "://" + n + ":" + e.port + D, e.href = e.protocol + "://" + n + (f && f.port === e.port ? "" : ":" + e.port), e;
|
|
1957
1961
|
}
|
|
1958
|
-
const
|
|
1962
|
+
const Ce = typeof ArrayBuffer == "function", ce = (u) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(u) : u.buffer instanceof ArrayBuffer, h1 = Object.prototype.toString, le = typeof Blob == "function" || typeof Blob < "u" && h1.call(Blob) === "[object BlobConstructor]", Ee = typeof File == "function" || typeof File < "u" && h1.call(File) === "[object FileConstructor]";
|
|
1959
1963
|
function cf(u) {
|
|
1960
|
-
return
|
|
1964
|
+
return Ce && (u instanceof ArrayBuffer || ce(u)) || le && u instanceof Blob || Ee && u instanceof File;
|
|
1961
1965
|
}
|
|
1962
|
-
function
|
|
1966
|
+
function mD(u, D) {
|
|
1963
1967
|
if (!u || typeof u != "object")
|
|
1964
1968
|
return !1;
|
|
1965
1969
|
if (Array.isArray(u)) {
|
|
1966
1970
|
for (let f = 0, e = u.length; f < e; f++)
|
|
1967
|
-
if (
|
|
1971
|
+
if (mD(u[f]))
|
|
1968
1972
|
return !0;
|
|
1969
1973
|
return !1;
|
|
1970
1974
|
}
|
|
1971
1975
|
if (cf(u))
|
|
1972
1976
|
return !0;
|
|
1973
1977
|
if (u.toJSON && typeof u.toJSON == "function" && arguments.length === 1)
|
|
1974
|
-
return
|
|
1978
|
+
return mD(u.toJSON(), !0);
|
|
1975
1979
|
for (const f in u)
|
|
1976
|
-
if (Object.prototype.hasOwnProperty.call(u, f) &&
|
|
1980
|
+
if (Object.prototype.hasOwnProperty.call(u, f) && mD(u[f]))
|
|
1977
1981
|
return !0;
|
|
1978
1982
|
return !1;
|
|
1979
1983
|
}
|
|
1980
|
-
function
|
|
1984
|
+
function he(u) {
|
|
1981
1985
|
const D = [], f = u.data, e = u;
|
|
1982
1986
|
return e.data = ZD(f, D), e.attachments = D.length, { packet: e, buffers: D };
|
|
1983
1987
|
}
|
|
@@ -2000,7 +2004,7 @@ function ZD(u, D) {
|
|
|
2000
2004
|
}
|
|
2001
2005
|
return u;
|
|
2002
2006
|
}
|
|
2003
|
-
function
|
|
2007
|
+
function be(u, D) {
|
|
2004
2008
|
return u.data = QD(u.data, D), delete u.attachments, u;
|
|
2005
2009
|
}
|
|
2006
2010
|
function QD(u, D) {
|
|
@@ -2018,7 +2022,7 @@ function QD(u, D) {
|
|
|
2018
2022
|
Object.prototype.hasOwnProperty.call(u, f) && (u[f] = QD(u[f], D));
|
|
2019
2023
|
return u;
|
|
2020
2024
|
}
|
|
2021
|
-
const
|
|
2025
|
+
const pe = [
|
|
2022
2026
|
"connect",
|
|
2023
2027
|
"connect_error",
|
|
2024
2028
|
"disconnect",
|
|
@@ -2026,12 +2030,12 @@ const be = [
|
|
|
2026
2030
|
"newListener",
|
|
2027
2031
|
"removeListener"
|
|
2028
2032
|
// used by the Node.js EventEmitter
|
|
2029
|
-
],
|
|
2033
|
+
], Be = 5;
|
|
2030
2034
|
var W;
|
|
2031
2035
|
(function(u) {
|
|
2032
2036
|
u[u.CONNECT = 0] = "CONNECT", u[u.DISCONNECT = 1] = "DISCONNECT", u[u.EVENT = 2] = "EVENT", u[u.ACK = 3] = "ACK", u[u.CONNECT_ERROR = 4] = "CONNECT_ERROR", u[u.BINARY_EVENT = 5] = "BINARY_EVENT", u[u.BINARY_ACK = 6] = "BINARY_ACK";
|
|
2033
2037
|
})(W || (W = {}));
|
|
2034
|
-
class
|
|
2038
|
+
class me {
|
|
2035
2039
|
/**
|
|
2036
2040
|
* Encoder constructor
|
|
2037
2041
|
*
|
|
@@ -2047,7 +2051,7 @@ class Be {
|
|
|
2047
2051
|
* @param {Object} obj - packet object
|
|
2048
2052
|
*/
|
|
2049
2053
|
encode(D) {
|
|
2050
|
-
return (D.type === W.EVENT || D.type === W.ACK) &&
|
|
2054
|
+
return (D.type === W.EVENT || D.type === W.ACK) && mD(D) ? this.encodeAsBinary({
|
|
2051
2055
|
type: D.type === W.EVENT ? W.BINARY_EVENT : W.BINARY_ACK,
|
|
2052
2056
|
nsp: D.nsp,
|
|
2053
2057
|
data: D.data,
|
|
@@ -2067,7 +2071,7 @@ class Be {
|
|
|
2067
2071
|
* a list of buffers.
|
|
2068
2072
|
*/
|
|
2069
2073
|
encodeAsBinary(D) {
|
|
2070
|
-
const f =
|
|
2074
|
+
const f = he(D), e = this.encodeAsString(f.packet), t = f.buffers;
|
|
2071
2075
|
return t.unshift(e), t;
|
|
2072
2076
|
}
|
|
2073
2077
|
}
|
|
@@ -2173,7 +2177,7 @@ class lf extends su {
|
|
|
2173
2177
|
return typeof f == "string" || Uf(f);
|
|
2174
2178
|
case W.EVENT:
|
|
2175
2179
|
case W.BINARY_EVENT:
|
|
2176
|
-
return Array.isArray(f) && (typeof f[0] == "number" || typeof f[0] == "string" &&
|
|
2180
|
+
return Array.isArray(f) && (typeof f[0] == "number" || typeof f[0] == "string" && pe.indexOf(f[0]) === -1);
|
|
2177
2181
|
case W.ACK:
|
|
2178
2182
|
case W.BINARY_ACK:
|
|
2179
2183
|
return Array.isArray(f);
|
|
@@ -2200,7 +2204,7 @@ class ge {
|
|
|
2200
2204
|
*/
|
|
2201
2205
|
takeBinaryData(D) {
|
|
2202
2206
|
if (this.buffers.push(D), this.buffers.length === this.reconPack.attachments) {
|
|
2203
|
-
const f =
|
|
2207
|
+
const f = be(this.reconPack, this.buffers);
|
|
2204
2208
|
return this.finishedReconstruction(), f;
|
|
2205
2209
|
}
|
|
2206
2210
|
return null;
|
|
@@ -2212,21 +2216,21 @@ class ge {
|
|
|
2212
2216
|
this.reconPack = null, this.buffers = [];
|
|
2213
2217
|
}
|
|
2214
2218
|
}
|
|
2215
|
-
const
|
|
2219
|
+
const _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2216
2220
|
__proto__: null,
|
|
2217
2221
|
Decoder: lf,
|
|
2218
|
-
Encoder:
|
|
2222
|
+
Encoder: me,
|
|
2219
2223
|
get PacketType() {
|
|
2220
2224
|
return W;
|
|
2221
2225
|
},
|
|
2222
|
-
protocol:
|
|
2226
|
+
protocol: Be
|
|
2223
2227
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2224
2228
|
function ku(u, D, f) {
|
|
2225
2229
|
return u.on(D, f), function() {
|
|
2226
2230
|
u.off(D, f);
|
|
2227
2231
|
};
|
|
2228
2232
|
}
|
|
2229
|
-
const
|
|
2233
|
+
const ye = Object.freeze({
|
|
2230
2234
|
connect: 1,
|
|
2231
2235
|
connect_error: 1,
|
|
2232
2236
|
disconnect: 1,
|
|
@@ -2351,7 +2355,7 @@ class b1 extends su {
|
|
|
2351
2355
|
*/
|
|
2352
2356
|
emit(D, ...f) {
|
|
2353
2357
|
var e, t, n;
|
|
2354
|
-
if (
|
|
2358
|
+
if (ye.hasOwnProperty(D))
|
|
2355
2359
|
throw new Error('"' + D.toString() + '" is a reserved event name');
|
|
2356
2360
|
if (f.unshift(D), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile)
|
|
2357
2361
|
return this._addToQueue(f), this;
|
|
@@ -2858,7 +2862,7 @@ class uf extends su {
|
|
|
2858
2862
|
max: this.reconnectionDelayMax(),
|
|
2859
2863
|
jitter: this.randomizationFactor()
|
|
2860
2864
|
}), this.timeout(f.timeout == null ? 2e4 : f.timeout), this._readyState = "closed", this.uri = D;
|
|
2861
|
-
const t = f.parser ||
|
|
2865
|
+
const t = f.parser || _e;
|
|
2862
2866
|
this.encoder = new t.Encoder(), this.decoder = new t.Decoder(), this._autoConnect = f.autoConnect !== !1, this._autoConnect && this.open();
|
|
2863
2867
|
}
|
|
2864
2868
|
reconnection(D) {
|
|
@@ -2901,7 +2905,7 @@ class uf extends su {
|
|
|
2901
2905
|
open(D) {
|
|
2902
2906
|
if (~this._readyState.indexOf("open"))
|
|
2903
2907
|
return this;
|
|
2904
|
-
this.engine = new
|
|
2908
|
+
this.engine = new oe(this.uri, this.opts);
|
|
2905
2909
|
const f = this.engine, e = this;
|
|
2906
2910
|
this._readyState = "opening", this.skipReconnect = !1;
|
|
2907
2911
|
const t = ku(f, "open", function() {
|
|
@@ -3089,31 +3093,31 @@ class uf extends su {
|
|
|
3089
3093
|
}
|
|
3090
3094
|
}
|
|
3091
3095
|
const sD = {};
|
|
3092
|
-
function
|
|
3096
|
+
function gD(u, D) {
|
|
3093
3097
|
typeof u == "object" && (D = u, u = void 0), D = D || {};
|
|
3094
|
-
const f =
|
|
3098
|
+
const f = de(u, D.path || "/socket.io"), e = f.source, t = f.id, n = f.path, r = sD[t] && n in sD[t].nsps, s = D.forceNew || D["force new connection"] || D.multiplex === !1 || r;
|
|
3095
3099
|
let F;
|
|
3096
3100
|
return s ? F = new uf(e, D) : (sD[t] || (sD[t] = new uf(e, D)), F = sD[t]), f.query && !D.query && (D.query = f.queryKey), F.socket(f.path, D);
|
|
3097
3101
|
}
|
|
3098
|
-
Object.assign(
|
|
3102
|
+
Object.assign(gD, {
|
|
3099
3103
|
Manager: uf,
|
|
3100
3104
|
Socket: b1,
|
|
3101
|
-
io:
|
|
3102
|
-
connect:
|
|
3105
|
+
io: gD,
|
|
3106
|
+
connect: gD
|
|
3103
3107
|
});
|
|
3104
|
-
const
|
|
3105
|
-
function
|
|
3108
|
+
const ve = () => typeof location > "u" ? "unknown-host" : location.host, Ef = (u, D = ve()) => `${u}-${D}`;
|
|
3109
|
+
function we(u, D, f) {
|
|
3106
3110
|
if (typeof D > "u") throw new Error("Value cannot be undefined");
|
|
3107
3111
|
return localStorage.setItem(Ef(u, f), JSON.stringify(D)), !0;
|
|
3108
3112
|
}
|
|
3109
|
-
function
|
|
3113
|
+
function Ae(u, D) {
|
|
3110
3114
|
const f = localStorage.getItem(Ef(u, D));
|
|
3111
3115
|
return f === null ? null : JSON.parse(f);
|
|
3112
3116
|
}
|
|
3113
|
-
function
|
|
3117
|
+
function xe(u, D) {
|
|
3114
3118
|
localStorage.removeItem(Ef(u, D));
|
|
3115
3119
|
}
|
|
3116
|
-
const X = { setItem:
|
|
3120
|
+
const X = { setItem: we, getItem: Ae, removeItem: xe }, wD = class wD {
|
|
3117
3121
|
constructor(D, f, e) {
|
|
3118
3122
|
lD(this, "socket");
|
|
3119
3123
|
lD(this, "config");
|
|
@@ -3123,7 +3127,7 @@ const X = { setItem: ve, getItem: we, removeItem: Ae }, wD = class wD {
|
|
|
3123
3127
|
autoConnect: !1
|
|
3124
3128
|
};
|
|
3125
3129
|
const t = new URL(D);
|
|
3126
|
-
this.socket =
|
|
3130
|
+
this.socket = gD(t.origin, this.config), this.init(e);
|
|
3127
3131
|
}
|
|
3128
3132
|
get io() {
|
|
3129
3133
|
return this.socket.io;
|
|
@@ -3248,7 +3252,7 @@ lD(wD, "defaultConfig", {
|
|
|
3248
3252
|
withCredentials: !0
|
|
3249
3253
|
});
|
|
3250
3254
|
let Df = wD, qD;
|
|
3251
|
-
const
|
|
3255
|
+
const ke = (u, D) => {
|
|
3252
3256
|
var e;
|
|
3253
3257
|
const f = (e = X.getItem("profileLiveChat")) == null ? void 0 : e.id;
|
|
3254
3258
|
return qD || (qD = new Df(
|
|
@@ -3265,8 +3269,8 @@ const xe = (u, D) => {
|
|
|
3265
3269
|
}, p1 = qu({
|
|
3266
3270
|
socket: {}
|
|
3267
3271
|
}), B1 = (u) => {
|
|
3268
|
-
const D = Wu(), f =
|
|
3269
|
-
|
|
3272
|
+
const D = Wu(), f = gu(
|
|
3273
|
+
ke(D, {
|
|
3270
3274
|
onConnect: () => {
|
|
3271
3275
|
console.info(
|
|
3272
3276
|
"Hexabot Live Chat : Successfully established WS Connection!"
|
|
@@ -3281,11 +3285,11 @@ const xe = (u, D) => {
|
|
|
3281
3285
|
})
|
|
3282
3286
|
);
|
|
3283
3287
|
return /* @__PURE__ */ a.jsx(p1.Provider, { value: { socket: f.current }, children: u.children });
|
|
3284
|
-
},
|
|
3285
|
-
const { socket: f } =
|
|
3288
|
+
}, tD = () => Hu(p1), ff = (u, D) => {
|
|
3289
|
+
const { socket: f } = tD();
|
|
3286
3290
|
Z(() => (f.on(u, D), () => f.off(u, D)), [u, D, f]);
|
|
3287
|
-
},
|
|
3288
|
-
const { socket: u } =
|
|
3291
|
+
}, je = () => {
|
|
3292
|
+
const { socket: u } = tD();
|
|
3289
3293
|
Z(() => (u.connect(), () => {
|
|
3290
3294
|
u.disconnect();
|
|
3291
3295
|
}), []);
|
|
@@ -3318,7 +3322,7 @@ const xe = (u, D) => {
|
|
|
3318
3322
|
end_time: "",
|
|
3319
3323
|
time_zone: "Etc/GMT+12"
|
|
3320
3324
|
}
|
|
3321
|
-
},
|
|
3325
|
+
}, m1 = qu(_D), g1 = ({
|
|
3322
3326
|
children: u
|
|
3323
3327
|
}) => {
|
|
3324
3328
|
const { t: D } = zu(), f = $f.getItem("settings"), [e, t] = U(
|
|
@@ -3347,8 +3351,8 @@ const xe = (u, D) => {
|
|
|
3347
3351
|
termsAndConditions: r.terms_and_conditions || _D.termsAndConditions,
|
|
3348
3352
|
offline_mode: r.offline_mode
|
|
3349
3353
|
});
|
|
3350
|
-
}), /* @__PURE__ */ a.jsx(
|
|
3351
|
-
}, pu = () => Hu(
|
|
3354
|
+
}), /* @__PURE__ */ a.jsx(m1.Provider, { value: e, children: u });
|
|
3355
|
+
}, pu = () => Hu(m1), _1 = qu(void 0), y1 = ({
|
|
3352
3356
|
onOpen: u,
|
|
3353
3357
|
onClose: D,
|
|
3354
3358
|
onScrollToTop: f,
|
|
@@ -3360,19 +3364,19 @@ const xe = (u, D) => {
|
|
|
3360
3364
|
isOpen: s,
|
|
3361
3365
|
screen: d,
|
|
3362
3366
|
scroll: c,
|
|
3363
|
-
setSyncState: (
|
|
3364
|
-
r(
|
|
3367
|
+
setSyncState: (g) => {
|
|
3368
|
+
r(g);
|
|
3365
3369
|
},
|
|
3366
|
-
setIsOpen: (
|
|
3367
|
-
F(
|
|
3370
|
+
setIsOpen: (g) => {
|
|
3371
|
+
F(g), n && (g ? u && u() : D && D());
|
|
3368
3372
|
},
|
|
3369
|
-
setScreen: (
|
|
3373
|
+
setScreen: (g) => {
|
|
3370
3374
|
o(
|
|
3371
|
-
["prechat", "postchat", "webview"].includes(
|
|
3375
|
+
["prechat", "postchat", "webview"].includes(g) ? g : "chat"
|
|
3372
3376
|
);
|
|
3373
3377
|
},
|
|
3374
|
-
setScroll: (
|
|
3375
|
-
l(
|
|
3378
|
+
setScroll: (g) => {
|
|
3379
|
+
l(g), f && n && g === 0 && f();
|
|
3376
3380
|
}
|
|
3377
3381
|
};
|
|
3378
3382
|
return /* @__PURE__ */ a.jsx(_1.Provider, { value: x, children: t });
|
|
@@ -3381,7 +3385,7 @@ const xe = (u, D) => {
|
|
|
3381
3385
|
if (u === void 0)
|
|
3382
3386
|
throw new Error("useWidget must be used within a WidgetProvider");
|
|
3383
3387
|
return u;
|
|
3384
|
-
},
|
|
3388
|
+
}, Se = (u) => new Intl.DateTimeFormat("en-GB", {
|
|
3385
3389
|
hour: "2-digit",
|
|
3386
3390
|
minute: "2-digit",
|
|
3387
3391
|
hour12: !1,
|
|
@@ -3390,7 +3394,7 @@ const xe = (u, D) => {
|
|
|
3390
3394
|
const D = u || {};
|
|
3391
3395
|
if (!D || D.status !== "active") return !1;
|
|
3392
3396
|
if (D.start_time && D.end_time && D.time_zone) {
|
|
3393
|
-
const f =
|
|
3397
|
+
const f = Se(D.time_zone);
|
|
3394
3398
|
return !(f >= D.start_time && f <= D.end_time);
|
|
3395
3399
|
}
|
|
3396
3400
|
return !0;
|
|
@@ -3449,11 +3453,11 @@ const xe = (u, D) => {
|
|
|
3449
3453
|
setIsOfflineMode: () => {
|
|
3450
3454
|
}
|
|
3451
3455
|
}, v1 = qu(yu), w1 = ({ wantToConnect: u, defaultConnectionState: D = 0, children: f }) => {
|
|
3452
|
-
const e = Wu(), t = pu(), { screen: n, setScreen: r } = Nu(), { setScroll: s, syncState: F, isOpen: d } = Nu(), o =
|
|
3456
|
+
const e = Wu(), t = pu(), { screen: n, setScreen: r } = Nu(), { setScroll: s, syncState: F, isOpen: d } = Nu(), o = tD(), [c, l] = U(
|
|
3453
3457
|
yu.participants
|
|
3454
|
-
), [j,
|
|
3458
|
+
), [j, v] = U(
|
|
3455
3459
|
D
|
|
3456
|
-
), [C,
|
|
3460
|
+
), [C, y] = U([]), [x, g] = U(
|
|
3457
3461
|
yu.newMessagesCount
|
|
3458
3462
|
), [T, _] = U(
|
|
3459
3463
|
yu.showTypingIndicator
|
|
@@ -3461,12 +3465,12 @@ const xe = (u, D) => {
|
|
|
3461
3465
|
yu.suggestions
|
|
3462
3466
|
), [P, q] = U(
|
|
3463
3467
|
yu.newIOMessage
|
|
3464
|
-
), [
|
|
3468
|
+
), [m, O] = U(yu.message), [L, hu] = U(yu.outgoingMessageState), [fu, k] = U(yu.payload), [E, h] = U(yu.file), [A, p] = U(yu.webviewUrl), [R, N] = U(
|
|
3465
3469
|
yu.isContactFormActive
|
|
3466
3470
|
), [M, V] = U(
|
|
3467
3471
|
yu.isOfflineMode
|
|
3468
3472
|
), { send: J } = du(), { t: z } = zu(), Q = (S) => {
|
|
3469
|
-
|
|
3473
|
+
v(S), S === eD.wantToConnect && u && u(), S === eD.connected && t.alwaysScrollToBottom && s(101);
|
|
3470
3474
|
}, tu = t.offline_mode, Cu = kD(tu), _u = (S) => {
|
|
3471
3475
|
if (q(S), X.setItem(
|
|
3472
3476
|
"isOffline",
|
|
@@ -3476,7 +3480,7 @@ const xe = (u, D) => {
|
|
|
3476
3480
|
(S == null ? void 0 : S.submitedFormLateTime) || null
|
|
3477
3481
|
), S && "type" in S && S.type === "typing")
|
|
3478
3482
|
return T === !0;
|
|
3479
|
-
_(!1), S && "mid" in S && !C.find((Du) => S.mid === Du.mid) && ("author" in S && (S.direction = S.author === "chatbot" ? uu.received : uu.sent, S.read = !0, S.delivery = !0),
|
|
3483
|
+
_(!1), S && "mid" in S && !C.find((Du) => S.mid === Du.mid) && ("author" in S && (S.direction = S.author === "chatbot" ? uu.received : uu.sent, S.read = !0, S.delivery = !0), y((Du) => [
|
|
3480
3484
|
...Du.filter((cu) => cu.mid !== S.mid),
|
|
3481
3485
|
S
|
|
3482
3486
|
]), s(0), "direction" in S && S.direction === uu.received && !S.isOffline && V(!1)), S && "data" in S && "quick_replies" in S.data ? I(
|
|
@@ -3487,8 +3491,8 @@ const xe = (u, D) => {
|
|
|
3487
3491
|
payload: Du.payload
|
|
3488
3492
|
})
|
|
3489
3493
|
)
|
|
3490
|
-
) : I([]), d ||
|
|
3491
|
-
}, { socket: Bu } =
|
|
3494
|
+
) : I([]), d || g((Du) => Du + 1), t.alwaysScrollToBottom && s(101), hu(iD.sent);
|
|
3495
|
+
}, { socket: Bu } = tD(), ru = async ({
|
|
3492
3496
|
data: S
|
|
3493
3497
|
}) => {
|
|
3494
3498
|
var Du;
|
|
@@ -3506,27 +3510,27 @@ const xe = (u, D) => {
|
|
|
3506
3510
|
}, ou = Mu(
|
|
3507
3511
|
async (S, Du) => {
|
|
3508
3512
|
try {
|
|
3509
|
-
|
|
3513
|
+
v(2);
|
|
3510
3514
|
const cu = new URLSearchParams();
|
|
3511
3515
|
Object.entries({
|
|
3512
3516
|
...S && Du ? { first_name: S, last_name: Du } : {},
|
|
3513
3517
|
_refresh: Date.now().toString()
|
|
3514
3518
|
// Force fresh data
|
|
3515
|
-
}).forEach(([
|
|
3516
|
-
typeof Uu == "string" && Uu.trim() && cu.append(
|
|
3519
|
+
}).forEach(([mu, Uu]) => {
|
|
3520
|
+
typeof Uu == "string" && Uu.trim() && cu.append(mu, Uu);
|
|
3517
3521
|
}), cu.append("owner_id", e.ownerId);
|
|
3518
3522
|
const { body: lu } = await Bu.get(`/webhook/${e.channel}/?${cu.toString()}`);
|
|
3519
3523
|
X.setItem("profileLiveChat", lu.profile), X.setItem("isOffline", Cu || !1), X.setItem(
|
|
3520
3524
|
"submitedFormLateTime",
|
|
3521
3525
|
lu.profile.submitedFormLateTime || null
|
|
3522
|
-
),
|
|
3523
|
-
lu.messages.map((
|
|
3524
|
-
...
|
|
3525
|
-
direction:
|
|
3526
|
-
read:
|
|
3527
|
-
delivery:
|
|
3528
|
-
isOffline:
|
|
3529
|
-
submitedFormLateTime:
|
|
3526
|
+
), y(
|
|
3527
|
+
lu.messages.map((mu) => ({
|
|
3528
|
+
...mu,
|
|
3529
|
+
direction: mu.author === lu.profile.foreignId || mu.author === lu.profile.id ? uu.sent : uu.received,
|
|
3530
|
+
read: mu.direction === uu.sent || mu.read,
|
|
3531
|
+
delivery: mu.direction === uu.sent || mu.delivery,
|
|
3532
|
+
isOffline: mu.isOffline || lu.profile.isOffline,
|
|
3533
|
+
submitedFormLateTime: mu.submitedFormLateTime || lu.profile.submitedFormLateTime
|
|
3530
3534
|
}))
|
|
3531
3535
|
), l([
|
|
3532
3536
|
c[0],
|
|
@@ -3546,16 +3550,16 @@ const xe = (u, D) => {
|
|
|
3546
3550
|
},
|
|
3547
3551
|
author: lu.profile.foreignId
|
|
3548
3552
|
}
|
|
3549
|
-
}),
|
|
3553
|
+
}), v(3), r("chat");
|
|
3550
3554
|
} catch (cu) {
|
|
3551
|
-
console.error("Unable to subscribe user", cu), r("prechat"),
|
|
3555
|
+
console.error("Unable to subscribe user", cu), r("prechat"), v(0);
|
|
3552
3556
|
}
|
|
3553
3557
|
},
|
|
3554
3558
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3555
3559
|
[
|
|
3556
3560
|
c,
|
|
3557
|
-
y,
|
|
3558
3561
|
v,
|
|
3562
|
+
y,
|
|
3559
3563
|
l,
|
|
3560
3564
|
r,
|
|
3561
3565
|
o
|
|
@@ -3568,9 +3572,9 @@ const xe = (u, D) => {
|
|
|
3568
3572
|
S ? (p(S), r("webview")) : r("chat");
|
|
3569
3573
|
};
|
|
3570
3574
|
Z(() => {
|
|
3571
|
-
F && d &&
|
|
3575
|
+
F && d && g(0);
|
|
3572
3576
|
}, [F, d]), Z(() => {
|
|
3573
|
-
if (d && j ===
|
|
3577
|
+
if (d && j === eD.connected) {
|
|
3574
3578
|
const S = X.getItem("profileLiveChat");
|
|
3575
3579
|
if (S) {
|
|
3576
3580
|
const Du = S;
|
|
@@ -3581,7 +3585,7 @@ const xe = (u, D) => {
|
|
|
3581
3585
|
}, [d]), b0("logout", () => {
|
|
3582
3586
|
o.socket.disconnect();
|
|
3583
3587
|
}), Z(() => {
|
|
3584
|
-
n === "chat" && j ===
|
|
3588
|
+
n === "chat" && j === eD.connected && ou();
|
|
3585
3589
|
const S = () => {
|
|
3586
3590
|
const Du = X.getItem("profileLiveChat");
|
|
3587
3591
|
if (Du) {
|
|
@@ -3607,9 +3611,9 @@ const xe = (u, D) => {
|
|
|
3607
3611
|
const cu = Date.parse(S.createdAt), lu = Date.parse(Du.createdAt);
|
|
3608
3612
|
return +new Date(cu) - +new Date(lu);
|
|
3609
3613
|
}),
|
|
3610
|
-
setMessages:
|
|
3614
|
+
setMessages: y,
|
|
3611
3615
|
newMessagesCount: x,
|
|
3612
|
-
setNewMessagesCount:
|
|
3616
|
+
setNewMessagesCount: g,
|
|
3613
3617
|
newIOMessage: P,
|
|
3614
3618
|
setNewIOMessage: q,
|
|
3615
3619
|
send: ru,
|
|
@@ -3623,7 +3627,7 @@ const xe = (u, D) => {
|
|
|
3623
3627
|
setPayload: k,
|
|
3624
3628
|
file: E,
|
|
3625
3629
|
setFile: h,
|
|
3626
|
-
message:
|
|
3630
|
+
message: m,
|
|
3627
3631
|
setMessage: O,
|
|
3628
3632
|
handleSubscription: ou,
|
|
3629
3633
|
isContactFormActive: R,
|
|
@@ -3883,21 +3887,21 @@ const xe = (u, D) => {
|
|
|
3883
3887
|
text: "#9C9C9C"
|
|
3884
3888
|
}
|
|
3885
3889
|
}
|
|
3886
|
-
},
|
|
3890
|
+
}, Te = (u) => {
|
|
3887
3891
|
const D = u.replace("#", ""), f = parseInt(D.substring(0, 2), 16), e = parseInt(D.substring(2, 4), 16), t = parseInt(D.substring(4, 6), 16);
|
|
3888
3892
|
return (0.299 * f + 0.587 * e + 0.114 * t) / 255 > 0.5 ? "#000000" : "#FFFFFF";
|
|
3889
|
-
},
|
|
3893
|
+
}, Ne = (u) => /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(u), Oe = (u) => {
|
|
3890
3894
|
const D = u.replace("#", "");
|
|
3891
3895
|
return {
|
|
3892
3896
|
r: parseInt(D.substring(0, 2), 16),
|
|
3893
3897
|
g: parseInt(D.substring(2, 4), 16),
|
|
3894
3898
|
b: parseInt(D.substring(4, 6), 16)
|
|
3895
3899
|
};
|
|
3896
|
-
},
|
|
3897
|
-
const D =
|
|
3898
|
-
if (!
|
|
3900
|
+
}, Re = (u) => (u.startsWith("#") || (u = "#" + u), u.length === 4 ? "#" + u[1] + u[1] + u[2] + u[2] + u[3] + u[3] : u), ef = (u) => {
|
|
3901
|
+
const D = Re(u);
|
|
3902
|
+
if (!Ne(D))
|
|
3899
3903
|
return console.warn(`Invalid color: ${u}, using default blue theme`), ef("#0074D9");
|
|
3900
|
-
const f =
|
|
3904
|
+
const f = Te(D), e = Oe(D), t = Math.min(255, Math.floor(e.r + (255 - e.r) * 0.9)), n = Math.min(255, Math.floor(e.g + (255 - e.g) * 0.9)), r = Math.min(255, Math.floor(e.b + (255 - e.b) * 0.9)), s = `#${t.toString(16).padStart(2, "0")}${n.toString(16).padStart(2, "0")}${r.toString(16).padStart(2, "0")}`, F = Math.max(0, Math.floor(e.r * 0.8)), d = Math.max(0, Math.floor(e.g * 0.8)), o = Math.max(0, Math.floor(e.b * 0.8));
|
|
3901
3905
|
return `${F.toString(16).padStart(2, "0")}${d.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}`, {
|
|
3902
3906
|
header: {
|
|
3903
3907
|
bg: D,
|
|
@@ -3941,13 +3945,13 @@ const xe = (u, D) => {
|
|
|
3941
3945
|
teal: "#1BA089",
|
|
3942
3946
|
dark: "#000000",
|
|
3943
3947
|
purple: "#7950F2"
|
|
3944
|
-
},
|
|
3948
|
+
}, Pe = (u) => Vf[u] ? ef(Vf[u]) : ef(u), Ie = () => ({
|
|
3945
3949
|
bg: "#f6f8f9",
|
|
3946
3950
|
// Light gray background
|
|
3947
3951
|
text: "#000"
|
|
3948
3952
|
// Black text
|
|
3949
|
-
}),
|
|
3950
|
-
colors:
|
|
3953
|
+
}), $e = yD.orange, A1 = qu({
|
|
3954
|
+
colors: $e
|
|
3951
3955
|
}), x1 = ({
|
|
3952
3956
|
children: u
|
|
3953
3957
|
}) => {
|
|
@@ -3957,9 +3961,9 @@ const xe = (u, D) => {
|
|
|
3957
3961
|
return yD[e];
|
|
3958
3962
|
try {
|
|
3959
3963
|
return {
|
|
3960
|
-
...
|
|
3964
|
+
...Pe(e),
|
|
3961
3965
|
// Keep received message colors fixed (admin chat)
|
|
3962
|
-
received:
|
|
3966
|
+
received: Ie()
|
|
3963
3967
|
};
|
|
3964
3968
|
} catch {
|
|
3965
3969
|
return console.warn(`Failed to generate theme for color: ${e}, using orange fallback`), yD.orange;
|
|
@@ -3999,10 +4003,10 @@ const xe = (u, D) => {
|
|
|
3999
4003
|
)
|
|
4000
4004
|
]
|
|
4001
4005
|
}
|
|
4002
|
-
),
|
|
4006
|
+
), Le = ({
|
|
4003
4007
|
onSendNoticeToStaff: u
|
|
4004
4008
|
}) => {
|
|
4005
|
-
const [D, f] = U(!1), e =
|
|
4009
|
+
const [D, f] = U(!1), e = gu(null), { send: t } = du(), n = async (r) => {
|
|
4006
4010
|
r.preventDefault(), r.stopPropagation();
|
|
4007
4011
|
try {
|
|
4008
4012
|
const s = X.getItem("profileLiveChat");
|
|
@@ -4049,7 +4053,7 @@ const xe = (u, D) => {
|
|
|
4049
4053
|
}
|
|
4050
4054
|
) })
|
|
4051
4055
|
] });
|
|
4052
|
-
},
|
|
4056
|
+
}, Me = ({ children: u }) => {
|
|
4053
4057
|
const D = pu(), { colors: f } = iu(), e = Nu();
|
|
4054
4058
|
return /* @__PURE__ */ a.jsxs(
|
|
4055
4059
|
"div",
|
|
@@ -4081,7 +4085,7 @@ const xe = (u, D) => {
|
|
|
4081
4085
|
] }),
|
|
4082
4086
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-header--actions", children: [
|
|
4083
4087
|
/* @__PURE__ */ a.jsx(
|
|
4084
|
-
|
|
4088
|
+
Le,
|
|
4085
4089
|
{
|
|
4086
4090
|
onChatWithStaff: () => {
|
|
4087
4091
|
console.log("Chat with staff requested");
|
|
@@ -4103,7 +4107,7 @@ const xe = (u, D) => {
|
|
|
4103
4107
|
]
|
|
4104
4108
|
}
|
|
4105
4109
|
);
|
|
4106
|
-
},
|
|
4110
|
+
}, qe = ({
|
|
4107
4111
|
width: u = "100",
|
|
4108
4112
|
height: D = "100",
|
|
4109
4113
|
x: f = "0",
|
|
@@ -4128,7 +4132,7 @@ const xe = (u, D) => {
|
|
|
4128
4132
|
/* @__PURE__ */ a.jsx("path", { d: "M349.926 17.756c141.317 87.019 164.005 282.465 47.152 399.321-74.64 74.638-183.463 93.269-274.888 57.282 97.36 59.953 228.457 49.147 314.888-37.282 131.453-131.456 82.523-352.533-87.152-419.321z" })
|
|
4129
4133
|
]
|
|
4130
4134
|
}
|
|
4131
|
-
),
|
|
4135
|
+
), ze = ({ size: u = 50, color: D = "#000", ...f }) => /* @__PURE__ */ a.jsxs(
|
|
4132
4136
|
"svg",
|
|
4133
4137
|
{
|
|
4134
4138
|
width: u,
|
|
@@ -4188,7 +4192,7 @@ const xe = (u, D) => {
|
|
|
4188
4192
|
] })
|
|
4189
4193
|
]
|
|
4190
4194
|
}
|
|
4191
|
-
),
|
|
4195
|
+
), Ue = () => {
|
|
4192
4196
|
const { t: u } = zu(), { connectionState: D, setConnectionState: f } = du(), { colors: e } = iu(), t = () => {
|
|
4193
4197
|
D === 0 && f(1);
|
|
4194
4198
|
}, n = D > 0;
|
|
@@ -4197,8 +4201,8 @@ const xe = (u, D) => {
|
|
|
4197
4201
|
{
|
|
4198
4202
|
className: "sc-chat--disconnected-icon-wrapper",
|
|
4199
4203
|
style: { backgroundColor: e.messageList.bg },
|
|
4200
|
-
children: n ? /* @__PURE__ */ a.jsx(
|
|
4201
|
-
/* @__PURE__ */ a.jsx(
|
|
4204
|
+
children: n ? /* @__PURE__ */ a.jsx(ze, { className: "loading-image" }) : /* @__PURE__ */ a.jsxs("div", { className: "sc-chat--disconnected-icon", children: [
|
|
4205
|
+
/* @__PURE__ */ a.jsx(qe, {}),
|
|
4202
4206
|
/* @__PURE__ */ a.jsx(
|
|
4203
4207
|
"h3",
|
|
4204
4208
|
{
|
|
@@ -4230,7 +4234,7 @@ function j1() {
|
|
|
4230
4234
|
(function(f, e) {
|
|
4231
4235
|
u.exports = e();
|
|
4232
4236
|
})(dD, function() {
|
|
4233
|
-
var f = 1e3, e = 6e4, t = 36e5, n = "millisecond", r = "second", s = "minute", F = "hour", d = "day", o = "week", c = "month", l = "quarter", j = "year",
|
|
4237
|
+
var f = 1e3, e = 6e4, t = 36e5, n = "millisecond", r = "second", s = "minute", F = "hour", d = "day", o = "week", c = "month", l = "quarter", j = "year", v = "date", C = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, x = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(k) {
|
|
4234
4238
|
var E = ["th", "st", "nd", "rd"], h = k % 100;
|
|
4235
4239
|
return "[" + k + (E[(h - 20) % 10] || E[h] || E[0]) + "]";
|
|
4236
4240
|
} }, T = function(k, E, h) {
|
|
@@ -4246,14 +4250,14 @@ function j1() {
|
|
|
4246
4250
|
}, a: function(k) {
|
|
4247
4251
|
return k < 0 ? Math.ceil(k) || 0 : Math.floor(k);
|
|
4248
4252
|
}, p: function(k) {
|
|
4249
|
-
return { M: c, y: j, w: o, d, D:
|
|
4253
|
+
return { M: c, y: j, w: o, d, D: v, h: F, m: s, s: r, ms: n, Q: l }[k] || String(k || "").toLowerCase().replace(/s$/, "");
|
|
4250
4254
|
}, u: function(k) {
|
|
4251
4255
|
return k === void 0;
|
|
4252
4256
|
} }, B = "en", I = {};
|
|
4253
|
-
I[B] =
|
|
4257
|
+
I[B] = g;
|
|
4254
4258
|
var P = "$isDayjsObject", q = function(k) {
|
|
4255
4259
|
return k instanceof hu || !(!k || !k[P]);
|
|
4256
|
-
},
|
|
4260
|
+
}, m = function k(E, h, A) {
|
|
4257
4261
|
var p;
|
|
4258
4262
|
if (!E) return B;
|
|
4259
4263
|
if (typeof E == "string") {
|
|
@@ -4271,12 +4275,12 @@ function j1() {
|
|
|
4271
4275
|
var h = typeof E == "object" ? E : {};
|
|
4272
4276
|
return h.date = k, h.args = arguments, new hu(h);
|
|
4273
4277
|
}, L = _;
|
|
4274
|
-
L.l =
|
|
4278
|
+
L.l = m, L.i = q, L.w = function(k, E) {
|
|
4275
4279
|
return O(k, { locale: E.$L, utc: E.$u, x: E.$x, $offset: E.$offset });
|
|
4276
4280
|
};
|
|
4277
4281
|
var hu = function() {
|
|
4278
4282
|
function k(h) {
|
|
4279
|
-
this.$L =
|
|
4283
|
+
this.$L = m(h.locale, null, !0), this.parse(h), this.$x = this.$x || h.x || {}, this[P] = !0;
|
|
4280
4284
|
}
|
|
4281
4285
|
var E = k.prototype;
|
|
4282
4286
|
return E.parse = function(h) {
|
|
@@ -4286,7 +4290,7 @@ function j1() {
|
|
|
4286
4290
|
if (L.u(p)) return /* @__PURE__ */ new Date();
|
|
4287
4291
|
if (p instanceof Date) return new Date(p);
|
|
4288
4292
|
if (typeof p == "string" && !/Z$/i.test(p)) {
|
|
4289
|
-
var N = p.match(
|
|
4293
|
+
var N = p.match(y);
|
|
4290
4294
|
if (N) {
|
|
4291
4295
|
var M = N[2] - 1 || 0, V = (N[7] || "0").substring(0, 3);
|
|
4292
4296
|
return R ? new Date(Date.UTC(N[1], M, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, V)) : new Date(N[1], M, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, V);
|
|
@@ -4330,7 +4334,7 @@ function j1() {
|
|
|
4330
4334
|
var Cu = this.$locale().weekStart || 0, _u = (J < Cu ? J + 7 : J) - Cu;
|
|
4331
4335
|
return M(R ? Q - _u : Q + (6 - _u), z);
|
|
4332
4336
|
case d:
|
|
4333
|
-
case
|
|
4337
|
+
case v:
|
|
4334
4338
|
return V(tu + "Hours", 0);
|
|
4335
4339
|
case F:
|
|
4336
4340
|
return V(tu + "Minutes", 1);
|
|
@@ -4344,10 +4348,10 @@ function j1() {
|
|
|
4344
4348
|
}, E.endOf = function(h) {
|
|
4345
4349
|
return this.startOf(h, !1);
|
|
4346
4350
|
}, E.$set = function(h, A) {
|
|
4347
|
-
var p, R = L.p(h), N = "set" + (this.$u ? "UTC" : ""), M = (p = {}, p[d] = N + "Date", p[
|
|
4351
|
+
var p, R = L.p(h), N = "set" + (this.$u ? "UTC" : ""), M = (p = {}, p[d] = N + "Date", p[v] = N + "Date", p[c] = N + "Month", p[j] = N + "FullYear", p[F] = N + "Hours", p[s] = N + "Minutes", p[r] = N + "Seconds", p[n] = N + "Milliseconds", p)[R], V = R === d ? this.$D + (A - this.$W) : A;
|
|
4348
4352
|
if (R === c || R === j) {
|
|
4349
|
-
var J = this.clone().set(
|
|
4350
|
-
J.$d[M](V), J.init(), this.$d = J.set(
|
|
4353
|
+
var J = this.clone().set(v, 1);
|
|
4354
|
+
J.$d[M](V), J.init(), this.$d = J.set(v, Math.min(this.$D, J.daysInMonth())).$d;
|
|
4351
4355
|
} else M && this.$d[M](V);
|
|
4352
4356
|
return this.init(), this;
|
|
4353
4357
|
}, E.set = function(h, A) {
|
|
@@ -4476,7 +4480,7 @@ function j1() {
|
|
|
4476
4480
|
return I[this.$L];
|
|
4477
4481
|
}, E.locale = function(h, A) {
|
|
4478
4482
|
if (!h) return this.$L;
|
|
4479
|
-
var p = this.clone(), R =
|
|
4483
|
+
var p = this.clone(), R = m(h, A, !0);
|
|
4480
4484
|
return R && (p.$L = R), p;
|
|
4481
4485
|
}, E.clone = function() {
|
|
4482
4486
|
return L.w(this.$d, this);
|
|
@@ -4490,21 +4494,21 @@ function j1() {
|
|
|
4490
4494
|
return this.$d.toUTCString();
|
|
4491
4495
|
}, k;
|
|
4492
4496
|
}(), fu = hu.prototype;
|
|
4493
|
-
return O.prototype = fu, [["$ms", n], ["$s", r], ["$m", s], ["$H", F], ["$W", d], ["$M", c], ["$y", j], ["$D",
|
|
4497
|
+
return O.prototype = fu, [["$ms", n], ["$s", r], ["$m", s], ["$H", F], ["$W", d], ["$M", c], ["$y", j], ["$D", v]].forEach(function(k) {
|
|
4494
4498
|
fu[k[1]] = function(E) {
|
|
4495
4499
|
return this.$g(E, k[0], k[1]);
|
|
4496
4500
|
};
|
|
4497
4501
|
}), O.extend = function(k, E) {
|
|
4498
4502
|
return k.$i || (k(E, hu, O), k.$i = !0), O;
|
|
4499
|
-
}, O.locale =
|
|
4503
|
+
}, O.locale = m, O.isDayjs = q, O.unix = function(k) {
|
|
4500
4504
|
return O(1e3 * k);
|
|
4501
4505
|
}, O.en = I[B], O.Ls = I, O.p = {}, O;
|
|
4502
4506
|
});
|
|
4503
4507
|
}(zD)), zD.exports;
|
|
4504
4508
|
}
|
|
4505
|
-
var
|
|
4506
|
-
const S1 = /* @__PURE__ */ Ff(
|
|
4507
|
-
var
|
|
4509
|
+
var Ve = j1();
|
|
4510
|
+
const S1 = /* @__PURE__ */ Ff(Ve);
|
|
4511
|
+
var He = { exports: {} };
|
|
4508
4512
|
(function(u, D) {
|
|
4509
4513
|
(function(f, e) {
|
|
4510
4514
|
u.exports = e();
|
|
@@ -4514,8 +4518,8 @@ var Ve = { exports: {} };
|
|
|
4514
4518
|
return "[" + f + (e[(t - 20) % 10] || e[t] || e[0]) + "]";
|
|
4515
4519
|
} };
|
|
4516
4520
|
});
|
|
4517
|
-
})(
|
|
4518
|
-
var
|
|
4521
|
+
})(He);
|
|
4522
|
+
var We = { exports: {} };
|
|
4519
4523
|
(function(u, D) {
|
|
4520
4524
|
(function(f, e) {
|
|
4521
4525
|
u.exports = e(j1());
|
|
@@ -4528,7 +4532,7 @@ var He = { exports: {} };
|
|
|
4528
4532
|
} };
|
|
4529
4533
|
return t.default.locale(n, null, !0), n;
|
|
4530
4534
|
});
|
|
4531
|
-
})(
|
|
4535
|
+
})(We);
|
|
4532
4536
|
var T1 = { exports: {} };
|
|
4533
4537
|
(function(u, D) {
|
|
4534
4538
|
(function(f, e) {
|
|
@@ -4541,19 +4545,19 @@ var T1 = { exports: {} };
|
|
|
4541
4545
|
return n.fromToBase(d, o, c, l);
|
|
4542
4546
|
}
|
|
4543
4547
|
t.en.relativeTime = r, n.fromToBase = function(d, o, c, l, j) {
|
|
4544
|
-
for (var
|
|
4545
|
-
var B =
|
|
4546
|
-
B.d && (
|
|
4547
|
-
var I = (f.rounding || Math.round)(Math.abs(
|
|
4548
|
-
if (
|
|
4549
|
-
I <= 1 && _ > 0 && (B =
|
|
4548
|
+
for (var v, C, y, x = c.$locale().relativeTime || r, g = f.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], T = g.length, _ = 0; _ < T; _ += 1) {
|
|
4549
|
+
var B = g[_];
|
|
4550
|
+
B.d && (v = l ? t(d).diff(c, B.d, !0) : c.diff(d, B.d, !0));
|
|
4551
|
+
var I = (f.rounding || Math.round)(Math.abs(v));
|
|
4552
|
+
if (y = v > 0, I <= B.r || !B.r) {
|
|
4553
|
+
I <= 1 && _ > 0 && (B = g[_ - 1]);
|
|
4550
4554
|
var P = x[B.l];
|
|
4551
|
-
j && (I = j("" + I)), C = typeof P == "string" ? P.replace("%d", I) : P(I, o, B.l,
|
|
4555
|
+
j && (I = j("" + I)), C = typeof P == "string" ? P.replace("%d", I) : P(I, o, B.l, y);
|
|
4552
4556
|
break;
|
|
4553
4557
|
}
|
|
4554
4558
|
}
|
|
4555
4559
|
if (o) return C;
|
|
4556
|
-
var q =
|
|
4560
|
+
var q = y ? x.future : x.past;
|
|
4557
4561
|
return typeof q == "function" ? q(C) : q.replace("%s", C);
|
|
4558
4562
|
}, n.to = function(d, o) {
|
|
4559
4563
|
return s(d, o, this, !0);
|
|
@@ -4571,8 +4575,8 @@ var T1 = { exports: {} };
|
|
|
4571
4575
|
};
|
|
4572
4576
|
});
|
|
4573
4577
|
})(T1);
|
|
4574
|
-
var
|
|
4575
|
-
const
|
|
4578
|
+
var Ye = T1.exports;
|
|
4579
|
+
const Ke = /* @__PURE__ */ Ff(Ye), N1 = ({
|
|
4576
4580
|
width: u = "18",
|
|
4577
4581
|
height: D = "18",
|
|
4578
4582
|
...f
|
|
@@ -4667,10 +4671,10 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
|
|
|
4667
4671
|
},
|
|
4668
4672
|
F
|
|
4669
4673
|
)) });
|
|
4670
|
-
},
|
|
4671
|
-
let D =
|
|
4672
|
-
return D =
|
|
4673
|
-
},
|
|
4674
|
+
}, Je = (u, D = 100) => u.length > D ? u.substr(0, D) + "..." : u, Ge = (u) => u.replace(/\n/g, "<br />"), Xe = (u) => {
|
|
4675
|
+
let D = Je(u, 50);
|
|
4676
|
+
return D = Ge(u), D;
|
|
4677
|
+
}, Ze = ({ message: u }) => /* @__PURE__ */ a.jsx("div", { className: "sc-message--carousel-element-wrapper", children: /* @__PURE__ */ a.jsxs("div", { className: "sc-message--carousel-element", children: [
|
|
4674
4678
|
u.image_url && /* @__PURE__ */ a.jsx(
|
|
4675
4679
|
"div",
|
|
4676
4680
|
{
|
|
@@ -4684,7 +4688,7 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
|
|
|
4684
4688
|
"p",
|
|
4685
4689
|
{
|
|
4686
4690
|
dangerouslySetInnerHTML: {
|
|
4687
|
-
__html:
|
|
4691
|
+
__html: Xe(u.subtitle)
|
|
4688
4692
|
}
|
|
4689
4693
|
}
|
|
4690
4694
|
)
|
|
@@ -4695,7 +4699,7 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
|
|
|
4695
4699
|
message: { data: { buttons: u.buttons } }
|
|
4696
4700
|
}
|
|
4697
4701
|
)
|
|
4698
|
-
] }) }),
|
|
4702
|
+
] }) }), Qe = ({
|
|
4699
4703
|
messageCarousel: u
|
|
4700
4704
|
}) => {
|
|
4701
4705
|
const { colors: D } = iu(), [f, e] = U(0), t = u.data.elements, n = () => {
|
|
@@ -4719,7 +4723,7 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
|
|
|
4719
4723
|
{
|
|
4720
4724
|
className: "sc-message--carousel-inner",
|
|
4721
4725
|
style: { transform: `translateX(-${f * 100}%)` },
|
|
4722
|
-
children: t.map((d, o) => /* @__PURE__ */ a.jsx(
|
|
4726
|
+
children: t.map((d, o) => /* @__PURE__ */ a.jsx(Ze, { message: d, idx: o }, o))
|
|
4723
4727
|
}
|
|
4724
4728
|
),
|
|
4725
4729
|
F && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -4743,14 +4747,14 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
|
|
|
4743
4747
|
]
|
|
4744
4748
|
}
|
|
4745
4749
|
);
|
|
4746
|
-
},
|
|
4750
|
+
}, u3 = ({
|
|
4747
4751
|
viewBox: u = "0 0 512 512",
|
|
4748
4752
|
...D
|
|
4749
4753
|
}) => /* @__PURE__ */ a.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: u, ...D, children: /* @__PURE__ */ a.jsxs("g", { "data-name": "1", children: [
|
|
4750
4754
|
/* @__PURE__ */ a.jsx("path", { d: "M378.83 450H150a50.17 50.17 0 01-50.11-50.11V98.11A50.17 50.17 0 01150 48h150.1a15 15 0 0110.61 4.39l113.84 113.88a15 15 0 014.39 10.61v223A50.17 50.17 0 01378.83 450zM150 78a20.13 20.13 0 00-20.11 20.11v301.78A20.13 20.13 0 00150 420h228.83a20.13 20.13 0 0020.11-20.11v-216.8L293.85 78z" }),
|
|
4751
4755
|
/* @__PURE__ */ a.jsx("path", { d: "M413.94 191.88h-78.77a50.17 50.17 0 01-50.11-50.11V63a15 15 0 0130 0v78.77a20.13 20.13 0 0020.11 20.11h78.77a15 15 0 010 30zM264.4 375a15 15 0 01-10.61-4.4l-54.45-54.44a15 15 0 1121.21-21.22l43.85 43.84 43.84-43.84a15 15 0 1121.21 21.22L275 370.55a15 15 0 01-10.6 4.45z" }),
|
|
4752
4756
|
/* @__PURE__ */ a.jsx("path", { d: "M264.4 365a15 15 0 01-15-15V231a15 15 0 0130 0v119a15 15 0 01-15 15z" })
|
|
4753
|
-
] }) }),
|
|
4757
|
+
] }) }), D3 = ({ message: u }) => {
|
|
4754
4758
|
const { t: D } = zu(), { colors: f } = iu(), e = f[u.direction || uu.received];
|
|
4755
4759
|
if (!("type" in u.data))
|
|
4756
4760
|
throw new Error("Unable to detect type for file message");
|
|
@@ -4790,7 +4794,7 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
|
|
|
4790
4794
|
rel: "noopener noreferrer",
|
|
4791
4795
|
download: !0,
|
|
4792
4796
|
children: [
|
|
4793
|
-
/* @__PURE__ */ a.jsx(
|
|
4797
|
+
/* @__PURE__ */ a.jsx(u3, {}),
|
|
4794
4798
|
D("messages.file_message.download")
|
|
4795
4799
|
]
|
|
4796
4800
|
}
|
|
@@ -4800,9 +4804,9 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
|
|
|
4800
4804
|
]
|
|
4801
4805
|
}
|
|
4802
4806
|
);
|
|
4803
|
-
},
|
|
4807
|
+
}, f3 = ({ message: u }) => {
|
|
4804
4808
|
var d;
|
|
4805
|
-
const { colors: D } = iu(), f = Nu(), [e, t] = U(!1), n =
|
|
4809
|
+
const { colors: D } = iu(), f = Nu(), [e, t] = U(!1), n = gu(null);
|
|
4806
4810
|
if (Z(() => {
|
|
4807
4811
|
const o = new IntersectionObserver((c) => {
|
|
4808
4812
|
!e && c[0].intersectionRatio > 0 && t(!0);
|
|
@@ -4838,7 +4842,7 @@ const Ye = /* @__PURE__ */ Ff(We), N1 = ({
|
|
|
4838
4842
|
)
|
|
4839
4843
|
}
|
|
4840
4844
|
);
|
|
4841
|
-
},
|
|
4845
|
+
}, e3 = ({ messageList: u }) => {
|
|
4842
4846
|
const { colors: D } = iu(), f = (r) => {
|
|
4843
4847
|
let s = e(r, 50);
|
|
4844
4848
|
return s = t(r), s;
|
|
@@ -4935,7 +4939,7 @@ var Fu = function() {
|
|
|
4935
4939
|
return D;
|
|
4936
4940
|
}, Fu.apply(this, arguments);
|
|
4937
4941
|
};
|
|
4938
|
-
function
|
|
4942
|
+
function t3(u, D) {
|
|
4939
4943
|
var f = typeof Symbol == "function" && u[Symbol.iterator];
|
|
4940
4944
|
if (!f) return u;
|
|
4941
4945
|
var e = f.call(u), t, n = [], r;
|
|
@@ -4952,16 +4956,16 @@ function e3(u, D) {
|
|
|
4952
4956
|
}
|
|
4953
4957
|
return n;
|
|
4954
4958
|
}
|
|
4955
|
-
function
|
|
4959
|
+
function n3(u, D, f) {
|
|
4956
4960
|
if (f || arguments.length === 2) for (var e = 0, t = D.length, n; e < t; e++)
|
|
4957
4961
|
(n || !(e in D)) && (n || (n = Array.prototype.slice.call(D, 0, e)), n[e] = D[e]);
|
|
4958
4962
|
return u.concat(n || Array.prototype.slice.call(D));
|
|
4959
4963
|
}
|
|
4960
|
-
var
|
|
4964
|
+
var r3 = "4.1.5", a3 = Object.prototype.hasOwnProperty;
|
|
4961
4965
|
function wu(u) {
|
|
4962
4966
|
return typeof u == "boolean";
|
|
4963
4967
|
}
|
|
4964
|
-
function
|
|
4968
|
+
function s3(u, D, f) {
|
|
4965
4969
|
var e;
|
|
4966
4970
|
return u.length > D && (f == null ? (f = "…", e = 3) : e = f.length, u = u.substring(0, D - e) + f), u;
|
|
4967
4971
|
}
|
|
@@ -4969,7 +4973,7 @@ function Ku(u, D) {
|
|
|
4969
4973
|
for (var f = u.length - 1; f >= 0; f--)
|
|
4970
4974
|
D(u[f]) === !0 && u.splice(f, 1);
|
|
4971
4975
|
}
|
|
4972
|
-
function
|
|
4976
|
+
function Gu(u) {
|
|
4973
4977
|
throw new Error("Unhandled case for value: '".concat(u, "'"));
|
|
4974
4978
|
}
|
|
4975
4979
|
var bD = /\s+/, O1 = (
|
|
@@ -5021,16 +5025,16 @@ var bD = /\s+/, O1 = (
|
|
|
5021
5025
|
}, u.prototype.buildAttrsStr = function() {
|
|
5022
5026
|
var D = this.getAttrs(), f = [];
|
|
5023
5027
|
for (var e in D)
|
|
5024
|
-
|
|
5028
|
+
a3.call(D, e) && f.push(e + '="' + D[e] + '"');
|
|
5025
5029
|
return f.join(" ");
|
|
5026
5030
|
}, u;
|
|
5027
5031
|
}()
|
|
5028
5032
|
);
|
|
5029
|
-
function
|
|
5033
|
+
function F3(u, D, f) {
|
|
5030
5034
|
var e, t;
|
|
5031
5035
|
if (f == null ? (f = "…", t = 3, e = 8) : (t = f.length, e = f.length), u.length <= D)
|
|
5032
5036
|
return u;
|
|
5033
|
-
var n = D - t, r =
|
|
5037
|
+
var n = D - t, r = i3(u);
|
|
5034
5038
|
if (r.query) {
|
|
5035
5039
|
var s = r.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);
|
|
5036
5040
|
s && (r.query = r.query.substr(0, s[1].length), u = Wf(r));
|
|
@@ -5066,10 +5070,10 @@ function s3(u, D, f) {
|
|
|
5066
5070
|
}
|
|
5067
5071
|
if (F.length <= D)
|
|
5068
5072
|
return F;
|
|
5069
|
-
var
|
|
5070
|
-
return n > 0 && (
|
|
5073
|
+
var v = "";
|
|
5074
|
+
return n > 0 && (v = F.substr(-1 * Math.floor(n / 2))), (F.substr(0, Math.ceil(n / 2)) + f + v).substr(0, n + e);
|
|
5071
5075
|
}
|
|
5072
|
-
function
|
|
5076
|
+
function i3(u) {
|
|
5073
5077
|
var D = {}, f = u, e = f.match(/^([a-z]+):\/\//i);
|
|
5074
5078
|
return e && (D.scheme = e[1], f = f.slice(e[0].length)), e = f.match(/^(.*?)(?=(\?|#|\/|$))/i), e && (D.host = e[1], f = f.slice(e[0].length)), e = f.match(/^\/(.*?)(?=(\?|#|$))/i), e && (D.path = e[1], f = f.slice(e[0].length)), e = f.match(/^\?(.*?)(?=(#|$))/i), e && (D.query = e[1], f = f.slice(e[0].length)), e = f.match(/^#(.*?)$/i), e && (D.fragment = e[1]), D;
|
|
5075
5079
|
}
|
|
@@ -5081,7 +5085,7 @@ function UD(u, D, f) {
|
|
|
5081
5085
|
var e = D / 2, t = Math.ceil(e), n = -1 * Math.floor(e), r = "";
|
|
5082
5086
|
return n < 0 && (r = u.substr(n)), u.substr(0, t) + f + r;
|
|
5083
5087
|
}
|
|
5084
|
-
function
|
|
5088
|
+
function o3(u, D, f) {
|
|
5085
5089
|
if (u.length <= D)
|
|
5086
5090
|
return u;
|
|
5087
5091
|
var e, t;
|
|
@@ -5089,10 +5093,10 @@ function i3(u, D, f) {
|
|
|
5089
5093
|
var n = D - t, r = "";
|
|
5090
5094
|
return n > 0 && (r = u.substr(-1 * Math.floor(n / 2))), (u.substr(0, Math.ceil(n / 2)) + f + r).substr(0, n + e);
|
|
5091
5095
|
}
|
|
5092
|
-
function
|
|
5093
|
-
return
|
|
5096
|
+
function d3(u, D, f) {
|
|
5097
|
+
return s3(u, D, f);
|
|
5094
5098
|
}
|
|
5095
|
-
var
|
|
5099
|
+
var C3 = (
|
|
5096
5100
|
/** @class */
|
|
5097
5101
|
function() {
|
|
5098
5102
|
function u(D) {
|
|
@@ -5125,7 +5129,7 @@ var d3 = (
|
|
|
5125
5129
|
if (!f.length)
|
|
5126
5130
|
return D;
|
|
5127
5131
|
var e = f.length, t = f.location;
|
|
5128
|
-
return t === "smart" ?
|
|
5132
|
+
return t === "smart" ? F3(D, e) : t === "middle" ? o3(D, e) : d3(D, e);
|
|
5129
5133
|
}, u;
|
|
5130
5134
|
}()
|
|
5131
5135
|
), cD = (
|
|
@@ -5147,7 +5151,7 @@ var d3 = (
|
|
|
5147
5151
|
}, u;
|
|
5148
5152
|
}()
|
|
5149
5153
|
);
|
|
5150
|
-
function
|
|
5154
|
+
function c3(u) {
|
|
5151
5155
|
return u >= 0 && u <= 31 || u == 127;
|
|
5152
5156
|
}
|
|
5153
5157
|
function rD(u) {
|
|
@@ -5159,39 +5163,39 @@ function Eu(u) {
|
|
|
5159
5163
|
function bf(u) {
|
|
5160
5164
|
return u == 34 || u == 39;
|
|
5161
5165
|
}
|
|
5162
|
-
function
|
|
5166
|
+
function Xu(u) {
|
|
5163
5167
|
return u < 8232 ? u < 160 ? u >= 9 && u <= 13 || u == 32 : u < 5760 ? u == 160 : u == 5760 || u >= 8192 && u <= 8202 : u < 8287 ? u >= 8232 && u <= 8233 || u == 8239 : u < 12288 ? u == 8287 : u == 12288 || u == 65279;
|
|
5164
5168
|
}
|
|
5165
|
-
function
|
|
5169
|
+
function Zu(u) {
|
|
5166
5170
|
return u < 4800 ? u < 2949 ? u < 2451 ? u < 1425 ? u < 768 ? u < 192 ? u < 169 ? u < 65 ? u >= 48 && u <= 57 : u >= 65 && u <= 90 || u >= 97 && u <= 122 : u < 181 ? u >= 169 && u <= 170 || u == 174 : u == 181 || u == 186 : u < 710 ? u < 216 ? u >= 192 && u <= 214 : u >= 216 && u <= 246 || u >= 248 && u <= 705 : u < 748 ? u >= 710 && u <= 721 || u >= 736 && u <= 740 : u == 748 || u == 750 : u < 910 ? u < 895 ? u < 886 ? u >= 768 && u <= 884 : u >= 886 && u <= 887 || u >= 890 && u <= 893 : u < 904 ? u == 895 || u == 902 : u >= 904 && u <= 906 || u == 908 : u < 1155 ? u < 931 ? u >= 910 && u <= 929 : u >= 931 && u <= 1013 || u >= 1015 && u <= 1153 : u < 1369 ? u >= 1155 && u <= 1327 || u >= 1329 && u <= 1366 : u == 1369 || u >= 1377 && u <= 1415 : u < 1808 ? u < 1552 ? u < 1476 ? u < 1471 ? u >= 1425 && u <= 1469 : u == 1471 || u >= 1473 && u <= 1474 : u < 1488 ? u >= 1476 && u <= 1477 || u == 1479 : u >= 1488 && u <= 1514 || u >= 1520 && u <= 1522 : u < 1749 ? u < 1568 ? u >= 1552 && u <= 1562 : u >= 1568 && u <= 1641 || u >= 1646 && u <= 1747 : u < 1770 ? u >= 1749 && u <= 1756 || u >= 1759 && u <= 1768 : u >= 1770 && u <= 1788 || u == 1791 : u < 2230 ? u < 2042 ? u < 1869 ? u >= 1808 && u <= 1866 : u >= 1869 && u <= 1969 || u >= 1984 && u <= 2037 : u < 2112 ? u == 2042 || u >= 2048 && u <= 2093 : u >= 2112 && u <= 2139 || u >= 2208 && u <= 2228 : u < 2406 ? u < 2260 ? u >= 2230 && u <= 2237 : u >= 2260 && u <= 2273 || u >= 2275 && u <= 2403 : u < 2437 ? u >= 2406 && u <= 2415 || u >= 2417 && u <= 2435 : u >= 2437 && u <= 2444 || u >= 2447 && u <= 2448 : u < 2693 ? u < 2579 ? u < 2519 ? u < 2486 ? u < 2474 ? u >= 2451 && u <= 2472 : u >= 2474 && u <= 2480 || u == 2482 : u < 2503 ? u >= 2486 && u <= 2489 || u >= 2492 && u <= 2500 : u >= 2503 && u <= 2504 || u >= 2507 && u <= 2510 : u < 2534 ? u < 2524 ? u == 2519 : u >= 2524 && u <= 2525 || u >= 2527 && u <= 2531 : u < 2565 ? u >= 2534 && u <= 2545 || u >= 2561 && u <= 2563 : u >= 2565 && u <= 2570 || u >= 2575 && u <= 2576 : u < 2631 ? u < 2613 ? u < 2602 ? u >= 2579 && u <= 2600 : u >= 2602 && u <= 2608 || u >= 2610 && u <= 2611 : u < 2620 ? u >= 2613 && u <= 2614 || u >= 2616 && u <= 2617 : u == 2620 || u >= 2622 && u <= 2626 : u < 2649 ? u < 2635 ? u >= 2631 && u <= 2632 : u >= 2635 && u <= 2637 || u == 2641 : u < 2662 ? u >= 2649 && u <= 2652 || u == 2654 : u >= 2662 && u <= 2677 || u >= 2689 && u <= 2691 : u < 2821 ? u < 2759 ? u < 2730 ? u < 2703 ? u >= 2693 && u <= 2701 : u >= 2703 && u <= 2705 || u >= 2707 && u <= 2728 : u < 2741 ? u >= 2730 && u <= 2736 || u >= 2738 && u <= 2739 : u >= 2741 && u <= 2745 || u >= 2748 && u <= 2757 : u < 2784 ? u < 2763 ? u >= 2759 && u <= 2761 : u >= 2763 && u <= 2765 || u == 2768 : u < 2809 ? u >= 2784 && u <= 2787 || u >= 2790 && u <= 2799 : u == 2809 || u >= 2817 && u <= 2819 : u < 2887 ? u < 2858 ? u < 2831 ? u >= 2821 && u <= 2828 : u >= 2831 && u <= 2832 || u >= 2835 && u <= 2856 : u < 2869 ? u >= 2858 && u <= 2864 || u >= 2866 && u <= 2867 : u >= 2869 && u <= 2873 || u >= 2876 && u <= 2884 : u < 2911 ? u < 2902 ? u >= 2887 && u <= 2888 || u >= 2891 && u <= 2893 : u >= 2902 && u <= 2903 || u >= 2908 && u <= 2909 : u < 2929 ? u >= 2911 && u <= 2915 || u >= 2918 && u <= 2927 : u == 2929 || u >= 2946 && u <= 2947 : u < 3517 ? u < 3205 ? u < 3046 ? u < 2984 ? u < 2969 ? u < 2958 ? u >= 2949 && u <= 2954 : u >= 2958 && u <= 2960 || u >= 2962 && u <= 2965 : u < 2974 ? u >= 2969 && u <= 2970 || u == 2972 : u >= 2974 && u <= 2975 || u >= 2979 && u <= 2980 : u < 3014 ? u < 2990 ? u >= 2984 && u <= 2986 : u >= 2990 && u <= 3001 || u >= 3006 && u <= 3010 : u < 3024 ? u >= 3014 && u <= 3016 || u >= 3018 && u <= 3021 : u == 3024 || u == 3031 : u < 3142 ? u < 3086 ? u < 3072 ? u >= 3046 && u <= 3055 : u >= 3072 && u <= 3075 || u >= 3077 && u <= 3084 : u < 3114 ? u >= 3086 && u <= 3088 || u >= 3090 && u <= 3112 : u >= 3114 && u <= 3129 || u >= 3133 && u <= 3140 : u < 3160 ? u < 3146 ? u >= 3142 && u <= 3144 : u >= 3146 && u <= 3149 || u >= 3157 && u <= 3158 : u < 3174 ? u >= 3160 && u <= 3162 || u >= 3168 && u <= 3171 : u >= 3174 && u <= 3183 || u >= 3200 && u <= 3203 : u < 3333 ? u < 3274 ? u < 3242 ? u < 3214 ? u >= 3205 && u <= 3212 : u >= 3214 && u <= 3216 || u >= 3218 && u <= 3240 : u < 3260 ? u >= 3242 && u <= 3251 || u >= 3253 && u <= 3257 : u >= 3260 && u <= 3268 || u >= 3270 && u <= 3272 : u < 3296 ? u < 3285 ? u >= 3274 && u <= 3277 : u >= 3285 && u <= 3286 || u == 3294 : u < 3313 ? u >= 3296 && u <= 3299 || u >= 3302 && u <= 3311 : u >= 3313 && u <= 3314 || u >= 3329 && u <= 3331 : u < 3423 ? u < 3389 ? u < 3342 ? u >= 3333 && u <= 3340 : u >= 3342 && u <= 3344 || u >= 3346 && u <= 3386 : u < 3402 ? u >= 3389 && u <= 3396 || u >= 3398 && u <= 3400 : u >= 3402 && u <= 3406 || u >= 3412 && u <= 3415 : u < 3458 ? u < 3430 ? u >= 3423 && u <= 3427 : u >= 3430 && u <= 3439 || u >= 3450 && u <= 3455 : u < 3482 ? u >= 3458 && u <= 3459 || u >= 3461 && u <= 3478 : u >= 3482 && u <= 3505 || u >= 3507 && u <= 3515 : u < 3804 ? u < 3722 ? u < 3570 ? u < 3535 ? u < 3520 ? u == 3517 : u >= 3520 && u <= 3526 || u == 3530 : u < 3544 ? u >= 3535 && u <= 3540 || u == 3542 : u >= 3544 && u <= 3551 || u >= 3558 && u <= 3567 : u < 3664 ? u < 3585 ? u >= 3570 && u <= 3571 : u >= 3585 && u <= 3642 || u >= 3648 && u <= 3662 : u < 3716 ? u >= 3664 && u <= 3673 || u >= 3713 && u <= 3714 : u == 3716 || u >= 3719 && u <= 3720 : u < 3754 ? u < 3737 ? u < 3725 ? u == 3722 : u == 3725 || u >= 3732 && u <= 3735 : u < 3749 ? u >= 3737 && u <= 3743 || u >= 3745 && u <= 3747 : u == 3749 || u == 3751 : u < 3776 ? u < 3757 ? u >= 3754 && u <= 3755 : u >= 3757 && u <= 3769 || u >= 3771 && u <= 3773 : u < 3784 ? u >= 3776 && u <= 3780 || u == 3782 : u >= 3784 && u <= 3789 || u >= 3792 && u <= 3801 : u < 4176 ? u < 3902 ? u < 3872 ? u < 3840 ? u >= 3804 && u <= 3807 : u == 3840 || u >= 3864 && u <= 3865 : u < 3895 ? u >= 3872 && u <= 3881 || u == 3893 : u == 3895 || u == 3897 : u < 3974 ? u < 3913 ? u >= 3902 && u <= 3911 : u >= 3913 && u <= 3948 || u >= 3953 && u <= 3972 : u < 4038 ? u >= 3974 && u <= 3991 || u >= 3993 && u <= 4028 : u == 4038 || u >= 4096 && u <= 4169 : u < 4688 ? u < 4301 ? u < 4256 ? u >= 4176 && u <= 4253 : u >= 4256 && u <= 4293 || u == 4295 : u < 4348 ? u == 4301 || u >= 4304 && u <= 4346 : u >= 4348 && u <= 4680 || u >= 4682 && u <= 4685 : u < 4746 ? u < 4698 ? u >= 4688 && u <= 4694 || u == 4696 : u >= 4698 && u <= 4701 || u >= 4704 && u <= 4744 : u < 4786 ? u >= 4746 && u <= 4749 || u >= 4752 && u <= 4784 : u >= 4786 && u <= 4789 || u >= 4792 && u <= 4798 : u < 11035 ? u < 7416 ? u < 6176 ? u < 5873 ? u < 4992 ? u < 4824 ? u < 4802 ? u == 4800 : u >= 4802 && u <= 4805 || u >= 4808 && u <= 4822 : u < 4888 ? u >= 4824 && u <= 4880 || u >= 4882 && u <= 4885 : u >= 4888 && u <= 4954 || u >= 4957 && u <= 4959 : u < 5121 ? u < 5024 ? u >= 4992 && u <= 5007 : u >= 5024 && u <= 5109 || u >= 5112 && u <= 5117 : u < 5761 ? u >= 5121 && u <= 5740 || u >= 5743 && u <= 5759 : u >= 5761 && u <= 5786 || u >= 5792 && u <= 5866 : u < 6002 ? u < 5920 ? u < 5888 ? u >= 5873 && u <= 5880 : u >= 5888 && u <= 5900 || u >= 5902 && u <= 5908 : u < 5984 ? u >= 5920 && u <= 5940 || u >= 5952 && u <= 5971 : u >= 5984 && u <= 5996 || u >= 5998 && u <= 6e3 : u < 6108 ? u < 6016 ? u >= 6002 && u <= 6003 : u >= 6016 && u <= 6099 || u == 6103 : u < 6155 ? u >= 6108 && u <= 6109 || u >= 6112 && u <= 6121 : u >= 6155 && u <= 6157 || u >= 6160 && u <= 6169 : u < 6783 ? u < 6512 ? u < 6400 ? u < 6272 ? u >= 6176 && u <= 6263 : u >= 6272 && u <= 6314 || u >= 6320 && u <= 6389 : u < 6448 ? u >= 6400 && u <= 6430 || u >= 6432 && u <= 6443 : u >= 6448 && u <= 6459 || u >= 6470 && u <= 6509 : u < 6608 ? u < 6528 ? u >= 6512 && u <= 6516 : u >= 6528 && u <= 6571 || u >= 6576 && u <= 6601 : u < 6688 ? u >= 6608 && u <= 6617 || u >= 6656 && u <= 6683 : u >= 6688 && u <= 6750 || u >= 6752 && u <= 6780 : u < 7040 ? u < 6832 ? u < 6800 ? u >= 6783 && u <= 6793 : u >= 6800 && u <= 6809 || u == 6823 : u < 6992 ? u >= 6832 && u <= 6846 || u >= 6912 && u <= 6987 : u >= 6992 && u <= 7001 || u >= 7019 && u <= 7027 : u < 7245 ? u < 7168 ? u >= 7040 && u <= 7155 : u >= 7168 && u <= 7223 || u >= 7232 && u <= 7241 : u < 7376 ? u >= 7245 && u <= 7293 || u >= 7296 && u <= 7304 : u >= 7376 && u <= 7378 || u >= 7380 && u <= 7414 : u < 8450 ? u < 8130 ? u < 8025 ? u < 7960 ? u < 7424 ? u >= 7416 && u <= 7417 : u >= 7424 && u <= 7669 || u >= 7675 && u <= 7957 : u < 8008 ? u >= 7960 && u <= 7965 || u >= 7968 && u <= 8005 : u >= 8008 && u <= 8013 || u >= 8016 && u <= 8023 : u < 8031 ? u < 8027 ? u == 8025 : u == 8027 || u == 8029 : u < 8118 ? u >= 8031 && u <= 8061 || u >= 8064 && u <= 8116 : u >= 8118 && u <= 8124 || u == 8126 : u < 8205 ? u < 8150 ? u < 8134 ? u >= 8130 && u <= 8132 : u >= 8134 && u <= 8140 || u >= 8144 && u <= 8147 : u < 8178 ? u >= 8150 && u <= 8155 || u >= 8160 && u <= 8172 : u >= 8178 && u <= 8180 || u >= 8182 && u <= 8188 : u < 8305 ? u < 8252 ? u == 8205 : u == 8252 || u == 8265 : u < 8336 ? u == 8305 || u == 8319 : u >= 8336 && u <= 8348 || u >= 8400 && u <= 8432 : u < 8579 ? u < 8486 ? u < 8469 ? u < 8455 ? u == 8450 : u == 8455 || u >= 8458 && u <= 8467 : u < 8482 ? u == 8469 || u >= 8473 && u <= 8477 : u == 8482 || u == 8484 : u < 8495 ? u < 8488 ? u == 8486 : u == 8488 || u >= 8490 && u <= 8493 : u < 8517 ? u >= 8495 && u <= 8505 || u >= 8508 && u <= 8511 : u >= 8517 && u <= 8521 || u == 8526 : u < 9410 ? u < 9e3 ? u < 8592 ? u >= 8579 && u <= 8580 : u >= 8592 && u <= 8703 || u >= 8986 && u <= 8987 : u < 9193 ? u == 9e3 || u == 9167 : u >= 9193 && u <= 9203 || u >= 9208 && u <= 9210 : u < 9723 ? u < 9654 ? u == 9410 || u >= 9642 && u <= 9643 : u == 9654 || u == 9664 : u < 10548 ? u >= 9723 && u <= 9726 || u >= 9728 && u <= 10175 : u >= 10548 && u <= 10549 || u >= 11013 && u <= 11015 : u < 43259 ? u < 12445 ? u < 11688 ? u < 11520 ? u < 11264 ? u < 11088 ? u >= 11035 && u <= 11036 : u == 11088 || u == 11093 : u < 11360 ? u >= 11264 && u <= 11310 || u >= 11312 && u <= 11358 : u >= 11360 && u <= 11492 || u >= 11499 && u <= 11507 : u < 11568 ? u < 11559 ? u >= 11520 && u <= 11557 : u == 11559 || u == 11565 : u < 11647 ? u >= 11568 && u <= 11623 || u == 11631 : u >= 11647 && u <= 11670 || u >= 11680 && u <= 11686 : u < 11744 ? u < 11712 ? u < 11696 ? u >= 11688 && u <= 11694 : u >= 11696 && u <= 11702 || u >= 11704 && u <= 11710 : u < 11728 ? u >= 11712 && u <= 11718 || u >= 11720 && u <= 11726 : u >= 11728 && u <= 11734 || u >= 11736 && u <= 11742 : u < 12330 ? u < 11823 ? u >= 11744 && u <= 11775 : u == 11823 || u >= 12293 && u <= 12294 : u < 12353 ? u >= 12330 && u <= 12341 || u >= 12347 && u <= 12349 : u >= 12353 && u <= 12438 || u >= 12441 && u <= 12442 : u < 42512 ? u < 12951 ? u < 12549 ? u < 12449 ? u >= 12445 && u <= 12447 : u >= 12449 && u <= 12538 || u >= 12540 && u <= 12543 : u < 12704 ? u >= 12549 && u <= 12589 || u >= 12593 && u <= 12686 : u >= 12704 && u <= 12730 || u >= 12784 && u <= 12799 : u < 19968 ? u < 12953 ? u == 12951 : u == 12953 || u >= 13312 && u <= 19893 : u < 42192 ? u >= 19968 && u <= 40917 || u >= 40960 && u <= 42124 : u >= 42192 && u <= 42237 || u >= 42240 && u <= 42508 : u < 42891 ? u < 42623 ? u < 42560 ? u >= 42512 && u <= 42539 : u >= 42560 && u <= 42610 || u >= 42612 && u <= 42621 : u < 42775 ? u >= 42623 && u <= 42725 || u >= 42736 && u <= 42737 : u >= 42775 && u <= 42783 || u >= 42786 && u <= 42888 : u < 43072 ? u < 42928 ? u >= 42891 && u <= 42926 : u >= 42928 && u <= 42935 || u >= 42999 && u <= 43047 : u < 43216 ? u >= 43072 && u <= 43123 || u >= 43136 && u <= 43205 : u >= 43216 && u <= 43225 || u >= 43232 && u <= 43255 : u < 55243 ? u < 43744 ? u < 43488 ? u < 43312 ? u < 43261 ? u == 43259 : u == 43261 || u >= 43264 && u <= 43309 : u < 43392 ? u >= 43312 && u <= 43347 || u >= 43360 && u <= 43388 : u >= 43392 && u <= 43456 || u >= 43471 && u <= 43481 : u < 43600 ? u < 43520 ? u >= 43488 && u <= 43518 : u >= 43520 && u <= 43574 || u >= 43584 && u <= 43597 : u < 43642 ? u >= 43600 && u <= 43609 || u >= 43616 && u <= 43638 : u >= 43642 && u <= 43714 || u >= 43739 && u <= 43741 : u < 43824 ? u < 43785 ? u < 43762 ? u >= 43744 && u <= 43759 : u >= 43762 && u <= 43766 || u >= 43777 && u <= 43782 : u < 43808 ? u >= 43785 && u <= 43790 || u >= 43793 && u <= 43798 : u >= 43808 && u <= 43814 || u >= 43816 && u <= 43822 : u < 44012 ? u < 43868 ? u >= 43824 && u <= 43866 : u >= 43868 && u <= 43877 || u >= 43888 && u <= 44010 : u < 44032 ? u >= 44012 && u <= 44013 || u >= 44016 && u <= 44025 : u >= 44032 && u <= 55203 || u >= 55216 && u <= 55238 : u < 64848 ? u < 64298 ? u < 64112 ? u < 55296 ? u >= 55243 && u <= 55291 : u >= 55296 && u <= 57343 || u >= 63744 && u <= 64109 : u < 64275 ? u >= 64112 && u <= 64217 || u >= 64256 && u <= 64262 : u >= 64275 && u <= 64279 || u >= 64285 && u <= 64296 : u < 64320 ? u < 64312 ? u >= 64298 && u <= 64310 : u >= 64312 && u <= 64316 || u == 64318 : u < 64326 ? u >= 64320 && u <= 64321 || u >= 64323 && u <= 64324 : u >= 64326 && u <= 64433 || u >= 64467 && u <= 64829 : u < 65296 ? u < 65024 ? u < 64914 ? u >= 64848 && u <= 64911 : u >= 64914 && u <= 64967 || u >= 65008 && u <= 65019 : u < 65136 ? u >= 65024 && u <= 65039 || u >= 65056 && u <= 65071 : u >= 65136 && u <= 65140 || u >= 65142 && u <= 65276 : u < 65474 ? u < 65345 ? u >= 65296 && u <= 65305 || u >= 65313 && u <= 65338 : u >= 65345 && u <= 65370 || u >= 65382 && u <= 65470 : u < 65490 ? u >= 65474 && u <= 65479 || u >= 65482 && u <= 65487 : u >= 65490 && u <= 65495 || u >= 65498 && u <= 65500;
|
|
5167
5171
|
}
|
|
5168
|
-
function
|
|
5172
|
+
function l3(u) {
|
|
5169
5173
|
return u < 47 ? u < 42 ? u == 33 || u >= 35 && u <= 39 : u >= 42 && u <= 43 || u == 45 : u < 63 ? u == 47 || u == 61 : u < 94 ? u == 63 : u >= 94 && u <= 96 || u >= 123 && u <= 126;
|
|
5170
5174
|
}
|
|
5171
|
-
function
|
|
5175
|
+
function E3(u) {
|
|
5172
5176
|
return u < 91 ? u < 47 ? u >= 35 && u <= 43 || u == 45 : u < 61 ? u == 47 : u == 61 || u == 64 : u < 95 ? u == 91 || u == 93 : u < 123 ? u == 95 : u >= 123 && u <= 126 || u == 10003;
|
|
5173
5177
|
}
|
|
5174
5178
|
function R1(u) {
|
|
5175
5179
|
return u < 58 ? u < 44 ? u == 33 : u == 44 || u == 46 : u < 63 ? u >= 58 && u <= 59 : u == 63 || u == 94;
|
|
5176
5180
|
}
|
|
5177
|
-
function
|
|
5181
|
+
function h3(u) {
|
|
5178
5182
|
return u < 91 ? u == 40 : u == 91 || u == 123;
|
|
5179
5183
|
}
|
|
5180
5184
|
function Yf(u) {
|
|
5181
5185
|
return u < 93 ? u == 41 : u == 93 || u == 125;
|
|
5182
5186
|
}
|
|
5183
|
-
var h3 = /^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/, P1 = /https?:\/\//i, b3 = new RegExp("^" + P1.source, "i"), p3 = /^(javascript|vbscript):/i, B3 = /^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/, g3 = /^(?:\/\/)?([^/#?:]+)/, oD = rD;
|
|
5187
|
+
var b3 = /^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/, P1 = /https?:\/\//i, p3 = new RegExp("^" + P1.source, "i"), B3 = /^(javascript|vbscript):/i, m3 = /^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/, g3 = /^(?:\/\/)?([^/#?:]+)/, oD = rD;
|
|
5184
5188
|
function I1(u) {
|
|
5185
5189
|
return rD(u) || Eu(u) || u === 43 || // '+'
|
|
5186
5190
|
u === 45 || // '-'
|
|
5187
5191
|
u === 46;
|
|
5188
5192
|
}
|
|
5189
|
-
var Yu =
|
|
5193
|
+
var Yu = Zu;
|
|
5190
5194
|
function pf(u) {
|
|
5191
5195
|
return u === 95 || Yu(u);
|
|
5192
5196
|
}
|
|
5193
5197
|
function $1(u) {
|
|
5194
|
-
return
|
|
5198
|
+
return Zu(u) || E3(u) || R1(u);
|
|
5195
5199
|
}
|
|
5196
5200
|
function Bf(u) {
|
|
5197
5201
|
return u === 47 || // '/'
|
|
@@ -5199,18 +5203,18 @@ function Bf(u) {
|
|
|
5199
5203
|
u === 35;
|
|
5200
5204
|
}
|
|
5201
5205
|
function L1(u) {
|
|
5202
|
-
return
|
|
5206
|
+
return b3.test(u.toLowerCase());
|
|
5203
5207
|
}
|
|
5204
|
-
function
|
|
5205
|
-
if (
|
|
5208
|
+
function _3(u) {
|
|
5209
|
+
if (B3.test(u))
|
|
5206
5210
|
return !1;
|
|
5207
|
-
var D = u.match(
|
|
5211
|
+
var D = u.match(m3);
|
|
5208
5212
|
if (!D)
|
|
5209
5213
|
return !1;
|
|
5210
5214
|
var f = !!D[1], e = D[2];
|
|
5211
5215
|
return f ? !0 : !(e.indexOf(".") === -1 || !/[A-Za-z]/.test(e));
|
|
5212
5216
|
}
|
|
5213
|
-
function
|
|
5217
|
+
function y3(u) {
|
|
5214
5218
|
var D = u.match(g3);
|
|
5215
5219
|
if (!D)
|
|
5216
5220
|
return !1;
|
|
@@ -5220,12 +5224,12 @@ function _3(u) {
|
|
|
5220
5224
|
var t = e[e.length - 1];
|
|
5221
5225
|
return !!L1(t);
|
|
5222
5226
|
}
|
|
5223
|
-
var
|
|
5224
|
-
function
|
|
5225
|
-
var D = u.split(
|
|
5226
|
-
return
|
|
5227
|
+
var v3 = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, w3 = /[:/?#]/;
|
|
5228
|
+
function A3(u) {
|
|
5229
|
+
var D = u.split(w3, 1)[0];
|
|
5230
|
+
return v3.test(D);
|
|
5227
5231
|
}
|
|
5228
|
-
var
|
|
5232
|
+
var x3 = /^(https?:\/\/)?(?:www\.)?/i, k3 = /^\/\//, j3 = (
|
|
5229
5233
|
/** @class */
|
|
5230
5234
|
function(u) {
|
|
5231
5235
|
CD(D, u);
|
|
@@ -5248,23 +5252,23 @@ var A3 = /^(https?:\/\/)?(?:www\.)?/i, x3 = /^\/\//, k3 = (
|
|
|
5248
5252
|
return f.replace(/&/g, "&");
|
|
5249
5253
|
}, D.prototype.getAnchorText = function() {
|
|
5250
5254
|
var f = this.getMatchedText();
|
|
5251
|
-
return this.protocolRelativeMatch && (f =
|
|
5255
|
+
return this.protocolRelativeMatch && (f = N3(f)), this.stripPrefix.scheme && (f = S3(f)), this.stripPrefix.www && (f = T3(f)), this.stripTrailingSlash && (f = O3(f)), this.decodePercentEncoding && (f = R3(f)), f;
|
|
5252
5256
|
}, D;
|
|
5253
5257
|
}(cD)
|
|
5254
5258
|
);
|
|
5255
|
-
function j3(u) {
|
|
5256
|
-
return u.replace(b3, "");
|
|
5257
|
-
}
|
|
5258
5259
|
function S3(u) {
|
|
5259
|
-
return u.
|
|
5260
|
+
return u.replace(p3, "");
|
|
5260
5261
|
}
|
|
5261
5262
|
function T3(u) {
|
|
5262
|
-
return u.replace(x3, "");
|
|
5263
|
+
return u.includes("www.") ? u.replace(x3, "$1") : u;
|
|
5263
5264
|
}
|
|
5264
5265
|
function N3(u) {
|
|
5265
|
-
return u.
|
|
5266
|
+
return u.replace(k3, "");
|
|
5266
5267
|
}
|
|
5267
5268
|
function O3(u) {
|
|
5269
|
+
return u.charAt(u.length - 1) === "/" && (u = u.slice(0, -1)), u;
|
|
5270
|
+
}
|
|
5271
|
+
function R3(u) {
|
|
5268
5272
|
var D = u.replace(/%(?:22|26|27|3C|3E)/gi, function(f) {
|
|
5269
5273
|
return f === "%22" ? """ : f === "%26" ? "&" : f === "%27" ? "'" : f === "%3C" || f === "%3c" ? "<" : ">";
|
|
5270
5274
|
});
|
|
@@ -5275,15 +5279,15 @@ function O3(u) {
|
|
|
5275
5279
|
}
|
|
5276
5280
|
return D;
|
|
5277
5281
|
}
|
|
5278
|
-
var
|
|
5279
|
-
function
|
|
5280
|
-
return M1(u) ||
|
|
5282
|
+
var P3 = /^mailto:/i, M1 = Zu;
|
|
5283
|
+
function mf(u) {
|
|
5284
|
+
return M1(u) || l3(u);
|
|
5281
5285
|
}
|
|
5282
|
-
function
|
|
5286
|
+
function I3(u) {
|
|
5283
5287
|
var D = u.split(".").pop();
|
|
5284
5288
|
return L1(D);
|
|
5285
5289
|
}
|
|
5286
|
-
var
|
|
5290
|
+
var $3 = (
|
|
5287
5291
|
/** @class */
|
|
5288
5292
|
function(u) {
|
|
5289
5293
|
CD(D, u);
|
|
@@ -5303,18 +5307,18 @@ var I3 = (
|
|
|
5303
5307
|
}(cD)
|
|
5304
5308
|
);
|
|
5305
5309
|
function q1(u) {
|
|
5306
|
-
return u === 95 ||
|
|
5310
|
+
return u === 95 || Zu(u);
|
|
5307
5311
|
}
|
|
5308
|
-
function
|
|
5312
|
+
function L3(u) {
|
|
5309
5313
|
return u.length <= 140;
|
|
5310
5314
|
}
|
|
5311
|
-
var
|
|
5315
|
+
var M3 = [
|
|
5312
5316
|
"twitter",
|
|
5313
5317
|
"facebook",
|
|
5314
5318
|
"instagram",
|
|
5315
5319
|
"tiktok",
|
|
5316
5320
|
"youtube"
|
|
5317
|
-
],
|
|
5321
|
+
], q3 = (
|
|
5318
5322
|
/** @class */
|
|
5319
5323
|
function(u) {
|
|
5320
5324
|
CD(D, u);
|
|
@@ -5342,7 +5346,7 @@ var L3 = [
|
|
|
5342
5346
|
case "youtube":
|
|
5343
5347
|
return "https://youtube.com/hashtag/" + e;
|
|
5344
5348
|
default:
|
|
5345
|
-
|
|
5349
|
+
Gu(f);
|
|
5346
5350
|
}
|
|
5347
5351
|
}, D.prototype.getAnchorText = function() {
|
|
5348
5352
|
return "#" + this.hashtag;
|
|
@@ -5351,7 +5355,7 @@ var L3 = [
|
|
|
5351
5355
|
return e && f.push(e), f;
|
|
5352
5356
|
}, D;
|
|
5353
5357
|
}(cD)
|
|
5354
|
-
),
|
|
5358
|
+
), z3 = {
|
|
5355
5359
|
twitter: /^@\w{1,15}$/,
|
|
5356
5360
|
instagram: /^@[_\w]{1,30}$/,
|
|
5357
5361
|
soundcloud: /^@[-a-z0-9_]{3,25}$/,
|
|
@@ -5369,17 +5373,17 @@ function z1(u) {
|
|
|
5369
5373
|
u === 95 || // '_'
|
|
5370
5374
|
rD(u) || Eu(u);
|
|
5371
5375
|
}
|
|
5372
|
-
function
|
|
5373
|
-
var f =
|
|
5376
|
+
function U3(u, D) {
|
|
5377
|
+
var f = z3[D];
|
|
5374
5378
|
return f.test(u);
|
|
5375
5379
|
}
|
|
5376
|
-
var
|
|
5380
|
+
var V3 = [
|
|
5377
5381
|
"twitter",
|
|
5378
5382
|
"instagram",
|
|
5379
5383
|
"soundcloud",
|
|
5380
5384
|
"tiktok",
|
|
5381
5385
|
"youtube"
|
|
5382
|
-
],
|
|
5386
|
+
], H3 = (
|
|
5383
5387
|
/** @class */
|
|
5384
5388
|
function(u) {
|
|
5385
5389
|
CD(D, u);
|
|
@@ -5406,7 +5410,7 @@ var U3 = [
|
|
|
5406
5410
|
case "youtube":
|
|
5407
5411
|
return "https://youtube.com/@" + this.mention;
|
|
5408
5412
|
default:
|
|
5409
|
-
|
|
5413
|
+
Gu(this.serviceName);
|
|
5410
5414
|
}
|
|
5411
5415
|
}, D.prototype.getAnchorText = function() {
|
|
5412
5416
|
return "@" + this.mention;
|
|
@@ -5415,21 +5419,21 @@ var U3 = [
|
|
|
5415
5419
|
return e && f.push(e), f;
|
|
5416
5420
|
}, D;
|
|
5417
5421
|
}(cD)
|
|
5418
|
-
),
|
|
5422
|
+
), W3 = /[-. ()]/, Y3 = /(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/, K3 = /(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/, J3 = new RegExp("^".concat(Y3.source, "|").concat(K3.source, "$"));
|
|
5419
5423
|
function U1(u) {
|
|
5420
5424
|
return u === 45 || // '-'
|
|
5421
5425
|
u === 46 || // '.'
|
|
5422
5426
|
u === 32;
|
|
5423
5427
|
}
|
|
5424
|
-
function
|
|
5428
|
+
function gf(u) {
|
|
5425
5429
|
return u === 44 || // ','
|
|
5426
5430
|
u === 59;
|
|
5427
5431
|
}
|
|
5428
|
-
function
|
|
5429
|
-
var D = u.charAt(0) === "+" ||
|
|
5430
|
-
return D &&
|
|
5432
|
+
function G3(u) {
|
|
5433
|
+
var D = u.charAt(0) === "+" || W3.test(u);
|
|
5434
|
+
return D && J3.test(u);
|
|
5431
5435
|
}
|
|
5432
|
-
var
|
|
5436
|
+
var X3 = (
|
|
5433
5437
|
/** @class */
|
|
5434
5438
|
function(u) {
|
|
5435
5439
|
CD(D, u);
|
|
@@ -5449,7 +5453,7 @@ var G3 = (
|
|
|
5449
5453
|
return this.matchedText;
|
|
5450
5454
|
}, D;
|
|
5451
5455
|
}(cD)
|
|
5452
|
-
),
|
|
5456
|
+
), Z3 = (
|
|
5453
5457
|
/** @class */
|
|
5454
5458
|
function() {
|
|
5455
5459
|
function u(D, f) {
|
|
@@ -5472,8 +5476,8 @@ var G3 = (
|
|
|
5472
5476
|
}, u;
|
|
5473
5477
|
}()
|
|
5474
5478
|
);
|
|
5475
|
-
function
|
|
5476
|
-
for (var f = new
|
|
5479
|
+
function Q3(u, D) {
|
|
5480
|
+
for (var f = new Z3(u, D); f.charIdx < f.text.length; f.charIdx++) {
|
|
5477
5481
|
var e = u.charAt(f.charIdx), t = u.charCodeAt(f.charIdx);
|
|
5478
5482
|
if (f.stateMachines.length === 0)
|
|
5479
5483
|
jD(f, e, t);
|
|
@@ -5482,133 +5486,133 @@ function Z3(u, D) {
|
|
|
5482
5486
|
var r = f.stateMachines[n];
|
|
5483
5487
|
switch (r.state) {
|
|
5484
5488
|
case 11:
|
|
5485
|
-
|
|
5489
|
+
n2(f, r, t);
|
|
5486
5490
|
break;
|
|
5487
5491
|
case 12:
|
|
5488
|
-
|
|
5492
|
+
r2(f, r, t);
|
|
5489
5493
|
break;
|
|
5490
5494
|
case 0:
|
|
5491
|
-
|
|
5495
|
+
u2(f, r, t);
|
|
5492
5496
|
break;
|
|
5493
5497
|
case 1:
|
|
5494
|
-
|
|
5498
|
+
D2(f, r, t);
|
|
5495
5499
|
break;
|
|
5496
5500
|
case 2:
|
|
5497
|
-
|
|
5501
|
+
f2(f, r, t);
|
|
5498
5502
|
break;
|
|
5499
5503
|
case 3:
|
|
5500
|
-
|
|
5504
|
+
e2(f, r, t);
|
|
5501
5505
|
break;
|
|
5502
5506
|
case 4:
|
|
5503
|
-
|
|
5507
|
+
t2(f, r, e, t);
|
|
5504
5508
|
break;
|
|
5505
5509
|
case 5:
|
|
5506
|
-
|
|
5510
|
+
a2(f, r, t);
|
|
5507
5511
|
break;
|
|
5508
5512
|
case 6:
|
|
5509
|
-
|
|
5513
|
+
s2(f, r, e, t);
|
|
5510
5514
|
break;
|
|
5511
5515
|
case 7:
|
|
5512
|
-
|
|
5516
|
+
F2(f, r, e, t);
|
|
5513
5517
|
break;
|
|
5514
5518
|
case 13:
|
|
5515
|
-
|
|
5519
|
+
i2(f, r, t);
|
|
5516
5520
|
break;
|
|
5517
5521
|
case 14:
|
|
5518
|
-
|
|
5522
|
+
o2(f, r, t);
|
|
5519
5523
|
break;
|
|
5520
5524
|
case 8:
|
|
5521
|
-
|
|
5525
|
+
d2(f, r, t);
|
|
5522
5526
|
break;
|
|
5523
5527
|
case 9:
|
|
5524
|
-
|
|
5528
|
+
C2(f, r, t);
|
|
5525
5529
|
break;
|
|
5526
5530
|
case 10:
|
|
5527
|
-
|
|
5531
|
+
c2(f, r, t);
|
|
5528
5532
|
break;
|
|
5529
5533
|
case 15:
|
|
5530
|
-
|
|
5534
|
+
l2(f, r, e, t);
|
|
5531
5535
|
break;
|
|
5532
5536
|
case 16:
|
|
5533
|
-
|
|
5537
|
+
E2(f, r, e, t);
|
|
5534
5538
|
break;
|
|
5535
5539
|
case 17:
|
|
5536
|
-
|
|
5540
|
+
h2(f, r, e, t);
|
|
5537
5541
|
break;
|
|
5538
5542
|
case 18:
|
|
5539
|
-
|
|
5543
|
+
b2(f, r, e, t);
|
|
5540
5544
|
break;
|
|
5541
5545
|
case 19:
|
|
5542
|
-
|
|
5546
|
+
p2(f, r, e, t);
|
|
5543
5547
|
break;
|
|
5544
5548
|
case 20:
|
|
5545
|
-
|
|
5549
|
+
B2(f, r, t);
|
|
5546
5550
|
break;
|
|
5547
5551
|
case 21:
|
|
5548
|
-
|
|
5552
|
+
m2(f, r, t);
|
|
5549
5553
|
break;
|
|
5550
5554
|
case 22:
|
|
5551
|
-
|
|
5555
|
+
Qu(f, r, t);
|
|
5552
5556
|
break;
|
|
5553
5557
|
case 23:
|
|
5554
5558
|
g2(f, r, t);
|
|
5555
5559
|
break;
|
|
5556
5560
|
case 24:
|
|
5557
|
-
|
|
5561
|
+
_2(f, r, t);
|
|
5558
5562
|
break;
|
|
5559
5563
|
case 25:
|
|
5560
|
-
|
|
5564
|
+
y2(f, r, t);
|
|
5561
5565
|
break;
|
|
5562
5566
|
case 26:
|
|
5563
|
-
|
|
5567
|
+
v2(f, r, t);
|
|
5564
5568
|
break;
|
|
5565
5569
|
case 27:
|
|
5566
|
-
|
|
5570
|
+
w2(f, r, t);
|
|
5567
5571
|
break;
|
|
5568
5572
|
case 28:
|
|
5569
|
-
|
|
5573
|
+
A2(f, r, t);
|
|
5570
5574
|
break;
|
|
5571
5575
|
case 29:
|
|
5572
|
-
|
|
5576
|
+
x2(f, r, t);
|
|
5573
5577
|
break;
|
|
5574
5578
|
case 30:
|
|
5575
|
-
|
|
5579
|
+
k2(f, r, t);
|
|
5576
5580
|
break;
|
|
5577
5581
|
case 31:
|
|
5578
|
-
|
|
5582
|
+
j2(f, r, t);
|
|
5579
5583
|
break;
|
|
5580
5584
|
case 32:
|
|
5581
|
-
|
|
5585
|
+
T2(f, r, e, t);
|
|
5582
5586
|
break;
|
|
5583
5587
|
case 33:
|
|
5584
|
-
|
|
5588
|
+
N2(f, r, t);
|
|
5585
5589
|
break;
|
|
5586
5590
|
case 34:
|
|
5587
|
-
|
|
5591
|
+
O2(f, r, t);
|
|
5588
5592
|
break;
|
|
5589
5593
|
case 35:
|
|
5590
|
-
|
|
5594
|
+
R2(f, r, t);
|
|
5591
5595
|
break;
|
|
5592
5596
|
case 36:
|
|
5593
|
-
|
|
5597
|
+
P2(f, r, e, t);
|
|
5594
5598
|
break;
|
|
5595
5599
|
case 37:
|
|
5596
|
-
|
|
5600
|
+
S2(f, r, e, t);
|
|
5597
5601
|
break;
|
|
5598
5602
|
case 38:
|
|
5599
|
-
|
|
5603
|
+
I2(f, r, e, t);
|
|
5600
5604
|
break;
|
|
5601
5605
|
case 39:
|
|
5602
|
-
|
|
5606
|
+
$2(f, r, e, t);
|
|
5603
5607
|
break;
|
|
5604
5608
|
case 40:
|
|
5605
|
-
|
|
5609
|
+
L2(f, r, t);
|
|
5606
5610
|
break;
|
|
5607
5611
|
case 41:
|
|
5608
|
-
|
|
5612
|
+
M2(f, r, t);
|
|
5609
5613
|
break;
|
|
5610
5614
|
default:
|
|
5611
|
-
|
|
5615
|
+
Gu(r.state);
|
|
5612
5616
|
}
|
|
5613
5617
|
}
|
|
5614
5618
|
if (!f.hasSchemeUrlMachine() && f.charIdx > 0 && oD(t)) {
|
|
@@ -5630,13 +5634,13 @@ function Z3(u, D) {
|
|
|
5630
5634
|
function jD(u, D, f) {
|
|
5631
5635
|
var e = u.charIdx;
|
|
5632
5636
|
if (f === 35)
|
|
5633
|
-
u.addMachine(
|
|
5637
|
+
u.addMachine(H2(
|
|
5634
5638
|
e,
|
|
5635
5639
|
28
|
|
5636
5640
|
/* State.HashtagHashChar */
|
|
5637
5641
|
));
|
|
5638
5642
|
else if (f === 64)
|
|
5639
|
-
u.addMachine(
|
|
5643
|
+
u.addMachine(W2(
|
|
5640
5644
|
e,
|
|
5641
5645
|
30
|
|
5642
5646
|
/* State.MentionAtChar */
|
|
@@ -5664,29 +5668,29 @@ function jD(u, D, f) {
|
|
|
5664
5668
|
e,
|
|
5665
5669
|
38
|
|
5666
5670
|
/* State.PhoneNumberDigit */
|
|
5667
|
-
)), u.addMachine(
|
|
5671
|
+
)), u.addMachine(U2(
|
|
5668
5672
|
e,
|
|
5669
5673
|
13
|
|
5670
5674
|
/* State.IpV4Digit */
|
|
5671
5675
|
))), M1(f)) {
|
|
5672
5676
|
var t = D.toLowerCase() === "m" ? 15 : 22;
|
|
5673
|
-
u.addMachine(
|
|
5677
|
+
u.addMachine(V2(e, t));
|
|
5674
5678
|
}
|
|
5675
5679
|
oD(f) && u.addMachine(SD(
|
|
5676
5680
|
e,
|
|
5677
5681
|
0
|
|
5678
5682
|
/* State.SchemeChar */
|
|
5679
|
-
)),
|
|
5683
|
+
)), Zu(f) && u.addMachine(nf(
|
|
5680
5684
|
e,
|
|
5681
5685
|
5
|
|
5682
5686
|
/* State.DomainLabelChar */
|
|
5683
5687
|
));
|
|
5684
5688
|
}
|
|
5685
5689
|
}
|
|
5686
|
-
function
|
|
5690
|
+
function u2(u, D, f) {
|
|
5687
5691
|
f === 58 ? D.state = 2 : f === 45 ? D.state = 1 : I1(f) || u.removeMachine(D);
|
|
5688
5692
|
}
|
|
5689
|
-
function
|
|
5693
|
+
function D2(u, D, f) {
|
|
5690
5694
|
var e = u.charIdx;
|
|
5691
5695
|
f === 45 || (f === 47 ? (u.removeMachine(D), u.addMachine(nf(
|
|
5692
5696
|
e,
|
|
@@ -5694,7 +5698,7 @@ function u2(u, D, f) {
|
|
|
5694
5698
|
/* State.ProtocolRelativeSlash1 */
|
|
5695
5699
|
))) : I1(f) ? D.state = 0 : u.removeMachine(D));
|
|
5696
5700
|
}
|
|
5697
|
-
function
|
|
5701
|
+
function f2(u, D, f) {
|
|
5698
5702
|
var e = u.charIdx;
|
|
5699
5703
|
f === 47 ? D.state = 3 : f === 46 ? u.removeMachine(D) : Yu(f) ? (D.state = 5, oD(f) && u.addMachine(SD(
|
|
5700
5704
|
e,
|
|
@@ -5702,162 +5706,162 @@ function D2(u, D, f) {
|
|
|
5702
5706
|
/* State.SchemeChar */
|
|
5703
5707
|
))) : u.removeMachine(D);
|
|
5704
5708
|
}
|
|
5705
|
-
function
|
|
5709
|
+
function e2(u, D, f) {
|
|
5706
5710
|
f === 47 ? D.state = 4 : $1(f) ? (D.state = 10, D.acceptStateReached = !0) : eu(u, D);
|
|
5707
5711
|
}
|
|
5708
|
-
function
|
|
5712
|
+
function t2(u, D, f, e) {
|
|
5709
5713
|
e === 47 ? (D.state = 10, D.acceptStateReached = !0) : Yu(e) ? (D.state = 5, D.acceptStateReached = !0) : u.removeMachine(D);
|
|
5710
5714
|
}
|
|
5711
|
-
function
|
|
5715
|
+
function n2(u, D, f) {
|
|
5712
5716
|
f === 47 ? D.state = 12 : u.removeMachine(D);
|
|
5713
5717
|
}
|
|
5714
|
-
function
|
|
5718
|
+
function r2(u, D, f) {
|
|
5715
5719
|
Yu(f) ? D.state = 5 : u.removeMachine(D);
|
|
5716
5720
|
}
|
|
5717
|
-
function
|
|
5721
|
+
function a2(u, D, f) {
|
|
5718
5722
|
f === 46 ? D.state = 7 : f === 45 ? D.state = 6 : f === 58 ? D.state = 8 : Bf(f) ? D.state = 10 : pf(f) || eu(u, D);
|
|
5719
5723
|
}
|
|
5720
|
-
function
|
|
5724
|
+
function s2(u, D, f, e) {
|
|
5721
5725
|
e === 45 || (e === 46 ? eu(u, D) : Yu(e) ? D.state = 5 : eu(u, D));
|
|
5722
5726
|
}
|
|
5723
|
-
function
|
|
5727
|
+
function F2(u, D, f, e) {
|
|
5724
5728
|
e === 46 ? eu(u, D) : Yu(e) ? (D.state = 5, D.acceptStateReached = !0) : eu(u, D);
|
|
5725
5729
|
}
|
|
5726
|
-
function F2(u, D, f) {
|
|
5727
|
-
f === 46 ? D.state = 14 : f === 58 ? D.state = 8 : Eu(f) || (Bf(f) ? D.state = 10 : Qu(f) ? u.removeMachine(D) : eu(u, D));
|
|
5728
|
-
}
|
|
5729
5730
|
function i2(u, D, f) {
|
|
5730
|
-
|
|
5731
|
+
f === 46 ? D.state = 14 : f === 58 ? D.state = 8 : Eu(f) || (Bf(f) ? D.state = 10 : Zu(f) ? u.removeMachine(D) : eu(u, D));
|
|
5731
5732
|
}
|
|
5732
5733
|
function o2(u, D, f) {
|
|
5733
|
-
Eu(f) ? D.state =
|
|
5734
|
+
Eu(f) ? (D.octetsEncountered++, D.octetsEncountered === 4 && (D.acceptStateReached = !0), D.state = 13) : eu(u, D);
|
|
5734
5735
|
}
|
|
5735
5736
|
function d2(u, D, f) {
|
|
5736
|
-
Eu(f)
|
|
5737
|
+
Eu(f) ? D.state = 9 : eu(u, D);
|
|
5737
5738
|
}
|
|
5738
5739
|
function C2(u, D, f) {
|
|
5739
|
-
|
|
5740
|
+
Eu(f) || (Bf(f) ? D.state = 10 : eu(u, D));
|
|
5740
5741
|
}
|
|
5741
|
-
function c2(u, D, f
|
|
5742
|
-
f
|
|
5742
|
+
function c2(u, D, f) {
|
|
5743
|
+
$1(f) || eu(u, D);
|
|
5743
5744
|
}
|
|
5744
5745
|
function l2(u, D, f, e) {
|
|
5745
|
-
f.toLowerCase() === "
|
|
5746
|
+
f.toLowerCase() === "a" ? D.state = 16 : Qu(u, D, e);
|
|
5746
5747
|
}
|
|
5747
5748
|
function E2(u, D, f, e) {
|
|
5748
|
-
f.toLowerCase() === "
|
|
5749
|
+
f.toLowerCase() === "i" ? D.state = 17 : Qu(u, D, e);
|
|
5749
5750
|
}
|
|
5750
5751
|
function h2(u, D, f, e) {
|
|
5751
|
-
f.toLowerCase() === "
|
|
5752
|
+
f.toLowerCase() === "l" ? D.state = 18 : Qu(u, D, e);
|
|
5752
5753
|
}
|
|
5753
5754
|
function b2(u, D, f, e) {
|
|
5754
|
-
f.toLowerCase() === "
|
|
5755
|
+
f.toLowerCase() === "t" ? D.state = 19 : Qu(u, D, e);
|
|
5755
5756
|
}
|
|
5756
|
-
function p2(u, D, f) {
|
|
5757
|
-
f ===
|
|
5757
|
+
function p2(u, D, f, e) {
|
|
5758
|
+
f.toLowerCase() === "o" ? D.state = 20 : Qu(u, D, e);
|
|
5758
5759
|
}
|
|
5759
5760
|
function B2(u, D, f) {
|
|
5760
|
-
|
|
5761
|
+
f === 58 ? D.state = 21 : Qu(u, D, f);
|
|
5762
|
+
}
|
|
5763
|
+
function m2(u, D, f) {
|
|
5764
|
+
mf(f) ? D.state = 22 : u.removeMachine(D);
|
|
5761
5765
|
}
|
|
5762
|
-
function
|
|
5763
|
-
f === 46 ? D.state = 23 : f === 64 ? D.state = 24 :
|
|
5766
|
+
function Qu(u, D, f) {
|
|
5767
|
+
f === 46 ? D.state = 23 : f === 64 ? D.state = 24 : mf(f) ? D.state = 22 : u.removeMachine(D);
|
|
5764
5768
|
}
|
|
5765
5769
|
function g2(u, D, f) {
|
|
5766
|
-
f === 46 || f === 64 ? u.removeMachine(D) :
|
|
5770
|
+
f === 46 || f === 64 ? u.removeMachine(D) : mf(f) ? D.state = 22 : u.removeMachine(D);
|
|
5767
5771
|
}
|
|
5768
|
-
function
|
|
5772
|
+
function _2(u, D, f) {
|
|
5769
5773
|
Yu(f) ? D.state = 25 : u.removeMachine(D);
|
|
5770
5774
|
}
|
|
5771
|
-
function
|
|
5775
|
+
function y2(u, D, f) {
|
|
5772
5776
|
f === 46 ? D.state = 27 : f === 45 ? D.state = 26 : pf(f) || eu(u, D);
|
|
5773
5777
|
}
|
|
5774
|
-
function
|
|
5778
|
+
function v2(u, D, f) {
|
|
5775
5779
|
f === 45 || f === 46 ? eu(u, D) : pf(f) ? D.state = 25 : eu(u, D);
|
|
5776
5780
|
}
|
|
5777
|
-
function
|
|
5781
|
+
function w2(u, D, f) {
|
|
5778
5782
|
f === 46 || f === 45 ? eu(u, D) : Yu(f) ? (D.state = 25, D.acceptStateReached = !0) : eu(u, D);
|
|
5779
5783
|
}
|
|
5780
|
-
function
|
|
5784
|
+
function A2(u, D, f) {
|
|
5781
5785
|
q1(f) ? (D.state = 29, D.acceptStateReached = !0) : u.removeMachine(D);
|
|
5782
5786
|
}
|
|
5783
|
-
function
|
|
5787
|
+
function x2(u, D, f) {
|
|
5784
5788
|
q1(f) || eu(u, D);
|
|
5785
5789
|
}
|
|
5786
|
-
function
|
|
5790
|
+
function k2(u, D, f) {
|
|
5787
5791
|
z1(f) ? (D.state = 31, D.acceptStateReached = !0) : u.removeMachine(D);
|
|
5788
5792
|
}
|
|
5789
|
-
function
|
|
5790
|
-
z1(f) || (
|
|
5793
|
+
function j2(u, D, f) {
|
|
5794
|
+
z1(f) || (Zu(f) ? u.removeMachine(D) : eu(u, D));
|
|
5791
5795
|
}
|
|
5792
|
-
function
|
|
5796
|
+
function S2(u, D, f, e) {
|
|
5793
5797
|
Eu(e) ? D.state = 38 : (u.removeMachine(D), jD(u, f, e));
|
|
5794
5798
|
}
|
|
5795
|
-
function
|
|
5799
|
+
function T2(u, D, f, e) {
|
|
5796
5800
|
Eu(e) ? D.state = 33 : u.removeMachine(D), jD(u, f, e);
|
|
5797
5801
|
}
|
|
5798
|
-
function
|
|
5802
|
+
function N2(u, D, f) {
|
|
5799
5803
|
Eu(f) ? D.state = 34 : u.removeMachine(D);
|
|
5800
5804
|
}
|
|
5801
|
-
function
|
|
5805
|
+
function O2(u, D, f) {
|
|
5802
5806
|
Eu(f) ? D.state = 35 : u.removeMachine(D);
|
|
5803
5807
|
}
|
|
5804
|
-
function
|
|
5808
|
+
function R2(u, D, f) {
|
|
5805
5809
|
f === 41 ? D.state = 36 : u.removeMachine(D);
|
|
5806
5810
|
}
|
|
5807
|
-
function
|
|
5811
|
+
function P2(u, D, f, e) {
|
|
5808
5812
|
Eu(e) ? D.state = 38 : U1(e) ? D.state = 39 : u.removeMachine(D);
|
|
5809
5813
|
}
|
|
5810
|
-
function
|
|
5814
|
+
function I2(u, D, f, e) {
|
|
5811
5815
|
var t = u.charIdx;
|
|
5812
|
-
D.acceptStateReached = !0,
|
|
5816
|
+
D.acceptStateReached = !0, gf(e) ? D.state = 40 : e === 35 ? D.state = 41 : Eu(e) || (e === 40 ? D.state = 32 : U1(e) ? D.state = 39 : (eu(u, D), oD(e) && u.addMachine(SD(
|
|
5813
5817
|
t,
|
|
5814
5818
|
0
|
|
5815
5819
|
/* State.SchemeChar */
|
|
5816
5820
|
))));
|
|
5817
5821
|
}
|
|
5818
|
-
function
|
|
5822
|
+
function $2(u, D, f, e) {
|
|
5819
5823
|
Eu(e) ? D.state = 38 : e === 40 ? D.state = 32 : (eu(u, D), jD(u, f, e));
|
|
5820
5824
|
}
|
|
5821
|
-
function $2(u, D, f) {
|
|
5822
|
-
mf(f) || (f === 35 ? D.state = 41 : Eu(f) ? D.state = 38 : eu(u, D));
|
|
5823
|
-
}
|
|
5824
5825
|
function L2(u, D, f) {
|
|
5825
|
-
|
|
5826
|
+
gf(f) || (f === 35 ? D.state = 41 : Eu(f) ? D.state = 38 : eu(u, D));
|
|
5827
|
+
}
|
|
5828
|
+
function M2(u, D, f) {
|
|
5829
|
+
gf(f) ? D.state = 40 : Eu(f) ? u.removeMachine(D) : eu(u, D);
|
|
5826
5830
|
}
|
|
5827
5831
|
function eu(u, D) {
|
|
5828
5832
|
var f = u.matches, e = u.text, t = u.charIdx, n = u.tagBuilder, r = u.stripPrefix, s = u.stripTrailingSlash, F = u.decodePercentEncoding, d = u.hashtagServiceName, o = u.mentionServiceName;
|
|
5829
5833
|
if (u.removeMachine(D), !!D.acceptStateReached) {
|
|
5830
5834
|
var c = D.startIdx, l = e.slice(D.startIdx, t);
|
|
5831
|
-
switch (l =
|
|
5835
|
+
switch (l = z2(l), D.type) {
|
|
5832
5836
|
case 0: {
|
|
5833
5837
|
var j = e.charCodeAt(D.startIdx - 1);
|
|
5834
5838
|
if (j === 64)
|
|
5835
5839
|
return;
|
|
5836
5840
|
switch (D.matchType) {
|
|
5837
5841
|
case 0: {
|
|
5838
|
-
var
|
|
5839
|
-
if (
|
|
5842
|
+
var v = P1.exec(l);
|
|
5843
|
+
if (v && (c = c + v.index, l = l.slice(v.index)), !_3(l))
|
|
5840
5844
|
return;
|
|
5841
5845
|
break;
|
|
5842
5846
|
}
|
|
5843
5847
|
case 1: {
|
|
5844
|
-
if (!
|
|
5848
|
+
if (!y3(l))
|
|
5845
5849
|
return;
|
|
5846
5850
|
break;
|
|
5847
5851
|
}
|
|
5848
5852
|
case 2: {
|
|
5849
|
-
if (!
|
|
5853
|
+
if (!A3(l))
|
|
5850
5854
|
return;
|
|
5851
5855
|
break;
|
|
5852
5856
|
}
|
|
5853
5857
|
default:
|
|
5854
|
-
|
|
5858
|
+
Gu(D);
|
|
5855
5859
|
}
|
|
5856
|
-
f.push(new
|
|
5860
|
+
f.push(new j3({
|
|
5857
5861
|
tagBuilder: n,
|
|
5858
5862
|
matchedText: l,
|
|
5859
5863
|
offset: c,
|
|
5860
|
-
urlMatchType:
|
|
5864
|
+
urlMatchType: q2(D.matchType),
|
|
5861
5865
|
url: l,
|
|
5862
5866
|
protocolRelativeMatch: l.slice(0, 2) === "//",
|
|
5863
5867
|
// TODO: Do these settings need to be passed to the match,
|
|
@@ -5869,16 +5873,16 @@ function eu(u, D) {
|
|
|
5869
5873
|
break;
|
|
5870
5874
|
}
|
|
5871
5875
|
case 1: {
|
|
5872
|
-
|
|
5876
|
+
I3(l) && f.push(new $3({
|
|
5873
5877
|
tagBuilder: n,
|
|
5874
5878
|
matchedText: l,
|
|
5875
5879
|
offset: c,
|
|
5876
|
-
email: l.replace(
|
|
5880
|
+
email: l.replace(P3, "")
|
|
5877
5881
|
}));
|
|
5878
5882
|
break;
|
|
5879
5883
|
}
|
|
5880
5884
|
case 2: {
|
|
5881
|
-
|
|
5885
|
+
L3(l) && f.push(new q3({
|
|
5882
5886
|
tagBuilder: n,
|
|
5883
5887
|
matchedText: l,
|
|
5884
5888
|
offset: c,
|
|
@@ -5888,7 +5892,7 @@ function eu(u, D) {
|
|
|
5888
5892
|
break;
|
|
5889
5893
|
}
|
|
5890
5894
|
case 3: {
|
|
5891
|
-
|
|
5895
|
+
U3(l, o) && f.push(new H3({
|
|
5892
5896
|
tagBuilder: n,
|
|
5893
5897
|
matchedText: l,
|
|
5894
5898
|
offset: c,
|
|
@@ -5899,9 +5903,9 @@ function eu(u, D) {
|
|
|
5899
5903
|
break;
|
|
5900
5904
|
}
|
|
5901
5905
|
case 4: {
|
|
5902
|
-
if (l = l.replace(/ +$/g, ""),
|
|
5906
|
+
if (l = l.replace(/ +$/g, ""), G3(l)) {
|
|
5903
5907
|
var C = l.replace(/[^0-9,;#]/g, "");
|
|
5904
|
-
f.push(new
|
|
5908
|
+
f.push(new X3({
|
|
5905
5909
|
tagBuilder: n,
|
|
5906
5910
|
matchedText: l,
|
|
5907
5911
|
offset: c,
|
|
@@ -5912,11 +5916,11 @@ function eu(u, D) {
|
|
|
5912
5916
|
break;
|
|
5913
5917
|
}
|
|
5914
5918
|
default:
|
|
5915
|
-
|
|
5919
|
+
Gu(D);
|
|
5916
5920
|
}
|
|
5917
5921
|
}
|
|
5918
5922
|
}
|
|
5919
|
-
function
|
|
5923
|
+
function q2(u) {
|
|
5920
5924
|
switch (u) {
|
|
5921
5925
|
case 0:
|
|
5922
5926
|
return "scheme";
|
|
@@ -5925,7 +5929,7 @@ function M2(u) {
|
|
|
5925
5929
|
case 2:
|
|
5926
5930
|
return "ipV4";
|
|
5927
5931
|
default:
|
|
5928
|
-
|
|
5932
|
+
Gu(u);
|
|
5929
5933
|
}
|
|
5930
5934
|
}
|
|
5931
5935
|
var Kf = {
|
|
@@ -5933,14 +5937,14 @@ var Kf = {
|
|
|
5933
5937
|
"}": "{",
|
|
5934
5938
|
"]": "["
|
|
5935
5939
|
};
|
|
5936
|
-
function
|
|
5940
|
+
function z2(u) {
|
|
5937
5941
|
for (var D = {
|
|
5938
5942
|
"(": 0,
|
|
5939
5943
|
"{": 0,
|
|
5940
5944
|
"[": 0
|
|
5941
5945
|
}, f = 0; f < u.length; f++) {
|
|
5942
5946
|
var e = u.charAt(f), t = u.charCodeAt(f);
|
|
5943
|
-
|
|
5947
|
+
h3(t) ? D[e]++ : Yf(t) && D[Kf[e]]--;
|
|
5944
5948
|
}
|
|
5945
5949
|
for (var n = u.length - 1; n >= 0; ) {
|
|
5946
5950
|
var e = u.charAt(n), t = u.charCodeAt(n);
|
|
@@ -5975,7 +5979,7 @@ function nf(u, D) {
|
|
|
5975
5979
|
matchType: 1
|
|
5976
5980
|
};
|
|
5977
5981
|
}
|
|
5978
|
-
function
|
|
5982
|
+
function U2(u, D) {
|
|
5979
5983
|
return {
|
|
5980
5984
|
type: 0,
|
|
5981
5985
|
startIdx: u,
|
|
@@ -5986,7 +5990,7 @@ function z2(u, D) {
|
|
|
5986
5990
|
// starts at 1 because we create this machine when encountering the first octet
|
|
5987
5991
|
};
|
|
5988
5992
|
}
|
|
5989
|
-
function
|
|
5993
|
+
function V2(u, D) {
|
|
5990
5994
|
return {
|
|
5991
5995
|
type: 1,
|
|
5992
5996
|
startIdx: u,
|
|
@@ -5994,7 +5998,7 @@ function U2(u, D) {
|
|
|
5994
5998
|
acceptStateReached: !1
|
|
5995
5999
|
};
|
|
5996
6000
|
}
|
|
5997
|
-
function
|
|
6001
|
+
function H2(u, D) {
|
|
5998
6002
|
return {
|
|
5999
6003
|
type: 2,
|
|
6000
6004
|
startIdx: u,
|
|
@@ -6002,7 +6006,7 @@ function V2(u, D) {
|
|
|
6002
6006
|
acceptStateReached: !1
|
|
6003
6007
|
};
|
|
6004
6008
|
}
|
|
6005
|
-
function
|
|
6009
|
+
function W2(u, D) {
|
|
6006
6010
|
return {
|
|
6007
6011
|
type: 3,
|
|
6008
6012
|
startIdx: u,
|
|
@@ -6029,7 +6033,7 @@ var Su = (
|
|
|
6029
6033
|
}
|
|
6030
6034
|
return u;
|
|
6031
6035
|
}()
|
|
6032
|
-
), _f = new Su(),
|
|
6036
|
+
), _f = new Su(), Y2 = (
|
|
6033
6037
|
/** @class */
|
|
6034
6038
|
/* @__PURE__ */ function() {
|
|
6035
6039
|
function u(D, f) {
|
|
@@ -6038,142 +6042,142 @@ var Su = (
|
|
|
6038
6042
|
return u;
|
|
6039
6043
|
}()
|
|
6040
6044
|
);
|
|
6041
|
-
function
|
|
6042
|
-
for (var f = new
|
|
6045
|
+
function K2(u, D) {
|
|
6046
|
+
for (var f = new Y2(u, D), e = u.length; f.charIdx < e; ) {
|
|
6043
6047
|
var t = u.charAt(f.charIdx), n = u.charCodeAt(f.charIdx);
|
|
6044
6048
|
switch (f.state) {
|
|
6045
6049
|
case 0:
|
|
6046
|
-
|
|
6050
|
+
J2(f, t);
|
|
6047
6051
|
break;
|
|
6048
6052
|
case 1:
|
|
6049
|
-
|
|
6053
|
+
G2(f, t, n);
|
|
6050
6054
|
break;
|
|
6051
6055
|
case 2:
|
|
6052
|
-
|
|
6056
|
+
Z2(f, t, n);
|
|
6053
6057
|
break;
|
|
6054
6058
|
case 3:
|
|
6055
|
-
|
|
6059
|
+
X2(f, t, n);
|
|
6056
6060
|
break;
|
|
6057
6061
|
case 4:
|
|
6058
|
-
|
|
6062
|
+
Q2(f, t, n);
|
|
6059
6063
|
break;
|
|
6060
6064
|
case 5:
|
|
6061
|
-
|
|
6065
|
+
ut(f, t, n);
|
|
6062
6066
|
break;
|
|
6063
6067
|
case 6:
|
|
6064
|
-
|
|
6068
|
+
Dt(f, t, n);
|
|
6065
6069
|
break;
|
|
6066
6070
|
case 7:
|
|
6067
|
-
|
|
6071
|
+
ft(f, t, n);
|
|
6068
6072
|
break;
|
|
6069
6073
|
case 8:
|
|
6070
|
-
|
|
6074
|
+
et(f, t);
|
|
6071
6075
|
break;
|
|
6072
6076
|
case 9:
|
|
6073
|
-
|
|
6077
|
+
tt(f, t);
|
|
6074
6078
|
break;
|
|
6075
6079
|
case 10:
|
|
6076
|
-
|
|
6080
|
+
nt(f, t, n);
|
|
6077
6081
|
break;
|
|
6078
6082
|
case 11:
|
|
6079
|
-
|
|
6083
|
+
rt(f, t, n);
|
|
6080
6084
|
break;
|
|
6081
6085
|
case 12:
|
|
6082
|
-
|
|
6086
|
+
at(f, t);
|
|
6083
6087
|
break;
|
|
6084
6088
|
case 13:
|
|
6085
|
-
|
|
6089
|
+
st(f);
|
|
6086
6090
|
break;
|
|
6087
6091
|
case 14:
|
|
6088
|
-
|
|
6092
|
+
Ft(f, t);
|
|
6089
6093
|
break;
|
|
6090
6094
|
case 15:
|
|
6091
|
-
|
|
6095
|
+
it(f, t);
|
|
6092
6096
|
break;
|
|
6093
6097
|
case 16:
|
|
6094
|
-
|
|
6098
|
+
ot(f, t);
|
|
6095
6099
|
break;
|
|
6096
6100
|
case 17:
|
|
6097
|
-
|
|
6101
|
+
dt(f, t);
|
|
6098
6102
|
break;
|
|
6099
6103
|
case 18:
|
|
6100
|
-
|
|
6104
|
+
Ct(f, t);
|
|
6101
6105
|
break;
|
|
6102
6106
|
case 19:
|
|
6103
|
-
|
|
6107
|
+
ct(f, t);
|
|
6104
6108
|
break;
|
|
6105
6109
|
case 20:
|
|
6106
|
-
|
|
6110
|
+
lt(f, t);
|
|
6107
6111
|
break;
|
|
6108
6112
|
default:
|
|
6109
|
-
|
|
6113
|
+
Gu(f.state);
|
|
6110
6114
|
}
|
|
6111
6115
|
f.charIdx++;
|
|
6112
6116
|
}
|
|
6113
|
-
f.currentDataIdx < f.charIdx &&
|
|
6117
|
+
f.currentDataIdx < f.charIdx && Et(f);
|
|
6114
6118
|
}
|
|
6115
|
-
function
|
|
6119
|
+
function J2(u, D) {
|
|
6116
6120
|
D === "<" && Ou(u);
|
|
6117
6121
|
}
|
|
6118
|
-
function J2(u, D, f) {
|
|
6119
|
-
D === "!" ? u.state = 13 : D === "/" ? (u.state = 2, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { isClosing: !0 }))) : D === "<" ? Ou(u) : rD(f) ? (u.state = 3, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { isOpening: !0 }))) : (u.state = 0, u.currentTag = _f);
|
|
6120
|
-
}
|
|
6121
6122
|
function G2(u, D, f) {
|
|
6122
|
-
|
|
6123
|
+
D === "!" ? u.state = 13 : D === "/" ? (u.state = 2, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { isClosing: !0 }))) : D === "<" ? Ou(u) : rD(f) ? (u.state = 3, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { isOpening: !0 }))) : (u.state = 0, u.currentTag = _f);
|
|
6123
6124
|
}
|
|
6124
6125
|
function X2(u, D, f) {
|
|
6125
|
-
D === "
|
|
6126
|
+
Xu(f) ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { name: HD(u) })), u.state = 4) : D === "<" ? Ou(u) : D === "/" ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { name: HD(u) })), u.state = 12) : D === ">" ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { name: HD(u) })), Ru(u)) : !rD(f) && !Eu(f) && D !== ":" && xu(u);
|
|
6126
6127
|
}
|
|
6127
6128
|
function Z2(u, D, f) {
|
|
6128
|
-
|
|
6129
|
+
D === ">" ? xu(u) : rD(f) ? u.state = 3 : xu(u);
|
|
6129
6130
|
}
|
|
6130
6131
|
function Q2(u, D, f) {
|
|
6131
|
-
|
|
6132
|
+
Xu(f) || (D === "/" ? u.state = 12 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : D === "=" || bf(f) || c3(f) ? xu(u) : u.state = 5);
|
|
6132
6133
|
}
|
|
6133
6134
|
function ut(u, D, f) {
|
|
6134
|
-
|
|
6135
|
+
Xu(f) ? u.state = 6 : D === "/" ? u.state = 12 : D === "=" ? u.state = 7 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : bf(f) && xu(u);
|
|
6135
6136
|
}
|
|
6136
6137
|
function Dt(u, D, f) {
|
|
6137
|
-
|
|
6138
|
+
Xu(f) || (D === "/" ? u.state = 12 : D === "=" ? u.state = 7 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : bf(f) ? xu(u) : u.state = 5);
|
|
6138
6139
|
}
|
|
6139
|
-
function ft(u, D) {
|
|
6140
|
-
D === '"'
|
|
6140
|
+
function ft(u, D, f) {
|
|
6141
|
+
Xu(f) || (D === '"' ? u.state = 8 : D === "'" ? u.state = 9 : /[>=`]/.test(D) ? xu(u) : D === "<" ? Ou(u) : u.state = 10);
|
|
6141
6142
|
}
|
|
6142
6143
|
function et(u, D) {
|
|
6143
|
-
D === "'
|
|
6144
|
+
D === '"' && (u.state = 11);
|
|
6144
6145
|
}
|
|
6145
|
-
function tt(u, D
|
|
6146
|
-
|
|
6146
|
+
function tt(u, D) {
|
|
6147
|
+
D === "'" && (u.state = 11);
|
|
6147
6148
|
}
|
|
6148
6149
|
function nt(u, D, f) {
|
|
6149
|
-
|
|
6150
|
+
Xu(f) ? u.state = 4 : D === ">" ? Ru(u) : D === "<" && Ou(u);
|
|
6151
|
+
}
|
|
6152
|
+
function rt(u, D, f) {
|
|
6153
|
+
Xu(f) ? u.state = 4 : D === "/" ? u.state = 12 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : (u.state = 4, ht(u));
|
|
6150
6154
|
}
|
|
6151
|
-
function
|
|
6155
|
+
function at(u, D) {
|
|
6152
6156
|
D === ">" ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { isClosing: !0 })), Ru(u)) : xu(u);
|
|
6153
6157
|
}
|
|
6154
|
-
function
|
|
6158
|
+
function st(u) {
|
|
6155
6159
|
var D = u.html, f = u.charIdx;
|
|
6156
6160
|
D.slice(f, f + 2) === "--" ? (u.charIdx++, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { type: "comment" })), u.state = 14) : D.slice(f, f + 7).toUpperCase() === "DOCTYPE" ? (u.charIdx += 6, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { type: "doctype" })), u.state = 20) : xu(u);
|
|
6157
6161
|
}
|
|
6158
|
-
function
|
|
6162
|
+
function Ft(u, D) {
|
|
6159
6163
|
D === "-" ? u.state = 15 : D === ">" ? xu(u) : u.state = 16;
|
|
6160
6164
|
}
|
|
6161
|
-
function
|
|
6165
|
+
function it(u, D) {
|
|
6162
6166
|
D === "-" ? u.state = 18 : D === ">" ? xu(u) : u.state = 16;
|
|
6163
6167
|
}
|
|
6164
|
-
function
|
|
6168
|
+
function ot(u, D) {
|
|
6165
6169
|
D === "-" && (u.state = 17);
|
|
6166
6170
|
}
|
|
6167
|
-
function
|
|
6171
|
+
function dt(u, D) {
|
|
6168
6172
|
D === "-" ? u.state = 18 : u.state = 16;
|
|
6169
6173
|
}
|
|
6170
|
-
function
|
|
6174
|
+
function Ct(u, D) {
|
|
6171
6175
|
D === ">" ? Ru(u) : D === "!" ? u.state = 19 : D === "-" || (u.state = 16);
|
|
6172
6176
|
}
|
|
6173
|
-
function
|
|
6177
|
+
function ct(u, D) {
|
|
6174
6178
|
D === "-" ? u.state = 17 : D === ">" ? Ru(u) : u.state = 16;
|
|
6175
6179
|
}
|
|
6176
|
-
function
|
|
6180
|
+
function lt(u, D) {
|
|
6177
6181
|
D === ">" ? Ru(u) : D === "<" && Ou(u);
|
|
6178
6182
|
}
|
|
6179
6183
|
function xu(u) {
|
|
@@ -6188,7 +6192,7 @@ function Ru(u) {
|
|
|
6188
6192
|
var f = u.currentTag;
|
|
6189
6193
|
f.type === "comment" ? u.callbacks.onComment(f.idx) : f.type === "doctype" ? u.callbacks.onDoctype(f.idx) : (f.isOpening && u.callbacks.onOpenTag(f.name, f.idx), f.isClosing && u.callbacks.onCloseTag(f.name, f.idx)), xu(u), u.currentDataIdx = u.charIdx + 1;
|
|
6190
6194
|
}
|
|
6191
|
-
function
|
|
6195
|
+
function Et(u) {
|
|
6192
6196
|
var D = u.html.slice(u.currentDataIdx, u.charIdx);
|
|
6193
6197
|
u.callbacks.onText(D, u.currentDataIdx), u.currentDataIdx = u.charIdx + 1;
|
|
6194
6198
|
}
|
|
@@ -6196,10 +6200,10 @@ function HD(u) {
|
|
|
6196
6200
|
var D = u.currentTag.idx + (u.currentTag.isClosing ? 2 : 1);
|
|
6197
6201
|
return u.html.slice(D, u.charIdx).toLowerCase();
|
|
6198
6202
|
}
|
|
6199
|
-
function
|
|
6203
|
+
function ht(u) {
|
|
6200
6204
|
u.charIdx--;
|
|
6201
6205
|
}
|
|
6202
|
-
var
|
|
6206
|
+
var bt = (
|
|
6203
6207
|
/** @class */
|
|
6204
6208
|
function() {
|
|
6205
6209
|
function u(D) {
|
|
@@ -6209,14 +6213,14 @@ var ht = (
|
|
|
6209
6213
|
}, this.stripTrailingSlash = !0, this.decodePercentEncoding = !0, this.truncate = {
|
|
6210
6214
|
length: 0,
|
|
6211
6215
|
location: "end"
|
|
6212
|
-
}, this.className = "", this.replaceFn = null, this.context = void 0, this.sanitizeHtml = !1, this.tagBuilder = null, this.urls =
|
|
6216
|
+
}, this.className = "", this.replaceFn = null, this.context = void 0, this.sanitizeHtml = !1, this.tagBuilder = null, this.urls = pt(D.urls), this.email = wu(D.email) ? D.email : this.email, this.phone = wu(D.phone) ? D.phone : this.phone, this.hashtag = D.hashtag || this.hashtag, this.mention = D.mention || this.mention, this.newWindow = wu(D.newWindow) ? D.newWindow : this.newWindow, this.stripPrefix = Bt(D.stripPrefix), this.stripTrailingSlash = wu(D.stripTrailingSlash) ? D.stripTrailingSlash : this.stripTrailingSlash, this.decodePercentEncoding = wu(D.decodePercentEncoding) ? D.decodePercentEncoding : this.decodePercentEncoding, this.sanitizeHtml = D.sanitizeHtml || !1;
|
|
6213
6217
|
var f = this.mention;
|
|
6214
|
-
if (f !== !1 &&
|
|
6218
|
+
if (f !== !1 && V3.indexOf(f) === -1)
|
|
6215
6219
|
throw new Error("invalid `mention` cfg '".concat(f, "' - see docs"));
|
|
6216
6220
|
var e = this.hashtag;
|
|
6217
|
-
if (e !== !1 &&
|
|
6221
|
+
if (e !== !1 && M3.indexOf(e) === -1)
|
|
6218
6222
|
throw new Error("invalid `hashtag` cfg '".concat(e, "' - see docs"));
|
|
6219
|
-
this.truncate =
|
|
6223
|
+
this.truncate = mt(D.truncate), this.className = D.className || this.className, this.replaceFn = D.replaceFn || this.replaceFn, this.context = D.context || this;
|
|
6220
6224
|
}
|
|
6221
6225
|
return u.link = function(D, f) {
|
|
6222
6226
|
var e = new u(f);
|
|
@@ -6226,7 +6230,7 @@ var ht = (
|
|
|
6226
6230
|
return e.parse(D);
|
|
6227
6231
|
}, u.prototype.parse = function(D) {
|
|
6228
6232
|
var f = this, e = ["a", "style", "script"], t = 0, n = [];
|
|
6229
|
-
return
|
|
6233
|
+
return K2(D, {
|
|
6230
6234
|
onOpenTag: function(r) {
|
|
6231
6235
|
e.indexOf(r) >= 0 && t++;
|
|
6232
6236
|
},
|
|
@@ -6236,7 +6240,7 @@ var ht = (
|
|
|
6236
6240
|
d.forEach(function(c, l) {
|
|
6237
6241
|
if (l % 2 === 0) {
|
|
6238
6242
|
var j = f.parseText(c, o);
|
|
6239
|
-
n.push.apply(n,
|
|
6243
|
+
n.push.apply(n, n3([], t3(j), !1));
|
|
6240
6244
|
}
|
|
6241
6245
|
o += c.length;
|
|
6242
6246
|
});
|
|
@@ -6282,7 +6286,7 @@ var ht = (
|
|
|
6282
6286
|
}), D;
|
|
6283
6287
|
}, u.prototype.parseText = function(D, f) {
|
|
6284
6288
|
f = f || 0;
|
|
6285
|
-
for (var e =
|
|
6289
|
+
for (var e = Q3(D, {
|
|
6286
6290
|
tagBuilder: this.getTagBuilder(),
|
|
6287
6291
|
stripPrefix: this.stripPrefix,
|
|
6288
6292
|
stripTrailingSlash: this.stripTrailingSlash,
|
|
@@ -6313,28 +6317,28 @@ var ht = (
|
|
|
6313
6317
|
return e.toAnchorString();
|
|
6314
6318
|
}, u.prototype.getTagBuilder = function() {
|
|
6315
6319
|
var D = this.tagBuilder;
|
|
6316
|
-
return D || (D = this.tagBuilder = new
|
|
6320
|
+
return D || (D = this.tagBuilder = new C3({
|
|
6317
6321
|
newWindow: this.newWindow,
|
|
6318
6322
|
truncate: this.truncate,
|
|
6319
6323
|
className: this.className
|
|
6320
6324
|
})), D;
|
|
6321
|
-
}, u.version =
|
|
6325
|
+
}, u.version = r3, u;
|
|
6322
6326
|
}()
|
|
6323
6327
|
);
|
|
6324
|
-
function
|
|
6328
|
+
function pt(u) {
|
|
6325
6329
|
return u == null && (u = !0), wu(u) ? { schemeMatches: u, tldMatches: u, ipV4Matches: u } : {
|
|
6326
6330
|
schemeMatches: wu(u.schemeMatches) ? u.schemeMatches : !0,
|
|
6327
6331
|
tldMatches: wu(u.tldMatches) ? u.tldMatches : !0,
|
|
6328
6332
|
ipV4Matches: wu(u.ipV4Matches) ? u.ipV4Matches : !0
|
|
6329
6333
|
};
|
|
6330
6334
|
}
|
|
6331
|
-
function
|
|
6335
|
+
function Bt(u) {
|
|
6332
6336
|
return u == null && (u = !0), wu(u) ? { scheme: u, www: u } : {
|
|
6333
6337
|
scheme: wu(u.scheme) ? u.scheme : !0,
|
|
6334
6338
|
www: wu(u.www) ? u.www : !0
|
|
6335
6339
|
};
|
|
6336
6340
|
}
|
|
6337
|
-
function
|
|
6341
|
+
function mt(u) {
|
|
6338
6342
|
return typeof u == "number" ? { length: u, location: "end" } : Fu({ length: Number.POSITIVE_INFINITY, location: "end" }, u);
|
|
6339
6343
|
}
|
|
6340
6344
|
function gt(u, D) {
|
|
@@ -6346,28 +6350,28 @@ const Ju = [
|
|
|
6346
6350
|
{ name: "New Zealand", countryCode: "+64", code: "NZ", flag: "🇳🇿" },
|
|
6347
6351
|
{ name: "United Kingdom", countryCode: "+44", code: "UK", flag: "🇬🇧" },
|
|
6348
6352
|
{ name: "Indonesia", countryCode: "+62", code: "ID", flag: "🇮🇩" }
|
|
6349
|
-
],
|
|
6353
|
+
], _t = {
|
|
6350
6354
|
AU: /^(?:\+?(61))? ?(?:\((?=.*\))\))?(0?[4])\)? ?(\d\d(?:[- ](?=\d{3})|(?!\d\d[- ]?\d[- ]))\d\d[- ]?\d[- ]?\d{3})$/gm,
|
|
6351
6355
|
US: /^(\+?1\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm,
|
|
6352
6356
|
UK: /^(\+?44\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm,
|
|
6353
6357
|
NZ: /^(\+?64\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm,
|
|
6354
6358
|
ID: /^(\+?62\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm
|
|
6355
|
-
},
|
|
6359
|
+
}, yt = {
|
|
6356
6360
|
AU: "+61",
|
|
6357
6361
|
US: "+1",
|
|
6358
6362
|
NZ: "+64",
|
|
6359
6363
|
UK: "+44",
|
|
6360
6364
|
ID: "+62"
|
|
6361
|
-
},
|
|
6362
|
-
function
|
|
6363
|
-
const f =
|
|
6365
|
+
}, vt = (u) => u.toUpperCase(), wt = (u) => u.replace(/\s+/g, "").replace(/[^0-9+]/g, "");
|
|
6366
|
+
function At(u, D) {
|
|
6367
|
+
const f = yt[u];
|
|
6364
6368
|
return D.startsWith(f) ? { cleanNumber: D.slice(f.length), countryCode: f } : { cleanNumber: D, countryCode: f };
|
|
6365
6369
|
}
|
|
6366
|
-
function
|
|
6367
|
-
const f =
|
|
6370
|
+
function xt(u, D) {
|
|
6371
|
+
const f = _t[u];
|
|
6368
6372
|
return new RegExp(f.source, "mi").test(D);
|
|
6369
6373
|
}
|
|
6370
|
-
function
|
|
6374
|
+
function kt({
|
|
6371
6375
|
number: u,
|
|
6372
6376
|
region: D,
|
|
6373
6377
|
validateDuplicate: f,
|
|
@@ -6379,19 +6383,19 @@ function xt({
|
|
|
6379
6383
|
cleanNumber: "",
|
|
6380
6384
|
errorMessage: "",
|
|
6381
6385
|
isValid: !1
|
|
6382
|
-
}, n =
|
|
6386
|
+
}, n = vt(D);
|
|
6383
6387
|
if (!u)
|
|
6384
6388
|
return t.errorMessage = "Number is empty", t;
|
|
6385
6389
|
const r = u.trim();
|
|
6386
|
-
let s =
|
|
6390
|
+
let s = wt(u);
|
|
6387
6391
|
s = s.startsWith("0") ? s.slice(1) : s;
|
|
6388
|
-
const { cleanNumber: F, countryCode: d } =
|
|
6392
|
+
const { cleanNumber: F, countryCode: d } = At(
|
|
6389
6393
|
n,
|
|
6390
6394
|
s
|
|
6391
6395
|
);
|
|
6392
6396
|
s = F, t.fullNumber = `${d}${s}`, t.cleanNumber = s;
|
|
6393
6397
|
try {
|
|
6394
|
-
if (!
|
|
6398
|
+
if (!xt(n, r)) throw new Error("Please enter a valid phone number");
|
|
6395
6399
|
t.isValid = !0;
|
|
6396
6400
|
} catch (o) {
|
|
6397
6401
|
t.errorMessage = o.message, t.isValid = !1;
|
|
@@ -6404,31 +6408,31 @@ const V1 = ({
|
|
|
6404
6408
|
} = {}) => {
|
|
6405
6409
|
const [f, e] = U(
|
|
6406
6410
|
u || {}
|
|
6407
|
-
), [t, n] = U({}), [r, s] = U({}), F = (C,
|
|
6411
|
+
), [t, n] = U({}), [r, s] = U({}), F = (C, y) => {
|
|
6408
6412
|
let x = "";
|
|
6409
6413
|
if (C.isRequired)
|
|
6410
|
-
if (typeof
|
|
6411
|
-
const
|
|
6412
|
-
if (!
|
|
6414
|
+
if (typeof y == "string") {
|
|
6415
|
+
const g = y.trim();
|
|
6416
|
+
if (!g) return `${C.label} is required`;
|
|
6413
6417
|
if (C.key.toLowerCase().includes("phone") || C.label.toLowerCase().includes("phone")) {
|
|
6414
|
-
const T =
|
|
6418
|
+
const T = g.replace(/\s+/g, ""), _ = Ju.find((I) => T.startsWith(I.countryCode)), B = T.replace(/^\+?\d+/, "");
|
|
6415
6419
|
if (_ && B.length === 0)
|
|
6416
6420
|
return "";
|
|
6417
6421
|
}
|
|
6418
|
-
} else typeof
|
|
6422
|
+
} else typeof y == "boolean" ? y !== !0 && (x = `${C.label} is required`) : y || (x = `${C.label} is required`);
|
|
6419
6423
|
if (x && t[C.key])
|
|
6420
6424
|
return x;
|
|
6421
6425
|
if (C.key.toLowerCase().includes("email") || C.label.toLowerCase().includes("email")) {
|
|
6422
|
-
const
|
|
6423
|
-
|
|
6426
|
+
const g = String(y || "").trim();
|
|
6427
|
+
g && (/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(g) || (x = "Please enter a valid email address"));
|
|
6424
6428
|
}
|
|
6425
6429
|
if (C.key.toLowerCase().includes("phone") || C.label.toLowerCase().includes("phone")) {
|
|
6426
|
-
const
|
|
6430
|
+
const g = String(y || ""), T = g.replace(/[^0-9+]/g, ""), _ = Ju.find((P) => T.startsWith(P.countryCode)), B = (_ == null ? void 0 : _.code) || "AU", I = _ ? T.substring(_.countryCode.length) : T;
|
|
6427
6431
|
if (!C.isRequired && _ && I === "")
|
|
6428
6432
|
return "";
|
|
6429
|
-
if (
|
|
6430
|
-
const P =
|
|
6431
|
-
number:
|
|
6433
|
+
if (g) {
|
|
6434
|
+
const P = kt({
|
|
6435
|
+
number: g,
|
|
6432
6436
|
region: B,
|
|
6433
6437
|
validateDuplicate: !1,
|
|
6434
6438
|
contacts: /* @__PURE__ */ new Map()
|
|
@@ -6448,44 +6452,44 @@ const V1 = ({
|
|
|
6448
6452
|
}
|
|
6449
6453
|
}, [D]);
|
|
6450
6454
|
const d = Mu(
|
|
6451
|
-
(C,
|
|
6455
|
+
(C, y) => {
|
|
6452
6456
|
e((x) => ({
|
|
6453
6457
|
...x,
|
|
6454
|
-
[C]:
|
|
6458
|
+
[C]: y
|
|
6455
6459
|
})), s((x) => ({ ...x, [C]: "" }));
|
|
6456
6460
|
},
|
|
6457
6461
|
[]
|
|
6458
6462
|
), o = Mu(
|
|
6459
6463
|
(C) => {
|
|
6460
|
-
n((
|
|
6461
|
-
const
|
|
6462
|
-
s((
|
|
6464
|
+
n((g) => ({ ...g, [C.key]: !0 }));
|
|
6465
|
+
const y = f[C.key], x = F(C, y);
|
|
6466
|
+
s((g) => ({ ...g, [C.key]: x }));
|
|
6463
6467
|
},
|
|
6464
6468
|
[f]
|
|
6465
6469
|
), c = (C) => {
|
|
6466
|
-
const
|
|
6470
|
+
const y = {
|
|
6467
6471
|
email: "email",
|
|
6468
6472
|
phone: "tel",
|
|
6469
6473
|
date: "date",
|
|
6470
6474
|
password: "password"
|
|
6471
|
-
}, x = Object.keys(
|
|
6472
|
-
(
|
|
6475
|
+
}, x = Object.keys(y).find(
|
|
6476
|
+
(g) => C.toLowerCase().includes(g)
|
|
6473
6477
|
);
|
|
6474
|
-
return x ?
|
|
6478
|
+
return x ? y[x] : "text";
|
|
6475
6479
|
}, l = Mu(
|
|
6476
6480
|
(C) => {
|
|
6477
6481
|
var T;
|
|
6478
6482
|
if (!C.isDisplay) return null;
|
|
6479
|
-
const
|
|
6483
|
+
const y = f[C.key], x = c(C.key), g = !!r[C.key] && t[C.key];
|
|
6480
6484
|
if (C.key.includes("language") || C.key.includes("country"))
|
|
6481
6485
|
return /* @__PURE__ */ a.jsx(
|
|
6482
6486
|
"select",
|
|
6483
6487
|
{
|
|
6484
|
-
className: `user-subscription-form-input${
|
|
6485
|
-
value:
|
|
6488
|
+
className: `user-subscription-form-input${g ? " error" : ""}`,
|
|
6489
|
+
value: y || "",
|
|
6486
6490
|
onChange: (_) => d(C.key, _.target.value),
|
|
6487
6491
|
onBlur: () => o(C),
|
|
6488
|
-
"aria-invalid":
|
|
6492
|
+
"aria-invalid": g,
|
|
6489
6493
|
style: C.color ? { borderColor: C.color } : void 0,
|
|
6490
6494
|
children: /* @__PURE__ */ a.jsxs("option", { value: "", children: [
|
|
6491
6495
|
"Select ",
|
|
@@ -6501,24 +6505,24 @@ const V1 = ({
|
|
|
6501
6505
|
{
|
|
6502
6506
|
type: "checkbox",
|
|
6503
6507
|
id: C.key,
|
|
6504
|
-
checked:
|
|
6508
|
+
checked: y || !1,
|
|
6505
6509
|
onChange: (_) => d(C.key, _.target.checked),
|
|
6506
|
-
"aria-invalid":
|
|
6510
|
+
"aria-invalid": g
|
|
6507
6511
|
}
|
|
6508
6512
|
),
|
|
6509
6513
|
/* @__PURE__ */ a.jsx("label", { htmlFor: C.key, children: C.label })
|
|
6510
6514
|
] }, C.key);
|
|
6511
6515
|
if (C.key.toLowerCase().includes("phone")) {
|
|
6512
|
-
const _ =
|
|
6513
|
-
const O =
|
|
6516
|
+
const _ = y || "", B = ((T = Ju.find((m) => _.startsWith(m.countryCode))) == null ? void 0 : T.countryCode) || "+61", I = _.replace(/^\+?\d+\s?/, "").trim(), P = (m) => {
|
|
6517
|
+
const O = m.replace(/[^0-9\s]/g, "").trim();
|
|
6514
6518
|
d(
|
|
6515
6519
|
C.key,
|
|
6516
6520
|
O ? `${B} ${O}` : `${B} `
|
|
6517
6521
|
);
|
|
6518
|
-
}, q = (
|
|
6522
|
+
}, q = (m) => {
|
|
6519
6523
|
d(
|
|
6520
6524
|
C.key,
|
|
6521
|
-
I ? `${
|
|
6525
|
+
I ? `${m} ${I}` : `${m} `
|
|
6522
6526
|
);
|
|
6523
6527
|
};
|
|
6524
6528
|
return /* @__PURE__ */ a.jsxs("div", { className: "user-subscription-form-field", children: [
|
|
@@ -6535,23 +6539,23 @@ const V1 = ({
|
|
|
6535
6539
|
/* @__PURE__ */ a.jsxs(
|
|
6536
6540
|
"select",
|
|
6537
6541
|
{
|
|
6538
|
-
className: `user-subscription-form-input${
|
|
6542
|
+
className: `user-subscription-form-input${g ? " error" : ""}`,
|
|
6539
6543
|
style: {
|
|
6540
6544
|
maxWidth: "100px"
|
|
6541
6545
|
},
|
|
6542
6546
|
value: B,
|
|
6543
|
-
onChange: (
|
|
6547
|
+
onChange: (m) => q(m.target.value),
|
|
6544
6548
|
onBlur: () => o(C),
|
|
6545
|
-
"aria-invalid": !!
|
|
6549
|
+
"aria-invalid": !!g,
|
|
6546
6550
|
children: [
|
|
6547
6551
|
/* @__PURE__ */ a.jsx("option", { value: "", children: "+Code" }),
|
|
6548
|
-
Ju.map((
|
|
6552
|
+
Ju.map((m) => /* @__PURE__ */ a.jsx(
|
|
6549
6553
|
"option",
|
|
6550
6554
|
{
|
|
6551
|
-
value:
|
|
6552
|
-
children: `${
|
|
6555
|
+
value: m.countryCode,
|
|
6556
|
+
children: `${m.flag} ${m.countryCode}`
|
|
6553
6557
|
},
|
|
6554
|
-
|
|
6558
|
+
m.code
|
|
6555
6559
|
))
|
|
6556
6560
|
]
|
|
6557
6561
|
}
|
|
@@ -6559,13 +6563,13 @@ const V1 = ({
|
|
|
6559
6563
|
/* @__PURE__ */ a.jsx(
|
|
6560
6564
|
"input",
|
|
6561
6565
|
{
|
|
6562
|
-
className: `user-subscription-form-input${
|
|
6566
|
+
className: `user-subscription-form-input${g ? " error" : ""}`,
|
|
6563
6567
|
type: "tel",
|
|
6564
6568
|
value: I,
|
|
6565
|
-
onChange: (
|
|
6569
|
+
onChange: (m) => P(m.target.value),
|
|
6566
6570
|
onBlur: () => o(C),
|
|
6567
6571
|
placeholder: C.label,
|
|
6568
|
-
"aria-invalid": !!
|
|
6572
|
+
"aria-invalid": !!g,
|
|
6569
6573
|
style: {
|
|
6570
6574
|
...C.color ? { borderColor: C.color } : {},
|
|
6571
6575
|
flex: 1
|
|
@@ -6575,24 +6579,24 @@ const V1 = ({
|
|
|
6575
6579
|
]
|
|
6576
6580
|
}
|
|
6577
6581
|
),
|
|
6578
|
-
|
|
6582
|
+
g && /* @__PURE__ */ a.jsx("div", { className: "user-subscription-error", children: r[C.key] })
|
|
6579
6583
|
] }, C.key);
|
|
6580
6584
|
}
|
|
6581
6585
|
return /* @__PURE__ */ a.jsxs("div", { className: "user-subscription-form-field", children: [
|
|
6582
6586
|
/* @__PURE__ */ a.jsx(
|
|
6583
6587
|
"input",
|
|
6584
6588
|
{
|
|
6585
|
-
className: `user-subscription-form-input${
|
|
6589
|
+
className: `user-subscription-form-input${g ? " error" : ""}`,
|
|
6586
6590
|
type: x,
|
|
6587
|
-
value:
|
|
6591
|
+
value: y || "",
|
|
6588
6592
|
onChange: (_) => d(C.key, _.target.value),
|
|
6589
6593
|
onBlur: () => o(C),
|
|
6590
6594
|
placeholder: C.label,
|
|
6591
|
-
"aria-invalid":
|
|
6595
|
+
"aria-invalid": g,
|
|
6592
6596
|
style: C.color ? { borderColor: C.color } : void 0
|
|
6593
6597
|
}
|
|
6594
6598
|
),
|
|
6595
|
-
|
|
6599
|
+
g && /* @__PURE__ */ a.jsx("div", { className: "user-subscription-error", children: r[C.key] })
|
|
6596
6600
|
] }, C.key);
|
|
6597
6601
|
},
|
|
6598
6602
|
[r, t, f, d, o]
|
|
@@ -6600,18 +6604,18 @@ const V1 = ({
|
|
|
6600
6604
|
(C) => {
|
|
6601
6605
|
var T;
|
|
6602
6606
|
if (!C.isDisplay) return null;
|
|
6603
|
-
const
|
|
6607
|
+
const y = f[C.key], x = c(C.key), g = !!r[C.key] && t[C.key];
|
|
6604
6608
|
if (C.key.toLowerCase().includes("phone")) {
|
|
6605
|
-
const _ =
|
|
6606
|
-
const O =
|
|
6609
|
+
const _ = y || "", B = ((T = Ju.find((m) => _.startsWith(m.countryCode))) == null ? void 0 : T.countryCode) || "+61", I = _.replace(/^\+?\d+\s?/, "").trim(), P = (m) => {
|
|
6610
|
+
const O = m.replace(/[^0-9\s]/g, "").trim();
|
|
6607
6611
|
d(
|
|
6608
6612
|
C.key,
|
|
6609
6613
|
O ? `${B} ${O}` : `${B} `
|
|
6610
6614
|
);
|
|
6611
|
-
}, q = (
|
|
6615
|
+
}, q = (m) => {
|
|
6612
6616
|
d(
|
|
6613
6617
|
C.key,
|
|
6614
|
-
I ? `${
|
|
6618
|
+
I ? `${m} ${I}` : `${m} `
|
|
6615
6619
|
);
|
|
6616
6620
|
};
|
|
6617
6621
|
return /* @__PURE__ */ a.jsxs("div", { className: "sc-message--contact-form-field", children: [
|
|
@@ -6634,18 +6638,18 @@ const V1 = ({
|
|
|
6634
6638
|
className: "sc-message--contact-form-input",
|
|
6635
6639
|
style: { maxWidth: "100px" },
|
|
6636
6640
|
value: B,
|
|
6637
|
-
onChange: (
|
|
6641
|
+
onChange: (m) => q(m.target.value),
|
|
6638
6642
|
onBlur: () => o(C),
|
|
6639
|
-
"aria-invalid":
|
|
6643
|
+
"aria-invalid": g,
|
|
6640
6644
|
children: [
|
|
6641
6645
|
/* @__PURE__ */ a.jsx("option", { value: "", children: "+Code" }),
|
|
6642
|
-
Ju.map((
|
|
6646
|
+
Ju.map((m) => /* @__PURE__ */ a.jsx(
|
|
6643
6647
|
"option",
|
|
6644
6648
|
{
|
|
6645
|
-
value:
|
|
6646
|
-
children: `${
|
|
6649
|
+
value: m.countryCode,
|
|
6650
|
+
children: `${m.flag} ${m.countryCode}`
|
|
6647
6651
|
},
|
|
6648
|
-
|
|
6652
|
+
m.code
|
|
6649
6653
|
))
|
|
6650
6654
|
]
|
|
6651
6655
|
}
|
|
@@ -6656,22 +6660,22 @@ const V1 = ({
|
|
|
6656
6660
|
id: `contact-${C.key}`,
|
|
6657
6661
|
type: "tel",
|
|
6658
6662
|
value: I,
|
|
6659
|
-
onChange: (
|
|
6663
|
+
onChange: (m) => P(m.target.value),
|
|
6660
6664
|
onBlur: () => o(C),
|
|
6661
6665
|
placeholder: "",
|
|
6662
|
-
className: `sc-message--contact-form-input ${
|
|
6663
|
-
"aria-invalid":
|
|
6666
|
+
className: `sc-message--contact-form-input ${g ? "error" : ""}`,
|
|
6667
|
+
"aria-invalid": g,
|
|
6664
6668
|
style: {
|
|
6665
6669
|
...C.color ? { borderColor: C.color } : {},
|
|
6666
6670
|
flex: 1,
|
|
6667
|
-
...
|
|
6671
|
+
...g ? { borderColor: "#ff4444" } : {}
|
|
6668
6672
|
}
|
|
6669
6673
|
}
|
|
6670
6674
|
)
|
|
6671
6675
|
]
|
|
6672
6676
|
}
|
|
6673
6677
|
),
|
|
6674
|
-
|
|
6678
|
+
g && /* @__PURE__ */ a.jsx(
|
|
6675
6679
|
"div",
|
|
6676
6680
|
{
|
|
6677
6681
|
style: {
|
|
@@ -6698,19 +6702,19 @@ const V1 = ({
|
|
|
6698
6702
|
{
|
|
6699
6703
|
id: `contact-${C.key}`,
|
|
6700
6704
|
type: x,
|
|
6701
|
-
value:
|
|
6705
|
+
value: y || "",
|
|
6702
6706
|
onChange: (_) => d(C.key, _.target.value),
|
|
6703
6707
|
onBlur: () => o(C),
|
|
6704
6708
|
placeholder: "",
|
|
6705
|
-
className: `sc-message--contact-form-input ${
|
|
6706
|
-
"aria-invalid":
|
|
6709
|
+
className: `sc-message--contact-form-input ${g ? "error" : ""}`,
|
|
6710
|
+
"aria-invalid": g,
|
|
6707
6711
|
style: {
|
|
6708
6712
|
...C.color ? { borderColor: C.color } : {},
|
|
6709
|
-
...
|
|
6713
|
+
...g ? { borderColor: "#ff4444" } : {}
|
|
6710
6714
|
}
|
|
6711
6715
|
}
|
|
6712
6716
|
),
|
|
6713
|
-
|
|
6717
|
+
g && /* @__PURE__ */ a.jsx(
|
|
6714
6718
|
"div",
|
|
6715
6719
|
{
|
|
6716
6720
|
style: {
|
|
@@ -6731,12 +6735,12 @@ const V1 = ({
|
|
|
6731
6735
|
d,
|
|
6732
6736
|
o
|
|
6733
6737
|
]
|
|
6734
|
-
),
|
|
6735
|
-
const
|
|
6738
|
+
), v = Mu((C) => {
|
|
6739
|
+
const y = {};
|
|
6736
6740
|
return C.filter((x) => x.isDisplay).forEach((x) => {
|
|
6737
|
-
const
|
|
6738
|
-
|
|
6739
|
-
}), s((x) => ({ ...x, ...
|
|
6741
|
+
const g = f[x.key];
|
|
6742
|
+
y[x.key] = F(x, g);
|
|
6743
|
+
}), s((x) => ({ ...x, ...y })), C.filter((x) => x.isDisplay && x.isRequired).every((x) => y[x.key] === "");
|
|
6740
6744
|
}, [f, F]);
|
|
6741
6745
|
return {
|
|
6742
6746
|
formData: f,
|
|
@@ -6749,10 +6753,10 @@ const V1 = ({
|
|
|
6749
6753
|
renderContactFormField: j,
|
|
6750
6754
|
getInputType: c,
|
|
6751
6755
|
errors: r,
|
|
6752
|
-
validateAll:
|
|
6756
|
+
validateAll: v
|
|
6753
6757
|
};
|
|
6754
6758
|
};
|
|
6755
|
-
function
|
|
6759
|
+
function jt(u) {
|
|
6756
6760
|
const D = {};
|
|
6757
6761
|
return Object.entries(u).forEach(([f, e]) => {
|
|
6758
6762
|
if (e) {
|
|
@@ -6765,30 +6769,30 @@ function kt(u) {
|
|
|
6765
6769
|
}
|
|
6766
6770
|
}), D;
|
|
6767
6771
|
}
|
|
6768
|
-
const
|
|
6772
|
+
const St = ({
|
|
6769
6773
|
onSubmit: u,
|
|
6770
6774
|
onFormStateChange: D
|
|
6771
6775
|
}) => {
|
|
6772
|
-
const { colors: f } = iu(), e = Wu(), t = pu(), { socket: n } =
|
|
6776
|
+
const { colors: f } = iu(), e = Wu(), t = pu(), { socket: n } = tD(), { setScreen: r } = Nu();
|
|
6773
6777
|
zu();
|
|
6774
|
-
const { setIsOfflineMode: s, send: F, participants: d, setMessages: o, setParticipants: c, setConnectionState: l } = du(), { formData: j, renderContactFormField:
|
|
6778
|
+
const { setIsOfflineMode: s, send: F, participants: d, setMessages: o, setParticipants: c, setConnectionState: l } = du(), { formData: j, renderContactFormField: v, errors: C, validateAll: y } = V1({
|
|
6775
6779
|
initialData: {},
|
|
6776
6780
|
loadFromDataUserSubs: !0
|
|
6777
|
-
}), [x,
|
|
6781
|
+
}), [x, g] = U(!1), [T, _] = U(!1);
|
|
6778
6782
|
Z(() => {
|
|
6779
6783
|
D && !T && D(!0), D && T && D(!1);
|
|
6780
6784
|
}, [T]);
|
|
6781
6785
|
const B = async (P) => {
|
|
6782
|
-
var
|
|
6783
|
-
if (P.preventDefault(), !!
|
|
6784
|
-
|
|
6786
|
+
var m;
|
|
6787
|
+
if (P.preventDefault(), !!y(t.formSettings)) {
|
|
6788
|
+
g(!0);
|
|
6785
6789
|
try {
|
|
6786
6790
|
const O = {};
|
|
6787
6791
|
t.formSettings.forEach((E) => {
|
|
6788
6792
|
var h;
|
|
6789
6793
|
E.isDisplay && j[E.key] !== void 0 && (O[E.key] = ((h = j[E.key]) == null ? void 0 : h.toString().trim()) || "");
|
|
6790
6794
|
});
|
|
6791
|
-
const L =
|
|
6795
|
+
const L = jt(O);
|
|
6792
6796
|
if (!X.getItem("profileLiveChat"))
|
|
6793
6797
|
try {
|
|
6794
6798
|
const E = new URLSearchParams();
|
|
@@ -6851,13 +6855,13 @@ const jt = ({
|
|
|
6851
6855
|
data: {
|
|
6852
6856
|
type: Au.text,
|
|
6853
6857
|
data: k,
|
|
6854
|
-
author: (
|
|
6858
|
+
author: (m = d[1]) == null ? void 0 : m.id
|
|
6855
6859
|
}
|
|
6856
6860
|
}), _(!0), s(!0), u && u(O.name, O.phone);
|
|
6857
6861
|
} catch (O) {
|
|
6858
6862
|
console.error("Error sending contact form to webhook:", O);
|
|
6859
6863
|
} finally {
|
|
6860
|
-
|
|
6864
|
+
g(!1);
|
|
6861
6865
|
}
|
|
6862
6866
|
}
|
|
6863
6867
|
}, I = f[uu.received];
|
|
@@ -6870,7 +6874,7 @@ const jt = ({
|
|
|
6870
6874
|
backgroundColor: I.bg
|
|
6871
6875
|
},
|
|
6872
6876
|
children: /* @__PURE__ */ a.jsx("div", { className: "sc-message--contact-form-content", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: B, className: "sc-message--contact-form-form", noValidate: !0, children: [
|
|
6873
|
-
t.formSettings.sort((P, q) => P.order - q.order).map(
|
|
6877
|
+
t.formSettings.sort((P, q) => P.order - q.order).map(v),
|
|
6874
6878
|
/* @__PURE__ */ a.jsx("div", { className: "sc-message--contact-form-authorization", children: /* @__PURE__ */ a.jsx(
|
|
6875
6879
|
"a",
|
|
6876
6880
|
{
|
|
@@ -6898,18 +6902,18 @@ const jt = ({
|
|
|
6898
6902
|
] }) })
|
|
6899
6903
|
}
|
|
6900
6904
|
);
|
|
6901
|
-
},
|
|
6905
|
+
}, Tt = ({
|
|
6902
6906
|
message: u,
|
|
6903
6907
|
onFormSubmitted: D
|
|
6904
6908
|
}) => {
|
|
6905
|
-
const { colors: f } = iu(), { setIsContactFormActive: e } = du(), t =
|
|
6909
|
+
const { colors: f } = iu(), { setIsContactFormActive: e } = du(), t = gu(null);
|
|
6906
6910
|
Z(() => {
|
|
6907
6911
|
n();
|
|
6908
6912
|
}, [u]);
|
|
6909
6913
|
const n = () => {
|
|
6910
6914
|
if (u.direction === uu.received && t.current) {
|
|
6911
6915
|
const F = t.current.innerText;
|
|
6912
|
-
let d =
|
|
6916
|
+
let d = bt.link(F, {
|
|
6913
6917
|
className: "chatLink",
|
|
6914
6918
|
truncate: { length: 50, location: "smart" }
|
|
6915
6919
|
});
|
|
@@ -6920,7 +6924,7 @@ const jt = ({
|
|
|
6920
6924
|
throw new Error("Unable to find text.");
|
|
6921
6925
|
const r = f[u.direction || uu.received];
|
|
6922
6926
|
return "isShowForm" in u.data && u.data.isShowForm ? /* @__PURE__ */ a.jsx(
|
|
6923
|
-
|
|
6927
|
+
St,
|
|
6924
6928
|
{
|
|
6925
6929
|
onFormStateChange: (F) => {
|
|
6926
6930
|
e(F), !F && D && D(!0);
|
|
@@ -6958,7 +6962,7 @@ const jt = ({
|
|
|
6958
6962
|
...r,
|
|
6959
6963
|
children: /* @__PURE__ */ a.jsx("path", { d: "M20 6L9 17l-5-5" })
|
|
6960
6964
|
}
|
|
6961
|
-
),
|
|
6965
|
+
), Nt = ({ message: u }) => {
|
|
6962
6966
|
const { colors: D } = iu();
|
|
6963
6967
|
if (!("delivery" in u && "read" in u))
|
|
6964
6968
|
throw new Error("Unable to find delivery/read attributes");
|
|
@@ -6990,8 +6994,8 @@ const jt = ({
|
|
|
6990
6994
|
)
|
|
6991
6995
|
] });
|
|
6992
6996
|
};
|
|
6993
|
-
S1.extend(
|
|
6994
|
-
const
|
|
6997
|
+
S1.extend(Ke);
|
|
6998
|
+
const Ot = ({ message: u, Avatar: D }) => {
|
|
6995
6999
|
const { participants: f } = du(), { colors: e } = iu(), [t, n] = U(!1), [r, s] = U(!1), F = pu(), d = u.data && "text" in u.data && "isShowForm" in u.data && u.data.isShowForm, o = f.find(
|
|
6996
7000
|
(j) => j.id === u.author
|
|
6997
7001
|
) || {
|
|
@@ -7021,19 +7025,19 @@ const Nt = ({ message: u, Avatar: D }) => {
|
|
|
7021
7025
|
),
|
|
7022
7026
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-message--wrapper", onClick: c, children: [
|
|
7023
7027
|
u.data && "text" in u.data && /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(
|
|
7024
|
-
|
|
7028
|
+
Tt,
|
|
7025
7029
|
{
|
|
7026
7030
|
message: u,
|
|
7027
7031
|
onFormSubmitted: s
|
|
7028
7032
|
}
|
|
7029
7033
|
) }),
|
|
7030
|
-
u.type === "file" && /* @__PURE__ */ a.jsx(
|
|
7031
|
-
u.type === "location" && /* @__PURE__ */ a.jsx(
|
|
7032
|
-
u.type === "list" && /* @__PURE__ */ a.jsx(
|
|
7033
|
-
u.type === "carousel" && /* @__PURE__ */ a.jsx(
|
|
7034
|
+
u.type === "file" && /* @__PURE__ */ a.jsx(D3, { message: u }),
|
|
7035
|
+
u.type === "location" && /* @__PURE__ */ a.jsx(f3, { message: u }),
|
|
7036
|
+
u.type === "list" && /* @__PURE__ */ a.jsx(e3, { messageList: u }),
|
|
7037
|
+
u.type === "carousel" && /* @__PURE__ */ a.jsx(Qe, { messageCarousel: u }),
|
|
7034
7038
|
u.type === "buttons" && /* @__PURE__ */ a.jsx(vD, { message: u }),
|
|
7035
7039
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-message--meta", children: [
|
|
7036
|
-
u.direction === "sent" && /* @__PURE__ */ a.jsx(
|
|
7040
|
+
u.direction === "sent" && /* @__PURE__ */ a.jsx(Nt, { message: u }),
|
|
7037
7041
|
/* @__PURE__ */ a.jsx(
|
|
7038
7042
|
"div",
|
|
7039
7043
|
{
|
|
@@ -7045,7 +7049,7 @@ const Nt = ({ message: u, Avatar: D }) => {
|
|
|
7045
7049
|
] })
|
|
7046
7050
|
] })
|
|
7047
7051
|
] }) });
|
|
7048
|
-
},
|
|
7052
|
+
}, Rt = () => {
|
|
7049
7053
|
const { colors: u } = iu();
|
|
7050
7054
|
return /* @__PURE__ */ a.jsxs(
|
|
7051
7055
|
"div",
|
|
@@ -7062,7 +7066,7 @@ const Nt = ({ message: u, Avatar: D }) => {
|
|
|
7062
7066
|
]
|
|
7063
7067
|
}
|
|
7064
7068
|
);
|
|
7065
|
-
},
|
|
7069
|
+
}, Pt = ({
|
|
7066
7070
|
Avatar: u,
|
|
7067
7071
|
phone: D
|
|
7068
7072
|
}) => {
|
|
@@ -7110,29 +7114,29 @@ const Nt = ({ message: u, Avatar: D }) => {
|
|
|
7110
7114
|
}
|
|
7111
7115
|
) })
|
|
7112
7116
|
] }) });
|
|
7113
|
-
},
|
|
7114
|
-
const { scroll: D, setScroll: f, isOpen: e } = Nu(), { messages: t, showTypingIndicator: n, setNewIOMessage: r, setMessages: s } = du(), F = pu(), { colors: d } = iu(), { formSettings: o } = pu(), [c, l] = U(""), j = F.offline_mode,
|
|
7117
|
+
}, It = ({ Avatar: u }) => {
|
|
7118
|
+
const { scroll: D, setScroll: f, isOpen: e } = Nu(), { messages: t, showTypingIndicator: n, setNewIOMessage: r, setMessages: s } = du(), F = pu(), { colors: d } = iu(), { formSettings: o } = pu(), [c, l] = U(""), j = F.offline_mode, v = kD(j), C = (T) => {
|
|
7115
7119
|
if (!("text" in T.data)) return !1;
|
|
7116
|
-
const _ = T.data.text || "", B = (
|
|
7117
|
-
`).map((
|
|
7118
|
-
I.map((
|
|
7120
|
+
const _ = T.data.text || "", B = (m) => m.toLowerCase().replace(/\s+/g, "").replace(/[^a-z0-9_]/g, ""), I = _.split(`
|
|
7121
|
+
`).map((m) => m.trim()), P = new Set(
|
|
7122
|
+
I.map((m) => m.split(":")[0] || "").map((m) => B(m))
|
|
7119
7123
|
), q = o == null ? void 0 : o.filter(
|
|
7120
|
-
(
|
|
7124
|
+
(m) => m.isDisplay && m.isRequired
|
|
7121
7125
|
);
|
|
7122
7126
|
return q == null ? void 0 : q.every(
|
|
7123
|
-
(
|
|
7127
|
+
(m) => P.has(B(m.label)) || P.has(B(m.key))
|
|
7124
7128
|
);
|
|
7125
|
-
},
|
|
7129
|
+
}, y = gu(null), [x, g] = U();
|
|
7126
7130
|
return Z(() => {
|
|
7127
7131
|
const T = (_) => {
|
|
7128
|
-
if (
|
|
7132
|
+
if (y.current) {
|
|
7129
7133
|
const B = Math.round(
|
|
7130
|
-
100 *
|
|
7134
|
+
100 * y.current.scrollTop / (y.current.scrollHeight || 1)
|
|
7131
7135
|
);
|
|
7132
7136
|
(Math.abs(B - _) > 1 || _ === 100) && requestAnimationFrame(() => {
|
|
7133
|
-
|
|
7137
|
+
y.current && y.current.scrollTo({
|
|
7134
7138
|
top: Math.round(
|
|
7135
|
-
_ *
|
|
7139
|
+
_ * y.current.scrollHeight / 100
|
|
7136
7140
|
),
|
|
7137
7141
|
behavior: "instant",
|
|
7138
7142
|
left: 0
|
|
@@ -7153,7 +7157,7 @@ const Nt = ({ message: u, Avatar: D }) => {
|
|
|
7153
7157
|
const I = X.getItem("submitedFormLateTime") || B.submitedFormLateTime, P = t.some(
|
|
7154
7158
|
(q) => q.data && "isShowForm" in q.data && q.data.isShowForm
|
|
7155
7159
|
);
|
|
7156
|
-
if (
|
|
7160
|
+
if (v && !I && !P) {
|
|
7157
7161
|
const q = {
|
|
7158
7162
|
mid: `show-text-${Date.now()}`,
|
|
7159
7163
|
author: "system",
|
|
@@ -7170,7 +7174,7 @@ const Nt = ({ message: u, Avatar: D }) => {
|
|
|
7170
7174
|
handover: !1,
|
|
7171
7175
|
isOffline: !0,
|
|
7172
7176
|
submitedFormLateTime: null
|
|
7173
|
-
},
|
|
7177
|
+
}, m = {
|
|
7174
7178
|
mid: `show-form-${Date.now()}`,
|
|
7175
7179
|
author: "user",
|
|
7176
7180
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -7187,7 +7191,7 @@ const Nt = ({ message: u, Avatar: D }) => {
|
|
|
7187
7191
|
isOffline: !0,
|
|
7188
7192
|
submitedFormLateTime: null
|
|
7189
7193
|
};
|
|
7190
|
-
B.id ? s([...t]) : s([...t, q,
|
|
7194
|
+
B.id ? s([...t]) : s([...t, q, m]);
|
|
7191
7195
|
}
|
|
7192
7196
|
};
|
|
7193
7197
|
T();
|
|
@@ -7197,23 +7201,23 @@ const Nt = ({ message: u, Avatar: D }) => {
|
|
|
7197
7201
|
return window.addEventListener("storage", _), () => {
|
|
7198
7202
|
window.removeEventListener("storage", _);
|
|
7199
7203
|
};
|
|
7200
|
-
}, [
|
|
7204
|
+
}, [v]), Z(() => {
|
|
7201
7205
|
r(t[t.length - 1]);
|
|
7202
7206
|
}, []), Z(() => {
|
|
7203
7207
|
const T = t[t.length - 1];
|
|
7204
|
-
(x == null ? void 0 : x.mid) !== (T == null ? void 0 : T.mid) && (
|
|
7208
|
+
(x == null ? void 0 : x.mid) !== (T == null ? void 0 : T.mid) && (g(T), f(100));
|
|
7205
7209
|
}, [t]), /* @__PURE__ */ a.jsxs(
|
|
7206
7210
|
"div",
|
|
7207
7211
|
{
|
|
7208
7212
|
className: "sc-message-list",
|
|
7209
|
-
ref:
|
|
7213
|
+
ref: y,
|
|
7210
7214
|
style: { backgroundColor: d.messageList.bg },
|
|
7211
7215
|
children: [
|
|
7212
7216
|
t.map((T) => /* @__PURE__ */ a.jsxs(sf.Fragment, { children: [
|
|
7213
|
-
/* @__PURE__ */ a.jsx(
|
|
7214
|
-
C(T) &&
|
|
7217
|
+
/* @__PURE__ */ a.jsx(Ot, { message: T, Avatar: u }),
|
|
7218
|
+
C(T) && v && /* @__PURE__ */ a.jsx(Pt, { phone: c })
|
|
7215
7219
|
] }, T.mid)),
|
|
7216
|
-
n && /* @__PURE__ */ a.jsx(
|
|
7220
|
+
n && /* @__PURE__ */ a.jsx(Rt, {})
|
|
7217
7221
|
]
|
|
7218
7222
|
}
|
|
7219
7223
|
);
|
|
@@ -7238,12 +7242,12 @@ var rf = { exports: {} };
|
|
|
7238
7242
|
}, t.prototype.replace_emoticons_with_colons = function(n) {
|
|
7239
7243
|
var r = this;
|
|
7240
7244
|
r.init_emoticons();
|
|
7241
|
-
var s = 0, F = [], d = n.replace(r.rx_emoticons, function(l, j,
|
|
7242
|
-
var
|
|
7245
|
+
var s = 0, F = [], d = n.replace(r.rx_emoticons, function(l, j, v, C) {
|
|
7246
|
+
var y = s;
|
|
7243
7247
|
s = C + l.length;
|
|
7244
|
-
var x =
|
|
7245
|
-
if ((x ||
|
|
7246
|
-
var T = n.substring(
|
|
7248
|
+
var x = v.indexOf("(") !== -1, g = v.indexOf(")") !== -1;
|
|
7249
|
+
if ((x || g) && F.indexOf(v) == -1 && F.push(v), g && !x) {
|
|
7250
|
+
var T = n.substring(y, C);
|
|
7247
7251
|
if (T.indexOf("(") !== -1 && T.indexOf(")") === -1) return l;
|
|
7248
7252
|
}
|
|
7249
7253
|
if (l === `
|
|
@@ -7251,14 +7255,14 @@ var rf = { exports: {} };
|
|
|
7251
7255
|
var _ = n.substring(0, C);
|
|
7252
7256
|
if (/\n?(6\)|7\))/.test(_)) return l;
|
|
7253
7257
|
}
|
|
7254
|
-
var B = r.data[r.map.emoticons[
|
|
7258
|
+
var B = r.data[r.map.emoticons[v]][3][0];
|
|
7255
7259
|
return B ? j + ":" + B + ":" : l;
|
|
7256
7260
|
});
|
|
7257
7261
|
if (F.length) {
|
|
7258
7262
|
var o = F.map(r.escape_rx), c = new RegExp("(\\(.+)(" + o.join("|") + ")(.+\\))", "g");
|
|
7259
|
-
d = d.replace(c, function(l, j,
|
|
7260
|
-
var
|
|
7261
|
-
return
|
|
7263
|
+
d = d.replace(c, function(l, j, v, C) {
|
|
7264
|
+
var y = r.data[r.map.emoticons[v]][3][0];
|
|
7265
|
+
return y ? j + ":" + y + ":" + C : l;
|
|
7262
7266
|
});
|
|
7263
7267
|
}
|
|
7264
7268
|
return d;
|
|
@@ -7320,17 +7324,17 @@ var rf = { exports: {} };
|
|
|
7320
7324
|
if (typeof F == "object" && (c = o.replacement(F.idx, F.actual, F.wrapper, void 0, !0), l = F.idx), s = s || "", o.colons_mode) return ":" + o.data[n][3][0] + ":" + c;
|
|
7321
7325
|
var j = r ? s + r + s : o.data[n][8] || s + o.data[n][3][0] + s;
|
|
7322
7326
|
if (o.text_mode) return j + c;
|
|
7323
|
-
var
|
|
7327
|
+
var v = o.find_image(n, l);
|
|
7324
7328
|
if (o.init_env(), o.replace_mode == "softbank" && o.allow_native && o.data[n][1]) return o.format_native(o.data[n][1] + c, !d);
|
|
7325
7329
|
if (o.replace_mode == "google" && o.allow_native && o.data[n][2]) return o.format_native(o.data[n][2] + c, !d);
|
|
7326
|
-
if (
|
|
7327
|
-
var C = o.include_title ? ' title="' + (r || o.data[n][3][0]) + '"' : "",
|
|
7328
|
-
if (o.data[n][7] && (
|
|
7329
|
-
if (o.use_sheet &&
|
|
7330
|
-
var x = 100 *
|
|
7331
|
-
return '<span class="emoji-outer emoji-sizer"><span class="emoji-inner" style="' + _ + '"' + C + ' data-codepoints="' +
|
|
7332
|
-
} else return o.use_css_imgs ? '<span class="emoji emoji-' + n + '"' + C + ' data-codepoints="' +
|
|
7333
|
-
return '<img src="' +
|
|
7330
|
+
if (v.is_var && (c = ""), o.replace_mode == "unified" && o.allow_native) return o.format_native(v.unified + c, !d);
|
|
7331
|
+
var C = o.include_title ? ' title="' + (r || o.data[n][3][0]) + '"' : "", y = o.include_text ? s + (r || o.data[n][3][0]) + s : "";
|
|
7332
|
+
if (o.data[n][7] && (v.path = o.data[n][7], v.px = null, v.py = null, v.is_var = !1), v.is_var && o.include_text && F && F.actual && F.wrapper && (y += F.wrapper + F.actual + F.wrapper), o.replace_mode == "css")
|
|
7333
|
+
if (o.use_sheet && v.px != null && v.py != null) {
|
|
7334
|
+
var x = 100 * v.px / (o.sheet_size - 1), g = 100 * v.py / (o.sheet_size - 1), T = 100 * o.sheet_size, _ = "background: url(" + v.sheet + ");background-position:" + x + "% " + g + "%;background-size:" + T + "% " + T + "%";
|
|
7335
|
+
return '<span class="emoji-outer emoji-sizer"><span class="emoji-inner" style="' + _ + '"' + C + ' data-codepoints="' + v.full_idx + '">' + y + "</span></span>" + c;
|
|
7336
|
+
} else return o.use_css_imgs ? '<span class="emoji emoji-' + n + '"' + C + ' data-codepoints="' + v.full_idx + '">' + y + "</span>" + c : '<span class="emoji emoji-sizer" style="background-image:url(' + v.path + ')"' + C + ' data-codepoints="' + v.full_idx + '">' + y + "</span>" + c;
|
|
7337
|
+
return '<img src="' + v.path + '" class="emoji" data-codepoints="' + v.full_idx + '" ' + C + "/>" + c;
|
|
7334
7338
|
}, t.prototype.format_native = function(n, r) {
|
|
7335
7339
|
var s = this;
|
|
7336
7340
|
return s.wrap_native && r ? '<span class="emoji-native">' + n + "</span>" : n;
|
|
@@ -9808,8 +9812,8 @@ var rf = { exports: {} };
|
|
|
9808
9812
|
return this || (typeof window < "u" ? window : dD);
|
|
9809
9813
|
}());
|
|
9810
9814
|
})(rf, rf.exports);
|
|
9811
|
-
var
|
|
9812
|
-
const
|
|
9815
|
+
var $t = rf.exports;
|
|
9816
|
+
const Lt = /* @__PURE__ */ Ff($t), Mt = [
|
|
9813
9817
|
{
|
|
9814
9818
|
name: "People",
|
|
9815
9819
|
emojis: [
|
|
@@ -10463,8 +10467,8 @@ const $t = /* @__PURE__ */ Ff(It), Lt = [
|
|
|
10463
10467
|
"🔹"
|
|
10464
10468
|
]
|
|
10465
10469
|
}
|
|
10466
|
-
],
|
|
10467
|
-
const f =
|
|
10470
|
+
], qt = ({ onBlur: u, onSelect: D }) => {
|
|
10471
|
+
const f = gu(new Lt()), e = gu(null);
|
|
10468
10472
|
Z(() => {
|
|
10469
10473
|
const n = e.current;
|
|
10470
10474
|
n && (n.style.opacity = "0", window.requestAnimationFrame(() => {
|
|
@@ -10474,7 +10478,7 @@ const $t = /* @__PURE__ */ Ff(It), Lt = [
|
|
|
10474
10478
|
const t = (n, r) => {
|
|
10475
10479
|
D(n, r), e.current && e.current.blur();
|
|
10476
10480
|
};
|
|
10477
|
-
return /* @__PURE__ */ a.jsx("div", { tabIndex: 0, onBlur: u, className: "sc-emoji-picker", ref: e, children: /* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--content", children:
|
|
10481
|
+
return /* @__PURE__ */ a.jsx("div", { tabIndex: 0, onBlur: u, className: "sc-emoji-picker", ref: e, children: /* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--content", children: Mt.map((n) => /* @__PURE__ */ a.jsxs("div", { className: "sc-emoji-picker--category", children: [
|
|
10478
10482
|
/* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--category-title", children: n.name }),
|
|
10479
10483
|
n.emojis.map((r) => /* @__PURE__ */ a.jsx(
|
|
10480
10484
|
"span",
|
|
@@ -10486,7 +10490,7 @@ const $t = /* @__PURE__ */ Ff(It), Lt = [
|
|
|
10486
10490
|
r
|
|
10487
10491
|
))
|
|
10488
10492
|
] }, n.name)) }) });
|
|
10489
|
-
},
|
|
10493
|
+
}, zt = ({
|
|
10490
10494
|
x: u = "0",
|
|
10491
10495
|
y: D = "0",
|
|
10492
10496
|
className: f = "sc-user-input--emoji-icon",
|
|
@@ -10509,8 +10513,8 @@ const $t = /* @__PURE__ */ Ff(It), Lt = [
|
|
|
10509
10513
|
/* @__PURE__ */ a.jsx("path", { d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-2.5c2.33 0 4.32-1.45 5.12-3.5h-1.67c-.69 1.19-1.97 2-3.45 2s-2.75-.81-3.45-2H6.88c.8 2.05 2.79 3.5 5.12 3.5" })
|
|
10510
10514
|
]
|
|
10511
10515
|
}
|
|
10512
|
-
),
|
|
10513
|
-
const [f, e] = U(!1), t =
|
|
10516
|
+
), Ut = ({ inputRef: u, onInput: D }) => {
|
|
10517
|
+
const [f, e] = U(!1), t = gu(null), n = () => {
|
|
10514
10518
|
e(!f);
|
|
10515
10519
|
}, r = (d) => {
|
|
10516
10520
|
(!d.relatedTarget || d.relatedTarget !== t.current) && n();
|
|
@@ -10525,7 +10529,7 @@ const $t = /* @__PURE__ */ Ff(It), Lt = [
|
|
|
10525
10529
|
}
|
|
10526
10530
|
};
|
|
10527
10531
|
return /* @__PURE__ */ a.jsxs("div", { className: "sc-user-input--picker-wrapper", children: [
|
|
10528
|
-
f && /* @__PURE__ */ a.jsx(
|
|
10532
|
+
f && /* @__PURE__ */ a.jsx(qt, { onBlur: r, onSelect: s }),
|
|
10529
10533
|
/* @__PURE__ */ a.jsx(
|
|
10530
10534
|
"button",
|
|
10531
10535
|
{
|
|
@@ -10535,11 +10539,11 @@ const $t = /* @__PURE__ */ Ff(It), Lt = [
|
|
|
10535
10539
|
id: "sc-emoji-button",
|
|
10536
10540
|
className: "sc-user-input--emoji-icon-wrapper",
|
|
10537
10541
|
ref: t,
|
|
10538
|
-
children: /* @__PURE__ */ a.jsx(
|
|
10542
|
+
children: /* @__PURE__ */ a.jsx(zt, {})
|
|
10539
10543
|
}
|
|
10540
10544
|
)
|
|
10541
10545
|
] });
|
|
10542
|
-
},
|
|
10546
|
+
}, Vt = {
|
|
10543
10547
|
images: ["image/jpeg", "image/png", "image/webp", "image/bmp"],
|
|
10544
10548
|
videos: [
|
|
10545
10549
|
"video/mp4",
|
|
@@ -10605,13 +10609,13 @@ const $t = /* @__PURE__ */ Ff(It), Lt = [
|
|
|
10605
10609
|
" "
|
|
10606
10610
|
]
|
|
10607
10611
|
}
|
|
10608
|
-
),
|
|
10612
|
+
), Ht = () => {
|
|
10609
10613
|
const { setFile: u } = du(), D = (t) => {
|
|
10610
10614
|
t.target.value = "";
|
|
10611
10615
|
}, f = (t) => {
|
|
10612
10616
|
t.target.files && t.target.files[0] && u && u(t.target.files[0]);
|
|
10613
10617
|
}, e = C0(
|
|
10614
|
-
() => Object.values(
|
|
10618
|
+
() => Object.values(Vt).flat().join(","),
|
|
10615
10619
|
[]
|
|
10616
10620
|
);
|
|
10617
10621
|
return /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--file-wrapper", children: /* @__PURE__ */ a.jsxs("button", { className: "sc-user-input--file-icon-wrapper", type: "button", children: [
|
|
@@ -10627,7 +10631,7 @@ const $t = /* @__PURE__ */ Ff(It), Lt = [
|
|
|
10627
10631
|
}
|
|
10628
10632
|
)
|
|
10629
10633
|
] }) });
|
|
10630
|
-
},
|
|
10634
|
+
}, Wt = ({
|
|
10631
10635
|
x: u = "0",
|
|
10632
10636
|
y: D = "0",
|
|
10633
10637
|
className: f = "sc-user-input--location-icon",
|
|
@@ -10646,7 +10650,7 @@ const $t = /* @__PURE__ */ Ff(It), Lt = [
|
|
|
10646
10650
|
...n,
|
|
10647
10651
|
children: /* @__PURE__ */ a.jsx("path", { d: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5" })
|
|
10648
10652
|
}
|
|
10649
|
-
),
|
|
10653
|
+
), Yt = () => {
|
|
10650
10654
|
const { setPayload: u, send: D } = du(), f = pu(), e = (t) => {
|
|
10651
10655
|
navigator.geolocation ? navigator.geolocation.getCurrentPosition(
|
|
10652
10656
|
(n) => {
|
|
@@ -10680,12 +10684,12 @@ const $t = /* @__PURE__ */ Ff(It), Lt = [
|
|
|
10680
10684
|
onClick: e,
|
|
10681
10685
|
type: "button",
|
|
10682
10686
|
className: "sc-user-input--location-icon-wrapper",
|
|
10683
|
-
children: /* @__PURE__ */ a.jsx(
|
|
10687
|
+
children: /* @__PURE__ */ a.jsx(Wt, {})
|
|
10684
10688
|
}
|
|
10685
10689
|
) });
|
|
10686
10690
|
};
|
|
10687
10691
|
var af = /* @__PURE__ */ ((u) => (u.web_url = "web_url", u.postback = "postback", u.nested = "nested", u))(af || {});
|
|
10688
|
-
const
|
|
10692
|
+
const Kt = ({ item: u, onPostback: D }) => {
|
|
10689
10693
|
const { colors: f } = iu(), e = () => {
|
|
10690
10694
|
switch (u.type) {
|
|
10691
10695
|
case "web_url":
|
|
@@ -10706,12 +10710,12 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10706
10710
|
children: /* @__PURE__ */ a.jsx("span", { className: "sc-menu-item-text", children: u.title })
|
|
10707
10711
|
}
|
|
10708
10712
|
) });
|
|
10709
|
-
},
|
|
10713
|
+
}, Jt = () => {
|
|
10710
10714
|
const u = pu(), { send: D, setPayload: f } = du(), [e, t] = U({
|
|
10711
10715
|
title: "Menu",
|
|
10712
10716
|
type: af.nested,
|
|
10713
10717
|
call_to_actions: (u == null ? void 0 : u.menu) || []
|
|
10714
|
-
}), n =
|
|
10718
|
+
}), n = gu(null);
|
|
10715
10719
|
Z(() => {
|
|
10716
10720
|
t({
|
|
10717
10721
|
title: "Menu",
|
|
@@ -10743,7 +10747,7 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10743
10747
|
ref: n,
|
|
10744
10748
|
className: "sc-menu-elements-carousel sc-menu-always-visible",
|
|
10745
10749
|
children: e.call_to_actions && /* @__PURE__ */ a.jsx(a.Fragment, { children: e.call_to_actions.map((F, d) => /* @__PURE__ */ a.jsx("div", { className: "sc-menu-carousel-card", children: /* @__PURE__ */ a.jsx(
|
|
10746
|
-
|
|
10750
|
+
Kt,
|
|
10747
10751
|
{
|
|
10748
10752
|
item: F,
|
|
10749
10753
|
parent: e,
|
|
@@ -10753,13 +10757,13 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10753
10757
|
) }, d)) })
|
|
10754
10758
|
}
|
|
10755
10759
|
) });
|
|
10756
|
-
},
|
|
10760
|
+
}, Gt = ({
|
|
10757
10761
|
viewBox: u = "0 0 48 48",
|
|
10758
10762
|
...D
|
|
10759
10763
|
}) => /* @__PURE__ */ a.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: u, ...D, children: [
|
|
10760
10764
|
/* @__PURE__ */ a.jsx("path", { d: "M4.02 42L46 24 4.02 6 4 20l30 4-30 4z" }),
|
|
10761
10765
|
/* @__PURE__ */ a.jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
|
|
10762
|
-
] }),
|
|
10766
|
+
] }), Xt = (u) => {
|
|
10763
10767
|
const { onClick: D, ...f } = u;
|
|
10764
10768
|
return /* @__PURE__ */ a.jsx(
|
|
10765
10769
|
"button",
|
|
@@ -10767,10 +10771,10 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10767
10771
|
onClick: D,
|
|
10768
10772
|
...f,
|
|
10769
10773
|
className: "sc-user-input--button-icon-wrapper",
|
|
10770
|
-
children: /* @__PURE__ */ a.jsx(
|
|
10774
|
+
children: /* @__PURE__ */ a.jsx(Gt, {})
|
|
10771
10775
|
}
|
|
10772
10776
|
);
|
|
10773
|
-
},
|
|
10777
|
+
}, Zt = () => {
|
|
10774
10778
|
const { setPayload: u, send: D, suggestions: f } = du(), e = pu(), { colors: t } = iu(), n = (r, s) => {
|
|
10775
10779
|
u(s), D({
|
|
10776
10780
|
event: r,
|
|
@@ -10798,7 +10802,7 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10798
10802
|
))
|
|
10799
10803
|
}
|
|
10800
10804
|
);
|
|
10801
|
-
},
|
|
10805
|
+
}, Qt = () => {
|
|
10802
10806
|
var J;
|
|
10803
10807
|
const { maxUploadSize: u } = Wu(), { t: D } = zu(), { colors: f } = iu(), {
|
|
10804
10808
|
suggestions: e,
|
|
@@ -10813,17 +10817,17 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10813
10817
|
messages: l
|
|
10814
10818
|
} = du(), {
|
|
10815
10819
|
menu: j,
|
|
10816
|
-
focusOnOpen:
|
|
10820
|
+
focusOnOpen: v,
|
|
10817
10821
|
autoFlush: C,
|
|
10818
|
-
allowedUploadTypes:
|
|
10822
|
+
allowedUploadTypes: y,
|
|
10819
10823
|
showEmoji: x,
|
|
10820
|
-
showLocation:
|
|
10824
|
+
showLocation: g,
|
|
10821
10825
|
showFile: T,
|
|
10822
10826
|
placeholder: _
|
|
10823
|
-
} = pu(), B =
|
|
10827
|
+
} = pu(), B = gu(null), [I, P] = U(null), [q, m] = U(!1), [O, L] = U(!1), [hu, fu] = U(!1);
|
|
10824
10828
|
Z(() => {
|
|
10825
|
-
|
|
10826
|
-
}, [t,
|
|
10829
|
+
v && p();
|
|
10830
|
+
}, [t, v]), Z(() => {
|
|
10827
10831
|
t === "" && B.current && (B.current.innerHTML = "", B.current.innerText = "");
|
|
10828
10832
|
}, [t]), Z(() => {
|
|
10829
10833
|
P(null);
|
|
@@ -10859,7 +10863,7 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10859
10863
|
}, 1)) : fu(!1);
|
|
10860
10864
|
}, 10)) : console.log("autoFlush is false, keeping message"), setTimeout(() => L(!1), 1e3);
|
|
10861
10865
|
}
|
|
10862
|
-
r && (P(null),
|
|
10866
|
+
r && (P(null), y.includes(r.type) || !1 ? r.size > u ? P(D("messages.file_message.unsupported_file_size")) : (F({
|
|
10863
10867
|
event: z,
|
|
10864
10868
|
source: Q,
|
|
10865
10869
|
data: {
|
|
@@ -10879,9 +10883,9 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10879
10883
|
(z = B.current) == null || z.focus();
|
|
10880
10884
|
}, R = d === iD.uploading, N = X.getItem("profileLiveChat") || {}, M = X.getItem("isOffline") || (N == null ? void 0 : N.isOffline), V = ((J = N == null ? void 0 : N.channel) == null ? void 0 : J.name) === "console-channel";
|
|
10881
10885
|
return (M || !(N != null && N.id)) && !V ? null : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
10882
|
-
j.length > 0 && /* @__PURE__ */ a.jsx(
|
|
10886
|
+
j.length > 0 && /* @__PURE__ */ a.jsx(Jt, {}),
|
|
10883
10887
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-user-input-wrapper", children: [
|
|
10884
|
-
e.length > 0 && /* @__PURE__ */ a.jsx(
|
|
10888
|
+
e.length > 0 && /* @__PURE__ */ a.jsx(Zt, {}),
|
|
10885
10889
|
(r || R) && /* @__PURE__ */ a.jsxs(
|
|
10886
10890
|
"div",
|
|
10887
10891
|
{
|
|
@@ -10920,8 +10924,8 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10920
10924
|
{
|
|
10921
10925
|
role: "textbox",
|
|
10922
10926
|
tabIndex: 0,
|
|
10923
|
-
onFocus: () =>
|
|
10924
|
-
onBlur: () =>
|
|
10927
|
+
onFocus: () => m(!0),
|
|
10928
|
+
onBlur: () => m(!1),
|
|
10925
10929
|
onKeyDown: A,
|
|
10926
10930
|
onInput: E,
|
|
10927
10931
|
onPaste: async (z) => {
|
|
@@ -10945,11 +10949,11 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10945
10949
|
}
|
|
10946
10950
|
),
|
|
10947
10951
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-user-input--buttons", children: [
|
|
10948
|
-
x && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(
|
|
10949
|
-
|
|
10950
|
-
T && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(
|
|
10952
|
+
x && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Ut, { inputRef: B, onInput: E }) }),
|
|
10953
|
+
g && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Yt, {}) }),
|
|
10954
|
+
T && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Ht, {}) }),
|
|
10951
10955
|
/* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(
|
|
10952
|
-
|
|
10956
|
+
Xt,
|
|
10953
10957
|
{
|
|
10954
10958
|
disabled: !t,
|
|
10955
10959
|
onClick: (z) => h(z)
|
|
@@ -10961,7 +10965,7 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10961
10965
|
)
|
|
10962
10966
|
] })
|
|
10963
10967
|
] });
|
|
10964
|
-
},
|
|
10968
|
+
}, u8 = ({
|
|
10965
10969
|
width: u = "24",
|
|
10966
10970
|
height: D = "24",
|
|
10967
10971
|
fill: f = "none",
|
|
@@ -10986,7 +10990,7 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
10986
10990
|
...F,
|
|
10987
10991
|
children: /* @__PURE__ */ a.jsx("path", { stroke: "#fff", strokeOpacity: "1", d: "M15 18L9 12 15 6" })
|
|
10988
10992
|
}
|
|
10989
|
-
),
|
|
10993
|
+
), D8 = () => {
|
|
10990
10994
|
const { t: u } = zu(), { colors: D } = iu(), { setWebviewUrl: f, webviewUrl: e } = du(), [t, n] = U(!1);
|
|
10991
10995
|
Z(() => {
|
|
10992
10996
|
n(!0);
|
|
@@ -11002,13 +11006,13 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
11002
11006
|
className: "sc-webview--footer",
|
|
11003
11007
|
style: { background: D.header.bg, color: D.header.text },
|
|
11004
11008
|
children: /* @__PURE__ */ a.jsxs("h3", { className: "sc-webview--button", onClick: r, children: [
|
|
11005
|
-
/* @__PURE__ */ a.jsx(
|
|
11009
|
+
/* @__PURE__ */ a.jsx(u8, { width: "16px", height: "16px" }),
|
|
11006
11010
|
u("settings.back")
|
|
11007
11011
|
] })
|
|
11008
11012
|
}
|
|
11009
11013
|
)
|
|
11010
11014
|
] });
|
|
11011
|
-
},
|
|
11015
|
+
}, f8 = ({
|
|
11012
11016
|
CustomHeader: u,
|
|
11013
11017
|
CustomAvatar: D,
|
|
11014
11018
|
PreChat: f,
|
|
@@ -11016,13 +11020,13 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
11016
11020
|
}) => {
|
|
11017
11021
|
const { connectionState: t } = du(), { screen: n, isOpen: r } = Nu();
|
|
11018
11022
|
return /* @__PURE__ */ a.jsxs("div", { className: `sc-chat-window ${r ? "opened" : "closed"}`, children: [
|
|
11019
|
-
/* @__PURE__ */ a.jsx(
|
|
11023
|
+
/* @__PURE__ */ a.jsx(Me, { children: u && /* @__PURE__ */ a.jsx(u, {}) }),
|
|
11020
11024
|
n === "prechat" && f && /* @__PURE__ */ a.jsx(f, {}),
|
|
11021
|
-
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(
|
|
11022
|
-
n !== "prechat" && n !== "postchat" && t !== 3 && /* @__PURE__ */ a.jsx(
|
|
11025
|
+
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(It, { Avatar: D }),
|
|
11026
|
+
n !== "prechat" && n !== "postchat" && t !== 3 && /* @__PURE__ */ a.jsx(Ue, {}),
|
|
11023
11027
|
n === "postchat" && e && /* @__PURE__ */ a.jsx(e, {}),
|
|
11024
|
-
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(
|
|
11025
|
-
n === "webview" && /* @__PURE__ */ a.jsx(
|
|
11028
|
+
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(Qt, {}),
|
|
11029
|
+
n === "webview" && /* @__PURE__ */ a.jsx(D8, {})
|
|
11026
11030
|
] });
|
|
11027
11031
|
}, W1 = ({
|
|
11028
11032
|
CustomLauncher: u,
|
|
@@ -11031,50 +11035,54 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
11031
11035
|
PreChat: e,
|
|
11032
11036
|
PostChat: t
|
|
11033
11037
|
}) => {
|
|
11034
|
-
zu()
|
|
11035
|
-
|
|
11036
|
-
|
|
11038
|
+
const { t: n } = zu(), r = Wu(), s = du(), F = Nu(), { setScreen: d } = Nu(), o = pu(), c = o.offline_mode, l = kD(c), j = (y) => {
|
|
11039
|
+
y.preventDefault(), F.setIsOpen(!F.isOpen);
|
|
11040
|
+
}, v = (y) => {
|
|
11041
|
+
y.preventDefault(), y.stopPropagation(), F.setIsOpen(!0);
|
|
11037
11042
|
};
|
|
11038
|
-
return
|
|
11043
|
+
return je(), new URLSearchParams().append("owner_id", r.ownerId), Z(() => {
|
|
11039
11044
|
if (!l && !X.getItem("profileLiveChat")) {
|
|
11040
11045
|
d("prechat");
|
|
11041
11046
|
return;
|
|
11042
11047
|
}
|
|
11043
11048
|
try {
|
|
11044
|
-
|
|
11045
|
-
} catch (
|
|
11046
|
-
console.error("Offline init failed",
|
|
11049
|
+
s.setConnectionState(2), l && (d("chat"), s.setConnectionState(3));
|
|
11050
|
+
} catch (y) {
|
|
11051
|
+
console.error("Offline init failed", y), d("prechat");
|
|
11047
11052
|
}
|
|
11048
11053
|
}, []), /* @__PURE__ */ a.jsxs("div", { children: [
|
|
11049
|
-
/* @__PURE__ */ a.
|
|
11054
|
+
/* @__PURE__ */ a.jsxs(
|
|
11050
11055
|
"div",
|
|
11051
11056
|
{
|
|
11052
|
-
className: `sc-launcher-wrapper ${
|
|
11057
|
+
className: `sc-launcher-wrapper ${F.isOpen ? "opened" : ""}`,
|
|
11053
11058
|
onClick: j,
|
|
11054
|
-
children:
|
|
11055
|
-
"div",
|
|
11056
|
-
{
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11059
|
+
children: [
|
|
11060
|
+
/* @__PURE__ */ a.jsx("div", { className: "sc-help-prompt", onClick: v, role: "button", children: !F.isOpen && /* @__PURE__ */ a.jsx("div", { className: "sc-help-prompt__text", children: n("launcher.help_prompt") }) }),
|
|
11061
|
+
u ? /* @__PURE__ */ a.jsx(u, { widget: F }) : /* @__PURE__ */ a.jsxs(
|
|
11062
|
+
"div",
|
|
11063
|
+
{
|
|
11064
|
+
className: "sc-launcher",
|
|
11065
|
+
style: {
|
|
11066
|
+
backgroundColor: o.color
|
|
11067
|
+
},
|
|
11068
|
+
children: [
|
|
11069
|
+
s.newMessagesCount > 0 && !F.isOpen && /* @__PURE__ */ a.jsx("div", { className: "sc-new-messages-count", children: s.newMessagesCount }),
|
|
11070
|
+
F.isOpen ? /* @__PURE__ */ a.jsx(
|
|
11071
|
+
hf,
|
|
11072
|
+
{
|
|
11073
|
+
className: "sc-closed-icon",
|
|
11074
|
+
width: "32px",
|
|
11075
|
+
height: "32px"
|
|
11076
|
+
}
|
|
11077
|
+
) : /* @__PURE__ */ a.jsx(k1, { className: "sc-open-icon" })
|
|
11078
|
+
]
|
|
11079
|
+
}
|
|
11080
|
+
)
|
|
11081
|
+
]
|
|
11074
11082
|
}
|
|
11075
11083
|
),
|
|
11076
|
-
|
|
11077
|
-
|
|
11084
|
+
F.isOpen && /* @__PURE__ */ a.jsx(
|
|
11085
|
+
f8,
|
|
11078
11086
|
{
|
|
11079
11087
|
CustomHeader: D,
|
|
11080
11088
|
CustomAvatar: f,
|
|
@@ -11086,18 +11094,18 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
11086
11094
|
}, Y1 = ({
|
|
11087
11095
|
onFormDataSubmit: u
|
|
11088
11096
|
}) => {
|
|
11089
|
-
const D = Wu(), { t: f } = zu(), { colors: e } = iu(), { socket: t } =
|
|
11097
|
+
const D = Wu(), { t: f } = zu(), { colors: e } = iu(), { socket: t } = tD(), n = pu(), { setScreen: r } = Nu(), {
|
|
11090
11098
|
send: s,
|
|
11091
11099
|
setMessages: F,
|
|
11092
11100
|
setConnectionState: d,
|
|
11093
11101
|
participants: o,
|
|
11094
11102
|
setParticipants: c
|
|
11095
|
-
} = du(), { formData: l, setFormData: j, renderFormField:
|
|
11103
|
+
} = du(), { formData: l, setFormData: j, renderFormField: v, errors: C, validateAll: y } = V1({
|
|
11096
11104
|
loadFromDataUserSubs: !1,
|
|
11097
11105
|
initialData: {}
|
|
11098
|
-
}), x = n.offline_mode,
|
|
11106
|
+
}), x = n.offline_mode, g = kD(x), T = gu(!1), _ = Mu(
|
|
11099
11107
|
async (B) => {
|
|
11100
|
-
if (B == null || B.preventDefault(), B == null || B.stopPropagation(), !(!X.getItem("profileLiveChat") && !
|
|
11108
|
+
if (B == null || B.preventDefault(), B == null || B.stopPropagation(), !(!X.getItem("profileLiveChat") && !y(n.formSettings))) {
|
|
11101
11109
|
Object.keys(l).length > 0 && X.setItem("dataUserSubs", l);
|
|
11102
11110
|
try {
|
|
11103
11111
|
d(2);
|
|
@@ -11105,14 +11113,14 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
11105
11113
|
Object.entries(l).forEach(([fu, k]) => {
|
|
11106
11114
|
typeof k == "string" && k.trim() && P.append(fu, k);
|
|
11107
11115
|
}), P.append("contactLateTime", (/* @__PURE__ */ new Date()).toISOString()), P.append("owner_id", D.ownerId);
|
|
11108
|
-
const { body: q } = await t.get(`/webhook/${D.channel}/?${P.toString()}`), { messages:
|
|
11109
|
-
X.setItem("profileLiveChat", O), X.setItem("isOffline",
|
|
11116
|
+
const { body: q } = await t.get(`/webhook/${D.channel}/?${P.toString()}`), { messages: m, profile: O } = q;
|
|
11117
|
+
X.setItem("profileLiveChat", O), X.setItem("isOffline", g || !1), X.setItem(
|
|
11110
11118
|
"submitedFormLateTime",
|
|
11111
11119
|
(O == null ? void 0 : O.submitedFormLateTime) || null
|
|
11112
|
-
),
|
|
11120
|
+
), m.forEach((fu) => {
|
|
11113
11121
|
const k = fu.author === O.foreignId || fu.author === O.id ? uu.sent : uu.received;
|
|
11114
11122
|
fu.direction = k, fu.direction === uu.sent && (fu.read = !0, fu.delivery = !1);
|
|
11115
|
-
}), F(
|
|
11123
|
+
}), F(m), c([
|
|
11116
11124
|
o[0],
|
|
11117
11125
|
{
|
|
11118
11126
|
id: O.foreignId,
|
|
@@ -11166,15 +11174,15 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
11166
11174
|
const B = X.getItem("profileLiveChat");
|
|
11167
11175
|
if (B) {
|
|
11168
11176
|
const I = B, P = {};
|
|
11169
|
-
Object.entries(I).forEach(([q,
|
|
11170
|
-
|
|
11177
|
+
Object.entries(I).forEach(([q, m]) => {
|
|
11178
|
+
m && (P[q] = m);
|
|
11171
11179
|
}), j(P), _();
|
|
11172
11180
|
}
|
|
11173
11181
|
}
|
|
11174
|
-
}, [_, r,
|
|
11182
|
+
}, [_, r, g]), /* @__PURE__ */ a.jsx("div", { className: "user-subscription-wrapper", children: /* @__PURE__ */ a.jsxs("form", { className: "user-subscription", onSubmit: _, noValidate: !0, children: [
|
|
11175
11183
|
/* @__PURE__ */ a.jsx("div", { className: "user-subscription-title", children: n == null ? void 0 : n.greetingMessage }),
|
|
11176
11184
|
/* @__PURE__ */ a.jsxs("div", { className: "user-subscription-form", children: [
|
|
11177
|
-
/* @__PURE__ */ a.jsx("div", { className: "user-subscription-inputs", children: n.formSettings.sort((B, I) => B.order - I.order).map(
|
|
11185
|
+
/* @__PURE__ */ a.jsx("div", { className: "user-subscription-inputs", children: n.formSettings.sort((B, I) => B.order - I.order).map(v) }),
|
|
11178
11186
|
/* @__PURE__ */ a.jsx("div", { className: "sc-message--contact-form-authorization", children: /* @__PURE__ */ a.jsx(
|
|
11179
11187
|
"a",
|
|
11180
11188
|
{
|
|
@@ -11200,7 +11208,7 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
11200
11208
|
) })
|
|
11201
11209
|
] })
|
|
11202
11210
|
] }) });
|
|
11203
|
-
},
|
|
11211
|
+
}, e8 = qu({}), t8 = ({
|
|
11204
11212
|
children: u
|
|
11205
11213
|
}) => {
|
|
11206
11214
|
const D = Wu(), [f, e] = U(!1), t = async () => {
|
|
@@ -11214,20 +11222,20 @@ const Yt = ({ item: u, onPostback: D }) => {
|
|
|
11214
11222
|
};
|
|
11215
11223
|
return Z(() => {
|
|
11216
11224
|
f || t();
|
|
11217
|
-
}, []), f ? /* @__PURE__ */ a.jsx(
|
|
11225
|
+
}, []), f ? /* @__PURE__ */ a.jsx(e8.Provider, { value: {}, children: u }) : null;
|
|
11218
11226
|
};
|
|
11219
|
-
function
|
|
11220
|
-
return /* @__PURE__ */ a.jsx(e1, { ...u, children: /* @__PURE__ */ a.jsx(n1, { children: /* @__PURE__ */ a.jsx(
|
|
11227
|
+
function s8(u) {
|
|
11228
|
+
return /* @__PURE__ */ a.jsx(e1, { ...u, children: /* @__PURE__ */ a.jsx(n1, { children: /* @__PURE__ */ a.jsx(t8, { children: /* @__PURE__ */ a.jsx(B1, { children: /* @__PURE__ */ a.jsx(g1, { children: /* @__PURE__ */ a.jsx(x1, { children: /* @__PURE__ */ a.jsx(y1, { children: /* @__PURE__ */ a.jsx(Qf, { channelName: "main-channel", children: /* @__PURE__ */ a.jsx(w1, { children: /* @__PURE__ */ a.jsx(W1, { PreChat: Y1 }) }) }) }) }) }) }) }) }) });
|
|
11221
11229
|
}
|
|
11222
|
-
function
|
|
11230
|
+
function F8({
|
|
11223
11231
|
CustomHeader: u,
|
|
11224
11232
|
CustomAvatar: D,
|
|
11225
11233
|
config: f
|
|
11226
11234
|
}) {
|
|
11227
|
-
return /* @__PURE__ */ a.jsx(e1, { ...f, children: /* @__PURE__ */ a.jsx(n1, { children: /* @__PURE__ */ a.jsx(B1, { children: /* @__PURE__ */ a.jsx(
|
|
11235
|
+
return /* @__PURE__ */ a.jsx(e1, { ...f, children: /* @__PURE__ */ a.jsx(n1, { children: /* @__PURE__ */ a.jsx(B1, { children: /* @__PURE__ */ a.jsx(g1, { children: /* @__PURE__ */ a.jsx(x1, { children: /* @__PURE__ */ a.jsx(Qf, { channelName: "main-channel", children: /* @__PURE__ */ a.jsx(y1, { defaultScreen: "chat", children: /* @__PURE__ */ a.jsx(
|
|
11228
11236
|
w1,
|
|
11229
11237
|
{
|
|
11230
|
-
defaultConnectionState:
|
|
11238
|
+
defaultConnectionState: eD.connected,
|
|
11231
11239
|
children: /* @__PURE__ */ a.jsx(
|
|
11232
11240
|
W1,
|
|
11233
11241
|
{
|
|
@@ -11240,7 +11248,7 @@ function s8({
|
|
|
11240
11248
|
) }) }) }) }) }) }) });
|
|
11241
11249
|
}
|
|
11242
11250
|
export {
|
|
11243
|
-
|
|
11251
|
+
s8 as ChatWidget,
|
|
11244
11252
|
X as LocalStorageScoped,
|
|
11245
|
-
|
|
11253
|
+
F8 as UiChatWidget
|
|
11246
11254
|
};
|