@xwadex/fesd 0.0.42 → 0.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fesd-bundle.css +1 -1
- package/dist/fesd-bundle.js +338 -334
- package/dist/fesd-bundle.js.map +1 -1
- package/dist/image-preview-bundle.js +632 -598
- package/dist/image-preview-bundle.js.map +1 -1
- package/dist/tools-bundle.js +143 -142
- package/dist/tools-bundle.js.map +1 -1
- package/package.json +1 -1
package/dist/fesd-bundle.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
var be = (
|
|
2
|
-
if (!e.has(
|
|
1
|
+
var be = (s, e, t) => {
|
|
2
|
+
if (!e.has(s))
|
|
3
3
|
throw TypeError("Cannot " + t);
|
|
4
4
|
};
|
|
5
|
-
var m = (
|
|
6
|
-
if (e.has(
|
|
5
|
+
var m = (s, e, t) => {
|
|
6
|
+
if (e.has(s))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
e instanceof WeakSet ? e.add(
|
|
8
|
+
e instanceof WeakSet ? e.add(s) : e.set(s, t);
|
|
9
9
|
};
|
|
10
|
-
var
|
|
11
|
-
import { i as
|
|
12
|
-
import { A as
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
var h = (s, e, t) => (be(s, e, "access private method"), t);
|
|
11
|
+
import { i as te, a as V, g as T, v as we, c as ve, b as ye, d as $e, e as xe, f as Ae, s as ke } from "./image-preview-bundle.js";
|
|
12
|
+
import { A as je, j as Pe, C as Fe, h as Ue, D as Ve, m as Ye, I as Ge, k as Je, M as Ke, l as Qe, R as Ze, T as et } from "./image-preview-bundle.js";
|
|
13
|
+
import K from "jquery";
|
|
14
|
+
import { m as x, S as Se, p as Le } from "./vendor-bundle.js";
|
|
15
|
+
const L = () => {
|
|
16
|
+
const s = navigator.userAgent, e = {
|
|
16
17
|
// Firefox 1.0+
|
|
17
18
|
isFirefox: typeof InstallTrigger < "u",
|
|
18
19
|
// Opera 8.0+
|
|
19
|
-
isOpera: !!window.opr && !!opr.addons || !!window.opera ||
|
|
20
|
+
isOpera: !!window.opr && !!opr.addons || !!window.opera || s.indexOf(" OPR/") >= 0,
|
|
20
21
|
// Internet Explorer 6-11
|
|
21
22
|
isIE: (
|
|
22
23
|
/*@cc_on!@*/
|
|
@@ -25,60 +26,60 @@ const E = () => {
|
|
|
25
26
|
// Edge 20+
|
|
26
27
|
isEdge: !document.documentMode && !!window.StyleMedia,
|
|
27
28
|
// Edge (based on chromium) detection
|
|
28
|
-
isEdgeChromium: /\sedg\//i.test(
|
|
29
|
+
isEdgeChromium: /\sedg\//i.test(s) || /edg([ea]|ios)/i.test(s),
|
|
29
30
|
// Safari 3.0+ "[object HTMLElementConstructor]"
|
|
30
|
-
isSafari: !/chrome|crios|crmo/i.test(
|
|
31
|
+
isSafari: !/chrome|crios|crmo/i.test(s) && /safari/i.test(s),
|
|
31
32
|
// Chrome 1 - 79
|
|
32
|
-
isChrome: !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime) || /chrome|crios|crmo/i.test(
|
|
33
|
+
isChrome: !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime) || /chrome|crios|crmo/i.test(s)
|
|
33
34
|
}, t = {
|
|
34
35
|
// Android
|
|
35
|
-
isAndroid:
|
|
36
|
+
isAndroid: s.indexOf("Android") > -1 || s.indexOf("Adr") > -1,
|
|
36
37
|
// iOS | ipad
|
|
37
|
-
isiOS:
|
|
38
|
-
},
|
|
38
|
+
isiOS: s.indexOf("Mac") > -1 && "ontouchend" in document
|
|
39
|
+
}, r = {
|
|
39
40
|
// window
|
|
40
|
-
isWindows:
|
|
41
|
+
isWindows: s.indexOf("Win") > -1,
|
|
41
42
|
// macos
|
|
42
|
-
isMacOS:
|
|
43
|
+
isMacOS: s.indexOf("Mac") > -1,
|
|
43
44
|
// UNIX
|
|
44
|
-
isUNIX:
|
|
45
|
+
isUNIX: s.indexOf("X11") > -1,
|
|
45
46
|
// Linux
|
|
46
|
-
isLinux:
|
|
47
|
+
isLinux: s.indexOf("Linux") > -1
|
|
47
48
|
};
|
|
48
|
-
return { browser: e, mobile: t, os:
|
|
49
|
+
return { browser: e, mobile: t, os: r };
|
|
49
50
|
}, Ee = () => {
|
|
50
|
-
const { browser:
|
|
51
|
-
return Object.keys(
|
|
52
|
-
if (
|
|
53
|
-
return
|
|
54
|
-
});
|
|
55
|
-
}, Le = () => {
|
|
56
|
-
const { mobile: r } = E();
|
|
57
|
-
return Object.keys(r).some((e) => {
|
|
58
|
-
if (r[e])
|
|
59
|
-
return r[e];
|
|
51
|
+
const { browser: s } = L();
|
|
52
|
+
return Object.keys(s).find((e) => {
|
|
53
|
+
if (s[e])
|
|
54
|
+
return s[e];
|
|
60
55
|
});
|
|
61
56
|
}, Ce = () => {
|
|
62
|
-
const {
|
|
63
|
-
return Object.keys(
|
|
64
|
-
if (
|
|
65
|
-
return
|
|
57
|
+
const { mobile: s } = L();
|
|
58
|
+
return Object.keys(s).some((e) => {
|
|
59
|
+
if (s[e])
|
|
60
|
+
return s[e];
|
|
61
|
+
});
|
|
62
|
+
}, Te = () => {
|
|
63
|
+
const { os: s } = L();
|
|
64
|
+
return Object.keys(s).find((e) => {
|
|
65
|
+
if (s[e])
|
|
66
|
+
return s[e];
|
|
66
67
|
});
|
|
67
|
-
},
|
|
68
|
-
function
|
|
68
|
+
}, qe = () => console.dir(L());
|
|
69
|
+
function Ne() {
|
|
69
70
|
return {
|
|
70
|
-
init:
|
|
71
|
+
init: L,
|
|
71
72
|
isBrowser4: Ee,
|
|
72
|
-
isMobile4:
|
|
73
|
-
isOs4:
|
|
74
|
-
logs:
|
|
73
|
+
isMobile4: Ce,
|
|
74
|
+
isOs4: Te,
|
|
75
|
+
logs: qe
|
|
75
76
|
};
|
|
76
77
|
}
|
|
77
|
-
const
|
|
78
|
-
|
|
78
|
+
const b = (s, e, t) => {
|
|
79
|
+
s && (ye(s) ? s.forEach((r) => r.style[e] = t) : s.style[e] = t);
|
|
79
80
|
};
|
|
80
|
-
var q,
|
|
81
|
-
class
|
|
81
|
+
var q, re, W, se, A, Y, _, ie, O, oe, M, ae, R, ne, B, le, N, ce, z, de, I, ue, k, G, X, pe, S, J;
|
|
82
|
+
class ze {
|
|
82
83
|
constructor(e, t = {}) {
|
|
83
84
|
m(this, q);
|
|
84
85
|
m(this, W);
|
|
@@ -97,32 +98,32 @@ class Be {
|
|
|
97
98
|
m(this, z);
|
|
98
99
|
// Navigation 設置
|
|
99
100
|
m(this, I);
|
|
100
|
-
m(this, S);
|
|
101
|
-
m(this, X);
|
|
102
101
|
m(this, k);
|
|
103
|
-
|
|
102
|
+
m(this, X);
|
|
103
|
+
m(this, S);
|
|
104
|
+
!te(e) || !V(e) || (this.__storage__ = {
|
|
104
105
|
el: e,
|
|
105
106
|
options: t
|
|
106
|
-
}, this.active = "data-article-active",
|
|
107
|
+
}, this.active = "data-article-active", h(this, q, re).call(this));
|
|
107
108
|
}
|
|
108
109
|
update() {
|
|
109
110
|
const { elements: e } = this;
|
|
110
111
|
e.forEach((t) => {
|
|
111
|
-
t.querySelectorAll("._article").forEach((
|
|
112
|
-
|
|
112
|
+
t.querySelectorAll("._article").forEach((r) => {
|
|
113
|
+
r.article = {}, r.article.parent = t, r.article.params = h(this, A, Y).call(this, r), h(this, k, G).call(this, r), h(this, S, J).call(this, r);
|
|
113
114
|
});
|
|
114
115
|
});
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
|
-
q = new WeakSet(),
|
|
118
|
-
const { el: e, options: t } = this.__storage__, { SETTINGS:
|
|
119
|
-
this.elements = t.state == "not active" ? T(e + `:not([${this.active}])`) : T(e), this.elements = T(e), this.options = Object.assign({},
|
|
118
|
+
q = new WeakSet(), re = function() {
|
|
119
|
+
const { el: e, options: t } = this.__storage__, { SETTINGS: r } = $e;
|
|
120
|
+
this.elements = t.state == "not active" ? T(e + `:not([${this.active}])`) : T(e), this.elements = T(e), this.options = Object.assign({}, r, t), h(this, W, se).call(this);
|
|
120
121
|
}, W = new WeakSet(), se = function() {
|
|
121
122
|
const { elements: e } = this;
|
|
122
123
|
e.forEach((t) => {
|
|
123
|
-
t.setAttribute(this.active, ""), t.querySelectorAll("._article").forEach((
|
|
124
|
-
var o,
|
|
125
|
-
|
|
124
|
+
t.setAttribute(this.active, ""), t.querySelectorAll("._article").forEach((r) => {
|
|
125
|
+
var o, l;
|
|
126
|
+
r.article = {}, r.article.parent = t, r.article.params = h(this, A, Y).call(this, r), r.article.methods = {}, r.article.methods.update = this.update, h(l = h(o = h(this, _, ie).call(this, r), k, G).call(o, r), X, pe).call(l, r), h(this, S, J).call(this, r);
|
|
126
127
|
});
|
|
127
128
|
});
|
|
128
129
|
}, A = new WeakSet(), Y = function(e) {
|
|
@@ -161,94 +162,94 @@ q = new WeakSet(), te = function() {
|
|
|
161
162
|
quoteColor: e.getAttribute("quote-color"),
|
|
162
163
|
markdown: e.getAttribute("data-table-markdown") ?? !1
|
|
163
164
|
};
|
|
164
|
-
}, _ = new WeakSet(),
|
|
165
|
+
}, _ = new WeakSet(), ie = function(e) {
|
|
165
166
|
const { params: t } = e.article;
|
|
166
|
-
return
|
|
167
|
-
}, O = new WeakSet(),
|
|
168
|
-
const { params: t } = e.article,
|
|
169
|
-
let o = !1,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
}),
|
|
167
|
+
return b(t.$h, "color", t.hColor), b(t.$subH, "color", t.subHColor), b(t.$p, "color", t.pColor), b(t.$description, "color", t.descriptionColor), b(t.$button, "backgroundColor", t.buttonColor), b(t.$button, "color", t.buttonTextColor), t.buttonColorHover && t.$button && (t.$button.appendChild(document.createElement("span")), b(t.$button.querySelector("span"), "backgroundColor", t.buttonColorHover)), b(t.$backgroundWrap, "backgroundColor", t.typeFullColor), b(t.$contentWrap, "backgroundColor", t.typeFullBoxColor), b(t.$quote, "color", t.quoteColor), this;
|
|
168
|
+
}, O = new WeakSet(), oe = function(e) {
|
|
169
|
+
const { params: t } = e.article, r = t.$table;
|
|
170
|
+
let o = !1, l, n, u, p;
|
|
171
|
+
r.addEventListener("mousedown", function(c) {
|
|
172
|
+
c.preventDefault(), o = !0;
|
|
173
|
+
const i = r.getBoundingClientRect();
|
|
174
|
+
l = c.pageX - i.left, n = c.pageY - i.top, u = r.scrollLeft, p = r.scrollTop;
|
|
175
|
+
}), r.addEventListener("mouseleave", function() {
|
|
175
176
|
o = !1;
|
|
176
|
-
}),
|
|
177
|
+
}), r.addEventListener("mouseup", function() {
|
|
177
178
|
o = !1;
|
|
178
|
-
}),
|
|
179
|
+
}), r.addEventListener("mousemove", function(c) {
|
|
179
180
|
if (!o)
|
|
180
181
|
return;
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
|
|
182
|
+
c.preventDefault();
|
|
183
|
+
const i = r.getBoundingClientRect(), a = c.pageX - i.left, d = c.pageY - i.top, g = a - l, f = d - n;
|
|
184
|
+
r.scrollLeft = u - g, r.scrollTop = p - f;
|
|
184
185
|
});
|
|
185
|
-
}, M = new WeakSet(),
|
|
186
|
-
const { basic_rwd: o } = this.options,
|
|
187
|
-
if (
|
|
186
|
+
}, M = new WeakSet(), ae = function(e, t, r) {
|
|
187
|
+
const { basic_rwd: o } = this.options, l = window.innerWidth < o, n = [...e.querySelectorAll("tr")];
|
|
188
|
+
if (l || !n.length)
|
|
188
189
|
return;
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
}, R = new WeakSet(),
|
|
192
|
-
const t = [],
|
|
193
|
-
return e.forEach((o,
|
|
194
|
-
const
|
|
195
|
-
t[
|
|
196
|
-
let
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
for (; t[
|
|
200
|
-
|
|
201
|
-
for (let a = 0; a <
|
|
202
|
-
const
|
|
203
|
-
t[
|
|
204
|
-
for (let g = 0; g <
|
|
205
|
-
const
|
|
206
|
-
t[
|
|
207
|
-
el: a === 0 && g === 0 ?
|
|
208
|
-
topRow:
|
|
209
|
-
leftCol:
|
|
210
|
-
rowspan:
|
|
211
|
-
colspan:
|
|
212
|
-
}, a > 0 &&
|
|
190
|
+
const u = h(this, R, ne).call(this, n);
|
|
191
|
+
h(this, N, ce).call(this, e, u, t, r);
|
|
192
|
+
}, R = new WeakSet(), ne = function(e) {
|
|
193
|
+
const t = [], r = /* @__PURE__ */ new Set();
|
|
194
|
+
return e.forEach((o, l) => {
|
|
195
|
+
const n = [...o.children];
|
|
196
|
+
t[l] = [];
|
|
197
|
+
let u = 0;
|
|
198
|
+
n.forEach((p) => {
|
|
199
|
+
const c = +p.getAttribute("rowspan") || 1, i = +p.getAttribute("colspan") || 1;
|
|
200
|
+
for (; t[l][u] || r.has(`${l},${u}`); )
|
|
201
|
+
u++;
|
|
202
|
+
for (let a = 0; a < c; a++) {
|
|
203
|
+
const d = l + a;
|
|
204
|
+
t[d] ?? (t[d] = []);
|
|
205
|
+
for (let g = 0; g < i; g++) {
|
|
206
|
+
const f = u + g;
|
|
207
|
+
t[d][f] = {
|
|
208
|
+
el: a === 0 && g === 0 ? p : null,
|
|
209
|
+
topRow: l,
|
|
210
|
+
leftCol: u,
|
|
211
|
+
rowspan: c,
|
|
212
|
+
colspan: i
|
|
213
|
+
}, a > 0 && r.add(`${d},${f}`);
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
|
-
|
|
216
|
+
u += i;
|
|
216
217
|
});
|
|
217
218
|
}), t;
|
|
218
|
-
}, B = new WeakSet(),
|
|
219
|
-
var
|
|
220
|
-
const
|
|
221
|
-
for (let
|
|
222
|
-
for (let
|
|
223
|
-
const
|
|
224
|
-
if (
|
|
225
|
-
const
|
|
226
|
-
o[
|
|
219
|
+
}, B = new WeakSet(), le = function(e, t) {
|
|
220
|
+
var n;
|
|
221
|
+
const r = t.length, o = Array(r).fill(0), l = e.getBoundingClientRect().top;
|
|
222
|
+
for (let u = 0; u < r; u++)
|
|
223
|
+
for (let p = 0; p < (((n = t[u]) == null ? void 0 : n.length) || 0); p++) {
|
|
224
|
+
const c = t[u][p];
|
|
225
|
+
if (c != null && c.el) {
|
|
226
|
+
const i = c.el.getBoundingClientRect().top;
|
|
227
|
+
o[u] = i - l;
|
|
227
228
|
break;
|
|
228
229
|
}
|
|
229
230
|
}
|
|
230
231
|
return o;
|
|
231
|
-
}, N = new WeakSet(),
|
|
232
|
-
var
|
|
233
|
-
const
|
|
234
|
-
for (let
|
|
235
|
-
for (let
|
|
236
|
-
const a = t[
|
|
232
|
+
}, N = new WeakSet(), ce = function(e, t, r, o) {
|
|
233
|
+
var p;
|
|
234
|
+
const l = h(this, B, le).call(this, e, t), n = ((p = t[0]) == null ? void 0 : p.length) ?? 0, u = Array(n).fill(0);
|
|
235
|
+
for (let c = 0; c < n; c++)
|
|
236
|
+
for (let i = 0; i < t.length; i++) {
|
|
237
|
+
const a = t[i][c];
|
|
237
238
|
if (a != null && a.el) {
|
|
238
|
-
|
|
239
|
+
u[c] = a.el.offsetLeft;
|
|
239
240
|
break;
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
243
|
t.forEach(
|
|
243
|
-
(
|
|
244
|
-
if (!(
|
|
244
|
+
(c) => c.forEach((i) => {
|
|
245
|
+
if (!(i != null && i.el))
|
|
245
246
|
return;
|
|
246
|
-
const { el: a, topRow:
|
|
247
|
-
a.style.position = "sticky", a.style.zIndex =
|
|
247
|
+
const { el: a, topRow: d, leftCol: g } = i, f = d < r, v = g < o;
|
|
248
|
+
a.style.position = "sticky", a.style.zIndex = f && v ? 3 : f ? 2 : v ? 1 : 0, a.style.backgroundColor = getComputedStyle(a).backgroundColor, f && (a.style.top = `${l[d]}px`), v && (a.style.left = `${u[g]}px`);
|
|
248
249
|
})
|
|
249
250
|
);
|
|
250
|
-
}, z = new WeakSet(),
|
|
251
|
-
const { markdownLink: t, markdownImg:
|
|
251
|
+
}, z = new WeakSet(), de = function(e) {
|
|
252
|
+
const { markdownLink: t, markdownImg: r, markdownLinkBlank: o } = this.options;
|
|
252
253
|
if (e.hasAttribute("data-markdown-rendered"))
|
|
253
254
|
return;
|
|
254
255
|
new x.Renderer(), x.use({
|
|
@@ -257,17 +258,17 @@ q = new WeakSet(), te = function() {
|
|
|
257
258
|
name: "center",
|
|
258
259
|
level: "block",
|
|
259
260
|
start(i) {
|
|
260
|
-
var
|
|
261
|
-
return (
|
|
261
|
+
var a;
|
|
262
|
+
return (a = i.match(/@center@/)) == null ? void 0 : a.index;
|
|
262
263
|
},
|
|
263
264
|
tokenizer(i) {
|
|
264
|
-
const
|
|
265
|
-
if (
|
|
265
|
+
const d = /^@center@(.+?)@center@/s.exec(i);
|
|
266
|
+
if (d)
|
|
266
267
|
return {
|
|
267
268
|
type: "center",
|
|
268
|
-
raw:
|
|
269
|
-
text:
|
|
270
|
-
tokens: this.lexer.inlineTokens(
|
|
269
|
+
raw: d[0],
|
|
270
|
+
text: d[1],
|
|
271
|
+
tokens: this.lexer.inlineTokens(d[1])
|
|
271
272
|
};
|
|
272
273
|
},
|
|
273
274
|
renderer(i) {
|
|
@@ -278,17 +279,17 @@ q = new WeakSet(), te = function() {
|
|
|
278
279
|
name: "left",
|
|
279
280
|
level: "block",
|
|
280
281
|
start(i) {
|
|
281
|
-
var
|
|
282
|
-
return (
|
|
282
|
+
var a;
|
|
283
|
+
return (a = i.match(/@left@/)) == null ? void 0 : a.index;
|
|
283
284
|
},
|
|
284
285
|
tokenizer(i) {
|
|
285
|
-
const
|
|
286
|
-
if (
|
|
286
|
+
const d = /^@left@(.+?)@left@/s.exec(i);
|
|
287
|
+
if (d)
|
|
287
288
|
return {
|
|
288
289
|
type: "left",
|
|
289
|
-
raw:
|
|
290
|
-
text:
|
|
291
|
-
tokens: this.lexer.inlineTokens(
|
|
290
|
+
raw: d[0],
|
|
291
|
+
text: d[1],
|
|
292
|
+
tokens: this.lexer.inlineTokens(d[1])
|
|
292
293
|
};
|
|
293
294
|
},
|
|
294
295
|
renderer(i) {
|
|
@@ -299,17 +300,17 @@ q = new WeakSet(), te = function() {
|
|
|
299
300
|
name: "right",
|
|
300
301
|
level: "block",
|
|
301
302
|
start(i) {
|
|
302
|
-
var
|
|
303
|
-
return (
|
|
303
|
+
var a;
|
|
304
|
+
return (a = i.match(/@right@/)) == null ? void 0 : a.index;
|
|
304
305
|
},
|
|
305
306
|
tokenizer(i) {
|
|
306
|
-
const
|
|
307
|
-
if (
|
|
307
|
+
const d = /^@right@(.+?)@right@/s.exec(i);
|
|
308
|
+
if (d)
|
|
308
309
|
return {
|
|
309
310
|
type: "right",
|
|
310
|
-
raw:
|
|
311
|
-
text:
|
|
312
|
-
tokens: this.lexer.inlineTokens(
|
|
311
|
+
raw: d[0],
|
|
312
|
+
text: d[1],
|
|
313
|
+
tokens: this.lexer.inlineTokens(d[1])
|
|
313
314
|
};
|
|
314
315
|
},
|
|
315
316
|
renderer(i) {
|
|
@@ -320,17 +321,17 @@ q = new WeakSet(), te = function() {
|
|
|
320
321
|
name: "sup",
|
|
321
322
|
level: "inline",
|
|
322
323
|
start(i) {
|
|
323
|
-
var
|
|
324
|
-
return (
|
|
324
|
+
var a;
|
|
325
|
+
return (a = i.match(/@sup@/)) == null ? void 0 : a.index;
|
|
325
326
|
},
|
|
326
327
|
tokenizer(i) {
|
|
327
|
-
const
|
|
328
|
-
if (
|
|
328
|
+
const d = /^@sup@(.+?)@sup@/.exec(i);
|
|
329
|
+
if (d)
|
|
329
330
|
return {
|
|
330
331
|
type: "sup",
|
|
331
|
-
raw:
|
|
332
|
-
text:
|
|
333
|
-
tokens: this.lexer.inlineTokens(
|
|
332
|
+
raw: d[0],
|
|
333
|
+
text: d[1],
|
|
334
|
+
tokens: this.lexer.inlineTokens(d[1])
|
|
334
335
|
};
|
|
335
336
|
},
|
|
336
337
|
renderer(i) {
|
|
@@ -341,17 +342,17 @@ q = new WeakSet(), te = function() {
|
|
|
341
342
|
name: "sub",
|
|
342
343
|
level: "inline",
|
|
343
344
|
start(i) {
|
|
344
|
-
var
|
|
345
|
-
return (
|
|
345
|
+
var a;
|
|
346
|
+
return (a = i.match(/@sub@/)) == null ? void 0 : a.index;
|
|
346
347
|
},
|
|
347
348
|
tokenizer(i) {
|
|
348
|
-
const
|
|
349
|
-
if (
|
|
349
|
+
const d = /^@sub@(.+?)@sub@/.exec(i);
|
|
350
|
+
if (d)
|
|
350
351
|
return {
|
|
351
352
|
type: "sub",
|
|
352
|
-
raw:
|
|
353
|
-
text:
|
|
354
|
-
tokens: this.lexer.inlineTokens(
|
|
353
|
+
raw: d[0],
|
|
354
|
+
text: d[1],
|
|
355
|
+
tokens: this.lexer.inlineTokens(d[1])
|
|
355
356
|
};
|
|
356
357
|
},
|
|
357
358
|
renderer(i) {
|
|
@@ -360,203 +361,206 @@ q = new WeakSet(), te = function() {
|
|
|
360
361
|
}
|
|
361
362
|
]
|
|
362
363
|
});
|
|
363
|
-
const
|
|
364
|
+
const l = ["h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br", "span", "div", "sup", "sub"], n = ["data-center", "data-right", "data-left"], u = (i) => Le.sanitize(i, {
|
|
364
365
|
ALLOWED_TAGS: [
|
|
365
|
-
...
|
|
366
|
+
...l,
|
|
366
367
|
...t ? ["a"] : [],
|
|
367
|
-
...
|
|
368
|
+
...r ? ["img"] : []
|
|
368
369
|
],
|
|
369
370
|
ALLOWED_ATTR: [
|
|
370
|
-
...
|
|
371
|
+
...n,
|
|
371
372
|
...t ? ["href", "title", "target"] : [],
|
|
372
|
-
...
|
|
373
|
+
...r ? ["src", "alt", "title"] : []
|
|
373
374
|
],
|
|
374
375
|
RETURN_TRUSTED_TYPE: !1
|
|
375
|
-
}),
|
|
376
|
+
}), p = (i) => u(x.parse(i));
|
|
376
377
|
e.querySelectorAll("td,th").forEach((i) => {
|
|
377
378
|
i.innerHTML = i.textContent;
|
|
378
|
-
const
|
|
379
|
-
i.innerHTML =
|
|
379
|
+
const a = i.textContent.trim().replace(/<[^>]*>/g, "");
|
|
380
|
+
i.innerHTML = p(a), o && K(i).find("a") && K(i).find("a").attr({
|
|
381
|
+
target: "_blank",
|
|
382
|
+
rel: "noopener noreferrer"
|
|
383
|
+
});
|
|
380
384
|
}), e.setAttribute("data-markdown-rendered", "true");
|
|
381
|
-
}, I = new WeakSet(),
|
|
382
|
-
const { scrollStep: t } = this.options,
|
|
383
|
-
if (!
|
|
385
|
+
}, I = new WeakSet(), ue = function(e) {
|
|
386
|
+
const { scrollStep: t } = this.options, r = e.querySelector("._contentWrap"), o = e.querySelector("._tableCover"), l = e.querySelector("._table"), n = typeof t == "number" ? t : r.clientWidth * 0.5;
|
|
387
|
+
if (!r || !o || o.querySelector(".table_navigation"))
|
|
384
388
|
return;
|
|
385
|
-
const
|
|
386
|
-
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
const
|
|
390
|
-
const a =
|
|
391
|
-
|
|
389
|
+
const u = document.createElement("div");
|
|
390
|
+
u.className = "table_navigation";
|
|
391
|
+
const p = document.createElement("div"), c = document.createElement("div");
|
|
392
|
+
p.className = "table-nav-left", c.className = "table-nav-right", u.appendChild(p), u.appendChild(c), o.appendChild(u);
|
|
393
|
+
const i = () => {
|
|
394
|
+
const a = l.scrollLeft, d = l.scrollWidth - l.clientWidth;
|
|
395
|
+
p.classList.toggle("disabled", a <= 0), c.classList.toggle("disabled", a >= d - 1);
|
|
392
396
|
};
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}),
|
|
396
|
-
|
|
397
|
-
}),
|
|
398
|
-
},
|
|
397
|
+
p.addEventListener("click", () => {
|
|
398
|
+
l.scrollBy({ left: -n, behavior: "smooth" });
|
|
399
|
+
}), c.addEventListener("click", () => {
|
|
400
|
+
l.scrollBy({ left: n, behavior: "smooth" });
|
|
401
|
+
}), l.addEventListener("scroll", i), window.addEventListener("resize", i), i();
|
|
402
|
+
}, k = new WeakSet(), G = function(e) {
|
|
399
403
|
const { params: t } = e.article;
|
|
400
|
-
return t.$video.length && new
|
|
401
|
-
}, X = new WeakSet(),
|
|
402
|
-
const { basic_rwd: t } = this.options, { params:
|
|
403
|
-
if (!
|
|
404
|
+
return t.$video.length && new we(t.$video, this.options.videoOptions), this;
|
|
405
|
+
}, X = new WeakSet(), pe = function(e) {
|
|
406
|
+
const { basic_rwd: t } = this.options, { params: r } = e.article;
|
|
407
|
+
if (!r.$swiper)
|
|
404
408
|
return;
|
|
405
|
-
const o =
|
|
406
|
-
let
|
|
409
|
+
const o = ve(), l = this;
|
|
410
|
+
let n = {
|
|
407
411
|
on: {
|
|
408
|
-
init(
|
|
409
|
-
const
|
|
410
|
-
|
|
411
|
-
var g,
|
|
412
|
-
(g =
|
|
413
|
-
}),
|
|
412
|
+
init(c) {
|
|
413
|
+
const i = c.$el[0];
|
|
414
|
+
r.$video.length && ([...i.querySelectorAll("[video4-active]")].forEach((d) => {
|
|
415
|
+
var g, f;
|
|
416
|
+
(g = d.querySelector(xe.SETTINGS.videoButton)) == null || g.remove(), (f = d.querySelector(".overlay")) == null || f.remove(), d.removeAttribute("video4-active");
|
|
417
|
+
}), l.update());
|
|
414
418
|
},
|
|
415
|
-
observerUpdate(
|
|
416
|
-
|
|
419
|
+
observerUpdate(c) {
|
|
420
|
+
c.params.autoplay.enabled && (c.autoplay.start(), c.update());
|
|
417
421
|
}
|
|
418
422
|
},
|
|
419
423
|
observer: !0,
|
|
420
424
|
breakpoints: {}
|
|
421
425
|
};
|
|
422
|
-
if (
|
|
426
|
+
if (r.$selector.setAttribute("img-swiper", "on"), r.$selector.classList.add(`swiper-${o}`), r.$selector.getAttribute("swiper-arrow") !== "off" && r.$selector.getAttribute("swiper-arrow")) {
|
|
427
|
+
const c = document.createElement("div");
|
|
428
|
+
c.className = `swiper-button-next swiper-${o}`, r.$swiperButtonCover.appendChild(c);
|
|
423
429
|
const i = document.createElement("div");
|
|
424
|
-
i.className = `swiper-button-
|
|
425
|
-
const n = document.createElement("div");
|
|
426
|
-
n.className = `swiper-button-prev swiper-${o}`, s.$swiperButtonCover.appendChild(n), l.navigation = {
|
|
430
|
+
i.className = `swiper-button-prev swiper-${o}`, r.$swiperButtonCover.appendChild(i), n.navigation = {
|
|
427
431
|
nextEl: `.swiper-button-next.swiper-${o}`,
|
|
428
432
|
prevEl: `.swiper-button-prev.swiper-${o}`
|
|
429
433
|
};
|
|
430
434
|
}
|
|
431
|
-
if (
|
|
432
|
-
const
|
|
433
|
-
|
|
435
|
+
if (r.$selector.getAttribute("swiper-nav") !== "off" || !r.$selector.getAttribute("swiper-nav")) {
|
|
436
|
+
const c = document.createElement("div");
|
|
437
|
+
c.className = `swiper-pagination swiper-${o}`, r.$swiper.appendChild(c), n.pagination = {
|
|
434
438
|
el: `.swiper-pagination.swiper-${o}`,
|
|
435
439
|
clickable: !0
|
|
436
440
|
};
|
|
437
441
|
}
|
|
438
|
-
Number.parseInt(
|
|
439
|
-
slidesPerView:
|
|
440
|
-
}), (
|
|
442
|
+
Number.parseInt(r.$selector.getAttribute("swiper-num")) && (n.breakpoints[t] = {
|
|
443
|
+
slidesPerView: r.$selector.getAttribute("swiper-num") ? Number.parseInt(r.$selector.getAttribute("swiper-num")) > 5 ? 5 : Number.parseInt(r.$selector.getAttribute("swiper-num")) : 1
|
|
444
|
+
}), (r.$selector.getAttribute("swiper-autoplay") !== "off" || !r.$selector.getAttribute("swiper-autoplay")) && (n.autoplay = {
|
|
441
445
|
delay: 3e3,
|
|
442
446
|
disableOnInteraction: !1
|
|
443
|
-
}), (
|
|
444
|
-
let
|
|
445
|
-
|
|
446
|
-
const
|
|
447
|
-
return e.article.swiperList = [], e.article.swiperList.push(
|
|
448
|
-
},
|
|
449
|
-
const { navigation: t } = this.options, { params:
|
|
450
|
-
if (!
|
|
447
|
+
}), (r.$selector.getAttribute("swiper-loop") !== "off" || !r.$selector.getAttribute("swiper-loop")) && (n.loop = !0), r.$selector.getAttribute("swiper-speed") && (n.speed = parseInt(r.$selector.getAttribute("swiper-speed"))), r.$selector.getAttribute("swiper-parallax") !== "off" && !r.$selector.getAttribute("swiper-loop") && (n.parallax = !0), r.$selector.getAttribute("swiper-pagination-dynamic") === "on" && (n.pagination.dynamicBullets = !0, n.pagination ? n.pagination.dynamicBullets = !0 : console.warn("pagination undefined"));
|
|
448
|
+
let u = () => window.innerWidth > t && Number(r.$selector.getAttribute("swiper-num")) || 1;
|
|
449
|
+
r.$swiper.querySelectorAll(".swiper-slide").length <= u() && (n.navigation = !1, n.pagination = !1, n.autoplay = !1, n.loop = !1, r.$selector.querySelector(".swiper-button-cover").style.display = "none", r.$selector.querySelector(".swiper-pagination").style.display = "none", r.$swiper.classList.add("swiper-no-swiping"));
|
|
450
|
+
const p = new Se(r.$swiper, n);
|
|
451
|
+
return e.article.swiperList = [], e.article.swiperList.push(p), this;
|
|
452
|
+
}, S = new WeakSet(), J = function(e) {
|
|
453
|
+
const { navigation: t } = this.options, { params: r } = e.article;
|
|
454
|
+
if (!r.$table)
|
|
451
455
|
return;
|
|
452
|
-
const o = e.getAttribute("freeze-table") === "on",
|
|
453
|
-
o &&
|
|
456
|
+
const o = e.getAttribute("freeze-table") === "on", l = parseInt(e.getAttribute("freeze-table-row") ?? "1", 10), n = parseInt(e.getAttribute("freeze-table-col") ?? "1", 10), u = e.querySelector("table"), p = e.querySelector("._tipText"), c = e.offsetWidth, i = u.offsetWidth, a = c < i, d = r.markdown === "on", g = () => {
|
|
457
|
+
o && h(this, M, ae).call(this, u, l, n), (o || a) && h(this, O, oe).call(this, e), d && h(this, z, de).call(this, u), t && a && h(this, I, ue).call(this, e), a ? (e.classList.add("overflow"), p.style.display = "flex") : (e.classList.remove("overflow"), p.style.display = "none");
|
|
454
458
|
};
|
|
455
459
|
return g(), window.addEventListener("resize", g), this;
|
|
456
460
|
};
|
|
457
|
-
let
|
|
458
|
-
function w(
|
|
459
|
-
const e = window.getComputedStyle(
|
|
461
|
+
let Q = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", Z = "ontouchend" in document.documentElement ? "touchend" : "mouseup", F = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
|
|
462
|
+
function w(s) {
|
|
463
|
+
const e = window.getComputedStyle(s), t = e.transform || e.mozTransform;
|
|
460
464
|
if (t === "none")
|
|
461
465
|
return {
|
|
462
466
|
x: 0,
|
|
463
467
|
y: 0,
|
|
464
468
|
z: 0
|
|
465
469
|
};
|
|
466
|
-
const
|
|
467
|
-
if (
|
|
470
|
+
const r = t.includes("3d") ? "3d" : "2d", o = t.match(/matrix.*\((.+)\)/)[1].split(", ");
|
|
471
|
+
if (r === "2d")
|
|
468
472
|
return {
|
|
469
473
|
x: Number(o[4]),
|
|
470
474
|
y: Number(o[5]),
|
|
471
475
|
z: 0
|
|
472
476
|
};
|
|
473
|
-
if (
|
|
477
|
+
if (r === "3d")
|
|
474
478
|
return {
|
|
475
479
|
x: Number(o[12]),
|
|
476
480
|
y: Number(o[13]),
|
|
477
481
|
z: Number(o[14])
|
|
478
482
|
};
|
|
479
483
|
}
|
|
480
|
-
function C(
|
|
481
|
-
const t =
|
|
482
|
-
let
|
|
484
|
+
function C(s) {
|
|
485
|
+
const t = s.querySelector(".wrapper").querySelectorAll(".item");
|
|
486
|
+
let r = 0;
|
|
483
487
|
return t.forEach((o) => {
|
|
484
|
-
const
|
|
485
|
-
|
|
486
|
-
}),
|
|
488
|
+
const l = getComputedStyle(o), n = parseInt(l.marginLeft), u = parseInt(l.marginRight);
|
|
489
|
+
r += o.getBoundingClientRect().width + n + u;
|
|
490
|
+
}), r;
|
|
487
491
|
}
|
|
488
|
-
function U(
|
|
489
|
-
if (w(
|
|
492
|
+
function U(s) {
|
|
493
|
+
if (w(s.slideWrapEl).x >= s.translateMin)
|
|
490
494
|
return "is-start";
|
|
491
|
-
if (w(
|
|
495
|
+
if (w(s.slideWrapEl).x <= s.translateMax)
|
|
492
496
|
return "is-end";
|
|
493
|
-
if (w(
|
|
497
|
+
if (w(s.slideWrapEl).x < s.translateMin && w(s.slideWrapEl).x > s.translateMax)
|
|
494
498
|
return "is-middle";
|
|
495
499
|
}
|
|
496
|
-
function
|
|
497
|
-
const e =
|
|
498
|
-
t.addEventListener(
|
|
499
|
-
switch (
|
|
500
|
+
function We(s) {
|
|
501
|
+
const e = s.el, t = e.querySelector(".wrapper");
|
|
502
|
+
t.addEventListener(Q, function(r) {
|
|
503
|
+
switch (s.isDown = !0, s.slidable && t.classList.add("dragging"), Q) {
|
|
500
504
|
case "mousedown":
|
|
501
|
-
|
|
505
|
+
s.startX = r.pageX;
|
|
502
506
|
break;
|
|
503
507
|
case "touchstart":
|
|
504
|
-
|
|
508
|
+
s.startX = r.changedTouches[0].pageX;
|
|
505
509
|
break;
|
|
506
510
|
}
|
|
507
|
-
|
|
508
|
-
}), t.addEventListener(
|
|
509
|
-
|
|
511
|
+
s.nowTranslateX = w(t).x;
|
|
512
|
+
}), t.addEventListener(Z, function(r) {
|
|
513
|
+
s.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving");
|
|
510
514
|
let o;
|
|
511
515
|
switch (F) {
|
|
512
516
|
case "mousemove":
|
|
513
|
-
o =
|
|
517
|
+
o = r.pageX - s.startX;
|
|
514
518
|
break;
|
|
515
519
|
case "touchmove":
|
|
516
|
-
o =
|
|
520
|
+
o = r.changedTouches[0].pageX - s.startX;
|
|
517
521
|
break;
|
|
518
522
|
}
|
|
519
|
-
if (o === 0 &&
|
|
520
|
-
if (
|
|
523
|
+
if (o === 0 && r.target.closest(".item")) {
|
|
524
|
+
if (Z === "mouseup" && r.button !== 0)
|
|
521
525
|
return;
|
|
522
|
-
t.querySelectorAll(".item").forEach((
|
|
523
|
-
|
|
524
|
-
}),
|
|
526
|
+
t.querySelectorAll(".item").forEach((n) => {
|
|
527
|
+
n.classList.remove("active");
|
|
528
|
+
}), r.target.closest(".item").classList.add("active"), s.moveActive(s.params.speed);
|
|
525
529
|
} else
|
|
526
|
-
|
|
530
|
+
s.slidable && s.resetPos(e);
|
|
527
531
|
}), t.addEventListener("mouseleave", function() {
|
|
528
|
-
|
|
529
|
-
}), t.addEventListener(F, function(
|
|
530
|
-
if (
|
|
531
|
-
if (!
|
|
532
|
+
s.isDown && s.slidable && (s.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving"), s.resetPos(e));
|
|
533
|
+
}), t.addEventListener(F, function(r) {
|
|
534
|
+
if (s.draggable && s.slidable) {
|
|
535
|
+
if (!s.isDown)
|
|
532
536
|
return;
|
|
533
|
-
|
|
537
|
+
r.preventDefault();
|
|
534
538
|
let o;
|
|
535
539
|
switch (F) {
|
|
536
540
|
case "mousemove":
|
|
537
|
-
o =
|
|
541
|
+
o = r.pageX - s.startX;
|
|
538
542
|
break;
|
|
539
543
|
case "touchmove":
|
|
540
|
-
o =
|
|
544
|
+
o = r.changedTouches[0].pageX - s.startX;
|
|
541
545
|
break;
|
|
542
546
|
}
|
|
543
547
|
if (o !== 0) {
|
|
544
548
|
t.classList.add("moving");
|
|
545
|
-
const
|
|
549
|
+
const l = {
|
|
546
550
|
transition: "all 0ms ease 0s",
|
|
547
|
-
transform: `translate3d(${
|
|
551
|
+
transform: `translate3d(${s.nowTranslateX + o}px,0,0)`
|
|
548
552
|
};
|
|
549
|
-
Object.assign(t.style,
|
|
553
|
+
Object.assign(t.style, l);
|
|
550
554
|
}
|
|
551
555
|
}
|
|
552
556
|
});
|
|
553
557
|
}
|
|
554
|
-
function
|
|
555
|
-
const e =
|
|
556
|
-
for (var t = 0,
|
|
558
|
+
function _e(s) {
|
|
559
|
+
const e = s.querySelectorAll("a");
|
|
560
|
+
for (var t = 0, r = e.length; t < r; t++)
|
|
557
561
|
e[t].draggable = !1;
|
|
558
562
|
}
|
|
559
|
-
class
|
|
563
|
+
class Ie {
|
|
560
564
|
constructor(e, t) {
|
|
561
565
|
this.el = typeof e == "string" ? document.querySelector(e) : e, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
|
|
562
566
|
speed: 300,
|
|
@@ -572,29 +576,29 @@ class Ne {
|
|
|
572
576
|
const e = this;
|
|
573
577
|
e.slidable && (e.slideWrapEl.style.width = `${e.slideTotalWidth}px`, e.el.classList.add("slidable"), e.slideWrapEl.querySelector(".item.active") && e.moveActive()), window.addEventListener("resize", function() {
|
|
574
578
|
e.update();
|
|
575
|
-
}),
|
|
579
|
+
}), We(e), _e(e.el);
|
|
576
580
|
}
|
|
577
581
|
moveActive(e) {
|
|
578
|
-
const t = this,
|
|
582
|
+
const t = this, r = t.slideWrapEl.querySelector(".item.active"), l = r.previousElementSibling ? r.offsetLeft - t.el.clientWidth / 2 + r.clientWidth / 2 : 0;
|
|
579
583
|
if (t.slidable) {
|
|
580
|
-
if (-
|
|
581
|
-
const
|
|
584
|
+
if (-l < 0 && -l > t.translateMax) {
|
|
585
|
+
const n = {
|
|
582
586
|
transition: `all ${e || 0}ms ease 0s`,
|
|
583
|
-
transform: `translate3d(-${
|
|
587
|
+
transform: `translate3d(-${l}px,0,0)`
|
|
584
588
|
};
|
|
585
|
-
Object.assign(t.slideWrapEl.style,
|
|
586
|
-
} else if (-
|
|
587
|
-
const
|
|
589
|
+
Object.assign(t.slideWrapEl.style, n);
|
|
590
|
+
} else if (-l >= 0) {
|
|
591
|
+
const n = {
|
|
588
592
|
transition: `all ${e || 0}ms ease 0s`,
|
|
589
593
|
transform: "translate3d(0,0,0)"
|
|
590
594
|
};
|
|
591
|
-
Object.assign(t.slideWrapEl.style,
|
|
595
|
+
Object.assign(t.slideWrapEl.style, n);
|
|
592
596
|
} else {
|
|
593
|
-
const
|
|
597
|
+
const n = {
|
|
594
598
|
transition: `all ${e || 0}ms ease 0s`,
|
|
595
599
|
transform: `translate3d(${t.translateMax}px,0,0)`
|
|
596
600
|
};
|
|
597
|
-
Object.assign(t.slideWrapEl.style,
|
|
601
|
+
Object.assign(t.slideWrapEl.style, n);
|
|
598
602
|
}
|
|
599
603
|
if (e)
|
|
600
604
|
t.slideWrapEl.addEventListener(
|
|
@@ -657,20 +661,20 @@ class Ne {
|
|
|
657
661
|
), e.slidable = e.slideTotalWidth > Math.round(e.el.getBoundingClientRect().width) && (!e.params.breakpoint || window.innerWidth <= e.params.breakpoint), e.slidable ? (e.slideWrapEl.style.width = `${e.slideTotalWidth}px`, e.el.classList.add("slidable"), e.slideWrapEl.querySelector(".item.active") && e.moveActive()) : (e.el.classList.remove("slidable"), e.el.classList.remove("is-start"), e.el.classList.remove("is-end"), e.slideWrapEl.removeAttribute("style"));
|
|
658
662
|
}
|
|
659
663
|
}
|
|
660
|
-
const
|
|
661
|
-
if (
|
|
664
|
+
const ee = (s) => {
|
|
665
|
+
if (s == "facebook")
|
|
662
666
|
return "https://www.facebook.com/sharer/sharer.php?u=";
|
|
663
|
-
if (
|
|
667
|
+
if (s == "line")
|
|
664
668
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "http://line.naver.jp/R/msg/text/?" : "https://lineit.line.me/share/ui?url=";
|
|
665
|
-
if (
|
|
669
|
+
if (s == "twitter")
|
|
666
670
|
return "https://twitter.com/intent/tweet?url=";
|
|
667
|
-
if (
|
|
671
|
+
if (s == "linkedin")
|
|
668
672
|
return `http://www.linkedin.com/shareArticle?mini=true&title=${document.title}&source=${document.title}&url=`;
|
|
669
|
-
if (
|
|
673
|
+
if (s == "telegram")
|
|
670
674
|
return "https://telegram.me/share/url?url=";
|
|
671
675
|
};
|
|
672
|
-
var D,
|
|
673
|
-
class
|
|
676
|
+
var D, he, H, me, j, ge;
|
|
677
|
+
class Xe {
|
|
674
678
|
constructor(e, t = {}) {
|
|
675
679
|
m(this, D);
|
|
676
680
|
m(this, H);
|
|
@@ -678,86 +682,86 @@ class ze {
|
|
|
678
682
|
this.__storage__ = {
|
|
679
683
|
el: e,
|
|
680
684
|
options: t
|
|
681
|
-
},
|
|
685
|
+
}, h(this, D, he).call(this);
|
|
682
686
|
}
|
|
683
687
|
}
|
|
684
|
-
D = new WeakSet(),
|
|
685
|
-
const { el: e, options: t } = this.__storage__, { SETTINGS:
|
|
686
|
-
!
|
|
687
|
-
}, H = new WeakSet(),
|
|
688
|
+
D = new WeakSet(), he = function() {
|
|
689
|
+
const { el: e, options: t } = this.__storage__, { SETTINGS: r } = ke;
|
|
690
|
+
!te(e) || !V(e) || (this.elements = T(e), this.options = Object.assign({}, r, t), h(this, H, me).call(this));
|
|
691
|
+
}, H = new WeakSet(), me = function() {
|
|
688
692
|
const { elements: e, options: t } = this;
|
|
689
|
-
e.forEach((
|
|
690
|
-
|
|
691
|
-
o.share = {}, o.share.instance = this, o.share.params = t, o.share.eventHandler =
|
|
693
|
+
e.forEach((r) => {
|
|
694
|
+
r.querySelectorAll("[share-target]").forEach((o) => {
|
|
695
|
+
o.share = {}, o.share.instance = this, o.share.params = t, o.share.eventHandler = h(this, j, ge), o.addEventListener("click", o.share.eventHandler);
|
|
692
696
|
});
|
|
693
697
|
});
|
|
694
|
-
}, j = new WeakSet(),
|
|
695
|
-
const { eventHandler: e, params: t } = this.share,
|
|
698
|
+
}, j = new WeakSet(), ge = function() {
|
|
699
|
+
const { eventHandler: e, params: t } = this.share, r = this.getAttribute("share-target"), o = {
|
|
696
700
|
source: this.getAttribute("utm-source"),
|
|
697
701
|
medium: this.getAttribute("utm-medium"),
|
|
698
702
|
campaign: this.getAttribute("utm-campaign")
|
|
699
|
-
},
|
|
703
|
+
}, l = {
|
|
700
704
|
success: this.getAttribute("copy-success") || t.success,
|
|
701
705
|
text: this.getAttribute("copy-text") || t.text,
|
|
702
706
|
className: this.getAttribute("copy-class") || t.className,
|
|
703
707
|
duration: this.getAttribute("copy-duration") || t.duration
|
|
704
|
-
},
|
|
705
|
-
let
|
|
706
|
-
if (
|
|
707
|
-
window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${
|
|
708
|
+
}, n = encodeURIComponent(document.URL);
|
|
709
|
+
let u = n;
|
|
710
|
+
if (r == "wechat") {
|
|
711
|
+
window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${n}&size=250x250`, "share to wechat", "width=300,height=300");
|
|
708
712
|
return;
|
|
709
713
|
}
|
|
710
|
-
if (
|
|
714
|
+
if (r == "url") {
|
|
711
715
|
if (V(".copied-wrapper"))
|
|
712
716
|
return;
|
|
713
|
-
document.querySelector("body").insertAdjacentHTML(
|
|
714
|
-
const
|
|
715
|
-
|
|
716
|
-
const
|
|
717
|
-
if (
|
|
717
|
+
document.querySelector("body").insertAdjacentHTML(Ae.append, `<div class='copied-wrapper'><div class='text'>${l.success ? l.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
|
|
718
|
+
const p = document.querySelector(".copied-wrapper");
|
|
719
|
+
l.className && p.classList.add(l.className), p.style.top = this.getBoundingClientRect().top + window.scrollY + "px", p.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", p.style.display = "block";
|
|
720
|
+
const c = document.querySelector("#clipboard");
|
|
721
|
+
if (c.value = l.text ?? window.location.href, c.setSelectionRange(0, 9999), c.select(), document.execCommand("copy")) {
|
|
718
722
|
document.execCommand("copy");
|
|
719
|
-
const
|
|
723
|
+
const i = document.querySelector(".copied-wrapper"), a = document.querySelector(".copied-wrapper .text");
|
|
720
724
|
a.style.display = "block", a.style.opacity = 0;
|
|
721
|
-
const
|
|
725
|
+
const d = (f, v) => {
|
|
722
726
|
let y = 0;
|
|
723
|
-
const $ = 50,
|
|
724
|
-
y +=
|
|
725
|
-
g(
|
|
726
|
-
|
|
727
|
+
const $ = 50, E = $ / v, P = setInterval(function() {
|
|
728
|
+
y += E, f.style.opacity = y, y >= 1 && (clearInterval(P), setTimeout(function() {
|
|
729
|
+
g(f, 300, function() {
|
|
730
|
+
i.remove();
|
|
727
731
|
});
|
|
728
|
-
},
|
|
732
|
+
}, l.duration));
|
|
729
733
|
}, $);
|
|
730
|
-
}, g = (
|
|
734
|
+
}, g = (f, v, y) => {
|
|
731
735
|
let $ = 1;
|
|
732
|
-
const
|
|
733
|
-
$ -= P,
|
|
734
|
-
},
|
|
736
|
+
const E = 50, P = E / v, fe = setInterval(() => {
|
|
737
|
+
$ -= P, f.style.opacity = $, $ <= 0 && (clearInterval(fe), f.style.display = "none", y && y());
|
|
738
|
+
}, E);
|
|
735
739
|
};
|
|
736
|
-
|
|
740
|
+
d(a, 300);
|
|
737
741
|
}
|
|
738
742
|
return;
|
|
739
743
|
}
|
|
740
|
-
|
|
744
|
+
u = `${u}${o.source ? `?utm_source=${o.source}` : ""}${o.medium ? `&utm_medium${o.medium}` : ""}${o.campaign ? `&utm_campaign${o.campaign}` : ""}`, u = u.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), r == "line" ? window.open(`${ee(r)}${n}`) : window.open(`${ee(r)}${u}"e=${u}`), this.removeEventListener("click", e), setTimeout(() => {
|
|
741
745
|
this.addEventListener("click", e);
|
|
742
746
|
}, 100);
|
|
743
747
|
};
|
|
744
748
|
export {
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
749
|
+
je as Anchor4,
|
|
750
|
+
Pe as Aost4,
|
|
751
|
+
ze as Article4,
|
|
752
|
+
Ie as CategorySlider,
|
|
753
|
+
Fe as Collapse4,
|
|
754
|
+
Ue as Configs,
|
|
755
|
+
Ne as Detect4,
|
|
756
|
+
Ve as Dropdown4,
|
|
757
|
+
Ye as ImagePreview,
|
|
758
|
+
Ge as ImageValidate,
|
|
759
|
+
Je as Marquee4,
|
|
760
|
+
Ke as Modal4,
|
|
761
|
+
Qe as Multipurpose4,
|
|
762
|
+
Ze as Ripple4,
|
|
763
|
+
Xe as Share4,
|
|
764
|
+
et as Tab4,
|
|
765
|
+
we as Video4
|
|
762
766
|
};
|
|
763
767
|
//# sourceMappingURL=fesd-bundle.js.map
|