@xwadex/fesd 0.0.20 → 0.0.22

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.
@@ -1,18 +1,18 @@
1
- var ot = (r, t, e) => {
2
- if (!t.has(r))
3
- throw TypeError("Cannot " + e);
1
+ var Z = (r, e, t) => {
2
+ if (!e.has(r))
3
+ throw TypeError("Cannot " + t);
4
4
  };
5
- var g = (r, t, e) => {
6
- if (t.has(r))
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
- t instanceof WeakSet ? t.add(r) : t.set(r, e);
8
+ e instanceof WeakSet ? e.add(r) : e.set(r, t);
9
9
  };
10
- var p = (r, t, e) => (ot(r, t, "access private method"), e);
11
- import { i as Y, a as z, g as q, v as at, c as nt, b as lt, d as ct, e as dt, f as ut, s as pt } from "./image-preview-bundle.js";
12
- import { A as Wt, j as kt, C as Tt, h as _t, D as Ot, m as Mt, I as It, k as Xt, M as Rt, l as Bt, R as Nt, T as Dt } from "./image-preview-bundle.js";
13
- import { S as mt } from "./vendor-bundle.js";
14
- const E = () => {
15
- const r = navigator.userAgent, t = {
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
- }, e = {
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: t, mobile: e, os: s };
49
- }, ht = () => {
50
- const { browser: r } = E();
51
- return Object.keys(r).find((t) => {
52
- if (r[t])
53
- return r[t];
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
- }, gt = () => {
56
- const { mobile: r } = E();
57
- return Object.keys(r).some((t) => {
58
- if (r[t])
59
- return r[t];
55
+ }, ce = () => {
56
+ const { mobile: r } = $();
57
+ return Object.keys(r).some((e) => {
58
+ if (r[e])
59
+ return r[e];
60
60
  });
61
- }, bt = () => {
62
- const { os: r } = E();
63
- return Object.keys(r).find((t) => {
64
- if (r[t])
65
- return r[t];
61
+ }, de = () => {
62
+ const { os: r } = $();
63
+ return Object.keys(r).find((e) => {
64
+ if (r[e])
65
+ return r[e];
66
66
  });
67
- }, ft = () => console.dir(E());
68
- function At() {
67
+ }, ue = () => console.dir($());
68
+ function we() {
69
69
  return {
70
- init: E,
71
- isBrowser4: ht,
72
- isMobile4: gt,
73
- isOs4: bt,
74
- logs: ft
70
+ init: $,
71
+ isBrowser4: le,
72
+ isMobile4: ce,
73
+ isOs4: de,
74
+ logs: ue
75
75
  };
76
76
  }
77
- const f = (r, t, e) => {
78
- r && (lt(r) ? r.forEach((s) => s.style[t] = e) : r.style[t] = e);
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 W, G, k, J, S, j, T, K, _, Q, O, Z, A, H, M, tt, x, P;
81
- class xt {
82
- constructor(t, e = {}) {
83
- g(this, W);
84
- g(this, k);
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
- g(this, S);
86
+ d(this, f);
87
87
  // 設置設定值的 CSS 樣式
88
- g(this, T);
89
- // 表格拖曳功能
90
- g(this, _);
91
- // 設置表格凍結
92
- g(this, O);
93
- g(this, A);
94
- g(this, M);
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: t } = this;
103
- t.forEach((e) => {
104
- e.querySelectorAll("._article").forEach((s) => {
105
- s.article = {}, s.article.parent = e, s.article.params = p(this, S, j).call(this, s), p(this, A, H).call(this, s), p(this, x, P).call(this, s);
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
- W = new WeakSet(), G = function() {
111
- const { el: t, options: e } = this.__storage__, { SETTINGS: s } = ct;
112
- 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, k, J).call(this);
113
- }, k = new WeakSet(), J = function() {
114
- const { elements: t } = this;
115
- t.forEach((e) => {
116
- e.setAttribute(this.active, ""), e.querySelectorAll("._article").forEach((s) => {
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 = e, s.article.params = p(this, S, j).call(this, s), s.article.methods = {}, s.article.methods.update = this.update, p(a = p(i = p(this, T, K).call(this, s), A, H).call(i, s), M, tt).call(a, s), p(this, x, P).call(this, s);
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
- }, S = new WeakSet(), j = function(t) {
116
+ }, f = new WeakSet(), R = function(e) {
122
117
  return {
123
118
  // 元件本身
124
- $selector: t,
119
+ $selector: e,
125
120
  // 父層元件
126
- $backgroundWrap: t.querySelector("._backgroundWrap"),
127
- $contentWrap: t.querySelector("._contentWrap"),
128
- $wordCover: t.querySelector("._wordCover"),
129
- $buttonCover: t.querySelector("._buttonCover"),
130
- $imgCover: t.querySelector("._imgCover"),
131
- $cover: t.querySelectorAll("._cover"),
132
- $swiper: t.querySelector(".swiper"),
133
- $table: t.querySelector("._table"),
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: t.querySelector("._H"),
137
- $subH: t.querySelector("._subH"),
138
- $p: t.querySelector("._P"),
139
- $button: t.querySelector("._button"),
140
- $description: t.querySelectorAll("._description"),
141
- $video: t.querySelectorAll("[video-id]"),
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: t.getAttribute("typeFull-color"),
144
- typeFullBoxColor: t.getAttribute("typeFull-boxcolor"),
137
+ typeFullColor: e.getAttribute("typeFull-color"),
138
+ typeFullBoxColor: e.getAttribute("typeFull-boxcolor"),
145
139
  // 子層設定
146
- hColor: t.getAttribute("h-color"),
147
- subHColor: t.getAttribute("subh-color"),
148
- pColor: t.getAttribute("p-color"),
149
- buttonColor: t.getAttribute("button-color"),
150
- buttonColorHover: t.getAttribute("button-color-hover"),
151
- buttonTextColor: t.getAttribute("button-textcolor"),
152
- descriptionColor: t.getAttribute("description-color")
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
- }, T = new WeakSet(), K = function(t) {
155
- const { params: e } = t.article;
156
- 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;
157
- }, _ = new WeakSet(), Q = function(t) {
158
- const { params: e } = t.article, s = e.$table;
159
- let i = !1, a, o, d, m;
160
- s.addEventListener("mousedown", function(n) {
161
- n.preventDefault(), i = !0;
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 = nt(), a = this;
158
+ const i = te(), a = this;
204
159
  let o = {
205
160
  on: {
206
161
  init(n) {
207
- const c = n.$el[0];
208
- s.$video.length && ([...c.querySelectorAll("[video4-active]")].forEach((h) => {
209
- var v, l;
210
- (v = h.querySelector(dt.SETTINGS.videoButton)) == null || v.remove(), (l = h.querySelector(".overlay")) == null || l.remove(), h.removeAttribute("video4-active");
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 c = document.createElement("div");
224
- c.className = `swiper-button-prev swiper-${i}`, s.$swiperButtonCover.appendChild(c), o.navigation = {
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[e] = {
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 d = () => window.innerWidth > e && Number(s.$selector.getAttribute("swiper-num")) || 1;
243
- s.$swiper.querySelectorAll(".swiper-slide").length <= d() && (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"));
244
- const m = new mt(s.$swiper, o);
245
- return t.article.swiperList = [], t.article.swiperList.push(m), this;
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 F = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", U = "ontouchend" in document.documentElement ? "touchend" : "mouseup", N = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
256
- function w(r) {
257
- const t = window.getComputedStyle(r), e = t.transform || t.mozTransform;
258
- if (e === "none")
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 = e.includes("3d") ? "3d" : "2d", i = e.match(/matrix.*\((.+)\)/)[1].split(", ");
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 L(r) {
279
- const e = r.querySelector(".wrapper").querySelectorAll(".item");
225
+ function E(r) {
226
+ const t = r.querySelector(".wrapper").querySelectorAll(".item");
280
227
  let s = 0;
281
- return e.forEach((i) => {
282
- const a = getComputedStyle(i), o = parseInt(a.marginLeft), d = parseInt(a.marginRight);
283
- s += i.getBoundingClientRect().width + o + d;
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 D(r) {
287
- if (w(r.slideWrapEl).x >= r.translateMin)
233
+ function X(r) {
234
+ if (m(r.slideWrapEl).x >= r.translateMin)
288
235
  return "is-start";
289
- if (w(r.slideWrapEl).x <= r.translateMax)
236
+ if (m(r.slideWrapEl).x <= r.translateMax)
290
237
  return "is-end";
291
- if (w(r.slideWrapEl).x < r.translateMin && w(r.slideWrapEl).x > r.translateMax)
238
+ if (m(r.slideWrapEl).x < r.translateMin && m(r.slideWrapEl).x > r.translateMax)
292
239
  return "is-middle";
293
240
  }
294
- function wt(r) {
295
- const t = r.el, e = t.querySelector(".wrapper");
296
- e.addEventListener(F, function(s) {
297
- switch (r.isDown = !0, r.slidable && e.classList.add("dragging"), F) {
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 = w(e).x;
306
- }), e.addEventListener(U, function(s) {
307
- r.isDown = !1, e.classList.remove("dragging"), e.classList.remove("moving");
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 (U === "mouseup" && s.button !== 0)
265
+ if (H === "mouseup" && s.button !== 0)
319
266
  return;
320
- e.querySelectorAll(".item").forEach((o) => {
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(t);
325
- }), e.addEventListener("mouseleave", function() {
326
- r.isDown && r.slidable && (r.isDown = !1, e.classList.remove("dragging"), e.classList.remove("moving"), r.resetPos(t));
327
- }), e.addEventListener(N, function(s) {
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
- e.classList.add("moving");
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(e.style, a);
294
+ Object.assign(t.style, a);
348
295
  }
349
296
  }
350
297
  });
351
298
  }
352
- function vt(r) {
353
- const t = r.querySelectorAll("a");
354
- for (var e = 0, s = t.length; e < s; e++)
355
- t[e].draggable = !1;
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 Et {
358
- constructor(t, e) {
359
- this.el = typeof t == "string" ? document.querySelector(t) : t, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
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, 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(
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
- L(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
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 t = this;
371
- 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() {
372
- t.update();
373
- }), wt(t), vt(t.el);
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(t) {
376
- const e = this, s = e.slideWrapEl.querySelector(".item.active"), a = s.previousElementSibling ? s.offsetLeft - e.el.clientWidth / 2 + s.clientWidth / 2 : 0;
377
- if (e.slidable) {
378
- if (-a < 0 && -a > e.translateMax) {
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 ${t || 0}ms ease 0s`,
327
+ transition: `all ${e || 0}ms ease 0s`,
381
328
  transform: `translate3d(-${a}px,0,0)`
382
329
  };
383
- Object.assign(e.slideWrapEl.style, o);
330
+ Object.assign(t.slideWrapEl.style, o);
384
331
  } else if (-a >= 0) {
385
332
  const o = {
386
- transition: `all ${t || 0}ms ease 0s`,
333
+ transition: `all ${e || 0}ms ease 0s`,
387
334
  transform: "translate3d(0,0,0)"
388
335
  };
389
- Object.assign(e.slideWrapEl.style, o);
336
+ Object.assign(t.slideWrapEl.style, o);
390
337
  } else {
391
338
  const o = {
392
- transition: `all ${t || 0}ms ease 0s`,
393
- transform: `translate3d(${e.translateMax}px,0,0)`
339
+ transition: `all ${e || 0}ms ease 0s`,
340
+ transform: `translate3d(${t.translateMax}px,0,0)`
394
341
  };
395
- Object.assign(e.slideWrapEl.style, o);
342
+ Object.assign(t.slideWrapEl.style, o);
396
343
  }
397
- if (t)
398
- e.slideWrapEl.addEventListener(
344
+ if (e)
345
+ t.slideWrapEl.addEventListener(
399
346
  "transitionend",
400
347
  function() {
401
- switch (e.nowTranslateX = w(e.slideWrapEl).x, D(e)) {
348
+ switch (t.nowTranslateX = m(t.slideWrapEl).x, X(t)) {
402
349
  case "is-start":
403
- e.el.classList.add("is-start"), e.el.classList.remove("is-end");
350
+ t.el.classList.add("is-start"), t.el.classList.remove("is-end");
404
351
  break;
405
352
  case "is-middle":
406
- e.el.classList.remove("is-start"), e.el.classList.remove("is-end");
353
+ t.el.classList.remove("is-start"), t.el.classList.remove("is-end");
407
354
  break;
408
355
  case "is-end":
409
- e.el.classList.remove("is-start"), e.el.classList.add("is-end");
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 (e.nowTranslateX = w(e.slideWrapEl).x, D(e)) {
363
+ switch (t.nowTranslateX = m(t.slideWrapEl).x, X(t)) {
417
364
  case "is-start":
418
- e.el.classList.add("is-start"), e.el.classList.remove("is-end");
365
+ t.el.classList.add("is-start"), t.el.classList.remove("is-end");
419
366
  break;
420
367
  case "is-middle":
421
- e.el.classList.remove("is-start"), e.el.classList.remove("is-end");
368
+ t.el.classList.remove("is-start"), t.el.classList.remove("is-end");
422
369
  break;
423
370
  case "is-end":
424
- e.el.classList.remove("is-start"), e.el.classList.add("is-end");
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 t = this;
431
- switch (D(t)) {
377
+ const e = this;
378
+ switch (X(e)) {
432
379
  case "is-start":
433
- t.el.classList.add("is-start"), t.el.classList.remove("is-end"), Object.assign(t.slideWrapEl.style, {
434
- transition: `all ${t.params.speed}ms ease 0s`,
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
- t.el.classList.remove("is-start"), t.el.classList.remove("is-end");
386
+ e.el.classList.remove("is-start"), e.el.classList.remove("is-end");
440
387
  break;
441
388
  case "is-end":
442
- t.el.classList.remove("is-start"), t.el.classList.add("is-end"), Object.assign(t.slideWrapEl.style, {
443
- transition: `all ${t.params.speed}ms ease 0s`,
444
- transform: `translate3d(${t.translateMax}px,0,0)`
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 t = this;
451
- t.el.querySelector(".wrapper").removeAttribute("style"), t.slideTotalWidth = L(t.el), t.translateMax = -Math.floor(
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
- L(t.el) - t.el.querySelector(".wrapper").getBoundingClientRect().width
400
+ E(e.el) - e.el.querySelector(".wrapper").getBoundingClientRect().width
454
401
  )
455
- ), 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"));
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 V = (r) => {
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 I, et, X, st, R, rt;
471
- class Ct {
472
- constructor(t, e = {}) {
473
- g(this, I);
474
- g(this, X);
475
- g(this, R);
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: t,
478
- options: e
479
- }, p(this, I, et).call(this);
424
+ el: e,
425
+ options: t
426
+ }, l(this, T, Y).call(this);
480
427
  }
481
428
  }
482
- I = new WeakSet(), et = function() {
483
- const { el: t, options: e } = this.__storage__, { SETTINGS: s } = pt;
484
- !Y(t) || !z(t) || (this.elements = q(t), this.options = Object.assign({}, s, e), p(this, X, st).call(this));
485
- }, X = new WeakSet(), st = function() {
486
- const { elements: t, options: e } = this;
487
- t.forEach((s) => {
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 = e, i.share.eventHandler = p(this, R, rt), i.addEventListener("click", i.share.eventHandler);
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
- }, R = new WeakSet(), rt = function() {
493
- const { eventHandler: t, params: e } = this.share, s = this.getAttribute("share-target"), i = {
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") || e.success,
499
- text: this.getAttribute("copy-text") || e.text,
500
- className: this.getAttribute("copy-class") || e.className,
501
- duration: this.getAttribute("copy-duration") || e.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 d = o;
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 (z(".copied-wrapper"))
456
+ if (B(".copied-wrapper"))
510
457
  return;
511
- document.querySelector("body").insertAdjacentHTML(ut.append, `<div class='copied-wrapper'><div class='text'>${a.success ? a.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
512
- const m = document.querySelector(".copied-wrapper");
513
- a.className && m.classList.add(a.className), m.style.top = this.getBoundingClientRect().top + window.scrollY + "px", m.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", m.style.display = "block";
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 c = document.querySelector(".copied-wrapper"), u = document.querySelector(".copied-wrapper .text");
518
- u.style.display = "block", u.style.opacity = 0;
519
- const h = (l, y) => {
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 $ = 50, C = $ / y, B = setInterval(function() {
522
- b += C, l.style.opacity = b, b >= 1 && (clearInterval(B), setTimeout(function() {
523
- v(l, 300, function() {
524
- c.remove();
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
- }, v = (l, y, b) => {
529
- let $ = 1;
530
- const C = 50, B = C / y, it = setInterval(() => {
531
- $ -= B, l.style.opacity = $, $ <= 0 && (clearInterval(it), l.style.display = "none", b && b());
532
- }, C);
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
- h(u, 300);
481
+ v(A, 300);
535
482
  }
536
483
  return;
537
484
  }
538
- d = `${d}${i.source ? `?utm_source=${i.source}` : ""}${i.medium ? `&utm_medium${i.medium}` : ""}${i.campaign ? `&utm_campaign${i.campaign}` : ""}`, d = d.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), s == "line" ? window.open(`${V(s)}${o}`) : window.open(`${V(s)}${d}&quote=${d}`), this.removeEventListener("click", t), setTimeout(() => {
539
- this.addEventListener("click", t);
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}&quote=${c}`), this.removeEventListener("click", e), setTimeout(() => {
486
+ this.addEventListener("click", e);
540
487
  }, 100);
541
488
  };
542
489
  export {
543
- Wt as Anchor4,
544
- kt as Aost4,
545
- xt as Article4,
546
- Et as CategorySlider,
547
- Tt as Collapse4,
548
- _t as Configs,
549
- At as Detect4,
550
- Ot as Dropdown4,
551
- Mt as ImagePreview,
552
- It as ImageValidate,
553
- Xt as Marquee4,
554
- Rt as Modal4,
555
- Bt as Multipurpose4,
556
- Nt as Ripple4,
557
- Ct as Share4,
558
- Dt as Tab4,
559
- at as Video4
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