document-model 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/browser/document/object.d.ts +137 -4
  2. package/dist/browser/document/utils/base.d.ts +1 -0
  3. package/dist/browser/document-model.cjs +1 -1
  4. package/dist/browser/document-model.js +2 -2
  5. package/dist/browser/document.cjs +1 -1
  6. package/dist/browser/document.js +3 -3
  7. package/dist/browser/index.cjs +1 -1
  8. package/dist/browser/index.js +4 -4
  9. package/dist/browser/internal/{index-d577364b.js → index-48f140bc.js} +1 -1
  10. package/dist/browser/internal/{index-91e3abf2.js → index-7d7d05c8.js} +1 -1
  11. package/dist/browser/internal/index-9922a4fc.js +31 -0
  12. package/dist/browser/internal/index-ff22a5bb.js +1 -0
  13. package/dist/browser/internal/{object-e8af0c3a.js → object-98a2cff6.js} +313 -308
  14. package/dist/browser/internal/object-ceb8f869.js +6 -0
  15. package/dist/node/document/object.d.ts +137 -4
  16. package/dist/node/document/utils/base.d.ts +1 -0
  17. package/dist/node/document-model.cjs +1 -1
  18. package/dist/node/document-model.js +2 -2
  19. package/dist/node/document.cjs +1 -1
  20. package/dist/node/document.js +4 -4
  21. package/dist/node/index.cjs +1 -1
  22. package/dist/node/index.js +5 -5
  23. package/dist/node/internal/{index-574ece31.js → index-2e487f63.js} +1 -1
  24. package/dist/node/internal/index-5b0ca13a.js +31 -0
  25. package/dist/node/internal/index-6a7277fe.js +1 -0
  26. package/dist/node/internal/{index-f3fdeced.js → index-dfaca09a.js} +1 -1
  27. package/dist/node/internal/{object-9fcc9b3e.js → object-10abe15d.js} +1 -1
  28. package/dist/node/internal/{object-19968a54.js → object-6f942fcb.js} +194 -189
  29. package/package.json +1 -1
  30. package/dist/browser/internal/index-05f6fe71.js +0 -30
  31. package/dist/browser/internal/index-336e6f47.js +0 -1
  32. package/dist/browser/internal/object-41731a51.js +0 -6
  33. package/dist/node/internal/index-6ee6330b.js +0 -1
  34. package/dist/node/internal/index-af4b7a66.js +0 -30
@@ -1,27 +1,27 @@
1
- var mr = Object.defineProperty;
2
- var xr = (n, a, s) => a in n ? mr(n, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[a] = s;
3
- var G = (n, a, s) => (xr(n, typeof a != "symbol" ? a + "" : a, s), s);
4
- import dr from "json-stringify-deterministic";
5
- import { produce as vt, castDraft as wr } from "immer";
1
+ var xr = Object.defineProperty;
2
+ var dr = (n, a, s) => a in n ? xr(n, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[a] = s;
3
+ var V = (n, a, s) => (dr(n, typeof a != "symbol" ? a + "" : a, s), s);
4
+ import wr from "json-stringify-deterministic";
5
+ import { produce as Et, castDraft as yr, castImmutable as gr, freeze as vr } from "immer";
6
+ import _t from "jszip";
6
7
  import { z as d } from "zod";
7
- import Ft from "jszip";
8
- const _t = (n) => n != null, yr = d.any().refine((n) => _t(n)), At = d.enum(["LOAD_STATE"]), Bt = d.enum(["PRUNE"]), St = d.enum(["REDO"]), jt = d.enum(["SET_NAME"]), Ut = d.enum(["UNDO"]);
9
- function gr() {
8
+ const At = (n) => n != null, Er = d.any().refine((n) => At(n)), Bt = d.enum(["LOAD_STATE"]), St = d.enum(["PRUNE"]), jt = d.enum(["REDO"]), Ut = d.enum(["SET_NAME"]), It = d.enum(["UNDO"]);
9
+ function br() {
10
10
  return d.object({
11
11
  __typename: d.literal("Action").optional(),
12
12
  type: d.string()
13
13
  });
14
14
  }
15
- function It() {
15
+ function kt() {
16
16
  return d.union([
17
- rt(),
18
17
  it(),
19
18
  et(),
20
19
  nt(),
21
- at()
20
+ at(),
21
+ ot()
22
22
  ]);
23
23
  }
24
- function vr() {
24
+ function Fr() {
25
25
  return d.object({
26
26
  __typename: d.literal("DocumentFile").optional(),
27
27
  data: d.string(),
@@ -30,25 +30,25 @@ function vr() {
30
30
  mimeType: d.string()
31
31
  });
32
32
  }
33
- function rt() {
33
+ function it() {
34
34
  return d.object({
35
- input: d.lazy(() => kt()),
36
- type: At
35
+ input: d.lazy(() => Tt()),
36
+ type: Bt
37
37
  });
38
38
  }
39
- function kt() {
39
+ function Tt() {
40
40
  return d.object({
41
41
  operations: d.number(),
42
- state: d.lazy(() => Tt())
42
+ state: d.lazy(() => Dt())
43
43
  });
44
44
  }
45
- function Tt() {
45
+ function Dt() {
46
46
  return d.object({
47
47
  data: d.unknown().nullish(),
48
48
  name: d.string()
49
49
  });
50
50
  }
51
- function Er() {
51
+ function _r() {
52
52
  return d.object({
53
53
  __typename: d.literal("Operation").optional(),
54
54
  hash: d.string(),
@@ -57,31 +57,31 @@ function Er() {
57
57
  type: d.string()
58
58
  });
59
59
  }
60
- function it() {
60
+ function et() {
61
61
  return d.object({
62
- input: d.lazy(() => Dt()),
63
- type: Bt
62
+ input: d.lazy(() => Ot()),
63
+ type: St
64
64
  });
65
65
  }
66
- function Dt() {
66
+ function Ot() {
67
67
  return d.object({
68
68
  end: d.number().nullish(),
69
69
  start: d.number().nullish()
70
70
  });
71
71
  }
72
- function et() {
72
+ function nt() {
73
73
  return d.object({
74
74
  input: d.number(),
75
- type: St
75
+ type: jt
76
76
  });
77
77
  }
78
- function nt() {
78
+ function at() {
79
79
  return d.object({
80
80
  input: d.string(),
81
- type: jt
81
+ type: Ut
82
82
  });
83
83
  }
84
- function br() {
84
+ function Ar() {
85
85
  return d.object({
86
86
  __typename: d.literal("SetNameOperation").optional(),
87
87
  hash: d.string(),
@@ -91,45 +91,45 @@ function br() {
91
91
  type: d.string()
92
92
  });
93
93
  }
94
- function at() {
94
+ function ot() {
95
95
  return d.object({
96
96
  input: d.number(),
97
- type: Ut
97
+ type: It
98
98
  });
99
99
  }
100
- const Ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
100
+ const _i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
101
101
  __proto__: null,
102
- ActionSchema: gr,
103
- BaseActionSchema: It,
104
- DocumentFileSchema: vr,
105
- LoadStateActionInputSchema: kt,
106
- LoadStateActionSchema: rt,
107
- LoadStateActionStateInputSchema: Tt,
108
- Load_StateSchema: At,
109
- OperationSchema: Er,
110
- PruneActionInputSchema: Dt,
111
- PruneActionSchema: it,
112
- PruneSchema: Bt,
113
- RedoActionSchema: et,
114
- RedoSchema: St,
115
- SetNameActionSchema: nt,
116
- SetNameOperationSchema: br,
117
- Set_NameSchema: jt,
118
- UndoActionSchema: at,
119
- UndoSchema: Ut,
120
- definedNonNullAnySchema: yr,
121
- isDefinedNonNullAny: _t
102
+ ActionSchema: br,
103
+ BaseActionSchema: kt,
104
+ DocumentFileSchema: Fr,
105
+ LoadStateActionInputSchema: Tt,
106
+ LoadStateActionSchema: it,
107
+ LoadStateActionStateInputSchema: Dt,
108
+ Load_StateSchema: Bt,
109
+ OperationSchema: _r,
110
+ PruneActionInputSchema: Ot,
111
+ PruneActionSchema: et,
112
+ PruneSchema: St,
113
+ RedoActionSchema: nt,
114
+ RedoSchema: jt,
115
+ SetNameActionSchema: at,
116
+ SetNameOperationSchema: Ar,
117
+ Set_NameSchema: Ut,
118
+ UndoActionSchema: ot,
119
+ UndoSchema: It,
120
+ definedNonNullAnySchema: Er,
121
+ isDefinedNonNullAny: At
122
122
  }, Symbol.toStringTag, { value: "Module" }));
123
- function Ot(n) {
123
+ function Nt(n) {
124
124
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
125
125
  }
126
- function $() {
126
+ function J() {
127
127
  this._types = /* @__PURE__ */ Object.create(null), this._extensions = /* @__PURE__ */ Object.create(null);
128
128
  for (let n = 0; n < arguments.length; n++)
129
129
  this.define(arguments[n]);
130
130
  this.define = this.define.bind(this), this.getType = this.getType.bind(this), this.getExtension = this.getExtension.bind(this);
131
131
  }
132
- $.prototype.define = function(n, a) {
132
+ J.prototype.define = function(n, a) {
133
133
  for (let s in n) {
134
134
  let c = n[s].map(function(f) {
135
135
  return f.toLowerCase();
@@ -151,20 +151,20 @@ $.prototype.define = function(n, a) {
151
151
  }
152
152
  }
153
153
  };
154
- $.prototype.getType = function(n) {
154
+ J.prototype.getType = function(n) {
155
155
  n = String(n);
156
156
  let a = n.replace(/^.*[/\\]/, "").toLowerCase(), s = a.replace(/^.*\./, "").toLowerCase(), c = a.length < n.length;
157
157
  return (s.length < a.length - 1 || !c) && this._types[s] || null;
158
158
  };
159
- $.prototype.getExtension = function(n) {
159
+ J.prototype.getExtension = function(n) {
160
160
  return n = /^\s*([^;\s]*)/.test(n) && RegExp.$1, n && this._extensions[n.toLowerCase()] || null;
161
161
  };
162
- var Fr = $, _r = { "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 Ar = Fr;
164
- var Br = new Ar(_r);
165
- const Sr = /* @__PURE__ */ Ot(Br);
166
- var Q = { exports: {} };
167
- typeof Object.create == "function" ? Q.exports = function(a, s) {
162
+ var Br = J, 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 jr = Br;
164
+ var Ur = new jr(Sr);
165
+ const Ir = /* @__PURE__ */ Nt(Ur);
166
+ var tt = { exports: {} };
167
+ typeof Object.create == "function" ? tt.exports = function(a, s) {
168
168
  s && (a.super_ = s, a.prototype = Object.create(s.prototype, {
169
169
  constructor: {
170
170
  value: a,
@@ -173,7 +173,7 @@ typeof Object.create == "function" ? Q.exports = function(a, s) {
173
173
  configurable: !0
174
174
  }
175
175
  }));
176
- } : Q.exports = function(a, s) {
176
+ } : tt.exports = function(a, s) {
177
177
  if (s) {
178
178
  a.super_ = s;
179
179
  var c = function() {
@@ -181,16 +181,16 @@ typeof Object.create == "function" ? Q.exports = function(a, s) {
181
181
  c.prototype = s.prototype, a.prototype = new c(), a.prototype.constructor = a;
182
182
  }
183
183
  };
184
- var jr = Q.exports, tt = { exports: {} }, Nt = {}, J = {};
185
- J.byteLength = kr;
186
- J.toByteArray = Dr;
187
- J.fromByteArray = Mr;
188
- var k = [], j = [], Ur = typeof Uint8Array < "u" ? Uint8Array : Array, V = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
189
- for (var D = 0, Ir = V.length; D < Ir; ++D)
190
- k[D] = V[D], j[V.charCodeAt(D)] = D;
184
+ var kr = tt.exports, rt = { exports: {} }, Mt = {}, P = {};
185
+ P.byteLength = Or;
186
+ P.toByteArray = Mr;
187
+ P.fromByteArray = Lr;
188
+ var k = [], j = [], Tr = typeof Uint8Array < "u" ? Uint8Array : Array, Q = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
189
+ for (var D = 0, Dr = Q.length; D < Dr; ++D)
190
+ k[D] = Q[D], j[Q.charCodeAt(D)] = D;
191
191
  j["-".charCodeAt(0)] = 62;
192
192
  j["_".charCodeAt(0)] = 63;
193
- function Mt(n) {
193
+ function Ct(n) {
194
194
  var a = n.length;
195
195
  if (a % 4 > 0)
196
196
  throw new Error("Invalid string. Length must be a multiple of 4");
@@ -199,39 +199,39 @@ function Mt(n) {
199
199
  var c = s === a ? 0 : 4 - s % 4;
200
200
  return [s, c];
201
201
  }
202
- function kr(n) {
203
- var a = Mt(n), s = a[0], c = a[1];
202
+ function Or(n) {
203
+ var a = Ct(n), s = a[0], c = a[1];
204
204
  return (s + c) * 3 / 4 - c;
205
205
  }
206
- function Tr(n, a, s) {
206
+ function Nr(n, a, s) {
207
207
  return (a + s) * 3 / 4 - s;
208
208
  }
209
- function Dr(n) {
210
- var a, s = Mt(n), c = s[0], f = s[1], m = new Ur(Tr(n, c, f)), u = 0, o = f > 0 ? c - 4 : c, x;
209
+ function Mr(n) {
210
+ var a, s = Ct(n), c = s[0], f = s[1], m = new Tr(Nr(n, c, f)), u = 0, o = f > 0 ? c - 4 : c, x;
211
211
  for (x = 0; x < o; x += 4)
212
212
  a = j[n.charCodeAt(x)] << 18 | j[n.charCodeAt(x + 1)] << 12 | j[n.charCodeAt(x + 2)] << 6 | j[n.charCodeAt(x + 3)], m[u++] = a >> 16 & 255, m[u++] = a >> 8 & 255, m[u++] = a & 255;
213
213
  return f === 2 && (a = j[n.charCodeAt(x)] << 2 | j[n.charCodeAt(x + 1)] >> 4, m[u++] = a & 255), f === 1 && (a = j[n.charCodeAt(x)] << 10 | j[n.charCodeAt(x + 1)] << 4 | j[n.charCodeAt(x + 2)] >> 2, m[u++] = a >> 8 & 255, m[u++] = a & 255), m;
214
214
  }
215
- function Or(n) {
215
+ function Cr(n) {
216
216
  return k[n >> 18 & 63] + k[n >> 12 & 63] + k[n >> 6 & 63] + k[n & 63];
217
217
  }
218
- function Nr(n, a, s) {
218
+ function Rr(n, a, s) {
219
219
  for (var c, f = [], m = a; m < s; m += 3)
220
- c = (n[m] << 16 & 16711680) + (n[m + 1] << 8 & 65280) + (n[m + 2] & 255), f.push(Or(c));
220
+ c = (n[m] << 16 & 16711680) + (n[m + 1] << 8 & 65280) + (n[m + 2] & 255), f.push(Cr(c));
221
221
  return f.join("");
222
222
  }
223
- function Mr(n) {
223
+ function Lr(n) {
224
224
  for (var a, s = n.length, c = s % 3, f = [], m = 16383, u = 0, o = s - c; u < o; u += m)
225
- f.push(Nr(n, u, u + m > o ? o : u + m));
225
+ f.push(Rr(n, u, u + m > o ? o : u + m));
226
226
  return c === 1 ? (a = n[s - 1], f.push(
227
227
  k[a >> 2] + k[a << 4 & 63] + "=="
228
228
  )) : c === 2 && (a = (n[s - 2] << 8) + n[s - 1], f.push(
229
229
  k[a >> 10] + k[a >> 4 & 63] + k[a << 2 & 63] + "="
230
230
  )), f.join("");
231
231
  }
232
- var ot = {};
232
+ var pt = {};
233
233
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
234
- ot.read = function(n, a, s, c, f) {
234
+ pt.read = function(n, a, s, c, f) {
235
235
  var m, u, o = f * 8 - c - 1, x = (1 << o) - 1, y = x >> 1, v = -7, F = s ? f - 1 : 0, U = s ? -1 : 1, B = n[a + F];
236
236
  for (F += U, m = B & (1 << -v) - 1, B >>= -v, v += o; v > 0; m = m * 256 + n[a + F], F += U, v -= 8)
237
237
  ;
@@ -246,7 +246,7 @@ ot.read = function(n, a, s, c, f) {
246
246
  }
247
247
  return (B ? -1 : 1) * u * Math.pow(2, m - c);
248
248
  };
249
- ot.write = function(n, a, s, c, f, m) {
249
+ pt.write = function(n, a, s, c, f, m) {
250
250
  var u, o, x, y = m * 8 - f - 1, v = (1 << y) - 1, F = v >> 1, U = f === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, B = c ? 0 : m - 1, O = c ? 1 : -1, N = a < 0 || a === 0 && 1 / a < 0 ? 1 : 0;
251
251
  for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (o = isNaN(a) ? 1 : 0, u = v) : (u = Math.floor(Math.log(a) / Math.LN2), a * (x = Math.pow(2, -u)) < 1 && (u--, x *= 2), u + F >= 1 ? a += U / x : a += U * Math.pow(2, 1 - F), a * x >= 2 && (u++, x /= 2), u + F >= v ? (o = 0, u = v) : u + F >= 1 ? (o = (a * x - 1) * Math.pow(2, f), u = u + F) : (o = a * Math.pow(2, F - 1) * Math.pow(2, f), u = 0)); f >= 8; n[s + B] = o & 255, B += O, o /= 256, f -= 8)
252
252
  ;
@@ -261,8 +261,8 @@ ot.write = function(n, a, s, c, f, m) {
261
261
  * @license MIT
262
262
  */
263
263
  (function(n) {
264
- var a = J, s = ot, c = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
265
- n.Buffer = o, n.SlowBuffer = Xt, n.INSPECT_MAX_BYTES = 50;
264
+ var a = P, s = pt, c = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
265
+ n.Buffer = o, n.SlowBuffer = Gt, n.INSPECT_MAX_BYTES = 50;
266
266
  var f = 2147483647;
267
267
  n.kMaxLength = f, o.TYPED_ARRAY_SUPPORT = m(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
268
268
  "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
@@ -325,7 +325,7 @@ ot.write = function(n, a, s, c, f, m) {
325
325
  var e = i.valueOf && i.valueOf();
326
326
  if (e != null && e !== i)
327
327
  return o.from(e, t, r);
328
- var p = Kt(i);
328
+ var p = Xt(i);
329
329
  if (p)
330
330
  return p;
331
331
  if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof i[Symbol.toPrimitive] == "function")
@@ -354,7 +354,7 @@ ot.write = function(n, a, s, c, f, m) {
354
354
  return v(i, t, r);
355
355
  };
356
356
  function F(i) {
357
- return y(i), u(i < 0 ? 0 : Y(i) | 0);
357
+ return y(i), u(i < 0 ? 0 : K(i) | 0);
358
358
  }
359
359
  o.allocUnsafe = function(i) {
360
360
  return F(i);
@@ -364,11 +364,11 @@ ot.write = function(n, a, s, c, f, m) {
364
364
  function U(i, t) {
365
365
  if ((typeof t != "string" || t === "") && (t = "utf8"), !o.isEncoding(t))
366
366
  throw new TypeError("Unknown encoding: " + t);
367
- var r = ct(i, t) | 0, e = u(r), p = e.write(i, t);
367
+ var r = lt(i, t) | 0, e = u(r), p = e.write(i, t);
368
368
  return p !== r && (e = e.slice(0, p)), e;
369
369
  }
370
370
  function B(i) {
371
- for (var t = i.length < 0 ? 0 : Y(i.length) | 0, r = u(t), e = 0; e < t; e += 1)
371
+ for (var t = i.length < 0 ? 0 : K(i.length) | 0, r = u(t), e = 0; e < t; e += 1)
372
372
  r[e] = i[e] & 255;
373
373
  return r;
374
374
  }
@@ -387,22 +387,22 @@ ot.write = function(n, a, s, c, f, m) {
387
387
  var e;
388
388
  return t === void 0 && r === void 0 ? e = new Uint8Array(i) : r === void 0 ? e = new Uint8Array(i, t) : e = new Uint8Array(i, t, r), Object.setPrototypeOf(e, o.prototype), e;
389
389
  }
390
- function Kt(i) {
390
+ function Xt(i) {
391
391
  if (o.isBuffer(i)) {
392
- var t = Y(i.length) | 0, r = u(t);
392
+ var t = K(i.length) | 0, r = u(t);
393
393
  return r.length === 0 || i.copy(r, 0, 0, t), r;
394
394
  }
395
395
  if (i.length !== void 0)
396
- return typeof i.length != "number" || X(i.length) ? u(0) : B(i);
396
+ return typeof i.length != "number" || G(i.length) ? u(0) : B(i);
397
397
  if (i.type === "Buffer" && Array.isArray(i.data))
398
398
  return B(i.data);
399
399
  }
400
- function Y(i) {
400
+ function K(i) {
401
401
  if (i >= f)
402
402
  throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + f.toString(16) + " bytes");
403
403
  return i | 0;
404
404
  }
405
- function Xt(i) {
405
+ function Gt(i) {
406
406
  return +i != i && (i = 0), o.alloc(+i);
407
407
  }
408
408
  o.isBuffer = function(t) {
@@ -463,7 +463,7 @@ ot.write = function(n, a, s, c, f, m) {
463
463
  }
464
464
  return p;
465
465
  };
466
- function ct(i, t) {
466
+ function lt(i, t) {
467
467
  if (o.isBuffer(i))
468
468
  return i.length;
469
469
  if (ArrayBuffer.isView(i) || I(i, ArrayBuffer))
@@ -483,7 +483,7 @@ ot.write = function(n, a, s, c, f, m) {
483
483
  return r;
484
484
  case "utf8":
485
485
  case "utf-8":
486
- return K(i).length;
486
+ return X(i).length;
487
487
  case "ucs2":
488
488
  case "ucs-2":
489
489
  case "utf16le":
@@ -492,37 +492,37 @@ ot.write = function(n, a, s, c, f, m) {
492
492
  case "hex":
493
493
  return r >>> 1;
494
494
  case "base64":
495
- return wt(i).length;
495
+ return yt(i).length;
496
496
  default:
497
497
  if (p)
498
- return e ? -1 : K(i).length;
498
+ return e ? -1 : X(i).length;
499
499
  t = ("" + t).toLowerCase(), p = !0;
500
500
  }
501
501
  }
502
- o.byteLength = ct;
503
- function Gt(i, t, r) {
502
+ o.byteLength = lt;
503
+ function Vt(i, t, r) {
504
504
  var e = !1;
505
505
  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
506
  return "";
507
507
  for (i || (i = "utf8"); ; )
508
508
  switch (i) {
509
509
  case "hex":
510
- return pr(this, t, r);
510
+ return sr(this, t, r);
511
511
  case "utf8":
512
512
  case "utf-8":
513
- return ft(this, t, r);
513
+ return ht(this, t, r);
514
514
  case "ascii":
515
- return ar(this, t, r);
515
+ return or(this, t, r);
516
516
  case "latin1":
517
517
  case "binary":
518
- return or(this, t, r);
518
+ return pr(this, t, r);
519
519
  case "base64":
520
- return er(this, t, r);
520
+ return nr(this, t, r);
521
521
  case "ucs2":
522
522
  case "ucs-2":
523
523
  case "utf16le":
524
524
  case "utf-16le":
525
- return sr(this, t, r);
525
+ return cr(this, t, r);
526
526
  default:
527
527
  if (e)
528
528
  throw new TypeError("Unknown encoding: " + i);
@@ -557,7 +557,7 @@ ot.write = function(n, a, s, c, f, m) {
557
557
  return this;
558
558
  }, o.prototype.toString = function() {
559
559
  var t = this.length;
560
- return t === 0 ? "" : arguments.length === 0 ? ft(this, 0, t) : Gt.apply(this, arguments);
560
+ return t === 0 ? "" : arguments.length === 0 ? ht(this, 0, t) : Vt.apply(this, arguments);
561
561
  }, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(t) {
562
562
  if (!o.isBuffer(t))
563
563
  throw new TypeError("Argument must be a Buffer");
@@ -587,10 +587,10 @@ ot.write = function(n, a, s, c, f, m) {
587
587
  }
588
588
  return h < w ? -1 : w < h ? 1 : 0;
589
589
  };
590
- function lt(i, t, r, e, p) {
590
+ function ut(i, t, r, e, p) {
591
591
  if (i.length === 0)
592
592
  return -1;
593
- if (typeof r == "string" ? (e = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r, X(r) && (r = p ? 0 : i.length - 1), r < 0 && (r = i.length + r), r >= i.length) {
593
+ if (typeof r == "string" ? (e = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r, G(r) && (r = p ? 0 : i.length - 1), r < 0 && (r = i.length + r), r >= i.length) {
594
594
  if (p)
595
595
  return -1;
596
596
  r = i.length - 1;
@@ -600,20 +600,20 @@ ot.write = function(n, a, s, c, f, m) {
600
600
  else
601
601
  return -1;
602
602
  if (typeof t == "string" && (t = o.from(t, e)), o.isBuffer(t))
603
- return t.length === 0 ? -1 : ut(i, t, r, e, p);
603
+ return t.length === 0 ? -1 : ft(i, t, r, e, p);
604
604
  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) : ut(i, [t], r, e, p);
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, e, p);
606
606
  throw new TypeError("val must be string, number or Buffer");
607
607
  }
608
- function ut(i, t, r, e, p) {
608
+ function ft(i, t, r, e, p) {
609
609
  var l = 1, h = i.length, w = t.length;
610
610
  if (e !== void 0 && (e = String(e).toLowerCase(), e === "ucs2" || e === "ucs-2" || e === "utf16le" || e === "utf-16le")) {
611
611
  if (i.length < 2 || t.length < 2)
612
612
  return -1;
613
613
  l = 2, h /= 2, w /= 2, r /= 2;
614
614
  }
615
- function g(yt, gt) {
616
- return l === 1 ? yt[gt] : yt.readUInt16BE(gt * l);
615
+ function g(gt, vt) {
616
+ return l === 1 ? gt[vt] : gt.readUInt16BE(vt * l);
617
617
  }
618
618
  var E;
619
619
  if (p) {
@@ -639,11 +639,11 @@ ot.write = function(n, a, s, c, f, m) {
639
639
  o.prototype.includes = function(t, r, e) {
640
640
  return this.indexOf(t, r, e) !== -1;
641
641
  }, o.prototype.indexOf = function(t, r, e) {
642
- return lt(this, t, r, e, !0);
642
+ return ut(this, t, r, e, !0);
643
643
  }, o.prototype.lastIndexOf = function(t, r, e) {
644
- return lt(this, t, r, e, !1);
644
+ return ut(this, t, r, e, !1);
645
645
  };
646
- function Vt(i, t, r, e) {
646
+ function Qt(i, t, r, e) {
647
647
  r = Number(r) || 0;
648
648
  var p = i.length - r;
649
649
  e ? (e = Number(e), e > p && (e = p)) : e = p;
@@ -651,23 +651,23 @@ ot.write = function(n, a, s, c, f, m) {
651
651
  e > l / 2 && (e = l / 2);
652
652
  for (var h = 0; h < e; ++h) {
653
653
  var w = parseInt(t.substr(h * 2, 2), 16);
654
- if (X(w))
654
+ if (G(w))
655
655
  return h;
656
656
  i[r + h] = w;
657
657
  }
658
658
  return h;
659
659
  }
660
- function Qt(i, t, r, e) {
661
- return L(K(t, i.length - r), i, r, e);
662
- }
663
660
  function tr(i, t, r, e) {
664
- return L(ur(t), i, r, e);
661
+ return L(X(t, i.length - r), i, r, e);
665
662
  }
666
663
  function rr(i, t, r, e) {
667
- return L(wt(t), i, r, e);
664
+ return L(fr(t), i, r, e);
668
665
  }
669
666
  function ir(i, t, r, e) {
670
- return L(fr(t, i.length - r), i, r, e);
667
+ return L(yt(t), i, r, e);
668
+ }
669
+ function er(i, t, r, e) {
670
+ return L(hr(t, i.length - r), i, r, e);
671
671
  }
672
672
  o.prototype.write = function(t, r, e, p) {
673
673
  if (r === void 0)
@@ -687,21 +687,21 @@ ot.write = function(n, a, s, c, f, m) {
687
687
  for (var h = !1; ; )
688
688
  switch (p) {
689
689
  case "hex":
690
- return Vt(this, t, r, e);
690
+ return Qt(this, t, r, e);
691
691
  case "utf8":
692
692
  case "utf-8":
693
- return Qt(this, t, r, e);
693
+ return tr(this, t, r, e);
694
694
  case "ascii":
695
695
  case "latin1":
696
696
  case "binary":
697
- return tr(this, t, r, e);
698
- case "base64":
699
697
  return rr(this, t, r, e);
698
+ case "base64":
699
+ return ir(this, t, r, e);
700
700
  case "ucs2":
701
701
  case "ucs-2":
702
702
  case "utf16le":
703
703
  case "utf-16le":
704
- return ir(this, t, r, e);
704
+ return er(this, t, r, e);
705
705
  default:
706
706
  if (h)
707
707
  throw new TypeError("Unknown encoding: " + p);
@@ -713,10 +713,10 @@ ot.write = function(n, a, s, c, f, m) {
713
713
  data: Array.prototype.slice.call(this._arr || this, 0)
714
714
  };
715
715
  };
716
- function er(i, t, r) {
716
+ function nr(i, t, r) {
717
717
  return t === 0 && r === i.length ? a.fromByteArray(i) : a.fromByteArray(i.slice(t, r));
718
718
  }
719
- function ft(i, t, r) {
719
+ function ht(i, t, r) {
720
720
  r = Math.min(i.length, r);
721
721
  for (var e = [], p = t; p < r; ) {
722
722
  var l = i[p], h = null, w = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
@@ -738,42 +738,42 @@ ot.write = function(n, a, s, c, f, m) {
738
738
  }
739
739
  h === null ? (h = 65533, w = 1) : h > 65535 && (h -= 65536, e.push(h >>> 10 & 1023 | 55296), h = 56320 | h & 1023), e.push(h), p += w;
740
740
  }
741
- return nr(e);
741
+ return ar(e);
742
742
  }
743
- var ht = 4096;
744
- function nr(i) {
743
+ var mt = 4096;
744
+ function ar(i) {
745
745
  var t = i.length;
746
- if (t <= ht)
746
+ if (t <= mt)
747
747
  return String.fromCharCode.apply(String, i);
748
748
  for (var r = "", e = 0; e < t; )
749
749
  r += String.fromCharCode.apply(
750
750
  String,
751
- i.slice(e, e += ht)
751
+ i.slice(e, e += mt)
752
752
  );
753
753
  return r;
754
754
  }
755
- function ar(i, t, r) {
755
+ function or(i, t, r) {
756
756
  var e = "";
757
757
  r = Math.min(i.length, r);
758
758
  for (var p = t; p < r; ++p)
759
759
  e += String.fromCharCode(i[p] & 127);
760
760
  return e;
761
761
  }
762
- function or(i, t, r) {
762
+ function pr(i, t, r) {
763
763
  var e = "";
764
764
  r = Math.min(i.length, r);
765
765
  for (var p = t; p < r; ++p)
766
766
  e += String.fromCharCode(i[p]);
767
767
  return e;
768
768
  }
769
- function pr(i, t, r) {
769
+ function sr(i, t, r) {
770
770
  var e = i.length;
771
771
  (!t || t < 0) && (t = 0), (!r || r < 0 || r > e) && (r = e);
772
772
  for (var p = "", l = t; l < r; ++l)
773
- p += hr[i[l]];
773
+ p += mr[i[l]];
774
774
  return p;
775
775
  }
776
- function sr(i, t, r) {
776
+ function cr(i, t, r) {
777
777
  for (var e = i.slice(t, r), p = "", l = 0; l < e.length - 1; l += 2)
778
778
  p += String.fromCharCode(e[l] + e[l + 1] * 256);
779
779
  return p;
@@ -908,27 +908,27 @@ ot.write = function(n, a, s, c, f, m) {
908
908
  }, o.prototype.writeInt32BE = function(t, r, e) {
909
909
  return t = +t, r = r >>> 0, e || S(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
910
  };
911
- function mt(i, t, r, e, p, l) {
911
+ function xt(i, t, r, e, p, l) {
912
912
  if (r + e > i.length)
913
913
  throw new RangeError("Index out of range");
914
914
  if (r < 0)
915
915
  throw new RangeError("Index out of range");
916
916
  }
917
- function xt(i, t, r, e, p) {
918
- return t = +t, r = r >>> 0, p || mt(i, t, r, 4), s.write(i, t, r, e, 23, 4), r + 4;
917
+ function dt(i, t, r, e, p) {
918
+ return t = +t, r = r >>> 0, p || xt(i, t, r, 4), s.write(i, t, r, e, 23, 4), r + 4;
919
919
  }
920
920
  o.prototype.writeFloatLE = function(t, r, e) {
921
- return xt(this, t, r, !0, e);
921
+ return dt(this, t, r, !0, e);
922
922
  }, o.prototype.writeFloatBE = function(t, r, e) {
923
- return xt(this, t, r, !1, e);
923
+ return dt(this, t, r, !1, e);
924
924
  };
925
- function dt(i, t, r, e, p) {
926
- return t = +t, r = r >>> 0, p || mt(i, t, r, 8), s.write(i, t, r, e, 52, 8), r + 8;
925
+ function wt(i, t, r, e, p) {
926
+ return t = +t, r = r >>> 0, p || xt(i, t, r, 8), s.write(i, t, r, e, 52, 8), r + 8;
927
927
  }
928
928
  o.prototype.writeDoubleLE = function(t, r, e) {
929
- return dt(this, t, r, !0, e);
929
+ return wt(this, t, r, !0, e);
930
930
  }, o.prototype.writeDoubleBE = function(t, r, e) {
931
- return dt(this, t, r, !1, e);
931
+ return wt(this, t, r, !1, e);
932
932
  }, o.prototype.copy = function(t, r, e, p) {
933
933
  if (!o.isBuffer(t))
934
934
  throw new TypeError("argument should be a Buffer");
@@ -977,15 +977,15 @@ ot.write = function(n, a, s, c, f, m) {
977
977
  }
978
978
  return this;
979
979
  };
980
- var cr = /[^+/0-9A-Za-z-_]/g;
981
- function lr(i) {
982
- if (i = i.split("=")[0], i = i.trim().replace(cr, ""), i.length < 2)
980
+ var lr = /[^+/0-9A-Za-z-_]/g;
981
+ function ur(i) {
982
+ if (i = i.split("=")[0], i = i.trim().replace(lr, ""), i.length < 2)
983
983
  return "";
984
984
  for (; i.length % 4 !== 0; )
985
985
  i = i + "=";
986
986
  return i;
987
987
  }
988
- function K(i, t) {
988
+ function X(i, t) {
989
989
  t = t || 1 / 0;
990
990
  for (var r, e = i.length, p = null, l = [], h = 0; h < e; ++h) {
991
991
  if (r = i.charCodeAt(h), r > 55295 && r < 57344) {
@@ -1040,18 +1040,18 @@ ot.write = function(n, a, s, c, f, m) {
1040
1040
  }
1041
1041
  return l;
1042
1042
  }
1043
- function ur(i) {
1043
+ function fr(i) {
1044
1044
  for (var t = [], r = 0; r < i.length; ++r)
1045
1045
  t.push(i.charCodeAt(r) & 255);
1046
1046
  return t;
1047
1047
  }
1048
- function fr(i, t) {
1048
+ function hr(i, t) {
1049
1049
  for (var r, e, p, l = [], h = 0; h < i.length && !((t -= 2) < 0); ++h)
1050
1050
  r = i.charCodeAt(h), e = r >> 8, p = r % 256, l.push(p), l.push(e);
1051
1051
  return l;
1052
1052
  }
1053
- function wt(i) {
1054
- return a.toByteArray(lr(i));
1053
+ function yt(i) {
1054
+ return a.toByteArray(ur(i));
1055
1055
  }
1056
1056
  function L(i, t, r, e) {
1057
1057
  for (var p = 0; p < e && !(p + r >= t.length || p >= i.length); ++p)
@@ -1061,19 +1061,19 @@ ot.write = function(n, a, s, c, f, m) {
1061
1061
  function I(i, t) {
1062
1062
  return i instanceof t || i != null && i.constructor != null && i.constructor.name != null && i.constructor.name === t.name;
1063
1063
  }
1064
- function X(i) {
1064
+ function G(i) {
1065
1065
  return i !== i;
1066
1066
  }
1067
- var hr = function() {
1067
+ var mr = function() {
1068
1068
  for (var i = "0123456789abcdef", t = new Array(256), r = 0; r < 16; ++r)
1069
1069
  for (var e = r * 16, p = 0; p < 16; ++p)
1070
1070
  t[e + p] = i[r] + i[p];
1071
1071
  return t;
1072
1072
  }();
1073
- })(Nt);
1073
+ })(Mt);
1074
1074
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
1075
1075
  (function(n, a) {
1076
- var s = Nt, c = s.Buffer;
1076
+ var s = Mt, c = s.Buffer;
1077
1077
  function f(u, o) {
1078
1078
  for (var x in u)
1079
1079
  o[x] = u[x];
@@ -1100,13 +1100,13 @@ ot.write = function(n, a, s, c, f, m) {
1100
1100
  throw new TypeError("Argument must be a number");
1101
1101
  return s.SlowBuffer(u);
1102
1102
  };
1103
- })(tt, tt.exports);
1104
- var Ct = tt.exports, Rt = Ct.Buffer;
1105
- function P(n, a) {
1106
- this._block = Rt.alloc(n), this._finalSize = a, this._blockSize = n, this._len = 0;
1103
+ })(rt, rt.exports);
1104
+ var Rt = rt.exports, Lt = Rt.Buffer;
1105
+ function W(n, a) {
1106
+ this._block = Lt.alloc(n), this._finalSize = a, this._blockSize = n, this._len = 0;
1107
1107
  }
1108
- P.prototype.update = function(n, a) {
1109
- typeof n == "string" && (a = a || "utf8", n = Rt.from(n, a));
1108
+ W.prototype.update = function(n, a) {
1109
+ typeof n == "string" && (a = a || "utf8", n = Lt.from(n, a));
1110
1110
  for (var s = this._block, c = this._blockSize, f = n.length, m = this._len, u = 0; u < f; ) {
1111
1111
  for (var o = m % c, x = Math.min(f - u, c - o), y = 0; y < x; y++)
1112
1112
  s[o + y] = n[u + y];
@@ -1114,7 +1114,7 @@ P.prototype.update = function(n, a) {
1114
1114
  }
1115
1115
  return this._len += f, this;
1116
1116
  };
1117
- P.prototype.digest = function(n) {
1117
+ W.prototype.digest = function(n) {
1118
1118
  var a = this._len % this._blockSize;
1119
1119
  this._block[a] = 128, this._block.fill(0, a + 1), a >= this._finalSize && (this._update(this._block), this._block.fill(0));
1120
1120
  var s = this._len * 8;
@@ -1128,74 +1128,74 @@ P.prototype.digest = function(n) {
1128
1128
  var m = this._hash();
1129
1129
  return n ? m.toString(n) : m;
1130
1130
  };
1131
- P.prototype._update = function() {
1131
+ W.prototype._update = function() {
1132
1132
  throw new Error("_update must be implemented by subclass");
1133
1133
  };
1134
- var Cr = P, Rr = jr, Lt = Cr, Lr = Ct.Buffer, zr = [
1134
+ var zr = W, qr = kr, zt = zr, $r = Rt.Buffer, Jr = [
1135
1135
  1518500249,
1136
1136
  1859775393,
1137
1137
  -1894007588,
1138
1138
  -899497514
1139
- ], qr = new Array(80);
1139
+ ], Pr = new Array(80);
1140
1140
  function C() {
1141
- this.init(), this._w = qr, Lt.call(this, 64, 56);
1141
+ this.init(), this._w = Pr, zt.call(this, 64, 56);
1142
1142
  }
1143
- Rr(C, Lt);
1143
+ qr(C, zt);
1144
1144
  C.prototype.init = function() {
1145
1145
  return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
1146
1146
  };
1147
- function $r(n) {
1147
+ function Wr(n) {
1148
1148
  return n << 1 | n >>> 31;
1149
1149
  }
1150
- function Jr(n) {
1150
+ function Hr(n) {
1151
1151
  return n << 5 | n >>> 27;
1152
1152
  }
1153
- function Pr(n) {
1153
+ function Zr(n) {
1154
1154
  return n << 30 | n >>> 2;
1155
1155
  }
1156
- function Wr(n, a, s, c) {
1156
+ function Yr(n, a, s, c) {
1157
1157
  return n === 0 ? a & s | ~a & c : n === 2 ? a & s | a & c | s & c : a ^ s ^ c;
1158
1158
  }
1159
1159
  C.prototype._update = function(n) {
1160
1160
  for (var a = this._w, s = this._a | 0, c = this._b | 0, f = this._c | 0, m = this._d | 0, u = this._e | 0, o = 0; o < 16; ++o)
1161
1161
  a[o] = n.readInt32BE(o * 4);
1162
1162
  for (; o < 80; ++o)
1163
- a[o] = $r(a[o - 3] ^ a[o - 8] ^ a[o - 14] ^ a[o - 16]);
1163
+ a[o] = Wr(a[o - 3] ^ a[o - 8] ^ a[o - 14] ^ a[o - 16]);
1164
1164
  for (var x = 0; x < 80; ++x) {
1165
- var y = ~~(x / 20), v = Jr(s) + Wr(y, c, f, m) + u + a[x] + zr[y] | 0;
1166
- u = m, m = f, f = Pr(c), c = s, s = v;
1165
+ var y = ~~(x / 20), v = Hr(s) + Yr(y, c, f, m) + u + a[x] + Jr[y] | 0;
1166
+ u = m, m = f, f = Zr(c), c = s, s = v;
1167
1167
  }
1168
1168
  this._a = s + this._a | 0, this._b = c + this._b | 0, this._c = f + this._c | 0, this._d = m + this._d | 0, this._e = u + this._e | 0;
1169
1169
  };
1170
1170
  C.prototype._hash = function() {
1171
- var n = Lr.allocUnsafe(20);
1171
+ var n = $r.allocUnsafe(20);
1172
1172
  return n.writeInt32BE(this._a | 0, 0), n.writeInt32BE(this._b | 0, 4), n.writeInt32BE(this._c | 0, 8), n.writeInt32BE(this._d | 0, 12), n.writeInt32BE(this._e | 0, 16), n;
1173
1173
  };
1174
- var Hr = C;
1175
- const Zr = /* @__PURE__ */ Ot(Hr), pt = new Error("File system not available.");
1176
- function Yr(n, a, s) {
1177
- throw pt;
1174
+ var Kr = C;
1175
+ const Xr = /* @__PURE__ */ Nt(Kr), st = new Error("File system not available.");
1176
+ function Gr(n, a, s) {
1177
+ throw st;
1178
1178
  }
1179
- function zt(n) {
1180
- throw pt;
1179
+ function qt(n) {
1180
+ throw st;
1181
1181
  }
1182
- function Kr(n) {
1183
- throw pt;
1182
+ function Vr(n) {
1183
+ throw st;
1184
1184
  }
1185
- const Xr = async (n) => zt();
1186
- function Gr(n) {
1185
+ const Qr = async (n) => qt();
1186
+ function ti(n) {
1187
1187
  let a = "";
1188
1188
  for (let s = 0; s < n.length; s += 2)
1189
1189
  a += String.fromCharCode(parseInt(n.substr(s, 2), 16));
1190
1190
  return btoa(a);
1191
1191
  }
1192
- const W = (n, a = "sha1") => {
1192
+ const H = (n, a = "sha1") => {
1193
1193
  if (a !== "sha1")
1194
1194
  throw new Error("Only sha1 algorithm is available.");
1195
- const s = new Zr();
1196
- return Gr(s.update(n).digest("hex"));
1197
- }, qt = async (n) => {
1198
- const a = new Ft(), { name: s, revision: c, documentType: f, created: m, lastModified: u } = n, o = {
1195
+ const s = new Xr();
1196
+ return ti(s.update(n).digest("hex"));
1197
+ }, $t = async (n) => {
1198
+ const a = new _t(), { name: s, revision: c, documentType: f, created: m, lastModified: u } = n, o = {
1199
1199
  name: s,
1200
1200
  revision: c,
1201
1201
  documentType: f,
@@ -1213,27 +1213,27 @@ const W = (n, a = "sha1") => {
1213
1213
  comment: JSON.stringify(F)
1214
1214
  });
1215
1215
  }), a;
1216
- }, Vr = async (n, a, s, c) => {
1217
- await (await qt(n)).generateAsync({
1216
+ }, ri = async (n, a, s, c) => {
1217
+ await (await $t(n)).generateAsync({
1218
1218
  type: "uint8array",
1219
1219
  streamFiles: !0
1220
1220
  });
1221
1221
  const m = c ?? n.name, u = `.${s}.zip`;
1222
- return Yr(
1222
+ return Gr(
1223
1223
  a,
1224
1224
  m.endsWith(u) ? m : `${m}${u}`
1225
1225
  );
1226
- }, bi = async (n, a) => {
1227
- const c = await (await qt(n)).generateAsync({ type: "blob" }), f = await a.createWritable();
1226
+ }, Ai = async (n, a) => {
1227
+ const c = await (await $t(n)).generateAsync({ type: "blob" }), f = await a.createWritable();
1228
1228
  await f.write(c), await f.close();
1229
- }, Et = async (n, a) => {
1230
- const s = zt();
1231
- return Qr(s, a);
1232
- }, Qr = async (n, a) => {
1233
- const s = new Ft();
1234
- return await s.loadAsync(n), ti(s, a);
1229
+ }, bt = async (n, a) => {
1230
+ const s = qt();
1231
+ return ii(s, a);
1232
+ }, ii = async (n, a) => {
1233
+ const s = new _t();
1234
+ return await s.loadAsync(n), ei(s, a);
1235
1235
  };
1236
- async function ti(n, a) {
1236
+ async function ei(n, a) {
1237
1237
  const s = n.file("state.json");
1238
1238
  if (!s)
1239
1239
  throw new Error("Initial state not found");
@@ -1265,40 +1265,40 @@ async function ti(n, a) {
1265
1265
  ]
1266
1266
  }), v;
1267
1267
  }
1268
- function $t(n) {
1268
+ function Jt(n) {
1269
1269
  const a = n.replace(/^.*\./, "") || void 0, s = n.replace(/^.*[/\\]/, "") || void 0;
1270
1270
  return { extension: a, fileName: s };
1271
1271
  }
1272
- async function Fi(n) {
1273
- const { buffer: a, mimeType: s = "application/octet-stream" } = await Kr(), c = $t(n), f = a.toString("base64");
1272
+ async function Bi(n) {
1273
+ const { buffer: a, mimeType: s = "application/octet-stream" } = await Vr(), c = Jt(n), f = a.toString("base64");
1274
1274
  return {
1275
1275
  data: f,
1276
- hash: W(f),
1276
+ hash: H(f),
1277
1277
  mimeType: s,
1278
1278
  ...c
1279
1279
  };
1280
1280
  }
1281
- async function _i(n) {
1282
- const a = await Xr(), s = Sr.getType(n) || "application/octet-stream", c = $t(n), f = a.toString("base64");
1283
- return { data: f, hash: W(f), mimeType: s, ...c };
1281
+ async function Si(n) {
1282
+ const a = await Qr(), s = Ir.getType(n) || "application/octet-stream", c = Jt(n), f = a.toString("base64");
1283
+ return { data: f, hash: H(f), mimeType: s, ...c };
1284
1284
  }
1285
- function q(n, a, s) {
1286
- const c = mi(n), f = fi(s);
1285
+ function $(n, a, s) {
1286
+ const c = wi(n), f = xi(s);
1287
1287
  return a.reduce(
1288
1288
  (m, u) => f(m, u),
1289
1289
  c
1290
1290
  );
1291
1291
  }
1292
- function ri(n, a) {
1292
+ function ni(n, a) {
1293
1293
  return { ...n, name: a };
1294
1294
  }
1295
- function ii(n, a, s) {
1295
+ function ai(n, a, s) {
1296
1296
  const c = Math.min(a, n.revision), f = n.operations.slice(
1297
1297
  0,
1298
1298
  n.revision - c
1299
1299
  );
1300
1300
  return {
1301
- ...q(
1301
+ ...$(
1302
1302
  n.initialState,
1303
1303
  f,
1304
1304
  s
@@ -1307,7 +1307,7 @@ function ii(n, a, s) {
1307
1307
  revision: n.revision - c
1308
1308
  };
1309
1309
  }
1310
- function ei(n, a, s) {
1310
+ function oi(n, a, s) {
1311
1311
  const c = n.operations.length - n.revision;
1312
1312
  if (!c)
1313
1313
  throw new Error("There is no UNDO operation to REDO");
@@ -1316,7 +1316,7 @@ function ei(n, a, s) {
1316
1316
  n.revision + f
1317
1317
  );
1318
1318
  return {
1319
- ...q(
1319
+ ...$(
1320
1320
  n.initialState,
1321
1321
  m,
1322
1322
  s
@@ -1325,43 +1325,43 @@ function ei(n, a, s) {
1325
1325
  revision: n.revision + f
1326
1326
  };
1327
1327
  }
1328
- function ni(n, a, s, c) {
1328
+ function pi(n, a, s, c) {
1329
1329
  a = a || 0, s = s || n.operations.length;
1330
- const f = n.operations.slice(a, s), m = n.operations.slice(0, a), u = n.operations.slice(s), o = q(
1330
+ const f = n.operations.slice(a, s), m = n.operations.slice(0, a), u = n.operations.slice(s), o = $(
1331
1331
  n.initialState,
1332
1332
  m.concat(f),
1333
1333
  c
1334
1334
  ), { name: x, state: y } = o;
1335
- return q(
1335
+ return $(
1336
1336
  n.initialState,
1337
1337
  [
1338
1338
  ...m,
1339
- st({ name: x, state: y }, f.length),
1339
+ ct({ name: x, state: y }, f.length),
1340
1340
  ...u
1341
1341
  ],
1342
1342
  c
1343
1343
  );
1344
1344
  }
1345
- function ai(n, a) {
1345
+ function si(n, a) {
1346
1346
  return {
1347
1347
  ...n,
1348
1348
  name: a.name,
1349
1349
  state: a.state ?? {}
1350
1350
  };
1351
1351
  }
1352
- const Jt = "SET_NAME", H = "UNDO", Z = "REDO", M = "PRUNE", Pt = "LOAD_STATE";
1353
- function oi(n, a) {
1354
- return [H, Z, M].includes(a.type) ? n.revision : n.revision + 1;
1352
+ const Pt = "SET_NAME", Z = "UNDO", Y = "REDO", M = "PRUNE", Wt = "LOAD_STATE";
1353
+ function ci(n, a) {
1354
+ return [Z, Y, M].includes(a.type) ? n.revision : n.revision + 1;
1355
1355
  }
1356
- function pi(n, a) {
1356
+ function li(n, a) {
1357
1357
  return {
1358
1358
  ...n,
1359
- revision: oi(n, a),
1359
+ revision: ci(n, a),
1360
1360
  lastModified: (/* @__PURE__ */ new Date()).toISOString()
1361
1361
  };
1362
1362
  }
1363
- function si(n, a) {
1364
- if ([H, Z, M, M].includes(a.type))
1363
+ function ui(n, a) {
1364
+ if ([Z, Y, M, M].includes(a.type))
1365
1365
  return n;
1366
1366
  const s = n.operations.slice(0, n.revision);
1367
1367
  return {
@@ -1377,42 +1377,42 @@ function si(n, a) {
1377
1377
  ]
1378
1378
  };
1379
1379
  }
1380
- function ci(n, a) {
1381
- let s = si(n, a);
1382
- return s = pi(s, a), s;
1380
+ function fi(n, a) {
1381
+ let s = ui(n, a);
1382
+ return s = li(s, a), s;
1383
1383
  }
1384
- function li(n, a, s) {
1385
- switch (It().parse(a), a.type) {
1386
- case Jt:
1387
- return ri(n, a.input);
1388
- case H:
1389
- return ii(n, a.input, s);
1384
+ function hi(n, a, s) {
1385
+ switch (kt().parse(a), a.type) {
1386
+ case Pt:
1387
+ return ni(n, a.input);
1390
1388
  case Z:
1391
- return ei(n, a.input, s);
1389
+ return ai(n, a.input, s);
1390
+ case Y:
1391
+ return oi(n, a.input, s);
1392
1392
  case M:
1393
- return ni(
1393
+ return pi(
1394
1394
  n,
1395
1395
  a.input.start,
1396
1396
  a.input.end,
1397
1397
  s
1398
1398
  );
1399
- case Pt:
1400
- return ai(n, a.input.state);
1399
+ case Wt:
1400
+ return si(n, a.input.state);
1401
1401
  default:
1402
1402
  return n;
1403
1403
  }
1404
1404
  }
1405
- function ui(n, a, s) {
1405
+ function mi(n, a, s) {
1406
1406
  let c = n;
1407
- return bt(a) && (c = li(c, a, s)), c = ci(c, a), c = vt(c, (f) => {
1407
+ return Ft(a) && (c = hi(c, a, s)), c = fi(c, a), c = Et(c, (f) => {
1408
1408
  const m = s(f.state, a);
1409
1409
  if (m)
1410
- return wr({
1410
+ return yr({
1411
1411
  ...c,
1412
1412
  state: m
1413
1413
  });
1414
- }), vt(c, (f) => {
1415
- f.operations[f.operations.length - 1].hash = xi(f), !bt(a) && a.attachments && a.attachments.forEach((m) => {
1414
+ }), Et(c, (f) => {
1415
+ f.operations[f.operations.length - 1].hash = yi(f), !Ft(a) && a.attachments && a.attachments.forEach((m) => {
1416
1416
  const { hash: u, ...o } = m;
1417
1417
  f.attachments[u] = {
1418
1418
  ...o
@@ -1420,8 +1420,8 @@ function ui(n, a, s) {
1420
1420
  });
1421
1421
  });
1422
1422
  }
1423
- function bt(n) {
1424
- return [Jt, H, Z, M, Pt].includes(n.type);
1423
+ function Ft(n) {
1424
+ return [Pt, Z, Y, M, Wt].includes(n.type);
1425
1425
  }
1426
1426
  function R(n, a, s, c) {
1427
1427
  if (!n)
@@ -1431,10 +1431,10 @@ function R(n, a, s, c) {
1431
1431
  const f = s ? { type: n, input: a, attachments: s } : { type: n, input: a };
1432
1432
  return c == null || c().parse(f), f;
1433
1433
  }
1434
- function fi(n, a = ui) {
1434
+ function xi(n, a = mi) {
1435
1435
  return (s, c) => a(s, c, n);
1436
1436
  }
1437
- const hi = (n, a) => ({
1437
+ const di = (n, a) => ({
1438
1438
  name: "",
1439
1439
  documentType: "",
1440
1440
  revision: 0,
@@ -1443,8 +1443,8 @@ const hi = (n, a) => ({
1443
1443
  attachments: {},
1444
1444
  ...n,
1445
1445
  state: (a == null ? void 0 : a(n == null ? void 0 : n.state)) ?? (n == null ? void 0 : n.state) ?? {}
1446
- }), mi = (n, a) => {
1447
- const s = hi(
1446
+ }), wi = (n, a) => {
1447
+ const s = di(
1448
1448
  n,
1449
1449
  a
1450
1450
  );
@@ -1453,41 +1453,45 @@ const hi = (n, a) => ({
1453
1453
  initialState: s,
1454
1454
  operations: []
1455
1455
  };
1456
- }, xi = (n) => W(dr(n.state)), Ai = (n, a = 1e3) => {
1456
+ }, yi = (n) => H(wr(n.state)), ji = (n, a = 1e3) => {
1457
1457
  const s = Math.random() * a;
1458
- return W(`${(n ?? /* @__PURE__ */ new Date()).toISOString()}${s}`);
1459
- }, Wt = (n) => R(
1458
+ return H(`${(n ?? /* @__PURE__ */ new Date()).toISOString()}${s}`);
1459
+ };
1460
+ function q(n) {
1461
+ return gr(vr(n, !0));
1462
+ }
1463
+ const Ht = (n) => R(
1460
1464
  "SET_NAME",
1461
1465
  n,
1462
1466
  void 0,
1463
- nt
1464
- ), Ht = (n = 1) => R("UNDO", n, void 0, at), Zt = (n = 1) => R("REDO", n, void 0, et), Yt = (n, a) => R(
1467
+ at
1468
+ ), Zt = (n = 1) => R("UNDO", n, void 0, ot), Yt = (n = 1) => R("REDO", n, void 0, nt), Kt = (n, a) => R(
1465
1469
  "PRUNE",
1466
1470
  { start: n, end: a },
1467
1471
  void 0,
1468
- it
1469
- ), st = (n, a) => R(
1472
+ et
1473
+ ), ct = (n, a) => R(
1470
1474
  "LOAD_STATE",
1471
1475
  { state: n, operations: a },
1472
1476
  void 0,
1473
- rt
1474
- ), Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1477
+ it
1478
+ ), Ui = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1475
1479
  __proto__: null,
1476
- loadState: st,
1477
- prune: Yt,
1478
- redo: Zt,
1479
- setName: Wt,
1480
- undo: Ht
1480
+ loadState: ct,
1481
+ prune: Kt,
1482
+ redo: Yt,
1483
+ setName: Ht,
1484
+ undo: Zt
1481
1485
  }, Symbol.toStringTag, { value: "Module" }));
1482
- class Si {
1486
+ class Ii {
1483
1487
  /**
1484
1488
  * Constructs a BaseDocument instance with an initial state.
1485
1489
  * @param reducer - The reducer function that updates the state.
1486
1490
  * @param document - The initial state of the document.
1487
1491
  */
1488
1492
  constructor(a, s) {
1489
- G(this, "_document");
1490
- G(this, "_reducer");
1493
+ V(this, "_document");
1494
+ V(this, "_reducer");
1491
1495
  this._reducer = a, this._document = s;
1492
1496
  }
1493
1497
  /**
@@ -1505,14 +1509,14 @@ class Si {
1505
1509
  * @returns The file path where the state was saved.
1506
1510
  */
1507
1511
  saveToFile(a, s, c) {
1508
- return Vr(this._document, a, s, c);
1512
+ return ri(this._document, a, s, c);
1509
1513
  }
1510
1514
  /**
1511
1515
  * Loads the state of the document from a file.
1512
1516
  * @param path - The file path where the state is stored.
1513
1517
  */
1514
1518
  async loadFromFile(a) {
1515
- this._document = await Et(a, this._reducer);
1519
+ this._document = await bt(a, this._reducer);
1516
1520
  }
1517
1521
  /**
1518
1522
  * Loads the state of the document from a file and returns it.
@@ -1521,19 +1525,19 @@ class Si {
1521
1525
  * @returns The state of the document.
1522
1526
  */
1523
1527
  static async stateFromFile(a, s) {
1524
- return await Et(a, s);
1528
+ return await bt(a, s);
1525
1529
  }
1526
1530
  /**
1527
1531
  * Gets the current state of the document.
1528
1532
  */
1529
1533
  get state() {
1530
- return this._document.state;
1534
+ return q(this._document.state);
1531
1535
  }
1532
1536
  /**
1533
1537
  * Gets the list of operations performed on the document.
1534
1538
  */
1535
1539
  get operations() {
1536
- return this._document.operations;
1540
+ return q(this._document.operations);
1537
1541
  }
1538
1542
  /**
1539
1543
  * Gets the name of the document.
@@ -1569,13 +1573,13 @@ class Si {
1569
1573
  * Gets the initial state of the document.
1570
1574
  */
1571
1575
  get initialState() {
1572
- return this._document.initialState;
1576
+ return q(this._document.initialState);
1573
1577
  }
1574
1578
  /**
1575
1579
  * Returns the current document as an object
1576
1580
  */
1577
1581
  toDocument() {
1578
- return this._document;
1582
+ return q(this._document);
1579
1583
  }
1580
1584
  /**
1581
1585
  * Gets the attachment associated with the given key.
@@ -1589,21 +1593,21 @@ class Si {
1589
1593
  * @param name - The new name of the document.
1590
1594
  */
1591
1595
  setName(a) {
1592
- return this.dispatch(Wt(a)), this;
1596
+ return this.dispatch(Ht(a)), this;
1593
1597
  }
1594
1598
  /**
1595
1599
  * Reverts a number of actions from the document.
1596
1600
  * @param count - The number of actions to revert.
1597
1601
  */
1598
1602
  undo(a) {
1599
- return this.dispatch(Ht(a)), this;
1603
+ return this.dispatch(Zt(a)), this;
1600
1604
  }
1601
1605
  /**
1602
1606
  * Reapplies a number of actions to the document.
1603
1607
  * @param count - The number of actions to reapply.
1604
1608
  */
1605
1609
  redo(a) {
1606
- return this.dispatch(Zt(a)), this;
1610
+ return this.dispatch(Yt(a)), this;
1607
1611
  }
1608
1612
  /**
1609
1613
  * Removes a range of operations from the document.
@@ -1611,7 +1615,7 @@ class Si {
1611
1615
  * @param end - The ending index of the range to remove.
1612
1616
  */
1613
1617
  prune(a, s) {
1614
- return this.dispatch(Yt(a, s)), this;
1618
+ return this.dispatch(Kt(a, s)), this;
1615
1619
  }
1616
1620
  /**
1617
1621
  * Loads a document state and a set of operations.
@@ -1619,10 +1623,10 @@ class Si {
1619
1623
  * @param operations - The operations to apply to the document.
1620
1624
  */
1621
1625
  loadState(a, s) {
1622
- return this.dispatch(st(a, s)), this;
1626
+ return this.dispatch(ct(a, s)), this;
1623
1627
  }
1624
1628
  }
1625
- function ji(n, a) {
1629
+ function ki(n, a) {
1626
1630
  a.forEach((s) => {
1627
1631
  Object.getOwnPropertyNames(s.prototype).forEach((c) => {
1628
1632
  Object.defineProperty(
@@ -1634,23 +1638,24 @@ function ji(n, a) {
1634
1638
  });
1635
1639
  }
1636
1640
  export {
1637
- Si as B,
1638
- hi as a,
1639
- mi as b,
1640
- fi as c,
1641
- bi as d,
1642
- Qr as e,
1641
+ Ii as B,
1642
+ di as a,
1643
+ wi as b,
1644
+ xi as c,
1645
+ Ai as d,
1646
+ ii as e,
1643
1647
  R as f,
1644
- ji as g,
1645
- Bi as h,
1646
- bt as i,
1647
- qt as j,
1648
- _i as k,
1649
- Et as l,
1650
- Fi as m,
1651
- xi as n,
1652
- Ai as o,
1653
- ui as p,
1654
- Vr as s,
1655
- Ei as z
1648
+ ki as g,
1649
+ Ui as h,
1650
+ Ft as i,
1651
+ $t as j,
1652
+ Si as k,
1653
+ bt as l,
1654
+ Bi as m,
1655
+ yi as n,
1656
+ ji as o,
1657
+ mi as p,
1658
+ q as r,
1659
+ ri as s,
1660
+ _i as z
1656
1661
  };