@kernelift/ai-chat 2.4.2 → 2.5.0
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/CHANGELOG.md +18 -0
- package/README.md +46 -39
- package/dist/ai-chat.css +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +186 -177
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3202,11 +3202,11 @@ function _t() {
|
|
|
3202
3202
|
var a = [16843776, 0, 65536, 16843780, 16842756, 66564, 4, 65536, 1024, 16843776, 16843780, 1024, 16778244, 16842756, 16777216, 4, 1028, 16778240, 16778240, 66560, 66560, 16842752, 16842752, 16778244, 65540, 16777220, 16777220, 65540, 0, 1028, 66564, 16777216, 65536, 16843780, 4, 16842752, 16843776, 16777216, 16777216, 1024, 16842756, 65536, 66560, 16777220, 1024, 4, 16778244, 66564, 16843780, 65540, 16842752, 16778244, 16777220, 1028, 66564, 16843776, 1028, 16778240, 16778240, 0, 65540, 66560, 0, 16842756], d = [-2146402272, -2147450880, 32768, 1081376, 1048576, 32, -2146435040, -2147450848, -2147483616, -2146402272, -2146402304, -2147483648, -2147450880, 1048576, 32, -2146435040, 1081344, 1048608, -2147450848, 0, -2147483648, 32768, 1081376, -2146435072, 1048608, -2147483616, 0, 1081344, 32800, -2146402304, -2146435072, 32800, 0, 1081376, -2146435040, 1048576, -2147450848, -2146435072, -2146402304, 32768, -2146435072, -2147450880, 32, -2146402272, 1081376, 32, 32768, -2147483648, 32800, -2146402304, 1048576, -2147483616, 1048608, -2147450848, -2147483616, 1048608, 1081344, 0, -2147450880, 32800, -2147483648, -2146435040, -2146402272, 1081344], I = [520, 134349312, 0, 134348808, 134218240, 0, 131592, 134218240, 131080, 134217736, 134217736, 131072, 134349320, 131080, 134348800, 520, 134217728, 8, 134349312, 512, 131584, 134348800, 134348808, 131592, 134218248, 131584, 131072, 134218248, 8, 134349320, 512, 134217728, 134349312, 134217728, 131080, 520, 131072, 134349312, 134218240, 0, 512, 131080, 134349320, 134218240, 134217736, 512, 0, 134348808, 134218248, 131072, 134217728, 134349320, 8, 131592, 131584, 134217736, 134348800, 134218248, 520, 134348800, 131592, 8, 134348808, 131584], b = [8396801, 8321, 8321, 128, 8396928, 8388737, 8388609, 8193, 0, 8396800, 8396800, 8396929, 129, 0, 8388736, 8388609, 1, 8192, 8388608, 8396801, 128, 8388608, 8193, 8320, 8388737, 1, 8320, 8388736, 8192, 8396928, 8396929, 129, 8388736, 8388609, 8396800, 8396929, 129, 0, 0, 8396800, 8320, 8388736, 8388737, 1, 8396801, 8321, 8321, 128, 8396929, 129, 1, 8192, 8388609, 8193, 8396928, 8388737, 8193, 8320, 8388608, 8396801, 128, 8388608, 8192, 8396928], c = [256, 34078976, 34078720, 1107296512, 524288, 256, 1073741824, 34078720, 1074266368, 524288, 33554688, 1074266368, 1107296512, 1107820544, 524544, 1073741824, 33554432, 1074266112, 1074266112, 0, 1073742080, 1107820800, 1107820800, 33554688, 1107820544, 1073742080, 0, 1107296256, 34078976, 33554432, 1107296256, 524544, 524288, 1107296512, 256, 33554432, 1073741824, 34078720, 1107296512, 1074266368, 33554688, 1073741824, 1107820544, 34078976, 1074266368, 256, 33554432, 1107820544, 1107820800, 524544, 1107296256, 1107820800, 34078720, 0, 1074266112, 1107296256, 524544, 33554688, 1073742080, 524288, 0, 1074266112, 34078976, 1073742080], r = [536870928, 541065216, 16384, 541081616, 541065216, 16, 541081616, 4194304, 536887296, 4210704, 4194304, 536870928, 4194320, 536887296, 536870912, 16400, 0, 4194320, 536887312, 16384, 4210688, 536887312, 16, 541065232, 541065232, 0, 4210704, 541081600, 16400, 4210688, 541081600, 536870912, 536887296, 16, 541065232, 4210688, 541081616, 4194304, 16400, 536870928, 4194304, 536887296, 536870912, 16400, 536870928, 541081616, 4210688, 541065216, 4210704, 541081600, 0, 541065232, 16, 16384, 541065216, 4210704, 16384, 4194320, 536887312, 0, 541081600, 536870912, 4194320, 536887312], g = [2097152, 69206018, 67110914, 0, 2048, 67110914, 2099202, 69208064, 69208066, 2097152, 0, 67108866, 2, 67108864, 69206018, 2050, 67110912, 2099202, 2097154, 67110912, 67108866, 69206016, 69208064, 2097154, 69206016, 2048, 2050, 69208066, 2099200, 2, 67108864, 2099200, 67108864, 2099200, 2097152, 67110914, 67110914, 69206018, 69206018, 2, 2097154, 67108864, 67110912, 2097152, 69208064, 2050, 2099202, 69208064, 2050, 67108866, 69208066, 69206016, 2099200, 0, 2, 69208066, 0, 2099202, 69206016, 2048, 67108866, 67110912, 2048, 2097154], l = [268439616, 4096, 262144, 268701760, 268435456, 268439616, 64, 268435456, 262208, 268697600, 268701760, 266240, 268701696, 266304, 4096, 64, 268697600, 268435520, 268439552, 4160, 266240, 262208, 268697664, 268701696, 4160, 0, 0, 268697664, 268435520, 268439552, 266304, 262144, 266304, 262144, 268701696, 4096, 64, 268697664, 4096, 266304, 268439552, 64, 268435520, 268697600, 268697664, 268435456, 262144, 268439616, 0, 268701760, 262208, 268435520, 268697600, 268439552, 268439616, 0, 268701760, 266240, 266240, 4160, 4160, 262208, 268435456, 268701696];
|
|
3203
3203
|
function S(u) {
|
|
3204
3204
|
for (var y = [0, 4, 536870912, 536870916, 65536, 65540, 536936448, 536936452, 512, 516, 536871424, 536871428, 66048, 66052, 536936960, 536936964], C = [0, 1, 1048576, 1048577, 67108864, 67108865, 68157440, 68157441, 256, 257, 1048832, 1048833, 67109120, 67109121, 68157696, 68157697], m = [0, 8, 2048, 2056, 16777216, 16777224, 16779264, 16779272, 0, 8, 2048, 2056, 16777216, 16777224, 16779264, 16779272], s = [0, 2097152, 134217728, 136314880, 8192, 2105344, 134225920, 136323072, 131072, 2228224, 134348800, 136445952, 139264, 2236416, 134356992, 136454144], h = [0, 262144, 16, 262160, 0, 262144, 16, 262160, 4096, 266240, 4112, 266256, 4096, 266240, 4112, 266256], v = [0, 1024, 32, 1056, 0, 1024, 32, 1056, 33554432, 33555456, 33554464, 33555488, 33554432, 33555456, 33554464, 33555488], T = [0, 268435456, 524288, 268959744, 2, 268435458, 524290, 268959746, 0, 268435456, 524288, 268959744, 2, 268435458, 524290, 268959746], R = [0, 65536, 2048, 67584, 536870912, 536936448, 536872960, 536938496, 131072, 196608, 133120, 198656, 537001984, 537067520, 537004032, 537069568], p = [0, 262144, 0, 262144, 2, 262146, 2, 262146, 33554432, 33816576, 33554432, 33816576, 33554434, 33816578, 33554434, 33816578], i = [0, 268435456, 8, 268435464, 0, 268435456, 8, 268435464, 1024, 268436480, 1032, 268436488, 1024, 268436480, 1032, 268436488], n = [0, 32, 0, 32, 1048576, 1048608, 1048576, 1048608, 8192, 8224, 8192, 8224, 1056768, 1056800, 1056768, 1056800], B = [0, 16777216, 512, 16777728, 2097152, 18874368, 2097664, 18874880, 67108864, 83886080, 67109376, 83886592, 69206016, 85983232, 69206528, 85983744], D = [0, 4096, 134217728, 134221824, 524288, 528384, 134742016, 134746112, 16, 4112, 134217744, 134221840, 524304, 528400, 134742032, 134746128], O = [0, 4, 256, 260, 0, 4, 256, 260, 1, 5, 257, 261, 1, 5, 257, 261], V = u.length() > 8 ? 3 : 1, M = [], x = [0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0], G = 0, z, Y = 0; Y < V; Y++) {
|
|
3205
|
-
var
|
|
3206
|
-
z = (
|
|
3205
|
+
var _ = u.getInt32(), te = u.getInt32();
|
|
3206
|
+
z = (_ >>> 4 ^ te) & 252645135, te ^= z, _ ^= z << 4, z = (te >>> -16 ^ _) & 65535, _ ^= z, te ^= z << -16, z = (_ >>> 2 ^ te) & 858993459, te ^= z, _ ^= z << 2, z = (te >>> -16 ^ _) & 65535, _ ^= z, te ^= z << -16, z = (_ >>> 1 ^ te) & 1431655765, te ^= z, _ ^= z << 1, z = (te >>> 8 ^ _) & 16711935, _ ^= z, te ^= z << 8, z = (_ >>> 1 ^ te) & 1431655765, te ^= z, _ ^= z << 1, z = _ << 8 | te >>> 20 & 240, _ = te << 24 | te << 8 & 16711680 | te >>> 8 & 65280 | te >>> 24 & 240, te = z;
|
|
3207
3207
|
for (var ue = 0; ue < x.length; ++ue) {
|
|
3208
|
-
x[ue] ? (
|
|
3209
|
-
var he = y[
|
|
3208
|
+
x[ue] ? (_ = _ << 2 | _ >>> 26, te = te << 2 | te >>> 26) : (_ = _ << 1 | _ >>> 27, te = te << 1 | te >>> 27), _ &= -15, te &= -15;
|
|
3209
|
+
var he = y[_ >>> 28] | C[_ >>> 24 & 15] | m[_ >>> 20 & 15] | s[_ >>> 16 & 15] | h[_ >>> 12 & 15] | v[_ >>> 8 & 15] | T[_ >>> 4 & 15], Ce = R[te >>> 28] | p[te >>> 24 & 15] | i[te >>> 20 & 15] | n[te >>> 16 & 15] | B[te >>> 12 & 15] | D[te >>> 8 & 15] | O[te >>> 4 & 15];
|
|
3210
3210
|
z = (Ce >>> 16 ^ he) & 65535, M[G++] = he ^ z, M[G++] = Ce ^ z << 16;
|
|
3211
3211
|
}
|
|
3212
3212
|
}
|
|
@@ -4232,7 +4232,7 @@ function $t() {
|
|
|
4232
4232
|
var N = d();
|
|
4233
4233
|
return this.abs().divRemTo(A, null, N), this.s < 0 && N.compareTo(a.ZERO) > 0 && A.subTo(N, N), N;
|
|
4234
4234
|
}
|
|
4235
|
-
function
|
|
4235
|
+
function _(A) {
|
|
4236
4236
|
this.m = A;
|
|
4237
4237
|
}
|
|
4238
4238
|
function te(A) {
|
|
@@ -4250,7 +4250,7 @@ function $t() {
|
|
|
4250
4250
|
function Ie(A, N) {
|
|
4251
4251
|
A.squareTo(N), this.reduce(N);
|
|
4252
4252
|
}
|
|
4253
|
-
|
|
4253
|
+
_.prototype.convert = te, _.prototype.revert = ue, _.prototype.reduce = he, _.prototype.mulTo = Ce, _.prototype.sqrTo = Ie;
|
|
4254
4254
|
function $() {
|
|
4255
4255
|
if (this.t < 1) return 0;
|
|
4256
4256
|
var A = this.data[0];
|
|
@@ -4258,7 +4258,7 @@ function $t() {
|
|
|
4258
4258
|
var N = A & 3;
|
|
4259
4259
|
return N = N * (2 - (A & 15) * N) & 15, N = N * (2 - (A & 255) * N) & 255, N = N * (2 - ((A & 65535) * N & 65535)) & 65535, N = N * (2 - A * N % this.DV) % this.DV, N > 0 ? this.DV - N : -N;
|
|
4260
4260
|
}
|
|
4261
|
-
function
|
|
4261
|
+
function Z(A) {
|
|
4262
4262
|
this.m = A, this.mp = A.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << A.DB - 15) - 1, this.mt2 = 2 * A.t;
|
|
4263
4263
|
}
|
|
4264
4264
|
function X(A) {
|
|
@@ -4285,7 +4285,7 @@ function $t() {
|
|
|
4285
4285
|
function L(A, N, P) {
|
|
4286
4286
|
A.multiplyTo(N, P), this.reduce(P);
|
|
4287
4287
|
}
|
|
4288
|
-
|
|
4288
|
+
Z.prototype.convert = X, Z.prototype.revert = Oe, Z.prototype.reduce = de, Z.prototype.mulTo = L, Z.prototype.sqrTo = f;
|
|
4289
4289
|
function w() {
|
|
4290
4290
|
return (this.t > 0 ? this.data[0] & 1 : this.s) == 0;
|
|
4291
4291
|
}
|
|
@@ -4302,7 +4302,7 @@ function $t() {
|
|
|
4302
4302
|
}
|
|
4303
4303
|
function k(A, N) {
|
|
4304
4304
|
var P;
|
|
4305
|
-
return A < 256 || N.isEven() ? P = new
|
|
4305
|
+
return A < 256 || N.isEven() ? P = new _(N) : P = new Z(N), this.exp(A, P);
|
|
4306
4306
|
}
|
|
4307
4307
|
a.prototype.copyTo = y, a.prototype.fromInt = C, a.prototype.fromString = s, a.prototype.clamp = h, a.prototype.dlShiftTo = B, a.prototype.drShiftTo = D, a.prototype.lShiftTo = O, a.prototype.rShiftTo = V, a.prototype.subTo = M, a.prototype.multiplyTo = x, a.prototype.squareTo = G, a.prototype.divRemTo = z, a.prototype.invDigit = $, a.prototype.isEven = w, a.prototype.exp = o, a.prototype.toString = v, a.prototype.negate = T, a.prototype.abs = R, a.prototype.compareTo = p, a.prototype.bitLength = n, a.prototype.mod = Y, a.prototype.modPowInt = k, a.ZERO = m(0), a.ONE = m(1);
|
|
4308
4308
|
function F() {
|
|
@@ -4572,7 +4572,7 @@ function $t() {
|
|
|
4572
4572
|
function In(A, N) {
|
|
4573
4573
|
var P = A.bitLength(), j, H = m(1), W;
|
|
4574
4574
|
if (P <= 0) return H;
|
|
4575
|
-
P < 18 ? j = 1 : P < 48 ? j = 3 : P < 144 ? j = 4 : P < 768 ? j = 5 : j = 6, P < 8 ? W = new
|
|
4575
|
+
P < 18 ? j = 1 : P < 48 ? j = 3 : P < 144 ? j = 4 : P < 768 ? j = 5 : j = 6, P < 8 ? W = new _(N) : N.isEven() ? W = new Lt(N) : W = new Z(N);
|
|
4576
4576
|
var oe = new Array(), ne = 3, be = j - 1, et = (1 << j) - 1;
|
|
4577
4577
|
if (oe[1] = W.convert(this), j > 1) {
|
|
4578
4578
|
var ut = d();
|
|
@@ -5218,8 +5218,8 @@ function er() {
|
|
|
5218
5218
|
"algorithm" in i || (i.algorithm = "PRIMEINC");
|
|
5219
5219
|
var B = new e(null);
|
|
5220
5220
|
B.fromInt(30);
|
|
5221
|
-
for (var D = 0, O = function(
|
|
5222
|
-
return
|
|
5221
|
+
for (var D = 0, O = function(_, te) {
|
|
5222
|
+
return _ | te;
|
|
5223
5223
|
}, V = +/* @__PURE__ */ new Date(), M, x = 0; i.keys === null && (n <= 0 || x < n); ) {
|
|
5224
5224
|
if (i.state === 0) {
|
|
5225
5225
|
var G = i.p === null ? i.pBits : i.qBits, z = G - 1;
|
|
@@ -5317,8 +5317,8 @@ function er() {
|
|
|
5317
5317
|
G.privateKey
|
|
5318
5318
|
);
|
|
5319
5319
|
z.oncomplete = function(Y) {
|
|
5320
|
-
var
|
|
5321
|
-
d.fromDer(t.util.createBuffer(
|
|
5320
|
+
var _ = Y.target.result, te = b.privateKeyFromAsn1(
|
|
5321
|
+
d.fromDer(t.util.createBuffer(_))
|
|
5322
5322
|
);
|
|
5323
5323
|
D(null, {
|
|
5324
5324
|
privateKey: te,
|
|
@@ -5389,25 +5389,25 @@ function er() {
|
|
|
5389
5389
|
z = C(z, B, !0);
|
|
5390
5390
|
var Y = d.fromDer(z, {
|
|
5391
5391
|
parseAllBytes: M._parseAllDigestBytes
|
|
5392
|
-
}),
|
|
5393
|
-
if (!d.validate(Y, U,
|
|
5392
|
+
}), _ = {}, te = [];
|
|
5393
|
+
if (!d.validate(Y, U, _, te)) {
|
|
5394
5394
|
var ue = new Error(
|
|
5395
5395
|
"ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value."
|
|
5396
5396
|
);
|
|
5397
5397
|
throw ue.errors = te, ue;
|
|
5398
5398
|
}
|
|
5399
|
-
var he = d.derToOid(
|
|
5399
|
+
var he = d.derToOid(_.algorithmIdentifier);
|
|
5400
5400
|
if (!(he === t.oids.md2 || he === t.oids.md5 || he === t.oids.sha1 || he === t.oids.sha224 || he === t.oids.sha256 || he === t.oids.sha384 || he === t.oids.sha512 || he === t.oids["sha512-224"] || he === t.oids["sha512-256"])) {
|
|
5401
5401
|
var ue = new Error(
|
|
5402
5402
|
"Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier."
|
|
5403
5403
|
);
|
|
5404
5404
|
throw ue.oid = he, ue;
|
|
5405
5405
|
}
|
|
5406
|
-
if ((he === t.oids.md2 || he === t.oids.md5) && !("parameters" in
|
|
5406
|
+
if ((he === t.oids.md2 || he === t.oids.md5) && !("parameters" in _))
|
|
5407
5407
|
throw new Error(
|
|
5408
5408
|
"ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters."
|
|
5409
5409
|
);
|
|
5410
|
-
return G ===
|
|
5410
|
+
return G === _.digest;
|
|
5411
5411
|
}
|
|
5412
5412
|
} : (V === "NONE" || V === "NULL" || V === null) && (V = {
|
|
5413
5413
|
verify: function(G, z) {
|
|
@@ -5428,7 +5428,7 @@ function er() {
|
|
|
5428
5428
|
dQ: M,
|
|
5429
5429
|
qInv: x
|
|
5430
5430
|
};
|
|
5431
|
-
return G.decrypt = function(z, Y,
|
|
5431
|
+
return G.decrypt = function(z, Y, _) {
|
|
5432
5432
|
typeof Y == "string" ? Y = Y.toUpperCase() : Y === void 0 && (Y = "RSAES-PKCS1-V1_5");
|
|
5433
5433
|
var te = b.rsa.decrypt(z, G, !1, !1);
|
|
5434
5434
|
if (Y === "RSAES-PKCS1-V1_5")
|
|
@@ -5436,7 +5436,7 @@ function er() {
|
|
|
5436
5436
|
else if (Y === "RSA-OAEP" || Y === "RSAES-OAEP")
|
|
5437
5437
|
Y = {
|
|
5438
5438
|
decode: function(ue, he) {
|
|
5439
|
-
return t.pkcs1.decode_rsa_oaep(he, ue,
|
|
5439
|
+
return t.pkcs1.decode_rsa_oaep(he, ue, _);
|
|
5440
5440
|
}
|
|
5441
5441
|
};
|
|
5442
5442
|
else if (["RAW", "NONE", "NULL", null].indexOf(Y) !== -1)
|
|
@@ -5447,12 +5447,12 @@ function er() {
|
|
|
5447
5447
|
throw new Error('Unsupported encryption scheme: "' + Y + '".');
|
|
5448
5448
|
return Y.decode(te, G, !1);
|
|
5449
5449
|
}, G.sign = function(z, Y) {
|
|
5450
|
-
var
|
|
5451
|
-
typeof Y == "string" && (Y = Y.toUpperCase()), Y === void 0 || Y === "RSASSA-PKCS1-V1_5" ? (Y = { encode: E },
|
|
5450
|
+
var _ = !1;
|
|
5451
|
+
typeof Y == "string" && (Y = Y.toUpperCase()), Y === void 0 || Y === "RSASSA-PKCS1-V1_5" ? (Y = { encode: E }, _ = 1) : (Y === "NONE" || Y === "NULL" || Y === null) && (Y = { encode: function() {
|
|
5452
5452
|
return z;
|
|
5453
|
-
} },
|
|
5453
|
+
} }, _ = 1);
|
|
5454
5454
|
var te = Y.encode(z, G.n.bitLength());
|
|
5455
|
-
return b.rsa.encrypt(te, G,
|
|
5455
|
+
return b.rsa.encrypt(te, G, _);
|
|
5456
5456
|
}, G;
|
|
5457
5457
|
}, b.wrapRsaPrivateKey = function(i) {
|
|
5458
5458
|
return d.create(d.Class.UNIVERSAL, d.Type.SEQUENCE, !0, [
|
|
@@ -5487,8 +5487,8 @@ function er() {
|
|
|
5487
5487
|
var D = new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");
|
|
5488
5488
|
throw D.errors = B, D;
|
|
5489
5489
|
}
|
|
5490
|
-
var O, V, M, x, G, z, Y,
|
|
5491
|
-
return O = t.util.createBuffer(n.privateKeyModulus).toHex(), V = t.util.createBuffer(n.privateKeyPublicExponent).toHex(), M = t.util.createBuffer(n.privateKeyPrivateExponent).toHex(), x = t.util.createBuffer(n.privateKeyPrime1).toHex(), G = t.util.createBuffer(n.privateKeyPrime2).toHex(), z = t.util.createBuffer(n.privateKeyExponent1).toHex(), Y = t.util.createBuffer(n.privateKeyExponent2).toHex(),
|
|
5490
|
+
var O, V, M, x, G, z, Y, _;
|
|
5491
|
+
return O = t.util.createBuffer(n.privateKeyModulus).toHex(), V = t.util.createBuffer(n.privateKeyPublicExponent).toHex(), M = t.util.createBuffer(n.privateKeyPrivateExponent).toHex(), x = t.util.createBuffer(n.privateKeyPrime1).toHex(), G = t.util.createBuffer(n.privateKeyPrime2).toHex(), z = t.util.createBuffer(n.privateKeyExponent1).toHex(), Y = t.util.createBuffer(n.privateKeyExponent2).toHex(), _ = t.util.createBuffer(n.privateKeyCoefficient).toHex(), b.setRsaPrivateKey(
|
|
5492
5492
|
new e(O, 16),
|
|
5493
5493
|
new e(V, 16),
|
|
5494
5494
|
new e(M, 16),
|
|
@@ -5496,7 +5496,7 @@ function er() {
|
|
|
5496
5496
|
new e(G, 16),
|
|
5497
5497
|
new e(z, 16),
|
|
5498
5498
|
new e(Y, 16),
|
|
5499
|
-
new e(
|
|
5499
|
+
new e(_, 16)
|
|
5500
5500
|
);
|
|
5501
5501
|
}, b.privateKeyToAsn1 = b.privateKeyToRSAPrivateKey = function(i) {
|
|
5502
5502
|
return d.create(d.Class.UNIVERSAL, d.Type.SEQUENCE, !0, [
|
|
@@ -6146,13 +6146,13 @@ function on() {
|
|
|
6146
6146
|
var G = V;
|
|
6147
6147
|
G.putBuffer(x);
|
|
6148
6148
|
for (var z = Math.ceil(m / T), Y = 1; Y <= z; Y++) {
|
|
6149
|
-
var
|
|
6150
|
-
|
|
6149
|
+
var _ = new t.util.ByteBuffer();
|
|
6150
|
+
_.putBytes(D.bytes()), _.putBytes(G.bytes());
|
|
6151
6151
|
for (var te = 0; te < C; te++)
|
|
6152
|
-
s.start(), s.update(
|
|
6152
|
+
s.start(), s.update(_.getBytes()), _ = s.digest();
|
|
6153
6153
|
var ue = new t.util.ByteBuffer();
|
|
6154
6154
|
for (v = 0; v < R; v++)
|
|
6155
|
-
ue.putByte(
|
|
6155
|
+
ue.putByte(_.at(v % T));
|
|
6156
6156
|
var he = Math.ceil(B / R) + Math.ceil(n / R), Ce = new t.util.ByteBuffer();
|
|
6157
6157
|
for (h = 0; h < he; h++) {
|
|
6158
6158
|
var Ie = new t.util.ByteBuffer(G.getBytes(R)), $ = 511;
|
|
@@ -6160,7 +6160,7 @@ function on() {
|
|
|
6160
6160
|
$ = $ >> 8, $ += ue.at(v) + Ie.at(v), Ie.setAt(v, $ & 255);
|
|
6161
6161
|
Ce.putBuffer(Ie);
|
|
6162
6162
|
}
|
|
6163
|
-
G = Ce, p.putBuffer(
|
|
6163
|
+
G = Ce, p.putBuffer(_);
|
|
6164
6164
|
}
|
|
6165
6165
|
return p.truncate(p.length() - m), p;
|
|
6166
6166
|
}, d.pbe.getCipher = function(E, u, y) {
|
|
@@ -7406,12 +7406,12 @@ function Xr() {
|
|
|
7406
7406
|
}, V.issuer.addField = function(ue) {
|
|
7407
7407
|
C([ue]), V.issuer.attributes.push(ue);
|
|
7408
7408
|
}, V.issuer.attributes = a.RDNAttributesAsArray(n.certIssuer), n.certIssuerUniqueId && (V.issuer.uniqueId = n.certIssuerUniqueId), V.issuer.hash = z.digest().toHex();
|
|
7409
|
-
var
|
|
7410
|
-
return
|
|
7409
|
+
var _ = t.md.sha1.create(), te = e.toDer(n.certSubject);
|
|
7410
|
+
return _.update(te.getBytes()), V.subject.getField = function(ue) {
|
|
7411
7411
|
return S(V.subject, ue);
|
|
7412
7412
|
}, V.subject.addField = function(ue) {
|
|
7413
7413
|
C([ue]), V.subject.attributes.push(ue);
|
|
7414
|
-
}, V.subject.attributes = a.RDNAttributesAsArray(n.certSubject), n.certSubjectUniqueId && (V.subject.uniqueId = n.certSubjectUniqueId), V.subject.hash =
|
|
7414
|
+
}, V.subject.attributes = a.RDNAttributesAsArray(n.certSubject), n.certSubjectUniqueId && (V.subject.uniqueId = n.certSubjectUniqueId), V.subject.hash = _.digest().toHex(), n.certExtensions ? V.extensions = a.certificateExtensionsFromAsn1(n.certExtensions) : V.extensions = [], V.publicKey = a.publicKeyFromAsn1(n.subjectPublicKeyInfo), V;
|
|
7415
7415
|
}, a.certificateExtensionsFromAsn1 = function(p) {
|
|
7416
7416
|
for (var i = [], n = 0; n < p.value.length; ++n)
|
|
7417
7417
|
for (var B = p.value[n], D = 0; D < B.value.length; ++D)
|
|
@@ -7705,9 +7705,9 @@ function Xr() {
|
|
|
7705
7705
|
p.value = e.create(e.Class.UNIVERSAL, e.Type.SEQUENCE, !0, []);
|
|
7706
7706
|
var M = p.value.value;
|
|
7707
7707
|
if (p.keyIdentifier) {
|
|
7708
|
-
var
|
|
7708
|
+
var _ = p.keyIdentifier === !0 ? i.cert.generateSubjectKeyIdentifier().getBytes() : p.keyIdentifier;
|
|
7709
7709
|
M.push(
|
|
7710
|
-
e.create(e.Class.CONTEXT_SPECIFIC, 0, !1,
|
|
7710
|
+
e.create(e.Class.CONTEXT_SPECIFIC, 0, !1, _)
|
|
7711
7711
|
);
|
|
7712
7712
|
}
|
|
7713
7713
|
if (p.authorityCertIssuer) {
|
|
@@ -8113,14 +8113,14 @@ function Xr() {
|
|
|
8113
8113
|
if (G = i[0] || p.getIssuer(x), G === null && x.isIssuer(x) && (z = !0, G = x), G) {
|
|
8114
8114
|
var Y = G;
|
|
8115
8115
|
t.util.isArray(Y) || (Y = [Y]);
|
|
8116
|
-
for (var
|
|
8116
|
+
for (var _ = !1; !_ && Y.length > 0; ) {
|
|
8117
8117
|
G = Y.shift();
|
|
8118
8118
|
try {
|
|
8119
|
-
|
|
8119
|
+
_ = G.verify(x);
|
|
8120
8120
|
} catch {
|
|
8121
8121
|
}
|
|
8122
8122
|
}
|
|
8123
|
-
|
|
8123
|
+
_ || (V = {
|
|
8124
8124
|
message: "Certificate signature is invalid.",
|
|
8125
8125
|
error: a.certificateError.bad_certificate
|
|
8126
8126
|
});
|
|
@@ -8160,11 +8160,11 @@ function Xr() {
|
|
|
8160
8160
|
});
|
|
8161
8161
|
}
|
|
8162
8162
|
}
|
|
8163
|
-
var
|
|
8163
|
+
var Z = V === null ? !0 : V.error, X = n.verify ? n.verify(Z, M, B) : Z;
|
|
8164
8164
|
if (X === !0)
|
|
8165
8165
|
V = null;
|
|
8166
8166
|
else
|
|
8167
|
-
throw
|
|
8167
|
+
throw Z === !0 && (V = {
|
|
8168
8168
|
message: "The application rejected the certificate.",
|
|
8169
8169
|
error: a.certificateError.bad_certificate
|
|
8170
8170
|
}), (X || X === 0) && (typeof X == "object" && !t.util.isArray(X) ? (X.message && (V.message = X.message), X.error && (V.error = X.error)) : typeof X == "string" && (V.error = X)), V;
|
|
@@ -8738,7 +8738,7 @@ function cn() {
|
|
|
8738
8738
|
}
|
|
8739
8739
|
var Y = null;
|
|
8740
8740
|
if (C !== null) {
|
|
8741
|
-
var
|
|
8741
|
+
var _ = a.wrapRsaPrivateKey(a.privateKeyToAsn1(C));
|
|
8742
8742
|
s === null ? Y = e.create(e.Class.UNIVERSAL, e.Type.SEQUENCE, !0, [
|
|
8743
8743
|
// bagId
|
|
8744
8744
|
e.create(
|
|
@@ -8750,7 +8750,7 @@ function cn() {
|
|
|
8750
8750
|
// bagValue
|
|
8751
8751
|
e.create(e.Class.CONTEXT_SPECIFIC, 0, !0, [
|
|
8752
8752
|
// PrivateKeyInfo
|
|
8753
|
-
|
|
8753
|
+
_
|
|
8754
8754
|
]),
|
|
8755
8755
|
// bagAttributes (OPTIONAL)
|
|
8756
8756
|
T
|
|
@@ -8765,7 +8765,7 @@ function cn() {
|
|
|
8765
8765
|
// bagValue
|
|
8766
8766
|
e.create(e.Class.CONTEXT_SPECIFIC, 0, !0, [
|
|
8767
8767
|
// EncryptedPrivateKeyInfo
|
|
8768
|
-
a.encryptPrivateKeyInfo(
|
|
8768
|
+
a.encryptPrivateKeyInfo(_, s, h)
|
|
8769
8769
|
]),
|
|
8770
8770
|
// bagAttributes (OPTIONAL)
|
|
8771
8771
|
T
|
|
@@ -8803,9 +8803,9 @@ function cn() {
|
|
|
8803
8803
|
if (h.useMac) {
|
|
8804
8804
|
var p = t.md.sha1.create(), Ie = new t.util.ByteBuffer(
|
|
8805
8805
|
t.random.getBytes(h.saltSize)
|
|
8806
|
-
), $ = h.count, C = d.generateKey(s, Ie, 3, $, 20),
|
|
8807
|
-
|
|
8808
|
-
var X =
|
|
8806
|
+
), $ = h.count, C = d.generateKey(s, Ie, 3, $, 20), Z = t.hmac.create();
|
|
8807
|
+
Z.start(p, C), Z.update(e.toDer(he).getBytes());
|
|
8808
|
+
var X = Z.getMac();
|
|
8809
8809
|
Ce = e.create(e.Class.UNIVERSAL, e.Type.SEQUENCE, !0, [
|
|
8810
8810
|
// mac DigestInfo
|
|
8811
8811
|
e.create(e.Class.UNIVERSAL, e.Type.SEQUENCE, !0, [
|
|
@@ -9613,15 +9613,15 @@ function dn() {
|
|
|
9613
9613
|
/*CER*/
|
|
9614
9614
|
[n, D, O, n, M]
|
|
9615
9615
|
];
|
|
9616
|
-
var G = r.handleHelloRequest, z = r.handleServerHello, Y = r.handleCertificate,
|
|
9616
|
+
var G = r.handleHelloRequest, z = r.handleServerHello, Y = r.handleCertificate, _ = r.handleServerKeyExchange, te = r.handleCertificateRequest, ue = r.handleServerHelloDone, he = r.handleFinished, Ce = [];
|
|
9617
9617
|
Ce[r.ConnectionEnd.client] = [
|
|
9618
9618
|
// HR,01,SH,03,04,05,06,07,08,09,10,SC,SK,CR,HD,15,CK,17,18,19,FI
|
|
9619
9619
|
/*SHE*/
|
|
9620
9620
|
[n, n, z, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n],
|
|
9621
9621
|
/*SCE*/
|
|
9622
|
-
[G, n, n, n, n, n, n, n, n, n, n, Y,
|
|
9622
|
+
[G, n, n, n, n, n, n, n, n, n, n, Y, _, te, ue, n, n, n, n, n, n],
|
|
9623
9623
|
/*SKE*/
|
|
9624
|
-
[G, n, n, n, n, n, n, n, n, n, n, n,
|
|
9624
|
+
[G, n, n, n, n, n, n, n, n, n, n, n, _, te, ue, n, n, n, n, n, n],
|
|
9625
9625
|
/*SCR*/
|
|
9626
9626
|
[G, n, n, n, n, n, n, n, n, n, n, n, n, te, ue, n, n, n, n, n, n],
|
|
9627
9627
|
/*SHD*/
|
|
@@ -9635,7 +9635,7 @@ function dn() {
|
|
|
9635
9635
|
/*SER*/
|
|
9636
9636
|
[G, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n]
|
|
9637
9637
|
];
|
|
9638
|
-
var Ie = r.handleClientHello, $ = r.handleClientKeyExchange,
|
|
9638
|
+
var Ie = r.handleClientHello, $ = r.handleClientKeyExchange, Z = r.handleCertificateVerify;
|
|
9639
9639
|
Ce[r.ConnectionEnd.server] = [
|
|
9640
9640
|
// 01,CH,02,03,04,05,06,07,08,09,10,CC,12,13,14,CV,CK,17,18,19,FI
|
|
9641
9641
|
/*CHE*/
|
|
@@ -9645,7 +9645,7 @@ function dn() {
|
|
|
9645
9645
|
/*CKE*/
|
|
9646
9646
|
[n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, $, n, n, n, n],
|
|
9647
9647
|
/*CCV*/
|
|
9648
|
-
[n, n, n, n, n, n, n, n, n, n, n, n, n, n, n,
|
|
9648
|
+
[n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, Z, n, n, n, n, n],
|
|
9649
9649
|
/*CCC*/
|
|
9650
9650
|
[n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n],
|
|
9651
9651
|
/*CFI*/
|
|
@@ -10481,30 +10481,30 @@ function pn() {
|
|
|
10481
10481
|
], I = !0;
|
|
10482
10482
|
}
|
|
10483
10483
|
function g(l, S, U) {
|
|
10484
|
-
for (var E, u, y, C, m, s, h, v, T, R, p, i, n, B, D, O, V, M, x, G, z, Y,
|
|
10484
|
+
for (var E, u, y, C, m, s, h, v, T, R, p, i, n, B, D, O, V, M, x, G, z, Y, _, te, ue, he, Ce, Ie, $, Z, X, Oe, de, f, L, w = U.length(); w >= 128; ) {
|
|
10485
10485
|
for ($ = 0; $ < 16; ++$)
|
|
10486
10486
|
S[$][0] = U.getInt32() >>> 0, S[$][1] = U.getInt32() >>> 0;
|
|
10487
10487
|
for (; $ < 80; ++$)
|
|
10488
|
-
Oe = S[$ - 2],
|
|
10489
|
-
(X >>> 29 |
|
|
10490
|
-
|
|
10491
|
-
(X << 3 |
|
|
10492
|
-
(
|
|
10493
|
-
(
|
|
10494
|
-
|
|
10495
|
-
(
|
|
10496
|
-
(
|
|
10497
|
-
for (n = l[0][0], B = l[0][1], D = l[1][0], O = l[1][1], V = l[2][0], M = l[2][1], x = l[3][0], G = l[3][1], z = l[4][0], Y = l[4][1],
|
|
10488
|
+
Oe = S[$ - 2], Z = Oe[0], X = Oe[1], E = ((Z >>> 19 | X << 13) ^ // ROTR 19
|
|
10489
|
+
(X >>> 29 | Z << 3) ^ // ROTR 61/(swap + ROTR 29)
|
|
10490
|
+
Z >>> 6) >>> 0, u = ((Z << 13 | X >>> 19) ^ // ROTR 19
|
|
10491
|
+
(X << 3 | Z >>> 29) ^ // ROTR 61/(swap + ROTR 29)
|
|
10492
|
+
(Z << 26 | X >>> 6)) >>> 0, f = S[$ - 15], Z = f[0], X = f[1], y = ((Z >>> 1 | X << 31) ^ // ROTR 1
|
|
10493
|
+
(Z >>> 8 | X << 24) ^ // ROTR 8
|
|
10494
|
+
Z >>> 7) >>> 0, C = ((Z << 31 | X >>> 1) ^ // ROTR 1
|
|
10495
|
+
(Z << 24 | X >>> 8) ^ // ROTR 8
|
|
10496
|
+
(Z << 25 | X >>> 7)) >>> 0, de = S[$ - 7], L = S[$ - 16], X = u + de[1] + C + L[1], S[$][0] = E + de[0] + y + L[0] + (X / 4294967296 >>> 0) >>> 0, S[$][1] = X >>> 0;
|
|
10497
|
+
for (n = l[0][0], B = l[0][1], D = l[1][0], O = l[1][1], V = l[2][0], M = l[2][1], x = l[3][0], G = l[3][1], z = l[4][0], Y = l[4][1], _ = l[5][0], te = l[5][1], ue = l[6][0], he = l[6][1], Ce = l[7][0], Ie = l[7][1], $ = 0; $ < 80; ++$)
|
|
10498
10498
|
h = ((z >>> 14 | Y << 18) ^ // ROTR 14
|
|
10499
10499
|
(z >>> 18 | Y << 14) ^ // ROTR 18
|
|
10500
10500
|
(Y >>> 9 | z << 23)) >>> 0, v = ((z << 18 | Y >>> 14) ^ // ROTR 14
|
|
10501
10501
|
(z << 14 | Y >>> 18) ^ // ROTR 18
|
|
10502
|
-
(Y << 23 | z >>> 9)) >>> 0, T = (ue ^ z & (
|
|
10502
|
+
(Y << 23 | z >>> 9)) >>> 0, T = (ue ^ z & (_ ^ ue)) >>> 0, R = (he ^ Y & (te ^ he)) >>> 0, m = ((n >>> 28 | B << 4) ^ // ROTR 28
|
|
10503
10503
|
(B >>> 2 | n << 30) ^ // ROTR 34/(swap + ROTR 2)
|
|
10504
10504
|
(B >>> 7 | n << 25)) >>> 0, s = ((n << 4 | B >>> 28) ^ // ROTR 28
|
|
10505
10505
|
(B << 30 | n >>> 2) ^ // ROTR 34/(swap + ROTR 2)
|
|
10506
|
-
(B << 25 | n >>> 7)) >>> 0, p = (n & D | V & (n ^ D)) >>> 0, i = (B & O | M & (B ^ O)) >>> 0, X = Ie + v + R + b[$][1] + S[$][1], E = Ce + h + T + b[$][0] + S[$][0] + (X / 4294967296 >>> 0) >>> 0, u = X >>> 0, X = s + i, y = m + p + (X / 4294967296 >>> 0) >>> 0, C = X >>> 0, Ce = ue, Ie = he, ue =
|
|
10507
|
-
X = l[0][1] + B, l[0][0] = l[0][0] + n + (X / 4294967296 >>> 0) >>> 0, l[0][1] = X >>> 0, X = l[1][1] + O, l[1][0] = l[1][0] + D + (X / 4294967296 >>> 0) >>> 0, l[1][1] = X >>> 0, X = l[2][1] + M, l[2][0] = l[2][0] + V + (X / 4294967296 >>> 0) >>> 0, l[2][1] = X >>> 0, X = l[3][1] + G, l[3][0] = l[3][0] + x + (X / 4294967296 >>> 0) >>> 0, l[3][1] = X >>> 0, X = l[4][1] + Y, l[4][0] = l[4][0] + z + (X / 4294967296 >>> 0) >>> 0, l[4][1] = X >>> 0, X = l[5][1] + te, l[5][0] = l[5][0] +
|
|
10506
|
+
(B << 25 | n >>> 7)) >>> 0, p = (n & D | V & (n ^ D)) >>> 0, i = (B & O | M & (B ^ O)) >>> 0, X = Ie + v + R + b[$][1] + S[$][1], E = Ce + h + T + b[$][0] + S[$][0] + (X / 4294967296 >>> 0) >>> 0, u = X >>> 0, X = s + i, y = m + p + (X / 4294967296 >>> 0) >>> 0, C = X >>> 0, Ce = ue, Ie = he, ue = _, he = te, _ = z, te = Y, X = G + u, z = x + E + (X / 4294967296 >>> 0) >>> 0, Y = X >>> 0, x = V, G = M, V = D, M = O, D = n, O = B, X = u + C, n = E + y + (X / 4294967296 >>> 0) >>> 0, B = X >>> 0;
|
|
10507
|
+
X = l[0][1] + B, l[0][0] = l[0][0] + n + (X / 4294967296 >>> 0) >>> 0, l[0][1] = X >>> 0, X = l[1][1] + O, l[1][0] = l[1][0] + D + (X / 4294967296 >>> 0) >>> 0, l[1][1] = X >>> 0, X = l[2][1] + M, l[2][0] = l[2][0] + V + (X / 4294967296 >>> 0) >>> 0, l[2][1] = X >>> 0, X = l[3][1] + G, l[3][0] = l[3][0] + x + (X / 4294967296 >>> 0) >>> 0, l[3][1] = X >>> 0, X = l[4][1] + Y, l[4][0] = l[4][0] + z + (X / 4294967296 >>> 0) >>> 0, l[4][1] = X >>> 0, X = l[5][1] + te, l[5][0] = l[5][0] + _ + (X / 4294967296 >>> 0) >>> 0, l[5][1] = X >>> 0, X = l[6][1] + he, l[6][0] = l[6][0] + ue + (X / 4294967296 >>> 0) >>> 0, l[6][1] = X >>> 0, X = l[7][1] + Ie, l[7][0] = l[7][0] + Ce + (X / 4294967296 >>> 0) >>> 0, l[7][1] = X >>> 0, w -= 128;
|
|
10508
10508
|
}
|
|
10509
10509
|
}
|
|
10510
10510
|
return Vr.exports;
|
|
@@ -10911,7 +10911,7 @@ function ys() {
|
|
|
10911
10911
|
for (k = 0; k < 32; ++k)
|
|
10912
10912
|
f[k + 32] = o[k];
|
|
10913
10913
|
var le = s(f, w);
|
|
10914
|
-
if (p(le),
|
|
10914
|
+
if (p(le), _(J, se, le), te(se, L.subarray(32)), i(J, se), B(K, J), w -= 64, G(L, 0, K, 0)) {
|
|
10915
10915
|
for (k = 0; k < w; ++k)
|
|
10916
10916
|
f[k] = 0;
|
|
10917
10917
|
return -1;
|
|
@@ -10941,7 +10941,7 @@ function ys() {
|
|
|
10941
10941
|
}
|
|
10942
10942
|
function i(f, L) {
|
|
10943
10943
|
var w = $(), o = $(), k = $(), F = $(), K = $(), J = $(), se = $(), le = $(), q = $();
|
|
10944
|
-
X(w, f[1], f[0]), X(q, L[1], L[0]), de(w, w, q),
|
|
10944
|
+
X(w, f[1], f[0]), X(q, L[1], L[0]), de(w, w, q), Z(o, f[0], f[1]), Z(q, L[0], L[1]), de(o, o, q), de(k, f[3], L[3]), de(k, k, E), de(F, f[2], L[2]), Z(F, F, F), X(K, o, w), X(J, F, k), Z(se, F, k), Z(le, o, w), de(f[0], K, J), de(f[1], le, se), de(f[2], se, J), de(f[3], K, le);
|
|
10945
10945
|
}
|
|
10946
10946
|
function n(f, L, w) {
|
|
10947
10947
|
for (var o = 0; o < 4; ++o)
|
|
@@ -10965,7 +10965,7 @@ function ys() {
|
|
|
10965
10965
|
}
|
|
10966
10966
|
function O(f, L) {
|
|
10967
10967
|
var w = $(), o = $(), k = $(), F = $(), K = $(), J = $(), se = $();
|
|
10968
|
-
return ue(f[2], S), V(f[1], L), Oe(k, f[1]), de(F, k, U), X(k, k, f[2]),
|
|
10968
|
+
return ue(f[2], S), V(f[1], L), Oe(k, f[1]), de(F, k, U), X(k, k, f[2]), Z(F, f[2], F), Oe(K, F), Oe(J, K), de(se, J, K), de(w, se, k), de(w, w, F), M(w, w), de(w, w, k), de(w, w, F), de(w, w, F), de(f[0], w, F), Oe(o, f[0]), de(o, o, F), x(o, k) && de(f[0], f[0], m), Oe(o, f[0]), de(o, o, F), x(o, k) ? -1 : (Y(f[0]) === L[31] >> 7 && X(f[0], l, f[0]), de(f[3], f[0], f[1]), 0);
|
|
10969
10969
|
}
|
|
10970
10970
|
function V(f, L) {
|
|
10971
10971
|
var w;
|
|
@@ -10999,14 +10999,14 @@ function ys() {
|
|
|
10999
10999
|
var L = new c(32);
|
|
11000
11000
|
return D(L, f), L[0] & 1;
|
|
11001
11001
|
}
|
|
11002
|
-
function
|
|
11002
|
+
function _(f, L, w) {
|
|
11003
11003
|
var o, k;
|
|
11004
11004
|
for (ue(f[0], l), ue(f[1], S), ue(f[2], S), ue(f[3], l), k = 255; k >= 0; --k)
|
|
11005
11005
|
o = w[k / 8 | 0] >> (k & 7) & 1, n(f, L, o), i(L, f), i(f, f), n(f, L, o);
|
|
11006
11006
|
}
|
|
11007
11007
|
function te(f, L) {
|
|
11008
11008
|
var w = [$(), $(), $(), $()];
|
|
11009
|
-
ue(w[0], u), ue(w[1], y), ue(w[2], S), de(w[3], u, y),
|
|
11009
|
+
ue(w[0], u), ue(w[1], y), ue(w[2], S), de(w[3], u, y), _(f, w, L);
|
|
11010
11010
|
}
|
|
11011
11011
|
function ue(f, L) {
|
|
11012
11012
|
var w;
|
|
@@ -11039,7 +11039,7 @@ function ys() {
|
|
|
11039
11039
|
w[L] = f[L];
|
|
11040
11040
|
return w;
|
|
11041
11041
|
}
|
|
11042
|
-
function
|
|
11042
|
+
function Z(f, L, w) {
|
|
11043
11043
|
for (var o = 0; o < 16; ++o)
|
|
11044
11044
|
f[o] = L[o] + w[o];
|
|
11045
11045
|
}
|
|
@@ -12139,19 +12139,19 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12139
12139
|
}, Us = {
|
|
12140
12140
|
key: 1,
|
|
12141
12141
|
class: "material-symbols--keyboard"
|
|
12142
|
-
}, Ds = { class: "kernelift-chat-container__user-messages-panel" },
|
|
12142
|
+
}, Ds = ["title"], Vs = { class: "kernelift-chat-container__user-messages-panel" }, Ps = { class: "kernelift-chat-container__user-messages-header" }, Ks = { class: "kernelift-chat-container__user-messages-list" }, Os = ["onClick"], Ms = { class: "kernelift-chat-container__user-message-index" }, xs = { class: "kernelift-chat-container__user-message-content" }, Fs = {
|
|
12143
12143
|
key: 0,
|
|
12144
12144
|
class: "kernelift-chat-container__user-messages-empty"
|
|
12145
|
-
},
|
|
12145
|
+
}, Gs = { class: "kernelift-chat-container__messages-section" }, js = { class: "kernelift-chat-container__messages-container" }, zs = { class: "kernelift-chat-container__messages-list-wrapper" }, qs = {
|
|
12146
12146
|
key: 1,
|
|
12147
12147
|
class: "kernelift-chat-container__empty-state"
|
|
12148
|
-
},
|
|
12148
|
+
}, Qs = { class: "kernelift-chat-container__empty-text" }, Js = { class: "kernelift-chat-container__empty-text" }, Hs = {
|
|
12149
12149
|
key: 2,
|
|
12150
12150
|
class: "kernelift-chat-container__next-tips"
|
|
12151
|
-
},
|
|
12151
|
+
}, Ys = ["onClick"], Ws = ["title"], Xs = { class: "kernelift-chat-container__footer-wrapper" }, Zs = {
|
|
12152
12152
|
key: 0,
|
|
12153
12153
|
class: "kernelift-chat-container__sender-tools"
|
|
12154
|
-
},
|
|
12154
|
+
}, _s = { class: "kernelift-chat-container__footer-note" }, $s = { class: "kernelift-chat-container__workspace-close" }, Fr = 62, eo = 300, to = /* @__PURE__ */ Ot({
|
|
12155
12155
|
__name: "chat-container",
|
|
12156
12156
|
props: /* @__PURE__ */ Et({
|
|
12157
12157
|
uuid: { default: "default" },
|
|
@@ -12200,16 +12200,16 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12200
12200
|
emits: /* @__PURE__ */ Et(["send", "cancel", "clear", "change-record", "change-collapse", "change-theme", "change-aside-width", "click-logo", "bubble-event", "close-workspace", "scroll-bottom"], ["update:messages", "update:modelValue", "update:loading", "update:record-id"]),
|
|
12201
12201
|
setup(t, { expose: e, emit: a }) {
|
|
12202
12202
|
Za((Q) => ({
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12210
|
-
|
|
12211
|
-
|
|
12212
|
-
|
|
12203
|
+
v3974a757: Q.primaryColor,
|
|
12204
|
+
b616c47e: g.value,
|
|
12205
|
+
v2047d338: c.value[0],
|
|
12206
|
+
v2047d357: c.value[1],
|
|
12207
|
+
v2047d376: c.value[2],
|
|
12208
|
+
v2047d395: c.value[3],
|
|
12209
|
+
v2047d3b4: c.value[4],
|
|
12210
|
+
v245f68e7: Be.value,
|
|
12211
|
+
v7d8b8246: Te.value,
|
|
12212
|
+
v3ab7062e: Ne.value
|
|
12213
12213
|
}));
|
|
12214
12214
|
const d = t, I = parseFloat(getComputedStyle(document.documentElement).fontSize), b = tt(Fr), c = De(() => os(d.primaryColor, 5, 0.8, 4));
|
|
12215
12215
|
function r(Q) {
|
|
@@ -12224,7 +12224,7 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12224
12224
|
E.value = !1, s("cancel");
|
|
12225
12225
|
};
|
|
12226
12226
|
function T(Q) {
|
|
12227
|
-
y.value = Q, u.value = Q?.id,
|
|
12227
|
+
y.value = Q, u.value = Q?.id, Z.value = typeof window < "u" ? window.innerWidth <= 768 : !1, Z.value && L(!0), B.value = !1, s("change-record", Q);
|
|
12228
12228
|
}
|
|
12229
12229
|
Ct(
|
|
12230
12230
|
() => u.value,
|
|
@@ -12277,7 +12277,7 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12277
12277
|
return;
|
|
12278
12278
|
}
|
|
12279
12279
|
const ee = Q.split(`
|
|
12280
|
-
`).length, ae =
|
|
12280
|
+
`).length, ae = Z.value ? 30 : 60, me = Math.max(ee, Math.ceil(Q.length / ae));
|
|
12281
12281
|
if (me >= 3) {
|
|
12282
12282
|
const lt = me * 24 + 14;
|
|
12283
12283
|
b.value = Math.min(lt, d.inputHeight);
|
|
@@ -12285,7 +12285,7 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12285
12285
|
b.value = Fr;
|
|
12286
12286
|
}
|
|
12287
12287
|
);
|
|
12288
|
-
const Y = Ut(d.uuid + "__kl-ai-chat_aside-width", d.defaultAsideWidth),
|
|
12288
|
+
const Y = Ut(d.uuid + "__kl-ai-chat_aside-width", d.defaultAsideWidth), _ = tt(!1), te = tt(0), ue = tt(0);
|
|
12289
12289
|
Ct(
|
|
12290
12290
|
() => Y.value,
|
|
12291
12291
|
(Q) => {
|
|
@@ -12293,19 +12293,19 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12293
12293
|
}
|
|
12294
12294
|
);
|
|
12295
12295
|
const he = (Q) => {
|
|
12296
|
-
|
|
12296
|
+
_.value = !0, te.value = Q.clientX, ue.value = Y.value, document.body.style.userSelect = "none";
|
|
12297
12297
|
}, Ce = (Q) => {
|
|
12298
|
-
if (!
|
|
12298
|
+
if (!_.value) return;
|
|
12299
12299
|
const ee = Q.clientX - te.value;
|
|
12300
12300
|
let ae = ue.value + ee;
|
|
12301
12301
|
const me = Math.max(15.6 * I, 250);
|
|
12302
12302
|
ae = Math.max(me, Math.min(700, window.innerWidth - me, ae)), Y.value = ae;
|
|
12303
12303
|
}, Ie = () => {
|
|
12304
|
-
|
|
12304
|
+
_.value = !1, document.body.style.userSelect = "";
|
|
12305
12305
|
};
|
|
12306
12306
|
function $() {
|
|
12307
12307
|
const Q = window.innerWidth;
|
|
12308
|
-
|
|
12308
|
+
Z.value = Q <= 768, Z.value && (Oe.value = !1, X.value = !0);
|
|
12309
12309
|
}
|
|
12310
12310
|
zr(() => {
|
|
12311
12311
|
d.defaultRecordId && T(
|
|
@@ -12314,8 +12314,8 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12314
12314
|
}), Xa(() => {
|
|
12315
12315
|
document.removeEventListener("mousemove", Ce), document.removeEventListener("mouseup", Ie), window.removeEventListener("resize", $), O && (clearTimeout(O), O = null);
|
|
12316
12316
|
});
|
|
12317
|
-
const
|
|
12318
|
-
|
|
12317
|
+
const Z = tt(typeof window < "u" ? window.innerWidth <= 768 : !1), X = Ut(d.uuid + "__kl-ai-chat_collapse", d.defaultCollapse), Oe = Ut(d.uuid + "__kl-ai-chat_show-aside", !0), de = Ut(d.uuid + "__kl-ai-chat_sender-visible", !0);
|
|
12318
|
+
Z.value && (X.value = !0, Oe.value = !1);
|
|
12319
12319
|
const f = tt(!1);
|
|
12320
12320
|
function L(Q) {
|
|
12321
12321
|
if (Q === X.value) return;
|
|
@@ -12344,7 +12344,7 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12344
12344
|
}
|
|
12345
12345
|
function se(Q) {
|
|
12346
12346
|
const ee = (/* @__PURE__ */ new Date()).getTime(), ae = ee - M;
|
|
12347
|
-
ae <
|
|
12347
|
+
ae < eo && ae > 0 && (Q.preventDefault(), J()), M = ee;
|
|
12348
12348
|
}
|
|
12349
12349
|
function le() {
|
|
12350
12350
|
p.value.length > 0 && (D.value = !D.value);
|
|
@@ -12357,35 +12357,35 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12357
12357
|
me && (me.scrollIntoView({ behavior: "smooth", block: "center" }), D.value = !1);
|
|
12358
12358
|
}
|
|
12359
12359
|
function ie() {
|
|
12360
|
-
y.value = null, u.value = void 0, S.value = [],
|
|
12360
|
+
y.value = null, u.value = void 0, S.value = [], Z.value = typeof window < "u" ? window.innerWidth <= 768 : !1, Z.value && L(!0), B.value = !1, s("clear");
|
|
12361
12361
|
}
|
|
12362
12362
|
function fe() {
|
|
12363
12363
|
de.value = !de.value;
|
|
12364
12364
|
}
|
|
12365
12365
|
function Ee() {
|
|
12366
|
-
|
|
12366
|
+
Z.value && !X.value && L(!0);
|
|
12367
12367
|
}
|
|
12368
12368
|
const ge = De(() => ({
|
|
12369
|
-
"kernelift-chat-container__aside--transition": !
|
|
12370
|
-
"mobile-aside":
|
|
12369
|
+
"kernelift-chat-container__aside--transition": !_.value,
|
|
12370
|
+
"mobile-aside": Z.value
|
|
12371
12371
|
})), ke = De(() => {
|
|
12372
12372
|
const Q = {
|
|
12373
|
-
width:
|
|
12373
|
+
width: Z.value ? "100%" : X.value ? "0px" : `${Y.value}px`,
|
|
12374
12374
|
zIndex: X.value && !f.value ? -1 : 99,
|
|
12375
12375
|
opacity: X.value ? 0 : 1,
|
|
12376
|
-
transform: X.value && !
|
|
12376
|
+
transform: X.value && !Z.value ? "translateX(-100%)" : "translateX(0%)"
|
|
12377
12377
|
};
|
|
12378
|
-
return
|
|
12378
|
+
return Z.value ? Q.backgroundColor = X.value ? "transparent" : "#1b1b1b56" : Q.backgroundColor = "var(--kl-background-color, #fff)", Q;
|
|
12379
12379
|
}), we = De(() => {
|
|
12380
12380
|
const Q = {
|
|
12381
|
-
width:
|
|
12382
|
-
transform: X.value &&
|
|
12381
|
+
width: Z.value ? "80%" : "100%",
|
|
12382
|
+
transform: X.value && Z.value ? "translateX(-100%)" : "translateX(0%)",
|
|
12383
12383
|
backgroundColor: "var(--kl-background-color, #fff)"
|
|
12384
12384
|
};
|
|
12385
|
-
return
|
|
12385
|
+
return Z.value && (Q.transition = "all 0.2s ease"), Q;
|
|
12386
12386
|
}), Ae = De(() => d.hasSenderTools ? de.value && d.showSender || d.alwaysShowSenderTools : !1), Ne = De(() => `calc(100% - ${(d.showSender && de.value ? b.value + 52 : 0) / I}rem - ${(Ae.value ? 40 : 0) / I}rem - 2rem)`), Be = De(() => `${d.headerHeight / I}rem`), Te = De(() => `${(d.headerHeight + 8) / I}rem`), Re = De(() => ((d.showSender && de.value ? b.value + 52 : 0) + (Ae.value ? 40 : 0)) / I + "rem"), Ue = De(() => (d.markdownClassName || "") + (d.themeMode === "dark" ? " dark" : ""));
|
|
12387
12387
|
return e({
|
|
12388
|
-
isMobile:
|
|
12388
|
+
isMobile: Z,
|
|
12389
12389
|
collapse: X,
|
|
12390
12390
|
asideWidth: Y,
|
|
12391
12391
|
scrollToBottom: G
|
|
@@ -12394,7 +12394,7 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12394
12394
|
dark: t.themeMode === "dark"
|
|
12395
12395
|
}])
|
|
12396
12396
|
}, [
|
|
12397
|
-
ye(Q.$slots, "left-aside", { mobile:
|
|
12397
|
+
ye(Q.$slots, "left-aside", { mobile: Z.value }, void 0, !0),
|
|
12398
12398
|
re("div", As, [
|
|
12399
12399
|
re("aside", {
|
|
12400
12400
|
class: rt(["kernelift-chat-container__aside", ge.value]),
|
|
@@ -12403,7 +12403,7 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12403
12403
|
}, [
|
|
12404
12404
|
ye(Q.$slots, "aside", {
|
|
12405
12405
|
record: y.value,
|
|
12406
|
-
mobile:
|
|
12406
|
+
mobile: Z.value
|
|
12407
12407
|
}, () => [
|
|
12408
12408
|
Tt(Qi, {
|
|
12409
12409
|
modelValue: y.value,
|
|
@@ -12423,28 +12423,28 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12423
12423
|
onChangeTheme: w
|
|
12424
12424
|
}, {
|
|
12425
12425
|
logo: xe(() => [
|
|
12426
|
-
ye(Q.$slots, "logo", { mobile:
|
|
12426
|
+
ye(Q.$slots, "logo", { mobile: Z.value }, void 0, !0)
|
|
12427
12427
|
]),
|
|
12428
12428
|
footer: xe(() => [
|
|
12429
12429
|
ye(Q.$slots, "record-footer", {
|
|
12430
12430
|
record: y.value,
|
|
12431
|
-
mobile:
|
|
12431
|
+
mobile: Z.value
|
|
12432
12432
|
}, void 0, !0)
|
|
12433
12433
|
]),
|
|
12434
12434
|
"new-chat-button": xe(({ execute: ae }) => [
|
|
12435
12435
|
ye(Q.$slots, "new-chat-button", {
|
|
12436
|
-
mobile:
|
|
12436
|
+
mobile: Z.value,
|
|
12437
12437
|
execute: ae
|
|
12438
12438
|
}, void 0, !0)
|
|
12439
12439
|
]),
|
|
12440
12440
|
"record-dropdown": xe(() => [
|
|
12441
|
-
ye(Q.$slots, "record-dropdown", { mobile:
|
|
12441
|
+
ye(Q.$slots, "record-dropdown", { mobile: Z.value }, void 0, !0)
|
|
12442
12442
|
]),
|
|
12443
12443
|
_: 3
|
|
12444
12444
|
}, 8, ["modelValue", "style", "data", "theme-mode", "collapse", "actions", "i18n", "has-theme-mode"])
|
|
12445
12445
|
], !0)
|
|
12446
12446
|
], 6),
|
|
12447
|
-
!at(X) && !
|
|
12447
|
+
!at(X) && !Z.value ? (ce(), pe("div", {
|
|
12448
12448
|
key: 0,
|
|
12449
12449
|
class: "kernelift-chat-container__resize-handle",
|
|
12450
12450
|
onMousedown: he
|
|
@@ -12456,22 +12456,22 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12456
12456
|
}, [
|
|
12457
12457
|
re("div", {
|
|
12458
12458
|
class: rt(["kernelift-chat-container__chat-area", {
|
|
12459
|
-
"kernelift-chat-container__chat-area--full": !t.showWorkspace ||
|
|
12460
|
-
"kernelift-chat-container__chat-area--half": t.showWorkspace && !
|
|
12459
|
+
"kernelift-chat-container__chat-area--full": !t.showWorkspace || Z.value,
|
|
12460
|
+
"kernelift-chat-container__chat-area--half": t.showWorkspace && !Z.value
|
|
12461
12461
|
}])
|
|
12462
12462
|
}, [
|
|
12463
12463
|
t.hasHeader ? (ce(), pe("header", {
|
|
12464
12464
|
key: 0,
|
|
12465
12465
|
class: "kernelift-chat-container__header",
|
|
12466
12466
|
onDblclick: J,
|
|
12467
|
-
onClick: ee[6] || (ee[6] = (ae) =>
|
|
12467
|
+
onClick: ee[6] || (ee[6] = (ae) => Z.value ? se : void 0)
|
|
12468
12468
|
}, [
|
|
12469
12469
|
ye(Q.$slots, "header", {
|
|
12470
12470
|
record: y.value,
|
|
12471
|
-
mobile:
|
|
12471
|
+
mobile: Z.value
|
|
12472
12472
|
}, () => [
|
|
12473
12473
|
st(Tt(is, { record: y.value }, null, 8, ["record"]), [
|
|
12474
|
-
[ct, !
|
|
12474
|
+
[ct, !Z.value]
|
|
12475
12475
|
])
|
|
12476
12476
|
], !0),
|
|
12477
12477
|
at(X) ? (ce(), pe("div", Bs, [
|
|
@@ -12479,7 +12479,7 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12479
12479
|
class: "kernelift-chat-container__logo",
|
|
12480
12480
|
onClick: ee[3] || (ee[3] = (ae) => s("click-logo"))
|
|
12481
12481
|
}, [
|
|
12482
|
-
ye(Q.$slots, "header-logo", { mobile:
|
|
12482
|
+
ye(Q.$slots, "header-logo", { mobile: Z.value }, () => [
|
|
12483
12483
|
ee[13] || (ee[13] = re("img", {
|
|
12484
12484
|
src: jr,
|
|
12485
12485
|
class: "kernelift-chat-container__logo-img"
|
|
@@ -12522,9 +12522,18 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12522
12522
|
title: at(de) ? t.i18n?.chat?.hideSender ?? "隐藏输入框" : t.i18n?.chat?.showSender ?? "显示输入框"
|
|
12523
12523
|
}, [
|
|
12524
12524
|
at(de) ? (ce(), pe("i", Ls)) : (ce(), pe("i", Us))
|
|
12525
|
-
], 8, Rs)) : Ve("", !0)
|
|
12526
|
-
|
|
12527
|
-
|
|
12525
|
+
], 8, Rs)) : Ve("", !0),
|
|
12526
|
+
re("div", {
|
|
12527
|
+
class: "kernelift-chat-container__header-action",
|
|
12528
|
+
onClick: ie,
|
|
12529
|
+
title: t.i18n?.chat?.newChat ?? "新建聊天"
|
|
12530
|
+
}, [...ee[16] || (ee[16] = [
|
|
12531
|
+
re("i", { class: "material-symbols--add-circle-outline" }, null, -1)
|
|
12532
|
+
])], 8, Ds)
|
|
12533
|
+
]),
|
|
12534
|
+
ye(Q.$slots, "collapsed-header-extra", { mobile: Z.value }, void 0, !0)
|
|
12535
|
+
])) : Ve("", !0),
|
|
12536
|
+
ye(Q.$slots, "header-extra", { mobile: Z.value }, void 0, !0)
|
|
12528
12537
|
], 32)) : Ve("", !0),
|
|
12529
12538
|
Tt(Zr, { name: "user-messages-fade" }, {
|
|
12530
12539
|
default: xe(() => [
|
|
@@ -12533,32 +12542,32 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12533
12542
|
class: "kernelift-chat-container__user-messages-overlay",
|
|
12534
12543
|
onClick: ee[8] || (ee[8] = Gr((ae) => D.value = !1, ["self"]))
|
|
12535
12544
|
}, [
|
|
12536
|
-
re("div",
|
|
12537
|
-
re("div",
|
|
12545
|
+
re("div", Vs, [
|
|
12546
|
+
re("div", Ps, [
|
|
12538
12547
|
re("span", null, Pe(t.i18n?.chat?.userMessages ?? "我的提问"), 1),
|
|
12539
12548
|
re("i", {
|
|
12540
12549
|
class: "material-symbols--close",
|
|
12541
12550
|
onClick: ee[7] || (ee[7] = (ae) => D.value = !1)
|
|
12542
12551
|
})
|
|
12543
12552
|
]),
|
|
12544
|
-
re("div",
|
|
12553
|
+
re("div", Ks, [
|
|
12545
12554
|
(ce(!0), pe(Vt, null, Pt(p.value, (ae, me) => (ce(), pe("div", {
|
|
12546
12555
|
key: ae.id,
|
|
12547
12556
|
class: "kernelift-chat-container__user-message-item",
|
|
12548
12557
|
onClick: (Ke) => q(ae.id)
|
|
12549
12558
|
}, [
|
|
12550
|
-
re("div",
|
|
12551
|
-
re("div",
|
|
12552
|
-
], 8,
|
|
12553
|
-
p.value.length === 0 ? (ce(), pe("div",
|
|
12559
|
+
re("div", Ms, Pe(me + 1), 1),
|
|
12560
|
+
re("div", xs, Pe(ae.content.substring(0, 100)) + Pe(ae.content.length > 100 ? "..." : ""), 1)
|
|
12561
|
+
], 8, Os))), 128)),
|
|
12562
|
+
p.value.length === 0 ? (ce(), pe("div", Fs, Pe(t.i18n?.chat?.noUserMessages ?? "暂无提问记录"), 1)) : Ve("", !0)
|
|
12554
12563
|
])
|
|
12555
12564
|
])
|
|
12556
12565
|
])) : Ve("", !0)
|
|
12557
12566
|
]),
|
|
12558
12567
|
_: 1
|
|
12559
12568
|
}),
|
|
12560
|
-
re("section",
|
|
12561
|
-
re("div",
|
|
12569
|
+
re("section", Gs, [
|
|
12570
|
+
re("div", js, [
|
|
12562
12571
|
S.value && S.value.length ? (ce(), pe("div", {
|
|
12563
12572
|
key: 0,
|
|
12564
12573
|
ref_key: "messagesListRef",
|
|
@@ -12566,7 +12575,7 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12566
12575
|
class: "kernelift-chat-container__messages-list",
|
|
12567
12576
|
onScroll: z
|
|
12568
12577
|
}, [
|
|
12569
|
-
re("div",
|
|
12578
|
+
re("div", zs, [
|
|
12570
12579
|
(ce(!0), pe(Vt, null, Pt(S.value, (ae, me) => (ce(), Dt($r, {
|
|
12571
12580
|
modelValue: S.value[me],
|
|
12572
12581
|
"onUpdate:modelValue": (Ke) => S.value[me] = Ke,
|
|
@@ -12575,7 +12584,7 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12575
12584
|
"is-last": me === S.value.length - 1,
|
|
12576
12585
|
"on-copy": t.onCopy,
|
|
12577
12586
|
i18n: t.i18n,
|
|
12578
|
-
"is-mobile":
|
|
12587
|
+
"is-mobile": Z.value,
|
|
12579
12588
|
plugins: t.markdownPlugins,
|
|
12580
12589
|
options: t.markdownOptions,
|
|
12581
12590
|
"after-render": t.onMarkdownAfterRender,
|
|
@@ -12588,37 +12597,37 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12588
12597
|
header: xe(() => [
|
|
12589
12598
|
ye(Q.$slots, "bubble-header", {
|
|
12590
12599
|
data: ae,
|
|
12591
|
-
mobile:
|
|
12600
|
+
mobile: Z.value
|
|
12592
12601
|
}, void 0, !0)
|
|
12593
12602
|
]),
|
|
12594
12603
|
footer: xe(() => [
|
|
12595
12604
|
ye(Q.$slots, "bubble-footer", {
|
|
12596
12605
|
data: ae,
|
|
12597
|
-
mobile:
|
|
12606
|
+
mobile: Z.value
|
|
12598
12607
|
}, void 0, !0)
|
|
12599
12608
|
]),
|
|
12600
12609
|
"bubble-event": xe(() => [
|
|
12601
12610
|
ye(Q.$slots, "bubble-event", {
|
|
12602
12611
|
data: ae,
|
|
12603
|
-
mobile:
|
|
12612
|
+
mobile: Z.value
|
|
12604
12613
|
}, void 0, !0)
|
|
12605
12614
|
]),
|
|
12606
12615
|
"content-header": xe(() => [
|
|
12607
12616
|
ye(Q.$slots, "bubble-content-header", {
|
|
12608
12617
|
data: ae,
|
|
12609
|
-
mobile:
|
|
12618
|
+
mobile: Z.value
|
|
12610
12619
|
}, void 0, !0)
|
|
12611
12620
|
]),
|
|
12612
12621
|
"content-footer": xe(() => [
|
|
12613
12622
|
ye(Q.$slots, "bubble-content-footer", {
|
|
12614
12623
|
data: ae,
|
|
12615
|
-
mobile:
|
|
12624
|
+
mobile: Z.value
|
|
12616
12625
|
}, void 0, !0)
|
|
12617
12626
|
]),
|
|
12618
12627
|
"thinking-header": xe(() => [
|
|
12619
12628
|
ye(Q.$slots, "bubble-thinking-header", {
|
|
12620
12629
|
data: ae,
|
|
12621
|
-
mobile:
|
|
12630
|
+
mobile: Z.value
|
|
12622
12631
|
}, void 0, !0)
|
|
12623
12632
|
]),
|
|
12624
12633
|
_: 2
|
|
@@ -12634,14 +12643,14 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12634
12643
|
i18n: t.i18n,
|
|
12635
12644
|
"theme-mode": t.themeMode,
|
|
12636
12645
|
"markdown-class": Ue.value,
|
|
12637
|
-
"is-mobile":
|
|
12646
|
+
"is-mobile": Z.value,
|
|
12638
12647
|
plugins: t.markdownPlugins,
|
|
12639
12648
|
options: t.markdownOptions,
|
|
12640
12649
|
"markdown-render": t.markdownRender,
|
|
12641
12650
|
"after-render": t.onMarkdownAfterRender
|
|
12642
12651
|
}, {
|
|
12643
12652
|
content: xe(() => [
|
|
12644
|
-
ye(Q.$slots, "bubble-loading-content", { mobile:
|
|
12653
|
+
ye(Q.$slots, "bubble-loading-content", { mobile: Z.value }, () => [
|
|
12645
12654
|
re("div", {
|
|
12646
12655
|
class: rt(["kernelift-chat-container__loading-text", Ue.value])
|
|
12647
12656
|
}, [
|
|
@@ -12653,26 +12662,26 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12653
12662
|
_: 3
|
|
12654
12663
|
}, 8, ["model-value", "i18n", "theme-mode", "markdown-class", "is-mobile", "plugins", "options", "markdown-render", "after-render"])) : Ve("", !0)
|
|
12655
12664
|
])
|
|
12656
|
-
], 544)) : (ce(), pe("div",
|
|
12657
|
-
ye(Q.$slots, "empty", { mobile:
|
|
12665
|
+
], 544)) : (ce(), pe("div", qs, [
|
|
12666
|
+
ye(Q.$slots, "empty", { mobile: Z.value }, () => [
|
|
12658
12667
|
re("div", null, [
|
|
12659
|
-
ee[
|
|
12668
|
+
ee[17] || (ee[17] = re("div", { class: "kernelift-chat-container__empty-img-wrapper" }, [
|
|
12660
12669
|
re("img", {
|
|
12661
12670
|
src: jr,
|
|
12662
12671
|
class: "kernelift-chat-container__empty-img"
|
|
12663
12672
|
})
|
|
12664
12673
|
], -1)),
|
|
12665
|
-
re("div",
|
|
12666
|
-
re("div",
|
|
12674
|
+
re("div", Qs, Pe(t.i18n?.chat?.welcome ?? "欢迎使用AI聊天组件,该工具是由Kernelift开发的开源项目,旨在为用户提供便捷的AI对话体验。"), 1),
|
|
12675
|
+
re("div", Js, Pe(t.i18n?.chat?.empty ?? "参考npm使用文档,开始你的对话吧。npm地址:https://www.npmjs.com/package/@kernelift/ai-chat"), 1)
|
|
12667
12676
|
])
|
|
12668
12677
|
], !0)
|
|
12669
12678
|
])),
|
|
12670
|
-
R.value?.length && !
|
|
12679
|
+
R.value?.length && !Z.value && !U.value ? (ce(), pe("div", Hs, [
|
|
12671
12680
|
(ce(!0), pe(Vt, null, Pt(R.value, (ae) => (ce(), pe("div", {
|
|
12672
12681
|
key: ae,
|
|
12673
12682
|
class: "kernelift-chat-container__next-tip",
|
|
12674
12683
|
onClick: () => F(ae)
|
|
12675
|
-
}, Pe(ae), 9,
|
|
12684
|
+
}, Pe(ae), 9, Ys))), 128))
|
|
12676
12685
|
])) : Ve("", !0),
|
|
12677
12686
|
Tt(Zr, { name: "scroll-to-bottom-fade" }, {
|
|
12678
12687
|
default: xe(() => [
|
|
@@ -12681,9 +12690,9 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12681
12690
|
class: "kernelift-chat-container__scroll-to-bottom",
|
|
12682
12691
|
onClick: K,
|
|
12683
12692
|
title: t.i18n?.chat?.scrollToBottom ?? "滚动到底部"
|
|
12684
|
-
}, [...ee[
|
|
12693
|
+
}, [...ee[18] || (ee[18] = [
|
|
12685
12694
|
re("i", { class: "material-symbols--stat-minus-1" }, null, -1)
|
|
12686
|
-
])], 8,
|
|
12695
|
+
])], 8, Ws)) : Ve("", !0)
|
|
12687
12696
|
]),
|
|
12688
12697
|
_: 1
|
|
12689
12698
|
})
|
|
@@ -12695,9 +12704,9 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12695
12704
|
height: Re.value
|
|
12696
12705
|
})
|
|
12697
12706
|
}, [
|
|
12698
|
-
re("div",
|
|
12699
|
-
Ae.value ? (ce(), pe("div",
|
|
12700
|
-
ye(Q.$slots, "sender-tools", { mobile:
|
|
12707
|
+
re("div", Xs, [
|
|
12708
|
+
Ae.value ? (ce(), pe("div", Zs, [
|
|
12709
|
+
ye(Q.$slots, "sender-tools", { mobile: Z.value }, void 0, !0)
|
|
12701
12710
|
])) : Ve("", !0),
|
|
12702
12711
|
t.showSender && at(de) ? (ce(), Dt(rs, {
|
|
12703
12712
|
key: 1,
|
|
@@ -12712,7 +12721,7 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12712
12721
|
"input-height": b.value,
|
|
12713
12722
|
loading: E.value,
|
|
12714
12723
|
i18n: t.i18n,
|
|
12715
|
-
"is-mobile":
|
|
12724
|
+
"is-mobile": Z.value,
|
|
12716
12725
|
onSend: h,
|
|
12717
12726
|
onCancel: v
|
|
12718
12727
|
}, {
|
|
@@ -12722,28 +12731,28 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12722
12731
|
loading: me,
|
|
12723
12732
|
enableNet: at(C),
|
|
12724
12733
|
enableThink: at(m),
|
|
12725
|
-
mobile:
|
|
12734
|
+
mobile: Z.value
|
|
12726
12735
|
}, void 0, !0)
|
|
12727
12736
|
]),
|
|
12728
12737
|
"send-button": xe(({ execute: ae, state: me }) => [
|
|
12729
12738
|
ye(Q.$slots, "send-button", {
|
|
12730
12739
|
execute: ae,
|
|
12731
12740
|
state: me,
|
|
12732
|
-
mobile:
|
|
12741
|
+
mobile: Z.value
|
|
12733
12742
|
}, void 0, !0)
|
|
12734
12743
|
]),
|
|
12735
12744
|
"think-button": xe(({ execute: ae, state: me }) => [
|
|
12736
12745
|
ye(Q.$slots, "think-button", {
|
|
12737
12746
|
state: me,
|
|
12738
12747
|
execute: ae,
|
|
12739
|
-
mobile:
|
|
12748
|
+
mobile: Z.value
|
|
12740
12749
|
}, void 0, !0)
|
|
12741
12750
|
]),
|
|
12742
12751
|
"net-button": xe(({ execute: ae, state: me }) => [
|
|
12743
12752
|
ye(Q.$slots, "net-button", {
|
|
12744
12753
|
state: me,
|
|
12745
12754
|
execute: ae,
|
|
12746
|
-
mobile:
|
|
12755
|
+
mobile: Z.value
|
|
12747
12756
|
}, void 0, !0)
|
|
12748
12757
|
]),
|
|
12749
12758
|
textarea: xe(({ execute: ae, state: me, height: Ke }) => [
|
|
@@ -12751,13 +12760,13 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12751
12760
|
execute: ae,
|
|
12752
12761
|
state: me,
|
|
12753
12762
|
height: Ke,
|
|
12754
|
-
mobile:
|
|
12763
|
+
mobile: Z.value
|
|
12755
12764
|
}, void 0, !0)
|
|
12756
12765
|
]),
|
|
12757
12766
|
_: 3
|
|
12758
12767
|
}, 8, ["modelValue", "enable-net", "enable-think", "has-net-search", "has-thinking", "input-height", "loading", "i18n", "is-mobile"])) : Ve("", !0),
|
|
12759
|
-
re("div",
|
|
12760
|
-
ye(Q.$slots, "footer", { mobile:
|
|
12768
|
+
re("div", _s, [
|
|
12769
|
+
ye(Q.$slots, "footer", { mobile: Z.value }, () => [
|
|
12761
12770
|
Gt(Pe(t.i18n?.chat?.note ?? "内容由AI生成,无法确保准确性和完整性,仅供参考"), 1)
|
|
12762
12771
|
], !0)
|
|
12763
12772
|
])
|
|
@@ -12767,10 +12776,10 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12767
12776
|
t.showWorkspace ? (ce(), pe("div", {
|
|
12768
12777
|
key: 0,
|
|
12769
12778
|
class: rt(["kernelift-chat-container__workspace", {
|
|
12770
|
-
"mobile-workspace":
|
|
12779
|
+
"mobile-workspace": Z.value
|
|
12771
12780
|
}])
|
|
12772
12781
|
}, [
|
|
12773
|
-
re("div",
|
|
12782
|
+
re("div", $s, [
|
|
12774
12783
|
re("i", {
|
|
12775
12784
|
class: "material-symbols--close",
|
|
12776
12785
|
onClick: ee[12] || (ee[12] = (ae) => k())
|
|
@@ -12778,15 +12787,15 @@ const Is = { button: { think: "深度思考", net: "联网搜索", copyCode: "
|
|
|
12778
12787
|
]),
|
|
12779
12788
|
ye(Q.$slots, "workspace", {
|
|
12780
12789
|
record: y.value,
|
|
12781
|
-
mobile:
|
|
12790
|
+
mobile: Z.value
|
|
12782
12791
|
}, void 0, !0)
|
|
12783
12792
|
], 2)) : Ve("", !0)
|
|
12784
12793
|
], 2)
|
|
12785
12794
|
])
|
|
12786
12795
|
], 2));
|
|
12787
12796
|
}
|
|
12788
|
-
}),
|
|
12789
|
-
class
|
|
12797
|
+
}), io = /* @__PURE__ */ kt(to, [["__scopeId", "data-v-874f8e46"]]);
|
|
12798
|
+
class so {
|
|
12790
12799
|
controller;
|
|
12791
12800
|
buffer;
|
|
12792
12801
|
token;
|
|
@@ -12887,18 +12896,18 @@ class io {
|
|
|
12887
12896
|
this.controller.abort();
|
|
12888
12897
|
}
|
|
12889
12898
|
}
|
|
12890
|
-
const
|
|
12891
|
-
chat:
|
|
12892
|
-
},
|
|
12899
|
+
const ro = { button: { think: "Deep Think", net: "Net Search", copyCode: "Copy Code", expand: "Expand Code", collapse: "Collapse Code", copy: "Copy", reload: "Regenerate", like: "Like", dislike: "Dislike" }, newChat: "Create New Chat", placeholder: "Please enter a message and press Enter to send", loading: "Generating, please wait...", thinking: "Thinking...", thinked: "Deep Thought Completed", userMessages: "My Questions", noUserMessages: "No user messages available", note: "Content generated by AI, accuracy and completeness cannot be guaranteed", empty: "Refer to the npm documentation to start your conversation. NPM link: https://www.npmjs.com/package/@kernelift/ai-chat", welcome: "Welcome to the AI chat component, an open-source project developed by Kernelift, designed to provide users with a convenient AI conversation experience." }, ao = {
|
|
12900
|
+
chat: ro
|
|
12901
|
+
}, oo = {
|
|
12893
12902
|
"zh-CN": hn,
|
|
12894
|
-
"en-US":
|
|
12903
|
+
"en-US": ao
|
|
12895
12904
|
};
|
|
12896
12905
|
export {
|
|
12897
12906
|
$r as ChatBubble,
|
|
12898
|
-
|
|
12907
|
+
io as ChatContainer,
|
|
12899
12908
|
is as ChatHeader,
|
|
12900
12909
|
rs as ChatSender,
|
|
12901
|
-
|
|
12910
|
+
so as SSEClient,
|
|
12902
12911
|
_n as ThinkingProcess,
|
|
12903
|
-
|
|
12912
|
+
oo as i18nMessages
|
|
12904
12913
|
};
|