typerighter 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of typerighter might be problematic. Click here for more details.
- package/LICENSE +674 -0
- package/dist/app-bn8sNpDS.js +180 -0
- package/dist/brand-DSd9HWVy.js +19 -0
- package/dist/chunk-DfAF0w94-EwUSVR-h.js +13 -0
- package/dist/client/app/components/Content.d.ts +4 -0
- package/dist/client/app/components/Content.d.ts.map +1 -0
- package/dist/client/app/composables/useTdContent.d.ts +4 -0
- package/dist/client/app/composables/useTdContent.d.ts.map +1 -0
- package/dist/client/app/composables/useTheme.d.ts +9 -0
- package/dist/client/app/composables/useTheme.d.ts.map +1 -0
- package/dist/client/app/index.d.ts +22 -0
- package/dist/client/app/index.d.ts.map +1 -1
- package/dist/client/app/router.d.ts +24 -0
- package/dist/client/app/router.d.ts.map +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/theme-default.js +339 -0
- package/dist/client.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +185 -4
- package/dist/lib-CBtriEt5-Ch50D04V.js +3309 -0
- package/dist/liteDOM-Cp0aN3bP-YwW1TGWI.js +741 -0
- package/dist/logger-DZLd8EDg.js +78 -0
- package/dist/node/build/codegen.d.ts +13 -0
- package/dist/node/build/codegen.d.ts.map +1 -0
- package/dist/node/build/html.d.ts +20 -0
- package/dist/node/build/html.d.ts.map +1 -0
- package/dist/node/build/index.d.ts +17 -0
- package/dist/node/build/index.d.ts.map +1 -0
- package/dist/node/build/render.d.ts +14 -0
- package/dist/node/build/render.d.ts.map +1 -0
- package/dist/node/cli/index.d.ts +2 -0
- package/dist/node/cli/index.d.ts.map +1 -0
- package/dist/node/cli/server.d.ts +5 -0
- package/dist/node/cli/server.d.ts.map +1 -0
- package/dist/node/index.d.ts +3 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/lib/index.d.ts +4 -0
- package/dist/node/lib/index.d.ts.map +1 -0
- package/dist/node/lib/logger.d.ts +6 -0
- package/dist/node/lib/logger.d.ts.map +1 -0
- package/dist/node/lib/markdown/index.d.ts +5 -0
- package/dist/node/lib/markdown/index.d.ts.map +1 -0
- package/dist/node/lib/markdown/plugins/container.d.ts +3 -0
- package/dist/node/lib/markdown/plugins/container.d.ts.map +1 -0
- package/dist/node/lib/markdown/plugins/highlight.d.ts +2 -0
- package/dist/node/lib/markdown/plugins/highlight.d.ts.map +1 -0
- package/dist/node/lib/markdown/plugins/image.d.ts +3 -0
- package/dist/node/lib/markdown/plugins/image.d.ts.map +1 -0
- package/dist/node/lib/markdown/plugins/line-number.d.ts +3 -0
- package/dist/node/lib/markdown/plugins/line-number.d.ts.map +1 -0
- package/dist/node/lib/markdown/plugins/link.d.ts +3 -0
- package/dist/node/lib/markdown/plugins/link.d.ts.map +1 -0
- package/dist/node/lib/markdown/plugins/pre-wrapper.d.ts +6 -0
- package/dist/node/lib/markdown/plugins/pre-wrapper.d.ts.map +1 -0
- package/dist/node/lib/markdown/plugins/restore-entities.d.ts +3 -0
- package/dist/node/lib/markdown/plugins/restore-entities.d.ts.map +1 -0
- package/dist/node/lib/markdown/plugins/table.d.ts +3 -0
- package/dist/node/lib/markdown/plugins/table.d.ts.map +1 -0
- package/dist/node/lib/render/index.d.ts +2 -0
- package/dist/node/lib/render/index.d.ts.map +1 -0
- package/dist/node/lib/render/vue.d.ts +11 -0
- package/dist/node/lib/render/vue.d.ts.map +1 -0
- package/dist/node/lib/typedown-context.d.ts +29 -0
- package/dist/node/lib/typedown-context.d.ts.map +1 -0
- package/dist/node/plugin/codegen.d.ts +16 -0
- package/dist/node/plugin/codegen.d.ts.map +1 -0
- package/dist/node/plugin/codegen.test.d.ts +2 -0
- package/dist/node/plugin/codegen.test.d.ts.map +1 -0
- package/dist/node/plugin/constants.d.ts +4 -0
- package/dist/node/plugin/constants.d.ts.map +1 -0
- package/dist/node/plugin/index.d.ts +2 -0
- package/dist/node/plugin/index.d.ts.map +1 -0
- package/dist/node/plugin/vite.d.ts +3 -0
- package/dist/node/plugin/vite.d.ts.map +1 -0
- package/dist/shared/brand.d.ts +7 -0
- package/dist/shared/brand.d.ts.map +1 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/regexes.d.ts +2 -0
- package/dist/shared/regexes.d.ts.map +1 -0
- package/dist/shared/types/content.d.ts +10 -0
- package/dist/shared/types/content.d.ts.map +1 -0
- package/dist/shared/types/index.d.ts +4 -0
- package/dist/shared/types/index.d.ts.map +1 -0
- package/dist/shared/types/markdown.d.ts +62 -0
- package/dist/shared/types/markdown.d.ts.map +1 -0
- package/dist/shared/types/ssg.d.ts +23 -0
- package/dist/shared/types/ssg.d.ts.map +1 -0
- package/dist/shared/utils/content.d.ts +6 -0
- package/dist/shared/utils/content.d.ts.map +1 -0
- package/dist/shared/utils/environment.d.ts +2 -0
- package/dist/shared/utils/environment.d.ts.map +1 -0
- package/dist/shared/utils/highlight.d.ts +3 -0
- package/dist/shared/utils/highlight.d.ts.map +1 -0
- package/dist/shared/utils/index.d.ts +5 -0
- package/dist/shared/utils/index.d.ts.map +1 -0
- package/dist/shared/utils/url.d.ts +3 -0
- package/dist/shared/utils/url.d.ts.map +1 -0
- package/dist/shared-DzTfF-_d.js +14 -0
- package/dist/tex-svg-full-BI3fonbT-CfoPQ3xc.js +60224 -0
- package/dist/typedown-context-CWA07Yb7.js +9436 -0
- package/dist/typedown-context-D78bYNhH.js +2 -0
- package/dist/typerighter.css +2 -0
- package/dist/vite.js +174 -0
- package/dist/wgxpath.install-node-Csk64Aj9-C0enUGLs.js +1094 -0
- package/dist/xypic-DrMJn58R-B4fw2rYo.js +14846 -0
- package/package.json +49 -16
- package/dist/client/theme-default/index.d.ts +0 -1
- package/dist/client/theme-default/index.d.ts.map +0 -1
- package/dist/index.cjs +0 -1
|
@@ -0,0 +1,741 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/mathxyjax3@0.8.3/node_modules/mathxyjax3/dist/liteDOM-Cp0aN3bP.js
|
|
2
|
+
(function() {
|
|
3
|
+
var e, t, n, r, i, a, o, s, c, l = {
|
|
4
|
+
244: function(e, t, n) {
|
|
5
|
+
var r, i = this && this.__extends || (r = function(e, t) {
|
|
6
|
+
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
7
|
+
e.__proto__ = t;
|
|
8
|
+
} || function(e, t) {
|
|
9
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
10
|
+
}, r(e, t);
|
|
11
|
+
}, function(e, t) {
|
|
12
|
+
if (typeof t != "function" && t !== null) throw TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
13
|
+
function n() {
|
|
14
|
+
this.constructor = e;
|
|
15
|
+
}
|
|
16
|
+
r(e, t), e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
17
|
+
}), a = this && this.__assign || function() {
|
|
18
|
+
return a = Object.assign || function(e) {
|
|
19
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
20
|
+
return e;
|
|
21
|
+
}, a.apply(this, arguments);
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.NodeMixin = t.NodeMixinOptions = void 0;
|
|
24
|
+
var o = n(77);
|
|
25
|
+
t.NodeMixinOptions = {
|
|
26
|
+
badCSS: !0,
|
|
27
|
+
badSizes: !0
|
|
28
|
+
}, t.NodeMixin = function(e, n) {
|
|
29
|
+
var r;
|
|
30
|
+
return n === void 0 && (n = {}), n = (0, o.userOptions)((0, o.defaultOptions)({}, t.NodeMixinOptions), n), r = function(e) {
|
|
31
|
+
function t() {
|
|
32
|
+
var t = [...arguments], n = e.call(this, t[0]) || this, r = n.constructor;
|
|
33
|
+
return n.options = (0, o.userOptions)((0, o.defaultOptions)({}, r.OPTIONS), t[1]), n;
|
|
34
|
+
}
|
|
35
|
+
return i(t, e), t.prototype.fontSize = function(t) {
|
|
36
|
+
return n.badCSS ? this.options.fontSize : e.prototype.fontSize.call(this, t);
|
|
37
|
+
}, t.prototype.fontFamily = function(t) {
|
|
38
|
+
return n.badCSS ? this.options.fontFamily : e.prototype.fontFamily.call(this, t);
|
|
39
|
+
}, t.prototype.nodeSize = function(r, i, a) {
|
|
40
|
+
if (i === void 0 && (i = 1), a === void 0 && (a = null), !n.badSizes) return e.prototype.nodeSize.call(this, r, i, a);
|
|
41
|
+
var o = this.textContent(r), s = Array.from(o.replace(t.cjkPattern, "")).length;
|
|
42
|
+
return [(Array.from(o).length - s) * this.options.cjkCharWidth + s * this.options.unknownCharWidth, this.options.unknownCharHeight];
|
|
43
|
+
}, t.prototype.nodeBBox = function(t) {
|
|
44
|
+
return n.badSizes ? {
|
|
45
|
+
left: 0,
|
|
46
|
+
right: 0,
|
|
47
|
+
top: 0,
|
|
48
|
+
bottom: 0
|
|
49
|
+
} : e.prototype.nodeBBox.call(this, t);
|
|
50
|
+
}, t;
|
|
51
|
+
}(e), r.OPTIONS = a(a({}, n.badCSS ? {
|
|
52
|
+
fontSize: 16,
|
|
53
|
+
fontFamily: "Times"
|
|
54
|
+
} : {}), n.badSizes ? {
|
|
55
|
+
cjkCharWidth: 1,
|
|
56
|
+
unknownCharWidth: .6,
|
|
57
|
+
unknownCharHeight: .8
|
|
58
|
+
} : {}), r.cjkPattern = new RegExp([
|
|
59
|
+
"[",
|
|
60
|
+
"ᄀ-ᅟ",
|
|
61
|
+
"〈〉",
|
|
62
|
+
"⺀-〾",
|
|
63
|
+
"-㉇",
|
|
64
|
+
"㉐-䶿",
|
|
65
|
+
"一-꓆",
|
|
66
|
+
"ꥠ-ꥼ",
|
|
67
|
+
"가-힣",
|
|
68
|
+
"豈-",
|
|
69
|
+
"︐-︙",
|
|
70
|
+
"︰-﹫",
|
|
71
|
+
"!-⦆¢-₩",
|
|
72
|
+
"𛀀-𛀁",
|
|
73
|
+
"🈀-🉑",
|
|
74
|
+
"𠀀-",
|
|
75
|
+
"]"
|
|
76
|
+
].join(""), "gu"), r;
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
877: function(e, t, n) {
|
|
80
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.LiteDocument = void 0;
|
|
81
|
+
var r = n(946);
|
|
82
|
+
t.LiteDocument = function() {
|
|
83
|
+
function e() {
|
|
84
|
+
this.root = new r.LiteElement("html", {}, [this.head = new r.LiteElement("head"), this.body = new r.LiteElement("body")]), this.type = "";
|
|
85
|
+
}
|
|
86
|
+
return Object.defineProperty(e.prototype, "kind", {
|
|
87
|
+
get: function() {
|
|
88
|
+
return "#document";
|
|
89
|
+
},
|
|
90
|
+
enumerable: !1,
|
|
91
|
+
configurable: !0
|
|
92
|
+
}), e;
|
|
93
|
+
}();
|
|
94
|
+
},
|
|
95
|
+
946: function(e, t) {
|
|
96
|
+
var n = this && this.__assign || function() {
|
|
97
|
+
return n = Object.assign || function(e) {
|
|
98
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
99
|
+
return e;
|
|
100
|
+
}, n.apply(this, arguments);
|
|
101
|
+
}, r = this && this.__read || function(e, t) {
|
|
102
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
103
|
+
if (!n) return e;
|
|
104
|
+
var r, i, a = n.call(e), o = [];
|
|
105
|
+
try {
|
|
106
|
+
for (; (t === void 0 || t-- > 0) && !(r = a.next()).done;) o.push(r.value);
|
|
107
|
+
} catch (e) {
|
|
108
|
+
i = { error: e };
|
|
109
|
+
} finally {
|
|
110
|
+
try {
|
|
111
|
+
r && !r.done && (n = a.return) && n.call(a);
|
|
112
|
+
} finally {
|
|
113
|
+
if (i) throw i.error;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return o;
|
|
117
|
+
}, i = this && this.__spreadArray || function(e, t, n) {
|
|
118
|
+
if (n || arguments.length === 2) for (var r, i = 0, a = t.length; i < a; i++) !r && i in t || (r ||= Array.prototype.slice.call(t, 0, i), r[i] = t[i]);
|
|
119
|
+
return e.concat(r || Array.prototype.slice.call(t));
|
|
120
|
+
}, a = this && this.__values || function(e) {
|
|
121
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
122
|
+
if (n) return n.call(e);
|
|
123
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
124
|
+
return e && r >= e.length && (e = void 0), {
|
|
125
|
+
value: e && e[r++],
|
|
126
|
+
done: !e
|
|
127
|
+
};
|
|
128
|
+
} };
|
|
129
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
130
|
+
};
|
|
131
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.LiteElement = void 0, t.LiteElement = function(e, t, o) {
|
|
132
|
+
var s, c;
|
|
133
|
+
t === void 0 && (t = {}), o === void 0 && (o = []), this.kind = e, this.attributes = n({}, t), this.children = i([], r(o), !1);
|
|
134
|
+
try {
|
|
135
|
+
for (var l = a(this.children), u = l.next(); !u.done; u = l.next()) u.value.parent = this;
|
|
136
|
+
} catch (e) {
|
|
137
|
+
s = { error: e };
|
|
138
|
+
} finally {
|
|
139
|
+
try {
|
|
140
|
+
u && !u.done && (c = l.return) && c.call(l);
|
|
141
|
+
} finally {
|
|
142
|
+
if (s) throw s.error;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
this.styles = null;
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
6: function(e, t) {
|
|
149
|
+
var n = this && this.__read || function(e, t) {
|
|
150
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
151
|
+
if (!n) return e;
|
|
152
|
+
var r, i, a = n.call(e), o = [];
|
|
153
|
+
try {
|
|
154
|
+
for (; (t === void 0 || t-- > 0) && !(r = a.next()).done;) o.push(r.value);
|
|
155
|
+
} catch (e) {
|
|
156
|
+
i = { error: e };
|
|
157
|
+
} finally {
|
|
158
|
+
try {
|
|
159
|
+
r && !r.done && (n = a.return) && n.call(a);
|
|
160
|
+
} finally {
|
|
161
|
+
if (i) throw i.error;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return o;
|
|
165
|
+
}, r = this && this.__spreadArray || function(e, t, n) {
|
|
166
|
+
if (n || arguments.length === 2) for (var r, i = 0, a = t.length; i < a; i++) !r && i in t || (r ||= Array.prototype.slice.call(t, 0, i), r[i] = t[i]);
|
|
167
|
+
return e.concat(r || Array.prototype.slice.call(t));
|
|
168
|
+
};
|
|
169
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.LiteList = void 0, t.LiteList = function() {
|
|
170
|
+
function e(e) {
|
|
171
|
+
this.nodes = [], this.nodes = r([], n(e), !1);
|
|
172
|
+
}
|
|
173
|
+
return e.prototype.append = function(e) {
|
|
174
|
+
this.nodes.push(e);
|
|
175
|
+
}, e.prototype[Symbol.iterator] = function() {
|
|
176
|
+
var e = 0;
|
|
177
|
+
return { next: function() {
|
|
178
|
+
return e === this.nodes.length ? {
|
|
179
|
+
value: null,
|
|
180
|
+
done: !0
|
|
181
|
+
} : {
|
|
182
|
+
value: this.nodes[e++],
|
|
183
|
+
done: !1
|
|
184
|
+
};
|
|
185
|
+
} };
|
|
186
|
+
}, e;
|
|
187
|
+
}();
|
|
188
|
+
},
|
|
189
|
+
246: function(e, t, n) {
|
|
190
|
+
var r = this && this.__createBinding || (Object.create ? function(e, t, n, r) {
|
|
191
|
+
r === void 0 && (r = n);
|
|
192
|
+
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
193
|
+
i && !("get" in i ? !t.__esModule : i.writable || i.configurable) || (i = {
|
|
194
|
+
enumerable: !0,
|
|
195
|
+
get: function() {
|
|
196
|
+
return t[n];
|
|
197
|
+
}
|
|
198
|
+
}), Object.defineProperty(e, r, i);
|
|
199
|
+
} : function(e, t, n, r) {
|
|
200
|
+
r === void 0 && (r = n), e[r] = t[n];
|
|
201
|
+
}), i = this && this.__setModuleDefault || (Object.create ? function(e, t) {
|
|
202
|
+
Object.defineProperty(e, "default", {
|
|
203
|
+
enumerable: !0,
|
|
204
|
+
value: t
|
|
205
|
+
});
|
|
206
|
+
} : function(e, t) {
|
|
207
|
+
e.default = t;
|
|
208
|
+
}), a = this && this.__importStar || function(e) {
|
|
209
|
+
if (e && e.__esModule) return e;
|
|
210
|
+
var t = {};
|
|
211
|
+
if (e != null) for (var n in e) n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && r(t, e, n);
|
|
212
|
+
return i(t, e), t;
|
|
213
|
+
}, o = this && this.__read || function(e, t) {
|
|
214
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
215
|
+
if (!n) return e;
|
|
216
|
+
var r, i, a = n.call(e), o = [];
|
|
217
|
+
try {
|
|
218
|
+
for (; (t === void 0 || t-- > 0) && !(r = a.next()).done;) o.push(r.value);
|
|
219
|
+
} catch (e) {
|
|
220
|
+
i = { error: e };
|
|
221
|
+
} finally {
|
|
222
|
+
try {
|
|
223
|
+
r && !r.done && (n = a.return) && n.call(a);
|
|
224
|
+
} finally {
|
|
225
|
+
if (i) throw i.error;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return o;
|
|
229
|
+
}, s = this && this.__values || function(e) {
|
|
230
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
231
|
+
if (n) return n.call(e);
|
|
232
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
233
|
+
return e && r >= e.length && (e = void 0), {
|
|
234
|
+
value: e && e[r++],
|
|
235
|
+
done: !e
|
|
236
|
+
};
|
|
237
|
+
} };
|
|
238
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
239
|
+
};
|
|
240
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.LiteParser = t.PATTERNS = void 0;
|
|
241
|
+
var c, l = a(n(29)), u = n(946), d = n(735);
|
|
242
|
+
(function(e) {
|
|
243
|
+
e.TAGNAME = "[a-z][^\\s\\n>]*", e.ATTNAME = "[a-z][^\\s\\n>=]*", e.VALUE = "(?:'[^']*'|\"[^\"]*\"|[^\\s\\n]+)", e.VALUESPLIT = "(?:'([^']*)'|\"([^\"]*)\"|([^\\s\\n]+))", e.SPACE = "(?:\\s|\\n)+", e.OPTIONALSPACE = "(?:\\s|\\n)*", e.ATTRIBUTE = e.ATTNAME + "(?:" + e.OPTIONALSPACE + "=" + e.OPTIONALSPACE + e.VALUE + ")?", e.ATTRIBUTESPLIT = "(" + e.ATTNAME + ")(?:" + e.OPTIONALSPACE + "=" + e.OPTIONALSPACE + e.VALUESPLIT + ")?", e.TAG = "(<(?:" + e.TAGNAME + "(?:" + e.SPACE + e.ATTRIBUTE + ")*" + e.OPTIONALSPACE + "/?|/" + e.TAGNAME + "|!--[^]*?--|![^]*?)(?:>|$))", e.tag = new RegExp(e.TAG, "i"), e.attr = new RegExp(e.ATTRIBUTE, "i"), e.attrsplit = new RegExp(e.ATTRIBUTESPLIT, "i");
|
|
244
|
+
})(c = t.PATTERNS ||= {}), t.LiteParser = function() {
|
|
245
|
+
function e() {}
|
|
246
|
+
return e.prototype.parseFromString = function(e, t, n) {
|
|
247
|
+
t === void 0 && (t = "text/html"), n === void 0 && (n = null);
|
|
248
|
+
for (var r = n.createDocument(), i = n.body(r), a = e.replace(/<\?.*?\?>/g, "").split(c.tag); a.length;) {
|
|
249
|
+
var o = a.shift(), s = a.shift();
|
|
250
|
+
o && this.addText(n, i, o), s && s.charAt(s.length - 1) === ">" && (s.charAt(1) === "!" ? this.addComment(n, i, s) : i = s.charAt(1) === "/" ? this.closeTag(n, i, s) : this.openTag(n, i, s, a));
|
|
251
|
+
}
|
|
252
|
+
return this.checkDocument(n, r), r;
|
|
253
|
+
}, e.prototype.addText = function(e, t, n) {
|
|
254
|
+
return n = l.translate(n), e.append(t, e.text(n));
|
|
255
|
+
}, e.prototype.addComment = function(e, t, n) {
|
|
256
|
+
return e.append(t, new d.LiteComment(n));
|
|
257
|
+
}, e.prototype.closeTag = function(e, t, n) {
|
|
258
|
+
for (var r = n.slice(2, n.length - 1).toLowerCase(); e.parent(t) && e.kind(t) !== r;) t = e.parent(t);
|
|
259
|
+
return e.parent(t);
|
|
260
|
+
}, e.prototype.openTag = function(e, t, n, r) {
|
|
261
|
+
var i = this.constructor.PCDATA, a = this.constructor.SELF_CLOSING, o = n.match(/<(.*?)[\s\n>\/]/)[1].toLowerCase(), s = e.node(o), l = n.replace(/^<.*?[\s\n>]/, "").split(c.attrsplit);
|
|
262
|
+
return (l.pop().match(/>$/) || l.length < 5) && (this.addAttributes(e, s, l), e.append(t, s), a[o] || n.match(/\/>$/) || (i[o] ? this.handlePCDATA(e, s, o, r) : t = s)), t;
|
|
263
|
+
}, e.prototype.addAttributes = function(e, t, n) {
|
|
264
|
+
for (var r = this.constructor.CDATA_ATTR; n.length;) {
|
|
265
|
+
var i = o(n.splice(0, 5), 5), a = i[1], s = i[2], c = i[3], u = i[4], d = s || c || u || "";
|
|
266
|
+
r[a] || (d = l.translate(d)), e.setAttribute(t, a, d);
|
|
267
|
+
}
|
|
268
|
+
}, e.prototype.handlePCDATA = function(e, t, n, r) {
|
|
269
|
+
for (var i = [], a = "</" + n + ">", o = ""; r.length && o !== a;) i.push(o), i.push(r.shift()), o = r.shift();
|
|
270
|
+
e.append(t, e.text(i.join("")));
|
|
271
|
+
}, e.prototype.checkDocument = function(e, t) {
|
|
272
|
+
var n, r, i, a, o = this.getOnlyChild(e, e.body(t));
|
|
273
|
+
if (o) {
|
|
274
|
+
try {
|
|
275
|
+
for (var c = s(e.childNodes(e.body(t))), l = c.next(); !l.done && (p = l.value) !== o; l = c.next()) p instanceof d.LiteComment && p.value.match(/^<!DOCTYPE/) && (t.type = p.value);
|
|
276
|
+
} catch (e) {
|
|
277
|
+
n = { error: e };
|
|
278
|
+
} finally {
|
|
279
|
+
try {
|
|
280
|
+
l && !l.done && (r = c.return) && r.call(c);
|
|
281
|
+
} finally {
|
|
282
|
+
if (n) throw n.error;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
switch (e.kind(o)) {
|
|
286
|
+
case "html":
|
|
287
|
+
try {
|
|
288
|
+
for (var u = s(o.children), f = u.next(); !f.done; f = u.next()) {
|
|
289
|
+
var p = f.value;
|
|
290
|
+
switch (e.kind(p)) {
|
|
291
|
+
case "head":
|
|
292
|
+
t.head = p;
|
|
293
|
+
break;
|
|
294
|
+
case "body": t.body = p;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
} catch (e) {
|
|
298
|
+
i = { error: e };
|
|
299
|
+
} finally {
|
|
300
|
+
try {
|
|
301
|
+
f && !f.done && (a = u.return) && a.call(u);
|
|
302
|
+
} finally {
|
|
303
|
+
if (i) throw i.error;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
t.root = o, e.remove(o), e.parent(t.body) !== o && e.append(o, t.body), e.parent(t.head) !== o && e.insert(t.head, t.body);
|
|
307
|
+
break;
|
|
308
|
+
case "head":
|
|
309
|
+
t.head = e.replace(o, t.head);
|
|
310
|
+
break;
|
|
311
|
+
case "body": t.body = e.replace(o, t.body);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}, e.prototype.getOnlyChild = function(e, t) {
|
|
315
|
+
var n, r, i = null;
|
|
316
|
+
try {
|
|
317
|
+
for (var a = s(e.childNodes(t)), o = a.next(); !o.done; o = a.next()) {
|
|
318
|
+
var c = o.value;
|
|
319
|
+
if (c instanceof u.LiteElement) {
|
|
320
|
+
if (i) return null;
|
|
321
|
+
i = c;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
} catch (e) {
|
|
325
|
+
n = { error: e };
|
|
326
|
+
} finally {
|
|
327
|
+
try {
|
|
328
|
+
o && !o.done && (r = a.return) && r.call(a);
|
|
329
|
+
} finally {
|
|
330
|
+
if (n) throw n.error;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return i;
|
|
334
|
+
}, e.prototype.serialize = function(e, t, n) {
|
|
335
|
+
var r = this;
|
|
336
|
+
n === void 0 && (n = !1);
|
|
337
|
+
var i = this.constructor.SELF_CLOSING, a = this.constructor.CDATA_ATTR, o = e.kind(t), s = e.allAttributes(t).map((function(e) {
|
|
338
|
+
return e.name + "=\"" + (a[e.name] ? e.value : r.protectAttribute(e.value)) + "\"";
|
|
339
|
+
})).join(" "), c = this.serializeInner(e, t, n);
|
|
340
|
+
return "<" + o + (s ? " " + s : "") + (n && !c || i[o] ? n ? "/>" : ">" : `>${c}</${o}>`);
|
|
341
|
+
}, e.prototype.serializeInner = function(e, t, n) {
|
|
342
|
+
var r = this;
|
|
343
|
+
return n === void 0 && (n = !1), this.constructor.PCDATA.hasOwnProperty(t.kind) ? e.childNodes(t).map((function(t) {
|
|
344
|
+
return e.value(t);
|
|
345
|
+
})).join("") : e.childNodes(t).map((function(t) {
|
|
346
|
+
var i = e.kind(t);
|
|
347
|
+
return i === "#text" ? r.protectHTML(e.value(t)) : i === "#comment" ? t.value : r.serialize(e, t, n);
|
|
348
|
+
})).join("");
|
|
349
|
+
}, e.prototype.protectAttribute = function(e) {
|
|
350
|
+
return typeof e != "string" && (e = String(e)), e.replace(/"/g, """);
|
|
351
|
+
}, e.prototype.protectHTML = function(e) {
|
|
352
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
353
|
+
}, e.SELF_CLOSING = {
|
|
354
|
+
area: !0,
|
|
355
|
+
base: !0,
|
|
356
|
+
br: !0,
|
|
357
|
+
col: !0,
|
|
358
|
+
command: !0,
|
|
359
|
+
embed: !0,
|
|
360
|
+
hr: !0,
|
|
361
|
+
img: !0,
|
|
362
|
+
input: !0,
|
|
363
|
+
keygen: !0,
|
|
364
|
+
link: !0,
|
|
365
|
+
menuitem: !0,
|
|
366
|
+
meta: !0,
|
|
367
|
+
param: !0,
|
|
368
|
+
source: !0,
|
|
369
|
+
track: !0,
|
|
370
|
+
wbr: !0
|
|
371
|
+
}, e.PCDATA = {
|
|
372
|
+
option: !0,
|
|
373
|
+
textarea: !0,
|
|
374
|
+
fieldset: !0,
|
|
375
|
+
title: !0,
|
|
376
|
+
style: !0,
|
|
377
|
+
script: !0
|
|
378
|
+
}, e.CDATA_ATTR = {
|
|
379
|
+
style: !0,
|
|
380
|
+
datafld: !0,
|
|
381
|
+
datasrc: !0,
|
|
382
|
+
href: !0,
|
|
383
|
+
src: !0,
|
|
384
|
+
longdesc: !0,
|
|
385
|
+
usemap: !0,
|
|
386
|
+
cite: !0,
|
|
387
|
+
datetime: !0,
|
|
388
|
+
action: !0,
|
|
389
|
+
axis: !0,
|
|
390
|
+
profile: !0,
|
|
391
|
+
content: !0,
|
|
392
|
+
scheme: !0
|
|
393
|
+
}, e;
|
|
394
|
+
}();
|
|
395
|
+
},
|
|
396
|
+
735: function(e, t) {
|
|
397
|
+
var n, r = this && this.__extends || (n = function(e, t) {
|
|
398
|
+
return n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
399
|
+
e.__proto__ = t;
|
|
400
|
+
} || function(e, t) {
|
|
401
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
402
|
+
}, n(e, t);
|
|
403
|
+
}, function(e, t) {
|
|
404
|
+
if (typeof t != "function" && t !== null) throw TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
405
|
+
function r() {
|
|
406
|
+
this.constructor = e;
|
|
407
|
+
}
|
|
408
|
+
n(e, t), e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
|
|
409
|
+
});
|
|
410
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.LiteComment = t.LiteText = void 0;
|
|
411
|
+
var i = function() {
|
|
412
|
+
function e(e) {
|
|
413
|
+
e === void 0 && (e = ""), this.value = e;
|
|
414
|
+
}
|
|
415
|
+
return Object.defineProperty(e.prototype, "kind", {
|
|
416
|
+
get: function() {
|
|
417
|
+
return "#text";
|
|
418
|
+
},
|
|
419
|
+
enumerable: !1,
|
|
420
|
+
configurable: !0
|
|
421
|
+
}), e;
|
|
422
|
+
}();
|
|
423
|
+
t.LiteText = i, t.LiteComment = function(e) {
|
|
424
|
+
function t() {
|
|
425
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
426
|
+
}
|
|
427
|
+
return r(t, e), Object.defineProperty(t.prototype, "kind", {
|
|
428
|
+
get: function() {
|
|
429
|
+
return "#comment";
|
|
430
|
+
},
|
|
431
|
+
enumerable: !1,
|
|
432
|
+
configurable: !0
|
|
433
|
+
}), t;
|
|
434
|
+
}(i);
|
|
435
|
+
},
|
|
436
|
+
492: function(e, t, n) {
|
|
437
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.LiteWindow = void 0;
|
|
438
|
+
var r = n(946), i = n(877), a = n(6), o = n(246);
|
|
439
|
+
t.LiteWindow = function() {
|
|
440
|
+
this.DOMParser = o.LiteParser, this.NodeList = a.LiteList, this.HTMLCollection = a.LiteList, this.HTMLElement = r.LiteElement, this.DocumentFragment = a.LiteList, this.Document = i.LiteDocument, this.document = new i.LiteDocument();
|
|
441
|
+
};
|
|
442
|
+
},
|
|
443
|
+
250: function(e, t, n) {
|
|
444
|
+
var r, i = this && this.__extends || (r = function(e, t) {
|
|
445
|
+
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
446
|
+
e.__proto__ = t;
|
|
447
|
+
} || function(e, t) {
|
|
448
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
449
|
+
}, r(e, t);
|
|
450
|
+
}, function(e, t) {
|
|
451
|
+
if (typeof t != "function" && t !== null) throw TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
452
|
+
function n() {
|
|
453
|
+
this.constructor = e;
|
|
454
|
+
}
|
|
455
|
+
r(e, t), e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
456
|
+
}), a = this && this.__assign || function() {
|
|
457
|
+
return a = Object.assign || function(e) {
|
|
458
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
459
|
+
return e;
|
|
460
|
+
}, a.apply(this, arguments);
|
|
461
|
+
}, o = this && this.__values || function(e) {
|
|
462
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
463
|
+
if (n) return n.call(e);
|
|
464
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
465
|
+
return e && r >= e.length && (e = void 0), {
|
|
466
|
+
value: e && e[r++],
|
|
467
|
+
done: !e
|
|
468
|
+
};
|
|
469
|
+
} };
|
|
470
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
471
|
+
}, s = this && this.__read || function(e, t) {
|
|
472
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
473
|
+
if (!n) return e;
|
|
474
|
+
var r, i, a = n.call(e), o = [];
|
|
475
|
+
try {
|
|
476
|
+
for (; (t === void 0 || t-- > 0) && !(r = a.next()).done;) o.push(r.value);
|
|
477
|
+
} catch (e) {
|
|
478
|
+
i = { error: e };
|
|
479
|
+
} finally {
|
|
480
|
+
try {
|
|
481
|
+
r && !r.done && (n = a.return) && n.call(a);
|
|
482
|
+
} finally {
|
|
483
|
+
if (i) throw i.error;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
return o;
|
|
487
|
+
}, c = this && this.__spreadArray || function(e, t, n) {
|
|
488
|
+
if (n || arguments.length === 2) for (var r, i = 0, a = t.length; i < a; i++) !r && i in t || (r ||= Array.prototype.slice.call(t, 0, i), r[i] = t[i]);
|
|
489
|
+
return e.concat(r || Array.prototype.slice.call(t));
|
|
490
|
+
};
|
|
491
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.liteAdaptor = t.LiteAdaptor = t.LiteBase = void 0;
|
|
492
|
+
var l = n(857), u = n(244), d = n(877), f = n(946), p = n(735), m = n(492), h = n(246), g = n(878), _ = function(e) {
|
|
493
|
+
function t() {
|
|
494
|
+
var t = e.call(this) || this;
|
|
495
|
+
return t.parser = new h.LiteParser(), t.window = new m.LiteWindow(), t;
|
|
496
|
+
}
|
|
497
|
+
return i(t, e), t.prototype.parse = function(e, t) {
|
|
498
|
+
return this.parser.parseFromString(e, t, this);
|
|
499
|
+
}, t.prototype.create = function(e, t) {
|
|
500
|
+
return t === void 0 && (t = null), new f.LiteElement(e);
|
|
501
|
+
}, t.prototype.text = function(e) {
|
|
502
|
+
return new p.LiteText(e);
|
|
503
|
+
}, t.prototype.comment = function(e) {
|
|
504
|
+
return new p.LiteComment(e);
|
|
505
|
+
}, t.prototype.createDocument = function() {
|
|
506
|
+
return new d.LiteDocument();
|
|
507
|
+
}, t.prototype.head = function(e) {
|
|
508
|
+
return e.head;
|
|
509
|
+
}, t.prototype.body = function(e) {
|
|
510
|
+
return e.body;
|
|
511
|
+
}, t.prototype.root = function(e) {
|
|
512
|
+
return e.root;
|
|
513
|
+
}, t.prototype.doctype = function(e) {
|
|
514
|
+
return e.type;
|
|
515
|
+
}, t.prototype.tags = function(e, t, n) {
|
|
516
|
+
n === void 0 && (n = null);
|
|
517
|
+
var r = [], i = [];
|
|
518
|
+
if (n) return i;
|
|
519
|
+
for (var a = e; a;) {
|
|
520
|
+
var o = a.kind;
|
|
521
|
+
o !== "#text" && o !== "#comment" && (a = a, o === t && i.push(a), a.children.length && (r = a.children.concat(r))), a = r.shift();
|
|
522
|
+
}
|
|
523
|
+
return i;
|
|
524
|
+
}, t.prototype.elementById = function(e, t) {
|
|
525
|
+
for (var n = [], r = e; r;) {
|
|
526
|
+
if (r.kind !== "#text" && r.kind !== "#comment") {
|
|
527
|
+
if ((r = r).attributes.id === t) return r;
|
|
528
|
+
r.children.length && (n = r.children.concat(n));
|
|
529
|
+
}
|
|
530
|
+
r = n.shift();
|
|
531
|
+
}
|
|
532
|
+
return null;
|
|
533
|
+
}, t.prototype.elementsByClass = function(e, t) {
|
|
534
|
+
for (var n = [], r = [], i = e; i;) i.kind !== "#text" && i.kind !== "#comment" && (((i = i).attributes.class || "").trim().split(/ +/).includes(t) && r.push(i), i.children.length && (n = i.children.concat(n))), i = n.shift();
|
|
535
|
+
return r;
|
|
536
|
+
}, t.prototype.getElements = function(e, t) {
|
|
537
|
+
var n, r, i = [], a = this.body(t);
|
|
538
|
+
try {
|
|
539
|
+
for (var s = o(e), c = s.next(); !c.done; c = s.next()) {
|
|
540
|
+
var l = c.value;
|
|
541
|
+
if (typeof l == "string") if (l.charAt(0) === "#") {
|
|
542
|
+
var u = this.elementById(a, l.slice(1));
|
|
543
|
+
u && i.push(u);
|
|
544
|
+
} else l.charAt(0) === "." ? i = i.concat(this.elementsByClass(a, l.slice(1))) : l.match(/^[-a-z][-a-z0-9]*$/i) && (i = i.concat(this.tags(a, l)));
|
|
545
|
+
else Array.isArray(l) ? i = i.concat(l) : l instanceof this.window.NodeList || l instanceof this.window.HTMLCollection ? i = i.concat(l.nodes) : i.push(l);
|
|
546
|
+
}
|
|
547
|
+
} catch (e) {
|
|
548
|
+
n = { error: e };
|
|
549
|
+
} finally {
|
|
550
|
+
try {
|
|
551
|
+
c && !c.done && (r = s.return) && r.call(s);
|
|
552
|
+
} finally {
|
|
553
|
+
if (n) throw n.error;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
return i;
|
|
557
|
+
}, t.prototype.contains = function(e, t) {
|
|
558
|
+
for (; t && t !== e;) t = this.parent(t);
|
|
559
|
+
return !!t;
|
|
560
|
+
}, t.prototype.parent = function(e) {
|
|
561
|
+
return e.parent;
|
|
562
|
+
}, t.prototype.childIndex = function(e) {
|
|
563
|
+
return e.parent ? e.parent.children.findIndex((function(t) {
|
|
564
|
+
return t === e;
|
|
565
|
+
})) : -1;
|
|
566
|
+
}, t.prototype.append = function(e, t) {
|
|
567
|
+
return t.parent && this.remove(t), e.children.push(t), t.parent = e, t;
|
|
568
|
+
}, t.prototype.insert = function(e, t) {
|
|
569
|
+
if (e.parent && this.remove(e), t && t.parent) {
|
|
570
|
+
var n = this.childIndex(t);
|
|
571
|
+
t.parent.children.splice(n, 0, e), e.parent = t.parent;
|
|
572
|
+
}
|
|
573
|
+
}, t.prototype.remove = function(e) {
|
|
574
|
+
var t = this.childIndex(e);
|
|
575
|
+
return t >= 0 && e.parent.children.splice(t, 1), e.parent = null, e;
|
|
576
|
+
}, t.prototype.replace = function(e, t) {
|
|
577
|
+
var n = this.childIndex(t);
|
|
578
|
+
return n >= 0 && (t.parent.children[n] = e, e.parent = t.parent, t.parent = null), t;
|
|
579
|
+
}, t.prototype.clone = function(e) {
|
|
580
|
+
var t = this, n = new f.LiteElement(e.kind);
|
|
581
|
+
return n.attributes = a({}, e.attributes), n.children = e.children.map((function(e) {
|
|
582
|
+
if (e.kind === "#text") return new p.LiteText(e.value);
|
|
583
|
+
if (e.kind === "#comment") return new p.LiteComment(e.value);
|
|
584
|
+
var r = t.clone(e);
|
|
585
|
+
return r.parent = n, r;
|
|
586
|
+
})), n;
|
|
587
|
+
}, t.prototype.split = function(e, t) {
|
|
588
|
+
var n = new p.LiteText(e.value.slice(t));
|
|
589
|
+
return e.value = e.value.slice(0, t), e.parent.children.splice(this.childIndex(e) + 1, 0, n), n.parent = e.parent, n;
|
|
590
|
+
}, t.prototype.next = function(e) {
|
|
591
|
+
var t = e.parent;
|
|
592
|
+
if (!t) return null;
|
|
593
|
+
var n = this.childIndex(e) + 1;
|
|
594
|
+
return n >= 0 && n < t.children.length ? t.children[n] : null;
|
|
595
|
+
}, t.prototype.previous = function(e) {
|
|
596
|
+
var t = e.parent;
|
|
597
|
+
if (!t) return null;
|
|
598
|
+
var n = this.childIndex(e) - 1;
|
|
599
|
+
return n >= 0 ? t.children[n] : null;
|
|
600
|
+
}, t.prototype.firstChild = function(e) {
|
|
601
|
+
return e.children[0];
|
|
602
|
+
}, t.prototype.lastChild = function(e) {
|
|
603
|
+
return e.children[e.children.length - 1];
|
|
604
|
+
}, t.prototype.childNodes = function(e) {
|
|
605
|
+
return c([], s(e.children), !1);
|
|
606
|
+
}, t.prototype.childNode = function(e, t) {
|
|
607
|
+
return e.children[t];
|
|
608
|
+
}, t.prototype.kind = function(e) {
|
|
609
|
+
return e.kind;
|
|
610
|
+
}, t.prototype.value = function(e) {
|
|
611
|
+
return e.kind === "#text" ? e.value : e.kind === "#comment" ? e.value.replace(/^<!(--)?((?:.|\n)*)\1>$/, "$2") : "";
|
|
612
|
+
}, t.prototype.textContent = function(e) {
|
|
613
|
+
var t = this;
|
|
614
|
+
return e.children.reduce((function(e, n) {
|
|
615
|
+
return e + (n.kind === "#text" ? n.value : n.kind === "#comment" ? "" : t.textContent(n));
|
|
616
|
+
}), "");
|
|
617
|
+
}, t.prototype.innerHTML = function(e) {
|
|
618
|
+
return this.parser.serializeInner(this, e);
|
|
619
|
+
}, t.prototype.outerHTML = function(e) {
|
|
620
|
+
return this.parser.serialize(this, e);
|
|
621
|
+
}, t.prototype.serializeXML = function(e) {
|
|
622
|
+
return this.parser.serialize(this, e, !0);
|
|
623
|
+
}, t.prototype.setAttribute = function(e, t, n, r) {
|
|
624
|
+
r === void 0 && (r = null), typeof n != "string" && (n = String(n)), r && (t = r.replace(/.*\//, "") + ":" + t.replace(/^.*:/, "")), e.attributes[t] = n, t === "style" && (e.styles = null);
|
|
625
|
+
}, t.prototype.getAttribute = function(e, t) {
|
|
626
|
+
return e.attributes[t];
|
|
627
|
+
}, t.prototype.removeAttribute = function(e, t) {
|
|
628
|
+
delete e.attributes[t];
|
|
629
|
+
}, t.prototype.hasAttribute = function(e, t) {
|
|
630
|
+
return e.attributes.hasOwnProperty(t);
|
|
631
|
+
}, t.prototype.allAttributes = function(e) {
|
|
632
|
+
var t, n, r = e.attributes, i = [];
|
|
633
|
+
try {
|
|
634
|
+
for (var a = o(Object.keys(r)), s = a.next(); !s.done; s = a.next()) {
|
|
635
|
+
var c = s.value;
|
|
636
|
+
i.push({
|
|
637
|
+
name: c,
|
|
638
|
+
value: r[c]
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
} catch (e) {
|
|
642
|
+
t = { error: e };
|
|
643
|
+
} finally {
|
|
644
|
+
try {
|
|
645
|
+
s && !s.done && (n = a.return) && n.call(a);
|
|
646
|
+
} finally {
|
|
647
|
+
if (t) throw t.error;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
return i;
|
|
651
|
+
}, t.prototype.addClass = function(e, t) {
|
|
652
|
+
var n = (e.attributes.class || "").split(/ /);
|
|
653
|
+
n.find((function(e) {
|
|
654
|
+
return e === t;
|
|
655
|
+
})) || (n.push(t), e.attributes.class = n.join(" "));
|
|
656
|
+
}, t.prototype.removeClass = function(e, t) {
|
|
657
|
+
var n = (e.attributes.class || "").split(/ /), r = n.findIndex((function(e) {
|
|
658
|
+
return e === t;
|
|
659
|
+
}));
|
|
660
|
+
r >= 0 && (n.splice(r, 1), e.attributes.class = n.join(" "));
|
|
661
|
+
}, t.prototype.hasClass = function(e, t) {
|
|
662
|
+
return !!(e.attributes.class || "").split(/ /).find((function(e) {
|
|
663
|
+
return e === t;
|
|
664
|
+
}));
|
|
665
|
+
}, t.prototype.setStyle = function(e, t, n) {
|
|
666
|
+
e.styles ||= new g.Styles(this.getAttribute(e, "style")), e.styles.set(t, n), e.attributes.style = e.styles.cssText;
|
|
667
|
+
}, t.prototype.getStyle = function(e, t) {
|
|
668
|
+
if (!e.styles) {
|
|
669
|
+
var n = this.getAttribute(e, "style");
|
|
670
|
+
if (!n) return "";
|
|
671
|
+
e.styles = new g.Styles(n);
|
|
672
|
+
}
|
|
673
|
+
return e.styles.get(t);
|
|
674
|
+
}, t.prototype.allStyles = function(e) {
|
|
675
|
+
return this.getAttribute(e, "style");
|
|
676
|
+
}, t.prototype.insertRules = function(e, t) {
|
|
677
|
+
e.children = [this.text(t.join("\n\n") + "\n\n" + this.textContent(e))];
|
|
678
|
+
}, t.prototype.fontSize = function(e) {
|
|
679
|
+
return 0;
|
|
680
|
+
}, t.prototype.fontFamily = function(e) {
|
|
681
|
+
return "";
|
|
682
|
+
}, t.prototype.nodeSize = function(e, t, n) {
|
|
683
|
+
return t === void 0 && (t = 1), n === void 0 && (n = null), [0, 0];
|
|
684
|
+
}, t.prototype.nodeBBox = function(e) {
|
|
685
|
+
return {
|
|
686
|
+
left: 0,
|
|
687
|
+
right: 0,
|
|
688
|
+
top: 0,
|
|
689
|
+
bottom: 0
|
|
690
|
+
};
|
|
691
|
+
}, t;
|
|
692
|
+
}(l.AbstractDOMAdaptor);
|
|
693
|
+
t.LiteBase = _;
|
|
694
|
+
var v = function(e) {
|
|
695
|
+
function t() {
|
|
696
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
697
|
+
}
|
|
698
|
+
return i(t, e), t;
|
|
699
|
+
}((0, u.NodeMixin)(_));
|
|
700
|
+
t.LiteAdaptor = v, t.liteAdaptor = function(e) {
|
|
701
|
+
return e === void 0 && (e = null), new v(null, e);
|
|
702
|
+
};
|
|
703
|
+
},
|
|
704
|
+
306: function(e, t) {
|
|
705
|
+
t.q = void 0, t.q = "3.2.2";
|
|
706
|
+
},
|
|
707
|
+
723: function(e, t) {
|
|
708
|
+
MathJax._.components.global.isObject, MathJax._.components.global.combineConfig, MathJax._.components.global.combineDefaults, t.r8 = MathJax._.components.global.combineWithMathJax, MathJax._.components.global.MathJax;
|
|
709
|
+
},
|
|
710
|
+
857: function(e, t) {
|
|
711
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.AbstractDOMAdaptor = MathJax._.core.DOMAdaptor.AbstractDOMAdaptor;
|
|
712
|
+
},
|
|
713
|
+
29: function(e, t) {
|
|
714
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.options = MathJax._.util.Entities.options, t.entities = MathJax._.util.Entities.entities, t.add = MathJax._.util.Entities.add, t.remove = MathJax._.util.Entities.remove, t.translate = MathJax._.util.Entities.translate, t.numeric = MathJax._.util.Entities.numeric;
|
|
715
|
+
},
|
|
716
|
+
77: function(e, t) {
|
|
717
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.isObject = MathJax._.util.Options.isObject, t.APPEND = MathJax._.util.Options.APPEND, t.REMOVE = MathJax._.util.Options.REMOVE, t.OPTIONS = MathJax._.util.Options.OPTIONS, t.Expandable = MathJax._.util.Options.Expandable, t.expandable = MathJax._.util.Options.expandable, t.makeArray = MathJax._.util.Options.makeArray, t.keys = MathJax._.util.Options.keys, t.copy = MathJax._.util.Options.copy, t.insert = MathJax._.util.Options.insert, t.defaultOptions = MathJax._.util.Options.defaultOptions, t.userOptions = MathJax._.util.Options.userOptions, t.selectOptions = MathJax._.util.Options.selectOptions, t.selectOptionsFromKeys = MathJax._.util.Options.selectOptionsFromKeys, t.separateOptions = MathJax._.util.Options.separateOptions, t.lookup = MathJax._.util.Options.lookup;
|
|
718
|
+
},
|
|
719
|
+
878: function(e, t) {
|
|
720
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.Styles = MathJax._.util.Styles.Styles;
|
|
721
|
+
}
|
|
722
|
+
}, u = {};
|
|
723
|
+
function d(e) {
|
|
724
|
+
var t = u[e];
|
|
725
|
+
if (t !== void 0) return t.exports;
|
|
726
|
+
var n = u[e] = { exports: {} };
|
|
727
|
+
return l[e].call(n.exports, n, n.exports, d), n.exports;
|
|
728
|
+
}
|
|
729
|
+
e = d(723), t = d(306), n = d(250), r = d(877), i = d(946), a = d(6), o = d(246), s = d(735), c = d(492), MathJax.loader && MathJax.loader.checkVersion("adaptors/liteDOM", t.q, "adaptors"), (0, e.r8)({ _: { adaptors: {
|
|
730
|
+
liteAdaptor: n,
|
|
731
|
+
lite: {
|
|
732
|
+
Document: r,
|
|
733
|
+
Element: i,
|
|
734
|
+
List: a,
|
|
735
|
+
Parser: o,
|
|
736
|
+
Text: s,
|
|
737
|
+
Window: c
|
|
738
|
+
}
|
|
739
|
+
} } }), MathJax.startup && (MathJax.startup.registerConstructor("liteAdaptor", n.liteAdaptor), MathJax.startup.useAdaptor("liteAdaptor", !0));
|
|
740
|
+
})();
|
|
741
|
+
//#endregion
|