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