ViewFinity
There is a monitor with an image editing program and 'ViewFinity the
monitor for designers' message overlays on it. And then it turns into
two other monitors with a message of 'professionals'. One of them is
rotating vertically. And then, an ultrawide monitor with a video editing
program appears with 'creators' message. Lastly, three monitors on
platforms appear with 'Expand Your Creative Realm' message above them.
Realistic colour for your work
Realistic colour for your work
Experience a monitor with exceptional colour accuracy, suitable
for photo editing and graphic design. See real-life colors
come to life on your screen.
Learn more
Versatile screens to suit your needs
Versatile screens to suit your needs
Unlock your creative potential with the versatile ViewFinity
monitor lineup. Available in a range of sizes and resolutions,
it’s the perfect choice for video editing and other creative
tasks that demand clarity and precision.
Learn more
Ergonomic comfort for
your setup
Ergonomic comfort for your setup
Elevate your productivity with the ergonomic design of
ViewFinity. Built for maximum comfort and equipped with
multiple connectivity options, the ViewFinity series offers a
computer monitor for editing photos that fits your
environment.
Learn more
Unmatched Colour Accuracy
Stop automatic slide show
Wide colour gamut up to sRGB
115%
The ViewFinity series covers 99% to 115% of sRGB for vibrant,
accurate colours.1
Additionally, the S9(S90PC) model achieves 99% of the DCI-P3
standard, delivering richer, more vibrant colours with
exceptional precision and accuracy.
Pantone Validated
colours
With Pantone Validated and Pantone SkinTone Validated
certifications, the ViewFinity series accurately reproduces
Pantone Matching System (PMS) colours, ensuring reliable and
precise colour accuracy.2
Move to the left of the split screen border
Move to the right of the split screen border
interactive single feature, horizontal slide
Brilliance with HDR and 1 billion
colours
The ViewFinity series, compliant with HDR standards like HDR 10,
VESA HDR400, and VESA HDR600, delivers exceptional colour
accuracy.3 4
Experience over 1 billion colours on high-resolution monitors
ranging from QHD to 5K.
Previous
Next
Find your ideal size and resolution
Discover stunning clarity with high-resolution monitors ranging from
QHD to 5K. Choose from a variety of
aspect ratios of 16:9, 21:9, and 32:9, and sizes designed to support
productivity and comfort across different task.
Previous
Next
Convenience Meets Versatility
A ViewFinity monitor is being assembled without any tools,
thanks to the Easy Setup Stand.
Easy Setup Stand5
Effortless installation with the Easy Setup Stand. No tools or
screws needed—setup is simple right out of the box and offers
flexible viewing options at the push of a button.
Ergonomic Design
A ViewFinity monitor is rotating vertically, and tilting, and
moving back to horizontal mode. And its height is being
adjusted.
Experience maximum comfort with an ergonomic monitor, which
features a height-adjustable stand with pivot, swivel, and tilt
options to perfectly match your preference.6
A ViewFinity monitor is being assembled without any tools,
thanks to the Easy Setup Stand.
Previous
Next
Easy Setup Stand5
Effortless installation with the Easy Setup Stand. No tools or
screws needed—setup is simple right out of the box and offers
flexible viewing options at the push of a button.
A ViewFinity monitor is rotating vertically, and tilting, and
moving back to horizontal mode. And its height is being
adjusted.
Previous
Next
Ergonomic Design
Experience maximum comfort with an ergonomic monitor, which
features a height-adjustable stand with pivot, swivel, and tilt
options to perfectly match your preference.6
Choose your perfect ViewFinity
All
S9 series
S8 series
S7 series
S6 series
S5 series
Lineup
Screen Size
Resolution
Aspect Ratio
Flat/ Curved
Panel Type
Colour Coverage
Open Tooltip Layer
A widely used color space designed for standard
displays, sRGB (standard red, green, blue) offers
accurate color reproduction in web and digital
content. DCI-P3 provides a broader color space defined
by the Digital Cinema Initiative, especially for red
and green hues, to enhance vibrancy in film,
photography, and high-end displays.
Close Tooltip Layer
Colour Support
Open Tooltip Layer
Advanced color support delivers more shades of color
with greater accuracy, allowing for ultra-smooth color
gradients and lifelike images with more precise color
transitions that are ideal for photo, video, and
graphics applications.
Close Tooltip Layer
HDR
Open Tooltip Layer
HDR enhances display quality by expanding contrast and
color depth, making bright areas brighter, dark areas
darker, and colors more vibrant.
Close Tooltip Layer
Brightness
Smart Calibration
Open Tooltip Layer
Smart Calibration delivers a screen that can be easily
calibrated using a smartphone and customized for
unique experiences. When using Professional Mode,
choose between DCI-P3 or sRGB colour palettes and set
your preferences, colour temperature, luminance, and
gamma settings with ease.
Close Tooltip Layer
KVM Switch
Open Tooltip Layer
A KVM Switch (keyboard, video, mouse switch) allows users
to control multiple computers with a single set of
keyboard, video display, and mouse. This feature
streamlines setups by enabling seamless switching between
connected devices, making multitasking efficient and
reducing clutter.
Close Tooltip Layer
Speaker
Camera
"
);
return (
e.attr("data-swiper-slide-index") ||
e.attr("data-swiper-slide-index", t),
s.cache && (i.virtual.cache[t] = e),
e
);
},
appendSlide: function (e) {
if ("object" == typeof e && "length" in e)
for (var t = 0; t < e.length; t += 1)
e[t] && this.virtual.slides.push(e[t]);
else this.virtual.slides.push(e);
this.virtual.update(!0);
},
prependSlide: function (e) {
var s,
a,
t = this,
i = t.activeIndex,
n = i + 1,
o = 1;
if (Array.isArray(e)) {
for (var r = 0; r < e.length; r += 1)
e[r] && t.virtual.slides.unshift(e[r]);
(n = i + e.length), (o = e.length);
} else t.virtual.slides.unshift(e);
t.params.virtual.cache &&
((s = t.virtual.cache),
(a = {}),
Object.keys(s).forEach(function (e) {
var t = s[e],
i = t.attr("data-swiper-slide-index");
i && t.attr("data-swiper-slide-index", parseInt(i, 10) + 1),
(a[parseInt(e, 10) + o] = t);
}),
(t.virtual.cache = a)),
t.virtual.update(!0),
t.slideTo(n, 0);
},
removeSlide: function (e) {
var t = this;
if (null != e) {
var i = t.activeIndex;
if (Array.isArray(e))
for (var s = e.length - 1; 0 <= s; --s)
t.virtual.slides.splice(e[s], 1),
t.params.virtual.cache && delete t.virtual.cache[e[s]],
e[s] < i && --i,
(i = Math.max(i, 0));
else
t.virtual.slides.splice(e, 1),
t.params.virtual.cache && delete t.virtual.cache[e],
e < i && --i,
(i = Math.max(i, 0));
t.virtual.update(!0), t.slideTo(i, 0);
}
},
removeAllSlides: function () {
var e = this;
(e.virtual.slides = []),
e.params.virtual.cache && (e.virtual.cache = {}),
e.virtual.update(!0),
e.slideTo(0, 0);
},
},
E = {
name: "virtual",
params: {
virtual: {
enabled: !1,
slides: [],
cache: !0,
renderSlide: null,
renderExternal: null,
addSlidesBefore: 0,
addSlidesAfter: 0,
},
},
create: function () {
var e = this;
K.extend(e, {
virtual: {
update: b.update.bind(e),
appendSlide: b.appendSlide.bind(e),
prependSlide: b.prependSlide.bind(e),
removeSlide: b.removeSlide.bind(e),
removeAllSlides: b.removeAllSlides.bind(e),
renderSlide: b.renderSlide.bind(e),
slides: e.params.virtual.slides,
cache: {},
},
});
},
on: {
beforeInit: function () {
var e,
t = this;
t.params.virtual.enabled &&
(t.classNames.push(t.params.containerModifierClass + "virtual"),
K.extend(t.params, (e = { watchSlidesProgress: !0 })),
K.extend(t.originalParams, e),
t.params.initialSlide || t.virtual.update());
},
setTranslate: function () {
this.params.virtual.enabled && this.virtual.update();
},
},
},
j = {
handle: function (e) {
var t = this,
i = t.rtlTranslate,
s =
(e = e.originalEvent ? e.originalEvent : e).keyCode ||
e.charCode;
if (
!t.allowSlideNext &&
((t.isHorizontal() && 39 === s) ||
(t.isVertical() && 40 === s) ||
34 === s)
)
return !1;
if (
!t.allowSlidePrev &&
((t.isHorizontal() && 37 === s) ||
(t.isVertical() && 38 === s) ||
33 === s)
)
return !1;
if (
!(
e.shiftKey ||
e.altKey ||
e.ctrlKey ||
e.metaKey ||
(h.activeElement &&
h.activeElement.nodeName &&
("input" === h.activeElement.nodeName.toLowerCase() ||
"textarea" === h.activeElement.nodeName.toLowerCase()))
)
) {
if (
t.params.keyboard.onlyInViewport &&
(33 === s ||
34 === s ||
37 === s ||
39 === s ||
38 === s ||
40 === s)
) {
var a = !1;
if (
0 < t.$el.parents("." + t.params.slideClass).length &&
0 === t.$el.parents("." + t.params.slideActiveClass).length
)
return;
for (
var n = U.innerWidth,
o = U.innerHeight,
r = t.$el.offset(),
l =
(i && (r.left -= t.$el[0].scrollLeft),
[
[r.left, r.top],
[r.left + t.width, r.top],
[r.left, r.top + t.height],
[r.left + t.width, r.top + t.height],
]),
d = 0;
d < l.length;
d += 1
) {
var c = l[d];
0 <= c[0] && c[0] <= n && 0 <= c[1] && c[1] <= o && (a = !0);
}
if (!a) return;
}
t.isHorizontal()
? ((33 !== s && 34 !== s && 37 !== s && 39 !== s) ||
(e.preventDefault
? e.preventDefault()
: (e.returnValue = !1)),
(((34 !== s && 39 !== s) || i) &&
((33 !== s && 37 !== s) || !i)) ||
t.slideNext(),
(((33 !== s && 37 !== s) || i) &&
((34 !== s && 39 !== s) || !i)) ||
t.slidePrev())
: ((33 !== s && 34 !== s && 38 !== s && 40 !== s) ||
(e.preventDefault
? e.preventDefault()
: (e.returnValue = !1)),
(34 !== s && 40 !== s) || t.slideNext(),
(33 !== s && 38 !== s) || t.slidePrev()),
t.emit("keyPress", s);
}
},
enable: function () {
this.keyboard.enabled ||
(T(h).on("keydown", this.keyboard.handle),
(this.keyboard.enabled = !0));
},
disable: function () {
this.keyboard.enabled &&
(T(h).off("keydown", this.keyboard.handle),
(this.keyboard.enabled = !1));
},
},
S = {
name: "keyboard",
params: { keyboard: { enabled: !1, onlyInViewport: !0 } },
create: function () {
K.extend(this, {
keyboard: {
enabled: !1,
enable: j.enable.bind(this),
disable: j.disable.bind(this),
handle: j.handle.bind(this),
},
});
},
on: {
init: function () {
this.params.keyboard.enabled && this.keyboard.enable();
},
destroy: function () {
this.keyboard.enabled && this.keyboard.disable();
},
},
};
var x = {
lastScrollTime: K.now(),
lastEventBeforeSnap: void 0,
recentWheelEvents: [],
event: function () {
return -1 < U.navigator.userAgent.indexOf("firefox")
? "DOMMouseScroll"
: ((i = (t = "onwheel") in h) ||
((e = h.createElement("div")).setAttribute(t, "return;"),
(i = "function" == typeof e[t])),
(i =
!i &&
h.implementation &&
h.implementation.hasFeature &&
!0 !== h.implementation.hasFeature("", "")
? h.implementation.hasFeature("Events.wheel", "3.0")
: i)
? "wheel"
: "mousewheel");
var e, t, i;
},
normalize: function (e) {
var t = 0,
i = 0,
s = 0,
a = 0;
return (
"detail" in e && (i = e.detail),
"wheelDelta" in e && (i = -e.wheelDelta / 120),
"wheelDeltaY" in e && (i = -e.wheelDeltaY / 120),
"wheelDeltaX" in e && (t = -e.wheelDeltaX / 120),
"axis" in e && e.axis === e.HORIZONTAL_AXIS && ((t = i), (i = 0)),
(s = 10 * t),
(a = 10 * i),
"deltaY" in e && (a = e.deltaY),
"deltaX" in e && (s = e.deltaX),
e.shiftKey && !s && ((s = a), (a = 0)),
(s || a) &&
e.deltaMode &&
(1 === e.deltaMode
? ((s *= 40), (a *= 40))
: ((s *= 800), (a *= 800))),
{
spinX: (t = s && !t ? (s < 1 ? -1 : 1) : t),
spinY: (i = a && !i ? (a < 1 ? -1 : 1) : i),
pixelX: s,
pixelY: a,
}
);
},
handleMouseEnter: function () {
this.mouseEntered = !0;
},
handleMouseLeave: function () {
this.mouseEntered = !1;
},
handle: function (e) {
var t = e,
i = this,
s = i.params.mousewheel;
if (
(i.params.cssMode && t.preventDefault(),
!i.mouseEntered && !s.releaseOnEdges)
)
return !0;
t.originalEvent && (t = t.originalEvent);
var a = 0,
n = i.rtlTranslate ? -1 : 1,
o = x.normalize(t);
if (s.forceToAxis)
if (i.isHorizontal()) {
if (!(Math.abs(o.pixelX) > Math.abs(o.pixelY))) return !0;
a = o.pixelX * n;
} else {
if (!(Math.abs(o.pixelY) > Math.abs(o.pixelX))) return !0;
a = o.pixelY;
}
else
a =
Math.abs(o.pixelX) > Math.abs(o.pixelY)
? -o.pixelX * n
: -o.pixelY;
if (0 === a) return !0;
if ((s.invert && (a = -a), i.params.freeMode)) {
var r = {
time: K.now(),
delta: Math.abs(a),
direction: Math.sign(a),
},
n = i.mousewheel.lastEventBeforeSnap,
o =
n &&
r.time < n.time + 500 &&
r.delta <= n.delta &&
r.direction === n.direction;
if (!o) {
(i.mousewheel.lastEventBeforeSnap = void 0),
i.params.loop && i.loopFix();
var l,
d,
n = i.getTranslate() + a * s.sensitivity,
s = i.isBeginning,
c = i.isEnd;
if (
((n = n >= i.minTranslate() ? i.minTranslate() : n) <=
i.maxTranslate() && (n = i.maxTranslate()),
i.setTransition(0),
i.setTranslate(n),
i.updateProgress(),
i.updateActiveIndex(),
i.updateSlidesClasses(),
((!s && i.isBeginning) || (!c && i.isEnd)) &&
i.updateSlidesClasses(),
i.params.freeModeSticky &&
(clearTimeout(i.mousewheel.timeout),
(i.mousewheel.timeout = void 0),
15 <= (l = i.mousewheel.recentWheelEvents).length &&
l.shift(),
(s = l.length ? l[l.length - 1] : void 0),
(c = l[0]),
l.push(r),
s && (r.delta > s.delta || r.direction !== s.direction)
? l.splice(0)
: 15 <= l.length &&
r.time - c.time < 500 &&
1 <= c.delta - r.delta &&
r.delta <= 6 &&
((d = 0 < a ? 0.8 : 0.2),
(i.mousewheel.lastEventBeforeSnap = r),
l.splice(0),
(i.mousewheel.timeout = K.nextTick(function () {
i.slideToClosest(i.params.speed, !0, void 0, d);
}, 0))),
i.mousewheel.timeout ||
(i.mousewheel.timeout = K.nextTick(function () {
(i.mousewheel.lastEventBeforeSnap = r),
l.splice(0),
i.slideToClosest(i.params.speed, !0, void 0, 0.5);
}, 500))),
o || i.emit("scroll", t),
i.params.autoplay &&
i.params.autoplayDisableOnInteraction &&
i.autoplay.stop(),
n === i.minTranslate() || n === i.maxTranslate())
)
return !0;
}
} else {
(s = {
time: K.now(),
delta: Math.abs(a),
direction: Math.sign(a),
raw: e,
}),
(c = i.mousewheel.recentWheelEvents),
(o =
(2 <= c.length && c.shift(),
c.length ? c[c.length - 1] : void 0));
if (
(c.push(s),
(!o || s.direction !== o.direction || s.delta > o.delta) &&
i.mousewheel.animateSlider(s),
i.mousewheel.releaseScroll(s))
)
return !0;
}
return (
t.preventDefault ? t.preventDefault() : (t.returnValue = !1), !1
);
},
animateSlider: function (e) {
var t = this;
return (
(6 <= e.delta && K.now() - t.mousewheel.lastScrollTime < 60) ||
(e.direction < 0
? (t.isEnd && !t.params.loop) ||
t.animating ||
(t.slideNext(), t.emit("scroll", e.raw))
: (t.isBeginning && !t.params.loop) ||
t.animating ||
(t.slidePrev(), t.emit("scroll", e.raw)),
(t.mousewheel.lastScrollTime = new U.Date().getTime()),
!1)
);
},
releaseScroll: function (e) {
var t = this,
i = t.params.mousewheel;
if (e.direction < 0) {
if (t.isEnd && !t.params.loop && i.releaseOnEdges) return !0;
} else if (t.isBeginning && !t.params.loop && i.releaseOnEdges)
return !0;
return !1;
},
enable: function () {
var e = this,
t = x.event();
if (e.params.cssMode)
return (
e.wrapperEl.removeEventListener(t, e.mousewheel.handle), !0
);
if (!t) return !1;
if (e.mousewheel.enabled) return !1;
var i = e.$el;
return (
(i =
"container" !== e.params.mousewheel.eventsTarged
? T(e.params.mousewheel.eventsTarged)
: i).on("mouseenter", e.mousewheel.handleMouseEnter),
i.on("mouseleave", e.mousewheel.handleMouseLeave),
i.on(t, e.mousewheel.handle),
(e.mousewheel.enabled = !0)
);
},
disable: function () {
var e = this,
t = x.event();
if (e.params.cssMode)
return e.wrapperEl.addEventListener(t, e.mousewheel.handle), !0;
if (!t) return !1;
if (!e.mousewheel.enabled) return !1;
var i = e.$el;
return (
(i =
"container" !== e.params.mousewheel.eventsTarged
? T(e.params.mousewheel.eventsTarged)
: i).off(t, e.mousewheel.handle),
!(e.mousewheel.enabled = !1)
);
},
},
L = {
update: function () {
var e,
t,
i = this,
s = i.params.navigation;
i.params.loop ||
((e = (t = i.navigation).$nextEl),
(t = t.$prevEl) &&
0 < t.length &&
(i.isBeginning
? t.addClass(s.disabledClass)
: t.removeClass(s.disabledClass),
t[
i.params.watchOverflow && i.isLocked
? "addClass"
: "removeClass"
](s.lockClass)),
e &&
0 < e.length &&
(i.isEnd
? e.addClass(s.disabledClass)
: e.removeClass(s.disabledClass),
e[
i.params.watchOverflow && i.isLocked
? "addClass"
: "removeClass"
](s.lockClass)));
},
onPrevClick: function (e) {
e.preventDefault(),
(this.isBeginning && !this.params.loop) || this.slidePrev();
},
onNextClick: function (e) {
e.preventDefault(),
(this.isEnd && !this.params.loop) || this.slideNext();
},
init: function () {
var e,
t,
i = this,
s = i.params.navigation;
(s.nextEl || s.prevEl) &&
(s.nextEl &&
((e = T(s.nextEl)),
i.params.uniqueNavElements &&
"string" == typeof s.nextEl &&
1 < e.length &&
1 === i.$el.find(s.nextEl).length &&
(e = i.$el.find(s.nextEl))),
s.prevEl &&
((t = T(s.prevEl)),
i.params.uniqueNavElements &&
"string" == typeof s.prevEl &&
1 < t.length &&
1 === i.$el.find(s.prevEl).length &&
(t = i.$el.find(s.prevEl))),
e && 0 < e.length && e.on("click", i.navigation.onNextClick),
t && 0 < t.length && t.on("click", i.navigation.onPrevClick),
K.extend(i.navigation, {
$nextEl: e,
nextEl: e && e[0],
$prevEl: t,
prevEl: t && t[0],
}));
},
destroy: function () {
var e = this,
t = e.navigation,
i = t.$nextEl,
t = t.$prevEl;
i &&
i.length &&
(i.off("click", e.navigation.onNextClick),
i.removeClass(e.params.navigation.disabledClass)),
t &&
t.length &&
(t.off("click", e.navigation.onPrevClick),
t.removeClass(e.params.navigation.disabledClass));
},
},
k = {
update: function () {
var e = this,
t = e.rtl,
s = e.params.pagination;
if (
s.el &&
e.pagination.el &&
e.pagination.$el &&
0 !== e.pagination.$el.length
) {
var a,
i = (e.virtual && e.params.virtual.enabled ? e.virtual : e)
.slides.length,
n = e.pagination.$el,
o = e.params.loop
? Math.ceil(
(i - 2 * e.loopedSlides) / e.params.slidesPerGroup
)
: e.snapGrid.length;
if (
(e.params.loop
? ((a = Math.ceil(
(e.activeIndex - e.loopedSlides) / e.params.slidesPerGroup
)) >
i - 1 - 2 * e.loopedSlides &&
(a -= i - 2 * e.loopedSlides),
o - 1 < a && (a -= o),
a < 0 &&
"bullets" !== e.params.paginationType &&
(a = o + a))
: (a =
void 0 !== e.snapIndex
? e.snapIndex
: e.activeIndex || 0),
"bullets" === s.type &&
e.pagination.bullets &&
0 < e.pagination.bullets.length)
) {
var r,
l,
d,
c = e.pagination.bullets;
if (
(s.dynamicBullets &&
((e.pagination.bulletSize = c
.eq(0)
[e.isHorizontal() ? "outerWidth" : "outerHeight"](!0)),
n.css(
e.isHorizontal() ? "width" : "height",
e.pagination.bulletSize * (s.dynamicMainBullets + 4) +
"px"
),
1 < s.dynamicMainBullets &&
void 0 !== e.previousIndex &&
((e.pagination.dynamicBulletIndex += a - e.previousIndex),
e.pagination.dynamicBulletIndex > s.dynamicMainBullets - 1
? (e.pagination.dynamicBulletIndex =
s.dynamicMainBullets - 1)
: e.pagination.dynamicBulletIndex < 0 &&
(e.pagination.dynamicBulletIndex = 0)),
(r = a - e.pagination.dynamicBulletIndex),
(d =
((l =
r + (Math.min(c.length, s.dynamicMainBullets) - 1)) +
r) /
2)),
c.removeClass(
s.bulletActiveClass +
" " +
s.bulletActiveClass +
"-next " +
s.bulletActiveClass +
"-next-next " +
s.bulletActiveClass +
"-prev " +
s.bulletActiveClass +
"-prev-prev " +
s.bulletActiveClass +
"-main"
),
1 < n.length)
)
c.each(function (e, t) {
var t = T(t),
i = t.index();
i === a && t.addClass(s.bulletActiveClass),
s.dynamicBullets &&
(r <= i &&
i <= l &&
t.addClass(s.bulletActiveClass + "-main"),
i === r &&
t
.prev()
.addClass(s.bulletActiveClass + "-prev")
.prev()
.addClass(s.bulletActiveClass + "-prev-prev"),
i === l &&
t
.next()
.addClass(s.bulletActiveClass + "-next")
.next()
.addClass(s.bulletActiveClass + "-next-next"));
});
else {
var i = c.eq(a),
h = i.index();
if ((i.addClass(s.bulletActiveClass), s.dynamicBullets)) {
for (var i = c.eq(r), u = c.eq(l), p = r; p <= l; p += 1)
c.eq(p).addClass(s.bulletActiveClass + "-main");
if (e.params.loop)
if (h >= c.length - s.dynamicMainBullets) {
for (var m = s.dynamicMainBullets; 0 <= m; --m)
c.eq(c.length - m).addClass(
s.bulletActiveClass + "-main"
);
c.eq(c.length - s.dynamicMainBullets - 1).addClass(
s.bulletActiveClass + "-prev"
);
} else
i
.prev()
.addClass(s.bulletActiveClass + "-prev")
.prev()
.addClass(s.bulletActiveClass + "-prev-prev"),
u
.next()
.addClass(s.bulletActiveClass + "-next")
.next()
.addClass(s.bulletActiveClass + "-next-next");
else
i
.prev()
.addClass(s.bulletActiveClass + "-prev")
.prev()
.addClass(s.bulletActiveClass + "-prev-prev"),
u
.next()
.addClass(s.bulletActiveClass + "-next")
.next()
.addClass(s.bulletActiveClass + "-next-next");
}
}
s.dynamicBullets &&
((h = Math.min(c.length, s.dynamicMainBullets + 4)),
(i =
(e.pagination.bulletSize * h - e.pagination.bulletSize) /
2 -
d * e.pagination.bulletSize),
(u = t ? "right" : "left"),
c.css(e.isHorizontal() ? u : "top", i + "px"));
}
"fraction" === s.type &&
(n
.find("." + s.currentClass)
.text(s.formatFractionCurrent(a + 1)),
n.find("." + s.totalClass).text(s.formatFractionTotal(o))),
"progressbar" === s.type &&
((h = s.progressbarOpposite
? e.isHorizontal()
? "vertical"
: "horizontal"
: e.isHorizontal()
? "horizontal"
: "vertical"),
(d = (a + 1) / o),
(u = t = 1),
"horizontal" === h ? (t = d) : (u = d),
n
.find("." + s.progressbarFillClass)
.transform(
"translate3d(0,0,0) scaleX(" + t + ") scaleY(" + u + ")"
)
.transition(e.params.speed)),
"custom" === s.type && s.renderCustom
? (n.html(s.renderCustom(e, a + 1, o)),
e.emit("paginationRender", e, n[0]))
: e.emit("paginationUpdate", e, n[0]),
n[
e.params.watchOverflow && e.isLocked
? "addClass"
: "removeClass"
](s.lockClass);
}
},
render: function () {
var e = this,
t = e.params.pagination;
if (
t.el &&
e.pagination.el &&
e.pagination.$el &&
0 !== e.pagination.$el.length
) {
var i = (e.virtual && e.params.virtual.enabled ? e.virtual : e)
.slides.length,
s = e.pagination.$el,
a = "";
if ("bullets" === t.type) {
for (
var n = e.params.loop
? Math.ceil(
(i - 2 * e.loopedSlides) / e.params.slidesPerGroup
)
: e.snapGrid.length,
o = 0;
o < n;
o += 1
)
t.renderBullet
? (a += t.renderBullet.call(e, o, t.bulletClass))
: (a +=
"<" +
t.bulletElement +
' class="' +
t.bulletClass +
'">' +
t.bulletElement +
">");
s.html(a), (e.pagination.bullets = s.find("." + t.bulletClass));
}
"fraction" === t.type &&
((a = t.renderFraction
? t.renderFraction.call(e, t.currentClass, t.totalClass)
: '
/
'),
s.html(a)),
"progressbar" === t.type &&
((a = t.renderProgressbar
? t.renderProgressbar.call(e, t.progressbarFillClass)
: '
'),
s.html(a)),
"custom" !== t.type &&
e.emit("paginationRender", e.pagination.$el[0]);
}
},
init: function () {
var e,
t = this,
i = t.params.pagination;
!i.el ||
(0 !== (e = T(i.el)).length &&
(t.params.uniqueNavElements &&
"string" == typeof i.el &&
1 < e.length &&
1 === t.$el.find(i.el).length &&
(e = t.$el.find(i.el)),
"bullets" === i.type &&
i.clickable &&
e.addClass(i.clickableClass),
e.addClass(i.modifierClass + i.type),
"bullets" === i.type &&
i.dynamicBullets &&
(e.addClass("" + i.modifierClass + i.type + "-dynamic"),
(t.pagination.dynamicBulletIndex = 0),
i.dynamicMainBullets < 1 && (i.dynamicMainBullets = 1)),
"progressbar" === i.type &&
i.progressbarOpposite &&
e.addClass(i.progressbarOppositeClass),
i.clickable &&
e.on("click", "." + i.bulletClass, function (e) {
e.preventDefault();
e = T(this).index() * t.params.slidesPerGroup;
t.params.loop && (e += t.loopedSlides), t.slideTo(e);
}),
K.extend(t.pagination, { $el: e, el: e[0] })));
},
destroy: function () {
var e,
t = this,
i = t.params.pagination;
i.el &&
t.pagination.el &&
t.pagination.$el &&
0 !== t.pagination.$el.length &&
((e = t.pagination.$el).removeClass(i.hiddenClass),
e.removeClass(i.modifierClass + i.type),
t.pagination.bullets &&
t.pagination.bullets.removeClass(i.bulletActiveClass),
i.clickable && e.off("click", "." + i.bulletClass));
},
},
I = {
setTranslate: function () {
var e,
t,
i,
s,
a,
n,
o,
r,
l = this;
l.params.scrollbar.el &&
l.scrollbar.el &&
((n = l.scrollbar),
(e = l.rtlTranslate),
(r = l.progress),
(t = n.dragSize),
(i = n.trackSize),
(s = n.$dragEl),
(a = n.$el),
(n = l.params.scrollbar),
(r = (i - (o = t)) * r),
e
? 0 < (r = -r)
? ((o = t - r), (r = 0))
: i < -r + t && (o = i + r)
: r < 0
? ((o = t + r), (r = 0))
: i < r + t && (o = i - r),
l.isHorizontal()
? (s.transform("translate3d(" + r + "px, 0, 0)"),
(s[0].style.width = o + "px"))
: (s.transform("translate3d(0px, " + r + "px, 0)"),
(s[0].style.height = o + "px")),
n.hide &&
(clearTimeout(l.scrollbar.timeout),
(a[0].style.opacity = 1),
(l.scrollbar.timeout = setTimeout(function () {
(a[0].style.opacity = 0), a.transition(400);
}, 1e3))));
},
setTransition: function (e) {
this.params.scrollbar.el &&
this.scrollbar.el &&
this.scrollbar.$dragEl.transition(e);
},
updateSize: function () {
var e,
t,
i,
s,
a,
n,
o,
r = this;
r.params.scrollbar.el &&
r.scrollbar.el &&
((t = (e = r.scrollbar).$dragEl),
(i = e.$el),
(t[0].style.width = ""),
(t[0].style.height = ""),
(s = r.isHorizontal() ? i[0].offsetWidth : i[0].offsetHeight),
(n = (a = r.size / r.virtualSize) * (s / r.size)),
(o =
"auto" === r.params.scrollbar.dragSize
? s * a
: parseInt(r.params.scrollbar.dragSize, 10)),
r.isHorizontal()
? (t[0].style.width = o + "px")
: (t[0].style.height = o + "px"),
(i[0].style.display = 1 <= a ? "none" : ""),
r.params.scrollbar.hide && (i[0].style.opacity = 0),
K.extend(e, {
trackSize: s,
divider: a,
moveDivider: n,
dragSize: o,
}),
e.$el[
r.params.watchOverflow && r.isLocked
? "addClass"
: "removeClass"
](r.params.scrollbar.lockClass));
},
getPointerPosition: function (e) {
return this.isHorizontal()
? ("touchstart" === e.type || "touchmove" === e.type
? e.targetTouches[0]
: e
).clientX
: ("touchstart" === e.type || "touchmove" === e.type
? e.targetTouches[0]
: e
).clientY;
},
setDragPosition: function (e) {
var t = this,
i = t.scrollbar,
s = t.rtlTranslate,
a = i.$el,
n = i.dragSize,
o = i.trackSize,
r = i.dragStartPos,
i =
(i.getPointerPosition(e) -
a.offset()[t.isHorizontal() ? "left" : "top"] -
(null !== r ? r : n / 2)) /
(o - n),
e =
((i = Math.max(Math.min(i, 1), 0)),
s && (i = 1 - i),
t.minTranslate() + (t.maxTranslate() - t.minTranslate()) * i);
t.updateProgress(e),
t.setTranslate(e),
t.updateActiveIndex(),
t.updateSlidesClasses();
},
onDragStart: function (e) {
var t = this,
i = t.params.scrollbar,
s = t.scrollbar,
a = t.$wrapperEl,
n = s.$el,
o = s.$dragEl;
(t.scrollbar.isTouched = !0),
(t.scrollbar.dragStartPos =
e.target === o[0] || e.target === o
? s.getPointerPosition(e) -
e.target.getBoundingClientRect()[
t.isHorizontal() ? "left" : "top"
]
: null),
e.preventDefault(),
e.stopPropagation(),
a.transition(100),
o.transition(100),
s.setDragPosition(e),
clearTimeout(t.scrollbar.dragTimeout),
n.transition(0),
i.hide && n.css("opacity", 1),
t.params.cssMode && t.$wrapperEl.css("scroll-snap-type", "none"),
t.emit("scrollbarDragStart", e);
},
onDragMove: function (e) {
var t = this.scrollbar,
i = this.$wrapperEl,
s = t.$el,
a = t.$dragEl;
this.scrollbar.isTouched &&
(e.preventDefault ? e.preventDefault() : (e.returnValue = !1),
t.setDragPosition(e),
i.transition(0),
s.transition(0),
a.transition(0),
this.emit("scrollbarDragMove", e));
},
onDragEnd: function (e) {
var t = this,
i = t.params.scrollbar,
s = t.scrollbar,
a = t.$wrapperEl,
n = s.$el;
t.scrollbar.isTouched &&
((t.scrollbar.isTouched = !1),
t.params.cssMode &&
(t.$wrapperEl.css("scroll-snap-type", ""), a.transition("")),
i.hide &&
(clearTimeout(t.scrollbar.dragTimeout),
(t.scrollbar.dragTimeout = K.nextTick(function () {
n.css("opacity", 0), n.transition(400);
}, 1e3))),
t.emit("scrollbarDragEnd", e),
i.snapOnRelease && t.slideToClosest());
},
enableDraggable: function () {
var e,
t,
i,
s,
a,
n = this;
n.params.scrollbar.el &&
((i = n.scrollbar),
(e = n.touchEventsTouch),
(t = n.touchEventsDesktop),
(a = n.params),
(i = i.$el[0]),
(s = !(!y.passiveListener || !a.passiveListeners) && {
passive: !1,
capture: !1,
}),
(a = !(!y.passiveListener || !a.passiveListeners) && {
passive: !0,
capture: !1,
}),
y.touch
? (i.addEventListener(e.start, n.scrollbar.onDragStart, s),
i.addEventListener(e.move, n.scrollbar.onDragMove, s),
i.addEventListener(e.end, n.scrollbar.onDragEnd, a))
: (i.addEventListener(t.start, n.scrollbar.onDragStart, s),
h.addEventListener(t.move, n.scrollbar.onDragMove, s),
h.addEventListener(t.end, n.scrollbar.onDragEnd, a)));
},
disableDraggable: function () {
var e,
t,
i,
s,
a,
n = this;
n.params.scrollbar.el &&
((i = n.scrollbar),
(e = n.touchEventsTouch),
(t = n.touchEventsDesktop),
(a = n.params),
(i = i.$el[0]),
(s = !(!y.passiveListener || !a.passiveListeners) && {
passive: !1,
capture: !1,
}),
(a = !(!y.passiveListener || !a.passiveListeners) && {
passive: !0,
capture: !1,
}),
y.touch
? (i.removeEventListener(e.start, n.scrollbar.onDragStart, s),
i.removeEventListener(e.move, n.scrollbar.onDragMove, s),
i.removeEventListener(e.end, n.scrollbar.onDragEnd, a))
: (i.removeEventListener(t.start, n.scrollbar.onDragStart, s),
h.removeEventListener(t.move, n.scrollbar.onDragMove, s),
h.removeEventListener(t.end, n.scrollbar.onDragEnd, a)));
},
init: function () {
var e,
t,
i,
s,
a = this;
a.params.scrollbar.el &&
((e = a.scrollbar),
(s = a.$el),
(i = T((t = a.params.scrollbar).el)),
0 ===
(s = (i =
a.params.uniqueNavElements &&
"string" == typeof t.el &&
1 < i.length &&
1 === s.find(t.el).length
? s.find(t.el)
: i).find("." + a.params.scrollbar.dragClass)).length &&
((s = T(
'
'
)),
i.append(s)),
K.extend(e, { $el: i, el: i[0], $dragEl: s, dragEl: s[0] }),
t.draggable && e.enableDraggable());
},
destroy: function () {
this.scrollbar.disableDraggable();
},
},
X = {
setTransform: function (e, t) {
var i = this.rtl,
e = T(e),
i = i ? -1 : 1,
s = e.attr("data-swiper-parallax") || "0",
a = e.attr("data-swiper-parallax-x"),
n = e.attr("data-swiper-parallax-y"),
o = e.attr("data-swiper-parallax-scale"),
r = e.attr("data-swiper-parallax-opacity");
a || n
? ((a = a || "0"), (n = n || "0"))
: this.isHorizontal()
? ((a = s), (n = "0"))
: ((n = s), (a = "0")),
(a =
0 <= a.indexOf("%")
? parseInt(a, 10) * t * i + "%"
: a * t * i + "px"),
(n =
0 <= n.indexOf("%") ? parseInt(n, 10) * t + "%" : n * t + "px"),
null != r &&
((s = r - (r - 1) * (1 - Math.abs(t))),
(e[0].style.opacity = s)),
null == o
? e.transform("translate3d(" + a + ", " + n + ", 0px)")
: ((i = o - (o - 1) * (1 - Math.abs(t))),
e.transform(
"translate3d(" + a + ", " + n + ", 0px) scale(" + i + ")"
));
},
setTranslate: function () {
var s = this,
e = s.$el,
t = s.slides,
a = s.progress,
n = s.snapGrid;
e
.children(
"[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]"
)
.each(function (e, t) {
s.parallax.setTransform(t, a);
}),
t.each(function (e, t) {
var i = t.progress;
1 < s.params.slidesPerGroup &&
"auto" !== s.params.slidesPerView &&
(i += Math.ceil(e / 2) - a * (n.length - 1)),
(i = Math.min(Math.max(i, -1), 1)),
T(t)
.find(
"[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]"
)
.each(function (e, t) {
s.parallax.setTransform(t, i);
});
});
},
setTransition: function (s) {
void 0 === s && (s = this.params.speed);
this.$el
.find(
"[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]"
)
.each(function (e, t) {
var t = T(t),
i =
parseInt(t.attr("data-swiper-parallax-duration"), 10) || s;
0 === s && (i = 0), t.transition(i);
});
},
},
Q = {
getDistanceBetweenTouches: function (e) {
if (e.targetTouches.length < 2) return 1;
var t = e.targetTouches[0].pageX,
i = e.targetTouches[0].pageY,
s = e.targetTouches[1].pageX,
e = e.targetTouches[1].pageY;
return Math.sqrt(Math.pow(s - t, 2) + Math.pow(e - i, 2));
},
onGestureStart: function (e) {
var t = this,
i = t.params.zoom,
s = t.zoom,
a = s.gesture;
if (
((s.fakeGestureTouched = !1),
(s.fakeGestureMoved = !1),
!y.gestures)
) {
if (
"touchstart" !== e.type ||
("touchstart" === e.type && e.targetTouches.length < 2)
)
return;
(s.fakeGestureTouched = !0),
(a.scaleStart = Q.getDistanceBetweenTouches(e));
}
(a.$slideEl && a.$slideEl.length) ||
((a.$slideEl = T(e.target).closest(".swiper-slide")),
0 === a.$slideEl.length &&
(a.$slideEl = t.slides.eq(t.activeIndex)),
(a.$imageEl = a.$slideEl.find("img, svg, canvas")),
(a.$imageWrapEl = a.$imageEl.parent("." + i.containerClass)),
(a.maxRatio =
a.$imageWrapEl.attr("data-swiper-zoom") || i.maxRatio),
0 !== a.$imageWrapEl.length)
? (a.$imageEl.transition(0), (t.zoom.isScaling = !0))
: (a.$imageEl = void 0);
},
onGestureChange: function (e) {
var t = this.params.zoom,
i = this.zoom,
s = i.gesture;
if (!y.gestures) {
if (
"touchmove" !== e.type ||
("touchmove" === e.type && e.targetTouches.length < 2)
)
return;
(i.fakeGestureMoved = !0),
(s.scaleMove = Q.getDistanceBetweenTouches(e));
}
s.$imageEl &&
0 !== s.$imageEl.length &&
((i.scale = y.gestures
? e.scale * i.currentScale
: (s.scaleMove / s.scaleStart) * i.currentScale),
i.scale > s.maxRatio &&
(i.scale =
s.maxRatio - 1 + Math.pow(i.scale - s.maxRatio + 1, 0.5)),
i.scale < t.minRatio &&
(i.scale =
t.minRatio + 1 - Math.pow(t.minRatio - i.scale + 1, 0.5)),
s.$imageEl.transform(
"translate3d(0,0,0) scale(" + i.scale + ")"
));
},
onGestureEnd: function (e) {
var t = this.params.zoom,
i = this.zoom,
s = i.gesture;
if (!y.gestures) {
if (!i.fakeGestureTouched || !i.fakeGestureMoved) return;
if (
"touchend" !== e.type ||
("touchend" === e.type &&
e.changedTouches.length < 2 &&
!d.android)
)
return;
(i.fakeGestureTouched = !1), (i.fakeGestureMoved = !1);
}
s.$imageEl &&
0 !== s.$imageEl.length &&
((i.scale = Math.max(Math.min(i.scale, s.maxRatio), t.minRatio)),
s.$imageEl
.transition(this.params.speed)
.transform("translate3d(0,0,0) scale(" + i.scale + ")"),
(i.currentScale = i.scale),
(i.isScaling = !1),
1 === i.scale && (s.$slideEl = void 0));
},
onTouchStart: function (e) {
var t = this.zoom,
i = t.gesture,
t = t.image;
i.$imageEl &&
0 !== i.$imageEl.length &&
!t.isTouched &&
(d.android && e.preventDefault(),
(t.isTouched = !0),
(t.touchesStart.x = (
"touchstart" === e.type ? e.targetTouches[0] : e
).pageX),
(t.touchesStart.y = (
"touchstart" === e.type ? e.targetTouches[0] : e
).pageY));
},
onTouchMove: function (e) {
var t = this,
i = t.zoom,
s = i.gesture,
a = i.image,
n = i.velocity;
if (
s.$imageEl &&
0 !== s.$imageEl.length &&
((t.allowClick = !1), a.isTouched && s.$slideEl)
) {
a.isMoved ||
((a.width = s.$imageEl[0].offsetWidth),
(a.height = s.$imageEl[0].offsetHeight),
(a.startX = K.getTranslate(s.$imageWrapEl[0], "x") || 0),
(a.startY = K.getTranslate(s.$imageWrapEl[0], "y") || 0),
(s.slideWidth = s.$slideEl[0].offsetWidth),
(s.slideHeight = s.$slideEl[0].offsetHeight),
s.$imageWrapEl.transition(0),
t.rtl && ((a.startX = -a.startX), (a.startY = -a.startY)));
var o = a.width * i.scale,
r = a.height * i.scale;
if (!(o < s.slideWidth && r < s.slideHeight)) {
if (
((a.minX = Math.min(s.slideWidth / 2 - o / 2, 0)),
(a.maxX = -a.minX),
(a.minY = Math.min(s.slideHeight / 2 - r / 2, 0)),
(a.maxY = -a.minY),
(a.touchesCurrent.x = (
"touchmove" === e.type ? e.targetTouches[0] : e
).pageX),
(a.touchesCurrent.y = (
"touchmove" === e.type ? e.targetTouches[0] : e
).pageY),
!a.isMoved && !i.isScaling)
) {
if (
t.isHorizontal() &&
((Math.floor(a.minX) === Math.floor(a.startX) &&
a.touchesCurrent.x < a.touchesStart.x) ||
(Math.floor(a.maxX) === Math.floor(a.startX) &&
a.touchesCurrent.x > a.touchesStart.x))
)
return void (a.isTouched = !1);
if (
!t.isHorizontal() &&
((Math.floor(a.minY) === Math.floor(a.startY) &&
a.touchesCurrent.y < a.touchesStart.y) ||
(Math.floor(a.maxY) === Math.floor(a.startY) &&
a.touchesCurrent.y > a.touchesStart.y))
)
return void (a.isTouched = !1);
}
e.preventDefault(),
e.stopPropagation(),
(a.isMoved = !0),
(a.currentX =
a.touchesCurrent.x - a.touchesStart.x + a.startX),
(a.currentY =
a.touchesCurrent.y - a.touchesStart.y + a.startY),
a.currentX < a.minX &&
(a.currentX =
a.minX + 1 - Math.pow(a.minX - a.currentX + 1, 0.8)),
a.currentX > a.maxX &&
(a.currentX =
a.maxX - 1 + Math.pow(a.currentX - a.maxX + 1, 0.8)),
a.currentY < a.minY &&
(a.currentY =
a.minY + 1 - Math.pow(a.minY - a.currentY + 1, 0.8)),
a.currentY > a.maxY &&
(a.currentY =
a.maxY - 1 + Math.pow(a.currentY - a.maxY + 1, 0.8)),
n.prevPositionX || (n.prevPositionX = a.touchesCurrent.x),
n.prevPositionY || (n.prevPositionY = a.touchesCurrent.y),
n.prevTime || (n.prevTime = Date.now()),
(n.x =
(a.touchesCurrent.x - n.prevPositionX) /
(Date.now() - n.prevTime) /
2),
(n.y =
(a.touchesCurrent.y - n.prevPositionY) /
(Date.now() - n.prevTime) /
2),
Math.abs(a.touchesCurrent.x - n.prevPositionX) < 2 &&
(n.x = 0),
Math.abs(a.touchesCurrent.y - n.prevPositionY) < 2 &&
(n.y = 0),
(n.prevPositionX = a.touchesCurrent.x),
(n.prevPositionY = a.touchesCurrent.y),
(n.prevTime = Date.now()),
s.$imageWrapEl.transform(
"translate3d(" + a.currentX + "px, " + a.currentY + "px,0)"
);
}
}
},
onTouchEnd: function () {
var e = this.zoom,
t = e.gesture,
i = e.image,
s = e.velocity;
if (t.$imageEl && 0 !== t.$imageEl.length) {
if (!i.isTouched || !i.isMoved)
return (i.isTouched = !1), void (i.isMoved = !1);
(i.isTouched = !1), (i.isMoved = !1);
var a = 300,
n = 300,
o = s.x * a,
o = i.currentX + o,
r = s.y * n,
r = i.currentY + r,
s =
(0 !== s.x && (a = Math.abs((o - i.currentX) / s.x)),
0 !== s.y && (n = Math.abs((r - i.currentY) / s.y)),
Math.max(a, n)),
a = ((i.currentX = o), (i.currentY = r), i.width * e.scale),
n = i.height * e.scale;
(i.minX = Math.min(t.slideWidth / 2 - a / 2, 0)),
(i.maxX = -i.minX),
(i.minY = Math.min(t.slideHeight / 2 - n / 2, 0)),
(i.maxY = -i.minY),
(i.currentX = Math.max(Math.min(i.currentX, i.maxX), i.minX)),
(i.currentY = Math.max(Math.min(i.currentY, i.maxY), i.minY)),
t.$imageWrapEl
.transition(s)
.transform(
"translate3d(" + i.currentX + "px, " + i.currentY + "px,0)"
);
}
},
onTransitionEnd: function () {
var e = this.zoom,
t = e.gesture;
t.$slideEl &&
this.previousIndex !== this.activeIndex &&
(t.$imageEl.transform("translate3d(0,0,0) scale(1)"),
t.$imageWrapEl.transform("translate3d(0,0,0)"),
(e.scale = 1),
(e.currentScale = 1),
(t.$slideEl = void 0),
(t.$imageEl = void 0),
(t.$imageWrapEl = void 0));
},
toggle: function (e) {
var t = this.zoom;
t.scale && 1 !== t.scale ? t.out() : t.in(e);
},
in: function (e) {
var t,
i,
s,
a = this,
n = a.zoom,
o = a.params.zoom,
r = n.gesture,
l = n.image;
r.$slideEl ||
((r.$slideEl = a.clickedSlide
? T(a.clickedSlide)
: a.slides.eq(a.activeIndex)),
(r.$imageEl = r.$slideEl.find("img, svg, canvas")),
(r.$imageWrapEl = r.$imageEl.parent("." + o.containerClass))),
r.$imageEl &&
0 !== r.$imageEl.length &&
(r.$slideEl.addClass("" + o.zoomedSlideClass),
(a =
void 0 === l.touchesStart.x && e
? ((t = ("touchend" === e.type ? e.changedTouches[0] : e)
.pageX),
("touchend" === e.type ? e.changedTouches[0] : e).pageY)
: ((t = l.touchesStart.x), l.touchesStart.y)),
(n.scale =
r.$imageWrapEl.attr("data-swiper-zoom") || o.maxRatio),
(n.currentScale =
r.$imageWrapEl.attr("data-swiper-zoom") || o.maxRatio),
e
? ((l = r.$slideEl[0].offsetWidth),
(o = r.$slideEl[0].offsetHeight),
(e = r.$slideEl.offset().left + l / 2 - t),
(t = r.$slideEl.offset().top + o / 2 - a),
(a = r.$imageEl[0].offsetWidth),
(s = r.$imageEl[0].offsetHeight),
(a = a * n.scale),
(s = s * n.scale),
(l = Math.min(l / 2 - a / 2, 0)),
(a = Math.min(o / 2 - s / 2, 0)),
(o = -l) < (s = (s = e * n.scale) < l ? l : s) && (s = o),
(e = -a) < (i = (i = t * n.scale) < a ? a : i) && (i = e))
: (i = s = 0),
r.$imageWrapEl
.transition(300)
.transform("translate3d(" + s + "px, " + i + "px,0)"),
r.$imageEl
.transition(300)
.transform("translate3d(0,0,0) scale(" + n.scale + ")"));
},
out: function () {
var e = this,
t = e.zoom,
i = e.params.zoom,
s = t.gesture;
s.$slideEl ||
((s.$slideEl = e.clickedSlide
? T(e.clickedSlide)
: e.slides.eq(e.activeIndex)),
(s.$imageEl = s.$slideEl.find("img, svg, canvas")),
(s.$imageWrapEl = s.$imageEl.parent("." + i.containerClass))),
s.$imageEl &&
0 !== s.$imageEl.length &&
((t.scale = 1),
(t.currentScale = 1),
s.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),
s.$imageEl
.transition(300)
.transform("translate3d(0,0,0) scale(1)"),
s.$slideEl.removeClass("" + i.zoomedSlideClass),
(s.$slideEl = void 0));
},
enable: function () {
var e,
t,
i = this,
s = i.zoom;
s.enabled ||
((s.enabled = !0),
(e = !(
"touchstart" !== i.touchEvents.start ||
!y.passiveListener ||
!i.params.passiveListeners
) && { passive: !0, capture: !1 }),
(t = !y.passiveListener || { passive: !1, capture: !0 }),
y.gestures
? (i.$wrapperEl.on(
"gesturestart",
".swiper-slide",
s.onGestureStart,
e
),
i.$wrapperEl.on(
"gesturechange",
".swiper-slide",
s.onGestureChange,
e
),
i.$wrapperEl.on(
"gestureend",
".swiper-slide",
s.onGestureEnd,
e
))
: "touchstart" === i.touchEvents.start &&
(i.$wrapperEl.on(
i.touchEvents.start,
".swiper-slide",
s.onGestureStart,
e
),
i.$wrapperEl.on(
i.touchEvents.move,
".swiper-slide",
s.onGestureChange,
t
),
i.$wrapperEl.on(
i.touchEvents.end,
".swiper-slide",
s.onGestureEnd,
e
),
i.touchEvents.cancel &&
i.$wrapperEl.on(
i.touchEvents.cancel,
".swiper-slide",
s.onGestureEnd,
e
)),
i.$wrapperEl.on(
i.touchEvents.move,
"." + i.params.zoom.containerClass,
s.onTouchMove,
t
));
},
disable: function () {
var e,
t,
i = this,
s = i.zoom;
s.enabled &&
((i.zoom.enabled = !1),
(e = !(
"touchstart" !== i.touchEvents.start ||
!y.passiveListener ||
!i.params.passiveListeners
) && { passive: !0, capture: !1 }),
(t = !y.passiveListener || { passive: !1, capture: !0 }),
y.gestures
? (i.$wrapperEl.off(
"gesturestart",
".swiper-slide",
s.onGestureStart,
e
),
i.$wrapperEl.off(
"gesturechange",
".swiper-slide",
s.onGestureChange,
e
),
i.$wrapperEl.off(
"gestureend",
".swiper-slide",
s.onGestureEnd,
e
))
: "touchstart" === i.touchEvents.start &&
(i.$wrapperEl.off(
i.touchEvents.start,
".swiper-slide",
s.onGestureStart,
e
),
i.$wrapperEl.off(
i.touchEvents.move,
".swiper-slide",
s.onGestureChange,
t
),
i.$wrapperEl.off(
i.touchEvents.end,
".swiper-slide",
s.onGestureEnd,
e
),
i.touchEvents.cancel &&
i.$wrapperEl.off(
i.touchEvents.cancel,
".swiper-slide",
s.onGestureEnd,
e
)),
i.$wrapperEl.off(
i.touchEvents.move,
"." + i.params.zoom.containerClass,
s.onTouchMove,
t
));
},
},
J = {
loadInSlide: function (e, r) {
void 0 === r && (r = !0);
var l,
d = this,
c = d.params.lazy;
void 0 !== e &&
0 !== d.slides.length &&
((e = (l =
d.virtual && d.params.virtual.enabled
? d.$wrapperEl.children(
"." +
d.params.slideClass +
'[data-swiper-slide-index="' +
e +
'"]'
)
: d.slides.eq(e)).find(
"." +
c.elementClass +
":not(." +
c.loadedClass +
"):not(." +
c.loadingClass +
")"
)),
0 !==
(e =
!l.hasClass(c.elementClass) ||
l.hasClass(c.loadedClass) ||
l.hasClass(c.loadingClass)
? e
: e.add(l[0])).length &&
e.each(function (e, t) {
var i = T(t),
s = (i.addClass(c.loadingClass), i.attr("data-background")),
a = i.attr("data-src"),
n = i.attr("data-srcset"),
o = i.attr("data-sizes");
d.loadImage(i[0], a || s, n, o, !1, function () {
var e, t;
null == d ||
!d ||
(d && !d.params) ||
d.destroyed ||
(s
? (i.css("background-image", 'url("' + s + '")'),
i.removeAttr("data-background"))
: (n &&
(i.attr("srcset", n), i.removeAttr("data-srcset")),
o && (i.attr("sizes", o), i.removeAttr("data-sizes")),
a && (i.attr("src", a), i.removeAttr("data-src"))),
i.addClass(c.loadedClass).removeClass(c.loadingClass),
l.find("." + c.preloaderClass).remove(),
d.params.loop &&
r &&
((e = l.attr("data-swiper-slide-index")),
l.hasClass(d.params.slideDuplicateClass)
? ((t = d.$wrapperEl.children(
'[data-swiper-slide-index="' +
e +
'"]:not(.' +
d.params.slideDuplicateClass +
")"
)),
d.lazy.loadInSlide(t.index(), !1))
: ((t = d.$wrapperEl.children(
"." +
d.params.slideDuplicateClass +
'[data-swiper-slide-index="' +
e +
'"]'
)),
d.lazy.loadInSlide(t.index(), !1))),
d.emit("lazyImageReady", l[0], i[0]));
}),
d.emit("lazyImageLoad", l[0], i[0]);
}));
},
load: function () {
var i = this,
t = i.$wrapperEl,
s = i.params,
a = i.slides,
e = i.activeIndex,
n = i.virtual && s.virtual.enabled,
o = s.lazy,
r = s.slidesPerView;
function l(e) {
if (n) {
if (
t.children(
"." + s.slideClass + '[data-swiper-slide-index="' + e + '"]'
).length
)
return 1;
} else if (a[e]) return 1;
}
function d(e) {
return n ? T(e).attr("data-swiper-slide-index") : T(e).index();
}
if (
("auto" === r && (r = 0),
i.lazy.initialImageLoaded || (i.lazy.initialImageLoaded = !0),
i.params.watchSlidesVisibility)
)
t.children("." + s.slideVisibleClass).each(function (e, t) {
t = n ? T(t).attr("data-swiper-slide-index") : T(t).index();
i.lazy.loadInSlide(t);
});
else if (1 < r)
for (var c = e; c < e + r; c += 1) l(c) && i.lazy.loadInSlide(c);
else i.lazy.loadInSlide(e);
if (o.loadPrevNext)
if (1 < r || (o.loadPrevNextAmount && 1 < o.loadPrevNextAmount)) {
for (
var o = o.loadPrevNextAmount,
h = r,
u = Math.min(e + h + Math.max(o, h), a.length),
h = Math.max(e - Math.max(h, o), 0),
p = e + r;
p < u;
p += 1
)
l(p) && i.lazy.loadInSlide(p);
for (var m = h; m < e; m += 1) l(m) && i.lazy.loadInSlide(m);
} else {
(o = t.children("." + s.slideNextClass)),
(h =
(0 < o.length && i.lazy.loadInSlide(d(o)),
t.children("." + s.slidePrevClass)));
0 < h.length && i.lazy.loadInSlide(d(h));
}
},
},
A = {
LinearSpline: function (e, t) {
var i,
s,
a,
n,
o,
r = function (e, t) {
for (s = -1, i = e.length; 1 < i - s; )
e[(a = (i + s) >> 1)] <= t ? (s = a) : (i = a);
return i;
};
return (
(this.x = e),
(this.y = t),
(this.lastIndex = e.length - 1),
(this.interpolate = function (e) {
return e
? ((o = r(this.x, e)),
(n = o - 1),
((e - this.x[n]) * (this.y[o] - this.y[n])) /
(this.x[o] - this.x[n]) +
this.y[n])
: 0;
}),
this
);
},
getInterpolateFunction: function (e) {
var t = this;
t.controller.spline ||
(t.controller.spline = t.params.loop
? new A.LinearSpline(t.slidesGrid, e.slidesGrid)
: new A.LinearSpline(t.snapGrid, e.snapGrid));
},
setTranslate: function (e, t) {
var i,
s,
a = this,
n = a.controller.control;
function o(e) {
var t = a.rtlTranslate ? -a.translate : a.translate;
"slide" === a.params.controller.by &&
(a.controller.getInterpolateFunction(e),
(s = -a.controller.spline.interpolate(-t))),
(s && "container" !== a.params.controller.by) ||
((i =
(e.maxTranslate() - e.minTranslate()) /
(a.maxTranslate() - a.minTranslate())),
(s = (t - a.minTranslate()) * i + e.minTranslate())),
a.params.controller.inverse && (s = e.maxTranslate() - s),
e.updateProgress(s),
e.setTranslate(s, a),
e.updateActiveIndex(),
e.updateSlidesClasses();
}
if (Array.isArray(n))
for (var r = 0; r < n.length; r += 1)
n[r] !== t && n[r] instanceof m && o(n[r]);
else n instanceof m && t !== n && o(n);
},
setTransition: function (t, e) {
var i,
s = this,
a = s.controller.control;
function n(e) {
e.setTransition(t, s),
0 !== t &&
(e.transitionStart(),
e.params.autoHeight &&
K.nextTick(function () {
e.updateAutoHeight();
}),
e.$wrapperEl.transitionEnd(function () {
a &&
(e.params.loop &&
"slide" === s.params.controller.by &&
e.loopFix(),
e.transitionEnd());
}));
}
if (Array.isArray(a))
for (i = 0; i < a.length; i += 1)
a[i] !== e && a[i] instanceof m && n(a[i]);
else a instanceof m && e !== a && n(a);
},
},
Z = {
makeElFocusable: function (e) {
return e.attr("tabIndex", "0"), e;
},
addElRole: function (e, t) {
return e.attr("role", t), e;
},
addElLabel: function (e, t) {
return e.attr("aria-label", t), e;
},
disableEl: function (e) {
return e.attr("aria-disabled", !0), e;
},
enableEl: function (e) {
return e.attr("aria-disabled", !1), e;
},
onEnterKey: function (e) {
var t = this,
i = t.params.a11y;
13 === e.keyCode &&
((e = T(e.target)),
t.navigation &&
t.navigation.$nextEl &&
e.is(t.navigation.$nextEl) &&
((t.isEnd && !t.params.loop) || t.slideNext(),
t.isEnd
? t.a11y.notify(i.lastSlideMessage)
: t.a11y.notify(i.nextSlideMessage)),
t.navigation &&
t.navigation.$prevEl &&
e.is(t.navigation.$prevEl) &&
((t.isBeginning && !t.params.loop) || t.slidePrev(),
t.isBeginning
? t.a11y.notify(i.firstSlideMessage)
: t.a11y.notify(i.prevSlideMessage)),
t.pagination &&
e.is("." + t.params.pagination.bulletClass) &&
e[0].click());
},
notify: function (e) {
var t = this.a11y.liveRegion;
0 !== t.length && (t.html(""), t.html(e));
},
updateNavigation: function () {
var e,
t,
i = this;
!i.params.loop &&
i.navigation &&
((e = (t = i.navigation).$nextEl),
(t = t.$prevEl) &&
0 < t.length &&
(i.isBeginning ? i.a11y.disableEl(t) : i.a11y.enableEl(t)),
e &&
0 < e.length &&
(i.isEnd ? i.a11y.disableEl(e) : i.a11y.enableEl(e)));
},
updatePagination: function () {
var i = this,
s = i.params.a11y;
i.pagination &&
i.params.pagination.clickable &&
i.pagination.bullets &&
i.pagination.bullets.length &&
i.pagination.bullets.each(function (e, t) {
t = T(t);
i.a11y.makeElFocusable(t),
i.a11y.addElRole(t, "button"),
i.a11y.addElLabel(
t,
s.paginationBulletMessage.replace(
/{{index}}/,
t.index() + 1
)
);
});
},
init: function () {
var e,
t,
i = this,
s = (i.$el.append(i.a11y.liveRegion), i.params.a11y);
i.navigation && i.navigation.$nextEl && (e = i.navigation.$nextEl),
i.navigation &&
i.navigation.$prevEl &&
(t = i.navigation.$prevEl),
e &&
(i.a11y.makeElFocusable(e),
i.a11y.addElRole(e, "button"),
i.a11y.addElLabel(e, s.nextSlideMessage),
e.on("keydown", i.a11y.onEnterKey)),
t &&
(i.a11y.makeElFocusable(t),
i.a11y.addElRole(t, "button"),
i.a11y.addElLabel(t, s.prevSlideMessage),
t.on("keydown", i.a11y.onEnterKey)),
i.pagination &&
i.params.pagination.clickable &&
i.pagination.bullets &&
i.pagination.bullets.length &&
i.pagination.$el.on(
"keydown",
"." + i.params.pagination.bulletClass,
i.a11y.onEnterKey
);
},
destroy: function () {
var e,
t,
i = this;
i.a11y.liveRegion &&
0 < i.a11y.liveRegion.length &&
i.a11y.liveRegion.remove(),
i.navigation &&
i.navigation.$nextEl &&
(e = i.navigation.$nextEl),
i.navigation &&
i.navigation.$prevEl &&
(t = i.navigation.$prevEl),
e && e.off("keydown", i.a11y.onEnterKey),
t && t.off("keydown", i.a11y.onEnterKey),
i.pagination &&
i.params.pagination.clickable &&
i.pagination.bullets &&
i.pagination.bullets.length &&
i.pagination.$el.off(
"keydown",
"." + i.params.pagination.bulletClass,
i.a11y.onEnterKey
);
},
},
z = {
init: function () {
var e = this;
if (e.params.history) {
if (!U.history || !U.history.pushState)
return (
(e.params.history.enabled = !1),
void (e.params.hashNavigation.enabled = !0)
);
var t = e.history;
(t.initialized = !0),
(t.paths = z.getPathValues()),
(t.paths.key || t.paths.value) &&
(t.scrollToSlide(
0,
t.paths.value,
e.params.runCallbacksOnInit
),
e.params.history.replaceState ||
U.addEventListener(
"popstate",
e.history.setHistoryPopState
));
}
},
destroy: function () {
this.params.history.replaceState ||
U.removeEventListener(
"popstate",
this.history.setHistoryPopState
);
},
setHistoryPopState: function () {
(this.history.paths = z.getPathValues()),
this.history.scrollToSlide(
this.params.speed,
this.history.paths.value,
!1
);
},
getPathValues: function () {
var e = U.location.pathname
.slice(1)
.split("/")
.filter(function (e) {
return "" !== e;
}),
t = e.length;
return { key: e[t - 2], value: e[t - 1] };
},
setHistory: function (e, t) {
this.history.initialized &&
this.params.history.enabled &&
((t = this.slides.eq(t)),
(t = z.slugify(t.attr("data-history"))),
U.location.pathname.includes(e) || (t = e + "/" + t),
((e = U.history.state) && e.value === t) ||
(this.params.history.replaceState
? U.history.replaceState({ value: t }, null, t)
: U.history.pushState({ value: t }, null, t)));
},
slugify: function (e) {
return e
.toString()
.replace(/\s+/g, "-")
.replace(/[^\w-]+/g, "")
.replace(/--+/g, "-")
.replace(/^-+/, "")
.replace(/-+$/, "");
},
scrollToSlide: function (e, t, i) {
var s = this;
if (t)
for (var a = 0, n = s.slides.length; a < n; a += 1) {
var o = s.slides.eq(a);
z.slugify(o.attr("data-history")) !== t ||
o.hasClass(s.params.slideDuplicateClass) ||
((o = o.index()), s.slideTo(o, e, i));
}
else s.slideTo(0, e, i);
},
},
D = {
onHashCange: function () {
var e = this,
t = h.location.hash.replace("#", "");
t !== e.slides.eq(e.activeIndex).attr("data-hash") &&
void 0 !==
(t = e.$wrapperEl
.children(
"." + e.params.slideClass + '[data-hash="' + t + '"]'
)
.index()) &&
e.slideTo(t);
},
setHash: function () {
var e = this;
e.hashNavigation.initialized &&
e.params.hashNavigation.enabled &&
(e.params.hashNavigation.replaceState &&
U.history &&
U.history.replaceState
? U.history.replaceState(
null,
null,
"#" + e.slides.eq(e.activeIndex).attr("data-hash") || ""
)
: ((e =
(e = e.slides.eq(e.activeIndex)).attr("data-hash") ||
e.attr("data-history")),
(h.location.hash = e || "")));
},
init: function () {
var e = this;
if (
!(
!e.params.hashNavigation.enabled ||
(e.params.history && e.params.history.enabled)
)
) {
e.hashNavigation.initialized = !0;
var t = h.location.hash.replace("#", "");
if (t)
for (var i = 0, s = e.slides.length; i < s; i += 1) {
var a = e.slides.eq(i);
(a.attr("data-hash") || a.attr("data-history")) !== t ||
a.hasClass(e.params.slideDuplicateClass) ||
((a = a.index()),
e.slideTo(a, 0, e.params.runCallbacksOnInit, !0));
}
e.params.hashNavigation.watchState &&
T(U).on("hashchange", e.hashNavigation.onHashCange);
}
},
destroy: function () {
this.params.hashNavigation.watchState &&
T(U).off("hashchange", this.hashNavigation.onHashCange);
},
},
P = {
run: function () {
var e = this,
t = e.slides.eq(e.activeIndex),
i = e.params.autoplay.delay;
t.attr("data-swiper-autoplay") &&
(i = t.attr("data-swiper-autoplay") || e.params.autoplay.delay),
clearTimeout(e.autoplay.timeout),
(e.autoplay.timeout = K.nextTick(function () {
e.params.autoplay.reverseDirection
? e.params.loop
? (e.loopFix(),
e.slidePrev(e.params.speed, !0, !0),
e.emit("autoplay"))
: e.isBeginning
? e.params.autoplay.stopOnLastSlide
? e.autoplay.stop()
: (e.slideTo(e.slides.length - 1, e.params.speed, !0, !0),
e.emit("autoplay"))
: (e.slidePrev(e.params.speed, !0, !0), e.emit("autoplay"))
: e.params.loop
? (e.loopFix(),
e.slideNext(e.params.speed, !0, !0),
e.emit("autoplay"))
: e.isEnd
? e.params.autoplay.stopOnLastSlide
? e.autoplay.stop()
: (e.slideTo(0, e.params.speed, !0, !0), e.emit("autoplay"))
: (e.slideNext(e.params.speed, !0, !0), e.emit("autoplay")),
e.params.cssMode && e.autoplay.running && e.autoplay.run();
}, i));
},
start: function () {
var e = this;
return (
void 0 === e.autoplay.timeout &&
!e.autoplay.running &&
((e.autoplay.running = !0),
e.emit("autoplayStart"),
e.autoplay.run(),
!0)
);
},
stop: function () {
var e = this;
return (
!!e.autoplay.running &&
void 0 !== e.autoplay.timeout &&
(e.autoplay.timeout &&
(clearTimeout(e.autoplay.timeout),
(e.autoplay.timeout = void 0)),
(e.autoplay.running = !1),
e.emit("autoplayStop"),
!0)
);
},
pause: function (e) {
var t = this;
t.autoplay.running &&
!t.autoplay.paused &&
(t.autoplay.timeout && clearTimeout(t.autoplay.timeout),
(t.autoplay.paused = !0),
0 !== e && t.params.autoplay.waitForTransition
? (t.$wrapperEl[0].addEventListener(
"transitionend",
t.autoplay.onTransitionEnd
),
t.$wrapperEl[0].addEventListener(
"webkitTransitionEnd",
t.autoplay.onTransitionEnd
))
: ((t.autoplay.paused = !1), t.autoplay.run()));
},
},
ee = {
setTranslate: function () {
for (var e = this, t = e.slides, i = 0; i < t.length; i += 1) {
var s = e.slides.eq(i),
a = -s[0].swiperSlideOffset,
n = (e.params.virtualTranslate || (a -= e.translate), 0),
o =
(e.isHorizontal() || ((n = a), (a = 0)),
e.params.fadeEffect.crossFade
? Math.max(1 - Math.abs(s[0].progress), 0)
: 1 + Math.min(Math.max(s[0].progress, -1), 0));
s.css({ opacity: o }).transform(
"translate3d(" + a + "px, " + n + "px, 0px)"
);
}
},
setTransition: function (e) {
var i,
s = this,
t = s.slides,
a = s.$wrapperEl;
t.transition(e),
s.params.virtualTranslate &&
0 !== e &&
((i = !1),
t.transitionEnd(function () {
if (!i && s && !s.destroyed) {
(i = !0), (s.animating = !1);
for (
var e = ["webkitTransitionEnd", "transitionend"], t = 0;
t < e.length;
t += 1
)
a.trigger(e[t]);
}
}));
},
},
te = {
setTranslate: function () {
var e,
t = this,
i = t.$el,
s = t.$wrapperEl,
a = t.slides,
n = t.width,
o = t.height,
r = t.rtlTranslate,
l = t.size,
d = t.params.cubeEffect,
c = t.isHorizontal(),
h = t.virtual && t.params.virtual.enabled,
u = 0;
d.shadow &&
(c
? (0 === (e = s.find(".swiper-cube-shadow")).length &&
((e = T('
')),
s.append(e)),
e.css({ height: n + "px" }))
: 0 === (e = i.find(".swiper-cube-shadow")).length &&
((e = T('
')),
i.append(e)));
for (var p, m = 0; m < a.length; m += 1) {
var v = a.eq(m),
f = m,
g =
90 *
(f = h ? parseInt(v.attr("data-swiper-slide-index"), 10) : f),
w = Math.floor(g / 360),
b =
(r && ((g = -g), (w = Math.floor(-g / 360))),
Math.max(Math.min(v[0].progress, 1), -1)),
y = 0,
E = 0,
S = 0,
w =
(f % 4 == 0
? ((y = 4 * -w * l), (S = 0))
: (f - 1) % 4 == 0
? ((y = 0), (S = 4 * -w * l))
: (f - 2) % 4 == 0
? ((y = l + 4 * w * l), (S = l))
: (f - 3) % 4 == 0 && ((y = -l), (S = 3 * l + 4 * l * w)),
r && (y = -y),
c || ((E = y), (y = 0)),
"rotateX(" +
(c ? 0 : -g) +
"deg) rotateY(" +
(c ? g : 0) +
"deg) translate3d(" +
y +
"px, " +
E +
"px, " +
S +
"px)");
b <= 1 && -1 < b && (u = r ? 90 * -f - 90 * b : 90 * f + 90 * b),
v.transform(w),
d.slideShadows &&
((g = c
? v.find(".swiper-slide-shadow-left")
: v.find(".swiper-slide-shadow-top")),
(y = c
? v.find(".swiper-slide-shadow-right")
: v.find(".swiper-slide-shadow-bottom")),
0 === g.length &&
((g = T(
'
'
)),
v.append(g)),
0 === y.length &&
((y = T(
'
'
)),
v.append(y)),
g.length && (g[0].style.opacity = Math.max(-b, 0)),
y.length && (y[0].style.opacity = Math.max(b, 0)));
}
s.css({
"-webkit-transform-origin": "50% 50% -" + l / 2 + "px",
"-moz-transform-origin": "50% 50% -" + l / 2 + "px",
"-ms-transform-origin": "50% 50% -" + l / 2 + "px",
"transform-origin": "50% 50% -" + l / 2 + "px",
}),
d.shadow &&
(c
? e.transform(
"translate3d(0px, " +
(n / 2 + d.shadowOffset) +
"px, " +
-n / 2 +
"px) rotateX(90deg) rotateZ(0deg) scale(" +
d.shadowScale +
")"
)
: ((i = Math.abs(u) - 90 * Math.floor(Math.abs(u) / 90)),
(n =
1.5 -
(Math.sin((2 * i * Math.PI) / 360) / 2 +
Math.cos((2 * i * Math.PI) / 360) / 2)),
(i = d.shadowScale),
(n = d.shadowScale / n),
(p = d.shadowOffset),
e.transform(
"scale3d(" +
i +
", 1, " +
n +
") translate3d(0px, " +
(o / 2 + p) +
"px, " +
-o / 2 / n +
"px) rotateX(-90deg)"
))),
s.transform(
"translate3d(0px,0," +
(C.isSafari || C.isUiWebView ? -l / 2 : 0) +
"px) rotateX(" +
(t.isHorizontal() ? 0 : u) +
"deg) rotateY(" +
(t.isHorizontal() ? -u : 0) +
"deg)"
);
},
setTransition: function (e) {
var t = this.$el;
this.slides
.transition(e)
.find(
".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left"
)
.transition(e),
this.params.cubeEffect.shadow &&
!this.isHorizontal() &&
t.find(".swiper-cube-shadow").transition(e);
},
},
ie = {
setTranslate: function () {
for (
var e = this, t = e.slides, i = e.rtlTranslate, s = 0;
s < t.length;
s += 1
) {
var a,
n,
o = t.eq(s),
r = o[0].progress,
l =
(e.params.flipEffect.limitRotation &&
(r = Math.max(Math.min(o[0].progress, 1), -1)),
o[0].swiperSlideOffset),
d = -180 * r,
c = 0,
l = -l,
h = 0;
e.isHorizontal()
? i && (d = -d)
: ((h = l), (c = -d), (d = l = 0)),
(o[0].style.zIndex = -Math.abs(Math.round(r)) + t.length),
e.params.flipEffect.slideShadows &&
((a = e.isHorizontal()
? o.find(".swiper-slide-shadow-left")
: o.find(".swiper-slide-shadow-top")),
(n = e.isHorizontal()
? o.find(".swiper-slide-shadow-right")
: o.find(".swiper-slide-shadow-bottom")),
0 === a.length &&
((a = T(
'
'
)),
o.append(a)),
0 === n.length &&
((n = T(
'
'
)),
o.append(n)),
a.length && (a[0].style.opacity = Math.max(-r, 0)),
n.length && (n[0].style.opacity = Math.max(r, 0))),
o.transform(
"translate3d(" +
l +
"px, " +
h +
"px, 0px) rotateX(" +
c +
"deg) rotateY(" +
d +
"deg)"
);
}
},
setTransition: function (e) {
var i,
s = this,
t = s.slides,
a = s.activeIndex,
n = s.$wrapperEl;
t
.transition(e)
.find(
".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left"
)
.transition(e),
s.params.virtualTranslate &&
0 !== e &&
((i = !1),
t.eq(a).transitionEnd(function () {
if (!i && s && !s.destroyed) {
(i = !0), (s.animating = !1);
for (
var e = ["webkitTransitionEnd", "transitionend"], t = 0;
t < e.length;
t += 1
)
n.trigger(e[t]);
}
}));
},
},
se = {
setTranslate: function () {
for (
var e = this,
t = e.width,
i = e.height,
s = e.slides,
a = e.$wrapperEl,
n = e.slidesSizesGrid,
o = e.params.coverflowEffect,
r = e.isHorizontal(),
e = e.translate,
l = r ? t / 2 - e : i / 2 - e,
d = r ? o.rotate : -o.rotate,
c = o.depth,
h = 0,
u = s.length;
h < u;
h += 1
) {
var p = s.eq(h),
m = n[h],
m = ((l - p[0].swiperSlideOffset - m / 2) / m) * o.modifier,
v = r ? d * m : 0,
f = r ? 0 : d * m,
g = -c * Math.abs(m),
w = r ? 0 : o.stretch * m,
b = r ? o.stretch * m : 0,
b =
(Math.abs(b) < 0.001 && (b = 0),
Math.abs(w) < 0.001 && (w = 0),
Math.abs(g) < 0.001 && (g = 0),
Math.abs(v) < 0.001 && (v = 0),
"translate3d(" +
b +
"px," +
w +
"px," +
g +
"px) rotateX(" +
(f = Math.abs(f) < 0.001 ? 0 : f) +
"deg) rotateY(" +
v +
"deg)");
p.transform(b),
(p[0].style.zIndex = 1 - Math.abs(Math.round(m))),
o.slideShadows &&
((w = r
? p.find(".swiper-slide-shadow-left")
: p.find(".swiper-slide-shadow-top")),
(g = r
? p.find(".swiper-slide-shadow-right")
: p.find(".swiper-slide-shadow-bottom")),
0 === w.length &&
((w = T(
'
'
)),
p.append(w)),
0 === g.length &&
((g = T(
'
'
)),
p.append(g)),
w.length && (w[0].style.opacity = 0 < m ? m : 0),
g.length && (g[0].style.opacity = 0 < -m ? -m : 0));
}
(y.pointerEvents || y.prefixedPointerEvents) &&
(a[0].style.perspectiveOrigin = l + "px 50%");
},
setTransition: function (e) {
this.slides
.transition(e)
.find(
".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left"
)
.transition(e);
},
},
ae = {
init: function () {
var e = this,
t = e.params.thumbs,
i = e.constructor;
t.swiper instanceof i
? ((e.thumbs.swiper = t.swiper),
K.extend(e.thumbs.swiper.originalParams, {
watchSlidesProgress: !0,
slideToClickedSlide: !1,
}),
K.extend(e.thumbs.swiper.params, {
watchSlidesProgress: !0,
slideToClickedSlide: !1,
}))
: K.isObject(t.swiper) &&
((e.thumbs.swiper = new i(
K.extend({}, t.swiper, {
watchSlidesVisibility: !0,
watchSlidesProgress: !0,
slideToClickedSlide: !1,
})
)),
(e.thumbs.swiperCreated = !0)),
e.thumbs.swiper.$el.addClass(
e.params.thumbs.thumbsContainerClass
),
e.thumbs.swiper.on("tap", e.thumbs.onThumbClick);
},
onThumbClick: function () {
var e,
t,
i,
s = this,
a = s.thumbs.swiper;
a &&
((e = a.clickedIndex),
((i = a.clickedSlide) &&
T(i).hasClass(s.params.thumbs.slideThumbActiveClass)) ||
(null != e &&
((i = a.params.loop
? parseInt(
T(a.clickedSlide).attr("data-swiper-slide-index"),
10
)
: e),
s.params.loop &&
((a = s.activeIndex),
s.slides.eq(a).hasClass(s.params.slideDuplicateClass) &&
(s.loopFix(),
(s._clientLeft = s.$wrapperEl[0].clientLeft),
(a = s.activeIndex)),
(e = s.slides
.eq(a)
.prevAll('[data-swiper-slide-index="' + i + '"]')
.eq(0)
.index()),
(t = s.slides
.eq(a)
.nextAll('[data-swiper-slide-index="' + i + '"]')
.eq(0)
.index()),
(i =
void 0 === e || (void 0 !== t && t - a < a - e) ? t : e)),
s.slideTo(i))));
},
update: function (e) {
var t = this,
i = t.thumbs.swiper;
if (i) {
var s,
a,
n,
o =
"auto" === i.params.slidesPerView
? i.slidesPerViewDynamic()
: i.params.slidesPerView,
r =
(t.realIndex !== i.realIndex &&
((s = i.activeIndex),
(n = i.params.loop
? (i.slides
.eq(s)
.hasClass(i.params.slideDuplicateClass) &&
(i.loopFix(),
(i._clientLeft = i.$wrapperEl[0].clientLeft),
(s = i.activeIndex)),
(a = i.slides
.eq(s)
.prevAll(
'[data-swiper-slide-index="' + t.realIndex + '"]'
)
.eq(0)
.index()),
(n = i.slides
.eq(s)
.nextAll(
'[data-swiper-slide-index="' + t.realIndex + '"]'
)
.eq(0)
.index()),
void 0 === a
? n
: void 0 === n
? a
: n - s == s - a
? s
: n - s < s - a
? n
: a)
: t.realIndex),
i.visibleSlidesIndexes &&
i.visibleSlidesIndexes.indexOf(n) < 0 &&
(i.params.centeredSlides
? (n =
s < n
? n - Math.floor(o / 2) + 1
: n + Math.floor(o / 2) - 1)
: s < n && (n = n - o + 1),
i.slideTo(n, e ? 0 : void 0))),
1),
l = t.params.thumbs.slideThumbActiveClass;
if (
(1 < t.params.slidesPerView &&
!t.params.centeredSlides &&
(r = t.params.slidesPerView),
t.params.thumbs.multipleActiveThumbs || (r = 1),
(r = Math.floor(r)),
i.slides.removeClass(l),
i.params.loop || (i.params.virtual && i.params.virtual.enabled))
)
for (var d = 0; d < r; d += 1)
i.$wrapperEl
.children(
'[data-swiper-slide-index="' + (t.realIndex + d) + '"]'
)
.addClass(l);
else
for (var c = 0; c < r; c += 1)
i.slides.eq(t.realIndex + c).addClass(l);
}
},
},
M = [
v,
f,
Y,
G,
w,
E,
S,
{
name: "mousewheel",
params: {
mousewheel: {
enabled: !1,
releaseOnEdges: !1,
invert: !1,
forceToAxis: !1,
sensitivity: 1,
eventsTarged: "container",
},
},
create: function () {
var e = this;
K.extend(e, {
mousewheel: {
enabled: !1,
enable: x.enable.bind(e),
disable: x.disable.bind(e),
handle: x.handle.bind(e),
handleMouseEnter: x.handleMouseEnter.bind(e),
handleMouseLeave: x.handleMouseLeave.bind(e),
animateSlider: x.animateSlider.bind(e),
releaseScroll: x.releaseScroll.bind(e),
lastScrollTime: K.now(),
lastEventBeforeSnap: void 0,
recentWheelEvents: [],
},
});
},
on: {
init: function () {
var e = this;
!e.params.mousewheel.enabled &&
e.params.cssMode &&
e.mousewheel.disable(),
e.params.mousewheel.enabled && e.mousewheel.enable();
},
destroy: function () {
this.params.cssMode && this.mousewheel.enable(),
this.mousewheel.enabled && this.mousewheel.disable();
},
},
},
{
name: "navigation",
params: {
navigation: {
nextEl: null,
prevEl: null,
hideOnClick: !1,
disabledClass: "swiper-button-disabled",
hiddenClass: "swiper-button-hidden",
lockClass: "swiper-button-lock",
},
},
create: function () {
var e = this;
K.extend(e, {
navigation: {
init: L.init.bind(e),
update: L.update.bind(e),
destroy: L.destroy.bind(e),
onNextClick: L.onNextClick.bind(e),
onPrevClick: L.onPrevClick.bind(e),
},
});
},
on: {
init: function () {
this.navigation.init(), this.navigation.update();
},
toEdge: function () {
this.navigation.update();
},
fromEdge: function () {
this.navigation.update();
},
destroy: function () {
this.navigation.destroy();
},
click: function (e) {
var t,
i = this,
s = i.navigation,
a = s.$nextEl,
s = s.$prevEl;
!i.params.navigation.hideOnClick ||
T(e.target).is(s) ||
T(e.target).is(a) ||
(a
? (t = a.hasClass(i.params.navigation.hiddenClass))
: s && (t = s.hasClass(i.params.navigation.hiddenClass)),
!0 === t
? i.emit("navigationShow", i)
: i.emit("navigationHide", i),
a && a.toggleClass(i.params.navigation.hiddenClass),
s && s.toggleClass(i.params.navigation.hiddenClass));
},
},
},
{
name: "pagination",
params: {
pagination: {
el: null,
bulletElement: "span",
clickable: !1,
hideOnClick: !1,
renderBullet: null,
renderProgressbar: null,
renderFraction: null,
renderCustom: null,
progressbarOpposite: !1,
type: "bullets",
dynamicBullets: !1,
dynamicMainBullets: 1,
formatFractionCurrent: function (e) {
return e;
},
formatFractionTotal: function (e) {
return e;
},
bulletClass: "swiper-pagination-bullet",
bulletActiveClass: "swiper-pagination-bullet-active",
modifierClass: "swiper-pagination-",
currentClass: "swiper-pagination-current",
totalClass: "swiper-pagination-total",
hiddenClass: "swiper-pagination-hidden",
progressbarFillClass: "swiper-pagination-progressbar-fill",
progressbarOppositeClass:
"swiper-pagination-progressbar-opposite",
clickableClass: "swiper-pagination-clickable",
lockClass: "swiper-pagination-lock",
},
},
create: function () {
var e = this;
K.extend(e, {
pagination: {
init: k.init.bind(e),
render: k.render.bind(e),
update: k.update.bind(e),
destroy: k.destroy.bind(e),
dynamicBulletIndex: 0,
},
});
},
on: {
init: function () {
this.pagination.init(),
this.pagination.render(),
this.pagination.update();
},
activeIndexChange: function () {
(!this.params.loop && void 0 !== this.snapIndex) ||
this.pagination.update();
},
snapIndexChange: function () {
this.params.loop || this.pagination.update();
},
slidesLengthChange: function () {
this.params.loop &&
(this.pagination.render(), this.pagination.update());
},
snapGridLengthChange: function () {
this.params.loop ||
(this.pagination.render(), this.pagination.update());
},
destroy: function () {
this.pagination.destroy();
},
click: function (e) {
var t = this;
t.params.pagination.el &&
t.params.pagination.hideOnClick &&
0 < t.pagination.$el.length &&
!T(e.target).hasClass(t.params.pagination.bulletClass) &&
(!0 ===
t.pagination.$el.hasClass(t.params.pagination.hiddenClass)
? t.emit("paginationShow", t)
: t.emit("paginationHide", t),
t.pagination.$el.toggleClass(
t.params.pagination.hiddenClass
));
},
},
},
{
name: "scrollbar",
params: {
scrollbar: {
el: null,
dragSize: "auto",
hide: !1,
draggable: !1,
snapOnRelease: !0,
lockClass: "swiper-scrollbar-lock",
dragClass: "swiper-scrollbar-drag",
},
},
create: function () {
var e = this;
K.extend(e, {
scrollbar: {
init: I.init.bind(e),
destroy: I.destroy.bind(e),
updateSize: I.updateSize.bind(e),
setTranslate: I.setTranslate.bind(e),
setTransition: I.setTransition.bind(e),
enableDraggable: I.enableDraggable.bind(e),
disableDraggable: I.disableDraggable.bind(e),
setDragPosition: I.setDragPosition.bind(e),
getPointerPosition: I.getPointerPosition.bind(e),
onDragStart: I.onDragStart.bind(e),
onDragMove: I.onDragMove.bind(e),
onDragEnd: I.onDragEnd.bind(e),
isTouched: !1,
timeout: null,
dragTimeout: null,
},
});
},
on: {
init: function () {
this.scrollbar.init(),
this.scrollbar.updateSize(),
this.scrollbar.setTranslate();
},
update: function () {
this.scrollbar.updateSize();
},
resize: function () {
this.scrollbar.updateSize();
},
observerUpdate: function () {
this.scrollbar.updateSize();
},
setTranslate: function () {
this.scrollbar.setTranslate();
},
setTransition: function (e) {
this.scrollbar.setTransition(e);
},
destroy: function () {
this.scrollbar.destroy();
},
},
},
{
name: "parallax",
params: { parallax: { enabled: !1 } },
create: function () {
K.extend(this, {
parallax: {
setTransform: X.setTransform.bind(this),
setTranslate: X.setTranslate.bind(this),
setTransition: X.setTransition.bind(this),
},
});
},
on: {
beforeInit: function () {
this.params.parallax.enabled &&
((this.params.watchSlidesProgress = !0),
(this.originalParams.watchSlidesProgress = !0));
},
init: function () {
this.params.parallax.enabled && this.parallax.setTranslate();
},
setTranslate: function () {
this.params.parallax.enabled && this.parallax.setTranslate();
},
setTransition: function (e) {
this.params.parallax.enabled && this.parallax.setTransition(e);
},
},
},
{
name: "zoom",
params: {
zoom: {
enabled: !1,
maxRatio: 3,
minRatio: 1,
toggle: !0,
containerClass: "swiper-zoom-container",
zoomedSlideClass: "swiper-slide-zoomed",
},
},
create: function () {
var s = this,
t = {
enabled: !1,
scale: 1,
currentScale: 1,
isScaling: !1,
gesture: {
$slideEl: void 0,
slideWidth: void 0,
slideHeight: void 0,
$imageEl: void 0,
$imageWrapEl: void 0,
maxRatio: 3,
},
image: {
isTouched: void 0,
isMoved: void 0,
currentX: void 0,
currentY: void 0,
minX: void 0,
minY: void 0,
maxX: void 0,
maxY: void 0,
width: void 0,
height: void 0,
startX: void 0,
startY: void 0,
touchesStart: {},
touchesCurrent: {},
},
velocity: {
x: void 0,
y: void 0,
prevPositionX: void 0,
prevPositionY: void 0,
prevTime: void 0,
},
},
a =
("onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out"
.split(" ")
.forEach(function (e) {
t[e] = Q[e].bind(s);
}),
K.extend(s, { zoom: t }),
1);
Object.defineProperty(s.zoom, "scale", {
get: function () {
return a;
},
set: function (e) {
var t, i;
a !== e &&
((t = s.zoom.gesture.$imageEl
? s.zoom.gesture.$imageEl[0]
: void 0),
(i = s.zoom.gesture.$slideEl
? s.zoom.gesture.$slideEl[0]
: void 0),
s.emit("zoomChange", e, t, i)),
(a = e);
},
});
},
on: {
init: function () {
this.params.zoom.enabled && this.zoom.enable();
},
destroy: function () {
this.zoom.disable();
},
touchStart: function (e) {
this.zoom.enabled && this.zoom.onTouchStart(e);
},
touchEnd: function (e) {
this.zoom.enabled && this.zoom.onTouchEnd(e);
},
doubleTap: function (e) {
this.params.zoom.enabled &&
this.zoom.enabled &&
this.params.zoom.toggle &&
this.zoom.toggle(e);
},
transitionEnd: function () {
this.zoom.enabled &&
this.params.zoom.enabled &&
this.zoom.onTransitionEnd();
},
slideChange: function () {
this.zoom.enabled &&
this.params.zoom.enabled &&
this.params.cssMode &&
this.zoom.onTransitionEnd();
},
},
},
{
name: "lazy",
params: {
lazy: {
enabled: !1,
loadPrevNext: !1,
loadPrevNextAmount: 1,
loadOnTransitionStart: !1,
elementClass: "swiper-lazy",
loadingClass: "swiper-lazy-loading",
loadedClass: "swiper-lazy-loaded",
preloaderClass: "swiper-lazy-preloader",
},
},
create: function () {
K.extend(this, {
lazy: {
initialImageLoaded: !1,
load: J.load.bind(this),
loadInSlide: J.loadInSlide.bind(this),
},
});
},
on: {
beforeInit: function () {
this.params.lazy.enabled &&
this.params.preloadImages &&
(this.params.preloadImages = !1);
},
init: function () {
this.params.lazy.enabled &&
!this.params.loop &&
0 === this.params.initialSlide &&
this.lazy.load();
},
scroll: function () {
this.params.freeMode &&
!this.params.freeModeSticky &&
this.lazy.load();
},
resize: function () {
this.params.lazy.enabled && this.lazy.load();
},
scrollbarDragMove: function () {
this.params.lazy.enabled && this.lazy.load();
},
transitionStart: function () {
var e = this;
e.params.lazy.enabled &&
(e.params.lazy.loadOnTransitionStart ||
(!e.params.lazy.loadOnTransitionStart &&
!e.lazy.initialImageLoaded)) &&
e.lazy.load();
},
transitionEnd: function () {
this.params.lazy.enabled &&
!this.params.lazy.loadOnTransitionStart &&
this.lazy.load();
},
slideChange: function () {
this.params.lazy.enabled &&
this.params.cssMode &&
this.lazy.load();
},
},
},
{
name: "controller",
params: {
controller: { control: void 0, inverse: !1, by: "slide" },
},
create: function () {
var e = this;
K.extend(e, {
controller: {
control: e.params.controller.control,
getInterpolateFunction: A.getInterpolateFunction.bind(e),
setTranslate: A.setTranslate.bind(e),
setTransition: A.setTransition.bind(e),
},
});
},
on: {
update: function () {
this.controller.control &&
this.controller.spline &&
((this.controller.spline = void 0),
delete this.controller.spline);
},
resize: function () {
this.controller.control &&
this.controller.spline &&
((this.controller.spline = void 0),
delete this.controller.spline);
},
observerUpdate: function () {
this.controller.control &&
this.controller.spline &&
((this.controller.spline = void 0),
delete this.controller.spline);
},
setTranslate: function (e, t) {
this.controller.control && this.controller.setTranslate(e, t);
},
setTransition: function (e, t) {
this.controller.control && this.controller.setTransition(e, t);
},
},
},
{
name: "a11y",
params: {
a11y: {
enabled: !0,
notificationClass: "swiper-notification",
prevSlideMessage: "Previous slide",
nextSlideMessage: "Next slide",
firstSlideMessage: "This is the first slide",
lastSlideMessage: "This is the last slide",
paginationBulletMessage: "Go to slide {{index}}",
},
},
create: function () {
var t = this;
K.extend(t, {
a11y: {
liveRegion: T(
'
'
),
},
}),
Object.keys(Z).forEach(function (e) {
t.a11y[e] = Z[e].bind(t);
});
},
on: {
init: function () {
this.params.a11y.enabled &&
(this.a11y.init(), this.a11y.updateNavigation());
},
toEdge: function () {
this.params.a11y.enabled && this.a11y.updateNavigation();
},
fromEdge: function () {
this.params.a11y.enabled && this.a11y.updateNavigation();
},
paginationUpdate: function () {
this.params.a11y.enabled && this.a11y.updatePagination();
},
destroy: function () {
this.params.a11y.enabled && this.a11y.destroy();
},
},
},
{
name: "history",
params: {
history: { enabled: !1, replaceState: !1, key: "slides" },
},
create: function () {
var e = this;
K.extend(e, {
history: {
init: z.init.bind(e),
setHistory: z.setHistory.bind(e),
setHistoryPopState: z.setHistoryPopState.bind(e),
scrollToSlide: z.scrollToSlide.bind(e),
destroy: z.destroy.bind(e),
},
});
},
on: {
init: function () {
this.params.history.enabled && this.history.init();
},
destroy: function () {
this.params.history.enabled && this.history.destroy();
},
transitionEnd: function () {
this.history.initialized &&
this.history.setHistory(
this.params.history.key,
this.activeIndex
);
},
slideChange: function () {
var e = this;
e.history.initialized &&
e.params.cssMode &&
e.history.setHistory(e.params.history.key, e.activeIndex);
},
},
},
{
name: "hash-navigation",
params: {
hashNavigation: { enabled: !1, replaceState: !1, watchState: !1 },
},
create: function () {
var e = this;
K.extend(e, {
hashNavigation: {
initialized: !1,
init: D.init.bind(e),
destroy: D.destroy.bind(e),
setHash: D.setHash.bind(e),
onHashCange: D.onHashCange.bind(e),
},
});
},
on: {
init: function () {
this.params.hashNavigation.enabled &&
this.hashNavigation.init();
},
destroy: function () {
this.params.hashNavigation.enabled &&
this.hashNavigation.destroy();
},
transitionEnd: function () {
this.hashNavigation.initialized &&
this.hashNavigation.setHash();
},
slideChange: function () {
this.hashNavigation.initialized &&
this.params.cssMode &&
this.hashNavigation.setHash();
},
},
},
{
name: "autoplay",
params: {
autoplay: {
enabled: !1,
delay: 3e3,
waitForTransition: !0,
disableOnInteraction: !0,
stopOnLastSlide: !1,
reverseDirection: !1,
},
},
create: function () {
var t = this;
K.extend(t, {
autoplay: {
running: !1,
paused: !1,
run: P.run.bind(t),
start: P.start.bind(t),
stop: P.stop.bind(t),
pause: P.pause.bind(t),
onVisibilityChange: function () {
"hidden" === document.visibilityState &&
t.autoplay.running &&
t.autoplay.pause(),
"visible" === document.visibilityState &&
t.autoplay.paused &&
(t.autoplay.run(), (t.autoplay.paused = !1));
},
onTransitionEnd: function (e) {
t &&
!t.destroyed &&
t.$wrapperEl &&
e.target === this &&
(t.$wrapperEl[0].removeEventListener(
"transitionend",
t.autoplay.onTransitionEnd
),
t.$wrapperEl[0].removeEventListener(
"webkitTransitionEnd",
t.autoplay.onTransitionEnd
),
(t.autoplay.paused = !1),
t.autoplay.running
? t.autoplay.run()
: t.autoplay.stop());
},
},
});
},
on: {
init: function () {
this.params.autoplay.enabled &&
(this.autoplay.start(),
document.addEventListener(
"visibilitychange",
this.autoplay.onVisibilityChange
));
},
beforeTransitionStart: function (e, t) {
this.autoplay.running &&
(t || !this.params.autoplay.disableOnInteraction
? this.autoplay.pause(e)
: this.autoplay.stop());
},
sliderFirstMove: function () {
this.autoplay.running &&
(this.params.autoplay.disableOnInteraction
? this.autoplay.stop()
: this.autoplay.pause());
},
touchEnd: function () {
this.params.cssMode &&
this.autoplay.paused &&
!this.params.autoplay.disableOnInteraction &&
this.autoplay.run();
},
destroy: function () {
this.autoplay.running && this.autoplay.stop(),
document.removeEventListener(
"visibilitychange",
this.autoplay.onVisibilityChange
);
},
},
},
{
name: "effect-fade",
params: { fadeEffect: { crossFade: !1 } },
create: function () {
K.extend(this, {
fadeEffect: {
setTranslate: ee.setTranslate.bind(this),
setTransition: ee.setTransition.bind(this),
},
});
},
on: {
beforeInit: function () {
var e,
t = this;
"fade" === t.params.effect &&
(t.classNames.push(t.params.containerModifierClass + "fade"),
K.extend(
t.params,
(e = {
slidesPerView: 1,
slidesPerColumn: 1,
slidesPerGroup: 1,
watchSlidesProgress: !0,
spaceBetween: 0,
virtualTranslate: !0,
})
),
K.extend(t.originalParams, e));
},
setTranslate: function () {
"fade" === this.params.effect && this.fadeEffect.setTranslate();
},
setTransition: function (e) {
"fade" === this.params.effect &&
this.fadeEffect.setTransition(e);
},
},
},
{
name: "effect-cube",
params: {
cubeEffect: {
slideShadows: !0,
shadow: !0,
shadowOffset: 20,
shadowScale: 0.94,
},
},
create: function () {
K.extend(this, {
cubeEffect: {
setTranslate: te.setTranslate.bind(this),
setTransition: te.setTransition.bind(this),
},
});
},
on: {
beforeInit: function () {
var e,
t = this;
"cube" === t.params.effect &&
(t.classNames.push(t.params.containerModifierClass + "cube"),
t.classNames.push(t.params.containerModifierClass + "3d"),
K.extend(
t.params,
(e = {
slidesPerView: 1,
slidesPerColumn: 1,
slidesPerGroup: 1,
watchSlidesProgress: !0,
resistanceRatio: 0,
spaceBetween: 0,
centeredSlides: !1,
virtualTranslate: !0,
})
),
K.extend(t.originalParams, e));
},
setTranslate: function () {
"cube" === this.params.effect && this.cubeEffect.setTranslate();
},
setTransition: function (e) {
"cube" === this.params.effect &&
this.cubeEffect.setTransition(e);
},
},
},
{
name: "effect-flip",
params: { flipEffect: { slideShadows: !0, limitRotation: !0 } },
create: function () {
K.extend(this, {
flipEffect: {
setTranslate: ie.setTranslate.bind(this),
setTransition: ie.setTransition.bind(this),
},
});
},
on: {
beforeInit: function () {
var e,
t = this;
"flip" === t.params.effect &&
(t.classNames.push(t.params.containerModifierClass + "flip"),
t.classNames.push(t.params.containerModifierClass + "3d"),
K.extend(
t.params,
(e = {
slidesPerView: 1,
slidesPerColumn: 1,
slidesPerGroup: 1,
watchSlidesProgress: !0,
spaceBetween: 0,
virtualTranslate: !0,
})
),
K.extend(t.originalParams, e));
},
setTranslate: function () {
"flip" === this.params.effect && this.flipEffect.setTranslate();
},
setTransition: function (e) {
"flip" === this.params.effect &&
this.flipEffect.setTransition(e);
},
},
},
{
name: "effect-coverflow",
params: {
coverflowEffect: {
rotate: 50,
stretch: 0,
depth: 100,
modifier: 1,
slideShadows: !0,
},
},
create: function () {
K.extend(this, {
coverflowEffect: {
setTranslate: se.setTranslate.bind(this),
setTransition: se.setTransition.bind(this),
},
});
},
on: {
beforeInit: function () {
var e = this;
"coverflow" === e.params.effect &&
(e.classNames.push(
e.params.containerModifierClass + "coverflow"
),
e.classNames.push(e.params.containerModifierClass + "3d"),
(e.params.watchSlidesProgress = !0),
(e.originalParams.watchSlidesProgress = !0));
},
setTranslate: function () {
"coverflow" === this.params.effect &&
this.coverflowEffect.setTranslate();
},
setTransition: function (e) {
"coverflow" === this.params.effect &&
this.coverflowEffect.setTransition(e);
},
},
},
{
name: "thumbs",
params: {
thumbs: {
multipleActiveThumbs: !0,
swiper: null,
slideThumbActiveClass: "swiper-slide-thumb-active",
thumbsContainerClass: "swiper-container-thumbs",
},
},
create: function () {
K.extend(this, {
thumbs: {
swiper: null,
init: ae.init.bind(this),
update: ae.update.bind(this),
onThumbClick: ae.onThumbClick.bind(this),
},
});
},
on: {
beforeInit: function () {
var e = this.params.thumbs;
e && e.swiper && (this.thumbs.init(), this.thumbs.update(!0));
},
slideChange: function () {
this.thumbs.swiper && this.thumbs.update();
},
update: function () {
this.thumbs.swiper && this.thumbs.update();
},
resize: function () {
this.thumbs.swiper && this.thumbs.update();
},
observerUpdate: function () {
this.thumbs.swiper && this.thumbs.update();
},
setTransition: function (e) {
var t = this.thumbs.swiper;
t && t.setTransition(e);
},
beforeDestroy: function () {
var e = this.thumbs.swiper;
e && this.thumbs.swiperCreated && e && e.destroy();
},
},
},
];
return (
void 0 === m.use &&
((m.use = m.Class.use), (m.installModule = m.Class.installModule)),
m.use(M),
m
);
});
var ANIUTIL = (function () {
function t(e) {
function t(e) {
(this.opts = e),
(this.resizeTiming = e.resizeTiming || 100),
this.setElement(),
this.setVideoStyle(),
this.bindEvent();
}
var i = t.prototype;
(i.setElement = function () {
void 0 !== this.opts.wrapElement &&
(this.wrapElement = this.opts.wrapElement.jquery
? this.opts.wrapElement[0]
: this.opts.wrapElement),
void 0 !== this.opts.targetVideo &&
(this.targetVideo = this.opts.targetVideo.jquery
? this.opts.targetVideo[0]
: this.opts.targetVideo);
}),
(i.setVideoStyle = function () {
(this.wrapElement.style.overflow = "hidden"),
(this.targetVideo.style.position = "absolute"),
(this.targetVideo.style.top = "50%"),
(this.targetVideo.style.left = "50%"),
(this.targetVideo.style.transform = "translate(-50%, -50%)");
}),
(i.bindEvent = function () {
var e = this;
window.addEventListener("load", function () {
e.setVideoSize();
}),
window.addEventListener("resize", function () {
e.setVideoSize();
});
}),
(i.getVideoInfo = function () {
(this.wrapWidth = this.wrapElement.clientWidth),
(this.wrapHeight = this.wrapElement.clientHeight),
(this.videoWidth = this.targetVideo.clientWidth),
(this.videoHeight = this.targetVideo.clientHeight),
(this.wrapRatio = this.wrapHeight / this.wrapWidth),
(this.videoRatio = this.videoHeight / this.videoWidth);
}),
(i.setVideoSize = function () {
var e = this;
clearTimeout(null),
setTimeout(function () {
e.getVideoInfo(),
e.wrapRatio < e.videoRatio
? ((e.targetVideo.style.width = "100%"),
(e.targetVideo.style.height = "auto"))
: ((e.targetVideo.style.width = "auto"),
(e.targetVideo.style.height = "100%"));
}, this.resizeTiming);
}),
new t(e);
}
function i(e) {
var t,
i,
s = null,
a = null,
n = e ? e + 200 : 200,
o = function () {
null == s
? ((i =
document.scrollingElement ||
document.documentElement ||
document.body.parentNode ||
document.body),
(t = document.body.clientHeight),
(i = window.pageYOffset + i.clientHeight),
(s = i / t))
: (t = document.body.clientHeight);
},
r = function () {
clearTimeout(a),
(a = setTimeout(function () {
window.scrollTo(0, t * s - window.innerHeight), (s = null);
}, n));
};
window.addEventListener("resize", function () {
o(), r();
});
}
function s() {
return (
!(
-1 < navigator.userAgent.indexOf("Windows") ||
-1 < navigator.userAgent.indexOf("Macintosh")
) &&
(!!(
"ontouchstart" in window ||
(window.DocumentTouch && document instanceof window.DocumentTouch)
) ||
void 0)
);
}
return {
calRange: function (e) {
return (
0 <
(e = {
targetValue: (e = e).targetValue,
progress: e.progress,
startPoint: e.startPoint || 0,
endPoint: e.endPoint || 100,
}).startPoint &&
(e.endPoint =
0 < e.endPoint - e.startPoint
? e.endPoint - e.startPoint
: e.endPoint),
(t =
(t =
(t =
(e.targetValue * (e.progress - e.startPoint)) / e.endPoint) >
e.targetValue
? e.targetValue
: t) < 0
? 0
: t)
);
var t;
},
videoObjectFit: function (e) {
t(e);
},
addClass: function (e) {
for (var t = e, i = t.classList.length, s = 0; s < i; s++)
t.targetElement.classList.add(t.classList[s]);
},
removeClass: function (e) {
for (var t = e, i = t.classList.length, s = 0; s < i; s++)
t.targetElement.classList.remove(t.classList[s]);
},
scrollController: function (e) {
var i,
s = (s = e) || {},
t = navigator.userAgent.toLowerCase(),
a =
document.scrollingElement ||
document.documentElement ||
document.body.parentNode ||
document.body,
n = s.speed || 120,
o = 0 <= s.duration ? s.duration : 1,
r = a.scrollTop,
l =
a === document.body && document.documentElement
? document.documentElement
: a,
d = !1,
c = null,
e = function () {
("Netscape" == navigator.appName &&
-1 != navigator.userAgent.search("Trident")) ||
-1 != t.indexOf("msie")
? document.addEventListener(
"mousewheel",
function (e) {
"hidden" != document.documentElement.style.overflow &&
u.scrollEvent(e);
},
{ passive: !1 }
)
: document.addEventListener(
"wheel",
function (e) {
u.hasScrollBox(e.target) || u.scrollEvent(e);
},
{ passive: !1 }
);
},
h = function () {
window.addEventListener("scroll", function () {
"hidden" == document.documentElement.style.overflow ||
d ||
(r = a.scrollTop);
});
},
u = {
scrollEvent: function (e) {
e.preventDefault();
var t = document.body.getAttribute("data-scroll-speed"),
e = this.normalizeWheelDelta(e),
t = s.currDelta && t ? t : t || n ? n : 120;
(r += -e * t),
(i = Math.max(
0,
Math.min(r, a.scrollHeight - l.clientHeight)
)),
this.update();
},
normalizeWheelDelta: function (e) {
return e.detail
? e.wheelDelta
? (e.wheelDelta / e.detail / 40) * (0 < e.detail ? 1 : -1)
: -e.detail / 3
: e.wheelDelta / 120;
},
update: function () {
var e = i - a.scrollTop,
e =
Math.ceil(a.scrollTop + e) <= 0
? 0
: i < r
? i
: Math.ceil(a.scrollTop + e);
(d = !0),
TweenMax.to(a, o, {
ease: "power1.out",
scrollTop: e,
onComplete: function () {
clearTimeout(c),
(c = null),
(c = setTimeout(function () {
(d = !1), (r = a.scrollTop);
}, 500));
},
}),
r <= 0 ? (r = 0) : i <= r && (r = i);
},
hasScrollBox: function (e) {
for (; e && e !== document.body && e !== document; ) {
var t = window.getComputedStyle(e).overflow;
if (t && (-1 < t.indexOf("auto") || -1 < t.indexOf("scroll")))
return !0;
e = e.parentNode;
}
return !1;
},
};
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame,
(-1 == t.indexOf("chrome") && -1 != t.indexOf("safari")) ||
(e(), h());
},
resizeScrollOffset: function (e) {
i(e);
},
checkTouchDevice: s,
checkFold: function () {
var e,
t = screen.width / screen.height,
i =
s() &&
0.7137 < t &&
t < 0.8 &&
"width=768" == document.getElementsByName("viewport")[0].content,
t =
s() &&
0.8 < t &&
t < 0.95 &&
"width=768" == document.getElementsByName("viewport")[0].content;
return i ? (e = "isFold") : t && (e = "isFoldLatest"), e;
},
deviceConsole: function (e, t) {
var i, s;
document.querySelector(".console-layer") ||
((i = document.createElement("div")).classList.add("console-layer"),
i.setAttribute(
"style",
"position: fixed; left: 0; top: 0; padding: 20px; z-index:1000000000; background: #fff;"
),
document.querySelector("body").append(i)),
"multi" == t
? ((i = document.querySelector(".console-layer")),
(s = document.createElement("div")).classList.add(
"console-value"
),
s.setAttribute(
"style",
"border: 1px #ddd solid; float: left; padding: 10px;"
),
i.append(s))
: (s =
(document.querySelector(".console-value") ||
((s = document.createElement("div")).classList.add(
"console-value"
),
s.setAttribute(
"style",
"border: 1px #ddd solid; float: left; padding: 10px;"
),
i.append(s)),
document.querySelector(".console-value"))),
(s.innerHTML = e);
},
percentToPixel: function (e) {
return e.targetValue * (e.progress / 100);
},
responsiveHandler: function (s) {
var a,
e,
n,
o,
t = (window.resolutionStatus = null),
s =
(window.innerWidth,
{
resolution: s.resolution,
statusName: s.statusName || [],
callback: s.callback || [],
activeTiming: s.activeTiming || 100,
}),
i = function () {
o = window.innerWidth;
for (var e = 0; e < s.resolution.length; e++) {
var t = s.resolution[e],
i = s.resolution[e + 1] || 0;
(o <= t && i < o && a != s.statusName[e]) ||
(o <= t && i < o && n != e)
? (document.documentElement.classList.remove(a),
(a = s.statusName[e] || e),
(n = e),
document.documentElement.classList.add(a))
: ((o >= s.resolution[0] && a != s.statusName[0]) ||
(o >= s.resolution[0] && !n)) &&
(document.documentElement.classList.remove(a),
(a = s.statusName[0] || e),
(n = e),
document.documentElement.classList.add(a));
}
},
r = function () {
clearTimeout(t),
console.log(s.activeTiming),
e != n &&
s.callback[n] &&
(t = setTimeout(function () {
s.callback[n](), (t = null), (e = n);
}, s.activeTiming));
};
return (function () {
return (
window.addEventListener("DOMContentLoaded", function () {
i(), (e = n);
}),
window.addEventListener("resize", function () {
i(), r();
}),
this
);
})();
},
};
})();
window.VD = window.VD || {};
const UTILS = (function () {
return {
isIosDevice:
((s = /iPad|iPhone|iPod/.test(navigator.userAgent))
? document.documentElement.classList.add("isIosDevice")
: document.documentElement.classList.add("isNotIosDevice"),
s),
checkGlobal: void (0 === location.pathname.indexOf("/global/galaxy") ||
!0 === window.IS_CAMPAIGN
? document.documentElement.classList.add("global")
: document.documentElement.classList.add("dotcom")),
checkOS:
((s = (s = navigator.appVersion.match(/(mac|win|linux)/i))
? s[1].toLowerCase()
: ""),
void document.documentElement.classList.add(s)),
isFireFox: void (
/firefox/i.test(navigator.userAgent) &&
document.documentElement.classList.add("firefox")
),
isWebkit: void (
/applewebkit/i.test(navigator.userAgent) &&
document.documentElement.classList.add("webkit")
),
isChrome: void (
/chrome/i.test(navigator.userAgent) &&
document.documentElement.classList.add("chrome")
),
isOpera: void (
/opera/i.test(navigator.userAgent) &&
document.documentElement.classList.add("opera")
),
isIos: void (
/ip(ad|hone|od)/i.test(navigator.userAgent) &&
document.documentElement.classList.add("ios")
),
isCrIos: void (
/crios/i.test(navigator.userAgent) &&
document.documentElement.classList.add("crios")
),
isAndroid: void (
/android/i.test(navigator.userAgent) &&
document.documentElement.classList.add("android")
),
isSafari:
((s = /applewebkit/i.test(navigator.userAgent)),
(i = /chrome/i.test(navigator.userAgent)),
void (s && !i && document.documentElement.classList.add("safari"))),
isHuawei: void (
/HUAWEICLT/i.test(navigator.userAgent) &&
document.documentElement.classList.add("huawei")
),
isUCBrowser: void (
/UCBrowser/i.test(navigator.userAgent) &&
document.documentElement.classList.add("ucbrowser")
),
winSize:
((s = "Netscape" === navigator.appName),
(i = -1 !== navigator.appVersion.indexOf("Mac")),
(e = -1 !== navigator.userAgent.indexOf("Safari")),
(t = -1 !== navigator.userAgent.indexOf("Chrome")),
s && !i && e && !t
? function () {
return { w: $(win).width(), h: $(win).height() };
}
: function () {
return {
w:
window.innerWidth ||
document.documentElement.clientWidth ||
document.body.clientWidth,
h:
window.innerHeight ||
document.documentElement.clientHeight ||
document.body.clientHeight,
};
}),
requestAFrame:
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (e) {
return window.setTimeout(e, 1e3 / 60);
},
cancelAFrame:
window.cancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
window.webkitCancelRequestAnimationFrame ||
window.mozCancelAnimationFrame ||
window.oCancelAnimationFrame ||
window.msCancelAnimationFrame ||
function (e) {
window.clearTimeout(e);
},
isInVerticalViewPort: function (e) {
e = e.getBoundingClientRect();
return e.top - 200 <= UTILS.getViewPort().height && 0 <= e.bottom;
},
isInHorizontalViewPort: function (e) {
e = e.getBoundingClientRect();
return (
e.left - 200 <= UTILS.getViewPort().width && 0 <= e.right + 200
);
},
isInViewPort(e) {
return (
UTILS.isInVerticalViewPort(e) && UTILS.isInHorizontalViewPort(e)
);
},
isVisible(e) {
return (
UTILS.isInViewPort(e) &&
!!(e.offsetWidth || e.offsetHeight || e.getClientRects().length)
);
},
isObject: function (e) {
return (
"object" == typeof e &&
null !== e &&
e.constructor &&
e.constructor === Object
);
},
def: function () {
for (var e = [], t = arguments.length; t--; ) e[t] = arguments[t];
for (var i = Object(e[0]), s = 1; s < e.length; s += 1) {
var a = e[s];
if (null != a)
for (
var n = Object.keys(Object(a)), o = 0, r = n.length;
o < r;
o += 1
) {
var l = n[o],
d = Object.getOwnPropertyDescriptor(a, l);
void 0 !== d &&
d.enumerable &&
(this.isObject(i[l]) && this.isObject(a[l])
? this.def(i[l], a[l])
: !this.isObject(i[l]) && this.isObject(a[l])
? ((i[l] = {}), this.def(i[l], a[l]))
: (i[l] = a[l]));
}
}
return i;
},
convertArray: function (e) {
return Array.prototype.slice.call(e);
},
getOffset: function (e) {
return {
top: e.getBoundingClientRect().top + window.pageYOffset,
left: e.getBoundingClientRect().left + window.scrollX,
bottom: (bottom =
e.getBoundingClientRect().bottom + window.pageYOffset),
};
},
getScroll: function () {
var e = window.pageYOffset;
return { top: e, bottom: e + window.innerHeight };
},
getViewPort: function () {
var e = window,
t = "inner";
return (
"innerWidth" in window ||
((t = "client"), (e = document.documentElement || document.body)),
{ width: e[t + "Width"], height: e[t + "Height"] }
);
},
getCurrentDevice: function () {
var e = UTILS.getViewPort().width;
return 1024 <= e
? "desktop"
: e < 1024 && 768 <= e
? "tablet"
: "mobile";
},
isVerticalVisible: function (e) {
return (
UTILS.isInVerticalViewPort(e) &&
!!(e.offsetWidth || e.offsetHeight || e.getClientRects().length)
);
},
isHorizontalVisible: function (e) {
return (
UTILS.isInHorizontalViewPort(e) &&
!!(e.offsetWidth || e.offsetHeight || e.getClientRects().length)
);
},
setCookie: function (e, t, i) {
var s = new Date();
s.setTime(s.getTime() + 60 * i * 60 * 24 * 1e3),
(document.cookie =
e + "=" + t + "; exprires=" + s.toUTCString() + "; path=/");
},
getCookie: function (e) {
e = document.cookie.match("(^|;) ?" + e + "=([^;]*)(;|$)");
return e ? e[2] : null;
},
triggerEvent: function (e, t, i, s, a) {
var n,
i = i || null,
s = s || !1,
a = a || !0;
null == i
? (n = document.createEvent("HTMLEvents")).initEvent(t, s, a)
: (n = document.createEvent("CustomEvent")).initCustomEvent(
t,
s,
a,
i
),
e.dispatchEvent(n);
},
visibleScroll: function () {
document.documentElement.classList.contains("isTouchDevice") ||
(!0 === this.scrollFlag &&
((this.scrollFlag = !1),
(document.body.style.position = ""),
(document.body.style.width = ""),
(document.body.style.top = ""),
(document.body.style.boxSizing = ""),
(document.body.style.paddingRight = ""),
(document.documentElement.style.overflow = ""),
null !== this.popupEl &&
((this.popupEl.style.paddingRight = ""), (this.popupEl = null)),
window.scrollTo(0, this.currentPos)));
},
hiddenScroll: function (e) {
var t;
document.documentElement.classList.contains("isTouchDevice") ||
((this.popupEl = e || null),
(this.scrollFlag = !0),
(this.currentPos =
window.pageYOffset || document.documentElement.scrollTop),
(e = window.innerWidth - document.documentElement.clientWidth),
(t = 0 < this.currentPos ? "-" + this.currentPos + "px" : 0),
(document.body.style.position = "fixed"),
(document.body.style.width = "100%"),
(document.body.style.top = t),
(document.body.style.boxSizing = "border-box"),
(document.body.style.paddingRight = e + "px"),
(document.documentElement.style.overflow = "hidden"),
null !== this.popupEl &&
(this.popupEl.style.paddingRight = e + "px"));
},
closest: function (e, t) {
do {
if (e == document.documentElement) return null;
if (e.matches ? e.matches(t) : e.msMatchesSelector(t)) return e;
} while (
null !== (e = e.parentElement || e.parentNode) ||
1 === e.nodeType
);
return null;
},
onPopupAccessibility: function (e) {
e.setAttribute("aria-hidden", !0), e.setAttribute("tabindex", -1);
for (
var t = e.querySelectorAll("a, button, input, select, iframe"),
i = 0;
i < t.length;
i++
) {
var s = t[i].getAttribute("aria-hidden"),
a = t[i].getAttribute("tabindex");
null != s &&
null == t[i].getAttribute("data-prev-aria-hidden") &&
t[i].setAttribute("data-prev-aria-hidden", s),
null != a &&
null == t[i].getAttribute("data-prev-tabindex") &&
t[i].setAttribute("data-prev-tabindex", a),
t[i].setAttribute("tabindex", -1),
t[i].setAttribute("aria-hidden", !0);
}
},
offPopupAccessibility: function (e) {
e.removeAttribute("aria-hidden"), e.removeAttribute("tabindex");
for (
var t = e.querySelectorAll("a, button, input, select, iframe"),
i = 0;
i < t.length;
i++
) {
var s = t[i].getAttribute("data-prev-aria-hidden"),
a = t[i].getAttribute("data-prev-tabindex");
null != s
? t[i].setAttribute("aria-hidden", s)
: t[i].removeAttribute("aria-hidden"),
null != a
? t[i].setAttribute("tabindex", a)
: t[i].removeAttribute("tabindex"),
t[i].removeAttribute("data-prev-aria-hidden"),
t[i].removeAttribute("data-prev-tabindex");
}
},
onAccessibility: function (e) {
if (
!document.documentElement.classList.contains(
"is-layer-popup-opened"
)
) {
e.setAttribute("aria-hidden", !0), e.setAttribute("tabindex", -1);
for (
var t = e.querySelectorAll("a, button, input, select, iframe"),
i = 0;
i < t.length;
i++
)
t[i].setAttribute("tabindex", -1),
t[i].setAttribute("aria-hidden", !0);
}
},
offAccessibility: function (e) {
if (
!document.documentElement.classList.contains(
"is-layer-popup-opened"
)
) {
e.removeAttribute("aria-hidden"), e.removeAttribute("tabindex");
for (
var t = e.querySelectorAll("a, button, input, select, iframe"),
i = 0;
i < t.length;
i++
)
t[i].removeAttribute("tabindex"),
t[i].removeAttribute("aria-hidden");
}
},
extend: function (t, i) {
return (
Object.keys(i).forEach(function (e) {
t[e] = i[e];
}),
t
);
},
getHeight: function (e) {
var t, i, s;
return e
? ((t = (i = window.getComputedStyle(e)).display),
(i = parseInt(i.maxHeight)),
(s = 0),
"none" != t && 0 != i
? e.offsetHeight
: ((e.style.position = "absolute"),
(e.style.visibility = "hidden"),
(e.style.display = "block"),
(s = e.offsetHeight),
(e.style.display = ""),
(e.style.position = ""),
(e.style.visibility = ""),
s))
: 0;
},
setLastActiveItem: function (e) {
this.lastActiveItem = e || null;
},
getLastActiveItem: function () {
return null != this.lastActiveItem ? this.lastActiveItem : null;
},
isRTL: function () {
return document.documentElement.classList.contains("rtl");
},
checkRegion: function () {
for (
var e = document.getElementsByTagName("meta"), t = "", i = 0;
i < e.length;
i++
)
if ("sitecode" == e[i].getAttribute("name"))
return (t = e[i].getAttribute("content"));
if ("" == t)
return -1 < document.location.pathname.indexOf("global")
? "global"
: "jp";
},
isLowNetwork: function () {
var e =
"global" == UTILS.checkRegion() || "jp" == UTILS.checkRegion()
? "___GALAXY_SPEED"
: "__COM_SPEED";
return null == UTILS.getCookie(e) || null == UTILS.getCookie(e)
? null
: "L" == UTILS.getCookie(e) ||
("H" != UTILS.getCookie(e) && void 0);
},
getQueryString: function (e) {
var t = (s = location.href).indexOf("?") + 1,
i = -1 < s.indexOf("#") ? s.indexOf("#") + 1 : s.length;
if (0 == t) return "";
for (
var s = (s = s.substring(t, i)).split("&"), a = "", n = 0;
n < s.length;
n++
) {
var o = s[n].split("=");
if (2 != o.length) break;
o[0] == e && (a = o[1]);
break;
}
return a;
},
customParallax: function (e) {
var t = e.mode || "center",
i = e.delay || 0,
s = e.ease || "Power0.easeNone",
a = e.transZ || 0,
n = e.duration || 0.3,
o = e.distance || 0,
r = e.correction || 0,
l = e.windowCorrection
? window.innerHeight * e.windowCorrection
: 0,
d = e.direction || 1,
c = e.activeElement,
h = e.targetElement || c,
u = e.wrapperElement || c,
e = e.unit || "px",
p = window.pageYOffset,
m = window.pageYOffset + window.innerHeight,
c = c.getBoundingClientRect(),
v = p + u.getBoundingClientRect().top,
u = v + u.getBoundingClientRect().height,
f = window.innerHeight + c.height + 2 * l,
g =
"center" == t
? c.top - (window.innerHeight - c.height) / 2
: c.top - window.innerHeight;
"px" == e && (o = (c.height * o) / 100),
v <= m + l &&
p - l <= u &&
TweenMax.to(h, n, {
y: r + ((g * ("center" == t ? 2 * o : o)) / f) * d + e,
z: a,
ease: s,
delay: i,
});
},
getNavHeight: function () {
var e,
t,
i = 0,
s =
document.querySelector(".pd-g-header-navigation") ||
document.querySelector("#subnav") ||
document.querySelector(".sticky-menu") ||
document.querySelector(".pd-g-floating-nav");
return (i = s
? s.classList.contains("pd-g-header-navigation")
? ((t = (e = s.querySelector(
".pd-header-navigation"
)).querySelector(".pd-header-navigation__menu-wrap")),
e.clientHeight + t.clientHeight)
: s.clientHeight
: i);
},
isBrokenFixed: function () {
var e = window.innerWidth,
t = window.innerHeight,
i = !1;
return (
document.documentElement.classList.remove("is-broken-fixed"),
(1440 <= e && t <= 540) ||
(e <= 810 && t / e < 0.5277) ||
e / window.outerWidth < 0.4 ||
t < UTILS.MIN_VIEW_HEIGHT
? (document.documentElement.classList.add("is-broken-fixed"),
(i = !0))
: document.documentElement.classList.remove("is-broken-fixed"),
i
);
},
isFullAnimationBrokenFixed: () => {
var e = window.innerWidth,
t = window.innerHeight,
i =
!!UTILS.isTouchDevice &&
window.matchMedia("(orientation: landscape)").matches;
let s = !1;
return (
(!!UTILS.isTouchDevice &&
!window.matchMedia("(orientation: landscape)").matches &&
t / e < 1.5) ||
i ||
t < 700
? (document.documentElement.classList.add(
"is-animation-broken-fixed"
),
(s = !0))
: document.documentElement.classList.remove(
"is-animation-broken-fixed"
),
s
);
},
isTouchDevice:
((s =
"ontouchstart" in window ||
(window.DocumentTouch && document instanceof window.DocumentTouch))
? document.documentElement.classList.add("isTouchDevice")
: document.documentElement.classList.add("isNotTouchDevice"),
s),
isIEorEdge: (function () {
var e,
t = navigator.userAgent.toLowerCase();
if ("Microsoft Internet Explorer" == navigator.appName) e = "msie ";
else if (-1 < t.search("trident")) e = "trident/.*rv:";
else {
if (!(-1 < t.search("edge/"))) return -1;
e = "edge/";
}
return null !=
new RegExp(e + "([0-9]{1,})(\\.{0,}[0-9]{0,1})").exec(t)
? (document.documentElement.classList.add("isIEorEdge"),
parseFloat(RegExp.$1 + RegExp.$2))
: -1;
})(),
page: {
scrollLock: {
className: "is-no-scroll",
barWidth: function () {
return window.innerWidth - document.documentElement.clientWidth;
},
el: $("html"),
run: function (e) {
document.documentElement.style.paddingRight = e + "px";
},
off: function () {
this.barWidth();
this.el.removeClass(this.className),
this.el.removeClass("hive-layer-scroll-lock"),
this.run(0);
},
on: function () {
var e = this.barWidth();
this.el.addClass(this.className), this.run(e);
},
},
},
MIN_VIEW_HEIGHT: 400,
RESPONSIVE: {
PC: { NAME: "pc", WIDTH: 1440 },
TABLET: { NAME: "tablet", WIDTH: 1024 },
MOBILE: { NAME: "mobile", WIDTH: 767 },
},
};
var e, t, i, s;
})();
VD.UTILS = UTILS;
var SCROLLER = (function () {
function t(e) {
(this.initialize = !0),
(this.opts = e),
(this.correction = e.correction || 0),
(this.removeCorrection = e.removeCorrection || 0),
(this.trackHeight = e.trackHeight || 0),
(this.activeClass = e.activeClass),
(this.activeCallbackClass =
e.activeCallbackClass || "callback-active"),
(this.useStrictMode = null == e.useStrictMode || e.useStrictMode),
(this.useFixed = e.useFixed || !1),
(this.useFixedStyle = null == e.useFixedStyle || e.useFixedStyle),
(this.useSticky = e.useSticky || !1),
(this.useStickyStyle = null == e.useStickyStyle || e.useStickyStyle),
(this.useViewportOver = e.useViewportOver || !0),
(this.activeVisibility = e.activeVisibility || "before"),
(this.activeType = e.activeType ? this.opts.activeType : "reverse"),
(this.autoHeight = null == e.autoHeight || e.autoHeight),
(this.offsetY = e.offsetY || 0),
(this.resize = null == e.resize || e.resize),
(this.resizeTiming = null != e.resizeTiming && e.resizeTiming),
(this.windowHeight = window.innerHeight),
(this.oldPregress = 0),
(this.oldWinScrollTop = 0),
(this.elementInformation = {}),
(this.isFixedArea = !1),
(this.checkTouchDevice = !1),
this.elementEventList.setElement.call(this),
this.bindEvent();
}
var e = t.prototype;
return (
(e.bindEvent = function () {
var e = this,
t = null;
this.elementHandler(),
this.resize &&
((this.addEventList = function () {
e.resizeTiming
? (clearTimeout(t),
(t = setTimeout(function () {
(e.windowHeight = window.innerHeight), e.elementHandler();
}, e.resizeTiming)))
: ((e.windowHeight = window.innerHeight), e.elementHandler());
}),
window.addEventListener("resize", this.addEventList)),
this.opts.IEScroll && this.utilList.IEScrollHandler.call(this);
}),
(e.elementHandler = function () {
return (
this.elementEventList.setTrackStyle.call(this),
this.getFixedState(),
1 < this.trackHeight &&
this.elementEventList.setTrackHeigh.call(this),
!this.useSticky &&
this.useFixed &&
this.useFixedStyle &&
this.elementEventList.setFixedStyle.call(this),
this.useSticky &&
!this.useFixed &&
this.useStickyStyle &&
this.elementEventList.setStickyStyle.call(this),
this
);
}),
(e.utilList = {
checkTouchDevice: function () {
return -1 < navigator.userAgent.indexOf("Windows") ||
-1 < navigator.userAgent.indexOf("Macintosh")
? (this.checkTouchDevice = !1)
: "ontouchstart" in window ||
(window.DocumentTouch &&
document instanceof window.DocumentTouch)
? (this.checkTouchDevice = !0)
: void 0;
},
IEScrollHandler: function () {
navigator.userAgent.match(/Trident\/7\./) &&
(this.body.addEventListener("mousewheel", function (e) {
e.preventDefault();
var e = e.wheelDelta,
t = window.pageYOffset;
window.scrollTo(0, t - e);
}),
this.body.addEventListener("keydown", function (e) {
var t = window.pageYOffset;
switch (e.which) {
case 38:
e.preventDefault(), window.scrollTo(0, t - 40);
break;
case 40:
e.preventDefault(), window.scrollTo(0, t + 40);
break;
default:
return;
}
}));
},
getScroll: function () {
var e = window.pageYOffset;
return { top: e, bottom: e + this.windowHeight };
},
getOffset: function (e) {
return {
top: e.getBoundingClientRect().top + window.pageYOffset,
bottom: e.getBoundingClientRect().bottom + window.pageYOffset,
};
},
getUserAgent: function () {
return navigator.userAgent;
},
}),
(e.elementEventList = {
setElement: function () {
(this.body = document.querySelector("body")),
void 0 !== this.opts.trackElement &&
(this.trackElement = this.opts.trackElement.jquery
? this.opts.trackElement[0]
: this.opts.trackElement),
void 0 !== this.opts.fixedElement &&
(this.fixedElement = this.opts.fixedElement.jquery
? this.opts.fixedElement[0]
: this.opts.fixedElement),
void 0 !== this.opts.activeElement &&
(this.activeElement = this.opts.activeElement.jquery
? this.opts.activeElement[0]
: this.opts.activeElement);
},
setTrackHeigh: function () {
var e, t;
this.trackHeight <= 1 ||
((this.trackElement.style.height = ""),
(e = 0 == this.trackElement.clientHeight),
(t = this.windowHeight * this.trackHeight),
e && (this.trackElement.style.height = this.windowHeight + "px"),
(this.trackElement.style.height = t + "px"));
},
setTrackStyle: function () {
this.trackElement &&
this.useFixed &&
"static" == window.getComputedStyle(this.trackElement).position &&
(this.trackElement.style.position = "relative");
},
setFixedStyle: function () {
this.isFixedArea ||
((this.fixedElement.style.height = ""),
(this.fixedElement.style.top = ""),
(this.fixedElement.style.position = "absolute")),
0 == this.fixedElement.clientWidth &&
(this.fixedElement.style.width = "100%"),
this.autoHeight &&
("string" == typeof this.offsetY
? ((this.fixedElement.style.height =
"calc(" +
this.windowHeight +
"px - " +
this.offsetY +
")"),
(this.fixedElement.style.top = this.offsetY))
: ((this.fixedElement.style.height =
this.windowHeight - this.offsetY + "px"),
(this.fixedElement.style.top = this.offsetY + "px")));
},
setStickyStyle: function () {
this.isFixedArea || (this.fixedElement.style.position = "sticky"),
0 == this.fixedElement.clientWidth &&
(this.fixedElement.style.width = "100%");
},
setFixedElement: function () {
(this.diffHeight =
this.windowHeight - this.fixedElement.clientHeight),
(this.trackTopOffset = this.utilList.getOffset.call(
this,
this.trackElement
).top),
(this.trackBottomOffset = this.utilList.getOffset.call(
this,
this.trackElement
).bottom),
this.winScrollTop <= this.trackTopOffset
? ((this.fixedElement.style.position = "absolute"),
"string" == typeof this.offsetY
? (this.fixedElement.style.top = this.offsetY)
: (this.fixedElement.style.top = this.offsetY + "px"),
(this.fixedElement.style.bottom = ""))
: this.winScrollBottom >= this.trackBottomOffset
? ((this.fixedElement.style.position = "absolute"),
(this.fixedElement.style.top =
this.trackElement.clientHeight -
this.fixedElement.clientHeight +
"px"))
: this.isFixedArea ||
((this.fixedElement.style.position = "fixed"),
(this.fixedElement.style.top = "0"));
},
}),
(e.getWheelDirection = function () {
this.winScrollTop >= this.oldWinScrollTop
? (this.wheelDirection = "down")
: (this.wheelDirection = "up"),
(this.oldWinScrollTop = this.winScrollTop);
}),
(e.getProgress = function () {
var e =
this.utilList.getOffset.call(this, this.trackElement).top -
this.windowHeight * this.correction,
t =
this.useFixed || this.useSticky
? Math.abs(this.trackElement.clientHeight - this.windowHeight)
: this.useViewportOver
? this.trackElement.clientHeight + this.windowHeight
: this.trackElement.clientHeight,
i = this.winScrollTop - e,
e = this.winScrollBottom - e,
i = this.useFixed || this.useSticky ? (i / t) * 100 : (e / t) * 100;
return (
this.useStrictMode
? (this.progress =
Math.floor(i) < 0
? 0
: 100 < Math.floor(i)
? 100
: Math.floor(i))
: (this.progress = i),
this.getWheelDirection(),
this.progress
);
}),
(e.getFixedState = function () {
0 < this.progress && this.progress < 100
? (this.isFixedArea = !0)
: (this.isFixedArea = !1);
}),
(e.trackAnimation = function (e) {
this.initialize &&
((this.winScrollTop =
this.utilList.getScroll.call(this).top -
this.windowHeight * this.correction),
(this.winScrollBottom = this.utilList.getScroll.call(this).bottom),
this.useFixed &&
!this.useSticky &&
this.elementEventList.setFixedElement.call(this),
this.getProgress(),
this.getFixedState(),
e &&
(this.oldPregress !== this.progress && e.call(this),
(this.oldPregress = this.progress)));
}),
(e.activeAnimation = function () {
if (this.initialize) {
(this.winScrollTop = this.utilList.getScroll.call(this).top),
(this.winScrollBottom =
this.utilList.getScroll.call(this).bottom),
(this.trackElementHeight = this.trackElement.clientHeight),
(this.correctionValue =
this.trackElementHeight * this.correction),
(this.removeCorrectionValue =
this.trackElementHeight * this.removeCorrection),
(this.elementOffsetTop = this.utilList.getOffset.call(
this,
this.trackElement
).top),
(this.elementOffsetBottom = this.utilList.getOffset.call(
this,
this.trackElement
).bottom),
(this.downScrollTop = this.winScrollTop - this.correctionValue),
(this.downScrollBottom =
this.winScrollBottom - this.correctionValue),
(this.upScrollTop = this.winScrollTop + this.correctionValue),
(this.upScrollBottom =
this.winScrollBottom + this.correctionValue);
function e() {
l(), o();
}
function t() {
d(), r();
}
var i = this,
s = this.activeVisibility,
a = this.activeType,
n = this.windowHeight / 2,
o = function () {
if (i.activeClass)
if ("object" == typeof i.activeClass)
for (var e = i.activeClass.length, t = 0; t < e; t++)
i.activeElement.classList.contains(i.activeClass[t]) ||
i.activeElement.classList.add(i.activeClass[t]);
else
i.activeElement.classList.contains(i.activeClass) ||
i.activeElement.classList.add(i.activeClass);
},
r = function () {
if ("object" == typeof i.activeClass)
for (var e = i.activeClass.length, t = 0; t < e; t++)
i.activeElement.classList.contains(i.activeClass[t]) &&
i.activeElement.classList.remove(i.activeClass[t]);
else
i.activeElement.classList.contains(i.activeClass) &&
i.activeElement.classList.remove(i.activeClass);
i.activeElement.classList.contains(i.activeCallbackClass) &&
i.activeElement.classList.remove(i.activeCallbackClass);
},
l = function () {
i.activeElement.classList.contains(i.activeCallbackClass) ||
(i.opts.activeCallback &&
(i.opts.activeCallback.call(i),
i.activeElement.classList.add(i.activeCallbackClass)));
},
d = function () {
i.activeElement.classList.contains(i.activeCallbackClass) &&
i.opts.endCallback &&
i.opts.endCallback.call(i);
};
switch ((this.getWheelDirection(), s)) {
case "before":
(("down" == this.wheelDirection &&
this.downScrollBottom >= this.elementOffsetTop &&
this.downScrollTop <= this.elementOffsetTop) ||
("up" == this.wheelDirection &&
this.upScrollTop <= this.elementOffsetBottom &&
this.upScrollBottom >= this.elementOffsetBottom) ||
("oneWay" == this.activeType &&
this.downScrollBottom >= this.elementOffsetTop)) &&
(e(), (this.activeStatus = !0));
break;
case "visible":
(("down" == this.wheelDirection &&
this.downScrollBottom >= this.elementOffsetTop + n &&
this.downScrollTop <= this.elementOffsetTop) ||
("up" == this.wheelDirection &&
this.upScrollTop <= this.elementOffsetBottom - n &&
this.upScrollBottom >= this.elementOffsetBottom) ||
("oneWay" == this.activeType &&
this.downScrollBottom >= this.elementOffsetTop + n)) &&
(e(), (this.activeStatus = !0));
}
switch (a) {
case "reverse":
"visible" == s
? ((this.activeStatus &&
"down" == this.wheelDirection &&
this.winScrollTop > this.elementOffsetBottom) ||
(this.activeStatus &&
"up" == this.wheelDirection &&
this.winScrollBottom < this.elementOffsetTop)) &&
(t(), (this.activeStatus = !1))
: ((this.activeStatus &&
this.winScrollTop < this.elementOffsetTop &&
this.winScrollBottom < this.elementOffsetTop) ||
(this.activeStatus &&
this.winScrollTop > this.elementOffsetBottom &&
this.winScrollBottom > this.elementOffsetBottom)) &&
(t(), (this.activeStatus = !1));
break;
case "oneWay":
"visible" == s
? this.activeStatus &&
this.winScrollBottom < this.elementOffsetTop + n &&
(t(), (this.activeStatus = !1))
: this.activeStatus &&
this.winScrollTop < this.elementOffsetTop &&
this.winScrollBottom < this.elementOffsetTop &&
(t(), (this.activeStatus = !1));
}
}
}),
(e.getElementInformation = function () {
return (
this.trackElement &&
(this.elementInformation.trackElement = {
element: this.trackElement,
width: this.trackElement.clientWidth,
height: this.trackElement.clientHeight,
topOffset: this.utilList.getOffset.call(this, this.trackElement)
.top,
bottomOffset: this.utilList.getOffset.call(
this,
this.trackElement
).bottom,
}),
this.activeElement &&
(this.elementInformation.activeElement = {
element: this.activeElement,
width: this.activeElement.clientWidth,
height: this.activeElement.clientHeight,
topOffset: this.utilList.getOffset.call(
this,
this.activeElement
).top,
bottomOffset: this.utilList.getOffset.call(
this,
this.activeElement
).bottom,
}),
this.elementInformation
);
}),
(e.destroy = function (e) {
this.trackElement &&
((this.trackElement.style.position = ""),
(this.trackElement.style.height = "")),
this.fixedElement &&
((this.fixedElement.style.position = ""),
(this.fixedElement.style.top = ""),
(this.fixedElement.style.height = "")),
(this.trackElement = ""),
(this.fixedElement = ""),
(this.activeElement = ""),
(this.correction = ""),
(this.trackHeight = ""),
(this.activeCallbackClass = ""),
(this.useFixed = ""),
(this.activeVisibility = ""),
(this.activeType = ""),
(this.offsetY = ""),
(this.resize = ""),
(this.windowHeight = ""),
(this.elementInformation = ""),
window.removeEventListener("load", this.addEventList),
window.removeEventListener("resize", this.addEventList),
(this.initialize = !1);
}),
function (e) {
return new t(e);
}
);
})();
!(function () {
"use strict";
window.VD = window.VD || {};
const m = VD.UTILS;
VD.ImageLoader = class {
constructor(e = container, t) {
t = {
el: e,
lazyClass: ".js-img-src",
lazyCompleteClass: "load-complete",
startLazyClass: t.startLazyClass || ".js-start-img-src",
endLazyClass: t.endLazyClass || ".js-end-img-src",
responsiveClass: t.responsiveClass || ".js-res-img",
loadOption: t.loadOption,
visiblePoint: t.visiblePoint || 0,
useDefaultImg: t.useDefaultImg,
resizeStart: null,
};
(this.opts = t),
(this.classes = t.classes),
(this.el = document.querySelector(e)),
this.init();
}
init() {
this.initOpts(),
this.getLazyImage(),
this.getResponsiveImage(),
this.bindEvents();
}
initOpts() {
(this.targetAttr = this.opts.loadOption[0].attribute),
(this.responsiveCheck = this.opts.loadOption),
(this.dynamicCallCount = 0),
(this.dynamicLoadedComplate = !1),
this.opts.useDefaultImg && this.setDefaultImage();
}
getLazyImage() {
const e = Array.from(this.el.querySelectorAll(this.opts.lazyClass));
var t = Array.from(
this.el.querySelectorAll(this.opts.startLazyClass)
),
t = e.concat(t);
(this.lazyImages = t), (this.lazyLength = t.length);
}
getResponsiveImage() {
var e = this.el.querySelectorAll(this.opts.responsiveClass);
(this.responsiveImages = e), (this.responsiveLength = e.length);
}
bindEvents() {
window.addEventListener("load", this.onLoadHandler.bind(this)),
window.addEventListener("scroll", this.lazyEvent.bind(this)),
this.responsiveCheck &&
window.addEventListener(
"resize",
this.onResizeHandler.bind(this)
);
}
onLoadHandler() {
this.responsiveHandler(), this.lazyEvent();
}
onResizeHandler() {
clearTimeout(this.opts.resizeStart),
(this.opts.resizeStart = setTimeout(() => {
this.responsiveHandler(), this.lazyEvent();
}, 80));
}
lazyEvent() {
this.setLazyImage(),
this.lazyLength === this.lazyCompleteLength &&
window.removeEventListener("scroll", this.lazyEvent.bind(this));
}
responsiveHandler() {
this.windowWidth = window.innerWidth;
var a = this.opts.loadOption.length;
for (let s = 0; s < a; s++) {
let e = s + 1,
t = e == a ? 0 : this.opts.loadOption[e].resolution,
i = !1;
(i =
(0 == s ||
this.windowWidth <= this.opts.loadOption[s].resolution) &&
this.windowWidth > t) &&
this.opts.loadOption[s].attribute !== this.oldAttr &&
((this.targetAttr = this.opts.loadOption[s].attribute),
(this.oldAttr = this.targetAttr),
(this.attrIndex = s),
(this.dynamicCallCount = 0),
this.setResponsiveImage());
}
}
setResponsiveImage(i) {
var e = this.opts.lazyClass.split("."),
s = e[e.length - 1],
e = this.opts.startLazyClass.split("."),
a = e[e.length - 1];
if (i)
for (let t = 0; t < i.length; t++) {
var n = i[t];
let e = i[t].getAttribute(this.targetAttr);
(e = e || this.findImageHandler(n)),
i[t].classList.contains(this.opts.lazyCompleteClass) ||
(i[t].setAttribute("src", e),
i[t].classList.add(this.opts.lazyCompleteClass),
1 == this.opts.startLazyClass.split(" ").length &&
i[t].classList.remove(a),
1 == this.opts.lazyClass.split(" ").length &&
i[t].classList.remove(s));
}
else
for (let i = 0; i < this.responsiveLength; i++) {
let e = this.responsiveImages[i],
t = e.getAttribute(this.targetAttr);
(t = t || this.findImageHandler(e)),
e.classList.contains(this.opts.lazyCompleteClass) &&
e.setAttribute("src", t);
}
}
checkCompleteImage() {
var e = this.el.querySelectorAll("." + this.opts.lazyCompleteClass);
this.lazyCompleteLength = e.length;
}
setDefaultImage() {
for (var e = 0; e < this.lazyLength; e++)
this.lazyImages[e].setAttribute(
"src",
"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH/C1hNUCBEYXRhWE1QAz94cAAh+QQFAAAAACwAAAAAAQABAAACAkQBADs="
);
}
setLazyImage() {
this.windowHeight = window.innerHeight;
for (let h = 0; h < this.lazyLength; h++) {
let t = this.lazyImages[h],
e = this.windowHeight * this.opts.visiblePoint,
i = m.getScroll.call(this).top - e,
s = m.getScroll.call(this).bottom + e,
a = m.getOffset.call(this, t).top,
n = m.getOffset.call(this, t).bottom,
o = this.opts.lazyClass.split("."),
r = o[o.length - 1],
l = this.opts.startLazyClass.split("."),
d = l[l.length - 1],
c;
var u, p;
if (
("none" === window.getComputedStyle(t).display
? null != (u = t.parentNode).offsetParent &&
((c = u.offsetParent),
(a = m.getOffset.call(this, u).top),
(n = m.getOffset.call(this, u).bottom))
: (c = t.offsetParent),
((s > a && i <= a) ||
(i < n && s > n) ||
(i < a && s > n) ||
(i > a && s < n)) &&
null != c)
) {
let e = t.getAttribute(this.targetAttr);
(e = e || this.findImageHandler(t)),
t.classList.contains(this.opts.lazyCompleteClass) ||
(t.setAttribute("src", e),
(p = () => {
1 == this.opts.startLazyClass.split(" ").length &&
t.classList.remove(d),
1 == this.opts.lazyClass.split(" ").length &&
t.classList.remove(r),
this.checkCompleteImage(),
t.removeEventListener("load", p);
}),
t.addEventListener("load", p),
t.classList.add(this.opts.lazyCompleteClass));
}
}
}
findRemainingImageAttr(e) {
for (var t = this.opts.loadOption.length, i = 0; i < t; i++) {
var s = e.getAttribute(this.opts.loadOption[i].attribute);
if (s) return s;
}
}
findNextImageAttr(t) {
for (let e = this.attrIndex; 0 <= e; e--) {
var i = t.getAttribute(this.opts.loadOption[e].attribute);
if (i) return i;
if (0 == e && null == i) return this.findRemainingImageAttr(t);
}
}
findImageHandler(e) {
return 0 !== this.attrIndex
? this.findNextImageAttr(e)
: this.findRemainingImageAttr(e);
}
};
})(),
(function () {
"use strict";
window.VD = window.VD || {};
const e = VD.UTILS,
t = e.RESPONSIVE;
VD.VideoLoader = class {
constructor(e = container, t) {
t = {
el: e,
lazyClass: t.lazyClass || ".js-video-src",
responsiveClass: t.responsiveClass || ".js-res-video",
imageLazyCompleteClass: "load-complete",
imageEndLazyClass: t.imageEndLazyClass || ".js-end-img-src",
notLoadElement: t.notLoadElement || [],
loadOption: t.loadOption,
visiblePoint: t.visiblePoint || 0,
resizeStart: null,
classes: { loaded: "loaded", ended: "ended" },
};
(this.opts = t),
(this.classes = t.classes),
(this.el = document.querySelector(e)),
this.init();
}
init() {
this.initOpts(),
this.getLazyVideo(),
this.getResponsiveVideo(),
this.bindEvents();
}
initOpts() {
this.getCurrentDevice();
var e = "mobile" !== this.currentDevice ? 0 : 1;
(this.prevVideoSrc = ""),
(this.targetAttr = this.opts.loadOption[e].attribute),
(this.responsiveCheck = this.opts.loadOption),
(this.videoCallStack = []);
}
getLazyVideo() {
let e = Array.from(
this.el.querySelectorAll(this.opts.lazyClass)
).filter((t) => {
t.isVideoInit = !1;
{
let e = 0;
if (e < this.opts.notLoadElement.length)
return !t.closest(this.opts.notLoadElement[e]);
}
});
(e = e.filter((e) => {
if (e.querySelector("video")) return e;
})),
(this.lazyVideos = e),
(this.lazyLength = e.length);
}
getResponsiveVideo() {
var e = Array.from(
this.el.querySelectorAll(this.opts.responsiveClass)
).filter((t) => {
{
let e = 0;
if (e < this.opts.notLoadElement.length)
return !t.closest(this.opts.notLoadElement[e]);
}
});
(this.responsiveVideos = e), (this.responsiveLength = e.length);
}
bindEvents() {
window.addEventListener("load", this.onLoadHandler.bind(this)),
window.addEventListener("scroll", this.lazyEvent.bind(this)),
this.responsiveCheck &&
window.addEventListener(
"resize",
this.onResizeHandler.bind(this)
);
}
getCurrentDevice() {
(this.winWidth = e.winSize().w),
this.winWidth >= t.TABLET.WIDTH
? (this.currentDevice = "desktop")
: this.winWidth > t.MOBILE.WIDTH &&
this.winWidth < t.TABLET.WIDTH
? (this.currentDevice = "tablet")
: (this.currentDevice = "mobile"),
(this.prevDevice = this.currentDevice);
}
onLoadHandler() {
this.getCurrentDevice(), this.responsiveHandler(), this.lazyEvent();
}
onResizeHandler() {
clearTimeout(this.opts.resizeStart),
(this.opts.resizeStart = setTimeout(() => {
this.getCurrentDevice(),
this.responsiveHandler(),
this.lazyEvent();
}, 80));
}
lazyEvent() {
this.setLazyVideo(),
this.lazyLength === this.lazyCompleteLength &&
window.removeEventListener("scroll", this.lazyEvent.bind(this));
}
responsiveHandler() {
this.windowWidth = window.innerWidth;
var a = this.opts.loadOption.length;
for (let s = 0; s < a; s++) {
let e = s + 1,
t = e == a ? 0 : this.opts.loadOption[e].resolution,
i = !1;
(i =
(0 == s ||
this.windowWidth <= this.opts.loadOption[s].resolution) &&
this.windowWidth > t) &&
this.opts.loadOption[s].attribute !== this.oldAttr &&
((this.targetAttr = this.opts.loadOption[s].attribute),
(this.oldAttr = this.targetAttr),
(this.attrIndex = s),
this.setResponsiveVideo());
}
}
setResponsiveVideo() {
for (let e = 0; e < this.responsiveLength; e++) {
const s = this.responsiveVideos[e],
a = s.querySelector("video");
let i = s.getAttribute(this.targetAttr);
(i = i.split(".mp4")[0]),
s.classList.contains(this.classes.loaded) &&
s.isVideoInit &&
a.querySelectorAll("source").forEach((e) => {
const t = e.getAttribute("type");
-1 < t.indexOf("webm") && (e.src = i + ".webm"),
-1 < t.indexOf("mp4") && (e.src = i + ".mp4"),
a.load(),
a.addEventListener(
"canplaythrough",
() => {
window.setTimeout(() => {
s.classList.add(this.classes.loaded);
}, 500),
this.checkCompleteVideo(),
this.getEndImage(s);
},
{ once: !0 }
);
});
}
}
setLazyVideo() {
for (let e = 0; e < this.lazyLength; e++) {
var t = window.pageYOffset,
i = t + window.innerHeight;
const n = this.lazyVideos[e];
var s = n.getBoundingClientRect(),
a = t + s.top,
s = t + s.bottom;
i >
a -
window.innerHeight *
(0 != window.pageYOffset ? this.opts.visiblePoint : 0) &&
t <
s +
window.innerHeight *
(0 != window.pageYOffset ? this.opts.visiblePoint : 0) &&
!n.isVideoInit &&
this.videoCallStack.indexOf(e) < 0 &&
(this.videoCallStack.push(e), this.setVideoSrc());
}
}
setVideoSrc() {
var e = this.videoCallStack[0];
const t = this.lazyVideos[e],
i = t.querySelector("video");
let s = t.getAttribute(this.targetAttr);
s = s.split(".mp4")[0];
e = this.opts.lazyClass.split(".");
const a = e[e.length - 1];
e = s;
this.prevVideoSrc !== e &&
(i.querySelectorAll("source").forEach((e) => {
const t = e.getAttribute("type");
-1 < t.indexOf("webm") && (e.src = s + ".webm"),
-1 < t.indexOf("mp4") && (e.src = s + ".mp4");
}),
i.load(),
i.addEventListener(
"canplaythrough",
() => {
window.setTimeout(() => {
t.classList.add(this.classes.loaded);
}, 500),
1 == this.opts.lazyClass.split(" ").length &&
t.classList.remove(a),
this.checkCompleteVideo(),
this.getEndImage(t),
this.videoCallStack.splice(0, 1),
0 < this.videoCallStack.length && this.setVideoSrc();
},
{ once: !0 }
),
(t.isVideoInit = !0)),
(this.prevVideoSrc = e);
}
getEndImage(e) {
var t =
"desktop" === this.currentDevice
? "data-src-pc"
: "tablet" === this.currentDevice
? "data-src-tablet"
: "data-src-mobile";
const i = e.querySelector(this.opts.imageEndLazyClass);
e = this.opts.imageEndLazyClass.split(".");
const s = e[e.length - 1];
i &&
!i.classList.contains(this.opts.imageLazyCompleteClass) &&
((i.src = i.getAttribute(t)),
i.addEventListener(
"load",
() => {
1 == this.opts.imageEndLazyClass.split(" ").length &&
i.classList.remove(s),
i.classList.add(this.opts.imageLazyCompleteClass);
},
{ once: !0 }
));
}
checkCompleteVideo() {
var e = Array.from(
this.el.querySelectorAll("." + this.classes.loaded)
).filter((t) => {
{
let e = 0;
if (e < this.opts.notLoadElement.length)
return !t.closest(this.opts.notLoadElement[e]);
}
});
this.lazyCompleteLength = e.length;
}
};
})(),
(function () {
"use strict";
window.VD = window.VD || {};
const l = VD.UTILS,
e = l.RESPONSIVE;
VD.VideoPlayer = class {
constructor(e, t) {
e = {
sectionElement: t.sectionElement,
videoParentElement: null,
videoElement: e,
videoController: ".video__controller",
hiddenElement: ".blind",
endImage: ".video__end-frame img",
videoLazyClass: ".js-video-src",
lazyCompleteClass: "load-complete",
imageEndLazyClass: ".js-end-img-src",
visiblePoint: t.visiblePoint || 0,
classes: {
loaded: "loaded",
ended: "ended",
paused: "paused",
playing: "playing",
isPaused: "is-paused",
},
resizeStart: null,
on: { updateController: null, updatePlayState: null },
};
(this.opts = l.def(e, t || {})),
(this.classes = e.classes),
this.init();
}
init() {
this.setElements(),
this.initOpts(),
null !== this.video &&
(this.video.paused || this.video.pause(),
(this.videoElement.playState = !1),
this.updateController(),
this.bindEvents());
}
setElements() {
(this.videoElement = this.opts.videoElement),
(this.video = this.videoElement.querySelector("video")),
null !== this.video &&
(null !== this.opts.videoParentElement
? (this.videoParentElement = this.video.closest(
this.opts.videoParentElement
))
: (this.videoParentElement = this.videoElement),
(this.videoController = this.videoParentElement.querySelector(
this.opts.videoController
)));
}
initOpts() {
this.getCurrentDevice(),
(this.autoPlay =
!!this.videoElement.dataset.autoPlay &&
JSON.parse(this.videoElement.dataset.autoPlay)),
(this.videoElement.playState = !1),
(this.videoElement.autoPlayState = !1),
(this.useController = !!this.videoController),
(this.isReset = !1);
}
getCurrentDevice() {
(this.winWidth = l.winSize().w),
this.winWidth >= e.TABLET.WIDTH
? (this.currentDevice = "desktop")
: this.winWidth > e.MOBILE.WIDTH &&
this.winWidth < e.TABLET.WIDTH
? (this.currentDevice = "tablet")
: (this.currentDevice = "mobile"),
(this.prevDevice = this.currentDevice);
}
getEndImage() {
var e =
"desktop" === this.currentDevice
? "data-src-pc"
: "tablet" === this.currentDevice
? "data-src-tablet"
: "data-src-mobile";
const t = this.videoElement.querySelector(
this.opts.imageEndLazyClass
);
var i = this.opts.imageEndLazyClass.split(".");
const s = i[i.length - 1];
t &&
((t.src = t.getAttribute(e)),
t.addEventListener(
"load",
() => {
1 == this.opts.imageEndLazyClass.split(" ").length &&
t.classList.remove(s),
t.classList.add(this.opts.lazyCompleteClass);
},
{ once: !0 }
));
}
bindEvents() {
window.addEventListener("resize", this.onResizeHandler.bind(this)),
window.addEventListener(
"scroll",
this.onScrollHandler.bind(this)
),
this.video.addEventListener(
"canplaythrough",
this.onCanplayThrough.bind(this),
{ once: !0 }
),
this.useController &&
this.videoController.addEventListener(
"click",
this.onClickController.bind(this)
);
}
onChange(e) {
if (e === this.videoElement) {
e =
"mobile" !== this.currentDevice
? "data-src-pc"
: "data-src-mobile";
let i = this.videoElement.getAttribute(e);
e = i = i.split(".mp4")[0];
this.prevVideoSrc !== e &&
((this.videoElement.playState = !1),
this.video.querySelectorAll("source").forEach((e) => {
const t = e.getAttribute("type");
-1 < t.indexOf("webm") && (e.src = i + ".webm"),
-1 < t.indexOf("mp4") && (e.src = i + ".mp4"),
this.video.load();
}),
this.videoElement.classList.remove(this.classes.playing),
this.videoElement.classList.remove(this.classes.paused),
this.video.addEventListener(
"canplaythrough",
() => {
l.isLowNetwork() || this.onPlay(), this.getEndImage();
},
{ once: !0 }
)),
(this.prevVideoSrc = e);
}
}
onLoad(e) {
if (e === this.videoElement) {
e =
"mobile" !== this.currentDevice
? "data-src-pc"
: "data-src-mobile";
let i = this.videoElement.getAttribute(e);
(i = i.split(".mp4")[0]),
(this.videoElement.playState = !1),
this.video.querySelectorAll("source").forEach((e) => {
const t = e.getAttribute("type");
-1 < t.indexOf("webm") && (e.src = i + ".webm"),
-1 < t.indexOf("mp4") && (e.src = i + ".mp4"),
this.video.load();
}),
this.video.addEventListener(
"canplaythrough",
() => {
l.isLowNetwork() || this.onPlay(), this.getEndImage();
},
{ once: !0 }
);
}
}
onPlay(e) {
var t = () => {
0 < this.video.readyState &&
!this.videoElement.playState &&
(this.video.currentTime === this.video.duration &&
(this.video.currentTime = 0),
this.autoPlay && (this.videoElement.autoPlayState = !0),
(this.videoElement.playState = !0),
this.videoElement.classList.contains(this.classes.paused)
? this.videoElement.classList.add(this.classes.playing)
: window.setTimeout(() => {
this.videoElement.classList.add(this.classes.playing);
}, 350),
this.videoElement.classList.remove(this.classes.ended),
this.videoElement.classList.remove(this.classes.paused),
window.setTimeout(() => {
this.video.play(),
(this.isReset = !1),
this.updateController(),
this.outCallback("updatePlayState", !0);
}, 350),
this.video.addEventListener(
"ended",
this.updatePlayEnded.bind(this),
{ once: !0 }
));
};
(e && e !== this.videoElement) || t();
}
onPause() {
this.video.paused || this.video.pause(),
(this.videoElement.playState = !1),
this.videoElement.classList.remove(this.classes.ended),
this.videoElement.classList.remove(this.classes.playing),
this.videoElement.classList.add(this.classes.paused),
this.updateController();
}
onEnded() {
3 < this.video.readyState &&
(this.video.ended || this.video.pause(),
(this.video.currentTime = this.video.duration),
(this.videoElement.playState = !1),
this.videoElement.classList.add(this.classes.ended),
this.videoElement.classList.remove(this.classes.playing),
this.videoElement.classList.remove(this.classes.paused),
this.updateController());
}
onReset(e) {
var t = () => {
this.video.pause(),
(this.video.currentTime = 0),
(this.videoElement.playState = !1),
(this.isReset = !0),
this.autoPlay && (this.videoElement.autoPlayState = !1),
this.videoElement.classList.remove(this.classes.ended),
this.videoElement.classList.remove(this.classes.playing),
this.videoElement.classList.remove(this.classes.paused),
this.updateController();
};
(e && e !== this.videoElement) || t();
}
onCanplayThrough() {
var e = this.opts.videoLazyClass.split("."),
e = e[e.length - 1];
this.useController &&
window.setTimeout(() => {
this.videoController.style.display = "block";
}, 500),
this.videoElement.classList.add(this.classes.loaded),
1 == this.opts.videoLazyClass.split(" ").length &&
this.videoElement.classList.remove(e),
(this.isCanplay = !0),
this.onScrollHandler(),
(this.isCanplay = !1);
}
onClickController(e) {
e.preventDefault(),
this.videoElement.playState ? this.onPause() : this.onPlay();
}
updatePlayEnded() {
this.onPause();
}
updateController() {
var e;
this.useController &&
(this.videoElement.playState
? this.videoController.classList.add(this.classes.isPaused)
: this.videoController.classList.remove(this.classes.isPaused),
(e = {
el: this.videoController,
playState: this.videoElement.playState,
}),
this.outCallback("updateController", e));
}
onScrollHandler() {
if (!this.videoElement.closest(".cm-layer")) {
var e = window.scrollY,
t =
(this.lastScrollY,
l.getHeight(this.videoElement),
l.winSize().h,
l.getNavHeight()),
i = l.getScroll().top,
s = l.getScroll().bottom,
a = l.getOffset(this.videoElement).top,
t = l.getOffset(this.videoElement).bottom - t;
const r =
this.videoElement.classList.contains(this.classes.playing) &&
this.videoElement.playState;
var n =
this.videoElement.classList.contains(this.classes.paused) &&
!this.videoElement.playState,
o =
this.videoElement.classList.contains(this.classes.ended) &&
!this.videoElement.playState;
if (
(a < s && i <= a) ||
(i < t && t < s) ||
(i < a && t < s) ||
(a < i && s < t)
) {
const r = this.isCanplay || this.isReset;
!r ||
!this.autoPlay ||
this.videoElement.playState ||
this.videoElement.autoPlayState ||
l.isLowNetwork() ||
this.onPlay();
} else
((this.autoPlay && this.videoElement.autoPlayState) ||
this.isReset) &&
(r || n || o) &&
this.onReset();
this.lastScrollY = e;
}
}
onResponsiveChange() {
window.setTimeout(() => {
(this.isCanplay = !0),
this.onReset(),
this.onScrollHandler(),
(this.isCanplay = !1);
}, 20);
}
onResizeHandler() {
l.winSize().w !== this.winWidth &&
((this.winWidth = l.winSize().w),
null == this.opts.resizeStart &&
((this.opts.resizeStart = this.winWidth),
this.resizeAnimateFunc()),
window.clearTimeout(this.resizeEndTime),
(this.resizeEndTime = window.setTimeout(
this.resizeEndFunc.bind(this),
150
)));
}
resizeAnimateFunc() {
this.setLayout(),
(this.resizeRequestFrame = l.requestAFrame.call(
window,
this.resizeAnimateFunc.bind(this)
));
}
resizeEndFunc() {
(this.opts.resizeStart = null),
l.cancelAFrame.call(window, this.resizeRequestFrame);
}
setLayout() {
this.winWidth >= e.TABLET.WIDTH
? (this.currentDevice = "desktop")
: this.winWidth > e.MOBILE.WIDTH && this.winWidth < e.TABLET.WIDTH
? (this.currentDevice = "tablet")
: (this.currentDevice = "mobile"),
this.currentDevice !== this.prevDevice &&
this.onResponsiveChange(),
(this.prevDevice = this.currentDevice);
}
outCallback(e, t) {
e = this.opts.on[e];
null != e && e(t);
}
};
})(),
(function () {
"use strict";
(e = !(o = {})),
(t = null),
(s = function () {
a(),
n(),
UTILS.isLowNetwork() &&
document.documentElement.classList.add("low_network"),
document.documentElement.classList.add("load"),
window.removeEventListener("load", s);
}),
(a = function () {
(e =
1024 <= window.innerWidth
? "desktop"
: 768 <= window.innerWidth && window.innerWidth < 1024
? "tablet"
: "mobile"),
clearTimeout(o.resizeTimeout),
(o.resizeTimeout = setTimeout(function () {
UTILS.isBrokenFixed();
}, 100)),
e != t &&
(document.documentElement.classList.add(e),
document.documentElement.classList.remove(t),
(t = e));
}),
(n = function () {
for (
var e = window.pageYOffset, t = e + window.innerHeight, i = 0;
i < o.allClickables.length;
i++
) {
var s = o.allClickables[i],
a = e + s.getBoundingClientRect().top,
n = e + UTILS.getNavHeight();
n <= a && a <= t
? (s.isVisible = !0)
: (a < n || t < a) && (s.isVisible = !1);
}
}),
(r = function (e) {
e.preventDefault(), e.stopPropagation();
var t = this,
i = parseFloat(this.dataset.sup),
s = document.querySelectorAll("#desc-section ol"),
a =
(s.forEach((e) => {
"block" === window.getComputedStyle(e).display && (s = e);
}),
s.querySelectorAll("li")),
n = s.querySelectorAll("li")[i - 1],
o = n.querySelector("span"),
r = o.innerHTML,
l =
((o.innerHTML = '
' + r + " "),
e.currentTarget,
function () {
c.call(t), o.removeEventListener("focusin", l);
}),
d = function () {
(o.innerHTML = r),
o.removeAttribute("tabindex"),
o.removeEventListener("focusout", d);
};
e.currentTarget.closest(".cm-layer") &&
((i = e.currentTarget.closest(".cm-layer")),
$(i).trigger("closeLayer", !1)),
o.addEventListener("focusin", l),
o.addEventListener("focusout", d),
n.querySelector("a").focus(),
setTimeout(() => {
n.querySelector("a").focus();
}, 0),
a.forEach((e) => e.classList.remove("is-active")),
n.classList.add("is-active");
}),
(c = function (e) {
var s;
(!document.documentElement.classList.contains("ios") &&
e &&
null == e.relatedTarget) ||
((s = this).isClicked ||
this.isVisible ||
i(this) ||
setTimeout(function () {
var e = window.pageYOffset,
t = s.getBoundingClientRect(),
i = (window.innerHeight - UTILS.getNavHeight()) / 2,
e = e - UTILS.getNavHeight() + t.top + t.height / 2;
window.scrollTo(0, e - i);
}, 10),
(this.isClicked = !1));
}),
(i = function (e) {
var e = e.parentNode,
t = e.getAttribute("id");
return (
"contents" != t &&
e != document.body &&
(!("subnav" != t && !e.classList.contains("sc-s22ultra-popup")) ||
i(e))
);
}),
(l = function () {
this.isClicked = !0;
});
var o,
e,
t,
s,
a,
n,
r,
c,
i,
l,
d = {
init: function () {
(o.resizeTimeout = null),
(o.supClicker = document.querySelectorAll("a.click_sup")),
(o.contents =
document.getElementById("contents") ||
document.getElementById("content")),
(o.allClickables = o.contents.querySelectorAll(
"a, button, input, select"
));
var e = 0;
for (
window.addEventListener("load", s),
window.addEventListener("resize", a),
window.addEventListener("scroll", n),
e = 0;
e < o.allClickables.length;
e++
) {
var t = o.allClickables[e];
(t.isClicked = !1),
(t.isVisible = !1),
t.addEventListener("focusin", c),
t.addEventListener("mousedown", l);
}
for (e = 0; e < o.supClicker.length; e++)
o.supClicker[e].addEventListener("click", r);
var i = document.documentElement.classList;
"global" == UTILS.checkRegion() ||
i.contains("mac") ||
i.contains("safari") ||
ANIUTIL.scrollController({ speed: 120, duration: 0.5 });
},
reInitSup: function () {
for (let e = 0; e < o.supClicker.length; e++)
o.supClicker[e].removeEventListener("click", r);
o.supClicker = document.querySelectorAll("a.click_sup");
for (let e = 0; e < o.supClicker.length; e++)
o.supClicker[e].addEventListener("click", r);
},
};
window.initialize = d;
})(),
(function () {
"use strict";
window.VD = window.VD || {};
const n = VD.UTILS,
e = n.RESPONSIVE;
VD.HeightMatch = class {
constructor(e = container, t) {
var i = {
container: e || ".heightmatch-wrap",
childElement: ">li",
notCompareElement: null,
pushElement: null,
matchElement: ".heightmatch-cont",
column: 3,
pushObjs: null,
useDestroyHeight: !0,
destroyType: !1,
resizeStart: null,
breakpoints: {},
matchBefore: null,
matchAfter: null,
loadAfter: null,
};
(this.opts = n.def(i, t || {})),
(this.classes = i.classes),
(this.obj = $(document.querySelector(e))),
this.init();
}
init() {
null !== this.obj &&
(this.setElements(),
this.setOpts(),
this.setRows(),
this.buildHeightControl(),
this.outCallback("loadAfter"),
this.bindEvents());
}
setElements() {
(this.objChild = this.obj.find(this.opts.childElement)),
(this.opts.pushObjs = null) == this.opts.pushElement
? (this.opts.pushObjs = this.objChild.not(
this.opts.notCompareElement
))
: (this.opts.pushObjs = this.objChild
.not(this.opts.notCompareElement)
.find(this.opts.pushElement));
}
setOpts() {
(this.currentDevice = !1), (this.prevDevice = null);
var e,
t,
i = n.winSize().w,
s = this.opts.breakpoints,
a = [];
for (t in s)
e = i <= t ? (a.push(t), Math.min.apply(null, a)) : null;
(this.breakOpts = n.def({}, this.opts)),
null != e && (this.breakOpts = n.def(this.breakOpts, s[e]));
}
bindEvents() {
window.addEventListener("resize", this.onResizeHandler.bind(this));
}
onResizeHandler() {
n.winSize().w !== this.winWidth &&
((this.winWidth = n.winSize().w),
null == this.opts.resizeStart &&
((this.opts.resizeStart = this.winWidth),
this.outCallback("matchBefore"),
this.resizeAnimateFunc()),
window.clearTimeout(this.resizeEndTime),
(this.resizeEndTime = window.setTimeout(
this.resizeEndFunc.bind(this),
150
)));
}
resizeAnimateFunc() {
this.setLayout(),
this.setOpts(),
this.setRows(),
this.buildHeightControl(),
(this.resizeRequestFrame = n.requestAFrame.call(
window,
this.resizeAnimateFunc.bind(this)
));
}
resizeEndFunc() {
(this.opts.resizeStart = null),
this.setOpts(),
this.setRows(),
this.buildHeightControl(),
this.outCallback("matchAfter"),
n.cancelAFrame.call(window, this.resizeRequestFrame);
}
setLayout() {
this.winWidth >= e.TABLET.WIDTH
? (this.currentDevice = "desktop")
: this.winWidth > e.MOBILE.WIDTH && this.winWidth < e.TABLET.WIDTH
? (this.currentDevice = "tablet")
: (this.currentDevice = "mobile"),
this.currentDevice,
this.prevDevice,
(this.prevDevice = this.currentDevice);
}
setRows() {
this.rowNum = Math.ceil(
this.objChild.length / this.breakOpts.column
);
}
buildHeightControl() {
this.breakOpts.column <= 1
? null !== this.opts.pushObjs &&
this.opts.pushObjs.css("height", "")
: this.buildHeight();
}
buildHeight() {
this.heightArray = [];
for (var e = 0; e < this.rowNum; e++) this.heightArray[e] = [];
for (var e = 0, t = this.objChild.length; e < t; e++) {
var i = parseInt(e / this.breakOpts.column, 10),
s = this.objChild
.eq(e)
.not(this.opts.notCompareElement)
.find(this.opts.matchElement),
s = s.is(":visible") ? Math.ceil(s.outerHeight()) : 0;
this.heightArray[i].push(s);
}
for (e = 0; e < this.rowNum; e++)
this.heightArray[e] = Math.max.apply(null, this.heightArray[e]);
this.setHeightLayout();
}
setHeightLayout() {
for (var e = 0, t = this.objChild.length; e < t; e++) {
var i = parseInt(e / this.breakOpts.column, 10);
(null == this.opts.pushElement
? this.objChild.eq(e).not(this.opts.notCompareElement)
: this.objChild
.eq(e)
.not(this.opts.notCompareElement)
.find(this.opts.pushElement)
).height(this.heightArray[i]);
}
}
destroy() {
this.opts.useDestroyHeight &&
null !== this.opts.pushObjs &&
this.opts.pushObjs.css("height", ""),
(this.opts.destroyType = !0),
this.bindEvents(!1);
}
reInit() {
this.setElements(),
this.setOpts(),
this.setRows(),
this.buildHeightControl(),
this.onResizeHandler(),
this.opts.destroyType &&
((this.opts.destroyType = !1), this.bindEvents(!0));
}
outCallback(e) {
e = this.opts[e];
null != e && e();
}
};
})(),
(function (e) {
e.HiveLayer = (function () {
"use strict";
var e,
t = window,
s = t.jQuery,
i = t.document,
a = t.VD.UTILS,
l = [];
function n(e, t) {
if (!(this instanceof n)) return new n(e, t);
var i = {
effect: "default",
layerWrapElements: e,
layerBody: ".cm-layer__body",
layerElements: ".cm-layer__wrapper",
openerElements: ".js-layer-opener",
closerElements: ".js-layer-closer",
dimmedElements: ".cm-layer__dimmed",
classAttr: { htmlToggle: "is-layer-open", isAsync: "is-async" },
customEvent: ".HiveLayer" + new Date().getTime() + Math.random(),
openerTarget: null,
useOutside: false,
useEscape: true,
useCloseFocus: true,
customToggle: false,
dimmedDuration: 250,
fps: 120,
easing: "swing",
duration: 250,
on: {
layerOpenBefore: null,
layerOpenAfter: null,
layerCloseBefore: null,
layerCloseAfter: null,
},
ariaNotHidden: [],
};
if (!(this.layerWrap = i.layerWrapElements).length) return;
this.layerWrap = s(i.layerWrapElements);
this.opts = a.def(i, t || {});
this.init();
}
return (
(n.prototype = {
init: function () {
this.initOpts();
this.setElements();
this.buildTween();
this.bindEvents(true);
this.layerWrap.data("HiveLayer", this);
},
initOpts: function () {
this.layerWrapInstance = "#" + this.layerWrap.attr("id");
},
initLayout: function () {
const e = document.querySelector("body");
e.appendChild(this.layerWrap[0]);
},
setElements: function () {
this.content = document.querySelector("#contents");
this.wrap = document.querySelector("#wrap");
this.layerBody = this.layerWrap.find(this.opts.layerBody);
this.layerObj = this.layerWrap.find(this.opts.layerElements);
this.closerObj = this.layerWrap.find(this.opts.closerElements);
this.dimmedObj = this.layerWrap.find(this.opts.dimmedElements);
this.baseContentsClickable =
document.documentElement.querySelectorAll(
"a, input, select, textarea, button, video, iframe"
);
this.layerContentsClickable =
this.layerWrap[0].querySelectorAll(
"a, input, select, textarea, button, video, iframe"
);
},
buildTween: function () {
a.def(this, {
tweens: {
instance: [],
kill: s.proxy(function () {
for (
var e = 0, t = this.tweens.instance.length;
e < t;
e++
)
this.tweens.instance[e].kill();
this.tweens.instance = [];
}, this),
},
});
},
bindEvents: function (e) {
if (e) {
window.addEventListener(
"resize",
this.onResizeHandler.bind(this)
);
s(i).on(
"click clickCustom",
this.opts.openerElements +
'[data-target-layer="' +
this.layerWrapInstance +
'"]',
s.proxy(this.onLayerOpen, this)
);
this.layerWrap.on(
"openLayer",
s.proxy(this.onLayerOpen, this)
);
this.closerObj.on(
"mousedown click clickCustom",
s.proxy(this.onLayerClose, this)
);
this.layerWrap.on(
"layerSetOptions",
s.proxy(this.setOptions, this)
);
if (this.opts.useEscape)
this.layerObj.on(
"keydown",
s.proxy(this.onEscapeClose, this)
);
} else {
s(i).off("click clickCustom");
window.removeEventListener(
"resize",
this.onResizeHandler.bind(this)
);
this.layerWrap.off("openLayer");
this.closerObj.off("mousedown click clickCustom");
this.layerWrap.off("layerSetOptions");
if (this.opts.useEscape) this.layerObj.off("keydown");
}
},
bindOutsideEvents: function (e) {
if (!this.opts.useOutside) return;
if (e)
this.layerObj.on(
"clickoutside touchendoutside",
s.proxy(this.onLayerOutsideFunc, this)
);
else this.layerObj.off("clickoutside touchendoutside");
},
bindCloseEvents: function (e) {
if (e)
this.layerWrap.on(
"closeLayer",
s.proxy(this.closeLayer, this)
);
else this.layerWrap.off("closeLayer");
},
setOptions: function (e, t) {
a.def(this.opts, t || {});
if (t.customToggle) this.opts.effect = "default";
},
onLayerOpen: function (e) {
e.preventDefault();
document.documentElement.classList.add("is-layer-popup-opened");
a.hiddenScroll();
setTimeout(() => {
this.dimmedObj.on(
"mousedown click clickCustom",
s.proxy(this.onLayerClose, this)
);
}, 500);
if (e.type === "click" || e.type === "clickCustom")
this.opts.openerTarget = s(e.currentTarget);
if (e.type === "click")
if (
this.opts.openerTarget.hasClass(this.opts.classAttr.isAsync)
)
return;
this.layerViewType = "open";
l.push({ POPUPWRAP: this.layerWrap });
if (document.querySelector("html.load div#header")) {
document.querySelector(
"html.load div#header"
).style.opacity = 0;
document.querySelector(
"html.load div#header"
).style.pointerEvents = "none";
}
this.bindCloseEvents(true);
if (!this.opts.customToggle) {
this.layerWrap.css({ opacity: 0, display: "block" });
this.outCallback("layerOpenBefore");
this.layerWrap.css("opacity", "");
this.openAfterBugFunc();
} else this.outCallback("layerOpenBefore");
},
onLayerOpenAfter: function () {
this.layerWrap[0].addEventListener("touchmove", function (e) {
e.preventDefault();
});
this.exceptOpenLayer();
this.outCallback("layerOpenAfter");
window.setTimeout(() => {
this.closerObj.focus();
});
},
openAfterBugFunc: function () {
t.clearTimeout(this.openAfterTimeout);
this.openAfterTimeout = t.setTimeout(
s.proxy(this.onLayerOpenAfter, this),
30
);
},
onLayerClose: function (e) {
var t = s(e.currentTarget);
if (e.type === "mousedown") {
if (!a.isDevice) {
e.stopPropagation();
this.opts.useCloseFocus = false;
}
} else if (e.type === "click" || e.type === "clickCustom") {
e.preventDefault();
if (e.type === "click")
if (t.hasClass(this.opts.classAttr.isAsync)) return;
this.layerWrap.trigger("closeLayer");
this.dimmedObj.off("mousedown click clickCustom");
}
},
exceptCloseLayer: function () {
this.baseContentsClickable.forEach((e, t) => {
const i = e;
const s = i.getAttribute("data-prev-tabindex");
const a = i.getAttribute("data-prev-aria-hidden");
if (!!s) i.setAttribute("tabindex", s);
else i.removeAttribute("tabindex");
if (!!a) i.setAttribute("aria-hidden", a);
else i.removeAttribute("aria-hidden");
i.removeAttribute("data-prev-tabindex");
i.removeAttribute("data-prev-aria-hidden");
});
},
exceptOpenLayer: function () {
this.baseContentsClickable.forEach((a, e) => {
this.layerContentsClickable.forEach((e) => {
if (a !== e) {
const t = a;
const i = t.getAttribute("tabindex");
const s = t.getAttribute("aria-hidden");
if (!!i) t.setAttribute("data-prev-tabindex", i);
if (!!s) t.setAttribute("data-prev-aria-hidden", s);
t.setAttribute("tabindex", "-1");
t.setAttribute("aria-hidden", "true");
}
});
});
},
closeLayer: function () {
document.documentElement.classList.remove(
"is-layer-popup-opened"
);
this.closeType = arguments[1];
this.layerViewType = "close";
this.outCallback("layerCloseBefore");
this.popupOpenPropsControl();
a.visibleScroll();
this.exceptCloseLayer();
this.wrap.removeAttribute("aria-hidden", "true");
if (document.querySelector("html.load div#header")) {
document.querySelector(
"html.load div#header"
).style.opacity = 1;
document.querySelector(
"html.load div#header"
).style.pointerEvents = "unset";
}
t.clearTimeout(this.closeBeforeTimeout);
this.closeBeforeTimeout = t.setTimeout(
s.proxy(this.closeBeforeBugFunc, this),
30
);
},
onEscapeClose: function (e) {
var t = e.which || e.keyCode;
if (t !== 27) return;
this.layerWrap.trigger("closeLayer");
},
onLayerOutsideFunc: function () {
this.layerWrap.trigger("closeLayer");
},
closeBeforeBugFunc: function () {
if (!this.opts.customToggle)
this.layerWrap.stop(true, true).hide();
this.closeAfterBugFunc();
},
closeAfterBugFunc: function () {
t.clearTimeout(this.closeAfterTimeout);
this.closeAfterTimeout = t.setTimeout(
s.proxy(this.onLayerCloseAfter, this),
30
);
},
popupOpenPropsControl: function () {
var e = l;
for (var t = 0, i = e.length; t < i; t++) {
var s = e[t],
a = s["POPUPWRAP"][0];
if (a === this.layerWrap[0]) e[t] = null;
}
for (var n = 0, o = e.length; n < o; o--) {
var r = e[o - 1];
if (r === null) e.splice(o - 1, 1);
}
},
onLayerCloseAfter: function () {
if (this.opts.openerTarget !== null) {
if (this.closeType !== false) this.opts.openerTarget.focus();
this.opts.openerTarget = null;
}
this.opts.useCloseFocus = true;
this.bindCloseEvents(false);
this.outCallback("layerCloseAfter");
},
onResizeHandler: function () {
if (window.innerWidth >= 1024) this.currDevice = "desktop";
else if (window.innerWidth >= 768 && window.innerWidth < 1024)
this.currDevice = "tablet";
else this.currDevice = "mobile";
if (this.currDevice != this.prevDevice) {
this.onResponsiveChange();
this.prevDevice = this.currDevice;
}
},
onResponsiveChange: function () {
clearTimeout(this.responsiveTimeout);
this.responsiveTimeout = setTimeout(() => {
a.offPopupAccessibility(this.content);
if (
document.documentElement.classList.contains(
"is-layer-popup-opened"
)
)
a.onPopupAccessibility(this.content);
}, 500);
},
outCallback: function (e) {
var t = this.opts.on[e];
this.layerWrap.trigger(e, this);
if (t == null) return;
t(this);
},
styleDestroy: function () {
this.dimmedObj.attr("style", "");
this.layerWrap.attr("style", "");
this.layerBody.attr("style", "");
this.layerObj.attr("style", "");
},
destroy: function () {
document.documentElement.classList.remove(
"is-layer-popup-opened"
);
this.layerWrap.hide();
a.visibleScroll();
this.exceptCloseLayer();
this.wrap.removeAttribute("aria-hidden", "true");
this.tweens.kill();
this.styleDestroy();
this.bindEvents(false);
this.bindCloseEvents(false);
},
}),
n
);
})();
})(window),
(function () {
function e() {
if (
(document.documentElement.classList.remove("is-layer-popup-opened"),
d.visibleScroll(),
l.layer)
) {
l.wrap.removeAttribute("aria-hidden"),
l.layer.parentNode.removeChild(l.layer),
(l.layer = null);
for (var e = 0; e < l.baseContentsClickable.length; e++) {
var t = l.baseContentsClickable[e];
var i = t.getAttribute("data-prev-tabindex");
var s = t.getAttribute("data-prev-aria-hidden");
if (!!i) t.setAttribute("tabindex", i);
else t.removeAttribute("tabindex");
if (!!s) t.setAttribute("aria-hidden", s);
else t.removeAttribute("aria-hidden");
t.removeAttribute("data-prev-tabindex");
t.removeAttribute("data-prev-aria-hidden");
}
setTimeout(function () {
l.opener && l.opener.focus();
}, 1100);
}
}
function r(e) {
return (
"https://www.youtube.com/embed/" +
e +
"?showinfo=0&wmode=transparent&autoplay=1&rel=0"
);
}
var l, d, t, i, s, c;
(window.VD = window.VD || {}),
(window.VD.video = window.VD.video || {}),
(VD.video =
((l = {}),
(d = VD.UTILS),
(t = !1),
(i = null),
(s = function () {
(t =
1024 <= window.innerWidth
? "desktop"
: 768 <= window.innerWidth && window.innerWidth < 1024
? "tablet"
: "mobile") != i &&
(clearTimeout(l.responsiveTimeout),
(l.responsiveTimeout = setTimeout(function () {
d.offPopupAccessibility(l.contents),
document.documentElement.classList.contains(
"is-layer-popup-opened"
) && d.onPopupAccessibility(l.contents);
}, 500)),
(i = t));
}),
(c = function () {
e(),
window.VD.compare && window.VD.compare.setSlideAccessibility();
}),
{
init: function () {
(l.wrap = document.querySelector("#wrap")),
l.wrap &&
((l.contents = document.querySelector("#contents")),
(l.responsiveTimeout = null),
(l.layer = null),
(l.opener = null),
(l.baseContentsClickable = null),
(l.closeButton = null),
window.addEventListener("resize", s));
},
showVideoLayer: function (e, t, i) {
document.documentElement.classList.add("is-layer-popup-opened"),
d.hiddenScroll();
e = e.split("?v=")[1];
if (
(l.wrap.setAttribute("aria-hidden", "true"),
(l.baseContentsClickable =
document.documentElement.querySelectorAll(
"a, input, select, textarea, button, video, iframe"
)),
!l.layer)
) {
(l.layer = document.createElement("div")),
l.layer.setAttribute("id", "layer-youtube"),
l.layer.classList.add("m_layer-youtube"),
l.layer.classList.add("show"),
(l.layer.innerHTML = [
'
',
'
',
'
Movie player Layer ',
'
',
'
',
'Youtube Close ',
" ",
'
',
'',
"
",
"
",
"
",
].join("")),
l.layer.addEventListener("touchmove", function (e) {
e.preventDefault();
}),
(l.closeButton = l.layer.querySelector(
'button[class*="_btn_close"]'
)),
l.closeButton.addEventListener("click", c);
for (var s = 0; s < l.baseContentsClickable.length; s++) {
var a = l.baseContentsClickable[s];
var n = a.getAttribute("tabindex");
var o = a.getAttribute("aria-hidden");
if (!!n) a.setAttribute("data-prev-tabindex", n);
if (!!o) a.setAttribute("data-prev-aria-hidden", o);
a.setAttribute("tabindex", "-1");
a.setAttribute("aria-hidden", "true");
}
document.body.appendChild(l.layer),
t && (l.opener = t),
setTimeout(function () {
l.closeButton && l.closeButton.focus();
}, 1100);
}
},
hideVideoLayer: e,
getYoutubePlayerLink: r,
}));
})(),
(function () {
"use strict";
window.VD = window.VD || {};
VD.Colors = class {
constructor(e = container, t) {
var i = {
el: e,
featureHide: "is-feature-hide",
swiperEl: ".vd-colors__cont",
tabList: ".vd-colors__tab",
tabPanels: ".vd-colors__tabpanel-wrap",
swiperSlide: ".vd-colors__tabpanel",
tabImage: ".vd-colors__tabpanel-img",
swiperArrow: ".vd-colors__arrow-wrap",
nextArrow: ".vd-colors__arrow-next",
prevArrow: ".vd-colors__arrow-prev",
swiperThumbnail: ".vd-colors__tab-wrap",
swiperThumbnailSlide: ".vd-colors__tab-box",
swiperThumbnailSlideItem: ".vd-colors__tab-item",
controlsEl: ".vd-colors__controls-cta",
controlsHiddenEl: ".blind",
swiperAutoplayStopButtonEl: ".swiper-autoplay-stop-btn",
antiVisual: ".anti-reflective__visual",
antiImageWrap: ".anti-reflective__image-wrap",
beforeImageEl: ".anti-reflective__before",
afterImageEl: ".anti-reflective__after",
btnSlider: ".btn-slider",
controlDragEl: ".anti-reflective__bar",
controlDrag: ".anti-reflective__bar-controller",
classes: {
isShow: "is-show",
isActive: "is-active",
isOn: "is-on",
isNotDrag: "is-not-drag",
isSelected: "is-selected",
},
orientation: "horizontal",
sliderPercent: 0.5,
move: 50,
on: { updateImageLoader: null },
};
(this.opts = UTILS.def(i, t || {})),
(this.classes = i.classes),
(this.el = document.querySelector(e)),
this.init();
}
init() {
null === this.el ||
this.el.classList.contains(this.opts.featureHide) ||
(this.setElements(),
this.initOpts(),
this.navigatorTagging(),
this.initLayout(),
this.initHandlers(),
this.buildSwiper(),
this.bindEvents(),
this.containerObserver(),
this.onScrollHandler());
}
containerObserver() {
const t = this;
const e = new IntersectionObserver(
function (e) {
e.forEach((e) => {
e.isIntersecting && t.el.classList.add("is-start");
});
},
{ rootMargin: "0px", threshold: 0.5 }
);
e.observe(t.el);
}
initOpts() {
(this.offsetX = 0),
(this.offsetY = 0),
(this.sliderPercent = this.opts.sliderPercent),
(this.isReachEl = !1),
(this.firstImageLoad = !1),
this.getCurrentDevice(),
(this.currentIndex = 0),
(this.prevIndex = 0);
}
initLayout() {
this.updateSliderLayout(this.sliderPercent),
this.swiperThumbnailSlide[this.currentIndex].classList.add(
this.classes.isSelected
);
}
setElements() {
(this.swiperEl = this.el.querySelector(this.opts.swiperEl)),
(this.tabList = this.el.querySelector(this.opts.tabList)),
(this.tabItem = this.tabList.querySelectorAll(this.opts.tabItem)),
(this.tabPanels = this.el.querySelector(this.opts.tabPanels)),
(this.swiperSlide = this.tabPanels.querySelectorAll(
this.opts.swiperSlide
)),
(this.tabImage = this.el.querySelectorAll(this.opts.tabImage)),
(this.swiperArrow = this.el.querySelector(this.opts.swiperArrow)),
(this.nextArrow = this.el.querySelector(this.opts.nextArrow)),
(this.prevArrow = this.el.querySelector(this.opts.prevArrow)),
(this.swiperThumbnail = this.el.querySelector(
this.opts.swiperThumbnail
)),
(this.swiperThumbnailSlide = this.el.querySelectorAll(
this.opts.swiperThumbnailSlide
)),
(this.swiperThumbnailSlideItem = this.el.querySelectorAll(
this.opts.swiperThumbnailSlideItem
)),
(this.controlsEl = this.el.querySelector(this.opts.controlsEl)),
(this.swiperAutoplayStopButtonEl = this.el.querySelector(
this.opts.swiperAutoplayStopButtonEl
)),
(this.antiVisual = this.el.querySelector(this.opts.antiVisual)),
(this.antiImageWrap = this.el.querySelector(
this.opts.antiImageWrap
)),
(this.btnSlider = this.el.querySelectorAll(this.opts.btnSlider)),
(this.beforeImageEl = this.el.querySelector(
this.opts.beforeImageEl
)),
(this.beforeImage = this.beforeImageEl.querySelector("img")),
(this.beforeSlider = this.beforeImageEl.querySelector(
this.opts.btnSlider
)),
(this.afterImageEl = this.el.querySelector(
this.opts.afterImageEl
)),
(this.afterImage = this.afterImageEl.querySelector("img")),
(this.afterSlider = this.afterImageEl.querySelector(
this.opts.btnSlider
)),
(this.controlDragEl = this.el.querySelector(
this.opts.controlDragEl
)),
(this.controlDrag = this.el.querySelector(this.opts.controlDrag));
}
initHandlers() {
(this.onLoadHandler = this.onLoadHandler.bind(this)),
(this.onResizeHandler = this.onResizeHandler.bind(this)),
(this.onScrollHandler = this.onScrollHandler.bind(this)),
(this.onKeyDownHandler = this.onKeyDownHandler.bind(this)),
(this.onDownHandler = this.onDownHandler.bind(this)),
(this.onMoveHandler = this.onMoveHandler.bind(this)),
(this.onMoveEndHandler = this.onMoveEndHandler.bind(this)),
(this.onClickHandler = this.onClickHandler.bind(this)),
(this.onClickThumbnail = this.onClickThumbnail.bind(this)),
(this.onMouseEnter = this.onMouseEnter.bind(this)),
(this.onMouseLeave = this.onMouseLeave.bind(this));
}
bindEvents() {
window.addEventListener("load", this.onLoadHandler),
window.addEventListener("resize", this.onResizeHandler),
window.addEventListener("scroll", this.onScrollHandler),
this.swiperThumbnailSlideItem.forEach((e) => {
e.addEventListener("click", this.onClickThumbnail);
}),
this.antiVisual.addEventListener("mouseenter", this.onMouseEnter),
this.antiVisual.addEventListener("mouseleave", this.onMouseLeave);
}
afterBindEvents(e) {
e
? (this.controlDrag.addEventListener(
"mousedown",
this.onDownHandler
),
this.controlDrag.addEventListener(
"touchstart",
this.onDownHandler
),
this.controlDrag.addEventListener(
"keydown",
this.onKeyDownHandler
),
this.btnSlider.forEach((e) => {
e.addEventListener("click", this.onClickHandler);
}))
: (this.controlDrag.removeEventListener(
"mousedown",
this.onDownHandler
),
this.controlDrag.removeEventListener(
"touchstart",
this.onDownHandler
),
this.controlDrag.removeEventListener(
"keydown",
this.onKeyDownHandler
),
this.btnSlider.forEach((e) => {
e.removeEventListener("click", this.onClickHandler);
}));
}
onMouseEnter() {
this.swiper.instance.autoplay.stop();
}
onMouseLeave() {
this.swiper.instance.autoplay.start();
}
navigatorTagging() {
const i = digitalData.page.pageInfo.pageTrack,
s = this.el.querySelector(".vd-common__title").dataset.title;
this.swiperThumbnailSlide.forEach((e) => {
const t = e.querySelector(".vd-colors__tab-item");
e = e
.querySelector(".vd-colors__tab-title")
.textContent.toLowerCase();
t.setAttribute("an-la", s + ":" + e),
t.setAttribute(
"an-tr",
`color accuracy-${i}-cta-content_click`
);
}),
this.prevArrow.setAttribute(
"an-tr",
`color accuracy-${i}-arrow-indication`
),
this.nextArrow.setAttribute(
"an-tr",
`color accuracy-${i}-arrow-indication`
);
}
getCurrentDevice() {
window.innerWidth >= UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "desktop")
: window.innerWidth > UTILS.RESPONSIVE.MOBILE.WIDTH &&
window.innerWidth < UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "tablet")
: (this.currDevice = "mobile");
}
getOffset(e) {
return (
(this.offsetWidth = this.antiVisual.offsetWidth),
(this.offsetHeight = this.antiVisual.offsetHeight),
{
w: this.offsetWidth,
h: this.offsetHeight,
cw: e * this.offsetWidth,
ch: e * this.offsetHeight,
}
);
}
updateImageLoader() {
var e = window.innerHeight,
e = UTILS.getScroll().top - e,
t = UTILS.getScroll().bottom,
i = UTILS.getOffset(this.el);
((t > i.top && e <= i.top) ||
(e < i.bottom && t > i.bottom) ||
(e < i.top && t > i.bottom) ||
(e > i.top && t < i.bottom)) &&
!this.firstImageLoad &&
((e = this.el.querySelectorAll(".js-start-img-src")),
this.outCallback("updateImageLoader", e),
(this.firstImageLoad = !0));
}
getSliderPercentage(e, t, i) {
let s;
s =
"px" === i
? "vertical" === this.opts.orientation
? (t - this.offsetY) / this.imageHeight
: (e - this.offsetX) / this.imageWidth
: "vertical" === this.opts.orientation
? t / this.imageHeight
: e / this.imageWidth;
return (i = s), (t = 0), (e = 1), Math.max(t, Math.min(e, i));
}
setSliderOpts() {
(this.offsetX = UTILS.getOffset(this.antiVisual).left),
(this.offsetY = UTILS.getOffset(this.antiVisual).top),
(this.imageWidth = this.beforeImage.offsetWidth),
(this.imageHeight = this.beforeImage.offsetHeight);
}
sliderGuideAnimation() {
if (!this.antiVisual.classList.contains(this.classes.isActive)) {
this.antiVisual.classList.add(this.classes.isActive);
const e = $(this.controlDragEl),
t = $(this.beforeImage),
i = $(this.afterImage);
$(this.beforeSlider), $(this.afterSlider);
e
.animate(
{ fontSize: this.offset.cw },
{
duration: 1300,
step: (e, t) => {
e = this.offset.cw + e;
this.controlDragEl.style.left = e + "px";
},
complete: () => {
e.css("font-size", "0");
},
}
)
.delay(50)
.animate(
{ fontSize: this.offset.cw },
{
duration: 1300,
step: (e, t) => {
e = this.offset.w - e;
this.controlDragEl.style.left = e + "px";
},
complete: () => {
e.css("font-size", this.offset.cw + "px"),
this.afterBindEvents(!0),
this.antiVisual.classList.remove(this.classes.isActive);
},
}
),
t
.animate(
{ fontSize: this.offset.cw },
{
duration: 1300,
step: (e, t) => {
e = this.offset.cw + e;
this.beforeImageEl.style.width = e + "px";
},
complete: () => {
t.css("font-size", "0");
},
}
)
.delay(50)
.animate(
{ fontSize: this.offset.cw },
{
duration: 1300,
step: (e, t) => {
e = this.offset.w - e;
this.beforeImageEl.style.width = e + "px";
},
complete: () => {
t.css("font-size", this.offset.cw + "px");
},
}
),
i
.animate(
{ fontSize: this.offset.cw },
{
duration: 1300,
step: (e, t) => {
e = this.offset.cw - e;
this.afterImageEl.style.width = e + "px";
},
complete: () => {
i.css("font-size", "0");
},
}
)
.delay(50)
.animate(
{ fontSize: this.offset.cw },
{
duration: 1300,
step: (e, t) => {
this.afterImageEl.style.width = e + "px";
},
complete: () => {
i.css("font-size", this.offset.cw + "px");
},
}
);
}
}
updateSliderLayout(e) {
(this.offset = this.getOffset(e)),
"vertical" === this.opts.orientation
? ((this.controlDragEl.style.top = this.offset.ch + "px"),
(this.beforeImageEl.style.height = this.offset.ch + "px"),
(this.afterImageEl.style.height =
this.offset.h - this.offset.ch + "px"))
: ((this.controlDragEl.style.left = this.offset.cw + "px"),
(this.beforeImageEl.style.width = this.offset.cw + "px"),
(this.afterImageEl.style.width =
this.offset.w - this.offset.cw + "px")),
this.beforeImageEl
.querySelector("img")
.style.removeProperty("font-size"),
this.afterImageEl
.querySelector("img")
.style.removeProperty("font-size"),
this.controlDragEl.style.removeProperty("font-size");
}
onClickHandler(e) {
this.setSliderOpts();
let t, i;
var s;
this.antiVisual.classList.add(this.classes.isNotDrag),
(i =
"vertical" !== this.opts.orientation
? ((s = parseFloat(this.controlDragEl.style.left || 50)),
(t = e.currentTarget.classList.contains("js-before")
? s - this.opts.move
: s + this.opts.move),
parseFloat(window.getComputedStyle(this.controlDragEl).top))
: ((s = parseFloat(this.controlDragEl.style.top || 50)),
e.currentTarget.classList.contains("js-before")
? ((t = parseFloat(
window.getComputedStyle(this.controlDragEl).left
)),
s - this.opts.move)
: ((t = parseFloat(
window.getComputedStyle(this.controlDragEl).left
)),
s + this.opts.move))),
(this.sliderPercent = this.getSliderPercentage(t, i, "%")),
this.updateSliderLayout(this.sliderPercent);
}
onKeyDownHandler(e) {
this.setSliderOpts();
let t, i;
var s;
this.antiVisual.classList.add(this.classes.isNotDrag),
"vertical" !== this.opts.orientation
? ((s = parseFloat(this.controlDragEl.style.left || 50)),
37 === e.keyCode
? ((t = s - this.opts.move),
(i = parseFloat(
window.getComputedStyle(this.controlDragEl).top
)))
: 39 === e.keyCode &&
((t = s + this.opts.move),
(i = parseFloat(
window.getComputedStyle(this.controlDragEl).top
))))
: ((s = parseFloat(this.controlDragEl.style.top || 50)),
38 === e.keyCode
? ((t = parseFloat(
window.getComputedStyle(this.controlDragEl).left
)),
(i = s - this.opts.move))
: 40 === e.keyCode &&
((t = parseFloat(
window.getComputedStyle(this.controlDragEl).left
)),
(i = s + this.opts.move))),
(this.sliderPercent = this.getSliderPercentage(t, i, "%")),
this.updateSliderLayout(this.sliderPercent);
}
onDownHandler(e) {
window.removeEventListener("mousemove", this.onMoveHandler),
window.addEventListener("mousemove", this.onMoveHandler),
window.removeEventListener("mouseup", this.onMoveEndHandler),
window.addEventListener("mouseup", this.onMoveEndHandler),
window.removeEventListener("touchmove", this.onMoveHandler),
window.addEventListener("touchmove", this.onMoveHandler, {
passive: !1,
}),
window.removeEventListener("touchend", this.onMoveEndHandler),
window.addEventListener("touchend", this.onMoveEndHandler),
this.antiVisual.classList.remove(this.classes.isNotDrag),
(this.controlDrag.style.cursor = "grabbing"),
(this.controlDrag.style.userSelect = "none"),
((((e.distX > e.distY && e.distX < -e.distY) ||
(e.distX < e.distY && e.distX > -e.distY)) &&
"vertical" !== this.opts.orientation) ||
(((e.distX < e.distY && e.distX < -e.distY) ||
(e.distX > e.distY && e.distX > -e.distY)) &&
"vertical" === this.opts.orientation)) &&
e.preventDefault(),
this.setSliderOpts();
}
onMoveHandler(e) {
e.preventDefault();
let t, i;
"touchmove" === e.type
? ((t = e.touches[0].pageX), (i = e.touches[0].pageY))
: "mousemove" === e.type && ((t = e.pageX), (i = e.pageY)),
(this.sliderPercent = this.getSliderPercentage(t, i, "px")),
this.updateSliderLayout(this.sliderPercent);
}
onMoveEndHandler() {
window.removeEventListener("mousemove", this.onMoveHandler),
window.removeEventListener("mouseup", this.onMoveEndHandler),
window.removeEventListener("touchmove", this.onMoveHandler),
window.removeEventListener("touchend", this.onMoveEndHandler),
(this.controlDrag.style.cursor = "grab"),
(this.controlDrag.style.userSelect = "auto");
}
onLoadHandler() {
this.onResizeAntiImage();
}
onResizeAntiImage() {
var e = this.antiVisual.offsetWidth;
(this.beforeImage.style.width = e + "px"),
(this.afterImage.style.width = e + "px");
}
onResizeHandler() {
this.onResizeHandler(),
window.removeEventListener("load", this.onLoadHandler);
}
onResizeHandler() {
this.onResponsive(),
this.onResizeAntiImage(),
clearTimeout(this.resizeTimeout),
(this.resizeTimeout = setTimeout(() => {
this.onResponsiveEnd();
}, 100)),
this.currDevice != this.prevDevice &&
(this.onResponsiveChange(),
(this.prevDevice = this.currDevice));
}
onResponsive() {
this.getCurrentDevice(),
this.updateSliderLayout(this.sliderPercent),
this.antiVisual.classList.remove(this.classes.isNotDrag);
}
onResponsiveEnd() {}
onResponsiveChange() {}
onScrollHandler() {
this.onResizeAntiImage();
var e = window.scrollY,
t = window.scrollY + window.innerHeight,
i = this.el.offsetHeight,
s = e + Math.floor(this.el.getBoundingClientRect().top),
i =
e +
Math.floor(this.el.getBoundingClientRect().top) +
i +
window.innerHeight,
s =
(s < e && t < i
? this.swiper.instance.autoplay.start()
: this.swiper.instance.autoplay.stop(),
window.pageYOffset),
e = window.outerHeight / 2;
this.antiVisual.offsetTop - e <= s &&
!this.isReachEl &&
(this.onResizeAntiImage(), (this.isReachEl = !0));
}
onClickThumbnail(e) {
this.afterBindEvents(!1);
e = e.currentTarget.parentElement;
const t = [...e.parentElement.children];
(this.prevIndex = this.currentIndex),
(this.currentIndex = t.indexOf(e)),
this.updateSwiperIndex(),
this.swiper.instance.slideTo(this.currentIndex),
this.swiper.instance.autoplay.stop();
}
updateSwiperIndex() {
this.swiperThumbnailSlide[this.prevIndex].classList.remove(
this.classes.isSelected
),
this.swiperThumbnailSlide[this.currentIndex].classList.add(
this.classes.isSelected
),
2 === this.currentIndex
? (this.sliderGuideAnimation(), this.onResizeAntiImage())
: ((this.sliderPercent = 0.5),
this.updateSliderLayout(this.sliderPercent),
this.afterBindEvents(!1),
this.antiVisual.classList.remove(this.classes.isNotDrag));
}
scrollAnimation() {
this.updateImageLoader(),
(this.scrollRequestFrame = UTILS.requestAFrame.call(
window,
this.scrollAnimation.bind(this)
));
}
buildSwiper() {
(this.swiper = {
instance: null,
options: {
slidesPerView: "auto",
effect: "fade",
touchRatio: 0,
autoplay: { delay: 4500, disableOnInteraction: !1 },
navigation: { nextEl: this.nextArrow, prevEl: this.prevArrow },
on: {
slideChange: () => {
this.swiper.instance &&
((this.prevIndex = this.currentIndex),
(this.currentIndex = this.swiper.instance.activeIndex),
this.updateSwiperIndex());
},
},
},
destroy: () => {
null !== this.swiper.instance &&
(this.swiper.instance.destroy(),
(this.swiper.instance = null));
},
build: () => {
null === this.swiper.instance &&
1 < this.swiperSlide.length &&
(this.swiper.instance = new Swiper(
this.swiperEl,
this.swiper.options
));
},
}),
this.swiper.build();
}
outCallback(e, t) {
e = this.opts.on[e];
null != e && e(t);
}
};
})(),
(function () {
"use strict";
window.VD = window.VD || {};
VD.Compare = class {
constructor(e = container, t) {
var i = {
el: e,
featureHide: "is-feature-hide",
productEl: ".vd-compare__product",
productList: ".vd-compare__product-list",
productItem: ".vd-compare__product-item",
nextBtn: ".vd-compare__arrow-btn.btn-next",
prevBtn: ".vd-compare__arrow-btn.btn-prev",
buyCta: ".vd-compare__buy-link",
tabCta: ".vd-compare__tab-cta",
matchItem: ".js-match-item",
categoryItem: ".vd-compare__category-item",
tooltip: ".vd-compare__category-tooltip",
tooltipCta: ".vd-compare__category-tooltip-cta",
tooltipClose: ".vd-compare__category-tooltip-close",
matchElements: [
".vd-compare__category-item--name",
".vd-compare__category-item--size",
".vd-compare__category-item--resolution",
".vd-compare__category-item--ratio",
".vd-compare__category-item--flat",
".vd-compare__category-item--panel",
".vd-compare__category-item--hdr",
".vd-compare__category-item--support",
".vd-compare__category-item--coverage",
".vd-compare__category-item--brightness",
".vd-compare__category-item--smart",
".vd-compare__category-item--speaker",
".vd-compare__category-item--camera",
".vd-compare__category-item--stand",
".vd-compare__category-item--kvm",
".vd-compare__category-item--connectivity",
".vd-compare__buy",
],
matchCommonOpts: {
childElement: ".js-match-item",
useDestroyHeight: !1,
breakpoints: {},
},
tabBox: ".vd-compare__tab-box",
classes: {
isOn: "is-on",
isHide: "is-hide",
shadowRight: "shadow-right",
shadowLeft: "shadow-left",
isTooltipHover: "is-tooltip-hover",
isTooltipClick: "is-tooltip-click",
},
on: { updateImageLoader: null },
};
(this.opts = UTILS.def(i, t || {})),
(this.classes = i.classes),
(this.el = document.querySelector(e)),
this.init();
}
init() {
null === this.el ||
this.el.classList.contains(this.opts.featureHide) ||
(this.setElements(),
this.initOpts(),
this.initLayout(),
this.buildSwiper(),
this.buildHeightMatch(),
this.bindEvents(),
this.tooltipHandler());
}
setElements() {
(this.productEl = this.el.querySelector(this.opts.productEl)),
(this.productList = this.el.querySelector(this.opts.productList)),
(this.productItem = this.el.querySelectorAll(
this.opts.productItem
)),
(this.nextBtn = this.el.querySelector(this.opts.nextBtn)),
(this.prevBtn = this.el.querySelector(this.opts.prevBtn)),
(this.tabCta = this.el.querySelectorAll(this.opts.tabCta)),
(this.tabBox = this.el.querySelectorAll(this.opts.tabBox)),
(this.tooltip = document.querySelectorAll(this.opts.tooltip)),
(this.tooltipCta = document.querySelectorAll(
this.opts.tooltipCta
)),
(this.tooltipClose = document.querySelectorAll(
this.opts.tooltipClose
)),
(this.matchItem = this.el.querySelectorAll(this.opts.matchItem)),
(this.categoryItem = this.el.querySelectorAll(
this.opts.categoryItem
));
}
initOpts() {
(this.firstImageLoad = !1),
(this.globalText = JSON.parse(this.el.dataset.globalText)),
this.getCurrentDevice();
}
initLayout() {
this.tabCta.forEach((e) => {
var t = digitalData.page.pageInfo.pageTrack,
i = this.el.querySelector(".vd-common__title").dataset.title;
e.setAttribute("an-tr", `navigator-${t}-tab-content_click`),
"all" === e.dataset.category
? (e.parentElement.classList.add(this.classes.isOn),
e.setAttribute("title", this.globalText.selected),
(this.currentCategory = e.dataset.category),
e.setAttribute("an-la", `${i}:${this.currentCategory}:tab`))
: (e.parentElement.classList.remove(this.classes.isOn),
e.removeAttribute("title"));
}),
this.updateTagging();
}
updateTagging() {
const a = digitalData.page.pageInfo.pageTrack,
n = this.el.querySelector(".vd-common__title").dataset.title,
e =
(this.prevBtn.setAttribute(
"an-tr",
`navigator-${a}-arrow-indication`
),
this.nextBtn.setAttribute(
"an-tr",
`navigator-${a}-arrow-indication`
),
this.el.querySelectorAll(this.opts.productItem)),
o =
"all" !== this.currentCategory
? this.currentCategory.toLowerCase()
: this.currentCategory;
e.forEach((e) => {
var t = e
.querySelector(".vd-compare__product-name--pc")
.textContent.toLowerCase(),
i = e
.querySelector(".vd-compare__product-name--mobile")
.textContent.toLowerCase();
const s = e.querySelector(this.opts.buyCta);
s.setAttribute("an-tr", `navigator-${a}-cta-buy_cta3`),
"mobile" === this.currDevice
? s.setAttribute("an-la", `${n}:${o}:${i}:buy now`)
: s.setAttribute("an-la", `${n}:${o}:${t}:buy now`);
}),
this.categoryItem.forEach((e) => {
const t = e.querySelector(".vd-compare__category-tooltip");
if (t) {
var i = t.previousSibling.textContent
.replace(/[\r\n]+/g, " ")
.trim()
.toLowerCase();
const s = e.querySelector(this.opts.tooltipCta);
s.setAttribute("an-tr", `navigator-${a}-tab-content_click`),
s.setAttribute("an-la", n + `:${i}:tooltip`);
}
});
}
bindEvents() {
this.onScrollHandler(),
window.addEventListener(
"scroll",
this.onScrollHandler.bind(this)
),
window.addEventListener(
"resize",
this.onResizeHandler.bind(this)
),
this.tabCta.forEach((e) => {
e.addEventListener("click", this.onClickTabCta.bind(this));
});
}
getCurrentDevice() {
window.innerWidth >= UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "desktop")
: window.innerWidth > UTILS.RESPONSIVE.MOBILE.WIDTH &&
window.innerWidth < UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "tablet")
: (this.currDevice = "mobile");
}
updateImageLoader() {
var e = window.innerHeight,
e = UTILS.getScroll().top - e,
t = UTILS.getScroll().bottom,
i = UTILS.getOffset(this.el);
((t > i.top && e <= i.top) ||
(e < i.bottom && t > i.bottom) ||
(e < i.top && t > i.bottom) ||
(e > i.top && t < i.bottom)) &&
!this.firstImageLoad &&
((e = this.el.querySelectorAll(".js-start-img-src")),
this.outCallback("updateImageLoader", e),
(this.firstImageLoad = !0));
}
onResizeHandler() {
this.getCurrentDevice(),
clearTimeout(this.resizeTimeout),
(this.resizeTimeout = setTimeout(() => {
this.onResponsive();
}, 100)),
this.currDevice != this.prevDevice &&
(this.onResponsiveChange(),
(this.prevDevice = this.currDevice));
}
onResponsive() {
this.heightMatch.reInit();
}
onResponsiveChange() {
this.onResponsive();
var e = "mobile" === this.currDevice ? "auto" : 5;
e !== this.swiper.options.slidesPerView &&
((this.swiper.options.slidesPerView = e),
this.swiper.destroy(),
this.swiper.build());
}
onScrollHandler() {
this.updateImageLoader();
}
onClickTabCta(e) {
const t = e.target;
(this.currentCategory = t.dataset.category),
this.tabCta.forEach((e) => {
e === t
? (e.parentElement.classList.add(this.classes.isOn),
e.setAttribute("title", this.globalText.selected))
: (e.parentElement.classList.remove(this.classes.isOn),
e.removeAttribute("title"));
}),
this.productItem.forEach((e) => {
"all" === t.dataset.category ||
t.dataset.category === e.dataset.category
? e.classList.remove(this.classes.isHide)
: e.classList.add(this.classes.isHide);
}),
this.swiper.updateSlide(),
this.updateTagging();
}
tooltipHandler() {
this.categoryItem.forEach((e) => {
let s = null;
e.addEventListener("click", (e) => {
e.preventDefault();
const t = e.target.closest(".vd-compare__category-tooltip");
var i = e.target.closest(".vd-compare__category-tooltip-cta"),
e = e.target.closest(".vd-compare__category-tooltip-close");
i &&
s !== i &&
(s && s.classList.remove(this.classes.isTooltipClick),
(s = t).classList.add(this.classes.isTooltipClick)),
e && t.classList.remove(this.classes.isTooltipClick);
}),
e.addEventListener(
"mouseenter",
(e) => {
const t = e.target.closest(".vd-compare__category-tooltip");
e.target.closest(".vd-compare__category-tooltip-cta") &&
t.classList.add(this.classes.isTooltipHover);
},
!0
),
e.addEventListener(
"mouseleave",
(e) => {
const t = e.target.closest(".vd-compare__category-tooltip");
e.target.closest(".vd-compare__category-tooltip-cta") &&
t.classList.remove(this.classes.isTooltipHover);
},
!0
);
});
}
buildHeightMatch() {
(this.heightMatch = {
instance: [],
reInit: () => {
this.heightMatch.instance.length &&
this.heightMatch.instance.forEach((e) => {
e.reInit();
});
},
initLayout: () => {
for (
let e = 0, t = this.opts.matchElements.length;
e < t;
e++
) {
const s = this.opts.matchElements[e];
var i = "js-" + s.split(".")[1];
for (let e = 0, t = this.matchItem.length; e < t; e++) {
const a = this.matchItem[e];
if (null === a.querySelector("." + i)) {
const n = document.createElement("div"),
o = a.querySelector(s);
null !== o &&
((n.innerHTML = o.innerHTML),
n.classList.add(i),
(o.innerHTML = ""),
o.appendChild(n));
}
}
}
},
build: () => {
this.heightMatch.initLayout();
var e = { column: this.matchItem.length };
UTILS.def(this.opts.matchCommonOpts, e);
for (
let e = 0, t = this.opts.matchElements.length;
e < t;
e++
) {
const a = this.opts.matchElements[e];
var i = {
pushElement: "." + a.split(".")[1],
childElement: this.opts.matchItem,
matchElement: ".js-" + a.split(".")[1],
},
s = JSON.parse(JSON.stringify(this.opts.matchCommonOpts));
UTILS.def(s, i),
this.heightMatch.instance.push(
new VD.HeightMatch(this.opts.el, s)
);
}
this.swiper.build();
},
}),
this.heightMatch.build();
}
buildSwiper() {
this.swiper = {
instance: null,
options: {
slidesPerView: "mobile" === this.currDevice ? 1 : 4,
observer: !0,
observeParents: !0,
navigation: { nextEl: this.nextBtn, prevEl: this.prevBtn },
},
init: () => {
this.swiper.instance.virtualSize > this.swiper.instance.width &&
(this.productEl.classList.add(this.classes.shadowRight),
this.nextBtn.removeAttribute("style"),
this.prevBtn.removeAttribute("style"));
},
setTranslate: (e) => {
null !== this.swiper.instance &&
((e = UTILS.isRTL() ? e : -1 * e),
this.swiper.instance.virtualSize -
this.swiper.instance.width <=
e
? this.productEl.classList.remove(this.classes.shadowRight)
: this.productEl.classList.add(this.classes.shadowRight));
},
updateSlide: () => {
this.productEl.getBoundingClientRect().width <
this.productList.scrollWidth
? null !== this.swiper.instance
? (this.swiper.instance.update(),
this.swiper.instance.slideTo(0))
: this.swiper.build()
: this.swiper.destroy();
},
destroy: () => {
null !== this.swiper.instance &&
(this.swiper.instance.destroy(),
this.productEl.classList.remove(this.classes.shadowRight),
(this.nextBtn.style.display = "none"),
(this.prevBtn.style.display = "none"),
(this.swiper.instance = null));
},
build: () => {
null === this.swiper.instance &&
(this.productEl.getBoundingClientRect().width <
this.productList.scrollWidth
? ((this.swiper.options.on = {
setTranslate: this.swiper.setTranslate.bind(this),
}),
(this.swiper.instance = new Swiper(
this.productEl,
this.swiper.options
)),
this.swiper.instance.on(
"init",
this.swiper.init.bind(this)
),
this.swiper.init())
: ((this.nextBtn.style.display = "none"),
(this.prevBtn.style.display = "none")));
},
};
}
outCallback(e, t) {
e = this.opts.on[e];
null != e && e(t);
}
};
})(),
(function () {
"use strict";
window.VD = window.VD || {};
const t = VD.UTILS;
t.RESPONSIVE;
VD.Contrast = class {
constructor(e = container, t) {
var i = {
el: e,
defaultBtn: ".type-default",
contrastBtn: ".type-contrast",
cookieName: "highContrastMode",
featureHide: "is-feature-hide",
};
(this.opts = i),
(this.classes = i.classes),
(this.el = document.querySelector(e)),
this.init();
}
init() {
null === this.el ||
this.el.classList.contains(this.opts.featureHide) ||
(this.setElements(), this.bindEvents());
}
setElements() {
(this.defaultBtn = this.el.querySelector(this.opts.defaultBtn)),
(this.defaultBtnTitle = this.defaultBtn
.getAttribute("title")
.trim()),
(this.contrastBtn = this.el.querySelector(this.opts.contrastBtn)),
(this.contrastBtnTitle = this.contrastBtn
.getAttribute("title")
.trim()),
(this.cookieName = this.opts.cookieName);
}
bindEvents() {
window.addEventListener("load", this.onLoadHandler.bind(this)),
this.defaultBtn &&
this.defaultBtn.addEventListener(
"click",
this.onClickDefaultBtn.bind(this)
),
this.contrastBtn &&
this.contrastBtn.addEventListener(
"click",
this.onClickContrastBtn.bind(this)
);
}
onLoadHandler() {
this.activeContrast();
}
onClickDefaultBtn(e) {
e.preventDefault(),
t.setCookie(this.cookieName, "0", 1),
this.activeContrast();
}
onClickContrastBtn(e) {
e.preventDefault(),
t.setCookie(this.cookieName, "1", 1),
this.activeContrast();
}
activeContrast() {
var e = t.getCookie(this.cookieName);
null != e && e.length && "1" == e
? (document.documentElement.classList.add("color_yb"),
this.contrastBtn.setAttribute(
"title",
this.contrastBtnTitle + " selected"
),
this.defaultBtn.setAttribute("title", this.defaultBtnTitle))
: (document.documentElement.classList.remove("color_yb"),
this.contrastBtn.setAttribute("title", this.contrastBtnTitle),
this.defaultBtn.setAttribute(
"title",
this.defaultBtnTitle + " selected"
));
}
};
})(),
(function () {
"use strict";
window.VD = window.VD || {};
VD.Feature = class {
constructor(e = container, t) {
var i = {
el: e,
classes: {},
wrapper: ".vd-feature__details-mo-wrap",
swiperEl: ".vd-feature__details-mo-inner",
swiperSlide: ".vd-feature__details-mo-slide",
arrowEl: ".vd-feature__arrow",
pagination: ".vd-feature__indicator",
paginationItem: "li",
paginationCta: ".s-line-wrap",
videoElement: ".video__container",
featureHide: "is-feature-hide",
on: { updateImageLoader: null },
};
(this.opts = i),
(this.classes = i.classes),
(this.el = document.querySelector(e)),
this.init();
}
init() {
null === this.el ||
this.el.classList.contains(this.opts.featureHide) ||
(this.setElements(),
this.initOpts(),
this.CtaTagging(),
this.buildSwiper(),
this.buildVideoPlayer(),
this.bindEvents());
}
initOpts() {
(this.firstImageLoad = !1), this.getCurrentDevice();
var e = this.el.querySelectorAll(".vd-feature__details-title"),
t = this.el.querySelectorAll(".vd-feature__details-mo-title");
(this.videoTitle1 = e[0].dataset.subtitle),
(this.videoTitle2 = e[1].dataset.subtitle),
(this.videoTitleMo1 = t[0].dataset.subtitle),
(this.videoTitleMo2 = t[1].dataset.subtitle);
}
setElements() {
(this.wrapper = this.el.querySelectorAll(this.opts.wrapper)),
(this.swiperEl = this.el.querySelectorAll(this.opts.swiperEl)),
(this.arrowEl = this.el.querySelectorAll(this.opts.arrowEl)),
(this.videoElement = this.el.querySelectorAll(
this.opts.videoElement
)),
(this.videoElement1 = this.videoElement[0]),
(this.videoElement2 = this.videoElement[1]),
(this.videoElement3 = this.videoElement[2]),
(this.videoElement4 = this.videoElement[3]);
}
bindEvents() {
window.addEventListener("resize", this.onResizeHandler.bind(this));
}
getCurrentDevice() {
window.innerWidth >= UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "desktop")
: window.innerWidth > UTILS.RESPONSIVE.MOBILE.WIDTH &&
window.innerWidth < UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "tablet")
: (this.currDevice = "mobile");
}
updateImageLoader() {
var e = window.innerHeight,
e = UTILS.getScroll().top - e,
t = UTILS.getScroll().bottom,
i = UTILS.getOffset(this.el);
((t > i.top && e <= i.top) ||
(e < i.bottom && t > i.bottom) ||
(e < i.top && t > i.bottom) ||
(e > i.top && t < i.bottom)) &&
!this.firstImageLoad &&
((e = this.el.querySelectorAll(".js-start-img-src")),
this.outCallback("updateImageLoader", e),
(this.firstImageLoad = !0));
}
onResizeHandler() {
this.getCurrentDevice(),
clearTimeout(this.resizeTimeout),
(this.resizeTimeout = setTimeout(() => {
this.onResponsive();
}, 100)),
this.currDevice != this.prevDevice &&
(this.onResponsiveChange(),
(this.prevDevice = this.currDevice));
}
onResponsive() {}
onResponsiveChange() {
this.onResponsive();
"auto" !== this.swiper.options.slidesPerView &&
((this.swiper.options.slidesPerView = "auto"),
this.swiper.destroy(),
this.swiper.build());
}
CtaTagging() {
const s = digitalData.page.pageInfo.pageTrack;
this.arrowEl.forEach((e) => {
const t = e.querySelector(".vd-feature__arrow-prev"),
i = e.querySelector(".vd-feature__arrow-next");
t.setAttribute("an-tr", `navigator-${s}-arrow-indication`),
i.setAttribute("an-tr", `navigator-${s}-arrow-indication`);
});
}
buildSwiper() {
(this.swiper = {
instance: [],
options: {
a11y: !1,
slidesPerView: "auto",
spaceBetween: 20,
centeredSlides: !0,
navigation: {
nextEl: ".vd-feature__arrow-next",
prevEl: ".vd-feature__arrow-prev",
},
pagination: {
el: ".swiper-pagination",
type: "bullets",
clickable: !0,
renderBullet: function (e, t) {
var i = digitalData.page.pageInfo.pageTrack;
const s =
this.slides.closest(".swiper-wrapper")[0].parentNode,
a = s.getElementsByClassName(
"vd-feature__details-mo-title"
)[0];
return `
Slide${e + 1} :${a.innerText
.replace(/\d+/g, "")
.trim()}
`;
},
},
},
destroy: () => {
0 !== this.swiper.instance.length &&
(this.swiper.instance.forEach((e) => {
e.destroy();
}),
(this.swiper.instance = []));
},
build: () => {
0 < this.swiper.instance.length ||
this.swiperEl.forEach((e) => {
1 < e.querySelectorAll(this.opts.swiperSlide).length &&
this.swiper.instance.push(
new Swiper(e, this.swiper.options)
);
});
},
}),
this.swiper.build();
}
buildVideoPlayer() {
(this.videoPlayer = {
instance: null,
build: () => {
null === this.videoPlayer.instance &&
((this.videoPlayer.instance = new VD.VideoPlayer(
this.videoElement1,
{
sectionElement: this.opts.el,
on: {
updateController: (e) => {
const t = e.el;
var e = e.playState,
i = digitalData.page.pageInfo.pageTrack,
s =
(t
.getAttribute("aria-label")
.split(":")[1]
.toLowerCase(),
this.videoTitle1);
t.setAttribute(
"an-tr",
`ergonomics / connectivity-${i}-play/stop video-content_click`
),
e
? (t.setAttribute(
"aria-label",
"Stop video:Easy Setup Stand"
),
t.setAttribute("an-la", s + ":stop video"))
: (t.setAttribute(
"aria-label",
"Play video:Easy Setup Stand"
),
t.setAttribute("an-la", s + ":play video"));
},
},
}
)),
(this.videoPlayer.instance = new VD.VideoPlayer(
this.videoElement2,
{
sectionElement: this.opts.el,
on: {
updateController: (e) => {
const t = e.el;
var e = e.playState,
i = digitalData.page.pageInfo.pageTrack,
s = this.videoTitle2;
t.setAttribute(
"an-tr",
`ergonomics / connectivity-${i}-play/stop video-content_click`
),
e
? (t.setAttribute(
"aria-label",
"Stop video:Ergonomic Design"
),
t.setAttribute("an-la", s + ":stop video"))
: (t.setAttribute(
"aria-label",
"Play video:Ergonomic Design"
),
t.setAttribute("an-la", s + ":play video"));
},
},
}
)),
(this.videoPlayer.instance = new VD.VideoPlayer(
this.videoElement3,
{
sectionElement: this.opts.el,
on: {
updateController: (e) => {
const t = e.el;
var e = e.playState,
i = digitalData.page.pageInfo.pageTrack,
s = this.videoTitleMo1;
t.setAttribute(
"an-tr",
`ergonomics / connectivity-${i}-play/stop video-content_click`
),
e
? (t.setAttribute(
"aria-label",
"Stop video:Easy Setup Stand"
),
t.setAttribute("an-la", s + ":stop video"))
: (t.setAttribute(
"aria-label",
"Play video:Easy Setup Stand"
),
t.setAttribute("an-la", s + ":play video"));
},
},
}
)),
(this.videoPlayer.instance = new VD.VideoPlayer(
this.videoElement4,
{
sectionElement: this.opts.el,
on: {
updateController: (e) => {
const t = e.el;
var e = e.playState,
i = digitalData.page.pageInfo.pageTrack,
s = this.videoTitleMo2;
t.setAttribute(
"an-tr",
`ergonomics / connectivity-${i}-play/stop video-content_click`
),
e
? (t.setAttribute(
"aria-label",
"Stop video:Ergonomic Design"
),
t.setAttribute("an-la", s + ":stop video"))
: (t.setAttribute(
"aria-label",
"Play video:Ergonomic Design"
),
t.setAttribute("an-la", s + ":play video"));
},
},
}
)));
},
}),
this.videoPlayer.build();
}
outCallback(e, t) {
e = this.opts.on[e];
null != e && e(t);
}
};
})(),
(function () {
"use strict";
window.VD = window.VD || {};
VD.FixedNav = class {
constructor(e = container, t) {
var i = {
el: e,
colorsEl: ".vd-colors",
sizesEl: ".vd-sizes",
featureEl: ".vd-feature",
tabList: ".vd-colors__tab",
tabLink: ".vd-fixed-nav__tab-link",
subLink: ".vd-fixed-nav__sub-link",
classes: { isShow: "is-show", isActive: "is-active" },
};
(this.opts = UTILS.def(i, t || {})),
(this.classes = i.classes),
(this.el = document.querySelector(e)),
this.init();
}
init() {
null === this.el ||
this.el.classList.contains(this.opts.featureHide) ||
(this.setElements(),
this.initOpts(),
this.navigatorTagging(),
this.bindEvents(),
this.navClickHandler(),
this.navElement.forEach((e, t) => this.onScrollHandler(t, e)));
}
setElements() {
(this.colorsEl = document.querySelector(this.opts.colorsEl)),
(this.sizesEl = document.querySelector(this.opts.sizesEl)),
(this.featureEl = document.querySelector(this.opts.featureEl)),
(this.tabLink = this.el.querySelectorAll(this.opts.tabLink)),
(this.subLink = this.el.querySelector(this.opts.subLink));
}
initOpts() {
this.getCurrentDevice(),
(this.navElement = [this.colorsEl, this.sizesEl, this.featureEl]),
(this.top = [null, null, null]);
}
bindEvents() {
window.addEventListener("load", this.onLoadHandler),
window.addEventListener("scroll", () => {
this.navElement.forEach((e, t) => this.onScrollHandler(t, e));
});
}
navigatorTagging() {
const i = digitalData.page.pageInfo.pageTrack;
this.tabLink.forEach((e) => {
var t = e
.querySelector(".vd-fixed-nav__tab-title-text")
.textContent.toLowerCase();
e.setAttribute("an-la", "sticky navi:" + t),
e.setAttribute("an-tr", `navigation-${i}-cta-content_click`);
});
var e = this.subLink.textContent.toLowerCase();
this.subLink.setAttribute("an-la", "sticky navi:" + e),
this.subLink.setAttribute(
"an-tr",
`navigation-${i}-cta-content_click`
);
}
getCurrentDevice() {
window.innerWidth >= UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "desktop")
: window.innerWidth > UTILS.RESPONSIVE.MOBILE.WIDTH &&
window.innerWidth < UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "tablet")
: (this.currDevice = "mobile");
}
onScrollHandler(e, t) {
var i = window.scrollY,
s = window.scrollY + window.innerHeight,
a = t.offsetHeight,
n = i + Math.floor(t.getBoundingClientRect().top),
a =
i +
Math.floor(t.getBoundingClientRect().top) +
a +
window.innerHeight,
t = !t.classList.contains(this.classes.isActive);
(this.top[e] = n) < i &&
s < a &&
(this.el.classList.add(this.classes.isShow),
t &&
(this.tabLink.forEach((e) =>
e.classList.remove(this.classes.isActive)
),
this.tabLink[e].classList.add(this.classes.isActive))),
((0 === e && i < n) || (2 === e && a < s)) &&
this.el.classList.remove(this.classes.isShow),
0 === e
? (this.top[e] = n + 35)
: 1 === e || "mobile" === this.currDevice
? (this.top[e] = n + 10)
: (this.top[e] = n + 20);
}
navClickHandler() {
this.tabLink.forEach((e, t) => {
e.onclick = (e) => {
e.preventDefault(),
window.scrollTo({ top: this.top[t], behavior: "smooth" });
};
});
}
onResizeHandler() {
this.getCurrentDevice(),
clearTimeout(this.resizeTimeout),
(this.resizeTimeout = setTimeout(() => {
this.onResponsive();
}, 100)),
this.currDevice != this.prevDevice &&
(this.prevDevice = this.currDevice);
}
onResponsive() {}
};
})(),
(function () {
"use strict";
window.VD = window.VD || {};
VD.KeyVisual = class {
constructor(e = container, t) {
var i = {
el: e,
classes: {},
classes: {},
videoElement: ".video__container",
videoController: ".vd-kv__popup-btn",
featureHide: "is-feature-hide",
};
(this.opts = i),
(this.classes = i.classes),
(this.el = document.querySelector(e)),
this.init();
}
init() {
null === this.el ||
this.el.classList.contains(this.opts.featureHide) ||
(this.setElements(), this.buildVideoPlayer());
}
setElements() {
(this.videoElement = this.el.querySelector(this.opts.videoElement)),
(this.videoController = this.el.querySelector(
this.opts.videoController
));
}
buildVideoPlayer() {
(this.videoPlayer = {
instance: null,
build: () => {
null === this.videoPlayer.instance &&
(this.videoPlayer.instance = new VD.VideoPlayer(
this.videoElement,
{
sectionElement: this.opts.el,
on: {
updateController: (e) => {
const t = e.el;
var e = e.playState,
i = digitalData.page.pageInfo.pageTrack,
s = t.getAttribute("an-la").split(":")[0];
t.setAttribute(
"an-tr",
`kv-${i}-play/stop video-content_click`
),
e
? (t.setAttribute(
"aria-label",
"Stop video: ViewFinity"
),
t.setAttribute("an-la", s + ":stop video"))
: (t.setAttribute(
"aria-label",
"Play video: ViewFinity"
),
t.setAttribute("an-la", s + ":play video"));
},
},
}
));
},
}),
this.videoPlayer.build();
}
};
})(),
(function () {
"use strict";
window.VD = window.VD || {};
VD.Persona = class {
constructor(e = container, t) {
var i = {
el: e,
featureHide: "is-feature-hide",
colorsEl: ".vd-colors",
sizesEl: ".vd-sizes",
featureEl: ".vd-feature",
personaItem: ".vd-persona__item",
itemAnchor: ".vd-persona__text-link",
personaList: ".vd-persona__list",
itemCta: ".vd-persona__item-cta",
classes: {
isBlur: "is-blur",
isHover: "is-hover",
isFocus: "is-focus",
},
};
(this.opts = UTILS.def(i, t || {})),
(this.classes = i.classes),
(this.el = document.querySelector(e)),
this.init();
}
init() {
null === this.el ||
this.el.classList.contains(this.opts.featureHide) ||
(this.setElements(),
this.initOpts(),
this.navigatorTagging(),
this.bindEvents(),
this.navClickHandler(),
this.navElement.forEach((e, t) => this.onScrollHandler(t, e)));
}
setElements() {
(this.colorsEl = document.querySelector(this.opts.colorsEl)),
(this.sizesEl = document.querySelector(this.opts.sizesEl)),
(this.featureEl = document.querySelector(this.opts.featureEl)),
(this.itemAnchor = this.el.querySelectorAll(
this.opts.itemAnchor
)),
(this.personaList = this.el.querySelector(this.opts.personaList)),
(this.itemCta = this.el.querySelectorAll(this.opts.itemCta)),
(this.personaItem = this.el.querySelectorAll(
this.opts.personaItem
));
}
initOpts() {
this.getCurrentDevice(),
(this.isFocus = !1),
(this.navElement = [this.colorsEl, this.sizesEl, this.featureEl]),
(this.top = [null, null, null]);
}
navigatorTagging() {
const s = digitalData.page.pageInfo.pageTrack;
this.personaItem.forEach((e) => {
var t = e.querySelector(".vd-persona__item-title").dataset
.subtitle;
const i = e.querySelector(".vd-persona__text-link");
i.setAttribute("an-la", t + ":learn more"),
i.setAttribute("an-tr", `navigator-${s}-cta-content_click`);
});
}
bindEvents() {
this.onResponsive(),
window.addEventListener(
"resize",
this.onResizeHandler.bind(this)
),
window.addEventListener("scroll", () => {
this.navElement.forEach((e, t) => this.onScrollHandler(t, e));
}),
window.addEventListener("mouseover", () => {
this.isHover = !1;
}),
this.personaList.addEventListener("mouseover", () => {
this.personaList.classList.add(this.classes.isBlur);
}),
this.personaList.addEventListener("mouseout", () => {
this.personaList.classList.remove(this.classes.isBlur);
}),
this.itemCta.forEach((e) => {
e.addEventListener("focus", this.onItemCtaFocus.bind(this)),
e.addEventListener(
"focusout",
this.onItemCtaFocus.bind(this)
),
e.addEventListener(
"mouseenter",
this.onItemCtaFocus.bind(this)
),
e.addEventListener(
"mouseleave",
this.onItemCtaFocus.bind(this)
);
});
}
getCurrentDevice() {
window.innerWidth >= UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "desktop")
: window.innerWidth > UTILS.RESPONSIVE.MOBILE.WIDTH &&
window.innerWidth < UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "tablet")
: (this.currDevice = "mobile");
}
onScrollHandler(e, t) {
t = window.scrollY + Math.floor(t.getBoundingClientRect().top);
(this.top[e] = t), (1 !== e && 2 !== e) || (this.top[e] = t + 10);
}
navClickHandler() {
this.itemAnchor.forEach((e, t) => {
e.onclick = (e) => {
e.preventDefault(),
0 === t
? window.scrollTo({
top: this.top[t] + 35,
behavior: "smooth",
})
: 1 === t
? window.scrollTo({
top: this.top[t] + 10,
behavior: "smooth",
})
: window.scrollTo({ top: this.top[t], behavior: "smooth" });
};
});
}
onItemCtaFocus(e) {
if ((e.preventDefault(), "mobile" !== this.currDevice)) {
const t = e.currentTarget.parentNode;
(this.isHover = "mouseleave" !== e.type && "focusout" !== e.type),
(this.isFocus = "focus" === e.type),
this.isHover
? t.classList.add(this.classes.isHover)
: t.classList.remove(this.classes.isHover),
this.isFocus
? t.classList.add(this.classes.isFocus)
: t.classList.remove(this.classes.isFocus);
}
}
onResizeHandler() {
this.getCurrentDevice(),
clearTimeout(this.resizeTimeout),
(this.resizeTimeout = setTimeout(() => {
this.onResponsive();
}, 100)),
this.currDevice != this.prevDevice &&
(this.onResponsiveChange(),
(this.prevDevice = this.currDevice));
}
onResponsive() {}
onResponsiveChange() {
this.onResponsive();
}
};
})(),
(function () {
"use strict";
window.VD = window.VD || {};
VD.Sizes = class {
constructor(e = container, t) {
var i = {
el: e,
featureHide: "is-feature-hide",
tabList: ".vd-sizes__tab-list",
tabItem: ".vd-sizes__tab-item",
tabPanels: ".vd-sizes__subtab-wrap",
tabPanel: ".vd-sizes__subtab",
swiperEl: ".vd-sizes__subtab-panels",
swiperSlide: ".vd-sizes__subtab-image",
swiperSubImage: ".sub-image__item",
swiperArrow: ".vd-sizes__arrow-cta",
nextArrow: ".vd-sizes__arrow-next",
prevArrow: ".vd-sizes__arrow-prev",
navigationEl: ".vd-sizes__subtab-inner",
pagination: ".vd-sizes__subtab-list",
paginationItem: ".vd-sizes__subtab-item",
paginationCta: ".vd-sizes__subtab-link",
controlsEl: ".vd-sizes__controls-cta",
controlsHiddenEl: ".blind",
classes: { isShow: "is-show", isActive: "is-active" },
on: { updateImageLoader: null },
};
(this.opts = UTILS.def(i, t || {})),
(this.classes = i.classes),
(this.el = document.querySelector(e)),
this.init();
}
init() {
null === this.el ||
this.el.classList.contains(this.opts.featureHide) ||
(this.setElements(),
this.initOpts(),
this.navigatorTagging(),
this.initLayout(),
this.buildSwiper(),
this.paginationControl || this.play || this.select(0),
this.bindEvents(),
this.checkCarouselShow());
}
setElements() {
(this.tabList = this.el.querySelector(this.opts.tabList)),
(this.tabItem = this.tabList.querySelectorAll(this.opts.tabItem)),
(this.tabPanels = this.el.querySelector(this.opts.tabPanels)),
(this.tabPanel = this.tabPanels.querySelectorAll(
this.opts.tabPanel
)),
(this.swiperEl = this.el.querySelector(this.opts.swiperEl)),
(this.swiperSlide = this.swiperEl.querySelectorAll(
this.opts.swiperSlide
)),
(this.swiperSubImage = this.el.querySelectorAll(
this.opts.swiperSubImage
)),
(this.swiperArrow = this.el.querySelectorAll(
this.opts.swiperArrow
)),
(this.nextArrow = this.el.querySelector(this.opts.nextArrow)),
(this.prevArrow = this.el.querySelector(this.opts.prevArrow)),
(this.navigationEl = this.el.querySelector(
this.opts.navigationEl
)),
(this.pagination = this.el.querySelector(this.opts.pagination)),
(this.paginationItem = this.pagination.querySelectorAll(
this.opts.paginationItem
)),
(this.paginationCta = this.pagination.querySelectorAll(
this.opts.paginationCta
));
}
initOpts() {
this.getCurrentDevice(),
(this.globalText = JSON.parse(this.el.dataset.globalText)),
(this.isNext = !1),
(this.isPaginationClick = !1),
(this.firstImageLoad = !1),
(this.scrollStart = null),
(this.isFirstActiveSwiper = !1),
(this.paginationControl = !1),
(this.play = !1),
(this.playing = !1),
(this.autoPlay = !1),
(this.autoRolling = !0),
(this.infiniteRolling = !0),
(this.prevIndex = 0),
(this.currentIndex = -1),
(this.elapseTime = 0),
(this.control = "pause"),
(this.transitionDuration = 400),
(this.indicators = []),
(this.isTouchScreen = !1),
(this.isCarouselShow = !1),
("ontouchstart" in window ||
(window.DocumentTouch && document instanceof DocumentTouch)) &&
(this.isTouchScreen = !0),
this.paginationItem.forEach((e) => {
this.indicators.push(parseInt(e.dataset.indicatorDelay));
}),
this.animReqId &&
(cancelAnimationFrame(this.animReqId), (this.animReqId = null)),
this.autoRolling && (this.play = !1);
}
initLayout() {
this.paginationItem[0].classList.add(this.classes.isActive),
this.paginationItem.forEach((e, t) => {
const i = this.swiperSlide[t].querySelector("img");
var s = i.getAttribute("alt");
e.querySelector(this.opts.paginationCta).setAttribute(
"aria-label",
`Slide ${t + 1}: ` + s
);
});
}
bindEvents() {
this.onScrollHandler(),
window.addEventListener(
"load",
this.checkCompleteImage.bind(this)
),
window.addEventListener(
"resize",
this.onResizeHandler.bind(this)
),
this.initTabEvent(),
this.tabItem.forEach((e) => {
e.addEventListener(
"click",
this.onClickTabItemHandler.bind(this)
);
}),
window.addEventListener("orientationchange", () => {
this.checkCarouselShow();
}),
window.addEventListener("scroll", () => {
this.checkCarouselShow(), this.onScrollHandler();
}),
this.nextArrow.addEventListener("click", () => {
(this.isNext = !1), (this.isPaginationClick = !1);
}),
this.nextArrow.addEventListener("mouseenter", () => {
"play" !== this.control ||
this.autoPlay ||
(this.autoPlay = !0);
}),
this.nextArrow.addEventListener("mouseleave", () => {
var e = this.el.querySelector(":focus");
this.isTouchScreen || e || this.playCarousel();
}),
this.nextArrow.addEventListener("focus", () => {
"play" !== this.control ||
this.autoPlay ||
(this.autoPlay = !0);
}),
this.nextArrow.addEventListener("focusout", () => {
this.isMouseDown || this.playCarousel();
}),
this.prevArrow.addEventListener("click", () => {
(this.isNext = !1), (this.isPaginationClick = !1);
}),
this.prevArrow.addEventListener("mouseenter", () => {
"play" !== this.control ||
this.autoPlay ||
(this.autoPlay = !0);
}),
this.prevArrow.addEventListener("mouseleave", () => {
var e = this.el.querySelector(":focus");
this.isTouchScreen || e || this.playCarousel();
}),
this.prevArrow.addEventListener("focus", () => {
"play" !== this.control ||
this.autoPlay ||
(this.autoPlay = !0);
}),
this.prevArrow.addEventListener("focusout", () => {
this.isMouseDown || this.playCarousel();
});
const e = this.pagination.querySelectorAll("li"),
t =
(e.forEach((e) => {
e.addEventListener("focus", () => {
"play" !== this.control ||
this.autoPlay ||
(this.autoPlay = !0);
}),
e.addEventListener("focusout", () => {
this.isMouseDown || this.playCarousel();
});
}),
this.paginationItem.forEach((e) => {
e.addEventListener(
"click",
this.handlePaginationItem.bind(this)
);
}),
this.swiperEl.querySelectorAll(this.opts.swiperSlide));
t.forEach((e) => {
this.playCarousel();
});
}
getCurrentDevice() {
window.innerWidth >= UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "desktop")
: window.innerWidth > UTILS.RESPONSIVE.MOBILE.WIDTH &&
window.innerWidth < UTILS.RESPONSIVE.TABLET.WIDTH
? (this.currDevice = "tablet")
: (this.currDevice = "mobile");
}
updateImageLoader() {
var e = window.innerHeight,
e = UTILS.getScroll().top - e,
t = UTILS.getScroll().bottom,
i = UTILS.getOffset(this.el);
((t > i.top && e <= i.top) ||
(e < i.bottom && t > i.bottom) ||
(e < i.top && t > i.bottom) ||
(e > i.top && t < i.bottom)) &&
!this.firstImageLoad &&
((e = this.el.querySelectorAll(".js-start-img-src")),
this.outCallback("updateImageLoader", e),
(this.firstImageLoad = !0));
}
updateLayout() {
this.tabPanel.forEach((t) => {
var e = t.getAttribute("id");
const i = this.tabItem.querySelector(`[aria-controls=${e}]`);
i.classList.contains(this.classes.isShow) ||
this.tabItem.forEach((e) => {
e === i
? t.classList.add(this.classes.isShow)
: t.classList.remove(this.classes.isShow);
});
});
}
initTabEvent() {
this.tabItem[0].classList.add(this.opts.classes.isShow),
this.tabItem[0].setAttribute("aria-selected", !0),
this.tabItem[0].setAttribute("aria-controls", "tabPanel_id"),
this.tabPanel[0].classList.add(this.opts.classes.isShow),
this.tabPanel[1].setAttribute("aria-hidden", "true"),
this.tabPanel[2].setAttribute("aria-hidden", "true");
}
onClickTabItemHandler(e) {
e.preventDefault();
const t = e.currentTarget,
i = t.dataset.option;
this.tabItem.forEach((e) => {
e.classList.remove(this.opts.classes.isShow),
e.setAttribute("aria-selected", "false"),
e.removeAttribute("aria-controls");
}),
t.classList.add(this.opts.classes.isShow),
t.setAttribute("aria-selected", "true"),
t.setAttribute("aria-controls", "tabpanel_sizes"),
this.tabPanel.forEach((e) => {
e.classList.remove(this.opts.classes.isShow),
e.setAttribute("aria-hidden", "true"),
e.dataset.option === i &&
(e.classList.add(this.opts.classes.isShow),
e.removeAttribute("aria-hidden"));
});
}
navigatorTagging() {
const i = digitalData.page.pageInfo.pageTrack,
s = this.el.querySelector(".vd-common__title").dataset.title;
this.tabItem.forEach((e) => {
const t = e.querySelector(".vd-sizes__tab-link");
e = e
.querySelector(".vd-sizes__tab-link")
.textContent.toLowerCase();
t.setAttribute("an-la", s + ":" + e),
t.setAttribute(
"an-tr",
`size & resolution-${i}-cta-content_click`
);
}),
this.tabPanel.forEach((e) => {
if (e.classList.contains("vd-size16"))
this.paginationItem.forEach((e) => {
const t = e.querySelector(".vd-sizes__subtab-link");
e = e
.querySelector(".text-wrap span")
.textContent.toLowerCase();
t.setAttribute("an-la", s + ":" + e),
t.setAttribute(
"an-tr",
`size & resolution-${i}-cta-content_click`
);
});
else {
const t = e.querySelector(".vd-sizes__subtab-link");
e = e
.querySelector(".vd-sizes__subtab-link")
.textContent.toLowerCase();
t.setAttribute("an-la", s + ":" + e),
t.setAttribute(
"an-tr",
`size & resolution-${i}-cta-content_click`
);
}
}),
this.prevArrow.setAttribute(
"an-tr",
`size & resolution-${i}-arrow-indication`
),
this.nextArrow.setAttribute(
"an-tr",
`size & resolution-${i}-arrow-indication`
);
}
onAccessibility(e, t) {}
offAccessibility(e) {}
checkCarouselShow() {
UTILS.isVisible(this.el) && !this.isCarouselShow
? ((this.isCarouselShow = !0), this.playCarousel())
: !UTILS.isVisible(this.el) &&
this.isCarouselShow &&
(this.isCarouselShow = !1);
}
updateSlide(e) {
this.isNext && this.nextArrow.click(),
this.isPaginationClick &&
this.swiper.instance.slideToLoop(this.currentIndex);
}
updateProgress(e) {
Date.now() - this.start >= this.delay
? this.autoRolling &&
((this.isNext = !0),
(this.isPaginationClick = !1),
e === this.indicators.length - 1
? this.infiniteRolling
? this.select(0, !1, !0)
: this.select(-1)
: this.select(e + 1))
: (this.animReqId = requestAnimationFrame(() =>
this.updateProgress(e)
));
}
playCarousel() {
this.autoPlay && this.handleControl("play");
}
playStart() {
(this.playing = !0),
(this.delay =
this.indicators[this.currentIndex] - this.elapseTime),
0 < this.delay &&
((this.start = Date.now()),
(this.animReqId = requestAnimationFrame(() =>
this.updateProgress(this.currentIndex)
)));
}
playStop() {
(this.playing = !1),
this.animReqId &&
((this.elapseTime += Date.now() - this.start),
cancelAnimationFrame(this.animReqId),
(this.animReqId = null));
}
select(e, t = !1, i) {
var s = this.currentIndex;
if (s !== e || t) {
if (
(this.animReqId &&
(cancelAnimationFrame(this.animReqId),
(this.animReqId = null)),
-1 < s &&
(this.paginationItem[s].classList.contains(
this.classes.isActive
) &&
this.paginationItem[s].classList.remove(
this.classes.isActive
),
this.paginationCta[s].removeAttribute("title")),
e < 0)
)
return (
this.paginationControl && this.playStop(),
void (this.currentIndex = e)
);
(this.currentIndex = e),
this.paginationItem[this.currentIndex].classList.contains(
this.classes.isActive
) ||
this.paginationItem[this.currentIndex].classList.add(
this.classes.isActive
),
this.paginationCta[this.currentIndex].setAttribute(
"title",
"selected"
),
this.updateSlide();
(t = this.transitionDuration),
(this.transitionTimer = setTimeout(
() => {
(this.elapseTime = 0),
this.currentIndex === e &&
("play" === this.control ||
(!this.autoRolling && this.play)) &&
this.playStart();
},
0 < t ? t : 0
));
}
}
setSlidesAccessibility(t) {
for (let e = 0; e < t.slides.length; e++)
e != t.snapIndex
? this.onAccessibility(t.slides[e], e)
: this.offAccessibility(t.slides[e], e);
}
handlePaginationItem(e) {
(e = e.currentTarget),
(e = Array.from(this.paginationItem).indexOf(e));
(this.isNext = !1),
(this.isPaginationClick = !0),
this.select(e),
(this.isPaginationClick = !1);
}
handleControl(e) {
let t = "";
(e ? this.playing || "play" !== e : this.playing)
? (e ? this.playing && "pause" === e : this.playing) &&
((this.control = "pause"), this.playStop(), (t = "play"))
: ((this.control = "play"),
-1 < this.currentIndex ? this.playStart() : this.select(0),
(t = "pause")),
"" !== t && t;
}
buildSwiper() {
(this.swiper = {
instance: null,
options: {
slidesPerView: "auto",
effect: "fade",
loop: !0,
a11y: !1,
navigation: { nextEl: this.nextArrow, prevEl: this.prevArrow },
},
beforeTransitionStart: () => {
this.prevIndex = this.swiper.instance.realIndex;
},
slideChange: () => {
this.select(this.swiper.instance.realIndex),
this.setSlidesAccessibility(this.swiper.instance);
},
destroy: () => {
null !== this.swiper.instance &&
(this.swiper.instance.destroy(),
(this.swiper.instance = null));
},
build: () => {
null === this.swiper.instance &&
1 < this.swiperSlide.length &&
((this.swiper.instance = new Swiper(
this.swiperEl,
this.swiper.options
)),
(this.autoPlay = !0),
window.setTimeout(() => {
this.setSlidesAccessibility(this.swiper.instance);
}, 600),
this.swiper.instance.on(
"slideChange",
this.swiper.slideChange.bind(this)
));
},
}),
this.swiper.build();
}
onResizeHandler() {
this.onResizeHandler(),
window.removeEventListener("load", this.onLoadHandler);
}
onResizeHandler() {
this.getCurrentDevice(),
clearTimeout(this.resizeTimeout),
(this.resizeTimeout = setTimeout(() => {
this.onResponsive();
}, 100)),
this.currDevice != this.prevDevice &&
(this.onResponsiveChange(),
(this.prevDevice = this.currDevice));
}
checkCompleteImage() {
var e = this.el.querySelectorAll(".before-swiper");
this.lazyCompleteLength = e.length;
}
onScrollHandler() {
this.updateImageLoader();
var e = window.scrollY,
t = window.scrollY + window.innerHeight,
i = this.el.offsetHeight,
s = e + Math.floor(this.el.getBoundingClientRect().top),
i =
e +
Math.floor(this.el.getBoundingClientRect().top) +
i +
window.innerHeight;
s < e && t < i ? this.playStart() : this.playStop();
}
onResponsive() {
this.checkCarouselShow();
}
onResponsiveChange() {
this.onResponsive();
1 !== this.swiper.options.slidesPerView &&
((this.swiper.options.slidesPerView = 1),
this.swiper.destroy(),
this.swiper.build());
}
outCallback(e, t) {
e = this.opts.on[e];
null != e && e(t);
}
};
})(),
(function () {
"use strict";
VD.UTILS.RESPONSIVE;
new (class {
constructor(e = container) {
(this.opts = {
el: e,
wrapEl: "#wrap",
keyVisualEl: ".vd-kv",
personaEl: ".vd-persona",
colorsEl: ".vd-colors",
sizesEl: ".vd-sizes",
featureEl: ".vd-feature",
compareEl: ".vd-compare",
contrastEl: ".cp-high-contrast",
fixNavEl: ".vd-fixed-nav",
subNavEl: "#subnav",
}),
(this.el = document.querySelector(e)),
this.init();
}
init() {
null !== this.el && (this.buildComponents(), initialize.init());
}
buildComponents() {
(this.video = VD.video.init()),
(this.imageLoader = new VD.ImageLoader(this.opts.el, {
loadOption: [
{ resolution: 1920, attribute: "data-src-pc" },
{ resolution: 1080, attribute: "data-src-tablet" },
{ resolution: 767, attribute: "data-src-mobile" },
],
})),
(this.videoLoader = new VD.VideoLoader(this.opts.el, {
notLoadElement: [".cm-layer"],
loadOption: [
{ resolution: 1920, attribute: "data-src-pc" },
{ resolution: 767, attribute: "data-src-mobile" },
],
})),
(this.keyVisual = new VD.KeyVisual(this.opts.keyVisualEl, {
on: {
updateImageLoader: (e) => {
this.imageLoader.setResponsiveImage(e);
},
},
})),
(this.persona = new VD.Persona(this.opts.personaEl)),
(this.colors = new VD.Colors(this.opts.colorsEl, {
on: {
updateImageLoader: (e) => {
this.imageLoader.setResponsiveImage(e);
},
},
})),
(this.sizes = new VD.Sizes(this.opts.sizesEl, {
on: {
updateImageLoader: (e) => {
this.imageLoader.setResponsiveImage(e);
},
},
})),
(this.feature = new VD.Feature(this.opts.featureEl)),
(this.compare = new VD.Compare(this.opts.compareEl, {
on: {
updateImageLoader: (e) => {
this.imageLoader.setResponsiveImage(e);
},
},
})),
(this.contrast = new VD.Contrast(this.opts.contrastEl)),
(this.fixedNav = new VD.FixedNav(this.opts.fixNavEl));
}
})(".vd");
})();
});