@simon_he/pi 0.0.70 → 0.0.71

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 (3) hide show
  1. package/dist/index.cjs +535 -533
  2. package/dist/index.js +551 -549
  3. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -12,8 +12,8 @@ var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? requir
12
12
  return require.apply(this, arguments);
13
13
  throw new Error('Dynamic require of "' + x2 + '" is not supported');
14
14
  });
15
- var __commonJS = (cb2, mod) => function __require2() {
16
- return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
+ var __commonJS = (cb, mod) => function __require2() {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
17
  };
18
18
  var __export = (target, all) => {
19
19
  for (var name in all)
@@ -2523,8 +2523,8 @@ var require_chunkstream = __commonJS({
2523
2523
  if (this._buffers && !this.writable) {
2524
2524
  this._end();
2525
2525
  }
2526
- } catch (ex) {
2527
- this.emit("error", ex);
2526
+ } catch (ex2) {
2527
+ this.emit("error", ex2);
2528
2528
  }
2529
2529
  };
2530
2530
  }
@@ -3542,8 +3542,8 @@ var require_parser_async = __commonJS({
3542
3542
  let bitmapData = bitmapper.dataToBitMap(filteredData, this._bitmapInfo);
3543
3543
  normalisedBitmapData = formatNormaliser(bitmapData, this._bitmapInfo);
3544
3544
  bitmapData = null;
3545
- } catch (ex) {
3546
- this._handleError(ex);
3545
+ } catch (ex2) {
3546
+ this._handleError(ex2);
3547
3547
  return;
3548
3548
  }
3549
3549
  this.emit("parsed", normalisedBitmapData);
@@ -3737,8 +3737,8 @@ var require_filter_pack = __commonJS({
3737
3737
  }
3738
3738
  function filterUp(pxData, pxPos, byteWidth, rawData, rawPos) {
3739
3739
  for (let x2 = 0; x2 < byteWidth; x2++) {
3740
- let up2 = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
3741
- let val = pxData[pxPos + x2] - up2;
3740
+ let up = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
3741
+ let val = pxData[pxPos + x2] - up;
3742
3742
  rawData[rawPos + x2] = val;
3743
3743
  }
3744
3744
  }
@@ -3746,8 +3746,8 @@ var require_filter_pack = __commonJS({
3746
3746
  let sum = 0;
3747
3747
  let length = pxPos + byteWidth;
3748
3748
  for (let x2 = pxPos; x2 < length; x2++) {
3749
- let up2 = pxPos > 0 ? pxData[x2 - byteWidth] : 0;
3750
- let val = pxData[x2] - up2;
3749
+ let up = pxPos > 0 ? pxData[x2 - byteWidth] : 0;
3750
+ let val = pxData[x2] - up;
3751
3751
  sum += Math.abs(val);
3752
3752
  }
3753
3753
  return sum;
@@ -3755,8 +3755,8 @@ var require_filter_pack = __commonJS({
3755
3755
  function filterAvg(pxData, pxPos, byteWidth, rawData, rawPos, bpp) {
3756
3756
  for (let x2 = 0; x2 < byteWidth; x2++) {
3757
3757
  let left = x2 >= bpp ? pxData[pxPos + x2 - bpp] : 0;
3758
- let up2 = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
3759
- let val = pxData[pxPos + x2] - (left + up2 >> 1);
3758
+ let up = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
3759
+ let val = pxData[pxPos + x2] - (left + up >> 1);
3760
3760
  rawData[rawPos + x2] = val;
3761
3761
  }
3762
3762
  }
@@ -3764,8 +3764,8 @@ var require_filter_pack = __commonJS({
3764
3764
  let sum = 0;
3765
3765
  for (let x2 = 0; x2 < byteWidth; x2++) {
3766
3766
  let left = x2 >= bpp ? pxData[pxPos + x2 - bpp] : 0;
3767
- let up2 = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
3768
- let val = pxData[pxPos + x2] - (left + up2 >> 1);
3767
+ let up = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
3768
+ let val = pxData[pxPos + x2] - (left + up >> 1);
3769
3769
  sum += Math.abs(val);
3770
3770
  }
3771
3771
  return sum;
@@ -3773,9 +3773,9 @@ var require_filter_pack = __commonJS({
3773
3773
  function filterPaeth(pxData, pxPos, byteWidth, rawData, rawPos, bpp) {
3774
3774
  for (let x2 = 0; x2 < byteWidth; x2++) {
3775
3775
  let left = x2 >= bpp ? pxData[pxPos + x2 - bpp] : 0;
3776
- let up2 = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
3776
+ let up = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
3777
3777
  let upleft = pxPos > 0 && x2 >= bpp ? pxData[pxPos + x2 - (byteWidth + bpp)] : 0;
3778
- let val = pxData[pxPos + x2] - paethPredictor(left, up2, upleft);
3778
+ let val = pxData[pxPos + x2] - paethPredictor(left, up, upleft);
3779
3779
  rawData[rawPos + x2] = val;
3780
3780
  }
3781
3781
  }
@@ -3783,9 +3783,9 @@ var require_filter_pack = __commonJS({
3783
3783
  let sum = 0;
3784
3784
  for (let x2 = 0; x2 < byteWidth; x2++) {
3785
3785
  let left = x2 >= bpp ? pxData[pxPos + x2 - bpp] : 0;
3786
- let up2 = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
3786
+ let up = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
3787
3787
  let upleft = pxPos > 0 && x2 >= bpp ? pxData[pxPos + x2 - (byteWidth + bpp)] : 0;
3788
- let val = pxData[pxPos + x2] - paethPredictor(left, up2, upleft);
3788
+ let val = pxData[pxPos + x2] - paethPredictor(left, up, upleft);
3789
3789
  sum += Math.abs(val);
3790
3790
  }
3791
3791
  return sum;
@@ -4571,38 +4571,38 @@ var require_png2 = __commonJS({
4571
4571
  Utils.qrToImageData(pngImage.data, qrData, opts);
4572
4572
  return pngImage;
4573
4573
  };
4574
- exports.renderToDataURL = function renderToDataURL(qrData, options, cb2) {
4575
- if (typeof cb2 === "undefined") {
4576
- cb2 = options;
4574
+ exports.renderToDataURL = function renderToDataURL(qrData, options, cb) {
4575
+ if (typeof cb === "undefined") {
4576
+ cb = options;
4577
4577
  options = void 0;
4578
4578
  }
4579
4579
  exports.renderToBuffer(qrData, options, function(err, output) {
4580
4580
  if (err)
4581
- cb2(err);
4581
+ cb(err);
4582
4582
  let url = "data:image/png;base64,";
4583
4583
  url += output.toString("base64");
4584
- cb2(null, url);
4584
+ cb(null, url);
4585
4585
  });
4586
4586
  };
4587
- exports.renderToBuffer = function renderToBuffer(qrData, options, cb2) {
4588
- if (typeof cb2 === "undefined") {
4589
- cb2 = options;
4587
+ exports.renderToBuffer = function renderToBuffer(qrData, options, cb) {
4588
+ if (typeof cb === "undefined") {
4589
+ cb = options;
4590
4590
  options = void 0;
4591
4591
  }
4592
4592
  const png = exports.render(qrData, options);
4593
4593
  const buffer = [];
4594
- png.on("error", cb2);
4594
+ png.on("error", cb);
4595
4595
  png.on("data", function(data) {
4596
4596
  buffer.push(data);
4597
4597
  });
4598
4598
  png.on("end", function() {
4599
- cb2(null, Buffer.concat(buffer));
4599
+ cb(null, Buffer.concat(buffer));
4600
4600
  });
4601
4601
  png.pack();
4602
4602
  };
4603
- exports.renderToFile = function renderToFile(path2, qrData, options, cb2) {
4604
- if (typeof cb2 === "undefined") {
4605
- cb2 = options;
4603
+ exports.renderToFile = function renderToFile(path2, qrData, options, cb) {
4604
+ if (typeof cb === "undefined") {
4605
+ cb = options;
4606
4606
  options = void 0;
4607
4607
  }
4608
4608
  let called = false;
@@ -4610,7 +4610,7 @@ var require_png2 = __commonJS({
4610
4610
  if (called)
4611
4611
  return;
4612
4612
  called = true;
4613
- cb2.apply(null, args);
4613
+ cb.apply(null, args);
4614
4614
  };
4615
4615
  const stream = fs.createWriteStream(path2);
4616
4616
  stream.on("error", done);
@@ -4649,7 +4649,7 @@ var require_utf8 = __commonJS({
4649
4649
  return blocks.WB;
4650
4650
  return blocks.WW;
4651
4651
  }
4652
- exports.render = function(qrData, options, cb2) {
4652
+ exports.render = function(qrData, options, cb) {
4653
4653
  const opts = Utils.getOptions(options);
4654
4654
  let blocks = BLOCK_CHAR;
4655
4655
  if (opts.color.dark.hex === "#ffffff" || opts.color.light.hex === "#000000") {
@@ -4672,19 +4672,19 @@ var require_utf8 = __commonJS({
4672
4672
  output += vMargin + "\n";
4673
4673
  }
4674
4674
  output += hMargin.slice(0, -1);
4675
- if (typeof cb2 === "function") {
4676
- cb2(null, output);
4675
+ if (typeof cb === "function") {
4676
+ cb(null, output);
4677
4677
  }
4678
4678
  return output;
4679
4679
  };
4680
- exports.renderToFile = function renderToFile(path2, qrData, options, cb2) {
4681
- if (typeof cb2 === "undefined") {
4682
- cb2 = options;
4680
+ exports.renderToFile = function renderToFile(path2, qrData, options, cb) {
4681
+ if (typeof cb === "undefined") {
4682
+ cb = options;
4683
4683
  options = void 0;
4684
4684
  }
4685
4685
  const fs = __require("fs");
4686
4686
  const utf8 = exports.render(qrData, options);
4687
- fs.writeFile(path2, utf8, cb2);
4687
+ fs.writeFile(path2, utf8, cb);
4688
4688
  };
4689
4689
  }
4690
4690
  });
@@ -4692,7 +4692,7 @@ var require_utf8 = __commonJS({
4692
4692
  // node_modules/qrcode/lib/renderer/terminal/terminal.js
4693
4693
  var require_terminal = __commonJS({
4694
4694
  "node_modules/qrcode/lib/renderer/terminal/terminal.js"(exports) {
4695
- exports.render = function(qrData, options, cb2) {
4695
+ exports.render = function(qrData, options, cb) {
4696
4696
  const size = qrData.modules.size;
4697
4697
  const data = qrData.modules.data;
4698
4698
  const black = "\x1B[40m \x1B[0m";
@@ -4709,8 +4709,8 @@ var require_terminal = __commonJS({
4709
4709
  output += vMargin + "\n";
4710
4710
  }
4711
4711
  output += hMargin + "\n";
4712
- if (typeof cb2 === "function") {
4713
- cb2(null, output);
4712
+ if (typeof cb === "function") {
4713
+ cb(null, output);
4714
4714
  }
4715
4715
  return output;
4716
4716
  };
@@ -4753,7 +4753,7 @@ var require_terminal_small = __commonJS({
4753
4753
  var mkCode = function(modules, size, x2, y) {
4754
4754
  return mkCodePixel(modules, size, x2, y) + mkCodePixel(modules, size, x2, y + 1);
4755
4755
  };
4756
- exports.render = function(qrData, options, cb2) {
4756
+ exports.render = function(qrData, options, cb) {
4757
4757
  const size = qrData.modules.size;
4758
4758
  const data = qrData.modules.data;
4759
4759
  const inverse = !!(options && options.inverse);
@@ -4770,8 +4770,8 @@ var require_terminal_small = __commonJS({
4770
4770
  output += palette[mkCode(data, size, size, y)] + newLine;
4771
4771
  }
4772
4772
  output += reset;
4773
- if (typeof cb2 === "function") {
4774
- cb2(null, output);
4773
+ if (typeof cb === "function") {
4774
+ cb(null, output);
4775
4775
  }
4776
4776
  return output;
4777
4777
  };
@@ -4783,11 +4783,11 @@ var require_terminal2 = __commonJS({
4783
4783
  "node_modules/qrcode/lib/renderer/terminal.js"(exports) {
4784
4784
  var big = require_terminal();
4785
4785
  var small = require_terminal_small();
4786
- exports.render = function(qrData, options, cb2) {
4786
+ exports.render = function(qrData, options, cb) {
4787
4787
  if (options && options.small) {
4788
- return small.render(qrData, options, cb2);
4788
+ return small.render(qrData, options, cb);
4789
4789
  }
4790
- return big.render(qrData, options, cb2);
4790
+ return big.render(qrData, options, cb);
4791
4791
  };
4792
4792
  }
4793
4793
  });
@@ -4834,7 +4834,7 @@ var require_svg_tag = __commonJS({
4834
4834
  }
4835
4835
  return path2;
4836
4836
  }
4837
- exports.render = function render2(qrData, options, cb2) {
4837
+ exports.render = function render2(qrData, options, cb) {
4838
4838
  const opts = Utils.getOptions(options);
4839
4839
  const size = qrData.modules.size;
4840
4840
  const data = qrData.modules.data;
@@ -4844,8 +4844,8 @@ var require_svg_tag = __commonJS({
4844
4844
  const viewBox = 'viewBox="0 0 ' + qrcodesize + " " + qrcodesize + '"';
4845
4845
  const width = !opts.width ? "" : 'width="' + opts.width + '" height="' + opts.width + '" ';
4846
4846
  const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path2 + "</svg>\n";
4847
- if (typeof cb2 === "function") {
4848
- cb2(null, svgTag);
4847
+ if (typeof cb === "function") {
4848
+ cb(null, svgTag);
4849
4849
  }
4850
4850
  return svgTag;
4851
4851
  };
@@ -4857,15 +4857,15 @@ var require_svg = __commonJS({
4857
4857
  "node_modules/qrcode/lib/renderer/svg.js"(exports) {
4858
4858
  var svgTagRenderer = require_svg_tag();
4859
4859
  exports.render = svgTagRenderer.render;
4860
- exports.renderToFile = function renderToFile(path2, qrData, options, cb2) {
4861
- if (typeof cb2 === "undefined") {
4862
- cb2 = options;
4860
+ exports.renderToFile = function renderToFile(path2, qrData, options, cb) {
4861
+ if (typeof cb === "undefined") {
4862
+ cb = options;
4863
4863
  options = void 0;
4864
4864
  }
4865
4865
  const fs = __require("fs");
4866
4866
  const svgTag = exports.render(qrData, options);
4867
4867
  const xmlStr = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' + svgTag;
4868
- fs.writeFile(path2, xmlStr, cb2);
4868
+ fs.writeFile(path2, xmlStr, cb);
4869
4869
  };
4870
4870
  }
4871
4871
  });
@@ -4932,7 +4932,7 @@ var require_browser = __commonJS({
4932
4932
  var QRCode = require_qrcode();
4933
4933
  var CanvasRenderer = require_canvas();
4934
4934
  var SvgRenderer = require_svg_tag();
4935
- function renderCanvas(renderFunc, canvas, text, opts, cb2) {
4935
+ function renderCanvas(renderFunc, canvas, text, opts, cb) {
4936
4936
  const args = [].slice.call(arguments, 1);
4937
4937
  const argsNum = args.length;
4938
4938
  const isLastArgCb = typeof args[argsNum - 1] === "function";
@@ -4944,15 +4944,15 @@ var require_browser = __commonJS({
4944
4944
  throw new Error("Too few arguments provided");
4945
4945
  }
4946
4946
  if (argsNum === 2) {
4947
- cb2 = text;
4947
+ cb = text;
4948
4948
  text = canvas;
4949
4949
  canvas = opts = void 0;
4950
4950
  } else if (argsNum === 3) {
4951
- if (canvas.getContext && typeof cb2 === "undefined") {
4952
- cb2 = opts;
4951
+ if (canvas.getContext && typeof cb === "undefined") {
4952
+ cb = opts;
4953
4953
  opts = void 0;
4954
4954
  } else {
4955
- cb2 = opts;
4955
+ cb = opts;
4956
4956
  opts = text;
4957
4957
  text = canvas;
4958
4958
  canvas = void 0;
@@ -4981,9 +4981,9 @@ var require_browser = __commonJS({
4981
4981
  }
4982
4982
  try {
4983
4983
  const data = QRCode.create(text, opts);
4984
- cb2(null, renderFunc(data, canvas, opts));
4984
+ cb(null, renderFunc(data, canvas, opts));
4985
4985
  } catch (e) {
4986
- cb2(e);
4986
+ cb(e);
4987
4987
  }
4988
4988
  }
4989
4989
  exports.create = QRCode.create;
@@ -5004,25 +5004,25 @@ var require_server = __commonJS({
5004
5004
  var Utf8Renderer = require_utf8();
5005
5005
  var TerminalRenderer = require_terminal2();
5006
5006
  var SvgRenderer = require_svg();
5007
- function checkParams(text, opts, cb2) {
5007
+ function checkParams(text, opts, cb) {
5008
5008
  if (typeof text === "undefined") {
5009
5009
  throw new Error("String required as first argument");
5010
5010
  }
5011
- if (typeof cb2 === "undefined") {
5012
- cb2 = opts;
5011
+ if (typeof cb === "undefined") {
5012
+ cb = opts;
5013
5013
  opts = {};
5014
5014
  }
5015
- if (typeof cb2 !== "function") {
5015
+ if (typeof cb !== "function") {
5016
5016
  if (!canPromise()) {
5017
5017
  throw new Error("Callback required as last argument");
5018
5018
  } else {
5019
- opts = cb2 || {};
5020
- cb2 = null;
5019
+ opts = cb || {};
5020
+ cb = null;
5021
5021
  }
5022
5022
  }
5023
5023
  return {
5024
5024
  opts,
5025
- cb: cb2
5025
+ cb
5026
5026
  };
5027
5027
  }
5028
5028
  function getTypeFromFilename(path2) {
@@ -5074,30 +5074,30 @@ var require_server = __commonJS({
5074
5074
  }
5075
5075
  exports.create = QRCode.create;
5076
5076
  exports.toCanvas = require_browser().toCanvas;
5077
- exports.toString = function toString2(text, opts, cb2) {
5078
- const params = checkParams(text, opts, cb2);
5077
+ exports.toString = function toString2(text, opts, cb) {
5078
+ const params = checkParams(text, opts, cb);
5079
5079
  const type = params.opts ? params.opts.type : void 0;
5080
5080
  const renderer = getStringRendererFromType(type);
5081
5081
  return render2(renderer.render, text, params);
5082
5082
  };
5083
- exports.toDataURL = function toDataURL(text, opts, cb2) {
5084
- const params = checkParams(text, opts, cb2);
5083
+ exports.toDataURL = function toDataURL(text, opts, cb) {
5084
+ const params = checkParams(text, opts, cb);
5085
5085
  const renderer = getRendererFromType(params.opts.type);
5086
5086
  return render2(renderer.renderToDataURL, text, params);
5087
5087
  };
5088
- exports.toBuffer = function toBuffer(text, opts, cb2) {
5089
- const params = checkParams(text, opts, cb2);
5088
+ exports.toBuffer = function toBuffer(text, opts, cb) {
5089
+ const params = checkParams(text, opts, cb);
5090
5090
  const renderer = getRendererFromType(params.opts.type);
5091
5091
  return render2(renderer.renderToBuffer, text, params);
5092
5092
  };
5093
- exports.toFile = function toFile(path2, text, opts, cb2) {
5093
+ exports.toFile = function toFile(path2, text, opts, cb) {
5094
5094
  if (typeof path2 !== "string" || !(typeof text === "string" || typeof text === "object")) {
5095
5095
  throw new Error("Invalid argument");
5096
5096
  }
5097
5097
  if (arguments.length < 3 && !canPromise()) {
5098
5098
  throw new Error("Too few arguments provided");
5099
5099
  }
5100
- const params = checkParams(text, opts, cb2);
5100
+ const params = checkParams(text, opts, cb);
5101
5101
  const type = params.opts.type || getTypeFromFilename(path2);
5102
5102
  const renderer = getRendererFromType(type);
5103
5103
  const renderToFile = renderer.renderToFile.bind(null, path2);
@@ -5277,14 +5277,14 @@ var require_signal_exit = __commonJS({
5277
5277
  assert = __require("assert");
5278
5278
  signals = require_signals();
5279
5279
  isWin = /^win/i.test(process12.platform);
5280
- EE2 = __require("events");
5281
- if (typeof EE2 !== "function") {
5282
- EE2 = EE2.EventEmitter;
5280
+ EE = __require("events");
5281
+ if (typeof EE !== "function") {
5282
+ EE = EE.EventEmitter;
5283
5283
  }
5284
5284
  if (process12.__signal_exit_emitter__) {
5285
5285
  emitter = process12.__signal_exit_emitter__;
5286
5286
  } else {
5287
- emitter = process12.__signal_exit_emitter__ = new EE2();
5287
+ emitter = process12.__signal_exit_emitter__ = new EE();
5288
5288
  emitter.count = 0;
5289
5289
  emitter.emitted = {};
5290
5290
  }
@@ -5292,12 +5292,12 @@ var require_signal_exit = __commonJS({
5292
5292
  emitter.setMaxListeners(Infinity);
5293
5293
  emitter.infinite = true;
5294
5294
  }
5295
- module.exports = function(cb2, opts) {
5295
+ module.exports = function(cb, opts) {
5296
5296
  if (!processOk(global.process)) {
5297
5297
  return function() {
5298
5298
  };
5299
5299
  }
5300
- assert.equal(typeof cb2, "function", "a callback must be provided for exit handler");
5300
+ assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
5301
5301
  if (loaded === false) {
5302
5302
  load();
5303
5303
  }
@@ -5306,12 +5306,12 @@ var require_signal_exit = __commonJS({
5306
5306
  ev = "afterexit";
5307
5307
  }
5308
5308
  var remove = function() {
5309
- emitter.removeListener(ev, cb2);
5309
+ emitter.removeListener(ev, cb);
5310
5310
  if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
5311
5311
  unload();
5312
5312
  }
5313
5313
  };
5314
- emitter.on(ev, cb2);
5314
+ emitter.on(ev, cb);
5315
5315
  return remove;
5316
5316
  };
5317
5317
  unload = function unload2() {
@@ -5406,7 +5406,7 @@ var require_signal_exit = __commonJS({
5406
5406
  var assert;
5407
5407
  var signals;
5408
5408
  var isWin;
5409
- var EE2;
5409
+ var EE;
5410
5410
  var emitter;
5411
5411
  var unload;
5412
5412
  var emit;
@@ -7695,13 +7695,13 @@ var require_buffer_list = __commonJS({
7695
7695
  var require_destroy = __commonJS({
7696
7696
  "node_modules/readable-stream/lib/internal/streams/destroy.js"(exports, module) {
7697
7697
  "use strict";
7698
- function destroy(err, cb2) {
7698
+ function destroy(err, cb) {
7699
7699
  var _this = this;
7700
7700
  var readableDestroyed = this._readableState && this._readableState.destroyed;
7701
7701
  var writableDestroyed = this._writableState && this._writableState.destroyed;
7702
7702
  if (readableDestroyed || writableDestroyed) {
7703
- if (cb2) {
7704
- cb2(err);
7703
+ if (cb) {
7704
+ cb(err);
7705
7705
  } else if (err) {
7706
7706
  if (!this._writableState) {
7707
7707
  process.nextTick(emitErrorNT, this, err);
@@ -7719,7 +7719,7 @@ var require_destroy = __commonJS({
7719
7719
  this._writableState.destroyed = true;
7720
7720
  }
7721
7721
  this._destroy(err || null, function(err2) {
7722
- if (!cb2 && err2) {
7722
+ if (!cb && err2) {
7723
7723
  if (!_this._writableState) {
7724
7724
  process.nextTick(emitErrorAndCloseNT, _this, err2);
7725
7725
  } else if (!_this._writableState.errorEmitted) {
@@ -7728,9 +7728,9 @@ var require_destroy = __commonJS({
7728
7728
  } else {
7729
7729
  process.nextTick(emitCloseNT, _this);
7730
7730
  }
7731
- } else if (cb2) {
7731
+ } else if (cb) {
7732
7732
  process.nextTick(emitCloseNT, _this);
7733
- cb2(err2);
7733
+ cb(err2);
7734
7734
  } else {
7735
7735
  process.nextTick(emitCloseNT, _this);
7736
7736
  }
@@ -8103,12 +8103,12 @@ var require_stream_writable = __commonJS({
8103
8103
  Writable.prototype.pipe = function() {
8104
8104
  errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
8105
8105
  };
8106
- function writeAfterEnd(stream, cb2) {
8106
+ function writeAfterEnd(stream, cb) {
8107
8107
  var er2 = new ERR_STREAM_WRITE_AFTER_END();
8108
8108
  errorOrDestroy(stream, er2);
8109
- process.nextTick(cb2, er2);
8109
+ process.nextTick(cb, er2);
8110
8110
  }
8111
- function validChunk(stream, state, chunk, cb2) {
8111
+ function validChunk(stream, state, chunk, cb) {
8112
8112
  var er2;
8113
8113
  if (chunk === null) {
8114
8114
  er2 = new ERR_STREAM_NULL_VALUES();
@@ -8117,12 +8117,12 @@ var require_stream_writable = __commonJS({
8117
8117
  }
8118
8118
  if (er2) {
8119
8119
  errorOrDestroy(stream, er2);
8120
- process.nextTick(cb2, er2);
8120
+ process.nextTick(cb, er2);
8121
8121
  return false;
8122
8122
  }
8123
8123
  return true;
8124
8124
  }
8125
- Writable.prototype.write = function(chunk, encoding, cb2) {
8125
+ Writable.prototype.write = function(chunk, encoding, cb) {
8126
8126
  var state = this._writableState;
8127
8127
  var ret = false;
8128
8128
  var isBuf = !state.objectMode && _isUint8Array(chunk);
@@ -8130,20 +8130,20 @@ var require_stream_writable = __commonJS({
8130
8130
  chunk = _uint8ArrayToBuffer(chunk);
8131
8131
  }
8132
8132
  if (typeof encoding === "function") {
8133
- cb2 = encoding;
8133
+ cb = encoding;
8134
8134
  encoding = null;
8135
8135
  }
8136
8136
  if (isBuf)
8137
8137
  encoding = "buffer";
8138
8138
  else if (!encoding)
8139
8139
  encoding = state.defaultEncoding;
8140
- if (typeof cb2 !== "function")
8141
- cb2 = nop;
8140
+ if (typeof cb !== "function")
8141
+ cb = nop;
8142
8142
  if (state.ending)
8143
- writeAfterEnd(this, cb2);
8144
- else if (isBuf || validChunk(this, state, chunk, cb2)) {
8143
+ writeAfterEnd(this, cb);
8144
+ else if (isBuf || validChunk(this, state, chunk, cb)) {
8145
8145
  state.pendingcb++;
8146
- ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb2);
8146
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
8147
8147
  }
8148
8148
  return ret;
8149
8149
  };
@@ -8190,7 +8190,7 @@ var require_stream_writable = __commonJS({
8190
8190
  return this._writableState.highWaterMark;
8191
8191
  }
8192
8192
  });
8193
- function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb2) {
8193
+ function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
8194
8194
  if (!isBuf) {
8195
8195
  var newChunk = decodeChunk(state, chunk, encoding);
8196
8196
  if (chunk !== newChunk) {
@@ -8210,7 +8210,7 @@ var require_stream_writable = __commonJS({
8210
8210
  chunk,
8211
8211
  encoding,
8212
8212
  isBuf,
8213
- callback: cb2,
8213
+ callback: cb,
8214
8214
  next: null
8215
8215
  };
8216
8216
  if (last) {
@@ -8220,13 +8220,13 @@ var require_stream_writable = __commonJS({
8220
8220
  }
8221
8221
  state.bufferedRequestCount += 1;
8222
8222
  } else {
8223
- doWrite(stream, state, false, len, chunk, encoding, cb2);
8223
+ doWrite(stream, state, false, len, chunk, encoding, cb);
8224
8224
  }
8225
8225
  return ret;
8226
8226
  }
8227
- function doWrite(stream, state, writev, len, chunk, encoding, cb2) {
8227
+ function doWrite(stream, state, writev, len, chunk, encoding, cb) {
8228
8228
  state.writelen = len;
8229
- state.writecb = cb2;
8229
+ state.writecb = cb;
8230
8230
  state.writing = true;
8231
8231
  state.sync = true;
8232
8232
  if (state.destroyed)
@@ -8237,15 +8237,15 @@ var require_stream_writable = __commonJS({
8237
8237
  stream._write(chunk, encoding, state.onwrite);
8238
8238
  state.sync = false;
8239
8239
  }
8240
- function onwriteError(stream, state, sync, er2, cb2) {
8240
+ function onwriteError(stream, state, sync, er2, cb) {
8241
8241
  --state.pendingcb;
8242
8242
  if (sync) {
8243
- process.nextTick(cb2, er2);
8243
+ process.nextTick(cb, er2);
8244
8244
  process.nextTick(finishMaybe, stream, state);
8245
8245
  stream._writableState.errorEmitted = true;
8246
8246
  errorOrDestroy(stream, er2);
8247
8247
  } else {
8248
- cb2(er2);
8248
+ cb(er2);
8249
8249
  stream._writableState.errorEmitted = true;
8250
8250
  errorOrDestroy(stream, er2);
8251
8251
  finishMaybe(stream, state);
@@ -8260,29 +8260,29 @@ var require_stream_writable = __commonJS({
8260
8260
  function onwrite(stream, er2) {
8261
8261
  var state = stream._writableState;
8262
8262
  var sync = state.sync;
8263
- var cb2 = state.writecb;
8264
- if (typeof cb2 !== "function")
8263
+ var cb = state.writecb;
8264
+ if (typeof cb !== "function")
8265
8265
  throw new ERR_MULTIPLE_CALLBACK();
8266
8266
  onwriteStateUpdate(state);
8267
8267
  if (er2)
8268
- onwriteError(stream, state, sync, er2, cb2);
8268
+ onwriteError(stream, state, sync, er2, cb);
8269
8269
  else {
8270
8270
  var finished = needFinish(state) || stream.destroyed;
8271
8271
  if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
8272
8272
  clearBuffer(stream, state);
8273
8273
  }
8274
8274
  if (sync) {
8275
- process.nextTick(afterWrite, stream, state, finished, cb2);
8275
+ process.nextTick(afterWrite, stream, state, finished, cb);
8276
8276
  } else {
8277
- afterWrite(stream, state, finished, cb2);
8277
+ afterWrite(stream, state, finished, cb);
8278
8278
  }
8279
8279
  }
8280
8280
  }
8281
- function afterWrite(stream, state, finished, cb2) {
8281
+ function afterWrite(stream, state, finished, cb) {
8282
8282
  if (!finished)
8283
8283
  onwriteDrain(stream, state);
8284
8284
  state.pendingcb--;
8285
- cb2();
8285
+ cb();
8286
8286
  finishMaybe(stream, state);
8287
8287
  }
8288
8288
  function onwriteDrain(stream, state) {
@@ -8323,9 +8323,9 @@ var require_stream_writable = __commonJS({
8323
8323
  while (entry) {
8324
8324
  var chunk = entry.chunk;
8325
8325
  var encoding = entry.encoding;
8326
- var cb2 = entry.callback;
8326
+ var cb = entry.callback;
8327
8327
  var len = state.objectMode ? 1 : chunk.length;
8328
- doWrite(stream, state, false, len, chunk, encoding, cb2);
8328
+ doWrite(stream, state, false, len, chunk, encoding, cb);
8329
8329
  entry = entry.next;
8330
8330
  state.bufferedRequestCount--;
8331
8331
  if (state.writing) {
@@ -8338,18 +8338,18 @@ var require_stream_writable = __commonJS({
8338
8338
  state.bufferedRequest = entry;
8339
8339
  state.bufferProcessing = false;
8340
8340
  }
8341
- Writable.prototype._write = function(chunk, encoding, cb2) {
8342
- cb2(new ERR_METHOD_NOT_IMPLEMENTED("_write()"));
8341
+ Writable.prototype._write = function(chunk, encoding, cb) {
8342
+ cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"));
8343
8343
  };
8344
8344
  Writable.prototype._writev = null;
8345
- Writable.prototype.end = function(chunk, encoding, cb2) {
8345
+ Writable.prototype.end = function(chunk, encoding, cb) {
8346
8346
  var state = this._writableState;
8347
8347
  if (typeof chunk === "function") {
8348
- cb2 = chunk;
8348
+ cb = chunk;
8349
8349
  chunk = null;
8350
8350
  encoding = null;
8351
8351
  } else if (typeof encoding === "function") {
8352
- cb2 = encoding;
8352
+ cb = encoding;
8353
8353
  encoding = null;
8354
8354
  }
8355
8355
  if (chunk !== null && chunk !== void 0)
@@ -8359,7 +8359,7 @@ var require_stream_writable = __commonJS({
8359
8359
  this.uncork();
8360
8360
  }
8361
8361
  if (!state.ending)
8362
- endWritable(this, state, cb2);
8362
+ endWritable(this, state, cb);
8363
8363
  return this;
8364
8364
  };
8365
8365
  Object.defineProperty(Writable.prototype, "writableLength", {
@@ -8414,14 +8414,14 @@ var require_stream_writable = __commonJS({
8414
8414
  }
8415
8415
  return need;
8416
8416
  }
8417
- function endWritable(stream, state, cb2) {
8417
+ function endWritable(stream, state, cb) {
8418
8418
  state.ending = true;
8419
8419
  finishMaybe(stream, state);
8420
- if (cb2) {
8420
+ if (cb) {
8421
8421
  if (state.finished)
8422
- process.nextTick(cb2);
8422
+ process.nextTick(cb);
8423
8423
  else
8424
- stream.once("finish", cb2);
8424
+ stream.once("finish", cb);
8425
8425
  }
8426
8426
  state.ended = true;
8427
8427
  stream.writable = false;
@@ -8430,9 +8430,9 @@ var require_stream_writable = __commonJS({
8430
8430
  var entry = corkReq.entry;
8431
8431
  corkReq.entry = null;
8432
8432
  while (entry) {
8433
- var cb2 = entry.callback;
8433
+ var cb = entry.callback;
8434
8434
  state.pendingcb--;
8435
- cb2(err);
8435
+ cb(err);
8436
8436
  entry = entry.next;
8437
8437
  }
8438
8438
  state.corkedRequestsFree.next = corkReq;
@@ -8457,8 +8457,8 @@ var require_stream_writable = __commonJS({
8457
8457
  });
8458
8458
  Writable.prototype.destroy = destroyImpl.destroy;
8459
8459
  Writable.prototype._undestroy = destroyImpl.undestroy;
8460
- Writable.prototype._destroy = function(err, cb2) {
8461
- cb2(err);
8460
+ Writable.prototype._destroy = function(err, cb) {
8461
+ cb(err);
8462
8462
  };
8463
8463
  }
8464
8464
  });
@@ -9299,7 +9299,7 @@ var require_stream_readable = __commonJS({
9299
9299
  module.exports = Readable;
9300
9300
  var Duplex;
9301
9301
  Readable.ReadableState = ReadableState;
9302
- var EE2 = __require("events").EventEmitter;
9302
+ var EE = __require("events").EventEmitter;
9303
9303
  var EElistenerCount = function EElistenerCount2(emitter, type) {
9304
9304
  return emitter.listeners(type).length;
9305
9305
  };
@@ -9419,8 +9419,8 @@ var require_stream_readable = __commonJS({
9419
9419
  });
9420
9420
  Readable.prototype.destroy = destroyImpl.destroy;
9421
9421
  Readable.prototype._undestroy = destroyImpl.undestroy;
9422
- Readable.prototype._destroy = function(err, cb2) {
9423
- cb2(err);
9422
+ Readable.prototype._destroy = function(err, cb) {
9423
+ cb(err);
9424
9424
  };
9425
9425
  Readable.prototype.push = function(chunk, encoding) {
9426
9426
  var state = this._readableState;
@@ -10103,15 +10103,15 @@ var require_stream_transform = __commonJS({
10103
10103
  function afterTransform(er2, data) {
10104
10104
  var ts = this._transformState;
10105
10105
  ts.transforming = false;
10106
- var cb2 = ts.writecb;
10107
- if (cb2 === null) {
10106
+ var cb = ts.writecb;
10107
+ if (cb === null) {
10108
10108
  return this.emit("error", new ERR_MULTIPLE_CALLBACK());
10109
10109
  }
10110
10110
  ts.writechunk = null;
10111
10111
  ts.writecb = null;
10112
10112
  if (data != null)
10113
10113
  this.push(data);
10114
- cb2(er2);
10114
+ cb(er2);
10115
10115
  var rs = this._readableState;
10116
10116
  rs.reading = false;
10117
10117
  if (rs.needReadable || rs.length < rs.highWaterMark) {
@@ -10154,12 +10154,12 @@ var require_stream_transform = __commonJS({
10154
10154
  this._transformState.needTransform = false;
10155
10155
  return Duplex.prototype.push.call(this, chunk, encoding);
10156
10156
  };
10157
- Transform.prototype._transform = function(chunk, encoding, cb2) {
10158
- cb2(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
10157
+ Transform.prototype._transform = function(chunk, encoding, cb) {
10158
+ cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
10159
10159
  };
10160
- Transform.prototype._write = function(chunk, encoding, cb2) {
10160
+ Transform.prototype._write = function(chunk, encoding, cb) {
10161
10161
  var ts = this._transformState;
10162
- ts.writecb = cb2;
10162
+ ts.writecb = cb;
10163
10163
  ts.writechunk = chunk;
10164
10164
  ts.writeencoding = encoding;
10165
10165
  if (!ts.transforming) {
@@ -10177,9 +10177,9 @@ var require_stream_transform = __commonJS({
10177
10177
  ts.needTransform = true;
10178
10178
  }
10179
10179
  };
10180
- Transform.prototype._destroy = function(err, cb2) {
10180
+ Transform.prototype._destroy = function(err, cb) {
10181
10181
  Duplex.prototype._destroy.call(this, err, function(err2) {
10182
- cb2(err2);
10182
+ cb(err2);
10183
10183
  });
10184
10184
  };
10185
10185
  function done(stream, er2, data) {
@@ -10208,8 +10208,8 @@ var require_stream_passthrough = __commonJS({
10208
10208
  return new PassThrough(options);
10209
10209
  Transform.call(this, options);
10210
10210
  }
10211
- PassThrough.prototype._transform = function(chunk, encoding, cb2) {
10212
- cb2(null, chunk);
10211
+ PassThrough.prototype._transform = function(chunk, encoding, cb) {
10212
+ cb(null, chunk);
10213
10213
  };
10214
10214
  }
10215
10215
  });
@@ -10695,10 +10695,10 @@ var require_bl = __commonJS({
10695
10695
  this._callback = null;
10696
10696
  }
10697
10697
  };
10698
- BufferListStream2.prototype._destroy = function _destroy(err, cb2) {
10698
+ BufferListStream2.prototype._destroy = function _destroy(err, cb) {
10699
10699
  this._bufs.length = 0;
10700
10700
  this.length = 0;
10701
- cb2(err);
10701
+ cb(err);
10702
10702
  };
10703
10703
  BufferListStream2.prototype._isBufferList = function _isBufferList(b) {
10704
10704
  return b instanceof BufferListStream2 || b instanceof BufferList || BufferListStream2.isBufferList(b);
@@ -10714,7 +10714,7 @@ var require_bl = __commonJS({
10714
10714
  import process11 from "process";
10715
10715
 
10716
10716
  // node_modules/lazy-js-utils/dist/index.js
10717
- import Zt from "fs";
10717
+ import _t from "fs";
10718
10718
 
10719
10719
  // node_modules/entities/lib/esm/generated/decode-data-html.js
10720
10720
  var decode_data_html_default = new Uint16Array(
@@ -11931,11 +11931,11 @@ var Tokenizer = class {
11931
11931
  this.cbs.ontext(start, endIndex);
11932
11932
  }
11933
11933
  }
11934
- emitCodePoint(cp2) {
11934
+ emitCodePoint(cp) {
11935
11935
  if (this.baseState !== State.Text && this.baseState !== State.InSpecialTag) {
11936
- this.cbs.onattribentity(cp2);
11936
+ this.cbs.onattribentity(cp);
11937
11937
  } else {
11938
- this.cbs.ontextentity(cp2);
11938
+ this.cbs.ontextentity(cp);
11939
11939
  }
11940
11940
  }
11941
11941
  };
@@ -12039,7 +12039,7 @@ var htmlIntegrationElements = /* @__PURE__ */ new Set([
12039
12039
  var reNameEnd = /\s|\//;
12040
12040
  var Parser = class {
12041
12041
  constructor(cbs, options = {}) {
12042
- var _a2, _b, _c, _d, _e2;
12042
+ var _a2, _b2, _c, _d, _e2;
12043
12043
  this.options = options;
12044
12044
  this.startIndex = 0;
12045
12045
  this.endIndex = 0;
@@ -12056,25 +12056,25 @@ var Parser = class {
12056
12056
  this.ended = false;
12057
12057
  this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};
12058
12058
  this.lowerCaseTagNames = (_a2 = options.lowerCaseTags) !== null && _a2 !== void 0 ? _a2 : !options.xmlMode;
12059
- this.lowerCaseAttributeNames = (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode;
12059
+ this.lowerCaseAttributeNames = (_b2 = options.lowerCaseAttributeNames) !== null && _b2 !== void 0 ? _b2 : !options.xmlMode;
12060
12060
  this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer)(this.options, this);
12061
12061
  (_e2 = (_d = this.cbs).onparserinit) === null || _e2 === void 0 ? void 0 : _e2.call(_d, this);
12062
12062
  }
12063
12063
  // Tokenizer event handlers
12064
12064
  /** @internal */
12065
12065
  ontext(start, endIndex) {
12066
- var _a2, _b;
12066
+ var _a2, _b2;
12067
12067
  const data = this.getSlice(start, endIndex);
12068
12068
  this.endIndex = endIndex - 1;
12069
- (_b = (_a2 = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a2, data);
12069
+ (_b2 = (_a2 = this.cbs).ontext) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, data);
12070
12070
  this.startIndex = endIndex;
12071
12071
  }
12072
12072
  /** @internal */
12073
- ontextentity(cp2) {
12074
- var _a2, _b;
12073
+ ontextentity(cp) {
12074
+ var _a2, _b2;
12075
12075
  const index = this.tokenizer.getSectionStart();
12076
12076
  this.endIndex = index - 1;
12077
- (_b = (_a2 = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a2, fromCodePoint(cp2));
12077
+ (_b2 = (_a2 = this.cbs).ontext) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, fromCodePoint(cp));
12078
12078
  this.startIndex = index;
12079
12079
  }
12080
12080
  isVoidElement(name) {
@@ -12090,14 +12090,14 @@ var Parser = class {
12090
12090
  this.emitOpenTag(name);
12091
12091
  }
12092
12092
  emitOpenTag(name) {
12093
- var _a2, _b, _c, _d;
12093
+ var _a2, _b2, _c, _d;
12094
12094
  this.openTagStart = this.startIndex;
12095
12095
  this.tagname = name;
12096
12096
  const impliesClose = !this.options.xmlMode && openImpliesClose.get(name);
12097
12097
  if (impliesClose) {
12098
12098
  while (this.stack.length > 0 && impliesClose.has(this.stack[this.stack.length - 1])) {
12099
12099
  const element = this.stack.pop();
12100
- (_b = (_a2 = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a2, element, true);
12100
+ (_b2 = (_a2 = this.cbs).onclosetag) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, element, true);
12101
12101
  }
12102
12102
  }
12103
12103
  if (!this.isVoidElement(name)) {
@@ -12113,10 +12113,10 @@ var Parser = class {
12113
12113
  this.attribs = {};
12114
12114
  }
12115
12115
  endOpenTag(isImplied) {
12116
- var _a2, _b;
12116
+ var _a2, _b2;
12117
12117
  this.startIndex = this.openTagStart;
12118
12118
  if (this.attribs) {
12119
- (_b = (_a2 = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a2, this.tagname, this.attribs, isImplied);
12119
+ (_b2 = (_a2 = this.cbs).onopentag) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, this.tagname, this.attribs, isImplied);
12120
12120
  this.attribs = null;
12121
12121
  }
12122
12122
  if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) {
@@ -12132,7 +12132,7 @@ var Parser = class {
12132
12132
  }
12133
12133
  /** @internal */
12134
12134
  onclosetag(start, endIndex) {
12135
- var _a2, _b, _c, _d, _e2, _f2;
12135
+ var _a2, _b2, _c, _d, _e2, _f;
12136
12136
  this.endIndex = endIndex;
12137
12137
  let name = this.getSlice(start, endIndex);
12138
12138
  if (this.lowerCaseTagNames) {
@@ -12156,9 +12156,9 @@ var Parser = class {
12156
12156
  this.closeCurrentTag(true);
12157
12157
  }
12158
12158
  } else if (!this.options.xmlMode && name === "br") {
12159
- (_b = (_a2 = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a2, "br");
12159
+ (_b2 = (_a2 = this.cbs).onopentagname) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, "br");
12160
12160
  (_d = (_c = this.cbs).onopentag) === null || _d === void 0 ? void 0 : _d.call(_c, "br", {}, true);
12161
- (_f2 = (_e2 = this.cbs).onclosetag) === null || _f2 === void 0 ? void 0 : _f2.call(_e2, "br", false);
12161
+ (_f = (_e2 = this.cbs).onclosetag) === null || _f === void 0 ? void 0 : _f.call(_e2, "br", false);
12162
12162
  }
12163
12163
  this.startIndex = endIndex + 1;
12164
12164
  }
@@ -12173,11 +12173,11 @@ var Parser = class {
12173
12173
  }
12174
12174
  }
12175
12175
  closeCurrentTag(isOpenImplied) {
12176
- var _a2, _b;
12176
+ var _a2, _b2;
12177
12177
  const name = this.tagname;
12178
12178
  this.endOpenTag(isOpenImplied);
12179
12179
  if (this.stack[this.stack.length - 1] === name) {
12180
- (_b = (_a2 = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a2, name, !isOpenImplied);
12180
+ (_b2 = (_a2 = this.cbs).onclosetag) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, name, !isOpenImplied);
12181
12181
  this.stack.pop();
12182
12182
  }
12183
12183
  }
@@ -12192,14 +12192,14 @@ var Parser = class {
12192
12192
  this.attribvalue += this.getSlice(start, endIndex);
12193
12193
  }
12194
12194
  /** @internal */
12195
- onattribentity(cp2) {
12196
- this.attribvalue += fromCodePoint(cp2);
12195
+ onattribentity(cp) {
12196
+ this.attribvalue += fromCodePoint(cp);
12197
12197
  }
12198
12198
  /** @internal */
12199
12199
  onattribend(quote, endIndex) {
12200
- var _a2, _b;
12200
+ var _a2, _b2;
12201
12201
  this.endIndex = endIndex;
12202
- (_b = (_a2 = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a2, this.attribname, this.attribvalue, quote === QuoteType.Double ? '"' : quote === QuoteType.Single ? "'" : quote === QuoteType.NoValue ? void 0 : null);
12202
+ (_b2 = (_a2 = this.cbs).onattribute) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, this.attribname, this.attribvalue, quote === QuoteType.Double ? '"' : quote === QuoteType.Single ? "'" : quote === QuoteType.NoValue ? void 0 : null);
12203
12203
  if (this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {
12204
12204
  this.attribs[this.attribname] = this.attribvalue;
12205
12205
  }
@@ -12235,43 +12235,43 @@ var Parser = class {
12235
12235
  }
12236
12236
  /** @internal */
12237
12237
  oncomment(start, endIndex, offset) {
12238
- var _a2, _b, _c, _d;
12238
+ var _a2, _b2, _c, _d;
12239
12239
  this.endIndex = endIndex;
12240
- (_b = (_a2 = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a2, this.getSlice(start, endIndex - offset));
12240
+ (_b2 = (_a2 = this.cbs).oncomment) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, this.getSlice(start, endIndex - offset));
12241
12241
  (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);
12242
12242
  this.startIndex = endIndex + 1;
12243
12243
  }
12244
12244
  /** @internal */
12245
12245
  oncdata(start, endIndex, offset) {
12246
- var _a2, _b, _c, _d, _e2, _f2, _g2, _h, _j, _k;
12246
+ var _a2, _b2, _c, _d, _e2, _f, _g, _h, _j, _k;
12247
12247
  this.endIndex = endIndex;
12248
12248
  const value = this.getSlice(start, endIndex - offset);
12249
12249
  if (this.options.xmlMode || this.options.recognizeCDATA) {
12250
- (_b = (_a2 = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a2);
12250
+ (_b2 = (_a2 = this.cbs).oncdatastart) === null || _b2 === void 0 ? void 0 : _b2.call(_a2);
12251
12251
  (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);
12252
- (_f2 = (_e2 = this.cbs).oncdataend) === null || _f2 === void 0 ? void 0 : _f2.call(_e2);
12252
+ (_f = (_e2 = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e2);
12253
12253
  } else {
12254
- (_h = (_g2 = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g2, `[CDATA[${value}]]`);
12254
+ (_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, `[CDATA[${value}]]`);
12255
12255
  (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j);
12256
12256
  }
12257
12257
  this.startIndex = endIndex + 1;
12258
12258
  }
12259
12259
  /** @internal */
12260
12260
  onend() {
12261
- var _a2, _b;
12261
+ var _a2, _b2;
12262
12262
  if (this.cbs.onclosetag) {
12263
12263
  this.endIndex = this.startIndex;
12264
12264
  for (let index = this.stack.length; index > 0; this.cbs.onclosetag(this.stack[--index], true))
12265
12265
  ;
12266
12266
  }
12267
- (_b = (_a2 = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a2);
12267
+ (_b2 = (_a2 = this.cbs).onend) === null || _b2 === void 0 ? void 0 : _b2.call(_a2);
12268
12268
  }
12269
12269
  /**
12270
12270
  * Resets the parser to a blank state, ready to parse a new HTML document
12271
12271
  */
12272
12272
  reset() {
12273
- var _a2, _b, _c, _d;
12274
- (_b = (_a2 = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a2);
12273
+ var _a2, _b2, _c, _d;
12274
+ (_b2 = (_a2 = this.cbs).onreset) === null || _b2 === void 0 ? void 0 : _b2.call(_a2);
12275
12275
  this.tokenizer.reset();
12276
12276
  this.tagname = "";
12277
12277
  this.attribname = "";
@@ -12317,9 +12317,9 @@ var Parser = class {
12317
12317
  * @param chunk Chunk to parse.
12318
12318
  */
12319
12319
  write(chunk) {
12320
- var _a2, _b;
12320
+ var _a2, _b2;
12321
12321
  if (this.ended) {
12322
- (_b = (_a2 = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a2, new Error(".write() after done!"));
12322
+ (_b2 = (_a2 = this.cbs).onerror) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, new Error(".write() after done!"));
12323
12323
  return;
12324
12324
  }
12325
12325
  this.buffers.push(chunk);
@@ -12334,9 +12334,9 @@ var Parser = class {
12334
12334
  * @param chunk Optional final chunk to parse.
12335
12335
  */
12336
12336
  end(chunk) {
12337
- var _a2, _b;
12337
+ var _a2, _b2;
12338
12338
  if (this.ended) {
12339
- (_b = (_a2 = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a2, new Error(".end() after done!"));
12339
+ (_b2 = (_a2 = this.cbs).onerror) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, new Error(".end() after done!"));
12340
12340
  return;
12341
12341
  }
12342
12342
  if (chunk)
@@ -12593,12 +12593,12 @@ var Element = class extends NodeWithChildren {
12593
12593
  }
12594
12594
  get attributes() {
12595
12595
  return Object.keys(this.attribs).map((name) => {
12596
- var _a2, _b;
12596
+ var _a2, _b2;
12597
12597
  return {
12598
12598
  name,
12599
12599
  value: this.attribs[name],
12600
12600
  namespace: (_a2 = this["x-attribsNamespace"]) === null || _a2 === void 0 ? void 0 : _a2[name],
12601
- prefix: (_b = this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name]
12601
+ prefix: (_b2 = this["x-attribsPrefix"]) === null || _b2 === void 0 ? void 0 : _b2[name]
12602
12602
  };
12603
12603
  });
12604
12604
  }
@@ -13072,10 +13072,10 @@ function formatAttributes(attributes, opts) {
13072
13072
  return;
13073
13073
  const encode = ((_a2 = opts.encodeEntities) !== null && _a2 !== void 0 ? _a2 : opts.decodeEntities) === false ? replaceQuotes : opts.xmlMode || opts.encodeEntities !== "utf8" ? encodeXML : escapeAttribute;
13074
13074
  return Object.keys(attributes).map((key2) => {
13075
- var _a3, _b;
13075
+ var _a3, _b2;
13076
13076
  const value = (_a3 = attributes[key2]) !== null && _a3 !== void 0 ? _a3 : "";
13077
13077
  if (opts.xmlMode === "foreign") {
13078
- key2 = (_b = attributeNames.get(key2)) !== null && _b !== void 0 ? _b : key2;
13078
+ key2 = (_b2 = attributeNames.get(key2)) !== null && _b2 !== void 0 ? _b2 : key2;
13079
13079
  }
13080
13080
  if (!opts.emptyAttrs && !opts.xmlMode && value === "") {
13081
13081
  return key2;
@@ -13633,8 +13633,8 @@ function getAtomFeed(feedRoot) {
13633
13633
  return feed;
13634
13634
  }
13635
13635
  function getRssFeed(feedRoot) {
13636
- var _a2, _b;
13637
- const childs = (_b = (_a2 = getOneElement("channel", feedRoot.children)) === null || _a2 === void 0 ? void 0 : _a2.children) !== null && _b !== void 0 ? _b : [];
13636
+ var _a2, _b2;
13637
+ const childs = (_b2 = (_a2 = getOneElement("channel", feedRoot.children)) === null || _a2 === void 0 ? void 0 : _a2.children) !== null && _b2 !== void 0 ? _b2 : [];
13638
13638
  const feed = {
13639
13639
  type: feedRoot.name.substr(0, 3),
13640
13640
  id: "",
@@ -13726,16 +13726,16 @@ import xt from "path";
13726
13726
  import Sr from "process";
13727
13727
  import Ar from "fs/promises";
13728
13728
  import Dr from "process";
13729
- import Mt from "worker_threads";
13730
- import bt from "path";
13731
- import Lr from "process";
13729
+ import bt from "worker_threads";
13730
+ import Lr from "path";
13731
+ import Mt from "process";
13732
13732
  import Et from "fs/promises";
13733
- import Or from "path";
13734
- import Vr from "fs/promises";
13735
- import $t from "fs/promises";
13733
+ import Rr from "path";
13734
+ import Yr from "fs/promises";
13735
+ import kt from "fs/promises";
13736
13736
  import zt from "path";
13737
- import qr from "process";
13738
- function Jr(e, t, r = { compare: "same", result: "value" }) {
13737
+ import Xr from "process";
13738
+ function Kr(e, t, r = { compare: "same", result: "value" }) {
13739
13739
  let n = e.filter((a) => t.includes(a)), o = e.filter((a) => !t.includes(a)).concat(t.filter((a) => !e.includes(a))), { compare: i = "same", result: s = "value" } = r;
13740
13740
  return i === "same" ? s === "value" ? n : n.map((a) => e.indexOf(a)) : s === "value" ? Ht(o) : o.map((a) => e.indexOf(a)).filter((a) => a >= 0);
13741
13741
  }
@@ -13750,21 +13750,21 @@ function Ht(e) {
13750
13750
  function C(e) {
13751
13751
  return typeof e > "u";
13752
13752
  }
13753
- function rn(e, t) {
13753
+ function nn(e, t) {
13754
13754
  for (let r = 0; r < e.length; r++) {
13755
13755
  let n = t(e[r], r, e);
13756
13756
  if (!C(n))
13757
13757
  return n;
13758
13758
  }
13759
13759
  }
13760
- function on(e, t = 2) {
13760
+ function sn(e, t = 2) {
13761
13761
  return (e.reduce((r, n) => r + n) / e.length).toFixed(t);
13762
13762
  }
13763
13763
  var M = Array.isArray;
13764
13764
  function W(e) {
13765
13765
  return typeof e < "u";
13766
13766
  }
13767
- function pn(array, key) {
13767
+ function ln(array, key) {
13768
13768
  let reg = /\/[\w._ $]+\/[gims]*/;
13769
13769
  return array.filter((e) => M(key) ? key.some((t) => findItem(e, t)) : findItem(e, key));
13770
13770
  function findItem(item, key) {
@@ -13772,7 +13772,7 @@ function pn(array, key) {
13772
13772
  return C(item[_key]) ? false : W(_value) ? reg.test(_value) ? new RegExp(eval(_value)).test(item[_key]) : _value === item[_key] : /.*/.test(item[key]);
13773
13773
  }
13774
13774
  }
13775
- function hn(e, t) {
13775
+ function xn(e, t) {
13776
13776
  let r = /* @__PURE__ */ new Map();
13777
13777
  return e.forEach((n, o) => r.set(n[t], o)), new be(e, r, t);
13778
13778
  }
@@ -13832,12 +13832,12 @@ function D(e) {
13832
13832
  return typeof e == "function";
13833
13833
  }
13834
13834
  var L = Object.prototype.toString;
13835
- var bn = /(?<=\s|^|;)import\s*(["'\s]*(?<imports>[\w*${}\n\r\t, /]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][\s;]*/gm;
13836
- var Mn = /import\s*\((?<expression>(?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gm;
13837
- var En = /\bexport\s+(?<declaration>(async function|function|let|const|var|class))\s+(?<name>[\w$_]+)/g;
13838
- var In = /\bexport\s+{(?<exports>[^}]+)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n]*)?/g;
13839
- var vn = /\bexport\s*(\*)(\s*as\s+(?<name>[\w$_]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n]*)?/g;
13840
- var Tn = /\bexport\s+default\s+/g;
13835
+ var Mn = /(?<=\s|^|;)import\s*(["'\s]*(?<imports>[\w*${}\n\r\t, /]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][\s;]*/gm;
13836
+ var En = /import\s*\((?<expression>(?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gm;
13837
+ var In = /\bexport\s+(?<declaration>(async function|function|let|const|var|class))\s+(?<name>[\w$_]+)/g;
13838
+ var vn = /\bexport\s+{(?<exports>[^}]+)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n]*)?/g;
13839
+ var Tn = /\bexport\s*(\*)(\s*as\s+(?<name>[\w$_]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n]*)?/g;
13840
+ var Cn = /\bexport\s+default\s+/g;
13841
13841
  function T(e) {
13842
13842
  return L.call(e) === "[object Object]";
13843
13843
  }
@@ -13853,7 +13853,7 @@ function ee(e) {
13853
13853
  function Pe(e) {
13854
13854
  return Number.isNaN(e);
13855
13855
  }
13856
- function k(e) {
13856
+ function $(e) {
13857
13857
  return e === null;
13858
13858
  }
13859
13859
  function Fe(e) {
@@ -13865,10 +13865,10 @@ function B(e) {
13865
13865
  function j(e) {
13866
13866
  return typeof e == "number";
13867
13867
  }
13868
- function ke(e) {
13868
+ function $e(e) {
13869
13869
  return L.call(e) === "[object Promise]";
13870
13870
  }
13871
- function $e(e) {
13871
+ function ke(e) {
13872
13872
  return e instanceof Date;
13873
13873
  }
13874
13874
  function Ee(e) {
@@ -13880,19 +13880,19 @@ function Ie(e) {
13880
13880
  function V(e, t) {
13881
13881
  if (t = t.toLocaleLowerCase(), !t)
13882
13882
  throw new Error("type is required");
13883
- let r = { str: g, s: g, string: g, fn: D, f: D, function: D, object: T, o: T, array: M, a: M, set: Ne, map: Me, m: Me, reg: ee, r: ee, b: B, boolean: B, n: j, number: j, u: C, undefined: C, null: k, symbol: Fe, nan: Pe, wm: Ee, ws: Ie, promise: ke, weakmap: Ee, weakset: Ie, date: $e };
13883
+ let r = { str: g, s: g, string: g, fn: D, f: D, function: D, object: T, o: T, array: M, a: M, set: Ne, map: Me, m: Me, reg: ee, r: ee, b: B, boolean: B, n: j, number: j, u: C, undefined: C, null: $, symbol: Fe, nan: Pe, wm: Ee, ws: Ie, promise: $e, weakmap: Ee, weakset: Ie, date: ke };
13884
13884
  return t.split("|").some((n) => {
13885
13885
  var o;
13886
13886
  return (o = r[n.trim()]) == null ? void 0 : o.call(r, e);
13887
13887
  });
13888
13888
  }
13889
- function fo(e, t) {
13889
+ function po(e, t) {
13890
13890
  return V(t, "s|n") && (t = [`${t}`]), t.reduce((r, n) => {
13891
13891
  let o = false;
13892
13892
  return n[0] === "-" && (o = true, n = n.slice(1)), r.sort((i, s) => n !== "1" && s[n] === i[n] ? 0 : o ? n === "1" ? s > i ? 1 : -1 : s[n] > i[n] ? 1 : -1 : n === "1" ? i > s ? 1 : -1 : s[n] > i[n] ? -1 : 1);
13893
13893
  }, e);
13894
13894
  }
13895
- function go(e, t, r) {
13895
+ function ho(e, t, r) {
13896
13896
  if (!t)
13897
13897
  return e;
13898
13898
  let n = [], o, i = r ? r.split(".") : void 0;
@@ -13906,7 +13906,7 @@ function go(e, t, r) {
13906
13906
  return a ? a.reduce((u, m) => u == null ? void 0 : u[m], c) : c;
13907
13907
  }
13908
13908
  }
13909
- function yo(e) {
13909
+ function wo(e) {
13910
13910
  return e.reduce((t, r) => ((V(r, "o|a") && !Ut(t, r) || !t.includes(r)) && t.push(r), t), []);
13911
13911
  }
13912
13912
  function ze(e, t) {
@@ -13920,7 +13920,7 @@ function ze(e, t) {
13920
13920
  function Ut(e, t) {
13921
13921
  return e.some((r) => V(r, "o|a") && ze(t, r));
13922
13922
  }
13923
- function bo(e, t = 1) {
13923
+ function Mo(e, t = 1) {
13924
13924
  if (t < 1)
13925
13925
  return [];
13926
13926
  let r = [];
@@ -13928,7 +13928,7 @@ function bo(e, t = 1) {
13928
13928
  r.push(e.slice(n, n + t));
13929
13929
  return r;
13930
13930
  }
13931
- function Eo(e, t) {
13931
+ function Io(e, t) {
13932
13932
  return e.reduce((r, n) => {
13933
13933
  let o = t(n);
13934
13934
  return r[o] ? r[o]++ : r[o] = 1, r;
@@ -13940,7 +13940,7 @@ function Bt(e, t = "children", r = false, n = []) {
13940
13940
  r || n.push(o), i ? Bt(i, t, r, n) : r && n.push(o);
13941
13941
  }), n;
13942
13942
  }
13943
- function Co(e) {
13943
+ function So(e) {
13944
13944
  return e.filter(Boolean);
13945
13945
  }
13946
13946
  var q = class {
@@ -13951,7 +13951,7 @@ var q = class {
13951
13951
  }
13952
13952
  };
13953
13953
  function v(e, t = false, r = document) {
13954
- if (!k(t))
13954
+ if (!$(t))
13955
13955
  return B(t) || (r = t, t = false), M(e) ? e.reduce((n, o) => {
13956
13956
  let i = t ? r.querySelectorAll(o) : r.querySelector(o);
13957
13957
  return i ? n = t ? [...n, ...i] : [...n, i] : n;
@@ -13970,8 +13970,8 @@ function w(...e) {
13970
13970
  }
13971
13971
  }
13972
13972
  }
13973
- function $(e, t, r) {
13974
- return w(e, t, (n, o) => n.insertBefore(o, k(r) ? null : r || n.firstChild));
13973
+ function k(e, t, r) {
13974
+ return w(e, t, (n, o) => n.insertBefore(o, $(r) ? null : r || n.firstChild));
13975
13975
  }
13976
13976
  function z(e) {
13977
13977
  if (g(e) && (e = v(e) || e), g(e))
@@ -14050,7 +14050,7 @@ var He = class {
14050
14050
  this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
14051
14051
  }
14052
14052
  mount(t) {
14053
- return $(t, this.canvas, null), this.listen(), this;
14053
+ return k(t, this.canvas, null), this.listen(), this;
14054
14054
  }
14055
14055
  setColor(t) {
14056
14056
  this.color = t, this.ctx.strokeStyle = t;
@@ -14195,7 +14195,7 @@ var Ue = class {
14195
14195
  this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
14196
14196
  }
14197
14197
  append(t) {
14198
- return $(t, this.canvas), this;
14198
+ return k(t, this.canvas), this;
14199
14199
  }
14200
14200
  };
14201
14201
  var ie = class {
@@ -14261,10 +14261,10 @@ var ie = class {
14261
14261
  (t = this.ctx) == null || t.clearRect(0, 0, this.canvas.width, this.canvas.height);
14262
14262
  }
14263
14263
  append(t) {
14264
- return $(t, this.canvas), this;
14264
+ return k(t, this.canvas), this;
14265
14265
  }
14266
14266
  };
14267
- function Si(e) {
14267
+ function Ai(e) {
14268
14268
  return new Promise((t, r) => {
14269
14269
  try {
14270
14270
  let n = new Image();
@@ -14277,7 +14277,7 @@ function Si(e) {
14277
14277
  }
14278
14278
  });
14279
14279
  }
14280
- function Di(e) {
14280
+ function Li(e) {
14281
14281
  let t = 0, r = {}, n = e[0].length, o = e.length, i = [], s = [];
14282
14282
  for (let u = 0; u < o; u++)
14283
14283
  for (let m = 0; m < n; m++)
@@ -14301,7 +14301,7 @@ function Di(e) {
14301
14301
  function Be(e) {
14302
14302
  return e.replace(/-(\w)/g, (t, r) => r.toUpperCase());
14303
14303
  }
14304
- function Ri(e) {
14304
+ function ji(e) {
14305
14305
  if (e = (e || window.location.search).split("?")[1], !!e)
14306
14306
  return e.split("&").reduce((t, r) => {
14307
14307
  let [n, o] = r.split("=");
@@ -14311,7 +14311,7 @@ function Ri(e) {
14311
14311
  function se(e) {
14312
14312
  return e.replace(/([A-Z])/g, "-$1").toLowerCase();
14313
14313
  }
14314
- function Pi(e, t = 6) {
14314
+ function Fi(e, t = 6) {
14315
14315
  let r = 0;
14316
14316
  return e = `${e}`, e.match(/[a-z]/g) && r++, e.match(/[A-Z]/g) && r++, e.match(/[0-9]/g) && r++, e.match(/[^a-zA-Z0-9]/g) && r++, e.length < t && (r = 0), r;
14317
14317
  }
@@ -14321,19 +14321,19 @@ function ae(e, t = "around") {
14321
14321
  var Wt = /\s+(?!['"])([\w_\-\$\.]+):/gm;
14322
14322
  var Vt = /:\s*'([^']*)'/g;
14323
14323
  var Yt = /:\s*("[\w_\-\$\.]+")\s*(?!,)"/gm;
14324
- var _t = /:\s*("[\w_\-\$\.]+"\s*,)\s*}/gm;
14325
- var Qt = /,(\s*})/gm;
14326
- function $i(e) {
14327
- return JSON.parse(e.replace(Wt, (t, r) => t.replace(r, `"${r}"`)).replace(Vt, ': "$1"').replace(Yt, (t, r) => t.replace(r, `${r},`)).replace(_t, (t) => t.replace(",", "")).replace(Qt, (t, r) => r));
14324
+ var Qt = /:\s*("[\w_\-\$\.]+"\s*,)\s*}/gm;
14325
+ var Zt = /,(\s*})/gm;
14326
+ function zi(e) {
14327
+ return JSON.parse(e.replace(Wt, (t, r) => t.replace(r, `"${r}"`)).replace(Vt, ': "$1"').replace(Yt, (t, r) => t.replace(r, `${r},`)).replace(Qt, (t) => t.replace(",", "")).replace(Zt, (t, r) => r));
14328
14328
  }
14329
- function Hi(e, t = " ") {
14329
+ function Ui(e, t = " ") {
14330
14330
  return e.replace(/\s+/g, t);
14331
14331
  }
14332
14332
  function We(e) {
14333
14333
  let t = e.split(":"), r = t.length - 1;
14334
14334
  return t.reduce((n, o, i) => n + +o * 60 ** (r - i), 0);
14335
14335
  }
14336
- function Vi(e) {
14336
+ function Yi(e) {
14337
14337
  return e.split(`
14338
14338
  `).reduce((r, n) => {
14339
14339
  let o = n.split("]"), i = o[0].slice(1);
@@ -14348,9 +14348,9 @@ function Ye(e, t) {
14348
14348
  let s = e[i];
14349
14349
  return o += `${i} { ${Object.keys(s).reduce((a, c) => a += `${se(c)}: ${s[c]};`, "")} }`;
14350
14350
  }, ""), n = E("style", { type: "text/css" }, t ? Ve(r, t) : r);
14351
- return $(document.head, n, null), () => z(n);
14351
+ return k(document.head, n, null), () => z(n);
14352
14352
  }
14353
- function _e() {
14353
+ function Qe() {
14354
14354
  let e = navigator.userAgent, t = () => {
14355
14355
  let n = [{ name: "sgssapp", it: /sogousearch/i.test(e) }, { name: "wechat", it: /MicroMessenger/i.test(e) }, { name: "weibo", it: !!e.match(/Weibo/i) }, { name: "uc", it: !!e.match(/UCBrowser/i) || e.includes(" UBrowser") }, { name: "sogou", it: e.includes("MetaSr") || e.includes("Sogou") }, { name: "xiaomi", it: e.includes("MiuiBrowser") }, { name: "baidu", it: e.includes("Baidu") || e.includes("BIDUBrowser") }, { name: "360", it: e.includes("360EE") || e.includes("360SE") }, { name: "2345", it: e.includes("2345Explorer") }, { name: "edge", it: e.includes("Edge") }, { name: "ie11", it: e.includes("Trident") && e.includes("rv:11.0") }, { name: "ie", it: e.includes("compatible") && e.includes("MSIE") }, { name: "firefox", it: e.includes("Firefox") }, { name: "safari", it: e.includes("Safari") && !e.includes("Chrome") }, { name: "qqbrowser", it: e.includes("MQQBrowser") && !e.includes(" QQ") }, { name: "qq", it: e.includes("QQ") }, { name: "chrome", it: e.includes("Chrome") || e.includes("CriOS") }, { name: "opera", it: e.includes("Opera") || e.includes("OPR") }];
14356
14356
  for (let o = 0; o < n.length; o++)
@@ -14360,8 +14360,8 @@ function _e() {
14360
14360
  };
14361
14361
  return { os: (() => !!e.match(/compatible/i) || e.match(/Windows/i) ? "windows" : !!e.match(/Macintosh/i) || e.match(/MacIntel/i) ? "macOS" : !!e.match(/iphone/i) || e.match(/Ipad/i) ? "ios" : e.match(/android/i) ? "android" : e.match(/Ubuntu/i) ? "Ubuntu" : "other")(), dev: t() };
14362
14362
  }
14363
- function Qe(e, t = {}, r) {
14364
- let { os: n } = _e(), o = n === "ios" || n === "android", i = [], s = false;
14363
+ function Ze(e, t = {}, r) {
14364
+ let { os: n } = Qe(), o = n === "ios" || n === "android", i = [], s = false;
14365
14365
  return w(e, (a) => {
14366
14366
  let c = false;
14367
14367
  o ? (i.push(x(a, "touchstart", (m) => {
@@ -14394,7 +14394,7 @@ function Qe(e, t = {}, r) {
14394
14394
  function Te(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_VALUE) {
14395
14395
  return Math.floor(Math.random() * (t - e + 1)) + e;
14396
14396
  }
14397
- async function Is(e, t, r = 42, n) {
14397
+ async function vs(e, t, r = 42, n) {
14398
14398
  if (D(r) && (n = r, r = 42), g(t) && (t = v(t) || t), g(t))
14399
14399
  throw new Error(`${t} is not a HTMLElement`);
14400
14400
  let o = new Image();
@@ -14406,7 +14406,7 @@ async function Is(e, t, r = 42, n) {
14406
14406
  let A = u.getImageData(l - 3, b, y, y);
14407
14407
  c.width = y, u.putImageData(A, 0, b);
14408
14408
  let N;
14409
- Qe(c, { dragStart(I) {
14409
+ Ze(c, { dragStart(I) {
14410
14410
  N = I.clientX - I.target.offsetLeft;
14411
14411
  }, dragMove(I) {
14412
14412
  let S = I.clientX - N;
@@ -14452,7 +14452,7 @@ var ce = class {
14452
14452
  this.ctx.beginPath(), t.forEach(([n, o]) => this.ctx.lineTo(n, o)), this.isFill ? (this.ctx.fillStyle = r != null ? r : this.color, this.ctx.fill()) : (this.ctx.strokeStyle = r != null ? r : this.color, this.ctx.stroke());
14453
14453
  }
14454
14454
  };
14455
- var Ze = class {
14455
+ var _e = class {
14456
14456
  constructor(t, r = 1, n = "#fff") {
14457
14457
  __publicField(this, "r");
14458
14458
  __publicField(this, "ctx");
@@ -14477,19 +14477,19 @@ var qe = class {
14477
14477
  o.draw([[t, r], [t + i, r], [t + i, r + i], [t, r + i], [t, r]]);
14478
14478
  }
14479
14479
  };
14480
- function Us(e) {
14480
+ function Bs(e) {
14481
14481
  return [...e.matchAll(/([^{]+){([^}]+)}/gs)].reduce((t, [r, n, o]) => t += `${ae(n).replace(/\s+/g, " ").replace(/\s*,\s*/g, ",")}{${o.replace(/[\n\s]*/g, "")}}`, "");
14482
14482
  }
14483
14483
  function P(e) {
14484
14484
  if (g(e))
14485
14485
  try {
14486
- return Zt.statSync(e).isFile();
14486
+ return _t.statSync(e).isFile();
14487
14487
  } catch (e2) {
14488
14488
  return false;
14489
14489
  }
14490
14490
  return L.call(e) === "[object File]";
14491
14491
  }
14492
- function qs(e, t = {}) {
14492
+ function Xs(e, t = {}) {
14493
14493
  return new Promise((r) => {
14494
14494
  let { quality: n = 0.1, maxWidth: o, maxHeight: i, type: s = "base64" } = t;
14495
14495
  qt(e, r, n, s, o, i);
@@ -14522,24 +14522,24 @@ function qt(e, t, r, n, o, i) {
14522
14522
  }
14523
14523
  }
14524
14524
  var Xt = /(<.* class=["']([\w\-\_$ ]*)["'_\-\w$=:\/ ]*\>)/gm;
14525
- function ea(e, t) {
14525
+ function ta(e, t) {
14526
14526
  let r = 0;
14527
14527
  return e.replace(Xt, (n, o, i) => n.replace(i, t(i, o, r++)));
14528
14528
  }
14529
- function na(e, t, r) {
14529
+ function oa(e, t, r) {
14530
14530
  return w(e, (n) => r == null ? void 0 : r(getComputedStyle(n).getPropertyValue(t)));
14531
14531
  }
14532
- function ia(e, t) {
14532
+ function sa(e, t) {
14533
14533
  return e.classList.contains(t);
14534
14534
  }
14535
- function ca(e, t) {
14535
+ function ma(e, t) {
14536
14536
  return w(e, (r) => t && Object.keys(t).forEach((n) => r.style.setProperty(n, t[n])));
14537
14537
  }
14538
14538
  function Y(e, t, r, n, o) {
14539
14539
  let i = `${e}-${t}`;
14540
14540
  return r && (i += `-${r}`), n && (i += `__${n}`), o && (i += `--${o}`), i;
14541
14541
  }
14542
- function ua(e) {
14542
+ function fa(e) {
14543
14543
  return (t) => {
14544
14544
  let r = e;
14545
14545
  return { namespace: r, b: (l = "") => Y(r, t, l, "", ""), e: (l) => l ? Y(r, t, "", l, "") : "", m: (l) => l ? Y(r, t, "", "", l) : "", be: (l, h) => l && h ? Y(r, t, l, h, "") : "", em: (l, h) => l && h ? Y(r, t, "", l, h) : "", bm: (l, h) => l && h ? Y(r, t, l, "", h) : "", bem: (l, h, b) => l && h && b ? Y(r, t, l, h, b) : "", is: (l, ...h) => {
@@ -14558,7 +14558,7 @@ function ua(e) {
14558
14558
  }, cssVarBlockName: (l) => `--${r}-${t}-${l}` };
14559
14559
  };
14560
14560
  }
14561
- function _(e, t = {}) {
14561
+ function Q(e, t = {}) {
14562
14562
  let { sep: r = "&", eq: n = "=", hyp: o = false, px: i = false, encode: s = true } = t;
14563
14563
  return Object.keys(e).map((a) => `${o ? se(a) : a}${n}${Gt(s, i, e, a)}`).join(r);
14564
14564
  }
@@ -14566,13 +14566,13 @@ function Gt(e, t, r, n) {
14566
14566
  let o = t && j(r[n]) ? `${r[n]}px` : r[n].toString();
14567
14567
  return e ? encodeURI(o) : o;
14568
14568
  }
14569
- function xa(e, t) {
14570
- let r = _(t, { sep: ";", eq: ":", hyp: true });
14569
+ function ya(e, t) {
14570
+ let r = Q(t, { sep: ";", eq: ":", hyp: true });
14571
14571
  return w(e, (n) => {
14572
14572
  n.style.cssText = n.style.cssText + r;
14573
14573
  });
14574
14574
  }
14575
- function Ma(e, t) {
14575
+ function Ea(e, t) {
14576
14576
  let r = M(t) ? t : [t];
14577
14577
  return w(e, (n) => {
14578
14578
  let o = n.style.cssText;
@@ -14582,10 +14582,10 @@ function Ma(e, t) {
14582
14582
  function Jt(e) {
14583
14583
  return new RegExp(`${e}: [\\w()!\\-,.\\s0-9]+;`);
14584
14584
  }
14585
- function Ia(e, t) {
14585
+ function va(e, t) {
14586
14586
  return Reflect.has(e, t);
14587
14587
  }
14588
- var Ta = Object.assign;
14588
+ var Ca = Object.assign;
14589
14589
  function Xe(e) {
14590
14590
  let t = window.onbeforeunload || function() {
14591
14591
  };
@@ -14593,15 +14593,15 @@ function Xe(e) {
14593
14593
  e == null || e(r), t.call(this, r);
14594
14594
  }, e;
14595
14595
  }
14596
- function Fa(e, t) {
14596
+ function $a(e, t) {
14597
14597
  w(() => {
14598
14598
  document.styleSheets[0].insertRule(e, t);
14599
14599
  });
14600
14600
  }
14601
- function za(e, t) {
14601
+ function Ha(e, t) {
14602
14602
  return w(e, (r) => r.classList.add(t));
14603
14603
  }
14604
- function Ba(e, t) {
14604
+ function Wa(e, t) {
14605
14605
  return w(e, (r) => r.classList.remove(t));
14606
14606
  }
14607
14607
  function Ge(e, t = "yyyy-MM-dd") {
@@ -14611,7 +14611,7 @@ function Ge(e, t = "yyyy-MM-dd") {
14611
14611
  new RegExp(`(${o})`).test(t) && (t = t.replace(RegExp.$1, RegExp.$1.length === 1 ? r[o] : `00${r[o]}`.substr(`${r[o]}`.length)));
14612
14612
  return t;
14613
14613
  }
14614
- function nc(e, t = 0) {
14614
+ function oc(e, t = 0) {
14615
14615
  let r = e.includes("-") ? "-" : "/", [n, o, i] = e.split(r), s = new Date(+n, +o - 1, +i).getTime(), a = [], c = true;
14616
14616
  t < 0 && (c = false), t = Math.abs(t);
14617
14617
  for (let u = 0; u <= t; u++) {
@@ -14624,7 +14624,7 @@ function Ce(e) {
14624
14624
  let t = /* @__PURE__ */ new Date();
14625
14625
  return t.setMonth(e + 1), t.setDate(0), t.getDate();
14626
14626
  }
14627
- function ac(e) {
14627
+ function cc(e) {
14628
14628
  let t = [], r = /* @__PURE__ */ new Date();
14629
14629
  r.setMonth(e), r.setDate(1);
14630
14630
  let n = 0, o = r.getDay(), i = Ce(e - 1);
@@ -14641,15 +14641,15 @@ function ac(e) {
14641
14641
  }
14642
14642
  return t;
14643
14643
  }
14644
- function mc(e, t, r = "-") {
14644
+ function uc(e, t, r = "-") {
14645
14645
  let n = e.split(r), o = t.split(r);
14646
14646
  return n[0] < o[0] ? -1 : n[0] > o[0] ? 1 : n[1] < o[1] ? -1 : n[1] > o[1] ? 1 : n[2] < o[2] ? -1 : n[2] > o[2] ? 1 : 0;
14647
14647
  }
14648
- function fc(e, t) {
14648
+ function pc(e, t) {
14649
14649
  let r = e.split(":"), n = t.split(":");
14650
14650
  return r[0] < n[0] ? -1 : r[0] > n[0] ? 1 : r[1] < n[1] ? -1 : r[1] > n[1] ? 1 : 0;
14651
14651
  }
14652
- function lc() {
14652
+ function gc() {
14653
14653
  let e = /* @__PURE__ */ new Date(), t = e.getDay(), r = t === 0 ? 6 : t - 1, n = new Date(e);
14654
14654
  return n.setDate(n.getDate() - r), n.toISOString().match(/(^[0-9]+-[0-9]+-[0-9]+)/)[1];
14655
14655
  }
@@ -14666,10 +14666,10 @@ function Se(e, t) {
14666
14666
  r == null || r();
14667
14667
  };
14668
14668
  }
14669
- function Dc(e, t) {
14669
+ function Lc(e, t) {
14670
14670
  return w(e, (r) => t == null ? void 0 : t((e = r).getBoundingClientRect())), x(window, "scroll", () => t == null ? void 0 : t(e.getBoundingClientRect()));
14671
14671
  }
14672
- function jc(e = "body") {
14672
+ function Nc(e = "body") {
14673
14673
  let t = e === "body";
14674
14674
  w(e, (r) => {
14675
14675
  var n;
@@ -14698,13 +14698,13 @@ function Ke(e, t, r) {
14698
14698
  o == null || o();
14699
14699
  };
14700
14700
  }
14701
- function Yc(e, t) {
14701
+ function Qc(e, t) {
14702
14702
  if (!D(e))
14703
14703
  return;
14704
14704
  let r = setInterval(e, t);
14705
14705
  return () => clearInterval(r);
14706
14706
  }
14707
- function Zc(e, t = 0) {
14707
+ function qc(e, t = 0) {
14708
14708
  let r = Date.now();
14709
14709
  return x(window, "mousemove", (n) => {
14710
14710
  Date.now() - r >= t && (r = Date.now(), e(n));
@@ -14723,10 +14723,10 @@ function me(e, t, r = { childList: true }) {
14723
14723
  o == null || o();
14724
14724
  };
14725
14725
  }
14726
- function em(e) {
14726
+ function tm(e) {
14727
14727
  return x(window, "resize", () => e == null ? void 0 : e(document.documentElement.clientWidth || document.body.clientWidth, document.documentElement.clientHeight || document.body.clientHeight));
14728
14728
  }
14729
- function nm(e) {
14729
+ function om(e) {
14730
14730
  return x(document, "scroll", () => e == null ? void 0 : e(document.documentElement.scrollLeft || window.pageXOffset || document.body.scrollLeft, document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop));
14731
14731
  }
14732
14732
  function et(e, t = 0) {
@@ -14735,7 +14735,7 @@ function et(e, t = 0) {
14735
14735
  let r = setTimeout(e, t);
14736
14736
  return () => clearTimeout(r);
14737
14737
  }
14738
- function mm(e, t) {
14738
+ function um(e, t) {
14739
14739
  let r = g(e) ? v(e) : e, n = g(t) ? v(t) : t;
14740
14740
  if (!r || !n)
14741
14741
  return false;
@@ -14749,9 +14749,9 @@ function ue(e, t = "") {
14749
14749
  throw new Error(r);
14750
14750
  }
14751
14751
  }
14752
- function ym(e) {
14752
+ function wm(e) {
14753
14753
  let { title: t, meta: r, script: n, link: o } = e, i = Je();
14754
- return t && (document.title = g(t) ? t : t()), r && r.length && er(i, r), n && n.length && tr(i, n), o && o.length && Kt(i, o), $(document.head, i), z(i);
14754
+ return t && (document.title = g(t) ? t : t()), r && r.length && er(i, r), n && n.length && tr(i, n), o && o.length && Kt(i, o), k(document.head, i), z(i);
14755
14755
  }
14756
14756
  function Kt(e, t) {
14757
14757
  e.append(...t.map(({ rel: r, href: n }) => E("link", { rel: r, href: n })));
@@ -14765,7 +14765,7 @@ function tr(e, t) {
14765
14765
  function rr(e) {
14766
14766
  return e === "module" || e === "nomodule";
14767
14767
  }
14768
- function Im(e, t, r) {
14768
+ function vm(e, t, r) {
14769
14769
  let n = [], o = false;
14770
14770
  return w(e, (i) => {
14771
14771
  let s, a, c = document.createEvent("Event");
@@ -14778,7 +14778,7 @@ function Im(e, t, r) {
14778
14778
  n.length ? n.forEach((i) => i()) : o = true;
14779
14779
  };
14780
14780
  }
14781
- function Sm(e, t) {
14781
+ function Am(e, t) {
14782
14782
  let r = false, n = [], o = false;
14783
14783
  return w(e, (i) => {
14784
14784
  n.push(Se(i, (s) => {
@@ -14795,7 +14795,7 @@ function Sm(e, t) {
14795
14795
  function tt(e) {
14796
14796
  return document.createTextNode(e);
14797
14797
  }
14798
- function Lm(e) {
14798
+ function Om(e) {
14799
14799
  let t = document.createRange();
14800
14800
  return t.setStart(e, 0), t.setEnd(e, 0), t.getBoundingClientRect();
14801
14801
  }
@@ -14818,7 +14818,7 @@ function Ae(e, t) {
14818
14818
  return a.src = s, t && a.setAttribute("style", t), a;
14819
14819
  }
14820
14820
  }
14821
- function du(e, t, r = 200, n = 20) {
14821
+ function hu(e, t, r = 200, n = 20) {
14822
14822
  j(t) && (r = t, t = "body"), t || (t = "body");
14823
14823
  let o = Ae(e, `width:${r}px;position:absolute;`), i = E("div", { id: "simon-waterfall", style: "position:relative;width:100%;height:100%;" });
14824
14824
  x(window, "resize", () => s(t));
@@ -14852,10 +14852,10 @@ function du(e, t, r = 200, n = 20) {
14852
14852
  return c.removeChild(c.children[u]);
14853
14853
  }
14854
14854
  }
14855
- function wu(e) {
14855
+ function bu(e) {
14856
14856
  return e.replace(/[&<>'"]/g, (t) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", "'": "&#39;", '"': "&quot;" })[t] || t);
14857
14857
  }
14858
- function Eu(e = "", t = {}) {
14858
+ function Iu(e = "", t = {}) {
14859
14859
  return new Promise((r, n) => {
14860
14860
  let o = new DomHandler((s, a) => {
14861
14861
  s ? n(new Error(s)) : r(rt(a, t));
@@ -14903,15 +14903,15 @@ function sr(e) {
14903
14903
  return n === "" ? t += ` ${r}` : n && (t += ` ${r}="${n}"`), t;
14904
14904
  }, "");
14905
14905
  }
14906
- function vu(e) {
14906
+ function Tu(e) {
14907
14907
  return e.replace(/&amp;|&lt;|&gt;|&#39;|&quot;/g, (t) => ({ "&amp;": "&", "&lt;": "<", "&gt;": ">", "&#39;": "'", "&quot;": '"' })[t] || t);
14908
14908
  }
14909
14909
  var ar = /(<.* style=['"]([ \w$\-\_:;\n]*)['"][\/ "'$\-_\w]*>)/gm;
14910
- function Cu(e, t) {
14910
+ function Su(e, t) {
14911
14911
  let r = 0;
14912
14912
  return e.replace(ar, (n, o, i) => n.replace(i, t(i, o, r++)));
14913
14913
  }
14914
- function ju() {
14914
+ function Nu() {
14915
14915
  location.protocol !== "https:" && location.replace(`https://${location.href.split("//")[1]}`);
14916
14916
  }
14917
14917
  function nt(e) {
@@ -14920,15 +14920,15 @@ function nt(e) {
14920
14920
  function ot(e) {
14921
14921
  return L.call(e) === "[object Blob]";
14922
14922
  }
14923
- function Hu(e = 0) {
14923
+ function Uu(e = 0) {
14924
14924
  try {
14925
14925
  return document.documentElement.clientHeight + window.scrollY + e >= (document.documentElement.scrollHeight || document.documentElement.clientHeight);
14926
14926
  } catch (t) {
14927
14927
  throw new Error(t);
14928
14928
  }
14929
14929
  }
14930
- var Wu = () => W(window);
14931
- function Yu(e) {
14930
+ var Vu = () => W(window);
14931
+ function Qu(e) {
14932
14932
  return /[\u4E00-\u9FA5]/.test(e);
14933
14933
  }
14934
14934
  function it(e) {
@@ -14955,23 +14955,23 @@ function pe(e, t) {
14955
14955
  }
14956
14956
  return false;
14957
14957
  }
14958
- function Gu(e) {
14958
+ function Ju(e) {
14959
14959
  return e.__esModule || e[Symbol.toStringTag] === "Module";
14960
14960
  }
14961
14961
  function H(e) {
14962
14962
  return nt(e) ? e : mr.resolve(cr.cwd(), e);
14963
14963
  }
14964
- function sf(e) {
14964
+ function af(e) {
14965
14965
  try {
14966
14966
  return ur.accessSync(H(e)), true;
14967
14967
  } catch (e2) {
14968
14968
  return false;
14969
14969
  }
14970
14970
  }
14971
- function cf(e) {
14971
+ function mf(e) {
14972
14972
  return e === false;
14973
14973
  }
14974
- function uf(e, t) {
14974
+ function ff(e, t) {
14975
14975
  return new RegExp(`\\.${t}(\\?[^.]+)?$`).test(e);
14976
14976
  }
14977
14977
  function F(e, t = [], r = "inherit", n, o) {
@@ -14982,62 +14982,62 @@ function F(e, t = [], r = "inherit", n, o) {
14982
14982
  return a === 130 ? (o && console.log("\u5DF2\u53D6\u6D88..."), { status: a, result: u }) : (a !== 0 && (o && console.log(u), n && process.exit(1)), { status: a, result: u });
14983
14983
  }
14984
14984
  }
14985
- function wf() {
14985
+ function bf() {
14986
14986
  let e = process.cwd(), t = pr.resolve(e, "go.mod"), { result: r } = F(`(test -f "main.go" || test -f "${t}") && echo "0"|| echo "1"`, "pipe");
14987
14987
  return r === "0";
14988
14988
  }
14989
- function Mf(e) {
14989
+ function Ef(e) {
14990
14990
  return /^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/.test(e);
14991
14991
  }
14992
- function If(e) {
14992
+ function vf(e) {
14993
14993
  return /^([\da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^::([\da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:):([\da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){2}:([\da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){3}:([\da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}$|^:((:[\da-fA-F]{1,4}){1,6}|:)$|^[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,5}|:)$|^([\da-fA-F]{1,4}:){2}((:[\da-fA-F]{1,4}){1,4}|:)$|^([\da-fA-F]{1,4}:){3}((:[\da-fA-F]{1,4}){1,3}|:)$|^([\da-fA-F]{1,4}:){4}((:[\da-fA-F]{1,4}){1,2}|:)$|^([\da-fA-F]{1,4}:){5}:([\da-fA-F]{1,4})?$|^([\da-fA-F]{1,4}:){6}:$/.test(e);
14994
14994
  }
14995
- function Tf(e) {
14995
+ function Cf(e) {
14996
14996
  return /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(e);
14997
14997
  }
14998
- function Sf(e) {
14998
+ function Af(e) {
14999
14999
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
15000
15000
  }
15001
- function Df(e) {
15001
+ function Lf(e) {
15002
15002
  return /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/.test(e);
15003
15003
  }
15004
- function Of(e) {
15004
+ function Rf(e) {
15005
15005
  return e == null;
15006
15006
  }
15007
- function Q(e) {
15007
+ function Z(e) {
15008
15008
  return typeof e == "object";
15009
15009
  }
15010
- function Ff(e = process.cwd()) {
15010
+ function $f(e = process.cwd()) {
15011
15011
  let t = lr.resolve(e.replace(/package.json$/, ""), "package.json"), { result: r } = F(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
15012
15012
  return r === "0";
15013
15013
  }
15014
- function $f(e) {
15014
+ function zf(e) {
15015
15015
  return /^[1-9][0-9]{5}$/.test(e.toString());
15016
15016
  }
15017
- function Hf(e) {
15017
+ function Uf(e) {
15018
15018
  return /^(\.\.\/|\.\/)/.test(e);
15019
15019
  }
15020
- function Vf() {
15020
+ function Yf() {
15021
15021
  let e = process.cwd(), t = gr.resolve(e, "Cargo.toml"), { result: r } = F(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
15022
15022
  return r === "0";
15023
15023
  }
15024
- function _f(e, t) {
15024
+ function Zf(e, t) {
15025
15025
  return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
15026
15026
  }
15027
- function Zf() {
15027
+ function qf() {
15028
15028
  return !!(navigator && (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia));
15029
15029
  }
15030
- function Xf() {
15030
+ function Gf() {
15031
15031
  try {
15032
15032
  return document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp") === 0;
15033
15033
  } catch (e) {
15034
15034
  return false;
15035
15035
  }
15036
15036
  }
15037
- function Jf(e) {
15037
+ function Kf(e) {
15038
15038
  return e === true;
15039
15039
  }
15040
- function ep(e) {
15040
+ function tp(e) {
15041
15041
  return /^http[s]?:\/\/.*/.test(e);
15042
15042
  }
15043
15043
  function st() {
@@ -15046,72 +15046,72 @@ function st() {
15046
15046
  function at(e) {
15047
15047
  return e.startsWith("ws://") || e.startsWith("wss://");
15048
15048
  }
15049
- function op(e) {
15049
+ function ip(e) {
15050
15050
  return /^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*/i.test(e);
15051
15051
  }
15052
- var sp = (e) => /^[GCDZTSPKXLY1-9]\d{1,4}$/.test(e);
15053
- var cp = (e) => /^(?:[\u4E00-\u9FA5·]{2,16})$/.test(e);
15054
- function up(e) {
15052
+ var ap = (e) => /^[GCDZTSPKXLY1-9]\d{1,4}$/.test(e);
15053
+ var mp = (e) => /^(?:[\u4E00-\u9FA5·]{2,16})$/.test(e);
15054
+ function fp(e) {
15055
15055
  return /(^[a-zA-Z][a-zA-Z\s]{0,20}[a-zA-Z]$)/.test(e);
15056
15056
  }
15057
- function pp(e) {
15057
+ function lp(e) {
15058
15058
  return /^[\u4E00-\u9FA5](字第)([0-9a-zA-Z]{4,8})(号?)$/.test(e);
15059
15059
  }
15060
15060
  var dr = /^[0-9]+$/;
15061
- function gp(e) {
15061
+ function dp(e) {
15062
15062
  return e.split(".").every((t) => dr.test(t));
15063
15063
  }
15064
- function hp(e) {
15064
+ function xp(e) {
15065
15065
  var t;
15066
15066
  return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "DIV";
15067
15067
  }
15068
- function yp(e) {
15068
+ function wp(e) {
15069
15069
  var t;
15070
15070
  return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "IFRAME";
15071
15071
  }
15072
- function bp(e) {
15072
+ function Mp(e) {
15073
15073
  var t;
15074
15074
  return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "IMG";
15075
15075
  }
15076
- function Ip(e) {
15076
+ function vp(e) {
15077
15077
  return e instanceof Node || j(e == null ? void 0 : e.nodeType);
15078
15078
  }
15079
- function Tp(e) {
15079
+ function Cp(e) {
15080
15080
  return toString.call(e) === "[object ProxyDocument]";
15081
15081
  }
15082
- function Sp(e) {
15082
+ function Ap(e) {
15083
15083
  var t;
15084
15084
  return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "SCRIPT";
15085
15085
  }
15086
- function Dp(e) {
15086
+ function Lp(e) {
15087
15087
  return typeof ShadowRoot < "u" && e instanceof ShadowRoot;
15088
15088
  }
15089
- function Op(e) {
15089
+ function Rp(e) {
15090
15090
  var t;
15091
15091
  return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "STYLE";
15092
15092
  }
15093
- function jp(e) {
15093
+ function Np(e) {
15094
15094
  return e.endsWith(".vue");
15095
15095
  }
15096
- function Fp(e) {
15096
+ function $p(e) {
15097
15097
  try {
15098
15098
  return ct.accessSync(e, ct.constants.W_OK), true;
15099
15099
  } catch (e2) {
15100
15100
  return false;
15101
15101
  }
15102
15102
  }
15103
- function $p(e) {
15103
+ function zp(e) {
15104
15104
  return /<! -{2,}.*?-{2,}>/.test(e);
15105
15105
  }
15106
- function Hp() {
15106
+ function Up() {
15107
15107
  return !document.hidden;
15108
15108
  }
15109
- function ig(e) {
15109
+ function sg(e) {
15110
15110
  return me(e, () => {
15111
15111
  console.groupCollapsed("childList or sub tree or attributes changed"), console.trace(), console.groupEnd();
15112
15112
  }, { childList: true, subtree: true, attributes: true });
15113
15113
  }
15114
- function cg(e) {
15114
+ function mg(e) {
15115
15115
  try {
15116
15116
  let t = E("textarea", { readonly: "readonly" }, e);
15117
15117
  document.body.appendChild(t), t.select();
@@ -15121,11 +15121,11 @@ function cg(e) {
15121
15121
  throw new Error(t);
15122
15122
  }
15123
15123
  }
15124
- function ug(e) {
15124
+ function fg(e) {
15125
15125
  let t = (...r) => r.length >= e.length ? e(...r) : (...n) => t(...r, ...n);
15126
15126
  return t;
15127
15127
  }
15128
- function pg(e) {
15128
+ function lg(e) {
15129
15129
  return new Promise((t) => setTimeout(t, e));
15130
15130
  }
15131
15131
  function mt(e, t) {
@@ -15140,7 +15140,7 @@ async function ut(e, t) {
15140
15140
  }
15141
15141
  return r;
15142
15142
  }
15143
- var yg = function(t, r, n) {
15143
+ var wg = function(t, r, n) {
15144
15144
  let o, i = ut(t, () => clearTimeout(o)), s = new Promise((a, c) => {
15145
15145
  o = setTimeout(() => c(new Error(n)), r);
15146
15146
  });
@@ -15148,7 +15148,7 @@ var yg = function(t, r, n) {
15148
15148
  };
15149
15149
  function ft() {
15150
15150
  }
15151
- function Eg(...e) {
15151
+ function Ig(...e) {
15152
15152
  return e.length === 0 ? ft : e.length === 1 ? e[0] : function(...t) {
15153
15153
  let r;
15154
15154
  for (let n of e)
@@ -15156,7 +15156,7 @@ function Eg(...e) {
15156
15156
  return r;
15157
15157
  };
15158
15158
  }
15159
- function Cg(e) {
15159
+ function Sg(e) {
15160
15160
  if (typeof Promise < "u")
15161
15161
  Promise.resolve().then(e);
15162
15162
  else if (typeof MutationObserver < "u") {
@@ -15165,7 +15165,7 @@ function Cg(e) {
15165
15165
  } else
15166
15166
  setTimeout(e);
15167
15167
  }
15168
- function Ag(e) {
15168
+ function Dg(e) {
15169
15169
  let t;
15170
15170
  return new Proxy(e, { construct(r, n) {
15171
15171
  return t || (t = new r(...n)), t;
@@ -15175,24 +15175,24 @@ function le(e) {
15175
15175
  let t = new Blob([`(${e.toString()})()`], { type: "text/javascript" });
15176
15176
  return URL.createObjectURL(t);
15177
15177
  }
15178
- function jg(e) {
15178
+ function Ng(e) {
15179
15179
  let t = new Worker(g(e) ? e : le(e)), r, n, o = (s) => r = s, i = (s) => n = s;
15180
15180
  return t.onerror = (s) => n == null ? void 0 : n(s), t.onmessage = (s) => r == null ? void 0 : r(s.data), { emit: (s) => t.postMessage(s), on: o, error: i };
15181
15181
  }
15182
15182
  function kg(e, t) {
15183
15183
  return "serviceWorker" in navigator ? navigator.serviceWorker.register(g(e) ? e : le(e), t) : Promise.reject(new Error("ServiceWorker not support"));
15184
15184
  }
15185
- var zg = () => false;
15186
- function Bg(e, t) {
15185
+ var Hg = () => false;
15186
+ function Wg(e, t) {
15187
15187
  let r = null;
15188
15188
  return function(n) {
15189
- k(r) || clearTimeout(r), r = setTimeout(() => {
15189
+ $(r) || clearTimeout(r), r = setTimeout(() => {
15190
15190
  let o = e.call(this, n);
15191
15191
  return r = null, o;
15192
15192
  }, t);
15193
15193
  };
15194
15194
  }
15195
- async function Vg(e) {
15195
+ async function Yg(e) {
15196
15196
  return new Promise((t) => {
15197
15197
  let { file: r, chunkSize: n = 5 * 1024 * 1024, callback: o } = e || {}, i = navigator.hardwareConcurrency || 4, s = [], a = Math.ceil(r.size / n), c = Math.ceil(a / i), u = 0;
15198
15198
  for (let m = 0; m < i; m++) {
@@ -15205,7 +15205,7 @@ async function Vg(e) {
15205
15205
  }
15206
15206
  });
15207
15207
  }
15208
- function _g(e = 50) {
15208
+ function Zg(e = 50) {
15209
15209
  return { set(t, r) {
15210
15210
  this.cache.has(t) && this.cache.delete(t), this.cache.set(t, r), this.cache.size > this.max && this.cache.delete(this.cache.keys().next().value);
15211
15211
  }, get(t) {
@@ -15218,7 +15218,7 @@ function _g(e = 50) {
15218
15218
  } };
15219
15219
  }
15220
15220
  var hr = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHdpZHRoPSI0MHB4IiBoZWlnaHQ9IjQwcHgiIHZpZXdCb3g9IjAgMCA0MCA0MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3BhY2U9InByZXNlcnZlIiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjE7IiB4PSIwcHgiIHk9IjBweCI+CiAgICA8ZGVmcz4KICAgICAgICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwhW0NEQVRBWwogICAgICAgICAgICBALXdlYmtpdC1rZXlmcmFtZXMgc3BpbiB7CiAgICAgICAgICAgICAgZnJvbSB7CiAgICAgICAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDBkZWcpCiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHRvIHsKICAgICAgICAgICAgICAgIC13ZWJraXQtdHJhbnNmb3JtOiByb3RhdGUoLTM1OWRlZykKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgQGtleWZyYW1lcyBzcGluIHsKICAgICAgICAgICAgICBmcm9tIHsKICAgICAgICAgICAgICAgIHRyYW5zZm9ybTogcm90YXRlKDBkZWcpCiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHRvIHsKICAgICAgICAgICAgICAgIHRyYW5zZm9ybTogcm90YXRlKC0zNTlkZWcpCiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHN2ZyB7CiAgICAgICAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybS1vcmlnaW46IDUwJSA1MCU7CiAgICAgICAgICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjogc3BpbiAxLjVzIGxpbmVhciBpbmZpbml0ZTsKICAgICAgICAgICAgICAgIC13ZWJraXQtYmFja2ZhY2UtdmlzaWJpbGl0eTogaGlkZGVuOwogICAgICAgICAgICAgICAgYW5pbWF0aW9uOiBzcGluIDEuNXMgbGluZWFyIGluZmluaXRlOwogICAgICAgICAgICB9CiAgICAgICAgXV0+PC9zdHlsZT4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJvdXRlciI+CiAgICAgICAgPGc+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMCwwQzIyLjIwNTgsMCAyMy45OTM5LDEuNzg4MTMgMjMuOTkzOSwzLjk5MzlDMjMuOTkzOSw2LjE5OTY4IDIyLjIwNTgsNy45ODc4MSAyMCw3Ljk4NzgxQzE3Ljc5NDIsNy45ODc4MSAxNi4wMDYxLDYuMTk5NjggMTYuMDA2MSwzLjk5MzlDMTYuMDA2MSwxLjc4ODEzIDE3Ljc5NDIsMCAyMCwwWiIgc3R5bGU9ImZpbGw6YmxhY2s7Ii8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8cGF0aCBkPSJNNS44NTc4Niw1Ljg1Nzg2QzcuNDE3NTgsNC4yOTgxNSA5Ljk0NjM4LDQuMjk4MTUgMTEuNTA2MSw1Ljg1Nzg2QzEzLjA2NTgsNy40MTc1OCAxMy4wNjU4LDkuOTQ2MzggMTEuNTA2MSwxMS41MDYxQzkuOTQ2MzgsMTMuMDY1OCA3LjQxNzU4LDEzLjA2NTggNS44NTc4NiwxMS41MDYxQzQuMjk4MTUsOS45NDYzOCA0LjI5ODE1LDcuNDE3NTggNS44NTc4Niw1Ljg1Nzg2WiIgc3R5bGU9ImZpbGw6cmdiKDIxMCwyMTAsMjEwKTsiLz4KICAgICAgICA8L2c+CiAgICAgICAgPGc+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMCwzMi4wMTIyQzIyLjIwNTgsMzIuMDEyMiAyMy45OTM5LDMzLjgwMDMgMjMuOTkzOSwzNi4wMDYxQzIzLjk5MzksMzguMjExOSAyMi4yMDU4LDQwIDIwLDQwQzE3Ljc5NDIsNDAgMTYuMDA2MSwzOC4yMTE5IDE2LjAwNjEsMzYuMDA2MUMxNi4wMDYxLDMzLjgwMDMgMTcuNzk0MiwzMi4wMTIyIDIwLDMyLjAxMjJaIiBzdHlsZT0iZmlsbDpyZ2IoMTMwLDEzMCwxMzApOyIvPgogICAgICAgIDwvZz4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHBhdGggZD0iTTI4LjQ5MzksMjguNDkzOUMzMC4wNTM2LDI2LjkzNDIgMzIuNTgyNCwyNi45MzQyIDM0LjE0MjEsMjguNDkzOUMzNS43MDE5LDMwLjA1MzYgMzUuNzAxOSwzMi41ODI0IDM0LjE0MjEsMzQuMTQyMUMzMi41ODI0LDM1LjcwMTkgMzAuMDUzNiwzNS43MDE5IDI4LjQ5MzksMzQuMTQyMUMyNi45MzQyLDMyLjU4MjQgMjYuOTM0MiwzMC4wNTM2IDI4LjQ5MzksMjguNDkzOVoiIHN0eWxlPSJmaWxsOnJnYigxMDEsMTAxLDEwMSk7Ii8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8cGF0aCBkPSJNMy45OTM5LDE2LjAwNjFDNi4xOTk2OCwxNi4wMDYxIDcuOTg3ODEsMTcuNzk0MiA3Ljk4NzgxLDIwQzcuOTg3ODEsMjIuMjA1OCA2LjE5OTY4LDIzLjk5MzkgMy45OTM5LDIzLjk5MzlDMS43ODgxMywyMy45OTM5IDAsMjIuMjA1OCAwLDIwQzAsMTcuNzk0MiAxLjc4ODEzLDE2LjAwNjEgMy45OTM5LDE2LjAwNjFaIiBzdHlsZT0iZmlsbDpyZ2IoMTg3LDE4NywxODcpOyIvPgogICAgICAgIDwvZz4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHBhdGggZD0iTTUuODU3ODYsMjguNDkzOUM3LjQxNzU4LDI2LjkzNDIgOS45NDYzOCwyNi45MzQyIDExLjUwNjEsMjguNDkzOUMxMy4wNjU4LDMwLjA1MzYgMTMuMDY1OCwzMi41ODI0IDExLjUwNjEsMzQuMTQyMUM5Ljk0NjM4LDM1LjcwMTkgNy40MTc1OCwzNS43MDE5IDUuODU3ODYsMzQuMTQyMUM0LjI5ODE1LDMyLjU4MjQgNC4yOTgxNSwzMC4wNTM2IDUuODU3ODYsMjguNDkzOVoiIHN0eWxlPSJmaWxsOnJnYigxNjQsMTY0LDE2NCk7Ii8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8cGF0aCBkPSJNMzYuMDA2MSwxNi4wMDYxQzM4LjIxMTksMTYuMDA2MSA0MCwxNy43OTQyIDQwLDIwQzQwLDIyLjIwNTggMzguMjExOSwyMy45OTM5IDM2LjAwNjEsMjMuOTkzOUMzMy44MDAzLDIzLjk5MzkgMzIuMDEyMiwyMi4yMDU4IDMyLjAxMjIsMjBDMzIuMDEyMiwxNy43OTQyIDMzLjgwMDMsMTYuMDA2MSAzNi4wMDYxLDE2LjAwNjFaIiBzdHlsZT0iZmlsbDpyZ2IoNzQsNzQsNzQpOyIvPgogICAgICAgIDwvZz4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHBhdGggZD0iTTI4LjQ5MzksNS44NTc4NkMzMC4wNTM2LDQuMjk4MTUgMzIuNTgyNCw0LjI5ODE1IDM0LjE0MjEsNS44NTc4NkMzNS43MDE5LDcuNDE3NTggMzUuNzAxOSw5Ljk0NjM4IDM0LjE0MjEsMTEuNTA2MUMzMi41ODI0LDEzLjA2NTggMzAuMDUzNiwxMy4wNjU4IDI4LjQ5MzksMTEuNTA2MUMyNi45MzQyLDkuOTQ2MzggMjYuOTM0Miw3LjQxNzU4IDI4LjQ5MzksNS44NTc4NloiIHN0eWxlPSJmaWxsOnJnYig1MCw1MCw1MCk7Ii8+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K";
15221
- function Gg(e, t = hr) {
15221
+ function Jg(e, t = hr) {
15222
15222
  return w(e, (r) => {
15223
15223
  v(["img", "video"], true, r).forEach((n) => {
15224
15224
  let o = n.dataset.src, i = o || n.src;
@@ -15231,7 +15231,7 @@ function Gg(e, t = hr) {
15231
15231
  });
15232
15232
  });
15233
15233
  }
15234
- function rd(e, t = 0) {
15234
+ function nd(e, t = 0) {
15235
15235
  let r = new Image(), n = E("video");
15236
15236
  return G(e.map((o) => fe(o) ? () => {
15237
15237
  n.src = o;
@@ -15265,7 +15265,7 @@ function U(e, t = 0, r = false) {
15265
15265
  }
15266
15266
  }), c;
15267
15267
  }
15268
- function ad(e) {
15268
+ function cd(e) {
15269
15269
  let t = false;
15270
15270
  return function(...r) {
15271
15271
  if (!t)
@@ -15273,7 +15273,7 @@ function ad(e) {
15273
15273
  };
15274
15274
  }
15275
15275
  var lt = /* @__PURE__ */ new Map();
15276
- function ud(e, t, r) {
15276
+ function fd(e, t, r) {
15277
15277
  return new Promise((n) => {
15278
15278
  let o = t * r, i = o + r, s = new import_spark_md5.default.ArrayBuffer(), a = new FileReader();
15279
15279
  a.onload = (c) => {
@@ -15285,7 +15285,7 @@ function ud(e, t, r) {
15285
15285
  }
15286
15286
  var yr = /<script .*src=["']([\w?=.\/@]+)["']><\/script>/gm;
15287
15287
  var ge;
15288
- function Sd(e = 2e3, t) {
15288
+ function Ad(e = 2e3, t) {
15289
15289
  return U(async () => {
15290
15290
  await br() && (console.log("\u9875\u9762\u6709\u66F4\u65B0"), t == null || t());
15291
15291
  }, e);
@@ -15333,7 +15333,7 @@ function Er(e) {
15333
15333
  }
15334
15334
  });
15335
15335
  }
15336
- async function Pd(e) {
15336
+ async function Fd(e) {
15337
15337
  return await gt(new Blob([e], { type: "image/*" }));
15338
15338
  }
15339
15339
  async function kd(e, t) {
@@ -15349,14 +15349,14 @@ async function kd(e, t) {
15349
15349
  }
15350
15350
  return r;
15351
15351
  }
15352
- function zd(e) {
15352
+ function Hd(e) {
15353
15353
  let t = 0, r = e.length - 1;
15354
15354
  return () => {
15355
15355
  let n = e[t];
15356
15356
  return t++, t > r && (t = 0), n;
15357
15357
  };
15358
15358
  }
15359
- async function Ud(e, t) {
15359
+ async function Bd(e, t) {
15360
15360
  try {
15361
15361
  return [void 0, await e];
15362
15362
  } catch (r) {
@@ -15368,19 +15368,20 @@ var de = class extends Error {
15368
15368
  super(t), this.name = "CustomerError";
15369
15369
  }
15370
15370
  };
15371
- function uh(e, t) {
15371
+ function fh(e, t) {
15372
15372
  throw new de(`[${e}] ${t}`);
15373
15373
  }
15374
- function fh(e, t) {
15374
+ function ph(e, t) {
15375
15375
  if (process.env.NODE_ENV !== "production") {
15376
15376
  let r = g(e) ? new de(`[${e}] ${t}`) : e;
15377
15377
  console.warn(r);
15378
15378
  }
15379
15379
  }
15380
- function dt(e, t = {}, r = "log") {
15381
- console[r]("%c%s", g(t) ? t : _(t, { sep: ";", eq: ":", hyp: true, px: true, encode: false }), e);
15380
+ function dt(e, t) {
15381
+ let { type: r = "log", style: n = "", args: o = [] } = t || {};
15382
+ console[r](`%c${e}`, g(n) ? n : Q(n, { sep: ";", eq: ":", hyp: true, px: true, encode: false }), ...o);
15382
15383
  }
15383
- function yh() {
15384
+ function wh() {
15384
15385
  return x(window, "error", (e) => {
15385
15386
  let { colno: t, lineno: r, error: n, filename: o, message: i } = e;
15386
15387
  if (i.toLowerCase().includes("script error"))
@@ -15390,10 +15391,10 @@ function yh() {
15390
15391
  `, `Line: ${r}
15391
15392
  `, `Column: ${t}
15392
15393
  `, `Error object: ${JSON.stringify(n)}`].join("-");
15393
- return dt(s, { color: "#337ecc", padding: "2px 10px", fontSize: 14, fontWeight: "bold" }, "error"), false;
15394
+ return dt(s, { style: { color: "#337ecc", padding: "2px 10px", fontSize: 14, fontWeight: "bold" }, type: "error" }), false;
15394
15395
  });
15395
15396
  }
15396
- function bh(e) {
15397
+ function Mh(e) {
15397
15398
  return new Promise((t, r) => {
15398
15399
  try {
15399
15400
  t(e());
@@ -15402,7 +15403,7 @@ function bh(e) {
15402
15403
  }
15403
15404
  });
15404
15405
  }
15405
- function Sh() {
15406
+ function Ah() {
15406
15407
  return { data: /* @__PURE__ */ Object.create(null), emit(e, t) {
15407
15408
  (this.data[e] || []).forEach((r) => r(t));
15408
15409
  }, on(e, t) {
@@ -15432,13 +15433,13 @@ function he(e, t) {
15432
15433
  return n.join("");
15433
15434
  }
15434
15435
  var De = "@simon_he/storage";
15435
- function jh(e) {
15436
+ function Nh(e) {
15436
15437
  return x(window, "storage", (t) => {
15437
15438
  let { key: r, newValue: n, oldValue: o } = t, i = r != null && r.startsWith(De) ? r.slice(De.length) : r;
15438
15439
  e(i, n, o);
15439
15440
  });
15440
15441
  }
15441
- function Nh(e, t) {
15442
+ function Ph(e, t) {
15442
15443
  localStorage.setItem(De + e, JSON.stringify({ value: t, __temp: he(6) }));
15443
15444
  }
15444
15445
  function kh(e, t) {
@@ -15446,7 +15447,7 @@ function kh(e, t) {
15446
15447
  let r = new WebSocket(e, t), n = (a) => r.addEventListener("message", a), o = (a) => r.addEventListener("open", a), i = (a) => r.addEventListener("close", a), s = (a) => r.addEventListener("error", a);
15447
15448
  return { socket: r, receive: n, send: r.send.bind(r), open: o, close: i, error: s };
15448
15449
  }
15449
- function Hh(e) {
15450
+ function Uh(e) {
15450
15451
  let t = new BroadcastChannel(e);
15451
15452
  t.listeners = /* @__PURE__ */ new Set(), t.id = Ir(e);
15452
15453
  let r = (n, o) => o.postMessage({ id: o.id, msg: n });
@@ -15459,7 +15460,7 @@ function Ir(e) {
15459
15460
  let t = `channel-${e}`, r = +((_a2 = localStorage.getItem(t)) != null ? _a2 : 0) + 1;
15460
15461
  return localStorage.setItem(t, r.toString()), r;
15461
15462
  }
15462
- function Zh() {
15463
+ function qh() {
15463
15464
  let e, t = 0;
15464
15465
  return U((r) => {
15465
15466
  t++, e || (e = r), r - e > 1e3 && (console.log("FPS:", Math.round(t * 1e3) / (r - e)), t = 0, e = r);
@@ -15480,13 +15481,13 @@ function vr() {
15480
15481
  console.log(e), console.log(performance.timing);
15481
15482
  }
15482
15483
  }
15483
- function Gh(e) {
15484
+ function Jh(e) {
15484
15485
  let t = (/* @__PURE__ */ new Date()).getTime();
15485
15486
  e();
15486
15487
  let n = ((/* @__PURE__ */ new Date()).getTime() - t) / 1e3;
15487
15488
  return console.log(`timeCost: ${n}s`), n;
15488
15489
  }
15489
- function Kh(e = false, t = 5e3, r = 0) {
15490
+ function ex(e = false, t = 5e3, r = 0) {
15490
15491
  return new Promise((n, o) => {
15491
15492
  navigator.geolocation ? navigator.geolocation.getCurrentPosition(Tr(n), Cr(o), { enableHighAccuracy: e, maximumAge: r, timeout: t }) : o(new Error("\u8BE5\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u5B9A\u4F4D\u529F\u80FD\uFF01"));
15492
15493
  });
@@ -15510,10 +15511,10 @@ function Cr(e) {
15510
15511
  }
15511
15512
  };
15512
15513
  }
15513
- function cx(e, t) {
15514
+ function mx(e, t) {
15514
15515
  return F(`cp -r {${e.join(",")}} ${t}`, "pipe");
15515
15516
  }
15516
- async function lx(e) {
15517
+ async function gx(e) {
15517
15518
  if (/[./]/.test(e))
15518
15519
  throw new Error("module must be a npm module");
15519
15520
  let t = xt.resolve(Sr.cwd(), "node_modules", e, "package.json"), { module: r, main: n } = JSON.parse(await ht.readFile(t, "utf-8")), o = xt.resolve(`./node_modules/${e}`, r || n);
@@ -15528,7 +15529,7 @@ async function wt(e = "./package.json") {
15528
15529
  throw new Error(`${t} is not a file`);
15529
15530
  return JSON.parse(await Ar.readFile(t, "utf-8"));
15530
15531
  }
15531
- async function vx() {
15532
+ async function Tx() {
15532
15533
  let e = await wt() || {}, { packageManager: t } = e;
15533
15534
  if (t) {
15534
15535
  let r = t.split("@")[0].replace(/[\~\^]/, "");
@@ -15548,34 +15549,35 @@ async function vx() {
15548
15549
  return "npm";
15549
15550
  }
15550
15551
  }
15551
- function Sx() {
15552
+ function Ax() {
15552
15553
  var e, t;
15553
15554
  return (t = (e = Dr) == null ? void 0 : e.argv) == null ? void 0 : t.slice(2).reduce((r, n) => {
15554
15555
  let [o, i] = n.split("=");
15555
15556
  return r[o.slice(2)] = i || true, r;
15556
15557
  }, {});
15557
15558
  }
15558
- async function Fx(e, t) {
15559
- let r = "../node_modules/lazy-js-utils/dist/worker/useNodeWorkerThread.cjs", n = "./worker/useNodeWorkerThread.cjs";
15560
- st() && (r = r.replaceAll("/", "\\"), n = n.replaceAll("/", "\\")), t = t || bt.resolve(__dirname, n), t.includes("node_modules") || (t = bt.resolve(__dirname, r));
15561
- let { params: o } = g(e) ? e = { params: e } : e, i = M(o) ? o : o.split("&&"), s = await mt(i, (c) => a(Object.assign(e, { params: c })));
15562
- return setTimeout(Lr.exit), s.length === 1 ? s[0] : s;
15563
- function a(c) {
15564
- let { Worker: u } = Mt;
15565
- return new Promise((m) => {
15566
- let f = new u(t);
15567
- f.on("message", m), f.postMessage(c);
15559
+ var Or = Mt.cwd();
15560
+ async function $x(e, t) {
15561
+ let r = "./node_modules/lazy-js-utils/dist/worker/useNodeWorkerThread.cjs";
15562
+ st() && (r = r.replaceAll("/", "\\")), t = t || Lr.resolve(Or, r);
15563
+ let { params: n } = g(e) ? e = { params: e } : e, o = M(n) ? n : n.split("&&"), i = await mt(o, (a) => s(Object.assign(e, { params: a })));
15564
+ return setTimeout(Mt.exit), i.length === 1 ? i[0] : i;
15565
+ function s(a) {
15566
+ let { Worker: c } = bt;
15567
+ return new Promise((u) => {
15568
+ let m = new c(t);
15569
+ m.on("message", u), m.postMessage(a);
15568
15570
  });
15569
15571
  }
15570
15572
  }
15571
15573
  function kx(e) {
15572
- let { parentPort: t } = Mt;
15574
+ let { parentPort: t } = bt;
15573
15575
  t.on("message", async (r) => t == null ? void 0 : t.postMessage(await (e == null ? void 0 : e(r)) || (() => "")));
15574
15576
  }
15575
- function zx(e, t) {
15577
+ function Hx(e, t) {
15576
15578
  return Object.assign(t, { displayName: e });
15577
15579
  }
15578
- function Wx(e, t, r = "utf-8") {
15580
+ function Vx(e, t, r = "utf-8") {
15579
15581
  g(e) && (e = [e]), e.forEach(async (n, o) => {
15580
15582
  let i = await Et.readFile(n, r), s = (t == null ? void 0 : t(i, o)) || i;
15581
15583
  Et.writeFile(n, s).catch((a) => {
@@ -15583,11 +15585,11 @@ function Wx(e, t, r = "utf-8") {
15583
15585
  });
15584
15586
  });
15585
15587
  }
15586
- function Qx(e) {
15587
- let t = Or.resolve(e, "package.json"), { result: r } = F(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
15588
+ function _x(e) {
15589
+ let t = Rr.resolve(e, "package.json"), { result: r } = F(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
15588
15590
  return r === "0";
15589
15591
  }
15590
- function Xx(e) {
15592
+ function Gx(e) {
15591
15593
  let { status: t } = F(`if ! command -v ${e} &> /dev/null; then
15592
15594
  exit 1
15593
15595
  else
@@ -15595,14 +15597,14 @@ else
15595
15597
  fi`);
15596
15598
  return t === 0;
15597
15599
  }
15598
- var uy = { add(...e) {
15600
+ var fy = { add(...e) {
15599
15601
  return e.reduce((t, r) => It(+t, +r));
15600
15602
  }, sub(...e) {
15601
15603
  return e.reduce((t, r) => It(+t, -r));
15602
15604
  }, mul(...e) {
15603
- return e.reduce((t, r) => Rr(+t, +r));
15604
- }, div(...e) {
15605
15605
  return e.reduce((t, r) => jr(+t, +r));
15606
+ }, div(...e) {
15607
+ return e.reduce((t, r) => Nr(+t, +r));
15606
15608
  } };
15607
15609
  function It(e, t) {
15608
15610
  let r, n;
@@ -15619,7 +15621,7 @@ function It(e, t) {
15619
15621
  let o = 10 ** Math.max(r, n);
15620
15622
  return (e * o + t * o) / o;
15621
15623
  }
15622
- function Rr(e, t) {
15624
+ function jr(e, t) {
15623
15625
  let r = 0, n = e.toString(), o = t.toString();
15624
15626
  try {
15625
15627
  r += n.split(".")[1].length;
@@ -15631,7 +15633,7 @@ function Rr(e, t) {
15631
15633
  }
15632
15634
  return Number(n.replace(".", "")) * Number(o.replace(".", "")) / 10 ** r;
15633
15635
  }
15634
- function jr(e, t) {
15636
+ function Nr(e, t) {
15635
15637
  let r = 0, n = 0;
15636
15638
  try {
15637
15639
  r = e.toString().split(".")[1].length;
@@ -15644,7 +15646,7 @@ function jr(e, t) {
15644
15646
  let o = Number(e.toString().replace(".", "")), i = Number(t.toString().replace(".", ""));
15645
15647
  return o / i * 10 ** (n - r);
15646
15648
  }
15647
- function py(e, t = 2, r = "ceil") {
15649
+ function ly(e, t = 2, r = "ceil") {
15648
15650
  e = `${e}`.replace(/[^0-9+-Ee.]/g, "");
15649
15651
  let n = isFinite(+e) ? +e : 0, o = isFinite(+t) ? Math.abs(t) : 0, i = ",", s = ".", a = (o ? u(n, o) : `${Math.round(n)}`).split("."), c = /(-?\d+)(\d{3})/;
15650
15652
  for (; c.test(a[0]); )
@@ -15655,7 +15657,7 @@ function py(e, t = 2, r = "ceil") {
15655
15657
  return `${r === "ceil" ? Math.ceil(m * p) / p : Math.floor(m * p) / p}`;
15656
15658
  }
15657
15659
  }
15658
- function gy(e) {
15660
+ function dy(e) {
15659
15661
  let t = ["\u89D2", "\u5206"], r = ["\u96F6", "\u58F9", "\u8D30", "\u53C1", "\u8086", "\u4F0D", "\u9646", "\u67D2", "\u634C", "\u7396"], n = [["\u5143", "\u4E07", "\u4EBF"], ["", "\u62FE", "\u4F70", "\u4EDF"]], o = e < 0 ? "\u6B20" : "";
15660
15662
  e = Math.abs(e);
15661
15663
  let i = "";
@@ -15670,10 +15672,10 @@ function gy(e) {
15670
15672
  }
15671
15673
  return o + i.replace(/(零.)*零元/, "\u5143").replace(/(零.)+/g, "\u96F6").replace(/^整$/, "\u96F6\u5143\u6574");
15672
15674
  }
15673
- function xy(e, t) {
15675
+ function yy(e, t) {
15674
15676
  return j(e) ? e * t : e.repeat(t);
15675
15677
  }
15676
- function wy(e) {
15678
+ function by(e) {
15677
15679
  return +e % 2 === 0;
15678
15680
  }
15679
15681
  function J(e, ...t) {
@@ -15688,13 +15690,13 @@ function J(e, ...t) {
15688
15690
  }), e;
15689
15691
  }
15690
15692
  var vt = /(\w+)\[(\w+)\]/;
15691
- function Dy(e, t, r) {
15693
+ function Ly(e, t, r) {
15692
15694
  return Object.keys(e).reduce((n, o) => {
15693
15695
  let i = e[o];
15694
- return Nr(i[r], n, i[t]);
15696
+ return Pr(i[r], n, i[t]);
15695
15697
  }, {});
15696
15698
  }
15697
- function Nr(e, t, r) {
15699
+ function Pr(e, t, r) {
15698
15700
  let n = e.split(".");
15699
15701
  return n.reduce((o, i, s) => {
15700
15702
  var _a2;
@@ -15703,8 +15705,8 @@ function Nr(e, t, r) {
15703
15705
  else if (vt.test(i)) {
15704
15706
  let a;
15705
15707
  return i.replace(vt, (c, u, m) => {
15706
- var _a3, _b;
15707
- o[u] = (_a3 = o[u]) != null ? _a3 : [], a = o[u][m] = (_b = o[u][m]) != null ? _b : {};
15708
+ var _a3, _b2;
15709
+ o[u] = (_a3 = o[u]) != null ? _a3 : [], a = o[u][m] = (_b2 = o[u][m]) != null ? _b2 : {};
15708
15710
  }), a;
15709
15711
  } else if (s !== n.length - 1)
15710
15712
  return o[i] = (_a2 = o[i]) != null ? _a2 : {};
@@ -15712,8 +15714,8 @@ function Nr(e, t, r) {
15712
15714
  }, t), t;
15713
15715
  }
15714
15716
  var K = /(\w+)\[(\w+)\]/;
15715
- function jy(e, t, r = false) {
15716
- let n = Object.keys(t).reduce((a, c) => (a[t[c]] = Pr(c, e), a), {});
15717
+ function Ny(e, t, r = false) {
15718
+ let n = Object.keys(t).reduce((a, c) => (a[t[c]] = Fr(c, e), a), {});
15717
15719
  if (!r)
15718
15720
  return n;
15719
15721
  let o = Object.keys(t), i = JSON.parse(JSON.stringify(e));
@@ -15730,17 +15732,17 @@ function jy(e, t, r = false) {
15730
15732
  let s = Le(i);
15731
15733
  return Object.assign(s, n);
15732
15734
  }
15733
- function Ny(e, t, r = false) {
15734
- let n = Object.entries(t).reduce((s, [a, c]) => Fr(a, s, e[c]), {});
15735
+ function Py(e, t, r = false) {
15736
+ let n = Object.entries(t).reduce((s, [a, c]) => $r(a, s, e[c]), {});
15735
15737
  if (!r)
15736
15738
  return n;
15737
15739
  let o = Object.values(t), i = Object.keys(e).filter((s) => !o.includes(s)).reduce((s, a) => (s[a] = e[a], s), {});
15738
15740
  return Object.assign(i, n);
15739
15741
  }
15740
- function Pr(e, t) {
15742
+ function Fr(e, t) {
15741
15743
  return e.split(".").reduce((r, n) => K.test(n) ? JSON.parse(n.replace(K, (o, i, s) => JSON.stringify(r[i][s]))) : r[n], t);
15742
15744
  }
15743
- function Fr(e, t, r) {
15745
+ function $r(e, t, r) {
15744
15746
  let n = e.split(".");
15745
15747
  return n.reduce((o, i, s) => {
15746
15748
  var _a2;
@@ -15749,8 +15751,8 @@ function Fr(e, t, r) {
15749
15751
  else if (K.test(i)) {
15750
15752
  let a;
15751
15753
  return i.replace(K, (c, u, m) => {
15752
- var _a3, _b;
15753
- o[u] = (_a3 = o[u]) != null ? _a3 : [], a = o[u][m] = (_b = o[u][m]) != null ? _b : {};
15754
+ var _a3, _b2;
15755
+ o[u] = (_a3 = o[u]) != null ? _a3 : [], a = o[u][m] = (_b2 = o[u][m]) != null ? _b2 : {};
15754
15756
  }), a;
15755
15757
  } else if (s !== n.length - 1)
15756
15758
  return o[i] = (_a2 = o[i]) != null ? _a2 : {};
@@ -15764,8 +15766,8 @@ function Le(e) {
15764
15766
  }
15765
15767
  return e;
15766
15768
  }
15767
- function $y(e, t) {
15768
- return Q(e) ? M(e) ? e.map((r) => Tt(r, t)) : Tt(e, t) : e;
15769
+ function zy(e, t) {
15770
+ return Z(e) ? M(e) ? e.map((r) => Tt(r, t)) : Tt(e, t) : e;
15769
15771
  }
15770
15772
  function Tt(e, t) {
15771
15773
  for (let r in t) {
@@ -15774,8 +15776,8 @@ function Tt(e, t) {
15774
15776
  }
15775
15777
  return e;
15776
15778
  }
15777
- function By(e, t = {}) {
15778
- return Q(e) && (M(e) ? e.forEach((r, n) => Ct(r, n, t)) : Ct(e, 0, t)), e;
15779
+ function Wy(e, t = {}) {
15780
+ return Z(e) && (M(e) ? e.forEach((r, n) => Ct(r, n, t)) : Ct(e, 0, t)), e;
15779
15781
  }
15780
15782
  function Ct(e, t, r = {}) {
15781
15783
  for (let n in r) {
@@ -15785,19 +15787,19 @@ function Ct(e, t, r = {}) {
15785
15787
  }
15786
15788
  var kr = [Set, Map, WeakMap, WeakSet, RegExp, Date];
15787
15789
  var Oe = /* @__PURE__ */ new WeakMap();
15788
- function $r(e) {
15790
+ function zr(e) {
15789
15791
  if (Oe.has(e))
15790
15792
  return Oe.get(e);
15791
- if (D(e) || k(e))
15793
+ if (D(e) || $(e))
15792
15794
  return e;
15793
15795
  if (kr.includes(e.constructor))
15794
15796
  return new e.constructor(e);
15795
- if (!Q(e))
15797
+ if (!Z(e))
15796
15798
  return e;
15797
15799
  let t = Object.create(Object.getPrototypeOf(e), Object.getOwnPropertyDescriptors(e));
15798
15800
  Oe.set(e, t);
15799
15801
  for (let r of Reflect.ownKeys(e))
15800
- Q(e[r]) ? t[r] = $r(e[r]) : t[r] = e[r];
15802
+ Z(e[r]) ? t[r] = zr(e[r]) : t[r] = e[r];
15801
15803
  return t;
15802
15804
  }
15803
15805
  function St(e, t, r, n = [], o = [], i, s) {
@@ -15822,25 +15824,25 @@ function St(e, t, r, n = [], o = [], i, s) {
15822
15824
  }
15823
15825
  return { error: n, errorMsg: o };
15824
15826
  }
15825
- function c0(e, t = {}) {
15827
+ function m0(e, t = {}) {
15826
15828
  let { sep: r = "&", eq: n = "=", camel: o = false } = t;
15827
15829
  return e.split(r).reduce((i, s) => {
15828
15830
  let [a, c] = s.split(n);
15829
15831
  return o ? i[Be(a)] = c : i[a] = c, i;
15830
15832
  }, {});
15831
15833
  }
15832
- function u0(e) {
15834
+ function f0(e) {
15833
15835
  let t = /[\n\s]*([.#][\w\-_ .#\>\+\&]+){[\n\s]*([ :;\w\-\n]*)+}[\n\s]*/gm, r = /\s{2,}/g, n = {};
15834
15836
  return e.replace(t, (o, i, s) => (n[i.replace(r, " ").trim()] = s.replace(/\n\s*/g, ""), o)), n;
15835
15837
  }
15836
- var zr = /^\w+:(\/\/)?/;
15837
- var Hr = /^\/\/[^/]+/;
15838
- function Ur(e, t = false) {
15839
- return zr.test(e) || t && Hr.test(e);
15838
+ var Hr = /^\w+:(\/\/)?/;
15839
+ var Ur = /^\/\/[^/]+/;
15840
+ function Br(e, t = false) {
15841
+ return Hr.test(e) || t && Ur.test(e);
15840
15842
  }
15841
- function Br(e = "", t) {
15842
- if (!Ur(e, true))
15843
- return t ? Br(t + e) : At(e);
15843
+ function Wr(e = "", t) {
15844
+ if (!Br(e, true))
15845
+ return t ? Wr(t + e) : At(e);
15844
15846
  let [r = "", n, o = ""] = (e.replace(/\\/g, "/").match(/([^:/]+:)?\/\/([^/@]+@)?(.*)/) || []).splice(1), [i = "", s = ""] = (o.match(/([^/?#]*)(.*)?/) || []).splice(1), { pathname: a, search: c, hash: u } = At(s);
15845
15847
  return { protocol: r, auth: n ? n.substr(0, n.length - 1) : "", host: i, pathname: a, search: c, hash: u };
15846
15848
  }
@@ -15848,7 +15850,7 @@ function At(e = "") {
15848
15850
  let [t = "", r = "", n = ""] = (e.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
15849
15851
  return { pathname: t, search: r, hash: n };
15850
15852
  }
15851
- function w0(e, t, r) {
15853
+ function b0(e, t, r) {
15852
15854
  return new Promise((n, o) => {
15853
15855
  let i;
15854
15856
  it(e) ? i = "toCanvas" : t ? i = "toDataURL" : i = "toString", import_qrcode.default[i](e, r, (s, a) => {
@@ -15856,17 +15858,17 @@ function w0(e, t, r) {
15856
15858
  });
15857
15859
  });
15858
15860
  }
15859
- function I0(e = "1999/01/1", t) {
15861
+ function v0(e = "1999/01/1", t) {
15860
15862
  let r = /* @__PURE__ */ new Date(), n = e.includes("/") ? "/" : "-", [o, i, s] = (t || "").split(n), a = +o || r.getFullYear(), c = +i || r.getMonth() + 1, u = +s || r.getDate(), [m, f, p] = e.split("/"), d2 = new Date(+m, +f, +p).getTime(), y = new Date(a, c, u).getTime();
15861
15863
  return new Date(d2 + Math.round(Math.random() * (y - d2)));
15862
15864
  }
15863
- function T0() {
15865
+ function C0() {
15864
15866
  return `#${(Math.random() * 1048575 * 1e6).toString(16).slice(0, 6)}`;
15865
15867
  }
15866
- function S0(e = 1) {
15868
+ function A0(e = 1) {
15867
15869
  return `rgba(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255}, ${e})`;
15868
15870
  }
15869
- function D0(e) {
15871
+ function L0(e) {
15870
15872
  for (let t = e.length - 1; t > 0; t--) {
15871
15873
  let r = Math.floor(Math.random() * (t + 1));
15872
15874
  [e[t], e[r]] = [e[r], e[t]];
@@ -15874,7 +15876,7 @@ function D0(e) {
15874
15876
  return e;
15875
15877
  }
15876
15878
  var te = /* @__PURE__ */ new Map();
15877
- var Z = class {
15879
+ var _ = class {
15878
15880
  constructor(t) {
15879
15881
  __publicField(this, "config");
15880
15882
  let { baseURL: r = "", headers: n = {}, timeout: o = 20 * 1e3, interceptors: i } = t || {};
@@ -15882,14 +15884,14 @@ var Z = class {
15882
15884
  }
15883
15885
  init(t) {
15884
15886
  let { url: r, method: n = "GET", headers: o = {}, bodyType: i = "json", params: s = {}, credentials: a = "omit", integrity: c, referrerPolicy: u = "no-referrer-when-downgrade", referrer: m = "", responseType: f = "json", keepalive: p = false, timeout: d2, transformResponse: y, cache: l = "default", redirect: h = "follow", mode: b = "no-cors" } = t;
15885
- return this.config = Object.assign(this.config, { url: r != null && r.startsWith("http") ? r : (this.config.baseURL || "") + (r || ""), method: n, bodyType: i, credentials: a, responseType: f, timeout: d2 || this.config.timeout, transformResponse: y, cache: l, redirect: h, mode: b, body: s, keepalive: p, integrity: c, referrerPolicy: u, referrer: m, headers: Object.assign({ "Content-Type": "application/json" }, this.config.headers, o) }), this.config.method === "GET" && (Object.keys(s).length && (this.config.url += `?${_(s)}`), this.config.body = void 0), this.request();
15887
+ return this.config = Object.assign(this.config, { url: r != null && r.startsWith("http") ? r : (this.config.baseURL || "") + (r || ""), method: n, bodyType: i, credentials: a, responseType: f, timeout: d2 || this.config.timeout, transformResponse: y, cache: l, redirect: h, mode: b, body: s, keepalive: p, integrity: c, referrerPolicy: u, referrer: m, headers: Object.assign({ "Content-Type": "application/json" }, this.config.headers, o) }), this.config.method === "GET" && (Object.keys(s).length && (this.config.url += `?${Q(s)}`), this.config.body = void 0), this.request();
15886
15888
  }
15887
15889
  request() {
15888
15890
  var f, p, d2, y, l;
15889
15891
  let t = new AbortController(), r = t.signal;
15890
15892
  this.config.signal = r, this.config.cancel = () => t.abort();
15891
15893
  let { body: n, method: o, bodyType: i, url: s, timeout: a, responseType: c, transformResponse: u } = this.config;
15892
- n && o !== "GET" && (i === "form" ? (J(this.config.headers, { "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" }), this.config.body = _(n)) : i === "file" ? (J(this.config.headers, { "Content-Type": "multipart/form-data" }), this.config.body = Object.keys(n).reduce((h, b) => (h.append(b, n[b]), h), new FormData())) : i === "json" && (this.config.body = JSON.stringify(n)));
15894
+ n && o !== "GET" && (i === "form" ? (J(this.config.headers, { "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" }), this.config.body = Q(n)) : i === "file" ? (J(this.config.headers, { "Content-Type": "multipart/form-data" }), this.config.body = Object.keys(n).reduce((h, b) => (h.append(b, n[b]), h), new FormData())) : i === "json" && (this.config.body = JSON.stringify(n)));
15893
15895
  let m = Re(this.config);
15894
15896
  return te.has(m) && ((f = te.get(m)) == null || f()), te.set(m, this.config.cancel), Promise.race([fetch(s, ((l = (y = (d2 = (p = this.config) == null ? void 0 : p.interceptors) == null ? void 0 : d2.request) == null ? void 0 : y.success) == null ? void 0 : l.call(y, this.config)) || this.config), new Promise((h) => {
15895
15897
  setTimeout(() => {
@@ -15925,16 +15927,16 @@ var Z = class {
15925
15927
  }
15926
15928
  get(t, r) {
15927
15929
  let { retry: n = 0 } = r || {};
15928
- return Dt(() => new Z(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "GET" })), n);
15930
+ return Dt(() => new _(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "GET" })), n);
15929
15931
  }
15930
15932
  post(t, r) {
15931
- return new Z(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "post" }));
15933
+ return new _(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "post" }));
15932
15934
  }
15933
15935
  put(t, r) {
15934
- return g(r) && (r = { url: r }), new Z(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "put" }));
15936
+ return g(r) && (r = { url: r }), new _(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "put" }));
15935
15937
  }
15936
15938
  delete(t, r) {
15937
- return g(r) && (r = { url: r }), new Z(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "delete" }));
15939
+ return g(r) && (r = { url: r }), new _(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "delete" }));
15938
15940
  }
15939
15941
  };
15940
15942
  function Re(e) {
@@ -15950,7 +15952,7 @@ function Dt(e, t, r = 0, n, o) {
15950
15952
  });
15951
15953
  });
15952
15954
  }
15953
- function B0(e = 4, t) {
15955
+ function W0(e = 4, t) {
15954
15956
  let r = t.length, n = [], o = 0, i = new Array(e).fill(0);
15955
15957
  return i = i.map(() => new Promise((s, a) => {
15956
15958
  let c = () => {
@@ -15964,10 +15966,10 @@ function B0(e = 4, t) {
15964
15966
  c();
15965
15967
  })), Promise.all(i).then(() => n);
15966
15968
  }
15967
- function Y0(e, t) {
15969
+ function Q0(e, t) {
15968
15970
  return x(document, "visibilitychange", () => document.visibilityState === "hidden" && navigator.sendBeacon(e, t));
15969
15971
  }
15970
- function G0() {
15972
+ function J0() {
15971
15973
  try {
15972
15974
  let e = parent.documentElement, t = (e == null ? void 0 : e.cancelFullScreen) || (e == null ? void 0 : e.webkitCancelFullScreen) || (e == null ? void 0 : e.mozCancelFullScreen) || (e == null ? void 0 : e.exitFullScreen);
15973
15975
  if (t)
@@ -15978,7 +15980,7 @@ function G0() {
15978
15980
  throw new Error(e);
15979
15981
  }
15980
15982
  }
15981
- function K0() {
15983
+ function ew() {
15982
15984
  try {
15983
15985
  let e = document.documentElement, t = e.requestFullScreen || e.webkitRequestFullScreen || e.mozRequestFullScreen || e.msRequestFullScreen;
15984
15986
  if (t)
@@ -15989,7 +15991,7 @@ function K0() {
15989
15991
  throw new Error(e);
15990
15992
  }
15991
15993
  }
15992
- function nw(e) {
15994
+ function ow(e) {
15993
15995
  return async () => {
15994
15996
  if (g(e) && (e = v(e) || e), g(e))
15995
15997
  throw new Error(`${e} is not a HTMLVideoElement`);
@@ -16000,7 +16002,7 @@ function nw(e) {
16000
16002
  }
16001
16003
  };
16002
16004
  }
16003
- function cw(e, t) {
16005
+ function mw(e, t) {
16004
16006
  return new Promise((r, n) => {
16005
16007
  navigator.mediaDevices.getDisplayMedia({ video: true }).then(o, n);
16006
16008
  function o(i) {
@@ -16009,7 +16011,7 @@ function cw(e, t) {
16009
16011
  }
16010
16012
  });
16011
16013
  }
16012
- function lw(e = { width: 640, height: 480 }, t = "video", r) {
16014
+ function gw(e = { width: 640, height: 480 }, t = "video", r) {
16013
16015
  if (!navigator)
16014
16016
  return console.error("Not support navigator");
16015
16017
  B(e) && (r = e, e = { width: 640, height: 480 });
@@ -16020,13 +16022,13 @@ function lw(e = { width: 640, height: 480 }, t = "video", r) {
16020
16022
  n.srcObject = o, r && (n.onloadedmetadata = () => n.play());
16021
16023
  }), () => n ? n.paused ? n.play() : n.pause() : r = true;
16022
16024
  }
16023
- function dw(e = {}) {
16025
+ function hw(e = {}) {
16024
16026
  if (!navigator || !navigator.canShare)
16025
16027
  throw new Error("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u5206\u4EAB");
16026
16028
  if (!e.files || navigator.canShare({ files: e.files }))
16027
16029
  return navigator.share(e);
16028
16030
  }
16029
- function ww(e = [], t) {
16031
+ function bw(e = [], t) {
16030
16032
  let r = E("video"), { controls: n = true, width: o, height: i, className: s, style: a } = t, c = t.container;
16031
16033
  return r.controls = n, o && (r.width = o), i && (r.height = i), s && (r.className = s), a && (r.style.cssText = a), x(document, "DOMContentLoaded", m), x(r, "timeupdate", () => r.currentTime >= r.duration && u()), { play() {
16032
16034
  r.paused ? r.play() : r.pause();
@@ -16048,7 +16050,7 @@ function ww(e = [], t) {
16048
16050
  }), c.appendChild(r);
16049
16051
  }
16050
16052
  }
16051
- async function Ew(e = String((/* @__PURE__ */ new Date()).getTime())) {
16053
+ async function Iw(e = String((/* @__PURE__ */ new Date()).getTime())) {
16052
16054
  let t = await navigator.mediaDevices.getDisplayMedia({ video: true }), r = await navigator.mediaDevices.getUserMedia({ audio: true }), n = [];
16053
16055
  t.getVideoTracks().forEach((a) => n.push(a)), r.getAudioTracks().forEach((a) => n.push(a));
16054
16056
  let o = new MediaStream(n), i = new MediaRecorder(o), s = [];
@@ -16064,12 +16066,12 @@ async function Ew(e = String((/* @__PURE__ */ new Date()).getTime())) {
16064
16066
  function Lt(e) {
16065
16067
  return M(e) ? e : [e];
16066
16068
  }
16067
- function Aw(e, t = "zh") {
16068
- let r = Lt(e).map((n) => Yr(n)).join(`
16069
+ function Dw(e, t = "zh") {
16070
+ let r = Lt(e).map((n) => Qr(n)).join(`
16069
16071
  `);
16070
- _r(r, t);
16072
+ Zr(r, t);
16071
16073
  }
16072
- function Yr(e) {
16074
+ function Qr(e) {
16073
16075
  let { start: t, end: r, left: n, top: o, content: i, duration: s } = e, a = Ot(t), c = Ot(r || t + (s != null ? s : 0));
16074
16076
  return `${a} --> ${c} line:${n}% position:${o}% ${i}`;
16075
16077
  }
@@ -16083,10 +16085,10 @@ function xe(e, t) {
16083
16085
  let r = t - String(e).length;
16084
16086
  return "0".repeat(r) + e;
16085
16087
  }
16086
- function _r(e, t) {
16087
- Vr.writeFile(`${t}.vtt`, e, "utf-8");
16088
+ function Zr(e, t) {
16089
+ Yr.writeFile(`${t}.vtt`, e, "utf-8");
16088
16090
  }
16089
- function jw(e) {
16091
+ function Nw(e) {
16090
16092
  if (!navigator)
16091
16093
  return console.error("Not support navigator");
16092
16094
  let t = false, r, n;
@@ -16126,11 +16128,11 @@ function kw(e, t) {
16126
16128
  };
16127
16129
  });
16128
16130
  }
16129
- function Jw(e) {
16131
+ function Kw(e) {
16130
16132
  let t = E("link", { rel: "stylesheet", href: e, type: "text/css" });
16131
16133
  return document.head.appendChild(t), () => document.head.removeChild(t);
16132
16134
  }
16133
- function tb(e) {
16135
+ function rb(e) {
16134
16136
  var t;
16135
16137
  try {
16136
16138
  let r = document.getElementsByTagName("script")[0], n = E("script", { type: "text/javascript", src: e, async: "" });
@@ -16142,10 +16144,10 @@ function tb(e) {
16142
16144
  throw new Error(r);
16143
16145
  }
16144
16146
  }
16145
- function cb(e = window) {
16147
+ function mb(e = window) {
16146
16148
  return { x: e.scrollX, y: e.scrollY };
16147
16149
  }
16148
- function pb() {
16150
+ function lb() {
16149
16151
  try {
16150
16152
  let e, t = U(() => {
16151
16153
  let r = document.documentElement.scrollTop || document.body.scrollTop;
@@ -16155,7 +16157,7 @@ function pb() {
16155
16157
  throw new Error(e);
16156
16158
  }
16157
16159
  }
16158
- function hb(e, t) {
16160
+ function xb(e, t) {
16159
16161
  try {
16160
16162
  if (g(e) && (e = v(e)), !e)
16161
16163
  return;
@@ -16164,17 +16166,17 @@ function hb(e, t) {
16164
16166
  throw new Error(r);
16165
16167
  }
16166
16168
  }
16167
- function bb(e, t = 40) {
16169
+ function Mb(e, t = 40) {
16168
16170
  let r = pt(e, t);
16169
- return x(window, "scroll", () => r(Qr()));
16171
+ return x(window, "scroll", () => r(_r()));
16170
16172
  }
16171
- function Qr() {
16173
+ function _r() {
16172
16174
  let e = document.body.scrollHeight || document.documentElement.scrollHeight, t = document.documentElement.clientHeight || document.body.clientHeight, r = e - t;
16173
16175
  return `${(document.documentElement.scrollTop || document.body.scrollTop) / r * 100}%`;
16174
16176
  }
16175
16177
  var ye;
16176
16178
  var Rt = { text: "", lang: "zh-CN", volume: 1, rate: 1, pitch: 0.5, voice: null };
16177
- function Db(e) {
16179
+ function Lb(e) {
16178
16180
  let t = jt(e), r = true, n = () => speechSynthesis.cancel();
16179
16181
  return Xe(n), { cancel: n, pause: () => speechSynthesis.pause(), resume: () => speechSynthesis.resume(), speak: (o) => {
16180
16182
  if (g(o)) {
@@ -16194,7 +16196,7 @@ function jt(e) {
16194
16196
  return ye = Object.assign(ye || new SpeechSynthesisUtterance(), g(e) ? { ...Rt, text: e } : { ...Rt, ...e }), ye.text;
16195
16197
  }
16196
16198
  var Nt = { continuous: true, interimResults: false, lang: "zh-CN", maxAlternatives: 1 };
16197
- function Rb(e = Nt, t) {
16199
+ function jb(e = Nt, t) {
16198
16200
  let r = false;
16199
16201
  D(e) && (t = e, e = Nt);
16200
16202
  let n = window.SpeechRecognition || window.webkitSpeechRecognition, o = new n();
@@ -16261,7 +16263,7 @@ function kb() {
16261
16263
  };
16262
16264
  });
16263
16265
  }
16264
- var zb = { get(e) {
16266
+ var Hb = { get(e) {
16265
16267
  try {
16266
16268
  let t = `${e}=`, r = document.cookie.split(";");
16267
16269
  for (let n = 0; n < r.length; n++) {
@@ -16285,7 +16287,7 @@ var zb = { get(e) {
16285
16287
  }, delete(e) {
16286
16288
  this.set(e, "", -1);
16287
16289
  } };
16288
- function Wb() {
16290
+ function Vb() {
16289
16291
  return { set(e, t) {
16290
16292
  T(e) ? Object.keys(e).forEach((r) => localStorage.setItem(r, e[r])) : localStorage.setItem(e, t);
16291
16293
  }, get(e) {
@@ -16296,7 +16298,7 @@ function Wb() {
16296
16298
  localStorage.clear();
16297
16299
  } };
16298
16300
  }
16299
- function Qb() {
16301
+ function _b() {
16300
16302
  return { set(e, t) {
16301
16303
  T(e) ? Object.keys(e).forEach((r) => sessionStorage.setItem(r, e[r])) : sessionStorage.setItem(e, t);
16302
16304
  }, get(e) {
@@ -16307,7 +16309,7 @@ function Qb() {
16307
16309
  sessionStorage.clear();
16308
16310
  } };
16309
16311
  }
16310
- function nM(e) {
16312
+ function oM(e) {
16311
16313
  let { data: t, filename: r = he(), title: n, filter: o } = e;
16312
16314
  if (!t)
16313
16315
  return;
@@ -16336,17 +16338,17 @@ function nM(e) {
16336
16338
  }
16337
16339
  s += `${c}</tr>`;
16338
16340
  }
16339
- s += "</table>", E("a", { href: `data:application/vnd.ms-excel;charset=utf-8,${encodeURIComponent(Zr(s))}`, style: "visibility:hidden", download: `${r}.xls` }).click();
16341
+ s += "</table>", E("a", { href: `data:application/vnd.ms-excel;charset=utf-8,${encodeURIComponent(qr(s))}`, style: "visibility:hidden", download: `${r}.xls` }).click();
16340
16342
  }
16341
16343
  function Pt(e) {
16342
16344
  let t = "", { style: r = "", background: n, color: o } = e;
16343
16345
  return n && (t += `background:${n};`), o && (t += `color:${o};`), t += r;
16344
16346
  }
16345
- function Zr(e) {
16347
+ function qr(e) {
16346
16348
  return `<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'><meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">
16347
16349
  <meta http-equiv="content-type" content="application/vnd.ms-excel';charset=UTF-8"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body>${e}</body></html>`;
16348
16350
  }
16349
- function sM(e, t = 0, r = {}) {
16351
+ function aM(e, t = 0, r = {}) {
16350
16352
  T(t) && (r = t, t = 0);
16351
16353
  let { id: n = "id", pid: o = "pid", children: i = "children" } = r;
16352
16354
  return s(t)[0];
@@ -16354,38 +16356,38 @@ function sM(e, t = 0, r = {}) {
16354
16356
  return e.filter((c) => c[o] === a).map((c) => ({ ...c, [i]: s(c[n]) }));
16355
16357
  }
16356
16358
  }
16357
- function cM(e) {
16359
+ function mM(e) {
16358
16360
  var s, a;
16359
16361
  let t = e.split(","), r = (a = (s = t[0]) == null ? void 0 : s.match(/:(.*?);/)) == null ? void 0 : a[1], n = atob(t[1]), o = n.length, i = new Uint8Array(o);
16360
16362
  for (; o--; )
16361
16363
  i[o] = n.charCodeAt(o);
16362
16364
  return new Blob([i], { type: r });
16363
16365
  }
16364
- function uM(e, t) {
16366
+ function fM(e, t) {
16365
16367
  var a, c;
16366
16368
  let r = e.split(","), n = (c = (a = r[0]) == null ? void 0 : a.match(/:(.*?);/)) == null ? void 0 : c[1], o = atob(r[1]), i = o.length, s = new Uint8Array(i);
16367
16369
  for (; i--; )
16368
16370
  s[i] = o.charCodeAt(i);
16369
16371
  return new File([s], t, { type: n });
16370
16372
  }
16371
- function pM(e, t) {
16373
+ function lM(e, t) {
16372
16374
  t = t || 0;
16373
16375
  let r = e.length - t, n = new Array(r);
16374
16376
  for (; r--; )
16375
16377
  n[r] = e[r + t];
16376
16378
  return n;
16377
16379
  }
16378
- function dM(e, t) {
16380
+ function hM(e, t) {
16379
16381
  return e.reduce((r, n) => T(n) ? Object.keys(n).reduce((o, i) => (t && !t.includes(i) || (o[i] || (o[i] = []), o[i].push(n[i])), o), r) : r, {});
16380
16382
  }
16381
- function xM(e = {}, t = "children") {
16383
+ function yM(e = {}, t = "children") {
16382
16384
  let r = [];
16383
16385
  return r.push({ ...e }), e[t].length && Ft(e[t], r), r.filter((n) => delete n[t]);
16384
16386
  }
16385
16387
  function Ft(e, t = []) {
16386
16388
  return e.reduce((r, n) => (r.push({ ...n }), n.children.length ? Ft(n.children, r) : r), t);
16387
16389
  }
16388
- function kt(e) {
16390
+ function $t(e) {
16389
16391
  return new Promise((t, r) => {
16390
16392
  let n = new FileReader();
16391
16393
  n.onload = function() {
@@ -16394,174 +16396,174 @@ function kt(e) {
16394
16396
  }, n.onerror = r, n.readAsArrayBuffer(e);
16395
16397
  });
16396
16398
  }
16397
- async function MM(e, t = e.type) {
16398
- let r = await kt(e);
16399
+ async function EM(e, t = e.type) {
16400
+ let r = await $t(e);
16399
16401
  return new Blob([r], { type: t });
16400
16402
  }
16401
- function IM(e) {
16403
+ function vM(e) {
16402
16404
  return window.URL.createObjectURL(e);
16403
16405
  }
16404
- function CM(e) {
16406
+ function SM(e) {
16405
16407
  let t = /rgb\(([\w\s,]+)\)/, r = e.match(t);
16406
16408
  if (!r)
16407
16409
  return;
16408
16410
  let [n, o] = r, [i, s, a] = ae(o, "all").split(",");
16409
16411
  return `#${((1 << 24) + (+i << 16) + (+s << 8) + +a).toString(16).slice(1)}`;
16410
16412
  }
16411
- function AM(e, t) {
16413
+ function DM(e, t) {
16412
16414
  let r = 7 - e.length;
16413
16415
  if (r > 0 && (e = e + e.slice(-1).repeat(r)), r < 0)
16414
16416
  throw new Error("hex length > 7");
16415
16417
  let n = `${Number.parseInt(`0x${e.slice(1, 3)}`)},${Number.parseInt(`0x${e.slice(3, 5)}`)},${Number.parseInt(`0x${e.slice(5, 7)}`)}`;
16416
16418
  return t ? `rgba(${n},${t})` : `rgb(${n})`;
16417
16419
  }
16418
- async function qM(e) {
16419
- let t = await $t.readFile(zt.resolve(qr.cwd(), e), "utf-8");
16420
+ async function XM(e) {
16421
+ let t = await kt.readFile(zt.resolve(Xr.cwd(), e), "utf-8");
16420
16422
  return { name: "vite-plugin-copy-html", writeBundle(r, n) {
16421
16423
  let o = `${r.dir}/index.html`, i = [], s = [];
16422
16424
  for (let a in n)
16423
16425
  a.endsWith(".css") ? i.push(a) : a.endsWith(".js") && s.push(a);
16424
16426
  i.length && (t = t.replace(/<\/head>/, () => `</head>
16425
16427
  ${i.map((a) => `<link rel="stylesheet" href="/${a}">`)}`)), s.length && (t = t.replace(/<\/body>/, () => ` ${s.map((a) => `<script src="/${a}" type="module"></script>`)}
16426
- </body>`)), $t.writeFile(zt.resolve(o), t, "utf-8");
16428
+ </body>`)), kt.writeFile(zt.resolve(o), t, "utf-8");
16427
16429
  } };
16428
16430
  }
16429
- function GM(e) {
16431
+ function JM(e) {
16430
16432
  return { name: "vite-plugin-export", transform(t, r) {
16431
16433
  if (r.endsWith(e))
16432
16434
  return { code: `export default ${JSON.stringify(t)}`, map: null };
16433
16435
  } };
16434
16436
  }
16435
- function nE(e = {}) {
16437
+ function oE(e = {}) {
16436
16438
  return J({ name: "tsup", target: "node14", minify: true, dts: { resolve: true, entry: "./src/index.ts" } }, e);
16437
16439
  }
16438
- function aE(e) {
16440
+ function cE(e) {
16439
16441
  return e * e * ((1.70158 + 1) * e - 1.70158);
16440
16442
  }
16441
- function mE(e) {
16443
+ function uE(e) {
16442
16444
  let t = 2.5949095;
16443
16445
  return (e *= 2) < 1 ? 0.5 * (e * e * ((t + 1) * e - t)) : 0.5 * ((e -= 2) * e * ((t + 1) * e + t) + 2);
16444
16446
  }
16445
- function fE(e) {
16447
+ function pE(e) {
16446
16448
  return --e * e * ((1.70158 + 1) * e + 1.70158) + 1;
16447
16449
  }
16448
16450
  function re(e) {
16449
16451
  let t = 0.36363636363636365, r = 8 / 11, n = 9 / 10, o = 4356 / 361, i = 35442 / 1805, s = 16061 / 1805, a = e * e;
16450
16452
  return e < t ? 7.5625 * a : e < r ? 9.075 * a - 9.9 * e + 3.4 : e < n ? o * a - i * e + s : 10.8 * e * e - 20.52 * e + 10.72;
16451
16453
  }
16452
- function dE(e) {
16454
+ function hE(e) {
16453
16455
  return 1 - re(1 - e);
16454
16456
  }
16455
- function yE(e) {
16457
+ function wE(e) {
16456
16458
  return e < 0.5 ? 0.5 * (1 - re(1 - e * 2)) : 0.5 * re(e * 2 - 1) + 0.5;
16457
16459
  }
16458
- function bE(e) {
16460
+ function ME(e) {
16459
16461
  return 1 - Math.sqrt(1 - e * e);
16460
16462
  }
16461
- function EE(e) {
16463
+ function IE(e) {
16462
16464
  return (e *= 2) < 1 ? -0.5 * (Math.sqrt(1 - e * e) - 1) : 0.5 * (Math.sqrt(1 - (e -= 2) * e) + 1);
16463
16465
  }
16464
- function vE(e) {
16466
+ function TE(e) {
16465
16467
  return Math.sqrt(1 - --e * e);
16466
16468
  }
16467
- function CE(e) {
16469
+ function SE(e) {
16468
16470
  return e * e * e;
16469
16471
  }
16470
- function AE(e) {
16472
+ function DE(e) {
16471
16473
  return e < 0.5 ? 4 * e * e * e : 0.5 * (2 * e - 2) ** 3 + 1;
16472
16474
  }
16473
- function LE(e) {
16475
+ function OE(e) {
16474
16476
  let t = e - 1;
16475
16477
  return t * t * t + 1;
16476
16478
  }
16477
- function RE(e) {
16479
+ function jE(e) {
16478
16480
  return Math.sin(13 * e * Math.PI / 2) * 2 ** (10 * (e - 1));
16479
16481
  }
16480
- function NE(e) {
16482
+ function PE(e) {
16481
16483
  return e < 0.5 ? 0.5 * Math.sin(13 * Math.PI / 2 * 2 * e) * 2 ** (10 * (2 * e - 1)) : 0.5 * Math.sin(-13 * Math.PI / 2 * (2 * e - 1 + 1)) * 2 ** (-10 * (2 * e - 1)) + 1;
16482
16484
  }
16483
- function FE(e) {
16485
+ function $E(e) {
16484
16486
  return Math.sin(-13 * (e + 1) * Math.PI / 2) * 2 ** (-10 * e) + 1;
16485
16487
  }
16486
- function $E(e) {
16488
+ function zE(e) {
16487
16489
  return e === 0 ? e : 2 ** (10 * (e - 1));
16488
16490
  }
16489
- function HE(e) {
16491
+ function UE(e) {
16490
16492
  return e === 0 || e === 1 ? e : e < 0.5 ? 0.5 * 2 ** (20 * e - 10) : -0.5 * 2 ** (10 - e * 20) + 1;
16491
16493
  }
16492
- function BE(e) {
16494
+ function WE(e) {
16493
16495
  return e === 1 ? e : 1 - 2 ** (-10 * e);
16494
16496
  }
16495
- function VE(e) {
16497
+ function YE(e) {
16496
16498
  return e * e;
16497
16499
  }
16498
- function _E(e) {
16500
+ function ZE(e) {
16499
16501
  return e /= 0.5, e < 1 ? 0.5 * e * e : (e--, -0.5 * (e * (e - 2) - 1));
16500
16502
  }
16501
- function ZE(e) {
16503
+ function qE(e) {
16502
16504
  return -e * (e - 2);
16503
16505
  }
16504
- function XE(e) {
16506
+ function GE(e) {
16505
16507
  return e ** 4;
16506
16508
  }
16507
- function JE(e) {
16509
+ function KE(e) {
16508
16510
  return e < 0.5 ? 8 * e ** 4 : -8 * (e - 1) ** 4 + 1;
16509
16511
  }
16510
- function eI(e) {
16512
+ function tI(e) {
16511
16513
  return (e - 1) ** 3 * (1 - e) + 1;
16512
16514
  }
16513
- function rI(e) {
16515
+ function nI(e) {
16514
16516
  return e * e * e * e * e;
16515
16517
  }
16516
- function oI(e) {
16518
+ function iI(e) {
16517
16519
  return (e *= 2) < 1 ? 0.5 * e * e * e * e * e : 0.5 * ((e -= 2) * e * e * e * e + 2);
16518
16520
  }
16519
- function sI(e) {
16521
+ function aI(e) {
16520
16522
  return --e * e * e * e * e + 1;
16521
16523
  }
16522
- function cI(e) {
16524
+ function mI(e) {
16523
16525
  let t = Math.cos(e * Math.PI * 0.5);
16524
16526
  return Math.abs(t) < 1e-14 ? 1 : 1 - t;
16525
16527
  }
16526
- function uI(e) {
16528
+ function fI(e) {
16527
16529
  return -0.5 * (Math.cos(Math.PI * e) - 1);
16528
16530
  }
16529
- function pI(e) {
16531
+ function lI(e) {
16530
16532
  return Math.sin(e * Math.PI / 2);
16531
16533
  }
16532
- function dI(e, t, r, n = () => {
16534
+ function hI(e, t, r, n = () => {
16533
16535
  }) {
16534
16536
  let o = t - e, i = Date.now(), s = e;
16535
16537
  n(s);
16536
16538
  let c = U(() => {
16537
- let m = Date.now() - i, f = m / r, p = Xr(f), d2 = Math.round(o * p);
16539
+ let m = Date.now() - i, f = m / r, p = Gr(f), d2 = Math.round(o * p);
16538
16540
  if (m >= r)
16539
16541
  return s = t, n(s), c();
16540
16542
  s = e + d2, n(s);
16541
16543
  }, 50);
16542
16544
  }
16543
- function Xr(e) {
16545
+ function Gr(e) {
16544
16546
  let t = [{ x: 0, y: 0 }, { x: 0.4, y: 0.8 }, { x: 0.6, y: 1 }, { x: 1, y: 1 }], r = 0, n = t.length - 1;
16545
16547
  for (let o = 0; o <= n; o++) {
16546
- let i = Gr(n, o), s = e ** o * (1 - e) ** (n - o);
16548
+ let i = Jr(n, o), s = e ** o * (1 - e) ** (n - o);
16547
16549
  r += i * t[o].y * s;
16548
16550
  }
16549
16551
  return r;
16550
16552
  }
16551
- function Gr(e, t) {
16553
+ function Jr(e, t) {
16552
16554
  let r = 1;
16553
16555
  for (let n = 1; n <= t; n++)
16554
16556
  r *= (e - n + 1) / n;
16555
16557
  return r;
16556
16558
  }
16557
- function XI(e) {
16559
+ function GI(e) {
16558
16560
  let t = matchMedia("(prefers-color-scheme: dark)");
16559
16561
  return e(t.matches ? "dark" : "light"), x(t, "change", () => e(t.matches ? "dark" : "light"));
16560
16562
  }
16561
16563
 
16562
16564
  // src/index.ts
16563
16565
  var import_picocolors6 = __toESM(require_picocolors(), 1);
16564
- import fg from "fast-glob";
16566
+ import fg2 from "fast-glob";
16565
16567
 
16566
16568
  // src/utils.ts
16567
16569
  import path from "path";
@@ -18031,22 +18033,22 @@ function ora(options) {
18031
18033
  var import_picocolors = __toESM(require_picocolors(), 1);
18032
18034
  var DW = /\s-DW/;
18033
18035
  var W2 = /\s-W/;
18034
- var Dw = /\s-Dw/;
18036
+ var Dw2 = /\s-Dw/;
18035
18037
  var w2 = /\s-w/;
18036
18038
  var D2 = /\s-D(?!w)/;
18037
18039
  var d = /\s-d(?!w)/;
18038
18040
  var isZh = process.env.PI_Lang === "zh";
18039
18041
  async function getParams(params) {
18040
- var _a2, _b;
18042
+ var _a2, _b2;
18041
18043
  const root = process.cwd();
18042
18044
  try {
18043
- switch (await vx()) {
18045
+ switch (await Tx()) {
18044
18046
  case "pnpm":
18045
18047
  if (!P(path.resolve(root, "./pnpm-workspace.yaml"))) {
18046
18048
  if (DW.test(params))
18047
18049
  return params.replace(DW, " -D");
18048
- if (Dw.test(params))
18049
- return params.replace(Dw, " -D");
18050
+ if (Dw2.test(params))
18051
+ return params.replace(Dw2, " -D");
18050
18052
  if (W2.test(params))
18051
18053
  return params.replace(W2, "");
18052
18054
  if (w2.test(params))
@@ -18057,7 +18059,7 @@ async function getParams(params) {
18057
18059
  return params.replace(D2, " -Dw");
18058
18060
  if (d.test(params))
18059
18061
  return params.replace(d, " -Dw");
18060
- if (!params || Dw.test(params) || w2.test(params))
18062
+ if (!params || Dw2.test(params) || w2.test(params))
18061
18063
  return params;
18062
18064
  return `${params} -w`;
18063
18065
  }
@@ -18068,8 +18070,8 @@ async function getParams(params) {
18068
18070
  return params;
18069
18071
  case "yarn":
18070
18072
  if (!((_a2 = await wt(path.resolve(root, "./package.json"))) == null ? void 0 : _a2.workspaces)) {
18071
- if (Dw.test(params))
18072
- return params.replace(Dw, " -D");
18073
+ if (Dw2.test(params))
18074
+ return params.replace(Dw2, " -D");
18073
18075
  if (DW.test(params))
18074
18076
  return params.replace(DW, " -D");
18075
18077
  if (W2.test(params))
@@ -18077,7 +18079,7 @@ async function getParams(params) {
18077
18079
  if (w2.test(params))
18078
18080
  return params.replace(w2, "");
18079
18081
  }
18080
- if ((_b = await wt()) == null ? void 0 : _b.workspaces) {
18082
+ if ((_b2 = await wt()) == null ? void 0 : _b2.workspaces) {
18081
18083
  if (D2.test(params))
18082
18084
  return params.replace(D2, " -DW");
18083
18085
  if (d.test(params))
@@ -18086,8 +18088,8 @@ async function getParams(params) {
18086
18088
  return params;
18087
18089
  return `${params} -W`;
18088
18090
  }
18089
- if (Dw.test(params))
18090
- return params.replace(Dw, " -DW");
18091
+ if (Dw2.test(params))
18092
+ return params.replace(Dw2, " -DW");
18091
18093
  if (W2.test(params))
18092
18094
  return params.replace(w2, " -W");
18093
18095
  return params;
@@ -18128,7 +18130,7 @@ function getLatestVersion(pkg) {
18128
18130
  }
18129
18131
 
18130
18132
  // package.json
18131
- var version = "0.0.70";
18133
+ var version = "0.0.71";
18132
18134
 
18133
18135
  // src/help.ts
18134
18136
  var isZh2 = process.env.PI_Lang === "zh";
@@ -18151,7 +18153,7 @@ function help(argv) {
18151
18153
  // src/installDeps.ts
18152
18154
  var import_picocolors2 = __toESM(require_picocolors(), 1);
18153
18155
  async function installDeps() {
18154
- if (!Xx("gum")) {
18156
+ if (!Gx("gum")) {
18155
18157
  console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56gum..."));
18156
18158
  const { status } = await F("brew install gum", "pipe");
18157
18159
  if (status === 0) {
@@ -18165,7 +18167,7 @@ async function installDeps() {
18165
18167
  process.exit(1);
18166
18168
  }
18167
18169
  }
18168
- if (!Xx("ni")) {
18170
+ if (!Gx("ni")) {
18169
18171
  console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56ni..."));
18170
18172
  const { status } = await F("npm i -g @antfu/ni", "pipe");
18171
18173
  if (status === 0) {
@@ -18201,7 +18203,7 @@ async function pi(params, pkg, executor = "ni") {
18201
18203
  let stdio = "pipe";
18202
18204
  let loading_status;
18203
18205
  const { PI_DEFAULT, PI_MaxSockets: sockets } = process9.env;
18204
- const pkgTool = await vx();
18206
+ const pkgTool = await Tx();
18205
18207
  const maxSockets = sockets || 4;
18206
18208
  const install = PI_DEFAULT === "yarn" || pkgTool === "yarn" ? newParams ? "add" : "" : "install";
18207
18209
  if (pkgTool === "npm") {
@@ -18217,7 +18219,7 @@ async function pi(params, pkg, executor = "ni") {
18217
18219
  loading_status = await loading(text);
18218
18220
  }
18219
18221
  const runSockets = executor.split(" ")[0] === "npm" ? ` --max-sockets=${maxSockets}` : "";
18220
- const { status, result } = await Fx({
18222
+ const { status, result } = await $x({
18221
18223
  params: `${executor}${newParams ? ` ${newParams}` : runSockets}`,
18222
18224
  stdio
18223
18225
  });
@@ -18285,7 +18287,7 @@ function addLatest(params) {
18285
18287
  // src/pinit.ts
18286
18288
  async function pinit() {
18287
18289
  console.log("Initializing project...");
18288
- switch (await vx()) {
18290
+ switch (await Tx()) {
18289
18291
  case "npm":
18290
18292
  F("npm init -y");
18291
18293
  return;
@@ -18302,7 +18304,7 @@ async function pinit() {
18302
18304
 
18303
18305
  // src/pix.ts
18304
18306
  async function pix(params) {
18305
- switch (await vx()) {
18307
+ switch (await Tx()) {
18306
18308
  case "bun":
18307
18309
  return F(`bunx ${params}`);
18308
18310
  default:
@@ -18338,7 +18340,7 @@ async function pui(params, pkg) {
18338
18340
  process.exit(1);
18339
18341
  }
18340
18342
  const loading_status = await loading(text);
18341
- const { status, result } = await Fx(`nun ${params}`);
18343
+ const { status, result } = await $x(`nun ${params}`);
18342
18344
  const end = Date.now();
18343
18345
  const costTime = (end - start) / 1e3;
18344
18346
  successMsg += import_picocolors4.default.blue(` ---- \u23F0\uFF1A${costTime}s`);
@@ -18358,7 +18360,7 @@ async function pio(params, pkg, executor = "ni") {
18358
18360
  const failMsg = pkg ? `Failed to install ${pkg} \u{1F62D}` : "Failed to update dependency! \u{1F62D}";
18359
18361
  const offline = "--prefer-offline";
18360
18362
  const newParams = await getParams(params);
18361
- const { status, result } = await Fx({
18363
+ const { status, result } = await $x({
18362
18364
  params: `${executor} ${newParams} ${offline}`,
18363
18365
  stdio: "inherit"
18364
18366
  });
@@ -18400,15 +18402,15 @@ async function setup() {
18400
18402
  }
18401
18403
  const argv = process11.argv.slice(2);
18402
18404
  help(argv);
18403
- const params = Hi(argv.join(" ")).trim();
18404
- if (!Qx(rootPath)) {
18405
- if (wf()) {
18405
+ const params = Ui(argv.join(" ")).trim();
18406
+ if (!_x(rootPath)) {
18407
+ if (bf()) {
18406
18408
  if (exec === "pi") {
18407
18409
  const loading_status = await loading(
18408
18410
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
18409
18411
  `
18410
18412
  );
18411
- const { status } = await Fx(`go get ${params}`);
18413
+ const { status } = await $x(`go get ${params}`);
18412
18414
  if (status === 0) {
18413
18415
  loading_status.succeed(
18414
18416
  import_picocolors6.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
@@ -18423,7 +18425,7 @@ async function setup() {
18423
18425
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
18424
18426
  `
18425
18427
  );
18426
- const { status } = await Fx(`go clean ${params}`);
18428
+ const { status } = await $x(`go clean ${params}`);
18427
18429
  if (status === 0) {
18428
18430
  loading_status.succeed(
18429
18431
  import_picocolors6.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
@@ -18435,7 +18437,7 @@ async function setup() {
18435
18437
  }
18436
18438
  } else if (exec === "prun") {
18437
18439
  const match = params ? params.endsWith(".go") ? [`**/${params}`] : [`**/${params}.go`, `**/${params}/main.go`] : "main.go";
18438
- const target = (await fg(match))[0];
18440
+ const target = (await fg2(match))[0];
18439
18441
  if (!target) {
18440
18442
  console.log(import_picocolors6.default.red("No such file"));
18441
18443
  process11.exit(1);
@@ -18454,13 +18456,13 @@ async function setup() {
18454
18456
  }
18455
18457
  process11.exit();
18456
18458
  }
18457
- if (Vf()) {
18459
+ if (Yf()) {
18458
18460
  if (exec === "pi") {
18459
18461
  const loading_status = await loading(
18460
18462
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
18461
18463
  `
18462
18464
  );
18463
- const { status } = await Fx(`cargo install ${params}`);
18465
+ const { status } = await $x(`cargo install ${params}`);
18464
18466
  if (status === 0) {
18465
18467
  loading_status.succeed(
18466
18468
  import_picocolors6.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
@@ -18475,7 +18477,7 @@ async function setup() {
18475
18477
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
18476
18478
  `
18477
18479
  );
18478
- const { status } = await Fx(`cargo uninstall ${params}`);
18480
+ const { status } = await $x(`cargo uninstall ${params}`);
18479
18481
  if (status === 0) {
18480
18482
  loading_status.succeed(
18481
18483
  import_picocolors6.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")