@xwadex/fesd 0.0.52 → 0.0.54

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.
@@ -10,14 +10,14 @@ var h = (n, i, t) => {
10
10
  i instanceof WeakSet ? i.add(n) : i.set(n, t);
11
11
  };
12
12
  var d = (n, i, t) => (xs(n, i, "access private method"), t);
13
- import { OverlayScrollbars as je } from "overlayscrollbars";
13
+ import { OverlayScrollbars as ze } from "overlayscrollbars";
14
14
  import f from "jquery";
15
15
  import "./vendor-bundle.js";
16
16
  import "validator";
17
17
  import "flatpickr";
18
18
  import ti from "vanilla-lazyload";
19
19
  import { lock as $s, unlock as _s } from "tua-body-scroll-lock";
20
- const ze = {
20
+ const Se = {
21
21
  SETTINGS: {
22
22
  videoId: null,
23
23
  videoType: null,
@@ -56,6 +56,22 @@ const ze = {
56
56
  <div class="overlay"></div>
57
57
  `
58
58
  ],
59
+ COOKIEDISAGREELAYOUT: `
60
+ <div class="disagree-inner">
61
+ <div class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="7" height="25" viewBox="0 0 7 25"
62
+ fill="none">
63
+ <path
64
+ d="M0 0H6.96277L5.77128 16.1948H1.22872L0 0ZM0 22.0304C0 21.1556 0.322695 20.442 0.968085 19.8895C1.6383 19.337 2.48227 19.0608 3.5 19.0608C4.51773 19.0608 5.34929 19.337 5.99468 19.8895C6.66489 20.442 7 21.1556 7 22.0304C7 22.9052 6.66489 23.6188 5.99468 24.1713C5.34929 24.7238 4.51773 25 3.5 25C2.48227 25 1.6383 24.7238 0.968085 24.1713C0.322695 23.6188 0 22.9052 0 22.0304Z"
65
+ fill="white"></path>
66
+ </svg></div>
67
+ <div class="title ch">由於未授權 Cookie 使用,影片無法播放</div>
68
+ <div class="title en">The video can’t be played due to unauthorized use of cookies.</div>
69
+ <div class="text">
70
+ <div class="box"><span>您可前往 </span><span data-cookie data-cookie-open="advance">Cookie 偏好設定</span><span> 進行修改</span></div>
71
+ <div class="box"><span>Modify your </span><span data-cookie data-cookie-open="advance">cookie preferences.</span></div>
72
+ </div>
73
+ </div>
74
+ `,
59
75
  // videoPlayer customElements 內結構
60
76
  TEMPLATE() {
61
77
  return '<div class="player-container"><div class="player-wrapper"></div></div>';
@@ -98,7 +114,7 @@ const ze = {
98
114
  </div>
99
115
  `;
100
116
  }
101
- }, M = {
117
+ }, I = {
102
118
  SETTINGS: {
103
119
  direction: "left",
104
120
  // 方向 - top || right || bottom || left
@@ -312,19 +328,19 @@ const ze = {
312
328
  article4: Hs,
313
329
  collapse4: si,
314
330
  dropdown4: Be,
315
- marquee4: M,
331
+ marquee4: I,
316
332
  modal4: P,
317
333
  multipurpose4: q,
318
334
  ripple4: ni,
319
335
  share4: Cs,
320
336
  tab4: ii,
321
- video4: ze
337
+ video4: Se
322
338
  }, Symbol.toStringTag, { value: "Module" })), S = {
323
339
  before: "beforebegin",
324
340
  after: "afterend",
325
341
  append: "beforeend",
326
342
  prepend: "afterbegin"
327
- }, dt = (n) => typeof n == "string" && n !== "", Se = (n) => n instanceof HTMLElement, ut = (n) => n instanceof NodeList, E = (n) => k(n) !== null, G = (n) => typeof n == "function", k = (n) => Se(n) ? n : document.querySelector(n), x = (n) => ut(n) ? n : document.querySelectorAll(n), Ms = () => Math.random().toString(36).substr(2, 9), Is = (n) => {
343
+ }, dt = (n) => typeof n == "string" && n !== "", De = (n) => n instanceof HTMLElement, ut = (n) => n instanceof NodeList, E = (n) => k(n) !== null, G = (n) => typeof n == "function", k = (n) => De(n) ? n : document.querySelector(n), x = (n) => ut(n) ? n : document.querySelectorAll(n), Is = () => Math.random().toString(36).substr(2, 9), Ms = (n) => {
328
344
  const i = document.createElement("div");
329
345
  return i.innerHTML = n, i.childNodes;
330
346
  }, qs = (n) => {
@@ -336,7 +352,7 @@ const ze = {
336
352
  return JSON.parse(n);
337
353
  }, L = (n, i) => {
338
354
  console.warn(`[${n} warn]: ${i}`);
339
- }, Fe = (n, i) => {
355
+ }, Ye = (n, i) => {
340
356
  console.error(`[${n} error]: ${i}`);
341
357
  }, j = {
342
358
  on(n, i) {
@@ -379,7 +395,7 @@ const ze = {
379
395
  easeOutQuart(n, i, t, e) {
380
396
  return -t * ((n = n / e - 1) * n * n * n - 1) + i;
381
397
  }
382
- }, De = (n, i) => {
398
+ }, ke = (n, i) => {
383
399
  const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", p = c ? "left" : "top", g = c ? "width" : "height", m = E(e) ? k(e) : document.scrollingElement, v = m[u], w = E(t) ? k(t).getBoundingClientRect()[p] : 0 - v, b = E(s) ? k(s).getBoundingClientRect()[g] : 0, T = w - a - b, C = 15;
384
400
  let y = 0;
385
401
  if (T === 0)
@@ -396,16 +412,16 @@ const ze = {
396
412
  };
397
413
  requestAnimationFrame(U);
398
414
  };
399
- var K, ke, bt, ai, yt, ri;
415
+ var V, xe, bt, ai, yt, ri;
400
416
  class oi {
401
417
  constructor(i, t = {}) {
402
- h(this, K);
418
+ h(this, V);
403
419
  h(this, bt);
404
420
  h(this, yt);
405
421
  this.__storage__ = {
406
422
  el: i,
407
423
  options: t
408
- }, this.active = "data-anchor-active", d(this, K, ke).call(this);
424
+ }, this.active = "data-anchor-active", d(this, V, xe).call(this);
409
425
  }
410
426
  destroy() {
411
427
  const { elements: i } = this;
@@ -415,12 +431,12 @@ class oi {
415
431
  }
416
432
  update() {
417
433
  var i;
418
- return d(i = this.destroy(), K, ke).call(i), this.emit("afterUpdate"), this;
434
+ return d(i = this.destroy(), V, xe).call(i), this.emit("afterUpdate"), this;
419
435
  }
420
436
  static run(i) {
421
437
  const { SETTINGS: t } = mt, e = Object.assign({}, t, i);
422
438
  setTimeout(() => {
423
- De(e);
439
+ ke(e);
424
440
  }, e.delay);
425
441
  }
426
442
  static url(i) {
@@ -429,11 +445,11 @@ class oi {
429
445
  return;
430
446
  const r = Object.assign({}, t, i, { target: a });
431
447
  setTimeout(() => {
432
- De(r);
448
+ ke(r);
433
449
  }, r.delay);
434
450
  }
435
451
  }
436
- K = new WeakSet(), ke = function() {
452
+ V = new WeakSet(), xe = function() {
437
453
  const { el: i, options: t } = this.__storage__;
438
454
  if (!dt(i) || !E(i))
439
455
  return;
@@ -461,7 +477,7 @@ K = new WeakSet(), ke = function() {
461
477
  this.removeEventListener("click", t), setTimeout(() => {
462
478
  this.addEventListener("click", t);
463
479
  }, s.speed), setTimeout(() => {
464
- De(s, e);
480
+ ke(s, e);
465
481
  }, s.delay);
466
482
  };
467
483
  Object.assign(oi.prototype, j);
@@ -511,13 +527,13 @@ class li extends HTMLElement {
511
527
  wt = new WeakSet(), ci = function() {
512
528
  const { ATTRS: t } = P;
513
529
  this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
514
- const e = this.getAttribute(t.id) || Ms();
530
+ const e = this.getAttribute(t.id) || Is();
515
531
  this.getAttribute(t.id) || (L(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), O[e] && L(`the ${t.id} "${e}" is already be used.`), O[e] = this, d(this, Tt, di).call(this);
516
532
  }, Tt = new WeakSet(), di = function() {
517
533
  this.childDom = this.childNodes, this.template = Ns(this), this.innerHTML = "", this.append(this.template), d(this, Et, ui).call(this);
518
534
  }, Et = new WeakSet(), ui = function() {
519
535
  const t = this.querySelector(".modal-scroller");
520
- this.__scroller__ = je(t, {
536
+ this.__scroller__ = ze(t, {
521
537
  overflowBehavior: {
522
538
  x: "hidden"
523
539
  },
@@ -577,8 +593,8 @@ const { MODALS: We } = window, ht = {}, mi = (n, i, ...t) => {
577
593
  const e = n[i];
578
594
  e && G(e) && e.apply(n, t);
579
595
  }, gi = (n, ...i) => {
580
- n && G(n) && n.apply(V, i);
581
- }, Ye = (n, i) => {
596
+ n && G(n) && n.apply(K, i);
597
+ }, Fe = (n, i) => {
582
598
  const { target: t } = n, e = We[t] || k(n.target);
583
599
  e && fi(n, i), e || Ps(n, i);
584
600
  }, fi = (n, i) => {
@@ -610,7 +626,7 @@ const { MODALS: We } = window, ht = {}, mi = (n, i, ...t) => {
610
626
  i && (i.emit(l, ...c), mi(i, o[l], ...c)), i || gi(o[l], ...c);
611
627
  };
612
628
  ht[t] || (ht[t] = !0, fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
613
- const c = Is(l), u = k(s) || k(P.SETTINGS.container);
629
+ const c = Ms(l), u = k(s) || k(P.SETTINGS.container);
614
630
  [...c].forEach((g) => {
615
631
  u.append(g);
616
632
  });
@@ -620,7 +636,7 @@ const { MODALS: We } = window, ht = {}, mi = (n, i, ...t) => {
620
636
  r("error", l), delete ht[t];
621
637
  }));
622
638
  };
623
- var tt, xe, St, vi, Dt, bi;
639
+ var tt, $e, St, vi, Dt, bi;
624
640
  const B = class B {
625
641
  constructor(i, t = {}) {
626
642
  h(this, tt);
@@ -629,7 +645,7 @@ const B = class B {
629
645
  this.__storage__ = {
630
646
  el: i,
631
647
  options: t
632
- }, this.active = "data-modal-active", d(this, tt, xe).call(this);
648
+ }, this.active = "data-modal-active", d(this, tt, $e).call(this);
633
649
  }
634
650
  destroy() {
635
651
  const { elements: i } = this;
@@ -639,12 +655,12 @@ const B = class B {
639
655
  }
640
656
  update() {
641
657
  var i;
642
- return d(i = this.destroy(), tt, xe).call(i), this.emit("update"), this;
658
+ return d(i = this.destroy(), tt, $e).call(i), this.emit("update"), this;
643
659
  }
644
660
  /** static method 'open' */
645
661
  static open(i) {
646
662
  const { SETTINGS: t } = P, e = Object.assign({}, t, { on: {} }, i);
647
- Ye(e);
663
+ Fe(e);
648
664
  }
649
665
  /** static method 'defineMethods' */
650
666
  static defineMethods(i) {
@@ -655,7 +671,7 @@ const B = class B {
655
671
  Object.assign(B.prototype, B.prototype.__methods__);
656
672
  }
657
673
  };
658
- tt = new WeakSet(), xe = function() {
674
+ tt = new WeakSet(), $e = function() {
659
675
  const { el: i, options: t } = this.__storage__;
660
676
  if (!dt(i) || !E(i))
661
677
  return;
@@ -682,10 +698,10 @@ tt = new WeakSet(), xe = function() {
682
698
  };
683
699
  this.removeEventListener("click", e), setTimeout(() => {
684
700
  this.addEventListener("click", e);
685
- }, 200), Ye(a, s);
701
+ }, 200), Fe(a, s);
686
702
  };
687
- let V = B;
688
- Object.assign(V.prototype, j);
703
+ let K = B;
704
+ Object.assign(K.prototype, j);
689
705
  customElements.define("modern-modal", li);
690
706
  const js = (n, i) => {
691
707
  const t = n === window ? n.innerHeight : n.getBoundingClientRect().height, e = n === window ? 0 : n.getBoundingClientRect().top;
@@ -703,7 +719,7 @@ const js = (n, i) => {
703
719
  }
704
720
  });
705
721
  }, zs = (n, i) => n === "up" || n === "down" ? n : n !== null ? n === "true" ? !0 : n === "false" ? !1 : i.repeat : i.repeat;
706
- var et, $e, kt, wi;
722
+ var et, _e, kt, wi;
707
723
  class yi {
708
724
  constructor(i, t = {}) {
709
725
  h(this, et);
@@ -711,7 +727,7 @@ class yi {
711
727
  this.__storage__ = {
712
728
  el: i,
713
729
  options: t
714
- }, this.active = "data-aost-active", d(this, et, $e).call(this);
730
+ }, this.active = "data-aost-active", d(this, et, _e).call(this);
715
731
  }
716
732
  destroy(i) {
717
733
  const { elements: t, options: e } = this;
@@ -727,10 +743,10 @@ class yi {
727
743
  }
728
744
  update(i) {
729
745
  var t;
730
- d(t = this.destroy(i), et, $e).call(t);
746
+ d(t = this.destroy(i), et, _e).call(t);
731
747
  }
732
748
  }
733
- et = new WeakSet(), $e = function() {
749
+ et = new WeakSet(), _e = function() {
734
750
  const { el: i, options: t } = this.__storage__;
735
751
  if (!dt(i) || !E(i))
736
752
  return;
@@ -751,14 +767,14 @@ et = new WeakSet(), $e = function() {
751
767
  };
752
768
  Object.assign(yi.prototype, j);
753
769
  const Bs = (n) => {
754
- const { TEMPLATE: i } = ze, { childDom: t } = n, e = document.createElement("div");
770
+ const { TEMPLATE: i } = Se, { childDom: t } = n, e = document.createElement("div");
755
771
  e.innerHTML = i();
756
772
  const s = e.querySelector(".player-wrapper");
757
773
  return [...t].forEach((o) => {
758
774
  s.append(o);
759
775
  }), e.children[0];
760
776
  };
761
- var xt, Ti, $t, Ei, _t, Ai, Ct, Li, Ht, Si, Mt, Di, It, ki, qt, xi, Ot, $i, Nt, _i;
777
+ var xt, Ti, $t, Ei, _t, Ai, Ct, Li, Ht, Si, It, Di, Mt, ki, qt, xi, Ot, $i, Nt, _i;
762
778
  class Ws extends HTMLElement {
763
779
  constructor() {
764
780
  super();
@@ -770,8 +786,8 @@ class Ws extends HTMLElement {
770
786
  // vimeo iframe
771
787
  h(this, Ht);
772
788
  // youku iframe
773
- h(this, Mt);
774
789
  h(this, It);
790
+ h(this, Mt);
775
791
  // 2025.02.11 新增 ig
776
792
  h(this, qt);
777
793
  // 2025.02.11 新增 tiktok
@@ -824,67 +840,51 @@ xt = new WeakSet(), Ti = function() {
824
840
  }, $t = new WeakSet(), Ei = function() {
825
841
  this.childDom = this.childNodes, this.template = Bs(this), this.innerHTML = "", this.append(this.template), d(this, _t, Ai).call(this);
826
842
  }, _t = new WeakSet(), Ai = function() {
827
- const { videoType: t, videoMode: e } = this;
828
- let s = "";
829
- function o(a) {
830
- f(a).addClass("cookie-disagree"), f(".cookie-disagree").append(
831
- `
832
- <div class="disagree-inner">
833
- <div class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="7" height="25" viewBox="0 0 7 25"
834
- fill="none">
835
- <path
836
- d="M0 0H6.96277L5.77128 16.1948H1.22872L0 0ZM0 22.0304C0 21.1556 0.322695 20.442 0.968085 19.8895C1.6383 19.337 2.48227 19.0608 3.5 19.0608C4.51773 19.0608 5.34929 19.337 5.99468 19.8895C6.66489 20.442 7 21.1556 7 22.0304C7 22.9052 6.66489 23.6188 5.99468 24.1713C5.34929 24.7238 4.51773 25 3.5 25C2.48227 25 1.6383 24.7238 0.968085 24.1713C0.322695 23.6188 0 22.9052 0 22.0304Z"
837
- fill="white"></path>
838
- </svg></div>
839
- <div class="title ch">由於未授權 Cookie 使用,影片無法播放</div>
840
- <div class="title en">The video can’t be played due to unauthorized use of cookies.</div>
841
- <div class="text">
842
- <div class="box"><span>您可前往 </span><span data-cookie-open>Cookie 偏好設定</span><span> 進行修改</span></div>
843
- <div class="box"><span>Modify your </span><span data-cookie-open>cookie preferences.</span></div>
844
- </div>
845
- </div>`
846
- );
843
+ const { videoType: t, videoMode: e } = this, { COOKIEDISAGREELAYOUT: s } = Se;
844
+ let o = "";
845
+ function a(r) {
846
+ f(r).addClass("cookie-disagree"), f(".cookie-disagree").append(s);
847
847
  }
848
848
  switch (t) {
849
849
  case "youtubeAPI":
850
850
  break;
851
851
  case "youtube":
852
- document.body.wd_youtube == !1 ? o("video-player") : s = d(this, Ct, Li).call(this);
852
+ document.body.wd_youtube == !1 ? a("video-player") : o = d(this, Ct, Li).call(this);
853
853
  break;
854
854
  case "youkuAPI":
855
855
  break;
856
856
  case "youku":
857
- document.body.wd_youku == !1 ? o("video-player") : s = d(this, Mt, Di).call(this);
857
+ document.body.wd_youku == !1 ? a("video-player") : o = d(this, It, Di).call(this);
858
858
  break;
859
859
  case "vimeo":
860
- document.body.wd_vimeo == !1 ? o("video-player") : s = d(this, Ht, Si).call(this);
860
+ document.body.wd_vimeo == !1 ? a("video-player") : o = d(this, Ht, Si).call(this);
861
861
  break;
862
862
  case "bilibili":
863
- document.body.wd_bilibili == !1 ? o("video-player") : s = d(this, It, ki).call(this);
863
+ document.body.wd_bilibili == !1 ? a("video-player") : o = d(this, Mt, ki).call(this);
864
864
  break;
865
865
  case "instagram":
866
- document.body.wd_instagram == !1 ? o(".instagram-media") : s = d(this, qt, xi).call(this);
866
+ document.body.wd_instagram == !1 ? a(".instagram-media") : o = d(this, qt, xi).call(this);
867
867
  break;
868
868
  case "tiktok":
869
- document.body.wd_tiktok == !1 ? o("video-player") : s = d(this, Ot, $i).call(this);
869
+ document.body.wd_tiktok == !1 ? a("video-player") : o = d(this, Ot, $i).call(this);
870
870
  break;
871
871
  case "videojs":
872
872
  break;
873
873
  case "video":
874
- s = d(this, Nt, _i).call(this);
874
+ o = d(this, Nt, _i).call(this);
875
875
  break;
876
876
  }
877
- this.querySelector(".player-wrapper").insertAdjacentHTML(S.prepend, s);
877
+ this.querySelector(".player-wrapper").insertAdjacentHTML(S.prepend, o);
878
878
  }, Ct = new WeakSet(), Li = function() {
879
879
  const { videoId: t, autoplay: e, startTime: s } = this;
880
880
  return `<iframe src="https://www.youtube.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}&start=${s}&mute=1&loop=1&enablejsapi=1" frameborder="0" allowfullscreen="0" volumn="0" allow="${e === "on" ? "autoplay;" : ""} encrypted-media; gyroscope; picture-in-picture;"></iframe>`;
881
881
  }, Ht = new WeakSet(), Si = function() {
882
882
  const { videoId: t, autoplay: e, hash: s } = this;
883
883
  return `<iframe src="https://player.vimeo.com/video/${t}?h=${s}&${e === "on" ? "autoplay=1" : ""}&loop=1&color=ffffff&title=0&byline=0&portrait=0" frameborder="0" allow="${e === "on" ? "autoplay;" : ""} fullscreen; picture-in-picture" allowfullscreen></iframe><script src="https://player.vimeo.com/api/player.js"><\/script>`;
884
- }, Mt = new WeakSet(), Di = function() {
884
+ }, It = new WeakSet(), Di = function() {
885
885
  const { videoId: t, autoplay: e } = this;
886
886
  return `<iframe src="https://player.youku.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}" frameborder=0 "allowfullscreen"></iframe>`;
887
- }, It = new WeakSet(), ki = function() {
887
+ }, Mt = new WeakSet(), ki = function() {
888
888
  const { videoId: t, autoplay: e } = this;
889
889
  return `<iframe src="//player.bilibili.com/player.html?bvid=${t}&page=1&as_wide=1&high_quality=1&danmaku=0" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>`;
890
890
  }, qt = new WeakSet(), xi = function() {
@@ -908,7 +908,7 @@ function Hi(n) {
908
908
  const i = Ci(n);
909
909
  Z += 1, Z === 1 && (document.documentElement.classList.add("scrollLock"), $s(i));
910
910
  }
911
- function Mi(n) {
911
+ function Ii(n) {
912
912
  if (Z = Math.max(0, Z - 1), Z === 0) {
913
913
  const i = Ci(n);
914
914
  _s(i), document.documentElement.classList.remove("scrollLock");
@@ -933,7 +933,7 @@ async function kn(n = 0) {
933
933
  }
934
934
  function xn() {
935
935
  f(".loading-wrapper").fadeOut(300).promise().done(function() {
936
- f(".loading-wrapper").remove(), Mi();
936
+ f(".loading-wrapper").remove(), Ii();
937
937
  });
938
938
  }
939
939
  function $n(n, i) {
@@ -951,7 +951,7 @@ function _n(n, i = () => {
951
951
  }).siblings("[data-tab-content]").hide(), Gs();
952
952
  }
953
953
  function Cn() {
954
- je(
954
+ ze(
955
955
  {
956
956
  target: document.body,
957
957
  cancel: {
@@ -980,13 +980,13 @@ function Hn() {
980
980
  n.persisted && window.location.reload();
981
981
  };
982
982
  }
983
- function Mn() {
983
+ function In() {
984
984
  const n = navigator.userAgent;
985
985
  return {
986
986
  BigSurUP: /Mac OS X 10.15/.test(n) || /Mac OS X 10_15_7/.test(n) || /Mac OS X 10_15_8/.test(n) || /Mac OS X 10_15_9/.test(n) || /Mac OS X 11_/.test(n) || /Mac OS X 12_/.test(n)
987
987
  };
988
988
  }
989
- function In(n, i) {
989
+ function Mn(n, i) {
990
990
  f(n).on("click", function() {
991
991
  f(this).toggleClass(i);
992
992
  });
@@ -1080,7 +1080,7 @@ function Xn(n) {
1080
1080
  });
1081
1081
  });
1082
1082
  }
1083
- function Fn(n) {
1083
+ function Yn(n) {
1084
1084
  const i = n.el, t = f(i).find(".swiper-slide-active"), e = f(t).find("video").get(0), s = f(i).find(".swiper-slide video");
1085
1085
  n.autoplay.stop(), f(e).off("ended"), e ? (s.each((o, a) => {
1086
1086
  a.currentTime = 0;
@@ -1088,7 +1088,7 @@ function Fn(n) {
1088
1088
  n.slideNext();
1089
1089
  }), e.play()) : n.params.autoplay.enabled && n.autoplay.start();
1090
1090
  }
1091
- function Yn() {
1091
+ function Fn() {
1092
1092
  f(".number-grow").each(function(n, i) {
1093
1093
  const t = f(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
1094
1094
  let r = "";
@@ -1131,7 +1131,7 @@ function Qn(n) {
1131
1131
  return i.innerHTML = n, i.childNodes[0];
1132
1132
  }
1133
1133
  const Ue = (n) => n.videoId !== "" || typeof n.videoId < "u", Xs = (n) => n.$selector.getAttribute("video4-active") === "on", pt = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-startTime="${n.videoStartTime}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1134
- var it, Ce, Pt, Ii, jt, qi, st, He, zt, Oi;
1134
+ var it, He, Pt, Mi, jt, qi, st, Ie, zt, Oi;
1135
1135
  const X = class X {
1136
1136
  //*-* 給Article4用的 **//
1137
1137
  constructor(i, t = {}) {
@@ -1140,21 +1140,21 @@ const X = class X {
1140
1140
  h(this, jt);
1141
1141
  h(this, st);
1142
1142
  h(this, zt);
1143
- if (!dt(i) && !Se(i) && !ut(i)) {
1144
- Fe("video4", `找不到該物件 -> ${i}`);
1143
+ if (!dt(i) && !De(i) && !ut(i)) {
1144
+ Ye("video4", `找不到該物件 -> ${i}`);
1145
1145
  return;
1146
1146
  }
1147
1147
  this.__storage__ = {
1148
1148
  el: i,
1149
1149
  options: t
1150
- }, this.active = "data-video-active", d(this, it, Ce).call(this);
1150
+ }, this.active = "data-video-active", d(this, it, He).call(this);
1151
1151
  }
1152
1152
  update() {
1153
- d(this, it, Ce).call(this);
1153
+ d(this, it, He).call(this);
1154
1154
  }
1155
1155
  };
1156
- it = new WeakSet(), Ce = function() {
1157
- const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s, LAYOUT: o } = ze;
1156
+ it = new WeakSet(), He = function() {
1157
+ const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s, LAYOUT: o } = Se;
1158
1158
  if (t.isGlobal && (X.globalOptions = t), this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.options = Object.assign(
1159
1159
  {},
1160
1160
  { LAYOUT: o },
@@ -1168,11 +1168,11 @@ it = new WeakSet(), Ce = function() {
1168
1168
  ), this.__events__ = Object.assign({}, s), this.options.on)
1169
1169
  for (const [a, r] of Object.entries(this.options.on))
1170
1170
  this.__events__[a] = [r];
1171
- d(this, Pt, Ii).call(this);
1172
- }, Pt = new WeakSet(), Ii = function() {
1171
+ d(this, Pt, Mi).call(this);
1172
+ }, Pt = new WeakSet(), Mi = function() {
1173
1173
  const { elements: i, options: t } = this;
1174
1174
  i.forEach((e) => {
1175
- e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, zt, Oi).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), Ue(e.video.params) && !Xs(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, jt, qi).call(this, e)), Ue(e.video.params) || Fe("video4", "無法取得影片 ID");
1175
+ e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, zt, Oi).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), Ue(e.video.params) && !Xs(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, jt, qi).call(this, e)), Ue(e.video.params) || Ye("video4", "無法取得影片 ID");
1176
1176
  }), this.emit("init");
1177
1177
  }, jt = new WeakSet(), qi = function(i) {
1178
1178
  const { LAYOUT: t } = this.options, e = i.video.params, { $selector: s, videoLayoutNo: o, videoId: a, videoType: r, videoMode: l, videoButton: c, videoCover: u, videoHighQualityPic: p } = e;
@@ -1201,7 +1201,7 @@ it = new WeakSet(), Ce = function() {
1201
1201
  console.log("error");
1202
1202
  }) : L("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1203
1203
  }
1204
- c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || L("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, st, He), g.addEventListener("click", g.video.eventHandler);
1204
+ c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || L("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, st, Ie), g.addEventListener("click", g.video.eventHandler);
1205
1205
  } else if (l === "onPage") {
1206
1206
  let g = null;
1207
1207
  if (u == "on") {
@@ -1219,9 +1219,9 @@ it = new WeakSet(), Ce = function() {
1219
1219
  s.innerHTML = pt(e);
1220
1220
  return;
1221
1221
  }
1222
- g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, st, He), g.addEventListener("click", g.video.eventHandler);
1222
+ g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, st, Ie), g.addEventListener("click", g.video.eventHandler);
1223
1223
  }
1224
- }, st = new WeakSet(), He = function(i) {
1224
+ }, st = new WeakSet(), Ie = function(i) {
1225
1225
  const { video: t, emit: e } = this, {
1226
1226
  $selector: s,
1227
1227
  videoMode: o,
@@ -1305,13 +1305,13 @@ it = new WeakSet(), Ce = function() {
1305
1305
  },
1306
1306
  close(y) {
1307
1307
  const D = y.querySelectorAll("[data-overlayscrollbars-viewport]");
1308
- Mi([...D]);
1308
+ Ii([...D]);
1309
1309
  },
1310
1310
  destroy(y) {
1311
1311
  }
1312
1312
  }
1313
1313
  };
1314
- V.open(C);
1314
+ K.open(C);
1315
1315
  } else if (o == "onPage")
1316
1316
  if (t.params.videoAutoplay = "on", r == "off") {
1317
1317
  if (s.querySelector("video-player"))
@@ -1343,10 +1343,10 @@ it = new WeakSet(), Ce = function() {
1343
1343
  LAYOUT: t.LAYOUT || []
1344
1344
  };
1345
1345
  }, Xe(X, "globalOptions", {});
1346
- let _e = X;
1347
- Object.assign(_e.prototype, j);
1346
+ let Ce = X;
1347
+ Object.assign(Ce.prototype, j);
1348
1348
  customElements.define("video-player", Ws);
1349
- const Fs = {
1349
+ const Ys = {
1350
1350
  "zh-tw": {
1351
1351
  臺北市: [
1352
1352
  ["中正區", "100"],
@@ -2177,7 +2177,7 @@ const Fs = {
2177
2177
  }
2178
2178
  };
2179
2179
  let Q;
2180
- const Ys = (n) => {
2180
+ const Fs = (n) => {
2181
2181
  const { TEMPLATE: i } = Be, { childDom: t } = n.s, e = document.createElement("div"), s = n.classList.contains("filter"), o = n.getAttribute("filter-placeholder"), a = n.getAttribute("d4-icon"), r = n.getAttribute("custom-template");
2182
2182
  e.innerHTML = i(
2183
2183
  s,
@@ -2196,9 +2196,9 @@ const Ys = (n) => {
2196
2196
  const i = (t = n.getAttribute("control-elements")) == null ? void 0 : t.split(",");
2197
2197
  i && i.forEach((e) => {
2198
2198
  const s = document.querySelector(e);
2199
- s || L("dropdown", `Can't not find control element(${e})`), s && s.classList.contains("disabled") && (s.classList.remove("disabled"), s.tagName === "DROPDOWN-EL" && s.s.activeLi && I(s, [...s.s.allLi].indexOf(s.s.activeLi)));
2199
+ s || L("dropdown", `Can't not find control element(${e})`), s && s.classList.contains("disabled") && (s.classList.remove("disabled"), s.tagName === "DROPDOWN-EL" && s.s.activeLi && M(s, [...s.s.allLi].indexOf(s.s.activeLi)));
2200
2200
  });
2201
- }, I = (n, i) => {
2201
+ }, M = (n, i) => {
2202
2202
  const t = n.getAttribute("d4-placeholder"), e = n.querySelectorAll(".dropdown-list li");
2203
2203
  if (i < 0 || i.length === 0) {
2204
2204
  switch (e.forEach((s) => {
@@ -2252,7 +2252,7 @@ const Ys = (n) => {
2252
2252
  }
2253
2253
  }, Js = (n) => {
2254
2254
  const i = n.s.cityLang;
2255
- f("#newCityData").length > 0 ? f("#newCityData").val() !== "" && (Q = JSON.parse(f("#newCityData").val())[0], console.log([0])) : Q = Fs, n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(Q[i]).forEach((t) => {
2255
+ f("#newCityData").length > 0 ? f("#newCityData").val() !== "" && (Q = JSON.parse(f("#newCityData").val())[0], console.log([0])) : Q = Ys, n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(Q[i]).forEach((t) => {
2256
2256
  const e = document.createElement("li");
2257
2257
  e.textContent = t, e.setAttribute("data-option", t), n.s.dropdownEl.querySelector(".dropdown-list").append(e);
2258
2258
  }), n.s.allLi = n.querySelectorAll(".dropdown-list li"));
@@ -2306,7 +2306,7 @@ class Pi extends HTMLElement {
2306
2306
  switch (o.hasAttribute("multiple") ? "multiple" : "single") {
2307
2307
  case "single":
2308
2308
  const r = o.querySelector(`.dropdown-list li[data-option="${s}"]`);
2309
- E(r) ? I(o, [...o.s.allLi].indexOf(r)) : I(o, -1);
2309
+ E(r) ? M(o, [...o.s.allLi].indexOf(r)) : M(o, -1);
2310
2310
  break;
2311
2311
  case "multiple":
2312
2312
  const l = [];
@@ -2315,17 +2315,17 @@ class Pi extends HTMLElement {
2315
2315
  E(p) && (p.classList.add("active"), l.push(p));
2316
2316
  });
2317
2317
  const c = l.map((u) => [...o.s.allLi].indexOf(u));
2318
- I(o, c);
2318
+ M(o, c);
2319
2319
  break;
2320
2320
  }
2321
2321
  else
2322
- I(o, -1);
2322
+ M(o, -1);
2323
2323
  o.emit("change");
2324
2324
  break;
2325
2325
  case "d4-placeholder":
2326
2326
  if (e === null)
2327
2327
  return;
2328
- e !== s && o.s.value.index < 0 && I(o, o.s.value.index);
2328
+ e !== s && o.s.value.index < 0 && M(o, o.s.value.index);
2329
2329
  break;
2330
2330
  }
2331
2331
  }
@@ -2360,7 +2360,7 @@ class Pi extends HTMLElement {
2360
2360
  Bt = new WeakSet(), ji = function() {
2361
2361
  this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this, Wt, zi).call(this);
2362
2362
  }, Wt = new WeakSet(), zi = function() {
2363
- this.s.childDom = this.childNodes, this.s.template = Ys(this), this.innerHTML = "", this.append(this.s.template), d(this, Gt, Bi).call(this);
2363
+ this.s.childDom = this.childNodes, this.s.template = Fs(this), this.innerHTML = "", this.append(this.s.template), d(this, Gt, Bi).call(this);
2364
2364
  }, Gt = new WeakSet(), Bi = function() {
2365
2365
  var s;
2366
2366
  const t = this;
@@ -2406,7 +2406,7 @@ Bt = new WeakSet(), ji = function() {
2406
2406
  };
2407
2407
  break;
2408
2408
  }
2409
- I(t, t.s.value.index), d(s = t, Rt, Wi).call(s), t.classList.add("d4-initialize");
2409
+ M(t, t.s.value.index), d(s = t, Rt, Wi).call(s), t.classList.add("d4-initialize");
2410
2410
  }, Rt = new WeakSet(), Wi = function() {
2411
2411
  const t = this;
2412
2412
  t.__events__.dropdownToggle = () => {
@@ -2453,7 +2453,7 @@ Bt = new WeakSet(), ji = function() {
2453
2453
  t.s.dropdownEl.addEventListener("transitionend", e);
2454
2454
  }, t.__events__.bindScrollbar = (e = this) => {
2455
2455
  const s = e.querySelector(".dropdown-scroller");
2456
- e.__scroller__ = je(s, {
2456
+ e.__scroller__ = ze(s, {
2457
2457
  overflowBehavior: {
2458
2458
  x: "hidden"
2459
2459
  }
@@ -2482,7 +2482,7 @@ Bt = new WeakSet(), ji = function() {
2482
2482
  case "single":
2483
2483
  if (e.setAttribute("d4-value", u.getAttribute("data-option")), r) {
2484
2484
  const v = e.s.cityLang, w = l.textContent.trim(), b = document.getElementById(e.getAttribute("dist-select"));
2485
- b && (b.querySelector(".dropdown-list").textContent = "", I(b, -1), Q[v][w].forEach((T, C) => {
2485
+ b && (b.querySelector(".dropdown-list").textContent = "", M(b, -1), Q[v][w].forEach((T, C) => {
2486
2486
  const y = document.createElement("li");
2487
2487
  y.textContent = T[0], y.setAttribute("data-option", T[0]), b.querySelector(".dropdown-list").append(y);
2488
2488
  }), e.__events__.selectOption(b));
@@ -2490,7 +2490,7 @@ Bt = new WeakSet(), ji = function() {
2490
2490
  (m = u.parentNode.closest("li")) != null && m.classList.contains("has-sublayer") && (c.stopPropagation(), e.close());
2491
2491
  break;
2492
2492
  case "multiple":
2493
- c.stopPropagation(), u.classList.toggle("active"), I(e, p);
2493
+ c.stopPropagation(), u.classList.toggle("active"), M(e, p);
2494
2494
  break;
2495
2495
  }
2496
2496
  });
@@ -2550,7 +2550,7 @@ function Je(n) {
2550
2550
  } else
2551
2551
  return n.s.options.duration;
2552
2552
  }
2553
- function Vs(n) {
2553
+ function Ks(n) {
2554
2554
  const { behavior: i, continual: t, gap: e } = n.s.options, s = n.childNodes, o = document.createElement("div"), a = document.createElement("div");
2555
2555
  o.className = "animate-container", a.className = "animate-item", [...s].forEach((l) => {
2556
2556
  a.append(l);
@@ -2617,19 +2617,19 @@ function H(n) {
2617
2617
  }
2618
2618
  return s;
2619
2619
  }
2620
- function Ks(n) {
2620
+ function Vs(n) {
2621
2621
  let i;
2622
2622
  return function(t) {
2623
2623
  i && clearTimeout(i), i = setTimeout(n, 200, t);
2624
2624
  };
2625
2625
  }
2626
- var Xt, Gi, Ft, Ri, Yt, Xi, Ut, Fi;
2626
+ var Xt, Gi, Yt, Ri, Ft, Xi, Ut, Yi;
2627
2627
  class tn extends HTMLElement {
2628
2628
  constructor() {
2629
2629
  super();
2630
2630
  h(this, Xt);
2631
- h(this, Ft);
2632
2631
  h(this, Yt);
2632
+ h(this, Ft);
2633
2633
  h(this, Ut);
2634
2634
  this.initialize = !1;
2635
2635
  }
@@ -2650,23 +2650,23 @@ class tn extends HTMLElement {
2650
2650
  }
2651
2651
  Xt = new WeakSet(), Gi = function() {
2652
2652
  const t = {
2653
- direction: this.getAttribute("direction") || M.SETTINGS.direction,
2653
+ direction: this.getAttribute("direction") || I.SETTINGS.direction,
2654
2654
  // up / down / left / right
2655
- behavior: this.getAttribute("behavior") || M.SETTINGS.behavior,
2655
+ behavior: this.getAttribute("behavior") || I.SETTINGS.behavior,
2656
2656
  // normal / alternate / endStop
2657
- duration: Number(this.getAttribute("duration")) || M.SETTINGS.duration,
2657
+ duration: Number(this.getAttribute("duration")) || I.SETTINGS.duration,
2658
2658
  // ms
2659
- durationBreakpoints: gt(this) || M.SETTINGS.durationBreakpoints,
2660
- autoplay: this.getAttribute("autoplay") || M.SETTINGS.autoplay,
2659
+ durationBreakpoints: gt(this) || I.SETTINGS.durationBreakpoints,
2660
+ autoplay: this.getAttribute("autoplay") || I.SETTINGS.autoplay,
2661
2661
  // normal / alternate / endStop
2662
- pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : M.SETTINGS.pauseOnMouseenter,
2662
+ pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : I.SETTINGS.pauseOnMouseenter,
2663
2663
  // true / false
2664
- continual: this.getAttribute("continual") ? this.getAttribute("continual") === "true" : M.SETTINGS.continual,
2664
+ continual: this.getAttribute("continual") ? this.getAttribute("continual") === "true" : I.SETTINGS.continual,
2665
2665
  // true / false
2666
- gap: Number(this.getAttribute("gap")) || M.SETTINGS.gap
2666
+ gap: Number(this.getAttribute("gap")) || I.SETTINGS.gap
2667
2667
  };
2668
- this.s = {}, this.s.options = t, this.s.nowDuration = Je(this), Vs(this), d(this, Ft, Ri).call(this);
2669
- }, Ft = new WeakSet(), Ri = function() {
2668
+ this.s = {}, this.s.options = t, this.s.nowDuration = Je(this), Ks(this), d(this, Yt, Ri).call(this);
2669
+ }, Yt = new WeakSet(), Ri = function() {
2670
2670
  const { direction: t, continual: e, gap: s } = this.s.options;
2671
2671
  switch (t) {
2672
2672
  case "left":
@@ -2678,8 +2678,8 @@ Xt = new WeakSet(), Gi = function() {
2678
2678
  e ? this.style.cssText = `height: ${this.s.animateEl.clientHeight}px;--continual-gap: ${s}px;` : this.style.cssText = `min-height: ${this.s.animateEl.clientHeight}px;--continual-gap: ${s}px;`;
2679
2679
  break;
2680
2680
  }
2681
- d(this, Yt, Xi).call(this), d(this, Ut, Fi).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2682
- }, Yt = new WeakSet(), Xi = function() {
2681
+ d(this, Ft, Xi).call(this), d(this, Ut, Yi).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2682
+ }, Ft = new WeakSet(), Xi = function() {
2683
2683
  const t = this, { direction: e, behavior: s, duration: o, autoplay: a, pauseOnMouseenter: r, continual: l } = t.s.options;
2684
2684
  let c;
2685
2685
  function u() {
@@ -2744,7 +2744,7 @@ Xt = new WeakSet(), Gi = function() {
2744
2744
  }), t.addEventListener("mouseleave", function() {
2745
2745
  t.s.animation && r && t.s.animation.playState === "paused" && t.play();
2746
2746
  });
2747
- }, Ut = new WeakSet(), Fi = function() {
2747
+ }, Ut = new WeakSet(), Yi = function() {
2748
2748
  const t = this;
2749
2749
  function e() {
2750
2750
  const s = t.s.animation.startTime, o = t.s.cloneAnimation ? t.s.cloneAnimation.startTime : null;
@@ -2757,7 +2757,7 @@ Xt = new WeakSet(), Gi = function() {
2757
2757
  iterations: 1 / 0
2758
2758
  }), t.s.cloneAnimation.startTime = o);
2759
2759
  }
2760
- window.addEventListener("resize", Ks(e));
2760
+ window.addEventListener("resize", Vs(e));
2761
2761
  };
2762
2762
  customElements.define("marquee-el", tn);
2763
2763
  const Ze = function(n, i) {
@@ -2782,7 +2782,7 @@ const Ze = function(n, i) {
2782
2782
  }
2783
2783
  n.classList.remove(i);
2784
2784
  };
2785
- var Jt, Yi, Zt, Ui, Qt, Ji, nt, Me, F, ft, Vt, Zi;
2785
+ var Jt, Fi, Zt, Ui, Qt, Ji, nt, Me, Y, ft, Kt, Zi;
2786
2786
  class Qe {
2787
2787
  constructor(i) {
2788
2788
  // 初始化
@@ -2794,34 +2794,31 @@ class Qe {
2794
2794
  // 卷軸位置判斷
2795
2795
  h(this, nt);
2796
2796
  // 隱藏按鈕判斷
2797
- h(this, F);
2797
+ h(this, Y);
2798
2798
  // 選項事件綁定
2799
- h(this, Vt);
2800
- this.$element = i, this.option = i.s.option.drag, this._didInitialScroll = !1, d(this, Jt, Yi).call(this);
2799
+ h(this, Kt);
2800
+ this.$element = i, this.option = i.s.option.drag, this._didInitialScroll = !1, d(this, Jt, Fi).call(this);
2801
2801
  }
2802
2802
  // 更新 active 位置
2803
2803
  update(i = !1) {
2804
2804
  const t = this.$element.querySelector(".wrapper"), e = t == null ? void 0 : t.querySelector(".active");
2805
2805
  if (!e || !t)
2806
2806
  return;
2807
- const s = t.querySelectorAll(".item"), o = e === s[0], a = e === s[s.length - 1];
2808
- let r = "center";
2809
- o ? r = "start" : a && (r = "end");
2810
- const l = () => {
2811
- e.scrollIntoView({
2812
- behavior: "smooth",
2813
- block: "nearest",
2814
- inline: r
2807
+ const s = () => {
2808
+ const o = t.getBoundingClientRect(), a = e.getBoundingClientRect(), r = o.left + o.width / 2, c = a.left + a.width / 2 - r, u = t.scrollLeft + c;
2809
+ t.scrollTo({
2810
+ left: u,
2811
+ behavior: "smooth"
2815
2812
  });
2816
2813
  };
2817
2814
  if (i && !this._didInitialScroll) {
2818
- this._didInitialScroll = !0, setTimeout(l, 250);
2815
+ this._didInitialScroll = !0, setTimeout(s, 250);
2819
2816
  return;
2820
2817
  }
2821
- l();
2818
+ s();
2822
2819
  }
2823
2820
  }
2824
- Jt = new WeakSet(), Yi = function() {
2821
+ Jt = new WeakSet(), Fi = function() {
2825
2822
  var s, o, a, r;
2826
2823
  const i = this;
2827
2824
  if (!i.$element)
@@ -2830,7 +2827,7 @@ Jt = new WeakSet(), Yi = function() {
2830
2827
  let t = !1;
2831
2828
  const e = () => {
2832
2829
  t || (requestAnimationFrame(() => {
2833
- d(this, nt, Me).call(this), d(this, F, ft).call(this), t = !1;
2830
+ d(this, nt, Me).call(this), d(this, Y, ft).call(this), t = !1;
2834
2831
  }), t = !0);
2835
2832
  };
2836
2833
  i.$wrapper.removeEventListener("scroll", e), i.$wrapper.addEventListener("scroll", e), window.removeEventListener("resize", e), window.addEventListener("resize", e), (i.option.draggable || i.$element.s.type == "collapse") && d(s = i, Qt, Ji).call(s), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
@@ -2843,8 +2840,8 @@ Jt = new WeakSet(), Yi = function() {
2843
2840
  <div></div>
2844
2841
  </div>
2845
2842
  </div>`
2846
- ), i.$button = (o = i.$container) == null ? void 0 : o.querySelectorAll(".button"), d(a = i, Zt, Ui).call(a)), d(r = i, Vt, Zi).call(r), i.update(!0), requestAnimationFrame(() => {
2847
- d(this, nt, Me).call(this), d(this, F, ft).call(this);
2843
+ ), i.$button = (o = i.$container) == null ? void 0 : o.querySelectorAll(".button"), d(a = i, Zt, Ui).call(a)), d(r = i, Kt, Zi).call(r), i.update(!0), requestAnimationFrame(() => {
2844
+ d(this, nt, Me).call(this), d(this, Y, ft).call(this);
2848
2845
  });
2849
2846
  }, Zt = new WeakSet(), Ui = function() {
2850
2847
  const i = this, { $wrapper: t, $button: e } = i, s = function() {
@@ -2854,7 +2851,7 @@ Jt = new WeakSet(), Yi = function() {
2854
2851
  behavior: "smooth"
2855
2852
  }), setTimeout(() => {
2856
2853
  var r;
2857
- d(r = i, F, ft).call(r);
2854
+ d(r = i, Y, ft).call(r);
2858
2855
  }, 100);
2859
2856
  };
2860
2857
  e.forEach((o) => {
@@ -2893,7 +2890,7 @@ Jt = new WeakSet(), Yi = function() {
2893
2890
  }, nt = new WeakSet(), Me = function() {
2894
2891
  const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = Math.round(t.scrollLeft);
2895
2892
  e <= 0 || ($(i, "scrollable"), s == 0 ? ($(t, "start"), _(t, "end")) : s + 1 >= e ? (_(t, "start"), $(t, "end")) : ($(t, "center"), _(t, "start"), _(t, "end")));
2896
- }, F = new WeakSet(), ft = function() {
2893
+ }, Y = new WeakSet(), ft = function() {
2897
2894
  const { $wrapper: i, $button: t, $element: e } = this;
2898
2895
  if (!t)
2899
2896
  return;
@@ -2915,7 +2912,7 @@ Jt = new WeakSet(), Yi = function() {
2915
2912
  }
2916
2913
  _(a, "hide");
2917
2914
  }) : _(t, "hide");
2918
- }, Vt = new WeakSet(), Zi = function() {
2915
+ }, Kt = new WeakSet(), Zi = function() {
2919
2916
  const { $element: i } = this, t = (s) => {
2920
2917
  if (this.option.selected) {
2921
2918
  const o = s.getAttribute("data-option").trim();
@@ -2929,26 +2926,26 @@ Jt = new WeakSet(), Yi = function() {
2929
2926
  s.removeEventListener("click", e), s.addEventListener("click", e);
2930
2927
  });
2931
2928
  };
2932
- var Kt, Qi, te, Vi, ee, Ki, ie, ts;
2929
+ var Vt, Qi, te, Ki, ee, Vi, ie, ts;
2933
2930
  class en {
2934
2931
  constructor(i) {
2935
2932
  // 初始化
2936
- h(this, Kt);
2933
+ h(this, Vt);
2937
2934
  // 隱藏按鈕判斷
2938
2935
  h(this, te);
2939
2936
  // 展開箭頭事件綁定
2940
2937
  h(this, ee);
2941
2938
  // 選項事件綁定
2942
2939
  h(this, ie);
2943
- this.$element = i, this.option = i.s.option.collapse, d(this, Kt, Qi).call(this);
2940
+ this.$element = i, this.option = i.s.option.collapse, d(this, Vt, Qi).call(this);
2944
2941
  }
2945
2942
  }
2946
- Kt = new WeakSet(), Qi = function() {
2947
- this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, te, Vi).call(this) && d(this, ee, Ki).call(this), d(this, ie, ts).call(this));
2948
- }, te = new WeakSet(), Vi = function() {
2943
+ Vt = new WeakSet(), Qi = function() {
2944
+ this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, te, Ki).call(this) && d(this, ee, Vi).call(this), d(this, ie, ts).call(this));
2945
+ }, te = new WeakSet(), Ki = function() {
2949
2946
  const i = this.$element.querySelector(".drag-container"), t = i.querySelector(".wrapper");
2950
2947
  return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(S.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), _(this.$element, "noScrollable"), !0) : ($(this.$element, "noScrollable"), !1);
2951
- }, ee = new WeakSet(), Ki = function() {
2948
+ }, ee = new WeakSet(), Vi = function() {
2952
2949
  const { $element: i, $button: t } = this, e = function() {
2953
2950
  i.classList.contains("expand") ? i.classList.remove("expand") : i.classList.add("expand");
2954
2951
  };
@@ -2971,7 +2968,7 @@ const sn = (n) => {
2971
2968
  const { type: i, option: t, originalDomString: e } = n.s, s = document.createElement("div");
2972
2969
  return i == "drag" && (s.innerHTML = q.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(S.append, e)), i == "collapse" && (s.innerHTML = q.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(S.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(S.append, e)), i == "dropdown" && (s.innerHTML = q.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(S.append, e)), s.children;
2973
2970
  };
2974
- var se, es, ne, is, ot, Ie, Y, vt;
2971
+ var se, es, ne, is, ot, qe, F, vt;
2975
2972
  class nn extends HTMLElement {
2976
2973
  constructor() {
2977
2974
  super();
@@ -2980,7 +2977,7 @@ class nn extends HTMLElement {
2980
2977
  // 斷點設定
2981
2978
  h(this, ot);
2982
2979
  // check type
2983
- h(this, Y);
2980
+ h(this, F);
2984
2981
  this.initialize = !1, this.__events__ = {}, this.s = {}, this.s.originalDomString = this.innerHTML.trim().replace(/\n/g, ""), this.previousWidth = window.innerWidth;
2985
2982
  }
2986
2983
  static get observedAttributes() {
@@ -2992,7 +2989,7 @@ class nn extends HTMLElement {
2992
2989
  case "m4-type":
2993
2990
  if (e === null || e === s)
2994
2991
  return;
2995
- this.s.type = s, d(this, Y, vt).call(this);
2992
+ this.s.type = s, d(this, F, vt).call(this);
2996
2993
  break;
2997
2994
  case "m4-status":
2998
2995
  if (e === s)
@@ -3012,7 +3009,7 @@ class nn extends HTMLElement {
3012
3009
  this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, se, es).call(this));
3013
3010
  }
3014
3011
  update() {
3015
- d(this, ot, Ie).call(this);
3012
+ d(this, ot, qe).call(this);
3016
3013
  }
3017
3014
  }
3018
3015
  se = new WeakSet(), es = function() {
@@ -3028,18 +3025,18 @@ se = new WeakSet(), es = function() {
3028
3025
  };
3029
3026
  window.removeEventListener("resize", Ze(e)), window.addEventListener("resize", Ze(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, q.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, q.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, q.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, q.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, ne, is).call(this);
3030
3027
  }, ne = new WeakSet(), is = function() {
3031
- this.classList.add("m4-init"), d(this, ot, Ie).call(this);
3032
- }, ot = new WeakSet(), Ie = function() {
3028
+ this.classList.add("m4-init"), d(this, ot, qe).call(this);
3029
+ }, ot = new WeakSet(), qe = function() {
3033
3030
  const t = Object.keys(this.s.option.breakpoint);
3034
3031
  if (!t.length) {
3035
- d(this, Y, vt).call(this);
3032
+ d(this, F, vt).call(this);
3036
3033
  return;
3037
3034
  }
3038
3035
  t.map((e) => Number(e)).sort((e, s) => s - e).some((e) => {
3039
3036
  var s, o, a, r;
3040
- return window.innerWidth >= e && (this.s.type = (s = this.s.option.breakpoint[e]) == null ? void 0 : s.type, this.setAttribute("m4-type", this.s.type), this.s.option.drag = Object.assign({}, this.s.option.drag, (o = this.s.option.breakpoint[e]) == null ? void 0 : o.drag), this.s.option.collapse = Object.assign({}, this.s.option.collapse, (a = this.s.option.breakpoint[e]) == null ? void 0 : a.collapse), this.s.option.dropdown = Object.assign({}, this.s.option.dropdown, (r = this.s.option.breakpoint[e]) == null ? void 0 : r.dropdown)), d(this, Y, vt).call(this), window.innerWidth >= e;
3037
+ return window.innerWidth >= e && (this.s.type = (s = this.s.option.breakpoint[e]) == null ? void 0 : s.type, this.setAttribute("m4-type", this.s.type), this.s.option.drag = Object.assign({}, this.s.option.drag, (o = this.s.option.breakpoint[e]) == null ? void 0 : o.drag), this.s.option.collapse = Object.assign({}, this.s.option.collapse, (a = this.s.option.breakpoint[e]) == null ? void 0 : a.collapse), this.s.option.dropdown = Object.assign({}, this.s.option.dropdown, (r = this.s.option.breakpoint[e]) == null ? void 0 : r.dropdown)), d(this, F, vt).call(this), window.innerWidth >= e;
3041
3038
  });
3042
- }, Y = new WeakSet(), vt = function() {
3039
+ }, F = new WeakSet(), vt = function() {
3043
3040
  var o;
3044
3041
  const { type: t } = this.s;
3045
3042
  this.innerHTML = "", [...sn(this)].forEach((a) => {
@@ -3057,7 +3054,7 @@ se = new WeakSet(), es = function() {
3057
3054
  (o = this.drag) == null || o.update();
3058
3055
  };
3059
3056
  customElements.define("multipurpose-nav", nn);
3060
- var oe, ns, ae, os, at, qe, W, J, re, as, le, rs, ce, ls, de, cs, ue, ds, he, us, pe, hs, me, ps, ge, ms, N, R, fe, gs, ve, fs, be, vs, ye, bs;
3057
+ var oe, ns, ae, os, at, Oe, W, J, re, as, le, rs, ce, ls, de, cs, ue, ds, he, us, pe, hs, me, ps, ge, ms, N, R, fe, gs, ve, fs, be, vs, ye, bs;
3061
3058
  class ss extends HTMLElement {
3062
3059
  // 定義組件的初始狀態
3063
3060
  constructor(t, e) {
@@ -3134,7 +3131,7 @@ class ss extends HTMLElement {
3134
3131
  }
3135
3132
  // 外部呼叫方法 $0.update()
3136
3133
  update() {
3137
- this.t.tabs = d(this, at, qe).call(this), ys(), console.log("tab update!!!!");
3134
+ this.t.tabs = d(this, at, Oe).call(this), ys(), console.log("tab update!!!!");
3138
3135
  }
3139
3136
  }
3140
3137
  oe = new WeakSet(), ns = function() {
@@ -3157,14 +3154,14 @@ oe = new WeakSet(), ns = function() {
3157
3154
  delay: this.getAttribute("t4-delay") || e.transition.delay
3158
3155
  },
3159
3156
  tabGroup: this.getAttribute("t4-group") || e.tabGroup
3160
- }, this.__events__ = {}, this.t.tabs = d(this, at, qe).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, ae, os).call(this);
3157
+ }, this.__events__ = {}, this.t.tabs = d(this, at, Oe).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, ae, os).call(this);
3161
3158
  }, ae = new WeakSet(), os = function() {
3162
3159
  if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && d(this, re, as).call(this), this.t.recordUrl) {
3163
3160
  const e = new URLSearchParams(document.location.search).get(this.t.name), s = document.querySelectorAll(`[t4-name="${this.t.name}"] .tab-panel[t4-id="${e}"]`);
3164
3161
  e && s.length === 1 ? this.t.activeTab = e : console.warn(`沒有${e}這頁喔!!`);
3165
3162
  }
3166
3163
  this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), d(this, ye, bs).call(this);
3167
- }, at = new WeakSet(), qe = function() {
3164
+ }, at = new WeakSet(), Oe = function() {
3168
3165
  const { t } = this, e = Array.from(document.querySelectorAll(`[t4-control="${t.name}"][t4-role="tab"]`));
3169
3166
  return t.type === "normal" && t.tabGroup === "true" && t.tabPanels.length !== e.length && console.warn("按鈕與內容數量不同喔", t.tabPanels.length, e.length), t.tabGroup === "true" ? t.tabPanels.forEach((s, o) => s.setAttribute("t4-id", o)) : t.tabPanels.forEach((s) => {
3170
3167
  s.getAttribute("t4-id") || console.warn(s, "請幫我設定id!!");
@@ -3224,7 +3221,7 @@ oe = new WeakSet(), ns = function() {
3224
3221
  }, N = new WeakSet(), R = function(t, e, s) {
3225
3222
  switch (t) {
3226
3223
  case "step":
3227
- Se(this.t.step) && d(this, he, us).call(this, e);
3224
+ De(this.t.step) && d(this, he, us).call(this, e);
3228
3225
  break;
3229
3226
  case "eventAnchor":
3230
3227
  this.t.anchor && d(this, de, cs).call(this);
@@ -3335,30 +3332,30 @@ function ys() {
3335
3332
  ys();
3336
3333
  Object.assign(ss.prototype, j);
3337
3334
  customElements.define("tab-el", ss);
3338
- const Ve = (n) => {
3335
+ const Ke = (n) => {
3339
3336
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e);
3340
3337
  n.classList.add(t), o.style.height = 0, o.style["transition-property"] = s.property, o.style["transition-duration"] = s.duration, o.style["transition-timing-function"] = s.function, o.style["transition-delay"] = s.delay, o.style.overflow = "hidden";
3341
3338
  }, an = (n) => {
3342
3339
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e), a = o.children[0].offsetHeight;
3343
3340
  n.collapse.height = a, n.classList.remove(t), o.style.display = "block", o.style.height = `${a}px`, o.style["transition-property"] = s.property, o.style["transition-duration"] = s.duration, o.style["transition-timing-function"] = s.function, o.style["transition-delay"] = s.delay, o.style.overflow = "hidden";
3344
3341
  };
3345
- var rt, Oe, we, ws, Te, Ts, lt, Ne;
3342
+ var rt, Ne, we, ws, Te, Ts, lt, Pe;
3346
3343
  class rn {
3347
3344
  constructor(i, t = {}) {
3348
3345
  h(this, rt);
3349
3346
  h(this, we);
3350
3347
  h(this, Te);
3351
3348
  h(this, lt);
3352
- !dt(i) && !Se(i) && !ut(i) && !E(i) || (this.__storage__ = {
3349
+ !dt(i) && !De(i) && !ut(i) && !E(i) || (this.__storage__ = {
3353
3350
  el: i,
3354
3351
  options: t
3355
- }, this.active = "data-collapse-active", d(this, rt, Oe).call(this));
3352
+ }, this.active = "data-collapse-active", d(this, rt, Ne).call(this));
3356
3353
  }
3357
3354
  update() {
3358
- d(this, rt, Oe).call(this);
3355
+ d(this, rt, Ne).call(this);
3359
3356
  }
3360
3357
  }
3361
- rt = new WeakSet(), Oe = function() {
3358
+ rt = new WeakSet(), Ne = function() {
3362
3359
  const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = si;
3363
3360
  if (this.elements = t.state == "not active" ? x(i + `:not([${this.active}])`) : x(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3364
3361
  for (const [o, a] of Object.entries(this.options.on))
@@ -3371,17 +3368,17 @@ rt = new WeakSet(), Oe = function() {
3371
3368
  }), this.emit("init");
3372
3369
  }, Te = new WeakSet(), Ts = function(i) {
3373
3370
  const { options: t } = this, { collapseClass: e, block: s, target: o, defaultOpen: a, targetStopPropagation: r, defaultActiveMark: l } = t, c = i, u = c.querySelector(o);
3374
- if (c.collapse.height = u.children[0].offsetHeight, a ? (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)) : !c.classList.contains(l) && !c.hasAttribute(l) ? (c.classList.add(e), u.style.height = "0px", u.style.overflow = "hidden") : (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)), c.removeEventListener("click", d(this, lt, Ne)), c.addEventListener("click", d(this, lt, Ne)), r) {
3371
+ if (c.collapse.height = u.children[0].offsetHeight, a ? (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)) : !c.classList.contains(l) && !c.hasAttribute(l) ? (c.classList.add(e), u.style.height = "0px", u.style.overflow = "hidden") : (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)), c.removeEventListener("click", d(this, lt, Pe)), c.addEventListener("click", d(this, lt, Pe)), r) {
3375
3372
  const p = (g) => {
3376
3373
  g.stopPropagation();
3377
3374
  };
3378
3375
  u.removeEventListener("click", p), u.addEventListener("click", p);
3379
3376
  }
3380
- }, lt = new WeakSet(), Ne = function() {
3377
+ }, lt = new WeakSet(), Pe = function() {
3381
3378
  const { instance: i, defaultOptions: t } = this.collapse, { collapseClass: e, block: s, target: o, single: a } = t, r = this;
3382
3379
  r.classList.contains(e) ? (a && r.parentNode.querySelectorAll(`.${r.classList[0]}`).forEach((l) => {
3383
- Ve(l);
3384
- }), an(r)) : Ve(r), i.emit("afterCollapse");
3380
+ Ke(l);
3381
+ }), an(r)) : Ke(r), i.emit("afterCollapse");
3385
3382
  };
3386
3383
  Object.assign(rn.prototype, j);
3387
3384
  function ln(n, i) {
@@ -3397,7 +3394,7 @@ function Es() {
3397
3394
  });
3398
3395
  }
3399
3396
  document.addEventListener("click", Es);
3400
- var ct, Pe, Ee, As, Ae, Ls, Le, Ss;
3397
+ var ct, je, Ee, As, Ae, Ls, Le, Ss;
3401
3398
  class cn extends HTMLElement {
3402
3399
  constructor() {
3403
3400
  super();
@@ -3409,13 +3406,13 @@ class cn extends HTMLElement {
3409
3406
  }
3410
3407
  connectedCallback() {
3411
3408
  const t = this;
3412
- t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, ct, Pe).call(this));
3409
+ t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, ct, je).call(this));
3413
3410
  }
3414
3411
  update() {
3415
- this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, ct, Pe).call(this);
3412
+ this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, ct, je).call(this);
3416
3413
  }
3417
3414
  }
3418
- ct = new WeakSet(), Pe = function() {
3415
+ ct = new WeakSet(), je = function() {
3419
3416
  const { SETTINGS: t } = ni;
3420
3417
  this.s = {};
3421
3418
  function e(o) {
@@ -3507,7 +3504,7 @@ class dn {
3507
3504
  this.init();
3508
3505
  }
3509
3506
  }
3510
- function Ke(n, i) {
3507
+ function Ve(n, i) {
3511
3508
  return n ? function(t, e) {
3512
3509
  Function(n)(t, e);
3513
3510
  } : i;
@@ -3621,8 +3618,8 @@ class vn {
3621
3618
  previewSize: e.dataset.previewSize || i.params.previewSize,
3622
3619
  compress: e.dataset.compress || i.params.compress,
3623
3620
  on: {
3624
- changeAfter: Ke(e.dataset.changeAfter, i.params.on.changeAfter),
3625
- overLimit: Ke(e.dataset.overLimit, i.params.on.overLimit)
3621
+ changeAfter: Ve(e.dataset.changeAfter, i.params.on.changeAfter),
3622
+ overLimit: Ve(e.dataset.overLimit, i.params.on.overLimit)
3626
3623
  }
3627
3624
  };
3628
3625
  i.params = o, typeof uploadImage[`${o.group}`] > "u" && (uploadImage[`${o.group}`] = []), e.dataset.group || (e.dataset.group = o.group), e.dataset.index = document.querySelectorAll(`[data-group="${o.group}"]`).length - 1, e.addEventListener("change", function(a) {
@@ -3633,10 +3630,10 @@ class vn {
3633
3630
  }
3634
3631
  export {
3635
3632
  oi as A,
3636
- Mn as B,
3633
+ In as B,
3637
3634
  rn as C,
3638
3635
  Pi as D,
3639
- In as E,
3636
+ Mn as E,
3640
3637
  qn as F,
3641
3638
  On as G,
3642
3639
  Nn as H,
@@ -3644,7 +3641,7 @@ export {
3644
3641
  Pn as J,
3645
3642
  jn as K,
3646
3643
  zn as L,
3647
- V as M,
3644
+ K as M,
3648
3645
  Bn as N,
3649
3646
  Wn as O,
3650
3647
  Gn as P,
@@ -3652,16 +3649,16 @@ export {
3652
3649
  cn as R,
3653
3650
  Xn as S,
3654
3651
  ss as T,
3655
- Fn as U,
3656
- Yn as V,
3652
+ Yn as U,
3653
+ Fn as V,
3657
3654
  Un as W,
3658
3655
  Jn as X,
3659
3656
  Zn as Y,
3660
3657
  E as a,
3661
3658
  ut as b,
3662
- Ms as c,
3659
+ Is as c,
3663
3660
  Hs as d,
3664
- ze as e,
3661
+ Se as e,
3665
3662
  S as f,
3666
3663
  x as g,
3667
3664
  Dn as h,
@@ -3673,12 +3670,12 @@ export {
3673
3670
  Rs as n,
3674
3671
  Qn as o,
3675
3672
  Hi as p,
3676
- Mi as q,
3673
+ Ii as q,
3677
3674
  kn as r,
3678
3675
  Cs as s,
3679
3676
  xn as t,
3680
3677
  $n as u,
3681
- _e as v,
3678
+ Ce as v,
3682
3679
  Gs as w,
3683
3680
  _n as x,
3684
3681
  Cn as y,