koishi-plugin-wordle-game
Version:
Koishi 的 Wordle | 汉兜 | 词影 | Numberle | Math | Lewdle 游戏插件。
1,256 lines (1,254 loc) • 433 kB
JavaScript
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name2 in all)
__defProp(target, name2, { get: all[name2], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/assets/词影/vendor.js
var require_vendor = __commonJS({
"src/assets/词影/vendor.js"(exports2) {
function R() {
}
__name(R, "R");
var be = /* @__PURE__ */ __name((e) => e, "be");
function ke(e, t) {
for (const n in t)
e[n] = t[n];
return e;
}
__name(ke, "ke");
function at(e) {
return e && typeof e == "object" && typeof e.then == "function";
}
__name(at, "at");
function He(e) {
return e();
}
__name(He, "He");
function Ge() {
return /* @__PURE__ */ Object.create(null);
}
__name(Ge, "Ge");
function j(e) {
e.forEach(He);
}
__name(j, "j");
function F(e) {
return typeof e == "function";
}
__name(F, "F");
function ct(e, t) {
return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
}
__name(ct, "ct");
var re;
function Rt(e, t) {
return re || (re = document.createElement("a")), re.href = t, e === re.href;
}
__name(Rt, "Rt");
function lt(e) {
return Object.keys(e).length === 0;
}
__name(lt, "lt");
function Oe2(e, ...t) {
if (e == null)
return R;
}
__name(Oe2, "Oe");
function $t(e) {
return e;
}
__name($t, "$t");
function Ct(e, t, n) {
e.$$.on_destroy.push(Oe2(t, n));
}
__name(Ct, "Ct");
function qt2(e, t, n, o) {
if (e) {
const l2 = Ze(e, t, n, o);
return e[0](l2);
}
}
__name(qt2, "qt");
function Ze(e, t, n, o) {
return e[1] && o ? ke(n.ctx.slice(), e[1](o(t))) : n.ctx;
}
__name(Ze, "Ze");
function zt(e, t, n, o) {
if (e[2] && o) {
const l2 = e[2](o(n));
if (t.dirty === void 0)
return l2;
if (typeof l2 == "object") {
const b = [], u = Math.max(t.dirty.length, l2.length);
for (let d = 0; d < u; d += 1)
b[d] = t.dirty[d] | l2[d];
return b;
}
return t.dirty | l2;
}
return t.dirty;
}
__name(zt, "zt");
function Pt(e, t, n, o, l2, b) {
if (l2) {
const u = Ze(t, n, o, b);
e.p(u, l2);
}
}
__name(Pt, "Pt");
function jt(e) {
if (e.ctx.length > 32) {
const t = [], n = e.ctx.length / 32;
for (let o = 0; o < n; o++)
t[o] = -1;
return t;
}
return -1;
}
__name(jt, "jt");
function Bt(e, t, n) {
return e.set(n), t;
}
__name(Bt, "Bt");
var Xe = typeof window != "undefined";
var Se = Xe ? () => window.performance.now() : () => Date.now();
var Ae = Xe ? (e) => requestAnimationFrame(e) : R;
var I = /* @__PURE__ */ new Set();
function Ke2(e) {
I.forEach(
(t) => {
t.c(e) || (I.delete(t), t.f());
}
), I.size !== 0 && Ae(Ke2);
}
__name(Ke2, "Ke");
function Te(e) {
let t;
return I.size === 0 && Ae(Ke2), {
promise: new Promise(
(n) => {
I.add(t = {
c: e,
f: n
});
}
),
abort() {
I.delete(t);
}
};
}
__name(Te, "Te");
function ut(e, t) {
e.appendChild(t);
}
__name(ut, "ut");
function Je(e) {
if (!e)
return document;
const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
return t && t.host ? t : e.ownerDocument;
}
__name(Je, "Je");
function ft(e) {
const t = wt("style");
return bt(Je(e), t), t.sheet;
}
__name(ft, "ft");
function bt(e, t) {
ut(e.head || e, t);
}
__name(bt, "bt");
function Ut(e, t, n) {
e.insertBefore(t, n || null);
}
__name(Ut, "Ut");
function dt(e) {
e.parentNode.removeChild(e);
}
__name(dt, "dt");
function Lt(e, t) {
for (let n = 0; n < e.length; n += 1)
e[n] && e[n].d(t);
}
__name(Lt, "Lt");
function wt(e) {
return document.createElement(e);
}
__name(wt, "wt");
function Dt(e) {
return document.createElementNS("http://www.w3.org/2000/svg", e);
}
__name(Dt, "Dt");
function Qe(e) {
return document.createTextNode(e);
}
__name(Qe, "Qe");
function It() {
return Qe(" ");
}
__name(It, "It");
function Vt() {
return Qe("");
}
__name(Vt, "Vt");
function Ft(e, t, n, o) {
return e.addEventListener(t, n, o), () => e.removeEventListener(t, n, o);
}
__name(Ft, "Ft");
function Gt(e) {
return function(t) {
return t.preventDefault(), e.call(this, t);
};
}
__name(Gt, "Gt");
function Wt(e, t, n) {
n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
}
__name(Wt, "Wt");
function ht(e) {
return Array.from(e.childNodes);
}
__name(ht, "ht");
function Yt(e, t) {
t = "" + t, e.wholeText !== t && (e.data = t);
}
__name(Yt, "Yt");
function Ht(e, t) {
e.value = t == null ? "" : t;
}
__name(Ht, "Ht");
function Zt(e, t, n, o) {
n === null ? e.style.removeProperty(t) : e.style.setProperty(t, n, o ? "important" : "");
}
__name(Zt, "Zt");
function Xt(e, t, n) {
e.classList[n ? "add" : "remove"](t);
}
__name(Xt, "Xt");
function et(e, t, n = false) {
const o = document.createEvent("CustomEvent");
return o.initCustomEvent(e, n, false, t), o;
}
__name(et, "et");
var ce = /* @__PURE__ */ new Map();
var le = 0;
function pt(e) {
let t = 5381, n = e.length;
for (; n--; )
t = (t << 5) - t ^ e.charCodeAt(n);
return t >>> 0;
}
__name(pt, "pt");
function mt(e, t) {
const n = {
stylesheet: ft(t),
rules: {}
};
return ce.set(e, n), n;
}
__name(mt, "mt");
function ue(e, t, n, o, l2, b, u, d = 0) {
const w = 16.666 / o;
let f = `{
`;
for (let c = 0; c <= 1; c += w) {
const E = t + (n - t) * b(c);
f += c * 100 + `%{${u(E, 1 - E)}}
`;
}
const g = f + `100% {${u(n, 1 - n)}}
}`, h2 = `__svelte_${pt(g)}_${d}`, i = Je(e), { stylesheet: a, rules: r } = ce.get(i) || mt(i, e);
r[h2] || (r[h2] = true, a.insertRule(`@keyframes ${h2} ${g}`, a.cssRules.length));
const s = e.style.animation || "";
return e.style.animation = `${s ? `${s}, ` : ""}${h2} ${o}ms linear ${l2}ms 1 both`, le += 1, h2;
}
__name(ue, "ue");
function fe(e, t) {
const n = (e.style.animation || "").split(", "), o = n.filter(t ? (b) => b.indexOf(t) < 0 : (b) => b.indexOf("__svelte") === -1), l2 = n.length - o.length;
l2 && (e.style.animation = o.join(", "), le -= l2, le || gt());
}
__name(fe, "fe");
function gt() {
Ae(
() => {
le || (ce.forEach(
(e) => {
const { stylesheet: t } = e;
let n = t.cssRules.length;
for (; n--; )
t.deleteRule(n);
e.rules = {};
}
), ce.clear());
}
);
}
__name(gt, "gt");
var X;
function z(e) {
X = e;
}
__name(z, "z");
function Me() {
if (!X)
throw new Error("Function called outside component initialization");
return X;
}
__name(Me, "Me");
function Kt(e) {
Me().$$.on_mount.push(e);
}
__name(Kt, "Kt");
function Jt() {
const e = Me();
return (t, n) => {
const o = e.$$.callbacks[t];
if (o) {
const l2 = et(t, n);
o.slice().forEach(
(b) => {
b.call(e, l2);
}
);
}
};
}
__name(Jt, "Jt");
function Qt(e, t) {
const n = e.$$.callbacks[t.type];
n && n.slice().forEach((o) => o.call(this, t));
}
__name(Qt, "Qt");
var Z = [];
var We = [];
var se = [];
var xe = [];
var _t = Promise.resolve();
var Ee = false;
function yt() {
Ee || (Ee = true, _t.then(Ne));
}
__name(yt, "yt");
function V(e) {
se.push(e);
}
__name(V, "V");
function ei(e) {
xe.push(e);
}
__name(ei, "ei");
var ve = /* @__PURE__ */ new Set();
var oe = 0;
function Ne() {
const e = X;
do {
for (; oe < Z.length; ) {
const t = Z[oe];
oe++, z(t), vt(t.$$);
}
for (z(null), Z.length = 0, oe = 0; We.length; )
We.pop()();
for (let t = 0; t < se.length; t += 1) {
const n = se[t];
ve.has(n) || (ve.add(n), n());
}
se.length = 0;
} while (Z.length);
for (; xe.length; )
xe.pop()();
Ee = false, ve.clear(), z(e);
}
__name(Ne, "Ne");
function vt(e) {
if (e.fragment !== null) {
e.update(), j(e.before_update);
const t = e.dirty;
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(V);
}
}
__name(vt, "vt");
var H;
function Re() {
return H || (H = Promise.resolve(), H.then(
() => {
H = null;
}
)), H;
}
__name(Re, "Re");
function B(e, t, n) {
e.dispatchEvent(et(`${t ? "intro" : "outro"}${n}`));
}
__name(B, "B");
var ae = /* @__PURE__ */ new Set();
var q;
function kt() {
q = {
r: 0,
c: [],
p: q
};
}
__name(kt, "kt");
function xt() {
q.r || j(q.c), q = q.p;
}
__name(xt, "xt");
function $e(e, t) {
e && e.i && (ae.delete(e), e.i(t));
}
__name($e, "$e");
function tt(e, t, n, o) {
if (e && e.o) {
if (ae.has(e))
return;
ae.add(e), q.c.push(
() => {
ae.delete(e), o && (n && e.d(1), o());
}
), e.o(t);
}
}
__name(tt, "tt");
var Ce = {
duration: 0
};
function ti(e, t, n) {
let o = t(e, n), l2 = false, b, u, d = 0;
function w() {
b && fe(e, b);
}
__name(w, "w");
function f() {
const { delay: h2 = 0, duration: i = 300, easing: a = be, tick: r = R, css: s } = o || Ce;
s && (b = ue(e, 0, 1, i, h2, a, s, d++)), r(0, 1);
const c = Se() + h2, E = c + i;
u && u.abort(), l2 = true, V(() => B(e, true, "start")), u = Te(
(A) => {
if (l2) {
if (A >= E)
return r(1, 0), B(e, true, "end"), w(), l2 = false;
if (A >= c) {
const p = a((A - c) / i);
r(p, 1 - p);
}
}
return l2;
}
);
}
__name(f, "f");
let g = false;
return {
start() {
g || (g = true, fe(e), F(o) ? (o = o(), Re().then(f)) : f());
},
invalidate() {
g = false;
},
end() {
l2 && (w(), l2 = false);
}
};
}
__name(ti, "ti");
function ii(e, t, n) {
let o = t(e, n), l2 = true, b;
const u = q;
u.r += 1;
function d() {
const { delay: w = 0, duration: f = 300, easing: g = be, tick: h2 = R, css: i } = o || Ce;
i && (b = ue(e, 1, 0, f, w, g, i));
const a = Se() + w, r = a + f;
V(() => B(e, false, "start")), Te(
(s) => {
if (l2) {
if (s >= r)
return h2(0, 1), B(e, false, "end"), --u.r || j(u.c), false;
if (s >= a) {
const c = g((s - a) / f);
h2(1 - c, c);
}
}
return l2;
}
);
}
__name(d, "d");
return F(o) ? Re().then(
() => {
o = o(), d();
}
) : d(), {
end(w) {
w && o.tick && o.tick(1, 0), l2 && (b && fe(e, b), l2 = false);
}
};
}
__name(ii, "ii");
function ni(e, t, n, o) {
let l2 = t(e, n), b = o ? 0 : 1, u = null, d = null, w = null;
function f() {
w && fe(e, w);
}
__name(f, "f");
function g(i, a) {
const r = i.b - b;
return a *= Math.abs(r), {
a: b,
b: i.b,
d: r,
duration: a,
start: i.start,
end: i.start + a,
group: i.group
};
}
__name(g, "g");
function h2(i) {
const { delay: a = 0, duration: r = 300, easing: s = be, tick: c = R, css: E } = l2 || Ce, A = {
start: Se() + a,
b: i
};
i || (A.group = q, q.r += 1), u || d ? d = A : (E && (f(), w = ue(e, b, i, r, a, s, E)), i && c(0, 1), u = g(A, r), V(() => B(e, i, "start")), Te(
(p) => {
if (d && p > d.start && (u = g(d, r), d = null, B(e, u.b, "start"), E && (f(), w = ue(e, b, u.b, u.duration, 0, s, l2.css))), u) {
if (p >= u.end)
c(b = u.b, 1 - b), B(e, u.b, "end"), d || (u.b ? f() : --u.group.r || j(u.group.c)), u = null;
else if (p >= u.start) {
const m = p - u.start;
b = u.a + u.d * s(m / u.duration), c(b, 1 - b);
}
}
return !!(u || d);
}
));
}
__name(h2, "h");
return {
run(i) {
F(l2) ? Re().then(
() => {
l2 = l2(), h2(i);
}
) : h2(i);
},
end() {
f(), u = d = null;
}
};
}
__name(ni, "ni");
function ri(e, t) {
const n = t.token = {};
function o(l2, b, u, d) {
if (t.token !== n)
return;
t.resolved = d;
let w = t.ctx;
u !== void 0 && (w = w.slice(), w[u] = d);
const f = l2 && (t.current = l2)(w);
let g = false;
t.block && (t.blocks ? t.blocks.forEach(
(h2, i) => {
i !== b && h2 && (kt(), tt(
h2,
1,
1,
() => {
t.blocks[i] === h2 && (t.blocks[i] = null);
}
), xt());
}
) : t.block.d(1), f.c(), $e(f, 1), f.m(t.mount(), t.anchor), g = true), t.block = f, t.blocks && (t.blocks[b] = f), g && Ne();
}
__name(o, "o");
if (at(e)) {
const l2 = Me();
if (e.then(
(b) => {
z(l2), o(t.then, 1, t.value, b), z(null);
},
(b) => {
if (z(l2), o(t.catch, 2, t.error, b), z(null), !t.hasCatch)
throw b;
}
), t.current !== t.pending)
return o(t.pending, 0), true;
} else {
if (t.current !== t.then)
return o(t.then, 1, t.value, e), true;
t.resolved = e;
}
}
__name(ri, "ri");
function oi(e, t, n) {
const o = t.slice(), { resolved: l2 } = e;
e.current === e.then && (o[e.value] = l2), e.current === e.catch && (o[e.error] = l2), e.block.p(o, n);
}
__name(oi, "oi");
function si(e, t) {
tt(
e,
1,
1,
() => {
t.delete(e.key);
}
);
}
__name(si, "si");
function ai(e, t, n, o, l2, b, u, d, w, f, g, h2) {
let i = e.length, a = b.length, r = i;
const s = {};
for (; r--; )
s[e[r].key] = r;
const c = [], E = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map();
for (r = a; r--; ) {
const k = h2(l2, b, r), M = n(k);
let N = u.get(M);
N ? o && N.p(k, t) : (N = f(M, k), N.c()), E.set(M, c[r] = N), M in s && A.set(M, Math.abs(r - s[M]));
}
const p = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set();
function T(k) {
$e(k, 1), k.m(d, g), u.set(k.key, k), g = k.first, a--;
}
__name(T, "T");
for (; i && a; ) {
const k = c[a - 1], M = e[i - 1], N = k.key, P = M.key;
k === M ? (g = k.first, i--, a--) : E.has(P) ? !u.has(N) || p.has(N) ? T(k) : m.has(P) ? i-- : A.get(N) > A.get(P) ? (m.add(N), T(k)) : (p.add(P), i--) : (w(M, u), i--);
}
for (; i--; ) {
const k = e[i];
E.has(k.key) || w(k, u);
}
for (; a; )
T(c[a - 1]);
return c;
}
__name(ai, "ai");
function ci(e, t, n) {
const o = e.$$.props[t];
o !== void 0 && (e.$$.bound[o] = n, n(e.$$.ctx[o]));
}
__name(ci, "ci");
function li(e) {
e && e.c();
}
__name(li, "li");
function Et(e, t, n, o) {
const { fragment: l2, on_mount: b, on_destroy: u, after_update: d } = e.$$;
l2 && l2.m(t, n), o || V(
() => {
const w = b.map(He).filter(F);
u ? u.push(...w) : j(w), e.$$.on_mount = [];
}
), d.forEach(V);
}
__name(Et, "Et");
function Ot2(e, t) {
const n = e.$$;
n.fragment !== null && (j(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
}
__name(Ot2, "Ot");
function St(e, t) {
e.$$.dirty[0] === -1 && (Z.push(e), yt(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
}
__name(St, "St");
function ui(e, t, n, o, l2, b, u, d = [-1]) {
const w = X;
z(e);
const f = e.$$ = {
fragment: null,
ctx: null,
props: b,
update: R,
not_equal: l2,
bound: Ge(),
on_mount: [],
on_destroy: [],
on_disconnect: [],
before_update: [],
after_update: [],
context: new Map(t.context || (w ? w.$$.context : [])),
callbacks: Ge(),
dirty: d,
skip_bound: false,
root: t.target
// || w.$$.root
};
u && u(f.root);
let g = false;
if (f.ctx = n ? n(
e,
t.props || {},
(h2, i, ...a) => {
const r = a.length ? a[0] : i;
return f.ctx && l2(f.ctx[h2], f.ctx[h2] = r) && (!f.skip_bound && f.bound[h2] && f.bound[h2](r), g && St(e, h2)), i;
}
) : [], f.update(), g = true, j(f.before_update), f.fragment = o ? o(f.ctx) : false, t.target) {
if (t.hydrate) {
const h2 = ht(t.target);
f.fragment && f.fragment.l(h2), h2.forEach(dt);
} else
f.fragment && f.fragment.c();
t.intro && $e(e.$$.fragment), Et(e, t.target, t.anchor, t.customElement), Ne();
}
z(w);
}
__name(ui, "ui");
var fi = class {
static {
__name(this, "fi");
}
$destroy() {
Ot2(this, 1), this.$destroy = R;
}
$on(t, n) {
const o = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
return o.push(n), () => {
const l2 = o.indexOf(n);
l2 !== -1 && o.splice(l2, 1);
};
}
$set(t) {
this.$$set && !lt(t) && (this.$$.skip_bound = true, this.$$set(t), this.$$.skip_bound = false);
}
};
function it(e) {
const t = e - 1;
return t * t * t + 1;
}
__name(it, "it");
function bi(e) {
return Math.sin(e * Math.PI / 2);
}
__name(bi, "bi");
function At(e, t) {
var n = {};
for (var o in e)
Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
if (e != null && typeof Object.getOwnPropertySymbols == "function")
for (var l2 = 0, o = Object.getOwnPropertySymbols(e); l2 < o.length; l2++)
t.indexOf(o[l2]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[l2]) && (n[o[l2]] = e[o[l2]]);
return n;
}
__name(At, "At");
function di(e, { delay: t = 0, duration: n = 400, easing: o = be } = {}) {
const l2 = +getComputedStyle(e).opacity;
return {
delay: t,
duration: n,
easing: o,
css: /* @__PURE__ */ __name((b) => `opacity: ${b * l2}`, "css")
};
}
__name(di, "di");
function wi(e, { delay: t = 0, duration: n = 400, easing: o = it, x: l2 = 0, y: b = 0, opacity: u = 0 } = {}) {
const d = getComputedStyle(e), w = +d.opacity, f = d.transform === "none" ? "" : d.transform, g = w * (1 - u);
return {
delay: t,
duration: n,
easing: o,
css: /* @__PURE__ */ __name((h2, i) => `
transform: ${f} translate(${(1 - h2) * l2}px, ${(1 - h2) * b}px);
opacity: ${w - g * i}`, "css")
};
}
__name(wi, "wi");
function hi(e) {
var { fallback: t } = e, n = At(e, ["fallback"]);
const o = /* @__PURE__ */ new Map(), l2 = /* @__PURE__ */ new Map();
function b(d, w, f) {
const { delay: g = 0, duration: h2 = /* @__PURE__ */ __name((k) => Math.sqrt(k) * 30, "h"), easing: i = it } = ke(ke({}, n), f), a = w.getBoundingClientRect(), r = d.left - a.left, s = d.top - a.top, c = d.width / a.width, E = d.height / a.height, A = Math.sqrt(r * r + s * s), p = getComputedStyle(w), m = p.transform === "none" ? "" : p.transform, T = +p.opacity;
return {
delay: g,
duration: F(h2) ? h2(A) : h2,
easing: i,
css: /* @__PURE__ */ __name((k, M) => `
opacity: ${k * T};
transform-origin: top left;
transform: ${m} translate(${M * r}px,${M * s}px) scale(${k + (1 - k) * c}, ${k + (1 - k) * E});
`, "css")
};
}
__name(b, "b");
function u(d, w, f) {
return (g, h2) => (d.set(h2.key, {
rect: g.getBoundingClientRect()
}), () => {
if (w.has(h2.key)) {
const { rect: i } = w.get(h2.key);
return w.delete(h2.key), b(i, g, h2);
}
return d.delete(h2.key), t && t(g, h2, f);
});
}
__name(u, "u");
return [u(l2, o, false), u(o, l2, true)];
}
__name(hi, "hi");
var D = [];
function Tt(e, t) {
return {
// subscribe: Mt(e, t).subscribe
};
}
__name(Tt, "Tt");
function Mt(e, t = R) {
let n;
const o = /* @__PURE__ */ new Set();
function l2(d) {
if (ct(e, d) && (e = d, n)) {
const w = !D.length;
for (const f of o)
f[1](), D.push(f, e);
if (w) {
for (let f = 0; f < D.length; f += 2)
D[f][0](D[f + 1]);
D.length = 0;
}
}
}
__name(l2, "l");
function b(d) {
l2(d(e));
}
__name(b, "b");
function u(d, w = R) {
const f = [d, w];
return o.add(f), o.size === 1 && (n = t(l2) || R), d(e), () => {
o.delete(f), o.size === 0 && (n(), n = null);
};
}
__name(u, "u");
return {
set: l2,
update: b,
subscribe: u
};
}
__name(Mt, "Mt");
var pi = /* @__PURE__ */ __name(function(e, t, n) {
const o = !Array.isArray(e), l2 = o ? [e] : e, b = t.length < 2;
return Tt(
n,
(u) => {
let d = false;
const w = [];
let f = 0, g = R;
const h2 = /* @__PURE__ */ __name(() => {
if (f)
return;
g();
const a = t(o ? w[0] : w, u);
b ? u(a) : g = F(a) ? a : R;
}, "h"), i = l2.map((a, r) => Oe2(
a,
(s) => {
w[r] = s, f &= ~(1 << r), d && h2();
},
() => {
f |= 1 << r;
}
));
return d = true, h2(), function() {
j(i), g();
};
}
);
}, "pi");
var Nt = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
var Ye = {
exports: {}
};
(function(e, t) {
(function(n, o) {
var l2 = "1.0.2", b = "", u = "?", d = "function", w = "undefined", f = "object", g = "string", h2 = "major", i = "model", a = "name", r = "type", s = "vendor", c = "version", E = "architecture", A = "console", p = "mobile", m = "tablet", T = "smarttv", k = "wearable", M = "embedded", N = 255, P = "Amazon", de = "Apple", qe = "ASUS", ze = "BlackBerry", U = "Browser", K = "Chrome", nt = "Edge", J = "Firefox", Q = "Google", Pe = "Huawei", we = "LG", he2 = "Microsoft", je = "Motorola", ee = "Opera", pe = "Samsung", me = "Sony", Be = "Xiaomi", ge = "Zebra", Ue = "Facebook", rt = /* @__PURE__ */ __name(function(_, x) {
var y = {};
for (var S in _)
x[S] && x[S].length % 2 === 0 ? y[S] = x[S].concat(_[S]) : y[S] = _[S];
return y;
}, "rt"), te = /* @__PURE__ */ __name(function(_) {
for (var x = {}, y = 0; y < _.length; y++)
x[_[y].toUpperCase()] = _[y];
return x;
}, "te"), Le = /* @__PURE__ */ __name(function(_, x) {
return typeof _ === g ? G(x).indexOf(G(_)) !== -1 : false;
}, "Le"), G = /* @__PURE__ */ __name(function(_) {
return _.toLowerCase();
}, "G"), ot = /* @__PURE__ */ __name(function(_) {
return typeof _ === g ? _.replace(/[^\d\.]/g, b).split(".")[0] : o;
}, "ot"), _e = /* @__PURE__ */ __name(function(_, x) {
if (typeof _ === g)
return _ = _.replace(/^\s\s*/, b).replace(/\s\s*$/, b), typeof x === w ? _ : _.substring(0, N);
}, "_e"), W = /* @__PURE__ */ __name(function(_, x) {
for (var y = 0, S, v, ne, O, Y, C; y < x.length && !Y; ) {
var Ve = x[y], Fe = x[y + 1];
for (S = v = 0; S < Ve.length && !Y; )
if (Y = Ve[S++].exec(_), Y)
for (ne = 0; ne < Fe.length; ne++)
C = Y[++v], O = Fe[ne], typeof O === f && O.length > 0 ? O.length === 2 ? typeof O[1] == d ? this[O[0]] = O[1].call(this, C) : this[O[0]] = O[1] : O.length === 3 ? typeof O[1] === d && !(O[1].exec && O[1].test) ? this[O[0]] = C ? O[1].call(this, C, O[2]) : o : this[O[0]] = C ? C.replace(O[1], O[2]) : o : O.length === 4 && (this[O[0]] = C ? O[3].call(this, C.replace(O[1], O[2])) : o) : this[O] = C || o;
y += 2;
}
}, "W"), ye = /* @__PURE__ */ __name(function(_, x) {
for (var y in x)
if (typeof x[y] === f && x[y].length > 0) {
for (var S = 0; S < x[y].length; S++)
if (Le(x[y][S], _))
return y === u ? o : y;
} else if (Le(x[y], _))
return y === u ? o : y;
return _;
}, "ye"), st = {
"1.0": "/8",
"1.2": "/1",
"1.3": "/3",
"2.0": "/412",
"2.0.2": "/416",
"2.0.3": "/417",
"2.0.4": "/419",
"?": "/"
}, De = {
ME: "4.90",
"NT 3.11": "NT3.51",
"NT 4.0": "NT4.0",
"2000": "NT 5.0",
XP: ["NT 5.1", "NT 5.2"],
Vista: "NT 6.0",
"7": "NT 6.1",
"8": "NT 6.2",
"8.1": "NT 6.3",
"10": ["NT 6.4", "NT 10.0"],
RT: "ARM"
}, Ie = {
browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [c, [a, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [c, [a, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [a, c], [/opios[\/ ]+([\w\.]+)/i], [c, [a, ee + " Mini"]], [/\bopr\/([\w\.]+)/i], [c, [a, ee]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, /(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, /(ba?idubrowser)[\/ ]?([\w\.]+)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i, /(weibo)__([\d\.]+)/i], [a, c], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [c, [a, "UC" + U]], [/\bqbcore\/([\w\.]+)/i], [c, [a, "WeChat(Win) Desktop"]], [/micromessenger\/([\w\.]+)/i], [c, [a, "WeChat"]], [/konqueror\/([\w\.]+)/i], [c, [a, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [c, [a, "IE"]], [/yabrowser\/([\w\.]+)/i], [c, [a, "Yandex"]], [/(avast|avg)\/([\w\.]+)/i], [[a, /(.+)/, "$1 Secure " + U], c], [/\bfocus\/([\w\.]+)/i], [c, [a, J + " Focus"]], [/\bopt\/([\w\.]+)/i], [c, [a, ee + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [c, [a, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [c, [a, "Dolphin"]], [/coast\/([\w\.]+)/i], [c, [a, ee + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [c, [a, "MIUI " + U]], [/fxios\/([-\w\.]+)/i], [c, [a, J]], [/\bqihu|(qi?ho?o?|360)browser/i], [[a, "360 " + U]], [/(oculus|samsung|sailfish)browser\/([\w\.]+)/i], [[a, /(.+)/, "$1 " + U], c], [/(comodo_dragon)\/([\w\.]+)/i], [[a, /_/g, " "], c], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i], [a, c], [/(metasr)[\/ ]?([\w\.]+)/i, /(lbbrowser)/i], [a], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[a, Ue], c], [/safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(chromium|instagram)[\/ ]([-\w\.]+)/i], [a, c], [/\bgsa\/([\w\.]+) .*safari\//i], [c, [a, "GSA"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [c, [a, K + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[a, K + " WebView"], c], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [c, [a, "Android " + U]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [a, c], [/version\/([\w\.]+) .*mobile\/\w+ (safari)/i], [c, [a, "Mobile Safari"]], [/version\/([\w\.]+) .*(mobile ?safari|safari)/i], [c, a], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [a, [c, ye, st]], [/(webkit|khtml)\/([\w\.]+)/i], [a, c], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[a, "Netscape"], c], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [c, [a, J + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i], [a, c]],
cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[E, "amd64"]], [/(ia32(?=;))/i], [[E, G]], [/((?:i[346]|x)86)[;\)]/i], [[E, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[E, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[E, "armhf"]], [/windows (ce|mobile); ppc;/i], [[E, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[E, /ower/, b, G]], [/(sun4\w)[;\)]/i], [[E, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[E, G]]],
device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [i, [s, pe], [r, m]], [/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i, /samsung[- ]([-\w]+)/i, /sec-(sgh\w+)/i], [i, [s, pe], [r, p]], [/\((ip(?:hone|od)[\w ]*);/i], [i, [s, de], [r, p]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [i, [s, de], [r, m]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [i, [s, Pe], [r, m]], [/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i], [i, [s, Pe], [r, p]], [/\b(poco[\w ]+)(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i], [[i, /_/g, " "], [s, Be], [r, p]], [/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[i, /_/g, " "], [s, Be], [r, m]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [i, [s, "OPPO"], [r, p]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [i, [s, "Vivo"], [r, p]], [/\b(rmx[12]\d{3})(?: bui|;|\))/i], [i, [s, "Realme"], [r, p]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [i, [s, je], [r, p]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [i, [s, je], [r, m]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [i, [s, we], [r, m]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [i, [s, we], [r, p]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [i, [s, "Lenovo"], [r, m]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[i, /_/g, " "], [s, "Nokia"], [r, p]], [/(pixel c)\b/i], [i, [s, Q], [r, m]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [i, [s, Q], [r, p]], [/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [i, [s, me], [r, p]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[i, "Xperia Tablet"], [s, me], [r, m]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [i, [s, "OnePlus"], [r, p]], [/(alexa)webm/i, /(kf[a-z]{2}wi)( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [i, [s, P], [r, m]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[i, /(.+)/g, "Fire Phone $1"], [s, P], [r, p]], [/(playbook);[-\w\),; ]+(rim)/i], [i, s, [r, m]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [i, [s, ze], [r, p]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [i, [s, qe], [r, m]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [i, [s, qe], [r, p]], [/(nexus 9)/i], [i, [s, "HTC"], [r, m]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i], [s, [i, /_/g, " "], [r, p]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [i, [s, "Acer"], [r, m]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [i, [s, "Meizu"], [r, p]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [i, [s, "Sharp"], [r, p]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [s, i, [r, p]], [/(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [s, i, [r, m]], [/(surface duo)/i], [i, [s, he2], [r, m]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [i, [s, "Fairphone"], [r, p]], [/(u304aa)/i], [i, [s, "AT&T"], [r, p]], [/\bsie-(\w*)/i], [i, [s, "Siemens"], [r, p]], [/\b(rct\w+) b/i], [i, [s, "RCA"], [r, m]], [/\b(venue[\d ]{2,7}) b/i], [i, [s, "Dell"], [r, m]], [/\b(q(?:mv|ta)\w+) b/i], [i, [s, "Verizon"], [r, m]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [i, [s, "Barnes & Noble"], [r, m]], [/\b(tm\d{3}\w+) b/i], [i, [s, "NuVision"], [r, m]], [/\b(k88) b/i], [i, [s, "ZTE"], [r, m]], [/\b(nx\d{3}j) b/i], [i, [s, "ZTE"], [r, p]], [/\b(gen\d{3}) b.+49h/i], [i, [s, "Swiss"], [r, p]], [/\b(zur\d{3}) b/i], [i, [s, "Swiss"], [r, m]], [/\b((zeki)?tb.*\b) b/i], [i, [s, "Zeki"], [r, m]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[s, "Dragon Touch"], i, [r, m]], [/\b(ns-?\w{0,9}) b/i], [i, [s, "Insignia"], [r, m]], [/\b((nxa|next)-?\w{0,9}) b/i], [i, [s, "NextBook"], [r, m]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[s, "Voice"], i, [r, p]], [/\b(lvtel\-)?(v1[12]) b/i], [[s, "LvTel"], i, [r, p]], [/\b(ph-1) /i], [i, [s, "Essential"], [r, p]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [i, [s, "Envizen"], [r, m]], [/\b(trio[-\w\. ]+) b/i], [i, [s, "MachSpeed"], [r, m]], [/\btu_(1491) b/i], [i, [s, "Rotor"], [r, m]], [/(shield[\w ]+) b/i], [i, [s, "Nvidia"], [r, m]], [/(sprint) (\w+)/i], [s, i, [r, p]], [/(kin\.[onetw]{3})/i], [[i, /\./g, " "], [s, he2], [r, p]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [i, [s, ge], [r, m]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [i, [s, ge], [r, p]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [s, i, [r, A]], [/droid.+; (shield) bui/i], [i, [s, "Nvidia"], [r, A]], [/(playstation [345portablevi]+)/i], [i, [s, me], [r, A]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [i, [s, he2], [r, A]], [/smart-tv.+(samsung)/i], [s, [r, T]], [/hbbtv.+maple;(\d+)/i], [[i, /^/, "SmartTV"], [s, pe], [r, T]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[s, we], [r, T]], [/(apple) ?tv/i], [s, [i, de + " TV"], [r, T]], [/crkey/i], [[i, K + "cast"], [s, Q], [r, T]], [/droid.+aft(\w)( bui|\))/i], [i, [s, P], [r, T]], [/\(dtv[\);].+(aquos)/i], [i, [s, "Sharp"], [r, T]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i], [[s, _e], [i, _e], [r, T]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[r, T]], [/((pebble))app/i], [s, i, [r, k]], [/droid.+; (glass) \d/i], [i, [s, Q], [r, k]], [/droid.+; (wt63?0{2,3})\)/i], [i, [s, ge], [r, k]], [/(quest( 2)?)/i], [i, [s, Ue], [r, k]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [s, [r, M]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i], [i, [r, p]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [i, [r, m]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[r, m]], [/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i], [[r, p]], [/(android[-\w\. ]{0,9});.+buil/i], [i, [s, "Generic"]]],
engine: [[/windows.+ edge\/([\w\.]+)/i], [c, [a, nt + "HTML"]], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [c, [a, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i], [a, c], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [c, a]],
os: [[/microsoft (windows) (vista|xp)/i], [a, c], [/(windows) nt 6\.2; (arm)/i, /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i, /(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i], [a, [c, ye, De]], [/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[a, "Windows"], [c, ye, De]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /cfnetwork\/.+darwin/i], [[c, /_/g, "."], [a, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[a, "Mac OS"], [c, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86)/i], [c, a], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [a, c], [/\(bb(10);/i], [c, [a, ze]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [c, [a, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [c, [a, J + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [c, [a, "webOS"]], [/crkey\/([\d\.]+)/i], [c, [a, K + "cast"]], [/(cros) [\w]+ ([\w\.]+\w)/i], [[a, "Chromium OS"], c], [/(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [a, c], [/(sunos) ?([\w\.\d]*)/i], [[a, "Solaris"], c], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i, /(unix) ?([\w\.]*)/i], [a, c]]
}, $ = /* @__PURE__ */ __name(function(_, x) {
if (typeof _ === f && (x = _, _ = o), !(this instanceof $))
return new $(_, x).getResult();
var y = _ || (typeof n !== w && n.navigator && n.navigator.userAgent ? n.navigator.userAgent : b), S = x ? rt(Ie, x) : Ie;
return this.getBrowser = function() {
var v = {};
return v[a] = o, v[c] = o, W.call(v, y, S.browser), v.major = ot(v.version), v;
}, this.getCPU = function() {
var v = {};
return v[E] = o, W.call(v, y, S.cpu), v;
}, this.getDevice = function() {
var v = {};
return v[s] = o, v[i] = o, v[r] = o, W.call(v, y, S.device), v;
}, this.getEngine = function() {
var v = {};
return v[a] = o, v[c] = o, W.call(v, y, S.engine), v;
}, this.getOS = function() {
var v = {};
return v[a] = o, v[c] = o, W.call(v, y, S.os), v;
}, this.getResult = function() {
return {
ua: this.getUA(),
browser: this.getBrowser(),
engine: this.getEngine(),
os: this.getOS(),
device: this.getDevice(),
cpu: this.getCPU()
};
}, this.getUA = function() {
return y;
}, this.setUA = function(v) {
return y = typeof v === g && v.length > N ? _e(v, N) : v, this;
}, this.setUA(y), this;
}, "$");
$.VERSION = l2, $.BROWSER = te([a, c, h2]), $.CPU = te([E]), $.DEVICE = te([i, s, r, A, p, T, m, k, M]), $.ENGINE = $.OS = te([a, c]), e.exports && (t = e.exports = $), t.UAParser = $;
var L = typeof n !== w && (n.jQuery || n.Zepto);
if (L && !L.ua) {
var ie = new $();
L.ua = ie.getResult(), L.ua.get = function() {
return ie.getUA();
}, L.ua.set = function(_) {
ie.setUA(_);
var x = ie.getResult();
for (var y in x)
L.ua[y] = x[y];
};
}
})(typeof window == "object" ? window : Nt);
})(Ye, Ye.exports);
exports2.$ = Ye;
exports2.A = Ht;
exports2.B = Gt;
exports2.C = Dt;
exports2.D = Lt;
exports2.E = Qe;
exports2.F = Yt;
exports2.G = li;
exports2.H = Et;
exports2.I = ei;
exports2.J = Ot2;
exports2.K = ci;
exports2.L = Qt;
exports2.M = ti;
exports2.N = ii;
exports2.O = hi;
exports2.P = Bt;
exports2.Q = Pt;
exports2.R = jt;
exports2.S = fi;
exports2.T = zt;
exports2.U = wi;
exports2.V = di;
exports2.W = qt2;
exports2.X = Kt;
exports2.Y = Rt;
exports2.Z = Tt;
exports2._ = Zt;
exports2.a = It;
exports2.a0 = ai;
exports2.a1 = si;
exports2.a2 = ri;
exports2.a3 = oi;
exports2.b = Wt;
exports2.c = Ut;
exports2.d = ut;
exports2.e = wt;
exports2.f = dt;
exports2.g = $t;
exports2.h = pi;
exports2.i = ui;
exports2.j = Vt;
exports2.k = kt;
exports2.l = Ft;
exports2.m = xt;
exports2.n = R;
exports2.o = $e;
exports2.p = Ct;
exports2.q = Jt;
exports2.r = j;
exports2.s = ct;
exports2.t = tt;
exports2.u = bi;
exports2.v = We;
exports2.w = Mt;
exports2.x = Xt;
exports2.y = V;
exports2.z = ni;
}
});
// src/assets/词影/main.js
var require_main = __commonJS({
"src/assets/词影/main.js"(exports2, module2) {
var {
S: se,
i: oe,
s: re,
e: _,
a: R,
b: h2,
c: g,
d: m,
l: J,
n: B,
f: b,
r: tt,
w: sl,
g: je,
h: ol,
j: dt,
k: be,
t: M,
m: we,
o: C,
p: me,
q: nt,
u: Rl,
v: V,
x: U,
y: Fe,
z: Be,
A: At,
B: cn,
C: Ae,
D: Qe,
E: G,
F: Ce,
G: D,
H: j,
I: ie,
J: N,
K: ue,
L: yt,
M: Kt,
N: rl,
O: Al,
P: Re,
Q: ut,
R: ft,
T: at,
U: Pt,
V: vt,
W: ct,
X: il,
Y: dn,
Z: Pl,
_: hn,
$: Ll,
a0: zl,
a1: Ol,
a2: Ht,
a3: Ut
} = require_vendor();
var le = ((n) => (n.IN_PROGRESS = "IN_PROGRESS", n.WIN = "WIN", n.FAIL = "FAIL", n))(le || {});
function ul(n) {
return Math.floor((n - fl) / al) + 1;
}
__name(ul, "ul");
var ce = 4;
var Ne = 6;
var fl = Date.parse("2022-03-20T00:00:00");
var al = 864e5;
var Vt = ul(Date.now());
var Lt = sl(new Array(Ne).fill(false).map(() => new Array(ce).fill(false).map(() => ({
shadows: [],
match: false,
percent: 0
}))));
var Kl = /* @__PURE__ */ __name(function(isHardMode) {
const n = {
boardState: new Array(Ne).fill(false).map(() => new Array(ce).fill(false).map(() => "")),
rowIndex: 0,
solution: "",
gameStatus: le.IN_PROGRESS,
lastPlayedTs: null,
lastCompletedTs: null,
hardMode: isHardMode,
dailyConsumedQuota: 0
};
return n;
}, "Kl");
module2.exports.Kl = Kl;
var ae = Kl();
var Vl = {
keepShadow: true,
correctThreshold: 0.5,
presentThreshold: 1,
shiftFactor: 0.7,
idiomLimit: 2e3
};
var Xl = {
keepShadow: false,
correctThreshold: 0.3,
presentThreshold: 1,
shiftFactor: 0.7
};
var Ct = ol(ae, (n) => n.hardMode ? Xl : Vl);
function kt(n, e) {
return Math.hypot(n[0] - e[0], n[1] - e[1]);
}
__name(kt, "kt");
function Ft(n, e) {
return [e[0] - n[0], e[1] - n[1]];
}
__name(Ft, "Ft");
function Qt(n, e) {
const t = e / Math.hypot(n[0], n[1]);
return [n[0] * t, n[1] * t];
}
__name(Qt, "Qt");
function zt(n) {
let e = 0;
for (let t = 0; t + 1 < n.length; t += 1)
e += kt(n[t], n[t + 1]);
return e;
}
__name(zt, "zt");
function $t(n) {
const e = zt(n), t = [0, 0];
for (let l2 = 0; l2 + 1 < n.length; l2 += 1) {
const s = kt(n[l2], n[l2 + 1]) / e;
for (let r = 0; r < 2; r += 1)
t[r] += (n[l2][r] + n[l2 + 1][r]) / 2 * s;
}
return t;
}
__name($t, "$t");
function st(n, e, t) {
return [n[0] + e[0] * t, n[1] + e[1] * t];
}
__name(st, "st");
function Rt(n, e, t, l2, s) {
let r = 0;
for (let o = 0; o < 2; o += 1) {
const i = t[o] - n[o], u = (l2[o] - e[o]) * s;
r += (i * i + i * u + u * u / 3) * s;
}
return r;
}
__name(Rt, "Rt");
function ks(n) {
const e = $t(n), t = zt(n);
let l2 = 0;
for (let s = 0; s + 1 < n.length; s += 1) {
const r = kt(n[s], n[s + 1]) / t, o = Qt(Ft(n[s], n[s + 1]), t);
l2 += Rt(n[s], o, e, [0, 0], r);
}
return Math.sqrt(l2) / 1024;
}
__name(ks, "ks");
function $s(n, e, t) {
let l2 = 0;
const s = zt(n), r = zt(e), o = $t(n), i = $t(e);
let u = st(n[0], o, -t), a = st(e[0], i, -t), f = 1, c = 1;
for (; f < n.length && c < e.length; ) {
const d = st(n[f], o, -t), p = st(e[c], i, -t), w = kt(u, d) / s, $ = kt(a, p) / r, k = Qt(Ft(u, d), s), y = Qt(Ft(a, p), r);
w == $ ? (l2 += Rt(u, k, a, y, w), u = d, a = p, f += 1, c += 1) : w < $ ? (l2 += Rt(u, k, a, y, w), u = d, a = st(a, y, w), f += 1) : (l2 += Rt(u, k, a, y, $), u = st(u, k, $), a = p, c += 1);
}
return Math.sqrt(l2) / 1024;
}
__name($s, "$s");
module2.exports.Ot = function(n, e, t, Ct2) {
const l2 = je(Ct2);
const s = [...(t == null ? void 0 : t.shadows) || n.medians.map(() => ({
stroke: "",
distance: l2.presentThreshold,
shiftX: 0,
shiftY: 0
}))];
let r = 0;
for (let o = 0; o < n.medians.length; o += 1) {
let i = false;
const u = ks(n.medians[o]);
for (let a = 0; a < e.medians.length; a += 1) {
const f = $s(n.medians[o], e.medians[a], l2.shiftFactor) / u;
if (f < l2.correctThreshold && (i = true), f < s[o].distance)
if (f < l2.correctThreshold)
s[o] = {
s