@dan-uni/dan-any 1.0.1 → 1.2.2

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.
Files changed (126) hide show
  1. package/dist/browser/157.min.js +30 -0
  2. package/dist/{index.min.js → browser/17.min.js} +14 -8
  3. package/dist/browser/898.min.js +10 -0
  4. package/dist/browser/index.min.js +1 -0
  5. package/dist/browser/plugins/bili-dedupe.min.js +1 -0
  6. package/dist/browser/plugins/index.min.js +2 -0
  7. package/dist/browser/plugins/stats.min.js +1 -0
  8. package/dist/{src → browser/src}/index.d.ts +4 -4
  9. package/dist/browser/src/plugins/bili-dedupe/index.d.ts +3 -0
  10. package/dist/browser/src/plugins/index.d.ts +2 -0
  11. package/dist/browser/src/plugins/stats/getLatestDan.d.ts +6 -0
  12. package/dist/browser/src/plugins/stats/index.d.ts +1 -0
  13. package/dist/browser/src/plugins/stats/index.test.d.ts +1 -0
  14. package/dist/browser/src/utils/dm-gen.test.d.ts +1 -0
  15. package/dist/node/157.js +30 -0
  16. package/dist/{index.js → node/17.js} +2 -2
  17. package/dist/node/898.js +10 -0
  18. package/dist/node/index.js +1 -0
  19. package/dist/node/plugins/bili-dedupe.js +1 -0
  20. package/dist/node/plugins/index.js +2 -0
  21. package/dist/node/plugins/stats.js +1 -0
  22. package/dist/node/src/ass-gen/__tests__/canvas.test.d.ts +1 -0
  23. package/dist/node/src/ass-gen/__tests__/generate.test.d.ts +1 -0
  24. package/dist/node/src/ass-gen/ass/create.d.ts +4 -0
  25. package/dist/node/src/ass-gen/ass/dialogue.d.ts +16 -0
  26. package/dist/node/src/ass-gen/ass/event.d.ts +2 -0
  27. package/dist/node/src/ass-gen/ass/info.d.ts +8 -0
  28. package/dist/node/src/ass-gen/ass/raw.d.ts +14 -0
  29. package/dist/node/src/ass-gen/ass/style.d.ts +2 -0
  30. package/dist/node/src/ass-gen/config.d.ts +2 -0
  31. package/dist/node/src/ass-gen/index.d.ts +30 -0
  32. package/dist/node/src/ass-gen/types.d.ts +71 -0
  33. package/dist/node/src/ass-gen/util/color.d.ts +18 -0
  34. package/dist/node/src/ass-gen/util/danconvert.d.ts +5 -0
  35. package/dist/node/src/ass-gen/util/index.d.ts +4 -0
  36. package/dist/node/src/ass-gen/util/lang.d.ts +3 -0
  37. package/dist/node/src/ass-gen/util/layout.d.ts +4 -0
  38. package/dist/node/src/index.d.ts +255 -0
  39. package/dist/node/src/index.test.d.ts +1 -0
  40. package/dist/node/src/plugins/bili-dedupe/index.d.ts +3 -0
  41. package/dist/node/src/plugins/bili-dedupe/index.test.d.ts +1 -0
  42. package/dist/node/src/plugins/index.d.ts +2 -0
  43. package/dist/node/src/plugins/stats/getLatestDan.d.ts +6 -0
  44. package/dist/node/src/plugins/stats/index.d.ts +1 -0
  45. package/dist/node/src/plugins/stats/index.test.d.ts +1 -0
  46. package/dist/node/src/proto/gen/bili/dm_pb.d.ts +3426 -0
  47. package/dist/node/src/proto/gen/danuni_pb.d.ts +172 -0
  48. package/dist/node/src/utils/dm-gen.d.ts +309 -0
  49. package/dist/node/src/utils/dm-gen.test.d.ts +1 -0
  50. package/dist/node/src/utils/id-gen.d.ts +50 -0
  51. package/dist/node/src/utils/platform.d.ts +24 -0
  52. package/dist/{index.umd.min.js → umd/index.umd.min.js} +76 -67
  53. package/dist/umd/plugins/bili-dedupe.umd.min.js +25028 -0
  54. package/dist/umd/plugins/bili-dedupe.umd.min.js.LICENSE.txt +34 -0
  55. package/dist/umd/plugins/index.umd.min.js +25048 -0
  56. package/dist/umd/plugins/index.umd.min.js.LICENSE.txt +34 -0
  57. package/dist/umd/plugins/stats.umd.min.js +39 -0
  58. package/dist/umd/src/ass-gen/__tests__/canvas.test.d.ts +1 -0
  59. package/dist/umd/src/ass-gen/__tests__/generate.test.d.ts +1 -0
  60. package/dist/umd/src/ass-gen/ass/create.d.ts +4 -0
  61. package/dist/umd/src/ass-gen/ass/dialogue.d.ts +16 -0
  62. package/dist/umd/src/ass-gen/ass/event.d.ts +2 -0
  63. package/dist/umd/src/ass-gen/ass/info.d.ts +8 -0
  64. package/dist/umd/src/ass-gen/ass/raw.d.ts +14 -0
  65. package/dist/umd/src/ass-gen/ass/style.d.ts +2 -0
  66. package/dist/umd/src/ass-gen/config.d.ts +2 -0
  67. package/dist/umd/src/ass-gen/index.d.ts +30 -0
  68. package/dist/umd/src/ass-gen/types.d.ts +71 -0
  69. package/dist/umd/src/ass-gen/util/color.d.ts +18 -0
  70. package/dist/umd/src/ass-gen/util/danconvert.d.ts +5 -0
  71. package/dist/umd/src/ass-gen/util/index.d.ts +4 -0
  72. package/dist/umd/src/ass-gen/util/lang.d.ts +3 -0
  73. package/dist/umd/src/ass-gen/util/layout.d.ts +4 -0
  74. package/dist/umd/src/index.d.ts +255 -0
  75. package/dist/umd/src/index.test.d.ts +1 -0
  76. package/dist/umd/src/plugins/bili-dedupe/index.d.ts +3 -0
  77. package/dist/umd/src/plugins/bili-dedupe/index.test.d.ts +1 -0
  78. package/dist/umd/src/plugins/index.d.ts +2 -0
  79. package/dist/umd/src/plugins/stats/getLatestDan.d.ts +6 -0
  80. package/dist/umd/src/plugins/stats/index.d.ts +1 -0
  81. package/dist/umd/src/plugins/stats/index.test.d.ts +1 -0
  82. package/dist/umd/src/proto/gen/bili/dm_pb.d.ts +3426 -0
  83. package/dist/umd/src/proto/gen/danuni_pb.d.ts +172 -0
  84. package/dist/umd/src/utils/dm-gen.d.ts +309 -0
  85. package/dist/umd/src/utils/dm-gen.test.d.ts +1 -0
  86. package/dist/umd/src/utils/id-gen.d.ts +50 -0
  87. package/dist/umd/src/utils/platform.d.ts +24 -0
  88. package/package.json +8 -8
  89. package/plugins/package.json +6 -0
  90. package/rslib.config.ts +11 -0
  91. package/src/index.ts +8 -4
  92. package/src/plugins/bili-dedupe/index.test.ts +43 -0
  93. package/src/plugins/bili-dedupe/index.ts +29 -0
  94. package/src/plugins/index.ts +2 -0
  95. package/src/plugins/stats/getLatestDan.ts +13 -0
  96. package/src/plugins/stats/index.test.ts +39 -0
  97. package/src/plugins/stats/index.ts +1 -0
  98. package/src/proto/gen/bili/dm_pb.ts +1 -1
  99. package/src/proto/gen/danuni_pb.ts +1 -1
  100. /package/dist/{index.min.js.LICENSE.txt → browser/17.min.js.LICENSE.txt} +0 -0
  101. /package/dist/{rslib-runtime.min.js → browser/rslib-runtime.min.js} +0 -0
  102. /package/dist/{src → browser/src}/ass-gen/__tests__/canvas.test.d.ts +0 -0
  103. /package/dist/{src → browser/src}/ass-gen/__tests__/generate.test.d.ts +0 -0
  104. /package/dist/{src → browser/src}/ass-gen/ass/create.d.ts +0 -0
  105. /package/dist/{src → browser/src}/ass-gen/ass/dialogue.d.ts +0 -0
  106. /package/dist/{src → browser/src}/ass-gen/ass/event.d.ts +0 -0
  107. /package/dist/{src → browser/src}/ass-gen/ass/info.d.ts +0 -0
  108. /package/dist/{src → browser/src}/ass-gen/ass/raw.d.ts +0 -0
  109. /package/dist/{src → browser/src}/ass-gen/ass/style.d.ts +0 -0
  110. /package/dist/{src → browser/src}/ass-gen/config.d.ts +0 -0
  111. /package/dist/{src → browser/src}/ass-gen/index.d.ts +0 -0
  112. /package/dist/{src → browser/src}/ass-gen/types.d.ts +0 -0
  113. /package/dist/{src → browser/src}/ass-gen/util/color.d.ts +0 -0
  114. /package/dist/{src → browser/src}/ass-gen/util/danconvert.d.ts +0 -0
  115. /package/dist/{src → browser/src}/ass-gen/util/index.d.ts +0 -0
  116. /package/dist/{src → browser/src}/ass-gen/util/lang.d.ts +0 -0
  117. /package/dist/{src → browser/src}/ass-gen/util/layout.d.ts +0 -0
  118. /package/dist/{src → browser/src}/index.test.d.ts +0 -0
  119. /package/dist/{src/utils/dm-gen.test.d.ts → browser/src/plugins/bili-dedupe/index.test.d.ts} +0 -0
  120. /package/dist/{src → browser/src}/proto/gen/bili/dm_pb.d.ts +0 -0
  121. /package/dist/{src → browser/src}/proto/gen/danuni_pb.d.ts +0 -0
  122. /package/dist/{src → browser/src}/utils/dm-gen.d.ts +0 -0
  123. /package/dist/{src → browser/src}/utils/id-gen.d.ts +0 -0
  124. /package/dist/{src → browser/src}/utils/platform.d.ts +0 -0
  125. /package/dist/{rslib-runtime.js → node/rslib-runtime.js} +0 -0
  126. /package/dist/{index.umd.min.js.LICENSE.txt → umd/index.umd.min.js.LICENSE.txt} +0 -0
@@ -6218,7 +6218,7 @@
6218
6218
  },
6219
6219
  "../../node_modules/.pnpm/is-typed-array@1.1.15/node_modules/is-typed-array/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
6220
6220
  "use strict";
6221
- var whichTypedArray = __webpack_require__("../../node_modules/.pnpm/which-typed-array@1.1.19/node_modules/which-typed-array/index.js");
6221
+ var whichTypedArray = __webpack_require__("../../node_modules/.pnpm/which-typed-array@1.1.20/node_modules/which-typed-array/index.js");
6222
6222
  module1.exports = function(value) {
6223
6223
  return !!whichTypedArray(value);
6224
6224
  };
@@ -12487,7 +12487,7 @@
12487
12487
  "use strict";
12488
12488
  var isArgumentsObject = __webpack_require__("../../node_modules/.pnpm/is-arguments@1.2.0/node_modules/is-arguments/index.js");
12489
12489
  var isGeneratorFunction = __webpack_require__("../../node_modules/.pnpm/is-generator-function@1.1.2/node_modules/is-generator-function/index.js");
12490
- var whichTypedArray = __webpack_require__("../../node_modules/.pnpm/which-typed-array@1.1.19/node_modules/which-typed-array/index.js");
12490
+ var whichTypedArray = __webpack_require__("../../node_modules/.pnpm/which-typed-array@1.1.20/node_modules/which-typed-array/index.js");
12491
12491
  var isTypedArray = __webpack_require__("../../node_modules/.pnpm/is-typed-array@1.1.15/node_modules/is-typed-array/index.js");
12492
12492
  function uncurryThis(f) {
12493
12493
  return f.call.bind(f);
@@ -13486,7 +13486,7 @@
13486
13486
  module1.exports = exports1["default"];
13487
13487
  module1.exports["default"] = exports1["default"];
13488
13488
  },
13489
- "../../node_modules/.pnpm/which-typed-array@1.1.19/node_modules/which-typed-array/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
13489
+ "../../node_modules/.pnpm/which-typed-array@1.1.20/node_modules/which-typed-array/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
13490
13490
  "use strict";
13491
13491
  var forEach = __webpack_require__("../../node_modules/.pnpm/for-each@0.3.5/node_modules/for-each/index.js");
13492
13492
  var availableTypedArrays = __webpack_require__("../../node_modules/.pnpm/available-typed-arrays@1.0.7/node_modules/available-typed-arrays/index.js");
@@ -13515,12 +13515,18 @@
13515
13515
  var superProto = getProto(proto);
13516
13516
  descriptor = gOPD(superProto, Symbol.toStringTag);
13517
13517
  }
13518
- cache['$' + typedArray] = callBind(descriptor.get);
13518
+ if (descriptor && descriptor.get) {
13519
+ var bound = callBind(descriptor.get);
13520
+ cache['$' + typedArray] = bound;
13521
+ }
13519
13522
  }
13520
13523
  }) : forEach(typedArrays, function(typedArray) {
13521
13524
  var arr = new g[typedArray]();
13522
13525
  var fn = arr.slice || arr.set;
13523
- if (fn) cache['$' + typedArray] = callBind(fn);
13526
+ if (fn) {
13527
+ var bound = callBind(fn);
13528
+ cache['$' + typedArray] = bound;
13529
+ }
13524
13530
  });
13525
13531
  var tryTypedArrays = function(value) {
13526
13532
  var found = false;
@@ -13564,6 +13570,51 @@
13564
13570
  return number + '';
13565
13571
  };
13566
13572
  },
13573
+ "./src/utils/platform.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
13574
+ "use strict";
13575
+ __webpack_require__.r(__webpack_exports__);
13576
+ __webpack_require__.d(__webpack_exports__, {
13577
+ PlatformDanmakuOnlySource: ()=>PlatformDanmakuOnlySource,
13578
+ PlatformDanmakuOnlySources: ()=>PlatformDanmakuOnlySources,
13579
+ PlatformDanmakuSources: ()=>PlatformDanmakuSources,
13580
+ PlatformInfoSource: ()=>PlatformInfoSource,
13581
+ PlatformInfoSources: ()=>PlatformInfoSources,
13582
+ PlatformSources: ()=>PlatformSources,
13583
+ PlatformVideoSource: ()=>PlatformVideoSource,
13584
+ PlatformVideoSources: ()=>PlatformVideoSources
13585
+ });
13586
+ var PlatformInfoSource = /*#__PURE__*/ function(PlatformInfoSource) {
13587
+ PlatformInfoSource["Bangumi"] = "bgm";
13588
+ PlatformInfoSource["TMDB"] = "tmdb";
13589
+ return PlatformInfoSource;
13590
+ }({});
13591
+ const PlatformInfoSources = Object.values(PlatformInfoSource);
13592
+ var PlatformVideoSource = /*#__PURE__*/ function(PlatformVideoSource) {
13593
+ PlatformVideoSource["Acfun"] = "acfun";
13594
+ PlatformVideoSource["Baha"] = "baha";
13595
+ PlatformVideoSource["Bilibili"] = "bili";
13596
+ PlatformVideoSource["BilibiliGlobal"] = "bglobal";
13597
+ PlatformVideoSource["Iqiyi"] = "iqiyi";
13598
+ PlatformVideoSource["Tencent"] = "tencent";
13599
+ PlatformVideoSource["Youku"] = "youku";
13600
+ return PlatformVideoSource;
13601
+ }({});
13602
+ const PlatformVideoSources = Object.values(PlatformVideoSource);
13603
+ var PlatformDanmakuOnlySource = /*#__PURE__*/ function(PlatformDanmakuOnlySource) {
13604
+ PlatformDanmakuOnlySource["DanDanPlay"] = "ddplay";
13605
+ PlatformDanmakuOnlySource["TuCao"] = "tucao";
13606
+ return PlatformDanmakuOnlySource;
13607
+ }({});
13608
+ const PlatformDanmakuOnlySources = Object.values(PlatformDanmakuOnlySource);
13609
+ const PlatformDanmakuSources = [
13610
+ ...PlatformVideoSources,
13611
+ ...PlatformDanmakuOnlySources
13612
+ ];
13613
+ const PlatformSources = [
13614
+ ...PlatformInfoSources,
13615
+ ...PlatformDanmakuSources
13616
+ ];
13617
+ },
13567
13618
  "?c028" () {},
13568
13619
  "?8beb" () {},
13569
13620
  "../../node_modules/.pnpm/available-typed-arrays@1.0.7/node_modules/available-typed-arrays/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
@@ -14211,24 +14262,12 @@ and limitations under the License.
14211
14262
  "use strict";
14212
14263
  __webpack_require__.r(__webpack_exports__);
14213
14264
  __webpack_require__.d(__webpack_exports__, {
14214
- platform: ()=>platform_namespaceObject,
14265
+ platform: ()=>platform,
14215
14266
  UniDM: ()=>UniDM,
14216
14267
  UniDMTools: ()=>dm_gen_namespaceObject,
14217
14268
  UniPool: ()=>UniPool,
14218
14269
  UniIDTools: ()=>id_gen_namespaceObject
14219
14270
  });
14220
- var platform_namespaceObject = {};
14221
- __webpack_require__.r(platform_namespaceObject);
14222
- __webpack_require__.d(platform_namespaceObject, {
14223
- PlatformDanmakuOnlySource: ()=>platform_PlatformDanmakuOnlySource,
14224
- PlatformDanmakuOnlySources: ()=>PlatformDanmakuOnlySources,
14225
- PlatformDanmakuSources: ()=>PlatformDanmakuSources,
14226
- PlatformInfoSource: ()=>platform_PlatformInfoSource,
14227
- PlatformInfoSources: ()=>PlatformInfoSources,
14228
- PlatformSources: ()=>PlatformSources,
14229
- PlatformVideoSource: ()=>platform_PlatformVideoSource,
14230
- PlatformVideoSources: ()=>PlatformVideoSources
14231
- });
14232
14271
  var id_gen_namespaceObject = {};
14233
14272
  __webpack_require__.r(id_gen_namespaceObject);
14234
14273
  __webpack_require__.d(id_gen_namespaceObject, {
@@ -21004,7 +21043,7 @@ and limitations under the License.
21004
21043
  function timestamp_timestampMs(timestamp) {
21005
21044
  return 1000 * Number(timestamp.seconds) + Math.round(timestamp.nanos / 1000000);
21006
21045
  }
21007
- var package_namespaceObject = JSON.parse('{"UU":"@dan-uni/dan-any","rE":"1.0.1","TB":"https://github.com/ani-uni/danuni/tree/master/packages/dan-any#readme"}');
21046
+ var package_namespaceObject = JSON.parse('{"UU":"@dan-uni/dan-any","rE":"1.2.2","TB":"https://github.com/ani-uni/danuni/tree/master/packages/dan-any#readme"}');
21008
21047
  const color_pad = (s)=>s.length < 2 ? `0${s}` : s;
21009
21048
  const decimalToHex = (n)=>color_pad(n.toString(16));
21010
21049
  const isDarkColor = ({ r, g, b })=>0.299 * r + 0.587 * g + 0.114 * b < 0x30;
@@ -23241,37 +23280,7 @@ and limitations under the License.
23241
23280
  return this.P.getHMAC(t, n);
23242
23281
  }
23243
23282
  }
23244
- var platform_PlatformInfoSource = /*#__PURE__*/ function(PlatformInfoSource) {
23245
- PlatformInfoSource["Bangumi"] = "bgm";
23246
- PlatformInfoSource["TMDB"] = "tmdb";
23247
- return PlatformInfoSource;
23248
- }({});
23249
- const PlatformInfoSources = Object.values(platform_PlatformInfoSource);
23250
- var platform_PlatformVideoSource = /*#__PURE__*/ function(PlatformVideoSource) {
23251
- PlatformVideoSource["Acfun"] = "acfun";
23252
- PlatformVideoSource["Baha"] = "baha";
23253
- PlatformVideoSource["Bilibili"] = "bili";
23254
- PlatformVideoSource["BilibiliGlobal"] = "bglobal";
23255
- PlatformVideoSource["Iqiyi"] = "iqiyi";
23256
- PlatformVideoSource["Tencent"] = "tencent";
23257
- PlatformVideoSource["Youku"] = "youku";
23258
- return PlatformVideoSource;
23259
- }({});
23260
- const PlatformVideoSources = Object.values(platform_PlatformVideoSource);
23261
- var platform_PlatformDanmakuOnlySource = /*#__PURE__*/ function(PlatformDanmakuOnlySource) {
23262
- PlatformDanmakuOnlySource["DanDanPlay"] = "ddplay";
23263
- PlatformDanmakuOnlySource["TuCao"] = "tucao";
23264
- return PlatformDanmakuOnlySource;
23265
- }({});
23266
- const PlatformDanmakuOnlySources = Object.values(platform_PlatformDanmakuOnlySource);
23267
- const PlatformDanmakuSources = [
23268
- ...PlatformVideoSources,
23269
- ...PlatformDanmakuOnlySources
23270
- ];
23271
- const PlatformSources = [
23272
- ...PlatformInfoSources,
23273
- ...PlatformDanmakuSources
23274
- ];
23283
+ var platform = __webpack_require__("./src/utils/platform.ts");
23275
23284
  class id_gen_UniID {
23276
23285
  constructor(id, domain){
23277
23286
  this.id = id;
@@ -23288,10 +23297,10 @@ and limitations under the License.
23288
23297
  return new id_gen_UniID('runtime' === domain ? 'runtime' : 'anonymous', domain || 'danuni');
23289
23298
  }
23290
23299
  static fromBili({ cid, mid, midHash }) {
23291
- if (cid) return new id_gen_UniID(cid.toString(), platform_PlatformVideoSource.Bilibili);
23292
- if (mid) return new id_gen_UniID(mid.toString(), platform_PlatformVideoSource.Bilibili);
23293
- if (midHash) return new id_gen_UniID(midHash, platform_PlatformVideoSource.Bilibili);
23294
- return this.fromNull(platform_PlatformVideoSource.Bilibili);
23300
+ if (cid) return new id_gen_UniID(cid.toString(), platform.PlatformVideoSource.Bilibili);
23301
+ if (mid) return new id_gen_UniID(mid.toString(), platform.PlatformVideoSource.Bilibili);
23302
+ if (midHash) return new id_gen_UniID(midHash, platform.PlatformVideoSource.Bilibili);
23303
+ return this.fromNull(platform.PlatformVideoSource.Bilibili);
23295
23304
  }
23296
23305
  static fromUnknown(id, domain) {
23297
23306
  if (id) return new id_gen_UniID(id, domain);
@@ -23473,7 +23482,7 @@ and limitations under the License.
23473
23482
  return extra;
23474
23483
  }
23475
23484
  get isFrom3rdPlatform() {
23476
- if (this.platform && PlatformDanmakuSources.includes(this.platform)) return true;
23485
+ if (this.platform && platform.PlatformDanmakuSources.includes(this.platform)) return true;
23477
23486
  return false;
23478
23487
  }
23479
23488
  toDMID() {
@@ -23627,7 +23636,7 @@ and limitations under the License.
23627
23636
  }
23628
23637
  static fromBili(args, cid, options, recSOID) {
23629
23638
  if (args.oid && !cid) cid = args.oid;
23630
- const SOID = recSOID || `def_${platform_PlatformVideoSource.Bilibili}+${id_gen_UniID.fromBili({
23639
+ const SOID = recSOID || `def_${platform.PlatformVideoSource.Bilibili}+${id_gen_UniID.fromBili({
23631
23640
  cid
23632
23641
  })}`;
23633
23642
  const senderID = IsEmail_isEmail(args.midHash, {
@@ -23680,8 +23689,8 @@ and limitations under the License.
23680
23689
  ctime: this.transCtime(args.ctime, 's'),
23681
23690
  weight: args.weight || (3 === pool ? 1 : 0),
23682
23691
  pool,
23683
- attr: DMAttrUtils.fromBin(args.attr, platform_PlatformVideoSource.Bilibili),
23684
- platform: platform_PlatformVideoSource.Bilibili,
23692
+ attr: DMAttrUtils.fromBin(args.attr, platform.PlatformVideoSource.Bilibili),
23693
+ platform: platform.PlatformVideoSource.Bilibili,
23685
23694
  extra
23686
23695
  }, options);
23687
23696
  }
@@ -23732,7 +23741,7 @@ and limitations under the License.
23732
23741
  this.color,
23733
23742
  this.ctime.getTime() / 1000,
23734
23743
  this.extra.bili?.pool || this.pool,
23735
- options?.avoidSenderIDWithAt ? this.senderID.replaceAll(`@${platform_PlatformVideoSource.Bilibili}`, '') : this.senderID,
23744
+ options?.avoidSenderIDWithAt ? this.senderID.replaceAll(`@${platform.PlatformVideoSource.Bilibili}`, '') : this.senderID,
23736
23745
  this.extra.bili?.dmid || this.DMID || this.toDMID(),
23737
23746
  this.weight
23738
23747
  ].join(',')
@@ -23740,7 +23749,7 @@ and limitations under the License.
23740
23749
  }
23741
23750
  static fromBiliCommand(args, cid, options) {
23742
23751
  if (args.oid && !cid) cid = args.oid;
23743
- const SOID = `def_${platform_PlatformVideoSource.Bilibili}+${id_gen_UniID.fromBili({
23752
+ const SOID = `def_${platform.PlatformVideoSource.Bilibili}+${id_gen_UniID.fromBili({
23744
23753
  cid
23745
23754
  })}`;
23746
23755
  const senderID = id_gen_UniID.fromBili({
@@ -23757,7 +23766,7 @@ and limitations under the License.
23757
23766
  attr: [
23758
23767
  "Protect"
23759
23768
  ],
23760
- platform: platform_PlatformVideoSource.Bilibili,
23769
+ platform: platform.PlatformVideoSource.Bilibili,
23761
23770
  extra: {
23762
23771
  bili: {
23763
23772
  command: args
@@ -23829,8 +23838,8 @@ and limitations under the License.
23829
23838
  style: this.extra.artplayer?.style
23830
23839
  };
23831
23840
  }
23832
- static fromDDplay(args, episodeId, domain = platform_PlatformDanmakuOnlySource.DanDanPlay, options) {
23833
- const SOID = id_gen_UniID.fromUnknown(`def_${platform_PlatformDanmakuOnlySource.DanDanPlay}+${episodeId}`, domain);
23841
+ static fromDDplay(args, episodeId, domain = platform.PlatformDanmakuOnlySource.DanDanPlay, options) {
23842
+ const SOID = id_gen_UniID.fromUnknown(`def_${platform.PlatformDanmakuOnlySource.DanDanPlay}+${episodeId}`, domain);
23834
23843
  return this.create({
23835
23844
  ...args,
23836
23845
  SOID: SOID.toString(),
@@ -24855,14 +24864,14 @@ and limitations under the License.
24855
24864
  toBiliXML(options) {
24856
24865
  const genCID = (id)=>{
24857
24866
  const UniID = id_gen_UniID.fromString(id);
24858
- if (UniID.domain === platform_PlatformVideoSource.Bilibili) {
24859
- const cid = UniID.id.replaceAll(`def_${platform_PlatformVideoSource.Bilibili}+`, '');
24867
+ if (UniID.domain === platform.PlatformVideoSource.Bilibili) {
24868
+ const cid = UniID.id.replaceAll(`def_${platform.PlatformVideoSource.Bilibili}+`, '');
24860
24869
  if (cid) return cid;
24861
24870
  }
24862
24871
  return !options?.cid || id;
24863
24872
  };
24864
24873
  if (options?.avoidSenderIDWithAt) {
24865
- const ok = this.dans.every((d)=>d.senderID.endsWith(`@${platform_PlatformVideoSource.Bilibili}`));
24874
+ const ok = this.dans.every((d)=>d.senderID.endsWith(`@${platform.PlatformVideoSource.Bilibili}`));
24866
24875
  if (!ok) throw new Error('存在其他来源的senderID,请关闭该功能再试!');
24867
24876
  }
24868
24877
  const builder = new Builder({
@@ -24997,7 +25006,7 @@ and limitations under the License.
24997
25006
  });
24998
25007
  }
24999
25008
  toDDplay() {
25000
- const episodeId = this.dans[0].SOID.split('@')[0].replaceAll(`def_${platform_PlatformDanmakuOnlySource.DanDanPlay}+`, '');
25009
+ const episodeId = this.dans[0].SOID.split('@')[0].replaceAll(`def_${platform.PlatformDanmakuOnlySource.DanDanPlay}+`, '');
25001
25010
  return {
25002
25011
  danuni: {
25003
25012
  ...DanUniConvertTipTemplate,