UNPKG

smart-chat-asp

Version:

smartChat component

502 lines (501 loc) 15.1 kB
import { bG as E, be as T, bH as oe, bI as H, bJ as w, b0 as d, aY as F, bK as Z, bL as ue, bM as he, bN as ce, bO as q, bP as fe, bQ as J, bR as $, bS as C, bf as Q, b7 as de, bT as ge, bU as le, bV as be, bW as _e, bX as pe, bb as ye, bY as je, b6 as Te, bZ as P, b_ as me, a$ as X, bd as Oe, b$ as L, c0 as z, c1 as Ae, c2 as Ee, aW as Ce, c3 as we, bj as O, ai as x, c4 as D } from "./lib-85d3a8f7.mjs"; function Le() { } function k(t, e) { for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; ) ; return t; } function Se(t, e, n, r) { for (var s = t.length, i = n + (r ? 1 : -1); r ? i-- : ++i < s; ) if (e(t[i], i, t)) return i; return -1; } function Ie(t) { return t !== t; } function Ne(t, e, n) { for (var r = n - 1, s = t.length; ++r < s; ) if (t[r] === e) return r; return -1; } function Fe(t, e, n) { return e === e ? Ne(t, e, n) : Se(t, Ie, n); } function $e(t, e) { var n = t == null ? 0 : t.length; return !!n && Fe(t, e, 0) > -1; } var G = E ? E.isConcatSpreadable : void 0; function Pe(t) { return T(t) || oe(t) || !!(G && t && t[G]); } function ee(t, e, n, r, s) { var i = -1, a = t.length; for (n || (n = Pe), s || (s = []); ++i < a; ) { var o = t[i]; e > 0 && n(o) ? e > 1 ? ee(o, e - 1, n, r, s) : H(s, o) : r || (s[s.length] = o); } return s; } function ve(t, e, n, r) { var s = -1, i = t == null ? 0 : t.length; for (r && i && (n = t[++s]); ++s < i; ) n = e(n, t[s], s, t); return n; } function Me(t, e) { return t && w(e, d(e), t); } function xe(t, e) { return t && w(e, F(e), t); } function De(t, e) { return w(t, Z(t), e); } var Ge = Object.getOwnPropertySymbols, Ue = Ge ? function(t) { for (var e = []; t; ) H(e, Z(t)), t = he(t); return e; } : ue; const te = Ue; function Be(t, e) { return w(t, te(t), e); } function Re(t) { return ce(t, F, te); } var Ve = Object.prototype, Ye = Ve.hasOwnProperty; function Ke(t) { var e = t.length, n = new t.constructor(e); return e && typeof t[0] == "string" && Ye.call(t, "index") && (n.index = t.index, n.input = t.input), n; } function We(t, e) { var n = e ? q(t.buffer) : t.buffer; return new t.constructor(n, t.byteOffset, t.byteLength); } var He = /\w*$/; function Ze(t) { var e = new t.constructor(t.source, He.exec(t)); return e.lastIndex = t.lastIndex, e; } var U = E ? E.prototype : void 0, B = U ? U.valueOf : void 0; function qe(t) { return B ? Object(B.call(t)) : {}; } var Je = "[object Boolean]", Qe = "[object Date]", Xe = "[object Map]", ze = "[object Number]", ke = "[object RegExp]", et = "[object Set]", tt = "[object String]", nt = "[object Symbol]", rt = "[object ArrayBuffer]", st = "[object DataView]", it = "[object Float32Array]", at = "[object Float64Array]", ot = "[object Int8Array]", ut = "[object Int16Array]", ht = "[object Int32Array]", ct = "[object Uint8Array]", ft = "[object Uint8ClampedArray]", dt = "[object Uint16Array]", gt = "[object Uint32Array]"; function lt(t, e, n) { var r = t.constructor; switch (e) { case rt: return q(t); case Je: case Qe: return new r(+t); case st: return We(t, n); case it: case at: case ot: case ut: case ht: case ct: case ft: case dt: case gt: return fe(t, n); case Xe: return new r(); case ze: case tt: return new r(t); case ke: return Ze(t); case et: return new r(); case nt: return qe(t); } } var bt = "[object Map]"; function _t(t) { return J(t) && $(t) == bt; } var R = C && C.isMap, pt = R ? Q(R) : _t; const yt = pt; var jt = "[object Set]"; function Tt(t) { return J(t) && $(t) == jt; } var V = C && C.isSet, mt = V ? Q(V) : Tt; const Ot = mt; var At = 1, Et = 2, Ct = 4, ne = "[object Arguments]", wt = "[object Array]", Lt = "[object Boolean]", St = "[object Date]", It = "[object Error]", re = "[object Function]", Nt = "[object GeneratorFunction]", Ft = "[object Map]", $t = "[object Number]", se = "[object Object]", Pt = "[object RegExp]", vt = "[object Set]", Mt = "[object String]", xt = "[object Symbol]", Dt = "[object WeakMap]", Gt = "[object ArrayBuffer]", Ut = "[object DataView]", Bt = "[object Float32Array]", Rt = "[object Float64Array]", Vt = "[object Int8Array]", Yt = "[object Int16Array]", Kt = "[object Int32Array]", Wt = "[object Uint8Array]", Ht = "[object Uint8ClampedArray]", Zt = "[object Uint16Array]", qt = "[object Uint32Array]", u = {}; u[ne] = u[wt] = u[Gt] = u[Ut] = u[Lt] = u[St] = u[Bt] = u[Rt] = u[Vt] = u[Yt] = u[Kt] = u[Ft] = u[$t] = u[se] = u[Pt] = u[vt] = u[Mt] = u[xt] = u[Wt] = u[Ht] = u[Zt] = u[qt] = !0; u[It] = u[re] = u[Dt] = !1; function S(t, e, n, r, s, i) { var a, o = e & At, h = e & Et, m = e & Ct; if (n && (a = s ? n(t, r, s, i) : n(t)), a !== void 0) return a; if (!de(t)) return t; var f = T(t); if (f) { if (a = Ke(t), !o) return ge(t, a); } else { var c = $(t), y = c == re || c == Nt; if (le(t)) return be(t, o); if (c == se || c == ne || y && !s) { if (a = h || y ? {} : _e(t), !o) return h ? Be(t, xe(a, t)) : De(t, Me(a, t)); } else { if (!u[c]) return s ? t : {}; a = lt(t, c, o); } } i || (i = new pe()); var v = i.get(t); if (v) return v; i.set(t, a), Ot(t) ? t.forEach(function(g) { a.add(S(g, e, n, g, t, i)); }) : yt(t) && t.forEach(function(g, l) { a.set(l, S(g, e, n, l, t, i)); }); var ae = m ? h ? Re : je : h ? F : d, M = f ? void 0 : ae(t); return k(M || t, function(g, l) { M && (l = g, g = t[l]), ye(a, l, S(g, e, n, l, t, i)); }), a; } function Jt(t, e, n) { for (var r = -1, s = t == null ? 0 : t.length; ++r < s; ) if (n(e, t[r])) return !0; return !1; } function Qt(t) { return typeof t == "function" ? t : Te; } function b(t, e) { var n = T(t) ? k : P; return n(t, Qt(e)); } function Xt(t, e) { var n = []; return P(t, function(r, s, i) { e(r, s, i) && n.push(r); }), n; } function A(t, e) { var n = T(t) ? me : Xt; return n(t, X(e)); } function zt(t, e) { return Oe(e, function(n) { return t[n]; }); } function I(t) { return t == null ? [] : zt(t, d(t)); } function p(t) { return t === void 0; } function kt(t, e, n, r, s) { return s(t, function(i, a, o) { n = r ? (r = !1, i) : e(n, i, a, o); }), n; } function en(t, e, n) { var r = T(t) ? ve : kt, s = arguments.length < 3; return r(t, X(e), n, s, P); } var tn = 1 / 0, nn = L && 1 / z(new L([, -0]))[1] == tn ? function(t) { return new L(t); } : Le; const rn = nn; var sn = 200; function an(t, e, n) { var r = -1, s = $e, i = t.length, a = !0, o = [], h = o; if (n) a = !1, s = Jt; else if (i >= sn) { var m = e ? null : rn(t); if (m) return z(m); a = !1, s = Ee, h = new Ae(); } else h = e ? [] : o; e: for (; ++r < i; ) { var f = t[r], c = e ? e(f) : f; if (f = n || f !== 0 ? f : 0, a && c === c) { for (var y = h.length; y--; ) if (h[y] === c) continue e; e && h.push(c), o.push(f); } else s(h, c, n) || (h !== o && h.push(c), o.push(f)); } return o; } var on = Ce(function(t) { return an(ee(t, 1, we, !0)); }); const un = on; var hn = "\0", _ = "\0", Y = ""; class ie { constructor(e = {}) { this._isDirected = Object.prototype.hasOwnProperty.call(e, "directed") ? e.directed : !0, this._isMultigraph = Object.prototype.hasOwnProperty.call(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.prototype.hasOwnProperty.call(e, "compound") ? e.compound : !1, this._label = void 0, this._defaultNodeLabelFn = O(void 0), this._defaultEdgeLabelFn = O(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[_] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {}; } /* === Graph functions ========= */ isDirected() { return this._isDirected; } isMultigraph() { return this._isMultigraph; } isCompound() { return this._isCompound; } setGraph(e) { return this._label = e, this; } graph() { return this._label; } /* === Node functions ========== */ setDefaultNodeLabel(e) { return x(e) || (e = O(e)), this._defaultNodeLabelFn = e, this; } nodeCount() { return this._nodeCount; } nodes() { return d(this._nodes); } sources() { var e = this; return A(this.nodes(), function(n) { return D(e._in[n]); }); } sinks() { var e = this; return A(this.nodes(), function(n) { return D(e._out[n]); }); } setNodes(e, n) { var r = arguments, s = this; return b(e, function(i) { r.length > 1 ? s.setNode(i, n) : s.setNode(i); }), this; } setNode(e, n) { return Object.prototype.hasOwnProperty.call(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = n), this) : (this._nodes[e] = arguments.length > 1 ? n : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = _, this._children[e] = {}, this._children[_][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this); } node(e) { return this._nodes[e]; } hasNode(e) { return Object.prototype.hasOwnProperty.call(this._nodes, e); } removeNode(e) { if (Object.prototype.hasOwnProperty.call(this._nodes, e)) { var n = (r) => this.removeEdge(this._edgeObjs[r]); delete this._nodes[e], this._isCompound && (this._removeFromParentsChildList(e), delete this._parent[e], b(this.children(e), (r) => { this.setParent(r); }), delete this._children[e]), b(d(this._in[e]), n), delete this._in[e], delete this._preds[e], b(d(this._out[e]), n), delete this._out[e], delete this._sucs[e], --this._nodeCount; } return this; } setParent(e, n) { if (!this._isCompound) throw new Error("Cannot set parent in a non-compound graph"); if (p(n)) n = _; else { n += ""; for (var r = n; !p(r); r = this.parent(r)) if (r === e) throw new Error("Setting " + n + " as parent of " + e + " would create a cycle"); this.setNode(n); } return this.setNode(e), this._removeFromParentsChildList(e), this._parent[e] = n, this._children[n][e] = !0, this; } _removeFromParentsChildList(e) { delete this._children[this._parent[e]][e]; } parent(e) { if (this._isCompound) { var n = this._parent[e]; if (n !== _) return n; } } children(e) { if (p(e) && (e = _), this._isCompound) { var n = this._children[e]; if (n) return d(n); } else { if (e === _) return this.nodes(); if (this.hasNode(e)) return []; } } predecessors(e) { var n = this._preds[e]; if (n) return d(n); } successors(e) { var n = this._sucs[e]; if (n) return d(n); } neighbors(e) { var n = this.predecessors(e); if (n) return un(n, this.successors(e)); } isLeaf(e) { var n; return this.isDirected() ? n = this.successors(e) : n = this.neighbors(e), n.length === 0; } filterNodes(e) { var n = new this.constructor({ directed: this._isDirected, multigraph: this._isMultigraph, compound: this._isCompound }); n.setGraph(this.graph()); var r = this; b(this._nodes, function(a, o) { e(o) && n.setNode(o, a); }), b(this._edgeObjs, function(a) { n.hasNode(a.v) && n.hasNode(a.w) && n.setEdge(a, r.edge(a)); }); var s = {}; function i(a) { var o = r.parent(a); return o === void 0 || n.hasNode(o) ? (s[a] = o, o) : o in s ? s[o] : i(o); } return this._isCompound && b(n.nodes(), function(a) { n.setParent(a, i(a)); }), n; } /* === Edge functions ========== */ setDefaultEdgeLabel(e) { return x(e) || (e = O(e)), this._defaultEdgeLabelFn = e, this; } edgeCount() { return this._edgeCount; } edges() { return I(this._edgeObjs); } setPath(e, n) { var r = this, s = arguments; return en(e, function(i, a) { return s.length > 1 ? r.setEdge(i, a, n) : r.setEdge(i, a), a; }), this; } /* * setEdge(v, w, [value, [name]]) * setEdge({ v, w, [name] }, [value]) */ setEdge() { var e, n, r, s, i = !1, a = arguments[0]; typeof a == "object" && a !== null && "v" in a ? (e = a.v, n = a.w, r = a.name, arguments.length === 2 && (s = arguments[1], i = !0)) : (e = a, n = arguments[1], r = arguments[3], arguments.length > 2 && (s = arguments[2], i = !0)), e = "" + e, n = "" + n, p(r) || (r = "" + r); var o = j(this._isDirected, e, n, r); if (Object.prototype.hasOwnProperty.call(this._edgeLabels, o)) return i && (this._edgeLabels[o] = s), this; if (!p(r) && !this._isMultigraph) throw new Error("Cannot set a named edge when isMultigraph = false"); this.setNode(e), this.setNode(n), this._edgeLabels[o] = i ? s : this._defaultEdgeLabelFn(e, n, r); var h = cn(this._isDirected, e, n, r); return e = h.v, n = h.w, Object.freeze(h), this._edgeObjs[o] = h, K(this._preds[n], e), K(this._sucs[e], n), this._in[n][o] = h, this._out[e][o] = h, this._edgeCount++, this; } edge(e, n, r) { var s = arguments.length === 1 ? N(this._isDirected, arguments[0]) : j(this._isDirected, e, n, r); return this._edgeLabels[s]; } hasEdge(e, n, r) { var s = arguments.length === 1 ? N(this._isDirected, arguments[0]) : j(this._isDirected, e, n, r); return Object.prototype.hasOwnProperty.call(this._edgeLabels, s); } removeEdge(e, n, r) { var s = arguments.length === 1 ? N(this._isDirected, arguments[0]) : j(this._isDirected, e, n, r), i = this._edgeObjs[s]; return i && (e = i.v, n = i.w, delete this._edgeLabels[s], delete this._edgeObjs[s], W(this._preds[n], e), W(this._sucs[e], n), delete this._in[n][s], delete this._out[e][s], this._edgeCount--), this; } inEdges(e, n) { var r = this._in[e]; if (r) { var s = I(r); return n ? A(s, function(i) { return i.v === n; }) : s; } } outEdges(e, n) { var r = this._out[e]; if (r) { var s = I(r); return n ? A(s, function(i) { return i.w === n; }) : s; } } nodeEdges(e, n) { var r = this.inEdges(e, n); if (r) return r.concat(this.outEdges(e, n)); } } ie.prototype._nodeCount = 0; ie.prototype._edgeCount = 0; function K(t, e) { t[e] ? t[e]++ : t[e] = 1; } function W(t, e) { --t[e] || delete t[e]; } function j(t, e, n, r) { var s = "" + e, i = "" + n; if (!t && s > i) { var a = s; s = i, i = a; } return s + Y + i + Y + (p(r) ? hn : r); } function cn(t, e, n, r) { var s = "" + e, i = "" + n; if (!t && s > i) { var a = s; s = i, i = a; } var o = { v: s, w: i }; return r && (o.name = r), o; } function N(t, e) { return j(t, e.v, e.w, e.name); } export { ie as G, S as a, ee as b, Se as c, Qt as d, A as e, b as f, p as i, en as r, I as v };