@xwadex/fesd 0.0.66 → 0.0.67
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.
|
@@ -402,15 +402,15 @@ const He = {
|
|
|
402
402
|
let y = 0;
|
|
403
403
|
if (T === 0)
|
|
404
404
|
return;
|
|
405
|
-
const L = (
|
|
405
|
+
const L = (x) => {
|
|
406
406
|
const F = _(t);
|
|
407
|
-
i && i.emit(
|
|
407
|
+
i && i.emit(x, F), !i && n.on && G(n.on[x]) && n.on[x](F);
|
|
408
408
|
};
|
|
409
409
|
L("beforeScroll");
|
|
410
410
|
const O = () => {
|
|
411
411
|
y += C;
|
|
412
|
-
const
|
|
413
|
-
m[u] =
|
|
412
|
+
const x = Js[r](y, v, T, o);
|
|
413
|
+
m[u] = x, y < o && requestAnimationFrame(O), y >= o && L("afterScroll");
|
|
414
414
|
};
|
|
415
415
|
requestAnimationFrame(O);
|
|
416
416
|
};
|
|
@@ -492,14 +492,14 @@ const { MODALS: P } = window, Zs = (n) => {
|
|
|
492
492
|
s.append(o);
|
|
493
493
|
}), e.children[0];
|
|
494
494
|
};
|
|
495
|
-
var _t, Ei, Dt, Ai,
|
|
495
|
+
var _t, Ei, Dt, Ai, xt, Si, kt, Li, $t, _i;
|
|
496
496
|
class Ti extends HTMLElement {
|
|
497
497
|
constructor() {
|
|
498
498
|
super();
|
|
499
499
|
p(this, _t);
|
|
500
500
|
p(this, Dt);
|
|
501
|
-
p(this, kt);
|
|
502
501
|
p(this, xt);
|
|
502
|
+
p(this, kt);
|
|
503
503
|
p(this, $t);
|
|
504
504
|
this.initialize = !1;
|
|
505
505
|
}
|
|
@@ -532,16 +532,16 @@ _t = new WeakSet(), Ei = function() {
|
|
|
532
532
|
const e = this.getAttribute(t.id) || Us();
|
|
533
533
|
this.getAttribute(t.id) || (E(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), P[e] && E(`the ${t.id} "${e}" is already be used.`), P[e] = this, d(this, Dt, Ai).call(this);
|
|
534
534
|
}, Dt = new WeakSet(), Ai = function() {
|
|
535
|
-
this.childDom = this.childNodes, this.template = Zs(this), this.innerHTML = "", this.append(this.template), d(this,
|
|
536
|
-
},
|
|
535
|
+
this.childDom = this.childNodes, this.template = Zs(this), this.innerHTML = "", this.append(this.template), d(this, xt, Si).call(this);
|
|
536
|
+
}, xt = new WeakSet(), Si = function() {
|
|
537
537
|
const t = this.querySelector(".modal-scroller");
|
|
538
538
|
this.__scroller__ = Ve(t, {
|
|
539
539
|
overflowBehavior: {
|
|
540
540
|
x: "hidden"
|
|
541
541
|
},
|
|
542
542
|
autoUpdate: !0
|
|
543
|
-
}), window.modalScroll = this.__scroller__, d(this,
|
|
544
|
-
},
|
|
543
|
+
}), window.modalScroll = this.__scroller__, d(this, kt, Li).call(this);
|
|
544
|
+
}, kt = new WeakSet(), Li = function() {
|
|
545
545
|
var a, r, l;
|
|
546
546
|
const t = this, { ATTRS: e } = j, { close: s, destroy: o } = e;
|
|
547
547
|
(a = t.querySelectorAll(`[${s}]`)) == null || a.forEach((c) => {
|
|
@@ -594,16 +594,16 @@ const { MODALS: ei } = window, bt = {}, Di = (n, i, ...t) => {
|
|
|
594
594
|
return;
|
|
595
595
|
const e = n[i];
|
|
596
596
|
e && G(e) && e.apply(n, t);
|
|
597
|
-
},
|
|
597
|
+
}, xi = (n, ...i) => {
|
|
598
598
|
n && G(n) && n.apply(V, i);
|
|
599
599
|
}, oi = (n, i) => {
|
|
600
600
|
const { target: t } = n, e = ei[t] || _(n.target);
|
|
601
|
-
e &&
|
|
602
|
-
},
|
|
601
|
+
e && ki(n, i), e || Qs(n, i);
|
|
602
|
+
}, ki = (n, i) => {
|
|
603
603
|
const { target: t, action: e, on: s, e: o } = n, a = ei[t] || _(n.target);
|
|
604
604
|
switch (["open", "close", "destroy"].forEach((l) => {
|
|
605
605
|
a.once(l, () => {
|
|
606
|
-
i && (i.emit(l, a, o), Di(i, s[l], a, o)), i ||
|
|
606
|
+
i && (i.emit(l, a, o), Di(i, s[l], a, o)), i || xi(s[l], a);
|
|
607
607
|
});
|
|
608
608
|
}), e) {
|
|
609
609
|
case "open":
|
|
@@ -625,7 +625,7 @@ const { MODALS: ei } = window, bt = {}, Di = (n, i, ...t) => {
|
|
|
625
625
|
if (!e)
|
|
626
626
|
return E("modal4", "cannot find target or data-modal-route is not defined");
|
|
627
627
|
const r = (l, ...c) => {
|
|
628
|
-
i && (i.emit(l, ...c), Di(i, o[l], ...c)), i ||
|
|
628
|
+
i && (i.emit(l, ...c), Di(i, o[l], ...c)), i || xi(o[l], ...c);
|
|
629
629
|
};
|
|
630
630
|
bt[t] || (bt[t] = !0, fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
|
|
631
631
|
const c = Ys(l), u = _(s) || _(j.SETTINGS.container);
|
|
@@ -633,7 +633,7 @@ const { MODALS: ei } = window, bt = {}, Di = (n, i, ...t) => {
|
|
|
633
633
|
u.append(g);
|
|
634
634
|
});
|
|
635
635
|
const h = ei[t] || _(n.target);
|
|
636
|
-
r("complete", h),
|
|
636
|
+
r("complete", h), ki(n, i), delete bt[t];
|
|
637
637
|
}).catch((l) => {
|
|
638
638
|
r("error", l), delete bt[t];
|
|
639
639
|
}));
|
|
@@ -1281,19 +1281,19 @@ st = new WeakSet(), je = function() {
|
|
|
1281
1281
|
var O;
|
|
1282
1282
|
const L = y.querySelectorAll("[data-overlayscrollbars-viewport]");
|
|
1283
1283
|
if (b.update(), Xi([...L]), u == "instagram") {
|
|
1284
|
-
const
|
|
1284
|
+
const x = document.querySelector("[video-template] .modal-content");
|
|
1285
1285
|
new ResizeObserver((J) => {
|
|
1286
|
-
J[0].contentRect.height > 50 &&
|
|
1287
|
-
}).observe(
|
|
1286
|
+
J[0].contentRect.height > 50 && x.classList.add("active");
|
|
1287
|
+
}).observe(x);
|
|
1288
1288
|
}
|
|
1289
1289
|
if (o == "inBox")
|
|
1290
1290
|
if (u == "instagram")
|
|
1291
1291
|
f(".video-content").remove();
|
|
1292
1292
|
else {
|
|
1293
|
-
let
|
|
1293
|
+
let x;
|
|
1294
1294
|
const F = y.querySelector(".video-content");
|
|
1295
1295
|
d(O = e, nt, ze).call(O, t.params).then((J) => {
|
|
1296
|
-
|
|
1296
|
+
x = `
|
|
1297
1297
|
<div
|
|
1298
1298
|
class="photo-box"
|
|
1299
1299
|
video-target
|
|
@@ -1315,7 +1315,7 @@ st = new WeakSet(), je = function() {
|
|
|
1315
1315
|
/>
|
|
1316
1316
|
<img src="${J || ""}" alt="" />
|
|
1317
1317
|
</picture>
|
|
1318
|
-
</div>`, F.insertAdjacentHTML(S.prepend,
|
|
1318
|
+
</div>`, F.insertAdjacentHTML(S.prepend, x);
|
|
1319
1319
|
const ii = y.querySelectorAll("[video-target]");
|
|
1320
1320
|
ii.length > 0 && new X(ii, {
|
|
1321
1321
|
LAYOUT: t.params.LAYOUT,
|
|
@@ -2363,7 +2363,12 @@ class Zi extends HTMLElement {
|
|
|
2363
2363
|
open() {
|
|
2364
2364
|
const t = this;
|
|
2365
2365
|
let e;
|
|
2366
|
-
t.getAttribute("d4-portal") == "true"
|
|
2366
|
+
if (t.getAttribute("d4-portal") == "true")
|
|
2367
|
+
Ge(), t.s.dropdownEl.parentNode !== document.body && document.body.appendChild(t.s.dropdownEl), t.__scroller__ || t.__events__.bindScrollbar(), e = t.s.dropdownEl.querySelector(".dropdown-scroller").clientHeight;
|
|
2368
|
+
else {
|
|
2369
|
+
const c = t.querySelector(".dropdown-scroller"), u = c.querySelector(".os-content"), h = parseInt(getComputedStyle(c).maxHeight) || 200;
|
|
2370
|
+
e = Math.min(u ? u.scrollHeight : c.clientHeight, h);
|
|
2371
|
+
}
|
|
2367
2372
|
const s = t.classList.contains("filter"), o = () => {
|
|
2368
2373
|
if (t.getAttribute("d4-portal") == "true") {
|
|
2369
2374
|
if (s)
|
|
@@ -2821,7 +2826,7 @@ const ci = function(n, i) {
|
|
|
2821
2826
|
return function(e) {
|
|
2822
2827
|
t && clearTimeout(t), t = setTimeout(n, 200, e);
|
|
2823
2828
|
};
|
|
2824
|
-
},
|
|
2829
|
+
}, k = (n, i) => {
|
|
2825
2830
|
if (vt(n)) {
|
|
2826
2831
|
n.forEach((t) => {
|
|
2827
2832
|
t.classList.add(i);
|
|
@@ -2945,25 +2950,25 @@ ee = new WeakSet(), os = function() {
|
|
|
2945
2950
|
});
|
|
2946
2951
|
}, lt = new WeakSet(), Xe = function() {
|
|
2947
2952
|
const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = Math.round(t.scrollLeft);
|
|
2948
|
-
e <= 0 || (
|
|
2953
|
+
e <= 0 || (k(i, "scrollable"), s == 0 ? (k(t, "start"), $(t, "end")) : s + 1 >= e ? ($(t, "start"), k(t, "end")) : (k(t, "center"), $(t, "start"), $(t, "end")));
|
|
2949
2954
|
}, U = new WeakSet(), Et = function() {
|
|
2950
2955
|
const { $wrapper: i, $button: t, $element: e } = this;
|
|
2951
2956
|
if (!t)
|
|
2952
2957
|
return;
|
|
2953
2958
|
const s = i.scrollWidth - i.clientWidth, o = i.scrollLeft;
|
|
2954
2959
|
if (s <= 0) {
|
|
2955
|
-
|
|
2960
|
+
k(t, "hide"), $(t, "active"), k(e, "noScrollable");
|
|
2956
2961
|
return;
|
|
2957
2962
|
}
|
|
2958
|
-
s > 0 && (
|
|
2963
|
+
s > 0 && (k(t, "active"), $(e, "noScrollable")), o == 0 ? t.forEach((a) => {
|
|
2959
2964
|
if (a.classList.contains("next")) {
|
|
2960
2965
|
$(a, "hide");
|
|
2961
2966
|
return;
|
|
2962
2967
|
}
|
|
2963
|
-
|
|
2968
|
+
k(a, "hide");
|
|
2964
2969
|
}) : o + 1 >= s ? t.forEach((a) => {
|
|
2965
2970
|
if (a.classList.contains("next")) {
|
|
2966
|
-
|
|
2971
|
+
k(a, "hide");
|
|
2967
2972
|
return;
|
|
2968
2973
|
}
|
|
2969
2974
|
$(a, "hide");
|
|
@@ -3000,7 +3005,7 @@ oe = new WeakSet(), cs = function() {
|
|
|
3000
3005
|
this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, ae, ds).call(this) && d(this, re, us).call(this), d(this, le, ps).call(this));
|
|
3001
3006
|
}, ae = new WeakSet(), ds = function() {
|
|
3002
3007
|
const i = this.$element.querySelector(".drag-container"), t = i.querySelector(".wrapper");
|
|
3003
|
-
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) : (
|
|
3008
|
+
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) : (k(this.$element, "noScrollable"), !1);
|
|
3004
3009
|
}, re = new WeakSet(), us = function() {
|
|
3005
3010
|
const { $element: i, $button: t } = this, e = function() {
|
|
3006
3011
|
i.classList.contains("expand") ? i.classList.remove("expand") : i.classList.add("expand");
|
|
@@ -3130,7 +3135,7 @@ ce = new WeakSet(), hs = function() {
|
|
|
3130
3135
|
d(this, dt, Ye).call(this);
|
|
3131
3136
|
};
|
|
3132
3137
|
customElements.define("multipurpose-nav", vn);
|
|
3133
|
-
var pe, vs, he, bs, pt, Je, W, Z, me, ys, ge, ws, fe, Ts, ve, Es, be, As, ye, Ss, we, Ls, Te, _s, Ee, Ds, N, R, Ae,
|
|
3138
|
+
var pe, vs, he, bs, pt, Je, W, Z, me, ys, ge, ws, fe, Ts, ve, Es, be, As, ye, Ss, we, Ls, Te, _s, Ee, Ds, N, R, Ae, xs, Se, ks, Le, $s, _e, Cs;
|
|
3134
3139
|
class fs extends HTMLElement {
|
|
3135
3140
|
// 定義組件的初始狀態
|
|
3136
3141
|
constructor(t, e) {
|
|
@@ -3192,7 +3197,7 @@ class fs extends HTMLElement {
|
|
|
3192
3197
|
e.activeTab = s, this.setAttribute("t4-active", s);
|
|
3193
3198
|
const o = d(this, W, Z).call(this, s);
|
|
3194
3199
|
e.tabPanels.forEach((a, r) => {
|
|
3195
|
-
r === o ? d(this, Se,
|
|
3200
|
+
r === o ? d(this, Se, ks).call(this, r) : d(this, Ae, xs).call(this, r);
|
|
3196
3201
|
});
|
|
3197
3202
|
}
|
|
3198
3203
|
// 外部呼叫方法 $0.goNext()
|
|
@@ -3315,7 +3320,7 @@ pe = new WeakSet(), vs = function() {
|
|
|
3315
3320
|
console.warn("請增加判斷,謝謝");
|
|
3316
3321
|
break;
|
|
3317
3322
|
}
|
|
3318
|
-
}, Ae = new WeakSet(),
|
|
3323
|
+
}, Ae = new WeakSet(), xs = function(t) {
|
|
3319
3324
|
const { t: e } = this;
|
|
3320
3325
|
this.t.transition;
|
|
3321
3326
|
const s = e.tabPanels[t];
|
|
@@ -3332,7 +3337,7 @@ pe = new WeakSet(), vs = function() {
|
|
|
3332
3337
|
s.style.display = "none";
|
|
3333
3338
|
break;
|
|
3334
3339
|
}
|
|
3335
|
-
}, Se = new WeakSet(),
|
|
3340
|
+
}, Se = new WeakSet(), ks = function(t) {
|
|
3336
3341
|
const { duration: e, timing: s, delay: o } = this.t.transition, a = this.t.tabPanels[t];
|
|
3337
3342
|
let r;
|
|
3338
3343
|
switch (a.classList.add("show"), a.classList.remove("hide"), a.style.transition = `opacity ${e}ms ${s} ${o}ms`, a.style.display = "block", this.t.display) {
|
|
@@ -3415,12 +3420,12 @@ const ui = (n) => {
|
|
|
3415
3420
|
const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e), a = o.children[0].offsetHeight;
|
|
3416
3421
|
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";
|
|
3417
3422
|
};
|
|
3418
|
-
var ht, Ze, De, Is,
|
|
3423
|
+
var ht, Ze, De, Is, xe, Ms, mt, Qe;
|
|
3419
3424
|
class wn {
|
|
3420
3425
|
constructor(i, t = {}) {
|
|
3421
3426
|
p(this, ht);
|
|
3422
3427
|
p(this, De);
|
|
3423
|
-
p(this,
|
|
3428
|
+
p(this, xe);
|
|
3424
3429
|
p(this, mt);
|
|
3425
3430
|
!ft(i) && !Ie(i) && !vt(i) && !A(i) || (this.__storage__ = {
|
|
3426
3431
|
el: i,
|
|
@@ -3440,9 +3445,9 @@ ht = new WeakSet(), Ze = function() {
|
|
|
3440
3445
|
}, De = new WeakSet(), Is = function() {
|
|
3441
3446
|
const { elements: i, options: t } = this;
|
|
3442
3447
|
i.forEach((e) => {
|
|
3443
|
-
e.collapse = {}, e.collapse.instance = this, e.collapse.defaultOptions = t, e.collapse.methods = {}, e.collapse.methods.update = this.update, e.setAttribute(this.active, ""), d(this,
|
|
3448
|
+
e.collapse = {}, e.collapse.instance = this, e.collapse.defaultOptions = t, e.collapse.methods = {}, e.collapse.methods.update = this.update, e.setAttribute(this.active, ""), d(this, xe, Ms).call(this, e);
|
|
3444
3449
|
}), this.emit("init");
|
|
3445
|
-
},
|
|
3450
|
+
}, xe = new WeakSet(), Ms = function(i) {
|
|
3446
3451
|
const { options: t } = this, { collapseClass: e, block: s, target: o, defaultOpen: a, targetStopPropagation: r, defaultActiveMark: l } = t, c = i, u = c.querySelector(o);
|
|
3447
3452
|
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, mt, Qe)), c.addEventListener("click", d(this, mt, Qe)), r) {
|
|
3448
3453
|
const h = (g) => {
|
|
@@ -3470,12 +3475,12 @@ function qs() {
|
|
|
3470
3475
|
});
|
|
3471
3476
|
}
|
|
3472
3477
|
document.addEventListener("click", qs);
|
|
3473
|
-
var gt, Ke,
|
|
3478
|
+
var gt, Ke, ke, Os, $e, Ps, Ce, Ns;
|
|
3474
3479
|
class En extends HTMLElement {
|
|
3475
3480
|
constructor() {
|
|
3476
3481
|
super();
|
|
3477
3482
|
p(this, gt);
|
|
3478
|
-
p(this,
|
|
3483
|
+
p(this, ke);
|
|
3479
3484
|
p(this, $e);
|
|
3480
3485
|
p(this, Ce);
|
|
3481
3486
|
this.initialize = !1;
|
|
@@ -3503,8 +3508,8 @@ gt = new WeakSet(), Ke = function() {
|
|
|
3503
3508
|
hover: this.getAttribute("r4-hover") ? e(this.getAttribute("r4-hover")) : t.hover,
|
|
3504
3509
|
click: this.getAttribute("r4-hover-click") ? e(this.getAttribute("r4-hover-click")) : t.click
|
|
3505
3510
|
};
|
|
3506
|
-
this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this,
|
|
3507
|
-
},
|
|
3511
|
+
this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this, ke, Os).call(this);
|
|
3512
|
+
}, ke = new WeakSet(), Os = function() {
|
|
3508
3513
|
d(this, $e, Ps).call(this), d(this, Ce, Ns).call(this), this.classList.add("r4-initialize");
|
|
3509
3514
|
}, $e = new WeakSet(), Ps = function() {
|
|
3510
3515
|
const t = this, e = document.createElement("i");
|
|
@@ -3646,18 +3651,18 @@ function Dn(n, i) {
|
|
|
3646
3651
|
const t = Math.pow(10, i);
|
|
3647
3652
|
return Math.round(n * t) / t;
|
|
3648
3653
|
}
|
|
3649
|
-
function
|
|
3654
|
+
function xn(n, i) {
|
|
3650
3655
|
let t = n.size / 1024 / 1024;
|
|
3651
3656
|
return `${Dn(t, 2)}` <= i;
|
|
3652
3657
|
}
|
|
3653
|
-
function
|
|
3658
|
+
function kn(n, i, t) {
|
|
3654
3659
|
if (n.target.files.length <= 0)
|
|
3655
3660
|
return;
|
|
3656
3661
|
const e = n.target.files[0], s = i.closest("[data-upload-item]");
|
|
3657
3662
|
let o = new FileReader();
|
|
3658
3663
|
o.onload = (a) => {
|
|
3659
3664
|
const r = e.type.split("/")[0] === "image" ? a.target.result : null;
|
|
3660
|
-
if (t.params.sizeLimit && !
|
|
3665
|
+
if (t.params.sizeLimit && !xn(e, t.params.sizeLimit)) {
|
|
3661
3666
|
i.value = "", s.classList.add("over-limit"), t.params.on.overLimit && typeof t.params.on.overLimit == "function" && t.params.on.overLimit(i, t.params.sizeLimit);
|
|
3662
3667
|
return;
|
|
3663
3668
|
} else
|
|
@@ -3699,7 +3704,7 @@ class $n {
|
|
|
3699
3704
|
}
|
|
3700
3705
|
};
|
|
3701
3706
|
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) {
|
|
3702
|
-
|
|
3707
|
+
kn(a, e, i);
|
|
3703
3708
|
});
|
|
3704
3709
|
}));
|
|
3705
3710
|
}
|