kakidash 0.3.0 → 0.3.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.
- package/dist/index.d.ts +3 -2
- package/dist/kakidash.cjs +9 -7
- package/dist/kakidash.es.js +473 -439
- package/dist/kakidash.umd.js +9 -7
- package/package.json +1 -1
package/dist/kakidash.es.js
CHANGED
|
@@ -84,11 +84,11 @@ class gt {
|
|
|
84
84
|
imageSize;
|
|
85
85
|
icon;
|
|
86
86
|
presentation;
|
|
87
|
-
constructor(t, e, i = null, n = !1, r, s, o = !1, l, g,
|
|
87
|
+
constructor(t, e, i = null, n = !1, r, s, o = !1, l, g, w) {
|
|
88
88
|
this.id = t, this.topic = e, this.children = [], this.style = { fontSize: n ? "24px" : "16px" }, this.parentId = i, this.isRoot = n, this.image = r, this.imageSize = g, this.icon = l, this.presentation = {
|
|
89
89
|
isFolded: o,
|
|
90
90
|
layoutSide: s,
|
|
91
|
-
customWidth:
|
|
91
|
+
customWidth: w
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
addChild(t) {
|
|
@@ -206,9 +206,9 @@ class Ut {
|
|
|
206
206
|
for (; g.parentId; ) {
|
|
207
207
|
if (g.id === n.id) return !1;
|
|
208
208
|
if (!g.parentId) break;
|
|
209
|
-
const
|
|
210
|
-
if (!
|
|
211
|
-
g =
|
|
209
|
+
const w = this.mindMap.findNode(g.parentId);
|
|
210
|
+
if (!w) break;
|
|
211
|
+
g = w;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
if (n.parentId && n.parentId !== s.id) {
|
|
@@ -383,14 +383,24 @@ class Zt {
|
|
|
383
383
|
getClipboardNodes() {
|
|
384
384
|
return this.clipboard;
|
|
385
385
|
}
|
|
386
|
-
createPastedNodes(t) {
|
|
387
|
-
if (this.clipboard.length === 0) return [];
|
|
386
|
+
createPastedNodes(t, e) {
|
|
388
387
|
if (!this.mindMap.findNode(t)) return [];
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
|
|
388
|
+
let n = !1;
|
|
389
|
+
if (this.clipboard.length > 0 && e !== void 0) {
|
|
390
|
+
const s = this.clipboard.map((l) => l.topic).join(`
|
|
391
|
+
`), o = e.replace(/\r\n/g, `
|
|
392
|
+
`);
|
|
393
|
+
s === o && (n = !0);
|
|
394
|
+
} else this.clipboard.length > 0 && e === void 0 && (n = !0);
|
|
395
|
+
const r = [];
|
|
396
|
+
if (!n && e) {
|
|
397
|
+
const s = this.idGenerator.generate(), o = new gt(s, e);
|
|
398
|
+
r.push(o);
|
|
399
|
+
} else this.clipboard.length > 0 && this.clipboard.forEach((s) => {
|
|
400
|
+
const o = this.deepCloneNode(s);
|
|
401
|
+
this.regenerateIds(o), r.push(o);
|
|
402
|
+
});
|
|
403
|
+
return r;
|
|
394
404
|
}
|
|
395
405
|
deepCloneNode(t) {
|
|
396
406
|
const e = new gt(
|
|
@@ -792,7 +802,7 @@ class $t {
|
|
|
792
802
|
return i.styles?.connection?.color || "#ccc";
|
|
793
803
|
}
|
|
794
804
|
renderNodeElement(t, e, i, n, r, s, o, l) {
|
|
795
|
-
const g = t.isRoot,
|
|
805
|
+
const g = t.isRoot, w = ct.getInstance().getCurrentTheme(), u = document.createElement("div");
|
|
796
806
|
if (u.dataset.id = t.id, u.style.position = "absolute", u.style.left = `${e}px`, u.style.top = `${i}px`, t.image) {
|
|
797
807
|
const m = document.createElement("img");
|
|
798
808
|
m.src = t.image, t.imageSize ? t.imageSize.width > 150 ? (m.style.width = "150px", m.style.height = "auto") : (m.style.width = `${t.imageSize.width}px`, m.style.height = `${t.imageSize.height}px`) : (m.style.maxWidth = "150px", m.style.maxHeight = "150px"), m.style.display = "block", u.appendChild(m);
|
|
@@ -802,31 +812,31 @@ class $t {
|
|
|
802
812
|
}), u.style.padding = "5px";
|
|
803
813
|
} else {
|
|
804
814
|
if (u.style.display = "flex", u.style.alignItems = "center", u.style.justifyContent = t.isRoot ? "center" : "flex-start", t.icon) {
|
|
805
|
-
const
|
|
806
|
-
if (
|
|
815
|
+
const b = It[t.icon];
|
|
816
|
+
if (b) {
|
|
807
817
|
const _ = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
808
|
-
_.setAttribute("viewBox",
|
|
818
|
+
_.setAttribute("viewBox", b.viewBox), _.setAttribute("width", "20"), _.setAttribute("height", "20"), _.style.width = "20px", _.style.height = "20px", _.style.marginRight = "8px", _.style.flexShrink = "0", _.innerHTML = b.path, u.appendChild(_);
|
|
809
819
|
} else {
|
|
810
820
|
const _ = document.createElement("span");
|
|
811
821
|
_.textContent = t.icon, _.style.marginRight = "6px", _.style.fontSize = "1.2em", u.appendChild(_);
|
|
812
822
|
}
|
|
813
823
|
}
|
|
814
824
|
const m = document.createElement("span"), h = /(https?:\/\/[^\s]+)/g;
|
|
815
|
-
t.topic.split(h).forEach((
|
|
816
|
-
if (
|
|
825
|
+
t.topic.split(h).forEach((b) => {
|
|
826
|
+
if (b.match(h)) {
|
|
817
827
|
const _ = document.createElement("a");
|
|
818
|
-
_.href =
|
|
828
|
+
_.href = b, _.target = "_blank", _.rel = "noopener noreferrer", _.textContent = b, _.style.color = "#3498DB", _.style.textDecoration = "underline", _.style.cursor = "pointer", _.addEventListener("mousedown", (C) => C.stopPropagation()), _.addEventListener("click", (C) => C.stopPropagation()), m.appendChild(_);
|
|
819
829
|
} else
|
|
820
|
-
m.appendChild(document.createTextNode(
|
|
830
|
+
m.appendChild(document.createTextNode(b));
|
|
821
831
|
}), u.appendChild(m);
|
|
822
832
|
const f = t.presentation.customWidth ?? (this.maxWidth !== -1 ? this.maxWidth : void 0);
|
|
823
833
|
f !== void 0 ? (m.style.whiteSpace = "pre-wrap", m.style.wordWrap = "break-word", m.style.overflowWrap = "anywhere", m.style.minWidth = "0", u.style.maxWidth = `${f}px`, u.style.width = "max-content") : m.style.whiteSpace = "pre";
|
|
824
834
|
}
|
|
825
|
-
u.className = "mindmap-node", u.style.position = "absolute", u.style.touchAction = "none", u.style.padding = "8px 12px", t.image && (u.style.padding = "5px"),
|
|
835
|
+
u.className = "mindmap-node", u.style.position = "absolute", u.style.touchAction = "none", u.style.padding = "8px 12px", t.image && (u.style.padding = "5px"), w.name === "custom" ? t.isRoot ? u.style.color = "var(--mindmap-root-color, var(--vscode-editor-foreground, black))" : u.style.color = "var(--mindmap-child-color, var(--vscode-editor-foreground, black))" : t.isRoot ? u.style.color = "var(--mindmap-root-color)" : u.style.color = "var(--mindmap-child-color)";
|
|
826
836
|
const y = this.getThemeColor(t, l);
|
|
827
|
-
if (u.style.setProperty("--node-color", y),
|
|
837
|
+
if (u.style.setProperty("--node-color", y), w.name === "colorful")
|
|
828
838
|
t.isRoot ? u.style.border = "2px solid var(--vscode-editor-foreground, #333)" : u.style.border = `2px solid ${y}`;
|
|
829
|
-
else if (
|
|
839
|
+
else if (w.name === "custom")
|
|
830
840
|
if (t.isRoot) {
|
|
831
841
|
const m = "2px solid var(--vscode-editor-foreground, #333)";
|
|
832
842
|
u.style.border = `var(--mindmap-root-border, ${m})`;
|
|
@@ -834,14 +844,14 @@ class $t {
|
|
|
834
844
|
u.style.border = "var(--mindmap-child-border, 1px solid #ccc)";
|
|
835
845
|
else
|
|
836
846
|
t.isRoot ? u.style.border = "var(--mindmap-root-border)" : u.style.border = "var(--mindmap-child-border)";
|
|
837
|
-
if (u.style.borderRadius = "4px", t.isRoot && (u.style.fontSize = "1.2em", u.style.fontWeight = "bold",
|
|
847
|
+
if (u.style.borderRadius = "4px", t.isRoot && (u.style.fontSize = "1.2em", u.style.fontWeight = "bold", w.name !== "custom" && (u.style.border = "2px solid var(--vscode-editor-foreground, #333)")), t.style.color && (u.style.color = t.style.color), t.style.fontSize && (u.style.fontSize = t.style.fontSize), t.style.fontWeight && (u.style.fontWeight = t.style.fontWeight), t.style.fontStyle && (u.style.fontStyle = t.style.fontStyle), t.style.textDecoration && (u.style.textDecoration = t.style.textDecoration), t.style.background)
|
|
838
848
|
u.style.backgroundColor = t.style.background;
|
|
839
|
-
else if (
|
|
849
|
+
else if (w.name === "custom")
|
|
840
850
|
t.isRoot ? u.style.backgroundColor = "var(--mindmap-root-background, var(--vscode-editor-background, white))" : u.style.backgroundColor = "var(--mindmap-child-background, var(--vscode-editor-background, white))";
|
|
841
851
|
else if (t.isRoot)
|
|
842
852
|
u.style.backgroundColor = "var(--mindmap-root-background)";
|
|
843
853
|
else {
|
|
844
|
-
const m =
|
|
854
|
+
const m = w.name === "colorful" ? "var(--vscode-editor-background, white)" : "inherit";
|
|
845
855
|
u.style.backgroundColor = `var(--mindmap-child-background, ${m})`;
|
|
846
856
|
}
|
|
847
857
|
let c = e;
|
|
@@ -857,8 +867,8 @@ class $t {
|
|
|
857
867
|
const p = document.createElement("div");
|
|
858
868
|
p.className = "mindmap-toggle-btn", p.innerHTML = t.presentation.isFolded ? "+" : "-", p.style.position = "absolute", p.style.width = "16px", p.style.height = "16px", p.style.fontSize = "12px", p.style.lineHeight = "14px", p.style.textAlign = "center", p.style.borderRadius = "50%", p.style.border = "1px solid var(--vscode-widget-border, #999)", p.style.backgroundColor = "var(--vscode-editor-background, #fff)", p.style.color = "var(--vscode-editor-foreground, #000)", p.style.cursor = "pointer", p.style.zIndex = "11", p.style.userSelect = "none";
|
|
859
869
|
const f = 0;
|
|
860
|
-
p.style.left = `${h + f}px`, p.style.top = `${i}px`, p.style.transform = "translate(-50%, -50%)", p.addEventListener("click", (
|
|
861
|
-
|
|
870
|
+
p.style.left = `${h + f}px`, p.style.top = `${i}px`, p.style.transform = "translate(-50%, -50%)", p.addEventListener("click", (b) => {
|
|
871
|
+
b.stopPropagation(), this.options.onToggleFold?.(t.id);
|
|
862
872
|
}), this.nodeContainer.appendChild(p);
|
|
863
873
|
});
|
|
864
874
|
}
|
|
@@ -895,12 +905,12 @@ class $t {
|
|
|
895
905
|
i.style.setProperty("--node-color", o), s.name === "colorful" ? t.isRoot ? i.style.border = "2px solid var(--vscode-editor-foreground, #333)" : i.style.border = `2px solid ${o}` : s.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", s.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.textDecoration && (i.style.textDecoration = t.style.textDecoration), t.style.background && (i.style.backgroundColor = t.style.background), this.nodeContainer.appendChild(i);
|
|
896
906
|
const l = i.offsetWidth, g = i.offsetHeight;
|
|
897
907
|
this.nodeContainer.removeChild(i);
|
|
898
|
-
const
|
|
899
|
-
return this.measureCache.set(t.id,
|
|
908
|
+
const w = { width: l || 100, height: g || 40 };
|
|
909
|
+
return this.measureCache.set(t.id, w), w;
|
|
900
910
|
}
|
|
901
911
|
drawConnection(t, e, i, n, r = "#ccc", s = "default") {
|
|
902
|
-
const o = document.createElementNS("http://www.w3.org/2000/svg", "path"), l = t + (i - t) / 2, g = t + (i - t) / 2,
|
|
903
|
-
if (o.setAttribute("d",
|
|
912
|
+
const o = document.createElementNS("http://www.w3.org/2000/svg", "path"), l = t + (i - t) / 2, g = t + (i - t) / 2, w = `M ${t} ${e} C ${l} ${e}, ${g} ${n}, ${i} ${n}`;
|
|
913
|
+
if (o.setAttribute("d", w), s === "custom")
|
|
904
914
|
o.style.stroke = `var(--mindmap-connection-color, ${r})`;
|
|
905
915
|
else {
|
|
906
916
|
o.style.stroke = "var(--mindmap-connection-color, #ccc)";
|
|
@@ -1022,15 +1032,15 @@ class yt {
|
|
|
1022
1032
|
e.appendChild(s), e.appendChild(o), e.appendChild(l), t.appendChild(e);
|
|
1023
1033
|
const g = document.createElement("div");
|
|
1024
1034
|
g.style.display = "flex", g.style.gap = "4px", g.style.alignItems = "center", g.style.justifyContent = "space-between";
|
|
1025
|
-
const
|
|
1026
|
-
return
|
|
1035
|
+
const w = document.createElement("input");
|
|
1036
|
+
return w.type = "color", w.style.width = "24px", w.style.height = "24px", w.style.border = "1px solid #ccc", w.style.padding = "0", w.style.backgroundColor = "transparent", w.style.cursor = "pointer", w.style.appearance = "none", w.onchange = (u) => {
|
|
1027
1037
|
this.currentNodeId && this.onUpdate && (this.onUpdate(this.currentNodeId, { color: u.target.value }), this.updateActivePaletteItem(u.target.value));
|
|
1028
1038
|
}, yt.PALETTE.forEach((u, y) => {
|
|
1029
1039
|
const c = document.createElement("div");
|
|
1030
1040
|
c.className = "color-swatch", c.dataset.color = u, c.textContent = (y + 1).toString(), c.style.width = "24px", c.style.height = "24px", c.style.backgroundColor = u, c.style.borderRadius = "4px", c.style.cursor = "pointer", c.style.border = "1px solid transparent", c.style.color = u === "#F1C40F" ? "black" : "white", c.style.fontSize = "12px", c.style.fontWeight = "bold", c.style.display = "flex", c.style.justifyContent = "center", c.style.alignItems = "center", c.onclick = () => {
|
|
1031
|
-
this.currentNodeId && this.onUpdate && (this.onUpdate(this.currentNodeId, { color: u }),
|
|
1041
|
+
this.currentNodeId && this.onUpdate && (this.onUpdate(this.currentNodeId, { color: u }), w.value = u, this.updateActivePaletteItem(u));
|
|
1032
1042
|
}, g.appendChild(c);
|
|
1033
|
-
}), g.appendChild(
|
|
1043
|
+
}), g.appendChild(w), t.appendChild(g), t;
|
|
1034
1044
|
}
|
|
1035
1045
|
updateActivePaletteItem(t) {
|
|
1036
1046
|
this.editorEl.querySelectorAll(".color-swatch").forEach((i) => {
|
|
@@ -1401,7 +1411,9 @@ class Qt {
|
|
|
1401
1411
|
e.preventDefault(), this.commandBus.dispatch({ type: "copyNode", nodeId: i });
|
|
1402
1412
|
return;
|
|
1403
1413
|
case "paste":
|
|
1404
|
-
|
|
1414
|
+
if ((e.ctrlKey || e.metaKey) && !e.shiftKey && !e.altKey && e.key.toLowerCase() === "v")
|
|
1415
|
+
return;
|
|
1416
|
+
e.preventDefault(), this.commandBus.dispatch({ type: "pasteNode", parentId: i });
|
|
1405
1417
|
return;
|
|
1406
1418
|
case "navUp":
|
|
1407
1419
|
e.preventDefault(), this.commandBus.dispatch({
|
|
@@ -1590,6 +1602,9 @@ class ee {
|
|
|
1590
1602
|
draggedNodeId = null;
|
|
1591
1603
|
isReadOnly = !1;
|
|
1592
1604
|
ghostElement = null;
|
|
1605
|
+
isDragging = !1;
|
|
1606
|
+
startPosition = null;
|
|
1607
|
+
DRAG_THRESHOLD = 5;
|
|
1593
1608
|
cleanupFns = [];
|
|
1594
1609
|
constructor(t) {
|
|
1595
1610
|
this.commandBus = t.commandBus, this.container = t.container, this.injectDragStyles(), this.attachEvents();
|
|
@@ -1637,11 +1652,18 @@ class ee {
|
|
|
1637
1652
|
if (this.isReadOnly)
|
|
1638
1653
|
return;
|
|
1639
1654
|
const n = e.target.closest(".mindmap-node");
|
|
1640
|
-
n && n.dataset.id && (this.draggedNodeId = n.dataset.id,
|
|
1655
|
+
n && n.dataset.id && (this.draggedNodeId = n.dataset.id, this.startPosition = { x: e.clientX, y: e.clientY }, this.isDragging = !1, n.setPointerCapture(e.pointerId));
|
|
1641
1656
|
};
|
|
1642
1657
|
handlePointerMove = (t) => {
|
|
1643
1658
|
const e = t;
|
|
1644
1659
|
if (this.isReadOnly || !this.draggedNodeId) return;
|
|
1660
|
+
if (!this.isDragging && this.startPosition) {
|
|
1661
|
+
const r = e.clientX - this.startPosition.x, s = e.clientY - this.startPosition.y;
|
|
1662
|
+
if (Math.sqrt(r * r + s * s) >= this.DRAG_THRESHOLD)
|
|
1663
|
+
this.isDragging = !0, this.createGhostElement(e);
|
|
1664
|
+
else
|
|
1665
|
+
return;
|
|
1666
|
+
}
|
|
1645
1667
|
this.ghostElement && (this.ghostElement.style.left = `${e.clientX}px`, this.ghostElement.style.top = `${e.clientY}px`);
|
|
1646
1668
|
const i = document.elementFromPoint(e.clientX, e.clientY);
|
|
1647
1669
|
if (!i) return;
|
|
@@ -1660,17 +1682,17 @@ class ee {
|
|
|
1660
1682
|
n.hasPointerCapture && n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId);
|
|
1661
1683
|
}
|
|
1662
1684
|
let i = null;
|
|
1663
|
-
if (this.draggedNodeId) {
|
|
1685
|
+
if (this.draggedNodeId && this.isDragging) {
|
|
1664
1686
|
const n = document.elementFromPoint(e.clientX, e.clientY);
|
|
1665
1687
|
n && (i = n.closest(".mindmap-node"));
|
|
1666
1688
|
}
|
|
1667
1689
|
if (this.container.querySelectorAll(".mindmap-node").forEach((n) => {
|
|
1668
1690
|
n.classList.remove("drag-over-top", "drag-over-bottom", "drag-over-left", "drag-over-right");
|
|
1669
1691
|
}), this.isReadOnly) {
|
|
1670
|
-
this.draggedNodeId = null;
|
|
1692
|
+
this.draggedNodeId = null, this.isDragging = !1, this.startPosition = null;
|
|
1671
1693
|
return;
|
|
1672
1694
|
}
|
|
1673
|
-
if (i && i.dataset.id && this.draggedNodeId) {
|
|
1695
|
+
if (i && i.dataset.id && this.draggedNodeId && this.isDragging) {
|
|
1674
1696
|
const n = i.dataset.id;
|
|
1675
1697
|
if (this.draggedNodeId !== n) {
|
|
1676
1698
|
const r = this.getDropPosition(e, i);
|
|
@@ -1682,8 +1704,13 @@ class ee {
|
|
|
1682
1704
|
});
|
|
1683
1705
|
}
|
|
1684
1706
|
}
|
|
1685
|
-
this.draggedNodeId = null;
|
|
1707
|
+
this.draggedNodeId = null, this.isDragging = !1, this.startPosition = null;
|
|
1686
1708
|
};
|
|
1709
|
+
createGhostElement(t) {
|
|
1710
|
+
if (!this.draggedNodeId) return;
|
|
1711
|
+
const e = this.container.querySelector(`[data-id="${this.draggedNodeId}"]`);
|
|
1712
|
+
e && (this.ghostElement = e.cloneNode(!0), this.ghostElement.classList.add("kakidash-drag-ghost"), this.ghostElement.style.position = "fixed", this.ghostElement.style.pointerEvents = "none", this.ghostElement.style.opacity = "0.7", this.ghostElement.style.zIndex = "9999", this.ghostElement.style.margin = "0", this.ghostElement.style.left = `${t.clientX}px`, this.ghostElement.style.top = `${t.clientY}px`, this.ghostElement.style.transform = "translate(-50%, -50%)", document.body.appendChild(this.ghostElement));
|
|
1713
|
+
}
|
|
1687
1714
|
getDropPosition(t, e) {
|
|
1688
1715
|
const i = e.getBoundingClientRect(), n = t.clientX - i.left, r = t.clientY - i.top, s = i.width, o = i.height;
|
|
1689
1716
|
return r < o * 0.25 ? "top" : r > o * 0.75 ? "bottom" : n < s * 0.25 ? "left" : (n > s * 0.75, "right");
|
|
@@ -1704,8 +1731,8 @@ class ie {
|
|
|
1704
1731
|
const i = t.textContent || "", n = this.createEditTextarea(t, i);
|
|
1705
1732
|
let r = this.maxWidth;
|
|
1706
1733
|
if (t.style.maxWidth) {
|
|
1707
|
-
const
|
|
1708
|
-
isNaN(
|
|
1734
|
+
const w = parseInt(t.style.maxWidth, 10);
|
|
1735
|
+
isNaN(w) || (r = w);
|
|
1709
1736
|
}
|
|
1710
1737
|
this.applyTextareaStyles(n, t, r);
|
|
1711
1738
|
const s = t.style.outline, o = t.style.boxShadow;
|
|
@@ -1872,26 +1899,31 @@ class ne {
|
|
|
1872
1899
|
const n = e.clipboardData;
|
|
1873
1900
|
if (!n) return;
|
|
1874
1901
|
const r = n.items;
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
u.
|
|
1902
|
+
let s = !1;
|
|
1903
|
+
for (const o of Array.from(r))
|
|
1904
|
+
if (o.type.startsWith("image/")) {
|
|
1905
|
+
s = !0, e.preventDefault();
|
|
1906
|
+
const l = o.getAsFile();
|
|
1907
|
+
if (l) {
|
|
1908
|
+
const g = new FileReader();
|
|
1909
|
+
g.onload = (w) => {
|
|
1910
|
+
const u = w.target?.result, y = new Image();
|
|
1911
|
+
y.onload = () => {
|
|
1884
1912
|
this.commandBus.dispatch({
|
|
1885
1913
|
type: "pasteImage",
|
|
1886
1914
|
parentId: i,
|
|
1887
|
-
imageData:
|
|
1888
|
-
width:
|
|
1889
|
-
height:
|
|
1915
|
+
imageData: u,
|
|
1916
|
+
width: y.width,
|
|
1917
|
+
height: y.height
|
|
1890
1918
|
});
|
|
1891
|
-
},
|
|
1892
|
-
},
|
|
1919
|
+
}, y.src = u;
|
|
1920
|
+
}, g.readAsDataURL(l);
|
|
1893
1921
|
}
|
|
1894
1922
|
}
|
|
1923
|
+
if (!s) {
|
|
1924
|
+
const o = n.getData("text/plain");
|
|
1925
|
+
o ? (e.preventDefault(), this.commandBus.dispatch({ type: "pasteNode", parentId: i, text: o })) : (e.preventDefault(), this.commandBus.dispatch({ type: "pasteNode", parentId: i }));
|
|
1926
|
+
}
|
|
1895
1927
|
}), this.commandBus.on(
|
|
1896
1928
|
"editNode",
|
|
1897
1929
|
(e) => {
|
|
@@ -1962,17 +1994,17 @@ class se {
|
|
|
1962
1994
|
}
|
|
1963
1995
|
calculateChildrenStack(t, e, i, n, r, s, o, l) {
|
|
1964
1996
|
const g = e.reduce((c, m) => c + this.getNodeHeight(m), 0);
|
|
1965
|
-
let
|
|
1997
|
+
let w = n - g / 2;
|
|
1966
1998
|
const u = 80;
|
|
1967
1999
|
let y = 0;
|
|
1968
2000
|
t.isRoot ? y = s === "right" ? i + o / 2 : i - o / 2 : s === "right" ? y = i + o : y = i - o, e.forEach((c) => {
|
|
1969
|
-
const m = this.getNodeHeight(c), h =
|
|
2001
|
+
const m = this.getNodeHeight(c), h = w + m / 2, p = s === "right" ? y + u : y - u, { width: f, height: b } = this.measureNode(c);
|
|
1970
2002
|
if (l.nodes.push({
|
|
1971
2003
|
nodeId: c.id,
|
|
1972
2004
|
x: p,
|
|
1973
2005
|
y: h,
|
|
1974
2006
|
width: f,
|
|
1975
|
-
height:
|
|
2007
|
+
height: b,
|
|
1976
2008
|
direction: s,
|
|
1977
2009
|
isRoot: !1
|
|
1978
2010
|
}), l.connections.push({
|
|
@@ -2004,7 +2036,7 @@ class se {
|
|
|
2004
2036
|
l
|
|
2005
2037
|
);
|
|
2006
2038
|
}
|
|
2007
|
-
|
|
2039
|
+
w += m;
|
|
2008
2040
|
});
|
|
2009
2041
|
}
|
|
2010
2042
|
getChildrenHeight(t) {
|
|
@@ -2282,8 +2314,8 @@ class ae {
|
|
|
2282
2314
|
f = i.getHelpIcon();
|
|
2283
2315
|
break;
|
|
2284
2316
|
}
|
|
2285
|
-
const
|
|
2286
|
-
|
|
2317
|
+
const b = document.createElement("div");
|
|
2318
|
+
b.style.width = "24px", b.style.height = "24px", b.style.display = "flex", b.style.alignItems = "center", b.style.justifyContent = "center", b.style.color = "#555", b.innerHTML = f, p.appendChild(b);
|
|
2287
2319
|
const _ = document.createElement("td");
|
|
2288
2320
|
_.textContent = m.desc, _.style.padding = "8px", _.style.textAlign = "left", _.style.color = "#333", h.appendChild(p), h.appendChild(_), y.appendChild(h);
|
|
2289
2321
|
}), r.appendChild(y);
|
|
@@ -2361,9 +2393,9 @@ class ae {
|
|
|
2361
2393
|
}
|
|
2362
2394
|
].forEach((u) => {
|
|
2363
2395
|
const y = [];
|
|
2364
|
-
if (u.actions.forEach((
|
|
2396
|
+
if (u.actions.forEach((b) => {
|
|
2365
2397
|
let _ = "";
|
|
2366
|
-
const C =
|
|
2398
|
+
const C = b;
|
|
2367
2399
|
if (C.key)
|
|
2368
2400
|
_ = C.key;
|
|
2369
2401
|
else if (C.action && t[C.action]) {
|
|
@@ -2390,13 +2422,13 @@ class ae {
|
|
|
2390
2422
|
const p = document.createElement("th");
|
|
2391
2423
|
p.textContent = e === "ja" ? "キー" : "Key", p.style.textAlign = "center", p.style.padding = "8px 0", p.style.width = "40%", p.style.color = "#666";
|
|
2392
2424
|
const f = document.createElement("th");
|
|
2393
|
-
f.textContent = e === "ja" ? "説明" : "Description", f.style.textAlign = "center", f.style.padding = "8px 0", f.style.color = "#666", h.appendChild(p), h.appendChild(f), m.appendChild(h), y.forEach((
|
|
2425
|
+
f.textContent = e === "ja" ? "説明" : "Description", f.style.textAlign = "center", f.style.padding = "8px 0", f.style.color = "#666", h.appendChild(p), h.appendChild(f), m.appendChild(h), y.forEach((b) => {
|
|
2394
2426
|
const _ = document.createElement("tr");
|
|
2395
2427
|
_.style.borderBottom = "1px solid #f9f9f9";
|
|
2396
2428
|
const C = document.createElement("td");
|
|
2397
|
-
C.textContent =
|
|
2429
|
+
C.textContent = b.key, C.style.padding = "6px 0", C.style.fontWeight = "bold", C.style.color = "#555", C.style.minWidth = "180px", C.style.textAlign = "center";
|
|
2398
2430
|
const S = document.createElement("td");
|
|
2399
|
-
S.textContent =
|
|
2431
|
+
S.textContent = b.desc, S.style.padding = "6px 0", S.style.textAlign = "left", S.style.color = "#333", _.appendChild(C), _.appendChild(S), m.appendChild(_);
|
|
2400
2432
|
}), r.appendChild(m);
|
|
2401
2433
|
}), n.appendChild(r), document.body.appendChild(n), requestAnimationFrame(() => {
|
|
2402
2434
|
n.style.opacity = "1";
|
|
@@ -2404,11 +2436,11 @@ class ae {
|
|
|
2404
2436
|
const g = () => {
|
|
2405
2437
|
n.style.opacity = "0", setTimeout(() => {
|
|
2406
2438
|
document.body.contains(n) && document.body.removeChild(n);
|
|
2407
|
-
}, 200), document.removeEventListener("keydown",
|
|
2408
|
-
},
|
|
2439
|
+
}, 200), document.removeEventListener("keydown", w);
|
|
2440
|
+
}, w = (u) => {
|
|
2409
2441
|
u.key === "Escape" && g();
|
|
2410
2442
|
};
|
|
2411
|
-
document.addEventListener("keydown",
|
|
2443
|
+
document.addEventListener("keydown", w), n.addEventListener("click", (u) => {
|
|
2412
2444
|
u.target === n && g();
|
|
2413
2445
|
});
|
|
2414
2446
|
}
|
|
@@ -2458,7 +2490,7 @@ class de {
|
|
|
2458
2490
|
}
|
|
2459
2491
|
subscribeToCommands() {
|
|
2460
2492
|
const t = this.commandBus;
|
|
2461
|
-
t.on("addNode", (e) => this.addChildNode(e.parentId)), t.on("addSibling", (e) => this.addSiblingNode(e.nodeId, e.position)), t.on("deleteNode", (e) => this.removeNode(e.nodeId)), t.on("insertParent", (e) => this.insertParentNode(e.nodeId)), t.on("dropNode", (e) => this.moveNode(e.draggedId, e.targetId, e.position)), t.on("updateNode", (e) => this.updateNodeTopic(e.nodeId, e.topic)), t.on("navigate", (e) => this.navigateNode(e.nodeId, e.direction, e.extendSelection)), t.on("pan", (e) => this.panBoard(e.dx, e.dy)), t.on("zoom", (e) => this.zoomBoard(e.delta, e.x, e.y)), t.on("zoomReset", () => this.resetZoom()), t.on("copyNode", (e) => this.copyNode(e.nodeId)), t.on("pasteNode", (e) => this.pasteNode(e.parentId)), t.on("cutNode", (e) => this.cutNode(e.nodeId)), t.on("pasteImage", (e) => this.pasteImage(e.parentId, e.imageData, e.width, e.height)), t.on("undo", () => this.undo()), t.on("redo", () => this.redo()), t.on("styleAction", (e) => this.onStyleAction(e.nodeId, e.action)), t.on("toggleFold", (e) => this.toggleFold(e.nodeId)), t.on("toggleCommandPalette", () => this.toggleCommandPalette()), t.on("updateNodeWidth", (e) => this.updateNodeWidth(e.nodeId, e.increment)), t.on("setTheme", (e) => this.setTheme(e.theme)), t.on("setLayoutMode", (e) => this.setLayoutMode(e.mode)), t.on("editEnd", () => this.onEditEnd()), t.on("selectNode", (e) => {
|
|
2493
|
+
t.on("addNode", (e) => this.addChildNode(e.parentId)), t.on("addSibling", (e) => this.addSiblingNode(e.nodeId, e.position)), t.on("deleteNode", (e) => this.removeNode(e.nodeId)), t.on("insertParent", (e) => this.insertParentNode(e.nodeId)), t.on("dropNode", (e) => this.moveNode(e.draggedId, e.targetId, e.position)), t.on("updateNode", (e) => this.updateNodeTopic(e.nodeId, e.topic)), t.on("navigate", (e) => this.navigateNode(e.nodeId, e.direction, e.extendSelection)), t.on("pan", (e) => this.panBoard(e.dx, e.dy)), t.on("zoom", (e) => this.zoomBoard(e.delta, e.x, e.y)), t.on("zoomReset", () => this.resetZoom()), t.on("copyNode", (e) => this.copyNode(e.nodeId)), t.on("pasteNode", (e) => this.pasteNode(e.parentId, e.text)), t.on("cutNode", (e) => this.cutNode(e.nodeId)), t.on("pasteImage", (e) => this.pasteImage(e.parentId, e.imageData, e.width, e.height)), t.on("undo", () => this.undo()), t.on("redo", () => this.redo()), t.on("styleAction", (e) => this.onStyleAction(e.nodeId, e.action)), t.on("toggleFold", (e) => this.toggleFold(e.nodeId)), t.on("toggleCommandPalette", () => this.toggleCommandPalette()), t.on("updateNodeWidth", (e) => this.updateNodeWidth(e.nodeId, e.increment)), t.on("setTheme", (e) => this.setTheme(e.theme)), t.on("setLayoutMode", (e) => this.setLayoutMode(e.mode)), t.on("editEnd", () => this.onEditEnd()), t.on("selectNode", (e) => {
|
|
2462
2494
|
e.extendSelection && e.nodeId ? this.selectRangeTo(e.nodeId) : this.selectNode(e.nodeId);
|
|
2463
2495
|
});
|
|
2464
2496
|
}
|
|
@@ -2719,7 +2751,7 @@ class de {
|
|
|
2719
2751
|
if (s) {
|
|
2720
2752
|
const o = s.children.findIndex((g) => g.id === i.id), l = s.children.findIndex((g) => g.id === n.id);
|
|
2721
2753
|
if (o !== -1 && l !== -1) {
|
|
2722
|
-
const g = Math.min(o, l),
|
|
2754
|
+
const g = Math.min(o, l), w = Math.max(o, l), u = s.children.slice(g, w + 1).map((y) => y.id);
|
|
2723
2755
|
this.selectNodes(u), this.selectedNodeId = e, this.updateSelectionState();
|
|
2724
2756
|
return;
|
|
2725
2757
|
}
|
|
@@ -2732,10 +2764,10 @@ class de {
|
|
|
2732
2764
|
const e = this.getIdsToActOn(t);
|
|
2733
2765
|
e.length > 1 ? this.clipboardService.copyNodes(e) : this.clipboardService.copyNodes([t]);
|
|
2734
2766
|
}
|
|
2735
|
-
pasteNode(t) {
|
|
2736
|
-
this.saveState(), this.eventBus.emit("command", { name: "pasteNode", args: { parentId: t } });
|
|
2737
|
-
const
|
|
2738
|
-
|
|
2767
|
+
pasteNode(t, e) {
|
|
2768
|
+
this.saveState(), this.eventBus.emit("command", { name: "pasteNode", args: { parentId: t, text: e } });
|
|
2769
|
+
const i = this.clipboardService.createPastedNodes(t, e), n = i.length > 0 ? i[0] : null;
|
|
2770
|
+
i.length > 0 && this.service.addExistingNodes(t, i), n && (this.render(), this.selectNode(n.id), this.eventBus.emit("node:add", { id: n.id, topic: n.topic }), this.eventBus.emit("model:change", void 0), setTimeout(() => this.ensureNodeVisible(n.id, !0), 0));
|
|
2739
2771
|
}
|
|
2740
2772
|
cutNode(t) {
|
|
2741
2773
|
this.saveState(), this.eventBus.emit("command", { name: "cutNode", args: { nodeId: t } });
|
|
@@ -2768,7 +2800,7 @@ class de {
|
|
|
2768
2800
|
e.index >= 0 && e.index < yt.PALETTE.length && (r = { color: yt.PALETTE[e.index] });
|
|
2769
2801
|
else if (e.type === "increaseSize" || e.type === "decreaseSize") {
|
|
2770
2802
|
const s = yt.FONT_SIZES, o = n.fontSize || "";
|
|
2771
|
-
let l = s.findIndex((
|
|
2803
|
+
let l = s.findIndex((w) => w.value === o);
|
|
2772
2804
|
l === -1 && (l = 0);
|
|
2773
2805
|
const g = e.type === "increaseSize" ? Math.min(s.length - 1, l + 1) : Math.max(0, l - 1);
|
|
2774
2806
|
g !== l && (r = { fontSize: s[g].value });
|
|
@@ -2843,11 +2875,11 @@ class le {
|
|
|
2843
2875
|
}
|
|
2844
2876
|
/** Zoom centered on a specific screen coordinate */
|
|
2845
2877
|
zoom(t, e, i) {
|
|
2846
|
-
const o = this.renderer.container.getBoundingClientRect(), l = e - o.left, g = i - o.top,
|
|
2878
|
+
const o = this.renderer.container.getBoundingClientRect(), l = e - o.left, g = i - o.top, w = Math.min(
|
|
2847
2879
|
Math.max(this.scale * (1 - t * 1e-3), 0.1),
|
|
2848
2880
|
5
|
|
2849
|
-
), u = l - (l - this.panX) * (
|
|
2850
|
-
this.panX = u, this.panY = y, this.targetPanX = u, this.targetPanY = y, this.scale =
|
|
2881
|
+
), u = l - (l - this.panX) * (w / this.scale), y = g - (g - this.panY) * (w / this.scale);
|
|
2882
|
+
this.panX = u, this.panY = y, this.targetPanX = u, this.targetPanY = y, this.scale = w, this.renderer.updateTransform(this.panX, this.panY, this.scale);
|
|
2851
2883
|
}
|
|
2852
2884
|
/** Reset zoom to 1.0 scale */
|
|
2853
2885
|
resetZoom() {
|
|
@@ -2869,12 +2901,12 @@ class le {
|
|
|
2869
2901
|
if (!n) return;
|
|
2870
2902
|
const r = n.getBoundingClientRect(), s = this.renderer.container.getBoundingClientRect(), o = 50;
|
|
2871
2903
|
let l = 0, g = 0;
|
|
2872
|
-
const
|
|
2873
|
-
if (e && (
|
|
2904
|
+
const w = r.left < s.left + o, u = r.right > s.right - o, y = r.top < s.top + o, c = r.bottom > s.bottom - o;
|
|
2905
|
+
if (e && (w || u || y || c)) {
|
|
2874
2906
|
const m = r.left + r.width / 2, h = r.top + r.height / 2, p = s.left + s.width / 2, f = s.top + s.height / 2;
|
|
2875
2907
|
l = p - m, g = f - h;
|
|
2876
2908
|
} else
|
|
2877
|
-
|
|
2909
|
+
w ? l = s.left + o - r.left : u && (l = s.right - o - r.right), y ? g = s.top + o - r.top : c && (g = s.bottom - o - r.bottom);
|
|
2878
2910
|
(l !== 0 || g !== 0) && (i ? (this.panX += l, this.panY += g, this.targetPanX = this.panX, this.targetPanY = this.panY, this.renderer.updateTransform(this.panX, this.panY, this.scale)) : this.pan(l, g));
|
|
2879
2911
|
}
|
|
2880
2912
|
/** Start the smooth animation loop for pan transitions */
|
|
@@ -2990,7 +3022,7 @@ class ce {
|
|
|
2990
3022
|
}
|
|
2991
3023
|
}
|
|
2992
3024
|
}
|
|
2993
|
-
class
|
|
3025
|
+
class At {
|
|
2994
3026
|
/**
|
|
2995
3027
|
* Generates an SVG string representation of the mind map content within the given container.
|
|
2996
3028
|
* @param container The element containing the mind map layers.
|
|
@@ -3019,12 +3051,12 @@ class Tt {
|
|
|
3019
3051
|
if (!i || !r)
|
|
3020
3052
|
throw new Error("Could not find mind map content layers.");
|
|
3021
3053
|
let s = 1 / 0, o = 1 / 0, l = -1 / 0, g = -1 / 0;
|
|
3022
|
-
const
|
|
3023
|
-
if (
|
|
3054
|
+
const w = r.children;
|
|
3055
|
+
if (w.length === 0)
|
|
3024
3056
|
s = 0, o = 0, l = 800, g = 600;
|
|
3025
3057
|
else
|
|
3026
|
-
for (let X = 0; X <
|
|
3027
|
-
const k =
|
|
3058
|
+
for (let X = 0; X < w.length; X++) {
|
|
3059
|
+
const k = w[X], D = parseFloat(k.style.left || "0"), d = parseFloat(k.style.top || "0"), R = k.offsetWidth, J = k.offsetHeight, W = d - J / 2, tt = d + J / 2;
|
|
3028
3060
|
D < s && (s = D), W < o && (o = W), D + R > l && (l = D + R), tt > g && (g = tt);
|
|
3029
3061
|
}
|
|
3030
3062
|
const u = 50;
|
|
@@ -3046,7 +3078,7 @@ class Tt {
|
|
|
3046
3078
|
const k = m.getPropertyValue(X).trim();
|
|
3047
3079
|
k && p.push(`${X}: ${k};`);
|
|
3048
3080
|
});
|
|
3049
|
-
const f = p.join(" "),
|
|
3081
|
+
const f = p.join(" "), b = m.fontFamily, _ = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3050
3082
|
_.setAttribute("xmlns", "http://www.w3.org/2000/svg"), _.setAttribute("width", y.toString()), _.setAttribute("height", c.toString()), _.setAttribute("viewBox", `0 0 ${y} ${c}`), _.style.cssText = f;
|
|
3051
3083
|
const C = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
3052
3084
|
C.setAttribute("x", "0"), C.setAttribute("y", "0"), C.setAttribute("width", y.toString()), C.setAttribute("height", c.toString()), C.setAttribute("fill", m.backgroundColor || "#ffffff"), _.appendChild(C);
|
|
@@ -3061,19 +3093,19 @@ class Tt {
|
|
|
3061
3093
|
const B = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
|
3062
3094
|
B.setAttribute("x", "0"), B.setAttribute("y", "0"), B.setAttribute("width", (l + u).toString()), B.setAttribute("height", (g + u).toString()), B.style.overflow = "visible";
|
|
3063
3095
|
const O = document.createElement("div");
|
|
3064
|
-
O.setAttribute("xmlns", "http://www.w3.org/1999/xhtml"), O.style.cssText = `position: relative; width: 100%; height: 100%; font-family: ${
|
|
3065
|
-
const
|
|
3066
|
-
for (let X = 0; X <
|
|
3067
|
-
const k =
|
|
3096
|
+
O.setAttribute("xmlns", "http://www.w3.org/1999/xhtml"), O.style.cssText = `position: relative; width: 100%; height: 100%; font-family: ${b}; ${f}`;
|
|
3097
|
+
const T = r.children;
|
|
3098
|
+
for (let X = 0; X < T.length; X++) {
|
|
3099
|
+
const k = T[X].cloneNode(!0);
|
|
3068
3100
|
O.appendChild(k);
|
|
3069
3101
|
}
|
|
3070
3102
|
return B.appendChild(O), S.appendChild(B), _.appendChild(S), new XMLSerializer().serializeToString(_);
|
|
3071
3103
|
}
|
|
3072
3104
|
}
|
|
3073
|
-
class
|
|
3105
|
+
class Tt {
|
|
3074
3106
|
async exportToSvg(t, e) {
|
|
3075
3107
|
try {
|
|
3076
|
-
const n = new
|
|
3108
|
+
const n = new At().generate(t), r = new Blob([n], { type: "image/svg+xml;charset=utf-8" });
|
|
3077
3109
|
await this.saveFile(
|
|
3078
3110
|
r,
|
|
3079
3111
|
"mindmap.svg",
|
|
@@ -3086,16 +3118,16 @@ class At {
|
|
|
3086
3118
|
}
|
|
3087
3119
|
async exportToPng(t, e) {
|
|
3088
3120
|
try {
|
|
3089
|
-
const n = new
|
|
3121
|
+
const n = new At().generate(t), s = `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(n)))}`;
|
|
3090
3122
|
await new Promise((o, l) => {
|
|
3091
3123
|
const g = new Image();
|
|
3092
3124
|
g.onload = () => {
|
|
3093
3125
|
try {
|
|
3094
|
-
const
|
|
3095
|
-
|
|
3096
|
-
const u =
|
|
3126
|
+
const w = document.createElement("canvas");
|
|
3127
|
+
w.width = g.width, w.height = g.height;
|
|
3128
|
+
const u = w.getContext("2d");
|
|
3097
3129
|
if (!u) throw new Error("Could not get canvas context");
|
|
3098
|
-
u.drawImage(g, 0, 0),
|
|
3130
|
+
u.drawImage(g, 0, 0), w.toBlob((y) => {
|
|
3099
3131
|
y ? this.saveFile(
|
|
3100
3132
|
y,
|
|
3101
3133
|
"mindmap.png",
|
|
@@ -3103,8 +3135,8 @@ class At {
|
|
|
3103
3135
|
e
|
|
3104
3136
|
).then(() => o()).catch((c) => l(c instanceof Error ? c : new Error(String(c)))) : l(new Error("Failed to generate PNG blob."));
|
|
3105
3137
|
}, "image/png");
|
|
3106
|
-
} catch (
|
|
3107
|
-
l(
|
|
3138
|
+
} catch (w) {
|
|
3139
|
+
l(w instanceof Error ? w : new Error(String(w)));
|
|
3108
3140
|
}
|
|
3109
3141
|
}, g.onerror = () => {
|
|
3110
3142
|
l(new Error("Failed to load SVG for PNG conversion"));
|
|
@@ -3172,7 +3204,9 @@ class he {
|
|
|
3172
3204
|
types: [
|
|
3173
3205
|
{
|
|
3174
3206
|
description: "Markdown File",
|
|
3175
|
-
accept: {
|
|
3207
|
+
accept: {
|
|
3208
|
+
"text/markdown": [".md"]
|
|
3209
|
+
}
|
|
3176
3210
|
}
|
|
3177
3211
|
]
|
|
3178
3212
|
})).createWritable();
|
|
@@ -3201,11 +3235,11 @@ function fe() {
|
|
|
3201
3235
|
Q.exports = e();
|
|
3202
3236
|
})(function() {
|
|
3203
3237
|
return (function e(i, n, r) {
|
|
3204
|
-
function s(g,
|
|
3238
|
+
function s(g, w) {
|
|
3205
3239
|
if (!n[g]) {
|
|
3206
3240
|
if (!i[g]) {
|
|
3207
3241
|
var u = typeof kt == "function" && kt;
|
|
3208
|
-
if (!
|
|
3242
|
+
if (!w && u) return u(g, !0);
|
|
3209
3243
|
if (o) return o(g, !0);
|
|
3210
3244
|
var y = new Error("Cannot find module '" + g + "'");
|
|
3211
3245
|
throw y.code = "MODULE_NOT_FOUND", y;
|
|
@@ -3223,30 +3257,30 @@ function fe() {
|
|
|
3223
3257
|
})({ 1: [function(e, i, n) {
|
|
3224
3258
|
var r = e("./utils"), s = e("./support"), o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
3225
3259
|
n.encode = function(l) {
|
|
3226
|
-
for (var g,
|
|
3260
|
+
for (var g, w, u, y, c, m, h, p = [], f = 0, b = l.length, _ = b, C = r.getTypeOf(l) !== "string"; f < l.length; ) _ = b - f, u = C ? (g = l[f++], w = f < b ? l[f++] : 0, f < b ? l[f++] : 0) : (g = l.charCodeAt(f++), w = f < b ? l.charCodeAt(f++) : 0, f < b ? l.charCodeAt(f++) : 0), y = g >> 2, c = (3 & g) << 4 | w >> 4, m = 1 < _ ? (15 & w) << 2 | u >> 6 : 64, h = 2 < _ ? 63 & u : 64, p.push(o.charAt(y) + o.charAt(c) + o.charAt(m) + o.charAt(h));
|
|
3227
3261
|
return p.join("");
|
|
3228
3262
|
}, n.decode = function(l) {
|
|
3229
|
-
var g,
|
|
3263
|
+
var g, w, u, y, c, m, h = 0, p = 0, f = "data:";
|
|
3230
3264
|
if (l.substr(0, f.length) === f) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
3231
|
-
var
|
|
3265
|
+
var b, _ = 3 * (l = l.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
3232
3266
|
if (l.charAt(l.length - 1) === o.charAt(64) && _--, l.charAt(l.length - 2) === o.charAt(64) && _--, _ % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
3233
|
-
for (
|
|
3234
|
-
return
|
|
3267
|
+
for (b = s.uint8array ? new Uint8Array(0 | _) : new Array(0 | _); h < l.length; ) g = o.indexOf(l.charAt(h++)) << 2 | (y = o.indexOf(l.charAt(h++))) >> 4, w = (15 & y) << 4 | (c = o.indexOf(l.charAt(h++))) >> 2, u = (3 & c) << 6 | (m = o.indexOf(l.charAt(h++))), b[p++] = g, c !== 64 && (b[p++] = w), m !== 64 && (b[p++] = u);
|
|
3268
|
+
return b;
|
|
3235
3269
|
};
|
|
3236
3270
|
}, { "./support": 30, "./utils": 32 }], 2: [function(e, i, n) {
|
|
3237
3271
|
var r = e("./external"), s = e("./stream/DataWorker"), o = e("./stream/Crc32Probe"), l = e("./stream/DataLengthProbe");
|
|
3238
|
-
function g(
|
|
3239
|
-
this.compressedSize =
|
|
3272
|
+
function g(w, u, y, c, m) {
|
|
3273
|
+
this.compressedSize = w, this.uncompressedSize = u, this.crc32 = y, this.compression = c, this.compressedContent = m;
|
|
3240
3274
|
}
|
|
3241
3275
|
g.prototype = { getContentWorker: function() {
|
|
3242
|
-
var
|
|
3243
|
-
return
|
|
3276
|
+
var w = new s(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")), u = this;
|
|
3277
|
+
return w.on("end", function() {
|
|
3244
3278
|
if (this.streamInfo.data_length !== u.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
|
|
3245
|
-
}),
|
|
3279
|
+
}), w;
|
|
3246
3280
|
}, getCompressedWorker: function() {
|
|
3247
3281
|
return new s(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
3248
|
-
} }, g.createWorkerFrom = function(
|
|
3249
|
-
return
|
|
3282
|
+
} }, g.createWorkerFrom = function(w, u, y) {
|
|
3283
|
+
return w.pipe(new o()).pipe(new l("uncompressedSize")).pipe(u.compressWorker(y)).pipe(new l("compressedSize")).withStreamInfo("compression", u);
|
|
3250
3284
|
}, i.exports = g;
|
|
3251
3285
|
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(e, i, n) {
|
|
3252
3286
|
var r = e("./stream/GenericWorker");
|
|
@@ -3259,21 +3293,21 @@ function fe() {
|
|
|
3259
3293
|
var r = e("./utils"), s = (function() {
|
|
3260
3294
|
for (var o, l = [], g = 0; g < 256; g++) {
|
|
3261
3295
|
o = g;
|
|
3262
|
-
for (var
|
|
3296
|
+
for (var w = 0; w < 8; w++) o = 1 & o ? 3988292384 ^ o >>> 1 : o >>> 1;
|
|
3263
3297
|
l[g] = o;
|
|
3264
3298
|
}
|
|
3265
3299
|
return l;
|
|
3266
3300
|
})();
|
|
3267
3301
|
i.exports = function(o, l) {
|
|
3268
|
-
return o !== void 0 && o.length ? r.getTypeOf(o) !== "string" ? (function(g,
|
|
3302
|
+
return o !== void 0 && o.length ? r.getTypeOf(o) !== "string" ? (function(g, w, u, y) {
|
|
3269
3303
|
var c = s, m = y + u;
|
|
3270
3304
|
g ^= -1;
|
|
3271
|
-
for (var h = y; h < m; h++) g = g >>> 8 ^ c[255 & (g ^
|
|
3305
|
+
for (var h = y; h < m; h++) g = g >>> 8 ^ c[255 & (g ^ w[h])];
|
|
3272
3306
|
return -1 ^ g;
|
|
3273
|
-
})(0 | l, o, o.length, 0) : (function(g,
|
|
3307
|
+
})(0 | l, o, o.length, 0) : (function(g, w, u, y) {
|
|
3274
3308
|
var c = s, m = y + u;
|
|
3275
3309
|
g ^= -1;
|
|
3276
|
-
for (var h = y; h < m; h++) g = g >>> 8 ^ c[255 & (g ^
|
|
3310
|
+
for (var h = y; h < m; h++) g = g >>> 8 ^ c[255 & (g ^ w.charCodeAt(h))];
|
|
3277
3311
|
return -1 ^ g;
|
|
3278
3312
|
})(0 | l, o, o.length, 0) : 0;
|
|
3279
3313
|
};
|
|
@@ -3284,25 +3318,25 @@ function fe() {
|
|
|
3284
3318
|
r = typeof Promise < "u" ? Promise : e("lie"), i.exports = { Promise: r };
|
|
3285
3319
|
}, { lie: 37 }], 7: [function(e, i, n) {
|
|
3286
3320
|
var r = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", s = e("pako"), o = e("./utils"), l = e("./stream/GenericWorker"), g = r ? "uint8array" : "array";
|
|
3287
|
-
function
|
|
3321
|
+
function w(u, y) {
|
|
3288
3322
|
l.call(this, "FlateWorker/" + u), this._pako = null, this._pakoAction = u, this._pakoOptions = y, this.meta = {};
|
|
3289
3323
|
}
|
|
3290
|
-
n.magic = "\b\0", o.inherits(
|
|
3324
|
+
n.magic = "\b\0", o.inherits(w, l), w.prototype.processChunk = function(u) {
|
|
3291
3325
|
this.meta = u.meta, this._pako === null && this._createPako(), this._pako.push(o.transformTo(g, u.data), !1);
|
|
3292
|
-
},
|
|
3326
|
+
}, w.prototype.flush = function() {
|
|
3293
3327
|
l.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
|
|
3294
|
-
},
|
|
3328
|
+
}, w.prototype.cleanUp = function() {
|
|
3295
3329
|
l.prototype.cleanUp.call(this), this._pako = null;
|
|
3296
|
-
},
|
|
3330
|
+
}, w.prototype._createPako = function() {
|
|
3297
3331
|
this._pako = new s[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
|
|
3298
3332
|
var u = this;
|
|
3299
3333
|
this._pako.onData = function(y) {
|
|
3300
3334
|
u.push({ data: y, meta: u.meta });
|
|
3301
3335
|
};
|
|
3302
3336
|
}, n.compressWorker = function(u) {
|
|
3303
|
-
return new
|
|
3337
|
+
return new w("Deflate", u);
|
|
3304
3338
|
}, n.uncompressWorker = function() {
|
|
3305
|
-
return new
|
|
3339
|
+
return new w("Inflate", {});
|
|
3306
3340
|
};
|
|
3307
3341
|
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(e, i, n) {
|
|
3308
3342
|
function r(c, m) {
|
|
@@ -3310,8 +3344,8 @@ function fe() {
|
|
|
3310
3344
|
for (h = 0; h < m; h++) p += String.fromCharCode(255 & c), c >>>= 8;
|
|
3311
3345
|
return p;
|
|
3312
3346
|
}
|
|
3313
|
-
function s(c, m, h, p, f,
|
|
3314
|
-
var _, C, S = c.file, z = c.compression, B =
|
|
3347
|
+
function s(c, m, h, p, f, b) {
|
|
3348
|
+
var _, C, S = c.file, z = c.compression, B = b !== g.utf8encode, O = o.transformTo("string", b(S.name)), T = o.transformTo("string", g.utf8encode(S.name)), H = S.comment, X = o.transformTo("string", b(H)), k = o.transformTo("string", g.utf8encode(H)), D = T.length !== S.name.length, d = k.length !== H.length, R = "", J = "", W = "", tt = S.dir, U = S.date, q = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
3315
3349
|
m && !h || (q.crc32 = c.crc32, q.compressedSize = c.compressedSize, q.uncompressedSize = c.uncompressedSize);
|
|
3316
3350
|
var M = 0;
|
|
3317
3351
|
m && (M |= 8), B || !D && !d || (M |= 2048);
|
|
@@ -3321,12 +3355,12 @@ function fe() {
|
|
|
3321
3355
|
return K || (lt = st ? 16893 : 33204), (65535 & lt) << 16;
|
|
3322
3356
|
})(S.unixPermissions, tt)) : (V = 20, I |= (function(K) {
|
|
3323
3357
|
return 63 & (K || 0);
|
|
3324
|
-
})(S.dosPermissions)), _ = U.getUTCHours(), _ <<= 6, _ |= U.getUTCMinutes(), _ <<= 5, _ |= U.getUTCSeconds() / 2, C = U.getUTCFullYear() - 1980, C <<= 4, C |= U.getUTCMonth() + 1, C <<= 5, C |= U.getUTCDate(), D && (J = r(1, 1) + r(
|
|
3358
|
+
})(S.dosPermissions)), _ = U.getUTCHours(), _ <<= 6, _ |= U.getUTCMinutes(), _ <<= 5, _ |= U.getUTCSeconds() / 2, C = U.getUTCFullYear() - 1980, C <<= 4, C |= U.getUTCMonth() + 1, C <<= 5, C |= U.getUTCDate(), D && (J = r(1, 1) + r(w(O), 4) + T, R += "up" + r(J.length, 2) + J), d && (W = r(1, 1) + r(w(X), 4) + k, R += "uc" + r(W.length, 2) + W);
|
|
3325
3359
|
var Y = "";
|
|
3326
3360
|
return Y += `
|
|
3327
3361
|
\0`, Y += r(M, 2), Y += z.magic, Y += r(_, 2), Y += r(C, 2), Y += r(q.crc32, 4), Y += r(q.compressedSize, 4), Y += r(q.uncompressedSize, 4), Y += r(O.length, 2), Y += r(R.length, 2), { fileRecord: u.LOCAL_FILE_HEADER + Y + O + R, dirRecord: u.CENTRAL_FILE_HEADER + r(V, 2) + Y + r(X.length, 2) + "\0\0\0\0" + r(I, 4) + r(p, 4) + O + R + X };
|
|
3328
3362
|
}
|
|
3329
|
-
var o = e("../utils"), l = e("../stream/GenericWorker"), g = e("../utf8"),
|
|
3363
|
+
var o = e("../utils"), l = e("../stream/GenericWorker"), g = e("../utf8"), w = e("../crc32"), u = e("../signature");
|
|
3330
3364
|
function y(c, m, h, p) {
|
|
3331
3365
|
l.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = m, this.zipPlatform = h, this.encodeFileName = p, this.streamFiles = c, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
3332
3366
|
}
|
|
@@ -3350,9 +3384,9 @@ function fe() {
|
|
|
3350
3384
|
this.currentFile = null;
|
|
3351
3385
|
}, y.prototype.flush = function() {
|
|
3352
3386
|
for (var c = this.bytesWritten, m = 0; m < this.dirRecords.length; m++) this.push({ data: this.dirRecords[m], meta: { percent: 100 } });
|
|
3353
|
-
var h = this.bytesWritten - c, p = (function(f,
|
|
3387
|
+
var h = this.bytesWritten - c, p = (function(f, b, _, C, S) {
|
|
3354
3388
|
var z = o.transformTo("string", S(C));
|
|
3355
|
-
return u.CENTRAL_DIRECTORY_END + "\0\0\0\0" + r(f, 2) + r(f, 2) + r(
|
|
3389
|
+
return u.CENTRAL_DIRECTORY_END + "\0\0\0\0" + r(f, 2) + r(f, 2) + r(b, 4) + r(_, 4) + r(z.length, 2) + z;
|
|
3356
3390
|
})(this.dirRecords.length, h, c, this.zipComment, this.encodeFileName);
|
|
3357
3391
|
this.push({ data: p, meta: { percent: 100 } });
|
|
3358
3392
|
}, y.prototype.prepareNextSource = function() {
|
|
@@ -3384,21 +3418,21 @@ function fe() {
|
|
|
3384
3418
|
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(e, i, n) {
|
|
3385
3419
|
var r = e("../compressions"), s = e("./ZipFileWorker");
|
|
3386
3420
|
n.generateWorker = function(o, l, g) {
|
|
3387
|
-
var
|
|
3421
|
+
var w = new s(l.streamFiles, g, l.platform, l.encodeFileName), u = 0;
|
|
3388
3422
|
try {
|
|
3389
3423
|
o.forEach(function(y, c) {
|
|
3390
3424
|
u++;
|
|
3391
|
-
var m = (function(
|
|
3392
|
-
var C =
|
|
3425
|
+
var m = (function(b, _) {
|
|
3426
|
+
var C = b || _, S = r[C];
|
|
3393
3427
|
if (!S) throw new Error(C + " is not a valid compression method !");
|
|
3394
3428
|
return S;
|
|
3395
3429
|
})(c.options.compression, l.compression), h = c.options.compressionOptions || l.compressionOptions || {}, p = c.dir, f = c.date;
|
|
3396
|
-
c._compressWorker(m, h).withStreamInfo("file", { name: y, dir: p, date: f, comment: c.comment || "", unixPermissions: c.unixPermissions, dosPermissions: c.dosPermissions }).pipe(
|
|
3397
|
-
}),
|
|
3430
|
+
c._compressWorker(m, h).withStreamInfo("file", { name: y, dir: p, date: f, comment: c.comment || "", unixPermissions: c.unixPermissions, dosPermissions: c.dosPermissions }).pipe(w);
|
|
3431
|
+
}), w.entriesCount = u;
|
|
3398
3432
|
} catch (y) {
|
|
3399
|
-
|
|
3433
|
+
w.error(y);
|
|
3400
3434
|
}
|
|
3401
|
-
return
|
|
3435
|
+
return w;
|
|
3402
3436
|
};
|
|
3403
3437
|
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(e, i, n) {
|
|
3404
3438
|
function r() {
|
|
@@ -3414,7 +3448,7 @@ function fe() {
|
|
|
3414
3448
|
return new r().loadAsync(s, o);
|
|
3415
3449
|
}, r.external = e("./external"), i.exports = r;
|
|
3416
3450
|
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(e, i, n) {
|
|
3417
|
-
var r = e("./utils"), s = e("./external"), o = e("./utf8"), l = e("./zipEntries"), g = e("./stream/Crc32Probe"),
|
|
3451
|
+
var r = e("./utils"), s = e("./external"), o = e("./utf8"), l = e("./zipEntries"), g = e("./stream/Crc32Probe"), w = e("./nodejsUtils");
|
|
3418
3452
|
function u(y) {
|
|
3419
3453
|
return new s.Promise(function(c, m) {
|
|
3420
3454
|
var h = y.decompressed.getContentWorker().pipe(new g());
|
|
@@ -3427,16 +3461,16 @@ function fe() {
|
|
|
3427
3461
|
}
|
|
3428
3462
|
i.exports = function(y, c) {
|
|
3429
3463
|
var m = this;
|
|
3430
|
-
return c = r.extend(c || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: o.utf8decode }),
|
|
3464
|
+
return c = r.extend(c || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: o.utf8decode }), w.isNode && w.isStream(y) ? s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : r.prepareContent("the loaded zip file", y, !0, c.optimizedBinaryString, c.base64).then(function(h) {
|
|
3431
3465
|
var p = new l(c);
|
|
3432
3466
|
return p.load(h), p;
|
|
3433
3467
|
}).then(function(h) {
|
|
3434
3468
|
var p = [s.Promise.resolve(h)], f = h.files;
|
|
3435
|
-
if (c.checkCRC32) for (var
|
|
3469
|
+
if (c.checkCRC32) for (var b = 0; b < f.length; b++) p.push(u(f[b]));
|
|
3436
3470
|
return s.Promise.all(p);
|
|
3437
3471
|
}).then(function(h) {
|
|
3438
|
-
for (var p = h.shift(), f = p.files,
|
|
3439
|
-
var _ = f[
|
|
3472
|
+
for (var p = h.shift(), f = p.files, b = 0; b < f.length; b++) {
|
|
3473
|
+
var _ = f[b], C = _.fileNameStr, S = r.resolve(_.fileNameStr);
|
|
3440
3474
|
m.file(S, _.decompressed, { binary: !0, optimizedBinaryString: !0, date: _.date, dir: _.dir, comment: _.fileCommentStr.length ? _.fileCommentStr : null, unixPermissions: _.unixPermissions, dosPermissions: _.dosPermissions, createFolders: c.createFolders }), _.dir || (m.file(S).unsafeOriginalName = C);
|
|
3441
3475
|
}
|
|
3442
3476
|
return p.zipComment.length && (m.comment = p.zipComment), m;
|
|
@@ -3449,10 +3483,10 @@ function fe() {
|
|
|
3449
3483
|
}
|
|
3450
3484
|
r.inherits(o, s), o.prototype._bindStream = function(l) {
|
|
3451
3485
|
var g = this;
|
|
3452
|
-
(this._stream = l).pause(), l.on("data", function(
|
|
3453
|
-
g.push({ data:
|
|
3454
|
-
}).on("error", function(
|
|
3455
|
-
g.isPaused ? this.generatedError =
|
|
3486
|
+
(this._stream = l).pause(), l.on("data", function(w) {
|
|
3487
|
+
g.push({ data: w, meta: { percent: 0 } });
|
|
3488
|
+
}).on("error", function(w) {
|
|
3489
|
+
g.isPaused ? this.generatedError = w : g.error(w);
|
|
3456
3490
|
}).on("end", function() {
|
|
3457
3491
|
g.isPaused ? g._upstreamEnded = !0 : g.end();
|
|
3458
3492
|
});
|
|
@@ -3465,13 +3499,13 @@ function fe() {
|
|
|
3465
3499
|
var r = e("readable-stream").Readable;
|
|
3466
3500
|
function s(o, l, g) {
|
|
3467
3501
|
r.call(this, l), this._helper = o;
|
|
3468
|
-
var
|
|
3502
|
+
var w = this;
|
|
3469
3503
|
o.on("data", function(u, y) {
|
|
3470
|
-
|
|
3504
|
+
w.push(u) || w._helper.pause(), g && g(y);
|
|
3471
3505
|
}).on("error", function(u) {
|
|
3472
|
-
|
|
3506
|
+
w.emit("error", u);
|
|
3473
3507
|
}).on("end", function() {
|
|
3474
|
-
|
|
3508
|
+
w.push(null);
|
|
3475
3509
|
});
|
|
3476
3510
|
}
|
|
3477
3511
|
e("../utils").inherits(s, r), s.prototype._read = function() {
|
|
@@ -3493,23 +3527,23 @@ function fe() {
|
|
|
3493
3527
|
} };
|
|
3494
3528
|
}, {}], 15: [function(e, i, n) {
|
|
3495
3529
|
function r(S, z, B) {
|
|
3496
|
-
var O,
|
|
3497
|
-
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 = f(S)), H.createFolders && (O = p(S)) &&
|
|
3498
|
-
var X =
|
|
3499
|
-
B && B.binary !== void 0 || (H.binary = !X), (z instanceof u && z.uncompressedSize === 0 || H.dir || !z || z.length === 0) && (H.base64 = !1, H.binary = !0, z = "", H.compression = "STORE",
|
|
3530
|
+
var O, T = o.getTypeOf(z), H = o.extend(B || {}, w);
|
|
3531
|
+
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 = f(S)), H.createFolders && (O = p(S)) && b.call(this, O, !0);
|
|
3532
|
+
var X = T === "string" && H.binary === !1 && H.base64 === !1;
|
|
3533
|
+
B && B.binary !== void 0 || (H.binary = !X), (z instanceof u && z.uncompressedSize === 0 || H.dir || !z || z.length === 0) && (H.base64 = !1, H.binary = !0, z = "", H.compression = "STORE", T = "string");
|
|
3500
3534
|
var k = null;
|
|
3501
3535
|
k = z instanceof u || z instanceof l ? z : m.isNode && m.isStream(z) ? new h(S, z) : o.prepareContent(S, z, H.binary, H.optimizedBinaryString, H.base64);
|
|
3502
3536
|
var D = new y(S, k, H);
|
|
3503
3537
|
this.files[S] = D;
|
|
3504
3538
|
}
|
|
3505
|
-
var s = e("./utf8"), o = e("./utils"), l = e("./stream/GenericWorker"), g = e("./stream/StreamHelper"),
|
|
3539
|
+
var s = e("./utf8"), o = e("./utils"), l = e("./stream/GenericWorker"), g = e("./stream/StreamHelper"), w = e("./defaults"), u = e("./compressedObject"), y = e("./zipObject"), c = e("./generate"), m = e("./nodejsUtils"), h = e("./nodejs/NodejsStreamInputAdapter"), p = function(S) {
|
|
3506
3540
|
S.slice(-1) === "/" && (S = S.substring(0, S.length - 1));
|
|
3507
3541
|
var z = S.lastIndexOf("/");
|
|
3508
3542
|
return 0 < z ? S.substring(0, z) : "";
|
|
3509
3543
|
}, f = function(S) {
|
|
3510
3544
|
return S.slice(-1) !== "/" && (S += "/"), S;
|
|
3511
|
-
},
|
|
3512
|
-
return z = z !== void 0 ? z :
|
|
3545
|
+
}, b = function(S, z) {
|
|
3546
|
+
return z = z !== void 0 ? z : w.createFolders, S = f(S), this.files[S] || r.call(this, S, null, { dir: !0, createFolders: z }), this.files[S];
|
|
3513
3547
|
};
|
|
3514
3548
|
function _(S) {
|
|
3515
3549
|
return Object.prototype.toString.call(S) === "[object RegExp]";
|
|
@@ -3532,20 +3566,20 @@ function fe() {
|
|
|
3532
3566
|
return !X.dir && O.test(H);
|
|
3533
3567
|
});
|
|
3534
3568
|
}
|
|
3535
|
-
var
|
|
3536
|
-
return
|
|
3569
|
+
var T = this.files[this.root + S];
|
|
3570
|
+
return T && !T.dir ? T : null;
|
|
3537
3571
|
}, folder: function(S) {
|
|
3538
3572
|
if (!S) return this;
|
|
3539
|
-
if (_(S)) return this.filter(function(
|
|
3540
|
-
return H.dir && S.test(
|
|
3573
|
+
if (_(S)) return this.filter(function(T, H) {
|
|
3574
|
+
return H.dir && S.test(T);
|
|
3541
3575
|
});
|
|
3542
|
-
var z = this.root + S, B =
|
|
3576
|
+
var z = this.root + S, B = b.call(this, z), O = this.clone();
|
|
3543
3577
|
return O.root = B.name, O;
|
|
3544
3578
|
}, remove: function(S) {
|
|
3545
3579
|
S = this.root + S;
|
|
3546
3580
|
var z = this.files[S];
|
|
3547
3581
|
if (z || (S.slice(-1) !== "/" && (S += "/"), z = this.files[S]), z && !z.dir) delete this.files[S];
|
|
3548
|
-
else for (var B = this.filter(function(
|
|
3582
|
+
else for (var B = this.filter(function(T, H) {
|
|
3549
3583
|
return H.name.slice(0, S.length) === S;
|
|
3550
3584
|
}), O = 0; O < B.length; O++) delete this.files[B[O].name];
|
|
3551
3585
|
return this;
|
|
@@ -3558,8 +3592,8 @@ function fe() {
|
|
|
3558
3592
|
o.checkSupport(B.type), B.platform !== "darwin" && B.platform !== "freebsd" && B.platform !== "linux" && B.platform !== "sunos" || (B.platform = "UNIX"), B.platform === "win32" && (B.platform = "DOS");
|
|
3559
3593
|
var O = B.comment || this.comment || "";
|
|
3560
3594
|
z = c.generateWorker(this, B, O);
|
|
3561
|
-
} catch (
|
|
3562
|
-
(z = new l("error")).error(
|
|
3595
|
+
} catch (T) {
|
|
3596
|
+
(z = new l("error")).error(T);
|
|
3563
3597
|
}
|
|
3564
3598
|
return new g(z, B.type || "string", B.mimeType);
|
|
3565
3599
|
}, generateAsync: function(S, z) {
|
|
@@ -3579,11 +3613,11 @@ function fe() {
|
|
|
3579
3613
|
e("../utils").inherits(s, r), s.prototype.byteAt = function(o) {
|
|
3580
3614
|
return this.data[this.zero + o];
|
|
3581
3615
|
}, s.prototype.lastIndexOfSignature = function(o) {
|
|
3582
|
-
for (var l = o.charCodeAt(0), g = o.charCodeAt(1),
|
|
3616
|
+
for (var l = o.charCodeAt(0), g = o.charCodeAt(1), w = o.charCodeAt(2), u = o.charCodeAt(3), y = this.length - 4; 0 <= y; --y) if (this.data[y] === l && this.data[y + 1] === g && this.data[y + 2] === w && this.data[y + 3] === u) return y - this.zero;
|
|
3583
3617
|
return -1;
|
|
3584
3618
|
}, s.prototype.readAndCheckSignature = function(o) {
|
|
3585
|
-
var l = o.charCodeAt(0), g = o.charCodeAt(1),
|
|
3586
|
-
return l === y[0] && g === y[1] &&
|
|
3619
|
+
var l = o.charCodeAt(0), g = o.charCodeAt(1), w = o.charCodeAt(2), u = o.charCodeAt(3), y = this.readData(4);
|
|
3620
|
+
return l === y[0] && g === y[1] && w === y[2] && u === y[3];
|
|
3587
3621
|
}, s.prototype.readData = function(o) {
|
|
3588
3622
|
if (this.checkOffset(o), o === 0) return [];
|
|
3589
3623
|
var l = this.data.slice(this.zero + this.index, this.zero + this.index + o);
|
|
@@ -3653,10 +3687,10 @@ function fe() {
|
|
|
3653
3687
|
return this.index += o, l;
|
|
3654
3688
|
}, i.exports = s;
|
|
3655
3689
|
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(e, i, n) {
|
|
3656
|
-
var r = e("../utils"), s = e("../support"), o = e("./ArrayReader"), l = e("./StringReader"), g = e("./NodeBufferReader"),
|
|
3690
|
+
var r = e("../utils"), s = e("../support"), o = e("./ArrayReader"), l = e("./StringReader"), g = e("./NodeBufferReader"), w = e("./Uint8ArrayReader");
|
|
3657
3691
|
i.exports = function(u) {
|
|
3658
3692
|
var y = r.getTypeOf(u);
|
|
3659
|
-
return r.checkSupport(y), y !== "string" || s.uint8array ? y === "nodebuffer" ? new g(u) : s.uint8array ? new
|
|
3693
|
+
return r.checkSupport(y), y !== "string" || s.uint8array ? y === "nodebuffer" ? new g(u) : s.uint8array ? new w(r.transformTo("uint8array", u)) : new o(r.transformTo("array", u)) : new l(u);
|
|
3660
3694
|
};
|
|
3661
3695
|
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(e, i, n) {
|
|
3662
3696
|
n.LOCAL_FILE_HEADER = "PK", n.CENTRAL_FILE_HEADER = "PK", n.CENTRAL_DIRECTORY_END = "PK", n.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", n.ZIP64_CENTRAL_DIRECTORY_END = "PK", n.DATA_DESCRIPTOR = "PK\x07\b";
|
|
@@ -3693,10 +3727,10 @@ function fe() {
|
|
|
3693
3727
|
function o(l) {
|
|
3694
3728
|
s.call(this, "DataWorker");
|
|
3695
3729
|
var g = this;
|
|
3696
|
-
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, l.then(function(
|
|
3697
|
-
g.dataIsReady = !0, g.data =
|
|
3698
|
-
}, function(
|
|
3699
|
-
g.error(
|
|
3730
|
+
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, l.then(function(w) {
|
|
3731
|
+
g.dataIsReady = !0, g.data = w, g.max = w && w.length || 0, g.type = r.getTypeOf(w), g.isPaused || g._tickAndRepeat();
|
|
3732
|
+
}, function(w) {
|
|
3733
|
+
g.error(w);
|
|
3700
3734
|
});
|
|
3701
3735
|
}
|
|
3702
3736
|
r.inherits(o, s), o.prototype.cleanUp = function() {
|
|
@@ -3779,51 +3813,51 @@ function fe() {
|
|
|
3779
3813
|
return this.previous ? this.previous + " -> " + s : s;
|
|
3780
3814
|
} }, i.exports = r;
|
|
3781
3815
|
}, {}], 29: [function(e, i, n) {
|
|
3782
|
-
var r = e("../utils"), s = e("./ConvertWorker"), o = e("./GenericWorker"), l = e("../base64"), g = e("../support"),
|
|
3816
|
+
var r = e("../utils"), s = e("./ConvertWorker"), o = e("./GenericWorker"), l = e("../base64"), g = e("../support"), w = e("../external"), u = null;
|
|
3783
3817
|
if (g.nodestream) try {
|
|
3784
3818
|
u = e("../nodejs/NodejsStreamOutputAdapter");
|
|
3785
3819
|
} catch {
|
|
3786
3820
|
}
|
|
3787
3821
|
function y(m, h) {
|
|
3788
|
-
return new
|
|
3789
|
-
var
|
|
3822
|
+
return new w.Promise(function(p, f) {
|
|
3823
|
+
var b = [], _ = m._internalType, C = m._outputType, S = m._mimeType;
|
|
3790
3824
|
m.on("data", function(z, B) {
|
|
3791
|
-
|
|
3825
|
+
b.push(z), h && h(B);
|
|
3792
3826
|
}).on("error", function(z) {
|
|
3793
|
-
|
|
3827
|
+
b = [], f(z);
|
|
3794
3828
|
}).on("end", function() {
|
|
3795
3829
|
try {
|
|
3796
|
-
var z = (function(B, O,
|
|
3830
|
+
var z = (function(B, O, T) {
|
|
3797
3831
|
switch (B) {
|
|
3798
3832
|
case "blob":
|
|
3799
|
-
return r.newBlob(r.transformTo("arraybuffer", O),
|
|
3833
|
+
return r.newBlob(r.transformTo("arraybuffer", O), T);
|
|
3800
3834
|
case "base64":
|
|
3801
3835
|
return l.encode(O);
|
|
3802
3836
|
default:
|
|
3803
3837
|
return r.transformTo(B, O);
|
|
3804
3838
|
}
|
|
3805
3839
|
})(C, (function(B, O) {
|
|
3806
|
-
var
|
|
3807
|
-
for (
|
|
3840
|
+
var T, H = 0, X = null, k = 0;
|
|
3841
|
+
for (T = 0; T < O.length; T++) k += O[T].length;
|
|
3808
3842
|
switch (B) {
|
|
3809
3843
|
case "string":
|
|
3810
3844
|
return O.join("");
|
|
3811
3845
|
case "array":
|
|
3812
3846
|
return Array.prototype.concat.apply([], O);
|
|
3813
3847
|
case "uint8array":
|
|
3814
|
-
for (X = new Uint8Array(k),
|
|
3848
|
+
for (X = new Uint8Array(k), T = 0; T < O.length; T++) X.set(O[T], H), H += O[T].length;
|
|
3815
3849
|
return X;
|
|
3816
3850
|
case "nodebuffer":
|
|
3817
3851
|
return Buffer.concat(O);
|
|
3818
3852
|
default:
|
|
3819
3853
|
throw new Error("concat : unsupported type '" + B + "'");
|
|
3820
3854
|
}
|
|
3821
|
-
})(_,
|
|
3855
|
+
})(_, b), S);
|
|
3822
3856
|
p(z);
|
|
3823
3857
|
} catch (B) {
|
|
3824
3858
|
f(B);
|
|
3825
3859
|
}
|
|
3826
|
-
|
|
3860
|
+
b = [];
|
|
3827
3861
|
}).resume();
|
|
3828
3862
|
});
|
|
3829
3863
|
}
|
|
@@ -3839,8 +3873,8 @@ function fe() {
|
|
|
3839
3873
|
}
|
|
3840
3874
|
try {
|
|
3841
3875
|
this._internalType = f, this._outputType = h, this._mimeType = p, r.checkSupport(f), this._worker = m.pipe(new s(f)), m.lock();
|
|
3842
|
-
} catch (
|
|
3843
|
-
this._worker = new o("error"), this._worker.error(
|
|
3876
|
+
} catch (b) {
|
|
3877
|
+
this._worker = new o("error"), this._worker.error(b);
|
|
3844
3878
|
}
|
|
3845
3879
|
}
|
|
3846
3880
|
c.prototype = { accumulate: function(m) {
|
|
@@ -3881,7 +3915,7 @@ function fe() {
|
|
|
3881
3915
|
n.nodestream = !1;
|
|
3882
3916
|
}
|
|
3883
3917
|
}, { "readable-stream": 16 }], 31: [function(e, i, n) {
|
|
3884
|
-
for (var r = e("./utils"), s = e("./support"), o = e("./nodejsUtils"), l = e("./stream/GenericWorker"), g = new Array(256),
|
|
3918
|
+
for (var r = e("./utils"), s = e("./support"), o = e("./nodejsUtils"), l = e("./stream/GenericWorker"), g = new Array(256), w = 0; w < 256; w++) g[w] = 252 <= w ? 6 : 248 <= w ? 5 : 240 <= w ? 4 : 224 <= w ? 3 : 192 <= w ? 2 : 1;
|
|
3885
3919
|
g[254] = g[254] = 1;
|
|
3886
3920
|
function u() {
|
|
3887
3921
|
l.call(this, "utf-8 decode"), this.leftOver = null;
|
|
@@ -3891,19 +3925,19 @@ function fe() {
|
|
|
3891
3925
|
}
|
|
3892
3926
|
n.utf8encode = function(c) {
|
|
3893
3927
|
return s.nodebuffer ? o.newBufferFrom(c, "utf-8") : (function(m) {
|
|
3894
|
-
var h, p, f,
|
|
3895
|
-
for (
|
|
3896
|
-
for (h = s.uint8array ? new Uint8Array(S) : new Array(S),
|
|
3928
|
+
var h, p, f, b, _, C = m.length, S = 0;
|
|
3929
|
+
for (b = 0; b < C; b++) (64512 & (p = m.charCodeAt(b))) == 55296 && b + 1 < C && (64512 & (f = m.charCodeAt(b + 1))) == 56320 && (p = 65536 + (p - 55296 << 10) + (f - 56320), b++), S += p < 128 ? 1 : p < 2048 ? 2 : p < 65536 ? 3 : 4;
|
|
3930
|
+
for (h = s.uint8array ? new Uint8Array(S) : new Array(S), b = _ = 0; _ < S; b++) (64512 & (p = m.charCodeAt(b))) == 55296 && b + 1 < C && (64512 & (f = m.charCodeAt(b + 1))) == 56320 && (p = 65536 + (p - 55296 << 10) + (f - 56320), b++), p < 128 ? h[_++] = p : (p < 2048 ? h[_++] = 192 | p >>> 6 : (p < 65536 ? h[_++] = 224 | p >>> 12 : (h[_++] = 240 | p >>> 18, h[_++] = 128 | p >>> 12 & 63), h[_++] = 128 | p >>> 6 & 63), h[_++] = 128 | 63 & p);
|
|
3897
3931
|
return h;
|
|
3898
3932
|
})(c);
|
|
3899
3933
|
}, n.utf8decode = function(c) {
|
|
3900
3934
|
return s.nodebuffer ? r.transformTo("nodebuffer", c).toString("utf-8") : (function(m) {
|
|
3901
|
-
var h, p, f,
|
|
3935
|
+
var h, p, f, b, _ = m.length, C = new Array(2 * _);
|
|
3902
3936
|
for (h = p = 0; h < _; ) if ((f = m[h++]) < 128) C[p++] = f;
|
|
3903
|
-
else if (4 < (
|
|
3937
|
+
else if (4 < (b = g[f])) C[p++] = 65533, h += b - 1;
|
|
3904
3938
|
else {
|
|
3905
|
-
for (f &=
|
|
3906
|
-
1 <
|
|
3939
|
+
for (f &= b === 2 ? 31 : b === 3 ? 15 : 7; 1 < b && h < _; ) f = f << 6 | 63 & m[h++], b--;
|
|
3940
|
+
1 < b ? C[p++] = 65533 : f < 65536 ? C[p++] = f : (f -= 65536, C[p++] = 55296 | f >> 10 & 1023, C[p++] = 56320 | 1023 & f);
|
|
3907
3941
|
}
|
|
3908
3942
|
return C.length !== p && (C.subarray ? C = C.subarray(0, p) : C.length = p), r.applyFromCharCode(C);
|
|
3909
3943
|
})(c = r.transformTo(s.uint8array ? "uint8array" : "array", c));
|
|
@@ -3916,10 +3950,10 @@ function fe() {
|
|
|
3916
3950
|
} else m = this.leftOver.concat(m);
|
|
3917
3951
|
this.leftOver = null;
|
|
3918
3952
|
}
|
|
3919
|
-
var p = (function(
|
|
3953
|
+
var p = (function(b, _) {
|
|
3920
3954
|
var C;
|
|
3921
|
-
for ((_ = _ ||
|
|
3922
|
-
return C < 0 || C === 0 ? _ : C + g[
|
|
3955
|
+
for ((_ = _ || b.length) > b.length && (_ = b.length), C = _ - 1; 0 <= C && (192 & b[C]) == 128; ) C--;
|
|
3956
|
+
return C < 0 || C === 0 ? _ : C + g[b[C]] > _ ? C : _;
|
|
3923
3957
|
})(m), f = m;
|
|
3924
3958
|
p !== m.length && (s.uint8array ? (f = m.subarray(0, p), this.leftOver = m.subarray(p, m.length)) : (f = m.slice(0, p), this.leftOver = m.slice(p, m.length))), this.push({ data: n.utf8decode(f), meta: c.meta });
|
|
3925
3959
|
}, u.prototype.flush = function() {
|
|
@@ -3932,7 +3966,7 @@ function fe() {
|
|
|
3932
3966
|
function g(h) {
|
|
3933
3967
|
return h;
|
|
3934
3968
|
}
|
|
3935
|
-
function
|
|
3969
|
+
function w(h, p) {
|
|
3936
3970
|
for (var f = 0; f < h.length; ++f) p[f] = 255 & h.charCodeAt(f);
|
|
3937
3971
|
return p;
|
|
3938
3972
|
}
|
|
@@ -3950,10 +3984,10 @@ function fe() {
|
|
|
3950
3984
|
}
|
|
3951
3985
|
};
|
|
3952
3986
|
var u = { stringifyByChunk: function(h, p, f) {
|
|
3953
|
-
var
|
|
3987
|
+
var b = [], _ = 0, C = h.length;
|
|
3954
3988
|
if (C <= f) return String.fromCharCode.apply(null, h);
|
|
3955
|
-
for (; _ < C; ) p === "array" || p === "nodebuffer" ?
|
|
3956
|
-
return
|
|
3989
|
+
for (; _ < C; ) p === "array" || p === "nodebuffer" ? b.push(String.fromCharCode.apply(null, h.slice(_, Math.min(_ + f, C)))) : b.push(String.fromCharCode.apply(null, h.subarray(_, Math.min(_ + f, C)))), _ += f;
|
|
3990
|
+
return b.join("");
|
|
3957
3991
|
}, stringifyByChar: function(h) {
|
|
3958
3992
|
for (var p = "", f = 0; f < h.length; f++) p += String.fromCharCode(h[f]);
|
|
3959
3993
|
return p;
|
|
@@ -3971,8 +4005,8 @@ function fe() {
|
|
|
3971
4005
|
}
|
|
3972
4006
|
})() } };
|
|
3973
4007
|
function y(h) {
|
|
3974
|
-
var p = 65536, f = n.getTypeOf(h),
|
|
3975
|
-
if (f === "uint8array" ?
|
|
4008
|
+
var p = 65536, f = n.getTypeOf(h), b = !0;
|
|
4009
|
+
if (f === "uint8array" ? b = u.applyCanBeUsed.uint8array : f === "nodebuffer" && (b = u.applyCanBeUsed.nodebuffer), b) for (; 1 < p; ) try {
|
|
3976
4010
|
return u.stringifyByChunk(h, f, p);
|
|
3977
4011
|
} catch {
|
|
3978
4012
|
p = Math.floor(p / 2);
|
|
@@ -3986,13 +4020,13 @@ function fe() {
|
|
|
3986
4020
|
n.applyFromCharCode = y;
|
|
3987
4021
|
var m = {};
|
|
3988
4022
|
m.string = { string: g, array: function(h) {
|
|
3989
|
-
return
|
|
4023
|
+
return w(h, new Array(h.length));
|
|
3990
4024
|
}, arraybuffer: function(h) {
|
|
3991
4025
|
return m.string.uint8array(h).buffer;
|
|
3992
4026
|
}, uint8array: function(h) {
|
|
3993
|
-
return
|
|
4027
|
+
return w(h, new Uint8Array(h.length));
|
|
3994
4028
|
}, nodebuffer: function(h) {
|
|
3995
|
-
return
|
|
4029
|
+
return w(h, o.allocBuffer(h.length));
|
|
3996
4030
|
} }, m.array = { string: y, array: g, arraybuffer: function(h) {
|
|
3997
4031
|
return new Uint8Array(h).buffer;
|
|
3998
4032
|
}, uint8array: function(h) {
|
|
@@ -4025,9 +4059,9 @@ function fe() {
|
|
|
4025
4059
|
var f = n.getTypeOf(p);
|
|
4026
4060
|
return m[f][h](p);
|
|
4027
4061
|
}, n.resolve = function(h) {
|
|
4028
|
-
for (var p = h.split("/"), f = [],
|
|
4029
|
-
var _ = p[
|
|
4030
|
-
_ === "." || _ === "" &&
|
|
4062
|
+
for (var p = h.split("/"), f = [], b = 0; b < p.length; b++) {
|
|
4063
|
+
var _ = p[b];
|
|
4064
|
+
_ === "." || _ === "" && b !== 0 && b !== p.length - 1 || (_ === ".." ? f.pop() : f.push(_));
|
|
4031
4065
|
}
|
|
4032
4066
|
return f.join("/");
|
|
4033
4067
|
}, n.getTypeOf = function(h) {
|
|
@@ -4035,9 +4069,9 @@ function fe() {
|
|
|
4035
4069
|
}, n.checkSupport = function(h) {
|
|
4036
4070
|
if (!r[h.toLowerCase()]) throw new Error(h + " is not supported by this platform");
|
|
4037
4071
|
}, n.MAX_VALUE_16BITS = 65535, n.MAX_VALUE_32BITS = -1, n.pretty = function(h) {
|
|
4038
|
-
var p, f,
|
|
4039
|
-
for (f = 0; f < (h || "").length; f++)
|
|
4040
|
-
return
|
|
4072
|
+
var p, f, b = "";
|
|
4073
|
+
for (f = 0; f < (h || "").length; f++) b += "\\x" + ((p = h.charCodeAt(f)) < 16 ? "0" : "") + p.toString(16).toUpperCase();
|
|
4074
|
+
return b;
|
|
4041
4075
|
}, n.delay = function(h, p, f) {
|
|
4042
4076
|
setImmediate(function() {
|
|
4043
4077
|
h.apply(f || null, p || []);
|
|
@@ -4050,7 +4084,7 @@ function fe() {
|
|
|
4050
4084
|
var h, p, f = {};
|
|
4051
4085
|
for (h = 0; h < arguments.length; h++) for (p in arguments[h]) Object.prototype.hasOwnProperty.call(arguments[h], p) && f[p] === void 0 && (f[p] = arguments[h][p]);
|
|
4052
4086
|
return f;
|
|
4053
|
-
}, n.prepareContent = function(h, p, f,
|
|
4087
|
+
}, n.prepareContent = function(h, p, f, b, _) {
|
|
4054
4088
|
return l.Promise.resolve(p).then(function(C) {
|
|
4055
4089
|
return r.blob && (C instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(C)) !== -1) && typeof FileReader < "u" ? new l.Promise(function(S, z) {
|
|
4056
4090
|
var B = new FileReader();
|
|
@@ -4062,17 +4096,17 @@ function fe() {
|
|
|
4062
4096
|
}) : C;
|
|
4063
4097
|
}).then(function(C) {
|
|
4064
4098
|
var S = n.getTypeOf(C);
|
|
4065
|
-
return S ? (S === "arraybuffer" ? C = n.transformTo("uint8array", C) : S === "string" && (_ ? C = s.decode(C) : f &&
|
|
4066
|
-
return
|
|
4099
|
+
return S ? (S === "arraybuffer" ? C = n.transformTo("uint8array", C) : S === "string" && (_ ? C = s.decode(C) : f && b !== !0 && (C = (function(z) {
|
|
4100
|
+
return w(z, r.uint8array ? new Uint8Array(z.length) : new Array(z.length));
|
|
4067
4101
|
})(C))), C) : l.Promise.reject(new Error("Can't read the data of '" + h + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
4068
4102
|
});
|
|
4069
4103
|
};
|
|
4070
4104
|
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(e, i, n) {
|
|
4071
4105
|
var r = e("./reader/readerFor"), s = e("./utils"), o = e("./signature"), l = e("./zipEntry"), g = e("./support");
|
|
4072
|
-
function
|
|
4106
|
+
function w(u) {
|
|
4073
4107
|
this.files = [], this.loadOptions = u;
|
|
4074
4108
|
}
|
|
4075
|
-
|
|
4109
|
+
w.prototype = { checkSignature: function(u) {
|
|
4076
4110
|
if (!this.reader.readAndCheckSignature(u)) {
|
|
4077
4111
|
this.reader.index -= 4;
|
|
4078
4112
|
var y = this.reader.readString(4);
|
|
@@ -4118,9 +4152,9 @@ function fe() {
|
|
|
4118
4152
|
this.reader = r(u);
|
|
4119
4153
|
}, load: function(u) {
|
|
4120
4154
|
this.prepareReader(u), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
4121
|
-
} }, i.exports =
|
|
4155
|
+
} }, i.exports = w;
|
|
4122
4156
|
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(e, i, n) {
|
|
4123
|
-
var r = e("./reader/readerFor"), s = e("./utils"), o = e("./compressedObject"), l = e("./crc32"), g = e("./utf8"),
|
|
4157
|
+
var r = e("./reader/readerFor"), s = e("./utils"), o = e("./compressedObject"), l = e("./crc32"), g = e("./utf8"), w = e("./compressions"), u = e("./support");
|
|
4124
4158
|
function y(c, m) {
|
|
4125
4159
|
this.options = c, this.loadOptions = m;
|
|
4126
4160
|
}
|
|
@@ -4132,7 +4166,7 @@ function fe() {
|
|
|
4132
4166
|
var m, h;
|
|
4133
4167
|
if (c.skip(22), this.fileNameLength = c.readInt(2), h = c.readInt(2), this.fileName = c.readData(this.fileNameLength), c.skip(h), this.compressedSize === -1 || this.uncompressedSize === -1) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
|
|
4134
4168
|
if ((m = (function(p) {
|
|
4135
|
-
for (var f in
|
|
4169
|
+
for (var f in w) if (Object.prototype.hasOwnProperty.call(w, f) && w[f].magic === p) return w[f];
|
|
4136
4170
|
return null;
|
|
4137
4171
|
})(this.compressionMethod)) === null) throw new Error("Corrupted zip : compression " + s.pretty(this.compressionMethod) + " unknown (inner file : " + s.transformTo("string", this.fileName) + ")");
|
|
4138
4172
|
this.decompressed = new o(this.compressedSize, this.uncompressedSize, this.crc32, m, c.readData(this.compressedSize));
|
|
@@ -4190,17 +4224,17 @@ function fe() {
|
|
|
4190
4224
|
function r(m, h, p) {
|
|
4191
4225
|
this.name = m, this.dir = p.dir, this.date = p.date, this.comment = p.comment, this.unixPermissions = p.unixPermissions, this.dosPermissions = p.dosPermissions, this._data = h, this._dataBinary = p.binary, this.options = { compression: p.compression, compressionOptions: p.compressionOptions };
|
|
4192
4226
|
}
|
|
4193
|
-
var s = e("./stream/StreamHelper"), o = e("./stream/DataWorker"), l = e("./utf8"), g = e("./compressedObject"),
|
|
4227
|
+
var s = e("./stream/StreamHelper"), o = e("./stream/DataWorker"), l = e("./utf8"), g = e("./compressedObject"), w = e("./stream/GenericWorker");
|
|
4194
4228
|
r.prototype = { internalStream: function(m) {
|
|
4195
4229
|
var h = null, p = "string";
|
|
4196
4230
|
try {
|
|
4197
4231
|
if (!m) throw new Error("No output type specified.");
|
|
4198
4232
|
var f = (p = m.toLowerCase()) === "string" || p === "text";
|
|
4199
4233
|
p !== "binarystring" && p !== "text" || (p = "string"), h = this._decompressWorker();
|
|
4200
|
-
var
|
|
4201
|
-
|
|
4234
|
+
var b = !this._dataBinary;
|
|
4235
|
+
b && !f && (h = h.pipe(new l.Utf8EncodeWorker())), !b && f && (h = h.pipe(new l.Utf8DecodeWorker()));
|
|
4202
4236
|
} catch (_) {
|
|
4203
|
-
(h = new
|
|
4237
|
+
(h = new w("error")).error(_);
|
|
4204
4238
|
}
|
|
4205
4239
|
return new s(h, p, "");
|
|
4206
4240
|
}, async: function(m, h) {
|
|
@@ -4212,7 +4246,7 @@ function fe() {
|
|
|
4212
4246
|
var p = this._decompressWorker();
|
|
4213
4247
|
return this._dataBinary || (p = p.pipe(new l.Utf8EncodeWorker())), g.createWorkerFrom(p, m, h);
|
|
4214
4248
|
}, _decompressWorker: function() {
|
|
4215
|
-
return this._data instanceof g ? this._data.getContentWorker() : this._data instanceof
|
|
4249
|
+
return this._data instanceof g ? this._data.getContentWorker() : this._data instanceof w ? this._data : new o(this._data);
|
|
4216
4250
|
} };
|
|
4217
4251
|
for (var u = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], y = function() {
|
|
4218
4252
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
@@ -4222,8 +4256,8 @@ function fe() {
|
|
|
4222
4256
|
(function(r) {
|
|
4223
4257
|
var s, o, l = r.MutationObserver || r.WebKitMutationObserver;
|
|
4224
4258
|
if (l) {
|
|
4225
|
-
var g = 0,
|
|
4226
|
-
|
|
4259
|
+
var g = 0, w = new l(m), u = r.document.createTextNode("");
|
|
4260
|
+
w.observe(u, { characterData: !0 }), s = function() {
|
|
4227
4261
|
u.data = g = ++g % 2;
|
|
4228
4262
|
};
|
|
4229
4263
|
} else if (r.setImmediate || r.MessageChannel === void 0) s = "document" in r && "onreadystatechange" in r.document.createElement("script") ? function() {
|
|
@@ -4258,19 +4292,19 @@ function fe() {
|
|
|
4258
4292
|
var r = e("immediate");
|
|
4259
4293
|
function s() {
|
|
4260
4294
|
}
|
|
4261
|
-
var o = {}, l = ["REJECTED"], g = ["FULFILLED"],
|
|
4295
|
+
var o = {}, l = ["REJECTED"], g = ["FULFILLED"], w = ["PENDING"];
|
|
4262
4296
|
function u(f) {
|
|
4263
4297
|
if (typeof f != "function") throw new TypeError("resolver must be a function");
|
|
4264
|
-
this.state =
|
|
4298
|
+
this.state = w, this.queue = [], this.outcome = void 0, f !== s && h(this, f);
|
|
4265
4299
|
}
|
|
4266
|
-
function y(f,
|
|
4267
|
-
this.promise = f, typeof
|
|
4300
|
+
function y(f, b, _) {
|
|
4301
|
+
this.promise = f, typeof b == "function" && (this.onFulfilled = b, this.callFulfilled = this.otherCallFulfilled), typeof _ == "function" && (this.onRejected = _, this.callRejected = this.otherCallRejected);
|
|
4268
4302
|
}
|
|
4269
|
-
function c(f,
|
|
4303
|
+
function c(f, b, _) {
|
|
4270
4304
|
r(function() {
|
|
4271
4305
|
var C;
|
|
4272
4306
|
try {
|
|
4273
|
-
C =
|
|
4307
|
+
C = b(_);
|
|
4274
4308
|
} catch (S) {
|
|
4275
4309
|
return o.reject(f, S);
|
|
4276
4310
|
}
|
|
@@ -4278,12 +4312,12 @@ function fe() {
|
|
|
4278
4312
|
});
|
|
4279
4313
|
}
|
|
4280
4314
|
function m(f) {
|
|
4281
|
-
var
|
|
4282
|
-
if (f && (typeof f == "object" || typeof f == "function") && typeof
|
|
4283
|
-
|
|
4315
|
+
var b = f && f.then;
|
|
4316
|
+
if (f && (typeof f == "object" || typeof f == "function") && typeof b == "function") return function() {
|
|
4317
|
+
b.apply(f, arguments);
|
|
4284
4318
|
};
|
|
4285
4319
|
}
|
|
4286
|
-
function h(f,
|
|
4320
|
+
function h(f, b) {
|
|
4287
4321
|
var _ = !1;
|
|
4288
4322
|
function C(B) {
|
|
4289
4323
|
_ || (_ = !0, o.reject(f, B));
|
|
@@ -4292,14 +4326,14 @@ function fe() {
|
|
|
4292
4326
|
_ || (_ = !0, o.resolve(f, B));
|
|
4293
4327
|
}
|
|
4294
4328
|
var z = p(function() {
|
|
4295
|
-
|
|
4329
|
+
b(S, C);
|
|
4296
4330
|
});
|
|
4297
4331
|
z.status === "error" && C(z.value);
|
|
4298
4332
|
}
|
|
4299
|
-
function p(f,
|
|
4333
|
+
function p(f, b) {
|
|
4300
4334
|
var _ = {};
|
|
4301
4335
|
try {
|
|
4302
|
-
_.value = f(
|
|
4336
|
+
_.value = f(b), _.status = "success";
|
|
4303
4337
|
} catch (C) {
|
|
4304
4338
|
_.status = "error", _.value = C;
|
|
4305
4339
|
}
|
|
@@ -4307,22 +4341,22 @@ function fe() {
|
|
|
4307
4341
|
}
|
|
4308
4342
|
(i.exports = u).prototype.finally = function(f) {
|
|
4309
4343
|
if (typeof f != "function") return this;
|
|
4310
|
-
var
|
|
4344
|
+
var b = this.constructor;
|
|
4311
4345
|
return this.then(function(_) {
|
|
4312
|
-
return
|
|
4346
|
+
return b.resolve(f()).then(function() {
|
|
4313
4347
|
return _;
|
|
4314
4348
|
});
|
|
4315
4349
|
}, function(_) {
|
|
4316
|
-
return
|
|
4350
|
+
return b.resolve(f()).then(function() {
|
|
4317
4351
|
throw _;
|
|
4318
4352
|
});
|
|
4319
4353
|
});
|
|
4320
4354
|
}, u.prototype.catch = function(f) {
|
|
4321
4355
|
return this.then(null, f);
|
|
4322
|
-
}, u.prototype.then = function(f,
|
|
4323
|
-
if (typeof f != "function" && this.state === g || typeof
|
|
4356
|
+
}, u.prototype.then = function(f, b) {
|
|
4357
|
+
if (typeof f != "function" && this.state === g || typeof b != "function" && this.state === l) return this;
|
|
4324
4358
|
var _ = new this.constructor(s);
|
|
4325
|
-
return this.state !==
|
|
4359
|
+
return this.state !== w ? c(_, this.state === g ? f : b, this.outcome) : this.queue.push(new y(_, f, b)), _;
|
|
4326
4360
|
}, y.prototype.callFulfilled = function(f) {
|
|
4327
4361
|
o.resolve(this.promise, f);
|
|
4328
4362
|
}, y.prototype.otherCallFulfilled = function(f) {
|
|
@@ -4331,45 +4365,45 @@ function fe() {
|
|
|
4331
4365
|
o.reject(this.promise, f);
|
|
4332
4366
|
}, y.prototype.otherCallRejected = function(f) {
|
|
4333
4367
|
c(this.promise, this.onRejected, f);
|
|
4334
|
-
}, o.resolve = function(f,
|
|
4335
|
-
var _ = p(m,
|
|
4368
|
+
}, o.resolve = function(f, b) {
|
|
4369
|
+
var _ = p(m, b);
|
|
4336
4370
|
if (_.status === "error") return o.reject(f, _.value);
|
|
4337
4371
|
var C = _.value;
|
|
4338
4372
|
if (C) h(f, C);
|
|
4339
4373
|
else {
|
|
4340
|
-
f.state = g, f.outcome =
|
|
4341
|
-
for (var S = -1, z = f.queue.length; ++S < z; ) f.queue[S].callFulfilled(
|
|
4374
|
+
f.state = g, f.outcome = b;
|
|
4375
|
+
for (var S = -1, z = f.queue.length; ++S < z; ) f.queue[S].callFulfilled(b);
|
|
4342
4376
|
}
|
|
4343
4377
|
return f;
|
|
4344
|
-
}, o.reject = function(f,
|
|
4345
|
-
f.state = l, f.outcome =
|
|
4346
|
-
for (var _ = -1, C = f.queue.length; ++_ < C; ) f.queue[_].callRejected(
|
|
4378
|
+
}, o.reject = function(f, b) {
|
|
4379
|
+
f.state = l, f.outcome = b;
|
|
4380
|
+
for (var _ = -1, C = f.queue.length; ++_ < C; ) f.queue[_].callRejected(b);
|
|
4347
4381
|
return f;
|
|
4348
4382
|
}, u.resolve = function(f) {
|
|
4349
4383
|
return f instanceof this ? f : o.resolve(new this(s), f);
|
|
4350
4384
|
}, u.reject = function(f) {
|
|
4351
|
-
var
|
|
4352
|
-
return o.reject(
|
|
4385
|
+
var b = new this(s);
|
|
4386
|
+
return o.reject(b, f);
|
|
4353
4387
|
}, u.all = function(f) {
|
|
4354
|
-
var
|
|
4388
|
+
var b = this;
|
|
4355
4389
|
if (Object.prototype.toString.call(f) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
4356
4390
|
var _ = f.length, C = !1;
|
|
4357
4391
|
if (!_) return this.resolve([]);
|
|
4358
|
-
for (var S = new Array(_), z = 0, B = -1, O = new this(s); ++B < _; )
|
|
4392
|
+
for (var S = new Array(_), z = 0, B = -1, O = new this(s); ++B < _; ) T(f[B], B);
|
|
4359
4393
|
return O;
|
|
4360
|
-
function
|
|
4361
|
-
|
|
4394
|
+
function T(H, X) {
|
|
4395
|
+
b.resolve(H).then(function(k) {
|
|
4362
4396
|
S[X] = k, ++z !== _ || C || (C = !0, o.resolve(O, S));
|
|
4363
4397
|
}, function(k) {
|
|
4364
4398
|
C || (C = !0, o.reject(O, k));
|
|
4365
4399
|
});
|
|
4366
4400
|
}
|
|
4367
4401
|
}, u.race = function(f) {
|
|
4368
|
-
var
|
|
4402
|
+
var b = this;
|
|
4369
4403
|
if (Object.prototype.toString.call(f) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
4370
4404
|
var _ = f.length, C = !1;
|
|
4371
4405
|
if (!_) return this.resolve([]);
|
|
4372
|
-
for (var S = -1, z = new this(s); ++S < _; ) B = f[S],
|
|
4406
|
+
for (var S = -1, z = new this(s); ++S < _; ) B = f[S], b.resolve(B).then(function(O) {
|
|
4373
4407
|
C || (C = !0, o.resolve(z, O));
|
|
4374
4408
|
}, function(O) {
|
|
4375
4409
|
C || (C = !0, o.reject(z, O));
|
|
@@ -4381,29 +4415,29 @@ function fe() {
|
|
|
4381
4415
|
var r = {};
|
|
4382
4416
|
(0, e("./lib/utils/common").assign)(r, e("./lib/deflate"), e("./lib/inflate"), e("./lib/zlib/constants")), i.exports = r;
|
|
4383
4417
|
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(e, i, n) {
|
|
4384
|
-
var r = e("./zlib/deflate"), s = e("./utils/common"), o = e("./utils/strings"), l = e("./zlib/messages"), g = e("./zlib/zstream"),
|
|
4418
|
+
var r = e("./zlib/deflate"), s = e("./utils/common"), o = e("./utils/strings"), l = e("./zlib/messages"), g = e("./zlib/zstream"), w = Object.prototype.toString, u = 0, y = -1, c = 0, m = 8;
|
|
4385
4419
|
function h(f) {
|
|
4386
4420
|
if (!(this instanceof h)) return new h(f);
|
|
4387
4421
|
this.options = s.assign({ level: y, method: m, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: c, to: "" }, f || {});
|
|
4388
|
-
var
|
|
4389
|
-
|
|
4390
|
-
var _ = r.deflateInit2(this.strm,
|
|
4422
|
+
var b = this.options;
|
|
4423
|
+
b.raw && 0 < b.windowBits ? b.windowBits = -b.windowBits : b.gzip && 0 < b.windowBits && b.windowBits < 16 && (b.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new g(), this.strm.avail_out = 0;
|
|
4424
|
+
var _ = r.deflateInit2(this.strm, b.level, b.method, b.windowBits, b.memLevel, b.strategy);
|
|
4391
4425
|
if (_ !== u) throw new Error(l[_]);
|
|
4392
|
-
if (
|
|
4426
|
+
if (b.header && r.deflateSetHeader(this.strm, b.header), b.dictionary) {
|
|
4393
4427
|
var C;
|
|
4394
|
-
if (C = typeof
|
|
4428
|
+
if (C = typeof b.dictionary == "string" ? o.string2buf(b.dictionary) : w.call(b.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(b.dictionary) : b.dictionary, (_ = r.deflateSetDictionary(this.strm, C)) !== u) throw new Error(l[_]);
|
|
4395
4429
|
this._dict_set = !0;
|
|
4396
4430
|
}
|
|
4397
4431
|
}
|
|
4398
|
-
function p(f,
|
|
4399
|
-
var _ = new h(
|
|
4432
|
+
function p(f, b) {
|
|
4433
|
+
var _ = new h(b);
|
|
4400
4434
|
if (_.push(f, !0), _.err) throw _.msg || l[_.err];
|
|
4401
4435
|
return _.result;
|
|
4402
4436
|
}
|
|
4403
|
-
h.prototype.push = function(f,
|
|
4437
|
+
h.prototype.push = function(f, b) {
|
|
4404
4438
|
var _, C, S = this.strm, z = this.options.chunkSize;
|
|
4405
4439
|
if (this.ended) return !1;
|
|
4406
|
-
C =
|
|
4440
|
+
C = b === ~~b ? b : b === !0 ? 4 : 0, typeof f == "string" ? S.input = o.string2buf(f) : w.call(f) === "[object ArrayBuffer]" ? S.input = new Uint8Array(f) : S.input = f, S.next_in = 0, S.avail_in = S.input.length;
|
|
4407
4441
|
do {
|
|
4408
4442
|
if (S.avail_out === 0 && (S.output = new s.Buf8(z), S.next_out = 0, S.avail_out = z), (_ = r.deflate(S, C)) !== 1 && _ !== u) return this.onEnd(_), !(this.ended = !0);
|
|
4409
4443
|
S.avail_out !== 0 && (S.avail_in !== 0 || C !== 4 && C !== 2) || (this.options.to === "string" ? this.onData(o.buf2binstring(s.shrinkBuf(S.output, S.next_out))) : this.onData(s.shrinkBuf(S.output, S.next_out)));
|
|
@@ -4413,18 +4447,18 @@ function fe() {
|
|
|
4413
4447
|
this.chunks.push(f);
|
|
4414
4448
|
}, h.prototype.onEnd = function(f) {
|
|
4415
4449
|
f === u && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = s.flattenChunks(this.chunks)), this.chunks = [], this.err = f, this.msg = this.strm.msg;
|
|
4416
|
-
}, n.Deflate = h, n.deflate = p, n.deflateRaw = function(f,
|
|
4417
|
-
return (
|
|
4418
|
-
}, n.gzip = function(f,
|
|
4419
|
-
return (
|
|
4450
|
+
}, n.Deflate = h, n.deflate = p, n.deflateRaw = function(f, b) {
|
|
4451
|
+
return (b = b || {}).raw = !0, p(f, b);
|
|
4452
|
+
}, n.gzip = function(f, b) {
|
|
4453
|
+
return (b = b || {}).gzip = !0, p(f, b);
|
|
4420
4454
|
};
|
|
4421
4455
|
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(e, i, n) {
|
|
4422
|
-
var r = e("./zlib/inflate"), s = e("./utils/common"), o = e("./utils/strings"), l = e("./zlib/constants"), g = e("./zlib/messages"),
|
|
4456
|
+
var r = e("./zlib/inflate"), s = e("./utils/common"), o = e("./utils/strings"), l = e("./zlib/constants"), g = e("./zlib/messages"), w = e("./zlib/zstream"), u = e("./zlib/gzheader"), y = Object.prototype.toString;
|
|
4423
4457
|
function c(h) {
|
|
4424
4458
|
if (!(this instanceof c)) return new c(h);
|
|
4425
4459
|
this.options = s.assign({ chunkSize: 16384, windowBits: 0, to: "" }, h || {});
|
|
4426
4460
|
var p = this.options;
|
|
4427
|
-
p.raw && 0 <= p.windowBits && p.windowBits < 16 && (p.windowBits = -p.windowBits, p.windowBits === 0 && (p.windowBits = -15)), !(0 <= p.windowBits && p.windowBits < 16) || h && h.windowBits || (p.windowBits += 32), 15 < p.windowBits && p.windowBits < 48 && (15 & p.windowBits) == 0 && (p.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new
|
|
4461
|
+
p.raw && 0 <= p.windowBits && p.windowBits < 16 && (p.windowBits = -p.windowBits, p.windowBits === 0 && (p.windowBits = -15)), !(0 <= p.windowBits && p.windowBits < 16) || h && h.windowBits || (p.windowBits += 32), 15 < p.windowBits && p.windowBits < 48 && (15 & p.windowBits) == 0 && (p.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new w(), this.strm.avail_out = 0;
|
|
4428
4462
|
var f = r.inflateInit2(this.strm, p.windowBits);
|
|
4429
4463
|
if (f !== l.Z_OK) throw new Error(g[f]);
|
|
4430
4464
|
this.header = new u(), r.inflateGetHeader(this.strm, this.header);
|
|
@@ -4435,14 +4469,14 @@ function fe() {
|
|
|
4435
4469
|
return f.result;
|
|
4436
4470
|
}
|
|
4437
4471
|
c.prototype.push = function(h, p) {
|
|
4438
|
-
var f,
|
|
4472
|
+
var f, b, _, C, S, z, B = this.strm, O = this.options.chunkSize, T = this.options.dictionary, H = !1;
|
|
4439
4473
|
if (this.ended) return !1;
|
|
4440
|
-
|
|
4474
|
+
b = p === ~~p ? p : p === !0 ? l.Z_FINISH : l.Z_NO_FLUSH, typeof h == "string" ? B.input = o.binstring2buf(h) : y.call(h) === "[object ArrayBuffer]" ? B.input = new Uint8Array(h) : B.input = h, B.next_in = 0, B.avail_in = B.input.length;
|
|
4441
4475
|
do {
|
|
4442
|
-
if (B.avail_out === 0 && (B.output = new s.Buf8(O), B.next_out = 0, B.avail_out = O), (f = r.inflate(B, l.Z_NO_FLUSH)) === l.Z_NEED_DICT &&
|
|
4443
|
-
B.next_out && (B.avail_out !== 0 && f !== l.Z_STREAM_END && (B.avail_in !== 0 ||
|
|
4476
|
+
if (B.avail_out === 0 && (B.output = new s.Buf8(O), B.next_out = 0, B.avail_out = O), (f = r.inflate(B, l.Z_NO_FLUSH)) === l.Z_NEED_DICT && T && (z = typeof T == "string" ? o.string2buf(T) : y.call(T) === "[object ArrayBuffer]" ? new Uint8Array(T) : T, f = r.inflateSetDictionary(this.strm, z)), f === l.Z_BUF_ERROR && H === !0 && (f = l.Z_OK, H = !1), f !== l.Z_STREAM_END && f !== l.Z_OK) return this.onEnd(f), !(this.ended = !0);
|
|
4477
|
+
B.next_out && (B.avail_out !== 0 && f !== l.Z_STREAM_END && (B.avail_in !== 0 || b !== l.Z_FINISH && b !== l.Z_SYNC_FLUSH) || (this.options.to === "string" ? (_ = o.utf8border(B.output, B.next_out), C = B.next_out - _, S = o.buf2string(B.output, _), B.next_out = C, B.avail_out = O - C, C && s.arraySet(B.output, B.output, _, C, 0), this.onData(S)) : this.onData(s.shrinkBuf(B.output, B.next_out)))), B.avail_in === 0 && B.avail_out === 0 && (H = !0);
|
|
4444
4478
|
} while ((0 < B.avail_in || B.avail_out === 0) && f !== l.Z_STREAM_END);
|
|
4445
|
-
return f === l.Z_STREAM_END && (
|
|
4479
|
+
return f === l.Z_STREAM_END && (b = l.Z_FINISH), b === l.Z_FINISH ? (f = r.inflateEnd(this.strm), this.onEnd(f), this.ended = !0, f === l.Z_OK) : b !== l.Z_SYNC_FLUSH || (this.onEnd(l.Z_OK), !(B.avail_out = 0));
|
|
4446
4480
|
}, c.prototype.onData = function(h) {
|
|
4447
4481
|
this.chunks.push(h);
|
|
4448
4482
|
}, c.prototype.onEnd = function(h) {
|
|
@@ -4454,26 +4488,26 @@ function fe() {
|
|
|
4454
4488
|
var r = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Int32Array < "u";
|
|
4455
4489
|
n.assign = function(l) {
|
|
4456
4490
|
for (var g = Array.prototype.slice.call(arguments, 1); g.length; ) {
|
|
4457
|
-
var
|
|
4458
|
-
if (
|
|
4459
|
-
if (typeof
|
|
4460
|
-
for (var u in
|
|
4491
|
+
var w = g.shift();
|
|
4492
|
+
if (w) {
|
|
4493
|
+
if (typeof w != "object") throw new TypeError(w + "must be non-object");
|
|
4494
|
+
for (var u in w) w.hasOwnProperty(u) && (l[u] = w[u]);
|
|
4461
4495
|
}
|
|
4462
4496
|
}
|
|
4463
4497
|
return l;
|
|
4464
4498
|
}, n.shrinkBuf = function(l, g) {
|
|
4465
4499
|
return l.length === g ? l : l.subarray ? l.subarray(0, g) : (l.length = g, l);
|
|
4466
4500
|
};
|
|
4467
|
-
var s = { arraySet: function(l, g,
|
|
4468
|
-
if (g.subarray && l.subarray) l.set(g.subarray(
|
|
4469
|
-
else for (var c = 0; c < u; c++) l[y + c] = g[
|
|
4501
|
+
var s = { arraySet: function(l, g, w, u, y) {
|
|
4502
|
+
if (g.subarray && l.subarray) l.set(g.subarray(w, w + u), y);
|
|
4503
|
+
else for (var c = 0; c < u; c++) l[y + c] = g[w + c];
|
|
4470
4504
|
}, flattenChunks: function(l) {
|
|
4471
|
-
var g,
|
|
4472
|
-
for (g = u = 0,
|
|
4473
|
-
for (m = new Uint8Array(u), g = y = 0,
|
|
4505
|
+
var g, w, u, y, c, m;
|
|
4506
|
+
for (g = u = 0, w = l.length; g < w; g++) u += l[g].length;
|
|
4507
|
+
for (m = new Uint8Array(u), g = y = 0, w = l.length; g < w; g++) c = l[g], m.set(c, y), y += c.length;
|
|
4474
4508
|
return m;
|
|
4475
|
-
} }, o = { arraySet: function(l, g,
|
|
4476
|
-
for (var c = 0; c < u; c++) l[y + c] = g[
|
|
4509
|
+
} }, o = { arraySet: function(l, g, w, u, y) {
|
|
4510
|
+
for (var c = 0; c < u; c++) l[y + c] = g[w + c];
|
|
4477
4511
|
}, flattenChunks: function(l) {
|
|
4478
4512
|
return [].concat.apply([], l);
|
|
4479
4513
|
} };
|
|
@@ -4493,30 +4527,30 @@ function fe() {
|
|
|
4493
4527
|
o = !1;
|
|
4494
4528
|
}
|
|
4495
4529
|
for (var l = new r.Buf8(256), g = 0; g < 256; g++) l[g] = 252 <= g ? 6 : 248 <= g ? 5 : 240 <= g ? 4 : 224 <= g ? 3 : 192 <= g ? 2 : 1;
|
|
4496
|
-
function
|
|
4530
|
+
function w(u, y) {
|
|
4497
4531
|
if (y < 65537 && (u.subarray && o || !u.subarray && s)) return String.fromCharCode.apply(null, r.shrinkBuf(u, y));
|
|
4498
4532
|
for (var c = "", m = 0; m < y; m++) c += String.fromCharCode(u[m]);
|
|
4499
4533
|
return c;
|
|
4500
4534
|
}
|
|
4501
4535
|
l[254] = l[254] = 1, n.string2buf = function(u) {
|
|
4502
|
-
var y, c, m, h, p, f = u.length,
|
|
4503
|
-
for (h = 0; h < f; h++) (64512 & (c = u.charCodeAt(h))) == 55296 && h + 1 < f && (64512 & (m = u.charCodeAt(h + 1))) == 56320 && (c = 65536 + (c - 55296 << 10) + (m - 56320), h++),
|
|
4504
|
-
for (y = new r.Buf8(
|
|
4536
|
+
var y, c, m, h, p, f = u.length, b = 0;
|
|
4537
|
+
for (h = 0; h < f; h++) (64512 & (c = u.charCodeAt(h))) == 55296 && h + 1 < f && (64512 & (m = u.charCodeAt(h + 1))) == 56320 && (c = 65536 + (c - 55296 << 10) + (m - 56320), h++), b += c < 128 ? 1 : c < 2048 ? 2 : c < 65536 ? 3 : 4;
|
|
4538
|
+
for (y = new r.Buf8(b), h = p = 0; p < b; h++) (64512 & (c = u.charCodeAt(h))) == 55296 && h + 1 < f && (64512 & (m = u.charCodeAt(h + 1))) == 56320 && (c = 65536 + (c - 55296 << 10) + (m - 56320), h++), c < 128 ? y[p++] = c : (c < 2048 ? y[p++] = 192 | c >>> 6 : (c < 65536 ? y[p++] = 224 | c >>> 12 : (y[p++] = 240 | c >>> 18, y[p++] = 128 | c >>> 12 & 63), y[p++] = 128 | c >>> 6 & 63), y[p++] = 128 | 63 & c);
|
|
4505
4539
|
return y;
|
|
4506
4540
|
}, n.buf2binstring = function(u) {
|
|
4507
|
-
return
|
|
4541
|
+
return w(u, u.length);
|
|
4508
4542
|
}, n.binstring2buf = function(u) {
|
|
4509
4543
|
for (var y = new r.Buf8(u.length), c = 0, m = y.length; c < m; c++) y[c] = u.charCodeAt(c);
|
|
4510
4544
|
return y;
|
|
4511
4545
|
}, n.buf2string = function(u, y) {
|
|
4512
|
-
var c, m, h, p, f = y || u.length,
|
|
4513
|
-
for (c = m = 0; c < f; ) if ((h = u[c++]) < 128)
|
|
4514
|
-
else if (4 < (p = l[h]))
|
|
4546
|
+
var c, m, h, p, f = y || u.length, b = new Array(2 * f);
|
|
4547
|
+
for (c = m = 0; c < f; ) if ((h = u[c++]) < 128) b[m++] = h;
|
|
4548
|
+
else if (4 < (p = l[h])) b[m++] = 65533, c += p - 1;
|
|
4515
4549
|
else {
|
|
4516
4550
|
for (h &= p === 2 ? 31 : p === 3 ? 15 : 7; 1 < p && c < f; ) h = h << 6 | 63 & u[c++], p--;
|
|
4517
|
-
1 < p ?
|
|
4551
|
+
1 < p ? b[m++] = 65533 : h < 65536 ? b[m++] = h : (h -= 65536, b[m++] = 55296 | h >> 10 & 1023, b[m++] = 56320 | 1023 & h);
|
|
4518
4552
|
}
|
|
4519
|
-
return b
|
|
4553
|
+
return w(b, m);
|
|
4520
4554
|
}, n.utf8border = function(u, y) {
|
|
4521
4555
|
var c;
|
|
4522
4556
|
for ((y = y || u.length) > u.length && (y = u.length), c = y - 1; 0 <= c && (192 & u[c]) == 128; ) c--;
|
|
@@ -4524,11 +4558,11 @@ function fe() {
|
|
|
4524
4558
|
};
|
|
4525
4559
|
}, { "./common": 41 }], 43: [function(e, i, n) {
|
|
4526
4560
|
i.exports = function(r, s, o, l) {
|
|
4527
|
-
for (var g = 65535 & r | 0,
|
|
4528
|
-
for (o -= u = 2e3 < o ? 2e3 : o;
|
|
4529
|
-
g %= 65521,
|
|
4561
|
+
for (var g = 65535 & r | 0, w = r >>> 16 & 65535 | 0, u = 0; o !== 0; ) {
|
|
4562
|
+
for (o -= u = 2e3 < o ? 2e3 : o; w = w + (g = g + s[l++] | 0) | 0, --u; ) ;
|
|
4563
|
+
g %= 65521, w %= 65521;
|
|
4530
4564
|
}
|
|
4531
|
-
return g |
|
|
4565
|
+
return g | w << 16 | 0;
|
|
4532
4566
|
};
|
|
4533
4567
|
}, {}], 44: [function(e, i, n) {
|
|
4534
4568
|
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 };
|
|
@@ -4542,15 +4576,15 @@ function fe() {
|
|
|
4542
4576
|
return o;
|
|
4543
4577
|
})();
|
|
4544
4578
|
i.exports = function(s, o, l, g) {
|
|
4545
|
-
var
|
|
4579
|
+
var w = r, u = g + l;
|
|
4546
4580
|
s ^= -1;
|
|
4547
|
-
for (var y = g; y < u; y++) s = s >>> 8 ^
|
|
4581
|
+
for (var y = g; y < u; y++) s = s >>> 8 ^ w[255 & (s ^ o[y])];
|
|
4548
4582
|
return -1 ^ s;
|
|
4549
4583
|
};
|
|
4550
4584
|
}, {}], 46: [function(e, i, n) {
|
|
4551
|
-
var r, s = e("../utils/common"), o = e("./trees"), l = e("./adler32"), g = e("./crc32"),
|
|
4585
|
+
var r, s = e("../utils/common"), o = e("./trees"), l = e("./adler32"), g = e("./crc32"), w = e("./messages"), u = 0, y = 4, c = 0, m = -2, h = -1, p = 4, f = 2, b = 8, _ = 9, C = 286, S = 30, z = 19, B = 2 * C + 1, O = 15, T = 3, H = 258, X = H + T + 1, k = 42, D = 113, d = 1, R = 2, J = 3, W = 4;
|
|
4552
4586
|
function tt(a, L) {
|
|
4553
|
-
return a.msg =
|
|
4587
|
+
return a.msg = w[L], L;
|
|
4554
4588
|
}
|
|
4555
4589
|
function U(a) {
|
|
4556
4590
|
return (a << 1) - (4 < a ? 9 : 0);
|
|
@@ -4559,8 +4593,8 @@ function fe() {
|
|
|
4559
4593
|
for (var L = a.length; 0 <= --L; ) a[L] = 0;
|
|
4560
4594
|
}
|
|
4561
4595
|
function M(a) {
|
|
4562
|
-
var L = a.state,
|
|
4563
|
-
|
|
4596
|
+
var L = a.state, A = L.pending;
|
|
4597
|
+
A > a.avail_out && (A = a.avail_out), A !== 0 && (s.arraySet(a.output, L.pending_buf, L.pending_out, A, a.next_out), a.next_out += A, L.pending_out += A, a.total_out += A, a.avail_out -= A, L.pending -= A, L.pending === 0 && (L.pending_out = 0));
|
|
4564
4598
|
}
|
|
4565
4599
|
function I(a, L) {
|
|
4566
4600
|
o._tr_flush_block(a, 0 <= a.block_start ? a.block_start : -1, a.strstart - a.block_start, L), a.block_start = a.strstart, M(a.strm);
|
|
@@ -4572,14 +4606,14 @@ function fe() {
|
|
|
4572
4606
|
a.pending_buf[a.pending++] = L >>> 8 & 255, a.pending_buf[a.pending++] = 255 & L;
|
|
4573
4607
|
}
|
|
4574
4608
|
function K(a, L) {
|
|
4575
|
-
var
|
|
4609
|
+
var A, x, v = a.max_chain_length, N = a.strstart, P = a.prev_length, F = a.nice_match, E = a.strstart > a.w_size - X ? a.strstart - (a.w_size - X) : 0, j = a.window, G = a.w_mask, Z = a.prev, $ = a.strstart + H, rt = j[N + P - 1], it = j[N + P];
|
|
4576
4610
|
a.prev_length >= a.good_match && (v >>= 2), F > a.lookahead && (F = a.lookahead);
|
|
4577
4611
|
do
|
|
4578
|
-
if (j[(
|
|
4579
|
-
N += 2,
|
|
4612
|
+
if (j[(A = L) + P] === it && j[A + P - 1] === rt && j[A] === j[N] && j[++A] === j[N + 1]) {
|
|
4613
|
+
N += 2, A++;
|
|
4580
4614
|
do
|
|
4581
4615
|
;
|
|
4582
|
-
while (j[++N] === j[++
|
|
4616
|
+
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 < $);
|
|
4583
4617
|
if (x = H - ($ - N), N = $ - H, P < x) {
|
|
4584
4618
|
if (a.match_start = L, F <= (P = x)) break;
|
|
4585
4619
|
rt = j[N + P - 1], it = j[N + P];
|
|
@@ -4589,52 +4623,52 @@ function fe() {
|
|
|
4589
4623
|
return P <= a.lookahead ? P : a.lookahead;
|
|
4590
4624
|
}
|
|
4591
4625
|
function st(a) {
|
|
4592
|
-
var L,
|
|
4626
|
+
var L, A, x, v, N, P, F, E, j, G, Z = a.w_size;
|
|
4593
4627
|
do {
|
|
4594
4628
|
if (v = a.window_size - a.lookahead - a.strstart, a.strstart >= Z + (Z - X)) {
|
|
4595
|
-
for (s.arraySet(a.window, a.window, Z, Z, 0), a.match_start -= Z, a.strstart -= Z, a.block_start -= Z, L =
|
|
4596
|
-
for (L =
|
|
4629
|
+
for (s.arraySet(a.window, a.window, Z, Z, 0), a.match_start -= Z, a.strstart -= Z, a.block_start -= Z, L = A = a.hash_size; x = a.head[--L], a.head[L] = Z <= x ? x - Z : 0, --A; ) ;
|
|
4630
|
+
for (L = A = Z; x = a.prev[--L], a.prev[L] = Z <= x ? x - Z : 0, --A; ) ;
|
|
4597
4631
|
v += Z;
|
|
4598
4632
|
}
|
|
4599
4633
|
if (a.strm.avail_in === 0) break;
|
|
4600
|
-
if (P = a.strm, F = a.window, E = a.strstart + a.lookahead, j = v, G = void 0, G = P.avail_in, j < G && (G = j),
|
|
4634
|
+
if (P = a.strm, F = a.window, E = a.strstart + a.lookahead, j = v, G = void 0, G = P.avail_in, j < G && (G = j), A = G === 0 ? 0 : (P.avail_in -= G, s.arraySet(F, P.input, P.next_in, G, E), P.state.wrap === 1 ? P.adler = l(P.adler, F, G, E) : P.state.wrap === 2 && (P.adler = g(P.adler, F, G, E)), P.next_in += G, P.total_in += G, G), a.lookahead += A, 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)); ) ;
|
|
4601
4635
|
} while (a.lookahead < X && a.strm.avail_in !== 0);
|
|
4602
4636
|
}
|
|
4603
4637
|
function lt(a, L) {
|
|
4604
|
-
for (var
|
|
4638
|
+
for (var A, x; ; ) {
|
|
4605
4639
|
if (a.lookahead < X) {
|
|
4606
4640
|
if (st(a), a.lookahead < X && L === u) return d;
|
|
4607
4641
|
if (a.lookahead === 0) break;
|
|
4608
4642
|
}
|
|
4609
|
-
if (
|
|
4610
|
-
for (a.match_length--; a.strstart++, a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart +
|
|
4643
|
+
if (A = 0, a.lookahead >= T && (a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, A = a.prev[a.strstart & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = a.strstart), A !== 0 && a.strstart - A <= a.w_size - X && (a.match_length = K(a, A)), a.match_length >= T) if (x = o._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) {
|
|
4644
|
+
for (a.match_length--; a.strstart++, a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, A = a.prev[a.strstart & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = a.strstart, --a.match_length != 0; ) ;
|
|
4611
4645
|
a.strstart++;
|
|
4612
4646
|
} 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;
|
|
4613
4647
|
else x = o._tr_tally(a, 0, a.window[a.strstart]), a.lookahead--, a.strstart++;
|
|
4614
4648
|
if (x && (I(a, !1), a.strm.avail_out === 0)) return d;
|
|
4615
4649
|
}
|
|
4616
|
-
return a.insert = a.strstart <
|
|
4650
|
+
return a.insert = a.strstart < T - 1 ? a.strstart : T - 1, L === y ? (I(a, !0), a.strm.avail_out === 0 ? J : W) : a.last_lit && (I(a, !1), a.strm.avail_out === 0) ? d : R;
|
|
4617
4651
|
}
|
|
4618
4652
|
function et(a, L) {
|
|
4619
|
-
for (var
|
|
4653
|
+
for (var A, x, v; ; ) {
|
|
4620
4654
|
if (a.lookahead < X) {
|
|
4621
4655
|
if (st(a), a.lookahead < X && L === u) return d;
|
|
4622
4656
|
if (a.lookahead === 0) break;
|
|
4623
4657
|
}
|
|
4624
|
-
if (
|
|
4625
|
-
for (v = a.strstart + a.lookahead -
|
|
4626
|
-
if (a.match_available = 0, a.match_length =
|
|
4658
|
+
if (A = 0, a.lookahead >= T && (a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, A = 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, A !== 0 && a.prev_length < a.max_lazy_match && a.strstart - A <= a.w_size - X && (a.match_length = K(a, A), 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) {
|
|
4659
|
+
for (v = a.strstart + a.lookahead - T, x = o._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 <= v && (a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, A = a.prev[a.strstart & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = a.strstart), --a.prev_length != 0; ) ;
|
|
4660
|
+
if (a.match_available = 0, a.match_length = T - 1, a.strstart++, x && (I(a, !1), a.strm.avail_out === 0)) return d;
|
|
4627
4661
|
} else if (a.match_available) {
|
|
4628
4662
|
if ((x = o._tr_tally(a, 0, a.window[a.strstart - 1])) && I(a, !1), a.strstart++, a.lookahead--, a.strm.avail_out === 0) return d;
|
|
4629
4663
|
} else a.match_available = 1, a.strstart++, a.lookahead--;
|
|
4630
4664
|
}
|
|
4631
|
-
return a.match_available && (x = o._tr_tally(a, 0, a.window[a.strstart - 1]), a.match_available = 0), a.insert = a.strstart <
|
|
4665
|
+
return a.match_available && (x = o._tr_tally(a, 0, a.window[a.strstart - 1]), a.match_available = 0), a.insert = a.strstart < T - 1 ? a.strstart : T - 1, L === y ? (I(a, !0), a.strm.avail_out === 0 ? J : W) : a.last_lit && (I(a, !1), a.strm.avail_out === 0) ? d : R;
|
|
4632
4666
|
}
|
|
4633
|
-
function nt(a, L,
|
|
4634
|
-
this.good_length = a, this.max_lazy = L, this.nice_length =
|
|
4667
|
+
function nt(a, L, A, x, v) {
|
|
4668
|
+
this.good_length = a, this.max_lazy = L, this.nice_length = A, this.max_chain = x, this.func = v;
|
|
4635
4669
|
}
|
|
4636
4670
|
function dt() {
|
|
4637
|
-
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 =
|
|
4671
|
+
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 = b, 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 s.Buf16(2 * B), this.dyn_dtree = new s.Buf16(2 * (2 * S + 1)), this.bl_tree = new s.Buf16(2 * (2 * z + 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 s.Buf16(O + 1), this.heap = new s.Buf16(2 * C + 1), q(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new s.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;
|
|
4638
4672
|
}
|
|
4639
4673
|
function ot(a) {
|
|
4640
4674
|
var L;
|
|
@@ -4642,41 +4676,41 @@ function fe() {
|
|
|
4642
4676
|
}
|
|
4643
4677
|
function ft(a) {
|
|
4644
4678
|
var L = ot(a);
|
|
4645
|
-
return L === c && (function(
|
|
4646
|
-
|
|
4679
|
+
return L === c && (function(A) {
|
|
4680
|
+
A.window_size = 2 * A.w_size, q(A.head), A.max_lazy_match = r[A.level].max_lazy, A.good_match = r[A.level].good_length, A.nice_match = r[A.level].nice_length, A.max_chain_length = r[A.level].max_chain, A.strstart = 0, A.block_start = 0, A.lookahead = 0, A.insert = 0, A.match_length = A.prev_length = T - 1, A.match_available = 0, A.ins_h = 0;
|
|
4647
4681
|
})(a.state), L;
|
|
4648
4682
|
}
|
|
4649
|
-
function ut(a, L,
|
|
4683
|
+
function ut(a, L, A, x, v, N) {
|
|
4650
4684
|
if (!a) return m;
|
|
4651
4685
|
var P = 1;
|
|
4652
|
-
if (L === h && (L = 6), x < 0 ? (P = 0, x = -x) : 15 < x && (P = 2, x -= 16), v < 1 || _ < v ||
|
|
4686
|
+
if (L === h && (L = 6), x < 0 ? (P = 0, x = -x) : 15 < x && (P = 2, x -= 16), v < 1 || _ < v || A !== b || x < 8 || 15 < x || L < 0 || 9 < L || N < 0 || p < N) return tt(a, m);
|
|
4653
4687
|
x === 8 && (x = 9);
|
|
4654
4688
|
var F = new dt();
|
|
4655
|
-
return (a.state = F).strm = a, F.wrap = P, F.gzhead = null, F.w_bits = x, F.w_size = 1 << F.w_bits, F.w_mask = F.w_size - 1, F.hash_bits = v + 7, F.hash_size = 1 << F.hash_bits, F.hash_mask = F.hash_size - 1, F.hash_shift = ~~((F.hash_bits +
|
|
4689
|
+
return (a.state = F).strm = a, F.wrap = P, F.gzhead = null, F.w_bits = x, F.w_size = 1 << F.w_bits, F.w_mask = F.w_size - 1, F.hash_bits = v + 7, F.hash_size = 1 << F.hash_bits, F.hash_mask = F.hash_size - 1, F.hash_shift = ~~((F.hash_bits + T - 1) / T), F.window = new s.Buf8(2 * F.w_size), F.head = new s.Buf16(F.hash_size), F.prev = new s.Buf16(F.w_size), F.lit_bufsize = 1 << v + 6, F.pending_buf_size = 4 * F.lit_bufsize, F.pending_buf = new s.Buf8(F.pending_buf_size), F.d_buf = 1 * F.lit_bufsize, F.l_buf = 3 * F.lit_bufsize, F.level = L, F.strategy = N, F.method = A, ft(a);
|
|
4656
4690
|
}
|
|
4657
4691
|
r = [new nt(0, 0, 0, 0, function(a, L) {
|
|
4658
|
-
var
|
|
4659
|
-
for (
|
|
4692
|
+
var A = 65535;
|
|
4693
|
+
for (A > a.pending_buf_size - 5 && (A = a.pending_buf_size - 5); ; ) {
|
|
4660
4694
|
if (a.lookahead <= 1) {
|
|
4661
4695
|
if (st(a), a.lookahead === 0 && L === u) return d;
|
|
4662
4696
|
if (a.lookahead === 0) break;
|
|
4663
4697
|
}
|
|
4664
4698
|
a.strstart += a.lookahead, a.lookahead = 0;
|
|
4665
|
-
var x = a.block_start +
|
|
4699
|
+
var x = a.block_start + A;
|
|
4666
4700
|
if ((a.strstart === 0 || a.strstart >= x) && (a.lookahead = a.strstart - x, a.strstart = x, I(a, !1), a.strm.avail_out === 0) || a.strstart - a.block_start >= a.w_size - X && (I(a, !1), a.strm.avail_out === 0)) return d;
|
|
4667
4701
|
}
|
|
4668
4702
|
return a.insert = 0, L === y ? (I(a, !0), a.strm.avail_out === 0 ? J : W) : (a.strstart > a.block_start && (I(a, !1), a.strm.avail_out), d);
|
|
4669
4703
|
}), new nt(4, 4, 8, 4, lt), new nt(4, 5, 16, 8, lt), new nt(4, 6, 32, 32, lt), new nt(4, 4, 16, 16, et), new nt(8, 16, 32, 32, et), new nt(8, 16, 128, 128, et), new nt(8, 32, 128, 256, et), new nt(32, 128, 258, 1024, et), new nt(32, 258, 258, 4096, et)], n.deflateInit = function(a, L) {
|
|
4670
|
-
return ut(a, L,
|
|
4704
|
+
return ut(a, L, b, 15, 8, 0);
|
|
4671
4705
|
}, n.deflateInit2 = ut, n.deflateReset = ft, n.deflateResetKeep = ot, n.deflateSetHeader = function(a, L) {
|
|
4672
4706
|
return a && a.state ? a.state.wrap !== 2 ? m : (a.state.gzhead = L, c) : m;
|
|
4673
4707
|
}, n.deflate = function(a, L) {
|
|
4674
|
-
var
|
|
4708
|
+
var A, x, v, N;
|
|
4675
4709
|
if (!a || !a.state || 5 < L || L < 0) return a ? tt(a, m) : m;
|
|
4676
4710
|
if (x = a.state, !a.output || !a.input && a.avail_in !== 0 || x.status === 666 && L !== y) return tt(a, a.avail_out === 0 ? -5 : m);
|
|
4677
|
-
if (x.strm = a,
|
|
4711
|
+
if (x.strm = a, A = x.last_flush, x.last_flush = L, x.status === k) if (x.wrap === 2) a.adler = 0, V(x, 31), V(x, 139), V(x, 8), x.gzhead ? (V(x, (x.gzhead.text ? 1 : 0) + (x.gzhead.hcrc ? 2 : 0) + (x.gzhead.extra ? 4 : 0) + (x.gzhead.name ? 8 : 0) + (x.gzhead.comment ? 16 : 0)), V(x, 255 & x.gzhead.time), V(x, x.gzhead.time >> 8 & 255), V(x, x.gzhead.time >> 16 & 255), V(x, x.gzhead.time >> 24 & 255), V(x, x.level === 9 ? 2 : 2 <= x.strategy || x.level < 2 ? 4 : 0), V(x, 255 & x.gzhead.os), x.gzhead.extra && x.gzhead.extra.length && (V(x, 255 & x.gzhead.extra.length), V(x, x.gzhead.extra.length >> 8 & 255)), x.gzhead.hcrc && (a.adler = g(a.adler, x.pending_buf, x.pending, 0)), x.gzindex = 0, x.status = 69) : (V(x, 0), V(x, 0), V(x, 0), V(x, 0), V(x, 0), V(x, x.level === 9 ? 2 : 2 <= x.strategy || x.level < 2 ? 4 : 0), V(x, 3), x.status = D);
|
|
4678
4712
|
else {
|
|
4679
|
-
var P =
|
|
4713
|
+
var P = b + (x.w_bits - 8 << 4) << 8;
|
|
4680
4714
|
P |= (2 <= x.strategy || x.level < 2 ? 0 : x.level < 6 ? 1 : x.level === 6 ? 2 : 3) << 6, x.strstart !== 0 && (P |= 32), P += 31 - P % 31, x.status = D, Y(x, P), x.strstart !== 0 && (Y(x, a.adler >>> 16), Y(x, 65535 & a.adler)), a.adler = 1;
|
|
4681
4715
|
}
|
|
4682
4716
|
if (x.status === 69) if (x.gzhead.extra) {
|
|
@@ -4707,7 +4741,7 @@ function fe() {
|
|
|
4707
4741
|
} else x.status = 103;
|
|
4708
4742
|
if (x.status === 103 && (x.gzhead.hcrc ? (x.pending + 2 > x.pending_buf_size && M(a), x.pending + 2 <= x.pending_buf_size && (V(x, 255 & a.adler), V(x, a.adler >> 8 & 255), a.adler = 0, x.status = D)) : x.status = D), x.pending !== 0) {
|
|
4709
4743
|
if (M(a), a.avail_out === 0) return x.last_flush = -1, c;
|
|
4710
|
-
} else if (a.avail_in === 0 && U(L) <= U(
|
|
4744
|
+
} else if (a.avail_in === 0 && U(L) <= U(A) && L !== y) return tt(a, -5);
|
|
4711
4745
|
if (x.status === 666 && a.avail_in !== 0) return tt(a, -5);
|
|
4712
4746
|
if (a.avail_in !== 0 || x.lookahead !== 0 || L !== u && x.status !== 666) {
|
|
4713
4747
|
var F = x.strategy === 2 ? (function(E, j) {
|
|
@@ -4725,14 +4759,14 @@ function fe() {
|
|
|
4725
4759
|
if (st(E), E.lookahead <= H && j === u) return d;
|
|
4726
4760
|
if (E.lookahead === 0) break;
|
|
4727
4761
|
}
|
|
4728
|
-
if (E.match_length = 0, E.lookahead >=
|
|
4762
|
+
if (E.match_length = 0, E.lookahead >= T && 0 < E.strstart && (Z = it[$ = E.strstart - 1]) === it[++$] && Z === it[++$] && Z === it[++$]) {
|
|
4729
4763
|
rt = E.strstart + H;
|
|
4730
4764
|
do
|
|
4731
4765
|
;
|
|
4732
4766
|
while (Z === it[++$] && Z === it[++$] && Z === it[++$] && Z === it[++$] && Z === it[++$] && Z === it[++$] && Z === it[++$] && Z === it[++$] && $ < rt);
|
|
4733
4767
|
E.match_length = H - (rt - $), E.match_length > E.lookahead && (E.match_length = E.lookahead);
|
|
4734
4768
|
}
|
|
4735
|
-
if (E.match_length >=
|
|
4769
|
+
if (E.match_length >= T ? (G = o._tr_tally(E, 1, E.match_length - T), E.lookahead -= E.match_length, E.strstart += E.match_length, E.match_length = 0) : (G = o._tr_tally(E, 0, E.window[E.strstart]), E.lookahead--, E.strstart++), G && (I(E, !1), E.strm.avail_out === 0)) return d;
|
|
4736
4770
|
}
|
|
4737
4771
|
return E.insert = 0, j === y ? (I(E, !0), E.strm.avail_out === 0 ? J : W) : E.last_lit && (I(E, !1), E.strm.avail_out === 0) ? d : R;
|
|
4738
4772
|
})(x, L) : r[x.level].func(x, L);
|
|
@@ -4744,13 +4778,13 @@ function fe() {
|
|
|
4744
4778
|
var L;
|
|
4745
4779
|
return a && a.state ? (L = a.state.status) !== k && L !== 69 && L !== 73 && L !== 91 && L !== 103 && L !== D && L !== 666 ? tt(a, m) : (a.state = null, L === D ? tt(a, -3) : c) : m;
|
|
4746
4780
|
}, n.deflateSetDictionary = function(a, L) {
|
|
4747
|
-
var
|
|
4748
|
-
if (!a || !a.state || (N = (
|
|
4749
|
-
for (N === 1 && (a.adler = l(a.adler, L, G, 0)),
|
|
4750
|
-
for (x =
|
|
4751
|
-
|
|
4781
|
+
var A, x, v, N, P, F, E, j, G = L.length;
|
|
4782
|
+
if (!a || !a.state || (N = (A = a.state).wrap) === 2 || N === 1 && A.status !== k || A.lookahead) return m;
|
|
4783
|
+
for (N === 1 && (a.adler = l(a.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 s.Buf8(A.w_size), s.arraySet(j, L, G - A.w_size, A.w_size, 0), L = j, G = A.w_size), P = a.avail_in, F = a.next_in, E = a.input, a.avail_in = G, a.next_in = 0, a.input = L, st(A); A.lookahead >= T; ) {
|
|
4784
|
+
for (x = A.strstart, v = A.lookahead - (T - 1); A.ins_h = (A.ins_h << A.hash_shift ^ A.window[x + T - 1]) & A.hash_mask, A.prev[x & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = x, x++, --v; ) ;
|
|
4785
|
+
A.strstart = x, A.lookahead = T - 1, st(A);
|
|
4752
4786
|
}
|
|
4753
|
-
return
|
|
4787
|
+
return A.strstart += A.lookahead, A.block_start = A.strstart, A.insert = A.lookahead, A.lookahead = 0, A.match_length = A.prev_length = T - 1, A.match_available = 0, a.next_in = F, a.input = E, a.avail_in = P, A.wrap = N, c;
|
|
4754
4788
|
}, n.deflateInfo = "pako deflate (from Nodeca project)";
|
|
4755
4789
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(e, i, n) {
|
|
4756
4790
|
i.exports = function() {
|
|
@@ -4758,81 +4792,81 @@ function fe() {
|
|
|
4758
4792
|
};
|
|
4759
4793
|
}, {}], 48: [function(e, i, n) {
|
|
4760
4794
|
i.exports = function(r, s) {
|
|
4761
|
-
var o, l, g,
|
|
4762
|
-
o = r.state, l = r.next_in, d = r.input, g = l + (r.avail_in - 5),
|
|
4795
|
+
var o, l, g, w, u, y, c, m, h, p, f, b, _, C, S, z, B, O, T, H, X, k, D, d, R;
|
|
4796
|
+
o = r.state, l = r.next_in, d = r.input, g = l + (r.avail_in - 5), w = r.next_out, R = r.output, u = w - (s - r.avail_out), y = w + (r.avail_out - 257), c = o.dmax, m = o.wsize, h = o.whave, p = o.wnext, f = o.window, b = o.hold, _ = o.bits, C = o.lencode, S = o.distcode, z = (1 << o.lenbits) - 1, B = (1 << o.distbits) - 1;
|
|
4763
4797
|
t: do {
|
|
4764
|
-
_ < 15 && (
|
|
4798
|
+
_ < 15 && (b += d[l++] << _, _ += 8, b += d[l++] << _, _ += 8), O = C[b & z];
|
|
4765
4799
|
e: for (; ; ) {
|
|
4766
|
-
if (
|
|
4800
|
+
if (b >>>= T = O >>> 24, _ -= T, (T = O >>> 16 & 255) === 0) R[w++] = 65535 & O;
|
|
4767
4801
|
else {
|
|
4768
|
-
if (!(16 &
|
|
4769
|
-
if ((64 &
|
|
4770
|
-
O = C[(65535 & O) + (
|
|
4802
|
+
if (!(16 & T)) {
|
|
4803
|
+
if ((64 & T) == 0) {
|
|
4804
|
+
O = C[(65535 & O) + (b & (1 << T) - 1)];
|
|
4771
4805
|
continue e;
|
|
4772
4806
|
}
|
|
4773
|
-
if (32 &
|
|
4807
|
+
if (32 & T) {
|
|
4774
4808
|
o.mode = 12;
|
|
4775
4809
|
break t;
|
|
4776
4810
|
}
|
|
4777
4811
|
r.msg = "invalid literal/length code", o.mode = 30;
|
|
4778
4812
|
break t;
|
|
4779
4813
|
}
|
|
4780
|
-
H = 65535 & O, (
|
|
4814
|
+
H = 65535 & O, (T &= 15) && (_ < T && (b += d[l++] << _, _ += 8), H += b & (1 << T) - 1, b >>>= T, _ -= T), _ < 15 && (b += d[l++] << _, _ += 8, b += d[l++] << _, _ += 8), O = S[b & B];
|
|
4781
4815
|
i: for (; ; ) {
|
|
4782
|
-
if (
|
|
4783
|
-
if ((64 &
|
|
4784
|
-
O = S[(65535 & O) + (
|
|
4816
|
+
if (b >>>= T = O >>> 24, _ -= T, !(16 & (T = O >>> 16 & 255))) {
|
|
4817
|
+
if ((64 & T) == 0) {
|
|
4818
|
+
O = S[(65535 & O) + (b & (1 << T) - 1)];
|
|
4785
4819
|
continue i;
|
|
4786
4820
|
}
|
|
4787
4821
|
r.msg = "invalid distance code", o.mode = 30;
|
|
4788
4822
|
break t;
|
|
4789
4823
|
}
|
|
4790
|
-
if (X = 65535 & O, _ < (
|
|
4824
|
+
if (X = 65535 & O, _ < (T &= 15) && (b += d[l++] << _, (_ += 8) < T && (b += d[l++] << _, _ += 8)), c < (X += b & (1 << T) - 1)) {
|
|
4791
4825
|
r.msg = "invalid distance too far back", o.mode = 30;
|
|
4792
4826
|
break t;
|
|
4793
4827
|
}
|
|
4794
|
-
if (
|
|
4795
|
-
if (h < (
|
|
4828
|
+
if (b >>>= T, _ -= T, (T = w - u) < X) {
|
|
4829
|
+
if (h < (T = X - T) && o.sane) {
|
|
4796
4830
|
r.msg = "invalid distance too far back", o.mode = 30;
|
|
4797
4831
|
break t;
|
|
4798
4832
|
}
|
|
4799
4833
|
if (D = f, (k = 0) === p) {
|
|
4800
|
-
if (k += m -
|
|
4801
|
-
for (H -=
|
|
4802
|
-
k =
|
|
4834
|
+
if (k += m - T, T < H) {
|
|
4835
|
+
for (H -= T; R[w++] = f[k++], --T; ) ;
|
|
4836
|
+
k = w - X, D = R;
|
|
4803
4837
|
}
|
|
4804
|
-
} else if (p <
|
|
4805
|
-
if (k += m + p -
|
|
4806
|
-
for (H -=
|
|
4838
|
+
} else if (p < T) {
|
|
4839
|
+
if (k += m + p - T, (T -= p) < H) {
|
|
4840
|
+
for (H -= T; R[w++] = f[k++], --T; ) ;
|
|
4807
4841
|
if (k = 0, p < H) {
|
|
4808
|
-
for (H -=
|
|
4809
|
-
k =
|
|
4842
|
+
for (H -= T = p; R[w++] = f[k++], --T; ) ;
|
|
4843
|
+
k = w - X, D = R;
|
|
4810
4844
|
}
|
|
4811
4845
|
}
|
|
4812
|
-
} else if (k += p -
|
|
4813
|
-
for (H -=
|
|
4814
|
-
k =
|
|
4846
|
+
} else if (k += p - T, T < H) {
|
|
4847
|
+
for (H -= T; R[w++] = f[k++], --T; ) ;
|
|
4848
|
+
k = w - X, D = R;
|
|
4815
4849
|
}
|
|
4816
|
-
for (; 2 < H; ) R[
|
|
4817
|
-
H && (R[
|
|
4850
|
+
for (; 2 < H; ) R[w++] = D[k++], R[w++] = D[k++], R[w++] = D[k++], H -= 3;
|
|
4851
|
+
H && (R[w++] = D[k++], 1 < H && (R[w++] = D[k++]));
|
|
4818
4852
|
} else {
|
|
4819
|
-
for (k =
|
|
4820
|
-
H && (R[
|
|
4853
|
+
for (k = w - X; R[w++] = R[k++], R[w++] = R[k++], R[w++] = R[k++], 2 < (H -= 3); ) ;
|
|
4854
|
+
H && (R[w++] = R[k++], 1 < H && (R[w++] = R[k++]));
|
|
4821
4855
|
}
|
|
4822
4856
|
break;
|
|
4823
4857
|
}
|
|
4824
4858
|
}
|
|
4825
4859
|
break;
|
|
4826
4860
|
}
|
|
4827
|
-
} while (l < g &&
|
|
4828
|
-
l -= H = _ >> 3,
|
|
4861
|
+
} while (l < g && w < y);
|
|
4862
|
+
l -= H = _ >> 3, b &= (1 << (_ -= H << 3)) - 1, r.next_in = l, r.next_out = w, r.avail_in = l < g ? g - l + 5 : 5 - (l - g), r.avail_out = w < y ? y - w + 257 : 257 - (w - y), o.hold = b, o.bits = _;
|
|
4829
4863
|
};
|
|
4830
4864
|
}, {}], 49: [function(e, i, n) {
|
|
4831
|
-
var r = e("../utils/common"), s = e("./adler32"), o = e("./crc32"), l = e("./inffast"), g = e("./inftrees"),
|
|
4865
|
+
var r = e("../utils/common"), s = e("./adler32"), o = e("./crc32"), l = e("./inffast"), g = e("./inftrees"), w = 1, u = 2, y = 0, c = -2, m = 1, h = 852, p = 592;
|
|
4832
4866
|
function f(k) {
|
|
4833
4867
|
return (k >>> 24 & 255) + (k >>> 8 & 65280) + ((65280 & k) << 8) + ((255 & k) << 24);
|
|
4834
4868
|
}
|
|
4835
|
-
function
|
|
4869
|
+
function b() {
|
|
4836
4870
|
this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new r.Buf16(320), this.work = new r.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
4837
4871
|
}
|
|
4838
4872
|
function _(k) {
|
|
@@ -4849,18 +4883,18 @@ function fe() {
|
|
|
4849
4883
|
}
|
|
4850
4884
|
function z(k, D) {
|
|
4851
4885
|
var d, R;
|
|
4852
|
-
return k ? (R = new
|
|
4886
|
+
return k ? (R = new b(), (k.state = R).window = null, (d = S(k, D)) !== y && (k.state = null), d) : c;
|
|
4853
4887
|
}
|
|
4854
|
-
var B, O,
|
|
4888
|
+
var B, O, T = !0;
|
|
4855
4889
|
function H(k) {
|
|
4856
|
-
if (
|
|
4890
|
+
if (T) {
|
|
4857
4891
|
var D;
|
|
4858
4892
|
for (B = new r.Buf32(512), O = new r.Buf32(32), D = 0; D < 144; ) k.lens[D++] = 8;
|
|
4859
4893
|
for (; D < 256; ) k.lens[D++] = 9;
|
|
4860
4894
|
for (; D < 280; ) k.lens[D++] = 7;
|
|
4861
4895
|
for (; D < 288; ) k.lens[D++] = 8;
|
|
4862
|
-
for (g(
|
|
4863
|
-
g(u, k.lens, 0, 32, O, 0, k.work, { bits: 5 }),
|
|
4896
|
+
for (g(w, k.lens, 0, 288, B, 0, k.work, { bits: 9 }), D = 0; D < 32; ) k.lens[D++] = 5;
|
|
4897
|
+
g(u, k.lens, 0, 32, O, 0, k.work, { bits: 5 }), T = !1;
|
|
4864
4898
|
}
|
|
4865
4899
|
k.lencode = B, k.lenbits = 9, k.distcode = O, k.distbits = 5;
|
|
4866
4900
|
}
|
|
@@ -4871,7 +4905,7 @@ function fe() {
|
|
|
4871
4905
|
n.inflateReset = C, n.inflateReset2 = S, n.inflateResetKeep = _, n.inflateInit = function(k) {
|
|
4872
4906
|
return z(k, 15);
|
|
4873
4907
|
}, n.inflateInit2 = z, n.inflate = function(k, D) {
|
|
4874
|
-
var d, R, J, W, tt, U, q, M, I, V, Y, K, st, lt, et, nt, dt, ot, ft, ut, a, L,
|
|
4908
|
+
var d, R, J, W, tt, U, q, M, I, V, Y, K, st, lt, et, nt, dt, ot, ft, ut, a, L, A, x, v = 0, N = new r.Buf8(4), P = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
4875
4909
|
if (!k || !k.state || !k.output || !k.input && k.avail_in !== 0) return c;
|
|
4876
4910
|
(d = k.state).mode === 12 && (d.mode = 13), tt = k.next_out, J = k.output, q = k.avail_out, W = k.next_in, R = k.input, U = k.avail_in, M = d.hold, I = d.bits, V = U, Y = q, L = y;
|
|
4877
4911
|
t: for (; ; ) switch (d.mode) {
|
|
@@ -5044,7 +5078,7 @@ function fe() {
|
|
|
5044
5078
|
d.lens[P[d.have++]] = 7 & M, M >>>= 3, I -= 3;
|
|
5045
5079
|
}
|
|
5046
5080
|
for (; d.have < 19; ) d.lens[P[d.have++]] = 0;
|
|
5047
|
-
if (d.lencode = d.lendyn, d.lenbits = 7,
|
|
5081
|
+
if (d.lencode = d.lendyn, d.lenbits = 7, A = { bits: d.lenbits }, L = g(0, d.lens, 0, 19, d.lencode, 0, d.work, A), d.lenbits = A.bits, L) {
|
|
5048
5082
|
k.msg = "invalid code lengths set", d.mode = 30;
|
|
5049
5083
|
break;
|
|
5050
5084
|
}
|
|
@@ -5092,11 +5126,11 @@ function fe() {
|
|
|
5092
5126
|
k.msg = "invalid code -- missing end-of-block", d.mode = 30;
|
|
5093
5127
|
break;
|
|
5094
5128
|
}
|
|
5095
|
-
if (d.lenbits = 9,
|
|
5129
|
+
if (d.lenbits = 9, A = { bits: d.lenbits }, L = g(w, d.lens, 0, d.nlen, d.lencode, 0, d.work, A), d.lenbits = A.bits, L) {
|
|
5096
5130
|
k.msg = "invalid literal/lengths set", d.mode = 30;
|
|
5097
5131
|
break;
|
|
5098
5132
|
}
|
|
5099
|
-
if (d.distbits = 6, d.distcode = d.distdyn,
|
|
5133
|
+
if (d.distbits = 6, d.distcode = d.distdyn, A = { bits: d.distbits }, L = g(u, d.lens, d.nlen, d.ndist, d.distcode, 0, d.work, A), d.distbits = A.bits, L) {
|
|
5100
5134
|
k.msg = "invalid distances set", d.mode = 30;
|
|
5101
5135
|
break;
|
|
5102
5136
|
}
|
|
@@ -5238,28 +5272,28 @@ function fe() {
|
|
|
5238
5272
|
}, n.inflateInfo = "pako inflate (from Nodeca project)";
|
|
5239
5273
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(e, i, n) {
|
|
5240
5274
|
var r = e("../utils/common"), s = [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], o = [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], l = [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];
|
|
5241
|
-
i.exports = function(
|
|
5242
|
-
var
|
|
5275
|
+
i.exports = function(w, u, y, c, m, h, p, f) {
|
|
5276
|
+
var b, _, C, S, z, B, O, T, H, X = f.bits, k = 0, D = 0, d = 0, R = 0, J = 0, W = 0, tt = 0, U = 0, q = 0, M = 0, I = null, V = 0, Y = new r.Buf16(16), K = new r.Buf16(16), st = null, lt = 0;
|
|
5243
5277
|
for (k = 0; k <= 15; k++) Y[k] = 0;
|
|
5244
5278
|
for (D = 0; D < c; D++) Y[u[y + D]]++;
|
|
5245
5279
|
for (J = X, R = 15; 1 <= R && Y[R] === 0; R--) ;
|
|
5246
5280
|
if (R < J && (J = R), R === 0) return m[h++] = 20971520, m[h++] = 20971520, f.bits = 1, 0;
|
|
5247
5281
|
for (d = 1; d < R && Y[d] === 0; d++) ;
|
|
5248
5282
|
for (J < d && (J = d), k = U = 1; k <= 15; k++) if (U <<= 1, (U -= Y[k]) < 0) return -1;
|
|
5249
|
-
if (0 < U && (
|
|
5283
|
+
if (0 < U && (w === 0 || R !== 1)) return -1;
|
|
5250
5284
|
for (K[1] = 0, k = 1; k < 15; k++) K[k + 1] = K[k] + Y[k];
|
|
5251
5285
|
for (D = 0; D < c; D++) u[y + D] !== 0 && (p[K[u[y + D]]++] = D);
|
|
5252
|
-
if (B =
|
|
5286
|
+
if (B = w === 0 ? (I = st = p, 19) : w === 1 ? (I = s, V -= 257, st = o, lt -= 257, 256) : (I = l, st = g, -1), k = d, z = h, tt = D = M = 0, C = -1, S = (q = 1 << (W = J)) - 1, w === 1 && 852 < q || w === 2 && 592 < q) return 1;
|
|
5253
5287
|
for (; ; ) {
|
|
5254
|
-
for (O = k - tt, H = p[D] < B ? (
|
|
5255
|
-
for (
|
|
5256
|
-
if (
|
|
5288
|
+
for (O = k - tt, H = p[D] < B ? (T = 0, p[D]) : p[D] > B ? (T = st[lt + p[D]], I[V + p[D]]) : (T = 96, 0), b = 1 << k - tt, d = _ = 1 << W; m[z + (M >> tt) + (_ -= b)] = O << 24 | T << 16 | H | 0, _ !== 0; ) ;
|
|
5289
|
+
for (b = 1 << k - 1; M & b; ) b >>= 1;
|
|
5290
|
+
if (b !== 0 ? (M &= b - 1, M += b) : M = 0, D++, --Y[k] == 0) {
|
|
5257
5291
|
if (k === R) break;
|
|
5258
5292
|
k = u[y + p[D]];
|
|
5259
5293
|
}
|
|
5260
5294
|
if (J < k && (M & S) !== C) {
|
|
5261
5295
|
for (tt === 0 && (tt = J), z += d, U = 1 << (W = k - tt); W + tt < R && !((U -= Y[W + tt]) <= 0); ) W++, U <<= 1;
|
|
5262
|
-
if (q += 1 << W,
|
|
5296
|
+
if (q += 1 << W, w === 1 && 852 < q || w === 2 && 592 < q) return 1;
|
|
5263
5297
|
m[C = M & S] = J << 24 | W << 16 | z - h | 0;
|
|
5264
5298
|
}
|
|
5265
5299
|
}
|
|
@@ -5272,7 +5306,7 @@ function fe() {
|
|
|
5272
5306
|
function l(v) {
|
|
5273
5307
|
for (var N = v.length; 0 <= --N; ) v[N] = 0;
|
|
5274
5308
|
}
|
|
5275
|
-
var g = 0,
|
|
5309
|
+
var g = 0, w = 29, u = 256, y = u + 1 + w, c = 30, m = 19, h = 2 * y + 1, p = 15, f = 16, b = 7, _ = 256, C = 16, S = 17, z = 18, B = [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], O = [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], X = new Array(2 * (y + 2));
|
|
5276
5310
|
l(X);
|
|
5277
5311
|
var k = new Array(2 * c);
|
|
5278
5312
|
l(k);
|
|
@@ -5280,7 +5314,7 @@ function fe() {
|
|
|
5280
5314
|
l(D);
|
|
5281
5315
|
var d = new Array(256);
|
|
5282
5316
|
l(d);
|
|
5283
|
-
var R = new Array(
|
|
5317
|
+
var R = new Array(w);
|
|
5284
5318
|
l(R);
|
|
5285
5319
|
var J, W, tt, U = new Array(c);
|
|
5286
5320
|
function q(v, N, P, F, E) {
|
|
@@ -5368,16 +5402,16 @@ function fe() {
|
|
|
5368
5402
|
}
|
|
5369
5403
|
}
|
|
5370
5404
|
l(U);
|
|
5371
|
-
var
|
|
5405
|
+
var A = !1;
|
|
5372
5406
|
function x(v, N, P, F) {
|
|
5373
5407
|
Y(v, (g << 1) + (F ? 1 : 0), 3), (function(E, j, G, Z) {
|
|
5374
5408
|
nt(E), V(E, G), V(E, ~G), r.arraySet(E.pending_buf, E.window, j, G, E.pending), E.pending += G;
|
|
5375
5409
|
})(v, N, P);
|
|
5376
5410
|
}
|
|
5377
5411
|
n._tr_init = function(v) {
|
|
5378
|
-
|
|
5412
|
+
A || ((function() {
|
|
5379
5413
|
var N, P, F, E, j, G = new Array(p + 1);
|
|
5380
|
-
for (E = F = 0; E <
|
|
5414
|
+
for (E = F = 0; E < w - 1; E++) for (R[E] = F, N = 0; N < 1 << B[E]; N++) d[F++] = E;
|
|
5381
5415
|
for (d[F - 1] = E, E = j = 0; E < 16; E++) for (U[E] = j, N = 0; N < 1 << O[E]; N++) D[j++] = E;
|
|
5382
5416
|
for (j >>= 7; E < c; E++) for (U[E] = j << 7, N = 0; N < 1 << O[E] - 7; N++) D[256 + j++] = E;
|
|
5383
5417
|
for (P = 0; P <= p; P++) G[P] = 0;
|
|
@@ -5386,8 +5420,8 @@ function fe() {
|
|
|
5386
5420
|
for (; N <= 279; ) X[2 * N + 1] = 7, N++, G[7]++;
|
|
5387
5421
|
for (; N <= 287; ) X[2 * N + 1] = 8, N++, G[8]++;
|
|
5388
5422
|
for (lt(X, y + 1, G), N = 0; N < c; N++) k[2 * N + 1] = 5, k[2 * N] = st(N, 5);
|
|
5389
|
-
J = new q(X, B, u + 1, y, p), W = new q(k, O, 0, c, p), tt = new q(new Array(0),
|
|
5390
|
-
})(),
|
|
5423
|
+
J = new q(X, B, u + 1, y, p), W = new q(k, O, 0, c, p), tt = new q(new Array(0), T, 0, m, b);
|
|
5424
|
+
})(), A = !0), v.l_desc = new M(v.dyn_ltree, J), v.d_desc = new M(v.dyn_dtree, W), v.bl_desc = new M(v.bl_tree, tt), v.bi_buf = 0, v.bi_valid = 0, et(v);
|
|
5391
5425
|
}, n._tr_stored_block = x, n._tr_flush_block = function(v, N, P, F) {
|
|
5392
5426
|
var E, j, G = 0;
|
|
5393
5427
|
0 < v.level ? (v.strm.data_type === 2 && (v.strm.data_type = (function(Z) {
|
|
@@ -5420,10 +5454,10 @@ function fe() {
|
|
|
5420
5454
|
(function(r) {
|
|
5421
5455
|
(function(s, o) {
|
|
5422
5456
|
if (!s.setImmediate) {
|
|
5423
|
-
var l, g,
|
|
5457
|
+
var l, g, w, u, y = 1, c = {}, m = !1, h = s.document, p = Object.getPrototypeOf && Object.getPrototypeOf(s);
|
|
5424
5458
|
p = p && p.setTimeout ? p : s, l = {}.toString.call(s.process) === "[object process]" ? function(C) {
|
|
5425
5459
|
process.nextTick(function() {
|
|
5426
|
-
|
|
5460
|
+
b(C);
|
|
5427
5461
|
});
|
|
5428
5462
|
} : (function() {
|
|
5429
5463
|
if (s.postMessage && !s.importScripts) {
|
|
@@ -5434,17 +5468,17 @@ function fe() {
|
|
|
5434
5468
|
}
|
|
5435
5469
|
})() ? (u = "setImmediate$" + Math.random() + "$", s.addEventListener ? s.addEventListener("message", _, !1) : s.attachEvent("onmessage", _), function(C) {
|
|
5436
5470
|
s.postMessage(u + C, "*");
|
|
5437
|
-
}) : s.MessageChannel ? ((
|
|
5438
|
-
|
|
5471
|
+
}) : s.MessageChannel ? ((w = new MessageChannel()).port1.onmessage = function(C) {
|
|
5472
|
+
b(C.data);
|
|
5439
5473
|
}, function(C) {
|
|
5440
|
-
|
|
5474
|
+
w.port2.postMessage(C);
|
|
5441
5475
|
}) : h && "onreadystatechange" in h.createElement("script") ? (g = h.documentElement, function(C) {
|
|
5442
5476
|
var S = h.createElement("script");
|
|
5443
5477
|
S.onreadystatechange = function() {
|
|
5444
|
-
|
|
5478
|
+
b(C), S.onreadystatechange = null, g.removeChild(S), S = null;
|
|
5445
5479
|
}, g.appendChild(S);
|
|
5446
5480
|
}) : function(C) {
|
|
5447
|
-
setTimeout(
|
|
5481
|
+
setTimeout(b, 0, C);
|
|
5448
5482
|
}, p.setImmediate = function(C) {
|
|
5449
5483
|
typeof C != "function" && (C = new Function("" + C));
|
|
5450
5484
|
for (var S = new Array(arguments.length - 1), z = 0; z < S.length; z++) S[z] = arguments[z + 1];
|
|
@@ -5455,8 +5489,8 @@ function fe() {
|
|
|
5455
5489
|
function f(C) {
|
|
5456
5490
|
delete c[C];
|
|
5457
5491
|
}
|
|
5458
|
-
function
|
|
5459
|
-
if (m) setTimeout(
|
|
5492
|
+
function b(C) {
|
|
5493
|
+
if (m) setTimeout(b, 0, C);
|
|
5460
5494
|
else {
|
|
5461
5495
|
var S = c[C];
|
|
5462
5496
|
if (S) {
|
|
@@ -5488,7 +5522,7 @@ function fe() {
|
|
|
5488
5522
|
}
|
|
5489
5523
|
}
|
|
5490
5524
|
function _(C) {
|
|
5491
|
-
C.source === s && typeof C.data == "string" && C.data.indexOf(u) === 0 &&
|
|
5525
|
+
C.source === s && typeof C.data == "string" && C.data.indexOf(u) === 0 && b(+C.data.slice(u.length));
|
|
5492
5526
|
}
|
|
5493
5527
|
})(typeof self > "u" ? r === void 0 ? this : r : self);
|
|
5494
5528
|
}).call(this, typeof St < "u" ? St : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -5538,9 +5572,9 @@ class Rt {
|
|
|
5538
5572
|
if (t.image && t.image.src && t.image.src.startsWith("xap:")) {
|
|
5539
5573
|
const o = t.image.src.substring(4), l = e.file(o);
|
|
5540
5574
|
if (l) {
|
|
5541
|
-
const g = await l.async("base64"),
|
|
5575
|
+
const g = await l.async("base64"), w = o.split(".").pop()?.toLowerCase();
|
|
5542
5576
|
let u = "image/png";
|
|
5543
|
-
|
|
5577
|
+
w === "jpg" || w === "jpeg" ? u = "image/jpeg" : w === "svg" ? u = "image/svg+xml" : w === "gif" && (u = "image/gif"), s = `data:${u};base64,${g}`;
|
|
5544
5578
|
}
|
|
5545
5579
|
}
|
|
5546
5580
|
if (t.title && s) {
|
|
@@ -5581,10 +5615,10 @@ class ge {
|
|
|
5581
5615
|
this.mindMap = t.mindMap, this.renderer = t.renderer, this.eventBus = t.eventBus, this.fileHandler = t.fileHandler;
|
|
5582
5616
|
}
|
|
5583
5617
|
async exportPng() {
|
|
5584
|
-
this.eventBus.emit("command", { name: "exportPng" }), await new
|
|
5618
|
+
this.eventBus.emit("command", { name: "exportPng" }), await new Tt().exportToPng(this.renderer.container, this.fileHandler);
|
|
5585
5619
|
}
|
|
5586
5620
|
async exportSvg() {
|
|
5587
|
-
this.eventBus.emit("command", { name: "exportSvg" }), await new
|
|
5621
|
+
this.eventBus.emit("command", { name: "exportSvg" }), await new Tt().exportToSvg(this.renderer.container, this.fileHandler);
|
|
5588
5622
|
}
|
|
5589
5623
|
async exportMarkdown() {
|
|
5590
5624
|
this.eventBus.emit("command", { name: "exportMarkdown" }), await new he().export(this.mindMap, this.fileHandler);
|
|
@@ -5751,7 +5785,7 @@ class be extends ve {
|
|
|
5751
5785
|
renderer: y,
|
|
5752
5786
|
eventBus: p,
|
|
5753
5787
|
fileHandler: e.fileHandler
|
|
5754
|
-
}),
|
|
5788
|
+
}), b = new ye({
|
|
5755
5789
|
mindMap: this.mindMap,
|
|
5756
5790
|
service: r,
|
|
5757
5791
|
renderer: y,
|
|
@@ -5769,7 +5803,7 @@ class be extends ve {
|
|
|
5769
5803
|
viewportService: m,
|
|
5770
5804
|
navigationService: h,
|
|
5771
5805
|
fileIOService: f,
|
|
5772
|
-
themeService:
|
|
5806
|
+
themeService: b,
|
|
5773
5807
|
commandBus: _,
|
|
5774
5808
|
locale: e.locale || c,
|
|
5775
5809
|
commandPaletteFeatures: e.disabledCommandPaletteFeatures
|
|
@@ -5996,7 +6030,7 @@ class be extends ve {
|
|
|
5996
6030
|
export {
|
|
5997
6031
|
be as Kakidash,
|
|
5998
6032
|
gt as Node,
|
|
5999
|
-
|
|
6033
|
+
At as SvgGenerator,
|
|
6000
6034
|
ve as TypedEventEmitter,
|
|
6001
6035
|
Rt as XMindImporter
|
|
6002
6036
|
};
|