diff --git a/src/js/plugins/zoom.js b/src/js/plugins/zoom.js
index 2575356..2b84cb8 100644
--- a/src/js/plugins/zoom.js
+++ b/src/js/plugins/zoom.js
@@ -6,7 +6,9 @@ const CLASSES = {
ZOOM: 'grid',
DIV: 'column',
WRAP: 'wrap-zoom',
- WRAP_CONTAINER: 'wrap'
+ WRAP_CONTAINER: 'wrap',
+ CURRENT: 'current',
+ SLIDE: 'slide'
};
const ID = 'webslides-zoomed';
@@ -80,6 +82,7 @@ export default class Zoom {
this.zws_.grid.appendChild(s_);
return new Slide(s_, i);
});
+
DOM.hide(this.zws_.el);
DOM.after(this.zws_.el, this.ws_.el);
@@ -95,6 +98,7 @@ export default class Zoom {
// Wraps the slide around a container
const wrap = DOM.wrap(elem.el, 'div');
wrap.className = CLASSES.WRAP;
+ wrap.setAttribute('id', `zoomed-${elem.el.getAttribute('id')}`);
// Slide container, need due to flexbox styles
const div = DOM.wrap(wrap, 'div');
div.className = CLASSES.DIV;
@@ -165,6 +169,17 @@ export default class Zoom {
*/
zoomIn() {
DOM.show(this.zws_.el);
+ const currentId = this.ws_.el
+ .querySelector(`.${CLASSES.SLIDE}.${CLASSES.CURRENT}`)
+ .getAttribute('id');
+ const zoomedCurrent = this.zws_.el
+ .querySelector(`.${CLASSES.WRAP}.${CLASSES.CURRENT}`);
+ if (zoomedCurrent) {
+ zoomedCurrent.classList.remove(CLASSES.CURRENT);
+ }
+ this.zws_.el
+ .querySelector(`#zoomed-${currentId}`)
+ .classList.add(CLASSES.CURRENT);
setTimeout(() => {
this.ws_.disable();
}, 400);
diff --git a/src/scss/_vars.scss b/src/scss/_vars.scss
index 45bac0c..fea55d8 100644
--- a/src/scss/_vars.scss
+++ b/src/scss/_vars.scss
@@ -58,3 +58,4 @@ $link-color: $royal-blue !default;
$link-color-secondary: $cardinal !default;
$link-hover: $dodger-blue !default;
$hr-bg: radial-gradient(ellipse at center, rgba(0, 20, 80, .2) 0, rgba(255, 255, 255, 0) 75%) !default;
+$current-zoomed-slide-shadow: 0 0 7px rgba(0, 187, 255, .5);
diff --git a/src/scss/modules/_zoom.scss b/src/scss/modules/_zoom.scss
index ec630ee..2dc4d47 100644
--- a/src/scss/modules/_zoom.scss
+++ b/src/scss/modules/_zoom.scss
@@ -14,8 +14,7 @@
> .wrap {
@media (min-width: 1024px) {
- padding-bottom: 12rem;
- padding-top: 12rem;
+ padding: 12rem;
width: 100%;
}
}
@@ -37,6 +36,10 @@
}
}
+ > .wrap-zoom.current {
+ box-shadow: $current-zoomed-slide-shadow;
+ }
+
> .wrap-zoom > .zoom-layer {
background: transparent;
cursor: pointer;
diff --git a/static/css/webslides.css b/static/css/webslides.css
index 4cc87ac..466e782 100644
--- a/static/css/webslides.css
+++ b/static/css/webslides.css
@@ -1,7 +1,7 @@
/*!
* Name: WebSlides
* Version: 1.3.1
- * Date: 2017-06-02
+ * Date: 2017-06-21
* Description: Making HTML presentations easy
* URL: https://github.com/webslides/webslides#readme
* Credits: @jlantunez, @LuisSacristan, @Belelros
@@ -823,6 +823,7 @@ ol > li {
li li {
font-size: 100%; }
+/*== List .description (Product/Specs) === */
ul.description {
padding: 0; }
ul.description + p {
@@ -856,12 +857,6 @@ h4 svg {
.try svg {
margin-top: -.4rem; }
-svg[class^='fa-'] {
- display: inline-block;
- height: 1em;
- vertical-align: middle;
- width: 1em; }
-
h1 {
font-size: 4rem;
line-height: 5.6rem; }
@@ -1035,6 +1030,7 @@ h3 + img {
font-size: 2.4rem;
line-height: 4rem; }
+/*== 2.1. Headings with background ==*/
h1[class*='bg-'] {
padding: 2.4rem; }
@@ -1064,15 +1060,18 @@ h2 [class*='bg-'],
h3 [class*='bg-'] {
padding: .4rem .8rem; }
+/*== 2.2. Typography Classes = .text- == */
.text-intro,
[class*='content-'] p {
font-size: 2.4rem;
line-height: 4rem; }
+/* -- Serif -- */
.text-serif,
h1 span {
font-family: 'Maitree', times, serif; }
+/* -- h1,h2... Promo/Landings -- */
.text-landing {
letter-spacing: .4rem;
text-transform: uppercase; }
@@ -1080,6 +1079,7 @@ h1 span {
.text-landing {
letter-spacing: 1.6rem; } }
+/* -- Subtitle (Before h1, h2) p.subtitle + h1/h2 */
.text-subtitle {
letter-spacing: .2rem;
margin-bottom: 0;
@@ -1097,6 +1097,7 @@ h1 span {
.text-lowercase {
text-transform: lowercase; }
+/* -- Emoji (you'll love this) -- */
.text-emoji {
font-size: 6.8rem;
line-height: 8.8rem; }
@@ -1105,6 +1106,7 @@ h1 span {
font-size: 12.8rem;
line-height: 16rem; } }
+/* -- Numbers (results, sales... 23,478,289 iphones) -- */
.text-data {
font-size: 6.4rem;
line-height: 8rem;
@@ -1120,6 +1122,7 @@ h1 span {
text-transform: uppercase;
width: 12.8rem; }
+/* -- Magazine Two Columns -- */
@media (min-width: 768px) {
.text-cols {
-webkit-column-count: 2;
@@ -1139,6 +1142,7 @@ h1 span {
padding: 0;
text-transform: uppercase; }
+/* -- Heading with border -- */
.text-context {
position: relative; }
.text-context:before {
@@ -1152,6 +1156,7 @@ h1 span {
.text-context.text-uppercase {
letter-spacing: .1rem; }
+/* -- Separator/Symbols (stars ***...) -- */
.text-symbols {
font-weight: 600;
letter-spacing: .8rem;
@@ -1174,6 +1179,7 @@ h1 span {
.text-separator:before {
margin-top: 1.2rem; } }
+/* -- Pull Quote (Right/Left) -- */
[class*='text-pull'] {
font-size: 2.4rem;
font-weight: 400;
@@ -1208,6 +1214,12 @@ figure[class*='text-pull-'] {
margin-top: .8rem;
padding-top: 0; }
+/* -- Interviews (Questions & Answers) --- */
+/* --
+- name
+question or answer
+
+--- */
.text-interview dt {
font-weight: 600;
margin-bottom: 0;
@@ -1221,29 +1233,37 @@ figure[class*='text-pull-'] {
white-space: nowrap;
width: 30%; } }
+/* -- Info Messages (error, warning, success... -- */
.text-info {
font-size: 1.6rem;
line-height: 2.4rem; }
+/*=========================================
+2.1. San Francisco Font (Apple's new font)
+=========================================== */
.text-apple,
.bg-apple {
font-family: 'San Francisco', helvetica, arial, sans-serif; }
+/* Ultra Light */
@font-face {
font-family: 'San Francisco';
font-weight: 100;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff2"); }
+/* Thin */
@font-face {
font-family: 'San Francisco';
font-weight: 200;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-thin-webfont.woff2"); }
+/* Regular */
@font-face {
font-family: 'San Francisco';
font-weight: 400;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.woff2"); }
+/* Bold */
@font-face {
font-family: 'San Francisco';
font-weight: bold;
@@ -2901,8 +2921,7 @@ Solution: stackoverflow.com/questions/34250282/flexbox-safari-bug-flex-wrap
z-index: 2; }
@media (min-width: 1024px) {
#webslides-zoomed > .wrap {
- padding-bottom: 12rem;
- padding-top: 12rem;
+ padding: 12rem;
width: 100%; } }
#webslides-zoomed > .wrap > .grid > .column {
-ms-flex-item-align: auto;
@@ -2923,6 +2942,9 @@ Solution: stackoverflow.com/questions/34250282/flexbox-safari-bug-flex-wrap
-webkit-transform: scale(1.02);
transform: scale(1.02);
z-index: 2; }
+ #webslides-zoomed > .wrap > .grid > .column > .wrap-zoom.current {
+ -webkit-box-shadow: 0 0 7px rgba(0, 187, 255, 0.5);
+ box-shadow: 0 0 7px rgba(0, 187, 255, 0.5); }
#webslides-zoomed > .wrap > .grid > .column > .wrap-zoom > .zoom-layer {
background: transparent;
cursor: pointer;
diff --git a/static/js/webslides.js b/static/js/webslides.js
index ce9dc72..897857a 100644
--- a/static/js/webslides.js
+++ b/static/js/webslides.js
@@ -1,7 +1,7 @@
/*!
* Name: WebSlides
* Version: 1.3.1
- * Date: 2017-06-02
+ * Date: 2017-06-21
* Description: Making HTML presentations easy
* URL: https://github.com/webslides/webslides#readme
* Credits: @jlantunez, @LuisSacristan, @Belelros
@@ -194,7 +194,7 @@ var DOM = function () {
return animationEvent;
}
- animationEvent = '';
+ animationEvent = 'animationend';
var el = optEl || document.createElement('ws');
var animations = {
@@ -205,11 +205,12 @@ var DOM = function () {
};
var animationNames = Object.keys(animations);
- for (var i = 0, length = animationNames.length; i < length && !animationEvent; i++) {
+ for (var i = 0, length = animationNames.length; i < length; i++) {
var animationName = animationNames[i];
if (typeof el.style[animationName] !== 'undefined') {
animationEvent = animations[animationName];
+ break;
}
}
@@ -571,7 +572,8 @@ var Keys = {
DOWN: 40,
PLUS: [107, 171],
MINUS: [109, 173],
- ESCAPE: 27
+ ESCAPE: 27,
+ F: 70
};
/* harmony default export */ __webpack_exports__["a"] = (Keys);
@@ -1099,7 +1101,7 @@ var WebSlides = function () {
}, {
key: 'isValidIndexSlide_',
value: function isValidIndexSlide_(i) {
- return i >= 0 && i < this.maxSlide_;
+ return typeof i === 'number' && i >= 0 && i < this.maxSlide_;
}
/**
@@ -1122,6 +1124,7 @@ var WebSlides = function () {
// Keeping the order
if (slideNumber !== 0) {
var i = 0;
+
while (i < slideNumber) {
this.slides[i].moveAfterLast();
i++;
@@ -1172,6 +1175,28 @@ var WebSlides = function () {
return this.el.classList.contains(CLASSES.DISABLED);
}
+ /**
+ * Puts the browser into fullscreen
+ */
+
+ }, {
+ key: 'fullscreen',
+ value: function fullscreen() {
+ var el = document.documentElement;
+ var isFullscreen = document.fullscreen || document.webkitIsFullScreen || document.mozFullScreen || document.msFullScreenElement;
+
+ if (!isFullscreen) {
+ /* istanbul ignore next hard to test prefixes */
+ var requestFullscreen = el.requestFullscreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullscreen;
+ requestFullscreen.call(el);
+ } else {
+ /* istanbul ignore next hard to test prefixes */
+ var cancelFullscreen = document.exitFullScreen || document.webkitCancelFullScreen || document.mozCancelFullScreen || document.msExitFullscreen;
+
+ cancelFullscreen.call(document);
+ }
+ }
+
/**
* Registers a plugin to be loaded when the instance is created. It allows
* (on purpose) to replace default plugins.
@@ -1627,6 +1652,9 @@ var Keyboard = function () {
case __WEBPACK_IMPORTED_MODULE_0__utils_keys__["a" /* default */].RIGHT:
method = !this.ws_.isVertical ? this.ws_.goNext : null;
break;
+ case __WEBPACK_IMPORTED_MODULE_0__utils_keys__["a" /* default */].F:
+ method = this.ws_.fullscreen;
+ break;
}
if (method) {
@@ -2691,7 +2719,9 @@ var CLASSES = {
ZOOM: 'grid',
DIV: 'column',
WRAP: 'wrap-zoom',
- WRAP_CONTAINER: 'wrap'
+ WRAP_CONTAINER: 'wrap',
+ CURRENT: 'current',
+ SLIDE: 'slide'
};
var ID = 'webslides-zoomed';
@@ -2777,6 +2807,7 @@ var Zoom = function () {
_this.zws_.grid.appendChild(s_);
return new __WEBPACK_IMPORTED_MODULE_2__modules_slide__["a" /* default */](s_, i);
});
+
__WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].hide(this.zws_.el);
__WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].after(this.zws_.el, this.ws_.el);
@@ -2799,10 +2830,11 @@ var Zoom = function () {
// Wraps the slide around a container
var wrap = __WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].wrap(elem.el, 'div');
wrap.className = CLASSES.WRAP;
+ wrap.setAttribute('id', 'zoomed-' + elem.el.getAttribute('id'));
// Slide container, need due to flexbox styles
var div = __WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].wrap(wrap, 'div');
div.className = CLASSES.DIV;
- // Adding some layer for controling click events
+ // Adding some layer for controlling click events
var divLayer = __WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].createNode('div');
divLayer.className = 'zoom-layer';
divLayer.addEventListener('click', function (e) {
@@ -2876,6 +2908,12 @@ var Zoom = function () {
var _this3 = this;
__WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].show(this.zws_.el);
+ var currentId = this.ws_.el.querySelector('.' + CLASSES.SLIDE + '.' + CLASSES.CURRENT).getAttribute('id');
+ var zoomedCurrent = this.zws_.el.querySelector('.' + CLASSES.WRAP + '.' + CLASSES.CURRENT);
+ if (zoomedCurrent) {
+ zoomedCurrent.classList.remove(CLASSES.CURRENT);
+ }
+ this.zws_.el.querySelector('#zoomed-' + currentId).classList.add(CLASSES.CURRENT);
setTimeout(function () {
_this3.ws_.disable();
}, 400);
diff --git a/static/js/webslides.min.js b/static/js/webslides.min.js
index f8eb3ca..9bbd0ec 100644
--- a/static/js/webslides.min.js
+++ b/static/js/webslides.min.js
@@ -1,9 +1,9 @@
/*!
* Name: WebSlides
* Version: 1.3.1
- * Date: 2017-06-02
+ * Date: 2017-06-21
* Description: Making HTML presentations easy
* URL: https://github.com/webslides/webslides#readme
* Credits: @jlantunez, @LuisSacristan, @Belelros
*/
-!function(e){function t(n){if(i[n])return i[n].exports;var s=i[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var i={};t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/static/js/",t(t.s=6)}([function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=i(19),a=function(){function e(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=document.createElement(e);return t&&(n.id=t),i&&(n.textContent=i),n}},{key:"once",value:function(e,t,i){var n=function n(s){s.target===e&&(e.removeEventListener(t,n),i(s))};e.addEventListener(t,n,!1)}},{key:"getTransitionEvent",value:function(e){if(o&&!e)return o;o="";for(var t=e||document.createElement("ws"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},n=Object.keys(i),s=0,a=n.length;s2&&void 0!==arguments[2]?arguments[2]:{},n=new s.a(t,{detail:i});e.dispatchEvent(n)}},{key:"toArray",value:function(e){return[].slice.call(e)}},{key:"isFocusableElement",value:function(){var e=!1;if(document.activeElement){var t="inherit"!==document.activeElement.contentEditable&&void 0!==document.activeElement.contentEditable;e=["INPUT","SELECT","OPTION","TEXTAREA"].indexOf(document.activeElement.tagName)>-1||t}return e}},{key:"parseSize",value:function(e){return Number(e.replace(/[^\d\.]/g,""))}},{key:"wrap",value:function(e,t){var i=document.createElement(t);return e.parentElement.insertBefore(i,e),i.appendChild(e),i}},{key:"after",value:function(e,t){var i=t.parentNode;i.lastChild===t?i.appendChild(e):i.insertBefore(e,t.nextSibling)}}]),e}();t.a=l},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",function(){return l}),i.d(t,"b",function(){return r});var s=i(0),a=function(){function e(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},i=t.autoslide,s=void 0!==i&&i,a=t.changeOnClick,o=void 0!==a&&a,r=t.loop,l=void 0===r||r,c=t.minWheelDelta,h=void 0===c?40:c,d=t.navigateOnScroll,f=void 0===d||d,v=t.scrollWait,y=void 0===v?450:v,p=t.slideOffset,w=void 0===p?50:p;if(n(this,e),this.el=document.getElementById("webslides"),!this.el)throw new Error("Couldn't find the webslides container!");this.isMoving=!1,this.slides=null,this.currentSlideI_=-1,this.currentSlide_=null,this.maxSlide_=0,this.isVertical=this.el.classList.contains(u.VERTICAL),this.plugins={},this.options={autoslide:s,changeOnClick:o,loop:l,minWheelDelta:h,navigateOnScroll:f,scrollWait:y,slideOffset:w},this.initialised=!1,this.removeChildren_(),this.grabSlides_(),this.createPlugins_(),this.initSlides_(),this.onInit_()}return l(e,[{key:"removeChildren_",value:function(){for(var e=this.el.childNodes,t=e.length;t--;){var i=e[t];a.a.isCandidate(i)||this.el.removeChild(i)}}},{key:"createPlugins_",value:function(){var e=this;Object.keys(c).forEach(function(t){var i=c[t];e.plugins[t]=new i(e)})}},{key:"onInit_",value:function(){this.initialised=!0,o.a.fireEvent(this.el,"ws:init"),document.documentElement.classList.add(u.READY)}},{key:"grabSlides_",value:function(){this.slides=o.a.toArray(this.el.childNodes).map(function(e,t){return new a.a(e,t)}),this.maxSlide_=this.slides.length}},{key:"goToSlide",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isValidIndexSlide_(e)&&!this.isMoving&&this.currentSlideI_!==e){this.isMoving=!0;var i=!1;null!==t?i=t:this.currentSlideI_>=0&&(i=e>this.currentSlideI_);var n=this.slides[e];null===this.currentSlide_||!this.isVertical||this.plugins.touch&&this.plugins.touch.isEnabled?this.transitionToSlide_(i,n,this.onSlideChange_):this.scrollTransitionToSlide_(i,n,this.onSlideChange_)}}},{key:"scrollTransitionToSlide_",value:function(e,t,n){var s=this;this.el.style.overflow="hidden",e?t.show():(t.moveBeforeFirst(),t.show(),i.i(r.a)(this.currentSlide_.el.offsetTop,0)),i.i(r.a)(t.el.offsetTop,500,function(){s.currentSlide_.hide(),e&&s.currentSlide_.moveAfterLast(),s.el.style.overflow="auto",setTimeout(function(){n.call(s,t)},150)})}},{key:"transitionToSlide_",value:function(e,t,n){var s=this;i.i(r.a)(0,0);var a="slideInRight";e||(t.moveBeforeFirst(),a="slideInLeft"),this.currentSlide_&&(e&&this.currentSlide_.moveAfterLast(),this.currentSlide_.hide()),t.show(),this.initialised&&this.plugins.touch&&this.plugins.touch.isEnabled?(o.a.once(t.el,o.a.getAnimationEvent(),function(){t.el.classList.remove(a),n.call(s,t)}),t.el.classList.add(a)):n.call(this,t)}},{key:"onSlideChange_",value:function(e){this.currentSlide_&&this.currentSlide_.disable(),this.currentSlide_=e,this.currentSlideI_=e.i,this.currentSlide_.enable(),this.isMoving=!1,o.a.fireEvent(this.el,"ws:slide-change",{slides:this.maxSlide_,currentSlide0:this.currentSlideI_,currentSlide:this.currentSlideI_+1})}},{key:"goNext",value:function(){var e=this.currentSlideI_+1;if(e>=this.maxSlide_){if(!this.options.loop)return;e=0}this.goToSlide(e,!0)}},{key:"goPrev",value:function(){var e=this.currentSlideI_-1;if(e<0){if(!this.options.loop)return;e=this.maxSlide_-1}this.goToSlide(e,!1)}},{key:"isValidIndexSlide_",value:function(e){return e>=0&&e=this.maxSlide_)&&(e=0),0!==e)for(var t=0;t0&&(this.interval_=setInterval(this.ws_.goNext.bind(this.ws_),e))}},{key:"stop",value:function(){this.interval_&&(clearInterval(this.interval_),this.interval_=null)}}]),e}();t.a=o},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var i=0;iMath.abs(t);if(this.isGoingUp_=t<0,this.isGoingLeft_=i<0,s){if(n)return;e.preventDefault()}(Math.abs(t)>=this.ws_.options.minWheelDelta||Math.abs(i)>=this.ws_.options.minWheelDelta)&&(s&&this.isGoingLeft_||!s&&this.isGoingUp_?this.ws_.goPrev():this.ws_.goNext(),e.preventDefault())}}}]),e}();t.a=o},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=i(3),a=function(){function e(e,t){for(var i=0;i1&&(this.startTouches=e.getTouchCoordinates(t),this.endTouches=this.startTouches,this.isGesture=!0)}}},{key:"onMove_",value:function(t){if(!this.ws_.isDisabled()){var i=e.normalizeEventInfo(t);this.isGesture?this.endTouches=e.getTouchCoordinates(t):(this.endX_=i.x,this.endY_=i.y)}}},{key:"onStop_",value:function(){if(!this.ws_.isDisabled())if(this.isGesture){var e=Math.sqrt(Math.pow(this.startTouches[0].x-this.startTouches[1].x,2)+Math.pow(this.startTouches[0].y-this.startTouches[1].y,2)),t=Math.sqrt(Math.pow(this.endTouches[0].x-this.endTouches[1].x,2)+Math.pow(this.endTouches[0].y-this.endTouches[1].y,2));e>t&&this.ws_.toggleZoom(),this.isGesture=!1}else{var i=this.startX_-this.endX_,n=this.startY_-this.endY_;Math.abs(i)>Math.abs(n)&&(i<-this.ws_.options.slideOffset?this.ws_.goPrev():i>this.ws_.options.slideOffset&&this.ws_.goNext())}}}],[{key:"getTouchCoordinates",value:function(e){return[{x:e.touches[0].clientX,y:e.touches[0].clientY},{x:e.touches[1].clientX,y:e.touches[1].clientY}]}},{key:"normalizeEventInfo",value:function(e){var t={pageX:0,pageY:0};return void 0!==e.changedTouches?t=e.changedTouches[0]:void 0!==e.originalEvent&&void 0!==e.originalEvent.changedTouches&&(t=e.originalEvent.changedTouches[0]),{x:e.offsetX||e.layerX||t.pageX,y:e.offsetY||e.layerY||t.pageY}}}]),e}();t.a=r},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=i(0),a=i(1),o=function(){function e(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:500,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};a||(a=document.getElementById("webslides"));var n=e-a.scrollTop,o=a.scrollTop;if(!t)return a.scrollTop=e,void i();!function r(l){l+=16;var u=Math.min(1,l/t),c=s.a.swing(u,l*u,e,n,t);a.scrollTop=Math.floor(o+c*n),l1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=document.createElement(e);return t&&(n.id=t),i&&(n.textContent=i),n}},{key:"once",value:function(e,t,i){var n=function n(s){s.target===e&&(e.removeEventListener(t,n),i(s))};e.addEventListener(t,n,!1)}},{key:"getTransitionEvent",value:function(e){if(a&&!e)return a;a="";for(var t=e||document.createElement("ws"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},n=Object.keys(i),s=0,o=n.length;s2&&void 0!==arguments[2]?arguments[2]:{},n=new s.a(t,{detail:i});e.dispatchEvent(n)}},{key:"toArray",value:function(e){return[].slice.call(e)}},{key:"isFocusableElement",value:function(){var e=!1;if(document.activeElement){var t="inherit"!==document.activeElement.contentEditable&&void 0!==document.activeElement.contentEditable;e=["INPUT","SELECT","OPTION","TEXTAREA"].indexOf(document.activeElement.tagName)>-1||t}return e}},{key:"parseSize",value:function(e){return Number(e.replace(/[^\d\.]/g,""))}},{key:"wrap",value:function(e,t){var i=document.createElement(t);return e.parentElement.insertBefore(i,e),i.appendChild(e),i}},{key:"after",value:function(e,t){var i=t.parentNode;i.lastChild===t?i.appendChild(e):i.insertBefore(e,t.nextSibling)}}]),e}();t.a=l},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",function(){return l}),i.d(t,"b",function(){return r});var s=i(0),o=function(){function e(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},i=t.autoslide,s=void 0!==i&&i,o=t.changeOnClick,a=void 0!==o&&o,r=t.loop,l=void 0===r||r,c=t.minWheelDelta,h=void 0===c?40:c,d=t.navigateOnScroll,f=void 0===d||d,v=t.scrollWait,y=void 0===v?450:v,p=t.slideOffset,m=void 0===p?50:p;if(n(this,e),this.el=document.getElementById("webslides"),!this.el)throw new Error("Couldn't find the webslides container!");this.isMoving=!1,this.slides=null,this.currentSlideI_=-1,this.currentSlide_=null,this.maxSlide_=0,this.isVertical=this.el.classList.contains(u.VERTICAL),this.plugins={},this.options={autoslide:s,changeOnClick:a,loop:l,minWheelDelta:h,navigateOnScroll:f,scrollWait:y,slideOffset:m},this.initialised=!1,this.removeChildren_(),this.grabSlides_(),this.createPlugins_(),this.initSlides_(),this.onInit_()}return l(e,[{key:"removeChildren_",value:function(){for(var e=this.el.childNodes,t=e.length;t--;){var i=e[t];o.a.isCandidate(i)||this.el.removeChild(i)}}},{key:"createPlugins_",value:function(){var e=this;Object.keys(c).forEach(function(t){var i=c[t];e.plugins[t]=new i(e)})}},{key:"onInit_",value:function(){this.initialised=!0,a.a.fireEvent(this.el,"ws:init"),document.documentElement.classList.add(u.READY)}},{key:"grabSlides_",value:function(){this.slides=a.a.toArray(this.el.childNodes).map(function(e,t){return new o.a(e,t)}),this.maxSlide_=this.slides.length}},{key:"goToSlide",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isValidIndexSlide_(e)&&!this.isMoving&&this.currentSlideI_!==e){this.isMoving=!0;var i=!1;null!==t?i=t:this.currentSlideI_>=0&&(i=e>this.currentSlideI_);var n=this.slides[e];null===this.currentSlide_||!this.isVertical||this.plugins.touch&&this.plugins.touch.isEnabled?this.transitionToSlide_(i,n,this.onSlideChange_):this.scrollTransitionToSlide_(i,n,this.onSlideChange_)}}},{key:"scrollTransitionToSlide_",value:function(e,t,n){var s=this;this.el.style.overflow="hidden",e?t.show():(t.moveBeforeFirst(),t.show(),i.i(r.a)(this.currentSlide_.el.offsetTop,0)),i.i(r.a)(t.el.offsetTop,500,function(){s.currentSlide_.hide(),e&&s.currentSlide_.moveAfterLast(),s.el.style.overflow="auto",setTimeout(function(){n.call(s,t)},150)})}},{key:"transitionToSlide_",value:function(e,t,n){var s=this;i.i(r.a)(0,0);var o="slideInRight";e||(t.moveBeforeFirst(),o="slideInLeft"),this.currentSlide_&&(e&&this.currentSlide_.moveAfterLast(),this.currentSlide_.hide()),t.show(),this.initialised&&this.plugins.touch&&this.plugins.touch.isEnabled?(a.a.once(t.el,a.a.getAnimationEvent(),function(){t.el.classList.remove(o),n.call(s,t)}),t.el.classList.add(o)):n.call(this,t)}},{key:"onSlideChange_",value:function(e){this.currentSlide_&&this.currentSlide_.disable(),this.currentSlide_=e,this.currentSlideI_=e.i,this.currentSlide_.enable(),this.isMoving=!1,a.a.fireEvent(this.el,"ws:slide-change",{slides:this.maxSlide_,currentSlide0:this.currentSlideI_,currentSlide:this.currentSlideI_+1})}},{key:"goNext",value:function(){var e=this.currentSlideI_+1;if(e>=this.maxSlide_){if(!this.options.loop)return;e=0}this.goToSlide(e,!0)}},{key:"goPrev",value:function(){var e=this.currentSlideI_-1;if(e<0){if(!this.options.loop)return;e=this.maxSlide_-1}this.goToSlide(e,!1)}},{key:"isValidIndexSlide_",value:function(e){return"number"==typeof e&&e>=0&&e=this.maxSlide_)&&(e=0),0!==e)for(var t=0;t0&&(this.interval_=setInterval(this.ws_.goNext.bind(this.ws_),e))}},{key:"stop",value:function(){this.interval_&&(clearInterval(this.interval_),this.interval_=null)}}]),e}();t.a=a},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var i=0;iMath.abs(t);if(this.isGoingUp_=t<0,this.isGoingLeft_=i<0,s){if(n)return;e.preventDefault()}(Math.abs(t)>=this.ws_.options.minWheelDelta||Math.abs(i)>=this.ws_.options.minWheelDelta)&&(s&&this.isGoingLeft_||!s&&this.isGoingUp_?this.ws_.goPrev():this.ws_.goNext(),e.preventDefault())}}}]),e}();t.a=a},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=i(3),o=function(){function e(e,t){for(var i=0;i1&&(this.startTouches=e.getTouchCoordinates(t),this.endTouches=this.startTouches,this.isGesture=!0)}}},{key:"onMove_",value:function(t){if(!this.ws_.isDisabled()){var i=e.normalizeEventInfo(t);this.isGesture?this.endTouches=e.getTouchCoordinates(t):(this.endX_=i.x,this.endY_=i.y)}}},{key:"onStop_",value:function(){if(!this.ws_.isDisabled())if(this.isGesture){var e=Math.sqrt(Math.pow(this.startTouches[0].x-this.startTouches[1].x,2)+Math.pow(this.startTouches[0].y-this.startTouches[1].y,2)),t=Math.sqrt(Math.pow(this.endTouches[0].x-this.endTouches[1].x,2)+Math.pow(this.endTouches[0].y-this.endTouches[1].y,2));e>t&&this.ws_.toggleZoom(),this.isGesture=!1}else{var i=this.startX_-this.endX_,n=this.startY_-this.endY_;Math.abs(i)>Math.abs(n)&&(i<-this.ws_.options.slideOffset?this.ws_.goPrev():i>this.ws_.options.slideOffset&&this.ws_.goNext())}}}],[{key:"getTouchCoordinates",value:function(e){return[{x:e.touches[0].clientX,y:e.touches[0].clientY},{x:e.touches[1].clientX,y:e.touches[1].clientY}]}},{key:"normalizeEventInfo",value:function(e){var t={pageX:0,pageY:0};return void 0!==e.changedTouches?t=e.changedTouches[0]:void 0!==e.originalEvent&&void 0!==e.originalEvent.changedTouches&&(t=e.originalEvent.changedTouches[0]),{x:e.offsetX||e.layerX||t.pageX,y:e.offsetY||e.layerY||t.pageY}}}]),e}();t.a=r},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=i(0),o=i(1),a=function(){function e(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:500,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o||(o=document.getElementById("webslides"));var n=e-o.scrollTop,a=o.scrollTop;if(!t)return o.scrollTop=e,void i();!function r(l){l+=16;var u=Math.min(1,l/t),c=s.a.swing(u,l*u,e,n,t);o.scrollTop=Math.floor(a+c*n),l