deep-chat-dev 9.0.273 → 9.0.277
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/custom-elements.json +11117 -11012
- package/dist/deepChat.bundle.js +1 -1
- package/dist/deepChat.d.ts +2 -0
- package/dist/deepChat.d.ts.map +1 -1
- package/dist/deepChat.js +492 -459
- package/dist/services/openAI/openAIChatIO.d.ts.map +1 -1
- package/dist/services/openAI/realtime/openAIRealtimeIO.d.ts.map +1 -1
- package/dist/types/browserStorage.d.ts +6 -0
- package/dist/types/browserStorage.d.ts.map +1 -0
- package/dist/views/chat/messages/browserStorage/browserStorage.d.ts +10 -0
- package/dist/views/chat/messages/browserStorage/browserStorage.d.ts.map +1 -0
- package/dist/views/chat/messages/messages.d.ts.map +1 -1
- package/dist/views/chat/messages/messagesBase.d.ts +2 -0
- package/dist/views/chat/messages/messagesBase.d.ts.map +1 -1
- package/dist/views/chat/messages/stream/messageStream.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/deepChat.js
CHANGED
@@ -1021,7 +1021,7 @@ var Yn = /\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
|
|
1021
1021
|
function Qt(n) {
|
1022
1022
|
return n.indexOf("\\") < 0 ? n : n.replace(Yn, "$1");
|
1023
1023
|
}
|
1024
|
-
function
|
1024
|
+
function wn(n) {
|
1025
1025
|
return !(n >= 55296 && n <= 57343 || n >= 64976 && n <= 65007 || (n & 65535) === 65535 || (n & 65535) === 65534 || n >= 0 && n <= 8 || n === 11 || n >= 14 && n <= 31 || n >= 127 && n <= 159 || n > 1114111);
|
1026
1026
|
}
|
1027
1027
|
function ts(n) {
|
@@ -1038,7 +1038,7 @@ var Zn = /&([a-z#][a-z0-9]{1,31});/gi,
|
|
1038
1038
|
function er(n, e) {
|
1039
1039
|
var t = 0,
|
1040
1040
|
i = _n(e);
|
1041
|
-
return e !== i ? i : e.charCodeAt(0) === 35 && Qn.test(e) && (t = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10),
|
1041
|
+
return e !== i ? i : e.charCodeAt(0) === 35 && Qn.test(e) && (t = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10), wn(t)) ? ts(t) : n;
|
1042
1042
|
}
|
1043
1043
|
function nt(n) {
|
1044
1044
|
return n.indexOf("&") < 0 ? n : n.replace(Zn, er);
|
@@ -1270,11 +1270,11 @@ v.dt_close = function () {
|
|
1270
1270
|
v.dd_close = function () {
|
1271
1271
|
return "</dd>\n";
|
1272
1272
|
};
|
1273
|
-
function
|
1274
|
-
return ++e >= n.length - 2 ? e : n[e].type === "paragraph_open" && n[e].tight && n[e + 1].type === "inline" && n[e + 1].content.length === 0 && n[e + 2].type === "paragraph_close" && n[e + 2].tight ?
|
1273
|
+
function An(n, e) {
|
1274
|
+
return ++e >= n.length - 2 ? e : n[e].type === "paragraph_open" && n[e].tight && n[e + 1].type === "inline" && n[e + 1].content.length === 0 && n[e + 2].type === "paragraph_close" && n[e + 2].tight ? An(n, e + 2) : e;
|
1275
1275
|
}
|
1276
1276
|
var ot = v.getBreak = function (e, t) {
|
1277
|
-
return t =
|
1277
|
+
return t = An(e, t), t < e.length && e[t].type === "list_item_close" ? "" : "\n";
|
1278
1278
|
};
|
1279
1279
|
function Es() {
|
1280
1280
|
this.rules = xn({}, v), this.getBreak = v.getBreak;
|
@@ -1814,7 +1814,7 @@ function xr(n, e, t, i) {
|
|
1814
1814
|
}), n.parentType = c, d[1] = n.line, h = 0; h < o.length; h++) n.bMarks[h + e] = a[h], n.tShift[h + e] = o[h];
|
1815
1815
|
return n.blkIndent = l, !0;
|
1816
1816
|
}
|
1817
|
-
function
|
1817
|
+
function wr(n, e, t, i) {
|
1818
1818
|
var s,
|
1819
1819
|
r,
|
1820
1820
|
o,
|
@@ -1849,7 +1849,7 @@ function zs(n, e) {
|
|
1849
1849
|
}
|
1850
1850
|
return i < s && n.src.charCodeAt(i) !== 32 ? -1 : i;
|
1851
1851
|
}
|
1852
|
-
function
|
1852
|
+
function Ar(n, e) {
|
1853
1853
|
var t,
|
1854
1854
|
i,
|
1855
1855
|
s = n.level + 2;
|
@@ -1912,7 +1912,7 @@ function Tr(n, e, t, i) {
|
|
1912
1912
|
return n.tokens.push({
|
1913
1913
|
type: g ? "ordered_list_close" : "bullet_list_close",
|
1914
1914
|
level: --n.level
|
1915
|
-
}), He[1] = s, n.line = s, Re &&
|
1915
|
+
}), He[1] = s, n.line = s, Re && Ar(n, M), !0;
|
1916
1916
|
}
|
1917
1917
|
function Cr(n, e, t, i) {
|
1918
1918
|
var s,
|
@@ -2192,7 +2192,7 @@ function Br(n, e) {
|
|
2192
2192
|
level: n.level
|
2193
2193
|
})), !0;
|
2194
2194
|
}
|
2195
|
-
var pi = [["code", Sr], ["fences", _r, ["paragraph", "blockquote", "list"]], ["blockquote", xr, ["paragraph", "blockquote", "list"]], ["hr",
|
2195
|
+
var pi = [["code", Sr], ["fences", _r, ["paragraph", "blockquote", "list"]], ["blockquote", xr, ["paragraph", "blockquote", "list"]], ["hr", wr, ["paragraph", "blockquote", "list"]], ["list", Tr, ["paragraph", "blockquote"]], ["footnote", Cr, ["paragraph"]], ["heading", Rr, ["paragraph", "blockquote"]], ["lheading", Mr], ["htmlblock", Or, ["paragraph", "blockquote"]], ["table", Pr, ["paragraph"]], ["deflist", Dr, ["paragraph"]], ["paragraph", Br]];
|
2196
2196
|
function Ss() {
|
2197
2197
|
this.ruler = new oe();
|
2198
2198
|
for (var n = 0; n < pi.length; n++) this.ruler.push(pi[n][0], pi[n][1], {
|
@@ -2659,8 +2659,8 @@ function _o(n, e) {
|
|
2659
2659
|
}), n.pos += i[0].length, !0);
|
2660
2660
|
}
|
2661
2661
|
var xo = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,
|
2662
|
-
|
2663
|
-
function
|
2662
|
+
wo = /^&([a-z][a-z0-9]{1,31});/i;
|
2663
|
+
function Ao(n, e) {
|
2664
2664
|
var t,
|
2665
2665
|
i,
|
2666
2666
|
s,
|
@@ -2669,15 +2669,15 @@ function wo(n, e) {
|
|
2669
2669
|
if (n.src.charCodeAt(r) !== 38) return !1;
|
2670
2670
|
if (r + 1 < o) {
|
2671
2671
|
if (t = n.src.charCodeAt(r + 1), t === 35) {
|
2672
|
-
if (s = n.src.slice(r).match(xo), s) return e || (i = s[1][0].toLowerCase() === "x" ? parseInt(s[1].slice(1), 16) : parseInt(s[1], 10), n.pending +=
|
2673
|
-
} else if (s = n.src.slice(r).match(
|
2672
|
+
if (s = n.src.slice(r).match(xo), s) return e || (i = s[1][0].toLowerCase() === "x" ? parseInt(s[1].slice(1), 16) : parseInt(s[1], 10), n.pending += wn(i) ? ts(i) : ts(65533)), n.pos += s[0].length, !0;
|
2673
|
+
} else if (s = n.src.slice(r).match(wo), s) {
|
2674
2674
|
var a = _n(s[1]);
|
2675
2675
|
if (s[1] !== a) return e || (n.pending += a), n.pos += s[0].length, !0;
|
2676
2676
|
}
|
2677
2677
|
}
|
2678
2678
|
return e || (n.pending += "&"), n.pos++, !0;
|
2679
2679
|
}
|
2680
|
-
var Zi = [["text", qr], ["newline", zr], ["escape", Gr], ["backticks", Vr], ["del", Kr], ["ins", Wr], ["mark", $r], ["emphasis", Jr], ["sub", Yr], ["sup", Qr], ["links", eo], ["footnote_inline", to], ["footnote_ref", io], ["autolink", oo], ["htmltag", _o], ["entity",
|
2680
|
+
var Zi = [["text", qr], ["newline", zr], ["escape", Gr], ["backticks", Vr], ["del", Kr], ["ins", Wr], ["mark", $r], ["emphasis", Jr], ["sub", Yr], ["sup", Qr], ["links", eo], ["footnote_inline", to], ["footnote_ref", io], ["autolink", oo], ["htmltag", _o], ["entity", Ao]];
|
2681
2681
|
function qi() {
|
2682
2682
|
this.ruler = new oe();
|
2683
2683
|
for (var n = 0; n < Zi.length; n++) this.ruler.push(Zi[n][0], Zi[n][1]);
|
@@ -2836,34 +2836,34 @@ var Co = {
|
|
2836
2836
|
function Ln(n, e, t) {
|
2837
2837
|
this.src = e, this.env = t, this.options = n.options, this.tokens = [], this.inlineMode = !1, this.inline = n.inline, this.block = n.block, this.renderer = n.renderer, this.typographer = n.typographer;
|
2838
2838
|
}
|
2839
|
-
function
|
2839
|
+
function we(n, e) {
|
2840
2840
|
typeof n != "string" && (e = n, n = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new qi(), this.block = new Ss(), this.core = new Mn(), this.renderer = new Es(), this.ruler = new oe(), this.options = {}, this.configure(ko[n]), this.set(e || {});
|
2841
2841
|
}
|
2842
|
-
|
2842
|
+
we.prototype.set = function (n) {
|
2843
2843
|
xn(this.options, n);
|
2844
2844
|
};
|
2845
|
-
|
2845
|
+
we.prototype.configure = function (n) {
|
2846
2846
|
var e = this;
|
2847
2847
|
if (!n) throw new Error("Wrong `remarkable` preset, check name/content");
|
2848
2848
|
n.options && e.set(n.options), n.components && Object.keys(n.components).forEach(function (t) {
|
2849
2849
|
n.components[t].rules && e[t].ruler.enable(n.components[t].rules, !0);
|
2850
2850
|
});
|
2851
2851
|
};
|
2852
|
-
|
2852
|
+
we.prototype.use = function (n, e) {
|
2853
2853
|
return n(this, e), this;
|
2854
2854
|
};
|
2855
|
-
|
2855
|
+
we.prototype.parse = function (n, e) {
|
2856
2856
|
var t = new Ln(this, n, e);
|
2857
2857
|
return this.core.process(t), t.tokens;
|
2858
2858
|
};
|
2859
|
-
|
2859
|
+
we.prototype.render = function (n, e) {
|
2860
2860
|
return e = e || {}, this.renderer.render(this.parse(n, e), this.options, e);
|
2861
2861
|
};
|
2862
|
-
|
2862
|
+
we.prototype.parseInline = function (n, e) {
|
2863
2863
|
var t = new Ln(this, n, e);
|
2864
2864
|
return t.inlineMode = !0, this.core.process(t), t.tokens;
|
2865
2865
|
};
|
2866
|
-
|
2866
|
+
we.prototype.renderInline = function (n, e) {
|
2867
2867
|
return e = e || {}, this.renderer.render(this.parseInline(n, e), this.options, e);
|
2868
2868
|
};
|
2869
2869
|
var pt = /*#__PURE__*/function () {
|
@@ -2873,10 +2873,10 @@ var pt = /*#__PURE__*/function () {
|
|
2873
2873
|
return _createClass(pt, null, [{
|
2874
2874
|
key: "instantiate",
|
2875
2875
|
value: function instantiate(e) {
|
2876
|
-
if (e) return new
|
2876
|
+
if (e) return new we(_objectSpread(_objectSpread({}, pt.DEFAULT_PROPERTIES), e));
|
2877
2877
|
if (window.hljs) {
|
2878
2878
|
var t = window.hljs;
|
2879
|
-
return new
|
2879
|
+
return new we({
|
2880
2880
|
highlight: function highlight(i, s) {
|
2881
2881
|
if (s && t.getLanguage(s)) try {
|
2882
2882
|
return t.highlight(i, {
|
@@ -2905,7 +2905,7 @@ var pt = /*#__PURE__*/function () {
|
|
2905
2905
|
typographer: !0
|
2906
2906
|
// Enable smartypants and other sweet transforms
|
2907
2907
|
});
|
2908
|
-
} else return new
|
2908
|
+
} else return new we(pt.DEFAULT_PROPERTIES);
|
2909
2909
|
}
|
2910
2910
|
}, {
|
2911
2911
|
key: "createNew",
|
@@ -2923,6 +2923,29 @@ pt.DEFAULT_PROPERTIES = {
|
|
2923
2923
|
// set target to open in a new tab
|
2924
2924
|
};
|
2925
2925
|
var ti = pt;
|
2926
|
+
var Lo = /*#__PURE__*/function () {
|
2927
|
+
function Lo(e) {
|
2928
|
+
_classCallCheck(this, Lo);
|
2929
|
+
this.storageKey = "deep-chat-storage", _typeof(e) == "object" && (e.key && (this.storageKey = e.key), e.clear = this.clear.bind(this));
|
2930
|
+
}
|
2931
|
+
return _createClass(Lo, [{
|
2932
|
+
key: "get",
|
2933
|
+
value: function get() {
|
2934
|
+
var e = localStorage.getItem(this.storageKey);
|
2935
|
+
return e ? JSON.parse(e) : [];
|
2936
|
+
}
|
2937
|
+
}, {
|
2938
|
+
key: "addMessages",
|
2939
|
+
value: function addMessages(e) {
|
2940
|
+
localStorage.setItem(this.storageKey, JSON.stringify(e));
|
2941
|
+
}
|
2942
|
+
}, {
|
2943
|
+
key: "clear",
|
2944
|
+
value: function clear() {
|
2945
|
+
localStorage.removeItem(this.storageKey);
|
2946
|
+
}
|
2947
|
+
}]);
|
2948
|
+
}();
|
2926
2949
|
var X = /*#__PURE__*/function () {
|
2927
2950
|
function X() {
|
2928
2951
|
_classCallCheck(this, X);
|
@@ -3267,7 +3290,7 @@ var Z = /*#__PURE__*/function () {
|
|
3267
3290
|
var _this5 = this;
|
3268
3291
|
_classCallCheck(this, Z);
|
3269
3292
|
var t;
|
3270
|
-
this.messageElementRefs = [], this.htmlClassUtilities = {}, this.messageToElements = [], this.elementRef = Z.createContainerElement(), this.messageStyles = te.processMessageStyles(e.messageStyles), this._remarkable = ti.createNew(e.remarkable), e.avatars && (this.avatar = new Me(e.avatars)), e.names && (this.name = new Gt(e.names)), this._onMessage = ii.onMessage.bind(this, e), e.htmlClassUtilities && (this.htmlClassUtilities = e.htmlClassUtilities), this.focusMode = e.focusMode, this.focusMode || (this._lastGroupMessagesElement = document.createElement("div")), typeof this.focusMode != "boolean" && (t = this.focusMode) != null && t.fade && Ei.setFade(this.elementRef, this.focusMode.fade), setTimeout(function () {
|
3293
|
+
this.messageElementRefs = [], this.htmlClassUtilities = {}, this.messageToElements = [], this.elementRef = Z.createContainerElement(), this.messageStyles = te.processMessageStyles(e.messageStyles), this._remarkable = ti.createNew(e.remarkable), e.avatars && (this.avatar = new Me(e.avatars)), e.names && (this.name = new Gt(e.names)), e.browserStorage && (this.browserStorage = new Lo(e.browserStorage)), this._onMessage = ii.onMessage.bind(this, e), e.htmlClassUtilities && (this.htmlClassUtilities = e.htmlClassUtilities), this.focusMode = e.focusMode, this.focusMode || (this._lastGroupMessagesElement = document.createElement("div")), typeof this.focusMode != "boolean" && (t = this.focusMode) != null && t.fade && Ei.setFade(this.elementRef, this.focusMode.fade), setTimeout(function () {
|
3271
3294
|
_this5.submitUserMessage = e.submitUserMessage;
|
3272
3295
|
});
|
3273
3296
|
}
|
@@ -3729,13 +3752,17 @@ var pe = /*#__PURE__*/function () {
|
|
3729
3752
|
}, {
|
3730
3753
|
key: "setInitialState",
|
3731
3754
|
value: function setInitialState(e, t, i) {
|
3732
|
-
var o, a;
|
3755
|
+
var o, a, l;
|
3733
3756
|
this._streamType = e, i !== null && i !== void 0 ? i : i = y.AI_ROLE;
|
3734
3757
|
var s = ((o = this._customWrappers) == null ? void 0 : o[i]) || ((a = this._customWrappers) == null ? void 0 : a["default"]),
|
3735
3758
|
r = s ? "" : t;
|
3736
3759
|
this._elements = e === "text" ? this._messages.addNewTextMessage(r, i) : xe.add(this._messages, r, i), this._elements && (this._elements.bubbleElement.classList.add(pe.MESSAGE_CLASS), this._activeMessageRole = i, this._message = _defineProperty({
|
3737
3760
|
role: this._activeMessageRole
|
3738
|
-
}, e, r), this._messages.messageToElements.push([this._message, _defineProperty({}, e, this._elements)]),
|
3761
|
+
}, e, r), this._messages.messageToElements.push([this._message, _defineProperty({}, e, this._elements)]), (l = this._messages.browserStorage) == null || l.addMessages(this._messages.messageToElements.map(function (_ref5) {
|
3762
|
+
var _ref6 = _slicedToArray(_ref5, 1),
|
3763
|
+
c = _ref6[0];
|
3764
|
+
return c;
|
3765
|
+
})), s && this.setTargetWrapperIfNeeded(this._elements, t, this._streamType, s));
|
3739
3766
|
}
|
3740
3767
|
}, {
|
3741
3768
|
key: "setTargetWrapperIfNeeded",
|
@@ -3753,13 +3780,13 @@ var pe = /*#__PURE__*/function () {
|
|
3753
3780
|
}, {
|
3754
3781
|
key: "updateText",
|
3755
3782
|
value: function updateText(e, t, i) {
|
3756
|
-
this._message && (this._message.text = i ? e : this._message.text + e, this._partialRender && this.isNewPartialRenderParagraph() && this.partialRenderNewParagraph(t), this._partialBubble ? this.partialRenderBubbleUpdate(e) : this._messages.renderText(t, this._message.text));
|
3783
|
+
this._message && (this._message.text = i ? e : this._message.text + e, this._partialRender && this.isNewPartialRenderParagraph(t, i) && this.partialRenderNewParagraph(t), this._partialBubble ? this.partialRenderBubbleUpdate(e) : this._messages.renderText(t, this._message.text));
|
3757
3784
|
}
|
3758
3785
|
}, {
|
3759
3786
|
key: "isNewPartialRenderParagraph",
|
3760
|
-
value: function isNewPartialRenderParagraph() {
|
3761
|
-
var
|
3762
|
-
return this._partialBubble ? this._partialText && ((
|
3787
|
+
value: function isNewPartialRenderParagraph(e, t) {
|
3788
|
+
var i, s;
|
3789
|
+
return t ? (e.innerHTML = "", !0) : this._partialBubble ? this._partialText && ((s = this._partialText) == null ? void 0 : s.indexOf(pe.PARTIAL_RENDER_TEXT_MARK)) > -1 : ((i = this._message) == null ? void 0 : i.text) && this._message.text.indexOf(pe.PARTIAL_RENDER_TEXT_MARK) > -1;
|
3763
3790
|
}
|
3764
3791
|
}, {
|
3765
3792
|
key: "partialRenderNewParagraph",
|
@@ -3831,7 +3858,7 @@ var pe = /*#__PURE__*/function () {
|
|
3831
3858
|
}]);
|
3832
3859
|
}();
|
3833
3860
|
pe.MESSAGE_CLASS = "streamed-message", pe.PARTIAL_RENDER_TEXT_MARK = "\n\n", pe.TARGET_WRAPPER_CLASS = "stream-wrapper";
|
3834
|
-
var
|
3861
|
+
var Ae = pe;
|
3835
3862
|
var qe = /*#__PURE__*/function () {
|
3836
3863
|
function qe() {
|
3837
3864
|
_classCallCheck(this, qe);
|
@@ -4030,11 +4057,11 @@ var qe = /*#__PURE__*/function () {
|
|
4030
4057
|
}();
|
4031
4058
|
qe.CONTENT_TYPE = "Content-Type";
|
4032
4059
|
var E = qe;
|
4033
|
-
function
|
4034
|
-
return
|
4060
|
+
function Io(_x14, _x15) {
|
4061
|
+
return _Io.apply(this, arguments);
|
4035
4062
|
}
|
4036
|
-
function
|
4037
|
-
|
4063
|
+
function _Io() {
|
4064
|
+
_Io = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee136(n, e) {
|
4038
4065
|
var t, i;
|
4039
4066
|
return _regeneratorRuntime().wrap(function _callee136$(_context136) {
|
4040
4067
|
while (1) switch (_context136.prev = _context136.next) {
|
@@ -4058,15 +4085,15 @@ function _Lo() {
|
|
4058
4085
|
}
|
4059
4086
|
}, _callee136);
|
4060
4087
|
}));
|
4061
|
-
return
|
4088
|
+
return _Io.apply(this, arguments);
|
4062
4089
|
}
|
4063
|
-
function
|
4090
|
+
function Oo(n) {
|
4064
4091
|
var e,
|
4065
4092
|
t,
|
4066
4093
|
i,
|
4067
4094
|
s = !1;
|
4068
4095
|
return function (o) {
|
4069
|
-
e === void 0 ? (e = o, t = 0, i = -1) : e =
|
4096
|
+
e === void 0 ? (e = o, t = 0, i = -1) : e = No(e, o);
|
4070
4097
|
var a = e.length;
|
4071
4098
|
var l = 0;
|
4072
4099
|
for (; t < a;) {
|
@@ -4088,7 +4115,7 @@ function Io(n) {
|
|
4088
4115
|
l === a ? e = void 0 : l !== 0 && (e = e.subarray(l), t -= l);
|
4089
4116
|
};
|
4090
4117
|
}
|
4091
|
-
function
|
4118
|
+
function Po(n, e, t) {
|
4092
4119
|
var i = $s();
|
4093
4120
|
var s = new TextDecoder();
|
4094
4121
|
return function (o, a) {
|
@@ -4114,7 +4141,7 @@ function Oo(n, e, t) {
|
|
4114
4141
|
}
|
4115
4142
|
};
|
4116
4143
|
}
|
4117
|
-
function
|
4144
|
+
function No(n, e) {
|
4118
4145
|
var t = new Uint8Array(n.length + e.length);
|
4119
4146
|
return t.set(n), t.set(e, n.length), t;
|
4120
4147
|
}
|
@@ -4126,16 +4153,16 @@ function $s() {
|
|
4126
4153
|
retry: void 0
|
4127
4154
|
};
|
4128
4155
|
}
|
4129
|
-
var
|
4156
|
+
var Do = function Do(n, e) {
|
4130
4157
|
var t = {};
|
4131
4158
|
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
|
4132
4159
|
if (n != null && typeof Object.getOwnPropertySymbols == "function") for (var s = 0, i = Object.getOwnPropertySymbols(n); s < i.length; s++) e.indexOf(i[s]) < 0 && Object.prototype.propertyIsEnumerable.call(n, i[s]) && (t[i[s]] = n[i[s]]);
|
4133
4160
|
return t;
|
4134
4161
|
};
|
4135
4162
|
var ns = "text/event-stream",
|
4136
|
-
|
4163
|
+
Bo = 1e3,
|
4137
4164
|
Js = "last-event-id";
|
4138
|
-
function
|
4165
|
+
function Fo(n, e) {
|
4139
4166
|
var t = e.signal,
|
4140
4167
|
i = e.headers,
|
4141
4168
|
s = e.onopen,
|
@@ -4144,7 +4171,7 @@ function Bo(n, e) {
|
|
4144
4171
|
a = e.onerror,
|
4145
4172
|
l = e.openWhenHidden,
|
4146
4173
|
c = e.fetch,
|
4147
|
-
d =
|
4174
|
+
d = Do(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
4148
4175
|
return new Promise(function (u, h) {
|
4149
4176
|
var f = Object.assign({}, i);
|
4150
4177
|
f.accept || (f.accept = ns);
|
@@ -4153,7 +4180,7 @@ function Bo(n, e) {
|
|
4153
4180
|
m.abort(), document.hidden || ae();
|
4154
4181
|
}
|
4155
4182
|
l || document.addEventListener("visibilitychange", p);
|
4156
|
-
var g =
|
4183
|
+
var g = Bo,
|
4157
4184
|
b = 0;
|
4158
4185
|
function M() {
|
4159
4186
|
document.removeEventListener("visibilitychange", p), window.clearTimeout(b), m.abort();
|
@@ -4162,7 +4189,7 @@ function Bo(n, e) {
|
|
4162
4189
|
M(), u();
|
4163
4190
|
});
|
4164
4191
|
var Y = c !== null && c !== void 0 ? c : window.fetch,
|
4165
|
-
He = s !== null && s !== void 0 ? s :
|
4192
|
+
He = s !== null && s !== void 0 ? s : Uo;
|
4166
4193
|
function ae() {
|
4167
4194
|
return _ae.apply(this, arguments);
|
4168
4195
|
}
|
@@ -4185,7 +4212,7 @@ function Bo(n, e) {
|
|
4185
4212
|
return He(Ee);
|
4186
4213
|
case 7:
|
4187
4214
|
_context6.next = 9;
|
4188
|
-
return
|
4215
|
+
return Io(Ee.body, Oo(Po(function (ie) {
|
4189
4216
|
ie ? f[Js] = ie : delete f[Js];
|
4190
4217
|
}, function (ie) {
|
4191
4218
|
g = ie;
|
@@ -4216,15 +4243,15 @@ function Bo(n, e) {
|
|
4216
4243
|
ae();
|
4217
4244
|
});
|
4218
4245
|
}
|
4219
|
-
function
|
4246
|
+
function Uo(n) {
|
4220
4247
|
var e = n.headers.get("content-type");
|
4221
4248
|
if (!(e != null && e.startsWith(ns))) throw new Error("Expected content-type to be ".concat(ns, ", Actual: ").concat(e));
|
4222
4249
|
}
|
4223
|
-
var
|
4224
|
-
function
|
4225
|
-
_classCallCheck(this,
|
4250
|
+
var A = /*#__PURE__*/function () {
|
4251
|
+
function A() {
|
4252
|
+
_classCallCheck(this, A);
|
4226
4253
|
}
|
4227
|
-
return _createClass(
|
4254
|
+
return _createClass(A, null, [{
|
4228
4255
|
key: "request",
|
4229
4256
|
value: // prettier-ignore
|
4230
4257
|
function () {
|
@@ -4279,13 +4306,13 @@ var w = /*#__PURE__*/function () {
|
|
4279
4306
|
}
|
4280
4307
|
return _context7.abrupt("return", ye.requestStream(i, e));
|
4281
4308
|
case 15:
|
4282
|
-
d = new
|
4309
|
+
d = new Ae(i, e.stream), u = E.fetch.bind(this, e, l, s), h = {
|
4283
4310
|
method: ((g = e.connectSettings) == null ? void 0 : g.method) || "POST",
|
4284
4311
|
headers: l,
|
4285
4312
|
credentials: (b = e.connectSettings) == null ? void 0 : b.credentials,
|
4286
4313
|
body: s ? JSON.stringify(a) : a
|
4287
4314
|
};
|
4288
|
-
return _context7.abrupt("return", (_typeof(e.stream) == "object" && e.stream.readable ?
|
4315
|
+
return _context7.abrupt("return", (_typeof(e.stream) == "object" && e.stream.readable ? A.handleReadableStream(e, i, d, h, r, u, a) : A.handleEventStream(e, i, d, h, r, u, a), d));
|
4289
4316
|
case 17:
|
4290
4317
|
case "end":
|
4291
4318
|
return _context7.stop();
|
@@ -4307,7 +4334,7 @@ var w = /*#__PURE__*/function () {
|
|
4307
4334
|
d = _e$streamHandlers.abortStream;
|
4308
4335
|
var u = !1;
|
4309
4336
|
fetch(((h = e.connectSettings) == null ? void 0 : h.url) || e.url || "", s).then(/*#__PURE__*/function () {
|
4310
|
-
var
|
4337
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(f) {
|
4311
4338
|
var b, M, m, p, g, _yield$m$read, Y, He, ae, Re, Ee;
|
4312
4339
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
4313
4340
|
while (1) switch (_context8.prev = _context8.next) {
|
@@ -4336,7 +4363,7 @@ var w = /*#__PURE__*/function () {
|
|
4336
4363
|
_context8.next = 15;
|
4337
4364
|
break;
|
4338
4365
|
}
|
4339
|
-
|
4366
|
+
A.handleClose(e, i, c, r);
|
4340
4367
|
_context8.next = 24;
|
4341
4368
|
break;
|
4342
4369
|
case 15:
|
@@ -4357,7 +4384,7 @@ var w = /*#__PURE__*/function () {
|
|
4357
4384
|
Ee = _typeof(Re) == "object" ? Re : {
|
4358
4385
|
text: ae
|
4359
4386
|
};
|
4360
|
-
|
4387
|
+
A.handleMessage(e, t, i, c, Ee, o, a);
|
4361
4388
|
case 24:
|
4362
4389
|
_context8.next = 5;
|
4363
4390
|
break;
|
@@ -4368,10 +4395,10 @@ var w = /*#__PURE__*/function () {
|
|
4368
4395
|
}, _callee8);
|
4369
4396
|
}));
|
4370
4397
|
return function (_x19) {
|
4371
|
-
return
|
4398
|
+
return _ref7.apply(this, arguments);
|
4372
4399
|
};
|
4373
4400
|
}())["catch"](function (f) {
|
4374
|
-
|
4401
|
+
A.handleError(e, t, f);
|
4375
4402
|
}), d.abort = function () {
|
4376
4403
|
u = !0;
|
4377
4404
|
};
|
@@ -4385,7 +4412,7 @@ var w = /*#__PURE__*/function () {
|
|
4385
4412
|
l = _e$streamHandlers2.onOpen,
|
4386
4413
|
c = _e$streamHandlers2.onClose,
|
4387
4414
|
d = _e$streamHandlers2.abortStream;
|
4388
|
-
|
4415
|
+
Fo(((u = e.connectSettings) == null ? void 0 : u.url) || e.url || "", _objectSpread(_objectSpread({}, s), {}, {
|
4389
4416
|
openWhenHidden: !0,
|
4390
4417
|
// keep stream open when browser tab not open
|
4391
4418
|
onopen: function onopen(h) {
|
@@ -4436,7 +4463,7 @@ var w = /*#__PURE__*/function () {
|
|
4436
4463
|
_context0.t0 = p;
|
4437
4464
|
case 7:
|
4438
4465
|
g = _context0.t0;
|
4439
|
-
|
4466
|
+
A.handleMessage(e, t, i, c, g, o, a);
|
4440
4467
|
case 9:
|
4441
4468
|
case "end":
|
4442
4469
|
return _context0.stop();
|
@@ -4448,11 +4475,11 @@ var w = /*#__PURE__*/function () {
|
|
4448
4475
|
throw c(), h;
|
4449
4476
|
},
|
4450
4477
|
onclose: function onclose() {
|
4451
|
-
|
4478
|
+
A.handleClose(e, i, c, r);
|
4452
4479
|
},
|
4453
4480
|
signal: d.signal
|
4454
4481
|
}))["catch"](function (h) {
|
4455
|
-
|
4482
|
+
A.handleError(e, t, h);
|
4456
4483
|
});
|
4457
4484
|
}
|
4458
4485
|
//prettier-ignore
|
@@ -4461,7 +4488,7 @@ var w = /*#__PURE__*/function () {
|
|
4461
4488
|
value: function handleMessage(e, t, i, s, r, o, a) {
|
4462
4489
|
var l;
|
4463
4490
|
(l = e.extractResultData) == null || l.call(e, r, o, a).then(function (c) {
|
4464
|
-
e.asyncCallInProgress && c && c.text !== "" ? (
|
4491
|
+
e.asyncCallInProgress && c && c.text !== "" ? (A.simulate(t, e.streamHandlers, c), s(), e.asyncCallInProgress = !1) : A.upsertWFiles(t, i.upsertStreamedMessage.bind(i), i, c);
|
4465
4492
|
})["catch"](function (c) {
|
4466
4493
|
return E.displayError(t, c);
|
4467
4494
|
});
|
@@ -4527,15 +4554,15 @@ var w = /*#__PURE__*/function () {
|
|
4527
4554
|
case 10:
|
4528
4555
|
if (i.text) {
|
4529
4556
|
t.onOpen();
|
4530
|
-
_o2 = i.text.split(""), a = new
|
4531
|
-
|
4557
|
+
_o2 = i.text.split(""), a = new Ae(e, s == null ? void 0 : s.stream);
|
4558
|
+
A.populateMessages(e, _o2, a, r, "text", 0, s);
|
4532
4559
|
}
|
4533
4560
|
if (i.html) {
|
4534
4561
|
t.onOpen();
|
4535
4562
|
_o3 = G.splitHTML(i.html);
|
4536
4563
|
_o3.length === 0 && (_o3 = i.html.split(""));
|
4537
|
-
_a2 = new
|
4538
|
-
|
4564
|
+
_a2 = new Ae(e, s == null ? void 0 : s.stream);
|
4565
|
+
A.populateMessages(e, _o3, _a2, r, "html", 0, s);
|
4539
4566
|
}
|
4540
4567
|
i.error && (E.displayError(e, i.error), t.onClose());
|
4541
4568
|
case 13:
|
@@ -4569,12 +4596,12 @@ var w = /*#__PURE__*/function () {
|
|
4569
4596
|
});
|
4570
4597
|
case 4:
|
4571
4598
|
c = _context10.sent;
|
4572
|
-
|
4599
|
+
A.upsertWFiles(e, i.upsertStreamedMessage.bind(i), i, c);
|
4573
4600
|
d = setTimeout(function () {
|
4574
|
-
|
4601
|
+
A.populateMessages(e, t, i, s, r, o + 1, a);
|
4575
4602
|
}, s.simulationInterim || 6);
|
4576
4603
|
s.abortStream.abort = function () {
|
4577
|
-
|
4604
|
+
A.abort(d, i, s.onClose);
|
4578
4605
|
};
|
4579
4606
|
_context10.next = 11;
|
4580
4607
|
break;
|
@@ -4599,7 +4626,7 @@ var w = /*#__PURE__*/function () {
|
|
4599
4626
|
}, {
|
4600
4627
|
key: "isSimulatable",
|
4601
4628
|
value: function isSimulatable(e, t) {
|
4602
|
-
return
|
4629
|
+
return A.isSimulation(e) && t && (t.text || t.html);
|
4603
4630
|
}
|
4604
4631
|
}, {
|
4605
4632
|
key: "abort",
|
@@ -4645,9 +4672,9 @@ var Ze = /*#__PURE__*/function () {
|
|
4645
4672
|
}
|
4646
4673
|
}, {
|
4647
4674
|
key: "getResponse",
|
4648
|
-
value: function getResponse(
|
4649
|
-
var e =
|
4650
|
-
t =
|
4675
|
+
value: function getResponse(_ref8) {
|
4676
|
+
var e = _ref8.customDemoResponse,
|
4677
|
+
t = _ref8.messageToElements;
|
4651
4678
|
return e ? Ze.getCustomResponse(e, t[t.length - 1][0]) : {
|
4652
4679
|
text: Ze.generateResponse(t)
|
4653
4680
|
};
|
@@ -4677,7 +4704,7 @@ var Ze = /*#__PURE__*/function () {
|
|
4677
4704
|
r = Array.isArray(s) ? s : [s], o = r.find(function (a) {
|
4678
4705
|
return typeof a.error == "string";
|
4679
4706
|
});
|
4680
|
-
o ? (t.addNewErrorMessage("service", o.error), e.completionsHandlers.onFinish()) :
|
4707
|
+
o ? (t.addNewErrorMessage("service", o.error), e.completionsHandlers.onFinish()) : A.isSimulatable(e.stream, s) ? A.simulate(t, e.streamHandlers, s) : (r.forEach(function (a) {
|
4681
4708
|
return t.addNewMessage(a);
|
4682
4709
|
}), e.completionsHandlers.onFinish());
|
4683
4710
|
case 7:
|
@@ -4693,7 +4720,7 @@ var Ze = /*#__PURE__*/function () {
|
|
4693
4720
|
value: function requestStream(e, t) {
|
4694
4721
|
setTimeout(function () {
|
4695
4722
|
var i = Ze.getResponse(e);
|
4696
|
-
|
4723
|
+
A.simulate(e, t.streamHandlers, i, t);
|
4697
4724
|
}, 400);
|
4698
4725
|
}
|
4699
4726
|
}]);
|
@@ -4751,7 +4778,7 @@ var q = /*#__PURE__*/function () {
|
|
4751
4778
|
var _this8 = this;
|
4752
4779
|
var s = {};
|
4753
4780
|
t.onmessage = /*#__PURE__*/function () {
|
4754
|
-
var
|
4781
|
+
var _ref0 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(r) {
|
4755
4782
|
var o, a, l, c, _l, _c;
|
4756
4783
|
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
4757
4784
|
while (1) switch (_context12.prev = _context12.next) {
|
@@ -4775,12 +4802,12 @@ var q = /*#__PURE__*/function () {
|
|
4775
4802
|
}
|
4776
4803
|
throw Error(k.INVALID_RESPONSE(o, "server", !!e.deepChat.responseInterceptor, a));
|
4777
4804
|
case 8:
|
4778
|
-
if (!
|
4805
|
+
if (!A.isSimulation(e.stream)) {
|
4779
4806
|
_context12.next = 13;
|
4780
4807
|
break;
|
4781
4808
|
}
|
4782
4809
|
l = q.stream.bind(_this8, e, i, s), c = s[o.role || y.AI_ROLE];
|
4783
|
-
|
4810
|
+
A.upsertWFiles(i, l, c, a);
|
4784
4811
|
_context12.next = 17;
|
4785
4812
|
break;
|
4786
4813
|
case 13:
|
@@ -4810,7 +4837,7 @@ var q = /*#__PURE__*/function () {
|
|
4810
4837
|
}, _callee12, null, [[1, 19]]);
|
4811
4838
|
}));
|
4812
4839
|
return function (_x31) {
|
4813
|
-
return
|
4840
|
+
return _ref0.apply(this, arguments);
|
4814
4841
|
};
|
4815
4842
|
}(), t.onclose = function () {
|
4816
4843
|
console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.stream && e.streamHandlers.abortStream.abort(), q.createConnection(e, i);
|
@@ -4902,8 +4929,8 @@ var q = /*#__PURE__*/function () {
|
|
4902
4929
|
var _i$o;
|
4903
4930
|
var o = s.role || y.AI_ROLE,
|
4904
4931
|
a = i[o];
|
4905
|
-
s.text === r || s.html === r ? (a == null || a.finaliseStreamedMessage(), delete i[o]) : ((_i$o = i[o]) !== null && _i$o !== void 0 ? _i$o : i[o] = new
|
4906
|
-
} else
|
4932
|
+
s.text === r || s.html === r ? (a == null || a.finaliseStreamedMessage(), delete i[o]) : ((_i$o = i[o]) !== null && _i$o !== void 0 ? _i$o : i[o] = new Ae(t, e.stream), i[o].upsertStreamedMessage(s));
|
4933
|
+
} else A.simulate(t, e.streamHandlers, s);
|
4907
4934
|
}
|
4908
4935
|
}]);
|
4909
4936
|
}();
|
@@ -4921,7 +4948,7 @@ var ve = /*#__PURE__*/function () {
|
|
4921
4948
|
case 0:
|
4922
4949
|
s = !0;
|
4923
4950
|
r = /*#__PURE__*/function () {
|
4924
|
-
var
|
4951
|
+
var _ref1 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(c) {
|
4925
4952
|
var d, u, h;
|
4926
4953
|
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
4927
4954
|
while (1) switch (_context14.prev = _context14.next) {
|
@@ -4944,7 +4971,7 @@ var ve = /*#__PURE__*/function () {
|
|
4944
4971
|
u = Array.isArray(d) ? d : [d], h = u.find(function (f) {
|
4945
4972
|
return typeof f.error == "string";
|
4946
4973
|
});
|
4947
|
-
h ? (console.error(h.error), i.addNewErrorMessage("service", h.error), e.completionsHandlers.onFinish()) :
|
4974
|
+
h ? (console.error(h.error), i.addNewErrorMessage("service", h.error), e.completionsHandlers.onFinish()) : A.isSimulatable(e.stream, d) ? A.simulate(i, e.streamHandlers, d) : (u.forEach(function (f) {
|
4948
4975
|
return i.addNewMessage(f);
|
4949
4976
|
}), e.completionsHandlers.onFinish());
|
4950
4977
|
}
|
@@ -4955,7 +4982,7 @@ var ve = /*#__PURE__*/function () {
|
|
4955
4982
|
}, _callee14);
|
4956
4983
|
}));
|
4957
4984
|
return function r(_x38) {
|
4958
|
-
return
|
4985
|
+
return _ref1.apply(this, arguments);
|
4959
4986
|
};
|
4960
4987
|
}(), o = ve.generateOptionalSignals();
|
4961
4988
|
(l = (a = e.connectSettings).handler) == null || l.call(a, t, _objectSpread(_objectSpread({}, o), {}, {
|
@@ -4989,7 +5016,7 @@ var ve = /*#__PURE__*/function () {
|
|
4989
5016
|
var u, h;
|
4990
5017
|
var s = !0,
|
4991
5018
|
r = !1;
|
4992
|
-
var o = new
|
5019
|
+
var o = new Ae(i, e.stream),
|
4993
5020
|
a = function a() {
|
4994
5021
|
r || !s || (e.streamHandlers.onOpen(), r = !0);
|
4995
5022
|
},
|
@@ -4997,7 +5024,7 @@ var ve = /*#__PURE__*/function () {
|
|
4997
5024
|
s && (ve.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), s = !1);
|
4998
5025
|
},
|
4999
5026
|
c = /*#__PURE__*/function () {
|
5000
|
-
var
|
5027
|
+
var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(f) {
|
5001
5028
|
var m, p;
|
5002
5029
|
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
5003
5030
|
while (1) switch (_context16.prev = _context16.next) {
|
@@ -5015,7 +5042,7 @@ var ve = /*#__PURE__*/function () {
|
|
5015
5042
|
});
|
5016
5043
|
case 4:
|
5017
5044
|
m = _context16.sent;
|
5018
|
-
if (m) m.error ? (ve.streamError(m.error, o, e, i), s = !1) :
|
5045
|
+
if (m) m.error ? (ve.streamError(m.error, o, e, i), s = !1) : A.upsertWFiles(i, o.upsertStreamedMessage.bind(o), o, m);else {
|
5019
5046
|
p = k.INVALID_RESPONSE(f, "server", !!e.deepChat.responseInterceptor, m);
|
5020
5047
|
ve.streamError(p, o, e, i), s = !1;
|
5021
5048
|
}
|
@@ -5026,7 +5053,7 @@ var ve = /*#__PURE__*/function () {
|
|
5026
5053
|
}, _callee16);
|
5027
5054
|
}));
|
5028
5055
|
return function c(_x39) {
|
5029
|
-
return
|
5056
|
+
return _ref10.apply(this, arguments);
|
5030
5057
|
};
|
5031
5058
|
}();
|
5032
5059
|
e.streamHandlers.abortStream.abort = function () {
|
@@ -5066,7 +5093,7 @@ var ve = /*#__PURE__*/function () {
|
|
5066
5093
|
i.isOpen = !1;
|
5067
5094
|
},
|
5068
5095
|
o = /*#__PURE__*/function () {
|
5069
|
-
var
|
5096
|
+
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17(d) {
|
5070
5097
|
var u, h, f, m, p, g;
|
5071
5098
|
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
5072
5099
|
while (1) switch (_context17.prev = _context17.next) {
|
@@ -5088,9 +5115,9 @@ var ve = /*#__PURE__*/function () {
|
|
5088
5115
|
h = Array.isArray(u) ? u : [u], f = h.find(function (m) {
|
5089
5116
|
return typeof m.error == "string";
|
5090
5117
|
});
|
5091
|
-
if (f) console.error(f.error), t.isLastMessageError() || t.addNewErrorMessage("service", f.error);else if (
|
5118
|
+
if (f) console.error(f.error), t.isLastMessageError() || t.addNewErrorMessage("service", f.error);else if (A.isSimulation(e.stream)) {
|
5092
5119
|
m = u, p = q.stream.bind(_this9, e, t, i.roleToStream), g = i.roleToStream[m.role || y.AI_ROLE];
|
5093
|
-
|
5120
|
+
A.upsertWFiles(t, p, g, m);
|
5094
5121
|
} else h.forEach(function (m) {
|
5095
5122
|
return t.addNewMessage(m);
|
5096
5123
|
});
|
@@ -5102,7 +5129,7 @@ var ve = /*#__PURE__*/function () {
|
|
5102
5129
|
}, _callee17);
|
5103
5130
|
}));
|
5104
5131
|
return function o(_x40) {
|
5105
|
-
return
|
5132
|
+
return _ref11.apply(this, arguments);
|
5106
5133
|
};
|
5107
5134
|
}(),
|
5108
5135
|
a = ve.generateOptionalSignals();
|
@@ -5192,7 +5219,7 @@ var R = /*#__PURE__*/function () {
|
|
5192
5219
|
}).then(function (p) {
|
5193
5220
|
return E.processResponseByType(p);
|
5194
5221
|
}).then(/*#__PURE__*/function () {
|
5195
|
-
var
|
5222
|
+
var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18(p) {
|
5196
5223
|
var M, Y, g, b;
|
5197
5224
|
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
5198
5225
|
while (1) switch (_context18.prev = _context18.next) {
|
@@ -5230,7 +5257,7 @@ var R = /*#__PURE__*/function () {
|
|
5230
5257
|
}
|
5231
5258
|
throw Error(k.INVALID_RESPONSE(p, "response", !!e.deepChat.responseInterceptor, g));
|
5232
5259
|
case 15:
|
5233
|
-
b.makingAnotherRequest || (
|
5260
|
+
b.makingAnotherRequest || (A.isSimulatable(e.stream, b) ? A.simulate(i, e.streamHandlers, b) : ((Array.isArray(b) ? b : [b]).forEach(function (ae) {
|
5234
5261
|
return i.addNewMessage(ae);
|
5235
5262
|
}), c()));
|
5236
5263
|
case 16:
|
@@ -5240,7 +5267,7 @@ var R = /*#__PURE__*/function () {
|
|
5240
5267
|
}, _callee18);
|
5241
5268
|
}));
|
5242
5269
|
return function (_x44) {
|
5243
|
-
return
|
5270
|
+
return _ref12.apply(this, arguments);
|
5244
5271
|
};
|
5245
5272
|
}())["catch"](function (p) {
|
5246
5273
|
E.displayError(i, p), c();
|
@@ -5263,7 +5290,7 @@ var R = /*#__PURE__*/function () {
|
|
5263
5290
|
fetch(t, i).then(function (o) {
|
5264
5291
|
return o.json();
|
5265
5292
|
}).then(/*#__PURE__*/function () {
|
5266
|
-
var
|
5293
|
+
var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20(o) {
|
5267
5294
|
var l, c, a;
|
5268
5295
|
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
5269
5296
|
while (1) switch (_context20.prev = _context20.next) {
|
@@ -5292,7 +5319,7 @@ var R = /*#__PURE__*/function () {
|
|
5292
5319
|
a = _context20.sent;
|
5293
5320
|
a.timeoutMS ? setTimeout(function () {
|
5294
5321
|
R.executePollRequest(e, t, i, s);
|
5295
|
-
}, a.timeoutMS) :
|
5322
|
+
}, a.timeoutMS) : A.isSimulatable(e.stream, a) ? A.simulate(s, e.streamHandlers, a) : (s.addNewMessage(a), r());
|
5296
5323
|
case 13:
|
5297
5324
|
case "end":
|
5298
5325
|
return _context20.stop();
|
@@ -5300,7 +5327,7 @@ var R = /*#__PURE__*/function () {
|
|
5300
5327
|
}, _callee20);
|
5301
5328
|
}));
|
5302
5329
|
return function (_x45) {
|
5303
|
-
return
|
5330
|
+
return _ref13.apply(this, arguments);
|
5304
5331
|
};
|
5305
5332
|
}())["catch"](function (o) {
|
5306
5333
|
E.displayError(s, o), r();
|
@@ -5559,12 +5586,12 @@ var ze = /*#__PURE__*/function () {
|
|
5559
5586
|
key: "setupInitialHistory",
|
5560
5587
|
value: function () {
|
5561
5588
|
var _setupInitialHistory = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee26(e) {
|
5562
|
-
var t;
|
5589
|
+
var i, t;
|
5563
5590
|
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
5564
5591
|
while (1) switch (_context26.prev = _context26.next) {
|
5565
5592
|
case 0:
|
5566
5593
|
e.loadHistory && this.loadInitialHistory(e.loadHistory);
|
5567
|
-
t = e.history || te.processHistory(e);
|
5594
|
+
t = e.history || te.processHistory(e) || ((i = this._messages.browserStorage) == null ? void 0 : i.get());
|
5568
5595
|
t && (this.populateInitialHistory(t), this._index += 1);
|
5569
5596
|
case 3:
|
5570
5597
|
case "end":
|
@@ -5769,7 +5796,7 @@ var rt = /*#__PURE__*/function () {
|
|
5769
5796
|
while (1) switch (_context27.prev = _context27.next) {
|
5770
5797
|
case 0:
|
5771
5798
|
i = _args27.length > 2 && _args27[2] !== undefined ? _args27[2] : !0;
|
5772
|
-
return _context27.abrupt("return", this.stream && !
|
5799
|
+
return _context27.abrupt("return", this.stream && !A.isSimulation(this.stream) ? A.request(this, e, t, i) : R.request(this, e, t, i));
|
5773
5800
|
case 2:
|
5774
5801
|
case "end":
|
5775
5802
|
return _context27.stop();
|
@@ -5868,9 +5895,9 @@ var rt = /*#__PURE__*/function () {
|
|
5868
5895
|
}
|
5869
5896
|
throw new Error("Request settings have not been set up");
|
5870
5897
|
case 2:
|
5871
|
-
i = yt.processMessages(t.messageToElements.map(function (
|
5872
|
-
var
|
5873
|
-
s =
|
5898
|
+
i = yt.processMessages(t.messageToElements.map(function (_ref15) {
|
5899
|
+
var _ref16 = _slicedToArray(_ref15, 1),
|
5900
|
+
s = _ref16[0];
|
5874
5901
|
return s;
|
5875
5902
|
}), this.maxMessages, this.totalMessagesMaxCharLength);
|
5876
5903
|
if (this.connectSettings.websocket && (!this.connectSettings.handler || this.connectSettings.url !== ye.URL)) {
|
@@ -6069,8 +6096,8 @@ var Ie = /*#__PURE__*/function (_HTMLElement) {
|
|
6069
6096
|
}(/*#__PURE__*/_wrapNativeSuper(HTMLElement));
|
6070
6097
|
Ie._attributes_ = {}, Ie._attributeToProperty_ = {};
|
6071
6098
|
var rs = Ie;
|
6072
|
-
var
|
6073
|
-
|
6099
|
+
var jo = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path d=\"\n\t\t\tM669.727,273.516c-22.891-2.476-46.15-3.895-69.727-4.248c-103.025,0.457-209.823,25.517-310.913,73.536\n\t\t\tc-75.058,37.122-148.173,89.529-211.67,154.174C46.232,529.978,6.431,577.76,0,628.74c0.76,44.162,48.153,98.67,77.417,131.764\n\t\t\tc59.543,62.106,130.754,113.013,211.67,154.174c2.75,1.335,5.51,2.654,8.276,3.955l-75.072,131.102l102.005,60.286l551.416-960.033\n\t\t\tl-98.186-60.008L669.727,273.516z M902.563,338.995l-74.927,129.857c34.47,44.782,54.932,100.006,54.932,159.888\n\t\t\tc0,149.257-126.522,270.264-282.642,270.264c-6.749,0-13.29-0.728-19.922-1.172l-49.585,85.84c22.868,2.449,45.99,4.233,69.58,4.541\n\t\t\tc103.123-0.463,209.861-25.812,310.84-73.535c75.058-37.122,148.246-89.529,211.743-154.174\n\t\t\tc31.186-32.999,70.985-80.782,77.417-131.764c-0.76-44.161-48.153-98.669-77.417-131.763\n\t\t\tc-59.543-62.106-130.827-113.013-211.743-154.175C908.108,341.478,905.312,340.287,902.563,338.995L902.563,338.995z\n\t\t\tM599.927,358.478c6.846,0,13.638,0.274,20.361,0.732l-58.081,100.561c-81.514,16.526-142.676,85.88-142.676,168.897\n\t\t\tc0,20.854,3.841,40.819,10.913,59.325c0.008,0.021-0.008,0.053,0,0.074l-58.228,100.854\n\t\t\tc-34.551-44.823-54.932-100.229-54.932-160.182C317.285,479.484,443.808,358.477,599.927,358.478L599.927,358.478z M768.896,570.513\n\t\t\tL638.013,797.271c81.076-16.837,141.797-85.875,141.797-168.603C779.81,608.194,775.724,588.729,768.896,570.513L768.896,570.513z\"\n\t\t\t/>\n</svg>\n",
|
6100
|
+
Ho = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path id=\"path6686\" inkscape:connector-curvature=\"0\" d=\"M779.843,599.925c0,95.331-80.664,172.612-180.169,172.612\n\t\t\tc-99.504,0-180.168-77.281-180.168-172.612c0-95.332,80.664-172.612,180.168-172.612\n\t\t\tC699.179,427.312,779.843,504.594,779.843,599.925z M600,240.521c-103.025,0.457-209.814,25.538-310.904,73.557\n\t\t\tc-75.058,37.122-148.206,89.496-211.702,154.141C46.208,501.218,6.431,549,0,599.981c0.76,44.161,48.13,98.669,77.394,131.763\n\t\t\tc59.543,62.106,130.786,113.018,211.702,154.179c94.271,45.751,198.616,72.092,310.904,73.557\n\t\t\tc103.123-0.464,209.888-25.834,310.866-73.557c75.058-37.122,148.243-89.534,211.74-154.179\n\t\t\tc31.185-32.999,70.962-80.782,77.394-131.763c-0.76-44.161-48.13-98.671-77.394-131.764\n\t\t\tc-59.543-62.106-130.824-112.979-211.74-154.141C816.644,268.36,712.042,242.2,600,240.521z M599.924,329.769\n\t\t\tc156.119,0,282.675,120.994,282.675,270.251c0,149.256-126.556,270.25-282.675,270.25S317.249,749.275,317.249,600.02\n\t\t\tC317.249,450.763,443.805,329.769,599.924,329.769L599.924,329.769z\"/>\n</svg>\n";
|
6074
6101
|
var Ue = /*#__PURE__*/function () {
|
6075
6102
|
function Ue() {
|
6076
6103
|
_classCallCheck(this, Ue);
|
@@ -6105,9 +6132,9 @@ var Ge = /*#__PURE__*/function () {
|
|
6105
6132
|
value: function create(e) {
|
6106
6133
|
var t = document.createElement("div");
|
6107
6134
|
t.id = "visibility-icon-container";
|
6108
|
-
var i = Ge.createIconElement(
|
6135
|
+
var i = Ge.createIconElement(Ho, Ge.VISIBLE_ICON_ID);
|
6109
6136
|
i.style.display = "none", t.appendChild(i);
|
6110
|
-
var s = Ge.createIconElement(
|
6137
|
+
var s = Ge.createIconElement(jo, "not-visible-icon");
|
6111
6138
|
return t.appendChild(s), t.onclick = Ge.changeVisibility.bind(this, e, i, s), t;
|
6112
6139
|
}
|
6113
6140
|
}]);
|
@@ -6724,10 +6751,10 @@ var Xs = {
|
|
6724
6751
|
this.streamHandlers.abortStream.abort = function () {
|
6725
6752
|
i.interruptGenerate();
|
6726
6753
|
}, this.streamHandlers.onOpen();
|
6727
|
-
s = new
|
6754
|
+
s = new Ae(e);
|
6728
6755
|
_context39.next = 4;
|
6729
6756
|
return i.generate(t, /*#__PURE__*/function () {
|
6730
|
-
var
|
6757
|
+
var _ref17 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee38(r, o) {
|
6731
6758
|
var a;
|
6732
6759
|
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
|
6733
6760
|
while (1) switch (_context38.prev = _context38.next) {
|
@@ -6749,7 +6776,7 @@ var Xs = {
|
|
6749
6776
|
}, _callee38);
|
6750
6777
|
}));
|
6751
6778
|
return function (_x77, _x78) {
|
6752
|
-
return
|
6779
|
+
return _ref17.apply(this, arguments);
|
6753
6780
|
};
|
6754
6781
|
}());
|
6755
6782
|
case 4:
|
@@ -7117,19 +7144,19 @@ var ci = /*#__PURE__*/function (_je) {
|
|
7117
7144
|
}
|
7118
7145
|
}]);
|
7119
7146
|
}(je);
|
7120
|
-
var
|
7147
|
+
var qo = /*#__PURE__*/function (_ci) {
|
7121
7148
|
// prettier-ignore
|
7122
|
-
function
|
7123
|
-
_classCallCheck(this,
|
7149
|
+
function qo(e) {
|
7150
|
+
_classCallCheck(this, qo);
|
7124
7151
|
var s, r, o;
|
7125
7152
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.audioClassification,
|
7126
7153
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7127
|
-
return _callSuper(this,
|
7154
|
+
return _callSuper(this, qo, [e, "Attach an audio file", "ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition", t, i, {
|
7128
7155
|
audio: {}
|
7129
7156
|
}]);
|
7130
7157
|
}
|
7131
|
-
_inherits(
|
7132
|
-
return _createClass(
|
7158
|
+
_inherits(qo, _ci);
|
7159
|
+
return _createClass(qo, [{
|
7133
7160
|
key: "extractPollResultData",
|
7134
7161
|
value: function () {
|
7135
7162
|
var _extractPollResultData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee46(e) {
|
@@ -7167,18 +7194,18 @@ var Ho = /*#__PURE__*/function (_ci) {
|
|
7167
7194
|
}()
|
7168
7195
|
}]);
|
7169
7196
|
}(ci);
|
7170
|
-
var
|
7171
|
-
function
|
7172
|
-
_classCallCheck(this,
|
7197
|
+
var zo = /*#__PURE__*/function (_ci2) {
|
7198
|
+
function zo(e) {
|
7199
|
+
_classCallCheck(this, zo);
|
7173
7200
|
var s, r, o;
|
7174
7201
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.imageClassification,
|
7175
7202
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7176
|
-
return _callSuper(this,
|
7203
|
+
return _callSuper(this, zo, [e, "Attach an image file", "google/vit-base-patch16-224", t, i, {
|
7177
7204
|
images: {}
|
7178
7205
|
}]);
|
7179
7206
|
}
|
7180
|
-
_inherits(
|
7181
|
-
return _createClass(
|
7207
|
+
_inherits(zo, _ci2);
|
7208
|
+
return _createClass(zo, [{
|
7182
7209
|
key: "extractPollResultData",
|
7183
7210
|
value: function () {
|
7184
7211
|
var _extractPollResultData2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee47(e) {
|
@@ -7257,10 +7284,10 @@ var zi = /*#__PURE__*/function (_K2) {
|
|
7257
7284
|
_inherits(zi, _K2);
|
7258
7285
|
return _createClass(zi);
|
7259
7286
|
}(K);
|
7260
|
-
var
|
7261
|
-
function
|
7287
|
+
var wi = /*#__PURE__*/function (_zi) {
|
7288
|
+
function wi(e) {
|
7262
7289
|
var _this24;
|
7263
|
-
_classCallCheck(this,
|
7290
|
+
_classCallCheck(this, wi);
|
7264
7291
|
var o;
|
7265
7292
|
var t = JSON.parse(JSON.stringify(e.directConnection)),
|
7266
7293
|
i = t == null ? void 0 : t.stabilityAI,
|
@@ -7272,13 +7299,13 @@ var Ai = /*#__PURE__*/function (_zi) {
|
|
7272
7299
|
}
|
7273
7300
|
}
|
7274
7301
|
};
|
7275
|
-
_this24 = _callSuper(this,
|
7302
|
+
_this24 = _callSuper(this, wi, [e, Ce.buildKeyVerificationDetails(), Ce.buildHeaders, i, s]), _this24.url = "https://api.stability.ai/v1/generation/esrgan-v1-x2plus/image-to-image/upscale", _this24.textInputPlaceholderText = "Describe image changes", _this24.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Upscale</b></div>\n <p>Upload an image to generate a new one with higher resolution.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
|
7276
7303
|
var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageUpscale;
|
7277
|
-
_typeof(r) == "object" && (r.engine_id && (_this24.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/upscale")),
|
7304
|
+
_typeof(r) == "object" && (r.engine_id && (_this24.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/upscale")), wi.cleanConfig(r), Object.assign(_this24.rawBody, r)), _this24.canSendMessage = wi.canSendFileMessage;
|
7278
7305
|
return _this24;
|
7279
7306
|
}
|
7280
|
-
_inherits(
|
7281
|
-
return _createClass(
|
7307
|
+
_inherits(wi, _zi);
|
7308
|
+
return _createClass(wi, [{
|
7282
7309
|
key: "createFormDataBody",
|
7283
7310
|
value: function createFormDataBody(e, t) {
|
7284
7311
|
var i = new FormData();
|
@@ -7364,10 +7391,10 @@ var Ai = /*#__PURE__*/function (_zi) {
|
|
7364
7391
|
}
|
7365
7392
|
}]);
|
7366
7393
|
}(zi);
|
7367
|
-
var
|
7368
|
-
function
|
7394
|
+
var Ai = /*#__PURE__*/function (_zi2) {
|
7395
|
+
function Ai(e) {
|
7369
7396
|
var _this25;
|
7370
|
-
_classCallCheck(this,
|
7397
|
+
_classCallCheck(this, Ai);
|
7371
7398
|
var o;
|
7372
7399
|
var t = JSON.parse(JSON.stringify(e.directConnection)),
|
7373
7400
|
i = t == null ? void 0 : t.stabilityAI,
|
@@ -7379,13 +7406,13 @@ var wi = /*#__PURE__*/function (_zi2) {
|
|
7379
7406
|
}
|
7380
7407
|
}
|
7381
7408
|
};
|
7382
|
-
_this25 = _callSuper(this,
|
7409
|
+
_this25 = _callSuper(this, Ai, [e, Ce.buildKeyVerificationDetails(), Ce.buildHeaders, i, s]), _this25.url = "https://api.stability.ai/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image/masking", _this25._maskSource = "MASK_IMAGE_WHITE", _this25.textInputPlaceholderText = "Describe image changes", _this25.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Masking</b></div>\n <p>Upload an image, its mask image to create a new one based on the changes you have described for the mask area.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
|
7383
7410
|
var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageMasking;
|
7384
|
-
_typeof(r) == "object" && (r.engine_id && (_this25.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/masking")), r.weight !== void 0 && r.weight !== null && (_this25._imageWeight = r.weight), r.mask_source !== void 0 && r.mask_source !== null && (_this25._maskSource = r.mask_source),
|
7411
|
+
_typeof(r) == "object" && (r.engine_id && (_this25.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/masking")), r.weight !== void 0 && r.weight !== null && (_this25._imageWeight = r.weight), r.mask_source !== void 0 && r.mask_source !== null && (_this25._maskSource = r.mask_source), Ai.cleanConfig(r), Object.assign(_this25.rawBody, r)), _this25.canSendMessage = Ai.canSendFileTextMessage;
|
7385
7412
|
return _this25;
|
7386
7413
|
}
|
7387
|
-
_inherits(
|
7388
|
-
return _createClass(
|
7414
|
+
_inherits(Ai, _zi2);
|
7415
|
+
return _createClass(Ai, [{
|
7389
7416
|
key: "createFormDataBody",
|
7390
7417
|
value: function createFormDataBody(e, t, i, s) {
|
7391
7418
|
var r = new FormData();
|
@@ -7471,18 +7498,18 @@ var wi = /*#__PURE__*/function (_zi2) {
|
|
7471
7498
|
}
|
7472
7499
|
}]);
|
7473
7500
|
}(zi);
|
7474
|
-
var
|
7475
|
-
function
|
7476
|
-
_classCallCheck(this,
|
7501
|
+
var Go = /*#__PURE__*/function (_ci3) {
|
7502
|
+
function Go(e) {
|
7503
|
+
_classCallCheck(this, Go);
|
7477
7504
|
var s, r, o;
|
7478
7505
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.audioSpeechRecognition,
|
7479
7506
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7480
|
-
return _callSuper(this,
|
7507
|
+
return _callSuper(this, Go, [e, "Attach an audio file", "facebook/wav2vec2-large-960h-lv60-self", t, i, {
|
7481
7508
|
audio: {}
|
7482
7509
|
}]);
|
7483
7510
|
}
|
7484
|
-
_inherits(
|
7485
|
-
return _createClass(
|
7511
|
+
_inherits(Go, _ci3);
|
7512
|
+
return _createClass(Go, [{
|
7486
7513
|
key: "extractPollResultData",
|
7487
7514
|
value: function () {
|
7488
7515
|
var _extractPollResultData3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee52(e) {
|
@@ -7519,16 +7546,16 @@ var zo = /*#__PURE__*/function (_ci3) {
|
|
7519
7546
|
}()
|
7520
7547
|
}]);
|
7521
7548
|
}(ci);
|
7522
|
-
var
|
7523
|
-
function
|
7524
|
-
_classCallCheck(this,
|
7549
|
+
var Vo = /*#__PURE__*/function (_je2) {
|
7550
|
+
function Vo(e) {
|
7551
|
+
_classCallCheck(this, Vo);
|
7525
7552
|
var s, r, o;
|
7526
7553
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.textGeneration,
|
7527
7554
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7528
|
-
return _callSuper(this,
|
7555
|
+
return _callSuper(this, Vo, [e, "Once upon a time", "gpt2", t, i]);
|
7529
7556
|
}
|
7530
|
-
_inherits(
|
7531
|
-
return _createClass(
|
7557
|
+
_inherits(Vo, _je2);
|
7558
|
+
return _createClass(Vo, [{
|
7532
7559
|
key: "extractResultData",
|
7533
7560
|
value: function () {
|
7534
7561
|
var _extractResultData4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee53(e) {
|
@@ -7558,18 +7585,18 @@ var Go = /*#__PURE__*/function (_je2) {
|
|
7558
7585
|
}()
|
7559
7586
|
}]);
|
7560
7587
|
}(je);
|
7561
|
-
var
|
7562
|
-
function
|
7588
|
+
var Ko = /*#__PURE__*/function (_je3) {
|
7589
|
+
function Ko(e) {
|
7563
7590
|
var _this26;
|
7564
|
-
_classCallCheck(this,
|
7591
|
+
_classCallCheck(this, Ko);
|
7565
7592
|
var s, r, o;
|
7566
7593
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.questionAnswer,
|
7567
7594
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7568
|
-
_this26 = _callSuper(this,
|
7595
|
+
_this26 = _callSuper(this, Ko, [e, "Ask a question", "bert-large-uncased-whole-word-masking-finetuned-squad", t, i]), _this26.permittedErrorPrefixes = ["Authorization header", "Error in"], _this26._context = t.context;
|
7569
7596
|
return _this26;
|
7570
7597
|
}
|
7571
|
-
_inherits(
|
7572
|
-
return _createClass(
|
7598
|
+
_inherits(Ko, _je3);
|
7599
|
+
return _createClass(Ko, [{
|
7573
7600
|
key: "preprocessBody",
|
7574
7601
|
value: function preprocessBody(e, t) {
|
7575
7602
|
var i = t[t.length - 1].text;
|
@@ -7612,16 +7639,16 @@ var Vo = /*#__PURE__*/function (_je3) {
|
|
7612
7639
|
}()
|
7613
7640
|
}]);
|
7614
7641
|
}(je);
|
7615
|
-
var
|
7616
|
-
function
|
7617
|
-
_classCallCheck(this,
|
7642
|
+
var Wo = /*#__PURE__*/function (_je4) {
|
7643
|
+
function Wo(e) {
|
7644
|
+
_classCallCheck(this, Wo);
|
7618
7645
|
var s, r, o;
|
7619
7646
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.summarization,
|
7620
7647
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7621
|
-
return _callSuper(this,
|
7648
|
+
return _callSuper(this, Wo, [e, "Insert text to summarize", "facebook/bart-large-cnn", t, i]);
|
7622
7649
|
}
|
7623
|
-
_inherits(
|
7624
|
-
return _createClass(
|
7650
|
+
_inherits(Wo, _je4);
|
7651
|
+
return _createClass(Wo, [{
|
7625
7652
|
key: "extractResultData",
|
7626
7653
|
value: function () {
|
7627
7654
|
var _extractResultData6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee55(e) {
|
@@ -7651,20 +7678,20 @@ var Ko = /*#__PURE__*/function (_je4) {
|
|
7651
7678
|
}()
|
7652
7679
|
}]);
|
7653
7680
|
}(je);
|
7654
|
-
var
|
7655
|
-
function
|
7681
|
+
var $o = /*#__PURE__*/function (_je5) {
|
7682
|
+
function $o(e) {
|
7656
7683
|
var _this27$maxMessages;
|
7657
7684
|
var _this27;
|
7658
|
-
_classCallCheck(this,
|
7685
|
+
_classCallCheck(this, $o);
|
7659
7686
|
var s, r, o;
|
7660
7687
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.conversation,
|
7661
7688
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7662
|
-
_this27 = _callSuper(this,
|
7689
|
+
_this27 = _callSuper(this, $o, [e, "Ask me anything!", "facebook/blenderbot-400M-distill", t, i]), (_this27$maxMessages = _this27.maxMessages) !== null && _this27$maxMessages !== void 0 ? _this27$maxMessages : _this27.maxMessages = -1;
|
7663
7690
|
return _this27;
|
7664
7691
|
}
|
7665
7692
|
// prettier-ignore
|
7666
|
-
_inherits(
|
7667
|
-
return _createClass(
|
7693
|
+
_inherits($o, _je5);
|
7694
|
+
return _createClass($o, [{
|
7668
7695
|
key: "processMessages",
|
7669
7696
|
value: function processMessages(e) {
|
7670
7697
|
var t = e.filter(function (a) {
|
@@ -7840,16 +7867,16 @@ var Ti = /*#__PURE__*/function (_zi3) {
|
|
7840
7867
|
}
|
7841
7868
|
}]);
|
7842
7869
|
}(zi);
|
7843
|
-
var
|
7844
|
-
function
|
7845
|
-
_classCallCheck(this,
|
7870
|
+
var Jo = /*#__PURE__*/function (_je6) {
|
7871
|
+
function Jo(e) {
|
7872
|
+
_classCallCheck(this, Jo);
|
7846
7873
|
var s, r, o;
|
7847
7874
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.translation,
|
7848
7875
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7849
|
-
return _callSuper(this,
|
7876
|
+
return _callSuper(this, Jo, [e, "Insert text to translate", "Helsinki-NLP/opus-tatoeba-en-ja", t, i]);
|
7850
7877
|
}
|
7851
|
-
_inherits(
|
7852
|
-
return _createClass(
|
7878
|
+
_inherits(Jo, _je6);
|
7879
|
+
return _createClass(Jo, [{
|
7853
7880
|
key: "extractResultData",
|
7854
7881
|
value: function () {
|
7855
7882
|
var _extractResultData9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee59(e) {
|
@@ -7972,18 +7999,18 @@ var Ci = /*#__PURE__*/function (_zi4) {
|
|
7972
7999
|
}
|
7973
8000
|
}]);
|
7974
8001
|
}(zi);
|
7975
|
-
var
|
7976
|
-
function
|
8002
|
+
var Xo = /*#__PURE__*/function (_je7) {
|
8003
|
+
function Xo(e) {
|
7977
8004
|
var _this30;
|
7978
|
-
_classCallCheck(this,
|
8005
|
+
_classCallCheck(this, Xo);
|
7979
8006
|
var s, r, o;
|
7980
8007
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.fillMask,
|
7981
8008
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7982
|
-
_this30 = _callSuper(this,
|
8009
|
+
_this30 = _callSuper(this, Xo, [e, "The goal of life is [MASK].", "bert-base-uncased", t, i]), _this30.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Hugging Face</b></div>\n <p>Insert a sentence with the word [MASK] and the model will try to fill it for you. E.g. I want [MASK].</p>\n <p>First message may take an extented amount of time to complete as the model needs to be initialized.</p>", _this30.permittedErrorPrefixes = ["Authorization header", "No mask_token"];
|
7983
8010
|
return _this30;
|
7984
8011
|
}
|
7985
|
-
_inherits(
|
7986
|
-
return _createClass(
|
8012
|
+
_inherits(Xo, _je7);
|
8013
|
+
return _createClass(Xo, [{
|
7987
8014
|
key: "extractResultData",
|
7988
8015
|
value: function () {
|
7989
8016
|
var _extractResultData1 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee62(e) {
|
@@ -8105,7 +8132,7 @@ var ne = /*#__PURE__*/function () {
|
|
8105
8132
|
o = r[E.CONTENT_TYPE];
|
8106
8133
|
delete r[E.CONTENT_TYPE];
|
8107
8134
|
a = i.map(/*#__PURE__*/function () {
|
8108
|
-
var
|
8135
|
+
var _ref18 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee64(l) {
|
8109
8136
|
var c;
|
8110
8137
|
return _regeneratorRuntime().wrap(function _callee64$(_context64) {
|
8111
8138
|
while (1) switch (_context64.prev = _context64.next) {
|
@@ -8121,7 +8148,7 @@ var ne = /*#__PURE__*/function () {
|
|
8121
8148
|
}, _callee64);
|
8122
8149
|
}));
|
8123
8150
|
return function (_x128) {
|
8124
|
-
return
|
8151
|
+
return _ref18.apply(this, arguments);
|
8125
8152
|
};
|
8126
8153
|
}());
|
8127
8154
|
_context65.prev = 7;
|
@@ -8164,8 +8191,8 @@ var ne = /*#__PURE__*/function () {
|
|
8164
8191
|
return _regeneratorRuntime().wrap(function _callee66$(_context66) {
|
8165
8192
|
while (1) switch (_context66.prev = _context66.next) {
|
8166
8193
|
case 0:
|
8167
|
-
r = t.map(function (
|
8168
|
-
var l =
|
8194
|
+
r = t.map(function (_ref19) {
|
8195
|
+
var l = _ref19.fileId;
|
8169
8196
|
return e.url = "".concat(i).concat(l).concat(s), new Promise(function (c) {
|
8170
8197
|
c(L.directFetch(e, void 0, "GET", !1));
|
8171
8198
|
});
|
@@ -8315,7 +8342,7 @@ var ne = /*#__PURE__*/function () {
|
|
8315
8342
|
value: function parseMessages(e, t, i) {
|
8316
8343
|
var s = [];
|
8317
8344
|
return t.forEach(/*#__PURE__*/function () {
|
8318
|
-
var
|
8345
|
+
var _ref20 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee70(r) {
|
8319
8346
|
return _regeneratorRuntime().wrap(function _callee70$(_context70) {
|
8320
8347
|
while (1) switch (_context70.prev = _context70.next) {
|
8321
8348
|
case 0:
|
@@ -8324,7 +8351,7 @@ var ne = /*#__PURE__*/function () {
|
|
8324
8351
|
}).sort(function (o) {
|
8325
8352
|
return o.text ? -1 : o.image_file ? 1 : 0;
|
8326
8353
|
}).forEach(/*#__PURE__*/function () {
|
8327
|
-
var
|
8354
|
+
var _ref21 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee69(o) {
|
8328
8355
|
return _regeneratorRuntime().wrap(function _callee69$(_context69) {
|
8329
8356
|
while (1) switch (_context69.prev = _context69.next) {
|
8330
8357
|
case 0:
|
@@ -8336,7 +8363,7 @@ var ne = /*#__PURE__*/function () {
|
|
8336
8363
|
}, _callee69);
|
8337
8364
|
}));
|
8338
8365
|
return function (_x143) {
|
8339
|
-
return
|
8366
|
+
return _ref21.apply(this, arguments);
|
8340
8367
|
};
|
8341
8368
|
}());
|
8342
8369
|
case 1:
|
@@ -8346,7 +8373,7 @@ var ne = /*#__PURE__*/function () {
|
|
8346
8373
|
}, _callee70);
|
8347
8374
|
}));
|
8348
8375
|
return function (_x142) {
|
8349
|
-
return
|
8376
|
+
return _ref20.apply(this, arguments);
|
8350
8377
|
};
|
8351
8378
|
}()), Promise.all(s);
|
8352
8379
|
}
|
@@ -8459,16 +8486,16 @@ var Ve = /*#__PURE__*/function (_K3) {
|
|
8459
8486
|
if (t && t.length > 0) {
|
8460
8487
|
var r = this.filesToolType;
|
8461
8488
|
if (typeof this.filesToolType == "function") {
|
8462
|
-
var a = this.filesToolType(t.map(function (
|
8463
|
-
var l =
|
8489
|
+
var a = this.filesToolType(t.map(function (_ref22) {
|
8490
|
+
var l = _ref22.name;
|
8464
8491
|
return l;
|
8465
8492
|
}));
|
8466
8493
|
a === "code_interpreter" || a === "file_search" || a === "images" ? r = a : (console.error("Tool type \"".concat(a, "\" is not valid")), console.error('Expected "code_interpreter" or "file_search" or "images". Going to default to "images"'));
|
8467
8494
|
}
|
8468
8495
|
if (r === "file_search") return Ve.processAttachmentsMessage(s, t, "file_search");
|
8469
8496
|
if (r === "code_interpreter") return Ve.processAttachmentsMessage(s, t, "code_interpreter");
|
8470
|
-
if (t.find(function (
|
8471
|
-
var a =
|
8497
|
+
if (t.find(function (_ref23) {
|
8498
|
+
var a = _ref23.name;
|
8472
8499
|
return !H.isImageFileExtension(a);
|
8473
8500
|
})) console.error("The uploaded files contained a non-image file"), console.error('Make sure only images can be uploaded or define a "code_interpreter" or "file_search" value in the "files_tool_type" property'), console.warn('Make sure your existing assistant supports these "tools" or specify them in the "new_assistant" property');else {
|
8474
8501
|
var _a3 = Ve.processImageMessage(s, t);
|
@@ -8597,9 +8624,9 @@ var Ve = /*#__PURE__*/function (_K3) {
|
|
8597
8624
|
}, {
|
8598
8625
|
key: "searchPreviousMessagesForThreadId",
|
8599
8626
|
value: function searchPreviousMessagesForThreadId(e) {
|
8600
|
-
var t = e.find(function (
|
8601
|
-
var
|
8602
|
-
i =
|
8627
|
+
var t = e.find(function (_ref24) {
|
8628
|
+
var _ref25 = _slicedToArray(_ref24, 1),
|
8629
|
+
i = _ref25[0];
|
8603
8630
|
return i._sessionId;
|
8604
8631
|
});
|
8605
8632
|
t && (this.sessionId = t[0]._sessionId), this._searchedForThreadId = !0;
|
@@ -8989,7 +9016,7 @@ var Ve = /*#__PURE__*/function (_K3) {
|
|
8989
9016
|
e.stream = !0;
|
8990
9017
|
this._waitingForStreamResponse = !0;
|
8991
9018
|
_context83.next = 4;
|
8992
|
-
return
|
9019
|
+
return A.request(this, e, this._messages, !0, !0);
|
8993
9020
|
case 4:
|
8994
9021
|
this._messageStream = _context83.sent;
|
8995
9022
|
case 5:
|
@@ -9058,9 +9085,9 @@ var xs = /*#__PURE__*/function (_Ri) {
|
|
9058
9085
|
s = (o = t.openAI) == null ? void 0 : o.assistant,
|
9059
9086
|
r = xs.buildUrlSegments(s);
|
9060
9087
|
if (_this34 = _callSuper(this, xs, [e, s, r, L.buildKeyVerificationDetails(), L.buildHeaders, i]), (_a$headers = (a = _this34.connectSettings).headers) !== null && _a$headers !== void 0 ? _a$headers : a.headers = {}, (_l$OpenAIBeta = (l = _this34.connectSettings.headers)["OpenAI-Beta"]) !== null && _l$OpenAIBeta !== void 0 ? _l$OpenAIBeta : l["OpenAI-Beta"] = "assistants=v2", _this34.shouldFetchHistory && _this34.sessionId && (_this34.fetchHistory = _this34.fetchHistoryFunc.bind(_assertThisInitialized(_this34))), _typeof(s) == "object") {
|
9061
|
-
var
|
9062
|
-
u =
|
9063
|
-
h =
|
9088
|
+
var _ref26 = (d = (c = e.directConnection) == null ? void 0 : c.openAI) == null ? void 0 : d.assistant,
|
9089
|
+
u = _ref26.function_handler,
|
9090
|
+
h = _ref26.files_tool_type;
|
9064
9091
|
u && (_this34.functionHandler = u), h && (_this34.filesToolType = h);
|
9065
9092
|
}
|
9066
9093
|
return _this34;
|
@@ -9117,26 +9144,26 @@ var Mi = /*#__PURE__*/function () {
|
|
9117
9144
|
}
|
9118
9145
|
}]);
|
9119
9146
|
}();
|
9120
|
-
var
|
9121
|
-
function
|
9147
|
+
var ws = /*#__PURE__*/function (_K4) {
|
9148
|
+
function ws(e, t, i, s, r) {
|
9122
9149
|
var _this35;
|
9123
|
-
_classCallCheck(this,
|
9124
|
-
_this35 = _callSuper(this,
|
9150
|
+
_classCallCheck(this, ws);
|
9151
|
+
_this35 = _callSuper(this, ws, [e, Mi.buildKeyVerificationDetails(), Mi.buildHeaders, r]), _this35.insertKeyPlaceholderText = "Cohere API Key", _this35.keyHelpUrl = "https://dashboard.cohere.ai/api-keys", _this35.permittedErrorPrefixes = ["invalid"], _this35.url = t, _this35.textInputPlaceholderText = i, s && _typeof(s) == "object" && Object.assign(_this35.rawBody, s);
|
9125
9152
|
return _this35;
|
9126
9153
|
}
|
9127
|
-
_inherits(
|
9128
|
-
return _createClass(
|
9154
|
+
_inherits(ws, _K4);
|
9155
|
+
return _createClass(ws);
|
9129
9156
|
}(K);
|
9130
|
-
var
|
9131
|
-
function
|
9132
|
-
_classCallCheck(this,
|
9157
|
+
var Yo = /*#__PURE__*/function (_ws) {
|
9158
|
+
function Yo(e) {
|
9159
|
+
_classCallCheck(this, Yo);
|
9133
9160
|
var s, r, o;
|
9134
9161
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.cohere) == null ? void 0 : r.textGeneration,
|
9135
9162
|
i = (o = e.directConnection) == null ? void 0 : o.cohere;
|
9136
|
-
return _callSuper(this,
|
9163
|
+
return _callSuper(this, Yo, [e, "https://api.cohere.ai/v1/generate", "Once upon a time", t, i]);
|
9137
9164
|
}
|
9138
|
-
_inherits(
|
9139
|
-
return _createClass(
|
9165
|
+
_inherits(Yo, _ws);
|
9166
|
+
return _createClass(Yo, [{
|
9140
9167
|
key: "preprocessBody",
|
9141
9168
|
value: function preprocessBody(e, t) {
|
9142
9169
|
var i = JSON.parse(JSON.stringify(e)),
|
@@ -9201,7 +9228,7 @@ var Xo = /*#__PURE__*/function (_As) {
|
|
9201
9228
|
return extractResultData;
|
9202
9229
|
}()
|
9203
9230
|
}]);
|
9204
|
-
}(
|
9231
|
+
}(ws);
|
9205
9232
|
var Is = /*#__PURE__*/function () {
|
9206
9233
|
function Is() {
|
9207
9234
|
_classCallCheck(this, Is);
|
@@ -9258,9 +9285,9 @@ var mt = /*#__PURE__*/function (_Ri2) {
|
|
9258
9285
|
getFilesPostfix: "/content".concat(a)
|
9259
9286
|
};
|
9260
9287
|
if (_this36 = _callSuper(this, mt, [e, s == null ? void 0 : s.assistant, l, ue.buildKeyVerificationDetails(r), ue.buildHeaders, i]), _this36.permittedErrorPrefixes = [ue.URL_DETAILS_ERROR_MESSAGE], _this36.insertKeyPlaceholderText = "Azure OpenAI API Key", _this36.keyHelpUrl = "https://learn.microsoft.com/en-us/answers/questions/1193991/how-to-get-the-value-of-openai-api-key", _this36.isTextInputDisabled = !1, _typeof(s == null ? void 0 : s.assistant) == "object") {
|
9261
|
-
var
|
9262
|
-
b =
|
9263
|
-
M =
|
9288
|
+
var _ref27 = (p = (m = (f = e.directConnection) == null ? void 0 : f.azure) == null ? void 0 : m.openAI) == null ? void 0 : p.assistant,
|
9289
|
+
b = _ref27.function_handler,
|
9290
|
+
M = _ref27.files_tool_type;
|
9264
9291
|
b && (_this36.functionHandler = b), M && (_this36.filesToolType = M);
|
9265
9292
|
}
|
9266
9293
|
ue.validateURLDetails(r) ? (_g$headers = (g = _this36.connectSettings).headers) !== null && _g$headers !== void 0 ? _g$headers : g.headers = {} : (_this36.isTextInputDisabled = !0, _this36.canSendMessage = function () {
|
@@ -9277,16 +9304,16 @@ var mt = /*#__PURE__*/function (_Ri2) {
|
|
9277
9304
|
}(Ri);
|
9278
9305
|
mt.THREAD_RESOURCE = "threads", mt.NEW_ASSISTANT_RESOURCE = "assistants";
|
9279
9306
|
var as = mt;
|
9280
|
-
var
|
9281
|
-
function
|
9282
|
-
_classCallCheck(this,
|
9307
|
+
var Zo = /*#__PURE__*/function (_ws2) {
|
9308
|
+
function Zo(e) {
|
9309
|
+
_classCallCheck(this, Zo);
|
9283
9310
|
var s, r, o;
|
9284
9311
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.cohere) == null ? void 0 : r.summarization,
|
9285
9312
|
i = (o = e.directConnection) == null ? void 0 : o.cohere;
|
9286
|
-
return _callSuper(this,
|
9313
|
+
return _callSuper(this, Zo, [e, "https://api.cohere.ai/v1/summarize", "Insert text to summarize", t, i]);
|
9287
9314
|
}
|
9288
|
-
_inherits(
|
9289
|
-
return _createClass(
|
9315
|
+
_inherits(Zo, _ws2);
|
9316
|
+
return _createClass(Zo, [{
|
9290
9317
|
key: "preprocessBody",
|
9291
9318
|
value: function preprocessBody(e, t) {
|
9292
9319
|
var i = JSON.parse(JSON.stringify(e)),
|
@@ -9350,7 +9377,7 @@ var Yo = /*#__PURE__*/function (_As2) {
|
|
9350
9377
|
return extractResultData;
|
9351
9378
|
}()
|
9352
9379
|
}]);
|
9353
|
-
}(
|
9380
|
+
}(ws);
|
9354
9381
|
var N = /*#__PURE__*/function () {
|
9355
9382
|
function N() {
|
9356
9383
|
_classCallCheck(this, N);
|
@@ -9684,8 +9711,8 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
9684
9711
|
if (_typeof(s) == "object") {
|
9685
9712
|
_this38._avatarConfig = s.avatar, _this38._ephemeralKey = s.ephemeralKey, _this38._errorConfig = s.error, _this38._loadingConfig = s.loading, Object.assign(_this38.rawBody, s.config);
|
9686
9713
|
var c = (a = (o = e.directConnection) == null ? void 0 : o.openAI) == null ? void 0 : a.realtime,
|
9687
|
-
|
9688
|
-
d =
|
9714
|
+
_ref28 = c.config || {},
|
9715
|
+
d = _ref28.function_handler;
|
9689
9716
|
d && (_this38._functionHandler = d), _this38._events = s.events, c.methods = _this38.generateMethods();
|
9690
9717
|
}
|
9691
9718
|
(_l$model = (l = _this38.rawBody).model) !== null && _l$model !== void 0 ? _l$model : l.model = "gpt-4o-realtime-preview-2024-12-17", _this38._avatarConfig = C.buildAvatarConfig(s), _this38._buttonsConfig = C.buildButtonsConfig(s), _this38._avatarEl = C.createAvatar(_this38._avatarConfig), _this38._containerEl = _this38.createContainer(), _this38._deepChat = e;
|
@@ -10000,7 +10027,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10000
10027
|
r.fftSize = 256;
|
10001
10028
|
o = new Uint8Array(r.frequencyBinCount);
|
10002
10029
|
this._pc.ontrack = /*#__PURE__*/function () {
|
10003
|
-
var
|
10030
|
+
var _ref30 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee92(a) {
|
10004
10031
|
var l;
|
10005
10032
|
return _regeneratorRuntime().wrap(function _callee92$(_context92) {
|
10006
10033
|
while (1) switch (_context92.prev = _context92.next) {
|
@@ -10032,7 +10059,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10032
10059
|
}, _callee92);
|
10033
10060
|
}));
|
10034
10061
|
return function (_x171) {
|
10035
|
-
return
|
10062
|
+
return _ref30.apply(this, arguments);
|
10036
10063
|
};
|
10037
10064
|
}();
|
10038
10065
|
_context94.next = 10;
|
@@ -10047,7 +10074,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10047
10074
|
case 10:
|
10048
10075
|
this._dc = this._pc.createDataChannel("oai-events");
|
10049
10076
|
this._dc.addEventListener("message", /*#__PURE__*/function () {
|
10050
|
-
var
|
10077
|
+
var _ref31 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee93(a) {
|
10051
10078
|
var c, d, u, l, f, m, p;
|
10052
10079
|
return _regeneratorRuntime().wrap(function _callee93$(_context93) {
|
10053
10080
|
while (1) switch (_context93.prev = _context93.next) {
|
@@ -10093,7 +10120,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10093
10120
|
}, _callee93, null, [[9, 14]]);
|
10094
10121
|
}));
|
10095
10122
|
return function (_x172) {
|
10096
|
-
return
|
10123
|
+
return _ref31.apply(this, arguments);
|
10097
10124
|
};
|
10098
10125
|
}());
|
10099
10126
|
_context94.prev = 12;
|
@@ -10695,20 +10722,20 @@ var fe = /*#__PURE__*/function () {
|
|
10695
10722
|
}
|
10696
10723
|
}]);
|
10697
10724
|
}();
|
10698
|
-
var
|
10725
|
+
var Qo = /*#__PURE__*/function (_K8) {
|
10699
10726
|
// prettier-ignore
|
10700
|
-
function
|
10727
|
+
function Qo(e, t, i, s, r) {
|
10701
10728
|
var _this46;
|
10702
|
-
_classCallCheck(this,
|
10703
|
-
_this46 = _callSuper(this,
|
10729
|
+
_classCallCheck(this, Qo);
|
10730
|
+
_this46 = _callSuper(this, Qo, [e, fe.buildLanguageKeyVerificationDetails(i), t, s, r]), _this46.insertKeyPlaceholderText = "Azure Language Subscription Key", _this46.keyHelpUrl =
|
10704
10731
|
// eslint-disable-next-line max-len
|
10705
10732
|
"https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this46.permittedErrorPrefixes = ["Access"];
|
10706
10733
|
return _this46;
|
10707
10734
|
}
|
10708
|
-
_inherits(
|
10709
|
-
return _createClass(
|
10735
|
+
_inherits(Qo, _K8);
|
10736
|
+
return _createClass(Qo);
|
10710
10737
|
}(K);
|
10711
|
-
var Yt = /*#__PURE__*/function (
|
10738
|
+
var Yt = /*#__PURE__*/function (_Qo) {
|
10712
10739
|
function Yt(e) {
|
10713
10740
|
var _a$language;
|
10714
10741
|
var _this47;
|
@@ -10725,7 +10752,7 @@ var Yt = /*#__PURE__*/function (_Zo) {
|
|
10725
10752
|
}));
|
10726
10753
|
return _this47;
|
10727
10754
|
}
|
10728
|
-
_inherits(Yt,
|
10755
|
+
_inherits(Yt, _Qo);
|
10729
10756
|
return _createClass(Yt, [{
|
10730
10757
|
key: "preprocessBody",
|
10731
10758
|
value: function preprocessBody(e, t) {
|
@@ -10866,7 +10893,7 @@ var Yt = /*#__PURE__*/function (_Zo) {
|
|
10866
10893
|
return extractPollResultData;
|
10867
10894
|
}()
|
10868
10895
|
}]);
|
10869
|
-
}(
|
10896
|
+
}(Qo);
|
10870
10897
|
Yt.ENDPOINT_ERROR_MESSAGE =
|
10871
10898
|
// eslint-disable-next-line max-len
|
10872
10899
|
"Please define the azure endpoint. [More Information](https://deepchat.dev/docs/directConnection/Azure#Summarization)";
|
@@ -10976,19 +11003,19 @@ var Kt = /*#__PURE__*/function () {
|
|
10976
11003
|
}
|
10977
11004
|
}]);
|
10978
11005
|
}();
|
10979
|
-
var
|
10980
|
-
function
|
11006
|
+
var As = /*#__PURE__*/function (_K9) {
|
11007
|
+
function As(e) {
|
10981
11008
|
var _this48;
|
10982
|
-
_classCallCheck(this,
|
11009
|
+
_classCallCheck(this, As);
|
10983
11010
|
var i;
|
10984
11011
|
var t = (i = e.directConnection) == null ? void 0 : i.assemblyAI;
|
10985
|
-
_this48 = _callSuper(this,
|
11012
|
+
_this48 = _callSuper(this, As, [e, Kt.buildKeyVerificationDetails(), Kt.buildHeaders, t, {
|
10986
11013
|
audio: {}
|
10987
|
-
}]), _this48.insertKeyPlaceholderText = "AssemblyAI API Key", _this48.keyHelpUrl = "https://www.assemblyai.com/app/account", _this48.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>AssemblyAI Audio</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"https://www.assemblyai.com/docs/Guides/transcribing_an_audio_file#get-started\">here</a> for more info.\n </p>", _this48.url = "https://api.assemblyai.com/v2/upload", _this48.isTextInputDisabled = !0, _this48.textInputPlaceholderText = "Upload an audio file", _this48.permittedErrorPrefixes = ["Authentication", "Invalid"], _this48.canSendMessage =
|
11014
|
+
}]), _this48.insertKeyPlaceholderText = "AssemblyAI API Key", _this48.keyHelpUrl = "https://www.assemblyai.com/app/account", _this48.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>AssemblyAI Audio</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"https://www.assemblyai.com/docs/Guides/transcribing_an_audio_file#get-started\">here</a> for more info.\n </p>", _this48.url = "https://api.assemblyai.com/v2/upload", _this48.isTextInputDisabled = !0, _this48.textInputPlaceholderText = "Upload an audio file", _this48.permittedErrorPrefixes = ["Authentication", "Invalid"], _this48.canSendMessage = As.canFileSendMessage;
|
10988
11015
|
return _this48;
|
10989
11016
|
}
|
10990
|
-
_inherits(
|
10991
|
-
return _createClass(
|
11017
|
+
_inherits(As, _K9);
|
11018
|
+
return _createClass(As, [{
|
10992
11019
|
key: "callServiceAPI",
|
10993
11020
|
value: function () {
|
10994
11021
|
var _callServiceAPI13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee104(e, t, i) {
|
@@ -11262,21 +11289,21 @@ Ke.HELP_LINK =
|
|
11262
11289
|
// eslint-disable-next-line max-len
|
11263
11290
|
"Please define a region config property. [More Information](https://deepchat.dev/docs/directConnection/Azure#SpeechToText)";
|
11264
11291
|
var ps = Ke;
|
11265
|
-
var
|
11292
|
+
var ea = /*#__PURE__*/function (_K1) {
|
11266
11293
|
// prettier-ignore
|
11267
|
-
function
|
11294
|
+
function ea(e) {
|
11268
11295
|
var _this52;
|
11269
|
-
_classCallCheck(this,
|
11296
|
+
_classCallCheck(this, ea);
|
11270
11297
|
var s, r, o;
|
11271
11298
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.translation,
|
11272
11299
|
i = (o = e.directConnection) == null ? void 0 : o.azure;
|
11273
|
-
_this52 = _callSuper(this,
|
11300
|
+
_this52 = _callSuper(this, ea, [e, fe.buildTranslationKeyVerificationDetails(t.region), fe.buildTranslationHeaders.bind({}, t == null ? void 0 : t.region), i]), _this52.insertKeyPlaceholderText = "Azure Translate Subscription Key", _this52.keyHelpUrl =
|
11274
11301
|
// eslint-disable-next-line max-len
|
11275
11302
|
"https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this52.url = "", _this52.url = "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=".concat(t.language || "es");
|
11276
11303
|
return _this52;
|
11277
11304
|
}
|
11278
|
-
_inherits(
|
11279
|
-
return _createClass(
|
11305
|
+
_inherits(ea, _K1);
|
11306
|
+
return _createClass(ea, [{
|
11280
11307
|
key: "preprocessBody",
|
11281
11308
|
value: function preprocessBody(e) {
|
11282
11309
|
var t = e[e.length - 1].text;
|
@@ -11342,6 +11369,7 @@ var Qo = /*#__PURE__*/function (_K1) {
|
|
11342
11369
|
}]);
|
11343
11370
|
}(K);
|
11344
11371
|
var vt = /*#__PURE__*/function (_K10) {
|
11372
|
+
// https://platform.openai.com/docs/models/gpt-4o-audio-preview
|
11345
11373
|
// prettier-ignore
|
11346
11374
|
function vt(e, t, i, s, r) {
|
11347
11375
|
var _this53$maxMessages, _p$model;
|
@@ -11400,7 +11428,7 @@ var vt = /*#__PURE__*/function (_K10) {
|
|
11400
11428
|
throw new Error("Request settings have not been set up");
|
11401
11429
|
case 2:
|
11402
11430
|
i = this.preprocessBody(this.rawBody, t), s = this.stream;
|
11403
|
-
s && (_typeof(s) != "object" || !s.simulation) || i.stream ? (i.stream = !0,
|
11431
|
+
s && (_typeof(s) != "object" || !s.simulation) || i.stream ? (i.stream = !0, A.request(this, i, e)) : R.request(this, i, e);
|
11404
11432
|
case 4:
|
11405
11433
|
case "end":
|
11406
11434
|
return _context112.stop();
|
@@ -11545,8 +11573,8 @@ var vt = /*#__PURE__*/function (_K10) {
|
|
11545
11573
|
tool_calls: e.tool_calls,
|
11546
11574
|
role: "assistant",
|
11547
11575
|
content: null
|
11548
|
-
}), !a.find(function (
|
11549
|
-
var f =
|
11576
|
+
}), !a.find(function (_ref32) {
|
11577
|
+
var f = _ref32.response;
|
11550
11578
|
return typeof f != "string";
|
11551
11579
|
}) && r.length === a.length)) {
|
11552
11580
|
_context115.next = 43;
|
@@ -11645,8 +11673,8 @@ var Ts = /*#__PURE__*/function (_vt) {
|
|
11645
11673
|
s = ((a = (o = t.azure) == null ? void 0 : o.openAI) == null ? void 0 : a.urlDetails) || {},
|
11646
11674
|
r = (c = (l = t.azure) == null ? void 0 : l.openAI) == null ? void 0 : c.chat;
|
11647
11675
|
if (_this55 = _callSuper(this, Ts, [e, ue.buildKeyVerificationDetails(s), ue.buildHeaders, i, r]), _this55.permittedErrorPrefixes = [ue.URL_DETAILS_ERROR_MESSAGE], _this55.isTextInputDisabled = !1, _typeof(r) == "object") {
|
11648
|
-
var
|
11649
|
-
f =
|
11676
|
+
var _ref33 = (h = (u = (d = e.directConnection) == null ? void 0 : d.azure) == null ? void 0 : u.openAI) == null ? void 0 : h.chat,
|
11677
|
+
f = _ref33.function_handler;
|
11650
11678
|
f && (_this55._functionHandler = f);
|
11651
11679
|
}
|
11652
11680
|
ue.validateURLDetails(s) ? _this55.url = Ts.buildURL(s) : (_this55.isTextInputDisabled = !0, _this55.canSendMessage = function () {
|
@@ -11821,20 +11849,20 @@ var ge = /*#__PURE__*/function (_K11) {
|
|
11821
11849
|
}(K);
|
11822
11850
|
ge.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations", ge.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations", ge.IMAGE_EDIT_URL = "https://api.openai.com/v1/images/edits";
|
11823
11851
|
var ms = ge;
|
11824
|
-
var
|
11825
|
-
function
|
11852
|
+
var ta = /*#__PURE__*/function (_ws3) {
|
11853
|
+
function ta(e) {
|
11826
11854
|
var _this57$maxMessages;
|
11827
11855
|
var _this57;
|
11828
|
-
_classCallCheck(this,
|
11856
|
+
_classCallCheck(this, ta);
|
11829
11857
|
var r;
|
11830
11858
|
var t = JSON.parse(JSON.stringify(e.directConnection)),
|
11831
11859
|
i = (r = t.cohere) == null ? void 0 : r.chat,
|
11832
11860
|
s = t.cohere;
|
11833
|
-
_this57 = _callSuper(this,
|
11861
|
+
_this57 = _callSuper(this, ta, [e, "https://api.cohere.ai/v1/chat", "Ask me anything!", i, s]), _typeof(i) == "object" && Object.assign(_this57.rawBody, i), (_this57$maxMessages = _this57.maxMessages) !== null && _this57$maxMessages !== void 0 ? _this57$maxMessages : _this57.maxMessages = -1;
|
11834
11862
|
return _this57;
|
11835
11863
|
}
|
11836
|
-
_inherits(
|
11837
|
-
return _createClass(
|
11864
|
+
_inherits(ta, _ws3);
|
11865
|
+
return _createClass(ta, [{
|
11838
11866
|
key: "preprocessBody",
|
11839
11867
|
value: function preprocessBody(e, t) {
|
11840
11868
|
var i = JSON.parse(JSON.stringify(e)),
|
@@ -11903,7 +11931,7 @@ var ea = /*#__PURE__*/function (_As3) {
|
|
11903
11931
|
return extractResultData;
|
11904
11932
|
}()
|
11905
11933
|
}]);
|
11906
|
-
}(
|
11934
|
+
}(ws);
|
11907
11935
|
var Ii = /*#__PURE__*/function () {
|
11908
11936
|
function Ii() {
|
11909
11937
|
_classCallCheck(this, Ii);
|
@@ -11935,18 +11963,18 @@ var Ii = /*#__PURE__*/function () {
|
|
11935
11963
|
}
|
11936
11964
|
}]);
|
11937
11965
|
}();
|
11938
|
-
var
|
11939
|
-
function
|
11966
|
+
var ia = /*#__PURE__*/function (_K12) {
|
11967
|
+
function ia(e) {
|
11940
11968
|
var _this58$maxMessages, _s$model;
|
11941
11969
|
var _this58;
|
11942
|
-
_classCallCheck(this,
|
11970
|
+
_classCallCheck(this, ia);
|
11943
11971
|
var s;
|
11944
11972
|
var i = JSON.parse(JSON.stringify(e.directConnection)).mistral;
|
11945
|
-
_this58 = _callSuper(this,
|
11973
|
+
_this58 = _callSuper(this, ia, [e, Ii.buildKeyVerificationDetails(), Ii.buildHeaders, i]), _this58.insertKeyPlaceholderText = "Mistral API Key", _this58.keyHelpUrl = "https://console.mistral.ai/api-keys/", _this58.url = "https://api.mistral.ai/v1/chat/completions", _this58.permittedErrorPrefixes = ["invalid"], i && (_this58.cleanConfig(i), Object.assign(_this58.rawBody, i)), (_this58$maxMessages = _this58.maxMessages) !== null && _this58$maxMessages !== void 0 ? _this58$maxMessages : _this58.maxMessages = -1, (_s$model = (s = _this58.rawBody).model) !== null && _s$model !== void 0 ? _s$model : s.model = "open-mistral-7b";
|
11946
11974
|
return _this58;
|
11947
11975
|
}
|
11948
|
-
_inherits(
|
11949
|
-
return _createClass(
|
11976
|
+
_inherits(ia, _K12);
|
11977
|
+
return _createClass(ia, [{
|
11950
11978
|
key: "cleanConfig",
|
11951
11979
|
value: function cleanConfig(e) {
|
11952
11980
|
delete e.key;
|
@@ -12022,11 +12050,11 @@ var ta = /*#__PURE__*/function (_K12) {
|
|
12022
12050
|
}()
|
12023
12051
|
}]);
|
12024
12052
|
}(K);
|
12025
|
-
var
|
12026
|
-
function
|
12027
|
-
_classCallCheck(this,
|
12053
|
+
var sa = /*#__PURE__*/function () {
|
12054
|
+
function sa() {
|
12055
|
+
_classCallCheck(this, sa);
|
12028
12056
|
}
|
12029
|
-
return _createClass(
|
12057
|
+
return _createClass(sa, null, [{
|
12030
12058
|
key: "create",
|
12031
12059
|
value:
|
12032
12060
|
// this should only be called when no _activeService is set or is demo as otherwise we don't want to reconnect
|
@@ -12038,9 +12066,9 @@ var ia = /*#__PURE__*/function () {
|
|
12038
12066
|
if (r) return new ni(e);
|
12039
12067
|
if (t) {
|
12040
12068
|
if (t.openAI) return t.openAI.images ? new ms(e) : t.openAI.speechToText ? new hs(e) : t.openAI.textToSpeech ? new ds(e) : t.openAI.assistant ? new xs(e) : t.openAI.realtime ? new cs(e) : new vt(e);
|
12041
|
-
if (t.assemblyAI) return new
|
12042
|
-
if (t.cohere) return t.cohere.textGeneration ? new
|
12043
|
-
if (t.huggingFace) return t.huggingFace.textGeneration ? new
|
12069
|
+
if (t.assemblyAI) return new As(e);
|
12070
|
+
if (t.cohere) return t.cohere.textGeneration ? new Yo(e) : t.cohere.summarization ? new Zo(e) : new ta(e);
|
12071
|
+
if (t.huggingFace) return t.huggingFace.textGeneration ? new Vo(e) : t.huggingFace.summarization ? new Wo(e) : t.huggingFace.translation ? new Jo(e) : t.huggingFace.fillMask ? new Xo(e) : t.huggingFace.questionAnswer ? new Ko(e) : t.huggingFace.audioSpeechRecognition ? new Go(e) : t.huggingFace.audioClassification ? new qo(e) : t.huggingFace.imageClassification ? new zo(e) : new $o(e);
|
12044
12072
|
if (t.azure) {
|
12045
12073
|
if (t.azure.openAI) {
|
12046
12074
|
if (t.azure.openAI.chat) return new Ts(e);
|
@@ -12049,10 +12077,10 @@ var ia = /*#__PURE__*/function () {
|
|
12049
12077
|
if (t.azure.speechToText) return new ps(e);
|
12050
12078
|
if (t.azure.textToSpeech) return new fs(e);
|
12051
12079
|
if (t.azure.summarization) return new us(e);
|
12052
|
-
if (t.azure.translation) return new
|
12080
|
+
if (t.azure.translation) return new ea(e);
|
12053
12081
|
}
|
12054
|
-
if (t.stabilityAI) return t.stabilityAI.imageToImage ? new Ti(e) : t.stabilityAI.imageToImageUpscale ? new
|
12055
|
-
if (t.mistral) return new
|
12082
|
+
if (t.stabilityAI) return t.stabilityAI.imageToImage ? new Ti(e) : t.stabilityAI.imageToImageUpscale ? new wi(e) : t.stabilityAI.imageToImageMasking ? new Ai(e) : new Ci(e);
|
12083
|
+
if (t.mistral) return new ia(e);
|
12056
12084
|
}
|
12057
12085
|
return i && Object.keys(i).length > 0 && !s ? new rt(e) : new rt(e, void 0, s || !0);
|
12058
12086
|
}
|
@@ -12125,7 +12153,7 @@ var Oi = /*#__PURE__*/function () {
|
|
12125
12153
|
}
|
12126
12154
|
}]);
|
12127
12155
|
}();
|
12128
|
-
var
|
12156
|
+
var na = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n\t viewBox=\"50 30 420 450\" xml:space=\"preserve\">\n<g filter=\"brightness(0) saturate(100%) invert(16%) sepia(0%) saturate(1942%) hue-rotate(215deg) brightness(99%) contrast(93%)\">\n\t<g>\n\t\t<path d=\"M447.933,103.629c-0.034-3.076-1.224-6.09-3.485-8.352L352.683,3.511c-0.004-0.004-0.007-0.005-0.011-0.008\n\t\t\tC350.505,1.338,347.511,0,344.206,0H89.278C75.361,0,64.04,11.32,64.04,25.237v461.525c0,13.916,11.32,25.237,25.237,25.237\n\t\t\th333.444c13.916,0,25.237-11.32,25.237-25.237V103.753C447.96,103.709,447.937,103.672,447.933,103.629z M356.194,40.931\n\t\t\tl50.834,50.834h-49.572c-0.695,0-1.262-0.567-1.262-1.262V40.931z M423.983,486.763c0,0.695-0.566,1.261-1.261,1.261H89.278\n\t\t\tc-0.695,0-1.261-0.566-1.261-1.261V25.237c0-0.695,0.566-1.261,1.261-1.261h242.94v66.527c0,13.916,11.322,25.239,25.239,25.239\n\t\t\th66.527V486.763z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,164.014H149.912c-6.62,0-11.988,5.367-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.368,11.988-11.988C374.076,169.381,368.707,164.014,362.088,164.014z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,236.353H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.368,11.988-11.988C374.076,241.721,368.707,236.353,362.088,236.353z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,308.691H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.367,11.988-11.988C374.076,314.06,368.707,308.691,362.088,308.691z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M256,381.031H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988H256\n\t\t\tc6.62,0,11.988-5.367,11.988-11.988C267.988,386.398,262.62,381.031,256,381.031z\"/>\n\t</g>\n</g>\n</svg>",
|
12129
12157
|
J = /*#__PURE__*/function () {
|
12130
12158
|
function J() {
|
12131
12159
|
_classCallCheck(this, J);
|
@@ -12170,7 +12198,7 @@ var sa = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\"
|
|
12170
12198
|
t.classList.add("any-file-message-contents");
|
12171
12199
|
var i = document.createElement("div");
|
12172
12200
|
i.classList.add("any-file-message-icon-container");
|
12173
|
-
var s = Ue.createSVGElement(
|
12201
|
+
var s = Ue.createSVGElement(na);
|
12174
12202
|
s.classList.add("any-file-message-icon"), i.appendChild(s);
|
12175
12203
|
var r = document.createElement("div");
|
12176
12204
|
return r.classList.add("any-file-message-text"), r.textContent = e.name || H.DEFAULT_FILE_NAME, t.appendChild(i), t.appendChild(r), H.processContent("any", t, e.src, r.textContent);
|
@@ -12197,9 +12225,9 @@ var sa = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\"
|
|
12197
12225
|
}, {
|
12198
12226
|
key: "addMessages",
|
12199
12227
|
value: function addMessages(e, t, i, s) {
|
12200
|
-
J.createMessages(e, t, i, s).forEach(function (
|
12201
|
-
var o =
|
12202
|
-
a =
|
12228
|
+
J.createMessages(e, t, i, s).forEach(function (_ref34) {
|
12229
|
+
var o = _ref34.type,
|
12230
|
+
a = _ref34.elements;
|
12203
12231
|
H.addMessage(e, a, o, i, s);
|
12204
12232
|
});
|
12205
12233
|
}
|
@@ -12265,13 +12293,13 @@ var le = /*#__PURE__*/function () {
|
|
12265
12293
|
});
|
12266
12294
|
a && (c += 1);
|
12267
12295
|
var d = (o == null ? void 0 : o.outerContainer) || (a == null ? void 0 : a.outerContainer.nextSibling);
|
12268
|
-
r.forEach(function (
|
12269
|
-
var f =
|
12270
|
-
m =
|
12296
|
+
r.forEach(function (_ref35, p) {
|
12297
|
+
var f = _ref35.type,
|
12298
|
+
m = _ref35.elements;
|
12271
12299
|
var g;
|
12272
12300
|
H.setElementProps(e, m, f, s), (g = d.parentElement) == null || g.insertBefore(m.outerContainer, d), e.messageElementRefs.splice(e.messageElementRefs.length - 1, 1), e.messageElementRefs.splice(c + p, 0, m);
|
12273
|
-
}), le.removeFilesMessages(e, t), t[1].files = r.map(function (
|
12274
|
-
var f =
|
12301
|
+
}), le.removeFilesMessages(e, t), t[1].files = r.map(function (_ref36) {
|
12302
|
+
var f = _ref36.elements;
|
12275
12303
|
return f;
|
12276
12304
|
}), t[0].files = i;
|
12277
12305
|
}
|
@@ -12312,11 +12340,11 @@ var le = /*#__PURE__*/function () {
|
|
12312
12340
|
}
|
12313
12341
|
}]);
|
12314
12342
|
}();
|
12315
|
-
var
|
12316
|
-
function
|
12317
|
-
_classCallCheck(this,
|
12343
|
+
var ra = /*#__PURE__*/function () {
|
12344
|
+
function ra() {
|
12345
|
+
_classCallCheck(this, ra);
|
12318
12346
|
}
|
12319
|
-
return _createClass(
|
12347
|
+
return _createClass(ra, null, [{
|
12320
12348
|
key: "getText",
|
12321
12349
|
value: function getText(e, t) {
|
12322
12350
|
var i;
|
@@ -12340,9 +12368,9 @@ var de = /*#__PURE__*/function (_he) {
|
|
12340
12368
|
r = t.introPanelMarkUp,
|
12341
12369
|
o = t.demo;
|
12342
12370
|
_this59._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this59._onClearMessages = ii.onClearMessages.bind(_this59, e), _this59._onError = ii.onError.bind(_this59, e), _this59._isLoadingMessageAllowed = de.getDefaultDisplayLoadingMessage(e, t), _typeof(e.displayLoadingBubble) == "object" && e.displayLoadingBubble.toggle && (e.displayLoadingBubble.toggle = _this59.setLoadingToggle.bind(_this59)), _this59._permittedErrorPrefixes = s, _this59.addSetupMessageIfNeeded(e, t) || _this59.populateIntroPanel(i, r, e.introPanelStyle), o && _this59.prepareDemo(te.processDemo(o), e.loadHistory), _this59.addIntroductoryMessages(e, t), new si(e, _this59, t), _this59._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
|
12343
|
-
return y.deepCloneMessagesWithReferences(_this59.messageToElements.map(function (
|
12344
|
-
var
|
12345
|
-
c =
|
12371
|
+
return y.deepCloneMessagesWithReferences(_this59.messageToElements.map(function (_ref37) {
|
12372
|
+
var _ref38 = _slicedToArray(_ref37, 1),
|
12373
|
+
c = _ref38[0];
|
12346
12374
|
return c;
|
12347
12375
|
}));
|
12348
12376
|
}, e.clearMessages = _this59.clearMessages.bind(_this59, t), e.refreshMessages = _this59.refreshTextMessages.bind(_this59, e.remarkable), e.scrollToBottom = V.scrollToBottom.bind(_this59, _this59.elementRef), e.addMessage = function (c, d) {
|
@@ -12378,7 +12406,7 @@ var de = /*#__PURE__*/function (_he) {
|
|
12378
12406
|
}, {
|
12379
12407
|
key: "addSetupMessageIfNeeded",
|
12380
12408
|
value: function addSetupMessageIfNeeded(e, t) {
|
12381
|
-
var i =
|
12409
|
+
var i = ra.getText(e, t);
|
12382
12410
|
if (i) {
|
12383
12411
|
var s = this.createAndAppendNewMessageElement(i, y.AI_ROLE);
|
12384
12412
|
this.applyCustomStyles(s, y.AI_ROLE, !1);
|
@@ -12450,13 +12478,17 @@ var de = /*#__PURE__*/function (_he) {
|
|
12450
12478
|
value: function addNewMessage(e) {
|
12451
12479
|
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
12452
12480
|
var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
12453
|
-
var o;
|
12481
|
+
var o, a;
|
12454
12482
|
e.role !== y.USER_ROLE && ((o = this._hiddenAttachments) == null || o.removeHiddenFiles());
|
12455
12483
|
var s = de.createMessageContent(e),
|
12456
12484
|
r = {
|
12457
12485
|
status: e.overwrite
|
12458
12486
|
};
|
12459
|
-
return i ? (this.tryAddHTMLMessage(s, r, i), this.tryAddFileMessages(s, i), this.tryAddTextMessage(s, r, e, t, i)) : (this.tryAddTextMessage(s, r, e, t, i), this.tryAddFileMessages(s, i), this.tryAddHTMLMessage(s, r, i)), this.isValidMessageContent(s) && !i && this.updateStateOnMessage(s, e.overwrite, e.sendUpdate, t),
|
12487
|
+
return i ? (this.tryAddHTMLMessage(s, r, i), this.tryAddFileMessages(s, i), this.tryAddTextMessage(s, r, e, t, i)) : (this.tryAddTextMessage(s, r, e, t, i), this.tryAddFileMessages(s, i), this.tryAddHTMLMessage(s, r, i)), this.isValidMessageContent(s) && !i && (this.updateStateOnMessage(s, e.overwrite, e.sendUpdate, t), t || (a = this.browserStorage) == null || a.addMessages(this.messageToElements.map(function (_ref39) {
|
12488
|
+
var _ref40 = _slicedToArray(_ref39, 1),
|
12489
|
+
l = _ref40[0];
|
12490
|
+
return l;
|
12491
|
+
}))), s;
|
12460
12492
|
}
|
12461
12493
|
}, {
|
12462
12494
|
key: "isValidMessageContent",
|
@@ -12480,7 +12512,7 @@ var de = /*#__PURE__*/function (_he) {
|
|
12480
12512
|
value: function removeMessageOnError() {
|
12481
12513
|
var e = this.messageElementRefs[this.messageElementRefs.length - 1],
|
12482
12514
|
t = e == null ? void 0 : e.bubbleElement;
|
12483
|
-
(t != null && t.classList.contains(
|
12515
|
+
(t != null && t.classList.contains(Ae.MESSAGE_CLASS) && t.textContent === "" || de.isTemporaryElement(e)) && this.removeLastMessage();
|
12484
12516
|
}
|
12485
12517
|
// prettier-ignore
|
12486
12518
|
}, {
|
@@ -12593,25 +12625,25 @@ var de = /*#__PURE__*/function (_he) {
|
|
12593
12625
|
// WORK - update all message classes to use deep-chat prefix
|
12594
12626
|
function clearMessages(e, t) {
|
12595
12627
|
var _this$messageToElemen;
|
12596
|
-
var r, o;
|
12628
|
+
var r, o, a;
|
12597
12629
|
var i = [];
|
12598
|
-
this.messageElementRefs.forEach(function (
|
12599
|
-
de.isActiveElement(
|
12600
|
-
}), Array.from(this.elementRef.children).forEach(function (
|
12601
|
-
var
|
12602
|
-
var
|
12603
|
-
|
12630
|
+
this.messageElementRefs.forEach(function (l) {
|
12631
|
+
de.isActiveElement(l.bubbleElement.classList) ? i.push(l) : l.outerContainer.remove();
|
12632
|
+
}), Array.from(this.elementRef.children).forEach(function (l) {
|
12633
|
+
var d;
|
12634
|
+
var c = (d = l.children[0]) == null ? void 0 : d.children[0];
|
12635
|
+
c != null && c.classList.contains(y.ERROR_MESSAGE_TEXT_CLASS) && l.remove();
|
12604
12636
|
}), this.messageElementRefs = i;
|
12605
|
-
var s = this.messageToElements.filter(function (
|
12606
|
-
return
|
12637
|
+
var s = this.messageToElements.filter(function (l) {
|
12638
|
+
return l[1].text && de.isActiveElement(l[1].text.bubbleElement.classList) || l[1].html && de.isActiveElement(l[1].html.bubbleElement.classList);
|
12607
12639
|
});
|
12608
|
-
(_this$messageToElemen = this.messageToElements).splice.apply(_this$messageToElemen, [0, this.messageToElements.length].concat(_toConsumableArray(s))), t !== !1 && ((r = this._introPanel) != null && r._elementRef && this._introPanel.display(), this.addIntroductoryMessages()), (o = this.
|
12640
|
+
(_this$messageToElemen = this.messageToElements).splice.apply(_this$messageToElemen, [0, this.messageToElements.length].concat(_toConsumableArray(s))), t !== !1 && ((r = this._introPanel) != null && r._elementRef && this._introPanel.display(), this.addIntroductoryMessages()), (o = this.browserStorage) == null || o.clear(), (a = this._onClearMessages) == null || a.call(this), delete e.sessionId;
|
12609
12641
|
}
|
12610
12642
|
}], [{
|
12611
12643
|
key: "getDefaultDisplayLoadingMessage",
|
12612
12644
|
value: function getDefaultDisplayLoadingMessage(e, t) {
|
12613
|
-
var
|
12614
|
-
return t.websocket ? !!e.displayLoadingBubble : (
|
12645
|
+
var _ref41;
|
12646
|
+
return t.websocket ? !!e.displayLoadingBubble : (_ref41 = _typeof(e.displayLoadingBubble) == "object" || e.displayLoadingBubble) !== null && _ref41 !== void 0 ? _ref41 : !0;
|
12615
12647
|
}
|
12616
12648
|
}, {
|
12617
12649
|
key: "checkPermittedErrorPrefixes",
|
@@ -12626,7 +12658,7 @@ var de = /*#__PURE__*/function (_he) {
|
|
12626
12658
|
}, {
|
12627
12659
|
key: "isActiveElement",
|
12628
12660
|
value: function isActiveElement(e) {
|
12629
|
-
return e ? e.contains(De.BUBBLE_CLASS) || e.contains(Fe.CLASS) || e.contains(
|
12661
|
+
return e ? e.contains(De.BUBBLE_CLASS) || e.contains(Fe.CLASS) || e.contains(Ae.MESSAGE_CLASS) : !1;
|
12630
12662
|
}
|
12631
12663
|
}]);
|
12632
12664
|
}(he);
|
@@ -12702,7 +12734,7 @@ var Et = /*#__PURE__*/function () {
|
|
12702
12734
|
}]);
|
12703
12735
|
}();
|
12704
12736
|
var Ys = ["camera", "gifs", "images", "audio", "mixedFiles", "submit", "microphone"],
|
12705
|
-
|
12737
|
+
oa = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 22 22\" fill=\"none\">\n <rect x=\"2.5\" y=\"2.5\" width=\"17\" height=\"17\" rx=\"2\" stroke=\"#000000\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n",
|
12706
12738
|
Q = /*#__PURE__*/function () {
|
12707
12739
|
function Q() {
|
12708
12740
|
_classCallCheck(this, Q);
|
@@ -12767,7 +12799,7 @@ var O = /*#__PURE__*/function (_ct2) {
|
|
12767
12799
|
_classCallCheck(this, O);
|
12768
12800
|
var a, l, c, d, u, h;
|
12769
12801
|
var r = ((d = (c = (l = (a = e == null ? void 0 : e.styles) == null ? void 0 : a.button) == null ? void 0 : l["default"]) == null ? void 0 : c.text) == null ? void 0 : d.content) || "Custom ".concat(t),
|
12770
|
-
o =
|
12802
|
+
o = oa;
|
12771
12803
|
_this62 = _callSuper(this, O, [O.createButtonElement(), o, e == null ? void 0 : e.position, (u = e == null ? void 0 : e.styles) == null ? void 0 : u.button, r]), _this62._state = "default", _this62.isCustom = !0, _this62._innerElements = _this62.createInnerElementsForStates(_this62.customStyles), _this62._menuStyles = s, _this62._onClick = e.onClick, _this62._dropupStyles = (h = e.styles) == null ? void 0 : h.dropup, _this62.setSetState(e), _this62.addClickListener(i), _this62.changeState(e.initialState, !0);
|
12772
12804
|
return _this62;
|
12773
12805
|
}
|
@@ -12908,7 +12940,7 @@ var O = /*#__PURE__*/function (_ct2) {
|
|
12908
12940
|
}(ct);
|
12909
12941
|
O.INDICATOR_PREFIX = "custom", O.BUTTON_CLASS = "custom-button", O.DISABLED_CONTAINER_CLASS = "custom-button-container-disabled", O.DEFAULT_CONTAINER_CLASS = "custom-button-container-default", O.ACTIVE_CONTAINER_CLASS = "custom-button-container-active";
|
12910
12942
|
var st = O;
|
12911
|
-
var
|
12943
|
+
var aa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16 0c-8.836 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM16 30.032c-7.72 0-14-6.312-14-14.032s6.28-14 14-14 14 6.28 14 14-6.28 14.032-14 14.032zM23 15h-6v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1v6h-6c-0.552 0-1 0.448-1 1s0.448 1 1 1h6v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6h6c0.552 0 1-0.448 1-1s-0.448-1-1-1z\"></path>\n</svg>";
|
12912
12944
|
var ri = /*#__PURE__*/function () {
|
12913
12945
|
function ri() {
|
12914
12946
|
_classCallCheck(this, ri);
|
@@ -12992,7 +13024,7 @@ var et = /*#__PURE__*/function (_ct3) {
|
|
12992
13024
|
var _this66;
|
12993
13025
|
_classCallCheck(this, et);
|
12994
13026
|
var s;
|
12995
|
-
_this66 = _callSuper(this, et, [et.createButtonElement(),
|
13027
|
+
_this66 = _callSuper(this, et, [et.createButtonElement(), aa, void 0, {
|
12996
13028
|
styles: (s = t == null ? void 0 : t.button) == null ? void 0 : s.styles
|
12997
13029
|
}]);
|
12998
13030
|
var i = _this66.createInnerElementsForStates(_this66.customStyles);
|
@@ -13064,8 +13096,8 @@ var $ = /*#__PURE__*/function () {
|
|
13064
13096
|
}),
|
13065
13097
|
c = t["dropup-menu"][l];
|
13066
13098
|
c && (r.addItem(c.button), t["dropup-menu"].splice(l, 1));
|
13067
|
-
}), t["dropup-menu"].forEach(function (
|
13068
|
-
var a =
|
13099
|
+
}), t["dropup-menu"].forEach(function (_ref42) {
|
13100
|
+
var a = _ref42.button;
|
13069
13101
|
return r.addItem(a);
|
13070
13102
|
});
|
13071
13103
|
var o = Ni.getPosition(t, s);
|
@@ -13131,29 +13163,29 @@ var $ = /*#__PURE__*/function () {
|
|
13131
13163
|
}
|
13132
13164
|
}]);
|
13133
13165
|
}();
|
13134
|
-
var
|
13135
|
-
|
13136
|
-
|
13137
|
-
|
13138
|
-
|
13166
|
+
var la = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M20 10.9696L11.9628 18.5497C10.9782 19.4783 9.64274 20 8.25028 20C6.85782 20 5.52239 19.4783 4.53777 18.5497C3.55315 17.6211 3 16.3616 3 15.0483C3 13.7351 3.55315 12.4756 4.53777 11.547L12.575 3.96687C13.2314 3.34779 14.1217 3 15.05 3C15.9783 3 16.8686 3.34779 17.525 3.96687C18.1814 4.58595 18.5502 5.4256 18.5502 6.30111C18.5502 7.17662 18.1814 8.01628 17.525 8.63535L9.47904 16.2154C9.15083 16.525 8.70569 16.6989 8.24154 16.6989C7.77738 16.6989 7.33224 16.525 7.00403 16.2154C6.67583 15.9059 6.49144 15.4861 6.49144 15.0483C6.49144 14.6106 6.67583 14.1907 7.00403 13.8812L14.429 6.88674\" stroke=\"#000000\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>",
|
13167
|
+
ca = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M20,15.2928932 L20,5.5 C20,4.67157288 19.3284271,4 18.5,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 L4,12.2928932 L7.14644661,9.14644661 C7.34170876,8.95118446 7.65829124,8.95118446 7.85355339,9.14644661 L13.5,14.7928932 L16.1464466,12.1464466 C16.3417088,11.9511845 16.6582912,11.9511845 16.8535534,12.1464466 L20,15.2928932 Z M20,16.7071068 L16.5,13.2071068 L13.8535534,15.8535534 C13.6582912,16.0488155 13.3417088,16.0488155 13.1464466,15.8535534 L7.5,10.2071068 L4,13.7071068 L4,18.5 C4,19.3284271 4.67157288,20 5.5,20 L18.5,20 C19.3284271,20 20,19.3284271 20,18.5 L20,16.7071068 Z M3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L18.5,3 C19.8807119,3 21,4.11928813 21,5.5 L21,18.5 C21,19.8807119 19.8807119,21 18.5,21 L5.5,21 C4.11928813,21 3,19.8807119 3,18.5 L3,5.5 Z M15,6 L17,6 C17.5522847,6 18,6.44771525 18,7 L18,9 C18,9.55228475 17.5522847,10 17,10 L15,10 C14.4477153,10 14,9.55228475 14,9 L14,7 C14,6.44771525 14.4477153,6 15,6 Z M15,7 L15,9 L17,9 L17,7 L15,7 Z\"/>\n</svg>\n",
|
13168
|
+
da = "<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"-49.49 -49.49 593.87 593.87\" stroke-width=\"3.95908\" transform=\"rotate(0)\">\n <g stroke-width=\"0\"></g>\n <g stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"0.98977\"></g>\n <g>\n <g>\n <g>\n <path d=\"M163.205,76.413v293.301c-3.434-3.058-7.241-5.867-11.486-8.339c-21.38-12.452-49.663-15.298-77.567-7.846 c-49.038,13.096-80.904,54.519-71.038,92.337c4.019,15.404,14.188,28.221,29.404,37.087c13.553,7.894,29.87,11.933,47.115,11.933 c9.962,0,20.231-1.356,30.447-4.087c42.74-11.406,72.411-44.344,72.807-77.654h0.011v-0.162c0.002-0.166,0-0.331,0-0.496V187.072 l290.971-67.3v178.082c-3.433-3.055-7.238-5.863-11.481-8.334c-21.385-12.452-49.654-15.308-77.567-7.846 c-49.038,13.087-80.904,54.519-71.038,92.356c4.019,15.385,14.183,28.212,29.404,37.067c13.548,7.894,29.875,11.933,47.115,11.933 c9.962,0,20.231-1.356,30.452-4.087c42.74-11.413,72.411-44.346,72.804-77.654h0.004v-0.065c0.003-0.236,0.001-0.469,0-0.704V0 L163.205,76.413z M104.999,471.779c-22.543,6.038-45.942,3.846-62.572-5.846c-10.587-6.163-17.591-14.817-20.255-25.038 c-7.144-27.375,18.452-58.029,57.062-68.346c8.409-2.25,16.938-3.346,25.188-3.346c13.87,0,26.962,3.115,37.389,9.192 c10.587,6.163,17.591,14.817,20.255,25.029c0.809,3.102,1.142,6.248,1.139,9.4v0.321h0.014 C162.99,437.714,139.082,462.678,104.999,471.779z M182.898,166.853V92.067l290.971-67.298v74.784L182.898,166.853z M415.677,399.923c-22.558,6.038-45.942,3.837-62.587-5.846c-10.587-6.163-17.587-14.817-20.25-25.019 c-7.144-27.385,18.452-58.058,57.058-68.365c8.414-2.25,16.942-3.346,25.192-3.346c13.875,0,26.962,3.115,37.385,9.192 c10.596,6.163,17.596,14.817,20.26,25.029v0.01c0.796,3.05,1.124,6.144,1.135,9.244v0.468h0.02 C473.668,365.851,449.763,390.814,415.677,399.923z\">\n </path>\n </g>\n </g>\n </g>\n</svg>",
|
13169
|
+
ha = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 5.9266752 5.6408391\" height=\"21.31971\" width=\"22.4\">\n <g>\n <path d=\"m 5.2564627,1.548212 c -3.1136005,-0.4796804 -1.5568006,-0.2398402 0,0 z M 2.0001198,2.0922063 c 0.1556781,0 0.2657489,0.020893 0.3917849,0.080366 0.081154,0.038347 0.1153492,0.134065 0.076377,0.2138602 -0.038973,0.07979 -0.1363527,0.1134129 -0.2175069,0.075091 -0.078199,-0.036919 -0.1407455,-0.048792 -0.250655,-0.048792 -0.2260486,0 -0.3921482,0.2042182 -0.3921482,0.4801409 0,0.2761822 0.1663188,0.4810688 0.3921482,0.4810688 0.1117901,0 0.2064255,-0.046133 0.255659,-0.1284198 l 0.00162,-0.00389 V 3.0534032 l -0.098011,1.75e-4 c -0.081844,0 -0.1495979,-0.059305 -0.1612403,-0.1365887 l -0.00175,-0.023683 c 0,-0.08047 0.060311,-0.1470874 0.1389194,-0.1585331 l 0.024085,-0.00195 h 0.2612303 c 0.081842,0 0.149598,0.059305 0.1612404,0.1365891 l 0.00175,0.023683 -3.398e-4,0.3968809 v 0 l -0.00168,0.014211 v 0 l -0.00553,0.023034 v 0 l -0.00532,0.014145 c -0.098178,0.22826 -0.3236506,0.3528713 -0.5706303,0.3528713 -0.4240855,0 -0.7181621,-0.3622714 -0.7181621,-0.8016063 0,-0.4391857 0.2940275,-0.8006848 0.7181621,-0.8006848 z m 1.2034759,0.031275 c 0.081843,0 0.1495977,0.059305 0.1612403,0.1365891 l 0.00175,0.023683 v 1.2211775 c 0,0.088516 -0.07298,0.1602721 -0.1630073,0.1602721 -0.081841,0 -0.1495972,-0.059305 -0.1612397,-0.1365892 L 3.040589,3.5049308 V 2.2837527 c 0,-0.088516 0.07298,-0.1602721 0.1630067,-0.1602714 z m 0.7813442,0 0.5209469,0.00195 c 0.090025,3.048e-4 0.1627543,0.072306 0.1624458,0.1608234 -2.809e-4,0.08047 -0.06083,0.1468798 -0.1394772,0.158066 l -0.024092,0.00195 -0.3575326,-0.0013 v 0.4497782 l 0.2928918,2.27e-4 c 0.081842,0 0.1495979,0.059305 0.1612403,0.136589 l 0.00175,0.023683 c 0,0.080469 -0.06031,0.1470871 -0.1389193,0.1585393 l -0.024092,0.00195 -0.2928919,-2.336e-4 1.563e-4,0.2860316 c 0,0.080471 -0.06031,0.1470873 -0.1389193,0.1585395 l -0.024085,0.00195 c -0.081843,0 -0.1495979,-0.059305 -0.1612403,-0.1365826 l -0.00175,-0.023691 V 2.2841354 c 2.798e-4,-0.08047 0.060829,-0.1468797 0.1394758,-0.1580594 z\"/>\n <path d=\"m 5.0894191,1.0943261 c 0,-0.21918999 -0.177687,-0.39686999 -0.396876,-0.39686999 h -3.43959 c -0.2191879,0 -0.391262,0.1777519 -0.3968759,0.39686999 l -0.027082,3.4379266 c 0.040152,0.2939927 0.4235456,0.409415 0.4235456,0.409415 l 3.4785583,-0.00851 c 0,0 0.3008506,-0.1402998 0.3236271,-0.4201576 0.042911,-0.5272495 0.034693,-1.6106146 0.034693,-3.4186761 z m -4.49792494,0 c 0,-0.36530999 0.29614504,-0.66145999 0.66145894,-0.66145999 h 3.43959 c 0.365314,0 0.66146,0.29615 0.66146,0.66145999 v 3.43959 c 0,0.36532 -0.296146,0.66146 -0.66146,0.66146 h -3.43959 c -0.3653139,0 -0.66145894,-0.29614 -0.66145894,-0.66146 z\"/>\n </g>\n</svg>\n",
|
13170
|
+
ua = {
|
13139
13171
|
images: {
|
13140
13172
|
id: "upload-images-icon",
|
13141
|
-
svgString:
|
13173
|
+
svgString: ca,
|
13142
13174
|
dropupText: "Image"
|
13143
13175
|
},
|
13144
13176
|
gifs: {
|
13145
13177
|
id: "upload-gifs-icon",
|
13146
|
-
svgString:
|
13178
|
+
svgString: ha,
|
13147
13179
|
dropupText: "GIF"
|
13148
13180
|
},
|
13149
13181
|
audio: {
|
13150
13182
|
id: "upload-audio-icon",
|
13151
|
-
svgString:
|
13183
|
+
svgString: da,
|
13152
13184
|
dropupText: "Audio"
|
13153
13185
|
},
|
13154
13186
|
mixedFiles: {
|
13155
13187
|
id: "upload-mixed-files-icon",
|
13156
|
-
svgString:
|
13188
|
+
svgString: la,
|
13157
13189
|
dropupText: "File"
|
13158
13190
|
}
|
13159
13191
|
};
|
@@ -13220,20 +13252,20 @@ var Gi = /*#__PURE__*/function (_ct4) {
|
|
13220
13252
|
}
|
13221
13253
|
}]);
|
13222
13254
|
}(ct);
|
13223
|
-
function
|
13255
|
+
function fa(n) {
|
13224
13256
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n["default"] : n;
|
13225
13257
|
}
|
13226
13258
|
var mi = {},
|
13227
13259
|
St = {},
|
13228
13260
|
_t = {},
|
13229
13261
|
xt = {},
|
13230
|
-
|
13262
|
+
wt = {},
|
13231
13263
|
Zs;
|
13232
13264
|
function Vi() {
|
13233
|
-
if (Zs) return
|
13234
|
-
Zs = 1, Object.defineProperty(
|
13265
|
+
if (Zs) return wt;
|
13266
|
+
Zs = 1, Object.defineProperty(wt, "__esModule", {
|
13235
13267
|
value: !0
|
13236
|
-
}),
|
13268
|
+
}), wt.Text = void 0;
|
13237
13269
|
var n = /*#__PURE__*/function () {
|
13238
13270
|
function n() {
|
13239
13271
|
_classCallCheck(this, n);
|
@@ -13262,7 +13294,7 @@ function Vi() {
|
|
13262
13294
|
}
|
13263
13295
|
}]);
|
13264
13296
|
}();
|
13265
|
-
return
|
13297
|
+
return wt.Text = n, n.FIRST_CHAR_REGEX = /\S/, n.DOUBLE_LINE = /\n\n/g, n.ONE_LINE = /\n/g, wt;
|
13266
13298
|
}
|
13267
13299
|
var Qs;
|
13268
13300
|
function Dn() {
|
@@ -13287,7 +13319,7 @@ function Dn() {
|
|
13287
13319
|
return xt.Translate = e, xt;
|
13288
13320
|
}
|
13289
13321
|
var en;
|
13290
|
-
function
|
13322
|
+
function pa() {
|
13291
13323
|
if (en) return _t;
|
13292
13324
|
en = 1, Object.defineProperty(_t, "__esModule", {
|
13293
13325
|
value: !0
|
@@ -13330,24 +13362,24 @@ function fa() {
|
|
13330
13362
|
}();
|
13331
13363
|
return _t.WebSpeechTranscript = e, _t;
|
13332
13364
|
}
|
13333
|
-
var
|
13365
|
+
var At = {},
|
13334
13366
|
tn;
|
13335
13367
|
function Rs() {
|
13336
|
-
if (tn) return
|
13337
|
-
tn = 1, Object.defineProperty(
|
13368
|
+
if (tn) return At;
|
13369
|
+
tn = 1, Object.defineProperty(At, "__esModule", {
|
13338
13370
|
value: !0
|
13339
|
-
}),
|
13371
|
+
}), At.Browser = void 0;
|
13340
13372
|
var n = /*#__PURE__*/_createClass(function n() {
|
13341
13373
|
_classCallCheck(this, n);
|
13342
13374
|
});
|
13343
|
-
return
|
13375
|
+
return At.Browser = n, n.IS_SAFARI = function () {
|
13344
13376
|
return n._IS_SAFARI === void 0 && (n._IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), n._IS_SAFARI;
|
13345
|
-
},
|
13377
|
+
}, At;
|
13346
13378
|
}
|
13347
13379
|
var Tt = {},
|
13348
13380
|
Ct = {},
|
13349
13381
|
sn;
|
13350
|
-
function
|
13382
|
+
function ma() {
|
13351
13383
|
if (sn) return Ct;
|
13352
13384
|
sn = 1, Object.defineProperty(Ct, "__esModule", {
|
13353
13385
|
value: !0
|
@@ -13398,7 +13430,7 @@ function pa() {
|
|
13398
13430
|
}
|
13399
13431
|
var Rt = {},
|
13400
13432
|
nn;
|
13401
|
-
function
|
13433
|
+
function ga() {
|
13402
13434
|
if (nn) return Rt;
|
13403
13435
|
nn = 1, Object.defineProperty(Rt, "__esModule", {
|
13404
13436
|
value: !0
|
@@ -13717,7 +13749,7 @@ function Fn() {
|
|
13717
13749
|
}
|
13718
13750
|
var Ot = {},
|
13719
13751
|
cn;
|
13720
|
-
function
|
13752
|
+
function ba() {
|
13721
13753
|
if (cn) return Ot;
|
13722
13754
|
cn = 1, Object.defineProperty(Ot, "__esModule", {
|
13723
13755
|
value: !0
|
@@ -13776,7 +13808,7 @@ function ga() {
|
|
13776
13808
|
}
|
13777
13809
|
var Pt = {},
|
13778
13810
|
dn;
|
13779
|
-
function
|
13811
|
+
function va() {
|
13780
13812
|
if (dn) return Pt;
|
13781
13813
|
dn = 1, Object.defineProperty(Pt, "__esModule", {
|
13782
13814
|
value: !0
|
@@ -13849,13 +13881,13 @@ function Un() {
|
|
13849
13881
|
hn = 1, Object.defineProperty(Tt, "__esModule", {
|
13850
13882
|
value: !0
|
13851
13883
|
}), Tt.Speech = void 0;
|
13852
|
-
var n =
|
13853
|
-
e =
|
13884
|
+
var n = ma(),
|
13885
|
+
e = ga(),
|
13854
13886
|
t = Fn(),
|
13855
13887
|
i = Bn(),
|
13856
|
-
s =
|
13888
|
+
s = ba(),
|
13857
13889
|
r = Ki(),
|
13858
|
-
o =
|
13890
|
+
o = va(),
|
13859
13891
|
a = Rs(),
|
13860
13892
|
l = Wi(),
|
13861
13893
|
c = Vi();
|
@@ -13970,12 +14002,12 @@ function Un() {
|
|
13970
14002
|
return Tt.Speech = d, Tt;
|
13971
14003
|
}
|
13972
14004
|
var un;
|
13973
|
-
function
|
14005
|
+
function ya() {
|
13974
14006
|
if (un) return St;
|
13975
14007
|
un = 1, Object.defineProperty(St, "__esModule", {
|
13976
14008
|
value: !0
|
13977
14009
|
}), St.WebSpeech = void 0;
|
13978
|
-
var n =
|
14010
|
+
var n = pa(),
|
13979
14011
|
e = Rs(),
|
13980
14012
|
t = Un();
|
13981
14013
|
var i = /*#__PURE__*/function (_t$Speech) {
|
@@ -14046,7 +14078,7 @@ function va() {
|
|
14046
14078
|
}
|
14047
14079
|
var Nt = {},
|
14048
14080
|
fn;
|
14049
|
-
function
|
14081
|
+
function Ea() {
|
14050
14082
|
if (fn) return Nt;
|
14051
14083
|
fn = 1, Object.defineProperty(Nt, "__esModule", {
|
14052
14084
|
value: !0
|
@@ -14069,7 +14101,7 @@ function ya() {
|
|
14069
14101
|
var Dt = {},
|
14070
14102
|
Bt = {},
|
14071
14103
|
pn;
|
14072
|
-
function
|
14104
|
+
function Sa() {
|
14073
14105
|
if (pn) return Bt;
|
14074
14106
|
pn = 1, Object.defineProperty(Bt, "__esModule", {
|
14075
14107
|
value: !0
|
@@ -14097,18 +14129,18 @@ function Ea() {
|
|
14097
14129
|
var Ft = {},
|
14098
14130
|
Ut = {},
|
14099
14131
|
mn;
|
14100
|
-
function
|
14132
|
+
function _a() {
|
14101
14133
|
return mn || (mn = 1, Object.defineProperty(Ut, "__esModule", {
|
14102
14134
|
value: !0
|
14103
14135
|
}), Ut.README_URL = void 0, Ut.README_URL = "https://github.com/OvidijusParsiunas/speech-to-element"), Ut;
|
14104
14136
|
}
|
14105
14137
|
var gn;
|
14106
|
-
function
|
14138
|
+
function xa() {
|
14107
14139
|
if (gn) return Ft;
|
14108
14140
|
gn = 1, Object.defineProperty(Ft, "__esModule", {
|
14109
14141
|
value: !0
|
14110
14142
|
}), Ft.AzureSpeechConfig = void 0;
|
14111
|
-
var n =
|
14143
|
+
var n = _a();
|
14112
14144
|
var e = /*#__PURE__*/function () {
|
14113
14145
|
function e() {
|
14114
14146
|
_classCallCheck(this, e);
|
@@ -14180,7 +14212,7 @@ function _a() {
|
|
14180
14212
|
}
|
14181
14213
|
var jt = {},
|
14182
14214
|
bn;
|
14183
|
-
function
|
14215
|
+
function wa() {
|
14184
14216
|
if (bn) return jt;
|
14185
14217
|
bn = 1, Object.defineProperty(jt, "__esModule", {
|
14186
14218
|
value: !0
|
@@ -14232,7 +14264,7 @@ function Aa() {
|
|
14232
14264
|
}
|
14233
14265
|
var qt = {},
|
14234
14266
|
yn;
|
14235
|
-
function
|
14267
|
+
function Ta() {
|
14236
14268
|
if (yn) return qt;
|
14237
14269
|
yn = 1, Object.defineProperty(qt, "__esModule", {
|
14238
14270
|
value: !0
|
@@ -14262,16 +14294,16 @@ function wa() {
|
|
14262
14294
|
return qt.AzureTranscript = e, qt;
|
14263
14295
|
}
|
14264
14296
|
var En;
|
14265
|
-
function
|
14297
|
+
function Ca() {
|
14266
14298
|
if (En) return Dt;
|
14267
14299
|
En = 1, Object.defineProperty(Dt, "__esModule", {
|
14268
14300
|
value: !0
|
14269
14301
|
}), Dt.Azure = void 0;
|
14270
|
-
var n =
|
14271
|
-
e =
|
14272
|
-
t =
|
14302
|
+
var n = Sa(),
|
14303
|
+
e = xa(),
|
14304
|
+
t = wa(),
|
14273
14305
|
i = Aa(),
|
14274
|
-
s =
|
14306
|
+
s = Ta(),
|
14275
14307
|
r = Un();
|
14276
14308
|
var o = /*#__PURE__*/function (_r$Speech) {
|
14277
14309
|
function o() {
|
@@ -14440,15 +14472,15 @@ function Ta() {
|
|
14440
14472
|
return Dt.Azure = o, Dt;
|
14441
14473
|
}
|
14442
14474
|
var Sn;
|
14443
|
-
function
|
14475
|
+
function Ra() {
|
14444
14476
|
if (Sn) return mi;
|
14445
14477
|
Sn = 1, Object.defineProperty(mi, "__esModule", {
|
14446
14478
|
value: !0
|
14447
14479
|
});
|
14448
|
-
var n =
|
14480
|
+
var n = ya(),
|
14449
14481
|
e = Fn(),
|
14450
|
-
t =
|
14451
|
-
i =
|
14482
|
+
t = Ea(),
|
14483
|
+
i = Ca();
|
14452
14484
|
var s = /*#__PURE__*/function () {
|
14453
14485
|
function s() {
|
14454
14486
|
_classCallCheck(this, s);
|
@@ -14491,14 +14523,14 @@ function Ca() {
|
|
14491
14523
|
}();
|
14492
14524
|
return mi["default"] = s, mi;
|
14493
14525
|
}
|
14494
|
-
var
|
14495
|
-
var gi = /* @__PURE__ */
|
14496
|
-
var
|
14497
|
-
function
|
14498
|
-
_classCallCheck(this,
|
14526
|
+
var Ma = Ra();
|
14527
|
+
var gi = /* @__PURE__ */fa(Ma);
|
14528
|
+
var ka = /*#__PURE__*/function () {
|
14529
|
+
function ka(e, t) {
|
14530
|
+
_classCallCheck(this, ka);
|
14499
14531
|
this._silenceMS = 2e3, this._stop = !0, typeof t == "boolean" && t === !1 && (this._stop = !1), typeof e == "number" && (this._silenceMS = e);
|
14500
14532
|
}
|
14501
|
-
return _createClass(
|
14533
|
+
return _createClass(ka, [{
|
14502
14534
|
key: "setSilenceTimeout",
|
14503
14535
|
value: function setSilenceTimeout(e, t) {
|
14504
14536
|
var _this73 = this;
|
@@ -14568,7 +14600,7 @@ var Zt = /*#__PURE__*/function (_Gi) {
|
|
14568
14600
|
restart: !0,
|
14569
14601
|
removeNewText: !0
|
14570
14602
|
}) : null;
|
14571
|
-
}), i.submitAfterSilence && (this._silenceSubmit = new
|
14603
|
+
}), i.submitAfterSilence && (this._silenceSubmit = new ka(i.submitAfterSilence, i.stopAfterSubmit)), {
|
14572
14604
|
serviceName: Zt.getServiceName(i),
|
14573
14605
|
processedConfig: o
|
14574
14606
|
};
|
@@ -14907,11 +14939,11 @@ var Oe = /*#__PURE__*/function (_Ne) {
|
|
14907
14939
|
}(Ne);
|
14908
14940
|
Oe.TIMER_LIMIT_S = 5999;
|
14909
14941
|
var ai = Oe;
|
14910
|
-
var
|
14911
|
-
function
|
14912
|
-
_classCallCheck(this,
|
14942
|
+
var La = /*#__PURE__*/function () {
|
14943
|
+
function La() {
|
14944
|
+
_classCallCheck(this, La);
|
14913
14945
|
}
|
14914
|
-
return _createClass(
|
14946
|
+
return _createClass(La, null, [{
|
14915
14947
|
key: "create",
|
14916
14948
|
value:
|
14917
14949
|
// prettier-ignore
|
@@ -14931,7 +14963,7 @@ var hi = /*#__PURE__*/function () {
|
|
14931
14963
|
return _createClass(hi, [{
|
14932
14964
|
key: "addType",
|
14933
14965
|
value: function addType(e, t, i, s) {
|
14934
|
-
var r =
|
14966
|
+
var r = La.create(e, t, i, this.toggleContainerDisplay.bind(this), this.elementRef, s);
|
14935
14967
|
return this._fileAttachmentsTypes.push(r), r;
|
14936
14968
|
}
|
14937
14969
|
}, {
|
@@ -14962,7 +14994,7 @@ var hi = /*#__PURE__*/function () {
|
|
14962
14994
|
case 0:
|
14963
14995
|
_context128.next = 2;
|
14964
14996
|
return Promise.all(this._fileAttachmentsTypes.map(/*#__PURE__*/function () {
|
14965
|
-
var
|
14997
|
+
var _ref43 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee127(e) {
|
14966
14998
|
var t;
|
14967
14999
|
return _regeneratorRuntime().wrap(function _callee127$(_context127) {
|
14968
15000
|
while (1) switch (_context127.prev = _context127.next) {
|
@@ -14975,7 +15007,7 @@ var hi = /*#__PURE__*/function () {
|
|
14975
15007
|
}, _callee127);
|
14976
15008
|
}));
|
14977
15009
|
return function (_x232) {
|
14978
|
-
return
|
15010
|
+
return _ref43.apply(this, arguments);
|
14979
15011
|
};
|
14980
15012
|
}()));
|
14981
15013
|
case 2:
|
@@ -15331,7 +15363,7 @@ var $e = /*#__PURE__*/function () {
|
|
15331
15363
|
value: function attach(e, t, i, s, r) {
|
15332
15364
|
var o = e.validateInput || te.processValidateInput(e);
|
15333
15365
|
e._validationHandler = /*#__PURE__*/function () {
|
15334
|
-
var
|
15366
|
+
var _ref44 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee131(a) {
|
15335
15367
|
var l;
|
15336
15368
|
return _regeneratorRuntime().wrap(function _callee131$(_context131) {
|
15337
15369
|
while (1) switch (_context131.prev = _context131.next) {
|
@@ -15351,7 +15383,7 @@ var $e = /*#__PURE__*/function () {
|
|
15351
15383
|
}, _callee131);
|
15352
15384
|
}));
|
15353
15385
|
return function (_x240) {
|
15354
|
-
return
|
15386
|
+
return _ref44.apply(this, arguments);
|
15355
15387
|
};
|
15356
15388
|
}();
|
15357
15389
|
}
|
@@ -15372,16 +15404,16 @@ var jn = /*#__PURE__*/function () {
|
|
15372
15404
|
}
|
15373
15405
|
}]);
|
15374
15406
|
}();
|
15375
|
-
var
|
15376
|
-
function
|
15407
|
+
var Ia = /*#__PURE__*/function (_Gi2) {
|
15408
|
+
function Ia(e, t) {
|
15377
15409
|
var _this85;
|
15378
|
-
_classCallCheck(this,
|
15410
|
+
_classCallCheck(this, Ia);
|
15379
15411
|
var i, s;
|
15380
|
-
_this85 = _callSuper(this,
|
15412
|
+
_this85 = _callSuper(this, Ia, [t.button]), _this85._waitingForBrowserApproval = !1, _this85._audioType = e, _this85._extension = ((i = t.files) == null ? void 0 : i.format) || "mp3", _this85._maxDurationSeconds = (s = t.files) == null ? void 0 : s.maxDurationSeconds, _this85.elementRef.onclick = _this85.buttonClick.bind(_assertThisInitialized(_this85));
|
15381
15413
|
return _this85;
|
15382
15414
|
}
|
15383
|
-
_inherits(
|
15384
|
-
return _createClass(
|
15415
|
+
_inherits(Ia, _Gi2);
|
15416
|
+
return _createClass(Ia, [{
|
15385
15417
|
key: "buttonClick",
|
15386
15418
|
value: function buttonClick() {
|
15387
15419
|
this._waitingForBrowserApproval || (this.isActive ? this.stop() : (this._waitingForBrowserApproval = !0, this.record()));
|
@@ -15433,7 +15465,7 @@ var La = /*#__PURE__*/function (_Gi2) {
|
|
15433
15465
|
}
|
15434
15466
|
}]);
|
15435
15467
|
}(Gi);
|
15436
|
-
var
|
15468
|
+
var Oa = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n<svg xmlns=\"http://www.w3.org/2000/svg\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1\" viewBox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"14\"></line>\n <polygon points=\"22 2 15 22 11 14 2 10 22 2\"></polygon>\n</svg>\n";
|
15437
15469
|
var it = /*#__PURE__*/function () {
|
15438
15470
|
function it() {
|
15439
15471
|
_classCallCheck(this, it);
|
@@ -15470,7 +15502,7 @@ var P = /*#__PURE__*/function (_ct6) {
|
|
15470
15502
|
var _this89;
|
15471
15503
|
_classCallCheck(this, P);
|
15472
15504
|
var a = it.process(e.submitButtonStyles),
|
15473
|
-
l =
|
15505
|
+
l = Oa;
|
15474
15506
|
_this89 = _callSuper(this, P, [P.createButtonContainerElement(), l, a == null ? void 0 : a.position, a]), _this89._isSVGLoadingIconOverriden = !1, _this89.status = {
|
15475
15507
|
requestInProgress: !1,
|
15476
15508
|
loadingActive: !1
|
@@ -15681,12 +15713,12 @@ var P = /*#__PURE__*/function (_ct6) {
|
|
15681
15713
|
}, {
|
15682
15714
|
key: "addNewMessage",
|
15683
15715
|
value: function () {
|
15684
|
-
var _addNewMessage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee135(
|
15716
|
+
var _addNewMessage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee135(_ref45) {
|
15685
15717
|
var e, t, i, s;
|
15686
15718
|
return _regeneratorRuntime().wrap(function _callee135$(_context135) {
|
15687
15719
|
while (1) switch (_context135.prev = _context135.next) {
|
15688
15720
|
case 0:
|
15689
|
-
e =
|
15721
|
+
e = _ref45.text, t = _ref45.files, i = _ref45.custom;
|
15690
15722
|
s = {
|
15691
15723
|
role: y.USER_ROLE,
|
15692
15724
|
custom: i
|
@@ -15776,10 +15808,10 @@ var P = /*#__PURE__*/function (_ct6) {
|
|
15776
15808
|
}(ct);
|
15777
15809
|
P.SUBMIT_CLASS = "submit-button", P.LOADING_CLASS = "loading-button", P.DISABLED_CLASS = "disabled-button";
|
15778
15810
|
var vs = P;
|
15779
|
-
var
|
15780
|
-
|
15781
|
-
|
15782
|
-
|
15811
|
+
var Pa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M27.1 14.313V5.396L24.158 8.34c-2.33-2.325-5.033-3.503-8.11-3.503C9.902 4.837 4.901 9.847 4.899 16c.001 6.152 5.003 11.158 11.15 11.16 4.276 0 9.369-2.227 10.836-8.478l.028-.122h-3.23l-.022.068c-1.078 3.242-4.138 5.421-7.613 5.421a8 8 0 0 1-5.691-2.359A7.993 7.993 0 0 1 8 16.001c0-4.438 3.611-8.049 8.05-8.049 2.069 0 3.638.58 5.924 2.573l-3.792 3.789H27.1z\"/>\n</svg>\n",
|
15812
|
+
Na = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0 16q0 3.264 1.28 6.208t3.392 5.12 5.12 3.424 6.208 1.248 6.208-1.248 5.12-3.424 3.392-5.12 1.28-6.208-1.28-6.208-3.392-5.12-5.088-3.392-6.24-1.28q-3.264 0-6.208 1.28t-5.12 3.392-3.392 5.12-1.28 6.208zM4 16q0-3.264 1.6-6.016t4.384-4.352 6.016-1.632 6.016 1.632 4.384 4.352 1.6 6.016-1.6 6.048-4.384 4.352-6.016 1.6-6.016-1.6-4.384-4.352-1.6-6.048z\"></path>\n</svg>\n",
|
15813
|
+
Da = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z\"/>\n</svg>",
|
15814
|
+
Ba = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4.89163 13.2687L9.16582 17.5427L18.7085 8\" stroke=\"#000000\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";
|
15783
15815
|
var Ms = /*#__PURE__*/function (_tt) {
|
15784
15816
|
// prettier-ignore
|
15785
15817
|
function Ms(e, t, i, s) {
|
@@ -15789,18 +15821,18 @@ var Ms = /*#__PURE__*/function (_tt) {
|
|
15789
15821
|
var _this93$addButtonsAnd = _this93.addButtonsAndTheirEvents(t),
|
15790
15822
|
r = _this93$addButtonsAnd.captureButton,
|
15791
15823
|
o = _this93$addButtonsAnd.submitButton;
|
15792
|
-
_this93._captureButton = r, _this93._submitButton = o, _this93._captureIcon = _this93._captureButton.children[0], _this93._refreshIcon = Ue.createSVGElement(
|
15824
|
+
_this93._captureButton = r, _this93._submitButton = o, _this93._captureIcon = _this93._captureButton.children[0], _this93._refreshIcon = Ue.createSVGElement(Pa), _this93._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (s == null ? void 0 : s.format) === "jpeg" && (_this93._format = "image/jpeg"), s != null && s.dimensions && (_this93._dimensions = s.dimensions), _this93._contentRef.appendChild(_this93._canvas), _this93.extensionCloseCallback = _this93.stop;
|
15793
15825
|
return _this93;
|
15794
15826
|
}
|
15795
15827
|
_inherits(Ms, _tt);
|
15796
15828
|
return _createClass(Ms, [{
|
15797
15829
|
key: "addButtonsAndTheirEvents",
|
15798
15830
|
value: function addButtonsAndTheirEvents(e) {
|
15799
|
-
var t = tt.createSVGButton(
|
15831
|
+
var t = tt.createSVGButton(Na);
|
15800
15832
|
t.classList.add("modal-svg-camera-button"), t.children[0].classList.add("modal-svg-camera-icon");
|
15801
|
-
var i = this.addCloseButton(
|
15833
|
+
var i = this.addCloseButton(Da, !0);
|
15802
15834
|
i.classList.add("modal-svg-close-button"), i.children[0].classList.add("modal-svg-close-icon");
|
15803
|
-
var s = tt.createSVGButton(
|
15835
|
+
var s = tt.createSVGButton(Ba);
|
15804
15836
|
return s.classList.add("modal-svg-submit-button"), this.addButtons(t, s), this.addButtonEvents(t, i, s, e), {
|
15805
15837
|
captureButton: t,
|
15806
15838
|
submitButton: s
|
@@ -15893,7 +15925,7 @@ var Ms = /*#__PURE__*/function (_tt) {
|
|
15893
15925
|
}
|
15894
15926
|
}]);
|
15895
15927
|
}(tt);
|
15896
|
-
var
|
15928
|
+
var Fa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M29 7h-4.599l-2.401-4h-12l-2.4 4h-4.6c-1 0-3 1-3 2.969v16.031c0 1.657 1.5 3 2.792 3h26.271c1.313 0 2.938-1.406 2.938-2.968v-16.032c0-1-1-3-3-3zM30 26.032c0 0.395-0.639 0.947-0.937 0.969h-26.265c-0.232-0.019-0.797-0.47-0.797-1v-16.031c0-0.634 0.851-0.953 1-0.969h5.732l2.4-4h9.802l1.785 3.030 0.55 0.97h5.731c0.705 0 0.99 0.921 1 1v16.032zM16 10c-3.866 0-7 3.134-7 7s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zM16 22c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5z\"></path>\n</svg>";
|
15897
15929
|
var ks = /*#__PURE__*/function (_ct7) {
|
15898
15930
|
function ks(e, t, i) {
|
15899
15931
|
var _this97;
|
@@ -15901,7 +15933,7 @@ var ks = /*#__PURE__*/function (_ct7) {
|
|
15901
15933
|
var a, l, c, d;
|
15902
15934
|
var s = (a = i == null ? void 0 : i.button) == null ? void 0 : a.position,
|
15903
15935
|
r = ((d = (c = (l = i == null ? void 0 : i.button) == null ? void 0 : l.styles) == null ? void 0 : c.text) == null ? void 0 : d.content) || "Photo";
|
15904
|
-
_this97 = _callSuper(this, ks, [ks.createButtonElement(),
|
15936
|
+
_this97 = _callSuper(this, ks, [ks.createButtonElement(), Fa, s, (i == null ? void 0 : i.button) || {}, r]);
|
15905
15937
|
var o = _this97.createInnerElementsForStates(_this97.customStyles);
|
15906
15938
|
i && _this97.addClickEvent(e, t, i.modalContainerStyle, i.files), _this97.changeElementsByState(o.styles), _this97.reapplyStateStyle("styles");
|
15907
15939
|
return _this97;
|
@@ -15961,7 +15993,7 @@ var ht = /*#__PURE__*/function () {
|
|
15961
15993
|
if ((l = t.recordAudio) != null && l.files) {
|
15962
15994
|
var _d = ((c = s.audio) == null ? void 0 : c.fileType) || r.addType(e, t, t.recordAudio.files, "audio");
|
15963
15995
|
s.microphone = {
|
15964
|
-
button: new
|
15996
|
+
button: new Ia(_d, t.recordAudio)
|
15965
15997
|
};
|
15966
15998
|
}
|
15967
15999
|
return Pe.isEnabled(r, e.dragAndDrop) && Pe.create(i, r, e.dragAndDrop), r;
|
@@ -15981,10 +16013,10 @@ var ht = /*#__PURE__*/function () {
|
|
15981
16013
|
c = i[l];
|
15982
16014
|
if (c.files) {
|
15983
16015
|
var d = s.addType(e, t, c.files, l),
|
15984
|
-
|
15985
|
-
u =
|
15986
|
-
h =
|
15987
|
-
f =
|
16016
|
+
_ua$l = ua[l],
|
16017
|
+
u = _ua$l.id,
|
16018
|
+
h = _ua$l.svgString,
|
16019
|
+
f = _ua$l.dropupText,
|
15988
16020
|
m = new Di(r, d, c, u, h, f);
|
15989
16021
|
o[l] = {
|
15990
16022
|
button: m,
|
@@ -16041,11 +16073,11 @@ var Ls = /*#__PURE__*/function () {
|
|
16041
16073
|
}
|
16042
16074
|
}]);
|
16043
16075
|
}();
|
16044
|
-
var Fa = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-microphone-active{background-color:#ffe7e7}.deep-chat-openai-realtime-microphone-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-microphone-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-microphone>*{height:30px;width:30px}.deep-chat-openai-realtime-microphone-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-left:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);left:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;left:50%;transform:translate(-50%,-50%)}#insert-key-view{height:100%;position:relative}#insert-key-contents{text-align:center;position:absolute;top:44%;left:50%;transform:translate(-50%,-50%);width:82%;display:flex;max-width:700px}#insert-key-title{margin-bottom:15px}#insert-key-input-container{margin-right:2.7em;width:calc(100% - 80px)}#insert-key-input{padding:.3em 1.7em .3em .3em;border-width:1px;border-style:solid;border-radius:3px;width:100%;font-size:inherit}.insert-key-input-valid{border-color:gray}.insert-key-input-invalid{border-color:red}#visibility-icon-container{position:relative;float:right;cursor:pointer;-webkit-user-select:none;user-select:none}.visibility-icon{filter:brightness(0) saturate(100%) invert(63%) sepia(1%) saturate(9%) hue-rotate(43deg) brightness(98%) contrast(92%);position:absolute;right:-1.7em;top:-1.43em}#visible-icon{top:-1.4em}.visibility-icon:hover{filter:unset}.visibility-icon>*{pointer-events:none}#start-button{border:1px solid grey;color:#454545;border-radius:4px;width:3em;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:.28em .3em;-webkit-user-select:none;user-select:none;background-color:#fff}#start-button:hover{background-color:#f2f2f2}#start-button:active{background-color:#d2d2d2}#insert-key-help-text-container{width:100%;position:absolute;margin-top:32px;margin-bottom:20px}#insert-key-help-text-contents{width:100%;position:absolute}#insert-key-input-invalid-text{display:block;margin-top:1em;margin-bottom:.5em;color:red}.insert-key-input-help-text{display:block;margin-top:16px}#loading-key{display:inline-block;width:16px;height:16px}#loading-key:after{content:\" \";display:block;width:11px;height:11px;margin:1px;border-radius:50%;border:2px solid #0084ff;border-color:#0084ff transparent #0084ff transparent;animation:loading-spinner 1.2s linear infinite}#error-view{color:red;font-size:1.2em;line-height:1.3em;margin-top:-5px;text-align:center;height:100%;display:flex;justify-content:center;align-items:center;padding-left:8px;padding-right:8px}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.intro-panel{position:absolute;display:flex;justify-content:center;right:0;bottom:0;left:0;margin:auto;height:fit-content;top:-2.5em}#internal-intro-panel{width:250px;height:min-content;display:block;border-radius:5px;overflow:auto;border:1px solid rgb(203,203,203);padding:10px;max-height:calc(100% - 6.8em)}#internal-intro-panel>p{margin-block-start:.8em;margin-block-end:.8em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: a11y-dark\n Author: @ericwbailey\n Maintainer: @ericwbailey\n\n Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css\n*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast: active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}#messages{overflow:auto}.outer-message-container:last-child{margin-bottom:5px}.inner-message-container{display:flex;margin-left:auto;margin-right:auto;width:calc(97.5% - 24px);max-width:100%}.message-bubble{margin-top:10px;word-wrap:break-word;width:fit-content;max-width:60%;border-radius:10px;padding:.42em .55em;height:fit-content;line-height:1.26em}.user-message-text{color:#fff;background-color:#0084ff;margin-right:0;margin-left:auto}.ai-message-text{color:#000;background-color:#e4e6eb;margin-left:0;margin-right:auto}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.deep-chat-loading-message-dots-container{width:1em;padding:.6em .75em .6em 1.3em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.message-bubble>p:first-child,.message-bubble>.partial-render-message>p:first-child,.stream-wrapper>p:first-child{margin-top:0}.message-bubble>p:last-child,.message-bubble>.partial-render-message:last-child>p,.stream-wrapper>p:last-child{margin-bottom:0}pre{overflow:auto;display:block;word-break:break-all;word-wrap:break-word;border-radius:7px;background:#2b2b2b;color:#f8f8f2;margin-top:.8em;margin-bottom:.8em;padding:.6em;font-size:.9em;line-height:1.5em}.image-message{padding:0;display:flex;background-color:#ddd}.image-message>*,.image-message>*>*{width:100%;border-radius:8px;display:flex}.audio-message{width:60%;max-width:300px;height:2.2em;max-height:54px;padding:0;background-color:unset}.audio-player{width:100%;height:100%}.audio-player-safari{height:fit-content;width:40px}.audio-player-safari-left{float:left}.audio-player-safari-right{float:right}.any-file-message{padding:1px}.any-file-message-contents{display:flex}.any-file-message-icon-container{width:1.3em;min-width:1.3em;position:relative;border-radius:4px;margin-left:6px;margin-right:2px}.any-file-message-icon{background-color:#fff;border-radius:4px;position:absolute;width:1em;height:1.25em;padding:1px;margin-top:auto;margin-bottom:auto;top:0;bottom:0}.any-file-message-text{padding-top:5px;overflow-wrap:anywhere;padding-bottom:5px;padding-right:7px}.message-bubble>a{color:inherit}.left-item-position{margin-right:10px}.right-item-position{margin-left:10px}.role-hidden{display:none}.avatar{padding-top:5px;width:1.5em;height:1.5em;border-radius:1px}.avatar-container{margin-top:9px}.name{margin-top:16px;font-size:15px}#drag-and-drop{position:absolute;display:none;z-index:10;height:calc(100% - 10px);width:calc(100% - 10px);background-color:#70c6ff4d;border:5px dashed #6dafff}#file-attachment-container{position:absolute;height:3.6em;width:calc(80% - 4px);top:-2.5em;border-radius:5px;overflow:auto;text-align:left;background-color:#d7d7d73b;padding-left:4px}.file-attachment{width:2.85em;height:2.85em;display:inline-flex;margin-right:.6em;margin-bottom:.44em;margin-top:4px;position:relative;background-color:#fff;border-radius:5px}.image-attachment{width:100%;height:100%;object-fit:cover;border-radius:5px}.border-bound-attachment{width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid #c3c3c3;border-radius:5px;overflow:hidden}.border-bound-attachment-safari{width:calc(100% - 1px);height:calc(100% - 1px)}.audio-attachment-icon-container{cursor:pointer}.audio-attachment-icon-container:hover{background-color:#f8f8f8}.attachment-icon{left:0;right:0;bottom:0;top:2px;margin:auto;position:absolute;width:25px;-webkit-user-select:none;user-select:none}.not-removable-attachment-icon{top:0;right:0;bottom:0;left:0}.play-icon{filter:brightness(0) saturate(100%) invert(17%) sepia(0%) saturate(1392%) hue-rotate(67deg) brightness(98%) contrast(97%)}.stop-icon{filter:brightness(0) saturate(100%) invert(29%) sepia(90%) saturate(1228%) hue-rotate(198deg) brightness(93%) contrast(98%)}.audio-placeholder-text-3-digits{padding-left:.26rem}.audio-placeholder-text-4-digits{padding-left:.1rem}.any-file-attachment{padding:2px 0}.file-attachment-text-container{position:absolute;width:inherit;display:flex;align-items:center;height:100%;top:-1px}.audio-placeholder-text-3-digits-container{padding-top:1px;cursor:default}.any-file-attachment-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:.13em;margin-left:auto;margin-right:auto}.remove-file-attachment-button{height:1.25em;width:1.25em;border:1px solid #cfcfcf;border-radius:25px;background-color:#fff;top:-4px;right:-5px;position:absolute;display:flex;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}.remove-file-attachment-button:hover{background-color:#e4e4e4}.remove-file-attachment-button:active{background-color:#d7d7d7}.x-icon{color:#4e4e4e;top:-.075em;position:relative;font-size:1.05em}.modal{display:none;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:80%;max-width:420px;max-height:80%;margin:auto;top:0;right:0;bottom:0;left:0;z-index:3}.modal-content{border-top:1px solid rgb(217,217,217);border-left:1px solid rgb(217,217,217);border-right:1px solid rgb(217,217,217);border-top-left-radius:inherit;border-top-right-radius:inherit;background-color:#fff;overflow-y:auto;height:fit-content;max-height:calc(100% - 3.3em);width:100%}.modal-content>p{margin-left:1em;margin-right:1em}.modal-content>ul{margin-right:1em}.modal-button-panel{height:3.3em;border:1px solid;border-color:rgb(223,223,223) rgb(217,217,217) rgb(217,217,217);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;background-color:#fff;text-align:center;justify-content:center;display:flex;width:100%}.modal-button{min-width:2.5em;text-align:center;color:#fff;border-radius:5px;padding:.4em .4em .3em;height:1.25em;background-color:#3279b2;top:0;bottom:0;cursor:pointer;-webkit-user-select:none;user-select:none;margin:auto .31em}.modal-button:hover{background-color:#276da7}.modal-button:active{background-color:#1b5687}.modal-svg-button{padding:0 0 2px;width:2em;height:1.8em}.modal-svg-button-icon{width:100%;height:100%;filter:brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%)}#modal-background-panel{position:absolute;width:100%;height:100%;background-color:#00000042;z-index:2;display:none}.show-modal-background{animation:fadeInBackground .3s ease-in-out}@keyframes fadeInBackground{0%{opacity:0}to{opacity:1}}.show-modal{animation:fadeInModal .3s ease-in-out}@keyframes fadeInModal{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}.hide-modal-background{animation:fadeOutBackground .2s ease-in-out}@keyframes fadeOutBackground{0%{opacity:1}to{opacity:0}}.hide-modal{animation:fadeOutModal .2s ease-in-out}@keyframes fadeOutModal{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.modal-camera-content{overflow:hidden;text-align:center;border:unset;height:100%;background-color:#2a2a2a;display:flex;justify-content:center}.camera-modal-canvas{max-width:100%;max-height:100%;margin-top:auto;margin-bottom:auto}.modal-svg-submit-button{background-color:green}.modal-svg-submit-button:hover{background-color:#007500}.modal-svg-submit-button:active{background-color:#006500}.modal-svg-submit-disabled{pointer-events:none;background-color:#747474}.modal-svg-close-button{height:1.56em;padding-top:.37em;padding-bottom:0;background-color:#c13e3e}.modal-svg-close-button:hover{background-color:#b43434}.modal-svg-close-button:active{background-color:#972929}.modal-svg-close-icon{width:80%;height:80%}.modal-svg-camera-button{height:1.6em;padding-top:.38em;padding-bottom:0}.modal-svg-camera-icon{height:76%}.modal-svg-refresh-icon{height:105%}.modal-svg-refresh-button{height:1.66em;padding-top:.11em;padding-bottom:.21em}.input-button-container{position:relative;z-index:1}.inside-right{position:absolute;right:calc(10% + .35em);bottom:.85em}.inside-left{position:absolute;left:calc(10% + .35em);bottom:.85em}.outside-left{position:absolute;right:calc(11px - .55em);bottom:.88em}.outside-right{position:absolute;left:calc(11px - .55em);bottom:.88em}#upload-images-icon{position:absolute;pointer-events:none;width:1.45em;height:1.45em;left:.11em;bottom:.08em;filter:brightness(0) saturate(100%) invert(43%) sepia(0%) saturate(740%) hue-rotate(77deg) brightness(99%) contrast(92%)}#upload-gifs-icon{position:absolute;pointer-events:none;width:1.5em;height:1.48em;left:.07em;bottom:.08em;filter:brightness(0) saturate(100%) invert(49%) sepia(0%) saturate(2586%) hue-rotate(12deg) brightness(93%) contrast(90%)}#upload-audio-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.17em;bottom:.2em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%);transform:scaleX(.95)}#camera-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.23em;bottom:.2em;filter:brightness(0) saturate(100%) invert(52%) sepia(0%) saturate(161%) hue-rotate(164deg) brightness(91%) contrast(92%);transform:scaleX(.95)}#upload-mixed-files-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.2em;filter:brightness(0) saturate(100%) invert(53%) sepia(0%) saturate(36%) hue-rotate(74deg) brightness(98%) contrast(93%);transform:scaleX(.95)}#interim-text{color:gray}#microphone-button{padding-top:.5px}.outer-button-container>#microphone-button{padding-bottom:1px}#microphone-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.25em}.default-microphone-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%)}.active-microphone-icon{filter:brightness(0) saturate(100%) invert(10%) sepia(97%) saturate(7495%) hue-rotate(0deg) brightness(101%) contrast(107%);border-radius:10px}.command-microphone-icon{filter:brightness(0) saturate(100%) invert(42%) sepia(96%) saturate(1067%) hue-rotate(77deg) brightness(99%) contrast(102%)}.unsupported-microphone{display:none}#submit-icon{height:100%;filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%);width:1.21em}#stop-icon{background-color:#acacac;position:absolute;width:.95em;height:.95em;left:.35em;bottom:.35em;border-radius:2px}.submit-button-enlarged{scale:1.1;margin-right:.3em;margin-left:.3em}.loading-submit-button{position:relative;left:calc(-9990px + .275em);width:.22em;height:.22em;border-radius:5px;background-color:#848484;color:#848484;box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484;animation:loading-submit-button 1.5s infinite linear;bottom:-.75em}@keyframes loading-submit-button{0%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}16.667%{box-shadow:9990px -6px #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}33.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}50%{box-shadow:9990px 0 #848484,calc(9990px + .44em) -6px 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}66.667%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}83.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) -6px 0 0 #848484}to{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}}.input-button{border-radius:4px;cursor:pointer;margin-bottom:.2em;-webkit-user-select:none;user-select:none}.input-button-svg{width:1.65em;height:1.65em}.input-button-svg-text{padding:1px;height:1.65em;display:flex}.input-button-svg-text>svg{padding:.22rem}.input-button-svg-text>div{margin-left:2px}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.input-button:active:not(:hover){background-color:transparent}.loading-button{cursor:auto}.loading-button:hover{background-color:unset}.text-button{filter:unset!important;display:flex;justify-content:center;align-items:center;margin-left:4px;margin-right:4px;height:1.6em;width:max-content}#custom-icon{height:100%;width:1.2em}.custom-button-container-default{color:#505050}.custom-button-container-default>.dropup-menu-item-icon{color:unset}.custom-button-container-default>svg{filter:brightness(0) saturate(100%) invert(39%) sepia(1%) saturate(0%) hue-rotate(83deg) brightness(93%) contrast(90%)}.custom-button-container-default>.dropup-menu-item-icon>svg{position:absolute;left:.2em}.custom-button-container-active{background-color:#edf7ff;color:#0285ff}.custom-button-container-active:hover,.custom-button-container-active:focus-visible{background-color:#def0ff}.custom-button-container-active:active{background-color:#d2eaff}.custom-button-container-active>svg{filter:brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)}.custom-button-container-disabled{color:#aeaeae;cursor:auto}.custom-button-container-disabled>div{pointer-events:none}.custom-button-container-disabled:hover,.custom-button-container-disabled:focus-visible{background-color:transparent}.custom-button-container-disabled:active{background-color:transparent}.custom-button-container-disabled>svg{filter:brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)}#text-input-container{background-color:#fff;width:80%;display:flex;border:1px solid #0000001a;border-radius:5px;margin-top:.8em;margin-bottom:.8em;box-shadow:#959da533 0 1px 12px;overflow-y:auto;max-height:200px;position:relative}.text-input-container-left-adjustment{margin-left:1.5em}.text-input-container-right-adjustment{margin-right:1.5em}.text-input-container-left-small-adjustment{margin-left:1.1em}.text-input-container-left-small-adjustment>.outside-left{right:calc(14px - .55em)}.text-input-container-right-small-adjustment{margin-right:1.1em}.text-input-container-right-small-adjustment>.outside-right{left:calc(14px - .55em)}#text-input{text-align:left;outline:none;word-wrap:break-word;line-break:auto}.text-input-styling{padding:.4em .5em;overflow:overlay;width:100%}.text-input-inner-left-adjustment{padding-left:2.2em}.text-input-inner-right-adjustment{padding-right:2em}.text-input-disabled{pointer-events:none;-webkit-user-select:none;user-select:none}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{color:gray}.outside-right>#dropup-menu,.inside-right>#dropup-menu{right:0}#dropup-icon{position:absolute;pointer-events:none;width:1.16em;height:1.2em;left:.265em;bottom:.43em;filter:brightness(0) saturate(100%) invert(54%) sepia(0%) saturate(724%) hue-rotate(6deg) brightness(92%) contrast(90%)}.dropup-button>*{pointer-events:none}#dropup-menu{background-color:#fff;position:absolute;transform:translateY(-100%);border-radius:5px;z-index:1;top:-.49em;box-shadow:#0003 -1px 2px 10px,#0000001a 0 2px 4px;cursor:pointer;-webkit-user-select:none;user-select:none}.dropup-menu-item{height:1.4em;padding:.28em .84em .28em .35em;display:flex;position:relative}.dropup-menu-item:hover,.dropup-menu-item:focus-visible{background-color:#f3f3f3}.dropup-menu-item:active{background-color:#ebebeb}.dropup-menu-item:active:not(:hover){background-color:transparent}.dropup-menu-item:first-child{padding-top:.49em;border-top-left-radius:inherit;border-top-right-radius:inherit}.dropup-menu-item:last-child{padding-bottom:.45em;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.dropup-menu-item-icon{width:1.39em;position:relative}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}#dropup-menu-item-icon-element-custom{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.28em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%)}.dropup-menu-item-text{margin-left:.56em;margin-top:.08em;width:max-content}#input{width:100%;display:inline-flex;text-align:center;margin-left:auto;margin-right:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;display:grid;grid-template-columns:100%}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";
|
16045
|
-
var
|
16046
|
-
|
16076
|
+
var Ua = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-microphone-active{background-color:#ffe7e7}.deep-chat-openai-realtime-microphone-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-microphone-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-microphone>*{height:30px;width:30px}.deep-chat-openai-realtime-microphone-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-left:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);left:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;left:50%;transform:translate(-50%,-50%)}#insert-key-view{height:100%;position:relative}#insert-key-contents{text-align:center;position:absolute;top:44%;left:50%;transform:translate(-50%,-50%);width:82%;display:flex;max-width:700px}#insert-key-title{margin-bottom:15px}#insert-key-input-container{margin-right:2.7em;width:calc(100% - 80px)}#insert-key-input{padding:.3em 1.7em .3em .3em;border-width:1px;border-style:solid;border-radius:3px;width:100%;font-size:inherit}.insert-key-input-valid{border-color:gray}.insert-key-input-invalid{border-color:red}#visibility-icon-container{position:relative;float:right;cursor:pointer;-webkit-user-select:none;user-select:none}.visibility-icon{filter:brightness(0) saturate(100%) invert(63%) sepia(1%) saturate(9%) hue-rotate(43deg) brightness(98%) contrast(92%);position:absolute;right:-1.7em;top:-1.43em}#visible-icon{top:-1.4em}.visibility-icon:hover{filter:unset}.visibility-icon>*{pointer-events:none}#start-button{border:1px solid grey;color:#454545;border-radius:4px;width:3em;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:.28em .3em;-webkit-user-select:none;user-select:none;background-color:#fff}#start-button:hover{background-color:#f2f2f2}#start-button:active{background-color:#d2d2d2}#insert-key-help-text-container{width:100%;position:absolute;margin-top:32px;margin-bottom:20px}#insert-key-help-text-contents{width:100%;position:absolute}#insert-key-input-invalid-text{display:block;margin-top:1em;margin-bottom:.5em;color:red}.insert-key-input-help-text{display:block;margin-top:16px}#loading-key{display:inline-block;width:16px;height:16px}#loading-key:after{content:\" \";display:block;width:11px;height:11px;margin:1px;border-radius:50%;border:2px solid #0084ff;border-color:#0084ff transparent #0084ff transparent;animation:loading-spinner 1.2s linear infinite}#error-view{color:red;font-size:1.2em;line-height:1.3em;margin-top:-5px;text-align:center;height:100%;display:flex;justify-content:center;align-items:center;padding-left:8px;padding-right:8px}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.intro-panel{position:absolute;display:flex;justify-content:center;right:0;bottom:0;left:0;margin:auto;height:fit-content;top:-2.5em}#internal-intro-panel{width:250px;height:min-content;display:block;border-radius:5px;overflow:auto;border:1px solid rgb(203,203,203);padding:10px;max-height:calc(100% - 6.8em)}#internal-intro-panel>p{margin-block-start:.8em;margin-block-end:.8em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: a11y-dark\n Author: @ericwbailey\n Maintainer: @ericwbailey\n\n Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css\n*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast: active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}#messages{overflow:auto}.outer-message-container:last-child{margin-bottom:5px}.inner-message-container{display:flex;margin-left:auto;margin-right:auto;width:calc(97.5% - 24px);max-width:100%}.message-bubble{margin-top:10px;word-wrap:break-word;width:fit-content;max-width:60%;border-radius:10px;padding:.42em .55em;height:fit-content;line-height:1.26em}.user-message-text{color:#fff;background-color:#0084ff;margin-right:0;margin-left:auto}.ai-message-text{color:#000;background-color:#e4e6eb;margin-left:0;margin-right:auto}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.deep-chat-loading-message-dots-container{width:1em;padding:.6em .75em .6em 1.3em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.message-bubble>p:first-child,.message-bubble>.partial-render-message>p:first-child,.stream-wrapper>p:first-child{margin-top:0}.message-bubble>p:last-child,.message-bubble>.partial-render-message:last-child>p,.stream-wrapper>p:last-child{margin-bottom:0}pre{overflow:auto;display:block;word-break:break-all;word-wrap:break-word;border-radius:7px;background:#2b2b2b;color:#f8f8f2;margin-top:.8em;margin-bottom:.8em;padding:.6em;font-size:.9em;line-height:1.5em}.image-message{padding:0;display:flex;background-color:#ddd}.image-message>*,.image-message>*>*{width:100%;border-radius:8px;display:flex}.audio-message{width:60%;max-width:300px;height:2.2em;max-height:54px;padding:0;background-color:unset}.audio-player{width:100%;height:100%}.audio-player-safari{height:fit-content;width:40px}.audio-player-safari-left{float:left}.audio-player-safari-right{float:right}.any-file-message{padding:1px}.any-file-message-contents{display:flex}.any-file-message-icon-container{width:1.3em;min-width:1.3em;position:relative;border-radius:4px;margin-left:6px;margin-right:2px}.any-file-message-icon{background-color:#fff;border-radius:4px;position:absolute;width:1em;height:1.25em;padding:1px;margin-top:auto;margin-bottom:auto;top:0;bottom:0}.any-file-message-text{padding-top:5px;overflow-wrap:anywhere;padding-bottom:5px;padding-right:7px}.message-bubble>a{color:inherit}.left-item-position{margin-right:10px}.right-item-position{margin-left:10px}.role-hidden{display:none}.avatar{padding-top:5px;width:1.5em;height:1.5em;border-radius:1px}.avatar-container{margin-top:9px}.name{margin-top:16px;font-size:15px}#drag-and-drop{position:absolute;display:none;z-index:10;height:calc(100% - 10px);width:calc(100% - 10px);background-color:#70c6ff4d;border:5px dashed #6dafff}#file-attachment-container{position:absolute;height:3.6em;width:calc(80% - 4px);top:-2.5em;border-radius:5px;overflow:auto;text-align:left;background-color:#d7d7d73b;padding-left:4px}.file-attachment{width:2.85em;height:2.85em;display:inline-flex;margin-right:.6em;margin-bottom:.44em;margin-top:4px;position:relative;background-color:#fff;border-radius:5px}.image-attachment{width:100%;height:100%;object-fit:cover;border-radius:5px}.border-bound-attachment{width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid #c3c3c3;border-radius:5px;overflow:hidden}.border-bound-attachment-safari{width:calc(100% - 1px);height:calc(100% - 1px)}.audio-attachment-icon-container{cursor:pointer}.audio-attachment-icon-container:hover{background-color:#f8f8f8}.attachment-icon{left:0;right:0;bottom:0;top:2px;margin:auto;position:absolute;width:25px;-webkit-user-select:none;user-select:none}.not-removable-attachment-icon{top:0;right:0;bottom:0;left:0}.play-icon{filter:brightness(0) saturate(100%) invert(17%) sepia(0%) saturate(1392%) hue-rotate(67deg) brightness(98%) contrast(97%)}.stop-icon{filter:brightness(0) saturate(100%) invert(29%) sepia(90%) saturate(1228%) hue-rotate(198deg) brightness(93%) contrast(98%)}.audio-placeholder-text-3-digits{padding-left:.26rem}.audio-placeholder-text-4-digits{padding-left:.1rem}.any-file-attachment{padding:2px 0}.file-attachment-text-container{position:absolute;width:inherit;display:flex;align-items:center;height:100%;top:-1px}.audio-placeholder-text-3-digits-container{padding-top:1px;cursor:default}.any-file-attachment-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:.13em;margin-left:auto;margin-right:auto}.remove-file-attachment-button{height:1.25em;width:1.25em;border:1px solid #cfcfcf;border-radius:25px;background-color:#fff;top:-4px;right:-5px;position:absolute;display:flex;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}.remove-file-attachment-button:hover{background-color:#e4e4e4}.remove-file-attachment-button:active{background-color:#d7d7d7}.x-icon{color:#4e4e4e;top:-.075em;position:relative;font-size:1.05em}.modal{display:none;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:80%;max-width:420px;max-height:80%;margin:auto;top:0;right:0;bottom:0;left:0;z-index:3}.modal-content{border-top:1px solid rgb(217,217,217);border-left:1px solid rgb(217,217,217);border-right:1px solid rgb(217,217,217);border-top-left-radius:inherit;border-top-right-radius:inherit;background-color:#fff;overflow-y:auto;height:fit-content;max-height:calc(100% - 3.3em);width:100%}.modal-content>p{margin-left:1em;margin-right:1em}.modal-content>ul{margin-right:1em}.modal-button-panel{height:3.3em;border:1px solid;border-color:rgb(223,223,223) rgb(217,217,217) rgb(217,217,217);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;background-color:#fff;text-align:center;justify-content:center;display:flex;width:100%}.modal-button{min-width:2.5em;text-align:center;color:#fff;border-radius:5px;padding:.4em .4em .3em;height:1.25em;background-color:#3279b2;top:0;bottom:0;cursor:pointer;-webkit-user-select:none;user-select:none;margin:auto .31em}.modal-button:hover{background-color:#276da7}.modal-button:active{background-color:#1b5687}.modal-svg-button{padding:0 0 2px;width:2em;height:1.8em}.modal-svg-button-icon{width:100%;height:100%;filter:brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%)}#modal-background-panel{position:absolute;width:100%;height:100%;background-color:#00000042;z-index:2;display:none}.show-modal-background{animation:fadeInBackground .3s ease-in-out}@keyframes fadeInBackground{0%{opacity:0}to{opacity:1}}.show-modal{animation:fadeInModal .3s ease-in-out}@keyframes fadeInModal{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}.hide-modal-background{animation:fadeOutBackground .2s ease-in-out}@keyframes fadeOutBackground{0%{opacity:1}to{opacity:0}}.hide-modal{animation:fadeOutModal .2s ease-in-out}@keyframes fadeOutModal{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.modal-camera-content{overflow:hidden;text-align:center;border:unset;height:100%;background-color:#2a2a2a;display:flex;justify-content:center}.camera-modal-canvas{max-width:100%;max-height:100%;margin-top:auto;margin-bottom:auto}.modal-svg-submit-button{background-color:green}.modal-svg-submit-button:hover{background-color:#007500}.modal-svg-submit-button:active{background-color:#006500}.modal-svg-submit-disabled{pointer-events:none;background-color:#747474}.modal-svg-close-button{height:1.56em;padding-top:.37em;padding-bottom:0;background-color:#c13e3e}.modal-svg-close-button:hover{background-color:#b43434}.modal-svg-close-button:active{background-color:#972929}.modal-svg-close-icon{width:80%;height:80%}.modal-svg-camera-button{height:1.6em;padding-top:.38em;padding-bottom:0}.modal-svg-camera-icon{height:76%}.modal-svg-refresh-icon{height:105%}.modal-svg-refresh-button{height:1.66em;padding-top:.11em;padding-bottom:.21em}.input-button-container{position:relative;z-index:1}.inside-right{position:absolute;right:calc(10% + .35em);bottom:.85em}.inside-left{position:absolute;left:calc(10% + .35em);bottom:.85em}.outside-left{position:absolute;right:calc(11px - .55em);bottom:.88em}.outside-right{position:absolute;left:calc(11px - .55em);bottom:.88em}#upload-images-icon{position:absolute;pointer-events:none;width:1.45em;height:1.45em;left:.11em;bottom:.08em;filter:brightness(0) saturate(100%) invert(43%) sepia(0%) saturate(740%) hue-rotate(77deg) brightness(99%) contrast(92%)}#upload-gifs-icon{position:absolute;pointer-events:none;width:1.5em;height:1.48em;left:.07em;bottom:.08em;filter:brightness(0) saturate(100%) invert(49%) sepia(0%) saturate(2586%) hue-rotate(12deg) brightness(93%) contrast(90%)}#upload-audio-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.17em;bottom:.2em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%);transform:scaleX(.95)}#camera-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.23em;bottom:.2em;filter:brightness(0) saturate(100%) invert(52%) sepia(0%) saturate(161%) hue-rotate(164deg) brightness(91%) contrast(92%);transform:scaleX(.95)}#upload-mixed-files-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.2em;filter:brightness(0) saturate(100%) invert(53%) sepia(0%) saturate(36%) hue-rotate(74deg) brightness(98%) contrast(93%);transform:scaleX(.95)}#interim-text{color:gray}#microphone-button{padding-top:.5px}.outer-button-container>#microphone-button{padding-bottom:1px}#microphone-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.25em}.default-microphone-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%)}.active-microphone-icon{filter:brightness(0) saturate(100%) invert(10%) sepia(97%) saturate(7495%) hue-rotate(0deg) brightness(101%) contrast(107%);border-radius:10px}.command-microphone-icon{filter:brightness(0) saturate(100%) invert(42%) sepia(96%) saturate(1067%) hue-rotate(77deg) brightness(99%) contrast(102%)}.unsupported-microphone{display:none}#submit-icon{height:100%;filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%);width:1.21em}#stop-icon{background-color:#acacac;position:absolute;width:.95em;height:.95em;left:.35em;bottom:.35em;border-radius:2px}.submit-button-enlarged{scale:1.1;margin-right:.3em;margin-left:.3em}.loading-submit-button{position:relative;left:calc(-9990px + .275em);width:.22em;height:.22em;border-radius:5px;background-color:#848484;color:#848484;box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484;animation:loading-submit-button 1.5s infinite linear;bottom:-.75em}@keyframes loading-submit-button{0%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}16.667%{box-shadow:9990px -6px #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}33.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}50%{box-shadow:9990px 0 #848484,calc(9990px + .44em) -6px 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}66.667%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}83.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) -6px 0 0 #848484}to{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}}.input-button{border-radius:4px;cursor:pointer;margin-bottom:.2em;-webkit-user-select:none;user-select:none}.input-button-svg{width:1.65em;height:1.65em}.input-button-svg-text{padding:1px;height:1.65em;display:flex}.input-button-svg-text>svg{padding:.22rem}.input-button-svg-text>div{margin-left:2px}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.input-button:active:not(:hover){background-color:transparent}.loading-button{cursor:auto}.loading-button:hover{background-color:unset}.text-button{filter:unset!important;display:flex;justify-content:center;align-items:center;margin-left:4px;margin-right:4px;height:1.6em;width:max-content}#custom-icon{height:100%;width:1.2em}.custom-button-container-default{color:#505050}.custom-button-container-default>.dropup-menu-item-icon{color:unset}.custom-button-container-default>svg{filter:brightness(0) saturate(100%) invert(39%) sepia(1%) saturate(0%) hue-rotate(83deg) brightness(93%) contrast(90%)}.custom-button-container-default>.dropup-menu-item-icon>svg{position:absolute;left:.2em}.custom-button-container-active{background-color:#edf7ff;color:#0285ff}.custom-button-container-active:hover,.custom-button-container-active:focus-visible{background-color:#def0ff}.custom-button-container-active:active{background-color:#d2eaff}.custom-button-container-active>svg{filter:brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)}.custom-button-container-disabled{color:#aeaeae;cursor:auto}.custom-button-container-disabled>div{pointer-events:none}.custom-button-container-disabled:hover,.custom-button-container-disabled:focus-visible{background-color:transparent}.custom-button-container-disabled:active{background-color:transparent}.custom-button-container-disabled>svg{filter:brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)}#text-input-container{background-color:#fff;width:80%;display:flex;border:1px solid #0000001a;border-radius:5px;margin-top:.8em;margin-bottom:.8em;box-shadow:#959da533 0 1px 12px;overflow-y:auto;max-height:200px;position:relative}.text-input-container-left-adjustment{margin-left:1.5em}.text-input-container-right-adjustment{margin-right:1.5em}.text-input-container-left-small-adjustment{margin-left:1.1em}.text-input-container-left-small-adjustment>.outside-left{right:calc(14px - .55em)}.text-input-container-right-small-adjustment{margin-right:1.1em}.text-input-container-right-small-adjustment>.outside-right{left:calc(14px - .55em)}#text-input{text-align:left;outline:none;word-wrap:break-word;line-break:auto}.text-input-styling{padding:.4em .5em;overflow:overlay;width:100%}.text-input-inner-left-adjustment{padding-left:2.2em}.text-input-inner-right-adjustment{padding-right:2em}.text-input-disabled{pointer-events:none;-webkit-user-select:none;user-select:none}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{color:gray}.outside-right>#dropup-menu,.inside-right>#dropup-menu{right:0}#dropup-icon{position:absolute;pointer-events:none;width:1.16em;height:1.2em;left:.265em;bottom:.43em;filter:brightness(0) saturate(100%) invert(54%) sepia(0%) saturate(724%) hue-rotate(6deg) brightness(92%) contrast(90%)}.dropup-button>*{pointer-events:none}#dropup-menu{background-color:#fff;position:absolute;transform:translateY(-100%);border-radius:5px;z-index:1;top:-.49em;box-shadow:#0003 -1px 2px 10px,#0000001a 0 2px 4px;cursor:pointer;-webkit-user-select:none;user-select:none}.dropup-menu-item{height:1.4em;padding:.28em .84em .28em .35em;display:flex;position:relative}.dropup-menu-item:hover,.dropup-menu-item:focus-visible{background-color:#f3f3f3}.dropup-menu-item:active{background-color:#ebebeb}.dropup-menu-item:active:not(:hover){background-color:transparent}.dropup-menu-item:first-child{padding-top:.49em;border-top-left-radius:inherit;border-top-right-radius:inherit}.dropup-menu-item:last-child{padding-bottom:.45em;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.dropup-menu-item-icon{width:1.39em;position:relative}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}#dropup-menu-item-icon-element-custom{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.28em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%)}.dropup-menu-item-text{margin-left:.56em;margin-top:.08em;width:max-content}#input{width:100%;display:inline-flex;text-align:center;margin-left:auto;margin-right:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;display:grid;grid-template-columns:100%}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";
|
16077
|
+
var ja = Object.defineProperty,
|
16078
|
+
w = function w(n, e, t, i) {
|
16047
16079
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--) (o = n[r]) && (s = o(e, t, s) || s);
|
16048
|
-
return s &&
|
16080
|
+
return s && ja(e, t, s), s;
|
16049
16081
|
};
|
16050
16082
|
var _ = /*#__PURE__*/function (_rs) {
|
16051
16083
|
function _() {
|
@@ -16061,7 +16093,7 @@ var _ = /*#__PURE__*/function (_rs) {
|
|
16061
16093
|
return li.focusFromParentElement(_this98._elementRef);
|
16062
16094
|
}, _this98.refreshMessages = function () {}, _this98.scrollToBottom = function () {}, _this98.disableSubmitButton = function () {}, _this98.setPlaceholderText = function () {}, _this98._hasBeenRendered = !1, _this98._auxiliaryStyleApplied = !1, _this98._elementRef = document.createElement("div"), _this98._elementRef.id = "container", _this98.attachShadow({
|
16063
16095
|
mode: "open"
|
16064
|
-
}).appendChild(_this98._elementRef), zt.apply(
|
16096
|
+
}).appendChild(_this98._elementRef), zt.apply(Ua, _this98.shadowRoot), setTimeout(function () {
|
16065
16097
|
_this98._hasBeenRendered || _this98.onRender();
|
16066
16098
|
}, 20);
|
16067
16099
|
return _this98;
|
@@ -16077,7 +16109,7 @@ var _ = /*#__PURE__*/function (_rs) {
|
|
16077
16109
|
key: "onRender",
|
16078
16110
|
value: function onRender() {
|
16079
16111
|
var _this$_childElement;
|
16080
|
-
vi.attemptAppendStyleSheetToHead(this.style), te.processConnect(this), (!this._activeService || this._activeService.demo) && (this._activeService =
|
16112
|
+
vi.attemptAppendStyleSheetToHead(this.style), te.processConnect(this), (!this._activeService || this._activeService.demo) && (this._activeService = sa.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (zt.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), zt.applyDefaultStyleToComponent(this.style, this.chatStyle), te.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateKeyProperty ? bi.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof K) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], Ls.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof K && W.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered || ii.onRender(this), this._hasBeenRendered = !0;
|
16081
16113
|
}
|
16082
16114
|
}, {
|
16083
16115
|
key: "disconnectedCallback",
|
@@ -16086,48 +16118,49 @@ var _ = /*#__PURE__*/function (_rs) {
|
|
16086
16118
|
}
|
16087
16119
|
}]);
|
16088
16120
|
}(rs);
|
16089
|
-
|
16090
|
-
|
16091
|
-
|
16092
|
-
|
16093
|
-
|
16094
|
-
|
16095
|
-
|
16096
|
-
|
16097
|
-
|
16098
|
-
|
16099
|
-
|
16100
|
-
|
16101
|
-
|
16102
|
-
|
16103
|
-
|
16104
|
-
|
16105
|
-
|
16106
|
-
|
16107
|
-
|
16108
|
-
|
16109
|
-
|
16110
|
-
|
16111
|
-
|
16112
|
-
|
16113
|
-
|
16114
|
-
|
16115
|
-
|
16116
|
-
|
16117
|
-
|
16118
|
-
|
16119
|
-
|
16120
|
-
|
16121
|
-
|
16122
|
-
|
16123
|
-
|
16124
|
-
|
16125
|
-
|
16126
|
-
|
16127
|
-
|
16128
|
-
|
16129
|
-
|
16130
|
-
|
16131
|
-
|
16121
|
+
w([x("object")], _.prototype, "connect");
|
16122
|
+
w([x("object")], _.prototype, "directConnection");
|
16123
|
+
w([x("object")], _.prototype, "webModel");
|
16124
|
+
w([x("object")], _.prototype, "requestBodyLimits");
|
16125
|
+
w([x("function")], _.prototype, "requestInterceptor");
|
16126
|
+
w([x("function")], _.prototype, "responseInterceptor");
|
16127
|
+
w([x("function")], _.prototype, "validateInput");
|
16128
|
+
w([x("function")], _.prototype, "loadHistory");
|
16129
|
+
w([x("object")], _.prototype, "chatStyle");
|
16130
|
+
w([x("object")], _.prototype, "attachmentContainerStyle");
|
16131
|
+
w([x("object")], _.prototype, "dropupStyles");
|
16132
|
+
w([x("object")], _.prototype, "inputAreaStyle");
|
16133
|
+
w([x("object")], _.prototype, "textInput");
|
16134
|
+
w([x("object")], _.prototype, "submitButtonStyles");
|
16135
|
+
w([x("object")], _.prototype, "customButtons");
|
16136
|
+
w([x("string")], _.prototype, "auxiliaryStyle");
|
16137
|
+
w([x("array")], _.prototype, "history");
|
16138
|
+
w([x("object")], _.prototype, "browserStorage");
|
16139
|
+
w([x("object")], _.prototype, "introMessage");
|
16140
|
+
w([x("object")], _.prototype, "avatars");
|
16141
|
+
w([x("object")], _.prototype, "names");
|
16142
|
+
w([x("object")], _.prototype, "displayLoadingBubble");
|
16143
|
+
w([x("object")], _.prototype, "errorMessages");
|
16144
|
+
w([x("object")], _.prototype, "messageStyles");
|
16145
|
+
w([x("object")], _.prototype, "textToSpeech");
|
16146
|
+
w([x("object")], _.prototype, "speechToText");
|
16147
|
+
w([x("object")], _.prototype, "images");
|
16148
|
+
w([x("object")], _.prototype, "gifs");
|
16149
|
+
w([x("object")], _.prototype, "camera");
|
16150
|
+
w([x("object")], _.prototype, "audio");
|
16151
|
+
w([x("object")], _.prototype, "microphone");
|
16152
|
+
w([x("object")], _.prototype, "mixedFiles");
|
16153
|
+
w([x("object")], _.prototype, "dragAndDrop");
|
16154
|
+
w([x("object")], _.prototype, "introPanelStyle");
|
16155
|
+
w([x("object")], _.prototype, "htmlClassUtilities");
|
16156
|
+
w([x("object")], _.prototype, "remarkable");
|
16157
|
+
w([x("object")], _.prototype, "focusMode");
|
16158
|
+
w([x("function")], _.prototype, "onMessage");
|
16159
|
+
w([x("function")], _.prototype, "onClearMessages");
|
16160
|
+
w([x("function")], _.prototype, "onComponentRender");
|
16161
|
+
w([x("function")], _.prototype, "onInput");
|
16162
|
+
w([x("function")], _.prototype, "onError");
|
16163
|
+
w([x("object")], _.prototype, "demo");
|
16164
|
+
w([x("object")], _.prototype, "_insertKeyViewStyles");
|
16132
16165
|
customElements.define("deep-chat", _);
|
16133
16166
|
export { _ as DeepChat };
|