@dan-uni/dan-any 0.2.6 → 0.4.7
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/README.md +9 -2
- package/dist/index.js +1130 -431
- package/dist/index.umd.min.js +5562 -5211
- package/dist/src/ass-gen/ass/create.d.ts +2 -1
- package/dist/src/ass-gen/ass/raw.d.ts +6 -2
- package/dist/src/ass-gen/index.d.ts +2 -0
- package/dist/src/index.d.ts +71 -13
- package/dist/src/proto/gen/bili/dm_pb.d.ts +1 -1
- package/dist/src/proto/gen/danuni_pb.d.ts +35 -8
- package/dist/src/utils/dm-gen.d.ts +22 -40
- package/dist/src/utils/id-gen.d.ts +8 -32
- package/dist/src/utils/platform.d.ts +24 -0
- package/package.json +10 -9
- package/src/ass-gen/__tests__/898651903.xml.ass +1 -1
- package/src/ass-gen/ass/create.ts +12 -2
- package/src/ass-gen/ass/raw.ts +14 -5
- package/src/ass-gen/index.ts +12 -4
- package/src/ass-gen/util/danconvert.ts +2 -2
- package/src/index.ts +173 -40
- package/src/proto/gen/bili/dm_pb.ts +3 -3
- package/src/proto/gen/danuni_pb.ts +46 -14
- package/src/proto/src/danuni.proto +11 -3
- package/src/utils/dm-gen.test.ts +12 -3
- package/src/utils/dm-gen.ts +54 -59
- package/src/utils/id-gen.ts +15 -62
- package/src/utils/platform.ts +38 -0
- package/tsconfig.json +12 -16
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { XMLParser } from "fast-xml-parser";
|
|
2
|
+
import hh_mm_ss from "hh-mm-ss";
|
|
3
|
+
import jssha from "jssha";
|
|
4
|
+
import { createCanvas } from "canvas";
|
|
5
|
+
import { brotliCompressSync, brotliDecompressSync, gunzipSync, gzipSync } from "node:zlib";
|
|
6
|
+
import { decode, encode as external_base16384_encode } from "base16384";
|
|
7
7
|
var __webpack_require__ = {};
|
|
8
8
|
(()=>{
|
|
9
|
-
__webpack_require__.d =
|
|
9
|
+
__webpack_require__.d = (exports, definition)=>{
|
|
10
10
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
11
11
|
enumerable: true,
|
|
12
12
|
get: definition[key]
|
|
@@ -14,12 +14,10 @@ var __webpack_require__ = {};
|
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
16
|
(()=>{
|
|
17
|
-
__webpack_require__.o =
|
|
18
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
19
|
-
};
|
|
17
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
20
18
|
})();
|
|
21
19
|
(()=>{
|
|
22
|
-
__webpack_require__.r =
|
|
20
|
+
__webpack_require__.r = (exports)=>{
|
|
23
21
|
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
|
|
24
22
|
value: 'Module'
|
|
25
23
|
});
|
|
@@ -28,13 +26,23 @@ var __webpack_require__ = {};
|
|
|
28
26
|
});
|
|
29
27
|
};
|
|
30
28
|
})();
|
|
29
|
+
var platform_namespaceObject = {};
|
|
30
|
+
__webpack_require__.r(platform_namespaceObject);
|
|
31
|
+
__webpack_require__.d(platform_namespaceObject, {
|
|
32
|
+
PlatformDanmakuOnlySource: ()=>platform_PlatformDanmakuOnlySource,
|
|
33
|
+
PlatformDanmakuOnlySources: ()=>PlatformDanmakuOnlySources,
|
|
34
|
+
PlatformDanmakuSources: ()=>PlatformDanmakuSources,
|
|
35
|
+
PlatformInfoSource: ()=>platform_PlatformInfoSource,
|
|
36
|
+
PlatformInfoSources: ()=>PlatformInfoSources,
|
|
37
|
+
PlatformSources: ()=>PlatformSources,
|
|
38
|
+
PlatformVideoSource: ()=>platform_PlatformVideoSource,
|
|
39
|
+
PlatformVideoSources: ()=>PlatformVideoSources
|
|
40
|
+
});
|
|
31
41
|
var id_gen_namespaceObject = {};
|
|
32
42
|
__webpack_require__.r(id_gen_namespaceObject);
|
|
33
43
|
__webpack_require__.d(id_gen_namespaceObject, {
|
|
34
44
|
UniID: ()=>UniID,
|
|
35
|
-
createDMID: ()=>createDMID
|
|
36
|
-
domainPreset: ()=>domainPreset,
|
|
37
|
-
platforms: ()=>platforms
|
|
45
|
+
createDMID: ()=>createDMID
|
|
38
46
|
});
|
|
39
47
|
var dm_gen_namespaceObject = {};
|
|
40
48
|
__webpack_require__.r(dm_gen_namespaceObject);
|
|
@@ -244,7 +252,10 @@ function makeInt64Support() {
|
|
|
244
252
|
const dv = new DataView(new ArrayBuffer(8));
|
|
245
253
|
const ok = "function" == typeof BigInt && "function" == typeof dv.getBigInt64 && "function" == typeof dv.getBigUint64 && "function" == typeof dv.setBigInt64 && "function" == typeof dv.setBigUint64 && ("object" != typeof process || "object" != typeof process.env || "1" !== process.env.BUF_BIGINT_DISABLE);
|
|
246
254
|
if (ok) {
|
|
247
|
-
const MIN = BigInt("-9223372036854775808")
|
|
255
|
+
const MIN = BigInt("-9223372036854775808");
|
|
256
|
+
const MAX = BigInt("9223372036854775807");
|
|
257
|
+
const UMIN = BigInt("0");
|
|
258
|
+
const UMAX = BigInt("18446744073709551615");
|
|
248
259
|
return {
|
|
249
260
|
zero: BigInt(0),
|
|
250
261
|
supported: true,
|
|
@@ -327,8 +338,6 @@ function scalarZeroValue(type, longAsString) {
|
|
|
327
338
|
return "";
|
|
328
339
|
case descriptors_ScalarType.BOOL:
|
|
329
340
|
return false;
|
|
330
|
-
default:
|
|
331
|
-
return 0;
|
|
332
341
|
case descriptors_ScalarType.DOUBLE:
|
|
333
342
|
case descriptors_ScalarType.FLOAT:
|
|
334
343
|
return 0.0;
|
|
@@ -340,6 +349,8 @@ function scalarZeroValue(type, longAsString) {
|
|
|
340
349
|
return longAsString ? "0" : protoInt64.zero;
|
|
341
350
|
case descriptors_ScalarType.BYTES:
|
|
342
351
|
return new Uint8Array(0);
|
|
352
|
+
default:
|
|
353
|
+
return 0;
|
|
343
354
|
}
|
|
344
355
|
}
|
|
345
356
|
function isScalarZeroValue(type, value) {
|
|
@@ -438,8 +449,9 @@ function isReflectList(arg, field) {
|
|
|
438
449
|
var _a, _b, _c, _d;
|
|
439
450
|
if (isObject(arg) && unsafeLocal in arg && "add" in arg && "field" in arg && "function" == typeof arg.field) {
|
|
440
451
|
if (void 0 !== field) {
|
|
441
|
-
const a = field
|
|
442
|
-
|
|
452
|
+
const a = field;
|
|
453
|
+
const b = arg.field();
|
|
454
|
+
return a.listKind == b.listKind && a.scalar === b.scalar && (null == (_a = a.message) ? void 0 : _a.typeName) === (null == (_b = b.message) ? void 0 : _b.typeName) && (null == (_c = a.enum) ? void 0 : _c.typeName) === (null == (_d = b.enum) ? void 0 : _d.typeName);
|
|
443
455
|
}
|
|
444
456
|
return true;
|
|
445
457
|
}
|
|
@@ -450,7 +462,7 @@ function isReflectMap(arg, field) {
|
|
|
450
462
|
if (isObject(arg) && unsafeLocal in arg && "has" in arg && "field" in arg && "function" == typeof arg.field) {
|
|
451
463
|
if (void 0 !== field) {
|
|
452
464
|
const a = field, b = arg.field();
|
|
453
|
-
return a.mapKey === b.mapKey && a.mapKind == b.mapKind && a.scalar === b.scalar && (null
|
|
465
|
+
return a.mapKey === b.mapKey && a.mapKind == b.mapKind && a.scalar === b.scalar && (null == (_a = a.message) ? void 0 : _a.typeName) === (null == (_b = b.message) ? void 0 : _b.typeName) && (null == (_c = a.enum) ? void 0 : _c.typeName) === (null == (_d = b.enum) ? void 0 : _d.typeName);
|
|
454
466
|
}
|
|
455
467
|
return true;
|
|
456
468
|
}
|
|
@@ -475,7 +487,7 @@ function getTextEncoding() {
|
|
|
475
487
|
try {
|
|
476
488
|
encodeURIComponent(text);
|
|
477
489
|
return true;
|
|
478
|
-
} catch (
|
|
490
|
+
} catch (_) {
|
|
479
491
|
return false;
|
|
480
492
|
}
|
|
481
493
|
}
|
|
@@ -493,7 +505,7 @@ var binary_encoding_WireType;
|
|
|
493
505
|
WireType[WireType["Bit32"] = 5] = "Bit32";
|
|
494
506
|
})(binary_encoding_WireType || (binary_encoding_WireType = {}));
|
|
495
507
|
const FLOAT32_MAX = 3.4028234663852886e38;
|
|
496
|
-
const FLOAT32_MIN = -
|
|
508
|
+
const FLOAT32_MIN = -3.4028234663852886e+38;
|
|
497
509
|
const UINT32_MAX = 0xffffffff;
|
|
498
510
|
const INT32_MAX = 0x7fffffff;
|
|
499
511
|
const INT32_MIN = -2147483648;
|
|
@@ -623,12 +635,12 @@ class BinaryWriter {
|
|
|
623
635
|
return this;
|
|
624
636
|
}
|
|
625
637
|
sint64(value) {
|
|
626
|
-
|
|
638
|
+
const tc = protoInt64.enc(value), sign = tc.hi >> 31, lo = tc.lo << 1 ^ sign, hi = (tc.hi << 1 | tc.lo >>> 31) ^ sign;
|
|
627
639
|
varint64write(lo, hi, this.buf);
|
|
628
640
|
return this;
|
|
629
641
|
}
|
|
630
642
|
uint64(value) {
|
|
631
|
-
|
|
643
|
+
const tc = protoInt64.uEnc(value);
|
|
632
644
|
varint64write(tc.lo, tc.hi, this.buf);
|
|
633
645
|
return this;
|
|
634
646
|
}
|
|
@@ -751,7 +763,7 @@ function assertFloat32(arg) {
|
|
|
751
763
|
if ("string" == typeof arg) {
|
|
752
764
|
const o = arg;
|
|
753
765
|
arg = Number(arg);
|
|
754
|
-
if (isNaN(arg) && "NaN" !== o) throw new Error("invalid float32: " + o);
|
|
766
|
+
if (Number.isNaN(arg) && "NaN" !== o) throw new Error("invalid float32: " + o);
|
|
755
767
|
} else if ("number" != typeof arg) throw new Error("invalid float32: " + typeof arg);
|
|
756
768
|
if (Number.isFinite(arg) && (arg > FLOAT32_MAX || arg < FLOAT32_MIN)) throw new Error("invalid float32: " + arg);
|
|
757
769
|
}
|
|
@@ -821,22 +833,22 @@ function checkScalarValue(value, scalar) {
|
|
|
821
833
|
case descriptors_ScalarType.INT64:
|
|
822
834
|
case descriptors_ScalarType.SFIXED64:
|
|
823
835
|
case descriptors_ScalarType.SINT64:
|
|
824
|
-
if ("
|
|
825
|
-
try {
|
|
836
|
+
if ("bigint" == typeof value || "number" == typeof value || "string" == typeof value && value.length > 0) try {
|
|
826
837
|
protoInt64.parse(value);
|
|
827
|
-
|
|
838
|
+
return true;
|
|
839
|
+
} catch (_) {
|
|
828
840
|
return `${value} out of range`;
|
|
829
841
|
}
|
|
830
|
-
return
|
|
842
|
+
return false;
|
|
831
843
|
case descriptors_ScalarType.FIXED64:
|
|
832
844
|
case descriptors_ScalarType.UINT64:
|
|
833
|
-
if ("
|
|
834
|
-
try {
|
|
845
|
+
if ("bigint" == typeof value || "number" == typeof value || "string" == typeof value && value.length > 0) try {
|
|
835
846
|
protoInt64.uParse(value);
|
|
836
|
-
|
|
847
|
+
return true;
|
|
848
|
+
} catch (_) {
|
|
837
849
|
return `${value} out of range`;
|
|
838
850
|
}
|
|
839
|
-
return
|
|
851
|
+
return false;
|
|
840
852
|
}
|
|
841
853
|
}
|
|
842
854
|
function reasonSingular(field, val, details) {
|
|
@@ -1084,7 +1096,7 @@ function reflect_reflect(messageDesc, message, check = true) {
|
|
|
1084
1096
|
class ReflectMessageImpl {
|
|
1085
1097
|
get sortedFields() {
|
|
1086
1098
|
var _a;
|
|
1087
|
-
return null
|
|
1099
|
+
return null != (_a = this._sortedFields) ? _a : this._sortedFields = this.desc.fields.concat().sort((a, b)=>a.number - b.number);
|
|
1088
1100
|
}
|
|
1089
1101
|
constructor(messageDesc, message, check = true){
|
|
1090
1102
|
this.lists = new Map();
|
|
@@ -1453,8 +1465,9 @@ function fromBinary(schema, bytes, options) {
|
|
|
1453
1465
|
function readMessage(message, reader, options, delimited, lengthOrDelimitedFieldNo) {
|
|
1454
1466
|
var _a;
|
|
1455
1467
|
const end = delimited ? reader.len : reader.pos + lengthOrDelimitedFieldNo;
|
|
1456
|
-
let fieldNo
|
|
1457
|
-
|
|
1468
|
+
let fieldNo;
|
|
1469
|
+
let wireType;
|
|
1470
|
+
const unknownFields = null != (_a = message.getUnknown()) ? _a : [];
|
|
1458
1471
|
while(reader.pos < end){
|
|
1459
1472
|
[fieldNo, wireType] = reader.tag();
|
|
1460
1473
|
if (delimited && wireType == binary_encoding_WireType.EndGroup) break;
|
|
@@ -1496,7 +1509,8 @@ function readField(message, reader, field, wireType, options) {
|
|
|
1496
1509
|
}
|
|
1497
1510
|
function readMapEntry(reader, map, options) {
|
|
1498
1511
|
const field = map.field();
|
|
1499
|
-
let key
|
|
1512
|
+
let key;
|
|
1513
|
+
let val;
|
|
1500
1514
|
const end = reader.pos + reader.uint32();
|
|
1501
1515
|
while(reader.pos < end){
|
|
1502
1516
|
const [fieldNo] = reader.tag();
|
|
@@ -1536,16 +1550,10 @@ function readMapEntry(reader, map, options) {
|
|
|
1536
1550
|
function readListField(reader, wireType, list, options) {
|
|
1537
1551
|
var _a;
|
|
1538
1552
|
const field = list.field();
|
|
1539
|
-
if ("message" === field.listKind)
|
|
1540
|
-
|
|
1541
|
-
return;
|
|
1542
|
-
}
|
|
1543
|
-
const scalarType = null !== (_a = field.scalar) && void 0 !== _a ? _a : descriptors_ScalarType.INT32;
|
|
1553
|
+
if ("message" === field.listKind) return void list.add(readMessageField(reader, options, field));
|
|
1554
|
+
const scalarType = null != (_a = field.scalar) ? _a : descriptors_ScalarType.INT32;
|
|
1544
1555
|
const packed = wireType == binary_encoding_WireType.LengthDelimited && scalarType != descriptors_ScalarType.STRING && scalarType != descriptors_ScalarType.BYTES;
|
|
1545
|
-
if (!packed)
|
|
1546
|
-
list.add(readScalar(reader, scalarType));
|
|
1547
|
-
return;
|
|
1548
|
-
}
|
|
1556
|
+
if (!packed) return void list.add(readScalar(reader, scalarType));
|
|
1549
1557
|
const e = reader.uint32() + reader.pos;
|
|
1550
1558
|
while(reader.pos < e)list.add(readScalar(reader, scalarType));
|
|
1551
1559
|
}
|
|
@@ -1603,12 +1611,12 @@ function writeFields(writer, opts, msg) {
|
|
|
1603
1611
|
var _a;
|
|
1604
1612
|
for (const f of msg.sortedFields){
|
|
1605
1613
|
if (!msg.isSet(f)) {
|
|
1606
|
-
if (f.presence == LEGACY_REQUIRED) throw new Error(`cannot encode
|
|
1614
|
+
if (f.presence == LEGACY_REQUIRED) throw new Error(`cannot encode ${f} to binary: required field not set`);
|
|
1607
1615
|
continue;
|
|
1608
1616
|
}
|
|
1609
1617
|
writeField(writer, opts, msg, f);
|
|
1610
1618
|
}
|
|
1611
|
-
if (opts.writeUnknownFields) for (const { no, wireType, data } of null
|
|
1619
|
+
if (opts.writeUnknownFields) for (const { no, wireType, data } of null != (_a = msg.getUnknown()) ? _a : [])writer.tag(no, wireType).raw(data);
|
|
1612
1620
|
return writer;
|
|
1613
1621
|
}
|
|
1614
1622
|
function writeField(writer, opts, msg, field) {
|
|
@@ -1616,7 +1624,7 @@ function writeField(writer, opts, msg, field) {
|
|
|
1616
1624
|
switch(field.fieldKind){
|
|
1617
1625
|
case "scalar":
|
|
1618
1626
|
case "enum":
|
|
1619
|
-
writeScalar(writer, null
|
|
1627
|
+
writeScalar(writer, msg.desc.typeName, field.name, null != (_a = field.scalar) ? _a : descriptors_ScalarType.INT32, field.number, msg.get(field));
|
|
1620
1628
|
break;
|
|
1621
1629
|
case "list":
|
|
1622
1630
|
writeListField(writer, opts, field, msg.get(field));
|
|
@@ -1629,8 +1637,8 @@ function writeField(writer, opts, msg, field) {
|
|
|
1629
1637
|
break;
|
|
1630
1638
|
}
|
|
1631
1639
|
}
|
|
1632
|
-
function writeScalar(writer, scalarType, fieldNo, value) {
|
|
1633
|
-
writeScalarValue(writer.tag(fieldNo, writeTypeOfScalar(scalarType)), scalarType, value);
|
|
1640
|
+
function writeScalar(writer, msgName, fieldName, scalarType, fieldNo, value) {
|
|
1641
|
+
writeScalarValue(writer.tag(fieldNo, writeTypeOfScalar(scalarType)), msgName, fieldName, scalarType, value);
|
|
1634
1642
|
}
|
|
1635
1643
|
function writeMessageField(writer, opts, field, message) {
|
|
1636
1644
|
if (field.delimitedEncoding) writeFields(writer.tag(field.number, binary_encoding_WireType.StartGroup), opts, message).tag(field.number, binary_encoding_WireType.EndGroup);
|
|
@@ -1642,24 +1650,24 @@ function writeListField(writer, opts, field, list) {
|
|
|
1642
1650
|
for (const item of list)writeMessageField(writer, opts, field, item);
|
|
1643
1651
|
return;
|
|
1644
1652
|
}
|
|
1645
|
-
const scalarType = null
|
|
1653
|
+
const scalarType = null != (_a = field.scalar) ? _a : descriptors_ScalarType.INT32;
|
|
1646
1654
|
if (field.packed) {
|
|
1647
1655
|
if (!list.size) return;
|
|
1648
1656
|
writer.tag(field.number, binary_encoding_WireType.LengthDelimited).fork();
|
|
1649
|
-
for (const item of list)writeScalarValue(writer, scalarType, item);
|
|
1657
|
+
for (const item of list)writeScalarValue(writer, field.parent.typeName, field.name, scalarType, item);
|
|
1650
1658
|
writer.join();
|
|
1651
1659
|
return;
|
|
1652
1660
|
}
|
|
1653
|
-
for (const item of list)writeScalar(writer, scalarType, field.number, item);
|
|
1661
|
+
for (const item of list)writeScalar(writer, field.parent.typeName, field.name, scalarType, field.number, item);
|
|
1654
1662
|
}
|
|
1655
1663
|
function writeMapEntry(writer, opts, field, key, value) {
|
|
1656
1664
|
var _a;
|
|
1657
1665
|
writer.tag(field.number, binary_encoding_WireType.LengthDelimited).fork();
|
|
1658
|
-
writeScalar(writer, field.mapKey, 1, key);
|
|
1666
|
+
writeScalar(writer, field.parent.typeName, field.name, field.mapKey, 1, key);
|
|
1659
1667
|
switch(field.mapKind){
|
|
1660
1668
|
case "scalar":
|
|
1661
1669
|
case "enum":
|
|
1662
|
-
writeScalar(writer, null
|
|
1670
|
+
writeScalar(writer, field.parent.typeName, field.name, null != (_a = field.scalar) ? _a : descriptors_ScalarType.INT32, 2, value);
|
|
1663
1671
|
break;
|
|
1664
1672
|
case "message":
|
|
1665
1673
|
writeFields(writer.tag(2, binary_encoding_WireType.LengthDelimited).fork(), opts, value).join();
|
|
@@ -1667,53 +1675,58 @@ function writeMapEntry(writer, opts, field, key, value) {
|
|
|
1667
1675
|
}
|
|
1668
1676
|
writer.join();
|
|
1669
1677
|
}
|
|
1670
|
-
function writeScalarValue(writer, type, value) {
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1678
|
+
function writeScalarValue(writer, msgName, fieldName, type, value) {
|
|
1679
|
+
try {
|
|
1680
|
+
switch(type){
|
|
1681
|
+
case descriptors_ScalarType.STRING:
|
|
1682
|
+
writer.string(value);
|
|
1683
|
+
break;
|
|
1684
|
+
case descriptors_ScalarType.BOOL:
|
|
1685
|
+
writer.bool(value);
|
|
1686
|
+
break;
|
|
1687
|
+
case descriptors_ScalarType.DOUBLE:
|
|
1688
|
+
writer.double(value);
|
|
1689
|
+
break;
|
|
1690
|
+
case descriptors_ScalarType.FLOAT:
|
|
1691
|
+
writer.float(value);
|
|
1692
|
+
break;
|
|
1693
|
+
case descriptors_ScalarType.INT32:
|
|
1694
|
+
writer.int32(value);
|
|
1695
|
+
break;
|
|
1696
|
+
case descriptors_ScalarType.INT64:
|
|
1697
|
+
writer.int64(value);
|
|
1698
|
+
break;
|
|
1699
|
+
case descriptors_ScalarType.UINT64:
|
|
1700
|
+
writer.uint64(value);
|
|
1701
|
+
break;
|
|
1702
|
+
case descriptors_ScalarType.FIXED64:
|
|
1703
|
+
writer.fixed64(value);
|
|
1704
|
+
break;
|
|
1705
|
+
case descriptors_ScalarType.BYTES:
|
|
1706
|
+
writer.bytes(value);
|
|
1707
|
+
break;
|
|
1708
|
+
case descriptors_ScalarType.FIXED32:
|
|
1709
|
+
writer.fixed32(value);
|
|
1710
|
+
break;
|
|
1711
|
+
case descriptors_ScalarType.SFIXED32:
|
|
1712
|
+
writer.sfixed32(value);
|
|
1713
|
+
break;
|
|
1714
|
+
case descriptors_ScalarType.SFIXED64:
|
|
1715
|
+
writer.sfixed64(value);
|
|
1716
|
+
break;
|
|
1717
|
+
case descriptors_ScalarType.SINT64:
|
|
1718
|
+
writer.sint64(value);
|
|
1719
|
+
break;
|
|
1720
|
+
case descriptors_ScalarType.UINT32:
|
|
1721
|
+
writer.uint32(value);
|
|
1722
|
+
break;
|
|
1723
|
+
case descriptors_ScalarType.SINT32:
|
|
1724
|
+
writer.sint32(value);
|
|
1725
|
+
break;
|
|
1726
|
+
}
|
|
1727
|
+
} catch (e) {
|
|
1728
|
+
if (e instanceof Error) throw new Error(`cannot encode field ${msgName}.${fieldName} to binary: ${e.message}`);
|
|
1729
|
+
throw e;
|
|
1717
1730
|
}
|
|
1718
1731
|
}
|
|
1719
1732
|
function writeTypeOfScalar(type) {
|
|
@@ -1868,11 +1881,11 @@ function parseTextFormatScalarValue(type, value) {
|
|
|
1868
1881
|
case descriptors_ScalarType.FLOAT:
|
|
1869
1882
|
switch(value){
|
|
1870
1883
|
case "inf":
|
|
1871
|
-
return
|
|
1884
|
+
return 1 / 0;
|
|
1872
1885
|
case "-inf":
|
|
1873
|
-
return
|
|
1886
|
+
return -1 / 0;
|
|
1874
1887
|
case "nan":
|
|
1875
|
-
return
|
|
1888
|
+
return NaN;
|
|
1876
1889
|
default:
|
|
1877
1890
|
return parseFloat(value);
|
|
1878
1891
|
}
|
|
@@ -1943,7 +1956,7 @@ function unescapeBytesDefaultValue(str) {
|
|
|
1943
1956
|
const t = input.take(2);
|
|
1944
1957
|
if (false === t) return false;
|
|
1945
1958
|
const n = parseInt(s + t, 8);
|
|
1946
|
-
if (isNaN(n)) return false;
|
|
1959
|
+
if (Number.isNaN(n)) return false;
|
|
1947
1960
|
b.push(n);
|
|
1948
1961
|
break;
|
|
1949
1962
|
}
|
|
@@ -1953,7 +1966,7 @@ function unescapeBytesDefaultValue(str) {
|
|
|
1953
1966
|
const t = input.take(2);
|
|
1954
1967
|
if (false === t) return false;
|
|
1955
1968
|
const n = parseInt(s + t, 16);
|
|
1956
|
-
if (isNaN(n)) return false;
|
|
1969
|
+
if (Number.isNaN(n)) return false;
|
|
1957
1970
|
b.push(n);
|
|
1958
1971
|
break;
|
|
1959
1972
|
}
|
|
@@ -1963,7 +1976,7 @@ function unescapeBytesDefaultValue(str) {
|
|
|
1963
1976
|
const t = input.take(4);
|
|
1964
1977
|
if (false === t) return false;
|
|
1965
1978
|
const n = parseInt(s + t, 16);
|
|
1966
|
-
if (isNaN(n)) return false;
|
|
1979
|
+
if (Number.isNaN(n)) return false;
|
|
1967
1980
|
const chunk = new Uint8Array(4);
|
|
1968
1981
|
const view = new DataView(chunk.buffer);
|
|
1969
1982
|
view.setInt32(0, n, true);
|
|
@@ -2091,7 +2104,7 @@ function createBaseRegistry() {
|
|
|
2091
2104
|
},
|
|
2092
2105
|
getExtensionFor (extendee, no) {
|
|
2093
2106
|
var _a;
|
|
2094
|
-
return null
|
|
2107
|
+
return null == (_a = extendees.get(extendee.typeName)) ? void 0 : _a.get(no);
|
|
2095
2108
|
},
|
|
2096
2109
|
getService (typeName) {
|
|
2097
2110
|
const t = types.get(typeName);
|
|
@@ -2123,7 +2136,8 @@ const featureDefaults = {
|
|
|
2123
2136
|
repeatedFieldEncoding: 2,
|
|
2124
2137
|
utf8Validation: 3,
|
|
2125
2138
|
messageEncoding: 1,
|
|
2126
|
-
jsonFormat: 2
|
|
2139
|
+
jsonFormat: 2,
|
|
2140
|
+
enforceNamingStyle: 2
|
|
2127
2141
|
},
|
|
2128
2142
|
999: {
|
|
2129
2143
|
fieldPresence: 2,
|
|
@@ -2131,7 +2145,8 @@ const featureDefaults = {
|
|
|
2131
2145
|
repeatedFieldEncoding: 1,
|
|
2132
2146
|
utf8Validation: 2,
|
|
2133
2147
|
messageEncoding: 1,
|
|
2134
|
-
jsonFormat: 1
|
|
2148
|
+
jsonFormat: 1,
|
|
2149
|
+
enforceNamingStyle: 2
|
|
2135
2150
|
},
|
|
2136
2151
|
1000: {
|
|
2137
2152
|
fieldPresence: 1,
|
|
@@ -2139,7 +2154,8 @@ const featureDefaults = {
|
|
|
2139
2154
|
repeatedFieldEncoding: 1,
|
|
2140
2155
|
utf8Validation: 2,
|
|
2141
2156
|
messageEncoding: 1,
|
|
2142
|
-
jsonFormat: 1
|
|
2157
|
+
jsonFormat: 1,
|
|
2158
|
+
enforceNamingStyle: 2
|
|
2143
2159
|
}
|
|
2144
2160
|
};
|
|
2145
2161
|
function addFile(proto, reg) {
|
|
@@ -2147,7 +2163,7 @@ function addFile(proto, reg) {
|
|
|
2147
2163
|
const file = {
|
|
2148
2164
|
kind: "file",
|
|
2149
2165
|
proto,
|
|
2150
|
-
deprecated: null
|
|
2166
|
+
deprecated: null != (_b = null == (_a = proto.options) ? void 0 : _a.deprecated) ? _b : false,
|
|
2151
2167
|
edition: getFileEdition(proto),
|
|
2152
2168
|
name: proto.name.replace(/\.proto$/, ""),
|
|
2153
2169
|
dependencies: findFileDependencies(proto, reg),
|
|
@@ -2166,7 +2182,7 @@ function addFile(proto, reg) {
|
|
|
2166
2182
|
},
|
|
2167
2183
|
add (desc) {
|
|
2168
2184
|
var _a;
|
|
2169
|
-
assert((null
|
|
2185
|
+
assert((null == (_a = desc.proto.options) ? void 0 : _a.mapEntry) === true);
|
|
2170
2186
|
mapEntriesStore.set(desc.typeName, desc);
|
|
2171
2187
|
}
|
|
2172
2188
|
};
|
|
@@ -2221,12 +2237,12 @@ function addFields(message, reg, mapEntries) {
|
|
|
2221
2237
|
for (const child of message.nestedMessages)addFields(child, reg, mapEntries);
|
|
2222
2238
|
}
|
|
2223
2239
|
function addEnum(proto, file, parent, reg) {
|
|
2224
|
-
var _a, _b, _c;
|
|
2240
|
+
var _a, _b, _c, _d, _e;
|
|
2225
2241
|
const sharedPrefix = findEnumSharedPrefix(proto.name, proto.value);
|
|
2226
2242
|
const desc = {
|
|
2227
2243
|
kind: "enum",
|
|
2228
2244
|
proto,
|
|
2229
|
-
deprecated: null
|
|
2245
|
+
deprecated: null != (_b = null == (_a = proto.options) ? void 0 : _a.deprecated) ? _b : false,
|
|
2230
2246
|
file,
|
|
2231
2247
|
parent,
|
|
2232
2248
|
open: true,
|
|
@@ -2241,30 +2257,29 @@ function addEnum(proto, file, parent, reg) {
|
|
|
2241
2257
|
};
|
|
2242
2258
|
desc.open = isEnumOpen(desc);
|
|
2243
2259
|
reg.add(desc);
|
|
2244
|
-
proto.value
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
desc.values.push(desc.value[proto.number] = {
|
|
2260
|
+
for (const p of proto.value){
|
|
2261
|
+
const name = p.name;
|
|
2262
|
+
desc.values.push(desc.value[p.number] = {
|
|
2248
2263
|
kind: "enum_value",
|
|
2249
|
-
proto,
|
|
2250
|
-
deprecated: null
|
|
2264
|
+
proto: p,
|
|
2265
|
+
deprecated: null != (_d = null == (_c = p.options) ? void 0 : _c.deprecated) ? _d : false,
|
|
2251
2266
|
parent: desc,
|
|
2252
2267
|
name,
|
|
2253
2268
|
localName: safeObjectProperty(void 0 == sharedPrefix ? name : name.substring(sharedPrefix.length)),
|
|
2254
|
-
number:
|
|
2269
|
+
number: p.number,
|
|
2255
2270
|
toString () {
|
|
2256
2271
|
return `enum value ${desc.typeName}.${name}`;
|
|
2257
2272
|
}
|
|
2258
2273
|
});
|
|
2259
|
-
}
|
|
2260
|
-
(null
|
|
2274
|
+
}
|
|
2275
|
+
(null != (_e = null == parent ? void 0 : parent.nestedEnums) ? _e : file.enums).push(desc);
|
|
2261
2276
|
}
|
|
2262
2277
|
function addMessage(proto, file, parent, reg, mapEntries) {
|
|
2263
2278
|
var _a, _b, _c, _d;
|
|
2264
2279
|
const desc = {
|
|
2265
2280
|
kind: "message",
|
|
2266
2281
|
proto,
|
|
2267
|
-
deprecated: null
|
|
2282
|
+
deprecated: null != (_b = null == (_a = proto.options) ? void 0 : _a.deprecated) ? _b : false,
|
|
2268
2283
|
file,
|
|
2269
2284
|
parent,
|
|
2270
2285
|
name: proto.name,
|
|
@@ -2280,9 +2295,9 @@ function addMessage(proto, file, parent, reg, mapEntries) {
|
|
|
2280
2295
|
return `message ${this.typeName}`;
|
|
2281
2296
|
}
|
|
2282
2297
|
};
|
|
2283
|
-
if ((null
|
|
2298
|
+
if ((null == (_c = proto.options) ? void 0 : _c.mapEntry) === true) mapEntries.add(desc);
|
|
2284
2299
|
else {
|
|
2285
|
-
(null
|
|
2300
|
+
(null != (_d = null == parent ? void 0 : parent.nestedMessages) ? _d : file.messages).push(desc);
|
|
2286
2301
|
reg.add(desc);
|
|
2287
2302
|
}
|
|
2288
2303
|
for (const enumProto of proto.enumType)addEnum(enumProto, file, desc, reg);
|
|
@@ -2293,7 +2308,7 @@ function addService(proto, file, reg) {
|
|
|
2293
2308
|
const desc = {
|
|
2294
2309
|
kind: "service",
|
|
2295
2310
|
proto,
|
|
2296
|
-
deprecated: null
|
|
2311
|
+
deprecated: null != (_b = null == (_a = proto.options) ? void 0 : _a.deprecated) ? _b : false,
|
|
2297
2312
|
file,
|
|
2298
2313
|
name: proto.name,
|
|
2299
2314
|
typeName: makeTypeName(proto, void 0, file),
|
|
@@ -2323,14 +2338,14 @@ function newMethod(proto, parent, reg) {
|
|
|
2323
2338
|
return {
|
|
2324
2339
|
kind: "rpc",
|
|
2325
2340
|
proto,
|
|
2326
|
-
deprecated: null
|
|
2341
|
+
deprecated: null != (_b = null == (_a = proto.options) ? void 0 : _a.deprecated) ? _b : false,
|
|
2327
2342
|
parent,
|
|
2328
2343
|
name,
|
|
2329
2344
|
localName: safeObjectProperty(name.length ? safeObjectProperty(name[0].toLowerCase() + name.substring(1)) : name),
|
|
2330
2345
|
methodKind,
|
|
2331
2346
|
input,
|
|
2332
2347
|
output,
|
|
2333
|
-
idempotency: null
|
|
2348
|
+
idempotency: null != (_d = null == (_c = proto.options) ? void 0 : _c.idempotencyLevel) ? _d : IDEMPOTENCY_UNKNOWN,
|
|
2334
2349
|
toString () {
|
|
2335
2350
|
return `rpc ${parent.typeName}.${name}`;
|
|
2336
2351
|
}
|
|
@@ -2356,7 +2371,7 @@ function newField(proto, parentOrFile, reg, oneof, mapEntries) {
|
|
|
2356
2371
|
const field = {
|
|
2357
2372
|
kind: "field",
|
|
2358
2373
|
proto,
|
|
2359
|
-
deprecated: null
|
|
2374
|
+
deprecated: null != (_b = null == (_a = proto.options) ? void 0 : _a.deprecated) ? _b : false,
|
|
2360
2375
|
name: proto.name,
|
|
2361
2376
|
number: proto.number,
|
|
2362
2377
|
scalar: void 0,
|
|
@@ -2396,7 +2411,7 @@ function newField(proto, parentOrFile, reg, oneof, mapEntries) {
|
|
|
2396
2411
|
}
|
|
2397
2412
|
const label = proto.label;
|
|
2398
2413
|
const type = proto.type;
|
|
2399
|
-
const jstype = null
|
|
2414
|
+
const jstype = null == (_c = proto.options) ? void 0 : _c.jstype;
|
|
2400
2415
|
if (label === LABEL_REPEATED) {
|
|
2401
2416
|
const mapEntry = type == TYPE_MESSAGE ? null == mapEntries ? void 0 : mapEntries.get(trimLeadingDot(proto.typeName)) : void 0;
|
|
2402
2417
|
if (mapEntry) {
|
|
@@ -2513,12 +2528,13 @@ function getFieldPresence(proto, oneof, isExtension, parent) {
|
|
|
2513
2528
|
if (proto.label == LABEL_REQUIRED) return registry_LEGACY_REQUIRED;
|
|
2514
2529
|
if (proto.label == LABEL_REPEATED) return registry_IMPLICIT;
|
|
2515
2530
|
if (!!oneof || proto.proto3Optional) return EXPLICIT;
|
|
2516
|
-
if (proto.type == TYPE_MESSAGE) return EXPLICIT;
|
|
2517
2531
|
if (isExtension) return EXPLICIT;
|
|
2518
|
-
|
|
2532
|
+
const resolved = resolveFeature("fieldPresence", {
|
|
2519
2533
|
proto,
|
|
2520
2534
|
parent
|
|
2521
2535
|
});
|
|
2536
|
+
if (resolved == registry_IMPLICIT && (proto.type == TYPE_MESSAGE || proto.type == TYPE_GROUP)) return EXPLICIT;
|
|
2537
|
+
return resolved;
|
|
2522
2538
|
}
|
|
2523
2539
|
function isPackedField(proto, parent) {
|
|
2524
2540
|
if (proto.label != LABEL_REPEATED) return false;
|
|
@@ -2549,7 +2565,7 @@ function isEnumOpen(desc) {
|
|
|
2549
2565
|
var _a;
|
|
2550
2566
|
return OPEN == resolveFeature("enumType", {
|
|
2551
2567
|
proto: desc.proto,
|
|
2552
|
-
parent: null
|
|
2568
|
+
parent: null != (_a = desc.parent) ? _a : desc.file
|
|
2553
2569
|
});
|
|
2554
2570
|
}
|
|
2555
2571
|
function isDelimitedEncoding(proto, parent) {
|
|
@@ -2561,13 +2577,13 @@ function isDelimitedEncoding(proto, parent) {
|
|
|
2561
2577
|
}
|
|
2562
2578
|
function resolveFeature(name, ref) {
|
|
2563
2579
|
var _a, _b;
|
|
2564
|
-
const featureSet = null
|
|
2580
|
+
const featureSet = null == (_a = ref.proto.options) ? void 0 : _a.features;
|
|
2565
2581
|
if (featureSet) {
|
|
2566
2582
|
const val = featureSet[name];
|
|
2567
2583
|
if (0 != val) return val;
|
|
2568
2584
|
}
|
|
2569
2585
|
if ("kind" in ref) {
|
|
2570
|
-
if ("message" == ref.kind) return resolveFeature(name, null
|
|
2586
|
+
if ("message" == ref.kind) return resolveFeature(name, null != (_b = ref.parent) ? _b : ref.file);
|
|
2571
2587
|
const editionDefaults = featureDefaults[ref.edition];
|
|
2572
2588
|
if (!editionDefaults) throw new Error(`feature default for edition ${ref.edition} not found`);
|
|
2573
2589
|
return editionDefaults[name];
|
|
@@ -2605,13 +2621,13 @@ function bootDescriptorProto(init) {
|
|
|
2605
2621
|
return {
|
|
2606
2622
|
$typeName: "google.protobuf.DescriptorProto",
|
|
2607
2623
|
name: init.name,
|
|
2608
|
-
field: null
|
|
2624
|
+
field: null != (_b = null == (_a = init.field) ? void 0 : _a.map(bootFieldDescriptorProto)) ? _b : [],
|
|
2609
2625
|
extension: [],
|
|
2610
|
-
nestedType: null
|
|
2611
|
-
enumType: null
|
|
2612
|
-
extensionRange: null
|
|
2626
|
+
nestedType: null != (_d = null == (_c = init.nestedType) ? void 0 : _c.map(bootDescriptorProto)) ? _d : [],
|
|
2627
|
+
enumType: null != (_f = null == (_e = init.enumType) ? void 0 : _e.map(bootEnumDescriptorProto)) ? _f : [],
|
|
2628
|
+
extensionRange: null != (_h = null == (_g = init.extensionRange) ? void 0 : _g.map((e)=>Object.assign({
|
|
2613
2629
|
$typeName: "google.protobuf.DescriptorProto.ExtensionRange"
|
|
2614
|
-
}, e)))
|
|
2630
|
+
}, e))) ? _h : [],
|
|
2615
2631
|
oneofDecl: [],
|
|
2616
2632
|
reservedRange: [],
|
|
2617
2633
|
reservedName: []
|
|
@@ -2649,10 +2665,10 @@ function bootFieldOptions(init) {
|
|
|
2649
2665
|
return Object.assign(proto, Object.assign(Object.assign({
|
|
2650
2666
|
$typeName: "google.protobuf.FieldOptions"
|
|
2651
2667
|
}, init), {
|
|
2652
|
-
targets: null
|
|
2653
|
-
editionDefaults: null
|
|
2668
|
+
targets: null != (_a = init.targets) ? _a : [],
|
|
2669
|
+
editionDefaults: null != (_c = null == (_b = init.editionDefaults) ? void 0 : _b.map((e)=>Object.assign({
|
|
2654
2670
|
$typeName: "google.protobuf.FieldOptions.EditionDefault"
|
|
2655
|
-
}, e)))
|
|
2671
|
+
}, e))) ? _c : [],
|
|
2656
2672
|
uninterpretedOption: []
|
|
2657
2673
|
}));
|
|
2658
2674
|
}
|
|
@@ -2684,6 +2700,12 @@ const file_google_protobuf_descriptor = /*@__PURE__*/ boot_boot({
|
|
|
2684
2700
|
label: 3,
|
|
2685
2701
|
typeName: ".google.protobuf.FileDescriptorProto"
|
|
2686
2702
|
}
|
|
2703
|
+
],
|
|
2704
|
+
extensionRange: [
|
|
2705
|
+
{
|
|
2706
|
+
start: 536000000,
|
|
2707
|
+
end: 536000001
|
|
2708
|
+
}
|
|
2687
2709
|
]
|
|
2688
2710
|
},
|
|
2689
2711
|
{
|
|
@@ -4242,6 +4264,37 @@ const file_google_protobuf_descriptor = /*@__PURE__*/ boot_boot({
|
|
|
4242
4264
|
}
|
|
4243
4265
|
]
|
|
4244
4266
|
}
|
|
4267
|
+
},
|
|
4268
|
+
{
|
|
4269
|
+
name: "enforce_naming_style",
|
|
4270
|
+
number: 7,
|
|
4271
|
+
type: 14,
|
|
4272
|
+
label: 1,
|
|
4273
|
+
typeName: ".google.protobuf.FeatureSet.EnforceNamingStyle",
|
|
4274
|
+
options: {
|
|
4275
|
+
retention: 2,
|
|
4276
|
+
targets: [
|
|
4277
|
+
1,
|
|
4278
|
+
2,
|
|
4279
|
+
3,
|
|
4280
|
+
4,
|
|
4281
|
+
5,
|
|
4282
|
+
6,
|
|
4283
|
+
7,
|
|
4284
|
+
8,
|
|
4285
|
+
9
|
|
4286
|
+
],
|
|
4287
|
+
editionDefaults: [
|
|
4288
|
+
{
|
|
4289
|
+
value: "STYLE_LEGACY",
|
|
4290
|
+
edition: 900
|
|
4291
|
+
},
|
|
4292
|
+
{
|
|
4293
|
+
value: "STYLE2024",
|
|
4294
|
+
edition: 1001
|
|
4295
|
+
}
|
|
4296
|
+
]
|
|
4297
|
+
}
|
|
4245
4298
|
}
|
|
4246
4299
|
],
|
|
4247
4300
|
enumType: [
|
|
@@ -4350,6 +4403,23 @@ const file_google_protobuf_descriptor = /*@__PURE__*/ boot_boot({
|
|
|
4350
4403
|
number: 2
|
|
4351
4404
|
}
|
|
4352
4405
|
]
|
|
4406
|
+
},
|
|
4407
|
+
{
|
|
4408
|
+
name: "EnforceNamingStyle",
|
|
4409
|
+
value: [
|
|
4410
|
+
{
|
|
4411
|
+
name: "ENFORCE_NAMING_STYLE_UNKNOWN",
|
|
4412
|
+
number: 0
|
|
4413
|
+
},
|
|
4414
|
+
{
|
|
4415
|
+
name: "STYLE2024",
|
|
4416
|
+
number: 1
|
|
4417
|
+
},
|
|
4418
|
+
{
|
|
4419
|
+
name: "STYLE_LEGACY",
|
|
4420
|
+
number: 2
|
|
4421
|
+
}
|
|
4422
|
+
]
|
|
4353
4423
|
}
|
|
4354
4424
|
],
|
|
4355
4425
|
extensionRange: [
|
|
@@ -4474,6 +4544,12 @@ const file_google_protobuf_descriptor = /*@__PURE__*/ boot_boot({
|
|
|
4474
4544
|
}
|
|
4475
4545
|
]
|
|
4476
4546
|
}
|
|
4547
|
+
],
|
|
4548
|
+
extensionRange: [
|
|
4549
|
+
{
|
|
4550
|
+
start: 536000000,
|
|
4551
|
+
end: 536000001
|
|
4552
|
+
}
|
|
4477
4553
|
]
|
|
4478
4554
|
},
|
|
4479
4555
|
{
|
|
@@ -4718,6 +4794,12 @@ var descriptor_pb_FeatureSet_JsonFormat;
|
|
|
4718
4794
|
FeatureSet_JsonFormat[FeatureSet_JsonFormat["ALLOW"] = 1] = "ALLOW";
|
|
4719
4795
|
FeatureSet_JsonFormat[FeatureSet_JsonFormat["LEGACY_BEST_EFFORT"] = 2] = "LEGACY_BEST_EFFORT";
|
|
4720
4796
|
})(descriptor_pb_FeatureSet_JsonFormat || (descriptor_pb_FeatureSet_JsonFormat = {}));
|
|
4797
|
+
var descriptor_pb_FeatureSet_EnforceNamingStyle;
|
|
4798
|
+
(function(FeatureSet_EnforceNamingStyle) {
|
|
4799
|
+
FeatureSet_EnforceNamingStyle[FeatureSet_EnforceNamingStyle["ENFORCE_NAMING_STYLE_UNKNOWN"] = 0] = "ENFORCE_NAMING_STYLE_UNKNOWN";
|
|
4800
|
+
FeatureSet_EnforceNamingStyle[FeatureSet_EnforceNamingStyle["STYLE2024"] = 1] = "STYLE2024";
|
|
4801
|
+
FeatureSet_EnforceNamingStyle[FeatureSet_EnforceNamingStyle["STYLE_LEGACY"] = 2] = "STYLE_LEGACY";
|
|
4802
|
+
})(descriptor_pb_FeatureSet_EnforceNamingStyle || (descriptor_pb_FeatureSet_EnforceNamingStyle = {}));
|
|
4721
4803
|
var descriptor_pb_GeneratedCodeInfo_Annotation_Semantic;
|
|
4722
4804
|
(function(GeneratedCodeInfo_Annotation_Semantic) {
|
|
4723
4805
|
GeneratedCodeInfo_Annotation_Semantic[GeneratedCodeInfo_Annotation_Semantic["NONE"] = 0] = "NONE";
|
|
@@ -4743,7 +4825,7 @@ function fileDesc(b64, imports) {
|
|
|
4743
4825
|
var _a;
|
|
4744
4826
|
const root = fromBinary(FileDescriptorProtoSchema, base64Decode(b64));
|
|
4745
4827
|
root.messageType.forEach(restoreJsonNames);
|
|
4746
|
-
root.dependency = null
|
|
4828
|
+
root.dependency = null != (_a = null == imports ? void 0 : imports.map((f)=>f.proto.name)) ? _a : [];
|
|
4747
4829
|
const reg = createFileRegistry(root, (protoFileName)=>null == imports ? void 0 : imports.find((f)=>f.proto.name === protoFileName));
|
|
4748
4830
|
return reg.getFile(root.name);
|
|
4749
4831
|
}
|
|
@@ -4759,70 +4841,53 @@ function timestampDate(timestamp) {
|
|
|
4759
4841
|
return new Date(timestamp_timestampMs(timestamp));
|
|
4760
4842
|
}
|
|
4761
4843
|
function timestampFromMs(timestampMs) {
|
|
4844
|
+
const seconds = Math.floor(timestampMs / 1000);
|
|
4762
4845
|
return create(TimestampSchema, {
|
|
4763
|
-
seconds: protoInt64.parse(
|
|
4764
|
-
nanos: timestampMs
|
|
4846
|
+
seconds: protoInt64.parse(seconds),
|
|
4847
|
+
nanos: (timestampMs - 1000 * seconds) * 1000000
|
|
4765
4848
|
});
|
|
4766
4849
|
}
|
|
4767
4850
|
function timestamp_timestampMs(timestamp) {
|
|
4768
4851
|
return 1000 * Number(timestamp.seconds) + Math.ceil(timestamp.nanos / 1000000);
|
|
4769
4852
|
}
|
|
4770
|
-
const color_pad = (s)=>s.length < 2 ? `0${s}` : s;
|
|
4771
|
-
const
|
|
4772
|
-
const
|
|
4773
|
-
const
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
const
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
BOTTOM: 2,
|
|
4809
|
-
TOP: 3
|
|
4810
|
-
};
|
|
4811
|
-
const FontSize = {
|
|
4812
|
-
SMALL: 0,
|
|
4813
|
-
NORMAL: 1,
|
|
4814
|
-
LARGE: 2
|
|
4815
|
-
};
|
|
4816
|
-
const domainPreset = {
|
|
4817
|
-
acfun: 'acfun',
|
|
4818
|
-
baha: 'baha',
|
|
4819
|
-
bgm: 'bgm',
|
|
4820
|
-
bili: 'bili',
|
|
4821
|
-
bglobal: 'bglobal',
|
|
4822
|
-
ddplay: 'ddplay',
|
|
4823
|
-
tucao: 'tucao'
|
|
4824
|
-
};
|
|
4825
|
-
const platforms = Object.keys(domainPreset);
|
|
4853
|
+
const file_bili_dm = /*@__PURE__*/ fileDesc("Cg1iaWxpL2RtLnByb3RvEiBiaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MSJkCgZBdmF0YXISCgoCaWQYASABKAkSCwoDdX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G0udjEuRG1FeHBvUmVwb3J0UmVzYgZwcm90bzM");
|
|
4854
|
+
const DmSegMobileReplySchema = /*@__PURE__*/ message_messageDesc(file_bili_dm, 30);
|
|
4855
|
+
const DmWebViewReplySchema = /*@__PURE__*/ message_messageDesc(file_bili_dm, 39);
|
|
4856
|
+
const file_danuni = /*@__PURE__*/ fileDesc("CgxkYW51bmkucHJvdG8SEWRhbnVuaS5kYW5tYWt1LnYxIjIKCmxpc3REYW5SZXESCgoCSUQYASABKAkSEAoDc2VnGAIgASgFSACIAQFCBgoEX3NlZyLCAgoHRGFubWFrdRIMCgRTT0lEGAEgASgJEgwKBERNSUQYAiABKAkSEAoIcHJvZ3Jlc3MYAyABKAUSJQoEbW9kZRgEIAEoDjIXLmRhbnVuaS5kYW5tYWt1LnYxLk1vZGUSEAoIZm9udHNpemUYBSABKAUSDQoFY29sb3IYBiABKAUSEAoIc2VuZGVySUQYByABKAkSDwoHY29udGVudBgIIAEoCRIpCgVjdGltZRgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASDgoGd2VpZ2h0GAogASgFEiUKBHBvb2wYCyABKA4yFy5kYW51bmkuZGFubWFrdS52MS5Qb29sEgwKBGF0dHIYDCADKAkSEAoIcGxhdGZvcm0YDSABKAkSEgoFZXh0cmEYDiABKAlIAIgBAUIICgZfZXh0cmEiPAoMRGFubWFrdVJlcGx5EiwKCGRhbm1ha3VzGAEgAygLMhouZGFudW5pLmRhbm1ha3UudjEuRGFubWFrdSo9CgRNb2RlEgoKBk5vcm1hbBAAEgoKBkJvdHRvbRABEgcKA1RvcBACEgsKB1JldmVyc2UQAxIHCgNFeHQQBCopCgRQb29sEgcKA0RlZhAAEgcKA1N1YhABEgcKA0FkdhACEgYKAkl4EAMyXQoORGFubWFrdVNlcnZpY2USSwoHbGlzdERhbhIdLmRhbnVuaS5kYW5tYWt1LnYxLmxpc3REYW5SZXEaHy5kYW51bmkuZGFubWFrdS52MS5EYW5tYWt1UmVwbHkiAFAAYgZwcm90bzM", [
|
|
4857
|
+
file_google_protobuf_timestamp
|
|
4858
|
+
]);
|
|
4859
|
+
const DanmakuReplySchema = /*@__PURE__*/ message_messageDesc(file_danuni, 2);
|
|
4860
|
+
var platform_PlatformInfoSource = /*#__PURE__*/ function(PlatformInfoSource) {
|
|
4861
|
+
PlatformInfoSource["Bangumi"] = "bgm";
|
|
4862
|
+
PlatformInfoSource["TMDB"] = "tmdb";
|
|
4863
|
+
return PlatformInfoSource;
|
|
4864
|
+
}({});
|
|
4865
|
+
const PlatformInfoSources = Object.values(platform_PlatformInfoSource);
|
|
4866
|
+
var platform_PlatformVideoSource = /*#__PURE__*/ function(PlatformVideoSource) {
|
|
4867
|
+
PlatformVideoSource["Acfun"] = "acfun";
|
|
4868
|
+
PlatformVideoSource["Baha"] = "baha";
|
|
4869
|
+
PlatformVideoSource["Bilibili"] = "bili";
|
|
4870
|
+
PlatformVideoSource["BilibiliGlobal"] = "bglobal";
|
|
4871
|
+
PlatformVideoSource["Iqiyi"] = "iqiyi";
|
|
4872
|
+
PlatformVideoSource["Tencent"] = "tencent";
|
|
4873
|
+
PlatformVideoSource["Youku"] = "youku";
|
|
4874
|
+
return PlatformVideoSource;
|
|
4875
|
+
}({});
|
|
4876
|
+
const PlatformVideoSources = Object.values(platform_PlatformVideoSource);
|
|
4877
|
+
var platform_PlatformDanmakuOnlySource = /*#__PURE__*/ function(PlatformDanmakuOnlySource) {
|
|
4878
|
+
PlatformDanmakuOnlySource["DanDanPlay"] = "ddplay";
|
|
4879
|
+
PlatformDanmakuOnlySource["TuCao"] = "tucao";
|
|
4880
|
+
return PlatformDanmakuOnlySource;
|
|
4881
|
+
}({});
|
|
4882
|
+
const PlatformDanmakuOnlySources = Object.values(platform_PlatformDanmakuOnlySource);
|
|
4883
|
+
const PlatformDanmakuSources = [
|
|
4884
|
+
...PlatformVideoSources,
|
|
4885
|
+
...PlatformDanmakuOnlySources
|
|
4886
|
+
];
|
|
4887
|
+
const PlatformSources = [
|
|
4888
|
+
...PlatformInfoSources,
|
|
4889
|
+
...PlatformDanmakuSources
|
|
4890
|
+
];
|
|
4826
4891
|
class UniID {
|
|
4827
4892
|
id;
|
|
4828
4893
|
domain;
|
|
@@ -4834,13 +4899,13 @@ class UniID {
|
|
|
4834
4899
|
return `${this.id}@${this.domain}`;
|
|
4835
4900
|
}
|
|
4836
4901
|
static fromNull(domain) {
|
|
4837
|
-
return new UniID('anonymous', domain || 'danuni');
|
|
4902
|
+
return new UniID('runtime' === domain ? 'runtime' : 'anonymous', domain || 'danuni');
|
|
4838
4903
|
}
|
|
4839
4904
|
static fromBili({ cid, mid, midHash }) {
|
|
4840
|
-
if (cid) return new UniID(cid.toString(),
|
|
4841
|
-
if (mid) return new UniID(mid.toString(),
|
|
4842
|
-
if (midHash) return new UniID(midHash,
|
|
4843
|
-
return this.fromNull(
|
|
4905
|
+
if (cid) return new UniID(cid.toString(), platform_PlatformVideoSource.Bilibili);
|
|
4906
|
+
if (mid) return new UniID(mid.toString(), platform_PlatformVideoSource.Bilibili);
|
|
4907
|
+
if (midHash) return new UniID(midHash, platform_PlatformVideoSource.Bilibili);
|
|
4908
|
+
return this.fromNull(platform_PlatformVideoSource.Bilibili);
|
|
4844
4909
|
}
|
|
4845
4910
|
static fromUnknown(id, domain) {
|
|
4846
4911
|
if (id) return new UniID(id, domain);
|
|
@@ -4848,7 +4913,7 @@ class UniID {
|
|
|
4848
4913
|
}
|
|
4849
4914
|
}
|
|
4850
4915
|
function createDMID(content = '', senderID, ctime, slice = 8) {
|
|
4851
|
-
return new
|
|
4916
|
+
return new jssha('SHA3-256', 'TEXT').update(content + senderID + UniDM.transCtime(ctime).toISOString()).getHash('HEX').slice(0, slice);
|
|
4852
4917
|
}
|
|
4853
4918
|
const BigIntSerializer = (k, v)=>'bigint' == typeof v ? v.toString() : v;
|
|
4854
4919
|
function cleanEmptyObjects(obj) {
|
|
@@ -4857,7 +4922,7 @@ function cleanEmptyObjects(obj) {
|
|
|
4857
4922
|
const cleaned = {};
|
|
4858
4923
|
for (const [key, value] of Object.entries(obj)){
|
|
4859
4924
|
const cleanedValue = cleanEmptyObjects(value);
|
|
4860
|
-
if (void 0 !== cleanedValue &&
|
|
4925
|
+
if (void 0 !== cleanedValue && ('object' != typeof cleanedValue || 0 !== Object.keys(cleanedValue).length)) cleaned[key] = cleanedValue;
|
|
4861
4926
|
}
|
|
4862
4927
|
return Object.keys(cleaned).length > 0 ? cleaned : {};
|
|
4863
4928
|
}
|
|
@@ -4916,16 +4981,16 @@ var dm_gen_ExtraDanUniChapterType = /*#__PURE__*/ function(ExtraDanUniChapterTyp
|
|
|
4916
4981
|
}({});
|
|
4917
4982
|
const ExtraDanUniChapterTypeDict = {
|
|
4918
4983
|
chs: {
|
|
4919
|
-
ch:
|
|
4920
|
-
rev:
|
|
4921
|
-
op:
|
|
4922
|
-
int:
|
|
4923
|
-
ed:
|
|
4924
|
-
prvw:
|
|
4925
|
-
cut:
|
|
4926
|
-
dup:
|
|
4927
|
-
biz:
|
|
4928
|
-
promo:
|
|
4984
|
+
ch: "\u5176\u5B83\u7247\u6BB5",
|
|
4985
|
+
rev: "\u56DE\u987E",
|
|
4986
|
+
op: "\u7247\u5934",
|
|
4987
|
+
int: "\u4E2D\u573A",
|
|
4988
|
+
ed: "\u7247\u5C3E",
|
|
4989
|
+
prvw: "\u9884\u544A",
|
|
4990
|
+
cut: "\u5220\u51CF",
|
|
4991
|
+
dup: "\u8865\u6863",
|
|
4992
|
+
biz: "\u5546\u4E1A\u5E7F\u544A",
|
|
4993
|
+
promo: "\u63A8\u5E7F"
|
|
4929
4994
|
}
|
|
4930
4995
|
};
|
|
4931
4996
|
var dm_gen_ExtraDanUniChapterAction = /*#__PURE__*/ function(ExtraDanUniChapterAction) {
|
|
@@ -4951,7 +5016,7 @@ var dm_gen_Pools = /*#__PURE__*/ function(Pools) {
|
|
|
4951
5016
|
return Pools;
|
|
4952
5017
|
}({});
|
|
4953
5018
|
class UniDM {
|
|
4954
|
-
|
|
5019
|
+
SOID;
|
|
4955
5020
|
progress;
|
|
4956
5021
|
mode;
|
|
4957
5022
|
fontsize;
|
|
@@ -4963,11 +5028,10 @@ class UniDM {
|
|
|
4963
5028
|
pool;
|
|
4964
5029
|
attr;
|
|
4965
5030
|
platform;
|
|
4966
|
-
SPMO;
|
|
4967
5031
|
extraStr;
|
|
4968
5032
|
DMID;
|
|
4969
|
-
constructor(
|
|
4970
|
-
this.
|
|
5033
|
+
constructor(SOID, progress = 0, mode = 0, fontsize = 25, color = 16777215, senderID = UniID.fromNull().toString(), content = '', ctime = new Date(), weight = 0, pool = 0, attr = [], platform, extraStr, DMID){
|
|
5034
|
+
this.SOID = SOID;
|
|
4971
5035
|
this.progress = progress;
|
|
4972
5036
|
this.mode = mode;
|
|
4973
5037
|
this.fontsize = fontsize;
|
|
@@ -4979,14 +5043,13 @@ class UniDM {
|
|
|
4979
5043
|
this.pool = pool;
|
|
4980
5044
|
this.attr = attr;
|
|
4981
5045
|
this.platform = platform;
|
|
4982
|
-
this.SPMO = SPMO;
|
|
4983
5046
|
this.extraStr = extraStr;
|
|
4984
5047
|
this.DMID = DMID;
|
|
4985
5048
|
if (progress < 0) this.progress = 0;
|
|
4986
5049
|
if (mode < 0 || mode > 4) this.mode = 0;
|
|
4987
5050
|
if (fontsize <= 0) this.fontsize = 25;
|
|
4988
5051
|
if (color <= 0) this.color = 16777215;
|
|
4989
|
-
if (weight
|
|
5052
|
+
if (weight < 0 || weight > 10) this.weight = 5;
|
|
4990
5053
|
if (pool < 0 || pool > 3) this.pool = 0;
|
|
4991
5054
|
if (!DMID) DMID = this.toDMID();
|
|
4992
5055
|
this.progress = Number.parseFloat(progress.toFixed(3));
|
|
@@ -4994,14 +5057,14 @@ class UniDM {
|
|
|
4994
5057
|
if ('{}' === extraStr) this.extraStr = void 0;
|
|
4995
5058
|
}
|
|
4996
5059
|
static create(args) {
|
|
4997
|
-
return args ? new UniDM(args.
|
|
5060
|
+
return args ? new UniDM(args.SOID || UniID.fromNull().toString(), args.progress, args.mode, args.fontsize, args.color, args.senderID, args.content, args.ctime, args.weight, args.pool, args.attr, args.platform, 'object' == typeof args.extra ? JSON.stringify(args.extra) : args.extra || args.extraStr, args.DMID) : new UniDM(UniID.fromNull().toString());
|
|
4998
5061
|
}
|
|
4999
5062
|
get extra() {
|
|
5000
5063
|
const extra = JSON.parse(this.extraStr || '{}');
|
|
5001
5064
|
return extra;
|
|
5002
5065
|
}
|
|
5003
5066
|
get isFrom3rdPlatform() {
|
|
5004
|
-
if (this.platform &&
|
|
5067
|
+
if (this.platform && PlatformDanmakuSources.includes(this.platform)) return true;
|
|
5005
5068
|
return false;
|
|
5006
5069
|
}
|
|
5007
5070
|
toDMID() {
|
|
@@ -5009,12 +5072,11 @@ class UniDM {
|
|
|
5009
5072
|
}
|
|
5010
5073
|
isSameAs(dan, _check2 = false) {
|
|
5011
5074
|
const isSame = (k)=>this[k] === dan[k], checks = [
|
|
5012
|
-
'
|
|
5075
|
+
'SOID',
|
|
5013
5076
|
'content',
|
|
5014
5077
|
'mode',
|
|
5015
5078
|
'platform',
|
|
5016
|
-
'pool'
|
|
5017
|
-
'SPMO'
|
|
5079
|
+
'pool'
|
|
5018
5080
|
].every((k)=>isSame(k));
|
|
5019
5081
|
if ('{}' === JSON.stringify(this.extra) && '{}' === JSON.stringify(dan.extra)) return checks;
|
|
5020
5082
|
const thisHasOnlyMerge = this.extra.danuni?.merge && !this.extra.artplayer && !this.extra.bili && !this.extra.danuni.chapter;
|
|
@@ -5041,15 +5103,12 @@ class UniDM {
|
|
|
5041
5103
|
const def = UniDM.create(), dan = UniDM.create(this);
|
|
5042
5104
|
for(const key in dan){
|
|
5043
5105
|
const k = key, v = dan[k];
|
|
5044
|
-
if ('
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
if ('attr' === k && Array.isArray(v) && 0 === v.length) delete dan[k];
|
|
5049
|
-
if ('extraStr' === k && '{}' === v) delete dan[k];
|
|
5050
|
-
}
|
|
5051
|
-
} else delete dan[k];
|
|
5106
|
+
if ('SOID' !== key) if (v) if (v === def[k]) delete dan[k];
|
|
5107
|
+
else {
|
|
5108
|
+
if ('attr' === k && Array.isArray(v) && 0 === v.length) delete dan[k];
|
|
5109
|
+
if ('extraStr' === k && '{}' === v) delete dan[k];
|
|
5052
5110
|
}
|
|
5111
|
+
else delete dan[k];
|
|
5053
5112
|
}
|
|
5054
5113
|
return JSON.parse(JSON.stringify(dan));
|
|
5055
5114
|
}
|
|
@@ -5071,20 +5130,20 @@ class UniDM {
|
|
|
5071
5130
|
clone.content = `${this.content} x${merge.count}`;
|
|
5072
5131
|
} else if (danuni.chapter) {
|
|
5073
5132
|
const chapter = danuni.chapter;
|
|
5074
|
-
if ("cut" === chapter.type) clone.content = `[
|
|
5075
|
-
else if ("dup" === chapter.type) clone.content = `[
|
|
5076
|
-
else clone.content = `[
|
|
5133
|
+
if ("cut" === chapter.type) clone.content = `[\u{63D0}\u{793A}]${clone.platform}\u{6E90}${ExtraDanUniChapterTypeDict.chs[chapter.type]}\u{4E86}${chapter.duration}\u{79D2}`;
|
|
5134
|
+
else if ("dup" === chapter.type) clone.content = `[\u{63D0}\u{793A}(${ExtraDanUniChapterTypeDict.chs[chapter.type]})]${clone.platform}\u{6E90}-${chapter.duration}\u{79D2}`;
|
|
5135
|
+
else clone.content = `[\u{7A7A}\u{964D}(${ExtraDanUniChapterTypeDict.chs[chapter.type]})]${hh_mm_ss.fromS(clone.progress + chapter.duration)}`;
|
|
5077
5136
|
}
|
|
5078
5137
|
} else if (check('bili') && clone.extra.bili) {
|
|
5079
5138
|
const bili = clone.extra.bili;
|
|
5080
|
-
if (7 === bili.mode && bili.adv) clone.content = `[B
|
|
5139
|
+
if (7 === bili.mode && bili.adv) clone.content = `[B\u{7AD9}\u{9AD8}\u{7EA7}\u{5F39}\u{5E55}]${JSON.parse(bili.adv)[4] || ''}`;
|
|
5081
5140
|
else if (bili.command) {
|
|
5082
5141
|
const command = bili.command;
|
|
5083
|
-
clone.content = `[B
|
|
5142
|
+
clone.content = `[B\u{7AD9}\u{6307}\u{4EE4}\u{5F39}\u{5E55}]${command.content}`;
|
|
5084
5143
|
clone.fontsize = 36;
|
|
5085
5144
|
}
|
|
5086
5145
|
}
|
|
5087
|
-
clone.senderID = 'compat@
|
|
5146
|
+
clone.senderID = 'compat[bot]@dan-any';
|
|
5088
5147
|
clone.attr.push('Compatible');
|
|
5089
5148
|
if (cleanExtra) clone.extraStr = void 0;
|
|
5090
5149
|
return clone;
|
|
@@ -5096,10 +5155,8 @@ class UniDM {
|
|
|
5096
5155
|
if ('s' === tsUnit) return false;
|
|
5097
5156
|
return ts < 100000000;
|
|
5098
5157
|
}
|
|
5099
|
-
if ('number' == typeof oriCtime || 'bigint' == typeof oriCtime)
|
|
5100
|
-
|
|
5101
|
-
return new Date(1000 * Number(oriCtime));
|
|
5102
|
-
}
|
|
5158
|
+
if ('number' == typeof oriCtime || 'bigint' == typeof oriCtime) if (isMsTs(oriCtime)) return new Date(Number(oriCtime));
|
|
5159
|
+
else return new Date(1000 * Number(oriCtime));
|
|
5103
5160
|
if ('string' != typeof oriCtime) return oriCtime;
|
|
5104
5161
|
if (/^\d+n$/.test(oriCtime)) return new Date(Number(oriCtime.slice(0, -1)));
|
|
5105
5162
|
return new Date(oriCtime);
|
|
@@ -5146,11 +5203,11 @@ class UniDM {
|
|
|
5146
5203
|
}
|
|
5147
5204
|
return mode;
|
|
5148
5205
|
}
|
|
5149
|
-
static fromBili(args,
|
|
5206
|
+
static fromBili(args, cid) {
|
|
5150
5207
|
if (args.oid && !cid) cid = args.oid;
|
|
5151
|
-
const
|
|
5208
|
+
const SOID = `def::${UniID.fromBili({
|
|
5152
5209
|
cid
|
|
5153
|
-
})
|
|
5210
|
+
})}`, senderID = UniID.fromBili({
|
|
5154
5211
|
midHash: args.midHash
|
|
5155
5212
|
});
|
|
5156
5213
|
let mode = 0;
|
|
@@ -5188,28 +5245,27 @@ class UniDM {
|
|
|
5188
5245
|
}
|
|
5189
5246
|
return this.create({
|
|
5190
5247
|
...args,
|
|
5191
|
-
|
|
5248
|
+
SOID: SOID.toString(),
|
|
5192
5249
|
mode,
|
|
5193
5250
|
senderID: senderID.toString(),
|
|
5194
5251
|
ctime: this.transCtime(args.ctime, 's'),
|
|
5195
5252
|
weight: args.weight ? args.weight : 3 === pool ? 1 : 0,
|
|
5196
5253
|
pool,
|
|
5197
|
-
attr: DMAttrUtils.fromBin(args.attr,
|
|
5198
|
-
platform:
|
|
5199
|
-
SPMO,
|
|
5254
|
+
attr: DMAttrUtils.fromBin(args.attr, platform_PlatformVideoSource.Bilibili),
|
|
5255
|
+
platform: platform_PlatformVideoSource.Bilibili,
|
|
5200
5256
|
extra: args.mode >= 7 ? JSON.stringify(extra, BigIntSerializer) : void 0
|
|
5201
5257
|
});
|
|
5202
5258
|
}
|
|
5203
|
-
static fromBiliCommand(args,
|
|
5259
|
+
static fromBiliCommand(args, cid) {
|
|
5204
5260
|
if (args.oid && !cid) cid = args.oid;
|
|
5205
|
-
const
|
|
5261
|
+
const SOID = UniID.fromBili({
|
|
5206
5262
|
cid
|
|
5207
5263
|
}), senderID = UniID.fromBili({
|
|
5208
5264
|
mid: args.mid
|
|
5209
5265
|
});
|
|
5210
5266
|
return this.create({
|
|
5211
5267
|
...args,
|
|
5212
|
-
|
|
5268
|
+
SOID: SOID.toString(),
|
|
5213
5269
|
mode: 4,
|
|
5214
5270
|
senderID: senderID.toString(),
|
|
5215
5271
|
ctime: new Date(`${args.ctime} GMT+0800`),
|
|
@@ -5218,8 +5274,7 @@ class UniDM {
|
|
|
5218
5274
|
attr: [
|
|
5219
5275
|
'Protect'
|
|
5220
5276
|
],
|
|
5221
|
-
platform:
|
|
5222
|
-
SPMO,
|
|
5277
|
+
platform: platform_PlatformVideoSource.Bilibili,
|
|
5223
5278
|
extra: JSON.stringify({
|
|
5224
5279
|
bili: {
|
|
5225
5280
|
command: args
|
|
@@ -5228,10 +5283,10 @@ class UniDM {
|
|
|
5228
5283
|
});
|
|
5229
5284
|
}
|
|
5230
5285
|
static fromDplayer(args, playerID, domain) {
|
|
5231
|
-
const
|
|
5286
|
+
const SOID = UniID.fromUnknown(playerID, domain), senderID = UniID.fromUnknown(args.midHash, domain);
|
|
5232
5287
|
return this.create({
|
|
5233
5288
|
...args,
|
|
5234
|
-
|
|
5289
|
+
SOID: SOID.toString(),
|
|
5235
5290
|
mode: this.transMode(args.mode, 'dplayer'),
|
|
5236
5291
|
senderID: senderID.toString(),
|
|
5237
5292
|
platform: domain
|
|
@@ -5250,7 +5305,7 @@ class UniDM {
|
|
|
5250
5305
|
};
|
|
5251
5306
|
}
|
|
5252
5307
|
static fromArtplayer(args, playerID, domain) {
|
|
5253
|
-
const
|
|
5308
|
+
const SOID = UniID.fromUnknown(playerID, domain), senderID = UniID.fromUnknown('', domain);
|
|
5254
5309
|
let extra = args.border ? {
|
|
5255
5310
|
artplayer: {
|
|
5256
5311
|
border: args.border,
|
|
@@ -5270,7 +5325,7 @@ class UniDM {
|
|
|
5270
5325
|
};
|
|
5271
5326
|
return this.create({
|
|
5272
5327
|
...args,
|
|
5273
|
-
|
|
5328
|
+
SOID: SOID.toString(),
|
|
5274
5329
|
mode: this.transMode(args.mode, 'artplayer'),
|
|
5275
5330
|
senderID: senderID.toString(),
|
|
5276
5331
|
platform: domain,
|
|
@@ -5289,11 +5344,11 @@ class UniDM {
|
|
|
5289
5344
|
style: this.extra.artplayer?.style
|
|
5290
5345
|
};
|
|
5291
5346
|
}
|
|
5292
|
-
static fromDDplay(args, episodeId, domain =
|
|
5293
|
-
const
|
|
5347
|
+
static fromDDplay(args, episodeId, domain = platform_PlatformDanmakuOnlySource.DanDanPlay) {
|
|
5348
|
+
const SOID = UniID.fromUnknown(`def::${episodeId}`, domain);
|
|
5294
5349
|
return this.create({
|
|
5295
5350
|
...args,
|
|
5296
|
-
|
|
5351
|
+
SOID: SOID.toString(),
|
|
5297
5352
|
mode: this.transMode(args.mode, 'ddplay'),
|
|
5298
5353
|
senderID: args.uid,
|
|
5299
5354
|
content: args.m,
|
|
@@ -5315,94 +5370,592 @@ class UniDM {
|
|
|
5315
5370
|
};
|
|
5316
5371
|
}
|
|
5317
5372
|
}
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
}
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5373
|
+
class UniPool {
|
|
5374
|
+
dans;
|
|
5375
|
+
options;
|
|
5376
|
+
constructor(dans, options = {}){
|
|
5377
|
+
this.dans = dans;
|
|
5378
|
+
this.options = options;
|
|
5379
|
+
if (false !== options.dedupe) options.dedupe = true;
|
|
5380
|
+
if (this.options.dedupe) this.dedupe();
|
|
5381
|
+
}
|
|
5382
|
+
async pipe(fn) {
|
|
5383
|
+
return fn(this);
|
|
5384
|
+
}
|
|
5385
|
+
pipeSync(fn) {
|
|
5386
|
+
return fn(this);
|
|
5387
|
+
}
|
|
5388
|
+
get shared() {
|
|
5389
|
+
const isShared = (key)=>this.dans.every((d)=>d[key]);
|
|
5334
5390
|
return {
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5391
|
+
SOID: isShared('SOID') ? this.dans[0].SOID : void 0,
|
|
5392
|
+
senderID: isShared('senderID') ? this.dans[0].senderID : void 0,
|
|
5393
|
+
platform: isShared('platform') ? this.dans[0].platform : void 0,
|
|
5394
|
+
pool: isShared('pool') ? this.dans[0].pool : void 0,
|
|
5395
|
+
mode: isShared('mode') ? this.dans[0].mode : void 0,
|
|
5396
|
+
color: isShared('color') ? this.dans[0].color : void 0
|
|
5341
5397
|
};
|
|
5342
|
-
});
|
|
5343
|
-
}
|
|
5344
|
-
function DanmakuList2UniPool(d) {
|
|
5345
|
-
return new UniPool(d.map((d)=>d.extra));
|
|
5346
|
-
}
|
|
5347
|
-
const lang_assign = (source, ...targets)=>{
|
|
5348
|
-
for (const target of targets)for (const key of Object.keys(target))source[key] = target[key];
|
|
5349
|
-
return source;
|
|
5350
|
-
};
|
|
5351
|
-
const arrayOfLength = (length, defaultValue)=>{
|
|
5352
|
-
const array = new Array(length);
|
|
5353
|
-
for(let i = 0; i < length; i++)array[i] = defaultValue;
|
|
5354
|
-
return array;
|
|
5355
|
-
};
|
|
5356
|
-
const computeScrollInTime = (rectWidth, screenWidth, scrollTime)=>{
|
|
5357
|
-
const speed = (screenWidth + rectWidth) / scrollTime;
|
|
5358
|
-
return rectWidth / speed;
|
|
5359
|
-
};
|
|
5360
|
-
const computeScrollOverTime = (rectWidth, screenWidth, scrollTime)=>{
|
|
5361
|
-
const speed = (screenWidth + rectWidth) / scrollTime;
|
|
5362
|
-
return screenWidth / speed;
|
|
5363
|
-
};
|
|
5364
|
-
const splitGrids = ({ fontSize, padding, playResY, bottomSpace })=>{
|
|
5365
|
-
const defaultFontSize = fontSize[FontSize.NORMAL];
|
|
5366
|
-
const paddingTop = padding[0];
|
|
5367
|
-
const paddingBottom = padding[2];
|
|
5368
|
-
const linesCount = Math.floor((playResY - bottomSpace) / (defaultFontSize + paddingTop + paddingBottom));
|
|
5369
|
-
return {
|
|
5370
|
-
1: arrayOfLength(linesCount, {
|
|
5371
|
-
start: 0,
|
|
5372
|
-
end: 0,
|
|
5373
|
-
width: 0
|
|
5374
|
-
}),
|
|
5375
|
-
3: arrayOfLength(linesCount, 0),
|
|
5376
|
-
2: arrayOfLength(linesCount, 0)
|
|
5377
|
-
};
|
|
5378
|
-
};
|
|
5379
|
-
const measureTextWidth = (()=>{
|
|
5380
|
-
const canvasContext = (0, __WEBPACK_EXTERNAL_MODULE_canvas__.createCanvas)(50, 50).getContext('2d');
|
|
5381
|
-
const supportTextMeasure = !!canvasContext.measureText('中');
|
|
5382
|
-
if (supportTextMeasure) return (fontName, fontSize, bold, text)=>{
|
|
5383
|
-
canvasContext.font = `${bold ? 'bold' : 'normal'} ${fontSize}px ${fontName}`;
|
|
5384
|
-
const textWidth = canvasContext.measureText(text).width;
|
|
5385
|
-
return Math.round(textWidth);
|
|
5386
|
-
};
|
|
5387
|
-
console.warn('[Warn] node-canvas is installed without text measure support, layout may not be correct');
|
|
5388
|
-
return (_fontName, fontSize, _bold, text)=>text.length * fontSize;
|
|
5389
|
-
})();
|
|
5390
|
-
const resolveAvailableFixGrid = (grids, time)=>{
|
|
5391
|
-
for (const [i, grid] of grids.entries())if (grid <= time) return i;
|
|
5392
|
-
return -1;
|
|
5393
|
-
};
|
|
5394
|
-
const resolveAvailableScrollGrid = (grids, rectWidth, screenWidth, time, duration)=>{
|
|
5395
|
-
for (const [i, previous] of grids.entries()){
|
|
5396
|
-
const previousInTime = previous.start + computeScrollInTime(previous.width, screenWidth, duration);
|
|
5397
|
-
const currentOverTime = time + computeScrollOverTime(rectWidth, screenWidth, duration);
|
|
5398
|
-
if (time >= previousInTime && currentOverTime >= previous.end) return i;
|
|
5399
5398
|
}
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5399
|
+
get stat() {
|
|
5400
|
+
const default_stat = {
|
|
5401
|
+
SOID: [],
|
|
5402
|
+
mode: [
|
|
5403
|
+
{
|
|
5404
|
+
val: dm_gen_Modes.Normal,
|
|
5405
|
+
count: 0
|
|
5406
|
+
},
|
|
5407
|
+
{
|
|
5408
|
+
val: dm_gen_Modes.Bottom,
|
|
5409
|
+
count: 0
|
|
5410
|
+
},
|
|
5411
|
+
{
|
|
5412
|
+
val: dm_gen_Modes.Top,
|
|
5413
|
+
count: 0
|
|
5414
|
+
},
|
|
5415
|
+
{
|
|
5416
|
+
val: dm_gen_Modes.Reverse,
|
|
5417
|
+
count: 0
|
|
5418
|
+
},
|
|
5419
|
+
{
|
|
5420
|
+
val: dm_gen_Modes.Ext,
|
|
5421
|
+
count: 0
|
|
5422
|
+
}
|
|
5423
|
+
],
|
|
5424
|
+
fontsize: [],
|
|
5425
|
+
color: [],
|
|
5426
|
+
senderID: [],
|
|
5427
|
+
content: [],
|
|
5428
|
+
weight: [],
|
|
5429
|
+
pool: [
|
|
5430
|
+
{
|
|
5431
|
+
val: dm_gen_Pools.Def,
|
|
5432
|
+
count: 0
|
|
5433
|
+
},
|
|
5434
|
+
{
|
|
5435
|
+
val: dm_gen_Pools.Sub,
|
|
5436
|
+
count: 0
|
|
5437
|
+
},
|
|
5438
|
+
{
|
|
5439
|
+
val: dm_gen_Pools.Adv,
|
|
5440
|
+
count: 0
|
|
5441
|
+
},
|
|
5442
|
+
{
|
|
5443
|
+
val: dm_gen_Pools.Ix,
|
|
5444
|
+
count: 0
|
|
5445
|
+
}
|
|
5446
|
+
],
|
|
5447
|
+
platform: []
|
|
5448
|
+
};
|
|
5449
|
+
const stat = this.dans.reduce((s, d)=>{
|
|
5450
|
+
const SOID = s.SOID.find((i)=>i.val === d.SOID);
|
|
5451
|
+
if (SOID) SOID.count++;
|
|
5452
|
+
else s.SOID.push({
|
|
5453
|
+
val: d.SOID,
|
|
5454
|
+
count: 1
|
|
5455
|
+
});
|
|
5456
|
+
const mode = s.mode.find((i)=>i.val === d.mode);
|
|
5457
|
+
if (mode) mode.count++;
|
|
5458
|
+
else s.mode.push({
|
|
5459
|
+
val: d.mode,
|
|
5460
|
+
count: 1
|
|
5461
|
+
});
|
|
5462
|
+
const fontsize = s.fontsize.find((i)=>i.val === d.fontsize);
|
|
5463
|
+
if (fontsize) fontsize.count++;
|
|
5464
|
+
else s.fontsize.push({
|
|
5465
|
+
val: d.fontsize,
|
|
5466
|
+
count: 1
|
|
5467
|
+
});
|
|
5468
|
+
const color = s.color.find((i)=>i.val === d.color);
|
|
5469
|
+
if (color) color.count++;
|
|
5470
|
+
else s.color.push({
|
|
5471
|
+
val: d.color,
|
|
5472
|
+
count: 1
|
|
5473
|
+
});
|
|
5474
|
+
const senderID = s.senderID.find((i)=>i.val === d.senderID);
|
|
5475
|
+
if (senderID) senderID.count++;
|
|
5476
|
+
else s.senderID.push({
|
|
5477
|
+
val: d.senderID,
|
|
5478
|
+
count: 1
|
|
5479
|
+
});
|
|
5480
|
+
const content = s.content.find((i)=>i.val === d.content);
|
|
5481
|
+
if (content) content.count++;
|
|
5482
|
+
else s.content.push({
|
|
5483
|
+
val: d.content,
|
|
5484
|
+
count: 1
|
|
5485
|
+
});
|
|
5486
|
+
const weight = s.weight.find((i)=>i.val === d.weight);
|
|
5487
|
+
if (weight) weight.count++;
|
|
5488
|
+
else s.weight.push({
|
|
5489
|
+
val: d.weight,
|
|
5490
|
+
count: 1
|
|
5491
|
+
});
|
|
5492
|
+
const pool = s.pool.find((i)=>i.val === d.pool);
|
|
5493
|
+
if (pool) pool.count++;
|
|
5494
|
+
else s.pool.push({
|
|
5495
|
+
val: d.pool,
|
|
5496
|
+
count: 1
|
|
5497
|
+
});
|
|
5498
|
+
const platform = s.platform.find((i)=>i.val === d.platform);
|
|
5499
|
+
if (platform) platform.count++;
|
|
5500
|
+
else s.platform.push({
|
|
5501
|
+
val: d.platform,
|
|
5502
|
+
count: 1
|
|
5503
|
+
});
|
|
5504
|
+
return s;
|
|
5505
|
+
}, default_stat);
|
|
5506
|
+
return stat;
|
|
5507
|
+
}
|
|
5508
|
+
get most() {
|
|
5509
|
+
const s = this.stat;
|
|
5510
|
+
return {
|
|
5511
|
+
mode: s.mode.sort((a, b)=>b.count - a.count)[0].val,
|
|
5512
|
+
fontsize: s.fontsize.sort((a, b)=>b.count - a.count)[0].val,
|
|
5513
|
+
color: s.color.sort((a, b)=>b.count - a.count)[0].val,
|
|
5514
|
+
senderID: s.senderID.sort((a, b)=>b.count - a.count)[0].val,
|
|
5515
|
+
content: s.content.sort((a, b)=>b.count - a.count)[0].val,
|
|
5516
|
+
weight: s.weight.sort((a, b)=>b.count - a.count)[0].val,
|
|
5517
|
+
pool: s.pool.sort((a, b)=>b.count - a.count)[0].val,
|
|
5518
|
+
platform: s.platform.sort((a, b)=>b.count - a.count)[0].val
|
|
5519
|
+
};
|
|
5520
|
+
}
|
|
5521
|
+
static create() {
|
|
5522
|
+
return new UniPool([]);
|
|
5523
|
+
}
|
|
5524
|
+
assign(dans) {
|
|
5525
|
+
if (dans instanceof UniPool) return new UniPool([
|
|
5526
|
+
...this.dans,
|
|
5527
|
+
...dans.dans
|
|
5528
|
+
]);
|
|
5529
|
+
if (dans instanceof UniDM) return new UniPool([
|
|
5530
|
+
...this.dans,
|
|
5531
|
+
dans
|
|
5532
|
+
]);
|
|
5533
|
+
if (Array.isArray(dans) && dans.every((d)=>d instanceof UniDM)) return new UniPool([
|
|
5534
|
+
...this.dans,
|
|
5535
|
+
...dans
|
|
5536
|
+
]);
|
|
5537
|
+
return this;
|
|
5538
|
+
}
|
|
5539
|
+
split(key) {
|
|
5540
|
+
if (this.shared[key]) return [
|
|
5541
|
+
this
|
|
5542
|
+
];
|
|
5543
|
+
const set = new Set(this.dans.map((d)=>d[key]));
|
|
5544
|
+
return [
|
|
5545
|
+
...set
|
|
5546
|
+
].map((v)=>new UniPool(this.dans.filter((d)=>d[key] === v), {
|
|
5547
|
+
dedupe: false
|
|
5548
|
+
}));
|
|
5549
|
+
}
|
|
5550
|
+
dedupe() {
|
|
5551
|
+
const map = new Map();
|
|
5552
|
+
this.dans.forEach((d)=>map.set(d.DMID || d.toDMID(), d));
|
|
5553
|
+
this.dans = [
|
|
5554
|
+
...map.values()
|
|
5555
|
+
];
|
|
5556
|
+
this.options.dedupe = false;
|
|
5557
|
+
}
|
|
5558
|
+
merge(lifetime = 0) {
|
|
5559
|
+
if (!this.shared.SOID) {
|
|
5560
|
+
console.error("\u672C\u529F\u80FD\u4EC5\u652F\u6301\u540C\u5F39\u5E55\u5E93\u5185\u4F7F\u7528\uFF0C\u53EF\u5148 .split('SOID') \u5728\u5206\u522B\u4F7F\u7528");
|
|
5561
|
+
return this;
|
|
5562
|
+
}
|
|
5563
|
+
if (lifetime <= 0) return this;
|
|
5564
|
+
const mergeContext = this.dans.reduce(([result, cache, mergeObj], danmaku)=>{
|
|
5565
|
+
const key = [
|
|
5566
|
+
'SOID',
|
|
5567
|
+
'content',
|
|
5568
|
+
'mode',
|
|
5569
|
+
'platform',
|
|
5570
|
+
'pool'
|
|
5571
|
+
].map((k)=>danmaku[k]).join('|');
|
|
5572
|
+
const cached = cache[key];
|
|
5573
|
+
const lastAppearTime = cached?.progress || 0;
|
|
5574
|
+
if (cached && danmaku.progress - lastAppearTime <= lifetime && danmaku.isSameAs(cached)) {
|
|
5575
|
+
const senders = mergeObj[key].senders;
|
|
5576
|
+
senders.push(danmaku.senderID);
|
|
5577
|
+
const extra = danmaku.extra;
|
|
5578
|
+
extra.danuni = extra.danuni || {};
|
|
5579
|
+
extra.danuni.merge = {
|
|
5580
|
+
count: senders.length,
|
|
5581
|
+
duration: danmaku.progress - cached.progress,
|
|
5582
|
+
senders,
|
|
5583
|
+
taolu_count: senders.length,
|
|
5584
|
+
taolu_senders: senders
|
|
5585
|
+
};
|
|
5586
|
+
danmaku.extraStr = JSON.stringify(extra);
|
|
5587
|
+
cache[key] = danmaku;
|
|
5588
|
+
mergeObj[key] = extra.danuni.merge;
|
|
5589
|
+
return [
|
|
5590
|
+
result,
|
|
5591
|
+
cache,
|
|
5592
|
+
mergeObj
|
|
5593
|
+
];
|
|
5594
|
+
}
|
|
5595
|
+
{
|
|
5596
|
+
mergeObj[key] = {
|
|
5597
|
+
count: 1,
|
|
5598
|
+
duration: 0,
|
|
5599
|
+
senders: [
|
|
5600
|
+
danmaku.senderID
|
|
5601
|
+
],
|
|
5602
|
+
taolu_count: 1,
|
|
5603
|
+
taolu_senders: [
|
|
5604
|
+
danmaku.senderID
|
|
5605
|
+
]
|
|
5606
|
+
};
|
|
5607
|
+
cache[key] = danmaku;
|
|
5608
|
+
const extra = danmaku.extra;
|
|
5609
|
+
extra.danuni = extra.danuni || {};
|
|
5610
|
+
extra.danuni.merge = mergeObj[key];
|
|
5611
|
+
danmaku.extraStr = JSON.stringify(extra);
|
|
5612
|
+
result.push(danmaku);
|
|
5613
|
+
return [
|
|
5614
|
+
result,
|
|
5615
|
+
cache,
|
|
5616
|
+
mergeObj
|
|
5617
|
+
];
|
|
5618
|
+
}
|
|
5619
|
+
}, [
|
|
5620
|
+
[],
|
|
5621
|
+
{},
|
|
5622
|
+
{}
|
|
5623
|
+
]);
|
|
5624
|
+
const [result, _cache, mergeObj] = mergeContext;
|
|
5625
|
+
result.forEach((danmaku, i)=>{
|
|
5626
|
+
const key = [
|
|
5627
|
+
'SOID',
|
|
5628
|
+
'content',
|
|
5629
|
+
'mode',
|
|
5630
|
+
'platform',
|
|
5631
|
+
'pool'
|
|
5632
|
+
].map((k)=>danmaku[k]).join('|');
|
|
5633
|
+
const extra = result[i].extra, mergeData = mergeObj[key];
|
|
5634
|
+
result[i].extraStr = JSON.stringify({
|
|
5635
|
+
...extra,
|
|
5636
|
+
danuni: {
|
|
5637
|
+
...extra.danuni,
|
|
5638
|
+
merge: mergeData
|
|
5639
|
+
}
|
|
5640
|
+
});
|
|
5641
|
+
if (mergeData?.count) if (mergeData.count <= 1) {
|
|
5642
|
+
const updatedExtra = {
|
|
5643
|
+
...extra
|
|
5644
|
+
};
|
|
5645
|
+
if (updatedExtra.danuni) {
|
|
5646
|
+
delete updatedExtra.danuni.merge;
|
|
5647
|
+
if (0 === Object.keys(updatedExtra.danuni).length) delete updatedExtra.danuni;
|
|
5648
|
+
}
|
|
5649
|
+
result[i].extraStr = Object.keys(updatedExtra).length > 0 ? JSON.stringify(updatedExtra) : void 0;
|
|
5650
|
+
} else {
|
|
5651
|
+
result[i].senderID = 'merge[bot]@dan-any';
|
|
5652
|
+
result[i].attr ? result[i].attr.push('Protect') : result[i].attr = [
|
|
5653
|
+
'Protect'
|
|
5654
|
+
];
|
|
5655
|
+
}
|
|
5656
|
+
});
|
|
5657
|
+
return new UniPool(result);
|
|
5658
|
+
}
|
|
5659
|
+
minify() {
|
|
5660
|
+
return this.dans.map((d)=>d.minify());
|
|
5661
|
+
}
|
|
5662
|
+
convert2(format, continue_on_error = false) {
|
|
5663
|
+
switch(format){
|
|
5664
|
+
case 'danuni.json':
|
|
5665
|
+
return this.dans;
|
|
5666
|
+
case 'danuni.bin':
|
|
5667
|
+
return this.toPb();
|
|
5668
|
+
case 'dplayer.json':
|
|
5669
|
+
return this.toDplayer();
|
|
5670
|
+
case 'artplayer.json':
|
|
5671
|
+
return this.toArtplayer();
|
|
5672
|
+
case 'ddplay.json':
|
|
5673
|
+
return this.toDDplay();
|
|
5674
|
+
case 'common.ass':
|
|
5675
|
+
return this.toASS();
|
|
5676
|
+
default:
|
|
5677
|
+
{
|
|
5678
|
+
const message = '(err) Unknown format or unsupported now!';
|
|
5679
|
+
if (continue_on_error) return message;
|
|
5680
|
+
throw new Error(message);
|
|
5681
|
+
}
|
|
5682
|
+
}
|
|
5683
|
+
}
|
|
5684
|
+
static fromPb(bin) {
|
|
5685
|
+
const data = fromBinary(DanmakuReplySchema, new Uint8Array(bin));
|
|
5686
|
+
return new UniPool(data.danmakus.map((d)=>new UniDM(d.SOID, d.progress, d.mode, d.fontsize, d.color, d.senderID, d.content, timestampDate(d.ctime || timestampNow()), d.weight, d.pool, d.attr, d.platform, d.extra, d.DMID)));
|
|
5687
|
+
}
|
|
5688
|
+
toPb() {
|
|
5689
|
+
return toBinary(DanmakuReplySchema, create(DanmakuReplySchema, {
|
|
5690
|
+
danmakus: this.dans.map((d)=>({
|
|
5691
|
+
SOID: d.SOID,
|
|
5692
|
+
DMID: d.DMID,
|
|
5693
|
+
progress: d.progress,
|
|
5694
|
+
mode: d.mode,
|
|
5695
|
+
fontsize: d.fontsize,
|
|
5696
|
+
color: d.color,
|
|
5697
|
+
senderID: d.senderID,
|
|
5698
|
+
content: d.content,
|
|
5699
|
+
ctime: timestampFromDate(d.ctime),
|
|
5700
|
+
weight: d.weight,
|
|
5701
|
+
pool: d.pool,
|
|
5702
|
+
attr: d.attr,
|
|
5703
|
+
platform: d.platform,
|
|
5704
|
+
extra: d.extraStr
|
|
5705
|
+
}))
|
|
5706
|
+
}));
|
|
5707
|
+
}
|
|
5708
|
+
static fromBiliXML(xml) {
|
|
5709
|
+
const parser = new XMLParser({
|
|
5710
|
+
ignoreAttributes: false
|
|
5711
|
+
}), oriData = parser.parse(xml), dans = oriData.i.d;
|
|
5712
|
+
return new UniPool(dans.map((d)=>{
|
|
5713
|
+
const p_str = d['@_p'], p_arr = p_str.split(',');
|
|
5714
|
+
return UniDM.fromBili({
|
|
5715
|
+
content: d['#text'],
|
|
5716
|
+
progress: Number.parseFloat(p_arr[0]),
|
|
5717
|
+
mode: Number.parseInt(p_arr[1]),
|
|
5718
|
+
fontsize: Number.parseInt(p_arr[2]),
|
|
5719
|
+
color: Number.parseInt(p_arr[3]),
|
|
5720
|
+
ctime: BigInt(p_arr[4]),
|
|
5721
|
+
pool: Number.parseInt(p_arr[5]),
|
|
5722
|
+
midHash: p_arr[6],
|
|
5723
|
+
id: BigInt(p_arr[7]),
|
|
5724
|
+
weight: Number.parseInt(p_arr[8])
|
|
5725
|
+
}, BigInt(oriData.i.chatid));
|
|
5726
|
+
}));
|
|
5727
|
+
}
|
|
5728
|
+
static fromBiliGrpc(bin) {
|
|
5729
|
+
const data = fromBinary(DmSegMobileReplySchema, new Uint8Array(bin)), json = data.elems;
|
|
5730
|
+
return new UniPool(json.map((d)=>UniDM.fromBili({
|
|
5731
|
+
...d,
|
|
5732
|
+
progress: d.progress / 1000
|
|
5733
|
+
})));
|
|
5734
|
+
}
|
|
5735
|
+
static fromBiliCommandGrpc(bin) {
|
|
5736
|
+
const data = fromBinary(DmWebViewReplySchema, new Uint8Array(bin)), json = data.commandDms;
|
|
5737
|
+
return new UniPool(json.map((d)=>UniDM.fromBiliCommand(d)));
|
|
5738
|
+
}
|
|
5739
|
+
static fromDplayer(json, playerID, domain = 'other') {
|
|
5740
|
+
return new UniPool(json.data.map((d)=>UniDM.fromDplayer({
|
|
5741
|
+
content: d[4],
|
|
5742
|
+
progress: d[0],
|
|
5743
|
+
mode: d[1],
|
|
5744
|
+
color: d[2],
|
|
5745
|
+
midHash: d[3]
|
|
5746
|
+
}, playerID, domain)));
|
|
5747
|
+
}
|
|
5748
|
+
toDplayer() {
|
|
5749
|
+
return {
|
|
5750
|
+
code: 0,
|
|
5751
|
+
data: this.dans.map((dan)=>{
|
|
5752
|
+
const d = dan.toDplayer();
|
|
5753
|
+
return [
|
|
5754
|
+
d.progress,
|
|
5755
|
+
d.mode,
|
|
5756
|
+
d.color,
|
|
5757
|
+
d.midHash,
|
|
5758
|
+
d.content
|
|
5759
|
+
];
|
|
5760
|
+
})
|
|
5761
|
+
};
|
|
5762
|
+
}
|
|
5763
|
+
static fromArtplayer(json, playerID, domain = 'other') {
|
|
5764
|
+
return new UniPool(json.map((d)=>UniDM.fromArtplayer({
|
|
5765
|
+
content: d.text,
|
|
5766
|
+
progress: d.time || 0,
|
|
5767
|
+
mode: d.mode || 0,
|
|
5768
|
+
color: Number((d.color || 'FFFFFF').replace('#', '0x')),
|
|
5769
|
+
style: d.style
|
|
5770
|
+
}, playerID, domain)));
|
|
5771
|
+
}
|
|
5772
|
+
toArtplayer() {
|
|
5773
|
+
return this.dans.map((dan)=>{
|
|
5774
|
+
const d = dan.toArtplayer();
|
|
5775
|
+
return {
|
|
5776
|
+
text: d.content,
|
|
5777
|
+
time: d.progress,
|
|
5778
|
+
mode: d.mode,
|
|
5779
|
+
color: `#${d.color.toString(16).toUpperCase() || 'FFFFFF'}`,
|
|
5780
|
+
border: d.border,
|
|
5781
|
+
style: d.style
|
|
5782
|
+
};
|
|
5783
|
+
});
|
|
5784
|
+
}
|
|
5785
|
+
static fromDDPlay(json, episodeId) {
|
|
5786
|
+
return new UniPool(json.comments.map((d)=>{
|
|
5787
|
+
const p_arr = d.p.split(',');
|
|
5788
|
+
return UniDM.fromDDplay({
|
|
5789
|
+
cid: d.cid,
|
|
5790
|
+
color: Number.parseInt(p_arr[2]),
|
|
5791
|
+
m: d.m,
|
|
5792
|
+
mode: Number.parseInt(p_arr[1]),
|
|
5793
|
+
progress: Number.parseFloat(p_arr[0]),
|
|
5794
|
+
uid: p_arr[3]
|
|
5795
|
+
}, episodeId);
|
|
5796
|
+
}));
|
|
5797
|
+
}
|
|
5798
|
+
toDDplay() {
|
|
5799
|
+
return {
|
|
5800
|
+
count: this.dans.length,
|
|
5801
|
+
comments: this.dans.map((dan)=>{
|
|
5802
|
+
const d = dan.toDDplay();
|
|
5803
|
+
return {
|
|
5804
|
+
cid: d.cid,
|
|
5805
|
+
p: `${d.progress},${d.mode},${d.color},${d.uid}`,
|
|
5806
|
+
m: d.m
|
|
5807
|
+
};
|
|
5808
|
+
})
|
|
5809
|
+
};
|
|
5810
|
+
}
|
|
5811
|
+
static fromASS(ass) {
|
|
5812
|
+
return parseAssRawField(ass);
|
|
5813
|
+
}
|
|
5814
|
+
toASS(options = {
|
|
5815
|
+
substyle: {}
|
|
5816
|
+
}) {
|
|
5817
|
+
const fn = this.shared.SOID;
|
|
5818
|
+
return generateASS(this, {
|
|
5819
|
+
filename: fn,
|
|
5820
|
+
title: fn,
|
|
5821
|
+
...options
|
|
5822
|
+
});
|
|
5823
|
+
}
|
|
5824
|
+
}
|
|
5825
|
+
const color_pad = (s)=>s.length < 2 ? `0${s}` : s;
|
|
5826
|
+
const decimalToHex = (n)=>color_pad(n.toString(16));
|
|
5827
|
+
const isDarkColor = ({ r, g, b })=>0.299 * r + 0.587 * g + 0.114 * b < 0x30;
|
|
5828
|
+
const WHITE = {
|
|
5829
|
+
r: 255,
|
|
5830
|
+
g: 255,
|
|
5831
|
+
b: 255
|
|
5832
|
+
};
|
|
5833
|
+
const BLACK = {
|
|
5834
|
+
r: 0,
|
|
5835
|
+
g: 0,
|
|
5836
|
+
b: 0
|
|
5837
|
+
};
|
|
5838
|
+
const hexColorToRGB = (hex)=>{
|
|
5839
|
+
if (0 === hex.indexOf('#')) hex = hex.slice(1);
|
|
5840
|
+
const [r, g, b] = 3 === hex.length ? hex.split('').map((c)=>c + c) : hex.match(/../g) || [];
|
|
5841
|
+
return {
|
|
5842
|
+
r: Number.parseInt(r, 16),
|
|
5843
|
+
g: Number.parseInt(g, 16),
|
|
5844
|
+
b: Number.parseInt(b, 16)
|
|
5845
|
+
};
|
|
5846
|
+
};
|
|
5847
|
+
const formatColor = ({ r, g, b }, opacity)=>{
|
|
5848
|
+
const color = [
|
|
5849
|
+
b,
|
|
5850
|
+
g,
|
|
5851
|
+
r
|
|
5852
|
+
];
|
|
5853
|
+
if (void 0 !== opacity) {
|
|
5854
|
+
const alpha = Math.round((1 - opacity) * 255);
|
|
5855
|
+
color.unshift(alpha);
|
|
5856
|
+
}
|
|
5857
|
+
return `&H${color.map(decimalToHex).join('').toUpperCase()}`;
|
|
5858
|
+
};
|
|
5859
|
+
const getDecoratingColor = (color)=>isDarkColor(color) ? WHITE : BLACK;
|
|
5860
|
+
const isWhite = (color)=>255 === color.r && 255 === color.g && 255 === color.b;
|
|
5861
|
+
const DanmakuType = {
|
|
5862
|
+
SCROLL: 1,
|
|
5863
|
+
BOTTOM: 2,
|
|
5864
|
+
TOP: 3
|
|
5865
|
+
};
|
|
5866
|
+
const FontSize = {
|
|
5867
|
+
SMALL: 0,
|
|
5868
|
+
NORMAL: 1,
|
|
5869
|
+
LARGE: 2
|
|
5870
|
+
};
|
|
5871
|
+
function decimalToRGB888(decimal) {
|
|
5872
|
+
const r = decimal >> 16 & 0xff;
|
|
5873
|
+
const g = decimal >> 8 & 0xff;
|
|
5874
|
+
const b = 0xff & decimal;
|
|
5875
|
+
return {
|
|
5876
|
+
r,
|
|
5877
|
+
g,
|
|
5878
|
+
b
|
|
5879
|
+
};
|
|
5880
|
+
}
|
|
5881
|
+
function UniPool2DanmakuLists(UP) {
|
|
5882
|
+
const dans = UP.dans;
|
|
5883
|
+
let type = DanmakuType.SCROLL;
|
|
5884
|
+
return dans.map((d)=>{
|
|
5885
|
+
if (d.mode === dm_gen_Modes.Bottom) type = DanmakuType.BOTTOM;
|
|
5886
|
+
else if (d.mode === dm_gen_Modes.Top) type = DanmakuType.TOP;
|
|
5887
|
+
return {
|
|
5888
|
+
time: d.progress,
|
|
5889
|
+
type,
|
|
5890
|
+
fontSizeType: d.fontsize,
|
|
5891
|
+
content: d.content,
|
|
5892
|
+
color: decimalToRGB888(d.color),
|
|
5893
|
+
extra: d
|
|
5894
|
+
};
|
|
5895
|
+
});
|
|
5896
|
+
}
|
|
5897
|
+
function DanmakuList2UniPool(d) {
|
|
5898
|
+
return new UniPool(d.map((d)=>UniDM.create(d.extra)));
|
|
5899
|
+
}
|
|
5900
|
+
const lang_assign = (source, ...targets)=>{
|
|
5901
|
+
for (const target of targets)for (const key of Object.keys(target))source[key] = target[key];
|
|
5902
|
+
return source;
|
|
5903
|
+
};
|
|
5904
|
+
const arrayOfLength = (length, defaultValue)=>{
|
|
5905
|
+
const array = new Array(length);
|
|
5906
|
+
for(let i = 0; i < length; i++)array[i] = defaultValue;
|
|
5907
|
+
return array;
|
|
5908
|
+
};
|
|
5909
|
+
const computeScrollInTime = (rectWidth, screenWidth, scrollTime)=>{
|
|
5910
|
+
const speed = (screenWidth + rectWidth) / scrollTime;
|
|
5911
|
+
return rectWidth / speed;
|
|
5912
|
+
};
|
|
5913
|
+
const computeScrollOverTime = (rectWidth, screenWidth, scrollTime)=>{
|
|
5914
|
+
const speed = (screenWidth + rectWidth) / scrollTime;
|
|
5915
|
+
return screenWidth / speed;
|
|
5916
|
+
};
|
|
5917
|
+
const splitGrids = ({ fontSize, padding, playResY, bottomSpace })=>{
|
|
5918
|
+
const defaultFontSize = fontSize[FontSize.NORMAL];
|
|
5919
|
+
const paddingTop = padding[0];
|
|
5920
|
+
const paddingBottom = padding[2];
|
|
5921
|
+
const linesCount = Math.floor((playResY - bottomSpace) / (defaultFontSize + paddingTop + paddingBottom));
|
|
5922
|
+
return {
|
|
5923
|
+
1: arrayOfLength(linesCount, {
|
|
5924
|
+
start: 0,
|
|
5925
|
+
end: 0,
|
|
5926
|
+
width: 0
|
|
5927
|
+
}),
|
|
5928
|
+
3: arrayOfLength(linesCount, 0),
|
|
5929
|
+
2: arrayOfLength(linesCount, 0)
|
|
5930
|
+
};
|
|
5931
|
+
};
|
|
5932
|
+
const measureTextWidth = (()=>{
|
|
5933
|
+
const canvasContext = createCanvas(50, 50).getContext('2d');
|
|
5934
|
+
const supportTextMeasure = !!canvasContext.measureText("\u4E2D");
|
|
5935
|
+
if (supportTextMeasure) return (fontName, fontSize, bold, text)=>{
|
|
5936
|
+
canvasContext.font = `${bold ? 'bold' : 'normal'} ${fontSize}px ${fontName}`;
|
|
5937
|
+
const textWidth = canvasContext.measureText(text).width;
|
|
5938
|
+
return Math.round(textWidth);
|
|
5939
|
+
};
|
|
5940
|
+
console.warn('[Warn] node-canvas is installed without text measure support, layout may not be correct');
|
|
5941
|
+
return (_fontName, fontSize, _bold, text)=>text.length * fontSize;
|
|
5942
|
+
})();
|
|
5943
|
+
const resolveAvailableFixGrid = (grids, time)=>{
|
|
5944
|
+
for (const [i, grid] of grids.entries())if (grid <= time) return i;
|
|
5945
|
+
return -1;
|
|
5946
|
+
};
|
|
5947
|
+
const resolveAvailableScrollGrid = (grids, rectWidth, screenWidth, time, duration)=>{
|
|
5948
|
+
for (const [i, previous] of grids.entries()){
|
|
5949
|
+
const previousInTime = previous.start + computeScrollInTime(previous.width, screenWidth, duration);
|
|
5950
|
+
const currentOverTime = time + computeScrollOverTime(rectWidth, screenWidth, duration);
|
|
5951
|
+
if (time >= previousInTime && currentOverTime >= previous.end) return i;
|
|
5952
|
+
}
|
|
5953
|
+
return -1;
|
|
5954
|
+
};
|
|
5955
|
+
const initializeLayout = (config)=>{
|
|
5956
|
+
const { playResX, playResY, fontName, fontSize, bold, padding, scrollTime, fixTime, bottomSpace } = config;
|
|
5957
|
+
const [paddingTop, paddingRight, paddingBottom, paddingLeft] = padding;
|
|
5958
|
+
const defaultFontSize = fontSize[FontSize.NORMAL];
|
|
5406
5959
|
const grids = splitGrids(config);
|
|
5407
5960
|
const gridHeight = defaultFontSize + paddingTop + paddingBottom;
|
|
5408
5961
|
return (danmaku)=>{
|
|
@@ -5470,7 +6023,7 @@ const formatTime = (seconds)=>{
|
|
|
5470
6023
|
const minorSecond = Math.floor((seconds - integer) * 100);
|
|
5471
6024
|
return `${hour}:${pad(minute)}:${pad(second)}.${minorSecond}`;
|
|
5472
6025
|
};
|
|
5473
|
-
const encode = (text)=>text.toString().replaceAll('{',
|
|
6026
|
+
const encode = (text)=>text.toString().replaceAll('{', "\uFF5B").replaceAll('}', "\uFF5D").replaceAll(/\r|\n/g, '');
|
|
5474
6027
|
const scrollCommand = ({ start, end, top })=>`\\move(${start},${top},${end},${top})`;
|
|
5475
6028
|
const fixCommand = ({ top, left })=>`\\an8\\pos(${left},${top})`;
|
|
5476
6029
|
const colorCommand = (color)=>`\\c${formatColor(color)}`;
|
|
@@ -5555,7 +6108,7 @@ const info = ({ playResX, playResY }, { filename, title })=>{
|
|
|
5555
6108
|
const content = [
|
|
5556
6109
|
'[Script Info]',
|
|
5557
6110
|
`Title: ${title}`,
|
|
5558
|
-
`Original Script:
|
|
6111
|
+
`Original Script: \u{6839}\u{636E} ${filename} \u{7684}\u{5F39}\u{5E55}\u{4FE1}\u{606F}\u{FF0C}\u{7531} ${package_namespaceObject.e8} \u{751F}\u{6210}`,
|
|
5559
6112
|
'ScriptType: v4.00+',
|
|
5560
6113
|
'Collisions: Reverse',
|
|
5561
6114
|
`PlayResX: ${playResX}`,
|
|
@@ -5576,16 +6129,16 @@ function fromUint16Array(array) {
|
|
|
5576
6129
|
for (const element of array)result += String.fromCharCode(element);
|
|
5577
6130
|
return result;
|
|
5578
6131
|
}
|
|
5579
|
-
|
|
5580
|
-
const
|
|
6132
|
+
function raw_raw(list, config, context, compressType = 'brotli', baseType = 'base18384') {
|
|
6133
|
+
const raw1 = {
|
|
5581
6134
|
list,
|
|
5582
6135
|
config,
|
|
5583
6136
|
context
|
|
5584
|
-
}, rawText = JSON.stringify(
|
|
6137
|
+
}, rawText = JSON.stringify(raw1);
|
|
5585
6138
|
let compress = Buffer.from('');
|
|
5586
|
-
compress = 'brotli' === compressType ?
|
|
5587
|
-
return `;RawCompressType: ${compressType}\n;RawBaseType: ${baseType}\n;Raw: ${'base64' === baseType ? compress.toString('base64') : fromUint16Array(
|
|
5588
|
-
}
|
|
6139
|
+
compress = 'brotli' === compressType ? brotliCompressSync(rawText) : gzipSync(rawText);
|
|
6140
|
+
return `;RawCompressType: ${compressType}\n;RawBaseType: ${baseType}\n;Raw: ${'base64' === baseType ? compress.toString('base64') : fromUint16Array(external_base16384_encode(compress))}`;
|
|
6141
|
+
}
|
|
5589
6142
|
function deRaw(ass) {
|
|
5590
6143
|
const arr = ass.split('\n'), lineCompressType = arr.find((line)=>line.startsWith(';RawCompressType:')), lineBaseType = arr.find((line)=>line.startsWith(';RawBaseType:')), lineRaw = arr.find((line)=>line.startsWith(';Raw:'));
|
|
5591
6144
|
if (!lineCompressType || !lineBaseType || !lineRaw) return;
|
|
@@ -5593,9 +6146,9 @@ function deRaw(ass) {
|
|
|
5593
6146
|
let compressType = lineCompressType.replace(';RawCompressType: ', '').trim(), baseType = lineBaseType.replace(';RawBaseType: ', '').trim();
|
|
5594
6147
|
if (!compressTypes.includes(compressType)) compressType = 'gzip';
|
|
5595
6148
|
if (!baseTypes.includes(baseType)) baseType = 'base64';
|
|
5596
|
-
const text = lineRaw.replace(';Raw: ', '').trim(), buffer = 'base64' === baseType ? Buffer.from(text, 'base64') : Buffer.from(
|
|
6149
|
+
const text = lineRaw.replace(';Raw: ', '').trim(), buffer = 'base64' === baseType ? Buffer.from(text, 'base64') : Buffer.from(decode(Buffer.from(text, 'utf-8').toString('utf-8')));
|
|
5597
6150
|
let decompress = Buffer.from('');
|
|
5598
|
-
decompress = 'brotli' === compressType ?
|
|
6151
|
+
decompress = 'brotli' === compressType ? brotliDecompressSync(buffer) : gunzipSync(buffer);
|
|
5599
6152
|
try {
|
|
5600
6153
|
return JSON.parse(decompress.toString('utf-8'));
|
|
5601
6154
|
} catch {
|
|
@@ -5647,14 +6200,14 @@ const style = ({ fontName, fontSize, color: configColor, outlineColor, backColor
|
|
|
5647
6200
|
const ass_create = (list, rawList, config, context = {
|
|
5648
6201
|
filename: 'unknown',
|
|
5649
6202
|
title: 'unknown'
|
|
5650
|
-
})=>{
|
|
6203
|
+
}, rawConfig)=>{
|
|
5651
6204
|
const Elist = UniPool2DanmakuLists(list), ErawList = UniPool2DanmakuLists(rawList);
|
|
5652
6205
|
const content = [
|
|
5653
6206
|
info(config, context),
|
|
5654
6207
|
style(config),
|
|
5655
6208
|
ass_event(Elist, config)
|
|
5656
6209
|
];
|
|
5657
|
-
if (config.includeRaw) content.push(
|
|
6210
|
+
if (config.includeRaw) content.push(raw_raw(ErawList, config, context, rawConfig?.compressType, rawConfig?.baseType));
|
|
5658
6211
|
return `${content.join('\n\n')}\n`;
|
|
5659
6212
|
};
|
|
5660
6213
|
const ass_gen_config = (overrides = {})=>{
|
|
@@ -5699,7 +6252,7 @@ function generateASS(danmaku, options) {
|
|
|
5699
6252
|
const content = ass_create(layoutList, danmaku, config, {
|
|
5700
6253
|
filename: options?.filename || 'unknown',
|
|
5701
6254
|
title: options?.title || 'unknown'
|
|
5702
|
-
});
|
|
6255
|
+
}, options.raw);
|
|
5703
6256
|
return content;
|
|
5704
6257
|
}
|
|
5705
6258
|
function parseAssRawField(ass) {
|
|
@@ -5707,42 +6260,167 @@ function parseAssRawField(ass) {
|
|
|
5707
6260
|
if (!raw) return UniPool.create();
|
|
5708
6261
|
return DanmakuList2UniPool(raw.list);
|
|
5709
6262
|
}
|
|
5710
|
-
const file_bili_dm = /*@__PURE__*/ fileDesc("Cg1iaWxpL2RtLnByb3RvEiBiaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MSJkCgZBdmF0YXISCgoCaWQYASABKAkSCwoDdXJsGAIgASgJEk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HBvUmVwb3J0UmVzYgZwcm90bzM");
|
|
5711
|
-
const DmSegMobileReplySchema = /*@__PURE__*/ message_messageDesc(file_bili_dm, 30);
|
|
5712
|
-
const DmWebViewReplySchema = /*@__PURE__*/ message_messageDesc(file_bili_dm, 39);
|
|
5713
|
-
const file_danuni = /*@__PURE__*/ fileDesc("CgxkYW51bmkucHJvdG8SEWRhbnVuaS5kYW5tYWt1LnYxIt4CCgdEYW5tYWt1EgwKBEZDSUQYASABKAkSDAoERE1JRBgCIAEoCRIQCghwcm9ncmVzcxgDIAEoBRIlCgRtb2RlGAQgASgOMhcuZGFudW5pLmRhbm1ha3UudjEuTW9kZRIQCghmb250c2l6ZRgFIAEoBRINCgVjb2xvchgGIAEoBRIQCghzZW5kZXJJRBgHIAEoCRIPCgdjb250ZW50GAggASgJEikKBWN0aW1lGAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIOCgZ3ZWlnaHQYCiABKAUSJQoEcG9vbBgLIAEoDjIXLmRhbnVuaS5kYW5tYWt1LnYxLlBvb2wSDAoEYXR0chgMIAMoCRIQCghwbGF0Zm9ybRgNIAEoCRIRCgRTUE1PGA4gASgJSACIAQESEgoFZXh0cmEYDyABKAlIAYgBAUIHCgVfU1BNT0IICgZfZXh0cmEiPAoMRGFubWFrdVJlcGx5EiwKCGRhbm1ha3VzGAEgAygLMhouZGFudW5pLmRhbm1ha3UudjEuRGFubWFrdSo9CgRNb2RlEgoKBk5vcm1hbBAAEgoKBkJvdHRvbRABEgcKA1RvcBACEgsKB1JldmVyc2UQAxIHCgNFeHQQBCopCgRQb29sEgcKA0RlZhAAEgcKA1N1YhABEgcKA0FkdhACEgYKAkl4EANQAGIGcHJvdG8z", [
|
|
5714
|
-
file_google_protobuf_timestamp
|
|
5715
|
-
]);
|
|
5716
|
-
const DanmakuReplySchema = /*@__PURE__*/ message_messageDesc(file_danuni, 1);
|
|
5717
|
-
class UniPool {
|
|
6263
|
+
class src_UniPool {
|
|
5718
6264
|
dans;
|
|
5719
|
-
|
|
5720
|
-
constructor(dans){
|
|
6265
|
+
options;
|
|
6266
|
+
constructor(dans, options = {}){
|
|
5721
6267
|
this.dans = dans;
|
|
5722
|
-
this.
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
6268
|
+
this.options = options;
|
|
6269
|
+
if (false !== options.dedupe) options.dedupe = true;
|
|
6270
|
+
if (this.options.dedupe) this.dedupe();
|
|
6271
|
+
}
|
|
6272
|
+
async pipe(fn) {
|
|
6273
|
+
return fn(this);
|
|
6274
|
+
}
|
|
6275
|
+
pipeSync(fn) {
|
|
6276
|
+
return fn(this);
|
|
6277
|
+
}
|
|
6278
|
+
get shared() {
|
|
6279
|
+
const isShared = (key)=>this.dans.every((d)=>d[key]);
|
|
6280
|
+
return {
|
|
6281
|
+
SOID: isShared('SOID') ? this.dans[0].SOID : void 0,
|
|
6282
|
+
senderID: isShared('senderID') ? this.dans[0].senderID : void 0,
|
|
6283
|
+
platform: isShared('platform') ? this.dans[0].platform : void 0,
|
|
6284
|
+
pool: isShared('pool') ? this.dans[0].pool : void 0,
|
|
6285
|
+
mode: isShared('mode') ? this.dans[0].mode : void 0,
|
|
6286
|
+
color: isShared('color') ? this.dans[0].color : void 0
|
|
6287
|
+
};
|
|
6288
|
+
}
|
|
6289
|
+
get stat() {
|
|
6290
|
+
const default_stat = {
|
|
6291
|
+
SOID: [],
|
|
6292
|
+
mode: [
|
|
6293
|
+
{
|
|
6294
|
+
val: dm_gen_Modes.Normal,
|
|
6295
|
+
count: 0
|
|
6296
|
+
},
|
|
6297
|
+
{
|
|
6298
|
+
val: dm_gen_Modes.Bottom,
|
|
6299
|
+
count: 0
|
|
6300
|
+
},
|
|
6301
|
+
{
|
|
6302
|
+
val: dm_gen_Modes.Top,
|
|
6303
|
+
count: 0
|
|
6304
|
+
},
|
|
6305
|
+
{
|
|
6306
|
+
val: dm_gen_Modes.Reverse,
|
|
6307
|
+
count: 0
|
|
6308
|
+
},
|
|
6309
|
+
{
|
|
6310
|
+
val: dm_gen_Modes.Ext,
|
|
6311
|
+
count: 0
|
|
6312
|
+
}
|
|
6313
|
+
],
|
|
6314
|
+
fontsize: [],
|
|
6315
|
+
color: [],
|
|
6316
|
+
senderID: [],
|
|
6317
|
+
content: [],
|
|
6318
|
+
weight: [],
|
|
6319
|
+
pool: [
|
|
6320
|
+
{
|
|
6321
|
+
val: dm_gen_Pools.Def,
|
|
6322
|
+
count: 0
|
|
6323
|
+
},
|
|
6324
|
+
{
|
|
6325
|
+
val: dm_gen_Pools.Sub,
|
|
6326
|
+
count: 0
|
|
6327
|
+
},
|
|
6328
|
+
{
|
|
6329
|
+
val: dm_gen_Pools.Adv,
|
|
6330
|
+
count: 0
|
|
6331
|
+
},
|
|
6332
|
+
{
|
|
6333
|
+
val: dm_gen_Pools.Ix,
|
|
6334
|
+
count: 0
|
|
6335
|
+
}
|
|
6336
|
+
],
|
|
6337
|
+
platform: []
|
|
6338
|
+
};
|
|
6339
|
+
const stat = this.dans.reduce((s, d)=>{
|
|
6340
|
+
const SOID = s.SOID.find((i)=>i.val === d.SOID);
|
|
6341
|
+
if (SOID) SOID.count++;
|
|
6342
|
+
else s.SOID.push({
|
|
6343
|
+
val: d.SOID,
|
|
6344
|
+
count: 1
|
|
6345
|
+
});
|
|
6346
|
+
const mode = s.mode.find((i)=>i.val === d.mode);
|
|
6347
|
+
if (mode) mode.count++;
|
|
6348
|
+
else s.mode.push({
|
|
6349
|
+
val: d.mode,
|
|
6350
|
+
count: 1
|
|
6351
|
+
});
|
|
6352
|
+
const fontsize = s.fontsize.find((i)=>i.val === d.fontsize);
|
|
6353
|
+
if (fontsize) fontsize.count++;
|
|
6354
|
+
else s.fontsize.push({
|
|
6355
|
+
val: d.fontsize,
|
|
6356
|
+
count: 1
|
|
6357
|
+
});
|
|
6358
|
+
const color = s.color.find((i)=>i.val === d.color);
|
|
6359
|
+
if (color) color.count++;
|
|
6360
|
+
else s.color.push({
|
|
6361
|
+
val: d.color,
|
|
6362
|
+
count: 1
|
|
6363
|
+
});
|
|
6364
|
+
const senderID = s.senderID.find((i)=>i.val === d.senderID);
|
|
6365
|
+
if (senderID) senderID.count++;
|
|
6366
|
+
else s.senderID.push({
|
|
6367
|
+
val: d.senderID,
|
|
6368
|
+
count: 1
|
|
6369
|
+
});
|
|
6370
|
+
const content = s.content.find((i)=>i.val === d.content);
|
|
6371
|
+
if (content) content.count++;
|
|
6372
|
+
else s.content.push({
|
|
6373
|
+
val: d.content,
|
|
6374
|
+
count: 1
|
|
6375
|
+
});
|
|
6376
|
+
const weight = s.weight.find((i)=>i.val === d.weight);
|
|
6377
|
+
if (weight) weight.count++;
|
|
6378
|
+
else s.weight.push({
|
|
6379
|
+
val: d.weight,
|
|
6380
|
+
count: 1
|
|
6381
|
+
});
|
|
6382
|
+
const pool = s.pool.find((i)=>i.val === d.pool);
|
|
6383
|
+
if (pool) pool.count++;
|
|
6384
|
+
else s.pool.push({
|
|
6385
|
+
val: d.pool,
|
|
6386
|
+
count: 1
|
|
6387
|
+
});
|
|
6388
|
+
const platform = s.platform.find((i)=>i.val === d.platform);
|
|
6389
|
+
if (platform) platform.count++;
|
|
6390
|
+
else s.platform.push({
|
|
6391
|
+
val: d.platform,
|
|
6392
|
+
count: 1
|
|
6393
|
+
});
|
|
6394
|
+
return s;
|
|
6395
|
+
}, default_stat);
|
|
6396
|
+
return stat;
|
|
6397
|
+
}
|
|
6398
|
+
get most() {
|
|
6399
|
+
const s = this.stat;
|
|
6400
|
+
return {
|
|
6401
|
+
mode: s.mode.sort((a, b)=>b.count - a.count)[0].val,
|
|
6402
|
+
fontsize: s.fontsize.sort((a, b)=>b.count - a.count)[0].val,
|
|
6403
|
+
color: s.color.sort((a, b)=>b.count - a.count)[0].val,
|
|
6404
|
+
senderID: s.senderID.sort((a, b)=>b.count - a.count)[0].val,
|
|
6405
|
+
content: s.content.sort((a, b)=>b.count - a.count)[0].val,
|
|
6406
|
+
weight: s.weight.sort((a, b)=>b.count - a.count)[0].val,
|
|
6407
|
+
pool: s.pool.sort((a, b)=>b.count - a.count)[0].val,
|
|
6408
|
+
platform: s.platform.sort((a, b)=>b.count - a.count)[0].val
|
|
6409
|
+
};
|
|
5732
6410
|
}
|
|
5733
6411
|
static create() {
|
|
5734
|
-
return new
|
|
6412
|
+
return new src_UniPool([]);
|
|
5735
6413
|
}
|
|
5736
6414
|
assign(dans) {
|
|
5737
|
-
if (dans instanceof
|
|
6415
|
+
if (dans instanceof src_UniPool) return new src_UniPool([
|
|
5738
6416
|
...this.dans,
|
|
5739
6417
|
...dans.dans
|
|
5740
6418
|
]);
|
|
5741
|
-
if (dans instanceof UniDM) return new
|
|
6419
|
+
if (dans instanceof UniDM) return new src_UniPool([
|
|
5742
6420
|
...this.dans,
|
|
5743
6421
|
dans
|
|
5744
6422
|
]);
|
|
5745
|
-
if (Array.isArray(dans) && dans.every((d)=>d instanceof UniDM)) return new
|
|
6423
|
+
if (Array.isArray(dans) && dans.every((d)=>d instanceof UniDM)) return new src_UniPool([
|
|
5746
6424
|
...this.dans,
|
|
5747
6425
|
...dans
|
|
5748
6426
|
]);
|
|
@@ -5755,21 +6433,31 @@ class UniPool {
|
|
|
5755
6433
|
const set = new Set(this.dans.map((d)=>d[key]));
|
|
5756
6434
|
return [
|
|
5757
6435
|
...set
|
|
5758
|
-
].map((v)=>new
|
|
6436
|
+
].map((v)=>new src_UniPool(this.dans.filter((d)=>d[key] === v), {
|
|
6437
|
+
dedupe: false
|
|
6438
|
+
}));
|
|
6439
|
+
}
|
|
6440
|
+
dedupe() {
|
|
6441
|
+
const map = new Map();
|
|
6442
|
+
this.dans.forEach((d)=>map.set(d.DMID || d.toDMID(), d));
|
|
6443
|
+
this.dans = [
|
|
6444
|
+
...map.values()
|
|
6445
|
+
];
|
|
6446
|
+
this.options.dedupe = false;
|
|
5759
6447
|
}
|
|
5760
6448
|
merge(lifetime = 0) {
|
|
5761
|
-
if (!this.shared.
|
|
5762
|
-
console.error("
|
|
6449
|
+
if (!this.shared.SOID) {
|
|
6450
|
+
console.error("\u672C\u529F\u80FD\u4EC5\u652F\u6301\u540C\u5F39\u5E55\u5E93\u5185\u4F7F\u7528\uFF0C\u53EF\u5148 .split('SOID') \u5728\u5206\u522B\u4F7F\u7528");
|
|
5763
6451
|
return this;
|
|
5764
6452
|
}
|
|
5765
6453
|
if (lifetime <= 0) return this;
|
|
5766
6454
|
const mergeContext = this.dans.reduce(([result, cache, mergeObj], danmaku)=>{
|
|
5767
6455
|
const key = [
|
|
6456
|
+
'SOID',
|
|
5768
6457
|
'content',
|
|
5769
6458
|
'mode',
|
|
5770
6459
|
'platform',
|
|
5771
|
-
'pool'
|
|
5772
|
-
'SPMO'
|
|
6460
|
+
'pool'
|
|
5773
6461
|
].map((k)=>danmaku[k]).join('|');
|
|
5774
6462
|
const cached = cache[key];
|
|
5775
6463
|
const lastAppearTime = cached?.progress || 0;
|
|
@@ -5781,7 +6469,9 @@ class UniPool {
|
|
|
5781
6469
|
extra.danuni.merge = {
|
|
5782
6470
|
count: senders.length,
|
|
5783
6471
|
duration: danmaku.progress - cached.progress,
|
|
5784
|
-
senders
|
|
6472
|
+
senders,
|
|
6473
|
+
taolu_count: senders.length,
|
|
6474
|
+
taolu_senders: senders
|
|
5785
6475
|
};
|
|
5786
6476
|
danmaku.extraStr = JSON.stringify(extra);
|
|
5787
6477
|
cache[key] = danmaku;
|
|
@@ -5798,6 +6488,10 @@ class UniPool {
|
|
|
5798
6488
|
duration: 0,
|
|
5799
6489
|
senders: [
|
|
5800
6490
|
danmaku.senderID
|
|
6491
|
+
],
|
|
6492
|
+
taolu_count: 1,
|
|
6493
|
+
taolu_senders: [
|
|
6494
|
+
danmaku.senderID
|
|
5801
6495
|
]
|
|
5802
6496
|
};
|
|
5803
6497
|
cache[key] = danmaku;
|
|
@@ -5820,11 +6514,11 @@ class UniPool {
|
|
|
5820
6514
|
const [result, _cache, mergeObj] = mergeContext;
|
|
5821
6515
|
result.forEach((danmaku, i)=>{
|
|
5822
6516
|
const key = [
|
|
6517
|
+
'SOID',
|
|
5823
6518
|
'content',
|
|
5824
6519
|
'mode',
|
|
5825
6520
|
'platform',
|
|
5826
|
-
'pool'
|
|
5827
|
-
'SPMO'
|
|
6521
|
+
'pool'
|
|
5828
6522
|
].map((k)=>danmaku[k]).join('|');
|
|
5829
6523
|
const extra = result[i].extra, mergeData = mergeObj[key];
|
|
5830
6524
|
result[i].extraStr = JSON.stringify({
|
|
@@ -5834,20 +6528,23 @@ class UniPool {
|
|
|
5834
6528
|
merge: mergeData
|
|
5835
6529
|
}
|
|
5836
6530
|
});
|
|
5837
|
-
if (mergeData?.count) {
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
6531
|
+
if (mergeData?.count) if (mergeData.count <= 1) {
|
|
6532
|
+
const updatedExtra = {
|
|
6533
|
+
...extra
|
|
6534
|
+
};
|
|
6535
|
+
if (updatedExtra.danuni) {
|
|
6536
|
+
delete updatedExtra.danuni.merge;
|
|
6537
|
+
if (0 === Object.keys(updatedExtra.danuni).length) delete updatedExtra.danuni;
|
|
6538
|
+
}
|
|
6539
|
+
result[i].extraStr = Object.keys(updatedExtra).length > 0 ? JSON.stringify(updatedExtra) : void 0;
|
|
6540
|
+
} else {
|
|
6541
|
+
result[i].senderID = 'merge[bot]@dan-any';
|
|
6542
|
+
result[i].attr ? result[i].attr.push('Protect') : result[i].attr = [
|
|
6543
|
+
'Protect'
|
|
6544
|
+
];
|
|
5848
6545
|
}
|
|
5849
6546
|
});
|
|
5850
|
-
return new
|
|
6547
|
+
return new src_UniPool(result);
|
|
5851
6548
|
}
|
|
5852
6549
|
minify() {
|
|
5853
6550
|
return this.dans.map((d)=>d.minify());
|
|
@@ -5876,12 +6573,12 @@ class UniPool {
|
|
|
5876
6573
|
}
|
|
5877
6574
|
static fromPb(bin) {
|
|
5878
6575
|
const data = fromBinary(DanmakuReplySchema, new Uint8Array(bin));
|
|
5879
|
-
return new
|
|
6576
|
+
return new src_UniPool(data.danmakus.map((d)=>new UniDM(d.SOID, d.progress, d.mode, d.fontsize, d.color, d.senderID, d.content, timestampDate(d.ctime || timestampNow()), d.weight, d.pool, d.attr, d.platform, d.extra, d.DMID)));
|
|
5880
6577
|
}
|
|
5881
6578
|
toPb() {
|
|
5882
6579
|
return toBinary(DanmakuReplySchema, create(DanmakuReplySchema, {
|
|
5883
6580
|
danmakus: this.dans.map((d)=>({
|
|
5884
|
-
|
|
6581
|
+
SOID: d.SOID,
|
|
5885
6582
|
DMID: d.DMID,
|
|
5886
6583
|
progress: d.progress,
|
|
5887
6584
|
mode: d.mode,
|
|
@@ -5894,16 +6591,15 @@ class UniPool {
|
|
|
5894
6591
|
pool: d.pool,
|
|
5895
6592
|
attr: d.attr,
|
|
5896
6593
|
platform: d.platform,
|
|
5897
|
-
SPMO: d.SPMO,
|
|
5898
6594
|
extra: d.extraStr
|
|
5899
6595
|
}))
|
|
5900
6596
|
}));
|
|
5901
6597
|
}
|
|
5902
|
-
static fromBiliXML(xml
|
|
5903
|
-
const parser = new
|
|
6598
|
+
static fromBiliXML(xml) {
|
|
6599
|
+
const parser = new XMLParser({
|
|
5904
6600
|
ignoreAttributes: false
|
|
5905
6601
|
}), oriData = parser.parse(xml), dans = oriData.i.d;
|
|
5906
|
-
return new
|
|
6602
|
+
return new src_UniPool(dans.map((d)=>{
|
|
5907
6603
|
const p_str = d['@_p'], p_arr = p_str.split(',');
|
|
5908
6604
|
return UniDM.fromBili({
|
|
5909
6605
|
content: d['#text'],
|
|
@@ -5916,19 +6612,22 @@ class UniPool {
|
|
|
5916
6612
|
midHash: p_arr[6],
|
|
5917
6613
|
id: BigInt(p_arr[7]),
|
|
5918
6614
|
weight: Number.parseInt(p_arr[8])
|
|
5919
|
-
},
|
|
6615
|
+
}, BigInt(oriData.i.chatid));
|
|
5920
6616
|
}));
|
|
5921
6617
|
}
|
|
5922
|
-
static fromBiliGrpc(bin
|
|
6618
|
+
static fromBiliGrpc(bin) {
|
|
5923
6619
|
const data = fromBinary(DmSegMobileReplySchema, new Uint8Array(bin)), json = data.elems;
|
|
5924
|
-
return new
|
|
6620
|
+
return new src_UniPool(json.map((d)=>UniDM.fromBili({
|
|
6621
|
+
...d,
|
|
6622
|
+
progress: d.progress / 1000
|
|
6623
|
+
})));
|
|
5925
6624
|
}
|
|
5926
|
-
static fromBiliCommandGrpc(bin
|
|
6625
|
+
static fromBiliCommandGrpc(bin) {
|
|
5927
6626
|
const data = fromBinary(DmWebViewReplySchema, new Uint8Array(bin)), json = data.commandDms;
|
|
5928
|
-
return new
|
|
6627
|
+
return new src_UniPool(json.map((d)=>UniDM.fromBiliCommand(d)));
|
|
5929
6628
|
}
|
|
5930
6629
|
static fromDplayer(json, playerID, domain = 'other') {
|
|
5931
|
-
return new
|
|
6630
|
+
return new src_UniPool(json.data.map((d)=>UniDM.fromDplayer({
|
|
5932
6631
|
content: d[4],
|
|
5933
6632
|
progress: d[0],
|
|
5934
6633
|
mode: d[1],
|
|
@@ -5952,7 +6651,7 @@ class UniPool {
|
|
|
5952
6651
|
};
|
|
5953
6652
|
}
|
|
5954
6653
|
static fromArtplayer(json, playerID, domain = 'other') {
|
|
5955
|
-
return new
|
|
6654
|
+
return new src_UniPool(json.map((d)=>UniDM.fromArtplayer({
|
|
5956
6655
|
content: d.text,
|
|
5957
6656
|
progress: d.time || 0,
|
|
5958
6657
|
mode: d.mode || 0,
|
|
@@ -5973,8 +6672,8 @@ class UniPool {
|
|
|
5973
6672
|
};
|
|
5974
6673
|
});
|
|
5975
6674
|
}
|
|
5976
|
-
static fromDDPlay(json, episodeId
|
|
5977
|
-
return new
|
|
6675
|
+
static fromDDPlay(json, episodeId) {
|
|
6676
|
+
return new src_UniPool(json.comments.map((d)=>{
|
|
5978
6677
|
const p_arr = d.p.split(',');
|
|
5979
6678
|
return UniDM.fromDDplay({
|
|
5980
6679
|
cid: d.cid,
|
|
@@ -5983,7 +6682,7 @@ class UniPool {
|
|
|
5983
6682
|
mode: Number.parseInt(p_arr[1]),
|
|
5984
6683
|
progress: Number.parseFloat(p_arr[0]),
|
|
5985
6684
|
uid: p_arr[3]
|
|
5986
|
-
}, episodeId
|
|
6685
|
+
}, episodeId);
|
|
5987
6686
|
}));
|
|
5988
6687
|
}
|
|
5989
6688
|
toDDplay() {
|
|
@@ -6005,7 +6704,7 @@ class UniPool {
|
|
|
6005
6704
|
toASS(options = {
|
|
6006
6705
|
substyle: {}
|
|
6007
6706
|
}) {
|
|
6008
|
-
const fn = this.shared.
|
|
6707
|
+
const fn = this.shared.SOID;
|
|
6009
6708
|
return generateASS(this, {
|
|
6010
6709
|
filename: fn,
|
|
6011
6710
|
title: fn,
|
|
@@ -6013,4 +6712,4 @@ class UniPool {
|
|
|
6013
6712
|
});
|
|
6014
6713
|
}
|
|
6015
6714
|
}
|
|
6016
|
-
export { UniDM, dm_gen_namespaceObject as UniDMTools, id_gen_namespaceObject as UniIDTools, UniPool };
|
|
6715
|
+
export { UniDM, dm_gen_namespaceObject as UniDMTools, id_gen_namespaceObject as UniIDTools, src_UniPool as UniPool, platform_namespaceObject as platform };
|