@xwadex/fesd 0.0.25 → 0.0.27

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