@delta-comic/plugin 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1108 -1886
- package/dist/index.js.map +1 -1
- package/dist/pack.tgz +0 -0
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -43,7 +43,7 @@ function ee(e, t = 1) {
|
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/array/remove.mjs
|
|
46
|
-
function
|
|
46
|
+
function W(e, t) {
|
|
47
47
|
let n = e.slice(), r = [], i = 0;
|
|
48
48
|
for (let a = 0; a < e.length; a++) {
|
|
49
49
|
if (t(e[a], a, n)) {
|
|
@@ -60,27 +60,27 @@ function te(e, t) {
|
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
|
|
63
|
-
function
|
|
63
|
+
function te(e) {
|
|
64
64
|
return typeof e == "symbol" || e instanceof Symbol;
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
68
|
-
function
|
|
68
|
+
function G(e) {
|
|
69
69
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
73
|
-
function
|
|
73
|
+
function ne(e) {
|
|
74
74
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
75
75
|
}
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.mjs
|
|
78
|
-
function
|
|
78
|
+
function re(e, t) {
|
|
79
79
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
80
80
|
}
|
|
81
81
|
//#endregion
|
|
82
82
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/promise/mutex.mjs
|
|
83
|
-
var
|
|
83
|
+
var ie = class {
|
|
84
84
|
semaphore = new U(1);
|
|
85
85
|
get isLocked() {
|
|
86
86
|
return this.semaphore.available === 0;
|
|
@@ -94,24 +94,24 @@ var oe = class {
|
|
|
94
94
|
};
|
|
95
95
|
//#endregion
|
|
96
96
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
|
|
97
|
-
function
|
|
97
|
+
function ae(e) {
|
|
98
98
|
return typeof e == "string" || typeof e == "symbol" ? e : Object.is(e?.valueOf?.(), -0) ? "-0" : String(e);
|
|
99
99
|
}
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/util/toString.mjs
|
|
102
|
-
function
|
|
102
|
+
function oe(e) {
|
|
103
103
|
if (e == null) return "";
|
|
104
104
|
if (typeof e == "string") return e;
|
|
105
|
-
if (Array.isArray(e)) return e.map(
|
|
105
|
+
if (Array.isArray(e)) return e.map(oe).join(",");
|
|
106
106
|
let t = String(e);
|
|
107
107
|
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
|
|
108
108
|
}
|
|
109
109
|
//#endregion
|
|
110
110
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/util/toPath.mjs
|
|
111
|
-
function
|
|
112
|
-
if (Array.isArray(e)) return e.map(
|
|
111
|
+
function se(e) {
|
|
112
|
+
if (Array.isArray(e)) return e.map(ae);
|
|
113
113
|
if (typeof e == "symbol") return [e];
|
|
114
|
-
e =
|
|
114
|
+
e = oe(e);
|
|
115
115
|
let t = [], n = e.length;
|
|
116
116
|
if (n === 0) return t;
|
|
117
117
|
let r = 0, i = "", a = "", o = !1;
|
|
@@ -123,37 +123,37 @@ function le(e) {
|
|
|
123
123
|
}
|
|
124
124
|
//#endregion
|
|
125
125
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs
|
|
126
|
-
function
|
|
126
|
+
function ce(e) {
|
|
127
127
|
return e !== null && (typeof e == "object" || typeof e == "function");
|
|
128
128
|
}
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
|
|
131
|
-
var
|
|
132
|
-
function
|
|
131
|
+
var le = /^(?:0|[1-9]\d*)$/;
|
|
132
|
+
function ue(e, t = 2 ** 53 - 1) {
|
|
133
133
|
switch (typeof e) {
|
|
134
134
|
case "number": return Number.isInteger(e) && e >= 0 && e < t;
|
|
135
135
|
case "symbol": return !1;
|
|
136
|
-
case "string": return
|
|
136
|
+
case "string": return le.test(e);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
//#endregion
|
|
140
140
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
|
|
141
|
-
function
|
|
142
|
-
return typeof e == "object" && !!e &&
|
|
141
|
+
function de(e) {
|
|
142
|
+
return typeof e == "object" && !!e && ne(e) === "[object Arguments]";
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/isIterateeCall.mjs
|
|
146
|
-
function
|
|
147
|
-
return
|
|
146
|
+
function fe(e, t, n) {
|
|
147
|
+
return ce(n) && (typeof t == "number" && f(n) && ue(t) && t < n.length || typeof t == "string" && t in n) ? re(n[t], e) : !1;
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/compareValues.mjs
|
|
151
|
-
function
|
|
151
|
+
function pe(e) {
|
|
152
152
|
return typeof e == "symbol" ? 1 : e === null ? 2 : e === void 0 ? 3 : e === e ? 0 : 4;
|
|
153
153
|
}
|
|
154
|
-
var
|
|
154
|
+
var me = (e, t, n) => {
|
|
155
155
|
if (e !== t) {
|
|
156
|
-
let r =
|
|
156
|
+
let r = pe(e), i = pe(t);
|
|
157
157
|
if (r === i && r === 0) {
|
|
158
158
|
if (e < t) return n === "desc" ? 1 : -1;
|
|
159
159
|
if (e > t) return n === "desc" ? -1 : 1;
|
|
@@ -161,29 +161,29 @@ var ge = (e, t, n) => {
|
|
|
161
161
|
return n === "desc" ? i - r : r - i;
|
|
162
162
|
}
|
|
163
163
|
return 0;
|
|
164
|
-
},
|
|
165
|
-
function
|
|
166
|
-
return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null ||
|
|
164
|
+
}, he = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ge = /^\w*$/;
|
|
165
|
+
function _e(e, t) {
|
|
166
|
+
return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null || te(e) ? !0 : typeof e == "string" && (ge.test(e) || !he.test(e)) || t != null && Object.hasOwn(t, e);
|
|
167
167
|
}
|
|
168
168
|
//#endregion
|
|
169
169
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/array/orderBy.mjs
|
|
170
|
-
function
|
|
170
|
+
function ve(e, t, n, r) {
|
|
171
171
|
if (e == null) return [];
|
|
172
172
|
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));
|
|
173
173
|
let i = (e, t) => {
|
|
174
174
|
let n = e;
|
|
175
175
|
for (let e = 0; e < t.length && n != null; ++e) n = n[t[e]];
|
|
176
176
|
return n;
|
|
177
|
-
}, 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) ||
|
|
177
|
+
}, 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) || _e(e) ? e : {
|
|
178
178
|
key: e,
|
|
179
|
-
path:
|
|
179
|
+
path: se(e)
|
|
180
180
|
}));
|
|
181
181
|
return e.map((e) => ({
|
|
182
182
|
original: e,
|
|
183
183
|
criteria: o.map((t) => a(t, e))
|
|
184
184
|
})).slice().sort((e, t) => {
|
|
185
185
|
for (let r = 0; r < o.length; r++) {
|
|
186
|
-
let i =
|
|
186
|
+
let i = me(e.criteria[r], t.criteria[r], n[r]);
|
|
187
187
|
if (i !== 0) return i;
|
|
188
188
|
}
|
|
189
189
|
return 0;
|
|
@@ -191,34 +191,34 @@ function be(e, t, n, r) {
|
|
|
191
191
|
}
|
|
192
192
|
//#endregion
|
|
193
193
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/array/sortBy.mjs
|
|
194
|
-
function
|
|
194
|
+
function ye(e, ...t) {
|
|
195
195
|
let n = t.length;
|
|
196
|
-
return n > 1 &&
|
|
196
|
+
return n > 1 && fe(e, t[0], t[1]) ? t = [] : n > 2 && fe(t[0], t[1], t[2]) && (t = [t[0]]), ve(e, ee(t), ["asc"]);
|
|
197
197
|
}
|
|
198
198
|
//#endregion
|
|
199
199
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/isPrototype.mjs
|
|
200
|
-
function
|
|
200
|
+
function be(e) {
|
|
201
201
|
let t = e?.constructor;
|
|
202
202
|
return e === (typeof t == "function" ? t.prototype : Object.prototype);
|
|
203
203
|
}
|
|
204
204
|
//#endregion
|
|
205
205
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
|
|
206
|
-
function
|
|
207
|
-
return
|
|
206
|
+
function xe(e) {
|
|
207
|
+
return G(e);
|
|
208
208
|
}
|
|
209
209
|
//#endregion
|
|
210
210
|
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isEmpty.mjs
|
|
211
|
-
function
|
|
211
|
+
function Se(e) {
|
|
212
212
|
if (e == null) return !0;
|
|
213
|
-
if (f(e)) return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !
|
|
213
|
+
if (f(e)) return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !xe(e) && !de(e) ? !1 : e.length === 0;
|
|
214
214
|
if (typeof e == "object") {
|
|
215
215
|
if (e instanceof Map || e instanceof Set) return e.size === 0;
|
|
216
216
|
let t = Object.keys(e);
|
|
217
|
-
return
|
|
217
|
+
return be(e) ? t.filter((e) => e !== "constructor").length === 0 : t.length === 0;
|
|
218
218
|
}
|
|
219
219
|
return !0;
|
|
220
220
|
}
|
|
221
|
-
var
|
|
221
|
+
var K = y(new class {
|
|
222
222
|
share = N(I.createReactive());
|
|
223
223
|
shareToken = N(I.createReactive());
|
|
224
224
|
userActions = N(I.createReactive());
|
|
@@ -258,12 +258,12 @@ var W = y(new class {
|
|
|
258
258
|
}(), "core/global");
|
|
259
259
|
//#endregion
|
|
260
260
|
//#region ../../node_modules/.pnpm/@tauri-apps+api@2.10.1/node_modules/@tauri-apps/api/external/tslib/tslib.es6.js
|
|
261
|
-
function
|
|
261
|
+
function Ce(e, t, n, r) {
|
|
262
262
|
if (n === "a" && !r) throw TypeError("Private accessor was defined without a getter");
|
|
263
263
|
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");
|
|
264
264
|
return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function we(e, t, n, r, i) {
|
|
267
267
|
if (r === "m") throw TypeError("Private method is not writable");
|
|
268
268
|
if (r === "a" && !i) throw TypeError("Private accessor was defined without a setter");
|
|
269
269
|
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");
|
|
@@ -271,40 +271,40 @@ function Ee(e, t, n, r, i) {
|
|
|
271
271
|
}
|
|
272
272
|
//#endregion
|
|
273
273
|
//#region ../../node_modules/.pnpm/@tauri-apps+api@2.10.1/node_modules/@tauri-apps/api/core.js
|
|
274
|
-
var
|
|
275
|
-
async function
|
|
274
|
+
var Te;
|
|
275
|
+
async function q(e, t = {}, n) {
|
|
276
276
|
return window.__TAURI_INTERNALS__.invoke(e, t, n);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Ee(e, t = "asset") {
|
|
279
279
|
return window.__TAURI_INTERNALS__.convertFileSrc(e, t);
|
|
280
280
|
}
|
|
281
|
-
var
|
|
281
|
+
var De = class {
|
|
282
282
|
get rid() {
|
|
283
|
-
return
|
|
283
|
+
return Ce(this, Te, "f");
|
|
284
284
|
}
|
|
285
285
|
constructor(e) {
|
|
286
|
-
|
|
286
|
+
Te.set(this, void 0), we(this, Te, e, "f");
|
|
287
287
|
}
|
|
288
288
|
async close() {
|
|
289
|
-
return
|
|
289
|
+
return q("plugin:resources|close", { rid: this.rid });
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
|
-
|
|
292
|
+
Te = /* @__PURE__ */ new WeakMap();
|
|
293
293
|
//#endregion
|
|
294
294
|
//#region ../../node_modules/.pnpm/@tauri-apps+api@2.10.1/node_modules/@tauri-apps/api/path.js
|
|
295
|
-
var
|
|
295
|
+
var Oe;
|
|
296
296
|
(function(e) {
|
|
297
297
|
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";
|
|
298
|
-
})(
|
|
299
|
-
async function
|
|
300
|
-
return
|
|
298
|
+
})(Oe ||= {});
|
|
299
|
+
async function ke() {
|
|
300
|
+
return q("plugin:path|resolve_directory", { directory: Oe.AppLocalData });
|
|
301
301
|
}
|
|
302
|
-
async function
|
|
303
|
-
return
|
|
302
|
+
async function J(...e) {
|
|
303
|
+
return q("plugin:path|join", { paths: e });
|
|
304
304
|
}
|
|
305
305
|
//#endregion
|
|
306
306
|
//#region lib/driver/init/utils.ts
|
|
307
|
-
var
|
|
307
|
+
var Ae = await ke(), je = async (e) => await J(Ae, "plugin", e), Me = class {}, Ne = class {}, Y = class {}, Pe = new class extends Y {
|
|
308
308
|
name = "预设值";
|
|
309
309
|
async call(e, t) {
|
|
310
310
|
console.log("[PluginBooter->_ConfigSetter] new plugin defining...", e), t("预设值设定中");
|
|
@@ -315,31 +315,31 @@ var Ne = await je(), Pe = async (e) => await Me(Ne, "plugin", e), Fe = class {},
|
|
|
315
315
|
if (i.process) for (let [e, t] of Object.entries(i.process)) L.resource.Resource.processInstances.set([n, e], t);
|
|
316
316
|
}
|
|
317
317
|
if (a) {
|
|
318
|
-
if (a.categories) for (let e of a.categories)
|
|
319
|
-
if (a.tabbar) for (let e of a.tabbar)
|
|
318
|
+
if (a.categories) for (let e of a.categories) K.addCategories(n, e);
|
|
319
|
+
if (a.tabbar) for (let e of a.tabbar) K.addTabbar(n, e);
|
|
320
320
|
if (a.hotPage) {
|
|
321
|
-
for (let e of a.hotPage.mainListCard ?? [])
|
|
322
|
-
for (let e of a.hotPage.levelBoard ?? [])
|
|
323
|
-
for (let e of a.hotPage.topButton ?? [])
|
|
321
|
+
for (let e of a.hotPage.mainListCard ?? []) K.addMainList(n, e);
|
|
322
|
+
for (let e of a.hotPage.levelBoard ?? []) K.addLevelboard(n, e);
|
|
323
|
+
for (let e of a.hotPage.topButton ?? []) K.addTopButton(n, e);
|
|
324
324
|
}
|
|
325
|
-
if (a.barcode) for (let e of a.barcode ?? [])
|
|
325
|
+
if (a.barcode) for (let e of a.barcode ?? []) K.addBarcode(n, e);
|
|
326
326
|
}
|
|
327
327
|
if (o) {
|
|
328
|
-
if (o.card && L.user.User.userCards.set(n, o.card), o.edit && L.user.User.userEditorBase.set(n, o.edit), o.userActions) for (let [e, t] of Object.entries(o.userActions))
|
|
328
|
+
if (o.card && L.user.User.userCards.set(n, o.card), o.edit && L.user.User.userEditorBase.set(n, o.edit), o.userActions) for (let [e, t] of Object.entries(o.userActions)) K.userActions.set([n, e], t);
|
|
329
329
|
if (o.authorIcon) for (let [e, t] of Object.entries(o.authorIcon)) L.item.Item.authorIcon.set([n, e], t);
|
|
330
330
|
}
|
|
331
|
-
if (s) for (let [e, t] of Object.entries(s))
|
|
331
|
+
if (s) for (let [e, t] of Object.entries(s)) K.subscribes.set([n, e], t);
|
|
332
332
|
if (e.config) for (let t of e.config) c().$resignerConfig(t);
|
|
333
333
|
if (l) {
|
|
334
|
-
for (let e of l.initiative ?? [])
|
|
335
|
-
for (let e of l.tokenListen ?? [])
|
|
334
|
+
for (let e of l.initiative ?? []) K.share.set([n, e.key], e);
|
|
335
|
+
for (let e of l.tokenListen ?? []) K.shareToken.set([n, e.key], e);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
}(),
|
|
338
|
+
}(), Fe = async (e) => await Le(await e.forks(), e.test), Ie = (e) => {
|
|
339
339
|
let t = e.urls;
|
|
340
|
-
return
|
|
341
|
-
},
|
|
342
|
-
if (
|
|
340
|
+
return Le(t, e.test);
|
|
341
|
+
}, Le = async (e, t) => {
|
|
342
|
+
if (Se(e)) throw Error("[plugin test] no fork found");
|
|
343
343
|
let n = [], r = new AbortController();
|
|
344
344
|
try {
|
|
345
345
|
await Promise.all(e.map(async (e) => {
|
|
@@ -357,20 +357,20 @@ var Ne = await je(), Pe = async (e) => await Me(Ne, "plugin", e), Fe = class {},
|
|
|
357
357
|
} catch (e) {
|
|
358
358
|
console.log("[plugin test] fetch test aborted", e);
|
|
359
359
|
}
|
|
360
|
-
let i =
|
|
360
|
+
let i = ye(n.filter((e) => e[1] != 0), (e) => e[1])[0];
|
|
361
361
|
return console.log("[plugin test] fetch test done", i), i || ["", !1];
|
|
362
|
-
},
|
|
362
|
+
}, Re = new class extends Y {
|
|
363
363
|
name = "接口测试";
|
|
364
364
|
async call(e, t, n) {
|
|
365
365
|
if (!e.api) return;
|
|
366
366
|
t("开始并发测试");
|
|
367
|
-
let r = Object.keys(e.api), i = await Promise.all(r.map((t) =>
|
|
367
|
+
let r = Object.keys(e.api), i = await Promise.all(r.map((t) => Fe(e.api[t]))), a = [], o = {};
|
|
368
368
|
if (r.forEach((e, t) => {
|
|
369
369
|
o[e] = i[t][0], a.push([e, i[t][1]]);
|
|
370
370
|
}), n.api = o, Object.values(o).some((e) => e == 0)) throw t("测试完成, 无法连接至服务器"), Error("can not connect to server");
|
|
371
371
|
t(`测试完成, \n${a.map((e) => `${e[0]}->${e[1]}ms`).join("\n")}`);
|
|
372
372
|
}
|
|
373
|
-
}(),
|
|
373
|
+
}(), ze = new class extends Y {
|
|
374
374
|
name = "资源链接测试";
|
|
375
375
|
async call(e, t) {
|
|
376
376
|
if (!e.resource?.types?.length) return;
|
|
@@ -378,20 +378,20 @@ var Ne = await je(), Pe = async (e) => await Me(Ne, "plugin", e), Fe = class {},
|
|
|
378
378
|
let n = e.resource.types.map((e) => ({
|
|
379
379
|
type: e.type,
|
|
380
380
|
val: e
|
|
381
|
-
})), r = await Promise.all(n.map((e) =>
|
|
381
|
+
})), r = await Promise.all(n.map((e) => Ie(e.val))), i = [];
|
|
382
382
|
if (n.forEach((t, n) => {
|
|
383
383
|
r[n][1] && L.resource.Resource.precedenceFork.set([e.name, t.type], r[n][0]), i.push([t, r[n][1]]);
|
|
384
384
|
}), r.some((e) => e[1] == 0)) throw t("测试完成, 无法连接至服务器"), Error("[plugin test] can not connect to server");
|
|
385
385
|
t(`测试完成, \n${i.map((e) => `${e[0].type}->${e[1]}ms`).join("\n")}`);
|
|
386
386
|
}
|
|
387
|
-
}(),
|
|
387
|
+
}(), Be = new class extends Y {
|
|
388
388
|
name = "自定义初始化";
|
|
389
389
|
async call(e, n, r) {
|
|
390
390
|
if (!e.onBooted) return;
|
|
391
391
|
let i = await e.onBooted({ api: r.api });
|
|
392
392
|
i && t.set(Symbol.for(`expose:${e.name}`), i);
|
|
393
393
|
}
|
|
394
|
-
}(),
|
|
394
|
+
}(), Ve = new ie(), He = new class extends Y {
|
|
395
395
|
name = "登录";
|
|
396
396
|
async call(e, t) {
|
|
397
397
|
if (!e.auth) return;
|
|
@@ -400,7 +400,7 @@ var Ne = await je(), Pe = async (e) => await Me(Ne, "plugin", e), Fe = class {},
|
|
|
400
400
|
let r = n.$getPluginDisplayName(e.name);
|
|
401
401
|
t("判定鉴权状态中...");
|
|
402
402
|
let i = await e.auth.passSelect(), a = Promise.withResolvers();
|
|
403
|
-
console.log(`[plugin auth] ${r}, isPass: ${i}`), await
|
|
403
|
+
console.log(`[plugin auth] ${r}, isPass: ${i}`), await Ve.acquire(), t("等待其他插件鉴权结束..."), i ? (t("跳过鉴权方式选择"), a.resolve(i)) : (t("选择鉴权方式"), B({
|
|
404
404
|
type: "default",
|
|
405
405
|
positiveText: "登录",
|
|
406
406
|
negativeText: "注册",
|
|
@@ -420,7 +420,7 @@ var Ne = await je(), Pe = async (e) => await Me(Ne, "plugin", e), Fe = class {},
|
|
|
420
420
|
let s = {
|
|
421
421
|
async form(e) {
|
|
422
422
|
let t = H(e);
|
|
423
|
-
return
|
|
423
|
+
return K.globalNodes.push(D(T(() => {
|
|
424
424
|
let e = A(!0);
|
|
425
425
|
return t.data.then(() => e.value = !1), () => E(z, {
|
|
426
426
|
show: e.value,
|
|
@@ -435,12 +435,12 @@ var Ne = await je(), Pe = async (e) => await Me(Ne, "plugin", e), Fe = class {},
|
|
|
435
435
|
return window;
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
|
-
o == "logIn" ? await e.auth.logIn(s) : o == "signUp" && await e.auth.signUp(s),
|
|
438
|
+
o == "logIn" ? await e.auth.logIn(s) : o == "signUp" && await e.auth.signUp(s), Ve.release(), t("鉴权成功");
|
|
439
439
|
} catch (e) {
|
|
440
440
|
throw t(`登录失败: ${e}`), e;
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
}(),
|
|
443
|
+
}(), Ue = new class extends Y {
|
|
444
444
|
name = "其他步骤";
|
|
445
445
|
async call(e, t) {
|
|
446
446
|
if (e.otherProgress?.length) for (let n of e.otherProgress) t({
|
|
@@ -453,17 +453,17 @@ var Ne = await je(), Pe = async (e) => await Me(Ne, "plugin", e), Fe = class {},
|
|
|
453
453
|
});
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
|
-
}(),
|
|
457
|
-
bootPlugin: () =>
|
|
458
|
-
booters: () =>
|
|
459
|
-
}),
|
|
460
|
-
"./init/booter/0_configSetter.ts":
|
|
461
|
-
"./init/booter/10_apiTest.ts":
|
|
462
|
-
"./init/booter/20_resourceTest.ts":
|
|
463
|
-
"./init/booter/30_boot.ts":
|
|
464
|
-
"./init/booter/40_auth.ts":
|
|
465
|
-
"./init/booter/50_otherProcess.ts":
|
|
466
|
-
})), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]),
|
|
456
|
+
}(), We = /* @__PURE__ */ a({
|
|
457
|
+
bootPlugin: () => Ke,
|
|
458
|
+
booters: () => Ge
|
|
459
|
+
}), Ge = ye(Object.entries(/* @__PURE__ */ Object.assign({
|
|
460
|
+
"./init/booter/0_configSetter.ts": Pe,
|
|
461
|
+
"./init/booter/10_apiTest.ts": Re,
|
|
462
|
+
"./init/booter/20_resourceTest.ts": ze,
|
|
463
|
+
"./init/booter/30_boot.ts": Be,
|
|
464
|
+
"./init/booter/40_auth.ts": He,
|
|
465
|
+
"./init/booter/50_otherProcess.ts": Ue
|
|
466
|
+
})), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]), Ke = async (e) => {
|
|
467
467
|
let { plugins: t, pluginSteps: n } = p();
|
|
468
468
|
t.set(e.name, D(e)), n[e.name] = {
|
|
469
469
|
steps: [],
|
|
@@ -474,7 +474,7 @@ var Ne = await je(), Pe = async (e) => await Me(Ne, "plugin", e), Fe = class {},
|
|
|
474
474
|
};
|
|
475
475
|
try {
|
|
476
476
|
let t = {};
|
|
477
|
-
for (let r of
|
|
477
|
+
for (let r of Ge) {
|
|
478
478
|
let i = n[e.name].steps.length;
|
|
479
479
|
n[e.name].steps[i] = {
|
|
480
480
|
name: r.name,
|
|
@@ -488,1559 +488,790 @@ var Ne = await je(), Pe = async (e) => await Me(Ne, "plugin", e), Fe = class {},
|
|
|
488
488
|
throw n[e.name].now.status = "error", n[e.name].now.error = t, t;
|
|
489
489
|
}
|
|
490
490
|
console.log(`[plugin usePluginStore.$loadPlugin] plugin "${e.name}" load done`);
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
return function() {
|
|
496
|
-
return e.apply(t, arguments);
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
//#endregion
|
|
500
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/utils.js
|
|
501
|
-
var { toString: Qe } = Object.prototype, { getPrototypeOf: $e } = Object, { iterator: et, toStringTag: tt } = Symbol, nt = ((e) => (t) => {
|
|
502
|
-
let n = Qe.call(t);
|
|
503
|
-
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
504
|
-
})(Object.create(null)), K = (e) => (e = e.toLowerCase(), (t) => nt(t) === e), rt = (e) => (t) => typeof t === e, { isArray: it } = Array, at = rt("undefined");
|
|
505
|
-
function ot(e) {
|
|
506
|
-
return e !== null && !at(e) && e.constructor !== null && !at(e.constructor) && q(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
507
|
-
}
|
|
508
|
-
var st = K("ArrayBuffer");
|
|
509
|
-
function ct(e) {
|
|
510
|
-
let t;
|
|
511
|
-
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && st(e.buffer), t;
|
|
512
|
-
}
|
|
513
|
-
var lt = rt("string"), q = rt("function"), ut = rt("number"), dt = (e) => typeof e == "object" && !!e, ft = (e) => e === !0 || e === !1, pt = (e) => {
|
|
514
|
-
if (nt(e) !== "object") return !1;
|
|
515
|
-
let t = $e(e);
|
|
516
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(tt in e) && !(et in e);
|
|
517
|
-
}, mt = (e) => {
|
|
518
|
-
if (!dt(e) || ot(e)) return !1;
|
|
519
|
-
try {
|
|
520
|
-
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
521
|
-
} catch {
|
|
522
|
-
return !1;
|
|
491
|
+
}, qe = class extends Error {
|
|
492
|
+
name = "KyError";
|
|
493
|
+
get isKyError() {
|
|
494
|
+
return !0;
|
|
523
495
|
}
|
|
524
|
-
},
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
"Request",
|
|
534
|
-
"Response",
|
|
535
|
-
"Headers"
|
|
536
|
-
].map(K), jt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
537
|
-
function Mt(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
538
|
-
if (e == null) return;
|
|
539
|
-
let r, i;
|
|
540
|
-
if (typeof e != "object" && (e = [e]), it(e)) for (r = 0, i = e.length; r < i; r++) t.call(null, e[r], r, e);
|
|
541
|
-
else {
|
|
542
|
-
if (ot(e)) return;
|
|
543
|
-
let i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = i.length, o;
|
|
544
|
-
for (r = 0; r < a; r++) o = i[r], t.call(null, e[o], o, e);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
function Nt(e, t) {
|
|
548
|
-
if (ot(e)) return null;
|
|
549
|
-
t = t.toLowerCase();
|
|
550
|
-
let n = Object.keys(e), r = n.length, i;
|
|
551
|
-
for (; r-- > 0;) if (i = n[r], t === i.toLowerCase()) return i;
|
|
552
|
-
return null;
|
|
553
|
-
}
|
|
554
|
-
var Pt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ft = (e) => !at(e) && e !== Pt;
|
|
555
|
-
function It() {
|
|
556
|
-
let { caseless: e, skipUndefined: t } = Ft(this) && this || {}, n = {}, r = (r, i) => {
|
|
557
|
-
if (i === "__proto__" || i === "constructor" || i === "prototype") return;
|
|
558
|
-
let a = e && Nt(n, i) || i;
|
|
559
|
-
pt(n[a]) && pt(r) ? n[a] = It(n[a], r) : pt(r) ? n[a] = It({}, r) : it(r) ? n[a] = r.slice() : (!t || !at(r)) && (n[a] = r);
|
|
560
|
-
};
|
|
561
|
-
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] && Mt(arguments[e], r);
|
|
562
|
-
return n;
|
|
563
|
-
}
|
|
564
|
-
var Lt = (e, t, n, { allOwnKeys: r } = {}) => (Mt(t, (t, r) => {
|
|
565
|
-
n && q(t) ? Object.defineProperty(e, r, {
|
|
566
|
-
value: Ze(t, n),
|
|
567
|
-
writable: !0,
|
|
568
|
-
enumerable: !0,
|
|
569
|
-
configurable: !0
|
|
570
|
-
}) : Object.defineProperty(e, r, {
|
|
571
|
-
value: t,
|
|
572
|
-
writable: !0,
|
|
573
|
-
enumerable: !0,
|
|
574
|
-
configurable: !0
|
|
575
|
-
});
|
|
576
|
-
}, { allOwnKeys: r }), e), Rt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), zt = (e, t, n, r) => {
|
|
577
|
-
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
578
|
-
value: e,
|
|
579
|
-
writable: !0,
|
|
580
|
-
enumerable: !1,
|
|
581
|
-
configurable: !0
|
|
582
|
-
}), Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n);
|
|
583
|
-
}, Bt = (e, t, n, r) => {
|
|
584
|
-
let i, a, o, s = {};
|
|
585
|
-
if (t ||= {}, e == null) return t;
|
|
586
|
-
do {
|
|
587
|
-
for (i = Object.getOwnPropertyNames(e), a = i.length; a-- > 0;) o = i[a], (!r || r(o, e, t)) && !s[o] && (t[o] = e[o], s[o] = !0);
|
|
588
|
-
e = n !== !1 && $e(e);
|
|
589
|
-
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
590
|
-
return t;
|
|
591
|
-
}, Vt = (e, t, n) => {
|
|
592
|
-
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
593
|
-
let r = e.indexOf(t, n);
|
|
594
|
-
return r !== -1 && r === n;
|
|
595
|
-
}, Ht = (e) => {
|
|
596
|
-
if (!e) return null;
|
|
597
|
-
if (it(e)) return e;
|
|
598
|
-
let t = e.length;
|
|
599
|
-
if (!ut(t)) return null;
|
|
600
|
-
let n = Array(t);
|
|
601
|
-
for (; t-- > 0;) n[t] = e[t];
|
|
602
|
-
return n;
|
|
603
|
-
}, Ut = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && $e(Uint8Array)), Wt = (e, t) => {
|
|
604
|
-
let n = (e && e[et]).call(e), r;
|
|
605
|
-
for (; (r = n.next()) && !r.done;) {
|
|
606
|
-
let n = r.value;
|
|
607
|
-
t.call(e, n[0], n[1]);
|
|
608
|
-
}
|
|
609
|
-
}, Gt = (e, t) => {
|
|
610
|
-
let n, r = [];
|
|
611
|
-
for (; (n = e.exec(t)) !== null;) r.push(n);
|
|
612
|
-
return r;
|
|
613
|
-
}, Kt = K("HTMLFormElement"), qt = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, t, n) {
|
|
614
|
-
return t.toUpperCase() + n;
|
|
615
|
-
}), Jt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Yt = K("RegExp"), Xt = (e, t) => {
|
|
616
|
-
let n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
617
|
-
Mt(n, (n, i) => {
|
|
618
|
-
let a;
|
|
619
|
-
(a = t(n, i, e)) !== !1 && (r[i] = a || n);
|
|
620
|
-
}), Object.defineProperties(e, r);
|
|
621
|
-
}, Zt = (e) => {
|
|
622
|
-
Xt(e, (t, n) => {
|
|
623
|
-
if (q(e) && [
|
|
624
|
-
"arguments",
|
|
625
|
-
"caller",
|
|
626
|
-
"callee"
|
|
627
|
-
].indexOf(n) !== -1) return !1;
|
|
628
|
-
let r = e[n];
|
|
629
|
-
if (q(r)) {
|
|
630
|
-
if (t.enumerable = !1, "writable" in t) {
|
|
631
|
-
t.writable = !1;
|
|
632
|
-
return;
|
|
633
|
-
}
|
|
634
|
-
t.set ||= () => {
|
|
635
|
-
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
636
|
-
};
|
|
637
|
-
}
|
|
638
|
-
});
|
|
639
|
-
}, Qt = (e, t) => {
|
|
640
|
-
let n = {}, r = (e) => {
|
|
641
|
-
e.forEach((e) => {
|
|
642
|
-
n[e] = !0;
|
|
643
|
-
});
|
|
644
|
-
};
|
|
645
|
-
return it(e) ? r(e) : r(String(e).split(t)), n;
|
|
646
|
-
}, $t = () => {}, en = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
647
|
-
function tn(e) {
|
|
648
|
-
return !!(e && q(e.append) && e[tt] === "FormData" && e[et]);
|
|
649
|
-
}
|
|
650
|
-
var nn = (e) => {
|
|
651
|
-
let t = Array(10), n = (e, r) => {
|
|
652
|
-
if (dt(e)) {
|
|
653
|
-
if (t.indexOf(e) >= 0) return;
|
|
654
|
-
if (ot(e)) return e;
|
|
655
|
-
if (!("toJSON" in e)) {
|
|
656
|
-
t[r] = e;
|
|
657
|
-
let i = it(e) ? [] : {};
|
|
658
|
-
return Mt(e, (e, t) => {
|
|
659
|
-
let a = n(e, r + 1);
|
|
660
|
-
!at(a) && (i[t] = a);
|
|
661
|
-
}), t[r] = void 0, i;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
return e;
|
|
665
|
-
};
|
|
666
|
-
return n(e, 0);
|
|
667
|
-
}, rn = K("AsyncFunction"), an = (e) => e && (dt(e) || q(e)) && q(e.then) && q(e.catch), on = ((e, t) => e ? setImmediate : t ? ((e, t) => (Pt.addEventListener("message", ({ source: n, data: r }) => {
|
|
668
|
-
n === Pt && r === e && t.length && t.shift()();
|
|
669
|
-
}, !1), (n) => {
|
|
670
|
-
t.push(n), Pt.postMessage(e, "*");
|
|
671
|
-
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", q(Pt.postMessage)), J = {
|
|
672
|
-
isArray: it,
|
|
673
|
-
isArrayBuffer: st,
|
|
674
|
-
isBuffer: ot,
|
|
675
|
-
isFormData: Tt,
|
|
676
|
-
isArrayBufferView: ct,
|
|
677
|
-
isString: lt,
|
|
678
|
-
isNumber: ut,
|
|
679
|
-
isBoolean: ft,
|
|
680
|
-
isObject: dt,
|
|
681
|
-
isPlainObject: pt,
|
|
682
|
-
isEmptyObject: mt,
|
|
683
|
-
isReadableStream: Dt,
|
|
684
|
-
isRequest: Ot,
|
|
685
|
-
isResponse: kt,
|
|
686
|
-
isHeaders: At,
|
|
687
|
-
isUndefined: at,
|
|
688
|
-
isDate: ht,
|
|
689
|
-
isFile: gt,
|
|
690
|
-
isReactNativeBlob: _t,
|
|
691
|
-
isReactNative: vt,
|
|
692
|
-
isBlob: yt,
|
|
693
|
-
isRegExp: Yt,
|
|
694
|
-
isFunction: q,
|
|
695
|
-
isStream: xt,
|
|
696
|
-
isURLSearchParams: Et,
|
|
697
|
-
isTypedArray: Ut,
|
|
698
|
-
isFileList: bt,
|
|
699
|
-
forEach: Mt,
|
|
700
|
-
merge: It,
|
|
701
|
-
extend: Lt,
|
|
702
|
-
trim: jt,
|
|
703
|
-
stripBOM: Rt,
|
|
704
|
-
inherits: zt,
|
|
705
|
-
toFlatObject: Bt,
|
|
706
|
-
kindOf: nt,
|
|
707
|
-
kindOfTest: K,
|
|
708
|
-
endsWith: Vt,
|
|
709
|
-
toArray: Ht,
|
|
710
|
-
forEachEntry: Wt,
|
|
711
|
-
matchAll: Gt,
|
|
712
|
-
isHTMLForm: Kt,
|
|
713
|
-
hasOwnProperty: Jt,
|
|
714
|
-
hasOwnProp: Jt,
|
|
715
|
-
reduceDescriptors: Xt,
|
|
716
|
-
freezeMethods: Zt,
|
|
717
|
-
toObjectSet: Qt,
|
|
718
|
-
toCamelCase: qt,
|
|
719
|
-
noop: $t,
|
|
720
|
-
toFiniteNumber: en,
|
|
721
|
-
findKey: Nt,
|
|
722
|
-
global: Pt,
|
|
723
|
-
isContextDefined: Ft,
|
|
724
|
-
isSpecCompliantForm: tn,
|
|
725
|
-
toJSONObject: nn,
|
|
726
|
-
isAsyncFn: rn,
|
|
727
|
-
isThenable: an,
|
|
728
|
-
setImmediate: on,
|
|
729
|
-
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(Pt) : typeof process < "u" && process.nextTick || on,
|
|
730
|
-
isIterable: (e) => e != null && q(e[et])
|
|
731
|
-
}, Y = class e extends Error {
|
|
732
|
-
static from(t, n, r, i, a, o) {
|
|
733
|
-
let s = new e(t.message, n || t.code, r, i, a);
|
|
734
|
-
return s.cause = t, s.name = t.name, t.status != null && s.status == null && (s.status = t.status), o && Object.assign(s, o), s;
|
|
735
|
-
}
|
|
736
|
-
constructor(e, t, n, r, i) {
|
|
737
|
-
super(e), Object.defineProperty(this, "message", {
|
|
738
|
-
value: e,
|
|
739
|
-
enumerable: !0,
|
|
740
|
-
writable: !0,
|
|
741
|
-
configurable: !0
|
|
742
|
-
}), this.name = "AxiosError", this.isAxiosError = !0, t && (this.code = t), n && (this.config = n), r && (this.request = r), i && (this.response = i, this.status = i.status);
|
|
743
|
-
}
|
|
744
|
-
toJSON() {
|
|
745
|
-
return {
|
|
746
|
-
message: this.message,
|
|
747
|
-
name: this.name,
|
|
748
|
-
description: this.description,
|
|
749
|
-
number: this.number,
|
|
750
|
-
fileName: this.fileName,
|
|
751
|
-
lineNumber: this.lineNumber,
|
|
752
|
-
columnNumber: this.columnNumber,
|
|
753
|
-
stack: this.stack,
|
|
754
|
-
config: J.toJSONObject(this.config),
|
|
755
|
-
code: this.code,
|
|
756
|
-
status: this.status
|
|
757
|
-
};
|
|
758
|
-
}
|
|
759
|
-
};
|
|
760
|
-
Y.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE", Y.ERR_BAD_OPTION = "ERR_BAD_OPTION", Y.ECONNABORTED = "ECONNABORTED", Y.ETIMEDOUT = "ETIMEDOUT", Y.ERR_NETWORK = "ERR_NETWORK", Y.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS", Y.ERR_DEPRECATED = "ERR_DEPRECATED", Y.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE", Y.ERR_BAD_REQUEST = "ERR_BAD_REQUEST", Y.ERR_CANCELED = "ERR_CANCELED", Y.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT", Y.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
761
|
-
//#endregion
|
|
762
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/toFormData.js
|
|
763
|
-
function sn(e) {
|
|
764
|
-
return J.isPlainObject(e) || J.isArray(e);
|
|
765
|
-
}
|
|
766
|
-
function cn(e) {
|
|
767
|
-
return J.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
768
|
-
}
|
|
769
|
-
function ln(e, t, n) {
|
|
770
|
-
return e ? e.concat(t).map(function(e, t) {
|
|
771
|
-
return e = cn(e), !n && t ? "[" + e + "]" : e;
|
|
772
|
-
}).join(n ? "." : "") : t;
|
|
773
|
-
}
|
|
774
|
-
function un(e) {
|
|
775
|
-
return J.isArray(e) && !e.some(sn);
|
|
776
|
-
}
|
|
777
|
-
var dn = J.toFlatObject(J, {}, null, function(e) {
|
|
778
|
-
return /^is[A-Z]/.test(e);
|
|
779
|
-
});
|
|
780
|
-
function fn(e, t, n) {
|
|
781
|
-
if (!J.isObject(e)) throw TypeError("target must be an object");
|
|
782
|
-
t ||= new FormData(), n = J.toFlatObject(n, {
|
|
783
|
-
metaTokens: !0,
|
|
784
|
-
dots: !1,
|
|
785
|
-
indexes: !1
|
|
786
|
-
}, !1, function(e, t) {
|
|
787
|
-
return !J.isUndefined(t[e]);
|
|
788
|
-
});
|
|
789
|
-
let r = n.metaTokens, i = n.visitor || l, a = n.dots, o = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && J.isSpecCompliantForm(t);
|
|
790
|
-
if (!J.isFunction(i)) throw TypeError("visitor must be a function");
|
|
791
|
-
function c(e) {
|
|
792
|
-
if (e === null) return "";
|
|
793
|
-
if (J.isDate(e)) return e.toISOString();
|
|
794
|
-
if (J.isBoolean(e)) return e.toString();
|
|
795
|
-
if (!s && J.isBlob(e)) throw new Y("Blob is not supported. Use a Buffer instead.");
|
|
796
|
-
return J.isArrayBuffer(e) || J.isTypedArray(e) ? s && typeof Blob == "function" ? new Blob([e]) : Buffer.from(e) : e;
|
|
797
|
-
}
|
|
798
|
-
function l(e, n, i) {
|
|
799
|
-
let s = e;
|
|
800
|
-
if (J.isReactNative(t) && J.isReactNativeBlob(e)) return t.append(ln(i, n, a), c(e)), !1;
|
|
801
|
-
if (e && !i && typeof e == "object") {
|
|
802
|
-
if (J.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
|
|
803
|
-
else if (J.isArray(e) && un(e) || (J.isFileList(e) || J.endsWith(n, "[]")) && (s = J.toArray(e))) return n = cn(n), s.forEach(function(e, r) {
|
|
804
|
-
!(J.isUndefined(e) || e === null) && t.append(o === !0 ? ln([n], r, a) : o === null ? n : n + "[]", c(e));
|
|
805
|
-
}), !1;
|
|
806
|
-
}
|
|
807
|
-
return sn(e) ? !0 : (t.append(ln(i, n, a), c(e)), !1);
|
|
808
|
-
}
|
|
809
|
-
let u = [], d = Object.assign(dn, {
|
|
810
|
-
defaultVisitor: l,
|
|
811
|
-
convertValue: c,
|
|
812
|
-
isVisitable: sn
|
|
813
|
-
});
|
|
814
|
-
function f(e, n) {
|
|
815
|
-
if (!J.isUndefined(e)) {
|
|
816
|
-
if (u.indexOf(e) !== -1) throw Error("Circular reference detected in " + n.join("."));
|
|
817
|
-
u.push(e), J.forEach(e, function(e, r) {
|
|
818
|
-
(!(J.isUndefined(e) || e === null) && i.call(t, e, J.isString(r) ? r.trim() : r, n, d)) === !0 && f(e, n ? n.concat(r) : [r]);
|
|
819
|
-
}), u.pop();
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
if (!J.isObject(e)) throw TypeError("data must be an object");
|
|
823
|
-
return f(e), t;
|
|
824
|
-
}
|
|
825
|
-
//#endregion
|
|
826
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
827
|
-
function pn(e) {
|
|
828
|
-
let t = {
|
|
829
|
-
"!": "%21",
|
|
830
|
-
"'": "%27",
|
|
831
|
-
"(": "%28",
|
|
832
|
-
")": "%29",
|
|
833
|
-
"~": "%7E",
|
|
834
|
-
"%20": "+",
|
|
835
|
-
"%00": "\0"
|
|
836
|
-
};
|
|
837
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(e) {
|
|
838
|
-
return t[e];
|
|
839
|
-
});
|
|
840
|
-
}
|
|
841
|
-
function mn(e, t) {
|
|
842
|
-
this._pairs = [], e && fn(e, this, t);
|
|
843
|
-
}
|
|
844
|
-
var hn = mn.prototype;
|
|
845
|
-
hn.append = function(e, t) {
|
|
846
|
-
this._pairs.push([e, t]);
|
|
847
|
-
}, hn.toString = function(e) {
|
|
848
|
-
let t = e ? function(t) {
|
|
849
|
-
return e.call(this, t, pn);
|
|
850
|
-
} : pn;
|
|
851
|
-
return this._pairs.map(function(e) {
|
|
852
|
-
return t(e[0]) + "=" + t(e[1]);
|
|
853
|
-
}, "").join("&");
|
|
854
|
-
};
|
|
855
|
-
//#endregion
|
|
856
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/buildURL.js
|
|
857
|
-
function gn(e) {
|
|
858
|
-
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
859
|
-
}
|
|
860
|
-
function _n(e, t, n) {
|
|
861
|
-
if (!t) return e;
|
|
862
|
-
let r = n && n.encode || gn, i = J.isFunction(n) ? { serialize: n } : n, a = i && i.serialize, o;
|
|
863
|
-
if (o = a ? a(t, i) : J.isURLSearchParams(t) ? t.toString() : new mn(t, i).toString(r), o) {
|
|
864
|
-
let t = e.indexOf("#");
|
|
865
|
-
t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
866
|
-
}
|
|
867
|
-
return e;
|
|
868
|
-
}
|
|
869
|
-
//#endregion
|
|
870
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/InterceptorManager.js
|
|
871
|
-
var vn = class {
|
|
872
|
-
constructor() {
|
|
873
|
-
this.handlers = [];
|
|
874
|
-
}
|
|
875
|
-
use(e, t, n) {
|
|
876
|
-
return this.handlers.push({
|
|
877
|
-
fulfilled: e,
|
|
878
|
-
rejected: t,
|
|
879
|
-
synchronous: n ? n.synchronous : !1,
|
|
880
|
-
runWhen: n ? n.runWhen : null
|
|
881
|
-
}), this.handlers.length - 1;
|
|
496
|
+
}, Je = class extends qe {
|
|
497
|
+
name = "HTTPError";
|
|
498
|
+
response;
|
|
499
|
+
request;
|
|
500
|
+
options;
|
|
501
|
+
data;
|
|
502
|
+
constructor(e, t, n) {
|
|
503
|
+
let r = `${e.status || e.status === 0 ? e.status : ""} ${e.statusText ?? ""}`.trim(), i = r ? `status code ${r}` : "an unknown error";
|
|
504
|
+
super(`Request failed with ${i}: ${t.method} ${t.url}`), this.response = e, this.request = t, this.options = n;
|
|
882
505
|
}
|
|
883
|
-
|
|
884
|
-
|
|
506
|
+
}, Ye = class extends qe {
|
|
507
|
+
name = "NetworkError";
|
|
508
|
+
request;
|
|
509
|
+
constructor(e, t) {
|
|
510
|
+
super(`Request failed due to a network error: ${e.method} ${e.url}`, t), this.request = e;
|
|
885
511
|
}
|
|
886
|
-
|
|
887
|
-
|
|
512
|
+
}, Xe = class extends Error {
|
|
513
|
+
name = "NonError";
|
|
514
|
+
value;
|
|
515
|
+
constructor(e) {
|
|
516
|
+
let t = "Non-error value was thrown";
|
|
517
|
+
try {
|
|
518
|
+
typeof e == "string" ? t = e : e && typeof e == "object" && "message" in e && typeof e.message == "string" && (t = e.message);
|
|
519
|
+
} catch {}
|
|
520
|
+
super(t), this.value = e;
|
|
888
521
|
}
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
522
|
+
}, Ze = class extends qe {
|
|
523
|
+
name = "ForceRetryError";
|
|
524
|
+
customDelay;
|
|
525
|
+
code;
|
|
526
|
+
customRequest;
|
|
527
|
+
constructor(e) {
|
|
528
|
+
let t = e?.cause ? e.cause instanceof Error ? e.cause : new Xe(e.cause) : void 0;
|
|
529
|
+
super(e?.code ? `Forced retry: ${e.code}` : "Forced retry", t ? { cause: t } : void 0), this.customDelay = e?.delay, this.code = e?.code, this.customRequest = e?.request;
|
|
893
530
|
}
|
|
894
|
-
},
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
}, bn = {
|
|
900
|
-
isBrowser: !0,
|
|
901
|
-
classes: {
|
|
902
|
-
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : mn,
|
|
903
|
-
FormData: typeof FormData < "u" ? FormData : null,
|
|
904
|
-
Blob: typeof Blob < "u" ? Blob : null
|
|
905
|
-
},
|
|
906
|
-
protocols: [
|
|
907
|
-
"http",
|
|
908
|
-
"https",
|
|
909
|
-
"file",
|
|
910
|
-
"blob",
|
|
911
|
-
"url",
|
|
912
|
-
"data"
|
|
913
|
-
]
|
|
914
|
-
}, xn = /* @__PURE__ */ a({
|
|
915
|
-
hasBrowserEnv: () => Sn,
|
|
916
|
-
hasStandardBrowserEnv: () => wn,
|
|
917
|
-
hasStandardBrowserWebWorkerEnv: () => Tn,
|
|
918
|
-
navigator: () => Cn,
|
|
919
|
-
origin: () => En
|
|
920
|
-
}), Sn = typeof window < "u" && typeof document < "u", Cn = typeof navigator == "object" && navigator || void 0, wn = Sn && (!Cn || [
|
|
921
|
-
"ReactNative",
|
|
922
|
-
"NativeScript",
|
|
923
|
-
"NS"
|
|
924
|
-
].indexOf(Cn.product) < 0), Tn = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", En = Sn && window.location.href || "http://localhost", X = {
|
|
925
|
-
...xn,
|
|
926
|
-
...bn
|
|
927
|
-
};
|
|
928
|
-
//#endregion
|
|
929
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
930
|
-
function Dn(e, t) {
|
|
931
|
-
return fn(e, new X.classes.URLSearchParams(), {
|
|
932
|
-
visitor: function(e, t, n, r) {
|
|
933
|
-
return X.isNode && J.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
934
|
-
},
|
|
935
|
-
...t
|
|
936
|
-
});
|
|
937
|
-
}
|
|
938
|
-
//#endregion
|
|
939
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
940
|
-
function On(e) {
|
|
941
|
-
return J.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
942
|
-
}
|
|
943
|
-
function kn(e) {
|
|
944
|
-
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
945
|
-
for (r = 0; r < i; r++) a = n[r], t[a] = e[a];
|
|
946
|
-
return t;
|
|
947
|
-
}
|
|
948
|
-
function An(e) {
|
|
949
|
-
function t(e, n, r, i) {
|
|
950
|
-
let a = e[i++];
|
|
951
|
-
if (a === "__proto__") return !0;
|
|
952
|
-
let o = Number.isFinite(+a), s = i >= e.length;
|
|
953
|
-
return a = !a && J.isArray(r) ? r.length : a, s ? (J.hasOwnProp(r, a) ? r[a] = [r[a], n] : r[a] = n, !o) : ((!r[a] || !J.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && J.isArray(r[a]) && (r[a] = kn(r[a])), !o);
|
|
531
|
+
}, Qe = class extends Error {
|
|
532
|
+
name = "SchemaValidationError";
|
|
533
|
+
issues;
|
|
534
|
+
constructor(e) {
|
|
535
|
+
super("Response schema validation failed"), this.issues = e;
|
|
954
536
|
}
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
}),
|
|
537
|
+
}, X = class extends qe {
|
|
538
|
+
name = "TimeoutError";
|
|
539
|
+
request;
|
|
540
|
+
constructor(e) {
|
|
541
|
+
super(`Request timed out: ${e.method} ${e.url}`), this.request = e;
|
|
960
542
|
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
543
|
+
}, $e = (() => {
|
|
544
|
+
let e = !1, t = !1, n = typeof globalThis.ReadableStream == "function", r = typeof globalThis.Request == "function";
|
|
545
|
+
if (n && r) try {
|
|
546
|
+
t = new globalThis.Request("https://empty.invalid", {
|
|
547
|
+
body: new globalThis.ReadableStream(),
|
|
548
|
+
method: "POST",
|
|
549
|
+
get duplex() {
|
|
550
|
+
return e = !0, "half";
|
|
551
|
+
}
|
|
552
|
+
}).headers.has("Content-Type");
|
|
968
553
|
} catch (e) {
|
|
969
|
-
if (e.
|
|
554
|
+
if (e instanceof Error && e.message === "unsupported BodyInit type") return !1;
|
|
555
|
+
throw e;
|
|
970
556
|
}
|
|
971
|
-
return
|
|
972
|
-
}
|
|
973
|
-
var Mn = {
|
|
974
|
-
transitional: yn,
|
|
975
|
-
adapter: [
|
|
976
|
-
"xhr",
|
|
977
|
-
"http",
|
|
978
|
-
"fetch"
|
|
979
|
-
],
|
|
980
|
-
transformRequest: [function(e, t) {
|
|
981
|
-
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i = J.isObject(e);
|
|
982
|
-
if (i && J.isHTMLForm(e) && (e = new FormData(e)), J.isFormData(e)) return r ? JSON.stringify(An(e)) : e;
|
|
983
|
-
if (J.isArrayBuffer(e) || J.isBuffer(e) || J.isStream(e) || J.isFile(e) || J.isBlob(e) || J.isReadableStream(e)) return e;
|
|
984
|
-
if (J.isArrayBufferView(e)) return e.buffer;
|
|
985
|
-
if (J.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
986
|
-
let a;
|
|
987
|
-
if (i) {
|
|
988
|
-
if (n.indexOf("application/x-www-form-urlencoded") > -1) return Dn(e, this.formSerializer).toString();
|
|
989
|
-
if ((a = J.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
990
|
-
let t = this.env && this.env.FormData;
|
|
991
|
-
return fn(a ? { "files[]": e } : e, t && new t(), this.formSerializer);
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
|
-
return i || r ? (t.setContentType("application/json", !1), jn(e)) : e;
|
|
995
|
-
}],
|
|
996
|
-
transformResponse: [function(e) {
|
|
997
|
-
let t = this.transitional || Mn.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json";
|
|
998
|
-
if (J.isResponse(e) || J.isReadableStream(e)) return e;
|
|
999
|
-
if (e && J.isString(e) && (n && !this.responseType || r)) {
|
|
1000
|
-
let n = !(t && t.silentJSONParsing) && r;
|
|
1001
|
-
try {
|
|
1002
|
-
return JSON.parse(e, this.parseReviver);
|
|
1003
|
-
} catch (e) {
|
|
1004
|
-
if (n) throw e.name === "SyntaxError" ? Y.from(e, Y.ERR_BAD_RESPONSE, this, null, this.response) : e;
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
return e;
|
|
1008
|
-
}],
|
|
1009
|
-
timeout: 0,
|
|
1010
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
1011
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
1012
|
-
maxContentLength: -1,
|
|
1013
|
-
maxBodyLength: -1,
|
|
1014
|
-
env: {
|
|
1015
|
-
FormData: X.classes.FormData,
|
|
1016
|
-
Blob: X.classes.Blob
|
|
1017
|
-
},
|
|
1018
|
-
validateStatus: function(e) {
|
|
1019
|
-
return e >= 200 && e < 300;
|
|
1020
|
-
},
|
|
1021
|
-
headers: { common: {
|
|
1022
|
-
Accept: "application/json, text/plain, */*",
|
|
1023
|
-
"Content-Type": void 0
|
|
1024
|
-
} }
|
|
1025
|
-
};
|
|
1026
|
-
J.forEach([
|
|
1027
|
-
"delete",
|
|
557
|
+
return e && !t;
|
|
558
|
+
})(), et = typeof globalThis.AbortController == "function", tt = typeof globalThis.AbortSignal == "function" && typeof globalThis.AbortSignal.any == "function", nt = typeof globalThis.ReadableStream == "function", rt = typeof globalThis.FormData == "function", it = [
|
|
1028
559
|
"get",
|
|
1029
|
-
"head",
|
|
1030
560
|
"post",
|
|
1031
561
|
"put",
|
|
1032
|
-
"patch"
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
"
|
|
1040
|
-
"
|
|
1041
|
-
"
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
"expires",
|
|
1045
|
-
"from",
|
|
1046
|
-
"host",
|
|
1047
|
-
"if-modified-since",
|
|
1048
|
-
"if-unmodified-since",
|
|
1049
|
-
"last-modified",
|
|
1050
|
-
"location",
|
|
1051
|
-
"max-forwards",
|
|
1052
|
-
"proxy-authorization",
|
|
1053
|
-
"referer",
|
|
1054
|
-
"retry-after",
|
|
1055
|
-
"user-agent"
|
|
1056
|
-
]), Pn = (e) => {
|
|
1057
|
-
let t = {}, n, r, i;
|
|
1058
|
-
return e && e.split("\n").forEach(function(e) {
|
|
1059
|
-
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] && Nn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
1060
|
-
}), t;
|
|
1061
|
-
}, Fn = Symbol("internals");
|
|
1062
|
-
function In(e) {
|
|
1063
|
-
return e && String(e).trim().toLowerCase();
|
|
1064
|
-
}
|
|
1065
|
-
function Ln(e) {
|
|
1066
|
-
return e === !1 || e == null ? e : J.isArray(e) ? e.map(Ln) : String(e).replace(/[\r\n]+$/, "");
|
|
1067
|
-
}
|
|
1068
|
-
function Rn(e) {
|
|
1069
|
-
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
1070
|
-
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
1071
|
-
return t;
|
|
1072
|
-
}
|
|
1073
|
-
var zn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1074
|
-
function Bn(e, t, n, r, i) {
|
|
1075
|
-
if (J.isFunction(r)) return r.call(this, t, n);
|
|
1076
|
-
if (i && (t = n), J.isString(t)) {
|
|
1077
|
-
if (J.isString(r)) return t.indexOf(r) !== -1;
|
|
1078
|
-
if (J.isRegExp(r)) return r.test(t);
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
function Vn(e) {
|
|
1082
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
1083
|
-
}
|
|
1084
|
-
function Hn(e, t) {
|
|
1085
|
-
let n = J.toCamelCase(" " + t);
|
|
1086
|
-
[
|
|
1087
|
-
"get",
|
|
1088
|
-
"set",
|
|
1089
|
-
"has"
|
|
1090
|
-
].forEach((r) => {
|
|
1091
|
-
Object.defineProperty(e, r + n, {
|
|
1092
|
-
value: function(e, n, i) {
|
|
1093
|
-
return this[r].call(this, t, e, n, i);
|
|
1094
|
-
},
|
|
1095
|
-
configurable: !0
|
|
1096
|
-
});
|
|
1097
|
-
});
|
|
1098
|
-
}
|
|
1099
|
-
var Z = class {
|
|
562
|
+
"patch",
|
|
563
|
+
"head",
|
|
564
|
+
"delete"
|
|
565
|
+
], at = {
|
|
566
|
+
json: "application/json",
|
|
567
|
+
text: "text/*",
|
|
568
|
+
formData: "multipart/form-data",
|
|
569
|
+
arrayBuffer: "*/*",
|
|
570
|
+
blob: "*/*",
|
|
571
|
+
bytes: "*/*"
|
|
572
|
+
}, ot = 2147483647, st = Symbol("stop"), ct = class {
|
|
573
|
+
options;
|
|
1100
574
|
constructor(e) {
|
|
1101
|
-
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
575
|
+
this.options = e;
|
|
576
|
+
}
|
|
577
|
+
}, lt = (e) => new ct(e), ut = {
|
|
578
|
+
json: !0,
|
|
579
|
+
parseJson: !0,
|
|
580
|
+
stringifyJson: !0,
|
|
581
|
+
searchParams: !0,
|
|
582
|
+
baseUrl: !0,
|
|
583
|
+
prefix: !0,
|
|
584
|
+
retry: !0,
|
|
585
|
+
timeout: !0,
|
|
586
|
+
totalTimeout: !0,
|
|
587
|
+
hooks: !0,
|
|
588
|
+
throwHttpErrors: !0,
|
|
589
|
+
onDownloadProgress: !0,
|
|
590
|
+
onUploadProgress: !0,
|
|
591
|
+
fetch: !0,
|
|
592
|
+
context: !0
|
|
593
|
+
}, dt = {
|
|
594
|
+
method: !0,
|
|
595
|
+
headers: !0,
|
|
596
|
+
body: !0,
|
|
597
|
+
mode: !0,
|
|
598
|
+
credentials: !0,
|
|
599
|
+
cache: !0,
|
|
600
|
+
redirect: !0,
|
|
601
|
+
referrer: !0,
|
|
602
|
+
referrerPolicy: !0,
|
|
603
|
+
integrity: !0,
|
|
604
|
+
keepalive: !0,
|
|
605
|
+
signal: !0,
|
|
606
|
+
window: !0,
|
|
607
|
+
duplex: !0
|
|
608
|
+
}, ft = new TextEncoder(), pt = (e) => {
|
|
609
|
+
if (!e) return 0;
|
|
610
|
+
if (e instanceof FormData) {
|
|
611
|
+
let t = 0;
|
|
612
|
+
for (let [n, r] of e) t += 40, t += ft.encode(`Content-Disposition: form-data; name="${n}"`).byteLength, t += typeof r == "string" ? ft.encode(r).byteLength : r.size;
|
|
613
|
+
return t;
|
|
614
|
+
}
|
|
615
|
+
return e instanceof Blob ? e.size : e instanceof ArrayBuffer || ArrayBuffer.isView(e) ? e.byteLength : typeof e == "string" ? ft.encode(e).byteLength : e instanceof URLSearchParams ? ft.encode(e.toString()).byteLength : 0;
|
|
616
|
+
}, mt = (e, t, n) => {
|
|
617
|
+
let r, i = 0;
|
|
618
|
+
return e.pipeThrough(new TransformStream({
|
|
619
|
+
transform(e, a) {
|
|
620
|
+
if (a.enqueue(e), r) {
|
|
621
|
+
i += r.byteLength;
|
|
622
|
+
let e = t === 0 ? 0 : i / t;
|
|
623
|
+
e >= 1 && (e = 1 - 2 ** -52), n?.({
|
|
624
|
+
percent: e,
|
|
625
|
+
totalBytes: Math.max(t, i),
|
|
626
|
+
transferredBytes: i
|
|
627
|
+
}, r);
|
|
628
|
+
}
|
|
629
|
+
r = e;
|
|
630
|
+
},
|
|
631
|
+
flush() {
|
|
632
|
+
r && (i += r.byteLength, n?.({
|
|
633
|
+
percent: 1,
|
|
634
|
+
totalBytes: Math.max(t, i),
|
|
635
|
+
transferredBytes: i
|
|
636
|
+
}, r));
|
|
1110
637
|
}
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
638
|
+
}));
|
|
639
|
+
}, ht = (e, t) => {
|
|
640
|
+
if (!e.body) return e;
|
|
641
|
+
let n = {
|
|
642
|
+
status: e.status,
|
|
643
|
+
statusText: e.statusText,
|
|
644
|
+
headers: e.headers
|
|
645
|
+
};
|
|
646
|
+
if (e.status === 204) return new Response(null, n);
|
|
647
|
+
let r = Math.max(0, Number(e.headers.get("content-length")) || 0);
|
|
648
|
+
return new Response(mt(e.body, r, t), n);
|
|
649
|
+
}, gt = (e, t, n) => {
|
|
650
|
+
if (!e.body) return e;
|
|
651
|
+
let r = pt(n ?? e.body);
|
|
652
|
+
return new Request(e, {
|
|
653
|
+
duplex: "half",
|
|
654
|
+
body: mt(e.body, r, t)
|
|
655
|
+
});
|
|
656
|
+
}, Z = (e) => typeof e == "object" && !!e, _t = Symbol("replaceOption"), vt = (e) => Z(e) && e[_t] === !0 ? {
|
|
657
|
+
isReplace: !0,
|
|
658
|
+
value: e.value
|
|
659
|
+
} : {
|
|
660
|
+
isReplace: !1,
|
|
661
|
+
value: e
|
|
662
|
+
}, yt = (...e) => {
|
|
663
|
+
for (let t of e) if ((!Z(t) || Array.isArray(t)) && t !== void 0) throw TypeError("The `options` argument must be an object");
|
|
664
|
+
return kt({}, ...e);
|
|
665
|
+
}, bt = (e = {}, t = {}) => {
|
|
666
|
+
let n = new globalThis.Headers(e), r = t instanceof globalThis.Headers, i = new globalThis.Headers(t);
|
|
667
|
+
for (let [e, t] of i.entries()) r && t === "undefined" || t === void 0 ? n.delete(e) : n.set(e, t);
|
|
668
|
+
return n;
|
|
669
|
+
}, xt = (e) => {
|
|
670
|
+
if (!Z(e) || Array.isArray(e)) return !1;
|
|
671
|
+
let t = Object.getPrototypeOf(e);
|
|
672
|
+
return t === Object.prototype || t === null;
|
|
673
|
+
}, St = (e) => e instanceof URLSearchParams ? new URLSearchParams(e) : e instanceof globalThis.Headers ? new globalThis.Headers(e) : Array.isArray(e) ? [...e] : xt(e) ? { ...e } : e, Ct = (e) => Object.fromEntries(Object.entries(e).filter((e) => e[1] !== void 0)), wt = (e, t) => xt(e) && xt(t) ? Ct({
|
|
674
|
+
...e,
|
|
675
|
+
...t
|
|
676
|
+
}) : bt(e, t);
|
|
677
|
+
function Tt(e, t, n) {
|
|
678
|
+
return Object.hasOwn(t, n) && t[n] === void 0 ? [] : kt(e[n] ?? [], t[n] ?? []);
|
|
679
|
+
}
|
|
680
|
+
var Et = (e = {}, t = {}) => ({
|
|
681
|
+
init: Tt(e, t, "init"),
|
|
682
|
+
beforeRequest: Tt(e, t, "beforeRequest"),
|
|
683
|
+
beforeRetry: Tt(e, t, "beforeRetry"),
|
|
684
|
+
beforeError: Tt(e, t, "beforeError"),
|
|
685
|
+
afterResponse: Tt(e, t, "afterResponse")
|
|
686
|
+
}), Dt = Symbol("deletedParameters"), Ot = (e, t) => {
|
|
687
|
+
let n = new URLSearchParams(), r = /* @__PURE__ */ new Set();
|
|
688
|
+
for (let i of [e, t]) if (i !== void 0) if (i instanceof URLSearchParams) {
|
|
689
|
+
for (let [e, t] of i.entries()) n.append(e, t), r.delete(e);
|
|
690
|
+
let e = i[Dt];
|
|
691
|
+
if (e) for (let t of e) n.delete(t), r.add(t);
|
|
692
|
+
} else if (Array.isArray(i)) for (let e of i) {
|
|
693
|
+
if (!Array.isArray(e) || e.length !== 2) throw TypeError("Array search parameters must be provided in [[key, value], ...] format");
|
|
694
|
+
n.append(String(e[0]), String(e[1])), r.delete(String(e[0]));
|
|
695
|
+
}
|
|
696
|
+
else if (Z(i)) for (let [e, t] of Object.entries(i)) t === void 0 ? (n.delete(e), r.add(e)) : (n.append(e, String(t)), r.delete(e));
|
|
697
|
+
else {
|
|
698
|
+
let e = new URLSearchParams(i);
|
|
699
|
+
for (let [t, i] of e.entries()) n.append(t, i), r.delete(t);
|
|
700
|
+
}
|
|
701
|
+
return r.size > 0 && (n[Dt] = r), n;
|
|
702
|
+
}, kt = (...e) => {
|
|
703
|
+
let t = {}, n = {}, r = {}, i, a = [];
|
|
704
|
+
for (let o of e) if (Array.isArray(o)) Array.isArray(t) || (t = []), t = [...t, ...o];
|
|
705
|
+
else if (Z(o)) {
|
|
706
|
+
for (let [e, n] of Object.entries(o)) {
|
|
707
|
+
if (e === "signal" && n instanceof globalThis.AbortSignal) {
|
|
708
|
+
a.push(n);
|
|
709
|
+
continue;
|
|
1119
710
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
if (J.isFunction(t)) return t.call(this, e, n);
|
|
1132
|
-
if (J.isRegExp(t)) return t.exec(e);
|
|
1133
|
-
throw TypeError("parser must be boolean|regexp|function");
|
|
711
|
+
let r = vt(n), { isReplace: o } = r;
|
|
712
|
+
if (n = r.value, e === "context") {
|
|
713
|
+
if (n != null && (!Z(n) || Array.isArray(n))) throw TypeError("The `context` option must be an object");
|
|
714
|
+
t = {
|
|
715
|
+
...t,
|
|
716
|
+
context: n == null ? {} : o ? { ...n } : {
|
|
717
|
+
...t.context,
|
|
718
|
+
...n
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
continue;
|
|
1134
722
|
}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
if (e = In(e), e) {
|
|
1139
|
-
let n = J.findKey(this, e);
|
|
1140
|
-
return !!(n && this[n] !== void 0 && (!t || Bn(this, this[n], n, t)));
|
|
1141
|
-
}
|
|
1142
|
-
return !1;
|
|
1143
|
-
}
|
|
1144
|
-
delete(e, t) {
|
|
1145
|
-
let n = this, r = !1;
|
|
1146
|
-
function i(e) {
|
|
1147
|
-
if (e = In(e), e) {
|
|
1148
|
-
let i = J.findKey(n, e);
|
|
1149
|
-
i && (!t || Bn(n, n[i], i, t)) && (delete n[i], r = !0);
|
|
723
|
+
if (e === "searchParams") {
|
|
724
|
+
i = n == null ? void 0 : o || i === void 0 ? n : Ot(i, n);
|
|
725
|
+
continue;
|
|
1150
726
|
}
|
|
727
|
+
Z(n) && !o && e in t && (n = kt(t[e], n)), t = {
|
|
728
|
+
...t,
|
|
729
|
+
[e]: n
|
|
730
|
+
};
|
|
1151
731
|
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
let t = Object.keys(this), n = t.length, r = !1;
|
|
1156
|
-
for (; n--;) {
|
|
1157
|
-
let i = t[n];
|
|
1158
|
-
(!e || Bn(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
732
|
+
if (Z(o.hooks)) {
|
|
733
|
+
let { value: e, isReplace: n } = vt(o.hooks);
|
|
734
|
+
r = Et(n ? {} : r, e), t.hooks = r;
|
|
1159
735
|
}
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
let t = this, n = {};
|
|
1164
|
-
return J.forEach(this, (r, i) => {
|
|
1165
|
-
let a = J.findKey(n, i);
|
|
1166
|
-
if (a) {
|
|
1167
|
-
t[a] = Ln(r), delete t[i];
|
|
1168
|
-
return;
|
|
1169
|
-
}
|
|
1170
|
-
let o = e ? Vn(i) : String(i).trim();
|
|
1171
|
-
o !== i && delete t[i], t[o] = Ln(r), n[o] = !0;
|
|
1172
|
-
}), this;
|
|
1173
|
-
}
|
|
1174
|
-
concat(...e) {
|
|
1175
|
-
return this.constructor.concat(this, ...e);
|
|
1176
|
-
}
|
|
1177
|
-
toJSON(e) {
|
|
1178
|
-
let t = Object.create(null);
|
|
1179
|
-
return J.forEach(this, (n, r) => {
|
|
1180
|
-
n != null && n !== !1 && (t[r] = e && J.isArray(n) ? n.join(", ") : n);
|
|
1181
|
-
}), t;
|
|
1182
|
-
}
|
|
1183
|
-
[Symbol.iterator]() {
|
|
1184
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1185
|
-
}
|
|
1186
|
-
toString() {
|
|
1187
|
-
return Object.entries(this.toJSON()).map(([e, t]) => e + ": " + t).join("\n");
|
|
1188
|
-
}
|
|
1189
|
-
getSetCookie() {
|
|
1190
|
-
return this.get("set-cookie") || [];
|
|
1191
|
-
}
|
|
1192
|
-
get [Symbol.toStringTag]() {
|
|
1193
|
-
return "AxiosHeaders";
|
|
1194
|
-
}
|
|
1195
|
-
static from(e) {
|
|
1196
|
-
return e instanceof this ? e : new this(e);
|
|
1197
|
-
}
|
|
1198
|
-
static concat(e, ...t) {
|
|
1199
|
-
let n = new this(e);
|
|
1200
|
-
return t.forEach((e) => n.set(e)), n;
|
|
1201
|
-
}
|
|
1202
|
-
static accessor(e) {
|
|
1203
|
-
let t = (this[Fn] = this[Fn] = { accessors: {} }).accessors, n = this.prototype;
|
|
1204
|
-
function r(e) {
|
|
1205
|
-
let r = In(e);
|
|
1206
|
-
t[r] || (Hn(n, e), t[r] = !0);
|
|
736
|
+
if (Z(o.headers)) {
|
|
737
|
+
let { value: e, isReplace: r } = vt(o.headers);
|
|
738
|
+
n = r ? St(e) : wt(n, e), t.headers = n;
|
|
1207
739
|
}
|
|
1208
|
-
return J.isArray(e) ? e.forEach(r) : r(e), this;
|
|
1209
740
|
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
741
|
+
return i !== void 0 && (t.searchParams = i), a.length > 0 && (a.length === 1 ? t.signal = a[0] : tt ? t.signal = AbortSignal.any(a) : t.signal = a.at(-1)), t;
|
|
742
|
+
}, At = (e) => it.includes(e) ? e.toUpperCase() : e, jt = {
|
|
743
|
+
limit: 2,
|
|
744
|
+
methods: [
|
|
745
|
+
"get",
|
|
746
|
+
"put",
|
|
747
|
+
"head",
|
|
748
|
+
"delete",
|
|
749
|
+
"options",
|
|
750
|
+
"trace"
|
|
751
|
+
],
|
|
752
|
+
statusCodes: [
|
|
753
|
+
408,
|
|
754
|
+
413,
|
|
755
|
+
429,
|
|
756
|
+
500,
|
|
757
|
+
502,
|
|
758
|
+
503,
|
|
759
|
+
504
|
|
760
|
+
],
|
|
761
|
+
afterStatusCodes: [
|
|
762
|
+
413,
|
|
763
|
+
429,
|
|
764
|
+
503
|
|
765
|
+
],
|
|
766
|
+
maxRetryAfter: Infinity,
|
|
767
|
+
backoffLimit: Infinity,
|
|
768
|
+
delay: (e) => .3 * 2 ** (e - 1) * 1e3,
|
|
769
|
+
jitter: void 0,
|
|
770
|
+
retryOnTimeout: !1
|
|
771
|
+
}, Mt = (e = {}) => {
|
|
772
|
+
if (typeof e == "number") return {
|
|
773
|
+
...jt,
|
|
774
|
+
limit: e
|
|
775
|
+
};
|
|
776
|
+
if (e.methods && !Array.isArray(e.methods)) throw Error("retry.methods must be an array");
|
|
777
|
+
if (e.statusCodes && !Array.isArray(e.statusCodes)) throw Error("retry.statusCodes must be an array");
|
|
778
|
+
let t = Object.fromEntries(Object.entries({
|
|
779
|
+
...e,
|
|
780
|
+
methods: e.methods?.map((e) => e.toLowerCase())
|
|
781
|
+
}).filter(([, e]) => e !== void 0));
|
|
1220
782
|
return {
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
this[n] = e;
|
|
1224
|
-
}
|
|
783
|
+
...jt,
|
|
784
|
+
...t
|
|
1225
785
|
};
|
|
1226
|
-
}), J.freezeMethods(Z);
|
|
1227
|
-
//#endregion
|
|
1228
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/transformData.js
|
|
1229
|
-
function Un(e, t) {
|
|
1230
|
-
let n = this || Mn, r = t || n, i = Z.from(r.headers), a = r.data;
|
|
1231
|
-
return J.forEach(e, function(e) {
|
|
1232
|
-
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
1233
|
-
}), i.normalize(), a;
|
|
1234
|
-
}
|
|
1235
|
-
//#endregion
|
|
1236
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/cancel/isCancel.js
|
|
1237
|
-
function Wn(e) {
|
|
1238
|
-
return !!(e && e.__CANCEL__);
|
|
1239
|
-
}
|
|
1240
|
-
//#endregion
|
|
1241
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/cancel/CanceledError.js
|
|
1242
|
-
var Gn = class extends Y {
|
|
1243
|
-
constructor(e, t, n) {
|
|
1244
|
-
super(e ?? "canceled", Y.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1245
|
-
}
|
|
1246
786
|
};
|
|
1247
787
|
//#endregion
|
|
1248
|
-
//#region ../../node_modules/.pnpm/
|
|
1249
|
-
function
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
788
|
+
//#region ../../node_modules/.pnpm/ky@2.0.1/node_modules/ky/distribution/utils/timeout.js
|
|
789
|
+
async function Nt(e, t, n, r) {
|
|
790
|
+
return new Promise((i, a) => {
|
|
791
|
+
let o = setTimeout(() => {
|
|
792
|
+
n && n.abort(), a(new X(e));
|
|
793
|
+
}, r.timeout);
|
|
794
|
+
r.fetch(e, t).then(i).catch(a).then(() => {
|
|
795
|
+
clearTimeout(o);
|
|
796
|
+
});
|
|
797
|
+
});
|
|
1258
798
|
}
|
|
1259
799
|
//#endregion
|
|
1260
|
-
//#region ../../node_modules/.pnpm/
|
|
1261
|
-
function
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
let
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
return f ? Math.round(d * 1e3 / f) : void 0;
|
|
1272
|
-
};
|
|
800
|
+
//#region ../../node_modules/.pnpm/ky@2.0.1/node_modules/ky/distribution/utils/delay.js
|
|
801
|
+
async function Pt(e, { signal: t }) {
|
|
802
|
+
return new Promise((n, r) => {
|
|
803
|
+
t && (t.throwIfAborted(), t.addEventListener("abort", i, { once: !0 }));
|
|
804
|
+
function i() {
|
|
805
|
+
clearTimeout(a), r(t.reason);
|
|
806
|
+
}
|
|
807
|
+
let a = setTimeout(() => {
|
|
808
|
+
t?.removeEventListener("abort", i), n();
|
|
809
|
+
}, e);
|
|
810
|
+
});
|
|
1273
811
|
}
|
|
1274
812
|
//#endregion
|
|
1275
|
-
//#region ../../node_modules/.pnpm/
|
|
1276
|
-
|
|
1277
|
-
let
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
813
|
+
//#region ../../node_modules/.pnpm/ky@2.0.1/node_modules/ky/distribution/utils/options.js
|
|
814
|
+
var Ft = (e) => {
|
|
815
|
+
let t = {};
|
|
816
|
+
for (let n in e) Object.hasOwn(e, n) && !(n in dt) && !(n in ut) && (t[n] = e[n]);
|
|
817
|
+
return t;
|
|
818
|
+
}, It = (e) => e === void 0 ? !1 : Array.isArray(e) ? e.length > 0 : e instanceof URLSearchParams ? e.size > 0 || !!e[Dt]?.size : typeof e == "object" ? Object.keys(e).length > 0 : typeof e == "string" ? e.trim().length > 0 : !!e, Lt = Object.prototype.toString, Rt = (e) => Lt.call(e) === "[object Error]", zt = new Set([
|
|
819
|
+
"network error",
|
|
820
|
+
"NetworkError when attempting to fetch resource.",
|
|
821
|
+
"The Internet connection appears to be offline.",
|
|
822
|
+
"Network request failed",
|
|
823
|
+
"fetch failed",
|
|
824
|
+
"terminated",
|
|
825
|
+
" A network error occurred.",
|
|
826
|
+
"Network connection lost"
|
|
827
|
+
]);
|
|
828
|
+
function Bt(e) {
|
|
829
|
+
if (!(e && Rt(e) && e.name === "TypeError" && typeof e.message == "string")) return !1;
|
|
830
|
+
let { message: t, stack: n } = e;
|
|
831
|
+
return t === "Load failed" ? n === void 0 || "__sentry_captured__" in e : t.startsWith("error sending request for url") || t === "Failed to fetch" || t.startsWith("Failed to fetch (") && t.endsWith(")") ? !0 : zt.has(t);
|
|
1286
832
|
}
|
|
1287
833
|
//#endregion
|
|
1288
|
-
//#region ../../node_modules/.pnpm/
|
|
1289
|
-
var
|
|
1290
|
-
|
|
1291
|
-
return
|
|
1292
|
-
let a = n.loaded, o = n.lengthComputable ? n.total : void 0, s = a - r, c = i(s), l = a <= o;
|
|
1293
|
-
r = a, e({
|
|
1294
|
-
loaded: a,
|
|
1295
|
-
total: o,
|
|
1296
|
-
progress: o ? a / o : void 0,
|
|
1297
|
-
bytes: s,
|
|
1298
|
-
rate: c || void 0,
|
|
1299
|
-
estimated: c && o && l ? (o - a) / c : void 0,
|
|
1300
|
-
event: n,
|
|
1301
|
-
lengthComputable: o != null,
|
|
1302
|
-
[t ? "download" : "upload"]: !0
|
|
1303
|
-
});
|
|
1304
|
-
}, n);
|
|
1305
|
-
}, Zn = (e, t) => {
|
|
1306
|
-
let n = e != null;
|
|
1307
|
-
return [(r) => t[0]({
|
|
1308
|
-
lengthComputable: n,
|
|
1309
|
-
total: e,
|
|
1310
|
-
loaded: r
|
|
1311
|
-
}), t[1]];
|
|
1312
|
-
}, Qn = (e) => (...t) => J.asap(() => e(...t)), $n = X.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, X.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(X.origin), X.navigator && /(msie|trident)/i.test(X.navigator.userAgent)) : () => !0, er = X.hasStandardBrowserEnv ? {
|
|
1313
|
-
write(e, t, n, r, i, a, o) {
|
|
1314
|
-
if (typeof document > "u") return;
|
|
1315
|
-
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
1316
|
-
J.isNumber(n) && s.push(`expires=${new Date(n).toUTCString()}`), J.isString(r) && s.push(`path=${r}`), J.isString(i) && s.push(`domain=${i}`), a === !0 && s.push("secure"), J.isString(o) && s.push(`SameSite=${o}`), document.cookie = s.join("; ");
|
|
1317
|
-
},
|
|
1318
|
-
read(e) {
|
|
1319
|
-
if (typeof document > "u") return null;
|
|
1320
|
-
let t = document.cookie.match(RegExp("(?:^|; )" + e + "=([^;]*)"));
|
|
1321
|
-
return t ? decodeURIComponent(t[1]) : null;
|
|
1322
|
-
},
|
|
1323
|
-
remove(e) {
|
|
1324
|
-
this.write(e, "", Date.now() - 864e5, "/");
|
|
1325
|
-
}
|
|
1326
|
-
} : {
|
|
1327
|
-
write() {},
|
|
1328
|
-
read() {
|
|
1329
|
-
return null;
|
|
1330
|
-
},
|
|
1331
|
-
remove() {}
|
|
1332
|
-
};
|
|
1333
|
-
//#endregion
|
|
1334
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
1335
|
-
function tr(e) {
|
|
1336
|
-
return typeof e == "string" ? /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) : !1;
|
|
834
|
+
//#region ../../node_modules/.pnpm/ky@2.0.1/node_modules/ky/distribution/utils/type-guards.js
|
|
835
|
+
var Vt = (e, t) => e instanceof t || e?.name === t.name;
|
|
836
|
+
function Ht(e) {
|
|
837
|
+
return Vt(e, Je);
|
|
1337
838
|
}
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
function nr(e, t) {
|
|
1341
|
-
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
839
|
+
function Ut(e) {
|
|
840
|
+
return Vt(e, Ye);
|
|
1342
841
|
}
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
function rr(e, t, n) {
|
|
1346
|
-
let r = !tr(t);
|
|
1347
|
-
return e && (r || n == 0) ? nr(e, t) : t;
|
|
842
|
+
function Wt(e) {
|
|
843
|
+
return Vt(e, X);
|
|
1348
844
|
}
|
|
1349
845
|
//#endregion
|
|
1350
|
-
//#region ../../node_modules/.pnpm/
|
|
1351
|
-
var
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
846
|
+
//#region ../../node_modules/.pnpm/ky@2.0.1/node_modules/ky/distribution/core/Ky.js
|
|
847
|
+
var Gt = 10 * 1024 * 1024, Kt = "The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl", qt = Symbol("timedOutResponseData"), Jt = (e) => {
|
|
848
|
+
let t = /;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec(e), n = t?.[1] ?? t?.[2];
|
|
849
|
+
if (n) try {
|
|
850
|
+
return new TextDecoder(n);
|
|
851
|
+
} catch {}
|
|
852
|
+
return new TextDecoder();
|
|
853
|
+
}, Yt = "The `schema` argument must follow the Standard Schema specification", Xt = (e) => typeof e == "object" ? {
|
|
854
|
+
...e,
|
|
855
|
+
...e.methods && { methods: [...e.methods] },
|
|
856
|
+
...e.statusCodes && { statusCodes: [...e.statusCodes] },
|
|
857
|
+
...e.afterStatusCodes && { afterStatusCodes: [...e.afterStatusCodes] }
|
|
858
|
+
} : e, Zt = Object.prototype.toString, Qt = (e) => e instanceof globalThis.Request || Zt.call(e) === "[object Request]", $t = (e) => e instanceof globalThis.Response || Zt.call(e) === "[object Response]";
|
|
859
|
+
function en(e) {
|
|
860
|
+
let t = {
|
|
861
|
+
...e,
|
|
862
|
+
json: St(e.json),
|
|
863
|
+
context: St(e.context),
|
|
864
|
+
headers: St(e.headers),
|
|
865
|
+
searchParams: St(e.searchParams)
|
|
866
|
+
};
|
|
867
|
+
return e.retry !== void 0 && (t.retry = Xt(e.retry)), t;
|
|
868
|
+
}
|
|
869
|
+
var tn = async (e, t) => {
|
|
870
|
+
if (typeof t != "object" && typeof t != "function" || t === null) throw TypeError(Yt);
|
|
871
|
+
let n = t["~standard"];
|
|
872
|
+
if (typeof n != "object" || !n || typeof n.validate != "function") throw TypeError(Yt);
|
|
873
|
+
let r = await n.validate(e);
|
|
874
|
+
if (r.issues) throw new Qe(r.issues);
|
|
875
|
+
return r.value;
|
|
876
|
+
}, nn = class e {
|
|
877
|
+
static create(t, n) {
|
|
878
|
+
let r = n.hooks?.init ?? [], i = r.length > 0 ? en(n) : n;
|
|
879
|
+
for (let e of r) e(i);
|
|
880
|
+
let a = new e(t, i), o = async () => {
|
|
881
|
+
if (typeof a.#i.timeout == "number" && a.#i.timeout > 2147483647) throw RangeError(`The \`timeout\` option cannot be greater than ${ot}`);
|
|
882
|
+
if (typeof a.#i.totalTimeout == "number" && a.#i.totalTimeout > 2147483647) throw RangeError(`The \`totalTimeout\` option cannot be greater than ${ot}`);
|
|
883
|
+
await Promise.resolve();
|
|
884
|
+
let e = await a.#w(), t = e ?? await a.#E(async () => a.#k()), n = e !== void 0 || a.#O();
|
|
885
|
+
for (;;) {
|
|
886
|
+
if (t === void 0) return t;
|
|
887
|
+
if ($t(t)) try {
|
|
888
|
+
t = await a.#T(t);
|
|
889
|
+
} catch (e) {
|
|
890
|
+
if (!(e instanceof Ze)) throw e;
|
|
891
|
+
let r = await a.#D(e, async () => a.#k());
|
|
892
|
+
if (r === void 0) return r;
|
|
893
|
+
t = r, n = a.#O();
|
|
894
|
+
continue;
|
|
895
|
+
}
|
|
896
|
+
let e = t;
|
|
897
|
+
if (!e.ok && e.type !== "opaque" && (typeof a.#i.throwHttpErrors == "function" ? a.#i.throwHttpErrors(e.status) : a.#i.throwHttpErrors)) {
|
|
898
|
+
let r = new Je(e, a.#P(e), a.#M()), i = r;
|
|
899
|
+
if (r.data = await a.#h(e), n) throw i;
|
|
900
|
+
let o = await a.#D(r, async () => a.#k());
|
|
901
|
+
if (o === void 0) return o;
|
|
902
|
+
t = o, n = a.#O();
|
|
903
|
+
continue;
|
|
904
|
+
}
|
|
905
|
+
break;
|
|
906
|
+
}
|
|
907
|
+
if (!$t(t)) return t;
|
|
908
|
+
if (a.#m(t), a.#i.onDownloadProgress) {
|
|
909
|
+
if (typeof a.#i.onDownloadProgress != "function") throw TypeError("The `onDownloadProgress` option must be a function");
|
|
910
|
+
if (!nt) throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");
|
|
911
|
+
let e = t.clone();
|
|
912
|
+
return a.#x(t), ht(e, a.#i.onDownloadProgress);
|
|
913
|
+
}
|
|
914
|
+
return t;
|
|
915
|
+
}, s = (async () => {
|
|
916
|
+
try {
|
|
917
|
+
return await o();
|
|
918
|
+
} catch (e) {
|
|
919
|
+
if (!(e instanceof Error) || a.#s.has(e)) throw e;
|
|
920
|
+
let t = e;
|
|
921
|
+
for (let e of a.#i.hooks.beforeError) {
|
|
922
|
+
let n = await e({
|
|
923
|
+
request: a.request,
|
|
924
|
+
options: a.#M(),
|
|
925
|
+
error: t,
|
|
926
|
+
retryCount: a.#n
|
|
927
|
+
});
|
|
928
|
+
n instanceof Error && (t = n);
|
|
929
|
+
}
|
|
930
|
+
throw t;
|
|
931
|
+
} finally {
|
|
932
|
+
let e = a.#a;
|
|
933
|
+
a.#b(e?.body ?? void 0), a.request !== e && a.#b(a.request.body ?? void 0);
|
|
934
|
+
}
|
|
935
|
+
})();
|
|
936
|
+
for (let [e, t] of Object.entries(at)) e === "bytes" && typeof globalThis.Response?.prototype?.bytes != "function" || (s[e] = async (n) => {
|
|
937
|
+
a.request.headers.set("accept", a.request.headers.get("accept") || t);
|
|
938
|
+
let r = await s;
|
|
939
|
+
if (e !== "json") return r[e]();
|
|
940
|
+
let o = await r.text();
|
|
941
|
+
if (o === "") return n === void 0 ? JSON.parse(o) : tn(void 0, n);
|
|
942
|
+
let c = i.parseJson ? await i.parseJson(o, {
|
|
943
|
+
request: a.#P(r),
|
|
944
|
+
response: r
|
|
945
|
+
}) : JSON.parse(o);
|
|
946
|
+
return n === void 0 ? c : tn(c, n);
|
|
947
|
+
});
|
|
948
|
+
return s;
|
|
1368
949
|
}
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
if (a in e) return r(void 0, n);
|
|
950
|
+
static #e(e) {
|
|
951
|
+
return e && typeof e == "object" && !Array.isArray(e) && !(e instanceof URLSearchParams) ? Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0)) : e;
|
|
1372
952
|
}
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
let e
|
|
1421
|
-
|
|
1422
|
-
|
|
953
|
+
request;
|
|
954
|
+
#t;
|
|
955
|
+
#n = 0;
|
|
956
|
+
#r;
|
|
957
|
+
#i;
|
|
958
|
+
#a;
|
|
959
|
+
#o;
|
|
960
|
+
#s = /* @__PURE__ */ new WeakSet();
|
|
961
|
+
#c;
|
|
962
|
+
#l;
|
|
963
|
+
#u = !1;
|
|
964
|
+
#d = /* @__PURE__ */ new WeakMap();
|
|
965
|
+
constructor(t, n = {}) {
|
|
966
|
+
if (this.#r = t, Object.hasOwn(n, "prefixUrl")) throw Error(Kt);
|
|
967
|
+
if (this.#i = {
|
|
968
|
+
...n,
|
|
969
|
+
headers: bt(this.#r.headers, n.headers),
|
|
970
|
+
hooks: Et({}, n.hooks),
|
|
971
|
+
method: At(n.method ?? this.#r.method ?? "GET"),
|
|
972
|
+
prefix: String(n.prefix || ""),
|
|
973
|
+
retry: Mt(n.retry),
|
|
974
|
+
throwHttpErrors: n.throwHttpErrors ?? !0,
|
|
975
|
+
timeout: n.timeout ?? 1e4,
|
|
976
|
+
totalTimeout: n.totalTimeout ?? !1,
|
|
977
|
+
fetch: n.fetch ?? globalThis.fetch.bind(globalThis),
|
|
978
|
+
context: n.context ?? {}
|
|
979
|
+
}, typeof this.#r != "string" && !(this.#r instanceof URL || this.#r instanceof globalThis.Request)) throw TypeError("`input` must be a string, URL, or Request");
|
|
980
|
+
if (typeof this.#r == "string" && (this.#i.prefix && (this.#r = `${this.#i.prefix.replace(/\/+$/, "")}/${this.#r.replace(/^\/+/, "")}`), this.#i.baseUrl)) {
|
|
981
|
+
let e;
|
|
982
|
+
try {
|
|
983
|
+
e = new URL(this.#r);
|
|
984
|
+
} catch {}
|
|
985
|
+
e || (this.#r = new URL(this.#r, new Request(this.#i.baseUrl).url));
|
|
986
|
+
}
|
|
987
|
+
et && tt && (this.#o = this.#i.signal ?? this.#r.signal, this.#t = new globalThis.AbortController(), this.#i.signal = this.#S()), $e && (this.#i.duplex = "half"), this.#i.json !== void 0 && (this.#i.body = this.#i.stringifyJson?.(this.#i.json) ?? JSON.stringify(this.#i.json), this.#i.headers.set("content-type", this.#i.headers.get("content-type") ?? "application/json"));
|
|
988
|
+
let r = n.headers && new globalThis.Headers(n.headers).has("content-type");
|
|
989
|
+
if (this.#r instanceof globalThis.Request && (rt && this.#i.body instanceof globalThis.FormData || this.#i.body instanceof URLSearchParams) && !r && this.#i.headers.delete("content-type"), this.request = new globalThis.Request(this.#r, this.#i), It(this.#i.searchParams)) {
|
|
990
|
+
let t = new URL(this.request.url);
|
|
991
|
+
if (typeof this.#i.searchParams == "string") {
|
|
992
|
+
let e = this.#i.searchParams.replace(/^\?/, "");
|
|
993
|
+
e !== "" && (t.search = t.search ? `${t.search}&${e}` : `?${e}`);
|
|
994
|
+
} else {
|
|
995
|
+
let n = new URLSearchParams(e.#e(this.#i.searchParams));
|
|
996
|
+
for (let [e, r] of n.entries()) t.searchParams.append(e, r);
|
|
997
|
+
}
|
|
998
|
+
if (this.#i.searchParams && typeof this.#i.searchParams == "object" && !Array.isArray(this.#i.searchParams) && !(this.#i.searchParams instanceof URLSearchParams)) for (let [e, n] of Object.entries(this.#i.searchParams)) n === void 0 && t.searchParams.delete(e);
|
|
999
|
+
let n = this.#i.searchParams?.[Dt];
|
|
1000
|
+
if (n) for (let e of n) t.searchParams.delete(e);
|
|
1001
|
+
this.request = new globalThis.Request(t, this.#i);
|
|
1002
|
+
}
|
|
1003
|
+
if (this.#i.onUploadProgress && typeof this.#i.onUploadProgress != "function") throw TypeError("The `onUploadProgress` option must be a function");
|
|
1004
|
+
this.#l = typeof this.#i.totalTimeout == "number" ? this.#j() : void 0;
|
|
1005
|
+
}
|
|
1006
|
+
#f() {
|
|
1007
|
+
let e = this.#i.retry.delay(this.#n + 1), t = e;
|
|
1008
|
+
return this.#i.retry.jitter === !0 ? t = Math.random() * e : typeof this.#i.retry.jitter == "function" && (t = this.#i.retry.jitter(e), (!Number.isFinite(t) || t < 0) && (t = e)), Math.min(this.#i.retry.backoffLimit, t);
|
|
1009
|
+
}
|
|
1010
|
+
async #p(e) {
|
|
1011
|
+
if (this.#n >= this.#i.retry.limit) throw e;
|
|
1012
|
+
let t = e instanceof Error ? e : new Xe(e);
|
|
1013
|
+
if (t instanceof Ze) return t.customDelay ?? this.#f();
|
|
1014
|
+
if (!this.#i.retry.methods.includes(this.request.method.toLowerCase())) throw e;
|
|
1015
|
+
if (this.#i.retry.shouldRetry !== void 0) {
|
|
1016
|
+
let n = await this.#i.retry.shouldRetry({
|
|
1017
|
+
error: t,
|
|
1018
|
+
retryCount: this.#n + 1
|
|
1423
1019
|
});
|
|
1020
|
+
if (n === !1) throw e;
|
|
1021
|
+
if (n === !0) return this.#f();
|
|
1424
1022
|
}
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
e && o.set(i, e);
|
|
1429
|
-
}
|
|
1430
|
-
return t;
|
|
1431
|
-
}, sr = typeof XMLHttpRequest < "u" && function(e) {
|
|
1432
|
-
return new Promise(function(t, n) {
|
|
1433
|
-
let r = or(e), i = r.data, a = Z.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
1434
|
-
function m() {
|
|
1435
|
-
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1023
|
+
if (Wt(e)) {
|
|
1024
|
+
if (!this.#i.retry.retryOnTimeout) throw e;
|
|
1025
|
+
return this.#f();
|
|
1436
1026
|
}
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
if (
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
}, {
|
|
1447
|
-
data: !o || o === "text" || o === "json" ? h.responseText : h.response,
|
|
1448
|
-
status: h.status,
|
|
1449
|
-
statusText: h.statusText,
|
|
1450
|
-
headers: r,
|
|
1451
|
-
config: e,
|
|
1452
|
-
request: h
|
|
1453
|
-
}), h = null;
|
|
1027
|
+
if (Ht(e)) {
|
|
1028
|
+
if (!this.#i.retry.statusCodes.includes(e.response.status)) throw e;
|
|
1029
|
+
let t = e.response.headers.get("Retry-After") ?? e.response.headers.get("RateLimit-Reset") ?? e.response.headers.get("X-RateLimit-Retry-After") ?? e.response.headers.get("X-RateLimit-Reset") ?? e.response.headers.get("X-Rate-Limit-Reset");
|
|
1030
|
+
if (t && this.#i.retry.afterStatusCodes.includes(e.response.status)) {
|
|
1031
|
+
let e = Number(t) * 1e3;
|
|
1032
|
+
return Number.isNaN(e) ? e = Date.parse(t) - Date.now() : e >= Date.parse("2024-01-01") && (e -= Date.now()), Number.isFinite(e) ? (e = Math.max(0, e), Math.min(this.#i.retry.maxRetryAfter, e)) : Math.min(this.#i.retry.maxRetryAfter, this.#f());
|
|
1033
|
+
}
|
|
1034
|
+
if (e.response.status === 413) throw e;
|
|
1035
|
+
return this.#f();
|
|
1454
1036
|
}
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
n(new Y("Unsupported protocol " + _ + ":", Y.ERR_BAD_REQUEST, e));
|
|
1037
|
+
if (!Ut(e)) throw e;
|
|
1038
|
+
return this.#f();
|
|
1039
|
+
}
|
|
1040
|
+
#m(e) {
|
|
1041
|
+
let t = this.#P(e);
|
|
1042
|
+
return this.#i.parseJson && (e.json = async () => {
|
|
1043
|
+
let n = await e.text();
|
|
1044
|
+
return n === "" ? JSON.parse(n) : this.#i.parseJson(n, {
|
|
1045
|
+
request: t,
|
|
1046
|
+
response: e
|
|
1047
|
+
});
|
|
1048
|
+
}), e;
|
|
1049
|
+
}
|
|
1050
|
+
async #h(e) {
|
|
1051
|
+
let t = await this.#v(e, this.#g());
|
|
1052
|
+
if (t === qt) {
|
|
1053
|
+
this.#C();
|
|
1473
1054
|
return;
|
|
1474
1055
|
}
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
let t = e instanceof Error ? e : this.reason;
|
|
1484
|
-
n.abort(t instanceof Y ? t : new Gn(t instanceof Error ? t.message : t));
|
|
1485
|
-
}
|
|
1486
|
-
}, a = t && setTimeout(() => {
|
|
1487
|
-
a = null, i(new Y(`timeout of ${t}ms exceeded`, Y.ETIMEDOUT));
|
|
1488
|
-
}, t), o = () => {
|
|
1489
|
-
e &&= (a && clearTimeout(a), a = null, e.forEach((e) => {
|
|
1490
|
-
e.unsubscribe ? e.unsubscribe(i) : e.removeEventListener("abort", i);
|
|
1491
|
-
}), null);
|
|
1492
|
-
};
|
|
1493
|
-
e.forEach((e) => e.addEventListener("abort", i));
|
|
1494
|
-
let { signal: s } = n;
|
|
1495
|
-
return s.unsubscribe = () => J.asap(o), s;
|
|
1056
|
+
if (!t) return;
|
|
1057
|
+
if (!this.#_(e.headers.get("content-type") ?? "")) return t;
|
|
1058
|
+
let n = await this.#y(t, e, this.#g(), this.#P(e));
|
|
1059
|
+
if (n === qt) {
|
|
1060
|
+
this.#C();
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1063
|
+
return n;
|
|
1496
1064
|
}
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
return;
|
|
1065
|
+
#g() {
|
|
1066
|
+
let e = this.#i.timeout === !1 ? 1e4 : this.#i.timeout, t = this.#A();
|
|
1067
|
+
if (t === void 0) return e;
|
|
1068
|
+
if (t <= 0) throw new X(this.request);
|
|
1069
|
+
return Math.min(e, t);
|
|
1502
1070
|
}
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
for await (let n of dr(e)) yield* lr(n, t);
|
|
1507
|
-
}, dr = async function* (e) {
|
|
1508
|
-
if (e[Symbol.asyncIterator]) {
|
|
1509
|
-
yield* e;
|
|
1510
|
-
return;
|
|
1071
|
+
#_(e) {
|
|
1072
|
+
let t = (e.split(";", 1)[0] ?? "").trim().toLowerCase();
|
|
1073
|
+
return /\/(?:.*[.+-])?json$/.test(t);
|
|
1511
1074
|
}
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1075
|
+
async #v(e, t) {
|
|
1076
|
+
let { body: n } = e;
|
|
1077
|
+
if (!n) try {
|
|
1078
|
+
return await e.text();
|
|
1079
|
+
} catch {
|
|
1080
|
+
return;
|
|
1518
1081
|
}
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
return new ReadableStream({
|
|
1527
|
-
async pull(e) {
|
|
1082
|
+
let r;
|
|
1083
|
+
try {
|
|
1084
|
+
r = n.getReader();
|
|
1085
|
+
} catch {
|
|
1086
|
+
return;
|
|
1087
|
+
}
|
|
1088
|
+
let i = Jt(e.headers.get("content-type") ?? ""), a = [], o = 0, s = (async () => {
|
|
1528
1089
|
try {
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1090
|
+
for (;;) {
|
|
1091
|
+
let { done: e, value: t } = await r.read();
|
|
1092
|
+
if (e) break;
|
|
1093
|
+
if (o += t.byteLength, o > Gt) {
|
|
1094
|
+
r.cancel().catch(() => void 0);
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1097
|
+
a.push(i.decode(t, { stream: !0 }));
|
|
1533
1098
|
}
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
} catch (e) {
|
|
1537
|
-
throw s(e), e;
|
|
1099
|
+
} catch {
|
|
1100
|
+
return;
|
|
1538
1101
|
}
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
})
|
|
1548
|
-
|
|
1549
|
-
return !!e(...t);
|
|
1550
|
-
} catch {
|
|
1551
|
-
return !1;
|
|
1102
|
+
return a.push(i.decode()), a.join("");
|
|
1103
|
+
})(), c = new Promise((e) => {
|
|
1104
|
+
let n = setTimeout(() => {
|
|
1105
|
+
e(qt);
|
|
1106
|
+
}, t);
|
|
1107
|
+
s.finally(() => {
|
|
1108
|
+
clearTimeout(n);
|
|
1109
|
+
});
|
|
1110
|
+
}), l = await Promise.race([s, c]);
|
|
1111
|
+
return l === qt && r.cancel().catch(() => void 0), l;
|
|
1552
1112
|
}
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
let { fetch: t, Request: n, Response: r } = e, i = t ? mr(t) : typeof fetch == "function", a = mr(n), o = mr(r);
|
|
1556
|
-
if (!i) return !1;
|
|
1557
|
-
let s = i && mr(gr), c = i && (typeof _r == "function" ? ((e) => (t) => e.encode(t))(new _r()) : async (e) => new Uint8Array(await new n(e).arrayBuffer())), l = a && s && vr(() => {
|
|
1558
|
-
let e = !1, t = new gr(), r = new n(X.origin, {
|
|
1559
|
-
body: t,
|
|
1560
|
-
method: "POST",
|
|
1561
|
-
get duplex() {
|
|
1562
|
-
return e = !0, "half";
|
|
1563
|
-
}
|
|
1564
|
-
}).headers.has("Content-Type");
|
|
1565
|
-
return t.cancel(), e && !r;
|
|
1566
|
-
}), u = o && s && vr(() => J.isReadableStream(new r("").body)), d = { stream: u && ((e) => e.body) };
|
|
1567
|
-
i && [
|
|
1568
|
-
"text",
|
|
1569
|
-
"arrayBuffer",
|
|
1570
|
-
"blob",
|
|
1571
|
-
"formData",
|
|
1572
|
-
"stream"
|
|
1573
|
-
].forEach((e) => {
|
|
1574
|
-
!d[e] && (d[e] = (t, n) => {
|
|
1575
|
-
let r = t && t[e];
|
|
1576
|
-
if (r) return r.call(t);
|
|
1577
|
-
throw new Y(`Response type '${e}' is not supported`, Y.ERR_NOT_SUPPORT, n);
|
|
1578
|
-
});
|
|
1579
|
-
});
|
|
1580
|
-
let f = async (e) => {
|
|
1581
|
-
if (e == null) return 0;
|
|
1582
|
-
if (J.isBlob(e)) return e.size;
|
|
1583
|
-
if (J.isSpecCompliantForm(e)) return (await new n(X.origin, {
|
|
1584
|
-
method: "POST",
|
|
1585
|
-
body: e
|
|
1586
|
-
}).arrayBuffer()).byteLength;
|
|
1587
|
-
if (J.isArrayBufferView(e) || J.isArrayBuffer(e)) return e.byteLength;
|
|
1588
|
-
if (J.isURLSearchParams(e) && (e += ""), J.isString(e)) return (await c(e)).byteLength;
|
|
1589
|
-
}, p = async (e, t) => J.toFiniteNumber(e.getContentLength()) ?? f(t);
|
|
1590
|
-
return async (e) => {
|
|
1591
|
-
let { url: i, method: o, data: s, signal: c, cancelToken: f, timeout: m, onDownloadProgress: h, onUploadProgress: g, responseType: _, headers: v, withCredentials: y = "same-origin", fetchOptions: b } = or(e), x = t || fetch;
|
|
1592
|
-
_ = _ ? (_ + "").toLowerCase() : "text";
|
|
1593
|
-
let S = cr([c, f && f.toAbortSignal()], m), C = null, w = S && S.unsubscribe && (() => {
|
|
1594
|
-
S.unsubscribe();
|
|
1595
|
-
}), T;
|
|
1113
|
+
async #y(e, t, n, r) {
|
|
1114
|
+
let i;
|
|
1596
1115
|
try {
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
let t = a && "credentials" in n.prototype, c = {
|
|
1610
|
-
...b,
|
|
1611
|
-
signal: S,
|
|
1612
|
-
method: o.toUpperCase(),
|
|
1613
|
-
headers: v.normalize().toJSON(),
|
|
1614
|
-
body: s,
|
|
1615
|
-
duplex: "half",
|
|
1616
|
-
credentials: t ? y : void 0
|
|
1617
|
-
};
|
|
1618
|
-
C = a && new n(i, c);
|
|
1619
|
-
let f = await (a ? x(C, b) : x(i, c)), m = u && (_ === "stream" || _ === "response");
|
|
1620
|
-
if (u && (h || m && w)) {
|
|
1621
|
-
let e = {};
|
|
1622
|
-
[
|
|
1623
|
-
"status",
|
|
1624
|
-
"statusText",
|
|
1625
|
-
"headers"
|
|
1626
|
-
].forEach((t) => {
|
|
1627
|
-
e[t] = f[t];
|
|
1628
|
-
});
|
|
1629
|
-
let t = J.toFiniteNumber(f.headers.get("content-length")), [n, i] = h && Zn(t, Xn(Qn(h), !0)) || [];
|
|
1630
|
-
f = new r(fr(f.body, pr, n, () => {
|
|
1631
|
-
i && i(), w && w();
|
|
1632
|
-
}), e);
|
|
1633
|
-
}
|
|
1634
|
-
_ ||= "text";
|
|
1635
|
-
let E = await d[J.findKey(d, _) || "text"](f, e);
|
|
1636
|
-
return !m && w && w(), await new Promise((t, n) => {
|
|
1637
|
-
Kn(t, n, {
|
|
1638
|
-
data: E,
|
|
1639
|
-
headers: Z.from(f.headers),
|
|
1640
|
-
status: f.status,
|
|
1641
|
-
statusText: f.statusText,
|
|
1642
|
-
config: e,
|
|
1643
|
-
request: C
|
|
1644
|
-
});
|
|
1645
|
-
});
|
|
1646
|
-
} catch (t) {
|
|
1647
|
-
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new Y("Network Error", Y.ERR_NETWORK, e, C, t && t.response), { cause: t.cause || t }) : Y.from(t, t && t.code, e, C, t && t.response);
|
|
1116
|
+
return await Promise.race([Promise.resolve().then(() => this.#i.parseJson ? this.#i.parseJson(e, {
|
|
1117
|
+
request: r,
|
|
1118
|
+
response: t
|
|
1119
|
+
}) : JSON.parse(e)), new Promise((e) => {
|
|
1120
|
+
i = setTimeout(() => {
|
|
1121
|
+
e(qt);
|
|
1122
|
+
}, n);
|
|
1123
|
+
})]);
|
|
1124
|
+
} catch {
|
|
1125
|
+
return;
|
|
1126
|
+
} finally {
|
|
1127
|
+
clearTimeout(i);
|
|
1648
1128
|
}
|
|
1649
|
-
};
|
|
1650
|
-
}, br = /* @__PURE__ */ new Map(), xr = (e) => {
|
|
1651
|
-
let t = e && e.env || {}, { fetch: n, Request: r, Response: i } = t, a = [
|
|
1652
|
-
r,
|
|
1653
|
-
i,
|
|
1654
|
-
n
|
|
1655
|
-
], o = a.length, s, c, l = br;
|
|
1656
|
-
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() : yr(t)), l = c;
|
|
1657
|
-
return c;
|
|
1658
|
-
};
|
|
1659
|
-
xr();
|
|
1660
|
-
//#endregion
|
|
1661
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/adapters/adapters.js
|
|
1662
|
-
var Sr = {
|
|
1663
|
-
http: null,
|
|
1664
|
-
xhr: sr,
|
|
1665
|
-
fetch: { get: xr }
|
|
1666
|
-
};
|
|
1667
|
-
J.forEach(Sr, (e, t) => {
|
|
1668
|
-
if (e) {
|
|
1669
|
-
try {
|
|
1670
|
-
Object.defineProperty(e, "name", { value: t });
|
|
1671
|
-
} catch {}
|
|
1672
|
-
Object.defineProperty(e, "adapterName", { value: t });
|
|
1673
1129
|
}
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
function Tr(e, t) {
|
|
1677
|
-
e = J.isArray(e) ? e : [e];
|
|
1678
|
-
let { length: n } = e, r, i, a = {};
|
|
1679
|
-
for (let o = 0; o < n; o++) {
|
|
1680
|
-
r = e[o];
|
|
1681
|
-
let n;
|
|
1682
|
-
if (i = r, !wr(r) && (i = Sr[(n = String(r)).toLowerCase()], i === void 0)) throw new Y(`Unknown adapter '${n}'`);
|
|
1683
|
-
if (i && (J.isFunction(i) || (i = i.get(t)))) break;
|
|
1684
|
-
a[n || "#" + o] = i;
|
|
1130
|
+
#b(e) {
|
|
1131
|
+
e && e.cancel().catch(() => void 0);
|
|
1685
1132
|
}
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
throw new Y("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(Cr).join("\n") : " " + Cr(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
1133
|
+
#x(e) {
|
|
1134
|
+
this.#b(e.body ?? void 0);
|
|
1689
1135
|
}
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
var Er = {
|
|
1693
|
-
getAdapter: Tr,
|
|
1694
|
-
adapters: Sr
|
|
1695
|
-
};
|
|
1696
|
-
//#endregion
|
|
1697
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/core/dispatchRequest.js
|
|
1698
|
-
function Dr(e) {
|
|
1699
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Gn(null, e);
|
|
1700
|
-
}
|
|
1701
|
-
function Or(e) {
|
|
1702
|
-
return Dr(e), e.headers = Z.from(e.headers), e.data = Un.call(e, e.transformRequest), [
|
|
1703
|
-
"post",
|
|
1704
|
-
"put",
|
|
1705
|
-
"patch"
|
|
1706
|
-
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Er.getAdapter(e.adapter || Mn.adapter, e)(e).then(function(t) {
|
|
1707
|
-
return Dr(e), t.data = Un.call(e, e.transformResponse, t), t.headers = Z.from(t.headers), t;
|
|
1708
|
-
}, function(t) {
|
|
1709
|
-
return Wn(t) || (Dr(e), t && t.response && (t.response.data = Un.call(e, e.transformResponse, t.response), t.response.headers = Z.from(t.response.headers))), Promise.reject(t);
|
|
1710
|
-
});
|
|
1711
|
-
}
|
|
1712
|
-
//#endregion
|
|
1713
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/env/data.js
|
|
1714
|
-
var kr = "1.14.0", Ar = {};
|
|
1715
|
-
[
|
|
1716
|
-
"object",
|
|
1717
|
-
"boolean",
|
|
1718
|
-
"number",
|
|
1719
|
-
"function",
|
|
1720
|
-
"string",
|
|
1721
|
-
"symbol"
|
|
1722
|
-
].forEach((e, t) => {
|
|
1723
|
-
Ar[e] = function(n) {
|
|
1724
|
-
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1725
|
-
};
|
|
1726
|
-
});
|
|
1727
|
-
var jr = {};
|
|
1728
|
-
Ar.transitional = function(e, t, n) {
|
|
1729
|
-
function r(e, t) {
|
|
1730
|
-
return "[Axios v" + kr + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
1136
|
+
#S() {
|
|
1137
|
+
return this.#o ? AbortSignal.any([this.#o, this.#t.signal]) : this.#t.signal;
|
|
1731
1138
|
}
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
let t = e[a], n = t === void 0 || o(t, a, e);
|
|
1746
|
-
if (n !== !0) throw new Y("option " + a + " must be " + n, Y.ERR_BAD_OPTION_VALUE);
|
|
1747
|
-
continue;
|
|
1139
|
+
#C() {
|
|
1140
|
+
let e = this.#A();
|
|
1141
|
+
if (e !== void 0 && e <= 0) throw new X(this.request);
|
|
1142
|
+
}
|
|
1143
|
+
async #w() {
|
|
1144
|
+
for (let e of this.#i.hooks.beforeRequest) {
|
|
1145
|
+
let t = await e({
|
|
1146
|
+
request: this.request,
|
|
1147
|
+
options: this.#M(),
|
|
1148
|
+
retryCount: 0
|
|
1149
|
+
});
|
|
1150
|
+
if (Qt(t)) this.#N(t);
|
|
1151
|
+
else if ($t(t)) return t;
|
|
1748
1152
|
}
|
|
1749
|
-
if (n !== !0) throw new Y("Unknown option " + a, Y.ERR_BAD_OPTION);
|
|
1750
1153
|
}
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1154
|
+
async #T(e) {
|
|
1155
|
+
let t = this.#P(e);
|
|
1156
|
+
for (let n of this.#i.hooks.afterResponse) {
|
|
1157
|
+
let r = this.#F(e.clone(), t);
|
|
1158
|
+
this.#m(r);
|
|
1159
|
+
let i;
|
|
1160
|
+
try {
|
|
1161
|
+
i = await n({
|
|
1162
|
+
request: this.request,
|
|
1163
|
+
options: this.#M(),
|
|
1164
|
+
response: r,
|
|
1165
|
+
retryCount: this.#n
|
|
1166
|
+
});
|
|
1167
|
+
} catch (t) {
|
|
1168
|
+
throw r !== e && this.#x(r), this.#x(e), t;
|
|
1169
|
+
}
|
|
1170
|
+
if (i instanceof ct) throw r !== e && this.#x(r), this.#x(e), new Ze(i.options);
|
|
1171
|
+
let a = $t(i) ? this.#F(i, t) : e;
|
|
1172
|
+
r !== e && r !== a && r.body !== a.body && this.#x(r), e !== a && e.body !== a.body && this.#x(e), e = a;
|
|
1173
|
+
}
|
|
1174
|
+
return e;
|
|
1761
1175
|
}
|
|
1762
|
-
async
|
|
1176
|
+
async #E(e) {
|
|
1763
1177
|
try {
|
|
1764
|
-
return await
|
|
1765
|
-
} catch (
|
|
1766
|
-
|
|
1767
|
-
let t = {};
|
|
1768
|
-
Error.captureStackTrace ? Error.captureStackTrace(t) : t = /* @__PURE__ */ Error();
|
|
1769
|
-
let n = t.stack ? t.stack.replace(/^.+\n/, "") : "";
|
|
1770
|
-
try {
|
|
1771
|
-
e.stack ? n && !String(e.stack).endsWith(n.replace(/^.+\n.+\n/, "")) && (e.stack += "\n" + n) : e.stack = n;
|
|
1772
|
-
} catch {}
|
|
1773
|
-
}
|
|
1774
|
-
throw e;
|
|
1178
|
+
return await e();
|
|
1179
|
+
} catch (t) {
|
|
1180
|
+
return this.#D(t, e);
|
|
1775
1181
|
}
|
|
1776
1182
|
}
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
let
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
clarifyTimeoutError: Q.transitional(Q.boolean),
|
|
1784
|
-
legacyInterceptorReqResOrdering: Q.transitional(Q.boolean)
|
|
1785
|
-
}, !1), r != null && (J.isFunction(r) ? t.paramsSerializer = { serialize: r } : Nr.assertOptions(r, {
|
|
1786
|
-
encode: Q.function,
|
|
1787
|
-
serialize: Q.function
|
|
1788
|
-
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), Nr.assertOptions(t, {
|
|
1789
|
-
baseUrl: Q.spelling("baseURL"),
|
|
1790
|
-
withXsrfToken: Q.spelling("withXSRFToken")
|
|
1791
|
-
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1792
|
-
let a = i && J.merge(i.common, i[t.method]);
|
|
1793
|
-
i && J.forEach([
|
|
1794
|
-
"delete",
|
|
1795
|
-
"get",
|
|
1796
|
-
"head",
|
|
1797
|
-
"post",
|
|
1798
|
-
"put",
|
|
1799
|
-
"patch",
|
|
1800
|
-
"common"
|
|
1801
|
-
], (e) => {
|
|
1802
|
-
delete i[e];
|
|
1803
|
-
}), t.headers = Z.concat(a, i);
|
|
1804
|
-
let o = [], s = !0;
|
|
1805
|
-
this.interceptors.request.forEach(function(e) {
|
|
1806
|
-
if (typeof e.runWhen == "function" && e.runWhen(t) === !1) return;
|
|
1807
|
-
s &&= e.synchronous;
|
|
1808
|
-
let n = t.transitional || yn;
|
|
1809
|
-
n && n.legacyInterceptorReqResOrdering ? o.unshift(e.fulfilled, e.rejected) : o.push(e.fulfilled, e.rejected);
|
|
1810
|
-
});
|
|
1811
|
-
let c = [];
|
|
1812
|
-
this.interceptors.response.forEach(function(e) {
|
|
1813
|
-
c.push(e.fulfilled, e.rejected);
|
|
1814
|
-
});
|
|
1815
|
-
let l, u = 0, d;
|
|
1816
|
-
if (!s) {
|
|
1817
|
-
let e = [Or.bind(this), void 0];
|
|
1818
|
-
for (e.unshift(...o), e.push(...c), d = e.length, l = Promise.resolve(t); u < d;) l = l.then(e[u++], e[u++]);
|
|
1819
|
-
return l;
|
|
1183
|
+
async #D(e, t) {
|
|
1184
|
+
this.#u = !1;
|
|
1185
|
+
let n = Math.min(await this.#p(e), ot), r = { signal: this.#o }, i = this.#A();
|
|
1186
|
+
if (i !== void 0) {
|
|
1187
|
+
if (i <= 0) throw new X(this.request);
|
|
1188
|
+
if (n >= i) throw await Pt(i, r), new X(this.request);
|
|
1820
1189
|
}
|
|
1821
|
-
|
|
1822
|
-
let
|
|
1823
|
-
|
|
1824
|
-
let e = o[u++], t = o[u++];
|
|
1190
|
+
await Pt(n, r), this.#C(), e instanceof Ze && e.customRequest && this.#N(new globalThis.Request(e.customRequest, this.#i.signal ? { signal: this.#i.signal } : void 0));
|
|
1191
|
+
for (let t of this.#i.hooks.beforeRetry) {
|
|
1192
|
+
let n;
|
|
1825
1193
|
try {
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1194
|
+
n = await t({
|
|
1195
|
+
request: this.request,
|
|
1196
|
+
options: this.#M(),
|
|
1197
|
+
error: e,
|
|
1198
|
+
retryCount: this.#n + 1
|
|
1199
|
+
});
|
|
1200
|
+
} catch (t) {
|
|
1201
|
+
throw t instanceof Error && t !== e && this.#s.add(t), t;
|
|
1202
|
+
}
|
|
1203
|
+
if (Qt(n)) {
|
|
1204
|
+
this.#N(n);
|
|
1829
1205
|
break;
|
|
1830
1206
|
}
|
|
1207
|
+
if ($t(n)) return this.#u = !0, this.#n++, n;
|
|
1208
|
+
if (n === st) return;
|
|
1831
1209
|
}
|
|
1210
|
+
return this.#C(), this.#n++, this.#E(t);
|
|
1211
|
+
}
|
|
1212
|
+
#O() {
|
|
1213
|
+
let e = this.#u;
|
|
1214
|
+
return this.#u = !1, e;
|
|
1215
|
+
}
|
|
1216
|
+
async #k() {
|
|
1217
|
+
this.#t?.signal.aborted && (this.#t = new globalThis.AbortController(), this.#i.signal = this.#S(), this.request = new globalThis.Request(this.request, { signal: this.#i.signal }));
|
|
1218
|
+
let e = Ft(this.#i), t = this.#i.retry.limit > 0 ? this.request.clone() : void 0, n = this.#I(this.request, this.#i.body ?? void 0);
|
|
1219
|
+
this.#a = n, t && (this.request = t);
|
|
1832
1220
|
try {
|
|
1833
|
-
|
|
1221
|
+
let t = this.#A();
|
|
1222
|
+
if (t !== void 0 && t <= 0) throw new X(this.request);
|
|
1223
|
+
let r = this.#i.timeout === !1 ? t : t === void 0 ? this.#i.timeout : Math.min(this.#i.timeout, t), i = r === void 0 ? await this.#i.fetch(n, e) : await Nt(n, e, this.#t, {
|
|
1224
|
+
timeout: r,
|
|
1225
|
+
fetch: this.#i.fetch
|
|
1226
|
+
});
|
|
1227
|
+
return this.#F(i, n);
|
|
1834
1228
|
} catch (e) {
|
|
1835
|
-
|
|
1229
|
+
throw Bt(e) ? new Ye(this.request, { cause: e }) : e;
|
|
1836
1230
|
}
|
|
1837
|
-
for (u = 0, d = c.length; u < d;) l = l.then(c[u++], c[u++]);
|
|
1838
|
-
return l;
|
|
1839
|
-
}
|
|
1840
|
-
getUri(e) {
|
|
1841
|
-
return e = ar(this.defaults, e), _n(rr(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1842
1231
|
}
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
"head",
|
|
1848
|
-
"options"
|
|
1849
|
-
], function(e) {
|
|
1850
|
-
Pr.prototype[e] = function(t, n) {
|
|
1851
|
-
return this.request(ar(n || {}, {
|
|
1852
|
-
method: e,
|
|
1853
|
-
url: t,
|
|
1854
|
-
data: (n || {}).data
|
|
1855
|
-
}));
|
|
1856
|
-
};
|
|
1857
|
-
}), J.forEach([
|
|
1858
|
-
"post",
|
|
1859
|
-
"put",
|
|
1860
|
-
"patch"
|
|
1861
|
-
], function(e) {
|
|
1862
|
-
function t(t) {
|
|
1863
|
-
return function(n, r, i) {
|
|
1864
|
-
return this.request(ar(i || {}, {
|
|
1865
|
-
method: e,
|
|
1866
|
-
headers: t ? { "Content-Type": "multipart/form-data" } : {},
|
|
1867
|
-
url: n,
|
|
1868
|
-
data: r
|
|
1869
|
-
}));
|
|
1870
|
-
};
|
|
1232
|
+
#A() {
|
|
1233
|
+
if (this.#l === void 0) return;
|
|
1234
|
+
let e = this.#j() - this.#l;
|
|
1235
|
+
return Math.max(0, this.#i.totalTimeout - e);
|
|
1871
1236
|
}
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
//#endregion
|
|
1875
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/cancel/CancelToken.js
|
|
1876
|
-
var Fr = class e {
|
|
1877
|
-
constructor(e) {
|
|
1878
|
-
if (typeof e != "function") throw TypeError("executor must be a function.");
|
|
1879
|
-
let t;
|
|
1880
|
-
this.promise = new Promise(function(e) {
|
|
1881
|
-
t = e;
|
|
1882
|
-
});
|
|
1883
|
-
let n = this;
|
|
1884
|
-
this.promise.then((e) => {
|
|
1885
|
-
if (!n._listeners) return;
|
|
1886
|
-
let t = n._listeners.length;
|
|
1887
|
-
for (; t-- > 0;) n._listeners[t](e);
|
|
1888
|
-
n._listeners = null;
|
|
1889
|
-
}), this.promise.then = (e) => {
|
|
1890
|
-
let t, r = new Promise((e) => {
|
|
1891
|
-
n.subscribe(e), t = e;
|
|
1892
|
-
}).then(e);
|
|
1893
|
-
return r.cancel = function() {
|
|
1894
|
-
n.unsubscribe(t);
|
|
1895
|
-
}, r;
|
|
1896
|
-
}, e(function(e, r, i) {
|
|
1897
|
-
n.reason || (n.reason = new Gn(e, r, i), t(n.reason));
|
|
1898
|
-
});
|
|
1899
|
-
}
|
|
1900
|
-
throwIfRequested() {
|
|
1901
|
-
if (this.reason) throw this.reason;
|
|
1237
|
+
#j() {
|
|
1238
|
+
return globalThis.performance?.now() ?? Date.now();
|
|
1902
1239
|
}
|
|
1903
|
-
|
|
1904
|
-
if (this
|
|
1905
|
-
e
|
|
1906
|
-
|
|
1240
|
+
#M() {
|
|
1241
|
+
if (!this.#c) {
|
|
1242
|
+
let { hooks: e, json: t, parseJson: n, stringifyJson: r, searchParams: i, timeout: a, totalTimeout: o, throwHttpErrors: s, fetch: c, ...l } = this.#i;
|
|
1243
|
+
this.#c = Object.freeze(l);
|
|
1907
1244
|
}
|
|
1908
|
-
|
|
1245
|
+
return this.#c;
|
|
1909
1246
|
}
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
let t = this._listeners.indexOf(e);
|
|
1913
|
-
t !== -1 && this._listeners.splice(t, 1);
|
|
1247
|
+
#N(e) {
|
|
1248
|
+
this.#c = void 0, this.request = e;
|
|
1914
1249
|
}
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
e.abort(t);
|
|
1918
|
-
};
|
|
1919
|
-
return this.subscribe(t), e.signal.unsubscribe = () => this.unsubscribe(t), e.signal;
|
|
1250
|
+
#P(e) {
|
|
1251
|
+
return this.#d.get(e) ?? this.request;
|
|
1920
1252
|
}
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
return {
|
|
1924
|
-
token: new e(function(e) {
|
|
1925
|
-
t = e;
|
|
1926
|
-
}),
|
|
1927
|
-
cancel: t
|
|
1928
|
-
};
|
|
1253
|
+
#F(e, t) {
|
|
1254
|
+
return this.#d.set(e, t), e;
|
|
1929
1255
|
}
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
};
|
|
1937
|
-
}
|
|
1938
|
-
//#endregion
|
|
1939
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/isAxiosError.js
|
|
1940
|
-
function Lr(e) {
|
|
1941
|
-
return J.isObject(e) && e.isAxiosError === !0;
|
|
1942
|
-
}
|
|
1943
|
-
//#endregion
|
|
1944
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
1945
|
-
var Rr = {
|
|
1946
|
-
Continue: 100,
|
|
1947
|
-
SwitchingProtocols: 101,
|
|
1948
|
-
Processing: 102,
|
|
1949
|
-
EarlyHints: 103,
|
|
1950
|
-
Ok: 200,
|
|
1951
|
-
Created: 201,
|
|
1952
|
-
Accepted: 202,
|
|
1953
|
-
NonAuthoritativeInformation: 203,
|
|
1954
|
-
NoContent: 204,
|
|
1955
|
-
ResetContent: 205,
|
|
1956
|
-
PartialContent: 206,
|
|
1957
|
-
MultiStatus: 207,
|
|
1958
|
-
AlreadyReported: 208,
|
|
1959
|
-
ImUsed: 226,
|
|
1960
|
-
MultipleChoices: 300,
|
|
1961
|
-
MovedPermanently: 301,
|
|
1962
|
-
Found: 302,
|
|
1963
|
-
SeeOther: 303,
|
|
1964
|
-
NotModified: 304,
|
|
1965
|
-
UseProxy: 305,
|
|
1966
|
-
Unused: 306,
|
|
1967
|
-
TemporaryRedirect: 307,
|
|
1968
|
-
PermanentRedirect: 308,
|
|
1969
|
-
BadRequest: 400,
|
|
1970
|
-
Unauthorized: 401,
|
|
1971
|
-
PaymentRequired: 402,
|
|
1972
|
-
Forbidden: 403,
|
|
1973
|
-
NotFound: 404,
|
|
1974
|
-
MethodNotAllowed: 405,
|
|
1975
|
-
NotAcceptable: 406,
|
|
1976
|
-
ProxyAuthenticationRequired: 407,
|
|
1977
|
-
RequestTimeout: 408,
|
|
1978
|
-
Conflict: 409,
|
|
1979
|
-
Gone: 410,
|
|
1980
|
-
LengthRequired: 411,
|
|
1981
|
-
PreconditionFailed: 412,
|
|
1982
|
-
PayloadTooLarge: 413,
|
|
1983
|
-
UriTooLong: 414,
|
|
1984
|
-
UnsupportedMediaType: 415,
|
|
1985
|
-
RangeNotSatisfiable: 416,
|
|
1986
|
-
ExpectationFailed: 417,
|
|
1987
|
-
ImATeapot: 418,
|
|
1988
|
-
MisdirectedRequest: 421,
|
|
1989
|
-
UnprocessableEntity: 422,
|
|
1990
|
-
Locked: 423,
|
|
1991
|
-
FailedDependency: 424,
|
|
1992
|
-
TooEarly: 425,
|
|
1993
|
-
UpgradeRequired: 426,
|
|
1994
|
-
PreconditionRequired: 428,
|
|
1995
|
-
TooManyRequests: 429,
|
|
1996
|
-
RequestHeaderFieldsTooLarge: 431,
|
|
1997
|
-
UnavailableForLegalReasons: 451,
|
|
1998
|
-
InternalServerError: 500,
|
|
1999
|
-
NotImplemented: 501,
|
|
2000
|
-
BadGateway: 502,
|
|
2001
|
-
ServiceUnavailable: 503,
|
|
2002
|
-
GatewayTimeout: 504,
|
|
2003
|
-
HttpVersionNotSupported: 505,
|
|
2004
|
-
VariantAlsoNegotiates: 506,
|
|
2005
|
-
InsufficientStorage: 507,
|
|
2006
|
-
LoopDetected: 508,
|
|
2007
|
-
NotExtended: 510,
|
|
2008
|
-
NetworkAuthenticationRequired: 511,
|
|
2009
|
-
WebServerIsDown: 521,
|
|
2010
|
-
ConnectionTimedOut: 522,
|
|
2011
|
-
OriginIsUnreachable: 523,
|
|
2012
|
-
TimeoutOccurred: 524,
|
|
2013
|
-
SslHandshakeFailed: 525,
|
|
2014
|
-
InvalidSslCertificate: 526
|
|
2015
|
-
};
|
|
2016
|
-
Object.entries(Rr).forEach(([e, t]) => {
|
|
2017
|
-
Rr[t] = e;
|
|
2018
|
-
});
|
|
2019
|
-
//#endregion
|
|
2020
|
-
//#region ../../node_modules/.pnpm/axios@1.14.0/node_modules/axios/lib/axios.js
|
|
2021
|
-
function zr(e) {
|
|
2022
|
-
let t = new Pr(e), n = Ze(Pr.prototype.request, t);
|
|
2023
|
-
return J.extend(n, Pr.prototype, t, { allOwnKeys: !0 }), J.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
2024
|
-
return zr(ar(e, t));
|
|
2025
|
-
}, n;
|
|
2026
|
-
}
|
|
2027
|
-
var $ = zr(Mn);
|
|
2028
|
-
$.Axios = Pr, $.CanceledError = Gn, $.CancelToken = Fr, $.isCancel = Wn, $.VERSION = kr, $.toFormData = fn, $.AxiosError = Y, $.Cancel = $.CanceledError, $.all = function(e) {
|
|
2029
|
-
return Promise.all(e);
|
|
2030
|
-
}, $.spread = Ir, $.isAxiosError = Lr, $.mergeConfig = ar, $.AxiosHeaders = Z, $.formToJSON = (e) => An(J.isHTMLForm(e) ? new FormData(e) : e), $.getAdapter = Er.getAdapter, $.HttpStatusCode = Rr, $.default = $;
|
|
2031
|
-
var Br = new class extends Fe {
|
|
1256
|
+
#I(e, t) {
|
|
1257
|
+
return !this.#i.onUploadProgress || !e.body || !$e ? e : gt(e, this.#i.onUploadProgress, t ?? this.#i.body ?? void 0);
|
|
1258
|
+
}
|
|
1259
|
+
}, rn = (e) => {
|
|
1260
|
+
let t = (t, n) => nn.create(t, yt(e, n));
|
|
1261
|
+
for (let n of it) t[n] = (t, r) => nn.create(t, yt(e, r, { method: n }));
|
|
1262
|
+
return t.create = (e) => rn(yt(e)), t.extend = (t) => (typeof t == "function" && (t = t(e ?? {})), rn(yt(e, t))), t.stop = st, t.retry = lt, t;
|
|
1263
|
+
}, an = rn(), on = new class extends Me {
|
|
2032
1264
|
description = {
|
|
2033
1265
|
title: "通过任意URL安装插件",
|
|
2034
1266
|
description: "从任何你给定的url获取内容,无论内容是什么"
|
|
2035
1267
|
};
|
|
2036
1268
|
name = "fallbackUrl";
|
|
2037
1269
|
async installer(e) {
|
|
2038
|
-
let t = await
|
|
2039
|
-
|
|
2040
|
-
responseType: "blob",
|
|
1270
|
+
let t = await an.get(e, {
|
|
1271
|
+
retry: 3,
|
|
2041
1272
|
timeout: 1e3 * 60 * 5
|
|
2042
|
-
}), n = e.split("/").at(-1) ?? "us.js";
|
|
2043
|
-
return new File([t
|
|
1273
|
+
}).blob(), n = e.split("/").at(-1) ?? "us.js";
|
|
1274
|
+
return new File([t], n);
|
|
2044
1275
|
}
|
|
2045
1276
|
async download(e) {
|
|
2046
1277
|
return await this.installer(e);
|
|
@@ -2051,11 +1282,11 @@ var Br = new class extends Fe {
|
|
|
2051
1282
|
isMatched(e) {
|
|
2052
1283
|
return URL.canParse(e);
|
|
2053
1284
|
}
|
|
2054
|
-
}(),
|
|
1285
|
+
}(), sn;
|
|
2055
1286
|
(function(e) {
|
|
2056
1287
|
e[e.Start = 0] = "Start", e[e.Current = 1] = "Current", e[e.End = 2] = "End";
|
|
2057
|
-
})(
|
|
2058
|
-
function
|
|
1288
|
+
})(sn ||= {});
|
|
1289
|
+
function cn(e) {
|
|
2059
1290
|
return {
|
|
2060
1291
|
isFile: e.isFile,
|
|
2061
1292
|
isDirectory: e.isDirectory,
|
|
@@ -2077,7 +1308,7 @@ function Hr(e) {
|
|
|
2077
1308
|
blocks: e.blocks
|
|
2078
1309
|
};
|
|
2079
1310
|
}
|
|
2080
|
-
function
|
|
1311
|
+
function ln(e) {
|
|
2081
1312
|
let t = new Uint8ClampedArray(e), n = t.byteLength, r = 0;
|
|
2082
1313
|
for (let e = 0; e < n; e++) {
|
|
2083
1314
|
let n = t[e];
|
|
@@ -2085,86 +1316,86 @@ function Ur(e) {
|
|
|
2085
1316
|
}
|
|
2086
1317
|
return r;
|
|
2087
1318
|
}
|
|
2088
|
-
var
|
|
1319
|
+
var un = class extends De {
|
|
2089
1320
|
async read(e) {
|
|
2090
1321
|
if (e.byteLength === 0) return 0;
|
|
2091
|
-
let t = await
|
|
1322
|
+
let t = await q("plugin:fs|read", {
|
|
2092
1323
|
rid: this.rid,
|
|
2093
1324
|
len: e.byteLength
|
|
2094
|
-
}), n =
|
|
1325
|
+
}), n = ln(t.slice(-8)), r = t instanceof ArrayBuffer ? new Uint8Array(t) : t;
|
|
2095
1326
|
return e.set(r.slice(0, r.length - 8)), n === 0 ? null : n;
|
|
2096
1327
|
}
|
|
2097
1328
|
async seek(e, t) {
|
|
2098
|
-
return await
|
|
1329
|
+
return await q("plugin:fs|seek", {
|
|
2099
1330
|
rid: this.rid,
|
|
2100
1331
|
offset: e,
|
|
2101
1332
|
whence: t
|
|
2102
1333
|
});
|
|
2103
1334
|
}
|
|
2104
1335
|
async stat() {
|
|
2105
|
-
return
|
|
1336
|
+
return cn(await q("plugin:fs|fstat", { rid: this.rid }));
|
|
2106
1337
|
}
|
|
2107
1338
|
async truncate(e) {
|
|
2108
|
-
await
|
|
1339
|
+
await q("plugin:fs|ftruncate", {
|
|
2109
1340
|
rid: this.rid,
|
|
2110
1341
|
len: e
|
|
2111
1342
|
});
|
|
2112
1343
|
}
|
|
2113
1344
|
async write(e) {
|
|
2114
|
-
return await
|
|
1345
|
+
return await q("plugin:fs|write", {
|
|
2115
1346
|
rid: this.rid,
|
|
2116
1347
|
data: e
|
|
2117
1348
|
});
|
|
2118
1349
|
}
|
|
2119
1350
|
};
|
|
2120
|
-
async function
|
|
1351
|
+
async function dn(e, t) {
|
|
2121
1352
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
2122
|
-
return new
|
|
1353
|
+
return new un(await q("plugin:fs|open", {
|
|
2123
1354
|
path: e instanceof URL ? e.toString() : e,
|
|
2124
1355
|
options: t
|
|
2125
1356
|
}));
|
|
2126
1357
|
}
|
|
2127
|
-
async function
|
|
1358
|
+
async function fn(e, t) {
|
|
2128
1359
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
2129
|
-
await
|
|
1360
|
+
await q("plugin:fs|mkdir", {
|
|
2130
1361
|
path: e instanceof URL ? e.toString() : e,
|
|
2131
1362
|
options: t
|
|
2132
1363
|
});
|
|
2133
1364
|
}
|
|
2134
|
-
async function
|
|
1365
|
+
async function pn(e, t) {
|
|
2135
1366
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
2136
|
-
return await
|
|
1367
|
+
return await q("plugin:fs|read_dir", {
|
|
2137
1368
|
path: e instanceof URL ? e.toString() : e,
|
|
2138
1369
|
options: t
|
|
2139
1370
|
});
|
|
2140
1371
|
}
|
|
2141
|
-
async function
|
|
1372
|
+
async function mn(e, t) {
|
|
2142
1373
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
2143
|
-
let n = await
|
|
1374
|
+
let n = await q("plugin:fs|read_file", {
|
|
2144
1375
|
path: e instanceof URL ? e.toString() : e,
|
|
2145
1376
|
options: t
|
|
2146
1377
|
});
|
|
2147
1378
|
return n instanceof ArrayBuffer ? new Uint8Array(n) : Uint8Array.from(n);
|
|
2148
1379
|
}
|
|
2149
|
-
async function
|
|
1380
|
+
async function hn(e, t) {
|
|
2150
1381
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
2151
|
-
let n = await
|
|
1382
|
+
let n = await q("plugin:fs|read_text_file", {
|
|
2152
1383
|
path: e instanceof URL ? e.toString() : e,
|
|
2153
1384
|
options: t
|
|
2154
1385
|
}), r = n instanceof ArrayBuffer ? n : Uint8Array.from(n);
|
|
2155
1386
|
return new TextDecoder(t?.encoding ?? "utf-8").decode(r);
|
|
2156
1387
|
}
|
|
2157
|
-
async function
|
|
1388
|
+
async function gn(e, t) {
|
|
2158
1389
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
2159
|
-
await
|
|
1390
|
+
await q("plugin:fs|remove", {
|
|
2160
1391
|
path: e instanceof URL ? e.toString() : e,
|
|
2161
1392
|
options: t
|
|
2162
1393
|
});
|
|
2163
1394
|
}
|
|
2164
|
-
async function
|
|
1395
|
+
async function _n(e, t, n) {
|
|
2165
1396
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
2166
1397
|
if (t instanceof ReadableStream) {
|
|
2167
|
-
let r = await
|
|
1398
|
+
let r = await dn(e, {
|
|
2168
1399
|
read: !1,
|
|
2169
1400
|
create: !0,
|
|
2170
1401
|
write: !0,
|
|
@@ -2179,26 +1410,26 @@ async function Zr(e, t, n) {
|
|
|
2179
1410
|
} finally {
|
|
2180
1411
|
i.releaseLock(), await r.close();
|
|
2181
1412
|
}
|
|
2182
|
-
} else await
|
|
1413
|
+
} else await q("plugin:fs|write_file", t, { headers: {
|
|
2183
1414
|
path: encodeURIComponent(e instanceof URL ? e.toString() : e),
|
|
2184
1415
|
options: JSON.stringify(n)
|
|
2185
1416
|
} });
|
|
2186
1417
|
}
|
|
2187
|
-
async function
|
|
1418
|
+
async function vn(e, t, n) {
|
|
2188
1419
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
2189
|
-
await
|
|
1420
|
+
await q("plugin:fs|write_text_file", new TextEncoder().encode(t), { headers: {
|
|
2190
1421
|
path: encodeURIComponent(e instanceof URL ? e.toString() : e),
|
|
2191
1422
|
options: JSON.stringify(n)
|
|
2192
1423
|
} });
|
|
2193
1424
|
}
|
|
2194
|
-
var
|
|
1425
|
+
var yn = new class extends Me {
|
|
2195
1426
|
description = {
|
|
2196
1427
|
title: "安装本地插件",
|
|
2197
1428
|
description: "输入以: \"local:\"开头,后接全路径的文本"
|
|
2198
1429
|
};
|
|
2199
1430
|
name = "local";
|
|
2200
1431
|
async installer(e) {
|
|
2201
|
-
let t = decodeURIComponent(
|
|
1432
|
+
let t = decodeURIComponent(Ee(e.replace(/^local:/, ""), "local")), n = t.split(/\\|\//).at(-1) ?? "us.js", r = await mn(t);
|
|
2202
1433
|
return new File([r], n);
|
|
2203
1434
|
}
|
|
2204
1435
|
async download(e) {
|
|
@@ -2210,17 +1441,14 @@ var $r = new class extends Fe {
|
|
|
2210
1441
|
isMatched(e) {
|
|
2211
1442
|
return e.startsWith("local:");
|
|
2212
1443
|
}
|
|
2213
|
-
}(),
|
|
1444
|
+
}(), bn = new class extends Me {
|
|
2214
1445
|
description = {
|
|
2215
1446
|
title: "安装Develop Userscript插件",
|
|
2216
1447
|
description: "输入形如: \"localhost\"或者一个可以不含port的ip"
|
|
2217
1448
|
};
|
|
2218
1449
|
name = "devUrl";
|
|
2219
1450
|
async installer(e) {
|
|
2220
|
-
let t = await
|
|
2221
|
-
url: `http://${/:\d+$/.test(e) ? e : e + ":6173"}/__vite-plugin-monkey.install.user.js?origin=http%3A%2F%2F${e}%3A6173`,
|
|
2222
|
-
responseType: "text"
|
|
2223
|
-
}), n = e.replace(/:\d+$/, ""), r = t.data.replaceAll("localhost", n).replaceAll("127.0.0.1", n);
|
|
1451
|
+
let t = await an.get(`http://${/:\d+$/.test(e) ? e : e + ":6173"}/__vite-plugin-monkey.install.user.js?origin=http%3A%2F%2F${e}%3A6173`).text(), n = e.replace(/:\d+$/, ""), r = t.replaceAll("localhost", n).replaceAll("127.0.0.1", n);
|
|
2224
1452
|
return new File([r], "us.js");
|
|
2225
1453
|
}
|
|
2226
1454
|
async download(e) {
|
|
@@ -2235,18 +1463,18 @@ var $r = new class extends Fe {
|
|
|
2235
1463
|
}();
|
|
2236
1464
|
//#endregion
|
|
2237
1465
|
//#region ../../node_modules/.pnpm/universal-user-agent@7.0.3/node_modules/universal-user-agent/index.js
|
|
2238
|
-
function
|
|
1466
|
+
function xn() {
|
|
2239
1467
|
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>";
|
|
2240
1468
|
}
|
|
2241
1469
|
//#endregion
|
|
2242
1470
|
//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/register.js
|
|
2243
|
-
function
|
|
1471
|
+
function Sn(e, t, n, r) {
|
|
2244
1472
|
if (typeof n != "function") throw Error("method for before hook must be a function");
|
|
2245
|
-
return r ||= {}, Array.isArray(t) ? t.reverse().reduce((t, n) =>
|
|
1473
|
+
return r ||= {}, Array.isArray(t) ? t.reverse().reduce((t, n) => Sn.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));
|
|
2246
1474
|
}
|
|
2247
1475
|
//#endregion
|
|
2248
1476
|
//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/add.js
|
|
2249
|
-
function
|
|
1477
|
+
function Cn(e, t, n, r) {
|
|
2250
1478
|
let i = r;
|
|
2251
1479
|
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) => {
|
|
2252
1480
|
let n;
|
|
@@ -2258,16 +1486,16 @@ function ri(e, t, n, r) {
|
|
|
2258
1486
|
}
|
|
2259
1487
|
//#endregion
|
|
2260
1488
|
//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/remove.js
|
|
2261
|
-
function
|
|
1489
|
+
function wn(e, t, n) {
|
|
2262
1490
|
if (!e.registry[t]) return;
|
|
2263
1491
|
let r = e.registry[t].map((e) => e.orig).indexOf(n);
|
|
2264
1492
|
r !== -1 && e.registry[t].splice(r, 1);
|
|
2265
1493
|
}
|
|
2266
1494
|
//#endregion
|
|
2267
1495
|
//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/index.js
|
|
2268
|
-
var
|
|
2269
|
-
function
|
|
2270
|
-
let r =
|
|
1496
|
+
var Tn = Function.bind, En = Tn.bind(Tn);
|
|
1497
|
+
function Dn(e, t, n) {
|
|
1498
|
+
let r = En(wn, null).apply(null, n ? [t, n] : [t]);
|
|
2271
1499
|
e.api = { remove: r }, e.remove = r, [
|
|
2272
1500
|
"before",
|
|
2273
1501
|
"error",
|
|
@@ -2279,50 +1507,50 @@ function si(e, t, n) {
|
|
|
2279
1507
|
r,
|
|
2280
1508
|
n
|
|
2281
1509
|
] : [t, r];
|
|
2282
|
-
e[r] = e.api[r] =
|
|
1510
|
+
e[r] = e.api[r] = En(Cn, null).apply(null, i);
|
|
2283
1511
|
});
|
|
2284
1512
|
}
|
|
2285
|
-
function
|
|
2286
|
-
let e = Symbol("Singular"), t = { registry: {} }, n =
|
|
2287
|
-
return
|
|
1513
|
+
function On() {
|
|
1514
|
+
let e = Symbol("Singular"), t = { registry: {} }, n = Sn.bind(null, t, e);
|
|
1515
|
+
return Dn(n, t, e), n;
|
|
2288
1516
|
}
|
|
2289
|
-
function
|
|
2290
|
-
let e = { registry: {} }, t =
|
|
2291
|
-
return
|
|
1517
|
+
function kn() {
|
|
1518
|
+
let e = { registry: {} }, t = Sn.bind(null, e);
|
|
1519
|
+
return Dn(t, e), t;
|
|
2292
1520
|
}
|
|
2293
|
-
var
|
|
2294
|
-
Singular:
|
|
2295
|
-
Collection:
|
|
2296
|
-
},
|
|
1521
|
+
var An = {
|
|
1522
|
+
Singular: On,
|
|
1523
|
+
Collection: kn
|
|
1524
|
+
}, jn = {
|
|
2297
1525
|
method: "GET",
|
|
2298
1526
|
baseUrl: "https://api.github.com",
|
|
2299
1527
|
headers: {
|
|
2300
1528
|
accept: "application/vnd.github.v3+json",
|
|
2301
|
-
"user-agent": `octokit-endpoint.js/0.0.0-development ${
|
|
1529
|
+
"user-agent": `octokit-endpoint.js/0.0.0-development ${xn()}`
|
|
2302
1530
|
},
|
|
2303
1531
|
mediaType: { format: "" }
|
|
2304
1532
|
};
|
|
2305
|
-
function
|
|
1533
|
+
function Mn(e) {
|
|
2306
1534
|
return e ? Object.keys(e).reduce((t, n) => (t[n.toLowerCase()] = e[n], t), {}) : {};
|
|
2307
1535
|
}
|
|
2308
|
-
function
|
|
1536
|
+
function Nn(e) {
|
|
2309
1537
|
if (typeof e != "object" || !e || Object.prototype.toString.call(e) !== "[object Object]") return !1;
|
|
2310
1538
|
let t = Object.getPrototypeOf(e);
|
|
2311
1539
|
if (t === null) return !0;
|
|
2312
1540
|
let n = Object.prototype.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
2313
1541
|
return typeof n == "function" && n instanceof n && Function.prototype.call(n) === Function.prototype.call(e);
|
|
2314
1542
|
}
|
|
2315
|
-
function
|
|
1543
|
+
function Pn(e, t) {
|
|
2316
1544
|
let n = Object.assign({}, e);
|
|
2317
1545
|
return Object.keys(t).forEach((r) => {
|
|
2318
|
-
|
|
1546
|
+
Nn(t[r]) && r in e ? n[r] = Pn(e[r], t[r]) : Object.assign(n, { [r]: t[r] });
|
|
2319
1547
|
}), n;
|
|
2320
1548
|
}
|
|
2321
|
-
function
|
|
1549
|
+
function Fn(e) {
|
|
2322
1550
|
for (let t in e) e[t] === void 0 && delete e[t];
|
|
2323
1551
|
return e;
|
|
2324
1552
|
}
|
|
2325
|
-
function
|
|
1553
|
+
function In(e, t, n) {
|
|
2326
1554
|
if (typeof t == "string") {
|
|
2327
1555
|
let [e, r] = t.split(" ");
|
|
2328
1556
|
n = Object.assign(r ? {
|
|
@@ -2330,69 +1558,69 @@ function gi(e, t, n) {
|
|
|
2330
1558
|
url: r
|
|
2331
1559
|
} : { url: e }, n);
|
|
2332
1560
|
} else n = Object.assign({}, t);
|
|
2333
|
-
n.headers =
|
|
2334
|
-
let r =
|
|
1561
|
+
n.headers = Mn(n.headers), Fn(n), Fn(n.headers);
|
|
1562
|
+
let r = Pn(e || {}, n);
|
|
2335
1563
|
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;
|
|
2336
1564
|
}
|
|
2337
|
-
function
|
|
1565
|
+
function Ln(e, t) {
|
|
2338
1566
|
let n = /\?/.test(e) ? "&" : "?", r = Object.keys(t);
|
|
2339
1567
|
return r.length === 0 ? e : e + n + r.map((e) => e === "q" ? "q=" + t.q.split("+").map(encodeURIComponent).join("+") : `${e}=${encodeURIComponent(t[e])}`).join("&");
|
|
2340
1568
|
}
|
|
2341
|
-
var
|
|
2342
|
-
function
|
|
1569
|
+
var Rn = /\{[^{}}]+\}/g;
|
|
1570
|
+
function zn(e) {
|
|
2343
1571
|
return e.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
|
|
2344
1572
|
}
|
|
2345
|
-
function
|
|
2346
|
-
let t = e.match(
|
|
2347
|
-
return t ? t.map(
|
|
1573
|
+
function Bn(e) {
|
|
1574
|
+
let t = e.match(Rn);
|
|
1575
|
+
return t ? t.map(zn).reduce((e, t) => e.concat(t), []) : [];
|
|
2348
1576
|
}
|
|
2349
|
-
function
|
|
1577
|
+
function Vn(e, t) {
|
|
2350
1578
|
let n = { __proto__: null };
|
|
2351
1579
|
for (let r of Object.keys(e)) t.indexOf(r) === -1 && (n[r] = e[r]);
|
|
2352
1580
|
return n;
|
|
2353
1581
|
}
|
|
2354
|
-
function
|
|
1582
|
+
function Hn(e) {
|
|
2355
1583
|
return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(e) {
|
|
2356
1584
|
return /%[0-9A-Fa-f]/.test(e) || (e = encodeURI(e).replace(/%5B/g, "[").replace(/%5D/g, "]")), e;
|
|
2357
1585
|
}).join("");
|
|
2358
1586
|
}
|
|
2359
|
-
function
|
|
1587
|
+
function Q(e) {
|
|
2360
1588
|
return encodeURIComponent(e).replace(/[!'()*]/g, function(e) {
|
|
2361
1589
|
return "%" + e.charCodeAt(0).toString(16).toUpperCase();
|
|
2362
1590
|
});
|
|
2363
1591
|
}
|
|
2364
|
-
function
|
|
2365
|
-
return t = e === "+" || e === "#" ?
|
|
1592
|
+
function Un(e, t, n) {
|
|
1593
|
+
return t = e === "+" || e === "#" ? Hn(t) : Q(t), n ? Q(n) + "=" + t : t;
|
|
2366
1594
|
}
|
|
2367
|
-
function
|
|
1595
|
+
function Wn(e) {
|
|
2368
1596
|
return e != null;
|
|
2369
1597
|
}
|
|
2370
|
-
function
|
|
1598
|
+
function Gn(e) {
|
|
2371
1599
|
return e === ";" || e === "&" || e === "?";
|
|
2372
1600
|
}
|
|
2373
|
-
function
|
|
1601
|
+
function Kn(e, t, n, r) {
|
|
2374
1602
|
var i = e[n], a = [];
|
|
2375
|
-
if (
|
|
2376
|
-
else if (r === "*") Array.isArray(i) ? i.filter(
|
|
2377
|
-
a.push(
|
|
1603
|
+
if (Wn(i) && i !== "") if (typeof i == "string" || typeof i == "number" || typeof i == "bigint" || typeof i == "boolean") i = i.toString(), r && r !== "*" && (i = i.substring(0, parseInt(r, 10))), a.push(Un(t, i, Gn(t) ? n : ""));
|
|
1604
|
+
else if (r === "*") Array.isArray(i) ? i.filter(Wn).forEach(function(e) {
|
|
1605
|
+
a.push(Un(t, e, Gn(t) ? n : ""));
|
|
2378
1606
|
}) : Object.keys(i).forEach(function(e) {
|
|
2379
|
-
|
|
1607
|
+
Wn(i[e]) && a.push(Un(t, i[e], e));
|
|
2380
1608
|
});
|
|
2381
1609
|
else {
|
|
2382
1610
|
let e = [];
|
|
2383
|
-
Array.isArray(i) ? i.filter(
|
|
2384
|
-
e.push(
|
|
1611
|
+
Array.isArray(i) ? i.filter(Wn).forEach(function(n) {
|
|
1612
|
+
e.push(Un(t, n));
|
|
2385
1613
|
}) : Object.keys(i).forEach(function(n) {
|
|
2386
|
-
|
|
2387
|
-
}),
|
|
1614
|
+
Wn(i[n]) && (e.push(Q(n)), e.push(Un(t, i[n].toString())));
|
|
1615
|
+
}), Gn(t) ? a.push(Q(n) + "=" + e.join(",")) : e.length !== 0 && a.push(e.join(","));
|
|
2388
1616
|
}
|
|
2389
|
-
else t === ";" ?
|
|
1617
|
+
else t === ";" ? Wn(i) && a.push(Q(n)) : i === "" && (t === "&" || t === "?") ? a.push(Q(n) + "=") : i === "" && a.push("");
|
|
2390
1618
|
return a;
|
|
2391
1619
|
}
|
|
2392
|
-
function
|
|
2393
|
-
return { expand:
|
|
1620
|
+
function qn(e) {
|
|
1621
|
+
return { expand: Jn.bind(null, e) };
|
|
2394
1622
|
}
|
|
2395
|
-
function
|
|
1623
|
+
function Jn(e, t) {
|
|
2396
1624
|
var n = [
|
|
2397
1625
|
"+",
|
|
2398
1626
|
"#",
|
|
@@ -2407,44 +1635,44 @@ function ki(e, t) {
|
|
|
2407
1635
|
let e = "", i = [];
|
|
2408
1636
|
if (n.indexOf(r.charAt(0)) !== -1 && (e = r.charAt(0), r = r.substr(1)), r.split(/,/g).forEach(function(n) {
|
|
2409
1637
|
var r = /([^:\*]*)(?::(\d+)|(\*))?/.exec(n);
|
|
2410
|
-
i.push(
|
|
1638
|
+
i.push(Kn(t, e, r[1], r[2] || r[3]));
|
|
2411
1639
|
}), e && e !== "+") {
|
|
2412
1640
|
var a = ",";
|
|
2413
1641
|
return e === "?" ? a = "&" : e !== "#" && (a = e), (i.length === 0 ? "" : e) + i.join(a);
|
|
2414
1642
|
} else return i.join(",");
|
|
2415
|
-
} else return
|
|
1643
|
+
} else return Hn(i);
|
|
2416
1644
|
}), e === "/" ? e : e.replace(/\/$/, "");
|
|
2417
1645
|
}
|
|
2418
|
-
function
|
|
2419
|
-
let t = e.method.toUpperCase(), n = (e.url || "/").replace(/:([a-z]\w+)/g, "{$1}"), r = Object.assign({}, e.headers), i, a =
|
|
1646
|
+
function Yn(e) {
|
|
1647
|
+
let t = e.method.toUpperCase(), n = (e.url || "/").replace(/:([a-z]\w+)/g, "{$1}"), r = Object.assign({}, e.headers), i, a = Vn(e, [
|
|
2420
1648
|
"method",
|
|
2421
1649
|
"baseUrl",
|
|
2422
1650
|
"url",
|
|
2423
1651
|
"headers",
|
|
2424
1652
|
"request",
|
|
2425
1653
|
"mediaType"
|
|
2426
|
-
]), o =
|
|
2427
|
-
n =
|
|
2428
|
-
let s =
|
|
2429
|
-
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 =
|
|
1654
|
+
]), o = Bn(n);
|
|
1655
|
+
n = qn(n).expand(a), /^http/.test(n) || (n = e.baseUrl + n);
|
|
1656
|
+
let s = Vn(a, Object.keys(e).filter((e) => o.includes(e)).concat("baseUrl"));
|
|
1657
|
+
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 = Ln(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({
|
|
2430
1658
|
method: t,
|
|
2431
1659
|
url: n,
|
|
2432
1660
|
headers: r
|
|
2433
1661
|
}, i === void 0 ? null : { body: i }, e.request ? { request: e.request } : null);
|
|
2434
1662
|
}
|
|
2435
|
-
function
|
|
2436
|
-
return
|
|
1663
|
+
function Xn(e, t, n) {
|
|
1664
|
+
return Yn(In(e, t, n));
|
|
2437
1665
|
}
|
|
2438
|
-
function
|
|
2439
|
-
let n =
|
|
1666
|
+
function Zn(e, t) {
|
|
1667
|
+
let n = In(e, t), r = Xn.bind(null, n);
|
|
2440
1668
|
return Object.assign(r, {
|
|
2441
1669
|
DEFAULTS: n,
|
|
2442
|
-
defaults:
|
|
2443
|
-
merge:
|
|
2444
|
-
parse:
|
|
1670
|
+
defaults: Zn.bind(null, n),
|
|
1671
|
+
merge: In.bind(null, n),
|
|
1672
|
+
parse: Yn
|
|
2445
1673
|
});
|
|
2446
1674
|
}
|
|
2447
|
-
var
|
|
1675
|
+
var Qn = Zn(null, jn), $n = (/* @__PURE__ */ o(((e, t) => {
|
|
2448
1676
|
var n = function() {};
|
|
2449
1677
|
n.prototype = Object.create(null);
|
|
2450
1678
|
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 = {
|
|
@@ -2489,24 +1717,24 @@ var Ni = Mi(null, di), Pi = (/* @__PURE__ */ o(((e, t) => {
|
|
|
2489
1717
|
parse: s,
|
|
2490
1718
|
safeParse: c
|
|
2491
1719
|
}, t.exports.parse = s, t.exports.safeParse = c, t.exports.defaultContentType = o;
|
|
2492
|
-
})))(),
|
|
1720
|
+
})))(), er = /^-?\d+$/, tr = /^-?\d+n+$/, nr = JSON.stringify, rr = JSON.parse, ir = /^-?\d+n$/, ar = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g, or = /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g, sr = (e, t, n) => "rawJSON" in JSON ? nr(e, (e, n) => typeof n == "bigint" ? JSON.rawJSON(n.toString()) : typeof t == "function" ? t(e, n) : (Array.isArray(t) && t.includes(e), n), n) : e ? nr(e, (e, n) => typeof n == "string" && tr.test(n) || typeof n == "bigint" ? n.toString() + "n" : typeof t == "function" ? t(e, n) : (Array.isArray(t) && t.includes(e), n), n).replace(ar, "$1$2$3").replace(or, "$1$2$3") : nr(e, t, n), cr = /* @__PURE__ */ new Map(), lr = () => {
|
|
2493
1721
|
let e = JSON.parse.toString();
|
|
2494
|
-
if (
|
|
1722
|
+
if (cr.has(e)) return cr.get(e);
|
|
2495
1723
|
try {
|
|
2496
1724
|
let t = JSON.parse("1", (e, t, n) => !!n?.source && n.source === "1");
|
|
2497
|
-
return
|
|
1725
|
+
return cr.set(e, t), t;
|
|
2498
1726
|
} catch {
|
|
2499
|
-
return
|
|
1727
|
+
return cr.set(e, !1), !1;
|
|
2500
1728
|
}
|
|
2501
|
-
},
|
|
2502
|
-
let i = typeof n == "number" && (n > 2 ** 53 - 1 || n < -(2 ** 53 - 1)), a = r &&
|
|
1729
|
+
}, ur = (e, t, n, r) => typeof t == "string" && ir.test(t) ? BigInt(t.slice(0, -1)) : typeof t == "string" && tr.test(t) ? t.slice(0, -1) : typeof r == "function" ? r(e, t, n) : t, dr = (e, t) => JSON.parse(e, (e, n, r) => {
|
|
1730
|
+
let i = typeof n == "number" && (n > 2 ** 53 - 1 || n < -(2 ** 53 - 1)), a = r && er.test(r.source);
|
|
2503
1731
|
return i && a ? BigInt(r.source) : typeof t == "function" ? t(e, n, r) : n;
|
|
2504
|
-
}),
|
|
1732
|
+
}), fr = (2 ** 53 - 1).toString(), pr = fr.length, mr = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g, hr = /^"-?\d+n+"$/, gr = (e, t) => e ? lr() ? dr(e, t) : rr(e.replace(mr, (e, t, n, r) => {
|
|
2505
1733
|
let i = e[0] === "\"";
|
|
2506
|
-
if (i &&
|
|
2507
|
-
let a = n || r, o = t && (t.length <
|
|
1734
|
+
if (i && hr.test(e)) return e.substring(0, e.length - 1) + "n\"";
|
|
1735
|
+
let a = n || r, o = t && (t.length < pr || t.length === pr && t <= fr);
|
|
2508
1736
|
return i || a || o ? e : "\"" + e + "n\"";
|
|
2509
|
-
}), (e, n, r) =>
|
|
1737
|
+
}), (e, n, r) => ur(e, n, r, t)) : rr(e, t), _r = class extends Error {
|
|
2510
1738
|
name;
|
|
2511
1739
|
status;
|
|
2512
1740
|
request;
|
|
@@ -2517,19 +1745,19 @@ var Ni = Mi(null, di), Pi = (/* @__PURE__ */ o(((e, t) => {
|
|
|
2517
1745
|
let r = Object.assign({}, n.request);
|
|
2518
1746
|
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;
|
|
2519
1747
|
}
|
|
2520
|
-
},
|
|
2521
|
-
function
|
|
1748
|
+
}, vr = { headers: { "user-agent": `octokit-request.js/10.0.8 ${xn()}` } };
|
|
1749
|
+
function yr(e) {
|
|
2522
1750
|
if (typeof e != "object" || !e || Object.prototype.toString.call(e) !== "[object Object]") return !1;
|
|
2523
1751
|
let t = Object.getPrototypeOf(e);
|
|
2524
1752
|
if (t === null) return !0;
|
|
2525
1753
|
let n = Object.prototype.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
2526
1754
|
return typeof n == "function" && n instanceof n && Function.prototype.call(n) === Function.prototype.call(e);
|
|
2527
1755
|
}
|
|
2528
|
-
var
|
|
2529
|
-
async function
|
|
1756
|
+
var br = () => "";
|
|
1757
|
+
async function xr(e) {
|
|
2530
1758
|
let t = e.request?.fetch || globalThis.fetch;
|
|
2531
1759
|
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");
|
|
2532
|
-
let n = e.request?.log || console, r = e.request?.parseSuccessResponseBody !== !1, i =
|
|
1760
|
+
let n = e.request?.log || console, r = e.request?.parseSuccessResponseBody !== !1, i = yr(e.body) || Array.isArray(e.body) ? sr(e.body) : e.body, a = Object.fromEntries(Object.entries(e.headers).map(([e, t]) => [e, String(t)])), o;
|
|
2533
1761
|
try {
|
|
2534
1762
|
o = await t(e.url, {
|
|
2535
1763
|
method: e.method,
|
|
@@ -2545,7 +1773,7 @@ async function na(e) {
|
|
|
2545
1773
|
if (t.name === "AbortError") throw t.status = 500, t;
|
|
2546
1774
|
n = t.message, t.name === "TypeError" && "cause" in t && (t.cause instanceof Error ? n = t.cause.message : typeof t.cause == "string" && (n = t.cause));
|
|
2547
1775
|
}
|
|
2548
|
-
let r = new
|
|
1776
|
+
let r = new _r(n, 500, { request: e });
|
|
2549
1777
|
throw r.cause = t, r;
|
|
2550
1778
|
}
|
|
2551
1779
|
let s = o.status, c = o.url, l = {};
|
|
@@ -2563,42 +1791,42 @@ async function na(e) {
|
|
|
2563
1791
|
if (s === 204 || s === 205) return u;
|
|
2564
1792
|
if (e.method === "HEAD") {
|
|
2565
1793
|
if (s < 400) return u;
|
|
2566
|
-
throw new
|
|
1794
|
+
throw new _r(o.statusText, s, {
|
|
2567
1795
|
response: u,
|
|
2568
1796
|
request: e
|
|
2569
1797
|
});
|
|
2570
1798
|
}
|
|
2571
|
-
if (s === 304) throw u.data = await
|
|
1799
|
+
if (s === 304) throw u.data = await Sr(o), new _r("Not modified", s, {
|
|
2572
1800
|
response: u,
|
|
2573
1801
|
request: e
|
|
2574
1802
|
});
|
|
2575
|
-
if (s >= 400) throw u.data = await
|
|
1803
|
+
if (s >= 400) throw u.data = await Sr(o), new _r(wr(u.data), s, {
|
|
2576
1804
|
response: u,
|
|
2577
1805
|
request: e
|
|
2578
1806
|
});
|
|
2579
|
-
return u.data = r ? await
|
|
1807
|
+
return u.data = r ? await Sr(o) : o.body, u;
|
|
2580
1808
|
}
|
|
2581
|
-
async function
|
|
1809
|
+
async function Sr(e) {
|
|
2582
1810
|
let t = e.headers.get("content-type");
|
|
2583
|
-
if (!t) return e.text().catch(
|
|
2584
|
-
let n = (0,
|
|
2585
|
-
if (
|
|
1811
|
+
if (!t) return e.text().catch(br);
|
|
1812
|
+
let n = (0, $n.safeParse)(t);
|
|
1813
|
+
if (Cr(n)) {
|
|
2586
1814
|
let t = "";
|
|
2587
1815
|
try {
|
|
2588
|
-
return t = await e.text(),
|
|
1816
|
+
return t = await e.text(), gr(t);
|
|
2589
1817
|
} catch {
|
|
2590
1818
|
return t;
|
|
2591
1819
|
}
|
|
2592
|
-
} else if (n.type.startsWith("text/") || n.parameters.charset?.toLowerCase() === "utf-8") return e.text().catch(
|
|
1820
|
+
} else if (n.type.startsWith("text/") || n.parameters.charset?.toLowerCase() === "utf-8") return e.text().catch(br);
|
|
2593
1821
|
else return e.arrayBuffer().catch(
|
|
2594
1822
|
/* v8 ignore next -- @preserve */
|
|
2595
1823
|
() => /* @__PURE__ */ new ArrayBuffer(0)
|
|
2596
1824
|
);
|
|
2597
1825
|
}
|
|
2598
|
-
function
|
|
1826
|
+
function Cr(e) {
|
|
2599
1827
|
return e.type === "application/json" || e.type === "application/scim+json";
|
|
2600
1828
|
}
|
|
2601
|
-
function
|
|
1829
|
+
function wr(e) {
|
|
2602
1830
|
if (typeof e == "string") return e;
|
|
2603
1831
|
if (e instanceof ArrayBuffer) return "Unknown error";
|
|
2604
1832
|
if ("message" in e) {
|
|
@@ -2607,33 +1835,33 @@ function aa(e) {
|
|
|
2607
1835
|
}
|
|
2608
1836
|
return `Unknown error: ${JSON.stringify(e)}`;
|
|
2609
1837
|
}
|
|
2610
|
-
function
|
|
1838
|
+
function Tr(e, t) {
|
|
2611
1839
|
let n = e.defaults(t);
|
|
2612
1840
|
return Object.assign(function(e, t) {
|
|
2613
1841
|
let r = n.merge(e, t);
|
|
2614
|
-
if (!r.request || !r.request.hook) return
|
|
2615
|
-
let i = (e, t) =>
|
|
1842
|
+
if (!r.request || !r.request.hook) return xr(n.parse(r));
|
|
1843
|
+
let i = (e, t) => xr(n.parse(n.merge(e, t)));
|
|
2616
1844
|
return Object.assign(i, {
|
|
2617
1845
|
endpoint: n,
|
|
2618
|
-
defaults:
|
|
1846
|
+
defaults: Tr.bind(null, n)
|
|
2619
1847
|
}), r.request.hook(i, r);
|
|
2620
1848
|
}, {
|
|
2621
1849
|
endpoint: n,
|
|
2622
|
-
defaults:
|
|
1850
|
+
defaults: Tr.bind(null, n)
|
|
2623
1851
|
});
|
|
2624
1852
|
}
|
|
2625
|
-
var
|
|
2626
|
-
function
|
|
1853
|
+
var Er = Tr(Qn, vr), Dr = "0.0.0-development";
|
|
1854
|
+
function Or(e) {
|
|
2627
1855
|
return "Request failed due to following response errors:\n" + e.errors.map((e) => ` - ${e.message}`).join("\n");
|
|
2628
1856
|
}
|
|
2629
|
-
var
|
|
1857
|
+
var kr = class extends Error {
|
|
2630
1858
|
constructor(e, t, n) {
|
|
2631
|
-
super(
|
|
1859
|
+
super(Or(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);
|
|
2632
1860
|
}
|
|
2633
1861
|
name = "GraphqlResponseError";
|
|
2634
1862
|
errors;
|
|
2635
1863
|
data;
|
|
2636
|
-
},
|
|
1864
|
+
}, Ar = [
|
|
2637
1865
|
"method",
|
|
2638
1866
|
"baseUrl",
|
|
2639
1867
|
"url",
|
|
@@ -2642,72 +1870,72 @@ var ua = class extends Error {
|
|
|
2642
1870
|
"query",
|
|
2643
1871
|
"mediaType",
|
|
2644
1872
|
"operationName"
|
|
2645
|
-
],
|
|
1873
|
+
], jr = [
|
|
2646
1874
|
"query",
|
|
2647
1875
|
"method",
|
|
2648
1876
|
"url"
|
|
2649
|
-
],
|
|
2650
|
-
function
|
|
1877
|
+
], Mr = /\/api\/v3\/?$/;
|
|
1878
|
+
function Nr(e, t, n) {
|
|
2651
1879
|
if (n) {
|
|
2652
1880
|
if (typeof t == "string" && "query" in n) return Promise.reject(/* @__PURE__ */ Error("[@octokit/graphql] \"query\" cannot be used as variable name"));
|
|
2653
|
-
for (let e in n) if (
|
|
1881
|
+
for (let e in n) if (jr.includes(e)) return Promise.reject(/* @__PURE__ */ Error(`[@octokit/graphql] "${e}" cannot be used as variable name`));
|
|
2654
1882
|
}
|
|
2655
|
-
let r = typeof t == "string" ? Object.assign({ query: t }, n) : t, i = Object.keys(r).reduce((e, t) =>
|
|
2656
|
-
return
|
|
1883
|
+
let r = typeof t == "string" ? Object.assign({ query: t }, n) : t, i = Object.keys(r).reduce((e, t) => Ar.includes(t) ? (e[t] = r[t], e) : (e.variables ||= {}, e.variables[t] = r[t], e), {}), a = r.baseUrl || e.endpoint.DEFAULTS.baseUrl;
|
|
1884
|
+
return Mr.test(a) && (i.url = a.replace(Mr, "/api/graphql")), e(i).then((e) => {
|
|
2657
1885
|
if (e.data.errors) {
|
|
2658
1886
|
let t = {};
|
|
2659
1887
|
for (let n of Object.keys(e.headers)) t[n] = e.headers[n];
|
|
2660
|
-
throw new
|
|
1888
|
+
throw new kr(i, t, e.data);
|
|
2661
1889
|
}
|
|
2662
1890
|
return e.data.data;
|
|
2663
1891
|
});
|
|
2664
1892
|
}
|
|
2665
|
-
function
|
|
1893
|
+
function Pr(e, t) {
|
|
2666
1894
|
let n = e.defaults(t);
|
|
2667
|
-
return Object.assign((e, t) =>
|
|
2668
|
-
defaults:
|
|
1895
|
+
return Object.assign((e, t) => Nr(n, e, t), {
|
|
1896
|
+
defaults: Pr.bind(null, n),
|
|
2669
1897
|
endpoint: n.endpoint
|
|
2670
1898
|
});
|
|
2671
1899
|
}
|
|
2672
|
-
|
|
2673
|
-
headers: { "user-agent": `octokit-graphql.js/${
|
|
1900
|
+
Pr(Er, {
|
|
1901
|
+
headers: { "user-agent": `octokit-graphql.js/${Dr} ${xn()}` },
|
|
2674
1902
|
method: "POST",
|
|
2675
1903
|
url: "/graphql"
|
|
2676
1904
|
});
|
|
2677
|
-
function
|
|
2678
|
-
return
|
|
1905
|
+
function Fr(e) {
|
|
1906
|
+
return Pr(e, {
|
|
2679
1907
|
method: "POST",
|
|
2680
1908
|
url: "/graphql"
|
|
2681
1909
|
});
|
|
2682
1910
|
}
|
|
2683
1911
|
//#endregion
|
|
2684
1912
|
//#region ../../node_modules/.pnpm/@octokit+auth-token@6.0.0/node_modules/@octokit/auth-token/dist-bundle/index.js
|
|
2685
|
-
var
|
|
2686
|
-
async function
|
|
2687
|
-
let t =
|
|
1913
|
+
var Ir = "(?:[a-zA-Z0-9_-]+)", Lr = "\\.", Rr = RegExp(`^${Ir}${Lr}${Ir}${Lr}${Ir}$`), zr = Rr.test.bind(Rr);
|
|
1914
|
+
async function Br(e) {
|
|
1915
|
+
let t = zr(e), n = e.startsWith("v1.") || e.startsWith("ghs_"), r = e.startsWith("ghu_");
|
|
2688
1916
|
return {
|
|
2689
1917
|
type: "token",
|
|
2690
1918
|
token: e,
|
|
2691
1919
|
tokenType: t ? "app" : n ? "installation" : r ? "user-to-server" : "oauth"
|
|
2692
1920
|
};
|
|
2693
1921
|
}
|
|
2694
|
-
function
|
|
1922
|
+
function Vr(e) {
|
|
2695
1923
|
return e.split(/\./).length === 3 ? `bearer ${e}` : `token ${e}`;
|
|
2696
1924
|
}
|
|
2697
|
-
async function
|
|
1925
|
+
async function Hr(e, t, n, r) {
|
|
2698
1926
|
let i = t.endpoint.merge(n, r);
|
|
2699
|
-
return i.headers.authorization =
|
|
1927
|
+
return i.headers.authorization = Vr(e), t(i);
|
|
2700
1928
|
}
|
|
2701
|
-
var
|
|
1929
|
+
var Ur = function(e) {
|
|
2702
1930
|
if (!e) throw Error("[@octokit/auth-token] No token passed to createTokenAuth");
|
|
2703
1931
|
if (typeof e != "string") throw Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
|
|
2704
|
-
return e = e.replace(/^(token|bearer) +/i, ""), Object.assign(
|
|
2705
|
-
},
|
|
2706
|
-
function
|
|
2707
|
-
return typeof e.debug != "function" && (e.debug =
|
|
1932
|
+
return e = e.replace(/^(token|bearer) +/i, ""), Object.assign(Br.bind(null, e), { hook: Hr.bind(null, e) });
|
|
1933
|
+
}, Wr = "7.0.6", Gr = () => {}, Kr = console.warn.bind(console), qr = console.error.bind(console);
|
|
1934
|
+
function Jr(e = {}) {
|
|
1935
|
+
return typeof e.debug != "function" && (e.debug = Gr), typeof e.info != "function" && (e.info = Gr), typeof e.warn != "function" && (e.warn = Kr), typeof e.error != "function" && (e.error = qr), e;
|
|
2708
1936
|
}
|
|
2709
|
-
var
|
|
2710
|
-
static VERSION =
|
|
1937
|
+
var Yr = `octokit-core.js/${Wr} ${xn()}`, Xr = class {
|
|
1938
|
+
static VERSION = Wr;
|
|
2711
1939
|
static defaults(e) {
|
|
2712
1940
|
return class extends this {
|
|
2713
1941
|
constructor(...t) {
|
|
@@ -2728,8 +1956,8 @@ var Aa = `octokit-core.js/${Ta} ${ti()}`, ja = class {
|
|
|
2728
1956
|
};
|
|
2729
1957
|
}
|
|
2730
1958
|
constructor(e = {}) {
|
|
2731
|
-
let t = new
|
|
2732
|
-
baseUrl:
|
|
1959
|
+
let t = new An.Collection(), n = {
|
|
1960
|
+
baseUrl: Er.endpoint.DEFAULTS.baseUrl,
|
|
2733
1961
|
headers: {},
|
|
2734
1962
|
request: Object.assign({}, e.request, { hook: t.bind(null, "request") }),
|
|
2735
1963
|
mediaType: {
|
|
@@ -2737,7 +1965,7 @@ var Aa = `octokit-core.js/${Ta} ${ti()}`, ja = class {
|
|
|
2737
1965
|
format: ""
|
|
2738
1966
|
}
|
|
2739
1967
|
};
|
|
2740
|
-
if (n.headers["user-agent"] = e.userAgent ? `${e.userAgent} ${
|
|
1968
|
+
if (n.headers["user-agent"] = e.userAgent ? `${e.userAgent} ${Yr}` : Yr, e.baseUrl && (n.baseUrl = e.baseUrl), e.previews && (n.mediaType.previews = e.previews), e.timeZone && (n.headers["time-zone"] = e.timeZone), this.request = Er.defaults(n), this.graphql = Fr(this.request).defaults(n), this.log = Jr(e.log), this.hook = t, e.authStrategy) {
|
|
2741
1969
|
let { authStrategy: n, ...r } = e, i = n(Object.assign({
|
|
2742
1970
|
request: this.request,
|
|
2743
1971
|
log: this.log,
|
|
@@ -2747,7 +1975,7 @@ var Aa = `octokit-core.js/${Ta} ${ti()}`, ja = class {
|
|
|
2747
1975
|
t.wrap("request", i.hook), this.auth = i;
|
|
2748
1976
|
} else if (!e.auth) this.auth = async () => ({ type: "unauthenticated" });
|
|
2749
1977
|
else {
|
|
2750
|
-
let n =
|
|
1978
|
+
let n = Ur(e.auth);
|
|
2751
1979
|
t.wrap("request", n.hook), this.auth = n;
|
|
2752
1980
|
}
|
|
2753
1981
|
let r = this.constructor;
|
|
@@ -2758,10 +1986,10 @@ var Aa = `octokit-core.js/${Ta} ${ti()}`, ja = class {
|
|
|
2758
1986
|
log;
|
|
2759
1987
|
hook;
|
|
2760
1988
|
auth;
|
|
2761
|
-
},
|
|
1989
|
+
}, Zr = "6.0.0";
|
|
2762
1990
|
//#endregion
|
|
2763
1991
|
//#region ../../node_modules/.pnpm/@octokit+plugin-request-log@6.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-request-log/dist-src/index.js
|
|
2764
|
-
function
|
|
1992
|
+
function Qr(e) {
|
|
2765
1993
|
e.hook.wrap("request", (t, n) => {
|
|
2766
1994
|
e.log.debug("request", n);
|
|
2767
1995
|
let r = Date.now(), i = e.request.endpoint.parse(n), a = i.url.replace(n.baseUrl, "");
|
|
@@ -2774,11 +2002,11 @@ function Na(e) {
|
|
|
2774
2002
|
});
|
|
2775
2003
|
});
|
|
2776
2004
|
}
|
|
2777
|
-
|
|
2005
|
+
Qr.VERSION = Zr;
|
|
2778
2006
|
//#endregion
|
|
2779
2007
|
//#region ../../node_modules/.pnpm/@octokit+plugin-paginate-rest@14.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js
|
|
2780
|
-
var
|
|
2781
|
-
function
|
|
2008
|
+
var $r = "0.0.0-development";
|
|
2009
|
+
function ei(e) {
|
|
2782
2010
|
if (!e.data) return {
|
|
2783
2011
|
...e,
|
|
2784
2012
|
data: []
|
|
@@ -2789,12 +2017,12 @@ function Fa(e) {
|
|
|
2789
2017
|
let a = Object.keys(e.data)[0];
|
|
2790
2018
|
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;
|
|
2791
2019
|
}
|
|
2792
|
-
function
|
|
2020
|
+
function ti(e, t, n) {
|
|
2793
2021
|
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;
|
|
2794
2022
|
return { [Symbol.asyncIterator]: () => ({ async next() {
|
|
2795
2023
|
if (!s) return { done: !0 };
|
|
2796
2024
|
try {
|
|
2797
|
-
let e =
|
|
2025
|
+
let e = ei(await i({
|
|
2798
2026
|
method: a,
|
|
2799
2027
|
url: s,
|
|
2800
2028
|
headers: o
|
|
@@ -2814,27 +2042,27 @@ function Ia(e, t, n) {
|
|
|
2814
2042
|
}
|
|
2815
2043
|
} }) };
|
|
2816
2044
|
}
|
|
2817
|
-
function
|
|
2818
|
-
return typeof n == "function" && (r = n, n = void 0),
|
|
2045
|
+
function ni(e, t, n, r) {
|
|
2046
|
+
return typeof n == "function" && (r = n, n = void 0), ri(e, [], ti(e, t, n)[Symbol.asyncIterator](), r);
|
|
2819
2047
|
}
|
|
2820
|
-
function
|
|
2048
|
+
function ri(e, t, n, r) {
|
|
2821
2049
|
return n.next().then((i) => {
|
|
2822
2050
|
if (i.done) return t;
|
|
2823
2051
|
let a = !1;
|
|
2824
2052
|
function o() {
|
|
2825
2053
|
a = !0;
|
|
2826
2054
|
}
|
|
2827
|
-
return t = t.concat(r ? r(i.value, o) : i.value.data), a ? t :
|
|
2055
|
+
return t = t.concat(r ? r(i.value, o) : i.value.data), a ? t : ri(e, t, n, r);
|
|
2828
2056
|
});
|
|
2829
2057
|
}
|
|
2830
|
-
Object.assign(
|
|
2831
|
-
function
|
|
2832
|
-
return { paginate: Object.assign(
|
|
2058
|
+
Object.assign(ni, { iterator: ti });
|
|
2059
|
+
function ii(e) {
|
|
2060
|
+
return { paginate: Object.assign(ni.bind(null, e), { iterator: ti.bind(null, e) }) };
|
|
2833
2061
|
}
|
|
2834
|
-
|
|
2062
|
+
ii.VERSION = $r;
|
|
2835
2063
|
//#endregion
|
|
2836
2064
|
//#region ../../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@17.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
|
|
2837
|
-
var
|
|
2065
|
+
var ai = "17.0.0", oi = {
|
|
2838
2066
|
actions: {
|
|
2839
2067
|
addCustomLabelsToSelfHostedRunnerForOrg: ["POST /orgs/{org}/actions/runners/{runner_id}/labels"],
|
|
2840
2068
|
addCustomLabelsToSelfHostedRunnerForRepo: ["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],
|
|
@@ -4125,22 +3353,22 @@ var Ba = "17.0.0", Va = {
|
|
|
4125
3353
|
unfollow: ["DELETE /user/following/{username}"],
|
|
4126
3354
|
updateAuthenticated: ["PATCH /user"]
|
|
4127
3355
|
}
|
|
4128
|
-
},
|
|
4129
|
-
for (let [e, t] of Object.entries(
|
|
3356
|
+
}, $ = /* @__PURE__ */ new Map();
|
|
3357
|
+
for (let [e, t] of Object.entries(oi)) for (let [n, r] of Object.entries(t)) {
|
|
4130
3358
|
let [t, i, a] = r, [o, s] = t.split(/ /), c = Object.assign({
|
|
4131
3359
|
method: o,
|
|
4132
3360
|
url: s
|
|
4133
3361
|
}, i);
|
|
4134
|
-
|
|
3362
|
+
$.has(e) || $.set(e, /* @__PURE__ */ new Map()), $.get(e).set(n, {
|
|
4135
3363
|
scope: e,
|
|
4136
3364
|
methodName: n,
|
|
4137
3365
|
endpointDefaults: c,
|
|
4138
3366
|
decorations: a
|
|
4139
3367
|
});
|
|
4140
3368
|
}
|
|
4141
|
-
var
|
|
3369
|
+
var si = {
|
|
4142
3370
|
has({ scope: e }, t) {
|
|
4143
|
-
return
|
|
3371
|
+
return $.get(e).has(t);
|
|
4144
3372
|
},
|
|
4145
3373
|
getOwnPropertyDescriptor(e, t) {
|
|
4146
3374
|
return {
|
|
@@ -4157,29 +3385,29 @@ var Ua = {
|
|
|
4157
3385
|
return delete e.cache[t], !0;
|
|
4158
3386
|
},
|
|
4159
3387
|
ownKeys({ scope: e }) {
|
|
4160
|
-
return [
|
|
3388
|
+
return [...$.get(e).keys()];
|
|
4161
3389
|
},
|
|
4162
3390
|
set(e, t, n) {
|
|
4163
3391
|
return e.cache[t] = n;
|
|
4164
3392
|
},
|
|
4165
3393
|
get({ octokit: e, scope: t, cache: n }, r) {
|
|
4166
3394
|
if (n[r]) return n[r];
|
|
4167
|
-
let i =
|
|
3395
|
+
let i = $.get(t).get(r);
|
|
4168
3396
|
if (!i) return;
|
|
4169
3397
|
let { endpointDefaults: a, decorations: o } = i;
|
|
4170
|
-
return o ? n[r] =
|
|
3398
|
+
return o ? n[r] = li(e, t, r, a, o) : n[r] = e.request.defaults(a), n[r];
|
|
4171
3399
|
}
|
|
4172
3400
|
};
|
|
4173
|
-
function
|
|
3401
|
+
function ci(e) {
|
|
4174
3402
|
let t = {};
|
|
4175
|
-
for (let n of
|
|
3403
|
+
for (let n of $.keys()) t[n] = new Proxy({
|
|
4176
3404
|
octokit: e,
|
|
4177
3405
|
scope: n,
|
|
4178
3406
|
cache: {}
|
|
4179
|
-
},
|
|
3407
|
+
}, si);
|
|
4180
3408
|
return t;
|
|
4181
3409
|
}
|
|
4182
|
-
function
|
|
3410
|
+
function li(e, t, n, r, i) {
|
|
4183
3411
|
let a = e.request.defaults(r);
|
|
4184
3412
|
function o(...r) {
|
|
4185
3413
|
let o = a.endpoint.merge(...r);
|
|
@@ -4202,21 +3430,21 @@ function Ga(e, t, n, r, i) {
|
|
|
4202
3430
|
}
|
|
4203
3431
|
//#endregion
|
|
4204
3432
|
//#region ../../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@17.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js
|
|
4205
|
-
function
|
|
4206
|
-
return { rest:
|
|
3433
|
+
function ui(e) {
|
|
3434
|
+
return { rest: ci(e) };
|
|
4207
3435
|
}
|
|
4208
|
-
|
|
4209
|
-
function
|
|
4210
|
-
let t =
|
|
3436
|
+
ui.VERSION = ai;
|
|
3437
|
+
function di(e) {
|
|
3438
|
+
let t = ci(e);
|
|
4211
3439
|
return {
|
|
4212
3440
|
...t,
|
|
4213
3441
|
rest: t
|
|
4214
3442
|
};
|
|
4215
3443
|
}
|
|
4216
|
-
|
|
3444
|
+
di.VERSION = ai;
|
|
4217
3445
|
//#endregion
|
|
4218
3446
|
//#region ../../node_modules/.pnpm/@octokit+rest@22.0.1/node_modules/@octokit/rest/dist-src/index.js
|
|
4219
|
-
var
|
|
3447
|
+
var fi = Xr.plugin(Qr, di, ii).defaults({ userAgent: "octokit-rest.js/22.0.1" }), pi = new class extends Me {
|
|
4220
3448
|
description = {
|
|
4221
3449
|
title: "通过Github安装插件",
|
|
4222
3450
|
description: "输入形如: \"gh:owner/repo\"的内容"
|
|
@@ -4229,16 +3457,15 @@ var Ja = ja.plugin(Na, qa, za).defaults({ userAgent: "octokit-rest.js/22.0.1" })
|
|
|
4229
3457
|
console.error("fail to get github token", e);
|
|
4230
3458
|
var t = "";
|
|
4231
3459
|
}
|
|
4232
|
-
let r = new
|
|
3460
|
+
let r = new fi({ auth: Se(t) ? void 0 : t }), [i, a] = e.replace(/^gh:/, "").split("/"), { data: o } = await r.rest.repos.getLatestRelease({
|
|
4233
3461
|
owner: i,
|
|
4234
3462
|
repo: a
|
|
4235
3463
|
}), s = o.assets[0];
|
|
4236
3464
|
if (!s) throw Error("未找到资源");
|
|
4237
|
-
let
|
|
4238
|
-
|
|
4239
|
-
responseType: "blob",
|
|
3465
|
+
let l = await an.get(s.browser_download_url, {
|
|
3466
|
+
retry: 2,
|
|
4240
3467
|
timeout: 1e3 * 60 * 5
|
|
4241
|
-
});
|
|
3468
|
+
}).blob();
|
|
4242
3469
|
return new File([l], s.name);
|
|
4243
3470
|
}
|
|
4244
3471
|
async download(e) {
|
|
@@ -4250,15 +3477,18 @@ var Ja = ja.plugin(Na, qa, za).defaults({ userAgent: "octokit-rest.js/22.0.1" })
|
|
|
4250
3477
|
isMatched(e) {
|
|
4251
3478
|
return e.startsWith("gh:") && e.split("/").length === 2;
|
|
4252
3479
|
}
|
|
4253
|
-
}(),
|
|
3480
|
+
}(), mi = "https://raw.githubusercontent.com/delta-comic/awesome-plugins/refs/heads/main/pages", hi = new class extends Me {
|
|
4254
3481
|
description = {
|
|
4255
3482
|
title: "快速安装插件",
|
|
4256
3483
|
description: "输入形如: \"ap:jmcomic\"的内容"
|
|
4257
3484
|
};
|
|
4258
3485
|
name = "awesome";
|
|
4259
3486
|
async installer(e) {
|
|
4260
|
-
let t = e.replace(/^ap:/, "")
|
|
4261
|
-
return
|
|
3487
|
+
let t = e.replace(/^ap:/, "");
|
|
3488
|
+
return (await an.get(`${t}.json`, {
|
|
3489
|
+
timeout: 1e3 * 30,
|
|
3490
|
+
baseUrl: mi
|
|
3491
|
+
}).json()).download;
|
|
4262
3492
|
}
|
|
4263
3493
|
async download(e) {
|
|
4264
3494
|
return await this.installer(e);
|
|
@@ -4269,7 +3499,7 @@ var Ja = ja.plugin(Na, qa, za).defaults({ userAgent: "octokit-rest.js/22.0.1" })
|
|
|
4269
3499
|
isMatched(e) {
|
|
4270
3500
|
return /^ap:[A-Za-z0-9\-\_]+$/.test(e);
|
|
4271
3501
|
}
|
|
4272
|
-
}(),
|
|
3502
|
+
}(), gi = (/* @__PURE__ */ o(((e) => {
|
|
4273
3503
|
function t(e) {
|
|
4274
3504
|
return e === void 0;
|
|
4275
3505
|
}
|
|
@@ -4283,27 +3513,23 @@ var Ja = ja.plugin(Na, qa, za).defaults({ userAgent: "octokit-rest.js/22.0.1" })
|
|
|
4283
3513
|
}, {});
|
|
4284
3514
|
}
|
|
4285
3515
|
e.parse = n;
|
|
4286
|
-
})))(),
|
|
3516
|
+
})))(), _i = new class extends Ne {
|
|
4287
3517
|
name = "userscript";
|
|
4288
3518
|
async install(e) {
|
|
4289
|
-
let t = await e.text(), n = h((0,
|
|
4290
|
-
return await
|
|
3519
|
+
let t = await e.text(), n = h((0, gi.parse)(t)), r = await je(n.name.id);
|
|
3520
|
+
return await fn(r, { recursive: !0 }), await vn(await J(r, "us.js"), t, { create: !0 }), n;
|
|
4291
3521
|
}
|
|
4292
3522
|
canInstall(e) {
|
|
4293
3523
|
return e.name.endsWith(".js");
|
|
4294
3524
|
}
|
|
4295
3525
|
async load(e) {
|
|
4296
|
-
let t = await
|
|
4297
|
-
|
|
4298
|
-
URL.revokeObjectURL(i);
|
|
4299
|
-
}), a.addEventListener("error", (e) => {
|
|
4300
|
-
throw URL.revokeObjectURL(i), e;
|
|
4301
|
-
}), a.async = !0, a.src = i, document.body.appendChild(a);
|
|
3526
|
+
let t = await hn(await J(await je(e.pluginName), "us.js")), n = t.lastIndexOf(";") + 1, r = new Blob([t.slice(0, n)], { type: "text/javascript" });
|
|
3527
|
+
await import(URL.createObjectURL(r));
|
|
4302
3528
|
}
|
|
4303
3529
|
async decodeMeta(e) {
|
|
4304
|
-
return h((0,
|
|
3530
|
+
return h((0, gi.parse)(await e.text()));
|
|
4305
3531
|
}
|
|
4306
|
-
}(),
|
|
3532
|
+
}(), vi = (/* @__PURE__ */ o(((t, n) => {
|
|
4307
3533
|
(function(e) {
|
|
4308
3534
|
typeof t == "object" && n !== void 0 ? n.exports = e() : typeof define == "function" && define.amd ? define([], e) : (typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : this).JSZip = e();
|
|
4309
3535
|
})(function() {
|
|
@@ -6185,23 +5411,23 @@ while (l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] ===
|
|
|
6185
5411
|
function ee() {
|
|
6186
5412
|
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;
|
|
6187
5413
|
}
|
|
6188
|
-
function
|
|
5414
|
+
function W(e) {
|
|
6189
5415
|
var t;
|
|
6190
5416
|
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);
|
|
6191
5417
|
}
|
|
6192
|
-
function
|
|
6193
|
-
var t =
|
|
5418
|
+
function te(e) {
|
|
5419
|
+
var t = W(e);
|
|
6194
5420
|
return t === d && function(e) {
|
|
6195
5421
|
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;
|
|
6196
5422
|
}(e.state), t;
|
|
6197
5423
|
}
|
|
6198
|
-
function
|
|
5424
|
+
function G(e, t, n, r, a, o) {
|
|
6199
5425
|
if (!e) return f;
|
|
6200
5426
|
var s = 1;
|
|
6201
5427
|
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);
|
|
6202
5428
|
r === 8 && (r = 9);
|
|
6203
5429
|
var c = new ee();
|
|
6204
|
-
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,
|
|
5430
|
+
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, te(e);
|
|
6205
5431
|
}
|
|
6206
5432
|
r = [
|
|
6207
5433
|
new U(0, 0, 0, 0, function(e, t) {
|
|
@@ -6227,8 +5453,8 @@ while (l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] ===
|
|
|
6227
5453
|
new U(32, 128, 258, 1024, H),
|
|
6228
5454
|
new U(32, 258, 258, 4096, H)
|
|
6229
5455
|
], n.deflateInit = function(e, t) {
|
|
6230
|
-
return
|
|
6231
|
-
}, n.deflateInit2 =
|
|
5456
|
+
return G(e, t, g, 15, 8, 0);
|
|
5457
|
+
}, n.deflateInit2 = G, n.deflateReset = te, n.deflateResetKeep = W, n.deflateSetHeader = function(e, t) {
|
|
6232
5458
|
return e && e.state && e.state.wrap === 2 ? (e.state.gzhead = t, d) : f;
|
|
6233
5459
|
}, n.deflate = function(e, t) {
|
|
6234
5460
|
var n, i, o, c;
|
|
@@ -7160,21 +6386,21 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
7160
6386
|
var i = 2 * t, a = 2 * n;
|
|
7161
6387
|
return e[i] < e[a] || e[i] === e[a] && r[t] <= r[n];
|
|
7162
6388
|
}
|
|
7163
|
-
function
|
|
6389
|
+
function W(e, t, n) {
|
|
7164
6390
|
for (var r = e.heap[n], i = n << 1; i <= e.heap_len && (i < e.heap_len && ee(t, e.heap[i + 1], e.heap[i], e.depth) && i++, !ee(t, r, e.heap[i], e.depth));) e.heap[n] = e.heap[i], n = i, i <<= 1;
|
|
7165
6391
|
e.heap[n] = r;
|
|
7166
6392
|
}
|
|
7167
|
-
function
|
|
6393
|
+
function te(e, t, n) {
|
|
7168
6394
|
var r, i, a, o, s = 0;
|
|
7169
6395
|
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;);
|
|
7170
6396
|
z(e, _, t);
|
|
7171
6397
|
}
|
|
7172
|
-
function
|
|
6398
|
+
function G(e, t) {
|
|
7173
6399
|
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;
|
|
7174
6400
|
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);
|
|
7175
6401
|
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]);
|
|
7176
|
-
for (t.max_code = l, n = e.heap_len >> 1; 1 <= n; n--)
|
|
7177
|
-
for (i = c; n = e.heap[1], e.heap[1] = e.heap[e.heap_len--],
|
|
6402
|
+
for (t.max_code = l, n = e.heap_len >> 1; 1 <= n; n--) W(e, a, n);
|
|
6403
|
+
for (i = c; n = e.heap[1], e.heap[1] = e.heap[e.heap_len--], W(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++, W(e, a, 1), 2 <= e.heap_len;);
|
|
7178
6404
|
e.heap[--e.heap_max] = e.heap[1], function(e, t) {
|
|
7179
6405
|
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;
|
|
7180
6406
|
for (a = 0; a <= m; a++) e.bl_count[a] = 0;
|
|
@@ -7188,11 +6414,11 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
7188
6414
|
}
|
|
7189
6415
|
}(e, t), V(a, l, e.bl_count);
|
|
7190
6416
|
}
|
|
7191
|
-
function
|
|
6417
|
+
function ne(e, t, n) {
|
|
7192
6418
|
var r, i, a = -1, o = t[1], s = 0, c = 7, l = 4;
|
|
7193
6419
|
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));
|
|
7194
6420
|
}
|
|
7195
|
-
function
|
|
6421
|
+
function re(e, t, n) {
|
|
7196
6422
|
var r, i, a = -1, o = t[1], s = 0, c = 7, l = 4;
|
|
7197
6423
|
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)) {
|
|
7198
6424
|
if (s < l) for (; z(e, i, e.bl_tree), --s != 0;);
|
|
@@ -7201,14 +6427,14 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
7201
6427
|
}
|
|
7202
6428
|
}
|
|
7203
6429
|
o(N);
|
|
7204
|
-
var
|
|
7205
|
-
function
|
|
6430
|
+
var ie = !1;
|
|
6431
|
+
function ae(e, t, n, i) {
|
|
7206
6432
|
R(e, (s << 1) + +!!i, 3), function(e, t, n, i) {
|
|
7207
6433
|
U(e), i && (L(e, n), L(e, ~n)), r.arraySet(e.pending_buf, e.window, t, n, e.pending), e.pending += n;
|
|
7208
6434
|
}(e, t, n, !0);
|
|
7209
6435
|
}
|
|
7210
6436
|
n._tr_init = function(e) {
|
|
7211
|
-
|
|
6437
|
+
ie ||= (function() {
|
|
7212
6438
|
var e, t, n, r, i, a = Array(m + 1);
|
|
7213
6439
|
for (r = n = 0; r < c - 1; r++) for (k[r] = n, e = 0; e < 1 << x[r]; e++) O[n++] = r;
|
|
7214
6440
|
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;
|
|
@@ -7221,7 +6447,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
7221
6447
|
for (V(T, u + 1, a), e = 0; e < d; e++) E[2 * e + 1] = 5, E[2 * e] = B(e, 5);
|
|
7222
6448
|
A = new P(T, x, l + 1, u, m), j = new P(E, S, 0, d, m), M = new P([], C, 0, f, g);
|
|
7223
6449
|
}(), !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);
|
|
7224
|
-
}, n._tr_stored_block =
|
|
6450
|
+
}, n._tr_stored_block = ae, n._tr_flush_block = function(e, t, n, r) {
|
|
7225
6451
|
var o, s, c = 0;
|
|
7226
6452
|
0 < e.level ? (e.strm.data_type === 2 && (e.strm.data_type = function(e) {
|
|
7227
6453
|
var t, n = 4093624447;
|
|
@@ -7229,15 +6455,15 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
7229
6455
|
if (e.dyn_ltree[18] !== 0 || e.dyn_ltree[20] !== 0 || e.dyn_ltree[26] !== 0) return a;
|
|
7230
6456
|
for (t = 32; t < l; t++) if (e.dyn_ltree[2 * t] !== 0) return a;
|
|
7231
6457
|
return i;
|
|
7232
|
-
}(e)),
|
|
6458
|
+
}(e)), G(e, e.l_desc), G(e, e.d_desc), c = function(e) {
|
|
7233
6459
|
var t;
|
|
7234
|
-
for (
|
|
6460
|
+
for (ne(e, e.dyn_ltree, e.l_desc.max_code), ne(e, e.dyn_dtree, e.d_desc.max_code), G(e, e.bl_desc), t = f - 1; 3 <= t && e.bl_tree[2 * w[t] + 1] === 0; t--);
|
|
7235
6461
|
return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
|
|
7236
|
-
}(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 ?
|
|
6462
|
+
}(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 ? ae(e, t, n, r) : e.strategy === 4 || s === o ? (R(e, 2 + +!!r, 3), te(e, T, E)) : (R(e, 4 + +!!r, 3), function(e, t, n, r) {
|
|
7237
6463
|
var i;
|
|
7238
6464
|
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);
|
|
7239
|
-
|
|
7240
|
-
}(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, c + 1),
|
|
6465
|
+
re(e, e.dyn_ltree, t - 1), re(e, e.dyn_dtree, n - 1);
|
|
6466
|
+
}(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, c + 1), te(e, e.dyn_ltree, e.dyn_dtree)), H(e), r && U(e);
|
|
7241
6467
|
}, n._tr_tally = function(e, t, n) {
|
|
7242
6468
|
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;
|
|
7243
6469
|
}, n._tr_align = function(e) {
|
|
@@ -7331,19 +6557,19 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
7331
6557
|
}, {}]
|
|
7332
6558
|
}, {}, [10])(10);
|
|
7333
6559
|
});
|
|
7334
|
-
})))(),
|
|
6560
|
+
})))(), yi = new class extends Ne {
|
|
7335
6561
|
name = "zip";
|
|
7336
6562
|
async install(e) {
|
|
7337
6563
|
console.log("[loader zip] begin:", e);
|
|
7338
|
-
let t = await
|
|
7339
|
-
await
|
|
7340
|
-
let n = await (0,
|
|
6564
|
+
let t = await je("__temp__");
|
|
6565
|
+
await fn(t, { recursive: !0 }), await _n(await J(t, "temp.zip"), new Uint8Array(await e.arrayBuffer())), console.log("[loader zip] temp:", t);
|
|
6566
|
+
let n = await (0, vi.loadAsync)(e);
|
|
7341
6567
|
console.log(n.files);
|
|
7342
|
-
let r = JSON.parse(await n.file("manifest.json")?.async("string") ?? "{}"), i = await
|
|
6568
|
+
let r = JSON.parse(await n.file("manifest.json")?.async("string") ?? "{}"), i = await je(r.name.id);
|
|
7343
6569
|
try {
|
|
7344
|
-
await
|
|
6570
|
+
await gn(i, { recursive: !0 });
|
|
7345
6571
|
} catch {}
|
|
7346
|
-
await
|
|
6572
|
+
await fn(i, { recursive: !0 });
|
|
7347
6573
|
let a = [];
|
|
7348
6574
|
n.forEach((e, t) => {
|
|
7349
6575
|
a.push({
|
|
@@ -7351,7 +6577,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
7351
6577
|
file: t
|
|
7352
6578
|
});
|
|
7353
6579
|
});
|
|
7354
|
-
for (let { file: e, path: t } of a) e.dir ? await
|
|
6580
|
+
for (let { file: e, path: t } of a) e.dir ? await fn(await J(i, t), { recursive: !0 }) : await _n(await J(i, t), await e.async("uint8array"), { create: !0 });
|
|
7355
6581
|
return r;
|
|
7356
6582
|
}
|
|
7357
6583
|
canInstall(e) {
|
|
@@ -7359,40 +6585,36 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
7359
6585
|
}
|
|
7360
6586
|
async load(e) {
|
|
7361
6587
|
if (!e.meta.entry) throw Error("not found entry");
|
|
7362
|
-
let t = await
|
|
7363
|
-
console.log("[loader zip] baseDir:", t, e.meta.entry);
|
|
7364
|
-
let n =
|
|
7365
|
-
if (n
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
let r = e.meta.entry.cssPath;
|
|
7369
|
-
if (r == "auto") {
|
|
7370
|
-
var i = "";
|
|
7371
|
-
let e = await qr(t);
|
|
6588
|
+
let t = await je(e.pluginName);
|
|
6589
|
+
if (console.log("[loader zip] baseDir:", t, e.meta.entry), await import(decodeURIComponent(Ee(await J(t, e.meta.entry.jsPath), "local"))), !e.meta.entry?.cssPath) return;
|
|
6590
|
+
let n = e.meta.entry.cssPath;
|
|
6591
|
+
if (n == "auto") {
|
|
6592
|
+
var r = "";
|
|
6593
|
+
let e = await pn(t);
|
|
7372
6594
|
for (let t of e) if (t.name.endsWith(".css")) {
|
|
7373
|
-
var
|
|
6595
|
+
var r = t.name;
|
|
7374
6596
|
break;
|
|
7375
6597
|
}
|
|
7376
|
-
} else var
|
|
7377
|
-
let
|
|
7378
|
-
|
|
6598
|
+
} else var r = n;
|
|
6599
|
+
let i = document.createElement("link");
|
|
6600
|
+
i.addEventListener("error", (e) => {
|
|
7379
6601
|
throw e;
|
|
7380
|
-
}),
|
|
6602
|
+
}), i.rel = "stylesheet", i.href = decodeURIComponent(Ee(await J(t, r), "local")), document.head.appendChild(i);
|
|
7381
6603
|
}
|
|
7382
6604
|
async decodeMeta(e) {
|
|
7383
|
-
let t = await (0,
|
|
6605
|
+
let t = await (0, vi.loadAsync)(e);
|
|
7384
6606
|
return console.log(t.files), JSON.parse(await t.file("manifest.json")?.async("string") ?? "{}");
|
|
7385
6607
|
}
|
|
7386
|
-
}(),
|
|
7387
|
-
loadAllPlugins: () =>
|
|
7388
|
-
loadPlugin: () =>
|
|
7389
|
-
loaders: () =>
|
|
7390
|
-
}),
|
|
7391
|
-
"./init/loader/1_userscript.ts":
|
|
7392
|
-
"./init/loader/2_zip.ts":
|
|
7393
|
-
})), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]),
|
|
6608
|
+
}(), bi = /* @__PURE__ */ a({
|
|
6609
|
+
loadAllPlugins: () => Ti,
|
|
6610
|
+
loadPlugin: () => wi,
|
|
6611
|
+
loaders: () => xi
|
|
6612
|
+
}), xi = ye(Object.entries(/* @__PURE__ */ Object.assign({
|
|
6613
|
+
"./init/loader/1_userscript.ts": _i,
|
|
6614
|
+
"./init/loader/2_zip.ts": yi
|
|
6615
|
+
})), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]), Si = {}, Ci = (e) => Si[e] ??= new ie(), wi = async (e) => {
|
|
7394
6616
|
console.log(`[plugin bootPlugin] booting name "${e.pluginName}"`);
|
|
7395
|
-
let t =
|
|
6617
|
+
let t = Ci(e.pluginName), n = p();
|
|
7396
6618
|
n.pluginSteps[e.pluginName] = {
|
|
7397
6619
|
now: {
|
|
7398
6620
|
status: "wait",
|
|
@@ -7404,7 +6626,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
7404
6626
|
}]
|
|
7405
6627
|
};
|
|
7406
6628
|
try {
|
|
7407
|
-
await t.acquire(), await
|
|
6629
|
+
await t.acquire(), await xi.find((t) => t.name == e.loaderName).load(e), await t.acquire();
|
|
7408
6630
|
} catch (t) {
|
|
7409
6631
|
throw n.pluginSteps[e.pluginName].now.status = "error", n.pluginSteps[e.pluginName].now.error = t, t;
|
|
7410
6632
|
}
|
|
@@ -7412,44 +6634,44 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
7412
6634
|
};
|
|
7413
6635
|
i.on("definedPlugin", async (e) => {
|
|
7414
6636
|
console.log("[plugin addPlugin] new plugin defined", e.name, e);
|
|
7415
|
-
let t =
|
|
7416
|
-
await
|
|
6637
|
+
let t = Ci(e.name);
|
|
6638
|
+
await Ke(e), console.log("[plugin addPlugin] done", e.name), t.release();
|
|
7417
6639
|
});
|
|
7418
|
-
var
|
|
6640
|
+
var Ti = async () => {
|
|
7419
6641
|
let { $initCore: e, coreName: t } = await import("./core-BF7YwnuZ.js");
|
|
7420
6642
|
await e();
|
|
7421
6643
|
let n = new Set([t]), r = await _.selectFrom("plugin").where("enable", "is", !0).selectAll().execute(), i = [];
|
|
7422
6644
|
for (;;) {
|
|
7423
6645
|
let e = r.filter((e) => e.meta.require.every((e) => n.has(e.id)));
|
|
7424
|
-
i.push(e),
|
|
6646
|
+
i.push(e), W(r, (t) => e.includes(t));
|
|
7425
6647
|
for (let { pluginName: t } of e) n.add(t);
|
|
7426
|
-
if (
|
|
6648
|
+
if (Se(e)) break;
|
|
7427
6649
|
}
|
|
7428
|
-
if (!
|
|
7429
|
-
for (let e of i) await Promise.all(e.map((e) =>
|
|
6650
|
+
if (!Se(r)) throw Error(`插件循环引用: ${r.map((e) => e.pluginName).join(", ")}`);
|
|
6651
|
+
for (let e of i) await Promise.all(e.map((e) => wi(e)));
|
|
7430
6652
|
console.log("[plugin bootPlugin] all load done");
|
|
7431
|
-
},
|
|
7432
|
-
installDepends: () =>
|
|
7433
|
-
installFilePlugin: () =>
|
|
7434
|
-
installPlugin: () =>
|
|
7435
|
-
installers: () =>
|
|
7436
|
-
updatePlugin: () =>
|
|
7437
|
-
usePluginConfig: () =>
|
|
7438
|
-
}),
|
|
7439
|
-
"./init/installer/10_normalUrl.ts":
|
|
7440
|
-
"./init/installer/20_local.ts":
|
|
7441
|
-
"./init/installer/30_dev.ts":
|
|
7442
|
-
"./init/installer/40_github.ts":
|
|
7443
|
-
"./init/installer/9999_awesome.ts":
|
|
7444
|
-
})), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]).reverse(),
|
|
6653
|
+
}, Ei = /* @__PURE__ */ a({
|
|
6654
|
+
installDepends: () => ki,
|
|
6655
|
+
installFilePlugin: () => Mi,
|
|
6656
|
+
installPlugin: () => ji,
|
|
6657
|
+
installers: () => Di,
|
|
6658
|
+
updatePlugin: () => Ni,
|
|
6659
|
+
usePluginConfig: () => Oi
|
|
6660
|
+
}), Di = ye(Object.entries(/* @__PURE__ */ Object.assign({
|
|
6661
|
+
"./init/installer/10_normalUrl.ts": on,
|
|
6662
|
+
"./init/installer/20_local.ts": yn,
|
|
6663
|
+
"./init/installer/30_dev.ts": bn,
|
|
6664
|
+
"./init/installer/40_github.ts": pi,
|
|
6665
|
+
"./init/installer/9999_awesome.ts": hi
|
|
6666
|
+
})), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]).reverse(), Oi = () => v(u, "pluginInstallSourceOverrides", []), ki = (e, t, n) => e.createLoading("依赖安装/检查", async (e) => {
|
|
7445
6667
|
e.retryable = !0;
|
|
7446
|
-
let r = 0, i = n ?? new Set((await _.selectFrom("plugin").select("pluginName").execute()).map((e) => e.pluginName)), a =
|
|
7447
|
-
for (let { id: n, download: o } of t.require) i.has(n) || !o || (console.log(`从 ${t.name.id} 发现未安装依赖: ${n} ->`, o), e.description = `安装: ${n}`, await
|
|
6668
|
+
let r = 0, i = n ?? new Set((await _.selectFrom("plugin").select("pluginName").execute()).map((e) => e.pluginName)), a = Oi();
|
|
6669
|
+
for (let { id: n, download: o } of t.require) i.has(n) || !o || (console.log(`从 ${t.name.id} 发现未安装依赖: ${n} ->`, o), e.description = `安装: ${n}`, await ji(a.value.find((e) => e.id == n && e.enabled)?.install ?? o), r++);
|
|
7448
6670
|
e.description = `安装完成,共${r}个`;
|
|
7449
|
-
}),
|
|
6671
|
+
}), Ai = async (e, t, n, r, i) => {
|
|
7450
6672
|
let a = await e.createLoading("安装插件", async (e) => {
|
|
7451
6673
|
e.retryable = !0;
|
|
7452
|
-
let i =
|
|
6674
|
+
let i = xi.filter((e) => e.canInstall(t)).at(-1);
|
|
7453
6675
|
if (!i) throw Error("没有符合的安装器");
|
|
7454
6676
|
e.description = i.name;
|
|
7455
6677
|
let a = await i.install(t);
|
|
@@ -7465,13 +6687,13 @@ var so = async () => {
|
|
|
7465
6687
|
pluginName: a.name.id
|
|
7466
6688
|
}] }), a;
|
|
7467
6689
|
});
|
|
7468
|
-
console.log(`安装插件成功: ${a.name.id} ->`, a), await
|
|
7469
|
-
},
|
|
6690
|
+
console.log(`安装插件成功: ${a.name.id} ->`, a), await ki(e, a, i);
|
|
6691
|
+
}, ji = (e, t) => V(`下载插件-${e}`, async (n) => {
|
|
7470
6692
|
let [r, i] = await n.createLoading("下载", async (t) => {
|
|
7471
6693
|
t.retryable = !0;
|
|
7472
6694
|
let n = e;
|
|
7473
6695
|
for (;;) {
|
|
7474
|
-
let e =
|
|
6696
|
+
let e = Di.filter((e) => e.isMatched(n)).at(0);
|
|
7475
6697
|
if (!e) throw Error("没有符合的下载器:" + n);
|
|
7476
6698
|
t.description = e.name;
|
|
7477
6699
|
let r = await e.download(n);
|
|
@@ -7479,15 +6701,15 @@ var so = async () => {
|
|
|
7479
6701
|
else return [r, e];
|
|
7480
6702
|
}
|
|
7481
6703
|
});
|
|
7482
|
-
await
|
|
7483
|
-
}),
|
|
7484
|
-
await
|
|
7485
|
-
}),
|
|
6704
|
+
await Ai(n, r, i.name, e, t);
|
|
6705
|
+
}), Mi = (e, t) => V(`安装插件-${e.name}`, async (n) => {
|
|
6706
|
+
await Ai(n, e, "", "", t);
|
|
6707
|
+
}), Ni = async (e, t) => V(`更新插件-${e.pluginName}`, async (n) => {
|
|
7486
6708
|
let r = await n.createLoading("更新", async (t) => {
|
|
7487
6709
|
t.retryable = !0;
|
|
7488
6710
|
let n = e.installerName;
|
|
7489
6711
|
for (;;) {
|
|
7490
|
-
let r =
|
|
6712
|
+
let r = Di.find((e) => e.name == n);
|
|
7491
6713
|
if (!r) throw Error("没有符合的下载器");
|
|
7492
6714
|
t.description = r.name;
|
|
7493
6715
|
let i = await r.update(e);
|
|
@@ -7496,22 +6718,22 @@ var so = async () => {
|
|
|
7496
6718
|
}
|
|
7497
6719
|
}), i = await n.createLoading("安装插件", async (t) => {
|
|
7498
6720
|
t.retryable = !0;
|
|
7499
|
-
let n =
|
|
6721
|
+
let n = xi.find((t) => t.name == e.loaderName);
|
|
7500
6722
|
if (!n) throw Error("没有符合的安装器");
|
|
7501
6723
|
return await n.install(r);
|
|
7502
6724
|
}), { upsert: a } = g.useUpsert();
|
|
7503
6725
|
await a({ archives: [{
|
|
7504
6726
|
...e,
|
|
7505
6727
|
meta: i
|
|
7506
|
-
}] }), await
|
|
7507
|
-
}),
|
|
6728
|
+
}] }), await ki(n, i, t);
|
|
6729
|
+
}), Pi = /* @__PURE__ */ T({
|
|
7508
6730
|
__name: "Inject",
|
|
7509
6731
|
props: {
|
|
7510
6732
|
key: {},
|
|
7511
6733
|
args: {}
|
|
7512
6734
|
},
|
|
7513
6735
|
setup(e) {
|
|
7514
|
-
let t = e, n = x(() => Array.from(
|
|
6736
|
+
let t = e, n = x(() => Array.from(K.envExtends.values()).filter((e) => e.key == t.key));
|
|
7515
6737
|
return (t, r) => (k(!0), w(b, null, j(n.value, (t) => (k(), S(P(R), {
|
|
7516
6738
|
promise: async () => {
|
|
7517
6739
|
try {
|
|
@@ -7529,14 +6751,14 @@ var so = async () => {
|
|
|
7529
6751
|
_: 2
|
|
7530
6752
|
}, 1032, ["promise"]))), 256));
|
|
7531
6753
|
}
|
|
7532
|
-
}),
|
|
7533
|
-
|
|
6754
|
+
}), Fi = (e, t, n) => {
|
|
6755
|
+
K.envExtends.add({
|
|
7534
6756
|
key: e,
|
|
7535
6757
|
component: t,
|
|
7536
6758
|
condition: n ?? (() => !0)
|
|
7537
6759
|
});
|
|
7538
6760
|
};
|
|
7539
6761
|
//#endregion
|
|
7540
|
-
export {
|
|
6762
|
+
export { We as Booter, m as ConfigPointer, K as Global, Pi as Inject, Ei as Install, bi as Loader, Fi as addInjection, n as appConfig, s as declareDepType, h as decodePluginMeta, r as definePlugin, i as pluginEmitter, t as pluginExposes, d as require, c as useConfig, p as usePluginStore };
|
|
7541
6763
|
|
|
7542
6764
|
//# sourceMappingURL=index.js.map
|