@xwadex/fesd 0.0.62 → 0.0.64

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 be = (s, e, t) => {
1
+ var ve = (s, e, t) => {
2
2
  if (!e.has(s))
3
3
  throw TypeError("Cannot " + t);
4
4
  };
5
- var m = (s, e, t) => {
5
+ var g = (s, e, t) => {
6
6
  if (e.has(s))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  e instanceof WeakSet ? e.add(s) : e.set(s, t);
9
9
  };
10
- var h = (s, e, t) => (be(s, e, "access private method"), t);
11
- import { i as te, a as V, g as T, v as we, c as ve, b as ye, d as $e, e as xe, f as Ae, s as ke } from "./image-preview-bundle.js";
12
- import { A as je, j as Pe, C as Fe, h as Ue, D as Ve, m as Ye, I as Ge, k as Je, M as Ke, l as Qe, R as Ze, T as et } from "./image-preview-bundle.js";
13
- import K from "jquery";
14
- import { m as x, S as Se, p as Le } from "./vendor-bundle.js";
15
- const L = () => {
10
+ var h = (s, e, t) => (ve(s, e, "access private method"), t);
11
+ import { i as se, a as G, g as q, v as ye, c as $e, b as xe, d as Ae, e as ke, f as Se, s as Le } from "./image-preview-bundle.js";
12
+ import { A as Fe, j as Ue, C as Ve, h as Ye, D as Ge, m as Je, I as Ke, k as Qe, M as Ze, l as et, R as tt, T as rt } from "./image-preview-bundle.js";
13
+ import Z from "jquery";
14
+ import { m as $, S as Ee, p as Ce } from "./vendor-bundle.js";
15
+ const E = () => {
16
16
  const s = navigator.userAgent, e = {
17
17
  // Firefox 1.0+
18
18
  isFirefox: typeof InstallTrigger < "u",
@@ -47,86 +47,86 @@ const L = () => {
47
47
  isLinux: s.indexOf("Linux") > -1
48
48
  };
49
49
  return { browser: e, mobile: t, os: r };
50
- }, Ee = () => {
51
- const { browser: s } = L();
50
+ }, Te = () => {
51
+ const { browser: s } = E();
52
52
  return Object.keys(s).find((e) => {
53
53
  if (s[e])
54
54
  return s[e];
55
55
  });
56
- }, Ce = () => {
57
- const { mobile: s } = L();
56
+ }, qe = () => {
57
+ const { mobile: s } = E();
58
58
  return Object.keys(s).some((e) => {
59
59
  if (s[e])
60
60
  return s[e];
61
61
  });
62
- }, Te = () => {
63
- const { os: s } = L();
62
+ }, We = () => {
63
+ const { os: s } = E();
64
64
  return Object.keys(s).find((e) => {
65
65
  if (s[e])
66
66
  return s[e];
67
67
  });
68
- }, qe = () => console.dir(L());
69
- function Ne() {
68
+ }, _e = () => console.dir(E());
69
+ function ze() {
70
70
  return {
71
- init: L,
72
- isBrowser4: Ee,
73
- isMobile4: Ce,
74
- isOs4: Te,
75
- logs: qe
71
+ init: E,
72
+ isBrowser4: Te,
73
+ isMobile4: qe,
74
+ isOs4: We,
75
+ logs: _e
76
76
  };
77
77
  }
78
78
  const b = (s, e, t) => {
79
- s && (ye(s) ? s.forEach((r) => r.style[e] = t) : s.style[e] = t);
79
+ s && (xe(s) ? s.forEach((r) => r.style[e] = t) : s.style[e] = t);
80
80
  };
81
- var q, re, W, se, A, Y, _, ie, O, oe, M, ae, R, ne, B, le, N, ce, z, de, I, ue, k, G, X, pe, S, J;
82
- class ze {
81
+ var W, ie, _, oe, k, J, O, ae, M, ne, R, le, B, ce, I, de, N, ue, z, pe, X, he, S, K, D, me, L, Q;
82
+ class Xe {
83
83
  constructor(e, t = {}) {
84
- m(this, q);
85
- m(this, W);
84
+ g(this, W);
85
+ g(this, _);
86
86
  // 取得元件上的設定值
87
- m(this, A);
87
+ g(this, k);
88
88
  // 設置設定值的 CSS 樣式
89
- m(this, _);
89
+ g(this, O);
90
90
  // 表格拖曳功能
91
- m(this, O);
91
+ g(this, M);
92
92
  // 設置表格凍結
93
- m(this, M);
94
- m(this, R);
95
- m(this, B);
96
- m(this, N);
93
+ g(this, R);
94
+ g(this, B);
95
+ g(this, I);
96
+ g(this, N);
97
97
  // Markdown 設置
98
- m(this, z);
98
+ g(this, z);
99
99
  // Navigation 設置
100
- m(this, I);
101
- m(this, k);
102
- m(this, X);
103
- m(this, S);
104
- !te(e) || !V(e) || (this.__storage__ = {
100
+ g(this, X);
101
+ g(this, S);
102
+ g(this, D);
103
+ g(this, L);
104
+ !se(e) || !G(e) || (this.__storage__ = {
105
105
  el: e,
106
106
  options: t
107
- }, this.active = "data-article-active", h(this, q, re).call(this));
107
+ }, this.active = "data-article-active", h(this, W, ie).call(this));
108
108
  }
109
109
  update() {
110
110
  const { elements: e } = this;
111
111
  e.forEach((t) => {
112
112
  t.querySelectorAll("._article").forEach((r) => {
113
- r.article = {}, r.article.parent = t, r.article.params = h(this, A, Y).call(this, r), h(this, k, G).call(this, r), h(this, S, J).call(this, r);
113
+ r.article = {}, r.article.parent = t, r.article.params = h(this, k, J).call(this, r), h(this, S, K).call(this, r), h(this, L, Q).call(this, r);
114
114
  });
115
115
  });
116
116
  }
117
117
  }
118
- q = new WeakSet(), re = function() {
119
- const { el: e, options: t } = this.__storage__, { SETTINGS: r } = $e;
120
- this.elements = t.state == "not active" ? T(e + `:not([${this.active}])`) : T(e), this.elements = T(e), this.options = Object.assign({}, r, t), h(this, W, se).call(this);
121
- }, W = new WeakSet(), se = function() {
118
+ W = new WeakSet(), ie = function() {
119
+ const { el: e, options: t } = this.__storage__, { SETTINGS: r } = Ae;
120
+ this.elements = t.state == "not active" ? q(e + `:not([${this.active}])`) : q(e), this.elements = q(e), this.options = Object.assign({}, r, t), h(this, _, oe).call(this);
121
+ }, _ = new WeakSet(), oe = function() {
122
122
  const { elements: e } = this;
123
123
  e.forEach((t) => {
124
124
  t.setAttribute(this.active, ""), t.querySelectorAll("._article").forEach((r) => {
125
125
  var o, l;
126
- r.article = {}, r.article.parent = t, r.article.params = h(this, A, Y).call(this, r), r.article.methods = {}, r.article.methods.update = this.update, h(l = h(o = h(this, _, ie).call(this, r), k, G).call(o, r), X, pe).call(l, r), h(this, S, J).call(this, r);
126
+ r.article = {}, r.article.parent = t, r.article.params = h(this, k, J).call(this, r), r.article.methods = {}, r.article.methods.update = this.update, h(l = h(o = h(this, O, ae).call(this, r), S, K).call(o, r), D, me).call(l, r), h(this, L, Q).call(this, r);
127
127
  });
128
128
  });
129
- }, A = new WeakSet(), Y = function(e) {
129
+ }, k = new WeakSet(), J = function(e) {
130
130
  return {
131
131
  // 元件本身
132
132
  $selector: e,
@@ -162,10 +162,10 @@ q = new WeakSet(), re = function() {
162
162
  quoteColor: e.getAttribute("quote-color"),
163
163
  markdown: e.getAttribute("data-table-markdown") ?? !1
164
164
  };
165
- }, _ = new WeakSet(), ie = function(e) {
165
+ }, O = new WeakSet(), ae = function(e) {
166
166
  const { params: t } = e.article;
167
167
  return b(t.$h, "color", t.hColor), b(t.$subH, "color", t.subHColor), b(t.$p, "color", t.pColor), b(t.$description, "color", t.descriptionColor), b(t.$button, "backgroundColor", t.buttonColor), b(t.$button, "color", t.buttonTextColor), t.buttonColorHover && t.$button && (t.$button.appendChild(document.createElement("span")), b(t.$button.querySelector("span"), "backgroundColor", t.buttonColorHover)), b(t.$backgroundWrap, "backgroundColor", t.typeFullColor), b(t.$contentWrap, "backgroundColor", t.typeFullBoxColor), b(t.$quote, "color", t.quoteColor), this;
168
- }, O = new WeakSet(), oe = function(e) {
168
+ }, M = new WeakSet(), ne = function(e) {
169
169
  const { params: t } = e.article, r = t.$table;
170
170
  let o = !1, l, n, u, p;
171
171
  r.addEventListener("mousedown", function(c) {
@@ -180,16 +180,16 @@ q = new WeakSet(), re = function() {
180
180
  if (!o)
181
181
  return;
182
182
  c.preventDefault();
183
- const i = r.getBoundingClientRect(), a = c.pageX - i.left, d = c.pageY - i.top, g = a - l, f = d - n;
184
- r.scrollLeft = u - g, r.scrollTop = p - f;
183
+ const i = r.getBoundingClientRect(), a = c.pageX - i.left, d = c.pageY - i.top, m = a - l, f = d - n;
184
+ r.scrollLeft = u - m, r.scrollTop = p - f;
185
185
  });
186
- }, M = new WeakSet(), ae = function(e, t, r) {
186
+ }, R = new WeakSet(), le = function(e, t, r) {
187
187
  const { basic_rwd: o } = this.options, l = window.innerWidth < o, n = [...e.querySelectorAll("tr")];
188
188
  if (l || !n.length)
189
189
  return;
190
- const u = h(this, R, ne).call(this, n);
191
- h(this, N, ce).call(this, e, u, t, r);
192
- }, R = new WeakSet(), ne = function(e) {
190
+ const u = h(this, B, ce).call(this, n);
191
+ h(this, N, ue).call(this, e, u, t, r);
192
+ }, B = new WeakSet(), ce = function(e) {
193
193
  const t = [], r = /* @__PURE__ */ new Set();
194
194
  return e.forEach((o, l) => {
195
195
  const n = [...o.children];
@@ -202,10 +202,10 @@ q = new WeakSet(), re = function() {
202
202
  for (let a = 0; a < c; a++) {
203
203
  const d = l + a;
204
204
  t[d] ?? (t[d] = []);
205
- for (let g = 0; g < i; g++) {
206
- const f = u + g;
205
+ for (let m = 0; m < i; m++) {
206
+ const f = u + m;
207
207
  t[d][f] = {
208
- el: a === 0 && g === 0 ? p : null,
208
+ el: a === 0 && m === 0 ? p : null,
209
209
  topRow: l,
210
210
  leftCol: u,
211
211
  rowspan: c,
@@ -216,7 +216,7 @@ q = new WeakSet(), re = function() {
216
216
  u += i;
217
217
  });
218
218
  }), t;
219
- }, B = new WeakSet(), le = function(e, t) {
219
+ }, I = new WeakSet(), de = function(e, t) {
220
220
  var n;
221
221
  const r = t.length, o = Array(r).fill(0), l = e.getBoundingClientRect().top;
222
222
  for (let u = 0; u < r; u++)
@@ -229,9 +229,9 @@ q = new WeakSet(), re = function() {
229
229
  }
230
230
  }
231
231
  return o;
232
- }, N = new WeakSet(), ce = function(e, t, r, o) {
232
+ }, N = new WeakSet(), ue = function(e, t, r, o) {
233
233
  var p;
234
- const l = h(this, B, le).call(this, e, t), n = ((p = t[0]) == null ? void 0 : p.length) ?? 0, u = Array(n).fill(0);
234
+ const l = h(this, I, de).call(this, e, t), n = ((p = t[0]) == null ? void 0 : p.length) ?? 0, u = Array(n).fill(0);
235
235
  for (let c = 0; c < n; c++)
236
236
  for (let i = 0; i < t.length; i++) {
237
237
  const a = t[i][c];
@@ -244,15 +244,15 @@ q = new WeakSet(), re = function() {
244
244
  (c) => c.forEach((i) => {
245
245
  if (!(i != null && i.el))
246
246
  return;
247
- const { el: a, topRow: d, leftCol: g } = i, f = d < r, v = g < o;
248
- a.style.position = "sticky", a.style.zIndex = f && v ? 3 : f ? 2 : v ? 1 : 0, a.style.backgroundColor = getComputedStyle(a).backgroundColor, f && (a.style.top = `${l[d]}px`), v && (a.style.left = `${u[g]}px`);
247
+ const { el: a, topRow: d, leftCol: m } = i, f = d < r, x = m < o;
248
+ a.style.position = "sticky", a.style.zIndex = f && x ? 3 : f ? 2 : x ? 1 : 0, a.style.backgroundColor = getComputedStyle(a).backgroundColor, f && (a.style.top = `${l[d]}px`), x && (a.style.left = `${u[m]}px`);
249
249
  })
250
250
  );
251
- }, z = new WeakSet(), de = function(e) {
251
+ }, z = new WeakSet(), pe = function(e) {
252
252
  const { markdownLink: t, markdownImg: r, markdownLinkBlank: o } = this.options;
253
253
  if (e.hasAttribute("data-markdown-rendered"))
254
254
  return;
255
- new x.Renderer(), x.use({
255
+ new $.Renderer(), $.use({
256
256
  extensions: [
257
257
  {
258
258
  name: "center",
@@ -272,7 +272,7 @@ q = new WeakSet(), re = function() {
272
272
  };
273
273
  },
274
274
  renderer(i) {
275
- return `<div data-center="true">${x.parser(i.tokens)}</div>`;
275
+ return `<div data-center="true">${$.parser(i.tokens)}</div>`;
276
276
  }
277
277
  },
278
278
  {
@@ -293,7 +293,7 @@ q = new WeakSet(), re = function() {
293
293
  };
294
294
  },
295
295
  renderer(i) {
296
- return `<div data-left="true">${x.parser(i.tokens)}</div>`;
296
+ return `<div data-left="true">${$.parser(i.tokens)}</div>`;
297
297
  }
298
298
  },
299
299
  {
@@ -314,7 +314,7 @@ q = new WeakSet(), re = function() {
314
314
  };
315
315
  },
316
316
  renderer(i) {
317
- return `<div data-right="true">${x.parser(i.tokens)}</div>`;
317
+ return `<div data-right="true">${$.parser(i.tokens)}</div>`;
318
318
  }
319
319
  },
320
320
  {
@@ -361,7 +361,7 @@ q = new WeakSet(), re = function() {
361
361
  }
362
362
  ]
363
363
  });
364
- const l = ["h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br", "span", "div", "sup", "sub"], n = ["data-center", "data-right", "data-left"], u = (i) => Le.sanitize(i, {
364
+ const l = ["h2", "h3", "h4", "h5", "h6", "b", "del", "i", "em", "strong", "p", "ul", "ol", "li", "br", "span", "div", "sup", "sub"], n = ["data-center", "data-right", "data-left"], u = (i) => Ce.sanitize(i, {
365
365
  ALLOWED_TAGS: [
366
366
  ...l,
367
367
  ...t ? ["a"] : [],
@@ -373,16 +373,16 @@ q = new WeakSet(), re = function() {
373
373
  ...r ? ["src", "alt", "title"] : []
374
374
  ],
375
375
  RETURN_TRUSTED_TYPE: !1
376
- }), p = (i) => u(x.parse(i));
376
+ }), p = (i) => u($.parse(i));
377
377
  e.querySelectorAll("td,th").forEach((i) => {
378
378
  i.innerHTML = i.textContent;
379
379
  const a = i.textContent.trim().replace(/<[^>]*>/g, "");
380
- i.innerHTML = p(a), o && K(i).find("a") && K(i).find("a").attr({
380
+ i.innerHTML = p(a), o && Z(i).find("a") && Z(i).find("a").attr({
381
381
  target: "_blank",
382
382
  rel: "noopener noreferrer"
383
383
  });
384
384
  }), e.setAttribute("data-markdown-rendered", "true");
385
- }, I = new WeakSet(), ue = function(e) {
385
+ }, X = new WeakSet(), he = function(e) {
386
386
  const { scrollStep: t } = this.options, r = e.querySelector("._contentWrap"), o = e.querySelector("._tableCover"), l = e.querySelector("._table"), n = typeof t == "number" ? t : r.clientWidth * 0.5;
387
387
  if (!r || !o || o.querySelector(".table_navigation"))
388
388
  return;
@@ -399,21 +399,21 @@ q = new WeakSet(), re = function() {
399
399
  }), c.addEventListener("click", () => {
400
400
  l.scrollBy({ left: n, behavior: "smooth" });
401
401
  }), l.addEventListener("scroll", i), window.addEventListener("resize", i), i();
402
- }, k = new WeakSet(), G = function(e) {
402
+ }, S = new WeakSet(), K = function(e) {
403
403
  const { params: t } = e.article;
404
- return t.$video.length && new we(t.$video, this.options.videoOptions), this;
405
- }, X = new WeakSet(), pe = function(e) {
404
+ return t.$video.length && new ye(t.$video, this.options.videoOptions), this;
405
+ }, D = new WeakSet(), me = function(e) {
406
406
  const { basic_rwd: t } = this.options, { params: r } = e.article;
407
407
  if (!r.$swiper)
408
408
  return;
409
- const o = ve(), l = this;
409
+ const o = $e(), l = this;
410
410
  let n = {
411
411
  on: {
412
412
  init(c) {
413
413
  const i = c.$el[0];
414
414
  r.$video.length && ([...i.querySelectorAll("[video4-active]")].forEach((d) => {
415
- var g, f;
416
- (g = d.querySelector(xe.SETTINGS.videoButton)) == null || g.remove(), (f = d.querySelector(".overlay")) == null || f.remove(), d.removeAttribute("video4-active");
415
+ var m, f;
416
+ (m = d.querySelector(ke.SETTINGS.videoButton)) == null || m.remove(), (f = d.querySelector(".overlay")) == null || f.remove(), d.removeAttribute("video4-active");
417
417
  }), l.update());
418
418
  },
419
419
  observerUpdate(c) {
@@ -447,18 +447,18 @@ q = new WeakSet(), re = function() {
447
447
  }), (r.$selector.getAttribute("swiper-loop") !== "off" || !r.$selector.getAttribute("swiper-loop")) && (n.loop = !0), r.$selector.getAttribute("swiper-speed") && (n.speed = parseInt(r.$selector.getAttribute("swiper-speed"))), r.$selector.getAttribute("swiper-parallax") !== "off" && !r.$selector.getAttribute("swiper-loop") && (n.parallax = !0), r.$selector.getAttribute("swiper-pagination-dynamic") === "on" && (n.pagination.dynamicBullets = !0, n.pagination ? n.pagination.dynamicBullets = !0 : console.warn("pagination undefined"));
448
448
  let u = () => window.innerWidth > t && Number(r.$selector.getAttribute("swiper-num")) || 1;
449
449
  r.$swiper.querySelectorAll(".swiper-slide").length <= u() && (n.navigation = !1, n.pagination = !1, n.autoplay = !1, n.loop = !1, r.$selector.querySelector(".swiper-button-cover").style.display = "none", r.$selector.querySelector(".swiper-pagination").style.display = "none", r.$swiper.classList.add("swiper-no-swiping"));
450
- const p = new Se(r.$swiper, n);
450
+ const p = new Ee(r.$swiper, n);
451
451
  return e.article.swiperList = [], e.article.swiperList.push(p), this;
452
- }, S = new WeakSet(), J = function(e) {
452
+ }, L = new WeakSet(), Q = function(e) {
453
453
  const { navigation: t } = this.options, { params: r } = e.article;
454
454
  if (!r.$table)
455
455
  return;
456
- const o = e.getAttribute("freeze-table") === "on", l = parseInt(e.getAttribute("freeze-table-row") ?? "0", 10), n = parseInt(e.getAttribute("freeze-table-col") ?? "0", 10), u = e.querySelector("table"), p = e.querySelector("._tipText"), c = e.offsetWidth, i = u.offsetWidth, a = c < i, d = r.markdown === "on", g = () => {
457
- o && h(this, M, ae).call(this, u, l, n), (o || a) && h(this, O, oe).call(this, e), d && h(this, z, de).call(this, u), t && a && h(this, I, ue).call(this, e), a ? (e.classList.add("overflow"), p.style.display = "flex") : (e.classList.remove("overflow"), p.style.display = "none");
456
+ const o = e.getAttribute("freeze-table") === "on", l = parseInt(e.getAttribute("freeze-table-row") ?? "0", 10), n = parseInt(e.getAttribute("freeze-table-col") ?? "0", 10), u = e.querySelector("table"), p = e.querySelector("._tipText"), c = e.offsetWidth, i = u.offsetWidth, a = c < i, d = r.markdown === "on", m = () => {
457
+ o && h(this, R, le).call(this, u, l, n), (o || a) && h(this, M, ne).call(this, e), d && h(this, z, pe).call(this, u), t && a && h(this, X, he).call(this, e), a ? (e.classList.add("overflow"), p.style.display = "flex") : (e.classList.remove("overflow"), p.style.display = "none");
458
458
  };
459
- return g(), window.addEventListener("resize", g), this;
459
+ return m(), window.addEventListener("resize", m), this;
460
460
  };
461
- let Q = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", Z = "ontouchend" in document.documentElement ? "touchend" : "mouseup", F = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
461
+ let ee = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", te = "ontouchend" in document.documentElement ? "touchend" : "mouseup", V = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
462
462
  function w(s) {
463
463
  const e = window.getComputedStyle(s), t = e.transform || e.mozTransform;
464
464
  if (t === "none")
@@ -481,7 +481,7 @@ function w(s) {
481
481
  z: Number(o[14])
482
482
  };
483
483
  }
484
- function C(s) {
484
+ function T(s) {
485
485
  const t = s.querySelector(".wrapper").querySelectorAll(".item");
486
486
  let r = 0;
487
487
  return t.forEach((o) => {
@@ -489,7 +489,7 @@ function C(s) {
489
489
  r += o.getBoundingClientRect().width + n + u;
490
490
  }), r;
491
491
  }
492
- function U(s) {
492
+ function Y(s) {
493
493
  if (w(s.slideWrapEl).x >= s.translateMin)
494
494
  return "is-start";
495
495
  if (w(s.slideWrapEl).x <= s.translateMax)
@@ -497,10 +497,10 @@ function U(s) {
497
497
  if (w(s.slideWrapEl).x < s.translateMin && w(s.slideWrapEl).x > s.translateMax)
498
498
  return "is-middle";
499
499
  }
500
- function We(s) {
500
+ function Oe(s) {
501
501
  const e = s.el, t = e.querySelector(".wrapper");
502
- t.addEventListener(Q, function(r) {
503
- switch (s.isDown = !0, s.slidable && t.classList.add("dragging"), Q) {
502
+ t.addEventListener(ee, function(r) {
503
+ switch (s.isDown = !0, s.slidable && t.classList.add("dragging"), ee) {
504
504
  case "mousedown":
505
505
  s.startX = r.pageX;
506
506
  break;
@@ -509,10 +509,10 @@ function We(s) {
509
509
  break;
510
510
  }
511
511
  s.nowTranslateX = w(t).x;
512
- }), t.addEventListener(Z, function(r) {
512
+ }), t.addEventListener(te, function(r) {
513
513
  s.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving");
514
514
  let o;
515
- switch (F) {
515
+ switch (V) {
516
516
  case "mousemove":
517
517
  o = r.pageX - s.startX;
518
518
  break;
@@ -521,7 +521,7 @@ function We(s) {
521
521
  break;
522
522
  }
523
523
  if (o === 0 && r.target.closest(".item")) {
524
- if (Z === "mouseup" && r.button !== 0)
524
+ if (te === "mouseup" && r.button !== 0)
525
525
  return;
526
526
  t.querySelectorAll(".item").forEach((n) => {
527
527
  n.classList.remove("active");
@@ -530,13 +530,13 @@ function We(s) {
530
530
  s.slidable && s.resetPos(e);
531
531
  }), t.addEventListener("mouseleave", function() {
532
532
  s.isDown && s.slidable && (s.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving"), s.resetPos(e));
533
- }), t.addEventListener(F, function(r) {
533
+ }), t.addEventListener(V, function(r) {
534
534
  if (s.draggable && s.slidable) {
535
535
  if (!s.isDown)
536
536
  return;
537
537
  r.preventDefault();
538
538
  let o;
539
- switch (F) {
539
+ switch (V) {
540
540
  case "mousemove":
541
541
  o = r.pageX - s.startX;
542
542
  break;
@@ -555,20 +555,20 @@ function We(s) {
555
555
  }
556
556
  });
557
557
  }
558
- function _e(s) {
558
+ function Me(s) {
559
559
  const e = s.querySelectorAll("a");
560
560
  for (var t = 0, r = e.length; t < r; t++)
561
561
  e[t].draggable = !1;
562
562
  }
563
- class Ie {
563
+ class De {
564
564
  constructor(e, t) {
565
565
  this.el = typeof e == "string" ? document.querySelector(e) : e, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
566
566
  speed: 300,
567
567
  clickSwitch: !0,
568
568
  breakpoint: !1
569
- }, Object.assign(this.params, t), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth = C(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
569
+ }, Object.assign(this.params, t), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth = T(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
570
570
  Math.abs(
571
- C(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
571
+ T(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
572
572
  )
573
573
  ), this.slidable = this.slideTotalWidth > Math.round(this.el.getBoundingClientRect().width) && (!this.params.breakpoint || window.innerWidth <= this.params.breakpoint), this.init();
574
574
  }
@@ -576,7 +576,7 @@ class Ie {
576
576
  const e = this;
577
577
  e.slidable && (e.slideWrapEl.style.width = `${e.slideTotalWidth}px`, e.el.classList.add("slidable"), e.slideWrapEl.querySelector(".item.active") && e.moveActive()), window.addEventListener("resize", function() {
578
578
  e.update();
579
- }), We(e), _e(e.el);
579
+ }), Oe(e), Me(e.el);
580
580
  }
581
581
  moveActive(e) {
582
582
  const t = this, r = t.slideWrapEl.querySelector(".item.active"), l = r.previousElementSibling ? r.offsetLeft - t.el.clientWidth / 2 + r.clientWidth / 2 : 0;
@@ -604,7 +604,7 @@ class Ie {
604
604
  t.slideWrapEl.addEventListener(
605
605
  "transitionend",
606
606
  function() {
607
- switch (t.nowTranslateX = w(t.slideWrapEl).x, U(t)) {
607
+ switch (t.nowTranslateX = w(t.slideWrapEl).x, Y(t)) {
608
608
  case "is-start":
609
609
  t.el.classList.add("is-start"), t.el.classList.remove("is-end");
610
610
  break;
@@ -619,7 +619,7 @@ class Ie {
619
619
  !1
620
620
  );
621
621
  else
622
- switch (t.nowTranslateX = w(t.slideWrapEl).x, U(t)) {
622
+ switch (t.nowTranslateX = w(t.slideWrapEl).x, Y(t)) {
623
623
  case "is-start":
624
624
  t.el.classList.add("is-start"), t.el.classList.remove("is-end");
625
625
  break;
@@ -634,7 +634,7 @@ class Ie {
634
634
  }
635
635
  resetPos() {
636
636
  const e = this;
637
- switch (U(e)) {
637
+ switch (Y(e)) {
638
638
  case "is-start":
639
639
  e.el.classList.add("is-start"), e.el.classList.remove("is-end"), Object.assign(e.slideWrapEl.style, {
640
640
  transition: `all ${e.params.speed}ms ease 0s`,
@@ -654,14 +654,14 @@ class Ie {
654
654
  }
655
655
  update() {
656
656
  const e = this;
657
- e.el.querySelector(".wrapper").removeAttribute("style"), e.slideTotalWidth = C(e.el), e.translateMax = -Math.floor(
657
+ e.el.querySelector(".wrapper").removeAttribute("style"), e.slideTotalWidth = T(e.el), e.translateMax = -Math.floor(
658
658
  Math.abs(
659
- C(e.el) - e.el.querySelector(".wrapper").getBoundingClientRect().width
659
+ T(e.el) - e.el.querySelector(".wrapper").getBoundingClientRect().width
660
660
  )
661
661
  ), e.slidable = e.slideTotalWidth > Math.round(e.el.getBoundingClientRect().width) && (!e.params.breakpoint || window.innerWidth <= e.params.breakpoint), e.slidable ? (e.slideWrapEl.style.width = `${e.slideTotalWidth}px`, e.el.classList.add("slidable"), e.slideWrapEl.querySelector(".item.active") && e.moveActive()) : (e.el.classList.remove("slidable"), e.el.classList.remove("is-start"), e.el.classList.remove("is-end"), e.slideWrapEl.removeAttribute("style"));
662
662
  }
663
663
  }
664
- const ee = (s) => {
664
+ const re = (s) => {
665
665
  if (s == "facebook")
666
666
  return "https://www.facebook.com/sharer/sharer.php?u=";
667
667
  if (s == "line")
@@ -675,29 +675,29 @@ const ee = (s) => {
675
675
  if (s == "weibo")
676
676
  return "https://service.weibo.com/share/share.php?url=";
677
677
  };
678
- var D, he, H, me, j, ge;
679
- class Xe {
678
+ var H, ge, P, fe, j, be;
679
+ class He {
680
680
  constructor(e, t = {}) {
681
- m(this, D);
682
- m(this, H);
683
- m(this, j);
681
+ g(this, H);
682
+ g(this, P);
683
+ g(this, j);
684
684
  this.__storage__ = {
685
685
  el: e,
686
686
  options: t
687
- }, h(this, D, he).call(this);
687
+ }, h(this, H, ge).call(this);
688
688
  }
689
689
  }
690
- D = new WeakSet(), he = function() {
691
- const { el: e, options: t } = this.__storage__, { SETTINGS: r } = ke;
692
- !te(e) || !V(e) || (this.elements = T(e), this.options = Object.assign({}, r, t), h(this, H, me).call(this));
693
- }, H = new WeakSet(), me = function() {
690
+ H = new WeakSet(), ge = function() {
691
+ const { el: e, options: t } = this.__storage__, { SETTINGS: r } = Le;
692
+ !se(e) || !G(e) || (this.elements = q(e), this.options = Object.assign({}, r, t), h(this, P, fe).call(this));
693
+ }, P = new WeakSet(), fe = function() {
694
694
  const { elements: e, options: t } = this;
695
695
  e.forEach((r) => {
696
696
  r.querySelectorAll("[share-target]").forEach((o) => {
697
- o.share = {}, o.share.instance = this, o.share.params = t, o.share.eventHandler = h(this, j, ge), o.addEventListener("click", o.share.eventHandler);
697
+ o.share = {}, o.share.instance = this, o.share.params = t, o.share.eventHandler = h(this, j, be), o.addEventListener("click", o.share.eventHandler);
698
698
  });
699
699
  });
700
- }, j = new WeakSet(), ge = function() {
700
+ }, j = new WeakSet(), be = function() {
701
701
  const { eventHandler: e, params: t } = this.share, r = this.getAttribute("share-target"), o = {
702
702
  source: this.getAttribute("utm-source"),
703
703
  medium: this.getAttribute("utm-medium"),
@@ -714,56 +714,60 @@ D = new WeakSet(), he = function() {
714
714
  return;
715
715
  }
716
716
  if (r == "url") {
717
- if (V(".copied-wrapper"))
717
+ if (G(".copied-wrapper"))
718
718
  return;
719
- document.querySelector("body").insertAdjacentHTML(Ae.append, `<div class='copied-wrapper'><div class='text'>${l.success ? l.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
720
- const p = document.querySelector(".copied-wrapper");
721
- l.className && p.classList.add(l.className), p.style.top = this.getBoundingClientRect().top + window.scrollY + "px", p.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", p.style.display = "block";
722
- const c = document.querySelector("#clipboard");
723
- if (c.value = l.text ?? window.location.href, c.setSelectionRange(0, 9999), c.select(), document.execCommand("copy")) {
719
+ document.querySelector("body").insertAdjacentHTML(Se.append, `<div class='copied-wrapper'><div class='text'>${l.success ? l.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
720
+ const i = document.querySelector(".copied-wrapper");
721
+ l.className && i.classList.add(l.className), i.style.top = this.getBoundingClientRect().top + window.scrollY + "px", i.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", i.style.display = "block";
722
+ const a = document.querySelector("#clipboard");
723
+ if (a.value = l.text ?? window.location.href, a.setSelectionRange(0, 9999), a.select(), document.execCommand("copy")) {
724
724
  document.execCommand("copy");
725
- const i = document.querySelector(".copied-wrapper"), a = document.querySelector(".copied-wrapper .text");
726
- a.style.display = "block", a.style.opacity = 0;
727
- const d = (f, v) => {
728
- let y = 0;
729
- const $ = 50, E = $ / v, P = setInterval(function() {
730
- y += E, f.style.opacity = y, y >= 1 && (clearInterval(P), setTimeout(function() {
731
- g(f, 300, function() {
732
- i.remove();
725
+ const d = document.querySelector(".copied-wrapper"), m = document.querySelector(".copied-wrapper .text");
726
+ m.style.display = "block", m.style.opacity = 0;
727
+ const f = (A, F) => {
728
+ let v = 0;
729
+ const y = 50, C = y / F, U = setInterval(function() {
730
+ v += C, A.style.opacity = v, v >= 1 && (clearInterval(U), setTimeout(function() {
731
+ x(A, 300, function() {
732
+ d.remove();
733
733
  });
734
734
  }, l.duration));
735
- }, $);
736
- }, g = (f, v, y) => {
737
- let $ = 1;
738
- const E = 50, P = E / v, fe = setInterval(() => {
739
- $ -= P, f.style.opacity = $, $ <= 0 && (clearInterval(fe), f.style.display = "none", y && y());
740
- }, E);
735
+ }, y);
736
+ }, x = (A, F, v) => {
737
+ let y = 1;
738
+ const C = 50, U = C / F, we = setInterval(() => {
739
+ y -= U, A.style.opacity = y, y <= 0 && (clearInterval(we), A.style.display = "none", v && v());
740
+ }, C);
741
741
  };
742
- d(a, 300);
742
+ f(m, 300);
743
743
  }
744
744
  return;
745
745
  }
746
- u = `${u}${o.source ? `?utm_source=${o.source}` : ""}${o.medium ? `&utm_medium${o.medium}` : ""}${o.campaign ? `&utm_campaign${o.campaign}` : ""}`, u = u.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), r == "line" ? window.open(`${ee(r)}${n}`) : window.open(`${ee(r)}${u}&quote=${u}`), this.removeEventListener("click", e), setTimeout(() => {
746
+ u = `${u}${o.source ? `?utm_source=${o.source}` : ""}${o.medium ? `&utm_medium${o.medium}` : ""}${o.campaign ? `&utm_campaign${o.campaign}` : ""}`, u = u.replace("?", "%3F").replace(new RegExp("&", "g"), "%26");
747
+ const p = /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1, c = (i) => {
748
+ p ? window.location.href = i : window.open(i);
749
+ };
750
+ r == "line" ? c(`${re(r)}${n}`) : c(`${re(r)}${u}`), this.removeEventListener("click", e), setTimeout(() => {
747
751
  this.addEventListener("click", e);
748
752
  }, 100);
749
753
  };
750
754
  export {
751
- je as Anchor4,
752
- Pe as Aost4,
753
- ze as Article4,
754
- Ie as CategorySlider,
755
- Fe as Collapse4,
756
- Ue as Configs,
757
- Ne as Detect4,
758
- Ve as Dropdown4,
759
- Ye as ImagePreview,
760
- Ge as ImageValidate,
761
- Je as Marquee4,
762
- Ke as Modal4,
763
- Qe as Multipurpose4,
764
- Ze as Ripple4,
765
- Xe as Share4,
766
- et as Tab4,
767
- we as Video4
755
+ Fe as Anchor4,
756
+ Ue as Aost4,
757
+ Xe as Article4,
758
+ De as CategorySlider,
759
+ Ve as Collapse4,
760
+ Ye as Configs,
761
+ ze as Detect4,
762
+ Ge as Dropdown4,
763
+ Je as ImagePreview,
764
+ Ke as ImageValidate,
765
+ Qe as Marquee4,
766
+ Ze as Modal4,
767
+ et as Multipurpose4,
768
+ tt as Ripple4,
769
+ He as Share4,
770
+ rt as Tab4,
771
+ ye as Video4
768
772
  };
769
773
  //# sourceMappingURL=fesd-bundle.js.map