1/*! 2 * @cycjimmy/swiper-animation v4.1.0 3 * Homepage: https://github.com/cycjimmy/swiper-animation#readme 4 * Released under the MIT License. 5 */ 6!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).SwiperAnimation=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function n(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var r=!1,o=function(){return!!window.Promise};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function u(t,e){return t(e={exports:{}},e.exports),e.exports}var c=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){return"[object NodeList]"===Object.prototype.toString.call(t)}}));s(c);var l=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){return"Array"===Object.prototype.toString.call(t).slice(8,-1)}}));s(l);var f=s(u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(c),i=a(l);function a(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){return(0,i.default)(t)?t:(0,n.default)(t)?Array.from?Array.from(t):Array.prototype.slice.call(t):new Array(t)}}))),d=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){return"Promise"===Object.prototype.toString.call(t).slice(8,-1)}}));s(d);var m=s(u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=d)&&n.__esModule?n:{default:n};e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,i.default)(t)?t:new Promise((function(n){t(),setTimeout(n,e)}))}}))),y=["animated","animate__animated"],p=function(){function e(n){t(this,e),this.swiper=n,this.container=function(t){if(t.el)return t.el;if(t.container)return t.container[0];throw new Error("Illegal swiper instance")}(this.swiper),this.animationElements=[].concat(i(f(this.container.querySelectorAll("[data-swiper-animation]"))),i(f(this.container.querySelectorAll("[data-swiper-animation-once]")))),this.activeElements=[],this.animationElements.forEach((function(t){t.animationData={styleCache:t.attributes.style?"visibility: hidden;"+t.style.cssText:"visibility: hidden;",effect:t.dataset.swiperAnimation||t.dataset.swiperAnimationOnce||"",duration:t.dataset.duration||".5s",delay:t.dataset.delay||".5s",outEffect:t.dataset.swiperOutAnimation||"",outDuration:t.dataset.outDuration||".5s",isRecovery:!0,runOnce:!!t.dataset.swiperAnimationOnce},t.style.cssText=t.animationData.styleCache}))}return n(e,[{key:"animate",value:function(){var t=this;return Promise.resolve().then((function(){return e=t.activeElements,n=e.map((function(t){return t.animationData.isRecovery?Promise.resolve():t.animationData.outEffect?m((function(){t.style.cssText=t.styleCache,t.style.visibility="visible",t.style.cssText+=" animation-duration:".concat(t.animationData.outDuration,"; -webkit-animation-duration:").concat(t.animationData.outDuration,";"),t.classList.add(t.animationData.outEffect,"animated")}),500):Promise.resolve()})),Promise.all(n);var e,n})).then((function(){return e=t.activeElements,n=e.map((function(t){return t.animationData.isRecovery||t.animationData.runOnce?Promise.resolve():m((function(){var e;t.style.cssText=t.animationData.styleCache,(e=t.classList).remove.apply(e,i([t.animationData.effect,t.animationData.outEffect].concat(i(y)).filter((function(t){return!!t})))),t.animationData.isRecovery=!0}))}
vendor: 1,410 bytes, line 6
6)),Promise.all(n);var e,n})).then((function(){return e=t._updateActiveElements(),n=e.map((function(t){return t.animationData?m((function(){var e;t.style.visibility="visible",t.style.cssText+=" animation-duration:".concat(t.animationData.duration,"; -webkit-animation-duration:").concat(t.animationData.duration,"; animation-delay:").concat(t.animationData.delay,"; -webkit-animation-delay:").concat(t.animationData.delay,";"),(e=t.classList).add.apply(e,[t.animationData.effect].concat(i(y))),t.animationData.isRecovery=!1})):Promise.resolve()})),Promise.all(n);var e,n}))}},{key:"_updateActiveElements",value:function(){return this.activeElements=[].concat(i(f(this.swiper.slides[this.swiper.activeIndex].querySelectorAll("[data-swiper-animation]"))),i(f(this.swiper.slides[this.swiper.activeIndex].querySelectorAll("[data-swiper-animation-once]")))),this.activeElements}}]),e}();return function(){function e(){t(this,e),this.animations=null,o()||function(){if(!r&&!o()){var t=document.createElement("script");t.type="text/javascript",t.src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js",document.querySelector("head").appendChild(t),r=!0}}()}return n(e,[{key:"init",value:function(t){return this.animations||(this.animations=new p(t)),this}},{key:"animate",value:function(){var t=this;return o()?this.animations.animate():setTimeout((function(){return t.animate()}),500)}}]),e}()}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.