mirror of
https://github.com/wezm/wezm.net.git
synced 2024-12-24 21:19:53 +00:00
9 lines
30 KiB
JavaScript
9 lines
30 KiB
JavaScript
|
/*!
|
||
|
* Name: WebSlides
|
||
|
* Version: 1.4.2
|
||
|
* Date: 2017-09-12
|
||
|
* 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.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=5)}([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(9),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),a="",r="",l=function(){function e(){n(this,e)}return o(e,null,[{key:"createNode",value:function(e){var t=arguments.length>1&&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;s<o&&!a;s++){var r=n[s];void 0!==t.style[r]&&(a=i[r])}return a}},{key:"getAnimationEvent",value:function(e){if(r&&!e)return r;r="animationend";for(var t=e||document.createElement("ws"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"},n=Object.keys(i),s=0,o=n.length;s<o;s++){var a=n[s];if(void 0!==t.style[a]){r=i[a];break}}return r}},{key:"hide",value:function(e){e.style.display="none"}},{key:"show",value:function(e){e.style.display=""}},{key:"isVisible",value:function(e){return null!==e.offsetParent}},{key:"fireEvent",value:function(e,t){var i=arguments.length>2&&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,"b",function(){return l}),i.d(t,"a",function(){return r});var s=i(0),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),a={SLIDE:"slide",CURRENT:"current"},r={ENTER:"dom:enter",LEAVE:"dom:leave",ENABLE:"slide:enable",DISABLE:"slide:disable"},l=function(){function e(t,i){n(this,e),this.el=t,this.parent=t.parentNode,this.i=i,this.el.id="section-"+(i+1),this.el.classList.add(a.SLIDE),this.hide()}return o(e,[{key:"hide",value:function(){s.a.hide(this.el),this.el.classList.remove(a.CURRENT)}},{key:"show",value:function(){s.a.show(this.el),this.el.classList.add(a.CURRENT)}},{key:"moveAfterLast",value:function(){var e=this.parent.childNodes[this.parent.childElementCount-1];this.fire_(r.LEAVE),this.parent.insertBefore(this.el,e.nextSibling),this.fire_(r.ENTER)}},{key:"moveBeforeFirst",value:function(){var e=this.parent
|