@xwadex/fesd 0.0.26 → 0.0.28
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.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
var
|
1
|
+
var bt = (r, t, e) => {
|
2
2
|
if (!t.has(r))
|
3
3
|
throw TypeError("Cannot " + e);
|
4
4
|
};
|
@@ -7,10 +7,10 @@ var m = (r, t, e) => {
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
8
8
|
t instanceof WeakSet ? t.add(r) : t.set(r, e);
|
9
9
|
};
|
10
|
-
var p = (r, t, e) => (
|
11
|
-
import { i as
|
12
|
-
import { A as
|
13
|
-
import {
|
10
|
+
var p = (r, t, e) => (bt(r, t, "access private method"), e);
|
11
|
+
import { i as tt, a as V, g as q, v as ft, c as wt, b as vt, d as yt, e as $t, f as At, s as St } from "./image-preview-bundle.js";
|
12
|
+
import { A as Dt, j as Ht, C as jt, h as Pt, D as Ft, m as Ut, I as Vt, k as Yt, M as Gt, l as Jt, R as Kt, T as Qt } from "./image-preview-bundle.js";
|
13
|
+
import { m as C, S as xt, p as Et } from "./vendor-bundle.js";
|
14
14
|
const E = () => {
|
15
15
|
const r = navigator.userAgent, t = {
|
16
16
|
// Firefox 1.0+
|
@@ -46,84 +46,86 @@ const E = () => {
|
|
46
46
|
isLinux: r.indexOf("Linux") > -1
|
47
47
|
};
|
48
48
|
return { browser: t, mobile: e, os: s };
|
49
|
-
},
|
49
|
+
}, Lt = () => {
|
50
50
|
const { browser: r } = E();
|
51
51
|
return Object.keys(r).find((t) => {
|
52
52
|
if (r[t])
|
53
53
|
return r[t];
|
54
54
|
});
|
55
|
-
},
|
55
|
+
}, Ct = () => {
|
56
56
|
const { mobile: r } = E();
|
57
57
|
return Object.keys(r).some((t) => {
|
58
58
|
if (r[t])
|
59
59
|
return r[t];
|
60
60
|
});
|
61
|
-
},
|
61
|
+
}, kt = () => {
|
62
62
|
const { os: r } = E();
|
63
63
|
return Object.keys(r).find((t) => {
|
64
64
|
if (r[t])
|
65
65
|
return r[t];
|
66
66
|
});
|
67
|
-
},
|
68
|
-
function
|
67
|
+
}, qt = () => console.dir(E());
|
68
|
+
function Rt() {
|
69
69
|
return {
|
70
70
|
init: E,
|
71
|
-
isBrowser4:
|
72
|
-
isMobile4:
|
73
|
-
isOs4:
|
74
|
-
logs:
|
71
|
+
isBrowser4: Lt,
|
72
|
+
isMobile4: Ct,
|
73
|
+
isOs4: kt,
|
74
|
+
logs: qt
|
75
75
|
};
|
76
76
|
}
|
77
77
|
const f = (r, t, e) => {
|
78
|
-
r && (
|
78
|
+
r && (vt(r) ? r.forEach((s) => s.style[t] = e) : r.style[t] = e);
|
79
79
|
};
|
80
|
-
var
|
81
|
-
class
|
80
|
+
var T, et, W, st, A, Y, _, rt, O, it, M, ot, R, at, B, nt, N, lt, I, ct, X, dt, S, G, z, ut, x, J;
|
81
|
+
class Bt {
|
82
82
|
constructor(t, e = {}) {
|
83
|
-
m(this,
|
84
|
-
m(this,
|
83
|
+
m(this, T);
|
84
|
+
m(this, W);
|
85
85
|
// 取得元件上的設定值
|
86
86
|
m(this, A);
|
87
87
|
// 設置設定值的 CSS 樣式
|
88
|
-
m(this, W);
|
89
|
-
// 表格拖曳功能
|
90
88
|
m(this, _);
|
91
|
-
//
|
89
|
+
// 表格拖曳功能
|
92
90
|
m(this, O);
|
91
|
+
// 設置表格凍結
|
93
92
|
m(this, M);
|
94
93
|
m(this, R);
|
95
|
-
m(this,
|
94
|
+
m(this, B);
|
95
|
+
m(this, N);
|
96
96
|
// Markdown 設置
|
97
|
+
m(this, I);
|
98
|
+
// Navigation 設置
|
97
99
|
m(this, X);
|
98
100
|
m(this, S);
|
99
|
-
m(this,
|
101
|
+
m(this, z);
|
100
102
|
m(this, x);
|
101
|
-
!
|
103
|
+
!tt(t) || !V(t) || (this.__storage__ = {
|
102
104
|
el: t,
|
103
105
|
options: e
|
104
|
-
}, this.active = "data-article-active", p(this,
|
106
|
+
}, this.active = "data-article-active", p(this, T, et).call(this));
|
105
107
|
}
|
106
108
|
update() {
|
107
109
|
const { elements: t } = this;
|
108
110
|
t.forEach((e) => {
|
109
111
|
e.querySelectorAll("._article").forEach((s) => {
|
110
|
-
s.article = {}, s.article.parent = e, s.article.params = p(this, A,
|
112
|
+
s.article = {}, s.article.parent = e, s.article.params = p(this, A, Y).call(this, s), p(this, S, G).call(this, s), p(this, x, J).call(this, s);
|
111
113
|
});
|
112
114
|
});
|
113
115
|
}
|
114
116
|
}
|
115
|
-
|
116
|
-
const { el: t, options: e } = this.__storage__, { SETTINGS: s } =
|
117
|
-
this.elements = e.state == "not active" ?
|
118
|
-
},
|
117
|
+
T = new WeakSet(), et = function() {
|
118
|
+
const { el: t, options: e } = this.__storage__, { SETTINGS: s } = yt;
|
119
|
+
this.elements = e.state == "not active" ? q(t + `:not([${this.active}])`) : q(t), this.elements = q(t), this.options = Object.assign({}, s, e), p(this, W, st).call(this);
|
120
|
+
}, W = new WeakSet(), st = function() {
|
119
121
|
const { elements: t } = this;
|
120
122
|
t.forEach((e) => {
|
121
123
|
e.setAttribute(this.active, ""), e.querySelectorAll("._article").forEach((s) => {
|
122
|
-
var i,
|
123
|
-
s.article = {}, s.article.parent = e, s.article.params = p(this, A,
|
124
|
+
var i, n;
|
125
|
+
s.article = {}, s.article.parent = e, s.article.params = p(this, A, Y).call(this, s), s.article.methods = {}, s.article.methods.update = this.update, p(n = p(i = p(this, _, rt).call(this, s), S, G).call(i, s), z, ut).call(n, s), p(this, x, J).call(this, s);
|
124
126
|
});
|
125
127
|
});
|
126
|
-
}, A = new WeakSet(),
|
128
|
+
}, A = new WeakSet(), Y = function(t) {
|
127
129
|
return {
|
128
130
|
// 元件本身
|
129
131
|
$selector: t,
|
@@ -136,6 +138,7 @@ k = new WeakSet(), Z = function() {
|
|
136
138
|
$cover: t.querySelectorAll("._cover"),
|
137
139
|
$swiper: t.querySelector(".swiper"),
|
138
140
|
$table: t.querySelector("._table"),
|
141
|
+
$quote: t.querySelector("._quote"),
|
139
142
|
$swiperButtonCover: t.querySelector(".swiper-button-cover"),
|
140
143
|
// 子層元件
|
141
144
|
$h: t.querySelector("._H"),
|
@@ -154,163 +157,210 @@ k = new WeakSet(), Z = function() {
|
|
154
157
|
buttonColor: t.getAttribute("button-color"),
|
155
158
|
buttonColorHover: t.getAttribute("button-color-hover"),
|
156
159
|
buttonTextColor: t.getAttribute("button-textcolor"),
|
157
|
-
descriptionColor: t.getAttribute("description-color")
|
160
|
+
descriptionColor: t.getAttribute("description-color"),
|
161
|
+
quoteColor: t.getAttribute("quote-color"),
|
162
|
+
markdown: t.getAttribute("data-table-markdown") ?? !1
|
158
163
|
};
|
159
|
-
},
|
164
|
+
}, _ = new WeakSet(), rt = function(t) {
|
160
165
|
const { params: e } = t.article;
|
161
|
-
return f(e.$h, "color", e.hColor), f(e.$subH, "color", e.subHColor), f(e.$p, "color", e.pColor), f(e.$description, "color", e.descriptionColor), f(e.$button, "backgroundColor", e.buttonColor), f(e.$button, "color", e.buttonTextColor), e.buttonColorHover && e.$button && (e.$button.appendChild(document.createElement("span")), f(e.$button.querySelector("span"), "backgroundColor", e.buttonColorHover)), f(e.$backgroundWrap, "backgroundColor", e.typeFullColor), f(e.$contentWrap, "backgroundColor", e.typeFullBoxColor), this;
|
162
|
-
},
|
166
|
+
return f(e.$h, "color", e.hColor), f(e.$subH, "color", e.subHColor), f(e.$p, "color", e.pColor), f(e.$description, "color", e.descriptionColor), f(e.$button, "backgroundColor", e.buttonColor), f(e.$button, "color", e.buttonTextColor), e.buttonColorHover && e.$button && (e.$button.appendChild(document.createElement("span")), f(e.$button.querySelector("span"), "backgroundColor", e.buttonColorHover)), f(e.$backgroundWrap, "backgroundColor", e.typeFullColor), f(e.$contentWrap, "backgroundColor", e.typeFullBoxColor), f(e.$quote, "color", e.quoteColor), this;
|
167
|
+
}, O = new WeakSet(), it = function(t) {
|
163
168
|
const { params: e } = t.article, s = e.$table;
|
164
|
-
let i = !1, a,
|
165
|
-
s.addEventListener("mousedown", function(
|
166
|
-
|
167
|
-
const
|
168
|
-
|
169
|
+
let i = !1, n, a, c, l;
|
170
|
+
s.addEventListener("mousedown", function(o) {
|
171
|
+
o.preventDefault(), i = !0;
|
172
|
+
const d = s.getBoundingClientRect();
|
173
|
+
n = o.pageX - d.left, a = o.pageY - d.top, c = s.scrollLeft, l = s.scrollTop;
|
169
174
|
}), s.addEventListener("mouseleave", function() {
|
170
175
|
i = !1;
|
171
176
|
}), s.addEventListener("mouseup", function() {
|
172
177
|
i = !1;
|
173
|
-
}), s.addEventListener("mousemove", function(
|
178
|
+
}), s.addEventListener("mousemove", function(o) {
|
174
179
|
if (!i)
|
175
180
|
return;
|
176
|
-
|
177
|
-
const
|
178
|
-
s.scrollLeft =
|
181
|
+
o.preventDefault();
|
182
|
+
const d = s.getBoundingClientRect(), u = o.pageX - d.left, h = o.pageY - d.top, g = u - n, b = h - a;
|
183
|
+
s.scrollLeft = c - g, s.scrollTop = l - b;
|
179
184
|
});
|
180
|
-
},
|
181
|
-
const { basic_rwd: i } = this.options,
|
182
|
-
if (
|
185
|
+
}, M = new WeakSet(), ot = function(t, e, s) {
|
186
|
+
const { basic_rwd: i } = this.options, n = window.innerWidth < i, a = [...t.querySelectorAll("tr")];
|
187
|
+
if (n || !a.length)
|
183
188
|
return;
|
184
|
-
const
|
185
|
-
p(this,
|
186
|
-
},
|
189
|
+
const c = p(this, R, at).call(this, a);
|
190
|
+
p(this, N, lt).call(this, t, c, e, s);
|
191
|
+
}, R = new WeakSet(), at = function(t) {
|
187
192
|
const e = [], s = /* @__PURE__ */ new Set();
|
188
|
-
return t.forEach((i,
|
189
|
-
const
|
190
|
-
e[
|
191
|
-
let
|
192
|
-
|
193
|
-
const
|
194
|
-
for (; e[
|
195
|
-
|
196
|
-
for (let
|
197
|
-
const
|
198
|
-
e[
|
199
|
-
for (let
|
200
|
-
const
|
201
|
-
e[
|
202
|
-
el:
|
203
|
-
topRow:
|
204
|
-
leftCol:
|
205
|
-
rowspan:
|
206
|
-
colspan:
|
207
|
-
},
|
193
|
+
return t.forEach((i, n) => {
|
194
|
+
const a = [...i.children];
|
195
|
+
e[n] = [];
|
196
|
+
let c = 0;
|
197
|
+
a.forEach((l) => {
|
198
|
+
const o = +l.getAttribute("rowspan") || 1, d = +l.getAttribute("colspan") || 1;
|
199
|
+
for (; e[n][c] || s.has(`${n},${c}`); )
|
200
|
+
c++;
|
201
|
+
for (let u = 0; u < o; u++) {
|
202
|
+
const h = n + u;
|
203
|
+
e[h] ?? (e[h] = []);
|
204
|
+
for (let g = 0; g < d; g++) {
|
205
|
+
const b = c + g;
|
206
|
+
e[h][b] = {
|
207
|
+
el: u === 0 && g === 0 ? l : null,
|
208
|
+
topRow: n,
|
209
|
+
leftCol: c,
|
210
|
+
rowspan: o,
|
211
|
+
colspan: d
|
212
|
+
}, u > 0 && s.add(`${h},${b}`);
|
208
213
|
}
|
209
214
|
}
|
210
|
-
|
215
|
+
c += d;
|
211
216
|
});
|
212
217
|
}), e;
|
213
|
-
},
|
214
|
-
var
|
215
|
-
const s = e.length, i = Array(s).fill(0),
|
216
|
-
for (let
|
217
|
-
for (let
|
218
|
-
const
|
219
|
-
if (
|
220
|
-
const
|
221
|
-
i[
|
218
|
+
}, B = new WeakSet(), nt = function(t, e) {
|
219
|
+
var a;
|
220
|
+
const s = e.length, i = Array(s).fill(0), n = t.getBoundingClientRect().top;
|
221
|
+
for (let c = 0; c < s; c++)
|
222
|
+
for (let l = 0; l < (((a = e[c]) == null ? void 0 : a.length) || 0); l++) {
|
223
|
+
const o = e[c][l];
|
224
|
+
if (o != null && o.el) {
|
225
|
+
const d = o.el.getBoundingClientRect().top;
|
226
|
+
i[c] = d - n;
|
222
227
|
break;
|
223
228
|
}
|
224
229
|
}
|
225
230
|
return i;
|
226
|
-
},
|
227
|
-
var
|
228
|
-
const
|
229
|
-
for (let
|
230
|
-
for (let
|
231
|
-
const
|
232
|
-
if (
|
233
|
-
|
231
|
+
}, N = new WeakSet(), lt = function(t, e, s, i) {
|
232
|
+
var l;
|
233
|
+
const n = p(this, B, nt).call(this, t, e), a = ((l = e[0]) == null ? void 0 : l.length) ?? 0, c = Array(a).fill(0);
|
234
|
+
for (let o = 0; o < a; o++)
|
235
|
+
for (let d = 0; d < e.length; d++) {
|
236
|
+
const u = e[d][o];
|
237
|
+
if (u != null && u.el) {
|
238
|
+
c[o] = u.el.offsetLeft;
|
234
239
|
break;
|
235
240
|
}
|
236
241
|
}
|
237
242
|
e.forEach(
|
238
|
-
(
|
239
|
-
if (!(
|
243
|
+
(o) => o.forEach((d) => {
|
244
|
+
if (!(d != null && d.el))
|
240
245
|
return;
|
241
|
-
const { el:
|
242
|
-
|
246
|
+
const { el: u, topRow: h, leftCol: g } = d, b = h < s, v = g < i;
|
247
|
+
u.style.position = "sticky", u.style.zIndex = b && v ? 3 : b ? 2 : v ? 1 : 0, u.style.backgroundColor = getComputedStyle(u).backgroundColor, b && (u.style.top = `${n[h]}px`), v && (u.style.left = `${c[g]}px`);
|
243
248
|
})
|
244
249
|
);
|
245
|
-
},
|
246
|
-
const
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
250
|
+
}, I = new WeakSet(), ct = function(t) {
|
251
|
+
const { markdownLink: e } = this.options;
|
252
|
+
if (t.hasAttribute("data-markdown-rendered"))
|
253
|
+
return;
|
254
|
+
new C.Renderer(), C.use({
|
255
|
+
extensions: [{
|
256
|
+
name: "center",
|
257
|
+
level: "block",
|
258
|
+
start(l) {
|
259
|
+
var o;
|
260
|
+
return (o = l.match(/==/)) == null ? void 0 : o.index;
|
261
|
+
},
|
262
|
+
tokenizer(l) {
|
263
|
+
const d = /^@center@(.+?)@center@/.exec(l);
|
264
|
+
if (d)
|
265
|
+
return {
|
266
|
+
type: "center",
|
267
|
+
raw: d[0],
|
268
|
+
text: d[1],
|
269
|
+
tokens: this.lexer.inlineTokens(d[1])
|
270
|
+
};
|
271
|
+
},
|
272
|
+
renderer(l) {
|
273
|
+
return `<div data-center='true'>${C.parser(l.tokens)}</div>`;
|
274
|
+
}
|
275
|
+
}]
|
253
276
|
});
|
254
|
-
|
277
|
+
const s = ["h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br", "span", "div"], i = ["data-center"], n = (l) => Et.sanitize(l, {
|
278
|
+
ALLOWED_TAGS: e ? [...s, "a"] : s,
|
279
|
+
ALLOWED_ATTR: e ? [...i, "href", "title", "target"] : i,
|
280
|
+
RETURN_TRUSTED_TYPE: !1
|
281
|
+
}), a = (l) => n(C.parse(l));
|
282
|
+
t.querySelectorAll("td,th").forEach((l) => {
|
283
|
+
l.innerHTML = l.textContent;
|
284
|
+
const o = l.textContent.trim().replace(/<[^>]*>/g, "");
|
285
|
+
l.innerHTML = a(o);
|
286
|
+
}), t.setAttribute("data-markdown-rendered", "true");
|
287
|
+
}, X = new WeakSet(), dt = function(t) {
|
288
|
+
const { scrollStep: e } = this.options, s = t.querySelector("._contentWrap"), i = t.querySelector("._tableCover"), n = t.querySelector("._table"), a = typeof e == "number" ? e : s.clientWidth * 0.5;
|
289
|
+
if (!s || !i || i.querySelector(".table_navigation"))
|
290
|
+
return;
|
291
|
+
const c = document.createElement("div");
|
292
|
+
c.className = "table_navigation";
|
293
|
+
const l = document.createElement("div"), o = document.createElement("div");
|
294
|
+
l.className = "table-nav-left", o.className = "table-nav-right", c.appendChild(l), c.appendChild(o), i.appendChild(c);
|
295
|
+
const d = () => {
|
296
|
+
const u = n.scrollLeft, h = n.scrollWidth - n.clientWidth;
|
297
|
+
l.classList.toggle("disabled", u <= 0), o.classList.toggle("disabled", u >= h - 1);
|
298
|
+
};
|
299
|
+
l.addEventListener("click", () => {
|
300
|
+
n.scrollBy({ left: -a, behavior: "smooth" });
|
301
|
+
}), o.addEventListener("click", () => {
|
302
|
+
n.scrollBy({ left: a, behavior: "smooth" });
|
303
|
+
}), n.addEventListener("scroll", d), window.addEventListener("resize", d), d();
|
304
|
+
}, S = new WeakSet(), G = function(t) {
|
255
305
|
const { params: e } = t.article;
|
256
|
-
return e.$video.length && new
|
257
|
-
},
|
306
|
+
return e.$video.length && new ft(e.$video), this;
|
307
|
+
}, z = new WeakSet(), ut = function(t) {
|
258
308
|
const { basic_rwd: e } = this.options, { params: s } = t.article;
|
259
309
|
if (!s.$swiper)
|
260
310
|
return;
|
261
|
-
const i =
|
262
|
-
let
|
311
|
+
const i = wt(), n = this;
|
312
|
+
let a = {
|
263
313
|
on: {
|
264
|
-
init(
|
265
|
-
const
|
266
|
-
s.$video.length && ([...
|
267
|
-
var
|
268
|
-
(
|
269
|
-
}),
|
314
|
+
init(o) {
|
315
|
+
const d = o.$el[0];
|
316
|
+
s.$video.length && ([...d.querySelectorAll("[video4-active]")].forEach((h) => {
|
317
|
+
var g, b;
|
318
|
+
(g = h.querySelector($t.SETTINGS.videoButton)) == null || g.remove(), (b = h.querySelector(".overlay")) == null || b.remove(), h.removeAttribute("video4-active");
|
319
|
+
}), n.update());
|
270
320
|
},
|
271
|
-
observerUpdate(
|
272
|
-
|
321
|
+
observerUpdate(o) {
|
322
|
+
o.params.autoplay.enabled && (o.autoplay.start(), o.update());
|
273
323
|
}
|
274
324
|
},
|
275
325
|
observer: !0,
|
276
326
|
breakpoints: {}
|
277
327
|
};
|
278
328
|
if (s.$selector.setAttribute("img-swiper", "on"), s.$selector.classList.add(`swiper-${i}`), s.$selector.getAttribute("swiper-arrow") !== "off" && s.$selector.getAttribute("swiper-arrow")) {
|
279
|
-
const
|
280
|
-
|
281
|
-
const
|
282
|
-
|
329
|
+
const o = document.createElement("div");
|
330
|
+
o.className = `swiper-button-next swiper-${i}`, s.$swiperButtonCover.appendChild(o);
|
331
|
+
const d = document.createElement("div");
|
332
|
+
d.className = `swiper-button-prev swiper-${i}`, s.$swiperButtonCover.appendChild(d), a.navigation = {
|
283
333
|
nextEl: `.swiper-button-next.swiper-${i}`,
|
284
334
|
prevEl: `.swiper-button-prev.swiper-${i}`
|
285
335
|
};
|
286
336
|
}
|
287
337
|
if (s.$selector.getAttribute("swiper-nav") !== "off" || !s.$selector.getAttribute("swiper-nav")) {
|
288
|
-
const
|
289
|
-
|
338
|
+
const o = document.createElement("div");
|
339
|
+
o.className = `swiper-pagination swiper-${i}`, s.$swiper.appendChild(o), a.pagination = {
|
290
340
|
el: `.swiper-pagination.swiper-${i}`,
|
291
341
|
clickable: !0
|
292
342
|
};
|
293
343
|
}
|
294
|
-
Number.parseInt(s.$selector.getAttribute("swiper-num")) && (
|
344
|
+
Number.parseInt(s.$selector.getAttribute("swiper-num")) && (a.breakpoints[e] = {
|
295
345
|
slidesPerView: s.$selector.getAttribute("swiper-num") ? Number.parseInt(s.$selector.getAttribute("swiper-num")) > 5 ? 5 : Number.parseInt(s.$selector.getAttribute("swiper-num")) : 1
|
296
|
-
}), (s.$selector.getAttribute("swiper-autoplay") !== "off" || !s.$selector.getAttribute("swiper-autoplay")) && (
|
346
|
+
}), (s.$selector.getAttribute("swiper-autoplay") !== "off" || !s.$selector.getAttribute("swiper-autoplay")) && (a.autoplay = {
|
297
347
|
delay: 3e3,
|
298
348
|
disableOnInteraction: !1
|
299
|
-
}), (s.$selector.getAttribute("swiper-loop") !== "off" || !s.$selector.getAttribute("swiper-loop")) && (
|
300
|
-
let
|
301
|
-
s.$swiper.querySelectorAll(".swiper-slide").length <=
|
302
|
-
const
|
303
|
-
return t.article.swiperList = [], t.article.swiperList.push(
|
304
|
-
}, x = new WeakSet(),
|
305
|
-
const {
|
306
|
-
if (!
|
349
|
+
}), (s.$selector.getAttribute("swiper-loop") !== "off" || !s.$selector.getAttribute("swiper-loop")) && (a.loop = !0), s.$selector.getAttribute("swiper-speed") && (a.speed = parseInt(s.$selector.getAttribute("swiper-speed"))), s.$selector.getAttribute("swiper-parallax") !== "off" && !s.$selector.getAttribute("swiper-loop") && (a.parallax = !0), s.$selector.getAttribute("swiper-pagination-dynamic") === "on" && (a.pagination.dynamicBullets = !0, a.pagination ? a.pagination.dynamicBullets = !0 : console.warn("pagination undefined"));
|
350
|
+
let c = () => window.innerWidth > e && Number(s.$selector.getAttribute("swiper-num")) || 1;
|
351
|
+
s.$swiper.querySelectorAll(".swiper-slide").length <= c() && (a.navigation = !1, a.pagination = !1, a.autoplay = !1, a.loop = !1, s.$selector.querySelector(".swiper-button-cover").style.display = "none", s.$selector.querySelector(".swiper-pagination").style.display = "none", s.$swiper.classList.add("swiper-no-swiping"));
|
352
|
+
const l = new xt(s.$swiper, a);
|
353
|
+
return t.article.swiperList = [], t.article.swiperList.push(l), this;
|
354
|
+
}, x = new WeakSet(), J = function(t) {
|
355
|
+
const { navigation: e } = this.options, { params: s } = t.article;
|
356
|
+
if (!s.$table)
|
307
357
|
return;
|
308
|
-
const
|
309
|
-
|
358
|
+
const i = t.getAttribute("freeze-table") === "on", n = parseInt(t.getAttribute("freeze-table-row") ?? "1", 10), a = parseInt(t.getAttribute("freeze-table-col") ?? "1", 10), c = t.querySelector("table"), l = t.querySelector("._tipText"), o = t.offsetWidth, d = c.offsetWidth, u = o < d, h = s.markdown === "on", g = () => {
|
359
|
+
i && p(this, M, ot).call(this, c, n, a), (i || u) && p(this, O, it).call(this, t), h && p(this, I, ct).call(this, c), e && u && p(this, X, dt).call(this, t), u ? (t.classList.add("overflow"), l.style.display = "flex") : (t.classList.remove("overflow"), l.style.display = "none");
|
310
360
|
};
|
311
|
-
return
|
361
|
+
return g(), window.addEventListener("resize", g), this;
|
312
362
|
};
|
313
|
-
let
|
363
|
+
let K = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", Q = "ontouchend" in document.documentElement ? "touchend" : "mouseup", F = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
|
314
364
|
function w(r) {
|
315
365
|
const t = window.getComputedStyle(r), e = t.transform || t.mozTransform;
|
316
366
|
if (e === "none")
|
@@ -333,15 +383,15 @@ function w(r) {
|
|
333
383
|
z: Number(i[14])
|
334
384
|
};
|
335
385
|
}
|
336
|
-
function
|
386
|
+
function k(r) {
|
337
387
|
const e = r.querySelector(".wrapper").querySelectorAll(".item");
|
338
388
|
let s = 0;
|
339
389
|
return e.forEach((i) => {
|
340
|
-
const
|
341
|
-
s += i.getBoundingClientRect().width +
|
390
|
+
const n = getComputedStyle(i), a = parseInt(n.marginLeft), c = parseInt(n.marginRight);
|
391
|
+
s += i.getBoundingClientRect().width + a + c;
|
342
392
|
}), s;
|
343
393
|
}
|
344
|
-
function
|
394
|
+
function U(r) {
|
345
395
|
if (w(r.slideWrapEl).x >= r.translateMin)
|
346
396
|
return "is-start";
|
347
397
|
if (w(r.slideWrapEl).x <= r.translateMax)
|
@@ -351,8 +401,8 @@ function P(r) {
|
|
351
401
|
}
|
352
402
|
function Tt(r) {
|
353
403
|
const t = r.el, e = t.querySelector(".wrapper");
|
354
|
-
e.addEventListener(
|
355
|
-
switch (r.isDown = !0, r.slidable && e.classList.add("dragging"),
|
404
|
+
e.addEventListener(K, function(s) {
|
405
|
+
switch (r.isDown = !0, r.slidable && e.classList.add("dragging"), K) {
|
356
406
|
case "mousedown":
|
357
407
|
r.startX = s.pageX;
|
358
408
|
break;
|
@@ -361,10 +411,10 @@ function Tt(r) {
|
|
361
411
|
break;
|
362
412
|
}
|
363
413
|
r.nowTranslateX = w(e).x;
|
364
|
-
}), e.addEventListener(
|
414
|
+
}), e.addEventListener(Q, function(s) {
|
365
415
|
r.isDown = !1, e.classList.remove("dragging"), e.classList.remove("moving");
|
366
416
|
let i;
|
367
|
-
switch (
|
417
|
+
switch (F) {
|
368
418
|
case "mousemove":
|
369
419
|
i = s.pageX - r.startX;
|
370
420
|
break;
|
@@ -373,22 +423,22 @@ function Tt(r) {
|
|
373
423
|
break;
|
374
424
|
}
|
375
425
|
if (i === 0 && s.target.closest(".item")) {
|
376
|
-
if (
|
426
|
+
if (Q === "mouseup" && s.button !== 0)
|
377
427
|
return;
|
378
|
-
e.querySelectorAll(".item").forEach((
|
379
|
-
|
428
|
+
e.querySelectorAll(".item").forEach((a) => {
|
429
|
+
a.classList.remove("active");
|
380
430
|
}), s.target.closest(".item").classList.add("active"), r.moveActive(r.params.speed);
|
381
431
|
} else
|
382
432
|
r.slidable && r.resetPos(t);
|
383
433
|
}), e.addEventListener("mouseleave", function() {
|
384
434
|
r.isDown && r.slidable && (r.isDown = !1, e.classList.remove("dragging"), e.classList.remove("moving"), r.resetPos(t));
|
385
|
-
}), e.addEventListener(
|
435
|
+
}), e.addEventListener(F, function(s) {
|
386
436
|
if (r.draggable && r.slidable) {
|
387
437
|
if (!r.isDown)
|
388
438
|
return;
|
389
439
|
s.preventDefault();
|
390
440
|
let i;
|
391
|
-
switch (
|
441
|
+
switch (F) {
|
392
442
|
case "mousemove":
|
393
443
|
i = s.pageX - r.startX;
|
394
444
|
break;
|
@@ -398,29 +448,29 @@ function Tt(r) {
|
|
398
448
|
}
|
399
449
|
if (i !== 0) {
|
400
450
|
e.classList.add("moving");
|
401
|
-
const
|
451
|
+
const n = {
|
402
452
|
transition: "all 0ms ease 0s",
|
403
453
|
transform: `translate3d(${r.nowTranslateX + i}px,0,0)`
|
404
454
|
};
|
405
|
-
Object.assign(e.style,
|
455
|
+
Object.assign(e.style, n);
|
406
456
|
}
|
407
457
|
}
|
408
458
|
});
|
409
459
|
}
|
410
|
-
function
|
460
|
+
function Wt(r) {
|
411
461
|
const t = r.querySelectorAll("a");
|
412
462
|
for (var e = 0, s = t.length; e < s; e++)
|
413
463
|
t[e].draggable = !1;
|
414
464
|
}
|
415
|
-
class
|
465
|
+
class Nt {
|
416
466
|
constructor(t, e) {
|
417
467
|
this.el = typeof t == "string" ? document.querySelector(t) : t, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
|
418
468
|
speed: 300,
|
419
469
|
clickSwitch: !0,
|
420
470
|
breakpoint: !1
|
421
|
-
}, Object.assign(this.params, e), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth =
|
471
|
+
}, Object.assign(this.params, e), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth = k(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
|
422
472
|
Math.abs(
|
423
|
-
|
473
|
+
k(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
|
424
474
|
)
|
425
475
|
), this.slidable = this.slideTotalWidth > Math.round(this.el.getBoundingClientRect().width) && (!this.params.breakpoint || window.innerWidth <= this.params.breakpoint), this.init();
|
426
476
|
}
|
@@ -428,35 +478,35 @@ class Rt {
|
|
428
478
|
const t = this;
|
429
479
|
t.slidable && (t.slideWrapEl.style.width = `${t.slideTotalWidth}px`, t.el.classList.add("slidable"), t.slideWrapEl.querySelector(".item.active") && t.moveActive()), window.addEventListener("resize", function() {
|
430
480
|
t.update();
|
431
|
-
}), Tt(t),
|
481
|
+
}), Tt(t), Wt(t.el);
|
432
482
|
}
|
433
483
|
moveActive(t) {
|
434
|
-
const e = this, s = e.slideWrapEl.querySelector(".item.active"),
|
484
|
+
const e = this, s = e.slideWrapEl.querySelector(".item.active"), n = s.previousElementSibling ? s.offsetLeft - e.el.clientWidth / 2 + s.clientWidth / 2 : 0;
|
435
485
|
if (e.slidable) {
|
436
|
-
if (-
|
437
|
-
const
|
486
|
+
if (-n < 0 && -n > e.translateMax) {
|
487
|
+
const a = {
|
438
488
|
transition: `all ${t || 0}ms ease 0s`,
|
439
|
-
transform: `translate3d(-${
|
489
|
+
transform: `translate3d(-${n}px,0,0)`
|
440
490
|
};
|
441
|
-
Object.assign(e.slideWrapEl.style,
|
442
|
-
} else if (-
|
443
|
-
const
|
491
|
+
Object.assign(e.slideWrapEl.style, a);
|
492
|
+
} else if (-n >= 0) {
|
493
|
+
const a = {
|
444
494
|
transition: `all ${t || 0}ms ease 0s`,
|
445
495
|
transform: "translate3d(0,0,0)"
|
446
496
|
};
|
447
|
-
Object.assign(e.slideWrapEl.style,
|
497
|
+
Object.assign(e.slideWrapEl.style, a);
|
448
498
|
} else {
|
449
|
-
const
|
499
|
+
const a = {
|
450
500
|
transition: `all ${t || 0}ms ease 0s`,
|
451
501
|
transform: `translate3d(${e.translateMax}px,0,0)`
|
452
502
|
};
|
453
|
-
Object.assign(e.slideWrapEl.style,
|
503
|
+
Object.assign(e.slideWrapEl.style, a);
|
454
504
|
}
|
455
505
|
if (t)
|
456
506
|
e.slideWrapEl.addEventListener(
|
457
507
|
"transitionend",
|
458
508
|
function() {
|
459
|
-
switch (e.nowTranslateX = w(e.slideWrapEl).x,
|
509
|
+
switch (e.nowTranslateX = w(e.slideWrapEl).x, U(e)) {
|
460
510
|
case "is-start":
|
461
511
|
e.el.classList.add("is-start"), e.el.classList.remove("is-end");
|
462
512
|
break;
|
@@ -471,7 +521,7 @@ class Rt {
|
|
471
521
|
!1
|
472
522
|
);
|
473
523
|
else
|
474
|
-
switch (e.nowTranslateX = w(e.slideWrapEl).x,
|
524
|
+
switch (e.nowTranslateX = w(e.slideWrapEl).x, U(e)) {
|
475
525
|
case "is-start":
|
476
526
|
e.el.classList.add("is-start"), e.el.classList.remove("is-end");
|
477
527
|
break;
|
@@ -486,7 +536,7 @@ class Rt {
|
|
486
536
|
}
|
487
537
|
resetPos() {
|
488
538
|
const t = this;
|
489
|
-
switch (
|
539
|
+
switch (U(t)) {
|
490
540
|
case "is-start":
|
491
541
|
t.el.classList.add("is-start"), t.el.classList.remove("is-end"), Object.assign(t.slideWrapEl.style, {
|
492
542
|
transition: `all ${t.params.speed}ms ease 0s`,
|
@@ -506,14 +556,14 @@ class Rt {
|
|
506
556
|
}
|
507
557
|
update() {
|
508
558
|
const t = this;
|
509
|
-
t.el.querySelector(".wrapper").removeAttribute("style"), t.slideTotalWidth =
|
559
|
+
t.el.querySelector(".wrapper").removeAttribute("style"), t.slideTotalWidth = k(t.el), t.translateMax = -Math.floor(
|
510
560
|
Math.abs(
|
511
|
-
|
561
|
+
k(t.el) - t.el.querySelector(".wrapper").getBoundingClientRect().width
|
512
562
|
)
|
513
563
|
), t.slidable = t.slideTotalWidth > Math.round(t.el.getBoundingClientRect().width) && (!t.params.breakpoint || window.innerWidth <= t.params.breakpoint), t.slidable ? (t.slideWrapEl.style.width = `${t.slideTotalWidth}px`, t.el.classList.add("slidable"), t.slideWrapEl.querySelector(".item.active") && t.moveActive()) : (t.el.classList.remove("slidable"), t.el.classList.remove("is-start"), t.el.classList.remove("is-end"), t.slideWrapEl.removeAttribute("style"));
|
514
564
|
}
|
515
565
|
}
|
516
|
-
const
|
566
|
+
const Z = (r) => {
|
517
567
|
if (r == "facebook")
|
518
568
|
return "https://www.facebook.com/sharer/sharer.php?u=";
|
519
569
|
if (r == "line")
|
@@ -525,95 +575,95 @@ const K = (r) => {
|
|
525
575
|
if (r == "telegram")
|
526
576
|
return "https://telegram.me/share/url?url=";
|
527
577
|
};
|
528
|
-
var
|
578
|
+
var D, pt, H, ht, j, mt;
|
529
579
|
class It {
|
530
580
|
constructor(t, e = {}) {
|
531
|
-
m(this, N);
|
532
581
|
m(this, D);
|
533
|
-
m(this,
|
582
|
+
m(this, H);
|
583
|
+
m(this, j);
|
534
584
|
this.__storage__ = {
|
535
585
|
el: t,
|
536
586
|
options: e
|
537
|
-
}, p(this,
|
587
|
+
}, p(this, D, pt).call(this);
|
538
588
|
}
|
539
589
|
}
|
540
|
-
|
541
|
-
const { el: t, options: e } = this.__storage__, { SETTINGS: s } =
|
542
|
-
!
|
543
|
-
},
|
590
|
+
D = new WeakSet(), pt = function() {
|
591
|
+
const { el: t, options: e } = this.__storage__, { SETTINGS: s } = St;
|
592
|
+
!tt(t) || !V(t) || (this.elements = q(t), this.options = Object.assign({}, s, e), p(this, H, ht).call(this));
|
593
|
+
}, H = new WeakSet(), ht = function() {
|
544
594
|
const { elements: t, options: e } = this;
|
545
595
|
t.forEach((s) => {
|
546
596
|
s.querySelectorAll("[share-target]").forEach((i) => {
|
547
|
-
i.share = {}, i.share.instance = this, i.share.params = e, i.share.eventHandler = p(this,
|
597
|
+
i.share = {}, i.share.instance = this, i.share.params = e, i.share.eventHandler = p(this, j, mt), i.addEventListener("click", i.share.eventHandler);
|
548
598
|
});
|
549
599
|
});
|
550
|
-
},
|
600
|
+
}, j = new WeakSet(), mt = function() {
|
551
601
|
const { eventHandler: t, params: e } = this.share, s = this.getAttribute("share-target"), i = {
|
552
602
|
source: this.getAttribute("utm-source"),
|
553
603
|
medium: this.getAttribute("utm-medium"),
|
554
604
|
campaign: this.getAttribute("utm-campaign")
|
555
|
-
},
|
605
|
+
}, n = {
|
556
606
|
success: this.getAttribute("copy-success") || e.success,
|
557
607
|
text: this.getAttribute("copy-text") || e.text,
|
558
608
|
className: this.getAttribute("copy-class") || e.className,
|
559
609
|
duration: this.getAttribute("copy-duration") || e.duration
|
560
|
-
},
|
561
|
-
let
|
610
|
+
}, a = encodeURIComponent(document.URL);
|
611
|
+
let c = a;
|
562
612
|
if (s == "wechat") {
|
563
|
-
window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${
|
613
|
+
window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${a}&size=250x250`, "share to wechat", "width=300,height=300");
|
564
614
|
return;
|
565
615
|
}
|
566
616
|
if (s == "url") {
|
567
|
-
if (
|
617
|
+
if (V(".copied-wrapper"))
|
568
618
|
return;
|
569
|
-
document.querySelector("body").insertAdjacentHTML(
|
570
|
-
const
|
571
|
-
|
572
|
-
const
|
573
|
-
if (
|
619
|
+
document.querySelector("body").insertAdjacentHTML(At.append, `<div class='copied-wrapper'><div class='text'>${n.success ? n.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
|
620
|
+
const l = document.querySelector(".copied-wrapper");
|
621
|
+
n.className && l.classList.add(n.className), l.style.top = this.getBoundingClientRect().top + window.scrollY + "px", l.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", l.style.display = "block";
|
622
|
+
const o = document.querySelector("#clipboard");
|
623
|
+
if (o.value = n.text ?? window.location.href, o.setSelectionRange(0, 9999), o.select(), document.execCommand("copy")) {
|
574
624
|
document.execCommand("copy");
|
575
|
-
const
|
576
|
-
|
577
|
-
const
|
625
|
+
const d = document.querySelector(".copied-wrapper"), u = document.querySelector(".copied-wrapper .text");
|
626
|
+
u.style.display = "block", u.style.opacity = 0;
|
627
|
+
const h = (b, v) => {
|
578
628
|
let y = 0;
|
579
|
-
const $ = 50,
|
580
|
-
y +=
|
581
|
-
b
|
582
|
-
|
629
|
+
const $ = 50, L = $ / v, P = setInterval(function() {
|
630
|
+
y += L, b.style.opacity = y, y >= 1 && (clearInterval(P), setTimeout(function() {
|
631
|
+
g(b, 300, function() {
|
632
|
+
d.remove();
|
583
633
|
});
|
584
|
-
},
|
634
|
+
}, n.duration));
|
585
635
|
}, $);
|
586
|
-
},
|
636
|
+
}, g = (b, v, y) => {
|
587
637
|
let $ = 1;
|
588
|
-
const
|
589
|
-
$ -=
|
590
|
-
},
|
638
|
+
const L = 50, P = L / v, gt = setInterval(() => {
|
639
|
+
$ -= P, b.style.opacity = $, $ <= 0 && (clearInterval(gt), b.style.display = "none", y && y());
|
640
|
+
}, L);
|
591
641
|
};
|
592
|
-
|
642
|
+
h(u, 300);
|
593
643
|
}
|
594
644
|
return;
|
595
645
|
}
|
596
|
-
|
646
|
+
c = `${c}${i.source ? `?utm_source=${i.source}` : ""}${i.medium ? `&utm_medium${i.medium}` : ""}${i.campaign ? `&utm_campaign${i.campaign}` : ""}`, c = c.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), s == "line" ? window.open(`${Z(s)}${a}`) : window.open(`${Z(s)}${c}"e=${c}`), this.removeEventListener("click", t), setTimeout(() => {
|
597
647
|
this.addEventListener("click", t);
|
598
648
|
}, 100);
|
599
649
|
};
|
600
650
|
export {
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
651
|
+
Dt as Anchor4,
|
652
|
+
Ht as Aost4,
|
653
|
+
Bt as Article4,
|
654
|
+
Nt as CategorySlider,
|
655
|
+
jt as Collapse4,
|
656
|
+
Pt as Configs,
|
657
|
+
Rt as Detect4,
|
658
|
+
Ft as Dropdown4,
|
659
|
+
Ut as ImagePreview,
|
660
|
+
Vt as ImageValidate,
|
661
|
+
Yt as Marquee4,
|
662
|
+
Gt as Modal4,
|
663
|
+
Jt as Multipurpose4,
|
664
|
+
Kt as Ripple4,
|
615
665
|
It as Share4,
|
616
|
-
|
617
|
-
|
666
|
+
Qt as Tab4,
|
667
|
+
ft as Video4
|
618
668
|
};
|
619
669
|
//# sourceMappingURL=fesd-bundle.js.map
|