minutool 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +233 -0
- package/dist/index.d.ts +1178 -0
- package/dist/minutool.js +1181 -0
- package/dist/minutool.umd.cjs +4 -0
- package/package.json +51 -0
package/dist/minutool.js
ADDED
|
@@ -0,0 +1,1181 @@
|
|
|
1
|
+
const yt = (t, e) => {
|
|
2
|
+
let n = [];
|
|
3
|
+
for (let i in t)
|
|
4
|
+
n.push(t[i][e]);
|
|
5
|
+
return n;
|
|
6
|
+
}, bt = (t, e) => {
|
|
7
|
+
for (let n in t)
|
|
8
|
+
if (t[n] === e)
|
|
9
|
+
return n;
|
|
10
|
+
return null;
|
|
11
|
+
}, Tt = (t) => {
|
|
12
|
+
let e = /* @__PURE__ */ new Map();
|
|
13
|
+
return t.filter((n) => {
|
|
14
|
+
if (!e.has(n))
|
|
15
|
+
return e.set(n, !0), !0;
|
|
16
|
+
});
|
|
17
|
+
}, Mt = (t, e, n) => {
|
|
18
|
+
if (!t || !t.length)
|
|
19
|
+
return t;
|
|
20
|
+
let i = {};
|
|
21
|
+
if (t.forEach((s) => {
|
|
22
|
+
let c = s[e];
|
|
23
|
+
i[c] || (i[c] = []), i[c].push(s);
|
|
24
|
+
}), !n)
|
|
25
|
+
return i;
|
|
26
|
+
let a = {};
|
|
27
|
+
for (let s in i)
|
|
28
|
+
a[s] = i[s][0];
|
|
29
|
+
return a;
|
|
30
|
+
}, St = (t) => Object.keys(t).sort().reduce(function(e, n) {
|
|
31
|
+
return e[n] = t[n], e;
|
|
32
|
+
}, {}), Ct = (t, e) => {
|
|
33
|
+
let n = t.length;
|
|
34
|
+
if (e < 1 || !n)
|
|
35
|
+
return [];
|
|
36
|
+
if (e > n)
|
|
37
|
+
return [t];
|
|
38
|
+
let i = [], a = Math.floor(n / e), s = n % e;
|
|
39
|
+
for (let c = 1; c <= a; c++)
|
|
40
|
+
i.push(t.splice(0, e));
|
|
41
|
+
return s && i.push(t.splice(0, s)), i;
|
|
42
|
+
}, _t = (t) => {
|
|
43
|
+
let e = -1;
|
|
44
|
+
for (let n = t.length - 1; n >= 0; n--)
|
|
45
|
+
if (t[n]) {
|
|
46
|
+
e = n;
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
return t.slice(0, e + 1);
|
|
50
|
+
};
|
|
51
|
+
function G(t) {
|
|
52
|
+
return t && t.charAt(0).toUpperCase() + t.slice(1);
|
|
53
|
+
}
|
|
54
|
+
const Nt = (t) => (t + "").replace(/\\(.?)/g, function(e, n) {
|
|
55
|
+
switch (n) {
|
|
56
|
+
case "\\":
|
|
57
|
+
return "\\";
|
|
58
|
+
case "0":
|
|
59
|
+
return "\0";
|
|
60
|
+
case "":
|
|
61
|
+
return "";
|
|
62
|
+
default:
|
|
63
|
+
return n;
|
|
64
|
+
}
|
|
65
|
+
}), Ot = (t, e, n = "...") => {
|
|
66
|
+
let i = /[^\x00-\xff]/g;
|
|
67
|
+
if (t.replace(i, "mm").length <= e)
|
|
68
|
+
return t;
|
|
69
|
+
let a = Math.floor(e / 2);
|
|
70
|
+
for (let s = a; s < t.length; s++)
|
|
71
|
+
if (t.substr(0, s).replace(i, "mm").length >= e)
|
|
72
|
+
return t.substr(0, s) + n;
|
|
73
|
+
return t;
|
|
74
|
+
}, Dt = (t, e) => {
|
|
75
|
+
const n = Object.keys(e), i = Object.values(e);
|
|
76
|
+
return new Function(...n, `return \`${t}\`;`)(...i);
|
|
77
|
+
};
|
|
78
|
+
function Rt(t) {
|
|
79
|
+
return t.replace(/[-_](.)/g, (e, n) => n.toUpperCase());
|
|
80
|
+
}
|
|
81
|
+
function kt(t) {
|
|
82
|
+
return t.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
83
|
+
}
|
|
84
|
+
function Lt(t, e, n = "...") {
|
|
85
|
+
return t.length <= e ? t : t.slice(0, e) + n;
|
|
86
|
+
}
|
|
87
|
+
const M = (t) => (t + "").replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1"), $ = (t) => {
|
|
88
|
+
let e = "", n = 0, i = 0, a = 0, s = 0;
|
|
89
|
+
for (; n < t.length; )
|
|
90
|
+
i = t.charCodeAt(n), i < 128 ? (e += String.fromCharCode(i), n++) : i > 191 && i < 224 ? (a = t.charCodeAt(n + 1), e += String.fromCharCode((i & 31) << 6 | a & 63), n += 2) : (a = t.charCodeAt(n + 1), s = t.charCodeAt(n + 2), e += String.fromCharCode((i & 15) << 12 | (a & 63) << 6 | s & 63), n += 3);
|
|
91
|
+
return e;
|
|
92
|
+
}, Ht = (t) => {
|
|
93
|
+
let e = !1;
|
|
94
|
+
try {
|
|
95
|
+
JSON.parse(t), e = !0;
|
|
96
|
+
} catch {
|
|
97
|
+
}
|
|
98
|
+
return e;
|
|
99
|
+
}, I = (t) => {
|
|
100
|
+
t = t.replace(/\r\n/g, "n");
|
|
101
|
+
let e = "";
|
|
102
|
+
for (let n = 0; n < t.length; n++) {
|
|
103
|
+
let i = t.charCodeAt(n);
|
|
104
|
+
i < 128 ? e += String.fromCharCode(i) : i > 127 && i < 2048 ? (e += String.fromCharCode(i >> 6 | 192), e += String.fromCharCode(i & 63 | 128)) : (e += String.fromCharCode(i >> 12 | 224), e += String.fromCharCode(i >> 6 & 63 | 128), e += String.fromCharCode(i & 63 | 128));
|
|
105
|
+
}
|
|
106
|
+
return e;
|
|
107
|
+
}, It = (t) => {
|
|
108
|
+
let e = 0, n = t.length, i = -1;
|
|
109
|
+
for (let a = 0; a < n; a++)
|
|
110
|
+
i = t.charCodeAt(a), i >= 0 && i <= 128 ? e += 1 : e += 3;
|
|
111
|
+
return e;
|
|
112
|
+
}, W = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890", K = (t = 6, e = W) => {
|
|
113
|
+
let n = "";
|
|
114
|
+
for (let i = 0; i < t; i++) {
|
|
115
|
+
let a = Math.round(Math.random() * (e.length - 1));
|
|
116
|
+
n += e.substring(a, a + 1);
|
|
117
|
+
}
|
|
118
|
+
return n;
|
|
119
|
+
}, Ft = (t = 1, e = 8) => {
|
|
120
|
+
let n = [];
|
|
121
|
+
const i = "bcdfghjklmnpqrstvwxyz", a = "aeiou";
|
|
122
|
+
for (; t-- > 0; ) {
|
|
123
|
+
let s = "";
|
|
124
|
+
for (let c = 0; c < e; c = c + 3)
|
|
125
|
+
s += i[Math.floor(Math.random() * i.length)], s += a[Math.floor(Math.random() * a.length)], s += i[Math.floor(Math.random() * i.length)];
|
|
126
|
+
n.push(s);
|
|
127
|
+
}
|
|
128
|
+
return n;
|
|
129
|
+
}, Pt = (t, e = !1) => {
|
|
130
|
+
let n = [];
|
|
131
|
+
return t.replace(/[-_\s+]/g, " ").split(" ").forEach((i, a) => {
|
|
132
|
+
n.push(a === 0 && !e ? i : G(i));
|
|
133
|
+
}), n.join("");
|
|
134
|
+
}, _ = 0, N = 1, J = 2, Ut = (t, e = "", n = _) => {
|
|
135
|
+
if (e.length) {
|
|
136
|
+
let i = new RegExp("^[" + M(e) + "]+"), a = new RegExp("[" + M(e) + "]+$");
|
|
137
|
+
return n === N ? t.replace(i, "") : n === J ? t.replace(a, "") : t.replace(i, "").replace(a, "");
|
|
138
|
+
} else
|
|
139
|
+
return n === _ ? t.trim() : n === N ? t.trimStart() : t.trimEnd();
|
|
140
|
+
}, g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", Bt = (t) => {
|
|
141
|
+
let e = "", n, i, a, s, c, o, l, r = 0;
|
|
142
|
+
for (t = t.replace(/\+\+[++^A-Za-z0-9+/=]/g, ""); r < t.length; )
|
|
143
|
+
s = g.indexOf(t.charAt(r++)), c = g.indexOf(t.charAt(r++)), o = g.indexOf(t.charAt(r++)), l = g.indexOf(t.charAt(r++)), n = s << 2 | c >> 4, i = (c & 15) << 4 | o >> 2, a = (o & 3) << 6 | l, e = e + String.fromCharCode(n), o !== 64 && (e = e + String.fromCharCode(i)), l !== 64 && (e = e + String.fromCharCode(a));
|
|
144
|
+
return e = $(e), e;
|
|
145
|
+
}, Yt = (t) => I(t).replace("+", "-").replace("/", "_"), qt = (t) => {
|
|
146
|
+
let e = "", n, i, a, s, c, o, l, r = 0;
|
|
147
|
+
for (t = I(t); r < t.length; )
|
|
148
|
+
n = t.charCodeAt(r++), i = t.charCodeAt(r++), a = t.charCodeAt(r++), s = n >> 2, c = (n & 3) << 4 | i >> 4, o = (i & 15) << 2 | a >> 6, l = a & 63, isNaN(i) ? o = l = 64 : isNaN(a) && (l = 64), e = e + g.charAt(s) + g.charAt(c) + g.charAt(o) + g.charAt(l);
|
|
149
|
+
return e;
|
|
150
|
+
}, V = async (t) => await j(t), j = (t) => new Promise((e, n) => {
|
|
151
|
+
const i = new FileReader();
|
|
152
|
+
i.readAsDataURL(t), i.onload = () => e(i.result), i.onerror = (a) => n(a);
|
|
153
|
+
}), Z = (t) => {
|
|
154
|
+
if (t.requestFullscreen)
|
|
155
|
+
return t.requestFullscreen();
|
|
156
|
+
if (t.webkitRequestFullScreen)
|
|
157
|
+
return t.webkitRequestFullScreen();
|
|
158
|
+
throw t.mozRequestFullScreen && t.mozRequestFullScreen(), t.msRequestFullScreen && t.msRequestFullScreen(), "Browser no allow full screen";
|
|
159
|
+
}, Q = () => document.exitFullscreen(), zt = (t) => new Promise((e, n) => {
|
|
160
|
+
X() ? Q().then(e).catch(n) : Z(t).then(e).catch(n);
|
|
161
|
+
}), X = () => !!document.fullscreenElement, Gt = (t) => {
|
|
162
|
+
const e = navigator.language || navigator.userLanguage;
|
|
163
|
+
if (t.includes(e))
|
|
164
|
+
return e;
|
|
165
|
+
const n = e.split("-")[0], i = t.find((a) => a.startsWith(n));
|
|
166
|
+
return i || t[0];
|
|
167
|
+
}, $t = (t, e, n, i = "/") => {
|
|
168
|
+
let a = "";
|
|
169
|
+
if (n) {
|
|
170
|
+
let s = /* @__PURE__ */ new Date();
|
|
171
|
+
s.setTime(Date.now() + n * 24 * 60 * 60 * 1e3), a = "; expires=" + s.toUTCString();
|
|
172
|
+
}
|
|
173
|
+
document.cookie = t + "=" + (e || "") + a + "; path=" + i;
|
|
174
|
+
}, Wt = (t) => {
|
|
175
|
+
let e = t + "=", n = document.cookie.split(";");
|
|
176
|
+
for (let i = 0; i < n.length; i++) {
|
|
177
|
+
let a = n[i];
|
|
178
|
+
for (; a.charAt(0) === " "; ) a = a.substring(1, a.length);
|
|
179
|
+
if (a.indexOf(e) === 0) return a.substring(e.length, a.length);
|
|
180
|
+
}
|
|
181
|
+
return null;
|
|
182
|
+
}, Kt = (t) => {
|
|
183
|
+
document.cookie = t + "=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
|
|
184
|
+
};
|
|
185
|
+
let tt = 0;
|
|
186
|
+
const et = (t = "") => "guid_" + (t || K(6)) + ++tt, Jt = (t, e) => {
|
|
187
|
+
let n, i, a = 0;
|
|
188
|
+
return function() {
|
|
189
|
+
let s = +/* @__PURE__ */ new Date();
|
|
190
|
+
n = this, i = arguments, s - a > e && (t.apply(n, i), a = s);
|
|
191
|
+
};
|
|
192
|
+
}, Vt = (t, e) => {
|
|
193
|
+
let n, i, a = 0, s = !1;
|
|
194
|
+
return function() {
|
|
195
|
+
if (s)
|
|
196
|
+
return;
|
|
197
|
+
let c = +/* @__PURE__ */ new Date();
|
|
198
|
+
n = this, i = arguments;
|
|
199
|
+
let o = e - (c - a);
|
|
200
|
+
o <= 0 ? (t.apply(n, i), a = c) : (s = !0, setTimeout(() => {
|
|
201
|
+
t.apply(n, i), s = !1, a = c;
|
|
202
|
+
}, o));
|
|
203
|
+
};
|
|
204
|
+
}, jt = (t, e) => {
|
|
205
|
+
let n;
|
|
206
|
+
return function() {
|
|
207
|
+
let i = this, a = arguments;
|
|
208
|
+
clearTimeout(n), n = setTimeout(function() {
|
|
209
|
+
t.apply(i, a);
|
|
210
|
+
}, e);
|
|
211
|
+
};
|
|
212
|
+
}, Zt = (t) => t && typeof t == "object" && t.then && typeof t.then == "function", Qt = (t) => {
|
|
213
|
+
let e = !1;
|
|
214
|
+
try {
|
|
215
|
+
JSON.parse(t), e = !0;
|
|
216
|
+
} catch {
|
|
217
|
+
}
|
|
218
|
+
return e;
|
|
219
|
+
}, Xt = (t) => t && typeof t == "object" && !Array.isArray(t), te = (t) => t ? Object.prototype.toString.call(t) === "[object Function]" || typeof t == "function" || t instanceof Function : !1, nt = (t) => typeof t != "string" || t.trim() === "" ? !1 : /^(https?:\/\/|\/\/|\/|\.\.?\/*)/i.test(t), ee = () => {
|
|
220
|
+
let t = new Error().stack;
|
|
221
|
+
console.log(t);
|
|
222
|
+
}, ne = (1 + Math.sqrt(5)) / 2 - 1, it = 96, ie = (t, e = it) => t / 25.4 * e, h = (t, e, n, i = !0) => i ? t >= e && t <= n : t > e && t < n, ae = (t, e) => Math.floor(Math.random() * (e + 1 - t)) + t, oe = (t, e = 2) => {
|
|
223
|
+
let n = Math.pow(10, e);
|
|
224
|
+
return Math.round(t * n) / n;
|
|
225
|
+
}, re = (...t) => {
|
|
226
|
+
let e = 0;
|
|
227
|
+
return t.forEach((n) => {
|
|
228
|
+
if (typeof n == "number" && !isNaN(n)) {
|
|
229
|
+
const i = n.toString().split(".")[1];
|
|
230
|
+
i && (e = Math.max(e, i.length));
|
|
231
|
+
}
|
|
232
|
+
}), e;
|
|
233
|
+
}, le = (t) => (t = Math.abs(Number(t)), t === 0 ? 1 : Math.floor(Math.log10(t)) + 1), se = (t) => {
|
|
234
|
+
y(t).style.display = "none";
|
|
235
|
+
}, pe = (t) => {
|
|
236
|
+
y(t).style.display = "";
|
|
237
|
+
}, ce = (t) => {
|
|
238
|
+
let e = y(t);
|
|
239
|
+
return e && e.parentNode && e.parentNode.removeChild(e);
|
|
240
|
+
}, T = "disabled", at = (t, e = "") => F(t, e, !1), ot = (t, e = "") => F(t, e, !0), F = (t, e = "", n = null) => {
|
|
241
|
+
let i = y(t), a = n === null ? !i.classList.contains(T) : !n;
|
|
242
|
+
a && lt(`.${T} {pointer-event:none !important;}`, "__element_lock_style__"), i.classList.toggle(T, a), i[a ? "setAttribute" : "removeAttribute"]("disabled", "disabled"), i[a ? "setAttribute" : "removeAttribute"]("data-disabled", "disabled"), e && i.classList.toggle(e, a);
|
|
243
|
+
}, ue = (t, e) => {
|
|
244
|
+
at(t), e(() => {
|
|
245
|
+
ot(t);
|
|
246
|
+
});
|
|
247
|
+
}, de = (t) => t.parentNode ? Array.prototype.indexOf.call(t.parentNode.children, t) : -1, P = (t, e = document) => {
|
|
248
|
+
if (typeof t == "string")
|
|
249
|
+
return t = t.trim(), t.indexOf(":scope") !== 0 && (t = ":scope " + t), Array.from(e.querySelectorAll(t));
|
|
250
|
+
if (Array.isArray(t)) {
|
|
251
|
+
let n = [];
|
|
252
|
+
return t.forEach((i) => {
|
|
253
|
+
n.push(...P(i));
|
|
254
|
+
}), n;
|
|
255
|
+
} else return NodeList.prototype.isPrototypeOf(t) || HTMLCollection.prototype.isPrototypeOf(t) ? Array.from(t) : t instanceof HTMLElement ? [t] : t;
|
|
256
|
+
}, y = (t, e = document) => typeof t == "string" ? e.querySelector(t) : t, fe = (t) => {
|
|
257
|
+
let e = document.getElementsByTagName("*"), n = [];
|
|
258
|
+
for (n = []; t && t.nodeType === 1; t = t.parentNode)
|
|
259
|
+
if (t.hasAttribute("id")) {
|
|
260
|
+
let i = 0;
|
|
261
|
+
for (let a = 0; a < e.length && (e[a].hasAttribute("id") && e[a].id === t.id && i++, !(i > 1)); a++)
|
|
262
|
+
;
|
|
263
|
+
if (i === 1)
|
|
264
|
+
return n.unshift('id("' + t.getAttribute("id") + '")'), n.join("/");
|
|
265
|
+
n.unshift(t.localName.toLowerCase() + '[@id="' + t.getAttribute("id") + '"]');
|
|
266
|
+
} else if (t.hasAttribute("class"))
|
|
267
|
+
n.unshift(t.localName.toLowerCase() + '[@class="' + t.getAttribute("class") + '"]');
|
|
268
|
+
else {
|
|
269
|
+
let i, a;
|
|
270
|
+
for (i = 1, a = t.previousSibling; a; a = a.previousSibling)
|
|
271
|
+
a.localName === t.localName && i++;
|
|
272
|
+
n.unshift(t.localName.toLowerCase() + "[" + i + "]");
|
|
273
|
+
}
|
|
274
|
+
return n.length ? "/" + n.join("/") : null;
|
|
275
|
+
}, me = (t, e, n = !0) => {
|
|
276
|
+
const i = "ON_DOM_TREE_CHANGE_BIND_" + et();
|
|
277
|
+
let a = () => {
|
|
278
|
+
P(`input:not([${i}]), textarea:not([${i}]), select:not([${i}])`, t).forEach((s) => {
|
|
279
|
+
s.setAttribute(i, "1"), s.addEventListener("change", e);
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
rt(
|
|
283
|
+
t,
|
|
284
|
+
{ attributes: !0, subtree: !0, childList: !0 },
|
|
285
|
+
() => {
|
|
286
|
+
n && a(), e();
|
|
287
|
+
},
|
|
288
|
+
10
|
|
289
|
+
), n && a();
|
|
290
|
+
}, rt = (t, e, n, i = 10) => {
|
|
291
|
+
let a = 0, s = !1, c = new MutationObserver(() => {
|
|
292
|
+
if (s)
|
|
293
|
+
return;
|
|
294
|
+
let o = i - (Date.now() - a);
|
|
295
|
+
o > 0 ? (s = !0, setTimeout(() => {
|
|
296
|
+
s = !1, a = Date.now(), n(c);
|
|
297
|
+
}, o)) : (a = Date.now(), n(c));
|
|
298
|
+
});
|
|
299
|
+
c.observe(t, e);
|
|
300
|
+
}, ge = (t, e = {
|
|
301
|
+
left: 0,
|
|
302
|
+
top: 0,
|
|
303
|
+
width: window.innerWidth,
|
|
304
|
+
height: window.innerHeight
|
|
305
|
+
}) => {
|
|
306
|
+
let n = { left: t.left, top: t.top };
|
|
307
|
+
return t.width > e.width || t.height > e.height || (t.width + t.left > e.width + e.left && (n.left = t.left - (t.width + t.left - (e.width + e.left))), t.height + t.top > e.height + e.top && (n.top = t.top - (t.height + t.top - (e.height + e.top))), t.left < e.left && (n.left = e.left), t.top < e.top && (n.top = e.top)), n;
|
|
308
|
+
}, he = (t, e) => t.left <= e.left ? t.left + t.width >= e.left && (h(e.top, t.top, t.top + t.height) || h(e.top + e.height, t.top, t.top + t.height) || e.top >= t.top && e.height >= t.height) : e.left + e.width >= t.left && (h(t.top, e.top, e.top + e.height) || h(t.top + t.height, e.top, e.top + e.height) || t.top >= e.top && t.height >= e.height), xe = (t) => t ? !!(t.tabIndex >= 0 || t instanceof HTMLAnchorElement && t.href || t instanceof HTMLButtonElement && !t.disabled || t instanceof HTMLInputElement && !t.disabled || t instanceof HTMLTextAreaElement && !t.disabled) : !1;
|
|
309
|
+
let x = {};
|
|
310
|
+
const we = (t, e = !1) => (!e && t in x || (x[t] = new Promise((n, i) => {
|
|
311
|
+
let a = document.createElement("link");
|
|
312
|
+
a.rel = "stylesheet", a.href = t, a.onload = () => {
|
|
313
|
+
n();
|
|
314
|
+
}, a.onerror = () => {
|
|
315
|
+
i();
|
|
316
|
+
}, document.head.append(a);
|
|
317
|
+
})), x[t]), ve = (t, e = !1) => (!e && t in x || (x[t] = new Promise((n, i) => {
|
|
318
|
+
let a = document.createElement("script");
|
|
319
|
+
a.src = t, a.onload = () => {
|
|
320
|
+
n();
|
|
321
|
+
}, a.onerror = () => {
|
|
322
|
+
i();
|
|
323
|
+
}, document.head.append(a);
|
|
324
|
+
})), x[t]), Ae = (t) => {
|
|
325
|
+
let e = t.style.visibility, n = t.style.display, i, a;
|
|
326
|
+
return t.style.visibility = "hidden", t.style.display = "block", i = t.clientWidth, a = t.clientHeight, t.style.visibility = e, t.style.display = n, { width: i, height: a };
|
|
327
|
+
}, lt = (t, e = "", n = document) => {
|
|
328
|
+
if (e && n.querySelector(`#${e}`))
|
|
329
|
+
return n.querySelector(`#${e}`);
|
|
330
|
+
let i = n.createElement("style");
|
|
331
|
+
return n.head.appendChild(i), i.innerHTML = t, e && (i.id = e), i;
|
|
332
|
+
}, Ee = (t, e) => h(t.top, e.top, e.top + e.height) && h(t.left, e.left, e.left + e.width) && //左上角
|
|
333
|
+
h(t.top + t.height, e.top, e.top + e.height) && h(t.left + t.width, e.left, e.left + e.width), ye = (t) => Math.pow(10, -t), be = (t, e) => {
|
|
334
|
+
try {
|
|
335
|
+
return new URL(t, e).href;
|
|
336
|
+
} catch {
|
|
337
|
+
return t;
|
|
338
|
+
}
|
|
339
|
+
}, Te = (t, e = null) => {
|
|
340
|
+
let n = document.createElement("template");
|
|
341
|
+
t = t.trim(), n.innerHTML = t;
|
|
342
|
+
let i = [];
|
|
343
|
+
return e ? n.content.childNodes.forEach((a) => {
|
|
344
|
+
i.push(e.appendChild(a));
|
|
345
|
+
}) : i = Array.from(n.content.childNodes), i.length === 1 ? i[0] : i;
|
|
346
|
+
}, st = (t, e = !1) => {
|
|
347
|
+
if (!t)
|
|
348
|
+
throw new Error("el is null");
|
|
349
|
+
const n = t.getBoundingClientRect();
|
|
350
|
+
if (e && !n.height) {
|
|
351
|
+
const i = t.style.visibility, a = t.style.display;
|
|
352
|
+
t.style.visibility = "hidden", t.style.display = "block";
|
|
353
|
+
const s = st(t);
|
|
354
|
+
return t.style.visibility = i, t.style.display = a, s;
|
|
355
|
+
}
|
|
356
|
+
return {
|
|
357
|
+
top: n.top,
|
|
358
|
+
left: n.left,
|
|
359
|
+
right: n.right,
|
|
360
|
+
bottom: n.bottom,
|
|
361
|
+
width: n.width,
|
|
362
|
+
height: n.height
|
|
363
|
+
};
|
|
364
|
+
}, Me = (t) => {
|
|
365
|
+
let e = {};
|
|
366
|
+
for (let n in t) {
|
|
367
|
+
const i = t[n];
|
|
368
|
+
i !== void 0 && (e[`--${n}`] = `${i}` + (typeof i == "number" ? "px" : ""));
|
|
369
|
+
}
|
|
370
|
+
return e;
|
|
371
|
+
}, Se = (t) => t.replace(/[\\/:*?"<>|]/g, "_").replace(/[\0-\x1F]/g, "_").replace(/\s+/g, " ").replace(/^\.+/, "").replace(/\.+$/, "").trim(), O = (t) => new Promise((e, n) => {
|
|
372
|
+
const i = new FileReader();
|
|
373
|
+
i.onload = () => e(i.result), i.onerror = (a) => n(a), i.readAsDataURL(t);
|
|
374
|
+
}), D = {}, R = (t, e = null) => e !== null ? (D[t] = e, null) : D[t] || null, Ce = async (t) => {
|
|
375
|
+
if (!t)
|
|
376
|
+
return null;
|
|
377
|
+
if (typeof t == "string" && t.startsWith("data:"))
|
|
378
|
+
return t;
|
|
379
|
+
try {
|
|
380
|
+
if (typeof t == "string" && nt(t)) {
|
|
381
|
+
const e = await fetch(t);
|
|
382
|
+
if (!e.ok)
|
|
383
|
+
throw new Error(`Fetch failed: ${e.status}`);
|
|
384
|
+
const n = await e.blob();
|
|
385
|
+
return await O(n);
|
|
386
|
+
}
|
|
387
|
+
return t instanceof Blob ? await O(t) : null;
|
|
388
|
+
} catch (e) {
|
|
389
|
+
return console.warn("file2Base64DataURL failed:", e), null;
|
|
390
|
+
}
|
|
391
|
+
}, _e = (t, e) => {
|
|
392
|
+
const n = document.createElement("a");
|
|
393
|
+
n.href = t, n.download = e, document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
394
|
+
}, U = [
|
|
395
|
+
"ADDRESS",
|
|
396
|
+
"ARTICLE",
|
|
397
|
+
"ASIDE",
|
|
398
|
+
"BLOCKQUOTE",
|
|
399
|
+
"CANVAS",
|
|
400
|
+
"DD",
|
|
401
|
+
"DIV",
|
|
402
|
+
"DL",
|
|
403
|
+
"DT",
|
|
404
|
+
"FIELDSET",
|
|
405
|
+
"FIGCAPTION",
|
|
406
|
+
"FIGURE",
|
|
407
|
+
"FOOTER",
|
|
408
|
+
"FORM",
|
|
409
|
+
"H1",
|
|
410
|
+
"H2",
|
|
411
|
+
"H3",
|
|
412
|
+
"H4",
|
|
413
|
+
"H5",
|
|
414
|
+
"H6",
|
|
415
|
+
"HEADER",
|
|
416
|
+
"HR",
|
|
417
|
+
"LI",
|
|
418
|
+
"MAIN",
|
|
419
|
+
"NAV",
|
|
420
|
+
"NOSCRIPT",
|
|
421
|
+
"OL",
|
|
422
|
+
"P",
|
|
423
|
+
"PRE",
|
|
424
|
+
"SECTION",
|
|
425
|
+
"TABLE",
|
|
426
|
+
"TFOOT",
|
|
427
|
+
"UL",
|
|
428
|
+
"VIDEO"
|
|
429
|
+
], Ne = [
|
|
430
|
+
"A",
|
|
431
|
+
"ABBR",
|
|
432
|
+
"ACRONYM",
|
|
433
|
+
"B",
|
|
434
|
+
"BDO",
|
|
435
|
+
"BIG",
|
|
436
|
+
"BUTTON",
|
|
437
|
+
"CITE",
|
|
438
|
+
"CODE",
|
|
439
|
+
"DFN",
|
|
440
|
+
"EM",
|
|
441
|
+
"I",
|
|
442
|
+
"KBD",
|
|
443
|
+
"LABEL",
|
|
444
|
+
"MAP",
|
|
445
|
+
"OBJECT",
|
|
446
|
+
"OUTPUT",
|
|
447
|
+
"Q",
|
|
448
|
+
"S",
|
|
449
|
+
"SAMP",
|
|
450
|
+
"SCRIPT",
|
|
451
|
+
"SELECT",
|
|
452
|
+
"SMALL",
|
|
453
|
+
"SPAN",
|
|
454
|
+
"STRONG",
|
|
455
|
+
"SUB",
|
|
456
|
+
"SUP",
|
|
457
|
+
"TEXTAREA",
|
|
458
|
+
"TIME",
|
|
459
|
+
"TT",
|
|
460
|
+
"U",
|
|
461
|
+
"VAR"
|
|
462
|
+
].concat(...U), Oe = ["AREA", "BASE", "BR", "COL", "EMBED", "HR", "IMG", "INPUT", "LINK", "META", "PARAM", "SOURCE", "TRACK", "WBR"], pt = ["STYLE", "COMMENT", "SELECT", "OPTION", "SCRIPT", "TITLE", "HEAD", "BUTTON", "META", "LINK", "PARAM", "SOURCE"], De = (t) => (pt.forEach((n) => {
|
|
463
|
+
t = t.replace(new RegExp(n, "ig"), "");
|
|
464
|
+
}), t = t.replace(/[\r|\n]/g, ""), t = t.replace(/<(\w+)([^>]*)>/g, function(n, i, a) {
|
|
465
|
+
return U.includes(i.toUpperCase()) ? `
|
|
466
|
+
` : "";
|
|
467
|
+
}), t = t.replace(/<\/(\w+)([^>]*)>/g, function(n, i, a) {
|
|
468
|
+
return "";
|
|
469
|
+
}), t = t.replace(/<[^>]+>/g, ""), [
|
|
470
|
+
[/ /gi, " "],
|
|
471
|
+
[/</gi, "<"],
|
|
472
|
+
[/>/gi, ">"],
|
|
473
|
+
[/"/gi, '"'],
|
|
474
|
+
[/'/gi, "'"]
|
|
475
|
+
].forEach(([n, i]) => {
|
|
476
|
+
t = t.replace(n, i);
|
|
477
|
+
}), t = t.replace(/&#(\d+);/, function(n, i) {
|
|
478
|
+
return String.fromCharCode(parseInt(i));
|
|
479
|
+
}), t = t.replace(/&/gi, "&"), t = t.trim(), t), Re = (t) => window.CSS && CSS.escape ? CSS.escape(t) : t.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, "\\$&"), ke = (t) => {
|
|
480
|
+
let e = t.split(";");
|
|
481
|
+
return e.pop(), e.map((n) => String.fromCharCode(n[2] === "x" ? parseInt(n.slice(3), 16) : parseInt(n.slice(2)))).join("");
|
|
482
|
+
};
|
|
483
|
+
let v;
|
|
484
|
+
const Le = (t) => (v || (v = document.createElement("div")), t = t.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim, ""), t = t.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim, ""), v.innerHTML = t, t = v.textContent || "", v.textContent = "", t), He = (t) => {
|
|
485
|
+
let e = "";
|
|
486
|
+
for (let n in t) {
|
|
487
|
+
let i = t[n] === null ? "" : t[n];
|
|
488
|
+
e += `<input type="hidden" name="${k(n)}" value="${k(i)}"/>`;
|
|
489
|
+
}
|
|
490
|
+
return e;
|
|
491
|
+
}, Ie = (t, e = 2, n = !0) => {
|
|
492
|
+
let i = String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
493
|
+
return n && (i = i.replace(/[\r\n]/g, "<br/>")), e && (i = i.replace(/\t/g, " ".repeat(e))), i = i.replace(/\s/g, " "), i;
|
|
494
|
+
}, Fe = (t) => String(t).replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/ /g, " ").replace(/&/g, "&").replace(/<br.*>/, `
|
|
495
|
+
`), k = (t, e = "") => (e = e ? " " : `
|
|
496
|
+
`, ("" + t).replace(/&/g, "&").replace(/'/g, "'").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">").replace(/\r\n/g, e).replace(/[\r\n]/g, e)), Pe = (t, e) => {
|
|
497
|
+
let n = t.split("");
|
|
498
|
+
return e = e || 0, n.map((i) => `&#${e ? "x" + i.charCodeAt(0).toString(16) : i.charCodeAt(0)};`).join("");
|
|
499
|
+
}, Ue = (t, e, n = '<span class="matched">%s</span>') => e ? t.replace(new RegExp(M(e), "ig"), (i) => n.replace("%s", i)) : t, Be = (t) => {
|
|
500
|
+
if (!t.src)
|
|
501
|
+
return null;
|
|
502
|
+
if (t.src.indexOf("data:") === 0)
|
|
503
|
+
return t.src;
|
|
504
|
+
let e = document.createElement("canvas");
|
|
505
|
+
e.width = t.width, e.height = t.height;
|
|
506
|
+
let n = e.getContext("2d");
|
|
507
|
+
return n ? (n.drawImage(t, 0, 0, t.width, t.height), e.toDataURL("image/png")) : null;
|
|
508
|
+
}, Ye = (t, e = !1) => new Promise((n, i) => {
|
|
509
|
+
if (e) {
|
|
510
|
+
const s = R(t);
|
|
511
|
+
if (s)
|
|
512
|
+
return n(s);
|
|
513
|
+
}
|
|
514
|
+
let a = new XMLHttpRequest();
|
|
515
|
+
a.open("GET", t, !0), a.responseType = "blob", a.onload = function() {
|
|
516
|
+
if (this.status === 200) {
|
|
517
|
+
let s = this.response;
|
|
518
|
+
V(s).then((c) => {
|
|
519
|
+
e && R(t, c), n(c);
|
|
520
|
+
}).catch((c) => {
|
|
521
|
+
i(c);
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
}, a.onerror = function() {
|
|
525
|
+
i("Error:" + this.statusText);
|
|
526
|
+
}, a.onabort = function() {
|
|
527
|
+
i("Request abort");
|
|
528
|
+
}, a.send();
|
|
529
|
+
}), w = (t, e) => {
|
|
530
|
+
let n = (t & 65535) + (e & 65535);
|
|
531
|
+
return (t >> 16) + (e >> 16) + (n >> 16) << 16 | n & 65535;
|
|
532
|
+
}, ct = (t, e) => t << e | t >>> 32 - e, b = (t, e, n, i, a, s) => w(ct(w(w(e, t), w(i, s)), a), n), u = (t, e, n, i, a, s, c) => b(e & n | ~e & i, t, e, a, s, c), d = (t, e, n, i, a, s, c) => b(e & i | n & ~i, t, e, a, s, c), f = (t, e, n, i, a, s, c) => b(e ^ n ^ i, t, e, a, s, c), m = (t, e, n, i, a, s, c) => b(n ^ (e | ~i), t, e, a, s, c), E = (t, e) => {
|
|
533
|
+
t[e >> 5] |= 128 << e % 32, t[(e + 64 >>> 9 << 4) + 14] = e;
|
|
534
|
+
let n, i, a, s, c, o = 1732584193, l = -271733879, r = -1732584194, p = 271733878;
|
|
535
|
+
for (n = 0; n < t.length; n += 16)
|
|
536
|
+
i = o, a = l, s = r, c = p, o = u(o, l, r, p, t[n], 7, -680876936), p = u(p, o, l, r, t[n + 1], 12, -389564586), r = u(r, p, o, l, t[n + 2], 17, 606105819), l = u(l, r, p, o, t[n + 3], 22, -1044525330), o = u(o, l, r, p, t[n + 4], 7, -176418897), p = u(p, o, l, r, t[n + 5], 12, 1200080426), r = u(r, p, o, l, t[n + 6], 17, -1473231341), l = u(l, r, p, o, t[n + 7], 22, -45705983), o = u(o, l, r, p, t[n + 8], 7, 1770035416), p = u(p, o, l, r, t[n + 9], 12, -1958414417), r = u(r, p, o, l, t[n + 10], 17, -42063), l = u(l, r, p, o, t[n + 11], 22, -1990404162), o = u(o, l, r, p, t[n + 12], 7, 1804603682), p = u(p, o, l, r, t[n + 13], 12, -40341101), r = u(r, p, o, l, t[n + 14], 17, -1502002290), l = u(l, r, p, o, t[n + 15], 22, 1236535329), o = d(o, l, r, p, t[n + 1], 5, -165796510), p = d(p, o, l, r, t[n + 6], 9, -1069501632), r = d(r, p, o, l, t[n + 11], 14, 643717713), l = d(l, r, p, o, t[n], 20, -373897302), o = d(o, l, r, p, t[n + 5], 5, -701558691), p = d(p, o, l, r, t[n + 10], 9, 38016083), r = d(r, p, o, l, t[n + 15], 14, -660478335), l = d(l, r, p, o, t[n + 4], 20, -405537848), o = d(o, l, r, p, t[n + 9], 5, 568446438), p = d(p, o, l, r, t[n + 14], 9, -1019803690), r = d(r, p, o, l, t[n + 3], 14, -187363961), l = d(l, r, p, o, t[n + 8], 20, 1163531501), o = d(o, l, r, p, t[n + 13], 5, -1444681467), p = d(p, o, l, r, t[n + 2], 9, -51403784), r = d(r, p, o, l, t[n + 7], 14, 1735328473), l = d(l, r, p, o, t[n + 12], 20, -1926607734), o = f(o, l, r, p, t[n + 5], 4, -378558), p = f(p, o, l, r, t[n + 8], 11, -2022574463), r = f(r, p, o, l, t[n + 11], 16, 1839030562), l = f(l, r, p, o, t[n + 14], 23, -35309556), o = f(o, l, r, p, t[n + 1], 4, -1530992060), p = f(p, o, l, r, t[n + 4], 11, 1272893353), r = f(r, p, o, l, t[n + 7], 16, -155497632), l = f(l, r, p, o, t[n + 10], 23, -1094730640), o = f(o, l, r, p, t[n + 13], 4, 681279174), p = f(p, o, l, r, t[n], 11, -358537222), r = f(r, p, o, l, t[n + 3], 16, -722521979), l = f(l, r, p, o, t[n + 6], 23, 76029189), o = f(o, l, r, p, t[n + 9], 4, -640364487), p = f(p, o, l, r, t[n + 12], 11, -421815835), r = f(r, p, o, l, t[n + 15], 16, 530742520), l = f(l, r, p, o, t[n + 2], 23, -995338651), o = m(o, l, r, p, t[n], 6, -198630844), p = m(p, o, l, r, t[n + 7], 10, 1126891415), r = m(r, p, o, l, t[n + 14], 15, -1416354905), l = m(l, r, p, o, t[n + 5], 21, -57434055), o = m(o, l, r, p, t[n + 12], 6, 1700485571), p = m(p, o, l, r, t[n + 3], 10, -1894986606), r = m(r, p, o, l, t[n + 10], 15, -1051523), l = m(l, r, p, o, t[n + 1], 21, -2054922799), o = m(o, l, r, p, t[n + 8], 6, 1873313359), p = m(p, o, l, r, t[n + 15], 10, -30611744), r = m(r, p, o, l, t[n + 6], 15, -1560198380), l = m(l, r, p, o, t[n + 13], 21, 1309151649), o = m(o, l, r, p, t[n + 4], 6, -145523070), p = m(p, o, l, r, t[n + 11], 10, -1120210379), r = m(r, p, o, l, t[n + 2], 15, 718787259), l = m(l, r, p, o, t[n + 9], 21, -343485551), o = w(o, i), l = w(l, a), r = w(r, s), p = w(p, c);
|
|
537
|
+
return [o, l, r, p];
|
|
538
|
+
}, B = (t) => {
|
|
539
|
+
let e, n = "", i = t.length * 32;
|
|
540
|
+
for (e = 0; e < i; e += 8)
|
|
541
|
+
n += String.fromCharCode(t[e >> 5] >>> e % 32 & 255);
|
|
542
|
+
return n;
|
|
543
|
+
}, S = (t) => {
|
|
544
|
+
let e, n = [];
|
|
545
|
+
for (n[(t.length >> 2) - 1] = void 0, e = 0; e < n.length; e += 1)
|
|
546
|
+
n[e] = 0;
|
|
547
|
+
let i = t.length * 8;
|
|
548
|
+
for (e = 0; e < i; e += 8)
|
|
549
|
+
n[e >> 5] |= (t.charCodeAt(e / 8) & 255) << e % 32;
|
|
550
|
+
return n;
|
|
551
|
+
}, ut = (t) => B(E(S(t), t.length * 8)), dt = (t, e) => {
|
|
552
|
+
let n, i = S(t), a = [], s = [], c;
|
|
553
|
+
for (a[15] = s[15] = void 0, i.length > 16 && (i = E(i, t.length * 8)), n = 0; n < 16; n += 1)
|
|
554
|
+
a[n] = i[n] ^ 909522486, s[n] = i[n] ^ 1549556828;
|
|
555
|
+
return c = E(a.concat(S(e)), 512 + e.length * 8), B(E(s.concat(c), 640));
|
|
556
|
+
}, Y = (t) => {
|
|
557
|
+
let e = "0123456789abcdef", n = "", i, a;
|
|
558
|
+
for (a = 0; a < t.length; a += 1)
|
|
559
|
+
i = t.charCodeAt(a), n += e.charAt(i >>> 4 & 15) + e.charAt(i & 15);
|
|
560
|
+
return n;
|
|
561
|
+
}, C = (t) => unescape(encodeURIComponent(t)), q = (t) => ut(C(t)), ft = (t) => Y(q(t)), z = (t, e) => dt(C(t), C(e)), mt = (t, e) => Y(z(t, e)), qe = (t, e, n) => e ? n ? z(e, t) : mt(e, t) : n ? q(t) : ft(t), ze = "application/octet-stream", Ge = {
|
|
562
|
+
323: "text/h323",
|
|
563
|
+
accdb: "application/msaccess",
|
|
564
|
+
accde: "application/msaccess",
|
|
565
|
+
accdt: "application/msaccess",
|
|
566
|
+
acx: "application/internet-property-stream",
|
|
567
|
+
ai: "application/postscript",
|
|
568
|
+
aif: "audio/x-aiff",
|
|
569
|
+
aifc: "audio/aiff",
|
|
570
|
+
aiff: "audio/aiff",
|
|
571
|
+
application: "application/x-ms-application",
|
|
572
|
+
art: "image/x-jg",
|
|
573
|
+
asf: "video/x-ms-asf",
|
|
574
|
+
asm: "text/plain",
|
|
575
|
+
asr: "video/x-ms-asf",
|
|
576
|
+
asx: "video/x-ms-asf",
|
|
577
|
+
atom: "application/atom+xml",
|
|
578
|
+
au: "audio/basic",
|
|
579
|
+
avi: "video/x-msvideo",
|
|
580
|
+
axs: "application/olescript",
|
|
581
|
+
bas: "text/plain",
|
|
582
|
+
bcpio: "application/x-bcpio",
|
|
583
|
+
bmp: "image/bmp",
|
|
584
|
+
c: "text/plain",
|
|
585
|
+
calx: "application/vnd.ms-office.calx",
|
|
586
|
+
cat: "application/vnd.ms-pki.seccat",
|
|
587
|
+
cdf: "application/x-cdf",
|
|
588
|
+
class: "application/x-java-applet",
|
|
589
|
+
clp: "application/x-msclip",
|
|
590
|
+
cmx: "image/x-cmx",
|
|
591
|
+
cnf: "text/plain",
|
|
592
|
+
cod: "image/cis-cod",
|
|
593
|
+
cpio: "application/x-cpio",
|
|
594
|
+
cpp: "text/plain",
|
|
595
|
+
crd: "application/x-mscardfile",
|
|
596
|
+
crl: "application/pkix-crl",
|
|
597
|
+
crt: "application/x-x509-ca-cert",
|
|
598
|
+
csh: "application/x-csh",
|
|
599
|
+
css: "text/css",
|
|
600
|
+
dcr: "application/x-director",
|
|
601
|
+
der: "application/x-x509-ca-cert",
|
|
602
|
+
dib: "image/bmp",
|
|
603
|
+
dir: "application/x-director",
|
|
604
|
+
disco: "text/xml",
|
|
605
|
+
dll: "application/x-msdownload",
|
|
606
|
+
"dll.config": "text/xml",
|
|
607
|
+
dlm: "text/dlm",
|
|
608
|
+
doc: "application/msword",
|
|
609
|
+
docm: "application/vnd.ms-word.document.macroEnabled.12",
|
|
610
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
611
|
+
dot: "application/msword",
|
|
612
|
+
dotm: "application/vnd.ms-word.template.macroEnabled.12",
|
|
613
|
+
dotx: "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
|
|
614
|
+
dtd: "text/xml",
|
|
615
|
+
dvi: "application/x-dvi",
|
|
616
|
+
dwf: "drawing/x-dwf",
|
|
617
|
+
dxr: "application/x-director",
|
|
618
|
+
eml: "message/rfc822",
|
|
619
|
+
eps: "application/postscript",
|
|
620
|
+
etx: "text/x-setext",
|
|
621
|
+
evy: "application/envoy",
|
|
622
|
+
"exe.config": "text/xml",
|
|
623
|
+
fdf: "application/vnd.fdf",
|
|
624
|
+
fif: "application/fractals",
|
|
625
|
+
flr: "x-world/x-vrml",
|
|
626
|
+
flv: "video/x-flv",
|
|
627
|
+
gif: "image/gif",
|
|
628
|
+
gtar: "application/x-gtar",
|
|
629
|
+
gz: "application/x-gzip",
|
|
630
|
+
h: "text/plain",
|
|
631
|
+
hdf: "application/x-hdf",
|
|
632
|
+
hdml: "text/x-hdml",
|
|
633
|
+
hhc: "application/x-oleobject",
|
|
634
|
+
hlp: "application/winhlp",
|
|
635
|
+
hqx: "application/mac-binhex40",
|
|
636
|
+
hta: "application/hta",
|
|
637
|
+
htc: "text/x-component",
|
|
638
|
+
htm: "text/html",
|
|
639
|
+
html: "text/html",
|
|
640
|
+
htt: "text/webviewhtml",
|
|
641
|
+
hxt: "text/html",
|
|
642
|
+
ico: "image/x-icon",
|
|
643
|
+
ief: "image/ief",
|
|
644
|
+
iii: "application/x-iphone",
|
|
645
|
+
ins: "application/x-internet-signup",
|
|
646
|
+
isp: "application/x-internet-signup",
|
|
647
|
+
IVF: "video/x-ivf",
|
|
648
|
+
jar: "application/java-archive",
|
|
649
|
+
jck: "application/liquidmotion",
|
|
650
|
+
jcz: "application/liquidmotion",
|
|
651
|
+
jfif: "image/pjpeg",
|
|
652
|
+
jpe: "image/jpeg",
|
|
653
|
+
jpeg: "image/jpeg",
|
|
654
|
+
jpg: "image/jpeg",
|
|
655
|
+
js: "application/x-javascript",
|
|
656
|
+
jsx: "text/jscript",
|
|
657
|
+
latex: "application/x-latex",
|
|
658
|
+
lit: "application/x-ms-reader",
|
|
659
|
+
lsf: "video/x-la-asf",
|
|
660
|
+
lsx: "video/x-la-asf",
|
|
661
|
+
m13: "application/x-msmediaview",
|
|
662
|
+
m14: "application/x-msmediaview",
|
|
663
|
+
m1v: "video/mpeg",
|
|
664
|
+
m3u: "audio/x-mpegurl",
|
|
665
|
+
man: "application/x-troff-man",
|
|
666
|
+
manifest: "application/x-ms-manifest",
|
|
667
|
+
map: "text/plain",
|
|
668
|
+
mdb: "application/x-msaccess",
|
|
669
|
+
me: "application/x-troff-me",
|
|
670
|
+
mht: "message/rfc822",
|
|
671
|
+
mhtml: "message/rfc822",
|
|
672
|
+
mid: "audio/mid",
|
|
673
|
+
midi: "audio/mid",
|
|
674
|
+
mmf: "application/x-smaf",
|
|
675
|
+
mno: "text/xml",
|
|
676
|
+
mny: "application/x-msmoney",
|
|
677
|
+
mov: "video/quicktime",
|
|
678
|
+
movie: "video/x-sgi-movie",
|
|
679
|
+
mp2: "video/mpeg",
|
|
680
|
+
mp3: "audio/mpeg",
|
|
681
|
+
mpa: "video/mpeg",
|
|
682
|
+
mpe: "video/mpeg",
|
|
683
|
+
mpeg: "video/mpeg",
|
|
684
|
+
mpg: "video/mpeg",
|
|
685
|
+
mpp: "application/vnd.ms-project",
|
|
686
|
+
mpv2: "video/mpeg",
|
|
687
|
+
ms: "application/x-troff-ms",
|
|
688
|
+
mvb: "application/x-msmediaview",
|
|
689
|
+
mvc: "application/x-miva-compiled",
|
|
690
|
+
nc: "application/x-netcdf",
|
|
691
|
+
nsc: "video/x-ms-asf",
|
|
692
|
+
nws: "message/rfc822",
|
|
693
|
+
oda: "application/oda",
|
|
694
|
+
odc: "text/x-ms-odc",
|
|
695
|
+
ods: "application/oleobject",
|
|
696
|
+
one: "application/onenote",
|
|
697
|
+
onea: "application/onenote",
|
|
698
|
+
onetoc: "application/onenote",
|
|
699
|
+
onetoc2: "application/onenote",
|
|
700
|
+
onetmp: "application/onenote",
|
|
701
|
+
onepkg: "application/onenote",
|
|
702
|
+
osdx: "application/opensearchdescription+xml",
|
|
703
|
+
p10: "application/pkcs10",
|
|
704
|
+
p12: "application/x-pkcs12",
|
|
705
|
+
p7b: "application/x-pkcs7-certificates",
|
|
706
|
+
p7c: "application/pkcs7-mime",
|
|
707
|
+
p7m: "application/pkcs7-mime",
|
|
708
|
+
p7r: "application/x-pkcs7-certreqresp",
|
|
709
|
+
p7s: "application/pkcs7-signature",
|
|
710
|
+
pbm: "image/x-portable-bitmap",
|
|
711
|
+
pdf: "application/pdf",
|
|
712
|
+
pfx: "application/x-pkcs12",
|
|
713
|
+
pgm: "image/x-portable-graymap",
|
|
714
|
+
pko: "application/vnd.ms-pki.pko",
|
|
715
|
+
pma: "application/x-perfmon",
|
|
716
|
+
pmc: "application/x-perfmon",
|
|
717
|
+
pml: "application/x-perfmon",
|
|
718
|
+
pmr: "application/x-perfmon",
|
|
719
|
+
pmw: "application/x-perfmon",
|
|
720
|
+
png: "image/png",
|
|
721
|
+
pnm: "image/x-portable-anymap",
|
|
722
|
+
pnz: "image/png",
|
|
723
|
+
pot: "application/vnd.ms-powerpoint",
|
|
724
|
+
potm: "application/vnd.ms-powerpoint.template.macroEnabled.12",
|
|
725
|
+
potx: "application/vnd.openxmlformats-officedocument.presentationml.template",
|
|
726
|
+
ppam: "application/vnd.ms-powerpoint.addin.macroEnabled.12",
|
|
727
|
+
ppm: "image/x-portable-pixmap",
|
|
728
|
+
pps: "application/vnd.ms-powerpoint",
|
|
729
|
+
ppsm: "application/vnd.ms-powerpoint.slideshow.macroEnabled.12",
|
|
730
|
+
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
731
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
732
|
+
pptm: "application/vnd.ms-powerpoint.presentation.macroEnabled.12",
|
|
733
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
734
|
+
prf: "application/pics-rules",
|
|
735
|
+
ps: "application/postscript",
|
|
736
|
+
pub: "application/x-mspublisher",
|
|
737
|
+
qt: "video/quicktime",
|
|
738
|
+
qtl: "application/x-quicktimeplayer",
|
|
739
|
+
ra: "audio/x-pn-realaudio",
|
|
740
|
+
ram: "audio/x-pn-realaudio",
|
|
741
|
+
ras: "image/x-cmu-raster",
|
|
742
|
+
rf: "image/vnd.rn-realflash",
|
|
743
|
+
rgb: "image/x-rgb",
|
|
744
|
+
rm: "application/vnd.rn-realmedia",
|
|
745
|
+
rmi: "audio/mid",
|
|
746
|
+
roff: "application/x-troff",
|
|
747
|
+
rpm: "audio/x-pn-realaudio-plugin",
|
|
748
|
+
rtf: "application/rtf",
|
|
749
|
+
rtx: "text/richtext",
|
|
750
|
+
scd: "application/x-msschedule",
|
|
751
|
+
sct: "text/scriptlet",
|
|
752
|
+
setpay: "application/set-payment-initiation",
|
|
753
|
+
setreg: "application/set-registration-initiation",
|
|
754
|
+
sgml: "text/sgml",
|
|
755
|
+
sh: "application/x-sh",
|
|
756
|
+
shar: "application/x-shar",
|
|
757
|
+
sit: "application/x-stuffit",
|
|
758
|
+
sldm: "application/vnd.ms-powerpoint.slide.macroEnabled.12",
|
|
759
|
+
sldx: "application/vnd.openxmlformats-officedocument.presentationml.slide",
|
|
760
|
+
smd: "audio/x-smd",
|
|
761
|
+
smx: "audio/x-smd",
|
|
762
|
+
smz: "audio/x-smd",
|
|
763
|
+
snd: "audio/basic",
|
|
764
|
+
spc: "application/x-pkcs7-certificates",
|
|
765
|
+
spl: "application/futuresplash",
|
|
766
|
+
src: "application/x-wais-source",
|
|
767
|
+
ssm: "application/streamingmedia",
|
|
768
|
+
sst: "application/vnd.ms-pki.certstore",
|
|
769
|
+
stl: "application/vnd.ms-pki.stl",
|
|
770
|
+
sv4cpio: "application/x-sv4cpio",
|
|
771
|
+
sv4crc: "application/x-sv4crc",
|
|
772
|
+
svg: "image/svg+xml",
|
|
773
|
+
swf: "application/x-shockwave-flash",
|
|
774
|
+
t: "application/x-troff",
|
|
775
|
+
tar: "application/x-tar",
|
|
776
|
+
tcl: "application/x-tcl",
|
|
777
|
+
tex: "application/x-tex",
|
|
778
|
+
texi: "application/x-texinfo",
|
|
779
|
+
texinfo: "application/x-texinfo",
|
|
780
|
+
tgz: "application/x-compressed",
|
|
781
|
+
thmx: "application/vnd.ms-officetheme",
|
|
782
|
+
tif: "image/tiff",
|
|
783
|
+
tiff: "image/tiff",
|
|
784
|
+
tr: "application/x-troff",
|
|
785
|
+
trm: "application/x-msterminal",
|
|
786
|
+
tsv: "text/tab-separated-values",
|
|
787
|
+
txt: "text/plain",
|
|
788
|
+
uls: "text/iuls",
|
|
789
|
+
ustar: "application/x-ustar",
|
|
790
|
+
vbs: "text/vbscript",
|
|
791
|
+
vcf: "text/x-vcard",
|
|
792
|
+
vcs: "text/plain",
|
|
793
|
+
vdx: "application/vnd.ms-visio.viewer",
|
|
794
|
+
vml: "text/xml",
|
|
795
|
+
vsd: "application/vnd.visio",
|
|
796
|
+
vss: "application/vnd.visio",
|
|
797
|
+
vst: "application/vnd.visio",
|
|
798
|
+
vsto: "application/x-ms-vsto",
|
|
799
|
+
vsw: "application/vnd.visio",
|
|
800
|
+
vsx: "application/vnd.visio",
|
|
801
|
+
vtx: "application/vnd.visio",
|
|
802
|
+
wav: "audio/wav",
|
|
803
|
+
wax: "audio/x-ms-wax",
|
|
804
|
+
wbmp: "image/vnd.wap.wbmp",
|
|
805
|
+
wcm: "application/vnd.ms-works",
|
|
806
|
+
wdb: "application/vnd.ms-works",
|
|
807
|
+
wks: "application/vnd.ms-works",
|
|
808
|
+
wm: "video/x-ms-wm",
|
|
809
|
+
wma: "audio/x-ms-wma",
|
|
810
|
+
wmd: "application/x-ms-wmd",
|
|
811
|
+
wmf: "application/x-msmetafile",
|
|
812
|
+
wml: "text/vnd.wap.wml",
|
|
813
|
+
wmlc: "application/vnd.wap.wmlc",
|
|
814
|
+
wmls: "text/vnd.wap.wmlscript",
|
|
815
|
+
wmlsc: "application/vnd.wap.wmlscriptc",
|
|
816
|
+
wmp: "video/x-ms-wmp",
|
|
817
|
+
wmv: "video/x-ms-wmv",
|
|
818
|
+
wmx: "video/x-ms-wmx",
|
|
819
|
+
wmz: "application/x-ms-wmz",
|
|
820
|
+
wps: "application/vnd.ms-works",
|
|
821
|
+
wri: "application/x-mswrite",
|
|
822
|
+
wrl: "x-world/x-vrml",
|
|
823
|
+
wrz: "x-world/x-vrml",
|
|
824
|
+
wsdl: "text/xml",
|
|
825
|
+
wvx: "video/x-ms-wvx",
|
|
826
|
+
x: "application/directx",
|
|
827
|
+
xaf: "x-world/x-vrml",
|
|
828
|
+
xaml: "application/xaml+xml",
|
|
829
|
+
xap: "application/x-silverlight-app",
|
|
830
|
+
xbap: "application/x-ms-xbap",
|
|
831
|
+
xbm: "image/x-xbitmap",
|
|
832
|
+
xdr: "text/plain",
|
|
833
|
+
xht: "application/xhtml+xml",
|
|
834
|
+
xhtml: "application/xhtml+xml",
|
|
835
|
+
xla: "application/vnd.ms-excel",
|
|
836
|
+
xlam: "application/vnd.ms-excel.addin.macroEnabled.12",
|
|
837
|
+
xlc: "application/vnd.ms-excel",
|
|
838
|
+
xlm: "application/vnd.ms-excel",
|
|
839
|
+
xls: "application/vnd.ms-excel",
|
|
840
|
+
xlsb: "application/vnd.ms-excel.sheet.binary.macroEnabled.12",
|
|
841
|
+
xlsm: "application/vnd.ms-excel.sheet.macroEnabled.12",
|
|
842
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
843
|
+
xlt: "application/vnd.ms-excel",
|
|
844
|
+
xltm: "application/vnd.ms-excel.template.macroEnabled.12",
|
|
845
|
+
xltx: "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
|
|
846
|
+
xlw: "application/vnd.ms-excel",
|
|
847
|
+
xml: "text/xml",
|
|
848
|
+
xof: "x-world/x-vrml",
|
|
849
|
+
xpm: "image/x-xpixmap",
|
|
850
|
+
xps: "application/vnd.ms-xpsdocument",
|
|
851
|
+
xsd: "text/xml",
|
|
852
|
+
xsf: "text/xml",
|
|
853
|
+
xsl: "text/xml",
|
|
854
|
+
xslt: "text/xml",
|
|
855
|
+
xwd: "image/x-xwindowdump",
|
|
856
|
+
z: "application/x-compress",
|
|
857
|
+
zip: "application/x-zip-compressed"
|
|
858
|
+
};
|
|
859
|
+
function L(t) {
|
|
860
|
+
if (t === null || typeof t != "object") return t;
|
|
861
|
+
if (t instanceof Date) return new Date(t.getTime());
|
|
862
|
+
if (t instanceof Array) return t.map((e) => L(e));
|
|
863
|
+
if (t instanceof Object) {
|
|
864
|
+
const e = {};
|
|
865
|
+
for (const n in t)
|
|
866
|
+
t.hasOwnProperty(n) && (e[n] = L(t[n]));
|
|
867
|
+
return e;
|
|
868
|
+
}
|
|
869
|
+
return t;
|
|
870
|
+
}
|
|
871
|
+
function $e(t) {
|
|
872
|
+
return Object.keys(t).length === 0;
|
|
873
|
+
}
|
|
874
|
+
const We = (t, e) => {
|
|
875
|
+
let n = {};
|
|
876
|
+
for (let i in t)
|
|
877
|
+
e[i] !== void 0 ? n[e[i]] = t[i] : n[i] = t[i];
|
|
878
|
+
return n;
|
|
879
|
+
};
|
|
880
|
+
function Ke(t, e, n) {
|
|
881
|
+
const i = e.split(".");
|
|
882
|
+
let a = t;
|
|
883
|
+
for (const s of i) {
|
|
884
|
+
if (a == null)
|
|
885
|
+
return n;
|
|
886
|
+
a = a[s];
|
|
887
|
+
}
|
|
888
|
+
return a !== void 0 ? a : n;
|
|
889
|
+
}
|
|
890
|
+
function Je(t, e, n) {
|
|
891
|
+
const i = e.split("."), a = i.pop();
|
|
892
|
+
let s = t;
|
|
893
|
+
for (const c of i)
|
|
894
|
+
(!(c in s) || typeof s[c] != "object") && (s[c] = {}), s = s[c];
|
|
895
|
+
s[a] = n;
|
|
896
|
+
}
|
|
897
|
+
function gt(t, ...e) {
|
|
898
|
+
for (const n of e)
|
|
899
|
+
for (const i in n)
|
|
900
|
+
if (n.hasOwnProperty(i)) {
|
|
901
|
+
const a = n[i], s = t[i];
|
|
902
|
+
a && typeof a == "object" && !Array.isArray(a) && s && typeof s == "object" && !Array.isArray(s) ? t[i] = gt(s, a) : t[i] = a;
|
|
903
|
+
}
|
|
904
|
+
return t;
|
|
905
|
+
}
|
|
906
|
+
const ht = (t, e = !1) => {
|
|
907
|
+
for (const n in t)
|
|
908
|
+
t[n] === null ? delete t[n] : e && typeof t[n] == "object" && ht(t[n], !0);
|
|
909
|
+
return t;
|
|
910
|
+
}, Ve = (/* @__PURE__ */ new Date()).getFullYear(), je = (/* @__PURE__ */ new Date()).getMonth() + 1, Ze = (/* @__PURE__ */ new Date()).getDate(), Qe = 60 * 1e3, Xe = 60 * 60 * 1e3, A = 24 * 60 * 60 * 1e3, tn = 7 * A, en = 30 * A, nn = 31 * A, an = 365 * A, on = 366 * A, rn = 0, ln = 1, sn = 2, pn = 3, cn = 4, un = 5, dn = 6, xt = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], wt = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], vt = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], At = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], fn = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], mn = ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], gn = ["日", "一", "二", "三", "四", "五", "六"], hn = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], xn = (t, e, n) => {
|
|
911
|
+
let i = () => {
|
|
912
|
+
if (e && e(t), t-- > 0) {
|
|
913
|
+
setTimeout(i, 1e3);
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
n && n();
|
|
917
|
+
};
|
|
918
|
+
i();
|
|
919
|
+
}, wn = (t) => {
|
|
920
|
+
if (!t || t < 10)
|
|
921
|
+
return "刚刚";
|
|
922
|
+
t = Math.floor(t / 1e3);
|
|
923
|
+
const e = Math.floor(t / 3600), n = Math.floor(t % 3600 / 60), i = t % 60;
|
|
924
|
+
let a = "";
|
|
925
|
+
return e > 0 && (a += e + "小时"), (n > 0 || e > 0) && (a += n + "分钟"), a += i + "秒前", a;
|
|
926
|
+
}, H = {
|
|
927
|
+
d: (t) => {
|
|
928
|
+
let e = t.getDate();
|
|
929
|
+
return (e < 10 ? "0" : "") + e;
|
|
930
|
+
},
|
|
931
|
+
D: (t) => wt[t.getDay()],
|
|
932
|
+
j: (t) => t.getDate(),
|
|
933
|
+
l: (t) => xt[t.getDay()],
|
|
934
|
+
N: (t) => {
|
|
935
|
+
let e = t.getDay();
|
|
936
|
+
return e === 0 ? 7 : e;
|
|
937
|
+
},
|
|
938
|
+
S: (t) => {
|
|
939
|
+
let e = t.getDate();
|
|
940
|
+
return e % 10 === 1 && e !== 11 ? "st" : e % 10 === 2 && e !== 12 ? "nd" : e % 10 === 3 && e !== 13 ? "rd" : "th";
|
|
941
|
+
},
|
|
942
|
+
w: (t) => t.getDay(),
|
|
943
|
+
z: (t) => {
|
|
944
|
+
let e = new Date(t.getFullYear(), 0, 1);
|
|
945
|
+
return Math.ceil((t.getTime() - e.getTime()) / 864e5);
|
|
946
|
+
},
|
|
947
|
+
// Week
|
|
948
|
+
W: (t) => {
|
|
949
|
+
let e = new Date(t.valueOf()), n = (t.getDay() + 6) % 7;
|
|
950
|
+
e.setDate(e.getDate() - n + 3);
|
|
951
|
+
let i = e.valueOf();
|
|
952
|
+
e.setMonth(0, 1), e.getDay() !== 4 && e.setMonth(0, 1 + (4 - e.getDay() + 7) % 7);
|
|
953
|
+
let a = 1 + Math.ceil((i - e.getTime()) / 6048e5);
|
|
954
|
+
return a < 10 ? "0" + a : a;
|
|
955
|
+
},
|
|
956
|
+
// Month
|
|
957
|
+
F: (t) => vt[t.getMonth()],
|
|
958
|
+
m: (t) => {
|
|
959
|
+
let e = t.getMonth();
|
|
960
|
+
return (e < 9 ? "0" : "") + (e + 1);
|
|
961
|
+
},
|
|
962
|
+
M: (t) => At[t.getMonth()],
|
|
963
|
+
n: (t) => t.getMonth() + 1,
|
|
964
|
+
t: (t) => {
|
|
965
|
+
let e = t.getFullYear(), n = t.getMonth() + 1;
|
|
966
|
+
return n === 12 && (e = e++, n = 0), new Date(e, n, 0).getDate();
|
|
967
|
+
},
|
|
968
|
+
// Year
|
|
969
|
+
L: (t) => {
|
|
970
|
+
let e = t.getFullYear();
|
|
971
|
+
return e % 400 === 0 || e % 100 !== 0 && e % 4 === 0;
|
|
972
|
+
},
|
|
973
|
+
o: (t) => {
|
|
974
|
+
let e = new Date(t.valueOf());
|
|
975
|
+
return e.setDate(e.getDate() - (t.getDay() + 6) % 7 + 3), e.getFullYear();
|
|
976
|
+
},
|
|
977
|
+
Y: (t) => t.getFullYear(),
|
|
978
|
+
y: (t) => ("" + t.getFullYear()).substr(2),
|
|
979
|
+
// Time
|
|
980
|
+
a: (t) => t.getHours() < 12 ? "am" : "pm",
|
|
981
|
+
A: (t) => t.getHours() < 12 ? "AM" : "PM",
|
|
982
|
+
B: (t) => Math.floor(((t.getUTCHours() + 1) % 24 + t.getUTCMinutes() / 60 + t.getUTCSeconds() / 3600) * 1e3 / 24),
|
|
983
|
+
g: (t) => t.getHours() % 12 || 12,
|
|
984
|
+
G: (t) => t.getHours(),
|
|
985
|
+
h: (t) => {
|
|
986
|
+
let e = t.getHours();
|
|
987
|
+
return ((e % 12 || 12) < 10 ? "0" : "") + (e % 12 || 12);
|
|
988
|
+
},
|
|
989
|
+
H: (t) => {
|
|
990
|
+
let e = t.getHours();
|
|
991
|
+
return (e < 10 ? "0" : "") + e;
|
|
992
|
+
},
|
|
993
|
+
i: (t) => {
|
|
994
|
+
let e = t.getMinutes();
|
|
995
|
+
return (e < 10 ? "0" : "") + e;
|
|
996
|
+
},
|
|
997
|
+
s: (t) => {
|
|
998
|
+
let e = t.getSeconds();
|
|
999
|
+
return (e < 10 ? "0" : "") + e;
|
|
1000
|
+
},
|
|
1001
|
+
v: (t) => {
|
|
1002
|
+
let e = t.getMilliseconds();
|
|
1003
|
+
return (e < 10 ? "00" : e < 100 ? "0" : "") + e;
|
|
1004
|
+
},
|
|
1005
|
+
// Timezone
|
|
1006
|
+
e: (t) => Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
1007
|
+
I: (t) => {
|
|
1008
|
+
let e = null;
|
|
1009
|
+
for (let n = 0; n < 12; ++n) {
|
|
1010
|
+
let a = new Date(t.getFullYear(), n, 1).getTimezoneOffset();
|
|
1011
|
+
if (e === null) e = a;
|
|
1012
|
+
else if (a < e) {
|
|
1013
|
+
e = a;
|
|
1014
|
+
break;
|
|
1015
|
+
} else if (a > e) break;
|
|
1016
|
+
}
|
|
1017
|
+
return t.getTimezoneOffset() === e ? 1 : 0;
|
|
1018
|
+
},
|
|
1019
|
+
O: (t) => {
|
|
1020
|
+
let e = t.getTimezoneOffset();
|
|
1021
|
+
return (-e < 0 ? "-" : "+") + (Math.abs(e / 60) < 10 ? "0" : "") + Math.floor(Math.abs(e / 60)) + (Math.abs(e % 60) === 0 ? "00" : (Math.abs(e % 60) < 10 ? "0" : "") + Math.abs(e % 60));
|
|
1022
|
+
},
|
|
1023
|
+
P: (t) => {
|
|
1024
|
+
let e = t.getTimezoneOffset();
|
|
1025
|
+
return (-e < 0 ? "-" : "+") + (Math.abs(e / 60) < 10 ? "0" : "") + Math.floor(Math.abs(e / 60)) + ":" + (Math.abs(e % 60) === 0 ? "00" : (Math.abs(e % 60) < 10 ? "0" : "") + Math.abs(e % 60));
|
|
1026
|
+
},
|
|
1027
|
+
T: (t) => {
|
|
1028
|
+
let e = t.toLocaleTimeString(navigator.language, { timeZoneName: "short" }).split(" ");
|
|
1029
|
+
return e[e.length - 1];
|
|
1030
|
+
},
|
|
1031
|
+
Z: (t) => -t.getTimezoneOffset() * 60,
|
|
1032
|
+
// Full Date/Time
|
|
1033
|
+
c: (t) => Et("Y-m-d\\TH:i:sP", t),
|
|
1034
|
+
r: (t) => t.toString(),
|
|
1035
|
+
U: (t) => Math.floor(t.getTime() / 1e3)
|
|
1036
|
+
}, Et = function(t, e = null) {
|
|
1037
|
+
let n = null;
|
|
1038
|
+
return typeof e == "object" && e !== null ? n = e : n = new Date(e || Date.now()), t.replace(/(\\?)(.)/g, function(i, a, s) {
|
|
1039
|
+
return a === "" && H[s] ? String(H[s](n)) : s;
|
|
1040
|
+
});
|
|
1041
|
+
};
|
|
1042
|
+
export {
|
|
1043
|
+
U as BLOCK_TAGS,
|
|
1044
|
+
qt as Base64Encode,
|
|
1045
|
+
Ze as DATE_NOW,
|
|
1046
|
+
un as DAY_FRIDAY,
|
|
1047
|
+
ln as DAY_MONDAY,
|
|
1048
|
+
dn as DAY_SATURDAY,
|
|
1049
|
+
rn as DAY_SUNDAY,
|
|
1050
|
+
cn as DAY_THURSDAY,
|
|
1051
|
+
sn as DAY_TUESDAY,
|
|
1052
|
+
pn as DAY_WEDNESDAY,
|
|
1053
|
+
ne as GOLDEN_RATIO,
|
|
1054
|
+
ze as MIME_BINARY_DEFAULT,
|
|
1055
|
+
Ge as MIME_EXTENSION_MAP,
|
|
1056
|
+
fn as MONTH_NAMES_CN,
|
|
1057
|
+
mn as MONTH_NAMES_SHORT_CN,
|
|
1058
|
+
je as MONTH_NOW,
|
|
1059
|
+
A as ONE_DAY,
|
|
1060
|
+
Xe as ONE_HOUR,
|
|
1061
|
+
Qe as ONE_MINUTE,
|
|
1062
|
+
en as ONE_MONTH30,
|
|
1063
|
+
nn as ONE_MONTH31,
|
|
1064
|
+
tn as ONE_WEEK,
|
|
1065
|
+
an as ONE_YEAR365,
|
|
1066
|
+
on as ONE_YEAR366,
|
|
1067
|
+
Ne as PAIR_TAGS,
|
|
1068
|
+
pt as REMOVABLE_TAGS,
|
|
1069
|
+
Oe as SELF_CLOSING_TAGS,
|
|
1070
|
+
it as STAND_DPI,
|
|
1071
|
+
_ as TRIM_BOTH,
|
|
1072
|
+
N as TRIM_LEFT,
|
|
1073
|
+
J as TRIM_RIGHT,
|
|
1074
|
+
hn as WEEK_DAY_NAMES_CN,
|
|
1075
|
+
gn as WEEK_DAY_NAMES_SHORT_CN,
|
|
1076
|
+
Ve as YEAR_NOW,
|
|
1077
|
+
Ct as arrayChunk,
|
|
1078
|
+
yt as arrayColumn,
|
|
1079
|
+
Tt as arrayDistinct,
|
|
1080
|
+
Mt as arrayGroup,
|
|
1081
|
+
bt as arrayIndex,
|
|
1082
|
+
St as arraySortByKey,
|
|
1083
|
+
_t as arrayTrimTail,
|
|
1084
|
+
Bt as base64Decode,
|
|
1085
|
+
Yt as base64UrlSafeEncode,
|
|
1086
|
+
h as between,
|
|
1087
|
+
V as blobToBase64,
|
|
1088
|
+
O as blobToDataUri,
|
|
1089
|
+
He as buildHtmlHidden,
|
|
1090
|
+
Me as buildStyleVars,
|
|
1091
|
+
Rt as camelCase,
|
|
1092
|
+
G as capitalize,
|
|
1093
|
+
ht as cleanNull,
|
|
1094
|
+
xn as countDown,
|
|
1095
|
+
Te as createDomByHtml,
|
|
1096
|
+
Re as cssSelectorEscape,
|
|
1097
|
+
Ot as cutString,
|
|
1098
|
+
jt as debounce,
|
|
1099
|
+
Le as decodeHTMLEntities,
|
|
1100
|
+
L as deepClone,
|
|
1101
|
+
Kt as deleteCookie,
|
|
1102
|
+
Gt as detectLanguage,
|
|
1103
|
+
re as detectedPrecision,
|
|
1104
|
+
le as digitCount,
|
|
1105
|
+
at as disabled,
|
|
1106
|
+
_e as downloadFile,
|
|
1107
|
+
ot as enabled,
|
|
1108
|
+
Z as enterFullScreen,
|
|
1109
|
+
ke as entityToString,
|
|
1110
|
+
k as escapeAttr,
|
|
1111
|
+
Ie as escapeHtml,
|
|
1112
|
+
Q as exitFullScreen,
|
|
1113
|
+
Dt as extract,
|
|
1114
|
+
Ce as fileToBase64DataUri,
|
|
1115
|
+
P as findAll,
|
|
1116
|
+
y as findOne,
|
|
1117
|
+
be as fixBaseUrl,
|
|
1118
|
+
Et as formatDate,
|
|
1119
|
+
st as getBoundingClientRect,
|
|
1120
|
+
Wt as getCookie,
|
|
1121
|
+
Ae as getDomDimension,
|
|
1122
|
+
fe as getNodeXPath,
|
|
1123
|
+
It as getUTF8StrLen,
|
|
1124
|
+
et as guid,
|
|
1125
|
+
se as hide,
|
|
1126
|
+
Ue as highlightText,
|
|
1127
|
+
De as html2Text,
|
|
1128
|
+
Be as imgToBase64,
|
|
1129
|
+
lt as insertStyleSheet,
|
|
1130
|
+
$e as isEmptyObject,
|
|
1131
|
+
xe as isFocusable,
|
|
1132
|
+
te as isFunction,
|
|
1133
|
+
X as isInFullScreen,
|
|
1134
|
+
Ht as isJSON,
|
|
1135
|
+
Qt as isJson,
|
|
1136
|
+
Xt as isObject,
|
|
1137
|
+
Zt as isPromise,
|
|
1138
|
+
nt as isUrl,
|
|
1139
|
+
kt as kebabCase,
|
|
1140
|
+
ge as keepRectInContainer,
|
|
1141
|
+
we as loadCss,
|
|
1142
|
+
ve as loadScript,
|
|
1143
|
+
ue as lockElementInteraction,
|
|
1144
|
+
qe as md5,
|
|
1145
|
+
ie as mmToPx,
|
|
1146
|
+
wn as msToHMS,
|
|
1147
|
+
rt as mutationEffective,
|
|
1148
|
+
de as nodeIndex,
|
|
1149
|
+
Ke as objectGet,
|
|
1150
|
+
We as objectKeyMapping,
|
|
1151
|
+
gt as objectMerge,
|
|
1152
|
+
Je as objectSet,
|
|
1153
|
+
me as onDomTreeChange,
|
|
1154
|
+
ye as precisionToStep,
|
|
1155
|
+
ee as printStack,
|
|
1156
|
+
ae as randomInt,
|
|
1157
|
+
K as randomString,
|
|
1158
|
+
Ft as randomWords,
|
|
1159
|
+
he as rectAssoc,
|
|
1160
|
+
Ee as rectInLayout,
|
|
1161
|
+
M as regQuote,
|
|
1162
|
+
ce as remove,
|
|
1163
|
+
oe as round,
|
|
1164
|
+
Se as sanitizeFileName,
|
|
1165
|
+
$t as setCookie,
|
|
1166
|
+
pe as show,
|
|
1167
|
+
Ye as srcToBase64,
|
|
1168
|
+
Pt as strToPascalCase,
|
|
1169
|
+
Pe as stringToEntity,
|
|
1170
|
+
Nt as stripSlashes,
|
|
1171
|
+
Jt as throttle,
|
|
1172
|
+
Vt as throttleEffect,
|
|
1173
|
+
F as toggleDisabled,
|
|
1174
|
+
zt as toggleFullScreen,
|
|
1175
|
+
Ut as trim,
|
|
1176
|
+
Lt as truncate,
|
|
1177
|
+
Fe as unescapeHtml,
|
|
1178
|
+
R as urlB64DataCache,
|
|
1179
|
+
$ as utf8Decode,
|
|
1180
|
+
I as utf8Encode
|
|
1181
|
+
};
|