@opencloud-eu/web-client 0.1.0
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/LICENSE +661 -0
- package/README.md +95 -0
- package/dist/functions-CsnDdpYv.js +1232 -0
- package/dist/functions-ikwhAVhP.cjs +1 -0
- package/dist/index-C1H-OgNf.cjs +6 -0
- package/dist/index-C6VnMvgz.cjs +6 -0
- package/dist/index-DbVGtwLH.cjs +1 -0
- package/dist/index-DqVarwg_.js +1705 -0
- package/dist/index-Pl8khka8.js +1141 -0
- package/dist/index-VvbQMSOr.js +4651 -0
- package/dist/index-eFi29SPG.cjs +16 -0
- package/dist/index-oQ7995oB.js +672 -0
- package/dist/src/errors.d.ts +10 -0
- package/dist/src/graph/activities/activities.d.ts +3 -0
- package/dist/src/graph/activities/index.d.ts +2 -0
- package/dist/src/graph/activities/types.d.ts +5 -0
- package/dist/src/graph/applications/applications.d.ts +3 -0
- package/dist/src/graph/applications/index.d.ts +2 -0
- package/dist/src/graph/applications/types.d.ts +6 -0
- package/dist/src/graph/driveItems/driveItems.d.ts +3 -0
- package/dist/src/graph/driveItems/index.d.ts +2 -0
- package/dist/src/graph/driveItems/types.d.ts +10 -0
- package/dist/src/graph/drives/drives.d.ts +3 -0
- package/dist/src/graph/drives/index.d.ts +2 -0
- package/dist/src/graph/drives/types.d.ts +18 -0
- package/dist/src/graph/generated/api.d.ts +6506 -0
- package/dist/src/graph/generated/base.d.ts +55 -0
- package/dist/src/graph/generated/common.d.ts +54 -0
- package/dist/src/graph/generated/configuration.d.ts +91 -0
- package/dist/src/graph/generated/index.d.ts +13 -0
- package/dist/src/graph/groups/groups.d.ts +3 -0
- package/dist/src/graph/groups/index.d.ts +2 -0
- package/dist/src/graph/groups/types.d.ts +19 -0
- package/dist/src/graph/index.d.ts +20 -0
- package/dist/src/graph/permissions/index.d.ts +2 -0
- package/dist/src/graph/permissions/permissions.d.ts +3 -0
- package/dist/src/graph/permissions/types.d.ts +23 -0
- package/dist/src/graph/tags/index.d.ts +2 -0
- package/dist/src/graph/tags/tags.d.ts +3 -0
- package/dist/src/graph/tags/types.d.ts +7 -0
- package/dist/src/graph/types.d.ts +11 -0
- package/dist/src/graph/users/index.d.ts +2 -0
- package/dist/src/graph/users/types.d.ts +25 -0
- package/dist/src/graph/users/users.d.ts +3 -0
- package/dist/src/helpers/call.d.ts +1 -0
- package/dist/src/helpers/httpError.d.ts +9 -0
- package/dist/src/helpers/index.d.ts +7 -0
- package/dist/src/helpers/item.d.ts +3 -0
- package/dist/src/helpers/publicLink/functions.d.ts +2 -0
- package/dist/src/helpers/publicLink/index.d.ts +1 -0
- package/dist/src/helpers/resource/functions.d.ts +12 -0
- package/dist/src/helpers/resource/index.d.ts +2 -0
- package/dist/src/helpers/resource/types.d.ts +103 -0
- package/dist/src/helpers/share/constants.d.ts +9 -0
- package/dist/src/helpers/share/functions.d.ts +37 -0
- package/dist/src/helpers/share/index.d.ts +4 -0
- package/dist/src/helpers/share/type.d.ts +32 -0
- package/dist/src/helpers/share/types.d.ts +72 -0
- package/dist/src/helpers/space/functions.d.ts +27 -0
- package/dist/src/helpers/space/index.d.ts +2 -0
- package/dist/src/helpers/space/types.d.ts +84 -0
- package/dist/src/index.d.ts +19 -0
- package/dist/src/ocs/capabilities.d.ts +181 -0
- package/dist/src/ocs/index.d.ts +8 -0
- package/dist/src/ocs/urlSign.d.ts +18 -0
- package/dist/src/sse/index.d.ts +50 -0
- package/dist/src/utils/encodePath.d.ts +1 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/urlJoin.d.ts +19 -0
- package/dist/src/webdav/clearTrashBin.d.ts +10 -0
- package/dist/src/webdav/client/builders.d.ts +8 -0
- package/dist/src/webdav/client/dav.d.ts +53 -0
- package/dist/src/webdav/client/index.d.ts +3 -0
- package/dist/src/webdav/client/parsers.d.ts +8 -0
- package/dist/src/webdav/constants/dav.d.ts +106 -0
- package/dist/src/webdav/constants/index.d.ts +1 -0
- package/dist/src/webdav/copyFiles.d.ts +15 -0
- package/dist/src/webdav/createFolder.d.ts +14 -0
- package/dist/src/webdav/deleteFile.d.ts +8 -0
- package/dist/src/webdav/getFileContents.d.ts +17 -0
- package/dist/src/webdav/getFileInfo.d.ts +9 -0
- package/dist/src/webdav/getFileUrl.d.ts +15 -0
- package/dist/src/webdav/getPathForFileId.d.ts +5 -0
- package/dist/src/webdav/getPublicFileUrl.d.ts +6 -0
- package/dist/src/webdav/index.d.ts +7 -0
- package/dist/src/webdav/listFavoriteFiles.d.ts +12 -0
- package/dist/src/webdav/listFileVersions.d.ts +5 -0
- package/dist/src/webdav/listFiles.d.ts +21 -0
- package/dist/src/webdav/moveFiles.d.ts +15 -0
- package/dist/src/webdav/putFileContents.d.ts +18 -0
- package/dist/src/webdav/restoreFile.d.ts +12 -0
- package/dist/src/webdav/restoreFileVersion.d.ts +10 -0
- package/dist/src/webdav/search.d.ts +15 -0
- package/dist/src/webdav/setFavorite.d.ts +8 -0
- package/dist/src/webdav/types.d.ts +47 -0
- package/dist/src/webdav/utils.d.ts +13 -0
- package/dist/toString-Cn0xCZ28.js +261 -0
- package/dist/toString-hHr716Th.cjs +1 -0
- package/dist/vite.config.d.ts +2 -0
- package/dist/web-client/graph/generated.cjs +1 -0
- package/dist/web-client/graph/generated.js +5499 -0
- package/dist/web-client/graph.cjs +1 -0
- package/dist/web-client/graph.js +5 -0
- package/dist/web-client/ocs.cjs +25 -0
- package/dist/web-client/ocs.js +6014 -0
- package/dist/web-client/sse.cjs +2 -0
- package/dist/web-client/sse.js +218 -0
- package/dist/web-client/webdav.cjs +1 -0
- package/dist/web-client/webdav.js +10 -0
- package/dist/web-client.cjs +1 -0
- package/dist/web-client.js +99 -0
- package/package.json +67 -0
|
@@ -0,0 +1,4651 @@
|
|
|
1
|
+
var zr = Object.defineProperty;
|
|
2
|
+
var _t = (r) => {
|
|
3
|
+
throw TypeError(r);
|
|
4
|
+
};
|
|
5
|
+
var Hr = (r, e, t) => e in r ? zr(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
+
var k = (r, e, t) => Hr(r, typeof e != "symbol" ? e + "" : e, t), Ke = (r, e, t) => e.has(r) || _t("Cannot " + t);
|
|
7
|
+
var S = (r, e, t) => (Ke(r, e, "read from private field"), t ? t.call(r) : e.get(r)), ie = (r, e, t) => e.has(r) ? _t("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), W = (r, e, t, n) => (Ke(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), ge = (r, e, t) => (Ke(r, e, "access private method"), t);
|
|
8
|
+
import { a as Zr } from "./index-DqVarwg_.js";
|
|
9
|
+
import { D as Tt, I as je, J as $e, s as Jr, l as Ae, p as wr, m as Yr, K as de } from "./functions-CsnDdpYv.js";
|
|
10
|
+
import { u as q } from "./toString-Cn0xCZ28.js";
|
|
11
|
+
import { ocs as Kr } from "./web-client/ocs.js";
|
|
12
|
+
import { p as we, g as Ue } from "./index-Pl8khka8.js";
|
|
13
|
+
const _e = (r) => encodeURIComponent(r).split("%2F").join("/");
|
|
14
|
+
class Nr extends Error {
|
|
15
|
+
constructor(t, n, o = null) {
|
|
16
|
+
super(t);
|
|
17
|
+
k(this, "response");
|
|
18
|
+
k(this, "statusCode");
|
|
19
|
+
this.response = n, this.statusCode = o;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
class Qr extends Nr {
|
|
23
|
+
constructor(t, n, o, u = null) {
|
|
24
|
+
super(t, o, u);
|
|
25
|
+
k(this, "errorCode");
|
|
26
|
+
this.errorCode = n;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const fe = (r, { fileId: e, path: t, name: n }) => {
|
|
30
|
+
if (t !== void 0)
|
|
31
|
+
return q(r.webDavPath, t);
|
|
32
|
+
if (e !== void 0) {
|
|
33
|
+
if (Tt(r))
|
|
34
|
+
throw new Error("public spaces need a path provided");
|
|
35
|
+
return q("spaces", e, n || "");
|
|
36
|
+
}
|
|
37
|
+
return r.webDavPath;
|
|
38
|
+
}, Dr = (r, e) => ({
|
|
39
|
+
copyFiles(t, { path: n, fileId: o }, u, {
|
|
40
|
+
path: l,
|
|
41
|
+
parentFolderId: i,
|
|
42
|
+
name: h
|
|
43
|
+
}, { overwrite: a, ...s } = {}) {
|
|
44
|
+
const f = fe(t, {
|
|
45
|
+
fileId: o,
|
|
46
|
+
path: n
|
|
47
|
+
}), c = fe(u, {
|
|
48
|
+
fileId: i,
|
|
49
|
+
path: l,
|
|
50
|
+
name: h
|
|
51
|
+
});
|
|
52
|
+
return r.copy(f, c, {
|
|
53
|
+
overwrite: a || !1,
|
|
54
|
+
...s
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}), en = (r, e, t) => ({
|
|
58
|
+
async createFolder(n, { path: o, parentFolderId: u, folderName: l, fetchFolder: i = !0, ...h }) {
|
|
59
|
+
const a = fe(n, { fileId: u, path: o, name: l });
|
|
60
|
+
if (await r.mkcol(a), i)
|
|
61
|
+
return e.getFileInfo(n, { path: o }, h);
|
|
62
|
+
}
|
|
63
|
+
}), tn = (r, { axiosClient: e }) => ({
|
|
64
|
+
async getFileContents(t, { fileId: n, path: o }, {
|
|
65
|
+
responseType: u = "text",
|
|
66
|
+
noCache: l = !0,
|
|
67
|
+
headers: i,
|
|
68
|
+
...h
|
|
69
|
+
} = {}) {
|
|
70
|
+
try {
|
|
71
|
+
const a = fe(t, { fileId: n, path: o }), s = await e.get(r.getFileUrl(a), {
|
|
72
|
+
responseType: u,
|
|
73
|
+
headers: {
|
|
74
|
+
...l && { "Cache-Control": "no-cache" },
|
|
75
|
+
...i || {}
|
|
76
|
+
},
|
|
77
|
+
...h
|
|
78
|
+
});
|
|
79
|
+
return {
|
|
80
|
+
response: s,
|
|
81
|
+
body: s.data,
|
|
82
|
+
headers: {
|
|
83
|
+
ETag: s.headers.etag,
|
|
84
|
+
"OC-ETag": s.headers["oc-etag"],
|
|
85
|
+
"OC-FileId": s.headers["oc-fileid"]
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
} catch (a) {
|
|
89
|
+
const { message: s, response: f } = a;
|
|
90
|
+
throw new Nr(s, f, f.status);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}), rn = (r, e) => ({
|
|
94
|
+
async getFileInfo(t, n, o) {
|
|
95
|
+
return (await r.listFiles(t, n, {
|
|
96
|
+
depth: 0,
|
|
97
|
+
...o
|
|
98
|
+
})).resource;
|
|
99
|
+
}
|
|
100
|
+
}), nn = (r, e, { axiosClient: t, baseUrl: n }) => ({
|
|
101
|
+
async getFileUrl(o, u, {
|
|
102
|
+
disposition: l = "attachment",
|
|
103
|
+
isUrlSigningEnabled: i = !1,
|
|
104
|
+
signUrlTimeout: h = 86400,
|
|
105
|
+
version: a = null,
|
|
106
|
+
doHeadRequest: s = !1,
|
|
107
|
+
username: f = "",
|
|
108
|
+
...c
|
|
109
|
+
}) {
|
|
110
|
+
const g = l === "inline";
|
|
111
|
+
let { downloadURL: m } = u, d = !0;
|
|
112
|
+
if (!m && !g && (m = a ? r.getFileUrl(q("meta", u.fileId, "v", a)) : r.getFileUrl(u.webDavPath), f && s && await t.head(m), i && f ? m = await Kr(n, t).signUrl(m, f) : d = !1), !d || g) {
|
|
113
|
+
const w = await e.getFileContents(o, u, {
|
|
114
|
+
responseType: "blob",
|
|
115
|
+
...c
|
|
116
|
+
});
|
|
117
|
+
m = URL.createObjectURL(w.body);
|
|
118
|
+
}
|
|
119
|
+
return m;
|
|
120
|
+
},
|
|
121
|
+
revokeUrl: (o) => {
|
|
122
|
+
o && o.startsWith("blob:") && URL.revokeObjectURL(o);
|
|
123
|
+
}
|
|
124
|
+
}), sn = (r, e) => ({
|
|
125
|
+
getPublicFileUrl(t, n) {
|
|
126
|
+
return r.getFileUrl(q("public-files", n));
|
|
127
|
+
}
|
|
128
|
+
}), on = (r, e, t) => ({
|
|
129
|
+
async listFiles(n, { path: o, fileId: u } = {}, { depth: l = 1, davProperties: i, isTrash: h = !1, ...a } = {}) {
|
|
130
|
+
let s;
|
|
131
|
+
if (Tt(n)) {
|
|
132
|
+
if (s = await r.propfind(q(n.webDavPath, o), {
|
|
133
|
+
depth: l,
|
|
134
|
+
properties: i || je.PublicLink,
|
|
135
|
+
...a
|
|
136
|
+
}), s.forEach((g) => {
|
|
137
|
+
g.filename = g.filename.split("/").slice(1).join("/");
|
|
138
|
+
}), s.length === 1 && (s[0].filename = q(n.id, o, {
|
|
139
|
+
leadingSlash: !0
|
|
140
|
+
})), s.forEach((g) => {
|
|
141
|
+
g.filename = g.filename.split("/").slice(2).join("/");
|
|
142
|
+
}), (!o || o === "/") && l > 0 && n.driveAlias.startsWith("ocm/") && s[0].props[$e.PublicLinkItemType] === "file" && (s = [
|
|
143
|
+
{
|
|
144
|
+
basename: n.fileId,
|
|
145
|
+
type: "directory",
|
|
146
|
+
filename: "",
|
|
147
|
+
props: {}
|
|
148
|
+
},
|
|
149
|
+
...s
|
|
150
|
+
]), !o) {
|
|
151
|
+
const [g, ...m] = s;
|
|
152
|
+
return {
|
|
153
|
+
resource: Jr({
|
|
154
|
+
...g,
|
|
155
|
+
id: n.id,
|
|
156
|
+
driveAlias: n.driveAlias,
|
|
157
|
+
webDavPath: n.webDavPath
|
|
158
|
+
}),
|
|
159
|
+
children: m.map((d) => Ae(d, r.extraProps))
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
const c = s.map((g) => Ae(g, r.extraProps));
|
|
163
|
+
return { resource: c[0], children: c.slice(1) };
|
|
164
|
+
}
|
|
165
|
+
const f = async () => {
|
|
166
|
+
const c = await e.getPathForFileId(u);
|
|
167
|
+
return this.listFiles(n, { path: c }, { depth: l, davProperties: i });
|
|
168
|
+
};
|
|
169
|
+
try {
|
|
170
|
+
let c = "";
|
|
171
|
+
if (h ? c = wr(n.id) : c = fe(n, { fileId: u, path: o }), s = await r.propfind(c, {
|
|
172
|
+
depth: l,
|
|
173
|
+
properties: i || je.Default,
|
|
174
|
+
...a
|
|
175
|
+
}), h)
|
|
176
|
+
return {
|
|
177
|
+
resource: Ae(s[0], r.extraProps),
|
|
178
|
+
children: s.slice(1).map(Yr)
|
|
179
|
+
};
|
|
180
|
+
const g = s.map((d) => Ae(d, r.extraProps)), m = u === n.id;
|
|
181
|
+
return u && !m && u !== g[0].fileId ? f() : { resource: g[0], children: g.slice(1) };
|
|
182
|
+
} catch (c) {
|
|
183
|
+
if (c.statusCode === 404 && u)
|
|
184
|
+
return f();
|
|
185
|
+
throw c;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}), an = (r, e) => ({
|
|
189
|
+
moveFiles(t, { path: n, fileId: o }, u, {
|
|
190
|
+
path: l,
|
|
191
|
+
parentFolderId: i,
|
|
192
|
+
name: h
|
|
193
|
+
}, { overwrite: a, ...s } = {}) {
|
|
194
|
+
const f = fe(t, {
|
|
195
|
+
fileId: o,
|
|
196
|
+
path: n
|
|
197
|
+
}), c = fe(u, {
|
|
198
|
+
fileId: i,
|
|
199
|
+
path: l,
|
|
200
|
+
name: h
|
|
201
|
+
});
|
|
202
|
+
return r.move(f, c, {
|
|
203
|
+
overwrite: a || !1,
|
|
204
|
+
...s
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
}), un = (r, e, t) => ({
|
|
208
|
+
async putFileContents(n, {
|
|
209
|
+
fileName: o,
|
|
210
|
+
path: u,
|
|
211
|
+
parentFolderId: l,
|
|
212
|
+
content: i = "",
|
|
213
|
+
previousEntityTag: h = "",
|
|
214
|
+
overwrite: a,
|
|
215
|
+
onUploadProgress: s = null,
|
|
216
|
+
...f
|
|
217
|
+
}) {
|
|
218
|
+
const c = fe(n, { fileId: l, name: o, path: u }), { result: g } = await r.put(c, i, {
|
|
219
|
+
previousEntityTag: h,
|
|
220
|
+
overwrite: a,
|
|
221
|
+
onUploadProgress: s,
|
|
222
|
+
...f
|
|
223
|
+
});
|
|
224
|
+
return e.getFileInfo(n, {
|
|
225
|
+
fileId: g.headers.get("Oc-Fileid"),
|
|
226
|
+
path: u
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}), ln = (r, e) => ({
|
|
230
|
+
deleteFile(t, { path: n, ...o }) {
|
|
231
|
+
return r.delete(q(t.webDavPath, n), o);
|
|
232
|
+
}
|
|
233
|
+
}), cn = (r, e) => ({
|
|
234
|
+
restoreFile(t, { id: n }, { path: o }, { overwrite: u, ...l } = {}) {
|
|
235
|
+
if (Tt(t))
|
|
236
|
+
return;
|
|
237
|
+
const i = q(t.webDavPath, o);
|
|
238
|
+
return r.move(q(t.webDavTrashPath, n), i, {
|
|
239
|
+
overwrite: u,
|
|
240
|
+
...l
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}), hn = (r, e) => ({
|
|
244
|
+
restoreFileVersion(t, { parentFolderId: n, name: o, path: u }, l, i = {}) {
|
|
245
|
+
const h = fe(t, { path: u, fileId: n, name: o }), a = q("meta", n, "v", l, { leadingSlash: !0 }), s = q("files", h, { leadingSlash: !0 });
|
|
246
|
+
return r.copy(a, s, i);
|
|
247
|
+
}
|
|
248
|
+
}), fn = (r, e) => ({
|
|
249
|
+
clearTrashBin(t, { id: n, ...o } = {}) {
|
|
250
|
+
let u = wr(t.id);
|
|
251
|
+
return n && (u = q(u, n)), r.delete(u, o);
|
|
252
|
+
}
|
|
253
|
+
}), pn = (r, e) => ({
|
|
254
|
+
async search(t, { davProperties: n = je.Default, searchLimit: o, ...u }) {
|
|
255
|
+
const l = "/spaces/", { range: i, results: h } = await r.report(l, {
|
|
256
|
+
pattern: t,
|
|
257
|
+
limit: o,
|
|
258
|
+
properties: n,
|
|
259
|
+
...u
|
|
260
|
+
});
|
|
261
|
+
return {
|
|
262
|
+
resources: h.map((a) => ({
|
|
263
|
+
...Ae(a, r.extraProps),
|
|
264
|
+
highlights: a.props[$e.Highlights] || ""
|
|
265
|
+
})),
|
|
266
|
+
totalResults: i ? parseInt(i == null ? void 0 : i.split("/")[1]) : null
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
}), gn = (r, e) => ({
|
|
270
|
+
async getPathForFileId(t, n = {}) {
|
|
271
|
+
return (await r.propfind(q("meta", t, { leadingSlash: !0 }), {
|
|
272
|
+
properties: [$e.MetaPathForUser],
|
|
273
|
+
...n
|
|
274
|
+
}))[0].props[$e.MetaPathForUser];
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
/*! For license information please see index.js.LICENSE.txt */
|
|
278
|
+
var dn = { 2: (r) => {
|
|
279
|
+
function e(o, u, l) {
|
|
280
|
+
o instanceof RegExp && (o = t(o, l)), u instanceof RegExp && (u = t(u, l));
|
|
281
|
+
var i = n(o, u, l);
|
|
282
|
+
return i && { start: i[0], end: i[1], pre: l.slice(0, i[0]), body: l.slice(i[0] + o.length, i[1]), post: l.slice(i[1] + u.length) };
|
|
283
|
+
}
|
|
284
|
+
function t(o, u) {
|
|
285
|
+
var l = u.match(o);
|
|
286
|
+
return l ? l[0] : null;
|
|
287
|
+
}
|
|
288
|
+
function n(o, u, l) {
|
|
289
|
+
var i, h, a, s, f, c = l.indexOf(o), g = l.indexOf(u, c + 1), m = c;
|
|
290
|
+
if (c >= 0 && g > 0) {
|
|
291
|
+
for (i = [], a = l.length; m >= 0 && !f; ) m == c ? (i.push(m), c = l.indexOf(o, m + 1)) : i.length == 1 ? f = [i.pop(), g] : ((h = i.pop()) < a && (a = h, s = g), g = l.indexOf(u, m + 1)), m = c < g && c >= 0 ? c : g;
|
|
292
|
+
i.length && (f = [a, s]);
|
|
293
|
+
}
|
|
294
|
+
return f;
|
|
295
|
+
}
|
|
296
|
+
r.exports = e, e.range = n;
|
|
297
|
+
}, 101: function(r, e, t) {
|
|
298
|
+
var n;
|
|
299
|
+
r = t.nmd(r), function(o) {
|
|
300
|
+
var u = (r && r.exports, typeof Ue == "object" && Ue);
|
|
301
|
+
u.global !== u && u.window;
|
|
302
|
+
var l = function(f) {
|
|
303
|
+
this.message = f;
|
|
304
|
+
};
|
|
305
|
+
(l.prototype = new Error()).name = "InvalidCharacterError";
|
|
306
|
+
var i = function(f) {
|
|
307
|
+
throw new l(f);
|
|
308
|
+
}, h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = /[\t\n\f\r ]/g, s = { encode: function(f) {
|
|
309
|
+
f = String(f), /[^\0-\xFF]/.test(f) && i("The string to be encoded contains characters outside of the Latin1 range.");
|
|
310
|
+
for (var c, g, m, d, w = f.length % 3, y = "", p = -1, v = f.length - w; ++p < v; ) c = f.charCodeAt(p) << 16, g = f.charCodeAt(++p) << 8, m = f.charCodeAt(++p), y += h.charAt((d = c + g + m) >> 18 & 63) + h.charAt(d >> 12 & 63) + h.charAt(d >> 6 & 63) + h.charAt(63 & d);
|
|
311
|
+
return w == 2 ? (c = f.charCodeAt(p) << 8, g = f.charCodeAt(++p), y += h.charAt((d = c + g) >> 10) + h.charAt(d >> 4 & 63) + h.charAt(d << 2 & 63) + "=") : w == 1 && (d = f.charCodeAt(p), y += h.charAt(d >> 2) + h.charAt(d << 4 & 63) + "=="), y;
|
|
312
|
+
}, decode: function(f) {
|
|
313
|
+
var c = (f = String(f).replace(a, "")).length;
|
|
314
|
+
c % 4 == 0 && (c = (f = f.replace(/==?$/, "")).length), (c % 4 == 1 || /[^+a-zA-Z0-9/]/.test(f)) && i("Invalid character: the string to be decoded is not correctly encoded.");
|
|
315
|
+
for (var g, m, d = 0, w = "", y = -1; ++y < c; ) m = h.indexOf(f.charAt(y)), g = d % 4 ? 64 * g + m : m, d++ % 4 && (w += String.fromCharCode(255 & g >> (-2 * d & 6)));
|
|
316
|
+
return w;
|
|
317
|
+
}, version: "1.0.0" };
|
|
318
|
+
(n = (function() {
|
|
319
|
+
return s;
|
|
320
|
+
}).call(e, t, e, r)) === void 0 || (r.exports = n);
|
|
321
|
+
}();
|
|
322
|
+
}, 172: (r, e) => {
|
|
323
|
+
e.d = function(t) {
|
|
324
|
+
if (!t) return 0;
|
|
325
|
+
for (var n = (t = t.toString()).length, o = t.length; o--; ) {
|
|
326
|
+
var u = t.charCodeAt(o);
|
|
327
|
+
56320 <= u && u <= 57343 && o--, 127 < u && u <= 2047 ? n++ : 2047 < u && u <= 65535 && (n += 2);
|
|
328
|
+
}
|
|
329
|
+
return n;
|
|
330
|
+
};
|
|
331
|
+
}, 526: (r) => {
|
|
332
|
+
var e = { utf8: { stringToBytes: function(t) {
|
|
333
|
+
return e.bin.stringToBytes(unescape(encodeURIComponent(t)));
|
|
334
|
+
}, bytesToString: function(t) {
|
|
335
|
+
return decodeURIComponent(escape(e.bin.bytesToString(t)));
|
|
336
|
+
} }, bin: { stringToBytes: function(t) {
|
|
337
|
+
for (var n = [], o = 0; o < t.length; o++) n.push(255 & t.charCodeAt(o));
|
|
338
|
+
return n;
|
|
339
|
+
}, bytesToString: function(t) {
|
|
340
|
+
for (var n = [], o = 0; o < t.length; o++) n.push(String.fromCharCode(t[o]));
|
|
341
|
+
return n.join("");
|
|
342
|
+
} } };
|
|
343
|
+
r.exports = e;
|
|
344
|
+
}, 298: (r) => {
|
|
345
|
+
var e, t;
|
|
346
|
+
e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", t = { rotl: function(n, o) {
|
|
347
|
+
return n << o | n >>> 32 - o;
|
|
348
|
+
}, rotr: function(n, o) {
|
|
349
|
+
return n << 32 - o | n >>> o;
|
|
350
|
+
}, endian: function(n) {
|
|
351
|
+
if (n.constructor == Number) return 16711935 & t.rotl(n, 8) | 4278255360 & t.rotl(n, 24);
|
|
352
|
+
for (var o = 0; o < n.length; o++) n[o] = t.endian(n[o]);
|
|
353
|
+
return n;
|
|
354
|
+
}, randomBytes: function(n) {
|
|
355
|
+
for (var o = []; n > 0; n--) o.push(Math.floor(256 * Math.random()));
|
|
356
|
+
return o;
|
|
357
|
+
}, bytesToWords: function(n) {
|
|
358
|
+
for (var o = [], u = 0, l = 0; u < n.length; u++, l += 8) o[l >>> 5] |= n[u] << 24 - l % 32;
|
|
359
|
+
return o;
|
|
360
|
+
}, wordsToBytes: function(n) {
|
|
361
|
+
for (var o = [], u = 0; u < 32 * n.length; u += 8) o.push(n[u >>> 5] >>> 24 - u % 32 & 255);
|
|
362
|
+
return o;
|
|
363
|
+
}, bytesToHex: function(n) {
|
|
364
|
+
for (var o = [], u = 0; u < n.length; u++) o.push((n[u] >>> 4).toString(16)), o.push((15 & n[u]).toString(16));
|
|
365
|
+
return o.join("");
|
|
366
|
+
}, hexToBytes: function(n) {
|
|
367
|
+
for (var o = [], u = 0; u < n.length; u += 2) o.push(parseInt(n.substr(u, 2), 16));
|
|
368
|
+
return o;
|
|
369
|
+
}, bytesToBase64: function(n) {
|
|
370
|
+
for (var o = [], u = 0; u < n.length; u += 3) for (var l = n[u] << 16 | n[u + 1] << 8 | n[u + 2], i = 0; i < 4; i++) 8 * u + 6 * i <= 8 * n.length ? o.push(e.charAt(l >>> 6 * (3 - i) & 63)) : o.push("=");
|
|
371
|
+
return o.join("");
|
|
372
|
+
}, base64ToBytes: function(n) {
|
|
373
|
+
n = n.replace(/[^A-Z0-9+\/]/gi, "");
|
|
374
|
+
for (var o = [], u = 0, l = 0; u < n.length; l = ++u % 4) l != 0 && o.push((e.indexOf(n.charAt(u - 1)) & Math.pow(2, -2 * l + 8) - 1) << 2 * l | e.indexOf(n.charAt(u)) >>> 6 - 2 * l);
|
|
375
|
+
return o;
|
|
376
|
+
} }, r.exports = t;
|
|
377
|
+
}, 635: (r, e, t) => {
|
|
378
|
+
const n = t(31), o = t(338), u = t(221);
|
|
379
|
+
r.exports = { XMLParser: o, XMLValidator: n, XMLBuilder: u };
|
|
380
|
+
}, 118: (r) => {
|
|
381
|
+
r.exports = function(e) {
|
|
382
|
+
return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
|
|
383
|
+
for (const n of e)
|
|
384
|
+
if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
|
|
385
|
+
} : () => !1;
|
|
386
|
+
};
|
|
387
|
+
}, 705: (r, e) => {
|
|
388
|
+
const t = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = "[" + t + "][" + t + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*", o = new RegExp("^" + n + "$");
|
|
389
|
+
e.isExist = function(u) {
|
|
390
|
+
return u !== void 0;
|
|
391
|
+
}, e.isEmptyObject = function(u) {
|
|
392
|
+
return Object.keys(u).length === 0;
|
|
393
|
+
}, e.merge = function(u, l, i) {
|
|
394
|
+
if (l) {
|
|
395
|
+
const h = Object.keys(l), a = h.length;
|
|
396
|
+
for (let s = 0; s < a; s++) u[h[s]] = i === "strict" ? [l[h[s]]] : l[h[s]];
|
|
397
|
+
}
|
|
398
|
+
}, e.getValue = function(u) {
|
|
399
|
+
return e.isExist(u) ? u : "";
|
|
400
|
+
}, e.isName = function(u) {
|
|
401
|
+
return o.exec(u) != null;
|
|
402
|
+
}, e.getAllMatches = function(u, l) {
|
|
403
|
+
const i = [];
|
|
404
|
+
let h = l.exec(u);
|
|
405
|
+
for (; h; ) {
|
|
406
|
+
const a = [];
|
|
407
|
+
a.startIndex = l.lastIndex - h[0].length;
|
|
408
|
+
const s = h.length;
|
|
409
|
+
for (let f = 0; f < s; f++) a.push(h[f]);
|
|
410
|
+
i.push(a), h = l.exec(u);
|
|
411
|
+
}
|
|
412
|
+
return i;
|
|
413
|
+
}, e.nameRegexp = n;
|
|
414
|
+
}, 31: (r, e, t) => {
|
|
415
|
+
const n = t(705), o = { allowBooleanAttributes: !1, unpairedTags: [] };
|
|
416
|
+
function u(p) {
|
|
417
|
+
return p === " " || p === " " || p === `
|
|
418
|
+
` || p === "\r";
|
|
419
|
+
}
|
|
420
|
+
function l(p, v) {
|
|
421
|
+
const A = v;
|
|
422
|
+
for (; v < p.length; v++) if (!(p[v] != "?" && p[v] != " ")) {
|
|
423
|
+
const N = p.substr(A, v - A);
|
|
424
|
+
if (v > 5 && N === "xml") return m("InvalidXml", "XML declaration allowed only at the start of the document.", w(p, v));
|
|
425
|
+
if (p[v] == "?" && p[v + 1] == ">") {
|
|
426
|
+
v++;
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
return v;
|
|
431
|
+
}
|
|
432
|
+
function i(p, v) {
|
|
433
|
+
if (p.length > v + 5 && p[v + 1] === "-" && p[v + 2] === "-") {
|
|
434
|
+
for (v += 3; v < p.length; v++) if (p[v] === "-" && p[v + 1] === "-" && p[v + 2] === ">") {
|
|
435
|
+
v += 2;
|
|
436
|
+
break;
|
|
437
|
+
}
|
|
438
|
+
} else if (p.length > v + 8 && p[v + 1] === "D" && p[v + 2] === "O" && p[v + 3] === "C" && p[v + 4] === "T" && p[v + 5] === "Y" && p[v + 6] === "P" && p[v + 7] === "E") {
|
|
439
|
+
let A = 1;
|
|
440
|
+
for (v += 8; v < p.length; v++) if (p[v] === "<") A++;
|
|
441
|
+
else if (p[v] === ">" && (A--, A === 0)) break;
|
|
442
|
+
} else if (p.length > v + 9 && p[v + 1] === "[" && p[v + 2] === "C" && p[v + 3] === "D" && p[v + 4] === "A" && p[v + 5] === "T" && p[v + 6] === "A" && p[v + 7] === "[") {
|
|
443
|
+
for (v += 8; v < p.length; v++) if (p[v] === "]" && p[v + 1] === "]" && p[v + 2] === ">") {
|
|
444
|
+
v += 2;
|
|
445
|
+
break;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
return v;
|
|
449
|
+
}
|
|
450
|
+
e.validate = function(p, v) {
|
|
451
|
+
v = Object.assign({}, o, v);
|
|
452
|
+
const A = [];
|
|
453
|
+
let N = !1, b = !1;
|
|
454
|
+
p[0] === "\uFEFF" && (p = p.substr(1));
|
|
455
|
+
for (let x = 0; x < p.length; x++) if (p[x] === "<" && p[x + 1] === "?") {
|
|
456
|
+
if (x += 2, x = l(p, x), x.err) return x;
|
|
457
|
+
} else {
|
|
458
|
+
if (p[x] !== "<") {
|
|
459
|
+
if (u(p[x])) continue;
|
|
460
|
+
return m("InvalidChar", "char '" + p[x] + "' is not expected.", w(p, x));
|
|
461
|
+
}
|
|
462
|
+
{
|
|
463
|
+
let T = x;
|
|
464
|
+
if (x++, p[x] === "!") {
|
|
465
|
+
x = i(p, x);
|
|
466
|
+
continue;
|
|
467
|
+
}
|
|
468
|
+
{
|
|
469
|
+
let O = !1;
|
|
470
|
+
p[x] === "/" && (O = !0, x++);
|
|
471
|
+
let I = "";
|
|
472
|
+
for (; x < p.length && p[x] !== ">" && p[x] !== " " && p[x] !== " " && p[x] !== `
|
|
473
|
+
` && p[x] !== "\r"; x++) I += p[x];
|
|
474
|
+
if (I = I.trim(), I[I.length - 1] === "/" && (I = I.substring(0, I.length - 1), x--), E = I, !n.isName(E)) {
|
|
475
|
+
let j;
|
|
476
|
+
return j = I.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + I + "' is an invalid name.", m("InvalidTag", j, w(p, x));
|
|
477
|
+
}
|
|
478
|
+
const C = s(p, x);
|
|
479
|
+
if (C === !1) return m("InvalidAttr", "Attributes for '" + I + "' have open quote.", w(p, x));
|
|
480
|
+
let P = C.value;
|
|
481
|
+
if (x = C.index, P[P.length - 1] === "/") {
|
|
482
|
+
const j = x - P.length;
|
|
483
|
+
P = P.substring(0, P.length - 1);
|
|
484
|
+
const F = c(P, v);
|
|
485
|
+
if (F !== !0) return m(F.err.code, F.err.msg, w(p, j + F.err.line));
|
|
486
|
+
N = !0;
|
|
487
|
+
} else if (O) {
|
|
488
|
+
if (!C.tagClosed) return m("InvalidTag", "Closing tag '" + I + "' doesn't have proper closing.", w(p, x));
|
|
489
|
+
if (P.trim().length > 0) return m("InvalidTag", "Closing tag '" + I + "' can't have attributes or invalid starting.", w(p, T));
|
|
490
|
+
if (A.length === 0) return m("InvalidTag", "Closing tag '" + I + "' has not been opened.", w(p, T));
|
|
491
|
+
{
|
|
492
|
+
const j = A.pop();
|
|
493
|
+
if (I !== j.tagName) {
|
|
494
|
+
let F = w(p, j.tagStartPos);
|
|
495
|
+
return m("InvalidTag", "Expected closing tag '" + j.tagName + "' (opened in line " + F.line + ", col " + F.col + ") instead of closing tag '" + I + "'.", w(p, T));
|
|
496
|
+
}
|
|
497
|
+
A.length == 0 && (b = !0);
|
|
498
|
+
}
|
|
499
|
+
} else {
|
|
500
|
+
const j = c(P, v);
|
|
501
|
+
if (j !== !0) return m(j.err.code, j.err.msg, w(p, x - P.length + j.err.line));
|
|
502
|
+
if (b === !0) return m("InvalidXml", "Multiple possible root nodes found.", w(p, x));
|
|
503
|
+
v.unpairedTags.indexOf(I) !== -1 || A.push({ tagName: I, tagStartPos: T }), N = !0;
|
|
504
|
+
}
|
|
505
|
+
for (x++; x < p.length; x++) if (p[x] === "<") {
|
|
506
|
+
if (p[x + 1] === "!") {
|
|
507
|
+
x++, x = i(p, x);
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
if (p[x + 1] !== "?") break;
|
|
511
|
+
if (x = l(p, ++x), x.err) return x;
|
|
512
|
+
} else if (p[x] === "&") {
|
|
513
|
+
const j = g(p, x);
|
|
514
|
+
if (j == -1) return m("InvalidChar", "char '&' is not expected.", w(p, x));
|
|
515
|
+
x = j;
|
|
516
|
+
} else if (b === !0 && !u(p[x])) return m("InvalidXml", "Extra text at the end", w(p, x));
|
|
517
|
+
p[x] === "<" && x--;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
var E;
|
|
522
|
+
return N ? A.length == 1 ? m("InvalidTag", "Unclosed tag '" + A[0].tagName + "'.", w(p, A[0].tagStartPos)) : !(A.length > 0) || m("InvalidXml", "Invalid '" + JSON.stringify(A.map((x) => x.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m("InvalidXml", "Start tag expected.", 1);
|
|
523
|
+
};
|
|
524
|
+
const h = '"', a = "'";
|
|
525
|
+
function s(p, v) {
|
|
526
|
+
let A = "", N = "", b = !1;
|
|
527
|
+
for (; v < p.length; v++) {
|
|
528
|
+
if (p[v] === h || p[v] === a) N === "" ? N = p[v] : N !== p[v] || (N = "");
|
|
529
|
+
else if (p[v] === ">" && N === "") {
|
|
530
|
+
b = !0;
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
533
|
+
A += p[v];
|
|
534
|
+
}
|
|
535
|
+
return N === "" && { value: A, index: v, tagClosed: b };
|
|
536
|
+
}
|
|
537
|
+
const f = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
|
|
538
|
+
function c(p, v) {
|
|
539
|
+
const A = n.getAllMatches(p, f), N = {};
|
|
540
|
+
for (let b = 0; b < A.length; b++) {
|
|
541
|
+
if (A[b][1].length === 0) return m("InvalidAttr", "Attribute '" + A[b][2] + "' has no space in starting.", y(A[b]));
|
|
542
|
+
if (A[b][3] !== void 0 && A[b][4] === void 0) return m("InvalidAttr", "Attribute '" + A[b][2] + "' is without value.", y(A[b]));
|
|
543
|
+
if (A[b][3] === void 0 && !v.allowBooleanAttributes) return m("InvalidAttr", "boolean attribute '" + A[b][2] + "' is not allowed.", y(A[b]));
|
|
544
|
+
const E = A[b][2];
|
|
545
|
+
if (!d(E)) return m("InvalidAttr", "Attribute '" + E + "' is an invalid name.", y(A[b]));
|
|
546
|
+
if (N.hasOwnProperty(E)) return m("InvalidAttr", "Attribute '" + E + "' is repeated.", y(A[b]));
|
|
547
|
+
N[E] = 1;
|
|
548
|
+
}
|
|
549
|
+
return !0;
|
|
550
|
+
}
|
|
551
|
+
function g(p, v) {
|
|
552
|
+
if (p[++v] === ";") return -1;
|
|
553
|
+
if (p[v] === "#") return function(N, b) {
|
|
554
|
+
let E = /\d/;
|
|
555
|
+
for (N[b] === "x" && (b++, E = /[\da-fA-F]/); b < N.length; b++) {
|
|
556
|
+
if (N[b] === ";") return b;
|
|
557
|
+
if (!N[b].match(E)) break;
|
|
558
|
+
}
|
|
559
|
+
return -1;
|
|
560
|
+
}(p, ++v);
|
|
561
|
+
let A = 0;
|
|
562
|
+
for (; v < p.length; v++, A++) if (!(p[v].match(/\w/) && A < 20)) {
|
|
563
|
+
if (p[v] === ";") break;
|
|
564
|
+
return -1;
|
|
565
|
+
}
|
|
566
|
+
return v;
|
|
567
|
+
}
|
|
568
|
+
function m(p, v, A) {
|
|
569
|
+
return { err: { code: p, msg: v, line: A.line || A, col: A.col } };
|
|
570
|
+
}
|
|
571
|
+
function d(p) {
|
|
572
|
+
return n.isName(p);
|
|
573
|
+
}
|
|
574
|
+
function w(p, v) {
|
|
575
|
+
const A = p.substring(0, v).split(/\r?\n/);
|
|
576
|
+
return { line: A.length, col: A[A.length - 1].length + 1 };
|
|
577
|
+
}
|
|
578
|
+
function y(p) {
|
|
579
|
+
return p.startIndex + p[1].length;
|
|
580
|
+
}
|
|
581
|
+
}, 221: (r, e, t) => {
|
|
582
|
+
const n = t(87), o = t(118), u = { attributeNamePrefix: "@_", attributesGroupName: !1, textNodeName: "#text", ignoreAttributes: !0, cdataPropName: !1, format: !1, indentBy: " ", suppressEmptyNode: !1, suppressUnpairedNode: !0, suppressBooleanAttributes: !0, tagValueProcessor: function(s, f) {
|
|
583
|
+
return f;
|
|
584
|
+
}, attributeValueProcessor: function(s, f) {
|
|
585
|
+
return f;
|
|
586
|
+
}, preserveOrder: !1, commentPropName: !1, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: !0, stopNodes: [], oneListGroup: !1 };
|
|
587
|
+
function l(s) {
|
|
588
|
+
this.options = Object.assign({}, u, s), this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
|
|
589
|
+
return !1;
|
|
590
|
+
} : (this.ignoreAttributesFn = o(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = a), this.processTextOrObjNode = i, this.options.format ? (this.indentate = h, this.tagEndChar = `>
|
|
591
|
+
`, this.newLine = `
|
|
592
|
+
`) : (this.indentate = function() {
|
|
593
|
+
return "";
|
|
594
|
+
}, this.tagEndChar = ">", this.newLine = "");
|
|
595
|
+
}
|
|
596
|
+
function i(s, f, c, g) {
|
|
597
|
+
const m = this.j2x(s, c + 1, g.concat(f));
|
|
598
|
+
return s[this.options.textNodeName] !== void 0 && Object.keys(s).length === 1 ? this.buildTextValNode(s[this.options.textNodeName], f, m.attrStr, c) : this.buildObjectNode(m.val, f, m.attrStr, c);
|
|
599
|
+
}
|
|
600
|
+
function h(s) {
|
|
601
|
+
return this.options.indentBy.repeat(s);
|
|
602
|
+
}
|
|
603
|
+
function a(s) {
|
|
604
|
+
return !(!s.startsWith(this.options.attributeNamePrefix) || s === this.options.textNodeName) && s.substr(this.attrPrefixLen);
|
|
605
|
+
}
|
|
606
|
+
l.prototype.build = function(s) {
|
|
607
|
+
return this.options.preserveOrder ? n(s, this.options) : (Array.isArray(s) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (s = { [this.options.arrayNodeName]: s }), this.j2x(s, 0, []).val);
|
|
608
|
+
}, l.prototype.j2x = function(s, f, c) {
|
|
609
|
+
let g = "", m = "";
|
|
610
|
+
const d = c.join(".");
|
|
611
|
+
for (let w in s) if (Object.prototype.hasOwnProperty.call(s, w)) if (s[w] === void 0) this.isAttribute(w) && (m += "");
|
|
612
|
+
else if (s[w] === null) this.isAttribute(w) ? m += "" : w[0] === "?" ? m += this.indentate(f) + "<" + w + "?" + this.tagEndChar : m += this.indentate(f) + "<" + w + "/" + this.tagEndChar;
|
|
613
|
+
else if (s[w] instanceof Date) m += this.buildTextValNode(s[w], w, "", f);
|
|
614
|
+
else if (typeof s[w] != "object") {
|
|
615
|
+
const y = this.isAttribute(w);
|
|
616
|
+
if (y && !this.ignoreAttributesFn(y, d)) g += this.buildAttrPairStr(y, "" + s[w]);
|
|
617
|
+
else if (!y) if (w === this.options.textNodeName) {
|
|
618
|
+
let p = this.options.tagValueProcessor(w, "" + s[w]);
|
|
619
|
+
m += this.replaceEntitiesValue(p);
|
|
620
|
+
} else m += this.buildTextValNode(s[w], w, "", f);
|
|
621
|
+
} else if (Array.isArray(s[w])) {
|
|
622
|
+
const y = s[w].length;
|
|
623
|
+
let p = "", v = "";
|
|
624
|
+
for (let A = 0; A < y; A++) {
|
|
625
|
+
const N = s[w][A];
|
|
626
|
+
if (N !== void 0) if (N === null) w[0] === "?" ? m += this.indentate(f) + "<" + w + "?" + this.tagEndChar : m += this.indentate(f) + "<" + w + "/" + this.tagEndChar;
|
|
627
|
+
else if (typeof N == "object") if (this.options.oneListGroup) {
|
|
628
|
+
const b = this.j2x(N, f + 1, c.concat(w));
|
|
629
|
+
p += b.val, this.options.attributesGroupName && N.hasOwnProperty(this.options.attributesGroupName) && (v += b.attrStr);
|
|
630
|
+
} else p += this.processTextOrObjNode(N, w, f, c);
|
|
631
|
+
else if (this.options.oneListGroup) {
|
|
632
|
+
let b = this.options.tagValueProcessor(w, N);
|
|
633
|
+
b = this.replaceEntitiesValue(b), p += b;
|
|
634
|
+
} else p += this.buildTextValNode(N, w, "", f);
|
|
635
|
+
}
|
|
636
|
+
this.options.oneListGroup && (p = this.buildObjectNode(p, w, v, f)), m += p;
|
|
637
|
+
} else if (this.options.attributesGroupName && w === this.options.attributesGroupName) {
|
|
638
|
+
const y = Object.keys(s[w]), p = y.length;
|
|
639
|
+
for (let v = 0; v < p; v++) g += this.buildAttrPairStr(y[v], "" + s[w][y[v]]);
|
|
640
|
+
} else m += this.processTextOrObjNode(s[w], w, f, c);
|
|
641
|
+
return { attrStr: g, val: m };
|
|
642
|
+
}, l.prototype.buildAttrPairStr = function(s, f) {
|
|
643
|
+
return f = this.options.attributeValueProcessor(s, "" + f), f = this.replaceEntitiesValue(f), this.options.suppressBooleanAttributes && f === "true" ? " " + s : " " + s + '="' + f + '"';
|
|
644
|
+
}, l.prototype.buildObjectNode = function(s, f, c, g) {
|
|
645
|
+
if (s === "") return f[0] === "?" ? this.indentate(g) + "<" + f + c + "?" + this.tagEndChar : this.indentate(g) + "<" + f + c + this.closeTag(f) + this.tagEndChar;
|
|
646
|
+
{
|
|
647
|
+
let m = "</" + f + this.tagEndChar, d = "";
|
|
648
|
+
return f[0] === "?" && (d = "?", m = ""), !c && c !== "" || s.indexOf("<") !== -1 ? this.options.commentPropName !== !1 && f === this.options.commentPropName && d.length === 0 ? this.indentate(g) + `<!--${s}-->` + this.newLine : this.indentate(g) + "<" + f + c + d + this.tagEndChar + s + this.indentate(g) + m : this.indentate(g) + "<" + f + c + d + ">" + s + m;
|
|
649
|
+
}
|
|
650
|
+
}, l.prototype.closeTag = function(s) {
|
|
651
|
+
let f = "";
|
|
652
|
+
return this.options.unpairedTags.indexOf(s) !== -1 ? this.options.suppressUnpairedNode || (f = "/") : f = this.options.suppressEmptyNode ? "/" : `></${s}`, f;
|
|
653
|
+
}, l.prototype.buildTextValNode = function(s, f, c, g) {
|
|
654
|
+
if (this.options.cdataPropName !== !1 && f === this.options.cdataPropName) return this.indentate(g) + `<![CDATA[${s}]]>` + this.newLine;
|
|
655
|
+
if (this.options.commentPropName !== !1 && f === this.options.commentPropName) return this.indentate(g) + `<!--${s}-->` + this.newLine;
|
|
656
|
+
if (f[0] === "?") return this.indentate(g) + "<" + f + c + "?" + this.tagEndChar;
|
|
657
|
+
{
|
|
658
|
+
let m = this.options.tagValueProcessor(f, s);
|
|
659
|
+
return m = this.replaceEntitiesValue(m), m === "" ? this.indentate(g) + "<" + f + c + this.closeTag(f) + this.tagEndChar : this.indentate(g) + "<" + f + c + ">" + m + "</" + f + this.tagEndChar;
|
|
660
|
+
}
|
|
661
|
+
}, l.prototype.replaceEntitiesValue = function(s) {
|
|
662
|
+
if (s && s.length > 0 && this.options.processEntities) for (let f = 0; f < this.options.entities.length; f++) {
|
|
663
|
+
const c = this.options.entities[f];
|
|
664
|
+
s = s.replace(c.regex, c.val);
|
|
665
|
+
}
|
|
666
|
+
return s;
|
|
667
|
+
}, r.exports = l;
|
|
668
|
+
}, 87: (r) => {
|
|
669
|
+
function e(l, i, h, a) {
|
|
670
|
+
let s = "", f = !1;
|
|
671
|
+
for (let c = 0; c < l.length; c++) {
|
|
672
|
+
const g = l[c], m = t(g);
|
|
673
|
+
if (m === void 0) continue;
|
|
674
|
+
let d = "";
|
|
675
|
+
if (d = h.length === 0 ? m : `${h}.${m}`, m === i.textNodeName) {
|
|
676
|
+
let v = g[m];
|
|
677
|
+
o(d, i) || (v = i.tagValueProcessor(m, v), v = u(v, i)), f && (s += a), s += v, f = !1;
|
|
678
|
+
continue;
|
|
679
|
+
}
|
|
680
|
+
if (m === i.cdataPropName) {
|
|
681
|
+
f && (s += a), s += `<![CDATA[${g[m][0][i.textNodeName]}]]>`, f = !1;
|
|
682
|
+
continue;
|
|
683
|
+
}
|
|
684
|
+
if (m === i.commentPropName) {
|
|
685
|
+
s += a + `<!--${g[m][0][i.textNodeName]}-->`, f = !0;
|
|
686
|
+
continue;
|
|
687
|
+
}
|
|
688
|
+
if (m[0] === "?") {
|
|
689
|
+
const v = n(g[":@"], i), A = m === "?xml" ? "" : a;
|
|
690
|
+
let N = g[m][0][i.textNodeName];
|
|
691
|
+
N = N.length !== 0 ? " " + N : "", s += A + `<${m}${N}${v}?>`, f = !0;
|
|
692
|
+
continue;
|
|
693
|
+
}
|
|
694
|
+
let w = a;
|
|
695
|
+
w !== "" && (w += i.indentBy);
|
|
696
|
+
const y = a + `<${m}${n(g[":@"], i)}`, p = e(g[m], i, d, w);
|
|
697
|
+
i.unpairedTags.indexOf(m) !== -1 ? i.suppressUnpairedNode ? s += y + ">" : s += y + "/>" : p && p.length !== 0 || !i.suppressEmptyNode ? p && p.endsWith(">") ? s += y + `>${p}${a}</${m}>` : (s += y + ">", p && a !== "" && (p.includes("/>") || p.includes("</")) ? s += a + i.indentBy + p + a : s += p, s += `</${m}>`) : s += y + "/>", f = !0;
|
|
698
|
+
}
|
|
699
|
+
return s;
|
|
700
|
+
}
|
|
701
|
+
function t(l) {
|
|
702
|
+
const i = Object.keys(l);
|
|
703
|
+
for (let h = 0; h < i.length; h++) {
|
|
704
|
+
const a = i[h];
|
|
705
|
+
if (l.hasOwnProperty(a) && a !== ":@") return a;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
function n(l, i) {
|
|
709
|
+
let h = "";
|
|
710
|
+
if (l && !i.ignoreAttributes) for (let a in l) {
|
|
711
|
+
if (!l.hasOwnProperty(a)) continue;
|
|
712
|
+
let s = i.attributeValueProcessor(a, l[a]);
|
|
713
|
+
s = u(s, i), s === !0 && i.suppressBooleanAttributes ? h += ` ${a.substr(i.attributeNamePrefix.length)}` : h += ` ${a.substr(i.attributeNamePrefix.length)}="${s}"`;
|
|
714
|
+
}
|
|
715
|
+
return h;
|
|
716
|
+
}
|
|
717
|
+
function o(l, i) {
|
|
718
|
+
let h = (l = l.substr(0, l.length - i.textNodeName.length - 1)).substr(l.lastIndexOf(".") + 1);
|
|
719
|
+
for (let a in i.stopNodes) if (i.stopNodes[a] === l || i.stopNodes[a] === "*." + h) return !0;
|
|
720
|
+
return !1;
|
|
721
|
+
}
|
|
722
|
+
function u(l, i) {
|
|
723
|
+
if (l && l.length > 0 && i.processEntities) for (let h = 0; h < i.entities.length; h++) {
|
|
724
|
+
const a = i.entities[h];
|
|
725
|
+
l = l.replace(a.regex, a.val);
|
|
726
|
+
}
|
|
727
|
+
return l;
|
|
728
|
+
}
|
|
729
|
+
r.exports = function(l, i) {
|
|
730
|
+
let h = "";
|
|
731
|
+
return i.format && i.indentBy.length > 0 && (h = `
|
|
732
|
+
`), e(l, i, "", h);
|
|
733
|
+
};
|
|
734
|
+
}, 193: (r, e, t) => {
|
|
735
|
+
const n = t(705);
|
|
736
|
+
function o(f, c) {
|
|
737
|
+
let g = "";
|
|
738
|
+
for (; c < f.length && f[c] !== "'" && f[c] !== '"'; c++) g += f[c];
|
|
739
|
+
if (g = g.trim(), g.indexOf(" ") !== -1) throw new Error("External entites are not supported");
|
|
740
|
+
const m = f[c++];
|
|
741
|
+
let d = "";
|
|
742
|
+
for (; c < f.length && f[c] !== m; c++) d += f[c];
|
|
743
|
+
return [g, d, c];
|
|
744
|
+
}
|
|
745
|
+
function u(f, c) {
|
|
746
|
+
return f[c + 1] === "!" && f[c + 2] === "-" && f[c + 3] === "-";
|
|
747
|
+
}
|
|
748
|
+
function l(f, c) {
|
|
749
|
+
return f[c + 1] === "!" && f[c + 2] === "E" && f[c + 3] === "N" && f[c + 4] === "T" && f[c + 5] === "I" && f[c + 6] === "T" && f[c + 7] === "Y";
|
|
750
|
+
}
|
|
751
|
+
function i(f, c) {
|
|
752
|
+
return f[c + 1] === "!" && f[c + 2] === "E" && f[c + 3] === "L" && f[c + 4] === "E" && f[c + 5] === "M" && f[c + 6] === "E" && f[c + 7] === "N" && f[c + 8] === "T";
|
|
753
|
+
}
|
|
754
|
+
function h(f, c) {
|
|
755
|
+
return f[c + 1] === "!" && f[c + 2] === "A" && f[c + 3] === "T" && f[c + 4] === "T" && f[c + 5] === "L" && f[c + 6] === "I" && f[c + 7] === "S" && f[c + 8] === "T";
|
|
756
|
+
}
|
|
757
|
+
function a(f, c) {
|
|
758
|
+
return f[c + 1] === "!" && f[c + 2] === "N" && f[c + 3] === "O" && f[c + 4] === "T" && f[c + 5] === "A" && f[c + 6] === "T" && f[c + 7] === "I" && f[c + 8] === "O" && f[c + 9] === "N";
|
|
759
|
+
}
|
|
760
|
+
function s(f) {
|
|
761
|
+
if (n.isName(f)) return f;
|
|
762
|
+
throw new Error(`Invalid entity name ${f}`);
|
|
763
|
+
}
|
|
764
|
+
r.exports = function(f, c) {
|
|
765
|
+
const g = {};
|
|
766
|
+
if (f[c + 3] !== "O" || f[c + 4] !== "C" || f[c + 5] !== "T" || f[c + 6] !== "Y" || f[c + 7] !== "P" || f[c + 8] !== "E") throw new Error("Invalid Tag instead of DOCTYPE");
|
|
767
|
+
{
|
|
768
|
+
c += 9;
|
|
769
|
+
let m = 1, d = !1, w = !1, y = "";
|
|
770
|
+
for (; c < f.length; c++) if (f[c] !== "<" || w) if (f[c] === ">") {
|
|
771
|
+
if (w ? f[c - 1] === "-" && f[c - 2] === "-" && (w = !1, m--) : m--, m === 0) break;
|
|
772
|
+
} else f[c] === "[" ? d = !0 : y += f[c];
|
|
773
|
+
else {
|
|
774
|
+
if (d && l(f, c)) {
|
|
775
|
+
let p, v;
|
|
776
|
+
c += 7, [p, v, c] = o(f, c + 1), v.indexOf("&") === -1 && (g[s(p)] = { regx: RegExp(`&${p};`, "g"), val: v });
|
|
777
|
+
} else if (d && i(f, c)) c += 8;
|
|
778
|
+
else if (d && h(f, c)) c += 8;
|
|
779
|
+
else if (d && a(f, c)) c += 9;
|
|
780
|
+
else {
|
|
781
|
+
if (!u) throw new Error("Invalid DOCTYPE");
|
|
782
|
+
w = !0;
|
|
783
|
+
}
|
|
784
|
+
m++, y = "";
|
|
785
|
+
}
|
|
786
|
+
if (m !== 0) throw new Error("Unclosed DOCTYPE");
|
|
787
|
+
}
|
|
788
|
+
return { entities: g, i: c };
|
|
789
|
+
};
|
|
790
|
+
}, 63: (r, e) => {
|
|
791
|
+
const t = { preserveOrder: !1, attributeNamePrefix: "@_", attributesGroupName: !1, textNodeName: "#text", ignoreAttributes: !0, removeNSPrefix: !1, allowBooleanAttributes: !1, parseTagValue: !0, parseAttributeValue: !1, trimValues: !0, cdataPropName: !1, numberParseOptions: { hex: !0, leadingZeros: !0, eNotation: !0 }, tagValueProcessor: function(n, o) {
|
|
792
|
+
return o;
|
|
793
|
+
}, attributeValueProcessor: function(n, o) {
|
|
794
|
+
return o;
|
|
795
|
+
}, stopNodes: [], alwaysCreateTextNode: !1, isArray: () => !1, commentPropName: !1, unpairedTags: [], processEntities: !0, htmlEntities: !1, ignoreDeclaration: !1, ignorePiTags: !1, transformTagName: !1, transformAttributeName: !1, updateTag: function(n, o, u) {
|
|
796
|
+
return n;
|
|
797
|
+
} };
|
|
798
|
+
e.buildOptions = function(n) {
|
|
799
|
+
return Object.assign({}, t, n);
|
|
800
|
+
}, e.defaultOptions = t;
|
|
801
|
+
}, 299: (r, e, t) => {
|
|
802
|
+
const n = t(705), o = t(365), u = t(193), l = t(494), i = t(118);
|
|
803
|
+
function h(b) {
|
|
804
|
+
const E = Object.keys(b);
|
|
805
|
+
for (let x = 0; x < E.length; x++) {
|
|
806
|
+
const T = E[x];
|
|
807
|
+
this.lastEntities[T] = { regex: new RegExp("&" + T + ";", "g"), val: b[T] };
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
function a(b, E, x, T, O, I, C) {
|
|
811
|
+
if (b !== void 0 && (this.options.trimValues && !T && (b = b.trim()), b.length > 0)) {
|
|
812
|
+
C || (b = this.replaceEntitiesValue(b));
|
|
813
|
+
const P = this.options.tagValueProcessor(E, b, x, O, I);
|
|
814
|
+
return P == null ? b : typeof P != typeof b || P !== b ? P : this.options.trimValues || b.trim() === b ? N(b, this.options.parseTagValue, this.options.numberParseOptions) : b;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
function s(b) {
|
|
818
|
+
if (this.options.removeNSPrefix) {
|
|
819
|
+
const E = b.split(":"), x = b.charAt(0) === "/" ? "/" : "";
|
|
820
|
+
if (E[0] === "xmlns") return "";
|
|
821
|
+
E.length === 2 && (b = x + E[1]);
|
|
822
|
+
}
|
|
823
|
+
return b;
|
|
824
|
+
}
|
|
825
|
+
const f = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
|
|
826
|
+
function c(b, E, x) {
|
|
827
|
+
if (this.options.ignoreAttributes !== !0 && typeof b == "string") {
|
|
828
|
+
const T = n.getAllMatches(b, f), O = T.length, I = {};
|
|
829
|
+
for (let C = 0; C < O; C++) {
|
|
830
|
+
const P = this.resolveNameSpace(T[C][1]);
|
|
831
|
+
if (this.ignoreAttributesFn(P, E)) continue;
|
|
832
|
+
let j = T[C][4], F = this.options.attributeNamePrefix + P;
|
|
833
|
+
if (P.length) if (this.options.transformAttributeName && (F = this.options.transformAttributeName(F)), F === "__proto__" && (F = "#__proto__"), j !== void 0) {
|
|
834
|
+
this.options.trimValues && (j = j.trim()), j = this.replaceEntitiesValue(j);
|
|
835
|
+
const $ = this.options.attributeValueProcessor(P, j, E);
|
|
836
|
+
I[F] = $ == null ? j : typeof $ != typeof j || $ !== j ? $ : N(j, this.options.parseAttributeValue, this.options.numberParseOptions);
|
|
837
|
+
} else this.options.allowBooleanAttributes && (I[F] = !0);
|
|
838
|
+
}
|
|
839
|
+
if (!Object.keys(I).length) return;
|
|
840
|
+
if (this.options.attributesGroupName) {
|
|
841
|
+
const C = {};
|
|
842
|
+
return C[this.options.attributesGroupName] = I, C;
|
|
843
|
+
}
|
|
844
|
+
return I;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
const g = function(b) {
|
|
848
|
+
b = b.replace(/\r\n?/g, `
|
|
849
|
+
`);
|
|
850
|
+
const E = new o("!xml");
|
|
851
|
+
let x = E, T = "", O = "";
|
|
852
|
+
for (let I = 0; I < b.length; I++) if (b[I] === "<") if (b[I + 1] === "/") {
|
|
853
|
+
const C = p(b, ">", I, "Closing Tag is not closed.");
|
|
854
|
+
let P = b.substring(I + 2, C).trim();
|
|
855
|
+
if (this.options.removeNSPrefix) {
|
|
856
|
+
const $ = P.indexOf(":");
|
|
857
|
+
$ !== -1 && (P = P.substr($ + 1));
|
|
858
|
+
}
|
|
859
|
+
this.options.transformTagName && (P = this.options.transformTagName(P)), x && (T = this.saveTextToParentTag(T, x, O));
|
|
860
|
+
const j = O.substring(O.lastIndexOf(".") + 1);
|
|
861
|
+
if (P && this.options.unpairedTags.indexOf(P) !== -1) throw new Error(`Unpaired tag can not be used as closing tag: </${P}>`);
|
|
862
|
+
let F = 0;
|
|
863
|
+
j && this.options.unpairedTags.indexOf(j) !== -1 ? (F = O.lastIndexOf(".", O.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : F = O.lastIndexOf("."), O = O.substring(0, F), x = this.tagsNodeStack.pop(), T = "", I = C;
|
|
864
|
+
} else if (b[I + 1] === "?") {
|
|
865
|
+
let C = v(b, I, !1, "?>");
|
|
866
|
+
if (!C) throw new Error("Pi Tag is not closed.");
|
|
867
|
+
if (T = this.saveTextToParentTag(T, x, O), !(this.options.ignoreDeclaration && C.tagName === "?xml" || this.options.ignorePiTags)) {
|
|
868
|
+
const P = new o(C.tagName);
|
|
869
|
+
P.add(this.options.textNodeName, ""), C.tagName !== C.tagExp && C.attrExpPresent && (P[":@"] = this.buildAttributesMap(C.tagExp, O, C.tagName)), this.addChild(x, P, O);
|
|
870
|
+
}
|
|
871
|
+
I = C.closeIndex + 1;
|
|
872
|
+
} else if (b.substr(I + 1, 3) === "!--") {
|
|
873
|
+
const C = p(b, "-->", I + 4, "Comment is not closed.");
|
|
874
|
+
if (this.options.commentPropName) {
|
|
875
|
+
const P = b.substring(I + 4, C - 2);
|
|
876
|
+
T = this.saveTextToParentTag(T, x, O), x.add(this.options.commentPropName, [{ [this.options.textNodeName]: P }]);
|
|
877
|
+
}
|
|
878
|
+
I = C;
|
|
879
|
+
} else if (b.substr(I + 1, 2) === "!D") {
|
|
880
|
+
const C = u(b, I);
|
|
881
|
+
this.docTypeEntities = C.entities, I = C.i;
|
|
882
|
+
} else if (b.substr(I + 1, 2) === "![") {
|
|
883
|
+
const C = p(b, "]]>", I, "CDATA is not closed.") - 2, P = b.substring(I + 9, C);
|
|
884
|
+
T = this.saveTextToParentTag(T, x, O);
|
|
885
|
+
let j = this.parseTextData(P, x.tagname, O, !0, !1, !0, !0);
|
|
886
|
+
j == null && (j = ""), this.options.cdataPropName ? x.add(this.options.cdataPropName, [{ [this.options.textNodeName]: P }]) : x.add(this.options.textNodeName, j), I = C + 2;
|
|
887
|
+
} else {
|
|
888
|
+
let C = v(b, I, this.options.removeNSPrefix), P = C.tagName;
|
|
889
|
+
const j = C.rawTagName;
|
|
890
|
+
let F = C.tagExp, $ = C.attrExpPresent, X = C.closeIndex;
|
|
891
|
+
this.options.transformTagName && (P = this.options.transformTagName(P)), x && T && x.tagname !== "!xml" && (T = this.saveTextToParentTag(T, x, O, !1));
|
|
892
|
+
const B = x;
|
|
893
|
+
if (B && this.options.unpairedTags.indexOf(B.tagname) !== -1 && (x = this.tagsNodeStack.pop(), O = O.substring(0, O.lastIndexOf("."))), P !== E.tagname && (O += O ? "." + P : P), this.isItStopNode(this.options.stopNodes, O, P)) {
|
|
894
|
+
let R = "";
|
|
895
|
+
if (F.length > 0 && F.lastIndexOf("/") === F.length - 1) P[P.length - 1] === "/" ? (P = P.substr(0, P.length - 1), O = O.substr(0, O.length - 1), F = P) : F = F.substr(0, F.length - 1), I = C.closeIndex;
|
|
896
|
+
else if (this.options.unpairedTags.indexOf(P) !== -1) I = C.closeIndex;
|
|
897
|
+
else {
|
|
898
|
+
const U = this.readStopNodeData(b, j, X + 1);
|
|
899
|
+
if (!U) throw new Error(`Unexpected end of ${j}`);
|
|
900
|
+
I = U.i, R = U.tagContent;
|
|
901
|
+
}
|
|
902
|
+
const D = new o(P);
|
|
903
|
+
P !== F && $ && (D[":@"] = this.buildAttributesMap(F, O, P)), R && (R = this.parseTextData(R, P, O, !0, $, !0, !0)), O = O.substr(0, O.lastIndexOf(".")), D.add(this.options.textNodeName, R), this.addChild(x, D, O);
|
|
904
|
+
} else {
|
|
905
|
+
if (F.length > 0 && F.lastIndexOf("/") === F.length - 1) {
|
|
906
|
+
P[P.length - 1] === "/" ? (P = P.substr(0, P.length - 1), O = O.substr(0, O.length - 1), F = P) : F = F.substr(0, F.length - 1), this.options.transformTagName && (P = this.options.transformTagName(P));
|
|
907
|
+
const R = new o(P);
|
|
908
|
+
P !== F && $ && (R[":@"] = this.buildAttributesMap(F, O, P)), this.addChild(x, R, O), O = O.substr(0, O.lastIndexOf("."));
|
|
909
|
+
} else {
|
|
910
|
+
const R = new o(P);
|
|
911
|
+
this.tagsNodeStack.push(x), P !== F && $ && (R[":@"] = this.buildAttributesMap(F, O, P)), this.addChild(x, R, O), x = R;
|
|
912
|
+
}
|
|
913
|
+
T = "", I = X;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
else T += b[I];
|
|
917
|
+
return E.child;
|
|
918
|
+
};
|
|
919
|
+
function m(b, E, x) {
|
|
920
|
+
const T = this.options.updateTag(E.tagname, x, E[":@"]);
|
|
921
|
+
T === !1 || (typeof T == "string" && (E.tagname = T), b.addChild(E));
|
|
922
|
+
}
|
|
923
|
+
const d = function(b) {
|
|
924
|
+
if (this.options.processEntities) {
|
|
925
|
+
for (let E in this.docTypeEntities) {
|
|
926
|
+
const x = this.docTypeEntities[E];
|
|
927
|
+
b = b.replace(x.regx, x.val);
|
|
928
|
+
}
|
|
929
|
+
for (let E in this.lastEntities) {
|
|
930
|
+
const x = this.lastEntities[E];
|
|
931
|
+
b = b.replace(x.regex, x.val);
|
|
932
|
+
}
|
|
933
|
+
if (this.options.htmlEntities) for (let E in this.htmlEntities) {
|
|
934
|
+
const x = this.htmlEntities[E];
|
|
935
|
+
b = b.replace(x.regex, x.val);
|
|
936
|
+
}
|
|
937
|
+
b = b.replace(this.ampEntity.regex, this.ampEntity.val);
|
|
938
|
+
}
|
|
939
|
+
return b;
|
|
940
|
+
};
|
|
941
|
+
function w(b, E, x, T) {
|
|
942
|
+
return b && (T === void 0 && (T = Object.keys(E.child).length === 0), (b = this.parseTextData(b, E.tagname, x, !1, !!E[":@"] && Object.keys(E[":@"]).length !== 0, T)) !== void 0 && b !== "" && E.add(this.options.textNodeName, b), b = ""), b;
|
|
943
|
+
}
|
|
944
|
+
function y(b, E, x) {
|
|
945
|
+
const T = "*." + x;
|
|
946
|
+
for (const O in b) {
|
|
947
|
+
const I = b[O];
|
|
948
|
+
if (T === I || E === I) return !0;
|
|
949
|
+
}
|
|
950
|
+
return !1;
|
|
951
|
+
}
|
|
952
|
+
function p(b, E, x, T) {
|
|
953
|
+
const O = b.indexOf(E, x);
|
|
954
|
+
if (O === -1) throw new Error(T);
|
|
955
|
+
return O + E.length - 1;
|
|
956
|
+
}
|
|
957
|
+
function v(b, E, x) {
|
|
958
|
+
const T = function($, X) {
|
|
959
|
+
let B, R = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ">", D = "";
|
|
960
|
+
for (let U = X; U < $.length; U++) {
|
|
961
|
+
let K = $[U];
|
|
962
|
+
if (B) K === B && (B = "");
|
|
963
|
+
else if (K === '"' || K === "'") B = K;
|
|
964
|
+
else if (K === R[0]) {
|
|
965
|
+
if (!R[1]) return { data: D, index: U };
|
|
966
|
+
if ($[U + 1] === R[1]) return { data: D, index: U };
|
|
967
|
+
} else K === " " && (K = " ");
|
|
968
|
+
D += K;
|
|
969
|
+
}
|
|
970
|
+
}(b, E + 1, arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ">");
|
|
971
|
+
if (!T) return;
|
|
972
|
+
let O = T.data;
|
|
973
|
+
const I = T.index, C = O.search(/\s/);
|
|
974
|
+
let P = O, j = !0;
|
|
975
|
+
C !== -1 && (P = O.substring(0, C), O = O.substring(C + 1).trimStart());
|
|
976
|
+
const F = P;
|
|
977
|
+
if (x) {
|
|
978
|
+
const $ = P.indexOf(":");
|
|
979
|
+
$ !== -1 && (P = P.substr($ + 1), j = P !== T.data.substr($ + 1));
|
|
980
|
+
}
|
|
981
|
+
return { tagName: P, tagExp: O, closeIndex: I, attrExpPresent: j, rawTagName: F };
|
|
982
|
+
}
|
|
983
|
+
function A(b, E, x) {
|
|
984
|
+
const T = x;
|
|
985
|
+
let O = 1;
|
|
986
|
+
for (; x < b.length; x++) if (b[x] === "<") if (b[x + 1] === "/") {
|
|
987
|
+
const I = p(b, ">", x, `${E} is not closed`);
|
|
988
|
+
if (b.substring(x + 2, I).trim() === E && (O--, O === 0)) return { tagContent: b.substring(T, x), i: I };
|
|
989
|
+
x = I;
|
|
990
|
+
} else if (b[x + 1] === "?") x = p(b, "?>", x + 1, "StopNode is not closed.");
|
|
991
|
+
else if (b.substr(x + 1, 3) === "!--") x = p(b, "-->", x + 3, "StopNode is not closed.");
|
|
992
|
+
else if (b.substr(x + 1, 2) === "![") x = p(b, "]]>", x, "StopNode is not closed.") - 2;
|
|
993
|
+
else {
|
|
994
|
+
const I = v(b, x, ">");
|
|
995
|
+
I && ((I && I.tagName) === E && I.tagExp[I.tagExp.length - 1] !== "/" && O++, x = I.closeIndex);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
function N(b, E, x) {
|
|
999
|
+
if (E && typeof b == "string") {
|
|
1000
|
+
const T = b.trim();
|
|
1001
|
+
return T === "true" || T !== "false" && l(b, x);
|
|
1002
|
+
}
|
|
1003
|
+
return n.isExist(b) ? b : "";
|
|
1004
|
+
}
|
|
1005
|
+
r.exports = class {
|
|
1006
|
+
constructor(b) {
|
|
1007
|
+
this.options = b, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "¢" }, pound: { regex: /&(pound|#163);/g, val: "£" }, yen: { regex: /&(yen|#165);/g, val: "¥" }, euro: { regex: /&(euro|#8364);/g, val: "€" }, copyright: { regex: /&(copy|#169);/g, val: "©" }, reg: { regex: /&(reg|#174);/g, val: "®" }, inr: { regex: /&(inr|#8377);/g, val: "₹" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (E, x) => String.fromCharCode(Number.parseInt(x, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (E, x) => String.fromCharCode(Number.parseInt(x, 16)) } }, this.addExternalEntities = h, this.parseXml = g, this.parseTextData = a, this.resolveNameSpace = s, this.buildAttributesMap = c, this.isItStopNode = y, this.replaceEntitiesValue = d, this.readStopNodeData = A, this.saveTextToParentTag = w, this.addChild = m, this.ignoreAttributesFn = i(this.options.ignoreAttributes);
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
}, 338: (r, e, t) => {
|
|
1011
|
+
const { buildOptions: n } = t(63), o = t(299), { prettify: u } = t(728), l = t(31);
|
|
1012
|
+
r.exports = class {
|
|
1013
|
+
constructor(i) {
|
|
1014
|
+
this.externalEntities = {}, this.options = n(i);
|
|
1015
|
+
}
|
|
1016
|
+
parse(i, h) {
|
|
1017
|
+
if (typeof i != "string") {
|
|
1018
|
+
if (!i.toString) throw new Error("XML data is accepted in String or Bytes[] form.");
|
|
1019
|
+
i = i.toString();
|
|
1020
|
+
}
|
|
1021
|
+
if (h) {
|
|
1022
|
+
h === !0 && (h = {});
|
|
1023
|
+
const f = l.validate(i, h);
|
|
1024
|
+
if (f !== !0) throw Error(`${f.err.msg}:${f.err.line}:${f.err.col}`);
|
|
1025
|
+
}
|
|
1026
|
+
const a = new o(this.options);
|
|
1027
|
+
a.addExternalEntities(this.externalEntities);
|
|
1028
|
+
const s = a.parseXml(i);
|
|
1029
|
+
return this.options.preserveOrder || s === void 0 ? s : u(s, this.options);
|
|
1030
|
+
}
|
|
1031
|
+
addEntity(i, h) {
|
|
1032
|
+
if (h.indexOf("&") !== -1) throw new Error("Entity value can't have '&'");
|
|
1033
|
+
if (i.indexOf("&") !== -1 || i.indexOf(";") !== -1) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");
|
|
1034
|
+
if (h === "&") throw new Error("An entity with value '&' is not permitted");
|
|
1035
|
+
this.externalEntities[i] = h;
|
|
1036
|
+
}
|
|
1037
|
+
};
|
|
1038
|
+
}, 728: (r, e) => {
|
|
1039
|
+
function t(l, i, h) {
|
|
1040
|
+
let a;
|
|
1041
|
+
const s = {};
|
|
1042
|
+
for (let f = 0; f < l.length; f++) {
|
|
1043
|
+
const c = l[f], g = n(c);
|
|
1044
|
+
let m = "";
|
|
1045
|
+
if (m = h === void 0 ? g : h + "." + g, g === i.textNodeName) a === void 0 ? a = c[g] : a += "" + c[g];
|
|
1046
|
+
else {
|
|
1047
|
+
if (g === void 0) continue;
|
|
1048
|
+
if (c[g]) {
|
|
1049
|
+
let d = t(c[g], i, m);
|
|
1050
|
+
const w = u(d, i);
|
|
1051
|
+
c[":@"] ? o(d, c[":@"], m, i) : Object.keys(d).length !== 1 || d[i.textNodeName] === void 0 || i.alwaysCreateTextNode ? Object.keys(d).length === 0 && (i.alwaysCreateTextNode ? d[i.textNodeName] = "" : d = "") : d = d[i.textNodeName], s[g] !== void 0 && s.hasOwnProperty(g) ? (Array.isArray(s[g]) || (s[g] = [s[g]]), s[g].push(d)) : i.isArray(g, m, w) ? s[g] = [d] : s[g] = d;
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
return typeof a == "string" ? a.length > 0 && (s[i.textNodeName] = a) : a !== void 0 && (s[i.textNodeName] = a), s;
|
|
1056
|
+
}
|
|
1057
|
+
function n(l) {
|
|
1058
|
+
const i = Object.keys(l);
|
|
1059
|
+
for (let h = 0; h < i.length; h++) {
|
|
1060
|
+
const a = i[h];
|
|
1061
|
+
if (a !== ":@") return a;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
function o(l, i, h, a) {
|
|
1065
|
+
if (i) {
|
|
1066
|
+
const s = Object.keys(i), f = s.length;
|
|
1067
|
+
for (let c = 0; c < f; c++) {
|
|
1068
|
+
const g = s[c];
|
|
1069
|
+
a.isArray(g, h + "." + g, !0, !0) ? l[g] = [i[g]] : l[g] = i[g];
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
function u(l, i) {
|
|
1074
|
+
const { textNodeName: h } = i, a = Object.keys(l).length;
|
|
1075
|
+
return a === 0 || !(a !== 1 || !l[h] && typeof l[h] != "boolean" && l[h] !== 0);
|
|
1076
|
+
}
|
|
1077
|
+
e.prettify = function(l, i) {
|
|
1078
|
+
return t(l, i);
|
|
1079
|
+
};
|
|
1080
|
+
}, 365: (r) => {
|
|
1081
|
+
r.exports = class {
|
|
1082
|
+
constructor(e) {
|
|
1083
|
+
this.tagname = e, this.child = [], this[":@"] = {};
|
|
1084
|
+
}
|
|
1085
|
+
add(e, t) {
|
|
1086
|
+
e === "__proto__" && (e = "#__proto__"), this.child.push({ [e]: t });
|
|
1087
|
+
}
|
|
1088
|
+
addChild(e) {
|
|
1089
|
+
e.tagname === "__proto__" && (e.tagname = "#__proto__"), e[":@"] && Object.keys(e[":@"]).length > 0 ? this.child.push({ [e.tagname]: e.child, ":@": e[":@"] }) : this.child.push({ [e.tagname]: e.child });
|
|
1090
|
+
}
|
|
1091
|
+
};
|
|
1092
|
+
}, 135: (r) => {
|
|
1093
|
+
function e(t) {
|
|
1094
|
+
return !!t.constructor && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t);
|
|
1095
|
+
}
|
|
1096
|
+
r.exports = function(t) {
|
|
1097
|
+
return t != null && (e(t) || function(n) {
|
|
1098
|
+
return typeof n.readFloatLE == "function" && typeof n.slice == "function" && e(n.slice(0, 0));
|
|
1099
|
+
}(t) || !!t._isBuffer);
|
|
1100
|
+
};
|
|
1101
|
+
}, 542: (r, e, t) => {
|
|
1102
|
+
(function() {
|
|
1103
|
+
var n = t(298), o = t(526).utf8, u = t(135), l = t(526).bin, i = function(h, a) {
|
|
1104
|
+
h.constructor == String ? h = a && a.encoding === "binary" ? l.stringToBytes(h) : o.stringToBytes(h) : u(h) ? h = Array.prototype.slice.call(h, 0) : Array.isArray(h) || h.constructor === Uint8Array || (h = h.toString());
|
|
1105
|
+
for (var s = n.bytesToWords(h), f = 8 * h.length, c = 1732584193, g = -271733879, m = -1732584194, d = 271733878, w = 0; w < s.length; w++) s[w] = 16711935 & (s[w] << 8 | s[w] >>> 24) | 4278255360 & (s[w] << 24 | s[w] >>> 8);
|
|
1106
|
+
s[f >>> 5] |= 128 << f % 32, s[14 + (f + 64 >>> 9 << 4)] = f;
|
|
1107
|
+
var y = i._ff, p = i._gg, v = i._hh, A = i._ii;
|
|
1108
|
+
for (w = 0; w < s.length; w += 16) {
|
|
1109
|
+
var N = c, b = g, E = m, x = d;
|
|
1110
|
+
c = y(c, g, m, d, s[w + 0], 7, -680876936), d = y(d, c, g, m, s[w + 1], 12, -389564586), m = y(m, d, c, g, s[w + 2], 17, 606105819), g = y(g, m, d, c, s[w + 3], 22, -1044525330), c = y(c, g, m, d, s[w + 4], 7, -176418897), d = y(d, c, g, m, s[w + 5], 12, 1200080426), m = y(m, d, c, g, s[w + 6], 17, -1473231341), g = y(g, m, d, c, s[w + 7], 22, -45705983), c = y(c, g, m, d, s[w + 8], 7, 1770035416), d = y(d, c, g, m, s[w + 9], 12, -1958414417), m = y(m, d, c, g, s[w + 10], 17, -42063), g = y(g, m, d, c, s[w + 11], 22, -1990404162), c = y(c, g, m, d, s[w + 12], 7, 1804603682), d = y(d, c, g, m, s[w + 13], 12, -40341101), m = y(m, d, c, g, s[w + 14], 17, -1502002290), c = p(c, g = y(g, m, d, c, s[w + 15], 22, 1236535329), m, d, s[w + 1], 5, -165796510), d = p(d, c, g, m, s[w + 6], 9, -1069501632), m = p(m, d, c, g, s[w + 11], 14, 643717713), g = p(g, m, d, c, s[w + 0], 20, -373897302), c = p(c, g, m, d, s[w + 5], 5, -701558691), d = p(d, c, g, m, s[w + 10], 9, 38016083), m = p(m, d, c, g, s[w + 15], 14, -660478335), g = p(g, m, d, c, s[w + 4], 20, -405537848), c = p(c, g, m, d, s[w + 9], 5, 568446438), d = p(d, c, g, m, s[w + 14], 9, -1019803690), m = p(m, d, c, g, s[w + 3], 14, -187363961), g = p(g, m, d, c, s[w + 8], 20, 1163531501), c = p(c, g, m, d, s[w + 13], 5, -1444681467), d = p(d, c, g, m, s[w + 2], 9, -51403784), m = p(m, d, c, g, s[w + 7], 14, 1735328473), c = v(c, g = p(g, m, d, c, s[w + 12], 20, -1926607734), m, d, s[w + 5], 4, -378558), d = v(d, c, g, m, s[w + 8], 11, -2022574463), m = v(m, d, c, g, s[w + 11], 16, 1839030562), g = v(g, m, d, c, s[w + 14], 23, -35309556), c = v(c, g, m, d, s[w + 1], 4, -1530992060), d = v(d, c, g, m, s[w + 4], 11, 1272893353), m = v(m, d, c, g, s[w + 7], 16, -155497632), g = v(g, m, d, c, s[w + 10], 23, -1094730640), c = v(c, g, m, d, s[w + 13], 4, 681279174), d = v(d, c, g, m, s[w + 0], 11, -358537222), m = v(m, d, c, g, s[w + 3], 16, -722521979), g = v(g, m, d, c, s[w + 6], 23, 76029189), c = v(c, g, m, d, s[w + 9], 4, -640364487), d = v(d, c, g, m, s[w + 12], 11, -421815835), m = v(m, d, c, g, s[w + 15], 16, 530742520), c = A(c, g = v(g, m, d, c, s[w + 2], 23, -995338651), m, d, s[w + 0], 6, -198630844), d = A(d, c, g, m, s[w + 7], 10, 1126891415), m = A(m, d, c, g, s[w + 14], 15, -1416354905), g = A(g, m, d, c, s[w + 5], 21, -57434055), c = A(c, g, m, d, s[w + 12], 6, 1700485571), d = A(d, c, g, m, s[w + 3], 10, -1894986606), m = A(m, d, c, g, s[w + 10], 15, -1051523), g = A(g, m, d, c, s[w + 1], 21, -2054922799), c = A(c, g, m, d, s[w + 8], 6, 1873313359), d = A(d, c, g, m, s[w + 15], 10, -30611744), m = A(m, d, c, g, s[w + 6], 15, -1560198380), g = A(g, m, d, c, s[w + 13], 21, 1309151649), c = A(c, g, m, d, s[w + 4], 6, -145523070), d = A(d, c, g, m, s[w + 11], 10, -1120210379), m = A(m, d, c, g, s[w + 2], 15, 718787259), g = A(g, m, d, c, s[w + 9], 21, -343485551), c = c + N >>> 0, g = g + b >>> 0, m = m + E >>> 0, d = d + x >>> 0;
|
|
1111
|
+
}
|
|
1112
|
+
return n.endian([c, g, m, d]);
|
|
1113
|
+
};
|
|
1114
|
+
i._ff = function(h, a, s, f, c, g, m) {
|
|
1115
|
+
var d = h + (a & s | ~a & f) + (c >>> 0) + m;
|
|
1116
|
+
return (d << g | d >>> 32 - g) + a;
|
|
1117
|
+
}, i._gg = function(h, a, s, f, c, g, m) {
|
|
1118
|
+
var d = h + (a & f | s & ~f) + (c >>> 0) + m;
|
|
1119
|
+
return (d << g | d >>> 32 - g) + a;
|
|
1120
|
+
}, i._hh = function(h, a, s, f, c, g, m) {
|
|
1121
|
+
var d = h + (a ^ s ^ f) + (c >>> 0) + m;
|
|
1122
|
+
return (d << g | d >>> 32 - g) + a;
|
|
1123
|
+
}, i._ii = function(h, a, s, f, c, g, m) {
|
|
1124
|
+
var d = h + (s ^ (a | ~f)) + (c >>> 0) + m;
|
|
1125
|
+
return (d << g | d >>> 32 - g) + a;
|
|
1126
|
+
}, i._blocksize = 16, i._digestsize = 16, r.exports = function(h, a) {
|
|
1127
|
+
if (h == null) throw new Error("Illegal argument " + h);
|
|
1128
|
+
var s = n.wordsToBytes(i(h, a));
|
|
1129
|
+
return a && a.asBytes ? s : a && a.asString ? l.bytesToString(s) : n.bytesToHex(s);
|
|
1130
|
+
};
|
|
1131
|
+
})();
|
|
1132
|
+
}, 285: (r, e, t) => {
|
|
1133
|
+
var n = t(2);
|
|
1134
|
+
r.exports = function(y) {
|
|
1135
|
+
return y ? (y.substr(0, 2) === "{}" && (y = "\\{\\}" + y.substr(2)), w(function(p) {
|
|
1136
|
+
return p.split("\\\\").join(o).split("\\{").join(u).split("\\}").join(l).split("\\,").join(i).split("\\.").join(h);
|
|
1137
|
+
}(y), !0).map(s)) : [];
|
|
1138
|
+
};
|
|
1139
|
+
var o = "\0SLASH" + Math.random() + "\0", u = "\0OPEN" + Math.random() + "\0", l = "\0CLOSE" + Math.random() + "\0", i = "\0COMMA" + Math.random() + "\0", h = "\0PERIOD" + Math.random() + "\0";
|
|
1140
|
+
function a(y) {
|
|
1141
|
+
return parseInt(y, 10) == y ? parseInt(y, 10) : y.charCodeAt(0);
|
|
1142
|
+
}
|
|
1143
|
+
function s(y) {
|
|
1144
|
+
return y.split(o).join("\\").split(u).join("{").split(l).join("}").split(i).join(",").split(h).join(".");
|
|
1145
|
+
}
|
|
1146
|
+
function f(y) {
|
|
1147
|
+
if (!y) return [""];
|
|
1148
|
+
var p = [], v = n("{", "}", y);
|
|
1149
|
+
if (!v) return y.split(",");
|
|
1150
|
+
var A = v.pre, N = v.body, b = v.post, E = A.split(",");
|
|
1151
|
+
E[E.length - 1] += "{" + N + "}";
|
|
1152
|
+
var x = f(b);
|
|
1153
|
+
return b.length && (E[E.length - 1] += x.shift(), E.push.apply(E, x)), p.push.apply(p, E), p;
|
|
1154
|
+
}
|
|
1155
|
+
function c(y) {
|
|
1156
|
+
return "{" + y + "}";
|
|
1157
|
+
}
|
|
1158
|
+
function g(y) {
|
|
1159
|
+
return /^-?0\d/.test(y);
|
|
1160
|
+
}
|
|
1161
|
+
function m(y, p) {
|
|
1162
|
+
return y <= p;
|
|
1163
|
+
}
|
|
1164
|
+
function d(y, p) {
|
|
1165
|
+
return y >= p;
|
|
1166
|
+
}
|
|
1167
|
+
function w(y, p) {
|
|
1168
|
+
var v = [], A = n("{", "}", y);
|
|
1169
|
+
if (!A) return [y];
|
|
1170
|
+
var N = A.pre, b = A.post.length ? w(A.post, !1) : [""];
|
|
1171
|
+
if (/\$$/.test(A.pre)) for (var E = 0; E < b.length; E++) {
|
|
1172
|
+
var x = N + "{" + A.body + "}" + b[E];
|
|
1173
|
+
v.push(x);
|
|
1174
|
+
}
|
|
1175
|
+
else {
|
|
1176
|
+
var T, O, I = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(A.body), C = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(A.body), P = I || C, j = A.body.indexOf(",") >= 0;
|
|
1177
|
+
if (!P && !j) return A.post.match(/,.*\}/) ? w(y = A.pre + "{" + A.body + l + A.post) : [y];
|
|
1178
|
+
if (P) T = A.body.split(/\.\./);
|
|
1179
|
+
else if ((T = f(A.body)).length === 1 && (T = w(T[0], !1).map(c)).length === 1) return b.map(function(Gr) {
|
|
1180
|
+
return A.pre + T[0] + Gr;
|
|
1181
|
+
});
|
|
1182
|
+
if (P) {
|
|
1183
|
+
var F = a(T[0]), $ = a(T[1]), X = Math.max(T[0].length, T[1].length), B = T.length == 3 ? Math.abs(a(T[2])) : 1, R = m;
|
|
1184
|
+
$ < F && (B *= -1, R = d);
|
|
1185
|
+
var D = T.some(g);
|
|
1186
|
+
O = [];
|
|
1187
|
+
for (var U = F; R(U, $); U += B) {
|
|
1188
|
+
var K;
|
|
1189
|
+
if (C) (K = String.fromCharCode(U)) === "\\" && (K = "");
|
|
1190
|
+
else if (K = String(U), D) {
|
|
1191
|
+
var kt = X - K.length;
|
|
1192
|
+
if (kt > 0) {
|
|
1193
|
+
var Ut = new Array(kt + 1).join("0");
|
|
1194
|
+
K = U < 0 ? "-" + Ut + K.slice(1) : Ut + K;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
O.push(K);
|
|
1198
|
+
}
|
|
1199
|
+
} else {
|
|
1200
|
+
O = [];
|
|
1201
|
+
for (var ve = 0; ve < T.length; ve++) O.push.apply(O, w(T[ve], !1));
|
|
1202
|
+
}
|
|
1203
|
+
for (ve = 0; ve < O.length; ve++) for (E = 0; E < b.length; E++) x = N + O[ve] + b[E], (!p || P || x) && v.push(x);
|
|
1204
|
+
}
|
|
1205
|
+
return v;
|
|
1206
|
+
}
|
|
1207
|
+
}, 829: (r) => {
|
|
1208
|
+
function e(a) {
|
|
1209
|
+
return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(s) {
|
|
1210
|
+
return typeof s;
|
|
1211
|
+
} : function(s) {
|
|
1212
|
+
return s && typeof Symbol == "function" && s.constructor === Symbol && s !== Symbol.prototype ? "symbol" : typeof s;
|
|
1213
|
+
}, e(a);
|
|
1214
|
+
}
|
|
1215
|
+
function t(a) {
|
|
1216
|
+
var s = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
1217
|
+
return t = function(f) {
|
|
1218
|
+
if (f === null || (c = f, Function.toString.call(c).indexOf("[native code]") === -1)) return f;
|
|
1219
|
+
var c;
|
|
1220
|
+
if (typeof f != "function") throw new TypeError("Super expression must either be null or a function");
|
|
1221
|
+
if (s !== void 0) {
|
|
1222
|
+
if (s.has(f)) return s.get(f);
|
|
1223
|
+
s.set(f, g);
|
|
1224
|
+
}
|
|
1225
|
+
function g() {
|
|
1226
|
+
return n(f, arguments, u(this).constructor);
|
|
1227
|
+
}
|
|
1228
|
+
return g.prototype = Object.create(f.prototype, { constructor: { value: g, enumerable: !1, writable: !0, configurable: !0 } }), o(g, f);
|
|
1229
|
+
}, t(a);
|
|
1230
|
+
}
|
|
1231
|
+
function n(a, s, f) {
|
|
1232
|
+
return n = function() {
|
|
1233
|
+
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1234
|
+
if (typeof Proxy == "function") return !0;
|
|
1235
|
+
try {
|
|
1236
|
+
return Date.prototype.toString.call(Reflect.construct(Date, [], function() {
|
|
1237
|
+
})), !0;
|
|
1238
|
+
} catch {
|
|
1239
|
+
return !1;
|
|
1240
|
+
}
|
|
1241
|
+
}() ? Reflect.construct : function(c, g, m) {
|
|
1242
|
+
var d = [null];
|
|
1243
|
+
d.push.apply(d, g);
|
|
1244
|
+
var w = new (Function.bind.apply(c, d))();
|
|
1245
|
+
return m && o(w, m.prototype), w;
|
|
1246
|
+
}, n.apply(null, arguments);
|
|
1247
|
+
}
|
|
1248
|
+
function o(a, s) {
|
|
1249
|
+
return o = Object.setPrototypeOf || function(f, c) {
|
|
1250
|
+
return f.__proto__ = c, f;
|
|
1251
|
+
}, o(a, s);
|
|
1252
|
+
}
|
|
1253
|
+
function u(a) {
|
|
1254
|
+
return u = Object.setPrototypeOf ? Object.getPrototypeOf : function(s) {
|
|
1255
|
+
return s.__proto__ || Object.getPrototypeOf(s);
|
|
1256
|
+
}, u(a);
|
|
1257
|
+
}
|
|
1258
|
+
var l = function(a) {
|
|
1259
|
+
function s(f) {
|
|
1260
|
+
var c;
|
|
1261
|
+
return function(g, m) {
|
|
1262
|
+
if (!(g instanceof m)) throw new TypeError("Cannot call a class as a function");
|
|
1263
|
+
}(this, s), (c = function(g, m) {
|
|
1264
|
+
return !m || e(m) !== "object" && typeof m != "function" ? function(d) {
|
|
1265
|
+
if (d === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1266
|
+
return d;
|
|
1267
|
+
}(g) : m;
|
|
1268
|
+
}(this, u(s).call(this, f))).name = "ObjectPrototypeMutationError", c;
|
|
1269
|
+
}
|
|
1270
|
+
return function(f, c) {
|
|
1271
|
+
if (typeof c != "function" && c !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1272
|
+
f.prototype = Object.create(c && c.prototype, { constructor: { value: f, writable: !0, configurable: !0 } }), c && o(f, c);
|
|
1273
|
+
}(s, a), s;
|
|
1274
|
+
}(t(Error));
|
|
1275
|
+
function i(a, s) {
|
|
1276
|
+
for (var f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
|
|
1277
|
+
}, c = s.split("."), g = c.length, m = function(y) {
|
|
1278
|
+
var p = c[y];
|
|
1279
|
+
if (!a) return { v: void 0 };
|
|
1280
|
+
if (p === "+") {
|
|
1281
|
+
if (Array.isArray(a)) return { v: a.map(function(A, N) {
|
|
1282
|
+
var b = c.slice(y + 1);
|
|
1283
|
+
return b.length > 0 ? i(A, b.join("."), f) : f(a, N, c, y);
|
|
1284
|
+
}) };
|
|
1285
|
+
var v = c.slice(0, y).join(".");
|
|
1286
|
+
throw new Error("Object at wildcard (".concat(v, ") is not an array"));
|
|
1287
|
+
}
|
|
1288
|
+
a = f(a, p, c, y);
|
|
1289
|
+
}, d = 0; d < g; d++) {
|
|
1290
|
+
var w = m(d);
|
|
1291
|
+
if (e(w) === "object") return w.v;
|
|
1292
|
+
}
|
|
1293
|
+
return a;
|
|
1294
|
+
}
|
|
1295
|
+
function h(a, s) {
|
|
1296
|
+
return a.length === s + 1;
|
|
1297
|
+
}
|
|
1298
|
+
r.exports = { set: function(a, s, f) {
|
|
1299
|
+
if (e(a) != "object" || a === null || s === void 0) return a;
|
|
1300
|
+
if (typeof s == "number") return a[s] = f, a[s];
|
|
1301
|
+
try {
|
|
1302
|
+
return i(a, s, function(c, g, m, d) {
|
|
1303
|
+
if (c === Reflect.getPrototypeOf({})) throw new l("Attempting to mutate Object.prototype");
|
|
1304
|
+
if (!c[g]) {
|
|
1305
|
+
var w = Number.isInteger(Number(m[d + 1])), y = m[d + 1] === "+";
|
|
1306
|
+
c[g] = w || y ? [] : {};
|
|
1307
|
+
}
|
|
1308
|
+
return h(m, d) && (c[g] = f), c[g];
|
|
1309
|
+
});
|
|
1310
|
+
} catch (c) {
|
|
1311
|
+
if (c instanceof l) throw c;
|
|
1312
|
+
return a;
|
|
1313
|
+
}
|
|
1314
|
+
}, get: function(a, s) {
|
|
1315
|
+
if (e(a) != "object" || a === null || s === void 0) return a;
|
|
1316
|
+
if (typeof s == "number") return a[s];
|
|
1317
|
+
try {
|
|
1318
|
+
return i(a, s, function(f, c) {
|
|
1319
|
+
return f[c];
|
|
1320
|
+
});
|
|
1321
|
+
} catch {
|
|
1322
|
+
return a;
|
|
1323
|
+
}
|
|
1324
|
+
}, has: function(a, s) {
|
|
1325
|
+
var f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1326
|
+
if (e(a) != "object" || a === null || s === void 0) return !1;
|
|
1327
|
+
if (typeof s == "number") return s in a;
|
|
1328
|
+
try {
|
|
1329
|
+
var c = !1;
|
|
1330
|
+
return i(a, s, function(g, m, d, w) {
|
|
1331
|
+
if (!h(d, w)) return g && g[m];
|
|
1332
|
+
c = f.own ? g.hasOwnProperty(m) : m in g;
|
|
1333
|
+
}), c;
|
|
1334
|
+
} catch {
|
|
1335
|
+
return !1;
|
|
1336
|
+
}
|
|
1337
|
+
}, hasOwn: function(a, s, f) {
|
|
1338
|
+
return this.has(a, s, f || { own: !0 });
|
|
1339
|
+
}, isIn: function(a, s, f) {
|
|
1340
|
+
var c = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
1341
|
+
if (e(a) != "object" || a === null || s === void 0) return !1;
|
|
1342
|
+
try {
|
|
1343
|
+
var g = !1, m = !1;
|
|
1344
|
+
return i(a, s, function(d, w, y, p) {
|
|
1345
|
+
return g = g || d === f || !!d && d[w] === f, m = h(y, p) && e(d) === "object" && w in d, d && d[w];
|
|
1346
|
+
}), c.validPath ? g && m : g;
|
|
1347
|
+
} catch {
|
|
1348
|
+
return !1;
|
|
1349
|
+
}
|
|
1350
|
+
}, ObjectPrototypeMutationError: l };
|
|
1351
|
+
}, 47: (r, e, t) => {
|
|
1352
|
+
var n = t(410), o = function(a) {
|
|
1353
|
+
return typeof a == "string";
|
|
1354
|
+
};
|
|
1355
|
+
function u(a, s) {
|
|
1356
|
+
for (var f = [], c = 0; c < a.length; c++) {
|
|
1357
|
+
var g = a[c];
|
|
1358
|
+
g && g !== "." && (g === ".." ? f.length && f[f.length - 1] !== ".." ? f.pop() : s && f.push("..") : f.push(g));
|
|
1359
|
+
}
|
|
1360
|
+
return f;
|
|
1361
|
+
}
|
|
1362
|
+
var l = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/, i = {};
|
|
1363
|
+
function h(a) {
|
|
1364
|
+
return l.exec(a).slice(1);
|
|
1365
|
+
}
|
|
1366
|
+
i.resolve = function() {
|
|
1367
|
+
for (var a = "", s = !1, f = arguments.length - 1; f >= -1 && !s; f--) {
|
|
1368
|
+
var c = f >= 0 ? arguments[f] : we.cwd();
|
|
1369
|
+
if (!o(c)) throw new TypeError("Arguments to path.resolve must be strings");
|
|
1370
|
+
c && (a = c + "/" + a, s = c.charAt(0) === "/");
|
|
1371
|
+
}
|
|
1372
|
+
return (s ? "/" : "") + (a = u(a.split("/"), !s).join("/")) || ".";
|
|
1373
|
+
}, i.normalize = function(a) {
|
|
1374
|
+
var s = i.isAbsolute(a), f = a.substr(-1) === "/";
|
|
1375
|
+
return (a = u(a.split("/"), !s).join("/")) || s || (a = "."), a && f && (a += "/"), (s ? "/" : "") + a;
|
|
1376
|
+
}, i.isAbsolute = function(a) {
|
|
1377
|
+
return a.charAt(0) === "/";
|
|
1378
|
+
}, i.join = function() {
|
|
1379
|
+
for (var a = "", s = 0; s < arguments.length; s++) {
|
|
1380
|
+
var f = arguments[s];
|
|
1381
|
+
if (!o(f)) throw new TypeError("Arguments to path.join must be strings");
|
|
1382
|
+
f && (a += a ? "/" + f : f);
|
|
1383
|
+
}
|
|
1384
|
+
return i.normalize(a);
|
|
1385
|
+
}, i.relative = function(a, s) {
|
|
1386
|
+
function f(p) {
|
|
1387
|
+
for (var v = 0; v < p.length && p[v] === ""; v++) ;
|
|
1388
|
+
for (var A = p.length - 1; A >= 0 && p[A] === ""; A--) ;
|
|
1389
|
+
return v > A ? [] : p.slice(v, A + 1);
|
|
1390
|
+
}
|
|
1391
|
+
a = i.resolve(a).substr(1), s = i.resolve(s).substr(1);
|
|
1392
|
+
for (var c = f(a.split("/")), g = f(s.split("/")), m = Math.min(c.length, g.length), d = m, w = 0; w < m; w++) if (c[w] !== g[w]) {
|
|
1393
|
+
d = w;
|
|
1394
|
+
break;
|
|
1395
|
+
}
|
|
1396
|
+
var y = [];
|
|
1397
|
+
for (w = d; w < c.length; w++) y.push("..");
|
|
1398
|
+
return (y = y.concat(g.slice(d))).join("/");
|
|
1399
|
+
}, i._makeLong = function(a) {
|
|
1400
|
+
return a;
|
|
1401
|
+
}, i.dirname = function(a) {
|
|
1402
|
+
var s = h(a), f = s[0], c = s[1];
|
|
1403
|
+
return f || c ? (c && (c = c.substr(0, c.length - 1)), f + c) : ".";
|
|
1404
|
+
}, i.basename = function(a, s) {
|
|
1405
|
+
var f = h(a)[2];
|
|
1406
|
+
return s && f.substr(-1 * s.length) === s && (f = f.substr(0, f.length - s.length)), f;
|
|
1407
|
+
}, i.extname = function(a) {
|
|
1408
|
+
return h(a)[3];
|
|
1409
|
+
}, i.format = function(a) {
|
|
1410
|
+
if (!n.isObject(a)) throw new TypeError("Parameter 'pathObject' must be an object, not " + typeof a);
|
|
1411
|
+
var s = a.root || "";
|
|
1412
|
+
if (!o(s)) throw new TypeError("'pathObject.root' must be a string or undefined, not " + typeof a.root);
|
|
1413
|
+
return (a.dir ? a.dir + i.sep : "") + (a.base || "");
|
|
1414
|
+
}, i.parse = function(a) {
|
|
1415
|
+
if (!o(a)) throw new TypeError("Parameter 'pathString' must be a string, not " + typeof a);
|
|
1416
|
+
var s = h(a);
|
|
1417
|
+
if (!s || s.length !== 4) throw new TypeError("Invalid path '" + a + "'");
|
|
1418
|
+
return s[1] = s[1] || "", s[2] = s[2] || "", s[3] = s[3] || "", { root: s[0], dir: s[0] + s[1].slice(0, s[1].length - 1), base: s[2], ext: s[3], name: s[2].slice(0, s[2].length - s[3].length) };
|
|
1419
|
+
}, i.sep = "/", i.delimiter = ":", r.exports = i;
|
|
1420
|
+
}, 647: (r, e) => {
|
|
1421
|
+
var t = Object.prototype.hasOwnProperty;
|
|
1422
|
+
function n(u) {
|
|
1423
|
+
try {
|
|
1424
|
+
return decodeURIComponent(u.replace(/\+/g, " "));
|
|
1425
|
+
} catch {
|
|
1426
|
+
return null;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
function o(u) {
|
|
1430
|
+
try {
|
|
1431
|
+
return encodeURIComponent(u);
|
|
1432
|
+
} catch {
|
|
1433
|
+
return null;
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
e.stringify = function(u, l) {
|
|
1437
|
+
l = l || "";
|
|
1438
|
+
var i, h, a = [];
|
|
1439
|
+
for (h in typeof l != "string" && (l = "?"), u) if (t.call(u, h)) {
|
|
1440
|
+
if ((i = u[h]) || i != null && !isNaN(i) || (i = ""), h = o(h), i = o(i), h === null || i === null) continue;
|
|
1441
|
+
a.push(h + "=" + i);
|
|
1442
|
+
}
|
|
1443
|
+
return a.length ? l + a.join("&") : "";
|
|
1444
|
+
}, e.parse = function(u) {
|
|
1445
|
+
for (var l, i = /([^=?#&]+)=?([^&]*)/g, h = {}; l = i.exec(u); ) {
|
|
1446
|
+
var a = n(l[1]), s = n(l[2]);
|
|
1447
|
+
a === null || s === null || a in h || (h[a] = s);
|
|
1448
|
+
}
|
|
1449
|
+
return h;
|
|
1450
|
+
};
|
|
1451
|
+
}, 670: (r) => {
|
|
1452
|
+
r.exports = function(e, t) {
|
|
1453
|
+
if (t = t.split(":")[0], !(e = +e)) return !1;
|
|
1454
|
+
switch (t) {
|
|
1455
|
+
case "http":
|
|
1456
|
+
case "ws":
|
|
1457
|
+
return e !== 80;
|
|
1458
|
+
case "https":
|
|
1459
|
+
case "wss":
|
|
1460
|
+
return e !== 443;
|
|
1461
|
+
case "ftp":
|
|
1462
|
+
return e !== 21;
|
|
1463
|
+
case "gopher":
|
|
1464
|
+
return e !== 70;
|
|
1465
|
+
case "file":
|
|
1466
|
+
return !1;
|
|
1467
|
+
}
|
|
1468
|
+
return e !== 0;
|
|
1469
|
+
};
|
|
1470
|
+
}, 494: (r) => {
|
|
1471
|
+
const e = /^[-+]?0x[a-fA-F0-9]+$/, t = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;
|
|
1472
|
+
!Number.parseInt && window.parseInt && (Number.parseInt = window.parseInt), !Number.parseFloat && window.parseFloat && (Number.parseFloat = window.parseFloat);
|
|
1473
|
+
const n = { hex: !0, leadingZeros: !0, decimalPoint: ".", eNotation: !0 };
|
|
1474
|
+
r.exports = function(o) {
|
|
1475
|
+
let u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1476
|
+
if (u = Object.assign({}, n, u), !o || typeof o != "string") return o;
|
|
1477
|
+
let l = o.trim();
|
|
1478
|
+
if (u.skipLike !== void 0 && u.skipLike.test(l)) return o;
|
|
1479
|
+
if (u.hex && e.test(l)) return Number.parseInt(l, 16);
|
|
1480
|
+
{
|
|
1481
|
+
const h = t.exec(l);
|
|
1482
|
+
if (h) {
|
|
1483
|
+
const a = h[1], s = h[2];
|
|
1484
|
+
let f = ((i = h[3]) && i.indexOf(".") !== -1 && ((i = i.replace(/0+$/, "")) === "." ? i = "0" : i[0] === "." ? i = "0" + i : i[i.length - 1] === "." && (i = i.substr(0, i.length - 1))), i);
|
|
1485
|
+
const c = h[4] || h[6];
|
|
1486
|
+
if (!u.leadingZeros && s.length > 0 && a && l[2] !== "." || !u.leadingZeros && s.length > 0 && !a && l[1] !== ".") return o;
|
|
1487
|
+
{
|
|
1488
|
+
const g = Number(l), m = "" + g;
|
|
1489
|
+
return m.search(/[eE]/) !== -1 || c ? u.eNotation ? g : o : l.indexOf(".") !== -1 ? m === "0" && f === "" || m === f || a && m === "-" + f ? g : o : s ? f === m || a + f === m ? g : o : l === m || l === a + m ? g : o;
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
return o;
|
|
1493
|
+
}
|
|
1494
|
+
var i;
|
|
1495
|
+
};
|
|
1496
|
+
}, 737: (r, e, t) => {
|
|
1497
|
+
var n = t(670), o = t(647), u = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/, l = /[\n\r\t]/g, i = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//, h = /:\d+$/, a = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i, s = /^[a-zA-Z]:/;
|
|
1498
|
+
function f(p) {
|
|
1499
|
+
return (p || "").toString().replace(u, "");
|
|
1500
|
+
}
|
|
1501
|
+
var c = [["#", "hash"], ["?", "query"], function(p, v) {
|
|
1502
|
+
return d(v.protocol) ? p.replace(/\\/g, "/") : p;
|
|
1503
|
+
}, ["/", "pathname"], ["@", "auth", 1], [NaN, "host", void 0, 1, 1], [/:(\d*)$/, "port", void 0, 1], [NaN, "hostname", void 0, 1, 1]], g = { hash: 1, query: 1 };
|
|
1504
|
+
function m(p) {
|
|
1505
|
+
var v, A = (typeof window < "u" ? window : typeof Ue < "u" ? Ue : typeof self < "u" ? self : {}).location || {}, N = {}, b = typeof (p = p || A);
|
|
1506
|
+
if (p.protocol === "blob:") N = new y(unescape(p.pathname), {});
|
|
1507
|
+
else if (b === "string") for (v in N = new y(p, {}), g) delete N[v];
|
|
1508
|
+
else if (b === "object") {
|
|
1509
|
+
for (v in p) v in g || (N[v] = p[v]);
|
|
1510
|
+
N.slashes === void 0 && (N.slashes = i.test(p.href));
|
|
1511
|
+
}
|
|
1512
|
+
return N;
|
|
1513
|
+
}
|
|
1514
|
+
function d(p) {
|
|
1515
|
+
return p === "file:" || p === "ftp:" || p === "http:" || p === "https:" || p === "ws:" || p === "wss:";
|
|
1516
|
+
}
|
|
1517
|
+
function w(p, v) {
|
|
1518
|
+
p = (p = f(p)).replace(l, ""), v = v || {};
|
|
1519
|
+
var A, N = a.exec(p), b = N[1] ? N[1].toLowerCase() : "", E = !!N[2], x = !!N[3], T = 0;
|
|
1520
|
+
return E ? x ? (A = N[2] + N[3] + N[4], T = N[2].length + N[3].length) : (A = N[2] + N[4], T = N[2].length) : x ? (A = N[3] + N[4], T = N[3].length) : A = N[4], b === "file:" ? T >= 2 && (A = A.slice(2)) : d(b) ? A = N[4] : b ? E && (A = A.slice(2)) : T >= 2 && d(v.protocol) && (A = N[4]), { protocol: b, slashes: E || d(b), slashesCount: T, rest: A };
|
|
1521
|
+
}
|
|
1522
|
+
function y(p, v, A) {
|
|
1523
|
+
if (p = (p = f(p)).replace(l, ""), !(this instanceof y)) return new y(p, v, A);
|
|
1524
|
+
var N, b, E, x, T, O, I = c.slice(), C = typeof v, P = this, j = 0;
|
|
1525
|
+
for (C !== "object" && C !== "string" && (A = v, v = null), A && typeof A != "function" && (A = o.parse), N = !(b = w(p || "", v = m(v))).protocol && !b.slashes, P.slashes = b.slashes || N && v.slashes, P.protocol = b.protocol || v.protocol || "", p = b.rest, (b.protocol === "file:" && (b.slashesCount !== 2 || s.test(p)) || !b.slashes && (b.protocol || b.slashesCount < 2 || !d(P.protocol))) && (I[3] = [/(.*)/, "pathname"]); j < I.length; j++) typeof (x = I[j]) != "function" ? (E = x[0], O = x[1], E != E ? P[O] = p : typeof E == "string" ? ~(T = E === "@" ? p.lastIndexOf(E) : p.indexOf(E)) && (typeof x[2] == "number" ? (P[O] = p.slice(0, T), p = p.slice(T + x[2])) : (P[O] = p.slice(T), p = p.slice(0, T))) : (T = E.exec(p)) && (P[O] = T[1], p = p.slice(0, T.index)), P[O] = P[O] || N && x[3] && v[O] || "", x[4] && (P[O] = P[O].toLowerCase())) : p = x(p, P);
|
|
1526
|
+
A && (P.query = A(P.query)), N && v.slashes && P.pathname.charAt(0) !== "/" && (P.pathname !== "" || v.pathname !== "") && (P.pathname = function(F, $) {
|
|
1527
|
+
if (F === "") return $;
|
|
1528
|
+
for (var X = ($ || "/").split("/").slice(0, -1).concat(F.split("/")), B = X.length, R = X[B - 1], D = !1, U = 0; B--; ) X[B] === "." ? X.splice(B, 1) : X[B] === ".." ? (X.splice(B, 1), U++) : U && (B === 0 && (D = !0), X.splice(B, 1), U--);
|
|
1529
|
+
return D && X.unshift(""), R !== "." && R !== ".." || X.push(""), X.join("/");
|
|
1530
|
+
}(P.pathname, v.pathname)), P.pathname.charAt(0) !== "/" && d(P.protocol) && (P.pathname = "/" + P.pathname), n(P.port, P.protocol) || (P.host = P.hostname, P.port = ""), P.username = P.password = "", P.auth && (~(T = P.auth.indexOf(":")) ? (P.username = P.auth.slice(0, T), P.username = encodeURIComponent(decodeURIComponent(P.username)), P.password = P.auth.slice(T + 1), P.password = encodeURIComponent(decodeURIComponent(P.password))) : P.username = encodeURIComponent(decodeURIComponent(P.auth)), P.auth = P.password ? P.username + ":" + P.password : P.username), P.origin = P.protocol !== "file:" && d(P.protocol) && P.host ? P.protocol + "//" + P.host : "null", P.href = P.toString();
|
|
1531
|
+
}
|
|
1532
|
+
y.prototype = { set: function(p, v, A) {
|
|
1533
|
+
var N = this;
|
|
1534
|
+
switch (p) {
|
|
1535
|
+
case "query":
|
|
1536
|
+
typeof v == "string" && v.length && (v = (A || o.parse)(v)), N[p] = v;
|
|
1537
|
+
break;
|
|
1538
|
+
case "port":
|
|
1539
|
+
N[p] = v, n(v, N.protocol) ? v && (N.host = N.hostname + ":" + v) : (N.host = N.hostname, N[p] = "");
|
|
1540
|
+
break;
|
|
1541
|
+
case "hostname":
|
|
1542
|
+
N[p] = v, N.port && (v += ":" + N.port), N.host = v;
|
|
1543
|
+
break;
|
|
1544
|
+
case "host":
|
|
1545
|
+
N[p] = v, h.test(v) ? (v = v.split(":"), N.port = v.pop(), N.hostname = v.join(":")) : (N.hostname = v, N.port = "");
|
|
1546
|
+
break;
|
|
1547
|
+
case "protocol":
|
|
1548
|
+
N.protocol = v.toLowerCase(), N.slashes = !A;
|
|
1549
|
+
break;
|
|
1550
|
+
case "pathname":
|
|
1551
|
+
case "hash":
|
|
1552
|
+
if (v) {
|
|
1553
|
+
var b = p === "pathname" ? "/" : "#";
|
|
1554
|
+
N[p] = v.charAt(0) !== b ? b + v : v;
|
|
1555
|
+
} else N[p] = v;
|
|
1556
|
+
break;
|
|
1557
|
+
case "username":
|
|
1558
|
+
case "password":
|
|
1559
|
+
N[p] = encodeURIComponent(v);
|
|
1560
|
+
break;
|
|
1561
|
+
case "auth":
|
|
1562
|
+
var E = v.indexOf(":");
|
|
1563
|
+
~E ? (N.username = v.slice(0, E), N.username = encodeURIComponent(decodeURIComponent(N.username)), N.password = v.slice(E + 1), N.password = encodeURIComponent(decodeURIComponent(N.password))) : N.username = encodeURIComponent(decodeURIComponent(v));
|
|
1564
|
+
}
|
|
1565
|
+
for (var x = 0; x < c.length; x++) {
|
|
1566
|
+
var T = c[x];
|
|
1567
|
+
T[4] && (N[T[1]] = N[T[1]].toLowerCase());
|
|
1568
|
+
}
|
|
1569
|
+
return N.auth = N.password ? N.username + ":" + N.password : N.username, N.origin = N.protocol !== "file:" && d(N.protocol) && N.host ? N.protocol + "//" + N.host : "null", N.href = N.toString(), N;
|
|
1570
|
+
}, toString: function(p) {
|
|
1571
|
+
p && typeof p == "function" || (p = o.stringify);
|
|
1572
|
+
var v, A = this, N = A.host, b = A.protocol;
|
|
1573
|
+
b && b.charAt(b.length - 1) !== ":" && (b += ":");
|
|
1574
|
+
var E = b + (A.protocol && A.slashes || d(A.protocol) ? "//" : "");
|
|
1575
|
+
return A.username ? (E += A.username, A.password && (E += ":" + A.password), E += "@") : A.password ? (E += ":" + A.password, E += "@") : A.protocol !== "file:" && d(A.protocol) && !N && A.pathname !== "/" && (E += "@"), (N[N.length - 1] === ":" || h.test(A.hostname) && !A.port) && (N += ":"), E += N + A.pathname, (v = typeof A.query == "object" ? p(A.query) : A.query) && (E += v.charAt(0) !== "?" ? "?" + v : v), A.hash && (E += A.hash), E;
|
|
1576
|
+
} }, y.extractProtocol = w, y.location = m, y.trimLeft = f, y.qs = o, r.exports = y;
|
|
1577
|
+
}, 410: () => {
|
|
1578
|
+
}, 388: () => {
|
|
1579
|
+
}, 805: () => {
|
|
1580
|
+
}, 345: () => {
|
|
1581
|
+
}, 800: () => {
|
|
1582
|
+
} }, Mt = {};
|
|
1583
|
+
function L(r) {
|
|
1584
|
+
var e = Mt[r];
|
|
1585
|
+
if (e !== void 0) return e.exports;
|
|
1586
|
+
var t = Mt[r] = { id: r, loaded: !1, exports: {} };
|
|
1587
|
+
return dn[r].call(t.exports, t, t.exports, L), t.loaded = !0, t.exports;
|
|
1588
|
+
}
|
|
1589
|
+
L.n = (r) => {
|
|
1590
|
+
var e = r && r.__esModule ? () => r.default : () => r;
|
|
1591
|
+
return L.d(e, { a: e }), e;
|
|
1592
|
+
}, L.d = (r, e) => {
|
|
1593
|
+
for (var t in e) L.o(e, t) && !L.o(r, t) && Object.defineProperty(r, t, { enumerable: !0, get: e[t] });
|
|
1594
|
+
}, L.o = (r, e) => Object.prototype.hasOwnProperty.call(r, e), L.nmd = (r) => (r.paths = [], r.children || (r.children = []), r);
|
|
1595
|
+
var ue = {};
|
|
1596
|
+
L.d(ue, { hT: () => re, O4: () => pe, Kd: () => En, YK: () => An, UU: () => Fs, Gu: () => Ar, ky: () => kr, h4: () => ke, ch: () => Ye, hq: () => Ee, i5: () => Ur });
|
|
1597
|
+
var mn = L(737), bn = L.n(mn);
|
|
1598
|
+
function Qe(r) {
|
|
1599
|
+
if (!vt(r)) throw new Error("Parameter was not an error");
|
|
1600
|
+
}
|
|
1601
|
+
function vt(r) {
|
|
1602
|
+
return !!r && typeof r == "object" && (e = r, Object.prototype.toString.call(e) === "[object Error]") || r instanceof Error;
|
|
1603
|
+
var e;
|
|
1604
|
+
}
|
|
1605
|
+
class se extends Error {
|
|
1606
|
+
constructor(e, t) {
|
|
1607
|
+
const n = [...arguments], { options: o, shortMessage: u } = function(i) {
|
|
1608
|
+
let h, a = "";
|
|
1609
|
+
if (i.length === 0) h = {};
|
|
1610
|
+
else if (vt(i[0])) h = { cause: i[0] }, a = i.slice(1).join(" ") || "";
|
|
1611
|
+
else if (i[0] && typeof i[0] == "object") h = Object.assign({}, i[0]), a = i.slice(1).join(" ") || "";
|
|
1612
|
+
else {
|
|
1613
|
+
if (typeof i[0] != "string") throw new Error("Invalid arguments passed to Layerr");
|
|
1614
|
+
h = {}, a = a = i.join(" ") || "";
|
|
1615
|
+
}
|
|
1616
|
+
return { options: h, shortMessage: a };
|
|
1617
|
+
}(n);
|
|
1618
|
+
let l = u;
|
|
1619
|
+
if (o.cause && (l = `${l}: ${o.cause.message}`), super(l), this.message = l, o.name && typeof o.name == "string" ? this.name = o.name : this.name = "Layerr", o.cause && Object.defineProperty(this, "_cause", { value: o.cause }), Object.defineProperty(this, "_info", { value: {} }), o.info && typeof o.info == "object" && Object.assign(this._info, o.info), Error.captureStackTrace) {
|
|
1620
|
+
const i = o.constructorOpt || this.constructor;
|
|
1621
|
+
Error.captureStackTrace(this, i);
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
static cause(e) {
|
|
1625
|
+
return Qe(e), e._cause && vt(e._cause) ? e._cause : null;
|
|
1626
|
+
}
|
|
1627
|
+
static fullStack(e) {
|
|
1628
|
+
Qe(e);
|
|
1629
|
+
const t = se.cause(e);
|
|
1630
|
+
return t ? `${e.stack}
|
|
1631
|
+
caused by: ${se.fullStack(t)}` : e.stack ?? "";
|
|
1632
|
+
}
|
|
1633
|
+
static info(e) {
|
|
1634
|
+
Qe(e);
|
|
1635
|
+
const t = {}, n = se.cause(e);
|
|
1636
|
+
return n && Object.assign(t, se.info(n)), e._info && Object.assign(t, e._info), t;
|
|
1637
|
+
}
|
|
1638
|
+
toString() {
|
|
1639
|
+
let e = this.name || this.constructor.name || this.constructor.prototype.name;
|
|
1640
|
+
return this.message && (e = `${e}: ${this.message}`), e;
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
var yn = L(47), qe = L.n(yn);
|
|
1644
|
+
const Vt = "__PATH_SEPARATOR_POSIX__", Bt = "__PATH_SEPARATOR_WINDOWS__";
|
|
1645
|
+
function M(r) {
|
|
1646
|
+
try {
|
|
1647
|
+
const e = r.replace(/\//g, Vt).replace(/\\\\/g, Bt);
|
|
1648
|
+
return encodeURIComponent(e).split(Bt).join("\\\\").split(Vt).join("/");
|
|
1649
|
+
} catch (e) {
|
|
1650
|
+
throw new se(e, "Failed encoding path");
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
function qt(r) {
|
|
1654
|
+
return r.startsWith("/") ? r : "/" + r;
|
|
1655
|
+
}
|
|
1656
|
+
function Re(r) {
|
|
1657
|
+
let e = r;
|
|
1658
|
+
return e[0] !== "/" && (e = "/" + e), /^.+\/$/.test(e) && (e = e.substr(0, e.length - 1)), e;
|
|
1659
|
+
}
|
|
1660
|
+
function vn(r) {
|
|
1661
|
+
let e = new (bn())(r).pathname;
|
|
1662
|
+
return e.length <= 0 && (e = "/"), Re(e);
|
|
1663
|
+
}
|
|
1664
|
+
function V() {
|
|
1665
|
+
for (var r = arguments.length, e = new Array(r), t = 0; t < r; t++) e[t] = arguments[t];
|
|
1666
|
+
return function() {
|
|
1667
|
+
return function(n) {
|
|
1668
|
+
var o = [];
|
|
1669
|
+
if (n.length === 0) return "";
|
|
1670
|
+
if (typeof n[0] != "string") throw new TypeError("Url must be a string. Received " + n[0]);
|
|
1671
|
+
if (n[0].match(/^[^/:]+:\/*$/) && n.length > 1) {
|
|
1672
|
+
var u = n.shift();
|
|
1673
|
+
n[0] = u + n[0];
|
|
1674
|
+
}
|
|
1675
|
+
n[0].match(/^file:\/\/\//) ? n[0] = n[0].replace(/^([^/:]+):\/*/, "$1:///") : n[0] = n[0].replace(/^([^/:]+):\/*/, "$1://");
|
|
1676
|
+
for (var l = 0; l < n.length; l++) {
|
|
1677
|
+
var i = n[l];
|
|
1678
|
+
if (typeof i != "string") throw new TypeError("Url must be a string. Received " + i);
|
|
1679
|
+
i !== "" && (l > 0 && (i = i.replace(/^[\/]+/, "")), i = l < n.length - 1 ? i.replace(/[\/]+$/, "") : i.replace(/[\/]+$/, "/"), o.push(i));
|
|
1680
|
+
}
|
|
1681
|
+
var h = o.join("/"), a = (h = h.replace(/\/(\?|&|#[^!])/g, "$1")).split("?");
|
|
1682
|
+
return a.shift() + (a.length > 0 ? "?" : "") + a.join("&");
|
|
1683
|
+
}(typeof arguments[0] == "object" ? arguments[0] : [].slice.call(arguments));
|
|
1684
|
+
}(e.reduce((n, o, u) => ((u === 0 || o !== "/" || o === "/" && n[n.length - 1] !== "/") && n.push(o), n), []));
|
|
1685
|
+
}
|
|
1686
|
+
var wn = L(542), Ce = L.n(wn);
|
|
1687
|
+
const Nn = "abcdef0123456789";
|
|
1688
|
+
function Wt(r, e) {
|
|
1689
|
+
const t = r.url.replace("//", ""), n = t.indexOf("/") == -1 ? "/" : t.slice(t.indexOf("/")), o = r.method ? r.method.toUpperCase() : "GET", u = !!/(^|,)\s*auth\s*($|,)/.test(e.qop) && "auth", l = `00000000${e.nc}`.slice(-8), i = function(c, g, m, d, w, y, p) {
|
|
1690
|
+
const v = p || Ce()(`${g}:${m}:${d}`);
|
|
1691
|
+
return c && c.toLowerCase() === "md5-sess" ? Ce()(`${v}:${w}:${y}`) : v;
|
|
1692
|
+
}(e.algorithm, e.username, e.realm, e.password, e.nonce, e.cnonce, e.ha1), h = Ce()(`${o}:${n}`), a = u ? Ce()(`${i}:${e.nonce}:${l}:${e.cnonce}:${u}:${h}`) : Ce()(`${i}:${e.nonce}:${h}`), s = { username: e.username, realm: e.realm, nonce: e.nonce, uri: n, qop: u, response: a, nc: l, cnonce: e.cnonce, algorithm: e.algorithm, opaque: e.opaque }, f = [];
|
|
1693
|
+
for (const c in s) s[c] && (c === "qop" || c === "nc" || c === "algorithm" ? f.push(`${c}=${s[c]}`) : f.push(`${c}="${s[c]}"`));
|
|
1694
|
+
return `Digest ${f.join(", ")}`;
|
|
1695
|
+
}
|
|
1696
|
+
function xr(r) {
|
|
1697
|
+
return (r.headers && r.headers.get("www-authenticate") || "").split(/\s/)[0].toLowerCase() === "digest";
|
|
1698
|
+
}
|
|
1699
|
+
var xn = L(101), Pr = L.n(xn);
|
|
1700
|
+
function Xt(r) {
|
|
1701
|
+
return Pr().decode(r);
|
|
1702
|
+
}
|
|
1703
|
+
function Gt(r, e) {
|
|
1704
|
+
var t;
|
|
1705
|
+
return `Basic ${t = `${r}:${e}`, Pr().encode(t)}`;
|
|
1706
|
+
}
|
|
1707
|
+
const We = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : typeof window < "u" ? window : globalThis, Pn = We.fetch.bind(We), En = We.Request, An = We.Response;
|
|
1708
|
+
let re = function(r) {
|
|
1709
|
+
return r.Auto = "auto", r.Digest = "digest", r.None = "none", r.Password = "password", r.Token = "token", r;
|
|
1710
|
+
}({}), pe = function(r) {
|
|
1711
|
+
return r.DataTypeNoLength = "data-type-no-length", r.InvalidAuthType = "invalid-auth-type", r.InvalidOutputFormat = "invalid-output-format", r.LinkUnsupportedAuthType = "link-unsupported-auth", r.InvalidUpdateRange = "invalid-update-range", r.NotSupported = "not-supported", r;
|
|
1712
|
+
}({});
|
|
1713
|
+
function Er(r, e, t, n, o) {
|
|
1714
|
+
switch (r.authType) {
|
|
1715
|
+
case re.Auto:
|
|
1716
|
+
e && t && (r.headers.Authorization = Gt(e, t));
|
|
1717
|
+
break;
|
|
1718
|
+
case re.Digest:
|
|
1719
|
+
r.digest = /* @__PURE__ */ function(l, i, h) {
|
|
1720
|
+
return { username: l, password: i, ha1: h, nc: 0, algorithm: "md5", hasDigestAuth: !1 };
|
|
1721
|
+
}(e, t, o);
|
|
1722
|
+
break;
|
|
1723
|
+
case re.None:
|
|
1724
|
+
break;
|
|
1725
|
+
case re.Password:
|
|
1726
|
+
r.headers.Authorization = Gt(e, t);
|
|
1727
|
+
break;
|
|
1728
|
+
case re.Token:
|
|
1729
|
+
r.headers.Authorization = `${(u = n).token_type} ${u.access_token}`;
|
|
1730
|
+
break;
|
|
1731
|
+
default:
|
|
1732
|
+
throw new se({ info: { code: pe.InvalidAuthType } }, `Invalid auth type: ${r.authType}`);
|
|
1733
|
+
}
|
|
1734
|
+
var u;
|
|
1735
|
+
}
|
|
1736
|
+
L(345), L(800);
|
|
1737
|
+
const zt = "@@HOTPATCHER", Tn = () => {
|
|
1738
|
+
};
|
|
1739
|
+
function De(r) {
|
|
1740
|
+
return { original: r, methods: [r], final: !1 };
|
|
1741
|
+
}
|
|
1742
|
+
class On {
|
|
1743
|
+
constructor() {
|
|
1744
|
+
this._configuration = { registry: {}, getEmptyAction: "null" }, this.__type__ = zt;
|
|
1745
|
+
}
|
|
1746
|
+
get configuration() {
|
|
1747
|
+
return this._configuration;
|
|
1748
|
+
}
|
|
1749
|
+
get getEmptyAction() {
|
|
1750
|
+
return this.configuration.getEmptyAction;
|
|
1751
|
+
}
|
|
1752
|
+
set getEmptyAction(e) {
|
|
1753
|
+
this.configuration.getEmptyAction = e;
|
|
1754
|
+
}
|
|
1755
|
+
control(e) {
|
|
1756
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
|
|
1757
|
+
if (!e || e.__type__ !== zt) throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");
|
|
1758
|
+
return Object.keys(e.configuration.registry).forEach((n) => {
|
|
1759
|
+
this.configuration.registry.hasOwnProperty(n) ? t && (this.configuration.registry[n] = Object.assign({}, e.configuration.registry[n])) : this.configuration.registry[n] = Object.assign({}, e.configuration.registry[n]);
|
|
1760
|
+
}), e._configuration = this.configuration, this;
|
|
1761
|
+
}
|
|
1762
|
+
execute(e) {
|
|
1763
|
+
const t = this.get(e) || Tn;
|
|
1764
|
+
for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), u = 1; u < n; u++) o[u - 1] = arguments[u];
|
|
1765
|
+
return t(...o);
|
|
1766
|
+
}
|
|
1767
|
+
get(e) {
|
|
1768
|
+
const t = this.configuration.registry[e];
|
|
1769
|
+
if (!t) switch (this.getEmptyAction) {
|
|
1770
|
+
case "null":
|
|
1771
|
+
return null;
|
|
1772
|
+
case "throw":
|
|
1773
|
+
throw new Error(`Failed handling method request: No method provided for override: ${e}`);
|
|
1774
|
+
default:
|
|
1775
|
+
throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`);
|
|
1776
|
+
}
|
|
1777
|
+
return function() {
|
|
1778
|
+
for (var n = arguments.length, o = new Array(n), u = 0; u < n; u++) o[u] = arguments[u];
|
|
1779
|
+
if (o.length === 0) throw new Error("Failed creating sequence: No functions provided");
|
|
1780
|
+
return function() {
|
|
1781
|
+
for (var l = arguments.length, i = new Array(l), h = 0; h < l; h++) i[h] = arguments[h];
|
|
1782
|
+
let a = i;
|
|
1783
|
+
const s = this;
|
|
1784
|
+
for (; o.length > 0; ) a = [o.shift().apply(s, a)];
|
|
1785
|
+
return a[0];
|
|
1786
|
+
};
|
|
1787
|
+
}(...t.methods);
|
|
1788
|
+
}
|
|
1789
|
+
isPatched(e) {
|
|
1790
|
+
return !!this.configuration.registry[e];
|
|
1791
|
+
}
|
|
1792
|
+
patch(e, t) {
|
|
1793
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1794
|
+
const { chain: o = !1 } = n;
|
|
1795
|
+
if (this.configuration.registry[e] && this.configuration.registry[e].final) throw new Error(`Failed patching '${e}': Method marked as being final`);
|
|
1796
|
+
if (typeof t != "function") throw new Error(`Failed patching '${e}': Provided method is not a function`);
|
|
1797
|
+
if (o) this.configuration.registry[e] ? this.configuration.registry[e].methods.push(t) : this.configuration.registry[e] = De(t);
|
|
1798
|
+
else if (this.isPatched(e)) {
|
|
1799
|
+
const { original: u } = this.configuration.registry[e];
|
|
1800
|
+
this.configuration.registry[e] = Object.assign(De(t), { original: u });
|
|
1801
|
+
} else this.configuration.registry[e] = De(t);
|
|
1802
|
+
return this;
|
|
1803
|
+
}
|
|
1804
|
+
patchInline(e, t) {
|
|
1805
|
+
this.isPatched(e) || this.patch(e, t);
|
|
1806
|
+
for (var n = arguments.length, o = new Array(n > 2 ? n - 2 : 0), u = 2; u < n; u++) o[u - 2] = arguments[u];
|
|
1807
|
+
return this.execute(e, ...o);
|
|
1808
|
+
}
|
|
1809
|
+
plugin(e) {
|
|
1810
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++) n[o - 1] = arguments[o];
|
|
1811
|
+
return n.forEach((u) => {
|
|
1812
|
+
this.patch(e, u, { chain: !0 });
|
|
1813
|
+
}), this;
|
|
1814
|
+
}
|
|
1815
|
+
restore(e) {
|
|
1816
|
+
if (!this.isPatched(e)) throw new Error(`Failed restoring method: No method present for key: ${e}`);
|
|
1817
|
+
if (typeof this.configuration.registry[e].original != "function") throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);
|
|
1818
|
+
return this.configuration.registry[e].methods = [this.configuration.registry[e].original], this;
|
|
1819
|
+
}
|
|
1820
|
+
setFinal(e) {
|
|
1821
|
+
if (!this.configuration.registry.hasOwnProperty(e)) throw new Error(`Failed marking '${e}' as final: No method found for key`);
|
|
1822
|
+
return this.configuration.registry[e].final = !0, this;
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
let et = null;
|
|
1826
|
+
function Ar() {
|
|
1827
|
+
return et || (et = new On()), et;
|
|
1828
|
+
}
|
|
1829
|
+
function Xe(r) {
|
|
1830
|
+
return function(e) {
|
|
1831
|
+
if (typeof e != "object" || e === null || Object.prototype.toString.call(e) != "[object Object]") return !1;
|
|
1832
|
+
if (Object.getPrototypeOf(e) === null) return !0;
|
|
1833
|
+
let t = e;
|
|
1834
|
+
for (; Object.getPrototypeOf(t) !== null; ) t = Object.getPrototypeOf(t);
|
|
1835
|
+
return Object.getPrototypeOf(e) === t;
|
|
1836
|
+
}(r) ? Object.assign({}, r) : Object.setPrototypeOf(Object.assign({}, r), Object.getPrototypeOf(r));
|
|
1837
|
+
}
|
|
1838
|
+
function Ht() {
|
|
1839
|
+
for (var r = arguments.length, e = new Array(r), t = 0; t < r; t++) e[t] = arguments[t];
|
|
1840
|
+
let n = null, o = [...e];
|
|
1841
|
+
for (; o.length > 0; ) {
|
|
1842
|
+
const u = o.shift();
|
|
1843
|
+
n = n ? Tr(n, u) : Xe(u);
|
|
1844
|
+
}
|
|
1845
|
+
return n;
|
|
1846
|
+
}
|
|
1847
|
+
function Tr(r, e) {
|
|
1848
|
+
const t = Xe(r);
|
|
1849
|
+
return Object.keys(e).forEach((n) => {
|
|
1850
|
+
t.hasOwnProperty(n) ? Array.isArray(e[n]) ? t[n] = Array.isArray(t[n]) ? [...t[n], ...e[n]] : [...e[n]] : typeof e[n] == "object" && e[n] ? t[n] = typeof t[n] == "object" && t[n] ? Tr(t[n], e[n]) : Xe(e[n]) : t[n] = e[n] : t[n] = e[n];
|
|
1851
|
+
}), t;
|
|
1852
|
+
}
|
|
1853
|
+
function Cn(r) {
|
|
1854
|
+
const e = {};
|
|
1855
|
+
for (const t of r.keys()) e[t] = r.get(t);
|
|
1856
|
+
return e;
|
|
1857
|
+
}
|
|
1858
|
+
function wt() {
|
|
1859
|
+
for (var r = arguments.length, e = new Array(r), t = 0; t < r; t++) e[t] = arguments[t];
|
|
1860
|
+
if (e.length === 0) return {};
|
|
1861
|
+
const n = {};
|
|
1862
|
+
return e.reduce((o, u) => (Object.keys(u).forEach((l) => {
|
|
1863
|
+
const i = l.toLowerCase();
|
|
1864
|
+
n.hasOwnProperty(i) ? o[n[i]] = u[l] : (n[i] = l, o[l] = u[l]);
|
|
1865
|
+
}), o), {});
|
|
1866
|
+
}
|
|
1867
|
+
L(805);
|
|
1868
|
+
const In = typeof ArrayBuffer == "function", { toString: Sn } = Object.prototype;
|
|
1869
|
+
function Or(r) {
|
|
1870
|
+
return In && (r instanceof ArrayBuffer || Sn.call(r) === "[object ArrayBuffer]");
|
|
1871
|
+
}
|
|
1872
|
+
function Cr(r) {
|
|
1873
|
+
return r != null && r.constructor != null && typeof r.constructor.isBuffer == "function" && r.constructor.isBuffer(r);
|
|
1874
|
+
}
|
|
1875
|
+
function Ot(r) {
|
|
1876
|
+
return function() {
|
|
1877
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
1878
|
+
try {
|
|
1879
|
+
return Promise.resolve(r.apply(this, e));
|
|
1880
|
+
} catch (n) {
|
|
1881
|
+
return Promise.reject(n);
|
|
1882
|
+
}
|
|
1883
|
+
};
|
|
1884
|
+
}
|
|
1885
|
+
function Nt(r, e, t) {
|
|
1886
|
+
return t ? e ? e(r) : r : (r && r.then || (r = Promise.resolve(r)), e ? r.then(e) : r);
|
|
1887
|
+
}
|
|
1888
|
+
const Ir = Ot(function(r) {
|
|
1889
|
+
const e = r._digest;
|
|
1890
|
+
return delete r._digest, e.hasDigestAuth && (r = Ht(r, { headers: { Authorization: Wt(r, e) } })), Nt(Ge(r), function(t) {
|
|
1891
|
+
let n = !1;
|
|
1892
|
+
return o = function(l) {
|
|
1893
|
+
return n ? l : t;
|
|
1894
|
+
}, (u = function() {
|
|
1895
|
+
if (t.status == 401) return e.hasDigestAuth = function(l, i) {
|
|
1896
|
+
if (!xr(l)) return !1;
|
|
1897
|
+
const h = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;
|
|
1898
|
+
for (; ; ) {
|
|
1899
|
+
const a = l.headers && l.headers.get("www-authenticate") || "", s = h.exec(a);
|
|
1900
|
+
if (!s) break;
|
|
1901
|
+
i[s[1]] = s[2] || s[3];
|
|
1902
|
+
}
|
|
1903
|
+
return i.nc += 1, i.cnonce = function() {
|
|
1904
|
+
let a = "";
|
|
1905
|
+
for (let s = 0; s < 32; ++s) a = `${a}${Nn[Math.floor(16 * Math.random())]}`;
|
|
1906
|
+
return a;
|
|
1907
|
+
}(), !0;
|
|
1908
|
+
}(t, e), function() {
|
|
1909
|
+
if (e.hasDigestAuth) return Nt(Ge(r = Ht(r, { headers: { Authorization: Wt(r, e) } })), function(l) {
|
|
1910
|
+
return l.status == 401 ? e.hasDigestAuth = !1 : e.nc++, n = !0, l;
|
|
1911
|
+
});
|
|
1912
|
+
}();
|
|
1913
|
+
e.nc++;
|
|
1914
|
+
}()) && u.then ? u.then(o) : o(u);
|
|
1915
|
+
var o, u;
|
|
1916
|
+
});
|
|
1917
|
+
}), Fn = Ot(function(r, e) {
|
|
1918
|
+
return Nt(Ge(r), function(t) {
|
|
1919
|
+
return t.ok ? (e.authType = re.Password, t) : t.status == 401 && xr(t) ? (e.authType = re.Digest, Er(e, e.username, e.password, void 0, void 0), r._digest = e.digest, Ir(r)) : t;
|
|
1920
|
+
});
|
|
1921
|
+
}), H = Ot(function(r, e) {
|
|
1922
|
+
return e.authType === re.Auto ? Fn(r, e) : r._digest ? Ir(r) : Ge(r);
|
|
1923
|
+
});
|
|
1924
|
+
function Z(r, e, t) {
|
|
1925
|
+
const n = Xe(r);
|
|
1926
|
+
return n.headers = wt(e.headers, n.headers || {}, t.headers || {}), t.data !== void 0 && (n.data = t.data), t.signal && (n.signal = t.signal), e.httpAgent && (n.httpAgent = e.httpAgent), e.httpsAgent && (n.httpsAgent = e.httpsAgent), e.digest && (n._digest = e.digest), typeof e.withCredentials == "boolean" && (n.withCredentials = e.withCredentials), n;
|
|
1927
|
+
}
|
|
1928
|
+
function Ge(r) {
|
|
1929
|
+
const e = Ar();
|
|
1930
|
+
return e.patchInline("request", (t) => e.patchInline("fetch", Pn, t.url, function(n) {
|
|
1931
|
+
let o = {};
|
|
1932
|
+
const u = { method: n.method };
|
|
1933
|
+
if (n.headers && (o = wt(o, n.headers)), n.data !== void 0) {
|
|
1934
|
+
const [l, i] = function(h) {
|
|
1935
|
+
if (typeof h == "string") return [h, {}];
|
|
1936
|
+
if (Cr(h)) return [h, {}];
|
|
1937
|
+
if (Or(h)) return [h, {}];
|
|
1938
|
+
if (h && typeof h == "object") return [JSON.stringify(h), { "content-type": "application/json" }];
|
|
1939
|
+
throw new Error("Unable to convert request body: Unexpected body type: " + typeof h);
|
|
1940
|
+
}(n.data);
|
|
1941
|
+
u.body = l, o = wt(o, i);
|
|
1942
|
+
}
|
|
1943
|
+
return n.signal && (u.signal = n.signal), n.withCredentials && (u.credentials = "include"), u.headers = o, u;
|
|
1944
|
+
}(t)), r);
|
|
1945
|
+
}
|
|
1946
|
+
var jn = L(285);
|
|
1947
|
+
const ze = (r) => {
|
|
1948
|
+
if (typeof r != "string") throw new TypeError("invalid pattern");
|
|
1949
|
+
if (r.length > 65536) throw new TypeError("pattern is too long");
|
|
1950
|
+
}, $n = { "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0], "[:alpha:]": ["\\p{L}\\p{Nl}", !0], "[:ascii:]": ["\\x00-\\x7f", !1], "[:blank:]": ["\\p{Zs}\\t", !0], "[:cntrl:]": ["\\p{Cc}", !0], "[:digit:]": ["\\p{Nd}", !0], "[:graph:]": ["\\p{Z}\\p{C}", !0, !0], "[:lower:]": ["\\p{Ll}", !0], "[:print:]": ["\\p{C}", !0], "[:punct:]": ["\\p{P}", !0], "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", !0], "[:upper:]": ["\\p{Lu}", !0], "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0], "[:xdigit:]": ["A-Fa-f0-9", !1] }, Ie = (r) => r.replace(/[[\]\\-]/g, "\\$&"), Zt = (r) => r.join(""), Rn = (r, e) => {
|
|
1951
|
+
const t = e;
|
|
1952
|
+
if (r.charAt(t) !== "[") throw new Error("not in a brace expression");
|
|
1953
|
+
const n = [], o = [];
|
|
1954
|
+
let u = t + 1, l = !1, i = !1, h = !1, a = !1, s = t, f = "";
|
|
1955
|
+
e: for (; u < r.length; ) {
|
|
1956
|
+
const d = r.charAt(u);
|
|
1957
|
+
if (d !== "!" && d !== "^" || u !== t + 1) {
|
|
1958
|
+
if (d === "]" && l && !h) {
|
|
1959
|
+
s = u + 1;
|
|
1960
|
+
break;
|
|
1961
|
+
}
|
|
1962
|
+
if (l = !0, d !== "\\" || h) {
|
|
1963
|
+
if (d === "[" && !h) {
|
|
1964
|
+
for (const [w, [y, p, v]] of Object.entries($n)) if (r.startsWith(w, u)) {
|
|
1965
|
+
if (f) return ["$.", !1, r.length - t, !0];
|
|
1966
|
+
u += w.length, v ? o.push(y) : n.push(y), i = i || p;
|
|
1967
|
+
continue e;
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
h = !1, f ? (d > f ? n.push(Ie(f) + "-" + Ie(d)) : d === f && n.push(Ie(d)), f = "", u++) : r.startsWith("-]", u + 1) ? (n.push(Ie(d + "-")), u += 2) : r.startsWith("-", u + 1) ? (f = d, u += 2) : (n.push(Ie(d)), u++);
|
|
1971
|
+
} else h = !0, u++;
|
|
1972
|
+
} else a = !0, u++;
|
|
1973
|
+
}
|
|
1974
|
+
if (s < u) return ["", !1, 0, !1];
|
|
1975
|
+
if (!n.length && !o.length) return ["$.", !1, r.length - t, !0];
|
|
1976
|
+
if (o.length === 0 && n.length === 1 && /^\\?.$/.test(n[0]) && !a)
|
|
1977
|
+
return [(c = n[0].length === 2 ? n[0].slice(-1) : n[0], c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")), !1, s - t, !1];
|
|
1978
|
+
var c;
|
|
1979
|
+
const g = "[" + (a ? "^" : "") + Zt(n) + "]", m = "[" + (a ? "" : "^") + Zt(o) + "]";
|
|
1980
|
+
return [n.length && o.length ? "(" + g + "|" + m + ")" : n.length ? g : m, i, s - t, !0];
|
|
1981
|
+
}, Se = function(r) {
|
|
1982
|
+
let { windowsPathsNoEscape: e = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1983
|
+
return e ? r.replace(/\[([^\/\\])\]/g, "$1") : r.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
1984
|
+
}, Ln = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), Jt = (r) => Ln.has(r), tt = "(?!\\.)", kn = /* @__PURE__ */ new Set(["[", "."]), Un = /* @__PURE__ */ new Set(["..", "."]), _n = new Set("().*{}+?[]^$\\!"), Ct = "[^/]", Yt = Ct + "*?", Kt = Ct + "+?";
|
|
1985
|
+
var z, Y, he, _, G, me, Ne, be, le, xe, Le, Pe, Sr, ye, Be, xt, Fr;
|
|
1986
|
+
const te = class te {
|
|
1987
|
+
constructor(e, t) {
|
|
1988
|
+
ie(this, Pe);
|
|
1989
|
+
k(this, "type");
|
|
1990
|
+
ie(this, z);
|
|
1991
|
+
ie(this, Y);
|
|
1992
|
+
ie(this, he, !1);
|
|
1993
|
+
ie(this, _, []);
|
|
1994
|
+
ie(this, G);
|
|
1995
|
+
ie(this, me);
|
|
1996
|
+
ie(this, Ne);
|
|
1997
|
+
ie(this, be, !1);
|
|
1998
|
+
ie(this, le);
|
|
1999
|
+
ie(this, xe);
|
|
2000
|
+
ie(this, Le, !1);
|
|
2001
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2002
|
+
this.type = e, e && W(this, Y, !0), W(this, G, t), W(this, z, S(this, G) ? S(S(this, G), z) : this), W(this, le, S(this, z) === this ? n : S(S(this, z), le)), W(this, Ne, S(this, z) === this ? [] : S(S(this, z), Ne)), e !== "!" || S(S(this, z), be) || S(this, Ne).push(this), W(this, me, S(this, G) ? S(S(this, G), _).length : 0);
|
|
2003
|
+
}
|
|
2004
|
+
get hasMagic() {
|
|
2005
|
+
if (S(this, Y) !== void 0) return S(this, Y);
|
|
2006
|
+
for (const e of S(this, _)) if (typeof e != "string" && (e.type || e.hasMagic)) return W(this, Y, !0);
|
|
2007
|
+
return S(this, Y);
|
|
2008
|
+
}
|
|
2009
|
+
toString() {
|
|
2010
|
+
return S(this, xe) !== void 0 ? S(this, xe) : this.type ? W(this, xe, this.type + "(" + S(this, _).map((e) => String(e)).join("|") + ")") : W(this, xe, S(this, _).map((e) => String(e)).join(""));
|
|
2011
|
+
}
|
|
2012
|
+
push() {
|
|
2013
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
|
|
2014
|
+
for (const o of t) if (o !== "") {
|
|
2015
|
+
if (typeof o != "string" && !(o instanceof te && S(o, G) === this)) throw new Error("invalid part: " + o);
|
|
2016
|
+
S(this, _).push(o);
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
toJSON() {
|
|
2020
|
+
var t;
|
|
2021
|
+
const e = this.type === null ? S(this, _).slice().map((n) => typeof n == "string" ? n : n.toJSON()) : [this.type, ...S(this, _).map((n) => n.toJSON())];
|
|
2022
|
+
return this.isStart() && !this.type && e.unshift([]), this.isEnd() && (this === S(this, z) || S(S(this, z), be) && ((t = S(this, G)) == null ? void 0 : t.type) === "!") && e.push({}), e;
|
|
2023
|
+
}
|
|
2024
|
+
isStart() {
|
|
2025
|
+
var t;
|
|
2026
|
+
if (S(this, z) === this) return !0;
|
|
2027
|
+
if (!((t = S(this, G)) != null && t.isStart())) return !1;
|
|
2028
|
+
if (S(this, me) === 0) return !0;
|
|
2029
|
+
const e = S(this, G);
|
|
2030
|
+
for (let n = 0; n < S(this, me); n++) {
|
|
2031
|
+
const o = S(e, _)[n];
|
|
2032
|
+
if (!(o instanceof te && o.type === "!")) return !1;
|
|
2033
|
+
}
|
|
2034
|
+
return !0;
|
|
2035
|
+
}
|
|
2036
|
+
isEnd() {
|
|
2037
|
+
var t, n, o;
|
|
2038
|
+
if (S(this, z) === this || ((t = S(this, G)) == null ? void 0 : t.type) === "!") return !0;
|
|
2039
|
+
if (!((n = S(this, G)) != null && n.isEnd())) return !1;
|
|
2040
|
+
if (!this.type) return (o = S(this, G)) == null ? void 0 : o.isEnd();
|
|
2041
|
+
const e = S(this, G) ? S(S(this, G), _).length : 0;
|
|
2042
|
+
return S(this, me) === e - 1;
|
|
2043
|
+
}
|
|
2044
|
+
copyIn(e) {
|
|
2045
|
+
typeof e == "string" ? this.push(e) : this.push(e.clone(this));
|
|
2046
|
+
}
|
|
2047
|
+
clone(e) {
|
|
2048
|
+
const t = new te(this.type, e);
|
|
2049
|
+
for (const n of S(this, _)) t.copyIn(n);
|
|
2050
|
+
return t;
|
|
2051
|
+
}
|
|
2052
|
+
static fromGlob(e) {
|
|
2053
|
+
var o;
|
|
2054
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2055
|
+
const n = new te(null, void 0, t);
|
|
2056
|
+
return ge(o = te, ye, Be).call(o, e, n, 0, t), n;
|
|
2057
|
+
}
|
|
2058
|
+
toMMPattern() {
|
|
2059
|
+
if (this !== S(this, z)) return S(this, z).toMMPattern();
|
|
2060
|
+
const e = this.toString(), [t, n, o, u] = this.toRegExpSource();
|
|
2061
|
+
if (!(o || S(this, Y) || S(this, le).nocase && !S(this, le).nocaseMagicOnly && e.toUpperCase() !== e.toLowerCase())) return n;
|
|
2062
|
+
const l = (S(this, le).nocase ? "i" : "") + (u ? "u" : "");
|
|
2063
|
+
return Object.assign(new RegExp(`^${t}$`, l), { _src: t, _glob: e });
|
|
2064
|
+
}
|
|
2065
|
+
get options() {
|
|
2066
|
+
return S(this, le);
|
|
2067
|
+
}
|
|
2068
|
+
toRegExpSource(e) {
|
|
2069
|
+
var h;
|
|
2070
|
+
const t = e ?? !!S(this, le).dot;
|
|
2071
|
+
if (S(this, z) === this && ge(this, Pe, Sr).call(this), !this.type) {
|
|
2072
|
+
const a = this.isStart() && this.isEnd(), s = S(this, _).map((g) => {
|
|
2073
|
+
var p;
|
|
2074
|
+
const [m, d, w, y] = typeof g == "string" ? ge(p = te, ye, Fr).call(p, g, S(this, Y), a) : g.toRegExpSource(e);
|
|
2075
|
+
return W(this, Y, S(this, Y) || w), W(this, he, S(this, he) || y), m;
|
|
2076
|
+
}).join("");
|
|
2077
|
+
let f = "";
|
|
2078
|
+
if (this.isStart() && typeof S(this, _)[0] == "string" && (S(this, _).length !== 1 || !Un.has(S(this, _)[0]))) {
|
|
2079
|
+
const g = kn, m = t && g.has(s.charAt(0)) || s.startsWith("\\.") && g.has(s.charAt(2)) || s.startsWith("\\.\\.") && g.has(s.charAt(4)), d = !t && !e && g.has(s.charAt(0));
|
|
2080
|
+
f = m ? "(?!(?:^|/)\\.\\.?(?:$|/))" : d ? tt : "";
|
|
2081
|
+
}
|
|
2082
|
+
let c = "";
|
|
2083
|
+
return this.isEnd() && S(S(this, z), be) && ((h = S(this, G)) == null ? void 0 : h.type) === "!" && (c = "(?:$|\\/)"), [f + s + c, Se(s), W(this, Y, !!S(this, Y)), S(this, he)];
|
|
2084
|
+
}
|
|
2085
|
+
const n = this.type === "*" || this.type === "+", o = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
2086
|
+
let u = ge(this, Pe, xt).call(this, t);
|
|
2087
|
+
if (this.isStart() && this.isEnd() && !u && this.type !== "!") {
|
|
2088
|
+
const a = this.toString();
|
|
2089
|
+
return W(this, _, [a]), this.type = null, W(this, Y, void 0), [a, Se(this.toString()), !1, !1];
|
|
2090
|
+
}
|
|
2091
|
+
let l = !n || e || t ? "" : ge(this, Pe, xt).call(this, !0);
|
|
2092
|
+
l === u && (l = ""), l && (u = `(?:${u})(?:${l})*?`);
|
|
2093
|
+
let i = "";
|
|
2094
|
+
return i = this.type === "!" && S(this, Le) ? (this.isStart() && !t ? tt : "") + Kt : o + u + (this.type === "!" ? "))" + (!this.isStart() || t || e ? "" : tt) + Yt + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && l ? ")" : this.type === "*" && l ? ")?" : `)${this.type}`), [i, Se(u), W(this, Y, !!S(this, Y)), S(this, he)];
|
|
2095
|
+
}
|
|
2096
|
+
};
|
|
2097
|
+
z = new WeakMap(), Y = new WeakMap(), he = new WeakMap(), _ = new WeakMap(), G = new WeakMap(), me = new WeakMap(), Ne = new WeakMap(), be = new WeakMap(), le = new WeakMap(), xe = new WeakMap(), Le = new WeakMap(), Pe = new WeakSet(), Sr = function() {
|
|
2098
|
+
if (this !== S(this, z)) throw new Error("should only call on root");
|
|
2099
|
+
if (S(this, be)) return this;
|
|
2100
|
+
let e;
|
|
2101
|
+
for (this.toString(), W(this, be, !0); e = S(this, Ne).pop(); ) {
|
|
2102
|
+
if (e.type !== "!") continue;
|
|
2103
|
+
let t = e, n = S(t, G);
|
|
2104
|
+
for (; n; ) {
|
|
2105
|
+
for (let o = S(t, me) + 1; !n.type && o < S(n, _).length; o++) for (const u of S(e, _)) {
|
|
2106
|
+
if (typeof u == "string") throw new Error("string part in extglob AST??");
|
|
2107
|
+
u.copyIn(S(n, _)[o]);
|
|
2108
|
+
}
|
|
2109
|
+
t = n, n = S(t, G);
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
return this;
|
|
2113
|
+
}, ye = new WeakSet(), Be = function(e, t, n, o) {
|
|
2114
|
+
var g, m;
|
|
2115
|
+
let u = !1, l = !1, i = -1, h = !1;
|
|
2116
|
+
if (t.type === null) {
|
|
2117
|
+
let d = n, w = "";
|
|
2118
|
+
for (; d < e.length; ) {
|
|
2119
|
+
const y = e.charAt(d++);
|
|
2120
|
+
if (u || y === "\\") u = !u, w += y;
|
|
2121
|
+
else if (l) d === i + 1 ? y !== "^" && y !== "!" || (h = !0) : y !== "]" || d === i + 2 && h || (l = !1), w += y;
|
|
2122
|
+
else if (y !== "[") if (o.noext || !Jt(y) || e.charAt(d) !== "(") w += y;
|
|
2123
|
+
else {
|
|
2124
|
+
t.push(w), w = "";
|
|
2125
|
+
const p = new te(y, t);
|
|
2126
|
+
d = ge(g = te, ye, Be).call(g, e, p, d, o), t.push(p);
|
|
2127
|
+
}
|
|
2128
|
+
else l = !0, i = d, h = !1, w += y;
|
|
2129
|
+
}
|
|
2130
|
+
return t.push(w), d;
|
|
2131
|
+
}
|
|
2132
|
+
let a = n + 1, s = new te(null, t);
|
|
2133
|
+
const f = [];
|
|
2134
|
+
let c = "";
|
|
2135
|
+
for (; a < e.length; ) {
|
|
2136
|
+
const d = e.charAt(a++);
|
|
2137
|
+
if (u || d === "\\") u = !u, c += d;
|
|
2138
|
+
else if (l) a === i + 1 ? d !== "^" && d !== "!" || (h = !0) : d !== "]" || a === i + 2 && h || (l = !1), c += d;
|
|
2139
|
+
else if (d !== "[") if (Jt(d) && e.charAt(a) === "(") {
|
|
2140
|
+
s.push(c), c = "";
|
|
2141
|
+
const w = new te(d, s);
|
|
2142
|
+
s.push(w), a = ge(m = te, ye, Be).call(m, e, w, a, o);
|
|
2143
|
+
} else if (d !== "|") {
|
|
2144
|
+
if (d === ")") return c === "" && S(t, _).length === 0 && W(t, Le, !0), s.push(c), c = "", t.push(...f, s), a;
|
|
2145
|
+
c += d;
|
|
2146
|
+
} else s.push(c), c = "", f.push(s), s = new te(null, t);
|
|
2147
|
+
else l = !0, i = a, h = !1, c += d;
|
|
2148
|
+
}
|
|
2149
|
+
return t.type = null, W(t, Y, void 0), W(t, _, [e.substring(n - 1)]), a;
|
|
2150
|
+
}, xt = function(e) {
|
|
2151
|
+
return S(this, _).map((t) => {
|
|
2152
|
+
if (typeof t == "string") throw new Error("string type in extglob ast??");
|
|
2153
|
+
const [n, o, u, l] = t.toRegExpSource(e);
|
|
2154
|
+
return W(this, he, S(this, he) || l), n;
|
|
2155
|
+
}).filter((t) => !(this.isStart() && this.isEnd() && !t)).join("|");
|
|
2156
|
+
}, Fr = function(e, t) {
|
|
2157
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], o = !1, u = "", l = !1;
|
|
2158
|
+
for (let i = 0; i < e.length; i++) {
|
|
2159
|
+
const h = e.charAt(i);
|
|
2160
|
+
if (o) o = !1, u += (_n.has(h) ? "\\" : "") + h;
|
|
2161
|
+
else if (h !== "\\") {
|
|
2162
|
+
if (h === "[") {
|
|
2163
|
+
const [a, s, f, c] = Rn(e, i);
|
|
2164
|
+
if (f) {
|
|
2165
|
+
u += a, l = l || s, i += f - 1, t = t || c;
|
|
2166
|
+
continue;
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
h !== "*" ? h !== "?" ? u += h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") : (u += Ct, t = !0) : (u += n && e === "*" ? Kt : Yt, t = !0);
|
|
2170
|
+
} else i === e.length - 1 ? u += "\\\\" : o = !0;
|
|
2171
|
+
}
|
|
2172
|
+
return [u, Se(e), !!t, l];
|
|
2173
|
+
}, ie(te, ye);
|
|
2174
|
+
let He = te;
|
|
2175
|
+
const ee = function(r, e) {
|
|
2176
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2177
|
+
return ze(e), !(!t.nocomment && e.charAt(0) === "#") && new Ze(e, t).match(r);
|
|
2178
|
+
}, Mn = /^\*+([^+@!?\*\[\(]*)$/, Vn = (r) => (e) => !e.startsWith(".") && e.endsWith(r), Bn = (r) => (e) => e.endsWith(r), qn = (r) => (r = r.toLowerCase(), (e) => !e.startsWith(".") && e.toLowerCase().endsWith(r)), Wn = (r) => (r = r.toLowerCase(), (e) => e.toLowerCase().endsWith(r)), Xn = /^\*+\.\*+$/, Gn = (r) => !r.startsWith(".") && r.includes("."), zn = (r) => r !== "." && r !== ".." && r.includes("."), Hn = /^\.\*+$/, Zn = (r) => r !== "." && r !== ".." && r.startsWith("."), Jn = /^\*+$/, Yn = (r) => r.length !== 0 && !r.startsWith("."), Kn = (r) => r.length !== 0 && r !== "." && r !== "..", Qn = /^\?+([^+@!?\*\[\(]*)?$/, Dn = (r) => {
|
|
2179
|
+
let [e, t = ""] = r;
|
|
2180
|
+
const n = jr([e]);
|
|
2181
|
+
return t ? (t = t.toLowerCase(), (o) => n(o) && o.toLowerCase().endsWith(t)) : n;
|
|
2182
|
+
}, es = (r) => {
|
|
2183
|
+
let [e, t = ""] = r;
|
|
2184
|
+
const n = $r([e]);
|
|
2185
|
+
return t ? (t = t.toLowerCase(), (o) => n(o) && o.toLowerCase().endsWith(t)) : n;
|
|
2186
|
+
}, ts = (r) => {
|
|
2187
|
+
let [e, t = ""] = r;
|
|
2188
|
+
const n = $r([e]);
|
|
2189
|
+
return t ? (o) => n(o) && o.endsWith(t) : n;
|
|
2190
|
+
}, rs = (r) => {
|
|
2191
|
+
let [e, t = ""] = r;
|
|
2192
|
+
const n = jr([e]);
|
|
2193
|
+
return t ? (o) => n(o) && o.endsWith(t) : n;
|
|
2194
|
+
}, jr = (r) => {
|
|
2195
|
+
let [e] = r;
|
|
2196
|
+
const t = e.length;
|
|
2197
|
+
return (n) => n.length === t && !n.startsWith(".");
|
|
2198
|
+
}, $r = (r) => {
|
|
2199
|
+
let [e] = r;
|
|
2200
|
+
const t = e.length;
|
|
2201
|
+
return (n) => n.length === t && n !== "." && n !== "..";
|
|
2202
|
+
}, Rr = typeof we == "object" && we ? typeof we.env == "object" && we.env && we.env.__MINIMATCH_TESTING_PLATFORM__ || we.platform : "posix";
|
|
2203
|
+
ee.sep = Rr === "win32" ? "\\" : "/";
|
|
2204
|
+
const ae = Symbol("globstar **");
|
|
2205
|
+
ee.GLOBSTAR = ae, ee.filter = function(r) {
|
|
2206
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2207
|
+
return (t) => ee(t, r, e);
|
|
2208
|
+
};
|
|
2209
|
+
const oe = function(r) {
|
|
2210
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2211
|
+
return Object.assign({}, r, e);
|
|
2212
|
+
};
|
|
2213
|
+
ee.defaults = (r) => {
|
|
2214
|
+
if (!r || typeof r != "object" || !Object.keys(r).length) return ee;
|
|
2215
|
+
const e = ee;
|
|
2216
|
+
return Object.assign(function(t, n) {
|
|
2217
|
+
return e(t, n, oe(r, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}));
|
|
2218
|
+
}, { Minimatch: class extends e.Minimatch {
|
|
2219
|
+
constructor(t) {
|
|
2220
|
+
super(t, oe(r, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}));
|
|
2221
|
+
}
|
|
2222
|
+
static defaults(t) {
|
|
2223
|
+
return e.defaults(oe(r, t)).Minimatch;
|
|
2224
|
+
}
|
|
2225
|
+
}, AST: class extends e.AST {
|
|
2226
|
+
constructor(t, n) {
|
|
2227
|
+
super(t, n, oe(r, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}));
|
|
2228
|
+
}
|
|
2229
|
+
static fromGlob(t) {
|
|
2230
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2231
|
+
return e.AST.fromGlob(t, oe(r, n));
|
|
2232
|
+
}
|
|
2233
|
+
}, unescape: function(t) {
|
|
2234
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2235
|
+
return e.unescape(t, oe(r, n));
|
|
2236
|
+
}, escape: function(t) {
|
|
2237
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2238
|
+
return e.escape(t, oe(r, n));
|
|
2239
|
+
}, filter: function(t) {
|
|
2240
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2241
|
+
return e.filter(t, oe(r, n));
|
|
2242
|
+
}, defaults: (t) => e.defaults(oe(r, t)), makeRe: function(t) {
|
|
2243
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2244
|
+
return e.makeRe(t, oe(r, n));
|
|
2245
|
+
}, braceExpand: function(t) {
|
|
2246
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2247
|
+
return e.braceExpand(t, oe(r, n));
|
|
2248
|
+
}, match: function(t, n) {
|
|
2249
|
+
let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2250
|
+
return e.match(t, n, oe(r, o));
|
|
2251
|
+
}, sep: e.sep, GLOBSTAR: ae });
|
|
2252
|
+
};
|
|
2253
|
+
const Lr = function(r) {
|
|
2254
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2255
|
+
return ze(r), e.nobrace || !/\{(?:(?!\{).)*\}/.test(r) ? [r] : jn(r);
|
|
2256
|
+
};
|
|
2257
|
+
ee.braceExpand = Lr, ee.makeRe = function(r) {
|
|
2258
|
+
return new Ze(r, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).makeRe();
|
|
2259
|
+
}, ee.match = function(r, e) {
|
|
2260
|
+
const t = new Ze(e, arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {});
|
|
2261
|
+
return r = r.filter((n) => t.match(n)), t.options.nonull && !r.length && r.push(e), r;
|
|
2262
|
+
};
|
|
2263
|
+
const Qt = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
2264
|
+
class Ze {
|
|
2265
|
+
constructor(e) {
|
|
2266
|
+
k(this, "options");
|
|
2267
|
+
k(this, "set");
|
|
2268
|
+
k(this, "pattern");
|
|
2269
|
+
k(this, "windowsPathsNoEscape");
|
|
2270
|
+
k(this, "nonegate");
|
|
2271
|
+
k(this, "negate");
|
|
2272
|
+
k(this, "comment");
|
|
2273
|
+
k(this, "empty");
|
|
2274
|
+
k(this, "preserveMultipleSlashes");
|
|
2275
|
+
k(this, "partial");
|
|
2276
|
+
k(this, "globSet");
|
|
2277
|
+
k(this, "globParts");
|
|
2278
|
+
k(this, "nocase");
|
|
2279
|
+
k(this, "isWindows");
|
|
2280
|
+
k(this, "platform");
|
|
2281
|
+
k(this, "windowsNoMagicRoot");
|
|
2282
|
+
k(this, "regexp");
|
|
2283
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2284
|
+
ze(e), t = t || {}, this.options = t, this.pattern = e, this.platform = t.platform || Rr, this.isWindows = this.platform === "win32", this.windowsPathsNoEscape = !!t.windowsPathsNoEscape || t.allowWindowsEscape === !1, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!t.preserveMultipleSlashes, this.regexp = null, this.negate = !1, this.nonegate = !!t.nonegate, this.comment = !1, this.empty = !1, this.partial = !!t.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = t.windowsNoMagicRoot !== void 0 ? t.windowsNoMagicRoot : !(!this.isWindows || !this.nocase), this.globSet = [], this.globParts = [], this.set = [], this.make();
|
|
2285
|
+
}
|
|
2286
|
+
hasMagic() {
|
|
2287
|
+
if (this.options.magicalBraces && this.set.length > 1) return !0;
|
|
2288
|
+
for (const e of this.set) for (const t of e) if (typeof t != "string") return !0;
|
|
2289
|
+
return !1;
|
|
2290
|
+
}
|
|
2291
|
+
debug() {
|
|
2292
|
+
}
|
|
2293
|
+
make() {
|
|
2294
|
+
const e = this.pattern, t = this.options;
|
|
2295
|
+
if (!t.nocomment && e.charAt(0) === "#") return void (this.comment = !0);
|
|
2296
|
+
if (!e) return void (this.empty = !0);
|
|
2297
|
+
this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], t.debug && (this.debug = function() {
|
|
2298
|
+
return console.error(...arguments);
|
|
2299
|
+
}), this.debug(this.pattern, this.globSet);
|
|
2300
|
+
const n = this.globSet.map((u) => this.slashSplit(u));
|
|
2301
|
+
this.globParts = this.preprocess(n), this.debug(this.pattern, this.globParts);
|
|
2302
|
+
let o = this.globParts.map((u, l, i) => {
|
|
2303
|
+
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
2304
|
+
const h = !(u[0] !== "" || u[1] !== "" || u[2] !== "?" && Qt.test(u[2]) || Qt.test(u[3])), a = /^[a-z]:/i.test(u[0]);
|
|
2305
|
+
if (h) return [...u.slice(0, 4), ...u.slice(4).map((s) => this.parse(s))];
|
|
2306
|
+
if (a) return [u[0], ...u.slice(1).map((s) => this.parse(s))];
|
|
2307
|
+
}
|
|
2308
|
+
return u.map((h) => this.parse(h));
|
|
2309
|
+
});
|
|
2310
|
+
if (this.debug(this.pattern, o), this.set = o.filter((u) => u.indexOf(!1) === -1), this.isWindows) for (let u = 0; u < this.set.length; u++) {
|
|
2311
|
+
const l = this.set[u];
|
|
2312
|
+
l[0] === "" && l[1] === "" && this.globParts[u][2] === "?" && typeof l[3] == "string" && /^[a-z]:$/i.test(l[3]) && (l[2] = "?");
|
|
2313
|
+
}
|
|
2314
|
+
this.debug(this.pattern, this.set);
|
|
2315
|
+
}
|
|
2316
|
+
preprocess(e) {
|
|
2317
|
+
if (this.options.noglobstar) for (let n = 0; n < e.length; n++) for (let o = 0; o < e[n].length; o++) e[n][o] === "**" && (e[n][o] = "*");
|
|
2318
|
+
const { optimizationLevel: t = 1 } = this.options;
|
|
2319
|
+
return t >= 2 ? (e = this.firstPhasePreProcess(e), e = this.secondPhasePreProcess(e)) : e = t >= 1 ? this.levelOneOptimize(e) : this.adjascentGlobstarOptimize(e), e;
|
|
2320
|
+
}
|
|
2321
|
+
adjascentGlobstarOptimize(e) {
|
|
2322
|
+
return e.map((t) => {
|
|
2323
|
+
let n = -1;
|
|
2324
|
+
for (; (n = t.indexOf("**", n + 1)) !== -1; ) {
|
|
2325
|
+
let o = n;
|
|
2326
|
+
for (; t[o + 1] === "**"; ) o++;
|
|
2327
|
+
o !== n && t.splice(n, o - n);
|
|
2328
|
+
}
|
|
2329
|
+
return t;
|
|
2330
|
+
});
|
|
2331
|
+
}
|
|
2332
|
+
levelOneOptimize(e) {
|
|
2333
|
+
return e.map((t) => (t = t.reduce((n, o) => {
|
|
2334
|
+
const u = n[n.length - 1];
|
|
2335
|
+
return o === "**" && u === "**" ? n : o === ".." && u && u !== ".." && u !== "." && u !== "**" ? (n.pop(), n) : (n.push(o), n);
|
|
2336
|
+
}, [])).length === 0 ? [""] : t);
|
|
2337
|
+
}
|
|
2338
|
+
levelTwoFileOptimize(e) {
|
|
2339
|
+
Array.isArray(e) || (e = this.slashSplit(e));
|
|
2340
|
+
let t = !1;
|
|
2341
|
+
do {
|
|
2342
|
+
if (t = !1, !this.preserveMultipleSlashes) {
|
|
2343
|
+
for (let o = 1; o < e.length - 1; o++) {
|
|
2344
|
+
const u = e[o];
|
|
2345
|
+
o === 1 && u === "" && e[0] === "" || u !== "." && u !== "" || (t = !0, e.splice(o, 1), o--);
|
|
2346
|
+
}
|
|
2347
|
+
e[0] !== "." || e.length !== 2 || e[1] !== "." && e[1] !== "" || (t = !0, e.pop());
|
|
2348
|
+
}
|
|
2349
|
+
let n = 0;
|
|
2350
|
+
for (; (n = e.indexOf("..", n + 1)) !== -1; ) {
|
|
2351
|
+
const o = e[n - 1];
|
|
2352
|
+
o && o !== "." && o !== ".." && o !== "**" && (t = !0, e.splice(n - 1, 2), n -= 2);
|
|
2353
|
+
}
|
|
2354
|
+
} while (t);
|
|
2355
|
+
return e.length === 0 ? [""] : e;
|
|
2356
|
+
}
|
|
2357
|
+
firstPhasePreProcess(e) {
|
|
2358
|
+
let t = !1;
|
|
2359
|
+
do {
|
|
2360
|
+
t = !1;
|
|
2361
|
+
for (let n of e) {
|
|
2362
|
+
let o = -1;
|
|
2363
|
+
for (; (o = n.indexOf("**", o + 1)) !== -1; ) {
|
|
2364
|
+
let l = o;
|
|
2365
|
+
for (; n[l + 1] === "**"; ) l++;
|
|
2366
|
+
l > o && n.splice(o + 1, l - o);
|
|
2367
|
+
let i = n[o + 1];
|
|
2368
|
+
const h = n[o + 2], a = n[o + 3];
|
|
2369
|
+
if (i !== ".." || !h || h === "." || h === ".." || !a || a === "." || a === "..") continue;
|
|
2370
|
+
t = !0, n.splice(o, 1);
|
|
2371
|
+
const s = n.slice(0);
|
|
2372
|
+
s[o] = "**", e.push(s), o--;
|
|
2373
|
+
}
|
|
2374
|
+
if (!this.preserveMultipleSlashes) {
|
|
2375
|
+
for (let l = 1; l < n.length - 1; l++) {
|
|
2376
|
+
const i = n[l];
|
|
2377
|
+
l === 1 && i === "" && n[0] === "" || i !== "." && i !== "" || (t = !0, n.splice(l, 1), l--);
|
|
2378
|
+
}
|
|
2379
|
+
n[0] !== "." || n.length !== 2 || n[1] !== "." && n[1] !== "" || (t = !0, n.pop());
|
|
2380
|
+
}
|
|
2381
|
+
let u = 0;
|
|
2382
|
+
for (; (u = n.indexOf("..", u + 1)) !== -1; ) {
|
|
2383
|
+
const l = n[u - 1];
|
|
2384
|
+
if (l && l !== "." && l !== ".." && l !== "**") {
|
|
2385
|
+
t = !0;
|
|
2386
|
+
const i = u === 1 && n[u + 1] === "**" ? ["."] : [];
|
|
2387
|
+
n.splice(u - 1, 2, ...i), n.length === 0 && n.push(""), u -= 2;
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
} while (t);
|
|
2392
|
+
return e;
|
|
2393
|
+
}
|
|
2394
|
+
secondPhasePreProcess(e) {
|
|
2395
|
+
for (let t = 0; t < e.length - 1; t++) for (let n = t + 1; n < e.length; n++) {
|
|
2396
|
+
const o = this.partsMatch(e[t], e[n], !this.preserveMultipleSlashes);
|
|
2397
|
+
if (o) {
|
|
2398
|
+
e[t] = [], e[n] = o;
|
|
2399
|
+
break;
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
return e.filter((t) => t.length);
|
|
2403
|
+
}
|
|
2404
|
+
partsMatch(e, t) {
|
|
2405
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], o = 0, u = 0, l = [], i = "";
|
|
2406
|
+
for (; o < e.length && u < t.length; ) if (e[o] === t[u]) l.push(i === "b" ? t[u] : e[o]), o++, u++;
|
|
2407
|
+
else if (n && e[o] === "**" && t[u] === e[o + 1]) l.push(e[o]), o++;
|
|
2408
|
+
else if (n && t[u] === "**" && e[o] === t[u + 1]) l.push(t[u]), u++;
|
|
2409
|
+
else if (e[o] !== "*" || !t[u] || !this.options.dot && t[u].startsWith(".") || t[u] === "**") {
|
|
2410
|
+
if (t[u] !== "*" || !e[o] || !this.options.dot && e[o].startsWith(".") || e[o] === "**" || i === "a") return !1;
|
|
2411
|
+
i = "b", l.push(t[u]), o++, u++;
|
|
2412
|
+
} else {
|
|
2413
|
+
if (i === "b") return !1;
|
|
2414
|
+
i = "a", l.push(e[o]), o++, u++;
|
|
2415
|
+
}
|
|
2416
|
+
return e.length === t.length && l;
|
|
2417
|
+
}
|
|
2418
|
+
parseNegate() {
|
|
2419
|
+
if (this.nonegate) return;
|
|
2420
|
+
const e = this.pattern;
|
|
2421
|
+
let t = !1, n = 0;
|
|
2422
|
+
for (let o = 0; o < e.length && e.charAt(o) === "!"; o++) t = !t, n++;
|
|
2423
|
+
n && (this.pattern = e.slice(n)), this.negate = t;
|
|
2424
|
+
}
|
|
2425
|
+
matchOne(e, t) {
|
|
2426
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
|
|
2427
|
+
const o = this.options;
|
|
2428
|
+
if (this.isWindows) {
|
|
2429
|
+
const d = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), w = !d && e[0] === "" && e[1] === "" && e[2] === "?" && /^[a-z]:$/i.test(e[3]), y = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), p = w ? 3 : d ? 0 : void 0, v = !y && t[0] === "" && t[1] === "" && t[2] === "?" && typeof t[3] == "string" && /^[a-z]:$/i.test(t[3]) ? 3 : y ? 0 : void 0;
|
|
2430
|
+
if (typeof p == "number" && typeof v == "number") {
|
|
2431
|
+
const [A, N] = [e[p], t[v]];
|
|
2432
|
+
A.toLowerCase() === N.toLowerCase() && (t[v] = A, v > p ? t = t.slice(v) : p > v && (e = e.slice(p)));
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
const { optimizationLevel: u = 1 } = this.options;
|
|
2436
|
+
u >= 2 && (e = this.levelTwoFileOptimize(e)), this.debug("matchOne", this, { file: e, pattern: t }), this.debug("matchOne", e.length, t.length);
|
|
2437
|
+
for (var l = 0, i = 0, h = e.length, a = t.length; l < h && i < a; l++, i++) {
|
|
2438
|
+
this.debug("matchOne loop");
|
|
2439
|
+
var s = t[i], f = e[l];
|
|
2440
|
+
if (this.debug(t, s, f), s === !1) return !1;
|
|
2441
|
+
if (s === ae) {
|
|
2442
|
+
this.debug("GLOBSTAR", [t, s, f]);
|
|
2443
|
+
var c = l, g = i + 1;
|
|
2444
|
+
if (g === a) {
|
|
2445
|
+
for (this.debug("** at the end"); l < h; l++) if (e[l] === "." || e[l] === ".." || !o.dot && e[l].charAt(0) === ".") return !1;
|
|
2446
|
+
return !0;
|
|
2447
|
+
}
|
|
2448
|
+
for (; c < h; ) {
|
|
2449
|
+
var m = e[c];
|
|
2450
|
+
if (this.debug(`
|
|
2451
|
+
globstar while`, e, c, t, g, m), this.matchOne(e.slice(c), t.slice(g), n)) return this.debug("globstar found match!", c, h, m), !0;
|
|
2452
|
+
if (m === "." || m === ".." || !o.dot && m.charAt(0) === ".") {
|
|
2453
|
+
this.debug("dot detected!", e, c, t, g);
|
|
2454
|
+
break;
|
|
2455
|
+
}
|
|
2456
|
+
this.debug("globstar swallow a segment, and continue"), c++;
|
|
2457
|
+
}
|
|
2458
|
+
return !(!n || (this.debug(`
|
|
2459
|
+
>>> no match, partial?`, e, c, t, g), c !== h));
|
|
2460
|
+
}
|
|
2461
|
+
let d;
|
|
2462
|
+
if (typeof s == "string" ? (d = f === s, this.debug("string match", s, f, d)) : (d = s.test(f), this.debug("pattern match", s, f, d)), !d) return !1;
|
|
2463
|
+
}
|
|
2464
|
+
if (l === h && i === a) return !0;
|
|
2465
|
+
if (l === h) return n;
|
|
2466
|
+
if (i === a) return l === h - 1 && e[l] === "";
|
|
2467
|
+
throw new Error("wtf?");
|
|
2468
|
+
}
|
|
2469
|
+
braceExpand() {
|
|
2470
|
+
return Lr(this.pattern, this.options);
|
|
2471
|
+
}
|
|
2472
|
+
parse(e) {
|
|
2473
|
+
ze(e);
|
|
2474
|
+
const t = this.options;
|
|
2475
|
+
if (e === "**") return ae;
|
|
2476
|
+
if (e === "") return "";
|
|
2477
|
+
let n, o = null;
|
|
2478
|
+
(n = e.match(Jn)) ? o = t.dot ? Kn : Yn : (n = e.match(Mn)) ? o = (t.nocase ? t.dot ? Wn : qn : t.dot ? Bn : Vn)(n[1]) : (n = e.match(Qn)) ? o = (t.nocase ? t.dot ? es : Dn : t.dot ? ts : rs)(n) : (n = e.match(Xn)) ? o = t.dot ? zn : Gn : (n = e.match(Hn)) && (o = Zn);
|
|
2479
|
+
const u = He.fromGlob(e, this.options).toMMPattern();
|
|
2480
|
+
return o && typeof u == "object" && Reflect.defineProperty(u, "test", { value: o }), u;
|
|
2481
|
+
}
|
|
2482
|
+
makeRe() {
|
|
2483
|
+
if (this.regexp || this.regexp === !1) return this.regexp;
|
|
2484
|
+
const e = this.set;
|
|
2485
|
+
if (!e.length) return this.regexp = !1, this.regexp;
|
|
2486
|
+
const t = this.options, n = t.noglobstar ? "[^/]*?" : t.dot ? "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?" : "(?:(?!(?:\\/|^)\\.).)*?", o = new Set(t.nocase ? ["i"] : []);
|
|
2487
|
+
let u = e.map((h) => {
|
|
2488
|
+
const a = h.map((s) => {
|
|
2489
|
+
if (s instanceof RegExp) for (const f of s.flags.split("")) o.add(f);
|
|
2490
|
+
return typeof s == "string" ? s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") : s === ae ? ae : s._src;
|
|
2491
|
+
});
|
|
2492
|
+
return a.forEach((s, f) => {
|
|
2493
|
+
const c = a[f + 1], g = a[f - 1];
|
|
2494
|
+
s === ae && g !== ae && (g === void 0 ? c !== void 0 && c !== ae ? a[f + 1] = "(?:\\/|" + n + "\\/)?" + c : a[f] = n : c === void 0 ? a[f - 1] = g + "(?:\\/|" + n + ")?" : c !== ae && (a[f - 1] = g + "(?:\\/|\\/" + n + "\\/)" + c, a[f + 1] = ae));
|
|
2495
|
+
}), a.filter((s) => s !== ae).join("/");
|
|
2496
|
+
}).join("|");
|
|
2497
|
+
const [l, i] = e.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
2498
|
+
u = "^" + l + u + i + "$", this.negate && (u = "^(?!" + u + ").+$");
|
|
2499
|
+
try {
|
|
2500
|
+
this.regexp = new RegExp(u, [...o].join(""));
|
|
2501
|
+
} catch {
|
|
2502
|
+
this.regexp = !1;
|
|
2503
|
+
}
|
|
2504
|
+
return this.regexp;
|
|
2505
|
+
}
|
|
2506
|
+
slashSplit(e) {
|
|
2507
|
+
return this.preserveMultipleSlashes ? e.split("/") : this.isWindows && /^\/\/[^\/]+/.test(e) ? ["", ...e.split(/\/+/)] : e.split(/\/+/);
|
|
2508
|
+
}
|
|
2509
|
+
match(e) {
|
|
2510
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.partial;
|
|
2511
|
+
if (this.debug("match", e, this.pattern), this.comment) return !1;
|
|
2512
|
+
if (this.empty) return e === "";
|
|
2513
|
+
if (e === "/" && t) return !0;
|
|
2514
|
+
const n = this.options;
|
|
2515
|
+
this.isWindows && (e = e.split("\\").join("/"));
|
|
2516
|
+
const o = this.slashSplit(e);
|
|
2517
|
+
this.debug(this.pattern, "split", o);
|
|
2518
|
+
const u = this.set;
|
|
2519
|
+
this.debug(this.pattern, "set", u);
|
|
2520
|
+
let l = o[o.length - 1];
|
|
2521
|
+
if (!l) for (let i = o.length - 2; !l && i >= 0; i--) l = o[i];
|
|
2522
|
+
for (let i = 0; i < u.length; i++) {
|
|
2523
|
+
const h = u[i];
|
|
2524
|
+
let a = o;
|
|
2525
|
+
if (n.matchBase && h.length === 1 && (a = [l]), this.matchOne(a, h, t)) return !!n.flipNegate || !this.negate;
|
|
2526
|
+
}
|
|
2527
|
+
return !n.flipNegate && this.negate;
|
|
2528
|
+
}
|
|
2529
|
+
static defaults(e) {
|
|
2530
|
+
return ee.defaults(e).Minimatch;
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
function It(r) {
|
|
2534
|
+
const e = new Error(`${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""}Invalid response: ${r.status} ${r.statusText}`);
|
|
2535
|
+
return e.status = r.status, e.response = r, e;
|
|
2536
|
+
}
|
|
2537
|
+
function J(r, e) {
|
|
2538
|
+
const { status: t } = e;
|
|
2539
|
+
if (t === 401 && r.digest) return e;
|
|
2540
|
+
if (t >= 400) throw It(e);
|
|
2541
|
+
return e;
|
|
2542
|
+
}
|
|
2543
|
+
function Ee(r, e) {
|
|
2544
|
+
return arguments.length > 2 && arguments[2] !== void 0 && arguments[2] ? { data: e, headers: r.headers ? Cn(r.headers) : {}, status: r.status, statusText: r.statusText } : e;
|
|
2545
|
+
}
|
|
2546
|
+
ee.AST = He, ee.Minimatch = Ze, ee.escape = function(r) {
|
|
2547
|
+
let { windowsPathsNoEscape: e = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2548
|
+
return e ? r.replace(/[?*()[\]]/g, "[$&]") : r.replace(/[?*()[\]\\]/g, "\\$&");
|
|
2549
|
+
}, ee.unescape = Se;
|
|
2550
|
+
const ns = (Dt = function(r, e, t) {
|
|
2551
|
+
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
2552
|
+
const o = Z({ url: V(r.remoteURL, M(e)), method: "COPY", headers: { Destination: V(r.remoteURL, M(t)), Overwrite: n.overwrite === !1 ? "F" : "T", Depth: n.shallow ? "0" : "infinity" } }, r, n);
|
|
2553
|
+
return l = function(i) {
|
|
2554
|
+
J(r, i);
|
|
2555
|
+
}, (u = H(o, r)) && u.then || (u = Promise.resolve(u)), l ? u.then(l) : u;
|
|
2556
|
+
var u, l;
|
|
2557
|
+
}, function() {
|
|
2558
|
+
for (var r = [], e = 0; e < arguments.length; e++) r[e] = arguments[e];
|
|
2559
|
+
try {
|
|
2560
|
+
return Promise.resolve(Dt.apply(this, r));
|
|
2561
|
+
} catch (t) {
|
|
2562
|
+
return Promise.reject(t);
|
|
2563
|
+
}
|
|
2564
|
+
});
|
|
2565
|
+
var Dt, St = L(635), ss = L(829), ce = L.n(ss), Te = function(r) {
|
|
2566
|
+
return r.Array = "array", r.Object = "object", r.Original = "original", r;
|
|
2567
|
+
}(Te || {});
|
|
2568
|
+
function Me(r, e) {
|
|
2569
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Te.Original;
|
|
2570
|
+
const n = ce().get(r, e);
|
|
2571
|
+
return t === "array" && Array.isArray(n) === !1 ? [n] : t === "object" && Array.isArray(n) ? n[0] : n;
|
|
2572
|
+
}
|
|
2573
|
+
function ke(r) {
|
|
2574
|
+
return new Promise((e) => {
|
|
2575
|
+
e(function(t) {
|
|
2576
|
+
const { multistatus: n } = t;
|
|
2577
|
+
if (n === "") return { multistatus: { response: [] } };
|
|
2578
|
+
if (!n) throw new Error("Invalid response: No root multistatus found");
|
|
2579
|
+
const o = { multistatus: Array.isArray(n) ? n[0] : n };
|
|
2580
|
+
return ce().set(o, "multistatus.response", Me(o, "multistatus.response", Te.Array)), ce().set(o, "multistatus.response", ce().get(o, "multistatus.response").map((u) => function(l) {
|
|
2581
|
+
const i = Object.assign({}, l);
|
|
2582
|
+
return i.status ? ce().set(i, "status", Me(i, "status", Te.Object)) : (ce().set(i, "propstat", Me(i, "propstat", Te.Object)), ce().set(i, "propstat.prop", Me(i, "propstat.prop", Te.Object))), i;
|
|
2583
|
+
}(u))), o;
|
|
2584
|
+
}(new St.XMLParser({ allowBooleanAttributes: !0, attributeNamePrefix: "", textNodeName: "text", ignoreAttributes: !1, removeNSPrefix: !0, numberParseOptions: { hex: !0, leadingZeros: !1 }, attributeValueProcessor: (t, n, o) => n === "true" || n === "false" ? n === "true" : n, tagValueProcessor(t, n, o) {
|
|
2585
|
+
if (!o.endsWith("propstat.prop.displayname")) return n;
|
|
2586
|
+
} }).parse(r)));
|
|
2587
|
+
});
|
|
2588
|
+
}
|
|
2589
|
+
function Ye(r, e) {
|
|
2590
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
|
|
2591
|
+
const { getlastmodified: n = null, getcontentlength: o = "0", resourcetype: u = null, getcontenttype: l = null, getetag: i = null } = r, h = u && typeof u == "object" && u.collection !== void 0 ? "directory" : "file", a = { filename: e, basename: qe().basename(e), lastmod: n, size: parseInt(o, 10), type: h, etag: typeof i == "string" ? i.replace(/"/g, "") : null };
|
|
2592
|
+
return h === "file" && (a.mime = l && typeof l == "string" ? l.split(";")[0] : ""), t && (r.displayname !== void 0 && (r.displayname = String(r.displayname)), a.props = r), a;
|
|
2593
|
+
}
|
|
2594
|
+
function kr(r, e) {
|
|
2595
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], n = null;
|
|
2596
|
+
try {
|
|
2597
|
+
r.multistatus.response[0].propstat && (n = r.multistatus.response[0]);
|
|
2598
|
+
} catch {
|
|
2599
|
+
}
|
|
2600
|
+
if (!n) throw new Error("Failed getting item stat: bad response");
|
|
2601
|
+
const { propstat: { prop: o, status: u } } = n, [l, i, h] = u.split(" ", 3), a = parseInt(i, 10);
|
|
2602
|
+
if (a >= 400) {
|
|
2603
|
+
const s = new Error(`Invalid response: ${a} ${h}`);
|
|
2604
|
+
throw s.status = a, s;
|
|
2605
|
+
}
|
|
2606
|
+
return Ye(o, Re(e), t);
|
|
2607
|
+
}
|
|
2608
|
+
function Ur(r) {
|
|
2609
|
+
switch (String(r)) {
|
|
2610
|
+
case "-3":
|
|
2611
|
+
return "unlimited";
|
|
2612
|
+
case "-2":
|
|
2613
|
+
case "-1":
|
|
2614
|
+
return "unknown";
|
|
2615
|
+
default:
|
|
2616
|
+
return parseInt(String(r), 10);
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
function rt(r, e, t) {
|
|
2620
|
+
return t ? e ? e(r) : r : (r && r.then || (r = Promise.resolve(r)), e ? r.then(e) : r);
|
|
2621
|
+
}
|
|
2622
|
+
const Ft = /* @__PURE__ */ function(r) {
|
|
2623
|
+
return function() {
|
|
2624
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
2625
|
+
try {
|
|
2626
|
+
return Promise.resolve(r.apply(this, e));
|
|
2627
|
+
} catch (n) {
|
|
2628
|
+
return Promise.reject(n);
|
|
2629
|
+
}
|
|
2630
|
+
};
|
|
2631
|
+
}(function(r, e) {
|
|
2632
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2633
|
+
const { details: n = !1 } = t, o = Z({ url: V(r.remoteURL, M(e)), method: "PROPFIND", headers: { Accept: "text/plain,application/xml", Depth: "0" } }, r, t);
|
|
2634
|
+
return rt(H(o, r), function(u) {
|
|
2635
|
+
return J(r, u), rt(u.text(), function(l) {
|
|
2636
|
+
return rt(ke(l), function(i) {
|
|
2637
|
+
const h = kr(i, e, n);
|
|
2638
|
+
return Ee(u, h, n);
|
|
2639
|
+
});
|
|
2640
|
+
});
|
|
2641
|
+
});
|
|
2642
|
+
});
|
|
2643
|
+
function _r(r, e, t) {
|
|
2644
|
+
return t ? e ? e(r) : r : (r && r.then || (r = Promise.resolve(r)), e ? r.then(e) : r);
|
|
2645
|
+
}
|
|
2646
|
+
const is = Mr(function(r, e) {
|
|
2647
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2648
|
+
const n = function(u) {
|
|
2649
|
+
if (!u || u === "/") return [];
|
|
2650
|
+
let l = u;
|
|
2651
|
+
const i = [];
|
|
2652
|
+
do
|
|
2653
|
+
i.push(l), l = qe().dirname(l);
|
|
2654
|
+
while (l && l !== "/");
|
|
2655
|
+
return i;
|
|
2656
|
+
}(Re(e));
|
|
2657
|
+
n.sort((u, l) => u.length > l.length ? 1 : l.length > u.length ? -1 : 0);
|
|
2658
|
+
let o = !1;
|
|
2659
|
+
return function(u, l, i) {
|
|
2660
|
+
if (typeof u[tr] == "function") {
|
|
2661
|
+
let d = function(w) {
|
|
2662
|
+
try {
|
|
2663
|
+
for (; !(h = f.next()).done; ) if ((w = l(h.value)) && w.then) {
|
|
2664
|
+
if (!rr(w)) return void w.then(d, s || (s = ne.bind(null, a = new Oe(), 2)));
|
|
2665
|
+
w = w.v;
|
|
2666
|
+
}
|
|
2667
|
+
a ? ne(a, 1, w) : a = w;
|
|
2668
|
+
} catch (y) {
|
|
2669
|
+
ne(a || (a = new Oe()), 2, y);
|
|
2670
|
+
}
|
|
2671
|
+
};
|
|
2672
|
+
var h, a, s, f = u[tr]();
|
|
2673
|
+
if (d(), f.return) {
|
|
2674
|
+
var c = function(w) {
|
|
2675
|
+
try {
|
|
2676
|
+
h.done || f.return();
|
|
2677
|
+
} catch {
|
|
2678
|
+
}
|
|
2679
|
+
return w;
|
|
2680
|
+
};
|
|
2681
|
+
if (a && a.then) return a.then(c, function(w) {
|
|
2682
|
+
throw c(w);
|
|
2683
|
+
});
|
|
2684
|
+
c();
|
|
2685
|
+
}
|
|
2686
|
+
return a;
|
|
2687
|
+
}
|
|
2688
|
+
if (!("length" in u)) throw new TypeError("Object is not iterable");
|
|
2689
|
+
for (var g = [], m = 0; m < u.length; m++) g.push(u[m]);
|
|
2690
|
+
return function(d, w, y) {
|
|
2691
|
+
var p, v, A = -1;
|
|
2692
|
+
return function N(b) {
|
|
2693
|
+
try {
|
|
2694
|
+
for (; ++A < d.length && (!y || !y()); ) if ((b = w(A)) && b.then) {
|
|
2695
|
+
if (!rr(b)) return void b.then(N, v || (v = ne.bind(null, p = new Oe(), 2)));
|
|
2696
|
+
b = b.v;
|
|
2697
|
+
}
|
|
2698
|
+
p ? ne(p, 1, b) : p = b;
|
|
2699
|
+
} catch (E) {
|
|
2700
|
+
ne(p || (p = new Oe()), 2, E);
|
|
2701
|
+
}
|
|
2702
|
+
}(), p;
|
|
2703
|
+
}(g, function(d) {
|
|
2704
|
+
return l(g[d]);
|
|
2705
|
+
}, i);
|
|
2706
|
+
}(n, function(u) {
|
|
2707
|
+
return l = function() {
|
|
2708
|
+
return function(h, a) {
|
|
2709
|
+
try {
|
|
2710
|
+
var s = _r(Ft(r, u), function(f) {
|
|
2711
|
+
if (f.type !== "directory") throw new Error(`Path includes a file: ${e}`);
|
|
2712
|
+
});
|
|
2713
|
+
} catch (f) {
|
|
2714
|
+
return a(f);
|
|
2715
|
+
}
|
|
2716
|
+
return s && s.then ? s.then(void 0, a) : s;
|
|
2717
|
+
}(0, function(h) {
|
|
2718
|
+
const a = h;
|
|
2719
|
+
return function() {
|
|
2720
|
+
if (a.status === 404) return o = !0, er(Pt(r, u, { ...t, recursive: !1 }));
|
|
2721
|
+
throw h;
|
|
2722
|
+
}();
|
|
2723
|
+
});
|
|
2724
|
+
}, (i = function() {
|
|
2725
|
+
if (o) return er(Pt(r, u, { ...t, recursive: !1 }));
|
|
2726
|
+
}()) && i.then ? i.then(l) : l();
|
|
2727
|
+
var l, i;
|
|
2728
|
+
}, function() {
|
|
2729
|
+
return !1;
|
|
2730
|
+
});
|
|
2731
|
+
});
|
|
2732
|
+
function Mr(r) {
|
|
2733
|
+
return function() {
|
|
2734
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
2735
|
+
try {
|
|
2736
|
+
return Promise.resolve(r.apply(this, e));
|
|
2737
|
+
} catch (n) {
|
|
2738
|
+
return Promise.reject(n);
|
|
2739
|
+
}
|
|
2740
|
+
};
|
|
2741
|
+
}
|
|
2742
|
+
function os() {
|
|
2743
|
+
}
|
|
2744
|
+
function er(r, e) {
|
|
2745
|
+
return r && r.then ? r.then(os) : Promise.resolve();
|
|
2746
|
+
}
|
|
2747
|
+
const tr = typeof Symbol < "u" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
2748
|
+
function ne(r, e, t) {
|
|
2749
|
+
if (!r.s) {
|
|
2750
|
+
if (t instanceof Oe) {
|
|
2751
|
+
if (!t.s) return void (t.o = ne.bind(null, r, e));
|
|
2752
|
+
1 & e && (e = t.s), t = t.v;
|
|
2753
|
+
}
|
|
2754
|
+
if (t && t.then) return void t.then(ne.bind(null, r, e), ne.bind(null, r, 2));
|
|
2755
|
+
r.s = e, r.v = t;
|
|
2756
|
+
const n = r.o;
|
|
2757
|
+
n && n(r);
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
const Oe = function() {
|
|
2761
|
+
function r() {
|
|
2762
|
+
}
|
|
2763
|
+
return r.prototype.then = function(e, t) {
|
|
2764
|
+
const n = new r(), o = this.s;
|
|
2765
|
+
if (o) {
|
|
2766
|
+
const u = 1 & o ? e : t;
|
|
2767
|
+
if (u) {
|
|
2768
|
+
try {
|
|
2769
|
+
ne(n, 1, u(this.v));
|
|
2770
|
+
} catch (l) {
|
|
2771
|
+
ne(n, 2, l);
|
|
2772
|
+
}
|
|
2773
|
+
return n;
|
|
2774
|
+
}
|
|
2775
|
+
return this;
|
|
2776
|
+
}
|
|
2777
|
+
return this.o = function(u) {
|
|
2778
|
+
try {
|
|
2779
|
+
const l = u.v;
|
|
2780
|
+
1 & u.s ? ne(n, 1, e ? e(l) : l) : t ? ne(n, 1, t(l)) : ne(n, 2, l);
|
|
2781
|
+
} catch (l) {
|
|
2782
|
+
ne(n, 2, l);
|
|
2783
|
+
}
|
|
2784
|
+
}, n;
|
|
2785
|
+
}, r;
|
|
2786
|
+
}();
|
|
2787
|
+
function rr(r) {
|
|
2788
|
+
return r instanceof Oe && 1 & r.s;
|
|
2789
|
+
}
|
|
2790
|
+
const Pt = Mr(function(r, e) {
|
|
2791
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2792
|
+
if (t.recursive === !0) return is(r, e, t);
|
|
2793
|
+
const n = Z({ url: V(r.remoteURL, (o = M(e), o.endsWith("/") ? o : o + "/")), method: "MKCOL" }, r, t);
|
|
2794
|
+
var o;
|
|
2795
|
+
return _r(H(n, r), function(u) {
|
|
2796
|
+
J(r, u);
|
|
2797
|
+
});
|
|
2798
|
+
});
|
|
2799
|
+
var as = L(388), nr = L.n(as);
|
|
2800
|
+
const us = /* @__PURE__ */ function(r) {
|
|
2801
|
+
return function() {
|
|
2802
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
2803
|
+
try {
|
|
2804
|
+
return Promise.resolve(r.apply(this, e));
|
|
2805
|
+
} catch (n) {
|
|
2806
|
+
return Promise.reject(n);
|
|
2807
|
+
}
|
|
2808
|
+
};
|
|
2809
|
+
}(function(r, e) {
|
|
2810
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2811
|
+
const n = {};
|
|
2812
|
+
if (typeof t.range == "object" && typeof t.range.start == "number") {
|
|
2813
|
+
let i = `bytes=${t.range.start}-`;
|
|
2814
|
+
typeof t.range.end == "number" && (i = `${i}${t.range.end}`), n.Range = i;
|
|
2815
|
+
}
|
|
2816
|
+
const o = Z({ url: V(r.remoteURL, M(e)), method: "GET", headers: n }, r, t);
|
|
2817
|
+
return l = function(i) {
|
|
2818
|
+
if (J(r, i), n.Range && i.status !== 206) {
|
|
2819
|
+
const h = new Error(`Invalid response code for partial request: ${i.status}`);
|
|
2820
|
+
throw h.status = i.status, h;
|
|
2821
|
+
}
|
|
2822
|
+
return t.callback && setTimeout(() => {
|
|
2823
|
+
t.callback(i);
|
|
2824
|
+
}, 0), i.body;
|
|
2825
|
+
}, (u = H(o, r)) && u.then || (u = Promise.resolve(u)), l ? u.then(l) : u;
|
|
2826
|
+
var u, l;
|
|
2827
|
+
}), ls = () => {
|
|
2828
|
+
}, cs = /* @__PURE__ */ function(r) {
|
|
2829
|
+
return function() {
|
|
2830
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
2831
|
+
try {
|
|
2832
|
+
return Promise.resolve(r.apply(this, e));
|
|
2833
|
+
} catch (n) {
|
|
2834
|
+
return Promise.reject(n);
|
|
2835
|
+
}
|
|
2836
|
+
};
|
|
2837
|
+
}(function(r, e, t) {
|
|
2838
|
+
t.url || (t.url = V(r.remoteURL, M(e)));
|
|
2839
|
+
const n = Z(t, r, {});
|
|
2840
|
+
return u = function(l) {
|
|
2841
|
+
return J(r, l), l;
|
|
2842
|
+
}, (o = H(n, r)) && o.then || (o = Promise.resolve(o)), u ? o.then(u) : o;
|
|
2843
|
+
var o, u;
|
|
2844
|
+
}), hs = /* @__PURE__ */ function(r) {
|
|
2845
|
+
return function() {
|
|
2846
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
2847
|
+
try {
|
|
2848
|
+
return Promise.resolve(r.apply(this, e));
|
|
2849
|
+
} catch (n) {
|
|
2850
|
+
return Promise.reject(n);
|
|
2851
|
+
}
|
|
2852
|
+
};
|
|
2853
|
+
}(function(r, e) {
|
|
2854
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2855
|
+
const n = Z({ url: V(r.remoteURL, M(e)), method: "DELETE" }, r, t);
|
|
2856
|
+
return u = function(l) {
|
|
2857
|
+
J(r, l);
|
|
2858
|
+
}, (o = H(n, r)) && o.then || (o = Promise.resolve(o)), u ? o.then(u) : o;
|
|
2859
|
+
var o, u;
|
|
2860
|
+
}), fs = /* @__PURE__ */ function(r) {
|
|
2861
|
+
return function() {
|
|
2862
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
2863
|
+
try {
|
|
2864
|
+
return Promise.resolve(r.apply(this, e));
|
|
2865
|
+
} catch (n) {
|
|
2866
|
+
return Promise.reject(n);
|
|
2867
|
+
}
|
|
2868
|
+
};
|
|
2869
|
+
}(function(r, e) {
|
|
2870
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2871
|
+
return function(n, o) {
|
|
2872
|
+
try {
|
|
2873
|
+
var u = (l = Ft(r, e, t), i = function() {
|
|
2874
|
+
return !0;
|
|
2875
|
+
}, h ? i ? i(l) : l : (l && l.then || (l = Promise.resolve(l)), i ? l.then(i) : l));
|
|
2876
|
+
} catch (a) {
|
|
2877
|
+
return o(a);
|
|
2878
|
+
}
|
|
2879
|
+
var l, i, h;
|
|
2880
|
+
return u && u.then ? u.then(void 0, o) : u;
|
|
2881
|
+
}(0, function(n) {
|
|
2882
|
+
if (n.status === 404) return !1;
|
|
2883
|
+
throw n;
|
|
2884
|
+
});
|
|
2885
|
+
});
|
|
2886
|
+
function nt(r, e, t) {
|
|
2887
|
+
return t ? e ? e(r) : r : (r && r.then || (r = Promise.resolve(r)), e ? r.then(e) : r);
|
|
2888
|
+
}
|
|
2889
|
+
const ps = /* @__PURE__ */ function(r) {
|
|
2890
|
+
return function() {
|
|
2891
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
2892
|
+
try {
|
|
2893
|
+
return Promise.resolve(r.apply(this, e));
|
|
2894
|
+
} catch (n) {
|
|
2895
|
+
return Promise.reject(n);
|
|
2896
|
+
}
|
|
2897
|
+
};
|
|
2898
|
+
}(function(r, e) {
|
|
2899
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2900
|
+
const n = Z({ url: V(r.remoteURL, M(e), "/"), method: "PROPFIND", headers: { Accept: "text/plain,application/xml", Depth: t.deep ? "infinity" : "1" } }, r, t);
|
|
2901
|
+
return nt(H(n, r), function(o) {
|
|
2902
|
+
return J(r, o), nt(o.text(), function(u) {
|
|
2903
|
+
if (!u) throw new Error("Failed parsing directory contents: Empty response");
|
|
2904
|
+
return nt(ke(u), function(l) {
|
|
2905
|
+
const i = qt(e);
|
|
2906
|
+
let h = function(a, s, f) {
|
|
2907
|
+
let c = arguments.length > 3 && arguments[3] !== void 0 && arguments[3], g = arguments.length > 4 && arguments[4] !== void 0 && arguments[4];
|
|
2908
|
+
const m = qe().join(s, "/"), { multistatus: { response: d } } = a, w = d.map((y) => {
|
|
2909
|
+
const p = function(A) {
|
|
2910
|
+
try {
|
|
2911
|
+
return A.replace(/^https?:\/\/[^\/]+/, "");
|
|
2912
|
+
} catch (N) {
|
|
2913
|
+
throw new se(N, "Failed normalising HREF");
|
|
2914
|
+
}
|
|
2915
|
+
}(y.href), { propstat: { prop: v } } = y;
|
|
2916
|
+
return Ye(v, m === "/" ? decodeURIComponent(Re(p)) : Re(qe().relative(decodeURIComponent(m), decodeURIComponent(p))), c);
|
|
2917
|
+
});
|
|
2918
|
+
return g ? w : w.filter((y) => y.basename && (y.type === "file" || y.filename !== f.replace(/\/$/, "")));
|
|
2919
|
+
}(l, qt(r.remoteBasePath || r.remotePath), i, t.details, t.includeSelf);
|
|
2920
|
+
return t.glob && (h = function(a, s) {
|
|
2921
|
+
return a.filter((f) => ee(f.filename, s, { matchBase: !0 }));
|
|
2922
|
+
}(h, t.glob)), Ee(o, h, t.details);
|
|
2923
|
+
});
|
|
2924
|
+
});
|
|
2925
|
+
});
|
|
2926
|
+
});
|
|
2927
|
+
function jt(r) {
|
|
2928
|
+
return function() {
|
|
2929
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
2930
|
+
try {
|
|
2931
|
+
return Promise.resolve(r.apply(this, e));
|
|
2932
|
+
} catch (n) {
|
|
2933
|
+
return Promise.reject(n);
|
|
2934
|
+
}
|
|
2935
|
+
};
|
|
2936
|
+
}
|
|
2937
|
+
const gs = jt(function(r, e) {
|
|
2938
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2939
|
+
const n = Z({ url: V(r.remoteURL, M(e)), method: "GET", headers: { Accept: "text/plain" }, transformResponse: [bs] }, r, t);
|
|
2940
|
+
return Je(H(n, r), function(o) {
|
|
2941
|
+
return J(r, o), Je(o.text(), function(u) {
|
|
2942
|
+
return Ee(o, u, t.details);
|
|
2943
|
+
});
|
|
2944
|
+
});
|
|
2945
|
+
});
|
|
2946
|
+
function Je(r, e, t) {
|
|
2947
|
+
return t ? e ? e(r) : r : (r && r.then || (r = Promise.resolve(r)), e ? r.then(e) : r);
|
|
2948
|
+
}
|
|
2949
|
+
const ds = jt(function(r, e) {
|
|
2950
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2951
|
+
const n = Z({ url: V(r.remoteURL, M(e)), method: "GET" }, r, t);
|
|
2952
|
+
return Je(H(n, r), function(o) {
|
|
2953
|
+
let u;
|
|
2954
|
+
return J(r, o), function(l, i) {
|
|
2955
|
+
var h = l();
|
|
2956
|
+
return h && h.then ? h.then(i) : i();
|
|
2957
|
+
}(function() {
|
|
2958
|
+
return Je(o.arrayBuffer(), function(l) {
|
|
2959
|
+
u = l;
|
|
2960
|
+
});
|
|
2961
|
+
}, function() {
|
|
2962
|
+
return Ee(o, u, t.details);
|
|
2963
|
+
});
|
|
2964
|
+
});
|
|
2965
|
+
}), ms = jt(function(r, e) {
|
|
2966
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2967
|
+
const { format: n = "binary" } = t;
|
|
2968
|
+
if (n !== "binary" && n !== "text") throw new se({ info: { code: pe.InvalidOutputFormat } }, `Invalid output format: ${n}`);
|
|
2969
|
+
return n === "text" ? gs(r, e, t) : ds(r, e, t);
|
|
2970
|
+
}), bs = (r) => r;
|
|
2971
|
+
function ys(r) {
|
|
2972
|
+
return new St.XMLBuilder({ attributeNamePrefix: "@_", format: !0, ignoreAttributes: !1, suppressEmptyNode: !0 }).build(Vr({ lockinfo: { "@_xmlns:d": "DAV:", lockscope: { exclusive: {} }, locktype: { write: {} }, owner: { href: r } } }, "d"));
|
|
2973
|
+
}
|
|
2974
|
+
function Vr(r, e) {
|
|
2975
|
+
const t = { ...r };
|
|
2976
|
+
for (const n in t) t.hasOwnProperty(n) && (t[n] && typeof t[n] == "object" && n.indexOf(":") === -1 ? (t[`${e}:${n}`] = Vr(t[n], e), delete t[n]) : /^@_/.test(n) === !1 && (t[`${e}:${n}`] = t[n], delete t[n]));
|
|
2977
|
+
return t;
|
|
2978
|
+
}
|
|
2979
|
+
function Et(r, e, t) {
|
|
2980
|
+
return t ? e ? e(r) : r : (r && r.then || (r = Promise.resolve(r)), e ? r.then(e) : r);
|
|
2981
|
+
}
|
|
2982
|
+
function Br(r) {
|
|
2983
|
+
return function() {
|
|
2984
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
2985
|
+
try {
|
|
2986
|
+
return Promise.resolve(r.apply(this, e));
|
|
2987
|
+
} catch (n) {
|
|
2988
|
+
return Promise.reject(n);
|
|
2989
|
+
}
|
|
2990
|
+
};
|
|
2991
|
+
}
|
|
2992
|
+
const vs = Br(function(r, e, t) {
|
|
2993
|
+
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
2994
|
+
const o = Z({ url: V(r.remoteURL, M(e)), method: "UNLOCK", headers: { "Lock-Token": t } }, r, n);
|
|
2995
|
+
return Et(H(o, r), function(u) {
|
|
2996
|
+
if (J(r, u), u.status !== 204 && u.status !== 200) throw It(u);
|
|
2997
|
+
});
|
|
2998
|
+
}), ws = Br(function(r, e) {
|
|
2999
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3000
|
+
const { refreshToken: n, timeout: o = Ns } = t, u = { Accept: "text/plain,application/xml", Timeout: o };
|
|
3001
|
+
n && (u.If = n);
|
|
3002
|
+
const l = Z({ url: V(r.remoteURL, M(e)), method: "LOCK", headers: u, data: ys(r.contactHref) }, r, t);
|
|
3003
|
+
return Et(H(l, r), function(i) {
|
|
3004
|
+
return J(r, i), Et(i.text(), function(h) {
|
|
3005
|
+
const a = (c = h, new St.XMLParser({ removeNSPrefix: !0, parseAttributeValue: !0, parseTagValue: !0 }).parse(c)), s = ce().get(a, "prop.lockdiscovery.activelock.locktoken.href"), f = ce().get(a, "prop.lockdiscovery.activelock.timeout");
|
|
3006
|
+
var c;
|
|
3007
|
+
if (!s) throw It(i, "No lock token received: ");
|
|
3008
|
+
return { token: s, serverTimeout: f };
|
|
3009
|
+
});
|
|
3010
|
+
});
|
|
3011
|
+
}), Ns = "Infinite, Second-4100000000";
|
|
3012
|
+
function st(r, e, t) {
|
|
3013
|
+
return t ? e ? e(r) : r : (r && r.then || (r = Promise.resolve(r)), e ? r.then(e) : r);
|
|
3014
|
+
}
|
|
3015
|
+
const xs = /* @__PURE__ */ function(r) {
|
|
3016
|
+
return function() {
|
|
3017
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
3018
|
+
try {
|
|
3019
|
+
return Promise.resolve(r.apply(this, e));
|
|
3020
|
+
} catch (n) {
|
|
3021
|
+
return Promise.reject(n);
|
|
3022
|
+
}
|
|
3023
|
+
};
|
|
3024
|
+
}(function(r) {
|
|
3025
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3026
|
+
const t = e.path || "/", n = Z({ url: V(r.remoteURL, t), method: "PROPFIND", headers: { Accept: "text/plain,application/xml", Depth: "0" } }, r, e);
|
|
3027
|
+
return st(H(n, r), function(o) {
|
|
3028
|
+
return J(r, o), st(o.text(), function(u) {
|
|
3029
|
+
return st(ke(u), function(l) {
|
|
3030
|
+
const i = function(h) {
|
|
3031
|
+
try {
|
|
3032
|
+
const [a] = h.multistatus.response, { propstat: { prop: { "quota-used-bytes": s, "quota-available-bytes": f } } } = a;
|
|
3033
|
+
return s !== void 0 && f !== void 0 ? { used: parseInt(String(s), 10), available: Ur(f) } : null;
|
|
3034
|
+
} catch {
|
|
3035
|
+
}
|
|
3036
|
+
return null;
|
|
3037
|
+
}(l);
|
|
3038
|
+
return Ee(o, i, e.details);
|
|
3039
|
+
});
|
|
3040
|
+
});
|
|
3041
|
+
});
|
|
3042
|
+
});
|
|
3043
|
+
function it(r, e, t) {
|
|
3044
|
+
return t ? e ? e(r) : r : (r && r.then || (r = Promise.resolve(r)), e ? r.then(e) : r);
|
|
3045
|
+
}
|
|
3046
|
+
const Ps = /* @__PURE__ */ function(r) {
|
|
3047
|
+
return function() {
|
|
3048
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
3049
|
+
try {
|
|
3050
|
+
return Promise.resolve(r.apply(this, e));
|
|
3051
|
+
} catch (n) {
|
|
3052
|
+
return Promise.reject(n);
|
|
3053
|
+
}
|
|
3054
|
+
};
|
|
3055
|
+
}(function(r, e) {
|
|
3056
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3057
|
+
const { details: n = !1 } = t, o = Z({ url: V(r.remoteURL, M(e)), method: "SEARCH", headers: { Accept: "text/plain,application/xml", "Content-Type": r.headers["Content-Type"] || "application/xml; charset=utf-8" } }, r, t);
|
|
3058
|
+
return it(H(o, r), function(u) {
|
|
3059
|
+
return J(r, u), it(u.text(), function(l) {
|
|
3060
|
+
return it(ke(l), function(i) {
|
|
3061
|
+
const h = function(a, s, f) {
|
|
3062
|
+
const c = { truncated: !1, results: [] };
|
|
3063
|
+
return c.truncated = a.multistatus.response.some((g) => {
|
|
3064
|
+
var m, d;
|
|
3065
|
+
return ((d = (g.status || ((m = g.propstat) == null ? void 0 : m.status)).split(" ", 3)) == null ? void 0 : d[1]) === "507" && g.href.replace(/\/$/, "").endsWith(M(s).replace(/\/$/, ""));
|
|
3066
|
+
}), a.multistatus.response.forEach((g) => {
|
|
3067
|
+
if (g.propstat === void 0) return;
|
|
3068
|
+
const m = g.href.split("/").map(decodeURIComponent).join("/");
|
|
3069
|
+
c.results.push(Ye(g.propstat.prop, m, f));
|
|
3070
|
+
}), c;
|
|
3071
|
+
}(i, e, n);
|
|
3072
|
+
return Ee(u, h, n);
|
|
3073
|
+
});
|
|
3074
|
+
});
|
|
3075
|
+
});
|
|
3076
|
+
}), Es = /* @__PURE__ */ function(r) {
|
|
3077
|
+
return function() {
|
|
3078
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
3079
|
+
try {
|
|
3080
|
+
return Promise.resolve(r.apply(this, e));
|
|
3081
|
+
} catch (n) {
|
|
3082
|
+
return Promise.reject(n);
|
|
3083
|
+
}
|
|
3084
|
+
};
|
|
3085
|
+
}(function(r, e, t) {
|
|
3086
|
+
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
3087
|
+
const o = Z({ url: V(r.remoteURL, M(e)), method: "MOVE", headers: { Destination: V(r.remoteURL, M(t)), Overwrite: n.overwrite === !1 ? "F" : "T" } }, r, n);
|
|
3088
|
+
return l = function(i) {
|
|
3089
|
+
J(r, i);
|
|
3090
|
+
}, (u = H(o, r)) && u.then || (u = Promise.resolve(u)), l ? u.then(l) : u;
|
|
3091
|
+
var u, l;
|
|
3092
|
+
});
|
|
3093
|
+
var As = L(172);
|
|
3094
|
+
const Ts = /* @__PURE__ */ function(r) {
|
|
3095
|
+
return function() {
|
|
3096
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
3097
|
+
try {
|
|
3098
|
+
return Promise.resolve(r.apply(this, e));
|
|
3099
|
+
} catch (n) {
|
|
3100
|
+
return Promise.reject(n);
|
|
3101
|
+
}
|
|
3102
|
+
};
|
|
3103
|
+
}(function(r, e, t) {
|
|
3104
|
+
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
3105
|
+
const { contentLength: o = !0, overwrite: u = !0 } = n, l = { "Content-Type": "application/octet-stream" };
|
|
3106
|
+
o === !1 || (l["Content-Length"] = typeof o == "number" ? `${o}` : `${function(s) {
|
|
3107
|
+
if (Or(s)) return s.byteLength;
|
|
3108
|
+
if (Cr(s)) return s.length;
|
|
3109
|
+
if (typeof s == "string") return (0, As.d)(s);
|
|
3110
|
+
throw new se({ info: { code: pe.DataTypeNoLength } }, "Cannot calculate data length: Invalid type");
|
|
3111
|
+
}(t)}`), u || (l["If-None-Match"] = "*");
|
|
3112
|
+
const i = Z({ url: V(r.remoteURL, M(e)), method: "PUT", headers: l, data: t }, r, n);
|
|
3113
|
+
return a = function(s) {
|
|
3114
|
+
try {
|
|
3115
|
+
J(r, s);
|
|
3116
|
+
} catch (f) {
|
|
3117
|
+
const c = f;
|
|
3118
|
+
if (c.status !== 412 || u) throw c;
|
|
3119
|
+
return !1;
|
|
3120
|
+
}
|
|
3121
|
+
return !0;
|
|
3122
|
+
}, (h = H(i, r)) && h.then || (h = Promise.resolve(h)), a ? h.then(a) : h;
|
|
3123
|
+
var h, a;
|
|
3124
|
+
}), qr = /* @__PURE__ */ function(r) {
|
|
3125
|
+
return function() {
|
|
3126
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
3127
|
+
try {
|
|
3128
|
+
return Promise.resolve(r.apply(this, e));
|
|
3129
|
+
} catch (n) {
|
|
3130
|
+
return Promise.reject(n);
|
|
3131
|
+
}
|
|
3132
|
+
};
|
|
3133
|
+
}(function(r, e) {
|
|
3134
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3135
|
+
const n = Z({ url: V(r.remoteURL, M(e)), method: "OPTIONS" }, r, t);
|
|
3136
|
+
return u = function(l) {
|
|
3137
|
+
try {
|
|
3138
|
+
J(r, l);
|
|
3139
|
+
} catch (i) {
|
|
3140
|
+
throw i;
|
|
3141
|
+
}
|
|
3142
|
+
return { compliance: (l.headers.get("DAV") ?? "").split(",").map((i) => i.trim()), server: l.headers.get("Server") ?? "" };
|
|
3143
|
+
}, (o = H(n, r)) && o.then || (o = Promise.resolve(o)), u ? o.then(u) : o;
|
|
3144
|
+
var o, u;
|
|
3145
|
+
});
|
|
3146
|
+
function Fe(r, e, t) {
|
|
3147
|
+
return t ? e ? e(r) : r : (r && r.then || (r = Promise.resolve(r)), e ? r.then(e) : r);
|
|
3148
|
+
}
|
|
3149
|
+
const Os = $t(function(r, e, t, n, o) {
|
|
3150
|
+
let u = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
|
|
3151
|
+
if (t > n || t < 0) throw new se({ info: { code: pe.InvalidUpdateRange } }, `Invalid update range ${t} for partial update`);
|
|
3152
|
+
const l = { "Content-Type": "application/octet-stream", "Content-Length": "" + (n - t + 1), "Content-Range": `bytes ${t}-${n}/*` }, i = Z({ url: V(r.remoteURL, M(e)), method: "PUT", headers: l, data: o }, r, u);
|
|
3153
|
+
return Fe(H(i, r), function(h) {
|
|
3154
|
+
J(r, h);
|
|
3155
|
+
});
|
|
3156
|
+
});
|
|
3157
|
+
function sr(r, e) {
|
|
3158
|
+
var t = r();
|
|
3159
|
+
return t && t.then ? t.then(e) : e(t);
|
|
3160
|
+
}
|
|
3161
|
+
const Cs = $t(function(r, e, t, n, o) {
|
|
3162
|
+
let u = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
|
|
3163
|
+
if (t > n || t < 0) throw new se({ info: { code: pe.InvalidUpdateRange } }, `Invalid update range ${t} for partial update`);
|
|
3164
|
+
const l = { "Content-Type": "application/x-sabredav-partialupdate", "Content-Length": "" + (n - t + 1), "X-Update-Range": `bytes=${t}-${n}` }, i = Z({ url: V(r.remoteURL, M(e)), method: "PATCH", headers: l, data: o }, r, u);
|
|
3165
|
+
return Fe(H(i, r), function(h) {
|
|
3166
|
+
J(r, h);
|
|
3167
|
+
});
|
|
3168
|
+
});
|
|
3169
|
+
function $t(r) {
|
|
3170
|
+
return function() {
|
|
3171
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
3172
|
+
try {
|
|
3173
|
+
return Promise.resolve(r.apply(this, e));
|
|
3174
|
+
} catch (n) {
|
|
3175
|
+
return Promise.reject(n);
|
|
3176
|
+
}
|
|
3177
|
+
};
|
|
3178
|
+
}
|
|
3179
|
+
const Is = $t(function(r, e, t, n, o) {
|
|
3180
|
+
let u = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
|
|
3181
|
+
return Fe(qr(r, e, u), function(l) {
|
|
3182
|
+
let i = !1;
|
|
3183
|
+
return sr(function() {
|
|
3184
|
+
if (l.compliance.includes("sabredav-partialupdate")) return Fe(Cs(r, e, t, n, o, u), function(h) {
|
|
3185
|
+
return i = !0, h;
|
|
3186
|
+
});
|
|
3187
|
+
}, function(h) {
|
|
3188
|
+
let a = !1;
|
|
3189
|
+
return i ? h : sr(function() {
|
|
3190
|
+
if (l.server.includes("Apache") && l.compliance.includes("<http://apache.org/dav/propset/fs/1>")) return Fe(Os(r, e, t, n, o, u), function(s) {
|
|
3191
|
+
return a = !0, s;
|
|
3192
|
+
});
|
|
3193
|
+
}, function(s) {
|
|
3194
|
+
if (a) return s;
|
|
3195
|
+
throw new se({ info: { code: pe.NotSupported } }, "Not supported");
|
|
3196
|
+
});
|
|
3197
|
+
});
|
|
3198
|
+
});
|
|
3199
|
+
}), Ss = "https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";
|
|
3200
|
+
function Fs(r) {
|
|
3201
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3202
|
+
const { authType: t = null, remoteBasePath: n, contactHref: o = Ss, ha1: u, headers: l = {}, httpAgent: i, httpsAgent: h, password: a, token: s, username: f, withCredentials: c } = e;
|
|
3203
|
+
let g = t;
|
|
3204
|
+
g || (g = f || a ? re.Password : re.None);
|
|
3205
|
+
const m = { authType: g, remoteBasePath: n, contactHref: o, ha1: u, headers: Object.assign({}, l), httpAgent: i, httpsAgent: h, password: a, remotePath: vn(r), remoteURL: r, token: s, username: f, withCredentials: c };
|
|
3206
|
+
return Er(m, f, a, s, u), { copyFile: (d, w, y) => ns(m, d, w, y), createDirectory: (d, w) => Pt(m, d, w), createReadStream: (d, w) => function(y, p) {
|
|
3207
|
+
let v = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3208
|
+
const A = new (nr()).PassThrough();
|
|
3209
|
+
return us(y, p, v).then((N) => {
|
|
3210
|
+
N.pipe(A);
|
|
3211
|
+
}).catch((N) => {
|
|
3212
|
+
A.emit("error", N);
|
|
3213
|
+
}), A;
|
|
3214
|
+
}(m, d, w), createWriteStream: (d, w, y) => function(p, v) {
|
|
3215
|
+
let A = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, N = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ls;
|
|
3216
|
+
const b = new (nr()).PassThrough(), E = {};
|
|
3217
|
+
A.overwrite === !1 && (E["If-None-Match"] = "*");
|
|
3218
|
+
const x = Z({ url: V(p.remoteURL, M(v)), method: "PUT", headers: E, data: b, maxRedirects: 0 }, p, A);
|
|
3219
|
+
return H(x, p).then((T) => J(p, T)).then((T) => {
|
|
3220
|
+
setTimeout(() => {
|
|
3221
|
+
N(T);
|
|
3222
|
+
}, 0);
|
|
3223
|
+
}).catch((T) => {
|
|
3224
|
+
b.emit("error", T);
|
|
3225
|
+
}), b;
|
|
3226
|
+
}(m, d, w, y), customRequest: (d, w) => cs(m, d, w), deleteFile: (d, w) => hs(m, d, w), exists: (d, w) => fs(m, d, w), getDirectoryContents: (d, w) => ps(m, d, w), getFileContents: (d, w) => ms(m, d, w), getFileDownloadLink: (d) => function(w, y) {
|
|
3227
|
+
let p = V(w.remoteURL, M(y));
|
|
3228
|
+
const v = /^https:/i.test(p) ? "https" : "http";
|
|
3229
|
+
switch (w.authType) {
|
|
3230
|
+
case re.None:
|
|
3231
|
+
break;
|
|
3232
|
+
case re.Password: {
|
|
3233
|
+
const A = Xt(w.headers.Authorization.replace(/^Basic /i, "").trim());
|
|
3234
|
+
p = p.replace(/^https?:\/\//, `${v}://${A}@`);
|
|
3235
|
+
break;
|
|
3236
|
+
}
|
|
3237
|
+
default:
|
|
3238
|
+
throw new se({ info: { code: pe.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${w.authType}`);
|
|
3239
|
+
}
|
|
3240
|
+
return p;
|
|
3241
|
+
}(m, d), getFileUploadLink: (d) => function(w, y) {
|
|
3242
|
+
let p = `${V(w.remoteURL, M(y))}?Content-Type=application/octet-stream`;
|
|
3243
|
+
const v = /^https:/i.test(p) ? "https" : "http";
|
|
3244
|
+
switch (w.authType) {
|
|
3245
|
+
case re.None:
|
|
3246
|
+
break;
|
|
3247
|
+
case re.Password: {
|
|
3248
|
+
const A = Xt(w.headers.Authorization.replace(/^Basic /i, "").trim());
|
|
3249
|
+
p = p.replace(/^https?:\/\//, `${v}://${A}@`);
|
|
3250
|
+
break;
|
|
3251
|
+
}
|
|
3252
|
+
default:
|
|
3253
|
+
throw new se({ info: { code: pe.LinkUnsupportedAuthType } }, `Unsupported auth type for file link: ${w.authType}`);
|
|
3254
|
+
}
|
|
3255
|
+
return p;
|
|
3256
|
+
}(m, d), getHeaders: () => Object.assign({}, m.headers), getQuota: (d) => xs(m, d), lock: (d, w) => ws(m, d, w), moveFile: (d, w, y) => Es(m, d, w, y), putFileContents: (d, w, y) => Ts(m, d, w, y), partialUpdateFileContents: (d, w, y, p, v) => Is(m, d, w, y, p, v), getDAVCompliance: (d) => qr(m, d), search: (d, w) => Ps(m, d, w), setHeaders: (d) => {
|
|
3257
|
+
m.headers = Object.assign({}, d);
|
|
3258
|
+
}, stat: (d, w) => Ft(m, d, w), unlock: (d, w, y) => vs(m, d, w, y) };
|
|
3259
|
+
}
|
|
3260
|
+
ue.hT;
|
|
3261
|
+
ue.O4;
|
|
3262
|
+
ue.Kd;
|
|
3263
|
+
ue.YK;
|
|
3264
|
+
var js = ue.UU;
|
|
3265
|
+
ue.Gu;
|
|
3266
|
+
ue.ky;
|
|
3267
|
+
var $s = ue.h4, Rs = ue.ch;
|
|
3268
|
+
ue.hq;
|
|
3269
|
+
ue.i5;
|
|
3270
|
+
const Q = [];
|
|
3271
|
+
for (let r = 0; r < 256; ++r)
|
|
3272
|
+
Q.push((r + 256).toString(16).slice(1));
|
|
3273
|
+
function Ls(r, e = 0) {
|
|
3274
|
+
return (Q[r[e + 0]] + Q[r[e + 1]] + Q[r[e + 2]] + Q[r[e + 3]] + "-" + Q[r[e + 4]] + Q[r[e + 5]] + "-" + Q[r[e + 6]] + Q[r[e + 7]] + "-" + Q[r[e + 8]] + Q[r[e + 9]] + "-" + Q[r[e + 10]] + Q[r[e + 11]] + Q[r[e + 12]] + Q[r[e + 13]] + Q[r[e + 14]] + Q[r[e + 15]]).toLowerCase();
|
|
3275
|
+
}
|
|
3276
|
+
let ot;
|
|
3277
|
+
const ks = new Uint8Array(16);
|
|
3278
|
+
function Us() {
|
|
3279
|
+
if (!ot) {
|
|
3280
|
+
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
3281
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3282
|
+
ot = crypto.getRandomValues.bind(crypto);
|
|
3283
|
+
}
|
|
3284
|
+
return ot(ks);
|
|
3285
|
+
}
|
|
3286
|
+
const _s = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ir = { randomUUID: _s };
|
|
3287
|
+
function Ms(r, e, t) {
|
|
3288
|
+
var o;
|
|
3289
|
+
if (ir.randomUUID && !r)
|
|
3290
|
+
return ir.randomUUID();
|
|
3291
|
+
r = r || {};
|
|
3292
|
+
const n = r.random ?? ((o = r.rng) == null ? void 0 : o.call(r)) ?? Us();
|
|
3293
|
+
if (n.length < 16)
|
|
3294
|
+
throw new Error("Random bytes length must be >= 16");
|
|
3295
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Ls(n);
|
|
3296
|
+
}
|
|
3297
|
+
var at = {}, ut = {}, or;
|
|
3298
|
+
function Rt() {
|
|
3299
|
+
return or || (or = 1, function(r) {
|
|
3300
|
+
const e = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", t = e + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040", n = "[" + e + "][" + t + "]*", o = new RegExp("^" + n + "$"), u = function(i, h) {
|
|
3301
|
+
const a = [];
|
|
3302
|
+
let s = h.exec(i);
|
|
3303
|
+
for (; s; ) {
|
|
3304
|
+
const f = [];
|
|
3305
|
+
f.startIndex = h.lastIndex - s[0].length;
|
|
3306
|
+
const c = s.length;
|
|
3307
|
+
for (let g = 0; g < c; g++)
|
|
3308
|
+
f.push(s[g]);
|
|
3309
|
+
a.push(f), s = h.exec(i);
|
|
3310
|
+
}
|
|
3311
|
+
return a;
|
|
3312
|
+
}, l = function(i) {
|
|
3313
|
+
const h = o.exec(i);
|
|
3314
|
+
return !(h === null || typeof h > "u");
|
|
3315
|
+
};
|
|
3316
|
+
r.isExist = function(i) {
|
|
3317
|
+
return typeof i < "u";
|
|
3318
|
+
}, r.isEmptyObject = function(i) {
|
|
3319
|
+
return Object.keys(i).length === 0;
|
|
3320
|
+
}, r.merge = function(i, h, a) {
|
|
3321
|
+
if (h) {
|
|
3322
|
+
const s = Object.keys(h), f = s.length;
|
|
3323
|
+
for (let c = 0; c < f; c++)
|
|
3324
|
+
a === "strict" ? i[s[c]] = [h[s[c]]] : i[s[c]] = h[s[c]];
|
|
3325
|
+
}
|
|
3326
|
+
}, r.getValue = function(i) {
|
|
3327
|
+
return r.isExist(i) ? i : "";
|
|
3328
|
+
}, r.isName = l, r.getAllMatches = u, r.nameRegexp = n;
|
|
3329
|
+
}(ut)), ut;
|
|
3330
|
+
}
|
|
3331
|
+
var ar;
|
|
3332
|
+
function Wr() {
|
|
3333
|
+
if (ar) return at;
|
|
3334
|
+
ar = 1;
|
|
3335
|
+
const r = Rt(), e = {
|
|
3336
|
+
allowBooleanAttributes: !1,
|
|
3337
|
+
//A tag can have attributes without any value
|
|
3338
|
+
unpairedTags: []
|
|
3339
|
+
};
|
|
3340
|
+
at.validate = function(y, p) {
|
|
3341
|
+
p = Object.assign({}, e, p);
|
|
3342
|
+
const v = [];
|
|
3343
|
+
let A = !1, N = !1;
|
|
3344
|
+
y[0] === "\uFEFF" && (y = y.substr(1));
|
|
3345
|
+
for (let b = 0; b < y.length; b++)
|
|
3346
|
+
if (y[b] === "<" && y[b + 1] === "?") {
|
|
3347
|
+
if (b += 2, b = n(y, b), b.err) return b;
|
|
3348
|
+
} else if (y[b] === "<") {
|
|
3349
|
+
let E = b;
|
|
3350
|
+
if (b++, y[b] === "!") {
|
|
3351
|
+
b = o(y, b);
|
|
3352
|
+
continue;
|
|
3353
|
+
} else {
|
|
3354
|
+
let x = !1;
|
|
3355
|
+
y[b] === "/" && (x = !0, b++);
|
|
3356
|
+
let T = "";
|
|
3357
|
+
for (; b < y.length && y[b] !== ">" && y[b] !== " " && y[b] !== " " && y[b] !== `
|
|
3358
|
+
` && y[b] !== "\r"; b++)
|
|
3359
|
+
T += y[b];
|
|
3360
|
+
if (T = T.trim(), T[T.length - 1] === "/" && (T = T.substring(0, T.length - 1), b--), !m(T)) {
|
|
3361
|
+
let C;
|
|
3362
|
+
return T.trim().length === 0 ? C = "Invalid space after '<'." : C = "Tag '" + T + "' is an invalid name.", c("InvalidTag", C, d(y, b));
|
|
3363
|
+
}
|
|
3364
|
+
const O = i(y, b);
|
|
3365
|
+
if (O === !1)
|
|
3366
|
+
return c("InvalidAttr", "Attributes for '" + T + "' have open quote.", d(y, b));
|
|
3367
|
+
let I = O.value;
|
|
3368
|
+
if (b = O.index, I[I.length - 1] === "/") {
|
|
3369
|
+
const C = b - I.length;
|
|
3370
|
+
I = I.substring(0, I.length - 1);
|
|
3371
|
+
const P = a(I, p);
|
|
3372
|
+
if (P === !0)
|
|
3373
|
+
A = !0;
|
|
3374
|
+
else
|
|
3375
|
+
return c(P.err.code, P.err.msg, d(y, C + P.err.line));
|
|
3376
|
+
} else if (x)
|
|
3377
|
+
if (O.tagClosed) {
|
|
3378
|
+
if (I.trim().length > 0)
|
|
3379
|
+
return c("InvalidTag", "Closing tag '" + T + "' can't have attributes or invalid starting.", d(y, E));
|
|
3380
|
+
if (v.length === 0)
|
|
3381
|
+
return c("InvalidTag", "Closing tag '" + T + "' has not been opened.", d(y, E));
|
|
3382
|
+
{
|
|
3383
|
+
const C = v.pop();
|
|
3384
|
+
if (T !== C.tagName) {
|
|
3385
|
+
let P = d(y, C.tagStartPos);
|
|
3386
|
+
return c(
|
|
3387
|
+
"InvalidTag",
|
|
3388
|
+
"Expected closing tag '" + C.tagName + "' (opened in line " + P.line + ", col " + P.col + ") instead of closing tag '" + T + "'.",
|
|
3389
|
+
d(y, E)
|
|
3390
|
+
);
|
|
3391
|
+
}
|
|
3392
|
+
v.length == 0 && (N = !0);
|
|
3393
|
+
}
|
|
3394
|
+
} else return c("InvalidTag", "Closing tag '" + T + "' doesn't have proper closing.", d(y, b));
|
|
3395
|
+
else {
|
|
3396
|
+
const C = a(I, p);
|
|
3397
|
+
if (C !== !0)
|
|
3398
|
+
return c(C.err.code, C.err.msg, d(y, b - I.length + C.err.line));
|
|
3399
|
+
if (N === !0)
|
|
3400
|
+
return c("InvalidXml", "Multiple possible root nodes found.", d(y, b));
|
|
3401
|
+
p.unpairedTags.indexOf(T) !== -1 || v.push({ tagName: T, tagStartPos: E }), A = !0;
|
|
3402
|
+
}
|
|
3403
|
+
for (b++; b < y.length; b++)
|
|
3404
|
+
if (y[b] === "<")
|
|
3405
|
+
if (y[b + 1] === "!") {
|
|
3406
|
+
b++, b = o(y, b);
|
|
3407
|
+
continue;
|
|
3408
|
+
} else if (y[b + 1] === "?") {
|
|
3409
|
+
if (b = n(y, ++b), b.err) return b;
|
|
3410
|
+
} else
|
|
3411
|
+
break;
|
|
3412
|
+
else if (y[b] === "&") {
|
|
3413
|
+
const C = f(y, b);
|
|
3414
|
+
if (C == -1)
|
|
3415
|
+
return c("InvalidChar", "char '&' is not expected.", d(y, b));
|
|
3416
|
+
b = C;
|
|
3417
|
+
} else if (N === !0 && !t(y[b]))
|
|
3418
|
+
return c("InvalidXml", "Extra text at the end", d(y, b));
|
|
3419
|
+
y[b] === "<" && b--;
|
|
3420
|
+
}
|
|
3421
|
+
} else {
|
|
3422
|
+
if (t(y[b]))
|
|
3423
|
+
continue;
|
|
3424
|
+
return c("InvalidChar", "char '" + y[b] + "' is not expected.", d(y, b));
|
|
3425
|
+
}
|
|
3426
|
+
if (A) {
|
|
3427
|
+
if (v.length == 1)
|
|
3428
|
+
return c("InvalidTag", "Unclosed tag '" + v[0].tagName + "'.", d(y, v[0].tagStartPos));
|
|
3429
|
+
if (v.length > 0)
|
|
3430
|
+
return c("InvalidXml", "Invalid '" + JSON.stringify(v.map((b) => b.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 });
|
|
3431
|
+
} else return c("InvalidXml", "Start tag expected.", 1);
|
|
3432
|
+
return !0;
|
|
3433
|
+
};
|
|
3434
|
+
function t(y) {
|
|
3435
|
+
return y === " " || y === " " || y === `
|
|
3436
|
+
` || y === "\r";
|
|
3437
|
+
}
|
|
3438
|
+
function n(y, p) {
|
|
3439
|
+
const v = p;
|
|
3440
|
+
for (; p < y.length; p++)
|
|
3441
|
+
if (y[p] == "?" || y[p] == " ") {
|
|
3442
|
+
const A = y.substr(v, p - v);
|
|
3443
|
+
if (p > 5 && A === "xml")
|
|
3444
|
+
return c("InvalidXml", "XML declaration allowed only at the start of the document.", d(y, p));
|
|
3445
|
+
if (y[p] == "?" && y[p + 1] == ">") {
|
|
3446
|
+
p++;
|
|
3447
|
+
break;
|
|
3448
|
+
} else
|
|
3449
|
+
continue;
|
|
3450
|
+
}
|
|
3451
|
+
return p;
|
|
3452
|
+
}
|
|
3453
|
+
function o(y, p) {
|
|
3454
|
+
if (y.length > p + 5 && y[p + 1] === "-" && y[p + 2] === "-") {
|
|
3455
|
+
for (p += 3; p < y.length; p++)
|
|
3456
|
+
if (y[p] === "-" && y[p + 1] === "-" && y[p + 2] === ">") {
|
|
3457
|
+
p += 2;
|
|
3458
|
+
break;
|
|
3459
|
+
}
|
|
3460
|
+
} else if (y.length > p + 8 && y[p + 1] === "D" && y[p + 2] === "O" && y[p + 3] === "C" && y[p + 4] === "T" && y[p + 5] === "Y" && y[p + 6] === "P" && y[p + 7] === "E") {
|
|
3461
|
+
let v = 1;
|
|
3462
|
+
for (p += 8; p < y.length; p++)
|
|
3463
|
+
if (y[p] === "<")
|
|
3464
|
+
v++;
|
|
3465
|
+
else if (y[p] === ">" && (v--, v === 0))
|
|
3466
|
+
break;
|
|
3467
|
+
} else if (y.length > p + 9 && y[p + 1] === "[" && y[p + 2] === "C" && y[p + 3] === "D" && y[p + 4] === "A" && y[p + 5] === "T" && y[p + 6] === "A" && y[p + 7] === "[") {
|
|
3468
|
+
for (p += 8; p < y.length; p++)
|
|
3469
|
+
if (y[p] === "]" && y[p + 1] === "]" && y[p + 2] === ">") {
|
|
3470
|
+
p += 2;
|
|
3471
|
+
break;
|
|
3472
|
+
}
|
|
3473
|
+
}
|
|
3474
|
+
return p;
|
|
3475
|
+
}
|
|
3476
|
+
const u = '"', l = "'";
|
|
3477
|
+
function i(y, p) {
|
|
3478
|
+
let v = "", A = "", N = !1;
|
|
3479
|
+
for (; p < y.length; p++) {
|
|
3480
|
+
if (y[p] === u || y[p] === l)
|
|
3481
|
+
A === "" ? A = y[p] : A !== y[p] || (A = "");
|
|
3482
|
+
else if (y[p] === ">" && A === "") {
|
|
3483
|
+
N = !0;
|
|
3484
|
+
break;
|
|
3485
|
+
}
|
|
3486
|
+
v += y[p];
|
|
3487
|
+
}
|
|
3488
|
+
return A !== "" ? !1 : {
|
|
3489
|
+
value: v,
|
|
3490
|
+
index: p,
|
|
3491
|
+
tagClosed: N
|
|
3492
|
+
};
|
|
3493
|
+
}
|
|
3494
|
+
const h = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
|
|
3495
|
+
function a(y, p) {
|
|
3496
|
+
const v = r.getAllMatches(y, h), A = {};
|
|
3497
|
+
for (let N = 0; N < v.length; N++) {
|
|
3498
|
+
if (v[N][1].length === 0)
|
|
3499
|
+
return c("InvalidAttr", "Attribute '" + v[N][2] + "' has no space in starting.", w(v[N]));
|
|
3500
|
+
if (v[N][3] !== void 0 && v[N][4] === void 0)
|
|
3501
|
+
return c("InvalidAttr", "Attribute '" + v[N][2] + "' is without value.", w(v[N]));
|
|
3502
|
+
if (v[N][3] === void 0 && !p.allowBooleanAttributes)
|
|
3503
|
+
return c("InvalidAttr", "boolean attribute '" + v[N][2] + "' is not allowed.", w(v[N]));
|
|
3504
|
+
const b = v[N][2];
|
|
3505
|
+
if (!g(b))
|
|
3506
|
+
return c("InvalidAttr", "Attribute '" + b + "' is an invalid name.", w(v[N]));
|
|
3507
|
+
if (!A.hasOwnProperty(b))
|
|
3508
|
+
A[b] = 1;
|
|
3509
|
+
else
|
|
3510
|
+
return c("InvalidAttr", "Attribute '" + b + "' is repeated.", w(v[N]));
|
|
3511
|
+
}
|
|
3512
|
+
return !0;
|
|
3513
|
+
}
|
|
3514
|
+
function s(y, p) {
|
|
3515
|
+
let v = /\d/;
|
|
3516
|
+
for (y[p] === "x" && (p++, v = /[\da-fA-F]/); p < y.length; p++) {
|
|
3517
|
+
if (y[p] === ";")
|
|
3518
|
+
return p;
|
|
3519
|
+
if (!y[p].match(v))
|
|
3520
|
+
break;
|
|
3521
|
+
}
|
|
3522
|
+
return -1;
|
|
3523
|
+
}
|
|
3524
|
+
function f(y, p) {
|
|
3525
|
+
if (p++, y[p] === ";")
|
|
3526
|
+
return -1;
|
|
3527
|
+
if (y[p] === "#")
|
|
3528
|
+
return p++, s(y, p);
|
|
3529
|
+
let v = 0;
|
|
3530
|
+
for (; p < y.length; p++, v++)
|
|
3531
|
+
if (!(y[p].match(/\w/) && v < 20)) {
|
|
3532
|
+
if (y[p] === ";")
|
|
3533
|
+
break;
|
|
3534
|
+
return -1;
|
|
3535
|
+
}
|
|
3536
|
+
return p;
|
|
3537
|
+
}
|
|
3538
|
+
function c(y, p, v) {
|
|
3539
|
+
return {
|
|
3540
|
+
err: {
|
|
3541
|
+
code: y,
|
|
3542
|
+
msg: p,
|
|
3543
|
+
line: v.line || v,
|
|
3544
|
+
col: v.col
|
|
3545
|
+
}
|
|
3546
|
+
};
|
|
3547
|
+
}
|
|
3548
|
+
function g(y) {
|
|
3549
|
+
return r.isName(y);
|
|
3550
|
+
}
|
|
3551
|
+
function m(y) {
|
|
3552
|
+
return r.isName(y);
|
|
3553
|
+
}
|
|
3554
|
+
function d(y, p) {
|
|
3555
|
+
const v = y.substring(0, p).split(/\r?\n/);
|
|
3556
|
+
return {
|
|
3557
|
+
line: v.length,
|
|
3558
|
+
// column number is last line's length + 1, because column numbering starts at 1:
|
|
3559
|
+
col: v[v.length - 1].length + 1
|
|
3560
|
+
};
|
|
3561
|
+
}
|
|
3562
|
+
function w(y) {
|
|
3563
|
+
return y.startIndex + y[1].length;
|
|
3564
|
+
}
|
|
3565
|
+
return at;
|
|
3566
|
+
}
|
|
3567
|
+
var Ve = {}, ur;
|
|
3568
|
+
function Vs() {
|
|
3569
|
+
if (ur) return Ve;
|
|
3570
|
+
ur = 1;
|
|
3571
|
+
const r = {
|
|
3572
|
+
preserveOrder: !1,
|
|
3573
|
+
attributeNamePrefix: "@_",
|
|
3574
|
+
attributesGroupName: !1,
|
|
3575
|
+
textNodeName: "#text",
|
|
3576
|
+
ignoreAttributes: !0,
|
|
3577
|
+
removeNSPrefix: !1,
|
|
3578
|
+
// remove NS from tag name or attribute name if true
|
|
3579
|
+
allowBooleanAttributes: !1,
|
|
3580
|
+
//a tag can have attributes without any value
|
|
3581
|
+
//ignoreRootElement : false,
|
|
3582
|
+
parseTagValue: !0,
|
|
3583
|
+
parseAttributeValue: !1,
|
|
3584
|
+
trimValues: !0,
|
|
3585
|
+
//Trim string values of tag and attributes
|
|
3586
|
+
cdataPropName: !1,
|
|
3587
|
+
numberParseOptions: {
|
|
3588
|
+
hex: !0,
|
|
3589
|
+
leadingZeros: !0,
|
|
3590
|
+
eNotation: !0
|
|
3591
|
+
},
|
|
3592
|
+
tagValueProcessor: function(t, n) {
|
|
3593
|
+
return n;
|
|
3594
|
+
},
|
|
3595
|
+
attributeValueProcessor: function(t, n) {
|
|
3596
|
+
return n;
|
|
3597
|
+
},
|
|
3598
|
+
stopNodes: [],
|
|
3599
|
+
//nested tags will not be parsed even for errors
|
|
3600
|
+
alwaysCreateTextNode: !1,
|
|
3601
|
+
isArray: () => !1,
|
|
3602
|
+
commentPropName: !1,
|
|
3603
|
+
unpairedTags: [],
|
|
3604
|
+
processEntities: !0,
|
|
3605
|
+
htmlEntities: !1,
|
|
3606
|
+
ignoreDeclaration: !1,
|
|
3607
|
+
ignorePiTags: !1,
|
|
3608
|
+
transformTagName: !1,
|
|
3609
|
+
transformAttributeName: !1,
|
|
3610
|
+
updateTag: function(t, n, o) {
|
|
3611
|
+
return t;
|
|
3612
|
+
}
|
|
3613
|
+
// skipEmptyListItem: false
|
|
3614
|
+
}, e = function(t) {
|
|
3615
|
+
return Object.assign({}, r, t);
|
|
3616
|
+
};
|
|
3617
|
+
return Ve.buildOptions = e, Ve.defaultOptions = r, Ve;
|
|
3618
|
+
}
|
|
3619
|
+
var lt, lr;
|
|
3620
|
+
function Bs() {
|
|
3621
|
+
if (lr) return lt;
|
|
3622
|
+
lr = 1;
|
|
3623
|
+
class r {
|
|
3624
|
+
constructor(t) {
|
|
3625
|
+
this.tagname = t, this.child = [], this[":@"] = {};
|
|
3626
|
+
}
|
|
3627
|
+
add(t, n) {
|
|
3628
|
+
t === "__proto__" && (t = "#__proto__"), this.child.push({ [t]: n });
|
|
3629
|
+
}
|
|
3630
|
+
addChild(t) {
|
|
3631
|
+
t.tagname === "__proto__" && (t.tagname = "#__proto__"), t[":@"] && Object.keys(t[":@"]).length > 0 ? this.child.push({ [t.tagname]: t.child, ":@": t[":@"] }) : this.child.push({ [t.tagname]: t.child });
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
return lt = r, lt;
|
|
3635
|
+
}
|
|
3636
|
+
var ct, cr;
|
|
3637
|
+
function qs() {
|
|
3638
|
+
if (cr) return ct;
|
|
3639
|
+
cr = 1;
|
|
3640
|
+
const r = Rt();
|
|
3641
|
+
function e(a, s) {
|
|
3642
|
+
const f = {};
|
|
3643
|
+
if (a[s + 3] === "O" && a[s + 4] === "C" && a[s + 5] === "T" && a[s + 6] === "Y" && a[s + 7] === "P" && a[s + 8] === "E") {
|
|
3644
|
+
s = s + 9;
|
|
3645
|
+
let c = 1, g = !1, m = !1, d = "";
|
|
3646
|
+
for (; s < a.length; s++)
|
|
3647
|
+
if (a[s] === "<" && !m) {
|
|
3648
|
+
if (g && o(a, s)) {
|
|
3649
|
+
s += 7;
|
|
3650
|
+
let w, y;
|
|
3651
|
+
[w, y, s] = t(a, s + 1), y.indexOf("&") === -1 && (f[h(w)] = {
|
|
3652
|
+
regx: RegExp(`&${w};`, "g"),
|
|
3653
|
+
val: y
|
|
3654
|
+
});
|
|
3655
|
+
} else if (g && u(a, s)) s += 8;
|
|
3656
|
+
else if (g && l(a, s)) s += 8;
|
|
3657
|
+
else if (g && i(a, s)) s += 9;
|
|
3658
|
+
else if (n) m = !0;
|
|
3659
|
+
else throw new Error("Invalid DOCTYPE");
|
|
3660
|
+
c++, d = "";
|
|
3661
|
+
} else if (a[s] === ">") {
|
|
3662
|
+
if (m ? a[s - 1] === "-" && a[s - 2] === "-" && (m = !1, c--) : c--, c === 0)
|
|
3663
|
+
break;
|
|
3664
|
+
} else a[s] === "[" ? g = !0 : d += a[s];
|
|
3665
|
+
if (c !== 0)
|
|
3666
|
+
throw new Error("Unclosed DOCTYPE");
|
|
3667
|
+
} else
|
|
3668
|
+
throw new Error("Invalid Tag instead of DOCTYPE");
|
|
3669
|
+
return { entities: f, i: s };
|
|
3670
|
+
}
|
|
3671
|
+
function t(a, s) {
|
|
3672
|
+
let f = "";
|
|
3673
|
+
for (; s < a.length && a[s] !== "'" && a[s] !== '"'; s++)
|
|
3674
|
+
f += a[s];
|
|
3675
|
+
if (f = f.trim(), f.indexOf(" ") !== -1) throw new Error("External entites are not supported");
|
|
3676
|
+
const c = a[s++];
|
|
3677
|
+
let g = "";
|
|
3678
|
+
for (; s < a.length && a[s] !== c; s++)
|
|
3679
|
+
g += a[s];
|
|
3680
|
+
return [f, g, s];
|
|
3681
|
+
}
|
|
3682
|
+
function n(a, s) {
|
|
3683
|
+
return a[s + 1] === "!" && a[s + 2] === "-" && a[s + 3] === "-";
|
|
3684
|
+
}
|
|
3685
|
+
function o(a, s) {
|
|
3686
|
+
return a[s + 1] === "!" && a[s + 2] === "E" && a[s + 3] === "N" && a[s + 4] === "T" && a[s + 5] === "I" && a[s + 6] === "T" && a[s + 7] === "Y";
|
|
3687
|
+
}
|
|
3688
|
+
function u(a, s) {
|
|
3689
|
+
return a[s + 1] === "!" && a[s + 2] === "E" && a[s + 3] === "L" && a[s + 4] === "E" && a[s + 5] === "M" && a[s + 6] === "E" && a[s + 7] === "N" && a[s + 8] === "T";
|
|
3690
|
+
}
|
|
3691
|
+
function l(a, s) {
|
|
3692
|
+
return a[s + 1] === "!" && a[s + 2] === "A" && a[s + 3] === "T" && a[s + 4] === "T" && a[s + 5] === "L" && a[s + 6] === "I" && a[s + 7] === "S" && a[s + 8] === "T";
|
|
3693
|
+
}
|
|
3694
|
+
function i(a, s) {
|
|
3695
|
+
return a[s + 1] === "!" && a[s + 2] === "N" && a[s + 3] === "O" && a[s + 4] === "T" && a[s + 5] === "A" && a[s + 6] === "T" && a[s + 7] === "I" && a[s + 8] === "O" && a[s + 9] === "N";
|
|
3696
|
+
}
|
|
3697
|
+
function h(a) {
|
|
3698
|
+
if (r.isName(a))
|
|
3699
|
+
return a;
|
|
3700
|
+
throw new Error(`Invalid entity name ${a}`);
|
|
3701
|
+
}
|
|
3702
|
+
return ct = e, ct;
|
|
3703
|
+
}
|
|
3704
|
+
var ht, hr;
|
|
3705
|
+
function Ws() {
|
|
3706
|
+
if (hr) return ht;
|
|
3707
|
+
hr = 1;
|
|
3708
|
+
const r = /^[-+]?0x[a-fA-F0-9]+$/, e = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, t = {
|
|
3709
|
+
hex: !0,
|
|
3710
|
+
// oct: false,
|
|
3711
|
+
leadingZeros: !0,
|
|
3712
|
+
decimalPoint: ".",
|
|
3713
|
+
eNotation: !0
|
|
3714
|
+
//skipLike: /regex/
|
|
3715
|
+
};
|
|
3716
|
+
function n(l, i = {}) {
|
|
3717
|
+
if (i = Object.assign({}, t, i), !l || typeof l != "string") return l;
|
|
3718
|
+
if (l === "0") return 0;
|
|
3719
|
+
let h = l.trim();
|
|
3720
|
+
if (i.skipLike !== void 0 && i.skipLike.test(h)) return l;
|
|
3721
|
+
if (i.hex && r.test(h))
|
|
3722
|
+
return u(h, 16);
|
|
3723
|
+
if (h.search(/[eE]/) !== -1) {
|
|
3724
|
+
const a = h.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);
|
|
3725
|
+
if (a) {
|
|
3726
|
+
if (i.leadingZeros)
|
|
3727
|
+
h = (a[1] || "") + a[3];
|
|
3728
|
+
else if (!(a[2] === "0" && a[3][0] === ".")) return l;
|
|
3729
|
+
return i.eNotation ? Number(h) : l;
|
|
3730
|
+
} else
|
|
3731
|
+
return l;
|
|
3732
|
+
} else {
|
|
3733
|
+
const a = e.exec(h);
|
|
3734
|
+
if (a) {
|
|
3735
|
+
const s = a[1], f = a[2];
|
|
3736
|
+
let c = o(a[3]);
|
|
3737
|
+
if (!i.leadingZeros && f.length > 0 && s && h[2] !== ".") return l;
|
|
3738
|
+
if (!i.leadingZeros && f.length > 0 && !s && h[1] !== ".") return l;
|
|
3739
|
+
if (i.leadingZeros && f === l) return 0;
|
|
3740
|
+
{
|
|
3741
|
+
const g = Number(h), m = "" + g;
|
|
3742
|
+
return m.search(/[eE]/) !== -1 ? i.eNotation ? g : l : h.indexOf(".") !== -1 ? m === "0" && c === "" || m === c || s && m === "-" + c ? g : l : f ? c === m || s + c === m ? g : l : h === m || h === s + m ? g : l;
|
|
3743
|
+
}
|
|
3744
|
+
} else
|
|
3745
|
+
return l;
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
function o(l) {
|
|
3749
|
+
return l && l.indexOf(".") !== -1 && (l = l.replace(/0+$/, ""), l === "." ? l = "0" : l[0] === "." ? l = "0" + l : l[l.length - 1] === "." && (l = l.substr(0, l.length - 1))), l;
|
|
3750
|
+
}
|
|
3751
|
+
function u(l, i) {
|
|
3752
|
+
if (parseInt) return parseInt(l, i);
|
|
3753
|
+
if (Number.parseInt) return Number.parseInt(l, i);
|
|
3754
|
+
if (window && window.parseInt) return window.parseInt(l, i);
|
|
3755
|
+
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
|
3756
|
+
}
|
|
3757
|
+
return ht = n, ht;
|
|
3758
|
+
}
|
|
3759
|
+
var ft, fr;
|
|
3760
|
+
function Xr() {
|
|
3761
|
+
if (fr) return ft;
|
|
3762
|
+
fr = 1;
|
|
3763
|
+
function r(e) {
|
|
3764
|
+
return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
|
|
3765
|
+
for (const n of e)
|
|
3766
|
+
if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t))
|
|
3767
|
+
return !0;
|
|
3768
|
+
} : () => !1;
|
|
3769
|
+
}
|
|
3770
|
+
return ft = r, ft;
|
|
3771
|
+
}
|
|
3772
|
+
var pt, pr;
|
|
3773
|
+
function Xs() {
|
|
3774
|
+
if (pr) return pt;
|
|
3775
|
+
pr = 1;
|
|
3776
|
+
const r = Rt(), e = Bs(), t = qs(), n = Ws(), o = Xr();
|
|
3777
|
+
class u {
|
|
3778
|
+
constructor(b) {
|
|
3779
|
+
this.options = b, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {
|
|
3780
|
+
apos: { regex: /&(apos|#39|#x27);/g, val: "'" },
|
|
3781
|
+
gt: { regex: /&(gt|#62|#x3E);/g, val: ">" },
|
|
3782
|
+
lt: { regex: /&(lt|#60|#x3C);/g, val: "<" },
|
|
3783
|
+
quot: { regex: /&(quot|#34|#x22);/g, val: '"' }
|
|
3784
|
+
}, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = {
|
|
3785
|
+
space: { regex: /&(nbsp|#160);/g, val: " " },
|
|
3786
|
+
// "lt" : { regex: /&(lt|#60);/g, val: "<" },
|
|
3787
|
+
// "gt" : { regex: /&(gt|#62);/g, val: ">" },
|
|
3788
|
+
// "amp" : { regex: /&(amp|#38);/g, val: "&" },
|
|
3789
|
+
// "quot" : { regex: /&(quot|#34);/g, val: "\"" },
|
|
3790
|
+
// "apos" : { regex: /&(apos|#39);/g, val: "'" },
|
|
3791
|
+
cent: { regex: /&(cent|#162);/g, val: "¢" },
|
|
3792
|
+
pound: { regex: /&(pound|#163);/g, val: "£" },
|
|
3793
|
+
yen: { regex: /&(yen|#165);/g, val: "¥" },
|
|
3794
|
+
euro: { regex: /&(euro|#8364);/g, val: "€" },
|
|
3795
|
+
copyright: { regex: /&(copy|#169);/g, val: "©" },
|
|
3796
|
+
reg: { regex: /&(reg|#174);/g, val: "®" },
|
|
3797
|
+
inr: { regex: /&(inr|#8377);/g, val: "₹" },
|
|
3798
|
+
num_dec: { regex: /&#([0-9]{1,7});/g, val: (E, x) => String.fromCharCode(Number.parseInt(x, 10)) },
|
|
3799
|
+
num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (E, x) => String.fromCharCode(Number.parseInt(x, 16)) }
|
|
3800
|
+
}, this.addExternalEntities = l, this.parseXml = f, this.parseTextData = i, this.resolveNameSpace = h, this.buildAttributesMap = s, this.isItStopNode = d, this.replaceEntitiesValue = g, this.readStopNodeData = v, this.saveTextToParentTag = m, this.addChild = c, this.ignoreAttributesFn = o(this.options.ignoreAttributes);
|
|
3801
|
+
}
|
|
3802
|
+
}
|
|
3803
|
+
function l(N) {
|
|
3804
|
+
const b = Object.keys(N);
|
|
3805
|
+
for (let E = 0; E < b.length; E++) {
|
|
3806
|
+
const x = b[E];
|
|
3807
|
+
this.lastEntities[x] = {
|
|
3808
|
+
regex: new RegExp("&" + x + ";", "g"),
|
|
3809
|
+
val: N[x]
|
|
3810
|
+
};
|
|
3811
|
+
}
|
|
3812
|
+
}
|
|
3813
|
+
function i(N, b, E, x, T, O, I) {
|
|
3814
|
+
if (N !== void 0 && (this.options.trimValues && !x && (N = N.trim()), N.length > 0)) {
|
|
3815
|
+
I || (N = this.replaceEntitiesValue(N));
|
|
3816
|
+
const C = this.options.tagValueProcessor(b, N, E, T, O);
|
|
3817
|
+
return C == null ? N : typeof C != typeof N || C !== N ? C : this.options.trimValues ? A(N, this.options.parseTagValue, this.options.numberParseOptions) : N.trim() === N ? A(N, this.options.parseTagValue, this.options.numberParseOptions) : N;
|
|
3818
|
+
}
|
|
3819
|
+
}
|
|
3820
|
+
function h(N) {
|
|
3821
|
+
if (this.options.removeNSPrefix) {
|
|
3822
|
+
const b = N.split(":"), E = N.charAt(0) === "/" ? "/" : "";
|
|
3823
|
+
if (b[0] === "xmlns")
|
|
3824
|
+
return "";
|
|
3825
|
+
b.length === 2 && (N = E + b[1]);
|
|
3826
|
+
}
|
|
3827
|
+
return N;
|
|
3828
|
+
}
|
|
3829
|
+
const a = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
|
|
3830
|
+
function s(N, b, E) {
|
|
3831
|
+
if (this.options.ignoreAttributes !== !0 && typeof N == "string") {
|
|
3832
|
+
const x = r.getAllMatches(N, a), T = x.length, O = {};
|
|
3833
|
+
for (let I = 0; I < T; I++) {
|
|
3834
|
+
const C = this.resolveNameSpace(x[I][1]);
|
|
3835
|
+
if (this.ignoreAttributesFn(C, b))
|
|
3836
|
+
continue;
|
|
3837
|
+
let P = x[I][4], j = this.options.attributeNamePrefix + C;
|
|
3838
|
+
if (C.length)
|
|
3839
|
+
if (this.options.transformAttributeName && (j = this.options.transformAttributeName(j)), j === "__proto__" && (j = "#__proto__"), P !== void 0) {
|
|
3840
|
+
this.options.trimValues && (P = P.trim()), P = this.replaceEntitiesValue(P);
|
|
3841
|
+
const F = this.options.attributeValueProcessor(C, P, b);
|
|
3842
|
+
F == null ? O[j] = P : typeof F != typeof P || F !== P ? O[j] = F : O[j] = A(
|
|
3843
|
+
P,
|
|
3844
|
+
this.options.parseAttributeValue,
|
|
3845
|
+
this.options.numberParseOptions
|
|
3846
|
+
);
|
|
3847
|
+
} else this.options.allowBooleanAttributes && (O[j] = !0);
|
|
3848
|
+
}
|
|
3849
|
+
if (!Object.keys(O).length)
|
|
3850
|
+
return;
|
|
3851
|
+
if (this.options.attributesGroupName) {
|
|
3852
|
+
const I = {};
|
|
3853
|
+
return I[this.options.attributesGroupName] = O, I;
|
|
3854
|
+
}
|
|
3855
|
+
return O;
|
|
3856
|
+
}
|
|
3857
|
+
}
|
|
3858
|
+
const f = function(N) {
|
|
3859
|
+
N = N.replace(/\r\n?/g, `
|
|
3860
|
+
`);
|
|
3861
|
+
const b = new e("!xml");
|
|
3862
|
+
let E = b, x = "", T = "";
|
|
3863
|
+
for (let O = 0; O < N.length; O++)
|
|
3864
|
+
if (N[O] === "<")
|
|
3865
|
+
if (N[O + 1] === "/") {
|
|
3866
|
+
const C = y(N, ">", O, "Closing Tag is not closed.");
|
|
3867
|
+
let P = N.substring(O + 2, C).trim();
|
|
3868
|
+
if (this.options.removeNSPrefix) {
|
|
3869
|
+
const $ = P.indexOf(":");
|
|
3870
|
+
$ !== -1 && (P = P.substr($ + 1));
|
|
3871
|
+
}
|
|
3872
|
+
this.options.transformTagName && (P = this.options.transformTagName(P)), E && (x = this.saveTextToParentTag(x, E, T));
|
|
3873
|
+
const j = T.substring(T.lastIndexOf(".") + 1);
|
|
3874
|
+
if (P && this.options.unpairedTags.indexOf(P) !== -1)
|
|
3875
|
+
throw new Error(`Unpaired tag can not be used as closing tag: </${P}>`);
|
|
3876
|
+
let F = 0;
|
|
3877
|
+
j && this.options.unpairedTags.indexOf(j) !== -1 ? (F = T.lastIndexOf(".", T.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : F = T.lastIndexOf("."), T = T.substring(0, F), E = this.tagsNodeStack.pop(), x = "", O = C;
|
|
3878
|
+
} else if (N[O + 1] === "?") {
|
|
3879
|
+
let C = p(N, O, !1, "?>");
|
|
3880
|
+
if (!C) throw new Error("Pi Tag is not closed.");
|
|
3881
|
+
if (x = this.saveTextToParentTag(x, E, T), !(this.options.ignoreDeclaration && C.tagName === "?xml" || this.options.ignorePiTags)) {
|
|
3882
|
+
const P = new e(C.tagName);
|
|
3883
|
+
P.add(this.options.textNodeName, ""), C.tagName !== C.tagExp && C.attrExpPresent && (P[":@"] = this.buildAttributesMap(C.tagExp, T, C.tagName)), this.addChild(E, P, T);
|
|
3884
|
+
}
|
|
3885
|
+
O = C.closeIndex + 1;
|
|
3886
|
+
} else if (N.substr(O + 1, 3) === "!--") {
|
|
3887
|
+
const C = y(N, "-->", O + 4, "Comment is not closed.");
|
|
3888
|
+
if (this.options.commentPropName) {
|
|
3889
|
+
const P = N.substring(O + 4, C - 2);
|
|
3890
|
+
x = this.saveTextToParentTag(x, E, T), E.add(this.options.commentPropName, [{ [this.options.textNodeName]: P }]);
|
|
3891
|
+
}
|
|
3892
|
+
O = C;
|
|
3893
|
+
} else if (N.substr(O + 1, 2) === "!D") {
|
|
3894
|
+
const C = t(N, O);
|
|
3895
|
+
this.docTypeEntities = C.entities, O = C.i;
|
|
3896
|
+
} else if (N.substr(O + 1, 2) === "![") {
|
|
3897
|
+
const C = y(N, "]]>", O, "CDATA is not closed.") - 2, P = N.substring(O + 9, C);
|
|
3898
|
+
x = this.saveTextToParentTag(x, E, T);
|
|
3899
|
+
let j = this.parseTextData(P, E.tagname, T, !0, !1, !0, !0);
|
|
3900
|
+
j == null && (j = ""), this.options.cdataPropName ? E.add(this.options.cdataPropName, [{ [this.options.textNodeName]: P }]) : E.add(this.options.textNodeName, j), O = C + 2;
|
|
3901
|
+
} else {
|
|
3902
|
+
let C = p(N, O, this.options.removeNSPrefix), P = C.tagName;
|
|
3903
|
+
const j = C.rawTagName;
|
|
3904
|
+
let F = C.tagExp, $ = C.attrExpPresent, X = C.closeIndex;
|
|
3905
|
+
this.options.transformTagName && (P = this.options.transformTagName(P)), E && x && E.tagname !== "!xml" && (x = this.saveTextToParentTag(x, E, T, !1));
|
|
3906
|
+
const B = E;
|
|
3907
|
+
if (B && this.options.unpairedTags.indexOf(B.tagname) !== -1 && (E = this.tagsNodeStack.pop(), T = T.substring(0, T.lastIndexOf("."))), P !== b.tagname && (T += T ? "." + P : P), this.isItStopNode(this.options.stopNodes, T, P)) {
|
|
3908
|
+
let R = "";
|
|
3909
|
+
if (F.length > 0 && F.lastIndexOf("/") === F.length - 1)
|
|
3910
|
+
P[P.length - 1] === "/" ? (P = P.substr(0, P.length - 1), T = T.substr(0, T.length - 1), F = P) : F = F.substr(0, F.length - 1), O = C.closeIndex;
|
|
3911
|
+
else if (this.options.unpairedTags.indexOf(P) !== -1)
|
|
3912
|
+
O = C.closeIndex;
|
|
3913
|
+
else {
|
|
3914
|
+
const U = this.readStopNodeData(N, j, X + 1);
|
|
3915
|
+
if (!U) throw new Error(`Unexpected end of ${j}`);
|
|
3916
|
+
O = U.i, R = U.tagContent;
|
|
3917
|
+
}
|
|
3918
|
+
const D = new e(P);
|
|
3919
|
+
P !== F && $ && (D[":@"] = this.buildAttributesMap(F, T, P)), R && (R = this.parseTextData(R, P, T, !0, $, !0, !0)), T = T.substr(0, T.lastIndexOf(".")), D.add(this.options.textNodeName, R), this.addChild(E, D, T);
|
|
3920
|
+
} else {
|
|
3921
|
+
if (F.length > 0 && F.lastIndexOf("/") === F.length - 1) {
|
|
3922
|
+
P[P.length - 1] === "/" ? (P = P.substr(0, P.length - 1), T = T.substr(0, T.length - 1), F = P) : F = F.substr(0, F.length - 1), this.options.transformTagName && (P = this.options.transformTagName(P));
|
|
3923
|
+
const R = new e(P);
|
|
3924
|
+
P !== F && $ && (R[":@"] = this.buildAttributesMap(F, T, P)), this.addChild(E, R, T), T = T.substr(0, T.lastIndexOf("."));
|
|
3925
|
+
} else {
|
|
3926
|
+
const R = new e(P);
|
|
3927
|
+
this.tagsNodeStack.push(E), P !== F && $ && (R[":@"] = this.buildAttributesMap(F, T, P)), this.addChild(E, R, T), E = R;
|
|
3928
|
+
}
|
|
3929
|
+
x = "", O = X;
|
|
3930
|
+
}
|
|
3931
|
+
}
|
|
3932
|
+
else
|
|
3933
|
+
x += N[O];
|
|
3934
|
+
return b.child;
|
|
3935
|
+
};
|
|
3936
|
+
function c(N, b, E) {
|
|
3937
|
+
const x = this.options.updateTag(b.tagname, E, b[":@"]);
|
|
3938
|
+
x === !1 || (typeof x == "string" && (b.tagname = x), N.addChild(b));
|
|
3939
|
+
}
|
|
3940
|
+
const g = function(N) {
|
|
3941
|
+
if (this.options.processEntities) {
|
|
3942
|
+
for (let b in this.docTypeEntities) {
|
|
3943
|
+
const E = this.docTypeEntities[b];
|
|
3944
|
+
N = N.replace(E.regx, E.val);
|
|
3945
|
+
}
|
|
3946
|
+
for (let b in this.lastEntities) {
|
|
3947
|
+
const E = this.lastEntities[b];
|
|
3948
|
+
N = N.replace(E.regex, E.val);
|
|
3949
|
+
}
|
|
3950
|
+
if (this.options.htmlEntities)
|
|
3951
|
+
for (let b in this.htmlEntities) {
|
|
3952
|
+
const E = this.htmlEntities[b];
|
|
3953
|
+
N = N.replace(E.regex, E.val);
|
|
3954
|
+
}
|
|
3955
|
+
N = N.replace(this.ampEntity.regex, this.ampEntity.val);
|
|
3956
|
+
}
|
|
3957
|
+
return N;
|
|
3958
|
+
};
|
|
3959
|
+
function m(N, b, E, x) {
|
|
3960
|
+
return N && (x === void 0 && (x = b.child.length === 0), N = this.parseTextData(
|
|
3961
|
+
N,
|
|
3962
|
+
b.tagname,
|
|
3963
|
+
E,
|
|
3964
|
+
!1,
|
|
3965
|
+
b[":@"] ? Object.keys(b[":@"]).length !== 0 : !1,
|
|
3966
|
+
x
|
|
3967
|
+
), N !== void 0 && N !== "" && b.add(this.options.textNodeName, N), N = ""), N;
|
|
3968
|
+
}
|
|
3969
|
+
function d(N, b, E) {
|
|
3970
|
+
const x = "*." + E;
|
|
3971
|
+
for (const T in N) {
|
|
3972
|
+
const O = N[T];
|
|
3973
|
+
if (x === O || b === O) return !0;
|
|
3974
|
+
}
|
|
3975
|
+
return !1;
|
|
3976
|
+
}
|
|
3977
|
+
function w(N, b, E = ">") {
|
|
3978
|
+
let x, T = "";
|
|
3979
|
+
for (let O = b; O < N.length; O++) {
|
|
3980
|
+
let I = N[O];
|
|
3981
|
+
if (x)
|
|
3982
|
+
I === x && (x = "");
|
|
3983
|
+
else if (I === '"' || I === "'")
|
|
3984
|
+
x = I;
|
|
3985
|
+
else if (I === E[0])
|
|
3986
|
+
if (E[1]) {
|
|
3987
|
+
if (N[O + 1] === E[1])
|
|
3988
|
+
return {
|
|
3989
|
+
data: T,
|
|
3990
|
+
index: O
|
|
3991
|
+
};
|
|
3992
|
+
} else
|
|
3993
|
+
return {
|
|
3994
|
+
data: T,
|
|
3995
|
+
index: O
|
|
3996
|
+
};
|
|
3997
|
+
else I === " " && (I = " ");
|
|
3998
|
+
T += I;
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
4001
|
+
function y(N, b, E, x) {
|
|
4002
|
+
const T = N.indexOf(b, E);
|
|
4003
|
+
if (T === -1)
|
|
4004
|
+
throw new Error(x);
|
|
4005
|
+
return T + b.length - 1;
|
|
4006
|
+
}
|
|
4007
|
+
function p(N, b, E, x = ">") {
|
|
4008
|
+
const T = w(N, b + 1, x);
|
|
4009
|
+
if (!T) return;
|
|
4010
|
+
let O = T.data;
|
|
4011
|
+
const I = T.index, C = O.search(/\s/);
|
|
4012
|
+
let P = O, j = !0;
|
|
4013
|
+
C !== -1 && (P = O.substring(0, C), O = O.substring(C + 1).trimStart());
|
|
4014
|
+
const F = P;
|
|
4015
|
+
if (E) {
|
|
4016
|
+
const $ = P.indexOf(":");
|
|
4017
|
+
$ !== -1 && (P = P.substr($ + 1), j = P !== T.data.substr($ + 1));
|
|
4018
|
+
}
|
|
4019
|
+
return {
|
|
4020
|
+
tagName: P,
|
|
4021
|
+
tagExp: O,
|
|
4022
|
+
closeIndex: I,
|
|
4023
|
+
attrExpPresent: j,
|
|
4024
|
+
rawTagName: F
|
|
4025
|
+
};
|
|
4026
|
+
}
|
|
4027
|
+
function v(N, b, E) {
|
|
4028
|
+
const x = E;
|
|
4029
|
+
let T = 1;
|
|
4030
|
+
for (; E < N.length; E++)
|
|
4031
|
+
if (N[E] === "<")
|
|
4032
|
+
if (N[E + 1] === "/") {
|
|
4033
|
+
const O = y(N, ">", E, `${b} is not closed`);
|
|
4034
|
+
if (N.substring(E + 2, O).trim() === b && (T--, T === 0))
|
|
4035
|
+
return {
|
|
4036
|
+
tagContent: N.substring(x, E),
|
|
4037
|
+
i: O
|
|
4038
|
+
};
|
|
4039
|
+
E = O;
|
|
4040
|
+
} else if (N[E + 1] === "?")
|
|
4041
|
+
E = y(N, "?>", E + 1, "StopNode is not closed.");
|
|
4042
|
+
else if (N.substr(E + 1, 3) === "!--")
|
|
4043
|
+
E = y(N, "-->", E + 3, "StopNode is not closed.");
|
|
4044
|
+
else if (N.substr(E + 1, 2) === "![")
|
|
4045
|
+
E = y(N, "]]>", E, "StopNode is not closed.") - 2;
|
|
4046
|
+
else {
|
|
4047
|
+
const O = p(N, E, ">");
|
|
4048
|
+
O && ((O && O.tagName) === b && O.tagExp[O.tagExp.length - 1] !== "/" && T++, E = O.closeIndex);
|
|
4049
|
+
}
|
|
4050
|
+
}
|
|
4051
|
+
function A(N, b, E) {
|
|
4052
|
+
if (b && typeof N == "string") {
|
|
4053
|
+
const x = N.trim();
|
|
4054
|
+
return x === "true" ? !0 : x === "false" ? !1 : n(N, E);
|
|
4055
|
+
} else
|
|
4056
|
+
return r.isExist(N) ? N : "";
|
|
4057
|
+
}
|
|
4058
|
+
return pt = u, pt;
|
|
4059
|
+
}
|
|
4060
|
+
var gt = {}, gr;
|
|
4061
|
+
function Gs() {
|
|
4062
|
+
if (gr) return gt;
|
|
4063
|
+
gr = 1;
|
|
4064
|
+
function r(u, l) {
|
|
4065
|
+
return e(u, l);
|
|
4066
|
+
}
|
|
4067
|
+
function e(u, l, i) {
|
|
4068
|
+
let h;
|
|
4069
|
+
const a = {};
|
|
4070
|
+
for (let s = 0; s < u.length; s++) {
|
|
4071
|
+
const f = u[s], c = t(f);
|
|
4072
|
+
let g = "";
|
|
4073
|
+
if (i === void 0 ? g = c : g = i + "." + c, c === l.textNodeName)
|
|
4074
|
+
h === void 0 ? h = f[c] : h += "" + f[c];
|
|
4075
|
+
else {
|
|
4076
|
+
if (c === void 0)
|
|
4077
|
+
continue;
|
|
4078
|
+
if (f[c]) {
|
|
4079
|
+
let m = e(f[c], l, g);
|
|
4080
|
+
const d = o(m, l);
|
|
4081
|
+
f[":@"] ? n(m, f[":@"], g, l) : Object.keys(m).length === 1 && m[l.textNodeName] !== void 0 && !l.alwaysCreateTextNode ? m = m[l.textNodeName] : Object.keys(m).length === 0 && (l.alwaysCreateTextNode ? m[l.textNodeName] = "" : m = ""), a[c] !== void 0 && a.hasOwnProperty(c) ? (Array.isArray(a[c]) || (a[c] = [a[c]]), a[c].push(m)) : l.isArray(c, g, d) ? a[c] = [m] : a[c] = m;
|
|
4082
|
+
}
|
|
4083
|
+
}
|
|
4084
|
+
}
|
|
4085
|
+
return typeof h == "string" ? h.length > 0 && (a[l.textNodeName] = h) : h !== void 0 && (a[l.textNodeName] = h), a;
|
|
4086
|
+
}
|
|
4087
|
+
function t(u) {
|
|
4088
|
+
const l = Object.keys(u);
|
|
4089
|
+
for (let i = 0; i < l.length; i++) {
|
|
4090
|
+
const h = l[i];
|
|
4091
|
+
if (h !== ":@") return h;
|
|
4092
|
+
}
|
|
4093
|
+
}
|
|
4094
|
+
function n(u, l, i, h) {
|
|
4095
|
+
if (l) {
|
|
4096
|
+
const a = Object.keys(l), s = a.length;
|
|
4097
|
+
for (let f = 0; f < s; f++) {
|
|
4098
|
+
const c = a[f];
|
|
4099
|
+
h.isArray(c, i + "." + c, !0, !0) ? u[c] = [l[c]] : u[c] = l[c];
|
|
4100
|
+
}
|
|
4101
|
+
}
|
|
4102
|
+
}
|
|
4103
|
+
function o(u, l) {
|
|
4104
|
+
const { textNodeName: i } = l, h = Object.keys(u).length;
|
|
4105
|
+
return !!(h === 0 || h === 1 && (u[i] || typeof u[i] == "boolean" || u[i] === 0));
|
|
4106
|
+
}
|
|
4107
|
+
return gt.prettify = r, gt;
|
|
4108
|
+
}
|
|
4109
|
+
var dt, dr;
|
|
4110
|
+
function zs() {
|
|
4111
|
+
if (dr) return dt;
|
|
4112
|
+
dr = 1;
|
|
4113
|
+
const { buildOptions: r } = Vs(), e = Xs(), { prettify: t } = Gs(), n = Wr();
|
|
4114
|
+
class o {
|
|
4115
|
+
constructor(l) {
|
|
4116
|
+
this.externalEntities = {}, this.options = r(l);
|
|
4117
|
+
}
|
|
4118
|
+
/**
|
|
4119
|
+
* Parse XML dats to JS object
|
|
4120
|
+
* @param {string|Buffer} xmlData
|
|
4121
|
+
* @param {boolean|Object} validationOption
|
|
4122
|
+
*/
|
|
4123
|
+
parse(l, i) {
|
|
4124
|
+
if (typeof l != "string") if (l.toString)
|
|
4125
|
+
l = l.toString();
|
|
4126
|
+
else
|
|
4127
|
+
throw new Error("XML data is accepted in String or Bytes[] form.");
|
|
4128
|
+
if (i) {
|
|
4129
|
+
i === !0 && (i = {});
|
|
4130
|
+
const s = n.validate(l, i);
|
|
4131
|
+
if (s !== !0)
|
|
4132
|
+
throw Error(`${s.err.msg}:${s.err.line}:${s.err.col}`);
|
|
4133
|
+
}
|
|
4134
|
+
const h = new e(this.options);
|
|
4135
|
+
h.addExternalEntities(this.externalEntities);
|
|
4136
|
+
const a = h.parseXml(l);
|
|
4137
|
+
return this.options.preserveOrder || a === void 0 ? a : t(a, this.options);
|
|
4138
|
+
}
|
|
4139
|
+
/**
|
|
4140
|
+
* Add Entity which is not by default supported by this library
|
|
4141
|
+
* @param {string} key
|
|
4142
|
+
* @param {string} value
|
|
4143
|
+
*/
|
|
4144
|
+
addEntity(l, i) {
|
|
4145
|
+
if (i.indexOf("&") !== -1)
|
|
4146
|
+
throw new Error("Entity value can't have '&'");
|
|
4147
|
+
if (l.indexOf("&") !== -1 || l.indexOf(";") !== -1)
|
|
4148
|
+
throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");
|
|
4149
|
+
if (i === "&")
|
|
4150
|
+
throw new Error("An entity with value '&' is not permitted");
|
|
4151
|
+
this.externalEntities[l] = i;
|
|
4152
|
+
}
|
|
4153
|
+
}
|
|
4154
|
+
return dt = o, dt;
|
|
4155
|
+
}
|
|
4156
|
+
var mt, mr;
|
|
4157
|
+
function Hs() {
|
|
4158
|
+
if (mr) return mt;
|
|
4159
|
+
mr = 1;
|
|
4160
|
+
const r = `
|
|
4161
|
+
`;
|
|
4162
|
+
function e(i, h) {
|
|
4163
|
+
let a = "";
|
|
4164
|
+
return h.format && h.indentBy.length > 0 && (a = r), t(i, h, "", a);
|
|
4165
|
+
}
|
|
4166
|
+
function t(i, h, a, s) {
|
|
4167
|
+
let f = "", c = !1;
|
|
4168
|
+
for (let g = 0; g < i.length; g++) {
|
|
4169
|
+
const m = i[g], d = n(m);
|
|
4170
|
+
if (d === void 0) continue;
|
|
4171
|
+
let w = "";
|
|
4172
|
+
if (a.length === 0 ? w = d : w = `${a}.${d}`, d === h.textNodeName) {
|
|
4173
|
+
let N = m[d];
|
|
4174
|
+
u(w, h) || (N = h.tagValueProcessor(d, N), N = l(N, h)), c && (f += s), f += N, c = !1;
|
|
4175
|
+
continue;
|
|
4176
|
+
} else if (d === h.cdataPropName) {
|
|
4177
|
+
c && (f += s), f += `<![CDATA[${m[d][0][h.textNodeName]}]]>`, c = !1;
|
|
4178
|
+
continue;
|
|
4179
|
+
} else if (d === h.commentPropName) {
|
|
4180
|
+
f += s + `<!--${m[d][0][h.textNodeName]}-->`, c = !0;
|
|
4181
|
+
continue;
|
|
4182
|
+
} else if (d[0] === "?") {
|
|
4183
|
+
const N = o(m[":@"], h), b = d === "?xml" ? "" : s;
|
|
4184
|
+
let E = m[d][0][h.textNodeName];
|
|
4185
|
+
E = E.length !== 0 ? " " + E : "", f += b + `<${d}${E}${N}?>`, c = !0;
|
|
4186
|
+
continue;
|
|
4187
|
+
}
|
|
4188
|
+
let y = s;
|
|
4189
|
+
y !== "" && (y += h.indentBy);
|
|
4190
|
+
const p = o(m[":@"], h), v = s + `<${d}${p}`, A = t(m[d], h, w, y);
|
|
4191
|
+
h.unpairedTags.indexOf(d) !== -1 ? h.suppressUnpairedNode ? f += v + ">" : f += v + "/>" : (!A || A.length === 0) && h.suppressEmptyNode ? f += v + "/>" : A && A.endsWith(">") ? f += v + `>${A}${s}</${d}>` : (f += v + ">", A && s !== "" && (A.includes("/>") || A.includes("</")) ? f += s + h.indentBy + A + s : f += A, f += `</${d}>`), c = !0;
|
|
4192
|
+
}
|
|
4193
|
+
return f;
|
|
4194
|
+
}
|
|
4195
|
+
function n(i) {
|
|
4196
|
+
const h = Object.keys(i);
|
|
4197
|
+
for (let a = 0; a < h.length; a++) {
|
|
4198
|
+
const s = h[a];
|
|
4199
|
+
if (i.hasOwnProperty(s) && s !== ":@")
|
|
4200
|
+
return s;
|
|
4201
|
+
}
|
|
4202
|
+
}
|
|
4203
|
+
function o(i, h) {
|
|
4204
|
+
let a = "";
|
|
4205
|
+
if (i && !h.ignoreAttributes)
|
|
4206
|
+
for (let s in i) {
|
|
4207
|
+
if (!i.hasOwnProperty(s)) continue;
|
|
4208
|
+
let f = h.attributeValueProcessor(s, i[s]);
|
|
4209
|
+
f = l(f, h), f === !0 && h.suppressBooleanAttributes ? a += ` ${s.substr(h.attributeNamePrefix.length)}` : a += ` ${s.substr(h.attributeNamePrefix.length)}="${f}"`;
|
|
4210
|
+
}
|
|
4211
|
+
return a;
|
|
4212
|
+
}
|
|
4213
|
+
function u(i, h) {
|
|
4214
|
+
i = i.substr(0, i.length - h.textNodeName.length - 1);
|
|
4215
|
+
let a = i.substr(i.lastIndexOf(".") + 1);
|
|
4216
|
+
for (let s in h.stopNodes)
|
|
4217
|
+
if (h.stopNodes[s] === i || h.stopNodes[s] === "*." + a) return !0;
|
|
4218
|
+
return !1;
|
|
4219
|
+
}
|
|
4220
|
+
function l(i, h) {
|
|
4221
|
+
if (i && i.length > 0 && h.processEntities)
|
|
4222
|
+
for (let a = 0; a < h.entities.length; a++) {
|
|
4223
|
+
const s = h.entities[a];
|
|
4224
|
+
i = i.replace(s.regex, s.val);
|
|
4225
|
+
}
|
|
4226
|
+
return i;
|
|
4227
|
+
}
|
|
4228
|
+
return mt = e, mt;
|
|
4229
|
+
}
|
|
4230
|
+
var bt, br;
|
|
4231
|
+
function Zs() {
|
|
4232
|
+
if (br) return bt;
|
|
4233
|
+
br = 1;
|
|
4234
|
+
const r = Hs(), e = Xr(), t = {
|
|
4235
|
+
attributeNamePrefix: "@_",
|
|
4236
|
+
attributesGroupName: !1,
|
|
4237
|
+
textNodeName: "#text",
|
|
4238
|
+
ignoreAttributes: !0,
|
|
4239
|
+
cdataPropName: !1,
|
|
4240
|
+
format: !1,
|
|
4241
|
+
indentBy: " ",
|
|
4242
|
+
suppressEmptyNode: !1,
|
|
4243
|
+
suppressUnpairedNode: !0,
|
|
4244
|
+
suppressBooleanAttributes: !0,
|
|
4245
|
+
tagValueProcessor: function(i, h) {
|
|
4246
|
+
return h;
|
|
4247
|
+
},
|
|
4248
|
+
attributeValueProcessor: function(i, h) {
|
|
4249
|
+
return h;
|
|
4250
|
+
},
|
|
4251
|
+
preserveOrder: !1,
|
|
4252
|
+
commentPropName: !1,
|
|
4253
|
+
unpairedTags: [],
|
|
4254
|
+
entities: [
|
|
4255
|
+
{ regex: new RegExp("&", "g"), val: "&" },
|
|
4256
|
+
//it must be on top
|
|
4257
|
+
{ regex: new RegExp(">", "g"), val: ">" },
|
|
4258
|
+
{ regex: new RegExp("<", "g"), val: "<" },
|
|
4259
|
+
{ regex: new RegExp("'", "g"), val: "'" },
|
|
4260
|
+
{ regex: new RegExp('"', "g"), val: """ }
|
|
4261
|
+
],
|
|
4262
|
+
processEntities: !0,
|
|
4263
|
+
stopNodes: [],
|
|
4264
|
+
// transformTagName: false,
|
|
4265
|
+
// transformAttributeName: false,
|
|
4266
|
+
oneListGroup: !1
|
|
4267
|
+
};
|
|
4268
|
+
function n(i) {
|
|
4269
|
+
this.options = Object.assign({}, t, i), this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
|
|
4270
|
+
return !1;
|
|
4271
|
+
} : (this.ignoreAttributesFn = e(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = l), this.processTextOrObjNode = o, this.options.format ? (this.indentate = u, this.tagEndChar = `>
|
|
4272
|
+
`, this.newLine = `
|
|
4273
|
+
`) : (this.indentate = function() {
|
|
4274
|
+
return "";
|
|
4275
|
+
}, this.tagEndChar = ">", this.newLine = "");
|
|
4276
|
+
}
|
|
4277
|
+
n.prototype.build = function(i) {
|
|
4278
|
+
return this.options.preserveOrder ? r(i, this.options) : (Array.isArray(i) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (i = {
|
|
4279
|
+
[this.options.arrayNodeName]: i
|
|
4280
|
+
}), this.j2x(i, 0, []).val);
|
|
4281
|
+
}, n.prototype.j2x = function(i, h, a) {
|
|
4282
|
+
let s = "", f = "";
|
|
4283
|
+
const c = a.join(".");
|
|
4284
|
+
for (let g in i)
|
|
4285
|
+
if (Object.prototype.hasOwnProperty.call(i, g))
|
|
4286
|
+
if (typeof i[g] > "u")
|
|
4287
|
+
this.isAttribute(g) && (f += "");
|
|
4288
|
+
else if (i[g] === null)
|
|
4289
|
+
this.isAttribute(g) || g === this.options.cdataPropName ? f += "" : g[0] === "?" ? f += this.indentate(h) + "<" + g + "?" + this.tagEndChar : f += this.indentate(h) + "<" + g + "/" + this.tagEndChar;
|
|
4290
|
+
else if (i[g] instanceof Date)
|
|
4291
|
+
f += this.buildTextValNode(i[g], g, "", h);
|
|
4292
|
+
else if (typeof i[g] != "object") {
|
|
4293
|
+
const m = this.isAttribute(g);
|
|
4294
|
+
if (m && !this.ignoreAttributesFn(m, c))
|
|
4295
|
+
s += this.buildAttrPairStr(m, "" + i[g]);
|
|
4296
|
+
else if (!m)
|
|
4297
|
+
if (g === this.options.textNodeName) {
|
|
4298
|
+
let d = this.options.tagValueProcessor(g, "" + i[g]);
|
|
4299
|
+
f += this.replaceEntitiesValue(d);
|
|
4300
|
+
} else
|
|
4301
|
+
f += this.buildTextValNode(i[g], g, "", h);
|
|
4302
|
+
} else if (Array.isArray(i[g])) {
|
|
4303
|
+
const m = i[g].length;
|
|
4304
|
+
let d = "", w = "";
|
|
4305
|
+
for (let y = 0; y < m; y++) {
|
|
4306
|
+
const p = i[g][y];
|
|
4307
|
+
if (!(typeof p > "u")) if (p === null)
|
|
4308
|
+
g[0] === "?" ? f += this.indentate(h) + "<" + g + "?" + this.tagEndChar : f += this.indentate(h) + "<" + g + "/" + this.tagEndChar;
|
|
4309
|
+
else if (typeof p == "object")
|
|
4310
|
+
if (this.options.oneListGroup) {
|
|
4311
|
+
const v = this.j2x(p, h + 1, a.concat(g));
|
|
4312
|
+
d += v.val, this.options.attributesGroupName && p.hasOwnProperty(this.options.attributesGroupName) && (w += v.attrStr);
|
|
4313
|
+
} else
|
|
4314
|
+
d += this.processTextOrObjNode(p, g, h, a);
|
|
4315
|
+
else if (this.options.oneListGroup) {
|
|
4316
|
+
let v = this.options.tagValueProcessor(g, p);
|
|
4317
|
+
v = this.replaceEntitiesValue(v), d += v;
|
|
4318
|
+
} else
|
|
4319
|
+
d += this.buildTextValNode(p, g, "", h);
|
|
4320
|
+
}
|
|
4321
|
+
this.options.oneListGroup && (d = this.buildObjectNode(d, g, w, h)), f += d;
|
|
4322
|
+
} else if (this.options.attributesGroupName && g === this.options.attributesGroupName) {
|
|
4323
|
+
const m = Object.keys(i[g]), d = m.length;
|
|
4324
|
+
for (let w = 0; w < d; w++)
|
|
4325
|
+
s += this.buildAttrPairStr(m[w], "" + i[g][m[w]]);
|
|
4326
|
+
} else
|
|
4327
|
+
f += this.processTextOrObjNode(i[g], g, h, a);
|
|
4328
|
+
return { attrStr: s, val: f };
|
|
4329
|
+
}, n.prototype.buildAttrPairStr = function(i, h) {
|
|
4330
|
+
return h = this.options.attributeValueProcessor(i, "" + h), h = this.replaceEntitiesValue(h), this.options.suppressBooleanAttributes && h === "true" ? " " + i : " " + i + '="' + h + '"';
|
|
4331
|
+
};
|
|
4332
|
+
function o(i, h, a, s) {
|
|
4333
|
+
const f = this.j2x(i, a + 1, s.concat(h));
|
|
4334
|
+
return i[this.options.textNodeName] !== void 0 && Object.keys(i).length === 1 ? this.buildTextValNode(i[this.options.textNodeName], h, f.attrStr, a) : this.buildObjectNode(f.val, h, f.attrStr, a);
|
|
4335
|
+
}
|
|
4336
|
+
n.prototype.buildObjectNode = function(i, h, a, s) {
|
|
4337
|
+
if (i === "")
|
|
4338
|
+
return h[0] === "?" ? this.indentate(s) + "<" + h + a + "?" + this.tagEndChar : this.indentate(s) + "<" + h + a + this.closeTag(h) + this.tagEndChar;
|
|
4339
|
+
{
|
|
4340
|
+
let f = "</" + h + this.tagEndChar, c = "";
|
|
4341
|
+
return h[0] === "?" && (c = "?", f = ""), (a || a === "") && i.indexOf("<") === -1 ? this.indentate(s) + "<" + h + a + c + ">" + i + f : this.options.commentPropName !== !1 && h === this.options.commentPropName && c.length === 0 ? this.indentate(s) + `<!--${i}-->` + this.newLine : this.indentate(s) + "<" + h + a + c + this.tagEndChar + i + this.indentate(s) + f;
|
|
4342
|
+
}
|
|
4343
|
+
}, n.prototype.closeTag = function(i) {
|
|
4344
|
+
let h = "";
|
|
4345
|
+
return this.options.unpairedTags.indexOf(i) !== -1 ? this.options.suppressUnpairedNode || (h = "/") : this.options.suppressEmptyNode ? h = "/" : h = `></${i}`, h;
|
|
4346
|
+
}, n.prototype.buildTextValNode = function(i, h, a, s) {
|
|
4347
|
+
if (this.options.cdataPropName !== !1 && h === this.options.cdataPropName)
|
|
4348
|
+
return this.indentate(s) + `<![CDATA[${i}]]>` + this.newLine;
|
|
4349
|
+
if (this.options.commentPropName !== !1 && h === this.options.commentPropName)
|
|
4350
|
+
return this.indentate(s) + `<!--${i}-->` + this.newLine;
|
|
4351
|
+
if (h[0] === "?")
|
|
4352
|
+
return this.indentate(s) + "<" + h + a + "?" + this.tagEndChar;
|
|
4353
|
+
{
|
|
4354
|
+
let f = this.options.tagValueProcessor(h, i);
|
|
4355
|
+
return f = this.replaceEntitiesValue(f), f === "" ? this.indentate(s) + "<" + h + a + this.closeTag(h) + this.tagEndChar : this.indentate(s) + "<" + h + a + ">" + f + "</" + h + this.tagEndChar;
|
|
4356
|
+
}
|
|
4357
|
+
}, n.prototype.replaceEntitiesValue = function(i) {
|
|
4358
|
+
if (i && i.length > 0 && this.options.processEntities)
|
|
4359
|
+
for (let h = 0; h < this.options.entities.length; h++) {
|
|
4360
|
+
const a = this.options.entities[h];
|
|
4361
|
+
i = i.replace(a.regex, a.val);
|
|
4362
|
+
}
|
|
4363
|
+
return i;
|
|
4364
|
+
};
|
|
4365
|
+
function u(i) {
|
|
4366
|
+
return this.options.indentBy.repeat(i);
|
|
4367
|
+
}
|
|
4368
|
+
function l(i) {
|
|
4369
|
+
return i.startsWith(this.options.attributeNamePrefix) && i !== this.options.textNodeName ? i.substr(this.attrPrefixLen) : !1;
|
|
4370
|
+
}
|
|
4371
|
+
return bt = n, bt;
|
|
4372
|
+
}
|
|
4373
|
+
var yt, yr;
|
|
4374
|
+
function Js() {
|
|
4375
|
+
if (yr) return yt;
|
|
4376
|
+
yr = 1;
|
|
4377
|
+
const r = Wr(), e = zs(), t = Zs();
|
|
4378
|
+
return yt = {
|
|
4379
|
+
XMLParser: e,
|
|
4380
|
+
XMLValidator: r,
|
|
4381
|
+
XMLBuilder: t
|
|
4382
|
+
}, yt;
|
|
4383
|
+
}
|
|
4384
|
+
var Lt = Js();
|
|
4385
|
+
const At = (r, e) => Object.fromEntries(
|
|
4386
|
+
Object.entries(r).map(([t, n]) => e.includes(t) ? [t, n || ""] : [je.DavNamespace.includes(t) ? `d:${t}` : `oc:${t}`, n || ""])
|
|
4387
|
+
), vr = (r = [], {
|
|
4388
|
+
pattern: e,
|
|
4389
|
+
filterRules: t,
|
|
4390
|
+
limit: n = 0,
|
|
4391
|
+
extraProps: o = []
|
|
4392
|
+
}) => {
|
|
4393
|
+
let u = "d:propfind";
|
|
4394
|
+
e && (u = "oc:search-files"), t && (u = "oc:filter-files");
|
|
4395
|
+
const l = r.reduce((s, f) => Object.assign(s, { [f]: null }), {}), i = At(l, o), h = {
|
|
4396
|
+
[u]: {
|
|
4397
|
+
"d:prop": i,
|
|
4398
|
+
"@@xmlns:d": "DAV:",
|
|
4399
|
+
"@@xmlns:oc": "http://owncloud.org/ns",
|
|
4400
|
+
...e && {
|
|
4401
|
+
"oc:search": { "oc:pattern": e, "oc:limit": n }
|
|
4402
|
+
},
|
|
4403
|
+
...t && {
|
|
4404
|
+
"oc:filter-rules": At(t, [])
|
|
4405
|
+
}
|
|
4406
|
+
}
|
|
4407
|
+
};
|
|
4408
|
+
return new Lt.XMLBuilder({
|
|
4409
|
+
format: !0,
|
|
4410
|
+
ignoreAttributes: !1,
|
|
4411
|
+
attributeNamePrefix: "@@",
|
|
4412
|
+
suppressEmptyNode: !0
|
|
4413
|
+
}).build(h);
|
|
4414
|
+
}, Ys = (r) => {
|
|
4415
|
+
const e = {
|
|
4416
|
+
"d:propertyupdate": {
|
|
4417
|
+
"d:set": { "d:prop": At(r, []) },
|
|
4418
|
+
"@@xmlns:d": "DAV:",
|
|
4419
|
+
"@@xmlns:oc": "http://owncloud.org/ns"
|
|
4420
|
+
}
|
|
4421
|
+
};
|
|
4422
|
+
return new Lt.XMLBuilder({
|
|
4423
|
+
format: !0,
|
|
4424
|
+
ignoreAttributes: !1,
|
|
4425
|
+
attributeNamePrefix: "@@",
|
|
4426
|
+
suppressEmptyNode: !0
|
|
4427
|
+
}).build(e);
|
|
4428
|
+
}, Ks = (r) => {
|
|
4429
|
+
const e = {}, t = r.get("tus-version");
|
|
4430
|
+
return t ? (e.version = t.split(","), r.get("tus-extension") && (e.extension = r.get("tus-extension").split(",")), r.get("tus-resumable") && (e.resumable = r.get("tus-resumable")), r.get("tus-max-size") && (e.maxSize = parseInt(r.get("tus-max-size"), 10)), e) : null;
|
|
4431
|
+
}, Qs = async (r) => {
|
|
4432
|
+
const e = (n) => {
|
|
4433
|
+
const o = decodeURIComponent(n);
|
|
4434
|
+
return n != null && n.startsWith("/remote.php/dav/") ? q(o.replace("/remote.php/dav/", ""), {
|
|
4435
|
+
leadingSlash: !0,
|
|
4436
|
+
trailingSlash: !1
|
|
4437
|
+
}) : o;
|
|
4438
|
+
};
|
|
4439
|
+
return (await $s(r)).multistatus.response.map(({ href: n, propstat: o }) => {
|
|
4440
|
+
const u = {
|
|
4441
|
+
...Rs(o.prop, e(n), !0),
|
|
4442
|
+
processing: o.status === "HTTP/1.1 425 TOO EARLY"
|
|
4443
|
+
};
|
|
4444
|
+
return u.props.name && (u.props.name = u.props.name.toString()), u;
|
|
4445
|
+
});
|
|
4446
|
+
}, Ds = (r) => {
|
|
4447
|
+
const e = new Lt.XMLParser(), t = { message: "Unknown error", errorCode: void 0 };
|
|
4448
|
+
try {
|
|
4449
|
+
const n = e.parse(r);
|
|
4450
|
+
if (!n["d:error"])
|
|
4451
|
+
return t;
|
|
4452
|
+
if (n["d:error"]["s:message"]) {
|
|
4453
|
+
const o = n["d:error"]["s:message"];
|
|
4454
|
+
typeof o == "string" && (t.message = o);
|
|
4455
|
+
}
|
|
4456
|
+
if (n["d:error"]["s:errorcode"]) {
|
|
4457
|
+
const o = n["d:error"]["s:errorcode"];
|
|
4458
|
+
typeof o == "string" && (t.errorCode = o);
|
|
4459
|
+
}
|
|
4460
|
+
} catch {
|
|
4461
|
+
return t;
|
|
4462
|
+
}
|
|
4463
|
+
return t;
|
|
4464
|
+
};
|
|
4465
|
+
class ei {
|
|
4466
|
+
constructor({ baseUrl: e, headers: t }) {
|
|
4467
|
+
k(this, "client");
|
|
4468
|
+
k(this, "davPath");
|
|
4469
|
+
k(this, "headers");
|
|
4470
|
+
k(this, "extraProps");
|
|
4471
|
+
this.davPath = q(e, "remote.php/dav"), this.client = js(this.davPath, {}), this.headers = t, this.extraProps = [];
|
|
4472
|
+
}
|
|
4473
|
+
mkcol(e, t = {}) {
|
|
4474
|
+
return this.request(e, { method: de.mkcol, ...t });
|
|
4475
|
+
}
|
|
4476
|
+
async propfind(e, {
|
|
4477
|
+
depth: t = 1,
|
|
4478
|
+
properties: n = [],
|
|
4479
|
+
headers: o = {},
|
|
4480
|
+
...u
|
|
4481
|
+
} = {}) {
|
|
4482
|
+
const l = { ...o, Depth: t.toString() }, { body: i, result: h } = await this.request(e, {
|
|
4483
|
+
method: de.propfind,
|
|
4484
|
+
data: vr(n, { extraProps: this.extraProps }),
|
|
4485
|
+
headers: l,
|
|
4486
|
+
...u
|
|
4487
|
+
});
|
|
4488
|
+
return i != null && i.length && (i[0].tusSupport = Ks(h.headers)), i;
|
|
4489
|
+
}
|
|
4490
|
+
async report(e, {
|
|
4491
|
+
pattern: t = "",
|
|
4492
|
+
filterRules: n = null,
|
|
4493
|
+
limit: o = 30,
|
|
4494
|
+
properties: u,
|
|
4495
|
+
...l
|
|
4496
|
+
} = {}) {
|
|
4497
|
+
const { body: i, result: h } = await this.request(e, {
|
|
4498
|
+
method: de.report,
|
|
4499
|
+
data: vr(u, {
|
|
4500
|
+
pattern: t,
|
|
4501
|
+
filterRules: n,
|
|
4502
|
+
limit: o,
|
|
4503
|
+
extraProps: this.extraProps
|
|
4504
|
+
}),
|
|
4505
|
+
...l
|
|
4506
|
+
});
|
|
4507
|
+
return {
|
|
4508
|
+
results: i,
|
|
4509
|
+
range: h.headers.get("content-range")
|
|
4510
|
+
};
|
|
4511
|
+
}
|
|
4512
|
+
copy(e, t, { overwrite: n = !1, headers: o = {}, ...u } = {}) {
|
|
4513
|
+
const l = q(this.davPath, _e(t));
|
|
4514
|
+
return this.request(e, {
|
|
4515
|
+
method: de.copy,
|
|
4516
|
+
headers: { ...o, Destination: l, overwrite: n ? "T" : "F" },
|
|
4517
|
+
...u
|
|
4518
|
+
});
|
|
4519
|
+
}
|
|
4520
|
+
move(e, t, { overwrite: n = !1, headers: o = {}, ...u } = {}) {
|
|
4521
|
+
const l = q(this.davPath, _e(t));
|
|
4522
|
+
return this.request(e, {
|
|
4523
|
+
method: de.move,
|
|
4524
|
+
headers: { ...o, Destination: l, overwrite: n ? "T" : "F" },
|
|
4525
|
+
...u
|
|
4526
|
+
});
|
|
4527
|
+
}
|
|
4528
|
+
put(e, t, {
|
|
4529
|
+
headers: n = {},
|
|
4530
|
+
onUploadProgress: o,
|
|
4531
|
+
previousEntityTag: u,
|
|
4532
|
+
overwrite: l,
|
|
4533
|
+
...i
|
|
4534
|
+
} = {}) {
|
|
4535
|
+
const h = { ...n };
|
|
4536
|
+
return u ? h["If-Match"] = u : l || (h["If-None-Match"] = "*"), this.request(e, {
|
|
4537
|
+
method: de.put,
|
|
4538
|
+
data: t,
|
|
4539
|
+
headers: h,
|
|
4540
|
+
onUploadProgress: o,
|
|
4541
|
+
...i
|
|
4542
|
+
});
|
|
4543
|
+
}
|
|
4544
|
+
delete(e, t = {}) {
|
|
4545
|
+
return this.request(e, { method: de.delete, ...t });
|
|
4546
|
+
}
|
|
4547
|
+
propPatch(e, t, n = {}) {
|
|
4548
|
+
const o = Ys(t);
|
|
4549
|
+
return this.request(e, { method: de.proppatch, data: o, ...n });
|
|
4550
|
+
}
|
|
4551
|
+
getFileUrl(e) {
|
|
4552
|
+
return q(this.davPath, _e(e));
|
|
4553
|
+
}
|
|
4554
|
+
buildHeaders(e = {}) {
|
|
4555
|
+
return {
|
|
4556
|
+
"Content-Type": "application/xml; charset=utf-8",
|
|
4557
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
4558
|
+
"X-Request-ID": Ms(),
|
|
4559
|
+
...this.headers && { ...this.headers() },
|
|
4560
|
+
...e
|
|
4561
|
+
};
|
|
4562
|
+
}
|
|
4563
|
+
async request(e, t) {
|
|
4564
|
+
const n = q(this.davPath, _e(e), { leadingSlash: !0 }), o = {
|
|
4565
|
+
...t,
|
|
4566
|
+
url: n,
|
|
4567
|
+
headers: this.buildHeaders(t.headers || {})
|
|
4568
|
+
};
|
|
4569
|
+
try {
|
|
4570
|
+
const u = await this.client.customRequest("", o);
|
|
4571
|
+
let l;
|
|
4572
|
+
if (u.status === 207) {
|
|
4573
|
+
const i = await u.text();
|
|
4574
|
+
l = await Qs(i);
|
|
4575
|
+
}
|
|
4576
|
+
return {
|
|
4577
|
+
body: l,
|
|
4578
|
+
status: u.status,
|
|
4579
|
+
result: u
|
|
4580
|
+
};
|
|
4581
|
+
} catch (u) {
|
|
4582
|
+
const { response: l } = u, i = await l.text(), h = Ds(i);
|
|
4583
|
+
throw new Qr(
|
|
4584
|
+
h.message,
|
|
4585
|
+
h.errorCode,
|
|
4586
|
+
l,
|
|
4587
|
+
l.status
|
|
4588
|
+
);
|
|
4589
|
+
}
|
|
4590
|
+
}
|
|
4591
|
+
}
|
|
4592
|
+
const ti = (r, e) => ({
|
|
4593
|
+
async listFileVersions(t, n = {}) {
|
|
4594
|
+
const [o, ...u] = await r.propfind(
|
|
4595
|
+
q("meta", t, "v", { leadingSlash: !0 }),
|
|
4596
|
+
n
|
|
4597
|
+
);
|
|
4598
|
+
return u.map((l) => Ae(l, r.extraProps));
|
|
4599
|
+
}
|
|
4600
|
+
}), ri = (r, e) => ({
|
|
4601
|
+
setFavorite(t, { path: n }, o, u = {}) {
|
|
4602
|
+
const l = { [$e.IsFavorite]: o ? "true" : "false" };
|
|
4603
|
+
return r.propPatch(q(t.webDavPath, n), l, u);
|
|
4604
|
+
}
|
|
4605
|
+
}), ni = (r, e) => ({
|
|
4606
|
+
listFavoriteFiles({
|
|
4607
|
+
davProperties: t = je.Default,
|
|
4608
|
+
username: n = "",
|
|
4609
|
+
...o
|
|
4610
|
+
} = {}) {
|
|
4611
|
+
return r.report(q("files", n), {
|
|
4612
|
+
properties: t,
|
|
4613
|
+
filterRules: { favorite: 1 },
|
|
4614
|
+
...o
|
|
4615
|
+
});
|
|
4616
|
+
}
|
|
4617
|
+
}), ci = (r, e) => {
|
|
4618
|
+
const t = Zr.create();
|
|
4619
|
+
e && t.interceptors.request.use((P) => (Object.assign(P.headers, e()), P));
|
|
4620
|
+
const n = { axiosClient: t, baseUrl: r }, o = new ei({ baseUrl: r, headers: e }), u = (P) => {
|
|
4621
|
+
o.extraProps.push(P);
|
|
4622
|
+
}, l = gn(o), { getPathForFileId: i } = l, h = on(o, l), { listFiles: a } = h, s = rn(h), { getFileInfo: f } = s, { createFolder: c } = en(o, s), g = tn(o, n), { getFileContents: m } = g, { putFileContents: d } = un(o, s), { getFileUrl: w, revokeUrl: y } = nn(o, g, n), { getPublicFileUrl: p } = sn(o), { copyFiles: v } = Dr(o), { moveFiles: A } = an(o), { deleteFile: N } = ln(o), { restoreFile: b } = cn(o), { listFileVersions: E } = ti(o), { restoreFileVersion: x } = hn(o), { clearTrashBin: T } = fn(o), { search: O } = pn(o), { listFavoriteFiles: I } = ni(o), { setFavorite: C } = ri(o);
|
|
4623
|
+
return {
|
|
4624
|
+
copyFiles: v,
|
|
4625
|
+
createFolder: c,
|
|
4626
|
+
deleteFile: N,
|
|
4627
|
+
restoreFile: b,
|
|
4628
|
+
restoreFileVersion: x,
|
|
4629
|
+
getFileContents: m,
|
|
4630
|
+
getFileInfo: f,
|
|
4631
|
+
getFileUrl: w,
|
|
4632
|
+
getPublicFileUrl: p,
|
|
4633
|
+
getPathForFileId: i,
|
|
4634
|
+
listFiles: a,
|
|
4635
|
+
listFileVersions: E,
|
|
4636
|
+
moveFiles: A,
|
|
4637
|
+
putFileContents: d,
|
|
4638
|
+
revokeUrl: y,
|
|
4639
|
+
clearTrashBin: T,
|
|
4640
|
+
search: O,
|
|
4641
|
+
listFavoriteFiles: I,
|
|
4642
|
+
setFavorite: C,
|
|
4643
|
+
registerExtraProp: u
|
|
4644
|
+
};
|
|
4645
|
+
};
|
|
4646
|
+
export {
|
|
4647
|
+
Qr as D,
|
|
4648
|
+
Nr as H,
|
|
4649
|
+
_e as e,
|
|
4650
|
+
ci as w
|
|
4651
|
+
};
|