kakidash 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- class Pt {
1
+ class Wt {
2
2
  root;
3
3
  theme = "default";
4
4
  constructor(t) {
@@ -33,8 +33,8 @@ class Pt {
33
33
  if (!n) return !1;
34
34
  const o = n.children.findIndex((c) => c.id === t);
35
35
  if (o === -1) return !1;
36
- const a = i === "before" ? o : o + 1;
37
- return n.insertChild(e, a), !0;
36
+ const s = i === "before" ? o : o + 1;
37
+ return n.insertChild(e, s), !0;
38
38
  }
39
39
  insertParent(t, e) {
40
40
  const i = this.findNode(t);
@@ -64,8 +64,8 @@ class gt {
64
64
  isFolded;
65
65
  icon;
66
66
  customWidth;
67
- constructor(t, e, i = null, r = !1, n, o, a = !1, c, g, f) {
68
- this.id = t, this.topic = e, this.children = [], this.style = { fontSize: r ? "24px" : "16px" }, this.parentId = i, this.isRoot = r, this.image = n, this.imageSize = g, this.layoutSide = o, this.isFolded = a, this.icon = c, this.customWidth = f;
67
+ constructor(t, e, i = null, r = !1, n, o, s = !1, c, g, f) {
68
+ this.id = t, this.topic = e, this.children = [], this.style = { fontSize: r ? "24px" : "16px" }, this.parentId = i, this.isRoot = r, this.image = n, this.imageSize = g, this.layoutSide = o, this.isFolded = s, this.icon = c, this.customWidth = f;
69
69
  }
70
70
  addChild(t) {
71
71
  t.parentId = this.id, this.children.push(t);
@@ -80,7 +80,7 @@ class gt {
80
80
  this.topic = t;
81
81
  }
82
82
  }
83
- class Ft {
83
+ class Ut {
84
84
  past = [];
85
85
  future = [];
86
86
  maxHistorySize;
@@ -113,12 +113,12 @@ class Ft {
113
113
  this.past = [], this.future = [];
114
114
  }
115
115
  }
116
- class Wt {
116
+ class jt {
117
117
  mindMap;
118
118
  historyManager;
119
119
  idGenerator;
120
120
  constructor(t, e) {
121
- this.mindMap = t, this.historyManager = new Ft(10), this.idGenerator = e;
121
+ this.mindMap = t, this.historyManager = new Ut(10), this.idGenerator = e;
122
122
  }
123
123
  saveState() {
124
124
  this.historyManager.push(this.exportData());
@@ -148,7 +148,7 @@ class Wt {
148
148
  const n = this.mindMap.findNode(t);
149
149
  if (!n) return null;
150
150
  this.saveState();
151
- const o = this.idGenerator.generate(), a = i && r ? { width: i, height: r } : void 0, c = new gt(
151
+ const o = this.idGenerator.generate(), s = i && r ? { width: i, height: r } : void 0, c = new gt(
152
152
  o,
153
153
  "",
154
154
  t,
@@ -157,7 +157,7 @@ class Wt {
157
157
  void 0,
158
158
  !1,
159
159
  void 0,
160
- a
160
+ s
161
161
  );
162
162
  return n.addChild(c), c;
163
163
  }
@@ -226,10 +226,10 @@ class Wt {
226
226
  const g = this.mindMap.findNode(r.parentId);
227
227
  g && g.removeChild(r.id), r.parentId = o.id;
228
228
  } else r.parentId === o.id && o.removeChild(r.id);
229
- const a = o.children.findIndex((g) => g.id === e);
230
- if (a === -1)
229
+ const s = o.children.findIndex((g) => g.id === e);
230
+ if (s === -1)
231
231
  return o.addChild(r), !0;
232
- const c = i === "before" ? a : a + 1;
232
+ const c = i === "before" ? s : s + 1;
233
233
  return o.insertChild(r, c), o.isRoot && n.layoutSide && (r.layoutSide = n.layoutSide), !0;
234
234
  }
235
235
  insertNodeAsParent(t, e) {
@@ -247,8 +247,8 @@ class Wt {
247
247
  const c = this.mindMap.findNode(i.parentId);
248
248
  c && c.removeChild(i.id);
249
249
  }
250
- const a = n.children.findIndex((c) => c.id === e);
251
- return a === -1 ? !1 : (n.isRoot && r.layoutSide && (i.layoutSide = r.layoutSide), n.removeChild(e), n.insertChild(i, a), i.parentId = n.id, i.addChild(r), !0);
250
+ const s = n.children.findIndex((c) => c.id === e);
251
+ return s === -1 ? !1 : (n.isRoot && r.layoutSide && (i.layoutSide = r.layoutSide), n.removeChild(e), n.insertChild(i, s), i.parentId = n.id, i.addChild(r), !0);
252
252
  }
253
253
  insertParent(t, e = "New topic") {
254
254
  const i = this.mindMap.findNode(t);
@@ -339,8 +339,8 @@ class Wt {
339
339
  i.imageSize,
340
340
  i.customWidth
341
341
  );
342
- return i.style && (o.style = { ...i.style }), i.children && i.children.length > 0 && i.children.forEach((a) => {
343
- const c = e(a, o.id);
342
+ return i.style && (o.style = { ...i.style }), i.children && i.children.length > 0 && i.children.forEach((s) => {
343
+ const c = e(s, o.id);
344
344
  o.addChild(c);
345
345
  }), o;
346
346
  };
@@ -370,7 +370,7 @@ const Nt = {
370
370
  background: "var(--vscode-editor-background, transparent)"
371
371
  }
372
372
  }
373
- }, Ut = {
373
+ }, Ht = {
374
374
  name: "simple",
375
375
  isDark: !1,
376
376
  styles: {
@@ -393,7 +393,7 @@ const Nt = {
393
393
  background: "var(--vscode-editor-background, transparent)"
394
394
  }
395
395
  }
396
- }, Tt = [
396
+ }, At = [
397
397
  "#E74C3C",
398
398
  "#3498DB",
399
399
  "#2ECC71",
@@ -401,7 +401,7 @@ const Nt = {
401
401
  "#9B59B6",
402
402
  "#E67E22",
403
403
  "#1ABC9C"
404
- ], jt = {
404
+ ], Zt = {
405
405
  name: "colorful",
406
406
  isDark: !1,
407
407
  styles: {
@@ -425,8 +425,8 @@ const Nt = {
425
425
  background: "var(--vscode-editor-background, transparent)"
426
426
  }
427
427
  },
428
- getColor: (rt) => Tt[rt % Tt.length]
429
- }, Ht = {
428
+ getColor: (it) => At[it % At.length]
429
+ }, Xt = {
430
430
  name: "dark",
431
431
  isDark: !0,
432
432
  styles: {
@@ -455,7 +455,7 @@ class ct {
455
455
  themes = /* @__PURE__ */ new Map();
456
456
  currentTheme = Nt;
457
457
  constructor() {
458
- this.registerTheme(Nt), this.registerTheme(Ut), this.registerTheme(jt), this.registerTheme(Ht);
458
+ this.registerTheme(Nt), this.registerTheme(Ht), this.registerTheme(Zt), this.registerTheme(Xt);
459
459
  }
460
460
  static getInstance() {
461
461
  return ct.instance || (ct.instance = new ct()), ct.instance;
@@ -562,7 +562,7 @@ const It = {
562
562
  viewBox: "0 0 24 24"
563
563
  }
564
564
  };
565
- class Zt {
565
+ class Kt {
566
566
  container;
567
567
  svg;
568
568
  nodeContainer;
@@ -594,17 +594,17 @@ class Zt {
594
594
  if (t.isRoot) return "#333";
595
595
  let r = t;
596
596
  for (; r.parentId && r.parentId !== e.root.id; ) {
597
- const a = e.findNode(r.parentId);
598
- if (!a) break;
599
- r = a;
597
+ const s = e.findNode(r.parentId);
598
+ if (!s) break;
599
+ r = s;
600
600
  }
601
- const o = e.root.children.findIndex((a) => a.id === r.id);
601
+ const o = e.root.children.findIndex((s) => s.id === r.id);
602
602
  if (o !== -1)
603
603
  return i.getColor(o, 0);
604
604
  }
605
605
  return i.styles.connection.color;
606
606
  }
607
- renderNode(t, e, i, r, n, o, a = "right", c) {
607
+ renderNode(t, e, i, r, n, o, s = "right", c) {
608
608
  const g = ct.getInstance().getCurrentTheme(), f = document.createElement("div");
609
609
  if (f.dataset.id = t.id, f.style.position = "absolute", f.style.left = `${e}px`, f.style.top = `${i}px`, t.image) {
610
610
  const m = document.createElement("img");
@@ -628,7 +628,7 @@ class Zt {
628
628
  t.topic.split(u).forEach((C) => {
629
629
  if (C.match(u)) {
630
630
  const S = document.createElement("a");
631
- S.href = C, S.target = "_blank", S.rel = "noopener noreferrer", S.textContent = C, S.style.color = "#3498DB", S.style.textDecoration = "underline", S.style.cursor = "pointer", S.addEventListener("mousedown", (R) => R.stopPropagation()), S.addEventListener("click", (R) => R.stopPropagation()), m.appendChild(S);
631
+ S.href = C, S.target = "_blank", S.rel = "noopener noreferrer", S.textContent = C, S.style.color = "#3498DB", S.style.textDecoration = "underline", S.style.cursor = "pointer", S.addEventListener("mousedown", (M) => M.stopPropagation()), S.addEventListener("click", (M) => M.stopPropagation()), m.appendChild(S);
632
632
  } else
633
633
  m.appendChild(document.createTextNode(C));
634
634
  }), f.appendChild(m);
@@ -650,13 +650,13 @@ class Zt {
650
650
  f.style.borderRadius = "4px", t.isRoot && (f.style.fontSize = "1.2em", f.style.fontWeight = "bold", g.name !== "custom" && (f.style.border = "2px solid var(--vscode-editor-foreground, #333)")), t.style.color && (f.style.color = t.style.color), t.style.fontSize && (f.style.fontSize = t.style.fontSize), t.style.fontWeight && (f.style.fontWeight = t.style.fontWeight), t.style.fontStyle && (f.style.fontStyle = t.style.fontStyle), t.style.background ? f.style.backgroundColor = t.style.background : g.name === "custom" ? t.isRoot ? f.style.backgroundColor = "var(--mindmap-root-background, var(--vscode-editor-background, white))" : f.style.backgroundColor = "var(--mindmap-child-background, var(--vscode-editor-background, white))" : t.isRoot ? f.style.backgroundColor = "var(--mindmap-root-background)" : f.style.backgroundColor = "var(--mindmap-child-background)";
651
651
  const { width: p } = this.measureNode(t);
652
652
  let d = e;
653
- if (a === "left" && !o ? d = e - p : o && (d = e - p / 2), f.style.left = `${d}px`, f.style.top = `${i}px`, f.style.transform = "translate(0, -50%)", f.style.zIndex = "10", f.style.cursor = "default", f.style.userSelect = "none", t.id === r && (f.style.outline = "2px solid var(--vscode-focusBorder, #007bff)", f.style.boxShadow = "0 0 5px var(--vscode-focusBorder, rgba(0, 123, 255, 0.5))"), this.nodeContainer.appendChild(f), t.children.length === 0) return;
653
+ if (s === "left" && !o ? d = e - p : o && (d = e - p / 2), f.style.left = `${d}px`, f.style.top = `${i}px`, f.style.transform = "translate(0, -50%)", f.style.zIndex = "10", f.style.cursor = "default", f.style.userSelect = "none", t.id === r && (f.style.outline = "2px solid var(--vscode-focusBorder, #007bff)", f.style.boxShadow = "0 0 5px var(--vscode-focusBorder, rgba(0, 123, 255, 0.5))"), this.nodeContainer.appendChild(f), t.children.length === 0) return;
654
654
  if (this.options.onToggleFold) {
655
655
  const m = [];
656
656
  if (o && n === "Both")
657
657
  m.push(d + p), m.push(d);
658
658
  else {
659
- let u = a === "right";
659
+ let u = s === "right";
660
660
  o && (n === "Left" ? u = !1 : u = !0), m.push(u ? d + p : d);
661
661
  }
662
662
  m.forEach((u) => {
@@ -672,7 +672,7 @@ class Zt {
672
672
  let w = [], h = [];
673
673
  o && n === "Both" ? t.children.forEach((m, u) => {
674
674
  (m.layoutSide || (u % 2 === 0 ? "right" : "left")) === "right" ? w.push(m) : h.push(m);
675
- }) : n === "Left" ? h = t.children : n === "Right" ? w = t.children : a === "left" ? h = t.children : w = t.children, w.length > 0 && this.renderChildrenStack(
675
+ }) : n === "Left" ? h = t.children : n === "Right" ? w = t.children : s === "left" ? h = t.children : w = t.children, w.length > 0 && this.renderChildrenStack(
676
676
  t,
677
677
  w,
678
678
  e,
@@ -694,7 +694,7 @@ class Zt {
694
694
  c
695
695
  );
696
696
  }
697
- renderChildrenStack(t, e, i, r, n, o, a, c, g) {
697
+ renderChildrenStack(t, e, i, r, n, o, s, c, g) {
698
698
  const f = e.reduce(
699
699
  (w, h) => w + this.getNodeHeight(h, g),
700
700
  0
@@ -702,9 +702,9 @@ class Zt {
702
702
  let y = r - f / 2;
703
703
  const p = 80;
704
704
  let d = 0;
705
- t.isRoot ? d = a === "right" ? i + c / 2 : i - c / 2 : a === "right" ? d = i + c : (d = i, d = i - c), e.forEach((w) => {
706
- const h = this.getNodeHeight(w, g), m = y + h / 2, u = a === "right" ? d + p : d - p;
707
- this.renderNode(w, u, m, n, o, !1, a, g);
705
+ t.isRoot ? d = s === "right" ? i + c / 2 : i - c / 2 : s === "right" ? d = i + c : (d = i, d = i - c), e.forEach((w) => {
706
+ const h = this.getNodeHeight(w, g), m = y + h / 2, u = s === "right" ? d + p : d - p;
707
+ this.renderNode(w, u, m, n, o, !1, s, g);
708
708
  const v = g ? this.getThemeColor(w, g) : "#ccc";
709
709
  this.drawConnection(d, r, u, m, v, g?.theme), y += h;
710
710
  });
@@ -735,14 +735,14 @@ class Zt {
735
735
  r.textContent = t.topic, i.appendChild(r);
736
736
  const n = t.customWidth ?? (this.maxWidth !== -1 ? this.maxWidth : void 0);
737
737
  n !== void 0 ? (r.style.whiteSpace = "pre-wrap", r.style.wordWrap = "break-word", r.style.overflowWrap = "anywhere", r.style.minWidth = "0", i.style.maxWidth = `${n}px`, i.style.width = "max-content") : r.style.whiteSpace = "pre", i.style.padding = "8px 12px";
738
- const o = ct.getInstance().getCurrentTheme(), a = e ? this.getThemeColor(t, e) : "#ccc";
739
- o.name === "colorful" ? i.style.border = `2px solid ${a}` : o.name === "custom" ? t.isRoot ? i.style.border = "var(--mindmap-root-border, 2px solid #333)" : i.style.border = "var(--mindmap-child-border, 1px solid #ccc)" : t.isRoot ? i.style.border = "var(--mindmap-root-border)" : i.style.border = "var(--mindmap-child-border)", t.isRoot && (i.style.fontSize = "1.2em", i.style.fontWeight = "bold", o.name !== "custom" && (i.style.border = "2px solid var(--vscode-editor-foreground, #333)")), t.style.color && (i.style.color = t.style.color), t.style.fontSize && (i.style.fontSize = t.style.fontSize), t.style.fontWeight && (i.style.fontWeight = t.style.fontWeight), t.style.fontStyle && (i.style.fontStyle = t.style.fontStyle), t.style.background && (i.style.backgroundColor = t.style.background), this.nodeContainer.appendChild(i);
738
+ const o = ct.getInstance().getCurrentTheme(), s = e ? this.getThemeColor(t, e) : "#ccc";
739
+ o.name === "colorful" ? i.style.border = `2px solid ${s}` : o.name === "custom" ? t.isRoot ? i.style.border = "var(--mindmap-root-border, 2px solid #333)" : i.style.border = "var(--mindmap-child-border, 1px solid #ccc)" : t.isRoot ? i.style.border = "var(--mindmap-root-border)" : i.style.border = "var(--mindmap-child-border)", t.isRoot && (i.style.fontSize = "1.2em", i.style.fontWeight = "bold", o.name !== "custom" && (i.style.border = "2px solid var(--vscode-editor-foreground, #333)")), t.style.color && (i.style.color = t.style.color), t.style.fontSize && (i.style.fontSize = t.style.fontSize), t.style.fontWeight && (i.style.fontWeight = t.style.fontWeight), t.style.fontStyle && (i.style.fontStyle = t.style.fontStyle), t.style.background && (i.style.backgroundColor = t.style.background), this.nodeContainer.appendChild(i);
740
740
  const c = i.offsetWidth, g = i.offsetHeight;
741
741
  return this.nodeContainer.removeChild(i), { width: c || 100, height: g || 40 };
742
742
  }
743
743
  drawConnection(t, e, i, r, n = "#ccc", o = "default") {
744
- const a = document.createElementNS("http://www.w3.org/2000/svg", "path"), c = t + (i - t) / 2, g = t + (i - t) / 2, f = `M ${t} ${e} C ${c} ${e}, ${g} ${r}, ${i} ${r}`;
745
- a.setAttribute("d", f), o === "custom" ? a.style.stroke = `var(--mindmap-connection-color, ${n})` : (a.style.stroke = "var(--mindmap-connection-color, #ccc)", ct.getInstance().getCurrentTheme().name === "colorful" ? a.style.stroke = n : a.style.stroke = "var(--mindmap-connection-color)"), a.setAttribute("fill", "none"), a.setAttribute("stroke-width", "2"), this.svg.appendChild(a);
744
+ const s = document.createElementNS("http://www.w3.org/2000/svg", "path"), c = t + (i - t) / 2, g = t + (i - t) / 2, f = `M ${t} ${e} C ${c} ${e}, ${g} ${r}, ${i} ${r}`;
745
+ s.setAttribute("d", f), o === "custom" ? s.style.stroke = `var(--mindmap-connection-color, ${n})` : (s.style.stroke = "var(--mindmap-connection-color, #ccc)", ct.getInstance().getCurrentTheme().name === "colorful" ? s.style.stroke = n : s.style.stroke = "var(--mindmap-connection-color)"), s.setAttribute("fill", "none"), s.setAttribute("stroke-width", "2"), this.svg.appendChild(s);
746
746
  }
747
747
  showImageModal(t) {
748
748
  this.options.onImageZoom && this.options.onImageZoom(!0);
@@ -811,13 +811,13 @@ class yt {
811
811
  const f = o.classList.contains("active"), y = f ? "normal" : "bold";
812
812
  this.onUpdate(this.currentNodeId, { fontWeight: y }), this.updateButtonState(o, !f);
813
813
  }
814
- }), a = n("I", "fontStyle", () => {
814
+ }), s = n("I", "fontStyle", () => {
815
815
  if (this.currentNodeId && this.onUpdate) {
816
- const f = a.classList.contains("active"), y = f ? "normal" : "italic";
817
- this.onUpdate(this.currentNodeId, { fontStyle: y }), this.updateButtonState(a, !f);
816
+ const f = s.classList.contains("active"), y = f ? "normal" : "italic";
817
+ this.onUpdate(this.currentNodeId, { fontStyle: y }), this.updateButtonState(s, !f);
818
818
  }
819
819
  });
820
- e.appendChild(o), e.appendChild(a), t.appendChild(e);
820
+ e.appendChild(o), e.appendChild(s), t.appendChild(e);
821
821
  const c = document.createElement("div");
822
822
  c.style.display = "flex", c.style.gap = "4px", c.style.alignItems = "center", c.style.justifyContent = "space-between";
823
823
  const g = document.createElement("input");
@@ -847,14 +847,14 @@ class yt {
847
847
  r.value = n, this.updateActivePaletteItem(n);
848
848
  const o = this.editorEl.querySelectorAll("button")[0];
849
849
  this.updateButtonState(o, e.fontWeight === "bold");
850
- const a = this.editorEl.querySelectorAll("button")[1];
851
- this.updateButtonState(a, e.fontStyle === "italic");
850
+ const s = this.editorEl.querySelectorAll("button")[1];
851
+ this.updateButtonState(s, e.fontStyle === "italic");
852
852
  }
853
853
  hide() {
854
854
  this.editorEl.style.display = "none", this.currentNodeId = null;
855
855
  }
856
856
  }
857
- class Xt {
857
+ class Yt {
858
858
  container;
859
859
  element;
860
860
  options;
@@ -975,7 +975,7 @@ class Xt {
975
975
  </svg>`;
976
976
  }
977
977
  }
978
- const Kt = {
978
+ const Gt = {
979
979
  navUp: [{ key: "ArrowUp" }, { key: "k", ctrlKey: !1, metaKey: !1, altKey: !1 }],
980
980
  navDown: [{ key: "ArrowDown" }, { key: "j", ctrlKey: !1, metaKey: !1, altKey: !1 }],
981
981
  navLeft: [{ key: "ArrowLeft" }, { key: "h", ctrlKey: !1, metaKey: !1, altKey: !1 }],
@@ -1036,7 +1036,7 @@ const Kt = {
1036
1036
  increaseNodeWidth: [{ key: "ArrowRight", shiftKey: !0 }],
1037
1037
  decreaseNodeWidth: [{ key: "ArrowLeft", shiftKey: !0 }]
1038
1038
  };
1039
- class Yt {
1039
+ class $t {
1040
1040
  container;
1041
1041
  maxWidth;
1042
1042
  options;
@@ -1054,11 +1054,11 @@ class Yt {
1054
1054
  isNaN(f) || (n = f);
1055
1055
  }
1056
1056
  this.applyTextareaStyles(r, t, n);
1057
- const o = t.style.outline, a = t.style.boxShadow;
1057
+ const o = t.style.outline, s = t.style.boxShadow;
1058
1058
  t.style.outline = "none", t.style.boxShadow = "none";
1059
1059
  const c = this.createSizeUpdater(r, t, n);
1060
1060
  c(), r.addEventListener("input", c);
1061
- const g = this.createCleanupFunction(r, t, o, a);
1061
+ const g = this.createCleanupFunction(r, t, o, s);
1062
1062
  this.setupEditEventHandlers(r, e, i, g), t.parentElement ? t.parentElement.appendChild(r) : this.container.appendChild(r), r.focus({ preventScroll: !0 }), r.select();
1063
1063
  }
1064
1064
  /**
@@ -1075,8 +1075,8 @@ class Yt {
1075
1075
  const r = window.getComputedStyle(e);
1076
1076
  if (i !== -1) {
1077
1077
  t.style.whiteSpace = "pre-wrap", t.style.wordWrap = "break-word", t.style.overflowWrap = "anywhere";
1078
- const n = (parseFloat(r.paddingLeft) || 0) + (parseFloat(r.paddingRight) || 0), o = (parseFloat(r.borderLeftWidth) || 0) + (parseFloat(r.borderRightWidth) || 0), a = i + n + o;
1079
- t.style.maxWidth = `${a}px`, t.style.width = "max-content";
1078
+ const n = (parseFloat(r.paddingLeft) || 0) + (parseFloat(r.paddingRight) || 0), o = (parseFloat(r.borderLeftWidth) || 0) + (parseFloat(r.borderRightWidth) || 0), s = i + n + o;
1079
+ t.style.maxWidth = `${s}px`, t.style.width = "max-content";
1080
1080
  } else
1081
1081
  t.style.whiteSpace = "pre";
1082
1082
  t.style.font = r.font, t.style.padding = r.padding, t.style.boxSizing = "border-box", t.style.backgroundColor = r.backgroundColor, t.style.border = "none", t.style.outline = "none", t.style.boxShadow = "none", t.style.borderTop = r.borderTop, t.style.borderRight = r.borderRight, t.style.borderBottom = r.borderBottom, t.style.borderLeft = r.borderLeft, t.style.borderRadius = r.borderRadius, t.style.zIndex = "100";
@@ -1090,8 +1090,8 @@ class Yt {
1090
1090
  const n = document.createElement("span");
1091
1091
  n.style.font = r.font, n.style.padding = r.padding, i !== -1 ? (n.style.whiteSpace = "pre-wrap", n.style.wordWrap = "break-word", n.style.overflowWrap = "anywhere", n.style.maxWidth = `${i}px`, n.style.width = "max-content") : n.style.whiteSpace = "pre", n.style.visibility = "hidden", n.style.position = "absolute", n.textContent = t.value || "", (t.value.endsWith(`
1092
1092
  `) || t.value === "") && (n.textContent += "​"), document.body.appendChild(n);
1093
- const o = n.offsetWidth + 4, a = n.offsetHeight;
1094
- t.style.width = Math.max(o, e.offsetWidth) + "px", t.style.height = Math.max(a, e.offsetHeight) + "px", document.body.removeChild(n);
1093
+ const o = n.offsetWidth + 4, s = n.offsetHeight;
1094
+ t.style.width = Math.max(o, e.offsetWidth) + "px", t.style.height = Math.max(s, e.offsetHeight) + "px", document.body.removeChild(n);
1095
1095
  };
1096
1096
  }
1097
1097
  /**
@@ -1112,7 +1112,7 @@ class Yt {
1112
1112
  n = !0;
1113
1113
  const c = t.value;
1114
1114
  c !== i && this.options.onUpdateNode && this.options.onUpdateNode(e, c), r(), this.options.onEditEnd && this.options.onEditEnd(e);
1115
- }, a = () => {
1115
+ }, s = () => {
1116
1116
  n || (n = !0, r(), this.options.onEditEnd && this.options.onEditEnd(e));
1117
1117
  };
1118
1118
  t.addEventListener("blur", () => {
@@ -1123,11 +1123,11 @@ class Yt {
1123
1123
  if (c.shiftKey)
1124
1124
  return;
1125
1125
  c.preventDefault(), o();
1126
- } else c.key === "Escape" && (c.preventDefault(), a());
1126
+ } else c.key === "Escape" && (c.preventDefault(), s());
1127
1127
  });
1128
1128
  }
1129
1129
  }
1130
- class Gt {
1130
+ class Jt {
1131
1131
  container;
1132
1132
  options;
1133
1133
  draggedNodeId = null;
@@ -1211,11 +1211,11 @@ class Gt {
1211
1211
  });
1212
1212
  }
1213
1213
  getDropPosition(t, e) {
1214
- const i = e.getBoundingClientRect(), r = t.clientX - i.left, n = t.clientY - i.top, o = i.width, a = i.height;
1215
- return n < a * 0.25 ? "top" : n > a * 0.75 ? "bottom" : r < o * 0.25 ? "left" : (r > o * 0.75, "right");
1214
+ const i = e.getBoundingClientRect(), r = t.clientX - i.left, n = t.clientY - i.top, o = i.width, s = i.height;
1215
+ return n < s * 0.25 ? "top" : n > s * 0.75 ? "bottom" : r < o * 0.25 ? "left" : (r > o * 0.75, "right");
1216
1216
  }
1217
1217
  }
1218
- class $t {
1218
+ class Vt {
1219
1219
  shortcuts;
1220
1220
  constructor(t) {
1221
1221
  this.shortcuts = t;
@@ -1223,8 +1223,8 @@ class $t {
1223
1223
  matches(t, e) {
1224
1224
  const i = this.shortcuts[e];
1225
1225
  return i ? i.some((r) => {
1226
- const n = r.ctrlKey ?? !1, o = r.metaKey ?? !1, a = r.altKey ?? !1, c = r.shiftKey ?? !1;
1227
- return t.ctrlKey !== n || t.metaKey !== o || t.altKey !== a || t.shiftKey !== c ? !1 : r.key.toLowerCase() === t.key.toLowerCase();
1226
+ const n = r.ctrlKey ?? !1, o = r.metaKey ?? !1, s = r.altKey ?? !1, c = r.shiftKey ?? !1;
1227
+ return t.ctrlKey !== n || t.metaKey !== o || t.altKey !== s || t.shiftKey !== c ? !1 : r.key.toLowerCase() === t.key.toLowerCase();
1228
1228
  }) : !1;
1229
1229
  }
1230
1230
  getAction(t) {
@@ -1234,7 +1234,7 @@ class $t {
1234
1234
  return i;
1235
1235
  }
1236
1236
  }
1237
- class Jt {
1237
+ class qt {
1238
1238
  container;
1239
1239
  options;
1240
1240
  maxWidth = -1;
@@ -1249,7 +1249,7 @@ class Jt {
1249
1249
  shortcutManager;
1250
1250
  cleanupFns = [];
1251
1251
  constructor(t, e) {
1252
- this.container = t, this.container.tabIndex = 0, this.container.style.outline = "none", this.container.style.cursor = "default", this.options = e, this.shortcuts = { ...Kt, ...e.shortcuts }, this.nodeEditor = new Yt(t, this.maxWidth, e), this.nodeDragger = new Gt(t, e), this.shortcutManager = new $t(this.shortcuts), this.isReadOnly = !!e.allowReadOnly, this.nodeDragger.setReadOnly(this.isReadOnly), this.attachEvents();
1252
+ this.container = t, this.container.tabIndex = 0, this.container.style.outline = "none", this.container.style.cursor = "default", this.options = e, this.shortcuts = { ...Gt, ...e.shortcuts }, this.nodeEditor = new $t(t, this.maxWidth, e), this.nodeDragger = new Jt(t, e), this.shortcutManager = new Vt(this.shortcuts), this.isReadOnly = !!e.allowReadOnly, this.nodeDragger.setReadOnly(this.isReadOnly), this.attachEvents();
1253
1253
  }
1254
1254
  getShortcuts() {
1255
1255
  return this.shortcuts;
@@ -1264,9 +1264,9 @@ class Jt {
1264
1264
  this.selectedNodeId = t;
1265
1265
  }
1266
1266
  attachEvents() {
1267
- const t = (r, n, o, a) => {
1268
- r.addEventListener(n, o, a), this.cleanupFns.push(() => {
1269
- typeof r.removeEventListener == "function" && r.removeEventListener(n, o, a);
1267
+ const t = (r, n, o, s) => {
1268
+ r.addEventListener(n, o, s), this.cleanupFns.push(() => {
1269
+ typeof r.removeEventListener == "function" && r.removeEventListener(n, o, s);
1270
1270
  });
1271
1271
  };
1272
1272
  t(this.container, "focus", () => {
@@ -1282,8 +1282,8 @@ class Jt {
1282
1282
  }), t(window, "mousemove", (r) => {
1283
1283
  const n = r;
1284
1284
  if (this.isPanning) {
1285
- const o = n.clientX - this.lastMouseX, a = n.clientY - this.lastMouseY;
1286
- this.lastMouseX = n.clientX, this.lastMouseY = n.clientY, this.options.onPan && this.options.onPan(o, a);
1285
+ const o = n.clientX - this.lastMouseX, s = n.clientY - this.lastMouseY;
1286
+ this.lastMouseX = n.clientX, this.lastMouseY = n.clientY, this.options.onPan && this.options.onPan(o, s);
1287
1287
  }
1288
1288
  });
1289
1289
  const e = () => {
@@ -1300,8 +1300,8 @@ class Jt {
1300
1300
  }
1301
1301
  let o = 1;
1302
1302
  n.deltaMode === 1 ? o = 33 : n.deltaMode === 2 && (o = window.innerHeight);
1303
- const a = -n.deltaX * o, c = -n.deltaY * o;
1304
- this.options.onPan && this.options.onPan(a, c);
1303
+ const s = -n.deltaX * o, c = -n.deltaY * o;
1304
+ this.options.onPan && this.options.onPan(s, c);
1305
1305
  },
1306
1306
  { passive: !1 }
1307
1307
  ), t(document, "keydown", (r) => {
@@ -1339,7 +1339,7 @@ class Jt {
1339
1339
  this.options.onPasteNode?.(this.selectedNodeId);
1340
1340
  return;
1341
1341
  }
1342
- let a = !1;
1342
+ let s = !1;
1343
1343
  for (const c of o)
1344
1344
  if (c.type.startsWith("image/")) {
1345
1345
  const g = c.getAsFile();
@@ -1359,10 +1359,10 @@ class Jt {
1359
1359
  }
1360
1360
  }, f.readAsDataURL(g);
1361
1361
  }
1362
- n.preventDefault(), a = !0;
1362
+ n.preventDefault(), s = !0;
1363
1363
  break;
1364
1364
  }
1365
- a || this.options.onPasteNode?.(this.selectedNodeId);
1365
+ s || this.options.onPasteNode?.(this.selectedNodeId);
1366
1366
  });
1367
1367
  const i = (r, n, o) => t(r, n, o);
1368
1368
  i(
@@ -1512,7 +1512,7 @@ class Jt {
1512
1512
  }
1513
1513
  }
1514
1514
  }
1515
- class Vt {
1515
+ class Qt {
1516
1516
  container;
1517
1517
  overlay;
1518
1518
  paletteEl;
@@ -1577,22 +1577,22 @@ class Vt {
1577
1577
  const n = r.target.value;
1578
1578
  if (this.mode === "menu") {
1579
1579
  const o = this.MENU_COMMANDS.filter(
1580
- (a) => a.topic.toLowerCase().includes(n.toLowerCase())
1580
+ (s) => s.topic.toLowerCase().includes(n.toLowerCase())
1581
1581
  );
1582
1582
  this.renderList(o);
1583
1583
  } else if (this.mode === "import") {
1584
1584
  const o = this.IMPORT_COMMANDS.filter(
1585
- (a) => a.topic.toLowerCase().includes(n.toLowerCase())
1585
+ (s) => s.topic.toLowerCase().includes(n.toLowerCase())
1586
1586
  );
1587
1587
  this.renderList(o);
1588
1588
  } else if (this.mode === "export") {
1589
1589
  const o = this.EXPORT_COMMANDS.filter(
1590
- (a) => a.topic.toLowerCase().includes(n.toLowerCase())
1590
+ (s) => s.topic.toLowerCase().includes(n.toLowerCase())
1591
1591
  );
1592
1592
  this.renderList(o);
1593
1593
  } else if (this.mode === "icon") {
1594
1594
  const o = this.ICON_LIST.filter(
1595
- (a) => a.topic.toLowerCase().includes(n.toLowerCase())
1595
+ (s) => s.topic.toLowerCase().includes(n.toLowerCase())
1596
1596
  );
1597
1597
  this.renderList(o);
1598
1598
  } else
@@ -1629,8 +1629,8 @@ class Vt {
1629
1629
  r.style.display = "flex", r.style.alignItems = "center";
1630
1630
  const n = It[e.id];
1631
1631
  if (n) {
1632
- const a = document.createElement("div");
1633
- a.style.width = "20px", a.style.height = "20px", a.style.marginRight = "8px", a.style.flexShrink = "0", a.innerHTML = `<svg viewBox="${n.viewBox}" width="20" height="20">${n.path}</svg>`, r.appendChild(a);
1632
+ const s = document.createElement("div");
1633
+ s.style.width = "20px", s.style.height = "20px", s.style.marginRight = "8px", s.style.flexShrink = "0", s.innerHTML = `<svg viewBox="${n.viewBox}" width="20" height="20">${n.path}</svg>`, r.appendChild(s);
1634
1634
  }
1635
1635
  const o = document.createElement("span");
1636
1636
  o.textContent = e.topic, r.appendChild(o);
@@ -1680,18 +1680,18 @@ class Vt {
1680
1680
  }
1681
1681
  }
1682
1682
  var kt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1683
- function qt(rt) {
1684
- return rt && rt.__esModule && Object.prototype.hasOwnProperty.call(rt, "default") ? rt.default : rt;
1683
+ function te(it) {
1684
+ return it && it.__esModule && Object.prototype.hasOwnProperty.call(it, "default") ? it.default : it;
1685
1685
  }
1686
- function St(rt) {
1687
- throw new Error('Could not dynamically require "' + rt + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
1686
+ function St(it) {
1687
+ throw new Error('Could not dynamically require "' + it + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
1688
1688
  }
1689
1689
  var Et = { exports: {} };
1690
- var Bt;
1691
- function Qt() {
1692
- return Bt || (Bt = 1, (function(rt, t) {
1690
+ var Tt;
1691
+ function ee() {
1692
+ return Tt || (Tt = 1, (function(it, t) {
1693
1693
  (function(e) {
1694
- rt.exports = e();
1694
+ it.exports = e();
1695
1695
  })(function() {
1696
1696
  return (function e(i, r, n) {
1697
1697
  function o(g, f) {
@@ -1699,7 +1699,7 @@ function Qt() {
1699
1699
  if (!i[g]) {
1700
1700
  var y = typeof St == "function" && St;
1701
1701
  if (!f && y) return y(g, !0);
1702
- if (a) return a(g, !0);
1702
+ if (s) return s(g, !0);
1703
1703
  var p = new Error("Cannot find module '" + g + "'");
1704
1704
  throw p.code = "MODULE_NOT_FOUND", p;
1705
1705
  }
@@ -1711,23 +1711,23 @@ function Qt() {
1711
1711
  }
1712
1712
  return r[g].exports;
1713
1713
  }
1714
- for (var a = typeof St == "function" && St, c = 0; c < n.length; c++) o(n[c]);
1714
+ for (var s = typeof St == "function" && St, c = 0; c < n.length; c++) o(n[c]);
1715
1715
  return o;
1716
1716
  })({ 1: [function(e, i, r) {
1717
- var n = e("./utils"), o = e("./support"), a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
1717
+ var n = e("./utils"), o = e("./support"), s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
1718
1718
  r.encode = function(c) {
1719
- for (var g, f, y, p, d, w, h, m = [], u = 0, v = c.length, k = v, C = n.getTypeOf(c) !== "string"; u < c.length; ) k = v - u, y = C ? (g = c[u++], f = u < v ? c[u++] : 0, u < v ? c[u++] : 0) : (g = c.charCodeAt(u++), f = u < v ? c.charCodeAt(u++) : 0, u < v ? c.charCodeAt(u++) : 0), p = g >> 2, d = (3 & g) << 4 | f >> 4, w = 1 < k ? (15 & f) << 2 | y >> 6 : 64, h = 2 < k ? 63 & y : 64, m.push(a.charAt(p) + a.charAt(d) + a.charAt(w) + a.charAt(h));
1719
+ for (var g, f, y, p, d, w, h, m = [], u = 0, v = c.length, k = v, C = n.getTypeOf(c) !== "string"; u < c.length; ) k = v - u, y = C ? (g = c[u++], f = u < v ? c[u++] : 0, u < v ? c[u++] : 0) : (g = c.charCodeAt(u++), f = u < v ? c.charCodeAt(u++) : 0, u < v ? c.charCodeAt(u++) : 0), p = g >> 2, d = (3 & g) << 4 | f >> 4, w = 1 < k ? (15 & f) << 2 | y >> 6 : 64, h = 2 < k ? 63 & y : 64, m.push(s.charAt(p) + s.charAt(d) + s.charAt(w) + s.charAt(h));
1720
1720
  return m.join("");
1721
1721
  }, r.decode = function(c) {
1722
1722
  var g, f, y, p, d, w, h = 0, m = 0, u = "data:";
1723
1723
  if (c.substr(0, u.length) === u) throw new Error("Invalid base64 input, it looks like a data url.");
1724
1724
  var v, k = 3 * (c = c.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
1725
- if (c.charAt(c.length - 1) === a.charAt(64) && k--, c.charAt(c.length - 2) === a.charAt(64) && k--, k % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
1726
- for (v = o.uint8array ? new Uint8Array(0 | k) : new Array(0 | k); h < c.length; ) g = a.indexOf(c.charAt(h++)) << 2 | (p = a.indexOf(c.charAt(h++))) >> 4, f = (15 & p) << 4 | (d = a.indexOf(c.charAt(h++))) >> 2, y = (3 & d) << 6 | (w = a.indexOf(c.charAt(h++))), v[m++] = g, d !== 64 && (v[m++] = f), w !== 64 && (v[m++] = y);
1725
+ if (c.charAt(c.length - 1) === s.charAt(64) && k--, c.charAt(c.length - 2) === s.charAt(64) && k--, k % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
1726
+ for (v = o.uint8array ? new Uint8Array(0 | k) : new Array(0 | k); h < c.length; ) g = s.indexOf(c.charAt(h++)) << 2 | (p = s.indexOf(c.charAt(h++))) >> 4, f = (15 & p) << 4 | (d = s.indexOf(c.charAt(h++))) >> 2, y = (3 & d) << 6 | (w = s.indexOf(c.charAt(h++))), v[m++] = g, d !== 64 && (v[m++] = f), w !== 64 && (v[m++] = y);
1727
1727
  return v;
1728
1728
  };
1729
1729
  }, { "./support": 30, "./utils": 32 }], 2: [function(e, i, r) {
1730
- var n = e("./external"), o = e("./stream/DataWorker"), a = e("./stream/Crc32Probe"), c = e("./stream/DataLengthProbe");
1730
+ var n = e("./external"), o = e("./stream/DataWorker"), s = e("./stream/Crc32Probe"), c = e("./stream/DataLengthProbe");
1731
1731
  function g(f, y, p, d, w) {
1732
1732
  this.compressedSize = f, this.uncompressedSize = y, this.crc32 = p, this.compression = d, this.compressedContent = w;
1733
1733
  }
@@ -1739,7 +1739,7 @@ function Qt() {
1739
1739
  }, getCompressedWorker: function() {
1740
1740
  return new o(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
1741
1741
  } }, g.createWorkerFrom = function(f, y, p) {
1742
- return f.pipe(new a()).pipe(new c("uncompressedSize")).pipe(y.compressWorker(p)).pipe(new c("compressedSize")).withStreamInfo("compression", y);
1742
+ return f.pipe(new s()).pipe(new c("uncompressedSize")).pipe(y.compressWorker(p)).pipe(new c("compressedSize")).withStreamInfo("compression", y);
1743
1743
  }, i.exports = g;
1744
1744
  }, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(e, i, r) {
1745
1745
  var n = e("./stream/GenericWorker");
@@ -1750,25 +1750,25 @@ function Qt() {
1750
1750
  } }, r.DEFLATE = e("./flate");
1751
1751
  }, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(e, i, r) {
1752
1752
  var n = e("./utils"), o = (function() {
1753
- for (var a, c = [], g = 0; g < 256; g++) {
1754
- a = g;
1755
- for (var f = 0; f < 8; f++) a = 1 & a ? 3988292384 ^ a >>> 1 : a >>> 1;
1756
- c[g] = a;
1753
+ for (var s, c = [], g = 0; g < 256; g++) {
1754
+ s = g;
1755
+ for (var f = 0; f < 8; f++) s = 1 & s ? 3988292384 ^ s >>> 1 : s >>> 1;
1756
+ c[g] = s;
1757
1757
  }
1758
1758
  return c;
1759
1759
  })();
1760
- i.exports = function(a, c) {
1761
- return a !== void 0 && a.length ? n.getTypeOf(a) !== "string" ? (function(g, f, y, p) {
1760
+ i.exports = function(s, c) {
1761
+ return s !== void 0 && s.length ? n.getTypeOf(s) !== "string" ? (function(g, f, y, p) {
1762
1762
  var d = o, w = p + y;
1763
1763
  g ^= -1;
1764
1764
  for (var h = p; h < w; h++) g = g >>> 8 ^ d[255 & (g ^ f[h])];
1765
1765
  return -1 ^ g;
1766
- })(0 | c, a, a.length, 0) : (function(g, f, y, p) {
1766
+ })(0 | c, s, s.length, 0) : (function(g, f, y, p) {
1767
1767
  var d = o, w = p + y;
1768
1768
  g ^= -1;
1769
1769
  for (var h = p; h < w; h++) g = g >>> 8 ^ d[255 & (g ^ f.charCodeAt(h))];
1770
1770
  return -1 ^ g;
1771
- })(0 | c, a, a.length, 0) : 0;
1771
+ })(0 | c, s, s.length, 0) : 0;
1772
1772
  };
1773
1773
  }, { "./utils": 32 }], 5: [function(e, i, r) {
1774
1774
  r.base64 = !1, r.binary = !1, r.dir = !1, r.createFolders = !0, r.date = null, r.compression = null, r.compressionOptions = null, r.comment = null, r.unixPermissions = null, r.dosPermissions = null;
@@ -1776,12 +1776,12 @@ function Qt() {
1776
1776
  var n = null;
1777
1777
  n = typeof Promise < "u" ? Promise : e("lie"), i.exports = { Promise: n };
1778
1778
  }, { lie: 37 }], 7: [function(e, i, r) {
1779
- var n = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", o = e("pako"), a = e("./utils"), c = e("./stream/GenericWorker"), g = n ? "uint8array" : "array";
1779
+ var n = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", o = e("pako"), s = e("./utils"), c = e("./stream/GenericWorker"), g = n ? "uint8array" : "array";
1780
1780
  function f(y, p) {
1781
1781
  c.call(this, "FlateWorker/" + y), this._pako = null, this._pakoAction = y, this._pakoOptions = p, this.meta = {};
1782
1782
  }
1783
- r.magic = "\b\0", a.inherits(f, c), f.prototype.processChunk = function(y) {
1784
- this.meta = y.meta, this._pako === null && this._createPako(), this._pako.push(a.transformTo(g, y.data), !1);
1783
+ r.magic = "\b\0", s.inherits(f, c), f.prototype.processChunk = function(y) {
1784
+ this.meta = y.meta, this._pako === null && this._createPako(), this._pako.push(s.transformTo(g, y.data), !1);
1785
1785
  }, f.prototype.flush = function() {
1786
1786
  c.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
1787
1787
  }, f.prototype.cleanUp = function() {
@@ -1804,26 +1804,26 @@ function Qt() {
1804
1804
  return m;
1805
1805
  }
1806
1806
  function o(d, w, h, m, u, v) {
1807
- var k, C, S = d.file, R = d.compression, T = v !== g.utf8encode, F = a.transformTo("string", v(S.name)), B = a.transformTo("string", g.utf8encode(S.name)), H = S.comment, K = a.transformTo("string", v(H)), x = a.transformTo("string", g.utf8encode(H)), D = B.length !== S.name.length, l = x.length !== H.length, M = "", V = "", W = "", Q = S.dir, U = S.date, q = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
1807
+ var k, C, S = d.file, M = d.compression, A = v !== g.utf8encode, F = s.transformTo("string", v(S.name)), T = s.transformTo("string", g.utf8encode(S.name)), H = S.comment, K = s.transformTo("string", v(H)), x = s.transformTo("string", g.utf8encode(H)), D = T.length !== S.name.length, l = x.length !== H.length, R = "", V = "", W = "", Q = S.dir, U = S.date, q = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
1808
1808
  w && !h || (q.crc32 = d.crc32, q.compressedSize = d.compressedSize, q.uncompressedSize = d.uncompressedSize);
1809
1809
  var z = 0;
1810
- w && (z |= 8), T || !D && !l || (z |= 2048);
1810
+ w && (z |= 8), A || !D && !l || (z |= 2048);
1811
1811
  var I = 0, J = 0;
1812
1812
  Q && (I |= 16), u === "UNIX" ? (J = 798, I |= (function(X, ot) {
1813
1813
  var dt = X;
1814
1814
  return X || (dt = ot ? 16893 : 33204), (65535 & dt) << 16;
1815
1815
  })(S.unixPermissions, Q)) : (J = 20, I |= (function(X) {
1816
1816
  return 63 & (X || 0);
1817
- })(S.dosPermissions)), k = U.getUTCHours(), k <<= 6, k |= U.getUTCMinutes(), k <<= 5, k |= U.getUTCSeconds() / 2, C = U.getUTCFullYear() - 1980, C <<= 4, C |= U.getUTCMonth() + 1, C <<= 5, C |= U.getUTCDate(), D && (V = n(1, 1) + n(f(F), 4) + B, M += "up" + n(V.length, 2) + V), l && (W = n(1, 1) + n(f(K), 4) + x, M += "uc" + n(W.length, 2) + W);
1817
+ })(S.dosPermissions)), k = U.getUTCHours(), k <<= 6, k |= U.getUTCMinutes(), k <<= 5, k |= U.getUTCSeconds() / 2, C = U.getUTCFullYear() - 1980, C <<= 4, C |= U.getUTCMonth() + 1, C <<= 5, C |= U.getUTCDate(), D && (V = n(1, 1) + n(f(F), 4) + T, R += "up" + n(V.length, 2) + V), l && (W = n(1, 1) + n(f(K), 4) + x, R += "uc" + n(W.length, 2) + W);
1818
1818
  var Y = "";
1819
1819
  return Y += `
1820
- \0`, Y += n(z, 2), Y += R.magic, Y += n(k, 2), Y += n(C, 2), Y += n(q.crc32, 4), Y += n(q.compressedSize, 4), Y += n(q.uncompressedSize, 4), Y += n(F.length, 2), Y += n(M.length, 2), { fileRecord: y.LOCAL_FILE_HEADER + Y + F + M, dirRecord: y.CENTRAL_FILE_HEADER + n(J, 2) + Y + n(K.length, 2) + "\0\0\0\0" + n(I, 4) + n(m, 4) + F + M + K };
1820
+ \0`, Y += n(z, 2), Y += M.magic, Y += n(k, 2), Y += n(C, 2), Y += n(q.crc32, 4), Y += n(q.compressedSize, 4), Y += n(q.uncompressedSize, 4), Y += n(F.length, 2), Y += n(R.length, 2), { fileRecord: y.LOCAL_FILE_HEADER + Y + F + R, dirRecord: y.CENTRAL_FILE_HEADER + n(J, 2) + Y + n(K.length, 2) + "\0\0\0\0" + n(I, 4) + n(m, 4) + F + R + K };
1821
1821
  }
1822
- var a = e("../utils"), c = e("../stream/GenericWorker"), g = e("../utf8"), f = e("../crc32"), y = e("../signature");
1822
+ var s = e("../utils"), c = e("../stream/GenericWorker"), g = e("../utf8"), f = e("../crc32"), y = e("../signature");
1823
1823
  function p(d, w, h, m) {
1824
1824
  c.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = w, this.zipPlatform = h, this.encodeFileName = m, this.streamFiles = d, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
1825
1825
  }
1826
- a.inherits(p, c), p.prototype.push = function(d) {
1826
+ s.inherits(p, c), p.prototype.push = function(d) {
1827
1827
  var w = d.meta.percent || 0, h = this.entriesCount, m = this._sources.length;
1828
1828
  this.accumulate ? this.contentBuffer.push(d) : (this.bytesWritten += d.data.length, c.prototype.push.call(this, { data: d.data, meta: { currentFile: this.currentFile, percent: h ? (w + 100 * (h - m - 1)) / h : 100 } }));
1829
1829
  }, p.prototype.openedSource = function(d) {
@@ -1844,8 +1844,8 @@ function Qt() {
1844
1844
  }, p.prototype.flush = function() {
1845
1845
  for (var d = this.bytesWritten, w = 0; w < this.dirRecords.length; w++) this.push({ data: this.dirRecords[w], meta: { percent: 100 } });
1846
1846
  var h = this.bytesWritten - d, m = (function(u, v, k, C, S) {
1847
- var R = a.transformTo("string", S(C));
1848
- return y.CENTRAL_DIRECTORY_END + "\0\0\0\0" + n(u, 2) + n(u, 2) + n(v, 4) + n(k, 4) + n(R.length, 2) + R;
1847
+ var M = s.transformTo("string", S(C));
1848
+ return y.CENTRAL_DIRECTORY_END + "\0\0\0\0" + n(u, 2) + n(u, 2) + n(v, 4) + n(k, 4) + n(M.length, 2) + M;
1849
1849
  })(this.dirRecords.length, h, d, this.zipComment, this.encodeFileName);
1850
1850
  this.push({ data: m, meta: { percent: 100 } });
1851
1851
  }, p.prototype.prepareNextSource = function() {
@@ -1876,10 +1876,10 @@ function Qt() {
1876
1876
  }, i.exports = p;
1877
1877
  }, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(e, i, r) {
1878
1878
  var n = e("../compressions"), o = e("./ZipFileWorker");
1879
- r.generateWorker = function(a, c, g) {
1879
+ r.generateWorker = function(s, c, g) {
1880
1880
  var f = new o(c.streamFiles, g, c.platform, c.encodeFileName), y = 0;
1881
1881
  try {
1882
- a.forEach(function(p, d) {
1882
+ s.forEach(function(p, d) {
1883
1883
  y++;
1884
1884
  var w = (function(v, k) {
1885
1885
  var C = v || k, S = n[C];
@@ -1899,15 +1899,15 @@ function Qt() {
1899
1899
  if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
1900
1900
  this.files = /* @__PURE__ */ Object.create(null), this.comment = null, this.root = "", this.clone = function() {
1901
1901
  var o = new n();
1902
- for (var a in this) typeof this[a] != "function" && (o[a] = this[a]);
1902
+ for (var s in this) typeof this[s] != "function" && (o[s] = this[s]);
1903
1903
  return o;
1904
1904
  };
1905
1905
  }
1906
- (n.prototype = e("./object")).loadAsync = e("./load"), n.support = e("./support"), n.defaults = e("./defaults"), n.version = "3.10.1", n.loadAsync = function(o, a) {
1907
- return new n().loadAsync(o, a);
1906
+ (n.prototype = e("./object")).loadAsync = e("./load"), n.support = e("./support"), n.defaults = e("./defaults"), n.version = "3.10.1", n.loadAsync = function(o, s) {
1907
+ return new n().loadAsync(o, s);
1908
1908
  }, n.external = e("./external"), i.exports = n;
1909
1909
  }, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(e, i, r) {
1910
- var n = e("./utils"), o = e("./external"), a = e("./utf8"), c = e("./zipEntries"), g = e("./stream/Crc32Probe"), f = e("./nodejsUtils");
1910
+ var n = e("./utils"), o = e("./external"), s = e("./utf8"), c = e("./zipEntries"), g = e("./stream/Crc32Probe"), f = e("./nodejsUtils");
1911
1911
  function y(p) {
1912
1912
  return new o.Promise(function(d, w) {
1913
1913
  var h = p.decompressed.getContentWorker().pipe(new g());
@@ -1920,7 +1920,7 @@ function Qt() {
1920
1920
  }
1921
1921
  i.exports = function(p, d) {
1922
1922
  var w = this;
1923
- return d = n.extend(d || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: a.utf8decode }), f.isNode && f.isStream(p) ? o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : n.prepareContent("the loaded zip file", p, !0, d.optimizedBinaryString, d.base64).then(function(h) {
1923
+ return d = n.extend(d || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: s.utf8decode }), f.isNode && f.isStream(p) ? o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : n.prepareContent("the loaded zip file", p, !0, d.optimizedBinaryString, d.base64).then(function(h) {
1924
1924
  var m = new c(d);
1925
1925
  return m.load(h), m;
1926
1926
  }).then(function(h) {
@@ -1937,10 +1937,10 @@ function Qt() {
1937
1937
  };
1938
1938
  }, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(e, i, r) {
1939
1939
  var n = e("../utils"), o = e("../stream/GenericWorker");
1940
- function a(c, g) {
1940
+ function s(c, g) {
1941
1941
  o.call(this, "Nodejs stream input adapter for " + c), this._upstreamEnded = !1, this._bindStream(g);
1942
1942
  }
1943
- n.inherits(a, o), a.prototype._bindStream = function(c) {
1943
+ n.inherits(s, o), s.prototype._bindStream = function(c) {
1944
1944
  var g = this;
1945
1945
  (this._stream = c).pause(), c.on("data", function(f) {
1946
1946
  g.push({ data: f, meta: { percent: 0 } });
@@ -1949,17 +1949,17 @@ function Qt() {
1949
1949
  }).on("end", function() {
1950
1950
  g.isPaused ? g._upstreamEnded = !0 : g.end();
1951
1951
  });
1952
- }, a.prototype.pause = function() {
1952
+ }, s.prototype.pause = function() {
1953
1953
  return !!o.prototype.pause.call(this) && (this._stream.pause(), !0);
1954
- }, a.prototype.resume = function() {
1954
+ }, s.prototype.resume = function() {
1955
1955
  return !!o.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
1956
- }, i.exports = a;
1956
+ }, i.exports = s;
1957
1957
  }, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(e, i, r) {
1958
1958
  var n = e("readable-stream").Readable;
1959
- function o(a, c, g) {
1960
- n.call(this, c), this._helper = a;
1959
+ function o(s, c, g) {
1960
+ n.call(this, c), this._helper = s;
1961
1961
  var f = this;
1962
- a.on("data", function(y, p) {
1962
+ s.on("data", function(y, p) {
1963
1963
  f.push(y) || f._helper.pause(), g && g(p);
1964
1964
  }).on("error", function(y) {
1965
1965
  f.emit("error", y);
@@ -1985,24 +1985,24 @@ function Qt() {
1985
1985
  return n && typeof n.on == "function" && typeof n.pause == "function" && typeof n.resume == "function";
1986
1986
  } };
1987
1987
  }, {}], 15: [function(e, i, r) {
1988
- function n(S, R, T) {
1989
- var F, B = a.getTypeOf(R), H = a.extend(T || {}, f);
1988
+ function n(S, M, A) {
1989
+ var F, T = s.getTypeOf(M), H = s.extend(A || {}, f);
1990
1990
  H.date = H.date || /* @__PURE__ */ new Date(), H.compression !== null && (H.compression = H.compression.toUpperCase()), typeof H.unixPermissions == "string" && (H.unixPermissions = parseInt(H.unixPermissions, 8)), H.unixPermissions && 16384 & H.unixPermissions && (H.dir = !0), H.dosPermissions && 16 & H.dosPermissions && (H.dir = !0), H.dir && (S = u(S)), H.createFolders && (F = m(S)) && v.call(this, F, !0);
1991
- var K = B === "string" && H.binary === !1 && H.base64 === !1;
1992
- T && T.binary !== void 0 || (H.binary = !K), (R instanceof y && R.uncompressedSize === 0 || H.dir || !R || R.length === 0) && (H.base64 = !1, H.binary = !0, R = "", H.compression = "STORE", B = "string");
1991
+ var K = T === "string" && H.binary === !1 && H.base64 === !1;
1992
+ A && A.binary !== void 0 || (H.binary = !K), (M instanceof y && M.uncompressedSize === 0 || H.dir || !M || M.length === 0) && (H.base64 = !1, H.binary = !0, M = "", H.compression = "STORE", T = "string");
1993
1993
  var x = null;
1994
- x = R instanceof y || R instanceof c ? R : w.isNode && w.isStream(R) ? new h(S, R) : a.prepareContent(S, R, H.binary, H.optimizedBinaryString, H.base64);
1994
+ x = M instanceof y || M instanceof c ? M : w.isNode && w.isStream(M) ? new h(S, M) : s.prepareContent(S, M, H.binary, H.optimizedBinaryString, H.base64);
1995
1995
  var D = new p(S, x, H);
1996
1996
  this.files[S] = D;
1997
1997
  }
1998
- var o = e("./utf8"), a = e("./utils"), c = e("./stream/GenericWorker"), g = e("./stream/StreamHelper"), f = e("./defaults"), y = e("./compressedObject"), p = e("./zipObject"), d = e("./generate"), w = e("./nodejsUtils"), h = e("./nodejs/NodejsStreamInputAdapter"), m = function(S) {
1998
+ var o = e("./utf8"), s = e("./utils"), c = e("./stream/GenericWorker"), g = e("./stream/StreamHelper"), f = e("./defaults"), y = e("./compressedObject"), p = e("./zipObject"), d = e("./generate"), w = e("./nodejsUtils"), h = e("./nodejs/NodejsStreamInputAdapter"), m = function(S) {
1999
1999
  S.slice(-1) === "/" && (S = S.substring(0, S.length - 1));
2000
- var R = S.lastIndexOf("/");
2001
- return 0 < R ? S.substring(0, R) : "";
2000
+ var M = S.lastIndexOf("/");
2001
+ return 0 < M ? S.substring(0, M) : "";
2002
2002
  }, u = function(S) {
2003
2003
  return S.slice(-1) !== "/" && (S += "/"), S;
2004
- }, v = function(S, R) {
2005
- return R = R !== void 0 ? R : f.createFolders, S = u(S), this.files[S] || n.call(this, S, null, { dir: !0, createFolders: R }), this.files[S];
2004
+ }, v = function(S, M) {
2005
+ return M = M !== void 0 ? M : f.createFolders, S = u(S), this.files[S] || n.call(this, S, null, { dir: !0, createFolders: M }), this.files[S];
2006
2006
  };
2007
2007
  function k(S) {
2008
2008
  return Object.prototype.toString.call(S) === "[object RegExp]";
@@ -2010,180 +2010,180 @@ function Qt() {
2010
2010
  var C = { load: function() {
2011
2011
  throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
2012
2012
  }, forEach: function(S) {
2013
- var R, T, F;
2014
- for (R in this.files) F = this.files[R], (T = R.slice(this.root.length, R.length)) && R.slice(0, this.root.length) === this.root && S(T, F);
2013
+ var M, A, F;
2014
+ for (M in this.files) F = this.files[M], (A = M.slice(this.root.length, M.length)) && M.slice(0, this.root.length) === this.root && S(A, F);
2015
2015
  }, filter: function(S) {
2016
- var R = [];
2017
- return this.forEach(function(T, F) {
2018
- S(T, F) && R.push(F);
2019
- }), R;
2020
- }, file: function(S, R, T) {
2021
- if (arguments.length !== 1) return S = this.root + S, n.call(this, S, R, T), this;
2016
+ var M = [];
2017
+ return this.forEach(function(A, F) {
2018
+ S(A, F) && M.push(F);
2019
+ }), M;
2020
+ }, file: function(S, M, A) {
2021
+ if (arguments.length !== 1) return S = this.root + S, n.call(this, S, M, A), this;
2022
2022
  if (k(S)) {
2023
2023
  var F = S;
2024
2024
  return this.filter(function(H, K) {
2025
2025
  return !K.dir && F.test(H);
2026
2026
  });
2027
2027
  }
2028
- var B = this.files[this.root + S];
2029
- return B && !B.dir ? B : null;
2028
+ var T = this.files[this.root + S];
2029
+ return T && !T.dir ? T : null;
2030
2030
  }, folder: function(S) {
2031
2031
  if (!S) return this;
2032
- if (k(S)) return this.filter(function(B, H) {
2033
- return H.dir && S.test(B);
2032
+ if (k(S)) return this.filter(function(T, H) {
2033
+ return H.dir && S.test(T);
2034
2034
  });
2035
- var R = this.root + S, T = v.call(this, R), F = this.clone();
2036
- return F.root = T.name, F;
2035
+ var M = this.root + S, A = v.call(this, M), F = this.clone();
2036
+ return F.root = A.name, F;
2037
2037
  }, remove: function(S) {
2038
2038
  S = this.root + S;
2039
- var R = this.files[S];
2040
- if (R || (S.slice(-1) !== "/" && (S += "/"), R = this.files[S]), R && !R.dir) delete this.files[S];
2041
- else for (var T = this.filter(function(B, H) {
2039
+ var M = this.files[S];
2040
+ if (M || (S.slice(-1) !== "/" && (S += "/"), M = this.files[S]), M && !M.dir) delete this.files[S];
2041
+ else for (var A = this.filter(function(T, H) {
2042
2042
  return H.name.slice(0, S.length) === S;
2043
- }), F = 0; F < T.length; F++) delete this.files[T[F].name];
2043
+ }), F = 0; F < A.length; F++) delete this.files[A[F].name];
2044
2044
  return this;
2045
2045
  }, generate: function() {
2046
2046
  throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
2047
2047
  }, generateInternalStream: function(S) {
2048
- var R, T = {};
2048
+ var M, A = {};
2049
2049
  try {
2050
- if ((T = a.extend(S || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: o.utf8encode })).type = T.type.toLowerCase(), T.compression = T.compression.toUpperCase(), T.type === "binarystring" && (T.type = "string"), !T.type) throw new Error("No output type specified.");
2051
- a.checkSupport(T.type), T.platform !== "darwin" && T.platform !== "freebsd" && T.platform !== "linux" && T.platform !== "sunos" || (T.platform = "UNIX"), T.platform === "win32" && (T.platform = "DOS");
2052
- var F = T.comment || this.comment || "";
2053
- R = d.generateWorker(this, T, F);
2054
- } catch (B) {
2055
- (R = new c("error")).error(B);
2050
+ if ((A = s.extend(S || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: o.utf8encode })).type = A.type.toLowerCase(), A.compression = A.compression.toUpperCase(), A.type === "binarystring" && (A.type = "string"), !A.type) throw new Error("No output type specified.");
2051
+ s.checkSupport(A.type), A.platform !== "darwin" && A.platform !== "freebsd" && A.platform !== "linux" && A.platform !== "sunos" || (A.platform = "UNIX"), A.platform === "win32" && (A.platform = "DOS");
2052
+ var F = A.comment || this.comment || "";
2053
+ M = d.generateWorker(this, A, F);
2054
+ } catch (T) {
2055
+ (M = new c("error")).error(T);
2056
2056
  }
2057
- return new g(R, T.type || "string", T.mimeType);
2058
- }, generateAsync: function(S, R) {
2059
- return this.generateInternalStream(S).accumulate(R);
2060
- }, generateNodeStream: function(S, R) {
2061
- return (S = S || {}).type || (S.type = "nodebuffer"), this.generateInternalStream(S).toNodejsStream(R);
2057
+ return new g(M, A.type || "string", A.mimeType);
2058
+ }, generateAsync: function(S, M) {
2059
+ return this.generateInternalStream(S).accumulate(M);
2060
+ }, generateNodeStream: function(S, M) {
2061
+ return (S = S || {}).type || (S.type = "nodebuffer"), this.generateInternalStream(S).toNodejsStream(M);
2062
2062
  } };
2063
2063
  i.exports = C;
2064
2064
  }, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(e, i, r) {
2065
2065
  i.exports = e("stream");
2066
2066
  }, { stream: void 0 }], 17: [function(e, i, r) {
2067
2067
  var n = e("./DataReader");
2068
- function o(a) {
2069
- n.call(this, a);
2070
- for (var c = 0; c < this.data.length; c++) a[c] = 255 & a[c];
2068
+ function o(s) {
2069
+ n.call(this, s);
2070
+ for (var c = 0; c < this.data.length; c++) s[c] = 255 & s[c];
2071
2071
  }
2072
- e("../utils").inherits(o, n), o.prototype.byteAt = function(a) {
2073
- return this.data[this.zero + a];
2074
- }, o.prototype.lastIndexOfSignature = function(a) {
2075
- for (var c = a.charCodeAt(0), g = a.charCodeAt(1), f = a.charCodeAt(2), y = a.charCodeAt(3), p = this.length - 4; 0 <= p; --p) if (this.data[p] === c && this.data[p + 1] === g && this.data[p + 2] === f && this.data[p + 3] === y) return p - this.zero;
2072
+ e("../utils").inherits(o, n), o.prototype.byteAt = function(s) {
2073
+ return this.data[this.zero + s];
2074
+ }, o.prototype.lastIndexOfSignature = function(s) {
2075
+ for (var c = s.charCodeAt(0), g = s.charCodeAt(1), f = s.charCodeAt(2), y = s.charCodeAt(3), p = this.length - 4; 0 <= p; --p) if (this.data[p] === c && this.data[p + 1] === g && this.data[p + 2] === f && this.data[p + 3] === y) return p - this.zero;
2076
2076
  return -1;
2077
- }, o.prototype.readAndCheckSignature = function(a) {
2078
- var c = a.charCodeAt(0), g = a.charCodeAt(1), f = a.charCodeAt(2), y = a.charCodeAt(3), p = this.readData(4);
2077
+ }, o.prototype.readAndCheckSignature = function(s) {
2078
+ var c = s.charCodeAt(0), g = s.charCodeAt(1), f = s.charCodeAt(2), y = s.charCodeAt(3), p = this.readData(4);
2079
2079
  return c === p[0] && g === p[1] && f === p[2] && y === p[3];
2080
- }, o.prototype.readData = function(a) {
2081
- if (this.checkOffset(a), a === 0) return [];
2082
- var c = this.data.slice(this.zero + this.index, this.zero + this.index + a);
2083
- return this.index += a, c;
2080
+ }, o.prototype.readData = function(s) {
2081
+ if (this.checkOffset(s), s === 0) return [];
2082
+ var c = this.data.slice(this.zero + this.index, this.zero + this.index + s);
2083
+ return this.index += s, c;
2084
2084
  }, i.exports = o;
2085
2085
  }, { "../utils": 32, "./DataReader": 18 }], 18: [function(e, i, r) {
2086
2086
  var n = e("../utils");
2087
- function o(a) {
2088
- this.data = a, this.length = a.length, this.index = 0, this.zero = 0;
2087
+ function o(s) {
2088
+ this.data = s, this.length = s.length, this.index = 0, this.zero = 0;
2089
2089
  }
2090
- o.prototype = { checkOffset: function(a) {
2091
- this.checkIndex(this.index + a);
2092
- }, checkIndex: function(a) {
2093
- if (this.length < this.zero + a || a < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + a + "). Corrupted zip ?");
2094
- }, setIndex: function(a) {
2095
- this.checkIndex(a), this.index = a;
2096
- }, skip: function(a) {
2097
- this.setIndex(this.index + a);
2090
+ o.prototype = { checkOffset: function(s) {
2091
+ this.checkIndex(this.index + s);
2092
+ }, checkIndex: function(s) {
2093
+ if (this.length < this.zero + s || s < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + s + "). Corrupted zip ?");
2094
+ }, setIndex: function(s) {
2095
+ this.checkIndex(s), this.index = s;
2096
+ }, skip: function(s) {
2097
+ this.setIndex(this.index + s);
2098
2098
  }, byteAt: function() {
2099
- }, readInt: function(a) {
2099
+ }, readInt: function(s) {
2100
2100
  var c, g = 0;
2101
- for (this.checkOffset(a), c = this.index + a - 1; c >= this.index; c--) g = (g << 8) + this.byteAt(c);
2102
- return this.index += a, g;
2103
- }, readString: function(a) {
2104
- return n.transformTo("string", this.readData(a));
2101
+ for (this.checkOffset(s), c = this.index + s - 1; c >= this.index; c--) g = (g << 8) + this.byteAt(c);
2102
+ return this.index += s, g;
2103
+ }, readString: function(s) {
2104
+ return n.transformTo("string", this.readData(s));
2105
2105
  }, readData: function() {
2106
2106
  }, lastIndexOfSignature: function() {
2107
2107
  }, readAndCheckSignature: function() {
2108
2108
  }, readDate: function() {
2109
- var a = this.readInt(4);
2110
- return new Date(Date.UTC(1980 + (a >> 25 & 127), (a >> 21 & 15) - 1, a >> 16 & 31, a >> 11 & 31, a >> 5 & 63, (31 & a) << 1));
2109
+ var s = this.readInt(4);
2110
+ return new Date(Date.UTC(1980 + (s >> 25 & 127), (s >> 21 & 15) - 1, s >> 16 & 31, s >> 11 & 31, s >> 5 & 63, (31 & s) << 1));
2111
2111
  } }, i.exports = o;
2112
2112
  }, { "../utils": 32 }], 19: [function(e, i, r) {
2113
2113
  var n = e("./Uint8ArrayReader");
2114
- function o(a) {
2115
- n.call(this, a);
2114
+ function o(s) {
2115
+ n.call(this, s);
2116
2116
  }
2117
- e("../utils").inherits(o, n), o.prototype.readData = function(a) {
2118
- this.checkOffset(a);
2119
- var c = this.data.slice(this.zero + this.index, this.zero + this.index + a);
2120
- return this.index += a, c;
2117
+ e("../utils").inherits(o, n), o.prototype.readData = function(s) {
2118
+ this.checkOffset(s);
2119
+ var c = this.data.slice(this.zero + this.index, this.zero + this.index + s);
2120
+ return this.index += s, c;
2121
2121
  }, i.exports = o;
2122
2122
  }, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(e, i, r) {
2123
2123
  var n = e("./DataReader");
2124
- function o(a) {
2125
- n.call(this, a);
2124
+ function o(s) {
2125
+ n.call(this, s);
2126
2126
  }
2127
- e("../utils").inherits(o, n), o.prototype.byteAt = function(a) {
2128
- return this.data.charCodeAt(this.zero + a);
2129
- }, o.prototype.lastIndexOfSignature = function(a) {
2130
- return this.data.lastIndexOf(a) - this.zero;
2131
- }, o.prototype.readAndCheckSignature = function(a) {
2132
- return a === this.readData(4);
2133
- }, o.prototype.readData = function(a) {
2134
- this.checkOffset(a);
2135
- var c = this.data.slice(this.zero + this.index, this.zero + this.index + a);
2136
- return this.index += a, c;
2127
+ e("../utils").inherits(o, n), o.prototype.byteAt = function(s) {
2128
+ return this.data.charCodeAt(this.zero + s);
2129
+ }, o.prototype.lastIndexOfSignature = function(s) {
2130
+ return this.data.lastIndexOf(s) - this.zero;
2131
+ }, o.prototype.readAndCheckSignature = function(s) {
2132
+ return s === this.readData(4);
2133
+ }, o.prototype.readData = function(s) {
2134
+ this.checkOffset(s);
2135
+ var c = this.data.slice(this.zero + this.index, this.zero + this.index + s);
2136
+ return this.index += s, c;
2137
2137
  }, i.exports = o;
2138
2138
  }, { "../utils": 32, "./DataReader": 18 }], 21: [function(e, i, r) {
2139
2139
  var n = e("./ArrayReader");
2140
- function o(a) {
2141
- n.call(this, a);
2140
+ function o(s) {
2141
+ n.call(this, s);
2142
2142
  }
2143
- e("../utils").inherits(o, n), o.prototype.readData = function(a) {
2144
- if (this.checkOffset(a), a === 0) return new Uint8Array(0);
2145
- var c = this.data.subarray(this.zero + this.index, this.zero + this.index + a);
2146
- return this.index += a, c;
2143
+ e("../utils").inherits(o, n), o.prototype.readData = function(s) {
2144
+ if (this.checkOffset(s), s === 0) return new Uint8Array(0);
2145
+ var c = this.data.subarray(this.zero + this.index, this.zero + this.index + s);
2146
+ return this.index += s, c;
2147
2147
  }, i.exports = o;
2148
2148
  }, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(e, i, r) {
2149
- var n = e("../utils"), o = e("../support"), a = e("./ArrayReader"), c = e("./StringReader"), g = e("./NodeBufferReader"), f = e("./Uint8ArrayReader");
2149
+ var n = e("../utils"), o = e("../support"), s = e("./ArrayReader"), c = e("./StringReader"), g = e("./NodeBufferReader"), f = e("./Uint8ArrayReader");
2150
2150
  i.exports = function(y) {
2151
2151
  var p = n.getTypeOf(y);
2152
- return n.checkSupport(p), p !== "string" || o.uint8array ? p === "nodebuffer" ? new g(y) : o.uint8array ? new f(n.transformTo("uint8array", y)) : new a(n.transformTo("array", y)) : new c(y);
2152
+ return n.checkSupport(p), p !== "string" || o.uint8array ? p === "nodebuffer" ? new g(y) : o.uint8array ? new f(n.transformTo("uint8array", y)) : new s(n.transformTo("array", y)) : new c(y);
2153
2153
  };
2154
2154
  }, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(e, i, r) {
2155
2155
  r.LOCAL_FILE_HEADER = "PK", r.CENTRAL_FILE_HEADER = "PK", r.CENTRAL_DIRECTORY_END = "PK", r.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", r.ZIP64_CENTRAL_DIRECTORY_END = "PK", r.DATA_DESCRIPTOR = "PK\x07\b";
2156
2156
  }, {}], 24: [function(e, i, r) {
2157
2157
  var n = e("./GenericWorker"), o = e("../utils");
2158
- function a(c) {
2158
+ function s(c) {
2159
2159
  n.call(this, "ConvertWorker to " + c), this.destType = c;
2160
2160
  }
2161
- o.inherits(a, n), a.prototype.processChunk = function(c) {
2161
+ o.inherits(s, n), s.prototype.processChunk = function(c) {
2162
2162
  this.push({ data: o.transformTo(this.destType, c.data), meta: c.meta });
2163
- }, i.exports = a;
2163
+ }, i.exports = s;
2164
2164
  }, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(e, i, r) {
2165
2165
  var n = e("./GenericWorker"), o = e("../crc32");
2166
- function a() {
2166
+ function s() {
2167
2167
  n.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
2168
2168
  }
2169
- e("../utils").inherits(a, n), a.prototype.processChunk = function(c) {
2169
+ e("../utils").inherits(s, n), s.prototype.processChunk = function(c) {
2170
2170
  this.streamInfo.crc32 = o(c.data, this.streamInfo.crc32 || 0), this.push(c);
2171
- }, i.exports = a;
2171
+ }, i.exports = s;
2172
2172
  }, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(e, i, r) {
2173
2173
  var n = e("../utils"), o = e("./GenericWorker");
2174
- function a(c) {
2174
+ function s(c) {
2175
2175
  o.call(this, "DataLengthProbe for " + c), this.propName = c, this.withStreamInfo(c, 0);
2176
2176
  }
2177
- n.inherits(a, o), a.prototype.processChunk = function(c) {
2177
+ n.inherits(s, o), s.prototype.processChunk = function(c) {
2178
2178
  if (c) {
2179
2179
  var g = this.streamInfo[this.propName] || 0;
2180
2180
  this.streamInfo[this.propName] = g + c.data.length;
2181
2181
  }
2182
2182
  o.prototype.processChunk.call(this, c);
2183
- }, i.exports = a;
2183
+ }, i.exports = s;
2184
2184
  }, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(e, i, r) {
2185
2185
  var n = e("../utils"), o = e("./GenericWorker");
2186
- function a(c) {
2186
+ function s(c) {
2187
2187
  o.call(this, "DataWorker");
2188
2188
  var g = this;
2189
2189
  this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, c.then(function(f) {
@@ -2192,13 +2192,13 @@ function Qt() {
2192
2192
  g.error(f);
2193
2193
  });
2194
2194
  }
2195
- n.inherits(a, o), a.prototype.cleanUp = function() {
2195
+ n.inherits(s, o), s.prototype.cleanUp = function() {
2196
2196
  o.prototype.cleanUp.call(this), this.data = null;
2197
- }, a.prototype.resume = function() {
2197
+ }, s.prototype.resume = function() {
2198
2198
  return !!o.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, n.delay(this._tickAndRepeat, [], this)), !0);
2199
- }, a.prototype._tickAndRepeat = function() {
2199
+ }, s.prototype._tickAndRepeat = function() {
2200
2200
  this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (n.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
2201
- }, a.prototype._tick = function() {
2201
+ }, s.prototype._tick = function() {
2202
2202
  if (this.isPaused || this.isFinished) return !1;
2203
2203
  var c = null, g = Math.min(this.max, this.index + 16384);
2204
2204
  if (this.index >= this.max) return this.end();
@@ -2214,7 +2214,7 @@ function Qt() {
2214
2214
  c = this.data.slice(this.index, g);
2215
2215
  }
2216
2216
  return this.index = g, this.push({ data: c, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
2217
- }, i.exports = a;
2217
+ }, i.exports = s;
2218
2218
  }, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(e, i, r) {
2219
2219
  function n(o) {
2220
2220
  this.name = o || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = { data: [], end: [], error: [] }, this.previous = null;
@@ -2232,24 +2232,24 @@ function Qt() {
2232
2232
  return !0;
2233
2233
  }, error: function(o) {
2234
2234
  return !this.isFinished && (this.isPaused ? this.generatedError = o : (this.isFinished = !0, this.emit("error", o), this.previous && this.previous.error(o), this.cleanUp()), !0);
2235
- }, on: function(o, a) {
2236
- return this._listeners[o].push(a), this;
2235
+ }, on: function(o, s) {
2236
+ return this._listeners[o].push(s), this;
2237
2237
  }, cleanUp: function() {
2238
2238
  this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
2239
- }, emit: function(o, a) {
2240
- if (this._listeners[o]) for (var c = 0; c < this._listeners[o].length; c++) this._listeners[o][c].call(this, a);
2239
+ }, emit: function(o, s) {
2240
+ if (this._listeners[o]) for (var c = 0; c < this._listeners[o].length; c++) this._listeners[o][c].call(this, s);
2241
2241
  }, pipe: function(o) {
2242
2242
  return o.registerPrevious(this);
2243
2243
  }, registerPrevious: function(o) {
2244
2244
  if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
2245
2245
  this.streamInfo = o.streamInfo, this.mergeStreamInfo(), this.previous = o;
2246
- var a = this;
2246
+ var s = this;
2247
2247
  return o.on("data", function(c) {
2248
- a.processChunk(c);
2248
+ s.processChunk(c);
2249
2249
  }), o.on("end", function() {
2250
- a.end();
2250
+ s.end();
2251
2251
  }), o.on("error", function(c) {
2252
- a.error(c);
2252
+ s.error(c);
2253
2253
  }), this;
2254
2254
  }, pause: function() {
2255
2255
  return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0);
@@ -2260,8 +2260,8 @@ function Qt() {
2260
2260
  }, flush: function() {
2261
2261
  }, processChunk: function(o) {
2262
2262
  this.push(o);
2263
- }, withStreamInfo: function(o, a) {
2264
- return this.extraStreamInfo[o] = a, this.mergeStreamInfo(), this;
2263
+ }, withStreamInfo: function(o, s) {
2264
+ return this.extraStreamInfo[o] = s, this.mergeStreamInfo(), this;
2265
2265
  }, mergeStreamInfo: function() {
2266
2266
  for (var o in this.extraStreamInfo) Object.prototype.hasOwnProperty.call(this.extraStreamInfo, o) && (this.streamInfo[o] = this.extraStreamInfo[o]);
2267
2267
  }, lock: function() {
@@ -2272,7 +2272,7 @@ function Qt() {
2272
2272
  return this.previous ? this.previous + " -> " + o : o;
2273
2273
  } }, i.exports = n;
2274
2274
  }, {}], 29: [function(e, i, r) {
2275
- var n = e("../utils"), o = e("./ConvertWorker"), a = e("./GenericWorker"), c = e("../base64"), g = e("../support"), f = e("../external"), y = null;
2275
+ var n = e("../utils"), o = e("./ConvertWorker"), s = e("./GenericWorker"), c = e("../base64"), g = e("../support"), f = e("../external"), y = null;
2276
2276
  if (g.nodestream) try {
2277
2277
  y = e("../nodejs/NodejsStreamOutputAdapter");
2278
2278
  } catch {
@@ -2280,41 +2280,41 @@ function Qt() {
2280
2280
  function p(w, h) {
2281
2281
  return new f.Promise(function(m, u) {
2282
2282
  var v = [], k = w._internalType, C = w._outputType, S = w._mimeType;
2283
- w.on("data", function(R, T) {
2284
- v.push(R), h && h(T);
2285
- }).on("error", function(R) {
2286
- v = [], u(R);
2283
+ w.on("data", function(M, A) {
2284
+ v.push(M), h && h(A);
2285
+ }).on("error", function(M) {
2286
+ v = [], u(M);
2287
2287
  }).on("end", function() {
2288
2288
  try {
2289
- var R = (function(T, F, B) {
2290
- switch (T) {
2289
+ var M = (function(A, F, T) {
2290
+ switch (A) {
2291
2291
  case "blob":
2292
- return n.newBlob(n.transformTo("arraybuffer", F), B);
2292
+ return n.newBlob(n.transformTo("arraybuffer", F), T);
2293
2293
  case "base64":
2294
2294
  return c.encode(F);
2295
2295
  default:
2296
- return n.transformTo(T, F);
2296
+ return n.transformTo(A, F);
2297
2297
  }
2298
- })(C, (function(T, F) {
2299
- var B, H = 0, K = null, x = 0;
2300
- for (B = 0; B < F.length; B++) x += F[B].length;
2301
- switch (T) {
2298
+ })(C, (function(A, F) {
2299
+ var T, H = 0, K = null, x = 0;
2300
+ for (T = 0; T < F.length; T++) x += F[T].length;
2301
+ switch (A) {
2302
2302
  case "string":
2303
2303
  return F.join("");
2304
2304
  case "array":
2305
2305
  return Array.prototype.concat.apply([], F);
2306
2306
  case "uint8array":
2307
- for (K = new Uint8Array(x), B = 0; B < F.length; B++) K.set(F[B], H), H += F[B].length;
2307
+ for (K = new Uint8Array(x), T = 0; T < F.length; T++) K.set(F[T], H), H += F[T].length;
2308
2308
  return K;
2309
2309
  case "nodebuffer":
2310
2310
  return Buffer.concat(F);
2311
2311
  default:
2312
- throw new Error("concat : unsupported type '" + T + "'");
2312
+ throw new Error("concat : unsupported type '" + A + "'");
2313
2313
  }
2314
2314
  })(k, v), S);
2315
- m(R);
2316
- } catch (T) {
2317
- u(T);
2315
+ m(M);
2316
+ } catch (A) {
2317
+ u(A);
2318
2318
  }
2319
2319
  v = [];
2320
2320
  }).resume();
@@ -2333,7 +2333,7 @@ function Qt() {
2333
2333
  try {
2334
2334
  this._internalType = u, this._outputType = h, this._mimeType = m, n.checkSupport(u), this._worker = w.pipe(new o(u)), w.lock();
2335
2335
  } catch (v) {
2336
- this._worker = new a("error"), this._worker.error(v);
2336
+ this._worker = new s("error"), this._worker.error(v);
2337
2337
  }
2338
2338
  }
2339
2339
  d.prototype = { accumulate: function(w) {
@@ -2374,7 +2374,7 @@ function Qt() {
2374
2374
  r.nodestream = !1;
2375
2375
  }
2376
2376
  }, { "readable-stream": 16 }], 31: [function(e, i, r) {
2377
- for (var n = e("./utils"), o = e("./support"), a = e("./nodejsUtils"), c = e("./stream/GenericWorker"), g = new Array(256), f = 0; f < 256; f++) g[f] = 252 <= f ? 6 : 248 <= f ? 5 : 240 <= f ? 4 : 224 <= f ? 3 : 192 <= f ? 2 : 1;
2377
+ for (var n = e("./utils"), o = e("./support"), s = e("./nodejsUtils"), c = e("./stream/GenericWorker"), g = new Array(256), f = 0; f < 256; f++) g[f] = 252 <= f ? 6 : 248 <= f ? 5 : 240 <= f ? 4 : 224 <= f ? 3 : 192 <= f ? 2 : 1;
2378
2378
  g[254] = g[254] = 1;
2379
2379
  function y() {
2380
2380
  c.call(this, "utf-8 decode"), this.leftOver = null;
@@ -2383,7 +2383,7 @@ function Qt() {
2383
2383
  c.call(this, "utf-8 encode");
2384
2384
  }
2385
2385
  r.utf8encode = function(d) {
2386
- return o.nodebuffer ? a.newBufferFrom(d, "utf-8") : (function(w) {
2386
+ return o.nodebuffer ? s.newBufferFrom(d, "utf-8") : (function(w) {
2387
2387
  var h, m, u, v, k, C = w.length, S = 0;
2388
2388
  for (v = 0; v < C; v++) (64512 & (m = w.charCodeAt(v))) == 55296 && v + 1 < C && (64512 & (u = w.charCodeAt(v + 1))) == 56320 && (m = 65536 + (m - 55296 << 10) + (u - 56320), v++), S += m < 128 ? 1 : m < 2048 ? 2 : m < 65536 ? 3 : 4;
2389
2389
  for (h = o.uint8array ? new Uint8Array(S) : new Array(S), v = k = 0; k < S; v++) (64512 & (m = w.charCodeAt(v))) == 55296 && v + 1 < C && (64512 & (u = w.charCodeAt(v + 1))) == 56320 && (m = 65536 + (m - 55296 << 10) + (u - 56320), v++), m < 128 ? h[k++] = m : (m < 2048 ? h[k++] = 192 | m >>> 6 : (m < 65536 ? h[k++] = 224 | m >>> 12 : (h[k++] = 240 | m >>> 18, h[k++] = 128 | m >>> 12 & 63), h[k++] = 128 | m >>> 6 & 63), h[k++] = 128 | 63 & m);
@@ -2421,7 +2421,7 @@ function Qt() {
2421
2421
  this.push({ data: r.utf8encode(d.data), meta: d.meta });
2422
2422
  }, r.Utf8EncodeWorker = p;
2423
2423
  }, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(e, i, r) {
2424
- var n = e("./support"), o = e("./base64"), a = e("./nodejsUtils"), c = e("./external");
2424
+ var n = e("./support"), o = e("./base64"), s = e("./nodejsUtils"), c = e("./external");
2425
2425
  function g(h) {
2426
2426
  return h;
2427
2427
  }
@@ -2458,7 +2458,7 @@ function Qt() {
2458
2458
  }
2459
2459
  })(), nodebuffer: (function() {
2460
2460
  try {
2461
- return n.nodebuffer && String.fromCharCode.apply(null, a.allocBuffer(1)).length === 1;
2461
+ return n.nodebuffer && String.fromCharCode.apply(null, s.allocBuffer(1)).length === 1;
2462
2462
  } catch {
2463
2463
  return !1;
2464
2464
  }
@@ -2485,13 +2485,13 @@ function Qt() {
2485
2485
  }, uint8array: function(h) {
2486
2486
  return f(h, new Uint8Array(h.length));
2487
2487
  }, nodebuffer: function(h) {
2488
- return f(h, a.allocBuffer(h.length));
2488
+ return f(h, s.allocBuffer(h.length));
2489
2489
  } }, w.array = { string: p, array: g, arraybuffer: function(h) {
2490
2490
  return new Uint8Array(h).buffer;
2491
2491
  }, uint8array: function(h) {
2492
2492
  return new Uint8Array(h);
2493
2493
  }, nodebuffer: function(h) {
2494
- return a.newBufferFrom(h);
2494
+ return s.newBufferFrom(h);
2495
2495
  } }, w.arraybuffer = { string: function(h) {
2496
2496
  return p(new Uint8Array(h));
2497
2497
  }, array: function(h) {
@@ -2499,13 +2499,13 @@ function Qt() {
2499
2499
  }, arraybuffer: g, uint8array: function(h) {
2500
2500
  return new Uint8Array(h);
2501
2501
  }, nodebuffer: function(h) {
2502
- return a.newBufferFrom(new Uint8Array(h));
2502
+ return s.newBufferFrom(new Uint8Array(h));
2503
2503
  } }, w.uint8array = { string: p, array: function(h) {
2504
2504
  return d(h, new Array(h.length));
2505
2505
  }, arraybuffer: function(h) {
2506
2506
  return h.buffer;
2507
2507
  }, uint8array: g, nodebuffer: function(h) {
2508
- return a.newBufferFrom(h);
2508
+ return s.newBufferFrom(h);
2509
2509
  } }, w.nodebuffer = { string: p, array: function(h) {
2510
2510
  return d(h, new Array(h.length));
2511
2511
  }, arraybuffer: function(h) {
@@ -2524,7 +2524,7 @@ function Qt() {
2524
2524
  }
2525
2525
  return u.join("/");
2526
2526
  }, r.getTypeOf = function(h) {
2527
- return typeof h == "string" ? "string" : Object.prototype.toString.call(h) === "[object Array]" ? "array" : n.nodebuffer && a.isBuffer(h) ? "nodebuffer" : n.uint8array && h instanceof Uint8Array ? "uint8array" : n.arraybuffer && h instanceof ArrayBuffer ? "arraybuffer" : void 0;
2527
+ return typeof h == "string" ? "string" : Object.prototype.toString.call(h) === "[object Array]" ? "array" : n.nodebuffer && s.isBuffer(h) ? "nodebuffer" : n.uint8array && h instanceof Uint8Array ? "uint8array" : n.arraybuffer && h instanceof ArrayBuffer ? "arraybuffer" : void 0;
2528
2528
  }, r.checkSupport = function(h) {
2529
2529
  if (!n[h.toLowerCase()]) throw new Error(h + " is not supported by this platform");
2530
2530
  }, r.MAX_VALUE_16BITS = 65535, r.MAX_VALUE_32BITS = -1, r.pretty = function(h) {
@@ -2545,23 +2545,23 @@ function Qt() {
2545
2545
  return u;
2546
2546
  }, r.prepareContent = function(h, m, u, v, k) {
2547
2547
  return c.Promise.resolve(m).then(function(C) {
2548
- return n.blob && (C instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(C)) !== -1) && typeof FileReader < "u" ? new c.Promise(function(S, R) {
2549
- var T = new FileReader();
2550
- T.onload = function(F) {
2548
+ return n.blob && (C instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(C)) !== -1) && typeof FileReader < "u" ? new c.Promise(function(S, M) {
2549
+ var A = new FileReader();
2550
+ A.onload = function(F) {
2551
2551
  S(F.target.result);
2552
- }, T.onerror = function(F) {
2553
- R(F.target.error);
2554
- }, T.readAsArrayBuffer(C);
2552
+ }, A.onerror = function(F) {
2553
+ M(F.target.error);
2554
+ }, A.readAsArrayBuffer(C);
2555
2555
  }) : C;
2556
2556
  }).then(function(C) {
2557
2557
  var S = r.getTypeOf(C);
2558
- return S ? (S === "arraybuffer" ? C = r.transformTo("uint8array", C) : S === "string" && (k ? C = o.decode(C) : u && v !== !0 && (C = (function(R) {
2559
- return f(R, n.uint8array ? new Uint8Array(R.length) : new Array(R.length));
2558
+ return S ? (S === "arraybuffer" ? C = r.transformTo("uint8array", C) : S === "string" && (k ? C = o.decode(C) : u && v !== !0 && (C = (function(M) {
2559
+ return f(M, n.uint8array ? new Uint8Array(M.length) : new Array(M.length));
2560
2560
  })(C))), C) : c.Promise.reject(new Error("Can't read the data of '" + h + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
2561
2561
  });
2562
2562
  };
2563
2563
  }, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(e, i, r) {
2564
- var n = e("./reader/readerFor"), o = e("./utils"), a = e("./signature"), c = e("./zipEntry"), g = e("./support");
2564
+ var n = e("./reader/readerFor"), o = e("./utils"), s = e("./signature"), c = e("./zipEntry"), g = e("./support");
2565
2565
  function f(y) {
2566
2566
  this.files = [], this.loadOptions = y;
2567
2567
  }
@@ -2587,25 +2587,25 @@ function Qt() {
2587
2587
  if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount) throw new Error("Multi-volumes zip are not supported");
2588
2588
  }, readLocalFiles: function() {
2589
2589
  var y, p;
2590
- for (y = 0; y < this.files.length; y++) p = this.files[y], this.reader.setIndex(p.localHeaderOffset), this.checkSignature(a.LOCAL_FILE_HEADER), p.readLocalPart(this.reader), p.handleUTF8(), p.processAttributes();
2590
+ for (y = 0; y < this.files.length; y++) p = this.files[y], this.reader.setIndex(p.localHeaderOffset), this.checkSignature(s.LOCAL_FILE_HEADER), p.readLocalPart(this.reader), p.handleUTF8(), p.processAttributes();
2591
2591
  }, readCentralDir: function() {
2592
2592
  var y;
2593
- for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER); ) (y = new c({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(y);
2593
+ for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER); ) (y = new c({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(y);
2594
2594
  if (this.centralDirRecords !== this.files.length && this.centralDirRecords !== 0 && this.files.length === 0) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
2595
2595
  }, readEndOfCentral: function() {
2596
- var y = this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);
2597
- if (y < 0) throw this.isSignature(0, a.LOCAL_FILE_HEADER) ? new Error("Corrupted zip: can't find end of central directory") : new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");
2596
+ var y = this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);
2597
+ if (y < 0) throw this.isSignature(0, s.LOCAL_FILE_HEADER) ? new Error("Corrupted zip: can't find end of central directory") : new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");
2598
2598
  this.reader.setIndex(y);
2599
2599
  var p = y;
2600
- if (this.checkSignature(a.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === o.MAX_VALUE_16BITS || this.diskWithCentralDirStart === o.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === o.MAX_VALUE_16BITS || this.centralDirRecords === o.MAX_VALUE_16BITS || this.centralDirSize === o.MAX_VALUE_32BITS || this.centralDirOffset === o.MAX_VALUE_32BITS) {
2601
- if (this.zip64 = !0, (y = this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
2602
- if (this.reader.setIndex(y), this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, a.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
2603
- this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
2600
+ if (this.checkSignature(s.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === o.MAX_VALUE_16BITS || this.diskWithCentralDirStart === o.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === o.MAX_VALUE_16BITS || this.centralDirRecords === o.MAX_VALUE_16BITS || this.centralDirSize === o.MAX_VALUE_32BITS || this.centralDirOffset === o.MAX_VALUE_32BITS) {
2601
+ if (this.zip64 = !0, (y = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
2602
+ if (this.reader.setIndex(y), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, s.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
2603
+ this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
2604
2604
  }
2605
2605
  var d = this.centralDirOffset + this.centralDirSize;
2606
2606
  this.zip64 && (d += 20, d += 12 + this.zip64EndOfCentralSize);
2607
2607
  var w = p - d;
2608
- if (0 < w) this.isSignature(p, a.CENTRAL_FILE_HEADER) || (this.reader.zero = w);
2608
+ if (0 < w) this.isSignature(p, s.CENTRAL_FILE_HEADER) || (this.reader.zero = w);
2609
2609
  else if (w < 0) throw new Error("Corrupted zip: missing " + Math.abs(w) + " bytes.");
2610
2610
  }, prepareReader: function(y) {
2611
2611
  this.reader = n(y);
@@ -2613,7 +2613,7 @@ function Qt() {
2613
2613
  this.prepareReader(y), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
2614
2614
  } }, i.exports = f;
2615
2615
  }, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(e, i, r) {
2616
- var n = e("./reader/readerFor"), o = e("./utils"), a = e("./compressedObject"), c = e("./crc32"), g = e("./utf8"), f = e("./compressions"), y = e("./support");
2616
+ var n = e("./reader/readerFor"), o = e("./utils"), s = e("./compressedObject"), c = e("./crc32"), g = e("./utf8"), f = e("./compressions"), y = e("./support");
2617
2617
  function p(d, w) {
2618
2618
  this.options = d, this.loadOptions = w;
2619
2619
  }
@@ -2628,7 +2628,7 @@ function Qt() {
2628
2628
  for (var u in f) if (Object.prototype.hasOwnProperty.call(f, u) && f[u].magic === m) return f[u];
2629
2629
  return null;
2630
2630
  })(this.compressionMethod)) === null) throw new Error("Corrupted zip : compression " + o.pretty(this.compressionMethod) + " unknown (inner file : " + o.transformTo("string", this.fileName) + ")");
2631
- this.decompressed = new a(this.compressedSize, this.uncompressedSize, this.crc32, w, d.readData(this.compressedSize));
2631
+ this.decompressed = new s(this.compressedSize, this.uncompressedSize, this.crc32, w, d.readData(this.compressedSize));
2632
2632
  }, readCentralPart: function(d) {
2633
2633
  this.versionMadeBy = d.readInt(2), d.skip(2), this.bitFlag = d.readInt(2), this.compressionMethod = d.readString(2), this.date = d.readDate(), this.crc32 = d.readInt(4), this.compressedSize = d.readInt(4), this.uncompressedSize = d.readInt(4);
2634
2634
  var w = d.readInt(2);
@@ -2683,7 +2683,7 @@ function Qt() {
2683
2683
  function n(w, h, m) {
2684
2684
  this.name = w, this.dir = m.dir, this.date = m.date, this.comment = m.comment, this.unixPermissions = m.unixPermissions, this.dosPermissions = m.dosPermissions, this._data = h, this._dataBinary = m.binary, this.options = { compression: m.compression, compressionOptions: m.compressionOptions };
2685
2685
  }
2686
- var o = e("./stream/StreamHelper"), a = e("./stream/DataWorker"), c = e("./utf8"), g = e("./compressedObject"), f = e("./stream/GenericWorker");
2686
+ var o = e("./stream/StreamHelper"), s = e("./stream/DataWorker"), c = e("./utf8"), g = e("./compressedObject"), f = e("./stream/GenericWorker");
2687
2687
  n.prototype = { internalStream: function(w) {
2688
2688
  var h = null, m = "string";
2689
2689
  try {
@@ -2705,7 +2705,7 @@ function Qt() {
2705
2705
  var m = this._decompressWorker();
2706
2706
  return this._dataBinary || (m = m.pipe(new c.Utf8EncodeWorker())), g.createWorkerFrom(m, w, h);
2707
2707
  }, _decompressWorker: function() {
2708
- return this._data instanceof g ? this._data.getContentWorker() : this._data instanceof f ? this._data : new a(this._data);
2708
+ return this._data instanceof g ? this._data.getContentWorker() : this._data instanceof f ? this._data : new s(this._data);
2709
2709
  } };
2710
2710
  for (var y = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], p = function() {
2711
2711
  throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
@@ -2713,7 +2713,7 @@ function Qt() {
2713
2713
  i.exports = n;
2714
2714
  }, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(e, i, r) {
2715
2715
  (function(n) {
2716
- var o, a, c = n.MutationObserver || n.WebKitMutationObserver;
2716
+ var o, s, c = n.MutationObserver || n.WebKitMutationObserver;
2717
2717
  if (c) {
2718
2718
  var g = 0, f = new c(w), y = n.document.createTextNode("");
2719
2719
  f.observe(y, { characterData: !0 }), o = function() {
@@ -2736,22 +2736,22 @@ function Qt() {
2736
2736
  var d = [];
2737
2737
  function w() {
2738
2738
  var h, m;
2739
- a = !0;
2739
+ s = !0;
2740
2740
  for (var u = d.length; u; ) {
2741
2741
  for (m = d, d = [], h = -1; ++h < u; ) m[h]();
2742
2742
  u = d.length;
2743
2743
  }
2744
- a = !1;
2744
+ s = !1;
2745
2745
  }
2746
2746
  i.exports = function(h) {
2747
- d.push(h) !== 1 || a || o();
2747
+ d.push(h) !== 1 || s || o();
2748
2748
  };
2749
2749
  }).call(this, typeof kt < "u" ? kt : typeof self < "u" ? self : typeof window < "u" ? window : {});
2750
2750
  }, {}], 37: [function(e, i, r) {
2751
2751
  var n = e("immediate");
2752
2752
  function o() {
2753
2753
  }
2754
- var a = {}, c = ["REJECTED"], g = ["FULFILLED"], f = ["PENDING"];
2754
+ var s = {}, c = ["REJECTED"], g = ["FULFILLED"], f = ["PENDING"];
2755
2755
  function y(u) {
2756
2756
  if (typeof u != "function") throw new TypeError("resolver must be a function");
2757
2757
  this.state = f, this.queue = [], this.outcome = void 0, u !== o && h(this, u);
@@ -2765,9 +2765,9 @@ function Qt() {
2765
2765
  try {
2766
2766
  C = v(k);
2767
2767
  } catch (S) {
2768
- return a.reject(u, S);
2768
+ return s.reject(u, S);
2769
2769
  }
2770
- C === u ? a.reject(u, new TypeError("Cannot resolve promise with itself")) : a.resolve(u, C);
2770
+ C === u ? s.reject(u, new TypeError("Cannot resolve promise with itself")) : s.resolve(u, C);
2771
2771
  });
2772
2772
  }
2773
2773
  function w(u) {
@@ -2778,16 +2778,16 @@ function Qt() {
2778
2778
  }
2779
2779
  function h(u, v) {
2780
2780
  var k = !1;
2781
- function C(T) {
2782
- k || (k = !0, a.reject(u, T));
2781
+ function C(A) {
2782
+ k || (k = !0, s.reject(u, A));
2783
2783
  }
2784
- function S(T) {
2785
- k || (k = !0, a.resolve(u, T));
2784
+ function S(A) {
2785
+ k || (k = !0, s.resolve(u, A));
2786
2786
  }
2787
- var R = m(function() {
2787
+ var M = m(function() {
2788
2788
  v(S, C);
2789
2789
  });
2790
- R.status === "error" && C(R.value);
2790
+ M.status === "error" && C(M.value);
2791
2791
  }
2792
2792
  function m(u, v) {
2793
2793
  var k = {};
@@ -2817,44 +2817,44 @@ function Qt() {
2817
2817
  var k = new this.constructor(o);
2818
2818
  return this.state !== f ? d(k, this.state === g ? u : v, this.outcome) : this.queue.push(new p(k, u, v)), k;
2819
2819
  }, p.prototype.callFulfilled = function(u) {
2820
- a.resolve(this.promise, u);
2820
+ s.resolve(this.promise, u);
2821
2821
  }, p.prototype.otherCallFulfilled = function(u) {
2822
2822
  d(this.promise, this.onFulfilled, u);
2823
2823
  }, p.prototype.callRejected = function(u) {
2824
- a.reject(this.promise, u);
2824
+ s.reject(this.promise, u);
2825
2825
  }, p.prototype.otherCallRejected = function(u) {
2826
2826
  d(this.promise, this.onRejected, u);
2827
- }, a.resolve = function(u, v) {
2827
+ }, s.resolve = function(u, v) {
2828
2828
  var k = m(w, v);
2829
- if (k.status === "error") return a.reject(u, k.value);
2829
+ if (k.status === "error") return s.reject(u, k.value);
2830
2830
  var C = k.value;
2831
2831
  if (C) h(u, C);
2832
2832
  else {
2833
2833
  u.state = g, u.outcome = v;
2834
- for (var S = -1, R = u.queue.length; ++S < R; ) u.queue[S].callFulfilled(v);
2834
+ for (var S = -1, M = u.queue.length; ++S < M; ) u.queue[S].callFulfilled(v);
2835
2835
  }
2836
2836
  return u;
2837
- }, a.reject = function(u, v) {
2837
+ }, s.reject = function(u, v) {
2838
2838
  u.state = c, u.outcome = v;
2839
2839
  for (var k = -1, C = u.queue.length; ++k < C; ) u.queue[k].callRejected(v);
2840
2840
  return u;
2841
2841
  }, y.resolve = function(u) {
2842
- return u instanceof this ? u : a.resolve(new this(o), u);
2842
+ return u instanceof this ? u : s.resolve(new this(o), u);
2843
2843
  }, y.reject = function(u) {
2844
2844
  var v = new this(o);
2845
- return a.reject(v, u);
2845
+ return s.reject(v, u);
2846
2846
  }, y.all = function(u) {
2847
2847
  var v = this;
2848
2848
  if (Object.prototype.toString.call(u) !== "[object Array]") return this.reject(new TypeError("must be an array"));
2849
2849
  var k = u.length, C = !1;
2850
2850
  if (!k) return this.resolve([]);
2851
- for (var S = new Array(k), R = 0, T = -1, F = new this(o); ++T < k; ) B(u[T], T);
2851
+ for (var S = new Array(k), M = 0, A = -1, F = new this(o); ++A < k; ) T(u[A], A);
2852
2852
  return F;
2853
- function B(H, K) {
2853
+ function T(H, K) {
2854
2854
  v.resolve(H).then(function(x) {
2855
- S[K] = x, ++R !== k || C || (C = !0, a.resolve(F, S));
2855
+ S[K] = x, ++M !== k || C || (C = !0, s.resolve(F, S));
2856
2856
  }, function(x) {
2857
- C || (C = !0, a.reject(F, x));
2857
+ C || (C = !0, s.reject(F, x));
2858
2858
  });
2859
2859
  }
2860
2860
  }, y.race = function(u) {
@@ -2862,19 +2862,19 @@ function Qt() {
2862
2862
  if (Object.prototype.toString.call(u) !== "[object Array]") return this.reject(new TypeError("must be an array"));
2863
2863
  var k = u.length, C = !1;
2864
2864
  if (!k) return this.resolve([]);
2865
- for (var S = -1, R = new this(o); ++S < k; ) T = u[S], v.resolve(T).then(function(F) {
2866
- C || (C = !0, a.resolve(R, F));
2865
+ for (var S = -1, M = new this(o); ++S < k; ) A = u[S], v.resolve(A).then(function(F) {
2866
+ C || (C = !0, s.resolve(M, F));
2867
2867
  }, function(F) {
2868
- C || (C = !0, a.reject(R, F));
2868
+ C || (C = !0, s.reject(M, F));
2869
2869
  });
2870
- var T;
2871
- return R;
2870
+ var A;
2871
+ return M;
2872
2872
  };
2873
2873
  }, { immediate: 36 }], 38: [function(e, i, r) {
2874
2874
  var n = {};
2875
2875
  (0, e("./lib/utils/common").assign)(n, e("./lib/deflate"), e("./lib/inflate"), e("./lib/zlib/constants")), i.exports = n;
2876
2876
  }, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(e, i, r) {
2877
- var n = e("./zlib/deflate"), o = e("./utils/common"), a = e("./utils/strings"), c = e("./zlib/messages"), g = e("./zlib/zstream"), f = Object.prototype.toString, y = 0, p = -1, d = 0, w = 8;
2877
+ var n = e("./zlib/deflate"), o = e("./utils/common"), s = e("./utils/strings"), c = e("./zlib/messages"), g = e("./zlib/zstream"), f = Object.prototype.toString, y = 0, p = -1, d = 0, w = 8;
2878
2878
  function h(u) {
2879
2879
  if (!(this instanceof h)) return new h(u);
2880
2880
  this.options = o.assign({ level: p, method: w, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: d, to: "" }, u || {});
@@ -2884,7 +2884,7 @@ function Qt() {
2884
2884
  if (k !== y) throw new Error(c[k]);
2885
2885
  if (v.header && n.deflateSetHeader(this.strm, v.header), v.dictionary) {
2886
2886
  var C;
2887
- if (C = typeof v.dictionary == "string" ? a.string2buf(v.dictionary) : f.call(v.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(v.dictionary) : v.dictionary, (k = n.deflateSetDictionary(this.strm, C)) !== y) throw new Error(c[k]);
2887
+ if (C = typeof v.dictionary == "string" ? s.string2buf(v.dictionary) : f.call(v.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(v.dictionary) : v.dictionary, (k = n.deflateSetDictionary(this.strm, C)) !== y) throw new Error(c[k]);
2888
2888
  this._dict_set = !0;
2889
2889
  }
2890
2890
  }
@@ -2894,12 +2894,12 @@ function Qt() {
2894
2894
  return k.result;
2895
2895
  }
2896
2896
  h.prototype.push = function(u, v) {
2897
- var k, C, S = this.strm, R = this.options.chunkSize;
2897
+ var k, C, S = this.strm, M = this.options.chunkSize;
2898
2898
  if (this.ended) return !1;
2899
- C = v === ~~v ? v : v === !0 ? 4 : 0, typeof u == "string" ? S.input = a.string2buf(u) : f.call(u) === "[object ArrayBuffer]" ? S.input = new Uint8Array(u) : S.input = u, S.next_in = 0, S.avail_in = S.input.length;
2899
+ C = v === ~~v ? v : v === !0 ? 4 : 0, typeof u == "string" ? S.input = s.string2buf(u) : f.call(u) === "[object ArrayBuffer]" ? S.input = new Uint8Array(u) : S.input = u, S.next_in = 0, S.avail_in = S.input.length;
2900
2900
  do {
2901
- if (S.avail_out === 0 && (S.output = new o.Buf8(R), S.next_out = 0, S.avail_out = R), (k = n.deflate(S, C)) !== 1 && k !== y) return this.onEnd(k), !(this.ended = !0);
2902
- S.avail_out !== 0 && (S.avail_in !== 0 || C !== 4 && C !== 2) || (this.options.to === "string" ? this.onData(a.buf2binstring(o.shrinkBuf(S.output, S.next_out))) : this.onData(o.shrinkBuf(S.output, S.next_out)));
2901
+ if (S.avail_out === 0 && (S.output = new o.Buf8(M), S.next_out = 0, S.avail_out = M), (k = n.deflate(S, C)) !== 1 && k !== y) return this.onEnd(k), !(this.ended = !0);
2902
+ S.avail_out !== 0 && (S.avail_in !== 0 || C !== 4 && C !== 2) || (this.options.to === "string" ? this.onData(s.buf2binstring(o.shrinkBuf(S.output, S.next_out))) : this.onData(o.shrinkBuf(S.output, S.next_out)));
2903
2903
  } while ((0 < S.avail_in || S.avail_out === 0) && k !== 1);
2904
2904
  return C === 4 ? (k = n.deflateEnd(this.strm), this.onEnd(k), this.ended = !0, k === y) : C !== 2 || (this.onEnd(y), !(S.avail_out = 0));
2905
2905
  }, h.prototype.onData = function(u) {
@@ -2912,7 +2912,7 @@ function Qt() {
2912
2912
  return (v = v || {}).gzip = !0, m(u, v);
2913
2913
  };
2914
2914
  }, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(e, i, r) {
2915
- var n = e("./zlib/inflate"), o = e("./utils/common"), a = e("./utils/strings"), c = e("./zlib/constants"), g = e("./zlib/messages"), f = e("./zlib/zstream"), y = e("./zlib/gzheader"), p = Object.prototype.toString;
2915
+ var n = e("./zlib/inflate"), o = e("./utils/common"), s = e("./utils/strings"), c = e("./zlib/constants"), g = e("./zlib/messages"), f = e("./zlib/zstream"), y = e("./zlib/gzheader"), p = Object.prototype.toString;
2916
2916
  function d(h) {
2917
2917
  if (!(this instanceof d)) return new d(h);
2918
2918
  this.options = o.assign({ chunkSize: 16384, windowBits: 0, to: "" }, h || {});
@@ -2928,14 +2928,14 @@ function Qt() {
2928
2928
  return u.result;
2929
2929
  }
2930
2930
  d.prototype.push = function(h, m) {
2931
- var u, v, k, C, S, R, T = this.strm, F = this.options.chunkSize, B = this.options.dictionary, H = !1;
2931
+ var u, v, k, C, S, M, A = this.strm, F = this.options.chunkSize, T = this.options.dictionary, H = !1;
2932
2932
  if (this.ended) return !1;
2933
- v = m === ~~m ? m : m === !0 ? c.Z_FINISH : c.Z_NO_FLUSH, typeof h == "string" ? T.input = a.binstring2buf(h) : p.call(h) === "[object ArrayBuffer]" ? T.input = new Uint8Array(h) : T.input = h, T.next_in = 0, T.avail_in = T.input.length;
2933
+ v = m === ~~m ? m : m === !0 ? c.Z_FINISH : c.Z_NO_FLUSH, typeof h == "string" ? A.input = s.binstring2buf(h) : p.call(h) === "[object ArrayBuffer]" ? A.input = new Uint8Array(h) : A.input = h, A.next_in = 0, A.avail_in = A.input.length;
2934
2934
  do {
2935
- if (T.avail_out === 0 && (T.output = new o.Buf8(F), T.next_out = 0, T.avail_out = F), (u = n.inflate(T, c.Z_NO_FLUSH)) === c.Z_NEED_DICT && B && (R = typeof B == "string" ? a.string2buf(B) : p.call(B) === "[object ArrayBuffer]" ? new Uint8Array(B) : B, u = n.inflateSetDictionary(this.strm, R)), u === c.Z_BUF_ERROR && H === !0 && (u = c.Z_OK, H = !1), u !== c.Z_STREAM_END && u !== c.Z_OK) return this.onEnd(u), !(this.ended = !0);
2936
- T.next_out && (T.avail_out !== 0 && u !== c.Z_STREAM_END && (T.avail_in !== 0 || v !== c.Z_FINISH && v !== c.Z_SYNC_FLUSH) || (this.options.to === "string" ? (k = a.utf8border(T.output, T.next_out), C = T.next_out - k, S = a.buf2string(T.output, k), T.next_out = C, T.avail_out = F - C, C && o.arraySet(T.output, T.output, k, C, 0), this.onData(S)) : this.onData(o.shrinkBuf(T.output, T.next_out)))), T.avail_in === 0 && T.avail_out === 0 && (H = !0);
2937
- } while ((0 < T.avail_in || T.avail_out === 0) && u !== c.Z_STREAM_END);
2938
- return u === c.Z_STREAM_END && (v = c.Z_FINISH), v === c.Z_FINISH ? (u = n.inflateEnd(this.strm), this.onEnd(u), this.ended = !0, u === c.Z_OK) : v !== c.Z_SYNC_FLUSH || (this.onEnd(c.Z_OK), !(T.avail_out = 0));
2935
+ if (A.avail_out === 0 && (A.output = new o.Buf8(F), A.next_out = 0, A.avail_out = F), (u = n.inflate(A, c.Z_NO_FLUSH)) === c.Z_NEED_DICT && T && (M = typeof T == "string" ? s.string2buf(T) : p.call(T) === "[object ArrayBuffer]" ? new Uint8Array(T) : T, u = n.inflateSetDictionary(this.strm, M)), u === c.Z_BUF_ERROR && H === !0 && (u = c.Z_OK, H = !1), u !== c.Z_STREAM_END && u !== c.Z_OK) return this.onEnd(u), !(this.ended = !0);
2936
+ A.next_out && (A.avail_out !== 0 && u !== c.Z_STREAM_END && (A.avail_in !== 0 || v !== c.Z_FINISH && v !== c.Z_SYNC_FLUSH) || (this.options.to === "string" ? (k = s.utf8border(A.output, A.next_out), C = A.next_out - k, S = s.buf2string(A.output, k), A.next_out = C, A.avail_out = F - C, C && o.arraySet(A.output, A.output, k, C, 0), this.onData(S)) : this.onData(o.shrinkBuf(A.output, A.next_out)))), A.avail_in === 0 && A.avail_out === 0 && (H = !0);
2937
+ } while ((0 < A.avail_in || A.avail_out === 0) && u !== c.Z_STREAM_END);
2938
+ return u === c.Z_STREAM_END && (v = c.Z_FINISH), v === c.Z_FINISH ? (u = n.inflateEnd(this.strm), this.onEnd(u), this.ended = !0, u === c.Z_OK) : v !== c.Z_SYNC_FLUSH || (this.onEnd(c.Z_OK), !(A.avail_out = 0));
2939
2939
  }, d.prototype.onData = function(h) {
2940
2940
  this.chunks.push(h);
2941
2941
  }, d.prototype.onEnd = function(h) {
@@ -2965,16 +2965,16 @@ function Qt() {
2965
2965
  for (g = y = 0, f = c.length; g < f; g++) y += c[g].length;
2966
2966
  for (w = new Uint8Array(y), g = p = 0, f = c.length; g < f; g++) d = c[g], w.set(d, p), p += d.length;
2967
2967
  return w;
2968
- } }, a = { arraySet: function(c, g, f, y, p) {
2968
+ } }, s = { arraySet: function(c, g, f, y, p) {
2969
2969
  for (var d = 0; d < y; d++) c[p + d] = g[f + d];
2970
2970
  }, flattenChunks: function(c) {
2971
2971
  return [].concat.apply([], c);
2972
2972
  } };
2973
2973
  r.setTyped = function(c) {
2974
- c ? (r.Buf8 = Uint8Array, r.Buf16 = Uint16Array, r.Buf32 = Int32Array, r.assign(r, o)) : (r.Buf8 = Array, r.Buf16 = Array, r.Buf32 = Array, r.assign(r, a));
2974
+ c ? (r.Buf8 = Uint8Array, r.Buf16 = Uint16Array, r.Buf32 = Int32Array, r.assign(r, o)) : (r.Buf8 = Array, r.Buf16 = Array, r.Buf32 = Array, r.assign(r, s));
2975
2975
  }, r.setTyped(n);
2976
2976
  }, {}], 42: [function(e, i, r) {
2977
- var n = e("./common"), o = !0, a = !0;
2977
+ var n = e("./common"), o = !0, s = !0;
2978
2978
  try {
2979
2979
  String.fromCharCode.apply(null, [0]);
2980
2980
  } catch {
@@ -2983,11 +2983,11 @@ function Qt() {
2983
2983
  try {
2984
2984
  String.fromCharCode.apply(null, new Uint8Array(1));
2985
2985
  } catch {
2986
- a = !1;
2986
+ s = !1;
2987
2987
  }
2988
2988
  for (var c = new n.Buf8(256), g = 0; g < 256; g++) c[g] = 252 <= g ? 6 : 248 <= g ? 5 : 240 <= g ? 4 : 224 <= g ? 3 : 192 <= g ? 2 : 1;
2989
2989
  function f(y, p) {
2990
- if (p < 65537 && (y.subarray && a || !y.subarray && o)) return String.fromCharCode.apply(null, n.shrinkBuf(y, p));
2990
+ if (p < 65537 && (y.subarray && s || !y.subarray && o)) return String.fromCharCode.apply(null, n.shrinkBuf(y, p));
2991
2991
  for (var d = "", w = 0; w < p; w++) d += String.fromCharCode(y[w]);
2992
2992
  return d;
2993
2993
  }
@@ -3016,9 +3016,9 @@ function Qt() {
3016
3016
  return d < 0 || d === 0 ? p : d + c[y[d]] > p ? d : p;
3017
3017
  };
3018
3018
  }, { "./common": 41 }], 43: [function(e, i, r) {
3019
- i.exports = function(n, o, a, c) {
3020
- for (var g = 65535 & n | 0, f = n >>> 16 & 65535 | 0, y = 0; a !== 0; ) {
3021
- for (a -= y = 2e3 < a ? 2e3 : a; f = f + (g = g + o[c++] | 0) | 0, --y; ) ;
3019
+ i.exports = function(n, o, s, c) {
3020
+ for (var g = 65535 & n | 0, f = n >>> 16 & 65535 | 0, y = 0; s !== 0; ) {
3021
+ for (s -= y = 2e3 < s ? 2e3 : s; f = f + (g = g + o[c++] | 0) | 0, --y; ) ;
3022
3022
  g %= 65521, f %= 65521;
3023
3023
  }
3024
3024
  return g | f << 16 | 0;
@@ -3027,223 +3027,223 @@ function Qt() {
3027
3027
  i.exports = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 };
3028
3028
  }, {}], 45: [function(e, i, r) {
3029
3029
  var n = (function() {
3030
- for (var o, a = [], c = 0; c < 256; c++) {
3030
+ for (var o, s = [], c = 0; c < 256; c++) {
3031
3031
  o = c;
3032
3032
  for (var g = 0; g < 8; g++) o = 1 & o ? 3988292384 ^ o >>> 1 : o >>> 1;
3033
- a[c] = o;
3033
+ s[c] = o;
3034
3034
  }
3035
- return a;
3035
+ return s;
3036
3036
  })();
3037
- i.exports = function(o, a, c, g) {
3037
+ i.exports = function(o, s, c, g) {
3038
3038
  var f = n, y = g + c;
3039
3039
  o ^= -1;
3040
- for (var p = g; p < y; p++) o = o >>> 8 ^ f[255 & (o ^ a[p])];
3040
+ for (var p = g; p < y; p++) o = o >>> 8 ^ f[255 & (o ^ s[p])];
3041
3041
  return -1 ^ o;
3042
3042
  };
3043
3043
  }, {}], 46: [function(e, i, r) {
3044
- var n, o = e("../utils/common"), a = e("./trees"), c = e("./adler32"), g = e("./crc32"), f = e("./messages"), y = 0, p = 4, d = 0, w = -2, h = -1, m = 4, u = 2, v = 8, k = 9, C = 286, S = 30, R = 19, T = 2 * C + 1, F = 15, B = 3, H = 258, K = H + B + 1, x = 42, D = 113, l = 1, M = 2, V = 3, W = 4;
3045
- function Q(s, L) {
3046
- return s.msg = f[L], L;
3044
+ var n, o = e("../utils/common"), s = e("./trees"), c = e("./adler32"), g = e("./crc32"), f = e("./messages"), y = 0, p = 4, d = 0, w = -2, h = -1, m = 4, u = 2, v = 8, k = 9, C = 286, S = 30, M = 19, A = 2 * C + 1, F = 15, T = 3, H = 258, K = H + T + 1, x = 42, D = 113, l = 1, R = 2, V = 3, W = 4;
3045
+ function Q(a, L) {
3046
+ return a.msg = f[L], L;
3047
3047
  }
3048
- function U(s) {
3049
- return (s << 1) - (4 < s ? 9 : 0);
3048
+ function U(a) {
3049
+ return (a << 1) - (4 < a ? 9 : 0);
3050
3050
  }
3051
- function q(s) {
3052
- for (var L = s.length; 0 <= --L; ) s[L] = 0;
3051
+ function q(a) {
3052
+ for (var L = a.length; 0 <= --L; ) a[L] = 0;
3053
3053
  }
3054
- function z(s) {
3055
- var L = s.state, A = L.pending;
3056
- A > s.avail_out && (A = s.avail_out), A !== 0 && (o.arraySet(s.output, L.pending_buf, L.pending_out, A, s.next_out), s.next_out += A, L.pending_out += A, s.total_out += A, s.avail_out -= A, L.pending -= A, L.pending === 0 && (L.pending_out = 0));
3054
+ function z(a) {
3055
+ var L = a.state, B = L.pending;
3056
+ B > a.avail_out && (B = a.avail_out), B !== 0 && (o.arraySet(a.output, L.pending_buf, L.pending_out, B, a.next_out), a.next_out += B, L.pending_out += B, a.total_out += B, a.avail_out -= B, L.pending -= B, L.pending === 0 && (L.pending_out = 0));
3057
3057
  }
3058
- function I(s, L) {
3059
- a._tr_flush_block(s, 0 <= s.block_start ? s.block_start : -1, s.strstart - s.block_start, L), s.block_start = s.strstart, z(s.strm);
3058
+ function I(a, L) {
3059
+ s._tr_flush_block(a, 0 <= a.block_start ? a.block_start : -1, a.strstart - a.block_start, L), a.block_start = a.strstart, z(a.strm);
3060
3060
  }
3061
- function J(s, L) {
3062
- s.pending_buf[s.pending++] = L;
3061
+ function J(a, L) {
3062
+ a.pending_buf[a.pending++] = L;
3063
3063
  }
3064
- function Y(s, L) {
3065
- s.pending_buf[s.pending++] = L >>> 8 & 255, s.pending_buf[s.pending++] = 255 & L;
3064
+ function Y(a, L) {
3065
+ a.pending_buf[a.pending++] = L >>> 8 & 255, a.pending_buf[a.pending++] = 255 & L;
3066
3066
  }
3067
- function X(s, L) {
3068
- var A, _, b = s.max_chain_length, N = s.strstart, O = s.prev_length, P = s.nice_match, E = s.strstart > s.w_size - K ? s.strstart - (s.w_size - K) : 0, j = s.window, G = s.w_mask, Z = s.prev, $ = s.strstart + H, nt = j[N + O - 1], et = j[N + O];
3069
- s.prev_length >= s.good_match && (b >>= 2), P > s.lookahead && (P = s.lookahead);
3067
+ function X(a, L) {
3068
+ var B, _, b = a.max_chain_length, N = a.strstart, O = a.prev_length, P = a.nice_match, E = a.strstart > a.w_size - K ? a.strstart - (a.w_size - K) : 0, j = a.window, G = a.w_mask, Z = a.prev, $ = a.strstart + H, nt = j[N + O - 1], et = j[N + O];
3069
+ a.prev_length >= a.good_match && (b >>= 2), P > a.lookahead && (P = a.lookahead);
3070
3070
  do
3071
- if (j[(A = L) + O] === et && j[A + O - 1] === nt && j[A] === j[N] && j[++A] === j[N + 1]) {
3072
- N += 2, A++;
3071
+ if (j[(B = L) + O] === et && j[B + O - 1] === nt && j[B] === j[N] && j[++B] === j[N + 1]) {
3072
+ N += 2, B++;
3073
3073
  do
3074
3074
  ;
3075
- while (j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && N < $);
3075
+ while (j[++N] === j[++B] && j[++N] === j[++B] && j[++N] === j[++B] && j[++N] === j[++B] && j[++N] === j[++B] && j[++N] === j[++B] && j[++N] === j[++B] && j[++N] === j[++B] && N < $);
3076
3076
  if (_ = H - ($ - N), N = $ - H, O < _) {
3077
- if (s.match_start = L, P <= (O = _)) break;
3077
+ if (a.match_start = L, P <= (O = _)) break;
3078
3078
  nt = j[N + O - 1], et = j[N + O];
3079
3079
  }
3080
3080
  }
3081
3081
  while ((L = Z[L & G]) > E && --b != 0);
3082
- return O <= s.lookahead ? O : s.lookahead;
3082
+ return O <= a.lookahead ? O : a.lookahead;
3083
3083
  }
3084
- function ot(s) {
3085
- var L, A, _, b, N, O, P, E, j, G, Z = s.w_size;
3084
+ function ot(a) {
3085
+ var L, B, _, b, N, O, P, E, j, G, Z = a.w_size;
3086
3086
  do {
3087
- if (b = s.window_size - s.lookahead - s.strstart, s.strstart >= Z + (Z - K)) {
3088
- for (o.arraySet(s.window, s.window, Z, Z, 0), s.match_start -= Z, s.strstart -= Z, s.block_start -= Z, L = A = s.hash_size; _ = s.head[--L], s.head[L] = Z <= _ ? _ - Z : 0, --A; ) ;
3089
- for (L = A = Z; _ = s.prev[--L], s.prev[L] = Z <= _ ? _ - Z : 0, --A; ) ;
3087
+ if (b = a.window_size - a.lookahead - a.strstart, a.strstart >= Z + (Z - K)) {
3088
+ for (o.arraySet(a.window, a.window, Z, Z, 0), a.match_start -= Z, a.strstart -= Z, a.block_start -= Z, L = B = a.hash_size; _ = a.head[--L], a.head[L] = Z <= _ ? _ - Z : 0, --B; ) ;
3089
+ for (L = B = Z; _ = a.prev[--L], a.prev[L] = Z <= _ ? _ - Z : 0, --B; ) ;
3090
3090
  b += Z;
3091
3091
  }
3092
- if (s.strm.avail_in === 0) break;
3093
- if (O = s.strm, P = s.window, E = s.strstart + s.lookahead, j = b, G = void 0, G = O.avail_in, j < G && (G = j), A = G === 0 ? 0 : (O.avail_in -= G, o.arraySet(P, O.input, O.next_in, G, E), O.state.wrap === 1 ? O.adler = c(O.adler, P, G, E) : O.state.wrap === 2 && (O.adler = g(O.adler, P, G, E)), O.next_in += G, O.total_in += G, G), s.lookahead += A, s.lookahead + s.insert >= B) for (N = s.strstart - s.insert, s.ins_h = s.window[N], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[N + 1]) & s.hash_mask; s.insert && (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[N + B - 1]) & s.hash_mask, s.prev[N & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = N, N++, s.insert--, !(s.lookahead + s.insert < B)); ) ;
3094
- } while (s.lookahead < K && s.strm.avail_in !== 0);
3092
+ if (a.strm.avail_in === 0) break;
3093
+ if (O = a.strm, P = a.window, E = a.strstart + a.lookahead, j = b, G = void 0, G = O.avail_in, j < G && (G = j), B = G === 0 ? 0 : (O.avail_in -= G, o.arraySet(P, O.input, O.next_in, G, E), O.state.wrap === 1 ? O.adler = c(O.adler, P, G, E) : O.state.wrap === 2 && (O.adler = g(O.adler, P, G, E)), O.next_in += G, O.total_in += G, G), a.lookahead += B, a.lookahead + a.insert >= T) for (N = a.strstart - a.insert, a.ins_h = a.window[N], a.ins_h = (a.ins_h << a.hash_shift ^ a.window[N + 1]) & a.hash_mask; a.insert && (a.ins_h = (a.ins_h << a.hash_shift ^ a.window[N + T - 1]) & a.hash_mask, a.prev[N & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = N, N++, a.insert--, !(a.lookahead + a.insert < T)); ) ;
3094
+ } while (a.lookahead < K && a.strm.avail_in !== 0);
3095
3095
  }
3096
- function dt(s, L) {
3097
- for (var A, _; ; ) {
3098
- if (s.lookahead < K) {
3099
- if (ot(s), s.lookahead < K && L === y) return l;
3100
- if (s.lookahead === 0) break;
3096
+ function dt(a, L) {
3097
+ for (var B, _; ; ) {
3098
+ if (a.lookahead < K) {
3099
+ if (ot(a), a.lookahead < K && L === y) return l;
3100
+ if (a.lookahead === 0) break;
3101
3101
  }
3102
- if (A = 0, s.lookahead >= B && (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + B - 1]) & s.hash_mask, A = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart), A !== 0 && s.strstart - A <= s.w_size - K && (s.match_length = X(s, A)), s.match_length >= B) if (_ = a._tr_tally(s, s.strstart - s.match_start, s.match_length - B), s.lookahead -= s.match_length, s.match_length <= s.max_lazy_match && s.lookahead >= B) {
3103
- for (s.match_length--; s.strstart++, s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + B - 1]) & s.hash_mask, A = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart, --s.match_length != 0; ) ;
3104
- s.strstart++;
3105
- } else s.strstart += s.match_length, s.match_length = 0, s.ins_h = s.window[s.strstart], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask;
3106
- else _ = a._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;
3107
- if (_ && (I(s, !1), s.strm.avail_out === 0)) return l;
3102
+ if (B = 0, a.lookahead >= T && (a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, B = a.prev[a.strstart & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = a.strstart), B !== 0 && a.strstart - B <= a.w_size - K && (a.match_length = X(a, B)), a.match_length >= T) if (_ = s._tr_tally(a, a.strstart - a.match_start, a.match_length - T), a.lookahead -= a.match_length, a.match_length <= a.max_lazy_match && a.lookahead >= T) {
3103
+ for (a.match_length--; a.strstart++, a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, B = a.prev[a.strstart & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = a.strstart, --a.match_length != 0; ) ;
3104
+ a.strstart++;
3105
+ } else a.strstart += a.match_length, a.match_length = 0, a.ins_h = a.window[a.strstart], a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + 1]) & a.hash_mask;
3106
+ else _ = s._tr_tally(a, 0, a.window[a.strstart]), a.lookahead--, a.strstart++;
3107
+ if (_ && (I(a, !1), a.strm.avail_out === 0)) return l;
3108
3108
  }
3109
- return s.insert = s.strstart < B - 1 ? s.strstart : B - 1, L === p ? (I(s, !0), s.strm.avail_out === 0 ? V : W) : s.last_lit && (I(s, !1), s.strm.avail_out === 0) ? l : M;
3109
+ return a.insert = a.strstart < T - 1 ? a.strstart : T - 1, L === p ? (I(a, !0), a.strm.avail_out === 0 ? V : W) : a.last_lit && (I(a, !1), a.strm.avail_out === 0) ? l : R;
3110
3110
  }
3111
- function tt(s, L) {
3112
- for (var A, _, b; ; ) {
3113
- if (s.lookahead < K) {
3114
- if (ot(s), s.lookahead < K && L === y) return l;
3115
- if (s.lookahead === 0) break;
3111
+ function tt(a, L) {
3112
+ for (var B, _, b; ; ) {
3113
+ if (a.lookahead < K) {
3114
+ if (ot(a), a.lookahead < K && L === y) return l;
3115
+ if (a.lookahead === 0) break;
3116
3116
  }
3117
- if (A = 0, s.lookahead >= B && (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + B - 1]) & s.hash_mask, A = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart), s.prev_length = s.match_length, s.prev_match = s.match_start, s.match_length = B - 1, A !== 0 && s.prev_length < s.max_lazy_match && s.strstart - A <= s.w_size - K && (s.match_length = X(s, A), s.match_length <= 5 && (s.strategy === 1 || s.match_length === B && 4096 < s.strstart - s.match_start) && (s.match_length = B - 1)), s.prev_length >= B && s.match_length <= s.prev_length) {
3118
- for (b = s.strstart + s.lookahead - B, _ = a._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - B), s.lookahead -= s.prev_length - 1, s.prev_length -= 2; ++s.strstart <= b && (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + B - 1]) & s.hash_mask, A = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart), --s.prev_length != 0; ) ;
3119
- if (s.match_available = 0, s.match_length = B - 1, s.strstart++, _ && (I(s, !1), s.strm.avail_out === 0)) return l;
3120
- } else if (s.match_available) {
3121
- if ((_ = a._tr_tally(s, 0, s.window[s.strstart - 1])) && I(s, !1), s.strstart++, s.lookahead--, s.strm.avail_out === 0) return l;
3122
- } else s.match_available = 1, s.strstart++, s.lookahead--;
3117
+ if (B = 0, a.lookahead >= T && (a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, B = a.prev[a.strstart & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = a.strstart), a.prev_length = a.match_length, a.prev_match = a.match_start, a.match_length = T - 1, B !== 0 && a.prev_length < a.max_lazy_match && a.strstart - B <= a.w_size - K && (a.match_length = X(a, B), a.match_length <= 5 && (a.strategy === 1 || a.match_length === T && 4096 < a.strstart - a.match_start) && (a.match_length = T - 1)), a.prev_length >= T && a.match_length <= a.prev_length) {
3118
+ for (b = a.strstart + a.lookahead - T, _ = s._tr_tally(a, a.strstart - 1 - a.prev_match, a.prev_length - T), a.lookahead -= a.prev_length - 1, a.prev_length -= 2; ++a.strstart <= b && (a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, B = a.prev[a.strstart & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = a.strstart), --a.prev_length != 0; ) ;
3119
+ if (a.match_available = 0, a.match_length = T - 1, a.strstart++, _ && (I(a, !1), a.strm.avail_out === 0)) return l;
3120
+ } else if (a.match_available) {
3121
+ if ((_ = s._tr_tally(a, 0, a.window[a.strstart - 1])) && I(a, !1), a.strstart++, a.lookahead--, a.strm.avail_out === 0) return l;
3122
+ } else a.match_available = 1, a.strstart++, a.lookahead--;
3123
3123
  }
3124
- return s.match_available && (_ = a._tr_tally(s, 0, s.window[s.strstart - 1]), s.match_available = 0), s.insert = s.strstart < B - 1 ? s.strstart : B - 1, L === p ? (I(s, !0), s.strm.avail_out === 0 ? V : W) : s.last_lit && (I(s, !1), s.strm.avail_out === 0) ? l : M;
3124
+ return a.match_available && (_ = s._tr_tally(a, 0, a.window[a.strstart - 1]), a.match_available = 0), a.insert = a.strstart < T - 1 ? a.strstart : T - 1, L === p ? (I(a, !0), a.strm.avail_out === 0 ? V : W) : a.last_lit && (I(a, !1), a.strm.avail_out === 0) ? l : R;
3125
3125
  }
3126
- function it(s, L, A, _, b) {
3127
- this.good_length = s, this.max_lazy = L, this.nice_length = A, this.max_chain = _, this.func = b;
3126
+ function rt(a, L, B, _, b) {
3127
+ this.good_length = a, this.max_lazy = L, this.nice_length = B, this.max_chain = _, this.func = b;
3128
3128
  }
3129
3129
  function lt() {
3130
- this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = v, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new o.Buf16(2 * T), this.dyn_dtree = new o.Buf16(2 * (2 * S + 1)), this.bl_tree = new o.Buf16(2 * (2 * R + 1)), q(this.dyn_ltree), q(this.dyn_dtree), q(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new o.Buf16(F + 1), this.heap = new o.Buf16(2 * C + 1), q(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new o.Buf16(2 * C + 1), q(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
3130
+ this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = v, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new o.Buf16(2 * A), this.dyn_dtree = new o.Buf16(2 * (2 * S + 1)), this.bl_tree = new o.Buf16(2 * (2 * M + 1)), q(this.dyn_ltree), q(this.dyn_dtree), q(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new o.Buf16(F + 1), this.heap = new o.Buf16(2 * C + 1), q(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new o.Buf16(2 * C + 1), q(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
3131
3131
  }
3132
- function st(s) {
3132
+ function st(a) {
3133
3133
  var L;
3134
- return s && s.state ? (s.total_in = s.total_out = 0, s.data_type = u, (L = s.state).pending = 0, L.pending_out = 0, L.wrap < 0 && (L.wrap = -L.wrap), L.status = L.wrap ? x : D, s.adler = L.wrap === 2 ? 0 : 1, L.last_flush = y, a._tr_init(L), d) : Q(s, w);
3134
+ return a && a.state ? (a.total_in = a.total_out = 0, a.data_type = u, (L = a.state).pending = 0, L.pending_out = 0, L.wrap < 0 && (L.wrap = -L.wrap), L.status = L.wrap ? x : D, a.adler = L.wrap === 2 ? 0 : 1, L.last_flush = y, s._tr_init(L), d) : Q(a, w);
3135
3135
  }
3136
- function ft(s) {
3137
- var L = st(s);
3138
- return L === d && (function(A) {
3139
- A.window_size = 2 * A.w_size, q(A.head), A.max_lazy_match = n[A.level].max_lazy, A.good_match = n[A.level].good_length, A.nice_match = n[A.level].nice_length, A.max_chain_length = n[A.level].max_chain, A.strstart = 0, A.block_start = 0, A.lookahead = 0, A.insert = 0, A.match_length = A.prev_length = B - 1, A.match_available = 0, A.ins_h = 0;
3140
- })(s.state), L;
3136
+ function ft(a) {
3137
+ var L = st(a);
3138
+ return L === d && (function(B) {
3139
+ B.window_size = 2 * B.w_size, q(B.head), B.max_lazy_match = n[B.level].max_lazy, B.good_match = n[B.level].good_length, B.nice_match = n[B.level].nice_length, B.max_chain_length = n[B.level].max_chain, B.strstart = 0, B.block_start = 0, B.lookahead = 0, B.insert = 0, B.match_length = B.prev_length = T - 1, B.match_available = 0, B.ins_h = 0;
3140
+ })(a.state), L;
3141
3141
  }
3142
- function ut(s, L, A, _, b, N) {
3143
- if (!s) return w;
3142
+ function ut(a, L, B, _, b, N) {
3143
+ if (!a) return w;
3144
3144
  var O = 1;
3145
- if (L === h && (L = 6), _ < 0 ? (O = 0, _ = -_) : 15 < _ && (O = 2, _ -= 16), b < 1 || k < b || A !== v || _ < 8 || 15 < _ || L < 0 || 9 < L || N < 0 || m < N) return Q(s, w);
3145
+ if (L === h && (L = 6), _ < 0 ? (O = 0, _ = -_) : 15 < _ && (O = 2, _ -= 16), b < 1 || k < b || B !== v || _ < 8 || 15 < _ || L < 0 || 9 < L || N < 0 || m < N) return Q(a, w);
3146
3146
  _ === 8 && (_ = 9);
3147
3147
  var P = new lt();
3148
- return (s.state = P).strm = s, P.wrap = O, P.gzhead = null, P.w_bits = _, P.w_size = 1 << P.w_bits, P.w_mask = P.w_size - 1, P.hash_bits = b + 7, P.hash_size = 1 << P.hash_bits, P.hash_mask = P.hash_size - 1, P.hash_shift = ~~((P.hash_bits + B - 1) / B), P.window = new o.Buf8(2 * P.w_size), P.head = new o.Buf16(P.hash_size), P.prev = new o.Buf16(P.w_size), P.lit_bufsize = 1 << b + 6, P.pending_buf_size = 4 * P.lit_bufsize, P.pending_buf = new o.Buf8(P.pending_buf_size), P.d_buf = 1 * P.lit_bufsize, P.l_buf = 3 * P.lit_bufsize, P.level = L, P.strategy = N, P.method = A, ft(s);
3148
+ return (a.state = P).strm = a, P.wrap = O, P.gzhead = null, P.w_bits = _, P.w_size = 1 << P.w_bits, P.w_mask = P.w_size - 1, P.hash_bits = b + 7, P.hash_size = 1 << P.hash_bits, P.hash_mask = P.hash_size - 1, P.hash_shift = ~~((P.hash_bits + T - 1) / T), P.window = new o.Buf8(2 * P.w_size), P.head = new o.Buf16(P.hash_size), P.prev = new o.Buf16(P.w_size), P.lit_bufsize = 1 << b + 6, P.pending_buf_size = 4 * P.lit_bufsize, P.pending_buf = new o.Buf8(P.pending_buf_size), P.d_buf = 1 * P.lit_bufsize, P.l_buf = 3 * P.lit_bufsize, P.level = L, P.strategy = N, P.method = B, ft(a);
3149
3149
  }
3150
- n = [new it(0, 0, 0, 0, function(s, L) {
3151
- var A = 65535;
3152
- for (A > s.pending_buf_size - 5 && (A = s.pending_buf_size - 5); ; ) {
3153
- if (s.lookahead <= 1) {
3154
- if (ot(s), s.lookahead === 0 && L === y) return l;
3155
- if (s.lookahead === 0) break;
3150
+ n = [new rt(0, 0, 0, 0, function(a, L) {
3151
+ var B = 65535;
3152
+ for (B > a.pending_buf_size - 5 && (B = a.pending_buf_size - 5); ; ) {
3153
+ if (a.lookahead <= 1) {
3154
+ if (ot(a), a.lookahead === 0 && L === y) return l;
3155
+ if (a.lookahead === 0) break;
3156
3156
  }
3157
- s.strstart += s.lookahead, s.lookahead = 0;
3158
- var _ = s.block_start + A;
3159
- if ((s.strstart === 0 || s.strstart >= _) && (s.lookahead = s.strstart - _, s.strstart = _, I(s, !1), s.strm.avail_out === 0) || s.strstart - s.block_start >= s.w_size - K && (I(s, !1), s.strm.avail_out === 0)) return l;
3157
+ a.strstart += a.lookahead, a.lookahead = 0;
3158
+ var _ = a.block_start + B;
3159
+ if ((a.strstart === 0 || a.strstart >= _) && (a.lookahead = a.strstart - _, a.strstart = _, I(a, !1), a.strm.avail_out === 0) || a.strstart - a.block_start >= a.w_size - K && (I(a, !1), a.strm.avail_out === 0)) return l;
3160
3160
  }
3161
- return s.insert = 0, L === p ? (I(s, !0), s.strm.avail_out === 0 ? V : W) : (s.strstart > s.block_start && (I(s, !1), s.strm.avail_out), l);
3162
- }), new it(4, 4, 8, 4, dt), new it(4, 5, 16, 8, dt), new it(4, 6, 32, 32, dt), new it(4, 4, 16, 16, tt), new it(8, 16, 32, 32, tt), new it(8, 16, 128, 128, tt), new it(8, 32, 128, 256, tt), new it(32, 128, 258, 1024, tt), new it(32, 258, 258, 4096, tt)], r.deflateInit = function(s, L) {
3163
- return ut(s, L, v, 15, 8, 0);
3164
- }, r.deflateInit2 = ut, r.deflateReset = ft, r.deflateResetKeep = st, r.deflateSetHeader = function(s, L) {
3165
- return s && s.state ? s.state.wrap !== 2 ? w : (s.state.gzhead = L, d) : w;
3166
- }, r.deflate = function(s, L) {
3167
- var A, _, b, N;
3168
- if (!s || !s.state || 5 < L || L < 0) return s ? Q(s, w) : w;
3169
- if (_ = s.state, !s.output || !s.input && s.avail_in !== 0 || _.status === 666 && L !== p) return Q(s, s.avail_out === 0 ? -5 : w);
3170
- if (_.strm = s, A = _.last_flush, _.last_flush = L, _.status === x) if (_.wrap === 2) s.adler = 0, J(_, 31), J(_, 139), J(_, 8), _.gzhead ? (J(_, (_.gzhead.text ? 1 : 0) + (_.gzhead.hcrc ? 2 : 0) + (_.gzhead.extra ? 4 : 0) + (_.gzhead.name ? 8 : 0) + (_.gzhead.comment ? 16 : 0)), J(_, 255 & _.gzhead.time), J(_, _.gzhead.time >> 8 & 255), J(_, _.gzhead.time >> 16 & 255), J(_, _.gzhead.time >> 24 & 255), J(_, _.level === 9 ? 2 : 2 <= _.strategy || _.level < 2 ? 4 : 0), J(_, 255 & _.gzhead.os), _.gzhead.extra && _.gzhead.extra.length && (J(_, 255 & _.gzhead.extra.length), J(_, _.gzhead.extra.length >> 8 & 255)), _.gzhead.hcrc && (s.adler = g(s.adler, _.pending_buf, _.pending, 0)), _.gzindex = 0, _.status = 69) : (J(_, 0), J(_, 0), J(_, 0), J(_, 0), J(_, 0), J(_, _.level === 9 ? 2 : 2 <= _.strategy || _.level < 2 ? 4 : 0), J(_, 3), _.status = D);
3161
+ return a.insert = 0, L === p ? (I(a, !0), a.strm.avail_out === 0 ? V : W) : (a.strstart > a.block_start && (I(a, !1), a.strm.avail_out), l);
3162
+ }), new rt(4, 4, 8, 4, dt), new rt(4, 5, 16, 8, dt), new rt(4, 6, 32, 32, dt), new rt(4, 4, 16, 16, tt), new rt(8, 16, 32, 32, tt), new rt(8, 16, 128, 128, tt), new rt(8, 32, 128, 256, tt), new rt(32, 128, 258, 1024, tt), new rt(32, 258, 258, 4096, tt)], r.deflateInit = function(a, L) {
3163
+ return ut(a, L, v, 15, 8, 0);
3164
+ }, r.deflateInit2 = ut, r.deflateReset = ft, r.deflateResetKeep = st, r.deflateSetHeader = function(a, L) {
3165
+ return a && a.state ? a.state.wrap !== 2 ? w : (a.state.gzhead = L, d) : w;
3166
+ }, r.deflate = function(a, L) {
3167
+ var B, _, b, N;
3168
+ if (!a || !a.state || 5 < L || L < 0) return a ? Q(a, w) : w;
3169
+ if (_ = a.state, !a.output || !a.input && a.avail_in !== 0 || _.status === 666 && L !== p) return Q(a, a.avail_out === 0 ? -5 : w);
3170
+ if (_.strm = a, B = _.last_flush, _.last_flush = L, _.status === x) if (_.wrap === 2) a.adler = 0, J(_, 31), J(_, 139), J(_, 8), _.gzhead ? (J(_, (_.gzhead.text ? 1 : 0) + (_.gzhead.hcrc ? 2 : 0) + (_.gzhead.extra ? 4 : 0) + (_.gzhead.name ? 8 : 0) + (_.gzhead.comment ? 16 : 0)), J(_, 255 & _.gzhead.time), J(_, _.gzhead.time >> 8 & 255), J(_, _.gzhead.time >> 16 & 255), J(_, _.gzhead.time >> 24 & 255), J(_, _.level === 9 ? 2 : 2 <= _.strategy || _.level < 2 ? 4 : 0), J(_, 255 & _.gzhead.os), _.gzhead.extra && _.gzhead.extra.length && (J(_, 255 & _.gzhead.extra.length), J(_, _.gzhead.extra.length >> 8 & 255)), _.gzhead.hcrc && (a.adler = g(a.adler, _.pending_buf, _.pending, 0)), _.gzindex = 0, _.status = 69) : (J(_, 0), J(_, 0), J(_, 0), J(_, 0), J(_, 0), J(_, _.level === 9 ? 2 : 2 <= _.strategy || _.level < 2 ? 4 : 0), J(_, 3), _.status = D);
3171
3171
  else {
3172
3172
  var O = v + (_.w_bits - 8 << 4) << 8;
3173
- O |= (2 <= _.strategy || _.level < 2 ? 0 : _.level < 6 ? 1 : _.level === 6 ? 2 : 3) << 6, _.strstart !== 0 && (O |= 32), O += 31 - O % 31, _.status = D, Y(_, O), _.strstart !== 0 && (Y(_, s.adler >>> 16), Y(_, 65535 & s.adler)), s.adler = 1;
3173
+ O |= (2 <= _.strategy || _.level < 2 ? 0 : _.level < 6 ? 1 : _.level === 6 ? 2 : 3) << 6, _.strstart !== 0 && (O |= 32), O += 31 - O % 31, _.status = D, Y(_, O), _.strstart !== 0 && (Y(_, a.adler >>> 16), Y(_, 65535 & a.adler)), a.adler = 1;
3174
3174
  }
3175
3175
  if (_.status === 69) if (_.gzhead.extra) {
3176
- for (b = _.pending; _.gzindex < (65535 & _.gzhead.extra.length) && (_.pending !== _.pending_buf_size || (_.gzhead.hcrc && _.pending > b && (s.adler = g(s.adler, _.pending_buf, _.pending - b, b)), z(s), b = _.pending, _.pending !== _.pending_buf_size)); ) J(_, 255 & _.gzhead.extra[_.gzindex]), _.gzindex++;
3177
- _.gzhead.hcrc && _.pending > b && (s.adler = g(s.adler, _.pending_buf, _.pending - b, b)), _.gzindex === _.gzhead.extra.length && (_.gzindex = 0, _.status = 73);
3176
+ for (b = _.pending; _.gzindex < (65535 & _.gzhead.extra.length) && (_.pending !== _.pending_buf_size || (_.gzhead.hcrc && _.pending > b && (a.adler = g(a.adler, _.pending_buf, _.pending - b, b)), z(a), b = _.pending, _.pending !== _.pending_buf_size)); ) J(_, 255 & _.gzhead.extra[_.gzindex]), _.gzindex++;
3177
+ _.gzhead.hcrc && _.pending > b && (a.adler = g(a.adler, _.pending_buf, _.pending - b, b)), _.gzindex === _.gzhead.extra.length && (_.gzindex = 0, _.status = 73);
3178
3178
  } else _.status = 73;
3179
3179
  if (_.status === 73) if (_.gzhead.name) {
3180
3180
  b = _.pending;
3181
3181
  do {
3182
- if (_.pending === _.pending_buf_size && (_.gzhead.hcrc && _.pending > b && (s.adler = g(s.adler, _.pending_buf, _.pending - b, b)), z(s), b = _.pending, _.pending === _.pending_buf_size)) {
3182
+ if (_.pending === _.pending_buf_size && (_.gzhead.hcrc && _.pending > b && (a.adler = g(a.adler, _.pending_buf, _.pending - b, b)), z(a), b = _.pending, _.pending === _.pending_buf_size)) {
3183
3183
  N = 1;
3184
3184
  break;
3185
3185
  }
3186
3186
  N = _.gzindex < _.gzhead.name.length ? 255 & _.gzhead.name.charCodeAt(_.gzindex++) : 0, J(_, N);
3187
3187
  } while (N !== 0);
3188
- _.gzhead.hcrc && _.pending > b && (s.adler = g(s.adler, _.pending_buf, _.pending - b, b)), N === 0 && (_.gzindex = 0, _.status = 91);
3188
+ _.gzhead.hcrc && _.pending > b && (a.adler = g(a.adler, _.pending_buf, _.pending - b, b)), N === 0 && (_.gzindex = 0, _.status = 91);
3189
3189
  } else _.status = 91;
3190
3190
  if (_.status === 91) if (_.gzhead.comment) {
3191
3191
  b = _.pending;
3192
3192
  do {
3193
- if (_.pending === _.pending_buf_size && (_.gzhead.hcrc && _.pending > b && (s.adler = g(s.adler, _.pending_buf, _.pending - b, b)), z(s), b = _.pending, _.pending === _.pending_buf_size)) {
3193
+ if (_.pending === _.pending_buf_size && (_.gzhead.hcrc && _.pending > b && (a.adler = g(a.adler, _.pending_buf, _.pending - b, b)), z(a), b = _.pending, _.pending === _.pending_buf_size)) {
3194
3194
  N = 1;
3195
3195
  break;
3196
3196
  }
3197
3197
  N = _.gzindex < _.gzhead.comment.length ? 255 & _.gzhead.comment.charCodeAt(_.gzindex++) : 0, J(_, N);
3198
3198
  } while (N !== 0);
3199
- _.gzhead.hcrc && _.pending > b && (s.adler = g(s.adler, _.pending_buf, _.pending - b, b)), N === 0 && (_.status = 103);
3199
+ _.gzhead.hcrc && _.pending > b && (a.adler = g(a.adler, _.pending_buf, _.pending - b, b)), N === 0 && (_.status = 103);
3200
3200
  } else _.status = 103;
3201
- if (_.status === 103 && (_.gzhead.hcrc ? (_.pending + 2 > _.pending_buf_size && z(s), _.pending + 2 <= _.pending_buf_size && (J(_, 255 & s.adler), J(_, s.adler >> 8 & 255), s.adler = 0, _.status = D)) : _.status = D), _.pending !== 0) {
3202
- if (z(s), s.avail_out === 0) return _.last_flush = -1, d;
3203
- } else if (s.avail_in === 0 && U(L) <= U(A) && L !== p) return Q(s, -5);
3204
- if (_.status === 666 && s.avail_in !== 0) return Q(s, -5);
3205
- if (s.avail_in !== 0 || _.lookahead !== 0 || L !== y && _.status !== 666) {
3201
+ if (_.status === 103 && (_.gzhead.hcrc ? (_.pending + 2 > _.pending_buf_size && z(a), _.pending + 2 <= _.pending_buf_size && (J(_, 255 & a.adler), J(_, a.adler >> 8 & 255), a.adler = 0, _.status = D)) : _.status = D), _.pending !== 0) {
3202
+ if (z(a), a.avail_out === 0) return _.last_flush = -1, d;
3203
+ } else if (a.avail_in === 0 && U(L) <= U(B) && L !== p) return Q(a, -5);
3204
+ if (_.status === 666 && a.avail_in !== 0) return Q(a, -5);
3205
+ if (a.avail_in !== 0 || _.lookahead !== 0 || L !== y && _.status !== 666) {
3206
3206
  var P = _.strategy === 2 ? (function(E, j) {
3207
3207
  for (var G; ; ) {
3208
3208
  if (E.lookahead === 0 && (ot(E), E.lookahead === 0)) {
3209
3209
  if (j === y) return l;
3210
3210
  break;
3211
3211
  }
3212
- if (E.match_length = 0, G = a._tr_tally(E, 0, E.window[E.strstart]), E.lookahead--, E.strstart++, G && (I(E, !1), E.strm.avail_out === 0)) return l;
3212
+ if (E.match_length = 0, G = s._tr_tally(E, 0, E.window[E.strstart]), E.lookahead--, E.strstart++, G && (I(E, !1), E.strm.avail_out === 0)) return l;
3213
3213
  }
3214
- return E.insert = 0, j === p ? (I(E, !0), E.strm.avail_out === 0 ? V : W) : E.last_lit && (I(E, !1), E.strm.avail_out === 0) ? l : M;
3214
+ return E.insert = 0, j === p ? (I(E, !0), E.strm.avail_out === 0 ? V : W) : E.last_lit && (I(E, !1), E.strm.avail_out === 0) ? l : R;
3215
3215
  })(_, L) : _.strategy === 3 ? (function(E, j) {
3216
3216
  for (var G, Z, $, nt, et = E.window; ; ) {
3217
3217
  if (E.lookahead <= H) {
3218
3218
  if (ot(E), E.lookahead <= H && j === y) return l;
3219
3219
  if (E.lookahead === 0) break;
3220
3220
  }
3221
- if (E.match_length = 0, E.lookahead >= B && 0 < E.strstart && (Z = et[$ = E.strstart - 1]) === et[++$] && Z === et[++$] && Z === et[++$]) {
3221
+ if (E.match_length = 0, E.lookahead >= T && 0 < E.strstart && (Z = et[$ = E.strstart - 1]) === et[++$] && Z === et[++$] && Z === et[++$]) {
3222
3222
  nt = E.strstart + H;
3223
3223
  do
3224
3224
  ;
3225
3225
  while (Z === et[++$] && Z === et[++$] && Z === et[++$] && Z === et[++$] && Z === et[++$] && Z === et[++$] && Z === et[++$] && Z === et[++$] && $ < nt);
3226
3226
  E.match_length = H - (nt - $), E.match_length > E.lookahead && (E.match_length = E.lookahead);
3227
3227
  }
3228
- if (E.match_length >= B ? (G = a._tr_tally(E, 1, E.match_length - B), E.lookahead -= E.match_length, E.strstart += E.match_length, E.match_length = 0) : (G = a._tr_tally(E, 0, E.window[E.strstart]), E.lookahead--, E.strstart++), G && (I(E, !1), E.strm.avail_out === 0)) return l;
3228
+ if (E.match_length >= T ? (G = s._tr_tally(E, 1, E.match_length - T), E.lookahead -= E.match_length, E.strstart += E.match_length, E.match_length = 0) : (G = s._tr_tally(E, 0, E.window[E.strstart]), E.lookahead--, E.strstart++), G && (I(E, !1), E.strm.avail_out === 0)) return l;
3229
3229
  }
3230
- return E.insert = 0, j === p ? (I(E, !0), E.strm.avail_out === 0 ? V : W) : E.last_lit && (I(E, !1), E.strm.avail_out === 0) ? l : M;
3230
+ return E.insert = 0, j === p ? (I(E, !0), E.strm.avail_out === 0 ? V : W) : E.last_lit && (I(E, !1), E.strm.avail_out === 0) ? l : R;
3231
3231
  })(_, L) : n[_.level].func(_, L);
3232
- if (P !== V && P !== W || (_.status = 666), P === l || P === V) return s.avail_out === 0 && (_.last_flush = -1), d;
3233
- if (P === M && (L === 1 ? a._tr_align(_) : L !== 5 && (a._tr_stored_block(_, 0, 0, !1), L === 3 && (q(_.head), _.lookahead === 0 && (_.strstart = 0, _.block_start = 0, _.insert = 0))), z(s), s.avail_out === 0)) return _.last_flush = -1, d;
3232
+ if (P !== V && P !== W || (_.status = 666), P === l || P === V) return a.avail_out === 0 && (_.last_flush = -1), d;
3233
+ if (P === R && (L === 1 ? s._tr_align(_) : L !== 5 && (s._tr_stored_block(_, 0, 0, !1), L === 3 && (q(_.head), _.lookahead === 0 && (_.strstart = 0, _.block_start = 0, _.insert = 0))), z(a), a.avail_out === 0)) return _.last_flush = -1, d;
3234
3234
  }
3235
- return L !== p ? d : _.wrap <= 0 ? 1 : (_.wrap === 2 ? (J(_, 255 & s.adler), J(_, s.adler >> 8 & 255), J(_, s.adler >> 16 & 255), J(_, s.adler >> 24 & 255), J(_, 255 & s.total_in), J(_, s.total_in >> 8 & 255), J(_, s.total_in >> 16 & 255), J(_, s.total_in >> 24 & 255)) : (Y(_, s.adler >>> 16), Y(_, 65535 & s.adler)), z(s), 0 < _.wrap && (_.wrap = -_.wrap), _.pending !== 0 ? d : 1);
3236
- }, r.deflateEnd = function(s) {
3235
+ return L !== p ? d : _.wrap <= 0 ? 1 : (_.wrap === 2 ? (J(_, 255 & a.adler), J(_, a.adler >> 8 & 255), J(_, a.adler >> 16 & 255), J(_, a.adler >> 24 & 255), J(_, 255 & a.total_in), J(_, a.total_in >> 8 & 255), J(_, a.total_in >> 16 & 255), J(_, a.total_in >> 24 & 255)) : (Y(_, a.adler >>> 16), Y(_, 65535 & a.adler)), z(a), 0 < _.wrap && (_.wrap = -_.wrap), _.pending !== 0 ? d : 1);
3236
+ }, r.deflateEnd = function(a) {
3237
3237
  var L;
3238
- return s && s.state ? (L = s.state.status) !== x && L !== 69 && L !== 73 && L !== 91 && L !== 103 && L !== D && L !== 666 ? Q(s, w) : (s.state = null, L === D ? Q(s, -3) : d) : w;
3239
- }, r.deflateSetDictionary = function(s, L) {
3240
- var A, _, b, N, O, P, E, j, G = L.length;
3241
- if (!s || !s.state || (N = (A = s.state).wrap) === 2 || N === 1 && A.status !== x || A.lookahead) return w;
3242
- for (N === 1 && (s.adler = c(s.adler, L, G, 0)), A.wrap = 0, G >= A.w_size && (N === 0 && (q(A.head), A.strstart = 0, A.block_start = 0, A.insert = 0), j = new o.Buf8(A.w_size), o.arraySet(j, L, G - A.w_size, A.w_size, 0), L = j, G = A.w_size), O = s.avail_in, P = s.next_in, E = s.input, s.avail_in = G, s.next_in = 0, s.input = L, ot(A); A.lookahead >= B; ) {
3243
- for (_ = A.strstart, b = A.lookahead - (B - 1); A.ins_h = (A.ins_h << A.hash_shift ^ A.window[_ + B - 1]) & A.hash_mask, A.prev[_ & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = _, _++, --b; ) ;
3244
- A.strstart = _, A.lookahead = B - 1, ot(A);
3238
+ return a && a.state ? (L = a.state.status) !== x && L !== 69 && L !== 73 && L !== 91 && L !== 103 && L !== D && L !== 666 ? Q(a, w) : (a.state = null, L === D ? Q(a, -3) : d) : w;
3239
+ }, r.deflateSetDictionary = function(a, L) {
3240
+ var B, _, b, N, O, P, E, j, G = L.length;
3241
+ if (!a || !a.state || (N = (B = a.state).wrap) === 2 || N === 1 && B.status !== x || B.lookahead) return w;
3242
+ for (N === 1 && (a.adler = c(a.adler, L, G, 0)), B.wrap = 0, G >= B.w_size && (N === 0 && (q(B.head), B.strstart = 0, B.block_start = 0, B.insert = 0), j = new o.Buf8(B.w_size), o.arraySet(j, L, G - B.w_size, B.w_size, 0), L = j, G = B.w_size), O = a.avail_in, P = a.next_in, E = a.input, a.avail_in = G, a.next_in = 0, a.input = L, ot(B); B.lookahead >= T; ) {
3243
+ for (_ = B.strstart, b = B.lookahead - (T - 1); B.ins_h = (B.ins_h << B.hash_shift ^ B.window[_ + T - 1]) & B.hash_mask, B.prev[_ & B.w_mask] = B.head[B.ins_h], B.head[B.ins_h] = _, _++, --b; ) ;
3244
+ B.strstart = _, B.lookahead = T - 1, ot(B);
3245
3245
  }
3246
- return A.strstart += A.lookahead, A.block_start = A.strstart, A.insert = A.lookahead, A.lookahead = 0, A.match_length = A.prev_length = B - 1, A.match_available = 0, s.next_in = P, s.input = E, s.avail_in = O, A.wrap = N, d;
3246
+ return B.strstart += B.lookahead, B.block_start = B.strstart, B.insert = B.lookahead, B.lookahead = 0, B.match_length = B.prev_length = T - 1, B.match_available = 0, a.next_in = P, a.input = E, a.avail_in = O, B.wrap = N, d;
3247
3247
  }, r.deflateInfo = "pako deflate (from Nodeca project)";
3248
3248
  }, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(e, i, r) {
3249
3249
  i.exports = function() {
@@ -3251,66 +3251,66 @@ function Qt() {
3251
3251
  };
3252
3252
  }, {}], 48: [function(e, i, r) {
3253
3253
  i.exports = function(n, o) {
3254
- var a, c, g, f, y, p, d, w, h, m, u, v, k, C, S, R, T, F, B, H, K, x, D, l, M;
3255
- a = n.state, c = n.next_in, l = n.input, g = c + (n.avail_in - 5), f = n.next_out, M = n.output, y = f - (o - n.avail_out), p = f + (n.avail_out - 257), d = a.dmax, w = a.wsize, h = a.whave, m = a.wnext, u = a.window, v = a.hold, k = a.bits, C = a.lencode, S = a.distcode, R = (1 << a.lenbits) - 1, T = (1 << a.distbits) - 1;
3254
+ var s, c, g, f, y, p, d, w, h, m, u, v, k, C, S, M, A, F, T, H, K, x, D, l, R;
3255
+ s = n.state, c = n.next_in, l = n.input, g = c + (n.avail_in - 5), f = n.next_out, R = n.output, y = f - (o - n.avail_out), p = f + (n.avail_out - 257), d = s.dmax, w = s.wsize, h = s.whave, m = s.wnext, u = s.window, v = s.hold, k = s.bits, C = s.lencode, S = s.distcode, M = (1 << s.lenbits) - 1, A = (1 << s.distbits) - 1;
3256
3256
  t: do {
3257
- k < 15 && (v += l[c++] << k, k += 8, v += l[c++] << k, k += 8), F = C[v & R];
3257
+ k < 15 && (v += l[c++] << k, k += 8, v += l[c++] << k, k += 8), F = C[v & M];
3258
3258
  e: for (; ; ) {
3259
- if (v >>>= B = F >>> 24, k -= B, (B = F >>> 16 & 255) === 0) M[f++] = 65535 & F;
3259
+ if (v >>>= T = F >>> 24, k -= T, (T = F >>> 16 & 255) === 0) R[f++] = 65535 & F;
3260
3260
  else {
3261
- if (!(16 & B)) {
3262
- if ((64 & B) == 0) {
3263
- F = C[(65535 & F) + (v & (1 << B) - 1)];
3261
+ if (!(16 & T)) {
3262
+ if ((64 & T) == 0) {
3263
+ F = C[(65535 & F) + (v & (1 << T) - 1)];
3264
3264
  continue e;
3265
3265
  }
3266
- if (32 & B) {
3267
- a.mode = 12;
3266
+ if (32 & T) {
3267
+ s.mode = 12;
3268
3268
  break t;
3269
3269
  }
3270
- n.msg = "invalid literal/length code", a.mode = 30;
3270
+ n.msg = "invalid literal/length code", s.mode = 30;
3271
3271
  break t;
3272
3272
  }
3273
- H = 65535 & F, (B &= 15) && (k < B && (v += l[c++] << k, k += 8), H += v & (1 << B) - 1, v >>>= B, k -= B), k < 15 && (v += l[c++] << k, k += 8, v += l[c++] << k, k += 8), F = S[v & T];
3273
+ H = 65535 & F, (T &= 15) && (k < T && (v += l[c++] << k, k += 8), H += v & (1 << T) - 1, v >>>= T, k -= T), k < 15 && (v += l[c++] << k, k += 8, v += l[c++] << k, k += 8), F = S[v & A];
3274
3274
  i: for (; ; ) {
3275
- if (v >>>= B = F >>> 24, k -= B, !(16 & (B = F >>> 16 & 255))) {
3276
- if ((64 & B) == 0) {
3277
- F = S[(65535 & F) + (v & (1 << B) - 1)];
3275
+ if (v >>>= T = F >>> 24, k -= T, !(16 & (T = F >>> 16 & 255))) {
3276
+ if ((64 & T) == 0) {
3277
+ F = S[(65535 & F) + (v & (1 << T) - 1)];
3278
3278
  continue i;
3279
3279
  }
3280
- n.msg = "invalid distance code", a.mode = 30;
3280
+ n.msg = "invalid distance code", s.mode = 30;
3281
3281
  break t;
3282
3282
  }
3283
- if (K = 65535 & F, k < (B &= 15) && (v += l[c++] << k, (k += 8) < B && (v += l[c++] << k, k += 8)), d < (K += v & (1 << B) - 1)) {
3284
- n.msg = "invalid distance too far back", a.mode = 30;
3283
+ if (K = 65535 & F, k < (T &= 15) && (v += l[c++] << k, (k += 8) < T && (v += l[c++] << k, k += 8)), d < (K += v & (1 << T) - 1)) {
3284
+ n.msg = "invalid distance too far back", s.mode = 30;
3285
3285
  break t;
3286
3286
  }
3287
- if (v >>>= B, k -= B, (B = f - y) < K) {
3288
- if (h < (B = K - B) && a.sane) {
3289
- n.msg = "invalid distance too far back", a.mode = 30;
3287
+ if (v >>>= T, k -= T, (T = f - y) < K) {
3288
+ if (h < (T = K - T) && s.sane) {
3289
+ n.msg = "invalid distance too far back", s.mode = 30;
3290
3290
  break t;
3291
3291
  }
3292
3292
  if (D = u, (x = 0) === m) {
3293
- if (x += w - B, B < H) {
3294
- for (H -= B; M[f++] = u[x++], --B; ) ;
3295
- x = f - K, D = M;
3293
+ if (x += w - T, T < H) {
3294
+ for (H -= T; R[f++] = u[x++], --T; ) ;
3295
+ x = f - K, D = R;
3296
3296
  }
3297
- } else if (m < B) {
3298
- if (x += w + m - B, (B -= m) < H) {
3299
- for (H -= B; M[f++] = u[x++], --B; ) ;
3297
+ } else if (m < T) {
3298
+ if (x += w + m - T, (T -= m) < H) {
3299
+ for (H -= T; R[f++] = u[x++], --T; ) ;
3300
3300
  if (x = 0, m < H) {
3301
- for (H -= B = m; M[f++] = u[x++], --B; ) ;
3302
- x = f - K, D = M;
3301
+ for (H -= T = m; R[f++] = u[x++], --T; ) ;
3302
+ x = f - K, D = R;
3303
3303
  }
3304
3304
  }
3305
- } else if (x += m - B, B < H) {
3306
- for (H -= B; M[f++] = u[x++], --B; ) ;
3307
- x = f - K, D = M;
3305
+ } else if (x += m - T, T < H) {
3306
+ for (H -= T; R[f++] = u[x++], --T; ) ;
3307
+ x = f - K, D = R;
3308
3308
  }
3309
- for (; 2 < H; ) M[f++] = D[x++], M[f++] = D[x++], M[f++] = D[x++], H -= 3;
3310
- H && (M[f++] = D[x++], 1 < H && (M[f++] = D[x++]));
3309
+ for (; 2 < H; ) R[f++] = D[x++], R[f++] = D[x++], R[f++] = D[x++], H -= 3;
3310
+ H && (R[f++] = D[x++], 1 < H && (R[f++] = D[x++]));
3311
3311
  } else {
3312
- for (x = f - K; M[f++] = M[x++], M[f++] = M[x++], M[f++] = M[x++], 2 < (H -= 3); ) ;
3313
- H && (M[f++] = M[x++], 1 < H && (M[f++] = M[x++]));
3312
+ for (x = f - K; R[f++] = R[x++], R[f++] = R[x++], R[f++] = R[x++], 2 < (H -= 3); ) ;
3313
+ H && (R[f++] = R[x++], 1 < H && (R[f++] = R[x++]));
3314
3314
  }
3315
3315
  break;
3316
3316
  }
@@ -3318,10 +3318,10 @@ function Qt() {
3318
3318
  break;
3319
3319
  }
3320
3320
  } while (c < g && f < p);
3321
- c -= H = k >> 3, v &= (1 << (k -= H << 3)) - 1, n.next_in = c, n.next_out = f, n.avail_in = c < g ? g - c + 5 : 5 - (c - g), n.avail_out = f < p ? p - f + 257 : 257 - (f - p), a.hold = v, a.bits = k;
3321
+ c -= H = k >> 3, v &= (1 << (k -= H << 3)) - 1, n.next_in = c, n.next_out = f, n.avail_in = c < g ? g - c + 5 : 5 - (c - g), n.avail_out = f < p ? p - f + 257 : 257 - (f - p), s.hold = v, s.bits = k;
3322
3322
  };
3323
3323
  }, {}], 49: [function(e, i, r) {
3324
- var n = e("../utils/common"), o = e("./adler32"), a = e("./crc32"), c = e("./inffast"), g = e("./inftrees"), f = 1, y = 2, p = 0, d = -2, w = 1, h = 852, m = 592;
3324
+ var n = e("../utils/common"), o = e("./adler32"), s = e("./crc32"), c = e("./inffast"), g = e("./inftrees"), f = 1, y = 2, p = 0, d = -2, w = 1, h = 852, m = 592;
3325
3325
  function u(x) {
3326
3326
  return (x >>> 24 & 255) + (x >>> 8 & 65280) + ((65280 & x) << 8) + ((255 & x) << 24);
3327
3327
  }
@@ -3337,36 +3337,36 @@ function Qt() {
3337
3337
  return x && x.state ? ((D = x.state).wsize = 0, D.whave = 0, D.wnext = 0, k(x)) : d;
3338
3338
  }
3339
3339
  function S(x, D) {
3340
- var l, M;
3341
- return x && x.state ? (M = x.state, D < 0 ? (l = 0, D = -D) : (l = 1 + (D >> 4), D < 48 && (D &= 15)), D && (D < 8 || 15 < D) ? d : (M.window !== null && M.wbits !== D && (M.window = null), M.wrap = l, M.wbits = D, C(x))) : d;
3340
+ var l, R;
3341
+ return x && x.state ? (R = x.state, D < 0 ? (l = 0, D = -D) : (l = 1 + (D >> 4), D < 48 && (D &= 15)), D && (D < 8 || 15 < D) ? d : (R.window !== null && R.wbits !== D && (R.window = null), R.wrap = l, R.wbits = D, C(x))) : d;
3342
3342
  }
3343
- function R(x, D) {
3344
- var l, M;
3345
- return x ? (M = new v(), (x.state = M).window = null, (l = S(x, D)) !== p && (x.state = null), l) : d;
3343
+ function M(x, D) {
3344
+ var l, R;
3345
+ return x ? (R = new v(), (x.state = R).window = null, (l = S(x, D)) !== p && (x.state = null), l) : d;
3346
3346
  }
3347
- var T, F, B = !0;
3347
+ var A, F, T = !0;
3348
3348
  function H(x) {
3349
- if (B) {
3349
+ if (T) {
3350
3350
  var D;
3351
- for (T = new n.Buf32(512), F = new n.Buf32(32), D = 0; D < 144; ) x.lens[D++] = 8;
3351
+ for (A = new n.Buf32(512), F = new n.Buf32(32), D = 0; D < 144; ) x.lens[D++] = 8;
3352
3352
  for (; D < 256; ) x.lens[D++] = 9;
3353
3353
  for (; D < 280; ) x.lens[D++] = 7;
3354
3354
  for (; D < 288; ) x.lens[D++] = 8;
3355
- for (g(f, x.lens, 0, 288, T, 0, x.work, { bits: 9 }), D = 0; D < 32; ) x.lens[D++] = 5;
3356
- g(y, x.lens, 0, 32, F, 0, x.work, { bits: 5 }), B = !1;
3355
+ for (g(f, x.lens, 0, 288, A, 0, x.work, { bits: 9 }), D = 0; D < 32; ) x.lens[D++] = 5;
3356
+ g(y, x.lens, 0, 32, F, 0, x.work, { bits: 5 }), T = !1;
3357
3357
  }
3358
- x.lencode = T, x.lenbits = 9, x.distcode = F, x.distbits = 5;
3358
+ x.lencode = A, x.lenbits = 9, x.distcode = F, x.distbits = 5;
3359
3359
  }
3360
- function K(x, D, l, M) {
3360
+ function K(x, D, l, R) {
3361
3361
  var V, W = x.state;
3362
- return W.window === null && (W.wsize = 1 << W.wbits, W.wnext = 0, W.whave = 0, W.window = new n.Buf8(W.wsize)), M >= W.wsize ? (n.arraySet(W.window, D, l - W.wsize, W.wsize, 0), W.wnext = 0, W.whave = W.wsize) : (M < (V = W.wsize - W.wnext) && (V = M), n.arraySet(W.window, D, l - M, V, W.wnext), (M -= V) ? (n.arraySet(W.window, D, l - M, M, 0), W.wnext = M, W.whave = W.wsize) : (W.wnext += V, W.wnext === W.wsize && (W.wnext = 0), W.whave < W.wsize && (W.whave += V))), 0;
3362
+ return W.window === null && (W.wsize = 1 << W.wbits, W.wnext = 0, W.whave = 0, W.window = new n.Buf8(W.wsize)), R >= W.wsize ? (n.arraySet(W.window, D, l - W.wsize, W.wsize, 0), W.wnext = 0, W.whave = W.wsize) : (R < (V = W.wsize - W.wnext) && (V = R), n.arraySet(W.window, D, l - R, V, W.wnext), (R -= V) ? (n.arraySet(W.window, D, l - R, R, 0), W.wnext = R, W.whave = W.wsize) : (W.wnext += V, W.wnext === W.wsize && (W.wnext = 0), W.whave < W.wsize && (W.whave += V))), 0;
3363
3363
  }
3364
3364
  r.inflateReset = C, r.inflateReset2 = S, r.inflateResetKeep = k, r.inflateInit = function(x) {
3365
- return R(x, 15);
3366
- }, r.inflateInit2 = R, r.inflate = function(x, D) {
3367
- var l, M, V, W, Q, U, q, z, I, J, Y, X, ot, dt, tt, it, lt, st, ft, ut, s, L, A, _, b = 0, N = new n.Buf8(4), O = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
3365
+ return M(x, 15);
3366
+ }, r.inflateInit2 = M, r.inflate = function(x, D) {
3367
+ var l, R, V, W, Q, U, q, z, I, J, Y, X, ot, dt, tt, rt, lt, st, ft, ut, a, L, B, _, b = 0, N = new n.Buf8(4), O = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
3368
3368
  if (!x || !x.state || !x.output || !x.input && x.avail_in !== 0) return d;
3369
- (l = x.state).mode === 12 && (l.mode = 13), Q = x.next_out, V = x.output, q = x.avail_out, W = x.next_in, M = x.input, U = x.avail_in, z = l.hold, I = l.bits, J = U, Y = q, L = p;
3369
+ (l = x.state).mode === 12 && (l.mode = 13), Q = x.next_out, V = x.output, q = x.avail_out, W = x.next_in, R = x.input, U = x.avail_in, z = l.hold, I = l.bits, J = U, Y = q, L = p;
3370
3370
  t: for (; ; ) switch (l.mode) {
3371
3371
  case w:
3372
3372
  if (l.wrap === 0) {
@@ -3375,10 +3375,10 @@ function Qt() {
3375
3375
  }
3376
3376
  for (; I < 16; ) {
3377
3377
  if (U === 0) break t;
3378
- U--, z += M[W++] << I, I += 8;
3378
+ U--, z += R[W++] << I, I += 8;
3379
3379
  }
3380
3380
  if (2 & l.wrap && z === 35615) {
3381
- N[l.check = 0] = 255 & z, N[1] = z >>> 8 & 255, l.check = a(l.check, N, 2, 0), I = z = 0, l.mode = 2;
3381
+ N[l.check = 0] = 255 & z, N[1] = z >>> 8 & 255, l.check = s(l.check, N, 2, 0), I = z = 0, l.mode = 2;
3382
3382
  break;
3383
3383
  }
3384
3384
  if (l.flags = 0, l.head && (l.head.done = !1), !(1 & l.wrap) || (((255 & z) << 8) + (z >> 8)) % 31) {
@@ -3389,17 +3389,17 @@ function Qt() {
3389
3389
  x.msg = "unknown compression method", l.mode = 30;
3390
3390
  break;
3391
3391
  }
3392
- if (I -= 4, s = 8 + (15 & (z >>>= 4)), l.wbits === 0) l.wbits = s;
3393
- else if (s > l.wbits) {
3392
+ if (I -= 4, a = 8 + (15 & (z >>>= 4)), l.wbits === 0) l.wbits = a;
3393
+ else if (a > l.wbits) {
3394
3394
  x.msg = "invalid window size", l.mode = 30;
3395
3395
  break;
3396
3396
  }
3397
- l.dmax = 1 << s, x.adler = l.check = 1, l.mode = 512 & z ? 10 : 12, I = z = 0;
3397
+ l.dmax = 1 << a, x.adler = l.check = 1, l.mode = 512 & z ? 10 : 12, I = z = 0;
3398
3398
  break;
3399
3399
  case 2:
3400
3400
  for (; I < 16; ) {
3401
3401
  if (U === 0) break t;
3402
- U--, z += M[W++] << I, I += 8;
3402
+ U--, z += R[W++] << I, I += 8;
3403
3403
  }
3404
3404
  if (l.flags = z, (255 & l.flags) != 8) {
3405
3405
  x.msg = "unknown compression method", l.mode = 30;
@@ -3409,50 +3409,50 @@ function Qt() {
3409
3409
  x.msg = "unknown header flags set", l.mode = 30;
3410
3410
  break;
3411
3411
  }
3412
- l.head && (l.head.text = z >> 8 & 1), 512 & l.flags && (N[0] = 255 & z, N[1] = z >>> 8 & 255, l.check = a(l.check, N, 2, 0)), I = z = 0, l.mode = 3;
3412
+ l.head && (l.head.text = z >> 8 & 1), 512 & l.flags && (N[0] = 255 & z, N[1] = z >>> 8 & 255, l.check = s(l.check, N, 2, 0)), I = z = 0, l.mode = 3;
3413
3413
  case 3:
3414
3414
  for (; I < 32; ) {
3415
3415
  if (U === 0) break t;
3416
- U--, z += M[W++] << I, I += 8;
3416
+ U--, z += R[W++] << I, I += 8;
3417
3417
  }
3418
- l.head && (l.head.time = z), 512 & l.flags && (N[0] = 255 & z, N[1] = z >>> 8 & 255, N[2] = z >>> 16 & 255, N[3] = z >>> 24 & 255, l.check = a(l.check, N, 4, 0)), I = z = 0, l.mode = 4;
3418
+ l.head && (l.head.time = z), 512 & l.flags && (N[0] = 255 & z, N[1] = z >>> 8 & 255, N[2] = z >>> 16 & 255, N[3] = z >>> 24 & 255, l.check = s(l.check, N, 4, 0)), I = z = 0, l.mode = 4;
3419
3419
  case 4:
3420
3420
  for (; I < 16; ) {
3421
3421
  if (U === 0) break t;
3422
- U--, z += M[W++] << I, I += 8;
3422
+ U--, z += R[W++] << I, I += 8;
3423
3423
  }
3424
- l.head && (l.head.xflags = 255 & z, l.head.os = z >> 8), 512 & l.flags && (N[0] = 255 & z, N[1] = z >>> 8 & 255, l.check = a(l.check, N, 2, 0)), I = z = 0, l.mode = 5;
3424
+ l.head && (l.head.xflags = 255 & z, l.head.os = z >> 8), 512 & l.flags && (N[0] = 255 & z, N[1] = z >>> 8 & 255, l.check = s(l.check, N, 2, 0)), I = z = 0, l.mode = 5;
3425
3425
  case 5:
3426
3426
  if (1024 & l.flags) {
3427
3427
  for (; I < 16; ) {
3428
3428
  if (U === 0) break t;
3429
- U--, z += M[W++] << I, I += 8;
3429
+ U--, z += R[W++] << I, I += 8;
3430
3430
  }
3431
- l.length = z, l.head && (l.head.extra_len = z), 512 & l.flags && (N[0] = 255 & z, N[1] = z >>> 8 & 255, l.check = a(l.check, N, 2, 0)), I = z = 0;
3431
+ l.length = z, l.head && (l.head.extra_len = z), 512 & l.flags && (N[0] = 255 & z, N[1] = z >>> 8 & 255, l.check = s(l.check, N, 2, 0)), I = z = 0;
3432
3432
  } else l.head && (l.head.extra = null);
3433
3433
  l.mode = 6;
3434
3434
  case 6:
3435
- if (1024 & l.flags && (U < (X = l.length) && (X = U), X && (l.head && (s = l.head.extra_len - l.length, l.head.extra || (l.head.extra = new Array(l.head.extra_len)), n.arraySet(l.head.extra, M, W, X, s)), 512 & l.flags && (l.check = a(l.check, M, X, W)), U -= X, W += X, l.length -= X), l.length)) break t;
3435
+ if (1024 & l.flags && (U < (X = l.length) && (X = U), X && (l.head && (a = l.head.extra_len - l.length, l.head.extra || (l.head.extra = new Array(l.head.extra_len)), n.arraySet(l.head.extra, R, W, X, a)), 512 & l.flags && (l.check = s(l.check, R, X, W)), U -= X, W += X, l.length -= X), l.length)) break t;
3436
3436
  l.length = 0, l.mode = 7;
3437
3437
  case 7:
3438
3438
  if (2048 & l.flags) {
3439
3439
  if (U === 0) break t;
3440
- for (X = 0; s = M[W + X++], l.head && s && l.length < 65536 && (l.head.name += String.fromCharCode(s)), s && X < U; ) ;
3441
- if (512 & l.flags && (l.check = a(l.check, M, X, W)), U -= X, W += X, s) break t;
3440
+ for (X = 0; a = R[W + X++], l.head && a && l.length < 65536 && (l.head.name += String.fromCharCode(a)), a && X < U; ) ;
3441
+ if (512 & l.flags && (l.check = s(l.check, R, X, W)), U -= X, W += X, a) break t;
3442
3442
  } else l.head && (l.head.name = null);
3443
3443
  l.length = 0, l.mode = 8;
3444
3444
  case 8:
3445
3445
  if (4096 & l.flags) {
3446
3446
  if (U === 0) break t;
3447
- for (X = 0; s = M[W + X++], l.head && s && l.length < 65536 && (l.head.comment += String.fromCharCode(s)), s && X < U; ) ;
3448
- if (512 & l.flags && (l.check = a(l.check, M, X, W)), U -= X, W += X, s) break t;
3447
+ for (X = 0; a = R[W + X++], l.head && a && l.length < 65536 && (l.head.comment += String.fromCharCode(a)), a && X < U; ) ;
3448
+ if (512 & l.flags && (l.check = s(l.check, R, X, W)), U -= X, W += X, a) break t;
3449
3449
  } else l.head && (l.head.comment = null);
3450
3450
  l.mode = 9;
3451
3451
  case 9:
3452
3452
  if (512 & l.flags) {
3453
3453
  for (; I < 16; ) {
3454
3454
  if (U === 0) break t;
3455
- U--, z += M[W++] << I, I += 8;
3455
+ U--, z += R[W++] << I, I += 8;
3456
3456
  }
3457
3457
  if (z !== (65535 & l.check)) {
3458
3458
  x.msg = "header crc mismatch", l.mode = 30;
@@ -3465,7 +3465,7 @@ function Qt() {
3465
3465
  case 10:
3466
3466
  for (; I < 32; ) {
3467
3467
  if (U === 0) break t;
3468
- U--, z += M[W++] << I, I += 8;
3468
+ U--, z += R[W++] << I, I += 8;
3469
3469
  }
3470
3470
  x.adler = l.check = u(z), I = z = 0, l.mode = 11;
3471
3471
  case 11:
@@ -3480,7 +3480,7 @@ function Qt() {
3480
3480
  }
3481
3481
  for (; I < 3; ) {
3482
3482
  if (U === 0) break t;
3483
- U--, z += M[W++] << I, I += 8;
3483
+ U--, z += R[W++] << I, I += 8;
3484
3484
  }
3485
3485
  switch (l.last = 1 & z, I -= 1, 3 & (z >>>= 1)) {
3486
3486
  case 0:
@@ -3501,7 +3501,7 @@ function Qt() {
3501
3501
  case 14:
3502
3502
  for (z >>>= 7 & I, I -= 7 & I; I < 32; ) {
3503
3503
  if (U === 0) break t;
3504
- U--, z += M[W++] << I, I += 8;
3504
+ U--, z += R[W++] << I, I += 8;
3505
3505
  }
3506
3506
  if ((65535 & z) != (z >>> 16 ^ 65535)) {
3507
3507
  x.msg = "invalid stored block lengths", l.mode = 30;
@@ -3513,7 +3513,7 @@ function Qt() {
3513
3513
  case 16:
3514
3514
  if (X = l.length) {
3515
3515
  if (U < X && (X = U), q < X && (X = q), X === 0) break t;
3516
- n.arraySet(V, M, W, X, Q), U -= X, W += X, q -= X, Q += X, l.length -= X;
3516
+ n.arraySet(V, R, W, X, Q), U -= X, W += X, q -= X, Q += X, l.length -= X;
3517
3517
  break;
3518
3518
  }
3519
3519
  l.mode = 12;
@@ -3521,7 +3521,7 @@ function Qt() {
3521
3521
  case 17:
3522
3522
  for (; I < 14; ) {
3523
3523
  if (U === 0) break t;
3524
- U--, z += M[W++] << I, I += 8;
3524
+ U--, z += R[W++] << I, I += 8;
3525
3525
  }
3526
3526
  if (l.nlen = 257 + (31 & z), z >>>= 5, I -= 5, l.ndist = 1 + (31 & z), z >>>= 5, I -= 5, l.ncode = 4 + (15 & z), z >>>= 4, I -= 4, 286 < l.nlen || 30 < l.ndist) {
3527
3527
  x.msg = "too many length or distance symbols", l.mode = 30;
@@ -3532,52 +3532,52 @@ function Qt() {
3532
3532
  for (; l.have < l.ncode; ) {
3533
3533
  for (; I < 3; ) {
3534
3534
  if (U === 0) break t;
3535
- U--, z += M[W++] << I, I += 8;
3535
+ U--, z += R[W++] << I, I += 8;
3536
3536
  }
3537
3537
  l.lens[O[l.have++]] = 7 & z, z >>>= 3, I -= 3;
3538
3538
  }
3539
3539
  for (; l.have < 19; ) l.lens[O[l.have++]] = 0;
3540
- if (l.lencode = l.lendyn, l.lenbits = 7, A = { bits: l.lenbits }, L = g(0, l.lens, 0, 19, l.lencode, 0, l.work, A), l.lenbits = A.bits, L) {
3540
+ if (l.lencode = l.lendyn, l.lenbits = 7, B = { bits: l.lenbits }, L = g(0, l.lens, 0, 19, l.lencode, 0, l.work, B), l.lenbits = B.bits, L) {
3541
3541
  x.msg = "invalid code lengths set", l.mode = 30;
3542
3542
  break;
3543
3543
  }
3544
3544
  l.have = 0, l.mode = 19;
3545
3545
  case 19:
3546
3546
  for (; l.have < l.nlen + l.ndist; ) {
3547
- for (; it = (b = l.lencode[z & (1 << l.lenbits) - 1]) >>> 16 & 255, lt = 65535 & b, !((tt = b >>> 24) <= I); ) {
3547
+ for (; rt = (b = l.lencode[z & (1 << l.lenbits) - 1]) >>> 16 & 255, lt = 65535 & b, !((tt = b >>> 24) <= I); ) {
3548
3548
  if (U === 0) break t;
3549
- U--, z += M[W++] << I, I += 8;
3549
+ U--, z += R[W++] << I, I += 8;
3550
3550
  }
3551
3551
  if (lt < 16) z >>>= tt, I -= tt, l.lens[l.have++] = lt;
3552
3552
  else {
3553
3553
  if (lt === 16) {
3554
3554
  for (_ = tt + 2; I < _; ) {
3555
3555
  if (U === 0) break t;
3556
- U--, z += M[W++] << I, I += 8;
3556
+ U--, z += R[W++] << I, I += 8;
3557
3557
  }
3558
3558
  if (z >>>= tt, I -= tt, l.have === 0) {
3559
3559
  x.msg = "invalid bit length repeat", l.mode = 30;
3560
3560
  break;
3561
3561
  }
3562
- s = l.lens[l.have - 1], X = 3 + (3 & z), z >>>= 2, I -= 2;
3562
+ a = l.lens[l.have - 1], X = 3 + (3 & z), z >>>= 2, I -= 2;
3563
3563
  } else if (lt === 17) {
3564
3564
  for (_ = tt + 3; I < _; ) {
3565
3565
  if (U === 0) break t;
3566
- U--, z += M[W++] << I, I += 8;
3566
+ U--, z += R[W++] << I, I += 8;
3567
3567
  }
3568
- I -= tt, s = 0, X = 3 + (7 & (z >>>= tt)), z >>>= 3, I -= 3;
3568
+ I -= tt, a = 0, X = 3 + (7 & (z >>>= tt)), z >>>= 3, I -= 3;
3569
3569
  } else {
3570
3570
  for (_ = tt + 7; I < _; ) {
3571
3571
  if (U === 0) break t;
3572
- U--, z += M[W++] << I, I += 8;
3572
+ U--, z += R[W++] << I, I += 8;
3573
3573
  }
3574
- I -= tt, s = 0, X = 11 + (127 & (z >>>= tt)), z >>>= 7, I -= 7;
3574
+ I -= tt, a = 0, X = 11 + (127 & (z >>>= tt)), z >>>= 7, I -= 7;
3575
3575
  }
3576
3576
  if (l.have + X > l.nlen + l.ndist) {
3577
3577
  x.msg = "invalid bit length repeat", l.mode = 30;
3578
3578
  break;
3579
3579
  }
3580
- for (; X--; ) l.lens[l.have++] = s;
3580
+ for (; X--; ) l.lens[l.have++] = a;
3581
3581
  }
3582
3582
  }
3583
3583
  if (l.mode === 30) break;
@@ -3585,11 +3585,11 @@ function Qt() {
3585
3585
  x.msg = "invalid code -- missing end-of-block", l.mode = 30;
3586
3586
  break;
3587
3587
  }
3588
- if (l.lenbits = 9, A = { bits: l.lenbits }, L = g(f, l.lens, 0, l.nlen, l.lencode, 0, l.work, A), l.lenbits = A.bits, L) {
3588
+ if (l.lenbits = 9, B = { bits: l.lenbits }, L = g(f, l.lens, 0, l.nlen, l.lencode, 0, l.work, B), l.lenbits = B.bits, L) {
3589
3589
  x.msg = "invalid literal/lengths set", l.mode = 30;
3590
3590
  break;
3591
3591
  }
3592
- if (l.distbits = 6, l.distcode = l.distdyn, A = { bits: l.distbits }, L = g(y, l.lens, l.nlen, l.ndist, l.distcode, 0, l.work, A), l.distbits = A.bits, L) {
3592
+ if (l.distbits = 6, l.distcode = l.distdyn, B = { bits: l.distbits }, L = g(y, l.lens, l.nlen, l.ndist, l.distcode, 0, l.work, B), l.distbits = B.bits, L) {
3593
3593
  x.msg = "invalid distances set", l.mode = 30;
3594
3594
  break;
3595
3595
  }
@@ -3598,64 +3598,64 @@ function Qt() {
3598
3598
  l.mode = 21;
3599
3599
  case 21:
3600
3600
  if (6 <= U && 258 <= q) {
3601
- x.next_out = Q, x.avail_out = q, x.next_in = W, x.avail_in = U, l.hold = z, l.bits = I, c(x, Y), Q = x.next_out, V = x.output, q = x.avail_out, W = x.next_in, M = x.input, U = x.avail_in, z = l.hold, I = l.bits, l.mode === 12 && (l.back = -1);
3601
+ x.next_out = Q, x.avail_out = q, x.next_in = W, x.avail_in = U, l.hold = z, l.bits = I, c(x, Y), Q = x.next_out, V = x.output, q = x.avail_out, W = x.next_in, R = x.input, U = x.avail_in, z = l.hold, I = l.bits, l.mode === 12 && (l.back = -1);
3602
3602
  break;
3603
3603
  }
3604
- for (l.back = 0; it = (b = l.lencode[z & (1 << l.lenbits) - 1]) >>> 16 & 255, lt = 65535 & b, !((tt = b >>> 24) <= I); ) {
3604
+ for (l.back = 0; rt = (b = l.lencode[z & (1 << l.lenbits) - 1]) >>> 16 & 255, lt = 65535 & b, !((tt = b >>> 24) <= I); ) {
3605
3605
  if (U === 0) break t;
3606
- U--, z += M[W++] << I, I += 8;
3606
+ U--, z += R[W++] << I, I += 8;
3607
3607
  }
3608
- if (it && (240 & it) == 0) {
3609
- for (st = tt, ft = it, ut = lt; it = (b = l.lencode[ut + ((z & (1 << st + ft) - 1) >> st)]) >>> 16 & 255, lt = 65535 & b, !(st + (tt = b >>> 24) <= I); ) {
3608
+ if (rt && (240 & rt) == 0) {
3609
+ for (st = tt, ft = rt, ut = lt; rt = (b = l.lencode[ut + ((z & (1 << st + ft) - 1) >> st)]) >>> 16 & 255, lt = 65535 & b, !(st + (tt = b >>> 24) <= I); ) {
3610
3610
  if (U === 0) break t;
3611
- U--, z += M[W++] << I, I += 8;
3611
+ U--, z += R[W++] << I, I += 8;
3612
3612
  }
3613
3613
  z >>>= st, I -= st, l.back += st;
3614
3614
  }
3615
- if (z >>>= tt, I -= tt, l.back += tt, l.length = lt, it === 0) {
3615
+ if (z >>>= tt, I -= tt, l.back += tt, l.length = lt, rt === 0) {
3616
3616
  l.mode = 26;
3617
3617
  break;
3618
3618
  }
3619
- if (32 & it) {
3619
+ if (32 & rt) {
3620
3620
  l.back = -1, l.mode = 12;
3621
3621
  break;
3622
3622
  }
3623
- if (64 & it) {
3623
+ if (64 & rt) {
3624
3624
  x.msg = "invalid literal/length code", l.mode = 30;
3625
3625
  break;
3626
3626
  }
3627
- l.extra = 15 & it, l.mode = 22;
3627
+ l.extra = 15 & rt, l.mode = 22;
3628
3628
  case 22:
3629
3629
  if (l.extra) {
3630
3630
  for (_ = l.extra; I < _; ) {
3631
3631
  if (U === 0) break t;
3632
- U--, z += M[W++] << I, I += 8;
3632
+ U--, z += R[W++] << I, I += 8;
3633
3633
  }
3634
3634
  l.length += z & (1 << l.extra) - 1, z >>>= l.extra, I -= l.extra, l.back += l.extra;
3635
3635
  }
3636
3636
  l.was = l.length, l.mode = 23;
3637
3637
  case 23:
3638
- for (; it = (b = l.distcode[z & (1 << l.distbits) - 1]) >>> 16 & 255, lt = 65535 & b, !((tt = b >>> 24) <= I); ) {
3638
+ for (; rt = (b = l.distcode[z & (1 << l.distbits) - 1]) >>> 16 & 255, lt = 65535 & b, !((tt = b >>> 24) <= I); ) {
3639
3639
  if (U === 0) break t;
3640
- U--, z += M[W++] << I, I += 8;
3640
+ U--, z += R[W++] << I, I += 8;
3641
3641
  }
3642
- if ((240 & it) == 0) {
3643
- for (st = tt, ft = it, ut = lt; it = (b = l.distcode[ut + ((z & (1 << st + ft) - 1) >> st)]) >>> 16 & 255, lt = 65535 & b, !(st + (tt = b >>> 24) <= I); ) {
3642
+ if ((240 & rt) == 0) {
3643
+ for (st = tt, ft = rt, ut = lt; rt = (b = l.distcode[ut + ((z & (1 << st + ft) - 1) >> st)]) >>> 16 & 255, lt = 65535 & b, !(st + (tt = b >>> 24) <= I); ) {
3644
3644
  if (U === 0) break t;
3645
- U--, z += M[W++] << I, I += 8;
3645
+ U--, z += R[W++] << I, I += 8;
3646
3646
  }
3647
3647
  z >>>= st, I -= st, l.back += st;
3648
3648
  }
3649
- if (z >>>= tt, I -= tt, l.back += tt, 64 & it) {
3649
+ if (z >>>= tt, I -= tt, l.back += tt, 64 & rt) {
3650
3650
  x.msg = "invalid distance code", l.mode = 30;
3651
3651
  break;
3652
3652
  }
3653
- l.offset = lt, l.extra = 15 & it, l.mode = 24;
3653
+ l.offset = lt, l.extra = 15 & rt, l.mode = 24;
3654
3654
  case 24:
3655
3655
  if (l.extra) {
3656
3656
  for (_ = l.extra; I < _; ) {
3657
3657
  if (U === 0) break t;
3658
- U--, z += M[W++] << I, I += 8;
3658
+ U--, z += R[W++] << I, I += 8;
3659
3659
  }
3660
3660
  l.offset += z & (1 << l.extra) - 1, z >>>= l.extra, I -= l.extra, l.back += l.extra;
3661
3661
  }
@@ -3684,9 +3684,9 @@ function Qt() {
3684
3684
  if (l.wrap) {
3685
3685
  for (; I < 32; ) {
3686
3686
  if (U === 0) break t;
3687
- U--, z |= M[W++] << I, I += 8;
3687
+ U--, z |= R[W++] << I, I += 8;
3688
3688
  }
3689
- if (Y -= q, x.total_out += Y, l.total += Y, Y && (x.adler = l.check = l.flags ? a(l.check, V, Y, Q - Y) : o(l.check, V, Y, Q - Y)), Y = q, (l.flags ? z : u(z)) !== l.check) {
3689
+ if (Y -= q, x.total_out += Y, l.total += Y, Y && (x.adler = l.check = l.flags ? s(l.check, V, Y, Q - Y) : o(l.check, V, Y, Q - Y)), Y = q, (l.flags ? z : u(z)) !== l.check) {
3690
3690
  x.msg = "incorrect data check", l.mode = 30;
3691
3691
  break;
3692
3692
  }
@@ -3697,7 +3697,7 @@ function Qt() {
3697
3697
  if (l.wrap && l.flags) {
3698
3698
  for (; I < 32; ) {
3699
3699
  if (U === 0) break t;
3700
- U--, z += M[W++] << I, I += 8;
3700
+ U--, z += R[W++] << I, I += 8;
3701
3701
  }
3702
3702
  if (z !== (4294967295 & l.total)) {
3703
3703
  x.msg = "incorrect length check", l.mode = 30;
@@ -3717,7 +3717,7 @@ function Qt() {
3717
3717
  default:
3718
3718
  return d;
3719
3719
  }
3720
- return x.next_out = Q, x.avail_out = q, x.next_in = W, x.avail_in = U, l.hold = z, l.bits = I, (l.wsize || Y !== x.avail_out && l.mode < 30 && (l.mode < 27 || D !== 4)) && K(x, x.output, x.next_out, Y - x.avail_out) ? (l.mode = 31, -4) : (J -= x.avail_in, Y -= x.avail_out, x.total_in += J, x.total_out += Y, l.total += Y, l.wrap && Y && (x.adler = l.check = l.flags ? a(l.check, V, Y, x.next_out - Y) : o(l.check, V, Y, x.next_out - Y)), x.data_type = l.bits + (l.last ? 64 : 0) + (l.mode === 12 ? 128 : 0) + (l.mode === 20 || l.mode === 15 ? 256 : 0), (J == 0 && Y === 0 || D === 4) && L === p && (L = -5), L);
3720
+ return x.next_out = Q, x.avail_out = q, x.next_in = W, x.avail_in = U, l.hold = z, l.bits = I, (l.wsize || Y !== x.avail_out && l.mode < 30 && (l.mode < 27 || D !== 4)) && K(x, x.output, x.next_out, Y - x.avail_out) ? (l.mode = 31, -4) : (J -= x.avail_in, Y -= x.avail_out, x.total_in += J, x.total_out += Y, l.total += Y, l.wrap && Y && (x.adler = l.check = l.flags ? s(l.check, V, Y, x.next_out - Y) : o(l.check, V, Y, x.next_out - Y)), x.data_type = l.bits + (l.last ? 64 : 0) + (l.mode === 12 ? 128 : 0) + (l.mode === 20 || l.mode === 15 ? 256 : 0), (J == 0 && Y === 0 || D === 4) && L === p && (L = -5), L);
3721
3721
  }, r.inflateEnd = function(x) {
3722
3722
  if (!x || !x.state) return d;
3723
3723
  var D = x.state;
@@ -3726,46 +3726,46 @@ function Qt() {
3726
3726
  var l;
3727
3727
  return x && x.state ? (2 & (l = x.state).wrap) == 0 ? d : ((l.head = D).done = !1, p) : d;
3728
3728
  }, r.inflateSetDictionary = function(x, D) {
3729
- var l, M = D.length;
3730
- return x && x.state ? (l = x.state).wrap !== 0 && l.mode !== 11 ? d : l.mode === 11 && o(1, D, M, 0) !== l.check ? -3 : K(x, D, M, M) ? (l.mode = 31, -4) : (l.havedict = 1, p) : d;
3729
+ var l, R = D.length;
3730
+ return x && x.state ? (l = x.state).wrap !== 0 && l.mode !== 11 ? d : l.mode === 11 && o(1, D, R, 0) !== l.check ? -3 : K(x, D, R, R) ? (l.mode = 31, -4) : (l.havedict = 1, p) : d;
3731
3731
  }, r.inflateInfo = "pako inflate (from Nodeca project)";
3732
3732
  }, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(e, i, r) {
3733
- var n = e("../utils/common"), o = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], a = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], c = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], g = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
3733
+ var n = e("../utils/common"), o = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], s = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], c = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], g = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
3734
3734
  i.exports = function(f, y, p, d, w, h, m, u) {
3735
- var v, k, C, S, R, T, F, B, H, K = u.bits, x = 0, D = 0, l = 0, M = 0, V = 0, W = 0, Q = 0, U = 0, q = 0, z = 0, I = null, J = 0, Y = new n.Buf16(16), X = new n.Buf16(16), ot = null, dt = 0;
3735
+ var v, k, C, S, M, A, F, T, H, K = u.bits, x = 0, D = 0, l = 0, R = 0, V = 0, W = 0, Q = 0, U = 0, q = 0, z = 0, I = null, J = 0, Y = new n.Buf16(16), X = new n.Buf16(16), ot = null, dt = 0;
3736
3736
  for (x = 0; x <= 15; x++) Y[x] = 0;
3737
3737
  for (D = 0; D < d; D++) Y[y[p + D]]++;
3738
- for (V = K, M = 15; 1 <= M && Y[M] === 0; M--) ;
3739
- if (M < V && (V = M), M === 0) return w[h++] = 20971520, w[h++] = 20971520, u.bits = 1, 0;
3740
- for (l = 1; l < M && Y[l] === 0; l++) ;
3738
+ for (V = K, R = 15; 1 <= R && Y[R] === 0; R--) ;
3739
+ if (R < V && (V = R), R === 0) return w[h++] = 20971520, w[h++] = 20971520, u.bits = 1, 0;
3740
+ for (l = 1; l < R && Y[l] === 0; l++) ;
3741
3741
  for (V < l && (V = l), x = U = 1; x <= 15; x++) if (U <<= 1, (U -= Y[x]) < 0) return -1;
3742
- if (0 < U && (f === 0 || M !== 1)) return -1;
3742
+ if (0 < U && (f === 0 || R !== 1)) return -1;
3743
3743
  for (X[1] = 0, x = 1; x < 15; x++) X[x + 1] = X[x] + Y[x];
3744
3744
  for (D = 0; D < d; D++) y[p + D] !== 0 && (m[X[y[p + D]]++] = D);
3745
- if (T = f === 0 ? (I = ot = m, 19) : f === 1 ? (I = o, J -= 257, ot = a, dt -= 257, 256) : (I = c, ot = g, -1), x = l, R = h, Q = D = z = 0, C = -1, S = (q = 1 << (W = V)) - 1, f === 1 && 852 < q || f === 2 && 592 < q) return 1;
3745
+ if (A = f === 0 ? (I = ot = m, 19) : f === 1 ? (I = o, J -= 257, ot = s, dt -= 257, 256) : (I = c, ot = g, -1), x = l, M = h, Q = D = z = 0, C = -1, S = (q = 1 << (W = V)) - 1, f === 1 && 852 < q || f === 2 && 592 < q) return 1;
3746
3746
  for (; ; ) {
3747
- for (F = x - Q, H = m[D] < T ? (B = 0, m[D]) : m[D] > T ? (B = ot[dt + m[D]], I[J + m[D]]) : (B = 96, 0), v = 1 << x - Q, l = k = 1 << W; w[R + (z >> Q) + (k -= v)] = F << 24 | B << 16 | H | 0, k !== 0; ) ;
3747
+ for (F = x - Q, H = m[D] < A ? (T = 0, m[D]) : m[D] > A ? (T = ot[dt + m[D]], I[J + m[D]]) : (T = 96, 0), v = 1 << x - Q, l = k = 1 << W; w[M + (z >> Q) + (k -= v)] = F << 24 | T << 16 | H | 0, k !== 0; ) ;
3748
3748
  for (v = 1 << x - 1; z & v; ) v >>= 1;
3749
3749
  if (v !== 0 ? (z &= v - 1, z += v) : z = 0, D++, --Y[x] == 0) {
3750
- if (x === M) break;
3750
+ if (x === R) break;
3751
3751
  x = y[p + m[D]];
3752
3752
  }
3753
3753
  if (V < x && (z & S) !== C) {
3754
- for (Q === 0 && (Q = V), R += l, U = 1 << (W = x - Q); W + Q < M && !((U -= Y[W + Q]) <= 0); ) W++, U <<= 1;
3754
+ for (Q === 0 && (Q = V), M += l, U = 1 << (W = x - Q); W + Q < R && !((U -= Y[W + Q]) <= 0); ) W++, U <<= 1;
3755
3755
  if (q += 1 << W, f === 1 && 852 < q || f === 2 && 592 < q) return 1;
3756
- w[C = z & S] = V << 24 | W << 16 | R - h | 0;
3756
+ w[C = z & S] = V << 24 | W << 16 | M - h | 0;
3757
3757
  }
3758
3758
  }
3759
- return z !== 0 && (w[R + z] = x - Q << 24 | 64 << 16 | 0), u.bits = V, 0;
3759
+ return z !== 0 && (w[M + z] = x - Q << 24 | 64 << 16 | 0), u.bits = V, 0;
3760
3760
  };
3761
3761
  }, { "../utils/common": 41 }], 51: [function(e, i, r) {
3762
3762
  i.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
3763
3763
  }, {}], 52: [function(e, i, r) {
3764
- var n = e("../utils/common"), o = 0, a = 1;
3764
+ var n = e("../utils/common"), o = 0, s = 1;
3765
3765
  function c(b) {
3766
3766
  for (var N = b.length; 0 <= --N; ) b[N] = 0;
3767
3767
  }
3768
- var g = 0, f = 29, y = 256, p = y + 1 + f, d = 30, w = 19, h = 2 * p + 1, m = 15, u = 16, v = 7, k = 256, C = 16, S = 17, R = 18, T = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], F = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], B = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], H = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], K = new Array(2 * (p + 2));
3768
+ var g = 0, f = 29, y = 256, p = y + 1 + f, d = 30, w = 19, h = 2 * p + 1, m = 15, u = 16, v = 7, k = 256, C = 16, S = 17, M = 18, A = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], F = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], T = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], H = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], K = new Array(2 * (p + 2));
3769
3769
  c(K);
3770
3770
  var x = new Array(2 * d);
3771
3771
  c(x);
@@ -3773,8 +3773,8 @@ function Qt() {
3773
3773
  c(D);
3774
3774
  var l = new Array(256);
3775
3775
  c(l);
3776
- var M = new Array(f);
3777
- c(M);
3776
+ var R = new Array(f);
3777
+ c(R);
3778
3778
  var V, W, Q, U = new Array(d);
3779
3779
  function q(b, N, O, P, E) {
3780
3780
  this.static_tree = b, this.extra_bits = N, this.extra_base = O, this.elems = P, this.max_length = E, this.has_stree = b && b.length;
@@ -3813,7 +3813,7 @@ function Qt() {
3813
3813
  for (N = 0; N < w; N++) b.bl_tree[2 * N] = 0;
3814
3814
  b.dyn_ltree[2 * k] = 1, b.opt_len = b.static_len = 0, b.last_lit = b.matches = 0;
3815
3815
  }
3816
- function it(b) {
3816
+ function rt(b) {
3817
3817
  8 < b.bi_valid ? J(b, b.bi_buf) : 0 < b.bi_valid && (b.pending_buf[b.pending++] = b.bi_buf), b.bi_buf = 0, b.bi_valid = 0;
3818
3818
  }
3819
3819
  function lt(b, N, O, P) {
@@ -3826,7 +3826,7 @@ function Qt() {
3826
3826
  }
3827
3827
  function ft(b, N, O) {
3828
3828
  var P, E, j, G, Z = 0;
3829
- if (b.last_lit !== 0) for (; P = b.pending_buf[b.d_buf + 2 * Z] << 8 | b.pending_buf[b.d_buf + 2 * Z + 1], E = b.pending_buf[b.l_buf + Z], Z++, P === 0 ? X(b, E, N) : (X(b, (j = l[E]) + y + 1, N), (G = T[j]) !== 0 && Y(b, E -= M[j], G), X(b, j = I(--P), O), (G = F[j]) !== 0 && Y(b, P -= U[j], G)), Z < b.last_lit; ) ;
3829
+ if (b.last_lit !== 0) for (; P = b.pending_buf[b.d_buf + 2 * Z] << 8 | b.pending_buf[b.d_buf + 2 * Z + 1], E = b.pending_buf[b.l_buf + Z], Z++, P === 0 ? X(b, E, N) : (X(b, (j = l[E]) + y + 1, N), (G = A[j]) !== 0 && Y(b, E -= R[j], G), X(b, j = I(--P), O), (G = F[j]) !== 0 && Y(b, P -= U[j], G)), Z < b.last_lit; ) ;
3830
3830
  X(b, k, N);
3831
3831
  }
3832
3832
  function ut(b, N) {
@@ -3836,9 +3836,9 @@ function Qt() {
3836
3836
  for (N.max_code = nt, O = b.heap_len >> 1; 1 <= O; O--) st(b, j, O);
3837
3837
  for (E = $; O = b.heap[1], b.heap[1] = b.heap[b.heap_len--], st(b, j, 1), P = b.heap[1], b.heap[--b.heap_max] = O, b.heap[--b.heap_max] = P, j[2 * E] = j[2 * O] + j[2 * P], b.depth[E] = (b.depth[O] >= b.depth[P] ? b.depth[O] : b.depth[P]) + 1, j[2 * O + 1] = j[2 * P + 1] = E, b.heap[1] = E++, st(b, j, 1), 2 <= b.heap_len; ) ;
3838
3838
  b.heap[--b.heap_max] = b.heap[1], (function(et, ht) {
3839
- var vt, pt, bt, at, _t, Ct, mt = ht.dyn_tree, zt = ht.max_code, Mt = ht.stat_desc.static_tree, Lt = ht.stat_desc.has_stree, Ot = ht.stat_desc.extra_bits, At = ht.stat_desc.extra_base, wt = ht.stat_desc.max_length, xt = 0;
3839
+ var vt, pt, bt, at, _t, Ct, mt = ht.dyn_tree, zt = ht.max_code, Ot = ht.stat_desc.static_tree, Pt = ht.stat_desc.has_stree, Ft = ht.stat_desc.extra_bits, Bt = ht.stat_desc.extra_base, wt = ht.stat_desc.max_length, xt = 0;
3840
3840
  for (at = 0; at <= m; at++) et.bl_count[at] = 0;
3841
- for (mt[2 * et.heap[et.heap_max] + 1] = 0, vt = et.heap_max + 1; vt < h; vt++) wt < (at = mt[2 * mt[2 * (pt = et.heap[vt]) + 1] + 1] + 1) && (at = wt, xt++), mt[2 * pt + 1] = at, zt < pt || (et.bl_count[at]++, _t = 0, At <= pt && (_t = Ot[pt - At]), Ct = mt[2 * pt], et.opt_len += Ct * (at + _t), Lt && (et.static_len += Ct * (Mt[2 * pt + 1] + _t)));
3841
+ for (mt[2 * et.heap[et.heap_max] + 1] = 0, vt = et.heap_max + 1; vt < h; vt++) wt < (at = mt[2 * mt[2 * (pt = et.heap[vt]) + 1] + 1] + 1) && (at = wt, xt++), mt[2 * pt + 1] = at, zt < pt || (et.bl_count[at]++, _t = 0, Bt <= pt && (_t = Ft[pt - Bt]), Ct = mt[2 * pt], et.opt_len += Ct * (at + _t), Pt && (et.static_len += Ct * (Ot[2 * pt + 1] + _t)));
3842
3842
  if (xt !== 0) {
3843
3843
  do {
3844
3844
  for (at = wt - 1; et.bl_count[at] === 0; ) at--;
@@ -3848,29 +3848,29 @@ function Qt() {
3848
3848
  }
3849
3849
  })(b, N), dt(j, nt, b.bl_count);
3850
3850
  }
3851
- function s(b, N, O) {
3851
+ function a(b, N, O) {
3852
3852
  var P, E, j = -1, G = N[1], Z = 0, $ = 7, nt = 4;
3853
- for (G === 0 && ($ = 138, nt = 3), N[2 * (O + 1) + 1] = 65535, P = 0; P <= O; P++) E = G, G = N[2 * (P + 1) + 1], ++Z < $ && E === G || (Z < nt ? b.bl_tree[2 * E] += Z : E !== 0 ? (E !== j && b.bl_tree[2 * E]++, b.bl_tree[2 * C]++) : Z <= 10 ? b.bl_tree[2 * S]++ : b.bl_tree[2 * R]++, j = E, nt = (Z = 0) === G ? ($ = 138, 3) : E === G ? ($ = 6, 3) : ($ = 7, 4));
3853
+ for (G === 0 && ($ = 138, nt = 3), N[2 * (O + 1) + 1] = 65535, P = 0; P <= O; P++) E = G, G = N[2 * (P + 1) + 1], ++Z < $ && E === G || (Z < nt ? b.bl_tree[2 * E] += Z : E !== 0 ? (E !== j && b.bl_tree[2 * E]++, b.bl_tree[2 * C]++) : Z <= 10 ? b.bl_tree[2 * S]++ : b.bl_tree[2 * M]++, j = E, nt = (Z = 0) === G ? ($ = 138, 3) : E === G ? ($ = 6, 3) : ($ = 7, 4));
3854
3854
  }
3855
3855
  function L(b, N, O) {
3856
3856
  var P, E, j = -1, G = N[1], Z = 0, $ = 7, nt = 4;
3857
3857
  for (G === 0 && ($ = 138, nt = 3), P = 0; P <= O; P++) if (E = G, G = N[2 * (P + 1) + 1], !(++Z < $ && E === G)) {
3858
3858
  if (Z < nt) for (; X(b, E, b.bl_tree), --Z != 0; ) ;
3859
- else E !== 0 ? (E !== j && (X(b, E, b.bl_tree), Z--), X(b, C, b.bl_tree), Y(b, Z - 3, 2)) : Z <= 10 ? (X(b, S, b.bl_tree), Y(b, Z - 3, 3)) : (X(b, R, b.bl_tree), Y(b, Z - 11, 7));
3859
+ else E !== 0 ? (E !== j && (X(b, E, b.bl_tree), Z--), X(b, C, b.bl_tree), Y(b, Z - 3, 2)) : Z <= 10 ? (X(b, S, b.bl_tree), Y(b, Z - 3, 3)) : (X(b, M, b.bl_tree), Y(b, Z - 11, 7));
3860
3860
  j = E, nt = (Z = 0) === G ? ($ = 138, 3) : E === G ? ($ = 6, 3) : ($ = 7, 4);
3861
3861
  }
3862
3862
  }
3863
3863
  c(U);
3864
- var A = !1;
3864
+ var B = !1;
3865
3865
  function _(b, N, O, P) {
3866
3866
  Y(b, (g << 1) + (P ? 1 : 0), 3), (function(E, j, G, Z) {
3867
- it(E), J(E, G), J(E, ~G), n.arraySet(E.pending_buf, E.window, j, G, E.pending), E.pending += G;
3867
+ rt(E), J(E, G), J(E, ~G), n.arraySet(E.pending_buf, E.window, j, G, E.pending), E.pending += G;
3868
3868
  })(b, N, O);
3869
3869
  }
3870
3870
  r._tr_init = function(b) {
3871
- A || ((function() {
3871
+ B || ((function() {
3872
3872
  var N, O, P, E, j, G = new Array(m + 1);
3873
- for (E = P = 0; E < f - 1; E++) for (M[E] = P, N = 0; N < 1 << T[E]; N++) l[P++] = E;
3873
+ for (E = P = 0; E < f - 1; E++) for (R[E] = P, N = 0; N < 1 << A[E]; N++) l[P++] = E;
3874
3874
  for (l[P - 1] = E, E = j = 0; E < 16; E++) for (U[E] = j, N = 0; N < 1 << F[E]; N++) D[j++] = E;
3875
3875
  for (j >>= 7; E < d; E++) for (U[E] = j << 7, N = 0; N < 1 << F[E] - 7; N++) D[256 + j++] = E;
3876
3876
  for (O = 0; O <= m; O++) G[O] = 0;
@@ -3879,25 +3879,25 @@ function Qt() {
3879
3879
  for (; N <= 279; ) K[2 * N + 1] = 7, N++, G[7]++;
3880
3880
  for (; N <= 287; ) K[2 * N + 1] = 8, N++, G[8]++;
3881
3881
  for (dt(K, p + 1, G), N = 0; N < d; N++) x[2 * N + 1] = 5, x[2 * N] = ot(N, 5);
3882
- V = new q(K, T, y + 1, p, m), W = new q(x, F, 0, d, m), Q = new q(new Array(0), B, 0, w, v);
3883
- })(), A = !0), b.l_desc = new z(b.dyn_ltree, V), b.d_desc = new z(b.dyn_dtree, W), b.bl_desc = new z(b.bl_tree, Q), b.bi_buf = 0, b.bi_valid = 0, tt(b);
3882
+ V = new q(K, A, y + 1, p, m), W = new q(x, F, 0, d, m), Q = new q(new Array(0), T, 0, w, v);
3883
+ })(), B = !0), b.l_desc = new z(b.dyn_ltree, V), b.d_desc = new z(b.dyn_dtree, W), b.bl_desc = new z(b.bl_tree, Q), b.bi_buf = 0, b.bi_valid = 0, tt(b);
3884
3884
  }, r._tr_stored_block = _, r._tr_flush_block = function(b, N, O, P) {
3885
3885
  var E, j, G = 0;
3886
3886
  0 < b.level ? (b.strm.data_type === 2 && (b.strm.data_type = (function(Z) {
3887
3887
  var $, nt = 4093624447;
3888
3888
  for ($ = 0; $ <= 31; $++, nt >>>= 1) if (1 & nt && Z.dyn_ltree[2 * $] !== 0) return o;
3889
- if (Z.dyn_ltree[18] !== 0 || Z.dyn_ltree[20] !== 0 || Z.dyn_ltree[26] !== 0) return a;
3890
- for ($ = 32; $ < y; $++) if (Z.dyn_ltree[2 * $] !== 0) return a;
3889
+ if (Z.dyn_ltree[18] !== 0 || Z.dyn_ltree[20] !== 0 || Z.dyn_ltree[26] !== 0) return s;
3890
+ for ($ = 32; $ < y; $++) if (Z.dyn_ltree[2 * $] !== 0) return s;
3891
3891
  return o;
3892
3892
  })(b)), ut(b, b.l_desc), ut(b, b.d_desc), G = (function(Z) {
3893
3893
  var $;
3894
- for (s(Z, Z.dyn_ltree, Z.l_desc.max_code), s(Z, Z.dyn_dtree, Z.d_desc.max_code), ut(Z, Z.bl_desc), $ = w - 1; 3 <= $ && Z.bl_tree[2 * H[$] + 1] === 0; $--) ;
3894
+ for (a(Z, Z.dyn_ltree, Z.l_desc.max_code), a(Z, Z.dyn_dtree, Z.d_desc.max_code), ut(Z, Z.bl_desc), $ = w - 1; 3 <= $ && Z.bl_tree[2 * H[$] + 1] === 0; $--) ;
3895
3895
  return Z.opt_len += 3 * ($ + 1) + 5 + 5 + 4, $;
3896
3896
  })(b), E = b.opt_len + 3 + 7 >>> 3, (j = b.static_len + 3 + 7 >>> 3) <= E && (E = j)) : E = j = O + 5, O + 4 <= E && N !== -1 ? _(b, N, O, P) : b.strategy === 4 || j === E ? (Y(b, 2 + (P ? 1 : 0), 3), ft(b, K, x)) : (Y(b, 4 + (P ? 1 : 0), 3), (function(Z, $, nt, et) {
3897
3897
  var ht;
3898
3898
  for (Y(Z, $ - 257, 5), Y(Z, nt - 1, 5), Y(Z, et - 4, 4), ht = 0; ht < et; ht++) Y(Z, Z.bl_tree[2 * H[ht] + 1], 3);
3899
3899
  L(Z, Z.dyn_ltree, $ - 1), L(Z, Z.dyn_dtree, nt - 1);
3900
- })(b, b.l_desc.max_code + 1, b.d_desc.max_code + 1, G + 1), ft(b, b.dyn_ltree, b.dyn_dtree)), tt(b), P && it(b);
3900
+ })(b, b.l_desc.max_code + 1, b.d_desc.max_code + 1, G + 1), ft(b, b.dyn_ltree, b.dyn_dtree)), tt(b), P && rt(b);
3901
3901
  }, r._tr_tally = function(b, N, O) {
3902
3902
  return b.pending_buf[b.d_buf + 2 * b.last_lit] = N >>> 8 & 255, b.pending_buf[b.d_buf + 2 * b.last_lit + 1] = 255 & N, b.pending_buf[b.l_buf + b.last_lit] = 255 & O, b.last_lit++, N === 0 ? b.dyn_ltree[2 * O]++ : (b.matches++, N--, b.dyn_ltree[2 * (l[O] + y + 1)]++, b.dyn_dtree[2 * I(N)]++), b.last_lit === b.lit_bufsize - 1;
3903
3903
  }, r._tr_align = function(b) {
@@ -3911,7 +3911,7 @@ function Qt() {
3911
3911
  };
3912
3912
  }, {}], 54: [function(e, i, r) {
3913
3913
  (function(n) {
3914
- (function(o, a) {
3914
+ (function(o, s) {
3915
3915
  if (!o.setImmediate) {
3916
3916
  var c, g, f, y, p = 1, d = {}, w = !1, h = o.document, m = Object.getPrototypeOf && Object.getPrototypeOf(o);
3917
3917
  m = m && m.setTimeout ? m : o, c = {}.toString.call(o.process) === "[object process]" ? function(C) {
@@ -3940,9 +3940,9 @@ function Qt() {
3940
3940
  setTimeout(v, 0, C);
3941
3941
  }, m.setImmediate = function(C) {
3942
3942
  typeof C != "function" && (C = new Function("" + C));
3943
- for (var S = new Array(arguments.length - 1), R = 0; R < S.length; R++) S[R] = arguments[R + 1];
3944
- var T = { callback: C, args: S };
3945
- return d[p] = T, c(p), p++;
3943
+ for (var S = new Array(arguments.length - 1), M = 0; M < S.length; M++) S[M] = arguments[M + 1];
3944
+ var A = { callback: C, args: S };
3945
+ return d[p] = A, c(p), p++;
3946
3946
  }, m.clearImmediate = u;
3947
3947
  }
3948
3948
  function u(C) {
@@ -3955,23 +3955,23 @@ function Qt() {
3955
3955
  if (S) {
3956
3956
  w = !0;
3957
3957
  try {
3958
- (function(R) {
3959
- var T = R.callback, F = R.args;
3958
+ (function(M) {
3959
+ var A = M.callback, F = M.args;
3960
3960
  switch (F.length) {
3961
3961
  case 0:
3962
- T();
3962
+ A();
3963
3963
  break;
3964
3964
  case 1:
3965
- T(F[0]);
3965
+ A(F[0]);
3966
3966
  break;
3967
3967
  case 2:
3968
- T(F[0], F[1]);
3968
+ A(F[0], F[1]);
3969
3969
  break;
3970
3970
  case 3:
3971
- T(F[0], F[1], F[2]);
3971
+ A(F[0], F[1], F[2]);
3972
3972
  break;
3973
3973
  default:
3974
- T.apply(a, F);
3974
+ A.apply(s, F);
3975
3975
  }
3976
3976
  })(S);
3977
3977
  } finally {
@@ -3989,20 +3989,20 @@ function Qt() {
3989
3989
  });
3990
3990
  })(Et)), Et.exports;
3991
3991
  }
3992
- var te = Qt();
3993
- const ee = /* @__PURE__ */ qt(te);
3994
- class Rt {
3992
+ var ie = ee();
3993
+ const re = /* @__PURE__ */ te(ie);
3994
+ class Lt {
3995
3995
  generate() {
3996
3996
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : Date.now().toString(36) + Math.random().toString(36).substr(2);
3997
3997
  }
3998
3998
  }
3999
- class ie {
3999
+ class Dt {
4000
4000
  idGenerator;
4001
4001
  constructor() {
4002
- this.idGenerator = new Rt();
4002
+ this.idGenerator = new Lt();
4003
4003
  }
4004
4004
  async extractMindMapData(t) {
4005
- const e = new ee();
4005
+ const e = new re();
4006
4006
  try {
4007
4007
  const r = (await e.loadAsync(t)).file("content.json");
4008
4008
  if (!r)
@@ -4010,9 +4010,9 @@ class ie {
4010
4010
  const n = await r.async("text"), o = JSON.parse(n);
4011
4011
  if (!Array.isArray(o) || o.length === 0)
4012
4012
  throw new Error("Invalid XMind file: No content found");
4013
- const a = o[0];
4013
+ const s = o[0];
4014
4014
  return {
4015
- nodeData: await this.transformTopic(a.rootTopic, e, !0),
4015
+ nodeData: await this.transformTopic(s.rootTopic, e, !0),
4016
4016
  theme: "default",
4017
4017
  // XMind themes are complex, we'll default to 'default'
4018
4018
  direction: 1
@@ -4025,19 +4025,19 @@ class ie {
4025
4025
  async transformTopic(t, e, i = !1) {
4026
4026
  const r = this.idGenerator.generate(), n = [];
4027
4027
  if (t.children && t.children.attached)
4028
- for (const a of t.children.attached)
4029
- n.push(await this.transformTopic(a, e, !1));
4028
+ for (const s of t.children.attached)
4029
+ n.push(await this.transformTopic(s, e, !1));
4030
4030
  let o;
4031
4031
  if (t.image && t.image.src && t.image.src.startsWith("xap:")) {
4032
- const a = t.image.src.substring(4), c = e.file(a);
4032
+ const s = t.image.src.substring(4), c = e.file(s);
4033
4033
  if (c) {
4034
- const g = await c.async("base64"), f = a.split(".").pop()?.toLowerCase();
4034
+ const g = await c.async("base64"), f = s.split(".").pop()?.toLowerCase();
4035
4035
  let y = "image/png";
4036
4036
  f === "jpg" || f === "jpeg" ? y = "image/jpeg" : f === "svg" ? y = "image/svg+xml" : f === "gif" && (y = "image/gif"), o = `data:${y};base64,${g}`;
4037
4037
  }
4038
4038
  }
4039
4039
  if (t.title && o) {
4040
- const a = {
4040
+ const s = {
4041
4041
  id: r,
4042
4042
  topic: t.title,
4043
4043
  root: i,
@@ -4049,7 +4049,7 @@ class ie {
4049
4049
  image: o,
4050
4050
  children: []
4051
4051
  };
4052
- return a.children?.push(g), a;
4052
+ return s.children?.push(g), s;
4053
4053
  } else return o ? {
4054
4054
  id: r,
4055
4055
  topic: "",
@@ -4065,57 +4065,13 @@ class ie {
4065
4065
  };
4066
4066
  }
4067
4067
  }
4068
- class Dt {
4069
- async exportToSvg(t) {
4070
- try {
4071
- const e = this.createSvgString(t), i = new Blob([e], { type: "image/svg+xml;charset=utf-8" });
4072
- await this.saveFile(i, "mindmap.svg", [
4073
- { description: "SVG File", accept: { "image/svg+xml": [".svg"] } }
4074
- ]);
4075
- } catch (e) {
4076
- e.name !== "AbortError" && (console.error("Failed to export SVG:", e), alert("Failed to export SVG."));
4077
- }
4078
- }
4079
- async exportToPng(t) {
4080
- try {
4081
- const e = this.createSvgString(t), r = `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(e)))}`;
4082
- await new Promise((n, o) => {
4083
- const a = new Image();
4084
- a.onload = () => {
4085
- try {
4086
- const c = document.createElement("canvas");
4087
- c.width = a.width, c.height = a.height;
4088
- const g = c.getContext("2d");
4089
- if (!g) throw new Error("Could not get canvas context");
4090
- g.drawImage(a, 0, 0), c.toBlob((f) => {
4091
- f ? this.saveFile(f, "mindmap.png", [
4092
- { description: "PNG Image", accept: { "image/png": [".png"] } }
4093
- ]).then(() => n()).catch((y) => o(y instanceof Error ? y : new Error(String(y)))) : o(new Error("Failed to generate PNG blob."));
4094
- }, "image/png");
4095
- } catch (c) {
4096
- o(c instanceof Error ? c : new Error(String(c)));
4097
- }
4098
- }, a.onerror = () => {
4099
- o(new Error("Failed to load SVG for PNG conversion"));
4100
- }, a.src = r;
4101
- });
4102
- } catch (e) {
4103
- e.name !== "AbortError" && (console.error("Failed to export PNG:", e), alert("Failed to export PNG."));
4104
- }
4105
- }
4106
- async showSavePicker(t) {
4107
- return typeof window.showSaveFilePicker != "function" ? (alert("Your browser does not support the File System Access API required for saving files."), null) : window.showSaveFilePicker(t);
4108
- }
4109
- async saveFile(t, e, i) {
4110
- const r = await this.showSavePicker({
4111
- suggestedName: e,
4112
- types: i
4113
- });
4114
- if (!r) return;
4115
- const n = await r.createWritable();
4116
- await n.write(t), await n.close();
4117
- }
4118
- createSvgString(t) {
4068
+ class Mt {
4069
+ /**
4070
+ * Generates an SVG string representation of the mind map content within the given container.
4071
+ * @param container The element containing the mind map layers.
4072
+ * @returns A string containing the serialized SVG.
4073
+ */
4074
+ generate(t) {
4119
4075
  const e = t.querySelectorAll("svg");
4120
4076
  let i = null;
4121
4077
  for (let K = 0; K < e.length; K++) {
@@ -4137,18 +4093,18 @@ class Dt {
4137
4093
  }
4138
4094
  if (!i || !n)
4139
4095
  throw new Error("Could not find mind map content layers.");
4140
- let o = 1 / 0, a = 1 / 0, c = -1 / 0, g = -1 / 0;
4096
+ let o = 1 / 0, s = 1 / 0, c = -1 / 0, g = -1 / 0;
4141
4097
  const f = n.children;
4142
4098
  if (f.length === 0)
4143
- o = 0, a = 0, c = 800, g = 600;
4099
+ o = 0, s = 0, c = 800, g = 600;
4144
4100
  else
4145
4101
  for (let K = 0; K < f.length; K++) {
4146
- const x = f[K], D = parseFloat(x.style.left || "0"), l = parseFloat(x.style.top || "0"), M = x.offsetWidth, V = x.offsetHeight, W = l - V / 2, Q = l + V / 2;
4147
- D < o && (o = D), W < a && (a = W), D + M > c && (c = D + M), Q > g && (g = Q);
4102
+ const x = f[K], D = parseFloat(x.style.left || "0"), l = parseFloat(x.style.top || "0"), R = x.offsetWidth, V = x.offsetHeight, W = l - V / 2, Q = l + V / 2;
4103
+ D < o && (o = D), W < s && (s = W), D + R > c && (c = D + R), Q > g && (g = Q);
4148
4104
  }
4149
4105
  const y = 50;
4150
- o -= y, a -= y, c += y, g += y;
4151
- const p = c - o, d = g - a, w = window.getComputedStyle(t), h = [
4106
+ o -= y, s -= y, c += y, g += y;
4107
+ const p = c - o, d = g - s, w = window.getComputedStyle(t), h = [
4152
4108
  "--mindmap-connection-color",
4153
4109
  "--mindmap-root-color",
4154
4110
  "--mindmap-child-color",
@@ -4170,29 +4126,91 @@ class Dt {
4170
4126
  const C = document.createElementNS("http://www.w3.org/2000/svg", "rect");
4171
4127
  C.setAttribute("x", "0"), C.setAttribute("y", "0"), C.setAttribute("width", p.toString()), C.setAttribute("height", d.toString()), C.setAttribute("fill", w.backgroundColor || "#ffffff"), k.appendChild(C);
4172
4128
  const S = document.createElementNS("http://www.w3.org/2000/svg", "g");
4173
- S.setAttribute("transform", `translate(${-o}, ${-a})`), i.querySelectorAll("path").forEach((K) => {
4129
+ S.setAttribute("transform", `translate(${-o}, ${-s})`), i.querySelectorAll("path").forEach((K) => {
4174
4130
  const x = K.cloneNode(!0), D = window.getComputedStyle(K);
4175
4131
  let l = D.stroke;
4176
4132
  (!l || l === "none") && (l = K.style.stroke), (!l || l === "none") && (l = "#cccccc"), x.style.stroke = l;
4177
- let M = D.strokeWidth;
4178
- (!M || M === "0px" || M === "auto") && (M = K.getAttribute("stroke-width") || "2px"), x.style.strokeWidth = M, x.style.fill = "none", S.appendChild(x);
4133
+ let R = D.strokeWidth;
4134
+ (!R || R === "0px" || R === "auto") && (R = K.getAttribute("stroke-width") || "2px"), x.style.strokeWidth = R, x.style.fill = "none", S.appendChild(x);
4179
4135
  });
4180
- const T = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
4181
- T.setAttribute("x", "0"), T.setAttribute("y", "0"), T.setAttribute("width", (c + y).toString()), T.setAttribute("height", (g + y).toString()), T.style.overflow = "visible";
4136
+ const A = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
4137
+ A.setAttribute("x", "0"), A.setAttribute("y", "0"), A.setAttribute("width", (c + y).toString()), A.setAttribute("height", (g + y).toString()), A.style.overflow = "visible";
4182
4138
  const F = document.createElement("div");
4183
4139
  F.setAttribute("xmlns", "http://www.w3.org/1999/xhtml"), F.style.cssText = `position: relative; width: 100%; height: 100%; font-family: ${v}; ${u}`;
4184
- const B = n.children;
4185
- for (let K = 0; K < B.length; K++) {
4186
- const x = B[K].cloneNode(!0);
4140
+ const T = n.children;
4141
+ for (let K = 0; K < T.length; K++) {
4142
+ const x = T[K].cloneNode(!0);
4187
4143
  F.appendChild(x);
4188
4144
  }
4189
- return T.appendChild(F), S.appendChild(T), k.appendChild(S), new XMLSerializer().serializeToString(k);
4145
+ return A.appendChild(F), S.appendChild(A), k.appendChild(S), new XMLSerializer().serializeToString(k);
4146
+ }
4147
+ }
4148
+ class Rt {
4149
+ async exportToSvg(t, e) {
4150
+ try {
4151
+ const r = new Mt().generate(t), n = new Blob([r], { type: "image/svg+xml;charset=utf-8" });
4152
+ await this.saveFile(
4153
+ n,
4154
+ "mindmap.svg",
4155
+ [{ description: "SVG File", accept: { "image/svg+xml": [".svg"] } }],
4156
+ e
4157
+ );
4158
+ } catch (i) {
4159
+ i.name !== "AbortError" && (console.error("Failed to export SVG:", i), alert("Failed to export SVG."));
4160
+ }
4161
+ }
4162
+ async exportToPng(t, e) {
4163
+ try {
4164
+ const r = new Mt().generate(t), o = `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(r)))}`;
4165
+ await new Promise((s, c) => {
4166
+ const g = new Image();
4167
+ g.onload = () => {
4168
+ try {
4169
+ const f = document.createElement("canvas");
4170
+ f.width = g.width, f.height = g.height;
4171
+ const y = f.getContext("2d");
4172
+ if (!y) throw new Error("Could not get canvas context");
4173
+ y.drawImage(g, 0, 0), f.toBlob((p) => {
4174
+ p ? this.saveFile(
4175
+ p,
4176
+ "mindmap.png",
4177
+ [{ description: "PNG Image", accept: { "image/png": [".png"] } }],
4178
+ e
4179
+ ).then(() => s()).catch((d) => c(d instanceof Error ? d : new Error(String(d)))) : c(new Error("Failed to generate PNG blob."));
4180
+ }, "image/png");
4181
+ } catch (f) {
4182
+ c(f instanceof Error ? f : new Error(String(f)));
4183
+ }
4184
+ }, g.onerror = () => {
4185
+ c(new Error("Failed to load SVG for PNG conversion"));
4186
+ }, g.src = o;
4187
+ });
4188
+ } catch (i) {
4189
+ i.name !== "AbortError" && (console.error("Failed to export PNG:", i), alert("Failed to export PNG."));
4190
+ }
4191
+ }
4192
+ async showSavePicker(t) {
4193
+ return typeof window.showSaveFilePicker != "function" ? (alert("Your browser does not support the File System Access API required for saving files."), null) : window.showSaveFilePicker(t);
4194
+ }
4195
+ async saveFile(t, e, i, r) {
4196
+ if (r) {
4197
+ const s = e.split(".").pop();
4198
+ await r.onExportFile(t, e, s);
4199
+ return;
4200
+ }
4201
+ const n = await this.showSavePicker({
4202
+ suggestedName: e,
4203
+ types: i
4204
+ });
4205
+ if (!n) return;
4206
+ const o = await n.createWritable();
4207
+ await o.write(t), await o.close();
4190
4208
  }
4191
4209
  }
4192
- class re {
4193
- async export(t) {
4194
- const e = this.generateMarkdown(t), i = new Blob([e], { type: "text/markdown;charset=utf-8" });
4195
- await this.saveFile(i, "mindmap.md");
4210
+ class ne {
4211
+ async export(t, e) {
4212
+ const i = this.generateMarkdown(t), r = new Blob([i], { type: "text/markdown;charset=utf-8" });
4213
+ await this.saveFile(r, "mindmap.md", e);
4196
4214
  }
4197
4215
  generateMarkdown(t) {
4198
4216
  const e = t.root;
@@ -4217,10 +4235,14 @@ class re {
4217
4235
  getNodeText(t) {
4218
4236
  return t.image ? "[image node]" : t.topic;
4219
4237
  }
4220
- async saveFile(t, e) {
4238
+ async saveFile(t, e, i) {
4221
4239
  try {
4240
+ if (i) {
4241
+ await i.onExportFile(t, e, "md");
4242
+ return;
4243
+ }
4222
4244
  if (typeof window.showSaveFilePicker == "function") {
4223
- const r = await (await window.showSaveFilePicker({
4245
+ const n = await (await window.showSaveFilePicker({
4224
4246
  suggestedName: e,
4225
4247
  types: [
4226
4248
  {
@@ -4229,17 +4251,17 @@ class re {
4229
4251
  }
4230
4252
  ]
4231
4253
  })).createWritable();
4232
- await r.write(t), await r.close();
4254
+ await n.write(t), await n.close();
4233
4255
  } else {
4234
- const i = URL.createObjectURL(t), r = document.createElement("a");
4235
- r.href = i, r.download = e, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(i);
4256
+ const r = URL.createObjectURL(t), n = document.createElement("a");
4257
+ n.href = r, n.download = e, document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(r);
4236
4258
  }
4237
- } catch (i) {
4238
- i.name !== "AbortError" && (console.error("Failed to save file:", i), alert("Failed to save file."));
4259
+ } catch (r) {
4260
+ r.name !== "AbortError" && (console.error("Failed to save file:", r), alert("Failed to save file."));
4239
4261
  }
4240
4262
  }
4241
4263
  }
4242
- class ne {
4264
+ class oe {
4243
4265
  mindMap;
4244
4266
  service;
4245
4267
  renderer;
@@ -4248,6 +4270,7 @@ class ne {
4248
4270
  commandPalette;
4249
4271
  interactionHandler;
4250
4272
  layoutSwitcher;
4273
+ fileHandler;
4251
4274
  selectedNodeId = null;
4252
4275
  layoutMode = "Right";
4253
4276
  panX = 0;
@@ -4264,12 +4287,12 @@ class ne {
4264
4287
  childNode: { border: "1px solid #d5d8dc", background: "#fdfefe", color: "#2c3e50" },
4265
4288
  connection: { color: "#abb2b9" }
4266
4289
  };
4267
- constructor(t, e, i, r, n) {
4268
- this.mindMap = t, this.service = e, this.renderer = i, this.styleEditor = r, this.eventBus = n, this.commandPalette = new Vt(this.renderer.container, {
4269
- onInput: (o) => this.handleSearchInput(o),
4270
- onSelect: (o) => this.handleSearchResultSelect(o),
4271
- onIconSelect: (o) => this.handleIconSelect(o),
4272
- onCommandSelect: (o) => this.handleCommandSelect(o),
4290
+ constructor(t, e, i, r, n, o) {
4291
+ this.mindMap = t, this.service = e, this.renderer = i, this.styleEditor = r, this.eventBus = n, this.fileHandler = o, this.commandPalette = new Qt(this.renderer.container, {
4292
+ onInput: (s) => this.handleSearchInput(s),
4293
+ onSelect: (s) => this.handleSearchResultSelect(s),
4294
+ onIconSelect: (s) => this.handleIconSelect(s),
4295
+ onCommandSelect: (s) => this.handleCommandSelect(s),
4273
4296
  onClose: () => {
4274
4297
  this.interactionHandler && this.interactionHandler.container.focus();
4275
4298
  }
@@ -4321,38 +4344,42 @@ class ne {
4321
4344
  }
4322
4345
  // Core API Delegate
4323
4346
  addNode(t, e, i, r = { emitChange: !0 }) {
4347
+ this.eventBus.emit("command", { name: "addNode", args: { parentId: t, topic: e, layoutSide: i } });
4324
4348
  const n = this.service.addNode(t, e, i);
4325
4349
  return n && (this.render(), this.eventBus.emit("node:add", { id: n.id, topic: n.topic }), r.emitChange && this.eventBus.emit("model:change", void 0)), n;
4326
4350
  }
4327
4351
  addSibling(t, e = "after", i = "New topic", r = { emitChange: !0 }) {
4352
+ this.eventBus.emit("command", { name: "addSibling", args: { referenceId: t, position: e, topic: i } });
4328
4353
  const n = this.mindMap.findNode(t);
4329
4354
  if (!n || !n.parentId) return null;
4330
4355
  const o = this.mindMap.findNode(n.parentId);
4331
4356
  o && o.isRoot && this.layoutMode === "Both" && this.ensureExplicitLayoutSides(o);
4332
- const a = this.service.addSibling(t, e, i);
4333
- if (a) {
4357
+ const s = this.service.addSibling(t, e, i);
4358
+ if (s) {
4334
4359
  if (o && o.isRoot && this.layoutMode === "Both") {
4335
4360
  const c = n.layoutSide || (o.children.indexOf(n) % 2 === 0 ? "right" : "left");
4336
- a.layoutSide = c;
4361
+ s.layoutSide = c;
4337
4362
  }
4338
- this.render(), this.eventBus.emit("node:add", { id: a.id, topic: a.topic }), r.emitChange && this.eventBus.emit("model:change", void 0);
4363
+ this.render(), this.eventBus.emit("node:add", { id: s.id, topic: s.topic }), r.emitChange && this.eventBus.emit("model:change", void 0);
4339
4364
  }
4340
- return a;
4365
+ return s;
4341
4366
  }
4342
4367
  insertParent(t, e = "New topic", i = { emitChange: !0 }) {
4368
+ this.eventBus.emit("command", { name: "insertParent", args: { targetId: t, topic: e } });
4343
4369
  const r = this.service.insertParent(t, e);
4344
4370
  return r && (this.render(), this.eventBus.emit("node:add", { id: r.id, topic: r.topic }), i.emitChange && this.eventBus.emit("model:change", void 0)), r;
4345
4371
  }
4346
4372
  deleteNode(t) {
4347
- this.service.removeNode(t) && (this.render(), this.eventBus.emit("node:remove", t), this.eventBus.emit("model:change", void 0));
4373
+ this.eventBus.emit("command", { name: "deleteNode", args: { nodeId: t } }), this.service.removeNode(t) && (this.render(), this.eventBus.emit("node:remove", t), this.eventBus.emit("model:change", void 0));
4348
4374
  }
4349
4375
  updateNode(t, e) {
4376
+ this.eventBus.emit("command", { name: "updateNode", args: { nodeId: t, updates: e } });
4350
4377
  let i = !1;
4351
4378
  this.interactionHandler && this.interactionHandler.isReadOnly || (e.topic !== void 0 && this.service.updateNodeTopic(t, e.topic) && (i = !0), e.style !== void 0 && this.service.updateNodeStyle(t, e.style) && (i = !0), e.icon !== void 0 && this.service.updateNodeIcon(t, e.icon) && (i = !0), i && (this.render(), e.topic !== void 0 && this.eventBus.emit("node:update", { id: t, topic: e.topic }), this.eventBus.emit("model:change", void 0), this.pendingNodeCreation && (this.pendingNodeCreation = !1)));
4352
4379
  }
4353
4380
  // Interaction Handlers
4354
4381
  updateNodeWidth(t, e) {
4355
- if (this.interactionHandler && this.interactionHandler.isReadOnly) return;
4382
+ if (this.eventBus.emit("command", { name: "updateNodeWidth", args: { nodeId: t, increment: e } }), this.interactionHandler && this.interactionHandler.isReadOnly) return;
4356
4383
  const i = this.mindMap.findNode(t);
4357
4384
  if (!i) return;
4358
4385
  let r = i.customWidth;
@@ -4366,8 +4393,8 @@ class ne {
4366
4393
  let i;
4367
4394
  if (this.layoutMode === "Both" && e && e.isRoot) {
4368
4395
  let n = 0, o = 0;
4369
- e.children.forEach((a, c) => {
4370
- (a.layoutSide || (c % 2 === 0 ? "right" : "left")) === "left" ? n++ : o++;
4396
+ e.children.forEach((s, c) => {
4397
+ (s.layoutSide || (c % 2 === 0 ? "right" : "left")) === "left" ? n++ : o++;
4371
4398
  }), i = n < o ? "left" : "right";
4372
4399
  }
4373
4400
  this.pendingNodeCreation = !0;
@@ -4399,6 +4426,7 @@ class ne {
4399
4426
  }
4400
4427
  }
4401
4428
  moveNode(t, e, i) {
4429
+ this.eventBus.emit("command", { name: "moveNode", args: { nodeId: t, targetId: e, position: i } });
4402
4430
  const r = this.mindMap.findNode(e);
4403
4431
  if (r) {
4404
4432
  if (i === "top") {
@@ -4422,7 +4450,7 @@ class ne {
4422
4450
  this.isBatching || (this.renderer.render(this.mindMap, this.selectedNodeId, this.layoutMode), this.renderer.updateTransform(this.panX, this.panY, this.scale));
4423
4451
  }
4424
4452
  setLayoutMode(t) {
4425
- this.layoutMode = t, this.layoutSwitcher && this.layoutSwitcher.setMode(t);
4453
+ this.eventBus.emit("command", { name: "setLayoutMode", args: { mode: t } }), this.layoutMode = t, this.layoutSwitcher && this.layoutSwitcher.setMode(t);
4426
4454
  const e = this.renderer.container.clientWidth;
4427
4455
  t === "Right" ? this.panX = e * 0.2 : t === "Left" ? this.panX = e * 0.8 : this.panX = e * 0.5, this.panY = 0, this.targetPanX = this.panX, this.targetPanY = this.panY, this.render();
4428
4456
  }
@@ -4436,7 +4464,7 @@ class ne {
4436
4464
  return this.maxWidth;
4437
4465
  }
4438
4466
  updateGlobalStyles(t) {
4439
- if (t.rootNode && (this.savedCustomStyles.rootNode = { ...this.savedCustomStyles.rootNode, ...t.rootNode }), t.childNode && (this.savedCustomStyles.childNode = {
4467
+ if (this.eventBus.emit("command", { name: "updateGlobalStyles", args: { styles: t } }), t.rootNode && (this.savedCustomStyles.rootNode = { ...this.savedCustomStyles.rootNode, ...t.rootNode }), t.childNode && (this.savedCustomStyles.childNode = {
4440
4468
  ...this.savedCustomStyles.childNode,
4441
4469
  ...t.childNode
4442
4470
  }), t.connection && (this.savedCustomStyles.connection = {
@@ -4448,7 +4476,7 @@ class ne {
4448
4476
  }
4449
4477
  }
4450
4478
  setTheme(t) {
4451
- this.service.setTheme(t), this.layoutSwitcher && this.layoutSwitcher.setTheme(t), t === "custom" && ct.getInstance().setCustomTheme(this.savedCustomStyles), ct.getInstance().applyTheme(this.renderer.container, t), this.render(), this.eventBus.emit("model:change", void 0);
4479
+ this.eventBus.emit("command", { name: "setTheme", args: { theme: t } }), this.service.setTheme(t), this.layoutSwitcher && this.layoutSwitcher.setTheme(t), t === "custom" && ct.getInstance().setCustomTheme(this.savedCustomStyles), ct.getInstance().applyTheme(this.renderer.container, t), this.render(), this.eventBus.emit("model:change", void 0);
4452
4480
  }
4453
4481
  resetZoom() {
4454
4482
  const t = this.renderer.container.clientWidth / 2, e = this.renderer.container.clientHeight / 2, i = 1;
@@ -4458,7 +4486,7 @@ class ne {
4458
4486
  this.targetPanX += t, this.targetPanY += e;
4459
4487
  }
4460
4488
  zoomBoard(t, e, i) {
4461
- const a = this.renderer.container.getBoundingClientRect(), c = e - a.left, g = i - a.top, f = Math.min(
4489
+ const s = this.renderer.container.getBoundingClientRect(), c = e - s.left, g = i - s.top, f = Math.min(
4462
4490
  Math.max(this.scale * (1 - t * 1e-3), 0.1),
4463
4491
  5
4464
4492
  ), y = c - (c - this.panX) * (f / this.scale), p = g - (g - this.panY) * (f / this.scale);
@@ -4468,13 +4496,13 @@ class ne {
4468
4496
  this.interactionHandler && this.interactionHandler.setReadOnly(t), t && this.styleEditor.hide();
4469
4497
  }
4470
4498
  undo() {
4471
- this.service.undo() && (this.render(), this.eventBus.emit("model:change", void 0));
4499
+ this.service.undo() && (this.eventBus.emit("command", { name: "undo" }), this.render(), this.eventBus.emit("model:change", void 0));
4472
4500
  }
4473
4501
  redo() {
4474
- this.service.redo() && (this.render(), this.eventBus.emit("model:change", void 0));
4502
+ this.service.redo() && (this.eventBus.emit("command", { name: "redo" }), this.render(), this.eventBus.emit("model:change", void 0));
4475
4503
  }
4476
4504
  toggleFold(t) {
4477
- this.service.toggleNodeFold(t) && (this.render(), this.eventBus.emit("model:change", void 0));
4505
+ this.service.toggleNodeFold(t) && (this.eventBus.emit("command", { name: "toggleFold", args: { nodeId: t } }), this.render(), this.eventBus.emit("model:change", void 0));
4478
4506
  }
4479
4507
  navigateNode(t, e) {
4480
4508
  const i = this.mindMap.findNode(t);
@@ -4500,10 +4528,12 @@ class ne {
4500
4528
  this.service.copyNode(t);
4501
4529
  }
4502
4530
  pasteNode(t) {
4531
+ this.eventBus.emit("command", { name: "pasteNode", args: { parentId: t } });
4503
4532
  const e = this.service.pasteNode(t);
4504
4533
  e && (this.render(), this.selectNode(e.id), this.eventBus.emit("node:add", { id: e.id, topic: e.topic }), this.eventBus.emit("model:change", void 0), setTimeout(() => this.ensureNodeVisible(e.id, !0), 0));
4505
4534
  }
4506
4535
  cutNode(t) {
4536
+ this.eventBus.emit("command", { name: "cutNode", args: { nodeId: t } });
4507
4537
  const e = this.mindMap.findNode(t);
4508
4538
  if (e) {
4509
4539
  const i = e.parentId;
@@ -4511,6 +4541,7 @@ class ne {
4511
4541
  }
4512
4542
  }
4513
4543
  pasteImage(t, e, i, r) {
4544
+ this.eventBus.emit("command", { name: "pasteImage", args: { parentId: t, width: i, height: r } });
4514
4545
  const n = this.service.addImageNode(t, e, i, r);
4515
4546
  n && (this.render(), this.selectNode(n.id), this.eventBus.emit("node:add", { id: n.id, topic: "" }), this.eventBus.emit("model:change", void 0), setTimeout(() => this.ensureNodeVisible(n.id, !0), 0));
4516
4547
  }
@@ -4530,8 +4561,8 @@ class ne {
4530
4561
  else if (e.type === "color")
4531
4562
  e.index >= 0 && e.index < yt.PALETTE.length && (n = { color: yt.PALETTE[e.index] });
4532
4563
  else if (e.type === "increaseSize" || e.type === "decreaseSize") {
4533
- const o = yt.FONT_SIZES, a = r.fontSize || "";
4534
- let c = o.findIndex((f) => f.value === a);
4564
+ const o = yt.FONT_SIZES, s = r.fontSize || "";
4565
+ let c = o.findIndex((f) => f.value === s);
4535
4566
  c === -1 && (c = 0);
4536
4567
  const g = e.type === "increaseSize" ? Math.min(o.length - 1, c + 1) : Math.max(0, c - 1);
4537
4568
  g !== c && (n = { fontSize: o[g].value });
@@ -4558,23 +4589,42 @@ class ne {
4558
4589
  t === "import-xmind" ? this.importXMind() : t === "export-png" ? this.exportPng() : t === "export-svg" ? this.exportSvg() : t === "export-markdown" && this.exportMarkdown();
4559
4590
  }
4560
4591
  async exportPng() {
4561
- await new Dt().exportToPng(this.renderer.container);
4592
+ this.eventBus.emit("command", { name: "exportPng" }), await new Rt().exportToPng(this.renderer.container, this.fileHandler);
4562
4593
  }
4563
4594
  async exportSvg() {
4564
- await new Dt().exportToSvg(this.renderer.container);
4595
+ this.eventBus.emit("command", { name: "exportSvg" }), await new Rt().exportToSvg(this.renderer.container, this.fileHandler);
4565
4596
  }
4566
4597
  async exportMarkdown() {
4567
- await new re().export(this.mindMap);
4598
+ this.eventBus.emit("command", { name: "exportMarkdown" }), await new ne().export(this.mindMap, this.fileHandler);
4568
4599
  }
4569
- importXMind() {
4570
- if (this.mindMap.root.children.length > 0 && !window.confirm("Current mind map will be replaced. Continue?"))
4600
+ async importXMind() {
4601
+ if (this.eventBus.emit("command", { name: "importXMind" }), this.mindMap.root.children.length > 0 && !window.confirm("Current mind map will be replaced. Continue?"))
4602
+ return;
4603
+ if (this.fileHandler) {
4604
+ const e = await this.fileHandler.onImportFile("xmind");
4605
+ if (e)
4606
+ try {
4607
+ const i = new Dt();
4608
+ let r;
4609
+ if (e instanceof ArrayBuffer)
4610
+ r = new File([e], "imported.xmind");
4611
+ else if (typeof e == "string")
4612
+ r = new File([e], "imported.xmind");
4613
+ else
4614
+ return;
4615
+ const n = await i.extractMindMapData(r);
4616
+ this.loadData(n);
4617
+ } catch (i) {
4618
+ console.error(i), alert("Failed to import XMind file.");
4619
+ }
4571
4620
  return;
4621
+ }
4572
4622
  const t = document.createElement("input");
4573
4623
  t.type = "file", t.accept = ".xmind", t.style.display = "none", document.body.appendChild(t), t.onchange = async (e) => {
4574
4624
  const r = e.target.files?.[0];
4575
4625
  if (r)
4576
4626
  try {
4577
- const o = await new ie().extractMindMapData(r);
4627
+ const o = await new Dt().extractMindMapData(r);
4578
4628
  this.loadData(o);
4579
4629
  } catch (n) {
4580
4630
  console.error(n), alert("Failed to import XMind file.");
@@ -4582,8 +4632,6 @@ class ne {
4582
4632
  document.body.removeChild(t);
4583
4633
  }, t.click();
4584
4634
  }
4585
- // applyCustomStylesToDOM is no longer needed as ThemeRegistry handles it via setCustomTheme and applyTheme
4586
- // private applyCustomStylesToDOM(styles: MindMapStyles): void { ... }
4587
4635
  ensureExplicitLayoutSides(t) {
4588
4636
  !t.isRoot || this.layoutMode !== "Both" || t.children.forEach((e, i) => {
4589
4637
  e.layoutSide || (e.layoutSide = i % 2 === 0 ? "right" : "left");
@@ -4607,8 +4655,8 @@ class ne {
4607
4655
  const e = () => {
4608
4656
  const i = performance.now(), r = (i - t) / 1e3;
4609
4657
  t = i;
4610
- const n = 1 - Math.exp(-8 * r), o = this.targetPanX - this.panX, a = this.targetPanY - this.panY;
4611
- Math.abs(o) > 0.1 || Math.abs(a) > 0.1 ? (this.panX += o * n, this.panY += a * n, this.renderer.updateTransform(this.panX, this.panY, this.scale)) : (this.panX !== this.targetPanX || this.panY !== this.targetPanY) && (this.panX = this.targetPanX, this.panY = this.targetPanY, this.renderer.updateTransform(this.panX, this.panY, this.scale)), Number.isNaN(this.panX) && (this.panX = 0), Number.isNaN(this.panY) && (this.panY = 0), this.animationFrameId = requestAnimationFrame(e);
4658
+ const n = 1 - Math.exp(-8 * r), o = this.targetPanX - this.panX, s = this.targetPanY - this.panY;
4659
+ Math.abs(o) > 0.1 || Math.abs(s) > 0.1 ? (this.panX += o * n, this.panY += s * n, this.renderer.updateTransform(this.panX, this.panY, this.scale)) : (this.panX !== this.targetPanX || this.panY !== this.targetPanY) && (this.panX = this.targetPanX, this.panY = this.targetPanY, this.renderer.updateTransform(this.panX, this.panY, this.scale)), Number.isNaN(this.panX) && (this.panX = 0), Number.isNaN(this.panY) && (this.panY = 0), this.animationFrameId = requestAnimationFrame(e);
4612
4660
  };
4613
4661
  e();
4614
4662
  }
@@ -4617,14 +4665,14 @@ class ne {
4617
4665
  `.mindmap-node[data-id="${t}"]`
4618
4666
  );
4619
4667
  if (!r) return;
4620
- const n = r.getBoundingClientRect(), o = this.renderer.container.getBoundingClientRect(), a = 50;
4668
+ const n = r.getBoundingClientRect(), o = this.renderer.container.getBoundingClientRect(), s = 50;
4621
4669
  let c = 0, g = 0;
4622
- const f = n.left < o.left + a, y = n.right > o.right - a, p = n.top < o.top + a, d = n.bottom > o.bottom - a;
4670
+ const f = n.left < o.left + s, y = n.right > o.right - s, p = n.top < o.top + s, d = n.bottom > o.bottom - s;
4623
4671
  if (e && (f || y || p || d)) {
4624
4672
  const w = n.left + n.width / 2, h = n.top + n.height / 2, m = o.left + o.width / 2, u = o.top + o.height / 2;
4625
4673
  c = m - w, g = u - h;
4626
4674
  } else
4627
- f ? c = o.left + a - n.left : y && (c = o.right - a - n.right), p ? g = o.top + a - n.top : d && (g = o.bottom - a - n.bottom);
4675
+ f ? c = o.left + s - n.left : y && (c = o.right - s - n.right), p ? g = o.top + s - n.top : d && (g = o.bottom - s - n.bottom);
4628
4676
  (c !== 0 || g !== 0) && (i ? (this.panX += c, this.panY += g, this.targetPanX = this.panX, this.targetPanY = this.panY, this.renderer.updateTransform(this.panX, this.panY, this.scale)) : this.panBoard(c, g));
4629
4677
  }
4630
4678
  navigateLeft(t) {
@@ -4681,7 +4729,7 @@ class ne {
4681
4729
  i.textContent = "Keyboard Shortcuts", i.style.margin = "0 0 15px 0", i.style.fontSize = "1.5em", i.style.borderBottom = "1px solid #eee", i.style.paddingBottom = "10px", e.appendChild(i);
4682
4730
  const r = document.createElement("button");
4683
4731
  r.textContent = "×", r.style.position = "absolute", r.style.top = "10px", r.style.right = "15px", r.style.background = "none", r.style.border = "none", r.style.fontSize = "24px", r.style.cursor = "pointer", r.style.color = "#999", r.addEventListener("click", () => {
4684
- a();
4732
+ s();
4685
4733
  }), e.appendChild(r);
4686
4734
  const n = this.interactionHandler.getShortcuts();
4687
4735
  [
@@ -4761,8 +4809,8 @@ class ne {
4761
4809
  const k = n[v.action];
4762
4810
  if (k && k.length > 0) {
4763
4811
  const C = k.map((S) => {
4764
- const R = [];
4765
- return (S.ctrlKey || S.metaKey) && R.push("Ctrl/Cmd"), S.altKey && R.push("Alt"), S.shiftKey && R.push("Shift"), S.key === " " ? R.push("Space") : R.push(S.key), R.join(" + ");
4812
+ const M = [];
4813
+ return (S.ctrlKey || S.metaKey) && M.push("Ctrl/Cmd"), S.altKey && M.push("Alt"), S.shiftKey && M.push("Shift"), S.key === " " ? M.push("Space") : M.push(S.key), M.join(" + ");
4766
4814
  });
4767
4815
  u = [...new Set(C)].join(" / ");
4768
4816
  }
@@ -4789,19 +4837,19 @@ class ne {
4789
4837
  }), t.appendChild(e), document.body.appendChild(t), requestAnimationFrame(() => {
4790
4838
  t.style.opacity = "1";
4791
4839
  });
4792
- const a = () => {
4840
+ const s = () => {
4793
4841
  t.style.opacity = "0", setTimeout(() => {
4794
4842
  document.body.contains(t) && document.body.removeChild(t);
4795
4843
  }, 200), document.removeEventListener("keydown", c);
4796
4844
  }, c = (g) => {
4797
- g.key === "Escape" && a();
4845
+ g.key === "Escape" && s();
4798
4846
  };
4799
4847
  document.addEventListener("keydown", c), t.addEventListener("click", (g) => {
4800
- g.target === t && a();
4848
+ g.target === t && s();
4801
4849
  });
4802
4850
  }
4803
4851
  }
4804
- class oe {
4852
+ class se {
4805
4853
  listeners = {};
4806
4854
  on(t, e) {
4807
4855
  this.listeners[t] || (this.listeners[t] = []), this.listeners[t]?.push(e);
@@ -4820,25 +4868,32 @@ class oe {
4820
4868
  this.listeners[t]?.forEach((i) => i(e));
4821
4869
  }
4822
4870
  }
4823
- class se extends oe {
4871
+ class ae extends se {
4824
4872
  mindMap;
4825
4873
  controller;
4826
4874
  constructor(t, e = {}) {
4827
4875
  super();
4828
4876
  const i = new gt("root", "Root Topic", null, !0);
4829
- this.mindMap = new Pt(i);
4830
- const r = new Rt(), n = new Wt(this.mindMap, r), o = document.createElement("div");
4877
+ this.mindMap = new Wt(i);
4878
+ const r = new Lt(), n = new jt(this.mindMap, r), o = document.createElement("div");
4831
4879
  o.style.position = "absolute", o.style.top = "0", o.style.left = "0", o.style.width = "100%", o.style.height = "100%", o.style.pointerEvents = "none", o.style.zIndex = "2000", window.getComputedStyle(t).position === "static" && (t.style.position = "relative"), t.style.overscrollBehavior = "none", t.style.touchAction = "none", t.appendChild(o);
4832
- const c = new yt(o), g = new Zt(t, {
4880
+ const c = new yt(o), g = new Kt(t, {
4833
4881
  onImageZoom: (p) => this.controller.setReadOnly(p),
4834
4882
  onToggleFold: (p) => this.controller.toggleFold(p)
4835
4883
  });
4836
- this.controller = new ne(this.mindMap, n, g, c, {
4837
- emit: (p, d) => this.emit(p, d)
4838
- }), c.onUpdate = (p, d) => {
4884
+ this.controller = new oe(
4885
+ this.mindMap,
4886
+ n,
4887
+ g,
4888
+ c,
4889
+ {
4890
+ emit: (p, d) => this.emit(p, d)
4891
+ },
4892
+ e.fileHandler
4893
+ ), c.onUpdate = (p, d) => {
4839
4894
  this.controller.updateNode(p, { style: d });
4840
4895
  };
4841
- const f = new Jt(t, {
4896
+ const f = new qt(t, {
4842
4897
  onNodeClick: (p) => this.controller.selectNode(p || null),
4843
4898
  onAddChild: (p) => this.controller.addChildNode(p),
4844
4899
  onInsertParent: (p) => this.controller.insertParentNode(p),
@@ -4864,7 +4919,7 @@ class se extends oe {
4864
4919
  shortcuts: e.shortcuts
4865
4920
  });
4866
4921
  this.controller.setInteractionHandler(f);
4867
- const y = new Xt(o, {
4922
+ const y = new Yt(o, {
4868
4923
  onLayoutChange: (p) => this.controller.setLayoutMode(p),
4869
4924
  onThemeChange: (p) => this.controller.setTheme(p),
4870
4925
  onZoomReset: () => this.controller.resetZoom(),
@@ -5041,7 +5096,8 @@ class se extends oe {
5041
5096
  }
5042
5097
  }
5043
5098
  export {
5044
- se as Kakidash,
5045
- Pt as MindMap,
5046
- gt as Node
5099
+ ae as Kakidash,
5100
+ gt as Node,
5101
+ Mt as SvgGenerator,
5102
+ Dt as XMindImporter
5047
5103
  };