mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
trim bower libs
This commit is contained in:
parent
909258464f
commit
a3528b8e62
@ -51,7 +51,7 @@
|
||||
"tag": "v3.3.1",
|
||||
"commit": "33101a659e579146f5462e4a9d6a7fdfd7436c35"
|
||||
},
|
||||
"_source": "git://github.com/nolimits4web/Swiper.git",
|
||||
"_source": "https://github.com/nolimits4web/Swiper.git",
|
||||
"_target": "~3.3.0",
|
||||
"_originalSource": "swiper"
|
||||
}
|
@ -1,547 +0,0 @@
|
||||
/**
|
||||
* Swiper 3.3.1
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
*
|
||||
* http://www.idangero.us/swiper/
|
||||
*
|
||||
* Copyright 2016, Vladimir Kharlampidi
|
||||
* The iDangero.us
|
||||
* http://www.idangero.us/
|
||||
*
|
||||
* Licensed under MIT
|
||||
*
|
||||
* Released on: February 7, 2016
|
||||
*/
|
||||
.swiper-container {
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
/* Fix of Webkit flickering */
|
||||
z-index: 1;
|
||||
}
|
||||
.swiper-container-no-flexbox .swiper-slide {
|
||||
float: left;
|
||||
}
|
||||
.swiper-container-vertical > .swiper-wrapper {
|
||||
-webkit-box-orient: vertical;
|
||||
-moz-box-orient: vertical;
|
||||
-ms-flex-direction: column;
|
||||
-webkit-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
.swiper-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-transition-property: -webkit-transform;
|
||||
-moz-transition-property: -moz-transform;
|
||||
-o-transition-property: -o-transform;
|
||||
-ms-transition-property: -ms-transform;
|
||||
transition-property: transform;
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.swiper-container-android .swiper-slide,
|
||||
.swiper-wrapper {
|
||||
-webkit-transform: translate3d(0px, 0, 0);
|
||||
-moz-transform: translate3d(0px, 0, 0);
|
||||
-o-transform: translate(0px, 0px);
|
||||
-ms-transform: translate3d(0px, 0, 0);
|
||||
transform: translate3d(0px, 0, 0);
|
||||
}
|
||||
.swiper-container-multirow > .swiper-wrapper {
|
||||
-webkit-box-lines: multiple;
|
||||
-moz-box-lines: multiple;
|
||||
-ms-flex-wrap: wrap;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.swiper-container-free-mode > .swiper-wrapper {
|
||||
-webkit-transition-timing-function: ease-out;
|
||||
-moz-transition-timing-function: ease-out;
|
||||
-ms-transition-timing-function: ease-out;
|
||||
-o-transition-timing-function: ease-out;
|
||||
transition-timing-function: ease-out;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.swiper-slide {
|
||||
-webkit-flex-shrink: 0;
|
||||
-ms-flex: 0 0 auto;
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
/* Auto Height */
|
||||
.swiper-container-autoheight,
|
||||
.swiper-container-autoheight .swiper-slide {
|
||||
height: auto;
|
||||
}
|
||||
.swiper-container-autoheight .swiper-wrapper {
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
-webkit-align-items: flex-start;
|
||||
align-items: flex-start;
|
||||
-webkit-transition-property: -webkit-transform, height;
|
||||
-moz-transition-property: -moz-transform;
|
||||
-o-transition-property: -o-transform;
|
||||
-ms-transition-property: -ms-transform;
|
||||
transition-property: transform, height;
|
||||
}
|
||||
/* a11y */
|
||||
.swiper-container .swiper-notification {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
z-index: -1000;
|
||||
}
|
||||
/* IE10 Windows Phone 8 Fixes */
|
||||
.swiper-wp8-horizontal {
|
||||
-ms-touch-action: pan-y;
|
||||
touch-action: pan-y;
|
||||
}
|
||||
.swiper-wp8-vertical {
|
||||
-ms-touch-action: pan-x;
|
||||
touch-action: pan-x;
|
||||
}
|
||||
/* Arrows */
|
||||
.swiper-button-prev,
|
||||
.swiper-button-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 27px;
|
||||
height: 44px;
|
||||
margin-top: -22px;
|
||||
z-index: 10;
|
||||
cursor: pointer;
|
||||
-moz-background-size: 27px 44px;
|
||||
-webkit-background-size: 27px 44px;
|
||||
background-size: 27px 44px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.swiper-button-prev.swiper-button-disabled,
|
||||
.swiper-button-next.swiper-button-disabled {
|
||||
opacity: 0.35;
|
||||
cursor: auto;
|
||||
pointer-events: none;
|
||||
}
|
||||
.swiper-button-prev,
|
||||
.swiper-container-rtl .swiper-button-next {
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
|
||||
left: 10px;
|
||||
right: auto;
|
||||
}
|
||||
.swiper-button-prev.swiper-button-black,
|
||||
.swiper-container-rtl .swiper-button-next.swiper-button-black {
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
|
||||
}
|
||||
.swiper-button-prev.swiper-button-white,
|
||||
.swiper-container-rtl .swiper-button-next.swiper-button-white {
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
|
||||
}
|
||||
.swiper-button-next,
|
||||
.swiper-container-rtl .swiper-button-prev {
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
|
||||
right: 10px;
|
||||
left: auto;
|
||||
}
|
||||
.swiper-button-next.swiper-button-black,
|
||||
.swiper-container-rtl .swiper-button-prev.swiper-button-black {
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
|
||||
}
|
||||
.swiper-button-next.swiper-button-white,
|
||||
.swiper-container-rtl .swiper-button-prev.swiper-button-white {
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
|
||||
}
|
||||
/* Pagination Styles */
|
||||
.swiper-pagination {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
-webkit-transition: 300ms;
|
||||
-moz-transition: 300ms;
|
||||
-o-transition: 300ms;
|
||||
transition: 300ms;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
z-index: 10;
|
||||
}
|
||||
.swiper-pagination.swiper-pagination-hidden {
|
||||
opacity: 0;
|
||||
}
|
||||
/* Common Styles */
|
||||
.swiper-pagination-fraction,
|
||||
.swiper-pagination-custom,
|
||||
.swiper-container-horizontal > .swiper-pagination-bullets {
|
||||
bottom: 10px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
/* Bullets */
|
||||
.swiper-pagination-bullet {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
display: inline-block;
|
||||
border-radius: 100%;
|
||||
background: #000;
|
||||
opacity: 0.2;
|
||||
}
|
||||
button.swiper-pagination-bullet {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
-moz-appearance: none;
|
||||
-ms-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
.swiper-pagination-clickable .swiper-pagination-bullet {
|
||||
cursor: pointer;
|
||||
}
|
||||
.swiper-pagination-white .swiper-pagination-bullet {
|
||||
background: #fff;
|
||||
}
|
||||
.swiper-pagination-bullet-active {
|
||||
opacity: 1;
|
||||
background: #007aff;
|
||||
}
|
||||
.swiper-pagination-white .swiper-pagination-bullet-active {
|
||||
background: #fff;
|
||||
}
|
||||
.swiper-pagination-black .swiper-pagination-bullet-active {
|
||||
background: #000;
|
||||
}
|
||||
.swiper-container-vertical > .swiper-pagination-bullets {
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
-webkit-transform: translate3d(0px, -50%, 0);
|
||||
-moz-transform: translate3d(0px, -50%, 0);
|
||||
-o-transform: translate(0px, -50%);
|
||||
-ms-transform: translate3d(0px, -50%, 0);
|
||||
transform: translate3d(0px, -50%, 0);
|
||||
}
|
||||
.swiper-container-vertical > .swiper-pagination-bullets .swiper-pagination-bullet {
|
||||
margin: 5px 0;
|
||||
display: block;
|
||||
}
|
||||
.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {
|
||||
margin: 0 5px;
|
||||
}
|
||||
/* Progress */
|
||||
.swiper-pagination-progress {
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
position: absolute;
|
||||
}
|
||||
.swiper-pagination-progress .swiper-pagination-progressbar {
|
||||
background: #007aff;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
-webkit-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
-o-transform: scale(0);
|
||||
transform: scale(0);
|
||||
-webkit-transform-origin: left top;
|
||||
-moz-transform-origin: left top;
|
||||
-ms-transform-origin: left top;
|
||||
-o-transform-origin: left top;
|
||||
transform-origin: left top;
|
||||
}
|
||||
.swiper-container-rtl .swiper-pagination-progress .swiper-pagination-progressbar {
|
||||
-webkit-transform-origin: right top;
|
||||
-moz-transform-origin: right top;
|
||||
-ms-transform-origin: right top;
|
||||
-o-transform-origin: right top;
|
||||
transform-origin: right top;
|
||||
}
|
||||
.swiper-container-horizontal > .swiper-pagination-progress {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.swiper-container-vertical > .swiper-pagination-progress {
|
||||
width: 4px;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.swiper-pagination-progress.swiper-pagination-white {
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.swiper-pagination-progress.swiper-pagination-white .swiper-pagination-progressbar {
|
||||
background: #fff;
|
||||
}
|
||||
.swiper-pagination-progress.swiper-pagination-black .swiper-pagination-progressbar {
|
||||
background: #000;
|
||||
}
|
||||
/* 3D Container */
|
||||
.swiper-container-3d {
|
||||
-webkit-perspective: 1200px;
|
||||
-moz-perspective: 1200px;
|
||||
-o-perspective: 1200px;
|
||||
perspective: 1200px;
|
||||
}
|
||||
.swiper-container-3d .swiper-wrapper,
|
||||
.swiper-container-3d .swiper-slide,
|
||||
.swiper-container-3d .swiper-slide-shadow-left,
|
||||
.swiper-container-3d .swiper-slide-shadow-right,
|
||||
.swiper-container-3d .swiper-slide-shadow-top,
|
||||
.swiper-container-3d .swiper-slide-shadow-bottom,
|
||||
.swiper-container-3d .swiper-cube-shadow {
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-moz-transform-style: preserve-3d;
|
||||
-ms-transform-style: preserve-3d;
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
.swiper-container-3d .swiper-slide-shadow-left,
|
||||
.swiper-container-3d .swiper-slide-shadow-right,
|
||||
.swiper-container-3d .swiper-slide-shadow-top,
|
||||
.swiper-container-3d .swiper-slide-shadow-bottom {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
}
|
||||
.swiper-container-3d .swiper-slide-shadow-left {
|
||||
background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
||||
/* Safari 4+, Chrome */
|
||||
background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Chrome 10+, Safari 5.1+, iOS 5+ */
|
||||
background-image: -moz-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Firefox 3.6-15 */
|
||||
background-image: -o-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Opera 11.10-12.00 */
|
||||
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Firefox 16+, IE10, Opera 12.50+ */
|
||||
}
|
||||
.swiper-container-3d .swiper-slide-shadow-right {
|
||||
background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
||||
/* Safari 4+, Chrome */
|
||||
background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Chrome 10+, Safari 5.1+, iOS 5+ */
|
||||
background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Firefox 3.6-15 */
|
||||
background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Opera 11.10-12.00 */
|
||||
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Firefox 16+, IE10, Opera 12.50+ */
|
||||
}
|
||||
.swiper-container-3d .swiper-slide-shadow-top {
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
||||
/* Safari 4+, Chrome */
|
||||
background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Chrome 10+, Safari 5.1+, iOS 5+ */
|
||||
background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Firefox 3.6-15 */
|
||||
background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Opera 11.10-12.00 */
|
||||
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Firefox 16+, IE10, Opera 12.50+ */
|
||||
}
|
||||
.swiper-container-3d .swiper-slide-shadow-bottom {
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
||||
/* Safari 4+, Chrome */
|
||||
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Chrome 10+, Safari 5.1+, iOS 5+ */
|
||||
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Firefox 3.6-15 */
|
||||
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Opera 11.10-12.00 */
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
||||
/* Firefox 16+, IE10, Opera 12.50+ */
|
||||
}
|
||||
/* Coverflow */
|
||||
.swiper-container-coverflow .swiper-wrapper,
|
||||
.swiper-container-flip .swiper-wrapper {
|
||||
/* Windows 8 IE 10 fix */
|
||||
-ms-perspective: 1200px;
|
||||
}
|
||||
/* Cube + Flip */
|
||||
.swiper-container-cube,
|
||||
.swiper-container-flip {
|
||||
overflow: visible;
|
||||
}
|
||||
.swiper-container-cube .swiper-slide,
|
||||
.swiper-container-flip .swiper-slide {
|
||||
pointer-events: none;
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
-ms-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
z-index: 1;
|
||||
}
|
||||
.swiper-container-cube .swiper-slide .swiper-slide,
|
||||
.swiper-container-flip .swiper-slide .swiper-slide {
|
||||
pointer-events: none;
|
||||
}
|
||||
.swiper-container-cube .swiper-slide-active,
|
||||
.swiper-container-flip .swiper-slide-active,
|
||||
.swiper-container-cube .swiper-slide-active .swiper-slide-active,
|
||||
.swiper-container-flip .swiper-slide-active .swiper-slide-active {
|
||||
pointer-events: auto;
|
||||
}
|
||||
.swiper-container-cube .swiper-slide-shadow-top,
|
||||
.swiper-container-flip .swiper-slide-shadow-top,
|
||||
.swiper-container-cube .swiper-slide-shadow-bottom,
|
||||
.swiper-container-flip .swiper-slide-shadow-bottom,
|
||||
.swiper-container-cube .swiper-slide-shadow-left,
|
||||
.swiper-container-flip .swiper-slide-shadow-left,
|
||||
.swiper-container-cube .swiper-slide-shadow-right,
|
||||
.swiper-container-flip .swiper-slide-shadow-right {
|
||||
z-index: 0;
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
-ms-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
/* Cube */
|
||||
.swiper-container-cube .swiper-slide {
|
||||
visibility: hidden;
|
||||
-webkit-transform-origin: 0 0;
|
||||
-moz-transform-origin: 0 0;
|
||||
-ms-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.swiper-container-cube.swiper-container-rtl .swiper-slide {
|
||||
-webkit-transform-origin: 100% 0;
|
||||
-moz-transform-origin: 100% 0;
|
||||
-ms-transform-origin: 100% 0;
|
||||
transform-origin: 100% 0;
|
||||
}
|
||||
.swiper-container-cube .swiper-slide-active,
|
||||
.swiper-container-cube .swiper-slide-next,
|
||||
.swiper-container-cube .swiper-slide-prev,
|
||||
.swiper-container-cube .swiper-slide-next + .swiper-slide {
|
||||
pointer-events: auto;
|
||||
visibility: visible;
|
||||
}
|
||||
.swiper-container-cube .swiper-cube-shadow {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #000;
|
||||
opacity: 0.6;
|
||||
-webkit-filter: blur(50px);
|
||||
filter: blur(50px);
|
||||
z-index: 0;
|
||||
}
|
||||
/* Fade */
|
||||
.swiper-container-fade.swiper-container-free-mode .swiper-slide {
|
||||
-webkit-transition-timing-function: ease-out;
|
||||
-moz-transition-timing-function: ease-out;
|
||||
-ms-transition-timing-function: ease-out;
|
||||
-o-transition-timing-function: ease-out;
|
||||
transition-timing-function: ease-out;
|
||||
}
|
||||
.swiper-container-fade .swiper-slide {
|
||||
pointer-events: none;
|
||||
-webkit-transition-property: opacity;
|
||||
-moz-transition-property: opacity;
|
||||
-o-transition-property: opacity;
|
||||
transition-property: opacity;
|
||||
}
|
||||
.swiper-container-fade .swiper-slide .swiper-slide {
|
||||
pointer-events: none;
|
||||
}
|
||||
.swiper-container-fade .swiper-slide-active,
|
||||
.swiper-container-fade .swiper-slide-active .swiper-slide-active {
|
||||
pointer-events: auto;
|
||||
}
|
||||
/* Scrollbar */
|
||||
.swiper-scrollbar {
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
-ms-touch-action: none;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.swiper-container-horizontal > .swiper-scrollbar {
|
||||
position: absolute;
|
||||
left: 1%;
|
||||
bottom: 3px;
|
||||
z-index: 50;
|
||||
height: 5px;
|
||||
width: 98%;
|
||||
}
|
||||
.swiper-container-vertical > .swiper-scrollbar {
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 1%;
|
||||
z-index: 50;
|
||||
width: 5px;
|
||||
height: 98%;
|
||||
}
|
||||
.swiper-scrollbar-drag {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 10px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.swiper-scrollbar-cursor-drag {
|
||||
cursor: move;
|
||||
}
|
||||
/* Preloader */
|
||||
.swiper-lazy-preloader {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -21px;
|
||||
margin-top: -21px;
|
||||
z-index: 10;
|
||||
-webkit-transform-origin: 50%;
|
||||
-moz-transform-origin: 50%;
|
||||
transform-origin: 50%;
|
||||
-webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
||||
-moz-animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
||||
animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
||||
}
|
||||
.swiper-lazy-preloader:after {
|
||||
display: block;
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
||||
background-position: 50%;
|
||||
-webkit-background-size: 100%;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.swiper-lazy-preloader-white:after {
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
||||
}
|
||||
@-webkit-keyframes swiper-preloader-spin {
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes swiper-preloader-spin {
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
4444
dashboard-ui/bower_components/Swiper/dist/js/swiper.js
vendored
4444
dashboard-ui/bower_components/Swiper/dist/js/swiper.js
vendored
File diff suppressed because it is too large
Load Diff
@ -1,88 +0,0 @@
|
||||
// Accessibility tools
|
||||
s.a11y = {
|
||||
makeFocusable: function ($el) {
|
||||
$el.attr('tabIndex', '0');
|
||||
return $el;
|
||||
},
|
||||
addRole: function ($el, role) {
|
||||
$el.attr('role', role);
|
||||
return $el;
|
||||
},
|
||||
|
||||
addLabel: function ($el, label) {
|
||||
$el.attr('aria-label', label);
|
||||
return $el;
|
||||
},
|
||||
|
||||
disable: function ($el) {
|
||||
$el.attr('aria-disabled', true);
|
||||
return $el;
|
||||
},
|
||||
|
||||
enable: function ($el) {
|
||||
$el.attr('aria-disabled', false);
|
||||
return $el;
|
||||
},
|
||||
|
||||
onEnterKey: function (event) {
|
||||
if (event.keyCode !== 13) return;
|
||||
if ($(event.target).is(s.params.nextButton)) {
|
||||
s.onClickNext(event);
|
||||
if (s.isEnd) {
|
||||
s.a11y.notify(s.params.lastSlideMessage);
|
||||
}
|
||||
else {
|
||||
s.a11y.notify(s.params.nextSlideMessage);
|
||||
}
|
||||
}
|
||||
else if ($(event.target).is(s.params.prevButton)) {
|
||||
s.onClickPrev(event);
|
||||
if (s.isBeginning) {
|
||||
s.a11y.notify(s.params.firstSlideMessage);
|
||||
}
|
||||
else {
|
||||
s.a11y.notify(s.params.prevSlideMessage);
|
||||
}
|
||||
}
|
||||
if ($(event.target).is('.' + s.params.bulletClass)) {
|
||||
$(event.target)[0].click();
|
||||
}
|
||||
},
|
||||
|
||||
liveRegion: $('<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>'),
|
||||
|
||||
notify: function (message) {
|
||||
var notification = s.a11y.liveRegion;
|
||||
if (notification.length === 0) return;
|
||||
notification.html('');
|
||||
notification.html(message);
|
||||
},
|
||||
init: function () {
|
||||
// Setup accessibility
|
||||
if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
|
||||
s.a11y.makeFocusable(s.nextButton);
|
||||
s.a11y.addRole(s.nextButton, 'button');
|
||||
s.a11y.addLabel(s.nextButton, s.params.nextSlideMessage);
|
||||
}
|
||||
if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
|
||||
s.a11y.makeFocusable(s.prevButton);
|
||||
s.a11y.addRole(s.prevButton, 'button');
|
||||
s.a11y.addLabel(s.prevButton, s.params.prevSlideMessage);
|
||||
}
|
||||
|
||||
$(s.container).append(s.a11y.liveRegion);
|
||||
},
|
||||
initPagination: function () {
|
||||
if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) {
|
||||
s.bullets.each(function () {
|
||||
var bullet = $(this);
|
||||
s.a11y.makeFocusable(bullet);
|
||||
s.a11y.addRole(bullet, 'button');
|
||||
s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1));
|
||||
});
|
||||
}
|
||||
},
|
||||
destroy: function () {
|
||||
if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove();
|
||||
}
|
||||
};
|
@ -1,13 +0,0 @@
|
||||
/*===========================
|
||||
Swiper AMD Export
|
||||
===========================*/
|
||||
if (typeof(module) !== 'undefined')
|
||||
{
|
||||
module.exports = window.Swiper;
|
||||
}
|
||||
else if (typeof define === 'function' && define.amd) {
|
||||
define([], function () {
|
||||
'use strict';
|
||||
return window.Swiper;
|
||||
});
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
/*=========================
|
||||
Controller
|
||||
===========================*/
|
||||
s.controller = {
|
||||
LinearSpline: function (x, y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.lastIndex = x.length - 1;
|
||||
// Given an x value (x2), return the expected y2 value:
|
||||
// (x1,y1) is the known point before given value,
|
||||
// (x3,y3) is the known point after given value.
|
||||
var i1, i3;
|
||||
var l = this.x.length;
|
||||
|
||||
this.interpolate = function (x2) {
|
||||
if (!x2) return 0;
|
||||
|
||||
// Get the indexes of x1 and x3 (the array indexes before and after given x2):
|
||||
i3 = binarySearch(this.x, x2);
|
||||
i1 = i3 - 1;
|
||||
|
||||
// We have our indexes i1 & i3, so we can calculate already:
|
||||
// y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
|
||||
return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1];
|
||||
};
|
||||
|
||||
var binarySearch = (function() {
|
||||
var maxIndex, minIndex, guess;
|
||||
return function(array, val) {
|
||||
minIndex = -1;
|
||||
maxIndex = array.length;
|
||||
while (maxIndex - minIndex > 1)
|
||||
if (array[guess = maxIndex + minIndex >> 1] <= val) {
|
||||
minIndex = guess;
|
||||
} else {
|
||||
maxIndex = guess;
|
||||
}
|
||||
return maxIndex;
|
||||
};
|
||||
})();
|
||||
},
|
||||
//xxx: for now i will just save one spline function to to
|
||||
getInterpolateFunction: function(c){
|
||||
if(!s.controller.spline) s.controller.spline = s.params.loop ?
|
||||
new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) :
|
||||
new s.controller.LinearSpline(s.snapGrid, c.snapGrid);
|
||||
},
|
||||
setTranslate: function (translate, byController) {
|
||||
var controlled = s.params.control;
|
||||
var multiplier, controlledTranslate;
|
||||
function setControlledTranslate(c) {
|
||||
// this will create an Interpolate function based on the snapGrids
|
||||
// x is the Grid of the scrolled scroller and y will be the controlled scroller
|
||||
// it makes sense to create this only once and recall it for the interpolation
|
||||
// the function does a lot of value caching for performance
|
||||
translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate;
|
||||
if (s.params.controlBy === 'slide') {
|
||||
s.controller.getInterpolateFunction(c);
|
||||
// i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
|
||||
// but it did not work out
|
||||
controlledTranslate = -s.controller.spline.interpolate(-translate);
|
||||
}
|
||||
|
||||
if(!controlledTranslate || s.params.controlBy === 'container'){
|
||||
multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate());
|
||||
controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate();
|
||||
}
|
||||
|
||||
if (s.params.controlInverse) {
|
||||
controlledTranslate = c.maxTranslate() - controlledTranslate;
|
||||
}
|
||||
c.updateProgress(controlledTranslate);
|
||||
c.setWrapperTranslate(controlledTranslate, false, s);
|
||||
c.updateActiveIndex();
|
||||
}
|
||||
if (s.isArray(controlled)) {
|
||||
for (var i = 0; i < controlled.length; i++) {
|
||||
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
||||
setControlledTranslate(controlled[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (controlled instanceof Swiper && byController !== controlled) {
|
||||
|
||||
setControlledTranslate(controlled);
|
||||
}
|
||||
},
|
||||
setTransition: function (duration, byController) {
|
||||
var controlled = s.params.control;
|
||||
var i;
|
||||
function setControlledTransition(c) {
|
||||
c.setWrapperTransition(duration, s);
|
||||
if (duration !== 0) {
|
||||
c.onTransitionStart();
|
||||
c.wrapper.transitionEnd(function(){
|
||||
if (!controlled) return;
|
||||
if (c.params.loop && s.params.controlBy === 'slide') {
|
||||
c.fixLoop();
|
||||
}
|
||||
c.onTransitionEnd();
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
if (s.isArray(controlled)) {
|
||||
for (i = 0; i < controlled.length; i++) {
|
||||
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
||||
setControlledTransition(controlled[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (controlled instanceof Swiper && byController !== controlled) {
|
||||
setControlledTransition(controlled);
|
||||
}
|
||||
}
|
||||
};
|
2288
dashboard-ui/bower_components/Swiper/src/js/core.js
vendored
2288
dashboard-ui/bower_components/Swiper/src/js/core.js
vendored
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
||||
/*===========================
|
||||
Add .swiper plugin from Dom libraries
|
||||
===========================*/
|
||||
function addLibraryPlugin(lib) {
|
||||
lib.fn.swiper = function (params) {
|
||||
var firstInstance;
|
||||
lib(this).each(function () {
|
||||
var s = new Swiper(this, params);
|
||||
if (!firstInstance) firstInstance = s;
|
||||
});
|
||||
return firstInstance;
|
||||
};
|
||||
}
|
||||
|
||||
if (domLib) {
|
||||
if (!('transitionEnd' in domLib.fn)) {
|
||||
domLib.fn.transitionEnd = function (callback) {
|
||||
var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'],
|
||||
i, j, dom = this;
|
||||
function fireCallBack(e) {
|
||||
/*jshint validthis:true */
|
||||
if (e.target !== this) return;
|
||||
callback.call(this, e);
|
||||
for (i = 0; i < events.length; i++) {
|
||||
dom.off(events[i], fireCallBack);
|
||||
}
|
||||
}
|
||||
if (callback) {
|
||||
for (i = 0; i < events.length; i++) {
|
||||
dom.on(events[i], fireCallBack);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
||||
}
|
||||
if (!('transform' in domLib.fn)) {
|
||||
domLib.fn.transform = function (transform) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
var elStyle = this[i].style;
|
||||
elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform;
|
||||
}
|
||||
return this;
|
||||
};
|
||||
}
|
||||
if (!('transition' in domLib.fn)) {
|
||||
domLib.fn.transition = function (duration) {
|
||||
if (typeof duration !== 'string') {
|
||||
duration = duration + 'ms';
|
||||
}
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
var elStyle = this[i].style;
|
||||
elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration;
|
||||
}
|
||||
return this;
|
||||
};
|
||||
}
|
||||
}
|
664
dashboard-ui/bower_components/Swiper/src/js/dom.js
vendored
664
dashboard-ui/bower_components/Swiper/src/js/dom.js
vendored
@ -1,664 +0,0 @@
|
||||
/*===========================
|
||||
Dom7 Library
|
||||
===========================*/
|
||||
var Dom7 = (function () {
|
||||
var Dom7 = function (arr) {
|
||||
var _this = this, i = 0;
|
||||
// Create array-like object
|
||||
for (i = 0; i < arr.length; i++) {
|
||||
_this[i] = arr[i];
|
||||
}
|
||||
_this.length = arr.length;
|
||||
// Return collection with methods
|
||||
return this;
|
||||
};
|
||||
var $ = function (selector, context) {
|
||||
var arr = [], i = 0;
|
||||
if (selector && !context) {
|
||||
if (selector instanceof Dom7) {
|
||||
return selector;
|
||||
}
|
||||
}
|
||||
if (selector) {
|
||||
// String
|
||||
if (typeof selector === 'string') {
|
||||
var els, tempParent, html = selector.trim();
|
||||
if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {
|
||||
var toCreate = 'div';
|
||||
if (html.indexOf('<li') === 0) toCreate = 'ul';
|
||||
if (html.indexOf('<tr') === 0) toCreate = 'tbody';
|
||||
if (html.indexOf('<td') === 0 || html.indexOf('<th') === 0) toCreate = 'tr';
|
||||
if (html.indexOf('<tbody') === 0) toCreate = 'table';
|
||||
if (html.indexOf('<option') === 0) toCreate = 'select';
|
||||
tempParent = document.createElement(toCreate);
|
||||
tempParent.innerHTML = selector;
|
||||
for (i = 0; i < tempParent.childNodes.length; i++) {
|
||||
arr.push(tempParent.childNodes[i]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) {
|
||||
// Pure ID selector
|
||||
els = [document.getElementById(selector.split('#')[1])];
|
||||
}
|
||||
else {
|
||||
// Other selectors
|
||||
els = (context || document).querySelectorAll(selector);
|
||||
}
|
||||
for (i = 0; i < els.length; i++) {
|
||||
if (els[i]) arr.push(els[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Node/element
|
||||
else if (selector.nodeType || selector === window || selector === document) {
|
||||
arr.push(selector);
|
||||
}
|
||||
//Array of elements or instance of Dom
|
||||
else if (selector.length > 0 && selector[0].nodeType) {
|
||||
for (i = 0; i < selector.length; i++) {
|
||||
arr.push(selector[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Dom7(arr);
|
||||
};
|
||||
Dom7.prototype = {
|
||||
// Classes and attriutes
|
||||
addClass: function (className) {
|
||||
if (typeof className === 'undefined') {
|
||||
return this;
|
||||
}
|
||||
var classes = className.split(' ');
|
||||
for (var i = 0; i < classes.length; i++) {
|
||||
for (var j = 0; j < this.length; j++) {
|
||||
this[j].classList.add(classes[i]);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
removeClass: function (className) {
|
||||
var classes = className.split(' ');
|
||||
for (var i = 0; i < classes.length; i++) {
|
||||
for (var j = 0; j < this.length; j++) {
|
||||
this[j].classList.remove(classes[i]);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
hasClass: function (className) {
|
||||
if (!this[0]) return false;
|
||||
else return this[0].classList.contains(className);
|
||||
},
|
||||
toggleClass: function (className) {
|
||||
var classes = className.split(' ');
|
||||
for (var i = 0; i < classes.length; i++) {
|
||||
for (var j = 0; j < this.length; j++) {
|
||||
this[j].classList.toggle(classes[i]);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
attr: function (attrs, value) {
|
||||
if (arguments.length === 1 && typeof attrs === 'string') {
|
||||
// Get attr
|
||||
if (this[0]) return this[0].getAttribute(attrs);
|
||||
else return undefined;
|
||||
}
|
||||
else {
|
||||
// Set attrs
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (arguments.length === 2) {
|
||||
// String
|
||||
this[i].setAttribute(attrs, value);
|
||||
}
|
||||
else {
|
||||
// Object
|
||||
for (var attrName in attrs) {
|
||||
this[i][attrName] = attrs[attrName];
|
||||
this[i].setAttribute(attrName, attrs[attrName]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
},
|
||||
removeAttr: function (attr) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
this[i].removeAttribute(attr);
|
||||
}
|
||||
return this;
|
||||
},
|
||||
data: function (key, value) {
|
||||
if (typeof value === 'undefined') {
|
||||
// Get value
|
||||
if (this[0]) {
|
||||
var dataKey = this[0].getAttribute('data-' + key);
|
||||
if (dataKey) return dataKey;
|
||||
else if (this[0].dom7ElementDataStorage && (key in this[0].dom7ElementDataStorage)) return this[0].dom7ElementDataStorage[key];
|
||||
else return undefined;
|
||||
}
|
||||
else return undefined;
|
||||
}
|
||||
else {
|
||||
// Set value
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
var el = this[i];
|
||||
if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};
|
||||
el.dom7ElementDataStorage[key] = value;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
},
|
||||
// Transforms
|
||||
transform : function (transform) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
var elStyle = this[i].style;
|
||||
elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
transition: function (duration) {
|
||||
if (typeof duration !== 'string') {
|
||||
duration = duration + 'ms';
|
||||
}
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
var elStyle = this[i].style;
|
||||
elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
//Events
|
||||
on: function (eventName, targetSelector, listener, capture) {
|
||||
function handleLiveEvent(e) {
|
||||
var target = e.target;
|
||||
if ($(target).is(targetSelector)) listener.call(target, e);
|
||||
else {
|
||||
var parents = $(target).parents();
|
||||
for (var k = 0; k < parents.length; k++) {
|
||||
if ($(parents[k]).is(targetSelector)) listener.call(parents[k], e);
|
||||
}
|
||||
}
|
||||
}
|
||||
var events = eventName.split(' ');
|
||||
var i, j;
|
||||
for (i = 0; i < this.length; i++) {
|
||||
if (typeof targetSelector === 'function' || targetSelector === false) {
|
||||
// Usual events
|
||||
if (typeof targetSelector === 'function') {
|
||||
listener = arguments[1];
|
||||
capture = arguments[2] || false;
|
||||
}
|
||||
for (j = 0; j < events.length; j++) {
|
||||
this[i].addEventListener(events[j], listener, capture);
|
||||
}
|
||||
}
|
||||
else {
|
||||
//Live events
|
||||
for (j = 0; j < events.length; j++) {
|
||||
if (!this[i].dom7LiveListeners) this[i].dom7LiveListeners = [];
|
||||
this[i].dom7LiveListeners.push({listener: listener, liveListener: handleLiveEvent});
|
||||
this[i].addEventListener(events[j], handleLiveEvent, capture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
off: function (eventName, targetSelector, listener, capture) {
|
||||
var events = eventName.split(' ');
|
||||
for (var i = 0; i < events.length; i++) {
|
||||
for (var j = 0; j < this.length; j++) {
|
||||
if (typeof targetSelector === 'function' || targetSelector === false) {
|
||||
// Usual events
|
||||
if (typeof targetSelector === 'function') {
|
||||
listener = arguments[1];
|
||||
capture = arguments[2] || false;
|
||||
}
|
||||
this[j].removeEventListener(events[i], listener, capture);
|
||||
}
|
||||
else {
|
||||
// Live event
|
||||
if (this[j].dom7LiveListeners) {
|
||||
for (var k = 0; k < this[j].dom7LiveListeners.length; k++) {
|
||||
if (this[j].dom7LiveListeners[k].listener === listener) {
|
||||
this[j].removeEventListener(events[i], this[j].dom7LiveListeners[k].liveListener, capture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
once: function (eventName, targetSelector, listener, capture) {
|
||||
var dom = this;
|
||||
if (typeof targetSelector === 'function') {
|
||||
targetSelector = false;
|
||||
listener = arguments[1];
|
||||
capture = arguments[2];
|
||||
}
|
||||
function proxy(e) {
|
||||
listener(e);
|
||||
dom.off(eventName, targetSelector, proxy, capture);
|
||||
}
|
||||
dom.on(eventName, targetSelector, proxy, capture);
|
||||
},
|
||||
trigger: function (eventName, eventData) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
var evt;
|
||||
try {
|
||||
evt = new window.CustomEvent(eventName, {detail: eventData, bubbles: true, cancelable: true});
|
||||
}
|
||||
catch (e) {
|
||||
evt = document.createEvent('Event');
|
||||
evt.initEvent(eventName, true, true);
|
||||
evt.detail = eventData;
|
||||
}
|
||||
this[i].dispatchEvent(evt);
|
||||
}
|
||||
return this;
|
||||
},
|
||||
transitionEnd: function (callback) {
|
||||
var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'],
|
||||
i, j, dom = this;
|
||||
function fireCallBack(e) {
|
||||
/*jshint validthis:true */
|
||||
if (e.target !== this) return;
|
||||
callback.call(this, e);
|
||||
for (i = 0; i < events.length; i++) {
|
||||
dom.off(events[i], fireCallBack);
|
||||
}
|
||||
}
|
||||
if (callback) {
|
||||
for (i = 0; i < events.length; i++) {
|
||||
dom.on(events[i], fireCallBack);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
// Sizing/Styles
|
||||
width: function () {
|
||||
if (this[0] === window) {
|
||||
return window.innerWidth;
|
||||
}
|
||||
else {
|
||||
if (this.length > 0) {
|
||||
return parseFloat(this.css('width'));
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
outerWidth: function (includeMargins) {
|
||||
if (this.length > 0) {
|
||||
if (includeMargins)
|
||||
return this[0].offsetWidth + parseFloat(this.css('margin-right')) + parseFloat(this.css('margin-left'));
|
||||
else
|
||||
return this[0].offsetWidth;
|
||||
}
|
||||
else return null;
|
||||
},
|
||||
height: function () {
|
||||
if (this[0] === window) {
|
||||
return window.innerHeight;
|
||||
}
|
||||
else {
|
||||
if (this.length > 0) {
|
||||
return parseFloat(this.css('height'));
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
outerHeight: function (includeMargins) {
|
||||
if (this.length > 0) {
|
||||
if (includeMargins)
|
||||
return this[0].offsetHeight + parseFloat(this.css('margin-top')) + parseFloat(this.css('margin-bottom'));
|
||||
else
|
||||
return this[0].offsetHeight;
|
||||
}
|
||||
else return null;
|
||||
},
|
||||
offset: function () {
|
||||
if (this.length > 0) {
|
||||
var el = this[0];
|
||||
var box = el.getBoundingClientRect();
|
||||
var body = document.body;
|
||||
var clientTop = el.clientTop || body.clientTop || 0;
|
||||
var clientLeft = el.clientLeft || body.clientLeft || 0;
|
||||
var scrollTop = window.pageYOffset || el.scrollTop;
|
||||
var scrollLeft = window.pageXOffset || el.scrollLeft;
|
||||
return {
|
||||
top: box.top + scrollTop - clientTop,
|
||||
left: box.left + scrollLeft - clientLeft
|
||||
};
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
css: function (props, value) {
|
||||
var i;
|
||||
if (arguments.length === 1) {
|
||||
if (typeof props === 'string') {
|
||||
if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props);
|
||||
}
|
||||
else {
|
||||
for (i = 0; i < this.length; i++) {
|
||||
for (var prop in props) {
|
||||
this[i].style[prop] = props[prop];
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
}
|
||||
if (arguments.length === 2 && typeof props === 'string') {
|
||||
for (i = 0; i < this.length; i++) {
|
||||
this[i].style[props] = value;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
//Dom manipulation
|
||||
each: function (callback) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
callback.call(this[i], i, this[i]);
|
||||
}
|
||||
return this;
|
||||
},
|
||||
html: function (html) {
|
||||
if (typeof html === 'undefined') {
|
||||
return this[0] ? this[0].innerHTML : undefined;
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
this[i].innerHTML = html;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
},
|
||||
text: function (text) {
|
||||
if (typeof text === 'undefined') {
|
||||
if (this[0]) {
|
||||
return this[0].textContent.trim();
|
||||
}
|
||||
else return null;
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
this[i].textContent = text;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
},
|
||||
is: function (selector) {
|
||||
if (!this[0]) return false;
|
||||
var compareWith, i;
|
||||
if (typeof selector === 'string') {
|
||||
var el = this[0];
|
||||
if (el === document) return selector === document;
|
||||
if (el === window) return selector === window;
|
||||
|
||||
if (el.matches) return el.matches(selector);
|
||||
else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);
|
||||
else if (el.mozMatchesSelector) return el.mozMatchesSelector(selector);
|
||||
else if (el.msMatchesSelector) return el.msMatchesSelector(selector);
|
||||
else {
|
||||
compareWith = $(selector);
|
||||
for (i = 0; i < compareWith.length; i++) {
|
||||
if (compareWith[i] === this[0]) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (selector === document) return this[0] === document;
|
||||
else if (selector === window) return this[0] === window;
|
||||
else {
|
||||
if (selector.nodeType || selector instanceof Dom7) {
|
||||
compareWith = selector.nodeType ? [selector] : selector;
|
||||
for (i = 0; i < compareWith.length; i++) {
|
||||
if (compareWith[i] === this[0]) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
index: function () {
|
||||
if (this[0]) {
|
||||
var child = this[0];
|
||||
var i = 0;
|
||||
while ((child = child.previousSibling) !== null) {
|
||||
if (child.nodeType === 1) i++;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
else return undefined;
|
||||
},
|
||||
eq: function (index) {
|
||||
if (typeof index === 'undefined') return this;
|
||||
var length = this.length;
|
||||
var returnIndex;
|
||||
if (index > length - 1) {
|
||||
return new Dom7([]);
|
||||
}
|
||||
if (index < 0) {
|
||||
returnIndex = length + index;
|
||||
if (returnIndex < 0) return new Dom7([]);
|
||||
else return new Dom7([this[returnIndex]]);
|
||||
}
|
||||
return new Dom7([this[index]]);
|
||||
},
|
||||
append: function (newChild) {
|
||||
var i, j;
|
||||
for (i = 0; i < this.length; i++) {
|
||||
if (typeof newChild === 'string') {
|
||||
var tempDiv = document.createElement('div');
|
||||
tempDiv.innerHTML = newChild;
|
||||
while (tempDiv.firstChild) {
|
||||
this[i].appendChild(tempDiv.firstChild);
|
||||
}
|
||||
}
|
||||
else if (newChild instanceof Dom7) {
|
||||
for (j = 0; j < newChild.length; j++) {
|
||||
this[i].appendChild(newChild[j]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this[i].appendChild(newChild);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
prepend: function (newChild) {
|
||||
var i, j;
|
||||
for (i = 0; i < this.length; i++) {
|
||||
if (typeof newChild === 'string') {
|
||||
var tempDiv = document.createElement('div');
|
||||
tempDiv.innerHTML = newChild;
|
||||
for (j = tempDiv.childNodes.length - 1; j >= 0; j--) {
|
||||
this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);
|
||||
}
|
||||
// this[i].insertAdjacentHTML('afterbegin', newChild);
|
||||
}
|
||||
else if (newChild instanceof Dom7) {
|
||||
for (j = 0; j < newChild.length; j++) {
|
||||
this[i].insertBefore(newChild[j], this[i].childNodes[0]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this[i].insertBefore(newChild, this[i].childNodes[0]);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
insertBefore: function (selector) {
|
||||
var before = $(selector);
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (before.length === 1) {
|
||||
before[0].parentNode.insertBefore(this[i], before[0]);
|
||||
}
|
||||
else if (before.length > 1) {
|
||||
for (var j = 0; j < before.length; j++) {
|
||||
before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
insertAfter: function (selector) {
|
||||
var after = $(selector);
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (after.length === 1) {
|
||||
after[0].parentNode.insertBefore(this[i], after[0].nextSibling);
|
||||
}
|
||||
else if (after.length > 1) {
|
||||
for (var j = 0; j < after.length; j++) {
|
||||
after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
next: function (selector) {
|
||||
if (this.length > 0) {
|
||||
if (selector) {
|
||||
if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) return new Dom7([this[0].nextElementSibling]);
|
||||
else return new Dom7([]);
|
||||
}
|
||||
else {
|
||||
if (this[0].nextElementSibling) return new Dom7([this[0].nextElementSibling]);
|
||||
else return new Dom7([]);
|
||||
}
|
||||
}
|
||||
else return new Dom7([]);
|
||||
},
|
||||
nextAll: function (selector) {
|
||||
var nextEls = [];
|
||||
var el = this[0];
|
||||
if (!el) return new Dom7([]);
|
||||
while (el.nextElementSibling) {
|
||||
var next = el.nextElementSibling;
|
||||
if (selector) {
|
||||
if($(next).is(selector)) nextEls.push(next);
|
||||
}
|
||||
else nextEls.push(next);
|
||||
el = next;
|
||||
}
|
||||
return new Dom7(nextEls);
|
||||
},
|
||||
prev: function (selector) {
|
||||
if (this.length > 0) {
|
||||
if (selector) {
|
||||
if (this[0].previousElementSibling && $(this[0].previousElementSibling).is(selector)) return new Dom7([this[0].previousElementSibling]);
|
||||
else return new Dom7([]);
|
||||
}
|
||||
else {
|
||||
if (this[0].previousElementSibling) return new Dom7([this[0].previousElementSibling]);
|
||||
else return new Dom7([]);
|
||||
}
|
||||
}
|
||||
else return new Dom7([]);
|
||||
},
|
||||
prevAll: function (selector) {
|
||||
var prevEls = [];
|
||||
var el = this[0];
|
||||
if (!el) return new Dom7([]);
|
||||
while (el.previousElementSibling) {
|
||||
var prev = el.previousElementSibling;
|
||||
if (selector) {
|
||||
if($(prev).is(selector)) prevEls.push(prev);
|
||||
}
|
||||
else prevEls.push(prev);
|
||||
el = prev;
|
||||
}
|
||||
return new Dom7(prevEls);
|
||||
},
|
||||
parent: function (selector) {
|
||||
var parents = [];
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (selector) {
|
||||
if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);
|
||||
}
|
||||
else {
|
||||
parents.push(this[i].parentNode);
|
||||
}
|
||||
}
|
||||
return $($.unique(parents));
|
||||
},
|
||||
parents: function (selector) {
|
||||
var parents = [];
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
var parent = this[i].parentNode;
|
||||
while (parent) {
|
||||
if (selector) {
|
||||
if ($(parent).is(selector)) parents.push(parent);
|
||||
}
|
||||
else {
|
||||
parents.push(parent);
|
||||
}
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
}
|
||||
return $($.unique(parents));
|
||||
},
|
||||
find : function (selector) {
|
||||
var foundElements = [];
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
var found = this[i].querySelectorAll(selector);
|
||||
for (var j = 0; j < found.length; j++) {
|
||||
foundElements.push(found[j]);
|
||||
}
|
||||
}
|
||||
return new Dom7(foundElements);
|
||||
},
|
||||
children: function (selector) {
|
||||
var children = [];
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
var childNodes = this[i].childNodes;
|
||||
|
||||
for (var j = 0; j < childNodes.length; j++) {
|
||||
if (!selector) {
|
||||
if (childNodes[j].nodeType === 1) children.push(childNodes[j]);
|
||||
}
|
||||
else {
|
||||
if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) children.push(childNodes[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Dom7($.unique(children));
|
||||
},
|
||||
remove: function () {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);
|
||||
}
|
||||
return this;
|
||||
},
|
||||
add: function () {
|
||||
var dom = this;
|
||||
var i, j;
|
||||
for (i = 0; i < arguments.length; i++) {
|
||||
var toAdd = $(arguments[i]);
|
||||
for (j = 0; j < toAdd.length; j++) {
|
||||
dom[dom.length] = toAdd[j];
|
||||
dom.length++;
|
||||
}
|
||||
}
|
||||
return dom;
|
||||
}
|
||||
};
|
||||
$.fn = Dom7.prototype;
|
||||
$.unique = function (arr) {
|
||||
var unique = [];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (unique.indexOf(arr[i]) === -1) unique.push(arr[i]);
|
||||
}
|
||||
return unique;
|
||||
};
|
||||
|
||||
return $;
|
||||
})();
|
@ -1,276 +0,0 @@
|
||||
/*=========================
|
||||
Effects
|
||||
===========================*/
|
||||
s.effects = {
|
||||
fade: {
|
||||
setTranslate: function () {
|
||||
for (var i = 0; i < s.slides.length; i++) {
|
||||
var slide = s.slides.eq(i);
|
||||
var offset = slide[0].swiperSlideOffset;
|
||||
var tx = -offset;
|
||||
if (!s.params.virtualTranslate) tx = tx - s.translate;
|
||||
var ty = 0;
|
||||
if (!s.isHorizontal()) {
|
||||
ty = tx;
|
||||
tx = 0;
|
||||
}
|
||||
var slideOpacity = s.params.fade.crossFade ?
|
||||
Math.max(1 - Math.abs(slide[0].progress), 0) :
|
||||
1 + Math.min(Math.max(slide[0].progress, -1), 0);
|
||||
slide
|
||||
.css({
|
||||
opacity: slideOpacity
|
||||
})
|
||||
.transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)');
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
setTransition: function (duration) {
|
||||
s.slides.transition(duration);
|
||||
if (s.params.virtualTranslate && duration !== 0) {
|
||||
var eventTriggered = false;
|
||||
s.slides.transitionEnd(function () {
|
||||
if (eventTriggered) return;
|
||||
if (!s) return;
|
||||
eventTriggered = true;
|
||||
s.animating = false;
|
||||
var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];
|
||||
for (var i = 0; i < triggerEvents.length; i++) {
|
||||
s.wrapper.trigger(triggerEvents[i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
flip: {
|
||||
setTranslate: function () {
|
||||
for (var i = 0; i < s.slides.length; i++) {
|
||||
var slide = s.slides.eq(i);
|
||||
var progress = slide[0].progress;
|
||||
if (s.params.flip.limitRotation) {
|
||||
progress = Math.max(Math.min(slide[0].progress, 1), -1);
|
||||
}
|
||||
var offset = slide[0].swiperSlideOffset;
|
||||
var rotate = -180 * progress,
|
||||
rotateY = rotate,
|
||||
rotateX = 0,
|
||||
tx = -offset,
|
||||
ty = 0;
|
||||
if (!s.isHorizontal()) {
|
||||
ty = tx;
|
||||
tx = 0;
|
||||
rotateX = -rotateY;
|
||||
rotateY = 0;
|
||||
}
|
||||
else if (s.rtl) {
|
||||
rotateY = -rotateY;
|
||||
}
|
||||
|
||||
slide[0].style.zIndex = -Math.abs(Math.round(progress)) + s.slides.length;
|
||||
|
||||
if (s.params.flip.slideShadows) {
|
||||
//Set shadows
|
||||
var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
|
||||
var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
|
||||
if (shadowBefore.length === 0) {
|
||||
shadowBefore = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'left' : 'top') + '"></div>');
|
||||
slide.append(shadowBefore);
|
||||
}
|
||||
if (shadowAfter.length === 0) {
|
||||
shadowAfter = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'right' : 'bottom') + '"></div>');
|
||||
slide.append(shadowAfter);
|
||||
}
|
||||
if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
|
||||
if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
|
||||
}
|
||||
|
||||
slide
|
||||
.transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)');
|
||||
}
|
||||
},
|
||||
setTransition: function (duration) {
|
||||
s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
|
||||
if (s.params.virtualTranslate && duration !== 0) {
|
||||
var eventTriggered = false;
|
||||
s.slides.eq(s.activeIndex).transitionEnd(function () {
|
||||
if (eventTriggered) return;
|
||||
if (!s) return;
|
||||
if (!$(this).hasClass(s.params.slideActiveClass)) return;
|
||||
eventTriggered = true;
|
||||
s.animating = false;
|
||||
var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];
|
||||
for (var i = 0; i < triggerEvents.length; i++) {
|
||||
s.wrapper.trigger(triggerEvents[i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
cube: {
|
||||
setTranslate: function () {
|
||||
var wrapperRotate = 0, cubeShadow;
|
||||
if (s.params.cube.shadow) {
|
||||
if (s.isHorizontal()) {
|
||||
cubeShadow = s.wrapper.find('.swiper-cube-shadow');
|
||||
if (cubeShadow.length === 0) {
|
||||
cubeShadow = $('<div class="swiper-cube-shadow"></div>');
|
||||
s.wrapper.append(cubeShadow);
|
||||
}
|
||||
cubeShadow.css({height: s.width + 'px'});
|
||||
}
|
||||
else {
|
||||
cubeShadow = s.container.find('.swiper-cube-shadow');
|
||||
if (cubeShadow.length === 0) {
|
||||
cubeShadow = $('<div class="swiper-cube-shadow"></div>');
|
||||
s.container.append(cubeShadow);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < s.slides.length; i++) {
|
||||
var slide = s.slides.eq(i);
|
||||
var slideAngle = i * 90;
|
||||
var round = Math.floor(slideAngle / 360);
|
||||
if (s.rtl) {
|
||||
slideAngle = -slideAngle;
|
||||
round = Math.floor(-slideAngle / 360);
|
||||
}
|
||||
var progress = Math.max(Math.min(slide[0].progress, 1), -1);
|
||||
var tx = 0, ty = 0, tz = 0;
|
||||
if (i % 4 === 0) {
|
||||
tx = - round * 4 * s.size;
|
||||
tz = 0;
|
||||
}
|
||||
else if ((i - 1) % 4 === 0) {
|
||||
tx = 0;
|
||||
tz = - round * 4 * s.size;
|
||||
}
|
||||
else if ((i - 2) % 4 === 0) {
|
||||
tx = s.size + round * 4 * s.size;
|
||||
tz = s.size;
|
||||
}
|
||||
else if ((i - 3) % 4 === 0) {
|
||||
tx = - s.size;
|
||||
tz = 3 * s.size + s.size * 4 * round;
|
||||
}
|
||||
if (s.rtl) {
|
||||
tx = -tx;
|
||||
}
|
||||
|
||||
if (!s.isHorizontal()) {
|
||||
ty = tx;
|
||||
tx = 0;
|
||||
}
|
||||
|
||||
var transform = 'rotateX(' + (s.isHorizontal() ? 0 : -slideAngle) + 'deg) rotateY(' + (s.isHorizontal() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)';
|
||||
if (progress <= 1 && progress > -1) {
|
||||
wrapperRotate = i * 90 + progress * 90;
|
||||
if (s.rtl) wrapperRotate = -i * 90 - progress * 90;
|
||||
}
|
||||
slide.transform(transform);
|
||||
if (s.params.cube.slideShadows) {
|
||||
//Set shadows
|
||||
var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
|
||||
var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
|
||||
if (shadowBefore.length === 0) {
|
||||
shadowBefore = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'left' : 'top') + '"></div>');
|
||||
slide.append(shadowBefore);
|
||||
}
|
||||
if (shadowAfter.length === 0) {
|
||||
shadowAfter = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'right' : 'bottom') + '"></div>');
|
||||
slide.append(shadowAfter);
|
||||
}
|
||||
if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
|
||||
if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
|
||||
}
|
||||
}
|
||||
s.wrapper.css({
|
||||
'-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
|
||||
'-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
|
||||
'-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
|
||||
'transform-origin': '50% 50% -' + (s.size / 2) + 'px'
|
||||
});
|
||||
|
||||
if (s.params.cube.shadow) {
|
||||
if (s.isHorizontal()) {
|
||||
cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')');
|
||||
}
|
||||
else {
|
||||
var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;
|
||||
var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);
|
||||
var scale1 = s.params.cube.shadowScale,
|
||||
scale2 = s.params.cube.shadowScale / multiplier,
|
||||
offset = s.params.cube.shadowOffset;
|
||||
cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)');
|
||||
}
|
||||
}
|
||||
var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0;
|
||||
s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (s.isHorizontal() ? 0 : wrapperRotate) + 'deg) rotateY(' + (s.isHorizontal() ? -wrapperRotate : 0) + 'deg)');
|
||||
},
|
||||
setTransition: function (duration) {
|
||||
s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
|
||||
if (s.params.cube.shadow && !s.isHorizontal()) {
|
||||
s.container.find('.swiper-cube-shadow').transition(duration);
|
||||
}
|
||||
}
|
||||
},
|
||||
coverflow: {
|
||||
setTranslate: function () {
|
||||
var transform = s.translate;
|
||||
var center = s.isHorizontal() ? -transform + s.width / 2 : -transform + s.height / 2;
|
||||
var rotate = s.isHorizontal() ? s.params.coverflow.rotate: -s.params.coverflow.rotate;
|
||||
var translate = s.params.coverflow.depth;
|
||||
//Each slide offset from center
|
||||
for (var i = 0, length = s.slides.length; i < length; i++) {
|
||||
var slide = s.slides.eq(i);
|
||||
var slideSize = s.slidesSizesGrid[i];
|
||||
var slideOffset = slide[0].swiperSlideOffset;
|
||||
var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier;
|
||||
|
||||
var rotateY = s.isHorizontal() ? rotate * offsetMultiplier : 0;
|
||||
var rotateX = s.isHorizontal() ? 0 : rotate * offsetMultiplier;
|
||||
// var rotateZ = 0
|
||||
var translateZ = -translate * Math.abs(offsetMultiplier);
|
||||
|
||||
var translateY = s.isHorizontal() ? 0 : s.params.coverflow.stretch * (offsetMultiplier);
|
||||
var translateX = s.isHorizontal() ? s.params.coverflow.stretch * (offsetMultiplier) : 0;
|
||||
|
||||
//Fix for ultra small values
|
||||
if (Math.abs(translateX) < 0.001) translateX = 0;
|
||||
if (Math.abs(translateY) < 0.001) translateY = 0;
|
||||
if (Math.abs(translateZ) < 0.001) translateZ = 0;
|
||||
if (Math.abs(rotateY) < 0.001) rotateY = 0;
|
||||
if (Math.abs(rotateX) < 0.001) rotateX = 0;
|
||||
|
||||
var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)';
|
||||
|
||||
slide.transform(slideTransform);
|
||||
slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
|
||||
if (s.params.coverflow.slideShadows) {
|
||||
//Set shadows
|
||||
var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
|
||||
var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
|
||||
if (shadowBefore.length === 0) {
|
||||
shadowBefore = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'left' : 'top') + '"></div>');
|
||||
slide.append(shadowBefore);
|
||||
}
|
||||
if (shadowAfter.length === 0) {
|
||||
shadowAfter = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'right' : 'bottom') + '"></div>');
|
||||
slide.append(shadowAfter);
|
||||
}
|
||||
if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
|
||||
if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;
|
||||
}
|
||||
}
|
||||
|
||||
//Set correct perspective for IE10
|
||||
if (s.browser.ie) {
|
||||
var ws = s.wrapper[0].style;
|
||||
ws.perspectiveOrigin = center + 'px 50%';
|
||||
}
|
||||
},
|
||||
setTransition: function (duration) {
|
||||
s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
|
||||
}
|
||||
}
|
||||
};
|
@ -1,61 +0,0 @@
|
||||
/*=========================
|
||||
Events/Callbacks/Plugins Emitter
|
||||
===========================*/
|
||||
function normalizeEventName (eventName) {
|
||||
if (eventName.indexOf('on') !== 0) {
|
||||
if (eventName[0] !== eventName[0].toUpperCase()) {
|
||||
eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1);
|
||||
}
|
||||
else {
|
||||
eventName = 'on' + eventName;
|
||||
}
|
||||
}
|
||||
return eventName;
|
||||
}
|
||||
s.emitterEventListeners = {
|
||||
|
||||
};
|
||||
s.emit = function (eventName) {
|
||||
// Trigger callbacks
|
||||
if (s.params[eventName]) {
|
||||
s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
|
||||
}
|
||||
var i;
|
||||
// Trigger events
|
||||
if (s.emitterEventListeners[eventName]) {
|
||||
for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {
|
||||
s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
|
||||
}
|
||||
}
|
||||
// Trigger plugins
|
||||
if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
|
||||
};
|
||||
s.on = function (eventName, handler) {
|
||||
eventName = normalizeEventName(eventName);
|
||||
if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = [];
|
||||
s.emitterEventListeners[eventName].push(handler);
|
||||
return s;
|
||||
};
|
||||
s.off = function (eventName, handler) {
|
||||
var i;
|
||||
eventName = normalizeEventName(eventName);
|
||||
if (typeof handler === 'undefined') {
|
||||
// Remove all handlers for such event
|
||||
s.emitterEventListeners[eventName] = [];
|
||||
return s;
|
||||
}
|
||||
if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return;
|
||||
for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {
|
||||
if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1);
|
||||
}
|
||||
return s;
|
||||
};
|
||||
s.once = function (eventName, handler) {
|
||||
eventName = normalizeEventName(eventName);
|
||||
var _handler = function () {
|
||||
handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
|
||||
s.off(eventName, _handler);
|
||||
};
|
||||
s.on(eventName, _handler);
|
||||
return s;
|
||||
};
|
@ -1,17 +0,0 @@
|
||||
/*===========================
|
||||
Get Dom libraries
|
||||
===========================*/
|
||||
var swiperDomPlugins = ['jQuery', 'Zepto', 'Dom7'];
|
||||
for (var i = 0; i < swiperDomPlugins.length; i++) {
|
||||
if (window[swiperDomPlugins[i]]) {
|
||||
addLibraryPlugin(window[swiperDomPlugins[i]]);
|
||||
}
|
||||
}
|
||||
// Required DOM Plugins
|
||||
var domLib;
|
||||
if (typeof Dom7 === 'undefined') {
|
||||
domLib = window.Dom7 || window.Zepto || window.jQuery;
|
||||
}
|
||||
else {
|
||||
domLib = Dom7;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
/*===========================
|
||||
Get jQuery
|
||||
===========================*/
|
||||
|
||||
addLibraryPlugin($);
|
||||
|
||||
var domLib = $;
|
@ -1,24 +0,0 @@
|
||||
/*=========================
|
||||
Hash Navigation
|
||||
===========================*/
|
||||
s.hashnav = {
|
||||
init: function () {
|
||||
if (!s.params.hashnav) return;
|
||||
s.hashnav.initialized = true;
|
||||
var hash = document.location.hash.replace('#', '');
|
||||
if (!hash) return;
|
||||
var speed = 0;
|
||||
for (var i = 0, length = s.slides.length; i < length; i++) {
|
||||
var slide = s.slides.eq(i);
|
||||
var slideHash = slide.attr('data-hash');
|
||||
if (slideHash === hash && !slide.hasClass(s.params.slideDuplicateClass)) {
|
||||
var index = slide.index();
|
||||
s.slideTo(index, speed, s.params.runCallbacksOnInit, true);
|
||||
}
|
||||
}
|
||||
},
|
||||
setHash: function () {
|
||||
if (!s.hashnav.initialized || !s.params.hashnav) return;
|
||||
document.location.hash = s.slides.eq(s.activeIndex).attr('data-hash') || '';
|
||||
}
|
||||
};
|
133
dashboard-ui/bower_components/Swiper/src/js/init.js
vendored
133
dashboard-ui/bower_components/Swiper/src/js/init.js
vendored
@ -1,133 +0,0 @@
|
||||
/*=========================
|
||||
Init/Destroy
|
||||
===========================*/
|
||||
s.init = function () {
|
||||
if (s.params.loop) s.createLoop();
|
||||
s.updateContainerSize();
|
||||
s.updateSlidesSize();
|
||||
s.updatePagination();
|
||||
if (s.params.scrollbar && s.scrollbar) {
|
||||
s.scrollbar.set();
|
||||
if (s.params.scrollbarDraggable) {
|
||||
s.scrollbar.enableDraggable();
|
||||
}
|
||||
}
|
||||
if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {
|
||||
if (!s.params.loop) s.updateProgress();
|
||||
s.effects[s.params.effect].setTranslate();
|
||||
}
|
||||
if (s.params.loop) {
|
||||
s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit);
|
||||
}
|
||||
else {
|
||||
s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit);
|
||||
if (s.params.initialSlide === 0) {
|
||||
if (s.parallax && s.params.parallax) s.parallax.setTranslate();
|
||||
if (s.lazy && s.params.lazyLoading) {
|
||||
s.lazy.load();
|
||||
s.lazy.initialImageLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
s.attachEvents();
|
||||
if (s.params.observer && s.support.observer) {
|
||||
s.initObservers();
|
||||
}
|
||||
if (s.params.preloadImages && !s.params.lazyLoading) {
|
||||
s.preloadImages();
|
||||
}
|
||||
if (s.params.autoplay) {
|
||||
s.startAutoplay();
|
||||
}
|
||||
if (s.params.keyboardControl) {
|
||||
if (s.enableKeyboardControl) s.enableKeyboardControl();
|
||||
}
|
||||
if (s.params.mousewheelControl) {
|
||||
if (s.enableMousewheelControl) s.enableMousewheelControl();
|
||||
}
|
||||
if (s.params.hashnav) {
|
||||
if (s.hashnav) s.hashnav.init();
|
||||
}
|
||||
if (s.params.a11y && s.a11y) s.a11y.init();
|
||||
s.emit('onInit', s);
|
||||
};
|
||||
|
||||
// Cleanup dynamic styles
|
||||
s.cleanupStyles = function () {
|
||||
// Container
|
||||
s.container.removeClass(s.classNames.join(' ')).removeAttr('style');
|
||||
|
||||
// Wrapper
|
||||
s.wrapper.removeAttr('style');
|
||||
|
||||
// Slides
|
||||
if (s.slides && s.slides.length) {
|
||||
s.slides
|
||||
.removeClass([
|
||||
s.params.slideVisibleClass,
|
||||
s.params.slideActiveClass,
|
||||
s.params.slideNextClass,
|
||||
s.params.slidePrevClass
|
||||
].join(' '))
|
||||
.removeAttr('style')
|
||||
.removeAttr('data-swiper-column')
|
||||
.removeAttr('data-swiper-row');
|
||||
}
|
||||
|
||||
// Pagination/Bullets
|
||||
if (s.paginationContainer && s.paginationContainer.length) {
|
||||
s.paginationContainer.removeClass(s.params.paginationHiddenClass);
|
||||
}
|
||||
if (s.bullets && s.bullets.length) {
|
||||
s.bullets.removeClass(s.params.bulletActiveClass);
|
||||
}
|
||||
|
||||
// Buttons
|
||||
if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);
|
||||
if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);
|
||||
|
||||
// Scrollbar
|
||||
if (s.params.scrollbar && s.scrollbar) {
|
||||
if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style');
|
||||
if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style');
|
||||
}
|
||||
};
|
||||
|
||||
// Destroy
|
||||
s.destroy = function (deleteInstance, cleanupStyles) {
|
||||
// Detach evebts
|
||||
s.detachEvents();
|
||||
// Stop autoplay
|
||||
s.stopAutoplay();
|
||||
// Disable draggable
|
||||
if (s.params.scrollbar && s.scrollbar) {
|
||||
if (s.params.scrollbarDraggable) {
|
||||
s.scrollbar.disableDraggable();
|
||||
}
|
||||
}
|
||||
// Destroy loop
|
||||
if (s.params.loop) {
|
||||
s.destroyLoop();
|
||||
}
|
||||
// Cleanup styles
|
||||
if (cleanupStyles) {
|
||||
s.cleanupStyles();
|
||||
}
|
||||
// Disconnect observer
|
||||
s.disconnectObservers();
|
||||
// Disable keyboard/mousewheel
|
||||
if (s.params.keyboardControl) {
|
||||
if (s.disableKeyboardControl) s.disableKeyboardControl();
|
||||
}
|
||||
if (s.params.mousewheelControl) {
|
||||
if (s.disableMousewheelControl) s.disableMousewheelControl();
|
||||
}
|
||||
// Disable a11y
|
||||
if (s.params.a11y && s.a11y) s.a11y.destroy();
|
||||
// Destroy callback
|
||||
s.emit('onDestroy');
|
||||
// Delete instance
|
||||
if (deleteInstance !== false) s = null;
|
||||
};
|
||||
|
||||
s.init();
|
@ -1,76 +0,0 @@
|
||||
/*=========================
|
||||
Keyboard Control
|
||||
===========================*/
|
||||
function handleKeyboard(e) {
|
||||
if (e.originalEvent) e = e.originalEvent; //jquery fix
|
||||
var kc = e.keyCode || e.charCode;
|
||||
// Directions locks
|
||||
if (!s.params.allowSwipeToNext && (s.isHorizontal() && kc === 39 || !s.isHorizontal() && kc === 40)) {
|
||||
return false;
|
||||
}
|
||||
if (!s.params.allowSwipeToPrev && (s.isHorizontal() && kc === 37 || !s.isHorizontal() && kc === 38)) {
|
||||
return false;
|
||||
}
|
||||
if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
|
||||
return;
|
||||
}
|
||||
if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {
|
||||
return;
|
||||
}
|
||||
if (kc === 37 || kc === 39 || kc === 38 || kc === 40) {
|
||||
var inView = false;
|
||||
//Check that swiper should be inside of visible area of window
|
||||
if (s.container.parents('.swiper-slide').length > 0 && s.container.parents('.swiper-slide-active').length === 0) {
|
||||
return;
|
||||
}
|
||||
var windowScroll = {
|
||||
left: window.pageXOffset,
|
||||
top: window.pageYOffset
|
||||
};
|
||||
var windowWidth = window.innerWidth;
|
||||
var windowHeight = window.innerHeight;
|
||||
var swiperOffset = s.container.offset();
|
||||
if (s.rtl) swiperOffset.left = swiperOffset.left - s.container[0].scrollLeft;
|
||||
var swiperCoord = [
|
||||
[swiperOffset.left, swiperOffset.top],
|
||||
[swiperOffset.left + s.width, swiperOffset.top],
|
||||
[swiperOffset.left, swiperOffset.top + s.height],
|
||||
[swiperOffset.left + s.width, swiperOffset.top + s.height]
|
||||
];
|
||||
for (var i = 0; i < swiperCoord.length; i++) {
|
||||
var point = swiperCoord[i];
|
||||
if (
|
||||
point[0] >= windowScroll.left && point[0] <= windowScroll.left + windowWidth &&
|
||||
point[1] >= windowScroll.top && point[1] <= windowScroll.top + windowHeight
|
||||
) {
|
||||
inView = true;
|
||||
}
|
||||
|
||||
}
|
||||
if (!inView) return;
|
||||
}
|
||||
if (s.isHorizontal()) {
|
||||
if (kc === 37 || kc === 39) {
|
||||
if (e.preventDefault) e.preventDefault();
|
||||
else e.returnValue = false;
|
||||
}
|
||||
if ((kc === 39 && !s.rtl) || (kc === 37 && s.rtl)) s.slideNext();
|
||||
if ((kc === 37 && !s.rtl) || (kc === 39 && s.rtl)) s.slidePrev();
|
||||
}
|
||||
else {
|
||||
if (kc === 38 || kc === 40) {
|
||||
if (e.preventDefault) e.preventDefault();
|
||||
else e.returnValue = false;
|
||||
}
|
||||
if (kc === 40) s.slideNext();
|
||||
if (kc === 38) s.slidePrev();
|
||||
}
|
||||
}
|
||||
s.disableKeyboardControl = function () {
|
||||
s.params.keyboardControl = false;
|
||||
$(document).off('keydown', handleKeyboard);
|
||||
};
|
||||
s.enableKeyboardControl = function () {
|
||||
s.params.keyboardControl = true;
|
||||
$(document).on('keydown', handleKeyboard);
|
||||
};
|
@ -1,114 +0,0 @@
|
||||
/*=========================
|
||||
Images Lazy Loading
|
||||
===========================*/
|
||||
s.lazy = {
|
||||
initialImageLoaded: false,
|
||||
loadImageInSlide: function (index, loadInDuplicate) {
|
||||
if (typeof index === 'undefined') return;
|
||||
if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true;
|
||||
if (s.slides.length === 0) return;
|
||||
|
||||
var slide = s.slides.eq(index);
|
||||
var img = slide.find('.swiper-lazy:not(.swiper-lazy-loaded):not(.swiper-lazy-loading)');
|
||||
if (slide.hasClass('swiper-lazy') && !slide.hasClass('swiper-lazy-loaded') && !slide.hasClass('swiper-lazy-loading')) {
|
||||
img = img.add(slide[0]);
|
||||
}
|
||||
if (img.length === 0) return;
|
||||
|
||||
img.each(function () {
|
||||
var _img = $(this);
|
||||
_img.addClass('swiper-lazy-loading');
|
||||
var background = _img.attr('data-background');
|
||||
var src = _img.attr('data-src'),
|
||||
srcset = _img.attr('data-srcset');
|
||||
s.loadImage(_img[0], (src || background), srcset, false, function () {
|
||||
if (background) {
|
||||
_img.css('background-image', 'url("' + background + '")');
|
||||
_img.removeAttr('data-background');
|
||||
}
|
||||
else {
|
||||
if (srcset) {
|
||||
_img.attr('srcset', srcset);
|
||||
_img.removeAttr('data-srcset');
|
||||
}
|
||||
if (src) {
|
||||
_img.attr('src', src);
|
||||
_img.removeAttr('data-src');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
_img.addClass('swiper-lazy-loaded').removeClass('swiper-lazy-loading');
|
||||
slide.find('.swiper-lazy-preloader, .preloader').remove();
|
||||
if (s.params.loop && loadInDuplicate) {
|
||||
var slideOriginalIndex = slide.attr('data-swiper-slide-index');
|
||||
if (slide.hasClass(s.params.slideDuplicateClass)) {
|
||||
var originalSlide = s.wrapper.children('[data-swiper-slide-index="' + slideOriginalIndex + '"]:not(.' + s.params.slideDuplicateClass + ')');
|
||||
s.lazy.loadImageInSlide(originalSlide.index(), false);
|
||||
}
|
||||
else {
|
||||
var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + slideOriginalIndex + '"]');
|
||||
s.lazy.loadImageInSlide(duplicatedSlide.index(), false);
|
||||
}
|
||||
}
|
||||
s.emit('onLazyImageReady', s, slide[0], _img[0]);
|
||||
});
|
||||
|
||||
s.emit('onLazyImageLoad', s, slide[0], _img[0]);
|
||||
});
|
||||
|
||||
},
|
||||
load: function () {
|
||||
var i;
|
||||
if (s.params.watchSlidesVisibility) {
|
||||
s.wrapper.children('.' + s.params.slideVisibleClass).each(function () {
|
||||
s.lazy.loadImageInSlide($(this).index());
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (s.params.slidesPerView > 1) {
|
||||
for (i = s.activeIndex; i < s.activeIndex + s.params.slidesPerView ; i++) {
|
||||
if (s.slides[i]) s.lazy.loadImageInSlide(i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
s.lazy.loadImageInSlide(s.activeIndex);
|
||||
}
|
||||
}
|
||||
if (s.params.lazyLoadingInPrevNext) {
|
||||
if (s.params.slidesPerView > 1 || (s.params.lazyLoadingInPrevNextAmount && s.params.lazyLoadingInPrevNextAmount > 1)) {
|
||||
var amount = s.params.lazyLoadingInPrevNextAmount;
|
||||
var spv = s.params.slidesPerView;
|
||||
var maxIndex = Math.min(s.activeIndex + spv + Math.max(amount, spv), s.slides.length);
|
||||
var minIndex = Math.max(s.activeIndex - Math.max(spv, amount), 0);
|
||||
// Next Slides
|
||||
for (i = s.activeIndex + s.params.slidesPerView; i < maxIndex; i++) {
|
||||
if (s.slides[i]) s.lazy.loadImageInSlide(i);
|
||||
}
|
||||
// Prev Slides
|
||||
for (i = minIndex; i < s.activeIndex ; i++) {
|
||||
if (s.slides[i]) s.lazy.loadImageInSlide(i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
var nextSlide = s.wrapper.children('.' + s.params.slideNextClass);
|
||||
if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index());
|
||||
|
||||
var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass);
|
||||
if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index());
|
||||
}
|
||||
}
|
||||
},
|
||||
onTransitionStart: function () {
|
||||
if (s.params.lazyLoading) {
|
||||
if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) {
|
||||
s.lazy.load();
|
||||
}
|
||||
}
|
||||
},
|
||||
onTransitionEnd: function () {
|
||||
if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) {
|
||||
s.lazy.load();
|
||||
}
|
||||
}
|
||||
};
|
@ -1,134 +0,0 @@
|
||||
/*=========================
|
||||
Mousewheel Control
|
||||
===========================*/
|
||||
s.mousewheel = {
|
||||
event: false,
|
||||
lastScrollTime: (new window.Date()).getTime()
|
||||
};
|
||||
if (s.params.mousewheelControl) {
|
||||
try {
|
||||
new window.WheelEvent('wheel');
|
||||
s.mousewheel.event = 'wheel';
|
||||
} catch (e) {
|
||||
if (window.WheelEvent || (s.container[0] && 'wheel' in s.container[0])) {
|
||||
s.mousewheel.event = 'wheel';
|
||||
}
|
||||
}
|
||||
if (!s.mousewheel.event && window.WheelEvent) {
|
||||
|
||||
}
|
||||
if (!s.mousewheel.event && document.onmousewheel !== undefined) {
|
||||
s.mousewheel.event = 'mousewheel';
|
||||
}
|
||||
if (!s.mousewheel.event) {
|
||||
s.mousewheel.event = 'DOMMouseScroll';
|
||||
}
|
||||
}
|
||||
function handleMousewheel(e) {
|
||||
if (e.originalEvent) e = e.originalEvent; //jquery fix
|
||||
var we = s.mousewheel.event;
|
||||
var delta = 0;
|
||||
var rtlFactor = s.rtl ? -1 : 1;
|
||||
|
||||
//WebKits
|
||||
if (we === 'mousewheel') {
|
||||
if (s.params.mousewheelForceToAxis) {
|
||||
if (s.isHorizontal()) {
|
||||
if (Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY)) delta = e.wheelDeltaX * rtlFactor;
|
||||
else return;
|
||||
}
|
||||
else {
|
||||
if (Math.abs(e.wheelDeltaY) > Math.abs(e.wheelDeltaX)) delta = e.wheelDeltaY;
|
||||
else return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
delta = Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY) ? - e.wheelDeltaX * rtlFactor : - e.wheelDeltaY;
|
||||
}
|
||||
}
|
||||
//Old FireFox
|
||||
else if (we === 'DOMMouseScroll') delta = -e.detail;
|
||||
//New FireFox
|
||||
else if (we === 'wheel') {
|
||||
if (s.params.mousewheelForceToAxis) {
|
||||
if (s.isHorizontal()) {
|
||||
if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) delta = -e.deltaX * rtlFactor;
|
||||
else return;
|
||||
}
|
||||
else {
|
||||
if (Math.abs(e.deltaY) > Math.abs(e.deltaX)) delta = -e.deltaY;
|
||||
else return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
delta = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? - e.deltaX * rtlFactor : - e.deltaY;
|
||||
}
|
||||
}
|
||||
if (delta === 0) return;
|
||||
|
||||
if (s.params.mousewheelInvert) delta = -delta;
|
||||
|
||||
if (!s.params.freeMode) {
|
||||
if ((new window.Date()).getTime() - s.mousewheel.lastScrollTime > 60) {
|
||||
if (delta < 0) {
|
||||
if ((!s.isEnd || s.params.loop) && !s.animating) s.slideNext();
|
||||
else if (s.params.mousewheelReleaseOnEdges) return true;
|
||||
}
|
||||
else {
|
||||
if ((!s.isBeginning || s.params.loop) && !s.animating) s.slidePrev();
|
||||
else if (s.params.mousewheelReleaseOnEdges) return true;
|
||||
}
|
||||
}
|
||||
s.mousewheel.lastScrollTime = (new window.Date()).getTime();
|
||||
|
||||
}
|
||||
else {
|
||||
//Freemode or scrollContainer:
|
||||
var position = s.getWrapperTranslate() + delta * s.params.mousewheelSensitivity;
|
||||
var wasBeginning = s.isBeginning,
|
||||
wasEnd = s.isEnd;
|
||||
|
||||
if (position >= s.minTranslate()) position = s.minTranslate();
|
||||
if (position <= s.maxTranslate()) position = s.maxTranslate();
|
||||
|
||||
s.setWrapperTransition(0);
|
||||
s.setWrapperTranslate(position);
|
||||
s.updateProgress();
|
||||
s.updateActiveIndex();
|
||||
|
||||
if (!wasBeginning && s.isBeginning || !wasEnd && s.isEnd) {
|
||||
s.updateClasses();
|
||||
}
|
||||
|
||||
if (s.params.freeModeSticky) {
|
||||
clearTimeout(s.mousewheel.timeout);
|
||||
s.mousewheel.timeout = setTimeout(function () {
|
||||
s.slideReset();
|
||||
}, 300);
|
||||
}
|
||||
else {
|
||||
if (s.params.lazyLoading && s.lazy) {
|
||||
s.lazy.load();
|
||||
}
|
||||
}
|
||||
|
||||
// Return page scroll on edge positions
|
||||
if (position === 0 || position === s.maxTranslate()) return;
|
||||
}
|
||||
if (s.params.autoplay) s.stopAutoplay();
|
||||
|
||||
if (e.preventDefault) e.preventDefault();
|
||||
else e.returnValue = false;
|
||||
return false;
|
||||
}
|
||||
s.disableMousewheelControl = function () {
|
||||
if (!s.mousewheel.event) return false;
|
||||
s.container.off(s.mousewheel.event, handleMousewheel);
|
||||
return true;
|
||||
};
|
||||
|
||||
s.enableMousewheelControl = function () {
|
||||
if (!s.mousewheel.event) return false;
|
||||
s.container.on(s.mousewheel.event, handleMousewheel);
|
||||
return true;
|
||||
};
|
@ -1,65 +0,0 @@
|
||||
/*=========================
|
||||
Parallax
|
||||
===========================*/
|
||||
function setParallaxTransform(el, progress) {
|
||||
el = $(el);
|
||||
var p, pX, pY;
|
||||
var rtlFactor = s.rtl ? -1 : 1;
|
||||
|
||||
p = el.attr('data-swiper-parallax') || '0';
|
||||
pX = el.attr('data-swiper-parallax-x');
|
||||
pY = el.attr('data-swiper-parallax-y');
|
||||
if (pX || pY) {
|
||||
pX = pX || '0';
|
||||
pY = pY || '0';
|
||||
}
|
||||
else {
|
||||
if (s.isHorizontal()) {
|
||||
pX = p;
|
||||
pY = '0';
|
||||
}
|
||||
else {
|
||||
pY = p;
|
||||
pX = '0';
|
||||
}
|
||||
}
|
||||
|
||||
if ((pX).indexOf('%') >= 0) {
|
||||
pX = parseInt(pX, 10) * progress * rtlFactor + '%';
|
||||
}
|
||||
else {
|
||||
pX = pX * progress * rtlFactor + 'px' ;
|
||||
}
|
||||
if ((pY).indexOf('%') >= 0) {
|
||||
pY = parseInt(pY, 10) * progress + '%';
|
||||
}
|
||||
else {
|
||||
pY = pY * progress + 'px' ;
|
||||
}
|
||||
|
||||
el.transform('translate3d(' + pX + ', ' + pY + ',0px)');
|
||||
}
|
||||
s.parallax = {
|
||||
setTranslate: function () {
|
||||
s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){
|
||||
setParallaxTransform(this, s.progress);
|
||||
|
||||
});
|
||||
s.slides.each(function () {
|
||||
var slide = $(this);
|
||||
slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () {
|
||||
var progress = Math.min(Math.max(slide[0].progress, -1), 1);
|
||||
setParallaxTransform(this, progress);
|
||||
});
|
||||
});
|
||||
},
|
||||
setTransition: function (duration) {
|
||||
if (typeof duration === 'undefined') duration = s.params.speed;
|
||||
s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){
|
||||
var el = $(this);
|
||||
var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration;
|
||||
if (duration === 0) parallaxDuration = 0;
|
||||
el.transition(parallaxDuration);
|
||||
});
|
||||
}
|
||||
};
|
@ -1,16 +0,0 @@
|
||||
/*=========================
|
||||
Plugins API. Collect all and init all plugins
|
||||
===========================*/
|
||||
s._plugins = [];
|
||||
for (var plugin in s.plugins) {
|
||||
var p = s.plugins[plugin](s, s.params[plugin]);
|
||||
if (p) s._plugins.push(p);
|
||||
}
|
||||
// Method to call all plugins event/method
|
||||
s.callPlugins = function (eventName) {
|
||||
for (var i = 0; i < s._plugins.length; i++) {
|
||||
if (eventName in s._plugins[i]) {
|
||||
s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
|
||||
}
|
||||
}
|
||||
};
|
@ -1,181 +0,0 @@
|
||||
/*=========================
|
||||
Scrollbar
|
||||
===========================*/
|
||||
s.scrollbar = {
|
||||
isTouched: false,
|
||||
setDragPosition: function (e) {
|
||||
var sb = s.scrollbar;
|
||||
var x = 0, y = 0;
|
||||
var translate;
|
||||
var pointerPosition = s.isHorizontal() ?
|
||||
((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) :
|
||||
((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ;
|
||||
var position = (pointerPosition) - sb.track.offset()[s.isHorizontal() ? 'left' : 'top'] - sb.dragSize / 2;
|
||||
var positionMin = -s.minTranslate() * sb.moveDivider;
|
||||
var positionMax = -s.maxTranslate() * sb.moveDivider;
|
||||
if (position < positionMin) {
|
||||
position = positionMin;
|
||||
}
|
||||
else if (position > positionMax) {
|
||||
position = positionMax;
|
||||
}
|
||||
position = -position / sb.moveDivider;
|
||||
s.updateProgress(position);
|
||||
s.setWrapperTranslate(position, true);
|
||||
},
|
||||
dragStart: function (e) {
|
||||
var sb = s.scrollbar;
|
||||
sb.isTouched = true;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
sb.setDragPosition(e);
|
||||
clearTimeout(sb.dragTimeout);
|
||||
|
||||
sb.track.transition(0);
|
||||
if (s.params.scrollbarHide) {
|
||||
sb.track.css('opacity', 1);
|
||||
}
|
||||
s.wrapper.transition(100);
|
||||
sb.drag.transition(100);
|
||||
s.emit('onScrollbarDragStart', s);
|
||||
},
|
||||
dragMove: function (e) {
|
||||
var sb = s.scrollbar;
|
||||
if (!sb.isTouched) return;
|
||||
if (e.preventDefault) e.preventDefault();
|
||||
else e.returnValue = false;
|
||||
sb.setDragPosition(e);
|
||||
s.wrapper.transition(0);
|
||||
sb.track.transition(0);
|
||||
sb.drag.transition(0);
|
||||
s.emit('onScrollbarDragMove', s);
|
||||
},
|
||||
dragEnd: function (e) {
|
||||
var sb = s.scrollbar;
|
||||
if (!sb.isTouched) return;
|
||||
sb.isTouched = false;
|
||||
if (s.params.scrollbarHide) {
|
||||
clearTimeout(sb.dragTimeout);
|
||||
sb.dragTimeout = setTimeout(function () {
|
||||
sb.track.css('opacity', 0);
|
||||
sb.track.transition(400);
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
s.emit('onScrollbarDragEnd', s);
|
||||
if (s.params.scrollbarSnapOnRelease) {
|
||||
s.slideReset();
|
||||
}
|
||||
},
|
||||
enableDraggable: function () {
|
||||
var sb = s.scrollbar;
|
||||
var target = s.support.touch ? sb.track : document;
|
||||
$(sb.track).on(s.touchEvents.start, sb.dragStart);
|
||||
$(target).on(s.touchEvents.move, sb.dragMove);
|
||||
$(target).on(s.touchEvents.end, sb.dragEnd);
|
||||
},
|
||||
disableDraggable: function () {
|
||||
var sb = s.scrollbar;
|
||||
var target = s.support.touch ? sb.track : document;
|
||||
$(sb.track).off(s.touchEvents.start, sb.dragStart);
|
||||
$(target).off(s.touchEvents.move, sb.dragMove);
|
||||
$(target).off(s.touchEvents.end, sb.dragEnd);
|
||||
},
|
||||
set: function () {
|
||||
if (!s.params.scrollbar) return;
|
||||
var sb = s.scrollbar;
|
||||
sb.track = $(s.params.scrollbar);
|
||||
if (s.params.uniqueNavElements && typeof s.params.scrollbar === 'string' && sb.track.length > 1 && s.container.find(s.params.scrollbar).length === 1) {
|
||||
sb.track = s.container.find(s.params.scrollbar);
|
||||
}
|
||||
sb.drag = sb.track.find('.swiper-scrollbar-drag');
|
||||
if (sb.drag.length === 0) {
|
||||
sb.drag = $('<div class="swiper-scrollbar-drag"></div>');
|
||||
sb.track.append(sb.drag);
|
||||
}
|
||||
sb.drag[0].style.width = '';
|
||||
sb.drag[0].style.height = '';
|
||||
sb.trackSize = s.isHorizontal() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight;
|
||||
|
||||
sb.divider = s.size / s.virtualSize;
|
||||
sb.moveDivider = sb.divider * (sb.trackSize / s.size);
|
||||
sb.dragSize = sb.trackSize * sb.divider;
|
||||
|
||||
if (s.isHorizontal()) {
|
||||
sb.drag[0].style.width = sb.dragSize + 'px';
|
||||
}
|
||||
else {
|
||||
sb.drag[0].style.height = sb.dragSize + 'px';
|
||||
}
|
||||
|
||||
if (sb.divider >= 1) {
|
||||
sb.track[0].style.display = 'none';
|
||||
}
|
||||
else {
|
||||
sb.track[0].style.display = '';
|
||||
}
|
||||
if (s.params.scrollbarHide) {
|
||||
sb.track[0].style.opacity = 0;
|
||||
}
|
||||
},
|
||||
setTranslate: function () {
|
||||
if (!s.params.scrollbar) return;
|
||||
var diff;
|
||||
var sb = s.scrollbar;
|
||||
var translate = s.translate || 0;
|
||||
var newPos;
|
||||
|
||||
var newSize = sb.dragSize;
|
||||
newPos = (sb.trackSize - sb.dragSize) * s.progress;
|
||||
if (s.rtl && s.isHorizontal()) {
|
||||
newPos = -newPos;
|
||||
if (newPos > 0) {
|
||||
newSize = sb.dragSize - newPos;
|
||||
newPos = 0;
|
||||
}
|
||||
else if (-newPos + sb.dragSize > sb.trackSize) {
|
||||
newSize = sb.trackSize + newPos;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (newPos < 0) {
|
||||
newSize = sb.dragSize + newPos;
|
||||
newPos = 0;
|
||||
}
|
||||
else if (newPos + sb.dragSize > sb.trackSize) {
|
||||
newSize = sb.trackSize - newPos;
|
||||
}
|
||||
}
|
||||
if (s.isHorizontal()) {
|
||||
if (s.support.transforms3d) {
|
||||
sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)');
|
||||
}
|
||||
else {
|
||||
sb.drag.transform('translateX(' + (newPos) + 'px)');
|
||||
}
|
||||
sb.drag[0].style.width = newSize + 'px';
|
||||
}
|
||||
else {
|
||||
if (s.support.transforms3d) {
|
||||
sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)');
|
||||
}
|
||||
else {
|
||||
sb.drag.transform('translateY(' + (newPos) + 'px)');
|
||||
}
|
||||
sb.drag[0].style.height = newSize + 'px';
|
||||
}
|
||||
if (s.params.scrollbarHide) {
|
||||
clearTimeout(sb.timeout);
|
||||
sb.track[0].style.opacity = 1;
|
||||
sb.timeout = setTimeout(function () {
|
||||
sb.track[0].style.opacity = 0;
|
||||
sb.track.transition(400);
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
setTransition: function (duration) {
|
||||
if (!s.params.scrollbar) return;
|
||||
s.scrollbar.drag.transition(duration);
|
||||
}
|
||||
};
|
@ -1,5 +0,0 @@
|
||||
/*===========================
|
||||
Swiper
|
||||
===========================*/
|
||||
window.Swiper = function (container, params) {
|
||||
if (!(this instanceof Swiper)) return new Swiper(container, params);
|
@ -1,5 +0,0 @@
|
||||
/*===========================
|
||||
Swiper
|
||||
===========================*/
|
||||
var Swiper = function (container, params) {
|
||||
if (!(this instanceof Swiper)) return new Swiper(container, params);
|
@ -1,4 +0,0 @@
|
||||
|
||||
// Return swiper instance
|
||||
return s;
|
||||
};
|
@ -1,63 +0,0 @@
|
||||
/*==================================================
|
||||
Prototype
|
||||
====================================================*/
|
||||
Swiper.prototype = {
|
||||
isSafari: (function () {
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
|
||||
})(),
|
||||
isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent),
|
||||
isArray: function (arr) {
|
||||
return Object.prototype.toString.apply(arr) === '[object Array]';
|
||||
},
|
||||
/*==================================================
|
||||
Browser
|
||||
====================================================*/
|
||||
browser: {
|
||||
ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled,
|
||||
ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1)
|
||||
},
|
||||
/*==================================================
|
||||
Devices
|
||||
====================================================*/
|
||||
device: (function () {
|
||||
var ua = navigator.userAgent;
|
||||
var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/);
|
||||
var ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
|
||||
var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
|
||||
var iphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/);
|
||||
return {
|
||||
ios: ipad || iphone || ipod,
|
||||
android: android
|
||||
};
|
||||
})(),
|
||||
/*==================================================
|
||||
Feature Detection
|
||||
====================================================*/
|
||||
support: {
|
||||
touch : (window.Modernizr && Modernizr.touch === true) || (function () {
|
||||
return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch);
|
||||
})(),
|
||||
|
||||
transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () {
|
||||
var div = document.createElement('div').style;
|
||||
return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div);
|
||||
})(),
|
||||
|
||||
flexbox: (function () {
|
||||
var div = document.createElement('div').style;
|
||||
var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
|
||||
for (var i = 0; i < styles.length; i++) {
|
||||
if (styles[i] in div) return true;
|
||||
}
|
||||
})(),
|
||||
|
||||
observer: (function () {
|
||||
return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
|
||||
})()
|
||||
},
|
||||
/*==================================================
|
||||
Plugins
|
||||
====================================================*/
|
||||
plugins: {}
|
||||
};
|
@ -1,2 +0,0 @@
|
||||
return Swiper;
|
||||
}));
|
@ -1,2 +0,0 @@
|
||||
window.Swiper = Swiper;
|
||||
})();
|
@ -1,17 +0,0 @@
|
||||
(function (root, factory) {
|
||||
'use strict';
|
||||
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
root.Swiper = factory(root.jQuery);
|
||||
}
|
||||
}(this, function ($) {
|
||||
'use strict';
|
@ -1,3 +0,0 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
var $;
|
@ -1,104 +0,0 @@
|
||||
.swiper-container {
|
||||
margin:0 auto;
|
||||
position:relative;
|
||||
overflow:hidden;
|
||||
/* Fix of Webkit flickering */
|
||||
z-index:1;
|
||||
}
|
||||
.swiper-container-no-flexbox {
|
||||
.swiper-slide {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
.swiper-container-vertical > .swiper-wrapper{
|
||||
-webkit-box-orient: vertical;
|
||||
-moz-box-orient: vertical;
|
||||
-ms-flex-direction: column;
|
||||
-webkit-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
.swiper-wrapper {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
|
||||
-webkit-transition-property:-webkit-transform;
|
||||
-moz-transition-property:-moz-transform;
|
||||
-o-transition-property:-o-transform;
|
||||
-ms-transition-property:-ms-transform;
|
||||
transition-property:transform;
|
||||
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.swiper-container-android .swiper-slide, .swiper-wrapper {
|
||||
-webkit-transform:translate3d(0px,0,0);
|
||||
-moz-transform:translate3d(0px,0,0);
|
||||
-o-transform:translate(0px,0px);
|
||||
-ms-transform:translate3d(0px,0,0);
|
||||
transform:translate3d(0px,0,0);
|
||||
}
|
||||
.swiper-container-multirow > .swiper-wrapper {
|
||||
-webkit-box-lines: multiple;
|
||||
-moz-box-lines: multiple;
|
||||
-ms-flex-wrap: wrap;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.swiper-container-free-mode > .swiper-wrapper {
|
||||
-webkit-transition-timing-function: ease-out;
|
||||
-moz-transition-timing-function: ease-out;
|
||||
-ms-transition-timing-function: ease-out;
|
||||
-o-transition-timing-function: ease-out;
|
||||
transition-timing-function: ease-out;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.swiper-slide {
|
||||
-webkit-flex-shrink: 0;
|
||||
-ms-flex: 0 0 auto;
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
/* Auto Height */
|
||||
.swiper-container-autoheight, .swiper-container-autoheight .swiper-slide {
|
||||
height: auto;
|
||||
}
|
||||
.swiper-container-autoheight .swiper-wrapper {
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
-webkit-align-items: flex-start;
|
||||
align-items: flex-start;
|
||||
-webkit-transition-property: -webkit-transform, height;
|
||||
-moz-transition-property: -moz-transform;
|
||||
-o-transition-property: -o-transform;
|
||||
-ms-transition-property: -ms-transform;
|
||||
transition-property: transform, height;
|
||||
}
|
||||
/* a11y */
|
||||
.swiper-container .swiper-notification {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
z-index: -1000;
|
||||
}
|
||||
|
||||
/* IE10 Windows Phone 8 Fixes */
|
||||
.swiper-wp8-horizontal {
|
||||
-ms-touch-action: pan-y;
|
||||
touch-action: pan-y;
|
||||
}
|
||||
.swiper-wp8-vertical {
|
||||
-ms-touch-action: pan-x;
|
||||
touch-action: pan-x;
|
||||
}
|
@ -1,142 +0,0 @@
|
||||
/* 3D Container */
|
||||
.swiper-container-3d {
|
||||
-webkit-perspective: 1200px;
|
||||
-moz-perspective: 1200px;
|
||||
-o-perspective: 1200px;
|
||||
perspective: 1200px;
|
||||
.swiper-wrapper, .swiper-slide, .swiper-slide-shadow-left, .swiper-slide-shadow-right, .swiper-slide-shadow-top, .swiper-slide-shadow-bottom, .swiper-cube-shadow {
|
||||
.preserve3d();
|
||||
}
|
||||
.swiper-slide-shadow-left, .swiper-slide-shadow-right, .swiper-slide-shadow-top, .swiper-slide-shadow-bottom {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
}
|
||||
.swiper-slide-shadow-left {
|
||||
background-image: -webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */
|
||||
background-image: -webkit-linear-gradient(right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */
|
||||
background-image: -moz-linear-gradient(right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */
|
||||
background-image: -o-linear-gradient(right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */
|
||||
background-image: linear-gradient(to left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */
|
||||
}
|
||||
.swiper-slide-shadow-right {
|
||||
background-image: -webkit-gradient(linear, right top, left top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */
|
||||
background-image: -webkit-linear-gradient(left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */
|
||||
background-image: -moz-linear-gradient(left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */
|
||||
background-image: -o-linear-gradient(left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */
|
||||
background-image: linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */
|
||||
}
|
||||
.swiper-slide-shadow-top {
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */
|
||||
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */
|
||||
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */
|
||||
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */
|
||||
background-image: linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */
|
||||
}
|
||||
.swiper-slide-shadow-bottom {
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */
|
||||
background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */
|
||||
background-image: -moz-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */
|
||||
background-image: -o-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */
|
||||
background-image: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */
|
||||
}
|
||||
}
|
||||
/* Coverflow */
|
||||
.swiper-container-coverflow, .swiper-container-flip {
|
||||
.swiper-wrapper {
|
||||
/* Windows 8 IE 10 fix */
|
||||
-ms-perspective:1200px;
|
||||
}
|
||||
}
|
||||
/* Cube + Flip */
|
||||
.swiper-container-cube, .swiper-container-flip {
|
||||
overflow: visible;
|
||||
.swiper-slide {
|
||||
pointer-events: none;
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
-ms-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
z-index: 1;
|
||||
.swiper-slide {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
.swiper-slide-active {
|
||||
&, & .swiper-slide-active {
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
.swiper-slide-shadow-top, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left, .swiper-slide-shadow-right {
|
||||
z-index: 0;
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
-ms-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
}
|
||||
/* Cube */
|
||||
.swiper-container-cube {
|
||||
.swiper-slide {
|
||||
visibility: hidden;
|
||||
-webkit-transform-origin: 0 0;
|
||||
-moz-transform-origin: 0 0;
|
||||
-ms-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
&.swiper-container-rtl .swiper-slide{
|
||||
-webkit-transform-origin: 100% 0;
|
||||
-moz-transform-origin: 100% 0;
|
||||
-ms-transform-origin: 100% 0;
|
||||
transform-origin: 100% 0;
|
||||
}
|
||||
.swiper-slide-active, .swiper-slide-next, .swiper-slide-prev, .swiper-slide-next + .swiper-slide {
|
||||
pointer-events: auto;
|
||||
visibility: visible;
|
||||
}
|
||||
.swiper-cube-shadow {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #000;
|
||||
opacity: 0.6;
|
||||
-webkit-filter: blur(50px);
|
||||
filter: blur(50px);
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
/* Fade */
|
||||
.swiper-container-fade {
|
||||
&.swiper-container-free-mode {
|
||||
.swiper-slide {
|
||||
-webkit-transition-timing-function: ease-out;
|
||||
-moz-transition-timing-function: ease-out;
|
||||
-ms-transition-timing-function: ease-out;
|
||||
-o-transition-timing-function: ease-out;
|
||||
transition-timing-function: ease-out;
|
||||
}
|
||||
}
|
||||
.swiper-slide {
|
||||
pointer-events: none;
|
||||
-webkit-transition-property: opacity;
|
||||
-moz-transition-property: opacity;
|
||||
-o-transition-property: opacity;
|
||||
transition-property: opacity;
|
||||
.swiper-slide {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
.swiper-slide-active {
|
||||
&, & .swiper-slide-active {
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
.preserve3d() {
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-moz-transform-style: preserve-3d;
|
||||
-ms-transform-style: preserve-3d;
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
.encoded-svg-background(@svg) {
|
||||
@url: `encodeURIComponent(@{svg})`;
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,@{url}");
|
||||
}
|
@ -1,143 +0,0 @@
|
||||
/* Arrows */
|
||||
.swiper-button-prev, .swiper-button-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 27px;
|
||||
height: 44px;
|
||||
margin-top: -22px;
|
||||
z-index: 10;
|
||||
cursor: pointer;
|
||||
-moz-background-size: 27px 44px;
|
||||
-webkit-background-size: 27px 44px;
|
||||
background-size: 27px 44px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
&.swiper-button-disabled {
|
||||
opacity: 0.35;
|
||||
cursor: auto;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
.swiper-button-prev, .swiper-container-rtl .swiper-button-next {
|
||||
.encoded-svg-background("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'><path d='M0,22L22,0l2.1,2.1L4.2,22l19.9,19.9L22,44L0,22L0,22L0,22z' fill='#007aff'/></svg>");
|
||||
left: 10px;
|
||||
right: auto;
|
||||
}
|
||||
.swiper-button-next, .swiper-container-rtl .swiper-button-prev {
|
||||
.encoded-svg-background("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'><path d='M27,22L27,22L5,44l-2.1-2.1L22.8,22L2.9,2.1L5,0L27,22L27,22z' fill='#007aff'/></svg>");
|
||||
right: 10px;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
/* Pagination Styles */
|
||||
.swiper-pagination {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
-webkit-transition: 300ms;
|
||||
-moz-transition: 300ms;
|
||||
-o-transition: 300ms;
|
||||
transition: 300ms;
|
||||
-webkit-transform: translate3d(0,0,0);
|
||||
-ms-transform: translate3d(0,0,0);
|
||||
-o-transform: translate3d(0,0,0);
|
||||
transform: translate3d(0,0,0);
|
||||
z-index: 10;
|
||||
&.swiper-pagination-hidden {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
/* Common Styles */
|
||||
.swiper-pagination-fraction, .swiper-pagination-custom, .swiper-container-horizontal > .swiper-pagination-bullets{
|
||||
bottom: 10px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
/* Bullets */
|
||||
.swiper-pagination-bullet {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
display: inline-block;
|
||||
border-radius: 100%;
|
||||
background: #000;
|
||||
opacity: 0.2;
|
||||
button& {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
-moz-appearance: none;
|
||||
-ms-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
.swiper-pagination-clickable & {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.swiper-pagination-bullet-active {
|
||||
opacity: 1;
|
||||
background: #007aff;
|
||||
}
|
||||
.swiper-container-vertical {
|
||||
> .swiper-pagination-bullets {
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
-webkit-transform:translate3d(0px,-50%,0);
|
||||
-moz-transform:translate3d(0px,-50%,0);
|
||||
-o-transform:translate(0px,-50%);
|
||||
-ms-transform:translate3d(0px,-50%,0);
|
||||
transform:translate3d(0px,-50%,0);
|
||||
.swiper-pagination-bullet {
|
||||
margin: 5px 0;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
.swiper-container-horizontal {
|
||||
> .swiper-pagination-bullets {
|
||||
.swiper-pagination-bullet {
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Progress */
|
||||
.swiper-pagination-progress {
|
||||
background: rgba(0,0,0,0.25);
|
||||
position: absolute;
|
||||
.swiper-pagination-progressbar {
|
||||
background: #007aff;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
-webkit-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
-o-transform: scale(0);
|
||||
transform: scale(0);
|
||||
-webkit-transform-origin: left top;
|
||||
-moz-transform-origin: left top;
|
||||
-ms-transform-origin: left top;
|
||||
-o-transform-origin: left top;
|
||||
transform-origin: left top;
|
||||
}
|
||||
.swiper-container-rtl & .swiper-pagination-progressbar {
|
||||
-webkit-transform-origin: right top;
|
||||
-moz-transform-origin: right top;
|
||||
-ms-transform-origin: right top;
|
||||
-o-transform-origin: right top;
|
||||
transform-origin: right top;
|
||||
}
|
||||
.swiper-container-horizontal > & {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.swiper-container-vertical > & {
|
||||
width: 4px;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
@ -1,174 +0,0 @@
|
||||
/* Arrows */
|
||||
.swiper-button-prev, .swiper-button-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 27px;
|
||||
height: 44px;
|
||||
margin-top: -22px;
|
||||
z-index: 10;
|
||||
cursor: pointer;
|
||||
-moz-background-size: 27px 44px;
|
||||
-webkit-background-size: 27px 44px;
|
||||
background-size: 27px 44px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
&.swiper-button-disabled {
|
||||
opacity: 0.35;
|
||||
cursor: auto;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
.swiper-button-prev, .swiper-container-rtl .swiper-button-next {
|
||||
.encoded-svg-background("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'><path d='M0,22L22,0l2.1,2.1L4.2,22l19.9,19.9L22,44L0,22L0,22L0,22z' fill='#007aff'/></svg>");
|
||||
left: 10px;
|
||||
right: auto;
|
||||
&.swiper-button-black {
|
||||
.encoded-svg-background("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'><path d='M0,22L22,0l2.1,2.1L4.2,22l19.9,19.9L22,44L0,22L0,22L0,22z' fill='#000000'/></svg>");
|
||||
}
|
||||
&.swiper-button-white {
|
||||
.encoded-svg-background("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'><path d='M0,22L22,0l2.1,2.1L4.2,22l19.9,19.9L22,44L0,22L0,22L0,22z' fill='#ffffff'/></svg>");
|
||||
}
|
||||
}
|
||||
.swiper-button-next, .swiper-container-rtl .swiper-button-prev {
|
||||
.encoded-svg-background("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'><path d='M27,22L27,22L5,44l-2.1-2.1L22.8,22L2.9,2.1L5,0L27,22L27,22z' fill='#007aff'/></svg>");
|
||||
right: 10px;
|
||||
left: auto;
|
||||
&.swiper-button-black {
|
||||
.encoded-svg-background("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'><path d='M27,22L27,22L5,44l-2.1-2.1L22.8,22L2.9,2.1L5,0L27,22L27,22z' fill='#000000'/></svg>");
|
||||
}
|
||||
&.swiper-button-white {
|
||||
.encoded-svg-background("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'><path d='M27,22L27,22L5,44l-2.1-2.1L22.8,22L2.9,2.1L5,0L27,22L27,22z' fill='#ffffff'/></svg>");
|
||||
}
|
||||
}
|
||||
/* Pagination Styles */
|
||||
.swiper-pagination {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
-webkit-transition: 300ms;
|
||||
-moz-transition: 300ms;
|
||||
-o-transition: 300ms;
|
||||
transition: 300ms;
|
||||
-webkit-transform: translate3d(0,0,0);
|
||||
-ms-transform: translate3d(0,0,0);
|
||||
-o-transform: translate3d(0,0,0);
|
||||
transform: translate3d(0,0,0);
|
||||
z-index: 10;
|
||||
&.swiper-pagination-hidden {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
/* Common Styles */
|
||||
.swiper-pagination-fraction, .swiper-pagination-custom, .swiper-container-horizontal > .swiper-pagination-bullets{
|
||||
bottom: 10px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
/* Bullets */
|
||||
.swiper-pagination-bullet {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
display: inline-block;
|
||||
border-radius: 100%;
|
||||
background: #000;
|
||||
opacity: 0.2;
|
||||
button& {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
-moz-appearance: none;
|
||||
-ms-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
.swiper-pagination-clickable & {
|
||||
cursor: pointer;
|
||||
}
|
||||
.swiper-pagination-white & {
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.swiper-pagination-bullet-active {
|
||||
opacity: 1;
|
||||
background: #007aff;
|
||||
.swiper-pagination-white & {
|
||||
background: #fff;
|
||||
}
|
||||
.swiper-pagination-black & {
|
||||
background: #000;
|
||||
}
|
||||
}
|
||||
.swiper-container-vertical {
|
||||
> .swiper-pagination-bullets {
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
-webkit-transform:translate3d(0px,-50%,0);
|
||||
-moz-transform:translate3d(0px,-50%,0);
|
||||
-o-transform:translate(0px,-50%);
|
||||
-ms-transform:translate3d(0px,-50%,0);
|
||||
transform:translate3d(0px,-50%,0);
|
||||
.swiper-pagination-bullet {
|
||||
margin: 5px 0;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
.swiper-container-horizontal {
|
||||
> .swiper-pagination-bullets {
|
||||
.swiper-pagination-bullet {
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Progress */
|
||||
.swiper-pagination-progress {
|
||||
background: rgba(0,0,0,0.25);
|
||||
position: absolute;
|
||||
.swiper-pagination-progressbar {
|
||||
background: #007aff;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
-webkit-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
-o-transform: scale(0);
|
||||
transform: scale(0);
|
||||
-webkit-transform-origin: left top;
|
||||
-moz-transform-origin: left top;
|
||||
-ms-transform-origin: left top;
|
||||
-o-transform-origin: left top;
|
||||
transform-origin: left top;
|
||||
}
|
||||
.swiper-container-rtl & .swiper-pagination-progressbar {
|
||||
-webkit-transform-origin: right top;
|
||||
-moz-transform-origin: right top;
|
||||
-ms-transform-origin: right top;
|
||||
-o-transform-origin: right top;
|
||||
transform-origin: right top;
|
||||
}
|
||||
.swiper-container-horizontal > & {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.swiper-container-vertical > & {
|
||||
width: 4px;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
&.swiper-pagination-white {
|
||||
background: rgba(255,255,255,0.5);
|
||||
.swiper-pagination-progressbar {
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
&.swiper-pagination-black {
|
||||
.swiper-pagination-progressbar {
|
||||
background: #000;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
/* Preloader */
|
||||
.swiper-slide .preloader {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -21px;
|
||||
margin-top: -21px;
|
||||
z-index: 10;
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
/* Preloader */
|
||||
.swiper-lazy-preloader {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -21px;
|
||||
margin-top: -21px;
|
||||
z-index: 10;
|
||||
-webkit-transform-origin: 50%;
|
||||
-moz-transform-origin: 50%;
|
||||
transform-origin: 50%;
|
||||
-webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
||||
-moz-animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
||||
animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
||||
}
|
||||
.swiper-lazy-preloader:after {
|
||||
display: block;
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.encoded-svg-background("<svg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><defs><line id='l' x1='60' x2='60' y1='7' y2='27' stroke='#6c6c6c' stroke-width='11' stroke-linecap='round'/></defs><g><use xlink:href='#l' opacity='.27'/><use xlink:href='#l' opacity='.27' transform='rotate(30 60,60)'/><use xlink:href='#l' opacity='.27' transform='rotate(60 60,60)'/><use xlink:href='#l' opacity='.27' transform='rotate(90 60,60)'/><use xlink:href='#l' opacity='.27' transform='rotate(120 60,60)'/><use xlink:href='#l' opacity='.27' transform='rotate(150 60,60)'/><use xlink:href='#l' opacity='.37' transform='rotate(180 60,60)'/><use xlink:href='#l' opacity='.46' transform='rotate(210 60,60)'/><use xlink:href='#l' opacity='.56' transform='rotate(240 60,60)'/><use xlink:href='#l' opacity='.66' transform='rotate(270 60,60)'/><use xlink:href='#l' opacity='.75' transform='rotate(300 60,60)'/><use xlink:href='#l' opacity='.85' transform='rotate(330 60,60)'/></g></svg>");
|
||||
background-position: 50%;
|
||||
-webkit-background-size: 100%;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
}
|
||||
.swiper-lazy-preloader-white:after {
|
||||
.encoded-svg-background("<svg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><defs><line id='l' x1='60' x2='60' y1='7' y2='27' stroke='#fff' stroke-width='11' stroke-linecap='round'/></defs><g><use xlink:href='#l' opacity='.27'/><use xlink:href='#l' opacity='.27' transform='rotate(30 60,60)'/><use xlink:href='#l' opacity='.27' transform='rotate(60 60,60)'/><use xlink:href='#l' opacity='.27' transform='rotate(90 60,60)'/><use xlink:href='#l' opacity='.27' transform='rotate(120 60,60)'/><use xlink:href='#l' opacity='.27' transform='rotate(150 60,60)'/><use xlink:href='#l' opacity='.37' transform='rotate(180 60,60)'/><use xlink:href='#l' opacity='.46' transform='rotate(210 60,60)'/><use xlink:href='#l' opacity='.56' transform='rotate(240 60,60)'/><use xlink:href='#l' opacity='.66' transform='rotate(270 60,60)'/><use xlink:href='#l' opacity='.75' transform='rotate(300 60,60)'/><use xlink:href='#l' opacity='.85' transform='rotate(330 60,60)'/></g></svg>");
|
||||
}
|
||||
@-webkit-keyframes swiper-preloader-spin {
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes swiper-preloader-spin {
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/* Scrollbar */
|
||||
.swiper-scrollbar {
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
-ms-touch-action: none;
|
||||
background: rgba(0,0,0,0.1);
|
||||
.swiper-container-horizontal > & {
|
||||
position: absolute;
|
||||
left: 1%;
|
||||
bottom: 3px;
|
||||
z-index: 50;
|
||||
height: 5px;
|
||||
width: 98%;
|
||||
}
|
||||
.swiper-container-vertical > & {
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 1%;
|
||||
z-index: 50;
|
||||
width: 5px;
|
||||
height: 98%;
|
||||
}
|
||||
}
|
||||
.swiper-scrollbar-drag {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
background: rgba(0,0,0,0.5);
|
||||
border-radius: 10px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.swiper-scrollbar-cursor-drag {
|
||||
cursor: move;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
@import url('mixins.less');
|
||||
@import url('core.less');
|
||||
@import url('navigation.less');
|
||||
@import url('effects.less');
|
||||
@import url('scrollbar.less');
|
||||
@import url('preloader.less');
|
@ -35,8 +35,7 @@
|
||||
"tag": "2.2.1",
|
||||
"commit": "45d8e40300e82ff02ccfbbc78c89500de0f5616f"
|
||||
},
|
||||
"_source": "https://github.com/web-animations/web-animations-js.git",
|
||||
"_target": "^2.2.1",
|
||||
"_originalSource": "web-animations-js",
|
||||
"_direct": true
|
||||
"_source": "git://github.com/web-animations/web-animations-js.git",
|
||||
"_target": "^2.2.0",
|
||||
"_originalSource": "web-animations/web-animations-js"
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,350 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
||||
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
* Code distributed by Google as part of the polymer project is also
|
||||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
// @version 0.7.22
|
||||
if (typeof WeakMap === "undefined") {
|
||||
(function() {
|
||||
var defineProperty = Object.defineProperty;
|
||||
var counter = Date.now() % 1e9;
|
||||
var WeakMap = function() {
|
||||
this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
|
||||
};
|
||||
WeakMap.prototype = {
|
||||
set: function(key, value) {
|
||||
var entry = key[this.name];
|
||||
if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
|
||||
value: [ key, value ],
|
||||
writable: true
|
||||
});
|
||||
return this;
|
||||
},
|
||||
get: function(key) {
|
||||
var entry;
|
||||
return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
|
||||
},
|
||||
"delete": function(key) {
|
||||
var entry = key[this.name];
|
||||
if (!entry || entry[0] !== key) return false;
|
||||
entry[0] = entry[1] = undefined;
|
||||
return true;
|
||||
},
|
||||
has: function(key) {
|
||||
var entry = key[this.name];
|
||||
if (!entry) return false;
|
||||
return entry[0] === key;
|
||||
}
|
||||
};
|
||||
window.WeakMap = WeakMap;
|
||||
})();
|
||||
}
|
||||
|
||||
(function(global) {
|
||||
if (global.JsMutationObserver) {
|
||||
return;
|
||||
}
|
||||
var registrationsTable = new WeakMap();
|
||||
var setImmediate;
|
||||
if (/Trident|Edge/.test(navigator.userAgent)) {
|
||||
setImmediate = setTimeout;
|
||||
} else if (window.setImmediate) {
|
||||
setImmediate = window.setImmediate;
|
||||
} else {
|
||||
var setImmediateQueue = [];
|
||||
var sentinel = String(Math.random());
|
||||
window.addEventListener("message", function(e) {
|
||||
if (e.data === sentinel) {
|
||||
var queue = setImmediateQueue;
|
||||
setImmediateQueue = [];
|
||||
queue.forEach(function(func) {
|
||||
func();
|
||||
});
|
||||
}
|
||||
});
|
||||
setImmediate = function(func) {
|
||||
setImmediateQueue.push(func);
|
||||
window.postMessage(sentinel, "*");
|
||||
};
|
||||
}
|
||||
var isScheduled = false;
|
||||
var scheduledObservers = [];
|
||||
function scheduleCallback(observer) {
|
||||
scheduledObservers.push(observer);
|
||||
if (!isScheduled) {
|
||||
isScheduled = true;
|
||||
setImmediate(dispatchCallbacks);
|
||||
}
|
||||
}
|
||||
function wrapIfNeeded(node) {
|
||||
return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
|
||||
}
|
||||
function dispatchCallbacks() {
|
||||
isScheduled = false;
|
||||
var observers = scheduledObservers;
|
||||
scheduledObservers = [];
|
||||
observers.sort(function(o1, o2) {
|
||||
return o1.uid_ - o2.uid_;
|
||||
});
|
||||
var anyNonEmpty = false;
|
||||
observers.forEach(function(observer) {
|
||||
var queue = observer.takeRecords();
|
||||
removeTransientObserversFor(observer);
|
||||
if (queue.length) {
|
||||
observer.callback_(queue, observer);
|
||||
anyNonEmpty = true;
|
||||
}
|
||||
});
|
||||
if (anyNonEmpty) dispatchCallbacks();
|
||||
}
|
||||
function removeTransientObserversFor(observer) {
|
||||
observer.nodes_.forEach(function(node) {
|
||||
var registrations = registrationsTable.get(node);
|
||||
if (!registrations) return;
|
||||
registrations.forEach(function(registration) {
|
||||
if (registration.observer === observer) registration.removeTransientObservers();
|
||||
});
|
||||
});
|
||||
}
|
||||
function forEachAncestorAndObserverEnqueueRecord(target, callback) {
|
||||
for (var node = target; node; node = node.parentNode) {
|
||||
var registrations = registrationsTable.get(node);
|
||||
if (registrations) {
|
||||
for (var j = 0; j < registrations.length; j++) {
|
||||
var registration = registrations[j];
|
||||
var options = registration.options;
|
||||
if (node !== target && !options.subtree) continue;
|
||||
var record = callback(options);
|
||||
if (record) registration.enqueue(record);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var uidCounter = 0;
|
||||
function JsMutationObserver(callback) {
|
||||
this.callback_ = callback;
|
||||
this.nodes_ = [];
|
||||
this.records_ = [];
|
||||
this.uid_ = ++uidCounter;
|
||||
}
|
||||
JsMutationObserver.prototype = {
|
||||
observe: function(target, options) {
|
||||
target = wrapIfNeeded(target);
|
||||
if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
|
||||
throw new SyntaxError();
|
||||
}
|
||||
var registrations = registrationsTable.get(target);
|
||||
if (!registrations) registrationsTable.set(target, registrations = []);
|
||||
var registration;
|
||||
for (var i = 0; i < registrations.length; i++) {
|
||||
if (registrations[i].observer === this) {
|
||||
registration = registrations[i];
|
||||
registration.removeListeners();
|
||||
registration.options = options;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!registration) {
|
||||
registration = new Registration(this, target, options);
|
||||
registrations.push(registration);
|
||||
this.nodes_.push(target);
|
||||
}
|
||||
registration.addListeners();
|
||||
},
|
||||
disconnect: function() {
|
||||
this.nodes_.forEach(function(node) {
|
||||
var registrations = registrationsTable.get(node);
|
||||
for (var i = 0; i < registrations.length; i++) {
|
||||
var registration = registrations[i];
|
||||
if (registration.observer === this) {
|
||||
registration.removeListeners();
|
||||
registrations.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}, this);
|
||||
this.records_ = [];
|
||||
},
|
||||
takeRecords: function() {
|
||||
var copyOfRecords = this.records_;
|
||||
this.records_ = [];
|
||||
return copyOfRecords;
|
||||
}
|
||||
};
|
||||
function MutationRecord(type, target) {
|
||||
this.type = type;
|
||||
this.target = target;
|
||||
this.addedNodes = [];
|
||||
this.removedNodes = [];
|
||||
this.previousSibling = null;
|
||||
this.nextSibling = null;
|
||||
this.attributeName = null;
|
||||
this.attributeNamespace = null;
|
||||
this.oldValue = null;
|
||||
}
|
||||
function copyMutationRecord(original) {
|
||||
var record = new MutationRecord(original.type, original.target);
|
||||
record.addedNodes = original.addedNodes.slice();
|
||||
record.removedNodes = original.removedNodes.slice();
|
||||
record.previousSibling = original.previousSibling;
|
||||
record.nextSibling = original.nextSibling;
|
||||
record.attributeName = original.attributeName;
|
||||
record.attributeNamespace = original.attributeNamespace;
|
||||
record.oldValue = original.oldValue;
|
||||
return record;
|
||||
}
|
||||
var currentRecord, recordWithOldValue;
|
||||
function getRecord(type, target) {
|
||||
return currentRecord = new MutationRecord(type, target);
|
||||
}
|
||||
function getRecordWithOldValue(oldValue) {
|
||||
if (recordWithOldValue) return recordWithOldValue;
|
||||
recordWithOldValue = copyMutationRecord(currentRecord);
|
||||
recordWithOldValue.oldValue = oldValue;
|
||||
return recordWithOldValue;
|
||||
}
|
||||
function clearRecords() {
|
||||
currentRecord = recordWithOldValue = undefined;
|
||||
}
|
||||
function recordRepresentsCurrentMutation(record) {
|
||||
return record === recordWithOldValue || record === currentRecord;
|
||||
}
|
||||
function selectRecord(lastRecord, newRecord) {
|
||||
if (lastRecord === newRecord) return lastRecord;
|
||||
if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
|
||||
return null;
|
||||
}
|
||||
function Registration(observer, target, options) {
|
||||
this.observer = observer;
|
||||
this.target = target;
|
||||
this.options = options;
|
||||
this.transientObservedNodes = [];
|
||||
}
|
||||
Registration.prototype = {
|
||||
enqueue: function(record) {
|
||||
var records = this.observer.records_;
|
||||
var length = records.length;
|
||||
if (records.length > 0) {
|
||||
var lastRecord = records[length - 1];
|
||||
var recordToReplaceLast = selectRecord(lastRecord, record);
|
||||
if (recordToReplaceLast) {
|
||||
records[length - 1] = recordToReplaceLast;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
scheduleCallback(this.observer);
|
||||
}
|
||||
records[length] = record;
|
||||
},
|
||||
addListeners: function() {
|
||||
this.addListeners_(this.target);
|
||||
},
|
||||
addListeners_: function(node) {
|
||||
var options = this.options;
|
||||
if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
|
||||
if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
|
||||
if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
|
||||
if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
|
||||
},
|
||||
removeListeners: function() {
|
||||
this.removeListeners_(this.target);
|
||||
},
|
||||
removeListeners_: function(node) {
|
||||
var options = this.options;
|
||||
if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
|
||||
if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
|
||||
if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
|
||||
if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
|
||||
},
|
||||
addTransientObserver: function(node) {
|
||||
if (node === this.target) return;
|
||||
this.addListeners_(node);
|
||||
this.transientObservedNodes.push(node);
|
||||
var registrations = registrationsTable.get(node);
|
||||
if (!registrations) registrationsTable.set(node, registrations = []);
|
||||
registrations.push(this);
|
||||
},
|
||||
removeTransientObservers: function() {
|
||||
var transientObservedNodes = this.transientObservedNodes;
|
||||
this.transientObservedNodes = [];
|
||||
transientObservedNodes.forEach(function(node) {
|
||||
this.removeListeners_(node);
|
||||
var registrations = registrationsTable.get(node);
|
||||
for (var i = 0; i < registrations.length; i++) {
|
||||
if (registrations[i] === this) {
|
||||
registrations.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}, this);
|
||||
},
|
||||
handleEvent: function(e) {
|
||||
e.stopImmediatePropagation();
|
||||
switch (e.type) {
|
||||
case "DOMAttrModified":
|
||||
var name = e.attrName;
|
||||
var namespace = e.relatedNode.namespaceURI;
|
||||
var target = e.target;
|
||||
var record = new getRecord("attributes", target);
|
||||
record.attributeName = name;
|
||||
record.attributeNamespace = namespace;
|
||||
var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
|
||||
forEachAncestorAndObserverEnqueueRecord(target, function(options) {
|
||||
if (!options.attributes) return;
|
||||
if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
|
||||
return;
|
||||
}
|
||||
if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
|
||||
return record;
|
||||
});
|
||||
break;
|
||||
|
||||
case "DOMCharacterDataModified":
|
||||
var target = e.target;
|
||||
var record = getRecord("characterData", target);
|
||||
var oldValue = e.prevValue;
|
||||
forEachAncestorAndObserverEnqueueRecord(target, function(options) {
|
||||
if (!options.characterData) return;
|
||||
if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
|
||||
return record;
|
||||
});
|
||||
break;
|
||||
|
||||
case "DOMNodeRemoved":
|
||||
this.addTransientObserver(e.target);
|
||||
|
||||
case "DOMNodeInserted":
|
||||
var changedNode = e.target;
|
||||
var addedNodes, removedNodes;
|
||||
if (e.type === "DOMNodeInserted") {
|
||||
addedNodes = [ changedNode ];
|
||||
removedNodes = [];
|
||||
} else {
|
||||
addedNodes = [];
|
||||
removedNodes = [ changedNode ];
|
||||
}
|
||||
var previousSibling = changedNode.previousSibling;
|
||||
var nextSibling = changedNode.nextSibling;
|
||||
var record = getRecord("childList", e.target.parentNode);
|
||||
record.addedNodes = addedNodes;
|
||||
record.removedNodes = removedNodes;
|
||||
record.previousSibling = previousSibling;
|
||||
record.nextSibling = nextSibling;
|
||||
forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
|
||||
if (!options.childList) return;
|
||||
return record;
|
||||
});
|
||||
}
|
||||
clearRecords();
|
||||
}
|
||||
};
|
||||
global.JsMutationObserver = JsMutationObserver;
|
||||
if (!global.MutationObserver) {
|
||||
global.MutationObserver = JsMutationObserver;
|
||||
JsMutationObserver._isPolyfilled = true;
|
||||
}
|
||||
})(self);
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user