document-model 1.0.15 → 1.0.17
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/browser/document/actions/creators.d.ts +1 -1
- package/dist/browser/document/actions/index.d.ts +8 -8
- package/dist/browser/document/object.d.ts +123 -99
- package/dist/browser/document/reducer.d.ts +1 -1
- package/dist/browser/document/schema/types.d.ts +5 -0
- package/dist/browser/document/schema/zod.d.ts +39 -0
- package/dist/browser/document/types.d.ts +41 -31
- package/dist/browser/document/utils/base.d.ts +6 -6
- package/dist/browser/document/utils/file.d.ts +2 -2
- package/dist/browser/document-model/gen/object.d.ts +1 -1
- package/dist/browser/document-model/gen/reducer.d.ts +1 -1
- package/dist/browser/document-model/gen/schema/types.d.ts +13 -3
- package/dist/browser/document-model/gen/schema/zod.d.ts +20 -1
- package/dist/browser/document-model/index.d.ts +9 -9
- package/dist/browser/document-model.cjs +1 -1
- package/dist/browser/document-model.js +2 -2
- package/dist/browser/document.cjs +1 -1
- package/dist/browser/document.js +2 -2
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +3 -3
- package/dist/browser/internal/index-01030c3f.js +22 -0
- package/dist/{node/internal/index-c9d178be.js → browser/internal/index-2aee8ea9.js} +1 -1
- package/dist/browser/internal/{index-8142b58e.js → index-5f1909ad.js} +513 -435
- package/dist/{node/internal/index-0b0cb8c2.js → browser/internal/index-a1282d5c.js} +1 -1
- package/dist/browser/internal/object-24df9d92.js +6 -0
- package/dist/browser/internal/{object-4ec03a36.js → object-7e8eaff4.js} +777 -731
- package/dist/node/document/actions/creators.d.ts +1 -1
- package/dist/node/document/actions/index.d.ts +8 -8
- package/dist/node/document/object.d.ts +123 -99
- package/dist/node/document/reducer.d.ts +1 -1
- package/dist/node/document/schema/types.d.ts +5 -0
- package/dist/node/document/schema/zod.d.ts +39 -0
- package/dist/node/document/types.d.ts +41 -31
- package/dist/node/document/utils/base.d.ts +6 -6
- package/dist/node/document/utils/file.d.ts +2 -2
- package/dist/node/document-model/gen/object.d.ts +1 -1
- package/dist/node/document-model/gen/reducer.d.ts +1 -1
- package/dist/node/document-model/gen/schema/types.d.ts +13 -3
- package/dist/node/document-model/gen/schema/zod.d.ts +20 -1
- package/dist/node/document-model/index.d.ts +9 -9
- package/dist/node/document-model.cjs +1 -1
- package/dist/node/document-model.js +2 -2
- package/dist/node/document.cjs +1 -1
- package/dist/node/document.js +2 -2
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.js +3 -3
- package/dist/node/internal/{index-0c87fbed.js → index-0db636da.js} +513 -435
- package/dist/{browser/internal/index-cb990484.js → node/internal/index-2d4783d9.js} +1 -1
- package/dist/{browser/internal/index-9f1cf811.js → node/internal/index-5ef0c6b0.js} +1 -1
- package/dist/node/internal/index-cddc9dfd.js +22 -0
- package/dist/node/internal/object-21f3d2ee.js +1 -0
- package/dist/node/internal/{object-89d9b82f.js → object-c32ea0a0.js} +400 -356
- package/package.json +3 -3
- package/dist/browser/internal/index-cbe39f72.js +0 -22
- package/dist/browser/internal/object-5f03095e.js +0 -6
- package/dist/node/internal/index-63db4708.js +0 -22
- package/dist/node/internal/object-397a9b23.js +0 -1
|
@@ -1,142 +1,153 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var q = (
|
|
4
|
-
import
|
|
5
|
-
import { produce as
|
|
6
|
-
import
|
|
7
|
-
import { z as
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
return
|
|
11
|
-
__typename:
|
|
12
|
-
type:
|
|
1
|
+
var yr = Object.defineProperty;
|
|
2
|
+
var vr = (e, a, s) => a in e ? yr(e, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[a] = s;
|
|
3
|
+
var q = (e, a, s) => (vr(e, typeof a != "symbol" ? a + "" : a, s), s);
|
|
4
|
+
import br from "json-stringify-deterministic";
|
|
5
|
+
import { produce as bt, castDraft as Er, castImmutable as _r, freeze as Fr } from "immer";
|
|
6
|
+
import At from "jszip";
|
|
7
|
+
import { z as g } from "zod";
|
|
8
|
+
const St = (e) => e != null, Ar = g.any().refine((e) => St(e)), Bt = g.enum(["LOAD_STATE"]), jt = g.enum(["PRUNE"]), It = g.enum(["REDO"]), Ut = g.enum(["SET_NAME"]), kt = g.enum(["UNDO"]);
|
|
9
|
+
function Sr() {
|
|
10
|
+
return g.object({
|
|
11
|
+
__typename: g.literal("Action").optional(),
|
|
12
|
+
type: g.string()
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
function Tt() {
|
|
16
|
+
return g.union([
|
|
17
|
+
Dt(),
|
|
18
|
+
Nt(),
|
|
19
|
+
Mt(),
|
|
20
|
+
Ct(),
|
|
21
|
+
Rt()
|
|
22
22
|
]);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
26
|
-
__typename:
|
|
27
|
-
data:
|
|
28
|
-
extension:
|
|
29
|
-
fileName:
|
|
30
|
-
mimeType:
|
|
24
|
+
function Br() {
|
|
25
|
+
return g.object({
|
|
26
|
+
__typename: g.literal("DocumentFile").optional(),
|
|
27
|
+
data: g.string(),
|
|
28
|
+
extension: g.string().nullable(),
|
|
29
|
+
fileName: g.string().nullable(),
|
|
30
|
+
mimeType: g.string()
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
35
|
-
input:
|
|
36
|
-
type: Bt
|
|
33
|
+
function Dt() {
|
|
34
|
+
return g.object({
|
|
35
|
+
input: g.lazy(() => it()),
|
|
36
|
+
type: Bt,
|
|
37
|
+
scope: g.literal("global")
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
41
|
-
operations:
|
|
42
|
-
state:
|
|
40
|
+
function it() {
|
|
41
|
+
return g.object({
|
|
42
|
+
operations: g.number(),
|
|
43
|
+
state: g.lazy(() => Ot())
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
return
|
|
47
|
-
data:
|
|
48
|
-
name:
|
|
46
|
+
function Ot() {
|
|
47
|
+
return g.object({
|
|
48
|
+
data: g.unknown().nullish(),
|
|
49
|
+
name: g.string()
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
53
|
-
__typename:
|
|
54
|
-
hash:
|
|
55
|
-
index:
|
|
56
|
-
timestamp:
|
|
57
|
-
type:
|
|
52
|
+
function jr() {
|
|
53
|
+
return g.object({
|
|
54
|
+
__typename: g.literal("Operation").optional(),
|
|
55
|
+
hash: g.string(),
|
|
56
|
+
index: g.number(),
|
|
57
|
+
timestamp: g.string().datetime(),
|
|
58
|
+
type: g.string()
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
-
return
|
|
62
|
-
input:
|
|
63
|
-
type:
|
|
61
|
+
function Nt() {
|
|
62
|
+
return g.object({
|
|
63
|
+
input: g.lazy(() => et()),
|
|
64
|
+
type: jt,
|
|
65
|
+
scope: g.literal("global")
|
|
64
66
|
});
|
|
65
67
|
}
|
|
66
|
-
function
|
|
67
|
-
return
|
|
68
|
-
end:
|
|
69
|
-
start:
|
|
68
|
+
function et() {
|
|
69
|
+
return g.object({
|
|
70
|
+
end: g.number().nullish(),
|
|
71
|
+
start: g.number().nullish()
|
|
70
72
|
});
|
|
71
73
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
const nt = g.number;
|
|
75
|
+
function Mt() {
|
|
76
|
+
return g.object({
|
|
77
|
+
input: nt(),
|
|
78
|
+
type: It,
|
|
79
|
+
scope: g.literal("global")
|
|
76
80
|
});
|
|
77
81
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
const at = g.string;
|
|
83
|
+
function Ct() {
|
|
84
|
+
return g.object({
|
|
85
|
+
input: at(),
|
|
86
|
+
type: Ut,
|
|
87
|
+
scope: g.literal("global")
|
|
82
88
|
});
|
|
83
89
|
}
|
|
84
|
-
function
|
|
85
|
-
return
|
|
86
|
-
__typename:
|
|
87
|
-
hash:
|
|
88
|
-
index:
|
|
89
|
-
input:
|
|
90
|
-
timestamp:
|
|
91
|
-
type:
|
|
90
|
+
function Ir() {
|
|
91
|
+
return g.object({
|
|
92
|
+
__typename: g.literal("SetNameOperation").optional(),
|
|
93
|
+
hash: g.string(),
|
|
94
|
+
index: g.number(),
|
|
95
|
+
input: g.string(),
|
|
96
|
+
timestamp: g.string().datetime(),
|
|
97
|
+
type: g.string()
|
|
92
98
|
});
|
|
93
99
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
100
|
+
const ot = g.number;
|
|
101
|
+
function Rt() {
|
|
102
|
+
return g.object({
|
|
103
|
+
input: ot(),
|
|
104
|
+
type: kt,
|
|
105
|
+
scope: g.literal("global")
|
|
98
106
|
});
|
|
99
107
|
}
|
|
100
|
-
const
|
|
108
|
+
const Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
101
109
|
__proto__: null,
|
|
102
|
-
ActionSchema:
|
|
103
|
-
BaseActionSchema:
|
|
104
|
-
DocumentFileSchema:
|
|
105
|
-
LoadStateActionInputSchema:
|
|
106
|
-
LoadStateActionSchema:
|
|
107
|
-
LoadStateActionStateInputSchema:
|
|
110
|
+
ActionSchema: Sr,
|
|
111
|
+
BaseActionSchema: Tt,
|
|
112
|
+
DocumentFileSchema: Br,
|
|
113
|
+
LoadStateActionInputSchema: it,
|
|
114
|
+
LoadStateActionSchema: Dt,
|
|
115
|
+
LoadStateActionStateInputSchema: Ot,
|
|
108
116
|
Load_StateSchema: Bt,
|
|
109
|
-
OperationSchema:
|
|
110
|
-
PruneActionInputSchema:
|
|
111
|
-
PruneActionSchema:
|
|
112
|
-
PruneSchema:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
OperationSchema: jr,
|
|
118
|
+
PruneActionInputSchema: et,
|
|
119
|
+
PruneActionSchema: Nt,
|
|
120
|
+
PruneSchema: jt,
|
|
121
|
+
RedoActionInputSchema: nt,
|
|
122
|
+
RedoActionSchema: Mt,
|
|
123
|
+
RedoSchema: It,
|
|
124
|
+
SetNameActionInputSchema: at,
|
|
125
|
+
SetNameActionSchema: Ct,
|
|
126
|
+
SetNameOperationSchema: Ir,
|
|
117
127
|
Set_NameSchema: Ut,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
128
|
+
UndoActionInputSchema: ot,
|
|
129
|
+
UndoActionSchema: Rt,
|
|
130
|
+
UndoSchema: kt,
|
|
131
|
+
definedNonNullAnySchema: Ar,
|
|
132
|
+
isDefinedNonNullAny: St
|
|
122
133
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
123
|
-
function
|
|
124
|
-
return
|
|
134
|
+
function Lt(e) {
|
|
135
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
125
136
|
}
|
|
126
137
|
function P() {
|
|
127
138
|
this._types = /* @__PURE__ */ Object.create(null), this._extensions = /* @__PURE__ */ Object.create(null);
|
|
128
|
-
for (let
|
|
129
|
-
this.define(arguments[
|
|
139
|
+
for (let e = 0; e < arguments.length; e++)
|
|
140
|
+
this.define(arguments[e]);
|
|
130
141
|
this.define = this.define.bind(this), this.getType = this.getType.bind(this), this.getExtension = this.getExtension.bind(this);
|
|
131
142
|
}
|
|
132
|
-
P.prototype.define = function(
|
|
133
|
-
for (let s in
|
|
134
|
-
let
|
|
143
|
+
P.prototype.define = function(e, a) {
|
|
144
|
+
for (let s in e) {
|
|
145
|
+
let l = e[s].map(function(f) {
|
|
135
146
|
return f.toLowerCase();
|
|
136
147
|
});
|
|
137
148
|
s = s.toLowerCase();
|
|
138
|
-
for (let f = 0; f <
|
|
139
|
-
const h =
|
|
149
|
+
for (let f = 0; f < l.length; f++) {
|
|
150
|
+
const h = l[f];
|
|
140
151
|
if (h[0] !== "*") {
|
|
141
152
|
if (!a && h in this._types)
|
|
142
153
|
throw new Error(
|
|
@@ -146,23 +157,23 @@ P.prototype.define = function(n, a) {
|
|
|
146
157
|
}
|
|
147
158
|
}
|
|
148
159
|
if (a || !this._extensions[s]) {
|
|
149
|
-
const f =
|
|
160
|
+
const f = l[0];
|
|
150
161
|
this._extensions[s] = f[0] !== "*" ? f : f.substr(1);
|
|
151
162
|
}
|
|
152
163
|
}
|
|
153
164
|
};
|
|
154
|
-
P.prototype.getType = function(
|
|
155
|
-
|
|
156
|
-
let a =
|
|
157
|
-
return (s.length < a.length - 1 || !
|
|
165
|
+
P.prototype.getType = function(e) {
|
|
166
|
+
e = String(e);
|
|
167
|
+
let a = e.replace(/^.*[/\\]/, "").toLowerCase(), s = a.replace(/^.*\./, "").toLowerCase(), l = a.length < e.length;
|
|
168
|
+
return (s.length < a.length - 1 || !l) && this._types[s] || null;
|
|
158
169
|
};
|
|
159
|
-
P.prototype.getExtension = function(
|
|
160
|
-
return
|
|
170
|
+
P.prototype.getExtension = function(e) {
|
|
171
|
+
return e = /^\s*([^;\s]*)/.test(e) && RegExp.$1, e && this._extensions[e.toLowerCase()] || null;
|
|
161
172
|
};
|
|
162
|
-
var Br = P, Sr = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
|
|
163
|
-
let
|
|
164
|
-
var
|
|
165
|
-
const
|
|
173
|
+
var Ur = P, kr = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
|
|
174
|
+
let Tr = Ur;
|
|
175
|
+
var Dr = new Tr(kr);
|
|
176
|
+
const Or = /* @__PURE__ */ Lt(Dr);
|
|
166
177
|
var tt = { exports: {} };
|
|
167
178
|
typeof Object.create == "function" ? tt.exports = function(a, s) {
|
|
168
179
|
s && (a.super_ = s, a.prototype = Object.create(s.prototype, {
|
|
@@ -176,83 +187,83 @@ typeof Object.create == "function" ? tt.exports = function(a, s) {
|
|
|
176
187
|
} : tt.exports = function(a, s) {
|
|
177
188
|
if (s) {
|
|
178
189
|
a.super_ = s;
|
|
179
|
-
var
|
|
190
|
+
var l = function() {
|
|
180
191
|
};
|
|
181
|
-
|
|
192
|
+
l.prototype = s.prototype, a.prototype = new l(), a.prototype.constructor = a;
|
|
182
193
|
}
|
|
183
194
|
};
|
|
184
|
-
var
|
|
185
|
-
W.byteLength =
|
|
186
|
-
W.toByteArray =
|
|
187
|
-
W.fromByteArray =
|
|
188
|
-
var k = [], j = [],
|
|
189
|
-
for (var D = 0,
|
|
195
|
+
var Nr = tt.exports, rt = { exports: {} }, zt = {}, W = {};
|
|
196
|
+
W.byteLength = Rr;
|
|
197
|
+
W.toByteArray = zr;
|
|
198
|
+
W.fromByteArray = Jr;
|
|
199
|
+
var k = [], j = [], Mr = typeof Uint8Array < "u" ? Uint8Array : Array, Q = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
200
|
+
for (var D = 0, Cr = Q.length; D < Cr; ++D)
|
|
190
201
|
k[D] = Q[D], j[Q.charCodeAt(D)] = D;
|
|
191
202
|
j["-".charCodeAt(0)] = 62;
|
|
192
203
|
j["_".charCodeAt(0)] = 63;
|
|
193
|
-
function
|
|
194
|
-
var a =
|
|
204
|
+
function qt(e) {
|
|
205
|
+
var a = e.length;
|
|
195
206
|
if (a % 4 > 0)
|
|
196
207
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
197
|
-
var s =
|
|
208
|
+
var s = e.indexOf("=");
|
|
198
209
|
s === -1 && (s = a);
|
|
199
|
-
var
|
|
200
|
-
return [s,
|
|
210
|
+
var l = s === a ? 0 : 4 - s % 4;
|
|
211
|
+
return [s, l];
|
|
201
212
|
}
|
|
202
|
-
function
|
|
203
|
-
var a =
|
|
204
|
-
return (s +
|
|
213
|
+
function Rr(e) {
|
|
214
|
+
var a = qt(e), s = a[0], l = a[1];
|
|
215
|
+
return (s + l) * 3 / 4 - l;
|
|
205
216
|
}
|
|
206
|
-
function
|
|
217
|
+
function Lr(e, a, s) {
|
|
207
218
|
return (a + s) * 3 / 4 - s;
|
|
208
219
|
}
|
|
209
|
-
function
|
|
210
|
-
var a, s =
|
|
220
|
+
function zr(e) {
|
|
221
|
+
var a, s = qt(e), l = s[0], f = s[1], h = new Mr(Lr(e, l, f)), c = 0, o = f > 0 ? l - 4 : l, x;
|
|
211
222
|
for (x = 0; x < o; x += 4)
|
|
212
|
-
a = j[
|
|
213
|
-
return f === 2 && (a = j[
|
|
223
|
+
a = j[e.charCodeAt(x)] << 18 | j[e.charCodeAt(x + 1)] << 12 | j[e.charCodeAt(x + 2)] << 6 | j[e.charCodeAt(x + 3)], h[c++] = a >> 16 & 255, h[c++] = a >> 8 & 255, h[c++] = a & 255;
|
|
224
|
+
return f === 2 && (a = j[e.charCodeAt(x)] << 2 | j[e.charCodeAt(x + 1)] >> 4, h[c++] = a & 255), f === 1 && (a = j[e.charCodeAt(x)] << 10 | j[e.charCodeAt(x + 1)] << 4 | j[e.charCodeAt(x + 2)] >> 2, h[c++] = a >> 8 & 255, h[c++] = a & 255), h;
|
|
214
225
|
}
|
|
215
|
-
function
|
|
216
|
-
return k[
|
|
226
|
+
function qr(e) {
|
|
227
|
+
return k[e >> 18 & 63] + k[e >> 12 & 63] + k[e >> 6 & 63] + k[e & 63];
|
|
217
228
|
}
|
|
218
|
-
function
|
|
219
|
-
for (var
|
|
220
|
-
|
|
229
|
+
function $r(e, a, s) {
|
|
230
|
+
for (var l, f = [], h = a; h < s; h += 3)
|
|
231
|
+
l = (e[h] << 16 & 16711680) + (e[h + 1] << 8 & 65280) + (e[h + 2] & 255), f.push(qr(l));
|
|
221
232
|
return f.join("");
|
|
222
233
|
}
|
|
223
|
-
function
|
|
224
|
-
for (var a, s =
|
|
225
|
-
f.push(
|
|
226
|
-
return
|
|
234
|
+
function Jr(e) {
|
|
235
|
+
for (var a, s = e.length, l = s % 3, f = [], h = 16383, c = 0, o = s - l; c < o; c += h)
|
|
236
|
+
f.push($r(e, c, c + h > o ? o : c + h));
|
|
237
|
+
return l === 1 ? (a = e[s - 1], f.push(
|
|
227
238
|
k[a >> 2] + k[a << 4 & 63] + "=="
|
|
228
|
-
)) :
|
|
239
|
+
)) : l === 2 && (a = (e[s - 2] << 8) + e[s - 1], f.push(
|
|
229
240
|
k[a >> 10] + k[a >> 4 & 63] + k[a << 2 & 63] + "="
|
|
230
241
|
)), f.join("");
|
|
231
242
|
}
|
|
232
243
|
var pt = {};
|
|
233
244
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
234
|
-
pt.read = function(
|
|
235
|
-
var h,
|
|
236
|
-
for (_ +=
|
|
245
|
+
pt.read = function(e, a, s, l, f) {
|
|
246
|
+
var h, c, o = f * 8 - l - 1, x = (1 << o) - 1, w = x >> 1, y = -7, _ = s ? f - 1 : 0, I = s ? -1 : 1, S = e[a + _];
|
|
247
|
+
for (_ += I, h = S & (1 << -y) - 1, S >>= -y, y += o; y > 0; h = h * 256 + e[a + _], _ += I, y -= 8)
|
|
237
248
|
;
|
|
238
|
-
for (
|
|
249
|
+
for (c = h & (1 << -y) - 1, h >>= -y, y += l; y > 0; c = c * 256 + e[a + _], _ += I, y -= 8)
|
|
239
250
|
;
|
|
240
251
|
if (h === 0)
|
|
241
|
-
h = 1 -
|
|
252
|
+
h = 1 - w;
|
|
242
253
|
else {
|
|
243
254
|
if (h === x)
|
|
244
|
-
return
|
|
245
|
-
|
|
255
|
+
return c ? NaN : (S ? -1 : 1) * (1 / 0);
|
|
256
|
+
c = c + Math.pow(2, l), h = h - w;
|
|
246
257
|
}
|
|
247
|
-
return (
|
|
258
|
+
return (S ? -1 : 1) * c * Math.pow(2, h - l);
|
|
248
259
|
};
|
|
249
|
-
pt.write = function(
|
|
250
|
-
var
|
|
251
|
-
for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (o = isNaN(a) ? 1 : 0,
|
|
260
|
+
pt.write = function(e, a, s, l, f, h) {
|
|
261
|
+
var c, o, x, w = h * 8 - f - 1, y = (1 << w) - 1, _ = y >> 1, I = f === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, S = l ? 0 : h - 1, O = l ? 1 : -1, N = a < 0 || a === 0 && 1 / a < 0 ? 1 : 0;
|
|
262
|
+
for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (o = isNaN(a) ? 1 : 0, c = y) : (c = Math.floor(Math.log(a) / Math.LN2), a * (x = Math.pow(2, -c)) < 1 && (c--, x *= 2), c + _ >= 1 ? a += I / x : a += I * Math.pow(2, 1 - _), a * x >= 2 && (c++, x /= 2), c + _ >= y ? (o = 0, c = y) : c + _ >= 1 ? (o = (a * x - 1) * Math.pow(2, f), c = c + _) : (o = a * Math.pow(2, _ - 1) * Math.pow(2, f), c = 0)); f >= 8; e[s + S] = o & 255, S += O, o /= 256, f -= 8)
|
|
252
263
|
;
|
|
253
|
-
for (
|
|
264
|
+
for (c = c << f | o, w += f; w > 0; e[s + S] = c & 255, S += O, c /= 256, w -= 8)
|
|
254
265
|
;
|
|
255
|
-
|
|
266
|
+
e[s + S - O] |= N * 128;
|
|
256
267
|
};
|
|
257
268
|
/*!
|
|
258
269
|
* The buffer module from node.js, for the browser.
|
|
@@ -260,11 +271,11 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
260
271
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
261
272
|
* @license MIT
|
|
262
273
|
*/
|
|
263
|
-
(function(
|
|
264
|
-
var a = W, s = pt,
|
|
265
|
-
|
|
274
|
+
(function(e) {
|
|
275
|
+
var a = W, s = pt, l = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
276
|
+
e.Buffer = o, e.SlowBuffer = rr, e.INSPECT_MAX_BYTES = 50;
|
|
266
277
|
var f = 2147483647;
|
|
267
|
-
|
|
278
|
+
e.kMaxLength = f, o.TYPED_ARRAY_SUPPORT = h(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
268
279
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
269
280
|
);
|
|
270
281
|
function h() {
|
|
@@ -290,7 +301,7 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
290
301
|
return this.byteOffset;
|
|
291
302
|
}
|
|
292
303
|
});
|
|
293
|
-
function
|
|
304
|
+
function c(i) {
|
|
294
305
|
if (i > f)
|
|
295
306
|
throw new RangeError('The value "' + i + '" is invalid for option "size"');
|
|
296
307
|
var t = new Uint8Array(i);
|
|
@@ -309,23 +320,23 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
309
320
|
o.poolSize = 8192;
|
|
310
321
|
function x(i, t, r) {
|
|
311
322
|
if (typeof i == "string")
|
|
312
|
-
return
|
|
323
|
+
return I(i, t);
|
|
313
324
|
if (ArrayBuffer.isView(i))
|
|
314
325
|
return O(i);
|
|
315
326
|
if (i == null)
|
|
316
327
|
throw new TypeError(
|
|
317
328
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof i
|
|
318
329
|
);
|
|
319
|
-
if (
|
|
330
|
+
if (U(i, ArrayBuffer) || i && U(i.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (U(i, SharedArrayBuffer) || i && U(i.buffer, SharedArrayBuffer)))
|
|
320
331
|
return N(i, t, r);
|
|
321
332
|
if (typeof i == "number")
|
|
322
333
|
throw new TypeError(
|
|
323
334
|
'The "value" argument must not be of type number. Received type number'
|
|
324
335
|
);
|
|
325
|
-
var
|
|
326
|
-
if (
|
|
327
|
-
return o.from(
|
|
328
|
-
var p =
|
|
336
|
+
var n = i.valueOf && i.valueOf();
|
|
337
|
+
if (n != null && n !== i)
|
|
338
|
+
return o.from(n, t, r);
|
|
339
|
+
var p = tr(i);
|
|
329
340
|
if (p)
|
|
330
341
|
return p;
|
|
331
342
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof i[Symbol.toPrimitive] == "function")
|
|
@@ -341,85 +352,85 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
341
352
|
o.from = function(i, t, r) {
|
|
342
353
|
return x(i, t, r);
|
|
343
354
|
}, Object.setPrototypeOf(o.prototype, Uint8Array.prototype), Object.setPrototypeOf(o, Uint8Array);
|
|
344
|
-
function
|
|
355
|
+
function w(i) {
|
|
345
356
|
if (typeof i != "number")
|
|
346
357
|
throw new TypeError('"size" argument must be of type number');
|
|
347
358
|
if (i < 0)
|
|
348
359
|
throw new RangeError('The value "' + i + '" is invalid for option "size"');
|
|
349
360
|
}
|
|
350
|
-
function
|
|
351
|
-
return
|
|
361
|
+
function y(i, t, r) {
|
|
362
|
+
return w(i), i <= 0 ? c(i) : t !== void 0 ? typeof r == "string" ? c(i).fill(t, r) : c(i).fill(t) : c(i);
|
|
352
363
|
}
|
|
353
364
|
o.alloc = function(i, t, r) {
|
|
354
|
-
return
|
|
365
|
+
return y(i, t, r);
|
|
355
366
|
};
|
|
356
367
|
function _(i) {
|
|
357
|
-
return
|
|
368
|
+
return w(i), c(i < 0 ? 0 : X(i) | 0);
|
|
358
369
|
}
|
|
359
370
|
o.allocUnsafe = function(i) {
|
|
360
371
|
return _(i);
|
|
361
372
|
}, o.allocUnsafeSlow = function(i) {
|
|
362
373
|
return _(i);
|
|
363
374
|
};
|
|
364
|
-
function
|
|
375
|
+
function I(i, t) {
|
|
365
376
|
if ((typeof t != "string" || t === "") && (t = "utf8"), !o.isEncoding(t))
|
|
366
377
|
throw new TypeError("Unknown encoding: " + t);
|
|
367
|
-
var r =
|
|
368
|
-
return p !== r && (
|
|
378
|
+
var r = ct(i, t) | 0, n = c(r), p = n.write(i, t);
|
|
379
|
+
return p !== r && (n = n.slice(0, p)), n;
|
|
369
380
|
}
|
|
370
|
-
function
|
|
371
|
-
for (var t = i.length < 0 ? 0 : X(i.length) | 0, r =
|
|
372
|
-
r[
|
|
381
|
+
function S(i) {
|
|
382
|
+
for (var t = i.length < 0 ? 0 : X(i.length) | 0, r = c(t), n = 0; n < t; n += 1)
|
|
383
|
+
r[n] = i[n] & 255;
|
|
373
384
|
return r;
|
|
374
385
|
}
|
|
375
386
|
function O(i) {
|
|
376
|
-
if (
|
|
387
|
+
if (U(i, Uint8Array)) {
|
|
377
388
|
var t = new Uint8Array(i);
|
|
378
389
|
return N(t.buffer, t.byteOffset, t.byteLength);
|
|
379
390
|
}
|
|
380
|
-
return
|
|
391
|
+
return S(i);
|
|
381
392
|
}
|
|
382
393
|
function N(i, t, r) {
|
|
383
394
|
if (t < 0 || i.byteLength < t)
|
|
384
395
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
385
396
|
if (i.byteLength < t + (r || 0))
|
|
386
397
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
387
|
-
var
|
|
388
|
-
return t === void 0 && r === void 0 ?
|
|
398
|
+
var n;
|
|
399
|
+
return t === void 0 && r === void 0 ? n = new Uint8Array(i) : r === void 0 ? n = new Uint8Array(i, t) : n = new Uint8Array(i, t, r), Object.setPrototypeOf(n, o.prototype), n;
|
|
389
400
|
}
|
|
390
|
-
function
|
|
401
|
+
function tr(i) {
|
|
391
402
|
if (o.isBuffer(i)) {
|
|
392
|
-
var t = X(i.length) | 0, r =
|
|
403
|
+
var t = X(i.length) | 0, r = c(t);
|
|
393
404
|
return r.length === 0 || i.copy(r, 0, 0, t), r;
|
|
394
405
|
}
|
|
395
406
|
if (i.length !== void 0)
|
|
396
|
-
return typeof i.length != "number" || V(i.length) ?
|
|
407
|
+
return typeof i.length != "number" || V(i.length) ? c(0) : S(i);
|
|
397
408
|
if (i.type === "Buffer" && Array.isArray(i.data))
|
|
398
|
-
return
|
|
409
|
+
return S(i.data);
|
|
399
410
|
}
|
|
400
411
|
function X(i) {
|
|
401
412
|
if (i >= f)
|
|
402
413
|
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + f.toString(16) + " bytes");
|
|
403
414
|
return i | 0;
|
|
404
415
|
}
|
|
405
|
-
function
|
|
416
|
+
function rr(i) {
|
|
406
417
|
return +i != i && (i = 0), o.alloc(+i);
|
|
407
418
|
}
|
|
408
419
|
o.isBuffer = function(t) {
|
|
409
420
|
return t != null && t._isBuffer === !0 && t !== o.prototype;
|
|
410
421
|
}, o.compare = function(t, r) {
|
|
411
|
-
if (
|
|
422
|
+
if (U(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), U(r, Uint8Array) && (r = o.from(r, r.offset, r.byteLength)), !o.isBuffer(t) || !o.isBuffer(r))
|
|
412
423
|
throw new TypeError(
|
|
413
424
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
414
425
|
);
|
|
415
426
|
if (t === r)
|
|
416
427
|
return 0;
|
|
417
|
-
for (var
|
|
418
|
-
if (t[
|
|
419
|
-
|
|
428
|
+
for (var n = t.length, p = r.length, u = 0, m = Math.min(n, p); u < m; ++u)
|
|
429
|
+
if (t[u] !== r[u]) {
|
|
430
|
+
n = t[u], p = r[u];
|
|
420
431
|
break;
|
|
421
432
|
}
|
|
422
|
-
return
|
|
433
|
+
return n < p ? -1 : p < n ? 1 : 0;
|
|
423
434
|
}, o.isEncoding = function(t) {
|
|
424
435
|
switch (String(t).toLowerCase()) {
|
|
425
436
|
case "hex":
|
|
@@ -442,38 +453,38 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
442
453
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
443
454
|
if (t.length === 0)
|
|
444
455
|
return o.alloc(0);
|
|
445
|
-
var
|
|
456
|
+
var n;
|
|
446
457
|
if (r === void 0)
|
|
447
|
-
for (r = 0,
|
|
448
|
-
r += t[
|
|
449
|
-
var p = o.allocUnsafe(r),
|
|
450
|
-
for (
|
|
451
|
-
var m = t[
|
|
452
|
-
if (
|
|
453
|
-
|
|
458
|
+
for (r = 0, n = 0; n < t.length; ++n)
|
|
459
|
+
r += t[n].length;
|
|
460
|
+
var p = o.allocUnsafe(r), u = 0;
|
|
461
|
+
for (n = 0; n < t.length; ++n) {
|
|
462
|
+
var m = t[n];
|
|
463
|
+
if (U(m, Uint8Array))
|
|
464
|
+
u + m.length > p.length ? o.from(m).copy(p, u) : Uint8Array.prototype.set.call(
|
|
454
465
|
p,
|
|
455
466
|
m,
|
|
456
|
-
|
|
467
|
+
u
|
|
457
468
|
);
|
|
458
469
|
else if (o.isBuffer(m))
|
|
459
|
-
m.copy(p,
|
|
470
|
+
m.copy(p, u);
|
|
460
471
|
else
|
|
461
472
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
462
|
-
|
|
473
|
+
u += m.length;
|
|
463
474
|
}
|
|
464
475
|
return p;
|
|
465
476
|
};
|
|
466
|
-
function
|
|
477
|
+
function ct(i, t) {
|
|
467
478
|
if (o.isBuffer(i))
|
|
468
479
|
return i.length;
|
|
469
|
-
if (ArrayBuffer.isView(i) ||
|
|
480
|
+
if (ArrayBuffer.isView(i) || U(i, ArrayBuffer))
|
|
470
481
|
return i.byteLength;
|
|
471
482
|
if (typeof i != "string")
|
|
472
483
|
throw new TypeError(
|
|
473
484
|
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof i
|
|
474
485
|
);
|
|
475
|
-
var r = i.length,
|
|
476
|
-
if (!
|
|
486
|
+
var r = i.length, n = arguments.length > 2 && arguments[2] === !0;
|
|
487
|
+
if (!n && r === 0)
|
|
477
488
|
return 0;
|
|
478
489
|
for (var p = !1; ; )
|
|
479
490
|
switch (t) {
|
|
@@ -492,47 +503,47 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
492
503
|
case "hex":
|
|
493
504
|
return r >>> 1;
|
|
494
505
|
case "base64":
|
|
495
|
-
return
|
|
506
|
+
return wt(i).length;
|
|
496
507
|
default:
|
|
497
508
|
if (p)
|
|
498
|
-
return
|
|
509
|
+
return n ? -1 : G(i).length;
|
|
499
510
|
t = ("" + t).toLowerCase(), p = !0;
|
|
500
511
|
}
|
|
501
512
|
}
|
|
502
|
-
o.byteLength =
|
|
503
|
-
function
|
|
504
|
-
var
|
|
513
|
+
o.byteLength = ct;
|
|
514
|
+
function ir(i, t, r) {
|
|
515
|
+
var n = !1;
|
|
505
516
|
if ((t === void 0 || t < 0) && (t = 0), t > this.length || ((r === void 0 || r > this.length) && (r = this.length), r <= 0) || (r >>>= 0, t >>>= 0, r <= t))
|
|
506
517
|
return "";
|
|
507
518
|
for (i || (i = "utf8"); ; )
|
|
508
519
|
switch (i) {
|
|
509
520
|
case "hex":
|
|
510
|
-
return
|
|
521
|
+
return fr(this, t, r);
|
|
511
522
|
case "utf8":
|
|
512
523
|
case "utf-8":
|
|
513
524
|
return ht(this, t, r);
|
|
514
525
|
case "ascii":
|
|
515
|
-
return
|
|
526
|
+
return cr(this, t, r);
|
|
516
527
|
case "latin1":
|
|
517
528
|
case "binary":
|
|
518
|
-
return
|
|
529
|
+
return ur(this, t, r);
|
|
519
530
|
case "base64":
|
|
520
|
-
return
|
|
531
|
+
return sr(this, t, r);
|
|
521
532
|
case "ucs2":
|
|
522
533
|
case "ucs-2":
|
|
523
534
|
case "utf16le":
|
|
524
535
|
case "utf-16le":
|
|
525
|
-
return
|
|
536
|
+
return hr(this, t, r);
|
|
526
537
|
default:
|
|
527
|
-
if (
|
|
538
|
+
if (n)
|
|
528
539
|
throw new TypeError("Unknown encoding: " + i);
|
|
529
|
-
i = (i + "").toLowerCase(),
|
|
540
|
+
i = (i + "").toLowerCase(), n = !0;
|
|
530
541
|
}
|
|
531
542
|
}
|
|
532
543
|
o.prototype._isBuffer = !0;
|
|
533
544
|
function T(i, t, r) {
|
|
534
|
-
var
|
|
535
|
-
i[t] = i[r], i[r] =
|
|
545
|
+
var n = i[t];
|
|
546
|
+
i[t] = i[r], i[r] = n;
|
|
536
547
|
}
|
|
537
548
|
o.prototype.swap16 = function() {
|
|
538
549
|
var t = this.length;
|
|
@@ -557,40 +568,40 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
557
568
|
return this;
|
|
558
569
|
}, o.prototype.toString = function() {
|
|
559
570
|
var t = this.length;
|
|
560
|
-
return t === 0 ? "" : arguments.length === 0 ? ht(this, 0, t) :
|
|
571
|
+
return t === 0 ? "" : arguments.length === 0 ? ht(this, 0, t) : ir.apply(this, arguments);
|
|
561
572
|
}, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(t) {
|
|
562
573
|
if (!o.isBuffer(t))
|
|
563
574
|
throw new TypeError("Argument must be a Buffer");
|
|
564
575
|
return this === t ? !0 : o.compare(this, t) === 0;
|
|
565
576
|
}, o.prototype.inspect = function() {
|
|
566
|
-
var t = "", r =
|
|
577
|
+
var t = "", r = e.INSPECT_MAX_BYTES;
|
|
567
578
|
return t = this.toString("hex", 0, r).replace(/(.{2})/g, "$1 ").trim(), this.length > r && (t += " ... "), "<Buffer " + t + ">";
|
|
568
|
-
},
|
|
569
|
-
if (
|
|
579
|
+
}, l && (o.prototype[l] = o.prototype.inspect), o.prototype.compare = function(t, r, n, p, u) {
|
|
580
|
+
if (U(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), !o.isBuffer(t))
|
|
570
581
|
throw new TypeError(
|
|
571
582
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t
|
|
572
583
|
);
|
|
573
|
-
if (r === void 0 && (r = 0),
|
|
584
|
+
if (r === void 0 && (r = 0), n === void 0 && (n = t ? t.length : 0), p === void 0 && (p = 0), u === void 0 && (u = this.length), r < 0 || n > t.length || p < 0 || u > this.length)
|
|
574
585
|
throw new RangeError("out of range index");
|
|
575
|
-
if (p >=
|
|
586
|
+
if (p >= u && r >= n)
|
|
576
587
|
return 0;
|
|
577
|
-
if (p >=
|
|
588
|
+
if (p >= u)
|
|
578
589
|
return -1;
|
|
579
|
-
if (r >=
|
|
590
|
+
if (r >= n)
|
|
580
591
|
return 1;
|
|
581
|
-
if (r >>>= 0,
|
|
592
|
+
if (r >>>= 0, n >>>= 0, p >>>= 0, u >>>= 0, this === t)
|
|
582
593
|
return 0;
|
|
583
|
-
for (var m =
|
|
584
|
-
if (E
|
|
585
|
-
m = E
|
|
594
|
+
for (var m = u - p, d = n - r, v = Math.min(m, d), b = this.slice(p, u), A = t.slice(r, n), E = 0; E < v; ++E)
|
|
595
|
+
if (b[E] !== A[E]) {
|
|
596
|
+
m = b[E], d = A[E];
|
|
586
597
|
break;
|
|
587
598
|
}
|
|
588
|
-
return m <
|
|
599
|
+
return m < d ? -1 : d < m ? 1 : 0;
|
|
589
600
|
};
|
|
590
|
-
function ut(i, t, r,
|
|
601
|
+
function ut(i, t, r, n, p) {
|
|
591
602
|
if (i.length === 0)
|
|
592
603
|
return -1;
|
|
593
|
-
if (typeof r == "string" ? (
|
|
604
|
+
if (typeof r == "string" ? (n = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r, V(r) && (r = p ? 0 : i.length - 1), r < 0 && (r = i.length + r), r >= i.length) {
|
|
594
605
|
if (p)
|
|
595
606
|
return -1;
|
|
596
607
|
r = i.length - 1;
|
|
@@ -599,109 +610,109 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
599
610
|
r = 0;
|
|
600
611
|
else
|
|
601
612
|
return -1;
|
|
602
|
-
if (typeof t == "string" && (t = o.from(t,
|
|
603
|
-
return t.length === 0 ? -1 : ft(i, t, r,
|
|
613
|
+
if (typeof t == "string" && (t = o.from(t, n)), o.isBuffer(t))
|
|
614
|
+
return t.length === 0 ? -1 : ft(i, t, r, n, p);
|
|
604
615
|
if (typeof t == "number")
|
|
605
|
-
return t = t & 255, typeof Uint8Array.prototype.indexOf == "function" ? p ? Uint8Array.prototype.indexOf.call(i, t, r) : Uint8Array.prototype.lastIndexOf.call(i, t, r) : ft(i, [t], r,
|
|
616
|
+
return t = t & 255, typeof Uint8Array.prototype.indexOf == "function" ? p ? Uint8Array.prototype.indexOf.call(i, t, r) : Uint8Array.prototype.lastIndexOf.call(i, t, r) : ft(i, [t], r, n, p);
|
|
606
617
|
throw new TypeError("val must be string, number or Buffer");
|
|
607
618
|
}
|
|
608
|
-
function ft(i, t, r,
|
|
609
|
-
var
|
|
610
|
-
if (
|
|
619
|
+
function ft(i, t, r, n, p) {
|
|
620
|
+
var u = 1, m = i.length, d = t.length;
|
|
621
|
+
if (n !== void 0 && (n = String(n).toLowerCase(), n === "ucs2" || n === "ucs-2" || n === "utf16le" || n === "utf-16le")) {
|
|
611
622
|
if (i.length < 2 || t.length < 2)
|
|
612
623
|
return -1;
|
|
613
|
-
|
|
624
|
+
u = 2, m /= 2, d /= 2, r /= 2;
|
|
614
625
|
}
|
|
615
|
-
function
|
|
616
|
-
return
|
|
626
|
+
function v(yt, vt) {
|
|
627
|
+
return u === 1 ? yt[vt] : yt.readUInt16BE(vt * u);
|
|
617
628
|
}
|
|
618
|
-
var
|
|
629
|
+
var b;
|
|
619
630
|
if (p) {
|
|
620
631
|
var A = -1;
|
|
621
|
-
for (
|
|
622
|
-
if (
|
|
623
|
-
if (A === -1 && (A =
|
|
624
|
-
return A *
|
|
632
|
+
for (b = r; b < m; b++)
|
|
633
|
+
if (v(i, b) === v(t, A === -1 ? 0 : b - A)) {
|
|
634
|
+
if (A === -1 && (A = b), b - A + 1 === d)
|
|
635
|
+
return A * u;
|
|
625
636
|
} else
|
|
626
|
-
A !== -1 && (
|
|
637
|
+
A !== -1 && (b -= b - A), A = -1;
|
|
627
638
|
} else
|
|
628
|
-
for (r +
|
|
629
|
-
for (var
|
|
630
|
-
if (
|
|
631
|
-
|
|
639
|
+
for (r + d > m && (r = m - d), b = r; b >= 0; b--) {
|
|
640
|
+
for (var E = !0, z = 0; z < d; z++)
|
|
641
|
+
if (v(i, b + z) !== v(t, z)) {
|
|
642
|
+
E = !1;
|
|
632
643
|
break;
|
|
633
644
|
}
|
|
634
|
-
if (
|
|
635
|
-
return
|
|
645
|
+
if (E)
|
|
646
|
+
return b;
|
|
636
647
|
}
|
|
637
648
|
return -1;
|
|
638
649
|
}
|
|
639
|
-
o.prototype.includes = function(t, r,
|
|
640
|
-
return this.indexOf(t, r,
|
|
641
|
-
}, o.prototype.indexOf = function(t, r,
|
|
642
|
-
return ut(this, t, r,
|
|
643
|
-
}, o.prototype.lastIndexOf = function(t, r,
|
|
644
|
-
return ut(this, t, r,
|
|
650
|
+
o.prototype.includes = function(t, r, n) {
|
|
651
|
+
return this.indexOf(t, r, n) !== -1;
|
|
652
|
+
}, o.prototype.indexOf = function(t, r, n) {
|
|
653
|
+
return ut(this, t, r, n, !0);
|
|
654
|
+
}, o.prototype.lastIndexOf = function(t, r, n) {
|
|
655
|
+
return ut(this, t, r, n, !1);
|
|
645
656
|
};
|
|
646
|
-
function
|
|
657
|
+
function er(i, t, r, n) {
|
|
647
658
|
r = Number(r) || 0;
|
|
648
659
|
var p = i.length - r;
|
|
649
|
-
|
|
650
|
-
var
|
|
651
|
-
|
|
652
|
-
for (var m = 0; m <
|
|
653
|
-
var
|
|
654
|
-
if (V(
|
|
660
|
+
n ? (n = Number(n), n > p && (n = p)) : n = p;
|
|
661
|
+
var u = t.length;
|
|
662
|
+
n > u / 2 && (n = u / 2);
|
|
663
|
+
for (var m = 0; m < n; ++m) {
|
|
664
|
+
var d = parseInt(t.substr(m * 2, 2), 16);
|
|
665
|
+
if (V(d))
|
|
655
666
|
return m;
|
|
656
|
-
i[r + m] =
|
|
667
|
+
i[r + m] = d;
|
|
657
668
|
}
|
|
658
669
|
return m;
|
|
659
670
|
}
|
|
660
|
-
function
|
|
661
|
-
return L(G(t, i.length - r), i, r,
|
|
671
|
+
function nr(i, t, r, n) {
|
|
672
|
+
return L(G(t, i.length - r), i, r, n);
|
|
662
673
|
}
|
|
663
|
-
function
|
|
664
|
-
return L(
|
|
674
|
+
function ar(i, t, r, n) {
|
|
675
|
+
return L(gr(t), i, r, n);
|
|
665
676
|
}
|
|
666
|
-
function
|
|
667
|
-
return L(
|
|
677
|
+
function or(i, t, r, n) {
|
|
678
|
+
return L(wt(t), i, r, n);
|
|
668
679
|
}
|
|
669
|
-
function
|
|
670
|
-
return L(
|
|
680
|
+
function pr(i, t, r, n) {
|
|
681
|
+
return L(dr(t, i.length - r), i, r, n);
|
|
671
682
|
}
|
|
672
|
-
o.prototype.write = function(t, r,
|
|
683
|
+
o.prototype.write = function(t, r, n, p) {
|
|
673
684
|
if (r === void 0)
|
|
674
|
-
p = "utf8",
|
|
675
|
-
else if (
|
|
676
|
-
p = r,
|
|
685
|
+
p = "utf8", n = this.length, r = 0;
|
|
686
|
+
else if (n === void 0 && typeof r == "string")
|
|
687
|
+
p = r, n = this.length, r = 0;
|
|
677
688
|
else if (isFinite(r))
|
|
678
|
-
r = r >>> 0, isFinite(
|
|
689
|
+
r = r >>> 0, isFinite(n) ? (n = n >>> 0, p === void 0 && (p = "utf8")) : (p = n, n = void 0);
|
|
679
690
|
else
|
|
680
691
|
throw new Error(
|
|
681
692
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
682
693
|
);
|
|
683
|
-
var
|
|
684
|
-
if ((
|
|
694
|
+
var u = this.length - r;
|
|
695
|
+
if ((n === void 0 || n > u) && (n = u), t.length > 0 && (n < 0 || r < 0) || r > this.length)
|
|
685
696
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
686
697
|
p || (p = "utf8");
|
|
687
698
|
for (var m = !1; ; )
|
|
688
699
|
switch (p) {
|
|
689
700
|
case "hex":
|
|
690
|
-
return
|
|
701
|
+
return er(this, t, r, n);
|
|
691
702
|
case "utf8":
|
|
692
703
|
case "utf-8":
|
|
693
|
-
return
|
|
704
|
+
return nr(this, t, r, n);
|
|
694
705
|
case "ascii":
|
|
695
706
|
case "latin1":
|
|
696
707
|
case "binary":
|
|
697
|
-
return
|
|
708
|
+
return ar(this, t, r, n);
|
|
698
709
|
case "base64":
|
|
699
|
-
return
|
|
710
|
+
return or(this, t, r, n);
|
|
700
711
|
case "ucs2":
|
|
701
712
|
case "ucs-2":
|
|
702
713
|
case "utf16le":
|
|
703
714
|
case "utf-16le":
|
|
704
|
-
return
|
|
715
|
+
return pr(this, t, r, n);
|
|
705
716
|
default:
|
|
706
717
|
if (m)
|
|
707
718
|
throw new TypeError("Unknown encoding: " + p);
|
|
@@ -713,74 +724,74 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
713
724
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
714
725
|
};
|
|
715
726
|
};
|
|
716
|
-
function
|
|
727
|
+
function sr(i, t, r) {
|
|
717
728
|
return t === 0 && r === i.length ? a.fromByteArray(i) : a.fromByteArray(i.slice(t, r));
|
|
718
729
|
}
|
|
719
730
|
function ht(i, t, r) {
|
|
720
731
|
r = Math.min(i.length, r);
|
|
721
|
-
for (var
|
|
722
|
-
var
|
|
723
|
-
if (p +
|
|
724
|
-
var
|
|
725
|
-
switch (
|
|
732
|
+
for (var n = [], p = t; p < r; ) {
|
|
733
|
+
var u = i[p], m = null, d = u > 239 ? 4 : u > 223 ? 3 : u > 191 ? 2 : 1;
|
|
734
|
+
if (p + d <= r) {
|
|
735
|
+
var v, b, A, E;
|
|
736
|
+
switch (d) {
|
|
726
737
|
case 1:
|
|
727
|
-
|
|
738
|
+
u < 128 && (m = u);
|
|
728
739
|
break;
|
|
729
740
|
case 2:
|
|
730
|
-
|
|
741
|
+
v = i[p + 1], (v & 192) === 128 && (E = (u & 31) << 6 | v & 63, E > 127 && (m = E));
|
|
731
742
|
break;
|
|
732
743
|
case 3:
|
|
733
|
-
|
|
744
|
+
v = i[p + 1], b = i[p + 2], (v & 192) === 128 && (b & 192) === 128 && (E = (u & 15) << 12 | (v & 63) << 6 | b & 63, E > 2047 && (E < 55296 || E > 57343) && (m = E));
|
|
734
745
|
break;
|
|
735
746
|
case 4:
|
|
736
|
-
|
|
747
|
+
v = i[p + 1], b = i[p + 2], A = i[p + 3], (v & 192) === 128 && (b & 192) === 128 && (A & 192) === 128 && (E = (u & 15) << 18 | (v & 63) << 12 | (b & 63) << 6 | A & 63, E > 65535 && E < 1114112 && (m = E));
|
|
737
748
|
}
|
|
738
749
|
}
|
|
739
|
-
m === null ? (m = 65533,
|
|
750
|
+
m === null ? (m = 65533, d = 1) : m > 65535 && (m -= 65536, n.push(m >>> 10 & 1023 | 55296), m = 56320 | m & 1023), n.push(m), p += d;
|
|
740
751
|
}
|
|
741
|
-
return
|
|
752
|
+
return lr(n);
|
|
742
753
|
}
|
|
743
754
|
var mt = 4096;
|
|
744
|
-
function
|
|
755
|
+
function lr(i) {
|
|
745
756
|
var t = i.length;
|
|
746
757
|
if (t <= mt)
|
|
747
758
|
return String.fromCharCode.apply(String, i);
|
|
748
|
-
for (var r = "",
|
|
759
|
+
for (var r = "", n = 0; n < t; )
|
|
749
760
|
r += String.fromCharCode.apply(
|
|
750
761
|
String,
|
|
751
|
-
i.slice(
|
|
762
|
+
i.slice(n, n += mt)
|
|
752
763
|
);
|
|
753
764
|
return r;
|
|
754
765
|
}
|
|
755
|
-
function
|
|
756
|
-
var
|
|
766
|
+
function cr(i, t, r) {
|
|
767
|
+
var n = "";
|
|
757
768
|
r = Math.min(i.length, r);
|
|
758
769
|
for (var p = t; p < r; ++p)
|
|
759
|
-
|
|
760
|
-
return
|
|
770
|
+
n += String.fromCharCode(i[p] & 127);
|
|
771
|
+
return n;
|
|
761
772
|
}
|
|
762
|
-
function
|
|
763
|
-
var
|
|
773
|
+
function ur(i, t, r) {
|
|
774
|
+
var n = "";
|
|
764
775
|
r = Math.min(i.length, r);
|
|
765
776
|
for (var p = t; p < r; ++p)
|
|
766
|
-
|
|
767
|
-
return
|
|
777
|
+
n += String.fromCharCode(i[p]);
|
|
778
|
+
return n;
|
|
768
779
|
}
|
|
769
|
-
function
|
|
770
|
-
var
|
|
771
|
-
(!t || t < 0) && (t = 0), (!r || r < 0 || r >
|
|
772
|
-
for (var p = "",
|
|
773
|
-
p +=
|
|
780
|
+
function fr(i, t, r) {
|
|
781
|
+
var n = i.length;
|
|
782
|
+
(!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n);
|
|
783
|
+
for (var p = "", u = t; u < r; ++u)
|
|
784
|
+
p += wr[i[u]];
|
|
774
785
|
return p;
|
|
775
786
|
}
|
|
776
|
-
function
|
|
777
|
-
for (var
|
|
778
|
-
p += String.fromCharCode(
|
|
787
|
+
function hr(i, t, r) {
|
|
788
|
+
for (var n = i.slice(t, r), p = "", u = 0; u < n.length - 1; u += 2)
|
|
789
|
+
p += String.fromCharCode(n[u] + n[u + 1] * 256);
|
|
779
790
|
return p;
|
|
780
791
|
}
|
|
781
792
|
o.prototype.slice = function(t, r) {
|
|
782
|
-
var
|
|
783
|
-
t = ~~t, r = r === void 0 ?
|
|
793
|
+
var n = this.length;
|
|
794
|
+
t = ~~t, r = r === void 0 ? n : ~~r, t < 0 ? (t += n, t < 0 && (t = 0)) : t > n && (t = n), r < 0 ? (r += n, r < 0 && (r = 0)) : r > n && (r = n), r < t && (r = t);
|
|
784
795
|
var p = this.subarray(t, r);
|
|
785
796
|
return Object.setPrototypeOf(p, o.prototype), p;
|
|
786
797
|
};
|
|
@@ -790,15 +801,15 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
790
801
|
if (i + t > r)
|
|
791
802
|
throw new RangeError("Trying to access beyond buffer length");
|
|
792
803
|
}
|
|
793
|
-
o.prototype.readUintLE = o.prototype.readUIntLE = function(t, r,
|
|
794
|
-
t = t >>> 0, r = r >>> 0,
|
|
795
|
-
for (var p = this[t],
|
|
796
|
-
p += this[t + m] *
|
|
804
|
+
o.prototype.readUintLE = o.prototype.readUIntLE = function(t, r, n) {
|
|
805
|
+
t = t >>> 0, r = r >>> 0, n || F(t, r, this.length);
|
|
806
|
+
for (var p = this[t], u = 1, m = 0; ++m < r && (u *= 256); )
|
|
807
|
+
p += this[t + m] * u;
|
|
797
808
|
return p;
|
|
798
|
-
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(t, r,
|
|
799
|
-
t = t >>> 0, r = r >>> 0,
|
|
800
|
-
for (var p = this[t + --r],
|
|
801
|
-
p += this[t + --r] *
|
|
809
|
+
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(t, r, n) {
|
|
810
|
+
t = t >>> 0, r = r >>> 0, n || F(t, r, this.length);
|
|
811
|
+
for (var p = this[t + --r], u = 1; r > 0 && (u *= 256); )
|
|
812
|
+
p += this[t + --r] * u;
|
|
802
813
|
return p;
|
|
803
814
|
}, o.prototype.readUint8 = o.prototype.readUInt8 = function(t, r) {
|
|
804
815
|
return t = t >>> 0, r || F(t, 1, this.length), this[t];
|
|
@@ -810,26 +821,26 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
810
821
|
return t = t >>> 0, r || F(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + this[t + 3] * 16777216;
|
|
811
822
|
}, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(t, r) {
|
|
812
823
|
return t = t >>> 0, r || F(t, 4, this.length), this[t] * 16777216 + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
|
|
813
|
-
}, o.prototype.readIntLE = function(t, r,
|
|
814
|
-
t = t >>> 0, r = r >>> 0,
|
|
815
|
-
for (var p = this[t],
|
|
816
|
-
p += this[t + m] *
|
|
817
|
-
return
|
|
818
|
-
}, o.prototype.readIntBE = function(t, r,
|
|
819
|
-
t = t >>> 0, r = r >>> 0,
|
|
820
|
-
for (var p = r,
|
|
821
|
-
m += this[t + --p] *
|
|
822
|
-
return
|
|
824
|
+
}, o.prototype.readIntLE = function(t, r, n) {
|
|
825
|
+
t = t >>> 0, r = r >>> 0, n || F(t, r, this.length);
|
|
826
|
+
for (var p = this[t], u = 1, m = 0; ++m < r && (u *= 256); )
|
|
827
|
+
p += this[t + m] * u;
|
|
828
|
+
return u *= 128, p >= u && (p -= Math.pow(2, 8 * r)), p;
|
|
829
|
+
}, o.prototype.readIntBE = function(t, r, n) {
|
|
830
|
+
t = t >>> 0, r = r >>> 0, n || F(t, r, this.length);
|
|
831
|
+
for (var p = r, u = 1, m = this[t + --p]; p > 0 && (u *= 256); )
|
|
832
|
+
m += this[t + --p] * u;
|
|
833
|
+
return u *= 128, m >= u && (m -= Math.pow(2, 8 * r)), m;
|
|
823
834
|
}, o.prototype.readInt8 = function(t, r) {
|
|
824
835
|
return t = t >>> 0, r || F(t, 1, this.length), this[t] & 128 ? (255 - this[t] + 1) * -1 : this[t];
|
|
825
836
|
}, o.prototype.readInt16LE = function(t, r) {
|
|
826
837
|
t = t >>> 0, r || F(t, 2, this.length);
|
|
827
|
-
var
|
|
828
|
-
return
|
|
838
|
+
var n = this[t] | this[t + 1] << 8;
|
|
839
|
+
return n & 32768 ? n | 4294901760 : n;
|
|
829
840
|
}, o.prototype.readInt16BE = function(t, r) {
|
|
830
841
|
t = t >>> 0, r || F(t, 2, this.length);
|
|
831
|
-
var
|
|
832
|
-
return
|
|
842
|
+
var n = this[t + 1] | this[t] << 8;
|
|
843
|
+
return n & 32768 ? n | 4294901760 : n;
|
|
833
844
|
}, o.prototype.readInt32LE = function(t, r) {
|
|
834
845
|
return t = t >>> 0, r || F(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;
|
|
835
846
|
}, o.prototype.readInt32BE = function(t, r) {
|
|
@@ -843,143 +854,143 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
843
854
|
}, o.prototype.readDoubleBE = function(t, r) {
|
|
844
855
|
return t = t >>> 0, r || F(t, 8, this.length), s.read(this, t, !1, 52, 8);
|
|
845
856
|
};
|
|
846
|
-
function
|
|
857
|
+
function B(i, t, r, n, p, u) {
|
|
847
858
|
if (!o.isBuffer(i))
|
|
848
859
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
849
|
-
if (t > p || t <
|
|
860
|
+
if (t > p || t < u)
|
|
850
861
|
throw new RangeError('"value" argument is out of bounds');
|
|
851
|
-
if (r +
|
|
862
|
+
if (r + n > i.length)
|
|
852
863
|
throw new RangeError("Index out of range");
|
|
853
864
|
}
|
|
854
|
-
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(t, r,
|
|
855
|
-
if (t = +t, r = r >>> 0,
|
|
856
|
-
var
|
|
857
|
-
|
|
865
|
+
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(t, r, n, p) {
|
|
866
|
+
if (t = +t, r = r >>> 0, n = n >>> 0, !p) {
|
|
867
|
+
var u = Math.pow(2, 8 * n) - 1;
|
|
868
|
+
B(this, t, r, n, u, 0);
|
|
858
869
|
}
|
|
859
|
-
var m = 1,
|
|
860
|
-
for (this[r] = t & 255; ++
|
|
861
|
-
this[r +
|
|
862
|
-
return r +
|
|
863
|
-
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(t, r,
|
|
864
|
-
if (t = +t, r = r >>> 0,
|
|
865
|
-
var
|
|
866
|
-
|
|
870
|
+
var m = 1, d = 0;
|
|
871
|
+
for (this[r] = t & 255; ++d < n && (m *= 256); )
|
|
872
|
+
this[r + d] = t / m & 255;
|
|
873
|
+
return r + n;
|
|
874
|
+
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(t, r, n, p) {
|
|
875
|
+
if (t = +t, r = r >>> 0, n = n >>> 0, !p) {
|
|
876
|
+
var u = Math.pow(2, 8 * n) - 1;
|
|
877
|
+
B(this, t, r, n, u, 0);
|
|
867
878
|
}
|
|
868
|
-
var m =
|
|
869
|
-
for (this[r + m] = t & 255; --m >= 0 && (
|
|
870
|
-
this[r + m] = t /
|
|
871
|
-
return r +
|
|
872
|
-
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(t, r,
|
|
873
|
-
return t = +t, r = r >>> 0,
|
|
874
|
-
}, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(t, r,
|
|
875
|
-
return t = +t, r = r >>> 0,
|
|
876
|
-
}, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(t, r,
|
|
877
|
-
return t = +t, r = r >>> 0,
|
|
878
|
-
}, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(t, r,
|
|
879
|
-
return t = +t, r = r >>> 0,
|
|
880
|
-
}, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(t, r,
|
|
881
|
-
return t = +t, r = r >>> 0,
|
|
882
|
-
}, o.prototype.writeIntLE = function(t, r,
|
|
879
|
+
var m = n - 1, d = 1;
|
|
880
|
+
for (this[r + m] = t & 255; --m >= 0 && (d *= 256); )
|
|
881
|
+
this[r + m] = t / d & 255;
|
|
882
|
+
return r + n;
|
|
883
|
+
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(t, r, n) {
|
|
884
|
+
return t = +t, r = r >>> 0, n || B(this, t, r, 1, 255, 0), this[r] = t & 255, r + 1;
|
|
885
|
+
}, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(t, r, n) {
|
|
886
|
+
return t = +t, r = r >>> 0, n || B(this, t, r, 2, 65535, 0), this[r] = t & 255, this[r + 1] = t >>> 8, r + 2;
|
|
887
|
+
}, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(t, r, n) {
|
|
888
|
+
return t = +t, r = r >>> 0, n || B(this, t, r, 2, 65535, 0), this[r] = t >>> 8, this[r + 1] = t & 255, r + 2;
|
|
889
|
+
}, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(t, r, n) {
|
|
890
|
+
return t = +t, r = r >>> 0, n || B(this, t, r, 4, 4294967295, 0), this[r + 3] = t >>> 24, this[r + 2] = t >>> 16, this[r + 1] = t >>> 8, this[r] = t & 255, r + 4;
|
|
891
|
+
}, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(t, r, n) {
|
|
892
|
+
return t = +t, r = r >>> 0, n || B(this, t, r, 4, 4294967295, 0), this[r] = t >>> 24, this[r + 1] = t >>> 16, this[r + 2] = t >>> 8, this[r + 3] = t & 255, r + 4;
|
|
893
|
+
}, o.prototype.writeIntLE = function(t, r, n, p) {
|
|
883
894
|
if (t = +t, r = r >>> 0, !p) {
|
|
884
|
-
var
|
|
885
|
-
|
|
895
|
+
var u = Math.pow(2, 8 * n - 1);
|
|
896
|
+
B(this, t, r, n, u - 1, -u);
|
|
886
897
|
}
|
|
887
|
-
var m = 0,
|
|
888
|
-
for (this[r] = t & 255; ++m <
|
|
889
|
-
t < 0 &&
|
|
890
|
-
return r +
|
|
891
|
-
}, o.prototype.writeIntBE = function(t, r,
|
|
898
|
+
var m = 0, d = 1, v = 0;
|
|
899
|
+
for (this[r] = t & 255; ++m < n && (d *= 256); )
|
|
900
|
+
t < 0 && v === 0 && this[r + m - 1] !== 0 && (v = 1), this[r + m] = (t / d >> 0) - v & 255;
|
|
901
|
+
return r + n;
|
|
902
|
+
}, o.prototype.writeIntBE = function(t, r, n, p) {
|
|
892
903
|
if (t = +t, r = r >>> 0, !p) {
|
|
893
|
-
var
|
|
894
|
-
|
|
904
|
+
var u = Math.pow(2, 8 * n - 1);
|
|
905
|
+
B(this, t, r, n, u - 1, -u);
|
|
895
906
|
}
|
|
896
|
-
var m =
|
|
897
|
-
for (this[r + m] = t & 255; --m >= 0 && (
|
|
898
|
-
t < 0 &&
|
|
899
|
-
return r +
|
|
900
|
-
}, o.prototype.writeInt8 = function(t, r,
|
|
901
|
-
return t = +t, r = r >>> 0,
|
|
902
|
-
}, o.prototype.writeInt16LE = function(t, r,
|
|
903
|
-
return t = +t, r = r >>> 0,
|
|
904
|
-
}, o.prototype.writeInt16BE = function(t, r,
|
|
905
|
-
return t = +t, r = r >>> 0,
|
|
906
|
-
}, o.prototype.writeInt32LE = function(t, r,
|
|
907
|
-
return t = +t, r = r >>> 0,
|
|
908
|
-
}, o.prototype.writeInt32BE = function(t, r,
|
|
909
|
-
return t = +t, r = r >>> 0,
|
|
907
|
+
var m = n - 1, d = 1, v = 0;
|
|
908
|
+
for (this[r + m] = t & 255; --m >= 0 && (d *= 256); )
|
|
909
|
+
t < 0 && v === 0 && this[r + m + 1] !== 0 && (v = 1), this[r + m] = (t / d >> 0) - v & 255;
|
|
910
|
+
return r + n;
|
|
911
|
+
}, o.prototype.writeInt8 = function(t, r, n) {
|
|
912
|
+
return t = +t, r = r >>> 0, n || B(this, t, r, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[r] = t & 255, r + 1;
|
|
913
|
+
}, o.prototype.writeInt16LE = function(t, r, n) {
|
|
914
|
+
return t = +t, r = r >>> 0, n || B(this, t, r, 2, 32767, -32768), this[r] = t & 255, this[r + 1] = t >>> 8, r + 2;
|
|
915
|
+
}, o.prototype.writeInt16BE = function(t, r, n) {
|
|
916
|
+
return t = +t, r = r >>> 0, n || B(this, t, r, 2, 32767, -32768), this[r] = t >>> 8, this[r + 1] = t & 255, r + 2;
|
|
917
|
+
}, o.prototype.writeInt32LE = function(t, r, n) {
|
|
918
|
+
return t = +t, r = r >>> 0, n || B(this, t, r, 4, 2147483647, -2147483648), this[r] = t & 255, this[r + 1] = t >>> 8, this[r + 2] = t >>> 16, this[r + 3] = t >>> 24, r + 4;
|
|
919
|
+
}, o.prototype.writeInt32BE = function(t, r, n) {
|
|
920
|
+
return t = +t, r = r >>> 0, n || B(this, t, r, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), this[r] = t >>> 24, this[r + 1] = t >>> 16, this[r + 2] = t >>> 8, this[r + 3] = t & 255, r + 4;
|
|
910
921
|
};
|
|
911
|
-
function xt(i, t, r,
|
|
912
|
-
if (r +
|
|
922
|
+
function xt(i, t, r, n, p, u) {
|
|
923
|
+
if (r + n > i.length)
|
|
913
924
|
throw new RangeError("Index out of range");
|
|
914
925
|
if (r < 0)
|
|
915
926
|
throw new RangeError("Index out of range");
|
|
916
927
|
}
|
|
917
|
-
function
|
|
918
|
-
return t = +t, r = r >>> 0, p || xt(i, t, r, 4), s.write(i, t, r,
|
|
928
|
+
function gt(i, t, r, n, p) {
|
|
929
|
+
return t = +t, r = r >>> 0, p || xt(i, t, r, 4), s.write(i, t, r, n, 23, 4), r + 4;
|
|
919
930
|
}
|
|
920
|
-
o.prototype.writeFloatLE = function(t, r,
|
|
921
|
-
return
|
|
922
|
-
}, o.prototype.writeFloatBE = function(t, r,
|
|
923
|
-
return
|
|
931
|
+
o.prototype.writeFloatLE = function(t, r, n) {
|
|
932
|
+
return gt(this, t, r, !0, n);
|
|
933
|
+
}, o.prototype.writeFloatBE = function(t, r, n) {
|
|
934
|
+
return gt(this, t, r, !1, n);
|
|
924
935
|
};
|
|
925
|
-
function
|
|
926
|
-
return t = +t, r = r >>> 0, p || xt(i, t, r, 8), s.write(i, t, r,
|
|
927
|
-
}
|
|
928
|
-
o.prototype.writeDoubleLE = function(t, r,
|
|
929
|
-
return
|
|
930
|
-
}, o.prototype.writeDoubleBE = function(t, r,
|
|
931
|
-
return
|
|
932
|
-
}, o.prototype.copy = function(t, r,
|
|
936
|
+
function dt(i, t, r, n, p) {
|
|
937
|
+
return t = +t, r = r >>> 0, p || xt(i, t, r, 8), s.write(i, t, r, n, 52, 8), r + 8;
|
|
938
|
+
}
|
|
939
|
+
o.prototype.writeDoubleLE = function(t, r, n) {
|
|
940
|
+
return dt(this, t, r, !0, n);
|
|
941
|
+
}, o.prototype.writeDoubleBE = function(t, r, n) {
|
|
942
|
+
return dt(this, t, r, !1, n);
|
|
943
|
+
}, o.prototype.copy = function(t, r, n, p) {
|
|
933
944
|
if (!o.isBuffer(t))
|
|
934
945
|
throw new TypeError("argument should be a Buffer");
|
|
935
|
-
if (
|
|
946
|
+
if (n || (n = 0), !p && p !== 0 && (p = this.length), r >= t.length && (r = t.length), r || (r = 0), p > 0 && p < n && (p = n), p === n || t.length === 0 || this.length === 0)
|
|
936
947
|
return 0;
|
|
937
948
|
if (r < 0)
|
|
938
949
|
throw new RangeError("targetStart out of bounds");
|
|
939
|
-
if (
|
|
950
|
+
if (n < 0 || n >= this.length)
|
|
940
951
|
throw new RangeError("Index out of range");
|
|
941
952
|
if (p < 0)
|
|
942
953
|
throw new RangeError("sourceEnd out of bounds");
|
|
943
|
-
p > this.length && (p = this.length), t.length - r < p -
|
|
944
|
-
var
|
|
945
|
-
return this === t && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(r,
|
|
954
|
+
p > this.length && (p = this.length), t.length - r < p - n && (p = t.length - r + n);
|
|
955
|
+
var u = p - n;
|
|
956
|
+
return this === t && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(r, n, p) : Uint8Array.prototype.set.call(
|
|
946
957
|
t,
|
|
947
|
-
this.subarray(
|
|
958
|
+
this.subarray(n, p),
|
|
948
959
|
r
|
|
949
|
-
),
|
|
950
|
-
}, o.prototype.fill = function(t, r,
|
|
960
|
+
), u;
|
|
961
|
+
}, o.prototype.fill = function(t, r, n, p) {
|
|
951
962
|
if (typeof t == "string") {
|
|
952
|
-
if (typeof r == "string" ? (p = r, r = 0,
|
|
963
|
+
if (typeof r == "string" ? (p = r, r = 0, n = this.length) : typeof n == "string" && (p = n, n = this.length), p !== void 0 && typeof p != "string")
|
|
953
964
|
throw new TypeError("encoding must be a string");
|
|
954
965
|
if (typeof p == "string" && !o.isEncoding(p))
|
|
955
966
|
throw new TypeError("Unknown encoding: " + p);
|
|
956
967
|
if (t.length === 1) {
|
|
957
|
-
var
|
|
958
|
-
(p === "utf8" &&
|
|
968
|
+
var u = t.charCodeAt(0);
|
|
969
|
+
(p === "utf8" && u < 128 || p === "latin1") && (t = u);
|
|
959
970
|
}
|
|
960
971
|
} else
|
|
961
972
|
typeof t == "number" ? t = t & 255 : typeof t == "boolean" && (t = Number(t));
|
|
962
|
-
if (r < 0 || this.length < r || this.length <
|
|
973
|
+
if (r < 0 || this.length < r || this.length < n)
|
|
963
974
|
throw new RangeError("Out of range index");
|
|
964
|
-
if (
|
|
975
|
+
if (n <= r)
|
|
965
976
|
return this;
|
|
966
|
-
r = r >>> 0,
|
|
977
|
+
r = r >>> 0, n = n === void 0 ? this.length : n >>> 0, t || (t = 0);
|
|
967
978
|
var m;
|
|
968
979
|
if (typeof t == "number")
|
|
969
|
-
for (m = r; m <
|
|
980
|
+
for (m = r; m < n; ++m)
|
|
970
981
|
this[m] = t;
|
|
971
982
|
else {
|
|
972
|
-
var
|
|
973
|
-
if (
|
|
983
|
+
var d = o.isBuffer(t) ? t : o.from(t, p), v = d.length;
|
|
984
|
+
if (v === 0)
|
|
974
985
|
throw new TypeError('The value "' + t + '" is invalid for argument "value"');
|
|
975
|
-
for (m = 0; m <
|
|
976
|
-
this[m + r] =
|
|
986
|
+
for (m = 0; m < n - r; ++m)
|
|
987
|
+
this[m + r] = d[m % v];
|
|
977
988
|
}
|
|
978
989
|
return this;
|
|
979
990
|
};
|
|
980
|
-
var
|
|
981
|
-
function
|
|
982
|
-
if (i = i.split("=")[0], i = i.trim().replace(
|
|
991
|
+
var mr = /[^+/0-9A-Za-z-_]/g;
|
|
992
|
+
function xr(i) {
|
|
993
|
+
if (i = i.split("=")[0], i = i.trim().replace(mr, ""), i.length < 2)
|
|
983
994
|
return "";
|
|
984
995
|
for (; i.length % 4 !== 0; )
|
|
985
996
|
i = i + "=";
|
|
@@ -987,41 +998,41 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
987
998
|
}
|
|
988
999
|
function G(i, t) {
|
|
989
1000
|
t = t || 1 / 0;
|
|
990
|
-
for (var r,
|
|
1001
|
+
for (var r, n = i.length, p = null, u = [], m = 0; m < n; ++m) {
|
|
991
1002
|
if (r = i.charCodeAt(m), r > 55295 && r < 57344) {
|
|
992
1003
|
if (!p) {
|
|
993
1004
|
if (r > 56319) {
|
|
994
|
-
(t -= 3) > -1 &&
|
|
1005
|
+
(t -= 3) > -1 && u.push(239, 191, 189);
|
|
995
1006
|
continue;
|
|
996
|
-
} else if (m + 1 ===
|
|
997
|
-
(t -= 3) > -1 &&
|
|
1007
|
+
} else if (m + 1 === n) {
|
|
1008
|
+
(t -= 3) > -1 && u.push(239, 191, 189);
|
|
998
1009
|
continue;
|
|
999
1010
|
}
|
|
1000
1011
|
p = r;
|
|
1001
1012
|
continue;
|
|
1002
1013
|
}
|
|
1003
1014
|
if (r < 56320) {
|
|
1004
|
-
(t -= 3) > -1 &&
|
|
1015
|
+
(t -= 3) > -1 && u.push(239, 191, 189), p = r;
|
|
1005
1016
|
continue;
|
|
1006
1017
|
}
|
|
1007
1018
|
r = (p - 55296 << 10 | r - 56320) + 65536;
|
|
1008
1019
|
} else
|
|
1009
|
-
p && (t -= 3) > -1 &&
|
|
1020
|
+
p && (t -= 3) > -1 && u.push(239, 191, 189);
|
|
1010
1021
|
if (p = null, r < 128) {
|
|
1011
1022
|
if ((t -= 1) < 0)
|
|
1012
1023
|
break;
|
|
1013
|
-
|
|
1024
|
+
u.push(r);
|
|
1014
1025
|
} else if (r < 2048) {
|
|
1015
1026
|
if ((t -= 2) < 0)
|
|
1016
1027
|
break;
|
|
1017
|
-
|
|
1028
|
+
u.push(
|
|
1018
1029
|
r >> 6 | 192,
|
|
1019
1030
|
r & 63 | 128
|
|
1020
1031
|
);
|
|
1021
1032
|
} else if (r < 65536) {
|
|
1022
1033
|
if ((t -= 3) < 0)
|
|
1023
1034
|
break;
|
|
1024
|
-
|
|
1035
|
+
u.push(
|
|
1025
1036
|
r >> 12 | 224,
|
|
1026
1037
|
r >> 6 & 63 | 128,
|
|
1027
1038
|
r & 63 | 128
|
|
@@ -1029,7 +1040,7 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
1029
1040
|
} else if (r < 1114112) {
|
|
1030
1041
|
if ((t -= 4) < 0)
|
|
1031
1042
|
break;
|
|
1032
|
-
|
|
1043
|
+
u.push(
|
|
1033
1044
|
r >> 18 | 240,
|
|
1034
1045
|
r >> 12 & 63 | 128,
|
|
1035
1046
|
r >> 6 & 63 | 128,
|
|
@@ -1038,462 +1049,497 @@ pt.write = function(n, a, s, c, f, h) {
|
|
|
1038
1049
|
} else
|
|
1039
1050
|
throw new Error("Invalid code point");
|
|
1040
1051
|
}
|
|
1041
|
-
return
|
|
1052
|
+
return u;
|
|
1042
1053
|
}
|
|
1043
|
-
function
|
|
1054
|
+
function gr(i) {
|
|
1044
1055
|
for (var t = [], r = 0; r < i.length; ++r)
|
|
1045
1056
|
t.push(i.charCodeAt(r) & 255);
|
|
1046
1057
|
return t;
|
|
1047
1058
|
}
|
|
1048
|
-
function
|
|
1049
|
-
for (var r,
|
|
1050
|
-
r = i.charCodeAt(m),
|
|
1051
|
-
return
|
|
1059
|
+
function dr(i, t) {
|
|
1060
|
+
for (var r, n, p, u = [], m = 0; m < i.length && !((t -= 2) < 0); ++m)
|
|
1061
|
+
r = i.charCodeAt(m), n = r >> 8, p = r % 256, u.push(p), u.push(n);
|
|
1062
|
+
return u;
|
|
1052
1063
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return a.toByteArray(
|
|
1064
|
+
function wt(i) {
|
|
1065
|
+
return a.toByteArray(xr(i));
|
|
1055
1066
|
}
|
|
1056
|
-
function L(i, t, r,
|
|
1057
|
-
for (var p = 0; p <
|
|
1067
|
+
function L(i, t, r, n) {
|
|
1068
|
+
for (var p = 0; p < n && !(p + r >= t.length || p >= i.length); ++p)
|
|
1058
1069
|
t[p + r] = i[p];
|
|
1059
1070
|
return p;
|
|
1060
1071
|
}
|
|
1061
|
-
function
|
|
1072
|
+
function U(i, t) {
|
|
1062
1073
|
return i instanceof t || i != null && i.constructor != null && i.constructor.name != null && i.constructor.name === t.name;
|
|
1063
1074
|
}
|
|
1064
1075
|
function V(i) {
|
|
1065
1076
|
return i !== i;
|
|
1066
1077
|
}
|
|
1067
|
-
var
|
|
1078
|
+
var wr = function() {
|
|
1068
1079
|
for (var i = "0123456789abcdef", t = new Array(256), r = 0; r < 16; ++r)
|
|
1069
|
-
for (var
|
|
1070
|
-
t[
|
|
1080
|
+
for (var n = r * 16, p = 0; p < 16; ++p)
|
|
1081
|
+
t[n + p] = i[r] + i[p];
|
|
1071
1082
|
return t;
|
|
1072
1083
|
}();
|
|
1073
|
-
})(
|
|
1084
|
+
})(zt);
|
|
1074
1085
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1075
|
-
(function(
|
|
1076
|
-
var s =
|
|
1077
|
-
function f(
|
|
1078
|
-
for (var x in
|
|
1079
|
-
o[x] =
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
function h(
|
|
1083
|
-
return c
|
|
1084
|
-
}
|
|
1085
|
-
h.prototype = Object.create(
|
|
1086
|
-
if (typeof
|
|
1086
|
+
(function(e, a) {
|
|
1087
|
+
var s = zt, l = s.Buffer;
|
|
1088
|
+
function f(c, o) {
|
|
1089
|
+
for (var x in c)
|
|
1090
|
+
o[x] = c[x];
|
|
1091
|
+
}
|
|
1092
|
+
l.from && l.alloc && l.allocUnsafe && l.allocUnsafeSlow ? e.exports = s : (f(s, a), a.Buffer = h);
|
|
1093
|
+
function h(c, o, x) {
|
|
1094
|
+
return l(c, o, x);
|
|
1095
|
+
}
|
|
1096
|
+
h.prototype = Object.create(l.prototype), f(l, h), h.from = function(c, o, x) {
|
|
1097
|
+
if (typeof c == "number")
|
|
1087
1098
|
throw new TypeError("Argument must not be a number");
|
|
1088
|
-
return c
|
|
1089
|
-
}, h.alloc = function(
|
|
1090
|
-
if (typeof
|
|
1099
|
+
return l(c, o, x);
|
|
1100
|
+
}, h.alloc = function(c, o, x) {
|
|
1101
|
+
if (typeof c != "number")
|
|
1091
1102
|
throw new TypeError("Argument must be a number");
|
|
1092
|
-
var
|
|
1093
|
-
return o !== void 0 ? typeof x == "string" ?
|
|
1094
|
-
}, h.allocUnsafe = function(
|
|
1095
|
-
if (typeof
|
|
1103
|
+
var w = l(c);
|
|
1104
|
+
return o !== void 0 ? typeof x == "string" ? w.fill(o, x) : w.fill(o) : w.fill(0), w;
|
|
1105
|
+
}, h.allocUnsafe = function(c) {
|
|
1106
|
+
if (typeof c != "number")
|
|
1096
1107
|
throw new TypeError("Argument must be a number");
|
|
1097
|
-
return c
|
|
1098
|
-
}, h.allocUnsafeSlow = function(
|
|
1099
|
-
if (typeof
|
|
1108
|
+
return l(c);
|
|
1109
|
+
}, h.allocUnsafeSlow = function(c) {
|
|
1110
|
+
if (typeof c != "number")
|
|
1100
1111
|
throw new TypeError("Argument must be a number");
|
|
1101
|
-
return s.SlowBuffer(
|
|
1112
|
+
return s.SlowBuffer(c);
|
|
1102
1113
|
};
|
|
1103
1114
|
})(rt, rt.exports);
|
|
1104
|
-
var
|
|
1105
|
-
function H(
|
|
1106
|
-
this._block =
|
|
1115
|
+
var $t = rt.exports, Jt = $t.Buffer;
|
|
1116
|
+
function H(e, a) {
|
|
1117
|
+
this._block = Jt.alloc(e), this._finalSize = a, this._blockSize = e, this._len = 0;
|
|
1107
1118
|
}
|
|
1108
|
-
H.prototype.update = function(
|
|
1109
|
-
typeof
|
|
1110
|
-
for (var s = this._block,
|
|
1111
|
-
for (var o = h %
|
|
1112
|
-
s[o +
|
|
1113
|
-
h += x,
|
|
1119
|
+
H.prototype.update = function(e, a) {
|
|
1120
|
+
typeof e == "string" && (a = a || "utf8", e = Jt.from(e, a));
|
|
1121
|
+
for (var s = this._block, l = this._blockSize, f = e.length, h = this._len, c = 0; c < f; ) {
|
|
1122
|
+
for (var o = h % l, x = Math.min(f - c, l - o), w = 0; w < x; w++)
|
|
1123
|
+
s[o + w] = e[c + w];
|
|
1124
|
+
h += x, c += x, h % l === 0 && this._update(s);
|
|
1114
1125
|
}
|
|
1115
1126
|
return this._len += f, this;
|
|
1116
1127
|
};
|
|
1117
|
-
H.prototype.digest = function(
|
|
1128
|
+
H.prototype.digest = function(e) {
|
|
1118
1129
|
var a = this._len % this._blockSize;
|
|
1119
1130
|
this._block[a] = 128, this._block.fill(0, a + 1), a >= this._finalSize && (this._update(this._block), this._block.fill(0));
|
|
1120
1131
|
var s = this._len * 8;
|
|
1121
1132
|
if (s <= 4294967295)
|
|
1122
1133
|
this._block.writeUInt32BE(s, this._blockSize - 4);
|
|
1123
1134
|
else {
|
|
1124
|
-
var
|
|
1125
|
-
this._block.writeUInt32BE(f, this._blockSize - 8), this._block.writeUInt32BE(
|
|
1135
|
+
var l = (s & 4294967295) >>> 0, f = (s - l) / 4294967296;
|
|
1136
|
+
this._block.writeUInt32BE(f, this._blockSize - 8), this._block.writeUInt32BE(l, this._blockSize - 4);
|
|
1126
1137
|
}
|
|
1127
1138
|
this._update(this._block);
|
|
1128
1139
|
var h = this._hash();
|
|
1129
|
-
return
|
|
1140
|
+
return e ? h.toString(e) : h;
|
|
1130
1141
|
};
|
|
1131
1142
|
H.prototype._update = function() {
|
|
1132
1143
|
throw new Error("_update must be implemented by subclass");
|
|
1133
1144
|
};
|
|
1134
|
-
var
|
|
1145
|
+
var Pr = H, Wr = Nr, Pt = Pr, Hr = $t.Buffer, Zr = [
|
|
1135
1146
|
1518500249,
|
|
1136
1147
|
1859775393,
|
|
1137
1148
|
-1894007588,
|
|
1138
1149
|
-899497514
|
|
1139
|
-
],
|
|
1150
|
+
], Yr = new Array(80);
|
|
1140
1151
|
function C() {
|
|
1141
|
-
this.init(), this._w =
|
|
1152
|
+
this.init(), this._w = Yr, Pt.call(this, 64, 56);
|
|
1142
1153
|
}
|
|
1143
|
-
|
|
1154
|
+
Wr(C, Pt);
|
|
1144
1155
|
C.prototype.init = function() {
|
|
1145
1156
|
return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
|
|
1146
1157
|
};
|
|
1147
|
-
function
|
|
1148
|
-
return
|
|
1158
|
+
function Kr(e) {
|
|
1159
|
+
return e << 1 | e >>> 31;
|
|
1149
1160
|
}
|
|
1150
|
-
function
|
|
1151
|
-
return
|
|
1161
|
+
function Xr(e) {
|
|
1162
|
+
return e << 5 | e >>> 27;
|
|
1152
1163
|
}
|
|
1153
|
-
function
|
|
1154
|
-
return
|
|
1164
|
+
function Gr(e) {
|
|
1165
|
+
return e << 30 | e >>> 2;
|
|
1155
1166
|
}
|
|
1156
|
-
function
|
|
1157
|
-
return
|
|
1167
|
+
function Vr(e, a, s, l) {
|
|
1168
|
+
return e === 0 ? a & s | ~a & l : e === 2 ? a & s | a & l | s & l : a ^ s ^ l;
|
|
1158
1169
|
}
|
|
1159
|
-
C.prototype._update = function(
|
|
1160
|
-
for (var a = this._w, s = this._a | 0,
|
|
1161
|
-
a[o] =
|
|
1170
|
+
C.prototype._update = function(e) {
|
|
1171
|
+
for (var a = this._w, s = this._a | 0, l = this._b | 0, f = this._c | 0, h = this._d | 0, c = this._e | 0, o = 0; o < 16; ++o)
|
|
1172
|
+
a[o] = e.readInt32BE(o * 4);
|
|
1162
1173
|
for (; o < 80; ++o)
|
|
1163
|
-
a[o] =
|
|
1174
|
+
a[o] = Kr(a[o - 3] ^ a[o - 8] ^ a[o - 14] ^ a[o - 16]);
|
|
1164
1175
|
for (var x = 0; x < 80; ++x) {
|
|
1165
|
-
var
|
|
1166
|
-
|
|
1176
|
+
var w = ~~(x / 20), y = Xr(s) + Vr(w, l, f, h) + c + a[x] + Zr[w] | 0;
|
|
1177
|
+
c = h, h = f, f = Gr(l), l = s, s = y;
|
|
1167
1178
|
}
|
|
1168
|
-
this._a = s + this._a | 0, this._b =
|
|
1179
|
+
this._a = s + this._a | 0, this._b = l + this._b | 0, this._c = f + this._c | 0, this._d = h + this._d | 0, this._e = c + this._e | 0;
|
|
1169
1180
|
};
|
|
1170
1181
|
C.prototype._hash = function() {
|
|
1171
|
-
var
|
|
1172
|
-
return
|
|
1182
|
+
var e = Hr.allocUnsafe(20);
|
|
1183
|
+
return e.writeInt32BE(this._a | 0, 0), e.writeInt32BE(this._b | 0, 4), e.writeInt32BE(this._c | 0, 8), e.writeInt32BE(this._d | 0, 12), e.writeInt32BE(this._e | 0, 16), e;
|
|
1173
1184
|
};
|
|
1174
|
-
var
|
|
1175
|
-
const
|
|
1176
|
-
function
|
|
1185
|
+
var Qr = C;
|
|
1186
|
+
const ti = /* @__PURE__ */ Lt(Qr), st = new Error("File system not available.");
|
|
1187
|
+
function ri(e, a, s) {
|
|
1177
1188
|
throw st;
|
|
1178
1189
|
}
|
|
1179
|
-
function
|
|
1190
|
+
function Wt(e) {
|
|
1180
1191
|
throw st;
|
|
1181
1192
|
}
|
|
1182
|
-
function
|
|
1193
|
+
function ii(e) {
|
|
1183
1194
|
throw st;
|
|
1184
1195
|
}
|
|
1185
|
-
const
|
|
1186
|
-
function
|
|
1196
|
+
const ei = async (e) => Wt();
|
|
1197
|
+
function ni(e) {
|
|
1187
1198
|
let a = "";
|
|
1188
|
-
for (let s = 0; s <
|
|
1189
|
-
a += String.fromCharCode(parseInt(
|
|
1199
|
+
for (let s = 0; s < e.length; s += 2)
|
|
1200
|
+
a += String.fromCharCode(parseInt(e.substr(s, 2), 16));
|
|
1190
1201
|
return btoa(a);
|
|
1191
1202
|
}
|
|
1192
|
-
const Z = (
|
|
1203
|
+
const Z = (e, a = "sha1") => {
|
|
1193
1204
|
if (a !== "sha1")
|
|
1194
1205
|
throw new Error("Only sha1 algorithm is available.");
|
|
1195
|
-
const s = new
|
|
1196
|
-
return
|
|
1197
|
-
},
|
|
1198
|
-
const a = new
|
|
1206
|
+
const s = new ti();
|
|
1207
|
+
return ni(s.update(e).digest("hex"));
|
|
1208
|
+
}, Ht = async (e) => {
|
|
1209
|
+
const a = new At(), { name: s, revision: l, documentType: f, created: h, lastModified: c } = e, o = {
|
|
1199
1210
|
name: s,
|
|
1200
|
-
revision:
|
|
1211
|
+
revision: l,
|
|
1201
1212
|
documentType: f,
|
|
1202
1213
|
created: h,
|
|
1203
|
-
lastModified:
|
|
1214
|
+
lastModified: c
|
|
1204
1215
|
};
|
|
1205
1216
|
return a.file("header.json", JSON.stringify(o, null, 2)), a.file(
|
|
1206
1217
|
"state.json",
|
|
1207
|
-
JSON.stringify(
|
|
1208
|
-
), a.file("operations.json", JSON.stringify(
|
|
1209
|
-
const { data:
|
|
1210
|
-
a.file(
|
|
1218
|
+
JSON.stringify(e.initialState || {}, null, 2)
|
|
1219
|
+
), a.file("operations.json", JSON.stringify(e.operations, null, 2)), Object.keys(e.attachments).forEach((w) => {
|
|
1220
|
+
const { data: y, ..._ } = e.attachments[w];
|
|
1221
|
+
a.file(w, y, {
|
|
1211
1222
|
base64: !0,
|
|
1212
1223
|
createFolders: !0,
|
|
1213
1224
|
comment: JSON.stringify(_)
|
|
1214
1225
|
});
|
|
1215
1226
|
}), a;
|
|
1216
|
-
},
|
|
1217
|
-
await (await
|
|
1227
|
+
}, ai = async (e, a, s, l) => {
|
|
1228
|
+
await (await Ht(e)).generateAsync({
|
|
1218
1229
|
type: "uint8array",
|
|
1219
1230
|
streamFiles: !0
|
|
1220
1231
|
});
|
|
1221
|
-
const h =
|
|
1222
|
-
return
|
|
1232
|
+
const h = l ?? e.name, c = `.${s}.zip`;
|
|
1233
|
+
return ri(
|
|
1223
1234
|
a,
|
|
1224
|
-
h.endsWith(
|
|
1235
|
+
h.endsWith(c) ? h : `${h}${c}`
|
|
1225
1236
|
);
|
|
1226
|
-
},
|
|
1227
|
-
const
|
|
1228
|
-
await f.write(
|
|
1229
|
-
},
|
|
1230
|
-
const s =
|
|
1231
|
-
return
|
|
1232
|
-
},
|
|
1233
|
-
const s = new
|
|
1234
|
-
return await s.loadAsync(
|
|
1237
|
+
}, ji = async (e, a) => {
|
|
1238
|
+
const l = await (await Ht(e)).generateAsync({ type: "blob" }), f = await a.createWritable();
|
|
1239
|
+
await f.write(l), await f.close();
|
|
1240
|
+
}, Et = async (e, a) => {
|
|
1241
|
+
const s = Wt();
|
|
1242
|
+
return oi(s, a);
|
|
1243
|
+
}, oi = async (e, a) => {
|
|
1244
|
+
const s = new At();
|
|
1245
|
+
return await s.loadAsync(e), pi(s, a);
|
|
1235
1246
|
};
|
|
1236
|
-
async function
|
|
1237
|
-
const s =
|
|
1247
|
+
async function pi(e, a) {
|
|
1248
|
+
const s = e.file("state.json");
|
|
1238
1249
|
if (!s)
|
|
1239
1250
|
throw new Error("Initial state not found");
|
|
1240
|
-
const
|
|
1241
|
-
let
|
|
1242
|
-
h && (
|
|
1243
|
-
const o =
|
|
1251
|
+
const l = await s.async("string"), f = JSON.parse(l), h = e.file("header.json");
|
|
1252
|
+
let c = null;
|
|
1253
|
+
h && (c = JSON.parse(await h.async("string")));
|
|
1254
|
+
const o = e.file("operations.json");
|
|
1244
1255
|
if (!o)
|
|
1245
1256
|
throw new Error("Operations history not found");
|
|
1246
1257
|
const x = JSON.parse(
|
|
1247
1258
|
await o.async("string")
|
|
1248
|
-
),
|
|
1259
|
+
), w = {
|
|
1249
1260
|
...f,
|
|
1250
|
-
...
|
|
1261
|
+
...c,
|
|
1251
1262
|
initialState: f,
|
|
1252
|
-
operations: [],
|
|
1263
|
+
operations: { global: [], local: [] },
|
|
1253
1264
|
attachments: { ...f.attachments }
|
|
1254
1265
|
};
|
|
1255
|
-
let
|
|
1256
|
-
(_,
|
|
1257
|
-
|
|
1266
|
+
let y = x.global.concat(x.local).slice(0, c == null ? void 0 : c.revision).reduce(
|
|
1267
|
+
(_, I) => a(_, I),
|
|
1268
|
+
w
|
|
1258
1269
|
);
|
|
1259
|
-
return
|
|
1260
|
-
...
|
|
1261
|
-
...
|
|
1262
|
-
operations:
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1270
|
+
return c && (y = {
|
|
1271
|
+
...y,
|
|
1272
|
+
...c,
|
|
1273
|
+
operations: {
|
|
1274
|
+
global: [
|
|
1275
|
+
...y.operations.global,
|
|
1276
|
+
...x.global.slice(c.revision)
|
|
1277
|
+
],
|
|
1278
|
+
local: y.operations.local
|
|
1279
|
+
}
|
|
1280
|
+
}), y;
|
|
1267
1281
|
}
|
|
1268
|
-
function
|
|
1269
|
-
const a =
|
|
1282
|
+
function Zt(e) {
|
|
1283
|
+
const a = e.replace(/^.*\./, "") || void 0, s = e.replace(/^.*[/\\]/, "") || void 0;
|
|
1270
1284
|
return { extension: a, fileName: s };
|
|
1271
1285
|
}
|
|
1272
|
-
async function
|
|
1273
|
-
const { buffer: a, mimeType: s = "application/octet-stream" } = await
|
|
1286
|
+
async function Ii(e) {
|
|
1287
|
+
const { buffer: a, mimeType: s = "application/octet-stream" } = await ii(), l = Zt(e), f = a.toString("base64");
|
|
1274
1288
|
return {
|
|
1275
1289
|
data: f,
|
|
1276
1290
|
hash: Z(f),
|
|
1277
1291
|
mimeType: s,
|
|
1278
|
-
...
|
|
1292
|
+
...l
|
|
1279
1293
|
};
|
|
1280
1294
|
}
|
|
1281
|
-
async function
|
|
1282
|
-
const a = await
|
|
1283
|
-
return { data: f, hash: Z(f), mimeType: s, ...
|
|
1295
|
+
async function Ui(e) {
|
|
1296
|
+
const a = await ei(), s = Or.getType(e) || "application/octet-stream", l = Zt(e), f = a.toString("base64");
|
|
1297
|
+
return { data: f, hash: Z(f), mimeType: s, ...l };
|
|
1284
1298
|
}
|
|
1285
|
-
function J(
|
|
1286
|
-
const f =
|
|
1287
|
-
return a.reduce(
|
|
1288
|
-
(
|
|
1299
|
+
function J(e, a, s, l) {
|
|
1300
|
+
const f = bi(e), h = yi(s);
|
|
1301
|
+
return a.global.concat(a.local).reduce(
|
|
1302
|
+
(c, o) => h(c, o, l),
|
|
1289
1303
|
f
|
|
1290
1304
|
);
|
|
1291
1305
|
}
|
|
1292
|
-
function
|
|
1293
|
-
return { ...
|
|
1306
|
+
function si(e, a) {
|
|
1307
|
+
return { ...e, name: a };
|
|
1294
1308
|
}
|
|
1295
|
-
function
|
|
1296
|
-
const
|
|
1309
|
+
function li(e, a, s) {
|
|
1310
|
+
const l = Math.min(a, e.revision), f = e.operations.global.slice(
|
|
1297
1311
|
0,
|
|
1298
|
-
|
|
1312
|
+
e.revision - l
|
|
1299
1313
|
);
|
|
1300
1314
|
return {
|
|
1301
1315
|
...J(
|
|
1302
|
-
|
|
1303
|
-
|
|
1316
|
+
e.initialState,
|
|
1317
|
+
{
|
|
1318
|
+
global: f,
|
|
1319
|
+
local: e.operations.local
|
|
1320
|
+
},
|
|
1304
1321
|
s
|
|
1305
1322
|
),
|
|
1306
|
-
operations:
|
|
1307
|
-
revision:
|
|
1323
|
+
operations: e.operations,
|
|
1324
|
+
revision: e.revision - l
|
|
1308
1325
|
};
|
|
1309
1326
|
}
|
|
1310
|
-
function
|
|
1311
|
-
const
|
|
1312
|
-
if (!
|
|
1327
|
+
function ci(e, a, s) {
|
|
1328
|
+
const l = e.operations.global.length - e.revision;
|
|
1329
|
+
if (!l)
|
|
1313
1330
|
throw new Error("There is no UNDO operation to REDO");
|
|
1314
|
-
const f = a <
|
|
1331
|
+
const f = a < l ? a : l, h = e.operations.global.slice(
|
|
1315
1332
|
0,
|
|
1316
|
-
|
|
1333
|
+
e.revision + f
|
|
1317
1334
|
);
|
|
1318
1335
|
return {
|
|
1319
1336
|
...J(
|
|
1320
|
-
|
|
1321
|
-
|
|
1337
|
+
e.initialState,
|
|
1338
|
+
{
|
|
1339
|
+
global: h,
|
|
1340
|
+
local: e.operations.local
|
|
1341
|
+
},
|
|
1322
1342
|
s
|
|
1323
1343
|
),
|
|
1324
|
-
operations:
|
|
1325
|
-
revision:
|
|
1344
|
+
operations: e.operations,
|
|
1345
|
+
revision: e.revision + f
|
|
1326
1346
|
};
|
|
1327
1347
|
}
|
|
1328
|
-
function
|
|
1329
|
-
a = a || 0, s = s ||
|
|
1330
|
-
const f =
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1348
|
+
function ui(e, a, s, l) {
|
|
1349
|
+
a = a || 0, s = s || e.operations.global.length;
|
|
1350
|
+
const f = e.operations.global.slice(a, s), h = e.operations.global.slice(0, a), c = e.operations.global.slice(s), o = J(
|
|
1351
|
+
e.initialState,
|
|
1352
|
+
{
|
|
1353
|
+
global: h.concat(f),
|
|
1354
|
+
local: e.operations.local
|
|
1355
|
+
},
|
|
1356
|
+
l
|
|
1357
|
+
), { name: x, state: w } = o;
|
|
1335
1358
|
return J(
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1359
|
+
e.initialState,
|
|
1360
|
+
{
|
|
1361
|
+
global: [
|
|
1362
|
+
...h,
|
|
1363
|
+
lt({ name: x, state: w }, f.length),
|
|
1364
|
+
...c
|
|
1365
|
+
],
|
|
1366
|
+
local: e.operations.local
|
|
1367
|
+
},
|
|
1368
|
+
l
|
|
1343
1369
|
);
|
|
1344
1370
|
}
|
|
1345
|
-
function
|
|
1371
|
+
function fi(e, a) {
|
|
1346
1372
|
return {
|
|
1347
|
-
...
|
|
1373
|
+
...e,
|
|
1348
1374
|
name: a.name,
|
|
1349
|
-
state: a.state ?? {}
|
|
1375
|
+
state: a.state ?? { global: {}, local: {} }
|
|
1350
1376
|
};
|
|
1351
1377
|
}
|
|
1352
|
-
const
|
|
1353
|
-
function
|
|
1354
|
-
return [Y, K, M].includes(a.type) ?
|
|
1378
|
+
const Yt = "SET_NAME", Y = "UNDO", K = "REDO", M = "PRUNE", Kt = "LOAD_STATE";
|
|
1379
|
+
function hi(e, a) {
|
|
1380
|
+
return [Y, K, M].includes(a.type) ? e.revision : e.revision + 1;
|
|
1355
1381
|
}
|
|
1356
|
-
function
|
|
1382
|
+
function mi(e, a) {
|
|
1357
1383
|
return {
|
|
1358
|
-
...
|
|
1359
|
-
revision:
|
|
1384
|
+
...e,
|
|
1385
|
+
revision: hi(e, a),
|
|
1360
1386
|
lastModified: (/* @__PURE__ */ new Date()).toISOString()
|
|
1361
1387
|
};
|
|
1362
1388
|
}
|
|
1363
|
-
function
|
|
1389
|
+
function xi(e, a) {
|
|
1364
1390
|
if ([Y, K, M, M].includes(a.type))
|
|
1365
|
-
return
|
|
1366
|
-
const s =
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1391
|
+
return e;
|
|
1392
|
+
const s = e.operations.global.slice(
|
|
1393
|
+
0,
|
|
1394
|
+
e.revision
|
|
1395
|
+
), l = e.operations.local.slice();
|
|
1396
|
+
return !a.scope || a.scope === "global" ? s.push({
|
|
1397
|
+
...a,
|
|
1398
|
+
index: s.length,
|
|
1399
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1400
|
+
hash: "",
|
|
1401
|
+
scope: "global"
|
|
1402
|
+
}) : a.scope === "local" && l.push({
|
|
1403
|
+
...a,
|
|
1404
|
+
index: l.length,
|
|
1405
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1406
|
+
hash: "",
|
|
1407
|
+
scope: "local"
|
|
1408
|
+
}), {
|
|
1409
|
+
...e,
|
|
1410
|
+
operations: {
|
|
1411
|
+
global: s,
|
|
1412
|
+
local: l
|
|
1413
|
+
}
|
|
1378
1414
|
};
|
|
1379
1415
|
}
|
|
1380
|
-
function
|
|
1381
|
-
let s =
|
|
1382
|
-
return s =
|
|
1416
|
+
function gi(e, a) {
|
|
1417
|
+
let s = xi(e, a);
|
|
1418
|
+
return (!a.scope || a.scope === "global") && (s = mi(s, a)), s;
|
|
1383
1419
|
}
|
|
1384
|
-
function
|
|
1385
|
-
switch (
|
|
1386
|
-
case
|
|
1387
|
-
return
|
|
1420
|
+
function di(e, a, s) {
|
|
1421
|
+
switch (Tt().parse(a), a.type) {
|
|
1422
|
+
case Yt:
|
|
1423
|
+
return si(e, a.input);
|
|
1388
1424
|
case Y:
|
|
1389
|
-
return
|
|
1425
|
+
return li(e, a.input, s);
|
|
1390
1426
|
case K:
|
|
1391
|
-
return
|
|
1427
|
+
return ci(e, a.input, s);
|
|
1392
1428
|
case M:
|
|
1393
|
-
return
|
|
1394
|
-
|
|
1429
|
+
return ui(
|
|
1430
|
+
e,
|
|
1395
1431
|
a.input.start,
|
|
1396
1432
|
a.input.end,
|
|
1397
1433
|
s
|
|
1398
1434
|
);
|
|
1399
|
-
case
|
|
1400
|
-
return
|
|
1435
|
+
case Kt:
|
|
1436
|
+
return fi(e, a.input.state);
|
|
1401
1437
|
default:
|
|
1402
|
-
return
|
|
1438
|
+
return e;
|
|
1403
1439
|
}
|
|
1404
1440
|
}
|
|
1405
|
-
function
|
|
1406
|
-
let f =
|
|
1407
|
-
return _t(a) && (f =
|
|
1408
|
-
const
|
|
1409
|
-
if (
|
|
1410
|
-
return
|
|
1441
|
+
function wi(e, a, s, l) {
|
|
1442
|
+
let f = e;
|
|
1443
|
+
return _t(a) && (f = di(f, a, s)), f = gi(f, a), f = bt(f, (h) => {
|
|
1444
|
+
const c = s(h.state, a, l);
|
|
1445
|
+
if (c)
|
|
1446
|
+
return Er({
|
|
1411
1447
|
...f,
|
|
1412
|
-
state:
|
|
1448
|
+
state: c
|
|
1413
1449
|
});
|
|
1414
|
-
}),
|
|
1415
|
-
h.operations[h.operations.length - 1].hash =
|
|
1416
|
-
const { hash: o, ...x } =
|
|
1450
|
+
}), bt(f, (h) => {
|
|
1451
|
+
!a.scope || a.scope === "global" ? h.operations.global[h.operations.global.length - 1].hash = Ft(h, "global") : a.scope === "local" && (h.operations.local[h.operations.local.length - 1].hash = Ft(h, "local")), !_t(a) && a.attachments && a.attachments.forEach((c) => {
|
|
1452
|
+
const { hash: o, ...x } = c;
|
|
1417
1453
|
h.attachments[o] = {
|
|
1418
1454
|
...x
|
|
1419
1455
|
};
|
|
1420
1456
|
});
|
|
1421
1457
|
});
|
|
1422
1458
|
}
|
|
1423
|
-
function _t(
|
|
1424
|
-
return [
|
|
1459
|
+
function _t(e) {
|
|
1460
|
+
return [Yt, Y, K, M, Kt].includes(e.type);
|
|
1425
1461
|
}
|
|
1426
|
-
function R(
|
|
1427
|
-
if (!
|
|
1462
|
+
function R(e, a, s, l, f = "global") {
|
|
1463
|
+
if (!e)
|
|
1428
1464
|
throw new Error("Empty action type");
|
|
1429
|
-
if (typeof
|
|
1430
|
-
throw new Error(`Invalid action type: ${
|
|
1431
|
-
const h = { type:
|
|
1432
|
-
|
|
1465
|
+
if (typeof e != "string")
|
|
1466
|
+
throw new Error(`Invalid action type: ${e}`);
|
|
1467
|
+
const h = { type: e, input: a, scope: f };
|
|
1468
|
+
s && (h.attachments = s);
|
|
1469
|
+
try {
|
|
1470
|
+
l == null || l().parse(h.input);
|
|
1471
|
+
} catch (c) {
|
|
1472
|
+
throw new Error(`Invalid action input: ${c}`);
|
|
1473
|
+
}
|
|
1474
|
+
return h;
|
|
1433
1475
|
}
|
|
1434
|
-
function
|
|
1435
|
-
return (s,
|
|
1476
|
+
function yi(e, a = wi) {
|
|
1477
|
+
return (s, l, f) => a(s, l, e, f);
|
|
1436
1478
|
}
|
|
1437
|
-
const
|
|
1479
|
+
const vi = (e, a) => ({
|
|
1438
1480
|
name: "",
|
|
1439
1481
|
documentType: "",
|
|
1440
1482
|
revision: 0,
|
|
1441
1483
|
created: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1442
1484
|
lastModified: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1443
1485
|
attachments: {},
|
|
1444
|
-
...
|
|
1445
|
-
state: (a == null ? void 0 : a(
|
|
1446
|
-
}),
|
|
1447
|
-
const s =
|
|
1448
|
-
|
|
1486
|
+
...e,
|
|
1487
|
+
state: (a == null ? void 0 : a(e == null ? void 0 : e.state)) ?? (e == null ? void 0 : e.state) ?? { global: {}, local: {} }
|
|
1488
|
+
}), bi = (e, a) => {
|
|
1489
|
+
const s = vi(
|
|
1490
|
+
e,
|
|
1449
1491
|
a
|
|
1450
1492
|
);
|
|
1451
1493
|
return {
|
|
1452
1494
|
...s,
|
|
1453
1495
|
initialState: s,
|
|
1454
|
-
operations: []
|
|
1496
|
+
operations: { global: [], local: [] }
|
|
1455
1497
|
};
|
|
1456
|
-
},
|
|
1498
|
+
}, Ft = (e, a = "global") => Z(
|
|
1499
|
+
br(
|
|
1500
|
+
a === "local" ? e.state.local : e.state.global
|
|
1501
|
+
)
|
|
1502
|
+
), ki = (e, a = 1e3) => {
|
|
1457
1503
|
const s = Math.random() * a;
|
|
1458
|
-
return Z(`${(
|
|
1504
|
+
return Z(`${(e ?? /* @__PURE__ */ new Date()).toISOString()}${s}`);
|
|
1459
1505
|
};
|
|
1460
|
-
function $(
|
|
1461
|
-
return
|
|
1506
|
+
function $(e) {
|
|
1507
|
+
return _r(Fr(e, !0));
|
|
1462
1508
|
}
|
|
1463
|
-
const
|
|
1509
|
+
const Xt = (e) => R(
|
|
1464
1510
|
"SET_NAME",
|
|
1465
|
-
|
|
1511
|
+
e,
|
|
1466
1512
|
void 0,
|
|
1467
1513
|
at
|
|
1468
|
-
),
|
|
1514
|
+
), Gt = (e = 1) => R("UNDO", e, void 0, ot), Vt = (e = 1) => R("REDO", e, void 0, nt), Qt = (e, a) => R(
|
|
1469
1515
|
"PRUNE",
|
|
1470
|
-
{ start:
|
|
1516
|
+
{ start: e, end: a },
|
|
1471
1517
|
void 0,
|
|
1472
1518
|
et
|
|
1473
|
-
),
|
|
1519
|
+
), lt = (e, a) => R(
|
|
1474
1520
|
"LOAD_STATE",
|
|
1475
|
-
{ state:
|
|
1521
|
+
{ state: e, operations: a },
|
|
1476
1522
|
void 0,
|
|
1477
1523
|
it
|
|
1478
|
-
),
|
|
1524
|
+
), Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1479
1525
|
__proto__: null,
|
|
1480
|
-
loadState:
|
|
1481
|
-
prune:
|
|
1482
|
-
redo:
|
|
1483
|
-
setName:
|
|
1484
|
-
undo:
|
|
1526
|
+
loadState: lt,
|
|
1527
|
+
prune: Qt,
|
|
1528
|
+
redo: Vt,
|
|
1529
|
+
setName: Xt,
|
|
1530
|
+
undo: Gt
|
|
1485
1531
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1486
|
-
class
|
|
1532
|
+
class Di {
|
|
1487
1533
|
/**
|
|
1488
1534
|
* Constructs a BaseDocument instance with an initial state.
|
|
1489
1535
|
* @param reducer - The reducer function that updates the state.
|
|
1490
1536
|
* @param document - The initial state of the document.
|
|
1491
1537
|
*/
|
|
1492
|
-
constructor(a, s,
|
|
1538
|
+
constructor(a, s, l) {
|
|
1493
1539
|
q(this, "_document");
|
|
1494
1540
|
q(this, "_reducer");
|
|
1495
1541
|
q(this, "_signalDispatch");
|
|
1496
|
-
this._reducer = a, this._document = s, this._signalDispatch =
|
|
1542
|
+
this._reducer = a, this._document = s, this._signalDispatch = l;
|
|
1497
1543
|
}
|
|
1498
1544
|
/**
|
|
1499
1545
|
* Dispatches an action to update the state of the document.
|
|
@@ -1513,15 +1559,15 @@ class Ii {
|
|
|
1513
1559
|
* @param extension - The file extension to use when saving the state.
|
|
1514
1560
|
* @returns The file path where the state was saved.
|
|
1515
1561
|
*/
|
|
1516
|
-
saveToFile(a, s,
|
|
1517
|
-
return
|
|
1562
|
+
saveToFile(a, s, l) {
|
|
1563
|
+
return ai(this._document, a, s, l);
|
|
1518
1564
|
}
|
|
1519
1565
|
/**
|
|
1520
1566
|
* Loads the state of the document from a file.
|
|
1521
1567
|
* @param path - The file path where the state is stored.
|
|
1522
1568
|
*/
|
|
1523
1569
|
async loadFromFile(a) {
|
|
1524
|
-
this._document = await
|
|
1570
|
+
this._document = await Et(a, this._reducer);
|
|
1525
1571
|
}
|
|
1526
1572
|
/**
|
|
1527
1573
|
* Loads the state of the document from a file and returns it.
|
|
@@ -1530,7 +1576,7 @@ class Ii {
|
|
|
1530
1576
|
* @returns The state of the document.
|
|
1531
1577
|
*/
|
|
1532
1578
|
static async stateFromFile(a, s) {
|
|
1533
|
-
return await
|
|
1579
|
+
return await Et(a, s);
|
|
1534
1580
|
}
|
|
1535
1581
|
/**
|
|
1536
1582
|
* Gets the current state of the document.
|
|
@@ -1598,21 +1644,21 @@ class Ii {
|
|
|
1598
1644
|
* @param name - The new name of the document.
|
|
1599
1645
|
*/
|
|
1600
1646
|
setName(a) {
|
|
1601
|
-
return this.dispatch(
|
|
1647
|
+
return this.dispatch(Xt(a)), this;
|
|
1602
1648
|
}
|
|
1603
1649
|
/**
|
|
1604
1650
|
* Reverts a number of actions from the document.
|
|
1605
1651
|
* @param count - The number of actions to revert.
|
|
1606
1652
|
*/
|
|
1607
1653
|
undo(a) {
|
|
1608
|
-
return this.dispatch(
|
|
1654
|
+
return this.dispatch(Gt(a)), this;
|
|
1609
1655
|
}
|
|
1610
1656
|
/**
|
|
1611
1657
|
* Reapplies a number of actions to the document.
|
|
1612
1658
|
* @param count - The number of actions to reapply.
|
|
1613
1659
|
*/
|
|
1614
1660
|
redo(a) {
|
|
1615
|
-
return this.dispatch(
|
|
1661
|
+
return this.dispatch(Vt(a)), this;
|
|
1616
1662
|
}
|
|
1617
1663
|
/**
|
|
1618
1664
|
* Removes a range of operations from the document.
|
|
@@ -1620,7 +1666,7 @@ class Ii {
|
|
|
1620
1666
|
* @param end - The ending index of the range to remove.
|
|
1621
1667
|
*/
|
|
1622
1668
|
prune(a, s) {
|
|
1623
|
-
return this.dispatch(
|
|
1669
|
+
return this.dispatch(Qt(a, s)), this;
|
|
1624
1670
|
}
|
|
1625
1671
|
/**
|
|
1626
1672
|
* Loads a document state and a set of operations.
|
|
@@ -1628,39 +1674,39 @@ class Ii {
|
|
|
1628
1674
|
* @param operations - The operations to apply to the document.
|
|
1629
1675
|
*/
|
|
1630
1676
|
loadState(a, s) {
|
|
1631
|
-
return this.dispatch(
|
|
1677
|
+
return this.dispatch(lt(a, s)), this;
|
|
1632
1678
|
}
|
|
1633
1679
|
}
|
|
1634
|
-
function
|
|
1680
|
+
function Oi(e, a) {
|
|
1635
1681
|
a.forEach((s) => {
|
|
1636
|
-
Object.getOwnPropertyNames(s.prototype).forEach((
|
|
1682
|
+
Object.getOwnPropertyNames(s.prototype).forEach((l) => {
|
|
1637
1683
|
Object.defineProperty(
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
Object.getOwnPropertyDescriptor(s.prototype,
|
|
1684
|
+
e.prototype,
|
|
1685
|
+
l,
|
|
1686
|
+
Object.getOwnPropertyDescriptor(s.prototype, l) || /* @__PURE__ */ Object.create(null)
|
|
1641
1687
|
);
|
|
1642
1688
|
});
|
|
1643
1689
|
});
|
|
1644
1690
|
}
|
|
1645
1691
|
export {
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1692
|
+
Di as B,
|
|
1693
|
+
vi as a,
|
|
1694
|
+
bi as b,
|
|
1695
|
+
yi as c,
|
|
1696
|
+
ji as d,
|
|
1697
|
+
oi as e,
|
|
1652
1698
|
R as f,
|
|
1653
|
-
|
|
1654
|
-
|
|
1699
|
+
Oi as g,
|
|
1700
|
+
Ti as h,
|
|
1655
1701
|
_t as i,
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1702
|
+
Ht as j,
|
|
1703
|
+
Ui as k,
|
|
1704
|
+
Et as l,
|
|
1705
|
+
Ii as m,
|
|
1706
|
+
Ft as n,
|
|
1707
|
+
ki as o,
|
|
1708
|
+
wi as p,
|
|
1663
1709
|
$ as r,
|
|
1664
|
-
|
|
1665
|
-
|
|
1710
|
+
ai as s,
|
|
1711
|
+
Bi as z
|
|
1666
1712
|
};
|