@yoyaflow/yoya-ui 0.3.2 → 0.3.3
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 +347 -108
- package/README.zh-CN.md +321 -121
- package/dist/yoya-ui.umd.js +2 -2
- package/dist/yoya.core.js +845 -286
- package/dist/yoya.devtools.js +223 -0
- package/dist/yoya.echart.js +341 -84
- package/dist/yoya.ssr.js +1347 -759
- package/dist/yoya.ui.css +71 -0
- package/dist/yoya.ui.js +3358 -2480
- package/package.json +13 -1
- package/types/core.d.ts +122 -1
- package/types/data-display.d.ts +44 -2
- package/types/devtools.d.ts +156 -0
- package/types/feedback.d.ts +13 -0
- package/types/form.d.ts +1 -1
- package/types/ssr.d.ts +27 -7
- package/types/yoya.devtools.d.ts +5 -0
package/dist/yoya.core.js
CHANGED
|
@@ -1,10 +1,164 @@
|
|
|
1
|
+
//#region src/core/access.js
|
|
2
|
+
var e = null, t = null;
|
|
3
|
+
function n(e) {
|
|
4
|
+
if (!e) return null;
|
|
5
|
+
if (typeof e == "object" && e.code) return {
|
|
6
|
+
code: e.code,
|
|
7
|
+
level: e.level === "write" ? "write" : "read"
|
|
8
|
+
};
|
|
9
|
+
let t = String(e).trim();
|
|
10
|
+
return t ? t.startsWith("w.") ? {
|
|
11
|
+
code: t.slice(2),
|
|
12
|
+
level: "write"
|
|
13
|
+
} : t.startsWith("r.") ? {
|
|
14
|
+
code: t.slice(2),
|
|
15
|
+
level: "read"
|
|
16
|
+
} : {
|
|
17
|
+
code: t,
|
|
18
|
+
level: "write"
|
|
19
|
+
} : null;
|
|
20
|
+
}
|
|
21
|
+
function r(e) {
|
|
22
|
+
let t = n(e);
|
|
23
|
+
return t ? t.code : String(e ?? "");
|
|
24
|
+
}
|
|
25
|
+
function i({ permissions: e = [], roles: t = [], superAdmins: n = ["super_admin"] } = {}) {
|
|
26
|
+
let i = {
|
|
27
|
+
permissions: [...e || []],
|
|
28
|
+
roles: [...t || []],
|
|
29
|
+
superAdmins: [...n || []]
|
|
30
|
+
}, a = new Set(i.permissions), o = /* @__PURE__ */ new Set(), s = () => i.superAdmins.some((e) => i.roles.includes(e));
|
|
31
|
+
function c(e, t) {
|
|
32
|
+
return s() ? !0 : t === "write" ? a.has(`w.${e}`) || a.has(e) : a.has(`r.${e}`) || a.has(`w.${e}`) || a.has(e);
|
|
33
|
+
}
|
|
34
|
+
function l(e, t) {
|
|
35
|
+
return c(r(e), t);
|
|
36
|
+
}
|
|
37
|
+
let u = {
|
|
38
|
+
roles() {
|
|
39
|
+
return i.roles.slice();
|
|
40
|
+
},
|
|
41
|
+
permissions() {
|
|
42
|
+
return i.permissions.slice();
|
|
43
|
+
},
|
|
44
|
+
isSuper: s,
|
|
45
|
+
has(e) {
|
|
46
|
+
let t = r(e);
|
|
47
|
+
return s() || a.has(`r.${t}`) || a.has(`w.${t}`) || a.has(t);
|
|
48
|
+
},
|
|
49
|
+
canRead(e) {
|
|
50
|
+
return l(e, "read");
|
|
51
|
+
},
|
|
52
|
+
canWrite(e) {
|
|
53
|
+
return l(e, "write");
|
|
54
|
+
},
|
|
55
|
+
setPermissions(e) {
|
|
56
|
+
return i.permissions = [...e || []], a.clear(), (e || []).forEach((e) => a.add(e)), o.forEach((e) => e()), u;
|
|
57
|
+
},
|
|
58
|
+
subscribe(e) {
|
|
59
|
+
return o.add(e), () => o.delete(e);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
return u;
|
|
63
|
+
}
|
|
64
|
+
function a(t, n) {
|
|
65
|
+
let r = e;
|
|
66
|
+
e = t || r;
|
|
67
|
+
try {
|
|
68
|
+
return n();
|
|
69
|
+
} finally {
|
|
70
|
+
e = r;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function o(e) {
|
|
74
|
+
return t = e || null, t;
|
|
75
|
+
}
|
|
76
|
+
function s() {
|
|
77
|
+
return e || t;
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
1
80
|
//#region src/core/node.js
|
|
2
|
-
var
|
|
81
|
+
var c = Symbol.for("yoya.devtools.bridge");
|
|
82
|
+
function l() {
|
|
83
|
+
return typeof globalThis > "u" ? null : globalThis[c] || null;
|
|
84
|
+
}
|
|
85
|
+
function u() {
|
|
86
|
+
let e = l();
|
|
87
|
+
return e ? e.enabled() : !1;
|
|
88
|
+
}
|
|
89
|
+
function ee(e) {
|
|
90
|
+
let t = l();
|
|
91
|
+
t && t.emit(e);
|
|
92
|
+
}
|
|
93
|
+
function te(e) {
|
|
94
|
+
let t = l();
|
|
95
|
+
t && t.unregister(e);
|
|
96
|
+
}
|
|
97
|
+
function ne(e) {
|
|
98
|
+
let t = l();
|
|
99
|
+
t && t.captureScope(e);
|
|
100
|
+
}
|
|
101
|
+
function d(e) {
|
|
102
|
+
let t = l();
|
|
103
|
+
return t ? t.ensureId(e) : void 0;
|
|
104
|
+
}
|
|
105
|
+
function f(e, t, n) {
|
|
106
|
+
let r = l();
|
|
107
|
+
r && r.notify(e, t, n);
|
|
108
|
+
}
|
|
109
|
+
function re(e) {
|
|
110
|
+
let t = l();
|
|
111
|
+
t && t.commit(e);
|
|
112
|
+
}
|
|
113
|
+
var ie = /* @__PURE__ */ new Set([
|
|
3
114
|
"checked",
|
|
4
115
|
"disabled",
|
|
5
116
|
"readonly",
|
|
6
117
|
"selected"
|
|
7
|
-
]),
|
|
118
|
+
]), ae = /* @__PURE__ */ new Set([
|
|
119
|
+
"input",
|
|
120
|
+
"select",
|
|
121
|
+
"textarea",
|
|
122
|
+
"button",
|
|
123
|
+
"fieldset",
|
|
124
|
+
"option",
|
|
125
|
+
"optgroup",
|
|
126
|
+
"keygen"
|
|
127
|
+
]), oe = /* @__PURE__ */ new Set(["input", "textarea"]), p = [];
|
|
128
|
+
function m() {
|
|
129
|
+
return p.length > 0 ? p[p.length - 1] : null;
|
|
130
|
+
}
|
|
131
|
+
function h(e, t) {
|
|
132
|
+
p.push(e);
|
|
133
|
+
try {
|
|
134
|
+
return t();
|
|
135
|
+
} finally {
|
|
136
|
+
p.pop();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
var g = null;
|
|
140
|
+
function se(e, t) {
|
|
141
|
+
let n = g;
|
|
142
|
+
g = e;
|
|
143
|
+
try {
|
|
144
|
+
return t();
|
|
145
|
+
} finally {
|
|
146
|
+
g = n;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function _(e, t, n, r) {
|
|
150
|
+
if (!g) throw TypeError(`vStateNode binding scope required for function value (${e}${t ? ` "${t}"` : ""})`);
|
|
151
|
+
let i = g;
|
|
152
|
+
i.bindings.push({
|
|
153
|
+
commit: r,
|
|
154
|
+
committed: !1,
|
|
155
|
+
evaluate: () => n(i.getState()),
|
|
156
|
+
key: t,
|
|
157
|
+
kind: e,
|
|
158
|
+
last: void 0
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
var ce = /* @__PURE__ */ new Set([
|
|
8
162
|
"area",
|
|
9
163
|
"base",
|
|
10
164
|
"br",
|
|
@@ -20,23 +174,23 @@ var e = /* @__PURE__ */ new Set([
|
|
|
20
174
|
"track",
|
|
21
175
|
"wbr"
|
|
22
176
|
]);
|
|
23
|
-
function
|
|
177
|
+
function le(e) {
|
|
24
178
|
return typeof e == "string" ? document.querySelector(e) : e;
|
|
25
179
|
}
|
|
26
|
-
function
|
|
180
|
+
function v(e) {
|
|
27
181
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
28
182
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
183
|
+
function y(e) {
|
|
184
|
+
return ie.has(e);
|
|
31
185
|
}
|
|
32
|
-
function
|
|
186
|
+
function ue(e, t, n) {
|
|
33
187
|
if (n == null || n === !1) {
|
|
34
188
|
if (e.removeAttribute(t), t in e) try {
|
|
35
189
|
e[t] = !1;
|
|
36
190
|
} catch {}
|
|
37
191
|
return;
|
|
38
192
|
}
|
|
39
|
-
if (n === !0 ||
|
|
193
|
+
if (n === !0 || y(t)) {
|
|
40
194
|
if (e.setAttribute(t, t), t in e) try {
|
|
41
195
|
e[t] = !0;
|
|
42
196
|
} catch {}
|
|
@@ -46,19 +200,36 @@ function a(e, t, n) {
|
|
|
46
200
|
e[t] = n;
|
|
47
201
|
} catch {}
|
|
48
202
|
}
|
|
49
|
-
function
|
|
50
|
-
return Object.entries(e).filter(([, e]) => e != null && e !== "").map(([e, t]) => `${
|
|
203
|
+
function de(e) {
|
|
204
|
+
return Object.entries(e).filter(([, e]) => e != null && e !== "").map(([e, t]) => `${fe(e)}:${v(t)}`).join("; ");
|
|
51
205
|
}
|
|
52
|
-
function
|
|
206
|
+
function fe(e) {
|
|
53
207
|
return String(e).replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
54
208
|
}
|
|
55
|
-
|
|
209
|
+
function pe(e, t) {
|
|
210
|
+
return e === t ? !0 : !e || !t || typeof e != "object" || typeof t != "object" ? !1 : !!e.capture == !!t.capture && !!e.once == !!t.once && !!e.passive == !!t.passive;
|
|
211
|
+
}
|
|
212
|
+
var b = class e {
|
|
56
213
|
constructor(e = null) {
|
|
57
|
-
this._children = [], this._events = /* @__PURE__ */ new Map(), this._cleanup = [], this._states = {}, this._stateTypes = {}, this._stateHandlers = /* @__PURE__ */ new Map(), this._pendingRemovals = /* @__PURE__ */ new Set(), this._childrenDirty = !1, this._deleted = !1, e !== null && this.setup(e);
|
|
214
|
+
this._children = [], this._childKeys = /* @__PURE__ */ new Map(), this._events = /* @__PURE__ */ new Map(), this._domAdapters = /* @__PURE__ */ new Map(), this._cleanup = [], this._states = {}, this._stateTypes = {}, this._stateHandlers = /* @__PURE__ */ new Map(), this._pendingRemovals = /* @__PURE__ */ new Set(), this._childrenDirty = !1, this._deleted = !1, this._access = null, this._accessContext = s(), u() && ne(this), e !== null && this.setup(e);
|
|
58
215
|
}
|
|
59
216
|
setup(t) {
|
|
60
217
|
return typeof t == "function" ? t(this) : t instanceof e ? this.child(t) : typeof t == "string" || typeof t == "number" ? this.text(t) : t && typeof t == "object" && this._setupObject(t), this;
|
|
61
218
|
}
|
|
219
|
+
access(e) {
|
|
220
|
+
let t = n(e);
|
|
221
|
+
return this._access = t ? {
|
|
222
|
+
code: t.code,
|
|
223
|
+
level: "write"
|
|
224
|
+
} : null, this;
|
|
225
|
+
}
|
|
226
|
+
_permissionState() {
|
|
227
|
+
let e = this._access ?? m();
|
|
228
|
+
if (!e) return "active";
|
|
229
|
+
let t = this._accessContext || s();
|
|
230
|
+
return t ? t.canRead(e.code) ? e.level === "write" && !t.canWrite(e.code) ? "readonly" : "active" : "hidden" : "active";
|
|
231
|
+
}
|
|
232
|
+
_applyAccessState(e) {}
|
|
62
233
|
_setupObject(e) {
|
|
63
234
|
e.children && this.child(e.children);
|
|
64
235
|
}
|
|
@@ -66,25 +237,79 @@ var c = class e {
|
|
|
66
237
|
return [...this._children];
|
|
67
238
|
}
|
|
68
239
|
clearChildren() {
|
|
69
|
-
|
|
240
|
+
let e = this._el && u() && !this._devtoolsRendering ? this._children.map((e) => d(e)) : [];
|
|
241
|
+
return this._dropChildKeys(this._children), this._children.forEach((e) => {
|
|
70
242
|
this._pendingRemovals.add(e);
|
|
71
|
-
}), this._children = [], this._childrenDirty = !0, this;
|
|
243
|
+
}), this._children = [], this._childrenDirty = !0, e.length > 0 && !this._devtoolsRendering && f(this, "child", { removed: e }), this;
|
|
244
|
+
}
|
|
245
|
+
addChild(e, t) {
|
|
246
|
+
let n = String(e);
|
|
247
|
+
if (this._childKeys.has(n)) throw TypeError(`duplicate key "${n}"`);
|
|
248
|
+
let r = S(t);
|
|
249
|
+
if (this._childKeys.set(n, r), typeof r.attr == "function" && r.attr("data-row-key", n), this._pendingRemovals.delete(r), this._children.push(r), this._childrenDirty = !0, this._el) {
|
|
250
|
+
let e = h(this._access ?? m(), () => r.renderDom());
|
|
251
|
+
e && e.parentNode !== this._el && this._el.appendChild(e), u() && !this._devtoolsRendering && f(this, "child", { added: [d(r)] });
|
|
252
|
+
}
|
|
253
|
+
return this;
|
|
254
|
+
}
|
|
255
|
+
getChild(e) {
|
|
256
|
+
return this._childKeys.get(String(e)) || null;
|
|
257
|
+
}
|
|
258
|
+
removeChild(e) {
|
|
259
|
+
let t = String(e), n = this._childKeys.get(t);
|
|
260
|
+
if (!n) return this;
|
|
261
|
+
this._childKeys.delete(t);
|
|
262
|
+
let r = this._children.indexOf(n);
|
|
263
|
+
r !== -1 && this._children.splice(r, 1), this._childrenDirty = !0;
|
|
264
|
+
let i = this._el && u() && !this._devtoolsRendering ? d(n) : null;
|
|
265
|
+
return n.destroy(), i !== null && f(this, "child", { removed: [i] }), this;
|
|
266
|
+
}
|
|
267
|
+
_dropChildKeys(e) {
|
|
268
|
+
let t = new Set(e);
|
|
269
|
+
this._childKeys.forEach((e, n) => {
|
|
270
|
+
t.has(e) && this._childKeys.delete(n);
|
|
271
|
+
});
|
|
72
272
|
}
|
|
73
273
|
child(...e) {
|
|
74
274
|
return e.flat(Infinity).forEach((e) => {
|
|
75
275
|
if (e == null) return;
|
|
76
|
-
let t =
|
|
276
|
+
let t = S(e);
|
|
77
277
|
this._pendingRemovals.delete(t), this._children.push(t), this._childrenDirty = !0;
|
|
78
278
|
}), this;
|
|
79
279
|
}
|
|
80
280
|
text(e) {
|
|
81
|
-
return this.child(new
|
|
281
|
+
return this.child(new x(e));
|
|
82
282
|
}
|
|
83
283
|
on(e, t, n) {
|
|
84
|
-
|
|
284
|
+
if (typeof t != "function") throw TypeError("ViewNode event handler must be a function");
|
|
285
|
+
let r = this._events.get(e);
|
|
286
|
+
return this._events.set(e, {
|
|
85
287
|
handler: t,
|
|
86
288
|
options: n
|
|
87
|
-
}), this._el &&
|
|
289
|
+
}), this._el && this._bindDomAdapter(e, r?.options, n), this;
|
|
290
|
+
}
|
|
291
|
+
off(e) {
|
|
292
|
+
this._events.delete(e);
|
|
293
|
+
let t = this._domAdapters.get(e);
|
|
294
|
+
return t && (t.cleanup(), this._removeCleanup(t.cleanup), this._domAdapters.delete(e)), this;
|
|
295
|
+
}
|
|
296
|
+
_bindDomAdapter(e, t, n) {
|
|
297
|
+
let r = this._domAdapters.get(e);
|
|
298
|
+
if (r) {
|
|
299
|
+
if (pe(t, n)) return;
|
|
300
|
+
r.cleanup(), this._removeCleanup(r.cleanup), this._domAdapters.delete(e);
|
|
301
|
+
}
|
|
302
|
+
let i = (t) => {
|
|
303
|
+
let n = this._events.get(e);
|
|
304
|
+
!n || typeof n.handler != "function" || (n.handler.call(this, t), n.options?.once && this.off(e));
|
|
305
|
+
}, a = () => {
|
|
306
|
+
this._el && this._el.removeEventListener(e, i, n);
|
|
307
|
+
};
|
|
308
|
+
this._el.addEventListener(e, i, n), this._domAdapters.set(e, { cleanup: a }), this._cleanup.push(a);
|
|
309
|
+
}
|
|
310
|
+
_removeCleanup(e) {
|
|
311
|
+
let t = this._cleanup.indexOf(e);
|
|
312
|
+
t !== -1 && this._cleanup.splice(t, 1);
|
|
88
313
|
}
|
|
89
314
|
registerStateAttrs(...e) {
|
|
90
315
|
return e.forEach((e) => {
|
|
@@ -127,11 +352,14 @@ var c = class e {
|
|
|
127
352
|
this._pendingRemovals.forEach((e) => e.destroy()), this._pendingRemovals.clear(), this._childrenDirty = !1;
|
|
128
353
|
}
|
|
129
354
|
bindTo(e) {
|
|
130
|
-
let t =
|
|
131
|
-
return t &&
|
|
355
|
+
let t = le(e), n = this.renderDom();
|
|
356
|
+
return t && n && t.appendChild(n), this;
|
|
132
357
|
}
|
|
133
358
|
destroy() {
|
|
134
|
-
return
|
|
359
|
+
return u() && (ee({
|
|
360
|
+
type: "destroy",
|
|
361
|
+
node: this
|
|
362
|
+
}), te(this)), this._deleted = !0, this._cleanup.forEach((e) => e()), this._cleanup = [], this._children.forEach((e) => e.destroy()), this._pendingRemovals.forEach((e) => e.destroy()), this._pendingRemovals.clear(), this._children = [], this._childKeys.clear(), this._el?.parentNode && this._el.parentNode.removeChild(this._el), this;
|
|
135
363
|
}
|
|
136
364
|
toHTML() {
|
|
137
365
|
return "";
|
|
@@ -139,58 +367,110 @@ var c = class e {
|
|
|
139
367
|
hydrateSnapshot() {
|
|
140
368
|
return this;
|
|
141
369
|
}
|
|
142
|
-
},
|
|
370
|
+
}, x = class extends b {
|
|
143
371
|
constructor(e = "") {
|
|
144
|
-
super(null), this._content =
|
|
372
|
+
if (super(null), this._content = "", this._textNode = null, typeof e == "function") {
|
|
373
|
+
_("text", null, e, (e) => this.textContent(e));
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
this._content = String(e);
|
|
145
377
|
}
|
|
146
378
|
textContent(e) {
|
|
147
|
-
|
|
379
|
+
if (e === void 0) return this._content;
|
|
380
|
+
if (typeof e == "function") return _("text", null, e, (e) => this.textContent(e)), this;
|
|
381
|
+
let t = this._content;
|
|
382
|
+
return this._content = String(e), this._textNode && (this._textNode.textContent = this._content), this._textNode && u() && !Object.is(t, this._content) && f(this, "text", {
|
|
383
|
+
from: t,
|
|
384
|
+
to: this._content
|
|
385
|
+
}), this;
|
|
148
386
|
}
|
|
149
387
|
renderDom() {
|
|
150
|
-
return this._deleted ? null : (this._textNode || (this._textNode = document.createTextNode(this._content), this._el = this._textNode), this._textNode);
|
|
388
|
+
return this._deleted || this._permissionState() === "hidden" ? null : (this._textNode || (this._textNode = document.createTextNode(this._content), this._el = this._textNode), this._textNode);
|
|
151
389
|
}
|
|
152
390
|
toHTML() {
|
|
153
|
-
return this._deleted ? "" :
|
|
391
|
+
return this._deleted || this._permissionState() === "hidden" ? "" : v(this._content);
|
|
154
392
|
}
|
|
155
|
-
},
|
|
393
|
+
}, me = class extends b {
|
|
156
394
|
constructor(e) {
|
|
157
|
-
super(null), this._component = e, this._resolved = null;
|
|
395
|
+
super(null), this._component = e, this._resolved = null, this._resolvedList = null, this._roots = null, this._fragmentDom = null;
|
|
158
396
|
}
|
|
159
397
|
_resolve() {
|
|
160
|
-
if (this.
|
|
161
|
-
let e = typeof this._component == "function" ? this._component() : this._component.render();
|
|
162
|
-
|
|
163
|
-
|
|
398
|
+
if (this._resolvedList) return this._resolved;
|
|
399
|
+
let e = a(this._accessContext || s(), () => typeof this._component == "function" ? this._component() : this._component.render()), t = Array.isArray(e) ? e.slice() : [e];
|
|
400
|
+
return t.forEach((e) => {
|
|
401
|
+
if (!(e instanceof b)) throw TypeError("Component render must return a ViewNode or an array of ViewNodes");
|
|
402
|
+
}), this._resolvedList = t, this._resolved = t[0] || null, this._roots = Array.isArray(e) ? t : null, this._component && typeof this._component == "object" && typeof this._component._attachHost == "function" && this._component._attachHost(this), this._resolved;
|
|
403
|
+
}
|
|
404
|
+
_resolveList() {
|
|
405
|
+
return this._resolve(), this._resolvedList || [];
|
|
406
|
+
}
|
|
407
|
+
_replaceResolved(e) {
|
|
408
|
+
let t = this._resolvedList || [], n = Array.isArray(e) ? e.slice() : [e];
|
|
409
|
+
if (n.forEach((e) => {
|
|
410
|
+
if (!(e instanceof b)) throw TypeError("Component render must return a ViewNode or an array of ViewNodes");
|
|
411
|
+
}), t.length === n.length && t.every((e, t) => e === n[t])) return;
|
|
412
|
+
let r = [];
|
|
413
|
+
if (this._fragmentDom && this._fragmentDom.length > 0) r.push(...this._fragmentDom);
|
|
414
|
+
else if (t.length > 0) {
|
|
415
|
+
let e = t[0]._el;
|
|
416
|
+
e && e.parentNode && r.push(e);
|
|
417
|
+
}
|
|
418
|
+
if (this._resolvedList = n, this._resolved = n[0] || null, this._roots = Array.isArray(e) ? n : null, this._fragmentDom = null, r.length === 0) {
|
|
419
|
+
t.forEach((e) => e.destroy());
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
let i = m(), a = r[0].parentNode, o = [];
|
|
423
|
+
n.forEach((e) => {
|
|
424
|
+
let t = h(this._access ?? i, () => e.renderDom());
|
|
425
|
+
t && o.push(t);
|
|
426
|
+
}), o.length > 0 && a && o.forEach((e) => a.insertBefore(e, r[0])), r.forEach((e) => {
|
|
427
|
+
e.parentNode === a && a.removeChild(e);
|
|
428
|
+
}), this._roots ? this._fragmentDom = o : this._el = o[0] || null, t.forEach((e) => e.destroy());
|
|
164
429
|
}
|
|
165
430
|
children() {
|
|
166
|
-
return this.
|
|
431
|
+
return this._resolvedList ? this._roots ? this._resolvedList.flatMap((e) => e.children()) : this._resolvedList[0] ? this._resolvedList[0].children() : [] : [];
|
|
167
432
|
}
|
|
168
433
|
textContent() {
|
|
169
|
-
|
|
170
|
-
return typeof e.textContent == "function" ? e.textContent() : "";
|
|
434
|
+
return this._resolveList().map((e) => typeof e.textContent == "function" ? e.textContent() : "").join("");
|
|
171
435
|
}
|
|
172
436
|
renderDom() {
|
|
173
|
-
if (this._deleted) return null;
|
|
174
|
-
let e =
|
|
175
|
-
|
|
437
|
+
if (this._deleted || this._permissionState() === "hidden") return null;
|
|
438
|
+
let e = m(), t = this._resolveList();
|
|
439
|
+
if (this._roots) {
|
|
440
|
+
if (this._fragmentDom) return null;
|
|
441
|
+
let n = [];
|
|
442
|
+
t.forEach((t) => {
|
|
443
|
+
let r = h(this._access ?? e, () => t.renderDom());
|
|
444
|
+
r && n.push(r);
|
|
445
|
+
}), this._fragmentDom = n;
|
|
446
|
+
let r = document.createDocumentFragment();
|
|
447
|
+
return n.forEach((e) => r.appendChild(e)), r;
|
|
448
|
+
}
|
|
449
|
+
let n = t[0];
|
|
450
|
+
return h(this._access ?? e, () => {
|
|
451
|
+
let e = n.renderDom();
|
|
452
|
+
return this._el = e, e;
|
|
453
|
+
});
|
|
176
454
|
}
|
|
177
455
|
toHTML() {
|
|
178
|
-
|
|
456
|
+
if (this._deleted || this._permissionState() === "hidden") return "";
|
|
457
|
+
let e = m(), t = this._resolveList();
|
|
458
|
+
return h(this._access ?? e, () => t.map((e) => e.toHTML()).join(""));
|
|
179
459
|
}
|
|
180
460
|
destroy() {
|
|
181
|
-
return this.
|
|
461
|
+
return this._component && typeof this._component == "object" && typeof this._component.destroy == "function" && this._component.destroy(), (this._resolvedList || []).forEach((e) => e.destroy()), this._fragmentDom = null, super.destroy();
|
|
182
462
|
}
|
|
183
463
|
};
|
|
184
|
-
function
|
|
185
|
-
return new
|
|
464
|
+
function he(e = "") {
|
|
465
|
+
return new x(e);
|
|
186
466
|
}
|
|
187
|
-
function
|
|
188
|
-
if (e instanceof
|
|
189
|
-
if (typeof e == "function" || e && typeof e == "object" && typeof e.render == "function") return new
|
|
190
|
-
if (typeof e == "string" || typeof e == "number") return new
|
|
467
|
+
function S(e) {
|
|
468
|
+
if (e instanceof b) return e;
|
|
469
|
+
if (typeof e == "function" || e && typeof e == "object" && typeof e.render == "function") return new me(e);
|
|
470
|
+
if (typeof e == "string" || typeof e == "number") return new x(e);
|
|
191
471
|
throw TypeError("ViewNode child must be a ViewNode, component, string, or number");
|
|
192
472
|
}
|
|
193
|
-
function
|
|
473
|
+
function ge(e = null, t = null, n = null) {
|
|
194
474
|
return typeof t == "function" && n == null ? {
|
|
195
475
|
first: e,
|
|
196
476
|
options: null,
|
|
@@ -201,10 +481,10 @@ function d(e = null, t = null, n = null) {
|
|
|
201
481
|
callback: n
|
|
202
482
|
};
|
|
203
483
|
}
|
|
204
|
-
function
|
|
484
|
+
function _e(e, t) {
|
|
205
485
|
return !t || typeof t != "object" || Array.isArray(t) ? e : (t.attrs && typeof e.attr == "function" && e.attr(t.attrs), t.style && typeof e.styles == "function" && e.styles(t.style), e);
|
|
206
486
|
}
|
|
207
|
-
var
|
|
487
|
+
var C = class extends b {
|
|
208
488
|
constructor(e, t = null) {
|
|
209
489
|
super(null), this._tagName = e, this._attrs = {}, this._styles = {}, this._classes = /* @__PURE__ */ new Set(), this._el = null, t !== null && this.setup(t);
|
|
210
490
|
}
|
|
@@ -244,7 +524,15 @@ var p = class extends c {
|
|
|
244
524
|
return this._children.map((e) => typeof e.textContent == "function" ? e.textContent() : "").join("");
|
|
245
525
|
}
|
|
246
526
|
attr(e, t) {
|
|
247
|
-
|
|
527
|
+
if (t === void 0 && typeof e == "string") return this._attrs[e];
|
|
528
|
+
if (e && typeof e == "object") return Object.entries(e).forEach(([e, t]) => this.attr(e, t)), this;
|
|
529
|
+
if (typeof t == "function") return _("attr", e, t, (t) => this.attr(e, t)), this;
|
|
530
|
+
let n = this._attrs[e];
|
|
531
|
+
return t == null || t === !1 ? delete this._attrs[e] : this._attrs[e] = t, this._el && ue(this._el, e, t), this._el && u() && !this._devtoolsRendering && !Object.is(n, t) && f(this, "attr", {
|
|
532
|
+
name: e,
|
|
533
|
+
previous: n,
|
|
534
|
+
next: t
|
|
535
|
+
}), this;
|
|
248
536
|
}
|
|
249
537
|
id(e) {
|
|
250
538
|
return e === void 0 ? this.attr("id") : this.attr("id", e);
|
|
@@ -264,39 +552,69 @@ var p = class extends c {
|
|
|
264
552
|
return !e || !t || e === t ? this : this._classes.has(e) ? (this._classes.delete(e), this.className(t)) : n ? this.className(t) : this;
|
|
265
553
|
}
|
|
266
554
|
style(e, t) {
|
|
267
|
-
|
|
555
|
+
if (t === void 0 && typeof e == "string") return this._styles[e];
|
|
556
|
+
if (e && typeof e == "object") return this.styles(e);
|
|
557
|
+
if (typeof t == "function") return _("style", e, t, (t) => this.style(e, t)), this;
|
|
558
|
+
let n = this._styles[e];
|
|
559
|
+
return t == null || t === "" ? delete this._styles[e] : this._styles[e] = t, this._el && (this._el.style[e] = t || ""), this._el && u() && !this._devtoolsRendering && !Object.is(n, t) && f(this, "style", {
|
|
560
|
+
name: e,
|
|
561
|
+
previous: n,
|
|
562
|
+
next: t
|
|
563
|
+
}), this;
|
|
268
564
|
}
|
|
269
565
|
styles(e) {
|
|
270
566
|
return Object.entries(e || {}).forEach(([e, t]) => this.style(e, t)), this;
|
|
271
567
|
}
|
|
272
568
|
child(...e) {
|
|
569
|
+
let t = this._el && u() && !this._devtoolsRendering ? [] : null;
|
|
273
570
|
return e.flat(Infinity).forEach((e) => {
|
|
274
571
|
if (e == null) return;
|
|
275
|
-
let
|
|
276
|
-
if (this._pendingRemovals.delete(
|
|
277
|
-
let e =
|
|
278
|
-
e && e.parentNode !== this._el && this._el.appendChild(e);
|
|
572
|
+
let n = S(e);
|
|
573
|
+
if (this._pendingRemovals.delete(n), this._children.push(n), this._childrenDirty = !0, this._el) {
|
|
574
|
+
let e = h(this._access ?? m(), () => n.renderDom());
|
|
575
|
+
e && e.parentNode !== this._el && this._el.appendChild(e), t && t.push(d(n));
|
|
279
576
|
}
|
|
280
|
-
}), this;
|
|
577
|
+
}), t && t.length > 0 && f(this, "child", { added: t }), this;
|
|
578
|
+
}
|
|
579
|
+
_applyAccessState(e) {
|
|
580
|
+
if (e === "readonly") {
|
|
581
|
+
this._accessAttrsApplied = !0;
|
|
582
|
+
let e = this._tagName;
|
|
583
|
+
ae.has(e) && this.attr("disabled", !0), oe.has(e) && this.attr("readonly", !0), this.attr("aria-disabled", "true");
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
this._accessAttrsApplied && (this._accessAttrsApplied = !1, this.attr("disabled", null), this.attr("readonly", null), this.attr("aria-disabled", null));
|
|
281
587
|
}
|
|
282
588
|
renderDom() {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
589
|
+
if (this._deleted) return null;
|
|
590
|
+
let e = this._permissionState();
|
|
591
|
+
if (e === "hidden") return null;
|
|
592
|
+
let t = this._access ?? m();
|
|
593
|
+
u() && (this._devtoolsRendering = !0);
|
|
594
|
+
try {
|
|
595
|
+
return this._el || (this._el = document.createElement(this._tagName), h(t, () => this._applySnapshotToElement())), this._applyAccessState(e), this._commitChildren(), this._children.forEach((e) => {
|
|
596
|
+
h(t, () => {
|
|
597
|
+
let t = e.renderDom();
|
|
598
|
+
t && t.parentNode !== this._el ? this._el.appendChild(t) : !t && e._el && e._el.parentNode === this._el && this._el.removeChild(e._el);
|
|
599
|
+
});
|
|
600
|
+
}), u() && re(this), this._el;
|
|
601
|
+
} finally {
|
|
602
|
+
this._devtoolsRendering = !1;
|
|
603
|
+
}
|
|
287
604
|
}
|
|
288
605
|
toHTML() {
|
|
289
606
|
if (this._deleted) return "";
|
|
290
|
-
let e = this.
|
|
291
|
-
return
|
|
607
|
+
let e = this._permissionState();
|
|
608
|
+
return e === "hidden" ? "" : (this._applyAccessState(e), h(this._access ?? m(), () => {
|
|
609
|
+
let e = this._serializeAttributes(), t = e ? `<${this._tagName} ${e}>` : `<${this._tagName}>`;
|
|
610
|
+
return ce.has(this._tagName) ? t : `${t}${this._children.map((e) => e.toHTML()).join("")}</${this._tagName}>`;
|
|
611
|
+
}));
|
|
292
612
|
}
|
|
293
613
|
_applyBindingsToElement() {
|
|
294
|
-
Object.entries(this._attrs).forEach(([e, t]) =>
|
|
614
|
+
Object.entries(this._attrs).forEach(([e, t]) => ue(this._el, e, t)), this._syncClassName(), Object.entries(this._styles).forEach(([e, t]) => {
|
|
295
615
|
this._el.style[e] = t;
|
|
296
616
|
}), this._events.forEach((e, t) => {
|
|
297
|
-
|
|
298
|
-
this._el.addEventListener(t, e, n), this._cleanup.push(() => this._el.removeEventListener(t, e, n));
|
|
299
|
-
});
|
|
617
|
+
this._bindDomAdapter(t, void 0, e.options);
|
|
300
618
|
});
|
|
301
619
|
}
|
|
302
620
|
_applySnapshotToElement() {
|
|
@@ -306,24 +624,28 @@ var p = class extends c {
|
|
|
306
624
|
});
|
|
307
625
|
}
|
|
308
626
|
_syncClassName() {
|
|
309
|
-
let e = [...this._classes].join(" ");
|
|
310
|
-
|
|
627
|
+
let e = this._attrs.class, t = [...this._classes].join(" ");
|
|
628
|
+
t ? this._attrs.class = t : delete this._attrs.class, this._el && (t ? this._el.className = t : this._el.removeAttribute("class"), u() && !this._devtoolsRendering && !Object.is(e, t) && f(this, "attr", {
|
|
629
|
+
name: "class",
|
|
630
|
+
previous: e,
|
|
631
|
+
next: t || void 0
|
|
632
|
+
}));
|
|
311
633
|
}
|
|
312
634
|
_serializeAttributes() {
|
|
313
635
|
let e = { ...this._attrs }, t = this._serializeStyles();
|
|
314
|
-
return t && (e.style = e.style ? `${e.style}; ${t}` : t), Object.entries(e).filter(([, e]) => e != null && e !== !1).map(([e, t]) => t === !0 ||
|
|
636
|
+
return t && (e.style = e.style ? `${e.style}; ${t}` : t), Object.entries(e).filter(([, e]) => e != null && e !== !1).map(([e, t]) => t === !0 || y(e) ? `${e}="${e}"` : `${e}="${v(t)}"`).join(" ");
|
|
315
637
|
}
|
|
316
638
|
_serializeStyles() {
|
|
317
|
-
return
|
|
639
|
+
return de(this._styles);
|
|
318
640
|
}
|
|
319
641
|
};
|
|
320
|
-
function
|
|
642
|
+
function ve(e, t = C) {
|
|
321
643
|
return function(n = null, r = null, i = null) {
|
|
322
|
-
let a =
|
|
323
|
-
return
|
|
644
|
+
let a = ge(n, r, i), o = new t(e, a.first);
|
|
645
|
+
return _e(o, a.options), typeof a.callback == "function" && a.callback(o), o;
|
|
324
646
|
};
|
|
325
647
|
}
|
|
326
|
-
function
|
|
648
|
+
function w(e, t, n = {}) {
|
|
327
649
|
let { override: r = !1 } = n;
|
|
328
650
|
Object.entries(t).forEach(([t, n]) => {
|
|
329
651
|
!r && e.prototype[t] || (e.prototype[t] = function(...e) {
|
|
@@ -333,12 +655,12 @@ function h(e, t, n = {}) {
|
|
|
333
655
|
}
|
|
334
656
|
//#endregion
|
|
335
657
|
//#region src/core/client-only.js
|
|
336
|
-
var
|
|
658
|
+
var ye = class extends b {
|
|
337
659
|
constructor(e) {
|
|
338
660
|
super(null), this._loader = e, this._resolved = null;
|
|
339
661
|
}
|
|
340
662
|
_resolve() {
|
|
341
|
-
return this._resolved ||=
|
|
663
|
+
return this._resolved ||= T(this._loader), this._resolved;
|
|
342
664
|
}
|
|
343
665
|
toHTML() {
|
|
344
666
|
return this._deleted ? "" : "<div class=\"yoya-client-only\" data-client-only=\"true\"></div>";
|
|
@@ -358,31 +680,31 @@ var g = class extends c {
|
|
|
358
680
|
return this._resolved && this._resolved.destroy(), super.destroy();
|
|
359
681
|
}
|
|
360
682
|
};
|
|
361
|
-
function
|
|
362
|
-
return new
|
|
683
|
+
function be(e) {
|
|
684
|
+
return new ye(e);
|
|
363
685
|
}
|
|
364
|
-
function
|
|
365
|
-
if (e instanceof
|
|
366
|
-
if (typeof e == "function") return
|
|
367
|
-
if (e && typeof e.render == "function") return
|
|
686
|
+
function T(e) {
|
|
687
|
+
if (e instanceof b) return e;
|
|
688
|
+
if (typeof e == "function") return T(e());
|
|
689
|
+
if (e && typeof e.render == "function") return T(e.render());
|
|
368
690
|
throw TypeError("vClientOnly loader must return a ViewNode or a component object");
|
|
369
691
|
}
|
|
370
692
|
//#endregion
|
|
371
693
|
//#region src/core/document-events.js
|
|
372
|
-
function
|
|
694
|
+
function xe(e, t, n = void 0) {
|
|
373
695
|
return typeof document > "u" ? () => {} : (document.addEventListener(e, t, n), () => {
|
|
374
696
|
document.removeEventListener(e, t, n);
|
|
375
697
|
});
|
|
376
698
|
}
|
|
377
|
-
function
|
|
699
|
+
function Se(e, t, n = void 0) {
|
|
378
700
|
typeof document > "u" || document.removeEventListener(e, t, n);
|
|
379
701
|
}
|
|
380
|
-
function
|
|
702
|
+
function Ce(e, t, n = void 0) {
|
|
381
703
|
return typeof window > "u" ? () => {} : (window.addEventListener(e, t, n), () => {
|
|
382
704
|
window.removeEventListener(e, t, n);
|
|
383
705
|
});
|
|
384
706
|
}
|
|
385
|
-
function
|
|
707
|
+
function we(e, t = null) {
|
|
386
708
|
if (typeof document > "u") return null;
|
|
387
709
|
if (t) {
|
|
388
710
|
let e = document.querySelector(`[${t}]`);
|
|
@@ -393,10 +715,10 @@ function oe(e, t = null) {
|
|
|
393
715
|
}
|
|
394
716
|
//#endregion
|
|
395
717
|
//#region src/core/i18n.js
|
|
396
|
-
var
|
|
718
|
+
var Te = "yoya-ui:i18n", E = /* @__PURE__ */ new Map(), Ee = class {
|
|
397
719
|
constructor(e = {}) {
|
|
398
720
|
let t = e.language || "zh-CN";
|
|
399
|
-
this._key = e.key || null, this._storage =
|
|
721
|
+
this._key = e.key || null, this._storage = Ge(e.storage), this._storageKey = e.storageKey || null, this._sharedStorageKey = this._key ? Te : null, this._fallbackLanguage = e.fallbackLanguage || t, this._language = this._readStoredLanguage(t), this._messages = {}, this._listeners = /* @__PURE__ */ new Set(), this.registerMessages(e.messages || {}), this._key && Ne(this);
|
|
400
722
|
}
|
|
401
723
|
key() {
|
|
402
724
|
return this._key;
|
|
@@ -416,21 +738,31 @@ var v = "yoya-ui:i18n", y = /* @__PURE__ */ new Map(), b = class {
|
|
|
416
738
|
clearPersistedLanguage() {
|
|
417
739
|
if (!this._storageKey) {
|
|
418
740
|
if (!this._sharedStorageKey) return this;
|
|
419
|
-
let e =
|
|
420
|
-
return delete e[this._key],
|
|
741
|
+
let e = A(this._storage, this._sharedStorageKey);
|
|
742
|
+
return delete e[this._key], j(this._storage, this._sharedStorageKey, e), this;
|
|
421
743
|
}
|
|
422
744
|
try {
|
|
423
745
|
this._storage.removeItem(this._storageKey);
|
|
424
746
|
} catch {}
|
|
425
747
|
return this;
|
|
426
748
|
}
|
|
749
|
+
registerLocale(e, t) {
|
|
750
|
+
if (!e || typeof t != "function") return Promise.reject(/* @__PURE__ */ TypeError("registerLocale requires a language name and a loader"));
|
|
751
|
+
let n;
|
|
752
|
+
try {
|
|
753
|
+
n = t();
|
|
754
|
+
} catch (e) {
|
|
755
|
+
return Promise.reject(e);
|
|
756
|
+
}
|
|
757
|
+
return Promise.resolve(n).then((t) => (this.register(e, t || {}), this));
|
|
758
|
+
}
|
|
427
759
|
register(e, t = {}) {
|
|
428
|
-
return e ? (
|
|
429
|
-
this._messages[e] =
|
|
760
|
+
return e ? (R(t).forEach((t) => {
|
|
761
|
+
this._messages[e] = F(this._messages[e] || {}, t);
|
|
430
762
|
}), this._notify(), this) : this;
|
|
431
763
|
}
|
|
432
764
|
registerMessages(e = {}) {
|
|
433
|
-
return
|
|
765
|
+
return L(e).forEach((e) => {
|
|
434
766
|
if (e.language) {
|
|
435
767
|
this.register(e.language, e.messages || {});
|
|
436
768
|
return;
|
|
@@ -441,11 +773,11 @@ var v = "yoya-ui:i18n", y = /* @__PURE__ */ new Map(), b = class {
|
|
|
441
773
|
}), this;
|
|
442
774
|
}
|
|
443
775
|
t(e, t = {}, n = void 0) {
|
|
444
|
-
let r =
|
|
445
|
-
return
|
|
776
|
+
let r = M(this._messages[this._language], e) ?? M(this._messages[this._fallbackLanguage], e) ?? n ?? e;
|
|
777
|
+
return N(typeof r == "function" ? r(t, this) : r, t, this);
|
|
446
778
|
}
|
|
447
779
|
text(e, t = {}, n = void 0) {
|
|
448
|
-
return new
|
|
780
|
+
return new De(this, e, t, n);
|
|
449
781
|
}
|
|
450
782
|
subscribe(e) {
|
|
451
783
|
return this._listeners.add(e), () => {
|
|
@@ -458,7 +790,7 @@ var v = "yoya-ui:i18n", y = /* @__PURE__ */ new Map(), b = class {
|
|
|
458
790
|
} catch {
|
|
459
791
|
return e;
|
|
460
792
|
}
|
|
461
|
-
return this._sharedStorageKey &&
|
|
793
|
+
return this._sharedStorageKey && A(this._storage, this._sharedStorageKey)[this._key] || e;
|
|
462
794
|
}
|
|
463
795
|
_persistLanguage() {
|
|
464
796
|
if (this._storageKey) {
|
|
@@ -468,14 +800,14 @@ var v = "yoya-ui:i18n", y = /* @__PURE__ */ new Map(), b = class {
|
|
|
468
800
|
return;
|
|
469
801
|
}
|
|
470
802
|
if (this._sharedStorageKey) {
|
|
471
|
-
let e =
|
|
472
|
-
e[this._key] = this._language,
|
|
803
|
+
let e = A(this._storage, this._sharedStorageKey);
|
|
804
|
+
e[this._key] = this._language, j(this._storage, this._sharedStorageKey, e);
|
|
473
805
|
}
|
|
474
806
|
}
|
|
475
807
|
_notify() {
|
|
476
808
|
this._listeners.forEach((e) => e(this));
|
|
477
809
|
}
|
|
478
|
-
},
|
|
810
|
+
}, De = class extends x {
|
|
479
811
|
constructor(e, t, n = {}, r = void 0) {
|
|
480
812
|
super(e.t(t, n, r)), this._i18n = e, this._key = t, this._params = n || {}, this._defaultValue = r, this._unsubscribe = e.subscribe(() => this.refresh());
|
|
481
813
|
}
|
|
@@ -495,16 +827,16 @@ var v = "yoya-ui:i18n", y = /* @__PURE__ */ new Map(), b = class {
|
|
|
495
827
|
return this._unsubscribe &&= (this._unsubscribe(), null), super.destroy();
|
|
496
828
|
}
|
|
497
829
|
};
|
|
498
|
-
function
|
|
499
|
-
return new
|
|
830
|
+
function Oe(e = {}) {
|
|
831
|
+
return new Ee(e);
|
|
500
832
|
}
|
|
501
|
-
var
|
|
502
|
-
function
|
|
503
|
-
return
|
|
833
|
+
var D = Oe();
|
|
834
|
+
function ke(e, t = {}) {
|
|
835
|
+
return D.text(e, t);
|
|
504
836
|
}
|
|
505
|
-
var
|
|
506
|
-
function
|
|
507
|
-
return
|
|
837
|
+
var O = D;
|
|
838
|
+
function Ae(e = D) {
|
|
839
|
+
return O = e, String.prototype._yoyaUiStringShortcutInstalled ? e : (Object.defineProperty(String.prototype, "_yoyaUiStringShortcutInstalled", {
|
|
508
840
|
configurable: !0,
|
|
509
841
|
enumerable: !1,
|
|
510
842
|
value: !0
|
|
@@ -512,43 +844,43 @@ function T(e = C) {
|
|
|
512
844
|
configurable: !0,
|
|
513
845
|
enumerable: !1,
|
|
514
846
|
value: function(e, t, n) {
|
|
515
|
-
let r = String(this), i = {}, a =
|
|
516
|
-
return
|
|
847
|
+
let r = String(this), i = {}, a = O;
|
|
848
|
+
return Me(t) ? a = t : typeof t == "string" ? a = k(t) || O : (i = t || {}, Me(n) ? a = n : typeof n == "string" && (a = k(n) || O)), a.text(e || r, i, r);
|
|
517
849
|
}
|
|
518
850
|
}), e);
|
|
519
851
|
}
|
|
520
|
-
function
|
|
521
|
-
let n =
|
|
522
|
-
|
|
852
|
+
function je(e, t) {
|
|
853
|
+
let n = O;
|
|
854
|
+
O = e || n;
|
|
523
855
|
try {
|
|
524
856
|
return t();
|
|
525
857
|
} finally {
|
|
526
|
-
|
|
858
|
+
O = n;
|
|
527
859
|
}
|
|
528
860
|
}
|
|
529
|
-
function
|
|
861
|
+
function Me(e) {
|
|
530
862
|
return !!(e && typeof e.text == "function");
|
|
531
863
|
}
|
|
532
|
-
function
|
|
864
|
+
function Ne(e) {
|
|
533
865
|
let t = e?.key?.();
|
|
534
|
-
return t ? (
|
|
535
|
-
|
|
866
|
+
return t ? (E.set(t, e), () => {
|
|
867
|
+
E.get(t) === e && E.delete(t);
|
|
536
868
|
}) : () => {};
|
|
537
869
|
}
|
|
538
|
-
function
|
|
870
|
+
function Pe(e) {
|
|
539
871
|
let t = typeof e == "string" ? e : e?.key?.();
|
|
540
|
-
return t &&
|
|
872
|
+
return t && E.delete(t), t;
|
|
541
873
|
}
|
|
542
|
-
function
|
|
543
|
-
return e &&
|
|
874
|
+
function k(e) {
|
|
875
|
+
return e && E.get(e) || null;
|
|
544
876
|
}
|
|
545
|
-
function
|
|
546
|
-
return new Map(
|
|
877
|
+
function Fe() {
|
|
878
|
+
return new Map(E);
|
|
547
879
|
}
|
|
548
|
-
function
|
|
549
|
-
return
|
|
880
|
+
function Ie(e) {
|
|
881
|
+
return A(e || Ge(), Te);
|
|
550
882
|
}
|
|
551
|
-
function
|
|
883
|
+
function A(e, t) {
|
|
552
884
|
if (!e) return {};
|
|
553
885
|
try {
|
|
554
886
|
let n = e.getItem(t);
|
|
@@ -559,97 +891,242 @@ function k(e, t) {
|
|
|
559
891
|
return {};
|
|
560
892
|
}
|
|
561
893
|
}
|
|
562
|
-
function
|
|
894
|
+
function j(e, t, n) {
|
|
563
895
|
if (e) try {
|
|
564
896
|
e.setItem(t, JSON.stringify(n));
|
|
565
897
|
} catch {}
|
|
566
898
|
}
|
|
567
|
-
|
|
568
|
-
function
|
|
899
|
+
Ae(D);
|
|
900
|
+
function M(e, t) {
|
|
569
901
|
if (!(!e || !t)) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : String(t).split(".").reduce((e, t) => {
|
|
570
902
|
if (e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
571
903
|
}, e);
|
|
572
904
|
}
|
|
573
|
-
function
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
905
|
+
function N(e, t, n) {
|
|
906
|
+
let r = String(e), i = [], a = 0;
|
|
907
|
+
for (; a < r.length;) {
|
|
908
|
+
let e = r.charAt(a);
|
|
909
|
+
if (e === "{") {
|
|
910
|
+
let e = Le(r, a), o = r.slice(a + 1, e).trim();
|
|
911
|
+
i.push(Re(o, t, n, r.slice(a, e + 1))), a = e + 1;
|
|
912
|
+
} else i.push(e), a += 1;
|
|
913
|
+
}
|
|
914
|
+
return i.join("");
|
|
915
|
+
}
|
|
916
|
+
function Le(e, t) {
|
|
917
|
+
let n = 0;
|
|
918
|
+
for (let r = t; r < e.length; r += 1) {
|
|
919
|
+
let t = e.charAt(r);
|
|
920
|
+
if (t === "{") n += 1;
|
|
921
|
+
else if (t === "}" && (--n, n === 0)) return r;
|
|
922
|
+
}
|
|
923
|
+
return e.length - 1;
|
|
924
|
+
}
|
|
925
|
+
function Re(e, t, n, r) {
|
|
926
|
+
let i = ze(e);
|
|
927
|
+
if (i.length === 1) return P(t, i[0], r);
|
|
928
|
+
let [a, o, ...s] = i, c = P(t, a, void 0);
|
|
929
|
+
if (c == null) return r;
|
|
930
|
+
let l = n?.getLanguage?.() || "zh-CN";
|
|
931
|
+
if (/^number$/i.test(o || "")) return He(c, l);
|
|
932
|
+
if (/^date$/i.test(o || "")) return We(c, l, s[0]);
|
|
933
|
+
if (/^plural$/i.test(o || "")) {
|
|
934
|
+
let e = Ve(c, l), a = Be(i.slice(2).join(","));
|
|
935
|
+
return N(a[`=${c}`] ?? a[e] ?? a.other ?? r, t, n);
|
|
936
|
+
}
|
|
937
|
+
return r;
|
|
938
|
+
}
|
|
939
|
+
function ze(e) {
|
|
940
|
+
let t = [], n = 0, r = "";
|
|
941
|
+
for (let i of String(e)) i === "{" ? n += 1 : i === "}" && --n, i === "," && n === 0 ? (t.push(r.trim()), r = "") : r += i;
|
|
942
|
+
return r && t.push(r.trim()), t;
|
|
943
|
+
}
|
|
944
|
+
function P(e, t, n) {
|
|
945
|
+
let r = e?.[t];
|
|
946
|
+
return r === void 0 ? n : r;
|
|
947
|
+
}
|
|
948
|
+
function Be(e) {
|
|
949
|
+
let t = {}, n = /([^\s{}]+)\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g, r;
|
|
950
|
+
for (; r = n.exec(e);) t[r[1].trim()] = r[2].trim();
|
|
951
|
+
return t;
|
|
952
|
+
}
|
|
953
|
+
function Ve(e, t) {
|
|
954
|
+
let n = Number(e);
|
|
955
|
+
if (typeof Intl > "u" || typeof Intl.PluralRules != "function") return n === 1 ? "one" : "other";
|
|
956
|
+
try {
|
|
957
|
+
return new Intl.PluralRules(t).select(n);
|
|
958
|
+
} catch {
|
|
959
|
+
return n === 1 ? "one" : "other";
|
|
960
|
+
}
|
|
578
961
|
}
|
|
579
|
-
function
|
|
962
|
+
function He(e, t) {
|
|
963
|
+
if (typeof Intl > "u" || typeof Intl.NumberFormat != "function") return String(e);
|
|
964
|
+
try {
|
|
965
|
+
return new Intl.NumberFormat(t).format(e);
|
|
966
|
+
} catch {
|
|
967
|
+
return String(e);
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
var Ue = /* @__PURE__ */ new Set([
|
|
971
|
+
"full",
|
|
972
|
+
"long",
|
|
973
|
+
"medium",
|
|
974
|
+
"short"
|
|
975
|
+
]);
|
|
976
|
+
function We(e, t, n = "medium") {
|
|
977
|
+
if (typeof Intl > "u" || typeof Intl.DateTimeFormat != "function") return String(e);
|
|
978
|
+
try {
|
|
979
|
+
return new Intl.DateTimeFormat(t, { dateStyle: Ue.has(n) ? n : "medium" }).format(new Date(e));
|
|
980
|
+
} catch {
|
|
981
|
+
return String(e);
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
function F(e, t) {
|
|
580
985
|
let n = { ...e };
|
|
581
986
|
return Object.entries(t || {}).forEach(([e, t]) => {
|
|
582
|
-
|
|
987
|
+
I(t) && I(n[e]) ? n[e] = F(n[e], t) : n[e] = t;
|
|
583
988
|
}), n;
|
|
584
989
|
}
|
|
585
|
-
function
|
|
990
|
+
function I(e) {
|
|
586
991
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
587
992
|
}
|
|
588
|
-
function
|
|
589
|
-
return Array.isArray(e) ? e.flatMap((e) =>
|
|
993
|
+
function L(e) {
|
|
994
|
+
return Array.isArray(e) ? e.flatMap((e) => L(e)) : [e || {}];
|
|
590
995
|
}
|
|
591
|
-
function
|
|
592
|
-
return Array.isArray(e) ? e.flatMap((e) =>
|
|
996
|
+
function R(e) {
|
|
997
|
+
return Array.isArray(e) ? e.flatMap((e) => R(e)) : [e || {}];
|
|
593
998
|
}
|
|
594
|
-
function
|
|
999
|
+
function Ge(e) {
|
|
595
1000
|
if (e) return e;
|
|
596
1001
|
try {
|
|
597
1002
|
if (typeof globalThis < "u" && globalThis.localStorage) return globalThis.localStorage;
|
|
598
1003
|
} catch {}
|
|
599
|
-
return
|
|
1004
|
+
return Ke();
|
|
600
1005
|
}
|
|
601
|
-
var
|
|
602
|
-
function
|
|
1006
|
+
var z = /* @__PURE__ */ new Map();
|
|
1007
|
+
function Ke() {
|
|
603
1008
|
return {
|
|
604
1009
|
getItem(e) {
|
|
605
|
-
return
|
|
1010
|
+
return z.has(e) ? z.get(e) : null;
|
|
606
1011
|
},
|
|
607
1012
|
setItem(e, t) {
|
|
608
|
-
|
|
1013
|
+
z.set(e, String(t));
|
|
609
1014
|
},
|
|
610
1015
|
removeItem(e) {
|
|
611
|
-
|
|
1016
|
+
z.delete(e);
|
|
612
1017
|
}
|
|
613
1018
|
};
|
|
614
1019
|
}
|
|
615
1020
|
//#endregion
|
|
1021
|
+
//#region src/core/context.js
|
|
1022
|
+
var B = [], V = null;
|
|
1023
|
+
function qe(e, t) {
|
|
1024
|
+
if (!e || typeof e != "object") return t();
|
|
1025
|
+
B.push(e);
|
|
1026
|
+
try {
|
|
1027
|
+
return t();
|
|
1028
|
+
} finally {
|
|
1029
|
+
B.pop();
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
function Je(e) {
|
|
1033
|
+
return V = e && typeof e == "object" ? e : null, V;
|
|
1034
|
+
}
|
|
1035
|
+
function Ye() {
|
|
1036
|
+
return V = null, null;
|
|
1037
|
+
}
|
|
1038
|
+
function Xe(e, t = void 0) {
|
|
1039
|
+
for (let t = B.length - 1; t >= 0; --t) {
|
|
1040
|
+
let n = B[t];
|
|
1041
|
+
if (n && Object.prototype.hasOwnProperty.call(n, e)) return n[e];
|
|
1042
|
+
}
|
|
1043
|
+
return V && Object.prototype.hasOwnProperty.call(V, e) ? V[e] : t;
|
|
1044
|
+
}
|
|
1045
|
+
function Ze() {
|
|
1046
|
+
let e = { ...V || {} };
|
|
1047
|
+
return B.forEach((t) => Object.assign(e, t)), e;
|
|
1048
|
+
}
|
|
1049
|
+
//#endregion
|
|
1050
|
+
//#region src/core/devtools.js
|
|
1051
|
+
var Qe = !1, H = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new Map(), et = 1;
|
|
1052
|
+
function tt() {
|
|
1053
|
+
return Qe;
|
|
1054
|
+
}
|
|
1055
|
+
function nt(e) {}
|
|
1056
|
+
function rt(e) {
|
|
1057
|
+
let t = H.get(e);
|
|
1058
|
+
return t === void 0 && (t = et, et += 1, H.set(e, t)), $e.set(t, e), t;
|
|
1059
|
+
}
|
|
1060
|
+
function it(e) {
|
|
1061
|
+
let t = H.get(e);
|
|
1062
|
+
t !== void 0 && $e.delete(t);
|
|
1063
|
+
}
|
|
1064
|
+
function at(e) {
|
|
1065
|
+
let t = Ze();
|
|
1066
|
+
e._devtoolsContext = Object.keys(t).length > 0 ? t : null;
|
|
1067
|
+
}
|
|
1068
|
+
function ot(e) {
|
|
1069
|
+
return rt(e);
|
|
1070
|
+
}
|
|
1071
|
+
function st(e, t, n) {}
|
|
1072
|
+
function ct(e) {}
|
|
1073
|
+
var lt = Symbol.for("yoya.devtools.bridge");
|
|
1074
|
+
function ut() {
|
|
1075
|
+
typeof globalThis > "u" || (globalThis[lt] = {
|
|
1076
|
+
captureScope: at,
|
|
1077
|
+
commit: ct,
|
|
1078
|
+
emit: nt,
|
|
1079
|
+
enabled: () => Qe,
|
|
1080
|
+
ensureId: ot,
|
|
1081
|
+
notify: st,
|
|
1082
|
+
unregister: it
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
ut();
|
|
1086
|
+
//#endregion
|
|
616
1087
|
//#region src/core/state-node.js
|
|
617
|
-
var
|
|
1088
|
+
var dt = /* @__PURE__ */ new Set([
|
|
618
1089
|
"state",
|
|
619
1090
|
"render",
|
|
620
1091
|
"update"
|
|
621
|
-
]),
|
|
1092
|
+
]), ft = /* @__PURE__ */ new Set([
|
|
1093
|
+
"_attachHost",
|
|
622
1094
|
"destroy",
|
|
623
1095
|
"getState",
|
|
624
1096
|
"setState",
|
|
625
1097
|
"subscribe"
|
|
626
1098
|
]);
|
|
627
|
-
function
|
|
1099
|
+
function pt(e = {}) {
|
|
628
1100
|
if (typeof e.render != "function") throw TypeError("vStateNode requires a render function");
|
|
629
|
-
let t = typeof e.state == "function" ? e.state() : { ...e.state || {} }, n = /* @__PURE__ */ new Set(), r = !1, i = null, a = {
|
|
1101
|
+
let t = typeof e.state == "function" ? e.state() : { ...e.state || {} }, n = /* @__PURE__ */ new Set(), r = !1, i = null, a = null, o = [], s = {
|
|
1102
|
+
_attachHost(e) {
|
|
1103
|
+
return a = e, s;
|
|
1104
|
+
},
|
|
630
1105
|
destroy() {
|
|
631
|
-
|
|
1106
|
+
if (r) return s;
|
|
1107
|
+
if (r = !0, o = [], n.clear(), a = null, i) {
|
|
1108
|
+
let e = i;
|
|
1109
|
+
i = null, e.forEach((e) => e.destroy());
|
|
1110
|
+
}
|
|
1111
|
+
return s;
|
|
632
1112
|
},
|
|
633
1113
|
getState() {
|
|
634
|
-
return
|
|
1114
|
+
return s.state();
|
|
635
1115
|
},
|
|
636
1116
|
render() {
|
|
637
|
-
|
|
638
|
-
if (!i) {
|
|
639
|
-
i = new p("div");
|
|
640
|
-
let e = i.destroy.bind(i);
|
|
641
|
-
i.destroy = () => (n.clear(), e()), o();
|
|
642
|
-
}
|
|
643
|
-
return i;
|
|
1117
|
+
return r || i || c(), l();
|
|
644
1118
|
},
|
|
645
1119
|
setState(e) {
|
|
646
|
-
if (r || e == null) return
|
|
647
|
-
let
|
|
648
|
-
if (!
|
|
649
|
-
let
|
|
650
|
-
return Object.entries(
|
|
651
|
-
t[e] !== n && (
|
|
652
|
-
|
|
1120
|
+
if (r || e == null) return s;
|
|
1121
|
+
let a = typeof e == "function" ? e({ ...t }) : e;
|
|
1122
|
+
if (!a || typeof a != "object") return s;
|
|
1123
|
+
let o = /* @__PURE__ */ new Set(), c = tt() ? {} : null;
|
|
1124
|
+
return Object.entries(a).forEach(([e, n]) => {
|
|
1125
|
+
t[e] !== n && (c && (c[e] = {
|
|
1126
|
+
from: t[e],
|
|
1127
|
+
to: n
|
|
1128
|
+
}), t[e] = n, o.add(e));
|
|
1129
|
+
}), o.size > 0 && (i && ee(o), n.forEach((e) => e(t, s)), tt() && c && { ...t }), s;
|
|
653
1130
|
},
|
|
654
1131
|
state() {
|
|
655
1132
|
return { ...t };
|
|
@@ -659,91 +1136,173 @@ function R(e = {}) {
|
|
|
659
1136
|
return n.add(e), () => n.delete(e);
|
|
660
1137
|
}
|
|
661
1138
|
};
|
|
662
|
-
for (let t of Object.keys(e)) if (!(
|
|
663
|
-
if (
|
|
664
|
-
|
|
665
|
-
}
|
|
666
|
-
return
|
|
667
|
-
function
|
|
668
|
-
let n =
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
1139
|
+
for (let t of Object.keys(e)) if (!(dt.has(t) || typeof e[t] != "function")) {
|
|
1140
|
+
if (ft.has(t)) throw TypeError(`vStateNode config key "${t}" conflicts with the built-in API`);
|
|
1141
|
+
s[t] = e[t];
|
|
1142
|
+
}
|
|
1143
|
+
return s;
|
|
1144
|
+
function c() {
|
|
1145
|
+
let n = i || [];
|
|
1146
|
+
o = [];
|
|
1147
|
+
let r = se({
|
|
1148
|
+
bindings: o,
|
|
1149
|
+
getState: () => t
|
|
1150
|
+
}, () => e.render.call(s, t, s)), c = Array.isArray(r) ? r.slice() : [r];
|
|
1151
|
+
if (c.forEach((e) => {
|
|
1152
|
+
if (!(e instanceof b)) throw TypeError("vStateNode render must return a ViewNode or an array of ViewNodes");
|
|
1153
|
+
}), i = c, u(), a) {
|
|
1154
|
+
a._replaceResolved(l());
|
|
674
1155
|
return;
|
|
675
1156
|
}
|
|
676
|
-
|
|
1157
|
+
if (n.length > 0) {
|
|
1158
|
+
let e = n.length === 1 ? n[0] : null;
|
|
1159
|
+
if (e && e._el && e._el.parentNode && c.length === 1) {
|
|
1160
|
+
let t = c[0].renderDom();
|
|
1161
|
+
t && e._el.parentNode.replaceChild(t, e._el);
|
|
1162
|
+
}
|
|
1163
|
+
n.forEach((e) => e.destroy());
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
function l() {
|
|
1167
|
+
return i ? i.length === 1 ? i[0] : i : null;
|
|
1168
|
+
}
|
|
1169
|
+
function u() {
|
|
1170
|
+
o.forEach((e) => {
|
|
1171
|
+
let t = e.evaluate();
|
|
1172
|
+
(!e.committed || !Object.is(t, e.last)) && (e.committed = !0, e.last = t, e.commit(t));
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
function ee(n) {
|
|
1176
|
+
return typeof e.update == "function" ? e.update.call(s, t, s, n) === !0 ? (c(), "rebuild") : o.length > 0 ? (u(), "bindings") : "update" : o.length > 0 ? (u(), "bindings") : (c(), "rebuild");
|
|
677
1177
|
}
|
|
678
1178
|
}
|
|
679
|
-
|
|
1179
|
+
w(C, { vStateNode: pt });
|
|
1180
|
+
//#endregion
|
|
1181
|
+
//#region src/core/a11y.js
|
|
1182
|
+
var mt = [
|
|
1183
|
+
"a[href]",
|
|
1184
|
+
"button:not([disabled])",
|
|
1185
|
+
"input:not([disabled])",
|
|
1186
|
+
"select:not([disabled])",
|
|
1187
|
+
"textarea:not([disabled])",
|
|
1188
|
+
"[tabindex]:not([tabindex=\"-1\"])"
|
|
1189
|
+
].join(", "), ht = "data-yoya-live";
|
|
1190
|
+
function U(e) {
|
|
1191
|
+
return !e || typeof e.querySelectorAll != "function" ? [] : Array.from(e.querySelectorAll(mt)).filter((e) => e.getAttribute && e.getAttribute("tabindex") !== "-1");
|
|
1192
|
+
}
|
|
1193
|
+
function gt(e, t = {}) {
|
|
1194
|
+
let { onEscape: n = null, restoreFocus: r = !0 } = t;
|
|
1195
|
+
if (typeof document > "u" || !e) return {
|
|
1196
|
+
activate() {},
|
|
1197
|
+
destroy() {}
|
|
1198
|
+
};
|
|
1199
|
+
let i = !1, a = null, o = null, s = (t) => {
|
|
1200
|
+
if (!i) return;
|
|
1201
|
+
if (t.key === "Escape") {
|
|
1202
|
+
n && n(t);
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1205
|
+
if (t.key !== "Tab") return;
|
|
1206
|
+
let r = U(e);
|
|
1207
|
+
if (r.length === 0) {
|
|
1208
|
+
t.preventDefault();
|
|
1209
|
+
return;
|
|
1210
|
+
}
|
|
1211
|
+
let a = document.activeElement, o = r.indexOf(a), s;
|
|
1212
|
+
s = t.shiftKey ? o <= 0 ? r.length - 1 : o - 1 : o === -1 || o === r.length - 1 ? 0 : o + 1, t.preventDefault(), r[s].focus();
|
|
1213
|
+
};
|
|
1214
|
+
return {
|
|
1215
|
+
activate: () => {
|
|
1216
|
+
if (i) return;
|
|
1217
|
+
i = !0, a = document.activeElement, o = xe("keydown", s);
|
|
1218
|
+
let t = U(e)[0];
|
|
1219
|
+
t && t.focus();
|
|
1220
|
+
},
|
|
1221
|
+
destroy: () => {
|
|
1222
|
+
i && (i = !1, o &&= (o(), null), r && a && typeof a.isConnected == "boolean" && a.isConnected && typeof a.focus == "function" && a.focus());
|
|
1223
|
+
}
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
function _t(e, t = {}) {
|
|
1227
|
+
if (typeof document > "u") return null;
|
|
1228
|
+
let { politeness: n = "polite", dedupeKey: r = "yoya-announce" } = t, i = document.querySelector(`[${ht}="${r}"]`);
|
|
1229
|
+
return i || (i = document.createElement("div"), i.setAttribute(ht, r), i.setAttribute("aria-live", n), i.setAttribute("aria-atomic", "true"), i.className = "yoya-a11y-live", i.style.cssText = "position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;padding:0;margin:-1px;", document.body.appendChild(i)), i.textContent = "", queueMicrotask(() => {
|
|
1230
|
+
i.textContent = String(e);
|
|
1231
|
+
}), i;
|
|
1232
|
+
}
|
|
1233
|
+
function vt({ key: e, items: t, currentIndex: n = -1, shiftKey: r = !1 }) {
|
|
1234
|
+
let i = t?.length || 0;
|
|
1235
|
+
if (i === 0) return -1;
|
|
1236
|
+
let a = i - 1, o = n >= 0 && n < i ? n : -1;
|
|
1237
|
+
return e === "Home" ? 0 : e === "End" ? a : e === "ArrowDown" ? r ? -1 : o === a ? 0 : o + 1 : e === "ArrowUp" ? r || o <= 0 ? a : o - 1 : o;
|
|
1238
|
+
}
|
|
680
1239
|
//#endregion
|
|
681
1240
|
//#region src/core/theme.js
|
|
682
|
-
var
|
|
1241
|
+
var W = [
|
|
683
1242
|
"light",
|
|
684
1243
|
"dark",
|
|
685
1244
|
"system"
|
|
686
|
-
],
|
|
687
|
-
function
|
|
1245
|
+
], yt = "yoya-theme-mode", G = "yoya-theme-name";
|
|
1246
|
+
function K() {
|
|
688
1247
|
return typeof document > "u" ? null : document.documentElement;
|
|
689
1248
|
}
|
|
690
|
-
function
|
|
1249
|
+
function q() {
|
|
691
1250
|
try {
|
|
692
1251
|
return typeof localStorage < "u" && localStorage !== null;
|
|
693
1252
|
} catch {
|
|
694
1253
|
return !1;
|
|
695
1254
|
}
|
|
696
1255
|
}
|
|
697
|
-
function
|
|
698
|
-
let n =
|
|
699
|
-
if (r && (r.dataset.yoyaMode = n), t.persist &&
|
|
700
|
-
localStorage.setItem(
|
|
1256
|
+
function bt(e = "light", t = {}) {
|
|
1257
|
+
let n = W.includes(e) ? e : "light", r = K();
|
|
1258
|
+
if (r && (r.dataset.yoyaMode = n), t.persist && q()) try {
|
|
1259
|
+
localStorage.setItem(yt, n);
|
|
701
1260
|
} catch {}
|
|
702
1261
|
return n;
|
|
703
1262
|
}
|
|
704
|
-
function
|
|
705
|
-
let e =
|
|
706
|
-
return
|
|
1263
|
+
function J() {
|
|
1264
|
+
let e = K(), t = e && e.dataset.yoyaMode;
|
|
1265
|
+
return W.includes(t) ? t : "light";
|
|
707
1266
|
}
|
|
708
|
-
function
|
|
709
|
-
let e =
|
|
1267
|
+
function xt() {
|
|
1268
|
+
let e = J();
|
|
710
1269
|
return e === "system" ? typeof window > "u" || typeof window.matchMedia != "function" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : e;
|
|
711
1270
|
}
|
|
712
|
-
function
|
|
713
|
-
let n =
|
|
1271
|
+
function St(e = "", t = {}) {
|
|
1272
|
+
let n = K();
|
|
714
1273
|
if (!e) {
|
|
715
|
-
if (n && delete n.dataset.yoyaTheme, t.persist &&
|
|
716
|
-
localStorage.removeItem(
|
|
1274
|
+
if (n && delete n.dataset.yoyaTheme, t.persist && q()) try {
|
|
1275
|
+
localStorage.removeItem(G);
|
|
717
1276
|
} catch {}
|
|
718
1277
|
return "";
|
|
719
1278
|
}
|
|
720
|
-
if (n && (n.dataset.yoyaTheme = e), t.persist &&
|
|
721
|
-
localStorage.setItem(
|
|
1279
|
+
if (n && (n.dataset.yoyaTheme = e), t.persist && q()) try {
|
|
1280
|
+
localStorage.setItem(G, e);
|
|
722
1281
|
} catch {}
|
|
723
1282
|
return e;
|
|
724
1283
|
}
|
|
725
|
-
function
|
|
726
|
-
let e =
|
|
1284
|
+
function Ct() {
|
|
1285
|
+
let e = K();
|
|
727
1286
|
return e && e.dataset.yoyaTheme || "";
|
|
728
1287
|
}
|
|
729
|
-
function
|
|
1288
|
+
function wt(e = {}) {
|
|
730
1289
|
let t = e.mode, n = e.theme;
|
|
731
|
-
if (t === void 0 &&
|
|
732
|
-
let e = localStorage.getItem(
|
|
733
|
-
|
|
1290
|
+
if (t === void 0 && q()) {
|
|
1291
|
+
let e = localStorage.getItem(yt);
|
|
1292
|
+
W.includes(e) && (t = e);
|
|
734
1293
|
}
|
|
735
|
-
return n === void 0 &&
|
|
736
|
-
mode:
|
|
737
|
-
theme:
|
|
1294
|
+
return n === void 0 && q() && (n = localStorage.getItem(G) || ""), t !== void 0 && bt(t, { persist: e.persist }), n !== void 0 && St(n, { persist: e.persist }), {
|
|
1295
|
+
mode: J(),
|
|
1296
|
+
theme: Ct()
|
|
738
1297
|
};
|
|
739
1298
|
}
|
|
740
1299
|
//#endregion
|
|
741
1300
|
//#region src/core/request.js
|
|
742
|
-
var
|
|
743
|
-
function
|
|
744
|
-
return
|
|
1301
|
+
var Y = null;
|
|
1302
|
+
function Tt({ submit: e } = {}) {
|
|
1303
|
+
return Y = typeof e == "function" ? e : null, Y;
|
|
745
1304
|
}
|
|
746
|
-
var
|
|
1305
|
+
var Et = class {
|
|
747
1306
|
method() {
|
|
748
1307
|
return "GET";
|
|
749
1308
|
}
|
|
@@ -763,10 +1322,10 @@ var ye = class {
|
|
|
763
1322
|
return "";
|
|
764
1323
|
}
|
|
765
1324
|
submit() {
|
|
766
|
-
if (typeof
|
|
767
|
-
return
|
|
1325
|
+
if (typeof Y != "function") throw Error("RequestBase: 未注册请求传输,请先 configureRequest({ submit })");
|
|
1326
|
+
return Y(this);
|
|
768
1327
|
}
|
|
769
|
-
},
|
|
1328
|
+
}, Dt = class e {
|
|
770
1329
|
constructor({ ok: e = !0, code: t = "0", msg: n = null, showType: r = 0, data: i = null, kind: a = "detail", pageNum: o = null, pageSize: s = null, total: c = null } = {}) {
|
|
771
1330
|
this.ok = e, this.code = t, this.msg = n, this.showType = r, this.data = i, this.kind = a, this.pageNum = o, this.pageSize = s, this.total = c;
|
|
772
1331
|
}
|
|
@@ -794,7 +1353,7 @@ var ye = class {
|
|
|
794
1353
|
total: t.total
|
|
795
1354
|
});
|
|
796
1355
|
}
|
|
797
|
-
},
|
|
1356
|
+
}, X = class extends C {}, Ot = [
|
|
798
1357
|
"a",
|
|
799
1358
|
"abbr",
|
|
800
1359
|
"address",
|
|
@@ -916,18 +1475,18 @@ var ye = class {
|
|
|
916
1475
|
"video",
|
|
917
1476
|
"wbr"
|
|
918
1477
|
];
|
|
919
|
-
function
|
|
920
|
-
return
|
|
921
|
-
let { aliases: n = [], name: r, tagName: i } =
|
|
1478
|
+
function Z() {
|
|
1479
|
+
return Ot.reduce((e, t) => {
|
|
1480
|
+
let { aliases: n = [], name: r, tagName: i } = Lr(t), a = ve(i, X);
|
|
922
1481
|
return e[r] = a, n.forEach((t) => {
|
|
923
1482
|
e[t] = a;
|
|
924
1483
|
}), e;
|
|
925
1484
|
}, {});
|
|
926
1485
|
}
|
|
927
|
-
var
|
|
928
|
-
|
|
929
|
-
var { a:
|
|
930
|
-
function
|
|
1486
|
+
var kt = Z();
|
|
1487
|
+
w(X, kt);
|
|
1488
|
+
var { a: At, abbr: jt, address: Mt, area: Nt, article: Pt, aside: Ft, audio: It, b: Lt, base: Rt, bdi: zt, bdo: Bt, blockquote: Vt, body: Ht, br: Ut, button: Wt, canvas: Gt, caption: Kt, cite: qt, code: Jt, col: Yt, colgroup: Xt, data: Zt, datalist: Qt, dd: $t, del: en, details: tn, dfn: nn, dialog: rn, div: an, dl: on, dt: sn, em: cn, embed: ln, fieldset: un, figcaption: dn, figure: fn, footer: pn, form: mn, h1: hn, h2: gn, h3: _n, h4: vn, h5: yn, h6: bn, head: xn, header: Sn, hgroup: Cn, hr: wn, html: Tn, i: En, iframe: Dn, img: On, input: kn, ins: An, kbd: jn, label: Mn, legend: Nn, li: Pn, link: Fn, main: In, map: Ln, mark: Rn, menu: zn, meta: Bn, meter: Vn, nav: Hn, noscript: Un, object: Wn, ol: Gn, optgroup: Kn, option: qn, output: Jn, p: Yn, picture: Xn, pre: Zn, progress: Qn, q: $n, rp: er, rt: tr, ruby: nr, s: rr, samp: ir, script: ar, search: or, section: sr, select: cr, selectedcontent: lr, slot: ur, small: dr, source: fr, span: pr, strong: mr, style: hr, styleTag: gr, sub: _r, summary: vr, sup: yr, table: br, tbody: xr, td: Sr, template: Cr, textarea: wr, tfoot: Tr, th: Er, thead: Dr, time: Or, title: kr, tr: Ar, track: jr, u: Mr, ul: Nr, varTag: Pr, video: Fr, wbr: Ir } = kt;
|
|
1489
|
+
function Lr(e) {
|
|
931
1490
|
return typeof e == "string" ? {
|
|
932
1491
|
name: e,
|
|
933
1492
|
tagName: e
|
|
@@ -935,7 +1494,7 @@ function kn(e) {
|
|
|
935
1494
|
}
|
|
936
1495
|
//#endregion
|
|
937
1496
|
//#region src/svg/icons.js
|
|
938
|
-
function
|
|
1497
|
+
function Rr() {
|
|
939
1498
|
return $((e) => {
|
|
940
1499
|
e.className("yoya-icon").attr({
|
|
941
1500
|
"aria-hidden": "true",
|
|
@@ -951,7 +1510,7 @@ function An() {
|
|
|
951
1510
|
}), e.path({ d: "M12 5v14" }), e.path({ d: "m19 12-7 7-7-7" });
|
|
952
1511
|
});
|
|
953
1512
|
}
|
|
954
|
-
function
|
|
1513
|
+
function zr() {
|
|
955
1514
|
return $((e) => {
|
|
956
1515
|
e.className("yoya-icon").attr({
|
|
957
1516
|
"aria-hidden": "true",
|
|
@@ -967,7 +1526,7 @@ function jn() {
|
|
|
967
1526
|
}), e.path({ d: "M19 12H5" }), e.path({ d: "m12 19-7-7 7-7" });
|
|
968
1527
|
});
|
|
969
1528
|
}
|
|
970
|
-
function
|
|
1529
|
+
function Br() {
|
|
971
1530
|
return $((e) => {
|
|
972
1531
|
e.className("yoya-icon").attr({
|
|
973
1532
|
"aria-hidden": "true",
|
|
@@ -983,7 +1542,7 @@ function Mn() {
|
|
|
983
1542
|
}), e.path({ d: "M5 12h14" }), e.path({ d: "m12 5 7 7-7 7" });
|
|
984
1543
|
});
|
|
985
1544
|
}
|
|
986
|
-
function
|
|
1545
|
+
function Vr() {
|
|
987
1546
|
return $((e) => {
|
|
988
1547
|
e.className("yoya-icon").attr({
|
|
989
1548
|
"aria-hidden": "true",
|
|
@@ -999,7 +1558,7 @@ function Nn() {
|
|
|
999
1558
|
}), e.path({ d: "M12 19V5" }), e.path({ d: "m5 12 7-7 7 7" });
|
|
1000
1559
|
});
|
|
1001
1560
|
}
|
|
1002
|
-
function
|
|
1561
|
+
function Hr() {
|
|
1003
1562
|
return $((e) => {
|
|
1004
1563
|
e.className("yoya-icon").attr({
|
|
1005
1564
|
"aria-hidden": "true",
|
|
@@ -1015,7 +1574,7 @@ function Pn() {
|
|
|
1015
1574
|
}), e.path({ d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" }), e.path({ d: "M10.3 21a1.94 1.94 0 0 0 3.4 0" });
|
|
1016
1575
|
});
|
|
1017
1576
|
}
|
|
1018
|
-
function
|
|
1577
|
+
function Ur() {
|
|
1019
1578
|
return $((e) => {
|
|
1020
1579
|
e.className("yoya-icon").attr({
|
|
1021
1580
|
"aria-hidden": "true",
|
|
@@ -1037,7 +1596,7 @@ function Fn() {
|
|
|
1037
1596
|
}), e.path({ d: "M16 2v4" }), e.path({ d: "M8 2v4" }), e.path({ d: "M3 10h18" });
|
|
1038
1597
|
});
|
|
1039
1598
|
}
|
|
1040
|
-
function
|
|
1599
|
+
function Wr() {
|
|
1041
1600
|
return $((e) => {
|
|
1042
1601
|
e.className("yoya-icon").attr({
|
|
1043
1602
|
"aria-hidden": "true",
|
|
@@ -1053,7 +1612,7 @@ function In() {
|
|
|
1053
1612
|
}), e.path({ d: "M20 6 9 17l-5-5" });
|
|
1054
1613
|
});
|
|
1055
1614
|
}
|
|
1056
|
-
function
|
|
1615
|
+
function Gr() {
|
|
1057
1616
|
return $((e) => {
|
|
1058
1617
|
e.className("yoya-icon").attr({
|
|
1059
1618
|
"aria-hidden": "true",
|
|
@@ -1069,7 +1628,7 @@ function Ln() {
|
|
|
1069
1628
|
}), e.path({ d: "m6 9 6 6 6-6" });
|
|
1070
1629
|
});
|
|
1071
1630
|
}
|
|
1072
|
-
function
|
|
1631
|
+
function Kr() {
|
|
1073
1632
|
return $((e) => {
|
|
1074
1633
|
e.className("yoya-icon").attr({
|
|
1075
1634
|
"aria-hidden": "true",
|
|
@@ -1085,7 +1644,7 @@ function Rn() {
|
|
|
1085
1644
|
}), e.path({ d: "m15 18-6-6 6-6" });
|
|
1086
1645
|
});
|
|
1087
1646
|
}
|
|
1088
|
-
function
|
|
1647
|
+
function qr() {
|
|
1089
1648
|
return $((e) => {
|
|
1090
1649
|
e.className("yoya-icon").attr({
|
|
1091
1650
|
"aria-hidden": "true",
|
|
@@ -1101,7 +1660,7 @@ function zn() {
|
|
|
1101
1660
|
}), e.path({ d: "m9 18 6-6-6-6" });
|
|
1102
1661
|
});
|
|
1103
1662
|
}
|
|
1104
|
-
function
|
|
1663
|
+
function Jr() {
|
|
1105
1664
|
return $((e) => {
|
|
1106
1665
|
e.className("yoya-icon").attr({
|
|
1107
1666
|
"aria-hidden": "true",
|
|
@@ -1117,7 +1676,7 @@ function Bn() {
|
|
|
1117
1676
|
}), e.path({ d: "m18 15-6-6-6 6" });
|
|
1118
1677
|
});
|
|
1119
1678
|
}
|
|
1120
|
-
function
|
|
1679
|
+
function Yr() {
|
|
1121
1680
|
return $((e) => {
|
|
1122
1681
|
e.className("yoya-icon").attr({
|
|
1123
1682
|
"aria-hidden": "true",
|
|
@@ -1133,7 +1692,7 @@ function Vn() {
|
|
|
1133
1692
|
}), e.path({ d: "M18 6 6 18" }), e.path({ d: "m6 6 12 12" });
|
|
1134
1693
|
});
|
|
1135
1694
|
}
|
|
1136
|
-
function
|
|
1695
|
+
function Xr() {
|
|
1137
1696
|
return $((e) => {
|
|
1138
1697
|
e.className("yoya-icon").attr({
|
|
1139
1698
|
"aria-hidden": "true",
|
|
@@ -1149,7 +1708,7 @@ function Hn() {
|
|
|
1149
1708
|
}), e.path({ d: "m16 18 6-6-6-6" }), e.path({ d: "m8 6-6 6 6 6" });
|
|
1150
1709
|
});
|
|
1151
1710
|
}
|
|
1152
|
-
function
|
|
1711
|
+
function Zr() {
|
|
1153
1712
|
return $((e) => {
|
|
1154
1713
|
e.className("yoya-icon").attr({
|
|
1155
1714
|
"aria-hidden": "true",
|
|
@@ -1171,7 +1730,7 @@ function Un() {
|
|
|
1171
1730
|
}), e.path({ d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" });
|
|
1172
1731
|
});
|
|
1173
1732
|
}
|
|
1174
|
-
function
|
|
1733
|
+
function Qr() {
|
|
1175
1734
|
return $((e) => {
|
|
1176
1735
|
e.className("yoya-icon").attr({
|
|
1177
1736
|
"aria-hidden": "true",
|
|
@@ -1187,7 +1746,7 @@ function Wn() {
|
|
|
1187
1746
|
}), e.path({ d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), e.path({ d: "m7 10 5 5 5-5" }), e.path({ d: "M12 15V3" });
|
|
1188
1747
|
});
|
|
1189
1748
|
}
|
|
1190
|
-
function
|
|
1749
|
+
function $r() {
|
|
1191
1750
|
return $((e) => {
|
|
1192
1751
|
e.className("yoya-icon").attr({
|
|
1193
1752
|
"aria-hidden": "true",
|
|
@@ -1203,7 +1762,7 @@ function Gn() {
|
|
|
1203
1762
|
}), e.path({ d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" });
|
|
1204
1763
|
});
|
|
1205
1764
|
}
|
|
1206
|
-
function
|
|
1765
|
+
function ei() {
|
|
1207
1766
|
return $((e) => {
|
|
1208
1767
|
e.className("yoya-icon").attr({
|
|
1209
1768
|
"aria-hidden": "true",
|
|
@@ -1219,7 +1778,7 @@ function Kn() {
|
|
|
1219
1778
|
}), e.path({ d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }), e.path({ d: "m15 3 6 6" }), e.path({ d: "m21 3-9 9" });
|
|
1220
1779
|
});
|
|
1221
1780
|
}
|
|
1222
|
-
function
|
|
1781
|
+
function ti() {
|
|
1223
1782
|
return $((e) => {
|
|
1224
1783
|
e.className("yoya-icon").attr({
|
|
1225
1784
|
"aria-hidden": "true",
|
|
@@ -1239,7 +1798,7 @@ function qn() {
|
|
|
1239
1798
|
});
|
|
1240
1799
|
});
|
|
1241
1800
|
}
|
|
1242
|
-
function
|
|
1801
|
+
function ni() {
|
|
1243
1802
|
return $((e) => {
|
|
1244
1803
|
e.className("yoya-icon").attr({
|
|
1245
1804
|
"aria-hidden": "true",
|
|
@@ -1255,7 +1814,7 @@ function Jn() {
|
|
|
1255
1814
|
}), e.path({ d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }), e.path({ d: "M14 2v4a2 2 0 0 0 2 2h4" });
|
|
1256
1815
|
});
|
|
1257
1816
|
}
|
|
1258
|
-
function
|
|
1817
|
+
function ri() {
|
|
1259
1818
|
return $((e) => {
|
|
1260
1819
|
e.className("yoya-icon").attr({
|
|
1261
1820
|
"aria-hidden": "true",
|
|
@@ -1281,7 +1840,7 @@ function Yn() {
|
|
|
1281
1840
|
}), e.path({ d: "m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21" });
|
|
1282
1841
|
});
|
|
1283
1842
|
}
|
|
1284
|
-
function
|
|
1843
|
+
function ii() {
|
|
1285
1844
|
return $((e) => {
|
|
1286
1845
|
e.className("yoya-icon").attr({
|
|
1287
1846
|
"aria-hidden": "true",
|
|
@@ -1297,7 +1856,7 @@ function Xn() {
|
|
|
1297
1856
|
}), e.path({ d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" });
|
|
1298
1857
|
});
|
|
1299
1858
|
}
|
|
1300
|
-
function
|
|
1859
|
+
function ai() {
|
|
1301
1860
|
return $((e) => {
|
|
1302
1861
|
e.className("yoya-icon").attr({
|
|
1303
1862
|
"aria-hidden": "true",
|
|
@@ -1313,7 +1872,7 @@ function Zn() {
|
|
|
1313
1872
|
}), e.path({ d: "m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2" });
|
|
1314
1873
|
});
|
|
1315
1874
|
}
|
|
1316
|
-
function
|
|
1875
|
+
function oi() {
|
|
1317
1876
|
return $((e) => {
|
|
1318
1877
|
e.className("yoya-icon").attr({
|
|
1319
1878
|
"aria-hidden": "true",
|
|
@@ -1329,7 +1888,7 @@ function Qn() {
|
|
|
1329
1888
|
}), e.path({ d: "M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" });
|
|
1330
1889
|
});
|
|
1331
1890
|
}
|
|
1332
|
-
function
|
|
1891
|
+
function si() {
|
|
1333
1892
|
return $((e) => {
|
|
1334
1893
|
e.className("yoya-icon").attr({
|
|
1335
1894
|
"aria-hidden": "true",
|
|
@@ -1345,7 +1904,7 @@ function $n() {
|
|
|
1345
1904
|
}), e.path({ d: "m3 9.5 9-6.5 9 6.5" }), e.path({ d: "M5 10v10h5v-6h4v6h5V10" });
|
|
1346
1905
|
});
|
|
1347
1906
|
}
|
|
1348
|
-
function
|
|
1907
|
+
function ci() {
|
|
1349
1908
|
return $((e) => {
|
|
1350
1909
|
e.className("yoya-icon").attr({
|
|
1351
1910
|
"aria-hidden": "true",
|
|
@@ -1365,7 +1924,7 @@ function er() {
|
|
|
1365
1924
|
}), e.path({ d: "M12 16v-4" }), e.path({ d: "M12 8h.01" });
|
|
1366
1925
|
});
|
|
1367
1926
|
}
|
|
1368
|
-
function
|
|
1927
|
+
function li() {
|
|
1369
1928
|
return $((e) => {
|
|
1370
1929
|
e.className("yoya-icon").attr({
|
|
1371
1930
|
"aria-hidden": "true",
|
|
@@ -1387,7 +1946,7 @@ function tr() {
|
|
|
1387
1946
|
}), e.path({ d: "M7 11V7a5 5 0 0 1 10 0v4" });
|
|
1388
1947
|
});
|
|
1389
1948
|
}
|
|
1390
|
-
function
|
|
1949
|
+
function ui() {
|
|
1391
1950
|
return $((e) => {
|
|
1392
1951
|
e.className("yoya-icon").attr({
|
|
1393
1952
|
"aria-hidden": "true",
|
|
@@ -1403,7 +1962,7 @@ function nr() {
|
|
|
1403
1962
|
}), e.path({ d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }), e.path({ d: "m16 17 5-5-5-5" }), e.path({ d: "M21 12H9" });
|
|
1404
1963
|
});
|
|
1405
1964
|
}
|
|
1406
|
-
function
|
|
1965
|
+
function di() {
|
|
1407
1966
|
return $((e) => {
|
|
1408
1967
|
e.className("yoya-icon").attr({
|
|
1409
1968
|
"aria-hidden": "true",
|
|
@@ -1425,7 +1984,7 @@ function rr() {
|
|
|
1425
1984
|
}), e.path({ d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" });
|
|
1426
1985
|
});
|
|
1427
1986
|
}
|
|
1428
|
-
function
|
|
1987
|
+
function fi() {
|
|
1429
1988
|
return $((e) => {
|
|
1430
1989
|
e.className("yoya-icon").attr({
|
|
1431
1990
|
"aria-hidden": "true",
|
|
@@ -1441,7 +2000,7 @@ function ir() {
|
|
|
1441
2000
|
}), e.path({ d: "M4 6h16" }), e.path({ d: "M4 12h16" }), e.path({ d: "M4 18h16" });
|
|
1442
2001
|
});
|
|
1443
2002
|
}
|
|
1444
|
-
function
|
|
2003
|
+
function pi() {
|
|
1445
2004
|
return $((e) => {
|
|
1446
2005
|
e.className("yoya-icon").attr({
|
|
1447
2006
|
"aria-hidden": "true",
|
|
@@ -1457,7 +2016,7 @@ function ar() {
|
|
|
1457
2016
|
}), e.path({ d: "M5 12h14" });
|
|
1458
2017
|
});
|
|
1459
2018
|
}
|
|
1460
|
-
function
|
|
2019
|
+
function mi() {
|
|
1461
2020
|
return $((e) => {
|
|
1462
2021
|
e.className("yoya-icon").attr({
|
|
1463
2022
|
"aria-hidden": "true",
|
|
@@ -1488,7 +2047,7 @@ function or() {
|
|
|
1488
2047
|
});
|
|
1489
2048
|
});
|
|
1490
2049
|
}
|
|
1491
|
-
function
|
|
2050
|
+
function hi() {
|
|
1492
2051
|
return $((e) => {
|
|
1493
2052
|
e.className("yoya-icon").attr({
|
|
1494
2053
|
"aria-hidden": "true",
|
|
@@ -1504,7 +2063,7 @@ function sr() {
|
|
|
1504
2063
|
}), e.path({ d: "M5 12h14" }), e.path({ d: "M12 5v14" });
|
|
1505
2064
|
});
|
|
1506
2065
|
}
|
|
1507
|
-
function
|
|
2066
|
+
function gi() {
|
|
1508
2067
|
return $((e) => {
|
|
1509
2068
|
e.className("yoya-icon").attr({
|
|
1510
2069
|
"aria-hidden": "true",
|
|
@@ -1520,7 +2079,7 @@ function cr() {
|
|
|
1520
2079
|
}), e.path({ d: "M3 12a9 9 0 0 1 15-6.7L21 8" }), e.path({ d: "M21 3v5h-5" }), e.path({ d: "M21 12a9 9 0 0 1-15 6.7L3 16" }), e.path({ d: "M3 21v-5h5" });
|
|
1521
2080
|
});
|
|
1522
2081
|
}
|
|
1523
|
-
function
|
|
2082
|
+
function _i() {
|
|
1524
2083
|
return $((e) => {
|
|
1525
2084
|
e.className("yoya-icon").attr({
|
|
1526
2085
|
"aria-hidden": "true",
|
|
@@ -1540,7 +2099,7 @@ function lr() {
|
|
|
1540
2099
|
}), e.path({ d: "m20 20-4-4" });
|
|
1541
2100
|
});
|
|
1542
2101
|
}
|
|
1543
|
-
function
|
|
2102
|
+
function vi() {
|
|
1544
2103
|
return $((e) => {
|
|
1545
2104
|
e.className("yoya-icon").attr({
|
|
1546
2105
|
"aria-hidden": "true",
|
|
@@ -1560,7 +2119,7 @@ function ur() {
|
|
|
1560
2119
|
}), e.path({ d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z" });
|
|
1561
2120
|
});
|
|
1562
2121
|
}
|
|
1563
|
-
function
|
|
2122
|
+
function yi() {
|
|
1564
2123
|
return $((e) => {
|
|
1565
2124
|
e.className("yoya-icon").attr({
|
|
1566
2125
|
"aria-hidden": "true",
|
|
@@ -1580,7 +2139,7 @@ function dr() {
|
|
|
1580
2139
|
});
|
|
1581
2140
|
});
|
|
1582
2141
|
}
|
|
1583
|
-
function
|
|
2142
|
+
function bi() {
|
|
1584
2143
|
return $((e) => {
|
|
1585
2144
|
e.className("yoya-icon").attr({
|
|
1586
2145
|
"aria-hidden": "true",
|
|
@@ -1596,7 +2155,7 @@ function fr() {
|
|
|
1596
2155
|
}), e.path({ d: "M3 6h18" }), e.path({ d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), e.path({ d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }), e.path({ d: "M10 10v6" }), e.path({ d: "M14 10v6" });
|
|
1597
2156
|
});
|
|
1598
2157
|
}
|
|
1599
|
-
function
|
|
2158
|
+
function xi() {
|
|
1600
2159
|
return $((e) => {
|
|
1601
2160
|
e.className("yoya-icon").attr({
|
|
1602
2161
|
"aria-hidden": "true",
|
|
@@ -1612,7 +2171,7 @@ function pr() {
|
|
|
1612
2171
|
}), e.path({ d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), e.path({ d: "m17 8-5-5-5 5" }), e.path({ d: "M12 3v12" });
|
|
1613
2172
|
});
|
|
1614
2173
|
}
|
|
1615
|
-
function
|
|
2174
|
+
function Si() {
|
|
1616
2175
|
return $((e) => {
|
|
1617
2176
|
e.className("yoya-icon").attr({
|
|
1618
2177
|
"aria-hidden": "true",
|
|
@@ -1632,7 +2191,7 @@ function mr() {
|
|
|
1632
2191
|
});
|
|
1633
2192
|
});
|
|
1634
2193
|
}
|
|
1635
|
-
function
|
|
2194
|
+
function Ci() {
|
|
1636
2195
|
return $((e) => {
|
|
1637
2196
|
e.className("yoya-icon").attr({
|
|
1638
2197
|
"aria-hidden": "true",
|
|
@@ -1648,7 +2207,7 @@ function hr() {
|
|
|
1648
2207
|
}), e.path({ d: "M21.73 18 13.34 3.7a2 2 0 0 0-3.44 0L2.27 18A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }), e.path({ d: "M12 9v4" }), e.path({ d: "M12 17h.01" });
|
|
1649
2208
|
});
|
|
1650
2209
|
}
|
|
1651
|
-
function
|
|
2210
|
+
function wi() {
|
|
1652
2211
|
return $((e) => {
|
|
1653
2212
|
e.className("yoya-icon").attr({
|
|
1654
2213
|
"aria-hidden": "true",
|
|
@@ -1668,7 +2227,7 @@ function gr() {
|
|
|
1668
2227
|
}), e.path({ d: "M12 2v2" }), e.path({ d: "M12 20v2" }), e.path({ d: "m4.93 4.93 1.41 1.41" }), e.path({ d: "m17.66 17.66 1.41 1.41" }), e.path({ d: "M2 12h2" }), e.path({ d: "M20 12h2" }), e.path({ d: "m6.34 17.66-1.41 1.41" }), e.path({ d: "m19.07 4.93-1.41 1.41" });
|
|
1669
2228
|
});
|
|
1670
2229
|
}
|
|
1671
|
-
function
|
|
2230
|
+
function Ti() {
|
|
1672
2231
|
return $((e) => {
|
|
1673
2232
|
e.className("yoya-icon").attr({
|
|
1674
2233
|
"aria-hidden": "true",
|
|
@@ -1684,7 +2243,7 @@ function _r() {
|
|
|
1684
2243
|
}), e.path({ d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" });
|
|
1685
2244
|
});
|
|
1686
2245
|
}
|
|
1687
|
-
function
|
|
2246
|
+
function Ei() {
|
|
1688
2247
|
return $((e) => {
|
|
1689
2248
|
e.className("yoya-icon").attr({
|
|
1690
2249
|
"aria-hidden": "true",
|
|
@@ -1708,19 +2267,19 @@ function vr() {
|
|
|
1708
2267
|
}
|
|
1709
2268
|
//#endregion
|
|
1710
2269
|
//#region src/svg/index.js
|
|
1711
|
-
var
|
|
2270
|
+
var Di = "http://www.w3.org/2000/svg", Oi = /* @__PURE__ */ new Set([
|
|
1712
2271
|
"desc",
|
|
1713
2272
|
"metadata",
|
|
1714
2273
|
"text",
|
|
1715
2274
|
"textPath",
|
|
1716
2275
|
"title",
|
|
1717
2276
|
"tspan"
|
|
1718
|
-
]), Q = class e extends
|
|
2277
|
+
]), Q = class e extends C {
|
|
1719
2278
|
setup(e) {
|
|
1720
2279
|
return typeof e == "string" || typeof e == "number" ? this.child(e) : super.setup(e);
|
|
1721
2280
|
}
|
|
1722
2281
|
text(...e) {
|
|
1723
|
-
if (
|
|
2282
|
+
if (Oi.has(this._tagName)) {
|
|
1724
2283
|
let [t, n] = e;
|
|
1725
2284
|
return e.length > 0 && this.child(t), n != null && this.setup(n), this;
|
|
1726
2285
|
}
|
|
@@ -1728,10 +2287,10 @@ var yr = "http://www.w3.org/2000/svg", br = /* @__PURE__ */ new Set([
|
|
|
1728
2287
|
}
|
|
1729
2288
|
style(...e) {
|
|
1730
2289
|
let [t, n] = e;
|
|
1731
|
-
return this._tagName === "style" && e.length <= 1 ? (e.length === 1 && this.child(t), this) : e.length <= 1 &&
|
|
2290
|
+
return this._tagName === "style" && e.length <= 1 ? (e.length === 1 && this.child(t), this) : e.length <= 1 && ki(t) ? this._svgChild("style", t) : super.style(t, n);
|
|
1732
2291
|
}
|
|
1733
2292
|
renderDom() {
|
|
1734
|
-
return this._deleted ? null : (this._el || (this._el = document.createElementNS(
|
|
2293
|
+
return this._deleted ? null : (this._el || (this._el = document.createElementNS(Di, this._tagName), this._applySnapshotToElement()), this._el);
|
|
1735
2294
|
}
|
|
1736
2295
|
_syncClassName() {
|
|
1737
2296
|
let e = [...this._classes].join(" ");
|
|
@@ -1744,11 +2303,11 @@ var yr = "http://www.w3.org/2000/svg", br = /* @__PURE__ */ new Set([
|
|
|
1744
2303
|
}), this.child(r);
|
|
1745
2304
|
}
|
|
1746
2305
|
};
|
|
1747
|
-
function
|
|
2306
|
+
function ki(e) {
|
|
1748
2307
|
return e == null || typeof e == "function" || typeof e == "string" || typeof e == "number" || Array.isArray(e);
|
|
1749
2308
|
}
|
|
1750
|
-
var
|
|
1751
|
-
function
|
|
2309
|
+
var Ai = /* @__PURE__ */ "animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.a.script.style.switch.text.title.symbol.textPath.tspan.use.view".split(".");
|
|
2310
|
+
function ji(e) {
|
|
1752
2311
|
return function(...t) {
|
|
1753
2312
|
let n = new Q(e);
|
|
1754
2313
|
return e === "svg" && n.style("display", "block"), t.forEach((e) => {
|
|
@@ -1756,24 +2315,24 @@ function Cr(e) {
|
|
|
1756
2315
|
}), n;
|
|
1757
2316
|
};
|
|
1758
2317
|
}
|
|
1759
|
-
function
|
|
1760
|
-
return
|
|
1761
|
-
let { aliases: n = [], name: r, tagName: i } =
|
|
2318
|
+
function Mi() {
|
|
2319
|
+
return Ai.reduce((e, t) => {
|
|
2320
|
+
let { aliases: n = [], name: r, tagName: i } = Pi(t), a = ji(i);
|
|
1762
2321
|
return e[r] = a, n.forEach((t) => {
|
|
1763
2322
|
e[t] = a;
|
|
1764
2323
|
}), e;
|
|
1765
2324
|
}, {});
|
|
1766
2325
|
}
|
|
1767
|
-
var $ =
|
|
1768
|
-
|
|
2326
|
+
var $ = ji("svg"), Ni = Mi();
|
|
2327
|
+
w(X, { svg: $ }), w(Q, {
|
|
1769
2328
|
svg: $,
|
|
1770
|
-
...
|
|
2329
|
+
...Ni
|
|
1771
2330
|
});
|
|
1772
|
-
function
|
|
2331
|
+
function Pi(e) {
|
|
1773
2332
|
return typeof e == "string" ? {
|
|
1774
2333
|
name: e,
|
|
1775
2334
|
tagName: e
|
|
1776
2335
|
} : e;
|
|
1777
2336
|
}
|
|
1778
2337
|
//#endregion
|
|
1779
|
-
export {
|
|
2338
|
+
export { Rr as ArrowDownOutlined, zr as ArrowLeftOutlined, Br as ArrowRightOutlined, Vr as ArrowUpOutlined, Hr as BellOutlined, Ur as CalendarOutlined, Wr as CheckOutlined, Gr as ChevronDownOutlined, Kr as ChevronLeftOutlined, qr as ChevronRightOutlined, Jr as ChevronUpOutlined, ye as ClientOnlyNode, Yr as CloseOutlined, Xr as CodeOutlined, me as ComponentNode, Zr as CopyOutlined, Qr as DownloadOutlined, $r as EditOutlined, C as ElementNode, ei as ExternalOutlined, ti as EyeOutlined, ni as FileOutlined, ai as FolderOpenOutlined, ii as FolderOutlined, oi as HeartOutlined, si as HomeOutlined, X as HtmlElementNode, Ee as I18n, De as I18nTextNode, ri as ImageOutlined, ci as InfoOutlined, li as LockOutlined, ui as LogoutOutlined, di as MailOutlined, fi as MenuOutlined, pi as MinusOutlined, Ei as MonitorOutlined, Ti as MoonOutlined, mi as MoreHorizontalOutlined, hi as PlusOutlined, gi as RefreshOutlined, Et as RequestBase, Dt as Result, Di as SVG_NAMESPACE, _i as SearchOutlined, vi as SettingsOutlined, yi as StarOutlined, wi as SunOutlined, Q as SvgElementNode, x as TextNode, x as VTextNode, x as ViewTextNode, bi as TrashOutlined, xi as UploadOutlined, Si as UserOutlined, b as ViewNode, Ci as WarningOutlined, At as a, jt as abbr, Mt as address, _t as announce, _e as applyElementOptions, Nt as area, Pt as article, Ft as aside, It as audio, Lt as b, Rt as base, zt as bdi, Bt as bdo, xe as bindDocumentEvent, Ce as bindWindowEvent, Vt as blockquote, Ht as body, Ut as br, Wt as button, Gt as canvas, Kt as caption, qt as cite, Ye as clearInstalledContext, Jt as code, Yt as col, Xt as colgroup, Tt as configureRequest, i as createAccess, ve as createElementFactory, gt as createFocusTrap, Z as createHtmlFactories, Oe as createI18n, s as currentAccess, Xe as currentContext, Zt as data, Qt as datalist, $t as dd, en as del, tn as details, nn as dfn, rn as dialog, an as div, on as dl, sn as dt, cn as em, ln as embed, v as escapeHtml, un as fieldset, dn as figcaption, fn as figure, pn as footer, mn as form, U as getFocusableElements, k as getI18n, Ie as getPersistedI18nLocales, J as getYoyaMode, Ct as getYoyaTheme, hn as h1, gn as h2, _n as h3, vn as h4, yn as h5, bn as h6, xn as head, Sn as header, Cn as hgroup, wn as hr, Tn as html, En as i, D as i18n, ke as i18nText, Dn as iframe, On as img, wt as initYoyaTheme, we as injectDocumentStyle, kn as input, An as ins, o as installAccess, Je as installContext, Ae as installI18nStringShortcut, jn as kbd, Mn as label, Nn as legend, Pn as li, Fn as link, Fe as listI18n, In as main, Ln as map, Rn as mark, zn as menu, Bn as meta, Vn as meter, vt as moveByKey, Hn as nav, S as normalizeChild, ge as normalizeSetupArguments, Un as noscript, Wn as object, Gn as ol, Kn as optgroup, qn as option, Jn as output, Yn as p, n as parseAccessSpec, Xn as picture, Zn as pre, Qn as progress, $n as q, w as registerChildFactories, Ne as registerI18n, le as resolveTarget, xt as resolveYoyaMode, er as rp, tr as rt, nr as ruby, rr as s, ir as samp, ar as script, or as search, sr as section, cr as select, lr as selectedcontent, bt as setYoyaMode, St as setYoyaTheme, ur as slot, dr as small, Ze as snapshotContext, fr as source, pr as span, r as stripAccessCode, mr as strong, hr as style, gr as styleTag, _r as sub, vr as summary, yr as sup, $ as svg, br as table, xr as tbody, Sr as td, Cr as template, he as text, he as vText, wr as textarea, Tr as tfoot, Er as th, Dr as thead, Or as time, kr as title, Ar as tr, jr as track, Mr as u, Nr as ul, Se as unbindDocumentEvent, Pe as unregisterI18n, be as vClientOnly, pt as vStateNode, Pr as varTag, Fr as video, Ir as wbr, a as withAccess, qe as withContext, je as withI18nStringShortcut };
|