@andre1502/react-utilities 1.0.7 → 1.0.8

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 (34) hide show
  1. package/README.md +39 -0
  2. package/dist/{EnvironmentEnum-CXTWJxNo.js → EnvironmentEnum-F4hjulGN.js} +3 -1
  3. package/dist/EnvironmentEnum-F4hjulGN.js.map +1 -0
  4. package/dist/{Utils-CJ7ureSW.js → Utils-Bb2yUYbQ.js} +1 -1
  5. package/dist/{Utils-CJ7ureSW.js.map → Utils-Bb2yUYbQ.js.map} +1 -1
  6. package/dist/{config-cli-BIF4xuoO.js → config-cli-CY_z5CYp.js} +285 -283
  7. package/dist/config-cli-CY_z5CYp.js.map +1 -0
  8. package/dist/config-cli.js +3 -3
  9. package/dist/enums/EnvironmentEnum.d.ts +2 -0
  10. package/dist/{format-BgweN3o5.js → format-DOgTlvp7.js} +1 -1
  11. package/dist/{format-BgweN3o5.js.map → format-DOgTlvp7.js.map} +1 -1
  12. package/dist/format.js +1 -1
  13. package/dist/{hooks-oAipbPQ2.js → hooks-BBCIHhac.js} +1 -1
  14. package/dist/{hooks-oAipbPQ2.js.map → hooks-BBCIHhac.js.map} +1 -1
  15. package/dist/hooks.js +1 -1
  16. package/dist/{i18n-D1jKJPI0.js → i18n-CJthsaWo.js} +475 -597
  17. package/dist/i18n-CJthsaWo.js.map +1 -0
  18. package/dist/i18n.js +2 -2
  19. package/dist/index-cli.js +3 -3
  20. package/dist/index-rn.js +4 -4
  21. package/dist/index.js +4 -4
  22. package/dist/{sentry-rn-DZwIel7y.js → sentry-rn-DNJphpGY.js} +2 -2
  23. package/dist/{sentry-rn-DZwIel7y.js.map → sentry-rn-DNJphpGY.js.map} +1 -1
  24. package/dist/sentry-rn.js +1 -1
  25. package/dist/sentry.js +1 -1
  26. package/package.json +2 -2
  27. package/src/Config/Config.ts +1 -1
  28. package/src/enums/EnvironmentEnum.ts +2 -0
  29. package/dist/EnvironmentEnum-CXTWJxNo.js.map +0 -1
  30. package/dist/browser-ponyfill-C-HVh7ck.js +0 -321
  31. package/dist/browser-ponyfill-C-HVh7ck.js.map +0 -1
  32. package/dist/chunk-vKJrgz-R.js +0 -16
  33. package/dist/config-cli-BIF4xuoO.js.map +0 -1
  34. package/dist/i18n-D1jKJPI0.js.map +0 -1
@@ -1,51 +1,53 @@
1
- import { n as e, t } from "./chunk-vKJrgz-R.js";
2
- import { t as n } from "./EnvironmentEnum-CXTWJxNo.js";
3
- import { isHiddenKey as r } from "./utils.js";
4
- import { copyFile as i, existsSync as a, mkdirSync as o, writeFile as s } from "fs";
5
- import { isNull as c } from "lodash-es";
6
- import { GoogleAuth as l } from "google-auth-library";
7
- import { google as u } from "googleapis";
8
- import * as d from "path";
9
- import * as f from "process";
10
- import { Transform as p, Writable as m } from "node:stream";
11
- import { statSync as h } from "node:fs";
1
+ import { t as e } from "./EnvironmentEnum-F4hjulGN.js";
2
+ import { isHiddenKey as t } from "./utils.js";
3
+ import { copyFile as n, existsSync as r, mkdirSync as i, writeFile as a } from "fs";
4
+ import { isNull as o } from "lodash-es";
5
+ import { GoogleAuth as s } from "google-auth-library";
6
+ import { google as c } from "googleapis";
7
+ import * as l from "path";
8
+ import * as u from "process";
9
+ import { Transform as d, Writable as f } from "node:stream";
10
+ import { statSync as p } from "node:fs";
12
11
  import "node:readline";
13
- import { URL as g } from "node:url";
12
+ import { URL as m } from "node:url";
14
13
  import "node:path";
15
14
  import "node:child_process";
16
- import { Readable as _ } from "stream";
15
+ import { Readable as ee } from "stream";
17
16
  import "node:zlib";
18
17
  import "node:stream/promises";
19
- //#region src/Config/Output.ts
20
- var v = (e, t) => {
18
+ //#region \0rolldown/runtime.js
19
+ var h = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), te = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
20
+ if (typeof require < "u") return require.apply(this, arguments);
21
+ throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
22
+ }), g = (e, t) => {
21
23
  let n = t.filename;
22
24
  t.isFilenameLowercase && (n = n.toLowerCase());
23
- let r = `${t.folder}/${n}`;
24
- a(t.folder) || o(t.folder, { recursive: !0 }), s(r, e, {
25
+ let o = `${t.folder}/${n}`;
26
+ r(t.folder) || i(t.folder, { recursive: !0 }), a(o, e, {
25
27
  encoding: "utf-8",
26
28
  flag: "w"
27
29
  }, function(t) {
28
30
  if (t) throw t;
29
- console.log(r, e);
31
+ console.log(o, e);
30
32
  });
31
- }, ee = (e) => {
33
+ }, ne = (e) => {
32
34
  let t = {}, n = e[0].map((e) => e);
33
35
  return e.forEach((e, r) => {
34
- r !== 0 && (t = te(e, n, t));
36
+ r !== 0 && (t = _(e, n, t));
35
37
  }), t;
36
- }, te = (e, t, n) => {
38
+ }, _ = (e, t, n) => {
37
39
  let r = e[0];
38
40
  return n[r] = {}, t.forEach((t, i) => {
39
- i === 0 || e[i] === void 0 || e[i] === "" || (n[r][t] = b(e[i]));
41
+ i === 0 || e[i] === void 0 || e[i] === "" || (n[r][t] = y(e[i]));
40
42
  }), n;
41
- }, y = (e) => {
43
+ }, v = (e) => {
42
44
  try {
43
45
  JSON.parse(e);
44
46
  } catch {
45
47
  return !1;
46
48
  }
47
49
  return !0;
48
- }, b = (e) => ["TRUE", "FALSE"].includes(e.toUpperCase()) ? e === "TRUE" : y(e) ? JSON.parse(e) : e, ne = (e, t) => {
50
+ }, y = (e) => ["TRUE", "FALSE"].includes(e.toUpperCase()) ? e === "TRUE" : v(e) ? JSON.parse(e) : e, re = (e, t) => {
49
51
  let n = { params: e }, r = "";
50
52
  switch (t.exportAs) {
51
53
  case "ts":
@@ -59,33 +61,33 @@ var v = (e, t) => {
59
61
  break;
60
62
  default: throw Error(`exportAs ${t.exportAs} not supported.`);
61
63
  }
62
- v(r, t);
63
- }, x = (e) => {
64
- let t;
65
- switch (e) {
64
+ g(r, t);
65
+ }, b = (t) => {
66
+ let n;
67
+ switch (t) {
66
68
  case "dev":
67
69
  case "develop":
68
70
  case "development":
69
- t = n.DEV;
71
+ n = e.DEV;
70
72
  break;
71
73
  case "stg":
72
74
  case "stag":
73
75
  case "staging":
74
- t = n.STAGING;
76
+ n = e.STAGING;
75
77
  break;
76
78
  case "prd":
77
79
  case "prod":
78
80
  case "production":
79
- t = n.PRODUCTION;
81
+ n = e.PRODUCTION;
80
82
  break;
81
- default: throw Error(`env ${e} not supported.`);
83
+ default: n = t;
82
84
  }
83
- return t;
84
- }, S = (e, t, n) => {
85
+ return n;
86
+ }, x = (e, t, n) => {
85
87
  let r = "";
86
88
  switch (n) {
87
89
  case "ts":
88
- c(t) ? r += `export const ${e}: string | null = ${t};\n` : typeof t == "boolean" ? r += `export const ${e}: boolean = ${t};\n` : r += `export const ${e} = '${t}';\n`;
90
+ o(t) ? r += `export const ${e}: string | null = ${t};\n` : typeof t == "boolean" ? r += `export const ${e}: boolean = ${t};\n` : r += `export const ${e} = '${t}';\n`;
89
91
  break;
90
92
  case "js":
91
93
  r += `export const ${e} = "${t}";\n`;
@@ -96,10 +98,10 @@ var v = (e, t) => {
96
98
  default: throw Error(`exportAs ${n} not supported.`);
97
99
  }
98
100
  return r;
99
- }, C = (e, t, n, i) => {
100
- let a = S(n ? `${n}ENV` : "ENV", x(t), i.exportAs);
101
+ }, S = (e, n, r, i) => {
102
+ let a = x(r ? `${r}ENV` : "ENV", b(n), i.exportAs);
101
103
  Object.keys(e).forEach((o) => {
102
- let s = n && !r(o) ? `${n}${o}` : o;
104
+ let s = r && !t(o) ? `${r}${o}` : o;
103
105
  if (o === "BASE_PROJECT" || o === "__BASE_PROJECT") {
104
106
  let t = [
105
107
  `.${e[o]}.js`,
@@ -110,40 +112,40 @@ var v = (e, t) => {
110
112
  `.${e[o]}.json`,
111
113
  `.${e[o]}.scss`
112
114
  ];
113
- a += S(s, t.join(","), i.exportAs);
115
+ a += x(s, t.join(","), i.exportAs);
114
116
  return;
115
117
  }
116
118
  if (o === "SITEMAP" || o === "__SITEMAP") {
117
- a += S(s, JSON.stringify(e[o]), i.exportAs);
119
+ a += x(s, JSON.stringify(e[o]), i.exportAs);
118
120
  return;
119
121
  }
120
122
  if (Array.isArray(e[o])) {
121
- a += S(s, e[o].join(","), i.exportAs);
123
+ a += x(s, e[o].join(","), i.exportAs);
122
124
  return;
123
125
  }
124
126
  if (typeof e[o] == "object") {
125
- e[o].hasOwnProperty(t) ? a += S(s, e[o][t], i.exportAs) : a += S(s, JSON.stringify(e[o]), i.exportAs);
127
+ e[o].hasOwnProperty(n) ? a += x(s, e[o][n], i.exportAs) : a += x(s, JSON.stringify(e[o]), i.exportAs);
126
128
  return;
127
129
  }
128
- a += S(s, e[o], i.exportAs);
129
- }), v(a, i);
130
- }, re = (e, t, n) => {
131
- let r = "index.html", o = "index";
132
- if (n.excludeVersion.includes(e) || (o = `.${e}.`), n.excludeEnv.includes(t) || (o = `${o}.${t}`), o = `${o}.html`, o !== r && a(o)) {
133
- i(o, r, (e) => {
130
+ a += x(s, e[o], i.exportAs);
131
+ }), g(a, i);
132
+ }, C = (e, t, i) => {
133
+ let a = "index.html", o = "index";
134
+ if (i.excludeVersion.includes(e) || (o = `.${e}.`), i.excludeEnv.includes(t) || (o = `${o}.${t}`), o = `${o}.html`, o !== a && r(o)) {
135
+ n(o, a, (e) => {
134
136
  if (e) {
135
137
  console.error(e);
136
138
  return;
137
139
  }
138
- console.log(`File copied from '${o}' to '${r}' successfully!`);
140
+ console.log(`File copied from '${o}' to '${a}' successfully!`);
139
141
  });
140
142
  return;
141
143
  }
142
144
  console.log("use current index.html");
143
- }, w = ["https://www.googleapis.com/auth/spreadsheets.readonly"], T = d.join(f.cwd(), "/google_application_credentials.json"), E = () => {
144
- let e = a(T), t = { scopes: w };
145
- return e && (t.keyFile = T), new l(t);
146
- }, D = async (e, t, n) => (await u.sheets({
145
+ }, w = ["https://www.googleapis.com/auth/spreadsheets.readonly"], T = l.join(u.cwd(), "/google_application_credentials.json"), E = () => {
146
+ let e = r(T), t = { scopes: w };
147
+ return e && (t.keyFile = T), new s(t);
148
+ }, D = async (e, t, n) => (await c.sheets({
147
149
  version: "v4",
148
150
  auth: e
149
151
  }).spreadsheets.values.get({
@@ -173,7 +175,7 @@ var v = (e, t) => {
173
175
  default: throw Error(`exportAs ${t.exportAs} not supported.`);
174
176
  }
175
177
  if (!r) throw Error("empty content, please check remote value.");
176
- v(r, t);
178
+ g(r, t);
177
179
  });
178
180
  }, k = class e extends Error {
179
181
  constructor(t) {
@@ -349,7 +351,7 @@ function J(e, t) {
349
351
  return t;
350
352
  }, {});
351
353
  }
352
- var je = class extends p {
354
+ var je = class extends d {
353
355
  level;
354
356
  constructor(e = { level: U.WARN }) {
355
357
  e.objectMode = !0, super(e), this.level = e.level || U.WARN;
@@ -496,14 +498,14 @@ function He(e, t, n = !1) {
496
498
  links: [],
497
499
  url: ""
498
500
  };
499
- if (typeof e == "string") return r.url = new g(e, t).toString(), r;
501
+ if (typeof e == "string") return r.url = new m(e, t).toString(), r;
500
502
  let { url: i, img: a, links: o, video: s, lastmodfile: c, lastmodISO: l, lastmod: u, ...d } = e;
501
- if (Object.assign(r, d), r.url = new g(i, t).toString(), a && (r.img = (Array.isArray(a) ? a : [a]).map((e) => typeof e == "string" ? { url: new g(e, t).toString() } : {
503
+ if (Object.assign(r, d), r.url = new m(i, t).toString(), a && (r.img = (Array.isArray(a) ? a : [a]).map((e) => typeof e == "string" ? { url: new m(e, t).toString() } : {
502
504
  ...e,
503
- url: new g(e.url, t).toString()
505
+ url: new m(e.url, t).toString()
504
506
  })), o && (r.links = o.map((e) => ({
505
507
  ...e,
506
- url: new g(e.url, t).toString()
508
+ url: new m(e.url, t).toString()
507
509
  }))), s && (r.video = (Array.isArray(s) ? s : [s]).map((t) => {
508
510
  let n = {
509
511
  ...t,
@@ -526,7 +528,7 @@ function He(e, t, n = !1) {
526
528
  } else typeof t.view_count == "number" && (n.view_count = t.view_count);
527
529
  return n;
528
530
  })), c) {
529
- let { mtime: e } = h(c), t = new Date(e);
531
+ let { mtime: e } = p(c), t = new Date(e);
530
532
  if (Number.isNaN(t.getTime())) throw Error(`Invalid date from file stats for URL "${r.url}": file modification time is invalid`);
531
533
  r.lastmod = t.toISOString();
532
534
  } else if (l) {
@@ -563,7 +565,7 @@ var qe = ({ news: e, video: t, image: n, xhtml: r, custom: i }, a) => {
563
565
  xhtml: !0,
564
566
  image: !0,
565
567
  video: !0
566
- }, Xe = { xmlns: Ye }, Ze = class extends p {
568
+ }, Xe = { xmlns: Ye }, Ze = class extends d {
567
569
  hostname;
568
570
  level;
569
571
  hasHeadOutput;
@@ -585,19 +587,19 @@ var qe = ({ news: e, video: t, image: n, xhtml: r, custom: i }, a) => {
585
587
  function Qe(e) {
586
588
  return new Promise((t, n) => {
587
589
  let r = [];
588
- e.on("error", n).pipe(new m({ write(e, t, n) {
590
+ e.on("error", n).pipe(new f({ write(e, t, n) {
589
591
  r.push(e), n();
590
592
  } })).on("error", n).on("finish", () => {
591
593
  r.length ? t(Buffer.concat(r)) : n(new ge());
592
594
  });
593
595
  });
594
596
  }
595
- (/* @__PURE__ */ t(((t) => {
596
- (function(t) {
597
- t.parser = function(e, t) {
598
- return new r(e, t);
599
- }, t.SAXParser = r, t.SAXStream = d, t.createStream = l, t.MAX_BUFFER_LENGTH = 64 * 1024;
600
- var n = [
597
+ (/* @__PURE__ */ h(((e) => {
598
+ (function(e) {
599
+ e.parser = function(e, t) {
600
+ return new n(e, t);
601
+ }, e.SAXParser = n, e.SAXStream = u, e.createStream = c, e.MAX_BUFFER_LENGTH = 64 * 1024;
602
+ var t = [
601
603
  "comment",
602
604
  "sgmlDecl",
603
605
  "textNode",
@@ -611,7 +613,7 @@ function Qe(e) {
611
613
  "cdata",
612
614
  "script"
613
615
  ];
614
- t.EVENTS = [
616
+ e.EVENTS = [
615
617
  "text",
616
618
  "processinginstruction",
617
619
  "sgmldeclaration",
@@ -631,10 +633,10 @@ function Qe(e) {
631
633
  "opennamespace",
632
634
  "closenamespace"
633
635
  ];
634
- function r(e, n) {
635
- if (!(this instanceof r)) return new r(e, n);
636
- var i = this;
637
- a(i), i.q = i.c = "", i.bufferCheckPosition = t.MAX_BUFFER_LENGTH, i.encoding = null, i.opt = n || {}, i.opt.lowercase = i.opt.lowercase || i.opt.lowercasetags, i.looseCase = i.opt.lowercase ? "toLowerCase" : "toUpperCase", i.opt.maxEntityCount = i.opt.maxEntityCount || 512, i.opt.maxEntityDepth = i.opt.maxEntityDepth || 4, i.entityCount = i.entityDepth = 0, i.tags = [], i.closed = i.closedRoot = i.sawRoot = !1, i.tag = i.error = null, i.strict = !!e, i.noscript = !!(e || i.opt.noscript), i.state = C.BEGIN, i.strictEntities = i.opt.strictEntities, i.ENTITIES = i.strictEntities ? Object.create(t.XML_ENTITIES) : Object.create(t.ENTITIES), i.attribList = [], i.opt.xmlns && (i.ns = Object.create(g)), i.opt.unquotedAttributeValues === void 0 && (i.opt.unquotedAttributeValues = !e), i.trackPosition = i.opt.position !== !1, i.trackPosition && (i.position = i.line = i.column = 0), w(i, "onready");
636
+ function n(t, r) {
637
+ if (!(this instanceof n)) return new n(t, r);
638
+ var a = this;
639
+ i(a), a.q = a.c = "", a.bufferCheckPosition = e.MAX_BUFFER_LENGTH, a.encoding = null, a.opt = r || {}, a.opt.lowercase = a.opt.lowercase || a.opt.lowercasetags, a.looseCase = a.opt.lowercase ? "toLowerCase" : "toUpperCase", a.opt.maxEntityCount = a.opt.maxEntityCount || 512, a.opt.maxEntityDepth = a.opt.maxEntityDepth || 4, a.entityCount = a.entityDepth = 0, a.tags = [], a.closed = a.closedRoot = a.sawRoot = !1, a.tag = a.error = null, a.strict = !!t, a.noscript = !!(t || a.opt.noscript), a.state = S.BEGIN, a.strictEntities = a.opt.strictEntities, a.ENTITIES = a.strictEntities ? Object.create(e.XML_ENTITIES) : Object.create(e.ENTITIES), a.attribList = [], a.opt.xmlns && (a.ns = Object.create(ee)), a.opt.unquotedAttributeValues === void 0 && (a.opt.unquotedAttributeValues = !t), a.trackPosition = a.opt.position !== !1, a.trackPosition && (a.position = a.line = a.column = 0), w(a, "onready");
638
640
  }
639
641
  Object.create || (Object.create = function(e) {
640
642
  function t() {}
@@ -644,32 +646,32 @@ function Qe(e) {
644
646
  for (var n in e) e.hasOwnProperty(n) && t.push(n);
645
647
  return t;
646
648
  });
647
- function i(e) {
648
- for (var r = Math.max(t.MAX_BUFFER_LENGTH, 10), i = 0, a = 0, o = n.length; a < o; a++) {
649
- var s = e[n[a]].length;
650
- if (s > r) switch (n[a]) {
649
+ function r(n) {
650
+ for (var r = Math.max(e.MAX_BUFFER_LENGTH, 10), i = 0, a = 0, o = t.length; a < o; a++) {
651
+ var s = n[t[a]].length;
652
+ if (s > r) switch (t[a]) {
651
653
  case "textNode":
652
- k(e);
654
+ k(n);
653
655
  break;
654
656
  case "cdata":
655
- O(e, "oncdata", e.cdata), e.cdata = "";
657
+ O(n, "oncdata", n.cdata), n.cdata = "";
656
658
  break;
657
659
  case "script":
658
- O(e, "onscript", e.script), e.script = "";
660
+ O(n, "onscript", n.script), n.script = "";
659
661
  break;
660
- default: j(e, "Max buffer length exceeded: " + n[a]);
662
+ default: j(n, "Max buffer length exceeded: " + t[a]);
661
663
  }
662
664
  i = Math.max(i, s);
663
665
  }
664
- e.bufferCheckPosition = t.MAX_BUFFER_LENGTH - i + e.position;
666
+ n.bufferCheckPosition = e.MAX_BUFFER_LENGTH - i + n.position;
665
667
  }
666
- function a(e) {
667
- for (var t = 0, r = n.length; t < r; t++) e[n[t]] = "";
668
+ function i(e) {
669
+ for (var n = 0, r = t.length; n < r; n++) e[t[n]] = "";
668
670
  }
669
- function o(e) {
671
+ function a(e) {
670
672
  k(e), e.cdata !== "" && (O(e, "oncdata", e.cdata), e.cdata = ""), e.script !== "" && (O(e, "onscript", e.script), e.script = "");
671
673
  }
672
- r.prototype = {
674
+ n.prototype = {
673
675
  end: function() {
674
676
  M(this);
675
677
  },
@@ -681,66 +683,66 @@ function Qe(e) {
681
683
  return this.write(null);
682
684
  },
683
685
  flush: function() {
684
- o(this);
686
+ a(this);
685
687
  }
686
688
  };
687
- var s;
689
+ var o;
688
690
  try {
689
- s = e("stream").Stream;
691
+ o = te("stream").Stream;
690
692
  } catch {
691
- s = function() {};
693
+ o = function() {};
692
694
  }
693
- s ||= function() {};
694
- var c = t.EVENTS.filter(function(e) {
695
+ o ||= function() {};
696
+ var s = e.EVENTS.filter(function(e) {
695
697
  return e !== "error" && e !== "end";
696
698
  });
697
- function l(e, t) {
698
- return new d(e, t);
699
+ function c(e, t) {
700
+ return new u(e, t);
699
701
  }
700
- function u(e, t) {
702
+ function l(e, t) {
701
703
  if (e.length >= 2) {
702
704
  if (e[0] === 255 && e[1] === 254) return "utf-16le";
703
705
  if (e[0] === 254 && e[1] === 255) return "utf-16be";
704
706
  }
705
707
  return e.length >= 3 && e[0] === 239 && e[1] === 187 && e[2] === 191 ? "utf8" : e.length >= 4 ? e[0] === 60 && e[1] === 0 && e[2] === 63 && e[3] === 0 ? "utf-16le" : e[0] === 0 && e[1] === 60 && e[2] === 0 && e[3] === 63 ? "utf-16be" : "utf8" : t ? "utf8" : null;
706
708
  }
707
- function d(e, t) {
708
- if (!(this instanceof d)) return new d(e, t);
709
- s.apply(this), this._parser = new r(e, t), this.writable = !0, this.readable = !0;
710
- var n = this;
709
+ function u(e, t) {
710
+ if (!(this instanceof u)) return new u(e, t);
711
+ o.apply(this), this._parser = new n(e, t), this.writable = !0, this.readable = !0;
712
+ var r = this;
711
713
  this._parser.onend = function() {
712
- n.emit("end");
714
+ r.emit("end");
713
715
  }, this._parser.onerror = function(e) {
714
- n.emit("error", e), n._parser.error = null;
715
- }, this._decoder = null, this._decoderBuffer = null, c.forEach(function(e) {
716
- Object.defineProperty(n, "on" + e, {
716
+ r.emit("error", e), r._parser.error = null;
717
+ }, this._decoder = null, this._decoderBuffer = null, s.forEach(function(e) {
718
+ Object.defineProperty(r, "on" + e, {
717
719
  get: function() {
718
- return n._parser["on" + e];
720
+ return r._parser["on" + e];
719
721
  },
720
722
  set: function(t) {
721
- if (!t) return n.removeAllListeners(e), n._parser["on" + e] = t, t;
722
- n.on(e, t);
723
+ if (!t) return r.removeAllListeners(e), r._parser["on" + e] = t, t;
724
+ r.on(e, t);
723
725
  },
724
726
  enumerable: !0,
725
727
  configurable: !1
726
728
  });
727
729
  });
728
730
  }
729
- d.prototype = Object.create(s.prototype, { constructor: { value: d } }), d.prototype._decodeBuffer = function(e, t) {
731
+ u.prototype = Object.create(o.prototype, { constructor: { value: u } }), u.prototype._decodeBuffer = function(e, t) {
730
732
  if (this._decoderBuffer &&= (e = Buffer.concat([this._decoderBuffer, e]), null), !this._decoder) {
731
- var n = u(e, t);
733
+ var n = l(e, t);
732
734
  if (!n) return this._decoderBuffer = e, "";
733
735
  this._parser.encoding = n, this._decoder = new TextDecoder(n);
734
736
  }
735
737
  return this._decoder.decode(e, { stream: !t });
736
- }, d.prototype.write = function(e) {
738
+ }, u.prototype.write = function(e) {
737
739
  if (typeof Buffer == "function" && typeof Buffer.isBuffer == "function" && Buffer.isBuffer(e)) e = this._decodeBuffer(e, !1);
738
740
  else if (this._decoderBuffer) {
739
741
  var t = this._decodeBuffer(Buffer.alloc(0), !0);
740
742
  t && (this._parser.write(t), this.emit("data", t));
741
743
  }
742
744
  return this._parser.write(e.toString()), this.emit("data", e), !0;
743
- }, d.prototype.end = function(e) {
745
+ }, u.prototype.end = function(e) {
744
746
  if (e && e.length && this.write(e), this._decoderBuffer) {
745
747
  var t = this._decodeBuffer(Buffer.alloc(0), !0);
746
748
  t && (this._parser.write(t), this.emit("data", t));
@@ -749,77 +751,77 @@ function Qe(e) {
749
751
  n && (this._parser.write(n), this.emit("data", n));
750
752
  }
751
753
  return this._parser.end(), !0;
752
- }, d.prototype.on = function(e, t) {
754
+ }, u.prototype.on = function(e, t) {
753
755
  var n = this;
754
- return !n._parser["on" + e] && c.indexOf(e) !== -1 && (n._parser["on" + e] = function() {
756
+ return !n._parser["on" + e] && s.indexOf(e) !== -1 && (n._parser["on" + e] = function() {
755
757
  var t = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
756
758
  t.splice(0, 0, e), n.emit.apply(n, t);
757
- }), s.prototype.on.call(n, e, t);
759
+ }), o.prototype.on.call(n, e, t);
758
760
  };
759
- var f = "[CDATA[", p = "DOCTYPE", m = "http://www.w3.org/XML/1998/namespace", h = "http://www.w3.org/2000/xmlns/", g = {
760
- xml: m,
761
- xmlns: h
762
- }, _ = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, v = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/, ee = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, te = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
763
- function y(e) {
761
+ var d = "[CDATA[", f = "DOCTYPE", p = "http://www.w3.org/XML/1998/namespace", m = "http://www.w3.org/2000/xmlns/", ee = {
762
+ xml: p,
763
+ xmlns: m
764
+ }, h = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, g = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/, ne = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, _ = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
765
+ function v(e) {
764
766
  return e === " " || e === "\n" || e === "\r" || e === " ";
765
767
  }
766
- function b(e) {
768
+ function y(e) {
767
769
  return e === "\"" || e === "'";
768
770
  }
769
- function ne(e) {
770
- return e === ">" || y(e);
771
+ function re(e) {
772
+ return e === ">" || v(e);
771
773
  }
772
- function x(e, t) {
774
+ function b(e, t) {
773
775
  return e.test(t);
774
776
  }
775
- function S(e, t) {
776
- return !x(e, t);
777
+ function x(e, t) {
778
+ return !b(e, t);
777
779
  }
778
- var C = 0;
779
- for (var re in t.STATE = {
780
- BEGIN: C++,
781
- BEGIN_WHITESPACE: C++,
782
- TEXT: C++,
783
- TEXT_ENTITY: C++,
784
- OPEN_WAKA: C++,
785
- SGML_DECL: C++,
786
- SGML_DECL_QUOTED: C++,
787
- DOCTYPE: C++,
788
- DOCTYPE_QUOTED: C++,
789
- DOCTYPE_DTD: C++,
790
- DOCTYPE_DTD_QUOTED: C++,
791
- COMMENT_STARTING: C++,
792
- COMMENT: C++,
793
- COMMENT_ENDING: C++,
794
- COMMENT_ENDED: C++,
795
- CDATA: C++,
796
- CDATA_ENDING: C++,
797
- CDATA_ENDING_2: C++,
798
- PROC_INST: C++,
799
- PROC_INST_BODY: C++,
800
- PROC_INST_ENDING: C++,
801
- OPEN_TAG: C++,
802
- OPEN_TAG_SLASH: C++,
803
- ATTRIB: C++,
804
- ATTRIB_NAME: C++,
805
- ATTRIB_NAME_SAW_WHITE: C++,
806
- ATTRIB_VALUE: C++,
807
- ATTRIB_VALUE_QUOTED: C++,
808
- ATTRIB_VALUE_CLOSED: C++,
809
- ATTRIB_VALUE_UNQUOTED: C++,
810
- ATTRIB_VALUE_ENTITY_Q: C++,
811
- ATTRIB_VALUE_ENTITY_U: C++,
812
- CLOSE_TAG: C++,
813
- CLOSE_TAG_SAW_WHITE: C++,
814
- SCRIPT: C++,
815
- SCRIPT_ENDING: C++
816
- }, t.XML_ENTITIES = {
780
+ var S = 0;
781
+ for (var C in e.STATE = {
782
+ BEGIN: S++,
783
+ BEGIN_WHITESPACE: S++,
784
+ TEXT: S++,
785
+ TEXT_ENTITY: S++,
786
+ OPEN_WAKA: S++,
787
+ SGML_DECL: S++,
788
+ SGML_DECL_QUOTED: S++,
789
+ DOCTYPE: S++,
790
+ DOCTYPE_QUOTED: S++,
791
+ DOCTYPE_DTD: S++,
792
+ DOCTYPE_DTD_QUOTED: S++,
793
+ COMMENT_STARTING: S++,
794
+ COMMENT: S++,
795
+ COMMENT_ENDING: S++,
796
+ COMMENT_ENDED: S++,
797
+ CDATA: S++,
798
+ CDATA_ENDING: S++,
799
+ CDATA_ENDING_2: S++,
800
+ PROC_INST: S++,
801
+ PROC_INST_BODY: S++,
802
+ PROC_INST_ENDING: S++,
803
+ OPEN_TAG: S++,
804
+ OPEN_TAG_SLASH: S++,
805
+ ATTRIB: S++,
806
+ ATTRIB_NAME: S++,
807
+ ATTRIB_NAME_SAW_WHITE: S++,
808
+ ATTRIB_VALUE: S++,
809
+ ATTRIB_VALUE_QUOTED: S++,
810
+ ATTRIB_VALUE_CLOSED: S++,
811
+ ATTRIB_VALUE_UNQUOTED: S++,
812
+ ATTRIB_VALUE_ENTITY_Q: S++,
813
+ ATTRIB_VALUE_ENTITY_U: S++,
814
+ CLOSE_TAG: S++,
815
+ CLOSE_TAG_SAW_WHITE: S++,
816
+ SCRIPT: S++,
817
+ SCRIPT_ENDING: S++
818
+ }, e.XML_ENTITIES = {
817
819
  amp: "&",
818
820
  gt: ">",
819
821
  lt: "<",
820
822
  quot: "\"",
821
823
  apos: "'"
822
- }, t.ENTITIES = {
824
+ }, e.ENTITIES = {
823
825
  amp: "&",
824
826
  gt: ">",
825
827
  lt: "<",
@@ -1073,11 +1075,11 @@ function Qe(e) {
1073
1075
  clubs: 9827,
1074
1076
  hearts: 9829,
1075
1077
  diams: 9830
1076
- }, Object.keys(t.ENTITIES).forEach(function(e) {
1077
- var n = t.ENTITIES[e], r = typeof n == "number" ? String.fromCharCode(n) : n;
1078
- t.ENTITIES[e] = r;
1079
- }), t.STATE) t.STATE[t.STATE[re]] = re;
1080
- C = t.STATE;
1078
+ }, Object.keys(e.ENTITIES).forEach(function(t) {
1079
+ var n = e.ENTITIES[t], r = typeof n == "number" ? String.fromCharCode(n) : n;
1080
+ e.ENTITIES[t] = r;
1081
+ }), e.STATE) e.STATE[e.STATE[C]] = C;
1082
+ S = e.STATE;
1081
1083
  function w(e, t, n) {
1082
1084
  e[t] && e[t](n);
1083
1085
  }
@@ -1111,10 +1113,10 @@ function Qe(e) {
1111
1113
  return k(e), e.trackPosition && (t += "\nLine: " + e.line + "\nColumn: " + e.column + "\nChar: " + e.c), t = Error(t), e.error = t, w(e, "onerror", t), e;
1112
1114
  }
1113
1115
  function M(e) {
1114
- return e.sawRoot && !e.closedRoot && N(e, "Unclosed root tag"), e.state !== C.BEGIN && e.state !== C.BEGIN_WHITESPACE && e.state !== C.TEXT && j(e, "Unexpected end"), k(e), e.c = "", e.closed = !0, w(e, "onend"), r.call(e, e.strict, e.opt), e;
1116
+ return e.sawRoot && !e.closedRoot && N(e, "Unclosed root tag"), e.state !== S.BEGIN && e.state !== S.BEGIN_WHITESPACE && e.state !== S.TEXT && j(e, "Unexpected end"), k(e), e.c = "", e.closed = !0, w(e, "onend"), n.call(e, e.strict, e.opt), e;
1115
1117
  }
1116
1118
  function N(e, t) {
1117
- if (typeof e != "object" || !(e instanceof r)) throw Error("bad call to strictFail");
1119
+ if (typeof e != "object" || !(e instanceof n)) throw Error("bad call to strictFail");
1118
1120
  e.strict && j(e, t);
1119
1121
  }
1120
1122
  function ae(e) {
@@ -1139,8 +1141,8 @@ function Qe(e) {
1139
1141
  }
1140
1142
  if (e.opt.xmlns) {
1141
1143
  var t = P(e.attribName, !0), n = t.prefix, r = t.local;
1142
- if (n === "xmlns") if (r === "xml" && e.attribValue !== m) N(e, "xml: prefix must be bound to " + m + "\nActual: " + e.attribValue);
1143
- else if (r === "xmlns" && e.attribValue !== h) N(e, "xmlns: prefix must be bound to " + h + "\nActual: " + e.attribValue);
1144
+ if (n === "xmlns") if (r === "xml" && e.attribValue !== p) N(e, "xml: prefix must be bound to " + p + "\nActual: " + e.attribValue);
1145
+ else if (r === "xmlns" && e.attribValue !== m) N(e, "xmlns: prefix must be bound to " + m + "\nActual: " + e.attribValue);
1144
1146
  else {
1145
1147
  var i = e.tag, a = e.tags[e.tags.length - 1] || e;
1146
1148
  i.ns === a.ns && (i.ns = Object.create(a.ns)), i.ns[r] = e.attribValue;
@@ -1175,16 +1177,16 @@ function Qe(e) {
1175
1177
  }
1176
1178
  e.attribList.length = 0;
1177
1179
  }
1178
- e.tag.isSelfClosing = !!t, e.sawRoot = !0, e.tags.push(e.tag), O(e, "onopentag", e.tag), t || (!e.noscript && e.tagName.toLowerCase() === "script" ? e.state = C.SCRIPT : e.state = C.TEXT, e.tag = null, e.tagName = ""), e.attribName = e.attribValue = "", e.attribList.length = 0;
1180
+ e.tag.isSelfClosing = !!t, e.sawRoot = !0, e.tags.push(e.tag), O(e, "onopentag", e.tag), t || (!e.noscript && e.tagName.toLowerCase() === "script" ? e.state = S.SCRIPT : e.state = S.TEXT, e.tag = null, e.tagName = ""), e.attribName = e.attribValue = "", e.attribList.length = 0;
1179
1181
  }
1180
1182
  function L(e) {
1181
1183
  if (!e.tagName) {
1182
- N(e, "Weird empty close tag."), e.textNode += "</>", e.state = C.TEXT;
1184
+ N(e, "Weird empty close tag."), e.textNode += "</>", e.state = S.TEXT;
1183
1185
  return;
1184
1186
  }
1185
1187
  if (e.script) {
1186
1188
  if (e.tagName !== "script") {
1187
- e.script += "</" + e.tagName + ">", e.tagName = "", e.state = C.SCRIPT;
1189
+ e.script += "</" + e.tagName + ">", e.tagName = "", e.state = S.SCRIPT;
1188
1190
  return;
1189
1191
  }
1190
1192
  O(e, "onscript", e.script), e.script = "";
@@ -1193,7 +1195,7 @@ function Qe(e) {
1193
1195
  e.strict || (n = n[e.looseCase]());
1194
1196
  for (var r = n; t-- && e.tags[t].name !== r;) N(e, "Unexpected close tag");
1195
1197
  if (t < 0) {
1196
- N(e, "Unmatched closing tag: " + e.tagName), e.textNode += "</" + e.tagName + ">", e.state = C.TEXT;
1198
+ N(e, "Unmatched closing tag: " + e.tagName), e.textNode += "</" + e.tagName + ">", e.state = S.TEXT;
1197
1199
  return;
1198
1200
  }
1199
1201
  e.tagName = n;
@@ -1211,192 +1213,192 @@ function Qe(e) {
1211
1213
  });
1212
1214
  });
1213
1215
  }
1214
- t === 0 && (e.closedRoot = !0), e.tagName = e.attribValue = e.attribName = "", e.attribList.length = 0, e.state = C.TEXT;
1216
+ t === 0 && (e.closedRoot = !0), e.tagName = e.attribValue = e.attribName = "", e.attribList.length = 0, e.state = S.TEXT;
1215
1217
  }
1216
1218
  function oe(e) {
1217
1219
  var t = e.entity, n = t.toLowerCase(), r, i = "";
1218
1220
  return e.ENTITIES[t] ? e.ENTITIES[t] : e.ENTITIES[n] ? e.ENTITIES[n] : (t = n, t.charAt(0) === "#" && (t.charAt(1) === "x" ? (t = t.slice(2), r = parseInt(t, 16), i = r.toString(16)) : (t = t.slice(1), r = parseInt(t, 10), i = r.toString(10))), t = t.replace(/^0+/, ""), isNaN(r) || i.toLowerCase() !== t || r < 0 || r > 1114111 ? (N(e, "Invalid character entity"), "&" + e.entity + ";") : String.fromCodePoint(r));
1219
1221
  }
1220
1222
  function R(e, t) {
1221
- t === "<" ? (e.state = C.OPEN_WAKA, e.startTagPosition = e.position) : y(t) || (N(e, "Non-whitespace before first tag."), e.textNode = t, e.state = C.TEXT);
1223
+ t === "<" ? (e.state = S.OPEN_WAKA, e.startTagPosition = e.position) : v(t) || (N(e, "Non-whitespace before first tag."), e.textNode = t, e.state = S.TEXT);
1222
1224
  }
1223
1225
  function z(e, t) {
1224
1226
  var n = "";
1225
1227
  return t < e.length && (n = e.charAt(t)), n;
1226
1228
  }
1227
- function se(e) {
1229
+ function se(t) {
1228
1230
  var n = this;
1229
1231
  if (this.error) throw this.error;
1230
1232
  if (n.closed) return j(n, "Cannot write after close. Assign an onready handler.");
1231
- if (e === null) return M(n);
1232
- typeof e == "object" && (e = e.toString());
1233
- for (var r = 0, a = ""; a = z(e, r++), n.c = a, a;) switch (n.trackPosition && (n.position++, a === "\n" ? (n.line++, n.column = 0) : n.column++), n.state) {
1234
- case C.BEGIN:
1235
- if (n.state = C.BEGIN_WHITESPACE, a === "") continue;
1233
+ if (t === null) return M(n);
1234
+ typeof t == "object" && (t = t.toString());
1235
+ for (var i = 0, a = ""; a = z(t, i++), n.c = a, a;) switch (n.trackPosition && (n.position++, a === "\n" ? (n.line++, n.column = 0) : n.column++), n.state) {
1236
+ case S.BEGIN:
1237
+ if (n.state = S.BEGIN_WHITESPACE, a === "") continue;
1236
1238
  R(n, a);
1237
1239
  continue;
1238
- case C.BEGIN_WHITESPACE:
1240
+ case S.BEGIN_WHITESPACE:
1239
1241
  R(n, a);
1240
1242
  continue;
1241
- case C.TEXT:
1243
+ case S.TEXT:
1242
1244
  if (n.sawRoot && !n.closedRoot) {
1243
- for (var o = r - 1; a && a !== "<" && a !== "&";) a = z(e, r++), a && n.trackPosition && (n.position++, a === "\n" ? (n.line++, n.column = 0) : n.column++);
1244
- n.textNode += e.substring(o, r - 1);
1245
+ for (var o = i - 1; a && a !== "<" && a !== "&";) a = z(t, i++), a && n.trackPosition && (n.position++, a === "\n" ? (n.line++, n.column = 0) : n.column++);
1246
+ n.textNode += t.substring(o, i - 1);
1245
1247
  }
1246
- a === "<" && !(n.sawRoot && n.closedRoot && !n.strict) ? (n.state = C.OPEN_WAKA, n.startTagPosition = n.position) : (!y(a) && (!n.sawRoot || n.closedRoot) && N(n, "Text data outside of root node."), a === "&" ? n.state = C.TEXT_ENTITY : n.textNode += a);
1248
+ a === "<" && !(n.sawRoot && n.closedRoot && !n.strict) ? (n.state = S.OPEN_WAKA, n.startTagPosition = n.position) : (!v(a) && (!n.sawRoot || n.closedRoot) && N(n, "Text data outside of root node."), a === "&" ? n.state = S.TEXT_ENTITY : n.textNode += a);
1247
1249
  continue;
1248
- case C.SCRIPT:
1249
- a === "<" ? n.state = C.SCRIPT_ENDING : n.script += a;
1250
+ case S.SCRIPT:
1251
+ a === "<" ? n.state = S.SCRIPT_ENDING : n.script += a;
1250
1252
  continue;
1251
- case C.SCRIPT_ENDING:
1252
- a === "/" ? n.state = C.CLOSE_TAG : (n.script += "<" + a, n.state = C.SCRIPT);
1253
+ case S.SCRIPT_ENDING:
1254
+ a === "/" ? n.state = S.CLOSE_TAG : (n.script += "<" + a, n.state = S.SCRIPT);
1253
1255
  continue;
1254
- case C.OPEN_WAKA:
1255
- if (a === "!") n.state = C.SGML_DECL, n.sgmlDecl = "";
1256
- else if (!y(a)) if (x(_, a)) n.state = C.OPEN_TAG, n.tagName = a;
1257
- else if (a === "/") n.state = C.CLOSE_TAG, n.tagName = "";
1258
- else if (a === "?") n.state = C.PROC_INST, n.procInstName = n.procInstBody = "";
1256
+ case S.OPEN_WAKA:
1257
+ if (a === "!") n.state = S.SGML_DECL, n.sgmlDecl = "";
1258
+ else if (!v(a)) if (b(h, a)) n.state = S.OPEN_TAG, n.tagName = a;
1259
+ else if (a === "/") n.state = S.CLOSE_TAG, n.tagName = "";
1260
+ else if (a === "?") n.state = S.PROC_INST, n.procInstName = n.procInstBody = "";
1259
1261
  else {
1260
1262
  if (N(n, "Unencoded <"), n.startTagPosition + 1 < n.position) {
1261
1263
  var s = n.position - n.startTagPosition;
1262
1264
  a = Array(s).join(" ") + a;
1263
1265
  }
1264
- n.textNode += "<" + a, n.state = C.TEXT;
1266
+ n.textNode += "<" + a, n.state = S.TEXT;
1265
1267
  }
1266
1268
  continue;
1267
- case C.SGML_DECL:
1269
+ case S.SGML_DECL:
1268
1270
  if (n.sgmlDecl + a === "--") {
1269
- n.state = C.COMMENT, n.comment = "", n.sgmlDecl = "";
1271
+ n.state = S.COMMENT, n.comment = "", n.sgmlDecl = "";
1270
1272
  continue;
1271
1273
  }
1272
- n.doctype && n.doctype !== !0 && n.sgmlDecl ? (n.state = C.DOCTYPE_DTD, n.doctype += "<!" + n.sgmlDecl + a, n.sgmlDecl = "") : (n.sgmlDecl + a).toUpperCase() === f ? (O(n, "onopencdata"), n.state = C.CDATA, n.sgmlDecl = "", n.cdata = "") : (n.sgmlDecl + a).toUpperCase() === p ? (n.state = C.DOCTYPE, (n.doctype || n.sawRoot) && N(n, "Inappropriately located doctype declaration"), n.doctype = "", n.sgmlDecl = "") : a === ">" ? (O(n, "onsgmldeclaration", n.sgmlDecl), n.sgmlDecl = "", n.state = C.TEXT) : (b(a) && (n.state = C.SGML_DECL_QUOTED), n.sgmlDecl += a);
1274
+ n.doctype && n.doctype !== !0 && n.sgmlDecl ? (n.state = S.DOCTYPE_DTD, n.doctype += "<!" + n.sgmlDecl + a, n.sgmlDecl = "") : (n.sgmlDecl + a).toUpperCase() === d ? (O(n, "onopencdata"), n.state = S.CDATA, n.sgmlDecl = "", n.cdata = "") : (n.sgmlDecl + a).toUpperCase() === f ? (n.state = S.DOCTYPE, (n.doctype || n.sawRoot) && N(n, "Inappropriately located doctype declaration"), n.doctype = "", n.sgmlDecl = "") : a === ">" ? (O(n, "onsgmldeclaration", n.sgmlDecl), n.sgmlDecl = "", n.state = S.TEXT) : (y(a) && (n.state = S.SGML_DECL_QUOTED), n.sgmlDecl += a);
1273
1275
  continue;
1274
- case C.SGML_DECL_QUOTED:
1275
- a === n.q && (n.state = C.SGML_DECL, n.q = ""), n.sgmlDecl += a;
1276
+ case S.SGML_DECL_QUOTED:
1277
+ a === n.q && (n.state = S.SGML_DECL, n.q = ""), n.sgmlDecl += a;
1276
1278
  continue;
1277
- case C.DOCTYPE:
1278
- a === ">" ? (n.state = C.TEXT, O(n, "ondoctype", n.doctype), n.doctype = !0) : (n.doctype += a, a === "[" ? n.state = C.DOCTYPE_DTD : b(a) && (n.state = C.DOCTYPE_QUOTED, n.q = a));
1279
+ case S.DOCTYPE:
1280
+ a === ">" ? (n.state = S.TEXT, O(n, "ondoctype", n.doctype), n.doctype = !0) : (n.doctype += a, a === "[" ? n.state = S.DOCTYPE_DTD : y(a) && (n.state = S.DOCTYPE_QUOTED, n.q = a));
1279
1281
  continue;
1280
- case C.DOCTYPE_QUOTED:
1281
- n.doctype += a, a === n.q && (n.q = "", n.state = C.DOCTYPE);
1282
+ case S.DOCTYPE_QUOTED:
1283
+ n.doctype += a, a === n.q && (n.q = "", n.state = S.DOCTYPE);
1282
1284
  continue;
1283
- case C.DOCTYPE_DTD:
1284
- a === "]" ? (n.doctype += a, n.state = C.DOCTYPE) : a === "<" ? (n.state = C.OPEN_WAKA, n.startTagPosition = n.position) : b(a) ? (n.doctype += a, n.state = C.DOCTYPE_DTD_QUOTED, n.q = a) : n.doctype += a;
1285
+ case S.DOCTYPE_DTD:
1286
+ a === "]" ? (n.doctype += a, n.state = S.DOCTYPE) : a === "<" ? (n.state = S.OPEN_WAKA, n.startTagPosition = n.position) : y(a) ? (n.doctype += a, n.state = S.DOCTYPE_DTD_QUOTED, n.q = a) : n.doctype += a;
1285
1287
  continue;
1286
- case C.DOCTYPE_DTD_QUOTED:
1287
- n.doctype += a, a === n.q && (n.state = C.DOCTYPE_DTD, n.q = "");
1288
+ case S.DOCTYPE_DTD_QUOTED:
1289
+ n.doctype += a, a === n.q && (n.state = S.DOCTYPE_DTD, n.q = "");
1288
1290
  continue;
1289
- case C.COMMENT:
1290
- a === "-" ? n.state = C.COMMENT_ENDING : n.comment += a;
1291
+ case S.COMMENT:
1292
+ a === "-" ? n.state = S.COMMENT_ENDING : n.comment += a;
1291
1293
  continue;
1292
- case C.COMMENT_ENDING:
1293
- a === "-" ? (n.state = C.COMMENT_ENDED, n.comment = A(n.opt, n.comment), n.comment && O(n, "oncomment", n.comment), n.comment = "") : (n.comment += "-" + a, n.state = C.COMMENT);
1294
+ case S.COMMENT_ENDING:
1295
+ a === "-" ? (n.state = S.COMMENT_ENDED, n.comment = A(n.opt, n.comment), n.comment && O(n, "oncomment", n.comment), n.comment = "") : (n.comment += "-" + a, n.state = S.COMMENT);
1294
1296
  continue;
1295
- case C.COMMENT_ENDED:
1296
- a === ">" ? n.doctype && n.doctype !== !0 ? n.state = C.DOCTYPE_DTD : n.state = C.TEXT : (N(n, "Malformed comment"), n.comment += "--" + a, n.state = C.COMMENT);
1297
+ case S.COMMENT_ENDED:
1298
+ a === ">" ? n.doctype && n.doctype !== !0 ? n.state = S.DOCTYPE_DTD : n.state = S.TEXT : (N(n, "Malformed comment"), n.comment += "--" + a, n.state = S.COMMENT);
1297
1299
  continue;
1298
- case C.CDATA:
1299
- for (var o = r - 1; a && a !== "]";) a = z(e, r++), a && n.trackPosition && (n.position++, a === "\n" ? (n.line++, n.column = 0) : n.column++);
1300
- n.cdata += e.substring(o, r - 1), a === "]" && (n.state = C.CDATA_ENDING);
1300
+ case S.CDATA:
1301
+ for (var o = i - 1; a && a !== "]";) a = z(t, i++), a && n.trackPosition && (n.position++, a === "\n" ? (n.line++, n.column = 0) : n.column++);
1302
+ n.cdata += t.substring(o, i - 1), a === "]" && (n.state = S.CDATA_ENDING);
1301
1303
  continue;
1302
- case C.CDATA_ENDING:
1303
- a === "]" ? n.state = C.CDATA_ENDING_2 : (n.cdata += "]" + a, n.state = C.CDATA);
1304
+ case S.CDATA_ENDING:
1305
+ a === "]" ? n.state = S.CDATA_ENDING_2 : (n.cdata += "]" + a, n.state = S.CDATA);
1304
1306
  continue;
1305
- case C.CDATA_ENDING_2:
1306
- a === ">" ? (n.cdata && O(n, "oncdata", n.cdata), O(n, "onclosecdata"), n.cdata = "", n.state = C.TEXT) : a === "]" ? n.cdata += "]" : (n.cdata += "]]" + a, n.state = C.CDATA);
1307
+ case S.CDATA_ENDING_2:
1308
+ a === ">" ? (n.cdata && O(n, "oncdata", n.cdata), O(n, "onclosecdata"), n.cdata = "", n.state = S.TEXT) : a === "]" ? n.cdata += "]" : (n.cdata += "]]" + a, n.state = S.CDATA);
1307
1309
  continue;
1308
- case C.PROC_INST:
1309
- a === "?" ? n.state = C.PROC_INST_ENDING : y(a) ? n.state = C.PROC_INST_BODY : n.procInstName += a;
1310
+ case S.PROC_INST:
1311
+ a === "?" ? n.state = S.PROC_INST_ENDING : v(a) ? n.state = S.PROC_INST_BODY : n.procInstName += a;
1310
1312
  continue;
1311
- case C.PROC_INST_BODY:
1312
- if (!n.procInstBody && y(a)) continue;
1313
- a === "?" ? n.state = C.PROC_INST_ENDING : n.procInstBody += a;
1313
+ case S.PROC_INST_BODY:
1314
+ if (!n.procInstBody && v(a)) continue;
1315
+ a === "?" ? n.state = S.PROC_INST_ENDING : n.procInstBody += a;
1314
1316
  continue;
1315
- case C.PROC_INST_ENDING:
1317
+ case S.PROC_INST_ENDING:
1316
1318
  if (a === ">") {
1317
1319
  let e = {
1318
1320
  name: n.procInstName,
1319
1321
  body: n.procInstBody
1320
1322
  };
1321
- ie(n, e), O(n, "onprocessinginstruction", e), n.procInstName = n.procInstBody = "", n.state = C.TEXT;
1322
- } else n.procInstBody += "?" + a, n.state = C.PROC_INST_BODY;
1323
+ ie(n, e), O(n, "onprocessinginstruction", e), n.procInstName = n.procInstBody = "", n.state = S.TEXT;
1324
+ } else n.procInstBody += "?" + a, n.state = S.PROC_INST_BODY;
1323
1325
  continue;
1324
- case C.OPEN_TAG:
1325
- x(v, a) ? n.tagName += a : (ae(n), a === ">" ? I(n) : a === "/" ? n.state = C.OPEN_TAG_SLASH : (y(a) || N(n, "Invalid character in tag name"), n.state = C.ATTRIB));
1326
+ case S.OPEN_TAG:
1327
+ b(g, a) ? n.tagName += a : (ae(n), a === ">" ? I(n) : a === "/" ? n.state = S.OPEN_TAG_SLASH : (v(a) || N(n, "Invalid character in tag name"), n.state = S.ATTRIB));
1326
1328
  continue;
1327
- case C.OPEN_TAG_SLASH:
1328
- a === ">" ? (I(n, !0), L(n)) : (N(n, "Forward-slash in opening tag not followed by >"), n.state = C.ATTRIB);
1329
+ case S.OPEN_TAG_SLASH:
1330
+ a === ">" ? (I(n, !0), L(n)) : (N(n, "Forward-slash in opening tag not followed by >"), n.state = S.ATTRIB);
1329
1331
  continue;
1330
- case C.ATTRIB:
1331
- if (y(a)) continue;
1332
- a === ">" ? I(n) : a === "/" ? n.state = C.OPEN_TAG_SLASH : x(_, a) ? (n.attribName = a, n.attribValue = "", n.state = C.ATTRIB_NAME) : N(n, "Invalid attribute name");
1332
+ case S.ATTRIB:
1333
+ if (v(a)) continue;
1334
+ a === ">" ? I(n) : a === "/" ? n.state = S.OPEN_TAG_SLASH : b(h, a) ? (n.attribName = a, n.attribValue = "", n.state = S.ATTRIB_NAME) : N(n, "Invalid attribute name");
1333
1335
  continue;
1334
- case C.ATTRIB_NAME:
1335
- a === "=" ? n.state = C.ATTRIB_VALUE : a === ">" ? (N(n, "Attribute without value"), n.attribValue = n.attribName, F(n), I(n)) : y(a) ? n.state = C.ATTRIB_NAME_SAW_WHITE : x(v, a) ? n.attribName += a : N(n, "Invalid attribute name");
1336
+ case S.ATTRIB_NAME:
1337
+ a === "=" ? n.state = S.ATTRIB_VALUE : a === ">" ? (N(n, "Attribute without value"), n.attribValue = n.attribName, F(n), I(n)) : v(a) ? n.state = S.ATTRIB_NAME_SAW_WHITE : b(g, a) ? n.attribName += a : N(n, "Invalid attribute name");
1336
1338
  continue;
1337
- case C.ATTRIB_NAME_SAW_WHITE:
1338
- if (a === "=") n.state = C.ATTRIB_VALUE;
1339
- else if (y(a)) continue;
1339
+ case S.ATTRIB_NAME_SAW_WHITE:
1340
+ if (a === "=") n.state = S.ATTRIB_VALUE;
1341
+ else if (v(a)) continue;
1340
1342
  else N(n, "Attribute without value"), n.tag.attributes[n.attribName] = "", n.attribValue = "", O(n, "onattribute", {
1341
1343
  name: n.attribName,
1342
1344
  value: ""
1343
- }), n.attribName = "", a === ">" ? I(n) : x(_, a) ? (n.attribName = a, n.state = C.ATTRIB_NAME) : (N(n, "Invalid attribute name"), n.state = C.ATTRIB);
1345
+ }), n.attribName = "", a === ">" ? I(n) : b(h, a) ? (n.attribName = a, n.state = S.ATTRIB_NAME) : (N(n, "Invalid attribute name"), n.state = S.ATTRIB);
1344
1346
  continue;
1345
- case C.ATTRIB_VALUE:
1346
- if (y(a)) continue;
1347
- b(a) ? (n.q = a, n.state = C.ATTRIB_VALUE_QUOTED) : (n.opt.unquotedAttributeValues || j(n, "Unquoted attribute value"), n.state = C.ATTRIB_VALUE_UNQUOTED, n.attribValue = a);
1347
+ case S.ATTRIB_VALUE:
1348
+ if (v(a)) continue;
1349
+ y(a) ? (n.q = a, n.state = S.ATTRIB_VALUE_QUOTED) : (n.opt.unquotedAttributeValues || j(n, "Unquoted attribute value"), n.state = S.ATTRIB_VALUE_UNQUOTED, n.attribValue = a);
1348
1350
  continue;
1349
- case C.ATTRIB_VALUE_QUOTED:
1351
+ case S.ATTRIB_VALUE_QUOTED:
1350
1352
  if (a !== n.q) {
1351
- a === "&" ? n.state = C.ATTRIB_VALUE_ENTITY_Q : n.attribValue += a;
1353
+ a === "&" ? n.state = S.ATTRIB_VALUE_ENTITY_Q : n.attribValue += a;
1352
1354
  continue;
1353
1355
  }
1354
- F(n), n.q = "", n.state = C.ATTRIB_VALUE_CLOSED;
1356
+ F(n), n.q = "", n.state = S.ATTRIB_VALUE_CLOSED;
1355
1357
  continue;
1356
- case C.ATTRIB_VALUE_CLOSED:
1357
- y(a) ? n.state = C.ATTRIB : a === ">" ? I(n) : a === "/" ? n.state = C.OPEN_TAG_SLASH : x(_, a) ? (N(n, "No whitespace between attributes"), n.attribName = a, n.attribValue = "", n.state = C.ATTRIB_NAME) : N(n, "Invalid attribute name");
1358
+ case S.ATTRIB_VALUE_CLOSED:
1359
+ v(a) ? n.state = S.ATTRIB : a === ">" ? I(n) : a === "/" ? n.state = S.OPEN_TAG_SLASH : b(h, a) ? (N(n, "No whitespace between attributes"), n.attribName = a, n.attribValue = "", n.state = S.ATTRIB_NAME) : N(n, "Invalid attribute name");
1358
1360
  continue;
1359
- case C.ATTRIB_VALUE_UNQUOTED:
1360
- if (!ne(a)) {
1361
- a === "&" ? n.state = C.ATTRIB_VALUE_ENTITY_U : n.attribValue += a;
1361
+ case S.ATTRIB_VALUE_UNQUOTED:
1362
+ if (!re(a)) {
1363
+ a === "&" ? n.state = S.ATTRIB_VALUE_ENTITY_U : n.attribValue += a;
1362
1364
  continue;
1363
1365
  }
1364
- F(n), a === ">" ? I(n) : n.state = C.ATTRIB;
1366
+ F(n), a === ">" ? I(n) : n.state = S.ATTRIB;
1365
1367
  continue;
1366
- case C.CLOSE_TAG:
1367
- if (n.tagName) a === ">" ? L(n) : x(v, a) ? n.tagName += a : n.script ? (n.script += "</" + n.tagName + a, n.tagName = "", n.state = C.SCRIPT) : (y(a) || N(n, "Invalid tagname in closing tag"), n.state = C.CLOSE_TAG_SAW_WHITE);
1368
+ case S.CLOSE_TAG:
1369
+ if (n.tagName) a === ">" ? L(n) : b(g, a) ? n.tagName += a : n.script ? (n.script += "</" + n.tagName + a, n.tagName = "", n.state = S.SCRIPT) : (v(a) || N(n, "Invalid tagname in closing tag"), n.state = S.CLOSE_TAG_SAW_WHITE);
1368
1370
  else {
1369
- if (y(a)) continue;
1370
- S(_, a) ? n.script ? (n.script += "</" + a, n.state = C.SCRIPT) : N(n, "Invalid tagname in closing tag.") : n.tagName = a;
1371
+ if (v(a)) continue;
1372
+ x(h, a) ? n.script ? (n.script += "</" + a, n.state = S.SCRIPT) : N(n, "Invalid tagname in closing tag.") : n.tagName = a;
1371
1373
  }
1372
1374
  continue;
1373
- case C.CLOSE_TAG_SAW_WHITE:
1374
- if (y(a)) continue;
1375
+ case S.CLOSE_TAG_SAW_WHITE:
1376
+ if (v(a)) continue;
1375
1377
  a === ">" ? L(n) : N(n, "Invalid characters in closing tag");
1376
1378
  continue;
1377
- case C.TEXT_ENTITY:
1378
- case C.ATTRIB_VALUE_ENTITY_Q:
1379
- case C.ATTRIB_VALUE_ENTITY_U:
1379
+ case S.TEXT_ENTITY:
1380
+ case S.ATTRIB_VALUE_ENTITY_Q:
1381
+ case S.ATTRIB_VALUE_ENTITY_U:
1380
1382
  var c, l;
1381
1383
  switch (n.state) {
1382
- case C.TEXT_ENTITY:
1383
- c = C.TEXT, l = "textNode";
1384
+ case S.TEXT_ENTITY:
1385
+ c = S.TEXT, l = "textNode";
1384
1386
  break;
1385
- case C.ATTRIB_VALUE_ENTITY_Q:
1386
- c = C.ATTRIB_VALUE_QUOTED, l = "attribValue";
1387
+ case S.ATTRIB_VALUE_ENTITY_Q:
1388
+ c = S.ATTRIB_VALUE_QUOTED, l = "attribValue";
1387
1389
  break;
1388
- case C.ATTRIB_VALUE_ENTITY_U:
1389
- c = C.ATTRIB_VALUE_UNQUOTED, l = "attribValue";
1390
+ case S.ATTRIB_VALUE_ENTITY_U:
1391
+ c = S.ATTRIB_VALUE_UNQUOTED, l = "attribValue";
1390
1392
  break;
1391
1393
  }
1392
1394
  if (a === ";") {
1393
1395
  var u = oe(n);
1394
- n.opt.unparsedEntities && !Object.values(t.XML_ENTITIES).includes(u) ? ((n.entityCount += 1) > n.opt.maxEntityCount && j(n, "Parsed entity count exceeds max entity count"), (n.entityDepth += 1) > n.opt.maxEntityDepth && j(n, "Parsed entity depth exceeds max entity depth"), n.entity = "", n.state = c, n.write(u), --n.entityDepth) : (n[l] += u, n.entity = "", n.state = c);
1395
- } else x(n.entity.length ? te : ee, a) ? n.entity += a : (N(n, "Invalid character in entity name"), n[l] += "&" + n.entity + a, n.entity = "", n.state = c);
1396
+ n.opt.unparsedEntities && !Object.values(e.XML_ENTITIES).includes(u) ? ((n.entityCount += 1) > n.opt.maxEntityCount && j(n, "Parsed entity count exceeds max entity count"), (n.entityDepth += 1) > n.opt.maxEntityDepth && j(n, "Parsed entity depth exceeds max entity depth"), n.entity = "", n.state = c, n.write(u), --n.entityDepth) : (n[l] += u, n.entity = "", n.state = c);
1397
+ } else b(n.entity.length ? _ : ne, a) ? n.entity += a : (N(n, "Invalid character in entity name"), n[l] += "&" + n.entity + a, n.entity = "", n.state = c);
1396
1398
  continue;
1397
1399
  default: throw Error(n, "Unknown state: " + n.state);
1398
1400
  }
1399
- return n.position >= n.bufferCheckPosition && i(n), n;
1401
+ return n.position >= n.bufferCheckPosition && r(n), n;
1400
1402
  }
1401
1403
  /* istanbul ignore next */
1402
1404
  String.fromCodePoint || (function() {
@@ -1417,7 +1419,7 @@ function Qe(e) {
1417
1419
  writable: !0
1418
1420
  }) : String.fromCodePoint = n;
1419
1421
  })();
1420
- })(t === void 0 ? t.sax = {} : t);
1422
+ })(e === void 0 ? e.sax = {} : e);
1421
1423
  })))();
1422
1424
  //#endregion
1423
1425
  //#region src/Config/Sitemap.ts
@@ -1428,7 +1430,7 @@ var $e = (e, t) => {
1428
1430
  "User-agent: *",
1429
1431
  "Disallow:"
1430
1432
  ];
1431
- t.filename = "robots.txt", v(n.join("\r\n"), t);
1433
+ t.filename = "robots.txt", g(n.join("\r\n"), t);
1432
1434
  }, et = async (e, t, n, r) => {
1433
1435
  let i = new Ze({
1434
1436
  hostname: e,
@@ -1441,7 +1443,7 @@ var $e = (e, t) => {
1441
1443
  custom: ["xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"", "xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\""]
1442
1444
  }
1443
1445
  });
1444
- v(await Qe(_.from(t).pipe(i)).then((e) => e.toString()), r), n && $e(e, r);
1446
+ g(await Qe(ee.from(t).pipe(i)).then((e) => e.toString()), r), n && $e(e, r);
1445
1447
  }, tt = async (e, t) => {
1446
1448
  let n = await D(e, t.spreadsheetId, t.spreadsheetTab);
1447
1449
  if (!n || n.length === 0) {
@@ -1455,7 +1457,7 @@ var $e = (e, t) => {
1455
1457
  console.log("No data found.");
1456
1458
  return;
1457
1459
  }
1458
- ne(ee(n), t.output);
1460
+ re(ne(n), t.output);
1459
1461
  }, rt = (e) => {
1460
1462
  try {
1461
1463
  tt(E(), e);
@@ -1486,6 +1488,6 @@ var $e = (e, t) => {
1486
1488
  return null;
1487
1489
  };
1488
1490
  //#endregion
1489
- export { et as a, ot as i, it as n, re as o, rt as r, C as s, at as t };
1491
+ export { et as a, ot as i, it as n, C as o, rt as r, S as s, at as t };
1490
1492
 
1491
- //# sourceMappingURL=config-cli-BIF4xuoO.js.map
1493
+ //# sourceMappingURL=config-cli-CY_z5CYp.js.map