pinme 1.1.4-alpha.2 → 1.1.4-alpha.3

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 (2) hide show
  1. package/dist/index.js +910 -1524
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- #!/usr/bin/env node
3
2
  var __create = Object.create;
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -9,10 +8,6 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
8
  var __commonJS = (cb, mod) => function __require() {
10
9
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
10
  };
12
- var __export = (target, all3) => {
13
- for (var name in all3)
14
- __defProp(target, name, { get: all3[name], enumerable: true });
15
- };
16
11
  var __copyProps = (to, from, except, desc) => {
17
12
  if (from && typeof from === "object" || typeof from === "function") {
18
13
  for (let key of __getOwnPropNames(from))
@@ -30,9 +25,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
25
  mod
31
26
  ));
32
27
 
33
- // node_modules/dotenv/package.json
28
+ // node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json
34
29
  var require_package = __commonJS({
35
- "node_modules/dotenv/package.json"(exports2, module2) {
30
+ "node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json"(exports2, module2) {
36
31
  module2.exports = {
37
32
  name: "dotenv",
38
33
  version: "16.5.0",
@@ -98,13 +93,13 @@ var require_package = __commonJS({
98
93
  }
99
94
  });
100
95
 
101
- // node_modules/dotenv/lib/main.js
96
+ // node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js
102
97
  var require_main = __commonJS({
103
- "node_modules/dotenv/lib/main.js"(exports2, module2) {
98
+ "node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js"(exports2, module2) {
104
99
  var fs6 = require("fs");
105
100
  var path6 = require("path");
106
101
  var os3 = require("os");
107
- var crypto3 = require("crypto");
102
+ var crypto2 = require("crypto");
108
103
  var packageJson = require_package();
109
104
  var version2 = packageJson.version;
110
105
  var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
@@ -300,7 +295,7 @@ var require_main = __commonJS({
300
295
  const authTag = ciphertext.subarray(-16);
301
296
  ciphertext = ciphertext.subarray(12, -16);
302
297
  try {
303
- const aesgcm = crypto3.createDecipheriv("aes-256-gcm", key, nonce);
298
+ const aesgcm = crypto2.createDecipheriv("aes-256-gcm", key, nonce);
304
299
  aesgcm.setAuthTag(authTag);
305
300
  return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
306
301
  } catch (error) {
@@ -365,9 +360,9 @@ var require_main = __commonJS({
365
360
  }
366
361
  });
367
362
 
368
- // node_modules/proxy-from-env/index.js
363
+ // node_modules/.pnpm/proxy-from-env@1.1.0/node_modules/proxy-from-env/index.js
369
364
  var require_proxy_from_env = __commonJS({
370
- "node_modules/proxy-from-env/index.js"(exports2) {
365
+ "node_modules/.pnpm/proxy-from-env@1.1.0/node_modules/proxy-from-env/index.js"(exports2) {
371
366
  "use strict";
372
367
  var parseUrl = require("url").parse;
373
368
  var DEFAULT_PORTS = {
@@ -381,7 +376,7 @@ var require_proxy_from_env = __commonJS({
381
376
  var stringEndsWith = String.prototype.endsWith || function(s) {
382
377
  return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
383
378
  };
384
- function getProxyForUrl(url2) {
379
+ function getProxyForUrl2(url2) {
385
380
  var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
386
381
  var proto = parsedUrl.protocol;
387
382
  var hostname = parsedUrl.host;
@@ -431,13 +426,13 @@ var require_proxy_from_env = __commonJS({
431
426
  function getEnv(key) {
432
427
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
433
428
  }
434
- exports2.getProxyForUrl = getProxyForUrl;
429
+ exports2.getProxyForUrl = getProxyForUrl2;
435
430
  }
436
431
  });
437
432
 
438
- // node_modules/ms/index.js
433
+ // node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
439
434
  var require_ms = __commonJS({
440
- "node_modules/ms/index.js"(exports2, module2) {
435
+ "node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports2, module2) {
441
436
  var s = 1e3;
442
437
  var m = s * 60;
443
438
  var h = m * 60;
@@ -551,9 +546,10 @@ var require_ms = __commonJS({
551
546
  }
552
547
  });
553
548
 
554
- // node_modules/debug/src/common.js
549
+ // node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js
555
550
  var require_common = __commonJS({
556
- "node_modules/debug/src/common.js"(exports2, module2) {
551
+ "node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js"(exports2, module2) {
552
+ "use strict";
557
553
  function setup(env) {
558
554
  createDebug.debug = createDebug;
559
555
  createDebug.default = createDebug;
@@ -562,16 +558,16 @@ var require_common = __commonJS({
562
558
  createDebug.enable = enable;
563
559
  createDebug.enabled = enabled;
564
560
  createDebug.humanize = require_ms();
565
- createDebug.destroy = destroy;
566
- Object.keys(env).forEach((key) => {
561
+ Object.keys(env).forEach(function(key) {
567
562
  createDebug[key] = env[key];
568
563
  });
564
+ createDebug.instances = [];
569
565
  createDebug.names = [];
570
566
  createDebug.skips = [];
571
567
  createDebug.formatters = {};
572
568
  function selectColor(namespace) {
573
- let hash = 0;
574
- for (let i = 0; i < namespace.length; i++) {
569
+ var hash = 0;
570
+ for (var i = 0; i < namespace.length; i++) {
575
571
  hash = (hash << 5) - hash + namespace.charCodeAt(i);
576
572
  hash |= 0;
577
573
  }
@@ -579,17 +575,17 @@ var require_common = __commonJS({
579
575
  }
580
576
  createDebug.selectColor = selectColor;
581
577
  function createDebug(namespace) {
582
- let prevTime;
583
- let enableOverride = null;
584
- let namespacesCache;
585
- let enabledCache;
586
- function debug(...args) {
578
+ var prevTime;
579
+ function debug() {
587
580
  if (!debug.enabled) {
588
581
  return;
589
582
  }
590
- const self2 = debug;
591
- const curr = Number(/* @__PURE__ */ new Date());
592
- const ms = curr - (prevTime || curr);
583
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
584
+ args[_key] = arguments[_key];
585
+ }
586
+ var self2 = debug;
587
+ var curr = Number(/* @__PURE__ */ new Date());
588
+ var ms = curr - (prevTime || curr);
593
589
  self2.diff = ms;
594
590
  self2.prev = prevTime;
595
591
  self2.curr = curr;
@@ -598,15 +594,15 @@ var require_common = __commonJS({
598
594
  if (typeof args[0] !== "string") {
599
595
  args.unshift("%O");
600
596
  }
601
- let index = 0;
602
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
597
+ var index = 0;
598
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
603
599
  if (match === "%%") {
604
- return "%";
600
+ return match;
605
601
  }
606
602
  index++;
607
- const formatter = createDebug.formatters[format];
603
+ var formatter = createDebug.formatters[format];
608
604
  if (typeof formatter === "function") {
609
- const val = args[index];
605
+ var val = args[index];
610
606
  match = formatter.call(self2, val);
611
607
  args.splice(index, 1);
612
608
  index--;
@@ -614,99 +610,71 @@ var require_common = __commonJS({
614
610
  return match;
615
611
  });
616
612
  createDebug.formatArgs.call(self2, args);
617
- const logFn = self2.log || createDebug.log;
613
+ var logFn = self2.log || createDebug.log;
618
614
  logFn.apply(self2, args);
619
615
  }
620
616
  debug.namespace = namespace;
617
+ debug.enabled = createDebug.enabled(namespace);
621
618
  debug.useColors = createDebug.useColors();
622
- debug.color = createDebug.selectColor(namespace);
619
+ debug.color = selectColor(namespace);
620
+ debug.destroy = destroy;
623
621
  debug.extend = extend2;
624
- debug.destroy = createDebug.destroy;
625
- Object.defineProperty(debug, "enabled", {
626
- enumerable: true,
627
- configurable: false,
628
- get: () => {
629
- if (enableOverride !== null) {
630
- return enableOverride;
631
- }
632
- if (namespacesCache !== createDebug.namespaces) {
633
- namespacesCache = createDebug.namespaces;
634
- enabledCache = createDebug.enabled(namespace);
635
- }
636
- return enabledCache;
637
- },
638
- set: (v) => {
639
- enableOverride = v;
640
- }
641
- });
642
622
  if (typeof createDebug.init === "function") {
643
623
  createDebug.init(debug);
644
624
  }
625
+ createDebug.instances.push(debug);
645
626
  return debug;
646
627
  }
628
+ function destroy() {
629
+ var index = createDebug.instances.indexOf(this);
630
+ if (index !== -1) {
631
+ createDebug.instances.splice(index, 1);
632
+ return true;
633
+ }
634
+ return false;
635
+ }
647
636
  function extend2(namespace, delimiter) {
648
- const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
649
- newDebug.log = this.log;
650
- return newDebug;
637
+ return createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
651
638
  }
652
639
  function enable(namespaces) {
653
640
  createDebug.save(namespaces);
654
- createDebug.namespaces = namespaces;
655
641
  createDebug.names = [];
656
642
  createDebug.skips = [];
657
- const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
658
- for (const ns of split) {
659
- if (ns[0] === "-") {
660
- createDebug.skips.push(ns.slice(1));
661
- } else {
662
- createDebug.names.push(ns);
643
+ var i;
644
+ var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
645
+ var len = split.length;
646
+ for (i = 0; i < len; i++) {
647
+ if (!split[i]) {
648
+ continue;
663
649
  }
664
- }
665
- }
666
- function matchesTemplate(search, template) {
667
- let searchIndex = 0;
668
- let templateIndex = 0;
669
- let starIndex = -1;
670
- let matchIndex = 0;
671
- while (searchIndex < search.length) {
672
- if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
673
- if (template[templateIndex] === "*") {
674
- starIndex = templateIndex;
675
- matchIndex = searchIndex;
676
- templateIndex++;
677
- } else {
678
- searchIndex++;
679
- templateIndex++;
680
- }
681
- } else if (starIndex !== -1) {
682
- templateIndex = starIndex + 1;
683
- matchIndex++;
684
- searchIndex = matchIndex;
650
+ namespaces = split[i].replace(/\*/g, ".*?");
651
+ if (namespaces[0] === "-") {
652
+ createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
685
653
  } else {
686
- return false;
654
+ createDebug.names.push(new RegExp("^" + namespaces + "$"));
687
655
  }
688
656
  }
689
- while (templateIndex < template.length && template[templateIndex] === "*") {
690
- templateIndex++;
657
+ for (i = 0; i < createDebug.instances.length; i++) {
658
+ var instance = createDebug.instances[i];
659
+ instance.enabled = createDebug.enabled(instance.namespace);
691
660
  }
692
- return templateIndex === template.length;
693
661
  }
694
662
  function disable() {
695
- const namespaces = [
696
- ...createDebug.names,
697
- ...createDebug.skips.map((namespace) => "-" + namespace)
698
- ].join(",");
699
663
  createDebug.enable("");
700
- return namespaces;
701
664
  }
702
665
  function enabled(name) {
703
- for (const skip of createDebug.skips) {
704
- if (matchesTemplate(name, skip)) {
666
+ if (name[name.length - 1] === "*") {
667
+ return true;
668
+ }
669
+ var i;
670
+ var len;
671
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
672
+ if (createDebug.skips[i].test(name)) {
705
673
  return false;
706
674
  }
707
675
  }
708
- for (const ns of createDebug.names) {
709
- if (matchesTemplate(name, ns)) {
676
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
677
+ if (createDebug.names[i].test(name)) {
710
678
  return true;
711
679
  }
712
680
  }
@@ -718,9 +686,6 @@ var require_common = __commonJS({
718
686
  }
719
687
  return val;
720
688
  }
721
- function destroy() {
722
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
723
- }
724
689
  createDebug.enable(createDebug.load());
725
690
  return createDebug;
726
691
  }
@@ -728,101 +693,29 @@ var require_common = __commonJS({
728
693
  }
729
694
  });
730
695
 
731
- // node_modules/debug/src/browser.js
696
+ // node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js
732
697
  var require_browser = __commonJS({
733
- "node_modules/debug/src/browser.js"(exports2, module2) {
698
+ "node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js"(exports2, module2) {
699
+ "use strict";
700
+ function _typeof(obj) {
701
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
702
+ _typeof = function _typeof2(obj2) {
703
+ return typeof obj2;
704
+ };
705
+ } else {
706
+ _typeof = function _typeof2(obj2) {
707
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
708
+ };
709
+ }
710
+ return _typeof(obj);
711
+ }
712
+ exports2.log = log;
734
713
  exports2.formatArgs = formatArgs;
735
714
  exports2.save = save;
736
715
  exports2.load = load;
737
716
  exports2.useColors = useColors;
738
717
  exports2.storage = localstorage();
739
- exports2.destroy = /* @__PURE__ */ (() => {
740
- let warned = false;
741
- return () => {
742
- if (!warned) {
743
- warned = true;
744
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
745
- }
746
- };
747
- })();
748
- exports2.colors = [
749
- "#0000CC",
750
- "#0000FF",
751
- "#0033CC",
752
- "#0033FF",
753
- "#0066CC",
754
- "#0066FF",
755
- "#0099CC",
756
- "#0099FF",
757
- "#00CC00",
758
- "#00CC33",
759
- "#00CC66",
760
- "#00CC99",
761
- "#00CCCC",
762
- "#00CCFF",
763
- "#3300CC",
764
- "#3300FF",
765
- "#3333CC",
766
- "#3333FF",
767
- "#3366CC",
768
- "#3366FF",
769
- "#3399CC",
770
- "#3399FF",
771
- "#33CC00",
772
- "#33CC33",
773
- "#33CC66",
774
- "#33CC99",
775
- "#33CCCC",
776
- "#33CCFF",
777
- "#6600CC",
778
- "#6600FF",
779
- "#6633CC",
780
- "#6633FF",
781
- "#66CC00",
782
- "#66CC33",
783
- "#9900CC",
784
- "#9900FF",
785
- "#9933CC",
786
- "#9933FF",
787
- "#99CC00",
788
- "#99CC33",
789
- "#CC0000",
790
- "#CC0033",
791
- "#CC0066",
792
- "#CC0099",
793
- "#CC00CC",
794
- "#CC00FF",
795
- "#CC3300",
796
- "#CC3333",
797
- "#CC3366",
798
- "#CC3399",
799
- "#CC33CC",
800
- "#CC33FF",
801
- "#CC6600",
802
- "#CC6633",
803
- "#CC9900",
804
- "#CC9933",
805
- "#CCCC00",
806
- "#CCCC33",
807
- "#FF0000",
808
- "#FF0033",
809
- "#FF0066",
810
- "#FF0099",
811
- "#FF00CC",
812
- "#FF00FF",
813
- "#FF3300",
814
- "#FF3333",
815
- "#FF3366",
816
- "#FF3399",
817
- "#FF33CC",
818
- "#FF33FF",
819
- "#FF6600",
820
- "#FF6633",
821
- "#FF9900",
822
- "#FF9933",
823
- "#FFCC00",
824
- "#FFCC33"
825
- ];
718
+ exports2.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"];
826
719
  function useColors() {
827
720
  if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
828
721
  return true;
@@ -830,11 +723,10 @@ var require_browser = __commonJS({
830
723
  if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
831
724
  return false;
832
725
  }
833
- let m;
834
726
  return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
835
727
  typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
836
728
  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
837
- typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
729
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
838
730
  typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
839
731
  }
840
732
  function formatArgs(args) {
@@ -842,11 +734,11 @@ var require_browser = __commonJS({
842
734
  if (!this.useColors) {
843
735
  return;
844
736
  }
845
- const c = "color: " + this.color;
737
+ var c = "color: " + this.color;
846
738
  args.splice(1, 0, c, "color: inherit");
847
- let index = 0;
848
- let lastC = 0;
849
- args[0].replace(/%[a-zA-Z%]/g, (match) => {
739
+ var index = 0;
740
+ var lastC = 0;
741
+ args[0].replace(/%[a-zA-Z%]/g, function(match) {
850
742
  if (match === "%%") {
851
743
  return;
852
744
  }
@@ -857,8 +749,10 @@ var require_browser = __commonJS({
857
749
  });
858
750
  args.splice(lastC, 0, c);
859
751
  }
860
- exports2.log = console.debug || console.log || (() => {
861
- });
752
+ function log() {
753
+ var _console;
754
+ return (typeof console === "undefined" ? "undefined" : _typeof(console)) === "object" && console.log && (_console = console).log.apply(_console, arguments);
755
+ }
862
756
  function save(namespaces) {
863
757
  try {
864
758
  if (namespaces) {
@@ -870,9 +764,9 @@ var require_browser = __commonJS({
870
764
  }
871
765
  }
872
766
  function load() {
873
- let r;
767
+ var r;
874
768
  try {
875
- r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
769
+ r = exports2.storage.getItem("debug");
876
770
  } catch (error) {
877
771
  }
878
772
  if (!r && typeof process !== "undefined" && "env" in process) {
@@ -887,7 +781,7 @@ var require_browser = __commonJS({
887
781
  }
888
782
  }
889
783
  module2.exports = require_common()(exports2);
890
- var { formatters } = module2.exports;
784
+ var formatters = module2.exports.formatters;
891
785
  formatters.j = function(v) {
892
786
  try {
893
787
  return JSON.stringify(v);
@@ -898,9 +792,9 @@ var require_browser = __commonJS({
898
792
  }
899
793
  });
900
794
 
901
- // node_modules/has-flag/index.js
795
+ // node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
902
796
  var require_has_flag = __commonJS({
903
- "node_modules/has-flag/index.js"(exports2, module2) {
797
+ "node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) {
904
798
  "use strict";
905
799
  module2.exports = (flag, argv) => {
906
800
  argv = argv || process.argv;
@@ -912,9 +806,9 @@ var require_has_flag = __commonJS({
912
806
  }
913
807
  });
914
808
 
915
- // node_modules/supports-color/index.js
809
+ // node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
916
810
  var require_supports_color = __commonJS({
917
- "node_modules/supports-color/index.js"(exports2, module2) {
811
+ "node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) {
918
812
  "use strict";
919
813
  var os3 = require("os");
920
814
  var hasFlag = require_has_flag();
@@ -1007,114 +901,34 @@ var require_supports_color = __commonJS({
1007
901
  }
1008
902
  });
1009
903
 
1010
- // node_modules/debug/src/node.js
904
+ // node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/node.js
1011
905
  var require_node = __commonJS({
1012
- "node_modules/debug/src/node.js"(exports2, module2) {
906
+ "node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/node.js"(exports2, module2) {
907
+ "use strict";
1013
908
  var tty = require("tty");
1014
- var util3 = require("util");
909
+ var util2 = require("util");
1015
910
  exports2.init = init;
1016
911
  exports2.log = log;
1017
912
  exports2.formatArgs = formatArgs;
1018
913
  exports2.save = save;
1019
914
  exports2.load = load;
1020
915
  exports2.useColors = useColors;
1021
- exports2.destroy = util3.deprecate(
1022
- () => {
1023
- },
1024
- "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
1025
- );
1026
916
  exports2.colors = [6, 2, 3, 4, 5, 1];
1027
917
  try {
1028
- const supportsColor = require_supports_color();
918
+ supportsColor = require_supports_color();
1029
919
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
1030
- exports2.colors = [
1031
- 20,
1032
- 21,
1033
- 26,
1034
- 27,
1035
- 32,
1036
- 33,
1037
- 38,
1038
- 39,
1039
- 40,
1040
- 41,
1041
- 42,
1042
- 43,
1043
- 44,
1044
- 45,
1045
- 56,
1046
- 57,
1047
- 62,
1048
- 63,
1049
- 68,
1050
- 69,
1051
- 74,
1052
- 75,
1053
- 76,
1054
- 77,
1055
- 78,
1056
- 79,
1057
- 80,
1058
- 81,
1059
- 92,
1060
- 93,
1061
- 98,
1062
- 99,
1063
- 112,
1064
- 113,
1065
- 128,
1066
- 129,
1067
- 134,
1068
- 135,
1069
- 148,
1070
- 149,
1071
- 160,
1072
- 161,
1073
- 162,
1074
- 163,
1075
- 164,
1076
- 165,
1077
- 166,
1078
- 167,
1079
- 168,
1080
- 169,
1081
- 170,
1082
- 171,
1083
- 172,
1084
- 173,
1085
- 178,
1086
- 179,
1087
- 184,
1088
- 185,
1089
- 196,
1090
- 197,
1091
- 198,
1092
- 199,
1093
- 200,
1094
- 201,
1095
- 202,
1096
- 203,
1097
- 204,
1098
- 205,
1099
- 206,
1100
- 207,
1101
- 208,
1102
- 209,
1103
- 214,
1104
- 215,
1105
- 220,
1106
- 221
1107
- ];
920
+ exports2.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
1108
921
  }
1109
922
  } catch (error) {
1110
923
  }
1111
- exports2.inspectOpts = Object.keys(process.env).filter((key) => {
924
+ var supportsColor;
925
+ exports2.inspectOpts = Object.keys(process.env).filter(function(key) {
1112
926
  return /^debug_/i.test(key);
1113
- }).reduce((obj, key) => {
1114
- const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
927
+ }).reduce(function(obj, key) {
928
+ var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
1115
929
  return k.toUpperCase();
1116
930
  });
1117
- let val = process.env[key];
931
+ var val = process.env[key];
1118
932
  if (/^(yes|on|true|enabled)$/i.test(val)) {
1119
933
  val = true;
1120
934
  } else if (/^(no|off|false|disabled)$/i.test(val)) {
@@ -1131,11 +945,11 @@ var require_node = __commonJS({
1131
945
  return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
1132
946
  }
1133
947
  function formatArgs(args) {
1134
- const { namespace: name, useColors: useColors2 } = this;
948
+ var name = this.namespace, useColors2 = this.useColors;
1135
949
  if (useColors2) {
1136
- const c = this.color;
1137
- const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
1138
- const prefix = ` ${colorCode};1m${name} \x1B[0m`;
950
+ var c = this.color;
951
+ var colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
952
+ var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
1139
953
  args[0] = prefix + args[0].split("\n").join("\n" + prefix);
1140
954
  args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
1141
955
  } else {
@@ -1148,8 +962,8 @@ var require_node = __commonJS({
1148
962
  }
1149
963
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
1150
964
  }
1151
- function log(...args) {
1152
- return process.stderr.write(util3.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
965
+ function log() {
966
+ return process.stderr.write(util2.format.apply(util2, arguments) + "\n");
1153
967
  }
1154
968
  function save(namespaces) {
1155
969
  if (namespaces) {
@@ -1163,27 +977,30 @@ var require_node = __commonJS({
1163
977
  }
1164
978
  function init(debug) {
1165
979
  debug.inspectOpts = {};
1166
- const keys = Object.keys(exports2.inspectOpts);
1167
- for (let i = 0; i < keys.length; i++) {
980
+ var keys = Object.keys(exports2.inspectOpts);
981
+ for (var i = 0; i < keys.length; i++) {
1168
982
  debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
1169
983
  }
1170
984
  }
1171
985
  module2.exports = require_common()(exports2);
1172
- var { formatters } = module2.exports;
986
+ var formatters = module2.exports.formatters;
1173
987
  formatters.o = function(v) {
1174
988
  this.inspectOpts.colors = this.useColors;
1175
- return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
989
+ return util2.inspect(v, this.inspectOpts).split("\n").map(function(str) {
990
+ return str.trim();
991
+ }).join(" ");
1176
992
  };
1177
993
  formatters.O = function(v) {
1178
994
  this.inspectOpts.colors = this.useColors;
1179
- return util3.inspect(v, this.inspectOpts);
995
+ return util2.inspect(v, this.inspectOpts);
1180
996
  };
1181
997
  }
1182
998
  });
1183
999
 
1184
- // node_modules/debug/src/index.js
1000
+ // node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/index.js
1185
1001
  var require_src = __commonJS({
1186
- "node_modules/debug/src/index.js"(exports2, module2) {
1002
+ "node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/index.js"(exports2, module2) {
1003
+ "use strict";
1187
1004
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
1188
1005
  module2.exports = require_browser();
1189
1006
  } else {
@@ -1192,9 +1009,9 @@ var require_src = __commonJS({
1192
1009
  }
1193
1010
  });
1194
1011
 
1195
- // node_modules/follow-redirects/debug.js
1012
+ // node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/debug.js
1196
1013
  var require_debug = __commonJS({
1197
- "node_modules/follow-redirects/debug.js"(exports2, module2) {
1014
+ "node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/debug.js"(exports2, module2) {
1198
1015
  var debug;
1199
1016
  module2.exports = function() {
1200
1017
  if (!debug) {
@@ -1212,9 +1029,9 @@ var require_debug = __commonJS({
1212
1029
  }
1213
1030
  });
1214
1031
 
1215
- // node_modules/follow-redirects/index.js
1032
+ // node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/index.js
1216
1033
  var require_follow_redirects = __commonJS({
1217
- "node_modules/follow-redirects/index.js"(exports2, module2) {
1034
+ "node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/index.js"(exports2, module2) {
1218
1035
  var url2 = require("url");
1219
1036
  var URL3 = url2.URL;
1220
1037
  var http2 = require("http");
@@ -1222,33 +1039,6 @@ var require_follow_redirects = __commonJS({
1222
1039
  var Writable = require("stream").Writable;
1223
1040
  var assert = require("assert");
1224
1041
  var debug = require_debug();
1225
- (function detectUnsupportedEnvironment() {
1226
- var looksLikeNode = typeof process !== "undefined";
1227
- var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
1228
- var looksLikeV8 = isFunction2(Error.captureStackTrace);
1229
- if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {
1230
- console.warn("The follow-redirects package should be excluded from browser builds.");
1231
- }
1232
- })();
1233
- var useNativeURL = false;
1234
- try {
1235
- assert(new URL3(""));
1236
- } catch (error) {
1237
- useNativeURL = error.code === "ERR_INVALID_URL";
1238
- }
1239
- var preservedUrlFields = [
1240
- "auth",
1241
- "host",
1242
- "hostname",
1243
- "href",
1244
- "path",
1245
- "pathname",
1246
- "port",
1247
- "protocol",
1248
- "query",
1249
- "search",
1250
- "hash"
1251
- ];
1252
1042
  var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
1253
1043
  var eventHandlers = /* @__PURE__ */ Object.create(null);
1254
1044
  events.forEach(function(event) {
@@ -1267,8 +1057,7 @@ var require_follow_redirects = __commonJS({
1267
1057
  );
1268
1058
  var TooManyRedirectsError = createErrorType(
1269
1059
  "ERR_FR_TOO_MANY_REDIRECTS",
1270
- "Maximum number of redirects exceeded",
1271
- RedirectionError
1060
+ "Maximum number of redirects exceeded"
1272
1061
  );
1273
1062
  var MaxBodyLengthExceededError = createErrorType(
1274
1063
  "ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
@@ -1278,7 +1067,6 @@ var require_follow_redirects = __commonJS({
1278
1067
  "ERR_STREAM_WRITE_AFTER_END",
1279
1068
  "write after end"
1280
1069
  );
1281
- var destroy = Writable.prototype.destroy || noop2;
1282
1070
  function RedirectableRequest(options, responseCallback) {
1283
1071
  Writable.call(this);
1284
1072
  this._sanitizeOptions(options);
@@ -1294,25 +1082,15 @@ var require_follow_redirects = __commonJS({
1294
1082
  }
1295
1083
  var self2 = this;
1296
1084
  this._onNativeResponse = function(response) {
1297
- try {
1298
- self2._processResponse(response);
1299
- } catch (cause) {
1300
- self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
1301
- }
1085
+ self2._processResponse(response);
1302
1086
  };
1303
1087
  this._performRequest();
1304
1088
  }
1305
1089
  RedirectableRequest.prototype = Object.create(Writable.prototype);
1306
1090
  RedirectableRequest.prototype.abort = function() {
1307
- destroyRequest(this._currentRequest);
1308
- this._currentRequest.abort();
1091
+ abortRequest(this._currentRequest);
1309
1092
  this.emit("abort");
1310
1093
  };
1311
- RedirectableRequest.prototype.destroy = function(error) {
1312
- destroyRequest(this._currentRequest, error);
1313
- destroy.call(this, error);
1314
- return this;
1315
- };
1316
1094
  RedirectableRequest.prototype.write = function(data, encoding, callback) {
1317
1095
  if (this._ending) {
1318
1096
  throw new WriteAfterEndError();
@@ -1393,7 +1171,6 @@ var require_follow_redirects = __commonJS({
1393
1171
  self2.removeListener("abort", clearTimer);
1394
1172
  self2.removeListener("error", clearTimer);
1395
1173
  self2.removeListener("response", clearTimer);
1396
- self2.removeListener("close", clearTimer);
1397
1174
  if (callback) {
1398
1175
  self2.removeListener("timeout", callback);
1399
1176
  }
@@ -1413,7 +1190,6 @@ var require_follow_redirects = __commonJS({
1413
1190
  this.on("abort", clearTimer);
1414
1191
  this.on("error", clearTimer);
1415
1192
  this.on("response", clearTimer);
1416
- this.on("close", clearTimer);
1417
1193
  return this;
1418
1194
  };
1419
1195
  [
@@ -1457,7 +1233,8 @@ var require_follow_redirects = __commonJS({
1457
1233
  var protocol = this._options.protocol;
1458
1234
  var nativeProtocol = this._options.nativeProtocols[protocol];
1459
1235
  if (!nativeProtocol) {
1460
- throw new TypeError("Unsupported protocol " + protocol);
1236
+ this.emit("error", new TypeError("Unsupported protocol " + protocol));
1237
+ return;
1461
1238
  }
1462
1239
  if (this._options.agents) {
1463
1240
  var scheme = protocol.slice(0, -1);
@@ -1510,10 +1287,11 @@ var require_follow_redirects = __commonJS({
1510
1287
  this._requestBodyBuffers = [];
1511
1288
  return;
1512
1289
  }
1513
- destroyRequest(this._currentRequest);
1290
+ abortRequest(this._currentRequest);
1514
1291
  response.destroy();
1515
1292
  if (++this._redirectCount > this._options.maxRedirects) {
1516
- throw new TooManyRedirectsError();
1293
+ this.emit("error", new TooManyRedirectsError());
1294
+ return;
1517
1295
  }
1518
1296
  var requestHeaders;
1519
1297
  var beforeRedirect = this._options.beforeRedirect;
@@ -1534,15 +1312,22 @@ var require_follow_redirects = __commonJS({
1534
1312
  removeMatchingHeaders(/^content-/i, this._options.headers);
1535
1313
  }
1536
1314
  var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
1537
- var currentUrlParts = parseUrl(this._currentUrl);
1315
+ var currentUrlParts = url2.parse(this._currentUrl);
1538
1316
  var currentHost = currentHostHeader || currentUrlParts.host;
1539
1317
  var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
1540
- var redirectUrl = resolveUrl(location, currentUrl);
1541
- debug("redirecting to", redirectUrl.href);
1318
+ var redirectUrl;
1319
+ try {
1320
+ redirectUrl = url2.resolve(currentUrl, location);
1321
+ } catch (cause) {
1322
+ this.emit("error", new RedirectionError({ cause }));
1323
+ return;
1324
+ }
1325
+ debug("redirecting to", redirectUrl);
1542
1326
  this._isRedirect = true;
1543
- spreadUrlObject(redirectUrl, this._options);
1544
- if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
1545
- removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
1327
+ var redirectUrlParts = url2.parse(redirectUrl);
1328
+ Object.assign(this._options, redirectUrlParts);
1329
+ if (redirectUrlParts.protocol !== currentUrlParts.protocol && redirectUrlParts.protocol !== "https:" || redirectUrlParts.host !== currentHost && !isSubdomain(redirectUrlParts.host, currentHost)) {
1330
+ removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
1546
1331
  }
1547
1332
  if (isFunction2(beforeRedirect)) {
1548
1333
  var responseDetails = {
@@ -1554,10 +1339,19 @@ var require_follow_redirects = __commonJS({
1554
1339
  method,
1555
1340
  headers: requestHeaders
1556
1341
  };
1557
- beforeRedirect(this._options, responseDetails, requestDetails);
1342
+ try {
1343
+ beforeRedirect(this._options, responseDetails, requestDetails);
1344
+ } catch (err) {
1345
+ this.emit("error", err);
1346
+ return;
1347
+ }
1558
1348
  this._sanitizeOptions(this._options);
1559
1349
  }
1560
- this._performRequest();
1350
+ try {
1351
+ this._performRequest();
1352
+ } catch (cause) {
1353
+ this.emit("error", new RedirectionError({ cause }));
1354
+ }
1561
1355
  };
1562
1356
  function wrap(protocols) {
1563
1357
  var exports3 = {
@@ -1570,13 +1364,22 @@ var require_follow_redirects = __commonJS({
1570
1364
  var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
1571
1365
  var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol);
1572
1366
  function request(input, options, callback) {
1573
- if (isURL(input)) {
1574
- input = spreadUrlObject(input);
1575
- } else if (isString2(input)) {
1576
- input = spreadUrlObject(parseUrl(input));
1367
+ if (isString2(input)) {
1368
+ var parsed;
1369
+ try {
1370
+ parsed = urlToOptions(new URL3(input));
1371
+ } catch (err) {
1372
+ parsed = url2.parse(input);
1373
+ }
1374
+ if (!isString2(parsed.protocol)) {
1375
+ throw new InvalidUrlError({ input });
1376
+ }
1377
+ input = parsed;
1378
+ } else if (URL3 && input instanceof URL3) {
1379
+ input = urlToOptions(input);
1577
1380
  } else {
1578
1381
  callback = options;
1579
- options = validateUrl(input);
1382
+ options = input;
1580
1383
  input = { protocol };
1581
1384
  }
1582
1385
  if (isFunction2(options)) {
@@ -1609,43 +1412,23 @@ var require_follow_redirects = __commonJS({
1609
1412
  }
1610
1413
  function noop2() {
1611
1414
  }
1612
- function parseUrl(input) {
1613
- var parsed;
1614
- if (useNativeURL) {
1615
- parsed = new URL3(input);
1616
- } else {
1617
- parsed = validateUrl(url2.parse(input));
1618
- if (!isString2(parsed.protocol)) {
1619
- throw new InvalidUrlError({ input });
1620
- }
1621
- }
1622
- return parsed;
1623
- }
1624
- function resolveUrl(relative, base) {
1625
- return useNativeURL ? new URL3(relative, base) : parseUrl(url2.resolve(base, relative));
1626
- }
1627
- function validateUrl(input) {
1628
- if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
1629
- throw new InvalidUrlError({ input: input.href || input });
1630
- }
1631
- if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
1632
- throw new InvalidUrlError({ input: input.href || input });
1633
- }
1634
- return input;
1635
- }
1636
- function spreadUrlObject(urlObject, target) {
1637
- var spread3 = target || {};
1638
- for (var key of preservedUrlFields) {
1639
- spread3[key] = urlObject[key];
1640
- }
1641
- if (spread3.hostname.startsWith("[")) {
1642
- spread3.hostname = spread3.hostname.slice(1, -1);
1643
- }
1644
- if (spread3.port !== "") {
1645
- spread3.port = Number(spread3.port);
1415
+ function urlToOptions(urlObject) {
1416
+ var options = {
1417
+ protocol: urlObject.protocol,
1418
+ hostname: urlObject.hostname.startsWith("[") ? (
1419
+ /* istanbul ignore next */
1420
+ urlObject.hostname.slice(1, -1)
1421
+ ) : urlObject.hostname,
1422
+ hash: urlObject.hash,
1423
+ search: urlObject.search,
1424
+ pathname: urlObject.pathname,
1425
+ path: urlObject.pathname + urlObject.search,
1426
+ href: urlObject.href
1427
+ };
1428
+ if (urlObject.port !== "") {
1429
+ options.port = Number(urlObject.port);
1646
1430
  }
1647
- spread3.path = spread3.search ? spread3.pathname + spread3.search : spread3.pathname;
1648
- return spread3;
1431
+ return options;
1649
1432
  }
1650
1433
  function removeMatchingHeaders(regex, headers) {
1651
1434
  var lastValue;
@@ -1659,32 +1442,22 @@ var require_follow_redirects = __commonJS({
1659
1442
  }
1660
1443
  function createErrorType(code, message, baseClass) {
1661
1444
  function CustomError(properties) {
1662
- if (isFunction2(Error.captureStackTrace)) {
1663
- Error.captureStackTrace(this, this.constructor);
1664
- }
1445
+ Error.captureStackTrace(this, this.constructor);
1665
1446
  Object.assign(this, properties || {});
1666
1447
  this.code = code;
1667
1448
  this.message = this.cause ? message + ": " + this.cause.message : message;
1668
1449
  }
1669
1450
  CustomError.prototype = new (baseClass || Error)();
1670
- Object.defineProperties(CustomError.prototype, {
1671
- constructor: {
1672
- value: CustomError,
1673
- enumerable: false
1674
- },
1675
- name: {
1676
- value: "Error [" + code + "]",
1677
- enumerable: false
1678
- }
1679
- });
1451
+ CustomError.prototype.constructor = CustomError;
1452
+ CustomError.prototype.name = "Error [" + code + "]";
1680
1453
  return CustomError;
1681
1454
  }
1682
- function destroyRequest(request, error) {
1455
+ function abortRequest(request) {
1683
1456
  for (var event of events) {
1684
1457
  request.removeListener(event, eventHandlers[event]);
1685
1458
  }
1686
1459
  request.on("error", noop2);
1687
- request.destroy(error);
1460
+ request.abort();
1688
1461
  }
1689
1462
  function isSubdomain(subdomain, domain) {
1690
1463
  assert(isString2(subdomain) && isString2(domain));
@@ -1700,9 +1473,6 @@ var require_follow_redirects = __commonJS({
1700
1473
  function isBuffer2(value) {
1701
1474
  return typeof value === "object" && "length" in value;
1702
1475
  }
1703
- function isURL(value) {
1704
- return URL3 && value instanceof URL3;
1705
- }
1706
1476
  module2.exports = wrap({ http: http2, https: https2 });
1707
1477
  module2.exports.wrap = wrap;
1708
1478
  }
@@ -1710,30 +1480,67 @@ var require_follow_redirects = __commonJS({
1710
1480
 
1711
1481
  // bin/index.ts
1712
1482
  var import_dotenv = __toESM(require_main());
1483
+
1484
+ // bin/utils/checkNodeVersion.ts
1485
+ var import_chalk = __toESM(require("chalk"));
1486
+ var MIN_NODE_VERSION = "16.13.0";
1487
+ function parseVersion(version2) {
1488
+ const parts = version2.replace(/^v/, "").split(".").map(Number);
1489
+ return {
1490
+ major: parts[0] || 0,
1491
+ minor: parts[1] || 0,
1492
+ patch: parts[2] || 0
1493
+ };
1494
+ }
1495
+ function compareVersions(version1, version2) {
1496
+ if (version1.major !== version2.major) {
1497
+ return version1.major - version2.major;
1498
+ }
1499
+ if (version1.minor !== version2.minor) {
1500
+ return version1.minor - version2.minor;
1501
+ }
1502
+ return version1.patch - version2.patch;
1503
+ }
1504
+ function checkNodeVersion() {
1505
+ const currentVersion = process.version;
1506
+ const current = parseVersion(currentVersion);
1507
+ const minimum = parseVersion(MIN_NODE_VERSION);
1508
+ if (compareVersions(current, minimum) < 0) {
1509
+ console.error(import_chalk.default.red("\u274C Node.js version requirement not met"));
1510
+ console.error(import_chalk.default.yellow(`Current version: ${currentVersion}`));
1511
+ console.error(import_chalk.default.yellow(`Required version: >= ${MIN_NODE_VERSION}`));
1512
+ console.error("");
1513
+ console.error(import_chalk.default.cyan("Please upgrade Node.js to version 16.13.0 or higher."));
1514
+ console.error(import_chalk.default.cyan("Download from: https://nodejs.org/"));
1515
+ console.error("");
1516
+ process.exit(1);
1517
+ }
1518
+ }
1519
+
1520
+ // bin/index.ts
1713
1521
  var import_commander = require("commander");
1714
- var import_chalk5 = __toESM(require("chalk"));
1522
+ var import_chalk6 = __toESM(require("chalk"));
1715
1523
  var import_figlet3 = __toESM(require("figlet"));
1716
1524
 
1717
1525
  // package.json
1718
- var version = "1.1.4-alpha.2";
1526
+ var version = "1.1.4-alpha.3";
1719
1527
 
1720
1528
  // bin/upload.ts
1721
1529
  var import_path5 = __toESM(require("path"));
1722
- var import_chalk2 = __toESM(require("chalk"));
1530
+ var import_chalk3 = __toESM(require("chalk"));
1723
1531
  var import_inquirer = __toESM(require("inquirer"));
1724
1532
  var import_figlet = __toESM(require("figlet"));
1725
1533
 
1726
- // node_modules/axios/lib/helpers/bind.js
1534
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/bind.js
1727
1535
  function bind(fn, thisArg) {
1728
1536
  return function wrap() {
1729
1537
  return fn.apply(thisArg, arguments);
1730
1538
  };
1731
1539
  }
1732
1540
 
1733
- // node_modules/axios/lib/utils.js
1541
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/utils.js
1734
1542
  var { toString } = Object.prototype;
1735
1543
  var { getPrototypeOf } = Object;
1736
- var { iterator, toStringTag } = Symbol;
1737
1544
  var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
1738
1545
  const str = toString.call(thing);
1739
1546
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -1768,7 +1575,7 @@ var isPlainObject = (val) => {
1768
1575
  return false;
1769
1576
  }
1770
1577
  const prototype3 = getPrototypeOf(val);
1771
- return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(toStringTag in val) && !(iterator in val);
1578
+ return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
1772
1579
  };
1773
1580
  var isDate = kindOfTest("Date");
1774
1581
  var isFile = kindOfTest("File");
@@ -1776,12 +1583,10 @@ var isBlob = kindOfTest("Blob");
1776
1583
  var isFileList = kindOfTest("FileList");
1777
1584
  var isStream = (val) => isObject(val) && isFunction(val.pipe);
1778
1585
  var isFormData = (thing) => {
1779
- let kind;
1780
- return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
1781
- kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
1586
+ const pattern = "[object FormData]";
1587
+ return thing && (typeof FormData === "function" && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern);
1782
1588
  };
1783
1589
  var isURLSearchParams = kindOfTest("URLSearchParams");
1784
- var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
1785
1590
  var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1786
1591
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
1787
1592
  if (obj === null || typeof obj === "undefined") {
@@ -1915,10 +1720,10 @@ var isTypedArray = /* @__PURE__ */ ((TypedArray) => {
1915
1720
  };
1916
1721
  })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
1917
1722
  var forEachEntry = (obj, fn) => {
1918
- const generator = obj && obj[iterator];
1919
- const _iterator = generator.call(obj);
1723
+ const generator = obj && obj[Symbol.iterator];
1724
+ const iterator = generator.call(obj);
1920
1725
  let result;
1921
- while ((result = _iterator.next()) && !result.done) {
1726
+ while ((result = iterator.next()) && !result.done) {
1922
1727
  const pair = result.value;
1923
1728
  fn.call(obj, pair[0], pair[1]);
1924
1729
  }
@@ -1946,9 +1751,8 @@ var reduceDescriptors = (obj, reducer) => {
1946
1751
  const descriptors2 = Object.getOwnPropertyDescriptors(obj);
1947
1752
  const reducedDescriptors = {};
1948
1753
  forEach(descriptors2, (descriptor, name) => {
1949
- let ret;
1950
- if ((ret = reducer(descriptor, name, obj)) !== false) {
1951
- reducedDescriptors[name] = ret || descriptor;
1754
+ if (reducer(descriptor, name, obj) !== false) {
1755
+ reducedDescriptors[name] = descriptor;
1952
1756
  }
1953
1757
  });
1954
1758
  Object.defineProperties(obj, reducedDescriptors);
@@ -1985,10 +1789,26 @@ var toObjectSet = (arrayOrString, delimiter) => {
1985
1789
  var noop = () => {
1986
1790
  };
1987
1791
  var toFiniteNumber = (value, defaultValue) => {
1988
- return value != null && Number.isFinite(value = +value) ? value : defaultValue;
1792
+ value = +value;
1793
+ return Number.isFinite(value) ? value : defaultValue;
1794
+ };
1795
+ var ALPHA = "abcdefghijklmnopqrstuvwxyz";
1796
+ var DIGIT = "0123456789";
1797
+ var ALPHABET = {
1798
+ DIGIT,
1799
+ ALPHA,
1800
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
1801
+ };
1802
+ var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
1803
+ let str = "";
1804
+ const { length } = alphabet;
1805
+ while (size--) {
1806
+ str += alphabet[Math.random() * length | 0];
1807
+ }
1808
+ return str;
1989
1809
  };
1990
1810
  function isSpecCompliantForm(thing) {
1991
- return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
1811
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
1992
1812
  }
1993
1813
  var toJSONObject = (obj) => {
1994
1814
  const stack = new Array(10);
@@ -2012,29 +1832,6 @@ var toJSONObject = (obj) => {
2012
1832
  };
2013
1833
  return visit(obj, 0);
2014
1834
  };
2015
- var isAsyncFn = kindOfTest("AsyncFunction");
2016
- var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
2017
- var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
2018
- if (setImmediateSupported) {
2019
- return setImmediate;
2020
- }
2021
- return postMessageSupported ? ((token, callbacks) => {
2022
- _global.addEventListener("message", ({ source, data }) => {
2023
- if (source === _global && data === token) {
2024
- callbacks.length && callbacks.shift()();
2025
- }
2026
- }, false);
2027
- return (cb) => {
2028
- callbacks.push(cb);
2029
- _global.postMessage(token, "*");
2030
- };
2031
- })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
2032
- })(
2033
- typeof setImmediate === "function",
2034
- isFunction(_global.postMessage)
2035
- );
2036
- var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
2037
- var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
2038
1835
  var utils_default = {
2039
1836
  isArray,
2040
1837
  isArrayBuffer,
@@ -2046,10 +1843,6 @@ var utils_default = {
2046
1843
  isBoolean,
2047
1844
  isObject,
2048
1845
  isPlainObject,
2049
- isReadableStream,
2050
- isRequest,
2051
- isResponse,
2052
- isHeaders,
2053
1846
  isUndefined,
2054
1847
  isDate,
2055
1848
  isFile,
@@ -2086,16 +1879,13 @@ var utils_default = {
2086
1879
  findKey,
2087
1880
  global: _global,
2088
1881
  isContextDefined,
1882
+ ALPHABET,
1883
+ generateString,
2089
1884
  isSpecCompliantForm,
2090
- toJSONObject,
2091
- isAsyncFn,
2092
- isThenable,
2093
- setImmediate: _setImmediate,
2094
- asap,
2095
- isIterable
1885
+ toJSONObject
2096
1886
  };
2097
1887
 
2098
- // node_modules/axios/lib/core/AxiosError.js
1888
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/AxiosError.js
2099
1889
  function AxiosError(message, code, config, request, response) {
2100
1890
  Error.call(this);
2101
1891
  if (Error.captureStackTrace) {
@@ -2108,10 +1898,7 @@ function AxiosError(message, code, config, request, response) {
2108
1898
  code && (this.code = code);
2109
1899
  config && (this.config = config);
2110
1900
  request && (this.request = request);
2111
- if (response) {
2112
- this.response = response;
2113
- this.status = response.status ? response.status : null;
2114
- }
1901
+ response && (this.response = response);
2115
1902
  }
2116
1903
  utils_default.inherits(AxiosError, Error, {
2117
1904
  toJSON: function toJSON() {
@@ -2130,7 +1917,7 @@ utils_default.inherits(AxiosError, Error, {
2130
1917
  // Axios
2131
1918
  config: utils_default.toJSONObject(this.config),
2132
1919
  code: this.code,
2133
- status: this.status
1920
+ status: this.response && this.response.status ? this.response.status : null
2134
1921
  };
2135
1922
  }
2136
1923
  });
@@ -2170,11 +1957,11 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
2170
1957
  };
2171
1958
  var AxiosError_default = AxiosError;
2172
1959
 
2173
- // node_modules/axios/lib/platform/node/classes/FormData.js
1960
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/platform/node/classes/FormData.js
2174
1961
  var import_form_data = __toESM(require("form-data"), 1);
2175
1962
  var FormData_default = import_form_data.default;
2176
1963
 
2177
- // node_modules/axios/lib/helpers/toFormData.js
1964
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/toFormData.js
2178
1965
  function isVisitable(thing) {
2179
1966
  return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
2180
1967
  }
@@ -2286,7 +2073,7 @@ function toFormData(obj, formData, options) {
2286
2073
  }
2287
2074
  var toFormData_default = toFormData;
2288
2075
 
2289
- // node_modules/axios/lib/helpers/AxiosURLSearchParams.js
2076
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
2290
2077
  function encode(str) {
2291
2078
  const charMap = {
2292
2079
  "!": "%21",
@@ -2319,7 +2106,7 @@ prototype2.toString = function toString2(encoder) {
2319
2106
  };
2320
2107
  var AxiosURLSearchParams_default = AxiosURLSearchParams;
2321
2108
 
2322
- // node_modules/axios/lib/helpers/buildURL.js
2109
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/buildURL.js
2323
2110
  function encode2(val) {
2324
2111
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
2325
2112
  }
@@ -2328,11 +2115,6 @@ function buildURL(url2, params, options) {
2328
2115
  return url2;
2329
2116
  }
2330
2117
  const _encode = options && options.encode || encode2;
2331
- if (utils_default.isFunction(options)) {
2332
- options = {
2333
- serialize: options
2334
- };
2335
- }
2336
2118
  const serializeFn = options && options.serialize;
2337
2119
  let serializedParams;
2338
2120
  if (serializeFn) {
@@ -2350,7 +2132,7 @@ function buildURL(url2, params, options) {
2350
2132
  return url2;
2351
2133
  }
2352
2134
 
2353
- // node_modules/axios/lib/core/InterceptorManager.js
2135
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/InterceptorManager.js
2354
2136
  var InterceptorManager = class {
2355
2137
  constructor() {
2356
2138
  this.handlers = [];
@@ -2414,38 +2196,18 @@ var InterceptorManager = class {
2414
2196
  };
2415
2197
  var InterceptorManager_default = InterceptorManager;
2416
2198
 
2417
- // node_modules/axios/lib/defaults/transitional.js
2199
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/defaults/transitional.js
2418
2200
  var transitional_default = {
2419
2201
  silentJSONParsing: true,
2420
2202
  forcedJSONParsing: true,
2421
2203
  clarifyTimeoutError: false
2422
2204
  };
2423
2205
 
2424
- // node_modules/axios/lib/platform/node/index.js
2425
- var import_crypto = __toESM(require("crypto"), 1);
2426
-
2427
- // node_modules/axios/lib/platform/node/classes/URLSearchParams.js
2206
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
2428
2207
  var import_url = __toESM(require("url"), 1);
2429
2208
  var URLSearchParams_default = import_url.default.URLSearchParams;
2430
2209
 
2431
- // node_modules/axios/lib/platform/node/index.js
2432
- var ALPHA = "abcdefghijklmnopqrstuvwxyz";
2433
- var DIGIT = "0123456789";
2434
- var ALPHABET = {
2435
- DIGIT,
2436
- ALPHA,
2437
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
2438
- };
2439
- var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
2440
- let str = "";
2441
- const { length } = alphabet;
2442
- const randomValues = new Uint32Array(size);
2443
- import_crypto.default.randomFillSync(randomValues);
2444
- for (let i = 0; i < size; i++) {
2445
- str += alphabet[randomValues[i] % length];
2446
- }
2447
- return str;
2448
- };
2210
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/platform/node/index.js
2449
2211
  var node_default = {
2450
2212
  isNode: true,
2451
2213
  classes: {
@@ -2453,40 +2215,14 @@ var node_default = {
2453
2215
  FormData: FormData_default,
2454
2216
  Blob: typeof Blob !== "undefined" && Blob || null
2455
2217
  },
2456
- ALPHABET,
2457
- generateString,
2458
2218
  protocols: ["http", "https", "file", "data"]
2459
2219
  };
2460
2220
 
2461
- // node_modules/axios/lib/platform/common/utils.js
2462
- var utils_exports = {};
2463
- __export(utils_exports, {
2464
- hasBrowserEnv: () => hasBrowserEnv,
2465
- hasStandardBrowserEnv: () => hasStandardBrowserEnv,
2466
- hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
2467
- navigator: () => _navigator,
2468
- origin: () => origin
2469
- });
2470
- var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
2471
- var _navigator = typeof navigator === "object" && navigator || void 0;
2472
- var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
2473
- var hasStandardBrowserWebWorkerEnv = (() => {
2474
- return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
2475
- self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
2476
- })();
2477
- var origin = hasBrowserEnv && window.location.href || "http://localhost";
2478
-
2479
- // node_modules/axios/lib/platform/index.js
2480
- var platform_default = {
2481
- ...utils_exports,
2482
- ...node_default
2483
- };
2484
-
2485
- // node_modules/axios/lib/helpers/toURLEncodedForm.js
2221
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/toURLEncodedForm.js
2486
2222
  function toURLEncodedForm(data, options) {
2487
- return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({
2223
+ return toFormData_default(data, new node_default.classes.URLSearchParams(), Object.assign({
2488
2224
  visitor: function(value, key, path6, helpers) {
2489
- if (platform_default.isNode && utils_default.isBuffer(value)) {
2225
+ if (node_default.isNode && utils_default.isBuffer(value)) {
2490
2226
  this.append(key, value.toString("base64"));
2491
2227
  return false;
2492
2228
  }
@@ -2495,7 +2231,7 @@ function toURLEncodedForm(data, options) {
2495
2231
  }, options));
2496
2232
  }
2497
2233
 
2498
- // node_modules/axios/lib/helpers/formDataToJSON.js
2234
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/formDataToJSON.js
2499
2235
  function parsePropPath(name) {
2500
2236
  return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
2501
2237
  return match[0] === "[]" ? "" : match[1] || match[0];
@@ -2516,7 +2252,6 @@ function arrayToObject(arr) {
2516
2252
  function formDataToJSON(formData) {
2517
2253
  function buildPath(path6, value, target, index) {
2518
2254
  let name = path6[index++];
2519
- if (name === "__proto__") return true;
2520
2255
  const isNumericKey = Number.isFinite(+name);
2521
2256
  const isLast = index >= path6.length;
2522
2257
  name = !name && utils_default.isArray(target) ? target.length : name;
@@ -2548,7 +2283,10 @@ function formDataToJSON(formData) {
2548
2283
  }
2549
2284
  var formDataToJSON_default = formDataToJSON;
2550
2285
 
2551
- // node_modules/axios/lib/defaults/index.js
2286
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/defaults/index.js
2287
+ var DEFAULT_CONTENT_TYPE = {
2288
+ "Content-Type": void 0
2289
+ };
2552
2290
  function stringifySafely(rawValue, parser, encoder) {
2553
2291
  if (utils_default.isString(rawValue)) {
2554
2292
  try {
@@ -2564,7 +2302,7 @@ function stringifySafely(rawValue, parser, encoder) {
2564
2302
  }
2565
2303
  var defaults = {
2566
2304
  transitional: transitional_default,
2567
- adapter: ["xhr", "http", "fetch"],
2305
+ adapter: ["xhr", "http"],
2568
2306
  transformRequest: [function transformRequest(data, headers) {
2569
2307
  const contentType = headers.getContentType() || "";
2570
2308
  const hasJSONContentType = contentType.indexOf("application/json") > -1;
@@ -2574,9 +2312,12 @@ var defaults = {
2574
2312
  }
2575
2313
  const isFormData2 = utils_default.isFormData(data);
2576
2314
  if (isFormData2) {
2315
+ if (!hasJSONContentType) {
2316
+ return data;
2317
+ }
2577
2318
  return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
2578
2319
  }
2579
- if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
2320
+ if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data)) {
2580
2321
  return data;
2581
2322
  }
2582
2323
  if (utils_default.isArrayBufferView(data)) {
@@ -2610,9 +2351,6 @@ var defaults = {
2610
2351
  const transitional2 = this.transitional || defaults.transitional;
2611
2352
  const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
2612
2353
  const JSONRequested = this.responseType === "json";
2613
- if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
2614
- return data;
2615
- }
2616
2354
  if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
2617
2355
  const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
2618
2356
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
@@ -2639,25 +2377,27 @@ var defaults = {
2639
2377
  maxContentLength: -1,
2640
2378
  maxBodyLength: -1,
2641
2379
  env: {
2642
- FormData: platform_default.classes.FormData,
2643
- Blob: platform_default.classes.Blob
2380
+ FormData: node_default.classes.FormData,
2381
+ Blob: node_default.classes.Blob
2644
2382
  },
2645
2383
  validateStatus: function validateStatus(status) {
2646
2384
  return status >= 200 && status < 300;
2647
2385
  },
2648
2386
  headers: {
2649
2387
  common: {
2650
- "Accept": "application/json, text/plain, */*",
2651
- "Content-Type": void 0
2388
+ "Accept": "application/json, text/plain, */*"
2652
2389
  }
2653
2390
  }
2654
2391
  };
2655
- utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
2392
+ utils_default.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
2656
2393
  defaults.headers[method] = {};
2657
2394
  });
2395
+ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
2396
+ defaults.headers[method] = utils_default.merge(DEFAULT_CONTENT_TYPE);
2397
+ });
2658
2398
  var defaults_default = defaults;
2659
2399
 
2660
- // node_modules/axios/lib/helpers/parseHeaders.js
2400
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/parseHeaders.js
2661
2401
  var ignoreDuplicateOf = utils_default.toObjectSet([
2662
2402
  "age",
2663
2403
  "authorization",
@@ -2702,7 +2442,7 @@ var parseHeaders_default = (rawHeaders) => {
2702
2442
  return parsed;
2703
2443
  };
2704
2444
 
2705
- // node_modules/axios/lib/core/AxiosHeaders.js
2445
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/AxiosHeaders.js
2706
2446
  var $internals = Symbol("internals");
2707
2447
  function normalizeHeader(header) {
2708
2448
  return header && String(header).trim().toLowerCase();
@@ -2722,14 +2462,13 @@ function parseTokens(str) {
2722
2462
  }
2723
2463
  return tokens;
2724
2464
  }
2725
- var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
2726
- function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
2465
+ function isValidHeaderName(str) {
2466
+ return /^[-_a-zA-Z]+$/.test(str.trim());
2467
+ }
2468
+ function matchHeaderValue(context, value, header, filter2) {
2727
2469
  if (utils_default.isFunction(filter2)) {
2728
2470
  return filter2.call(this, value, header);
2729
2471
  }
2730
- if (isHeaderNameFilter) {
2731
- value = header;
2732
- }
2733
2472
  if (!utils_default.isString(value)) return;
2734
2473
  if (utils_default.isString(filter2)) {
2735
2474
  return value.indexOf(filter2) !== -1;
@@ -2775,15 +2514,6 @@ var AxiosHeaders = class {
2775
2514
  setHeaders(header, valueOrRewrite);
2776
2515
  } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
2777
2516
  setHeaders(parseHeaders_default(header), valueOrRewrite);
2778
- } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
2779
- let obj = {}, dest, key;
2780
- for (const entry of header) {
2781
- if (!utils_default.isArray(entry)) {
2782
- throw TypeError("Object iterator must return a key-value pair");
2783
- }
2784
- obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
2785
- }
2786
- setHeaders(obj, valueOrRewrite);
2787
2517
  } else {
2788
2518
  header != null && setHeader(valueOrRewrite, header, rewrite);
2789
2519
  }
@@ -2845,7 +2575,7 @@ var AxiosHeaders = class {
2845
2575
  let deleted = false;
2846
2576
  while (i--) {
2847
2577
  const key = keys[i];
2848
- if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
2578
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher)) {
2849
2579
  delete this[key];
2850
2580
  deleted = true;
2851
2581
  }
@@ -2887,9 +2617,6 @@ var AxiosHeaders = class {
2887
2617
  toString() {
2888
2618
  return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
2889
2619
  }
2890
- getSetCookie() {
2891
- return this.get("set-cookie") || [];
2892
- }
2893
2620
  get [Symbol.toStringTag]() {
2894
2621
  return "AxiosHeaders";
2895
2622
  }
@@ -2919,19 +2646,11 @@ var AxiosHeaders = class {
2919
2646
  }
2920
2647
  };
2921
2648
  AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
2922
- utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
2923
- let mapped = key[0].toUpperCase() + key.slice(1);
2924
- return {
2925
- get: () => value,
2926
- set(headerValue) {
2927
- this[mapped] = headerValue;
2928
- }
2929
- };
2930
- });
2649
+ utils_default.freezeMethods(AxiosHeaders.prototype);
2931
2650
  utils_default.freezeMethods(AxiosHeaders);
2932
2651
  var AxiosHeaders_default = AxiosHeaders;
2933
2652
 
2934
- // node_modules/axios/lib/core/transformData.js
2653
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/transformData.js
2935
2654
  function transformData(fns, response) {
2936
2655
  const config = this || defaults_default;
2937
2656
  const context = response || config;
@@ -2944,12 +2663,12 @@ function transformData(fns, response) {
2944
2663
  return data;
2945
2664
  }
2946
2665
 
2947
- // node_modules/axios/lib/cancel/isCancel.js
2666
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/cancel/isCancel.js
2948
2667
  function isCancel(value) {
2949
2668
  return !!(value && value.__CANCEL__);
2950
2669
  }
2951
2670
 
2952
- // node_modules/axios/lib/cancel/CanceledError.js
2671
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/cancel/CanceledError.js
2953
2672
  function CanceledError(message, config, request) {
2954
2673
  AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
2955
2674
  this.name = "CanceledError";
@@ -2959,7 +2678,7 @@ utils_default.inherits(CanceledError, AxiosError_default, {
2959
2678
  });
2960
2679
  var CanceledError_default = CanceledError;
2961
2680
 
2962
- // node_modules/axios/lib/core/settle.js
2681
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/settle.js
2963
2682
  function settle(resolve, reject, response) {
2964
2683
  const validateStatus2 = response.config.validateStatus;
2965
2684
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
@@ -2975,26 +2694,25 @@ function settle(resolve, reject, response) {
2975
2694
  }
2976
2695
  }
2977
2696
 
2978
- // node_modules/axios/lib/helpers/isAbsoluteURL.js
2697
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/isAbsoluteURL.js
2979
2698
  function isAbsoluteURL(url2) {
2980
2699
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
2981
2700
  }
2982
2701
 
2983
- // node_modules/axios/lib/helpers/combineURLs.js
2702
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/combineURLs.js
2984
2703
  function combineURLs(baseURL, relativeURL) {
2985
- return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
2704
+ return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
2986
2705
  }
2987
2706
 
2988
- // node_modules/axios/lib/core/buildFullPath.js
2989
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
2990
- let isRelativeUrl = !isAbsoluteURL(requestedURL);
2991
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
2707
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/buildFullPath.js
2708
+ function buildFullPath(baseURL, requestedURL) {
2709
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
2992
2710
  return combineURLs(baseURL, requestedURL);
2993
2711
  }
2994
2712
  return requestedURL;
2995
2713
  }
2996
2714
 
2997
- // node_modules/axios/lib/adapters/http.js
2715
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
2998
2716
  var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
2999
2717
  var import_http = __toESM(require("http"), 1);
3000
2718
  var import_https = __toESM(require("https"), 1);
@@ -3002,19 +2720,19 @@ var import_util2 = __toESM(require("util"), 1);
3002
2720
  var import_follow_redirects = __toESM(require_follow_redirects(), 1);
3003
2721
  var import_zlib = __toESM(require("zlib"), 1);
3004
2722
 
3005
- // node_modules/axios/lib/env/data.js
3006
- var VERSION = "1.9.0";
2723
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/env/data.js
2724
+ var VERSION = "1.3.2";
3007
2725
 
3008
- // node_modules/axios/lib/helpers/parseProtocol.js
2726
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/parseProtocol.js
3009
2727
  function parseProtocol(url2) {
3010
2728
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
3011
2729
  return match && match[1] || "";
3012
2730
  }
3013
2731
 
3014
- // node_modules/axios/lib/helpers/fromDataURI.js
2732
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/fromDataURI.js
3015
2733
  var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
3016
2734
  function fromDataURI(uri, asBlob, options) {
3017
- const _Blob = options && options.Blob || platform_default.classes.Blob;
2735
+ const _Blob = options && options.Blob || node_default.classes.Blob;
3018
2736
  const protocol = parseProtocol(uri);
3019
2737
  if (asBlob === void 0 && _Blob) {
3020
2738
  asBlob = true;
@@ -3040,11 +2758,75 @@ function fromDataURI(uri, asBlob, options) {
3040
2758
  throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
3041
2759
  }
3042
2760
 
3043
- // node_modules/axios/lib/adapters/http.js
2761
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
3044
2762
  var import_stream4 = __toESM(require("stream"), 1);
3045
2763
 
3046
- // node_modules/axios/lib/helpers/AxiosTransformStream.js
2764
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/AxiosTransformStream.js
3047
2765
  var import_stream = __toESM(require("stream"), 1);
2766
+
2767
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/throttle.js
2768
+ function throttle(fn, freq) {
2769
+ let timestamp = 0;
2770
+ const threshold = 1e3 / freq;
2771
+ let timer = null;
2772
+ return function throttled(force, args) {
2773
+ const now = Date.now();
2774
+ if (force || now - timestamp > threshold) {
2775
+ if (timer) {
2776
+ clearTimeout(timer);
2777
+ timer = null;
2778
+ }
2779
+ timestamp = now;
2780
+ return fn.apply(null, args);
2781
+ }
2782
+ if (!timer) {
2783
+ timer = setTimeout(() => {
2784
+ timer = null;
2785
+ timestamp = Date.now();
2786
+ return fn.apply(null, args);
2787
+ }, threshold - (now - timestamp));
2788
+ }
2789
+ };
2790
+ }
2791
+ var throttle_default = throttle;
2792
+
2793
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/speedometer.js
2794
+ function speedometer(samplesCount, min) {
2795
+ samplesCount = samplesCount || 10;
2796
+ const bytes = new Array(samplesCount);
2797
+ const timestamps = new Array(samplesCount);
2798
+ let head = 0;
2799
+ let tail = 0;
2800
+ let firstSampleTS;
2801
+ min = min !== void 0 ? min : 1e3;
2802
+ return function push(chunkLength) {
2803
+ const now = Date.now();
2804
+ const startedAt = timestamps[tail];
2805
+ if (!firstSampleTS) {
2806
+ firstSampleTS = now;
2807
+ }
2808
+ bytes[head] = chunkLength;
2809
+ timestamps[head] = now;
2810
+ let i = tail;
2811
+ let bytesCount = 0;
2812
+ while (i !== head) {
2813
+ bytesCount += bytes[i++];
2814
+ i = i % samplesCount;
2815
+ }
2816
+ head = (head + 1) % samplesCount;
2817
+ if (head === tail) {
2818
+ tail = (tail + 1) % samplesCount;
2819
+ }
2820
+ if (now - firstSampleTS < min) {
2821
+ return;
2822
+ }
2823
+ const passed = startedAt && now - startedAt;
2824
+ return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
2825
+ };
2826
+ }
2827
+ var speedometer_default = speedometer;
2828
+
2829
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/AxiosTransformStream.js
3048
2830
  var kInternals = Symbol("internals");
3049
2831
  var AxiosTransformStream = class extends import_stream.default.Transform {
3050
2832
  constructor(options) {
@@ -3061,8 +2843,11 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
3061
2843
  super({
3062
2844
  readableHighWaterMark: options.chunkSize
3063
2845
  });
2846
+ const self2 = this;
3064
2847
  const internals = this[kInternals] = {
2848
+ length: options.length,
3065
2849
  timeWindow: options.timeWindow,
2850
+ ticksRate: options.ticksRate,
3066
2851
  chunkSize: options.chunkSize,
3067
2852
  maxRate: options.maxRate,
3068
2853
  minChunkSize: options.minChunkSize,
@@ -3073,6 +2858,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
3073
2858
  bytes: 0,
3074
2859
  onReadCallback: null
3075
2860
  };
2861
+ const _speedometer = speedometer_default(internals.ticksRate * options.samplesCount, internals.timeWindow);
3076
2862
  this.on("newListener", (event) => {
3077
2863
  if (event === "progress") {
3078
2864
  if (!internals.isCaptured) {
@@ -3080,6 +2866,30 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
3080
2866
  }
3081
2867
  }
3082
2868
  });
2869
+ let bytesNotified = 0;
2870
+ internals.updateProgress = throttle_default(function throttledHandler() {
2871
+ const totalBytes = internals.length;
2872
+ const bytesTransferred = internals.bytesSeen;
2873
+ const progressBytes = bytesTransferred - bytesNotified;
2874
+ if (!progressBytes || self2.destroyed) return;
2875
+ const rate = _speedometer(progressBytes);
2876
+ bytesNotified = bytesTransferred;
2877
+ process.nextTick(() => {
2878
+ self2.emit("progress", {
2879
+ "loaded": bytesTransferred,
2880
+ "total": totalBytes,
2881
+ "progress": totalBytes ? bytesTransferred / totalBytes : void 0,
2882
+ "bytes": progressBytes,
2883
+ "rate": rate ? rate : void 0,
2884
+ "estimated": rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : void 0
2885
+ });
2886
+ });
2887
+ }, internals.ticksRate);
2888
+ const onFinish = () => {
2889
+ internals.updateProgress(true);
2890
+ };
2891
+ this.once("end", onFinish);
2892
+ this.once("error", onFinish);
3083
2893
  }
3084
2894
  _read(size) {
3085
2895
  const internals = this[kInternals];
@@ -3089,6 +2899,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
3089
2899
  return super._read(size);
3090
2900
  }
3091
2901
  _transform(chunk, encoding, callback) {
2902
+ const self2 = this;
3092
2903
  const internals = this[kInternals];
3093
2904
  const maxRate = internals.maxRate;
3094
2905
  const readableHighWaterMark = this.readableHighWaterMark;
@@ -3096,12 +2907,14 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
3096
2907
  const divider = 1e3 / timeWindow;
3097
2908
  const bytesThreshold = maxRate / divider;
3098
2909
  const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
3099
- const pushChunk = (_chunk, _callback) => {
2910
+ function pushChunk(_chunk, _callback) {
3100
2911
  const bytes = Buffer.byteLength(_chunk);
3101
2912
  internals.bytesSeen += bytes;
3102
2913
  internals.bytes += bytes;
3103
- internals.isCaptured && this.emit("progress", internals.bytesSeen);
3104
- if (this.push(_chunk)) {
2914
+ if (internals.isCaptured) {
2915
+ internals.updateProgress();
2916
+ }
2917
+ if (self2.push(_chunk)) {
3105
2918
  process.nextTick(_callback);
3106
2919
  } else {
3107
2920
  internals.onReadCallback = () => {
@@ -3109,7 +2922,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
3109
2922
  process.nextTick(_callback);
3110
2923
  };
3111
2924
  }
3112
- };
2925
+ }
3113
2926
  const transformChunk = (_chunk, _callback) => {
3114
2927
  const chunkSize = Buffer.byteLength(_chunk);
3115
2928
  let chunkRemainder = null;
@@ -3155,17 +2968,21 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
3155
2968
  }
3156
2969
  });
3157
2970
  }
2971
+ setLength(length) {
2972
+ this[kInternals].length = +length;
2973
+ return this;
2974
+ }
3158
2975
  };
3159
2976
  var AxiosTransformStream_default = AxiosTransformStream;
3160
2977
 
3161
- // node_modules/axios/lib/adapters/http.js
3162
- var import_events = require("events");
2978
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
2979
+ var import_events = __toESM(require("events"), 1);
3163
2980
 
3164
- // node_modules/axios/lib/helpers/formDataToStream.js
3165
- var import_util = __toESM(require("util"), 1);
2981
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/formDataToStream.js
2982
+ var import_util = require("util");
3166
2983
  var import_stream2 = require("stream");
3167
2984
 
3168
- // node_modules/axios/lib/helpers/readBlob.js
2985
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/readBlob.js
3169
2986
  var { asyncIterator } = Symbol;
3170
2987
  var readBlob = async function* (blob) {
3171
2988
  if (blob.stream) {
@@ -3180,9 +2997,9 @@ var readBlob = async function* (blob) {
3180
2997
  };
3181
2998
  var readBlob_default = readBlob;
3182
2999
 
3183
- // node_modules/axios/lib/helpers/formDataToStream.js
3184
- var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
3185
- var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new import_util.default.TextEncoder();
3000
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/formDataToStream.js
3001
+ var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
3002
+ var textEncoder = new import_util.TextEncoder();
3186
3003
  var CRLF = "\r\n";
3187
3004
  var CRLF_BYTES = textEncoder.encode(CRLF);
3188
3005
  var CRLF_BYTES_COUNT = 2;
@@ -3224,7 +3041,7 @@ var formDataToStream = (form, headersHandler, options) => {
3224
3041
  const {
3225
3042
  tag = "form-data-boundary",
3226
3043
  size = 25,
3227
- boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET)
3044
+ boundary = tag + "-" + utils_default.generateString(size, BOUNDARY_ALPHABET)
3228
3045
  } = options || {};
3229
3046
  if (!utils_default.isFormData(form)) {
3230
3047
  throw TypeError("FormData instance required");
@@ -3233,7 +3050,7 @@ var formDataToStream = (form, headersHandler, options) => {
3233
3050
  throw Error("boundary must be 10-70 characters long");
3234
3051
  }
3235
3052
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
3236
- const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
3053
+ const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF + CRLF);
3237
3054
  let contentLength = footerBytes.byteLength;
3238
3055
  const parts = Array.from(form.entries()).map(([name, value]) => {
3239
3056
  const part = new FormDataPart(name, value);
@@ -3259,7 +3076,7 @@ var formDataToStream = (form, headersHandler, options) => {
3259
3076
  };
3260
3077
  var formDataToStream_default = formDataToStream;
3261
3078
 
3262
- // node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
3079
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
3263
3080
  var import_stream3 = __toESM(require("stream"), 1);
3264
3081
  var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
3265
3082
  __transform(chunk, encoding, callback) {
@@ -3281,165 +3098,40 @@ var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
3281
3098
  };
3282
3099
  var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
3283
3100
 
3284
- // node_modules/axios/lib/helpers/callbackify.js
3285
- var callbackify = (fn, reducer) => {
3286
- return utils_default.isAsyncFn(fn) ? function(...args) {
3287
- const cb = args.pop();
3288
- fn.apply(this, args).then((value) => {
3289
- try {
3290
- reducer ? cb(null, ...reducer(value)) : cb(null, value);
3291
- } catch (err) {
3292
- cb(err);
3293
- }
3294
- }, cb);
3295
- } : fn;
3101
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
3102
+ var zlibOptions = {
3103
+ flush: import_zlib.default.constants.Z_SYNC_FLUSH,
3104
+ finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
3296
3105
  };
3297
- var callbackify_default = callbackify;
3298
-
3299
- // node_modules/axios/lib/helpers/speedometer.js
3300
- function speedometer(samplesCount, min) {
3301
- samplesCount = samplesCount || 10;
3302
- const bytes = new Array(samplesCount);
3303
- const timestamps = new Array(samplesCount);
3304
- let head = 0;
3305
- let tail = 0;
3306
- let firstSampleTS;
3307
- min = min !== void 0 ? min : 1e3;
3308
- return function push(chunkLength) {
3309
- const now = Date.now();
3310
- const startedAt = timestamps[tail];
3311
- if (!firstSampleTS) {
3312
- firstSampleTS = now;
3106
+ var brotliOptions = {
3107
+ flush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH,
3108
+ finishFlush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH
3109
+ };
3110
+ var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
3111
+ var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
3112
+ var isHttps = /https:?/;
3113
+ var supportedProtocols = node_default.protocols.map((protocol) => {
3114
+ return protocol + ":";
3115
+ });
3116
+ function dispatchBeforeRedirect(options) {
3117
+ if (options.beforeRedirects.proxy) {
3118
+ options.beforeRedirects.proxy(options);
3119
+ }
3120
+ if (options.beforeRedirects.config) {
3121
+ options.beforeRedirects.config(options);
3122
+ }
3123
+ }
3124
+ function setProxy(options, configProxy, location) {
3125
+ let proxy = configProxy;
3126
+ if (!proxy && proxy !== false) {
3127
+ const proxyUrl = (0, import_proxy_from_env.getProxyForUrl)(location);
3128
+ if (proxyUrl) {
3129
+ proxy = new URL(proxyUrl);
3313
3130
  }
3314
- bytes[head] = chunkLength;
3315
- timestamps[head] = now;
3316
- let i = tail;
3317
- let bytesCount = 0;
3318
- while (i !== head) {
3319
- bytesCount += bytes[i++];
3320
- i = i % samplesCount;
3321
- }
3322
- head = (head + 1) % samplesCount;
3323
- if (head === tail) {
3324
- tail = (tail + 1) % samplesCount;
3325
- }
3326
- if (now - firstSampleTS < min) {
3327
- return;
3328
- }
3329
- const passed = startedAt && now - startedAt;
3330
- return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
3331
- };
3332
- }
3333
- var speedometer_default = speedometer;
3334
-
3335
- // node_modules/axios/lib/helpers/throttle.js
3336
- function throttle(fn, freq) {
3337
- let timestamp = 0;
3338
- let threshold = 1e3 / freq;
3339
- let lastArgs;
3340
- let timer;
3341
- const invoke = (args, now = Date.now()) => {
3342
- timestamp = now;
3343
- lastArgs = null;
3344
- if (timer) {
3345
- clearTimeout(timer);
3346
- timer = null;
3347
- }
3348
- fn.apply(null, args);
3349
- };
3350
- const throttled = (...args) => {
3351
- const now = Date.now();
3352
- const passed = now - timestamp;
3353
- if (passed >= threshold) {
3354
- invoke(args, now);
3355
- } else {
3356
- lastArgs = args;
3357
- if (!timer) {
3358
- timer = setTimeout(() => {
3359
- timer = null;
3360
- invoke(lastArgs);
3361
- }, threshold - passed);
3362
- }
3363
- }
3364
- };
3365
- const flush = () => lastArgs && invoke(lastArgs);
3366
- return [throttled, flush];
3367
- }
3368
- var throttle_default = throttle;
3369
-
3370
- // node_modules/axios/lib/helpers/progressEventReducer.js
3371
- var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
3372
- let bytesNotified = 0;
3373
- const _speedometer = speedometer_default(50, 250);
3374
- return throttle_default((e) => {
3375
- const loaded = e.loaded;
3376
- const total = e.lengthComputable ? e.total : void 0;
3377
- const progressBytes = loaded - bytesNotified;
3378
- const rate = _speedometer(progressBytes);
3379
- const inRange = loaded <= total;
3380
- bytesNotified = loaded;
3381
- const data = {
3382
- loaded,
3383
- total,
3384
- progress: total ? loaded / total : void 0,
3385
- bytes: progressBytes,
3386
- rate: rate ? rate : void 0,
3387
- estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
3388
- event: e,
3389
- lengthComputable: total != null,
3390
- [isDownloadStream ? "download" : "upload"]: true
3391
- };
3392
- listener(data);
3393
- }, freq);
3394
- };
3395
- var progressEventDecorator = (total, throttled) => {
3396
- const lengthComputable = total != null;
3397
- return [(loaded) => throttled[0]({
3398
- lengthComputable,
3399
- total,
3400
- loaded
3401
- }), throttled[1]];
3402
- };
3403
- var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
3404
-
3405
- // node_modules/axios/lib/adapters/http.js
3406
- var zlibOptions = {
3407
- flush: import_zlib.default.constants.Z_SYNC_FLUSH,
3408
- finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
3409
- };
3410
- var brotliOptions = {
3411
- flush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH,
3412
- finishFlush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH
3413
- };
3414
- var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
3415
- var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
3416
- var isHttps = /https:?/;
3417
- var supportedProtocols = platform_default.protocols.map((protocol) => {
3418
- return protocol + ":";
3419
- });
3420
- var flushOnFinish = (stream4, [throttled, flush]) => {
3421
- stream4.on("end", flush).on("error", flush);
3422
- return throttled;
3423
- };
3424
- function dispatchBeforeRedirect(options, responseDetails) {
3425
- if (options.beforeRedirects.proxy) {
3426
- options.beforeRedirects.proxy(options);
3427
- }
3428
- if (options.beforeRedirects.config) {
3429
- options.beforeRedirects.config(options, responseDetails);
3430
- }
3431
- }
3432
- function setProxy(options, configProxy, location) {
3433
- let proxy = configProxy;
3434
- if (!proxy && proxy !== false) {
3435
- const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location);
3436
- if (proxyUrl) {
3437
- proxy = new URL(proxyUrl);
3438
- }
3439
- }
3440
- if (proxy) {
3441
- if (proxy.username) {
3442
- proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
3131
+ }
3132
+ if (proxy) {
3133
+ if (proxy.username) {
3134
+ proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
3443
3135
  }
3444
3136
  if (proxy.auth) {
3445
3137
  if (proxy.auth.username || proxy.auth.password) {
@@ -3463,58 +3155,20 @@ function setProxy(options, configProxy, location) {
3463
3155
  };
3464
3156
  }
3465
3157
  var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
3466
- var wrapAsync = (asyncExecutor) => {
3467
- return new Promise((resolve, reject) => {
3468
- let onDone;
3469
- let isDone;
3470
- const done = (value, isRejected) => {
3471
- if (isDone) return;
3472
- isDone = true;
3473
- onDone && onDone(value, isRejected);
3474
- };
3475
- const _resolve = (value) => {
3476
- done(value);
3477
- resolve(value);
3478
- };
3479
- const _reject = (reason) => {
3480
- done(reason, true);
3481
- reject(reason);
3482
- };
3483
- asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
3484
- });
3485
- };
3486
- var resolveFamily = ({ address, family }) => {
3487
- if (!utils_default.isString(address)) {
3488
- throw TypeError("address must be a string");
3489
- }
3490
- return {
3491
- address,
3492
- family: family || (address.indexOf(".") < 0 ? 6 : 4)
3493
- };
3494
- };
3495
- var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
3496
3158
  var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3497
- return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
3498
- let { data, lookup, family } = config;
3499
- const { responseType, responseEncoding } = config;
3159
+ return new Promise(async function dispatchHttpRequest(resolvePromise, rejectPromise) {
3160
+ let data = config.data;
3161
+ const responseType = config.responseType;
3162
+ const responseEncoding = config.responseEncoding;
3500
3163
  const method = config.method.toUpperCase();
3164
+ let isFinished;
3501
3165
  let isDone;
3502
3166
  let rejected = false;
3503
3167
  let req;
3504
- if (lookup) {
3505
- const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
3506
- lookup = (hostname, opt, cb) => {
3507
- _lookup(hostname, opt, (err, arg0, arg1) => {
3508
- if (err) {
3509
- return cb(err);
3510
- }
3511
- const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
3512
- opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
3513
- });
3514
- };
3515
- }
3516
- const emitter = new import_events.EventEmitter();
3517
- const onFinished = () => {
3168
+ const emitter = new import_events.default();
3169
+ function onFinished() {
3170
+ if (isFinished) return;
3171
+ isFinished = true;
3518
3172
  if (config.cancelToken) {
3519
3173
  config.cancelToken.unsubscribe(abort);
3520
3174
  }
@@ -3522,14 +3176,22 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3522
3176
  config.signal.removeEventListener("abort", abort);
3523
3177
  }
3524
3178
  emitter.removeAllListeners();
3525
- };
3526
- onDone((value, isRejected) => {
3179
+ }
3180
+ function done(value, isRejected) {
3181
+ if (isDone) return;
3527
3182
  isDone = true;
3528
3183
  if (isRejected) {
3529
3184
  rejected = true;
3530
3185
  onFinished();
3531
3186
  }
3532
- });
3187
+ isRejected ? rejectPromise(value) : resolvePromise(value);
3188
+ }
3189
+ const resolve = function resolve2(value) {
3190
+ done(value);
3191
+ };
3192
+ const reject = function reject2(value) {
3193
+ done(value, true);
3194
+ };
3533
3195
  function abort(reason) {
3534
3196
  emitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
3535
3197
  }
@@ -3540,8 +3202,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3540
3202
  config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
3541
3203
  }
3542
3204
  }
3543
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
3544
- const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
3205
+ const fullPath = buildFullPath(config.baseURL, config.url);
3206
+ const parsed = new URL(fullPath, "http://localhost");
3545
3207
  const protocol = parsed.protocol || supportedProtocols[0];
3546
3208
  if (protocol === "data:") {
3547
3209
  let convertedData;
@@ -3585,7 +3247,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3585
3247
  }
3586
3248
  const headers = AxiosHeaders_default.from(config.headers).normalize();
3587
3249
  headers.set("User-Agent", "axios/" + VERSION, false);
3588
- const { onUploadProgress, onDownloadProgress } = config;
3250
+ const onDownloadProgress = config.onDownloadProgress;
3251
+ const onUploadProgress = config.onUploadProgress;
3589
3252
  const maxRate = config.maxRate;
3590
3253
  let maxUploadRate = void 0;
3591
3254
  let maxDownloadRate = void 0;
@@ -3602,11 +3265,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3602
3265
  if (!headers.hasContentLength()) {
3603
3266
  try {
3604
3267
  const knownLength = await import_util2.default.promisify(data.getLength).call(data);
3605
- Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
3268
+ headers.setContentLength(knownLength);
3606
3269
  } catch (e) {
3607
3270
  }
3608
3271
  }
3609
- } else if (utils_default.isBlob(data) || utils_default.isFile(data)) {
3272
+ } else if (utils_default.isBlob(data)) {
3610
3273
  data.size && headers.setContentType(data.type || "application/octet-stream");
3611
3274
  headers.setContentLength(data.size || 0);
3612
3275
  data = import_stream4.default.Readable.from(readBlob_default(data));
@@ -3644,15 +3307,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3644
3307
  data = import_stream4.default.Readable.from(data, { objectMode: false });
3645
3308
  }
3646
3309
  data = import_stream4.default.pipeline([data, new AxiosTransformStream_default({
3310
+ length: contentLength,
3647
3311
  maxRate: utils_default.toFiniteNumber(maxUploadRate)
3648
3312
  })], utils_default.noop);
3649
- onUploadProgress && data.on("progress", flushOnFinish(
3650
- data,
3651
- progressEventDecorator(
3652
- contentLength,
3653
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
3654
- )
3655
- ));
3313
+ onUploadProgress && data.on("progress", (progress) => {
3314
+ onUploadProgress(Object.assign(progress, {
3315
+ upload: true
3316
+ }));
3317
+ });
3656
3318
  }
3657
3319
  let auth = void 0;
3658
3320
  if (config.auth) {
@@ -3692,15 +3354,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3692
3354
  agents: { http: config.httpAgent, https: config.httpsAgent },
3693
3355
  auth,
3694
3356
  protocol,
3695
- family,
3696
3357
  beforeRedirect: dispatchBeforeRedirect,
3697
3358
  beforeRedirects: {}
3698
3359
  };
3699
- !utils_default.isUndefined(lookup) && (options.lookup = lookup);
3700
3360
  if (config.socketPath) {
3701
3361
  options.socketPath = config.socketPath;
3702
3362
  } else {
3703
- options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
3363
+ options.hostname = parsed.hostname;
3704
3364
  options.port = parsed.port;
3705
3365
  setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
3706
3366
  }
@@ -3732,17 +3392,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3732
3392
  if (req.destroyed) return;
3733
3393
  const streams = [res];
3734
3394
  const responseLength = +res.headers["content-length"];
3735
- if (onDownloadProgress || maxDownloadRate) {
3395
+ if (onDownloadProgress) {
3736
3396
  const transformStream = new AxiosTransformStream_default({
3397
+ length: utils_default.toFiniteNumber(responseLength),
3737
3398
  maxRate: utils_default.toFiniteNumber(maxDownloadRate)
3738
3399
  });
3739
- onDownloadProgress && transformStream.on("progress", flushOnFinish(
3740
- transformStream,
3741
- progressEventDecorator(
3742
- responseLength,
3743
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
3744
- )
3745
- ));
3400
+ onDownloadProgress && transformStream.on("progress", (progress) => {
3401
+ onDownloadProgress(Object.assign(progress, {
3402
+ download: true
3403
+ }));
3404
+ });
3746
3405
  streams.push(transformStream);
3747
3406
  }
3748
3407
  let responseStream = res;
@@ -3751,7 +3410,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3751
3410
  if (method === "HEAD" || res.statusCode === 204) {
3752
3411
  delete res.headers["content-encoding"];
3753
3412
  }
3754
- switch ((res.headers["content-encoding"] || "").toLowerCase()) {
3413
+ switch (res.headers["content-encoding"]) {
3755
3414
  /*eslint default-case:0*/
3756
3415
  case "gzip":
3757
3416
  case "x-gzip":
@@ -3809,7 +3468,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3809
3468
  return;
3810
3469
  }
3811
3470
  const err = new AxiosError_default(
3812
- "stream has been aborted",
3471
+ "maxContentLength size of " + config.maxContentLength + " exceeded",
3813
3472
  AxiosError_default.ERR_BAD_RESPONSE,
3814
3473
  config,
3815
3474
  lastRequest
@@ -3832,7 +3491,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3832
3491
  }
3833
3492
  response.data = responseData;
3834
3493
  } catch (err) {
3835
- return reject(AxiosError_default.from(err, null, config, response.request, response));
3494
+ reject(AxiosError_default.from(err, null, config, response.request, response));
3836
3495
  }
3837
3496
  settle(resolve, reject, response);
3838
3497
  });
@@ -3856,7 +3515,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3856
3515
  });
3857
3516
  if (config.timeout) {
3858
3517
  const timeout = parseInt(config.timeout, 10);
3859
- if (Number.isNaN(timeout)) {
3518
+ if (isNaN(timeout)) {
3860
3519
  reject(new AxiosError_default(
3861
3520
  "error trying to parse `config.timeout` to int",
3862
3521
  AxiosError_default.ERR_BAD_OPTION_VALUE,
@@ -3903,181 +3562,144 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
3903
3562
  });
3904
3563
  };
3905
3564
 
3906
- // node_modules/axios/lib/helpers/isURLSameOrigin.js
3907
- var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => {
3908
- url2 = new URL(url2, platform_default.origin);
3909
- return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
3910
- })(
3911
- new URL(platform_default.origin),
3912
- platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)
3913
- ) : () => true;
3914
-
3915
- // node_modules/axios/lib/helpers/cookies.js
3916
- var cookies_default = platform_default.hasStandardBrowserEnv ? (
3565
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/cookies.js
3566
+ var cookies_default = node_default.isStandardBrowserEnv ? (
3917
3567
  // Standard browser envs support document.cookie
3918
- {
3919
- write(name, value, expires, path6, domain, secure) {
3920
- const cookie = [name + "=" + encodeURIComponent(value)];
3921
- utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
3922
- utils_default.isString(path6) && cookie.push("path=" + path6);
3923
- utils_default.isString(domain) && cookie.push("domain=" + domain);
3924
- secure === true && cookie.push("secure");
3925
- document.cookie = cookie.join("; ");
3926
- },
3927
- read(name) {
3928
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
3929
- return match ? decodeURIComponent(match[3]) : null;
3930
- },
3931
- remove(name) {
3932
- this.write(name, "", Date.now() - 864e5);
3933
- }
3934
- }
3568
+ /* @__PURE__ */ function standardBrowserEnv() {
3569
+ return {
3570
+ write: function write(name, value, expires, path6, domain, secure) {
3571
+ const cookie = [];
3572
+ cookie.push(name + "=" + encodeURIComponent(value));
3573
+ if (utils_default.isNumber(expires)) {
3574
+ cookie.push("expires=" + new Date(expires).toGMTString());
3575
+ }
3576
+ if (utils_default.isString(path6)) {
3577
+ cookie.push("path=" + path6);
3578
+ }
3579
+ if (utils_default.isString(domain)) {
3580
+ cookie.push("domain=" + domain);
3581
+ }
3582
+ if (secure === true) {
3583
+ cookie.push("secure");
3584
+ }
3585
+ document.cookie = cookie.join("; ");
3586
+ },
3587
+ read: function read(name) {
3588
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
3589
+ return match ? decodeURIComponent(match[3]) : null;
3590
+ },
3591
+ remove: function remove(name) {
3592
+ this.write(name, "", Date.now() - 864e5);
3593
+ }
3594
+ };
3595
+ }()
3935
3596
  ) : (
3936
- // Non-standard browser env (web workers, react-native) lack needed support.
3937
- {
3938
- write() {
3939
- },
3940
- read() {
3941
- return null;
3942
- },
3943
- remove() {
3944
- }
3945
- }
3597
+ // Non standard browser env (web workers, react-native) lack needed support.
3598
+ /* @__PURE__ */ function nonStandardBrowserEnv() {
3599
+ return {
3600
+ write: function write() {
3601
+ },
3602
+ read: function read() {
3603
+ return null;
3604
+ },
3605
+ remove: function remove() {
3606
+ }
3607
+ };
3608
+ }()
3946
3609
  );
3947
3610
 
3948
- // node_modules/axios/lib/core/mergeConfig.js
3949
- var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
3950
- function mergeConfig(config1, config2) {
3951
- config2 = config2 || {};
3952
- const config = {};
3953
- function getMergedValue(target, source, prop, caseless) {
3954
- if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
3955
- return utils_default.merge.call({ caseless }, target, source);
3956
- } else if (utils_default.isPlainObject(source)) {
3957
- return utils_default.merge({}, source);
3958
- } else if (utils_default.isArray(source)) {
3959
- return source.slice();
3960
- }
3961
- return source;
3962
- }
3963
- function mergeDeepProperties(a, b, prop, caseless) {
3964
- if (!utils_default.isUndefined(b)) {
3965
- return getMergedValue(a, b, prop, caseless);
3966
- } else if (!utils_default.isUndefined(a)) {
3967
- return getMergedValue(void 0, a, prop, caseless);
3968
- }
3969
- }
3970
- function valueFromConfig2(a, b) {
3971
- if (!utils_default.isUndefined(b)) {
3972
- return getMergedValue(void 0, b);
3973
- }
3974
- }
3975
- function defaultToConfig2(a, b) {
3976
- if (!utils_default.isUndefined(b)) {
3977
- return getMergedValue(void 0, b);
3978
- } else if (!utils_default.isUndefined(a)) {
3979
- return getMergedValue(void 0, a);
3980
- }
3981
- }
3982
- function mergeDirectKeys(a, b, prop) {
3983
- if (prop in config2) {
3984
- return getMergedValue(a, b);
3985
- } else if (prop in config1) {
3986
- return getMergedValue(void 0, a);
3611
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/isURLSameOrigin.js
3612
+ var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? (
3613
+ // Standard browser envs have full support of the APIs needed to test
3614
+ // whether the request URL is of the same origin as current location.
3615
+ function standardBrowserEnv2() {
3616
+ const msie = /(msie|trident)/i.test(navigator.userAgent);
3617
+ const urlParsingNode = document.createElement("a");
3618
+ let originURL;
3619
+ function resolveURL(url2) {
3620
+ let href = url2;
3621
+ if (msie) {
3622
+ urlParsingNode.setAttribute("href", href);
3623
+ href = urlParsingNode.href;
3624
+ }
3625
+ urlParsingNode.setAttribute("href", href);
3626
+ return {
3627
+ href: urlParsingNode.href,
3628
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
3629
+ host: urlParsingNode.host,
3630
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
3631
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
3632
+ hostname: urlParsingNode.hostname,
3633
+ port: urlParsingNode.port,
3634
+ pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
3635
+ };
3987
3636
  }
3988
- }
3989
- const mergeMap = {
3990
- url: valueFromConfig2,
3991
- method: valueFromConfig2,
3992
- data: valueFromConfig2,
3993
- baseURL: defaultToConfig2,
3994
- transformRequest: defaultToConfig2,
3995
- transformResponse: defaultToConfig2,
3996
- paramsSerializer: defaultToConfig2,
3997
- timeout: defaultToConfig2,
3998
- timeoutMessage: defaultToConfig2,
3999
- withCredentials: defaultToConfig2,
4000
- withXSRFToken: defaultToConfig2,
4001
- adapter: defaultToConfig2,
4002
- responseType: defaultToConfig2,
4003
- xsrfCookieName: defaultToConfig2,
4004
- xsrfHeaderName: defaultToConfig2,
4005
- onUploadProgress: defaultToConfig2,
4006
- onDownloadProgress: defaultToConfig2,
4007
- decompress: defaultToConfig2,
4008
- maxContentLength: defaultToConfig2,
4009
- maxBodyLength: defaultToConfig2,
4010
- beforeRedirect: defaultToConfig2,
4011
- transport: defaultToConfig2,
4012
- httpAgent: defaultToConfig2,
4013
- httpsAgent: defaultToConfig2,
4014
- cancelToken: defaultToConfig2,
4015
- socketPath: defaultToConfig2,
4016
- responseEncoding: defaultToConfig2,
4017
- validateStatus: mergeDirectKeys,
4018
- headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
3637
+ originURL = resolveURL(window.location.href);
3638
+ return function isURLSameOrigin(requestURL) {
3639
+ const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
3640
+ return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
3641
+ };
3642
+ }()
3643
+ ) : (
3644
+ // Non standard browser envs (web workers, react-native) lack needed support.
3645
+ /* @__PURE__ */ function nonStandardBrowserEnv2() {
3646
+ return function isURLSameOrigin() {
3647
+ return true;
3648
+ };
3649
+ }()
3650
+ );
3651
+
3652
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/xhr.js
3653
+ function progressEventReducer(listener, isDownloadStream) {
3654
+ let bytesNotified = 0;
3655
+ const _speedometer = speedometer_default(50, 250);
3656
+ return (e) => {
3657
+ const loaded = e.loaded;
3658
+ const total = e.lengthComputable ? e.total : void 0;
3659
+ const progressBytes = loaded - bytesNotified;
3660
+ const rate = _speedometer(progressBytes);
3661
+ const inRange = loaded <= total;
3662
+ bytesNotified = loaded;
3663
+ const data = {
3664
+ loaded,
3665
+ total,
3666
+ progress: total ? loaded / total : void 0,
3667
+ bytes: progressBytes,
3668
+ rate: rate ? rate : void 0,
3669
+ estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
3670
+ event: e
3671
+ };
3672
+ data[isDownloadStream ? "download" : "upload"] = true;
3673
+ listener(data);
4019
3674
  };
4020
- utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
4021
- const merge2 = mergeMap[prop] || mergeDeepProperties;
4022
- const configValue = merge2(config1[prop], config2[prop], prop);
4023
- utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
4024
- });
4025
- return config;
4026
3675
  }
4027
-
4028
- // node_modules/axios/lib/helpers/resolveConfig.js
4029
- var resolveConfig_default = (config) => {
4030
- const newConfig = mergeConfig({}, config);
4031
- let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
4032
- newConfig.headers = headers = AxiosHeaders_default.from(headers);
4033
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
4034
- if (auth) {
4035
- headers.set(
4036
- "Authorization",
4037
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
4038
- );
4039
- }
4040
- let contentType;
4041
- if (utils_default.isFormData(data)) {
4042
- if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
4043
- headers.setContentType(void 0);
4044
- } else if ((contentType = headers.getContentType()) !== false) {
4045
- const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
4046
- headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
4047
- }
4048
- }
4049
- if (platform_default.hasStandardBrowserEnv) {
4050
- withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
4051
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
4052
- const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
4053
- if (xsrfValue) {
4054
- headers.set(xsrfHeaderName, xsrfValue);
4055
- }
4056
- }
4057
- }
4058
- return newConfig;
4059
- };
4060
-
4061
- // node_modules/axios/lib/adapters/xhr.js
4062
3676
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
4063
3677
  var xhr_default = isXHRAdapterSupported && function(config) {
4064
3678
  return new Promise(function dispatchXhrRequest(resolve, reject) {
4065
- const _config = resolveConfig_default(config);
4066
- let requestData = _config.data;
4067
- const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
4068
- let { responseType, onUploadProgress, onDownloadProgress } = _config;
3679
+ let requestData = config.data;
3680
+ const requestHeaders = AxiosHeaders_default.from(config.headers).normalize();
3681
+ const responseType = config.responseType;
4069
3682
  let onCanceled;
4070
- let uploadThrottled, downloadThrottled;
4071
- let flushUpload, flushDownload;
4072
3683
  function done() {
4073
- flushUpload && flushUpload();
4074
- flushDownload && flushDownload();
4075
- _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
4076
- _config.signal && _config.signal.removeEventListener("abort", onCanceled);
3684
+ if (config.cancelToken) {
3685
+ config.cancelToken.unsubscribe(onCanceled);
3686
+ }
3687
+ if (config.signal) {
3688
+ config.signal.removeEventListener("abort", onCanceled);
3689
+ }
3690
+ }
3691
+ if (utils_default.isFormData(requestData) && (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv)) {
3692
+ requestHeaders.setContentType(false);
4077
3693
  }
4078
3694
  let request = new XMLHttpRequest();
4079
- request.open(_config.method.toUpperCase(), _config.url, true);
4080
- request.timeout = _config.timeout;
3695
+ if (config.auth) {
3696
+ const username = config.auth.username || "";
3697
+ const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
3698
+ requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
3699
+ }
3700
+ const fullPath = buildFullPath(config.baseURL, config.url);
3701
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
3702
+ request.timeout = config.timeout;
4081
3703
  function onloadend() {
4082
3704
  if (!request) {
4083
3705
  return;
@@ -4128,10 +3750,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
4128
3750
  request = null;
4129
3751
  };
4130
3752
  request.ontimeout = function handleTimeout() {
4131
- let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
4132
- const transitional2 = _config.transitional || transitional_default;
4133
- if (_config.timeoutErrorMessage) {
4134
- timeoutErrorMessage = _config.timeoutErrorMessage;
3753
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
3754
+ const transitional2 = config.transitional || transitional_default;
3755
+ if (config.timeoutErrorMessage) {
3756
+ timeoutErrorMessage = config.timeoutErrorMessage;
4135
3757
  }
4136
3758
  reject(new AxiosError_default(
4137
3759
  timeoutErrorMessage,
@@ -4141,28 +3763,31 @@ var xhr_default = isXHRAdapterSupported && function(config) {
4141
3763
  ));
4142
3764
  request = null;
4143
3765
  };
3766
+ if (node_default.isStandardBrowserEnv) {
3767
+ const xsrfValue = (config.withCredentials || isURLSameOrigin_default(fullPath)) && config.xsrfCookieName && cookies_default.read(config.xsrfCookieName);
3768
+ if (xsrfValue) {
3769
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
3770
+ }
3771
+ }
4144
3772
  requestData === void 0 && requestHeaders.setContentType(null);
4145
3773
  if ("setRequestHeader" in request) {
4146
3774
  utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
4147
3775
  request.setRequestHeader(key, val);
4148
3776
  });
4149
3777
  }
4150
- if (!utils_default.isUndefined(_config.withCredentials)) {
4151
- request.withCredentials = !!_config.withCredentials;
3778
+ if (!utils_default.isUndefined(config.withCredentials)) {
3779
+ request.withCredentials = !!config.withCredentials;
4152
3780
  }
4153
3781
  if (responseType && responseType !== "json") {
4154
- request.responseType = _config.responseType;
3782
+ request.responseType = config.responseType;
4155
3783
  }
4156
- if (onDownloadProgress) {
4157
- [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
4158
- request.addEventListener("progress", downloadThrottled);
3784
+ if (typeof config.onDownloadProgress === "function") {
3785
+ request.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
4159
3786
  }
4160
- if (onUploadProgress && request.upload) {
4161
- [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
4162
- request.upload.addEventListener("progress", uploadThrottled);
4163
- request.upload.addEventListener("loadend", flushUpload);
3787
+ if (typeof config.onUploadProgress === "function" && request.upload) {
3788
+ request.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
4164
3789
  }
4165
- if (_config.cancelToken || _config.signal) {
3790
+ if (config.cancelToken || config.signal) {
4166
3791
  onCanceled = (cancel) => {
4167
3792
  if (!request) {
4168
3793
  return;
@@ -4171,13 +3796,13 @@ var xhr_default = isXHRAdapterSupported && function(config) {
4171
3796
  request.abort();
4172
3797
  request = null;
4173
3798
  };
4174
- _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
4175
- if (_config.signal) {
4176
- _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
3799
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
3800
+ if (config.signal) {
3801
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
4177
3802
  }
4178
3803
  }
4179
- const protocol = parseProtocol(_config.url);
4180
- if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
3804
+ const protocol = parseProtocol(fullPath);
3805
+ if (protocol && node_default.protocols.indexOf(protocol) === -1) {
4181
3806
  reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
4182
3807
  return;
4183
3808
  }
@@ -4185,288 +3810,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
4185
3810
  });
4186
3811
  };
4187
3812
 
4188
- // node_modules/axios/lib/helpers/composeSignals.js
4189
- var composeSignals = (signals, timeout) => {
4190
- const { length } = signals = signals ? signals.filter(Boolean) : [];
4191
- if (timeout || length) {
4192
- let controller = new AbortController();
4193
- let aborted;
4194
- const onabort = function(reason) {
4195
- if (!aborted) {
4196
- aborted = true;
4197
- unsubscribe();
4198
- const err = reason instanceof Error ? reason : this.reason;
4199
- controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
4200
- }
4201
- };
4202
- let timer = timeout && setTimeout(() => {
4203
- timer = null;
4204
- onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
4205
- }, timeout);
4206
- const unsubscribe = () => {
4207
- if (signals) {
4208
- timer && clearTimeout(timer);
4209
- timer = null;
4210
- signals.forEach((signal2) => {
4211
- signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
4212
- });
4213
- signals = null;
4214
- }
4215
- };
4216
- signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
4217
- const { signal } = controller;
4218
- signal.unsubscribe = () => utils_default.asap(unsubscribe);
4219
- return signal;
4220
- }
4221
- };
4222
- var composeSignals_default = composeSignals;
4223
-
4224
- // node_modules/axios/lib/helpers/trackStream.js
4225
- var streamChunk = function* (chunk, chunkSize) {
4226
- let len = chunk.byteLength;
4227
- if (!chunkSize || len < chunkSize) {
4228
- yield chunk;
4229
- return;
4230
- }
4231
- let pos = 0;
4232
- let end;
4233
- while (pos < len) {
4234
- end = pos + chunkSize;
4235
- yield chunk.slice(pos, end);
4236
- pos = end;
4237
- }
4238
- };
4239
- var readBytes = async function* (iterable, chunkSize) {
4240
- for await (const chunk of readStream(iterable)) {
4241
- yield* streamChunk(chunk, chunkSize);
4242
- }
4243
- };
4244
- var readStream = async function* (stream4) {
4245
- if (stream4[Symbol.asyncIterator]) {
4246
- yield* stream4;
4247
- return;
4248
- }
4249
- const reader = stream4.getReader();
4250
- try {
4251
- for (; ; ) {
4252
- const { done, value } = await reader.read();
4253
- if (done) {
4254
- break;
4255
- }
4256
- yield value;
4257
- }
4258
- } finally {
4259
- await reader.cancel();
4260
- }
4261
- };
4262
- var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
4263
- const iterator2 = readBytes(stream4, chunkSize);
4264
- let bytes = 0;
4265
- let done;
4266
- let _onFinish = (e) => {
4267
- if (!done) {
4268
- done = true;
4269
- onFinish && onFinish(e);
4270
- }
4271
- };
4272
- return new ReadableStream({
4273
- async pull(controller) {
4274
- try {
4275
- const { done: done2, value } = await iterator2.next();
4276
- if (done2) {
4277
- _onFinish();
4278
- controller.close();
4279
- return;
4280
- }
4281
- let len = value.byteLength;
4282
- if (onProgress) {
4283
- let loadedBytes = bytes += len;
4284
- onProgress(loadedBytes);
4285
- }
4286
- controller.enqueue(new Uint8Array(value));
4287
- } catch (err) {
4288
- _onFinish(err);
4289
- throw err;
4290
- }
4291
- },
4292
- cancel(reason) {
4293
- _onFinish(reason);
4294
- return iterator2.return();
4295
- }
4296
- }, {
4297
- highWaterMark: 2
4298
- });
4299
- };
4300
-
4301
- // node_modules/axios/lib/adapters/fetch.js
4302
- var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
4303
- var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
4304
- var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
4305
- var test = (fn, ...args) => {
4306
- try {
4307
- return !!fn(...args);
4308
- } catch (e) {
4309
- return false;
4310
- }
4311
- };
4312
- var supportsRequestStream = isReadableStreamSupported && test(() => {
4313
- let duplexAccessed = false;
4314
- const hasContentType = new Request(platform_default.origin, {
4315
- body: new ReadableStream(),
4316
- method: "POST",
4317
- get duplex() {
4318
- duplexAccessed = true;
4319
- return "half";
4320
- }
4321
- }).headers.has("Content-Type");
4322
- return duplexAccessed && !hasContentType;
4323
- });
4324
- var DEFAULT_CHUNK_SIZE = 64 * 1024;
4325
- var supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
4326
- var resolvers = {
4327
- stream: supportsResponseStream && ((res) => res.body)
4328
- };
4329
- isFetchSupported && ((res) => {
4330
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
4331
- !resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
4332
- throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
4333
- });
4334
- });
4335
- })(new Response());
4336
- var getBodyLength = async (body) => {
4337
- if (body == null) {
4338
- return 0;
4339
- }
4340
- if (utils_default.isBlob(body)) {
4341
- return body.size;
4342
- }
4343
- if (utils_default.isSpecCompliantForm(body)) {
4344
- const _request = new Request(platform_default.origin, {
4345
- method: "POST",
4346
- body
4347
- });
4348
- return (await _request.arrayBuffer()).byteLength;
4349
- }
4350
- if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
4351
- return body.byteLength;
4352
- }
4353
- if (utils_default.isURLSearchParams(body)) {
4354
- body = body + "";
4355
- }
4356
- if (utils_default.isString(body)) {
4357
- return (await encodeText(body)).byteLength;
4358
- }
4359
- };
4360
- var resolveBodyLength = async (headers, body) => {
4361
- const length = utils_default.toFiniteNumber(headers.getContentLength());
4362
- return length == null ? getBodyLength(body) : length;
4363
- };
4364
- var fetch_default = isFetchSupported && (async (config) => {
4365
- let {
4366
- url: url2,
4367
- method,
4368
- data,
4369
- signal,
4370
- cancelToken,
4371
- timeout,
4372
- onDownloadProgress,
4373
- onUploadProgress,
4374
- responseType,
4375
- headers,
4376
- withCredentials = "same-origin",
4377
- fetchOptions
4378
- } = resolveConfig_default(config);
4379
- responseType = responseType ? (responseType + "").toLowerCase() : "text";
4380
- let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
4381
- let request;
4382
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
4383
- composedSignal.unsubscribe();
4384
- });
4385
- let requestContentLength;
4386
- try {
4387
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
4388
- let _request = new Request(url2, {
4389
- method: "POST",
4390
- body: data,
4391
- duplex: "half"
4392
- });
4393
- let contentTypeHeader;
4394
- if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
4395
- headers.setContentType(contentTypeHeader);
4396
- }
4397
- if (_request.body) {
4398
- const [onProgress, flush] = progressEventDecorator(
4399
- requestContentLength,
4400
- progressEventReducer(asyncDecorator(onUploadProgress))
4401
- );
4402
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
4403
- }
4404
- }
4405
- if (!utils_default.isString(withCredentials)) {
4406
- withCredentials = withCredentials ? "include" : "omit";
4407
- }
4408
- const isCredentialsSupported = "credentials" in Request.prototype;
4409
- request = new Request(url2, {
4410
- ...fetchOptions,
4411
- signal: composedSignal,
4412
- method: method.toUpperCase(),
4413
- headers: headers.normalize().toJSON(),
4414
- body: data,
4415
- duplex: "half",
4416
- credentials: isCredentialsSupported ? withCredentials : void 0
4417
- });
4418
- let response = await fetch(request);
4419
- const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
4420
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
4421
- const options = {};
4422
- ["status", "statusText", "headers"].forEach((prop) => {
4423
- options[prop] = response[prop];
4424
- });
4425
- const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
4426
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
4427
- responseContentLength,
4428
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
4429
- ) || [];
4430
- response = new Response(
4431
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
4432
- flush && flush();
4433
- unsubscribe && unsubscribe();
4434
- }),
4435
- options
4436
- );
4437
- }
4438
- responseType = responseType || "text";
4439
- let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
4440
- !isStreamResponse && unsubscribe && unsubscribe();
4441
- return await new Promise((resolve, reject) => {
4442
- settle(resolve, reject, {
4443
- data: responseData,
4444
- headers: AxiosHeaders_default.from(response.headers),
4445
- status: response.status,
4446
- statusText: response.statusText,
4447
- config,
4448
- request
4449
- });
4450
- });
4451
- } catch (err) {
4452
- unsubscribe && unsubscribe();
4453
- if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
4454
- throw Object.assign(
4455
- new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request),
4456
- {
4457
- cause: err.cause || err
4458
- }
4459
- );
4460
- }
4461
- throw AxiosError_default.from(err, err && err.code, config, request);
4462
- }
4463
- });
4464
-
4465
- // node_modules/axios/lib/adapters/adapters.js
3813
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/adapters.js
4466
3814
  var knownAdapters = {
4467
3815
  http: http_default,
4468
- xhr: xhr_default,
4469
- fetch: fetch_default
3816
+ xhr: xhr_default
4470
3817
  };
4471
3818
  utils_default.forEach(knownAdapters, (fn, value) => {
4472
3819
  if (fn) {
@@ -4477,46 +3824,38 @@ utils_default.forEach(knownAdapters, (fn, value) => {
4477
3824
  Object.defineProperty(fn, "adapterName", { value });
4478
3825
  }
4479
3826
  });
4480
- var renderReason = (reason) => `- ${reason}`;
4481
- var isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;
4482
3827
  var adapters_default = {
4483
3828
  getAdapter: (adapters) => {
4484
3829
  adapters = utils_default.isArray(adapters) ? adapters : [adapters];
4485
3830
  const { length } = adapters;
4486
3831
  let nameOrAdapter;
4487
3832
  let adapter;
4488
- const rejectedReasons = {};
4489
3833
  for (let i = 0; i < length; i++) {
4490
3834
  nameOrAdapter = adapters[i];
4491
- let id;
4492
- adapter = nameOrAdapter;
4493
- if (!isResolvedHandle(nameOrAdapter)) {
4494
- adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
4495
- if (adapter === void 0) {
4496
- throw new AxiosError_default(`Unknown adapter '${id}'`);
4497
- }
4498
- }
4499
- if (adapter) {
3835
+ if (adapter = utils_default.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter) {
4500
3836
  break;
4501
3837
  }
4502
- rejectedReasons[id || "#" + i] = adapter;
4503
3838
  }
4504
3839
  if (!adapter) {
4505
- const reasons = Object.entries(rejectedReasons).map(
4506
- ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
4507
- );
4508
- let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
4509
- throw new AxiosError_default(
4510
- `There is no suitable adapter to dispatch the request ` + s,
4511
- "ERR_NOT_SUPPORT"
3840
+ if (adapter === false) {
3841
+ throw new AxiosError_default(
3842
+ `Adapter ${nameOrAdapter} is not supported by the environment`,
3843
+ "ERR_NOT_SUPPORT"
3844
+ );
3845
+ }
3846
+ throw new Error(
3847
+ utils_default.hasOwnProp(knownAdapters, nameOrAdapter) ? `Adapter '${nameOrAdapter}' is not available in the build` : `Unknown adapter '${nameOrAdapter}'`
4512
3848
  );
4513
3849
  }
3850
+ if (!utils_default.isFunction(adapter)) {
3851
+ throw new TypeError("adapter is not a function");
3852
+ }
4514
3853
  return adapter;
4515
3854
  },
4516
3855
  adapters: knownAdapters
4517
3856
  };
4518
3857
 
4519
- // node_modules/axios/lib/core/dispatchRequest.js
3858
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/dispatchRequest.js
4520
3859
  function throwIfCancellationRequested(config) {
4521
3860
  if (config.cancelToken) {
4522
3861
  config.cancelToken.throwIfRequested();
@@ -4561,7 +3900,86 @@ function dispatchRequest(config) {
4561
3900
  });
4562
3901
  }
4563
3902
 
4564
- // node_modules/axios/lib/helpers/validator.js
3903
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/mergeConfig.js
3904
+ var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? thing.toJSON() : thing;
3905
+ function mergeConfig(config1, config2) {
3906
+ config2 = config2 || {};
3907
+ const config = {};
3908
+ function getMergedValue(target, source, caseless) {
3909
+ if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
3910
+ return utils_default.merge.call({ caseless }, target, source);
3911
+ } else if (utils_default.isPlainObject(source)) {
3912
+ return utils_default.merge({}, source);
3913
+ } else if (utils_default.isArray(source)) {
3914
+ return source.slice();
3915
+ }
3916
+ return source;
3917
+ }
3918
+ function mergeDeepProperties(a, b, caseless) {
3919
+ if (!utils_default.isUndefined(b)) {
3920
+ return getMergedValue(a, b, caseless);
3921
+ } else if (!utils_default.isUndefined(a)) {
3922
+ return getMergedValue(void 0, a, caseless);
3923
+ }
3924
+ }
3925
+ function valueFromConfig2(a, b) {
3926
+ if (!utils_default.isUndefined(b)) {
3927
+ return getMergedValue(void 0, b);
3928
+ }
3929
+ }
3930
+ function defaultToConfig2(a, b) {
3931
+ if (!utils_default.isUndefined(b)) {
3932
+ return getMergedValue(void 0, b);
3933
+ } else if (!utils_default.isUndefined(a)) {
3934
+ return getMergedValue(void 0, a);
3935
+ }
3936
+ }
3937
+ function mergeDirectKeys(a, b, prop) {
3938
+ if (prop in config2) {
3939
+ return getMergedValue(a, b);
3940
+ } else if (prop in config1) {
3941
+ return getMergedValue(void 0, a);
3942
+ }
3943
+ }
3944
+ const mergeMap = {
3945
+ url: valueFromConfig2,
3946
+ method: valueFromConfig2,
3947
+ data: valueFromConfig2,
3948
+ baseURL: defaultToConfig2,
3949
+ transformRequest: defaultToConfig2,
3950
+ transformResponse: defaultToConfig2,
3951
+ paramsSerializer: defaultToConfig2,
3952
+ timeout: defaultToConfig2,
3953
+ timeoutMessage: defaultToConfig2,
3954
+ withCredentials: defaultToConfig2,
3955
+ adapter: defaultToConfig2,
3956
+ responseType: defaultToConfig2,
3957
+ xsrfCookieName: defaultToConfig2,
3958
+ xsrfHeaderName: defaultToConfig2,
3959
+ onUploadProgress: defaultToConfig2,
3960
+ onDownloadProgress: defaultToConfig2,
3961
+ decompress: defaultToConfig2,
3962
+ maxContentLength: defaultToConfig2,
3963
+ maxBodyLength: defaultToConfig2,
3964
+ beforeRedirect: defaultToConfig2,
3965
+ transport: defaultToConfig2,
3966
+ httpAgent: defaultToConfig2,
3967
+ httpsAgent: defaultToConfig2,
3968
+ cancelToken: defaultToConfig2,
3969
+ socketPath: defaultToConfig2,
3970
+ responseEncoding: defaultToConfig2,
3971
+ validateStatus: mergeDirectKeys,
3972
+ headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
3973
+ };
3974
+ utils_default.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
3975
+ const merge2 = mergeMap[prop] || mergeDeepProperties;
3976
+ const configValue = merge2(config1[prop], config2[prop], prop);
3977
+ utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
3978
+ });
3979
+ return config;
3980
+ }
3981
+
3982
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/validator.js
4565
3983
  var validators = {};
4566
3984
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
4567
3985
  validators[type] = function validator(thing) {
@@ -4592,12 +4010,6 @@ validators.transitional = function transitional(validator, version2, message) {
4592
4010
  return validator ? validator(value, opt, opts) : true;
4593
4011
  };
4594
4012
  };
4595
- validators.spelling = function spelling(correctSpelling) {
4596
- return (value, opt) => {
4597
- console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
4598
- return true;
4599
- };
4600
- };
4601
4013
  function assertOptions(options, schema, allowUnknown) {
4602
4014
  if (typeof options !== "object") {
4603
4015
  throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
@@ -4625,11 +4037,11 @@ var validator_default = {
4625
4037
  validators
4626
4038
  };
4627
4039
 
4628
- // node_modules/axios/lib/core/Axios.js
4040
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/Axios.js
4629
4041
  var validators2 = validator_default.validators;
4630
4042
  var Axios = class {
4631
4043
  constructor(instanceConfig) {
4632
- this.defaults = instanceConfig || {};
4044
+ this.defaults = instanceConfig;
4633
4045
  this.interceptors = {
4634
4046
  request: new InterceptorManager_default(),
4635
4047
  response: new InterceptorManager_default()
@@ -4643,27 +4055,7 @@ var Axios = class {
4643
4055
  *
4644
4056
  * @returns {Promise} The Promise to be fulfilled
4645
4057
  */
4646
- async request(configOrUrl, config) {
4647
- try {
4648
- return await this._request(configOrUrl, config);
4649
- } catch (err) {
4650
- if (err instanceof Error) {
4651
- let dummy = {};
4652
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
4653
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
4654
- try {
4655
- if (!err.stack) {
4656
- err.stack = stack;
4657
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
4658
- err.stack += "\n" + stack;
4659
- }
4660
- } catch (e) {
4661
- }
4662
- }
4663
- throw err;
4664
- }
4665
- }
4666
- _request(configOrUrl, config) {
4058
+ request(configOrUrl, config) {
4667
4059
  if (typeof configOrUrl === "string") {
4668
4060
  config = config || {};
4669
4061
  config.url = configOrUrl;
@@ -4679,34 +4071,19 @@ var Axios = class {
4679
4071
  clarifyTimeoutError: validators2.transitional(validators2.boolean)
4680
4072
  }, false);
4681
4073
  }
4682
- if (paramsSerializer != null) {
4683
- if (utils_default.isFunction(paramsSerializer)) {
4684
- config.paramsSerializer = {
4685
- serialize: paramsSerializer
4686
- };
4687
- } else {
4688
- validator_default.assertOptions(paramsSerializer, {
4689
- encode: validators2.function,
4690
- serialize: validators2.function
4691
- }, true);
4692
- }
4074
+ if (paramsSerializer !== void 0) {
4075
+ validator_default.assertOptions(paramsSerializer, {
4076
+ encode: validators2.function,
4077
+ serialize: validators2.function
4078
+ }, true);
4693
4079
  }
4694
- if (config.allowAbsoluteUrls !== void 0) {
4695
- } else if (this.defaults.allowAbsoluteUrls !== void 0) {
4696
- config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
4697
- } else {
4698
- config.allowAbsoluteUrls = true;
4699
- }
4700
- validator_default.assertOptions(config, {
4701
- baseUrl: validators2.spelling("baseURL"),
4702
- withXsrfToken: validators2.spelling("withXSRFToken")
4703
- }, true);
4704
4080
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
4705
- let contextHeaders = headers && utils_default.merge(
4081
+ let contextHeaders;
4082
+ contextHeaders = headers && utils_default.merge(
4706
4083
  headers.common,
4707
4084
  headers[config.method]
4708
4085
  );
4709
- headers && utils_default.forEach(
4086
+ contextHeaders && utils_default.forEach(
4710
4087
  ["delete", "get", "head", "post", "put", "patch", "common"],
4711
4088
  (method) => {
4712
4089
  delete headers[method];
@@ -4767,11 +4144,11 @@ var Axios = class {
4767
4144
  }
4768
4145
  getUri(config) {
4769
4146
  config = mergeConfig(this.defaults, config);
4770
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
4147
+ const fullPath = buildFullPath(config.baseURL, config.url);
4771
4148
  return buildURL(fullPath, config.params, config.paramsSerializer);
4772
4149
  }
4773
4150
  };
4774
- utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
4151
+ utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData2(method) {
4775
4152
  Axios.prototype[method] = function(url2, config) {
4776
4153
  return this.request(mergeConfig(config || {}, {
4777
4154
  method,
@@ -4780,7 +4157,7 @@ utils_default.forEach(["delete", "get", "head", "options"], function forEachMeth
4780
4157
  }));
4781
4158
  };
4782
4159
  });
4783
- utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
4160
+ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData2(method) {
4784
4161
  function generateHTTPMethod(isForm) {
4785
4162
  return function httpMethod(url2, data, config) {
4786
4163
  return this.request(mergeConfig(config || {}, {
@@ -4798,7 +4175,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m
4798
4175
  });
4799
4176
  var Axios_default = Axios;
4800
4177
 
4801
- // node_modules/axios/lib/cancel/CancelToken.js
4178
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/cancel/CancelToken.js
4802
4179
  var CancelToken = class _CancelToken {
4803
4180
  constructor(executor) {
4804
4181
  if (typeof executor !== "function") {
@@ -4870,15 +4247,6 @@ var CancelToken = class _CancelToken {
4870
4247
  this._listeners.splice(index, 1);
4871
4248
  }
4872
4249
  }
4873
- toAbortSignal() {
4874
- const controller = new AbortController();
4875
- const abort = (err) => {
4876
- controller.abort(err);
4877
- };
4878
- this.subscribe(abort);
4879
- controller.signal.unsubscribe = () => this.unsubscribe(abort);
4880
- return controller.signal;
4881
- }
4882
4250
  /**
4883
4251
  * Returns an object that contains a new `CancelToken` and a function that, when called,
4884
4252
  * cancels the `CancelToken`.
@@ -4896,19 +4264,19 @@ var CancelToken = class _CancelToken {
4896
4264
  };
4897
4265
  var CancelToken_default = CancelToken;
4898
4266
 
4899
- // node_modules/axios/lib/helpers/spread.js
4267
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/spread.js
4900
4268
  function spread(callback) {
4901
4269
  return function wrap(arr) {
4902
4270
  return callback.apply(null, arr);
4903
4271
  };
4904
4272
  }
4905
4273
 
4906
- // node_modules/axios/lib/helpers/isAxiosError.js
4274
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/isAxiosError.js
4907
4275
  function isAxiosError(payload) {
4908
4276
  return utils_default.isObject(payload) && payload.isAxiosError === true;
4909
4277
  }
4910
4278
 
4911
- // node_modules/axios/lib/helpers/HttpStatusCode.js
4279
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/HttpStatusCode.js
4912
4280
  var HttpStatusCode = {
4913
4281
  Continue: 100,
4914
4282
  SwitchingProtocols: 101,
@@ -4979,7 +4347,7 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
4979
4347
  });
4980
4348
  var HttpStatusCode_default = HttpStatusCode;
4981
4349
 
4982
- // node_modules/axios/lib/axios.js
4350
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/axios.js
4983
4351
  function createInstance(defaultConfig) {
4984
4352
  const context = new Axios_default(defaultConfig);
4985
4353
  const instance = bind(Axios_default.prototype.request, context);
@@ -5007,12 +4375,11 @@ axios.isAxiosError = isAxiosError;
5007
4375
  axios.mergeConfig = mergeConfig;
5008
4376
  axios.AxiosHeaders = AxiosHeaders_default;
5009
4377
  axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);
5010
- axios.getAdapter = adapters_default.getAdapter;
5011
4378
  axios.HttpStatusCode = HttpStatusCode_default;
5012
4379
  axios.default = axios;
5013
4380
  var axios_default = axios;
5014
4381
 
5015
- // node_modules/axios/index.js
4382
+ // node_modules/.pnpm/axios@1.3.2/node_modules/axios/index.js
5016
4383
  var {
5017
4384
  Axios: Axios2,
5018
4385
  AxiosError: AxiosError2,
@@ -5028,7 +4395,6 @@ var {
5028
4395
  AxiosHeaders: AxiosHeaders2,
5029
4396
  HttpStatusCode: HttpStatusCode2,
5030
4397
  formToJSON,
5031
- getAdapter,
5032
4398
  mergeConfig: mergeConfig2
5033
4399
  } = axios_default;
5034
4400
 
@@ -5037,12 +4403,12 @@ var import_fs_extra3 = __toESM(require("fs-extra"));
5037
4403
  var import_path4 = __toESM(require("path"));
5038
4404
  var import_form_data2 = __toESM(require("form-data"));
5039
4405
  var import_ora = __toESM(require("ora"));
5040
- var crypto2 = __toESM(require("crypto"));
4406
+ var crypto = __toESM(require("crypto"));
5041
4407
 
5042
4408
  // bin/utils/uploadLimits.ts
5043
4409
  var import_fs = __toESM(require("fs"));
5044
4410
  var import_path = __toESM(require("path"));
5045
- var FILE_SIZE_LIMIT = parseInt("20", 10) * 1024 * 1024;
4411
+ var FILE_SIZE_LIMIT = parseInt("500", 10) * 1024 * 1024;
5046
4412
  var DIRECTORY_SIZE_LIMIT = parseInt("500", 10) * 1024 * 1024;
5047
4413
  function checkFileSizeLimit(filePath) {
5048
4414
  const stats = import_fs.default.statSync(filePath);
@@ -5086,7 +4452,7 @@ var import_fs_extra = __toESM(require("fs-extra"));
5086
4452
  var import_path2 = __toESM(require("path"));
5087
4453
  var import_os = __toESM(require("os"));
5088
4454
  var import_dayjs = __toESM(require("dayjs"));
5089
- var import_chalk = __toESM(require("chalk"));
4455
+ var import_chalk2 = __toESM(require("chalk"));
5090
4456
  var HISTORY_DIR = import_path2.default.join(import_os.default.homedir(), ".pinme");
5091
4457
  var HISTORY_FILE = import_path2.default.join(HISTORY_DIR, "upload-history.json");
5092
4458
  var ensureHistoryDir = () => {
@@ -5117,7 +4483,7 @@ var saveUploadHistory = (uploadData) => {
5117
4483
  import_fs_extra.default.writeJsonSync(HISTORY_FILE, history, { spaces: 2 });
5118
4484
  return true;
5119
4485
  } catch (error) {
5120
- console.error(import_chalk.default.red(`Error saving upload history: ${error.message}`));
4486
+ console.error(import_chalk2.default.red(`Error saving upload history: ${error.message}`));
5121
4487
  return false;
5122
4488
  }
5123
4489
  };
@@ -5127,48 +4493,48 @@ var getUploadHistory = (limit = 10) => {
5127
4493
  const history = import_fs_extra.default.readJsonSync(HISTORY_FILE);
5128
4494
  return history.uploads.slice(0, limit);
5129
4495
  } catch (error) {
5130
- console.error(import_chalk.default.red(`Error reading upload history: ${error.message}`));
4496
+ console.error(import_chalk2.default.red(`Error reading upload history: ${error.message}`));
5131
4497
  return [];
5132
4498
  }
5133
4499
  };
5134
4500
  var displayUploadHistory = (limit = 10) => {
5135
4501
  const history = getUploadHistory(limit);
5136
4502
  if (history.length === 0) {
5137
- console.log(import_chalk.default.yellow("No upload history found."));
4503
+ console.log(import_chalk2.default.yellow("No upload history found."));
5138
4504
  return;
5139
4505
  }
5140
- console.log(import_chalk.default.cyan("Upload History:"));
5141
- console.log(import_chalk.default.cyan("-".repeat(80)));
4506
+ console.log(import_chalk2.default.cyan("Upload History:"));
4507
+ console.log(import_chalk2.default.cyan("-".repeat(80)));
5142
4508
  const recentHistory = history.slice(-limit);
5143
4509
  recentHistory.forEach((item, index) => {
5144
- console.log(import_chalk.default.green(`${index + 1}. ${item.filename}`));
5145
- console.log(import_chalk.default.white(` Path: ${item.path}`));
5146
- console.log(import_chalk.default.white(` IPFS CID: ${item.contentHash}`));
4510
+ console.log(import_chalk2.default.green(`${index + 1}. ${item.filename}`));
4511
+ console.log(import_chalk2.default.white(` Path: ${item.path}`));
4512
+ console.log(import_chalk2.default.white(` IPFS CID: ${item.contentHash}`));
5147
4513
  if (item.shortUrl) {
5148
- console.log(import_chalk.default.white(` ENS URL: https://${item.shortUrl}.pinit.eth.limo`));
4514
+ console.log(import_chalk2.default.white(` ENS URL: https://${item.shortUrl}.pinit.eth.limo`));
5149
4515
  }
5150
- console.log(import_chalk.default.white(` Size: ${formatSize(item.size)}`));
5151
- console.log(import_chalk.default.white(` Files: ${item.fileCount}`));
5152
- console.log(import_chalk.default.white(` Type: ${item.type === "directory" ? "Directory" : "File"}`));
4516
+ console.log(import_chalk2.default.white(` Size: ${formatSize(item.size)}`));
4517
+ console.log(import_chalk2.default.white(` Files: ${item.fileCount}`));
4518
+ console.log(import_chalk2.default.white(` Type: ${item.type === "directory" ? "Directory" : "File"}`));
5153
4519
  if (item.timestamp) {
5154
- console.log(import_chalk.default.white(` Date: ${new Date(item.timestamp).toLocaleString()}`));
4520
+ console.log(import_chalk2.default.white(` Date: ${new Date(item.timestamp).toLocaleString()}`));
5155
4521
  }
5156
- console.log(import_chalk.default.cyan("-".repeat(80)));
4522
+ console.log(import_chalk2.default.cyan("-".repeat(80)));
5157
4523
  });
5158
4524
  const totalSize = history.reduce((sum, record) => sum + record.size, 0);
5159
4525
  const totalFiles = history.reduce((sum, record) => sum + record.fileCount, 0);
5160
- console.log(import_chalk.default.bold(`Total Uploads: ${history.length}`));
5161
- console.log(import_chalk.default.bold(`Total Files: ${totalFiles}`));
5162
- console.log(import_chalk.default.bold(`Total Size: ${formatSize(totalSize)}`));
4526
+ console.log(import_chalk2.default.bold(`Total Uploads: ${history.length}`));
4527
+ console.log(import_chalk2.default.bold(`Total Files: ${totalFiles}`));
4528
+ console.log(import_chalk2.default.bold(`Total Size: ${formatSize(totalSize)}`));
5163
4529
  };
5164
4530
  var clearUploadHistory = () => {
5165
4531
  try {
5166
4532
  ensureHistoryDir();
5167
4533
  import_fs_extra.default.writeJsonSync(HISTORY_FILE, { uploads: [] });
5168
- console.log(import_chalk.default.green("Upload history cleared successfully."));
4534
+ console.log(import_chalk2.default.green("Upload history cleared successfully."));
5169
4535
  return true;
5170
4536
  } catch (error) {
5171
- console.error(import_chalk.default.red(`Error clearing upload history: ${error.message}`));
4537
+ console.error(import_chalk2.default.red(`Error clearing upload history: ${error.message}`));
5172
4538
  return false;
5173
4539
  }
5174
4540
  };
@@ -5193,15 +4559,15 @@ function getDeviceId() {
5193
4559
  }
5194
4560
 
5195
4561
  // bin/utils/uploadToIpfsSplit.ts
5196
- var IPFS_API_URL = "https://pinme.dev/api/v2";
4562
+ var IPFS_API_URL = "https://pinme.dev/api/v3";
5197
4563
  var MAX_RETRIES = parseInt(process.env.MAX_RETRIES || "2");
5198
4564
  var RETRY_DELAY = parseInt(process.env.RETRY_DELAY_MS || "1000");
5199
4565
  var TIMEOUT = parseInt(process.env.TIMEOUT_MS || "600000");
5200
- var MAX_POLL_TIME = parseInt(process.env.MAX_POLL_TIME_MINUTES || "5") * 60 * 1e3;
4566
+ var MAX_POLL_TIME = parseInt("5") * 60 * 1e3;
5201
4567
  var POLL_INTERVAL = parseInt(process.env.POLL_INTERVAL_SECONDS || "2") * 1e3;
5202
4568
  var PROGRESS_UPDATE_INTERVAL = 200;
5203
4569
  var EXPECTED_UPLOAD_TIME = 6e4;
5204
- var MAX_PROGRESS = 0.95;
4570
+ var MAX_PROGRESS = 0.9;
5205
4571
  var StepProgressBar = class {
5206
4572
  spinner;
5207
4573
  fileName;
@@ -5209,6 +4575,8 @@ var StepProgressBar = class {
5209
4575
  currentStep = 0;
5210
4576
  stepStartTime = 0;
5211
4577
  progressInterval = null;
4578
+ isSimulatingProgress = false;
4579
+ simulationStartTime = 0;
5212
4580
  constructor(fileName, isDirectory = false) {
5213
4581
  this.fileName = fileName;
5214
4582
  this.spinner = (0, import_ora.default)(`Preparing to upload ${fileName}...`).start();
@@ -5224,6 +4592,15 @@ var StepProgressBar = class {
5224
4592
  }
5225
4593
  completeStep() {
5226
4594
  }
4595
+ // 开始模拟进度,用于在90%后继续显示进度
4596
+ startSimulatingProgress() {
4597
+ this.isSimulatingProgress = true;
4598
+ this.simulationStartTime = Date.now();
4599
+ }
4600
+ // 停止模拟进度
4601
+ stopSimulatingProgress() {
4602
+ this.isSimulatingProgress = false;
4603
+ }
5227
4604
  failStep(error) {
5228
4605
  this.stopProgress();
5229
4606
  this.spinner.fail(`Upload failed: ${error}`);
@@ -5242,7 +4619,14 @@ var StepProgressBar = class {
5242
4619
  startProgress() {
5243
4620
  this.progressInterval = setInterval(() => {
5244
4621
  const elapsed = Date.now() - this.startTime;
5245
- const progress = this.calculateProgress(elapsed);
4622
+ let progress;
4623
+ if (this.isSimulatingProgress) {
4624
+ const simulationElapsed = Date.now() - this.simulationStartTime;
4625
+ const simulationProgress = Math.min(simulationElapsed / 6e4, 1);
4626
+ progress = 0.9 + simulationProgress * 0.09;
4627
+ } else {
4628
+ progress = this.calculateProgress(elapsed);
4629
+ }
5246
4630
  const duration = this.formatDuration(Math.floor(elapsed / 1e3));
5247
4631
  const progressBar = this.createProgressBar(progress);
5248
4632
  this.spinner.text = `Uploading ${this.fileName}... ${progressBar} ${Math.round(progress * 100)}% (${duration})`;
@@ -5280,7 +4664,7 @@ var StepProgressBar = class {
5280
4664
  };
5281
4665
  async function calculateMD5(filePath) {
5282
4666
  return new Promise((resolve, reject) => {
5283
- const hash = crypto2.createHash("md5");
4667
+ const hash = crypto.createHash("md5");
5284
4668
  const stream4 = import_fs_extra3.default.createReadStream(filePath);
5285
4669
  stream4.on("data", hash.update.bind(hash));
5286
4670
  stream4.on("end", () => resolve(hash.digest("hex")));
@@ -5511,29 +4895,41 @@ async function getChunkStatus(sessionId, deviceId) {
5511
4895
  throw error;
5512
4896
  }
5513
4897
  }
5514
- async function monitorChunkProgress(traceId, deviceId) {
4898
+ async function monitorChunkProgress(traceId, deviceId, progressBar) {
5515
4899
  let consecutiveErrors = 0;
5516
4900
  const startTime = Date.now();
5517
- while (Date.now() - startTime < MAX_POLL_TIME) {
5518
- try {
5519
- const status = await getChunkStatus(traceId, deviceId);
5520
- consecutiveErrors = 0;
5521
- if (status.is_ready && status.upload_rst.Hash) {
5522
- return {
5523
- hash: status.upload_rst.Hash,
5524
- shortUrl: status.upload_rst.ShortUrl
5525
- };
5526
- }
5527
- } catch (error) {
5528
- consecutiveErrors++;
5529
- if (consecutiveErrors > 10) {
5530
- throw new Error(`Polling failed: ${error.message}`);
4901
+ if (progressBar) {
4902
+ progressBar.startSimulatingProgress();
4903
+ }
4904
+ try {
4905
+ while (Date.now() - startTime < MAX_POLL_TIME) {
4906
+ try {
4907
+ const status = await getChunkStatus(traceId, deviceId);
4908
+ consecutiveErrors = 0;
4909
+ if (status.is_ready && status.upload_rst.Hash) {
4910
+ if (progressBar) {
4911
+ progressBar.stopSimulatingProgress();
4912
+ }
4913
+ return {
4914
+ hash: status.upload_rst.Hash,
4915
+ shortUrl: status.upload_rst.ShortUrl
4916
+ };
4917
+ }
4918
+ } catch (error) {
4919
+ consecutiveErrors++;
4920
+ if (consecutiveErrors > 10) {
4921
+ throw new Error(`Polling failed: ${error.message}`);
4922
+ }
5531
4923
  }
4924
+ await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL));
4925
+ }
4926
+ const maxPollTimeMinutes = Math.floor(MAX_POLL_TIME / (60 * 1e3));
4927
+ throw new Error(`Polling timeout after ${maxPollTimeMinutes} minutes`);
4928
+ } finally {
4929
+ if (progressBar) {
4930
+ progressBar.stopSimulatingProgress();
5532
4931
  }
5533
- await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL));
5534
4932
  }
5535
- const maxPollTimeMinutes = Math.floor(MAX_POLL_TIME / (60 * 1e3));
5536
- throw new Error(`Polling timeout after ${maxPollTimeMinutes} minutes`);
5537
4933
  }
5538
4934
  async function uploadDirectoryInChunks(directoryPath, deviceId) {
5539
4935
  const sizeCheck = checkDirectorySizeLimit(directoryPath);
@@ -5564,7 +4960,7 @@ async function uploadDirectoryInChunks(directoryPath, deviceId) {
5564
4960
  const traceId = await completeChunkUpload(sessionInfo.session_id, deviceId);
5565
4961
  progressBar.completeStep();
5566
4962
  progressBar.startStep(4, "Waiting for processing");
5567
- const result = await monitorChunkProgress(traceId, deviceId);
4963
+ const result = await monitorChunkProgress(traceId, deviceId, progressBar);
5568
4964
  progressBar.completeStep();
5569
4965
  try {
5570
4966
  import_fs_extra3.default.unlinkSync(compressedPath);
@@ -5617,7 +5013,7 @@ async function uploadFileInChunks(filePath, deviceId) {
5617
5013
  const traceId = await completeChunkUpload(sessionInfo.session_id, deviceId);
5618
5014
  progressBar.completeStep();
5619
5015
  progressBar.startStep(3, "Waiting for processing");
5620
- const result = await monitorChunkProgress(traceId, deviceId);
5016
+ const result = await monitorChunkProgress(traceId, deviceId, progressBar);
5621
5017
  progressBar.completeStep();
5622
5018
  const uploadData = {
5623
5019
  path: filePath,
@@ -5666,6 +5062,7 @@ var import_fs2 = __toESM(require("fs"));
5666
5062
  var import_crypto_js = __toESM(require("crypto-js"));
5667
5063
  var URL2 = "https://pinme.eth.limo/#/preview/";
5668
5064
  var secretKey = "pinme-secret-key";
5065
+ checkNodeVersion();
5669
5066
  function encryptHash(hash, key) {
5670
5067
  try {
5671
5068
  if (!key) {
@@ -5687,7 +5084,7 @@ function checkPathSync(inputPath) {
5687
5084
  }
5688
5085
  return null;
5689
5086
  } catch (error) {
5690
- console.error(import_chalk2.default.red(`error checking path: ${error.message}`));
5087
+ console.error(import_chalk3.default.red(`error checking path: ${error.message}`));
5691
5088
  return null;
5692
5089
  }
5693
5090
  }
@@ -5706,25 +5103,25 @@ var upload_default = async (options) => {
5706
5103
  if (argPath && !argPath.startsWith("-")) {
5707
5104
  const absolutePath = checkPathSync(argPath);
5708
5105
  if (!absolutePath) {
5709
- console.log(import_chalk2.default.red(`path ${argPath} does not exist`));
5106
+ console.log(import_chalk3.default.red(`path ${argPath} does not exist`));
5710
5107
  return;
5711
5108
  }
5712
- console.log(import_chalk2.default.blue(`uploading ${absolutePath} to ipfs...`));
5109
+ console.log(import_chalk3.default.blue(`uploading ${absolutePath} to ipfs...`));
5713
5110
  try {
5714
5111
  const result = await uploadToIpfsSplit_default(absolutePath);
5715
5112
  if (result) {
5716
5113
  const encryptedCID = encryptHash(result.contentHash, secretKey);
5717
5114
  console.log(
5718
- import_chalk2.default.cyan(
5115
+ import_chalk3.default.cyan(
5719
5116
  import_figlet.default.textSync("Successful", { horizontalLayout: "full" })
5720
5117
  )
5721
5118
  );
5722
- console.log(import_chalk2.default.cyan(`URL:`));
5723
- console.log(import_chalk2.default.cyan(`${URL2}${encryptedCID}`));
5724
- console.log(import_chalk2.default.green("\n\u{1F389} upload successful, program exit"));
5119
+ console.log(import_chalk3.default.cyan(`URL:`));
5120
+ console.log(import_chalk3.default.cyan(`${URL2}${encryptedCID}`));
5121
+ console.log(import_chalk3.default.green("\n\u{1F389} upload successful, program exit"));
5725
5122
  }
5726
5123
  } catch (error) {
5727
- console.error(import_chalk2.default.red(`Error: ${error.message}`));
5124
+ console.error(import_chalk3.default.red(`Error: ${error.message}`));
5728
5125
  }
5729
5126
  process.exit(0);
5730
5127
  }
@@ -5738,46 +5135,46 @@ var upload_default = async (options) => {
5738
5135
  if (answer.path) {
5739
5136
  const absolutePath = checkPathSync(answer.path);
5740
5137
  if (!absolutePath) {
5741
- console.log(import_chalk2.default.red(`path ${answer.path} does not exist`));
5138
+ console.log(import_chalk3.default.red(`path ${answer.path} does not exist`));
5742
5139
  return;
5743
5140
  }
5744
- console.log(import_chalk2.default.blue(`uploading ${absolutePath} to ipfs...`));
5141
+ console.log(import_chalk3.default.blue(`uploading ${absolutePath} to ipfs...`));
5745
5142
  try {
5746
5143
  const result = await uploadToIpfsSplit_default(absolutePath);
5747
5144
  if (result) {
5748
5145
  const encryptedCID = encryptHash(result.contentHash, secretKey);
5749
5146
  console.log(
5750
- import_chalk2.default.cyan(
5147
+ import_chalk3.default.cyan(
5751
5148
  import_figlet.default.textSync("Successful", { horizontalLayout: "full" })
5752
5149
  )
5753
5150
  );
5754
- console.log(import_chalk2.default.cyan(`URL:`));
5755
- console.log(import_chalk2.default.cyan(`${URL2}${encryptedCID}`));
5756
- console.log(import_chalk2.default.green("\n\u{1F389} upload successful, program exit"));
5151
+ console.log(import_chalk3.default.cyan(`URL:`));
5152
+ console.log(import_chalk3.default.cyan(`${URL2}${encryptedCID}`));
5153
+ console.log(import_chalk3.default.green("\n\u{1F389} upload successful, program exit"));
5757
5154
  }
5758
5155
  } catch (error) {
5759
- console.error(import_chalk2.default.red(`Error: ${error.message}`));
5156
+ console.error(import_chalk3.default.red(`Error: ${error.message}`));
5760
5157
  }
5761
5158
  process.exit(0);
5762
5159
  }
5763
5160
  } catch (error) {
5764
- console.error(import_chalk2.default.red(`error executing: ${error.message}`));
5161
+ console.error(import_chalk3.default.red(`error executing: ${error.message}`));
5765
5162
  console.error(error.stack);
5766
5163
  }
5767
5164
  };
5768
5165
 
5769
5166
  // bin/remove.ts
5770
- var import_chalk4 = __toESM(require("chalk"));
5167
+ var import_chalk5 = __toESM(require("chalk"));
5771
5168
  var import_inquirer2 = __toESM(require("inquirer"));
5772
5169
  var import_figlet2 = __toESM(require("figlet"));
5773
5170
 
5774
5171
  // bin/utils/removeFromIpfs.ts
5775
- var import_chalk3 = __toESM(require("chalk"));
5776
- var ipfsApiUrl = "https://pinme.dev/api/v2";
5172
+ var import_chalk4 = __toESM(require("chalk"));
5173
+ var ipfsApiUrl = "https://pinme.dev/api/v3";
5777
5174
  async function removeFromIpfs(value, type = "hash") {
5778
5175
  try {
5779
5176
  const uid = getDeviceId();
5780
- console.log(import_chalk3.default.blue(`Removing content from IPFS: ${value}...`));
5177
+ console.log(import_chalk4.default.blue(`Removing content from IPFS: ${value}...`));
5781
5178
  const queryParams = new URLSearchParams({
5782
5179
  uid
5783
5180
  });
@@ -5792,37 +5189,38 @@ async function removeFromIpfs(value, type = "hash") {
5792
5189
  });
5793
5190
  const { code, msg, data } = response.data;
5794
5191
  if (code === 200) {
5795
- console.log(import_chalk3.default.green("\u2713 Removal successful!"));
5796
- console.log(import_chalk3.default.cyan(`Content ${type}: ${value} has been removed from IPFS network`));
5192
+ console.log(import_chalk4.default.green("\u2713 Removal successful!"));
5193
+ console.log(import_chalk4.default.cyan(`Content ${type}: ${value} has been removed from IPFS network`));
5797
5194
  return true;
5798
5195
  } else {
5799
- console.log(import_chalk3.default.red("\u2717 Removal failed"));
5800
- console.log(import_chalk3.default.red(`Error: ${msg || "Unknown error occurred"}`));
5196
+ console.log(import_chalk4.default.red("\u2717 Removal failed"));
5197
+ console.log(import_chalk4.default.red(`Error: ${msg || "Unknown error occurred"}`));
5801
5198
  return false;
5802
5199
  }
5803
5200
  } catch (error) {
5804
- console.log(import_chalk3.default.red("\u2717 Removal failed", error));
5201
+ console.log(import_chalk4.default.red("\u2717 Removal failed", error));
5805
5202
  if (error.response) {
5806
5203
  const { status, data } = error.response;
5807
- console.log(import_chalk3.default.red(`HTTP Error ${status}: ${(data == null ? void 0 : data.msg) || "Server error"}`));
5204
+ console.log(import_chalk4.default.red(`HTTP Error ${status}: ${(data == null ? void 0 : data.msg) || "Server error"}`));
5808
5205
  if (status === 404) {
5809
- console.log(import_chalk3.default.yellow("Content not found on the network or already removed"));
5206
+ console.log(import_chalk4.default.yellow("Content not found on the network or already removed"));
5810
5207
  } else if (status === 403) {
5811
- console.log(import_chalk3.default.yellow("Permission denied - you may not have access to remove this content"));
5208
+ console.log(import_chalk4.default.yellow("Permission denied - you may not have access to remove this content"));
5812
5209
  } else if (status === 500) {
5813
- console.log(import_chalk3.default.yellow("Server internal error - please try again later"));
5210
+ console.log(import_chalk4.default.yellow("Server internal error - please try again later"));
5814
5211
  }
5815
5212
  } else if (error.request) {
5816
- console.log(import_chalk3.default.red("Network error: Unable to connect to IPFS service"));
5817
- console.log(import_chalk3.default.yellow("Please check your internet connection and try again"));
5213
+ console.log(import_chalk4.default.red("Network error: Unable to connect to IPFS service"));
5214
+ console.log(import_chalk4.default.yellow("Please check your internet connection and try again"));
5818
5215
  } else {
5819
- console.log(import_chalk3.default.red(`Error: ${error.message}`));
5216
+ console.log(import_chalk4.default.red(`Error: ${error.message}`));
5820
5217
  }
5821
5218
  return false;
5822
5219
  }
5823
5220
  }
5824
5221
 
5825
5222
  // bin/remove.ts
5223
+ checkNodeVersion();
5826
5224
  function isValidIPFSHash(hash) {
5827
5225
  const v0Pattern = /^Qm[1-9A-HJ-NP-Za-km-z]{44}$/;
5828
5226
  const v1Pattern = /^bafy[a-z2-7]{50,}$/;
@@ -5875,30 +5273,30 @@ var remove_default = async (options) => {
5875
5273
  if (argHash && !argHash.startsWith("-")) {
5876
5274
  const parsedInput = parseInput(argHash);
5877
5275
  if (!parsedInput) {
5878
- console.log(import_chalk4.default.red(`Invalid input format: ${argHash}`));
5879
- console.log(import_chalk4.default.yellow("Supported formats:"));
5880
- console.log(import_chalk4.default.yellow(" - IPFS hash: bafybeig..."));
5881
- console.log(import_chalk4.default.yellow(" - Full URL: https://bafybeig....pinme.dev"));
5882
- console.log(import_chalk4.default.yellow(" - Subname: 3abt6ztu"));
5883
- console.log(import_chalk4.default.yellow(" - Subname URL: https://3abt6ztu.pinit.eth.limo"));
5276
+ console.log(import_chalk5.default.red(`Invalid input format: ${argHash}`));
5277
+ console.log(import_chalk5.default.yellow("Supported formats:"));
5278
+ console.log(import_chalk5.default.yellow(" - IPFS hash: bafybeig..."));
5279
+ console.log(import_chalk5.default.yellow(" - Full URL: https://bafybeig....pinme.dev"));
5280
+ console.log(import_chalk5.default.yellow(" - Subname: 3abt6ztu"));
5281
+ console.log(import_chalk5.default.yellow(" - Subname URL: https://3abt6ztu.pinit.eth.limo"));
5884
5282
  return;
5885
5283
  }
5886
5284
  try {
5887
5285
  const success = await removeFromIpfs(parsedInput.value, parsedInput.type);
5888
5286
  if (success) {
5889
5287
  console.log(
5890
- import_chalk4.default.cyan(
5288
+ import_chalk5.default.cyan(
5891
5289
  import_figlet2.default.textSync("Successful", { horizontalLayout: "full" })
5892
5290
  )
5893
5291
  );
5894
5292
  }
5895
5293
  } catch (error) {
5896
- console.error(import_chalk4.default.red(`Error: ${error.message}`));
5294
+ console.error(import_chalk5.default.red(`Error: ${error.message}`));
5897
5295
  }
5898
5296
  return;
5899
5297
  }
5900
- console.log(import_chalk4.default.yellow("\u26A0\uFE0F Warning: This action will permanently remove the content from IPFS network"));
5901
- console.log(import_chalk4.default.yellow("\u26A0\uFE0F Make sure you have the correct IPFS hash"));
5298
+ console.log(import_chalk5.default.yellow("\u26A0\uFE0F Warning: This action will permanently remove the content from IPFS network"));
5299
+ console.log(import_chalk5.default.yellow("\u26A0\uFE0F Make sure you have the correct IPFS hash"));
5902
5300
  console.log("");
5903
5301
  const confirmAnswer = await import_inquirer2.default.prompt([
5904
5302
  {
@@ -5909,7 +5307,7 @@ var remove_default = async (options) => {
5909
5307
  }
5910
5308
  ]);
5911
5309
  if (!confirmAnswer.confirm) {
5912
- console.log(import_chalk4.default.yellow("Operation cancelled"));
5310
+ console.log(import_chalk5.default.yellow("Operation cancelled"));
5913
5311
  return;
5914
5312
  }
5915
5313
  const answer = await import_inquirer2.default.prompt([
@@ -5932,7 +5330,7 @@ var remove_default = async (options) => {
5932
5330
  if (answer.input) {
5933
5331
  const parsedInput = parseInput(answer.input.trim());
5934
5332
  if (!parsedInput) {
5935
- console.log(import_chalk4.default.red("Invalid input format"));
5333
+ console.log(import_chalk5.default.red("Invalid input format"));
5936
5334
  return;
5937
5335
  }
5938
5336
  const finalConfirm = await import_inquirer2.default.prompt([
@@ -5944,50 +5342,38 @@ var remove_default = async (options) => {
5944
5342
  }
5945
5343
  ]);
5946
5344
  if (!finalConfirm.confirm) {
5947
- console.log(import_chalk4.default.yellow("Operation cancelled"));
5345
+ console.log(import_chalk5.default.yellow("Operation cancelled"));
5948
5346
  return;
5949
5347
  }
5950
5348
  try {
5951
5349
  const success = await removeFromIpfs(parsedInput.value, parsedInput.type);
5952
5350
  if (success) {
5953
5351
  console.log(
5954
- import_chalk4.default.cyan(
5352
+ import_chalk5.default.cyan(
5955
5353
  import_figlet2.default.textSync("Successful", { horizontalLayout: "full" })
5956
5354
  )
5957
5355
  );
5958
5356
  }
5959
5357
  } catch (error) {
5960
- console.error(import_chalk4.default.red(`Error: ${error.message}`));
5358
+ console.error(import_chalk5.default.red(`Error: ${error.message}`));
5961
5359
  }
5962
5360
  }
5963
5361
  } catch (error) {
5964
- console.error(import_chalk4.default.red(`Error executing remove command: ${error.message}`));
5362
+ console.error(import_chalk5.default.red(`Error executing remove command: ${error.message}`));
5965
5363
  console.error(error.stack);
5966
5364
  }
5967
5365
  };
5968
5366
 
5969
5367
  // bin/index.ts
5970
- var nodeVersion = process.version.slice(1).split(".").map(Number);
5971
- var [major] = nodeVersion;
5972
- var requiredMajor = 16;
5973
- if (major < requiredMajor) {
5974
- console.error("\n\u274C Error: Pinme requires Node.js >= 16.0.0");
5975
- console.error(`Current version: ${process.version}`);
5976
- console.error("This tool uses AbortController which requires Node.js 16+");
5977
- console.error("\nRecommended upgrade commands:");
5978
- console.error(" nvm install 16.20.2");
5979
- console.error(" nvm use 16.20.2");
5980
- console.error("\nOr visit https://nodejs.org/ to download the latest LTS version\n");
5981
- process.exit(1);
5982
- }
5983
5368
  import_dotenv.default.config();
5369
+ checkNodeVersion();
5984
5370
  function showBanner() {
5985
5371
  console.log(
5986
- import_chalk5.default.cyan(
5372
+ import_chalk6.default.cyan(
5987
5373
  import_figlet3.default.textSync("Pinme", { horizontalLayout: "full" })
5988
5374
  )
5989
5375
  );
5990
- console.log(import_chalk5.default.cyan("A command-line tool for uploading files to IPFS\n"));
5376
+ console.log(import_chalk6.default.cyan("A command-line tool for uploading files to IPFS\n"));
5991
5377
  }
5992
5378
  var program = new import_commander.Command();
5993
5379
  program.name("pinme").version(version).option("-v, --version", "output the current version");