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