vue-awesome-picker.js
65.7 KB
!function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define("VueAwesomePicker",[],i):"object"==typeof exports?exports.VueAwesomePicker=i():t.VueAwesomePicker=i()}("undefined"!=typeof self?self:this,function(){return function(t){function i(s){if(e[s])return e[s].exports;var o=e[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}var e={};return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:s})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="dist/",i(i.s=2)}([function(t,i,e){"use strict";function s(t){if(Array.isArray(t)){for(var i=0,e=Array(t.length);i<t.length;i++)e[i]=t[i];return e}return Array.from(t)}var o=e(10),n=e(11),r=e(12);i.a={name:"awesome-picker",props:{data:{type:Array,default:function(){return[]}},anchor:{type:Array,default:function(){return[]}},type:{type:String,default:"normal"},textTitle:{type:String,default:""},textConfirm:{type:String,default:"确定"},textCancel:{type:String,default:"取消"},colorTitle:{type:String,default:"#000000"},colorConfirm:{type:String,default:"#42b983"},colorCancel:{type:String,default:"#999999"},swipeTime:{type:Number,default:1800}},data:function(){return{display:!1,dataChange:!1,pickerData:this._dataGetter(),pickerAnchor:this._anchorGetter(),wheels:[]}},watch:{data:function(){this._setPickerData()}},computed:{proxyData:function(){return this._dataGetter()},proxyAnchor:function(){return this._anchorGetter()},dataType:function(){return Array.isArray(this.proxyData[0])?"normal":"cascade"}},methods:{_dataGetter:function(){var t=null;switch(this.type){case"time":t=n.a;break;case"date":t=r.b;break;case"normal":default:t=this.data}return[].concat(s(t))},_anchorGetter:function(){var t=this,i=[];if(this.anchor.length)i=this.anchor;else switch(this.type){case"date":i=r.a;break;default:i=this.anchor}return i=i.map(function(i,e){return i.index?i.index:i.value?t.pickerData&&t.pickerData[e]&&t.pickerData[e].indexOf(i.value)>-1?t.pickerData[e].indexOf(i.value):0:i}),[].concat(s(i))},show:function(){var t=this;this.display=!0,!this.wheels.length||this.dataChange?("cascade"===this.dataType&&this._updatePickerData(),this.$nextTick(function(){var i=t.$refs.wheelWrapper;t.pickerData.forEach(function(e,s){t._createWheel(i,s).enable()}),t._wheelToAnchor(t.proxyAnchor),t.dataChange&&t._destroyExtraWheels(),t.dataChange=!1})):this.wheels.forEach(function(t){t.enable()})},hide:function(){this.wheels.forEach(function(t){t.disable()}),this.display=!1},_createWheel:function(t,i){var e=this;if(this.wheels[i])this.wheels[i].refresh();else{var s=this.wheels[i]=new o.a(t.children[i],{wheel:{selectedIndex:0,rotate:25},swipeTime:this.swipeTime});this._wheelToAnchor(this.proxyAnchor),s.on("scrollEnd",function(){e._cascadePickerChange(i)})}return this.wheels[i]},_cascadePickerChange:function(t){if("cascade"===this.dataType){var i=this._getCurrentValue()[t].index;i!==this.pickerAnchor[t]&&(this.pickerAnchor.splice(t,1,i),this._updatePickerDataChange(t+1))}},_wheelToAnchor:function(t){this.wheels.forEach(function(i,e){i.wheelTo(t[e]||0)})},_getCurrentValue:function(){var t=this,i=[];return this.wheels.forEach(function(e,s){var o=e.getSelectedIndex();i.push({index:o,value:t.pickerData[s][o]})}),i},_setPickerData:function(){var t=this;this.pickerData=this._dataGetter(),this.pickerAnchor=this._anchorGetter(),this.display?("cascade"==this.dataType&&this._updatePickerData(),this.$nextTick(function(){var i=t.$refs.wheelWrapper;t.pickerData.forEach(function(e,s){t._createWheel(i,s)}),t._destroyExtraWheels(),t._wheelToAnchor(t.proxyAnchor)})):this.dataChange=!0},_destroyExtraWheels:function(){var t=this.pickerData.length;if(t<this.wheels.length){this.wheels.splice(t).forEach(function(t){t.destroy()})}},_updatePickerData:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.pickerAnchor=this._anchorGetter();var e=[].concat(s(this.proxyData)),o=0;for(i=0;e;)o>=i&&function(){var s=[];e.forEach(function(t){s.push(t.value)}),t.pickerData.splice(o,1,s),t.pickerAnchor[o]=0===i?t.pickerAnchor[o]<e.length?t.pickerAnchor[o]||0:0:t._reloadWheel(o,s)}(),e=e.length?e[this.pickerAnchor[o]].children:null,o++;this.pickerData=this.pickerData.slice(0,o)},_updatePickerDataChange:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=[].concat(s(this.proxyData)),o=0;for(i=0;e;)o>=i&&function(){var s=[];e.forEach(function(t){s.push(t.value)}),t.pickerData.splice(o,1,s),t.pickerAnchor[o]=0===i?t.pickerAnchor[o]<e.length?t.pickerAnchor[o]||0:0:t._reloadWheel(o,s)}(),e=e.length?e[this.pickerAnchor[o]].children:null,o++;this.pickerData=this.pickerData.slice(0,o)},_reloadWheel:function(t,i){var e=this,s=this.$refs.wheelWrapper,o=s.children[t].querySelector(".wheel-scroll"),n=!!this.wheels&&this.wheels[t];return o&&n&&(this.$set(this.pickerData,t,i),this.pickerAnchor[t]=0,this.$nextTick(function(){n=e._createWheel(s,t),n.wheelTo(0)})),0},confirm:function(){if(!this.wheels.some(function(t){return t.isInTransition})){var t=this._getCurrentValue();this.$emit("confirm",t),this.hide()}},cancel:function(){this.$emit("cancel"),this.hide()}}}},function(t,i,e){"use strict";i.a=function(t,i){for(var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=[],n=t;n<=i;n++){var r=(e&&n<10?"0"+n:n)+s;o.push(r)}return o}},function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var s=e(3),o={install:function(t){t.component(s.a.name,s.a)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(o),i.default=o},function(t,i,e){"use strict";function s(t){e(4)}var o=e(0),n=e(13),r=e(9),a=s,h=r(o.a,n.a,!1,a,"data-v-220e6364",null);i.a=h.exports},function(t,i,e){var s=e(5);"string"==typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);e(7)("67476e7c",s,!0,{})},function(t,i,e){i=t.exports=e(6)(!1),i.push([t.i,'.fade-enter[data-v-220e6364],.fade-leave-to[data-v-220e6364]{opacity:0}.fade-enter-active[data-v-220e6364],.fade-leave-active[data-v-220e6364]{transition:all .3s ease}.slide-enter[data-v-220e6364],.slide-leave-to[data-v-220e6364]{opacity:.5;transform:translate3d(0,270px,0)}.slide-enter-active[data-v-220e6364],.slide-leave-active[data-v-220e6364]{transition:all .3s ease}.mask[data-v-220e6364]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;background:rgba(0,0,0,.2)}.picker[data-v-220e6364]{position:fixed;left:0;right:0;bottom:0;height:270px;z-index:10000;background:#fff}.picker-title[data-v-220e6364]{position:relative;height:44px;color:#333}.picker-title[data-v-220e6364]:after{content:"";display:block;border-bottom:1px solid #ebebeb;left:0;right:0;transform:scaleY(.5)}.picker-title span[data-v-220e6364]{position:absolute;height:44px;line-height:44px;padding:0 12px;font-size:14px}.picker-title .pt-cancel[data-v-220e6364]{left:0;color:#999}.picker-title .pt-submit[data-v-220e6364]{right:0;color:#42b983}.picker-title h4[data-v-220e6364]{margin:0;font-size:16px;font-weight:400;height:44px;line-height:44px;text-align:center}.picker-panel[data-v-220e6364]{position:relative;height:226px;padding:24px 12px;box-sizing:border-box}.picker-panel .picker-mask-bottom[data-v-220e6364],.picker-panel .picker-mask-top[data-v-220e6364]{position:absolute;left:0;right:0;height:72px;background:#fff;transform:translateZ(0);z-index:1;pointer-events:none}.picker-panel .picker-mask-top[data-v-220e6364]{top:24px;background:linear-gradient(180deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.5))}.picker-panel .picker-mask-top[data-v-220e6364]:after{content:"";display:block;position:absolute;left:0;right:0;bottom:0;border-bottom:1px solid #ebebeb;transform:scaleY(.5)}.picker-panel .picker-mask-bottom[data-v-220e6364]{bottom:24px;background:linear-gradient(0deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.5))}.picker-panel .picker-mask-bottom[data-v-220e6364]:before{content:"";display:block;position:absolute;left:0;right:0;top:0;border-bottom:1px solid #ebebeb;transform:scaleY(.5)}.picker-wheel-wrapper[data-v-220e6364]{display:flex;align-items:stretch;height:100%}.picker-wheel-wrapper .picker-wheel[data-v-220e6364]{flex:1;overflow:hidden}.picker-wheel-wrapper .wheel-scroll[data-v-220e6364]{margin-top:72px}.picker-wheel-wrapper .wheel-scroll .wheel-item[data-v-220e6364]{height:34px;line-height:34px;font-size:17px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333}',""])},function(t,i){function e(t,i){var e=t[1]||"",o=t[3];if(!o)return e;if(i&&"function"==typeof btoa){var n=s(o);return[e].concat(o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"})).concat([n]).join("\n")}return[e].join("\n")}function s(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var i=[];return i.toString=function(){return this.map(function(i){var s=e(i,t);return i[2]?"@media "+i[2]+"{"+s+"}":s}).join("")},i.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var s={},o=0;o<this.length;o++){var n=this[o][0];"number"==typeof n&&(s[n]=!0)}for(o=0;o<t.length;o++){var r=t[o];"number"==typeof r[0]&&s[r[0]]||(e&&!r[2]?r[2]=e:e&&(r[2]="("+r[2]+") and ("+e+")"),i.push(r))}},i}},function(t,i,e){function s(t){for(var i=0;i<t.length;i++){var e=t[i],s=c[e.id];if(s){s.refs++;for(var o=0;o<s.parts.length;o++)s.parts[o](e.parts[o]);for(;o<e.parts.length;o++)s.parts.push(n(e.parts[o]));s.parts.length>e.parts.length&&(s.parts.length=e.parts.length)}else{for(var r=[],o=0;o<e.parts.length;o++)r.push(n(e.parts[o]));c[e.id]={id:e.id,refs:1,parts:r}}}}function o(){var t=document.createElement("style");return t.type="text/css",p.appendChild(t),t}function n(t){var i,e,s=document.querySelector("style["+v+'~="'+t.id+'"]');if(s){if(f)return m;s.parentNode.removeChild(s)}if(y){var n=u++;s=d||(d=o()),i=r.bind(null,s,n,!1),e=r.bind(null,s,n,!0)}else s=o(),i=a.bind(null,s),e=function(){s.parentNode.removeChild(s)};return i(t),function(s){if(s){if(s.css===t.css&&s.media===t.media&&s.sourceMap===t.sourceMap)return;i(t=s)}else e()}}function r(t,i,e,s){var o=e?"":s.css;if(t.styleSheet)t.styleSheet.cssText=x(i,o);else{var n=document.createTextNode(o),r=t.childNodes;r[i]&&t.removeChild(r[i]),r.length?t.insertBefore(n,r[i]):t.appendChild(n)}}function a(t,i){var e=i.css,s=i.media,o=i.sourceMap;if(s&&t.setAttribute("media",s),g.ssrId&&t.setAttribute(v,i.id),o&&(e+="\n/*# sourceURL="+o.sources[0]+" */",e+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}var h="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!h)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var l=e(8),c={},p=h&&(document.head||document.getElementsByTagName("head")[0]),d=null,u=0,f=!1,m=function(){},g=null,v="data-vue-ssr-id",y="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,i,e,o){f=e,g=o||{};var n=l(t,i);return s(n),function(i){for(var e=[],o=0;o<n.length;o++){var r=n[o],a=c[r.id];a.refs--,e.push(a)}i?(n=l(t,i),s(n)):n=[];for(var o=0;o<e.length;o++){var a=e[o];if(0===a.refs){for(var h=0;h<a.parts.length;h++)a.parts[h]();delete c[a.id]}}}};var x=function(){var t=[];return function(i,e){return t[i]=e,t.filter(Boolean).join("\n")}}()},function(t,i){t.exports=function(t,i){for(var e=[],s={},o=0;o<i.length;o++){var n=i[o],r=n[0],a=n[1],h=n[2],l=n[3],c={id:t+":"+o,css:a,media:h,sourceMap:l};s[r]?s[r].parts.push(c):e.push(s[r]={id:r,parts:[c]})}return e}},function(t,i){t.exports=function(t,i,e,s,o,n){var r,a=t=t||{},h=typeof t.default;"object"!==h&&"function"!==h||(r=t,a=t.default);var l="function"==typeof a?a.options:a;i&&(l.render=i.render,l.staticRenderFns=i.staticRenderFns,l._compiled=!0),e&&(l.functional=!0),o&&(l._scopeId=o);var c;if(n?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(n)},l._ssrRegister=c):s&&(c=s),c){var p=l.functional,d=p?l.render:l.beforeCreate;p?(l._injectStyles=c,l.render=function(t,i){return c.call(i),d(t,i)}):l.beforeCreate=d?[].concat(d,c):[c]}return{esModule:r,exports:a,options:l}}},function(t,i,e){"use strict";/*!
* better-normal-scroll v1.15.1
* (c) 2016-2019 ustbhuangyi
* Released under the MIT License.
*/
function s(t,i){for(;i+1<t.length;i++)t[i]=t[i+1];t.pop()}function o(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function n(t){for(var i=arguments.length,e=Array(i>1?i-1:0),s=1;s<i;s++)e[s-1]=arguments[s];for(var o=0;o<e.length;o++){var n=e[o];for(var r in n)t[r]=n[r]}return t}function r(t){return void 0===t||null===t}function a(t,i){return Math.sqrt(t*t+i*i)}function h(t){return!1!==O&&("standard"===O?"transitionEnd"===t?"transitionend":t:O+t.charAt(0).toUpperCase()+t.substr(1))}function l(t,i,e,s){t.addEventListener(i,e,{passive:!1,capture:!!s})}function c(t,i,e,s){t.removeEventListener(i,e,{passive:!1,capture:!!s})}function p(t){for(var i=0,e=0;t;)i-=t.offsetLeft,e-=t.offsetTop,t=t.offsetParent;return{left:i,top:e}}function d(t){var i=t.getBoundingClientRect();return{left:-(i.left+window.pageXOffset),top:-(i.top+window.pageYOffset)}}function u(t){if(t instanceof window.SVGElement){var i=t.getBoundingClientRect();return{top:i.top,left:i.left,width:i.width,height:i.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}function f(t,i){for(var e in i)if(i[e].test(t[e]))return!0;return!1}function m(t,i){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.pageX=t.pageX,e.pageY=t.pageY,t.target.dispatchEvent(e)}function g(t){function i(){r=document.createEvent("Event"),r.initEvent(e,a,h),n(r,o)}var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"click",s=void 0;"mouseup"===t.type||"mousecancel"===t.type?s=t:"touchend"!==t.type&&"touchcancel"!==t.type||(s=t.changedTouches[0]);var o={};s&&(o.screenX=s.screenX||0,o.screenY=s.screenY||0,o.clientX=s.clientX||0,o.clientY=s.clientY||0);var r=void 0,a=!0,h=!0;if("undefined"!=typeof MouseEvent)try{r=new MouseEvent(e,n({bubbles:a,cancelable:h},o))}catch(t){i()}else i();r.forwardedTouchEvent=!0,r._constructed=!0,t.target.dispatchEvent(r)}function v(t){g(t,"dblclick")}function y(t,i){i.firstChild?x(t,i.firstChild):i.appendChild(t)}function x(t,i){i.parentNode.insertBefore(t,i)}function w(t,i){t.removeChild(i)}function b(t,i,e,s,o,n,r,a){var h=t-i,l=Math.abs(h)/e,c=r.deceleration,p=r.itemHeight,d=r.swipeBounceTime,u=r.wheel,f=r.swipeTime,m=f,g=u?4:15,v=t+l/c*(h<0?-1:1);return u&&p&&(v=a._findNearestValidWheel(v).y),v<s?(v=n?Math.max(s-n/4,s-n/g*l):s,m=d):v>o&&(v=n?Math.min(o+n/4,o+n/g*l):o,m=d),{destination:Math.round(v),duration:m}}function _(){}function T(t){console.error("[BScroll warn]: "+t)}function S(t,i){if(!t)throw new Error("[BScroll] "+i)}function k(t){var i=document.createElement("div"),e=document.createElement("div");return i.style.cssText="position:absolute;z-index:9999;pointerEvents:none",e.style.cssText="box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px;",e.className="bscroll-indicator","horizontal"===t?(i.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",e.style.height="100%",i.className="bscroll-horizontal-scrollbar"):(i.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",e.style.width="100%",i.className="bscroll-vertical-scrollbar"),i.style.cssText+=";overflow:hidden",i.appendChild(e),i}function Y(t,i){this.wrapper=i.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=t,this.direction=i.direction,i.fade?(this.visible=0,this.wrapperStyle.opacity="0"):this.visible=1,this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.x=0,this.y=0,i.interactive&&this._addDOMEvents()}function X(t){if(t&&t.classList)return t.classList.contains("tombstone")}function M(t,i){var e=this;this.options=i,S("function"==typeof this.options.createTombstone,"Infinite scroll need createTombstone Function to create tombstone"),S("function"==typeof this.options.fetch,"Infinite scroll need fetch Function to fetch new data."),S("function"==typeof this.options.render,"Infinite scroll need render Function to render each item."),this.firstAttachedItem=0,this.lastAttachedItem=0,this.anchorScrollTop=0,this.anchorItem={index:0,offset:0},this.tombstoneHeight=0,this.tombstoneWidth=0,this.tombstones=[],this.tombstonesAnimationHandlers=[],this.items=[],this.loadedItems=0,this.requestInProgress=!1,this.hasMore=!0,this.scroller=t,this.wrapperEl=this.scroller.wrapper,this.scrollerEl=this.scroller.scroller,this.scroller.on("resize",function(){e.onResize()}),this.scroller.on("destroy",function(){e.destroy()}),this._onResizeHandler=setTimeout(function(){e.onResize(),e.scroller.on("scroll",function(){e.onScroll()})})}function P(t,i){this.wrapper="string"==typeof t?document.querySelector(t):t,this.wrapper||T("Can not resolve the wrapper DOM."),this.scroller=this.wrapper.children[0],this.scroller||T("The wrapper need at least one child element to be scroller."),this.scrollerStyle=this.scroller.style,this._init(i)}var D=function(){function t(t,i){var e=[],s=!0,o=!1,n=void 0;try{for(var r,a=t[Symbol.iterator]();!(s=(r=a.next()).done)&&(e.push(r.value),!i||e.length!==i);s=!0);}catch(t){o=!0,n=t}finally{try{!s&&a.return&&a.return()}finally{if(o)throw n}}return e}return function(i,e){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return t(i,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=function(t){if(Array.isArray(t)){for(var i=0,e=Array(t.length);i<t.length;i++)e[i]=t[i];return e}return Array.from(t)},C="undefined"!=typeof window,A=C&&navigator.userAgent.toLowerCase(),W=A&&/wechatdevtools/.test(A),I=A&&A.indexOf("android")>0,z=C&&document.createElement("div").style,O=function(){if(!C)return!1;var t={standard:"transform",webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform"};for(var i in t)if(void 0!==z[t[i]])return i;return!1}(),H=O&&"standard"!==O?"-"+O.toLowerCase()+"-":"",L=h("transform"),N=h("transition"),R=C&&h("perspective")in z,U=C&&("ontouchstart"in window||W),F=!1!==L,V=C&&N in z,j={transform:L,transition:N,transitionTimingFunction:h("transitionTimingFunction"),transitionDuration:h("transitionDuration"),transitionDelay:h("transitionDelay"),transformOrigin:h("transformOrigin"),transitionEnd:h("transitionEnd")},B=1,q={touchstart:B,touchmove:B,touchend:B,mousedown:2,mousemove:2,mouseup:2},$={startX:0,startY:0,scrollX:!1,scrollY:!0,freeScroll:!1,directionLockThreshold:5,eventPassthrough:"",click:!1,tap:!1,bounce:!0,bounceTime:800,momentum:!0,momentumLimitTime:300,momentumLimitDistance:15,swipeTime:2500,swipeBounceTime:500,deceleration:.0015,flickLimitTime:200,flickLimitDistance:100,resizePolling:60,probeType:0,preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:!1,disableMouse:U,disableTouch:!U,observeDOM:!0,autoBlur:!0,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1,mouseWheel:!1,stopPropagation:!1,zoom:!1,infinity:!1,dblclick:!1},G={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(t){return 1+--t*t*t*t*t}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(t){return 1- --t*t*t*t}}},Z=function(){return C?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}:_}(),J=function(){return C?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:_}(),K=1,Q=-1,tt=1,it=-1,et=1,st=3;Y.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t);break;case"touchmove":case"mousemove":this._move(t);break;case"touchend":case"mouseup":case"touchcancel":case"mousecancel":this._end(t)}},Y.prototype.refresh=function(){this._shouldShow()&&(this.transitionTime(),this._calculate(),this.updatePosition())},Y.prototype.fade=function(t,i){var e=this;if(!i||this.visible){var s=t?250:500;t=t?"1":"0",this.wrapperStyle[j.transitionDuration]=s+"ms",clearTimeout(this.fadeTimeout),this.fadeTimeout=setTimeout(function(){e.wrapperStyle.opacity=t,e.visible=+t},0)}},Y.prototype.updatePosition=function(){if("vertical"===this.direction){var t=Math.round(this.sizeRatioY*this.scroller.y);if(t<0){this.transitionTime(500);var i=Math.max(this.indicatorHeight+3*t,8);this.indicatorStyle.height=i+"px",t=0}else if(t>this.maxPosY){this.transitionTime(500);var e=Math.max(this.indicatorHeight-3*(t-this.maxPosY),8);this.indicatorStyle.height=e+"px",t=this.maxPosY+this.indicatorHeight-e}else this.indicatorStyle.height=this.indicatorHeight+"px";this.y=t,this.scroller.options.useTransform?this.indicatorStyle[j.transform]="translateY("+t+"px)"+this.scroller.translateZ:this.indicatorStyle.top=t+"px"}else{var s=Math.round(this.sizeRatioX*this.scroller.x);if(s<0){this.transitionTime(500);var o=Math.max(this.indicatorWidth+3*s,8);this.indicatorStyle.width=o+"px",s=0}else if(s>this.maxPosX){this.transitionTime(500);var n=Math.max(this.indicatorWidth-3*(s-this.maxPosX),8);this.indicatorStyle.width=n+"px",s=this.maxPosX+this.indicatorWidth-n}else this.indicatorStyle.width=this.indicatorWidth+"px";this.x=s,this.scroller.options.useTransform?this.indicatorStyle[j.transform]="translateX("+s+"px)"+this.scroller.translateZ:this.indicatorStyle.left=s+"px"}},Y.prototype.transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.indicatorStyle[j.transitionDuration]=t+"ms"},Y.prototype.transitionTimingFunction=function(t){this.indicatorStyle[j.transitionTimingFunction]=t},Y.prototype.destroy=function(){this._removeDOMEvents(),this.wrapper.parentNode.removeChild(this.wrapper)},Y.prototype._start=function(t){var i=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=i.pageX,this.lastPointY=i.pageY,this.startTime=o(),this._handleMoveEvents(l),this.scroller.trigger("beforeScrollStart")},Y.prototype._move=function(t){var i=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.moved||this.scroller.trigger("scrollStart"),this.moved=!0;var e=i.pageX-this.lastPointX;this.lastPointX=i.pageX;var s=i.pageY-this.lastPointY;this.lastPointY=i.pageY;var o=this.x+e,n=this.y+s;this._pos(o,n)},Y.prototype._end=function(t){if(this.initiated){this.initiated=!1,t.preventDefault(),t.stopPropagation(),this._handleMoveEvents(c);var i=this.scroller.options.snap;if(i){var e=i.speed,s=i.easing,o=void 0===s?G.bounce:s,n=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),r=e||Math.max(Math.max(Math.min(Math.abs(this.scroller.x-n.x),1e3),Math.min(Math.abs(this.scroller.y-n.y),1e3)),300);this.scroller.x===n.x&&this.scroller.y===n.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=n,this.scroller.scrollTo(n.x,n.y,r,o))}this.moved&&this.scroller.trigger("scrollEnd",{x:this.scroller.x,y:this.scroller.y})}},Y.prototype._pos=function(t,i){t<0?t=0:t>this.maxPosX&&(t=this.maxPosX),i<0?i=0:i>this.maxPosY&&(i=this.maxPosY),t=Math.round(t/this.sizeRatioX),i=Math.round(i/this.sizeRatioY),this.scroller.scrollTo(t,i),this.scroller.trigger("scroll",{x:this.scroller.x,y:this.scroller.y})},Y.prototype._shouldShow=function(){return"vertical"===this.direction&&this.scroller.hasVerticalScroll||"horizontal"===this.direction&&this.scroller.hasHorizontalScroll?(this.wrapper.style.display="",!0):(this.wrapper.style.display="none",!1)},Y.prototype._calculate=function(){if("vertical"===this.direction){var t=this.wrapper.clientHeight;this.indicatorHeight=Math.max(Math.round(t*t/(this.scroller.scrollerHeight||t||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px",this.maxPosY=t-this.indicatorHeight,this.sizeRatioY=this.maxPosY/this.scroller.maxScrollY}else{var i=this.wrapper.clientWidth;this.indicatorWidth=Math.max(Math.round(i*i/(this.scroller.scrollerWidth||i||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px",this.maxPosX=i-this.indicatorWidth,this.sizeRatioX=this.maxPosX/this.scroller.maxScrollX}},Y.prototype._addDOMEvents=function(){var t=l;this._handleDOMEvents(t)},Y.prototype._removeDOMEvents=function(){var t=c;this._handleDOMEvents(t),this._handleMoveEvents(t)},Y.prototype._handleMoveEvents=function(t){this.scroller.options.disableTouch||t(window,"touchmove",this),this.scroller.options.disableMouse||t(window,"mousemove",this)},Y.prototype._handleDOMEvents=function(t){this.scroller.options.disableTouch||(t(this.indicator,"touchstart",this),t(window,"touchend",this)),this.scroller.options.disableMouse||(t(this.indicator,"mousedown",this),t(window,"mouseup",this))};var ot=2e3;M.prototype.destroy=function(){var t=this;clearTimeout(this._onResizeHandler),this.tombstonesAnimationHandlers.forEach(function(t){clearTimeout(t)}),this.tombstonesAnimationHandlers=null,this.items.forEach(function(i){i.node&&(t.scrollerEl.removeChild(i.node),i.node=null)}),this.scroller.infiniteScroller=null,this.scroller=null,this.wrapperEl=null,this.scrollerEl=null,this.items=null,this.tombstones=null},M.prototype.onScroll=function(){var t=-this.scroller.y,i=t-this.anchorScrollTop;this.anchorItem=0===t?{index:0,offset:0}:this._calculateAnchoredItem(this.anchorItem,i),this.anchorScrollTop=t;var e=this._calculateAnchoredItem(this.anchorItem,this.scroller.wrapperHeight),s=this.anchorItem.index,o=e.index;i<0?(s-=30,o+=10):(s-=10,o+=30),this.fill(s,o),this.maybeRequestContent()},M.prototype.onResize=function(){var t=this.options.createTombstone();t.style.position="absolute",this.scrollerEl.appendChild(t),t.style.display="",this.tombstoneHeight=t.offsetHeight,this.tombstoneWidth=t.offsetWidth,this.scrollerEl.removeChild(t);for(var i=0;i<this.items.length;i++)this.items[i].height=this.items[i].width=0;this.onScroll()},M.prototype.fill=function(t,i){this.firstAttachedItem=Math.max(0,t),this.hasMore||(i=Math.min(i,this.items.length)),this.lastAttachedItem=i,this.attachContent()},M.prototype.maybeRequestContent=function(){var t=this;if(!this.requestInProgress&&this.hasMore){var i=this.lastAttachedItem-this.loadedItems;i<=0||(this.requestInProgress=!0,this.options.fetch(i).then(function(i){if(t.requestInProgress=!1,i)t.addContent(i);else{t.hasMore=!1;var e=t._removeTombstones(),s=0;t.anchorItem.index<=t.items.length?(s=t._fixScrollPosition(),t._setupAnimations({},s),t.scroller.resetPosition(t.scroller.options.bounceTime)):(t.anchorItem.index-=e,s=t._fixScrollPosition(),t._setupAnimations({},s),t.scroller.stop(),t.scroller.resetPosition(),t.onScroll())}}))}},M.prototype.addContent=function(t){for(var i=0;i<t.length;i++)this.items.length<=this.loadedItems&&this._addItem(),this.items[this.loadedItems++].data=t[i];this.attachContent(),this.maybeRequestContent()},M.prototype.attachContent=function(){var t=this._collectUnusedNodes(),i=this._createDOMNodes(t);this._cleanupUnusedNodes(t),this._cacheNodeSize();var e=this._fixScrollPosition();this._setupAnimations(i,e)},M.prototype.resetMore=function(){this.hasMore=!0},M.prototype._removeTombstones=function(){for(var t=void 0,i=0,e=this.items.length,s=0;s<e;s++){var o=this.items[s].node,n=this.items[s].data;o&&!X(o)||n||(void 0===t&&(t=s),o&&this.scrollerEl.removeChild(o))}return i=e-t,this.items.splice(t),this.lastAttachedItem=Math.min(this.lastAttachedItem,this.items.length),i},M.prototype._collectUnusedNodes=function(){for(var t=[],i=0;i<this.items.length;i++)if(i!==this.firstAttachedItem){var e=this.items[i].node;e&&(X(e)?(this.tombstones.push(e),this.tombstones[this.tombstones.length-1].style.display="none"):t.push(e)),this.items[i].node=null}else i=this.lastAttachedItem-1;return t},M.prototype._createDOMNodes=function(t){for(var i={},e=this.firstAttachedItem;e<this.lastAttachedItem;e++){for(;this.items.length<=e;)this._addItem();var s=this.items[e].node,o=this.items[e].data;if(s){if(!X(s)||!o)continue;s.style.zIndex=1,i[e]=[s,this.items[e].top-this.anchorScrollTop],this.items[e].node=null}var n=o?this.options.render(o,t.pop()):this._getTombStone();n.style.position="absolute",this.items[e].top=-1,this.scrollerEl.appendChild(n),this.items[e].node=n}return i},M.prototype._cleanupUnusedNodes=function(t){for(;t.length;)this.scrollerEl.removeChild(t.pop())},M.prototype._cacheNodeSize=function(){for(var t=this.firstAttachedItem;t<this.lastAttachedItem;t++){var i=this.items[t];if(i.data&&!i.height){var e=X(i.node);i.height=e?this.tombstoneHeight:i.node.offsetHeight,i.width=e?this.tombstoneWidth:i.node.offsetWidth}}},M.prototype._fixScrollPosition=function(){this.anchorScrollTop=0;for(var t=0;t<this.anchorItem.index;t++)this.anchorScrollTop+=this.items[t].height||this.tombstoneHeight;this.anchorScrollTop+=this.anchorItem.offset;for(var i=this.anchorScrollTop-this.anchorItem.offset,e=this.anchorItem.index;e>this.firstAttachedItem;)i-=this.items[e-1].height||this.tombstoneHeight,e--;return i},M.prototype._setupAnimations=function(t,i){var e=this;for(var s in t){var o=t[s];this.items[s].node.style[j.transform]="translateY("+(this.anchorScrollTop+o[1])+"px) scale("+this.tombstoneWidth/this.items[s].width+", "+this.tombstoneHeight/this.items[s].height+")",this.items[s].node.offsetTop,o[0].offsetTop,this.items[s].node.style[j.transition]=H+"transform 200ms"}for(var n=this.firstAttachedItem;n<this.lastAttachedItem;n++){var r=t[n];if(r){var a=r[0];a.style[j.transition]=H+"transform 200ms, opacity 200ms",a.style[j.transform]="translateY("+i+"px) scale("+this.items[n].width/this.tombstoneWidth+", "+this.items[n].height/this.tombstoneHeight+")",a.style.opacity=0}i!==this.items[n].top&&(r||(this.items[n].node.style[j.transition]=""),this.items[n].node.style[j.transform]="translateY("+i+"px)"),this.items[n].top=i,i+=this.items[n].height||this.tombstoneHeight}this.scroller.maxScrollY=-(i-this.scroller.wrapperHeight+(this.hasMore?ot:0));var h=setTimeout(function(){for(var i in t){var s=t[i];s[0].style.display="none",e.tombstones.push(s[0])}},200);this.tombstonesAnimationHandlers.push(h)},M.prototype._getTombStone=function(){var t=this.tombstones.pop();return t?(t.style.display="",t.style.opacity=1,t.style[j.transform]="",t.style[j.transition]="",t):this.options.createTombstone()},M.prototype._addItem=function(){this.items.push({data:null,node:null,height:0,width:0,top:0})},M.prototype._calculateAnchoredItem=function(t,i){if(0===i)return t;var e=t.index,s=0;if((i+=t.offset)<0){for(;i<0&&e>0&&this.items[e-1].height;)i+=this.items[e-1].height,e--;s=Math.max(-e,Math.ceil(Math.min(i,0)/this.tombstoneHeight))}else{for(;i>0&&e<this.items.length&&this.items[e].height&&this.items[e].height<i;)i-=this.items[e].height,e++;(e>=this.items.length||!this.items[e].height)&&(s=Math.floor(Math.max(i,0)/this.tombstoneHeight))}return e+=s,i-=s*this.tombstoneHeight,{index:e,offset:i}},function(t){t.prototype._init=function(t){this._handleOptions(t),this._events={},this.x=0,this.y=0,this.directionX=0,this.directionY=0,this.setScale(1),this._addDOMEvents(),this._initExtFeatures(),this._watchTransition(),this.options.observeDOM&&this._initDOMObserver(),this.options.autoBlur&&this._handleAutoBlur(),this.refresh(),this.options.snap||this.scrollTo(this.options.startX,this.options.startY),this.enable()},t.prototype.setScale=function(t){this.lastScale=r(this.scale)?t:this.scale,this.scale=t},t.prototype._handleOptions=function(t){this.options=n({},$,t),this.translateZ=this.options.HWCompositing&&R?" translateZ(0)":"",this.options.useTransition=this.options.useTransition&&V,this.options.useTransform=this.options.useTransform&&F,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollX="horizontal"!==this.options.eventPassthrough&&this.options.scrollX,this.options.scrollY="vertical"!==this.options.eventPassthrough&&this.options.scrollY,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,!0===this.options.tap&&(this.options.tap="tap")},t.prototype._addDOMEvents=function(){var t=l;this._handleDOMEvents(t)},t.prototype._removeDOMEvents=function(){var t=c;this._handleDOMEvents(t)},t.prototype._handleDOMEvents=function(t){var i=this.options.bindToWrapper?this.wrapper:window;t(window,"orientationchange",this),t(window,"resize",this),this.options.click&&t(this.wrapper,"click",this,!0),this.options.disableMouse||(t(this.wrapper,"mousedown",this),t(i,"mousemove",this),t(i,"mousecancel",this),t(i,"mouseup",this)),U&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(i,"touchmove",this),t(i,"touchcancel",this),t(i,"touchend",this)),t(this.scroller,j.transitionEnd,this)},t.prototype._initExtFeatures=function(){this.options.snap&&this._initSnap(),this.options.scrollbar&&this._initScrollbar(),this.options.pullUpLoad&&this._initPullUp(),this.options.pullDownRefresh&&this._initPullDown(),this.options.wheel&&this._initWheel(),this.options.mouseWheel&&this._initMouseWheel(),this.options.zoom&&this._initZoom(),this.options.infinity&&this._initInfinite()},t.prototype._watchTransition=function(){if("function"==typeof Object.defineProperty){var t=this,i=!1,e=this.options.useTransition?"isInTransition":"isAnimating";Object.defineProperty(this,e,{get:function(){return i},set:function(e){i=e;for(var s=t.scroller.children.length?t.scroller.children:[t.scroller],o=i&&!t.pulling?"none":"auto",n=0;n<s.length;n++)s[n].style.pointerEvents=o}})}},t.prototype._handleAutoBlur=function(){this.on("scrollStart",function(){var t=document.activeElement;!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName||t.blur()})},t.prototype._initDOMObserver=function(){var t=this;if("undefined"!=typeof MutationObserver){var i=void 0,e=new MutationObserver(function(e){if(!t._shouldNotRefresh()){for(var s=!1,o=!1,n=0;n<e.length;n++){var r=e[n];if("attributes"!==r.type){s=!0;break}if(r.target!==t.scroller){o=!0;break}}s?t.refresh():o&&(clearTimeout(i),i=setTimeout(function(){t._shouldNotRefresh()||t.refresh()},60))}}),s={attributes:!0,childList:!0,subtree:!0};e.observe(this.scroller,s),this.on("destroy",function(){e.disconnect()})}else this._checkDOMUpdate()},t.prototype._shouldNotRefresh=function(){var t=this.x>this.minScrollX||this.x<this.maxScrollX||this.y>this.minScrollY||this.y<this.maxScrollY;return this.isInTransition||this.stopFromTransition||t},t.prototype._checkDOMUpdate=function(){function t(){if(!this.destroyed){e=u(this.scroller);var t=e.width,n=e.height;s===t&&o===n||this.refresh(),s=t,o=n,i.call(this)}}function i(){var i=this;setTimeout(function(){t.call(i)},1e3)}var e=u(this.scroller),s=e.width,o=e.height;i.call(this)},t.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t),this.options.zoom&&t.touches&&t.touches.length>1&&this._zoomStart(t);break;case"touchmove":case"mousemove":this.options.zoom&&t.touches&&t.touches.length>1?this._zoom(t):this._move(t);break;case"touchend":case"mouseup":case"touchcancel":case"mousecancel":this.scaled?this._zoomEnd(t):this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"click":this.enabled&&!t._constructed&&(f(t.target,this.options.preventDefaultException)||(t.preventDefault(),t.stopPropagation()));break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._onMouseWheel(t)}},t.prototype.refresh=function(){var t="static"===window.getComputedStyle(this.wrapper,null).position,i=u(this.wrapper);this.wrapperWidth=i.width,this.wrapperHeight=i.height;var e=u(this.scroller);this.scrollerWidth=Math.round(e.width*this.scale),this.scrollerHeight=Math.round(e.height*this.scale),this.relativeX=e.left,this.relativeY=e.top,t&&(this.relativeX-=i.left,this.relativeY-=i.top),this.minScrollX=0,this.minScrollY=0;var s=this.options.wheel;s?(this.items=this.scroller.children,this._checkWheelAllDisabled(),this.options.itemHeight=this.itemHeight=this.items.length?this.scrollerHeight/this.items.length:0,void 0===this.selectedIndex&&(this.selectedIndex=s.selectedIndex||0),this.options.startY=-this.selectedIndex*this.itemHeight,this.maxScrollX=0,this.maxScrollY=-this.itemHeight*(this.items.length-1)):(this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.options.infinity||(this.maxScrollY=this.wrapperHeight-this.scrollerHeight),this.maxScrollX<0?(this.maxScrollX-=this.relativeX,this.minScrollX=-this.relativeX):this.scale>1&&(this.maxScrollX=this.maxScrollX/2-this.relativeX,this.minScrollX=this.maxScrollX),this.maxScrollY<0?(this.maxScrollY-=this.relativeY,this.minScrollY=-this.relativeY):this.scale>1&&(this.maxScrollY=this.maxScrollY/2-this.relativeY,this.minScrollY=this.maxScrollY)),this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<this.minScrollX,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<this.minScrollY,this.hasHorizontalScroll||(this.maxScrollX=this.minScrollX,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=this.minScrollY,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=p(this.wrapper),this.trigger("refresh"),!this.scaled&&this.resetPosition()},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1}}(P),function(t){t.prototype._start=function(t){var i=q[t.type];if((i===B||0===t.button)&&!(!this.enabled||this.destroyed||this.initiated&&this.initiated!==i)){this.initiated=i,this.options.preventDefault&&!f(t.target,this.options.preventDefaultException)&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation(),this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.movingDirectionX=0,this.movingDirectionY=0,this.directionLocked=0,this._transitionTime(),this.startTime=o(),this.options.wheel&&(this.target=t.target),this.stop();var e=t.touches?t.touches[0]:t;this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=e.pageX,this.pointY=e.pageY,this.trigger("beforeScrollStart")}},t.prototype._move=function(t){if(this.enabled&&!this.destroyed&&q[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation();var i=t.touches?t.touches[0]:t,e=i.pageX-this.pointX,s=i.pageY-this.pointY;this.pointX=i.pageX,this.pointY=i.pageY,this.distX+=e,this.distY+=s;var n=Math.abs(this.distX),r=Math.abs(this.distY),a=o();if(!(a-this.endTime>this.options.momentumLimitTime&&!this.moved&&r<this.options.momentumLimitDistance&&n<this.options.momentumLimitDistance)){if(this.directionLocked||this.options.freeScroll||(n>r+this.options.directionLockThreshold?this.directionLocked="h":r>=n+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"===this.directionLocked){if("vertical"===this.options.eventPassthrough)t.preventDefault();else if("horizontal"===this.options.eventPassthrough)return void(this.initiated=!1);s=0}else if("v"===this.directionLocked){if("horizontal"===this.options.eventPassthrough)t.preventDefault();else if("vertical"===this.options.eventPassthrough)return void(this.initiated=!1);e=0}e=this.hasHorizontalScroll?e:0,s=this.hasVerticalScroll?s:0,this.movingDirectionX=e>0?it:e<0?tt:0,this.movingDirectionY=s>0?Q:s<0?K:0;var h=this.x+e,l=this.y+s,c=!1,p=!1,d=!1,u=!1,f=this.options.bounce;!1!==f&&(c=void 0===f.top||f.top,p=void 0===f.bottom||f.bottom,d=void 0===f.left||f.left,u=void 0===f.right||f.right),(h>this.minScrollX||h<this.maxScrollX)&&(h=h>this.minScrollX&&d||h<this.maxScrollX&&u?this.x+e/3:h>this.minScrollX?this.minScrollX:this.maxScrollX),(l>this.minScrollY||l<this.maxScrollY)&&(l=l>this.minScrollY&&c||l<this.maxScrollY&&p?this.y+s/3:l>this.minScrollY?this.minScrollY:this.maxScrollY),this.moved||(this.moved=!0,this.trigger("scrollStart")),this._translate(h,l),a-this.startTime>this.options.momentumLimitTime&&(this.startTime=a,this.startX=this.x,this.startY=this.y,this.options.probeType===et&&this.trigger("scroll",{x:this.x,y:this.y})),this.options.probeType>et&&this.trigger("scroll",{x:this.x,y:this.y});var m=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,g=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,v=this.pointX-m,y=this.pointY-g;(v>document.documentElement.clientWidth-this.options.momentumLimitDistance||v<this.options.momentumLimitDistance||y<this.options.momentumLimitDistance||y>document.documentElement.clientHeight-this.options.momentumLimitDistance)&&this._end(t)}}},t.prototype._end=function(t){if(this.enabled&&!this.destroyed&&q[t.type]===this.initiated){this.initiated=!1,this.options.preventDefault&&!f(t.target,this.options.preventDefaultException)&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation(),this.trigger("touchEnd",{x:this.x,y:this.y}),this.isInTransition=!1;var i=Math.round(this.x),e=Math.round(this.y),s=i-this.absStartX,n=e-this.absStartY;if(this.directionX=s>0?it:s<0?tt:0,this.directionY=n>0?Q:n<0?K:0,!this.options.pullDownRefresh||!this._checkPullDown()){if(this._checkClick(t))return void this.trigger("scrollCancel");if(!this.resetPosition(this.options.bounceTime,G.bounce)){this._translate(i,e),this.endTime=o();var r=this.endTime-this.startTime,a=Math.abs(i-this.startX),h=Math.abs(e-this.startY);if(this._events.flick&&r<this.options.flickLimitTime&&a<this.options.flickLimitDistance&&h<this.options.flickLimitDistance)return void this.trigger("flick");var l=0;if(this.options.momentum&&r<this.options.momentumLimitTime&&(h>this.options.momentumLimitDistance||a>this.options.momentumLimitDistance)){var c=!1,p=!1,d=!1,u=!1,m=this.options.bounce;!1!==m&&(c=void 0===m.top||m.top,p=void 0===m.bottom||m.bottom,d=void 0===m.left||m.left,u=void 0===m.right||m.right);var g=this.directionX===it&&d||this.directionX===tt&&u?this.wrapperWidth:0,v=this.directionY===Q&&c||this.directionY===K&&p?this.wrapperHeight:0,y=this.hasHorizontalScroll?b(this.x,this.startX,r,this.maxScrollX,this.minScrollX,g,this.options,this):{destination:i,duration:0},x=this.hasVerticalScroll?b(this.y,this.startY,r,this.maxScrollY,this.minScrollY,v,this.options,this):{destination:e,duration:0};i=y.destination,e=x.destination,l=Math.max(y.duration,x.duration),this.isInTransition=!0}else this.options.wheel&&(e=this._findNearestValidWheel(e).y,l=this.options.wheel.adjustTime||400);var w=G.swipe;if(this.options.snap){var _=this._nearestSnap(i,e);this.currentPage=_,l=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(i-_.x),1e3),Math.min(Math.abs(e-_.y),1e3)),300),i=_.x,e=_.y,this.directionX=0,this.directionY=0,w=this.options.snap.easing||G.bounce}if(i!==this.x||e!==this.y)return(i>this.minScrollX||i<this.maxScrollX||e>this.minScrollY||e<this.maxScrollY)&&(w=G.swipeBounce),void this.scrollTo(i,e,l,w);this.options.wheel&&(this.selectedIndex=this._findNearestValidWheel(this.y).index),this.trigger("scrollEnd",{x:this.x,y:this.y})}}}},t.prototype._checkClick=function(t){var i=this.stopFromTransition&&!this.pulling;if(this.stopFromTransition=!1,!this.moved){if(this.options.wheel){if(this.target&&this.target.className===this.options.wheel.wheelWrapperClass){var e=this._findNearestValidWheel(this.y).index,s=Math.round((this.pointY+d(this.wrapper).top-this.wrapperHeight/2)/this.itemHeight);this.target=this.items[e+s]}var n=p(this.target).top,r=p(this.target).left;return n-=this.wrapperOffset.top,n-=Math.round(this.target.offsetHeight/2-this.wrapper.offsetHeight/2)||0,r-=this.wrapperOffset.left,r-=Math.round(this.target.offsetWidth/2-this.wrapper.offsetWidth/2)||0,n=this._findNearestValidWheel(n).y,this.scrollTo(r,n,this.options.wheel.adjustTime||400,G.swipe),!0}if(!i){var a=this.options.dblclick,h=!1;if(a&&this.lastClickTime){var l=a.delay,c=void 0===l?300:l;o()-this.lastClickTime<c&&(h=!0,v(t))}return this.options.tap&&m(t,this.options.tap),this.options.click&&!f(t.target,this.options.preventDefaultException)&&g(t),this.lastClickTime=h?null:o(),!0}return!1}return!1},t.prototype._resize=function(){var t=this;this.enabled&&(I&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling))},t.prototype._startProbe=function(){function t(){var e=i.getComputedPosition();if(i.trigger("scroll",e),!i.isInTransition)return void i.trigger("scrollEnd",e);i.probeTimer=Z(t)}J(this.probeTimer),this.probeTimer=Z(t);var i=this},t.prototype._transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.scrollerStyle[j.transitionDuration]=t+"ms",this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[j.transitionDuration]=t+"ms";if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTime(t)},t.prototype._transitionTimingFunction=function(t){if(this.scrollerStyle[j.transitionTimingFunction]=t,this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[j.transitionTimingFunction]=t;if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTimingFunction(t)},t.prototype._transitionEnd=function(t){t.target===this.scroller&&this.isInTransition&&(this._transitionTime(),(!this.pulling||this.movingDirectionY===K)&&!this.resetPosition(this.options.bounceTime,G.bounce)&&(this.isInTransition=!1,this.options.probeType!==st&&this.trigger("scrollEnd",{x:this.x,y:this.y})))},t.prototype._translate=function(t,i,e){if(S(!r(t)&&!r(i),"Translate x or y is null or undefined."),r(e)&&(e=this.scale),this.options.useTransform?this.scrollerStyle[j.transform]="translate("+t+"px,"+i+"px) scale("+e+")"+this.translateZ:(t=Math.round(t),i=Math.round(i),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=i+"px"),this.options.wheel)for(var s=this.options.wheel.rotate,o=void 0===s?25:s,n=0;n<this.items.length;n++){var a=o*(i/this.itemHeight+n);this.items[n].style[j.transform]="rotateX("+a+"deg)"}if(this.x=t,this.y=i,this.setScale(e),this.indicators)for(var h=0;h<this.indicators.length;h++)this.indicators[h].updatePosition()},t.prototype._animate=function(t,i,e,s){function n(){var u=o();if(u>=d)return r.isAnimating=!1,r._translate(t,i,c),r.trigger("scroll",{x:r.x,y:r.y}),void(r.pulling||r.resetPosition(r.options.bounceTime)||r.trigger("scrollEnd",{x:r.x,y:r.y}));u=(u-p)/e;var f=s(u),m=(t-a)*f+a,g=(i-h)*f+h,v=(c-l)*f+l;r._translate(m,g,v),r.isAnimating&&(r.animateTimer=Z(n)),r.options.probeType===st&&r.trigger("scroll",{x:r.x,y:r.y})}var r=this,a=this.x,h=this.y,l=this.lastScale,c=this.scale,p=o(),d=p+e;this.isAnimating=!0,J(this.animateTimer),n()},t.prototype.scrollBy=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:G.bounce;t=this.x+t,i=this.y+i,this.scrollTo(t,i,e,s)},t.prototype.scrollTo=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:G.bounce,o=arguments[4];if(this.options.wheel&&(i=this._findNearestValidWheel(i).y),this.isInTransition=this.options.useTransition&&e>0&&(this.x!==t||this.y!==i),!e||this.options.useTransition){if(this._transitionTimingFunction(s.style),this._transitionTime(e),this._translate(t,i),e&&this.options.probeType===st&&this._startProbe(),!e&&!o){if(this.options.zoom)return;this.trigger("scroll",{x:t,y:i}),this._reflow=document.body.offsetHeight,this.resetPosition(this.options.bounceTime,G.bounce)||this.trigger("scrollEnd",{x:t,y:i})}this.options.wheel&&(this.selectedIndex=this._findNearestValidWheel(i).index)}else this._animate(t,i,e,s.fn)},t.prototype.scrollToElement=function(t,i,e,s,o){if(t&&(t=t.nodeType?t:this.scroller.querySelector(t),!this.options.wheel||t.classList.contains(this.options.wheel.wheelItemClass))){var n=p(t);n.left-=this.wrapperOffset.left,n.top-=this.wrapperOffset.top,!0===e&&(e=Math.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===s&&(s=Math.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),n.left-=e||0,n.top-=s||0,n.left=n.left>this.minScrollX?this.minScrollX:n.left<this.maxScrollX?this.maxScrollX:n.left,n.top=n.top>this.minScrollY?this.minScrollY:n.top<this.maxScrollY?this.maxScrollY:n.top,this.options.wheel&&(n.top=this._findNearestValidWheel(n.top).y),this.scrollTo(n.left,n.top,i,o)}},t.prototype.resetPosition=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G.bounce,e=this.x,s=Math.round(e);!this.hasHorizontalScroll||s>this.minScrollX?e=this.minScrollX:s<this.maxScrollX&&(e=this.maxScrollX);var o=this.y,n=Math.round(o);return!this.hasVerticalScroll||n>this.minScrollY?o=this.minScrollY:n<this.maxScrollY&&(o=this.maxScrollY),(e!==this.x||o!==this.y)&&(this.scrollTo(e,o,t,i),!0)},t.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.scroller,null),i=void 0,e=void 0;return this.options.useTransform?(t=t[j.transform].split(")")[0].split(", "),i=+(t[12]||t[4]),e=+(t[13]||t[5])):(i=+t.left.replace(/[^-\d.]/g,""),e=+t.top.replace(/[^-\d.]/g,"")),{x:i,y:e}},t.prototype.stop=function(){if(this.options.useTransition&&this.isInTransition){this.isInTransition=!1,J(this.probeTimer);var t=this.getComputedPosition();this._translate(t.x,t.y),this.options.wheel?this.target=this.items[this._findNearestValidWheel(t.y).index]:this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0}else!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,J(this.animateTimer),this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0)},t.prototype.destroy=function(){this.destroyed=!0,this.trigger("destroy"),J(this.options.useTransition?this.probeTimer:this.animateTimer),this._removeDOMEvents(),this._events={}}}(P),function(t){t.prototype.on=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this._events[t]||(this._events[t]=[]),this._events[t].push([i,e])},t.prototype.once=function(t,i){function e(){this.off(t,e),i.apply(s,arguments)}var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;e.fn=i,this.on(t,e)},t.prototype.off=function(t,i){var e=this._events[t];if(e)for(var o=e.length;o--;)(e[o][0]===i||e[o][0]&&e[o][0].fn===i)&&s(e,o)},t.prototype.trigger=function(t){var i=this._events[t];if(i)for(var e=i.length,s=[].concat(E(i)),o=0;o<e;o++){var n=s[o],r=D(n,2),a=r[0],h=r[1];a&&a.apply(h,[].slice.call(arguments,1))}}}(P),function(t){t.prototype._initSnap=function(){var t=this;this.currentPage={};var i=this.options.snap;if(i.loop){var e=this.scroller.children;e.length>1?(y(e[e.length-1].cloneNode(!0),this.scroller),this.scroller.appendChild(e[1].cloneNode(!0))):i.loop=!1}var s=i.el;"string"==typeof s&&(s=this.scroller.querySelectorAll(s)),this.on("refresh",function(){if(t.pages=[],t.wrapperWidth&&t.wrapperHeight&&t.scrollerWidth&&t.scrollerHeight){var e=i.stepX||t.wrapperWidth,o=i.stepY||t.wrapperHeight,n=0,r=void 0,a=void 0,h=void 0,l=0,c=void 0,p=0,d=void 0,f=void 0;if(s)for(c=s.length,d=-1;l<c;l++)f=u(s[l]),(0===l||f.left<=u(s[l-1]).left)&&(p=0,d++),t.pages[p]||(t.pages[p]=[]),n=Math.max(-f.left,t.maxScrollX),r=Math.max(-f.top,t.maxScrollY),a=n-Math.round(f.width/2),h=r-Math.round(f.height/2),t.pages[p][d]={x:n,y:r,width:f.width,height:f.height,cx:a,cy:h},n>t.maxScrollX&&p++;else for(a=Math.round(e/2),h=Math.round(o/2);n>-t.scrollerWidth;){for(t.pages[l]=[],c=0,r=0;r>-t.scrollerHeight;)t.pages[l][c]={x:Math.max(n,t.maxScrollX),y:Math.max(r,t.maxScrollY),width:e,height:o,cx:n-a,cy:r-h},r-=o,c++;n-=e,l++}t._checkSnapLoop();var m=i._loopX?1:0,g=i._loopY?1:0;t._goToPage(t.currentPage.pageX||m,t.currentPage.pageY||g,0,void 0,!0);var v=i.threshold;v%1==0?(t.snapThresholdX=v,t.snapThresholdY=v):(t.snapThresholdX=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].width*v),t.snapThresholdY=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].height*v))}}),this.on("scrollEnd",function(){i.loop&&(i._loopX?(0===t.currentPage.pageX&&t._goToPage(t.pages.length-2,t.currentPage.pageY,0,void 0,!0),t.currentPage.pageX===t.pages.length-1&&t._goToPage(1,t.currentPage.pageY,0,void 0,!0)):(0===t.currentPage.pageY&&t._goToPage(t.currentPage.pageX,t.pages[0].length-2,0,void 0,!0),t.currentPage.pageY===t.pages[0].length-1&&t._goToPage(t.currentPage.pageX,1,0,void 0,!0)))}),!1!==i.listenFlick&&this.on("flick",function(){var e=i.speed||Math.max(Math.max(Math.min(Math.abs(t.x-t.startX),1e3),Math.min(Math.abs(t.y-t.startY),1e3)),300);t._goToPage(t.currentPage.pageX+t.directionX,t.currentPage.pageY+t.directionY,e)}),this.on("destroy",function(){if(i.loop){var e=t.scroller.children;e.length>2&&(w(t.scroller,e[e.length-1]),w(t.scroller,e[0]))}})},t.prototype._checkSnapLoop=function(){var t=this.options.snap;t.loop&&this.pages&&this.pages.length&&(this.pages.length>1&&(t._loopX=!0),this.pages[0]&&this.pages[0].length>1&&(t._loopY=!0),t._loopX&&t._loopY&&T("Loop does not support two direction at the same time."))},t.prototype._nearestSnap=function(t,i){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var e=0;if(Math.abs(t-this.absStartX)<=this.snapThresholdX&&Math.abs(i-this.absStartY)<=this.snapThresholdY)return this.currentPage;t>this.minScrollX?t=this.minScrollX:t<this.maxScrollX&&(t=this.maxScrollX),i>this.minScrollY?i=this.minScrollY:i<this.maxScrollY&&(i=this.maxScrollY);for(var s=this.pages.length;e<s;e++)if(t>=this.pages[e][0].cx){t=this.pages[e][0].x;break}s=this.pages[e].length;for(var o=0;o<s;o++)if(i>=this.pages[0][o].cy){i=this.pages[0][o].y;break}return e===this.currentPage.pageX&&(e+=this.directionX,e<0?e=0:e>=this.pages.length&&(e=this.pages.length-1),t=this.pages[e][0].x),o===this.currentPage.pageY&&(o+=this.directionY,o<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),i=this.pages[0][o].y),{x:t,y:i,pageX:e,pageY:o}},t.prototype._goToPage=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments[2],s=arguments[3],o=arguments[4],n=this.options.snap;if(n&&this.pages&&this.pages.length&&(s=s||n.easing||G.bounce,t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),this.pages[t])){i>=this.pages[t].length?i=this.pages[t].length-1:i<0&&(i=0);var r=this.pages[t][i].x,a=this.pages[t][i].y;e=void 0===e?n.speed||Math.max(Math.max(Math.min(Math.abs(r-this.x),1e3),Math.min(Math.abs(a-this.y),1e3)),300):e,this.currentPage={x:r,y:a,pageX:t,pageY:i},this.scrollTo(r,a,e,s,o)}},t.prototype.goToPage=function(t,i,e,s){var o=this.options.snap;if(o&&this.pages&&this.pages.length){if(o.loop){var n=void 0;o._loopX?(n=this.pages.length-2,t>=n?t=n-1:t<0&&(t=0),t+=1):(n=this.pages[0].length-2,i>=n?i=n-1:i<0&&(i=0),i+=1)}this._goToPage(t,i,e,s)}},t.prototype.next=function(t,i){if(this.options.snap){var e=this.currentPage.pageX,s=this.currentPage.pageY;e++,e>=this.pages.length&&this.hasVerticalScroll&&(e=0,s++),this._goToPage(e,s,t,i)}},t.prototype.prev=function(t,i){if(this.options.snap){var e=this.currentPage.pageX,s=this.currentPage.pageY;e--,e<0&&this.hasVerticalScroll&&(e=0,s--),this._goToPage(e,s,t,i)}},t.prototype.getCurrentPage=function(){var t=this.options.snap;return t?t.loop?t._loopX?n({},this.currentPage,{pageX:this.currentPage.pageX-1}):n({},this.currentPage,{pageY:this.currentPage.pageY-1}):this.currentPage:null}}(P),function(t){t.prototype.wheelTo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.options.wheel){var i=-t*this.itemHeight;this.scrollTo(0,i)}},t.prototype.getSelectedIndex=function(){return this.options.wheel&&this.selectedIndex},t.prototype._initWheel=function(){var t=this.options.wheel;t.wheelWrapperClass||(t.wheelWrapperClass="wheel-scroll"),t.wheelItemClass||(t.wheelItemClass="wheel-item"),t.wheelDisabledItemClass||(t.wheelDisabledItemClass="wheel-disabled-item"),void 0===t.selectedIndex&&(t.selectedIndex=0)},t.prototype._findNearestValidWheel=function(t){t=t>0?0:t<this.maxScrollY?this.maxScrollY:t;for(var i=this.options.wheel,e=Math.abs(Math.round(-t/this.itemHeight)),s=e,o=this.items;e>=0&&-1!==o[e].className.indexOf(i.wheelDisabledItemClass);)e--;if(e<0)for(e=s;e<=o.length-1&&-1!==o[e].className.indexOf(i.wheelDisabledItemClass);)e++;return e===o.length&&(e=s),{index:this.wheelItemsAllDisabled?-1:e,y:-e*this.itemHeight}},t.prototype._checkWheelAllDisabled=function(){var t=this.options.wheel,i=this.items;this.wheelItemsAllDisabled=!0;for(var e=0;e<i.length;e++)if(-1===i[e].className.indexOf(t.wheelDisabledItemClass)){this.wheelItemsAllDisabled=!1;break}}}(P),function(t){t.prototype._initScrollbar=function(){var t=this,i=this.options.scrollbar,e=i.fade,s=void 0===e||e,o=i.interactive,n=void 0!==o&&o;this.indicators=[];var r=void 0;this.options.scrollX&&(r={el:k("horizontal"),direction:"horizontal",fade:s,interactive:n},this._insertScrollBar(r.el),this.indicators.push(new Y(this,r))),this.options.scrollY&&(r={el:k("vertical"),direction:"vertical",fade:s,interactive:n},this._insertScrollBar(r.el),this.indicators.push(new Y(this,r))),this.on("refresh",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].refresh()}),s&&(this.on("scrollEnd",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade()}),this.on("scrollCancel",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade()}),this.on("scrollStart",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade(!0)}),this.on("beforeScrollStart",function(){for(var i=0;i<t.indicators.length;i++)t.indicators[i].fade(!0,!0)})),this.on("destroy",function(){t._removeScrollBars()})},t.prototype._insertScrollBar=function(t){this.wrapper.appendChild(t)},t.prototype._removeScrollBars=function(){for(var t=0;t<this.indicators.length;t++)this.indicators[t].destroy()}}(P),function(t){t.prototype._initPullDown=function(){this.options.probeType=st},t.prototype._checkPullDown=function(){var t=this.options.pullDownRefresh,i=t.threshold,e=void 0===i?90:i,s=t.stop,o=void 0===s?40:s;return!(this.directionY!==Q||this.y<e)&&(this.pulling||(this.pulling=!0,this.trigger("pullingDown")),this.scrollTo(this.x,o,this.options.bounceTime,G.bounce),this.pulling)},t.prototype.finishPullDown=function(){this.pulling=!1,this.resetPosition(this.options.bounceTime,G.bounce)},t.prototype.openPullDown=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.pullDownRefresh=t,this._initPullDown()},t.prototype.closePullDown=function(){this.options.pullDownRefresh=!1},t.prototype.autoPullDownRefresh=function(){var t=this.options.pullDownRefresh,i=t.threshold,e=void 0===i?90:i,s=t.stop,o=void 0===s?40:s;this.pulling||(this.pulling=!0,this.scrollTo(this.x,e),this.trigger("pullingDown"),this.scrollTo(this.x,o,this.options.bounceTime,G.bounce))}}(P),function(t){t.prototype._initPullUp=function(){this.options.probeType=st,this.pullupWatching=!1,this._watchPullUp()},t.prototype._watchPullUp=function(){this.pullupWatching||(this.pullupWatching=!0,this.on("scroll",this._checkToEnd))},t.prototype._checkToEnd=function(t){var i=this,e=this.options.pullUpLoad.threshold,s=void 0===e?0:e;this.movingDirectionY===K&&t.y<=this.maxScrollY+s&&(this.once("scrollEnd",function(){i.pullupWatching=!1}),this.trigger("pullingUp"),this.off("scroll",this._checkToEnd))},t.prototype.finishPullUp=function(){var t=this;this.pullupWatching?this.once("scrollEnd",function(){t._watchPullUp()}):this._watchPullUp()},t.prototype.openPullUp=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.pullUpLoad=t,this._initPullUp()},t.prototype.closePullUp=function(){this.options.pullUpLoad=!1,this.pullupWatching&&(this.pullupWatching=!1,this.off("scroll",this._checkToEnd))}}(P),function(t){t.prototype._initMouseWheel=function(){var t=this;this._handleMouseWheelEvent(l),this.on("destroy",function(){clearTimeout(t.mouseWheelTimer),clearTimeout(t.mouseWheelEndTimer),t._handleMouseWheelEvent(c)}),this.firstWheelOpreation=!0},t.prototype._handleMouseWheelEvent=function(t){t(this.wrapper,"wheel",this),t(this.wrapper,"mousewheel",this),t(this.wrapper,"DOMMouseScroll",this)},t.prototype._onMouseWheel=function(t){var i=this;if(this.enabled){t.preventDefault(),this.options.stopPropagation&&t.stopPropagation(),this.firstWheelOpreation&&this.trigger("scrollStart"),this.firstWheelOpreation=!1;var e=this.options.mouseWheel,s=e.speed,o=void 0===s?20:s,n=e.invert,r=void 0!==n&&n,a=e.easeTime,h=void 0===a?300:a;clearTimeout(this.mouseWheelTimer),this.mouseWheelTimer=setTimeout(function(){i.options.snap||h||i.trigger("scrollEnd",{x:i.x,y:i.y}),i.firstWheelOpreation=!0},400);var l=void 0,c=void 0;switch(!0){case"deltaX"in t:1===t.deltaMode?(l=-t.deltaX*o,c=-t.deltaY*o):(l=-t.deltaX,c=-t.deltaY);break;case"wheelDeltaX"in t:l=t.wheelDeltaX/120*o,c=t.wheelDeltaY/120*o;break;case"wheelDelta"in t:l=c=t.wheelDelta/120*o;break;case"detail"in t:l=c=-t.detail/3*o;break;default:return}var p=r?-1:1;l*=p,c*=p,this.hasVerticalScroll||(l=c,c=0);var d=void 0,u=void 0;if(this.options.snap)return d=this.currentPage.pageX,u=this.currentPage.pageY,l>0?d--:l<0&&d++,c>0?u--:c<0&&u++,void this._goToPage(d,u);d=this.x+Math.round(this.hasHorizontalScroll?l:0),u=this.y+Math.round(this.hasVerticalScroll?c:0),this.movingDirectionX=this.directionX=l>0?-1:l<0?1:0,this.movingDirectionY=this.directionY=c>0?-1:c<0?1:0,d>this.minScrollX?d=this.minScrollX:d<this.maxScrollX&&(d=this.maxScrollX),u>this.minScrollY?u=this.minScrollY:u<this.maxScrollY&&(u=this.maxScrollY);var f=this.y===u;this.scrollTo(d,u,h,G.swipe),this.trigger("scroll",{x:this.x,y:this.y}),clearTimeout(this.mouseWheelEndTimer),f&&(this.mouseWheelEndTimer=setTimeout(function(){i.trigger("scrollEnd",{x:i.x,y:i.y})},h))}}}(P),function(t){t.prototype._initZoom=function(){var t=this.options.zoom,i=t.start,e=void 0===i?1:i,s=t.min,o=void 0===s?1:s,n=t.max,r=void 0===n?4:n;this.scale=Math.min(Math.max(e,o),r),this.setScale(this.scale),this.scrollerStyle[j.transformOrigin]="0 0"},t.prototype._zoomTo=function(t,i,e,s){this.scaled=!0;var o=t/(s||this.scale);this.setScale(t),this.refresh();var n=Math.round(this.startX-(i-this.relativeX)*(o-1)),r=Math.round(this.startY-(e-this.relativeY)*(o-1));n>this.minScrollX?n=this.minScrollX:n<this.maxScrollX&&(n=this.maxScrollX),r>this.minScrollY?r=this.minScrollY:r<this.maxScrollY&&(r=this.maxScrollY),this.x===n&&this.y===r||this.scrollTo(n,r,this.options.bounceTime),this.scaled=!1},t.prototype.zoomTo=function(t,i,e){var s=d(this.wrapper),o=s.left,n=s.top,r=i+o-this.x,a=e+n-this.y;this._zoomTo(t,r,a)},t.prototype._zoomStart=function(t){var i=t.touches[0],e=t.touches[1],s=Math.abs(i.pageX-e.pageX),o=Math.abs(i.pageY-e.pageY);this.startDistance=a(s,o),this.startScale=this.scale;var n=d(this.wrapper),r=n.left,h=n.top;this.originX=Math.abs(i.pageX+e.pageX)/2+r-this.x,this.originY=Math.abs(i.pageY+e.pageY)/2+h-this.y,this.trigger("zoomStart")},t.prototype._zoom=function(t){if(this.enabled&&!this.destroyed&&q[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation();var i=t.touches[0],e=t.touches[1],s=Math.abs(i.pageX-e.pageX),o=Math.abs(i.pageY-e.pageY),n=a(s,o),r=n/this.startDistance*this.startScale;this.scaled=!0;var h=this.options.zoom,l=h.min,c=void 0===l?1:l,p=h.max,d=void 0===p?4:p;r<c?r=.5*c*Math.pow(2,r/c):r>d&&(r=2*d*Math.pow(.5,d/r));var u=r/this.startScale,f=this.startX-(this.originX-this.relativeX)*(u-1),m=this.startY-(this.originY-this.relativeY)*(u-1);this.setScale(r),this.scrollTo(f,m,0)}},t.prototype._zoomEnd=function(t){if(this.enabled&&!this.destroyed&&q[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation(),this.isInTransition=!1,this.isAnimating=!1,this.initiated=0;var i=this.options.zoom,e=i.min,s=void 0===e?1:e,o=i.max,n=void 0===o?4:o,r=this.scale>n?n:this.scale<s?s:this.scale;this._zoomTo(r,this.originX,this.originY,this.startScale),this.trigger("zoomEnd")}}}(P),function(t){t.prototype._initInfinite=function(){this.options.probeType=3,this.maxScrollY=-ot,this.infiniteScroller=new M(this,this.options.infinity)}}(P),P.Version="1.15.1",i.a=P},function(t,i,e){"use strict";var s=e(1);i.a=[Object(s.a)(0,23,!0,"点"),Object(s.a)(0,59,!0,"分"),Object(s.a)(0,59,!0,"秒")]},function(t,i,e){"use strict";function s(t){return t%4==0&&(t%100!=0||t%400==0)}function o(t,i){t=Number(t),i=Number(i);var e=null;switch(i){case 2:e=s(t)?29:28;break;case 1:case 3:case 5:case 7:case 8:case 10:case 12:e=31;break;case 4:case 6:case 9:case 11:default:e=30}return Object(n.a)(1,e,!1,r).map(function(t){return{value:t}})}e.d(i,"a",function(){return d}),e.d(i,"b",function(){return c});var n=e(1),r="日",a=Object(n.a)(1900,2100,!1,"年"),h=Object(n.a)(1,12,!1,"月"),l=h.map(function(t){return{value:t,children:[]}}),c=a.map(function(t){var i={value:t,children:l.slice()};return i.children.forEach(function(i){i.children=o(t.slice(0,-1),i.value.slice(0,-1))}),i}),p=new Date,d=[{value:p.getFullYear()+"年"},{value:p.getMonth()+1+"月"},{value:""+p.getDate()+r}]},function(t,i,e){"use strict";var s=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",[e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.display,expression:"display"}],staticClass:"mask",on:{click:t.hide}})]),t._v(" "),e("transition",{attrs:{name:"slide"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.display,expression:"display"}],staticClass:"picker"},[e("div",{staticClass:"picker-title"},[e("span",{staticClass:"pt-cancel",style:{color:t.colorCancel},on:{click:t.cancel}},[t._v(t._s(t.textCancel))]),t._v(" "),e("span",{staticClass:"pt-submit",style:{color:t.colorConfirm},on:{click:t.confirm}},[t._v(t._s(t.textConfirm))]),t._v(" "),t._t("default")],2),t._v(" "),e("div",{staticClass:"picker-panel"},[e("div",{staticClass:"picker-mask-top"}),t._v(" "),e("div",{staticClass:"picker-mask-bottom"}),t._v(" "),e("div",{ref:"wheelWrapper",staticClass:"picker-wheel-wrapper"},t._l(t.pickerData,function(i,s){return e("div",{key:s,staticClass:"picker-wheel"},[e("ul",{staticClass:"wheel-scroll"},t._l(i,function(i,s){return e("li",{key:s,staticClass:"wheel-item"},[t._v(t._s(i))])}),0)])}),0)])])])],1)},o=[],n={render:s,staticRenderFns:o};i.a=n}])});
//# sourceMappingURL=vue-awesome-picker.js.map