@ionic/core
Version:
Base components for Ionic
1 lines • 95 kB
JavaScript
import*as tslib_1 from"../polyfills/tslib.js";var doc="undefined"==typeof document?{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,win="undefined"==typeof window?{document:doc,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,Dom7=function(e){for(var t=0;t<e.length;t+=1)this[t]=e[t];return this.length=e.length,this};function $(e,t){var i=[],s=0;if(e&&!t&&e instanceof Dom7)return e;if(e)if("string"==typeof e){var a=void 0,r=void 0,n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){var o="div";for(0===n.indexOf("<li")&&(o="ul"),0===n.indexOf("<tr")&&(o="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(o="tr"),0===n.indexOf("<tbody")&&(o="table"),0===n.indexOf("<option")&&(o="select"),(r=doc.createElement(o)).innerHTML=n,s=0;s<r.childNodes.length;s+=1)i.push(r.childNodes[s])}else for(a=t||"#"!==e[0]||e.match(/[ .<>:~]/)?(t||doc).querySelectorAll(e.trim()):[doc.getElementById(e.trim().split("#")[1])],s=0;s<a.length;s+=1)a[s]&&i.push(a[s])}else if(e.nodeType||e===win||e===doc)i.push(e);else if(e.length>0&&e[0].nodeType)for(s=0;s<e.length;s+=1)i.push(e[s]);return new Dom7(i)}function unique(e){for(var t=[],i=0;i<e.length;i+=1)-1===t.indexOf(e[i])&&t.push(e[i]);return t}function addClass(e){if(void 0===e)return this;for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var s=0;s<this.length;s+=1)void 0!==this[s]&&void 0!==this[s].classList&&this[s].classList.add(t[i]);return this}function removeClass(e){for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var s=0;s<this.length;s+=1)void 0!==this[s]&&void 0!==this[s].classList&&this[s].classList.remove(t[i]);return this}function hasClass(e){return!!this[0]&&this[0].classList.contains(e)}function toggleClass(e){for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var s=0;s<this.length;s+=1)void 0!==this[s]&&void 0!==this[s].classList&&this[s].classList.toggle(t[i]);return this}function attr(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var i=0;i<this.length;i+=1)if(2===arguments.length)this[i].setAttribute(e,t);else for(var s in e)this[i][s]=e[s],this[i].setAttribute(s,e[s]);return this}function removeAttr(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function data(e,t){var i;if(void 0!==t){for(var s=0;s<this.length;s+=1)(i=this[s]).dom7ElementDataStorage||(i.dom7ElementDataStorage={}),i.dom7ElementDataStorage[e]=t;return this}if(i=this[0])return i.dom7ElementDataStorage&&e in i.dom7ElementDataStorage?i.dom7ElementDataStorage[e]:i.getAttribute("data-"+e)||void 0}function transform(e){for(var t=0;t<this.length;t+=1){var i=this[t].style;i.webkitTransform=e,i.transform=e}return this}function transition(e){"string"!=typeof e&&(e+="ms");for(var t=0;t<this.length;t+=1){var i=this[t].style;i.webkitTransitionDuration=e,i.transitionDuration=e}return this}function on(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e[0],s=e[1],a=e[2],r=e[3];function n(e){var t=e.target;if(t){var i=e.target.dom7EventData||[];if(i.indexOf(e)<0&&i.unshift(e),$(t).is(s))a.apply(t,i);else for(var r=$(t).parents(),n=0;n<r.length;n+=1)$(r[n]).is(s)&&a.apply(r[n],i)}}function o(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),a.apply(this,t)}"function"==typeof e[1]&&(i=e[0],a=e[1],r=e[2],s=void 0),r||(r=!1);for(var l,d=i.split(" "),h=0;h<this.length;h+=1){var p=this[h];if(s)for(l=0;l<d.length;l+=1)u=d[l],p.dom7LiveListeners||(p.dom7LiveListeners={}),p.dom7LiveListeners[u]||(p.dom7LiveListeners[u]=[]),p.dom7LiveListeners[u].push({listener:a,proxyListener:n}),p.addEventListener(u,n,r);else for(l=0;l<d.length;l+=1){var u=d[l];p.dom7Listeners||(p.dom7Listeners={}),p.dom7Listeners[u]||(p.dom7Listeners[u]=[]),p.dom7Listeners[u].push({listener:a,proxyListener:o}),p.addEventListener(u,o,r)}}return this}function off(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e[0],s=e[1],a=e[2],r=e[3];"function"==typeof e[1]&&(i=e[0],a=e[1],r=e[2],s=void 0),r||(r=!1);for(var n=i.split(" "),o=0;o<n.length;o+=1)for(var l=n[o],d=0;d<this.length;d+=1){var h=this[d],p=void 0;if(!s&&h.dom7Listeners?p=h.dom7Listeners[l]:s&&h.dom7LiveListeners&&(p=h.dom7LiveListeners[l]),p&&p.length)for(var u=p.length-1;u>=0;u-=1){var c=p[u];a&&c.listener===a?(h.removeEventListener(l,c.proxyListener,r),p.splice(u,1)):a||(h.removeEventListener(l,c.proxyListener,r),p.splice(u,1))}}return this}function trigger(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=e[0].split(" "),s=e[1],a=0;a<i.length;a+=1)for(var r=i[a],n=0;n<this.length;n+=1){var o=this[n],l=void 0;try{l=new win.CustomEvent(r,{detail:s,bubbles:!0,cancelable:!0})}catch(e){(l=doc.createEvent("Event")).initEvent(r,!0,!0),l.detail=s}o.dom7EventData=e.filter(function(e,t){return t>0}),o.dispatchEvent(l),o.dom7EventData=[],delete o.dom7EventData}return this}function transitionEnd(e){var t,i=["webkitTransitionEnd","transitionend"],s=this;function a(r){if(r.target===this)for(e.call(this,r),t=0;t<i.length;t+=1)s.off(i[t],a)}if(e)for(t=0;t<i.length;t+=1)s.on(i[t],a);return this}function outerWidth(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null}function outerHeight(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null}function offset(){if(this.length>0){var e=this[0],t=e.getBoundingClientRect(),i=doc.body;return{top:t.top+(e===win?win.scrollY:e.scrollTop)-(e.clientTop||i.clientTop||0),left:t.left+(e===win?win.scrollX:e.scrollLeft)-(e.clientLeft||i.clientLeft||0)}}return null}function styles(){return this[0]?win.getComputedStyle(this[0],null):{}}function css(e,t){var i;if(1===arguments.length){if("string"!=typeof e){for(i=0;i<this.length;i+=1)for(var s in e)this[i].style[s]=e[s];return this}if(this[0])return win.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(i=0;i<this.length;i+=1)this[i].style[e]=t;return this}return this}function each(e){if(!e)return this;for(var t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this}function html(e){if(void 0===e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function text(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this}function is(e){var t,i,s=this[0];if(!s||void 0===e)return!1;if("string"==typeof e){if(s.matches)return s.matches(e);if(s.webkitMatchesSelector)return s.webkitMatchesSelector(e);if(s.msMatchesSelector)return s.msMatchesSelector(e);for(t=$(e),i=0;i<t.length;i+=1)if(t[i]===s)return!0;return!1}if(e===doc)return s===doc;if(e===win)return s===win;if(e.nodeType||e instanceof Dom7){for(t=e.nodeType?[e]:e,i=0;i<t.length;i+=1)if(t[i]===s)return!0;return!1}return!1}function index(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}}function eq(e){if(void 0===e)return this;var t,i=this.length;return new Dom7(e>i-1?[]:e<0?(t=i+e)<0?[]:[this[t]]:[this[e]])}function append(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];for(var s=0;s<t.length;s+=1){e=t[s];for(var a=0;a<this.length;a+=1)if("string"==typeof e){var r=doc.createElement("div");for(r.innerHTML=e;r.firstChild;)this[a].appendChild(r.firstChild)}else if(e instanceof Dom7)for(var n=0;n<e.length;n+=1)this[a].appendChild(e[n]);else this[a].appendChild(e)}return this}function prepend(e){var t,i;for(t=0;t<this.length;t+=1)if("string"==typeof e){var s=doc.createElement("div");for(s.innerHTML=e,i=s.childNodes.length-1;i>=0;i-=1)this[t].insertBefore(s.childNodes[i],this[t].childNodes[0])}else if(e instanceof Dom7)for(i=0;i<e.length;i+=1)this[t].insertBefore(e[i],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this}function next(e){return this.length>0?e?this[0].nextElementSibling&&$(this[0].nextElementSibling).is(e)?new Dom7([this[0].nextElementSibling]):new Dom7([]):new Dom7(this[0].nextElementSibling?[this[0].nextElementSibling]:[]):new Dom7([])}function nextAll(e){var t=[],i=this[0];if(!i)return new Dom7([]);for(;i.nextElementSibling;){var s=i.nextElementSibling;e?$(s).is(e)&&t.push(s):t.push(s),i=s}return new Dom7(t)}function prev(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&$(t.previousElementSibling).is(e)?new Dom7([t.previousElementSibling]):new Dom7([]):new Dom7(t.previousElementSibling?[t.previousElementSibling]:[])}return new Dom7([])}function prevAll(e){var t=[],i=this[0];if(!i)return new Dom7([]);for(;i.previousElementSibling;){var s=i.previousElementSibling;e?$(s).is(e)&&t.push(s):t.push(s),i=s}return new Dom7(t)}function parent(e){for(var t=[],i=0;i<this.length;i+=1)null!==this[i].parentNode&&(e?$(this[i].parentNode).is(e)&&t.push(this[i].parentNode):t.push(this[i].parentNode));return $(unique(t))}function parents(e){for(var t=[],i=0;i<this.length;i+=1)for(var s=this[i].parentNode;s;)e?$(s).is(e)&&t.push(s):t.push(s),s=s.parentNode;return $(unique(t))}function closest(e){var t=this;return void 0===e?new Dom7([]):(t.is(e)||(t=t.parents(e).eq(0)),t)}function find(e){for(var t=[],i=0;i<this.length;i+=1)for(var s=this[i].querySelectorAll(e),a=0;a<s.length;a+=1)t.push(s[a]);return new Dom7(t)}function children(e){for(var t=[],i=0;i<this.length;i+=1)for(var s=this[i].childNodes,a=0;a<s.length;a+=1)e?1===s[a].nodeType&&$(s[a]).is(e)&&t.push(s[a]):1===s[a].nodeType&&t.push(s[a]);return new Dom7(unique(t))}function remove(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function add(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,s;for(i=0;i<e.length;i+=1){var a=$(e[i]);for(s=0;s<a.length;s+=1)this[this.length]=a[s],this.length+=1}return this}$.fn=Dom7.prototype,$.Class=Dom7,$.Dom7=Dom7;var Methods={addClass:addClass,removeClass:removeClass,hasClass:hasClass,toggleClass:toggleClass,attr:attr,removeAttr:removeAttr,data:data,transform:transform,transition:transition,on:on,off:off,trigger:trigger,transitionEnd:transitionEnd,outerWidth:outerWidth,outerHeight:outerHeight,offset:offset,css:css,each:each,html:html,text:text,is:is,index:index,eq:eq,append:append,prepend:prepend,next:next,nextAll:nextAll,prev:prev,prevAll:prevAll,parent:parent,parents:parents,closest:closest,find:find,children:children,remove:remove,add:add,styles:styles};Object.keys(Methods).forEach(function(e){$.fn[e]=Methods[e]});var Utils={deleteProps:function(e){var t=e;Object.keys(t).forEach(function(e){try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},now:function(){return Date.now()},getTranslate:function(e,t){var i,s,a;void 0===t&&(t="x");var r=win.getComputedStyle(e,null);return win.WebKitCSSMatrix?((s=r.transform||r.webkitTransform).split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),a=new win.WebKitCSSMatrix("none"===s?"":s)):i=(a=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(s=win.WebKitCSSMatrix?a.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(s=win.WebKitCSSMatrix?a.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),s||0},parseUrlQuery:function(e){var t,i,s,a,r={},n=e||win.location.href;if("string"==typeof n&&n.length)for(a=(i=(n=n.indexOf("?")>-1?n.replace(/\S*\?/,""):"").split("&").filter(function(e){return""!==e})).length,t=0;t<a;t+=1)s=i[t].replace(/#\S+/g,"").split("="),r[decodeURIComponent(s[0])]=void 0===s[1]?void 0:decodeURIComponent(s[1])||"";return r},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},extend:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=Object(e[0]),s=1;s<e.length;s+=1){var a=e[s];if(null!=a)for(var r=Object.keys(Object(a)),n=0,o=r.length;n<o;n+=1){var l=r[n],d=Object.getOwnPropertyDescriptor(a,l);void 0!==d&&d.enumerable&&(Utils.isObject(i[l])&&Utils.isObject(a[l])?Utils.extend(i[l],a[l]):!Utils.isObject(i[l])&&Utils.isObject(a[l])?(i[l]={},Utils.extend(i[l],a[l])):i[l]=a[l])}}return i}},Support=function(){var e,t=doc.createElement("div");return{touch:win.Modernizr&&!0===win.Modernizr.touch||!!(win.navigator.maxTouchPoints>0||"ontouchstart"in win||win.DocumentTouch&&doc instanceof win.DocumentTouch),pointerEvents:!!(win.navigator.pointerEnabled||win.PointerEvent||"maxTouchPoints"in win.navigator),prefixedPointerEvents:!!win.navigator.msPointerEnabled,transition:(e=t.style,"transition"in e||"webkitTransition"in e||"MozTransition"in e),transforms3d:win.Modernizr&&!0===win.Modernizr.csstransforms3d||function(){var e=t.style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=t.style,i="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),s=0;s<i.length;s+=1)if(i[s]in e)return!0;return!1}(),observer:"MutationObserver"in win||"WebkitMutationObserver"in win,passiveListener:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});win.addEventListener("testPassiveListener",null,t)}catch(e){}return e}(),gestures:"ongesturestart"in win}}(),SwiperClass=function(){function e(e){void 0===e&&(e={});var t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach(function(e){t.on(e,t.params.on[e])})}return e.prototype.on=function(e,t,i){var s=this;if("function"!=typeof t)return s;var a=i?"unshift":"push";return e.split(" ").forEach(function(e){s.eventsListeners[e]||(s.eventsListeners[e]=[]),s.eventsListeners[e][a](t)}),s},e.prototype.once=function(e,t,i){var s=this;return"function"!=typeof t?s:s.on(e,function i(){for(var a=[],r=0;r<arguments.length;r++)a[r]=arguments[r];t.apply(s,a),s.off(e,i)},i)},e.prototype.off=function(e,t){var i=this;return i.eventsListeners?(e.split(" ").forEach(function(e){void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].length&&i.eventsListeners[e].forEach(function(s,a){s===t&&i.eventsListeners[e].splice(a,1)})}),i):i},e.prototype.emit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,s,a,r=this;return r.eventsListeners?("string"==typeof e[0]||Array.isArray(e[0])?(i=e[0],s=e.slice(1,e.length),a=r):(i=e[0].events,s=e[0].data,a=e[0].context||r),(Array.isArray(i)?i:i.split(" ")).forEach(function(e){if(r.eventsListeners&&r.eventsListeners[e]){var t=[];r.eventsListeners[e].forEach(function(e){t.push(e)}),t.forEach(function(e){e.apply(a,s)})}}),r):r},e.prototype.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach(function(i){var s=t.modules[i];s.params&&Utils.extend(e,s.params)})},e.prototype.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach(function(i){var s=t.modules[i],a=e[i]||{};s.instance&&Object.keys(s.instance).forEach(function(e){var i=s.instance[e];t[e]="function"==typeof i?i.bind(t):i}),s.on&&t.on&&Object.keys(s.on).forEach(function(e){t.on(e,s.on[e])}),s.create&&s.create.bind(t)(a)})},Object.defineProperty(e,"components",{set:function(e){this.use&&this.use(e)},enumerable:!0,configurable:!0}),e.installModule=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var s=this;s.prototype.modules||(s.prototype.modules={});var a=e.name||Object.keys(s.prototype.modules).length+"_"+Utils.now();return s.prototype.modules[a]=e,e.proto&&Object.keys(e.proto).forEach(function(t){s.prototype[t]=e.proto[t]}),e.static&&Object.keys(e.static).forEach(function(t){s[t]=e.static[t]}),e.install&&e.install.apply(s,t),s},e.use=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var s=this;return Array.isArray(e)?(e.forEach(function(e){return s.installModule(e)}),s):s.installModule.apply(s,[e].concat(t))},e}();function updateSize(){var e,t,i=this.$el;t=void 0!==this.params.height?this.params.height:i[0].clientHeight,0===(e=void 0!==this.params.width?this.params.width:i[0].clientWidth)&&this.isHorizontal()||0===t&&this.isVertical()||(e=e-parseInt(i.css("padding-left"),10)-parseInt(i.css("padding-right"),10),t=t-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10),Utils.extend(this,{width:e,height:t,size:this.isHorizontal()?e:t}))}function updateSlides(){var e=this.params,t=this.$wrapperEl,i=this.size,s=this.rtlTranslate,a=this.wrongRTL,r=this.virtual&&e.virtual.enabled,n=r?this.virtual.slides.length:this.slides.length,o=t.children("."+this.params.slideClass),l=r?this.virtual.slides.length:o.length,d=[],h=[],p=[],u=e.slidesOffsetBefore;"function"==typeof u&&(u=e.slidesOffsetBefore.call(this));var c=e.slidesOffsetAfter;"function"==typeof c&&(c=e.slidesOffsetAfter.call(this));var v=this.snapGrid.length,m=this.snapGrid.length,f=e.spaceBetween,g=-u,w=0,b=0;if(void 0!==i){var S,T;"string"==typeof f&&f.indexOf("%")>=0&&(f=parseFloat(f.replace("%",""))/100*i),this.virtualSize=-f,o.css(s?{marginLeft:"",marginTop:""}:{marginRight:"",marginBottom:""}),e.slidesPerColumn>1&&(S=Math.floor(l/e.slidesPerColumn)===l/this.params.slidesPerColumn?l:Math.ceil(l/e.slidesPerColumn)*e.slidesPerColumn,"auto"!==e.slidesPerView&&"row"===e.slidesPerColumnFill&&(S=Math.max(S,e.slidesPerView*e.slidesPerColumn)));for(var x,E=e.slidesPerColumn,y=S/E,C=Math.floor(l/e.slidesPerColumn),M=0;M<l;M+=1){T=0;var $=o.eq(M);if(e.slidesPerColumn>1){var P=void 0,k=void 0,D=void 0;"column"===e.slidesPerColumnFill?(D=M-(k=Math.floor(M/E))*E,(k>C||k===C&&D===E-1)&&(D+=1)>=E&&(D=0,k+=1),$.css({"-webkit-box-ordinal-group":P=k+D*S/E,"-moz-box-ordinal-group":P,"-ms-flex-order":P,"-webkit-order":P,order:P})):k=M-(D=Math.floor(M/y))*y,$.css("margin-"+(this.isHorizontal()?"top":"left"),0!==D&&e.spaceBetween&&e.spaceBetween+"px").attr("data-swiper-column",k).attr("data-swiper-row",D)}if("none"!==$.css("display")){if("auto"===e.slidesPerView){var z=win.getComputedStyle($[0],null),L=$[0].style.transform,O=$[0].style.webkitTransform;if(L&&($[0].style.transform="none"),O&&($[0].style.webkitTransform="none"),e.roundLengths)T=this.isHorizontal()?$.outerWidth(!0):$.outerHeight(!0);else if(this.isHorizontal()){var I=parseFloat(z.getPropertyValue("width")),A=parseFloat(z.getPropertyValue("padding-left")),B=parseFloat(z.getPropertyValue("padding-right")),X=parseFloat(z.getPropertyValue("margin-left")),G=parseFloat(z.getPropertyValue("margin-right"));T=(Y=z.getPropertyValue("box-sizing"))&&"border-box"===Y?I+X+G:I+A+B+X+G}else{var Y,H=parseFloat(z.getPropertyValue("height")),V=parseFloat(z.getPropertyValue("padding-top")),U=parseFloat(z.getPropertyValue("padding-bottom")),F=parseFloat(z.getPropertyValue("margin-top")),N=parseFloat(z.getPropertyValue("margin-bottom"));T=(Y=z.getPropertyValue("box-sizing"))&&"border-box"===Y?H+F+N:H+V+U+F+N}L&&($[0].style.transform=L),O&&($[0].style.webkitTransform=O),e.roundLengths&&(T=Math.floor(T))}else T=(i-(e.slidesPerView-1)*f)/e.slidesPerView,e.roundLengths&&(T=Math.floor(T)),o[M]&&(this.isHorizontal()?o[M].style.width=T+"px":o[M].style.height=T+"px");o[M]&&(o[M].swiperSlideSize=T),p.push(T),e.centeredSlides?(g=g+T/2+w/2+f,0===w&&0!==M&&(g=g-i/2-f),0===M&&(g=g-i/2-f),Math.abs(g)<.001&&(g=0),e.roundLengths&&(g=Math.floor(g)),b%e.slidesPerGroup==0&&d.push(g),h.push(g)):(e.roundLengths&&(g=Math.floor(g)),b%e.slidesPerGroup==0&&d.push(g),h.push(g),g=g+T+f),this.virtualSize+=T+f,w=T,b+=1}}if(this.virtualSize=Math.max(this.virtualSize,i)+c,s&&a&&("slide"===e.effect||"coverflow"===e.effect)&&t.css({width:this.virtualSize+e.spaceBetween+"px"}),Support.flexbox&&!e.setWrapperSize||(this.isHorizontal()?t.css({width:this.virtualSize+e.spaceBetween+"px"}):t.css({height:this.virtualSize+e.spaceBetween+"px"})),e.slidesPerColumn>1&&(this.virtualSize=(T+e.spaceBetween)*S,this.virtualSize=Math.ceil(this.virtualSize/e.slidesPerColumn)-e.spaceBetween,this.isHorizontal()?t.css({width:this.virtualSize+e.spaceBetween+"px"}):t.css({height:this.virtualSize+e.spaceBetween+"px"}),e.centeredSlides)){for(x=[],M=0;M<d.length;M+=1){var W=d[M];e.roundLengths&&(W=Math.floor(W)),d[M]<this.virtualSize+d[0]&&x.push(W)}d=x}if(!e.centeredSlides){for(x=[],M=0;M<d.length;M+=1)W=d[M],e.roundLengths&&(W=Math.floor(W)),d[M]<=this.virtualSize-i&&x.push(W);d=x,Math.floor(this.virtualSize-i)-Math.floor(d[d.length-1])>1&&d.push(this.virtualSize-i)}if(0===d.length&&(d=[0]),0!==e.spaceBetween&&(this.isHorizontal()?o.css(s?{marginLeft:f+"px"}:{marginRight:f+"px"}):o.css({marginBottom:f+"px"})),e.centerInsufficientSlides){var R=0;if(p.forEach(function(t){R+=t+(e.spaceBetween?e.spaceBetween:0)}),(R-=e.spaceBetween)<i){var j=(i-R)/2;d.forEach(function(e,t){d[t]=e-j}),h.forEach(function(e,t){h[t]=e+j})}}Utils.extend(this,{slides:o,snapGrid:d,slidesGrid:h,slidesSizesGrid:p}),l!==n&&this.emit("slidesLengthChange"),d.length!==v&&(this.params.watchOverflow&&this.checkOverflow(),this.emit("snapGridLengthChange")),h.length!==m&&this.emit("slidesGridLengthChange"),(e.watchSlidesProgress||e.watchSlidesVisibility)&&this.updateSlidesOffset()}}function updateAutoHeight(e){var t,i=[],s=0;if("number"==typeof e?this.setTransition(e):!0===e&&this.setTransition(this.params.speed),"auto"!==this.params.slidesPerView&&this.params.slidesPerView>1)for(t=0;t<Math.ceil(this.params.slidesPerView);t+=1){var a=this.activeIndex+t;if(a>this.slides.length)break;i.push(this.slides.eq(a)[0])}else i.push(this.slides.eq(this.activeIndex)[0]);for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var r=i[t].offsetHeight;s=r>s?r:s}s&&this.$wrapperEl.css("height",s+"px")}function updateSlidesOffset(){for(var e=this.slides,t=0;t<e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop}function updateSlidesProgress(e){void 0===e&&(e=this&&this.translate||0);var t=this.params,i=this.slides,s=this.rtlTranslate;if(0!==i.length){void 0===i[0].swiperSlideOffset&&this.updateSlidesOffset();var a=-e;s&&(a=e),i.removeClass(t.slideVisibleClass),this.visibleSlidesIndexes=[],this.visibleSlides=[];for(var r=0;r<i.length;r+=1){var n=i[r],o=(a+(t.centeredSlides?this.minTranslate():0)-n.swiperSlideOffset)/(n.swiperSlideSize+t.spaceBetween);if(t.watchSlidesVisibility){var l=-(a-n.swiperSlideOffset),d=l+this.slidesSizesGrid[r];(l>=0&&l<this.size||d>0&&d<=this.size||l<=0&&d>=this.size)&&(this.visibleSlides.push(n),this.visibleSlidesIndexes.push(r),i.eq(r).addClass(t.slideVisibleClass))}n.progress=s?-o:o}this.visibleSlides=$(this.visibleSlides)}}function updateProgress(e){void 0===e&&(e=this&&this.translate||0);var t=this.params,i=this.maxTranslate()-this.minTranslate(),s=this.progress,a=this.isBeginning,r=this.isEnd,n=a,o=r;0===i?(s=0,a=!0,r=!0):(a=(s=(e-this.minTranslate())/i)<=0,r=s>=1),Utils.extend(this,{progress:s,isBeginning:a,isEnd:r}),(t.watchSlidesProgress||t.watchSlidesVisibility)&&this.updateSlidesProgress(e),a&&!n&&this.emit("reachBeginning toEdge"),r&&!o&&this.emit("reachEnd toEdge"),(n&&!a||o&&!r)&&this.emit("fromEdge"),this.emit("progress",s)}function updateSlidesClasses(){var e,t=this.slides,i=this.params,s=this.$wrapperEl,a=this.activeIndex,r=this.realIndex,n=this.virtual&&i.virtual.enabled;t.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=n?this.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+a+'"]'):t.eq(a)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass));var o=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===o.length&&(o=t.eq(0)).addClass(i.slideNextClass);var l=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===l.length&&(l=t.eq(-1)).addClass(i.slidePrevClass),i.loop&&(o.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass))}function updateActiveIndex(e){var t,i=this.rtlTranslate?this.translate:-this.translate,s=this.slidesGrid,a=this.snapGrid,r=this.params,n=this.activeIndex,o=this.realIndex,l=this.snapIndex,d=e;if(void 0===d){for(var h=0;h<s.length;h+=1)void 0!==s[h+1]?i>=s[h]&&i<s[h+1]-(s[h+1]-s[h])/2?d=h:i>=s[h]&&i<s[h+1]&&(d=h+1):i>=s[h]&&(d=h);r.normalizeSlideIndex&&(d<0||void 0===d)&&(d=0)}if((t=a.indexOf(i)>=0?a.indexOf(i):Math.floor(d/r.slidesPerGroup))>=a.length&&(t=a.length-1),d!==n){var p=parseInt(this.slides.eq(d).attr("data-swiper-slide-index")||d,10);Utils.extend(this,{snapIndex:t,realIndex:p,previousIndex:n,activeIndex:d}),this.emit("activeIndexChange"),this.emit("snapIndexChange"),o!==p&&this.emit("realIndexChange"),this.emit("slideChange")}else t!==l&&(this.snapIndex=t,this.emit("snapIndexChange"))}function updateClickedSlide(e){var t=this.params,i=$(e.target).closest("."+t.slideClass)[0],s=!1;if(i)for(var a=0;a<this.slides.length;a+=1)this.slides[a]===i&&(s=!0);if(!i||!s)return this.clickedSlide=void 0,void(this.clickedIndex=void 0);this.clickedSlide=i,this.clickedIndex=this.virtual&&this.params.virtual.enabled?parseInt($(i).attr("data-swiper-slide-index"),10):$(i).index(),t.slideToClickedSlide&&void 0!==this.clickedIndex&&this.clickedIndex!==this.activeIndex&&this.slideToClickedSlide()}var update={updateSize:updateSize,updateSlides:updateSlides,updateAutoHeight:updateAutoHeight,updateSlidesOffset:updateSlidesOffset,updateSlidesProgress:updateSlidesProgress,updateProgress:updateProgress,updateSlidesClasses:updateSlidesClasses,updateActiveIndex:updateActiveIndex,updateClickedSlide:updateClickedSlide};function getTranslate(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this.rtlTranslate,i=this.translate;if(this.params.virtualTranslate)return t?-i:i;var s=Utils.getTranslate(this.$wrapperEl[0],e);return t&&(s=-s),s||0}function setTranslate(e,t){var i=this.rtlTranslate,s=this.params,a=this.$wrapperEl,r=this.progress,n=0,o=0;this.isHorizontal()?n=i?-e:e:o=e,s.roundLengths&&(n=Math.floor(n),o=Math.floor(o)),s.virtualTranslate||a.transform(Support.transforms3d?"translate3d("+n+"px, "+o+"px, 0px)":"translate("+n+"px, "+o+"px)"),this.previousTranslate=this.translate,this.translate=this.isHorizontal()?n:o;var l=this.maxTranslate()-this.minTranslate();(0===l?0:(e-this.minTranslate())/l)!==r&&this.updateProgress(e),this.emit("setTranslate",this.translate,t)}function minTranslate(){return-this.snapGrid[0]}function maxTranslate(){return-this.snapGrid[this.snapGrid.length-1]}var translate={getTranslate:getTranslate,setTranslate:setTranslate,minTranslate:minTranslate,maxTranslate:maxTranslate};function setTransition(e,t){this.$wrapperEl.transition(e),this.emit("setTransition",e,t)}function transitionStart(e,t){void 0===e&&(e=!0);var i=this.activeIndex,s=this.previousIndex;this.params.autoHeight&&this.updateAutoHeight();var a=t;if(a||(a=i>s?"next":i<s?"prev":"reset"),this.emit("transitionStart"),e&&i!==s){if("reset"===a)return void this.emit("slideResetTransitionStart");this.emit("slideChangeTransitionStart"),this.emit("next"===a?"slideNextTransitionStart":"slidePrevTransitionStart")}}function transitionEnd$1(e,t){void 0===e&&(e=!0);var i=this.activeIndex,s=this.previousIndex;this.animating=!1,this.setTransition(0);var a=t;if(a||(a=i>s?"next":i<s?"prev":"reset"),this.emit("transitionEnd"),e&&i!==s){if("reset"===a)return void this.emit("slideResetTransitionEnd");this.emit("slideChangeTransitionEnd"),this.emit("next"===a?"slideNextTransitionEnd":"slidePrevTransitionEnd")}}var transition$1={setTransition:setTransition,transitionStart:transitionStart,transitionEnd:transitionEnd$1};function slideTo(e,t,i,s){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var a=this,r=e;r<0&&(r=0);var n=a.params,o=a.snapGrid,l=a.slidesGrid,d=a.previousIndex,h=a.activeIndex,p=a.rtlTranslate;if(a.animating&&n.preventInteractionOnTransition)return!1;var u=Math.floor(r/n.slidesPerGroup);u>=o.length&&(u=o.length-1),(h||n.initialSlide||0)===(d||0)&&i&&a.emit("beforeSlideChangeStart");var c,v=-o[u];if(a.updateProgress(v),n.normalizeSlideIndex)for(var m=0;m<l.length;m+=1)-Math.floor(100*v)>=Math.floor(100*l[m])&&(r=m);if(a.initialized&&r!==h){if(!a.allowSlideNext&&v<a.translate&&v<a.minTranslate())return!1;if(!a.allowSlidePrev&&v>a.translate&&v>a.maxTranslate()&&(h||0)!==r)return!1}return c=r>h?"next":r<h?"prev":"reset",p&&-v===a.translate||!p&&v===a.translate?(a.updateActiveIndex(r),n.autoHeight&&a.updateAutoHeight(),a.updateSlidesClasses(),"slide"!==n.effect&&a.setTranslate(v),"reset"!==c&&(a.transitionStart(i,c),a.transitionEnd(i,c)),!1):(0!==t&&Support.transition?(a.setTransition(t),a.setTranslate(v),a.updateActiveIndex(r),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,s),a.transitionStart(i,c),a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.$wrapperEl[0].removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].removeEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd),a.onSlideToWrapperTransitionEnd=null,delete a.onSlideToWrapperTransitionEnd,a.transitionEnd(i,c))}),a.$wrapperEl[0].addEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].addEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd))):(a.setTransition(0),a.setTranslate(v),a.updateActiveIndex(r),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,s),a.transitionStart(i,c),a.transitionEnd(i,c)),!0)}function slideToLoop(e,t,i,s){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var a=e;return this.params.loop&&(a+=this.loopedSlides),this.slideTo(a,t,i,s)}function slideNext(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var s=this.params;return s.loop?!this.animating&&(this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft,this.slideTo(this.activeIndex+s.slidesPerGroup,e,t,i)):this.slideTo(this.activeIndex+s.slidesPerGroup,e,t,i)}function slidePrev(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var s=this.snapGrid,a=this.slidesGrid,r=this.rtlTranslate;if(this.params.loop){if(this.animating)return!1;this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft}function n(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var o,l=n(r?this.translate:-this.translate),d=s.map(function(e){return n(e)}),h=(a.map(function(e){return n(e)}),d.indexOf(l),s[d.indexOf(l)-1]);return void 0!==h&&(o=a.indexOf(h))<0&&(o=this.activeIndex-1),this.slideTo(o,e,t,i)}function slideReset(e,t,i){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,i)}function slideToClosest(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var s=this.activeIndex,a=Math.floor(s/this.params.slidesPerGroup);if(a<this.snapGrid.length-1){var r=this.snapGrid[a];(this.rtlTranslate?this.translate:-this.translate)-r>(this.snapGrid[a+1]-r)/2&&(s=this.params.slidesPerGroup)}return this.slideTo(s,e,t,i)}function slideToClickedSlide(){var e,t=this,i=t.params,s=t.$wrapperEl,a="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,r=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt($(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?r<t.loopedSlides-a/2||r>t.slides.length-t.loopedSlides+a/2?(t.loopFix(),r=s.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),Utils.nextTick(function(){t.slideTo(r)})):t.slideTo(r):r>t.slides.length-a?(t.loopFix(),r=s.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),Utils.nextTick(function(){t.slideTo(r)})):t.slideTo(r)}else t.slideTo(r)}var slide={slideTo:slideTo,slideToLoop:slideToLoop,slideNext:slideNext,slidePrev:slidePrev,slideReset:slideReset,slideToClosest:slideToClosest,slideToClickedSlide:slideToClickedSlide};function loopCreate(){var e=this,t=e.params,i=e.$wrapperEl;i.children("."+t.slideClass+"."+t.slideDuplicateClass).remove();var s=i.children("."+t.slideClass);if(t.loopFillGroupWithBlank){var a=t.slidesPerGroup-s.length%t.slidesPerGroup;if(a!==t.slidesPerGroup){for(var r=0;r<a;r+=1){var n=$(doc.createElement("div")).addClass(t.slideClass+" "+t.slideBlankClass);i.append(n)}s=i.children("."+t.slideClass)}}"auto"!==t.slidesPerView||t.loopedSlides||(t.loopedSlides=s.length),e.loopedSlides=parseInt(t.loopedSlides||t.slidesPerView,10),e.loopedSlides+=t.loopAdditionalSlides,e.loopedSlides>s.length&&(e.loopedSlides=s.length);var o=[],l=[];for(s.each(function(t,i){var a=$(i);t<e.loopedSlides&&l.push(i),t<s.length&&t>=s.length-e.loopedSlides&&o.push(i),a.attr("data-swiper-slide-index",t)}),r=0;r<l.length;r+=1)i.append($(l[r].cloneNode(!0)).addClass(t.slideDuplicateClass));for(r=o.length-1;r>=0;r-=1)i.prepend($(o[r].cloneNode(!0)).addClass(t.slideDuplicateClass))}function loopFix(){var e,t=this.params,i=this.activeIndex,s=this.slides,a=this.loopedSlides,r=this.allowSlidePrev,n=this.allowSlideNext,o=this.snapGrid,l=this.rtlTranslate;this.allowSlidePrev=!0,this.allowSlideNext=!0;var d=-o[i]-this.getTranslate();i<a?(e=s.length-3*a+i,this.slideTo(e+=a,0,!1,!0)&&0!==d&&this.setTranslate((l?-this.translate:this.translate)-d)):("auto"===t.slidesPerView&&i>=2*a||i>=s.length-a)&&(e=-s.length+i+a,this.slideTo(e+=a,0,!1,!0)&&0!==d&&this.setTranslate((l?-this.translate:this.translate)-d)),this.allowSlidePrev=r,this.allowSlideNext=n}function loopDestroy(){var e=this.params,t=this.slides;this.$wrapperEl.children("."+e.slideClass+"."+e.slideDuplicateClass+",."+e.slideClass+"."+e.slideBlankClass).remove(),t.removeAttr("data-swiper-slide-index")}var loop={loopCreate:loopCreate,loopFix:loopFix,loopDestroy:loopDestroy};function setGrabCursor(e){if(!(Support.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}}function unsetGrabCursor(){Support.touch||this.params.watchOverflow&&this.isLocked||(this.el.style.cursor="")}var grabCursor={setGrabCursor:setGrabCursor,unsetGrabCursor:unsetGrabCursor};function appendSlide(e){var t=this.$wrapperEl,i=this.params;if(i.loop&&this.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s<e.length;s+=1)e[s]&&t.append(e[s]);else t.append(e);i.loop&&this.loopCreate(),i.observer&&Support.observer||this.update()}function prependSlide(e){var t=this.params,i=this.$wrapperEl,s=this.activeIndex;t.loop&&this.loopDestroy();var a=s+1;if("object"==typeof e&&"length"in e){for(var r=0;r<e.length;r+=1)e[r]&&i.prepend(e[r]);a=s+e.length}else i.prepend(e);t.loop&&this.loopCreate(),t.observer&&Support.observer||this.update(),this.slideTo(a,0,!1)}function addSlide(e,t){var i=this.$wrapperEl,s=this.params,a=this.activeIndex;s.loop&&(a-=this.loopedSlides,this.loopDestroy(),this.slides=i.children("."+s.slideClass));var r=this.slides.length;if(e<=0)this.prependSlide(t);else if(e>=r)this.appendSlide(t);else{for(var n=a>e?a+1:a,o=[],l=r-1;l>=e;l-=1){var d=this.slides.eq(l);d.remove(),o.unshift(d)}if("object"==typeof t&&"length"in t){for(l=0;l<t.length;l+=1)t[l]&&i.append(t[l]);n=a>e?a+t.length:a}else i.append(t);for(l=0;l<o.length;l+=1)i.append(o[l]);s.loop&&this.loopCreate(),s.observer&&Support.observer||this.update(),this.slideTo(s.loop?n+this.loopedSlides:n,0,!1)}}function removeSlide(e){var t=this.params,i=this.$wrapperEl,s=this.activeIndex;t.loop&&(s-=this.loopedSlides,this.loopDestroy(),this.slides=i.children("."+t.slideClass));var a,r=s;if("object"==typeof e&&"length"in e){for(var n=0;n<e.length;n+=1)this.slides[a=e[n]]&&this.slides.eq(a).remove(),a<r&&(r-=1);r=Math.max(r,0)}else this.slides[a=e]&&this.slides.eq(a).remove(),a<r&&(r-=1),r=Math.max(r,0);t.loop&&this.loopCreate(),t.observer&&Support.observer||this.update(),this.slideTo(t.loop?r+this.loopedSlides:r,0,!1)}function removeAllSlides(){for(var e=[],t=0;t<this.slides.length;t+=1)e.push(t);this.removeSlide(e)}var manipulation={appendSlide:appendSlide,prependSlide:prependSlide,addSlide:addSlide,removeSlide:removeSlide,removeAllSlides:removeAllSlides},Device=function(){var e=win.navigator.userAgent,t={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:win.cordova||win.phonegap,phonegap:win.cordova||win.phonegap},i=e.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),s=e.match(/(Android);?[\s\/]+([\d.]+)?/),a=e.match(/(iPad).*OS\s([\d_]+)/),r=e.match(/(iPod)(.*OS\s([\d_]+))?/),n=!a&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(i&&(t.os="windows",t.osVersion=i[2],t.windows=!0),s&&!i&&(t.os="android",t.osVersion=s[2],t.android=!0,t.androidChrome=e.toLowerCase().indexOf("chrome")>=0),(a||n||r)&&(t.os="ios",t.ios=!0),n&&!r&&(t.osVersion=n[2].replace(/_/g,"."),t.iphone=!0),a&&(t.osVersion=a[2].replace(/_/g,"."),t.ipad=!0),r&&(t.osVersion=r[3]?r[3].replace(/_/g,"."):null,t.iphone=!0),t.ios&&t.osVersion&&e.indexOf("Version/")>=0&&"10"===t.osVersion.split(".")[0]&&(t.osVersion=e.toLowerCase().split("version/")[1].split(" ")[0]),t.desktop=!(t.os||t.android||t.webView),t.webView=(n||a||r)&&e.match(/.*AppleWebKit(?!.*Safari)/i),t.os&&"ios"===t.os){var o=t.osVersion.split("."),l=doc.querySelector('meta[name="viewport"]');t.minimalUi=!t.webView&&(r||n)&&(1*o[0]==7?1*o[1]>=1:1*o[0]>7)&&l&&l.getAttribute("content").indexOf("minimal-ui")>=0}return t.pixelRatio=win.devicePixelRatio||1,t}();function onTouchStart(e){var t=this.touchEventsData,i=this.params,s=this.touches;if(!this.animating||!i.preventInteractionOnTransition){var a=e;if(a.originalEvent&&(a=a.originalEvent),t.isTouchEvent="touchstart"===a.type,(t.isTouchEvent||!("which"in a)||3!==a.which)&&!(!t.isTouchEvent&&"button"in a&&a.button>0||t.isTouched&&t.isMoved))if(i.noSwiping&&$(a.target).closest(i.noSwipingSelector?i.noSwipingSelector:"."+i.noSwipingClass)[0])this.allowClick=!0;else if(!i.swipeHandler||$(a).closest(i.swipeHandler)[0]){s.currentX="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,s.currentY="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY;var r=s.currentX,n=s.currentY,o=i.edgeSwipeThreshold||i.iOSEdgeSwipeThreshold;if(!i.edgeSwipeDetection&&!i.iOSEdgeSwipeDetection||!(r<=o||r>=win.screen.width-o)){if(Utils.extend(t,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=r,s.startY=n,t.touchStartTime=Utils.now(),this.allowClick=!0,this.updateSize(),this.swipeDirection=void 0,i.threshold>0&&(t.allowThresholdMove=!1),"touchstart"!==a.type){var l=!0;$(a.target).is(t.formElements)&&(l=!1),doc.activeElement&&$(doc.activeElement).is(t.formElements)&&doc.activeElement!==a.target&&doc.activeElement.blur(),(i.touchStartForcePreventDefault||l&&this.allowTouchMove&&i.touchStartPreventDefault)&&a.preventDefault()}this.emit("touchStart",a)}}}}function onTouchMove(e){var t=this.touchEventsData,i=this.params,s=this.touches,a=this.rtlTranslate,r=e;if(r.originalEvent&&(r=r.originalEvent),t.isTouched){if(!t.isTouchEvent||"mousemove"!==r.type){var n="touchmove"===r.type?r.targetTouches[0].pageX:r.pageX,o="touchmove"===r.type?r.targetTouches[0].pageY:r.pageY;if(r.preventedByNestedSwiper)return s.startX=n,void(s.startY=o);if(!this.allowTouchMove)return this.allowClick=!1,void(t.isTouched&&(Utils.extend(s,{startX:n,startY:o,currentX:n,currentY:o}),t.touchStartTime=Utils.now()));if(t.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop)if(this.isVertical()){if(o<s.startY&&this.translate<=this.maxTranslate()||o>s.startY&&this.translate>=this.minTranslate())return t.isTouched=!1,void(t.isMoved=!1)}else if(n<s.startX&&this.translate<=this.maxTranslate()||n>s.startX&&this.translate>=this.minTranslate())return;if(t.isTouchEvent&&doc.activeElement&&r.target===doc.activeElement&&$(r.target).is(t.formElements))return t.isMoved=!0,void(this.allowClick=!1);if(t.allowTouchCallbacks&&this.emit("touchMove",r),!(r.targetTouches&&r.targetTouches.length>1)){s.currentX=n,s.currentY=o;var l=s.currentX-s.startX,d=s.currentY-s.startY;if(!(this.params.threshold&&Math.sqrt(Math.pow(l,2)+Math.pow(d,2))<this.params.threshold)){if(void 0===t.isScrolling){var h=void 0;this.isHorizontal()&&s.currentY===s.startY||this.isVertical()&&s.currentX===s.startX?t.isScrolling=!1:l*l+d*d>=25&&(h=180*Math.atan2(Math.abs(d),Math.abs(l))/Math.PI,t.isScrolling=this.isHorizontal()?h>i.touchAngle:90-h>i.touchAngle)}if(t.isScrolling&&this.emit("touchMoveOpposite",r),void 0===t.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(t.startMoving=!0)),t.isScrolling)t.isTouched=!1;else if(t.startMoving){this.allowClick=!1,r.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&r.stopPropagation(),t.isMoved||(i.loop&&this.loopFix(),t.startTranslate=this.getTranslate(),this.setTransition(0),this.animating&&this.$wrapperEl.trigger("webkitTransitionEnd transitionend"),t.allowMomentumBounce=!1,!i.grabCursor||!0!==this.allowSlideNext&&!0!==this.allowSlidePrev||this.setGrabCursor(!0),this.emit("sliderFirstMove",r)),this.emit("sliderMove",r),t.isMoved=!0;var p=this.isHorizontal()?l:d;s.diff=p,p*=i.touchRatio,a&&(p=-p),this.swipeDirection=p>0?"prev":"next",t.currentTranslate=p+t.startTranslate;var u=!0,c=i.resistanceRatio;if(i.touchReleaseOnEdges&&(c=0),p>0&&t.currentTranslate>this.minTranslate()?(u=!1,i.resistance&&(t.currentTranslate=this.minTranslate()-1+Math.pow(-this.minTranslate()+t.startTranslate+p,c))):p<0&&t.currentTranslate<this.maxTranslate()&&(u=!1,i.resistance&&(t.currentTranslate=this.maxTranslate()+1-Math.pow(this.maxTranslate()-t.startTranslate-p,c))),u&&(r.preventedByNestedSwiper=!0),!this.allowSlideNext&&"next"===this.swipeDirection&&t.currentTranslate<t.startTranslate&&(t.currentTranslate=t.startTranslate),!this.allowSlidePrev&&"prev"===this.swipeDirection&&t.currentTranslate>t.startTranslate&&(t.currentTranslate=t.startTranslate),i.threshold>0){if(!(Math.abs(p)>i.threshold||t.allowThresholdMove))return void(t.currentTranslate=t.startTranslate);if(!t.allowThresholdMove)return t.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,t.currentTranslate=t.startTranslate,void(s.diff=this.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}i.followFinger&&((i.freeMode||i.watchSlidesProgress||i.watchSlidesVisibility)&&(this.updateActiveIndex(),this.updateSlidesClasses()),i.freeMode&&(0===t.velocities.length&&t.velocities.push({position:s[this.isHorizontal()?"startX":"startY"],time:t.touchStartTime}),t.velocities.push({position:s[this.isHorizontal()?"currentX":"currentY"],time:Utils.now()})),this.updateProgress(t.currentTranslate),this.setTranslate(t.currentTranslate))}}}}}else t.startMoving&&t.isScrolling&&this.emit("touchMoveOpposite",r)}function onTouchEnd(e){var t=this,i=t.touchEventsData,s=t.params,a=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,d=e;if(d.originalEvent&&(d=d.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",d),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&s.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);s.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var h,p=Utils.now(),u=p-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap",d),u<300&&p-i.lastClickTime>300&&(i.clickTimeout&&clearTimeout(i.clickTimeout),i.clickTimeout=Utils.nextTick(function(){t&&!t.destroyed&&t.emit("click",d)},300)),u<300&&p-i.lastClickTime<300&&(i.clickTimeout&&clearTimeout(i.clickTimeout),t.emit("doubleTap",d))),i.lastClickTime=Utils.now(),Utils.nextTick(function(){t.destroyed||(t.allowClick=!0)}),!i.isTouched||!i.isMoved||!t.swipeDirection||0===a.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,h=s.followFinger?r?t.translate:-t.translate:-i.currentTranslate,s.freeMode){if(h<-t.minTranslate())return void t.slideTo(t.activeIndex);if(h>-t.maxTranslate())return void t.slideTo(t.slides.length<l.length?l.length-1:t.slides.length-1);if(s.freeModeMomentum){if(i.velocities.length>1){var c=i.velocities.pop(),v=i.velocities.pop(),m=c.time-v.time;t.velocity=(c.position-v.position)/m,t.velocity/=2,Math.abs(t.velocity)<s.freeModeMinimumVelocity&&(t.velocity=0),(m>150||Utils.now()-c.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=s.freeModeMomentumVelocityRatio,i.velocities.length=0;var f=1e3*s.freeModeMomentumRatio,g=t.translate+t.velocity*f;r&&(g=-g);var w,b=!1,S=20*Math.abs(t.velocity)*s.freeModeMomentumBounceRatio,T=void 0;if(g<t.maxTranslate())s.freeModeMomentumBounce?(g+t.maxTranslate()<-S&&(g=t.maxTranslate()-S),w=t.maxTranslate(),b=!0,i.allowMomentumBounce=!0):g=t.maxTranslate(),s.loop&&s.centeredSlides&&(T=!0);else if(g>t.minTranslate())s.freeModeMomentumBounce?(g-t.minTranslate()>S&&(g=t.minTranslate()+S),w=t.minTranslate(),b=!0,i.allowMomentumBounce=!0):g=t.minTranslate(),s.loop&&s.centeredSlides&&(T=!0);else if(s.freeModeSticky){for(var x=void 0,E=0;E<l.length;E+=1)if(l[E]>-g){x=E;break}g=-(g=Math.abs(l[x]-g)<Math.abs(l[x-1]-g)||"next"===t.swipeDirection?l[x]:l[x-1])}if(T&&t.once("transitionEnd",function(){t.loopFix()}),0!==t.velocity)f=r?Math.abs((-g-t.translate)/t.velocity):Math.abs((g-t.translate)/t.velocity);else if(s.freeModeSticky)return void t.slideToClosest();s.freeModeMomentumBounce&&b?(t.updateProgress(w),t.setTransition(f),t.setTranslate(g),t.transitionStart(!0,t.swipeDirection),t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&i.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(s.speed),t.setTranslate(w),n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))})):t.velocity?(t.updateProgress(g),t.setTransition(f),t.setTranslate(g),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(g),t.updateActiveIndex(),t.updateSlidesClasses()}else if(s.freeModeSticky)return void t.slideToClosest();(!s.freeModeMomentum||u>=s.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var y=0,C=t.slidesSizesGrid[0],M=0;M<o.length;M+=s.slidesPerGroup)void 0!==o[M+s.slidesPerGroup]?h>=o[M]&&h<o[M+s.slidesPerGroup]&&(y=M,C=o[M+s.slidesPerGroup]-o[M]):h>=o[M]&&(y=M,C=o[o.length-1]-o[o.length-2]);var $=(h-o[y])/C;if(u>s.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo($>=s.longSwipesRatio?y+s.slidesPerGroup:y),"prev"===t.swipeDirection&&t.slideTo($>1-s.longSwipesRatio?y+s.slidesPerGroup:y)}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo(y+s.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(y)}}}function onResize(){var e=this.params,t=this.el;if(!t||0!==t.offsetWidth){e.breakpoints&&this.setBreakpoint();var i=this.allowSlideNext,s=this.allowSlidePrev,a=this.snapGrid;if(this.allowSlideNext=!0,this.allowSlidePrev=!0,this.updateSize(),this.updateSlides(),e.freeMode){var r=Math.min(Math.max(this.translate,this.maxTranslate()),this.minTranslate());this.setTranslate(r),this.updateActiveIndex(),this.updateSlidesClasses(),e.autoHeight&&this.updateAutoHeight()}else this.updateSlidesClasses(),this.slideTo(("auto"===e.slidesPerView||e.slidesPerView>1)&&this.isEnd&&!this.params.centeredSlides?this.slides.length-1:this.activeIndex,0,!1,!0);this.allowSlidePrev=s,this.allowSlideNext=i,this.params.watchOverflow&&a!==this.snapGrid&&this.checkOverflow()}}function onClick(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}function attachEvents(){var e=this.params,t=this.touchEvents,i=this.el,s=this.wrapperEl;this.onTouchStart=onTouchStart.bind(this),this.onTouchMove=onTouchMove.bind(this),this.onTouchEnd=onTouchEnd.bind(this),this.onClick=onClick.bind(this);var a="container"===e.touchEventsTarget?i:s,r=!!e.nested;if(Support.touch||!Support.pointerEvents&&!Support.prefixedPointerEvents){if(Support.touch){var n=!("touchstart"!==t.start||!Support.passiveListener||!e.passiveListeners)&&{passive:!0,capture:!1};a.addEventListener(t.start,this.onTouchStart,n),a.addEventListener(t.move,this.onTouchMove,Support.passiveLis