@inploi/plugin-chatbot 7.0.2 → 7.0.3
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/cdn/index.js +3 -3
- package/dist/{chatbot-body-0fa03ac8.cjs → chatbot-body-23ad6c41.cjs} +1 -1
- package/dist/{chatbot-body-735ba67a.js → chatbot-body-b0e15a28.js} +151 -146
- package/dist/chatbot.api.d.ts +3 -3
- package/dist/chatbot.utils.d.ts +1 -1
- package/dist/components/chat-input/chat-input.text.d.ts +1 -1
- package/dist/i18n.d.ts +6 -0
- package/dist/index-5220abff.cjs +5 -0
- package/dist/{index-803e84b9.js → index-94ac185f.js} +71 -70
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/dist/rpc.d.ts +2 -2
- package/package.json +2 -2
- package/dist/index-4cbee407.cjs +0 -5
|
@@ -42,12 +42,12 @@ function Ir(t) {
|
|
|
42
42
|
var e = typeof t;
|
|
43
43
|
return t != null && (e == "object" || e == "function");
|
|
44
44
|
}
|
|
45
|
-
var Wi = Ir, zr = Ki, Dr = Wi, Nr = "[object AsyncFunction]",
|
|
45
|
+
var Wi = Ir, zr = Ki, Dr = Wi, Nr = "[object AsyncFunction]", Mr = "[object Function]", Ar = "[object GeneratorFunction]", Fr = "[object Proxy]";
|
|
46
46
|
function Hr(t) {
|
|
47
47
|
if (!Dr(t))
|
|
48
48
|
return !1;
|
|
49
49
|
var e = zr(t);
|
|
50
|
-
return e ==
|
|
50
|
+
return e == Mr || e == Ar || e == Nr || e == Fr;
|
|
51
51
|
}
|
|
52
52
|
var Lr = Hr, Br = je, Ur = Br["__core-js_shared__"], Rr = Ur, Zt = Rr, ti = function() {
|
|
53
53
|
var t = /[^.]+$/.exec(Zt && Zt.keys && Zt.keys.IE_PROTO || "");
|
|
@@ -116,7 +116,7 @@ function Do(t, e) {
|
|
|
116
116
|
var i = this.__data__;
|
|
117
117
|
return this.size += this.has(t) ? 0 : 1, i[t] = Io && e === void 0 ? zo : e, this;
|
|
118
118
|
}
|
|
119
|
-
var No = Do,
|
|
119
|
+
var No = Do, Mo = bo, Ao = mo, Fo = Co, Ho = jo, Lo = No;
|
|
120
120
|
function ut(t) {
|
|
121
121
|
var e = -1, i = t == null ? 0 : t.length;
|
|
122
122
|
for (this.clear(); ++e < i; ) {
|
|
@@ -124,8 +124,8 @@ function ut(t) {
|
|
|
124
124
|
this.set(a[0], a[1]);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
ut.prototype.clear =
|
|
128
|
-
ut.prototype.delete =
|
|
127
|
+
ut.prototype.clear = Mo;
|
|
128
|
+
ut.prototype.delete = Ao;
|
|
129
129
|
ut.prototype.get = Fo;
|
|
130
130
|
ut.prototype.has = Ho;
|
|
131
131
|
ut.prototype.set = Lo;
|
|
@@ -210,12 +210,12 @@ var In = jn, zn = Yt;
|
|
|
210
210
|
function Dn(t) {
|
|
211
211
|
return zn(this, t).has(t);
|
|
212
212
|
}
|
|
213
|
-
var Nn = Dn,
|
|
214
|
-
function
|
|
215
|
-
var i =
|
|
213
|
+
var Nn = Dn, Mn = Yt;
|
|
214
|
+
function An(t, e) {
|
|
215
|
+
var i = Mn(this, t), a = i.size;
|
|
216
216
|
return i.set(t, e), this.size += i.size == a ? 0 : 1, this;
|
|
217
217
|
}
|
|
218
|
-
var Fn =
|
|
218
|
+
var Fn = An, Hn = xn, Ln = Pn, Bn = In, Un = Nn, Rn = Fn;
|
|
219
219
|
function pt(t) {
|
|
220
220
|
var e = -1, i = t == null ? 0 : t.length;
|
|
221
221
|
for (this.clear(); ++e < i; ) {
|
|
@@ -310,7 +310,7 @@ function ea(t) {
|
|
|
310
310
|
var e = t.parentNode;
|
|
311
311
|
e && e.removeChild(t);
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function M(t, e, i) {
|
|
314
314
|
var a, r, o, n = {};
|
|
315
315
|
for (o in e)
|
|
316
316
|
o == "key" ? a = e[o] : o == "ref" ? r = e[o] : n[o] = e[o];
|
|
@@ -361,9 +361,9 @@ function Ht() {
|
|
|
361
361
|
Ht.__r = 0;
|
|
362
362
|
}
|
|
363
363
|
function aa(t, e, i, a, r, o, n, s, l, d, u) {
|
|
364
|
-
var c, h, v, f, g, I, _, k,
|
|
364
|
+
var c, h, v, f, g, I, _, k, A, F, D = 0, N = a && a.__k || ta, et = N.length, it = et, P = e.length;
|
|
365
365
|
for (i.__k = [], c = 0; c < P; c++)
|
|
366
|
-
(f = i.__k[c] = (f = e[c]) == null || typeof f == "boolean" || typeof f == "function" ? null : typeof f == "string" || typeof f == "number" || typeof f == "bigint" ? xt(null, f, null, null, f) : qt(f) ? xt(U, { children: f }, null, null, null) : f.__b > 0 ? xt(f.type, f.props, f.key, f.ref ? f.ref : null, f.__v) : f) != null && (f.__ = i, f.__b = i.__b + 1, (k = Is(f, N, _ = c + D, it)) === -1 ? v = st : (v = N[k] || st, N[k] = void 0, it--), Ne(t, f, v, r, o, n, s, l, d, u), g = f.__e, (h = f.ref) && v.ref != h && (v.ref &&
|
|
366
|
+
(f = i.__k[c] = (f = e[c]) == null || typeof f == "boolean" || typeof f == "function" ? null : typeof f == "string" || typeof f == "number" || typeof f == "bigint" ? xt(null, f, null, null, f) : qt(f) ? xt(U, { children: f }, null, null, null) : f.__b > 0 ? xt(f.type, f.props, f.key, f.ref ? f.ref : null, f.__v) : f) != null && (f.__ = i, f.__b = i.__b + 1, (k = Is(f, N, _ = c + D, it)) === -1 ? v = st : (v = N[k] || st, N[k] = void 0, it--), Ne(t, f, v, r, o, n, s, l, d, u), g = f.__e, (h = f.ref) && v.ref != h && (v.ref && Me(v.ref, null, f), u.push(h, f.__c || g, f)), g != null && (I == null && (I = g), F = !(A = v === st || v.__v === null) && k === _, A ? k == -1 && D-- : k !== _ && (k === _ + 1 ? (D++, F = !0) : k > _ ? it > P - _ ? (D += k - _, F = !0) : D-- : D = k < _ && k == _ - 1 ? k - _ : 0), _ = c + D, F = F || k == c && !A, typeof f.type != "function" || k === _ && v.__k !== f.__k ? typeof f.type == "function" || F ? f.__d !== void 0 ? (l = f.__d, f.__d = void 0) : l = g.nextSibling : l = oa(t, g, l) : l = ra(f, l, t), typeof i.type == "function" && (i.__d = l)));
|
|
367
367
|
for (i.__e = I, c = et; c--; )
|
|
368
368
|
N[c] != null && (typeof i.type == "function" && N[c].__e != null && N[c].__e == i.__d && (i.__d = N[c].__e.nextSibling), sa(N[c], N[c]));
|
|
369
369
|
}
|
|
@@ -444,17 +444,17 @@ function li(t) {
|
|
|
444
444
|
return this.l[t.type + !0](w.event ? w.event(t) : t);
|
|
445
445
|
}
|
|
446
446
|
function Ne(t, e, i, a, r, o, n, s, l, d) {
|
|
447
|
-
var u, c, h, v, f, g, I, _, k,
|
|
447
|
+
var u, c, h, v, f, g, I, _, k, A, F, D, N, et, it, P = e.type;
|
|
448
448
|
if (e.constructor !== void 0)
|
|
449
449
|
return null;
|
|
450
450
|
i.__h != null && (l = i.__h, s = e.__e = i.__e, e.__h = null, o = [s]), (u = w.__b) && u(e);
|
|
451
451
|
try {
|
|
452
452
|
t:
|
|
453
453
|
if (typeof P == "function") {
|
|
454
|
-
if (_ = e.props, k = (u = P.contextType) && a[u.__c],
|
|
454
|
+
if (_ = e.props, k = (u = P.contextType) && a[u.__c], A = u ? k ? k.props.value : u.__ : a, i.__c ? I = (c = e.__c = i.__c).__ = c.__E : ("prototype" in P && P.prototype.render ? e.__c = c = new P(_, A) : (e.__c = c = new H(_, A), c.constructor = P, c.render = Ns), k && k.sub(c), c.props = _, c.state || (c.state = {}), c.context = A, c.__n = a, h = c.__d = !0, c.__h = [], c._sb = []), c.__s == null && (c.__s = c.state), P.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = V({}, c.__s)), V(c.__s, P.getDerivedStateFromProps(_, c.__s))), v = c.props, f = c.state, c.__v = e, h)
|
|
455
455
|
P.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), c.componentDidMount != null && c.__h.push(c.componentDidMount);
|
|
456
456
|
else {
|
|
457
|
-
if (P.getDerivedStateFromProps == null && _ !== v && c.componentWillReceiveProps != null && c.componentWillReceiveProps(_,
|
|
457
|
+
if (P.getDerivedStateFromProps == null && _ !== v && c.componentWillReceiveProps != null && c.componentWillReceiveProps(_, A), !c.__e && (c.shouldComponentUpdate != null && c.shouldComponentUpdate(_, c.__s, A) === !1 || e.__v === i.__v)) {
|
|
458
458
|
for (e.__v !== i.__v && (c.props = _, c.state = c.__s, c.__d = !1), e.__e = i.__e, e.__k = i.__k, e.__k.forEach(function(jt) {
|
|
459
459
|
jt && (jt.__ = e);
|
|
460
460
|
}), F = 0; F < c._sb.length; F++)
|
|
@@ -462,11 +462,11 @@ function Ne(t, e, i, a, r, o, n, s, l, d) {
|
|
|
462
462
|
c._sb = [], c.__h.length && n.push(c);
|
|
463
463
|
break t;
|
|
464
464
|
}
|
|
465
|
-
c.componentWillUpdate != null && c.componentWillUpdate(_, c.__s,
|
|
465
|
+
c.componentWillUpdate != null && c.componentWillUpdate(_, c.__s, A), c.componentDidUpdate != null && c.__h.push(function() {
|
|
466
466
|
c.componentDidUpdate(v, f, g);
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
|
-
if (c.context =
|
|
469
|
+
if (c.context = A, c.props = _, c.__P = t, c.__e = !1, D = w.__r, N = 0, "prototype" in P && P.prototype.render) {
|
|
470
470
|
for (c.state = c.__s, c.__d = !1, D && D(e), u = c.render(c.props, c.state, c.context), et = 0; et < c._sb.length; et++)
|
|
471
471
|
c.__h.push(c._sb[et]);
|
|
472
472
|
c._sb = [];
|
|
@@ -484,7 +484,7 @@ function Ne(t, e, i, a, r, o, n, s, l, d) {
|
|
|
484
484
|
}
|
|
485
485
|
function na(t, e, i) {
|
|
486
486
|
for (var a = 0; a < i.length; a++)
|
|
487
|
-
|
|
487
|
+
Me(i[a], i[++a], i[++a]);
|
|
488
488
|
w.__c && w.__c(e, t), t.some(function(r) {
|
|
489
489
|
try {
|
|
490
490
|
t = r.__h, r.__h = [], t.some(function(o) {
|
|
@@ -527,7 +527,7 @@ function Ds(t, e, i, a, r, o, n, s, l) {
|
|
|
527
527
|
}
|
|
528
528
|
return t;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function Me(t, e, i) {
|
|
531
531
|
try {
|
|
532
532
|
typeof t == "function" ? t(e) : t.current = e;
|
|
533
533
|
} catch (a) {
|
|
@@ -536,7 +536,7 @@ function Ae(t, e, i) {
|
|
|
536
536
|
}
|
|
537
537
|
function sa(t, e, i) {
|
|
538
538
|
var a, r;
|
|
539
|
-
if (w.unmount && w.unmount(t), (a = t.ref) && (a.current && a.current !== t.__e ||
|
|
539
|
+
if (w.unmount && w.unmount(t), (a = t.ref) && (a.current && a.current !== t.__e || Me(a, null, e)), (a = t.__c) != null) {
|
|
540
540
|
if (a.componentWillUnmount)
|
|
541
541
|
try {
|
|
542
542
|
a.componentWillUnmount();
|
|
@@ -555,12 +555,12 @@ function Ns(t, e, i) {
|
|
|
555
555
|
}
|
|
556
556
|
function lt(t, e, i) {
|
|
557
557
|
var a, r, o, n;
|
|
558
|
-
w.__ && w.__(t, e), r = (a = typeof i == "function") ? null : i && i.__k || e.__k, o = [], n = [], Ne(e, t = (!a && i || e).__k =
|
|
558
|
+
w.__ && w.__(t, e), r = (a = typeof i == "function") ? null : i && i.__k || e.__k, o = [], n = [], Ne(e, t = (!a && i || e).__k = M(U, null, [t]), r || st, st, e.ownerSVGElement !== void 0, !a && i ? [i] : r ? null : e.firstChild ? Ot.call(e.childNodes) : null, o, !a && i ? i : r ? r.__e : e.firstChild, a, n), na(o, t, n);
|
|
559
559
|
}
|
|
560
560
|
function ca(t, e) {
|
|
561
561
|
lt(t, e, ca);
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function Ms(t, e, i) {
|
|
564
564
|
var a, r, o, n, s = V({}, t.props);
|
|
565
565
|
for (o in t.type && t.type.defaultProps && (n = t.type.defaultProps), e)
|
|
566
566
|
o == "key" ? a = e[o] : o == "ref" ? r = e[o] : s[o] = e[o] === void 0 && n !== void 0 ? n[o] : e[o];
|
|
@@ -621,12 +621,12 @@ function da(t) {
|
|
|
621
621
|
t[i] && (a && (a += " "), a += i);
|
|
622
622
|
return a;
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function Ae() {
|
|
625
625
|
for (var t, e, i = 0, a = "", r = arguments.length; i < r; i++)
|
|
626
626
|
(t = arguments[i]) && (e = da(t)) && (a && (a += " "), a += e);
|
|
627
627
|
return a;
|
|
628
628
|
}
|
|
629
|
-
const di = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, ui =
|
|
629
|
+
const di = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, ui = Ae, Fe = (t, e) => (i) => {
|
|
630
630
|
var a;
|
|
631
631
|
if ((e == null ? void 0 : e.variants) == null)
|
|
632
632
|
return ui(t, i == null ? void 0 : i.class, i == null ? void 0 : i.className);
|
|
@@ -716,7 +716,7 @@ function He(t) {
|
|
|
716
716
|
return { current: t };
|
|
717
717
|
}, []);
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function As(t, e, i) {
|
|
720
720
|
dt = 6, Pt(function() {
|
|
721
721
|
return typeof t == "function" ? (t(e()), function() {
|
|
722
722
|
return t(null);
|
|
@@ -846,7 +846,7 @@ function Rs(t, e) {
|
|
|
846
846
|
return !n && o && (o.call ? o(null) : o.current = null), e ? !e(this.props, r) || !n : fe(this.props, r);
|
|
847
847
|
}
|
|
848
848
|
function a(r) {
|
|
849
|
-
return this.shouldComponentUpdate = i,
|
|
849
|
+
return this.shouldComponentUpdate = i, M(t, r);
|
|
850
850
|
}
|
|
851
851
|
return a.displayName = "Memo(" + (t.displayName || t.name) + ")", a.prototype.isReactComponent = !0, a.__f = !0, a;
|
|
852
852
|
}
|
|
@@ -914,7 +914,7 @@ function ya(t) {
|
|
|
914
914
|
throw a;
|
|
915
915
|
if (!i)
|
|
916
916
|
throw e;
|
|
917
|
-
return
|
|
917
|
+
return M(i, o);
|
|
918
918
|
}
|
|
919
919
|
return r.displayName = "Lazy", r.__f = !0, r;
|
|
920
920
|
}
|
|
@@ -953,8 +953,8 @@ w.unmount = function(t) {
|
|
|
953
953
|
}
|
|
954
954
|
this.__b = null;
|
|
955
955
|
}
|
|
956
|
-
var r = e.__a &&
|
|
957
|
-
return r && (r.__h = null), [
|
|
956
|
+
var r = e.__a && M(U, null, t.fallback);
|
|
957
|
+
return r && (r.__h = null), [M(U, null, e.__a ? null : t.children), r];
|
|
958
958
|
};
|
|
959
959
|
var xi = function(t, e, i) {
|
|
960
960
|
if (++i[1] === i[0] && t.o.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.o.size))
|
|
@@ -981,10 +981,10 @@ function qs(t) {
|
|
|
981
981
|
this.childNodes.push(a), e.i.appendChild(a);
|
|
982
982
|
}, removeChild: function(a) {
|
|
983
983
|
this.childNodes.splice(this.childNodes.indexOf(a) >>> 1, 1), e.i.removeChild(a);
|
|
984
|
-
} }), lt(
|
|
984
|
+
} }), lt(M(Ys, { context: e.context }, t.__v), e.l)) : e.l && e.componentWillUnmount();
|
|
985
985
|
}
|
|
986
986
|
function Js(t, e) {
|
|
987
|
-
var i =
|
|
987
|
+
var i = M(qs, { __v: t, i: e });
|
|
988
988
|
return i.containerInfo = e, i;
|
|
989
989
|
}
|
|
990
990
|
(mt.prototype = new H()).__a = function(t) {
|
|
@@ -1070,13 +1070,13 @@ var cc = { ReactCurrentDispatcher: { current: { readContext: function(t) {
|
|
|
1070
1070
|
return Be.__n[t.__c].props.value;
|
|
1071
1071
|
} } } };
|
|
1072
1072
|
function lc(t) {
|
|
1073
|
-
return
|
|
1073
|
+
return M.bind(null, t);
|
|
1074
1074
|
}
|
|
1075
1075
|
function ka(t) {
|
|
1076
1076
|
return !!t && t.$$typeof === xa;
|
|
1077
1077
|
}
|
|
1078
1078
|
function dc(t) {
|
|
1079
|
-
return ka(t) ?
|
|
1079
|
+
return ka(t) ? Ms.apply(null, arguments) : t;
|
|
1080
1080
|
}
|
|
1081
1081
|
function uc(t) {
|
|
1082
1082
|
return !!t.__k && (lt(null, t), !0);
|
|
@@ -1109,9 +1109,9 @@ function _c(t, e) {
|
|
|
1109
1109
|
});
|
|
1110
1110
|
}, [t]), i;
|
|
1111
1111
|
}
|
|
1112
|
-
var Jl = { useState: ha, useId: Ls, useReducer: pa, useEffect: fa, useLayoutEffect: Pt, useInsertionEffect: bc, useTransition: gc, useDeferredValue: vc, useSyncExternalStore: _c, startTransition: $a, useRef: He, useImperativeHandle:
|
|
1113
|
-
const j = Symbol.for("@ts-pattern/matcher"), Sa = Symbol.for("@ts-pattern/isVariadic"), Bt = "@ts-pattern/anonymous-select-key", ve = (t) => !!(t && typeof t == "object"),
|
|
1114
|
-
if (
|
|
1112
|
+
var Jl = { useState: ha, useId: Ls, useReducer: pa, useEffect: fa, useLayoutEffect: Pt, useInsertionEffect: bc, useTransition: gc, useDeferredValue: vc, useSyncExternalStore: _c, startTransition: $a, useRef: He, useImperativeHandle: As, useMemo: wt, useCallback: Fs, useContext: wa, useDebugValue: Hs, version: "17.0.2", Children: Ws, render: ic, hydrate: ac, unmountComponentAtNode: uc, createPortal: Js, createElement: M, createContext: la, createFactory: lc, cloneElement: dc, createRef: js, Fragment: U, isValidElement: ka, findDOMNode: hc, Component: H, PureComponent: we, memo: Rs, forwardRef: Ks, flushSync: fc, unstable_batchedUpdates: pc, StrictMode: wc, Suspense: kt, SuspenseList: mt, lazy: ya, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: cc };
|
|
1113
|
+
const j = Symbol.for("@ts-pattern/matcher"), Sa = Symbol.for("@ts-pattern/isVariadic"), Bt = "@ts-pattern/anonymous-select-key", ve = (t) => !!(t && typeof t == "object"), Mt = (t) => t && !!t[j], $ = (t, e, i) => {
|
|
1114
|
+
if (Mt(t)) {
|
|
1115
1115
|
const a = t[j](), { matched: r, selections: o } = a.match(e);
|
|
1116
1116
|
return r && o && Object.keys(o).forEach((n) => i(n, o[n])), r;
|
|
1117
1117
|
}
|
|
@@ -1124,7 +1124,7 @@ const j = Symbol.for("@ts-pattern/matcher"), Sa = Symbol.for("@ts-pattern/isVari
|
|
|
1124
1124
|
let a = [], r = [], o = [];
|
|
1125
1125
|
for (const n of t.keys()) {
|
|
1126
1126
|
const s = t[n];
|
|
1127
|
-
|
|
1127
|
+
Mt(s) && s[Sa] ? o.push(s) : o.length ? r.push(s) : a.push(s);
|
|
1128
1128
|
}
|
|
1129
1129
|
if (o.length) {
|
|
1130
1130
|
if (o.length > 1)
|
|
@@ -1138,14 +1138,14 @@ const j = Symbol.for("@ts-pattern/matcher"), Sa = Symbol.for("@ts-pattern/isVari
|
|
|
1138
1138
|
}
|
|
1139
1139
|
return Reflect.ownKeys(t).every((a) => {
|
|
1140
1140
|
const r = t[a];
|
|
1141
|
-
return (a in e ||
|
|
1141
|
+
return (a in e || Mt(o = r) && o[j]().matcherType === "optional") && $(r, e[a], i);
|
|
1142
1142
|
var o;
|
|
1143
1143
|
});
|
|
1144
1144
|
}
|
|
1145
1145
|
return Object.is(e, t);
|
|
1146
1146
|
}, T = (t) => {
|
|
1147
1147
|
var e, i, a;
|
|
1148
|
-
return ve(t) ?
|
|
1148
|
+
return ve(t) ? Mt(t) ? (e = (i = (a = t[j]()).getSelectionKeys) == null ? void 0 : i.call(a)) != null ? e : [] : Array.isArray(t) ? St(t, T) : St(Object.values(t), T) : [];
|
|
1149
1149
|
}, St = (t, e) => t.reduce((i, a) => i.concat(e(a)), []);
|
|
1150
1150
|
function mc(...t) {
|
|
1151
1151
|
if (t.length === 1) {
|
|
@@ -1441,7 +1441,7 @@ function p(t, e, i, a, r, o) {
|
|
|
1441
1441
|
l[s] === void 0 && (l[s] = n[s]);
|
|
1442
1442
|
return w.vnode && w.vnode(d), d;
|
|
1443
1443
|
}
|
|
1444
|
-
var Pi = la(null),
|
|
1444
|
+
var Pi = la(null), Mc = (t) => ({
|
|
1445
1445
|
defaultTerms: t,
|
|
1446
1446
|
TranslationProvider: ({ terms: e, children: i, locale: a }) => {
|
|
1447
1447
|
const r = wt(() => Oi({ locale: a, terms: t, overrides: e }), [e, a]);
|
|
@@ -1459,10 +1459,10 @@ var Pi = la(null), Ac = (t) => ({
|
|
|
1459
1459
|
}) => Oi({ terms: t, overrides: e, locale: i })
|
|
1460
1460
|
});
|
|
1461
1461
|
const {
|
|
1462
|
-
TranslationProvider:
|
|
1462
|
+
TranslationProvider: Ac,
|
|
1463
1463
|
useTranslation: Ve,
|
|
1464
1464
|
createTFunction: Fc
|
|
1465
|
-
} =
|
|
1465
|
+
} = Mc({
|
|
1466
1466
|
error_heading: "Something unexpected happened",
|
|
1467
1467
|
undo: "Undo",
|
|
1468
1468
|
send: "Send",
|
|
@@ -1513,6 +1513,7 @@ const {
|
|
|
1513
1513
|
one: "Please only upload one file",
|
|
1514
1514
|
other: "Please only upload up to {{count}} files"
|
|
1515
1515
|
},
|
|
1516
|
+
validation_date: "Please enter a valid date (YYYY-MM-DD)",
|
|
1516
1517
|
validation_email: "That doesn’t look like a valid email address",
|
|
1517
1518
|
validation_url: "That doesn’t look like a valid URL",
|
|
1518
1519
|
validation_multiple_choice_min: {
|
|
@@ -1957,7 +1958,7 @@ let xe = {
|
|
|
1957
1958
|
return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t;
|
|
1958
1959
|
}
|
|
1959
1960
|
};
|
|
1960
|
-
function
|
|
1961
|
+
function Ma(t) {
|
|
1961
1962
|
xe = t(xe);
|
|
1962
1963
|
}
|
|
1963
1964
|
function Yc(t) {
|
|
@@ -2015,18 +2016,18 @@ function Ii(t, e) {
|
|
|
2015
2016
|
};
|
|
2016
2017
|
return ae.set(e, o), o;
|
|
2017
2018
|
}
|
|
2018
|
-
|
|
2019
|
+
Ma((t) => ({
|
|
2019
2020
|
...t,
|
|
2020
2021
|
get: (e, i, a) => Ii(e, i) || t.get(e, i, a),
|
|
2021
2022
|
has: (e, i) => !!Ii(e, i) || t.has(e, i)
|
|
2022
2023
|
}));
|
|
2023
|
-
const Qc = ["continue", "continuePrimaryKey", "advance"], zi = {}, $e = /* @__PURE__ */ new WeakMap(),
|
|
2024
|
+
const Qc = ["continue", "continuePrimaryKey", "advance"], zi = {}, $e = /* @__PURE__ */ new WeakMap(), Aa = /* @__PURE__ */ new WeakMap(), tl = {
|
|
2024
2025
|
get(t, e) {
|
|
2025
2026
|
if (!Qc.includes(e))
|
|
2026
2027
|
return t[e];
|
|
2027
2028
|
let i = zi[e];
|
|
2028
2029
|
return i || (i = zi[e] = function(...a) {
|
|
2029
|
-
$e.set(this,
|
|
2030
|
+
$e.set(this, Aa.get(this)[e](...a));
|
|
2030
2031
|
}), i;
|
|
2031
2032
|
}
|
|
2032
2033
|
};
|
|
@@ -2036,13 +2037,13 @@ async function* el(...t) {
|
|
|
2036
2037
|
return;
|
|
2037
2038
|
e = e;
|
|
2038
2039
|
const i = new Proxy(e, tl);
|
|
2039
|
-
for (
|
|
2040
|
+
for (Aa.set(i, e), Jt.set(i, ke(e)); e; )
|
|
2040
2041
|
yield i, e = await ($e.get(i) || e.continue()), $e.delete(i);
|
|
2041
2042
|
}
|
|
2042
2043
|
function Di(t, e) {
|
|
2043
2044
|
return e === Symbol.asyncIterator && me(t, [IDBIndex, IDBObjectStore, IDBCursor]) || e === "iterate" && me(t, [IDBIndex, IDBObjectStore]);
|
|
2044
2045
|
}
|
|
2045
|
-
|
|
2046
|
+
Ma((t) => ({
|
|
2046
2047
|
...t,
|
|
2047
2048
|
get(e, i, a) {
|
|
2048
2049
|
return Di(e, i) ? el : t.get(e, i, a);
|
|
@@ -2095,7 +2096,7 @@ const id = (t) => typeof t == "string", al = (t) => {
|
|
|
2095
2096
|
}, (e) => e).otherwise(() => {
|
|
2096
2097
|
throw new Error("invalid submitter");
|
|
2097
2098
|
})
|
|
2098
|
-
),
|
|
2099
|
+
), Mi = typeof window > "u" ? void 0 : Jc("inploi-chatbot", 3, {
|
|
2099
2100
|
upgrade(t) {
|
|
2100
2101
|
try {
|
|
2101
2102
|
t.deleteObjectStore("state");
|
|
@@ -2106,19 +2107,19 @@ const id = (t) => typeof t == "string", al = (t) => {
|
|
|
2106
2107
|
}), yt = {
|
|
2107
2108
|
getStateData: async (t, e, i) => {
|
|
2108
2109
|
var r;
|
|
2109
|
-
const a =
|
|
2110
|
+
const a = Ai({
|
|
2110
2111
|
...t,
|
|
2111
2112
|
flowKeys: e,
|
|
2112
2113
|
context: i
|
|
2113
2114
|
});
|
|
2114
|
-
return (r = await
|
|
2115
|
+
return (r = await Mi) == null ? void 0 : r.get("state", a);
|
|
2115
2116
|
},
|
|
2116
2117
|
setStateData: il(async (t) => {
|
|
2117
2118
|
var i;
|
|
2118
|
-
const e =
|
|
2119
|
-
return (i = await
|
|
2119
|
+
const e = Ai(t);
|
|
2120
|
+
return (i = await Mi) == null ? void 0 : i.put("state", t.data, e);
|
|
2120
2121
|
}, 1e3)
|
|
2121
|
-
},
|
|
2122
|
+
}, At = (t, e, i, a = 0) => {
|
|
2122
2123
|
if (!e.nextId)
|
|
2123
2124
|
return i(e.id, {
|
|
2124
2125
|
stepsMade: a,
|
|
@@ -2135,7 +2136,7 @@ const id = (t) => typeof t == "string", al = (t) => {
|
|
|
2135
2136
|
};
|
|
2136
2137
|
const o = e.type === "if-block" ? e.branchId : void 0, n = t.find((d) => d.id === o), s = e.type.includes("question") ? 1 : 0;
|
|
2137
2138
|
if (n) {
|
|
2138
|
-
const d = s + Math.max(
|
|
2139
|
+
const d = s + Math.max(At(t, r, i, a + s).remainingSteps, At(t, n, i, a + s).remainingSteps);
|
|
2139
2140
|
return i(e.id, {
|
|
2140
2141
|
stepsMade: a,
|
|
2141
2142
|
remainingSteps: d
|
|
@@ -2144,7 +2145,7 @@ const id = (t) => typeof t == "string", al = (t) => {
|
|
|
2144
2145
|
remainingSteps: d
|
|
2145
2146
|
};
|
|
2146
2147
|
}
|
|
2147
|
-
const l = s +
|
|
2148
|
+
const l = s + At(t, r, i, a + s).remainingSteps;
|
|
2148
2149
|
return i(e.id, {
|
|
2149
2150
|
stepsMade: a,
|
|
2150
2151
|
remainingSteps: l
|
|
@@ -2154,10 +2155,10 @@ const id = (t) => typeof t == "string", al = (t) => {
|
|
|
2154
2155
|
};
|
|
2155
2156
|
}, nl = (t) => {
|
|
2156
2157
|
const e = {}, i = t.find((a) => a.isHead);
|
|
2157
|
-
return i &&
|
|
2158
|
+
return i && At(t, i, (a, r) => {
|
|
2158
2159
|
e[a] = r;
|
|
2159
2160
|
}), e;
|
|
2160
|
-
},
|
|
2161
|
+
}, Ai = (t) => [...t.flowKeys, t.id, t.version, rl(t.context)].join("/"), J = Et({
|
|
2161
2162
|
state: "idle"
|
|
2162
2163
|
}), _t = (t) => {
|
|
2163
2164
|
const {
|
|
@@ -2394,7 +2395,7 @@ const id = (t) => typeof t == "string", al = (t) => {
|
|
|
2394
2395
|
}) => p("div", {
|
|
2395
2396
|
class: "flex flex-1 items-center justify-end px-1",
|
|
2396
2397
|
children: p("button", {
|
|
2397
|
-
class:
|
|
2398
|
+
class: Ae(dl({
|
|
2398
2399
|
variant: i
|
|
2399
2400
|
}), t),
|
|
2400
2401
|
...a,
|
|
@@ -2462,7 +2463,7 @@ const id = (t) => typeof t == "string", al = (t) => {
|
|
|
2462
2463
|
children: [e.feedback ? p("div", {
|
|
2463
2464
|
"data-widget": "inploi-feedback",
|
|
2464
2465
|
"data-key": "chatbot-header",
|
|
2465
|
-
class:
|
|
2466
|
+
class: Ae({
|
|
2466
2467
|
hidden: S.current$.value.state !== "loaded" || a.value !== "maximised"
|
|
2467
2468
|
}),
|
|
2468
2469
|
children: p("div", {
|
|
@@ -2494,7 +2495,7 @@ const id = (t) => typeof t == "string", al = (t) => {
|
|
|
2494
2495
|
};
|
|
2495
2496
|
function Ee() {
|
|
2496
2497
|
}
|
|
2497
|
-
const pl = ya(() => import("./chatbot-body-
|
|
2498
|
+
const pl = ya(() => import("./chatbot-body-b0e15a28.js").then((t) => t.ChatbotBody)), Fa = Fe("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out", {
|
|
2498
2499
|
variants: {
|
|
2499
2500
|
view: {
|
|
2500
2501
|
closed: "hidden",
|
|
@@ -2533,7 +2534,7 @@ const pl = ya(() => import("./chatbot-body-735ba67a.js").then((t) => t.ChatbotBo
|
|
|
2533
2534
|
flow: o,
|
|
2534
2535
|
error: n
|
|
2535
2536
|
} = S.current$.value, s = S.viewState$.value, l = r !== "idle" && s === "maximised", d = He(null);
|
|
2536
|
-
return p(
|
|
2537
|
+
return p(Ac, {
|
|
2537
2538
|
terms: a.terms,
|
|
2538
2539
|
locale: void 0,
|
|
2539
2540
|
children: [p(fl, {
|
|
@@ -3332,9 +3333,9 @@ const Ya = /* @__PURE__ */ Nl(/* @__PURE__ */ Je([/* @__PURE__ */ Z(), /* @__PUR
|
|
|
3332
3333
|
required: /* @__PURE__ */ qe(),
|
|
3333
3334
|
type: /* @__PURE__ */ Je([/* @__PURE__ */ Oe("string"), /* @__PURE__ */ Oe("number")])
|
|
3334
3335
|
}))))
|
|
3335
|
-
}), Al = /* @__PURE__ */ Q({
|
|
3336
|
-
flow: qa
|
|
3337
3336
|
}), Ml = /* @__PURE__ */ Q({
|
|
3337
|
+
flow: qa
|
|
3338
|
+
}), Al = /* @__PURE__ */ Q({
|
|
3338
3339
|
company: /* @__PURE__ */ Q({
|
|
3339
3340
|
name: /* @__PURE__ */ Z()
|
|
3340
3341
|
}),
|
|
@@ -3354,13 +3355,13 @@ const Ya = /* @__PURE__ */ Nl(/* @__PURE__ */ Je([/* @__PURE__ */ Z(), /* @__PUR
|
|
|
3354
3355
|
method: "GET",
|
|
3355
3356
|
schema: {
|
|
3356
3357
|
searchParams: Ja(),
|
|
3357
|
-
response:
|
|
3358
|
+
response: Al
|
|
3358
3359
|
}
|
|
3359
3360
|
}), Hl = Ri({
|
|
3360
3361
|
pathname: "/flow/id/:id",
|
|
3361
3362
|
method: "GET",
|
|
3362
3363
|
schema: {
|
|
3363
|
-
response:
|
|
3364
|
+
response: Ml
|
|
3364
3365
|
}
|
|
3365
3366
|
});
|
|
3366
3367
|
var Ll = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], Bl = {
|
|
@@ -3605,12 +3606,12 @@ ${i.concat(i).join(`
|
|
|
3605
3606
|
var v;
|
|
3606
3607
|
if (typeof window > "u")
|
|
3607
3608
|
return;
|
|
3608
|
-
const c = [
|
|
3609
|
+
const c = [M("style", {
|
|
3609
3610
|
id: "inploi-chatbot-styles"
|
|
3610
|
-
}, gl),
|
|
3611
|
+
}, gl), M("style", {
|
|
3611
3612
|
id: "inploi-chatbot-theme"
|
|
3612
3613
|
}, Yl(e))], h = t.getOrCreateChatbotElement();
|
|
3613
|
-
if (lt(
|
|
3614
|
+
if (lt(M(U, {}, [c, M(wl, {
|
|
3614
3615
|
apiClient: r,
|
|
3615
3616
|
logger: n,
|
|
3616
3617
|
analytics: s,
|
|
@@ -3805,7 +3806,7 @@ export {
|
|
|
3805
3806
|
Zl as a,
|
|
3806
3807
|
Pa as b,
|
|
3807
3808
|
Ql as c,
|
|
3808
|
-
|
|
3809
|
+
Ae as d,
|
|
3809
3810
|
Et as e,
|
|
3810
3811
|
Fe as f,
|
|
3811
3812
|
Ps as g,
|
package/dist/plugin-chatbot.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-5220abff.cjs");require("@inploi/sdk");exports.chatbotPlugin=e.chatbotPlugin;
|
package/dist/plugin-chatbot.js
CHANGED
package/dist/rpc.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export declare const flowByJobIdEndpoint: import('@inploi/sdk').RpcEndpoint<"GET
|
|
|
84
84
|
key: string;
|
|
85
85
|
question: string;
|
|
86
86
|
optional: boolean;
|
|
87
|
-
format: "text" | "url" | "email" | "phone";
|
|
87
|
+
format: "date" | "text" | "url" | "email" | "phone";
|
|
88
88
|
placeholder?: string | undefined;
|
|
89
89
|
maxChars?: number | undefined;
|
|
90
90
|
minChars?: number | undefined;
|
|
@@ -323,7 +323,7 @@ export declare const flowByIdEndpoint: import('@inploi/sdk').RpcEndpoint<"GET",
|
|
|
323
323
|
key: string;
|
|
324
324
|
question: string;
|
|
325
325
|
optional: boolean;
|
|
326
|
-
format: "text" | "url" | "email" | "phone";
|
|
326
|
+
format: "date" | "text" | "url" | "email" | "phone";
|
|
327
327
|
placeholder?: string | undefined;
|
|
328
328
|
maxChars?: number | undefined;
|
|
329
329
|
minChars?: number | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inploi/plugin-chatbot",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/plugin-chatbot.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"@inploi/i18n": "0.1.5",
|
|
66
66
|
"@inploi/core": "1.16.1",
|
|
67
67
|
"@inploi/design-tokens": "0.2.1",
|
|
68
|
-
"@inploi/plugin-feedback": "3.0.0",
|
|
69
68
|
"@inploi/sdk": "1.17.0",
|
|
70
69
|
"@inploi/colors": "1.0.1",
|
|
70
|
+
"@inploi/plugin-feedback": "3.0.0",
|
|
71
71
|
"eslint-config-custom": "0.1.0",
|
|
72
72
|
"tsconfig": "0.1.0"
|
|
73
73
|
},
|