@delta-comic/plugin 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +3 -0
- package/dist/index.js +1386 -964
- package/dist/index.js.map +1 -1
- package/dist/lib/driver/init/booter/40_auth.d.ts +1 -1
- package/dist/pack.tgz +0 -0
- package/package.json +12 -6
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { DBUtils, PluginArchiveDB, SubscribeDB, db, useNativeStore } from "@delta-comic/db";
|
|
2
|
-
import { useGlobalVar } from "@delta-comic/utils";
|
|
3
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, getCurrentInstance, getCurrentScope, h, hasInjectionContext, inject, isRef, markRaw, mergeProps, onMounted, openBlock, reactive, ref, renderList, resolveDynamicComponent, shallowReactive, shallowRef, toValue, unref, watch, watchEffect, withCtx } from "vue";
|
|
4
|
-
import { defineStore } from "pinia";
|
|
5
|
-
import { PromiseContent, SourcedKeyMap, uni } from "@delta-comic/model";
|
|
6
|
-
import { SharedFunction } from "@delta-comic/core";
|
|
7
|
-
import { DcAwait, DcPopup, createDialog, createDownloadMessage, createForm } from "@delta-comic/ui";
|
|
8
|
-
import
|
|
9
|
-
var
|
|
1
|
+
import { DBUtils as e, PluginArchiveDB as t, SubscribeDB as n, db as r, useNativeStore as i } from "@delta-comic/db";
|
|
2
|
+
import { useGlobalVar as a } from "@delta-comic/utils";
|
|
3
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createVNode as d, defineComponent as f, getCurrentInstance as p, getCurrentScope as m, h, hasInjectionContext as g, inject as _, isRef as v, markRaw as y, mergeProps as b, onMounted as x, openBlock as S, reactive as C, ref as w, renderList as T, resolveDynamicComponent as E, shallowReactive as D, shallowRef as O, toValue as k, unref as A, watch as j, watchEffect as M, withCtx as N } from "vue";
|
|
4
|
+
import { defineStore as P } from "pinia";
|
|
5
|
+
import { PromiseContent as F, SourcedKeyMap as I, uni as L } from "@delta-comic/model";
|
|
6
|
+
import { SharedFunction as R } from "@delta-comic/core";
|
|
7
|
+
import { DcAwait as z, DcPopup as B, createDialog as V, createDownloadMessage as H, createForm as U } from "@delta-comic/ui";
|
|
8
|
+
import W from "axios";
|
|
9
|
+
var G = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), K = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
10
10
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
11
11
|
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
12
12
|
});
|
|
13
|
-
function
|
|
13
|
+
function q(e, t = 1) {
|
|
14
14
|
let n = [], r = Math.floor(t), i = (e, t) => {
|
|
15
15
|
for (let a = 0; a < e.length; a++) {
|
|
16
16
|
let o = e[a];
|
|
@@ -19,7 +19,7 @@ function flatten(e, t = 1) {
|
|
|
19
19
|
};
|
|
20
20
|
return i(e, 0), n;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function ee(e, t) {
|
|
23
23
|
let n = e.slice(), r = [], i = 0;
|
|
24
24
|
for (let a = 0; a < e.length; a++) {
|
|
25
25
|
if (t(e[a], a, n)) {
|
|
@@ -34,28 +34,28 @@ function remove$1(e, t) {
|
|
|
34
34
|
}
|
|
35
35
|
return e.length = i, r;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function te(e) {
|
|
38
38
|
return typeof e == "symbol" || e instanceof Symbol;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function ne(e) {
|
|
41
41
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function re(e) {
|
|
44
44
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function ie(e, t) {
|
|
47
47
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function ae(e) {
|
|
50
50
|
return Number.isSafeInteger(e) && e >= 0;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function oe(e) {
|
|
53
53
|
return typeof e == "string";
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function se(e) {
|
|
56
56
|
return e === void 0;
|
|
57
57
|
}
|
|
58
|
-
var
|
|
58
|
+
var ce = class {
|
|
59
59
|
capacity;
|
|
60
60
|
available;
|
|
61
61
|
deferredTasks = [];
|
|
@@ -79,8 +79,8 @@ var Semaphore = class {
|
|
|
79
79
|
}
|
|
80
80
|
this.available < this.capacity && this.available++;
|
|
81
81
|
}
|
|
82
|
-
},
|
|
83
|
-
semaphore = new
|
|
82
|
+
}, le = class {
|
|
83
|
+
semaphore = new ce(1);
|
|
84
84
|
get isLocked() {
|
|
85
85
|
return this.semaphore.available === 0;
|
|
86
86
|
}
|
|
@@ -91,23 +91,23 @@ var Semaphore = class {
|
|
|
91
91
|
this.semaphore.release();
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
function
|
|
95
|
-
return e != null && typeof e != "function" &&
|
|
94
|
+
function ue(e) {
|
|
95
|
+
return e != null && typeof e != "function" && ae(e.length);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function de(e) {
|
|
98
98
|
return typeof e == "string" || typeof e == "symbol" ? e : Object.is(e?.valueOf?.(), -0) ? "-0" : String(e);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function fe(e) {
|
|
101
101
|
if (e == null) return "";
|
|
102
102
|
if (typeof e == "string") return e;
|
|
103
|
-
if (Array.isArray(e)) return e.map(
|
|
103
|
+
if (Array.isArray(e)) return e.map(fe).join(",");
|
|
104
104
|
let t = String(e);
|
|
105
105
|
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
if (Array.isArray(e)) return e.map(
|
|
107
|
+
function pe(e) {
|
|
108
|
+
if (Array.isArray(e)) return e.map(de);
|
|
109
109
|
if (typeof e == "symbol") return [e];
|
|
110
|
-
e =
|
|
110
|
+
e = fe(e);
|
|
111
111
|
let t = [], n = e.length;
|
|
112
112
|
if (n === 0) return t;
|
|
113
113
|
let r = 0, i = "", a = "", o = !1;
|
|
@@ -117,29 +117,29 @@ function toPath(e) {
|
|
|
117
117
|
}
|
|
118
118
|
return i && t.push(i), t;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function me(e) {
|
|
121
121
|
return e !== null && (typeof e == "object" || typeof e == "function");
|
|
122
122
|
}
|
|
123
|
-
var
|
|
124
|
-
function
|
|
123
|
+
var he = /^(?:0|[1-9]\d*)$/;
|
|
124
|
+
function ge(e, t = 2 ** 53 - 1) {
|
|
125
125
|
switch (typeof e) {
|
|
126
126
|
case "number": return Number.isInteger(e) && e >= 0 && e < t;
|
|
127
127
|
case "symbol": return !1;
|
|
128
|
-
case "string": return
|
|
128
|
+
case "string": return he.test(e);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
return typeof e == "object" && !!e &&
|
|
131
|
+
function _e(e) {
|
|
132
|
+
return typeof e == "object" && !!e && re(e) === "[object Arguments]";
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
return
|
|
134
|
+
function ve(e, t, n) {
|
|
135
|
+
return me(n) && (typeof t == "number" && ue(n) && ge(t) && t < n.length || typeof t == "string" && t in n) ? ie(n[t], e) : !1;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function ye(e) {
|
|
138
138
|
return typeof e == "symbol" ? 1 : e === null ? 2 : e === void 0 ? 3 : e === e ? 0 : 4;
|
|
139
139
|
}
|
|
140
|
-
var
|
|
140
|
+
var be = (e, t, n) => {
|
|
141
141
|
if (e !== t) {
|
|
142
|
-
let r =
|
|
142
|
+
let r = ye(e), i = ye(t);
|
|
143
143
|
if (r === i && r === 0) {
|
|
144
144
|
if (e < t) return n === "desc" ? 1 : -1;
|
|
145
145
|
if (e > t) return n === "desc" ? -1 : 1;
|
|
@@ -147,45 +147,45 @@ var compareValues = (e, t, n) => {
|
|
|
147
147
|
return n === "desc" ? i - r : r - i;
|
|
148
148
|
}
|
|
149
149
|
return 0;
|
|
150
|
-
},
|
|
151
|
-
function
|
|
152
|
-
return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null ||
|
|
150
|
+
}, xe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Se = /^\w*$/;
|
|
151
|
+
function Ce(e, t) {
|
|
152
|
+
return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null || te(e) ? !0 : typeof e == "string" && (Se.test(e) || !xe.test(e)) || t != null && Object.hasOwn(t, e);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function we(e, t, n, r) {
|
|
155
155
|
if (e == null) return [];
|
|
156
156
|
n = r ? void 0 : n, Array.isArray(e) || (e = Object.values(e)), Array.isArray(t) || (t = t == null ? [null] : [t]), t.length === 0 && (t = [null]), Array.isArray(n) || (n = n == null ? [] : [n]), n = n.map((e) => String(e));
|
|
157
157
|
let i = (e, t) => {
|
|
158
158
|
let n = e;
|
|
159
159
|
for (let e = 0; e < t.length && n != null; ++e) n = n[t[e]];
|
|
160
160
|
return n;
|
|
161
|
-
}, a = (e, t) => t == null || e == null ? t : typeof e == "object" && "key" in e ? Object.hasOwn(t, e.key) ? t[e.key] : i(t, e.path) : typeof e == "function" ? e(t) : Array.isArray(e) ? i(t, e) : typeof t == "object" ? t[e] : t, o = t.map((e) => (Array.isArray(e) && e.length === 1 && (e = e[0]), e == null || typeof e == "function" || Array.isArray(e) ||
|
|
161
|
+
}, a = (e, t) => t == null || e == null ? t : typeof e == "object" && "key" in e ? Object.hasOwn(t, e.key) ? t[e.key] : i(t, e.path) : typeof e == "function" ? e(t) : Array.isArray(e) ? i(t, e) : typeof t == "object" ? t[e] : t, o = t.map((e) => (Array.isArray(e) && e.length === 1 && (e = e[0]), e == null || typeof e == "function" || Array.isArray(e) || Ce(e) ? e : {
|
|
162
162
|
key: e,
|
|
163
|
-
path:
|
|
163
|
+
path: pe(e)
|
|
164
164
|
}));
|
|
165
165
|
return e.map((e) => ({
|
|
166
166
|
original: e,
|
|
167
167
|
criteria: o.map((t) => a(t, e))
|
|
168
168
|
})).slice().sort((e, t) => {
|
|
169
169
|
for (let r = 0; r < o.length; r++) {
|
|
170
|
-
let i =
|
|
170
|
+
let i = be(e.criteria[r], t.criteria[r], n[r]);
|
|
171
171
|
if (i !== 0) return i;
|
|
172
172
|
}
|
|
173
173
|
return 0;
|
|
174
174
|
}).map((e) => e.original);
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Te(e, ...t) {
|
|
177
177
|
let n = t.length;
|
|
178
|
-
return n > 1 &&
|
|
178
|
+
return n > 1 && ve(e, t[0], t[1]) ? t = [] : n > 2 && ve(t[0], t[1], t[2]) && (t = [t[0]]), we(e, q(t), ["asc"]);
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function Ee(e) {
|
|
181
181
|
let t = e?.constructor;
|
|
182
182
|
return e === (typeof t == "function" ? t.prototype : Object.prototype);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
return
|
|
184
|
+
function De(e) {
|
|
185
|
+
return ne(e);
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
if (!
|
|
187
|
+
function Oe(e) {
|
|
188
|
+
if (!ue(e)) return {};
|
|
189
189
|
let t = {};
|
|
190
190
|
for (let n = 0; n < e.length; n++) {
|
|
191
191
|
let [r, i] = e[n];
|
|
@@ -193,20 +193,20 @@ function fromPairs(e) {
|
|
|
193
193
|
}
|
|
194
194
|
return t;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function ke(e) {
|
|
197
197
|
return typeof e == "function";
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Ae(e) {
|
|
200
200
|
if (e == null) return !0;
|
|
201
|
-
if (
|
|
201
|
+
if (ue(e)) return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !De(e) && !_e(e) ? !1 : e.length === 0;
|
|
202
202
|
if (typeof e == "object") {
|
|
203
203
|
if (e instanceof Map || e instanceof Set) return e.size === 0;
|
|
204
204
|
let t = Object.keys(e);
|
|
205
|
-
return
|
|
205
|
+
return Ee(e) ? t.filter((e) => e !== "constructor").length === 0 : t.length === 0;
|
|
206
206
|
}
|
|
207
207
|
return !0;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function je(e) {
|
|
210
210
|
return {
|
|
211
211
|
all: e ||= /* @__PURE__ */ new Map(),
|
|
212
212
|
on: function(t, n) {
|
|
@@ -227,24 +227,24 @@ function mitt_default(e) {
|
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
230
|
+
const Me = je(), Ne = async (e) => {
|
|
231
|
+
if (ke(e)) var t = e(window.$$safe$$);
|
|
232
232
|
else var t = e;
|
|
233
|
-
return console.log("[definePlugin] new plugin defining...", t), await
|
|
234
|
-
},
|
|
233
|
+
return console.log("[definePlugin] new plugin defining...", t), await Me.emit("definedPlugin", t), t;
|
|
234
|
+
}, Pe = (e) => ({
|
|
235
235
|
name: {
|
|
236
236
|
display: e["name:display"],
|
|
237
237
|
id: e["name:id"]
|
|
238
238
|
},
|
|
239
239
|
author: e.author ?? "",
|
|
240
240
|
description: e.description,
|
|
241
|
-
require: (e.require ?
|
|
241
|
+
require: (e.require ? oe(e.require) ? [e.require] : e.require : []).map((e) => {
|
|
242
242
|
let [t, ...n] = e.split(":");
|
|
243
243
|
if (t.startsWith("dc|")) return {
|
|
244
244
|
id: t.replace(/^dc\|/, ""),
|
|
245
245
|
download: n.join(":")
|
|
246
246
|
};
|
|
247
|
-
}).filter((e) => !
|
|
247
|
+
}).filter((e) => !se(e)),
|
|
248
248
|
version: {
|
|
249
249
|
plugin: e.version.split("/")[0],
|
|
250
250
|
supportCore: (() => {
|
|
@@ -253,30 +253,38 @@ const pluginEmitter = mitt_default(), definePlugin = async (e) => {
|
|
|
253
253
|
})()
|
|
254
254
|
}
|
|
255
255
|
});
|
|
256
|
-
var
|
|
257
|
-
let t = e[0], n =
|
|
258
|
-
if (n == null && !
|
|
259
|
-
return n &&
|
|
260
|
-
},
|
|
256
|
+
var Fe = /* @__PURE__ */ new WeakMap(), Ie = (...e) => {
|
|
257
|
+
let t = e[0], n = p()?.proxy ?? m();
|
|
258
|
+
if (n == null && !g()) throw Error("injectLocal must be called in setup");
|
|
259
|
+
return n && Fe.has(n) && t in Fe.get(n) ? Fe.get(n)[t] : _(...e);
|
|
260
|
+
}, Le = typeof window < "u" && typeof document < "u";
|
|
261
261
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
262
|
-
var
|
|
263
|
-
|
|
262
|
+
var Re = Object.prototype.toString, ze = (e) => Re.call(e) === "[object Object]", Be = () => {};
|
|
263
|
+
/**
|
|
264
|
+
* Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client
|
|
265
|
+
*/
|
|
266
|
+
function Ve(e) {
|
|
264
267
|
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
265
268
|
}
|
|
266
|
-
function
|
|
269
|
+
function He(e) {
|
|
267
270
|
return Array.isArray(e) ? e : [e];
|
|
268
271
|
}
|
|
269
|
-
|
|
270
|
-
|
|
272
|
+
/**
|
|
273
|
+
* Shorthand for watching value with {immediate: true}
|
|
274
|
+
*
|
|
275
|
+
* @see https://vueuse.org/watchImmediate
|
|
276
|
+
*/
|
|
277
|
+
function Ue(e, t, n) {
|
|
278
|
+
return j(e, t, {
|
|
271
279
|
...n,
|
|
272
280
|
immediate: !0
|
|
273
281
|
});
|
|
274
282
|
}
|
|
275
|
-
function
|
|
283
|
+
function We(e, t, n) {
|
|
276
284
|
let r;
|
|
277
|
-
r =
|
|
278
|
-
let { lazy: i = !1, flush: a = "sync", evaluating: o = void 0, shallow: c = !0, onError: l = globalThis.reportError ??
|
|
279
|
-
return
|
|
285
|
+
r = v(n) ? { evaluating: n } : n || {};
|
|
286
|
+
let { lazy: i = !1, flush: a = "sync", evaluating: o = void 0, shallow: c = !0, onError: l = globalThis.reportError ?? Be } = r, u = O(!i), d = c ? O(t) : w(t), f = 0;
|
|
287
|
+
return M(async (t) => {
|
|
280
288
|
if (!u.value) return;
|
|
281
289
|
f++;
|
|
282
290
|
let n = f, r = !1;
|
|
@@ -295,74 +303,101 @@ function computedAsync(e, t, n) {
|
|
|
295
303
|
} finally {
|
|
296
304
|
o && n === f && (o.value = !1), r = !0;
|
|
297
305
|
}
|
|
298
|
-
}, { flush: a }), i ?
|
|
306
|
+
}, { flush: a }), i ? s(() => (u.value = !0, d.value)) : d;
|
|
299
307
|
}
|
|
300
|
-
var
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
308
|
+
var Ge = Le ? window : void 0;
|
|
309
|
+
Le && window.document, Le && window.navigator, Le && window.location;
|
|
310
|
+
/**
|
|
311
|
+
* Get the dom element of a ref of element or Vue component instance
|
|
312
|
+
*
|
|
313
|
+
* @param elRef
|
|
314
|
+
*/
|
|
315
|
+
function Ke(e) {
|
|
316
|
+
let t = k(e);
|
|
304
317
|
return t?.$el ?? t;
|
|
305
318
|
}
|
|
306
|
-
function
|
|
307
|
-
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n =
|
|
308
|
-
let t =
|
|
319
|
+
function qe(...e) {
|
|
320
|
+
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = s(() => {
|
|
321
|
+
let t = He(k(e[0])).filter((e) => e != null);
|
|
309
322
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
310
323
|
});
|
|
311
|
-
return
|
|
312
|
-
n.value?.map((e) =>
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
324
|
+
return Ue(() => [
|
|
325
|
+
n.value?.map((e) => Ke(e)) ?? [Ge].filter((e) => e != null),
|
|
326
|
+
He(k(n.value ? e[1] : e[0])),
|
|
327
|
+
He(A(n.value ? e[2] : e[1])),
|
|
328
|
+
k(n.value ? e[3] : e[2])
|
|
316
329
|
], ([e, n, r, i], a, o) => {
|
|
317
330
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
318
|
-
let s =
|
|
331
|
+
let s = ze(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
319
332
|
o(() => {
|
|
320
333
|
c.forEach((e) => e());
|
|
321
334
|
});
|
|
322
335
|
}, { flush: "post" });
|
|
323
336
|
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
337
|
+
/**
|
|
338
|
+
* Mounted state in ref.
|
|
339
|
+
*
|
|
340
|
+
* @see https://vueuse.org/useMounted
|
|
341
|
+
*
|
|
342
|
+
* @__NO_SIDE_EFFECTS__
|
|
343
|
+
*/
|
|
344
|
+
function Je() {
|
|
345
|
+
let e = O(!1), t = p();
|
|
346
|
+
return t && x(() => {
|
|
327
347
|
e.value = !0;
|
|
328
348
|
}, t), e;
|
|
329
349
|
}
|
|
330
350
|
/* @__NO_SIDE_EFFECTS__ */
|
|
331
|
-
function
|
|
332
|
-
let t =
|
|
333
|
-
return
|
|
351
|
+
function Ye(e) {
|
|
352
|
+
let t = Je();
|
|
353
|
+
return s(() => (t.value, !!e()));
|
|
334
354
|
}
|
|
335
|
-
var
|
|
355
|
+
var Xe = Symbol("vueuse-ssr-width");
|
|
336
356
|
/* @__NO_SIDE_EFFECTS__ */
|
|
337
|
-
function
|
|
338
|
-
let e =
|
|
357
|
+
function Ze() {
|
|
358
|
+
let e = g() ? Ie(Xe, null) : null;
|
|
339
359
|
return typeof e == "number" ? e : void 0;
|
|
340
360
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
361
|
+
/**
|
|
362
|
+
* Reactive Media Query.
|
|
363
|
+
*
|
|
364
|
+
* @see https://vueuse.org/useMediaQuery
|
|
365
|
+
* @param query
|
|
366
|
+
* @param options
|
|
367
|
+
*/
|
|
368
|
+
function Qe(e, t = {}) {
|
|
369
|
+
let { window: n = Ge, ssrWidth: r = /* @__PURE__ */ Ze() } = t, i = /* @__PURE__ */ Ye(() => n && "matchMedia" in n && typeof n.matchMedia == "function"), a = O(typeof r == "number"), o = O(), c = O(!1);
|
|
370
|
+
return M(() => {
|
|
344
371
|
if (a.value) {
|
|
345
|
-
a.value = !i.value, c.value =
|
|
372
|
+
a.value = !i.value, c.value = k(e).split(",").some((e) => {
|
|
346
373
|
let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), a = !!(n || i);
|
|
347
|
-
return n && a && (a = r >=
|
|
374
|
+
return n && a && (a = r >= Ve(n[1])), i && a && (a = r <= Ve(i[1])), t ? !a : a;
|
|
348
375
|
});
|
|
349
376
|
return;
|
|
350
377
|
}
|
|
351
|
-
i.value && (o.value = n.matchMedia(
|
|
352
|
-
}),
|
|
378
|
+
i.value && (o.value = n.matchMedia(k(e)), c.value = o.value.matches);
|
|
379
|
+
}), qe(o, "change", (e) => {
|
|
353
380
|
c.value = e.matches;
|
|
354
|
-
}, { passive: !0 }),
|
|
381
|
+
}, { passive: !0 }), s(() => c.value);
|
|
355
382
|
}
|
|
356
|
-
|
|
357
|
-
|
|
383
|
+
/**
|
|
384
|
+
* Reactive dark theme preference.
|
|
385
|
+
*
|
|
386
|
+
* @see https://vueuse.org/usePreferredDark
|
|
387
|
+
* @param [options]
|
|
388
|
+
*
|
|
389
|
+
* @__NO_SIDE_EFFECTS__
|
|
390
|
+
*/
|
|
391
|
+
function $e(e) {
|
|
392
|
+
return Qe("(prefers-color-scheme: dark)", e);
|
|
358
393
|
}
|
|
359
|
-
var
|
|
394
|
+
var et = class {
|
|
360
395
|
constructor(e, t, n) {
|
|
361
396
|
this.pluginName = e, this.config = t, this.configName = n, this.key = Symbol.for(`config:${e}`);
|
|
362
397
|
}
|
|
363
398
|
key;
|
|
364
399
|
};
|
|
365
|
-
const
|
|
400
|
+
const tt = a(new et("core", {
|
|
366
401
|
recordHistory: {
|
|
367
402
|
type: "switch",
|
|
368
403
|
defaultValue: !0,
|
|
@@ -404,14 +439,14 @@ const appConfig = useGlobalVar(new ConfigPointer("core", {
|
|
|
404
439
|
info: "github的token",
|
|
405
440
|
placeholder: "仅用于解除api访问限制"
|
|
406
441
|
}
|
|
407
|
-
}, "核心"), "core/plugin/config"),
|
|
408
|
-
let t =
|
|
442
|
+
}, "核心"), "core/plugin/config"), nt = P("config", (e) => {
|
|
443
|
+
let t = D(/* @__PURE__ */ new Map()), n = e.action((e) => {
|
|
409
444
|
let n = t.get(e.key);
|
|
410
445
|
if (!n) throw Error(`not found config by plugin "${e.pluginName}"`);
|
|
411
446
|
return n.value;
|
|
412
|
-
}, "load"), r =
|
|
413
|
-
if (!o(
|
|
414
|
-
switch (n(
|
|
447
|
+
}, "load"), r = $e(), a = s(() => {
|
|
448
|
+
if (!o(tt)) return r.value;
|
|
449
|
+
switch (n(tt).value.darkMode) {
|
|
415
450
|
case "light": return !1;
|
|
416
451
|
case "dark": return !0;
|
|
417
452
|
case "system": return r.value;
|
|
@@ -424,52 +459,52 @@ const appConfig = useGlobalVar(new ConfigPointer("core", {
|
|
|
424
459
|
$load: n,
|
|
425
460
|
$isExistConfig: o,
|
|
426
461
|
$resignerConfig: e.action((e) => {
|
|
427
|
-
let t =
|
|
462
|
+
let t = nt(), n = i(e.pluginName, "config", Oe(Object.entries(e.config).map(([e, t]) => [e, t.defaultValue])));
|
|
428
463
|
t.form.set(e.key, {
|
|
429
464
|
form: e.config,
|
|
430
465
|
value: n
|
|
431
466
|
});
|
|
432
467
|
}, "resignerConfig")
|
|
433
468
|
};
|
|
434
|
-
}),
|
|
435
|
-
share =
|
|
436
|
-
shareToken =
|
|
437
|
-
userActions =
|
|
438
|
-
subscribes =
|
|
439
|
-
globalNodes =
|
|
440
|
-
tabbar =
|
|
469
|
+
}), rt = (e) => Symbol.for(`expose:${e}`), it = (e) => at.get(e), at = /* @__PURE__ */ new Map(), J = a(new class {
|
|
470
|
+
share = D(I.create());
|
|
471
|
+
shareToken = D(I.create());
|
|
472
|
+
userActions = D(I.create());
|
|
473
|
+
subscribes = D(I.create());
|
|
474
|
+
globalNodes = D([]);
|
|
475
|
+
tabbar = D(/* @__PURE__ */ new Map());
|
|
441
476
|
addTabbar(e, ...t) {
|
|
442
477
|
let n = this.tabbar.get(e) ?? [];
|
|
443
478
|
this.tabbar.set(e, n.concat(t));
|
|
444
479
|
}
|
|
445
|
-
categories =
|
|
480
|
+
categories = D(/* @__PURE__ */ new Map());
|
|
446
481
|
addCategories(e, ...t) {
|
|
447
482
|
let n = this.categories.get(e) ?? [];
|
|
448
483
|
this.categories.set(e, n.concat(t));
|
|
449
484
|
}
|
|
450
|
-
barcode =
|
|
485
|
+
barcode = D(/* @__PURE__ */ new Map());
|
|
451
486
|
addBarcode(e, ...t) {
|
|
452
487
|
let n = this.barcode.get(e) ?? [];
|
|
453
488
|
this.barcode.set(e, n.concat(t));
|
|
454
489
|
}
|
|
455
|
-
levelboard =
|
|
490
|
+
levelboard = D(/* @__PURE__ */ new Map());
|
|
456
491
|
addLevelboard(e, ...t) {
|
|
457
492
|
let n = this.levelboard.get(e) ?? [];
|
|
458
493
|
this.levelboard.set(e, n.concat(t));
|
|
459
494
|
}
|
|
460
|
-
topButton =
|
|
495
|
+
topButton = D(/* @__PURE__ */ new Map());
|
|
461
496
|
addTopButton(e, ...t) {
|
|
462
497
|
let n = this.topButton.get(e) ?? [];
|
|
463
498
|
this.topButton.set(e, n.concat(t));
|
|
464
499
|
}
|
|
465
|
-
mainLists =
|
|
500
|
+
mainLists = D(/* @__PURE__ */ new Map());
|
|
466
501
|
addMainList(e, ...t) {
|
|
467
502
|
let n = this.mainLists.get(e) ?? [];
|
|
468
503
|
this.mainLists.set(e, n.concat(t));
|
|
469
504
|
}
|
|
470
|
-
envExtends =
|
|
505
|
+
envExtends = D(/* @__PURE__ */ new Set());
|
|
471
506
|
}(), "core/global");
|
|
472
|
-
var
|
|
507
|
+
var ot = (/* @__PURE__ */ G(((e, t) => {
|
|
473
508
|
var n = (function() {
|
|
474
509
|
var e = String.fromCharCode, t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$", r = {};
|
|
475
510
|
function i(e, t) {
|
|
@@ -540,39 +575,39 @@ var import_lz_string = (/* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
|
540
575
|
},
|
|
541
576
|
_compress: function(e, t, n) {
|
|
542
577
|
if (e == null) return "";
|
|
543
|
-
var r, i, a = {}, o = {}, s = "", c = "", l = "", u = 2, d = 3, f = 2, p = [], m = 0,
|
|
544
|
-
for (
|
|
578
|
+
var r, i, a = {}, o = {}, s = "", c = "", l = "", u = 2, d = 3, f = 2, p = [], m = 0, h = 0, g;
|
|
579
|
+
for (g = 0; g < e.length; g += 1) if (s = e.charAt(g), Object.prototype.hasOwnProperty.call(a, s) || (a[s] = d++, o[s] = !0), c = l + s, Object.prototype.hasOwnProperty.call(a, c)) l = c;
|
|
545
580
|
else {
|
|
546
581
|
if (Object.prototype.hasOwnProperty.call(o, l)) {
|
|
547
582
|
if (l.charCodeAt(0) < 256) {
|
|
548
|
-
for (r = 0; r < f; r++) m <<= 1,
|
|
549
|
-
for (i = l.charCodeAt(0), r = 0; r < 8; r++) m = m << 1 | i & 1,
|
|
583
|
+
for (r = 0; r < f; r++) m <<= 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++;
|
|
584
|
+
for (i = l.charCodeAt(0), r = 0; r < 8; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
550
585
|
} else {
|
|
551
|
-
for (i = 1, r = 0; r < f; r++) m = m << 1 | i,
|
|
552
|
-
for (i = l.charCodeAt(0), r = 0; r < 16; r++) m = m << 1 | i & 1,
|
|
586
|
+
for (i = 1, r = 0; r < f; r++) m = m << 1 | i, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i = 0;
|
|
587
|
+
for (i = l.charCodeAt(0), r = 0; r < 16; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
553
588
|
}
|
|
554
589
|
u--, u == 0 && (u = 2 ** f, f++), delete o[l];
|
|
555
|
-
} else for (i = a[l], r = 0; r < f; r++) m = m << 1 | i & 1,
|
|
590
|
+
} else for (i = a[l], r = 0; r < f; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
556
591
|
u--, u == 0 && (u = 2 ** f, f++), a[c] = d++, l = String(s);
|
|
557
592
|
}
|
|
558
593
|
if (l !== "") {
|
|
559
594
|
if (Object.prototype.hasOwnProperty.call(o, l)) {
|
|
560
595
|
if (l.charCodeAt(0) < 256) {
|
|
561
|
-
for (r = 0; r < f; r++) m <<= 1,
|
|
562
|
-
for (i = l.charCodeAt(0), r = 0; r < 8; r++) m = m << 1 | i & 1,
|
|
596
|
+
for (r = 0; r < f; r++) m <<= 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++;
|
|
597
|
+
for (i = l.charCodeAt(0), r = 0; r < 8; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
563
598
|
} else {
|
|
564
|
-
for (i = 1, r = 0; r < f; r++) m = m << 1 | i,
|
|
565
|
-
for (i = l.charCodeAt(0), r = 0; r < 16; r++) m = m << 1 | i & 1,
|
|
599
|
+
for (i = 1, r = 0; r < f; r++) m = m << 1 | i, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i = 0;
|
|
600
|
+
for (i = l.charCodeAt(0), r = 0; r < 16; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
566
601
|
}
|
|
567
602
|
u--, u == 0 && (u = 2 ** f, f++), delete o[l];
|
|
568
|
-
} else for (i = a[l], r = 0; r < f; r++) m = m << 1 | i & 1,
|
|
603
|
+
} else for (i = a[l], r = 0; r < f; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
569
604
|
u--, u == 0 && (u = 2 ** f, f++);
|
|
570
605
|
}
|
|
571
|
-
for (i = 2, r = 0; r < f; r++) m = m << 1 | i & 1,
|
|
572
|
-
for (;;) if (m <<= 1,
|
|
606
|
+
for (i = 2, r = 0; r < f; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
607
|
+
for (;;) if (m <<= 1, h == t - 1) {
|
|
573
608
|
p.push(n(m));
|
|
574
609
|
break;
|
|
575
|
-
} else
|
|
610
|
+
} else h++;
|
|
576
611
|
return p.join("");
|
|
577
612
|
},
|
|
578
613
|
decompress: function(e) {
|
|
@@ -581,40 +616,40 @@ var import_lz_string = (/* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
|
581
616
|
});
|
|
582
617
|
},
|
|
583
618
|
_decompress: function(t, n, r) {
|
|
584
|
-
var i = [], a = 4, o = 4, s = 3, c = "", l = [], u, d, f, p, m, g, _
|
|
619
|
+
var i = [], a = 4, o = 4, s = 3, c = "", l = [], u, d, f, p, m, h, g, _ = {
|
|
585
620
|
val: r(0),
|
|
586
621
|
position: n,
|
|
587
622
|
index: 1
|
|
588
623
|
};
|
|
589
624
|
for (u = 0; u < 3; u += 1) i[u] = u;
|
|
590
|
-
for (f = 0, m = 2 ** 2,
|
|
625
|
+
for (f = 0, m = 2 ** 2, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
591
626
|
switch (f) {
|
|
592
627
|
case 0:
|
|
593
|
-
for (f = 0, m = 2 ** 8,
|
|
594
|
-
|
|
628
|
+
for (f = 0, m = 2 ** 8, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
629
|
+
g = e(f);
|
|
595
630
|
break;
|
|
596
631
|
case 1:
|
|
597
|
-
for (f = 0, m = 2 ** 16,
|
|
598
|
-
|
|
632
|
+
for (f = 0, m = 2 ** 16, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
633
|
+
g = e(f);
|
|
599
634
|
break;
|
|
600
635
|
case 2: return "";
|
|
601
636
|
}
|
|
602
|
-
for (i[3] =
|
|
603
|
-
if (
|
|
604
|
-
for (f = 0, m = 2 ** s,
|
|
605
|
-
switch (
|
|
637
|
+
for (i[3] = g, d = g, l.push(g);;) {
|
|
638
|
+
if (_.index > t) return "";
|
|
639
|
+
for (f = 0, m = 2 ** s, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
640
|
+
switch (g = f) {
|
|
606
641
|
case 0:
|
|
607
|
-
for (f = 0, m = 2 ** 8,
|
|
608
|
-
i[o++] = e(f),
|
|
642
|
+
for (f = 0, m = 2 ** 8, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
643
|
+
i[o++] = e(f), g = o - 1, a--;
|
|
609
644
|
break;
|
|
610
645
|
case 1:
|
|
611
|
-
for (f = 0, m = 2 ** 16,
|
|
612
|
-
i[o++] = e(f),
|
|
646
|
+
for (f = 0, m = 2 ** 16, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
647
|
+
i[o++] = e(f), g = o - 1, a--;
|
|
613
648
|
break;
|
|
614
649
|
case 2: return l.join("");
|
|
615
650
|
}
|
|
616
|
-
if (a == 0 && (a = 2 ** s, s++), i[
|
|
617
|
-
else if (
|
|
651
|
+
if (a == 0 && (a = 2 ** s, s++), i[g]) c = i[g];
|
|
652
|
+
else if (g === o) c = d + d.charAt(0);
|
|
618
653
|
else return null;
|
|
619
654
|
l.push(c), i[o++] = d + c.charAt(0), a--, d = c, a == 0 && (a = 2 ** s, s++);
|
|
620
655
|
}
|
|
@@ -628,81 +663,81 @@ var import_lz_string = (/* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
|
628
663
|
return n;
|
|
629
664
|
});
|
|
630
665
|
})))();
|
|
631
|
-
const
|
|
666
|
+
const st = () => d("svg", {
|
|
632
667
|
xmlns: "http://www.w3.org/2000/svg",
|
|
633
668
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
634
669
|
viewBox: "0 0 24 24"
|
|
635
670
|
}, [
|
|
636
|
-
|
|
671
|
+
d("path", {
|
|
637
672
|
d: "M5 5c-.55 0-1 .45-1 1v15c0 1.1.9 2 2 2h9c.55 0 1-.45 1-1s-.45-1-1-1H6V6c0-.55-.45-1-1-1z",
|
|
638
673
|
fill: "currentColor"
|
|
639
674
|
}, null),
|
|
640
|
-
|
|
675
|
+
d("path", {
|
|
641
676
|
d: "M18 1h-8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 14h-8V5h8v10z",
|
|
642
677
|
fill: "currentColor"
|
|
643
678
|
}, null),
|
|
644
|
-
|
|
679
|
+
d("path", {
|
|
645
680
|
d: "M12.5 10.25h2v.54c0 .45.54.67.85.35l1.29-1.29c.2-.2.2-.51 0-.71l-1.29-1.29a.5.5 0 0 0-.85.35v.54H12c-.55 0-1 .45-1 1v1.5c0 .41.34.75.75.75s.75-.34.75-.75v-.99z",
|
|
646
681
|
fill: "currentColor"
|
|
647
682
|
}, null)
|
|
648
|
-
]),
|
|
683
|
+
]), ct = () => d("svg", {
|
|
649
684
|
xmlns: "http://www.w3.org/2000/svg",
|
|
650
685
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
651
686
|
viewBox: "0 0 1024 1024"
|
|
652
|
-
}, [
|
|
687
|
+
}, [d("path", {
|
|
653
688
|
d: "M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 0 0 0 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3L589 164.6L836 188l23.4 247l-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88s88-39.5 88-88s-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32s32 14.3 32 32s-14.3 32-32 32z",
|
|
654
689
|
fill: "currentColor"
|
|
655
|
-
}, null)]),
|
|
656
|
-
let t =
|
|
690
|
+
}, null)]), lt = a(P("plugin", (e) => {
|
|
691
|
+
let t = D(/* @__PURE__ */ new Map()), n = C({}), i = We(async () => Object.fromEntries((await r.value.selectFrom("plugin").select(["pluginName", "displayName"]).execute()).map((e) => [e.pluginName, e.displayName])), {}), a = s(() => Array.from(t.values()).filter((e) => e.search?.methods).map((e) => [e.name, Object.entries(e.search?.methods ?? {})]));
|
|
657
692
|
return {
|
|
658
693
|
$getPluginDisplayName: e.action((e) => i.value[e] || e, "getPluginDisplayName"),
|
|
659
694
|
plugins: t,
|
|
660
695
|
allSearchSource: a,
|
|
661
696
|
pluginSteps: n
|
|
662
697
|
};
|
|
663
|
-
}), "core/plugin/store"),
|
|
664
|
-
name:
|
|
665
|
-
config: [
|
|
698
|
+
}), "core/plugin/store"), ut = () => Ne({
|
|
699
|
+
name: Y,
|
|
700
|
+
config: [tt],
|
|
666
701
|
onBooted: () => {
|
|
667
|
-
|
|
668
|
-
await
|
|
669
|
-
key:
|
|
702
|
+
R.define(async (t) => await e.countDb(r.value.selectFrom("subscribe").where("key", "=", n.key.toString([t.$$plugin, t.label]))) > 0, Y, "getIsAuthorSubscribe"), R.define(async (e) => {
|
|
703
|
+
await n.upsert({
|
|
704
|
+
key: n.key.toString([e.$$plugin, e.label]),
|
|
670
705
|
author: e,
|
|
671
706
|
plugin: e.$$plugin,
|
|
672
707
|
type: "author",
|
|
673
708
|
itemKey: null
|
|
674
709
|
});
|
|
675
|
-
},
|
|
676
|
-
await
|
|
677
|
-
},
|
|
710
|
+
}, Y, "addAuthorSubscribe"), R.define(async (e) => {
|
|
711
|
+
await r.value.deleteFrom("subscribe").where("key", "=", n.key.toString([e.$$plugin, e.label])).execute();
|
|
712
|
+
}, Y, "removeAuthorSubscribe");
|
|
678
713
|
},
|
|
679
714
|
share: {
|
|
680
715
|
initiative: [{
|
|
681
716
|
filter: () => !0,
|
|
682
|
-
icon:
|
|
717
|
+
icon: ct,
|
|
683
718
|
key: "token",
|
|
684
719
|
name: "复制口令",
|
|
685
720
|
async call(e) {
|
|
686
|
-
let t = e.union.value.toJSON(), n = (0,
|
|
721
|
+
let t = e.union.value.toJSON(), n = (0, ot.compressToEncodedURIComponent)(JSON.stringify({
|
|
687
722
|
item: {
|
|
688
|
-
contentType:
|
|
723
|
+
contentType: L.content.ContentPage.contentPage.toString(t.contentType),
|
|
689
724
|
ep: t.thisEp.index,
|
|
690
725
|
name: t.title
|
|
691
726
|
},
|
|
692
727
|
plugin: e.plugin,
|
|
693
728
|
id: e.id
|
|
694
729
|
}));
|
|
695
|
-
await
|
|
730
|
+
await R.call("pushShareToken", `[${e.union.value?.title}](复制这条口令,打开Delta Comic)${n}`);
|
|
696
731
|
}
|
|
697
732
|
}, {
|
|
698
733
|
filter: () => !0,
|
|
699
|
-
icon:
|
|
734
|
+
icon: st,
|
|
700
735
|
key: "native",
|
|
701
736
|
name: "原生分享",
|
|
702
737
|
async call(e) {
|
|
703
|
-
let t = e.union.value.toJSON(), n = (0,
|
|
738
|
+
let t = e.union.value.toJSON(), n = (0, ot.compressToEncodedURIComponent)(JSON.stringify({
|
|
704
739
|
item: {
|
|
705
|
-
contentType:
|
|
740
|
+
contentType: L.content.ContentPage.contentPage.toString(t.contentType),
|
|
706
741
|
ep: t.thisEp.index,
|
|
707
742
|
name: t.title
|
|
708
743
|
},
|
|
@@ -722,100 +757,221 @@ const OfflineShareRound = () => createVNode("svg", {
|
|
|
722
757
|
return /^\[.+\]\(复制这条口令,打开Delta Comic\).+/.test(e);
|
|
723
758
|
},
|
|
724
759
|
show(e) {
|
|
725
|
-
let t =
|
|
760
|
+
let t = lt(), n = JSON.parse((0, ot.decompressFromEncodedURIComponent)(e.replace(/^\[.+\]/, "").replaceAll("(复制这条口令,打开Delta Comic)", "")));
|
|
726
761
|
return {
|
|
727
762
|
title: "口令",
|
|
728
763
|
detail: `发现分享的内容: ${n.item.name},需要的插件: ${t.$getPluginDisplayName(n.plugin)}`,
|
|
729
764
|
onNegative() {},
|
|
730
765
|
onPositive() {
|
|
731
|
-
return
|
|
766
|
+
return R.call("routeToContent", n.item.contentType, n.id, n.item.ep);
|
|
732
767
|
}
|
|
733
768
|
};
|
|
734
769
|
}
|
|
735
770
|
}]
|
|
736
771
|
}
|
|
737
|
-
}),
|
|
738
|
-
|
|
739
|
-
|
|
772
|
+
}), Y = "core";
|
|
773
|
+
a(rt(Y), "core/plugin/coreFlag");
|
|
774
|
+
/******************************************************************************
|
|
775
|
+
Copyright (c) Microsoft Corporation.
|
|
776
|
+
|
|
777
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
778
|
+
purpose with or without fee is hereby granted.
|
|
779
|
+
|
|
780
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
781
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
782
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
783
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
784
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
785
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
786
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
787
|
+
***************************************************************************** */
|
|
788
|
+
function dt(e, t, n, r) {
|
|
740
789
|
if (n === "a" && !r) throw TypeError("Private accessor was defined without a getter");
|
|
741
790
|
if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw TypeError("Cannot read private member from an object whose class did not declare it");
|
|
742
791
|
return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e);
|
|
743
792
|
}
|
|
744
|
-
function
|
|
793
|
+
function ft(e, t, n, r, i) {
|
|
745
794
|
if (r === "m") throw TypeError("Private method is not writable");
|
|
746
795
|
if (r === "a" && !i) throw TypeError("Private accessor was defined without a setter");
|
|
747
796
|
if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw TypeError("Cannot write private member to an object whose class did not declare it");
|
|
748
797
|
return r === "a" ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
|
|
749
798
|
}
|
|
750
|
-
var
|
|
751
|
-
|
|
799
|
+
var pt;
|
|
800
|
+
/**
|
|
801
|
+
* Sends a message to the backend.
|
|
802
|
+
* @example
|
|
803
|
+
* ```typescript
|
|
804
|
+
* import { invoke } from '@tauri-apps/api/core';
|
|
805
|
+
* await invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' });
|
|
806
|
+
* ```
|
|
807
|
+
*
|
|
808
|
+
* @param cmd The command name.
|
|
809
|
+
* @param args The optional arguments to pass to the command.
|
|
810
|
+
* @param options The request options.
|
|
811
|
+
* @return A promise resolving or rejecting to the backend response.
|
|
812
|
+
*
|
|
813
|
+
* @since 1.0.0
|
|
814
|
+
*/
|
|
815
|
+
async function X(e, t = {}, n) {
|
|
752
816
|
return window.__TAURI_INTERNALS__.invoke(e, t, n);
|
|
753
817
|
}
|
|
754
|
-
|
|
818
|
+
/**
|
|
819
|
+
* Convert a device file path to an URL that can be loaded by the webview.
|
|
820
|
+
* Note that `asset:` and `http://asset.localhost` must be added to [`app.security.csp`](https://v2.tauri.app/reference/config/#csp-1) in `tauri.conf.json`.
|
|
821
|
+
* Example CSP value: `"csp": "default-src 'self' ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost"` to use the asset protocol on image sources.
|
|
822
|
+
*
|
|
823
|
+
* Additionally, `"enable" : "true"` must be added to [`app.security.assetProtocol`](https://v2.tauri.app/reference/config/#assetprotocolconfig)
|
|
824
|
+
* in `tauri.conf.json` and its access scope must be defined on the `scope` array on the same `assetProtocol` object.
|
|
825
|
+
*
|
|
826
|
+
* @param filePath The file path.
|
|
827
|
+
* @param protocol The protocol to use. Defaults to `asset`. You only need to set this when using a custom protocol.
|
|
828
|
+
* @example
|
|
829
|
+
* ```typescript
|
|
830
|
+
* import { appDataDir, join } from '@tauri-apps/api/path';
|
|
831
|
+
* import { convertFileSrc } from '@tauri-apps/api/core';
|
|
832
|
+
* const appDataDirPath = await appDataDir();
|
|
833
|
+
* const filePath = await join(appDataDirPath, 'assets/video.mp4');
|
|
834
|
+
* const assetUrl = convertFileSrc(filePath);
|
|
835
|
+
*
|
|
836
|
+
* const video = document.getElementById('my-video');
|
|
837
|
+
* const source = document.createElement('source');
|
|
838
|
+
* source.type = 'video/mp4';
|
|
839
|
+
* source.src = assetUrl;
|
|
840
|
+
* video.appendChild(source);
|
|
841
|
+
* video.load();
|
|
842
|
+
* ```
|
|
843
|
+
*
|
|
844
|
+
* @return the URL that can be used as source on the webview.
|
|
845
|
+
*
|
|
846
|
+
* @since 1.0.0
|
|
847
|
+
*/
|
|
848
|
+
function mt(e, t = "asset") {
|
|
755
849
|
return window.__TAURI_INTERNALS__.convertFileSrc(e, t);
|
|
756
850
|
}
|
|
757
|
-
|
|
851
|
+
/**
|
|
852
|
+
* A rust-backed resource stored through `tauri::Manager::resources_table` API.
|
|
853
|
+
*
|
|
854
|
+
* The resource lives in the main process and does not exist
|
|
855
|
+
* in the Javascript world, and thus will not be cleaned up automatically
|
|
856
|
+
* except on application exit. If you want to clean it up early, call {@linkcode Resource.close}
|
|
857
|
+
*
|
|
858
|
+
* @example
|
|
859
|
+
* ```typescript
|
|
860
|
+
* import { Resource, invoke } from '@tauri-apps/api/core';
|
|
861
|
+
* export class DatabaseHandle extends Resource {
|
|
862
|
+
* static async open(path: string): Promise<DatabaseHandle> {
|
|
863
|
+
* const rid: number = await invoke('open_db', { path });
|
|
864
|
+
* return new DatabaseHandle(rid);
|
|
865
|
+
* }
|
|
866
|
+
*
|
|
867
|
+
* async execute(sql: string): Promise<void> {
|
|
868
|
+
* await invoke('execute_sql', { rid: this.rid, sql });
|
|
869
|
+
* }
|
|
870
|
+
* }
|
|
871
|
+
* ```
|
|
872
|
+
*/
|
|
873
|
+
var ht = class {
|
|
758
874
|
get rid() {
|
|
759
|
-
return
|
|
875
|
+
return dt(this, pt, "f");
|
|
760
876
|
}
|
|
761
877
|
constructor(e) {
|
|
762
|
-
|
|
878
|
+
pt.set(this, void 0), ft(this, pt, e, "f");
|
|
763
879
|
}
|
|
880
|
+
/**
|
|
881
|
+
* Destroys and cleans up this resource from memory.
|
|
882
|
+
* **You should not call any method on this object anymore and should drop any reference to it.**
|
|
883
|
+
*/
|
|
764
884
|
async close() {
|
|
765
|
-
return
|
|
885
|
+
return X("plugin:resources|close", { rid: this.rid });
|
|
766
886
|
}
|
|
767
887
|
};
|
|
768
|
-
|
|
769
|
-
|
|
888
|
+
pt = /* @__PURE__ */ new WeakMap();
|
|
889
|
+
/**
|
|
890
|
+
* The path module provides utilities for working with file and directory paths.
|
|
891
|
+
*
|
|
892
|
+
* This package is also accessible with `window.__TAURI__.path` when [`app.withGlobalTauri`](https://v2.tauri.app/reference/config/#withglobaltauri) in `tauri.conf.json` is set to `true`.
|
|
893
|
+
*
|
|
894
|
+
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
|
|
895
|
+
* @module
|
|
896
|
+
*/
|
|
897
|
+
/**
|
|
898
|
+
* @since 2.0.0
|
|
899
|
+
*/
|
|
900
|
+
var gt;
|
|
770
901
|
(function(e) {
|
|
902
|
+
/**
|
|
903
|
+
* @see {@link templateDir} for more information.
|
|
904
|
+
*/
|
|
771
905
|
e[e.Audio = 1] = "Audio", e[e.Cache = 2] = "Cache", e[e.Config = 3] = "Config", e[e.Data = 4] = "Data", e[e.LocalData = 5] = "LocalData", e[e.Document = 6] = "Document", e[e.Download = 7] = "Download", e[e.Picture = 8] = "Picture", e[e.Public = 9] = "Public", e[e.Video = 10] = "Video", e[e.Resource = 11] = "Resource", e[e.Temp = 12] = "Temp", e[e.AppConfig = 13] = "AppConfig", e[e.AppData = 14] = "AppData", e[e.AppLocalData = 15] = "AppLocalData", e[e.AppCache = 16] = "AppCache", e[e.AppLog = 17] = "AppLog", e[e.Desktop = 18] = "Desktop", e[e.Executable = 19] = "Executable", e[e.Font = 20] = "Font", e[e.Home = 21] = "Home", e[e.Runtime = 22] = "Runtime", e[e.Template = 23] = "Template";
|
|
772
|
-
})(
|
|
773
|
-
|
|
774
|
-
|
|
906
|
+
})(gt ||= {});
|
|
907
|
+
/**
|
|
908
|
+
* Returns the path to the suggested directory for your app's local data files.
|
|
909
|
+
* Resolves to `${localDataDir}/${bundleIdentifier}`, where `bundleIdentifier` is the [`identifier`](https://v2.tauri.app/reference/config/#identifier) value configured in `tauri.conf.json`.
|
|
910
|
+
* @example
|
|
911
|
+
* ```typescript
|
|
912
|
+
* import { appLocalDataDir } from '@tauri-apps/api/path';
|
|
913
|
+
* const appLocalDataDirPath = await appLocalDataDir();
|
|
914
|
+
* ```
|
|
915
|
+
*
|
|
916
|
+
* @since 1.2.0
|
|
917
|
+
*/
|
|
918
|
+
async function _t() {
|
|
919
|
+
return X("plugin:path|resolve_directory", { directory: gt.AppLocalData });
|
|
775
920
|
}
|
|
776
|
-
|
|
777
|
-
|
|
921
|
+
/**
|
|
922
|
+
* Joins all given `path` segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.
|
|
923
|
+
* @example
|
|
924
|
+
* ```typescript
|
|
925
|
+
* import { join, appDataDir } from '@tauri-apps/api/path';
|
|
926
|
+
* const appDataDirPath = await appDataDir();
|
|
927
|
+
* const path = await join(appDataDirPath, 'users', 'tauri', 'avatar.png');
|
|
928
|
+
* ```
|
|
929
|
+
*
|
|
930
|
+
* @since 1.0.0
|
|
931
|
+
*/
|
|
932
|
+
async function Z(...e) {
|
|
933
|
+
return X("plugin:path|join", { paths: e });
|
|
778
934
|
}
|
|
779
|
-
var
|
|
780
|
-
const
|
|
781
|
-
var
|
|
935
|
+
var vt = await _t();
|
|
936
|
+
const yt = async (e) => await Z(vt, "plugin", e);
|
|
937
|
+
var bt = class {}, xt = class {}, Q = class {}, St = new class extends Q {
|
|
782
938
|
name = "预设值";
|
|
783
939
|
async call(e, t) {
|
|
784
940
|
console.log("[PluginBooter->_ConfigSetter] new plugin defining...", e), t("预设值设定中");
|
|
785
941
|
let { name: n, content: r, resource: i, search: a, user: o, subscribe: s, share: c } = e;
|
|
786
|
-
if (r) for (let [e, { commentRow: t, contentPage: n, itemCard: i, layout: a, itemTranslator: o }] of Object.entries(r)) a &&
|
|
942
|
+
if (r) for (let [e, { commentRow: t, contentPage: n, itemCard: i, layout: a, itemTranslator: o }] of Object.entries(r)) a && L.content.ContentPage.viewLayout.set(e, a), i && L.item.Item.itemCard.set(e, i), n && L.content.ContentPage.contentPage.set(e, n), t && L.comment.Comment.commentRow.set(e, t), o && L.item.Item.itemTranslator.set(e, o);
|
|
787
943
|
if (i) {
|
|
788
|
-
if (i.types) for (let e of i.types)
|
|
789
|
-
if (i.process) for (let [e, t] of Object.entries(i.process))
|
|
944
|
+
if (i.types) for (let e of i.types) L.resource.Resource.fork.set([n, e.type], e);
|
|
945
|
+
if (i.process) for (let [e, t] of Object.entries(i.process)) L.resource.Resource.processInstances.set([n, e], t);
|
|
790
946
|
}
|
|
791
947
|
if (a) {
|
|
792
|
-
if (a.categories) for (let e of a.categories)
|
|
793
|
-
if (a.tabbar) for (let e of a.tabbar)
|
|
948
|
+
if (a.categories) for (let e of a.categories) J.addCategories(n, e);
|
|
949
|
+
if (a.tabbar) for (let e of a.tabbar) J.addTabbar(n, e);
|
|
794
950
|
if (a.hotPage) {
|
|
795
|
-
for (let e of a.hotPage.mainListCard ?? [])
|
|
796
|
-
for (let e of a.hotPage.levelBoard ?? [])
|
|
797
|
-
for (let e of a.hotPage.topButton ?? [])
|
|
951
|
+
for (let e of a.hotPage.mainListCard ?? []) J.addMainList(n, e);
|
|
952
|
+
for (let e of a.hotPage.levelBoard ?? []) J.addLevelboard(n, e);
|
|
953
|
+
for (let e of a.hotPage.topButton ?? []) J.addTopButton(n, e);
|
|
798
954
|
}
|
|
799
|
-
if (a.barcode) for (let e of a.barcode ?? [])
|
|
955
|
+
if (a.barcode) for (let e of a.barcode ?? []) J.addBarcode(n, e);
|
|
800
956
|
}
|
|
801
957
|
if (o) {
|
|
802
|
-
if (o.edit &&
|
|
803
|
-
if (o.authorIcon) for (let [e, t] of Object.entries(o.authorIcon))
|
|
958
|
+
if (o.edit && L.user.User.userEditorBase.set(n, o.edit), o.userActions) for (let [e, t] of Object.entries(o.userActions)) J.userActions.set([n, e], t);
|
|
959
|
+
if (o.authorIcon) for (let [e, t] of Object.entries(o.authorIcon)) L.item.Item.authorIcon.set([n, e], t);
|
|
804
960
|
}
|
|
805
|
-
if (s) for (let [e, t] of Object.entries(s))
|
|
806
|
-
if (e.config) for (let t of e.config)
|
|
961
|
+
if (s) for (let [e, t] of Object.entries(s)) J.subscribes.set([n, e], t);
|
|
962
|
+
if (e.config) for (let t of e.config) nt().$resignerConfig(t);
|
|
807
963
|
if (c) {
|
|
808
|
-
for (let e of c.initiative ?? [])
|
|
809
|
-
for (let e of c.tokenListen ?? [])
|
|
964
|
+
for (let e of c.initiative ?? []) J.share.set([n, e.key], e);
|
|
965
|
+
for (let e of c.tokenListen ?? []) J.shareToken.set([n, e.key], e);
|
|
810
966
|
}
|
|
811
967
|
}
|
|
812
968
|
}();
|
|
813
|
-
const
|
|
969
|
+
const Ct = async (e) => await Tt(await e.forks(), e.test), wt = (e) => {
|
|
814
970
|
let t = e.urls;
|
|
815
|
-
return
|
|
971
|
+
return Tt(t, e.test);
|
|
816
972
|
};
|
|
817
|
-
var
|
|
818
|
-
if (
|
|
973
|
+
var Tt = async (e, t) => {
|
|
974
|
+
if (Ae(e)) throw Error("[plugin test] no fork found");
|
|
819
975
|
let n = [], r = new AbortController();
|
|
820
976
|
try {
|
|
821
977
|
await Promise.all(e.map(async (e) => {
|
|
@@ -833,20 +989,20 @@ var test = async (e, t) => {
|
|
|
833
989
|
} catch (e) {
|
|
834
990
|
console.log("[plugin test] fetch test aborted", e);
|
|
835
991
|
}
|
|
836
|
-
let i =
|
|
992
|
+
let i = Te(n.filter((e) => e[1] != 0), (e) => e[1])[0];
|
|
837
993
|
return console.log("[plugin test] fetch test done", i), i || ["", !1];
|
|
838
|
-
},
|
|
994
|
+
}, Et = new class extends Q {
|
|
839
995
|
name = "接口测试";
|
|
840
996
|
async call(e, t, n) {
|
|
841
997
|
if (!e.api) return;
|
|
842
998
|
t("开始并发测试");
|
|
843
|
-
let r = Object.keys(e.api), i = await Promise.all(r.map((t) =>
|
|
999
|
+
let r = Object.keys(e.api), i = await Promise.all(r.map((t) => Ct(e.api[t]))), a = [], o = {};
|
|
844
1000
|
if (r.forEach((e, t) => {
|
|
845
1001
|
o[e] = i[t][0], a.push([e, i[t][1]]);
|
|
846
1002
|
}), n.api = o, Object.values(o).some((e) => e == 0)) throw t("测试完成, 无法连接至服务器"), Error("can not connect to server");
|
|
847
1003
|
t(`测试完成, \n${a.map((e) => `${e[0]}->${e[1]}ms`).join("\n")}`);
|
|
848
1004
|
}
|
|
849
|
-
}(),
|
|
1005
|
+
}(), Dt = new class extends Q {
|
|
850
1006
|
name = "资源链接测试";
|
|
851
1007
|
async call(e, t) {
|
|
852
1008
|
if (!e.resource?.types?.length) return;
|
|
@@ -854,71 +1010,69 @@ var test = async (e, t) => {
|
|
|
854
1010
|
let n = e.resource.types.map((e) => ({
|
|
855
1011
|
type: e.type,
|
|
856
1012
|
val: e
|
|
857
|
-
})), r = await Promise.all(n.map((e) =>
|
|
1013
|
+
})), r = await Promise.all(n.map((e) => wt(e.val))), i = [];
|
|
858
1014
|
if (n.forEach((t, n) => {
|
|
859
|
-
r[n][1] &&
|
|
1015
|
+
r[n][1] && L.resource.Resource.precedenceFork.set([e.name, t.type], r[n][0]), i.push([t, r[n][1]]);
|
|
860
1016
|
}), r.some((e) => e[1] == 0)) throw t("测试完成, 无法连接至服务器"), Error("[plugin test] can not connect to server");
|
|
861
1017
|
t(`测试完成, \n${i.map((e) => `${e[0].type}->${e[1]}ms`).join("\n")}`);
|
|
862
1018
|
}
|
|
863
|
-
}(),
|
|
1019
|
+
}(), Ot = new class extends Q {
|
|
864
1020
|
name = "自定义初始化";
|
|
865
1021
|
async call(e, t, n) {
|
|
866
1022
|
if (!e.onBooted) return;
|
|
867
1023
|
let r = await e.onBooted({ api: n.api });
|
|
868
|
-
r &&
|
|
1024
|
+
r && at.set(Symbol.for(`expose:${e.name}`), r);
|
|
869
1025
|
}
|
|
870
|
-
}(),
|
|
1026
|
+
}(), kt = new le(), At = new class extends Q {
|
|
871
1027
|
name = "登录";
|
|
872
1028
|
async call(e, t) {
|
|
873
1029
|
if (!e.auth) return;
|
|
874
|
-
let n =
|
|
1030
|
+
let n = lt();
|
|
875
1031
|
try {
|
|
876
1032
|
let r = n.$getPluginDisplayName(e.name);
|
|
877
1033
|
t("判定鉴权状态中...");
|
|
878
1034
|
let i = await e.auth.passSelect(), a = Promise.withResolvers();
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
maskClosable: !1,
|
|
889
|
-
content: "选择鉴权方式",
|
|
890
|
-
title: r
|
|
891
|
-
}), a.resolve("logIn");
|
|
892
|
-
} catch {
|
|
1035
|
+
console.log(`[plugin auth] ${r}, isPass: ${i}`), await kt.acquire(), t("等待其他插件鉴权结束..."), i ? (t("跳过鉴权方式选择"), a.resolve(i)) : (t("选择鉴权方式"), V({
|
|
1036
|
+
type: "default",
|
|
1037
|
+
positiveText: "登录",
|
|
1038
|
+
negativeText: "注册",
|
|
1039
|
+
closable: !1,
|
|
1040
|
+
maskClosable: !1,
|
|
1041
|
+
content: "选择鉴权方式",
|
|
1042
|
+
title: r,
|
|
1043
|
+
onNegativeClick() {
|
|
893
1044
|
a.resolve("signUp");
|
|
1045
|
+
},
|
|
1046
|
+
onPositiveClick() {
|
|
1047
|
+
a.resolve("logIn");
|
|
894
1048
|
}
|
|
895
|
-
}
|
|
1049
|
+
}));
|
|
896
1050
|
let o = await a.promise;
|
|
897
1051
|
t("鉴权中...");
|
|
898
1052
|
let s = {
|
|
899
1053
|
async form(e) {
|
|
900
|
-
let t =
|
|
901
|
-
return
|
|
902
|
-
let e =
|
|
903
|
-
return t.data.then(() => e.value = !1), () => h(
|
|
1054
|
+
let t = U(e);
|
|
1055
|
+
return J.globalNodes.push(y(f(() => {
|
|
1056
|
+
let e = w(!0);
|
|
1057
|
+
return t.data.then(() => e.value = !1), () => h(B, {
|
|
904
1058
|
show: e.value,
|
|
905
1059
|
position: "center",
|
|
906
1060
|
round: !0,
|
|
907
|
-
class: "
|
|
1061
|
+
class: "auth-popup",
|
|
908
1062
|
transitionAppear: !0
|
|
909
|
-
}, [h("div",
|
|
1063
|
+
}, [h("div", [r]), t.comp]);
|
|
910
1064
|
}))), await t.data;
|
|
911
1065
|
},
|
|
912
1066
|
website(e) {
|
|
913
1067
|
return window;
|
|
914
1068
|
}
|
|
915
1069
|
};
|
|
916
|
-
o == "logIn" ? await e.auth.logIn(s) : o == "signUp" && await e.auth.signUp(s),
|
|
1070
|
+
o == "logIn" ? await e.auth.logIn(s) : o == "signUp" && await e.auth.signUp(s), kt.release(), t("鉴权成功");
|
|
917
1071
|
} catch (e) {
|
|
918
1072
|
throw t(`登录失败: ${e}`), e;
|
|
919
1073
|
}
|
|
920
1074
|
}
|
|
921
|
-
}(),
|
|
1075
|
+
}(), jt = new class extends Q {
|
|
922
1076
|
name = "其他步骤";
|
|
923
1077
|
async call(e, t) {
|
|
924
1078
|
if (e.otherProgress?.length) for (let n of e.otherProgress) t({
|
|
@@ -931,14 +1085,14 @@ var test = async (e, t) => {
|
|
|
931
1085
|
});
|
|
932
1086
|
});
|
|
933
1087
|
}
|
|
934
|
-
}(),
|
|
1088
|
+
}(), Mt = new class extends bt {
|
|
935
1089
|
description = {
|
|
936
1090
|
title: "通过任意URL安装插件",
|
|
937
1091
|
description: "从任何你给定的url获取内容,无论内容是什么"
|
|
938
1092
|
};
|
|
939
1093
|
name = "fallbackUrl";
|
|
940
1094
|
async installer(e) {
|
|
941
|
-
let t = await
|
|
1095
|
+
let t = await W.request({
|
|
942
1096
|
url: e,
|
|
943
1097
|
responseType: "blob"
|
|
944
1098
|
}), n = e.split("/").at(-1) ?? "us.js";
|
|
@@ -953,11 +1107,11 @@ var test = async (e, t) => {
|
|
|
953
1107
|
isMatched(e) {
|
|
954
1108
|
return URL.canParse(e);
|
|
955
1109
|
}
|
|
956
|
-
}(),
|
|
1110
|
+
}(), Nt;
|
|
957
1111
|
(function(e) {
|
|
958
1112
|
e[e.Start = 0] = "Start", e[e.Current = 1] = "Current", e[e.End = 2] = "End";
|
|
959
|
-
})(
|
|
960
|
-
function
|
|
1113
|
+
})(Nt ||= {});
|
|
1114
|
+
function Pt(e) {
|
|
961
1115
|
return {
|
|
962
1116
|
isFile: e.isFile,
|
|
963
1117
|
isDirectory: e.isDirectory,
|
|
@@ -979,7 +1133,8 @@ function parseFileInfo(e) {
|
|
|
979
1133
|
blocks: e.blocks
|
|
980
1134
|
};
|
|
981
1135
|
}
|
|
982
|
-
|
|
1136
|
+
/** Converts a big-endian eight byte array to number */
|
|
1137
|
+
function Ft(e) {
|
|
983
1138
|
let t = new Uint8ClampedArray(e), n = t.byteLength, r = 0;
|
|
984
1139
|
for (let e = 0; e < n; e++) {
|
|
985
1140
|
let n = t[e];
|
|
@@ -987,86 +1142,306 @@ function fromBytes(e) {
|
|
|
987
1142
|
}
|
|
988
1143
|
return r;
|
|
989
1144
|
}
|
|
990
|
-
|
|
1145
|
+
/**
|
|
1146
|
+
* The Tauri abstraction for reading and writing files.
|
|
1147
|
+
*
|
|
1148
|
+
* @since 2.0.0
|
|
1149
|
+
*/
|
|
1150
|
+
var It = class extends ht {
|
|
1151
|
+
/**
|
|
1152
|
+
* Reads up to `p.byteLength` bytes into `p`. It resolves to the number of
|
|
1153
|
+
* bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
|
|
1154
|
+
* encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may
|
|
1155
|
+
* use all of `p` as scratch space during the call. If some data is
|
|
1156
|
+
* available but not `p.byteLength` bytes, `read()` conventionally resolves
|
|
1157
|
+
* to what is available instead of waiting for more.
|
|
1158
|
+
*
|
|
1159
|
+
* When `read()` encounters end-of-file condition, it resolves to EOF
|
|
1160
|
+
* (`null`).
|
|
1161
|
+
*
|
|
1162
|
+
* When `read()` encounters an error, it rejects with an error.
|
|
1163
|
+
*
|
|
1164
|
+
* Callers should always process the `n` > `0` bytes returned before
|
|
1165
|
+
* considering the EOF (`null`). Doing so correctly handles I/O errors that
|
|
1166
|
+
* happen after reading some bytes and also both of the allowed EOF
|
|
1167
|
+
* behaviors.
|
|
1168
|
+
*
|
|
1169
|
+
* @example
|
|
1170
|
+
* ```typescript
|
|
1171
|
+
* import { open, BaseDirectory } from "@tauri-apps/plugin-fs"
|
|
1172
|
+
* // if "$APPCONFIG/foo/bar.txt" contains the text "hello world":
|
|
1173
|
+
* const file = await open("foo/bar.txt", { baseDir: BaseDirectory.AppConfig });
|
|
1174
|
+
* const buf = new Uint8Array(100);
|
|
1175
|
+
* const numberOfBytesRead = await file.read(buf); // 11 bytes
|
|
1176
|
+
* const text = new TextDecoder().decode(buf); // "hello world"
|
|
1177
|
+
* await file.close();
|
|
1178
|
+
* ```
|
|
1179
|
+
*
|
|
1180
|
+
* @since 2.0.0
|
|
1181
|
+
*/
|
|
991
1182
|
async read(e) {
|
|
992
1183
|
if (e.byteLength === 0) return 0;
|
|
993
|
-
let t = await
|
|
1184
|
+
let t = await X("plugin:fs|read", {
|
|
994
1185
|
rid: this.rid,
|
|
995
1186
|
len: e.byteLength
|
|
996
|
-
}), n =
|
|
1187
|
+
}), n = Ft(t.slice(-8)), r = t instanceof ArrayBuffer ? new Uint8Array(t) : t;
|
|
997
1188
|
return e.set(r.slice(0, r.length - 8)), n === 0 ? null : n;
|
|
998
1189
|
}
|
|
1190
|
+
/**
|
|
1191
|
+
* Seek sets the offset for the next `read()` or `write()` to offset,
|
|
1192
|
+
* interpreted according to `whence`: `Start` means relative to the
|
|
1193
|
+
* start of the file, `Current` means relative to the current offset,
|
|
1194
|
+
* and `End` means relative to the end. Seek resolves to the new offset
|
|
1195
|
+
* relative to the start of the file.
|
|
1196
|
+
*
|
|
1197
|
+
* Seeking to an offset before the start of the file is an error. Seeking to
|
|
1198
|
+
* any positive offset is legal, but the behavior of subsequent I/O
|
|
1199
|
+
* operations on the underlying object is implementation-dependent.
|
|
1200
|
+
* It returns the number of cursor position.
|
|
1201
|
+
*
|
|
1202
|
+
* @example
|
|
1203
|
+
* ```typescript
|
|
1204
|
+
* import { open, SeekMode, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1205
|
+
*
|
|
1206
|
+
* // Given hello.txt pointing to file with "Hello world", which is 11 bytes long:
|
|
1207
|
+
* const file = await open('hello.txt', { read: true, write: true, truncate: true, create: true, baseDir: BaseDirectory.AppLocalData });
|
|
1208
|
+
* await file.write(new TextEncoder().encode("Hello world"));
|
|
1209
|
+
*
|
|
1210
|
+
* // Seek 6 bytes from the start of the file
|
|
1211
|
+
* console.log(await file.seek(6, SeekMode.Start)); // "6"
|
|
1212
|
+
* // Seek 2 more bytes from the current position
|
|
1213
|
+
* console.log(await file.seek(2, SeekMode.Current)); // "8"
|
|
1214
|
+
* // Seek backwards 2 bytes from the end of the file
|
|
1215
|
+
* console.log(await file.seek(-2, SeekMode.End)); // "9" (e.g. 11-2)
|
|
1216
|
+
*
|
|
1217
|
+
* await file.close();
|
|
1218
|
+
* ```
|
|
1219
|
+
*
|
|
1220
|
+
* @since 2.0.0
|
|
1221
|
+
*/
|
|
999
1222
|
async seek(e, t) {
|
|
1000
|
-
return await
|
|
1223
|
+
return await X("plugin:fs|seek", {
|
|
1001
1224
|
rid: this.rid,
|
|
1002
1225
|
offset: e,
|
|
1003
1226
|
whence: t
|
|
1004
1227
|
});
|
|
1005
1228
|
}
|
|
1229
|
+
/**
|
|
1230
|
+
* Returns a {@linkcode FileInfo } for this file.
|
|
1231
|
+
*
|
|
1232
|
+
* @example
|
|
1233
|
+
* ```typescript
|
|
1234
|
+
* import { open, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1235
|
+
* const file = await open("file.txt", { read: true, baseDir: BaseDirectory.AppLocalData });
|
|
1236
|
+
* const fileInfo = await file.stat();
|
|
1237
|
+
* console.log(fileInfo.isFile); // true
|
|
1238
|
+
* await file.close();
|
|
1239
|
+
* ```
|
|
1240
|
+
*
|
|
1241
|
+
* @since 2.0.0
|
|
1242
|
+
*/
|
|
1006
1243
|
async stat() {
|
|
1007
|
-
return
|
|
1244
|
+
return Pt(await X("plugin:fs|fstat", { rid: this.rid }));
|
|
1008
1245
|
}
|
|
1246
|
+
/**
|
|
1247
|
+
* Truncates or extends this file, to reach the specified `len`.
|
|
1248
|
+
* If `len` is not specified then the entire file contents are truncated.
|
|
1249
|
+
*
|
|
1250
|
+
* @example
|
|
1251
|
+
* ```typescript
|
|
1252
|
+
* import { open, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1253
|
+
*
|
|
1254
|
+
* // truncate the entire file
|
|
1255
|
+
* const file = await open("my_file.txt", { read: true, write: true, create: true, baseDir: BaseDirectory.AppLocalData });
|
|
1256
|
+
* await file.truncate();
|
|
1257
|
+
*
|
|
1258
|
+
* // truncate part of the file
|
|
1259
|
+
* const file = await open("my_file.txt", { read: true, write: true, create: true, baseDir: BaseDirectory.AppLocalData });
|
|
1260
|
+
* await file.write(new TextEncoder().encode("Hello World"));
|
|
1261
|
+
* await file.truncate(7);
|
|
1262
|
+
* const data = new Uint8Array(32);
|
|
1263
|
+
* await file.read(data);
|
|
1264
|
+
* console.log(new TextDecoder().decode(data)); // Hello W
|
|
1265
|
+
* await file.close();
|
|
1266
|
+
* ```
|
|
1267
|
+
*
|
|
1268
|
+
* @since 2.0.0
|
|
1269
|
+
*/
|
|
1009
1270
|
async truncate(e) {
|
|
1010
|
-
await
|
|
1271
|
+
await X("plugin:fs|ftruncate", {
|
|
1011
1272
|
rid: this.rid,
|
|
1012
1273
|
len: e
|
|
1013
1274
|
});
|
|
1014
1275
|
}
|
|
1276
|
+
/**
|
|
1277
|
+
* Writes `data.byteLength` bytes from `data` to the underlying data stream. It
|
|
1278
|
+
* resolves to the number of bytes written from `data` (`0` <= `n` <=
|
|
1279
|
+
* `data.byteLength`) or reject with the error encountered that caused the
|
|
1280
|
+
* write to stop early. `write()` must reject with a non-null error if
|
|
1281
|
+
* would resolve to `n` < `data.byteLength`. `write()` must not modify the
|
|
1282
|
+
* slice data, even temporarily.
|
|
1283
|
+
*
|
|
1284
|
+
* @example
|
|
1285
|
+
* ```typescript
|
|
1286
|
+
* import { open, write, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1287
|
+
* const encoder = new TextEncoder();
|
|
1288
|
+
* const data = encoder.encode("Hello world");
|
|
1289
|
+
* const file = await open("bar.txt", { write: true, baseDir: BaseDirectory.AppLocalData });
|
|
1290
|
+
* const bytesWritten = await file.write(data); // 11
|
|
1291
|
+
* await file.close();
|
|
1292
|
+
* ```
|
|
1293
|
+
*
|
|
1294
|
+
* @since 2.0.0
|
|
1295
|
+
*/
|
|
1015
1296
|
async write(e) {
|
|
1016
|
-
return await
|
|
1297
|
+
return await X("plugin:fs|write", {
|
|
1017
1298
|
rid: this.rid,
|
|
1018
1299
|
data: e
|
|
1019
1300
|
});
|
|
1020
1301
|
}
|
|
1021
1302
|
};
|
|
1022
|
-
|
|
1303
|
+
/**
|
|
1304
|
+
* Open a file and resolve to an instance of {@linkcode FileHandle}. The
|
|
1305
|
+
* file does not need to previously exist if using the `create` or `createNew`
|
|
1306
|
+
* open options. It is the callers responsibility to close the file when finished
|
|
1307
|
+
* with it.
|
|
1308
|
+
*
|
|
1309
|
+
* @example
|
|
1310
|
+
* ```typescript
|
|
1311
|
+
* import { open, BaseDirectory } from "@tauri-apps/plugin-fs"
|
|
1312
|
+
* const file = await open("foo/bar.txt", { read: true, write: true, baseDir: BaseDirectory.AppLocalData });
|
|
1313
|
+
* // Do work with file
|
|
1314
|
+
* await file.close();
|
|
1315
|
+
* ```
|
|
1316
|
+
*
|
|
1317
|
+
* @since 2.0.0
|
|
1318
|
+
*/
|
|
1319
|
+
async function Lt(e, t) {
|
|
1023
1320
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1024
|
-
return new
|
|
1321
|
+
return new It(await X("plugin:fs|open", {
|
|
1025
1322
|
path: e instanceof URL ? e.toString() : e,
|
|
1026
1323
|
options: t
|
|
1027
1324
|
}));
|
|
1028
1325
|
}
|
|
1029
|
-
|
|
1326
|
+
/**
|
|
1327
|
+
* Creates a new directory with the specified path.
|
|
1328
|
+
* @example
|
|
1329
|
+
* ```typescript
|
|
1330
|
+
* import { mkdir, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1331
|
+
* await mkdir('users', { baseDir: BaseDirectory.AppLocalData });
|
|
1332
|
+
* ```
|
|
1333
|
+
*
|
|
1334
|
+
* @since 2.0.0
|
|
1335
|
+
*/
|
|
1336
|
+
async function Rt(e, t) {
|
|
1030
1337
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1031
|
-
await
|
|
1338
|
+
await X("plugin:fs|mkdir", {
|
|
1032
1339
|
path: e instanceof URL ? e.toString() : e,
|
|
1033
1340
|
options: t
|
|
1034
1341
|
});
|
|
1035
1342
|
}
|
|
1036
|
-
|
|
1343
|
+
/**
|
|
1344
|
+
* Reads the directory given by path and returns an array of `DirEntry`.
|
|
1345
|
+
* @example
|
|
1346
|
+
* ```typescript
|
|
1347
|
+
* import { readDir, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1348
|
+
* import { join } from '@tauri-apps/api/path';
|
|
1349
|
+
* const dir = "users"
|
|
1350
|
+
* const entries = await readDir('users', { baseDir: BaseDirectory.AppLocalData });
|
|
1351
|
+
* processEntriesRecursively(dir, entries);
|
|
1352
|
+
* async function processEntriesRecursively(parent, entries) {
|
|
1353
|
+
* for (const entry of entries) {
|
|
1354
|
+
* console.log(`Entry: ${entry.name}`);
|
|
1355
|
+
* if (entry.isDirectory) {
|
|
1356
|
+
* const dir = await join(parent, entry.name);
|
|
1357
|
+
* processEntriesRecursively(dir, await readDir(dir, { baseDir: BaseDirectory.AppLocalData }))
|
|
1358
|
+
* }
|
|
1359
|
+
* }
|
|
1360
|
+
* }
|
|
1361
|
+
* ```
|
|
1362
|
+
*
|
|
1363
|
+
* @since 2.0.0
|
|
1364
|
+
*/
|
|
1365
|
+
async function zt(e, t) {
|
|
1037
1366
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1038
|
-
return await
|
|
1367
|
+
return await X("plugin:fs|read_dir", {
|
|
1039
1368
|
path: e instanceof URL ? e.toString() : e,
|
|
1040
1369
|
options: t
|
|
1041
1370
|
});
|
|
1042
1371
|
}
|
|
1043
|
-
|
|
1372
|
+
/**
|
|
1373
|
+
* Reads and resolves to the entire contents of a file as an array of bytes.
|
|
1374
|
+
* TextDecoder can be used to transform the bytes to string if required.
|
|
1375
|
+
* @example
|
|
1376
|
+
* ```typescript
|
|
1377
|
+
* import { readFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1378
|
+
* const contents = await readFile('avatar.png', { baseDir: BaseDirectory.Resource });
|
|
1379
|
+
* ```
|
|
1380
|
+
*
|
|
1381
|
+
* @since 2.0.0
|
|
1382
|
+
*/
|
|
1383
|
+
async function Bt(e, t) {
|
|
1044
1384
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1045
|
-
let n = await
|
|
1385
|
+
let n = await X("plugin:fs|read_file", {
|
|
1046
1386
|
path: e instanceof URL ? e.toString() : e,
|
|
1047
1387
|
options: t
|
|
1048
1388
|
});
|
|
1049
1389
|
return n instanceof ArrayBuffer ? new Uint8Array(n) : Uint8Array.from(n);
|
|
1050
1390
|
}
|
|
1051
|
-
|
|
1391
|
+
/**
|
|
1392
|
+
* Reads and returns the entire contents of a file as UTF-8 string.
|
|
1393
|
+
* @example
|
|
1394
|
+
* ```typescript
|
|
1395
|
+
* import { readTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1396
|
+
* const contents = await readTextFile('app.conf', { baseDir: BaseDirectory.AppConfig });
|
|
1397
|
+
* ```
|
|
1398
|
+
*
|
|
1399
|
+
* @since 2.0.0
|
|
1400
|
+
*/
|
|
1401
|
+
async function Vt(e, t) {
|
|
1052
1402
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1053
|
-
let n = await
|
|
1403
|
+
let n = await X("plugin:fs|read_text_file", {
|
|
1054
1404
|
path: e instanceof URL ? e.toString() : e,
|
|
1055
1405
|
options: t
|
|
1056
1406
|
}), r = n instanceof ArrayBuffer ? n : Uint8Array.from(n);
|
|
1057
1407
|
return new TextDecoder().decode(r);
|
|
1058
1408
|
}
|
|
1059
|
-
|
|
1409
|
+
/**
|
|
1410
|
+
* Removes the named file or directory.
|
|
1411
|
+
* If the directory is not empty and the `recursive` option isn't set to true, the promise will be rejected.
|
|
1412
|
+
* @example
|
|
1413
|
+
* ```typescript
|
|
1414
|
+
* import { remove, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1415
|
+
* await remove('users/file.txt', { baseDir: BaseDirectory.AppLocalData });
|
|
1416
|
+
* await remove('users', { baseDir: BaseDirectory.AppLocalData });
|
|
1417
|
+
* ```
|
|
1418
|
+
*
|
|
1419
|
+
* @since 2.0.0
|
|
1420
|
+
*/
|
|
1421
|
+
async function Ht(e, t) {
|
|
1060
1422
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1061
|
-
await
|
|
1423
|
+
await X("plugin:fs|remove", {
|
|
1062
1424
|
path: e instanceof URL ? e.toString() : e,
|
|
1063
1425
|
options: t
|
|
1064
1426
|
});
|
|
1065
1427
|
}
|
|
1066
|
-
|
|
1428
|
+
/**
|
|
1429
|
+
* Write `data` to the given `path`, by default creating a new file if needed, else overwriting.
|
|
1430
|
+
* @example
|
|
1431
|
+
* ```typescript
|
|
1432
|
+
* import { writeFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1433
|
+
*
|
|
1434
|
+
* let encoder = new TextEncoder();
|
|
1435
|
+
* let data = encoder.encode("Hello World");
|
|
1436
|
+
* await writeFile('file.txt', data, { baseDir: BaseDirectory.AppLocalData });
|
|
1437
|
+
* ```
|
|
1438
|
+
*
|
|
1439
|
+
* @since 2.0.0
|
|
1440
|
+
*/
|
|
1441
|
+
async function Ut(e, t, n) {
|
|
1067
1442
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1068
1443
|
if (t instanceof ReadableStream) {
|
|
1069
|
-
let r = await
|
|
1444
|
+
let r = await Lt(e, {
|
|
1070
1445
|
read: !1,
|
|
1071
1446
|
create: !0,
|
|
1072
1447
|
write: !0,
|
|
@@ -1081,26 +1456,37 @@ async function writeFile(e, t, n) {
|
|
|
1081
1456
|
} finally {
|
|
1082
1457
|
i.releaseLock(), await r.close();
|
|
1083
1458
|
}
|
|
1084
|
-
} else await
|
|
1459
|
+
} else await X("plugin:fs|write_file", t, { headers: {
|
|
1085
1460
|
path: encodeURIComponent(e instanceof URL ? e.toString() : e),
|
|
1086
1461
|
options: JSON.stringify(n)
|
|
1087
1462
|
} });
|
|
1088
1463
|
}
|
|
1089
|
-
|
|
1464
|
+
/**
|
|
1465
|
+
* Writes UTF-8 string `data` to the given `path`, by default creating a new file if needed, else overwriting.
|
|
1466
|
+
@example
|
|
1467
|
+
* ```typescript
|
|
1468
|
+
* import { writeTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1469
|
+
*
|
|
1470
|
+
* await writeTextFile('file.txt', "Hello world", { baseDir: BaseDirectory.AppLocalData });
|
|
1471
|
+
* ```
|
|
1472
|
+
*
|
|
1473
|
+
* @since 2.0.0
|
|
1474
|
+
*/
|
|
1475
|
+
async function Wt(e, t, n) {
|
|
1090
1476
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1091
|
-
await
|
|
1477
|
+
await X("plugin:fs|write_text_file", new TextEncoder().encode(t), { headers: {
|
|
1092
1478
|
path: encodeURIComponent(e instanceof URL ? e.toString() : e),
|
|
1093
1479
|
options: JSON.stringify(n)
|
|
1094
1480
|
} });
|
|
1095
1481
|
}
|
|
1096
|
-
var
|
|
1482
|
+
var Gt = new class extends bt {
|
|
1097
1483
|
description = {
|
|
1098
1484
|
title: "安装本地插件",
|
|
1099
1485
|
description: "输入以: \"local:\"开头,后接全路径的文本"
|
|
1100
1486
|
};
|
|
1101
1487
|
name = "local";
|
|
1102
1488
|
async installer(e) {
|
|
1103
|
-
let t = decodeURIComponent(
|
|
1489
|
+
let t = decodeURIComponent(mt(e.replace(/^local:/, ""), "local")), n = t.split(/\\|\//).at(-1) ?? "us.js", r = await Bt(t);
|
|
1104
1490
|
return new File([r], n);
|
|
1105
1491
|
}
|
|
1106
1492
|
async install(e) {
|
|
@@ -1112,14 +1498,14 @@ var _20_local_default = new class extends PluginInstaller {
|
|
|
1112
1498
|
isMatched(e) {
|
|
1113
1499
|
return e.startsWith("local:");
|
|
1114
1500
|
}
|
|
1115
|
-
}(),
|
|
1501
|
+
}(), Kt = new class extends bt {
|
|
1116
1502
|
description = {
|
|
1117
1503
|
title: "安装Develop Userscript插件",
|
|
1118
1504
|
description: "输入形如: \"localhost\"或者一个可以不含port的ip"
|
|
1119
1505
|
};
|
|
1120
1506
|
name = "devUrl";
|
|
1121
1507
|
async installer(e) {
|
|
1122
|
-
let t = await
|
|
1508
|
+
let t = await W.request({
|
|
1123
1509
|
url: `http://${/:\d+$/.test(e) ? e : e + ":6173"}/__vite-plugin-monkey.install.user.js?origin=http%3A%2F%2F${e}%3A6173`,
|
|
1124
1510
|
responseType: "text"
|
|
1125
1511
|
}), n = e.replace(/:\d+$/, ""), r = t.data.replaceAll("localhost", n).replaceAll("127.0.0.1", n);
|
|
@@ -1135,14 +1521,14 @@ var _20_local_default = new class extends PluginInstaller {
|
|
|
1135
1521
|
return /^(((\d+\.?)+)|(localhost))(:\d+)?$/.test(e);
|
|
1136
1522
|
}
|
|
1137
1523
|
}();
|
|
1138
|
-
function
|
|
1524
|
+
function qt() {
|
|
1139
1525
|
return typeof navigator == "object" && "userAgent" in navigator ? navigator.userAgent : typeof process == "object" && process.version !== void 0 ? `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})` : "<environment undetectable>";
|
|
1140
1526
|
}
|
|
1141
|
-
function
|
|
1527
|
+
function Jt(e, t, n, r) {
|
|
1142
1528
|
if (typeof n != "function") throw Error("method for before hook must be a function");
|
|
1143
|
-
return r ||= {}, Array.isArray(t) ? t.reverse().reduce((t, n) =>
|
|
1529
|
+
return r ||= {}, Array.isArray(t) ? t.reverse().reduce((t, n) => Jt.bind(null, e, n, t, r), n)() : Promise.resolve().then(() => e.registry[t] ? e.registry[t].reduce((e, t) => t.hook.bind(null, e, r), n)() : n(r));
|
|
1144
1530
|
}
|
|
1145
|
-
function
|
|
1531
|
+
function Yt(e, t, n, r) {
|
|
1146
1532
|
let i = r;
|
|
1147
1533
|
e.registry[n] || (e.registry[n] = []), t === "before" && (r = (e, t) => Promise.resolve().then(i.bind(null, t)).then(e.bind(null, t))), t === "after" && (r = (e, t) => {
|
|
1148
1534
|
let n;
|
|
@@ -1152,14 +1538,14 @@ function addHook(e, t, n, r) {
|
|
|
1152
1538
|
orig: i
|
|
1153
1539
|
});
|
|
1154
1540
|
}
|
|
1155
|
-
function
|
|
1541
|
+
function Xt(e, t, n) {
|
|
1156
1542
|
if (!e.registry[t]) return;
|
|
1157
1543
|
let r = e.registry[t].map((e) => e.orig).indexOf(n);
|
|
1158
1544
|
r !== -1 && e.registry[t].splice(r, 1);
|
|
1159
1545
|
}
|
|
1160
|
-
var
|
|
1161
|
-
function
|
|
1162
|
-
let r =
|
|
1546
|
+
var Zt = Function.bind, Qt = Zt.bind(Zt);
|
|
1547
|
+
function $t(e, t, n) {
|
|
1548
|
+
let r = Qt(Xt, null).apply(null, n ? [t, n] : [t]);
|
|
1163
1549
|
e.api = { remove: r }, e.remove = r, [
|
|
1164
1550
|
"before",
|
|
1165
1551
|
"error",
|
|
@@ -1171,50 +1557,50 @@ function bindApi(e, t, n) {
|
|
|
1171
1557
|
r,
|
|
1172
1558
|
n
|
|
1173
1559
|
] : [t, r];
|
|
1174
|
-
e[r] = e.api[r] =
|
|
1560
|
+
e[r] = e.api[r] = Qt(Yt, null).apply(null, i);
|
|
1175
1561
|
});
|
|
1176
1562
|
}
|
|
1177
|
-
function
|
|
1178
|
-
let e = Symbol("Singular"), t = { registry: {} }, n =
|
|
1179
|
-
return
|
|
1563
|
+
function en() {
|
|
1564
|
+
let e = Symbol("Singular"), t = { registry: {} }, n = Jt.bind(null, t, e);
|
|
1565
|
+
return $t(n, t, e), n;
|
|
1180
1566
|
}
|
|
1181
|
-
function
|
|
1182
|
-
let e = { registry: {} }, t =
|
|
1183
|
-
return
|
|
1567
|
+
function tn() {
|
|
1568
|
+
let e = { registry: {} }, t = Jt.bind(null, e);
|
|
1569
|
+
return $t(t, e), t;
|
|
1184
1570
|
}
|
|
1185
|
-
var
|
|
1186
|
-
Singular,
|
|
1187
|
-
Collection
|
|
1188
|
-
},
|
|
1571
|
+
var nn = {
|
|
1572
|
+
Singular: en,
|
|
1573
|
+
Collection: tn
|
|
1574
|
+
}, rn = `octokit-endpoint.js/0.0.0-development ${qt()}`, an = {
|
|
1189
1575
|
method: "GET",
|
|
1190
1576
|
baseUrl: "https://api.github.com",
|
|
1191
1577
|
headers: {
|
|
1192
1578
|
accept: "application/vnd.github.v3+json",
|
|
1193
|
-
"user-agent":
|
|
1579
|
+
"user-agent": rn
|
|
1194
1580
|
},
|
|
1195
1581
|
mediaType: { format: "" }
|
|
1196
1582
|
};
|
|
1197
|
-
function
|
|
1583
|
+
function on(e) {
|
|
1198
1584
|
return e ? Object.keys(e).reduce((t, n) => (t[n.toLowerCase()] = e[n], t), {}) : {};
|
|
1199
1585
|
}
|
|
1200
|
-
function
|
|
1586
|
+
function sn(e) {
|
|
1201
1587
|
if (typeof e != "object" || !e || Object.prototype.toString.call(e) !== "[object Object]") return !1;
|
|
1202
1588
|
let t = Object.getPrototypeOf(e);
|
|
1203
1589
|
if (t === null) return !0;
|
|
1204
1590
|
let n = Object.prototype.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
1205
1591
|
return typeof n == "function" && n instanceof n && Function.prototype.call(n) === Function.prototype.call(e);
|
|
1206
1592
|
}
|
|
1207
|
-
function
|
|
1593
|
+
function cn(e, t) {
|
|
1208
1594
|
let n = Object.assign({}, e);
|
|
1209
1595
|
return Object.keys(t).forEach((r) => {
|
|
1210
|
-
|
|
1596
|
+
sn(t[r]) && r in e ? n[r] = cn(e[r], t[r]) : Object.assign(n, { [r]: t[r] });
|
|
1211
1597
|
}), n;
|
|
1212
1598
|
}
|
|
1213
|
-
function
|
|
1599
|
+
function ln(e) {
|
|
1214
1600
|
for (let t in e) e[t] === void 0 && delete e[t];
|
|
1215
1601
|
return e;
|
|
1216
1602
|
}
|
|
1217
|
-
function
|
|
1603
|
+
function un(e, t, n) {
|
|
1218
1604
|
if (typeof t == "string") {
|
|
1219
1605
|
let [e, r] = t.split(" ");
|
|
1220
1606
|
n = Object.assign(r ? {
|
|
@@ -1222,69 +1608,69 @@ function merge(e, t, n) {
|
|
|
1222
1608
|
url: r
|
|
1223
1609
|
} : { url: e }, n);
|
|
1224
1610
|
} else n = Object.assign({}, t);
|
|
1225
|
-
n.headers =
|
|
1226
|
-
let r =
|
|
1611
|
+
n.headers = on(n.headers), ln(n), ln(n.headers);
|
|
1612
|
+
let r = cn(e || {}, n);
|
|
1227
1613
|
return n.url === "/graphql" && (e && e.mediaType.previews?.length && (r.mediaType.previews = e.mediaType.previews.filter((e) => !r.mediaType.previews.includes(e)).concat(r.mediaType.previews)), r.mediaType.previews = (r.mediaType.previews || []).map((e) => e.replace(/-preview/, ""))), r;
|
|
1228
1614
|
}
|
|
1229
|
-
function
|
|
1615
|
+
function dn(e, t) {
|
|
1230
1616
|
let n = /\?/.test(e) ? "&" : "?", r = Object.keys(t);
|
|
1231
1617
|
return r.length === 0 ? e : e + n + r.map((e) => e === "q" ? "q=" + t.q.split("+").map(encodeURIComponent).join("+") : `${e}=${encodeURIComponent(t[e])}`).join("&");
|
|
1232
1618
|
}
|
|
1233
|
-
var
|
|
1234
|
-
function
|
|
1619
|
+
var fn = /\{[^{}}]+\}/g;
|
|
1620
|
+
function pn(e) {
|
|
1235
1621
|
return e.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
|
|
1236
1622
|
}
|
|
1237
|
-
function
|
|
1238
|
-
let t = e.match(
|
|
1239
|
-
return t ? t.map(
|
|
1623
|
+
function mn(e) {
|
|
1624
|
+
let t = e.match(fn);
|
|
1625
|
+
return t ? t.map(pn).reduce((e, t) => e.concat(t), []) : [];
|
|
1240
1626
|
}
|
|
1241
|
-
function
|
|
1627
|
+
function hn(e, t) {
|
|
1242
1628
|
let n = { __proto__: null };
|
|
1243
1629
|
for (let r of Object.keys(e)) t.indexOf(r) === -1 && (n[r] = e[r]);
|
|
1244
1630
|
return n;
|
|
1245
1631
|
}
|
|
1246
|
-
function
|
|
1632
|
+
function gn(e) {
|
|
1247
1633
|
return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(e) {
|
|
1248
1634
|
return /%[0-9A-Fa-f]/.test(e) || (e = encodeURI(e).replace(/%5B/g, "[").replace(/%5D/g, "]")), e;
|
|
1249
1635
|
}).join("");
|
|
1250
1636
|
}
|
|
1251
|
-
function
|
|
1637
|
+
function _n(e) {
|
|
1252
1638
|
return encodeURIComponent(e).replace(/[!'()*]/g, function(e) {
|
|
1253
1639
|
return "%" + e.charCodeAt(0).toString(16).toUpperCase();
|
|
1254
1640
|
});
|
|
1255
1641
|
}
|
|
1256
|
-
function
|
|
1257
|
-
return t = e === "+" || e === "#" ?
|
|
1642
|
+
function vn(e, t, n) {
|
|
1643
|
+
return t = e === "+" || e === "#" ? gn(t) : _n(t), n ? _n(n) + "=" + t : t;
|
|
1258
1644
|
}
|
|
1259
|
-
function
|
|
1645
|
+
function yn(e) {
|
|
1260
1646
|
return e != null;
|
|
1261
1647
|
}
|
|
1262
|
-
function
|
|
1648
|
+
function bn(e) {
|
|
1263
1649
|
return e === ";" || e === "&" || e === "?";
|
|
1264
1650
|
}
|
|
1265
|
-
function
|
|
1651
|
+
function xn(e, t, n, r) {
|
|
1266
1652
|
var i = e[n], a = [];
|
|
1267
|
-
if (
|
|
1268
|
-
else if (r === "*") Array.isArray(i) ? i.filter(
|
|
1269
|
-
a.push(
|
|
1653
|
+
if (yn(i) && i !== "") if (typeof i == "string" || typeof i == "number" || typeof i == "boolean") i = i.toString(), r && r !== "*" && (i = i.substring(0, parseInt(r, 10))), a.push(vn(t, i, bn(t) ? n : ""));
|
|
1654
|
+
else if (r === "*") Array.isArray(i) ? i.filter(yn).forEach(function(e) {
|
|
1655
|
+
a.push(vn(t, e, bn(t) ? n : ""));
|
|
1270
1656
|
}) : Object.keys(i).forEach(function(e) {
|
|
1271
|
-
|
|
1657
|
+
yn(i[e]) && a.push(vn(t, i[e], e));
|
|
1272
1658
|
});
|
|
1273
1659
|
else {
|
|
1274
1660
|
let e = [];
|
|
1275
|
-
Array.isArray(i) ? i.filter(
|
|
1276
|
-
e.push(
|
|
1661
|
+
Array.isArray(i) ? i.filter(yn).forEach(function(n) {
|
|
1662
|
+
e.push(vn(t, n));
|
|
1277
1663
|
}) : Object.keys(i).forEach(function(n) {
|
|
1278
|
-
|
|
1279
|
-
}),
|
|
1664
|
+
yn(i[n]) && (e.push(_n(n)), e.push(vn(t, i[n].toString())));
|
|
1665
|
+
}), bn(t) ? a.push(_n(n) + "=" + e.join(",")) : e.length !== 0 && a.push(e.join(","));
|
|
1280
1666
|
}
|
|
1281
|
-
else t === ";" ?
|
|
1667
|
+
else t === ";" ? yn(i) && a.push(_n(n)) : i === "" && (t === "&" || t === "?") ? a.push(_n(n) + "=") : i === "" && a.push("");
|
|
1282
1668
|
return a;
|
|
1283
1669
|
}
|
|
1284
|
-
function
|
|
1285
|
-
return { expand:
|
|
1670
|
+
function Sn(e) {
|
|
1671
|
+
return { expand: Cn.bind(null, e) };
|
|
1286
1672
|
}
|
|
1287
|
-
function
|
|
1673
|
+
function Cn(e, t) {
|
|
1288
1674
|
var n = [
|
|
1289
1675
|
"+",
|
|
1290
1676
|
"#",
|
|
@@ -1299,51 +1685,72 @@ function expand(e, t) {
|
|
|
1299
1685
|
let e = "", i = [];
|
|
1300
1686
|
if (n.indexOf(r.charAt(0)) !== -1 && (e = r.charAt(0), r = r.substr(1)), r.split(/,/g).forEach(function(n) {
|
|
1301
1687
|
var r = /([^:\*]*)(?::(\d+)|(\*))?/.exec(n);
|
|
1302
|
-
i.push(
|
|
1688
|
+
i.push(xn(t, e, r[1], r[2] || r[3]));
|
|
1303
1689
|
}), e && e !== "+") {
|
|
1304
1690
|
var a = ",";
|
|
1305
1691
|
return e === "?" ? a = "&" : e !== "#" && (a = e), (i.length === 0 ? "" : e) + i.join(a);
|
|
1306
1692
|
} else return i.join(",");
|
|
1307
|
-
} else return
|
|
1693
|
+
} else return gn(i);
|
|
1308
1694
|
}), e === "/" ? e : e.replace(/\/$/, "");
|
|
1309
1695
|
}
|
|
1310
|
-
function
|
|
1311
|
-
let t = e.method.toUpperCase(), n = (e.url || "/").replace(/:([a-z]\w+)/g, "{$1}"), r = Object.assign({}, e.headers), i, a =
|
|
1696
|
+
function wn(e) {
|
|
1697
|
+
let t = e.method.toUpperCase(), n = (e.url || "/").replace(/:([a-z]\w+)/g, "{$1}"), r = Object.assign({}, e.headers), i, a = hn(e, [
|
|
1312
1698
|
"method",
|
|
1313
1699
|
"baseUrl",
|
|
1314
1700
|
"url",
|
|
1315
1701
|
"headers",
|
|
1316
1702
|
"request",
|
|
1317
1703
|
"mediaType"
|
|
1318
|
-
]), o =
|
|
1319
|
-
n =
|
|
1320
|
-
let s =
|
|
1321
|
-
return /application\/octet-stream/i.test(r.accept) || (e.mediaType.format && (r.accept = r.accept.split(/,/).map((t) => t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${e.mediaType.format}`)).join(",")), n.endsWith("/graphql") && e.mediaType.previews?.length && (r.accept = (r.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || []).concat(e.mediaType.previews).map((t) => `application/vnd.github.${t}-preview${e.mediaType.format ? `.${e.mediaType.format}` : "+json"}`).join(","))), ["GET", "HEAD"].includes(t) ? n =
|
|
1704
|
+
]), o = mn(n);
|
|
1705
|
+
n = Sn(n).expand(a), /^http/.test(n) || (n = e.baseUrl + n);
|
|
1706
|
+
let s = hn(a, Object.keys(e).filter((e) => o.includes(e)).concat("baseUrl"));
|
|
1707
|
+
return /application\/octet-stream/i.test(r.accept) || (e.mediaType.format && (r.accept = r.accept.split(/,/).map((t) => t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${e.mediaType.format}`)).join(",")), n.endsWith("/graphql") && e.mediaType.previews?.length && (r.accept = (r.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || []).concat(e.mediaType.previews).map((t) => `application/vnd.github.${t}-preview${e.mediaType.format ? `.${e.mediaType.format}` : "+json"}`).join(","))), ["GET", "HEAD"].includes(t) ? n = dn(n, s) : "data" in s ? i = s.data : Object.keys(s).length && (i = s), !r["content-type"] && i !== void 0 && (r["content-type"] = "application/json; charset=utf-8"), ["PATCH", "PUT"].includes(t) && i === void 0 && (i = ""), Object.assign({
|
|
1322
1708
|
method: t,
|
|
1323
1709
|
url: n,
|
|
1324
1710
|
headers: r
|
|
1325
1711
|
}, i === void 0 ? null : { body: i }, e.request ? { request: e.request } : null);
|
|
1326
1712
|
}
|
|
1327
|
-
function
|
|
1328
|
-
return
|
|
1713
|
+
function Tn(e, t, n) {
|
|
1714
|
+
return wn(un(e, t, n));
|
|
1329
1715
|
}
|
|
1330
|
-
function
|
|
1331
|
-
let n =
|
|
1716
|
+
function En(e, t) {
|
|
1717
|
+
let n = un(e, t), r = Tn.bind(null, n);
|
|
1332
1718
|
return Object.assign(r, {
|
|
1333
1719
|
DEFAULTS: n,
|
|
1334
|
-
defaults:
|
|
1335
|
-
merge:
|
|
1336
|
-
parse:
|
|
1720
|
+
defaults: En.bind(null, n),
|
|
1721
|
+
merge: un.bind(null, n),
|
|
1722
|
+
parse: wn
|
|
1337
1723
|
});
|
|
1338
1724
|
}
|
|
1339
|
-
var
|
|
1725
|
+
var Dn = En(null, an), On = (/* @__PURE__ */ G(((e, t) => {
|
|
1340
1726
|
var n = function() {};
|
|
1341
1727
|
n.prototype = Object.create(null);
|
|
1728
|
+
/**
|
|
1729
|
+
* RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
|
|
1730
|
+
*
|
|
1731
|
+
* parameter = token "=" ( token / quoted-string )
|
|
1732
|
+
* token = 1*tchar
|
|
1733
|
+
* tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
|
|
1734
|
+
* / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
|
|
1735
|
+
* / DIGIT / ALPHA
|
|
1736
|
+
* ; any VCHAR, except delimiters
|
|
1737
|
+
* quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
|
|
1738
|
+
* qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
|
|
1739
|
+
* obs-text = %x80-FF
|
|
1740
|
+
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
|
1741
|
+
*/
|
|
1342
1742
|
var r = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu, i = /\\([\v\u0020-\u00ff])/gu, a = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u, o = {
|
|
1343
1743
|
type: "",
|
|
1344
1744
|
parameters: new n()
|
|
1345
1745
|
};
|
|
1346
1746
|
Object.freeze(o.parameters), Object.freeze(o);
|
|
1747
|
+
/**
|
|
1748
|
+
* Parse media type to object.
|
|
1749
|
+
*
|
|
1750
|
+
* @param {string|object} header
|
|
1751
|
+
* @return {Object}
|
|
1752
|
+
* @public
|
|
1753
|
+
*/
|
|
1347
1754
|
function s(e) {
|
|
1348
1755
|
if (typeof e != "string") throw TypeError("argument header is required and must be a string");
|
|
1349
1756
|
let t = e.indexOf(";"), o = t === -1 ? e.trim() : e.slice(0, t).trim();
|
|
@@ -1381,10 +1788,19 @@ var endpoint = withDefaults$2(null, DEFAULTS), import_fast_content_type_parse =
|
|
|
1381
1788
|
parse: s,
|
|
1382
1789
|
safeParse: c
|
|
1383
1790
|
}, t.exports.parse = s, t.exports.safeParse = c, t.exports.defaultContentType = o;
|
|
1384
|
-
})))(),
|
|
1791
|
+
})))(), kn = class extends Error {
|
|
1385
1792
|
name;
|
|
1793
|
+
/**
|
|
1794
|
+
* http status code
|
|
1795
|
+
*/
|
|
1386
1796
|
status;
|
|
1797
|
+
/**
|
|
1798
|
+
* Request options that lead to the error.
|
|
1799
|
+
*/
|
|
1387
1800
|
request;
|
|
1801
|
+
/**
|
|
1802
|
+
* Response object if a response was received
|
|
1803
|
+
*/
|
|
1388
1804
|
response;
|
|
1389
1805
|
constructor(e, t, n) {
|
|
1390
1806
|
/* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */
|
|
@@ -1392,19 +1808,19 @@ var endpoint = withDefaults$2(null, DEFAULTS), import_fast_content_type_parse =
|
|
|
1392
1808
|
let r = Object.assign({}, n.request);
|
|
1393
1809
|
n.request.headers.authorization && (r.headers = Object.assign({}, n.request.headers, { authorization: n.request.headers.authorization.replace(/(?<! ) .*$/, " [REDACTED]") })), r.url = r.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"), this.request = r;
|
|
1394
1810
|
}
|
|
1395
|
-
},
|
|
1396
|
-
function
|
|
1811
|
+
}, An = "10.0.7", jn = { headers: { "user-agent": `octokit-request.js/${An} ${qt()}` } };
|
|
1812
|
+
function Mn(e) {
|
|
1397
1813
|
if (typeof e != "object" || !e || Object.prototype.toString.call(e) !== "[object Object]") return !1;
|
|
1398
1814
|
let t = Object.getPrototypeOf(e);
|
|
1399
1815
|
if (t === null) return !0;
|
|
1400
1816
|
let n = Object.prototype.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
1401
1817
|
return typeof n == "function" && n instanceof n && Function.prototype.call(n) === Function.prototype.call(e);
|
|
1402
1818
|
}
|
|
1403
|
-
var
|
|
1404
|
-
async function
|
|
1819
|
+
var Nn = () => "";
|
|
1820
|
+
async function Pn(e) {
|
|
1405
1821
|
let t = e.request?.fetch || globalThis.fetch;
|
|
1406
1822
|
if (!t) throw Error("fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing");
|
|
1407
|
-
let n = e.request?.log || console, r = e.request?.parseSuccessResponseBody !== !1, i =
|
|
1823
|
+
let n = e.request?.log || console, r = e.request?.parseSuccessResponseBody !== !1, i = Mn(e.body) || Array.isArray(e.body) ? JSON.stringify(e.body) : e.body, a = Object.fromEntries(Object.entries(e.headers).map(([e, t]) => [e, String(t)])), o;
|
|
1408
1824
|
try {
|
|
1409
1825
|
o = await t(e.url, {
|
|
1410
1826
|
method: e.method,
|
|
@@ -1420,7 +1836,7 @@ async function fetchWrapper(e) {
|
|
|
1420
1836
|
if (t.name === "AbortError") throw t.status = 500, t;
|
|
1421
1837
|
n = t.message, t.name === "TypeError" && "cause" in t && (t.cause instanceof Error ? n = t.cause.message : typeof t.cause == "string" && (n = t.cause));
|
|
1422
1838
|
}
|
|
1423
|
-
let r = new
|
|
1839
|
+
let r = new kn(n, 500, { request: e });
|
|
1424
1840
|
throw r.cause = t, r;
|
|
1425
1841
|
}
|
|
1426
1842
|
let s = o.status, c = o.url, l = {};
|
|
@@ -1438,42 +1854,42 @@ async function fetchWrapper(e) {
|
|
|
1438
1854
|
if (s === 204 || s === 205) return u;
|
|
1439
1855
|
if (e.method === "HEAD") {
|
|
1440
1856
|
if (s < 400) return u;
|
|
1441
|
-
throw new
|
|
1857
|
+
throw new kn(o.statusText, s, {
|
|
1442
1858
|
response: u,
|
|
1443
1859
|
request: e
|
|
1444
1860
|
});
|
|
1445
1861
|
}
|
|
1446
|
-
if (s === 304) throw u.data = await
|
|
1862
|
+
if (s === 304) throw u.data = await Fn(o), new kn("Not modified", s, {
|
|
1447
1863
|
response: u,
|
|
1448
1864
|
request: e
|
|
1449
1865
|
});
|
|
1450
|
-
if (s >= 400) throw u.data = await
|
|
1866
|
+
if (s >= 400) throw u.data = await Fn(o), new kn(Ln(u.data), s, {
|
|
1451
1867
|
response: u,
|
|
1452
1868
|
request: e
|
|
1453
1869
|
});
|
|
1454
|
-
return u.data = r ? await
|
|
1870
|
+
return u.data = r ? await Fn(o) : o.body, u;
|
|
1455
1871
|
}
|
|
1456
|
-
async function
|
|
1872
|
+
async function Fn(e) {
|
|
1457
1873
|
let t = e.headers.get("content-type");
|
|
1458
|
-
if (!t) return e.text().catch(
|
|
1459
|
-
let n = (0,
|
|
1460
|
-
if (
|
|
1874
|
+
if (!t) return e.text().catch(Nn);
|
|
1875
|
+
let n = (0, On.safeParse)(t);
|
|
1876
|
+
if (In(n)) {
|
|
1461
1877
|
let t = "";
|
|
1462
1878
|
try {
|
|
1463
1879
|
return t = await e.text(), JSON.parse(t);
|
|
1464
1880
|
} catch {
|
|
1465
1881
|
return t;
|
|
1466
1882
|
}
|
|
1467
|
-
} else if (n.type.startsWith("text/") || n.parameters.charset?.toLowerCase() === "utf-8") return e.text().catch(
|
|
1883
|
+
} else if (n.type.startsWith("text/") || n.parameters.charset?.toLowerCase() === "utf-8") return e.text().catch(Nn);
|
|
1468
1884
|
else return e.arrayBuffer().catch(
|
|
1469
1885
|
/* v8 ignore next -- @preserve */
|
|
1470
1886
|
() => /* @__PURE__ */ new ArrayBuffer(0)
|
|
1471
1887
|
);
|
|
1472
1888
|
}
|
|
1473
|
-
function
|
|
1889
|
+
function In(e) {
|
|
1474
1890
|
return e.type === "application/json" || e.type === "application/scim+json";
|
|
1475
1891
|
}
|
|
1476
|
-
function
|
|
1892
|
+
function Ln(e) {
|
|
1477
1893
|
if (typeof e == "string") return e;
|
|
1478
1894
|
if (e instanceof ArrayBuffer) return "Unknown error";
|
|
1479
1895
|
if ("message" in e) {
|
|
@@ -1482,33 +1898,33 @@ function toErrorMessage(e) {
|
|
|
1482
1898
|
}
|
|
1483
1899
|
return `Unknown error: ${JSON.stringify(e)}`;
|
|
1484
1900
|
}
|
|
1485
|
-
function
|
|
1901
|
+
function Rn(e, t) {
|
|
1486
1902
|
let n = e.defaults(t);
|
|
1487
1903
|
return Object.assign(function(e, t) {
|
|
1488
1904
|
let r = n.merge(e, t);
|
|
1489
|
-
if (!r.request || !r.request.hook) return
|
|
1490
|
-
let i = (e, t) =>
|
|
1905
|
+
if (!r.request || !r.request.hook) return Pn(n.parse(r));
|
|
1906
|
+
let i = (e, t) => Pn(n.parse(n.merge(e, t)));
|
|
1491
1907
|
return Object.assign(i, {
|
|
1492
1908
|
endpoint: n,
|
|
1493
|
-
defaults:
|
|
1909
|
+
defaults: Rn.bind(null, n)
|
|
1494
1910
|
}), r.request.hook(i, r);
|
|
1495
1911
|
}, {
|
|
1496
1912
|
endpoint: n,
|
|
1497
|
-
defaults:
|
|
1913
|
+
defaults: Rn.bind(null, n)
|
|
1498
1914
|
});
|
|
1499
1915
|
}
|
|
1500
|
-
var
|
|
1501
|
-
function
|
|
1916
|
+
var zn = Rn(Dn, jn), Bn = "0.0.0-development";
|
|
1917
|
+
function Vn(e) {
|
|
1502
1918
|
return "Request failed due to following response errors:\n" + e.errors.map((e) => ` - ${e.message}`).join("\n");
|
|
1503
1919
|
}
|
|
1504
|
-
var
|
|
1920
|
+
var Hn = class extends Error {
|
|
1505
1921
|
constructor(e, t, n) {
|
|
1506
|
-
super(
|
|
1922
|
+
super(Vn(n)), this.request = e, this.headers = t, this.response = n, this.errors = n.errors, this.data = n.data, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
|
|
1507
1923
|
}
|
|
1508
1924
|
name = "GraphqlResponseError";
|
|
1509
1925
|
errors;
|
|
1510
1926
|
data;
|
|
1511
|
-
},
|
|
1927
|
+
}, Un = [
|
|
1512
1928
|
"method",
|
|
1513
1929
|
"baseUrl",
|
|
1514
1930
|
"url",
|
|
@@ -1517,70 +1933,70 @@ var GraphqlResponseError = class extends Error {
|
|
|
1517
1933
|
"query",
|
|
1518
1934
|
"mediaType",
|
|
1519
1935
|
"operationName"
|
|
1520
|
-
],
|
|
1936
|
+
], Wn = [
|
|
1521
1937
|
"query",
|
|
1522
1938
|
"method",
|
|
1523
1939
|
"url"
|
|
1524
|
-
],
|
|
1525
|
-
function
|
|
1940
|
+
], Gn = /\/api\/v3\/?$/;
|
|
1941
|
+
function Kn(e, t, n) {
|
|
1526
1942
|
if (n) {
|
|
1527
1943
|
if (typeof t == "string" && "query" in n) return Promise.reject(/* @__PURE__ */ Error("[@octokit/graphql] \"query\" cannot be used as variable name"));
|
|
1528
|
-
for (let e in n) if (
|
|
1944
|
+
for (let e in n) if (Wn.includes(e)) return Promise.reject(/* @__PURE__ */ Error(`[@octokit/graphql] "${e}" cannot be used as variable name`));
|
|
1529
1945
|
}
|
|
1530
|
-
let r = typeof t == "string" ? Object.assign({ query: t }, n) : t, i = Object.keys(r).reduce((e, t) =>
|
|
1531
|
-
return
|
|
1946
|
+
let r = typeof t == "string" ? Object.assign({ query: t }, n) : t, i = Object.keys(r).reduce((e, t) => Un.includes(t) ? (e[t] = r[t], e) : (e.variables ||= {}, e.variables[t] = r[t], e), {}), a = r.baseUrl || e.endpoint.DEFAULTS.baseUrl;
|
|
1947
|
+
return Gn.test(a) && (i.url = a.replace(Gn, "/api/graphql")), e(i).then((e) => {
|
|
1532
1948
|
if (e.data.errors) {
|
|
1533
1949
|
let t = {};
|
|
1534
1950
|
for (let n of Object.keys(e.headers)) t[n] = e.headers[n];
|
|
1535
|
-
throw new
|
|
1951
|
+
throw new Hn(i, t, e.data);
|
|
1536
1952
|
}
|
|
1537
1953
|
return e.data.data;
|
|
1538
1954
|
});
|
|
1539
1955
|
}
|
|
1540
|
-
function
|
|
1956
|
+
function qn(e, t) {
|
|
1541
1957
|
let n = e.defaults(t);
|
|
1542
|
-
return Object.assign((e, t) =>
|
|
1543
|
-
defaults:
|
|
1958
|
+
return Object.assign((e, t) => Kn(n, e, t), {
|
|
1959
|
+
defaults: qn.bind(null, n),
|
|
1544
1960
|
endpoint: n.endpoint
|
|
1545
1961
|
});
|
|
1546
1962
|
}
|
|
1547
|
-
|
|
1548
|
-
headers: { "user-agent": `octokit-graphql.js/${
|
|
1963
|
+
qn(zn, {
|
|
1964
|
+
headers: { "user-agent": `octokit-graphql.js/${Bn} ${qt()}` },
|
|
1549
1965
|
method: "POST",
|
|
1550
1966
|
url: "/graphql"
|
|
1551
1967
|
});
|
|
1552
|
-
function
|
|
1553
|
-
return
|
|
1968
|
+
function Jn(e) {
|
|
1969
|
+
return qn(e, {
|
|
1554
1970
|
method: "POST",
|
|
1555
1971
|
url: "/graphql"
|
|
1556
1972
|
});
|
|
1557
1973
|
}
|
|
1558
|
-
var
|
|
1559
|
-
async function
|
|
1560
|
-
let t =
|
|
1974
|
+
var Yn = "(?:[a-zA-Z0-9_-]+)", Xn = "\\.", Zn = RegExp(`^${Yn}${Xn}${Yn}${Xn}${Yn}$`), Qn = Zn.test.bind(Zn);
|
|
1975
|
+
async function $n(e) {
|
|
1976
|
+
let t = Qn(e), n = e.startsWith("v1.") || e.startsWith("ghs_"), r = e.startsWith("ghu_");
|
|
1561
1977
|
return {
|
|
1562
1978
|
type: "token",
|
|
1563
1979
|
token: e,
|
|
1564
1980
|
tokenType: t ? "app" : n ? "installation" : r ? "user-to-server" : "oauth"
|
|
1565
1981
|
};
|
|
1566
1982
|
}
|
|
1567
|
-
function
|
|
1983
|
+
function er(e) {
|
|
1568
1984
|
return e.split(/\./).length === 3 ? `bearer ${e}` : `token ${e}`;
|
|
1569
1985
|
}
|
|
1570
|
-
async function
|
|
1986
|
+
async function tr(e, t, n, r) {
|
|
1571
1987
|
let i = t.endpoint.merge(n, r);
|
|
1572
|
-
return i.headers.authorization =
|
|
1988
|
+
return i.headers.authorization = er(e), t(i);
|
|
1573
1989
|
}
|
|
1574
|
-
var
|
|
1990
|
+
var nr = function(e) {
|
|
1575
1991
|
if (!e) throw Error("[@octokit/auth-token] No token passed to createTokenAuth");
|
|
1576
1992
|
if (typeof e != "string") throw Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
|
|
1577
|
-
return e = e.replace(/^(token|bearer) +/i, ""), Object.assign(
|
|
1578
|
-
},
|
|
1579
|
-
function
|
|
1580
|
-
return typeof e.debug != "function" && (e.debug =
|
|
1993
|
+
return e = e.replace(/^(token|bearer) +/i, ""), Object.assign($n.bind(null, e), { hook: tr.bind(null, e) });
|
|
1994
|
+
}, rr = "7.0.6", ir = () => {}, ar = console.warn.bind(console), or = console.error.bind(console);
|
|
1995
|
+
function sr(e = {}) {
|
|
1996
|
+
return typeof e.debug != "function" && (e.debug = ir), typeof e.info != "function" && (e.info = ir), typeof e.warn != "function" && (e.warn = ar), typeof e.error != "function" && (e.error = or), e;
|
|
1581
1997
|
}
|
|
1582
|
-
var
|
|
1583
|
-
static VERSION =
|
|
1998
|
+
var cr = `octokit-core.js/${rr} ${qt()}`, lr = class {
|
|
1999
|
+
static VERSION = rr;
|
|
1584
2000
|
static defaults(e) {
|
|
1585
2001
|
return class extends this {
|
|
1586
2002
|
constructor(...t) {
|
|
@@ -1594,6 +2010,12 @@ var userAgentTrail = `octokit-core.js/${VERSION$4} ${getUserAgent()}`, Octokit$1
|
|
|
1594
2010
|
};
|
|
1595
2011
|
}
|
|
1596
2012
|
static plugins = [];
|
|
2013
|
+
/**
|
|
2014
|
+
* Attach a plugin (or many) to your Octokit instance.
|
|
2015
|
+
*
|
|
2016
|
+
* @example
|
|
2017
|
+
* const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
|
|
2018
|
+
*/
|
|
1597
2019
|
static plugin(...e) {
|
|
1598
2020
|
let t = this.plugins;
|
|
1599
2021
|
return class extends this {
|
|
@@ -1601,8 +2023,8 @@ var userAgentTrail = `octokit-core.js/${VERSION$4} ${getUserAgent()}`, Octokit$1
|
|
|
1601
2023
|
};
|
|
1602
2024
|
}
|
|
1603
2025
|
constructor(e = {}) {
|
|
1604
|
-
let t = new
|
|
1605
|
-
baseUrl:
|
|
2026
|
+
let t = new nn.Collection(), n = {
|
|
2027
|
+
baseUrl: zn.endpoint.DEFAULTS.baseUrl,
|
|
1606
2028
|
headers: {},
|
|
1607
2029
|
request: Object.assign({}, e.request, { hook: t.bind(null, "request") }),
|
|
1608
2030
|
mediaType: {
|
|
@@ -1610,7 +2032,7 @@ var userAgentTrail = `octokit-core.js/${VERSION$4} ${getUserAgent()}`, Octokit$1
|
|
|
1610
2032
|
format: ""
|
|
1611
2033
|
}
|
|
1612
2034
|
};
|
|
1613
|
-
if (n.headers["user-agent"] = e.userAgent ? `${e.userAgent} ${
|
|
2035
|
+
if (n.headers["user-agent"] = e.userAgent ? `${e.userAgent} ${cr}` : cr, e.baseUrl && (n.baseUrl = e.baseUrl), e.previews && (n.mediaType.previews = e.previews), e.timeZone && (n.headers["time-zone"] = e.timeZone), this.request = zn.defaults(n), this.graphql = Jn(this.request).defaults(n), this.log = sr(e.log), this.hook = t, e.authStrategy) {
|
|
1614
2036
|
let { authStrategy: n, ...r } = e, i = n(Object.assign({
|
|
1615
2037
|
request: this.request,
|
|
1616
2038
|
log: this.log,
|
|
@@ -1620,7 +2042,7 @@ var userAgentTrail = `octokit-core.js/${VERSION$4} ${getUserAgent()}`, Octokit$1
|
|
|
1620
2042
|
t.wrap("request", i.hook), this.auth = i;
|
|
1621
2043
|
} else if (!e.auth) this.auth = async () => ({ type: "unauthenticated" });
|
|
1622
2044
|
else {
|
|
1623
|
-
let n =
|
|
2045
|
+
let n = nr(e.auth);
|
|
1624
2046
|
t.wrap("request", n.hook), this.auth = n;
|
|
1625
2047
|
}
|
|
1626
2048
|
let r = this.constructor;
|
|
@@ -1631,8 +2053,8 @@ var userAgentTrail = `octokit-core.js/${VERSION$4} ${getUserAgent()}`, Octokit$1
|
|
|
1631
2053
|
log;
|
|
1632
2054
|
hook;
|
|
1633
2055
|
auth;
|
|
1634
|
-
},
|
|
1635
|
-
function
|
|
2056
|
+
}, ur = "6.0.0";
|
|
2057
|
+
function dr(e) {
|
|
1636
2058
|
e.hook.wrap("request", (t, n) => {
|
|
1637
2059
|
e.log.debug("request", n);
|
|
1638
2060
|
let r = Date.now(), i = e.request.endpoint.parse(n), a = i.url.replace(n.baseUrl, "");
|
|
@@ -1645,9 +2067,9 @@ function requestLog(e) {
|
|
|
1645
2067
|
});
|
|
1646
2068
|
});
|
|
1647
2069
|
}
|
|
1648
|
-
|
|
1649
|
-
var
|
|
1650
|
-
function
|
|
2070
|
+
dr.VERSION = ur;
|
|
2071
|
+
var fr = "0.0.0-development";
|
|
2072
|
+
function pr(e) {
|
|
1651
2073
|
if (!e.data) return {
|
|
1652
2074
|
...e,
|
|
1653
2075
|
data: []
|
|
@@ -1658,12 +2080,12 @@ function normalizePaginatedListResponse(e) {
|
|
|
1658
2080
|
let a = Object.keys(e.data)[0];
|
|
1659
2081
|
return e.data = e.data[a], t !== void 0 && (e.data.incomplete_results = t), n !== void 0 && (e.data.repository_selection = n), e.data.total_count = r, e.data.total_commits = i, e;
|
|
1660
2082
|
}
|
|
1661
|
-
function
|
|
2083
|
+
function mr(e, t, n) {
|
|
1662
2084
|
let r = typeof t == "function" ? t.endpoint(n) : e.request.endpoint(t, n), i = typeof t == "function" ? t : e.request, a = r.method, o = r.headers, s = r.url;
|
|
1663
2085
|
return { [Symbol.asyncIterator]: () => ({ async next() {
|
|
1664
2086
|
if (!s) return { done: !0 };
|
|
1665
2087
|
try {
|
|
1666
|
-
let e =
|
|
2088
|
+
let e = pr(await i({
|
|
1667
2089
|
method: a,
|
|
1668
2090
|
url: s,
|
|
1669
2091
|
headers: o
|
|
@@ -1683,25 +2105,25 @@ function iterator(e, t, n) {
|
|
|
1683
2105
|
}
|
|
1684
2106
|
} }) };
|
|
1685
2107
|
}
|
|
1686
|
-
function
|
|
1687
|
-
return typeof n == "function" && (r = n, n = void 0),
|
|
2108
|
+
function hr(e, t, n, r) {
|
|
2109
|
+
return typeof n == "function" && (r = n, n = void 0), gr(e, [], mr(e, t, n)[Symbol.asyncIterator](), r);
|
|
1688
2110
|
}
|
|
1689
|
-
function
|
|
2111
|
+
function gr(e, t, n, r) {
|
|
1690
2112
|
return n.next().then((i) => {
|
|
1691
2113
|
if (i.done) return t;
|
|
1692
2114
|
let a = !1;
|
|
1693
2115
|
function o() {
|
|
1694
2116
|
a = !0;
|
|
1695
2117
|
}
|
|
1696
|
-
return t = t.concat(r ? r(i.value, o) : i.value.data), a ? t :
|
|
2118
|
+
return t = t.concat(r ? r(i.value, o) : i.value.data), a ? t : gr(e, t, n, r);
|
|
1697
2119
|
});
|
|
1698
2120
|
}
|
|
1699
|
-
Object.assign(
|
|
1700
|
-
function
|
|
1701
|
-
return { paginate: Object.assign(
|
|
2121
|
+
Object.assign(hr, { iterator: mr });
|
|
2122
|
+
function _r(e) {
|
|
2123
|
+
return { paginate: Object.assign(hr.bind(null, e), { iterator: mr.bind(null, e) }) };
|
|
1702
2124
|
}
|
|
1703
|
-
|
|
1704
|
-
var
|
|
2125
|
+
_r.VERSION = fr;
|
|
2126
|
+
var vr = "17.0.0", yr = {
|
|
1705
2127
|
actions: {
|
|
1706
2128
|
addCustomLabelsToSelfHostedRunnerForOrg: ["POST /orgs/{org}/actions/runners/{runner_id}/labels"],
|
|
1707
2129
|
addCustomLabelsToSelfHostedRunnerForRepo: ["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],
|
|
@@ -2992,22 +3414,22 @@ var VERSION$1 = "17.0.0", endpoints_default = {
|
|
|
2992
3414
|
unfollow: ["DELETE /user/following/{username}"],
|
|
2993
3415
|
updateAuthenticated: ["PATCH /user"]
|
|
2994
3416
|
}
|
|
2995
|
-
},
|
|
2996
|
-
for (let [e, t] of Object.entries(
|
|
3417
|
+
}, $ = /* @__PURE__ */ new Map();
|
|
3418
|
+
for (let [e, t] of Object.entries(yr)) for (let [n, r] of Object.entries(t)) {
|
|
2997
3419
|
let [t, i, a] = r, [o, s] = t.split(/ /), c = Object.assign({
|
|
2998
3420
|
method: o,
|
|
2999
3421
|
url: s
|
|
3000
3422
|
}, i);
|
|
3001
|
-
|
|
3423
|
+
$.has(e) || $.set(e, /* @__PURE__ */ new Map()), $.get(e).set(n, {
|
|
3002
3424
|
scope: e,
|
|
3003
3425
|
methodName: n,
|
|
3004
3426
|
endpointDefaults: c,
|
|
3005
3427
|
decorations: a
|
|
3006
3428
|
});
|
|
3007
3429
|
}
|
|
3008
|
-
var
|
|
3430
|
+
var br = {
|
|
3009
3431
|
has({ scope: e }, t) {
|
|
3010
|
-
return
|
|
3432
|
+
return $.get(e).has(t);
|
|
3011
3433
|
},
|
|
3012
3434
|
getOwnPropertyDescriptor(e, t) {
|
|
3013
3435
|
return {
|
|
@@ -3024,29 +3446,29 @@ var handler = {
|
|
|
3024
3446
|
return delete e.cache[t], !0;
|
|
3025
3447
|
},
|
|
3026
3448
|
ownKeys({ scope: e }) {
|
|
3027
|
-
return [
|
|
3449
|
+
return [...$.get(e).keys()];
|
|
3028
3450
|
},
|
|
3029
3451
|
set(e, t, n) {
|
|
3030
3452
|
return e.cache[t] = n;
|
|
3031
3453
|
},
|
|
3032
3454
|
get({ octokit: e, scope: t, cache: n }, r) {
|
|
3033
3455
|
if (n[r]) return n[r];
|
|
3034
|
-
let i =
|
|
3456
|
+
let i = $.get(t).get(r);
|
|
3035
3457
|
if (!i) return;
|
|
3036
3458
|
let { endpointDefaults: a, decorations: o } = i;
|
|
3037
|
-
return o ? n[r] =
|
|
3459
|
+
return o ? n[r] = Sr(e, t, r, a, o) : n[r] = e.request.defaults(a), n[r];
|
|
3038
3460
|
}
|
|
3039
3461
|
};
|
|
3040
|
-
function
|
|
3462
|
+
function xr(e) {
|
|
3041
3463
|
let t = {};
|
|
3042
|
-
for (let n of
|
|
3464
|
+
for (let n of $.keys()) t[n] = new Proxy({
|
|
3043
3465
|
octokit: e,
|
|
3044
3466
|
scope: n,
|
|
3045
3467
|
cache: {}
|
|
3046
|
-
},
|
|
3468
|
+
}, br);
|
|
3047
3469
|
return t;
|
|
3048
3470
|
}
|
|
3049
|
-
function
|
|
3471
|
+
function Sr(e, t, n, r, i) {
|
|
3050
3472
|
let a = e.request.defaults(r);
|
|
3051
3473
|
function o(...r) {
|
|
3052
3474
|
let o = a.endpoint.merge(...r);
|
|
@@ -3067,19 +3489,19 @@ function decorate(e, t, n, r, i) {
|
|
|
3067
3489
|
}
|
|
3068
3490
|
return Object.assign(o, a);
|
|
3069
3491
|
}
|
|
3070
|
-
function
|
|
3071
|
-
return { rest:
|
|
3492
|
+
function Cr(e) {
|
|
3493
|
+
return { rest: xr(e) };
|
|
3072
3494
|
}
|
|
3073
|
-
|
|
3074
|
-
function
|
|
3075
|
-
let t =
|
|
3495
|
+
Cr.VERSION = vr;
|
|
3496
|
+
function wr(e) {
|
|
3497
|
+
let t = xr(e);
|
|
3076
3498
|
return {
|
|
3077
3499
|
...t,
|
|
3078
3500
|
rest: t
|
|
3079
3501
|
};
|
|
3080
3502
|
}
|
|
3081
|
-
|
|
3082
|
-
var
|
|
3503
|
+
wr.VERSION = vr;
|
|
3504
|
+
var Tr = lr.plugin(dr, wr, _r).defaults({ userAgent: "octokit-rest.js/22.0.1" }), Er = new class extends bt {
|
|
3083
3505
|
description = {
|
|
3084
3506
|
title: "通过Github安装插件",
|
|
3085
3507
|
description: "输入形如: \"gh:owner/repo\"的内容"
|
|
@@ -3087,17 +3509,17 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3087
3509
|
name = "github";
|
|
3088
3510
|
async installer(e) {
|
|
3089
3511
|
try {
|
|
3090
|
-
var t =
|
|
3512
|
+
var t = nt().$load(tt).value.githubToken;
|
|
3091
3513
|
} catch (e) {
|
|
3092
3514
|
console.error("fail to get github token", e);
|
|
3093
3515
|
var t = "";
|
|
3094
3516
|
}
|
|
3095
|
-
let n = new
|
|
3517
|
+
let n = new Tr({ auth: Ae(t) ? void 0 : t }), [r, i] = e.replace(/^gh:/, "").split("/"), { data: a } = await n.rest.repos.getLatestRelease({
|
|
3096
3518
|
owner: r,
|
|
3097
3519
|
repo: i
|
|
3098
3520
|
}), o = a.assets[0];
|
|
3099
3521
|
if (!o) throw Error("未找到资源");
|
|
3100
|
-
let { data: s } = await
|
|
3522
|
+
let { data: s } = await W.request({
|
|
3101
3523
|
url: o.browser_download_url,
|
|
3102
3524
|
responseType: "blob"
|
|
3103
3525
|
});
|
|
@@ -3112,7 +3534,7 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3112
3534
|
isMatched(e) {
|
|
3113
3535
|
return e.startsWith("gh:") && e.split("/").length === 2;
|
|
3114
3536
|
}
|
|
3115
|
-
}(),
|
|
3537
|
+
}(), Dr = (/* @__PURE__ */ G(((e) => {
|
|
3116
3538
|
function t(e) {
|
|
3117
3539
|
return e === void 0;
|
|
3118
3540
|
}
|
|
@@ -3126,24 +3548,24 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3126
3548
|
}, {});
|
|
3127
3549
|
}
|
|
3128
3550
|
e.parse = n;
|
|
3129
|
-
})))(),
|
|
3551
|
+
})))(), Or = new class extends xt {
|
|
3130
3552
|
name = "userscript";
|
|
3131
3553
|
async installDownload(e) {
|
|
3132
|
-
let t = await e.text(), n =
|
|
3133
|
-
return await
|
|
3554
|
+
let t = await e.text(), n = Pe((0, Dr.parse)(t)), r = await yt(n.name.id);
|
|
3555
|
+
return await Rt(r, { recursive: !0 }), await Wt(await Z(r, "us.js"), t, { create: !0 }), n;
|
|
3134
3556
|
}
|
|
3135
3557
|
canInstall(e) {
|
|
3136
3558
|
return e.name.endsWith(".js");
|
|
3137
3559
|
}
|
|
3138
3560
|
async load(e) {
|
|
3139
|
-
let t = await
|
|
3561
|
+
let t = await Vt(await Z(await yt(e.pluginName), "us.js")), n = t.lastIndexOf(";") + 1, r = new Blob([t.slice(0, n)], { type: "text/javascript" }), i = URL.createObjectURL(r), a = document.createElement("script");
|
|
3140
3562
|
a.addEventListener("load", () => {
|
|
3141
3563
|
URL.revokeObjectURL(i);
|
|
3142
3564
|
}), a.addEventListener("error", (e) => {
|
|
3143
3565
|
throw URL.revokeObjectURL(i), e;
|
|
3144
3566
|
}), a.async = !0, a.src = i, document.body.appendChild(a);
|
|
3145
3567
|
}
|
|
3146
|
-
}(),
|
|
3568
|
+
}(), kr = (/* @__PURE__ */ G(((e, t) => {
|
|
3147
3569
|
(function(n) {
|
|
3148
3570
|
typeof e == "object" && t !== void 0 ? t.exports = n() : typeof define == "function" && define.amd ? define([], n) : (typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : this).JSZip = n();
|
|
3149
3571
|
})(function() {
|
|
@@ -3151,7 +3573,7 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3151
3573
|
function i(o, s) {
|
|
3152
3574
|
if (!n[o]) {
|
|
3153
3575
|
if (!t[o]) {
|
|
3154
|
-
var c = typeof
|
|
3576
|
+
var c = typeof K == "function" && K;
|
|
3155
3577
|
if (!s && c) return c(o, !0);
|
|
3156
3578
|
if (a) return a(o, !0);
|
|
3157
3579
|
var l = /* @__PURE__ */ Error("Cannot find module '" + o + "'");
|
|
@@ -3165,7 +3587,7 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3165
3587
|
}
|
|
3166
3588
|
return n[o].exports;
|
|
3167
3589
|
}
|
|
3168
|
-
for (var a = typeof
|
|
3590
|
+
for (var a = typeof K == "function" && K, o = 0; o < r.length; o++) i(r[o]);
|
|
3169
3591
|
return i;
|
|
3170
3592
|
}({
|
|
3171
3593
|
1: [function(e, t, n) {
|
|
@@ -3294,25 +3716,25 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3294
3716
|
return r;
|
|
3295
3717
|
}
|
|
3296
3718
|
function i(e, t, n, i, o, u) {
|
|
3297
|
-
var d, f, p = e.file, m = e.compression,
|
|
3719
|
+
var d, f, p = e.file, m = e.compression, h = u !== s.utf8encode, g = a.transformTo("string", u(p.name)), _ = a.transformTo("string", s.utf8encode(p.name)), v = p.comment, y = a.transformTo("string", u(v)), b = a.transformTo("string", s.utf8encode(v)), x = _.length !== p.name.length, S = b.length !== v.length, C = "", w = "", T = "", E = p.dir, D = p.date, O = {
|
|
3298
3720
|
crc32: 0,
|
|
3299
3721
|
compressedSize: 0,
|
|
3300
3722
|
uncompressedSize: 0
|
|
3301
3723
|
};
|
|
3302
|
-
t && !n || (
|
|
3303
|
-
var
|
|
3304
|
-
t && (
|
|
3305
|
-
var
|
|
3306
|
-
|
|
3724
|
+
t && !n || (O.crc32 = e.crc32, O.compressedSize = e.compressedSize, O.uncompressedSize = e.uncompressedSize);
|
|
3725
|
+
var k = 0;
|
|
3726
|
+
t && (k |= 8), h || !x && !S || (k |= 2048);
|
|
3727
|
+
var A = 0, j = 0;
|
|
3728
|
+
E && (A |= 16), o === "UNIX" ? (j = 798, A |= function(e, t) {
|
|
3307
3729
|
var n = e;
|
|
3308
3730
|
return e || (n = t ? 16893 : 33204), (65535 & n) << 16;
|
|
3309
|
-
}(p.unixPermissions,
|
|
3731
|
+
}(p.unixPermissions, E)) : (j = 20, A |= function(e) {
|
|
3310
3732
|
return 63 & (e || 0);
|
|
3311
|
-
}(p.dosPermissions)), d =
|
|
3312
|
-
var
|
|
3313
|
-
return
|
|
3314
|
-
fileRecord: l.LOCAL_FILE_HEADER +
|
|
3315
|
-
dirRecord: l.CENTRAL_FILE_HEADER + r(
|
|
3733
|
+
}(p.dosPermissions)), d = D.getUTCHours(), d <<= 6, d |= D.getUTCMinutes(), d <<= 5, d |= D.getUTCSeconds() / 2, f = D.getUTCFullYear() - 1980, f <<= 4, f |= D.getUTCMonth() + 1, f <<= 5, f |= D.getUTCDate(), x && (w = r(1, 1) + r(c(g), 4) + _, C += "up" + r(w.length, 2) + w), S && (T = r(1, 1) + r(c(y), 4) + b, C += "uc" + r(T.length, 2) + T);
|
|
3734
|
+
var M = "";
|
|
3735
|
+
return M += "\n\0", M += r(k, 2), M += m.magic, M += r(d, 2), M += r(f, 2), M += r(O.crc32, 4), M += r(O.compressedSize, 4), M += r(O.uncompressedSize, 4), M += r(g.length, 2), M += r(C.length, 2), {
|
|
3736
|
+
fileRecord: l.LOCAL_FILE_HEADER + M + g + C,
|
|
3737
|
+
dirRecord: l.CENTRAL_FILE_HEADER + r(j, 2) + M + r(y.length, 2) + "\0\0\0\0" + r(A, 4) + r(i, 4) + g + C + y
|
|
3316
3738
|
};
|
|
3317
3739
|
}
|
|
3318
3740
|
var a = e("../utils"), o = e("../stream/GenericWorker"), s = e("../utf8"), c = e("../crc32"), l = e("../signature");
|
|
@@ -3569,27 +3991,27 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3569
3991
|
15: [function(e, t, n) {
|
|
3570
3992
|
function r(e, t, n) {
|
|
3571
3993
|
var r, i = a.getTypeOf(t), s = a.extend(n || {}, c);
|
|
3572
|
-
s.date = s.date || /* @__PURE__ */ new Date(), s.compression !== null && (s.compression = s.compression.toUpperCase()), typeof s.unixPermissions == "string" && (s.unixPermissions = parseInt(s.unixPermissions, 8)), s.unixPermissions && 16384 & s.unixPermissions && (s.dir = !0), s.dosPermissions && 16 & s.dosPermissions && (s.dir = !0), s.dir && (e =
|
|
3994
|
+
s.date = s.date || /* @__PURE__ */ new Date(), s.compression !== null && (s.compression = s.compression.toUpperCase()), typeof s.unixPermissions == "string" && (s.unixPermissions = parseInt(s.unixPermissions, 8)), s.unixPermissions && 16384 & s.unixPermissions && (s.dir = !0), s.dosPermissions && 16 & s.dosPermissions && (s.dir = !0), s.dir && (e = h(e)), s.createFolders && (r = m(e)) && g.call(this, r, !0);
|
|
3573
3995
|
var d = i === "string" && !1 === s.binary && !1 === s.base64;
|
|
3574
3996
|
n && n.binary !== void 0 || (s.binary = !d), (t instanceof l && t.uncompressedSize === 0 || s.dir || !t || t.length === 0) && (s.base64 = !1, s.binary = !0, t = "", s.compression = "STORE", i = "string");
|
|
3575
|
-
var
|
|
3576
|
-
|
|
3577
|
-
var
|
|
3578
|
-
this.files[e] =
|
|
3997
|
+
var _ = null;
|
|
3998
|
+
_ = t instanceof l || t instanceof o ? t : f.isNode && f.isStream(t) ? new p(e, t) : a.prepareContent(e, t, s.binary, s.optimizedBinaryString, s.base64);
|
|
3999
|
+
var v = new u(e, _, s);
|
|
4000
|
+
this.files[e] = v;
|
|
3579
4001
|
}
|
|
3580
4002
|
var i = e("./utf8"), a = e("./utils"), o = e("./stream/GenericWorker"), s = e("./stream/StreamHelper"), c = e("./defaults"), l = e("./compressedObject"), u = e("./zipObject"), d = e("./generate"), f = e("./nodejsUtils"), p = e("./nodejs/NodejsStreamInputAdapter"), m = function(e) {
|
|
3581
4003
|
e.slice(-1) === "/" && (e = e.substring(0, e.length - 1));
|
|
3582
4004
|
var t = e.lastIndexOf("/");
|
|
3583
4005
|
return 0 < t ? e.substring(0, t) : "";
|
|
3584
|
-
},
|
|
4006
|
+
}, h = function(e) {
|
|
3585
4007
|
return e.slice(-1) !== "/" && (e += "/"), e;
|
|
3586
|
-
},
|
|
3587
|
-
return t = t === void 0 ? c.createFolders : t, e =
|
|
4008
|
+
}, g = function(e, t) {
|
|
4009
|
+
return t = t === void 0 ? c.createFolders : t, e = h(e), this.files[e] || r.call(this, e, null, {
|
|
3588
4010
|
dir: !0,
|
|
3589
4011
|
createFolders: t
|
|
3590
4012
|
}), this.files[e];
|
|
3591
4013
|
};
|
|
3592
|
-
function
|
|
4014
|
+
function _(e) {
|
|
3593
4015
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
3594
4016
|
}
|
|
3595
4017
|
t.exports = {
|
|
@@ -3608,7 +4030,7 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3608
4030
|
},
|
|
3609
4031
|
file: function(e, t, n) {
|
|
3610
4032
|
if (arguments.length !== 1) return e = this.root + e, r.call(this, e, t, n), this;
|
|
3611
|
-
if (
|
|
4033
|
+
if (_(e)) {
|
|
3612
4034
|
var i = e;
|
|
3613
4035
|
return this.filter(function(e, t) {
|
|
3614
4036
|
return !t.dir && i.test(e);
|
|
@@ -3619,10 +4041,10 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3619
4041
|
},
|
|
3620
4042
|
folder: function(e) {
|
|
3621
4043
|
if (!e) return this;
|
|
3622
|
-
if (
|
|
4044
|
+
if (_(e)) return this.filter(function(t, n) {
|
|
3623
4045
|
return n.dir && e.test(t);
|
|
3624
4046
|
});
|
|
3625
|
-
var t = this.root + e, n =
|
|
4047
|
+
var t = this.root + e, n = g.call(this, t), r = this.clone();
|
|
3626
4048
|
return r.root = n.name, r;
|
|
3627
4049
|
},
|
|
3628
4050
|
remove: function(e) {
|
|
@@ -4777,12 +5199,12 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
4777
5199
|
return n.result;
|
|
4778
5200
|
}
|
|
4779
5201
|
d.prototype.push = function(e, t) {
|
|
4780
|
-
var n, s, c, l, d, f, p = this.strm, m = this.options.chunkSize,
|
|
5202
|
+
var n, s, c, l, d, f, p = this.strm, m = this.options.chunkSize, h = this.options.dictionary, g = !1;
|
|
4781
5203
|
if (this.ended) return !1;
|
|
4782
5204
|
s = t === ~~t ? t : !0 === t ? o.Z_FINISH : o.Z_NO_FLUSH, typeof e == "string" ? p.input = a.binstring2buf(e) : u.call(e) === "[object ArrayBuffer]" ? p.input = new Uint8Array(e) : p.input = e, p.next_in = 0, p.avail_in = p.input.length;
|
|
4783
5205
|
do {
|
|
4784
|
-
if (p.avail_out === 0 && (p.output = new i.Buf8(m), p.next_out = 0, p.avail_out = m), (n = r.inflate(p, o.Z_NO_FLUSH)) === o.Z_NEED_DICT &&
|
|
4785
|
-
p.next_out && (p.avail_out !== 0 && n !== o.Z_STREAM_END && (p.avail_in !== 0 || s !== o.Z_FINISH && s !== o.Z_SYNC_FLUSH) || (this.options.to === "string" ? (c = a.utf8border(p.output, p.next_out), l = p.next_out - c, d = a.buf2string(p.output, c), p.next_out = l, p.avail_out = m - l, l && i.arraySet(p.output, p.output, c, l, 0), this.onData(d)) : this.onData(i.shrinkBuf(p.output, p.next_out)))), p.avail_in === 0 && p.avail_out === 0 && (
|
|
5206
|
+
if (p.avail_out === 0 && (p.output = new i.Buf8(m), p.next_out = 0, p.avail_out = m), (n = r.inflate(p, o.Z_NO_FLUSH)) === o.Z_NEED_DICT && h && (f = typeof h == "string" ? a.string2buf(h) : u.call(h) === "[object ArrayBuffer]" ? new Uint8Array(h) : h, n = r.inflateSetDictionary(this.strm, f)), n === o.Z_BUF_ERROR && !0 === g && (n = o.Z_OK, g = !1), n !== o.Z_STREAM_END && n !== o.Z_OK) return this.onEnd(n), !(this.ended = !0);
|
|
5207
|
+
p.next_out && (p.avail_out !== 0 && n !== o.Z_STREAM_END && (p.avail_in !== 0 || s !== o.Z_FINISH && s !== o.Z_SYNC_FLUSH) || (this.options.to === "string" ? (c = a.utf8border(p.output, p.next_out), l = p.next_out - c, d = a.buf2string(p.output, c), p.next_out = l, p.avail_out = m - l, l && i.arraySet(p.output, p.output, c, l, 0), this.onData(d)) : this.onData(i.shrinkBuf(p.output, p.next_out)))), p.avail_in === 0 && p.avail_out === 0 && (g = !0);
|
|
4786
5208
|
} while ((0 < p.avail_in || p.avail_out === 0) && n !== o.Z_STREAM_END);
|
|
4787
5209
|
return n === o.Z_STREAM_END && (s = o.Z_FINISH), s === o.Z_FINISH ? (n = r.inflateEnd(this.strm), this.onEnd(n), this.ended = !0, n === o.Z_OK) : s !== o.Z_SYNC_FLUSH || (this.onEnd(o.Z_OK), !(p.avail_out = 0));
|
|
4788
5210
|
}, d.prototype.onData = function(e) {
|
|
@@ -4938,38 +5360,38 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
4938
5360
|
};
|
|
4939
5361
|
}, {}],
|
|
4940
5362
|
46: [function(e, t, n) {
|
|
4941
|
-
var r, i = e("../utils/common"), a = e("./trees"), o = e("./adler32"), s = e("./crc32"), c = e("./messages"), l = 0, u = 4, d = 0, f = -2, p = -1, m = 4,
|
|
4942
|
-
function
|
|
5363
|
+
var r, i = e("../utils/common"), a = e("./trees"), o = e("./adler32"), s = e("./crc32"), c = e("./messages"), l = 0, u = 4, d = 0, f = -2, p = -1, m = 4, h = 2, g = 8, _ = 9, v = 286, y = 30, b = 19, x = 2 * v + 1, S = 15, C = 3, w = 258, T = w + C + 1, E = 42, D = 113, O = 1, k = 2, A = 3, j = 4;
|
|
5364
|
+
function M(e, t) {
|
|
4943
5365
|
return e.msg = c[t], t;
|
|
4944
5366
|
}
|
|
4945
|
-
function
|
|
5367
|
+
function N(e) {
|
|
4946
5368
|
return (e << 1) - (4 < e ? 9 : 0);
|
|
4947
5369
|
}
|
|
4948
|
-
function
|
|
5370
|
+
function P(e) {
|
|
4949
5371
|
for (var t = e.length; 0 <= --t;) e[t] = 0;
|
|
4950
5372
|
}
|
|
4951
|
-
function
|
|
5373
|
+
function F(e) {
|
|
4952
5374
|
var t = e.state, n = t.pending;
|
|
4953
5375
|
n > e.avail_out && (n = e.avail_out), n !== 0 && (i.arraySet(e.output, t.pending_buf, t.pending_out, n, e.next_out), e.next_out += n, t.pending_out += n, e.total_out += n, e.avail_out -= n, t.pending -= n, t.pending === 0 && (t.pending_out = 0));
|
|
4954
5376
|
}
|
|
4955
|
-
function
|
|
4956
|
-
a._tr_flush_block(e, 0 <= e.block_start ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart,
|
|
5377
|
+
function I(e, t) {
|
|
5378
|
+
a._tr_flush_block(e, 0 <= e.block_start ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, F(e.strm);
|
|
4957
5379
|
}
|
|
4958
|
-
function
|
|
5380
|
+
function L(e, t) {
|
|
4959
5381
|
e.pending_buf[e.pending++] = t;
|
|
4960
5382
|
}
|
|
4961
|
-
function
|
|
5383
|
+
function R(e, t) {
|
|
4962
5384
|
e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = 255 & t;
|
|
4963
5385
|
}
|
|
4964
|
-
function
|
|
4965
|
-
var n, r, i = e.max_chain_length, a = e.strstart, o = e.prev_length, s = e.nice_match, c = e.strstart > e.w_size -
|
|
5386
|
+
function z(e, t) {
|
|
5387
|
+
var n, r, i = e.max_chain_length, a = e.strstart, o = e.prev_length, s = e.nice_match, c = e.strstart > e.w_size - T ? e.strstart - (e.w_size - T) : 0, l = e.window, u = e.w_mask, d = e.prev, f = e.strstart + w, p = l[a + o - 1], m = l[a + o];
|
|
4966
5388
|
e.prev_length >= e.good_match && (i >>= 2), s > e.lookahead && (s = e.lookahead);
|
|
4967
5389
|
do
|
|
4968
5390
|
if (l[(n = t) + o] === m && l[n + o - 1] === p && l[n] === l[a] && l[++n] === l[a + 1]) {
|
|
4969
5391
|
a += 2, n++;
|
|
4970
5392
|
do ;
|
|
4971
5393
|
while (l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && a < f);
|
|
4972
|
-
if (r =
|
|
5394
|
+
if (r = w - (f - a), a = f - w, o < r) {
|
|
4973
5395
|
if (e.match_start = t, s <= (o = r)) break;
|
|
4974
5396
|
p = l[a + o - 1], m = l[a + o];
|
|
4975
5397
|
}
|
|
@@ -4977,179 +5399,179 @@ while (l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] ===
|
|
|
4977
5399
|
while ((t = d[t & u]) > c && --i != 0);
|
|
4978
5400
|
return o <= e.lookahead ? o : e.lookahead;
|
|
4979
5401
|
}
|
|
4980
|
-
function
|
|
5402
|
+
function B(e) {
|
|
4981
5403
|
var t, n, r, a, c, l, u, d, f, p, m = e.w_size;
|
|
4982
5404
|
do {
|
|
4983
|
-
if (a = e.window_size - e.lookahead - e.strstart, e.strstart >= m + (m -
|
|
5405
|
+
if (a = e.window_size - e.lookahead - e.strstart, e.strstart >= m + (m - T)) {
|
|
4984
5406
|
for (i.arraySet(e.window, e.window, m, m, 0), e.match_start -= m, e.strstart -= m, e.block_start -= m, t = n = e.hash_size; r = e.head[--t], e.head[t] = m <= r ? r - m : 0, --n;);
|
|
4985
5407
|
for (t = n = m; r = e.prev[--t], e.prev[t] = m <= r ? r - m : 0, --n;);
|
|
4986
5408
|
a += m;
|
|
4987
5409
|
}
|
|
4988
5410
|
if (e.strm.avail_in === 0) break;
|
|
4989
|
-
if (l = e.strm, u = e.window, d = e.strstart + e.lookahead, f = a, p = void 0, p = l.avail_in, f < p && (p = f), n = p === 0 ? 0 : (l.avail_in -= p, i.arraySet(u, l.input, l.next_in, p, d), l.state.wrap === 1 ? l.adler = o(l.adler, u, p, d) : l.state.wrap === 2 && (l.adler = s(l.adler, u, p, d)), l.next_in += p, l.total_in += p, p), e.lookahead += n, e.lookahead + e.insert >=
|
|
4990
|
-
} while (e.lookahead <
|
|
5411
|
+
if (l = e.strm, u = e.window, d = e.strstart + e.lookahead, f = a, p = void 0, p = l.avail_in, f < p && (p = f), n = p === 0 ? 0 : (l.avail_in -= p, i.arraySet(u, l.input, l.next_in, p, d), l.state.wrap === 1 ? l.adler = o(l.adler, u, p, d) : l.state.wrap === 2 && (l.adler = s(l.adler, u, p, d)), l.next_in += p, l.total_in += p, p), e.lookahead += n, e.lookahead + e.insert >= C) for (c = e.strstart - e.insert, e.ins_h = e.window[c], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[c + 1]) & e.hash_mask; e.insert && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[c + C - 1]) & e.hash_mask, e.prev[c & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = c, c++, e.insert--, !(e.lookahead + e.insert < C)););
|
|
5412
|
+
} while (e.lookahead < T && e.strm.avail_in !== 0);
|
|
4991
5413
|
}
|
|
4992
|
-
function
|
|
5414
|
+
function V(e, t) {
|
|
4993
5415
|
for (var n, r;;) {
|
|
4994
|
-
if (e.lookahead <
|
|
4995
|
-
if (
|
|
5416
|
+
if (e.lookahead < T) {
|
|
5417
|
+
if (B(e), e.lookahead < T && t === l) return O;
|
|
4996
5418
|
if (e.lookahead === 0) break;
|
|
4997
5419
|
}
|
|
4998
|
-
if (n = 0, e.lookahead >=
|
|
4999
|
-
for (e.match_length--; e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart +
|
|
5420
|
+
if (n = 0, e.lookahead >= C && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + C - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), n !== 0 && e.strstart - n <= e.w_size - T && (e.match_length = z(e, n)), e.match_length >= C) if (r = a._tr_tally(e, e.strstart - e.match_start, e.match_length - C), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= C) {
|
|
5421
|
+
for (e.match_length--; e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + C - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart, --e.match_length != 0;);
|
|
5000
5422
|
e.strstart++;
|
|
5001
5423
|
} else e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + 1]) & e.hash_mask;
|
|
5002
5424
|
else r = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
|
|
5003
|
-
if (r && (
|
|
5425
|
+
if (r && (I(e, !1), e.strm.avail_out === 0)) return O;
|
|
5004
5426
|
}
|
|
5005
|
-
return e.insert = e.strstart <
|
|
5427
|
+
return e.insert = e.strstart < C - 1 ? e.strstart : C - 1, t === u ? (I(e, !0), e.strm.avail_out === 0 ? A : j) : e.last_lit && (I(e, !1), e.strm.avail_out === 0) ? O : k;
|
|
5006
5428
|
}
|
|
5007
|
-
function
|
|
5429
|
+
function H(e, t) {
|
|
5008
5430
|
for (var n, r, i;;) {
|
|
5009
|
-
if (e.lookahead <
|
|
5010
|
-
if (
|
|
5431
|
+
if (e.lookahead < T) {
|
|
5432
|
+
if (B(e), e.lookahead < T && t === l) return O;
|
|
5011
5433
|
if (e.lookahead === 0) break;
|
|
5012
5434
|
}
|
|
5013
|
-
if (n = 0, e.lookahead >=
|
|
5014
|
-
for (i = e.strstart + e.lookahead -
|
|
5015
|
-
if (e.match_available = 0, e.match_length =
|
|
5435
|
+
if (n = 0, e.lookahead >= C && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + C - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = C - 1, n !== 0 && e.prev_length < e.max_lazy_match && e.strstart - n <= e.w_size - T && (e.match_length = z(e, n), e.match_length <= 5 && (e.strategy === 1 || e.match_length === C && 4096 < e.strstart - e.match_start) && (e.match_length = C - 1)), e.prev_length >= C && e.match_length <= e.prev_length) {
|
|
5436
|
+
for (i = e.strstart + e.lookahead - C, r = a._tr_tally(e, e.strstart - 1 - e.prev_match, e.prev_length - C), e.lookahead -= e.prev_length - 1, e.prev_length -= 2; ++e.strstart <= i && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + C - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), --e.prev_length != 0;);
|
|
5437
|
+
if (e.match_available = 0, e.match_length = C - 1, e.strstart++, r && (I(e, !1), e.strm.avail_out === 0)) return O;
|
|
5016
5438
|
} else if (e.match_available) {
|
|
5017
|
-
if ((r = a._tr_tally(e, 0, e.window[e.strstart - 1])) &&
|
|
5439
|
+
if ((r = a._tr_tally(e, 0, e.window[e.strstart - 1])) && I(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0) return O;
|
|
5018
5440
|
} else e.match_available = 1, e.strstart++, e.lookahead--;
|
|
5019
5441
|
}
|
|
5020
|
-
return e.match_available &&= (r = a._tr_tally(e, 0, e.window[e.strstart - 1]), 0), e.insert = e.strstart <
|
|
5442
|
+
return e.match_available &&= (r = a._tr_tally(e, 0, e.window[e.strstart - 1]), 0), e.insert = e.strstart < C - 1 ? e.strstart : C - 1, t === u ? (I(e, !0), e.strm.avail_out === 0 ? A : j) : e.last_lit && (I(e, !1), e.strm.avail_out === 0) ? O : k;
|
|
5021
5443
|
}
|
|
5022
|
-
function
|
|
5444
|
+
function U(e, t, n, r, i) {
|
|
5023
5445
|
this.good_length = e, this.max_lazy = t, this.nice_length = n, this.max_chain = r, this.func = i;
|
|
5024
5446
|
}
|
|
5025
|
-
function
|
|
5026
|
-
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method =
|
|
5447
|
+
function W() {
|
|
5448
|
+
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = g, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new i.Buf16(2 * x), this.dyn_dtree = new i.Buf16(2 * (2 * y + 1)), this.bl_tree = new i.Buf16(2 * (2 * b + 1)), P(this.dyn_ltree), P(this.dyn_dtree), P(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new i.Buf16(S + 1), this.heap = new i.Buf16(2 * v + 1), P(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new i.Buf16(2 * v + 1), P(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
5027
5449
|
}
|
|
5028
|
-
function
|
|
5450
|
+
function G(e) {
|
|
5029
5451
|
var t;
|
|
5030
|
-
return e && e.state ? (e.total_in = e.total_out = 0, e.data_type =
|
|
5452
|
+
return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = h, (t = e.state).pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap ? E : D, e.adler = t.wrap === 2 ? 0 : 1, t.last_flush = l, a._tr_init(t), d) : M(e, f);
|
|
5031
5453
|
}
|
|
5032
|
-
function
|
|
5033
|
-
var t =
|
|
5454
|
+
function K(e) {
|
|
5455
|
+
var t = G(e);
|
|
5034
5456
|
return t === d && function(e) {
|
|
5035
|
-
e.window_size = 2 * e.w_size,
|
|
5457
|
+
e.window_size = 2 * e.w_size, P(e.head), e.max_lazy_match = r[e.level].max_lazy, e.good_match = r[e.level].good_length, e.nice_match = r[e.level].nice_length, e.max_chain_length = r[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = C - 1, e.match_available = 0, e.ins_h = 0;
|
|
5036
5458
|
}(e.state), t;
|
|
5037
5459
|
}
|
|
5038
|
-
function
|
|
5460
|
+
function q(e, t, n, r, a, o) {
|
|
5039
5461
|
if (!e) return f;
|
|
5040
5462
|
var s = 1;
|
|
5041
|
-
if (t === p && (t = 6), r < 0 ? (s = 0, r = -r) : 15 < r && (s = 2, r -= 16), a < 1 ||
|
|
5463
|
+
if (t === p && (t = 6), r < 0 ? (s = 0, r = -r) : 15 < r && (s = 2, r -= 16), a < 1 || _ < a || n !== g || r < 8 || 15 < r || t < 0 || 9 < t || o < 0 || m < o) return M(e, f);
|
|
5042
5464
|
r === 8 && (r = 9);
|
|
5043
|
-
var c = new
|
|
5044
|
-
return (e.state = c).strm = e, c.wrap = s, c.gzhead = null, c.w_bits = r, c.w_size = 1 << c.w_bits, c.w_mask = c.w_size - 1, c.hash_bits = a + 7, c.hash_size = 1 << c.hash_bits, c.hash_mask = c.hash_size - 1, c.hash_shift = ~~((c.hash_bits +
|
|
5465
|
+
var c = new W();
|
|
5466
|
+
return (e.state = c).strm = e, c.wrap = s, c.gzhead = null, c.w_bits = r, c.w_size = 1 << c.w_bits, c.w_mask = c.w_size - 1, c.hash_bits = a + 7, c.hash_size = 1 << c.hash_bits, c.hash_mask = c.hash_size - 1, c.hash_shift = ~~((c.hash_bits + C - 1) / C), c.window = new i.Buf8(2 * c.w_size), c.head = new i.Buf16(c.hash_size), c.prev = new i.Buf16(c.w_size), c.lit_bufsize = 1 << a + 6, c.pending_buf_size = 4 * c.lit_bufsize, c.pending_buf = new i.Buf8(c.pending_buf_size), c.d_buf = 1 * c.lit_bufsize, c.l_buf = 3 * c.lit_bufsize, c.level = t, c.strategy = o, c.method = n, K(e);
|
|
5045
5467
|
}
|
|
5046
5468
|
r = [
|
|
5047
|
-
new
|
|
5469
|
+
new U(0, 0, 0, 0, function(e, t) {
|
|
5048
5470
|
var n = 65535;
|
|
5049
5471
|
for (n > e.pending_buf_size - 5 && (n = e.pending_buf_size - 5);;) {
|
|
5050
5472
|
if (e.lookahead <= 1) {
|
|
5051
|
-
if (
|
|
5473
|
+
if (B(e), e.lookahead === 0 && t === l) return O;
|
|
5052
5474
|
if (e.lookahead === 0) break;
|
|
5053
5475
|
}
|
|
5054
5476
|
e.strstart += e.lookahead, e.lookahead = 0;
|
|
5055
5477
|
var r = e.block_start + n;
|
|
5056
|
-
if ((e.strstart === 0 || e.strstart >= r) && (e.lookahead = e.strstart - r, e.strstart = r,
|
|
5478
|
+
if ((e.strstart === 0 || e.strstart >= r) && (e.lookahead = e.strstart - r, e.strstart = r, I(e, !1), e.strm.avail_out === 0) || e.strstart - e.block_start >= e.w_size - T && (I(e, !1), e.strm.avail_out === 0)) return O;
|
|
5057
5479
|
}
|
|
5058
|
-
return e.insert = 0, t === u ? (
|
|
5480
|
+
return e.insert = 0, t === u ? (I(e, !0), e.strm.avail_out === 0 ? A : j) : (e.strstart > e.block_start && (I(e, !1), e.strm.avail_out), O);
|
|
5059
5481
|
}),
|
|
5060
|
-
new
|
|
5061
|
-
new
|
|
5062
|
-
new
|
|
5063
|
-
new
|
|
5064
|
-
new
|
|
5065
|
-
new
|
|
5066
|
-
new
|
|
5067
|
-
new
|
|
5068
|
-
new
|
|
5482
|
+
new U(4, 4, 8, 4, V),
|
|
5483
|
+
new U(4, 5, 16, 8, V),
|
|
5484
|
+
new U(4, 6, 32, 32, V),
|
|
5485
|
+
new U(4, 4, 16, 16, H),
|
|
5486
|
+
new U(8, 16, 32, 32, H),
|
|
5487
|
+
new U(8, 16, 128, 128, H),
|
|
5488
|
+
new U(8, 32, 128, 256, H),
|
|
5489
|
+
new U(32, 128, 258, 1024, H),
|
|
5490
|
+
new U(32, 258, 258, 4096, H)
|
|
5069
5491
|
], n.deflateInit = function(e, t) {
|
|
5070
|
-
return
|
|
5071
|
-
}, n.deflateInit2 =
|
|
5492
|
+
return q(e, t, g, 15, 8, 0);
|
|
5493
|
+
}, n.deflateInit2 = q, n.deflateReset = K, n.deflateResetKeep = G, n.deflateSetHeader = function(e, t) {
|
|
5072
5494
|
return e && e.state && e.state.wrap === 2 ? (e.state.gzhead = t, d) : f;
|
|
5073
5495
|
}, n.deflate = function(e, t) {
|
|
5074
5496
|
var n, i, o, c;
|
|
5075
|
-
if (!e || !e.state || 5 < t || t < 0) return e ?
|
|
5076
|
-
if (i = e.state, !e.output || !e.input && e.avail_in !== 0 || i.status === 666 && t !== u) return
|
|
5077
|
-
if (i.strm = e, n = i.last_flush, i.last_flush = t, i.status ===
|
|
5497
|
+
if (!e || !e.state || 5 < t || t < 0) return e ? M(e, f) : f;
|
|
5498
|
+
if (i = e.state, !e.output || !e.input && e.avail_in !== 0 || i.status === 666 && t !== u) return M(e, e.avail_out === 0 ? -5 : f);
|
|
5499
|
+
if (i.strm = e, n = i.last_flush, i.last_flush = t, i.status === E) if (i.wrap === 2) e.adler = 0, L(i, 31), L(i, 139), L(i, 8), i.gzhead ? (L(i, (i.gzhead.text ? 1 : 0) + (i.gzhead.hcrc ? 2 : 0) + (i.gzhead.extra ? 4 : 0) + (i.gzhead.name ? 8 : 0) + (i.gzhead.comment ? 16 : 0)), L(i, 255 & i.gzhead.time), L(i, i.gzhead.time >> 8 & 255), L(i, i.gzhead.time >> 16 & 255), L(i, i.gzhead.time >> 24 & 255), L(i, i.level === 9 ? 2 : 2 <= i.strategy || i.level < 2 ? 4 : 0), L(i, 255 & i.gzhead.os), i.gzhead.extra && i.gzhead.extra.length && (L(i, 255 & i.gzhead.extra.length), L(i, i.gzhead.extra.length >> 8 & 255)), i.gzhead.hcrc && (e.adler = s(e.adler, i.pending_buf, i.pending, 0)), i.gzindex = 0, i.status = 69) : (L(i, 0), L(i, 0), L(i, 0), L(i, 0), L(i, 0), L(i, i.level === 9 ? 2 : 2 <= i.strategy || i.level < 2 ? 4 : 0), L(i, 3), i.status = D);
|
|
5078
5500
|
else {
|
|
5079
|
-
var p =
|
|
5080
|
-
p |= (2 <= i.strategy || i.level < 2 ? 0 : i.level < 6 ? 1 : i.level === 6 ? 2 : 3) << 6, i.strstart !== 0 && (p |= 32), p += 31 - p % 31, i.status =
|
|
5501
|
+
var p = g + (i.w_bits - 8 << 4) << 8;
|
|
5502
|
+
p |= (2 <= i.strategy || i.level < 2 ? 0 : i.level < 6 ? 1 : i.level === 6 ? 2 : 3) << 6, i.strstart !== 0 && (p |= 32), p += 31 - p % 31, i.status = D, R(i, p), i.strstart !== 0 && (R(i, e.adler >>> 16), R(i, 65535 & e.adler)), e.adler = 1;
|
|
5081
5503
|
}
|
|
5082
5504
|
if (i.status === 69) if (i.gzhead.extra) {
|
|
5083
|
-
for (o = i.pending; i.gzindex < (65535 & i.gzhead.extra.length) && (i.pending !== i.pending_buf_size || (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)),
|
|
5505
|
+
for (o = i.pending; i.gzindex < (65535 & i.gzhead.extra.length) && (i.pending !== i.pending_buf_size || (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), F(e), o = i.pending, i.pending !== i.pending_buf_size));) L(i, 255 & i.gzhead.extra[i.gzindex]), i.gzindex++;
|
|
5084
5506
|
i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), i.gzindex === i.gzhead.extra.length && (i.gzindex = 0, i.status = 73);
|
|
5085
5507
|
} else i.status = 73;
|
|
5086
5508
|
if (i.status === 73) if (i.gzhead.name) {
|
|
5087
5509
|
o = i.pending;
|
|
5088
5510
|
do {
|
|
5089
|
-
if (i.pending === i.pending_buf_size && (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)),
|
|
5511
|
+
if (i.pending === i.pending_buf_size && (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), F(e), o = i.pending, i.pending === i.pending_buf_size)) {
|
|
5090
5512
|
c = 1;
|
|
5091
5513
|
break;
|
|
5092
5514
|
}
|
|
5093
|
-
c = i.gzindex < i.gzhead.name.length ? 255 & i.gzhead.name.charCodeAt(i.gzindex++) : 0,
|
|
5515
|
+
c = i.gzindex < i.gzhead.name.length ? 255 & i.gzhead.name.charCodeAt(i.gzindex++) : 0, L(i, c);
|
|
5094
5516
|
} while (c !== 0);
|
|
5095
5517
|
i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), c === 0 && (i.gzindex = 0, i.status = 91);
|
|
5096
5518
|
} else i.status = 91;
|
|
5097
5519
|
if (i.status === 91) if (i.gzhead.comment) {
|
|
5098
5520
|
o = i.pending;
|
|
5099
5521
|
do {
|
|
5100
|
-
if (i.pending === i.pending_buf_size && (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)),
|
|
5522
|
+
if (i.pending === i.pending_buf_size && (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), F(e), o = i.pending, i.pending === i.pending_buf_size)) {
|
|
5101
5523
|
c = 1;
|
|
5102
5524
|
break;
|
|
5103
5525
|
}
|
|
5104
|
-
c = i.gzindex < i.gzhead.comment.length ? 255 & i.gzhead.comment.charCodeAt(i.gzindex++) : 0,
|
|
5526
|
+
c = i.gzindex < i.gzhead.comment.length ? 255 & i.gzhead.comment.charCodeAt(i.gzindex++) : 0, L(i, c);
|
|
5105
5527
|
} while (c !== 0);
|
|
5106
5528
|
i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), c === 0 && (i.status = 103);
|
|
5107
5529
|
} else i.status = 103;
|
|
5108
|
-
if (i.status === 103 && (i.gzhead.hcrc ? (i.pending + 2 > i.pending_buf_size &&
|
|
5109
|
-
if (
|
|
5110
|
-
} else if (e.avail_in === 0 &&
|
|
5111
|
-
if (i.status === 666 && e.avail_in !== 0) return
|
|
5530
|
+
if (i.status === 103 && (i.gzhead.hcrc ? (i.pending + 2 > i.pending_buf_size && F(e), i.pending + 2 <= i.pending_buf_size && (L(i, 255 & e.adler), L(i, e.adler >> 8 & 255), e.adler = 0, i.status = D)) : i.status = D), i.pending !== 0) {
|
|
5531
|
+
if (F(e), e.avail_out === 0) return i.last_flush = -1, d;
|
|
5532
|
+
} else if (e.avail_in === 0 && N(t) <= N(n) && t !== u) return M(e, -5);
|
|
5533
|
+
if (i.status === 666 && e.avail_in !== 0) return M(e, -5);
|
|
5112
5534
|
if (e.avail_in !== 0 || i.lookahead !== 0 || t !== l && i.status !== 666) {
|
|
5113
5535
|
var m = i.strategy === 2 ? function(e, t) {
|
|
5114
5536
|
for (var n;;) {
|
|
5115
|
-
if (e.lookahead === 0 && (
|
|
5116
|
-
if (t === l) return
|
|
5537
|
+
if (e.lookahead === 0 && (B(e), e.lookahead === 0)) {
|
|
5538
|
+
if (t === l) return O;
|
|
5117
5539
|
break;
|
|
5118
5540
|
}
|
|
5119
|
-
if (e.match_length = 0, n = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, n && (
|
|
5541
|
+
if (e.match_length = 0, n = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, n && (I(e, !1), e.strm.avail_out === 0)) return O;
|
|
5120
5542
|
}
|
|
5121
|
-
return e.insert = 0, t === u ? (
|
|
5543
|
+
return e.insert = 0, t === u ? (I(e, !0), e.strm.avail_out === 0 ? A : j) : e.last_lit && (I(e, !1), e.strm.avail_out === 0) ? O : k;
|
|
5122
5544
|
}(i, t) : i.strategy === 3 ? function(e, t) {
|
|
5123
5545
|
for (var n, r, i, o, s = e.window;;) {
|
|
5124
|
-
if (e.lookahead <=
|
|
5125
|
-
if (
|
|
5546
|
+
if (e.lookahead <= w) {
|
|
5547
|
+
if (B(e), e.lookahead <= w && t === l) return O;
|
|
5126
5548
|
if (e.lookahead === 0) break;
|
|
5127
5549
|
}
|
|
5128
|
-
if (e.match_length = 0, e.lookahead >=
|
|
5129
|
-
o = e.strstart +
|
|
5550
|
+
if (e.match_length = 0, e.lookahead >= C && 0 < e.strstart && (r = s[i = e.strstart - 1]) === s[++i] && r === s[++i] && r === s[++i]) {
|
|
5551
|
+
o = e.strstart + w;
|
|
5130
5552
|
do ;
|
|
5131
5553
|
while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && i < o);
|
|
5132
|
-
e.match_length =
|
|
5554
|
+
e.match_length = w - (o - i), e.match_length > e.lookahead && (e.match_length = e.lookahead);
|
|
5133
5555
|
}
|
|
5134
|
-
if (e.match_length >=
|
|
5556
|
+
if (e.match_length >= C ? (n = a._tr_tally(e, 1, e.match_length - C), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (n = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), n && (I(e, !1), e.strm.avail_out === 0)) return O;
|
|
5135
5557
|
}
|
|
5136
|
-
return e.insert = 0, t === u ? (
|
|
5558
|
+
return e.insert = 0, t === u ? (I(e, !0), e.strm.avail_out === 0 ? A : j) : e.last_lit && (I(e, !1), e.strm.avail_out === 0) ? O : k;
|
|
5137
5559
|
}(i, t) : r[i.level].func(i, t);
|
|
5138
|
-
if (m !==
|
|
5139
|
-
if (m ===
|
|
5560
|
+
if (m !== A && m !== j || (i.status = 666), m === O || m === A) return e.avail_out === 0 && (i.last_flush = -1), d;
|
|
5561
|
+
if (m === k && (t === 1 ? a._tr_align(i) : t !== 5 && (a._tr_stored_block(i, 0, 0, !1), t === 3 && (P(i.head), i.lookahead === 0 && (i.strstart = 0, i.block_start = 0, i.insert = 0))), F(e), e.avail_out === 0)) return i.last_flush = -1, d;
|
|
5140
5562
|
}
|
|
5141
|
-
return t === u ? i.wrap <= 0 ? 1 : (i.wrap === 2 ? (
|
|
5563
|
+
return t === u ? i.wrap <= 0 ? 1 : (i.wrap === 2 ? (L(i, 255 & e.adler), L(i, e.adler >> 8 & 255), L(i, e.adler >> 16 & 255), L(i, e.adler >> 24 & 255), L(i, 255 & e.total_in), L(i, e.total_in >> 8 & 255), L(i, e.total_in >> 16 & 255), L(i, e.total_in >> 24 & 255)) : (R(i, e.adler >>> 16), R(i, 65535 & e.adler)), F(e), 0 < i.wrap && (i.wrap = -i.wrap), i.pending === 0 ? 1 : d) : d;
|
|
5142
5564
|
}, n.deflateEnd = function(e) {
|
|
5143
5565
|
var t;
|
|
5144
|
-
return e && e.state ? (t = e.state.status) !==
|
|
5566
|
+
return e && e.state ? (t = e.state.status) !== E && t !== 69 && t !== 73 && t !== 91 && t !== 103 && t !== D && t !== 666 ? M(e, f) : (e.state = null, t === D ? M(e, -3) : d) : f;
|
|
5145
5567
|
}, n.deflateSetDictionary = function(e, t) {
|
|
5146
5568
|
var n, r, a, s, c, l, u, p, m = t.length;
|
|
5147
|
-
if (!e || !e.state || (s = (n = e.state).wrap) === 2 || s === 1 && n.status !==
|
|
5148
|
-
for (s === 1 && (e.adler = o(e.adler, t, m, 0)), n.wrap = 0, m >= n.w_size && (s === 0 && (
|
|
5149
|
-
for (r = n.strstart, a = n.lookahead - (
|
|
5150
|
-
n.strstart = r, n.lookahead =
|
|
5569
|
+
if (!e || !e.state || (s = (n = e.state).wrap) === 2 || s === 1 && n.status !== E || n.lookahead) return f;
|
|
5570
|
+
for (s === 1 && (e.adler = o(e.adler, t, m, 0)), n.wrap = 0, m >= n.w_size && (s === 0 && (P(n.head), n.strstart = 0, n.block_start = 0, n.insert = 0), p = new i.Buf8(n.w_size), i.arraySet(p, t, m - n.w_size, n.w_size, 0), t = p, m = n.w_size), c = e.avail_in, l = e.next_in, u = e.input, e.avail_in = m, e.next_in = 0, e.input = t, B(n); n.lookahead >= C;) {
|
|
5571
|
+
for (r = n.strstart, a = n.lookahead - (C - 1); n.ins_h = (n.ins_h << n.hash_shift ^ n.window[r + C - 1]) & n.hash_mask, n.prev[r & n.w_mask] = n.head[n.ins_h], n.head[n.ins_h] = r, r++, --a;);
|
|
5572
|
+
n.strstart = r, n.lookahead = C - 1, B(n);
|
|
5151
5573
|
}
|
|
5152
|
-
return n.strstart += n.lookahead, n.block_start = n.strstart, n.insert = n.lookahead, n.lookahead = 0, n.match_length = n.prev_length =
|
|
5574
|
+
return n.strstart += n.lookahead, n.block_start = n.strstart, n.insert = n.lookahead, n.lookahead = 0, n.match_length = n.prev_length = C - 1, n.match_available = 0, e.next_in = l, e.input = u, e.avail_in = c, n.wrap = s, d;
|
|
5153
5575
|
}, n.deflateInfo = "pako deflate (from Nodeca project)";
|
|
5154
5576
|
}, {
|
|
5155
5577
|
"../utils/common": 41,
|
|
@@ -5165,66 +5587,66 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5165
5587
|
}, {}],
|
|
5166
5588
|
48: [function(e, t, n) {
|
|
5167
5589
|
t.exports = function(e, t) {
|
|
5168
|
-
var n = e.state, r = e.next_in, i, a, o, s, c, l, u, d, f, p, m, g, _, v, y, b, x, S, C, w, T
|
|
5169
|
-
i = r + (e.avail_in - 5), a = e.next_out,
|
|
5590
|
+
var n = e.state, r = e.next_in, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T = e.input, E;
|
|
5591
|
+
i = r + (e.avail_in - 5), a = e.next_out, E = e.output, o = a - (t - e.avail_out), s = a + (e.avail_out - 257), c = n.dmax, l = n.wsize, u = n.whave, d = n.wnext, f = n.window, p = n.hold, m = n.bits, h = n.lencode, g = n.distcode, _ = (1 << n.lenbits) - 1, v = (1 << n.distbits) - 1;
|
|
5170
5592
|
e: do {
|
|
5171
|
-
m < 15 && (p +=
|
|
5593
|
+
m < 15 && (p += T[r++] << m, m += 8, p += T[r++] << m, m += 8), y = h[p & _];
|
|
5172
5594
|
t: for (;;) {
|
|
5173
|
-
if (p >>>=
|
|
5595
|
+
if (p >>>= b = y >>> 24, m -= b, (b = y >>> 16 & 255) == 0) E[a++] = 65535 & y;
|
|
5174
5596
|
else {
|
|
5175
|
-
if (!(16 &
|
|
5176
|
-
if (!(64 &
|
|
5177
|
-
|
|
5597
|
+
if (!(16 & b)) {
|
|
5598
|
+
if (!(64 & b)) {
|
|
5599
|
+
y = h[(65535 & y) + (p & (1 << b) - 1)];
|
|
5178
5600
|
continue t;
|
|
5179
5601
|
}
|
|
5180
|
-
if (32 &
|
|
5602
|
+
if (32 & b) {
|
|
5181
5603
|
n.mode = 12;
|
|
5182
5604
|
break e;
|
|
5183
5605
|
}
|
|
5184
5606
|
e.msg = "invalid literal/length code", n.mode = 30;
|
|
5185
5607
|
break e;
|
|
5186
5608
|
}
|
|
5187
|
-
|
|
5609
|
+
x = 65535 & y, (b &= 15) && (m < b && (p += T[r++] << m, m += 8), x += p & (1 << b) - 1, p >>>= b, m -= b), m < 15 && (p += T[r++] << m, m += 8, p += T[r++] << m, m += 8), y = g[p & v];
|
|
5188
5610
|
r: for (;;) {
|
|
5189
|
-
if (p >>>=
|
|
5190
|
-
if (!(64 &
|
|
5191
|
-
|
|
5611
|
+
if (p >>>= b = y >>> 24, m -= b, !(16 & (b = y >>> 16 & 255))) {
|
|
5612
|
+
if (!(64 & b)) {
|
|
5613
|
+
y = g[(65535 & y) + (p & (1 << b) - 1)];
|
|
5192
5614
|
continue r;
|
|
5193
5615
|
}
|
|
5194
5616
|
e.msg = "invalid distance code", n.mode = 30;
|
|
5195
5617
|
break e;
|
|
5196
5618
|
}
|
|
5197
|
-
if (
|
|
5619
|
+
if (S = 65535 & y, m < (b &= 15) && (p += T[r++] << m, (m += 8) < b && (p += T[r++] << m, m += 8)), c < (S += p & (1 << b) - 1)) {
|
|
5198
5620
|
e.msg = "invalid distance too far back", n.mode = 30;
|
|
5199
5621
|
break e;
|
|
5200
5622
|
}
|
|
5201
|
-
if (p >>>=
|
|
5202
|
-
if (u < (
|
|
5623
|
+
if (p >>>= b, m -= b, (b = a - o) < S) {
|
|
5624
|
+
if (u < (b = S - b) && n.sane) {
|
|
5203
5625
|
e.msg = "invalid distance too far back", n.mode = 30;
|
|
5204
5626
|
break e;
|
|
5205
5627
|
}
|
|
5206
|
-
if (
|
|
5207
|
-
if (
|
|
5208
|
-
for (
|
|
5209
|
-
|
|
5628
|
+
if (w = f, (C = 0) === d) {
|
|
5629
|
+
if (C += l - b, b < x) {
|
|
5630
|
+
for (x -= b; E[a++] = f[C++], --b;);
|
|
5631
|
+
C = a - S, w = E;
|
|
5210
5632
|
}
|
|
5211
|
-
} else if (d <
|
|
5212
|
-
if (
|
|
5213
|
-
for (
|
|
5214
|
-
if (
|
|
5215
|
-
for (
|
|
5216
|
-
|
|
5633
|
+
} else if (d < b) {
|
|
5634
|
+
if (C += l + d - b, (b -= d) < x) {
|
|
5635
|
+
for (x -= b; E[a++] = f[C++], --b;);
|
|
5636
|
+
if (C = 0, d < x) {
|
|
5637
|
+
for (x -= b = d; E[a++] = f[C++], --b;);
|
|
5638
|
+
C = a - S, w = E;
|
|
5217
5639
|
}
|
|
5218
5640
|
}
|
|
5219
|
-
} else if (
|
|
5220
|
-
for (
|
|
5221
|
-
|
|
5641
|
+
} else if (C += d - b, b < x) {
|
|
5642
|
+
for (x -= b; E[a++] = f[C++], --b;);
|
|
5643
|
+
C = a - S, w = E;
|
|
5222
5644
|
}
|
|
5223
|
-
for (; 2 <
|
|
5224
|
-
|
|
5645
|
+
for (; 2 < x;) E[a++] = w[C++], E[a++] = w[C++], E[a++] = w[C++], x -= 3;
|
|
5646
|
+
x && (E[a++] = w[C++], 1 < x && (E[a++] = w[C++]));
|
|
5225
5647
|
} else {
|
|
5226
|
-
for (
|
|
5227
|
-
|
|
5648
|
+
for (C = a - S; E[a++] = E[C++], E[a++] = E[C++], E[a++] = E[C++], 2 < (x -= 3););
|
|
5649
|
+
x && (E[a++] = E[C++], 1 < x && (E[a++] = E[C++]));
|
|
5228
5650
|
}
|
|
5229
5651
|
break;
|
|
5230
5652
|
}
|
|
@@ -5232,54 +5654,54 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5232
5654
|
break;
|
|
5233
5655
|
}
|
|
5234
5656
|
} while (r < i && a < s);
|
|
5235
|
-
r -=
|
|
5657
|
+
r -= x = m >> 3, p &= (1 << (m -= x << 3)) - 1, e.next_in = r, e.next_out = a, e.avail_in = r < i ? i - r + 5 : 5 - (r - i), e.avail_out = a < s ? s - a + 257 : 257 - (a - s), n.hold = p, n.bits = m;
|
|
5236
5658
|
};
|
|
5237
5659
|
}, {}],
|
|
5238
5660
|
49: [function(e, t, n) {
|
|
5239
5661
|
var r = e("../utils/common"), i = e("./adler32"), a = e("./crc32"), o = e("./inffast"), s = e("./inftrees"), c = 1, l = 2, u = 0, d = -2, f = 1, p = 852, m = 592;
|
|
5240
|
-
function
|
|
5662
|
+
function h(e) {
|
|
5241
5663
|
return (e >>> 24 & 255) + (e >>> 8 & 65280) + ((65280 & e) << 8) + ((255 & e) << 24);
|
|
5242
5664
|
}
|
|
5243
|
-
function
|
|
5665
|
+
function g() {
|
|
5244
5666
|
this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new r.Buf16(320), this.work = new r.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
5245
5667
|
}
|
|
5246
|
-
function
|
|
5668
|
+
function _(e) {
|
|
5247
5669
|
var t;
|
|
5248
5670
|
return e && e.state ? (t = e.state, e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = 1 & t.wrap), t.mode = f, t.last = 0, t.havedict = 0, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new r.Buf32(p), t.distcode = t.distdyn = new r.Buf32(m), t.sane = 1, t.back = -1, u) : d;
|
|
5249
5671
|
}
|
|
5250
|
-
function
|
|
5672
|
+
function v(e) {
|
|
5251
5673
|
var t;
|
|
5252
|
-
return e && e.state ? ((t = e.state).wsize = 0, t.whave = 0, t.wnext = 0,
|
|
5674
|
+
return e && e.state ? ((t = e.state).wsize = 0, t.whave = 0, t.wnext = 0, _(e)) : d;
|
|
5253
5675
|
}
|
|
5254
|
-
function
|
|
5676
|
+
function y(e, t) {
|
|
5255
5677
|
var n, r;
|
|
5256
|
-
return e && e.state ? (r = e.state, t < 0 ? (n = 0, t = -t) : (n = 1 + (t >> 4), t < 48 && (t &= 15)), t && (t < 8 || 15 < t) ? d : (r.window !== null && r.wbits !== t && (r.window = null), r.wrap = n, r.wbits = t,
|
|
5678
|
+
return e && e.state ? (r = e.state, t < 0 ? (n = 0, t = -t) : (n = 1 + (t >> 4), t < 48 && (t &= 15)), t && (t < 8 || 15 < t) ? d : (r.window !== null && r.wbits !== t && (r.window = null), r.wrap = n, r.wbits = t, v(e))) : d;
|
|
5257
5679
|
}
|
|
5258
|
-
function
|
|
5680
|
+
function b(e, t) {
|
|
5259
5681
|
var n, r;
|
|
5260
|
-
return e ? (r = new
|
|
5682
|
+
return e ? (r = new g(), (e.state = r).window = null, (n = y(e, t)) !== u && (e.state = null), n) : d;
|
|
5261
5683
|
}
|
|
5262
|
-
var S, C
|
|
5263
|
-
function
|
|
5264
|
-
if (
|
|
5684
|
+
var x, S, C = !0;
|
|
5685
|
+
function w(e) {
|
|
5686
|
+
if (C) {
|
|
5265
5687
|
var t;
|
|
5266
|
-
for (
|
|
5688
|
+
for (x = new r.Buf32(512), S = new r.Buf32(32), t = 0; t < 144;) e.lens[t++] = 8;
|
|
5267
5689
|
for (; t < 256;) e.lens[t++] = 9;
|
|
5268
5690
|
for (; t < 280;) e.lens[t++] = 7;
|
|
5269
5691
|
for (; t < 288;) e.lens[t++] = 8;
|
|
5270
|
-
for (s(c, e.lens, 0, 288,
|
|
5271
|
-
s(l, e.lens, 0, 32,
|
|
5692
|
+
for (s(c, e.lens, 0, 288, x, 0, e.work, { bits: 9 }), t = 0; t < 32;) e.lens[t++] = 5;
|
|
5693
|
+
s(l, e.lens, 0, 32, S, 0, e.work, { bits: 5 }), C = !1;
|
|
5272
5694
|
}
|
|
5273
|
-
e.lencode =
|
|
5695
|
+
e.lencode = x, e.lenbits = 9, e.distcode = S, e.distbits = 5;
|
|
5274
5696
|
}
|
|
5275
|
-
function
|
|
5697
|
+
function T(e, t, n, i) {
|
|
5276
5698
|
var a, o = e.state;
|
|
5277
5699
|
return o.window === null && (o.wsize = 1 << o.wbits, o.wnext = 0, o.whave = 0, o.window = new r.Buf8(o.wsize)), i >= o.wsize ? (r.arraySet(o.window, t, n - o.wsize, o.wsize, 0), o.wnext = 0, o.whave = o.wsize) : (i < (a = o.wsize - o.wnext) && (a = i), r.arraySet(o.window, t, n - i, a, o.wnext), (i -= a) ? (r.arraySet(o.window, t, n - i, i, 0), o.wnext = i, o.whave = o.wsize) : (o.wnext += a, o.wnext === o.wsize && (o.wnext = 0), o.whave < o.wsize && (o.whave += a))), 0;
|
|
5278
5700
|
}
|
|
5279
|
-
n.inflateReset =
|
|
5280
|
-
return
|
|
5281
|
-
}, n.inflateInit2 =
|
|
5282
|
-
var n, p, m, _, v, y, b, x, S, C,
|
|
5701
|
+
n.inflateReset = v, n.inflateReset2 = y, n.inflateResetKeep = _, n.inflateInit = function(e) {
|
|
5702
|
+
return b(e, 15);
|
|
5703
|
+
}, n.inflateInit2 = b, n.inflate = function(e, t) {
|
|
5704
|
+
var n, p, m, g, _, v, y, b, x, S, C, E, D, O, k, A, j, M, N, P, F, I, L, R, z = 0, B = new r.Buf8(4), V = [
|
|
5283
5705
|
16,
|
|
5284
5706
|
17,
|
|
5285
5707
|
18,
|
|
@@ -5301,42 +5723,42 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5301
5723
|
15
|
|
5302
5724
|
];
|
|
5303
5725
|
if (!e || !e.state || !e.output || !e.input && e.avail_in !== 0) return d;
|
|
5304
|
-
(n = e.state).mode === 12 && (n.mode = 13),
|
|
5726
|
+
(n = e.state).mode === 12 && (n.mode = 13), _ = e.next_out, m = e.output, y = e.avail_out, g = e.next_in, p = e.input, v = e.avail_in, b = n.hold, x = n.bits, S = v, C = y, I = u;
|
|
5305
5727
|
e: for (;;) switch (n.mode) {
|
|
5306
5728
|
case f:
|
|
5307
5729
|
if (n.wrap === 0) {
|
|
5308
5730
|
n.mode = 13;
|
|
5309
5731
|
break;
|
|
5310
5732
|
}
|
|
5311
|
-
for (;
|
|
5312
|
-
if (
|
|
5313
|
-
|
|
5733
|
+
for (; x < 16;) {
|
|
5734
|
+
if (v === 0) break e;
|
|
5735
|
+
v--, b += p[g++] << x, x += 8;
|
|
5314
5736
|
}
|
|
5315
|
-
if (2 & n.wrap &&
|
|
5316
|
-
|
|
5737
|
+
if (2 & n.wrap && b === 35615) {
|
|
5738
|
+
B[n.check = 0] = 255 & b, B[1] = b >>> 8 & 255, n.check = a(n.check, B, 2, 0), x = b = 0, n.mode = 2;
|
|
5317
5739
|
break;
|
|
5318
5740
|
}
|
|
5319
|
-
if (n.flags = 0, n.head && (n.head.done = !1), !(1 & n.wrap) || (((255 &
|
|
5741
|
+
if (n.flags = 0, n.head && (n.head.done = !1), !(1 & n.wrap) || (((255 & b) << 8) + (b >> 8)) % 31) {
|
|
5320
5742
|
e.msg = "incorrect header check", n.mode = 30;
|
|
5321
5743
|
break;
|
|
5322
5744
|
}
|
|
5323
|
-
if ((15 &
|
|
5745
|
+
if ((15 & b) != 8) {
|
|
5324
5746
|
e.msg = "unknown compression method", n.mode = 30;
|
|
5325
5747
|
break;
|
|
5326
5748
|
}
|
|
5327
|
-
if (
|
|
5328
|
-
else if (
|
|
5749
|
+
if (x -= 4, F = 8 + (15 & (b >>>= 4)), n.wbits === 0) n.wbits = F;
|
|
5750
|
+
else if (F > n.wbits) {
|
|
5329
5751
|
e.msg = "invalid window size", n.mode = 30;
|
|
5330
5752
|
break;
|
|
5331
5753
|
}
|
|
5332
|
-
n.dmax = 1 <<
|
|
5754
|
+
n.dmax = 1 << F, e.adler = n.check = 1, n.mode = 512 & b ? 10 : 12, x = b = 0;
|
|
5333
5755
|
break;
|
|
5334
5756
|
case 2:
|
|
5335
|
-
for (;
|
|
5336
|
-
if (
|
|
5337
|
-
|
|
5757
|
+
for (; x < 16;) {
|
|
5758
|
+
if (v === 0) break e;
|
|
5759
|
+
v--, b += p[g++] << x, x += 8;
|
|
5338
5760
|
}
|
|
5339
|
-
if (n.flags =
|
|
5761
|
+
if (n.flags = b, (255 & n.flags) != 8) {
|
|
5340
5762
|
e.msg = "unknown compression method", n.mode = 30;
|
|
5341
5763
|
break;
|
|
5342
5764
|
}
|
|
@@ -5344,172 +5766,172 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5344
5766
|
e.msg = "unknown header flags set", n.mode = 30;
|
|
5345
5767
|
break;
|
|
5346
5768
|
}
|
|
5347
|
-
n.head && (n.head.text =
|
|
5769
|
+
n.head && (n.head.text = b >> 8 & 1), 512 & n.flags && (B[0] = 255 & b, B[1] = b >>> 8 & 255, n.check = a(n.check, B, 2, 0)), x = b = 0, n.mode = 3;
|
|
5348
5770
|
case 3:
|
|
5349
|
-
for (;
|
|
5350
|
-
if (
|
|
5351
|
-
|
|
5771
|
+
for (; x < 32;) {
|
|
5772
|
+
if (v === 0) break e;
|
|
5773
|
+
v--, b += p[g++] << x, x += 8;
|
|
5352
5774
|
}
|
|
5353
|
-
n.head && (n.head.time =
|
|
5775
|
+
n.head && (n.head.time = b), 512 & n.flags && (B[0] = 255 & b, B[1] = b >>> 8 & 255, B[2] = b >>> 16 & 255, B[3] = b >>> 24 & 255, n.check = a(n.check, B, 4, 0)), x = b = 0, n.mode = 4;
|
|
5354
5776
|
case 4:
|
|
5355
|
-
for (;
|
|
5356
|
-
if (
|
|
5357
|
-
|
|
5777
|
+
for (; x < 16;) {
|
|
5778
|
+
if (v === 0) break e;
|
|
5779
|
+
v--, b += p[g++] << x, x += 8;
|
|
5358
5780
|
}
|
|
5359
|
-
n.head && (n.head.xflags = 255 &
|
|
5781
|
+
n.head && (n.head.xflags = 255 & b, n.head.os = b >> 8), 512 & n.flags && (B[0] = 255 & b, B[1] = b >>> 8 & 255, n.check = a(n.check, B, 2, 0)), x = b = 0, n.mode = 5;
|
|
5360
5782
|
case 5:
|
|
5361
5783
|
if (1024 & n.flags) {
|
|
5362
|
-
for (;
|
|
5363
|
-
if (
|
|
5364
|
-
|
|
5784
|
+
for (; x < 16;) {
|
|
5785
|
+
if (v === 0) break e;
|
|
5786
|
+
v--, b += p[g++] << x, x += 8;
|
|
5365
5787
|
}
|
|
5366
|
-
n.length =
|
|
5788
|
+
n.length = b, n.head && (n.head.extra_len = b), 512 & n.flags && (B[0] = 255 & b, B[1] = b >>> 8 & 255, n.check = a(n.check, B, 2, 0)), x = b = 0;
|
|
5367
5789
|
} else n.head && (n.head.extra = null);
|
|
5368
5790
|
n.mode = 6;
|
|
5369
5791
|
case 6:
|
|
5370
|
-
if (1024 & n.flags && (
|
|
5792
|
+
if (1024 & n.flags && (v < (E = n.length) && (E = v), E && (n.head && (F = n.head.extra_len - n.length, n.head.extra || (n.head.extra = Array(n.head.extra_len)), r.arraySet(n.head.extra, p, g, E, F)), 512 & n.flags && (n.check = a(n.check, p, E, g)), v -= E, g += E, n.length -= E), n.length)) break e;
|
|
5371
5793
|
n.length = 0, n.mode = 7;
|
|
5372
5794
|
case 7:
|
|
5373
5795
|
if (2048 & n.flags) {
|
|
5374
|
-
if (
|
|
5375
|
-
for (
|
|
5376
|
-
if (512 & n.flags && (n.check = a(n.check, p,
|
|
5796
|
+
if (v === 0) break e;
|
|
5797
|
+
for (E = 0; F = p[g + E++], n.head && F && n.length < 65536 && (n.head.name += String.fromCharCode(F)), F && E < v;);
|
|
5798
|
+
if (512 & n.flags && (n.check = a(n.check, p, E, g)), v -= E, g += E, F) break e;
|
|
5377
5799
|
} else n.head && (n.head.name = null);
|
|
5378
5800
|
n.length = 0, n.mode = 8;
|
|
5379
5801
|
case 8:
|
|
5380
5802
|
if (4096 & n.flags) {
|
|
5381
|
-
if (
|
|
5382
|
-
for (
|
|
5383
|
-
if (512 & n.flags && (n.check = a(n.check, p,
|
|
5803
|
+
if (v === 0) break e;
|
|
5804
|
+
for (E = 0; F = p[g + E++], n.head && F && n.length < 65536 && (n.head.comment += String.fromCharCode(F)), F && E < v;);
|
|
5805
|
+
if (512 & n.flags && (n.check = a(n.check, p, E, g)), v -= E, g += E, F) break e;
|
|
5384
5806
|
} else n.head && (n.head.comment = null);
|
|
5385
5807
|
n.mode = 9;
|
|
5386
5808
|
case 9:
|
|
5387
5809
|
if (512 & n.flags) {
|
|
5388
|
-
for (;
|
|
5389
|
-
if (
|
|
5390
|
-
|
|
5810
|
+
for (; x < 16;) {
|
|
5811
|
+
if (v === 0) break e;
|
|
5812
|
+
v--, b += p[g++] << x, x += 8;
|
|
5391
5813
|
}
|
|
5392
|
-
if (
|
|
5814
|
+
if (b !== (65535 & n.check)) {
|
|
5393
5815
|
e.msg = "header crc mismatch", n.mode = 30;
|
|
5394
5816
|
break;
|
|
5395
5817
|
}
|
|
5396
|
-
|
|
5818
|
+
x = b = 0;
|
|
5397
5819
|
}
|
|
5398
5820
|
n.head && (n.head.hcrc = n.flags >> 9 & 1, n.head.done = !0), e.adler = n.check = 0, n.mode = 12;
|
|
5399
5821
|
break;
|
|
5400
5822
|
case 10:
|
|
5401
|
-
for (;
|
|
5402
|
-
if (
|
|
5403
|
-
|
|
5823
|
+
for (; x < 32;) {
|
|
5824
|
+
if (v === 0) break e;
|
|
5825
|
+
v--, b += p[g++] << x, x += 8;
|
|
5404
5826
|
}
|
|
5405
|
-
e.adler = n.check =
|
|
5827
|
+
e.adler = n.check = h(b), x = b = 0, n.mode = 11;
|
|
5406
5828
|
case 11:
|
|
5407
|
-
if (n.havedict === 0) return e.next_out =
|
|
5829
|
+
if (n.havedict === 0) return e.next_out = _, e.avail_out = y, e.next_in = g, e.avail_in = v, n.hold = b, n.bits = x, 2;
|
|
5408
5830
|
e.adler = n.check = 1, n.mode = 12;
|
|
5409
5831
|
case 12: if (t === 5 || t === 6) break e;
|
|
5410
5832
|
case 13:
|
|
5411
5833
|
if (n.last) {
|
|
5412
|
-
|
|
5834
|
+
b >>>= 7 & x, x -= 7 & x, n.mode = 27;
|
|
5413
5835
|
break;
|
|
5414
5836
|
}
|
|
5415
|
-
for (;
|
|
5416
|
-
if (
|
|
5417
|
-
|
|
5837
|
+
for (; x < 3;) {
|
|
5838
|
+
if (v === 0) break e;
|
|
5839
|
+
v--, b += p[g++] << x, x += 8;
|
|
5418
5840
|
}
|
|
5419
|
-
switch (n.last = 1 &
|
|
5841
|
+
switch (n.last = 1 & b, --x, 3 & (b >>>= 1)) {
|
|
5420
5842
|
case 0:
|
|
5421
5843
|
n.mode = 14;
|
|
5422
5844
|
break;
|
|
5423
5845
|
case 1:
|
|
5424
|
-
if (
|
|
5425
|
-
|
|
5846
|
+
if (w(n), n.mode = 20, t !== 6) break;
|
|
5847
|
+
b >>>= 2, x -= 2;
|
|
5426
5848
|
break e;
|
|
5427
5849
|
case 2:
|
|
5428
5850
|
n.mode = 17;
|
|
5429
5851
|
break;
|
|
5430
5852
|
case 3: e.msg = "invalid block type", n.mode = 30;
|
|
5431
5853
|
}
|
|
5432
|
-
|
|
5854
|
+
b >>>= 2, x -= 2;
|
|
5433
5855
|
break;
|
|
5434
5856
|
case 14:
|
|
5435
|
-
for (
|
|
5436
|
-
if (
|
|
5437
|
-
|
|
5857
|
+
for (b >>>= 7 & x, x -= 7 & x; x < 32;) {
|
|
5858
|
+
if (v === 0) break e;
|
|
5859
|
+
v--, b += p[g++] << x, x += 8;
|
|
5438
5860
|
}
|
|
5439
|
-
if ((65535 &
|
|
5861
|
+
if ((65535 & b) != (b >>> 16 ^ 65535)) {
|
|
5440
5862
|
e.msg = "invalid stored block lengths", n.mode = 30;
|
|
5441
5863
|
break;
|
|
5442
5864
|
}
|
|
5443
|
-
if (n.length = 65535 &
|
|
5865
|
+
if (n.length = 65535 & b, x = b = 0, n.mode = 15, t === 6) break e;
|
|
5444
5866
|
case 15: n.mode = 16;
|
|
5445
5867
|
case 16:
|
|
5446
|
-
if (
|
|
5447
|
-
if (
|
|
5448
|
-
r.arraySet(m, p,
|
|
5868
|
+
if (E = n.length) {
|
|
5869
|
+
if (v < E && (E = v), y < E && (E = y), E === 0) break e;
|
|
5870
|
+
r.arraySet(m, p, g, E, _), v -= E, g += E, y -= E, _ += E, n.length -= E;
|
|
5449
5871
|
break;
|
|
5450
5872
|
}
|
|
5451
5873
|
n.mode = 12;
|
|
5452
5874
|
break;
|
|
5453
5875
|
case 17:
|
|
5454
|
-
for (;
|
|
5455
|
-
if (
|
|
5456
|
-
|
|
5876
|
+
for (; x < 14;) {
|
|
5877
|
+
if (v === 0) break e;
|
|
5878
|
+
v--, b += p[g++] << x, x += 8;
|
|
5457
5879
|
}
|
|
5458
|
-
if (n.nlen = 257 + (31 &
|
|
5880
|
+
if (n.nlen = 257 + (31 & b), b >>>= 5, x -= 5, n.ndist = 1 + (31 & b), b >>>= 5, x -= 5, n.ncode = 4 + (15 & b), b >>>= 4, x -= 4, 286 < n.nlen || 30 < n.ndist) {
|
|
5459
5881
|
e.msg = "too many length or distance symbols", n.mode = 30;
|
|
5460
5882
|
break;
|
|
5461
5883
|
}
|
|
5462
5884
|
n.have = 0, n.mode = 18;
|
|
5463
5885
|
case 18:
|
|
5464
5886
|
for (; n.have < n.ncode;) {
|
|
5465
|
-
for (;
|
|
5466
|
-
if (
|
|
5467
|
-
|
|
5887
|
+
for (; x < 3;) {
|
|
5888
|
+
if (v === 0) break e;
|
|
5889
|
+
v--, b += p[g++] << x, x += 8;
|
|
5468
5890
|
}
|
|
5469
|
-
n.lens[
|
|
5891
|
+
n.lens[V[n.have++]] = 7 & b, b >>>= 3, x -= 3;
|
|
5470
5892
|
}
|
|
5471
|
-
for (; n.have < 19;) n.lens[
|
|
5472
|
-
if (n.lencode = n.lendyn, n.lenbits = 7,
|
|
5893
|
+
for (; n.have < 19;) n.lens[V[n.have++]] = 0;
|
|
5894
|
+
if (n.lencode = n.lendyn, n.lenbits = 7, L = { bits: n.lenbits }, I = s(0, n.lens, 0, 19, n.lencode, 0, n.work, L), n.lenbits = L.bits, I) {
|
|
5473
5895
|
e.msg = "invalid code lengths set", n.mode = 30;
|
|
5474
5896
|
break;
|
|
5475
5897
|
}
|
|
5476
5898
|
n.have = 0, n.mode = 19;
|
|
5477
5899
|
case 19:
|
|
5478
5900
|
for (; n.have < n.nlen + n.ndist;) {
|
|
5479
|
-
for (;
|
|
5480
|
-
if (
|
|
5481
|
-
|
|
5901
|
+
for (; A = (z = n.lencode[b & (1 << n.lenbits) - 1]) >>> 16 & 255, j = 65535 & z, !((k = z >>> 24) <= x);) {
|
|
5902
|
+
if (v === 0) break e;
|
|
5903
|
+
v--, b += p[g++] << x, x += 8;
|
|
5482
5904
|
}
|
|
5483
|
-
if (
|
|
5905
|
+
if (j < 16) b >>>= k, x -= k, n.lens[n.have++] = j;
|
|
5484
5906
|
else {
|
|
5485
|
-
if (
|
|
5486
|
-
for (
|
|
5487
|
-
if (
|
|
5488
|
-
|
|
5907
|
+
if (j === 16) {
|
|
5908
|
+
for (R = k + 2; x < R;) {
|
|
5909
|
+
if (v === 0) break e;
|
|
5910
|
+
v--, b += p[g++] << x, x += 8;
|
|
5489
5911
|
}
|
|
5490
|
-
if (
|
|
5912
|
+
if (b >>>= k, x -= k, n.have === 0) {
|
|
5491
5913
|
e.msg = "invalid bit length repeat", n.mode = 30;
|
|
5492
5914
|
break;
|
|
5493
5915
|
}
|
|
5494
|
-
|
|
5495
|
-
} else if (
|
|
5496
|
-
for (
|
|
5497
|
-
if (
|
|
5498
|
-
|
|
5916
|
+
F = n.lens[n.have - 1], E = 3 + (3 & b), b >>>= 2, x -= 2;
|
|
5917
|
+
} else if (j === 17) {
|
|
5918
|
+
for (R = k + 3; x < R;) {
|
|
5919
|
+
if (v === 0) break e;
|
|
5920
|
+
v--, b += p[g++] << x, x += 8;
|
|
5499
5921
|
}
|
|
5500
|
-
|
|
5922
|
+
x -= k, F = 0, E = 3 + (7 & (b >>>= k)), b >>>= 3, x -= 3;
|
|
5501
5923
|
} else {
|
|
5502
|
-
for (
|
|
5503
|
-
if (
|
|
5504
|
-
|
|
5924
|
+
for (R = k + 7; x < R;) {
|
|
5925
|
+
if (v === 0) break e;
|
|
5926
|
+
v--, b += p[g++] << x, x += 8;
|
|
5505
5927
|
}
|
|
5506
|
-
|
|
5928
|
+
x -= k, F = 0, E = 11 + (127 & (b >>>= k)), b >>>= 7, x -= 7;
|
|
5507
5929
|
}
|
|
5508
|
-
if (n.have +
|
|
5930
|
+
if (n.have + E > n.nlen + n.ndist) {
|
|
5509
5931
|
e.msg = "invalid bit length repeat", n.mode = 30;
|
|
5510
5932
|
break;
|
|
5511
5933
|
}
|
|
5512
|
-
for (;
|
|
5934
|
+
for (; E--;) n.lens[n.have++] = F;
|
|
5513
5935
|
}
|
|
5514
5936
|
}
|
|
5515
5937
|
if (n.mode === 30) break;
|
|
@@ -5517,78 +5939,78 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5517
5939
|
e.msg = "invalid code -- missing end-of-block", n.mode = 30;
|
|
5518
5940
|
break;
|
|
5519
5941
|
}
|
|
5520
|
-
if (n.lenbits = 9,
|
|
5942
|
+
if (n.lenbits = 9, L = { bits: n.lenbits }, I = s(c, n.lens, 0, n.nlen, n.lencode, 0, n.work, L), n.lenbits = L.bits, I) {
|
|
5521
5943
|
e.msg = "invalid literal/lengths set", n.mode = 30;
|
|
5522
5944
|
break;
|
|
5523
5945
|
}
|
|
5524
|
-
if (n.distbits = 6, n.distcode = n.distdyn,
|
|
5946
|
+
if (n.distbits = 6, n.distcode = n.distdyn, L = { bits: n.distbits }, I = s(l, n.lens, n.nlen, n.ndist, n.distcode, 0, n.work, L), n.distbits = L.bits, I) {
|
|
5525
5947
|
e.msg = "invalid distances set", n.mode = 30;
|
|
5526
5948
|
break;
|
|
5527
5949
|
}
|
|
5528
5950
|
if (n.mode = 20, t === 6) break e;
|
|
5529
5951
|
case 20: n.mode = 21;
|
|
5530
5952
|
case 21:
|
|
5531
|
-
if (6 <=
|
|
5532
|
-
e.next_out =
|
|
5953
|
+
if (6 <= v && 258 <= y) {
|
|
5954
|
+
e.next_out = _, e.avail_out = y, e.next_in = g, e.avail_in = v, n.hold = b, n.bits = x, o(e, C), _ = e.next_out, m = e.output, y = e.avail_out, g = e.next_in, p = e.input, v = e.avail_in, b = n.hold, x = n.bits, n.mode === 12 && (n.back = -1);
|
|
5533
5955
|
break;
|
|
5534
5956
|
}
|
|
5535
|
-
for (n.back = 0;
|
|
5536
|
-
if (
|
|
5537
|
-
|
|
5957
|
+
for (n.back = 0; A = (z = n.lencode[b & (1 << n.lenbits) - 1]) >>> 16 & 255, j = 65535 & z, !((k = z >>> 24) <= x);) {
|
|
5958
|
+
if (v === 0) break e;
|
|
5959
|
+
v--, b += p[g++] << x, x += 8;
|
|
5538
5960
|
}
|
|
5539
|
-
if (
|
|
5540
|
-
for (
|
|
5541
|
-
if (
|
|
5542
|
-
|
|
5961
|
+
if (A && !(240 & A)) {
|
|
5962
|
+
for (M = k, N = A, P = j; A = (z = n.lencode[P + ((b & (1 << M + N) - 1) >> M)]) >>> 16 & 255, j = 65535 & z, !(M + (k = z >>> 24) <= x);) {
|
|
5963
|
+
if (v === 0) break e;
|
|
5964
|
+
v--, b += p[g++] << x, x += 8;
|
|
5543
5965
|
}
|
|
5544
|
-
|
|
5966
|
+
b >>>= M, x -= M, n.back += M;
|
|
5545
5967
|
}
|
|
5546
|
-
if (
|
|
5968
|
+
if (b >>>= k, x -= k, n.back += k, n.length = j, A === 0) {
|
|
5547
5969
|
n.mode = 26;
|
|
5548
5970
|
break;
|
|
5549
5971
|
}
|
|
5550
|
-
if (32 &
|
|
5972
|
+
if (32 & A) {
|
|
5551
5973
|
n.back = -1, n.mode = 12;
|
|
5552
5974
|
break;
|
|
5553
5975
|
}
|
|
5554
|
-
if (64 &
|
|
5976
|
+
if (64 & A) {
|
|
5555
5977
|
e.msg = "invalid literal/length code", n.mode = 30;
|
|
5556
5978
|
break;
|
|
5557
5979
|
}
|
|
5558
|
-
n.extra = 15 &
|
|
5980
|
+
n.extra = 15 & A, n.mode = 22;
|
|
5559
5981
|
case 22:
|
|
5560
5982
|
if (n.extra) {
|
|
5561
|
-
for (
|
|
5562
|
-
if (
|
|
5563
|
-
|
|
5983
|
+
for (R = n.extra; x < R;) {
|
|
5984
|
+
if (v === 0) break e;
|
|
5985
|
+
v--, b += p[g++] << x, x += 8;
|
|
5564
5986
|
}
|
|
5565
|
-
n.length +=
|
|
5987
|
+
n.length += b & (1 << n.extra) - 1, b >>>= n.extra, x -= n.extra, n.back += n.extra;
|
|
5566
5988
|
}
|
|
5567
5989
|
n.was = n.length, n.mode = 23;
|
|
5568
5990
|
case 23:
|
|
5569
|
-
for (;
|
|
5570
|
-
if (
|
|
5571
|
-
|
|
5991
|
+
for (; A = (z = n.distcode[b & (1 << n.distbits) - 1]) >>> 16 & 255, j = 65535 & z, !((k = z >>> 24) <= x);) {
|
|
5992
|
+
if (v === 0) break e;
|
|
5993
|
+
v--, b += p[g++] << x, x += 8;
|
|
5572
5994
|
}
|
|
5573
|
-
if (!(240 &
|
|
5574
|
-
for (
|
|
5575
|
-
if (
|
|
5576
|
-
|
|
5995
|
+
if (!(240 & A)) {
|
|
5996
|
+
for (M = k, N = A, P = j; A = (z = n.distcode[P + ((b & (1 << M + N) - 1) >> M)]) >>> 16 & 255, j = 65535 & z, !(M + (k = z >>> 24) <= x);) {
|
|
5997
|
+
if (v === 0) break e;
|
|
5998
|
+
v--, b += p[g++] << x, x += 8;
|
|
5577
5999
|
}
|
|
5578
|
-
|
|
6000
|
+
b >>>= M, x -= M, n.back += M;
|
|
5579
6001
|
}
|
|
5580
|
-
if (
|
|
6002
|
+
if (b >>>= k, x -= k, n.back += k, 64 & A) {
|
|
5581
6003
|
e.msg = "invalid distance code", n.mode = 30;
|
|
5582
6004
|
break;
|
|
5583
6005
|
}
|
|
5584
|
-
n.offset =
|
|
6006
|
+
n.offset = j, n.extra = 15 & A, n.mode = 24;
|
|
5585
6007
|
case 24:
|
|
5586
6008
|
if (n.extra) {
|
|
5587
|
-
for (
|
|
5588
|
-
if (
|
|
5589
|
-
|
|
6009
|
+
for (R = n.extra; x < R;) {
|
|
6010
|
+
if (v === 0) break e;
|
|
6011
|
+
v--, b += p[g++] << x, x += 8;
|
|
5590
6012
|
}
|
|
5591
|
-
n.offset +=
|
|
6013
|
+
n.offset += b & (1 << n.extra) - 1, b >>>= n.extra, x -= n.extra, n.back += n.extra;
|
|
5592
6014
|
}
|
|
5593
6015
|
if (n.offset > n.dmax) {
|
|
5594
6016
|
e.msg = "invalid distance too far back", n.mode = 30;
|
|
@@ -5596,58 +6018,58 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5596
6018
|
}
|
|
5597
6019
|
n.mode = 25;
|
|
5598
6020
|
case 25:
|
|
5599
|
-
if (
|
|
5600
|
-
if (
|
|
5601
|
-
if ((
|
|
6021
|
+
if (y === 0) break e;
|
|
6022
|
+
if (E = C - y, n.offset > E) {
|
|
6023
|
+
if ((E = n.offset - E) > n.whave && n.sane) {
|
|
5602
6024
|
e.msg = "invalid distance too far back", n.mode = 30;
|
|
5603
6025
|
break;
|
|
5604
6026
|
}
|
|
5605
|
-
|
|
5606
|
-
} else
|
|
5607
|
-
for (
|
|
6027
|
+
D = E > n.wnext ? (E -= n.wnext, n.wsize - E) : n.wnext - E, E > n.length && (E = n.length), O = n.window;
|
|
6028
|
+
} else O = m, D = _ - n.offset, E = n.length;
|
|
6029
|
+
for (y < E && (E = y), y -= E, n.length -= E; m[_++] = O[D++], --E;);
|
|
5608
6030
|
n.length === 0 && (n.mode = 21);
|
|
5609
6031
|
break;
|
|
5610
6032
|
case 26:
|
|
5611
|
-
if (
|
|
5612
|
-
m[
|
|
6033
|
+
if (y === 0) break e;
|
|
6034
|
+
m[_++] = n.length, y--, n.mode = 21;
|
|
5613
6035
|
break;
|
|
5614
6036
|
case 27:
|
|
5615
6037
|
if (n.wrap) {
|
|
5616
|
-
for (;
|
|
5617
|
-
if (
|
|
5618
|
-
|
|
6038
|
+
for (; x < 32;) {
|
|
6039
|
+
if (v === 0) break e;
|
|
6040
|
+
v--, b |= p[g++] << x, x += 8;
|
|
5619
6041
|
}
|
|
5620
|
-
if (
|
|
6042
|
+
if (C -= y, e.total_out += C, n.total += C, C && (e.adler = n.check = n.flags ? a(n.check, m, C, _ - C) : i(n.check, m, C, _ - C)), C = y, (n.flags ? b : h(b)) !== n.check) {
|
|
5621
6043
|
e.msg = "incorrect data check", n.mode = 30;
|
|
5622
6044
|
break;
|
|
5623
6045
|
}
|
|
5624
|
-
|
|
6046
|
+
x = b = 0;
|
|
5625
6047
|
}
|
|
5626
6048
|
n.mode = 28;
|
|
5627
6049
|
case 28:
|
|
5628
6050
|
if (n.wrap && n.flags) {
|
|
5629
|
-
for (;
|
|
5630
|
-
if (
|
|
5631
|
-
|
|
6051
|
+
for (; x < 32;) {
|
|
6052
|
+
if (v === 0) break e;
|
|
6053
|
+
v--, b += p[g++] << x, x += 8;
|
|
5632
6054
|
}
|
|
5633
|
-
if (
|
|
6055
|
+
if (b !== (4294967295 & n.total)) {
|
|
5634
6056
|
e.msg = "incorrect length check", n.mode = 30;
|
|
5635
6057
|
break;
|
|
5636
6058
|
}
|
|
5637
|
-
|
|
6059
|
+
x = b = 0;
|
|
5638
6060
|
}
|
|
5639
6061
|
n.mode = 29;
|
|
5640
6062
|
case 29:
|
|
5641
|
-
|
|
6063
|
+
I = 1;
|
|
5642
6064
|
break e;
|
|
5643
6065
|
case 30:
|
|
5644
|
-
|
|
6066
|
+
I = -3;
|
|
5645
6067
|
break e;
|
|
5646
6068
|
case 31: return -4;
|
|
5647
6069
|
case 32:
|
|
5648
6070
|
default: return d;
|
|
5649
6071
|
}
|
|
5650
|
-
return e.next_out =
|
|
6072
|
+
return e.next_out = _, e.avail_out = y, e.next_in = g, e.avail_in = v, n.hold = b, n.bits = x, (n.wsize || C !== e.avail_out && n.mode < 30 && (n.mode < 27 || t !== 4)) && T(e, e.output, e.next_out, C - e.avail_out) ? (n.mode = 31, -4) : (S -= e.avail_in, C -= e.avail_out, e.total_in += S, e.total_out += C, n.total += C, n.wrap && C && (e.adler = n.check = n.flags ? a(n.check, m, C, e.next_out - C) : i(n.check, m, C, e.next_out - C)), e.data_type = n.bits + (n.last ? 64 : 0) + (n.mode === 12 ? 128 : 0) + (n.mode === 20 || n.mode === 15 ? 256 : 0), (S == 0 && C === 0 || t === 4) && I === u && (I = -5), I);
|
|
5651
6073
|
}, n.inflateEnd = function(e) {
|
|
5652
6074
|
if (!e || !e.state) return d;
|
|
5653
6075
|
var t = e.state;
|
|
@@ -5657,7 +6079,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5657
6079
|
return e && e.state && 2 & (n = e.state).wrap ? ((n.head = t).done = !1, u) : d;
|
|
5658
6080
|
}, n.inflateSetDictionary = function(e, t) {
|
|
5659
6081
|
var n, r = t.length;
|
|
5660
|
-
return e && e.state ? (n = e.state).wrap !== 0 && n.mode !== 11 ? d : n.mode === 11 && i(1, t, r, 0) !== n.check ? -3 :
|
|
6082
|
+
return e && e.state ? (n = e.state).wrap !== 0 && n.mode !== 11 ? d : n.mode === 11 && i(1, t, r, 0) !== n.check ? -3 : T(e, t, r, r) ? (n.mode = 31, -4) : (n.havedict = 1, u) : d;
|
|
5661
6083
|
}, n.inflateInfo = "pako inflate (from Nodeca project)";
|
|
5662
6084
|
}, {
|
|
5663
6085
|
"../utils/common": 41,
|
|
@@ -5799,31 +6221,31 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5799
6221
|
64
|
|
5800
6222
|
];
|
|
5801
6223
|
t.exports = function(e, t, n, c, l, u, d, f) {
|
|
5802
|
-
var p, m, g, _, v, y, b, x, S
|
|
5803
|
-
for (
|
|
5804
|
-
for (
|
|
5805
|
-
for (
|
|
5806
|
-
if (
|
|
5807
|
-
for (
|
|
5808
|
-
for (
|
|
5809
|
-
if (0 <
|
|
5810
|
-
for (
|
|
5811
|
-
for (
|
|
5812
|
-
if (
|
|
6224
|
+
var p, m, h, g, _, v, y, b, x, S = f.bits, C = 0, w = 0, T = 0, E = 0, D = 0, O = 0, k = 0, A = 0, j = 0, M = 0, N = null, P = 0, F = new r.Buf16(16), I = new r.Buf16(16), L = null, R = 0;
|
|
6225
|
+
for (C = 0; C <= 15; C++) F[C] = 0;
|
|
6226
|
+
for (w = 0; w < c; w++) F[t[n + w]]++;
|
|
6227
|
+
for (D = S, E = 15; 1 <= E && F[E] === 0; E--);
|
|
6228
|
+
if (E < D && (D = E), E === 0) return l[u++] = 20971520, l[u++] = 20971520, f.bits = 1, 0;
|
|
6229
|
+
for (T = 1; T < E && F[T] === 0; T++);
|
|
6230
|
+
for (D < T && (D = T), C = A = 1; C <= 15; C++) if (A <<= 1, (A -= F[C]) < 0) return -1;
|
|
6231
|
+
if (0 < A && (e === 0 || E !== 1)) return -1;
|
|
6232
|
+
for (I[1] = 0, C = 1; C < 15; C++) I[C + 1] = I[C] + F[C];
|
|
6233
|
+
for (w = 0; w < c; w++) t[n + w] !== 0 && (d[I[t[n + w]]++] = w);
|
|
6234
|
+
if (v = e === 0 ? (N = L = d, 19) : e === 1 ? (N = i, P -= 257, L = a, R -= 257, 256) : (N = o, L = s, -1), C = T, _ = u, k = w = M = 0, h = -1, g = (j = 1 << (O = D)) - 1, e === 1 && 852 < j || e === 2 && 592 < j) return 1;
|
|
5813
6235
|
for (;;) {
|
|
5814
|
-
for (
|
|
5815
|
-
for (p = 1 <<
|
|
5816
|
-
if (p === 0 ?
|
|
5817
|
-
if (
|
|
5818
|
-
|
|
6236
|
+
for (y = C - k, x = d[w] < v ? (b = 0, d[w]) : d[w] > v ? (b = L[R + d[w]], N[P + d[w]]) : (b = 96, 0), p = 1 << C - k, T = m = 1 << O; l[_ + (M >> k) + (m -= p)] = y << 24 | b << 16 | x | 0, m !== 0;);
|
|
6237
|
+
for (p = 1 << C - 1; M & p;) p >>= 1;
|
|
6238
|
+
if (p === 0 ? M = 0 : (M &= p - 1, M += p), w++, --F[C] == 0) {
|
|
6239
|
+
if (C === E) break;
|
|
6240
|
+
C = t[n + d[w]];
|
|
5819
6241
|
}
|
|
5820
|
-
if (
|
|
5821
|
-
for (
|
|
5822
|
-
if (
|
|
5823
|
-
l[
|
|
6242
|
+
if (D < C && (M & g) !== h) {
|
|
6243
|
+
for (k === 0 && (k = D), _ += T, A = 1 << (O = C - k); O + k < E && !((A -= F[O + k]) <= 0);) O++, A <<= 1;
|
|
6244
|
+
if (j += 1 << O, e === 1 && 852 < j || e === 2 && 592 < j) return 1;
|
|
6245
|
+
l[h = M & g] = D << 24 | O << 16 | _ - u | 0;
|
|
5824
6246
|
}
|
|
5825
6247
|
}
|
|
5826
|
-
return
|
|
6248
|
+
return M !== 0 && (l[_ + M] = C - k << 24 | 4194304), f.bits = D, 0;
|
|
5827
6249
|
};
|
|
5828
6250
|
}, { "../utils/common": 41 }],
|
|
5829
6251
|
51: [function(e, t, n) {
|
|
@@ -5844,7 +6266,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5844
6266
|
function o(e) {
|
|
5845
6267
|
for (var t = e.length; 0 <= --t;) e[t] = 0;
|
|
5846
6268
|
}
|
|
5847
|
-
var s = 0, c = 29, l = 256, u = l + 1 + c, d = 30, f = 19, p = 2 * u + 1, m = 15,
|
|
6269
|
+
var s = 0, c = 29, l = 256, u = l + 1 + c, d = 30, f = 19, p = 2 * u + 1, m = 15, h = 16, g = 7, _ = 256, v = 16, y = 17, b = 18, x = [
|
|
5848
6270
|
0,
|
|
5849
6271
|
0,
|
|
5850
6272
|
0,
|
|
@@ -5874,7 +6296,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5874
6296
|
5,
|
|
5875
6297
|
5,
|
|
5876
6298
|
0
|
|
5877
|
-
],
|
|
6299
|
+
], S = [
|
|
5878
6300
|
0,
|
|
5879
6301
|
0,
|
|
5880
6302
|
0,
|
|
@@ -5905,7 +6327,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5905
6327
|
12,
|
|
5906
6328
|
13,
|
|
5907
6329
|
13
|
|
5908
|
-
],
|
|
6330
|
+
], C = [
|
|
5909
6331
|
0,
|
|
5910
6332
|
0,
|
|
5911
6333
|
0,
|
|
@@ -5925,7 +6347,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5925
6347
|
2,
|
|
5926
6348
|
3,
|
|
5927
6349
|
7
|
|
5928
|
-
],
|
|
6350
|
+
], w = [
|
|
5929
6351
|
16,
|
|
5930
6352
|
17,
|
|
5931
6353
|
18,
|
|
@@ -5945,123 +6367,123 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5945
6367
|
14,
|
|
5946
6368
|
1,
|
|
5947
6369
|
15
|
|
5948
|
-
],
|
|
6370
|
+
], T = Array(2 * (u + 2));
|
|
6371
|
+
o(T);
|
|
6372
|
+
var E = Array(2 * d);
|
|
5949
6373
|
o(E);
|
|
5950
|
-
var D = Array(
|
|
6374
|
+
var D = Array(512);
|
|
5951
6375
|
o(D);
|
|
5952
|
-
var O = Array(
|
|
6376
|
+
var O = Array(256);
|
|
5953
6377
|
o(O);
|
|
5954
|
-
var k = Array(
|
|
6378
|
+
var k = Array(c);
|
|
5955
6379
|
o(k);
|
|
5956
|
-
var A = Array(
|
|
5957
|
-
|
|
5958
|
-
var j, M, N, P = Array(d);
|
|
5959
|
-
function F(e, t, n, r, i) {
|
|
6380
|
+
var A, j, M, N = Array(d);
|
|
6381
|
+
function P(e, t, n, r, i) {
|
|
5960
6382
|
this.static_tree = e, this.extra_bits = t, this.extra_base = n, this.elems = r, this.max_length = i, this.has_stree = e && e.length;
|
|
5961
6383
|
}
|
|
5962
|
-
function
|
|
6384
|
+
function F(e, t) {
|
|
5963
6385
|
this.dyn_tree = e, this.max_code = 0, this.stat_desc = t;
|
|
5964
6386
|
}
|
|
5965
|
-
function
|
|
5966
|
-
return e < 256 ?
|
|
6387
|
+
function I(e) {
|
|
6388
|
+
return e < 256 ? D[e] : D[256 + (e >>> 7)];
|
|
5967
6389
|
}
|
|
5968
|
-
function
|
|
6390
|
+
function L(e, t) {
|
|
5969
6391
|
e.pending_buf[e.pending++] = 255 & t, e.pending_buf[e.pending++] = t >>> 8 & 255;
|
|
5970
6392
|
}
|
|
5971
|
-
function
|
|
5972
|
-
e.bi_valid >
|
|
6393
|
+
function R(e, t, n) {
|
|
6394
|
+
e.bi_valid > h - n ? (e.bi_buf |= t << e.bi_valid & 65535, L(e, e.bi_buf), e.bi_buf = t >> h - e.bi_valid, e.bi_valid += n - h) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += n);
|
|
5973
6395
|
}
|
|
5974
|
-
function
|
|
5975
|
-
|
|
6396
|
+
function z(e, t, n) {
|
|
6397
|
+
R(e, n[2 * t], n[2 * t + 1]);
|
|
5976
6398
|
}
|
|
5977
|
-
function
|
|
6399
|
+
function B(e, t) {
|
|
5978
6400
|
for (var n = 0; n |= 1 & e, e >>>= 1, n <<= 1, 0 < --t;);
|
|
5979
6401
|
return n >>> 1;
|
|
5980
6402
|
}
|
|
5981
|
-
function
|
|
6403
|
+
function V(e, t, n) {
|
|
5982
6404
|
var r, i, a = Array(m + 1), o = 0;
|
|
5983
6405
|
for (r = 1; r <= m; r++) a[r] = o = o + n[r - 1] << 1;
|
|
5984
6406
|
for (i = 0; i <= t; i++) {
|
|
5985
6407
|
var s = e[2 * i + 1];
|
|
5986
|
-
s !== 0 && (e[2 * i] =
|
|
6408
|
+
s !== 0 && (e[2 * i] = B(a[s]++, s));
|
|
5987
6409
|
}
|
|
5988
6410
|
}
|
|
5989
|
-
function
|
|
6411
|
+
function H(e) {
|
|
5990
6412
|
var t;
|
|
5991
6413
|
for (t = 0; t < u; t++) e.dyn_ltree[2 * t] = 0;
|
|
5992
6414
|
for (t = 0; t < d; t++) e.dyn_dtree[2 * t] = 0;
|
|
5993
6415
|
for (t = 0; t < f; t++) e.bl_tree[2 * t] = 0;
|
|
5994
|
-
e.dyn_ltree[2 *
|
|
6416
|
+
e.dyn_ltree[2 * _] = 1, e.opt_len = e.static_len = 0, e.last_lit = e.matches = 0;
|
|
5995
6417
|
}
|
|
5996
|
-
function
|
|
5997
|
-
8 < e.bi_valid ?
|
|
6418
|
+
function U(e) {
|
|
6419
|
+
8 < e.bi_valid ? L(e, e.bi_buf) : 0 < e.bi_valid && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
|
|
5998
6420
|
}
|
|
5999
|
-
function
|
|
6421
|
+
function W(e, t, n, r) {
|
|
6000
6422
|
var i = 2 * t, a = 2 * n;
|
|
6001
6423
|
return e[i] < e[a] || e[i] === e[a] && r[t] <= r[n];
|
|
6002
6424
|
}
|
|
6003
|
-
function
|
|
6004
|
-
for (var r = e.heap[n], i = n << 1; i <= e.heap_len && (i < e.heap_len &&
|
|
6425
|
+
function G(e, t, n) {
|
|
6426
|
+
for (var r = e.heap[n], i = n << 1; i <= e.heap_len && (i < e.heap_len && W(t, e.heap[i + 1], e.heap[i], e.depth) && i++, !W(t, r, e.heap[i], e.depth));) e.heap[n] = e.heap[i], n = i, i <<= 1;
|
|
6005
6427
|
e.heap[n] = r;
|
|
6006
6428
|
}
|
|
6007
|
-
function
|
|
6429
|
+
function K(e, t, n) {
|
|
6008
6430
|
var r, i, a, o, s = 0;
|
|
6009
|
-
if (e.last_lit !== 0) for (; r = e.pending_buf[e.d_buf + 2 * s] << 8 | e.pending_buf[e.d_buf + 2 * s + 1], i = e.pending_buf[e.l_buf + s], s++, r === 0 ?
|
|
6010
|
-
|
|
6431
|
+
if (e.last_lit !== 0) for (; r = e.pending_buf[e.d_buf + 2 * s] << 8 | e.pending_buf[e.d_buf + 2 * s + 1], i = e.pending_buf[e.l_buf + s], s++, r === 0 ? z(e, i, t) : (z(e, (a = O[i]) + l + 1, t), (o = x[a]) !== 0 && R(e, i -= k[a], o), z(e, a = I(--r), n), (o = S[a]) !== 0 && R(e, r -= N[a], o)), s < e.last_lit;);
|
|
6432
|
+
z(e, _, t);
|
|
6011
6433
|
}
|
|
6012
|
-
function
|
|
6434
|
+
function q(e, t) {
|
|
6013
6435
|
var n, r, i, a = t.dyn_tree, o = t.stat_desc.static_tree, s = t.stat_desc.has_stree, c = t.stat_desc.elems, l = -1;
|
|
6014
6436
|
for (e.heap_len = 0, e.heap_max = p, n = 0; n < c; n++) a[2 * n] === 0 ? a[2 * n + 1] = 0 : (e.heap[++e.heap_len] = l = n, e.depth[n] = 0);
|
|
6015
6437
|
for (; e.heap_len < 2;) a[2 * (i = e.heap[++e.heap_len] = l < 2 ? ++l : 0)] = 1, e.depth[i] = 0, e.opt_len--, s && (e.static_len -= o[2 * i + 1]);
|
|
6016
|
-
for (t.max_code = l, n = e.heap_len >> 1; 1 <= n; n--)
|
|
6017
|
-
for (i = c; n = e.heap[1], e.heap[1] = e.heap[e.heap_len--],
|
|
6438
|
+
for (t.max_code = l, n = e.heap_len >> 1; 1 <= n; n--) G(e, a, n);
|
|
6439
|
+
for (i = c; n = e.heap[1], e.heap[1] = e.heap[e.heap_len--], G(e, a, 1), r = e.heap[1], e.heap[--e.heap_max] = n, e.heap[--e.heap_max] = r, a[2 * i] = a[2 * n] + a[2 * r], e.depth[i] = (e.depth[n] >= e.depth[r] ? e.depth[n] : e.depth[r]) + 1, a[2 * n + 1] = a[2 * r + 1] = i, e.heap[1] = i++, G(e, a, 1), 2 <= e.heap_len;);
|
|
6018
6440
|
e.heap[--e.heap_max] = e.heap[1], function(e, t) {
|
|
6019
|
-
var n, r, i, a, o, s, c = t.dyn_tree, l = t.max_code, u = t.stat_desc.static_tree, d = t.stat_desc.has_stree, f = t.stat_desc.extra_bits,
|
|
6441
|
+
var n, r, i, a, o, s, c = t.dyn_tree, l = t.max_code, u = t.stat_desc.static_tree, d = t.stat_desc.has_stree, f = t.stat_desc.extra_bits, h = t.stat_desc.extra_base, g = t.stat_desc.max_length, _ = 0;
|
|
6020
6442
|
for (a = 0; a <= m; a++) e.bl_count[a] = 0;
|
|
6021
|
-
for (c[2 * e.heap[e.heap_max] + 1] = 0, n = e.heap_max + 1; n < p; n++)
|
|
6022
|
-
if (
|
|
6443
|
+
for (c[2 * e.heap[e.heap_max] + 1] = 0, n = e.heap_max + 1; n < p; n++) g < (a = c[2 * c[2 * (r = e.heap[n]) + 1] + 1] + 1) && (a = g, _++), c[2 * r + 1] = a, l < r || (e.bl_count[a]++, o = 0, h <= r && (o = f[r - h]), s = c[2 * r], e.opt_len += s * (a + o), d && (e.static_len += s * (u[2 * r + 1] + o)));
|
|
6444
|
+
if (_ !== 0) {
|
|
6023
6445
|
do {
|
|
6024
|
-
for (a =
|
|
6025
|
-
e.bl_count[a]--, e.bl_count[a + 1] += 2, e.bl_count[
|
|
6026
|
-
} while (0 <
|
|
6027
|
-
for (a =
|
|
6446
|
+
for (a = g - 1; e.bl_count[a] === 0;) a--;
|
|
6447
|
+
e.bl_count[a]--, e.bl_count[a + 1] += 2, e.bl_count[g]--, _ -= 2;
|
|
6448
|
+
} while (0 < _);
|
|
6449
|
+
for (a = g; a !== 0; a--) for (r = e.bl_count[a]; r !== 0;) l < (i = e.heap[--n]) || (c[2 * i + 1] !== a && (e.opt_len += (a - c[2 * i + 1]) * c[2 * i], c[2 * i + 1] = a), r--);
|
|
6028
6450
|
}
|
|
6029
|
-
}(e, t),
|
|
6451
|
+
}(e, t), V(a, l, e.bl_count);
|
|
6030
6452
|
}
|
|
6031
|
-
function
|
|
6453
|
+
function ee(e, t, n) {
|
|
6032
6454
|
var r, i, a = -1, o = t[1], s = 0, c = 7, l = 4;
|
|
6033
|
-
for (o === 0 && (c = 138, l = 3), t[2 * (n + 1) + 1] = 65535, r = 0; r <= n; r++) i = o, o = t[2 * (r + 1) + 1], ++s < c && i === o || (s < l ? e.bl_tree[2 * i] += s : i === 0 ? s <= 10 ? e.bl_tree[2 *
|
|
6455
|
+
for (o === 0 && (c = 138, l = 3), t[2 * (n + 1) + 1] = 65535, r = 0; r <= n; r++) i = o, o = t[2 * (r + 1) + 1], ++s < c && i === o || (s < l ? e.bl_tree[2 * i] += s : i === 0 ? s <= 10 ? e.bl_tree[2 * y]++ : e.bl_tree[2 * b]++ : (i !== a && e.bl_tree[2 * i]++, e.bl_tree[2 * v]++), a = i, l = (s = 0) === o ? (c = 138, 3) : i === o ? (c = 6, 3) : (c = 7, 4));
|
|
6034
6456
|
}
|
|
6035
|
-
function
|
|
6457
|
+
function te(e, t, n) {
|
|
6036
6458
|
var r, i, a = -1, o = t[1], s = 0, c = 7, l = 4;
|
|
6037
6459
|
for (o === 0 && (c = 138, l = 3), r = 0; r <= n; r++) if (i = o, o = t[2 * (r + 1) + 1], !(++s < c && i === o)) {
|
|
6038
|
-
if (s < l) for (;
|
|
6039
|
-
else i === 0 ? s <= 10 ? (
|
|
6460
|
+
if (s < l) for (; z(e, i, e.bl_tree), --s != 0;);
|
|
6461
|
+
else i === 0 ? s <= 10 ? (z(e, y, e.bl_tree), R(e, s - 3, 3)) : (z(e, b, e.bl_tree), R(e, s - 11, 7)) : (i !== a && (z(e, i, e.bl_tree), s--), z(e, v, e.bl_tree), R(e, s - 3, 2));
|
|
6040
6462
|
a = i, l = (s = 0) === o ? (c = 138, 3) : i === o ? (c = 6, 3) : (c = 7, 4);
|
|
6041
6463
|
}
|
|
6042
6464
|
}
|
|
6043
|
-
o(
|
|
6044
|
-
var
|
|
6045
|
-
function
|
|
6046
|
-
|
|
6047
|
-
|
|
6465
|
+
o(N);
|
|
6466
|
+
var ne = !1;
|
|
6467
|
+
function re(e, t, n, i) {
|
|
6468
|
+
R(e, (s << 1) + (i ? 1 : 0), 3), function(e, t, n, i) {
|
|
6469
|
+
U(e), i && (L(e, n), L(e, ~n)), r.arraySet(e.pending_buf, e.window, t, n, e.pending), e.pending += n;
|
|
6048
6470
|
}(e, t, n, !0);
|
|
6049
6471
|
}
|
|
6050
6472
|
n._tr_init = function(e) {
|
|
6051
|
-
|
|
6473
|
+
ne ||= (function() {
|
|
6052
6474
|
var e, t, n, r, i, a = Array(m + 1);
|
|
6053
|
-
for (r = n = 0; r < c - 1; r++) for (
|
|
6054
|
-
for (
|
|
6055
|
-
for (i >>= 7; r < d; r++) for (
|
|
6475
|
+
for (r = n = 0; r < c - 1; r++) for (k[r] = n, e = 0; e < 1 << x[r]; e++) O[n++] = r;
|
|
6476
|
+
for (O[n - 1] = r, r = i = 0; r < 16; r++) for (N[r] = i, e = 0; e < 1 << S[r]; e++) D[i++] = r;
|
|
6477
|
+
for (i >>= 7; r < d; r++) for (N[r] = i << 7, e = 0; e < 1 << S[r] - 7; e++) D[256 + i++] = r;
|
|
6056
6478
|
for (t = 0; t <= m; t++) a[t] = 0;
|
|
6057
|
-
for (e = 0; e <= 143;)
|
|
6058
|
-
for (; e <= 255;)
|
|
6059
|
-
for (; e <= 279;)
|
|
6060
|
-
for (; e <= 287;)
|
|
6061
|
-
for (
|
|
6062
|
-
|
|
6063
|
-
}(), !0), e.l_desc = new
|
|
6064
|
-
}, n._tr_stored_block =
|
|
6479
|
+
for (e = 0; e <= 143;) T[2 * e + 1] = 8, e++, a[8]++;
|
|
6480
|
+
for (; e <= 255;) T[2 * e + 1] = 9, e++, a[9]++;
|
|
6481
|
+
for (; e <= 279;) T[2 * e + 1] = 7, e++, a[7]++;
|
|
6482
|
+
for (; e <= 287;) T[2 * e + 1] = 8, e++, a[8]++;
|
|
6483
|
+
for (V(T, u + 1, a), e = 0; e < d; e++) E[2 * e + 1] = 5, E[2 * e] = B(e, 5);
|
|
6484
|
+
A = new P(T, x, l + 1, u, m), j = new P(E, S, 0, d, m), M = new P([], C, 0, f, g);
|
|
6485
|
+
}(), !0), e.l_desc = new F(e.dyn_ltree, A), e.d_desc = new F(e.dyn_dtree, j), e.bl_desc = new F(e.bl_tree, M), e.bi_buf = 0, e.bi_valid = 0, H(e);
|
|
6486
|
+
}, n._tr_stored_block = re, n._tr_flush_block = function(e, t, n, r) {
|
|
6065
6487
|
var o, s, c = 0;
|
|
6066
6488
|
0 < e.level ? (e.strm.data_type === 2 && (e.strm.data_type = function(e) {
|
|
6067
6489
|
var t, n = 4093624447;
|
|
@@ -6069,20 +6491,20 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6069
6491
|
if (e.dyn_ltree[18] !== 0 || e.dyn_ltree[20] !== 0 || e.dyn_ltree[26] !== 0) return a;
|
|
6070
6492
|
for (t = 32; t < l; t++) if (e.dyn_ltree[2 * t] !== 0) return a;
|
|
6071
6493
|
return i;
|
|
6072
|
-
}(e)),
|
|
6494
|
+
}(e)), q(e, e.l_desc), q(e, e.d_desc), c = function(e) {
|
|
6073
6495
|
var t;
|
|
6074
|
-
for (
|
|
6496
|
+
for (ee(e, e.dyn_ltree, e.l_desc.max_code), ee(e, e.dyn_dtree, e.d_desc.max_code), q(e, e.bl_desc), t = f - 1; 3 <= t && e.bl_tree[2 * w[t] + 1] === 0; t--);
|
|
6075
6497
|
return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
|
|
6076
|
-
}(e), o = e.opt_len + 3 + 7 >>> 3, (s = e.static_len + 3 + 7 >>> 3) <= o && (o = s)) : o = s = n + 5, n + 4 <= o && t !== -1 ?
|
|
6498
|
+
}(e), o = e.opt_len + 3 + 7 >>> 3, (s = e.static_len + 3 + 7 >>> 3) <= o && (o = s)) : o = s = n + 5, n + 4 <= o && t !== -1 ? re(e, t, n, r) : e.strategy === 4 || s === o ? (R(e, 2 + (r ? 1 : 0), 3), K(e, T, E)) : (R(e, 4 + (r ? 1 : 0), 3), function(e, t, n, r) {
|
|
6077
6499
|
var i;
|
|
6078
|
-
for (
|
|
6079
|
-
|
|
6080
|
-
}(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, c + 1),
|
|
6500
|
+
for (R(e, t - 257, 5), R(e, n - 1, 5), R(e, r - 4, 4), i = 0; i < r; i++) R(e, e.bl_tree[2 * w[i] + 1], 3);
|
|
6501
|
+
te(e, e.dyn_ltree, t - 1), te(e, e.dyn_dtree, n - 1);
|
|
6502
|
+
}(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, c + 1), K(e, e.dyn_ltree, e.dyn_dtree)), H(e), r && U(e);
|
|
6081
6503
|
}, n._tr_tally = function(e, t, n) {
|
|
6082
|
-
return e.pending_buf[e.d_buf + 2 * e.last_lit] = t >>> 8 & 255, e.pending_buf[e.d_buf + 2 * e.last_lit + 1] = 255 & t, e.pending_buf[e.l_buf + e.last_lit] = 255 & n, e.last_lit++, t === 0 ? e.dyn_ltree[2 * n]++ : (e.matches++, t--, e.dyn_ltree[2 * (
|
|
6504
|
+
return e.pending_buf[e.d_buf + 2 * e.last_lit] = t >>> 8 & 255, e.pending_buf[e.d_buf + 2 * e.last_lit + 1] = 255 & t, e.pending_buf[e.l_buf + e.last_lit] = 255 & n, e.last_lit++, t === 0 ? e.dyn_ltree[2 * n]++ : (e.matches++, t--, e.dyn_ltree[2 * (O[n] + l + 1)]++, e.dyn_dtree[2 * I(t)]++), e.last_lit === e.lit_bufsize - 1;
|
|
6083
6505
|
}, n._tr_align = function(e) {
|
|
6084
|
-
|
|
6085
|
-
e.bi_valid === 16 ? (
|
|
6506
|
+
R(e, 2, 3), z(e, _, T), function(e) {
|
|
6507
|
+
e.bi_valid === 16 ? (L(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : 8 <= e.bi_valid && (e.pending_buf[e.pending++] = 255 & e.bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8);
|
|
6086
6508
|
}(e);
|
|
6087
6509
|
};
|
|
6088
6510
|
}, { "../utils/common": 41 }],
|
|
@@ -6171,19 +6593,19 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6171
6593
|
}, {}]
|
|
6172
6594
|
}, {}, [10])(10);
|
|
6173
6595
|
});
|
|
6174
|
-
})))(),
|
|
6596
|
+
})))(), Ar = new class extends xt {
|
|
6175
6597
|
name = "zip";
|
|
6176
6598
|
async installDownload(e) {
|
|
6177
6599
|
console.log("[loader zip] begin:", e);
|
|
6178
|
-
let t = await
|
|
6179
|
-
await
|
|
6180
|
-
let n = await (0,
|
|
6600
|
+
let t = await yt("__temp__");
|
|
6601
|
+
await Rt(t, { recursive: !0 }), await Ut(await Z(t, "temp.zip"), new Uint8Array(await e.arrayBuffer())), console.log("[loader zip] temp:", t);
|
|
6602
|
+
let n = await (0, kr.loadAsync)(e);
|
|
6181
6603
|
console.log(n.files);
|
|
6182
|
-
let r = JSON.parse(await n.file("manifest.json")?.async("string") ?? "{}"), i = await
|
|
6604
|
+
let r = JSON.parse(await n.file("manifest.json")?.async("string") ?? "{}"), i = await yt(r.name.id);
|
|
6183
6605
|
try {
|
|
6184
|
-
await
|
|
6606
|
+
await Ht(i, { recursive: !0 });
|
|
6185
6607
|
} catch {}
|
|
6186
|
-
await
|
|
6608
|
+
await Rt(i, { recursive: !0 });
|
|
6187
6609
|
let a = [];
|
|
6188
6610
|
n.forEach((e, t) => {
|
|
6189
6611
|
a.push({
|
|
@@ -6191,7 +6613,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6191
6613
|
file: t
|
|
6192
6614
|
});
|
|
6193
6615
|
});
|
|
6194
|
-
for (let { file: e, path: t } of a) e.dir ? await
|
|
6616
|
+
for (let { file: e, path: t } of a) e.dir ? await Rt(await Z(i, t), { recursive: !0 }) : await Ut(await Z(i, t), await e.async("uint8array"), { create: !0 });
|
|
6195
6617
|
return r;
|
|
6196
6618
|
}
|
|
6197
6619
|
canInstall(e) {
|
|
@@ -6199,16 +6621,16 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6199
6621
|
}
|
|
6200
6622
|
async load(e) {
|
|
6201
6623
|
if (!e.meta.entry) throw Error("not found entry");
|
|
6202
|
-
let t = await
|
|
6624
|
+
let t = await yt(e.pluginName);
|
|
6203
6625
|
console.log("[loader zip] baseDir:", t, e.meta.entry);
|
|
6204
6626
|
let n = document.createElement("script");
|
|
6205
6627
|
if (n.addEventListener("error", (e) => {
|
|
6206
6628
|
throw e;
|
|
6207
|
-
}), n.type = "module", n.async = !0, n.src = decodeURIComponent(
|
|
6629
|
+
}), n.type = "module", n.async = !0, n.src = decodeURIComponent(mt(await Z(t, e.meta.entry.jsPath), "local")), document.body.appendChild(n), !e.meta.entry?.cssPath) return;
|
|
6208
6630
|
let r = e.meta.entry.cssPath;
|
|
6209
6631
|
if (r == "auto") {
|
|
6210
6632
|
var i = "";
|
|
6211
|
-
let e = await
|
|
6633
|
+
let e = await zt(t);
|
|
6212
6634
|
for (let t of e) if (t.name.endsWith(".css")) {
|
|
6213
6635
|
var i = t.name;
|
|
6214
6636
|
break;
|
|
@@ -6217,19 +6639,19 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6217
6639
|
let a = document.createElement("link");
|
|
6218
6640
|
a.addEventListener("error", (e) => {
|
|
6219
6641
|
throw e;
|
|
6220
|
-
}), a.rel = "stylesheet", a.href = decodeURIComponent(
|
|
6642
|
+
}), a.rel = "stylesheet", a.href = decodeURIComponent(mt(await Z(t, i), "local")), document.head.appendChild(a);
|
|
6221
6643
|
}
|
|
6222
|
-
}(),
|
|
6223
|
-
"./booter/0_configSetter.ts":
|
|
6224
|
-
"./booter/10_apiTest.ts":
|
|
6225
|
-
"./booter/20_resourceTest.ts":
|
|
6226
|
-
"./booter/30_boot.ts":
|
|
6227
|
-
"./booter/40_auth.ts":
|
|
6228
|
-
"./booter/50_otherProcess.ts":
|
|
6229
|
-
}),
|
|
6230
|
-
const
|
|
6231
|
-
let { plugins: t, pluginSteps: n } =
|
|
6232
|
-
t.set(e.name,
|
|
6644
|
+
}(), jr = /* @__PURE__ */ Object.assign({
|
|
6645
|
+
"./booter/0_configSetter.ts": St,
|
|
6646
|
+
"./booter/10_apiTest.ts": Et,
|
|
6647
|
+
"./booter/20_resourceTest.ts": Dt,
|
|
6648
|
+
"./booter/30_boot.ts": Ot,
|
|
6649
|
+
"./booter/40_auth.ts": At,
|
|
6650
|
+
"./booter/50_otherProcess.ts": jt
|
|
6651
|
+
}), Mr = Te(Object.entries(jr), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]);
|
|
6652
|
+
const Nr = async (e) => {
|
|
6653
|
+
let { plugins: t, pluginSteps: n } = lt();
|
|
6654
|
+
t.set(e.name, y(e)), n[e.name] = {
|
|
6233
6655
|
steps: [],
|
|
6234
6656
|
now: {
|
|
6235
6657
|
stepsIndex: 0,
|
|
@@ -6238,13 +6660,13 @@ const bootPlugin = async (e) => {
|
|
|
6238
6660
|
};
|
|
6239
6661
|
try {
|
|
6240
6662
|
let t = {};
|
|
6241
|
-
for (let r of
|
|
6663
|
+
for (let r of Mr) {
|
|
6242
6664
|
let i = n[e.name].steps.length;
|
|
6243
6665
|
n[e.name].steps[i] = {
|
|
6244
6666
|
name: r.name,
|
|
6245
6667
|
description: ""
|
|
6246
6668
|
}, n[e.name].now.stepsIndex = i, n[e.name].now.status = "process", await r.call(e, (t) => {
|
|
6247
|
-
|
|
6669
|
+
oe(t) ? n[e.name].steps[i].description = t : (t.description && (n[e.name].steps[i].description = t.description), t.name && (n[e.name].steps[i].name = t.name));
|
|
6248
6670
|
}, t);
|
|
6249
6671
|
}
|
|
6250
6672
|
n[e.name].now.stepsIndex++;
|
|
@@ -6253,30 +6675,30 @@ const bootPlugin = async (e) => {
|
|
|
6253
6675
|
}
|
|
6254
6676
|
console.log(`[plugin usePluginStore.$loadPlugin] plugin "${e.name}" load done`);
|
|
6255
6677
|
};
|
|
6256
|
-
var
|
|
6257
|
-
"./installer/10_normalUrl.ts":
|
|
6258
|
-
"./installer/20_local.ts":
|
|
6259
|
-
"./installer/30_dev.ts":
|
|
6260
|
-
"./installer/40_github.ts":
|
|
6261
|
-
}),
|
|
6262
|
-
const
|
|
6678
|
+
var Pr = /* @__PURE__ */ Object.assign({
|
|
6679
|
+
"./installer/10_normalUrl.ts": Mt,
|
|
6680
|
+
"./installer/20_local.ts": Gt,
|
|
6681
|
+
"./installer/30_dev.ts": Kt,
|
|
6682
|
+
"./installer/40_github.ts": Er
|
|
6683
|
+
}), Fr = Te(Object.entries(Pr), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]).reverse();
|
|
6684
|
+
const Ir = () => i(Y, "pluginInstallSourceOverrides", []), Lr = (e, t, n) => e.createLoading("依赖安装/检查", async (e) => {
|
|
6263
6685
|
e.retryable = !0;
|
|
6264
|
-
let i = 0, a = n ?? new Set((await
|
|
6265
|
-
for (let { id: n, download: r } of t.require) a.has(n) || !r || (console.log(`从 ${t.name.id} 发现未安装依赖: ${n} ->`, r), e.description = `安装: ${n}`, await
|
|
6686
|
+
let i = 0, a = n ?? new Set((await r.value.selectFrom("plugin").select("pluginName").execute()).map((e) => e.pluginName)), o = Ir();
|
|
6687
|
+
for (let { id: n, download: r } of t.require) a.has(n) || !r || (console.log(`从 ${t.name.id} 发现未安装依赖: ${n} ->`, r), e.description = `安装: ${n}`, await Rr(o.value.find((e) => e.id == n && e.enabled)?.install ?? r), i++);
|
|
6266
6688
|
e.description = `安装完成,共${i}个`;
|
|
6267
|
-
}),
|
|
6689
|
+
}), Rr = (e, t) => H(`下载插件-${e}`, async (n) => {
|
|
6268
6690
|
let [i, a] = await n.createLoading("下载", async (t) => {
|
|
6269
6691
|
t.retryable = !0;
|
|
6270
|
-
let n =
|
|
6692
|
+
let n = Fr.filter((t) => t.isMatched(e)).at(0);
|
|
6271
6693
|
if (!n) throw Error("没有符合的下载器:" + e);
|
|
6272
6694
|
return t.description = n.name, [await n.install(e), n];
|
|
6273
6695
|
}), o = await n.createLoading("安装插件", async (t) => {
|
|
6274
6696
|
t.retryable = !0;
|
|
6275
|
-
let n =
|
|
6697
|
+
let n = Hr.filter((e) => e.canInstall(i)).at(-1);
|
|
6276
6698
|
if (!n) throw Error("没有符合的安装器:" + e);
|
|
6277
6699
|
t.description = n.name;
|
|
6278
6700
|
let o = await n.installDownload(i);
|
|
6279
|
-
return t.description = "写入数据库", await
|
|
6701
|
+
return t.description = "写入数据库", await r.value.replaceInto("plugin").values({
|
|
6280
6702
|
displayName: o.name.display,
|
|
6281
6703
|
enable: !0,
|
|
6282
6704
|
installerName: a.name,
|
|
@@ -6286,15 +6708,15 @@ const usePluginConfig = () => useNativeStore(coreName, "pluginInstallSourceOverr
|
|
|
6286
6708
|
pluginName: o.name.id
|
|
6287
6709
|
}).execute(), o;
|
|
6288
6710
|
});
|
|
6289
|
-
console.log(`安装插件成功: ${o.name.id} ->`, o), await
|
|
6290
|
-
}),
|
|
6711
|
+
console.log(`安装插件成功: ${o.name.id} ->`, o), await Lr(n, o, t);
|
|
6712
|
+
}), zr = (e, t) => H(`安装插件-${e.name}`, async (n) => {
|
|
6291
6713
|
let i = await n.createLoading("安装插件", async (t) => {
|
|
6292
6714
|
t.retryable = !0;
|
|
6293
|
-
let n =
|
|
6715
|
+
let n = Hr.filter((t) => t.canInstall(e)).at(-1);
|
|
6294
6716
|
if (!n) throw Error("没有符合的安装器");
|
|
6295
6717
|
t.description = n.name;
|
|
6296
6718
|
let i = await n.installDownload(e);
|
|
6297
|
-
return t.description = "写入数据库", await
|
|
6719
|
+
return t.description = "写入数据库", await r.value.replaceInto("plugin").values({
|
|
6298
6720
|
displayName: i.name.display,
|
|
6299
6721
|
enable: !0,
|
|
6300
6722
|
installerName: "",
|
|
@@ -6304,31 +6726,31 @@ const usePluginConfig = () => useNativeStore(coreName, "pluginInstallSourceOverr
|
|
|
6304
6726
|
pluginName: i.name.id
|
|
6305
6727
|
}).execute(), i;
|
|
6306
6728
|
});
|
|
6307
|
-
console.log(`安装插件成功: ${i.name.id} ->`, i), await
|
|
6308
|
-
}),
|
|
6729
|
+
console.log(`安装插件成功: ${i.name.id} ->`, i), await Lr(n, i, t);
|
|
6730
|
+
}), Br = async (e, t) => H(`更新插件-${e.pluginName}`, async (n) => {
|
|
6309
6731
|
let i = await n.createLoading("更新", async (t) => {
|
|
6310
6732
|
t.retryable = !0;
|
|
6311
|
-
let n =
|
|
6733
|
+
let n = Fr.find((t) => t.name == e.installerName);
|
|
6312
6734
|
if (!n) throw Error("没有符合的下载器");
|
|
6313
6735
|
return t.description = n.name, await n.update(e);
|
|
6314
6736
|
}), a = await n.createLoading("安装插件", async (t) => {
|
|
6315
6737
|
t.retryable = !0;
|
|
6316
|
-
let n =
|
|
6738
|
+
let n = Hr.find((t) => t.name == e.loaderName);
|
|
6317
6739
|
if (!n) throw Error("没有符合的安装器");
|
|
6318
6740
|
return await n.installDownload(i);
|
|
6319
6741
|
});
|
|
6320
|
-
await
|
|
6742
|
+
await r.value.replaceInto("plugin").values({
|
|
6321
6743
|
...e,
|
|
6322
6744
|
meta: JSON.stringify(a)
|
|
6323
|
-
}).execute(), await
|
|
6745
|
+
}).execute(), await Lr(n, a, t);
|
|
6324
6746
|
});
|
|
6325
|
-
var
|
|
6326
|
-
"./loader/1_userscript.ts":
|
|
6327
|
-
"./loader/2_zip.ts":
|
|
6328
|
-
}),
|
|
6329
|
-
const
|
|
6747
|
+
var Vr = /* @__PURE__ */ Object.assign({
|
|
6748
|
+
"./loader/1_userscript.ts": Or,
|
|
6749
|
+
"./loader/2_zip.ts": Ar
|
|
6750
|
+
}), Hr = Te(Object.entries(Vr), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]), Ur = {}, Wr = (e) => Ur[e] ??= new le();
|
|
6751
|
+
const Gr = async (e) => {
|
|
6330
6752
|
console.log(`[plugin bootPlugin] booting name "${e.pluginName}"`);
|
|
6331
|
-
let t =
|
|
6753
|
+
let t = Wr(e.pluginName), n = lt();
|
|
6332
6754
|
n.pluginSteps[e.pluginName] = {
|
|
6333
6755
|
now: {
|
|
6334
6756
|
status: "wait",
|
|
@@ -6340,39 +6762,39 @@ const loadPlugin = async (e) => {
|
|
|
6340
6762
|
}]
|
|
6341
6763
|
};
|
|
6342
6764
|
try {
|
|
6343
|
-
await t.acquire(), await
|
|
6765
|
+
await t.acquire(), await Hr.find((t) => t.name == e.loaderName).load(e), await t.acquire();
|
|
6344
6766
|
} catch (t) {
|
|
6345
6767
|
throw n.pluginSteps[e.pluginName].now.status = "error", n.pluginSteps[e.pluginName].now.error = t, t;
|
|
6346
6768
|
}
|
|
6347
6769
|
console.log(`[plugin bootPlugin] boot name done "${e.pluginName}"`);
|
|
6348
6770
|
};
|
|
6349
|
-
|
|
6771
|
+
Me.on("definedPlugin", async (e) => {
|
|
6350
6772
|
console.log("[plugin addPlugin] new plugin defined", e.name, e);
|
|
6351
|
-
let t =
|
|
6352
|
-
await
|
|
6353
|
-
}), window.$api.loaders =
|
|
6354
|
-
const
|
|
6355
|
-
await
|
|
6356
|
-
let e = new Set([
|
|
6773
|
+
let t = Wr(e.name);
|
|
6774
|
+
await Nr(e), console.log("[plugin addPlugin] done", e.name), t.release();
|
|
6775
|
+
}), window.$api.loaders = Hr, window.$api.installers = Fr;
|
|
6776
|
+
const Kr = F.fromAsyncFunction(async () => {
|
|
6777
|
+
await ut();
|
|
6778
|
+
let e = new Set([Y]), n = await t.getByEnabled(!0), r = [];
|
|
6357
6779
|
for (;;) {
|
|
6358
6780
|
let t = n.filter((t) => t.meta.require.every((t) => e.has(t.id)));
|
|
6359
|
-
r.push(t),
|
|
6781
|
+
r.push(t), ee(n, (e) => t.includes(e));
|
|
6360
6782
|
for (let { pluginName: n } of t) e.add(n);
|
|
6361
|
-
if (
|
|
6783
|
+
if (Ae(t)) break;
|
|
6362
6784
|
}
|
|
6363
|
-
if (!
|
|
6364
|
-
for (let e of r) await Promise.all(e.map((e) =>
|
|
6785
|
+
if (!Ae(n)) throw Error(`插件循环引用: ${n.map((e) => e.pluginName).join(", ")}`);
|
|
6786
|
+
for (let e of r) await Promise.all(e.map((e) => Gr(e)));
|
|
6365
6787
|
console.log("[plugin bootPlugin] all load done");
|
|
6366
6788
|
});
|
|
6367
|
-
var
|
|
6789
|
+
var qr = /* @__PURE__ */ f({
|
|
6368
6790
|
__name: "Inject",
|
|
6369
6791
|
props: {
|
|
6370
6792
|
key: {},
|
|
6371
6793
|
args: {}
|
|
6372
6794
|
},
|
|
6373
6795
|
setup(e) {
|
|
6374
|
-
let t = e, n =
|
|
6375
|
-
return (t, r) => (
|
|
6796
|
+
let t = e, n = s(() => Array.from(J.envExtends.values()).filter((e) => e.key == t.key));
|
|
6797
|
+
return (t, r) => (S(!0), u(o, null, T(n.value, (t) => (S(), c(A(z), {
|
|
6376
6798
|
promise: async () => {
|
|
6377
6799
|
try {
|
|
6378
6800
|
return await t.condition(e.args);
|
|
@@ -6382,21 +6804,21 @@ var Inject_default = /* @__PURE__ */ defineComponent({
|
|
|
6382
6804
|
},
|
|
6383
6805
|
"auto-load": ""
|
|
6384
6806
|
}, {
|
|
6385
|
-
default:
|
|
6807
|
+
default: N(({ result: n }) => [n ? (S(), c(E(t.component), b({
|
|
6386
6808
|
key: 0,
|
|
6387
6809
|
ref_for: !0
|
|
6388
|
-
}, e.args), null, 16)) :
|
|
6810
|
+
}, e.args), null, 16)) : l("", !0)]),
|
|
6389
6811
|
_: 2
|
|
6390
6812
|
}, 1032, ["promise"]))), 256));
|
|
6391
6813
|
}
|
|
6392
6814
|
});
|
|
6393
|
-
const
|
|
6394
|
-
|
|
6815
|
+
const Jr = (e, t, n) => {
|
|
6816
|
+
J.envExtends.add({
|
|
6395
6817
|
key: e,
|
|
6396
6818
|
component: t,
|
|
6397
6819
|
condition: n ?? (() => !0)
|
|
6398
6820
|
});
|
|
6399
6821
|
};
|
|
6400
|
-
export { ConfigPointer, Global,
|
|
6822
|
+
export { et as ConfigPointer, J as Global, qr as Inject, Jr as addInjection, tt as appConfig, Nr as bootPlugin, rt as declareDepType, Pe as decodePluginMeta, Ne as definePlugin, Lr as installDepends, zr as installFilePlugin, Rr as installPlugin, Kr as loadAllPlugins, Gr as loadPlugin, Me as pluginEmitter, at as pluginExposes, Fr as pluginInstallers, Hr as pluginLoaders, it as require, Br as updatePlugin, nt as useConfig, Ir as usePluginConfig, lt as usePluginStore };
|
|
6401
6823
|
|
|
6402
6824
|
//# sourceMappingURL=index.js.map
|