@delta-comic/plugin 0.3.4 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/core-NoooY1bz.js +2 -0
- package/dist/core-wAb1OuYe.js +521 -0
- package/dist/core-wAb1OuYe.js.map +1 -0
- package/dist/index.css +2 -2
- package/dist/index.js +2300 -1614
- package/dist/index.js.map +1 -1
- package/dist/pack.tgz +0 -0
- package/package.json +21 -26
- package/dist/lib/config.d.ts +0 -71
- package/dist/lib/depends.d.ts +0 -7
- package/dist/lib/driver/core.d.ts +0 -68
- package/dist/lib/driver/icon.d.ts +0 -3
- package/dist/lib/driver/index.d.ts +0 -3
- package/dist/lib/driver/init/booter/0_configSetter.d.ts +0 -8
- package/dist/lib/driver/init/booter/10_apiTest.d.ts +0 -9
- package/dist/lib/driver/init/booter/20_resourceTest.d.ts +0 -8
- package/dist/lib/driver/init/booter/30_boot.d.ts +0 -8
- package/dist/lib/driver/init/booter/40_auth.d.ts +0 -8
- package/dist/lib/driver/init/booter/50_otherProcess.d.ts +0 -8
- package/dist/lib/driver/init/booter/utils.d.ts +0 -3
- package/dist/lib/driver/init/index.d.ts +0 -19
- package/dist/lib/driver/init/installer/10_normalUrl.d.ts +0 -12
- package/dist/lib/driver/init/installer/20_local.d.ts +0 -12
- package/dist/lib/driver/init/installer/30_dev.d.ts +0 -12
- package/dist/lib/driver/init/installer/40_github.d.ts +0 -12
- package/dist/lib/driver/init/installer/9999_awesome.d.ts +0 -12
- package/dist/lib/driver/init/loader/1_userscript.d.ts +0 -11
- package/dist/lib/driver/init/loader/2_zip.d.ts +0 -11
- package/dist/lib/driver/init/utils.d.ts +0 -28
- package/dist/lib/driver/store.d.ts +0 -37
- package/dist/lib/env/Inject.vue.d.ts +0 -18
- package/dist/lib/env/index.d.ts +0 -12
- package/dist/lib/global.d.ts +0 -26
- package/dist/lib/index.d.ts +0 -6
- package/dist/lib/plugin/api.d.ts +0 -8
- package/dist/lib/plugin/auth.d.ts +0 -15
- package/dist/lib/plugin/content.d.ts +0 -8
- package/dist/lib/plugin/index.d.ts +0 -81
- package/dist/lib/plugin/otherProgress.d.ts +0 -4
- package/dist/lib/plugin/resource.d.ts +0 -5
- package/dist/lib/plugin/search.d.ts +0 -71
- package/dist/lib/plugin/share.d.ts +0 -26
- package/dist/lib/plugin/subscribe.d.ts +0 -13
- package/dist/lib/plugin/user.d.ts +0 -47
package/dist/index.js
CHANGED
|
@@ -1,16 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, u as h } from "./core-wAb1OuYe.js";
|
|
2
|
+
import { PluginArchiveDB as g, db as _, useNativeStore as v } from "@delta-comic/db";
|
|
3
|
+
import { useGlobalVar as y } from "@delta-comic/utils";
|
|
4
|
+
import { Fragment as b, computed as x, createBlock as S, createCommentVNode as C, createElementBlock as w, defineComponent as T, h as E, markRaw as D, mergeProps as O, openBlock as k, ref as A, renderList as j, resolveDynamicComponent as M, shallowReactive as N, unref as P, withCtx as F } from "vue";
|
|
5
|
+
import { SourcedKeyMap as I, uni as L } from "@delta-comic/model";
|
|
6
|
+
import { DcAwait as R, DcPopup as z, createDialog as B, createDownloadMessage as V, createForm as H } from "@delta-comic/ui";
|
|
7
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/promise/semaphore.mjs
|
|
8
|
+
var U = class {
|
|
9
|
+
capacity;
|
|
10
|
+
available;
|
|
11
|
+
deferredTasks = [];
|
|
12
|
+
constructor(e) {
|
|
13
|
+
this.capacity = e, this.available = e;
|
|
14
|
+
}
|
|
15
|
+
async acquire() {
|
|
16
|
+
if (this.available > 0) {
|
|
17
|
+
this.available--;
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
return new Promise((e) => {
|
|
21
|
+
this.deferredTasks.push(e);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
release() {
|
|
25
|
+
let e = this.deferredTasks.shift();
|
|
26
|
+
if (e != null) {
|
|
27
|
+
e();
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
this.available < this.capacity && this.available++;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/array/flatten.mjs
|
|
35
|
+
function ee(e, t = 1) {
|
|
14
36
|
let n = [], r = Math.floor(t), i = (e, t) => {
|
|
15
37
|
for (let a = 0; a < e.length; a++) {
|
|
16
38
|
let o = e[a];
|
|
@@ -19,7 +41,9 @@ function q(e, t = 1) {
|
|
|
19
41
|
};
|
|
20
42
|
return i(e, 0), n;
|
|
21
43
|
}
|
|
22
|
-
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/array/remove.mjs
|
|
46
|
+
function te(e, t) {
|
|
23
47
|
let n = e.slice(), r = [], i = 0;
|
|
24
48
|
for (let a = 0; a < e.length; a++) {
|
|
25
49
|
if (t(e[a], a, n)) {
|
|
@@ -34,53 +58,30 @@ function ee(e, t) {
|
|
|
34
58
|
}
|
|
35
59
|
return e.length = i, r;
|
|
36
60
|
}
|
|
37
|
-
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
|
|
63
|
+
function ne(e) {
|
|
38
64
|
return typeof e == "symbol" || e instanceof Symbol;
|
|
39
65
|
}
|
|
40
|
-
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
68
|
+
function re(e) {
|
|
41
69
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
42
70
|
}
|
|
43
|
-
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
73
|
+
function ie(e) {
|
|
44
74
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
45
75
|
}
|
|
46
|
-
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.mjs
|
|
78
|
+
function ae(e, t) {
|
|
47
79
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
48
80
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return typeof e == "string";
|
|
54
|
-
}
|
|
55
|
-
function se(e) {
|
|
56
|
-
return e === void 0;
|
|
57
|
-
}
|
|
58
|
-
var ce = class {
|
|
59
|
-
capacity;
|
|
60
|
-
available;
|
|
61
|
-
deferredTasks = [];
|
|
62
|
-
constructor(e) {
|
|
63
|
-
this.capacity = e, this.available = e;
|
|
64
|
-
}
|
|
65
|
-
async acquire() {
|
|
66
|
-
if (this.available > 0) {
|
|
67
|
-
this.available--;
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
return new Promise((e) => {
|
|
71
|
-
this.deferredTasks.push(e);
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
release() {
|
|
75
|
-
let e = this.deferredTasks.shift();
|
|
76
|
-
if (e != null) {
|
|
77
|
-
e();
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
this.available < this.capacity && this.available++;
|
|
81
|
-
}
|
|
82
|
-
}, le = class {
|
|
83
|
-
semaphore = new ce(1);
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/promise/mutex.mjs
|
|
83
|
+
var oe = class {
|
|
84
|
+
semaphore = new U(1);
|
|
84
85
|
get isLocked() {
|
|
85
86
|
return this.semaphore.available === 0;
|
|
86
87
|
}
|
|
@@ -91,23 +92,26 @@ var ce = class {
|
|
|
91
92
|
this.semaphore.release();
|
|
92
93
|
}
|
|
93
94
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
function de(e) {
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
|
|
97
|
+
function se(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
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/util/toString.mjs
|
|
102
|
+
function ce(e) {
|
|
101
103
|
if (e == null) return "";
|
|
102
104
|
if (typeof e == "string") return e;
|
|
103
|
-
if (Array.isArray(e)) return e.map(
|
|
105
|
+
if (Array.isArray(e)) return e.map(ce).join(",");
|
|
104
106
|
let t = String(e);
|
|
105
107
|
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
|
|
106
108
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/util/toPath.mjs
|
|
111
|
+
function le(e) {
|
|
112
|
+
if (Array.isArray(e)) return e.map(se);
|
|
109
113
|
if (typeof e == "symbol") return [e];
|
|
110
|
-
e =
|
|
114
|
+
e = ce(e);
|
|
111
115
|
let t = [], n = e.length;
|
|
112
116
|
if (n === 0) return t;
|
|
113
117
|
let r = 0, i = "", a = "", o = !1;
|
|
@@ -117,29 +121,39 @@ function pe(e) {
|
|
|
117
121
|
}
|
|
118
122
|
return i && t.push(i), t;
|
|
119
123
|
}
|
|
120
|
-
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs
|
|
126
|
+
function ue(e) {
|
|
121
127
|
return e !== null && (typeof e == "object" || typeof e == "function");
|
|
122
128
|
}
|
|
123
|
-
|
|
124
|
-
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
|
|
131
|
+
var de = /^(?:0|[1-9]\d*)$/;
|
|
132
|
+
function fe(e, t = 2 ** 53 - 1) {
|
|
125
133
|
switch (typeof e) {
|
|
126
134
|
case "number": return Number.isInteger(e) && e >= 0 && e < t;
|
|
127
135
|
case "symbol": return !1;
|
|
128
|
-
case "string": return
|
|
136
|
+
case "string": return de.test(e);
|
|
129
137
|
}
|
|
130
138
|
}
|
|
131
|
-
|
|
132
|
-
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
|
|
141
|
+
function pe(e) {
|
|
142
|
+
return typeof e == "object" && !!e && ie(e) === "[object Arguments]";
|
|
133
143
|
}
|
|
134
|
-
|
|
135
|
-
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/isIterateeCall.mjs
|
|
146
|
+
function me(e, t, n) {
|
|
147
|
+
return ue(n) && (typeof t == "number" && f(n) && fe(t) && t < n.length || typeof t == "string" && t in n) ? ae(n[t], e) : !1;
|
|
136
148
|
}
|
|
137
|
-
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/compareValues.mjs
|
|
151
|
+
function he(e) {
|
|
138
152
|
return typeof e == "symbol" ? 1 : e === null ? 2 : e === void 0 ? 3 : e === e ? 0 : 4;
|
|
139
153
|
}
|
|
140
|
-
var
|
|
154
|
+
var ge = (e, t, n) => {
|
|
141
155
|
if (e !== t) {
|
|
142
|
-
let r =
|
|
156
|
+
let r = he(e), i = he(t);
|
|
143
157
|
if (r === i && r === 0) {
|
|
144
158
|
if (e < t) return n === "desc" ? 1 : -1;
|
|
145
159
|
if (e > t) return n === "desc" ? -1 : 1;
|
|
@@ -147,958 +161,1888 @@ var be = (e, t, n) => {
|
|
|
147
161
|
return n === "desc" ? i - r : r - i;
|
|
148
162
|
}
|
|
149
163
|
return 0;
|
|
150
|
-
},
|
|
151
|
-
function
|
|
152
|
-
return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null ||
|
|
164
|
+
}, _e = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ve = /^\w*$/;
|
|
165
|
+
function ye(e, t) {
|
|
166
|
+
return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null || ne(e) ? !0 : typeof e == "string" && (ve.test(e) || !_e.test(e)) || t != null && Object.hasOwn(t, e);
|
|
153
167
|
}
|
|
154
|
-
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/array/orderBy.mjs
|
|
170
|
+
function be(e, t, n, r) {
|
|
155
171
|
if (e == null) return [];
|
|
156
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));
|
|
157
173
|
let i = (e, t) => {
|
|
158
174
|
let n = e;
|
|
159
175
|
for (let e = 0; e < t.length && n != null; ++e) n = n[t[e]];
|
|
160
176
|
return n;
|
|
161
|
-
}, a = (e, t) => t == null || e == null ? t : typeof e == "object" && "key" in e ? Object.hasOwn(t, e.key) ? t[e.key] : i(t, e.path) : typeof e == "function" ? e(t) : Array.isArray(e) ? i(t, e) : typeof t == "object" ? t[e] : t, o = t.map((e) => (Array.isArray(e) && e.length === 1 && (e = e[0]), e == null || typeof e == "function" || Array.isArray(e) ||
|
|
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) || ye(e) ? e : {
|
|
162
178
|
key: e,
|
|
163
|
-
path:
|
|
179
|
+
path: le(e)
|
|
164
180
|
}));
|
|
165
181
|
return e.map((e) => ({
|
|
166
182
|
original: e,
|
|
167
183
|
criteria: o.map((t) => a(t, e))
|
|
168
184
|
})).slice().sort((e, t) => {
|
|
169
185
|
for (let r = 0; r < o.length; r++) {
|
|
170
|
-
let i =
|
|
186
|
+
let i = ge(e.criteria[r], t.criteria[r], n[r]);
|
|
171
187
|
if (i !== 0) return i;
|
|
172
188
|
}
|
|
173
189
|
return 0;
|
|
174
190
|
}).map((e) => e.original);
|
|
175
191
|
}
|
|
176
|
-
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/array/sortBy.mjs
|
|
194
|
+
function xe(e, ...t) {
|
|
177
195
|
let n = t.length;
|
|
178
|
-
return n > 1 &&
|
|
196
|
+
return n > 1 && me(e, t[0], t[1]) ? t = [] : n > 2 && me(t[0], t[1], t[2]) && (t = [t[0]]), be(e, ee(t), ["asc"]);
|
|
179
197
|
}
|
|
180
|
-
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/isPrototype.mjs
|
|
200
|
+
function Se(e) {
|
|
181
201
|
let t = e?.constructor;
|
|
182
202
|
return e === (typeof t == "function" ? t.prototype : Object.prototype);
|
|
183
203
|
}
|
|
184
|
-
|
|
185
|
-
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
|
|
206
|
+
function Ce(e) {
|
|
207
|
+
return re(e);
|
|
186
208
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
for (let n = 0; n < e.length; n++) {
|
|
191
|
-
let [r, i] = e[n];
|
|
192
|
-
t[r] = i;
|
|
193
|
-
}
|
|
194
|
-
return t;
|
|
195
|
-
}
|
|
196
|
-
function ke(e) {
|
|
197
|
-
return typeof e == "function";
|
|
198
|
-
}
|
|
199
|
-
function Ae(e) {
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isEmpty.mjs
|
|
211
|
+
function we(e) {
|
|
200
212
|
if (e == null) return !0;
|
|
201
|
-
if (
|
|
213
|
+
if (f(e)) return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !Ce(e) && !pe(e) ? !1 : e.length === 0;
|
|
202
214
|
if (typeof e == "object") {
|
|
203
215
|
if (e instanceof Map || e instanceof Set) return e.size === 0;
|
|
204
216
|
let t = Object.keys(e);
|
|
205
|
-
return
|
|
217
|
+
return Se(e) ? t.filter((e) => e !== "constructor").length === 0 : t.length === 0;
|
|
206
218
|
}
|
|
207
219
|
return !0;
|
|
208
220
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
off: function(t, n) {
|
|
217
|
-
var r = e.get(t);
|
|
218
|
-
r && (n ? r.splice(r.indexOf(n) >>> 0, 1) : e.set(t, []));
|
|
219
|
-
},
|
|
220
|
-
emit: function(t, n) {
|
|
221
|
-
var r = e.get(t);
|
|
222
|
-
r && r.slice().map(function(e) {
|
|
223
|
-
e(n);
|
|
224
|
-
}), (r = e.get("*")) && r.slice().map(function(e) {
|
|
225
|
-
e(t, n);
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
const Me = je(), Ne = async (e) => {
|
|
231
|
-
if (ke(e)) var t = e(window.$$safe$$);
|
|
232
|
-
else var t = e;
|
|
233
|
-
return console.log("[definePlugin] new plugin defining...", t), await Me.emit("definedPlugin", t), t;
|
|
234
|
-
}, Pe = (e) => ({
|
|
235
|
-
name: {
|
|
236
|
-
display: e["name:display"],
|
|
237
|
-
id: e["name:id"]
|
|
238
|
-
},
|
|
239
|
-
author: e.author ?? "",
|
|
240
|
-
description: e.description,
|
|
241
|
-
require: (e.require ? oe(e.require) ? [e.require] : e.require : []).map((e) => {
|
|
242
|
-
let [t, ...n] = e.split(":");
|
|
243
|
-
if (t.startsWith("dc|")) return {
|
|
244
|
-
id: t.replace(/^dc\|/, ""),
|
|
245
|
-
download: n.join(":")
|
|
246
|
-
};
|
|
247
|
-
}).filter((e) => !se(e)),
|
|
248
|
-
version: {
|
|
249
|
-
plugin: e.version.split("/")[0],
|
|
250
|
-
supportCore: (() => {
|
|
251
|
-
let t = e.version.split("/")[1];
|
|
252
|
-
return e.version.split("/")[2] ? t.replaceAll(">=", "^") : t;
|
|
253
|
-
})()
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
var Fe = /* @__PURE__ */ new WeakMap(), Ie = (...e) => {
|
|
257
|
-
let t = e[0], n = p()?.proxy ?? m();
|
|
258
|
-
if (n == null && !g()) throw Error("injectLocal must be called in setup");
|
|
259
|
-
return n && Fe.has(n) && t in Fe.get(n) ? Fe.get(n)[t] : _(...e);
|
|
260
|
-
}, Le = typeof window < "u" && typeof document < "u";
|
|
261
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
262
|
-
var Re = Object.prototype.toString, ze = (e) => Re.call(e) === "[object Object]", Be = () => {};
|
|
263
|
-
/**
|
|
264
|
-
* Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client
|
|
265
|
-
*/
|
|
266
|
-
function Ve(e) {
|
|
267
|
-
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
268
|
-
}
|
|
269
|
-
function He(e) {
|
|
270
|
-
return Array.isArray(e) ? e : [e];
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Shorthand for watching value with {immediate: true}
|
|
274
|
-
*
|
|
275
|
-
* @see https://vueuse.org/watchImmediate
|
|
276
|
-
*/
|
|
277
|
-
function Ue(e, t, n) {
|
|
278
|
-
return j(e, t, {
|
|
279
|
-
...n,
|
|
280
|
-
immediate: !0
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
function We(e, t, n) {
|
|
284
|
-
let r;
|
|
285
|
-
r = v(n) ? { evaluating: n } : n || {};
|
|
286
|
-
let { lazy: i = !1, flush: a = "sync", evaluating: o = void 0, shallow: c = !0, onError: l = globalThis.reportError ?? Be } = r, u = O(!i), d = c ? O(t) : w(t), f = 0;
|
|
287
|
-
return M(async (t) => {
|
|
288
|
-
if (!u.value) return;
|
|
289
|
-
f++;
|
|
290
|
-
let n = f, r = !1;
|
|
291
|
-
o && Promise.resolve().then(() => {
|
|
292
|
-
o.value = !0;
|
|
293
|
-
});
|
|
294
|
-
try {
|
|
295
|
-
let i = await e((e) => {
|
|
296
|
-
t(() => {
|
|
297
|
-
o && (o.value = !1), r || e();
|
|
298
|
-
});
|
|
299
|
-
});
|
|
300
|
-
n === f && (d.value = i);
|
|
301
|
-
} catch (e) {
|
|
302
|
-
l(e);
|
|
303
|
-
} finally {
|
|
304
|
-
o && n === f && (o.value = !1), r = !0;
|
|
305
|
-
}
|
|
306
|
-
}, { flush: a }), i ? s(() => (u.value = !0, d.value)) : d;
|
|
307
|
-
}
|
|
308
|
-
var Ge = Le ? window : void 0;
|
|
309
|
-
Le && window.document, Le && window.navigator, Le && window.location;
|
|
310
|
-
/**
|
|
311
|
-
* Get the dom element of a ref of element or Vue component instance
|
|
312
|
-
*
|
|
313
|
-
* @param elRef
|
|
314
|
-
*/
|
|
315
|
-
function Ke(e) {
|
|
316
|
-
let t = k(e);
|
|
317
|
-
return t?.$el ?? t;
|
|
318
|
-
}
|
|
319
|
-
function qe(...e) {
|
|
320
|
-
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = s(() => {
|
|
321
|
-
let t = He(k(e[0])).filter((e) => e != null);
|
|
322
|
-
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
323
|
-
});
|
|
324
|
-
return Ue(() => [
|
|
325
|
-
n.value?.map((e) => Ke(e)) ?? [Ge].filter((e) => e != null),
|
|
326
|
-
He(k(n.value ? e[1] : e[0])),
|
|
327
|
-
He(A(n.value ? e[2] : e[1])),
|
|
328
|
-
k(n.value ? e[3] : e[2])
|
|
329
|
-
], ([e, n, r, i], a, o) => {
|
|
330
|
-
if (!e?.length || !n?.length || !r?.length) return;
|
|
331
|
-
let s = ze(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
332
|
-
o(() => {
|
|
333
|
-
c.forEach((e) => e());
|
|
334
|
-
});
|
|
335
|
-
}, { flush: "post" });
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* Mounted state in ref.
|
|
339
|
-
*
|
|
340
|
-
* @see https://vueuse.org/useMounted
|
|
341
|
-
*
|
|
342
|
-
* @__NO_SIDE_EFFECTS__
|
|
343
|
-
*/
|
|
344
|
-
function Je() {
|
|
345
|
-
let e = O(!1), t = p();
|
|
346
|
-
return t && x(() => {
|
|
347
|
-
e.value = !0;
|
|
348
|
-
}, t), e;
|
|
349
|
-
}
|
|
350
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
351
|
-
function Ye(e) {
|
|
352
|
-
let t = Je();
|
|
353
|
-
return s(() => (t.value, !!e()));
|
|
354
|
-
}
|
|
355
|
-
var Xe = Symbol("vueuse-ssr-width");
|
|
356
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
357
|
-
function Ze() {
|
|
358
|
-
let e = g() ? Ie(Xe, null) : null;
|
|
359
|
-
return typeof e == "number" ? e : void 0;
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Reactive Media Query.
|
|
363
|
-
*
|
|
364
|
-
* @see https://vueuse.org/useMediaQuery
|
|
365
|
-
* @param query
|
|
366
|
-
* @param options
|
|
367
|
-
*/
|
|
368
|
-
function Qe(e, t = {}) {
|
|
369
|
-
let { window: n = Ge, ssrWidth: r = /* @__PURE__ */ Ze() } = t, i = /* @__PURE__ */ Ye(() => n && "matchMedia" in n && typeof n.matchMedia == "function"), a = O(typeof r == "number"), o = O(), c = O(!1);
|
|
370
|
-
return M(() => {
|
|
371
|
-
if (a.value) {
|
|
372
|
-
a.value = !i.value, c.value = k(e).split(",").some((e) => {
|
|
373
|
-
let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), a = !!(n || i);
|
|
374
|
-
return n && a && (a = r >= Ve(n[1])), i && a && (a = r <= Ve(i[1])), t ? !a : a;
|
|
375
|
-
});
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
i.value && (o.value = n.matchMedia(k(e)), c.value = o.value.matches);
|
|
379
|
-
}), qe(o, "change", (e) => {
|
|
380
|
-
c.value = e.matches;
|
|
381
|
-
}, { passive: !0 }), s(() => c.value);
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* Reactive dark theme preference.
|
|
385
|
-
*
|
|
386
|
-
* @see https://vueuse.org/usePreferredDark
|
|
387
|
-
* @param [options]
|
|
388
|
-
*
|
|
389
|
-
* @__NO_SIDE_EFFECTS__
|
|
390
|
-
*/
|
|
391
|
-
function $e(e) {
|
|
392
|
-
return Qe("(prefers-color-scheme: dark)", e);
|
|
393
|
-
}
|
|
394
|
-
var et = class {
|
|
395
|
-
constructor(e, t, n) {
|
|
396
|
-
this.pluginName = e, this.config = t, this.configName = n, this.key = Symbol.for(`config:${e}`);
|
|
397
|
-
}
|
|
398
|
-
key;
|
|
399
|
-
};
|
|
400
|
-
const tt = a(new et("core", {
|
|
401
|
-
recordHistory: {
|
|
402
|
-
type: "switch",
|
|
403
|
-
defaultValue: !0,
|
|
404
|
-
info: "记录历史记录"
|
|
405
|
-
},
|
|
406
|
-
showAIProject: {
|
|
407
|
-
type: "switch",
|
|
408
|
-
defaultValue: !0,
|
|
409
|
-
info: "展示AI作品"
|
|
410
|
-
},
|
|
411
|
-
darkMode: {
|
|
412
|
-
type: "radio",
|
|
413
|
-
defaultValue: "system",
|
|
414
|
-
info: "暗色模式配置",
|
|
415
|
-
comp: "select",
|
|
416
|
-
selects: [
|
|
417
|
-
{
|
|
418
|
-
label: "浅色",
|
|
419
|
-
value: "light"
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
label: "暗色",
|
|
423
|
-
value: "dark"
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
label: "跟随系统",
|
|
427
|
-
value: "system"
|
|
428
|
-
}
|
|
429
|
-
]
|
|
430
|
-
},
|
|
431
|
-
easilyTitle: {
|
|
432
|
-
type: "switch",
|
|
433
|
-
defaultValue: !1,
|
|
434
|
-
info: "简化标题(实验)"
|
|
435
|
-
},
|
|
436
|
-
githubToken: {
|
|
437
|
-
type: "string",
|
|
438
|
-
defaultValue: "",
|
|
439
|
-
info: "github的token",
|
|
440
|
-
placeholder: "仅用于解除api访问限制"
|
|
441
|
-
}
|
|
442
|
-
}, "核心"), "core/plugin/config"), nt = P("config", (e) => {
|
|
443
|
-
let t = D(/* @__PURE__ */ new Map()), n = e.action((e) => {
|
|
444
|
-
let n = t.get(e.key);
|
|
445
|
-
if (!n) throw Error(`not found config by plugin "${e.pluginName}"`);
|
|
446
|
-
return n.value;
|
|
447
|
-
}, "load"), r = $e(), a = s(() => {
|
|
448
|
-
if (!o(tt)) return r.value;
|
|
449
|
-
switch (n(tt).value.darkMode) {
|
|
450
|
-
case "light": return !1;
|
|
451
|
-
case "dark": return !0;
|
|
452
|
-
case "system": return r.value;
|
|
453
|
-
default: return !1;
|
|
454
|
-
}
|
|
455
|
-
}), o = e.action((e) => t.has(e.key), "isExistConfig");
|
|
456
|
-
return {
|
|
457
|
-
isDark: a,
|
|
458
|
-
form: t,
|
|
459
|
-
$load: n,
|
|
460
|
-
$isExistConfig: o,
|
|
461
|
-
$resignerConfig: e.action((e) => {
|
|
462
|
-
let t = nt(), n = i(e.pluginName, "config", Oe(Object.entries(e.config).map(([e, t]) => [e, t.defaultValue])));
|
|
463
|
-
t.form.set(e.key, {
|
|
464
|
-
form: e.config,
|
|
465
|
-
value: n
|
|
466
|
-
});
|
|
467
|
-
}, "resignerConfig")
|
|
468
|
-
};
|
|
469
|
-
}), rt = (e) => Symbol.for(`expose:${e}`), it = (e) => at.get(e), at = /* @__PURE__ */ new Map(), J = a(new class {
|
|
470
|
-
share = D(I.create());
|
|
471
|
-
shareToken = D(I.create());
|
|
472
|
-
userActions = D(I.create());
|
|
473
|
-
subscribes = D(I.create());
|
|
474
|
-
globalNodes = D([]);
|
|
475
|
-
tabbar = D(/* @__PURE__ */ new Map());
|
|
221
|
+
var W = y(new class {
|
|
222
|
+
share = N(I.createReactive());
|
|
223
|
+
shareToken = N(I.createReactive());
|
|
224
|
+
userActions = N(I.createReactive());
|
|
225
|
+
subscribes = N(I.createReactive());
|
|
226
|
+
globalNodes = N([]);
|
|
227
|
+
tabbar = N(/* @__PURE__ */ new Map());
|
|
476
228
|
addTabbar(e, ...t) {
|
|
477
229
|
let n = this.tabbar.get(e) ?? [];
|
|
478
230
|
this.tabbar.set(e, n.concat(t));
|
|
479
231
|
}
|
|
480
|
-
categories =
|
|
232
|
+
categories = N(/* @__PURE__ */ new Map());
|
|
481
233
|
addCategories(e, ...t) {
|
|
482
234
|
let n = this.categories.get(e) ?? [];
|
|
483
235
|
this.categories.set(e, n.concat(t));
|
|
484
236
|
}
|
|
485
|
-
barcode =
|
|
237
|
+
barcode = N(/* @__PURE__ */ new Map());
|
|
486
238
|
addBarcode(e, ...t) {
|
|
487
239
|
let n = this.barcode.get(e) ?? [];
|
|
488
240
|
this.barcode.set(e, n.concat(t));
|
|
489
241
|
}
|
|
490
|
-
levelboard =
|
|
242
|
+
levelboard = N(/* @__PURE__ */ new Map());
|
|
491
243
|
addLevelboard(e, ...t) {
|
|
492
244
|
let n = this.levelboard.get(e) ?? [];
|
|
493
245
|
this.levelboard.set(e, n.concat(t));
|
|
494
246
|
}
|
|
495
|
-
topButton =
|
|
247
|
+
topButton = N(/* @__PURE__ */ new Map());
|
|
496
248
|
addTopButton(e, ...t) {
|
|
497
249
|
let n = this.topButton.get(e) ?? [];
|
|
498
250
|
this.topButton.set(e, n.concat(t));
|
|
499
251
|
}
|
|
500
|
-
mainLists =
|
|
252
|
+
mainLists = N(/* @__PURE__ */ new Map());
|
|
501
253
|
addMainList(e, ...t) {
|
|
502
254
|
let n = this.mainLists.get(e) ?? [];
|
|
503
255
|
this.mainLists.set(e, n.concat(t));
|
|
504
256
|
}
|
|
505
|
-
envExtends =
|
|
257
|
+
envExtends = N(/* @__PURE__ */ new Set());
|
|
506
258
|
}(), "core/global");
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region ../../node_modules/.pnpm/@tauri-apps+api@2.10.1/node_modules/@tauri-apps/api/external/tslib/tslib.es6.js
|
|
261
|
+
function Te(e, t, n, r) {
|
|
262
|
+
if (n === "a" && !r) throw TypeError("Private accessor was defined without a getter");
|
|
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
|
+
return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e);
|
|
265
|
+
}
|
|
266
|
+
function Ee(e, t, n, r, i) {
|
|
267
|
+
if (r === "m") throw TypeError("Private method is not writable");
|
|
268
|
+
if (r === "a" && !i) throw TypeError("Private accessor was defined without a setter");
|
|
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");
|
|
270
|
+
return r === "a" ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
|
|
271
|
+
}
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region ../../node_modules/.pnpm/@tauri-apps+api@2.10.1/node_modules/@tauri-apps/api/core.js
|
|
274
|
+
var De;
|
|
275
|
+
async function G(e, t = {}, n) {
|
|
276
|
+
return window.__TAURI_INTERNALS__.invoke(e, t, n);
|
|
277
|
+
}
|
|
278
|
+
function Oe(e, t = "asset") {
|
|
279
|
+
return window.__TAURI_INTERNALS__.convertFileSrc(e, t);
|
|
280
|
+
}
|
|
281
|
+
var ke = class {
|
|
282
|
+
get rid() {
|
|
283
|
+
return Te(this, De, "f");
|
|
284
|
+
}
|
|
285
|
+
constructor(e) {
|
|
286
|
+
De.set(this, void 0), Ee(this, De, e, "f");
|
|
287
|
+
}
|
|
288
|
+
async close() {
|
|
289
|
+
return G("plugin:resources|close", { rid: this.rid });
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
De = /* @__PURE__ */ new WeakMap();
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region ../../node_modules/.pnpm/@tauri-apps+api@2.10.1/node_modules/@tauri-apps/api/path.js
|
|
295
|
+
var Ae;
|
|
296
|
+
(function(e) {
|
|
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
|
+
})(Ae ||= {});
|
|
299
|
+
async function je() {
|
|
300
|
+
return G("plugin:path|resolve_directory", { directory: Ae.AppLocalData });
|
|
301
|
+
}
|
|
302
|
+
async function Me(...e) {
|
|
303
|
+
return G("plugin:path|join", { paths: e });
|
|
304
|
+
}
|
|
305
|
+
//#endregion
|
|
306
|
+
//#region lib/driver/init/utils.ts
|
|
307
|
+
var Ne = await je(), Pe = async (e) => await Me(Ne, "plugin", e), Fe = class {}, Ie = class {}, Le = class {}, Re = new class extends Le {
|
|
308
|
+
name = "预设值";
|
|
309
|
+
async call(e, t) {
|
|
310
|
+
console.log("[PluginBooter->_ConfigSetter] new plugin defining...", e), t("预设值设定中");
|
|
311
|
+
let { name: n, content: r, resource: i, search: a, user: o, subscribe: s, share: l } = e;
|
|
312
|
+
if (r) for (let [e, { commentRow: t, contentPage: n, itemCard: i, layout: a, itemTranslator: o }] of Object.entries(r)) a && L.content.ContentPage.layouts.set(e, a), i && L.item.Item.itemCards.set(e, i), n && L.content.ContentPage.contentPages.set(e, n), t && L.comment.Comment.commentRow.set(e, t), o && L.item.Item.itemTranslator.set(e, o);
|
|
313
|
+
if (i) {
|
|
314
|
+
if (i.types) for (let e of i.types) L.resource.Resource.fork.set([n, e.type], e);
|
|
315
|
+
if (i.process) for (let [e, t] of Object.entries(i.process)) L.resource.Resource.processInstances.set([n, e], t);
|
|
316
|
+
}
|
|
317
|
+
if (a) {
|
|
318
|
+
if (a.categories) for (let e of a.categories) W.addCategories(n, e);
|
|
319
|
+
if (a.tabbar) for (let e of a.tabbar) W.addTabbar(n, e);
|
|
320
|
+
if (a.hotPage) {
|
|
321
|
+
for (let e of a.hotPage.mainListCard ?? []) W.addMainList(n, e);
|
|
322
|
+
for (let e of a.hotPage.levelBoard ?? []) W.addLevelboard(n, e);
|
|
323
|
+
for (let e of a.hotPage.topButton ?? []) W.addTopButton(n, e);
|
|
514
324
|
}
|
|
515
|
-
|
|
325
|
+
if (a.barcode) for (let e of a.barcode ?? []) W.addBarcode(n, e);
|
|
516
326
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
})
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
});
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
for (i = 2, r = 0; r < f; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
607
|
-
for (;;) if (m <<= 1, h == t - 1) {
|
|
608
|
-
p.push(n(m));
|
|
609
|
-
break;
|
|
610
|
-
} else h++;
|
|
611
|
-
return p.join("");
|
|
612
|
-
},
|
|
613
|
-
decompress: function(e) {
|
|
614
|
-
return e == null ? "" : e == "" ? null : a._decompress(e.length, 32768, function(t) {
|
|
615
|
-
return e.charCodeAt(t);
|
|
616
|
-
});
|
|
617
|
-
},
|
|
618
|
-
_decompress: function(t, n, r) {
|
|
619
|
-
var i = [], a = 4, o = 4, s = 3, c = "", l = [], u, d, f, p, m, h, g, _ = {
|
|
620
|
-
val: r(0),
|
|
621
|
-
position: n,
|
|
622
|
-
index: 1
|
|
623
|
-
};
|
|
624
|
-
for (u = 0; u < 3; u += 1) i[u] = u;
|
|
625
|
-
for (f = 0, m = 2 ** 2, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
626
|
-
switch (f) {
|
|
627
|
-
case 0:
|
|
628
|
-
for (f = 0, m = 2 ** 8, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
629
|
-
g = e(f);
|
|
630
|
-
break;
|
|
631
|
-
case 1:
|
|
632
|
-
for (f = 0, m = 2 ** 16, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
633
|
-
g = e(f);
|
|
634
|
-
break;
|
|
635
|
-
case 2: return "";
|
|
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)) W.userActions.set([n, e], t);
|
|
329
|
+
if (o.authorIcon) for (let [e, t] of Object.entries(o.authorIcon)) L.item.Item.authorIcon.set([n, e], t);
|
|
330
|
+
}
|
|
331
|
+
if (s) for (let [e, t] of Object.entries(s)) W.subscribes.set([n, e], t);
|
|
332
|
+
if (e.config) for (let t of e.config) c().$resignerConfig(t);
|
|
333
|
+
if (l) {
|
|
334
|
+
for (let e of l.initiative ?? []) W.share.set([n, e.key], e);
|
|
335
|
+
for (let e of l.tokenListen ?? []) W.shareToken.set([n, e.key], e);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}(), ze = async (e) => await Ve(await e.forks(), e.test), Be = (e) => {
|
|
339
|
+
let t = e.urls;
|
|
340
|
+
return Ve(t, e.test);
|
|
341
|
+
}, Ve = async (e, t) => {
|
|
342
|
+
if (we(e)) throw Error("[plugin test] no fork found");
|
|
343
|
+
let n = [], r = new AbortController();
|
|
344
|
+
try {
|
|
345
|
+
await Promise.all(e.map(async (e) => {
|
|
346
|
+
try {
|
|
347
|
+
let i = Date.now(), a = setTimeout(() => {
|
|
348
|
+
r.abort();
|
|
349
|
+
}, 1e4);
|
|
350
|
+
await t(e, r.signal), clearTimeout(a);
|
|
351
|
+
let o = Date.now() - i;
|
|
352
|
+
n.push([e, o]), console.log(`[plugin test] fetch url ${e} connected time ${o}ms`), r.abort();
|
|
353
|
+
} catch {
|
|
354
|
+
n.push([e, !1]), console.log(`[plugin test] fetch url ${e} can not connected`);
|
|
355
|
+
}
|
|
356
|
+
}));
|
|
357
|
+
} catch (e) {
|
|
358
|
+
console.log("[plugin test] fetch test aborted", e);
|
|
359
|
+
}
|
|
360
|
+
let i = xe(n.filter((e) => e[1] != 0), (e) => e[1])[0];
|
|
361
|
+
return console.log("[plugin test] fetch test done", i), i || ["", !1];
|
|
362
|
+
}, He = new class extends Le {
|
|
363
|
+
name = "接口测试";
|
|
364
|
+
async call(e, t, n) {
|
|
365
|
+
if (!e.api) return;
|
|
366
|
+
t("开始并发测试");
|
|
367
|
+
let r = Object.keys(e.api), i = await Promise.all(r.map((t) => ze(e.api[t]))), a = [], o = {};
|
|
368
|
+
if (r.forEach((e, t) => {
|
|
369
|
+
o[e] = i[t][0], a.push([e, i[t][1]]);
|
|
370
|
+
}), n.api = o, Object.values(o).some((e) => e == 0)) throw t("测试完成, 无法连接至服务器"), Error("can not connect to server");
|
|
371
|
+
t(`测试完成, \n${a.map((e) => `${e[0]}->${e[1]}ms`).join("\n")}`);
|
|
372
|
+
}
|
|
373
|
+
}(), Ue = new class extends Le {
|
|
374
|
+
name = "资源链接测试";
|
|
375
|
+
async call(e, t) {
|
|
376
|
+
if (!e.resource?.types?.length) return;
|
|
377
|
+
t("开始并发测试");
|
|
378
|
+
let n = e.resource.types.map((e) => ({
|
|
379
|
+
type: e.type,
|
|
380
|
+
val: e
|
|
381
|
+
})), r = await Promise.all(n.map((e) => Be(e.val))), i = [];
|
|
382
|
+
if (n.forEach((t, n) => {
|
|
383
|
+
r[n][1] && L.resource.Resource.precedenceFork.set([e.name, t.type], r[n][0]), i.push([t, r[n][1]]);
|
|
384
|
+
}), r.some((e) => e[1] == 0)) throw t("测试完成, 无法连接至服务器"), Error("[plugin test] can not connect to server");
|
|
385
|
+
t(`测试完成, \n${i.map((e) => `${e[0].type}->${e[1]}ms`).join("\n")}`);
|
|
386
|
+
}
|
|
387
|
+
}(), We = new class extends Le {
|
|
388
|
+
name = "自定义初始化";
|
|
389
|
+
async call(e, n, r) {
|
|
390
|
+
if (!e.onBooted) return;
|
|
391
|
+
let i = await e.onBooted({ api: r.api });
|
|
392
|
+
i && t.set(Symbol.for(`expose:${e.name}`), i);
|
|
393
|
+
}
|
|
394
|
+
}(), Ge = new oe(), Ke = new class extends Le {
|
|
395
|
+
name = "登录";
|
|
396
|
+
async call(e, t) {
|
|
397
|
+
if (!e.auth) return;
|
|
398
|
+
let n = p();
|
|
399
|
+
try {
|
|
400
|
+
let r = n.$getPluginDisplayName(e.name);
|
|
401
|
+
t("判定鉴权状态中...");
|
|
402
|
+
let i = await e.auth.passSelect(), a = Promise.withResolvers();
|
|
403
|
+
console.log(`[plugin auth] ${r}, isPass: ${i}`), await Ge.acquire(), t("等待其他插件鉴权结束..."), i ? (t("跳过鉴权方式选择"), a.resolve(i)) : (t("选择鉴权方式"), B({
|
|
404
|
+
type: "default",
|
|
405
|
+
positiveText: "登录",
|
|
406
|
+
negativeText: "注册",
|
|
407
|
+
closable: !1,
|
|
408
|
+
maskClosable: !1,
|
|
409
|
+
content: "选择鉴权方式",
|
|
410
|
+
title: r,
|
|
411
|
+
onNegativeClick() {
|
|
412
|
+
a.resolve("signUp");
|
|
413
|
+
},
|
|
414
|
+
onPositiveClick() {
|
|
415
|
+
a.resolve("logIn");
|
|
636
416
|
}
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
417
|
+
}));
|
|
418
|
+
let o = await a.promise;
|
|
419
|
+
t("鉴权中...");
|
|
420
|
+
let s = {
|
|
421
|
+
async form(e) {
|
|
422
|
+
let t = H(e);
|
|
423
|
+
return W.globalNodes.push(D(T(() => {
|
|
424
|
+
let e = A(!0);
|
|
425
|
+
return t.data.then(() => e.value = !1), () => E(z, {
|
|
426
|
+
show: e.value,
|
|
427
|
+
position: "center",
|
|
428
|
+
round: !0,
|
|
429
|
+
class: "auth-popup",
|
|
430
|
+
transitionAppear: !0
|
|
431
|
+
}, [E("div", [r]), t.comp]);
|
|
432
|
+
}))), await t.data;
|
|
433
|
+
},
|
|
434
|
+
website(e) {
|
|
435
|
+
return window;
|
|
655
436
|
}
|
|
437
|
+
};
|
|
438
|
+
o == "logIn" ? await e.auth.logIn(s) : o == "signUp" && await e.auth.signUp(s), Ge.release(), t("鉴权成功");
|
|
439
|
+
} catch (e) {
|
|
440
|
+
throw t(`登录失败: ${e}`), e;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}(), qe = new class extends Le {
|
|
444
|
+
name = "其他步骤";
|
|
445
|
+
async call(e, t) {
|
|
446
|
+
if (e.otherProgress?.length) for (let n of e.otherProgress) t({
|
|
447
|
+
name: n.name,
|
|
448
|
+
description: ""
|
|
449
|
+
}), await n.call((e) => {
|
|
450
|
+
t({
|
|
451
|
+
name: n.name,
|
|
452
|
+
description: e
|
|
453
|
+
});
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
}(), Je = /* @__PURE__ */ a({
|
|
457
|
+
bootPlugin: () => Xe,
|
|
458
|
+
booters: () => Ye
|
|
459
|
+
}), Ye = xe(Object.entries(/* @__PURE__ */ Object.assign({
|
|
460
|
+
"./init/booter/0_configSetter.ts": Re,
|
|
461
|
+
"./init/booter/10_apiTest.ts": He,
|
|
462
|
+
"./init/booter/20_resourceTest.ts": Ue,
|
|
463
|
+
"./init/booter/30_boot.ts": We,
|
|
464
|
+
"./init/booter/40_auth.ts": Ke,
|
|
465
|
+
"./init/booter/50_otherProcess.ts": qe
|
|
466
|
+
})), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]), Xe = async (e) => {
|
|
467
|
+
let { plugins: t, pluginSteps: n } = p();
|
|
468
|
+
t.set(e.name, D(e)), n[e.name] = {
|
|
469
|
+
steps: [],
|
|
470
|
+
now: {
|
|
471
|
+
stepsIndex: 0,
|
|
472
|
+
status: "wait"
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
try {
|
|
476
|
+
let t = {};
|
|
477
|
+
for (let r of Ye) {
|
|
478
|
+
let i = n[e.name].steps.length;
|
|
479
|
+
n[e.name].steps[i] = {
|
|
480
|
+
name: r.name,
|
|
481
|
+
description: ""
|
|
482
|
+
}, n[e.name].now.stepsIndex = i, n[e.name].now.status = "process", await r.call(e, (t) => {
|
|
483
|
+
l(t) ? n[e.name].steps[i].description = t : (t.description && (n[e.name].steps[i].description = t.description), t.name && (n[e.name].steps[i].name = t.name));
|
|
484
|
+
}, t);
|
|
485
|
+
}
|
|
486
|
+
n[e.name].now.stepsIndex++;
|
|
487
|
+
} catch (t) {
|
|
488
|
+
throw n[e.name].now.status = "error", n[e.name].now.error = t, t;
|
|
489
|
+
}
|
|
490
|
+
console.log(`[plugin usePluginStore.$loadPlugin] plugin "${e.name}" load done`);
|
|
491
|
+
};
|
|
492
|
+
//#endregion
|
|
493
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/bind.js
|
|
494
|
+
function Ze(e, t) {
|
|
495
|
+
return function() {
|
|
496
|
+
return e.apply(t, arguments);
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/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;
|
|
523
|
+
}
|
|
524
|
+
}, ht = K("Date"), gt = K("File"), _t = (e) => !!(e && e.uri !== void 0), vt = (e) => e && e.getParts !== void 0, yt = K("Blob"), bt = K("FileList"), xt = (e) => dt(e) && q(e.pipe);
|
|
525
|
+
function St() {
|
|
526
|
+
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
527
|
+
}
|
|
528
|
+
var Ct = St(), wt = Ct.FormData === void 0 ? void 0 : Ct.FormData, Tt = (e) => {
|
|
529
|
+
let t;
|
|
530
|
+
return e && (wt && e instanceof wt || q(e.append) && ((t = nt(e)) === "formdata" || t === "object" && q(e.toString) && e.toString() === "[object FormData]"));
|
|
531
|
+
}, Et = K("URLSearchParams"), [Dt, Ot, kt, At] = [
|
|
532
|
+
"ReadableStream",
|
|
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;
|
|
656
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
|
|
657
757
|
};
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
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.13.6/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]);
|
|
664
788
|
});
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
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.13.6/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"
|
|
697
836
|
};
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
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.13.6/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.13.6/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;
|
|
882
|
+
}
|
|
883
|
+
eject(e) {
|
|
884
|
+
this.handlers[e] && (this.handlers[e] = null);
|
|
885
|
+
}
|
|
886
|
+
clear() {
|
|
887
|
+
this.handlers &&= [];
|
|
888
|
+
}
|
|
889
|
+
forEach(e) {
|
|
890
|
+
J.forEach(this.handlers, function(t) {
|
|
891
|
+
t !== null && e(t);
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
}, yn = {
|
|
895
|
+
silentJSONParsing: !0,
|
|
896
|
+
forcedJSONParsing: !0,
|
|
897
|
+
clarifyTimeoutError: !1,
|
|
898
|
+
legacyInterceptorReqResOrdering: !0
|
|
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
|
|
713
905
|
},
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
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.13.6/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.13.6/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);
|
|
954
|
+
}
|
|
955
|
+
if (J.isFormData(e) && J.isFunction(e.entries)) {
|
|
956
|
+
let n = {};
|
|
957
|
+
return J.forEachEntry(e, (e, r) => {
|
|
958
|
+
t(On(e), r, n, 0);
|
|
959
|
+
}), n;
|
|
960
|
+
}
|
|
961
|
+
return null;
|
|
962
|
+
}
|
|
963
|
+
//#endregion
|
|
964
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/defaults/index.js
|
|
965
|
+
function jn(e, t, n) {
|
|
966
|
+
if (J.isString(e)) try {
|
|
967
|
+
return (t || JSON.parse)(e), J.trim(e);
|
|
968
|
+
} catch (e) {
|
|
969
|
+
if (e.name !== "SyntaxError") throw e;
|
|
970
|
+
}
|
|
971
|
+
return (n || JSON.stringify)(e);
|
|
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);
|
|
731
992
|
}
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
plugin: e.plugin,
|
|
745
|
-
id: e.id
|
|
746
|
-
})), r = `[${e.union.value?.title}](复制这条口令,打开Delta Comic)${n}`;
|
|
747
|
-
await navigator.share({
|
|
748
|
-
title: "Delta Comic内容分享",
|
|
749
|
-
text: r
|
|
750
|
-
});
|
|
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;
|
|
751
1005
|
}
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
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",
|
|
1028
|
+
"get",
|
|
1029
|
+
"head",
|
|
1030
|
+
"post",
|
|
1031
|
+
"put",
|
|
1032
|
+
"patch"
|
|
1033
|
+
], (e) => {
|
|
1034
|
+
Mn.headers[e] = {};
|
|
1035
|
+
});
|
|
1036
|
+
//#endregion
|
|
1037
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/parseHeaders.js
|
|
1038
|
+
var Nn = J.toObjectSet([
|
|
1039
|
+
"age",
|
|
1040
|
+
"authorization",
|
|
1041
|
+
"content-length",
|
|
1042
|
+
"content-type",
|
|
1043
|
+
"etag",
|
|
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);
|
|
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);
|
|
758
1094
|
},
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
1095
|
+
configurable: !0
|
|
1096
|
+
});
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
var Z = class {
|
|
1100
|
+
constructor(e) {
|
|
1101
|
+
e && this.set(e);
|
|
1102
|
+
}
|
|
1103
|
+
set(e, t, n) {
|
|
1104
|
+
let r = this;
|
|
1105
|
+
function i(e, t, n) {
|
|
1106
|
+
let i = In(t);
|
|
1107
|
+
if (!i) throw Error("header name must be a non-empty string");
|
|
1108
|
+
let a = J.findKey(r, i);
|
|
1109
|
+
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] = Ln(e));
|
|
1110
|
+
}
|
|
1111
|
+
let a = (e, t) => J.forEach(e, (e, n) => i(e, n, t));
|
|
1112
|
+
if (J.isPlainObject(e) || e instanceof this.constructor) a(e, t);
|
|
1113
|
+
else if (J.isString(e) && (e = e.trim()) && !zn(e)) a(Pn(e), t);
|
|
1114
|
+
else if (J.isObject(e) && J.isIterable(e)) {
|
|
1115
|
+
let n = {}, r, i;
|
|
1116
|
+
for (let t of e) {
|
|
1117
|
+
if (!J.isArray(t)) throw TypeError("Object iterator must return a key-value pair");
|
|
1118
|
+
n[i = t[0]] = (r = n[i]) ? J.isArray(r) ? [...r, t[1]] : [r, t[1]] : t[1];
|
|
769
1119
|
}
|
|
770
|
-
|
|
1120
|
+
a(n, t);
|
|
1121
|
+
} else e != null && i(t, e, n);
|
|
1122
|
+
return this;
|
|
1123
|
+
}
|
|
1124
|
+
get(e, t) {
|
|
1125
|
+
if (e = In(e), e) {
|
|
1126
|
+
let n = J.findKey(this, e);
|
|
1127
|
+
if (n) {
|
|
1128
|
+
let e = this[n];
|
|
1129
|
+
if (!t) return e;
|
|
1130
|
+
if (t === !0) return Rn(e);
|
|
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");
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
has(e, t) {
|
|
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);
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
return J.isArray(e) ? e.forEach(i) : i(e), r;
|
|
1153
|
+
}
|
|
1154
|
+
clear(e) {
|
|
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);
|
|
1159
|
+
}
|
|
1160
|
+
return r;
|
|
1161
|
+
}
|
|
1162
|
+
normalize(e) {
|
|
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);
|
|
1207
|
+
}
|
|
1208
|
+
return J.isArray(e) ? e.forEach(r) : r(e), this;
|
|
1209
|
+
}
|
|
1210
|
+
};
|
|
1211
|
+
Z.accessor([
|
|
1212
|
+
"Content-Type",
|
|
1213
|
+
"Content-Length",
|
|
1214
|
+
"Accept",
|
|
1215
|
+
"Accept-Encoding",
|
|
1216
|
+
"User-Agent",
|
|
1217
|
+
"Authorization"
|
|
1218
|
+
]), J.reduceDescriptors(Z.prototype, ({ value: e }, t) => {
|
|
1219
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
1220
|
+
return {
|
|
1221
|
+
get: () => e,
|
|
1222
|
+
set(e) {
|
|
1223
|
+
this[n] = e;
|
|
1224
|
+
}
|
|
1225
|
+
};
|
|
1226
|
+
}), J.freezeMethods(Z);
|
|
1227
|
+
//#endregion
|
|
1228
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/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.13.6/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.13.6/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
|
+
};
|
|
1247
|
+
//#endregion
|
|
1248
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/settle.js
|
|
1249
|
+
function Kn(e, t, n) {
|
|
1250
|
+
let r = n.config.validateStatus;
|
|
1251
|
+
!n.status || !r || r(n.status) ? e(n) : t(new Y("Request failed with status code " + n.status, [Y.ERR_BAD_REQUEST, Y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n));
|
|
1252
|
+
}
|
|
1253
|
+
//#endregion
|
|
1254
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/parseProtocol.js
|
|
1255
|
+
function qn(e) {
|
|
1256
|
+
let t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1257
|
+
return t && t[1] || "";
|
|
1258
|
+
}
|
|
1259
|
+
//#endregion
|
|
1260
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/speedometer.js
|
|
1261
|
+
function Jn(e, t) {
|
|
1262
|
+
e ||= 10;
|
|
1263
|
+
let n = Array(e), r = Array(e), i = 0, a = 0, o;
|
|
1264
|
+
return t = t === void 0 ? 1e3 : t, function(s) {
|
|
1265
|
+
let c = Date.now(), l = r[a];
|
|
1266
|
+
o ||= c, n[i] = s, r[i] = c;
|
|
1267
|
+
let u = a, d = 0;
|
|
1268
|
+
for (; u !== i;) d += n[u++], u %= e;
|
|
1269
|
+
if (i = (i + 1) % e, i === a && (a = (a + 1) % e), c - o < t) return;
|
|
1270
|
+
let f = l && c - l;
|
|
1271
|
+
return f ? Math.round(d * 1e3 / f) : void 0;
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
//#endregion
|
|
1275
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/throttle.js
|
|
1276
|
+
function Yn(e, t) {
|
|
1277
|
+
let n = 0, r = 1e3 / t, i, a, o = (t, r = Date.now()) => {
|
|
1278
|
+
n = r, i = null, a &&= (clearTimeout(a), null), e(...t);
|
|
1279
|
+
};
|
|
1280
|
+
return [(...e) => {
|
|
1281
|
+
let t = Date.now(), s = t - n;
|
|
1282
|
+
s >= r ? o(e, t) : (i = e, a ||= setTimeout(() => {
|
|
1283
|
+
a = null, o(i);
|
|
1284
|
+
}, r - s));
|
|
1285
|
+
}, () => i && o(i)];
|
|
1286
|
+
}
|
|
1287
|
+
//#endregion
|
|
1288
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/progressEventReducer.js
|
|
1289
|
+
var Xn = (e, t, n = 3) => {
|
|
1290
|
+
let r = 0, i = Jn(50, 250);
|
|
1291
|
+
return Yn((n) => {
|
|
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.13.6/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;
|
|
1337
|
+
}
|
|
1338
|
+
//#endregion
|
|
1339
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/combineURLs.js
|
|
1340
|
+
function nr(e, t) {
|
|
1341
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1342
|
+
}
|
|
1343
|
+
//#endregion
|
|
1344
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/buildFullPath.js
|
|
1345
|
+
function rr(e, t, n) {
|
|
1346
|
+
let r = !tr(t);
|
|
1347
|
+
return e && (r || n == 0) ? nr(e, t) : t;
|
|
1348
|
+
}
|
|
1349
|
+
//#endregion
|
|
1350
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/mergeConfig.js
|
|
1351
|
+
var ir = (e) => e instanceof Z ? { ...e } : e;
|
|
1352
|
+
function ar(e, t) {
|
|
1353
|
+
t ||= {};
|
|
1354
|
+
let n = {};
|
|
1355
|
+
function r(e, t, n, r) {
|
|
1356
|
+
return J.isPlainObject(e) && J.isPlainObject(t) ? J.merge.call({ caseless: r }, e, t) : J.isPlainObject(t) ? J.merge({}, t) : J.isArray(t) ? t.slice() : t;
|
|
1357
|
+
}
|
|
1358
|
+
function i(e, t, n, i) {
|
|
1359
|
+
if (!J.isUndefined(t)) return r(e, t, n, i);
|
|
1360
|
+
if (!J.isUndefined(e)) return r(void 0, e, n, i);
|
|
1361
|
+
}
|
|
1362
|
+
function a(e, t) {
|
|
1363
|
+
if (!J.isUndefined(t)) return r(void 0, t);
|
|
1364
|
+
}
|
|
1365
|
+
function o(e, t) {
|
|
1366
|
+
if (!J.isUndefined(t)) return r(void 0, t);
|
|
1367
|
+
if (!J.isUndefined(e)) return r(void 0, e);
|
|
1368
|
+
}
|
|
1369
|
+
function s(n, i, a) {
|
|
1370
|
+
if (a in t) return r(n, i);
|
|
1371
|
+
if (a in e) return r(void 0, n);
|
|
1372
|
+
}
|
|
1373
|
+
let c = {
|
|
1374
|
+
url: a,
|
|
1375
|
+
method: a,
|
|
1376
|
+
data: a,
|
|
1377
|
+
baseURL: o,
|
|
1378
|
+
transformRequest: o,
|
|
1379
|
+
transformResponse: o,
|
|
1380
|
+
paramsSerializer: o,
|
|
1381
|
+
timeout: o,
|
|
1382
|
+
timeoutMessage: o,
|
|
1383
|
+
withCredentials: o,
|
|
1384
|
+
withXSRFToken: o,
|
|
1385
|
+
adapter: o,
|
|
1386
|
+
responseType: o,
|
|
1387
|
+
xsrfCookieName: o,
|
|
1388
|
+
xsrfHeaderName: o,
|
|
1389
|
+
onUploadProgress: o,
|
|
1390
|
+
onDownloadProgress: o,
|
|
1391
|
+
decompress: o,
|
|
1392
|
+
maxContentLength: o,
|
|
1393
|
+
maxBodyLength: o,
|
|
1394
|
+
beforeRedirect: o,
|
|
1395
|
+
transport: o,
|
|
1396
|
+
httpAgent: o,
|
|
1397
|
+
httpsAgent: o,
|
|
1398
|
+
cancelToken: o,
|
|
1399
|
+
socketPath: o,
|
|
1400
|
+
responseEncoding: o,
|
|
1401
|
+
validateStatus: s,
|
|
1402
|
+
headers: (e, t, n) => i(ir(e), ir(t), n, !0)
|
|
1403
|
+
};
|
|
1404
|
+
return J.forEach(Object.keys({
|
|
1405
|
+
...e,
|
|
1406
|
+
...t
|
|
1407
|
+
}), function(r) {
|
|
1408
|
+
if (r === "__proto__" || r === "constructor" || r === "prototype") return;
|
|
1409
|
+
let a = J.hasOwnProp(c, r) ? c[r] : i, o = a(e[r], t[r], r);
|
|
1410
|
+
J.isUndefined(o) && a !== s || (n[r] = o);
|
|
1411
|
+
}), n;
|
|
1412
|
+
}
|
|
1413
|
+
//#endregion
|
|
1414
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/resolveConfig.js
|
|
1415
|
+
var or = (e) => {
|
|
1416
|
+
let t = ar({}, e), { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: a, headers: o, auth: s } = t;
|
|
1417
|
+
if (t.headers = o = Z.from(o), t.url = _n(rr(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), s && o.set("Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))), J.isFormData(n)) {
|
|
1418
|
+
if (X.hasStandardBrowserEnv || X.hasStandardBrowserWebWorkerEnv) o.setContentType(void 0);
|
|
1419
|
+
else if (J.isFunction(n.getHeaders)) {
|
|
1420
|
+
let e = n.getHeaders(), t = ["content-type", "content-length"];
|
|
1421
|
+
Object.entries(e).forEach(([e, n]) => {
|
|
1422
|
+
t.includes(e.toLowerCase()) && o.set(e, n);
|
|
1423
|
+
});
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
if (X.hasStandardBrowserEnv && (r && J.isFunction(r) && (r = r(t)), r || r !== !1 && $n(t.url))) {
|
|
1427
|
+
let e = i && a && er.read(a);
|
|
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);
|
|
1436
|
+
}
|
|
1437
|
+
let h = new XMLHttpRequest();
|
|
1438
|
+
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1439
|
+
function g() {
|
|
1440
|
+
if (!h) return;
|
|
1441
|
+
let r = Z.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
1442
|
+
Kn(function(e) {
|
|
1443
|
+
t(e), m();
|
|
1444
|
+
}, function(e) {
|
|
1445
|
+
n(e), m();
|
|
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;
|
|
1454
|
+
}
|
|
1455
|
+
"onloadend" in h ? h.onloadend = g : h.onreadystatechange = function() {
|
|
1456
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1457
|
+
}, h.onabort = function() {
|
|
1458
|
+
h &&= (n(new Y("Request aborted", Y.ECONNABORTED, e, h)), null);
|
|
1459
|
+
}, h.onerror = function(t) {
|
|
1460
|
+
let r = new Y(t && t.message ? t.message : "Network Error", Y.ERR_NETWORK, e, h);
|
|
1461
|
+
r.event = t || null, n(r), h = null;
|
|
1462
|
+
}, h.ontimeout = function() {
|
|
1463
|
+
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional || yn;
|
|
1464
|
+
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new Y(t, i.clarifyTimeoutError ? Y.ETIMEDOUT : Y.ECONNABORTED, e, h)), h = null;
|
|
1465
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && J.forEach(a.toJSON(), function(e, t) {
|
|
1466
|
+
h.setRequestHeader(t, e);
|
|
1467
|
+
}), J.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = Xn(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = Xn(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
1468
|
+
h &&= (n(!t || t.type ? new Gn(null, e, h) : t), h.abort(), null);
|
|
1469
|
+
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1470
|
+
let _ = qn(r.url);
|
|
1471
|
+
if (_ && X.protocols.indexOf(_) === -1) {
|
|
1472
|
+
n(new Y("Unsupported protocol " + _ + ":", Y.ERR_BAD_REQUEST, e));
|
|
1473
|
+
return;
|
|
1474
|
+
}
|
|
1475
|
+
h.send(i || null);
|
|
1476
|
+
});
|
|
1477
|
+
}, cr = (e, t) => {
|
|
1478
|
+
let { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1479
|
+
if (t || n) {
|
|
1480
|
+
let n = new AbortController(), r, i = function(e) {
|
|
1481
|
+
if (!r) {
|
|
1482
|
+
r = !0, o();
|
|
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;
|
|
1496
|
+
}
|
|
1497
|
+
}, lr = function* (e, t) {
|
|
1498
|
+
let n = e.byteLength;
|
|
1499
|
+
if (!t || n < t) {
|
|
1500
|
+
yield e;
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1503
|
+
let r = 0, i;
|
|
1504
|
+
for (; r < n;) i = r + t, yield e.slice(r, i), r = i;
|
|
1505
|
+
}, ur = async function* (e, t) {
|
|
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;
|
|
1511
|
+
}
|
|
1512
|
+
let t = e.getReader();
|
|
1513
|
+
try {
|
|
1514
|
+
for (;;) {
|
|
1515
|
+
let { done: e, value: n } = await t.read();
|
|
1516
|
+
if (e) break;
|
|
1517
|
+
yield n;
|
|
1518
|
+
}
|
|
1519
|
+
} finally {
|
|
1520
|
+
await t.cancel();
|
|
1521
|
+
}
|
|
1522
|
+
}, fr = (e, t, n, r) => {
|
|
1523
|
+
let i = ur(e, t), a = 0, o, s = (e) => {
|
|
1524
|
+
o || (o = !0, r && r(e));
|
|
1525
|
+
};
|
|
1526
|
+
return new ReadableStream({
|
|
1527
|
+
async pull(e) {
|
|
1528
|
+
try {
|
|
1529
|
+
let { done: t, value: r } = await i.next();
|
|
1530
|
+
if (t) {
|
|
1531
|
+
s(), e.close();
|
|
1532
|
+
return;
|
|
1533
|
+
}
|
|
1534
|
+
let o = r.byteLength;
|
|
1535
|
+
n && n(a += o), e.enqueue(new Uint8Array(r));
|
|
1536
|
+
} catch (e) {
|
|
1537
|
+
throw s(e), e;
|
|
1538
|
+
}
|
|
1539
|
+
},
|
|
1540
|
+
cancel(e) {
|
|
1541
|
+
return s(e), i.return();
|
|
1542
|
+
}
|
|
1543
|
+
}, { highWaterMark: 2 });
|
|
1544
|
+
}, pr = 64 * 1024, { isFunction: mr } = J, hr = (({ Request: e, Response: t }) => ({
|
|
1545
|
+
Request: e,
|
|
1546
|
+
Response: t
|
|
1547
|
+
}))(J.global), { ReadableStream: gr, TextEncoder: _r } = J.global, vr = (e, ...t) => {
|
|
1548
|
+
try {
|
|
1549
|
+
return !!e(...t);
|
|
1550
|
+
} catch {
|
|
1551
|
+
return !1;
|
|
1552
|
+
}
|
|
1553
|
+
}, yr = (e) => {
|
|
1554
|
+
e = J.merge.call({ skipUndefined: !0 }, hr, e);
|
|
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 n(X.origin, {
|
|
1559
|
+
body: new gr(),
|
|
1560
|
+
method: "POST",
|
|
1561
|
+
get duplex() {
|
|
1562
|
+
return e = !0, "half";
|
|
1563
|
+
}
|
|
1564
|
+
}).headers.has("Content-Type");
|
|
1565
|
+
return e && !t;
|
|
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;
|
|
1596
|
+
try {
|
|
1597
|
+
if (g && l && o !== "get" && o !== "head" && (T = await p(v, s)) !== 0) {
|
|
1598
|
+
let e = new n(i, {
|
|
1599
|
+
method: "POST",
|
|
1600
|
+
body: s,
|
|
1601
|
+
duplex: "half"
|
|
1602
|
+
}), t;
|
|
1603
|
+
if (J.isFormData(s) && (t = e.headers.get("content-type")) && v.setContentType(t), e.body) {
|
|
1604
|
+
let [t, n] = Zn(T, Xn(Qn(g)));
|
|
1605
|
+
s = fr(e.body, pr, t, n);
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
J.isString(y) || (y = y ? "include" : "omit");
|
|
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);
|
|
1648
|
+
}
|
|
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.13.6/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 });
|
|
771
1673
|
}
|
|
772
|
-
})
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
if (n === "a" && !r) throw TypeError("Private accessor was defined without a getter");
|
|
790
|
-
if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw TypeError("Cannot read private member from an object whose class did not declare it");
|
|
791
|
-
return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e);
|
|
792
|
-
}
|
|
793
|
-
function ft(e, t, n, r, i) {
|
|
794
|
-
if (r === "m") throw TypeError("Private method is not writable");
|
|
795
|
-
if (r === "a" && !i) throw TypeError("Private accessor was defined without a setter");
|
|
796
|
-
if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw TypeError("Cannot write private member to an object whose class did not declare it");
|
|
797
|
-
return r === "a" ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
|
|
1674
|
+
});
|
|
1675
|
+
var Cr = (e) => `- ${e}`, wr = (e) => J.isFunction(e) || e === null || e === !1;
|
|
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;
|
|
1685
|
+
}
|
|
1686
|
+
if (!i) {
|
|
1687
|
+
let e = Object.entries(a).map(([e, t]) => `adapter ${e} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
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");
|
|
1689
|
+
}
|
|
1690
|
+
return i;
|
|
798
1691
|
}
|
|
799
|
-
var
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
*
|
|
808
|
-
* @param cmd The command name.
|
|
809
|
-
* @param args The optional arguments to pass to the command.
|
|
810
|
-
* @param options The request options.
|
|
811
|
-
* @return A promise resolving or rejecting to the backend response.
|
|
812
|
-
*
|
|
813
|
-
* @since 1.0.0
|
|
814
|
-
*/
|
|
815
|
-
async function X(e, t = {}, n) {
|
|
816
|
-
return window.__TAURI_INTERNALS__.invoke(e, t, n);
|
|
1692
|
+
var Er = {
|
|
1693
|
+
getAdapter: Tr,
|
|
1694
|
+
adapters: Sr
|
|
1695
|
+
};
|
|
1696
|
+
//#endregion
|
|
1697
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/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);
|
|
817
1700
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
* @example
|
|
829
|
-
* ```typescript
|
|
830
|
-
* import { appDataDir, join } from '@tauri-apps/api/path';
|
|
831
|
-
* import { convertFileSrc } from '@tauri-apps/api/core';
|
|
832
|
-
* const appDataDirPath = await appDataDir();
|
|
833
|
-
* const filePath = await join(appDataDirPath, 'assets/video.mp4');
|
|
834
|
-
* const assetUrl = convertFileSrc(filePath);
|
|
835
|
-
*
|
|
836
|
-
* const video = document.getElementById('my-video');
|
|
837
|
-
* const source = document.createElement('source');
|
|
838
|
-
* source.type = 'video/mp4';
|
|
839
|
-
* source.src = assetUrl;
|
|
840
|
-
* video.appendChild(source);
|
|
841
|
-
* video.load();
|
|
842
|
-
* ```
|
|
843
|
-
*
|
|
844
|
-
* @return the URL that can be used as source on the webview.
|
|
845
|
-
*
|
|
846
|
-
* @since 1.0.0
|
|
847
|
-
*/
|
|
848
|
-
function mt(e, t = "asset") {
|
|
849
|
-
return window.__TAURI_INTERNALS__.convertFileSrc(e, t);
|
|
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
|
+
});
|
|
850
1711
|
}
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
1712
|
+
//#endregion
|
|
1713
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/env/data.js
|
|
1714
|
+
var kr = "1.13.6", 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 : "");
|
|
1731
|
+
}
|
|
1732
|
+
return (n, i, a) => {
|
|
1733
|
+
if (e === !1) throw new Y(r(i, " has been removed" + (t ? " in " + t : "")), Y.ERR_DEPRECATED);
|
|
1734
|
+
return t && !jr[i] && (jr[i] = !0, console.warn(r(i, " has been deprecated since v" + t + " and will be removed in the near future"))), e ? e(n, i, a) : !0;
|
|
1735
|
+
};
|
|
1736
|
+
}, Ar.spelling = function(e) {
|
|
1737
|
+
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1738
|
+
};
|
|
1739
|
+
function Mr(e, t, n) {
|
|
1740
|
+
if (typeof e != "object") throw new Y("options must be an object", Y.ERR_BAD_OPTION_VALUE);
|
|
1741
|
+
let r = Object.keys(e), i = r.length;
|
|
1742
|
+
for (; i-- > 0;) {
|
|
1743
|
+
let a = r[i], o = t[a];
|
|
1744
|
+
if (o) {
|
|
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;
|
|
1748
|
+
}
|
|
1749
|
+
if (n !== !0) throw new Y("Unknown option " + a, Y.ERR_BAD_OPTION);
|
|
876
1750
|
}
|
|
1751
|
+
}
|
|
1752
|
+
var Nr = {
|
|
1753
|
+
assertOptions: Mr,
|
|
1754
|
+
validators: Ar
|
|
1755
|
+
}, Q = Nr.validators, Pr = class {
|
|
877
1756
|
constructor(e) {
|
|
878
|
-
|
|
1757
|
+
this.defaults = e || {}, this.interceptors = {
|
|
1758
|
+
request: new vn(),
|
|
1759
|
+
response: new vn()
|
|
1760
|
+
};
|
|
879
1761
|
}
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
1762
|
+
async request(e, t) {
|
|
1763
|
+
try {
|
|
1764
|
+
return await this._request(e, t);
|
|
1765
|
+
} catch (e) {
|
|
1766
|
+
if (e instanceof Error) {
|
|
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;
|
|
1775
|
+
}
|
|
886
1776
|
}
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
(
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
* @since 1.0.0
|
|
931
|
-
*/
|
|
932
|
-
async function Z(...e) {
|
|
933
|
-
return X("plugin:path|join", { paths: e });
|
|
934
|
-
}
|
|
935
|
-
var vt = await _t();
|
|
936
|
-
const yt = async (e) => await Z(vt, "plugin", e);
|
|
937
|
-
var bt = class {}, xt = class {}, Q = class {}, St = new class extends Q {
|
|
938
|
-
name = "预设值";
|
|
939
|
-
async call(e, t) {
|
|
940
|
-
console.log("[PluginBooter->_ConfigSetter] new plugin defining...", e), t("预设值设定中");
|
|
941
|
-
let { name: n, content: r, resource: i, search: a, user: o, subscribe: s, share: c } = e;
|
|
942
|
-
if (r) for (let [e, { commentRow: t, contentPage: n, itemCard: i, layout: a, itemTranslator: o }] of Object.entries(r)) a && L.content.ContentPage.viewLayout.set(e, a), i && L.item.Item.itemCard.set(e, i), n && L.content.ContentPage.contentPage.set(e, n), t && L.comment.Comment.commentRow.set(e, t), o && L.item.Item.itemTranslator.set(e, o);
|
|
943
|
-
if (i) {
|
|
944
|
-
if (i.types) for (let e of i.types) L.resource.Resource.fork.set([n, e.type], e);
|
|
945
|
-
if (i.process) for (let [e, t] of Object.entries(i.process)) L.resource.Resource.processInstances.set([n, e], t);
|
|
1777
|
+
_request(e, t) {
|
|
1778
|
+
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t = ar(this.defaults, t);
|
|
1779
|
+
let { transitional: n, paramsSerializer: r, headers: i } = t;
|
|
1780
|
+
n !== void 0 && Nr.assertOptions(n, {
|
|
1781
|
+
silentJSONParsing: Q.transitional(Q.boolean),
|
|
1782
|
+
forcedJSONParsing: Q.transitional(Q.boolean),
|
|
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;
|
|
946
1820
|
}
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1821
|
+
d = o.length;
|
|
1822
|
+
let f = t;
|
|
1823
|
+
for (; u < d;) {
|
|
1824
|
+
let e = o[u++], t = o[u++];
|
|
1825
|
+
try {
|
|
1826
|
+
f = e(f);
|
|
1827
|
+
} catch (e) {
|
|
1828
|
+
t.call(this, e);
|
|
1829
|
+
break;
|
|
954
1830
|
}
|
|
955
|
-
if (a.barcode) for (let e of a.barcode ?? []) J.addBarcode(n, e);
|
|
956
|
-
}
|
|
957
|
-
if (o) {
|
|
958
|
-
if (o.edit && L.user.User.userEditorBase.set(n, o.edit), o.userActions) for (let [e, t] of Object.entries(o.userActions)) J.userActions.set([n, e], t);
|
|
959
|
-
if (o.authorIcon) for (let [e, t] of Object.entries(o.authorIcon)) L.item.Item.authorIcon.set([n, e], t);
|
|
960
1831
|
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
for (let e of c.tokenListen ?? []) J.shareToken.set([n, e.key], e);
|
|
1832
|
+
try {
|
|
1833
|
+
l = Or.call(this, f);
|
|
1834
|
+
} catch (e) {
|
|
1835
|
+
return Promise.reject(e);
|
|
966
1836
|
}
|
|
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);
|
|
967
1842
|
}
|
|
968
|
-
}();
|
|
969
|
-
const Ct = async (e) => await Tt(await e.forks(), e.test), wt = (e) => {
|
|
970
|
-
let t = e.urls;
|
|
971
|
-
return Tt(t, e.test);
|
|
972
1843
|
};
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
n.push([e, o]), console.log(`[plugin test] fetch url ${e} connected time ${o}ms`), r.abort();
|
|
985
|
-
} catch {
|
|
986
|
-
n.push([e, !1]), console.log(`[plugin test] fetch url ${e} can not connected`);
|
|
987
|
-
}
|
|
1844
|
+
J.forEach([
|
|
1845
|
+
"delete",
|
|
1846
|
+
"get",
|
|
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
|
|
988
1855
|
}));
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
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
|
+
};
|
|
1004
1871
|
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1872
|
+
Pr.prototype[e] = t(), Pr.prototype[e + "Form"] = t(!0);
|
|
1873
|
+
});
|
|
1874
|
+
//#endregion
|
|
1875
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/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
|
+
});
|
|
1018
1899
|
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
async call(e, t, n) {
|
|
1022
|
-
if (!e.onBooted) return;
|
|
1023
|
-
let r = await e.onBooted({ api: n.api });
|
|
1024
|
-
r && at.set(Symbol.for(`expose:${e.name}`), r);
|
|
1900
|
+
throwIfRequested() {
|
|
1901
|
+
if (this.reason) throw this.reason;
|
|
1025
1902
|
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
let n = lt();
|
|
1031
|
-
try {
|
|
1032
|
-
let r = n.$getPluginDisplayName(e.name);
|
|
1033
|
-
t("判定鉴权状态中...");
|
|
1034
|
-
let i = await e.auth.passSelect(), a = Promise.withResolvers();
|
|
1035
|
-
console.log(`[plugin auth] ${r}, isPass: ${i}`), await kt.acquire(), t("等待其他插件鉴权结束..."), i ? (t("跳过鉴权方式选择"), a.resolve(i)) : (t("选择鉴权方式"), V({
|
|
1036
|
-
type: "default",
|
|
1037
|
-
positiveText: "登录",
|
|
1038
|
-
negativeText: "注册",
|
|
1039
|
-
closable: !1,
|
|
1040
|
-
maskClosable: !1,
|
|
1041
|
-
content: "选择鉴权方式",
|
|
1042
|
-
title: r,
|
|
1043
|
-
onNegativeClick() {
|
|
1044
|
-
a.resolve("signUp");
|
|
1045
|
-
},
|
|
1046
|
-
onPositiveClick() {
|
|
1047
|
-
a.resolve("logIn");
|
|
1048
|
-
}
|
|
1049
|
-
}));
|
|
1050
|
-
let o = await a.promise;
|
|
1051
|
-
t("鉴权中...");
|
|
1052
|
-
let s = {
|
|
1053
|
-
async form(e) {
|
|
1054
|
-
let t = U(e);
|
|
1055
|
-
return J.globalNodes.push(y(f(() => {
|
|
1056
|
-
let e = w(!0);
|
|
1057
|
-
return t.data.then(() => e.value = !1), () => h(B, {
|
|
1058
|
-
show: e.value,
|
|
1059
|
-
position: "center",
|
|
1060
|
-
round: !0,
|
|
1061
|
-
class: "auth-popup",
|
|
1062
|
-
transitionAppear: !0
|
|
1063
|
-
}, [h("div", [r]), t.comp]);
|
|
1064
|
-
}))), await t.data;
|
|
1065
|
-
},
|
|
1066
|
-
website(e) {
|
|
1067
|
-
return window;
|
|
1068
|
-
}
|
|
1069
|
-
};
|
|
1070
|
-
o == "logIn" ? await e.auth.logIn(s) : o == "signUp" && await e.auth.signUp(s), kt.release(), t("鉴权成功");
|
|
1071
|
-
} catch (e) {
|
|
1072
|
-
throw t(`登录失败: ${e}`), e;
|
|
1903
|
+
subscribe(e) {
|
|
1904
|
+
if (this.reason) {
|
|
1905
|
+
e(this.reason);
|
|
1906
|
+
return;
|
|
1073
1907
|
}
|
|
1908
|
+
this._listeners ? this._listeners.push(e) : this._listeners = [e];
|
|
1074
1909
|
}
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
t
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
});
|
|
1086
|
-
});
|
|
1910
|
+
unsubscribe(e) {
|
|
1911
|
+
if (!this._listeners) return;
|
|
1912
|
+
let t = this._listeners.indexOf(e);
|
|
1913
|
+
t !== -1 && this._listeners.splice(t, 1);
|
|
1914
|
+
}
|
|
1915
|
+
toAbortSignal() {
|
|
1916
|
+
let e = new AbortController(), t = (t) => {
|
|
1917
|
+
e.abort(t);
|
|
1918
|
+
};
|
|
1919
|
+
return this.subscribe(t), e.signal.unsubscribe = () => this.unsubscribe(t), e.signal;
|
|
1087
1920
|
}
|
|
1088
|
-
|
|
1921
|
+
static source() {
|
|
1922
|
+
let t;
|
|
1923
|
+
return {
|
|
1924
|
+
token: new e(function(e) {
|
|
1925
|
+
t = e;
|
|
1926
|
+
}),
|
|
1927
|
+
cancel: t
|
|
1928
|
+
};
|
|
1929
|
+
}
|
|
1930
|
+
};
|
|
1931
|
+
//#endregion
|
|
1932
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/spread.js
|
|
1933
|
+
function Ir(e) {
|
|
1934
|
+
return function(t) {
|
|
1935
|
+
return e.apply(null, t);
|
|
1936
|
+
};
|
|
1937
|
+
}
|
|
1938
|
+
//#endregion
|
|
1939
|
+
//#region ../../node_modules/.pnpm/axios@1.13.6/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.13.6/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.13.6/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 {
|
|
1089
2032
|
description = {
|
|
1090
2033
|
title: "通过任意URL安装插件",
|
|
1091
2034
|
description: "从任何你给定的url获取内容,无论内容是什么"
|
|
1092
2035
|
};
|
|
1093
2036
|
name = "fallbackUrl";
|
|
1094
2037
|
async installer(e) {
|
|
1095
|
-
let t = await
|
|
2038
|
+
let t = await $.request({
|
|
1096
2039
|
url: e,
|
|
1097
|
-
responseType: "blob"
|
|
2040
|
+
responseType: "blob",
|
|
2041
|
+
timeout: 1e3 * 60 * 5
|
|
1098
2042
|
}), n = e.split("/").at(-1) ?? "us.js";
|
|
1099
2043
|
return new File([t.data], n);
|
|
1100
2044
|
}
|
|
1101
|
-
async
|
|
2045
|
+
async download(e) {
|
|
1102
2046
|
return await this.installer(e);
|
|
1103
2047
|
}
|
|
1104
2048
|
async update(e) {
|
|
@@ -1107,11 +2051,11 @@ var Tt = async (e, t) => {
|
|
|
1107
2051
|
isMatched(e) {
|
|
1108
2052
|
return URL.canParse(e);
|
|
1109
2053
|
}
|
|
1110
|
-
}(),
|
|
2054
|
+
}(), Vr;
|
|
1111
2055
|
(function(e) {
|
|
1112
2056
|
e[e.Start = 0] = "Start", e[e.Current = 1] = "Current", e[e.End = 2] = "End";
|
|
1113
|
-
})(
|
|
1114
|
-
function
|
|
2057
|
+
})(Vr ||= {});
|
|
2058
|
+
function Hr(e) {
|
|
1115
2059
|
return {
|
|
1116
2060
|
isFile: e.isFile,
|
|
1117
2061
|
isDirectory: e.isDirectory,
|
|
@@ -1133,8 +2077,7 @@ function Pt(e) {
|
|
|
1133
2077
|
blocks: e.blocks
|
|
1134
2078
|
};
|
|
1135
2079
|
}
|
|
1136
|
-
|
|
1137
|
-
function Ft(e) {
|
|
2080
|
+
function Ur(e) {
|
|
1138
2081
|
let t = new Uint8ClampedArray(e), n = t.byteLength, r = 0;
|
|
1139
2082
|
for (let e = 0; e < n; e++) {
|
|
1140
2083
|
let n = t[e];
|
|
@@ -1142,306 +2085,86 @@ function Ft(e) {
|
|
|
1142
2085
|
}
|
|
1143
2086
|
return r;
|
|
1144
2087
|
}
|
|
1145
|
-
|
|
1146
|
-
* The Tauri abstraction for reading and writing files.
|
|
1147
|
-
*
|
|
1148
|
-
* @since 2.0.0
|
|
1149
|
-
*/
|
|
1150
|
-
var It = class extends ht {
|
|
1151
|
-
/**
|
|
1152
|
-
* Reads up to `p.byteLength` bytes into `p`. It resolves to the number of
|
|
1153
|
-
* bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
|
|
1154
|
-
* encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may
|
|
1155
|
-
* use all of `p` as scratch space during the call. If some data is
|
|
1156
|
-
* available but not `p.byteLength` bytes, `read()` conventionally resolves
|
|
1157
|
-
* to what is available instead of waiting for more.
|
|
1158
|
-
*
|
|
1159
|
-
* When `read()` encounters end-of-file condition, it resolves to EOF
|
|
1160
|
-
* (`null`).
|
|
1161
|
-
*
|
|
1162
|
-
* When `read()` encounters an error, it rejects with an error.
|
|
1163
|
-
*
|
|
1164
|
-
* Callers should always process the `n` > `0` bytes returned before
|
|
1165
|
-
* considering the EOF (`null`). Doing so correctly handles I/O errors that
|
|
1166
|
-
* happen after reading some bytes and also both of the allowed EOF
|
|
1167
|
-
* behaviors.
|
|
1168
|
-
*
|
|
1169
|
-
* @example
|
|
1170
|
-
* ```typescript
|
|
1171
|
-
* import { open, BaseDirectory } from "@tauri-apps/plugin-fs"
|
|
1172
|
-
* // if "$APPCONFIG/foo/bar.txt" contains the text "hello world":
|
|
1173
|
-
* const file = await open("foo/bar.txt", { baseDir: BaseDirectory.AppConfig });
|
|
1174
|
-
* const buf = new Uint8Array(100);
|
|
1175
|
-
* const numberOfBytesRead = await file.read(buf); // 11 bytes
|
|
1176
|
-
* const text = new TextDecoder().decode(buf); // "hello world"
|
|
1177
|
-
* await file.close();
|
|
1178
|
-
* ```
|
|
1179
|
-
*
|
|
1180
|
-
* @since 2.0.0
|
|
1181
|
-
*/
|
|
2088
|
+
var Wr = class extends ke {
|
|
1182
2089
|
async read(e) {
|
|
1183
2090
|
if (e.byteLength === 0) return 0;
|
|
1184
|
-
let t = await
|
|
2091
|
+
let t = await G("plugin:fs|read", {
|
|
1185
2092
|
rid: this.rid,
|
|
1186
2093
|
len: e.byteLength
|
|
1187
|
-
}), n =
|
|
2094
|
+
}), n = Ur(t.slice(-8)), r = t instanceof ArrayBuffer ? new Uint8Array(t) : t;
|
|
1188
2095
|
return e.set(r.slice(0, r.length - 8)), n === 0 ? null : n;
|
|
1189
2096
|
}
|
|
1190
|
-
/**
|
|
1191
|
-
* Seek sets the offset for the next `read()` or `write()` to offset,
|
|
1192
|
-
* interpreted according to `whence`: `Start` means relative to the
|
|
1193
|
-
* start of the file, `Current` means relative to the current offset,
|
|
1194
|
-
* and `End` means relative to the end. Seek resolves to the new offset
|
|
1195
|
-
* relative to the start of the file.
|
|
1196
|
-
*
|
|
1197
|
-
* Seeking to an offset before the start of the file is an error. Seeking to
|
|
1198
|
-
* any positive offset is legal, but the behavior of subsequent I/O
|
|
1199
|
-
* operations on the underlying object is implementation-dependent.
|
|
1200
|
-
* It returns the number of cursor position.
|
|
1201
|
-
*
|
|
1202
|
-
* @example
|
|
1203
|
-
* ```typescript
|
|
1204
|
-
* import { open, SeekMode, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1205
|
-
*
|
|
1206
|
-
* // Given hello.txt pointing to file with "Hello world", which is 11 bytes long:
|
|
1207
|
-
* const file = await open('hello.txt', { read: true, write: true, truncate: true, create: true, baseDir: BaseDirectory.AppLocalData });
|
|
1208
|
-
* await file.write(new TextEncoder().encode("Hello world"));
|
|
1209
|
-
*
|
|
1210
|
-
* // Seek 6 bytes from the start of the file
|
|
1211
|
-
* console.log(await file.seek(6, SeekMode.Start)); // "6"
|
|
1212
|
-
* // Seek 2 more bytes from the current position
|
|
1213
|
-
* console.log(await file.seek(2, SeekMode.Current)); // "8"
|
|
1214
|
-
* // Seek backwards 2 bytes from the end of the file
|
|
1215
|
-
* console.log(await file.seek(-2, SeekMode.End)); // "9" (e.g. 11-2)
|
|
1216
|
-
*
|
|
1217
|
-
* await file.close();
|
|
1218
|
-
* ```
|
|
1219
|
-
*
|
|
1220
|
-
* @since 2.0.0
|
|
1221
|
-
*/
|
|
1222
2097
|
async seek(e, t) {
|
|
1223
|
-
return await
|
|
2098
|
+
return await G("plugin:fs|seek", {
|
|
1224
2099
|
rid: this.rid,
|
|
1225
2100
|
offset: e,
|
|
1226
2101
|
whence: t
|
|
1227
2102
|
});
|
|
1228
2103
|
}
|
|
1229
|
-
/**
|
|
1230
|
-
* Returns a {@linkcode FileInfo } for this file.
|
|
1231
|
-
*
|
|
1232
|
-
* @example
|
|
1233
|
-
* ```typescript
|
|
1234
|
-
* import { open, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1235
|
-
* const file = await open("file.txt", { read: true, baseDir: BaseDirectory.AppLocalData });
|
|
1236
|
-
* const fileInfo = await file.stat();
|
|
1237
|
-
* console.log(fileInfo.isFile); // true
|
|
1238
|
-
* await file.close();
|
|
1239
|
-
* ```
|
|
1240
|
-
*
|
|
1241
|
-
* @since 2.0.0
|
|
1242
|
-
*/
|
|
1243
2104
|
async stat() {
|
|
1244
|
-
return
|
|
1245
|
-
}
|
|
1246
|
-
/**
|
|
1247
|
-
* Truncates or extends this file, to reach the specified `len`.
|
|
1248
|
-
* If `len` is not specified then the entire file contents are truncated.
|
|
1249
|
-
*
|
|
1250
|
-
* @example
|
|
1251
|
-
* ```typescript
|
|
1252
|
-
* import { open, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1253
|
-
*
|
|
1254
|
-
* // truncate the entire file
|
|
1255
|
-
* const file = await open("my_file.txt", { read: true, write: true, create: true, baseDir: BaseDirectory.AppLocalData });
|
|
1256
|
-
* await file.truncate();
|
|
1257
|
-
*
|
|
1258
|
-
* // truncate part of the file
|
|
1259
|
-
* const file = await open("my_file.txt", { read: true, write: true, create: true, baseDir: BaseDirectory.AppLocalData });
|
|
1260
|
-
* await file.write(new TextEncoder().encode("Hello World"));
|
|
1261
|
-
* await file.truncate(7);
|
|
1262
|
-
* const data = new Uint8Array(32);
|
|
1263
|
-
* await file.read(data);
|
|
1264
|
-
* console.log(new TextDecoder().decode(data)); // Hello W
|
|
1265
|
-
* await file.close();
|
|
1266
|
-
* ```
|
|
1267
|
-
*
|
|
1268
|
-
* @since 2.0.0
|
|
1269
|
-
*/
|
|
2105
|
+
return Hr(await G("plugin:fs|fstat", { rid: this.rid }));
|
|
2106
|
+
}
|
|
1270
2107
|
async truncate(e) {
|
|
1271
|
-
await
|
|
2108
|
+
await G("plugin:fs|ftruncate", {
|
|
1272
2109
|
rid: this.rid,
|
|
1273
2110
|
len: e
|
|
1274
2111
|
});
|
|
1275
2112
|
}
|
|
1276
|
-
/**
|
|
1277
|
-
* Writes `data.byteLength` bytes from `data` to the underlying data stream. It
|
|
1278
|
-
* resolves to the number of bytes written from `data` (`0` <= `n` <=
|
|
1279
|
-
* `data.byteLength`) or reject with the error encountered that caused the
|
|
1280
|
-
* write to stop early. `write()` must reject with a non-null error if
|
|
1281
|
-
* would resolve to `n` < `data.byteLength`. `write()` must not modify the
|
|
1282
|
-
* slice data, even temporarily.
|
|
1283
|
-
*
|
|
1284
|
-
* @example
|
|
1285
|
-
* ```typescript
|
|
1286
|
-
* import { open, write, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1287
|
-
* const encoder = new TextEncoder();
|
|
1288
|
-
* const data = encoder.encode("Hello world");
|
|
1289
|
-
* const file = await open("bar.txt", { write: true, baseDir: BaseDirectory.AppLocalData });
|
|
1290
|
-
* const bytesWritten = await file.write(data); // 11
|
|
1291
|
-
* await file.close();
|
|
1292
|
-
* ```
|
|
1293
|
-
*
|
|
1294
|
-
* @since 2.0.0
|
|
1295
|
-
*/
|
|
1296
2113
|
async write(e) {
|
|
1297
|
-
return await
|
|
2114
|
+
return await G("plugin:fs|write", {
|
|
1298
2115
|
rid: this.rid,
|
|
1299
2116
|
data: e
|
|
1300
2117
|
});
|
|
1301
2118
|
}
|
|
1302
2119
|
};
|
|
1303
|
-
|
|
1304
|
-
* Open a file and resolve to an instance of {@linkcode FileHandle}. The
|
|
1305
|
-
* file does not need to previously exist if using the `create` or `createNew`
|
|
1306
|
-
* open options. It is the callers responsibility to close the file when finished
|
|
1307
|
-
* with it.
|
|
1308
|
-
*
|
|
1309
|
-
* @example
|
|
1310
|
-
* ```typescript
|
|
1311
|
-
* import { open, BaseDirectory } from "@tauri-apps/plugin-fs"
|
|
1312
|
-
* const file = await open("foo/bar.txt", { read: true, write: true, baseDir: BaseDirectory.AppLocalData });
|
|
1313
|
-
* // Do work with file
|
|
1314
|
-
* await file.close();
|
|
1315
|
-
* ```
|
|
1316
|
-
*
|
|
1317
|
-
* @since 2.0.0
|
|
1318
|
-
*/
|
|
1319
|
-
async function Lt(e, t) {
|
|
2120
|
+
async function Gr(e, t) {
|
|
1320
2121
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1321
|
-
return new
|
|
2122
|
+
return new Wr(await G("plugin:fs|open", {
|
|
1322
2123
|
path: e instanceof URL ? e.toString() : e,
|
|
1323
2124
|
options: t
|
|
1324
2125
|
}));
|
|
1325
2126
|
}
|
|
1326
|
-
|
|
1327
|
-
* Creates a new directory with the specified path.
|
|
1328
|
-
* @example
|
|
1329
|
-
* ```typescript
|
|
1330
|
-
* import { mkdir, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1331
|
-
* await mkdir('users', { baseDir: BaseDirectory.AppLocalData });
|
|
1332
|
-
* ```
|
|
1333
|
-
*
|
|
1334
|
-
* @since 2.0.0
|
|
1335
|
-
*/
|
|
1336
|
-
async function Rt(e, t) {
|
|
2127
|
+
async function Kr(e, t) {
|
|
1337
2128
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1338
|
-
await
|
|
2129
|
+
await G("plugin:fs|mkdir", {
|
|
1339
2130
|
path: e instanceof URL ? e.toString() : e,
|
|
1340
2131
|
options: t
|
|
1341
2132
|
});
|
|
1342
2133
|
}
|
|
1343
|
-
|
|
1344
|
-
* Reads the directory given by path and returns an array of `DirEntry`.
|
|
1345
|
-
* @example
|
|
1346
|
-
* ```typescript
|
|
1347
|
-
* import { readDir, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1348
|
-
* import { join } from '@tauri-apps/api/path';
|
|
1349
|
-
* const dir = "users"
|
|
1350
|
-
* const entries = await readDir('users', { baseDir: BaseDirectory.AppLocalData });
|
|
1351
|
-
* processEntriesRecursively(dir, entries);
|
|
1352
|
-
* async function processEntriesRecursively(parent, entries) {
|
|
1353
|
-
* for (const entry of entries) {
|
|
1354
|
-
* console.log(`Entry: ${entry.name}`);
|
|
1355
|
-
* if (entry.isDirectory) {
|
|
1356
|
-
* const dir = await join(parent, entry.name);
|
|
1357
|
-
* processEntriesRecursively(dir, await readDir(dir, { baseDir: BaseDirectory.AppLocalData }))
|
|
1358
|
-
* }
|
|
1359
|
-
* }
|
|
1360
|
-
* }
|
|
1361
|
-
* ```
|
|
1362
|
-
*
|
|
1363
|
-
* @since 2.0.0
|
|
1364
|
-
*/
|
|
1365
|
-
async function zt(e, t) {
|
|
2134
|
+
async function qr(e, t) {
|
|
1366
2135
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1367
|
-
return await
|
|
2136
|
+
return await G("plugin:fs|read_dir", {
|
|
1368
2137
|
path: e instanceof URL ? e.toString() : e,
|
|
1369
2138
|
options: t
|
|
1370
2139
|
});
|
|
1371
2140
|
}
|
|
1372
|
-
|
|
1373
|
-
* Reads and resolves to the entire contents of a file as an array of bytes.
|
|
1374
|
-
* TextDecoder can be used to transform the bytes to string if required.
|
|
1375
|
-
* @example
|
|
1376
|
-
* ```typescript
|
|
1377
|
-
* import { readFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1378
|
-
* const contents = await readFile('avatar.png', { baseDir: BaseDirectory.Resource });
|
|
1379
|
-
* ```
|
|
1380
|
-
*
|
|
1381
|
-
* @since 2.0.0
|
|
1382
|
-
*/
|
|
1383
|
-
async function Bt(e, t) {
|
|
2141
|
+
async function Jr(e, t) {
|
|
1384
2142
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1385
|
-
let n = await
|
|
2143
|
+
let n = await G("plugin:fs|read_file", {
|
|
1386
2144
|
path: e instanceof URL ? e.toString() : e,
|
|
1387
2145
|
options: t
|
|
1388
2146
|
});
|
|
1389
2147
|
return n instanceof ArrayBuffer ? new Uint8Array(n) : Uint8Array.from(n);
|
|
1390
2148
|
}
|
|
1391
|
-
|
|
1392
|
-
* Reads and returns the entire contents of a file as UTF-8 string.
|
|
1393
|
-
* @example
|
|
1394
|
-
* ```typescript
|
|
1395
|
-
* import { readTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1396
|
-
* const contents = await readTextFile('app.conf', { baseDir: BaseDirectory.AppConfig });
|
|
1397
|
-
* ```
|
|
1398
|
-
*
|
|
1399
|
-
* @since 2.0.0
|
|
1400
|
-
*/
|
|
1401
|
-
async function Vt(e, t) {
|
|
2149
|
+
async function Yr(e, t) {
|
|
1402
2150
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1403
|
-
let n = await
|
|
2151
|
+
let n = await G("plugin:fs|read_text_file", {
|
|
1404
2152
|
path: e instanceof URL ? e.toString() : e,
|
|
1405
2153
|
options: t
|
|
1406
2154
|
}), r = n instanceof ArrayBuffer ? n : Uint8Array.from(n);
|
|
1407
2155
|
return new TextDecoder().decode(r);
|
|
1408
2156
|
}
|
|
1409
|
-
|
|
1410
|
-
* Removes the named file or directory.
|
|
1411
|
-
* If the directory is not empty and the `recursive` option isn't set to true, the promise will be rejected.
|
|
1412
|
-
* @example
|
|
1413
|
-
* ```typescript
|
|
1414
|
-
* import { remove, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1415
|
-
* await remove('users/file.txt', { baseDir: BaseDirectory.AppLocalData });
|
|
1416
|
-
* await remove('users', { baseDir: BaseDirectory.AppLocalData });
|
|
1417
|
-
* ```
|
|
1418
|
-
*
|
|
1419
|
-
* @since 2.0.0
|
|
1420
|
-
*/
|
|
1421
|
-
async function Ht(e, t) {
|
|
2157
|
+
async function Xr(e, t) {
|
|
1422
2158
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1423
|
-
await
|
|
2159
|
+
await G("plugin:fs|remove", {
|
|
1424
2160
|
path: e instanceof URL ? e.toString() : e,
|
|
1425
2161
|
options: t
|
|
1426
2162
|
});
|
|
1427
2163
|
}
|
|
1428
|
-
|
|
1429
|
-
* Write `data` to the given `path`, by default creating a new file if needed, else overwriting.
|
|
1430
|
-
* @example
|
|
1431
|
-
* ```typescript
|
|
1432
|
-
* import { writeFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1433
|
-
*
|
|
1434
|
-
* let encoder = new TextEncoder();
|
|
1435
|
-
* let data = encoder.encode("Hello World");
|
|
1436
|
-
* await writeFile('file.txt', data, { baseDir: BaseDirectory.AppLocalData });
|
|
1437
|
-
* ```
|
|
1438
|
-
*
|
|
1439
|
-
* @since 2.0.0
|
|
1440
|
-
*/
|
|
1441
|
-
async function Ut(e, t, n) {
|
|
2164
|
+
async function Zr(e, t, n) {
|
|
1442
2165
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1443
2166
|
if (t instanceof ReadableStream) {
|
|
1444
|
-
let r = await
|
|
2167
|
+
let r = await Gr(e, {
|
|
1445
2168
|
read: !1,
|
|
1446
2169
|
create: !0,
|
|
1447
2170
|
write: !0,
|
|
@@ -1456,40 +2179,29 @@ async function Ut(e, t, n) {
|
|
|
1456
2179
|
} finally {
|
|
1457
2180
|
i.releaseLock(), await r.close();
|
|
1458
2181
|
}
|
|
1459
|
-
} else await
|
|
2182
|
+
} else await G("plugin:fs|write_file", t, { headers: {
|
|
1460
2183
|
path: encodeURIComponent(e instanceof URL ? e.toString() : e),
|
|
1461
2184
|
options: JSON.stringify(n)
|
|
1462
2185
|
} });
|
|
1463
2186
|
}
|
|
1464
|
-
|
|
1465
|
-
* Writes UTF-8 string `data` to the given `path`, by default creating a new file if needed, else overwriting.
|
|
1466
|
-
@example
|
|
1467
|
-
* ```typescript
|
|
1468
|
-
* import { writeTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1469
|
-
*
|
|
1470
|
-
* await writeTextFile('file.txt', "Hello world", { baseDir: BaseDirectory.AppLocalData });
|
|
1471
|
-
* ```
|
|
1472
|
-
*
|
|
1473
|
-
* @since 2.0.0
|
|
1474
|
-
*/
|
|
1475
|
-
async function Wt(e, t, n) {
|
|
2187
|
+
async function Qr(e, t, n) {
|
|
1476
2188
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1477
|
-
await
|
|
2189
|
+
await G("plugin:fs|write_text_file", new TextEncoder().encode(t), { headers: {
|
|
1478
2190
|
path: encodeURIComponent(e instanceof URL ? e.toString() : e),
|
|
1479
2191
|
options: JSON.stringify(n)
|
|
1480
2192
|
} });
|
|
1481
2193
|
}
|
|
1482
|
-
var
|
|
2194
|
+
var $r = new class extends Fe {
|
|
1483
2195
|
description = {
|
|
1484
2196
|
title: "安装本地插件",
|
|
1485
2197
|
description: "输入以: \"local:\"开头,后接全路径的文本"
|
|
1486
2198
|
};
|
|
1487
2199
|
name = "local";
|
|
1488
2200
|
async installer(e) {
|
|
1489
|
-
let t = decodeURIComponent(
|
|
2201
|
+
let t = decodeURIComponent(Oe(e.replace(/^local:/, ""), "local")), n = t.split(/\\|\//).at(-1) ?? "us.js", r = await Jr(t);
|
|
1490
2202
|
return new File([r], n);
|
|
1491
2203
|
}
|
|
1492
|
-
async
|
|
2204
|
+
async download(e) {
|
|
1493
2205
|
return await this.installer(e);
|
|
1494
2206
|
}
|
|
1495
2207
|
async update(e) {
|
|
@@ -1498,20 +2210,20 @@ var Gt = new class extends bt {
|
|
|
1498
2210
|
isMatched(e) {
|
|
1499
2211
|
return e.startsWith("local:");
|
|
1500
2212
|
}
|
|
1501
|
-
}(),
|
|
2213
|
+
}(), ei = new class extends Fe {
|
|
1502
2214
|
description = {
|
|
1503
2215
|
title: "安装Develop Userscript插件",
|
|
1504
2216
|
description: "输入形如: \"localhost\"或者一个可以不含port的ip"
|
|
1505
2217
|
};
|
|
1506
2218
|
name = "devUrl";
|
|
1507
2219
|
async installer(e) {
|
|
1508
|
-
let t = await
|
|
2220
|
+
let t = await $.request({
|
|
1509
2221
|
url: `http://${/:\d+$/.test(e) ? e : e + ":6173"}/__vite-plugin-monkey.install.user.js?origin=http%3A%2F%2F${e}%3A6173`,
|
|
1510
2222
|
responseType: "text"
|
|
1511
2223
|
}), n = e.replace(/:\d+$/, ""), r = t.data.replaceAll("localhost", n).replaceAll("127.0.0.1", n);
|
|
1512
2224
|
return new File([r], "us.js");
|
|
1513
2225
|
}
|
|
1514
|
-
async
|
|
2226
|
+
async download(e) {
|
|
1515
2227
|
return await this.installer(e);
|
|
1516
2228
|
}
|
|
1517
2229
|
async update(e) {
|
|
@@ -1521,14 +2233,20 @@ var Gt = new class extends bt {
|
|
|
1521
2233
|
return /^(((\d+\.?)+)|(localhost))(:\d+)?$/.test(e);
|
|
1522
2234
|
}
|
|
1523
2235
|
}();
|
|
1524
|
-
|
|
2236
|
+
//#endregion
|
|
2237
|
+
//#region ../../node_modules/.pnpm/universal-user-agent@7.0.3/node_modules/universal-user-agent/index.js
|
|
2238
|
+
function ti() {
|
|
1525
2239
|
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>";
|
|
1526
2240
|
}
|
|
1527
|
-
|
|
2241
|
+
//#endregion
|
|
2242
|
+
//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/register.js
|
|
2243
|
+
function ni(e, t, n, r) {
|
|
1528
2244
|
if (typeof n != "function") throw Error("method for before hook must be a function");
|
|
1529
|
-
return r ||= {}, Array.isArray(t) ? t.reverse().reduce((t, n) =>
|
|
2245
|
+
return r ||= {}, Array.isArray(t) ? t.reverse().reduce((t, n) => ni.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));
|
|
1530
2246
|
}
|
|
1531
|
-
|
|
2247
|
+
//#endregion
|
|
2248
|
+
//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/add.js
|
|
2249
|
+
function ri(e, t, n, r) {
|
|
1532
2250
|
let i = r;
|
|
1533
2251
|
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) => {
|
|
1534
2252
|
let n;
|
|
@@ -1538,14 +2256,18 @@ function Yt(e, t, n, r) {
|
|
|
1538
2256
|
orig: i
|
|
1539
2257
|
});
|
|
1540
2258
|
}
|
|
1541
|
-
|
|
2259
|
+
//#endregion
|
|
2260
|
+
//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/remove.js
|
|
2261
|
+
function ii(e, t, n) {
|
|
1542
2262
|
if (!e.registry[t]) return;
|
|
1543
2263
|
let r = e.registry[t].map((e) => e.orig).indexOf(n);
|
|
1544
2264
|
r !== -1 && e.registry[t].splice(r, 1);
|
|
1545
2265
|
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
2266
|
+
//#endregion
|
|
2267
|
+
//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/index.js
|
|
2268
|
+
var ai = Function.bind, oi = ai.bind(ai);
|
|
2269
|
+
function si(e, t, n) {
|
|
2270
|
+
let r = oi(ii, null).apply(null, n ? [t, n] : [t]);
|
|
1549
2271
|
e.api = { remove: r }, e.remove = r, [
|
|
1550
2272
|
"before",
|
|
1551
2273
|
"error",
|
|
@@ -1557,50 +2279,50 @@ function $t(e, t, n) {
|
|
|
1557
2279
|
r,
|
|
1558
2280
|
n
|
|
1559
2281
|
] : [t, r];
|
|
1560
|
-
e[r] = e.api[r] =
|
|
2282
|
+
e[r] = e.api[r] = oi(ri, null).apply(null, i);
|
|
1561
2283
|
});
|
|
1562
2284
|
}
|
|
1563
|
-
function
|
|
1564
|
-
let e = Symbol("Singular"), t = { registry: {} }, n =
|
|
1565
|
-
return
|
|
2285
|
+
function ci() {
|
|
2286
|
+
let e = Symbol("Singular"), t = { registry: {} }, n = ni.bind(null, t, e);
|
|
2287
|
+
return si(n, t, e), n;
|
|
1566
2288
|
}
|
|
1567
|
-
function
|
|
1568
|
-
let e = { registry: {} }, t =
|
|
1569
|
-
return
|
|
2289
|
+
function li() {
|
|
2290
|
+
let e = { registry: {} }, t = ni.bind(null, e);
|
|
2291
|
+
return si(t, e), t;
|
|
1570
2292
|
}
|
|
1571
|
-
var
|
|
1572
|
-
Singular:
|
|
1573
|
-
Collection:
|
|
1574
|
-
},
|
|
2293
|
+
var ui = {
|
|
2294
|
+
Singular: ci,
|
|
2295
|
+
Collection: li
|
|
2296
|
+
}, di = `octokit-endpoint.js/0.0.0-development ${ti()}`, fi = {
|
|
1575
2297
|
method: "GET",
|
|
1576
2298
|
baseUrl: "https://api.github.com",
|
|
1577
2299
|
headers: {
|
|
1578
2300
|
accept: "application/vnd.github.v3+json",
|
|
1579
|
-
"user-agent":
|
|
2301
|
+
"user-agent": di
|
|
1580
2302
|
},
|
|
1581
2303
|
mediaType: { format: "" }
|
|
1582
2304
|
};
|
|
1583
|
-
function
|
|
2305
|
+
function pi(e) {
|
|
1584
2306
|
return e ? Object.keys(e).reduce((t, n) => (t[n.toLowerCase()] = e[n], t), {}) : {};
|
|
1585
2307
|
}
|
|
1586
|
-
function
|
|
2308
|
+
function mi(e) {
|
|
1587
2309
|
if (typeof e != "object" || !e || Object.prototype.toString.call(e) !== "[object Object]") return !1;
|
|
1588
2310
|
let t = Object.getPrototypeOf(e);
|
|
1589
2311
|
if (t === null) return !0;
|
|
1590
2312
|
let n = Object.prototype.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
1591
2313
|
return typeof n == "function" && n instanceof n && Function.prototype.call(n) === Function.prototype.call(e);
|
|
1592
2314
|
}
|
|
1593
|
-
function
|
|
2315
|
+
function hi(e, t) {
|
|
1594
2316
|
let n = Object.assign({}, e);
|
|
1595
2317
|
return Object.keys(t).forEach((r) => {
|
|
1596
|
-
|
|
2318
|
+
mi(t[r]) && r in e ? n[r] = hi(e[r], t[r]) : Object.assign(n, { [r]: t[r] });
|
|
1597
2319
|
}), n;
|
|
1598
2320
|
}
|
|
1599
|
-
function
|
|
2321
|
+
function gi(e) {
|
|
1600
2322
|
for (let t in e) e[t] === void 0 && delete e[t];
|
|
1601
2323
|
return e;
|
|
1602
2324
|
}
|
|
1603
|
-
function
|
|
2325
|
+
function _i(e, t, n) {
|
|
1604
2326
|
if (typeof t == "string") {
|
|
1605
2327
|
let [e, r] = t.split(" ");
|
|
1606
2328
|
n = Object.assign(r ? {
|
|
@@ -1608,69 +2330,69 @@ function un(e, t, n) {
|
|
|
1608
2330
|
url: r
|
|
1609
2331
|
} : { url: e }, n);
|
|
1610
2332
|
} else n = Object.assign({}, t);
|
|
1611
|
-
n.headers =
|
|
1612
|
-
let r =
|
|
2333
|
+
n.headers = pi(n.headers), gi(n), gi(n.headers);
|
|
2334
|
+
let r = hi(e || {}, n);
|
|
1613
2335
|
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;
|
|
1614
2336
|
}
|
|
1615
|
-
function
|
|
2337
|
+
function vi(e, t) {
|
|
1616
2338
|
let n = /\?/.test(e) ? "&" : "?", r = Object.keys(t);
|
|
1617
2339
|
return r.length === 0 ? e : e + n + r.map((e) => e === "q" ? "q=" + t.q.split("+").map(encodeURIComponent).join("+") : `${e}=${encodeURIComponent(t[e])}`).join("&");
|
|
1618
2340
|
}
|
|
1619
|
-
var
|
|
1620
|
-
function
|
|
2341
|
+
var yi = /\{[^{}}]+\}/g;
|
|
2342
|
+
function bi(e) {
|
|
1621
2343
|
return e.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
|
|
1622
2344
|
}
|
|
1623
|
-
function
|
|
1624
|
-
let t = e.match(
|
|
1625
|
-
return t ? t.map(
|
|
2345
|
+
function xi(e) {
|
|
2346
|
+
let t = e.match(yi);
|
|
2347
|
+
return t ? t.map(bi).reduce((e, t) => e.concat(t), []) : [];
|
|
1626
2348
|
}
|
|
1627
|
-
function
|
|
2349
|
+
function Si(e, t) {
|
|
1628
2350
|
let n = { __proto__: null };
|
|
1629
2351
|
for (let r of Object.keys(e)) t.indexOf(r) === -1 && (n[r] = e[r]);
|
|
1630
2352
|
return n;
|
|
1631
2353
|
}
|
|
1632
|
-
function
|
|
2354
|
+
function Ci(e) {
|
|
1633
2355
|
return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(e) {
|
|
1634
2356
|
return /%[0-9A-Fa-f]/.test(e) || (e = encodeURI(e).replace(/%5B/g, "[").replace(/%5D/g, "]")), e;
|
|
1635
2357
|
}).join("");
|
|
1636
2358
|
}
|
|
1637
|
-
function
|
|
2359
|
+
function wi(e) {
|
|
1638
2360
|
return encodeURIComponent(e).replace(/[!'()*]/g, function(e) {
|
|
1639
2361
|
return "%" + e.charCodeAt(0).toString(16).toUpperCase();
|
|
1640
2362
|
});
|
|
1641
2363
|
}
|
|
1642
|
-
function
|
|
1643
|
-
return t = e === "+" || e === "#" ?
|
|
2364
|
+
function Ti(e, t, n) {
|
|
2365
|
+
return t = e === "+" || e === "#" ? Ci(t) : wi(t), n ? wi(n) + "=" + t : t;
|
|
1644
2366
|
}
|
|
1645
|
-
function
|
|
2367
|
+
function Ei(e) {
|
|
1646
2368
|
return e != null;
|
|
1647
2369
|
}
|
|
1648
|
-
function
|
|
2370
|
+
function Di(e) {
|
|
1649
2371
|
return e === ";" || e === "&" || e === "?";
|
|
1650
2372
|
}
|
|
1651
|
-
function
|
|
2373
|
+
function Oi(e, t, n, r) {
|
|
1652
2374
|
var i = e[n], a = [];
|
|
1653
|
-
if (
|
|
1654
|
-
else if (r === "*") Array.isArray(i) ? i.filter(
|
|
1655
|
-
a.push(
|
|
2375
|
+
if (Ei(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(Ti(t, i, Di(t) ? n : ""));
|
|
2376
|
+
else if (r === "*") Array.isArray(i) ? i.filter(Ei).forEach(function(e) {
|
|
2377
|
+
a.push(Ti(t, e, Di(t) ? n : ""));
|
|
1656
2378
|
}) : Object.keys(i).forEach(function(e) {
|
|
1657
|
-
|
|
2379
|
+
Ei(i[e]) && a.push(Ti(t, i[e], e));
|
|
1658
2380
|
});
|
|
1659
2381
|
else {
|
|
1660
2382
|
let e = [];
|
|
1661
|
-
Array.isArray(i) ? i.filter(
|
|
1662
|
-
e.push(
|
|
2383
|
+
Array.isArray(i) ? i.filter(Ei).forEach(function(n) {
|
|
2384
|
+
e.push(Ti(t, n));
|
|
1663
2385
|
}) : Object.keys(i).forEach(function(n) {
|
|
1664
|
-
|
|
1665
|
-
}),
|
|
2386
|
+
Ei(i[n]) && (e.push(wi(n)), e.push(Ti(t, i[n].toString())));
|
|
2387
|
+
}), Di(t) ? a.push(wi(n) + "=" + e.join(",")) : e.length !== 0 && a.push(e.join(","));
|
|
1666
2388
|
}
|
|
1667
|
-
else t === ";" ?
|
|
2389
|
+
else t === ";" ? Ei(i) && a.push(wi(n)) : i === "" && (t === "&" || t === "?") ? a.push(wi(n) + "=") : i === "" && a.push("");
|
|
1668
2390
|
return a;
|
|
1669
2391
|
}
|
|
1670
|
-
function
|
|
1671
|
-
return { expand:
|
|
2392
|
+
function ki(e) {
|
|
2393
|
+
return { expand: Ai.bind(null, e) };
|
|
1672
2394
|
}
|
|
1673
|
-
function
|
|
2395
|
+
function Ai(e, t) {
|
|
1674
2396
|
var n = [
|
|
1675
2397
|
"+",
|
|
1676
2398
|
"#",
|
|
@@ -1685,72 +2407,51 @@ function Cn(e, t) {
|
|
|
1685
2407
|
let e = "", i = [];
|
|
1686
2408
|
if (n.indexOf(r.charAt(0)) !== -1 && (e = r.charAt(0), r = r.substr(1)), r.split(/,/g).forEach(function(n) {
|
|
1687
2409
|
var r = /([^:\*]*)(?::(\d+)|(\*))?/.exec(n);
|
|
1688
|
-
i.push(
|
|
2410
|
+
i.push(Oi(t, e, r[1], r[2] || r[3]));
|
|
1689
2411
|
}), e && e !== "+") {
|
|
1690
2412
|
var a = ",";
|
|
1691
2413
|
return e === "?" ? a = "&" : e !== "#" && (a = e), (i.length === 0 ? "" : e) + i.join(a);
|
|
1692
2414
|
} else return i.join(",");
|
|
1693
|
-
} else return
|
|
2415
|
+
} else return Ci(i);
|
|
1694
2416
|
}), e === "/" ? e : e.replace(/\/$/, "");
|
|
1695
2417
|
}
|
|
1696
|
-
function
|
|
1697
|
-
let t = e.method.toUpperCase(), n = (e.url || "/").replace(/:([a-z]\w+)/g, "{$1}"), r = Object.assign({}, e.headers), i, a =
|
|
2418
|
+
function ji(e) {
|
|
2419
|
+
let t = e.method.toUpperCase(), n = (e.url || "/").replace(/:([a-z]\w+)/g, "{$1}"), r = Object.assign({}, e.headers), i, a = Si(e, [
|
|
1698
2420
|
"method",
|
|
1699
2421
|
"baseUrl",
|
|
1700
2422
|
"url",
|
|
1701
2423
|
"headers",
|
|
1702
2424
|
"request",
|
|
1703
2425
|
"mediaType"
|
|
1704
|
-
]), o =
|
|
1705
|
-
n =
|
|
1706
|
-
let s =
|
|
1707
|
-
return /application\/octet-stream/i.test(r.accept) || (e.mediaType.format && (r.accept = r.accept.split(/,/).map((t) => t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${e.mediaType.format}`)).join(",")), n.endsWith("/graphql") && e.mediaType.previews?.length && (r.accept = (r.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || []).concat(e.mediaType.previews).map((t) => `application/vnd.github.${t}-preview${e.mediaType.format ? `.${e.mediaType.format}` : "+json"}`).join(","))), ["GET", "HEAD"].includes(t) ? n =
|
|
2426
|
+
]), o = xi(n);
|
|
2427
|
+
n = ki(n).expand(a), /^http/.test(n) || (n = e.baseUrl + n);
|
|
2428
|
+
let s = Si(a, Object.keys(e).filter((e) => o.includes(e)).concat("baseUrl"));
|
|
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 = vi(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({
|
|
1708
2430
|
method: t,
|
|
1709
2431
|
url: n,
|
|
1710
2432
|
headers: r
|
|
1711
2433
|
}, i === void 0 ? null : { body: i }, e.request ? { request: e.request } : null);
|
|
1712
2434
|
}
|
|
1713
|
-
function
|
|
1714
|
-
return
|
|
2435
|
+
function Mi(e, t, n) {
|
|
2436
|
+
return ji(_i(e, t, n));
|
|
1715
2437
|
}
|
|
1716
|
-
function
|
|
1717
|
-
let n =
|
|
2438
|
+
function Ni(e, t) {
|
|
2439
|
+
let n = _i(e, t), r = Mi.bind(null, n);
|
|
1718
2440
|
return Object.assign(r, {
|
|
1719
2441
|
DEFAULTS: n,
|
|
1720
|
-
defaults:
|
|
1721
|
-
merge:
|
|
1722
|
-
parse:
|
|
2442
|
+
defaults: Ni.bind(null, n),
|
|
2443
|
+
merge: _i.bind(null, n),
|
|
2444
|
+
parse: ji
|
|
1723
2445
|
});
|
|
1724
2446
|
}
|
|
1725
|
-
var
|
|
2447
|
+
var Pi = Ni(null, fi), Fi = (/* @__PURE__ */ o(((e, t) => {
|
|
1726
2448
|
var n = function() {};
|
|
1727
2449
|
n.prototype = Object.create(null);
|
|
1728
|
-
/**
|
|
1729
|
-
* RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
|
|
1730
|
-
*
|
|
1731
|
-
* parameter = token "=" ( token / quoted-string )
|
|
1732
|
-
* token = 1*tchar
|
|
1733
|
-
* tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
|
|
1734
|
-
* / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
|
|
1735
|
-
* / DIGIT / ALPHA
|
|
1736
|
-
* ; any VCHAR, except delimiters
|
|
1737
|
-
* quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
|
|
1738
|
-
* qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
|
|
1739
|
-
* obs-text = %x80-FF
|
|
1740
|
-
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
|
1741
|
-
*/
|
|
1742
2450
|
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 = {
|
|
1743
2451
|
type: "",
|
|
1744
2452
|
parameters: new n()
|
|
1745
2453
|
};
|
|
1746
2454
|
Object.freeze(o.parameters), Object.freeze(o);
|
|
1747
|
-
/**
|
|
1748
|
-
* Parse media type to object.
|
|
1749
|
-
*
|
|
1750
|
-
* @param {string|object} header
|
|
1751
|
-
* @return {Object}
|
|
1752
|
-
* @public
|
|
1753
|
-
*/
|
|
1754
2455
|
function s(e) {
|
|
1755
2456
|
if (typeof e != "string") throw TypeError("argument header is required and must be a string");
|
|
1756
2457
|
let t = e.indexOf(";"), o = t === -1 ? e.trim() : e.slice(0, t).trim();
|
|
@@ -1788,19 +2489,27 @@ var Dn = En(null, an), On = (/* @__PURE__ */ G(((e, t) => {
|
|
|
1788
2489
|
parse: s,
|
|
1789
2490
|
safeParse: c
|
|
1790
2491
|
}, t.exports.parse = s, t.exports.safeParse = c, t.exports.defaultContentType = o;
|
|
1791
|
-
})))(),
|
|
2492
|
+
})))(), Ii = /^-?\d+$/, Li = /^-?\d+n+$/, Ri = JSON.stringify, zi = JSON.parse, Bi = /^-?\d+n$/, Vi = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g, Hi = /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g, Ui = (e, t, n) => "rawJSON" in JSON ? Ri(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 ? Ri(e, (e, n) => typeof n == "string" && Li.test(n) || typeof n == "bigint" ? n.toString() + "n" : typeof t == "function" ? t(e, n) : (Array.isArray(t) && t.includes(e), n), n).replace(Vi, "$1$2$3").replace(Hi, "$1$2$3") : Ri(e, t, n), Wi = /* @__PURE__ */ new Map(), Gi = () => {
|
|
2493
|
+
let e = JSON.parse.toString();
|
|
2494
|
+
if (Wi.has(e)) return Wi.get(e);
|
|
2495
|
+
try {
|
|
2496
|
+
let t = JSON.parse("1", (e, t, n) => !!n?.source && n.source === "1");
|
|
2497
|
+
return Wi.set(e, t), t;
|
|
2498
|
+
} catch {
|
|
2499
|
+
return Wi.set(e, !1), !1;
|
|
2500
|
+
}
|
|
2501
|
+
}, Ki = (e, t, n, r) => typeof t == "string" && Bi.test(t) ? BigInt(t.slice(0, -1)) : typeof t == "string" && Li.test(t) ? t.slice(0, -1) : typeof r == "function" ? r(e, t, n) : t, qi = (e, t) => JSON.parse(e, (e, n, r) => {
|
|
2502
|
+
let i = typeof n == "number" && (n > 2 ** 53 - 1 || n < -(2 ** 53 - 1)), a = r && Ii.test(r.source);
|
|
2503
|
+
return i && a ? BigInt(r.source) : typeof t == "function" ? t(e, n, r) : n;
|
|
2504
|
+
}), Ji = (2 ** 53 - 1).toString(), Yi = Ji.length, Xi = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g, Zi = /^"-?\d+n+"$/, Qi = (e, t) => e ? Gi() ? qi(e, t) : zi(e.replace(Xi, (e, t, n, r) => {
|
|
2505
|
+
let i = e[0] === "\"";
|
|
2506
|
+
if (i && Zi.test(e)) return e.substring(0, e.length - 1) + "n\"";
|
|
2507
|
+
let a = n || r, o = t && (t.length < Yi || t.length === Yi && t <= Ji);
|
|
2508
|
+
return i || a || o ? e : "\"" + e + "n\"";
|
|
2509
|
+
}), (e, n, r) => Ki(e, n, r, t)) : zi(e, t), $i = class extends Error {
|
|
1792
2510
|
name;
|
|
1793
|
-
/**
|
|
1794
|
-
* http status code
|
|
1795
|
-
*/
|
|
1796
2511
|
status;
|
|
1797
|
-
/**
|
|
1798
|
-
* Request options that lead to the error.
|
|
1799
|
-
*/
|
|
1800
2512
|
request;
|
|
1801
|
-
/**
|
|
1802
|
-
* Response object if a response was received
|
|
1803
|
-
*/
|
|
1804
2513
|
response;
|
|
1805
2514
|
constructor(e, t, n) {
|
|
1806
2515
|
/* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */
|
|
@@ -1808,19 +2517,19 @@ var Dn = En(null, an), On = (/* @__PURE__ */ G(((e, t) => {
|
|
|
1808
2517
|
let r = Object.assign({}, n.request);
|
|
1809
2518
|
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;
|
|
1810
2519
|
}
|
|
1811
|
-
},
|
|
1812
|
-
function
|
|
2520
|
+
}, ea = "10.0.8", ta = { headers: { "user-agent": `octokit-request.js/${ea} ${ti()}` } };
|
|
2521
|
+
function na(e) {
|
|
1813
2522
|
if (typeof e != "object" || !e || Object.prototype.toString.call(e) !== "[object Object]") return !1;
|
|
1814
2523
|
let t = Object.getPrototypeOf(e);
|
|
1815
2524
|
if (t === null) return !0;
|
|
1816
2525
|
let n = Object.prototype.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
1817
2526
|
return typeof n == "function" && n instanceof n && Function.prototype.call(n) === Function.prototype.call(e);
|
|
1818
2527
|
}
|
|
1819
|
-
var
|
|
1820
|
-
async function
|
|
2528
|
+
var ra = () => "";
|
|
2529
|
+
async function ia(e) {
|
|
1821
2530
|
let t = e.request?.fetch || globalThis.fetch;
|
|
1822
2531
|
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");
|
|
1823
|
-
let n = e.request?.log || console, r = e.request?.parseSuccessResponseBody !== !1, i =
|
|
2532
|
+
let n = e.request?.log || console, r = e.request?.parseSuccessResponseBody !== !1, i = na(e.body) || Array.isArray(e.body) ? Ui(e.body) : e.body, a = Object.fromEntries(Object.entries(e.headers).map(([e, t]) => [e, String(t)])), o;
|
|
1824
2533
|
try {
|
|
1825
2534
|
o = await t(e.url, {
|
|
1826
2535
|
method: e.method,
|
|
@@ -1836,7 +2545,7 @@ async function Pn(e) {
|
|
|
1836
2545
|
if (t.name === "AbortError") throw t.status = 500, t;
|
|
1837
2546
|
n = t.message, t.name === "TypeError" && "cause" in t && (t.cause instanceof Error ? n = t.cause.message : typeof t.cause == "string" && (n = t.cause));
|
|
1838
2547
|
}
|
|
1839
|
-
let r = new
|
|
2548
|
+
let r = new $i(n, 500, { request: e });
|
|
1840
2549
|
throw r.cause = t, r;
|
|
1841
2550
|
}
|
|
1842
2551
|
let s = o.status, c = o.url, l = {};
|
|
@@ -1854,42 +2563,42 @@ async function Pn(e) {
|
|
|
1854
2563
|
if (s === 204 || s === 205) return u;
|
|
1855
2564
|
if (e.method === "HEAD") {
|
|
1856
2565
|
if (s < 400) return u;
|
|
1857
|
-
throw new
|
|
2566
|
+
throw new $i(o.statusText, s, {
|
|
1858
2567
|
response: u,
|
|
1859
2568
|
request: e
|
|
1860
2569
|
});
|
|
1861
2570
|
}
|
|
1862
|
-
if (s === 304) throw u.data = await
|
|
2571
|
+
if (s === 304) throw u.data = await aa(o), new $i("Not modified", s, {
|
|
1863
2572
|
response: u,
|
|
1864
2573
|
request: e
|
|
1865
2574
|
});
|
|
1866
|
-
if (s >= 400) throw u.data = await
|
|
2575
|
+
if (s >= 400) throw u.data = await aa(o), new $i(sa(u.data), s, {
|
|
1867
2576
|
response: u,
|
|
1868
2577
|
request: e
|
|
1869
2578
|
});
|
|
1870
|
-
return u.data = r ? await
|
|
2579
|
+
return u.data = r ? await aa(o) : o.body, u;
|
|
1871
2580
|
}
|
|
1872
|
-
async function
|
|
2581
|
+
async function aa(e) {
|
|
1873
2582
|
let t = e.headers.get("content-type");
|
|
1874
|
-
if (!t) return e.text().catch(
|
|
1875
|
-
let n = (0,
|
|
1876
|
-
if (
|
|
2583
|
+
if (!t) return e.text().catch(ra);
|
|
2584
|
+
let n = (0, Fi.safeParse)(t);
|
|
2585
|
+
if (oa(n)) {
|
|
1877
2586
|
let t = "";
|
|
1878
2587
|
try {
|
|
1879
|
-
return t = await e.text(),
|
|
2588
|
+
return t = await e.text(), Qi(t);
|
|
1880
2589
|
} catch {
|
|
1881
2590
|
return t;
|
|
1882
2591
|
}
|
|
1883
|
-
} else if (n.type.startsWith("text/") || n.parameters.charset?.toLowerCase() === "utf-8") return e.text().catch(
|
|
2592
|
+
} else if (n.type.startsWith("text/") || n.parameters.charset?.toLowerCase() === "utf-8") return e.text().catch(ra);
|
|
1884
2593
|
else return e.arrayBuffer().catch(
|
|
1885
2594
|
/* v8 ignore next -- @preserve */
|
|
1886
2595
|
() => /* @__PURE__ */ new ArrayBuffer(0)
|
|
1887
2596
|
);
|
|
1888
2597
|
}
|
|
1889
|
-
function
|
|
2598
|
+
function oa(e) {
|
|
1890
2599
|
return e.type === "application/json" || e.type === "application/scim+json";
|
|
1891
2600
|
}
|
|
1892
|
-
function
|
|
2601
|
+
function sa(e) {
|
|
1893
2602
|
if (typeof e == "string") return e;
|
|
1894
2603
|
if (e instanceof ArrayBuffer) return "Unknown error";
|
|
1895
2604
|
if ("message" in e) {
|
|
@@ -1898,33 +2607,33 @@ function Ln(e) {
|
|
|
1898
2607
|
}
|
|
1899
2608
|
return `Unknown error: ${JSON.stringify(e)}`;
|
|
1900
2609
|
}
|
|
1901
|
-
function
|
|
2610
|
+
function ca(e, t) {
|
|
1902
2611
|
let n = e.defaults(t);
|
|
1903
2612
|
return Object.assign(function(e, t) {
|
|
1904
2613
|
let r = n.merge(e, t);
|
|
1905
|
-
if (!r.request || !r.request.hook) return
|
|
1906
|
-
let i = (e, t) =>
|
|
2614
|
+
if (!r.request || !r.request.hook) return ia(n.parse(r));
|
|
2615
|
+
let i = (e, t) => ia(n.parse(n.merge(e, t)));
|
|
1907
2616
|
return Object.assign(i, {
|
|
1908
2617
|
endpoint: n,
|
|
1909
|
-
defaults:
|
|
2618
|
+
defaults: ca.bind(null, n)
|
|
1910
2619
|
}), r.request.hook(i, r);
|
|
1911
2620
|
}, {
|
|
1912
2621
|
endpoint: n,
|
|
1913
|
-
defaults:
|
|
2622
|
+
defaults: ca.bind(null, n)
|
|
1914
2623
|
});
|
|
1915
2624
|
}
|
|
1916
|
-
var
|
|
1917
|
-
function
|
|
2625
|
+
var la = ca(Pi, ta), ua = "0.0.0-development";
|
|
2626
|
+
function da(e) {
|
|
1918
2627
|
return "Request failed due to following response errors:\n" + e.errors.map((e) => ` - ${e.message}`).join("\n");
|
|
1919
2628
|
}
|
|
1920
|
-
var
|
|
2629
|
+
var fa = class extends Error {
|
|
1921
2630
|
constructor(e, t, n) {
|
|
1922
|
-
super(
|
|
2631
|
+
super(da(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);
|
|
1923
2632
|
}
|
|
1924
2633
|
name = "GraphqlResponseError";
|
|
1925
2634
|
errors;
|
|
1926
2635
|
data;
|
|
1927
|
-
},
|
|
2636
|
+
}, pa = [
|
|
1928
2637
|
"method",
|
|
1929
2638
|
"baseUrl",
|
|
1930
2639
|
"url",
|
|
@@ -1933,70 +2642,72 @@ var Hn = class extends Error {
|
|
|
1933
2642
|
"query",
|
|
1934
2643
|
"mediaType",
|
|
1935
2644
|
"operationName"
|
|
1936
|
-
],
|
|
2645
|
+
], ma = [
|
|
1937
2646
|
"query",
|
|
1938
2647
|
"method",
|
|
1939
2648
|
"url"
|
|
1940
|
-
],
|
|
1941
|
-
function
|
|
2649
|
+
], ha = /\/api\/v3\/?$/;
|
|
2650
|
+
function ga(e, t, n) {
|
|
1942
2651
|
if (n) {
|
|
1943
2652
|
if (typeof t == "string" && "query" in n) return Promise.reject(/* @__PURE__ */ Error("[@octokit/graphql] \"query\" cannot be used as variable name"));
|
|
1944
|
-
for (let e in n) if (
|
|
2653
|
+
for (let e in n) if (ma.includes(e)) return Promise.reject(/* @__PURE__ */ Error(`[@octokit/graphql] "${e}" cannot be used as variable name`));
|
|
1945
2654
|
}
|
|
1946
|
-
let r = typeof t == "string" ? Object.assign({ query: t }, n) : t, i = Object.keys(r).reduce((e, t) =>
|
|
1947
|
-
return
|
|
2655
|
+
let r = typeof t == "string" ? Object.assign({ query: t }, n) : t, i = Object.keys(r).reduce((e, t) => pa.includes(t) ? (e[t] = r[t], e) : (e.variables ||= {}, e.variables[t] = r[t], e), {}), a = r.baseUrl || e.endpoint.DEFAULTS.baseUrl;
|
|
2656
|
+
return ha.test(a) && (i.url = a.replace(ha, "/api/graphql")), e(i).then((e) => {
|
|
1948
2657
|
if (e.data.errors) {
|
|
1949
2658
|
let t = {};
|
|
1950
2659
|
for (let n of Object.keys(e.headers)) t[n] = e.headers[n];
|
|
1951
|
-
throw new
|
|
2660
|
+
throw new fa(i, t, e.data);
|
|
1952
2661
|
}
|
|
1953
2662
|
return e.data.data;
|
|
1954
2663
|
});
|
|
1955
2664
|
}
|
|
1956
|
-
function
|
|
2665
|
+
function _a(e, t) {
|
|
1957
2666
|
let n = e.defaults(t);
|
|
1958
|
-
return Object.assign((e, t) =>
|
|
1959
|
-
defaults:
|
|
2667
|
+
return Object.assign((e, t) => ga(n, e, t), {
|
|
2668
|
+
defaults: _a.bind(null, n),
|
|
1960
2669
|
endpoint: n.endpoint
|
|
1961
2670
|
});
|
|
1962
2671
|
}
|
|
1963
|
-
|
|
1964
|
-
headers: { "user-agent": `octokit-graphql.js/${
|
|
2672
|
+
_a(la, {
|
|
2673
|
+
headers: { "user-agent": `octokit-graphql.js/${ua} ${ti()}` },
|
|
1965
2674
|
method: "POST",
|
|
1966
2675
|
url: "/graphql"
|
|
1967
2676
|
});
|
|
1968
|
-
function
|
|
1969
|
-
return
|
|
2677
|
+
function va(e) {
|
|
2678
|
+
return _a(e, {
|
|
1970
2679
|
method: "POST",
|
|
1971
2680
|
url: "/graphql"
|
|
1972
2681
|
});
|
|
1973
2682
|
}
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
2683
|
+
//#endregion
|
|
2684
|
+
//#region ../../node_modules/.pnpm/@octokit+auth-token@6.0.0/node_modules/@octokit/auth-token/dist-bundle/index.js
|
|
2685
|
+
var ya = "(?:[a-zA-Z0-9_-]+)", ba = "\\.", xa = RegExp(`^${ya}${ba}${ya}${ba}${ya}$`), Sa = xa.test.bind(xa);
|
|
2686
|
+
async function Ca(e) {
|
|
2687
|
+
let t = Sa(e), n = e.startsWith("v1.") || e.startsWith("ghs_"), r = e.startsWith("ghu_");
|
|
1977
2688
|
return {
|
|
1978
2689
|
type: "token",
|
|
1979
2690
|
token: e,
|
|
1980
2691
|
tokenType: t ? "app" : n ? "installation" : r ? "user-to-server" : "oauth"
|
|
1981
2692
|
};
|
|
1982
2693
|
}
|
|
1983
|
-
function
|
|
2694
|
+
function wa(e) {
|
|
1984
2695
|
return e.split(/\./).length === 3 ? `bearer ${e}` : `token ${e}`;
|
|
1985
2696
|
}
|
|
1986
|
-
async function
|
|
2697
|
+
async function Ta(e, t, n, r) {
|
|
1987
2698
|
let i = t.endpoint.merge(n, r);
|
|
1988
|
-
return i.headers.authorization =
|
|
2699
|
+
return i.headers.authorization = wa(e), t(i);
|
|
1989
2700
|
}
|
|
1990
|
-
var
|
|
2701
|
+
var Ea = function(e) {
|
|
1991
2702
|
if (!e) throw Error("[@octokit/auth-token] No token passed to createTokenAuth");
|
|
1992
2703
|
if (typeof e != "string") throw Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
|
|
1993
|
-
return e = e.replace(/^(token|bearer) +/i, ""), Object.assign(
|
|
1994
|
-
},
|
|
1995
|
-
function
|
|
1996
|
-
return typeof e.debug != "function" && (e.debug =
|
|
2704
|
+
return e = e.replace(/^(token|bearer) +/i, ""), Object.assign(Ca.bind(null, e), { hook: Ta.bind(null, e) });
|
|
2705
|
+
}, Da = "7.0.6", Oa = () => {}, ka = console.warn.bind(console), Aa = console.error.bind(console);
|
|
2706
|
+
function ja(e = {}) {
|
|
2707
|
+
return typeof e.debug != "function" && (e.debug = Oa), typeof e.info != "function" && (e.info = Oa), typeof e.warn != "function" && (e.warn = ka), typeof e.error != "function" && (e.error = Aa), e;
|
|
1997
2708
|
}
|
|
1998
|
-
var
|
|
1999
|
-
static VERSION =
|
|
2709
|
+
var Ma = `octokit-core.js/${Da} ${ti()}`, Na = class {
|
|
2710
|
+
static VERSION = Da;
|
|
2000
2711
|
static defaults(e) {
|
|
2001
2712
|
return class extends this {
|
|
2002
2713
|
constructor(...t) {
|
|
@@ -2010,12 +2721,6 @@ var cr = `octokit-core.js/${rr} ${qt()}`, lr = class {
|
|
|
2010
2721
|
};
|
|
2011
2722
|
}
|
|
2012
2723
|
static plugins = [];
|
|
2013
|
-
/**
|
|
2014
|
-
* Attach a plugin (or many) to your Octokit instance.
|
|
2015
|
-
*
|
|
2016
|
-
* @example
|
|
2017
|
-
* const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
|
|
2018
|
-
*/
|
|
2019
2724
|
static plugin(...e) {
|
|
2020
2725
|
let t = this.plugins;
|
|
2021
2726
|
return class extends this {
|
|
@@ -2023,8 +2728,8 @@ var cr = `octokit-core.js/${rr} ${qt()}`, lr = class {
|
|
|
2023
2728
|
};
|
|
2024
2729
|
}
|
|
2025
2730
|
constructor(e = {}) {
|
|
2026
|
-
let t = new
|
|
2027
|
-
baseUrl:
|
|
2731
|
+
let t = new ui.Collection(), n = {
|
|
2732
|
+
baseUrl: la.endpoint.DEFAULTS.baseUrl,
|
|
2028
2733
|
headers: {},
|
|
2029
2734
|
request: Object.assign({}, e.request, { hook: t.bind(null, "request") }),
|
|
2030
2735
|
mediaType: {
|
|
@@ -2032,7 +2737,7 @@ var cr = `octokit-core.js/${rr} ${qt()}`, lr = class {
|
|
|
2032
2737
|
format: ""
|
|
2033
2738
|
}
|
|
2034
2739
|
};
|
|
2035
|
-
if (n.headers["user-agent"] = e.userAgent ? `${e.userAgent} ${
|
|
2740
|
+
if (n.headers["user-agent"] = e.userAgent ? `${e.userAgent} ${Ma}` : Ma, e.baseUrl && (n.baseUrl = e.baseUrl), e.previews && (n.mediaType.previews = e.previews), e.timeZone && (n.headers["time-zone"] = e.timeZone), this.request = la.defaults(n), this.graphql = va(this.request).defaults(n), this.log = ja(e.log), this.hook = t, e.authStrategy) {
|
|
2036
2741
|
let { authStrategy: n, ...r } = e, i = n(Object.assign({
|
|
2037
2742
|
request: this.request,
|
|
2038
2743
|
log: this.log,
|
|
@@ -2042,7 +2747,7 @@ var cr = `octokit-core.js/${rr} ${qt()}`, lr = class {
|
|
|
2042
2747
|
t.wrap("request", i.hook), this.auth = i;
|
|
2043
2748
|
} else if (!e.auth) this.auth = async () => ({ type: "unauthenticated" });
|
|
2044
2749
|
else {
|
|
2045
|
-
let n =
|
|
2750
|
+
let n = Ea(e.auth);
|
|
2046
2751
|
t.wrap("request", n.hook), this.auth = n;
|
|
2047
2752
|
}
|
|
2048
2753
|
let r = this.constructor;
|
|
@@ -2053,8 +2758,10 @@ var cr = `octokit-core.js/${rr} ${qt()}`, lr = class {
|
|
|
2053
2758
|
log;
|
|
2054
2759
|
hook;
|
|
2055
2760
|
auth;
|
|
2056
|
-
},
|
|
2057
|
-
|
|
2761
|
+
}, Pa = "6.0.0";
|
|
2762
|
+
//#endregion
|
|
2763
|
+
//#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 Fa(e) {
|
|
2058
2765
|
e.hook.wrap("request", (t, n) => {
|
|
2059
2766
|
e.log.debug("request", n);
|
|
2060
2767
|
let r = Date.now(), i = e.request.endpoint.parse(n), a = i.url.replace(n.baseUrl, "");
|
|
@@ -2067,9 +2774,11 @@ function dr(e) {
|
|
|
2067
2774
|
});
|
|
2068
2775
|
});
|
|
2069
2776
|
}
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2777
|
+
Fa.VERSION = Pa;
|
|
2778
|
+
//#endregion
|
|
2779
|
+
//#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 Ia = "0.0.0-development";
|
|
2781
|
+
function La(e) {
|
|
2073
2782
|
if (!e.data) return {
|
|
2074
2783
|
...e,
|
|
2075
2784
|
data: []
|
|
@@ -2080,12 +2789,12 @@ function pr(e) {
|
|
|
2080
2789
|
let a = Object.keys(e.data)[0];
|
|
2081
2790
|
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;
|
|
2082
2791
|
}
|
|
2083
|
-
function
|
|
2792
|
+
function Ra(e, t, n) {
|
|
2084
2793
|
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;
|
|
2085
2794
|
return { [Symbol.asyncIterator]: () => ({ async next() {
|
|
2086
2795
|
if (!s) return { done: !0 };
|
|
2087
2796
|
try {
|
|
2088
|
-
let e =
|
|
2797
|
+
let e = La(await i({
|
|
2089
2798
|
method: a,
|
|
2090
2799
|
url: s,
|
|
2091
2800
|
headers: o
|
|
@@ -2105,25 +2814,27 @@ function mr(e, t, n) {
|
|
|
2105
2814
|
}
|
|
2106
2815
|
} }) };
|
|
2107
2816
|
}
|
|
2108
|
-
function
|
|
2109
|
-
return typeof n == "function" && (r = n, n = void 0),
|
|
2817
|
+
function za(e, t, n, r) {
|
|
2818
|
+
return typeof n == "function" && (r = n, n = void 0), Ba(e, [], Ra(e, t, n)[Symbol.asyncIterator](), r);
|
|
2110
2819
|
}
|
|
2111
|
-
function
|
|
2820
|
+
function Ba(e, t, n, r) {
|
|
2112
2821
|
return n.next().then((i) => {
|
|
2113
2822
|
if (i.done) return t;
|
|
2114
2823
|
let a = !1;
|
|
2115
2824
|
function o() {
|
|
2116
2825
|
a = !0;
|
|
2117
2826
|
}
|
|
2118
|
-
return t = t.concat(r ? r(i.value, o) : i.value.data), a ? t :
|
|
2827
|
+
return t = t.concat(r ? r(i.value, o) : i.value.data), a ? t : Ba(e, t, n, r);
|
|
2119
2828
|
});
|
|
2120
2829
|
}
|
|
2121
|
-
Object.assign(
|
|
2122
|
-
function
|
|
2123
|
-
return { paginate: Object.assign(
|
|
2830
|
+
Object.assign(za, { iterator: Ra });
|
|
2831
|
+
function Va(e) {
|
|
2832
|
+
return { paginate: Object.assign(za.bind(null, e), { iterator: Ra.bind(null, e) }) };
|
|
2124
2833
|
}
|
|
2125
|
-
|
|
2126
|
-
|
|
2834
|
+
Va.VERSION = Ia;
|
|
2835
|
+
//#endregion
|
|
2836
|
+
//#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 Ha = "17.0.0", Ua = {
|
|
2127
2838
|
actions: {
|
|
2128
2839
|
addCustomLabelsToSelfHostedRunnerForOrg: ["POST /orgs/{org}/actions/runners/{runner_id}/labels"],
|
|
2129
2840
|
addCustomLabelsToSelfHostedRunnerForRepo: ["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],
|
|
@@ -3414,22 +4125,22 @@ var vr = "17.0.0", yr = {
|
|
|
3414
4125
|
unfollow: ["DELETE /user/following/{username}"],
|
|
3415
4126
|
updateAuthenticated: ["PATCH /user"]
|
|
3416
4127
|
}
|
|
3417
|
-
},
|
|
3418
|
-
for (let [e, t] of Object.entries(
|
|
4128
|
+
}, Wa = /* @__PURE__ */ new Map();
|
|
4129
|
+
for (let [e, t] of Object.entries(Ua)) for (let [n, r] of Object.entries(t)) {
|
|
3419
4130
|
let [t, i, a] = r, [o, s] = t.split(/ /), c = Object.assign({
|
|
3420
4131
|
method: o,
|
|
3421
4132
|
url: s
|
|
3422
4133
|
}, i);
|
|
3423
|
-
|
|
4134
|
+
Wa.has(e) || Wa.set(e, /* @__PURE__ */ new Map()), Wa.get(e).set(n, {
|
|
3424
4135
|
scope: e,
|
|
3425
4136
|
methodName: n,
|
|
3426
4137
|
endpointDefaults: c,
|
|
3427
4138
|
decorations: a
|
|
3428
4139
|
});
|
|
3429
4140
|
}
|
|
3430
|
-
var
|
|
4141
|
+
var Ga = {
|
|
3431
4142
|
has({ scope: e }, t) {
|
|
3432
|
-
return
|
|
4143
|
+
return Wa.get(e).has(t);
|
|
3433
4144
|
},
|
|
3434
4145
|
getOwnPropertyDescriptor(e, t) {
|
|
3435
4146
|
return {
|
|
@@ -3446,29 +4157,29 @@ var br = {
|
|
|
3446
4157
|
return delete e.cache[t], !0;
|
|
3447
4158
|
},
|
|
3448
4159
|
ownKeys({ scope: e }) {
|
|
3449
|
-
return [
|
|
4160
|
+
return [...Wa.get(e).keys()];
|
|
3450
4161
|
},
|
|
3451
4162
|
set(e, t, n) {
|
|
3452
4163
|
return e.cache[t] = n;
|
|
3453
4164
|
},
|
|
3454
4165
|
get({ octokit: e, scope: t, cache: n }, r) {
|
|
3455
4166
|
if (n[r]) return n[r];
|
|
3456
|
-
let i =
|
|
4167
|
+
let i = Wa.get(t).get(r);
|
|
3457
4168
|
if (!i) return;
|
|
3458
4169
|
let { endpointDefaults: a, decorations: o } = i;
|
|
3459
|
-
return o ? n[r] =
|
|
4170
|
+
return o ? n[r] = qa(e, t, r, a, o) : n[r] = e.request.defaults(a), n[r];
|
|
3460
4171
|
}
|
|
3461
4172
|
};
|
|
3462
|
-
function
|
|
4173
|
+
function Ka(e) {
|
|
3463
4174
|
let t = {};
|
|
3464
|
-
for (let n of
|
|
4175
|
+
for (let n of Wa.keys()) t[n] = new Proxy({
|
|
3465
4176
|
octokit: e,
|
|
3466
4177
|
scope: n,
|
|
3467
4178
|
cache: {}
|
|
3468
|
-
},
|
|
4179
|
+
}, Ga);
|
|
3469
4180
|
return t;
|
|
3470
4181
|
}
|
|
3471
|
-
function
|
|
4182
|
+
function qa(e, t, n, r, i) {
|
|
3472
4183
|
let a = e.request.defaults(r);
|
|
3473
4184
|
function o(...r) {
|
|
3474
4185
|
let o = a.endpoint.merge(...r);
|
|
@@ -3489,19 +4200,23 @@ function Sr(e, t, n, r, i) {
|
|
|
3489
4200
|
}
|
|
3490
4201
|
return Object.assign(o, a);
|
|
3491
4202
|
}
|
|
3492
|
-
|
|
3493
|
-
|
|
4203
|
+
//#endregion
|
|
4204
|
+
//#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 Ja(e) {
|
|
4206
|
+
return { rest: Ka(e) };
|
|
3494
4207
|
}
|
|
3495
|
-
|
|
3496
|
-
function
|
|
3497
|
-
let t =
|
|
4208
|
+
Ja.VERSION = Ha;
|
|
4209
|
+
function Ya(e) {
|
|
4210
|
+
let t = Ka(e);
|
|
3498
4211
|
return {
|
|
3499
4212
|
...t,
|
|
3500
4213
|
rest: t
|
|
3501
4214
|
};
|
|
3502
4215
|
}
|
|
3503
|
-
|
|
3504
|
-
|
|
4216
|
+
Ya.VERSION = Ha;
|
|
4217
|
+
//#endregion
|
|
4218
|
+
//#region ../../node_modules/.pnpm/@octokit+rest@22.0.1/node_modules/@octokit/rest/dist-src/index.js
|
|
4219
|
+
var Xa = Na.plugin(Fa, Ya, Va).defaults({ userAgent: "octokit-rest.js/22.0.1" }), Za = new class extends Fe {
|
|
3505
4220
|
description = {
|
|
3506
4221
|
title: "通过Github安装插件",
|
|
3507
4222
|
description: "输入形如: \"gh:owner/repo\"的内容"
|
|
@@ -3509,23 +4224,24 @@ var Tr = lr.plugin(dr, wr, _r).defaults({ userAgent: "octokit-rest.js/22.0.1" })
|
|
|
3509
4224
|
name = "github";
|
|
3510
4225
|
async installer(e) {
|
|
3511
4226
|
try {
|
|
3512
|
-
var t =
|
|
4227
|
+
var t = c().$load(n).value.githubToken;
|
|
3513
4228
|
} catch (e) {
|
|
3514
4229
|
console.error("fail to get github token", e);
|
|
3515
4230
|
var t = "";
|
|
3516
4231
|
}
|
|
3517
|
-
let
|
|
3518
|
-
owner:
|
|
3519
|
-
repo:
|
|
3520
|
-
}),
|
|
3521
|
-
if (!
|
|
3522
|
-
let { data:
|
|
3523
|
-
url:
|
|
3524
|
-
responseType: "blob"
|
|
4232
|
+
let r = new Xa({ auth: we(t) ? void 0 : t }), [i, a] = e.replace(/^gh:/, "").split("/"), { data: o } = await r.rest.repos.getLatestRelease({
|
|
4233
|
+
owner: i,
|
|
4234
|
+
repo: a
|
|
4235
|
+
}), s = o.assets[0];
|
|
4236
|
+
if (!s) throw Error("未找到资源");
|
|
4237
|
+
let { data: l } = await $.request({
|
|
4238
|
+
url: s.browser_download_url,
|
|
4239
|
+
responseType: "blob",
|
|
4240
|
+
timeout: 1e3 * 60 * 5
|
|
3525
4241
|
});
|
|
3526
|
-
return new File([
|
|
4242
|
+
return new File([l], s.name);
|
|
3527
4243
|
}
|
|
3528
|
-
async
|
|
4244
|
+
async download(e) {
|
|
3529
4245
|
return await this.installer(e);
|
|
3530
4246
|
}
|
|
3531
4247
|
async update(e) {
|
|
@@ -3534,17 +4250,17 @@ var Tr = lr.plugin(dr, wr, _r).defaults({ userAgent: "octokit-rest.js/22.0.1" })
|
|
|
3534
4250
|
isMatched(e) {
|
|
3535
4251
|
return e.startsWith("gh:") && e.split("/").length === 2;
|
|
3536
4252
|
}
|
|
3537
|
-
}(),
|
|
4253
|
+
}(), Qa = "https://raw.githubusercontent.com/delta-comic/awesome-plugins/refs/heads/main/pages", $a = new class extends Fe {
|
|
3538
4254
|
description = {
|
|
3539
4255
|
title: "快速安装插件",
|
|
3540
4256
|
description: "输入形如: \"ap:jmcomic\"的内容"
|
|
3541
4257
|
};
|
|
3542
4258
|
name = "awesome";
|
|
3543
4259
|
async installer(e) {
|
|
3544
|
-
let t = e.replace(/^ap:/, ""), { data: n } = await
|
|
4260
|
+
let t = e.replace(/^ap:/, ""), { data: n } = await $.get(`${Qa}/${t}.json`, { responseType: "json" });
|
|
3545
4261
|
return n.download;
|
|
3546
4262
|
}
|
|
3547
|
-
async
|
|
4263
|
+
async download(e) {
|
|
3548
4264
|
return await this.installer(e);
|
|
3549
4265
|
}
|
|
3550
4266
|
async update(e) {
|
|
@@ -3553,7 +4269,7 @@ var Tr = lr.plugin(dr, wr, _r).defaults({ userAgent: "octokit-rest.js/22.0.1" })
|
|
|
3553
4269
|
isMatched(e) {
|
|
3554
4270
|
return /^ap:[A-Za-z0-9\-\_]+$/.test(e);
|
|
3555
4271
|
}
|
|
3556
|
-
}(),
|
|
4272
|
+
}(), eo = (/* @__PURE__ */ o(((e) => {
|
|
3557
4273
|
function t(e) {
|
|
3558
4274
|
return e === void 0;
|
|
3559
4275
|
}
|
|
@@ -3567,47 +4283,50 @@ var Tr = lr.plugin(dr, wr, _r).defaults({ userAgent: "octokit-rest.js/22.0.1" })
|
|
|
3567
4283
|
}, {});
|
|
3568
4284
|
}
|
|
3569
4285
|
e.parse = n;
|
|
3570
|
-
})))(),
|
|
4286
|
+
})))(), to = new class extends Ie {
|
|
3571
4287
|
name = "userscript";
|
|
3572
|
-
async
|
|
3573
|
-
let t = await e.text(), n =
|
|
3574
|
-
return await
|
|
4288
|
+
async install(e) {
|
|
4289
|
+
let t = await e.text(), n = h((0, eo.parse)(t)), r = await Pe(n.name.id);
|
|
4290
|
+
return await Kr(r, { recursive: !0 }), await Qr(await Me(r, "us.js"), t, { create: !0 }), n;
|
|
3575
4291
|
}
|
|
3576
4292
|
canInstall(e) {
|
|
3577
4293
|
return e.name.endsWith(".js");
|
|
3578
4294
|
}
|
|
3579
4295
|
async load(e) {
|
|
3580
|
-
let t = await
|
|
4296
|
+
let t = await Yr(await Me(await Pe(e.pluginName), "us.js")), n = t.lastIndexOf(";") + 1, r = new Blob([t.slice(0, n)], { type: "text/javascript" }), i = URL.createObjectURL(r), a = document.createElement("script");
|
|
3581
4297
|
a.addEventListener("load", () => {
|
|
3582
4298
|
URL.revokeObjectURL(i);
|
|
3583
4299
|
}), a.addEventListener("error", (e) => {
|
|
3584
4300
|
throw URL.revokeObjectURL(i), e;
|
|
3585
4301
|
}), a.async = !0, a.src = i, document.body.appendChild(a);
|
|
3586
4302
|
}
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
4303
|
+
async decodeMeta(e) {
|
|
4304
|
+
return h((0, eo.parse)(await e.text()));
|
|
4305
|
+
}
|
|
4306
|
+
}(), no = (/* @__PURE__ */ o(((t, n) => {
|
|
4307
|
+
(function(e) {
|
|
4308
|
+
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();
|
|
3590
4309
|
})(function() {
|
|
3591
|
-
return function
|
|
3592
|
-
function
|
|
3593
|
-
if (!
|
|
3594
|
-
if (!
|
|
3595
|
-
var
|
|
3596
|
-
if (!
|
|
3597
|
-
if (
|
|
3598
|
-
var
|
|
3599
|
-
throw
|
|
4310
|
+
return function t(n, r, i) {
|
|
4311
|
+
function a(s, c) {
|
|
4312
|
+
if (!r[s]) {
|
|
4313
|
+
if (!n[s]) {
|
|
4314
|
+
var l = typeof e == "function" && e;
|
|
4315
|
+
if (!c && l) return l(s, !0);
|
|
4316
|
+
if (o) return o(s, !0);
|
|
4317
|
+
var u = /* @__PURE__ */ Error("Cannot find module '" + s + "'");
|
|
4318
|
+
throw u.code = "MODULE_NOT_FOUND", u;
|
|
3600
4319
|
}
|
|
3601
|
-
var
|
|
3602
|
-
|
|
3603
|
-
var
|
|
3604
|
-
return
|
|
3605
|
-
},
|
|
4320
|
+
var d = r[s] = { exports: {} };
|
|
4321
|
+
n[s][0].call(d.exports, function(e) {
|
|
4322
|
+
var t = n[s][1][e];
|
|
4323
|
+
return a(t || e);
|
|
4324
|
+
}, d, d.exports, t, n, r, i);
|
|
3606
4325
|
}
|
|
3607
|
-
return
|
|
4326
|
+
return r[s].exports;
|
|
3608
4327
|
}
|
|
3609
|
-
for (var
|
|
3610
|
-
return
|
|
4328
|
+
for (var o = typeof e == "function" && e, s = 0; s < i.length; s++) a(i[s]);
|
|
4329
|
+
return a;
|
|
3611
4330
|
}({
|
|
3612
4331
|
1: [function(e, t, n) {
|
|
3613
4332
|
var r = e("./utils"), i = e("./support"), a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
@@ -5463,26 +6182,26 @@ while (l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] ===
|
|
|
5463
6182
|
function U(e, t, n, r, i) {
|
|
5464
6183
|
this.good_length = e, this.max_lazy = t, this.nice_length = n, this.max_chain = r, this.func = i;
|
|
5465
6184
|
}
|
|
5466
|
-
function
|
|
6185
|
+
function ee() {
|
|
5467
6186
|
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;
|
|
5468
6187
|
}
|
|
5469
|
-
function
|
|
6188
|
+
function te(e) {
|
|
5470
6189
|
var t;
|
|
5471
6190
|
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);
|
|
5472
6191
|
}
|
|
5473
|
-
function
|
|
5474
|
-
var t =
|
|
6192
|
+
function ne(e) {
|
|
6193
|
+
var t = te(e);
|
|
5475
6194
|
return t === d && function(e) {
|
|
5476
6195
|
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;
|
|
5477
6196
|
}(e.state), t;
|
|
5478
6197
|
}
|
|
5479
|
-
function
|
|
6198
|
+
function re(e, t, n, r, a, o) {
|
|
5480
6199
|
if (!e) return f;
|
|
5481
6200
|
var s = 1;
|
|
5482
6201
|
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);
|
|
5483
6202
|
r === 8 && (r = 9);
|
|
5484
|
-
var c = new
|
|
5485
|
-
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,
|
|
6203
|
+
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, ne(e);
|
|
5486
6205
|
}
|
|
5487
6206
|
r = [
|
|
5488
6207
|
new U(0, 0, 0, 0, function(e, t) {
|
|
@@ -5508,8 +6227,8 @@ while (l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] ===
|
|
|
5508
6227
|
new U(32, 128, 258, 1024, H),
|
|
5509
6228
|
new U(32, 258, 258, 4096, H)
|
|
5510
6229
|
], n.deflateInit = function(e, t) {
|
|
5511
|
-
return
|
|
5512
|
-
}, n.deflateInit2 =
|
|
6230
|
+
return re(e, t, g, 15, 8, 0);
|
|
6231
|
+
}, n.deflateInit2 = re, n.deflateReset = ne, n.deflateResetKeep = te, n.deflateSetHeader = function(e, t) {
|
|
5513
6232
|
return e && e.state && e.state.wrap === 2 ? (e.state.gzhead = t, d) : f;
|
|
5514
6233
|
}, n.deflate = function(e, t) {
|
|
5515
6234
|
var n, i, o, c;
|
|
@@ -6437,25 +7156,25 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6437
7156
|
function U(e) {
|
|
6438
7157
|
8 < e.bi_valid ? L(e, e.bi_buf) : 0 < e.bi_valid && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
|
|
6439
7158
|
}
|
|
6440
|
-
function
|
|
7159
|
+
function ee(e, t, n, r) {
|
|
6441
7160
|
var i = 2 * t, a = 2 * n;
|
|
6442
7161
|
return e[i] < e[a] || e[i] === e[a] && r[t] <= r[n];
|
|
6443
7162
|
}
|
|
6444
|
-
function
|
|
6445
|
-
for (var r = e.heap[n], i = n << 1; i <= e.heap_len && (i < e.heap_len &&
|
|
7163
|
+
function te(e, t, n) {
|
|
7164
|
+
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;
|
|
6446
7165
|
e.heap[n] = r;
|
|
6447
7166
|
}
|
|
6448
|
-
function
|
|
7167
|
+
function ne(e, t, n) {
|
|
6449
7168
|
var r, i, a, o, s = 0;
|
|
6450
7169
|
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;);
|
|
6451
7170
|
z(e, _, t);
|
|
6452
7171
|
}
|
|
6453
|
-
function
|
|
7172
|
+
function re(e, t) {
|
|
6454
7173
|
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;
|
|
6455
7174
|
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);
|
|
6456
7175
|
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]);
|
|
6457
|
-
for (t.max_code = l, n = e.heap_len >> 1; 1 <= n; n--)
|
|
6458
|
-
for (i = c; n = e.heap[1], e.heap[1] = e.heap[e.heap_len--],
|
|
7176
|
+
for (t.max_code = l, n = e.heap_len >> 1; 1 <= n; n--) te(e, a, n);
|
|
7177
|
+
for (i = c; n = e.heap[1], e.heap[1] = e.heap[e.heap_len--], te(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++, te(e, a, 1), 2 <= e.heap_len;);
|
|
6459
7178
|
e.heap[--e.heap_max] = e.heap[1], function(e, t) {
|
|
6460
7179
|
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;
|
|
6461
7180
|
for (a = 0; a <= m; a++) e.bl_count[a] = 0;
|
|
@@ -6469,11 +7188,11 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6469
7188
|
}
|
|
6470
7189
|
}(e, t), V(a, l, e.bl_count);
|
|
6471
7190
|
}
|
|
6472
|
-
function
|
|
7191
|
+
function ie(e, t, n) {
|
|
6473
7192
|
var r, i, a = -1, o = t[1], s = 0, c = 7, l = 4;
|
|
6474
7193
|
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));
|
|
6475
7194
|
}
|
|
6476
|
-
function
|
|
7195
|
+
function ae(e, t, n) {
|
|
6477
7196
|
var r, i, a = -1, o = t[1], s = 0, c = 7, l = 4;
|
|
6478
7197
|
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)) {
|
|
6479
7198
|
if (s < l) for (; z(e, i, e.bl_tree), --s != 0;);
|
|
@@ -6482,14 +7201,14 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6482
7201
|
}
|
|
6483
7202
|
}
|
|
6484
7203
|
o(N);
|
|
6485
|
-
var
|
|
6486
|
-
function
|
|
7204
|
+
var oe = !1;
|
|
7205
|
+
function se(e, t, n, i) {
|
|
6487
7206
|
R(e, (s << 1) + (i ? 1 : 0), 3), function(e, t, n, i) {
|
|
6488
7207
|
U(e), i && (L(e, n), L(e, ~n)), r.arraySet(e.pending_buf, e.window, t, n, e.pending), e.pending += n;
|
|
6489
7208
|
}(e, t, n, !0);
|
|
6490
7209
|
}
|
|
6491
7210
|
n._tr_init = function(e) {
|
|
6492
|
-
|
|
7211
|
+
oe ||= (function() {
|
|
6493
7212
|
var e, t, n, r, i, a = Array(m + 1);
|
|
6494
7213
|
for (r = n = 0; r < c - 1; r++) for (k[r] = n, e = 0; e < 1 << x[r]; e++) O[n++] = r;
|
|
6495
7214
|
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;
|
|
@@ -6502,7 +7221,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6502
7221
|
for (V(T, u + 1, a), e = 0; e < d; e++) E[2 * e + 1] = 5, E[2 * e] = B(e, 5);
|
|
6503
7222
|
A = new P(T, x, l + 1, u, m), j = new P(E, S, 0, d, m), M = new P([], C, 0, f, g);
|
|
6504
7223
|
}(), !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);
|
|
6505
|
-
}, n._tr_stored_block =
|
|
7224
|
+
}, n._tr_stored_block = se, n._tr_flush_block = function(e, t, n, r) {
|
|
6506
7225
|
var o, s, c = 0;
|
|
6507
7226
|
0 < e.level ? (e.strm.data_type === 2 && (e.strm.data_type = function(e) {
|
|
6508
7227
|
var t, n = 4093624447;
|
|
@@ -6510,15 +7229,15 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6510
7229
|
if (e.dyn_ltree[18] !== 0 || e.dyn_ltree[20] !== 0 || e.dyn_ltree[26] !== 0) return a;
|
|
6511
7230
|
for (t = 32; t < l; t++) if (e.dyn_ltree[2 * t] !== 0) return a;
|
|
6512
7231
|
return i;
|
|
6513
|
-
}(e)),
|
|
7232
|
+
}(e)), re(e, e.l_desc), re(e, e.d_desc), c = function(e) {
|
|
6514
7233
|
var t;
|
|
6515
|
-
for (
|
|
7234
|
+
for (ie(e, e.dyn_ltree, e.l_desc.max_code), ie(e, e.dyn_dtree, e.d_desc.max_code), re(e, e.bl_desc), t = f - 1; 3 <= t && e.bl_tree[2 * w[t] + 1] === 0; t--);
|
|
6516
7235
|
return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
|
|
6517
|
-
}(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 ?
|
|
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 ? se(e, t, n, r) : e.strategy === 4 || s === o ? (R(e, 2 + (r ? 1 : 0), 3), ne(e, T, E)) : (R(e, 4 + (r ? 1 : 0), 3), function(e, t, n, r) {
|
|
6518
7237
|
var i;
|
|
6519
7238
|
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);
|
|
6520
|
-
|
|
6521
|
-
}(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, c + 1),
|
|
7239
|
+
ae(e, e.dyn_ltree, t - 1), ae(e, e.dyn_dtree, n - 1);
|
|
7240
|
+
}(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, c + 1), ne(e, e.dyn_ltree, e.dyn_dtree)), H(e), r && U(e);
|
|
6522
7241
|
}, n._tr_tally = function(e, t, n) {
|
|
6523
7242
|
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;
|
|
6524
7243
|
}, n._tr_align = function(e) {
|
|
@@ -6612,19 +7331,19 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6612
7331
|
}, {}]
|
|
6613
7332
|
}, {}, [10])(10);
|
|
6614
7333
|
});
|
|
6615
|
-
})))(),
|
|
7334
|
+
})))(), ro = new class extends Ie {
|
|
6616
7335
|
name = "zip";
|
|
6617
|
-
async
|
|
7336
|
+
async install(e) {
|
|
6618
7337
|
console.log("[loader zip] begin:", e);
|
|
6619
|
-
let t = await
|
|
6620
|
-
await
|
|
6621
|
-
let n = await (0,
|
|
7338
|
+
let t = await Pe("__temp__");
|
|
7339
|
+
await Kr(t, { recursive: !0 }), await Zr(await Me(t, "temp.zip"), new Uint8Array(await e.arrayBuffer())), console.log("[loader zip] temp:", t);
|
|
7340
|
+
let n = await (0, no.loadAsync)(e);
|
|
6622
7341
|
console.log(n.files);
|
|
6623
|
-
let r = JSON.parse(await n.file("manifest.json")?.async("string") ?? "{}"), i = await
|
|
7342
|
+
let r = JSON.parse(await n.file("manifest.json")?.async("string") ?? "{}"), i = await Pe(r.name.id);
|
|
6624
7343
|
try {
|
|
6625
|
-
await
|
|
7344
|
+
await Xr(i, { recursive: !0 });
|
|
6626
7345
|
} catch {}
|
|
6627
|
-
await
|
|
7346
|
+
await Kr(i, { recursive: !0 });
|
|
6628
7347
|
let a = [];
|
|
6629
7348
|
n.forEach((e, t) => {
|
|
6630
7349
|
a.push({
|
|
@@ -6632,7 +7351,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6632
7351
|
file: t
|
|
6633
7352
|
});
|
|
6634
7353
|
});
|
|
6635
|
-
for (let { file: e, path: t } of a) e.dir ? await
|
|
7354
|
+
for (let { file: e, path: t } of a) e.dir ? await Kr(await Me(i, t), { recursive: !0 }) : await Zr(await Me(i, t), await e.async("uint8array"), { create: !0 });
|
|
6636
7355
|
return r;
|
|
6637
7356
|
}
|
|
6638
7357
|
canInstall(e) {
|
|
@@ -6640,16 +7359,16 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6640
7359
|
}
|
|
6641
7360
|
async load(e) {
|
|
6642
7361
|
if (!e.meta.entry) throw Error("not found entry");
|
|
6643
|
-
let t = await
|
|
7362
|
+
let t = await Pe(e.pluginName);
|
|
6644
7363
|
console.log("[loader zip] baseDir:", t, e.meta.entry);
|
|
6645
7364
|
let n = document.createElement("script");
|
|
6646
7365
|
if (n.addEventListener("error", (e) => {
|
|
6647
7366
|
throw e;
|
|
6648
|
-
}), n.type = "module", n.async = !0, n.src = decodeURIComponent(
|
|
7367
|
+
}), n.type = "module", n.async = !0, n.src = decodeURIComponent(Oe(await Me(t, e.meta.entry.jsPath), "local")), document.body.appendChild(n), !e.meta.entry?.cssPath) return;
|
|
6649
7368
|
let r = e.meta.entry.cssPath;
|
|
6650
7369
|
if (r == "auto") {
|
|
6651
7370
|
var i = "";
|
|
6652
|
-
let e = await
|
|
7371
|
+
let e = await qr(t);
|
|
6653
7372
|
for (let t of e) if (t.name.endsWith(".css")) {
|
|
6654
7373
|
var i = t.name;
|
|
6655
7374
|
break;
|
|
@@ -6658,175 +7377,142 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6658
7377
|
let a = document.createElement("link");
|
|
6659
7378
|
a.addEventListener("error", (e) => {
|
|
6660
7379
|
throw e;
|
|
6661
|
-
}), a.rel = "stylesheet", a.href = decodeURIComponent(
|
|
6662
|
-
}
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
7380
|
+
}), a.rel = "stylesheet", a.href = decodeURIComponent(Oe(await Me(t, i), "local")), document.head.appendChild(a);
|
|
7381
|
+
}
|
|
7382
|
+
async decodeMeta(e) {
|
|
7383
|
+
let t = await (0, no.loadAsync)(e);
|
|
7384
|
+
return console.log(t.files), JSON.parse(await t.file("manifest.json")?.async("string") ?? "{}");
|
|
7385
|
+
}
|
|
7386
|
+
}(), io = /* @__PURE__ */ a({
|
|
7387
|
+
loadAllPlugins: () => lo,
|
|
7388
|
+
loadPlugin: () => co,
|
|
7389
|
+
loaders: () => ao
|
|
7390
|
+
}), ao = xe(Object.entries(/* @__PURE__ */ Object.assign({
|
|
7391
|
+
"./init/loader/1_userscript.ts": to,
|
|
7392
|
+
"./init/loader/2_zip.ts": ro
|
|
7393
|
+
})), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]), oo = {}, so = (e) => oo[e] ??= new oe(), co = async (e) => {
|
|
7394
|
+
console.log(`[plugin bootPlugin] booting name "${e.pluginName}"`);
|
|
7395
|
+
let t = so(e.pluginName), n = p();
|
|
7396
|
+
n.pluginSteps[e.pluginName] = {
|
|
6675
7397
|
now: {
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
}
|
|
7398
|
+
status: "wait",
|
|
7399
|
+
stepsIndex: 0
|
|
7400
|
+
},
|
|
7401
|
+
steps: [{
|
|
7402
|
+
name: "等待",
|
|
7403
|
+
description: "插件载入中"
|
|
7404
|
+
}]
|
|
6679
7405
|
};
|
|
6680
7406
|
try {
|
|
6681
|
-
|
|
6682
|
-
for (let r of Pr) {
|
|
6683
|
-
let i = n[e.name].steps.length;
|
|
6684
|
-
n[e.name].steps[i] = {
|
|
6685
|
-
name: r.name,
|
|
6686
|
-
description: ""
|
|
6687
|
-
}, n[e.name].now.stepsIndex = i, n[e.name].now.status = "process", await r.call(e, (t) => {
|
|
6688
|
-
oe(t) ? n[e.name].steps[i].description = t : (t.description && (n[e.name].steps[i].description = t.description), t.name && (n[e.name].steps[i].name = t.name));
|
|
6689
|
-
}, t);
|
|
6690
|
-
}
|
|
6691
|
-
n[e.name].now.stepsIndex++;
|
|
7407
|
+
await t.acquire(), await ao.find((t) => t.name == e.loaderName).load(e), await t.acquire();
|
|
6692
7408
|
} catch (t) {
|
|
6693
|
-
throw n[e.
|
|
7409
|
+
throw n.pluginSteps[e.pluginName].now.status = "error", n.pluginSteps[e.pluginName].now.error = t, t;
|
|
6694
7410
|
}
|
|
6695
|
-
console.log(`[plugin
|
|
7411
|
+
console.log(`[plugin bootPlugin] boot name done "${e.pluginName}"`);
|
|
6696
7412
|
};
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
7413
|
+
i.on("definedPlugin", async (e) => {
|
|
7414
|
+
console.log("[plugin addPlugin] new plugin defined", e.name, e);
|
|
7415
|
+
let t = so(e.name);
|
|
7416
|
+
await Xe(e), console.log("[plugin addPlugin] done", e.name), t.release();
|
|
7417
|
+
});
|
|
7418
|
+
var lo = async () => {
|
|
7419
|
+
let { $initCore: e, coreName: t } = await import("./core-NoooY1bz.js");
|
|
7420
|
+
await e();
|
|
7421
|
+
let n = new Set([t]), r = await _.selectFrom("plugin").where("enable", "is", !0).selectAll().execute(), i = [];
|
|
7422
|
+
for (;;) {
|
|
7423
|
+
let e = r.filter((e) => e.meta.require.every((e) => n.has(e.id)));
|
|
7424
|
+
i.push(e), te(r, (t) => e.includes(t));
|
|
7425
|
+
for (let { pluginName: t } of e) n.add(t);
|
|
7426
|
+
if (we(e)) break;
|
|
7427
|
+
}
|
|
7428
|
+
if (!we(r)) throw Error(`插件循环引用: ${r.map((e) => e.pluginName).join(", ")}`);
|
|
7429
|
+
for (let e of i) await Promise.all(e.map((e) => co(e)));
|
|
7430
|
+
console.log("[plugin bootPlugin] all load done");
|
|
7431
|
+
}, uo = /* @__PURE__ */ a({
|
|
7432
|
+
installDepends: () => mo,
|
|
7433
|
+
installFilePlugin: () => _o,
|
|
7434
|
+
installPlugin: () => go,
|
|
7435
|
+
installers: () => fo,
|
|
7436
|
+
updatePlugin: () => vo,
|
|
7437
|
+
usePluginConfig: () => po
|
|
7438
|
+
}), fo = xe(Object.entries(/* @__PURE__ */ Object.assign({
|
|
7439
|
+
"./init/installer/10_normalUrl.ts": Br,
|
|
7440
|
+
"./init/installer/20_local.ts": $r,
|
|
7441
|
+
"./init/installer/30_dev.ts": ei,
|
|
7442
|
+
"./init/installer/40_github.ts": Za,
|
|
7443
|
+
"./init/installer/9999_awesome.ts": $a
|
|
7444
|
+
})), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]).reverse(), po = () => v(u, "pluginInstallSourceOverrides", []), mo = (e, t, n) => e.createLoading("依赖安装/检查", async (e) => {
|
|
6705
7445
|
e.retryable = !0;
|
|
6706
|
-
let
|
|
6707
|
-
for (let { id: n, download:
|
|
6708
|
-
e.description = `安装完成,共${
|
|
6709
|
-
}),
|
|
6710
|
-
let
|
|
7446
|
+
let r = 0, i = n ?? new Set((await _.selectFrom("plugin").select("pluginName").execute()).map((e) => e.pluginName)), a = po();
|
|
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 go(a.value.find((e) => e.id == n && e.enabled)?.install ?? o), r++);
|
|
7448
|
+
e.description = `安装完成,共${r}个`;
|
|
7449
|
+
}), ho = async (e, t, n, r, i) => {
|
|
7450
|
+
let a = await e.createLoading("安装插件", async (e) => {
|
|
7451
|
+
e.retryable = !0;
|
|
7452
|
+
let i = ao.filter((e) => e.canInstall(t)).at(-1);
|
|
7453
|
+
if (!i) throw Error("没有符合的安装器");
|
|
7454
|
+
e.description = i.name;
|
|
7455
|
+
let a = await i.install(t);
|
|
7456
|
+
e.description = "写入数据库";
|
|
7457
|
+
let { upsert: o } = g.useUpsert();
|
|
7458
|
+
return await o({ archives: [{
|
|
7459
|
+
displayName: a.name.display,
|
|
7460
|
+
enable: !0,
|
|
7461
|
+
installerName: n,
|
|
7462
|
+
installInput: r,
|
|
7463
|
+
loaderName: i.name,
|
|
7464
|
+
meta: a,
|
|
7465
|
+
pluginName: a.name.id
|
|
7466
|
+
}] }), a;
|
|
7467
|
+
});
|
|
7468
|
+
console.log(`安装插件成功: ${a.name.id} ->`, a), await mo(e, a, i);
|
|
7469
|
+
}, go = (e, t) => V(`下载插件-${e}`, async (n) => {
|
|
7470
|
+
let [r, i] = await n.createLoading("下载", async (t) => {
|
|
6711
7471
|
t.retryable = !0;
|
|
6712
7472
|
let n = e;
|
|
6713
7473
|
for (;;) {
|
|
6714
|
-
let e =
|
|
7474
|
+
let e = fo.filter((e) => e.isMatched(n)).at(0);
|
|
6715
7475
|
if (!e) throw Error("没有符合的下载器:" + n);
|
|
6716
7476
|
t.description = e.name;
|
|
6717
|
-
let r = await e.
|
|
6718
|
-
if (
|
|
7477
|
+
let r = await e.download(n);
|
|
7478
|
+
if (l(r)) n = r;
|
|
6719
7479
|
else return [r, e];
|
|
6720
7480
|
}
|
|
6721
|
-
}), o = await n.createLoading("安装插件", async (t) => {
|
|
6722
|
-
t.retryable = !0;
|
|
6723
|
-
let n = Wr.filter((e) => e.canInstall(i)).at(-1);
|
|
6724
|
-
if (!n) throw Error("没有符合的安装器:" + e);
|
|
6725
|
-
t.description = n.name;
|
|
6726
|
-
let o = await n.installDownload(i);
|
|
6727
|
-
return t.description = "写入数据库", await r.value.replaceInto("plugin").values({
|
|
6728
|
-
displayName: o.name.display,
|
|
6729
|
-
enable: !0,
|
|
6730
|
-
installerName: a.name,
|
|
6731
|
-
installInput: e,
|
|
6732
|
-
loaderName: n.name,
|
|
6733
|
-
meta: JSON.stringify(o),
|
|
6734
|
-
pluginName: o.name.id
|
|
6735
|
-
}).execute(), o;
|
|
6736
|
-
});
|
|
6737
|
-
console.log(`安装插件成功: ${o.name.id} ->`, o), await zr(n, o, t);
|
|
6738
|
-
}), Vr = (e, t) => H(`安装插件-${e.name}`, async (n) => {
|
|
6739
|
-
let i = await n.createLoading("安装插件", async (t) => {
|
|
6740
|
-
t.retryable = !0;
|
|
6741
|
-
let n = Wr.filter((t) => t.canInstall(e)).at(-1);
|
|
6742
|
-
if (!n) throw Error("没有符合的安装器");
|
|
6743
|
-
t.description = n.name;
|
|
6744
|
-
let i = await n.installDownload(e);
|
|
6745
|
-
return t.description = "写入数据库", await r.value.replaceInto("plugin").values({
|
|
6746
|
-
displayName: i.name.display,
|
|
6747
|
-
enable: !0,
|
|
6748
|
-
installerName: "",
|
|
6749
|
-
installInput: "",
|
|
6750
|
-
loaderName: n.name,
|
|
6751
|
-
meta: JSON.stringify(i),
|
|
6752
|
-
pluginName: i.name.id
|
|
6753
|
-
}).execute(), i;
|
|
6754
7481
|
});
|
|
6755
|
-
|
|
6756
|
-
}),
|
|
6757
|
-
|
|
7482
|
+
await ho(n, r, i.name, e, t);
|
|
7483
|
+
}), _o = (e, t) => V(`安装插件-${e.name}`, async (n) => {
|
|
7484
|
+
await ho(n, e, "", "", t);
|
|
7485
|
+
}), vo = async (e, t) => V(`更新插件-${e.pluginName}`, async (n) => {
|
|
7486
|
+
let r = await n.createLoading("更新", async (t) => {
|
|
6758
7487
|
t.retryable = !0;
|
|
6759
7488
|
let n = e.installerName;
|
|
6760
7489
|
for (;;) {
|
|
6761
|
-
let r =
|
|
7490
|
+
let r = fo.find((e) => e.name == n);
|
|
6762
7491
|
if (!r) throw Error("没有符合的下载器");
|
|
6763
7492
|
t.description = r.name;
|
|
6764
7493
|
let i = await r.update(e);
|
|
6765
|
-
if (
|
|
7494
|
+
if (l(i)) n = i;
|
|
6766
7495
|
else return i;
|
|
6767
7496
|
}
|
|
6768
|
-
}),
|
|
7497
|
+
}), i = await n.createLoading("安装插件", async (t) => {
|
|
6769
7498
|
t.retryable = !0;
|
|
6770
|
-
let n =
|
|
7499
|
+
let n = ao.find((t) => t.name == e.loaderName);
|
|
6771
7500
|
if (!n) throw Error("没有符合的安装器");
|
|
6772
|
-
return await n.
|
|
6773
|
-
});
|
|
6774
|
-
await
|
|
7501
|
+
return await n.install(r);
|
|
7502
|
+
}), { upsert: a } = g.useUpsert();
|
|
7503
|
+
await a({ archives: [{
|
|
6775
7504
|
...e,
|
|
6776
|
-
meta:
|
|
6777
|
-
})
|
|
6778
|
-
})
|
|
6779
|
-
var Ur = /* @__PURE__ */ Object.assign({
|
|
6780
|
-
"./loader/1_userscript.ts": Ar,
|
|
6781
|
-
"./loader/2_zip.ts": Mr
|
|
6782
|
-
}), Wr = Te(Object.entries(Ur), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]), Gr = {}, Kr = (e) => Gr[e] ??= new le();
|
|
6783
|
-
const qr = async (e) => {
|
|
6784
|
-
console.log(`[plugin bootPlugin] booting name "${e.pluginName}"`);
|
|
6785
|
-
let t = Kr(e.pluginName), n = lt();
|
|
6786
|
-
n.pluginSteps[e.pluginName] = {
|
|
6787
|
-
now: {
|
|
6788
|
-
status: "wait",
|
|
6789
|
-
stepsIndex: 0
|
|
6790
|
-
},
|
|
6791
|
-
steps: [{
|
|
6792
|
-
name: "等待",
|
|
6793
|
-
description: "插件载入中"
|
|
6794
|
-
}]
|
|
6795
|
-
};
|
|
6796
|
-
try {
|
|
6797
|
-
await t.acquire(), await Wr.find((t) => t.name == e.loaderName).load(e), await t.acquire();
|
|
6798
|
-
} catch (t) {
|
|
6799
|
-
throw n.pluginSteps[e.pluginName].now.status = "error", n.pluginSteps[e.pluginName].now.error = t, t;
|
|
6800
|
-
}
|
|
6801
|
-
console.log(`[plugin bootPlugin] boot name done "${e.pluginName}"`);
|
|
6802
|
-
};
|
|
6803
|
-
Me.on("definedPlugin", async (e) => {
|
|
6804
|
-
console.log("[plugin addPlugin] new plugin defined", e.name, e);
|
|
6805
|
-
let t = Kr(e.name);
|
|
6806
|
-
await Fr(e), console.log("[plugin addPlugin] done", e.name), t.release();
|
|
6807
|
-
}), window.$api.loaders = Wr, window.$api.installers = Lr;
|
|
6808
|
-
const Jr = F.fromAsyncFunction(async () => {
|
|
6809
|
-
await ut();
|
|
6810
|
-
let e = new Set([Y]), n = await t.getByEnabled(!0), r = [];
|
|
6811
|
-
for (;;) {
|
|
6812
|
-
let t = n.filter((t) => t.meta.require.every((t) => e.has(t.id)));
|
|
6813
|
-
r.push(t), ee(n, (e) => t.includes(e));
|
|
6814
|
-
for (let { pluginName: n } of t) e.add(n);
|
|
6815
|
-
if (Ae(t)) break;
|
|
6816
|
-
}
|
|
6817
|
-
if (!Ae(n)) throw Error(`插件循环引用: ${n.map((e) => e.pluginName).join(", ")}`);
|
|
6818
|
-
for (let e of r) await Promise.all(e.map((e) => qr(e)));
|
|
6819
|
-
console.log("[plugin bootPlugin] all load done");
|
|
6820
|
-
});
|
|
6821
|
-
var Yr = /* @__PURE__ */ f({
|
|
7505
|
+
meta: i
|
|
7506
|
+
}] }), await mo(n, i, t);
|
|
7507
|
+
}), yo = /* @__PURE__ */ T({
|
|
6822
7508
|
__name: "Inject",
|
|
6823
7509
|
props: {
|
|
6824
7510
|
key: {},
|
|
6825
7511
|
args: {}
|
|
6826
7512
|
},
|
|
6827
7513
|
setup(e) {
|
|
6828
|
-
let t = e, n =
|
|
6829
|
-
return (t, r) => (
|
|
7514
|
+
let t = e, n = x(() => Array.from(W.envExtends.values()).filter((e) => e.key == t.key));
|
|
7515
|
+
return (t, r) => (k(!0), w(b, null, j(n.value, (t) => (k(), S(P(R), {
|
|
6830
7516
|
promise: async () => {
|
|
6831
7517
|
try {
|
|
6832
7518
|
return await t.condition(e.args);
|
|
@@ -6836,21 +7522,21 @@ var Yr = /* @__PURE__ */ f({
|
|
|
6836
7522
|
},
|
|
6837
7523
|
"auto-load": ""
|
|
6838
7524
|
}, {
|
|
6839
|
-
default:
|
|
7525
|
+
default: F(({ result: n }) => [n ? (k(), S(M(t.component), O({
|
|
6840
7526
|
key: 0,
|
|
6841
7527
|
ref_for: !0
|
|
6842
|
-
}, e.args), null, 16)) :
|
|
7528
|
+
}, e.args), null, 16)) : C("", !0)]),
|
|
6843
7529
|
_: 2
|
|
6844
7530
|
}, 1032, ["promise"]))), 256));
|
|
6845
7531
|
}
|
|
6846
|
-
})
|
|
6847
|
-
|
|
6848
|
-
J.envExtends.add({
|
|
7532
|
+
}), bo = (e, t, n) => {
|
|
7533
|
+
W.envExtends.add({
|
|
6849
7534
|
key: e,
|
|
6850
7535
|
component: t,
|
|
6851
7536
|
condition: n ?? (() => !0)
|
|
6852
7537
|
});
|
|
6853
7538
|
};
|
|
6854
|
-
|
|
7539
|
+
//#endregion
|
|
7540
|
+
export { Je as Booter, m as ConfigPointer, W as Global, yo as Inject, uo as Install, io as Loader, bo 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 };
|
|
6855
7541
|
|
|
6856
7542
|
//# sourceMappingURL=index.js.map
|