2 lines
115 KiB
JavaScript
2 lines
115 KiB
JavaScript
|
(function(E,f){typeof exports=="object"&&typeof module!="undefined"?module.exports=f():typeof define=="function"&&define.amd?define(f):E.Swiper=f()})(this,function(){"use strict";var E=typeof document=="undefined"?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,f=typeof window=="undefined"?{document:E,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,P=function(t){for(var e=0;e<t.length;e+=1)this[e]=t[e];return this.length=t.length,this};function u(t,e){var i=[],s=0;if(t&&!e&&t instanceof P)return t;if(t){if(typeof t=="string"){var a,r,n=t.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){var o="div";for(n.indexOf("<li")===0&&(o="ul"),n.indexOf("<tr")===0&&(o="tbody"),n.indexOf("<td")!==0&&n.indexOf("<th")!==0||(o="tr"),n.indexOf("<tbody")===0&&(o="table"),n.indexOf("<option")===0&&(o="select"),(r=E.createElement(o)).innerHTML=n,s=0;s<r.childNodes.length;s+=1)i.push(r.childNodes[s])}else for(a=e||t[0]!=="#"||t.match(/[ .<>:~]/)?(e||E).querySelectorAll(t.trim()):[E.getElementById(t.trim().split("#")[1])],s=0;s<a.length;s+=1)a[s]&&i.push(a[s])}else if(t.nodeType||t===f||t===E)i.push(t);else if(t.length>0&&t[0].nodeType)for(s=0;s<t.length;s+=1)i.push(t[s])}return new P(i)}function ee(t){for(var e=[],i=0;i<t.length;i+=1)e.indexOf(t[i])===-1&&e.push(t[i]);return e}u.fn=P.prototype,u.Class=P,u.Dom7=P,"resize scroll".split(" ");var oe={addClass:function(t){if(t===void 0)return this;for(var e=t.split(" "),i=0;i<e.length;i+=1)for(var s=0;s<this.length;s+=1)this[s].classList!==void 0&&this[s].classList.add(e[i]);return this},removeClass:function(t){for(var e=t.split(" "),i=0;i<e.length;i+=1)for(var s=0;s<this.length;s+=1)this[s].classList!==void 0&&this[s].classList.remove(e[i]);return this},hasClass:function(t){return!!this[0]&&this[0].classList.contains(t)},toggleClass:function(t){for(var e=t.split(" "),i=0;i<e.length;i+=1)for(var s=0;s<this.length;s+=1)this[s].classList!==void 0&&this[s].classList.toggle(e[i]);return this},attr:function(t,e){var i=arguments;if(arguments.length===1&&typeof t=="string")return this[0]?this[0].getAttribute(t):void 0;for(var s=0;s<this.length;s+=1)if(i.length===2)this[s].setAttribute(t,e);else for(var a in t)this[s][a]=t[a],this[s].setAttribute(a,t[a]);return this},removeAttr:function(t){for(var e=0;e<this.length;e+=1)this[e].removeAttribute(t);return this},data:function(t,e){var i;if(e!==void 0){for(var s=0;s<this.length;s+=1)(i=this[s]).dom7ElementDataStorage||(i.dom7ElementDataStorage={}),i.dom7ElementDataStorage[t]=e;return this}if(i=this[0]){if(i.dom7ElementDataStorage&&t in i.dom7ElementDataStorage)return i.dom7ElementDataStorage[t];var a=i.getAttribute("data-"+t);return a||void 0}},transform:function(t){for(var e=0;e<this.length;e+=1){var i=this[e].style;i.webkitTransform=t,i.transform=t}return this},transition:function(t){typeof t!="string"&&(t+="ms");for(var e=0;e<this.length;e+=1){var i=this[e].style;i.webkitTransitionDuration=t,i.transitionDuration=t}return this},on:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i,s=t[0],a=t[1],r=t[2],n=t[3];function o(m){var T=m.target;if(T){var v=m.target.dom7EventData||[];if(v.unshift(m),u(T).is(a))r.apply(T,v);else for(var w=u(T).parents(),y=0;y<w.length;y+=1)u(w[y]).is(a)&&r.apply(w[y],v)}}function l(m){var T=m&&m.target?m.target.dom7EventData||[]:[];T.unshift(m),r.apply(this,T)}typeof t[1]=="function"&&(s=(i=t)[0],r=i[1],n=i[2],a=void 0),n||(n=!1);for(var d,
|