@simon_he/pi 0.0.67 → 0.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +614 -564
- package/dist/index.js +648 -598
- package/package.json +6 -3
package/dist/index.cjs
CHANGED
|
@@ -237,7 +237,7 @@ var require_spark_md5 = __commonJS({
|
|
|
237
237
|
return md5blks;
|
|
238
238
|
}
|
|
239
239
|
function md51(s) {
|
|
240
|
-
var n = s.length, state = [1732584193, -271733879, -1732584194, 271733878], i, length, tail, tmp,
|
|
240
|
+
var n = s.length, state = [1732584193, -271733879, -1732584194, 271733878], i, length, tail, tmp, lo, hi;
|
|
241
241
|
for (i = 64; i <= n; i += 64) {
|
|
242
242
|
md5cycle(state, md5blk(s.substring(i - 64, i)));
|
|
243
243
|
}
|
|
@@ -256,15 +256,15 @@ var require_spark_md5 = __commonJS({
|
|
|
256
256
|
}
|
|
257
257
|
tmp = n * 8;
|
|
258
258
|
tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
|
|
259
|
-
|
|
259
|
+
lo = parseInt(tmp[2], 16);
|
|
260
260
|
hi = parseInt(tmp[1], 16) || 0;
|
|
261
|
-
tail[14] =
|
|
261
|
+
tail[14] = lo;
|
|
262
262
|
tail[15] = hi;
|
|
263
263
|
md5cycle(state, tail);
|
|
264
264
|
return state;
|
|
265
265
|
}
|
|
266
266
|
function md51_array(a) {
|
|
267
|
-
var n = a.length, state = [1732584193, -271733879, -1732584194, 271733878], i, length, tail, tmp,
|
|
267
|
+
var n = a.length, state = [1732584193, -271733879, -1732584194, 271733878], i, length, tail, tmp, lo, hi;
|
|
268
268
|
for (i = 64; i <= n; i += 64) {
|
|
269
269
|
md5cycle(state, md5blk_array(a.subarray(i - 64, i)));
|
|
270
270
|
}
|
|
@@ -283,9 +283,9 @@ var require_spark_md5 = __commonJS({
|
|
|
283
283
|
}
|
|
284
284
|
tmp = n * 8;
|
|
285
285
|
tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
|
|
286
|
-
|
|
286
|
+
lo = parseInt(tmp[2], 16);
|
|
287
287
|
hi = parseInt(tmp[1], 16) || 0;
|
|
288
|
-
tail[14] =
|
|
288
|
+
tail[14] = lo;
|
|
289
289
|
tail[15] = hi;
|
|
290
290
|
md5cycle(state, tail);
|
|
291
291
|
return state;
|
|
@@ -420,7 +420,7 @@ var require_spark_md5 = __commonJS({
|
|
|
420
420
|
delete this._length;
|
|
421
421
|
};
|
|
422
422
|
SparkMD5.prototype._finish = function(tail, length) {
|
|
423
|
-
var i = length, tmp,
|
|
423
|
+
var i = length, tmp, lo, hi;
|
|
424
424
|
tail[i >> 2] |= 128 << (i % 4 << 3);
|
|
425
425
|
if (i > 55) {
|
|
426
426
|
md5cycle(this._hash, tail);
|
|
@@ -430,9 +430,9 @@ var require_spark_md5 = __commonJS({
|
|
|
430
430
|
}
|
|
431
431
|
tmp = this._length * 8;
|
|
432
432
|
tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
|
|
433
|
-
|
|
433
|
+
lo = parseInt(tmp[2], 16);
|
|
434
434
|
hi = parseInt(tmp[1], 16) || 0;
|
|
435
|
-
tail[14] =
|
|
435
|
+
tail[14] = lo;
|
|
436
436
|
tail[15] = hi;
|
|
437
437
|
md5cycle(this._hash, tail);
|
|
438
438
|
};
|
|
@@ -3732,8 +3732,8 @@ var require_filter_pack = __commonJS({
|
|
|
3732
3732
|
}
|
|
3733
3733
|
function filterUp(pxData, pxPos, byteWidth, rawData, rawPos) {
|
|
3734
3734
|
for (let x2 = 0; x2 < byteWidth; x2++) {
|
|
3735
|
-
let
|
|
3736
|
-
let val = pxData[pxPos + x2] -
|
|
3735
|
+
let up2 = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
|
|
3736
|
+
let val = pxData[pxPos + x2] - up2;
|
|
3737
3737
|
rawData[rawPos + x2] = val;
|
|
3738
3738
|
}
|
|
3739
3739
|
}
|
|
@@ -3741,8 +3741,8 @@ var require_filter_pack = __commonJS({
|
|
|
3741
3741
|
let sum = 0;
|
|
3742
3742
|
let length = pxPos + byteWidth;
|
|
3743
3743
|
for (let x2 = pxPos; x2 < length; x2++) {
|
|
3744
|
-
let
|
|
3745
|
-
let val = pxData[x2] -
|
|
3744
|
+
let up2 = pxPos > 0 ? pxData[x2 - byteWidth] : 0;
|
|
3745
|
+
let val = pxData[x2] - up2;
|
|
3746
3746
|
sum += Math.abs(val);
|
|
3747
3747
|
}
|
|
3748
3748
|
return sum;
|
|
@@ -3750,8 +3750,8 @@ var require_filter_pack = __commonJS({
|
|
|
3750
3750
|
function filterAvg(pxData, pxPos, byteWidth, rawData, rawPos, bpp) {
|
|
3751
3751
|
for (let x2 = 0; x2 < byteWidth; x2++) {
|
|
3752
3752
|
let left = x2 >= bpp ? pxData[pxPos + x2 - bpp] : 0;
|
|
3753
|
-
let
|
|
3754
|
-
let val = pxData[pxPos + x2] - (left +
|
|
3753
|
+
let up2 = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
|
|
3754
|
+
let val = pxData[pxPos + x2] - (left + up2 >> 1);
|
|
3755
3755
|
rawData[rawPos + x2] = val;
|
|
3756
3756
|
}
|
|
3757
3757
|
}
|
|
@@ -3759,8 +3759,8 @@ var require_filter_pack = __commonJS({
|
|
|
3759
3759
|
let sum = 0;
|
|
3760
3760
|
for (let x2 = 0; x2 < byteWidth; x2++) {
|
|
3761
3761
|
let left = x2 >= bpp ? pxData[pxPos + x2 - bpp] : 0;
|
|
3762
|
-
let
|
|
3763
|
-
let val = pxData[pxPos + x2] - (left +
|
|
3762
|
+
let up2 = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
|
|
3763
|
+
let val = pxData[pxPos + x2] - (left + up2 >> 1);
|
|
3764
3764
|
sum += Math.abs(val);
|
|
3765
3765
|
}
|
|
3766
3766
|
return sum;
|
|
@@ -3768,9 +3768,9 @@ var require_filter_pack = __commonJS({
|
|
|
3768
3768
|
function filterPaeth(pxData, pxPos, byteWidth, rawData, rawPos, bpp) {
|
|
3769
3769
|
for (let x2 = 0; x2 < byteWidth; x2++) {
|
|
3770
3770
|
let left = x2 >= bpp ? pxData[pxPos + x2 - bpp] : 0;
|
|
3771
|
-
let
|
|
3771
|
+
let up2 = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
|
|
3772
3772
|
let upleft = pxPos > 0 && x2 >= bpp ? pxData[pxPos + x2 - (byteWidth + bpp)] : 0;
|
|
3773
|
-
let val = pxData[pxPos + x2] - paethPredictor(left,
|
|
3773
|
+
let val = pxData[pxPos + x2] - paethPredictor(left, up2, upleft);
|
|
3774
3774
|
rawData[rawPos + x2] = val;
|
|
3775
3775
|
}
|
|
3776
3776
|
}
|
|
@@ -3778,9 +3778,9 @@ var require_filter_pack = __commonJS({
|
|
|
3778
3778
|
let sum = 0;
|
|
3779
3779
|
for (let x2 = 0; x2 < byteWidth; x2++) {
|
|
3780
3780
|
let left = x2 >= bpp ? pxData[pxPos + x2 - bpp] : 0;
|
|
3781
|
-
let
|
|
3781
|
+
let up2 = pxPos > 0 ? pxData[pxPos + x2 - byteWidth] : 0;
|
|
3782
3782
|
let upleft = pxPos > 0 && x2 >= bpp ? pxData[pxPos + x2 - (byteWidth + bpp)] : 0;
|
|
3783
|
-
let val = pxData[pxPos + x2] - paethPredictor(left,
|
|
3783
|
+
let val = pxData[pxPos + x2] - paethPredictor(left, up2, upleft);
|
|
3784
3784
|
sum += Math.abs(val);
|
|
3785
3785
|
}
|
|
3786
3786
|
return sum;
|
|
@@ -9179,11 +9179,11 @@ var require_from = __commonJS({
|
|
|
9179
9179
|
Promise.resolve(value).then(_next, _throw);
|
|
9180
9180
|
}
|
|
9181
9181
|
}
|
|
9182
|
-
function _asyncToGenerator(
|
|
9182
|
+
function _asyncToGenerator(fn) {
|
|
9183
9183
|
return function() {
|
|
9184
9184
|
var self2 = this, args = arguments;
|
|
9185
9185
|
return new Promise(function(resolve, reject) {
|
|
9186
|
-
var gen =
|
|
9186
|
+
var gen = fn.apply(self2, args);
|
|
9187
9187
|
function _next(value) {
|
|
9188
9188
|
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
9189
9189
|
}
|
|
@@ -9331,15 +9331,15 @@ var require_stream_readable = __commonJS({
|
|
|
9331
9331
|
require_inherits()(Readable, Stream);
|
|
9332
9332
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
9333
9333
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
9334
|
-
function prependListener(emitter, event,
|
|
9334
|
+
function prependListener(emitter, event, fn) {
|
|
9335
9335
|
if (typeof emitter.prependListener === "function")
|
|
9336
|
-
return emitter.prependListener(event,
|
|
9336
|
+
return emitter.prependListener(event, fn);
|
|
9337
9337
|
if (!emitter._events || !emitter._events[event])
|
|
9338
|
-
emitter.on(event,
|
|
9338
|
+
emitter.on(event, fn);
|
|
9339
9339
|
else if (Array.isArray(emitter._events[event]))
|
|
9340
|
-
emitter._events[event].unshift(
|
|
9340
|
+
emitter._events[event].unshift(fn);
|
|
9341
9341
|
else
|
|
9342
|
-
emitter._events[event] = [
|
|
9342
|
+
emitter._events[event] = [fn, emitter._events[event]];
|
|
9343
9343
|
}
|
|
9344
9344
|
function ReadableState(options, stream, isDuplex) {
|
|
9345
9345
|
Duplex = Duplex || require_stream_duplex();
|
|
@@ -9833,8 +9833,8 @@ var require_stream_readable = __commonJS({
|
|
|
9833
9833
|
dest.emit("unpipe", this, unpipeInfo);
|
|
9834
9834
|
return this;
|
|
9835
9835
|
};
|
|
9836
|
-
Readable.prototype.on = function(ev,
|
|
9837
|
-
var res = Stream.prototype.on.call(this, ev,
|
|
9836
|
+
Readable.prototype.on = function(ev, fn) {
|
|
9837
|
+
var res = Stream.prototype.on.call(this, ev, fn);
|
|
9838
9838
|
var state = this._readableState;
|
|
9839
9839
|
if (ev === "data") {
|
|
9840
9840
|
state.readableListening = this.listenerCount("readable") > 0;
|
|
@@ -9856,8 +9856,8 @@ var require_stream_readable = __commonJS({
|
|
|
9856
9856
|
return res;
|
|
9857
9857
|
};
|
|
9858
9858
|
Readable.prototype.addListener = Readable.prototype.on;
|
|
9859
|
-
Readable.prototype.removeListener = function(ev,
|
|
9860
|
-
var res = Stream.prototype.removeListener.call(this, ev,
|
|
9859
|
+
Readable.prototype.removeListener = function(ev, fn) {
|
|
9860
|
+
var res = Stream.prototype.removeListener.call(this, ev, fn);
|
|
9861
9861
|
if (ev === "readable") {
|
|
9862
9862
|
process.nextTick(updateReadableListening, this);
|
|
9863
9863
|
}
|
|
@@ -10264,8 +10264,8 @@ var require_pipeline = __commonJS({
|
|
|
10264
10264
|
callback(err || new ERR_STREAM_DESTROYED("pipe"));
|
|
10265
10265
|
};
|
|
10266
10266
|
}
|
|
10267
|
-
function call(
|
|
10268
|
-
|
|
10267
|
+
function call(fn) {
|
|
10268
|
+
fn();
|
|
10269
10269
|
}
|
|
10270
10270
|
function pipe(from, to) {
|
|
10271
10271
|
return from.pipe(to);
|
|
@@ -11127,13 +11127,13 @@ function determineBranch(decodeTree, current, nodeIdx, char) {
|
|
|
11127
11127
|
const value = char - jumpOffset;
|
|
11128
11128
|
return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
|
|
11129
11129
|
}
|
|
11130
|
-
let
|
|
11131
|
-
let hi =
|
|
11132
|
-
while (
|
|
11133
|
-
const mid =
|
|
11130
|
+
let lo = nodeIdx;
|
|
11131
|
+
let hi = lo + branchCount - 1;
|
|
11132
|
+
while (lo <= hi) {
|
|
11133
|
+
const mid = lo + hi >>> 1;
|
|
11134
11134
|
const midVal = decodeTree[mid];
|
|
11135
11135
|
if (midVal < char) {
|
|
11136
|
-
|
|
11136
|
+
lo = mid + 1;
|
|
11137
11137
|
} else if (midVal > char) {
|
|
11138
11138
|
hi = mid - 1;
|
|
11139
11139
|
} else {
|
|
@@ -11931,11 +11931,11 @@ var Tokenizer = class {
|
|
|
11931
11931
|
this.cbs.ontext(start, endIndex);
|
|
11932
11932
|
}
|
|
11933
11933
|
}
|
|
11934
|
-
emitCodePoint(
|
|
11934
|
+
emitCodePoint(cp2) {
|
|
11935
11935
|
if (this.baseState !== State.Text && this.baseState !== State.InSpecialTag) {
|
|
11936
|
-
this.cbs.onattribentity(
|
|
11936
|
+
this.cbs.onattribentity(cp2);
|
|
11937
11937
|
} else {
|
|
11938
|
-
this.cbs.ontextentity(
|
|
11938
|
+
this.cbs.ontextentity(cp2);
|
|
11939
11939
|
}
|
|
11940
11940
|
}
|
|
11941
11941
|
};
|
|
@@ -12070,11 +12070,11 @@ var Parser = class {
|
|
|
12070
12070
|
this.startIndex = endIndex;
|
|
12071
12071
|
}
|
|
12072
12072
|
/** @internal */
|
|
12073
|
-
ontextentity(
|
|
12073
|
+
ontextentity(cp2) {
|
|
12074
12074
|
var _a2, _b;
|
|
12075
12075
|
const index = this.tokenizer.getSectionStart();
|
|
12076
12076
|
this.endIndex = index - 1;
|
|
12077
|
-
(_b = (_a2 = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a2, fromCodePoint(
|
|
12077
|
+
(_b = (_a2 = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a2, fromCodePoint(cp2));
|
|
12078
12078
|
this.startIndex = index;
|
|
12079
12079
|
}
|
|
12080
12080
|
isVoidElement(name) {
|
|
@@ -12132,7 +12132,7 @@ var Parser = class {
|
|
|
12132
12132
|
}
|
|
12133
12133
|
/** @internal */
|
|
12134
12134
|
onclosetag(start, endIndex) {
|
|
12135
|
-
var _a2, _b, _c, _d, _e2,
|
|
12135
|
+
var _a2, _b, _c, _d, _e2, _f2;
|
|
12136
12136
|
this.endIndex = endIndex;
|
|
12137
12137
|
let name = this.getSlice(start, endIndex);
|
|
12138
12138
|
if (this.lowerCaseTagNames) {
|
|
@@ -12158,7 +12158,7 @@ var Parser = class {
|
|
|
12158
12158
|
} else if (!this.options.xmlMode && name === "br") {
|
|
12159
12159
|
(_b = (_a2 = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a2, "br");
|
|
12160
12160
|
(_d = (_c = this.cbs).onopentag) === null || _d === void 0 ? void 0 : _d.call(_c, "br", {}, true);
|
|
12161
|
-
(
|
|
12161
|
+
(_f2 = (_e2 = this.cbs).onclosetag) === null || _f2 === void 0 ? void 0 : _f2.call(_e2, "br", false);
|
|
12162
12162
|
}
|
|
12163
12163
|
this.startIndex = endIndex + 1;
|
|
12164
12164
|
}
|
|
@@ -12192,8 +12192,8 @@ var Parser = class {
|
|
|
12192
12192
|
this.attribvalue += this.getSlice(start, endIndex);
|
|
12193
12193
|
}
|
|
12194
12194
|
/** @internal */
|
|
12195
|
-
onattribentity(
|
|
12196
|
-
this.attribvalue += fromCodePoint(
|
|
12195
|
+
onattribentity(cp2) {
|
|
12196
|
+
this.attribvalue += fromCodePoint(cp2);
|
|
12197
12197
|
}
|
|
12198
12198
|
/** @internal */
|
|
12199
12199
|
onattribend(quote, endIndex) {
|
|
@@ -12243,15 +12243,15 @@ var Parser = class {
|
|
|
12243
12243
|
}
|
|
12244
12244
|
/** @internal */
|
|
12245
12245
|
oncdata(start, endIndex, offset) {
|
|
12246
|
-
var _a2, _b, _c, _d, _e2,
|
|
12246
|
+
var _a2, _b, _c, _d, _e2, _f2, _g2, _h, _j, _k;
|
|
12247
12247
|
this.endIndex = endIndex;
|
|
12248
12248
|
const value = this.getSlice(start, endIndex - offset);
|
|
12249
12249
|
if (this.options.xmlMode || this.options.recognizeCDATA) {
|
|
12250
12250
|
(_b = (_a2 = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a2);
|
|
12251
12251
|
(_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);
|
|
12252
|
-
(
|
|
12252
|
+
(_f2 = (_e2 = this.cbs).oncdataend) === null || _f2 === void 0 ? void 0 : _f2.call(_e2);
|
|
12253
12253
|
} else {
|
|
12254
|
-
(_h = (
|
|
12254
|
+
(_h = (_g2 = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g2, `[CDATA[${value}]]`);
|
|
12255
12255
|
(_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j);
|
|
12256
12256
|
}
|
|
12257
12257
|
this.startIndex = endIndex + 1;
|
|
@@ -13735,11 +13735,11 @@ var import_promises4 = __toESM(require("fs/promises"), 1);
|
|
|
13735
13735
|
var import_promises5 = __toESM(require("fs/promises"), 1);
|
|
13736
13736
|
var import_path8 = __toESM(require("path"), 1);
|
|
13737
13737
|
var import_process5 = __toESM(require("process"), 1);
|
|
13738
|
-
function
|
|
13738
|
+
function Jr(e, t, r = { compare: "same", result: "value" }) {
|
|
13739
13739
|
let n = e.filter((a) => t.includes(a)), o = e.filter((a) => !t.includes(a)).concat(t.filter((a) => !e.includes(a))), { compare: i = "same", result: s = "value" } = r;
|
|
13740
|
-
return i === "same" ? s === "value" ? n : n.map((a) => e.indexOf(a)) : s === "value" ?
|
|
13740
|
+
return i === "same" ? s === "value" ? n : n.map((a) => e.indexOf(a)) : s === "value" ? Ht(o) : o.map((a) => e.indexOf(a)).filter((a) => a >= 0);
|
|
13741
13741
|
}
|
|
13742
|
-
function
|
|
13742
|
+
function Ht(e) {
|
|
13743
13743
|
if (!e.length)
|
|
13744
13744
|
return e;
|
|
13745
13745
|
let t = Math.floor(e.length / 2), r = e.slice(0, t), n = e.slice(t), o = [];
|
|
@@ -13750,21 +13750,21 @@ function zt(e) {
|
|
|
13750
13750
|
function C(e) {
|
|
13751
13751
|
return typeof e > "u";
|
|
13752
13752
|
}
|
|
13753
|
-
function
|
|
13753
|
+
function rn(e, t) {
|
|
13754
13754
|
for (let r = 0; r < e.length; r++) {
|
|
13755
13755
|
let n = t(e[r], r, e);
|
|
13756
13756
|
if (!C(n))
|
|
13757
13757
|
return n;
|
|
13758
13758
|
}
|
|
13759
13759
|
}
|
|
13760
|
-
function
|
|
13760
|
+
function on(e, t = 2) {
|
|
13761
13761
|
return (e.reduce((r, n) => r + n) / e.length).toFixed(t);
|
|
13762
13762
|
}
|
|
13763
13763
|
var M = Array.isArray;
|
|
13764
13764
|
function W(e) {
|
|
13765
13765
|
return typeof e < "u";
|
|
13766
13766
|
}
|
|
13767
|
-
function
|
|
13767
|
+
function pn(array, key) {
|
|
13768
13768
|
let reg = /\/[\w._ $]+\/[gims]*/;
|
|
13769
13769
|
return array.filter((e) => M(key) ? key.some((t) => findItem(e, t)) : findItem(e, key));
|
|
13770
13770
|
function findItem(item, key) {
|
|
@@ -13772,7 +13772,7 @@ function fn(array, key) {
|
|
|
13772
13772
|
return C(item[_key]) ? false : W(_value) ? reg.test(_value) ? new RegExp(eval(_value)).test(item[_key]) : _value === item[_key] : /.*/.test(item[key]);
|
|
13773
13773
|
}
|
|
13774
13774
|
}
|
|
13775
|
-
function
|
|
13775
|
+
function hn(e, t) {
|
|
13776
13776
|
let r = /* @__PURE__ */ new Map();
|
|
13777
13777
|
return e.forEach((n, o) => r.set(n[t], o)), new be(e, r, t);
|
|
13778
13778
|
}
|
|
@@ -13832,12 +13832,12 @@ function D(e) {
|
|
|
13832
13832
|
return typeof e == "function";
|
|
13833
13833
|
}
|
|
13834
13834
|
var L = Object.prototype.toString;
|
|
13835
|
-
var
|
|
13836
|
-
var
|
|
13837
|
-
var
|
|
13838
|
-
var
|
|
13839
|
-
var
|
|
13840
|
-
var
|
|
13835
|
+
var bn = /(?<=\s|^|;)import\s*(["'\s]*(?<imports>[\w*${}\n\r\t, /]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][\s;]*/gm;
|
|
13836
|
+
var Mn = /import\s*\((?<expression>(?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gm;
|
|
13837
|
+
var En = /\bexport\s+(?<declaration>(async function|function|let|const|var|class))\s+(?<name>[\w$_]+)/g;
|
|
13838
|
+
var In = /\bexport\s+{(?<exports>[^}]+)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n]*)?/g;
|
|
13839
|
+
var vn = /\bexport\s*(\*)(\s*as\s+(?<name>[\w$_]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n]*)?/g;
|
|
13840
|
+
var Tn = /\bexport\s+default\s+/g;
|
|
13841
13841
|
function T(e) {
|
|
13842
13842
|
return L.call(e) === "[object Object]";
|
|
13843
13843
|
}
|
|
@@ -13853,7 +13853,7 @@ function ee(e) {
|
|
|
13853
13853
|
function Pe(e) {
|
|
13854
13854
|
return Number.isNaN(e);
|
|
13855
13855
|
}
|
|
13856
|
-
function
|
|
13856
|
+
function k(e) {
|
|
13857
13857
|
return e === null;
|
|
13858
13858
|
}
|
|
13859
13859
|
function Fe(e) {
|
|
@@ -13865,10 +13865,10 @@ function B(e) {
|
|
|
13865
13865
|
function j(e) {
|
|
13866
13866
|
return typeof e == "number";
|
|
13867
13867
|
}
|
|
13868
|
-
function
|
|
13868
|
+
function ke(e) {
|
|
13869
13869
|
return L.call(e) === "[object Promise]";
|
|
13870
13870
|
}
|
|
13871
|
-
function
|
|
13871
|
+
function $e(e) {
|
|
13872
13872
|
return e instanceof Date;
|
|
13873
13873
|
}
|
|
13874
13874
|
function Ee(e) {
|
|
@@ -13880,19 +13880,19 @@ function Ie(e) {
|
|
|
13880
13880
|
function V(e, t) {
|
|
13881
13881
|
if (t = t.toLocaleLowerCase(), !t)
|
|
13882
13882
|
throw new Error("type is required");
|
|
13883
|
-
let r = { str: g, s: g, string: g, fn: D, f: D, function: D, object: T, o: T, array: M, a: M, set: Ne, map: Me, m: Me, reg: ee, r: ee, b: B, boolean: B, n: j, number: j, u: C, undefined: C, null:
|
|
13883
|
+
let r = { str: g, s: g, string: g, fn: D, f: D, function: D, object: T, o: T, array: M, a: M, set: Ne, map: Me, m: Me, reg: ee, r: ee, b: B, boolean: B, n: j, number: j, u: C, undefined: C, null: k, symbol: Fe, nan: Pe, wm: Ee, ws: Ie, promise: ke, weakmap: Ee, weakset: Ie, date: $e };
|
|
13884
13884
|
return t.split("|").some((n) => {
|
|
13885
13885
|
var o;
|
|
13886
13886
|
return (o = r[n.trim()]) == null ? void 0 : o.call(r, e);
|
|
13887
13887
|
});
|
|
13888
13888
|
}
|
|
13889
|
-
function
|
|
13889
|
+
function fo(e, t) {
|
|
13890
13890
|
return V(t, "s|n") && (t = [`${t}`]), t.reduce((r, n) => {
|
|
13891
13891
|
let o = false;
|
|
13892
13892
|
return n[0] === "-" && (o = true, n = n.slice(1)), r.sort((i, s) => n !== "1" && s[n] === i[n] ? 0 : o ? n === "1" ? s > i ? 1 : -1 : s[n] > i[n] ? 1 : -1 : n === "1" ? i > s ? 1 : -1 : s[n] > i[n] ? -1 : 1);
|
|
13893
13893
|
}, e);
|
|
13894
13894
|
}
|
|
13895
|
-
function
|
|
13895
|
+
function go(e, t, r) {
|
|
13896
13896
|
if (!t)
|
|
13897
13897
|
return e;
|
|
13898
13898
|
let n = [], o, i = r ? r.split(".") : void 0;
|
|
@@ -13906,8 +13906,8 @@ function lo(e, t, r) {
|
|
|
13906
13906
|
return a ? a.reduce((u, m) => u == null ? void 0 : u[m], c) : c;
|
|
13907
13907
|
}
|
|
13908
13908
|
}
|
|
13909
|
-
function
|
|
13910
|
-
return e.reduce((t, r) => ((V(r, "o|a") && !
|
|
13909
|
+
function yo(e) {
|
|
13910
|
+
return e.reduce((t, r) => ((V(r, "o|a") && !Ut(t, r) || !t.includes(r)) && t.push(r), t), []);
|
|
13911
13911
|
}
|
|
13912
13912
|
function ze(e, t) {
|
|
13913
13913
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
@@ -13917,10 +13917,10 @@ function ze(e, t) {
|
|
|
13917
13917
|
return false;
|
|
13918
13918
|
return true;
|
|
13919
13919
|
}
|
|
13920
|
-
function
|
|
13920
|
+
function Ut(e, t) {
|
|
13921
13921
|
return e.some((r) => V(r, "o|a") && ze(t, r));
|
|
13922
13922
|
}
|
|
13923
|
-
function
|
|
13923
|
+
function bo(e, t = 1) {
|
|
13924
13924
|
if (t < 1)
|
|
13925
13925
|
return [];
|
|
13926
13926
|
let r = [];
|
|
@@ -13928,19 +13928,19 @@ function wo(e, t = 1) {
|
|
|
13928
13928
|
r.push(e.slice(n, n + t));
|
|
13929
13929
|
return r;
|
|
13930
13930
|
}
|
|
13931
|
-
function
|
|
13931
|
+
function Eo(e, t) {
|
|
13932
13932
|
return e.reduce((r, n) => {
|
|
13933
13933
|
let o = t(n);
|
|
13934
13934
|
return r[o] ? r[o]++ : r[o] = 1, r;
|
|
13935
13935
|
}, {});
|
|
13936
13936
|
}
|
|
13937
|
-
function
|
|
13937
|
+
function Bt(e, t = "children", r = false, n = []) {
|
|
13938
13938
|
return e = M(e) ? e : [e], e.forEach((o) => {
|
|
13939
13939
|
let i = o[t];
|
|
13940
|
-
r || n.push(o), i ?
|
|
13940
|
+
r || n.push(o), i ? Bt(i, t, r, n) : r && n.push(o);
|
|
13941
13941
|
}), n;
|
|
13942
13942
|
}
|
|
13943
|
-
function
|
|
13943
|
+
function Co(e) {
|
|
13944
13944
|
return e.filter(Boolean);
|
|
13945
13945
|
}
|
|
13946
13946
|
var q = class {
|
|
@@ -13951,7 +13951,7 @@ var q = class {
|
|
|
13951
13951
|
}
|
|
13952
13952
|
};
|
|
13953
13953
|
function v(e, t = false, r = document) {
|
|
13954
|
-
if (!
|
|
13954
|
+
if (!k(t))
|
|
13955
13955
|
return B(t) || (r = t, t = false), M(e) ? e.reduce((n, o) => {
|
|
13956
13956
|
let i = t ? r.querySelectorAll(o) : r.querySelector(o);
|
|
13957
13957
|
return i ? n = t ? [...n, ...i] : [...n, i] : n;
|
|
@@ -13971,9 +13971,9 @@ function w(...e) {
|
|
|
13971
13971
|
}
|
|
13972
13972
|
}
|
|
13973
13973
|
function $(e, t, r) {
|
|
13974
|
-
return w(e, t, (n, o) => n.insertBefore(o,
|
|
13974
|
+
return w(e, t, (n, o) => n.insertBefore(o, k(r) ? null : r || n.firstChild));
|
|
13975
13975
|
}
|
|
13976
|
-
function
|
|
13976
|
+
function z(e) {
|
|
13977
13977
|
if (g(e) && (e = v(e) || e), g(e))
|
|
13978
13978
|
throw new Error(`${e} is not a element`);
|
|
13979
13979
|
let t = e.parentElement;
|
|
@@ -14056,7 +14056,7 @@ var He = class {
|
|
|
14056
14056
|
this.color = t, this.ctx.strokeStyle = t;
|
|
14057
14057
|
}
|
|
14058
14058
|
unmount() {
|
|
14059
|
-
|
|
14059
|
+
z(this.canvas), this.stop.forEach((t) => t());
|
|
14060
14060
|
}
|
|
14061
14061
|
listen() {
|
|
14062
14062
|
x(this.canvas, "mousedown", () => {
|
|
@@ -14186,7 +14186,7 @@ var Ue = class {
|
|
|
14186
14186
|
this.originSrc = t, this.color = r, this.fontWeight = n, this.bgColor = o;
|
|
14187
14187
|
}
|
|
14188
14188
|
async repaint(t, r, n, o = "#fff") {
|
|
14189
|
-
let i =
|
|
14189
|
+
let i = z(this.canvas);
|
|
14190
14190
|
if (this.status = "pending", this.initOptions(t, r, n, o), !i)
|
|
14191
14191
|
throw new Error("repaint error not found canvas container or has been removed");
|
|
14192
14192
|
return Object.assign(this, await this.executor()).append(i);
|
|
@@ -14251,7 +14251,7 @@ var ie = class {
|
|
|
14251
14251
|
G(o, { callback: () => this.status = "success" });
|
|
14252
14252
|
}
|
|
14253
14253
|
repaint(t, r, n, o) {
|
|
14254
|
-
let i =
|
|
14254
|
+
let i = z(this.canvas);
|
|
14255
14255
|
if (!i)
|
|
14256
14256
|
throw new Error("repaint error not found canvas container or has been removed");
|
|
14257
14257
|
return this.status = "pending", this.originText !== t ? Object.assign(this, new ie(t, r, n, o)).append(i) : (this.fontSize = r, this.color = n, this.fontWeight = o, this.clearCanvas(), this.getCanvas(), this.append(i));
|
|
@@ -14264,7 +14264,7 @@ var ie = class {
|
|
|
14264
14264
|
return $(t, this.canvas), this;
|
|
14265
14265
|
}
|
|
14266
14266
|
};
|
|
14267
|
-
function
|
|
14267
|
+
function Si(e) {
|
|
14268
14268
|
return new Promise((t, r) => {
|
|
14269
14269
|
try {
|
|
14270
14270
|
let n = new Image();
|
|
@@ -14277,7 +14277,7 @@ function Ci(e) {
|
|
|
14277
14277
|
}
|
|
14278
14278
|
});
|
|
14279
14279
|
}
|
|
14280
|
-
function
|
|
14280
|
+
function Di(e) {
|
|
14281
14281
|
let t = 0, r = {}, n = e[0].length, o = e.length, i = [], s = [];
|
|
14282
14282
|
for (let u = 0; u < o; u++)
|
|
14283
14283
|
for (let m = 0; m < n; m++)
|
|
@@ -14301,7 +14301,7 @@ function Ai(e) {
|
|
|
14301
14301
|
function Be(e) {
|
|
14302
14302
|
return e.replace(/-(\w)/g, (t, r) => r.toUpperCase());
|
|
14303
14303
|
}
|
|
14304
|
-
function
|
|
14304
|
+
function Ri(e) {
|
|
14305
14305
|
if (e = (e || window.location.search).split("?")[1], !!e)
|
|
14306
14306
|
return e.split("&").reduce((t, r) => {
|
|
14307
14307
|
let [n, o] = r.split("=");
|
|
@@ -14311,29 +14311,29 @@ function Oi(e) {
|
|
|
14311
14311
|
function se(e) {
|
|
14312
14312
|
return e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
14313
14313
|
}
|
|
14314
|
-
function
|
|
14314
|
+
function Pi(e, t = 6) {
|
|
14315
14315
|
let r = 0;
|
|
14316
14316
|
return e = `${e}`, e.match(/[a-z]/g) && r++, e.match(/[A-Z]/g) && r++, e.match(/[0-9]/g) && r++, e.match(/[^a-zA-Z0-9]/g) && r++, e.length < t && (r = 0), r;
|
|
14317
14317
|
}
|
|
14318
14318
|
function ae(e, t = "around") {
|
|
14319
14319
|
return t === "pre" ? e.replace(/(^\s*)/g, "") : t === "post" ? e.replace(/(\s*$)/g, "") : t === "all" ? e.replace(/\s+/g, "") : t === "around" ? e.replace(/(^\s*)|(\s*$)/g, "") : e;
|
|
14320
14320
|
}
|
|
14321
|
-
var
|
|
14322
|
-
var
|
|
14323
|
-
var
|
|
14324
|
-
var
|
|
14321
|
+
var Wt = /\s+(?!['"])([\w_\-\$\.]+):/gm;
|
|
14322
|
+
var Vt = /:\s*'([^']*)'/g;
|
|
14323
|
+
var Yt = /:\s*("[\w_\-\$\.]+")\s*(?!,)"/gm;
|
|
14324
|
+
var _t = /:\s*("[\w_\-\$\.]+"\s*,)\s*}/gm;
|
|
14325
14325
|
var Qt = /,(\s*})/gm;
|
|
14326
14326
|
function $i(e) {
|
|
14327
|
-
return JSON.parse(e.replace(
|
|
14327
|
+
return JSON.parse(e.replace(Wt, (t, r) => t.replace(r, `"${r}"`)).replace(Vt, ': "$1"').replace(Yt, (t, r) => t.replace(r, `${r},`)).replace(_t, (t) => t.replace(",", "")).replace(Qt, (t, r) => r));
|
|
14328
14328
|
}
|
|
14329
|
-
function
|
|
14329
|
+
function Hi(e, t = " ") {
|
|
14330
14330
|
return e.replace(/\s+/g, t);
|
|
14331
14331
|
}
|
|
14332
14332
|
function We(e) {
|
|
14333
14333
|
let t = e.split(":"), r = t.length - 1;
|
|
14334
14334
|
return t.reduce((n, o, i) => n + +o * 60 ** (r - i), 0);
|
|
14335
14335
|
}
|
|
14336
|
-
function
|
|
14336
|
+
function Vi(e) {
|
|
14337
14337
|
return e.split(`
|
|
14338
14338
|
`).reduce((r, n) => {
|
|
14339
14339
|
let o = n.split("]"), i = o[0].slice(1);
|
|
@@ -14348,9 +14348,9 @@ function Ye(e, t) {
|
|
|
14348
14348
|
let s = e[i];
|
|
14349
14349
|
return o += `${i} { ${Object.keys(s).reduce((a, c) => a += `${se(c)}: ${s[c]};`, "")} }`;
|
|
14350
14350
|
}, ""), n = E("style", { type: "text/css" }, t ? Ve(r, t) : r);
|
|
14351
|
-
return $(document.head, n, null), () =>
|
|
14351
|
+
return $(document.head, n, null), () => z(n);
|
|
14352
14352
|
}
|
|
14353
|
-
function
|
|
14353
|
+
function _e() {
|
|
14354
14354
|
let e = navigator.userAgent, t = () => {
|
|
14355
14355
|
let n = [{ name: "sgssapp", it: /sogousearch/i.test(e) }, { name: "wechat", it: /MicroMessenger/i.test(e) }, { name: "weibo", it: !!e.match(/Weibo/i) }, { name: "uc", it: !!e.match(/UCBrowser/i) || e.includes(" UBrowser") }, { name: "sogou", it: e.includes("MetaSr") || e.includes("Sogou") }, { name: "xiaomi", it: e.includes("MiuiBrowser") }, { name: "baidu", it: e.includes("Baidu") || e.includes("BIDUBrowser") }, { name: "360", it: e.includes("360EE") || e.includes("360SE") }, { name: "2345", it: e.includes("2345Explorer") }, { name: "edge", it: e.includes("Edge") }, { name: "ie11", it: e.includes("Trident") && e.includes("rv:11.0") }, { name: "ie", it: e.includes("compatible") && e.includes("MSIE") }, { name: "firefox", it: e.includes("Firefox") }, { name: "safari", it: e.includes("Safari") && !e.includes("Chrome") }, { name: "qqbrowser", it: e.includes("MQQBrowser") && !e.includes(" QQ") }, { name: "qq", it: e.includes("QQ") }, { name: "chrome", it: e.includes("Chrome") || e.includes("CriOS") }, { name: "opera", it: e.includes("Opera") || e.includes("OPR") }];
|
|
14356
14356
|
for (let o = 0; o < n.length; o++)
|
|
@@ -14360,8 +14360,8 @@ function Qe() {
|
|
|
14360
14360
|
};
|
|
14361
14361
|
return { os: (() => !!e.match(/compatible/i) || e.match(/Windows/i) ? "windows" : !!e.match(/Macintosh/i) || e.match(/MacIntel/i) ? "macOS" : !!e.match(/iphone/i) || e.match(/Ipad/i) ? "ios" : e.match(/android/i) ? "android" : e.match(/Ubuntu/i) ? "Ubuntu" : "other")(), dev: t() };
|
|
14362
14362
|
}
|
|
14363
|
-
function
|
|
14364
|
-
let { os: n } =
|
|
14363
|
+
function Qe(e, t = {}, r) {
|
|
14364
|
+
let { os: n } = _e(), o = n === "ios" || n === "android", i = [], s = false;
|
|
14365
14365
|
return w(e, (a) => {
|
|
14366
14366
|
let c = false;
|
|
14367
14367
|
o ? (i.push(x(a, "touchstart", (m) => {
|
|
@@ -14394,7 +14394,7 @@ function Ze(e, t = {}, r) {
|
|
|
14394
14394
|
function Te(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_VALUE) {
|
|
14395
14395
|
return Math.floor(Math.random() * (t - e + 1)) + e;
|
|
14396
14396
|
}
|
|
14397
|
-
async function
|
|
14397
|
+
async function Is(e, t, r = 42, n) {
|
|
14398
14398
|
if (D(r) && (n = r, r = 42), g(t) && (t = v(t) || t), g(t))
|
|
14399
14399
|
throw new Error(`${t} is not a HTMLElement`);
|
|
14400
14400
|
let o = new Image();
|
|
@@ -14406,7 +14406,7 @@ async function Es(e, t, r = 42, n) {
|
|
|
14406
14406
|
let A = u.getImageData(l - 3, b, y, y);
|
|
14407
14407
|
c.width = y, u.putImageData(A, 0, b);
|
|
14408
14408
|
let N;
|
|
14409
|
-
|
|
14409
|
+
Qe(c, { dragStart(I) {
|
|
14410
14410
|
N = I.clientX - I.target.offsetLeft;
|
|
14411
14411
|
}, dragMove(I) {
|
|
14412
14412
|
let S = I.clientX - N;
|
|
@@ -14452,7 +14452,7 @@ var ce = class {
|
|
|
14452
14452
|
this.ctx.beginPath(), t.forEach(([n, o]) => this.ctx.lineTo(n, o)), this.isFill ? (this.ctx.fillStyle = r != null ? r : this.color, this.ctx.fill()) : (this.ctx.strokeStyle = r != null ? r : this.color, this.ctx.stroke());
|
|
14453
14453
|
}
|
|
14454
14454
|
};
|
|
14455
|
-
var
|
|
14455
|
+
var Ze = class {
|
|
14456
14456
|
constructor(t, r = 1, n = "#fff") {
|
|
14457
14457
|
__publicField(this, "r");
|
|
14458
14458
|
__publicField(this, "ctx");
|
|
@@ -14477,7 +14477,7 @@ var qe = class {
|
|
|
14477
14477
|
o.draw([[t, r], [t + i, r], [t + i, r + i], [t, r + i], [t, r]]);
|
|
14478
14478
|
}
|
|
14479
14479
|
};
|
|
14480
|
-
function
|
|
14480
|
+
function Us(e) {
|
|
14481
14481
|
return [...e.matchAll(/([^{]+){([^}]+)}/gs)].reduce((t, [r, n, o]) => t += `${ae(n).replace(/\s+/g, " ").replace(/\s*,\s*/g, ",")}{${o.replace(/[\n\s]*/g, "")}}`, "");
|
|
14482
14482
|
}
|
|
14483
14483
|
function P(e) {
|
|
@@ -14489,13 +14489,13 @@ function P(e) {
|
|
|
14489
14489
|
}
|
|
14490
14490
|
return L.call(e) === "[object File]";
|
|
14491
14491
|
}
|
|
14492
|
-
function
|
|
14492
|
+
function qs(e, t = {}) {
|
|
14493
14493
|
return new Promise((r) => {
|
|
14494
14494
|
let { quality: n = 0.1, maxWidth: o, maxHeight: i, type: s = "base64" } = t;
|
|
14495
|
-
|
|
14495
|
+
qt(e, r, n, s, o, i);
|
|
14496
14496
|
});
|
|
14497
14497
|
}
|
|
14498
|
-
function
|
|
14498
|
+
function qt(e, t, r, n, o, i) {
|
|
14499
14499
|
if (P(e)) {
|
|
14500
14500
|
let m = new FileReader();
|
|
14501
14501
|
m.readAsDataURL(e), m.onload = function(f) {
|
|
@@ -14521,69 +14521,71 @@ function _t(e, t, r, n, o, i) {
|
|
|
14521
14521
|
t(m.toDataURL("image/jpeg", r));
|
|
14522
14522
|
}
|
|
14523
14523
|
}
|
|
14524
|
-
var
|
|
14525
|
-
function
|
|
14524
|
+
var Xt = /(<.* class=["']([\w\-\_$ ]*)["'_\-\w$=:\/ ]*\>)/gm;
|
|
14525
|
+
function ea(e, t) {
|
|
14526
14526
|
let r = 0;
|
|
14527
|
-
return e.replace(
|
|
14527
|
+
return e.replace(Xt, (n, o, i) => n.replace(i, t(i, o, r++)));
|
|
14528
14528
|
}
|
|
14529
|
-
function
|
|
14529
|
+
function na(e, t, r) {
|
|
14530
14530
|
return w(e, (n) => r == null ? void 0 : r(getComputedStyle(n).getPropertyValue(t)));
|
|
14531
14531
|
}
|
|
14532
|
-
function
|
|
14532
|
+
function ia(e, t) {
|
|
14533
14533
|
return e.classList.contains(t);
|
|
14534
14534
|
}
|
|
14535
|
-
function
|
|
14535
|
+
function ca(e, t) {
|
|
14536
14536
|
return w(e, (r) => t && Object.keys(t).forEach((n) => r.style.setProperty(n, t[n])));
|
|
14537
14537
|
}
|
|
14538
|
-
|
|
14538
|
+
function Y(e, t, r, n, o) {
|
|
14539
14539
|
let i = `${e}-${t}`;
|
|
14540
14540
|
return r && (i += `-${r}`), n && (i += `__${n}`), o && (i += `--${o}`), i;
|
|
14541
|
-
}
|
|
14542
|
-
|
|
14543
|
-
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
|
|
14547
|
-
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14553
|
-
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
|
|
14557
|
-
|
|
14558
|
-
};
|
|
14559
|
-
|
|
14541
|
+
}
|
|
14542
|
+
function ua(e) {
|
|
14543
|
+
return (t) => {
|
|
14544
|
+
let r = e;
|
|
14545
|
+
return { namespace: r, b: (l = "") => Y(r, t, l, "", ""), e: (l) => l ? Y(r, t, "", l, "") : "", m: (l) => l ? Y(r, t, "", "", l) : "", be: (l, h) => l && h ? Y(r, t, l, h, "") : "", em: (l, h) => l && h ? Y(r, t, "", l, h) : "", bm: (l, h) => l && h ? Y(r, t, l, "", h) : "", bem: (l, h, b) => l && h && b ? Y(r, t, l, h, b) : "", is: (l, ...h) => {
|
|
14546
|
+
let b = h.length >= 1 ? h[0] : true;
|
|
14547
|
+
return l && b ? `is-${l}` : "";
|
|
14548
|
+
}, cssVar: (l) => {
|
|
14549
|
+
let h = {};
|
|
14550
|
+
for (let b in l)
|
|
14551
|
+
l[b] && (h[`--${r}-${b}`] = l[b]);
|
|
14552
|
+
return h;
|
|
14553
|
+
}, cssVarName: (l) => `--${r}-${l}`, cssVarBlock: (l) => {
|
|
14554
|
+
let h = {};
|
|
14555
|
+
for (let b in l)
|
|
14556
|
+
l[b] && (h[`--${r}-${t}-${b}`] = l[b]);
|
|
14557
|
+
return h;
|
|
14558
|
+
}, cssVarBlockName: (l) => `--${r}-${t}-${l}` };
|
|
14559
|
+
};
|
|
14560
|
+
}
|
|
14561
|
+
function _(e, t = {}) {
|
|
14560
14562
|
let { sep: r = "&", eq: n = "=", hyp: o = false, px: i = false, encode: s = true } = t;
|
|
14561
|
-
return Object.keys(e).map((a) => `${o ? se(a) : a}${n}${
|
|
14563
|
+
return Object.keys(e).map((a) => `${o ? se(a) : a}${n}${Gt(s, i, e, a)}`).join(r);
|
|
14562
14564
|
}
|
|
14563
|
-
function
|
|
14565
|
+
function Gt(e, t, r, n) {
|
|
14564
14566
|
let o = t && j(r[n]) ? `${r[n]}px` : r[n].toString();
|
|
14565
14567
|
return e ? encodeURI(o) : o;
|
|
14566
14568
|
}
|
|
14567
|
-
function
|
|
14568
|
-
let r =
|
|
14569
|
+
function xa(e, t) {
|
|
14570
|
+
let r = _(t, { sep: ";", eq: ":", hyp: true });
|
|
14569
14571
|
return w(e, (n) => {
|
|
14570
14572
|
n.style.cssText = n.style.cssText + r;
|
|
14571
14573
|
});
|
|
14572
14574
|
}
|
|
14573
|
-
function
|
|
14575
|
+
function Ma(e, t) {
|
|
14574
14576
|
let r = M(t) ? t : [t];
|
|
14575
14577
|
return w(e, (n) => {
|
|
14576
14578
|
let o = n.style.cssText;
|
|
14577
|
-
n.style.cssText = r.reduce((i, s) => i.replace(
|
|
14579
|
+
n.style.cssText = r.reduce((i, s) => i.replace(Jt(s), ""), o).trim();
|
|
14578
14580
|
});
|
|
14579
14581
|
}
|
|
14580
|
-
function
|
|
14582
|
+
function Jt(e) {
|
|
14581
14583
|
return new RegExp(`${e}: [\\w()!\\-,.\\s0-9]+;`);
|
|
14582
14584
|
}
|
|
14583
|
-
function
|
|
14585
|
+
function Ia(e, t) {
|
|
14584
14586
|
return Reflect.has(e, t);
|
|
14585
14587
|
}
|
|
14586
|
-
var
|
|
14588
|
+
var Ta = Object.assign;
|
|
14587
14589
|
function Xe(e) {
|
|
14588
14590
|
let t = window.onbeforeunload || function() {
|
|
14589
14591
|
};
|
|
@@ -14591,15 +14593,15 @@ function Xe(e) {
|
|
|
14591
14593
|
e == null || e(r), t.call(this, r);
|
|
14592
14594
|
}, e;
|
|
14593
14595
|
}
|
|
14594
|
-
function
|
|
14596
|
+
function Fa(e, t) {
|
|
14595
14597
|
w(() => {
|
|
14596
14598
|
document.styleSheets[0].insertRule(e, t);
|
|
14597
14599
|
});
|
|
14598
14600
|
}
|
|
14599
|
-
function
|
|
14601
|
+
function za(e, t) {
|
|
14600
14602
|
return w(e, (r) => r.classList.add(t));
|
|
14601
14603
|
}
|
|
14602
|
-
function
|
|
14604
|
+
function Ba(e, t) {
|
|
14603
14605
|
return w(e, (r) => r.classList.remove(t));
|
|
14604
14606
|
}
|
|
14605
14607
|
function Ge(e, t = "yyyy-MM-dd") {
|
|
@@ -14609,7 +14611,7 @@ function Ge(e, t = "yyyy-MM-dd") {
|
|
|
14609
14611
|
new RegExp(`(${o})`).test(t) && (t = t.replace(RegExp.$1, RegExp.$1.length === 1 ? r[o] : `00${r[o]}`.substr(`${r[o]}`.length)));
|
|
14610
14612
|
return t;
|
|
14611
14613
|
}
|
|
14612
|
-
function
|
|
14614
|
+
function nc(e, t = 0) {
|
|
14613
14615
|
let r = e.includes("-") ? "-" : "/", [n, o, i] = e.split(r), s = new Date(+n, +o - 1, +i).getTime(), a = [], c = true;
|
|
14614
14616
|
t < 0 && (c = false), t = Math.abs(t);
|
|
14615
14617
|
for (let u = 0; u <= t; u++) {
|
|
@@ -14622,13 +14624,13 @@ function Ce(e) {
|
|
|
14622
14624
|
let t = /* @__PURE__ */ new Date();
|
|
14623
14625
|
return t.setMonth(e + 1), t.setDate(0), t.getDate();
|
|
14624
14626
|
}
|
|
14625
|
-
function
|
|
14627
|
+
function ac(e) {
|
|
14626
14628
|
let t = [], r = /* @__PURE__ */ new Date();
|
|
14627
14629
|
r.setMonth(e), r.setDate(1);
|
|
14628
14630
|
let n = 0, o = r.getDay(), i = Ce(e - 1);
|
|
14629
14631
|
console.log(o);
|
|
14630
14632
|
for (let s = 0; s < 6; s++) {
|
|
14631
|
-
let a =
|
|
14633
|
+
let a = Array.from({ length: 7 });
|
|
14632
14634
|
if (s === 0)
|
|
14633
14635
|
for (let c = 0; c < a.length; c++)
|
|
14634
14636
|
a[c] = c < o ? i - o + c + 1 : ++n;
|
|
@@ -14639,15 +14641,15 @@ function sc(e) {
|
|
|
14639
14641
|
}
|
|
14640
14642
|
return t;
|
|
14641
14643
|
}
|
|
14642
|
-
function
|
|
14644
|
+
function mc(e, t, r = "-") {
|
|
14643
14645
|
let n = e.split(r), o = t.split(r);
|
|
14644
14646
|
return n[0] < o[0] ? -1 : n[0] > o[0] ? 1 : n[1] < o[1] ? -1 : n[1] > o[1] ? 1 : n[2] < o[2] ? -1 : n[2] > o[2] ? 1 : 0;
|
|
14645
14647
|
}
|
|
14646
|
-
function
|
|
14648
|
+
function fc(e, t) {
|
|
14647
14649
|
let r = e.split(":"), n = t.split(":");
|
|
14648
14650
|
return r[0] < n[0] ? -1 : r[0] > n[0] ? 1 : r[1] < n[1] ? -1 : r[1] > n[1] ? 1 : 0;
|
|
14649
14651
|
}
|
|
14650
|
-
function
|
|
14652
|
+
function lc() {
|
|
14651
14653
|
let e = /* @__PURE__ */ new Date(), t = e.getDay(), r = t === 0 ? 6 : t - 1, n = new Date(e);
|
|
14652
14654
|
return n.setDate(n.getDate() - r), n.toISOString().match(/(^[0-9]+-[0-9]+-[0-9]+)/)[1];
|
|
14653
14655
|
}
|
|
@@ -14664,17 +14666,17 @@ function Se(e, t) {
|
|
|
14664
14666
|
r == null || r();
|
|
14665
14667
|
};
|
|
14666
14668
|
}
|
|
14667
|
-
function
|
|
14669
|
+
function Dc(e, t) {
|
|
14668
14670
|
return w(e, (r) => t == null ? void 0 : t((e = r).getBoundingClientRect())), x(window, "scroll", () => t == null ? void 0 : t(e.getBoundingClientRect()));
|
|
14669
14671
|
}
|
|
14670
|
-
function
|
|
14672
|
+
function jc(e = "body") {
|
|
14671
14673
|
let t = e === "body";
|
|
14672
14674
|
w(e, (r) => {
|
|
14673
14675
|
var n;
|
|
14674
14676
|
(n = v("input", t ? r : r.parentElement)) == null || n.focus();
|
|
14675
14677
|
});
|
|
14676
14678
|
}
|
|
14677
|
-
function
|
|
14679
|
+
function kc(e, t) {
|
|
14678
14680
|
let r = false, n = [];
|
|
14679
14681
|
return w(e, (o) => {
|
|
14680
14682
|
n.push(x(o, "mouseenter", (i) => t(true, i))), n.push(x(o, "mouseleave", (i) => t(false, i))), r && n.forEach((i) => i());
|
|
@@ -14696,7 +14698,7 @@ function Ke(e, t, r) {
|
|
|
14696
14698
|
o == null || o();
|
|
14697
14699
|
};
|
|
14698
14700
|
}
|
|
14699
|
-
function
|
|
14701
|
+
function Yc(e, t) {
|
|
14700
14702
|
if (!D(e))
|
|
14701
14703
|
return;
|
|
14702
14704
|
let r = setInterval(e, t);
|
|
@@ -14721,10 +14723,10 @@ function me(e, t, r = { childList: true }) {
|
|
|
14721
14723
|
o == null || o();
|
|
14722
14724
|
};
|
|
14723
14725
|
}
|
|
14724
|
-
function
|
|
14726
|
+
function em(e) {
|
|
14725
14727
|
return x(window, "resize", () => e == null ? void 0 : e(document.documentElement.clientWidth || document.body.clientWidth, document.documentElement.clientHeight || document.body.clientHeight));
|
|
14726
14728
|
}
|
|
14727
|
-
function
|
|
14729
|
+
function nm(e) {
|
|
14728
14730
|
return x(document, "scroll", () => e == null ? void 0 : e(document.documentElement.scrollLeft || window.pageXOffset || document.body.scrollLeft, document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop));
|
|
14729
14731
|
}
|
|
14730
14732
|
function et(e, t = 0) {
|
|
@@ -14733,7 +14735,7 @@ function et(e, t = 0) {
|
|
|
14733
14735
|
let r = setTimeout(e, t);
|
|
14734
14736
|
return () => clearTimeout(r);
|
|
14735
14737
|
}
|
|
14736
|
-
function
|
|
14738
|
+
function mm(e, t) {
|
|
14737
14739
|
let r = g(e) ? v(e) : e, n = g(t) ? v(t) : t;
|
|
14738
14740
|
if (!r || !n)
|
|
14739
14741
|
return false;
|
|
@@ -14747,23 +14749,23 @@ function ue(e, t = "") {
|
|
|
14747
14749
|
throw new Error(r);
|
|
14748
14750
|
}
|
|
14749
14751
|
}
|
|
14750
|
-
function
|
|
14752
|
+
function ym(e) {
|
|
14751
14753
|
let { title: t, meta: r, script: n, link: o } = e, i = Je();
|
|
14752
|
-
return t && (document.title = g(t) ? t : t()), r && r.length &&
|
|
14754
|
+
return t && (document.title = g(t) ? t : t()), r && r.length && er(i, r), n && n.length && tr(i, n), o && o.length && Kt(i, o), $(document.head, i), z(i);
|
|
14753
14755
|
}
|
|
14754
|
-
function
|
|
14756
|
+
function Kt(e, t) {
|
|
14755
14757
|
e.append(...t.map(({ rel: r, href: n }) => E("link", { rel: r, href: n })));
|
|
14756
14758
|
}
|
|
14757
|
-
function
|
|
14759
|
+
function er(e, t) {
|
|
14758
14760
|
e.append(...t.map(({ name: r, content: n }) => E("meta", { name: r, content: n })));
|
|
14759
14761
|
}
|
|
14760
|
-
function
|
|
14761
|
-
e.append(...t.map(({ src: r, type: n }) => E("script", Object.assign({ src: r },
|
|
14762
|
+
function tr(e, t) {
|
|
14763
|
+
e.append(...t.map(({ src: r, type: n }) => E("script", Object.assign({ src: r }, rr(n) ? { type: n } : { [n]: "" }))));
|
|
14762
14764
|
}
|
|
14763
|
-
function
|
|
14765
|
+
function rr(e) {
|
|
14764
14766
|
return e === "module" || e === "nomodule";
|
|
14765
14767
|
}
|
|
14766
|
-
function
|
|
14768
|
+
function Im(e, t, r) {
|
|
14767
14769
|
let n = [], o = false;
|
|
14768
14770
|
return w(e, (i) => {
|
|
14769
14771
|
let s, a, c = document.createEvent("Event");
|
|
@@ -14776,7 +14778,7 @@ function Em(e, t, r) {
|
|
|
14776
14778
|
n.length ? n.forEach((i) => i()) : o = true;
|
|
14777
14779
|
};
|
|
14778
14780
|
}
|
|
14779
|
-
function
|
|
14781
|
+
function Sm(e, t) {
|
|
14780
14782
|
let r = false, n = [], o = false;
|
|
14781
14783
|
return w(e, (i) => {
|
|
14782
14784
|
n.push(Se(i, (s) => {
|
|
@@ -14793,14 +14795,14 @@ function Cm(e, t) {
|
|
|
14793
14795
|
function tt(e) {
|
|
14794
14796
|
return document.createTextNode(e);
|
|
14795
14797
|
}
|
|
14796
|
-
function
|
|
14798
|
+
function Lm(e) {
|
|
14797
14799
|
let t = document.createRange();
|
|
14798
14800
|
return t.setStart(e, 0), t.setEnd(e, 0), t.getBoundingClientRect();
|
|
14799
14801
|
}
|
|
14800
|
-
var
|
|
14802
|
+
var nr = ["3g2", "3gp", "aaf", "asf", "avchd", "avi", "drc", "flv", "m2v", "m3u8", "m4p", "m4v", "mkv", "mng", "mov", "mp2", "mp4", "mpe", "mpeg", "mpg", "mpv", "mxf", "nsv", "ogg", "ogv", "qt", "rm", "rmvb", "roq", "svi", "vob", "webm", "wmv", "yuv"];
|
|
14801
14803
|
function fe(e) {
|
|
14802
14804
|
let t = e.lastIndexOf(".") + 1;
|
|
14803
|
-
return
|
|
14805
|
+
return nr.includes(e.slice(t, e.length).toLowerCase());
|
|
14804
14806
|
}
|
|
14805
14807
|
function Ae(e, t) {
|
|
14806
14808
|
let r, n;
|
|
@@ -14816,7 +14818,7 @@ function Ae(e, t) {
|
|
|
14816
14818
|
return a.src = s, t && a.setAttribute("style", t), a;
|
|
14817
14819
|
}
|
|
14818
14820
|
}
|
|
14819
|
-
function
|
|
14821
|
+
function du(e, t, r = 200, n = 20) {
|
|
14820
14822
|
j(t) && (r = t, t = "body"), t || (t = "body");
|
|
14821
14823
|
let o = Ae(e, `width:${r}px;position:absolute;`), i = E("div", { id: "simon-waterfall", style: "position:relative;width:100%;height:100%;" });
|
|
14822
14824
|
x(window, "resize", () => s(t));
|
|
@@ -14850,10 +14852,10 @@ function gu(e, t, r = 200, n = 20) {
|
|
|
14850
14852
|
return c.removeChild(c.children[u]);
|
|
14851
14853
|
}
|
|
14852
14854
|
}
|
|
14853
|
-
function
|
|
14855
|
+
function wu(e) {
|
|
14854
14856
|
return e.replace(/[&<>'"]/g, (t) => ({ "&": "&", "<": "<", ">": ">", "'": "'", '"': """ })[t] || t);
|
|
14855
14857
|
}
|
|
14856
|
-
function
|
|
14858
|
+
function Eu(e = "", t = {}) {
|
|
14857
14859
|
return new Promise((r, n) => {
|
|
14858
14860
|
let o = new DomHandler((s, a) => {
|
|
14859
14861
|
s ? n(new Error(s)) : r(rt(a, t));
|
|
@@ -14874,7 +14876,7 @@ function rt(e, t) {
|
|
|
14874
14876
|
break;
|
|
14875
14877
|
}
|
|
14876
14878
|
}
|
|
14877
|
-
r += n.tagName ? `<${n.tagName}${
|
|
14879
|
+
r += n.tagName ? `<${n.tagName}${sr(n.attribs)}>${rt(n.children, t)}</${n.tagName}>` : "", o.forEach((p) => p());
|
|
14878
14880
|
}
|
|
14879
14881
|
if (n.type === "text" && (r += n.data), n.type === "comment") {
|
|
14880
14882
|
let p = t.comment;
|
|
@@ -14895,21 +14897,21 @@ function rt(e, t) {
|
|
|
14895
14897
|
}
|
|
14896
14898
|
}, "");
|
|
14897
14899
|
}
|
|
14898
|
-
function
|
|
14900
|
+
function sr(e) {
|
|
14899
14901
|
return Object.keys(e).reduce((t, r) => {
|
|
14900
14902
|
let n = e[r];
|
|
14901
14903
|
return n === "" ? t += ` ${r}` : n && (t += ` ${r}="${n}"`), t;
|
|
14902
14904
|
}, "");
|
|
14903
14905
|
}
|
|
14904
|
-
function
|
|
14906
|
+
function vu(e) {
|
|
14905
14907
|
return e.replace(/&|<|>|'|"/g, (t) => ({ "&": "&", "<": "<", ">": ">", "'": "'", """: '"' })[t] || t);
|
|
14906
14908
|
}
|
|
14907
|
-
var
|
|
14908
|
-
function
|
|
14909
|
+
var ar = /(<.* style=['"]([ \w$\-\_:;\n]*)['"][\/ "'$\-_\w]*>)/gm;
|
|
14910
|
+
function Cu(e, t) {
|
|
14909
14911
|
let r = 0;
|
|
14910
|
-
return e.replace(
|
|
14912
|
+
return e.replace(ar, (n, o, i) => n.replace(i, t(i, o, r++)));
|
|
14911
14913
|
}
|
|
14912
|
-
function
|
|
14914
|
+
function ju() {
|
|
14913
14915
|
location.protocol !== "https:" && location.replace(`https://${location.href.split("//")[1]}`);
|
|
14914
14916
|
}
|
|
14915
14917
|
function nt(e) {
|
|
@@ -14918,15 +14920,15 @@ function nt(e) {
|
|
|
14918
14920
|
function ot(e) {
|
|
14919
14921
|
return L.call(e) === "[object Blob]";
|
|
14920
14922
|
}
|
|
14921
|
-
function
|
|
14923
|
+
function Hu(e = 0) {
|
|
14922
14924
|
try {
|
|
14923
14925
|
return document.documentElement.clientHeight + window.scrollY + e >= (document.documentElement.scrollHeight || document.documentElement.clientHeight);
|
|
14924
14926
|
} catch (t) {
|
|
14925
14927
|
throw new Error(t);
|
|
14926
14928
|
}
|
|
14927
14929
|
}
|
|
14928
|
-
var
|
|
14929
|
-
function
|
|
14930
|
+
var Wu = () => W(window);
|
|
14931
|
+
function Yu(e) {
|
|
14930
14932
|
return /[\u4E00-\u9FA5]/.test(e);
|
|
14931
14933
|
}
|
|
14932
14934
|
function it(e) {
|
|
@@ -14953,26 +14955,26 @@ function pe(e, t) {
|
|
|
14953
14955
|
}
|
|
14954
14956
|
return false;
|
|
14955
14957
|
}
|
|
14956
|
-
function
|
|
14958
|
+
function Gu(e) {
|
|
14957
14959
|
return e.__esModule || e[Symbol.toStringTag] === "Module";
|
|
14958
14960
|
}
|
|
14959
|
-
function
|
|
14961
|
+
function H(e) {
|
|
14960
14962
|
return nt(e) ? e : import_path.default.resolve(import_process.default.cwd(), e);
|
|
14961
14963
|
}
|
|
14962
|
-
function
|
|
14964
|
+
function sf(e) {
|
|
14963
14965
|
try {
|
|
14964
|
-
return import_fs2.default.accessSync(
|
|
14966
|
+
return import_fs2.default.accessSync(H(e)), true;
|
|
14965
14967
|
} catch (e2) {
|
|
14966
14968
|
return false;
|
|
14967
14969
|
}
|
|
14968
14970
|
}
|
|
14969
|
-
function
|
|
14971
|
+
function cf(e) {
|
|
14970
14972
|
return e === false;
|
|
14971
14973
|
}
|
|
14972
|
-
function
|
|
14974
|
+
function uf(e, t) {
|
|
14973
14975
|
return new RegExp(`\\.${t}(\\?[^.]+)?$`).test(e);
|
|
14974
14976
|
}
|
|
14975
|
-
function
|
|
14977
|
+
function F(e, t = [], r = "inherit", n, o) {
|
|
14976
14978
|
return B(t) ? (n = t, t = [], r = "inherit") : g(t) && (r = t, t = []), M(e) ? e.map((s) => i(s)) : i(e);
|
|
14977
14979
|
function i(s) {
|
|
14978
14980
|
var m;
|
|
@@ -14980,62 +14982,62 @@ function H(e, t = [], r = "inherit", n, o) {
|
|
|
14980
14982
|
return a === 130 ? (o && console.log("\u5DF2\u53D6\u6D88..."), { status: a, result: u }) : (a !== 0 && (o && console.log(u), n && process.exit(1)), { status: a, result: u });
|
|
14981
14983
|
}
|
|
14982
14984
|
}
|
|
14983
|
-
function
|
|
14984
|
-
let e = process.cwd(), t = import_path2.default.resolve(e, "go.mod"), { result: r } =
|
|
14985
|
+
function wf() {
|
|
14986
|
+
let e = process.cwd(), t = import_path2.default.resolve(e, "go.mod"), { result: r } = F(`(test -f "main.go" || test -f "${t}") && echo "0"|| echo "1"`, "pipe");
|
|
14985
14987
|
return r === "0";
|
|
14986
14988
|
}
|
|
14987
|
-
function
|
|
14989
|
+
function Mf(e) {
|
|
14988
14990
|
return /^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/.test(e);
|
|
14989
14991
|
}
|
|
14990
|
-
function
|
|
14992
|
+
function If(e) {
|
|
14991
14993
|
return /^([\da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^::([\da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:):([\da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){2}:([\da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){3}:([\da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}$|^:((:[\da-fA-F]{1,4}){1,6}|:)$|^[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,5}|:)$|^([\da-fA-F]{1,4}:){2}((:[\da-fA-F]{1,4}){1,4}|:)$|^([\da-fA-F]{1,4}:){3}((:[\da-fA-F]{1,4}){1,3}|:)$|^([\da-fA-F]{1,4}:){4}((:[\da-fA-F]{1,4}){1,2}|:)$|^([\da-fA-F]{1,4}:){5}:([\da-fA-F]{1,4})?$|^([\da-fA-F]{1,4}:){6}:$/.test(e);
|
|
14992
14994
|
}
|
|
14993
|
-
function
|
|
14995
|
+
function Tf(e) {
|
|
14994
14996
|
return /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(e);
|
|
14995
14997
|
}
|
|
14996
|
-
function
|
|
14998
|
+
function Sf(e) {
|
|
14997
14999
|
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
14998
15000
|
}
|
|
14999
|
-
function
|
|
15001
|
+
function Df(e) {
|
|
15000
15002
|
return /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/.test(e);
|
|
15001
15003
|
}
|
|
15002
|
-
function
|
|
15004
|
+
function Of(e) {
|
|
15003
15005
|
return e == null;
|
|
15004
15006
|
}
|
|
15005
|
-
function
|
|
15007
|
+
function Q(e) {
|
|
15006
15008
|
return typeof e == "object";
|
|
15007
15009
|
}
|
|
15008
|
-
function
|
|
15009
|
-
let t = import_path3.default.resolve(e.replace(/package.json$/, ""), "package.json"), { result: r } =
|
|
15010
|
+
function Ff(e = process.cwd()) {
|
|
15011
|
+
let t = import_path3.default.resolve(e.replace(/package.json$/, ""), "package.json"), { result: r } = F(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
|
|
15010
15012
|
return r === "0";
|
|
15011
15013
|
}
|
|
15012
15014
|
function $f(e) {
|
|
15013
15015
|
return /^[1-9][0-9]{5}$/.test(e.toString());
|
|
15014
15016
|
}
|
|
15015
|
-
function
|
|
15017
|
+
function Hf(e) {
|
|
15016
15018
|
return /^(\.\.\/|\.\/)/.test(e);
|
|
15017
15019
|
}
|
|
15018
|
-
function
|
|
15019
|
-
let e = process.cwd(), t = import_path4.default.resolve(e, "Cargo.toml"), { result: r } =
|
|
15020
|
+
function Vf() {
|
|
15021
|
+
let e = process.cwd(), t = import_path4.default.resolve(e, "Cargo.toml"), { result: r } = F(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
|
|
15020
15022
|
return r === "0";
|
|
15021
15023
|
}
|
|
15022
|
-
function
|
|
15024
|
+
function _f(e, t) {
|
|
15023
15025
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
15024
15026
|
}
|
|
15025
15027
|
function Zf() {
|
|
15026
15028
|
return !!(navigator && (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia));
|
|
15027
15029
|
}
|
|
15028
|
-
function
|
|
15030
|
+
function Xf() {
|
|
15029
15031
|
try {
|
|
15030
15032
|
return document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp") === 0;
|
|
15031
15033
|
} catch (e) {
|
|
15032
15034
|
return false;
|
|
15033
15035
|
}
|
|
15034
15036
|
}
|
|
15035
|
-
function
|
|
15037
|
+
function Jf(e) {
|
|
15036
15038
|
return e === true;
|
|
15037
15039
|
}
|
|
15038
|
-
function
|
|
15040
|
+
function ep(e) {
|
|
15039
15041
|
return /^http[s]?:\/\/.*/.test(e);
|
|
15040
15042
|
}
|
|
15041
15043
|
function st() {
|
|
@@ -15044,50 +15046,54 @@ function st() {
|
|
|
15044
15046
|
function at(e) {
|
|
15045
15047
|
return e.startsWith("ws://") || e.startsWith("wss://");
|
|
15046
15048
|
}
|
|
15047
|
-
function
|
|
15049
|
+
function op(e) {
|
|
15048
15050
|
return /^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*/i.test(e);
|
|
15049
15051
|
}
|
|
15050
|
-
var
|
|
15051
|
-
var
|
|
15052
|
-
|
|
15053
|
-
|
|
15054
|
-
|
|
15055
|
-
function
|
|
15056
|
-
return
|
|
15052
|
+
var sp = (e) => /^[GCDZTSPKXLY1-9]\d{1,4}$/.test(e);
|
|
15053
|
+
var cp = (e) => /^(?:[\u4E00-\u9FA5·]{2,16})$/.test(e);
|
|
15054
|
+
function up(e) {
|
|
15055
|
+
return /(^[a-zA-Z][a-zA-Z\s]{0,20}[a-zA-Z]$)/.test(e);
|
|
15056
|
+
}
|
|
15057
|
+
function pp(e) {
|
|
15058
|
+
return /^[\u4E00-\u9FA5](字第)([0-9a-zA-Z]{4,8})(号?)$/.test(e);
|
|
15057
15059
|
}
|
|
15058
|
-
|
|
15060
|
+
var dr = /^[0-9]+$/;
|
|
15061
|
+
function gp(e) {
|
|
15062
|
+
return e.split(".").every((t) => dr.test(t));
|
|
15063
|
+
}
|
|
15064
|
+
function hp(e) {
|
|
15059
15065
|
var t;
|
|
15060
15066
|
return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "DIV";
|
|
15061
15067
|
}
|
|
15062
|
-
function
|
|
15068
|
+
function yp(e) {
|
|
15063
15069
|
var t;
|
|
15064
15070
|
return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "IFRAME";
|
|
15065
15071
|
}
|
|
15066
|
-
function
|
|
15072
|
+
function bp(e) {
|
|
15067
15073
|
var t;
|
|
15068
15074
|
return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "IMG";
|
|
15069
15075
|
}
|
|
15070
|
-
function
|
|
15076
|
+
function Ip(e) {
|
|
15071
15077
|
return e instanceof Node || j(e == null ? void 0 : e.nodeType);
|
|
15072
15078
|
}
|
|
15073
|
-
function
|
|
15079
|
+
function Tp(e) {
|
|
15074
15080
|
return toString.call(e) === "[object ProxyDocument]";
|
|
15075
15081
|
}
|
|
15076
|
-
function
|
|
15082
|
+
function Sp(e) {
|
|
15077
15083
|
var t;
|
|
15078
15084
|
return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "SCRIPT";
|
|
15079
15085
|
}
|
|
15080
|
-
function
|
|
15086
|
+
function Dp(e) {
|
|
15081
15087
|
return typeof ShadowRoot < "u" && e instanceof ShadowRoot;
|
|
15082
15088
|
}
|
|
15083
|
-
function
|
|
15089
|
+
function Op(e) {
|
|
15084
15090
|
var t;
|
|
15085
15091
|
return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "STYLE";
|
|
15086
15092
|
}
|
|
15087
|
-
function
|
|
15093
|
+
function jp(e) {
|
|
15088
15094
|
return e.endsWith(".vue");
|
|
15089
15095
|
}
|
|
15090
|
-
function
|
|
15096
|
+
function Fp(e) {
|
|
15091
15097
|
try {
|
|
15092
15098
|
return import_fs3.default.accessSync(e, import_fs3.default.constants.W_OK), true;
|
|
15093
15099
|
} catch (e2) {
|
|
@@ -15097,15 +15103,15 @@ function Pp(e) {
|
|
|
15097
15103
|
function $p(e) {
|
|
15098
15104
|
return /<! -{2,}.*?-{2,}>/.test(e);
|
|
15099
15105
|
}
|
|
15100
|
-
function
|
|
15106
|
+
function Hp() {
|
|
15101
15107
|
return !document.hidden;
|
|
15102
15108
|
}
|
|
15103
|
-
function
|
|
15109
|
+
function ig(e) {
|
|
15104
15110
|
return me(e, () => {
|
|
15105
15111
|
console.groupCollapsed("childList or sub tree or attributes changed"), console.trace(), console.groupEnd();
|
|
15106
15112
|
}, { childList: true, subtree: true, attributes: true });
|
|
15107
15113
|
}
|
|
15108
|
-
function
|
|
15114
|
+
function cg(e) {
|
|
15109
15115
|
try {
|
|
15110
15116
|
let t = E("textarea", { readonly: "readonly" }, e);
|
|
15111
15117
|
document.body.appendChild(t), t.select();
|
|
@@ -15115,11 +15121,11 @@ function ag(e) {
|
|
|
15115
15121
|
throw new Error(t);
|
|
15116
15122
|
}
|
|
15117
15123
|
}
|
|
15118
|
-
function
|
|
15124
|
+
function ug(e) {
|
|
15119
15125
|
let t = (...r) => r.length >= e.length ? e(...r) : (...n) => t(...r, ...n);
|
|
15120
15126
|
return t;
|
|
15121
15127
|
}
|
|
15122
|
-
function
|
|
15128
|
+
function pg(e) {
|
|
15123
15129
|
return new Promise((t) => setTimeout(t, e));
|
|
15124
15130
|
}
|
|
15125
15131
|
function mt(e, t) {
|
|
@@ -15134,7 +15140,7 @@ async function ut(e, t) {
|
|
|
15134
15140
|
}
|
|
15135
15141
|
return r;
|
|
15136
15142
|
}
|
|
15137
|
-
var
|
|
15143
|
+
var yg = function(t, r, n) {
|
|
15138
15144
|
let o, i = ut(t, () => clearTimeout(o)), s = new Promise((a, c) => {
|
|
15139
15145
|
o = setTimeout(() => c(new Error(n)), r);
|
|
15140
15146
|
});
|
|
@@ -15142,7 +15148,7 @@ var xg = function(t, r, n) {
|
|
|
15142
15148
|
};
|
|
15143
15149
|
function ft() {
|
|
15144
15150
|
}
|
|
15145
|
-
function
|
|
15151
|
+
function Eg(...e) {
|
|
15146
15152
|
return e.length === 0 ? ft : e.length === 1 ? e[0] : function(...t) {
|
|
15147
15153
|
let r;
|
|
15148
15154
|
for (let n of e)
|
|
@@ -15150,16 +15156,16 @@ function Mg(...e) {
|
|
|
15150
15156
|
return r;
|
|
15151
15157
|
};
|
|
15152
15158
|
}
|
|
15153
|
-
function
|
|
15154
|
-
if (typeof Promise
|
|
15159
|
+
function Cg(e) {
|
|
15160
|
+
if (typeof Promise < "u")
|
|
15155
15161
|
Promise.resolve().then(e);
|
|
15156
|
-
else if (typeof MutationObserver
|
|
15162
|
+
else if (typeof MutationObserver < "u") {
|
|
15157
15163
|
let t = tt("0");
|
|
15158
15164
|
me(t, e, { characterData: true }), t.data = "1";
|
|
15159
15165
|
} else
|
|
15160
15166
|
setTimeout(e);
|
|
15161
15167
|
}
|
|
15162
|
-
function
|
|
15168
|
+
function Ag(e) {
|
|
15163
15169
|
let t;
|
|
15164
15170
|
return new Proxy(e, { construct(r, n) {
|
|
15165
15171
|
return t || (t = new r(...n)), t;
|
|
@@ -15169,45 +15175,37 @@ function le(e) {
|
|
|
15169
15175
|
let t = new Blob([`(${e.toString()})()`], { type: "text/javascript" });
|
|
15170
15176
|
return URL.createObjectURL(t);
|
|
15171
15177
|
}
|
|
15172
|
-
function
|
|
15178
|
+
function jg(e) {
|
|
15173
15179
|
let t = new Worker(g(e) ? e : le(e)), r, n, o = (s) => r = s, i = (s) => n = s;
|
|
15174
15180
|
return t.onerror = (s) => n == null ? void 0 : n(s), t.onmessage = (s) => r == null ? void 0 : r(s.data), { emit: (s) => t.postMessage(s), on: o, error: i };
|
|
15175
15181
|
}
|
|
15176
|
-
function
|
|
15182
|
+
function kg(e, t) {
|
|
15177
15183
|
return "serviceWorker" in navigator ? navigator.serviceWorker.register(g(e) ? e : le(e), t) : Promise.reject(new Error("ServiceWorker not support"));
|
|
15178
15184
|
}
|
|
15179
|
-
var
|
|
15180
|
-
function
|
|
15185
|
+
var zg = () => false;
|
|
15186
|
+
function Bg(e, t) {
|
|
15181
15187
|
let r = null;
|
|
15182
15188
|
return function(n) {
|
|
15183
|
-
|
|
15189
|
+
k(r) || clearTimeout(r), r = setTimeout(() => {
|
|
15184
15190
|
let o = e.call(this, n);
|
|
15185
15191
|
return r = null, o;
|
|
15186
15192
|
}, t);
|
|
15187
15193
|
};
|
|
15188
15194
|
}
|
|
15189
|
-
async function Vg(e
|
|
15190
|
-
|
|
15191
|
-
|
|
15192
|
-
|
|
15193
|
-
|
|
15194
|
-
|
|
15195
|
-
|
|
15196
|
-
|
|
15197
|
-
|
|
15198
|
-
|
|
15199
|
-
|
|
15200
|
-
|
|
15201
|
-
let l = y.end(), h = /\.([a-zA-Z0-9]+)$/.exec(e.name)[1], b = `${l}.${h}`;
|
|
15202
|
-
m({ HASH: l, suffix: h, filename: b, buffer: d2 });
|
|
15203
|
-
};
|
|
15204
|
-
} catch (p) {
|
|
15205
|
-
f(new Error(p));
|
|
15206
|
-
}
|
|
15207
|
-
});
|
|
15208
|
-
}
|
|
15195
|
+
async function Vg(e) {
|
|
15196
|
+
return new Promise((t) => {
|
|
15197
|
+
let { file: r, chunkSize: n = 5 * 1024 * 1024, callback: o } = e || {}, i = navigator.hardwareConcurrency || 4, s = [], a = Math.ceil(r.size / n), c = Math.ceil(a / i), u = 0;
|
|
15198
|
+
for (let m = 0; m < i; m++) {
|
|
15199
|
+
let f = new Worker("./dist/worker/fileSpliceWorker.js", { type: "module" }), p = m * c, d2 = p + c;
|
|
15200
|
+
d2 > a && (d2 = a), f.postMessage({ file: r, i: m, chunkSize: n, startIndex: p, endIndex: d2 }), f.onmessage = ({ data: y }) => {
|
|
15201
|
+
u++;
|
|
15202
|
+
let l = { ...y, fileName: r.name, type: r.type, size: r.size, lastModified: r.lastModified, isDone: u === i, remaning: i - u };
|
|
15203
|
+
s.push(l), o && o(l), f.terminate(), u === i && t(s);
|
|
15204
|
+
};
|
|
15205
|
+
}
|
|
15206
|
+
});
|
|
15209
15207
|
}
|
|
15210
|
-
function
|
|
15208
|
+
function _g(e = 50) {
|
|
15211
15209
|
return { set(t, r) {
|
|
15212
15210
|
this.cache.has(t) && this.cache.delete(t), this.cache.set(t, r), this.cache.size > this.max && this.cache.delete(this.cache.keys().next().value);
|
|
15213
15211
|
}, get(t) {
|
|
@@ -15274,31 +15272,42 @@ function ad(e) {
|
|
|
15274
15272
|
return t = true, e.apply(this, r);
|
|
15275
15273
|
};
|
|
15276
15274
|
}
|
|
15277
|
-
var
|
|
15275
|
+
var lt = /* @__PURE__ */ new Map();
|
|
15276
|
+
function ud(e, t, r) {
|
|
15277
|
+
return new Promise((n) => {
|
|
15278
|
+
let o = t * r, i = o + r, s = new import_spark_md5.default.ArrayBuffer(), a = new FileReader();
|
|
15279
|
+
a.onload = (c) => {
|
|
15280
|
+
var f;
|
|
15281
|
+
let u = (f = c.target) == null ? void 0 : f.result, m;
|
|
15282
|
+
lt.has(u) ? m = lt.get(u) : (s.append(u), m = s.end()), n({ start: o, end: i, index: t, hash: m });
|
|
15283
|
+
}, a.readAsArrayBuffer(e.slice(o, i));
|
|
15284
|
+
});
|
|
15285
|
+
}
|
|
15286
|
+
var yr = /<script .*src=["']([\w?=.\/@]+)["']><\/script>/gm;
|
|
15278
15287
|
var ge;
|
|
15279
|
-
function
|
|
15288
|
+
function Sd(e = 2e3, t) {
|
|
15280
15289
|
return U(async () => {
|
|
15281
|
-
await
|
|
15290
|
+
await br() && (console.log("\u9875\u9762\u6709\u66F4\u65B0"), t == null || t());
|
|
15282
15291
|
}, e);
|
|
15283
15292
|
}
|
|
15284
|
-
async function
|
|
15293
|
+
async function wr() {
|
|
15285
15294
|
let e = await fetch(`/?_timestamp=${Date.now()}`).then((n) => n.text()), t = [], r;
|
|
15286
|
-
for (; (r =
|
|
15295
|
+
for (; (r = yr.exec(e)) && !t.includes(r[1]); )
|
|
15287
15296
|
t.push(r[1]);
|
|
15288
15297
|
return t;
|
|
15289
15298
|
}
|
|
15290
|
-
async function
|
|
15291
|
-
let e = await
|
|
15299
|
+
async function br() {
|
|
15300
|
+
let e = await wr();
|
|
15292
15301
|
return ge ? pe(ge, e) ? false : (ge = e, true) : (ge = e, false);
|
|
15293
15302
|
}
|
|
15294
|
-
async function
|
|
15303
|
+
async function gt(e) {
|
|
15295
15304
|
if (P(e) || ot(e))
|
|
15296
|
-
return await br(e);
|
|
15297
|
-
if (g(e))
|
|
15298
15305
|
return await Mr(e);
|
|
15306
|
+
if (g(e))
|
|
15307
|
+
return await Er(e);
|
|
15299
15308
|
throw new Error("type must be file or blob or url");
|
|
15300
15309
|
}
|
|
15301
|
-
function
|
|
15310
|
+
function Mr(e) {
|
|
15302
15311
|
return new Promise((t, r) => {
|
|
15303
15312
|
let n = new FileReader();
|
|
15304
15313
|
n.readAsDataURL(e);
|
|
@@ -15312,7 +15321,7 @@ function br(e) {
|
|
|
15312
15321
|
}
|
|
15313
15322
|
});
|
|
15314
15323
|
}
|
|
15315
|
-
function
|
|
15324
|
+
function Er(e) {
|
|
15316
15325
|
return new Promise((t, r) => {
|
|
15317
15326
|
try {
|
|
15318
15327
|
let n = document.createElement("canvas"), o = n.getContext("2d"), i = E("img", { src: `${e}?timeStamp=${(/* @__PURE__ */ new Date()).getTime()}`, crossOrigin: "anonymous" });
|
|
@@ -15324,10 +15333,10 @@ function Mr(e) {
|
|
|
15324
15333
|
}
|
|
15325
15334
|
});
|
|
15326
15335
|
}
|
|
15327
|
-
async function
|
|
15328
|
-
return await
|
|
15336
|
+
async function Pd(e) {
|
|
15337
|
+
return await gt(new Blob([e], { type: "image/*" }));
|
|
15329
15338
|
}
|
|
15330
|
-
async function
|
|
15339
|
+
async function kd(e, t) {
|
|
15331
15340
|
let r = "", n = /data: ({.*})/gm;
|
|
15332
15341
|
for (; ; ) {
|
|
15333
15342
|
let { done: o, value: i } = await e.read();
|
|
@@ -15340,14 +15349,14 @@ async function jd(e, t) {
|
|
|
15340
15349
|
}
|
|
15341
15350
|
return r;
|
|
15342
15351
|
}
|
|
15343
|
-
function
|
|
15352
|
+
function zd(e) {
|
|
15344
15353
|
let t = 0, r = e.length - 1;
|
|
15345
15354
|
return () => {
|
|
15346
15355
|
let n = e[t];
|
|
15347
15356
|
return t++, t > r && (t = 0), n;
|
|
15348
15357
|
};
|
|
15349
15358
|
}
|
|
15350
|
-
async function
|
|
15359
|
+
async function Ud(e, t) {
|
|
15351
15360
|
try {
|
|
15352
15361
|
return [void 0, await e];
|
|
15353
15362
|
} catch (r) {
|
|
@@ -15359,19 +15368,19 @@ var de = class extends Error {
|
|
|
15359
15368
|
super(t), this.name = "CustomerError";
|
|
15360
15369
|
}
|
|
15361
15370
|
};
|
|
15362
|
-
function
|
|
15371
|
+
function uh(e, t) {
|
|
15363
15372
|
throw new de(`[${e}] ${t}`);
|
|
15364
15373
|
}
|
|
15365
|
-
function
|
|
15374
|
+
function fh(e, t) {
|
|
15366
15375
|
if (process.env.NODE_ENV !== "production") {
|
|
15367
15376
|
let r = g(e) ? new de(`[${e}] ${t}`) : e;
|
|
15368
15377
|
console.warn(r);
|
|
15369
15378
|
}
|
|
15370
15379
|
}
|
|
15371
|
-
function
|
|
15372
|
-
console[r]("%c%s", g(t) ? t :
|
|
15380
|
+
function dt(e, t = {}, r = "log") {
|
|
15381
|
+
console[r]("%c%s", g(t) ? t : _(t, { sep: ";", eq: ":", hyp: true, px: true, encode: false }), e);
|
|
15373
15382
|
}
|
|
15374
|
-
function
|
|
15383
|
+
function yh() {
|
|
15375
15384
|
return x(window, "error", (e) => {
|
|
15376
15385
|
let { colno: t, lineno: r, error: n, filename: o, message: i } = e;
|
|
15377
15386
|
if (i.toLowerCase().includes("script error"))
|
|
@@ -15381,10 +15390,10 @@ function gh() {
|
|
|
15381
15390
|
`, `Line: ${r}
|
|
15382
15391
|
`, `Column: ${t}
|
|
15383
15392
|
`, `Error object: ${JSON.stringify(n)}`].join("-");
|
|
15384
|
-
return
|
|
15393
|
+
return dt(s, { color: "#337ecc", padding: "2px 10px", fontSize: 14, fontWeight: "bold" }, "error"), false;
|
|
15385
15394
|
});
|
|
15386
15395
|
}
|
|
15387
|
-
function
|
|
15396
|
+
function bh(e) {
|
|
15388
15397
|
return new Promise((t, r) => {
|
|
15389
15398
|
try {
|
|
15390
15399
|
t(e());
|
|
@@ -15393,7 +15402,7 @@ function hh(e) {
|
|
|
15393
15402
|
}
|
|
15394
15403
|
});
|
|
15395
15404
|
}
|
|
15396
|
-
function
|
|
15405
|
+
function Sh() {
|
|
15397
15406
|
return { data: /* @__PURE__ */ Object.create(null), emit(e, t) {
|
|
15398
15407
|
(this.data[e] || []).forEach((r) => r(t));
|
|
15399
15408
|
}, on(e, t) {
|
|
@@ -15423,46 +15432,46 @@ function he(e, t) {
|
|
|
15423
15432
|
return n.join("");
|
|
15424
15433
|
}
|
|
15425
15434
|
var De = "@simon_he/storage";
|
|
15426
|
-
function
|
|
15435
|
+
function jh(e) {
|
|
15427
15436
|
return x(window, "storage", (t) => {
|
|
15428
15437
|
let { key: r, newValue: n, oldValue: o } = t, i = r != null && r.startsWith(De) ? r.slice(De.length) : r;
|
|
15429
15438
|
e(i, n, o);
|
|
15430
15439
|
});
|
|
15431
15440
|
}
|
|
15432
|
-
function
|
|
15441
|
+
function Nh(e, t) {
|
|
15433
15442
|
localStorage.setItem(De + e, JSON.stringify({ value: t, __temp: he(6) }));
|
|
15434
15443
|
}
|
|
15435
|
-
function
|
|
15444
|
+
function kh(e, t) {
|
|
15436
15445
|
e = at(e) ? e : `ws://${e.replace(/^http[s:\/\/]/, "")}`;
|
|
15437
15446
|
let r = new WebSocket(e, t), n = (a) => r.addEventListener("message", a), o = (a) => r.addEventListener("open", a), i = (a) => r.addEventListener("close", a), s = (a) => r.addEventListener("error", a);
|
|
15438
15447
|
return { socket: r, receive: n, send: r.send.bind(r), open: o, close: i, error: s };
|
|
15439
15448
|
}
|
|
15440
|
-
function
|
|
15449
|
+
function Hh(e) {
|
|
15441
15450
|
let t = new BroadcastChannel(e);
|
|
15442
|
-
t.listeners = /* @__PURE__ */ new Set(), t.id =
|
|
15451
|
+
t.listeners = /* @__PURE__ */ new Set(), t.id = Ir(e);
|
|
15443
15452
|
let r = (n, o) => o.postMessage({ id: o.id, msg: n });
|
|
15444
15453
|
return t.addEventListener("message", (n) => {
|
|
15445
15454
|
n.data.msg === "open" ? (r("response", t), t.listeners.add(n.data.id)) : n.data.msg === "response" ? t.listeners.add(n.data.id) : n.data.msg === "close" && t.listeners.delete(n.data.id);
|
|
15446
15455
|
}), x(window, "beforeunload", () => r("close", t)), r("open", t), t;
|
|
15447
15456
|
}
|
|
15448
|
-
function
|
|
15457
|
+
function Ir(e) {
|
|
15449
15458
|
var _a2;
|
|
15450
15459
|
let t = `channel-${e}`, r = +((_a2 = localStorage.getItem(t)) != null ? _a2 : 0) + 1;
|
|
15451
15460
|
return localStorage.setItem(t, r.toString()), r;
|
|
15452
15461
|
}
|
|
15453
|
-
function
|
|
15462
|
+
function Zh() {
|
|
15454
15463
|
let e, t = 0;
|
|
15455
15464
|
return U((r) => {
|
|
15456
15465
|
t++, e || (e = r), r - e > 1e3 && (console.log("FPS:", Math.round(t * 1e3) / (r - e)), t = 0, e = r);
|
|
15457
15466
|
}, 0);
|
|
15458
15467
|
}
|
|
15459
|
-
function
|
|
15468
|
+
function vr() {
|
|
15460
15469
|
let e = {};
|
|
15461
15470
|
try {
|
|
15462
15471
|
let t = performance.getEntriesByType("navigation")[0];
|
|
15463
15472
|
if (t.domComplete === 0) {
|
|
15464
15473
|
setTimeout(() => {
|
|
15465
|
-
|
|
15474
|
+
vr();
|
|
15466
15475
|
}, 200);
|
|
15467
15476
|
return;
|
|
15468
15477
|
}
|
|
@@ -15471,23 +15480,23 @@ function Ir() {
|
|
|
15471
15480
|
console.log(e), console.log(performance.timing);
|
|
15472
15481
|
}
|
|
15473
15482
|
}
|
|
15474
|
-
function
|
|
15483
|
+
function Gh(e) {
|
|
15475
15484
|
let t = (/* @__PURE__ */ new Date()).getTime();
|
|
15476
15485
|
e();
|
|
15477
15486
|
let n = ((/* @__PURE__ */ new Date()).getTime() - t) / 1e3;
|
|
15478
15487
|
return console.log(`timeCost: ${n}s`), n;
|
|
15479
15488
|
}
|
|
15480
|
-
function
|
|
15489
|
+
function Kh(e = false, t = 5e3, r = 0) {
|
|
15481
15490
|
return new Promise((n, o) => {
|
|
15482
|
-
navigator.geolocation ? navigator.geolocation.getCurrentPosition(
|
|
15491
|
+
navigator.geolocation ? navigator.geolocation.getCurrentPosition(Tr(n), Cr(o), { enableHighAccuracy: e, maximumAge: r, timeout: t }) : o(new Error("\u8BE5\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u5B9A\u4F4D\u529F\u80FD\uFF01"));
|
|
15483
15492
|
});
|
|
15484
15493
|
}
|
|
15485
|
-
function
|
|
15494
|
+
function Tr(e) {
|
|
15486
15495
|
return function(t) {
|
|
15487
15496
|
e(t.coords);
|
|
15488
15497
|
};
|
|
15489
15498
|
}
|
|
15490
|
-
function
|
|
15499
|
+
function Cr(e) {
|
|
15491
15500
|
return function(r) {
|
|
15492
15501
|
switch (r.code) {
|
|
15493
15502
|
case r.PERMISSION_DENIED:
|
|
@@ -15501,53 +15510,53 @@ function Tr(e) {
|
|
|
15501
15510
|
}
|
|
15502
15511
|
};
|
|
15503
15512
|
}
|
|
15504
|
-
function
|
|
15505
|
-
return
|
|
15513
|
+
function cx(e, t) {
|
|
15514
|
+
return F(`cp -r {${e.join(",")}} ${t}`, "pipe");
|
|
15506
15515
|
}
|
|
15507
|
-
async function
|
|
15516
|
+
async function lx(e) {
|
|
15508
15517
|
if (/[./]/.test(e))
|
|
15509
15518
|
throw new Error("module must be a npm module");
|
|
15510
15519
|
let t = import_path5.default.resolve(import_process2.default.cwd(), "node_modules", e, "package.json"), { module: r, main: n } = JSON.parse(await import_promises.default.readFile(t, "utf-8")), o = import_path5.default.resolve(`./node_modules/${e}`, r || n);
|
|
15511
15520
|
return import_promises.default.readFile(o, "utf-8");
|
|
15512
15521
|
}
|
|
15513
|
-
function
|
|
15522
|
+
function yt(e, t) {
|
|
15514
15523
|
return t.endsWith(e) ? t : t + e;
|
|
15515
15524
|
}
|
|
15516
|
-
async function
|
|
15517
|
-
let t =
|
|
15525
|
+
async function wt(e = "./package.json") {
|
|
15526
|
+
let t = H(yt("/package.json", e));
|
|
15518
15527
|
if (!P(t))
|
|
15519
15528
|
throw new Error(`${t} is not a file`);
|
|
15520
15529
|
return JSON.parse(await import_promises2.default.readFile(t, "utf-8"));
|
|
15521
15530
|
}
|
|
15522
|
-
async function
|
|
15523
|
-
let e = await
|
|
15531
|
+
async function vx() {
|
|
15532
|
+
let e = await wt() || {}, { packageManager: t } = e;
|
|
15524
15533
|
if (t) {
|
|
15525
15534
|
let r = t.split("@")[0].replace(/[\~\^]/, "");
|
|
15526
15535
|
if (t)
|
|
15527
15536
|
return r;
|
|
15528
15537
|
}
|
|
15529
15538
|
switch (true) {
|
|
15530
|
-
case P(
|
|
15539
|
+
case P(H("./bun.lockb")):
|
|
15531
15540
|
return "bun";
|
|
15532
|
-
case P(
|
|
15533
|
-
case P(
|
|
15541
|
+
case P(H("./pnpm-lock.yaml")):
|
|
15542
|
+
case P(H("./pnpm-workspace.yaml")):
|
|
15534
15543
|
return "pnpm";
|
|
15535
|
-
case P(
|
|
15536
|
-
case P(
|
|
15544
|
+
case P(H("./yarn.lock")):
|
|
15545
|
+
case P(H("./lerna.json")):
|
|
15537
15546
|
return "yarn";
|
|
15538
15547
|
default:
|
|
15539
15548
|
return "npm";
|
|
15540
15549
|
}
|
|
15541
15550
|
}
|
|
15542
|
-
function
|
|
15551
|
+
function Sx() {
|
|
15543
15552
|
var e, t;
|
|
15544
15553
|
return (t = (e = import_process3.default) == null ? void 0 : e.argv) == null ? void 0 : t.slice(2).reduce((r, n) => {
|
|
15545
15554
|
let [o, i] = n.split("=");
|
|
15546
15555
|
return r[o.slice(2)] = i || true, r;
|
|
15547
15556
|
}, {});
|
|
15548
15557
|
}
|
|
15549
|
-
async function
|
|
15550
|
-
let r = "../node_modules/lazy-js-utils/dist/
|
|
15558
|
+
async function Fx(e, t) {
|
|
15559
|
+
let r = "../node_modules/lazy-js-utils/dist/worker/useNodeWorkerThread.cjs", n = "./worker/useNodeWorkerThread.cjs";
|
|
15551
15560
|
st() && (r = r.replaceAll("/", "\\"), n = n.replaceAll("/", "\\")), t = t || import_path6.default.resolve(__dirname, n), t.includes("node_modules") || (t = import_path6.default.resolve(__dirname, r));
|
|
15552
15561
|
let { params: o } = g(e) ? e = { params: e } : e, i = M(o) ? o : o.split("&&"), s = await mt(i, (c) => a(Object.assign(e, { params: c })));
|
|
15553
15562
|
return setTimeout(import_process4.default.exit), s.length === 1 ? s[0] : s;
|
|
@@ -15559,12 +15568,14 @@ async function Rx(e, t) {
|
|
|
15559
15568
|
});
|
|
15560
15569
|
}
|
|
15561
15570
|
}
|
|
15562
|
-
function
|
|
15571
|
+
function kx(e) {
|
|
15563
15572
|
let { parentPort: t } = import_worker_threads.default;
|
|
15564
15573
|
t.on("message", async (r) => t == null ? void 0 : t.postMessage(await (e == null ? void 0 : e(r)) || (() => "")));
|
|
15565
15574
|
}
|
|
15566
|
-
|
|
15567
|
-
|
|
15575
|
+
function zx(e, t) {
|
|
15576
|
+
return Object.assign(t, { displayName: e });
|
|
15577
|
+
}
|
|
15578
|
+
function Wx(e, t, r = "utf-8") {
|
|
15568
15579
|
g(e) && (e = [e]), e.forEach(async (n, o) => {
|
|
15569
15580
|
let i = await import_promises3.default.readFile(n, r), s = (t == null ? void 0 : t(i, o)) || i;
|
|
15570
15581
|
import_promises3.default.writeFile(n, s).catch((a) => {
|
|
@@ -15572,20 +15583,28 @@ function zx(e, t, r = "utf-8") {
|
|
|
15572
15583
|
});
|
|
15573
15584
|
});
|
|
15574
15585
|
}
|
|
15575
|
-
function
|
|
15576
|
-
let t = import_path7.default.resolve(e, "package.json"), { result: r } =
|
|
15586
|
+
function Qx(e) {
|
|
15587
|
+
let t = import_path7.default.resolve(e, "package.json"), { result: r } = F(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
|
|
15577
15588
|
return r === "0";
|
|
15578
15589
|
}
|
|
15579
|
-
|
|
15580
|
-
|
|
15590
|
+
function Xx(e) {
|
|
15591
|
+
let { status: t } = F(`if ! command -v ${e} &> /dev/null; then
|
|
15592
|
+
exit 1
|
|
15593
|
+
else
|
|
15594
|
+
exit 0
|
|
15595
|
+
fi`);
|
|
15596
|
+
return t === 0;
|
|
15597
|
+
}
|
|
15598
|
+
var uy = { add(...e) {
|
|
15599
|
+
return e.reduce((t, r) => It(+t, +r));
|
|
15581
15600
|
}, sub(...e) {
|
|
15582
|
-
return e.reduce((t, r) =>
|
|
15601
|
+
return e.reduce((t, r) => It(+t, -r));
|
|
15583
15602
|
}, mul(...e) {
|
|
15584
|
-
return e.reduce((t, r) => Or(+t, +r));
|
|
15585
|
-
}, div(...e) {
|
|
15586
15603
|
return e.reduce((t, r) => Rr(+t, +r));
|
|
15604
|
+
}, div(...e) {
|
|
15605
|
+
return e.reduce((t, r) => jr(+t, +r));
|
|
15587
15606
|
} };
|
|
15588
|
-
function
|
|
15607
|
+
function It(e, t) {
|
|
15589
15608
|
let r, n;
|
|
15590
15609
|
try {
|
|
15591
15610
|
r = e.toString().split(".")[1].length;
|
|
@@ -15600,7 +15619,7 @@ function Et(e, t) {
|
|
|
15600
15619
|
let o = 10 ** Math.max(r, n);
|
|
15601
15620
|
return (e * o + t * o) / o;
|
|
15602
15621
|
}
|
|
15603
|
-
function
|
|
15622
|
+
function Rr(e, t) {
|
|
15604
15623
|
let r = 0, n = e.toString(), o = t.toString();
|
|
15605
15624
|
try {
|
|
15606
15625
|
r += n.split(".")[1].length;
|
|
@@ -15612,7 +15631,7 @@ function Or(e, t) {
|
|
|
15612
15631
|
}
|
|
15613
15632
|
return Number(n.replace(".", "")) * Number(o.replace(".", "")) / 10 ** r;
|
|
15614
15633
|
}
|
|
15615
|
-
function
|
|
15634
|
+
function jr(e, t) {
|
|
15616
15635
|
let r = 0, n = 0;
|
|
15617
15636
|
try {
|
|
15618
15637
|
r = e.toString().split(".")[1].length;
|
|
@@ -15625,18 +15644,18 @@ function Rr(e, t) {
|
|
|
15625
15644
|
let o = Number(e.toString().replace(".", "")), i = Number(t.toString().replace(".", ""));
|
|
15626
15645
|
return o / i * 10 ** (n - r);
|
|
15627
15646
|
}
|
|
15628
|
-
function
|
|
15647
|
+
function py(e, t = 2, r = "ceil") {
|
|
15629
15648
|
e = `${e}`.replace(/[^0-9+-Ee.]/g, "");
|
|
15630
15649
|
let n = isFinite(+e) ? +e : 0, o = isFinite(+t) ? Math.abs(t) : 0, i = ",", s = ".", a = (o ? u(n, o) : `${Math.round(n)}`).split("."), c = /(-?\d+)(\d{3})/;
|
|
15631
15650
|
for (; c.test(a[0]); )
|
|
15632
15651
|
a[0] = a[0].replace(c, `$1${i}$2`);
|
|
15633
|
-
return (a[1] || "").length < o && (a[1] = a[1] || "", a[1] +=
|
|
15652
|
+
return (a[1] || "").length < o && (a[1] = a[1] || "", a[1] += Array.from({ length: o - a[1].length + 1 }).join("0")), a.join(s);
|
|
15634
15653
|
function u(m, f) {
|
|
15635
15654
|
let p = 10 ** f;
|
|
15636
15655
|
return `${r === "ceil" ? Math.ceil(m * p) / p : Math.floor(m * p) / p}`;
|
|
15637
15656
|
}
|
|
15638
15657
|
}
|
|
15639
|
-
function
|
|
15658
|
+
function gy(e) {
|
|
15640
15659
|
let t = ["\u89D2", "\u5206"], r = ["\u96F6", "\u58F9", "\u8D30", "\u53C1", "\u8086", "\u4F0D", "\u9646", "\u67D2", "\u634C", "\u7396"], n = [["\u5143", "\u4E07", "\u4EBF"], ["", "\u62FE", "\u4F70", "\u4EDF"]], o = e < 0 ? "\u6B20" : "";
|
|
15641
15660
|
e = Math.abs(e);
|
|
15642
15661
|
let i = "";
|
|
@@ -15651,10 +15670,10 @@ function sy(e) {
|
|
|
15651
15670
|
}
|
|
15652
15671
|
return o + i.replace(/(零.)*零元/, "\u5143").replace(/(零.)+/g, "\u96F6").replace(/^整$/, "\u96F6\u5143\u6574");
|
|
15653
15672
|
}
|
|
15654
|
-
function
|
|
15673
|
+
function xy(e, t) {
|
|
15655
15674
|
return j(e) ? e * t : e.repeat(t);
|
|
15656
15675
|
}
|
|
15657
|
-
function
|
|
15676
|
+
function wy(e) {
|
|
15658
15677
|
return +e % 2 === 0;
|
|
15659
15678
|
}
|
|
15660
15679
|
function J(e, ...t) {
|
|
@@ -15668,22 +15687,22 @@ function J(e, ...t) {
|
|
|
15668
15687
|
n in e && T(e[n]) && T(r[n]) ? J(e[n], r[n]) : e[n] = r[n];
|
|
15669
15688
|
}), e;
|
|
15670
15689
|
}
|
|
15671
|
-
var
|
|
15672
|
-
function
|
|
15690
|
+
var vt = /(\w+)\[(\w+)\]/;
|
|
15691
|
+
function Dy(e, t, r) {
|
|
15673
15692
|
return Object.keys(e).reduce((n, o) => {
|
|
15674
15693
|
let i = e[o];
|
|
15675
|
-
return
|
|
15694
|
+
return Nr(i[r], n, i[t]);
|
|
15676
15695
|
}, {});
|
|
15677
15696
|
}
|
|
15678
|
-
function
|
|
15697
|
+
function Nr(e, t, r) {
|
|
15679
15698
|
let n = e.split(".");
|
|
15680
15699
|
return n.reduce((o, i, s) => {
|
|
15681
15700
|
var _a2;
|
|
15682
15701
|
if (s === n.length - 1)
|
|
15683
15702
|
o[i] = r;
|
|
15684
|
-
else if (
|
|
15703
|
+
else if (vt.test(i)) {
|
|
15685
15704
|
let a;
|
|
15686
|
-
return i.replace(
|
|
15705
|
+
return i.replace(vt, (c, u, m) => {
|
|
15687
15706
|
var _a3, _b;
|
|
15688
15707
|
o[u] = (_a3 = o[u]) != null ? _a3 : [], a = o[u][m] = (_b = o[u][m]) != null ? _b : {};
|
|
15689
15708
|
}), a;
|
|
@@ -15693,8 +15712,8 @@ function jr(e, t, r) {
|
|
|
15693
15712
|
}, t), t;
|
|
15694
15713
|
}
|
|
15695
15714
|
var K = /(\w+)\[(\w+)\]/;
|
|
15696
|
-
function
|
|
15697
|
-
let n = Object.keys(t).reduce((a, c) => (a[t[c]] =
|
|
15715
|
+
function jy(e, t, r = false) {
|
|
15716
|
+
let n = Object.keys(t).reduce((a, c) => (a[t[c]] = Pr(c, e), a), {});
|
|
15698
15717
|
if (!r)
|
|
15699
15718
|
return n;
|
|
15700
15719
|
let o = Object.keys(t), i = JSON.parse(JSON.stringify(e));
|
|
@@ -15711,17 +15730,17 @@ function Ty(e, t, r = false) {
|
|
|
15711
15730
|
let s = Le(i);
|
|
15712
15731
|
return Object.assign(s, n);
|
|
15713
15732
|
}
|
|
15714
|
-
function
|
|
15715
|
-
let n = Object.entries(t).reduce((s, [a, c]) =>
|
|
15733
|
+
function Ny(e, t, r = false) {
|
|
15734
|
+
let n = Object.entries(t).reduce((s, [a, c]) => Fr(a, s, e[c]), {});
|
|
15716
15735
|
if (!r)
|
|
15717
15736
|
return n;
|
|
15718
15737
|
let o = Object.values(t), i = Object.keys(e).filter((s) => !o.includes(s)).reduce((s, a) => (s[a] = e[a], s), {});
|
|
15719
15738
|
return Object.assign(i, n);
|
|
15720
15739
|
}
|
|
15721
|
-
function
|
|
15740
|
+
function Pr(e, t) {
|
|
15722
15741
|
return e.split(".").reduce((r, n) => K.test(n) ? JSON.parse(n.replace(K, (o, i, s) => JSON.stringify(r[i][s]))) : r[n], t);
|
|
15723
15742
|
}
|
|
15724
|
-
function
|
|
15743
|
+
function Fr(e, t, r) {
|
|
15725
15744
|
let n = e.split(".");
|
|
15726
15745
|
return n.reduce((o, i, s) => {
|
|
15727
15746
|
var _a2;
|
|
@@ -15745,56 +15764,56 @@ function Le(e) {
|
|
|
15745
15764
|
}
|
|
15746
15765
|
return e;
|
|
15747
15766
|
}
|
|
15748
|
-
function
|
|
15749
|
-
return
|
|
15767
|
+
function $y(e, t) {
|
|
15768
|
+
return Q(e) ? M(e) ? e.map((r) => Tt(r, t)) : Tt(e, t) : e;
|
|
15750
15769
|
}
|
|
15751
|
-
function
|
|
15770
|
+
function Tt(e, t) {
|
|
15752
15771
|
for (let r in t) {
|
|
15753
15772
|
let n = "", o = null, i = r.split("."), s = i.reduce((a, c, u) => (u === i.length - 1 && (n = c, o = a), a[c]), e);
|
|
15754
15773
|
o[t[r]] = s, delete o[n];
|
|
15755
15774
|
}
|
|
15756
15775
|
return e;
|
|
15757
15776
|
}
|
|
15758
|
-
function
|
|
15759
|
-
return
|
|
15777
|
+
function By(e, t = {}) {
|
|
15778
|
+
return Q(e) && (M(e) ? e.forEach((r, n) => Ct(r, n, t)) : Ct(e, 0, t)), e;
|
|
15760
15779
|
}
|
|
15761
|
-
function
|
|
15780
|
+
function Ct(e, t, r = {}) {
|
|
15762
15781
|
for (let n in r) {
|
|
15763
15782
|
let o = n.split(".").reduce((i, s) => i[s], e);
|
|
15764
15783
|
r[n](o, t, e);
|
|
15765
15784
|
}
|
|
15766
15785
|
}
|
|
15767
|
-
var
|
|
15786
|
+
var kr = [Set, Map, WeakMap, WeakSet, RegExp, Date];
|
|
15768
15787
|
var Oe = /* @__PURE__ */ new WeakMap();
|
|
15769
15788
|
function $r(e) {
|
|
15770
15789
|
if (Oe.has(e))
|
|
15771
15790
|
return Oe.get(e);
|
|
15772
|
-
if (D(e) ||
|
|
15791
|
+
if (D(e) || k(e))
|
|
15773
15792
|
return e;
|
|
15774
|
-
if (
|
|
15793
|
+
if (kr.includes(e.constructor))
|
|
15775
15794
|
return new e.constructor(e);
|
|
15776
|
-
if (!
|
|
15795
|
+
if (!Q(e))
|
|
15777
15796
|
return e;
|
|
15778
15797
|
let t = Object.create(Object.getPrototypeOf(e), Object.getOwnPropertyDescriptors(e));
|
|
15779
15798
|
Oe.set(e, t);
|
|
15780
15799
|
for (let r of Reflect.ownKeys(e))
|
|
15781
|
-
|
|
15800
|
+
Q(e[r]) ? t[r] = $r(e[r]) : t[r] = e[r];
|
|
15782
15801
|
return t;
|
|
15783
15802
|
}
|
|
15784
|
-
function
|
|
15803
|
+
function St(e, t, r, n = [], o = [], i, s) {
|
|
15785
15804
|
if (T(e) && T(t)) {
|
|
15786
15805
|
let a = Object.keys(e).length >= Object.keys(t).length ? e : t;
|
|
15787
15806
|
for (let c in a) {
|
|
15788
15807
|
if (M(r) && r.includes(c) || ee(r) && r.test(c))
|
|
15789
15808
|
continue;
|
|
15790
15809
|
let u = e[c], m = t[c], f = i ? `${i}.${c}` : c;
|
|
15791
|
-
|
|
15810
|
+
St(u, m, r, n, o, f);
|
|
15792
15811
|
}
|
|
15793
15812
|
} else if (M(e) && M(t)) {
|
|
15794
15813
|
let a = e.length >= t.length ? e : t;
|
|
15795
15814
|
for (let c in a) {
|
|
15796
15815
|
let u = e[c], m = t[c];
|
|
15797
|
-
|
|
15816
|
+
St(u, m, r, n, o, i, c);
|
|
15798
15817
|
}
|
|
15799
15818
|
} else if (e !== t) {
|
|
15800
15819
|
i = i || "array";
|
|
@@ -15803,33 +15822,33 @@ function Ct(e, t, r, n = [], o = [], i, s) {
|
|
|
15803
15822
|
}
|
|
15804
15823
|
return { error: n, errorMsg: o };
|
|
15805
15824
|
}
|
|
15806
|
-
function
|
|
15825
|
+
function c0(e, t = {}) {
|
|
15807
15826
|
let { sep: r = "&", eq: n = "=", camel: o = false } = t;
|
|
15808
15827
|
return e.split(r).reduce((i, s) => {
|
|
15809
15828
|
let [a, c] = s.split(n);
|
|
15810
15829
|
return o ? i[Be(a)] = c : i[a] = c, i;
|
|
15811
15830
|
}, {});
|
|
15812
15831
|
}
|
|
15813
|
-
function
|
|
15832
|
+
function u0(e) {
|
|
15814
15833
|
let t = /[\n\s]*([.#][\w\-_ .#\>\+\&]+){[\n\s]*([ :;\w\-\n]*)+}[\n\s]*/gm, r = /\s{2,}/g, n = {};
|
|
15815
15834
|
return e.replace(t, (o, i, s) => (n[i.replace(r, " ").trim()] = s.replace(/\n\s*/g, ""), o)), n;
|
|
15816
15835
|
}
|
|
15817
|
-
var
|
|
15818
|
-
var
|
|
15819
|
-
function
|
|
15820
|
-
return
|
|
15836
|
+
var zr = /^\w+:(\/\/)?/;
|
|
15837
|
+
var Hr = /^\/\/[^/]+/;
|
|
15838
|
+
function Ur(e, t = false) {
|
|
15839
|
+
return zr.test(e) || t && Hr.test(e);
|
|
15821
15840
|
}
|
|
15822
|
-
function
|
|
15823
|
-
if (!
|
|
15824
|
-
return t ?
|
|
15825
|
-
let [r = "", n, o = ""] = (e.replace(/\\/g, "/").match(/([^:/]+:)?\/\/([^/@]+@)?(.*)/) || []).splice(1), [i = "", s = ""] = (o.match(/([^/?#]*)(.*)?/) || []).splice(1), { pathname: a, search: c, hash: u } =
|
|
15841
|
+
function Br(e = "", t) {
|
|
15842
|
+
if (!Ur(e, true))
|
|
15843
|
+
return t ? Br(t + e) : At(e);
|
|
15844
|
+
let [r = "", n, o = ""] = (e.replace(/\\/g, "/").match(/([^:/]+:)?\/\/([^/@]+@)?(.*)/) || []).splice(1), [i = "", s = ""] = (o.match(/([^/?#]*)(.*)?/) || []).splice(1), { pathname: a, search: c, hash: u } = At(s);
|
|
15826
15845
|
return { protocol: r, auth: n ? n.substr(0, n.length - 1) : "", host: i, pathname: a, search: c, hash: u };
|
|
15827
15846
|
}
|
|
15828
|
-
function
|
|
15847
|
+
function At(e = "") {
|
|
15829
15848
|
let [t = "", r = "", n = ""] = (e.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
|
|
15830
15849
|
return { pathname: t, search: r, hash: n };
|
|
15831
15850
|
}
|
|
15832
|
-
function
|
|
15851
|
+
function w0(e, t, r) {
|
|
15833
15852
|
return new Promise((n, o) => {
|
|
15834
15853
|
let i;
|
|
15835
15854
|
it(e) ? i = "toCanvas" : t ? i = "toDataURL" : i = "toString", import_qrcode.default[i](e, r, (s, a) => {
|
|
@@ -15837,17 +15856,17 @@ function f0(e, t, r) {
|
|
|
15837
15856
|
});
|
|
15838
15857
|
});
|
|
15839
15858
|
}
|
|
15840
|
-
function
|
|
15859
|
+
function I0(e = "1999/01/1", t) {
|
|
15841
15860
|
let r = /* @__PURE__ */ new Date(), n = e.includes("/") ? "/" : "-", [o, i, s] = (t || "").split(n), a = +o || r.getFullYear(), c = +i || r.getMonth() + 1, u = +s || r.getDate(), [m, f, p] = e.split("/"), d2 = new Date(+m, +f, +p).getTime(), y = new Date(a, c, u).getTime();
|
|
15842
15861
|
return new Date(d2 + Math.round(Math.random() * (y - d2)));
|
|
15843
15862
|
}
|
|
15844
|
-
function
|
|
15863
|
+
function T0() {
|
|
15845
15864
|
return `#${(Math.random() * 1048575 * 1e6).toString(16).slice(0, 6)}`;
|
|
15846
15865
|
}
|
|
15847
|
-
function
|
|
15866
|
+
function S0(e = 1) {
|
|
15848
15867
|
return `rgba(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255}, ${e})`;
|
|
15849
15868
|
}
|
|
15850
|
-
function
|
|
15869
|
+
function D0(e) {
|
|
15851
15870
|
for (let t = e.length - 1; t > 0; t--) {
|
|
15852
15871
|
let r = Math.floor(Math.random() * (t + 1));
|
|
15853
15872
|
[e[t], e[r]] = [e[r], e[t]];
|
|
@@ -15855,7 +15874,7 @@ function M0(e) {
|
|
|
15855
15874
|
return e;
|
|
15856
15875
|
}
|
|
15857
15876
|
var te = /* @__PURE__ */ new Map();
|
|
15858
|
-
var
|
|
15877
|
+
var Z = class {
|
|
15859
15878
|
constructor(t) {
|
|
15860
15879
|
__publicField(this, "config");
|
|
15861
15880
|
let { baseURL: r = "", headers: n = {}, timeout: o = 20 * 1e3, interceptors: i } = t || {};
|
|
@@ -15863,14 +15882,14 @@ var _ = class {
|
|
|
15863
15882
|
}
|
|
15864
15883
|
init(t) {
|
|
15865
15884
|
let { url: r, method: n = "GET", headers: o = {}, bodyType: i = "json", params: s = {}, credentials: a = "omit", integrity: c, referrerPolicy: u = "no-referrer-when-downgrade", referrer: m = "", responseType: f = "json", keepalive: p = false, timeout: d2, transformResponse: y, cache: l = "default", redirect: h = "follow", mode: b = "no-cors" } = t;
|
|
15866
|
-
return this.config = Object.assign(this.config, { url: r != null && r.startsWith("http") ? r : (this.config.baseURL || "") + (r || ""), method: n, bodyType: i, credentials: a, responseType: f, timeout: d2 || this.config.timeout, transformResponse: y, cache: l, redirect: h, mode: b, body: s, keepalive: p, integrity: c, referrerPolicy: u, referrer: m, headers: Object.assign({ "Content-Type": "application/json" }, this.config.headers, o) }), this.config.method === "GET" && (Object.keys(s).length && (this.config.url += `?${
|
|
15885
|
+
return this.config = Object.assign(this.config, { url: r != null && r.startsWith("http") ? r : (this.config.baseURL || "") + (r || ""), method: n, bodyType: i, credentials: a, responseType: f, timeout: d2 || this.config.timeout, transformResponse: y, cache: l, redirect: h, mode: b, body: s, keepalive: p, integrity: c, referrerPolicy: u, referrer: m, headers: Object.assign({ "Content-Type": "application/json" }, this.config.headers, o) }), this.config.method === "GET" && (Object.keys(s).length && (this.config.url += `?${_(s)}`), this.config.body = void 0), this.request();
|
|
15867
15886
|
}
|
|
15868
15887
|
request() {
|
|
15869
15888
|
var f, p, d2, y, l;
|
|
15870
15889
|
let t = new AbortController(), r = t.signal;
|
|
15871
15890
|
this.config.signal = r, this.config.cancel = () => t.abort();
|
|
15872
15891
|
let { body: n, method: o, bodyType: i, url: s, timeout: a, responseType: c, transformResponse: u } = this.config;
|
|
15873
|
-
n && o !== "GET" && (i === "form" ? (J(this.config.headers, { "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" }), this.config.body =
|
|
15892
|
+
n && o !== "GET" && (i === "form" ? (J(this.config.headers, { "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" }), this.config.body = _(n)) : i === "file" ? (J(this.config.headers, { "Content-Type": "multipart/form-data" }), this.config.body = Object.keys(n).reduce((h, b) => (h.append(b, n[b]), h), new FormData())) : i === "json" && (this.config.body = JSON.stringify(n)));
|
|
15874
15893
|
let m = Re(this.config);
|
|
15875
15894
|
return te.has(m) && ((f = te.get(m)) == null || f()), te.set(m, this.config.cancel), Promise.race([fetch(s, ((l = (y = (d2 = (p = this.config) == null ? void 0 : p.interceptors) == null ? void 0 : d2.request) == null ? void 0 : y.success) == null ? void 0 : l.call(y, this.config)) || this.config), new Promise((h) => {
|
|
15876
15895
|
setTimeout(() => {
|
|
@@ -15906,32 +15925,32 @@ var _ = class {
|
|
|
15906
15925
|
}
|
|
15907
15926
|
get(t, r) {
|
|
15908
15927
|
let { retry: n = 0 } = r || {};
|
|
15909
|
-
return
|
|
15928
|
+
return Dt(() => new Z(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "GET" })), n);
|
|
15910
15929
|
}
|
|
15911
15930
|
post(t, r) {
|
|
15912
|
-
return new
|
|
15931
|
+
return new Z(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "post" }));
|
|
15913
15932
|
}
|
|
15914
15933
|
put(t, r) {
|
|
15915
|
-
return g(r) && (r = { url: r }), new
|
|
15934
|
+
return g(r) && (r = { url: r }), new Z(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "put" }));
|
|
15916
15935
|
}
|
|
15917
15936
|
delete(t, r) {
|
|
15918
|
-
return g(r) && (r = { url: r }), new
|
|
15937
|
+
return g(r) && (r = { url: r }), new Z(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "delete" }));
|
|
15919
15938
|
}
|
|
15920
15939
|
};
|
|
15921
15940
|
function Re(e) {
|
|
15922
15941
|
let { url: t, method: r, params: n, data: o } = e;
|
|
15923
15942
|
return `${t}-${r}-${JSON.stringify(r === "get" ? n : o)}`;
|
|
15924
15943
|
}
|
|
15925
|
-
function
|
|
15944
|
+
function Dt(e, t, r = 0, n, o) {
|
|
15926
15945
|
return new Promise((i, s) => {
|
|
15927
15946
|
n = n || i, o = o || s;
|
|
15928
15947
|
let a = e();
|
|
15929
15948
|
a.then(n), a.catch((c) => {
|
|
15930
|
-
r < t ? (r++,
|
|
15949
|
+
r < t ? (r++, Dt(e, t, r, n, o)) : o(c);
|
|
15931
15950
|
});
|
|
15932
15951
|
});
|
|
15933
15952
|
}
|
|
15934
|
-
function
|
|
15953
|
+
function B0(e = 4, t) {
|
|
15935
15954
|
let r = t.length, n = [], o = 0, i = new Array(e).fill(0);
|
|
15936
15955
|
return i = i.map(() => new Promise((s, a) => {
|
|
15937
15956
|
let c = () => {
|
|
@@ -15945,10 +15964,10 @@ function N0(e = 4, t) {
|
|
|
15945
15964
|
c();
|
|
15946
15965
|
})), Promise.all(i).then(() => n);
|
|
15947
15966
|
}
|
|
15948
|
-
function
|
|
15967
|
+
function Y0(e, t) {
|
|
15949
15968
|
return x(document, "visibilitychange", () => document.visibilityState === "hidden" && navigator.sendBeacon(e, t));
|
|
15950
15969
|
}
|
|
15951
|
-
function
|
|
15970
|
+
function G0() {
|
|
15952
15971
|
try {
|
|
15953
15972
|
let e = parent.documentElement, t = (e == null ? void 0 : e.cancelFullScreen) || (e == null ? void 0 : e.webkitCancelFullScreen) || (e == null ? void 0 : e.mozCancelFullScreen) || (e == null ? void 0 : e.exitFullScreen);
|
|
15954
15973
|
if (t)
|
|
@@ -15959,7 +15978,7 @@ function W0() {
|
|
|
15959
15978
|
throw new Error(e);
|
|
15960
15979
|
}
|
|
15961
15980
|
}
|
|
15962
|
-
function
|
|
15981
|
+
function K0() {
|
|
15963
15982
|
try {
|
|
15964
15983
|
let e = document.documentElement, t = e.requestFullScreen || e.webkitRequestFullScreen || e.mozRequestFullScreen || e.msRequestFullScreen;
|
|
15965
15984
|
if (t)
|
|
@@ -15970,7 +15989,7 @@ function Y0() {
|
|
|
15970
15989
|
throw new Error(e);
|
|
15971
15990
|
}
|
|
15972
15991
|
}
|
|
15973
|
-
function
|
|
15992
|
+
function nw(e) {
|
|
15974
15993
|
return async () => {
|
|
15975
15994
|
if (g(e) && (e = v(e) || e), g(e))
|
|
15976
15995
|
throw new Error(`${e} is not a HTMLVideoElement`);
|
|
@@ -15981,7 +16000,7 @@ function q0(e) {
|
|
|
15981
16000
|
}
|
|
15982
16001
|
};
|
|
15983
16002
|
}
|
|
15984
|
-
function
|
|
16003
|
+
function cw(e, t) {
|
|
15985
16004
|
return new Promise((r, n) => {
|
|
15986
16005
|
navigator.mediaDevices.getDisplayMedia({ video: true }).then(o, n);
|
|
15987
16006
|
function o(i) {
|
|
@@ -15990,7 +16009,7 @@ function ew(e, t) {
|
|
|
15990
16009
|
}
|
|
15991
16010
|
});
|
|
15992
16011
|
}
|
|
15993
|
-
function
|
|
16012
|
+
function lw(e = { width: 640, height: 480 }, t = "video", r) {
|
|
15994
16013
|
if (!navigator)
|
|
15995
16014
|
return console.error("Not support navigator");
|
|
15996
16015
|
B(e) && (r = e, e = { width: 640, height: 480 });
|
|
@@ -16001,13 +16020,13 @@ function iw(e = { width: 640, height: 480 }, t = "video", r) {
|
|
|
16001
16020
|
n.srcObject = o, r && (n.onloadedmetadata = () => n.play());
|
|
16002
16021
|
}), () => n ? n.paused ? n.play() : n.pause() : r = true;
|
|
16003
16022
|
}
|
|
16004
|
-
function
|
|
16023
|
+
function dw(e = {}) {
|
|
16005
16024
|
if (!navigator || !navigator.canShare)
|
|
16006
16025
|
throw new Error("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u5206\u4EAB");
|
|
16007
16026
|
if (!e.files || navigator.canShare({ files: e.files }))
|
|
16008
16027
|
return navigator.share(e);
|
|
16009
16028
|
}
|
|
16010
|
-
function
|
|
16029
|
+
function ww(e = [], t) {
|
|
16011
16030
|
let r = E("video"), { controls: n = true, width: o, height: i, className: s, style: a } = t, c = t.container;
|
|
16012
16031
|
return r.controls = n, o && (r.width = o), i && (r.height = i), s && (r.className = s), a && (r.style.cssText = a), x(document, "DOMContentLoaded", m), x(r, "timeupdate", () => r.currentTime >= r.duration && u()), { play() {
|
|
16013
16032
|
r.paused ? r.play() : r.pause();
|
|
@@ -16029,7 +16048,7 @@ function fw(e = [], t) {
|
|
|
16029
16048
|
}), c.appendChild(r);
|
|
16030
16049
|
}
|
|
16031
16050
|
}
|
|
16032
|
-
async function
|
|
16051
|
+
async function Ew(e = String((/* @__PURE__ */ new Date()).getTime())) {
|
|
16033
16052
|
let t = await navigator.mediaDevices.getDisplayMedia({ video: true }), r = await navigator.mediaDevices.getUserMedia({ audio: true }), n = [];
|
|
16034
16053
|
t.getVideoTracks().forEach((a) => n.push(a)), r.getAudioTracks().forEach((a) => n.push(a));
|
|
16035
16054
|
let o = new MediaStream(n), i = new MediaRecorder(o), s = [];
|
|
@@ -16042,19 +16061,19 @@ async function gw(e = String((/* @__PURE__ */ new Date()).getTime())) {
|
|
|
16042
16061
|
ue(m, `${e}.webm`);
|
|
16043
16062
|
}, i.start(), () => i.stop();
|
|
16044
16063
|
}
|
|
16045
|
-
function
|
|
16064
|
+
function Lt(e) {
|
|
16046
16065
|
return M(e) ? e : [e];
|
|
16047
16066
|
}
|
|
16048
|
-
function
|
|
16049
|
-
let r =
|
|
16067
|
+
function Aw(e, t = "zh") {
|
|
16068
|
+
let r = Lt(e).map((n) => Yr(n)).join(`
|
|
16050
16069
|
`);
|
|
16051
|
-
|
|
16070
|
+
_r(r, t);
|
|
16052
16071
|
}
|
|
16053
|
-
function
|
|
16054
|
-
let { start: t, end: r, left: n, top: o, content: i, duration: s } = e, a =
|
|
16072
|
+
function Yr(e) {
|
|
16073
|
+
let { start: t, end: r, left: n, top: o, content: i, duration: s } = e, a = Ot(t), c = Ot(r || t + (s != null ? s : 0));
|
|
16055
16074
|
return `${a} --> ${c} line:${n}% position:${o}% ${i}`;
|
|
16056
16075
|
}
|
|
16057
|
-
function
|
|
16076
|
+
function Ot(e) {
|
|
16058
16077
|
let t = Math.floor(e / 1e3), r = xe(e % 1e3, 3), n = Math.floor(t / 60), o = xe(t % 60, 2), i = xe(Math.floor(n / 60), 2), s = xe(n % 60, 2);
|
|
16059
16078
|
return `${i}:${s}:${o}.${r}`;
|
|
16060
16079
|
}
|
|
@@ -16064,10 +16083,10 @@ function xe(e, t) {
|
|
|
16064
16083
|
let r = t - String(e).length;
|
|
16065
16084
|
return "0".repeat(r) + e;
|
|
16066
16085
|
}
|
|
16067
|
-
function
|
|
16086
|
+
function _r(e, t) {
|
|
16068
16087
|
import_promises4.default.writeFile(`${t}.vtt`, e, "utf-8");
|
|
16069
16088
|
}
|
|
16070
|
-
function
|
|
16089
|
+
function jw(e) {
|
|
16071
16090
|
if (!navigator)
|
|
16072
16091
|
return console.error("Not support navigator");
|
|
16073
16092
|
let t = false, r, n;
|
|
@@ -16090,7 +16109,7 @@ function Tw(e) {
|
|
|
16090
16109
|
return r.state === "recording" ? r.stop() : r.start();
|
|
16091
16110
|
}
|
|
16092
16111
|
}
|
|
16093
|
-
function
|
|
16112
|
+
function kw(e, t) {
|
|
16094
16113
|
let { audio: r, fftSize: n = 512 } = e;
|
|
16095
16114
|
w(r, (o) => {
|
|
16096
16115
|
let i = false;
|
|
@@ -16107,11 +16126,11 @@ function Dw(e, t) {
|
|
|
16107
16126
|
};
|
|
16108
16127
|
});
|
|
16109
16128
|
}
|
|
16110
|
-
function
|
|
16129
|
+
function Jw(e) {
|
|
16111
16130
|
let t = E("link", { rel: "stylesheet", href: e, type: "text/css" });
|
|
16112
16131
|
return document.head.appendChild(t), () => document.head.removeChild(t);
|
|
16113
16132
|
}
|
|
16114
|
-
function
|
|
16133
|
+
function tb(e) {
|
|
16115
16134
|
var t;
|
|
16116
16135
|
try {
|
|
16117
16136
|
let r = document.getElementsByTagName("script")[0], n = E("script", { type: "text/javascript", src: e, async: "" });
|
|
@@ -16123,10 +16142,10 @@ function Zw(e) {
|
|
|
16123
16142
|
throw new Error(r);
|
|
16124
16143
|
}
|
|
16125
16144
|
}
|
|
16126
|
-
function
|
|
16145
|
+
function cb(e = window) {
|
|
16127
16146
|
return { x: e.scrollX, y: e.scrollY };
|
|
16128
16147
|
}
|
|
16129
|
-
function
|
|
16148
|
+
function pb() {
|
|
16130
16149
|
try {
|
|
16131
16150
|
let e, t = U(() => {
|
|
16132
16151
|
let r = document.documentElement.scrollTop || document.body.scrollTop;
|
|
@@ -16136,7 +16155,7 @@ function ob() {
|
|
|
16136
16155
|
throw new Error(e);
|
|
16137
16156
|
}
|
|
16138
16157
|
}
|
|
16139
|
-
function
|
|
16158
|
+
function hb(e, t) {
|
|
16140
16159
|
try {
|
|
16141
16160
|
if (g(e) && (e = v(e)), !e)
|
|
16142
16161
|
return;
|
|
@@ -16145,7 +16164,7 @@ function cb(e, t) {
|
|
|
16145
16164
|
throw new Error(r);
|
|
16146
16165
|
}
|
|
16147
16166
|
}
|
|
16148
|
-
function
|
|
16167
|
+
function bb(e, t = 40) {
|
|
16149
16168
|
let r = pt(e, t);
|
|
16150
16169
|
return x(window, "scroll", () => r(Qr()));
|
|
16151
16170
|
}
|
|
@@ -16154,9 +16173,9 @@ function Qr() {
|
|
|
16154
16173
|
return `${(document.documentElement.scrollTop || document.body.scrollTop) / r * 100}%`;
|
|
16155
16174
|
}
|
|
16156
16175
|
var ye;
|
|
16157
|
-
var
|
|
16158
|
-
function
|
|
16159
|
-
let t =
|
|
16176
|
+
var Rt = { text: "", lang: "zh-CN", volume: 1, rate: 1, pitch: 0.5, voice: null };
|
|
16177
|
+
function Db(e) {
|
|
16178
|
+
let t = jt(e), r = true, n = () => speechSynthesis.cancel();
|
|
16160
16179
|
return Xe(n), { cancel: n, pause: () => speechSynthesis.pause(), resume: () => speechSynthesis.resume(), speak: (o) => {
|
|
16161
16180
|
if (g(o)) {
|
|
16162
16181
|
if (o === t && (r = !r, !r))
|
|
@@ -16168,22 +16187,22 @@ function Mb(e) {
|
|
|
16168
16187
|
return n();
|
|
16169
16188
|
t = i;
|
|
16170
16189
|
}
|
|
16171
|
-
o = o || t, o && (
|
|
16190
|
+
o = o || t, o && (jt(o), speechSynthesis.speak(ye));
|
|
16172
16191
|
}, isSpeaking: () => speechSynthesis.speaking };
|
|
16173
16192
|
}
|
|
16174
|
-
function
|
|
16175
|
-
return ye = Object.assign(ye || new SpeechSynthesisUtterance(), g(e) ? { ...
|
|
16193
|
+
function jt(e) {
|
|
16194
|
+
return ye = Object.assign(ye || new SpeechSynthesisUtterance(), g(e) ? { ...Rt, text: e } : { ...Rt, ...e }), ye.text;
|
|
16176
16195
|
}
|
|
16177
|
-
var
|
|
16178
|
-
function
|
|
16196
|
+
var Nt = { continuous: true, interimResults: false, lang: "zh-CN", maxAlternatives: 1 };
|
|
16197
|
+
function Rb(e = Nt, t) {
|
|
16179
16198
|
let r = false;
|
|
16180
|
-
D(e) && (t = e, e =
|
|
16199
|
+
D(e) && (t = e, e = Nt);
|
|
16181
16200
|
let n = window.SpeechRecognition || window.webkitSpeechRecognition, o = new n();
|
|
16182
16201
|
return Object.assign(o, e), o.onresult = (i) => t == null ? void 0 : t(i.results), { toggle: () => {
|
|
16183
16202
|
r ? o.stop() : o.start(), r = !r;
|
|
16184
16203
|
}, abort: () => o.abort() };
|
|
16185
16204
|
}
|
|
16186
|
-
function
|
|
16205
|
+
function kb() {
|
|
16187
16206
|
return new Promise((e, t) => {
|
|
16188
16207
|
let r = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;
|
|
16189
16208
|
r || t(new Error("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301indexedDB"));
|
|
@@ -16242,7 +16261,7 @@ function Db() {
|
|
|
16242
16261
|
};
|
|
16243
16262
|
});
|
|
16244
16263
|
}
|
|
16245
|
-
var
|
|
16264
|
+
var zb = { get(e) {
|
|
16246
16265
|
try {
|
|
16247
16266
|
let t = `${e}=`, r = document.cookie.split(";");
|
|
16248
16267
|
for (let n = 0; n < r.length; n++) {
|
|
@@ -16266,7 +16285,7 @@ var Ob = { get(e) {
|
|
|
16266
16285
|
}, delete(e) {
|
|
16267
16286
|
this.set(e, "", -1);
|
|
16268
16287
|
} };
|
|
16269
|
-
function
|
|
16288
|
+
function Wb() {
|
|
16270
16289
|
return { set(e, t) {
|
|
16271
16290
|
T(e) ? Object.keys(e).forEach((r) => localStorage.setItem(r, e[r])) : localStorage.setItem(e, t);
|
|
16272
16291
|
}, get(e) {
|
|
@@ -16277,7 +16296,7 @@ function Pb() {
|
|
|
16277
16296
|
localStorage.clear();
|
|
16278
16297
|
} };
|
|
16279
16298
|
}
|
|
16280
|
-
function
|
|
16299
|
+
function Qb() {
|
|
16281
16300
|
return { set(e, t) {
|
|
16282
16301
|
T(e) ? Object.keys(e).forEach((r) => sessionStorage.setItem(r, e[r])) : sessionStorage.setItem(e, t);
|
|
16283
16302
|
}, get(e) {
|
|
@@ -16288,7 +16307,7 @@ function zb() {
|
|
|
16288
16307
|
sessionStorage.clear();
|
|
16289
16308
|
} };
|
|
16290
16309
|
}
|
|
16291
|
-
function
|
|
16310
|
+
function nM(e) {
|
|
16292
16311
|
let { data: t, filename: r = he(), title: n, filter: o } = e;
|
|
16293
16312
|
if (!t)
|
|
16294
16313
|
return;
|
|
@@ -16303,7 +16322,7 @@ function qb(e) {
|
|
|
16303
16322
|
c += `<td>${m}</td>`;
|
|
16304
16323
|
else {
|
|
16305
16324
|
let { value: f, width: p, colspan: d2 = 0, rowspan: y = 0 } = m;
|
|
16306
|
-
c += `<td width=${p} colspan=${d2} rowspan=${y} style="${
|
|
16325
|
+
c += `<td width=${p} colspan=${d2} rowspan=${y} style="${Pt(m)}">${f}</td>`;
|
|
16307
16326
|
}
|
|
16308
16327
|
}
|
|
16309
16328
|
} else {
|
|
@@ -16312,14 +16331,14 @@ function qb(e) {
|
|
|
16312
16331
|
c += `<td align='center'>${m}</td>`;
|
|
16313
16332
|
else {
|
|
16314
16333
|
let { value: f, width: p, colspan: d2 = 0, rowspan: y = 0 } = m;
|
|
16315
|
-
c += `<td align='center' width=${p} colspan=${d2} rowspan=${y} style="${
|
|
16334
|
+
c += `<td align='center' width=${p} colspan=${d2} rowspan=${y} style="${Pt(m)}">${f}</td>`;
|
|
16316
16335
|
}
|
|
16317
16336
|
}
|
|
16318
16337
|
s += `${c}</tr>`;
|
|
16319
16338
|
}
|
|
16320
16339
|
s += "</table>", E("a", { href: `data:application/vnd.ms-excel;charset=utf-8,${encodeURIComponent(Zr(s))}`, style: "visibility:hidden", download: `${r}.xls` }).click();
|
|
16321
16340
|
}
|
|
16322
|
-
function
|
|
16341
|
+
function Pt(e) {
|
|
16323
16342
|
let t = "", { style: r = "", background: n, color: o } = e;
|
|
16324
16343
|
return n && (t += `background:${n};`), o && (t += `color:${o};`), t += r;
|
|
16325
16344
|
}
|
|
@@ -16327,7 +16346,7 @@ function Zr(e) {
|
|
|
16327
16346
|
return `<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'><meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">
|
|
16328
16347
|
<meta http-equiv="content-type" content="application/vnd.ms-excel';charset=UTF-8"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body>${e}</body></html>`;
|
|
16329
16348
|
}
|
|
16330
|
-
function
|
|
16349
|
+
function sM(e, t = 0, r = {}) {
|
|
16331
16350
|
T(t) && (r = t, t = 0);
|
|
16332
16351
|
let { id: n = "id", pid: o = "pid", children: i = "children" } = r;
|
|
16333
16352
|
return s(t)[0];
|
|
@@ -16335,38 +16354,38 @@ function Jb(e, t = 0, r = {}) {
|
|
|
16335
16354
|
return e.filter((c) => c[o] === a).map((c) => ({ ...c, [i]: s(c[n]) }));
|
|
16336
16355
|
}
|
|
16337
16356
|
}
|
|
16338
|
-
function
|
|
16357
|
+
function cM(e) {
|
|
16339
16358
|
var s, a;
|
|
16340
16359
|
let t = e.split(","), r = (a = (s = t[0]) == null ? void 0 : s.match(/:(.*?);/)) == null ? void 0 : a[1], n = atob(t[1]), o = n.length, i = new Uint8Array(o);
|
|
16341
16360
|
for (; o--; )
|
|
16342
16361
|
i[o] = n.charCodeAt(o);
|
|
16343
16362
|
return new Blob([i], { type: r });
|
|
16344
16363
|
}
|
|
16345
|
-
function
|
|
16364
|
+
function uM(e, t) {
|
|
16346
16365
|
var a, c;
|
|
16347
16366
|
let r = e.split(","), n = (c = (a = r[0]) == null ? void 0 : a.match(/:(.*?);/)) == null ? void 0 : c[1], o = atob(r[1]), i = o.length, s = new Uint8Array(i);
|
|
16348
16367
|
for (; i--; )
|
|
16349
16368
|
s[i] = o.charCodeAt(i);
|
|
16350
16369
|
return new File([s], t, { type: n });
|
|
16351
16370
|
}
|
|
16352
|
-
function
|
|
16371
|
+
function pM(e, t) {
|
|
16353
16372
|
t = t || 0;
|
|
16354
16373
|
let r = e.length - t, n = new Array(r);
|
|
16355
16374
|
for (; r--; )
|
|
16356
16375
|
n[r] = e[r + t];
|
|
16357
16376
|
return n;
|
|
16358
16377
|
}
|
|
16359
|
-
function
|
|
16378
|
+
function dM(e, t) {
|
|
16360
16379
|
return e.reduce((r, n) => T(n) ? Object.keys(n).reduce((o, i) => (t && !t.includes(i) || (o[i] || (o[i] = []), o[i].push(n[i])), o), r) : r, {});
|
|
16361
16380
|
}
|
|
16362
|
-
function
|
|
16381
|
+
function xM(e = {}, t = "children") {
|
|
16363
16382
|
let r = [];
|
|
16364
|
-
return r.push({ ...e }), e[t].length &&
|
|
16383
|
+
return r.push({ ...e }), e[t].length && Ft(e[t], r), r.filter((n) => delete n[t]);
|
|
16365
16384
|
}
|
|
16366
|
-
function
|
|
16367
|
-
return e.reduce((r, n) => (r.push({ ...n }), n.children.length ?
|
|
16385
|
+
function Ft(e, t = []) {
|
|
16386
|
+
return e.reduce((r, n) => (r.push({ ...n }), n.children.length ? Ft(n.children, r) : r), t);
|
|
16368
16387
|
}
|
|
16369
|
-
function
|
|
16388
|
+
function kt(e) {
|
|
16370
16389
|
return new Promise((t, r) => {
|
|
16371
16390
|
let n = new FileReader();
|
|
16372
16391
|
n.onload = function() {
|
|
@@ -16375,28 +16394,28 @@ function Ft(e) {
|
|
|
16375
16394
|
}, n.onerror = r, n.readAsArrayBuffer(e);
|
|
16376
16395
|
});
|
|
16377
16396
|
}
|
|
16378
|
-
async function
|
|
16379
|
-
let r = await
|
|
16397
|
+
async function MM(e, t = e.type) {
|
|
16398
|
+
let r = await kt(e);
|
|
16380
16399
|
return new Blob([r], { type: t });
|
|
16381
16400
|
}
|
|
16382
|
-
function
|
|
16401
|
+
function IM(e) {
|
|
16383
16402
|
return window.URL.createObjectURL(e);
|
|
16384
16403
|
}
|
|
16385
|
-
function
|
|
16404
|
+
function CM(e) {
|
|
16386
16405
|
let t = /rgb\(([\w\s,]+)\)/, r = e.match(t);
|
|
16387
16406
|
if (!r)
|
|
16388
16407
|
return;
|
|
16389
16408
|
let [n, o] = r, [i, s, a] = ae(o, "all").split(",");
|
|
16390
16409
|
return `#${((1 << 24) + (+i << 16) + (+s << 8) + +a).toString(16).slice(1)}`;
|
|
16391
16410
|
}
|
|
16392
|
-
function
|
|
16411
|
+
function AM(e, t) {
|
|
16393
16412
|
let r = 7 - e.length;
|
|
16394
16413
|
if (r > 0 && (e = e + e.slice(-1).repeat(r)), r < 0)
|
|
16395
16414
|
throw new Error("hex length > 7");
|
|
16396
|
-
let n = `${parseInt(`0x${e.slice(1, 3)}`)},${parseInt(`0x${e.slice(3, 5)}`)},${parseInt(`0x${e.slice(5, 7)}`)}`;
|
|
16415
|
+
let n = `${Number.parseInt(`0x${e.slice(1, 3)}`)},${Number.parseInt(`0x${e.slice(3, 5)}`)},${Number.parseInt(`0x${e.slice(5, 7)}`)}`;
|
|
16397
16416
|
return t ? `rgba(${n},${t})` : `rgb(${n})`;
|
|
16398
16417
|
}
|
|
16399
|
-
async function
|
|
16418
|
+
async function qM(e) {
|
|
16400
16419
|
let t = await import_promises5.default.readFile(import_path8.default.resolve(import_process5.default.cwd(), e), "utf-8");
|
|
16401
16420
|
return { name: "vite-plugin-copy-html", writeBundle(r, n) {
|
|
16402
16421
|
let o = `${r.dir}/index.html`, i = [], s = [];
|
|
@@ -16407,139 +16426,141 @@ async function UM(e) {
|
|
|
16407
16426
|
</body>`)), import_promises5.default.writeFile(import_path8.default.resolve(o), t, "utf-8");
|
|
16408
16427
|
} };
|
|
16409
16428
|
}
|
|
16410
|
-
function
|
|
16429
|
+
function GM(e) {
|
|
16411
16430
|
return { name: "vite-plugin-export", transform(t, r) {
|
|
16412
16431
|
if (r.endsWith(e))
|
|
16413
16432
|
return { code: `export default ${JSON.stringify(t)}`, map: null };
|
|
16414
16433
|
} };
|
|
16415
16434
|
}
|
|
16416
|
-
|
|
16417
|
-
|
|
16435
|
+
function nE(e = {}) {
|
|
16436
|
+
return J({ name: "tsup", target: "node14", minify: true, dts: { resolve: true, entry: "./src/index.ts" } }, e);
|
|
16437
|
+
}
|
|
16438
|
+
function aE(e) {
|
|
16418
16439
|
return e * e * ((1.70158 + 1) * e - 1.70158);
|
|
16419
16440
|
}
|
|
16420
|
-
function
|
|
16441
|
+
function mE(e) {
|
|
16421
16442
|
let t = 2.5949095;
|
|
16422
16443
|
return (e *= 2) < 1 ? 0.5 * (e * e * ((t + 1) * e - t)) : 0.5 * ((e -= 2) * e * ((t + 1) * e + t) + 2);
|
|
16423
16444
|
}
|
|
16424
|
-
function
|
|
16445
|
+
function fE(e) {
|
|
16425
16446
|
return --e * e * ((1.70158 + 1) * e + 1.70158) + 1;
|
|
16426
16447
|
}
|
|
16427
16448
|
function re(e) {
|
|
16428
16449
|
let t = 0.36363636363636365, r = 8 / 11, n = 9 / 10, o = 4356 / 361, i = 35442 / 1805, s = 16061 / 1805, a = e * e;
|
|
16429
16450
|
return e < t ? 7.5625 * a : e < r ? 9.075 * a - 9.9 * e + 3.4 : e < n ? o * a - i * e + s : 10.8 * e * e - 20.52 * e + 10.72;
|
|
16430
16451
|
}
|
|
16431
|
-
function
|
|
16452
|
+
function dE(e) {
|
|
16432
16453
|
return 1 - re(1 - e);
|
|
16433
16454
|
}
|
|
16434
|
-
function
|
|
16455
|
+
function yE(e) {
|
|
16435
16456
|
return e < 0.5 ? 0.5 * (1 - re(1 - e * 2)) : 0.5 * re(e * 2 - 1) + 0.5;
|
|
16436
16457
|
}
|
|
16437
|
-
function
|
|
16458
|
+
function bE(e) {
|
|
16438
16459
|
return 1 - Math.sqrt(1 - e * e);
|
|
16439
16460
|
}
|
|
16440
|
-
function
|
|
16461
|
+
function EE(e) {
|
|
16441
16462
|
return (e *= 2) < 1 ? -0.5 * (Math.sqrt(1 - e * e) - 1) : 0.5 * (Math.sqrt(1 - (e -= 2) * e) + 1);
|
|
16442
16463
|
}
|
|
16443
|
-
function
|
|
16464
|
+
function vE(e) {
|
|
16444
16465
|
return Math.sqrt(1 - --e * e);
|
|
16445
16466
|
}
|
|
16446
|
-
function
|
|
16467
|
+
function CE(e) {
|
|
16447
16468
|
return e * e * e;
|
|
16448
16469
|
}
|
|
16449
|
-
function
|
|
16470
|
+
function AE(e) {
|
|
16450
16471
|
return e < 0.5 ? 4 * e * e * e : 0.5 * (2 * e - 2) ** 3 + 1;
|
|
16451
16472
|
}
|
|
16452
|
-
function
|
|
16473
|
+
function LE(e) {
|
|
16453
16474
|
let t = e - 1;
|
|
16454
16475
|
return t * t * t + 1;
|
|
16455
16476
|
}
|
|
16456
|
-
function
|
|
16477
|
+
function RE(e) {
|
|
16457
16478
|
return Math.sin(13 * e * Math.PI / 2) * 2 ** (10 * (e - 1));
|
|
16458
16479
|
}
|
|
16459
|
-
function
|
|
16480
|
+
function NE(e) {
|
|
16460
16481
|
return e < 0.5 ? 0.5 * Math.sin(13 * Math.PI / 2 * 2 * e) * 2 ** (10 * (2 * e - 1)) : 0.5 * Math.sin(-13 * Math.PI / 2 * (2 * e - 1 + 1)) * 2 ** (-10 * (2 * e - 1)) + 1;
|
|
16461
16482
|
}
|
|
16462
|
-
function
|
|
16483
|
+
function FE(e) {
|
|
16463
16484
|
return Math.sin(-13 * (e + 1) * Math.PI / 2) * 2 ** (-10 * e) + 1;
|
|
16464
16485
|
}
|
|
16465
|
-
function
|
|
16486
|
+
function $E(e) {
|
|
16466
16487
|
return e === 0 ? e : 2 ** (10 * (e - 1));
|
|
16467
16488
|
}
|
|
16468
|
-
function
|
|
16489
|
+
function HE(e) {
|
|
16469
16490
|
return e === 0 || e === 1 ? e : e < 0.5 ? 0.5 * 2 ** (20 * e - 10) : -0.5 * 2 ** (10 - e * 20) + 1;
|
|
16470
16491
|
}
|
|
16471
|
-
function
|
|
16492
|
+
function BE(e) {
|
|
16472
16493
|
return e === 1 ? e : 1 - 2 ** (-10 * e);
|
|
16473
16494
|
}
|
|
16474
|
-
function
|
|
16495
|
+
function VE(e) {
|
|
16475
16496
|
return e * e;
|
|
16476
16497
|
}
|
|
16477
|
-
function
|
|
16498
|
+
function _E(e) {
|
|
16478
16499
|
return e /= 0.5, e < 1 ? 0.5 * e * e : (e--, -0.5 * (e * (e - 2) - 1));
|
|
16479
16500
|
}
|
|
16480
|
-
function
|
|
16501
|
+
function ZE(e) {
|
|
16481
16502
|
return -e * (e - 2);
|
|
16482
16503
|
}
|
|
16483
|
-
function
|
|
16504
|
+
function XE(e) {
|
|
16484
16505
|
return e ** 4;
|
|
16485
16506
|
}
|
|
16486
|
-
function
|
|
16507
|
+
function JE(e) {
|
|
16487
16508
|
return e < 0.5 ? 8 * e ** 4 : -8 * (e - 1) ** 4 + 1;
|
|
16488
16509
|
}
|
|
16489
|
-
function
|
|
16510
|
+
function eI(e) {
|
|
16490
16511
|
return (e - 1) ** 3 * (1 - e) + 1;
|
|
16491
16512
|
}
|
|
16492
|
-
function
|
|
16513
|
+
function rI(e) {
|
|
16493
16514
|
return e * e * e * e * e;
|
|
16494
16515
|
}
|
|
16495
|
-
function
|
|
16516
|
+
function oI(e) {
|
|
16496
16517
|
return (e *= 2) < 1 ? 0.5 * e * e * e * e * e : 0.5 * ((e -= 2) * e * e * e * e + 2);
|
|
16497
16518
|
}
|
|
16498
|
-
function
|
|
16519
|
+
function sI(e) {
|
|
16499
16520
|
return --e * e * e * e * e + 1;
|
|
16500
16521
|
}
|
|
16501
|
-
function
|
|
16522
|
+
function cI(e) {
|
|
16502
16523
|
let t = Math.cos(e * Math.PI * 0.5);
|
|
16503
16524
|
return Math.abs(t) < 1e-14 ? 1 : 1 - t;
|
|
16504
16525
|
}
|
|
16505
|
-
function
|
|
16526
|
+
function uI(e) {
|
|
16506
16527
|
return -0.5 * (Math.cos(Math.PI * e) - 1);
|
|
16507
16528
|
}
|
|
16508
|
-
function
|
|
16529
|
+
function pI(e) {
|
|
16509
16530
|
return Math.sin(e * Math.PI / 2);
|
|
16510
16531
|
}
|
|
16511
|
-
function
|
|
16532
|
+
function dI(e, t, r, n = () => {
|
|
16512
16533
|
}) {
|
|
16513
16534
|
let o = t - e, i = Date.now(), s = e;
|
|
16514
16535
|
n(s);
|
|
16515
16536
|
let c = U(() => {
|
|
16516
|
-
let m = Date.now() - i, f = m / r, p =
|
|
16537
|
+
let m = Date.now() - i, f = m / r, p = Xr(f), d2 = Math.round(o * p);
|
|
16517
16538
|
if (m >= r)
|
|
16518
16539
|
return s = t, n(s), c();
|
|
16519
16540
|
s = e + d2, n(s);
|
|
16520
16541
|
}, 50);
|
|
16521
16542
|
}
|
|
16522
|
-
function
|
|
16543
|
+
function Xr(e) {
|
|
16523
16544
|
let t = [{ x: 0, y: 0 }, { x: 0.4, y: 0.8 }, { x: 0.6, y: 1 }, { x: 1, y: 1 }], r = 0, n = t.length - 1;
|
|
16524
16545
|
for (let o = 0; o <= n; o++) {
|
|
16525
|
-
let i =
|
|
16546
|
+
let i = Gr(n, o), s = e ** o * (1 - e) ** (n - o);
|
|
16526
16547
|
r += i * t[o].y * s;
|
|
16527
16548
|
}
|
|
16528
16549
|
return r;
|
|
16529
16550
|
}
|
|
16530
|
-
function
|
|
16551
|
+
function Gr(e, t) {
|
|
16531
16552
|
let r = 1;
|
|
16532
16553
|
for (let n = 1; n <= t; n++)
|
|
16533
16554
|
r *= (e - n + 1) / n;
|
|
16534
16555
|
return r;
|
|
16535
16556
|
}
|
|
16536
|
-
function
|
|
16557
|
+
function XI(e) {
|
|
16537
16558
|
let t = matchMedia("(prefers-color-scheme: dark)");
|
|
16538
16559
|
return e(t.matches ? "dark" : "light"), x(t, "change", () => e(t.matches ? "dark" : "light"));
|
|
16539
16560
|
}
|
|
16540
16561
|
|
|
16541
16562
|
// src/index.ts
|
|
16542
|
-
var
|
|
16563
|
+
var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
16543
16564
|
var import_fast_glob = __toESM(require("fast-glob"), 1);
|
|
16544
16565
|
|
|
16545
16566
|
// src/utils.ts
|
|
@@ -18010,7 +18031,7 @@ function ora(options) {
|
|
|
18010
18031
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
18011
18032
|
var DW = /\s-DW/;
|
|
18012
18033
|
var W2 = /\s-W/;
|
|
18013
|
-
var
|
|
18034
|
+
var Dw = /\s-Dw/;
|
|
18014
18035
|
var w2 = /\s-w/;
|
|
18015
18036
|
var D2 = /\s-D(?!w)/;
|
|
18016
18037
|
var d = /\s-d(?!w)/;
|
|
@@ -18019,13 +18040,13 @@ async function getParams(params) {
|
|
|
18019
18040
|
var _a2, _b;
|
|
18020
18041
|
const root = process.cwd();
|
|
18021
18042
|
try {
|
|
18022
|
-
switch (await
|
|
18043
|
+
switch (await vx()) {
|
|
18023
18044
|
case "pnpm":
|
|
18024
18045
|
if (!P(import_path9.default.resolve(root, "./pnpm-workspace.yaml"))) {
|
|
18025
18046
|
if (DW.test(params))
|
|
18026
18047
|
return params.replace(DW, " -D");
|
|
18027
|
-
if (
|
|
18028
|
-
return params.replace(
|
|
18048
|
+
if (Dw.test(params))
|
|
18049
|
+
return params.replace(Dw, " -D");
|
|
18029
18050
|
if (W2.test(params))
|
|
18030
18051
|
return params.replace(W2, "");
|
|
18031
18052
|
if (w2.test(params))
|
|
@@ -18036,7 +18057,7 @@ async function getParams(params) {
|
|
|
18036
18057
|
return params.replace(D2, " -Dw");
|
|
18037
18058
|
if (d.test(params))
|
|
18038
18059
|
return params.replace(d, " -Dw");
|
|
18039
|
-
if (!params ||
|
|
18060
|
+
if (!params || Dw.test(params) || w2.test(params))
|
|
18040
18061
|
return params;
|
|
18041
18062
|
return `${params} -w`;
|
|
18042
18063
|
}
|
|
@@ -18046,9 +18067,9 @@ async function getParams(params) {
|
|
|
18046
18067
|
return params.replace(W2, " -w");
|
|
18047
18068
|
return params;
|
|
18048
18069
|
case "yarn":
|
|
18049
|
-
if (!((_a2 = await
|
|
18050
|
-
if (
|
|
18051
|
-
return params.replace(
|
|
18070
|
+
if (!((_a2 = await wt(import_path9.default.resolve(root, "./package.json"))) == null ? void 0 : _a2.workspaces)) {
|
|
18071
|
+
if (Dw.test(params))
|
|
18072
|
+
return params.replace(Dw, " -D");
|
|
18052
18073
|
if (DW.test(params))
|
|
18053
18074
|
return params.replace(DW, " -D");
|
|
18054
18075
|
if (W2.test(params))
|
|
@@ -18056,7 +18077,7 @@ async function getParams(params) {
|
|
|
18056
18077
|
if (w2.test(params))
|
|
18057
18078
|
return params.replace(w2, "");
|
|
18058
18079
|
}
|
|
18059
|
-
if ((_b = await
|
|
18080
|
+
if ((_b = await wt()) == null ? void 0 : _b.workspaces) {
|
|
18060
18081
|
if (D2.test(params))
|
|
18061
18082
|
return params.replace(D2, " -DW");
|
|
18062
18083
|
if (d.test(params))
|
|
@@ -18065,8 +18086,8 @@ async function getParams(params) {
|
|
|
18065
18086
|
return params;
|
|
18066
18087
|
return `${params} -W`;
|
|
18067
18088
|
}
|
|
18068
|
-
if (
|
|
18069
|
-
return params.replace(
|
|
18089
|
+
if (Dw.test(params))
|
|
18090
|
+
return params.replace(Dw, " -DW");
|
|
18070
18091
|
if (W2.test(params))
|
|
18071
18092
|
return params.replace(w2, " -W");
|
|
18072
18093
|
return params;
|
|
@@ -18099,7 +18120,7 @@ async function getStyle() {
|
|
|
18099
18120
|
};
|
|
18100
18121
|
}
|
|
18101
18122
|
function getLatestVersion(pkg) {
|
|
18102
|
-
const { status, result } =
|
|
18123
|
+
const { status, result } = F(`npm view ${pkg}`, "pipe");
|
|
18103
18124
|
if (status === 0)
|
|
18104
18125
|
return result.match(/@([^\s]+)/)[1];
|
|
18105
18126
|
else
|
|
@@ -18107,19 +18128,19 @@ function getLatestVersion(pkg) {
|
|
|
18107
18128
|
}
|
|
18108
18129
|
|
|
18109
18130
|
// package.json
|
|
18110
|
-
var version = "0.0.
|
|
18131
|
+
var version = "0.0.70";
|
|
18111
18132
|
|
|
18112
18133
|
// src/help.ts
|
|
18113
18134
|
var isZh2 = process.env.PI_Lang === "zh";
|
|
18114
18135
|
function help(argv) {
|
|
18115
18136
|
const arg = argv[0];
|
|
18116
18137
|
if (arg === "-v" || arg === "--version") {
|
|
18117
|
-
|
|
18138
|
+
F(
|
|
18118
18139
|
isZh2 ? `gum style --foreground 212 --border-foreground 212 --border double --align center --width 50 --margin "1 2" --padding "2 4" "pi \u7248\u672C: ${version}" "\u8BF7\u4E3A\u6211\u7684\u52AA\u529B\u70B9\u4E00\u4E2A\u884C \u{1F31F}" "\u8C22\u8C22 \u{1F91F}"` : `gum style --foreground 212 --border-foreground 212 --border double --align center --width 50 --margin "1 2" --padding "2 4" "pi version: ${version}" "Please give me a \u{1F31F} for my efforts" "Thank you \u{1F91F}"`
|
|
18119
18140
|
);
|
|
18120
18141
|
process.exit(0);
|
|
18121
18142
|
} else if (arg === "-h" || arg === "--help") {
|
|
18122
|
-
|
|
18143
|
+
F(
|
|
18123
18144
|
`gum style --foreground 212 --border-foreground 212 --border double --align left --width 50 --margin "1 2" --padding "1 1" "PI Commands:" "~ pi: install package" "~ pix: npx package" "~ pui: uninstall package" "~ prun: run package script" "~ pinit: package init" "~ pbuild: go build | cargo build" "~ pfind: find monorepo of yarn or pnpm" "~ pa: agent alias" "~ pu: package upgrade" "~ pci: package clean install" "~ pil: package latest install"
|
|
18124
18145
|
`
|
|
18125
18146
|
);
|
|
@@ -18128,21 +18149,41 @@ function help(argv) {
|
|
|
18128
18149
|
}
|
|
18129
18150
|
|
|
18130
18151
|
// src/installDeps.ts
|
|
18152
|
+
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
18131
18153
|
async function installDeps() {
|
|
18132
|
-
|
|
18133
|
-
|
|
18134
|
-
await
|
|
18135
|
-
|
|
18136
|
-
|
|
18137
|
-
|
|
18138
|
-
|
|
18139
|
-
|
|
18140
|
-
|
|
18154
|
+
if (!Xx("gum")) {
|
|
18155
|
+
console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56gum..."));
|
|
18156
|
+
const { status } = await F("brew install gum", "pipe");
|
|
18157
|
+
if (status === 0) {
|
|
18158
|
+
console.log(import_picocolors2.default.cyan("gum \u5B89\u88C5\u6210\u529F!"));
|
|
18159
|
+
} else {
|
|
18160
|
+
console.log(
|
|
18161
|
+
import_picocolors2.default.red(
|
|
18162
|
+
"gum \u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u5C1D\u8BD5\u4ECE\u5B98\u7F51\u89E3\u51B3\u5B89\u88C5\u95EE\u9898! https://github.com/charmbracelet/gum"
|
|
18163
|
+
)
|
|
18164
|
+
);
|
|
18165
|
+
process.exit(1);
|
|
18166
|
+
}
|
|
18167
|
+
}
|
|
18168
|
+
if (!Xx("ni")) {
|
|
18169
|
+
console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56ni..."));
|
|
18170
|
+
const { status } = await F("npm i -g @antfu/ni", "pipe");
|
|
18171
|
+
if (status === 0) {
|
|
18172
|
+
console.log(import_picocolors2.default.cyan("ni \u5B89\u88C5\u6210\u529F!"));
|
|
18173
|
+
} else {
|
|
18174
|
+
console.log(
|
|
18175
|
+
import_picocolors2.default.red(
|
|
18176
|
+
"ni \u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u5C1D\u8BD5\u4ECE\u5B98\u7F51\u89E3\u51B3\u5B89\u88C5\u95EE\u9898! https://github.com/antfu/ni"
|
|
18177
|
+
)
|
|
18178
|
+
);
|
|
18179
|
+
process.exit(1);
|
|
18180
|
+
}
|
|
18181
|
+
}
|
|
18141
18182
|
}
|
|
18142
18183
|
|
|
18143
18184
|
// src/pi.ts
|
|
18144
18185
|
var import_process6 = __toESM(require("process"), 1);
|
|
18145
|
-
var
|
|
18186
|
+
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
18146
18187
|
var isZh3 = import_process6.default.env.PI_Lang === "zh";
|
|
18147
18188
|
async function pi(params, pkg, executor = "ni") {
|
|
18148
18189
|
const text = pkg ? `Installing ${pkg} ...` : "Updating dependency ...";
|
|
@@ -18160,7 +18201,7 @@ async function pi(params, pkg, executor = "ni") {
|
|
|
18160
18201
|
let stdio = "pipe";
|
|
18161
18202
|
let loading_status;
|
|
18162
18203
|
const { PI_DEFAULT, PI_MaxSockets: sockets } = import_process6.default.env;
|
|
18163
|
-
const pkgTool = await
|
|
18204
|
+
const pkgTool = await vx();
|
|
18164
18205
|
const maxSockets = sockets || 4;
|
|
18165
18206
|
const install = PI_DEFAULT === "yarn" || pkgTool === "yarn" ? newParams ? "add" : "" : "install";
|
|
18166
18207
|
if (pkgTool === "npm") {
|
|
@@ -18176,7 +18217,7 @@ async function pi(params, pkg, executor = "ni") {
|
|
|
18176
18217
|
loading_status = await loading(text);
|
|
18177
18218
|
}
|
|
18178
18219
|
const runSockets = executor.split(" ")[0] === "npm" ? ` --max-sockets=${maxSockets}` : "";
|
|
18179
|
-
const { status, result } = await
|
|
18220
|
+
const { status, result } = await Fx({
|
|
18180
18221
|
params: `${executor}${newParams ? ` ${newParams}` : runSockets}`,
|
|
18181
18222
|
stdio
|
|
18182
18223
|
});
|
|
@@ -18184,15 +18225,15 @@ async function pi(params, pkg, executor = "ni") {
|
|
|
18184
18225
|
loading_status = await loading("");
|
|
18185
18226
|
const end = Date.now();
|
|
18186
18227
|
const costTime = (end - start) / 1e3;
|
|
18187
|
-
successMsg +=
|
|
18228
|
+
successMsg += import_picocolors3.default.blue(` ---- \u23F0\uFF1A${costTime}s`);
|
|
18188
18229
|
if (status === 0) {
|
|
18189
|
-
loading_status.succeed(
|
|
18230
|
+
loading_status.succeed(import_picocolors3.default.green(successMsg));
|
|
18190
18231
|
} else if (result && result.includes("Not Found - 404")) {
|
|
18191
18232
|
const _result = isZh3 ? `${pkg} \u5305\u540D\u53EF\u80FD\u6709\u8BEF\uFF0C\u5E76\u4E0D\u80FD\u5728npm\u4E2D\u641C\u7D22\u5230\uFF0C\u8BF7\u68C0\u67E5` : `${pkg} the package name may be wrong, and cannot be found in npm, please check`;
|
|
18192
|
-
loading_status.fail(
|
|
18233
|
+
loading_status.fail(import_picocolors3.default.red(result ? `${failMsg}
|
|
18193
18234
|
${_result}` : failMsg));
|
|
18194
18235
|
} else {
|
|
18195
|
-
loading_status.fail(
|
|
18236
|
+
loading_status.fail(import_picocolors3.default.red(result ? `${failMsg}
|
|
18196
18237
|
${result}` : failMsg));
|
|
18197
18238
|
}
|
|
18198
18239
|
if (result) {
|
|
@@ -18200,7 +18241,7 @@ ${result}` : failMsg));
|
|
|
18200
18241
|
const match = result.match(reg2);
|
|
18201
18242
|
if (match) {
|
|
18202
18243
|
const dep = match[1];
|
|
18203
|
-
|
|
18244
|
+
F(`pi ${dep}@latest`);
|
|
18204
18245
|
}
|
|
18205
18246
|
}
|
|
18206
18247
|
import_process6.default.exit();
|
|
@@ -18208,7 +18249,7 @@ ${result}` : failMsg));
|
|
|
18208
18249
|
|
|
18209
18250
|
// src/pa.ts
|
|
18210
18251
|
function pa() {
|
|
18211
|
-
return
|
|
18252
|
+
return F("na");
|
|
18212
18253
|
}
|
|
18213
18254
|
|
|
18214
18255
|
// src/pci.ts
|
|
@@ -18218,7 +18259,7 @@ function pci(params, pkg) {
|
|
|
18218
18259
|
|
|
18219
18260
|
// src/pfind.ts
|
|
18220
18261
|
function pfind(params) {
|
|
18221
|
-
return
|
|
18262
|
+
return F(`ccommand find ${params}`);
|
|
18222
18263
|
}
|
|
18223
18264
|
|
|
18224
18265
|
// src/pil.ts
|
|
@@ -18244,79 +18285,88 @@ function addLatest(params) {
|
|
|
18244
18285
|
// src/pinit.ts
|
|
18245
18286
|
async function pinit() {
|
|
18246
18287
|
console.log("Initializing project...");
|
|
18247
|
-
switch (await
|
|
18288
|
+
switch (await vx()) {
|
|
18248
18289
|
case "npm":
|
|
18249
|
-
|
|
18290
|
+
F("npm init -y");
|
|
18250
18291
|
return;
|
|
18251
18292
|
case "yarn":
|
|
18252
|
-
|
|
18293
|
+
F("yarn init -y");
|
|
18253
18294
|
return;
|
|
18254
18295
|
case "pnpm":
|
|
18255
|
-
|
|
18296
|
+
F("pnpm init -y");
|
|
18256
18297
|
return;
|
|
18257
18298
|
default:
|
|
18258
|
-
|
|
18299
|
+
F("npm init -y");
|
|
18259
18300
|
}
|
|
18260
18301
|
}
|
|
18261
18302
|
|
|
18262
18303
|
// src/pix.ts
|
|
18263
18304
|
async function pix(params) {
|
|
18264
|
-
switch (await
|
|
18305
|
+
switch (await vx()) {
|
|
18265
18306
|
case "bun":
|
|
18266
|
-
return
|
|
18307
|
+
return F(`bunx ${params}`);
|
|
18267
18308
|
default:
|
|
18268
|
-
return
|
|
18309
|
+
return F(`npx ${params}`);
|
|
18269
18310
|
}
|
|
18270
18311
|
}
|
|
18271
18312
|
|
|
18272
18313
|
// src/prun.ts
|
|
18314
|
+
var import_ccommand = require("ccommand");
|
|
18273
18315
|
function prun(params) {
|
|
18274
|
-
return
|
|
18316
|
+
return (0, import_ccommand.ccommand)(params);
|
|
18275
18317
|
}
|
|
18276
18318
|
|
|
18277
18319
|
// src/pu.ts
|
|
18278
18320
|
function pu() {
|
|
18279
|
-
return
|
|
18321
|
+
return F("nu");
|
|
18280
18322
|
}
|
|
18281
18323
|
|
|
18282
18324
|
// src/pui.ts
|
|
18283
|
-
var
|
|
18325
|
+
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
18284
18326
|
var isZh4 = process.env.PI_Lang === "zh";
|
|
18285
18327
|
async function pui(params, pkg) {
|
|
18286
18328
|
const text = `${isZh4 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${pkg} ...`;
|
|
18287
|
-
const
|
|
18329
|
+
const start = Date.now();
|
|
18330
|
+
let successMsg = isZh4 ? `${pkg}\u5378\u8F7D\u6210\u529F! \u{1F60A}` : `UnInstalled ${pkg} successfully! \u{1F60A}`;
|
|
18288
18331
|
const failMsg = isZh4 ? `${pkg}\u5378\u8F7D\u5931\u8D25 \u{1F62D}` : `Failed to uninstall ${pkg} \u{1F62D}`;
|
|
18289
18332
|
if (!pkg) {
|
|
18290
|
-
console.log(
|
|
18333
|
+
console.log(
|
|
18334
|
+
import_picocolors4.default.yellow(
|
|
18335
|
+
isZh4 ? "\u9700\u8981\u6307\u5B9A\u8981\u5378\u8F7D\u7684\u5305\u540D\uFF01" : "Need to specify an uninstall package name!"
|
|
18336
|
+
)
|
|
18337
|
+
);
|
|
18291
18338
|
process.exit(1);
|
|
18292
18339
|
}
|
|
18293
18340
|
const loading_status = await loading(text);
|
|
18294
|
-
const { status, result } = await
|
|
18341
|
+
const { status, result } = await Fx(`nun ${params}`);
|
|
18342
|
+
const end = Date.now();
|
|
18343
|
+
const costTime = (end - start) / 1e3;
|
|
18344
|
+
successMsg += import_picocolors4.default.blue(` ---- \u23F0\uFF1A${costTime}s`);
|
|
18295
18345
|
if (status === 0)
|
|
18296
|
-
loading_status.succeed(
|
|
18346
|
+
loading_status.succeed(import_picocolors4.default.green(successMsg));
|
|
18297
18347
|
else
|
|
18298
|
-
loading_status.fail(
|
|
18348
|
+
loading_status.fail(import_picocolors4.default.red(result ? `${failMsg}
|
|
18299
18349
|
${result}` : failMsg));
|
|
18300
18350
|
process.exit();
|
|
18301
18351
|
}
|
|
18302
18352
|
|
|
18303
18353
|
// src/pio.ts
|
|
18304
18354
|
var import_process7 = __toESM(require("process"), 1);
|
|
18305
|
-
var
|
|
18355
|
+
var import_picocolors5 = __toESM(require_picocolors(), 1);
|
|
18306
18356
|
async function pio(params, pkg, executor = "ni") {
|
|
18307
18357
|
const successMsg = pkg ? `Installed ${pkg} successfully! \u{1F60A}` : "Updated dependency successfully! \u{1F60A}";
|
|
18308
18358
|
const failMsg = pkg ? `Failed to install ${pkg} \u{1F62D}` : "Failed to update dependency! \u{1F62D}";
|
|
18309
18359
|
const offline = "--prefer-offline";
|
|
18310
18360
|
const newParams = await getParams(params);
|
|
18311
|
-
const { status, result } = await
|
|
18361
|
+
const { status, result } = await Fx({
|
|
18312
18362
|
params: `${executor} ${newParams} ${offline}`,
|
|
18313
18363
|
stdio: "inherit"
|
|
18314
18364
|
});
|
|
18315
18365
|
const loading_status = await loading("");
|
|
18316
18366
|
if (status === 0)
|
|
18317
|
-
loading_status.succeed(
|
|
18367
|
+
loading_status.succeed(import_picocolors5.default.green(successMsg));
|
|
18318
18368
|
else
|
|
18319
|
-
loading_status.fail(
|
|
18369
|
+
loading_status.fail(import_picocolors5.default.red(result ? `${result}
|
|
18320
18370
|
|
|
18321
18371
|
${failMsg}` : failMsg));
|
|
18322
18372
|
import_process7.default.exit();
|
|
@@ -18350,22 +18400,22 @@ async function setup() {
|
|
|
18350
18400
|
}
|
|
18351
18401
|
const argv = import_process8.default.argv.slice(2);
|
|
18352
18402
|
help(argv);
|
|
18353
|
-
const params =
|
|
18354
|
-
if (!
|
|
18355
|
-
if (
|
|
18403
|
+
const params = Hi(argv.join(" ")).trim();
|
|
18404
|
+
if (!Qx(rootPath)) {
|
|
18405
|
+
if (wf()) {
|
|
18356
18406
|
if (exec === "pi") {
|
|
18357
18407
|
const loading_status = await loading(
|
|
18358
18408
|
`${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
|
|
18359
18409
|
`
|
|
18360
18410
|
);
|
|
18361
|
-
const { status } = await
|
|
18411
|
+
const { status } = await Fx(`go get ${params}`);
|
|
18362
18412
|
if (status === 0) {
|
|
18363
18413
|
loading_status.succeed(
|
|
18364
|
-
|
|
18414
|
+
import_picocolors6.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
|
|
18365
18415
|
);
|
|
18366
18416
|
} else {
|
|
18367
18417
|
loading_status.fail(
|
|
18368
|
-
|
|
18418
|
+
import_picocolors6.default.red(isZh5 ? "\u5B89\u88C5\u5931\u8D25 \u{1F62D}" : "Failed to install \u{1F62D}")
|
|
18369
18419
|
);
|
|
18370
18420
|
}
|
|
18371
18421
|
} else if (exec === "pui") {
|
|
@@ -18373,51 +18423,51 @@ async function setup() {
|
|
|
18373
18423
|
`${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
|
|
18374
18424
|
`
|
|
18375
18425
|
);
|
|
18376
|
-
const { status } = await
|
|
18426
|
+
const { status } = await Fx(`go clean ${params}`);
|
|
18377
18427
|
if (status === 0) {
|
|
18378
18428
|
loading_status.succeed(
|
|
18379
|
-
|
|
18429
|
+
import_picocolors6.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
|
|
18380
18430
|
);
|
|
18381
18431
|
} else {
|
|
18382
18432
|
loading_status.fail(
|
|
18383
|
-
|
|
18433
|
+
import_picocolors6.default.red(isZh5 ? "\u5378\u8F7D\u5931\u8D25 \u{1F62D}" : "Failed to uninstall \u{1F62D}")
|
|
18384
18434
|
);
|
|
18385
18435
|
}
|
|
18386
18436
|
} else if (exec === "prun") {
|
|
18387
18437
|
const match = params ? params.endsWith(".go") ? [`**/${params}`] : [`**/${params}.go`, `**/${params}/main.go`] : "main.go";
|
|
18388
18438
|
const target = (await (0, import_fast_glob.default)(match))[0];
|
|
18389
18439
|
if (!target) {
|
|
18390
|
-
console.log(
|
|
18440
|
+
console.log(import_picocolors6.default.red("No such file"));
|
|
18391
18441
|
import_process8.default.exit(1);
|
|
18392
18442
|
}
|
|
18393
|
-
|
|
18443
|
+
F(`go run ${target}`);
|
|
18394
18444
|
} else if (exec === "pinit") {
|
|
18395
|
-
|
|
18445
|
+
F(`go mod init ${params}`);
|
|
18396
18446
|
} else if (exec === "pbuild") {
|
|
18397
|
-
|
|
18447
|
+
F(`go build ${params}`);
|
|
18398
18448
|
} else {
|
|
18399
18449
|
console.log(
|
|
18400
|
-
|
|
18450
|
+
import_picocolors6.default.red(
|
|
18401
18451
|
isZh5 ? "\u5F53\u524D\u6307\u4EE4\u8FD8\u4E0D\u652F\u6301" : "The commands is not supported"
|
|
18402
18452
|
)
|
|
18403
18453
|
);
|
|
18404
18454
|
}
|
|
18405
18455
|
import_process8.default.exit();
|
|
18406
18456
|
}
|
|
18407
|
-
if (
|
|
18457
|
+
if (Vf()) {
|
|
18408
18458
|
if (exec === "pi") {
|
|
18409
18459
|
const loading_status = await loading(
|
|
18410
18460
|
`${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
|
|
18411
18461
|
`
|
|
18412
18462
|
);
|
|
18413
|
-
const { status } = await
|
|
18463
|
+
const { status } = await Fx(`cargo install ${params}`);
|
|
18414
18464
|
if (status === 0) {
|
|
18415
18465
|
loading_status.succeed(
|
|
18416
|
-
|
|
18466
|
+
import_picocolors6.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
|
|
18417
18467
|
);
|
|
18418
18468
|
} else {
|
|
18419
18469
|
loading_status.fail(
|
|
18420
|
-
|
|
18470
|
+
import_picocolors6.default.red(isZh5 ? "\u5B89\u88C5\u5931\u8D25 \u{1F62D}" : "Failed to install \u{1F62D}")
|
|
18421
18471
|
);
|
|
18422
18472
|
}
|
|
18423
18473
|
} else if (exec === "pui") {
|
|
@@ -18425,25 +18475,25 @@ async function setup() {
|
|
|
18425
18475
|
`${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
|
|
18426
18476
|
`
|
|
18427
18477
|
);
|
|
18428
|
-
const { status } = await
|
|
18478
|
+
const { status } = await Fx(`cargo uninstall ${params}`);
|
|
18429
18479
|
if (status === 0) {
|
|
18430
18480
|
loading_status.succeed(
|
|
18431
|
-
|
|
18481
|
+
import_picocolors6.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
|
|
18432
18482
|
);
|
|
18433
18483
|
} else {
|
|
18434
18484
|
loading_status.fail(
|
|
18435
|
-
|
|
18485
|
+
import_picocolors6.default.red(isZh5 ? "\u5378\u8F7D\u5931\u8D25 \u{1F62D}" : "Failed to uninstall \u{1F62D}")
|
|
18436
18486
|
);
|
|
18437
18487
|
}
|
|
18438
18488
|
} else if (exec === "prun") {
|
|
18439
|
-
|
|
18489
|
+
F(`cargo run ${params}`);
|
|
18440
18490
|
} else if (exec === "pinit") {
|
|
18441
|
-
|
|
18491
|
+
F(`cargo init ${params}`);
|
|
18442
18492
|
} else if (exec === "pbuild") {
|
|
18443
|
-
|
|
18493
|
+
F(`cargo build ${params}`);
|
|
18444
18494
|
} else {
|
|
18445
18495
|
console.log(
|
|
18446
|
-
|
|
18496
|
+
import_picocolors6.default.red(
|
|
18447
18497
|
isZh5 ? "\u5F53\u524D\u6307\u4EE4\u8FD8\u4E0D\u652F\u6301" : "The commands is not supported"
|
|
18448
18498
|
)
|
|
18449
18499
|
);
|
|
@@ -18452,7 +18502,7 @@ async function setup() {
|
|
|
18452
18502
|
}
|
|
18453
18503
|
if (!runMap[exec]) {
|
|
18454
18504
|
console.log(
|
|
18455
|
-
|
|
18505
|
+
import_picocolors6.default.yellow(
|
|
18456
18506
|
isZh5 ? "\u547D\u4EE4\u4E0D\u5B58\u5728\uFF0C\u8BF7\u6267\u884Cpi -h\u67E5\u770B\u5E2E\u52A9" : "The command does not exist, please execute pi -h to view the help"
|
|
18457
18507
|
)
|
|
18458
18508
|
);
|