UNPKG

cube-ui

Version:

A fantastic mobile ui lib implement by Vue

6 lines 72 kB
!function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define([],i):"object"==typeof exports?exports.slide=i():(t.cube=t.cube||{},t.cube.slide=i())}("undefined"!=typeof self?self:this,function(){return function(t){function i(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}var e={};return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},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="./",i(i.s=372)}({0:function(t,i){var e=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=e)},1:function(t,i){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},10:function(t,i,e){var o=e(1),s=e(0),n=e(31),r=e(6),h=e(5),a=function(t,i,e){var l,c,p,u=t&a.F,d=t&a.G,f=t&a.S,m=t&a.P,g=t&a.B,v=t&a.W,y=d?s:s[i]||(s[i]={}),x=y.prototype,_=d?o:f?o[i]:(o[i]||{}).prototype;d&&(e=i);for(l in e)(c=!u&&_&&void 0!==_[l])&&h(y,l)||(p=c?_[l]:e[l],y[l]=d&&"function"!=typeof _[l]?e[l]:g&&c?n(p,o):v&&_[l]==p?function(t){var i=function(i,e,o){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(i);case 2:return new t(i,e)}return new t(i,e,o)}return t.apply(this,arguments)};return i.prototype=t.prototype,i}(p):m&&"function"==typeof p?n(Function.call,p):p,m&&((y.virtual||(y.virtual={}))[l]=p,t&a.R&&x&&!x[l]&&r(x,l,p)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},107:function(t,i,e){var o,s,n;!function(e,r){s=[t,i],o=r,void 0!==(n="function"==typeof o?o.apply(i,s):o)&&(t.exports=n)}(0,function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default={props:{options:{type:Object,default:function(){return{}}}}},t.exports=i.default})},11:function(t,i){t.exports=function(t){try{return!!t()}catch(t){return!0}}},119:function(t,i,e){var o,s,n;!function(r,h){s=[t,i,e(124),e(131),e(39),e(47)],o=h,void 0!==(n="function"==typeof o?o.apply(i,s):o)&&(t.exports=n)}(0,function(t,i,e,o,s,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(i,"__esModule",{value:!0});var h=r(e),a=r(o);i.default={methods:{_checkDeprecated:function(){var t=this,i=this.$options.props,e=this.$options.name;(0,a.default)(i).forEach(function(i){var o=(0,h.default)(i,2),r=o[0],a=o[1],l=a.deprecated;l&&void 0!==t[r]&&(0,s.tip)('The property "'+(0,n.kebab)(r)+'" is deprecated, please use the recommended property "'+l.replacedBy+'" to replace it. Details could be found in https://didi.github.io/cube-ui/#/en-US/docs/'+e.substr(5)+"#cube-Propsconfiguration-anchor",e)})}},mounted:function(){this._checkDeprecated()}},t.exports=i.default})},12:function(t,i,e){var o=e(8);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},124:function(t,i,e){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var s=e(125),n=o(s),r=e(128),h=o(r);i.default=function(){function t(t,i){var e=[],o=!0,s=!1,n=void 0;try{for(var r,a=(0,h.default)(t);!(o=(r=a.next()).done)&&(e.push(r.value),!i||e.length!==i);o=!0);}catch(t){s=!0,n=t}finally{try{!o&&a.return&&a.return()}finally{if(s)throw n}}return e}return function(i,e){if(Array.isArray(i))return i;if((0,n.default)(Object(i)))return t(i,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},125:function(t,i,e){t.exports={default:e(126),__esModule:!0}},126:function(t,i,e){e(45),e(38),t.exports=e(127)},127:function(t,i,e){var o=e(82),s=e(2)("iterator"),n=e(16);t.exports=e(0).isIterable=function(t){var i=Object(t);return void 0!==i[s]||"@@iterator"in i||n.hasOwnProperty(o(i))}},128:function(t,i,e){t.exports={default:e(129),__esModule:!0}},129:function(t,i,e){e(45),e(38),t.exports=e(130)},13:function(t,i,e){var o=e(36),s=e(25);t.exports=Object.keys||function(t){return o(t,s)}},130:function(t,i,e){var o=e(12),s=e(85);t.exports=e(0).getIterator=function(t){var i=s(t);if("function"!=typeof i)throw TypeError(t+" is not iterable!");return o(i.call(t))}},131:function(t,i,e){t.exports={default:e(132),__esModule:!0}},132:function(t,i,e){e(133),t.exports=e(0).Object.entries},133:function(t,i,e){var o=e(10),s=e(134)(!0);o(o.S,"Object",{entries:function(t){return s(t)}})},134:function(t,i,e){var o=e(13),s=e(7),n=e(18).f;t.exports=function(t){return function(i){for(var e,r=s(i),h=o(r),a=h.length,l=0,c=[];a>l;)n.call(r,e=h[l++])&&c.push(t?[e,r[e]]:r[e]);return c}}},14:function(t,i){t.exports=function(t,i){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:i}}},15:function(t,i){t.exports=!0},16:function(t,i){t.exports={}},17:function(t,i){var e=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+o).toString(36))}},18:function(t,i){i.f={}.propertyIsEnumerable},19:function(t,i){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},192:function(t,i,e){function o(t){e(250)}var s=e(9)(e(251),e(252),o,null,null);t.exports=s.exports},2:function(t,i,e){var o=e(24)("wks"),s=e(17),n=e(1).Symbol,r="function"==typeof n;(t.exports=function(t){return o[t]||(o[t]=r&&n[t]||(r?n:s)("Symbol."+t))}).store=o},20:function(t,i){var e=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:e)(t)}},21:function(t,i){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},22:function(t,i,e){var o=e(8);t.exports=function(t,i){if(!o(t))return t;var e,s;if(i&&"function"==typeof(e=t.toString)&&!o(s=e.call(t)))return s;if("function"==typeof(e=t.valueOf)&&!o(s=e.call(t)))return s;if(!i&&"function"==typeof(e=t.toString)&&!o(s=e.call(t)))return s;throw TypeError("Can't convert object to primitive value")}},23:function(t,i,e){var o=e(24)("keys"),s=e(17);t.exports=function(t){return o[t]||(o[t]=s(t))}},24:function(t,i,e){var o=e(0),s=e(1),n=s["__core-js_shared__"]||(s["__core-js_shared__"]={});(t.exports=function(t,i){return n[t]||(n[t]=void 0!==i?i:{})})("versions",[]).push({version:o.version,mode:e(15)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},247:function(t,i,e){function o(t){e(248)}var s=e(9)(e(249),e(253),o,null,null);t.exports=s.exports},248:function(t,i){},249:function(t,i,e){var o,s,n;!function(r,h){s=[t,i,e(87),e(192),e(89),e(107),e(119)],o=h,void 0!==(n="function"==typeof o?o.apply(i,s):o)&&(t.exports=n)}(0,function(t,i,e,o,s,n,r){"use strict";function h(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(i,"__esModule",{value:!0});var a=h(e),l=h(o),c=h(s),p=h(n),u=h(r),d={momentum:!1,click:!0,observeDOM:!1,bounce:!1};i.default={name:"cube-slide",mixins:[p.default,u.default],props:{data:{type:Array,default:function(){return[]}},initialIndex:{type:Number,default:0},loop:{type:Boolean,default:!0},threshold:{type:Number,default:.3},speed:{type:Number,default:400},autoPlay:{type:Boolean,default:!0},interval:{type:Number,default:4e3},showDots:{type:Boolean,default:!0},direction:{type:String,default:"horizontal"},allowVertical:{type:Boolean,default:void 0,deprecated:{replacedBy:"options"}},stopPropagation:{type:Boolean,default:void 0,deprecated:{replacedBy:"options"}},refreshResetCurrent:{type:Boolean,default:!0}},data:function(){return{dots:0,currentPageIndex:this.initialIndex||0}},created:function(){var t=this;this._dataWatchers=[],["data","loop","autoPlay","options.eventPassthrough","threshold","speed","allowVertical"].forEach(function(i){t._dataWatchers.push(t.$watch(i,function(){"data"===i&&t._destroy(),t.$nextTick(function(){t.refresh()})}))})},watch:{initialIndex:function(t){t!==this.currentPageIndex&&this._goToPage(t)}},methods:{clickItem:function(t,i){this.$emit("click",t,i)},refresh:function(){null!==this.slide&&(this._destroy(),clearTimeout(this._timer),this.slide&&this.refreshResetCurrent&&(this.currentPageIndex=0),this._updateSlideDom(),this.showDots&&this._initDots(),this.currentPageIndex>=this.dots.length&&(this.currentPageIndex=this.dots.length-1),this._initSlide(),this.autoPlay&&this._play())},_destroy:function(){this.slide&&this.slide.destroy()},_refresh:function(){this._updateSlideDom(!0),this.slide.refresh()},_updateSlideDom:function(t){this._setSlideStyle(t)},_setSlideStyle:function(t){this.children=this.$refs.slideGroup.children;for(var i="horizontal"===this.direction?"width":"height",e=0,o=this.$refs.slide["client"+(i[0].toUpperCase()+i.slice(1))],s=this.children.length,n=0;n<s;n++){this.children[n].style[i]=o+"px",e+=o}this.loop&&!t&&s>1&&(e+=2*o),this.$refs.slideGroup.style[i]=e+"px"},_initSlide:function(){var t=this,i="horizontal"===this.direction&&this.allowVertical?"vertical":"",e=(0,a.default)({},d,{scrollX:"horizontal"===this.direction,scrollY:"vertical"===this.direction,eventPassthrough:i,snap:{loop:this.loop,threshold:this.threshold,speed:this.speed},stopPropagation:this.stopPropagation},this.options);this.slide=new c.default(this.$refs.slide,e),this.slide.on("scrollEnd",this._onScrollEnd),this._goToPage(this.currentPageIndex,0),this.options.listenScroll&&3===this.options.probeType&&this.slide.on("scroll",this._onScroll);var o=this.$refs.slide;o.removeEventListener("touchend",this._touchEndEvent,!1),this._touchEndEvent=function(){t.autoPlay&&t._play()},o.addEventListener("touchend",this._touchEndEvent,!1),this.slide.on("beforeScrollStart",function(){t.autoPlay&&clearTimeout(t._timer)})},_onScrollEnd:function(){var t=this.slide.getCurrentPage(),i=t.pageX,e=t.pageY,o="horizontal"===this.direction?i:e;this.currentPageIndex!==o&&(this.currentPageIndex=o,this.$emit("change",o)),this.$emit("scroll-end",o),this.autoPlay&&this._play()},_onScroll:function(t){this.$emit("scroll",t)},_initDots:function(){this.dots=new Array(this.children.length)},_play:function(){var t=this;clearTimeout(this._timer),this._timer=setTimeout(function(){t.slide&&t.slide.next()},this.interval)},_deactivated:function(){clearTimeout(this._timer),clearTimeout(this._resizeTimer),window.removeEventListener("resize",this._resizeHandler);var t=this.$refs.slide;t&&t.removeEventListener("touchend",this._touchEndEvent,!1)},_resizeHandler:function(){var t=this;this.slide&&(clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(function(){t.slide.isInTransition?t._onScrollEnd():t.autoPlay&&t._play(),t._refresh()},60))},_goToPage:function(t,i){"horizontal"===this.direction?this.slide&&this.slide.goToPage(t,0,i):"vertical"===this.direction&&this.slide&&this.slide.goToPage(0,t,i)}},mounted:function(){var t=this;this.$nextTick(function(){t.refresh()}),window.addEventListener("resize",this._resizeHandler)},activated:function(){this.autoPlay&&this._play(),window.addEventListener("resize",this._resizeHandler)},deactivated:function(){this._deactivated()},destroyed:function(){this._deactivated(),this._destroy(),this.slide=null,this._dataWatchers.forEach(function(t){t()}),this._dataWatchers=null},components:{CubeSlideItem:l.default}},t.exports=i.default})},25:function(t,i){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},250:function(t,i){},251:function(t,i,e){var o,s,n;!function(e,r){s=[t,i],o=r,void 0!==(n="function"==typeof o?o.apply(i,s):o)&&(t.exports=n)}(0,function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});i.default={name:"cube-slide-item",props:{item:{type:Object,default:function(){return{}}}}},t.exports=i.default})},252:function(t,i){t.exports={render:function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"cube-slide-item"},[t._t("default",[e("a",{attrs:{href:t.item.url}},[e("img",{attrs:{src:t.item.image}})])])],2)},staticRenderFns:[]}},253:function(t,i){t.exports={render:function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{ref:"slide",staticClass:"cube-slide"},[e("div",{ref:"slideGroup",staticClass:"cube-slide-group"},[t._t("default",t._l(t.data,function(i,o){return e("cube-slide-item",{key:o,attrs:{item:i},nativeOn:{click:function(e){t.clickItem(i,o)}}})}))],2),t._v(" "),t.showDots?e("div",{staticClass:"cube-slide-dots"},[t._t("dots",t._l(t.dots,function(i,o){return e("span",{key:o,class:{active:t.currentPageIndex===o}})}),{current:t.currentPageIndex,dots:t.dots})],2):t._e()])},staticRenderFns:[]}},26:function(t,i,e){var o=e(4).f,s=e(5),n=e(2)("toStringTag");t.exports=function(t,i,e){t&&!s(t=e?t:t.prototype,n)&&o(t,n,{configurable:!0,value:i})}},27:function(t,i,e){var o=e(19);t.exports=function(t){return Object(o(t))}},28:function(t,i,e){var o=e(8),s=e(1).document,n=o(s)&&o(s.createElement);t.exports=function(t){return n?s.createElement(t):{}}},3:function(t,i,e){t.exports=!e(11)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},31:function(t,i,e){var o=e(34);t.exports=function(t,i,e){if(o(t),void 0===i)return t;switch(e){case 1:return function(e){return t.call(i,e)};case 2:return function(e,o){return t.call(i,e,o)};case 3:return function(e,o,s){return t.call(i,e,o,s)}}return function(){return t.apply(i,arguments)}}},32:function(t,i){i.f=Object.getOwnPropertySymbols},33:function(t,i,e){t.exports=!e(3)&&!e(11)(function(){return 7!=Object.defineProperty(e(28)("div"),"a",{get:function(){return 7}}).a})},34:function(t,i){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},36:function(t,i,e){var o=e(5),s=e(7),n=e(50)(!1),r=e(23)("IE_PROTO");t.exports=function(t,i){var e,h=s(t),a=0,l=[];for(e in h)e!=r&&o(h,e)&&l.push(e);for(;i.length>a;)o(h,e=i[a++])&&(~n(l,e)||l.push(e));return l}},372:function(t,i,e){var o,s,n;!function(r,h){s=[t,i,e(247),e(192)],o=h,void 0!==(n="function"==typeof o?o.apply(i,s):o)&&(t.exports=n)}(0,function(t,i,e,o){"use strict";function s(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(i,"__esModule",{value:!0});var n=s(e),r=s(o);n.default.install=function(t){t.component(n.default.name,n.default),t.component(r.default.name,r.default)},n.default.Item=r.default,i.default=n.default,t.exports=i.default})},38:function(t,i,e){"use strict";var o=e(62)(!0);e(42)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,i=this._t,e=this._i;return e>=i.length?{value:void 0,done:!0}:(t=o(i,e),this._i+=t.length,{value:t,done:!1})})},39:function(t,i,e){var o,s,n;!function(e,r){s=[i],o=r,void 0!==(n="function"==typeof o?o.apply(i,s):o)&&(t.exports=n)}(0,function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.warn=function(t,i){},t.tip=function(t,i){}})},4:function(t,i,e){var o=e(12),s=e(33),n=e(22),r=Object.defineProperty;i.f=e(3)?Object.defineProperty:function(t,i,e){if(o(t),i=n(i,!0),o(e),s)try{return r(t,i,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[i]=e.value),t}},40:function(t,i,e){var o=e(21);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},41:function(t,i,e){var o=e(20),s=Math.min;t.exports=function(t){return t>0?s(o(t),9007199254740991):0}},42:function(t,i,e){"use strict";var o=e(15),s=e(10),n=e(43),r=e(6),h=e(16),a=e(63),l=e(26),c=e(65),p=e(2)("iterator"),u=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,i,e,f,m,g,v){a(e,i,f);var y,x,_,b=function(t){if(!u&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},S=i+" Iterator",w="values"==m,T=!1,P=t.prototype,M=P[p]||P["@@iterator"]||m&&P[m],Y=M||b(m),X=m?w?b("entries"):Y:void 0,E="Array"==i?P.entries||M:M;if(E&&(_=c(E.call(new t)))!==Object.prototype&&_.next&&(l(_,S,!0),o||"function"==typeof _[p]||r(_,p,d)),w&&M&&"values"!==M.name&&(T=!0,Y=function(){return M.call(this)}),o&&!v||!u&&!T&&P[p]||r(P,p,Y),h[i]=Y,h[S]=d,m)if(y={values:w?Y:b("values"),keys:g?Y:b("keys"),entries:X},v)for(x in y)x in P||n(P,x,y[x]);else s(s.P+s.F*(u||T),i,y);return y}},43:function(t,i,e){t.exports=e(6)},44:function(t,i,e){var o=e(12),s=e(64),n=e(25),r=e(23)("IE_PROTO"),h=function(){},a=function(){var t,i=e(28)("iframe"),o=n.length;for(i.style.display="none",e(52).appendChild(i),i.src="javascript:",t=i.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;o--;)delete a.prototype[n[o]];return a()};t.exports=Object.create||function(t,i){var e;return null!==t?(h.prototype=o(t),e=new h,h.prototype=null,e[r]=t):e=a(),void 0===i?e:s(e,i)}},45:function(t,i,e){e(66);for(var o=e(1),s=e(6),n=e(16),r=e(2)("toStringTag"),h="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),a=0;a<h.length;a++){var l=h[a],c=o[l],p=c&&c.prototype;p&&!p[r]&&s(p,r,l),n[l]=n.Array}},47:function(t,i,e){var o,s,n;!function(e,r){s=[i],o=r,void 0!==(n="function"==typeof o?o.apply(i,s):o)&&(t.exports=n)}(0,function(t){"use strict";function i(t){return t=String(t),t.replace(o,function(t,i){return i?i.toUpperCase():""})}function e(t){return t=String(t),t.replace(/([A-Z])/g,"-$1").toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),t.camelize=i,t.kebab=e;var o=/-(\w)/g})},5:function(t,i){var e={}.hasOwnProperty;t.exports=function(t,i){return e.call(t,i)}},50:function(t,i,e){var o=e(7),s=e(41),n=e(51);t.exports=function(t){return function(i,e,r){var h,a=o(i),l=s(a.length),c=n(r,l);if(t&&e!=e){for(;l>c;)if((h=a[c++])!=h)return!0}else for(;l>c;c++)if((t||c in a)&&a[c]===e)return t||c||0;return!t&&-1}}},51:function(t,i,e){var o=e(20),s=Math.max,n=Math.min;t.exports=function(t,i){return t=o(t),t<0?s(t+i,0):n(t,i)}},52:function(t,i,e){var o=e(1).document;t.exports=o&&o.documentElement},6:function(t,i,e){var o=e(4),s=e(14);t.exports=e(3)?function(t,i,e){return o.f(t,i,s(1,e))}:function(t,i,e){return t[i]=e,t}},62:function(t,i,e){var o=e(20),s=e(19);t.exports=function(t){return function(i,e){var n,r,h=String(s(i)),a=o(e),l=h.length;return a<0||a>=l?t?"":void 0:(n=h.charCodeAt(a),n<55296||n>56319||a+1===l||(r=h.charCodeAt(a+1))<56320||r>57343?t?h.charAt(a):n:t?h.slice(a,a+2):r-56320+(n-55296<<10)+65536)}}},63:function(t,i,e){"use strict";var o=e(44),s=e(14),n=e(26),r={};e(6)(r,e(2)("iterator"),function(){return this}),t.exports=function(t,i,e){t.prototype=o(r,{next:s(1,e)}),n(t,i+" Iterator")}},64:function(t,i,e){var o=e(4),s=e(12),n=e(13);t.exports=e(3)?Object.defineProperties:function(t,i){s(t);for(var e,r=n(i),h=r.length,a=0;h>a;)o.f(t,e=r[a++],i[e]);return t}},65:function(t,i,e){var o=e(5),s=e(27),n=e(23)("IE_PROTO"),r=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=s(t),o(t,n)?t[n]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?r:null}},66:function(t,i,e){"use strict";var o=e(67),s=e(68),n=e(16),r=e(7);t.exports=e(42)(Array,"Array",function(t,i){this._t=r(t),this._i=0,this._k=i},function(){var t=this._t,i=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,s(1)):"keys"==i?s(0,e):"values"==i?s(0,t[e]):s(0,[e,t[e]])},"values"),n.Arguments=n.Array,o("keys"),o("values"),o("entries")},67:function(t,i){t.exports=function(){}},68:function(t,i){t.exports=function(t,i){return{value:i,done:!!t}}},7:function(t,i,e){var o=e(40),s=e(19);t.exports=function(t){return o(s(t))}},8:function(t,i){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},82:function(t,i,e){var o=e(21),s=e(2)("toStringTag"),n="Arguments"==o(function(){return arguments}()),r=function(t,i){try{return t[i]}catch(t){}};t.exports=function(t){var i,e,h;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=r(i=Object(t),s))?e:n?o(i):"Object"==(h=o(i))&&"function"==typeof i.callee?"Arguments":h}},85:function(t,i,e){var o=e(82),s=e(2)("iterator"),n=e(16);t.exports=e(0).getIteratorMethod=function(t){if(void 0!=t)return t[s]||t["@@iterator"]||n[o(t)]}},87:function(t,i,e){t.exports={default:e(91),__esModule:!0}},89:function(t,i,e){"use strict";function o(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function s(t){for(var i=arguments.length,e=Array(i>1?i-1:0),o=1;o<i;o++)e[o-1]=arguments[o];for(var s=0;s<e.length;s++){var n=e[s];for(var r in n)t[r]=n[r]}return t}function n(t){return void 0===t||null===t}function r(t,i){return Math.sqrt(t*t+i*i)}function h(t){return!1!==C&&("standard"===C?"transitionEnd"===t?"transitionend":t:C+t.charAt(0).toUpperCase()+t.substr(1))}function a(t,i,e,o){t.addEventListener(i,e,{passive:!1,capture:!!o})}function l(t,i,e,o){t.removeEventListener(i,e,{passive:!1,capture:!!o})}function c(t){for(var i=0,e=0;t;)i-=t.offsetLeft,e-=t.offsetTop,t=t.offsetParent;return{left:i,top:e}}function p(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 d(t,i){for(var e in i)if(i[e].test(t[e]))return!0;return!1}function f(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 m(t){function i(){r=document.createEvent("Event"),r.initEvent(e,h,a),s(r,n)}var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"click",o=void 0;"mouseup"===t.type||"mousecancel"===t.type?o=t:"touchend"!==t.type&&"touchcancel"!==t.type||(o=t.changedTouches[0]);var n={};o&&(n.screenX=o.screenX||0,n.screenY=o.screenY||0,n.clientX=o.clientX||0,n.clientY=o.clientY||0);var r=void 0,h=!0,a=!0;if("undefined"!=typeof MouseEvent)try{r=new MouseEvent(e,s({bubbles:h,cancelable:a},n))}catch(t){i()}else i();r.forwardedTouchEvent=!0,r._constructed=!0,t.target.dispatchEvent(r)}function g(t){m(t,"dblclick")}function v(t,i){i.firstChild?y(t,i.firstChild):i.appendChild(t)}function y(t,i){i.parentNode.insertBefore(t,i)}function x(t,i){t.removeChild(i)}function _(t,i,e,o,s,n,r){var h=t-i,a=Math.abs(h)/e,l=r.deceleration,c=r.itemHeight,p=r.swipeBounceTime,u=r.wheel,d=r.swipeTime,f=d,m=u?4:15,g=t+a/l*(h<0?-1:1);return u&&c&&(g=Math.round(g/c)*c),g<o?(g=n?Math.max(o-n/4,o-n/m*a):o,f=p):g>s&&(g=n?Math.min(s+n/4,s+n/m*a):s,f=p),{destination:Math.round(g),duration:f}}function b(){}function S(t){console.error("[BScroll warn]: "+t)}function w(t,i){if(!t)throw new Error("[BScroll] "+i)}function T(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 P(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 M(t){if(t&&t.classList)return t.classList.contains("tombstone")}function Y(t,i){var e=this;this.options=i,w("function"==typeof this.options.createTombstone,"Infinite scroll need createTombstone Function to create tombstone"),w("function"==typeof this.options.fetch,"Infinite scroll need fetch Function to fetch new data."),w("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.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("scroll",function(){e.onScroll()}),this.scroller.on("resize",function(){e.onResize()}),this.onResize()}function X(t,i){this.wrapper="string"==typeof t?document.querySelector(t):t,this.wrapper||S("Can not resolve the wrapper DOM."),this.scroller=this.wrapper.children[0],this.scroller||S("The wrapper need at least one child element to be scroller."),this.scrollerStyle=this.scroller.style,this._init(t,i)}Object.defineProperty(i,"__esModule",{value:!0});/*! * better-normal-scroll v1.12.6 * (c) 2016-2018 ustbhuangyi * Released under the MIT License. */ var E=function(){function t(t,i){var e=[],o=!0,s=!1,n=void 0;try{for(var r,h=t[Symbol.iterator]();!(o=(r=h.next()).done)&&(e.push(r.value),!i||e.length!==i);o=!0);}catch(t){s=!0,n=t}finally{try{!o&&h.return&&h.return()}finally{if(s)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")}}(),D=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)},O="undefined"!=typeof window,I=O&&navigator.userAgent.toLowerCase(),k=I&&/wechatdevtools/.test(I),L=I&&I.indexOf("android")>0,z=O&&document.createElement("div").style,C=function(){if(!O)return!1;var t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(var i in t)if(void 0!==z[t[i]])return i;return!1}(),A=h("transform"),H=O&&h("perspective")in z,W=O&&("ontouchstart"in window||k),j=!1!==A,R=O&&h("transition")in z,F={transform:A,transitionTimingFunction:h("transitionTimingFunction"),transitionDuration:h("transitionDuration"),transitionDelay:h("transitionDelay"),transformOrigin:h("transformOrigin"),transitionEnd:h("transitionEnd")},N=1,U={touchstart:N,touchmove:N,touchend:N,mousedown:2,mousemove:2,mouseup:2},B={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)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:!1,disableMouse:W,disableTouch:!W,observeDOM:!0,autoBlur:!0,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1,mouseWheel:!1,stopPropagation:!1,zoom:!1,infinity:!1,dblclick:!1},V={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}}},$=function(){return O?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}:b}(),q=function(){return O?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:b}(),G=1,Z=-1,J=1,K=-1,Q=1,tt=3;P.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)}},P.prototype.refresh=function(){this._shouldShow()&&(this.transitionTime(),this._calculate(),this.updatePosition())},P.prototype.fade=function(t,i){var e=this;if(!i||this.visible){var o=t?250:500;t=t?"1":"0",this.wrapperStyle[F.transitionDuration]=o+"ms",clearTimeout(this.fadeTimeout),this.fadeTimeout=setTimeout(function(){e.wrapperStyle.opacity=t,e.visible=+t},0)}},P.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[F.transform]="translateY("+t+"px)"+this.scroller.translateZ:this.indicatorStyle.top=t+"px"}else{var o=Math.round(this.sizeRatioX*this.scroller.x);if(o<0){this.transitionTime(500);var s=Math.max(this.indicatorWidth+3*o,8);this.indicatorStyle.width=s+"px",o=0}else if(o>this.maxPosX){this.transitionTime(500);var n=Math.max(this.indicatorWidth-3*(o-this.maxPosX),8);this.indicatorStyle.width=n+"px",o=this.maxPosX+this.indicatorWidth-n}else this.indicatorStyle.width=this.indicatorWidth+"px";this.x=o,this.scroller.options.useTransform?this.indicatorStyle[F.transform]="translateX("+o+"px)"+this.scroller.translateZ:this.indicatorStyle.left=o+"px"}},P.prototype.transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.indicatorStyle[F.transitionDuration]=t+"ms"},P.prototype.transitionTimingFunction=function(t){this.indicatorStyle[F.transitionTimingFunction]=t},P.prototype.destroy=function(){this._removeDOMEvents(),this.wrapper.parentNode.removeChild(this.wrapper)},P.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(a),this.scroller.trigger("beforeScrollStart")},P.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 o=i.pageY-this.lastPointY;this.lastPointY=i.pageY;var s=this.x+e,n=this.y+o;this._pos(s,n)},P.prototype._end=function(t){if(this.initiated){this.initiated=!1,t.preventDefault(),t.stopPropagation(),this._handleMoveEvents(l);var i=this.scroller.options.snap;if(i){var e=i.speed,o=i.easing,s=void 0===o?V.bounce:o,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,s))}this.moved&&this.scroller.trigger("scrollEnd",{x:this.scroller.x,y:this.scroller.y})}},P.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})},P.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)},P.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}},P.prototype._addDOMEvents=function(){var t=a;this._handleDOMEvents(t)},P.prototype._removeDOMEvents=function(){var t=l;this._handleDOMEvents(t),this._handleMoveEvents(t)},P.prototype._handleMoveEvents=function(t){this.scroller.options.disableTouch||t(window,"touchmove",this),this.scroller.options.disableMouse||t(window,"mousemove",this)},P.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 it=2e3;Y.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.wrapperEl.offsetHeight),o=this.anchorItem.index,s=e.index;i<0?(o-=30,s+=10):(o-=10,s+=30),this.fill(o,s),this.maybeRequestContent()},Y.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()},Y.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()},Y.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(),o=0;t.anchorItem.index<=t.items.length?(o=t._fixScrollPosition(),t._setupAnimations({},o),t.scroller.resetPosition(t.scroller.options.bounceTime)):(t.anchorItem.index-=e,o=t._fixScrollPosition(),t._setupAnimations({},o),t.scroller.stop(),t.scroller.resetPosition(),t.onScroll())}}))}},Y.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()},Y.prototype.attachContent=function(){var t=this._collectUnusedNodes(),i=this._createDOMNodes(t);this._cleanupUnusedNodes(t),this._cacheNodeSize();var e=this._fixScrollPosition();this._setupAnimations(i,e)},Y.prototype.resetMore=function(){this.hasMore=!0},Y.prototype._removeTombstones=function(){for(var t=void 0,i=0,e=this.items.length,o=0;o<e;o++){var s=this.items[o].node,n=this.items[o].data;s&&!M(s)||n||(t||(t=o),s&&this.scrollerEl.removeChild(s))}return i=e-t,this.items.splice(t),this.lastAttachedItem=Math.min(this.lastAttachedItem,this.items.length),i},Y.prototype._collectUnusedNodes=function(){for(var t=[],i=0;i<this.items.length;i++)if(i!==this.firstAttachedItem){var e=this.items[i].node;e&&(M(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},Y.prototype._createDOMNodes=function(t){for(var i={},e=this.firstAttachedItem;e<this.lastAttachedItem;e++){for(;this.items.length<=e;)this._addItem();var o=this.items[e].node,s=this.items[e].data;if(o){if(!M(o)||!s)continue;o.style.zIndex=1,i[e]=[o,this.items[e].top-this.anchorScrollTop],this.items[e].node=null}var n=s?this.options.render(s,t.pop()):this._getTombStone();n.style.position="absolute",this.items[e].top=-1,this.scrollerEl.appendChild(n),this.items[e].node=n}return i},Y.prototype._cleanupUnusedNodes=function(t){for(;t.length;)this.scrollerEl.removeChild(t.pop())},Y.prototype._cacheNodeSize=function(){for(var t=this.firstAttachedItem;t<this.lastAttachedItem;t++)this.items[t].data&&!this.items[t].height&&(this.items[t].height=this.items[t].node.offsetHeight,this.items[t].width=this.items[t].node.offsetWidth)},Y.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},Y.prototype._setupAnimations=function(t,i){var e=this;for(var o in t){var s=t[o];this.items[o].node.style.transform="translateY("+(this.anchorScrollTop+s[1])+"px) scale("+this.tombstoneWidth/this.items[o].width+", "+this.tombstoneHeight/this.items[o].height+")",this.items[o].node.offsetTop,s[0].offsetTop,this.items[o].node.style.transition="transform 200ms"}for(var n=this.firstAttachedItem;n<this.lastAttachedItem;n++){var r=t[n];if(r){var h=r[0];h.style.transition="transform 200ms, opacity 200ms",h.style.transform="translateY("+i+"px) scale("+this.items[n].width/this.tombstoneWidth+", "+this.items[n].height/this.tombstoneHeight+")",h.style.opacity=0}i!==this.items[n].top&&(r||(this.items[n].node.style.transition=""),this.items[n].node.style.transform="translateY("+i+"px)"),this.items[n].top=i,i+=this.items[n].height||this.tombstoneHeight}this.scroller.maxScrollY=-(i-this.wrapperEl.offsetHeight+(this.hasMore?it:0)),setTimeout(function(){for(var i in t){var o=t[i];o[0].style.display="none",e.tombstones.push(o[0])}},200)},Y.prototype._getTombStone=function(){var t=this.tombstones.pop();return t?(t.style.display="",t.style.opacity=1,t.style.transform="",t.style.transition="",t):this.options.createTombstone()},Y.prototype._addItem=function(){this.items.push({data:null,node:null,height:0,width:0,top:0})},Y.prototype._calculateAnchoredItem=function(t,i){if(0===i)return t;var e=t.index,o=0;if((i+=t.offset)<0){for(;i<0&&e>0&&this.items[e-1].height;)i+=this.items[e-1].height,e--;o=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)&&(o=Math.floor(Math.max(i,0)/this.tombstoneHeight))}return e+=o,i-=o*this.tombstoneHeight,{index:e,offset:i}},function(t){t.prototype._init=function(t,i){this._handleOptions(i),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=n(this.scale)?t:this.scale,this.scale=t},t.prototype._handleOptions=function(t){this.options=s({},B,t),this.translateZ=this.options.HWCompositing&&H?" translateZ(0)":"",this.options.useTransition=this.options.useTransition&&R,this.options.useTransform=this.options.useTransform&&j,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=a;this._handleDOMEvents(t)},t.prototype._removeDOMEvents=function(){var t=l;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)),W&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(i,"touchmove",this),t(i,"touchcancel",this),t(i,"touchend",this)),t(this.scroller,F.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.useTransition?"isInTransition":"isAnimating";Object.defineProperty(this,e,{get:function(){return i},set:function(e){i=e;for(var o=t.scroller.children.length?t.scroller.children:[t.scroller],s=i&&!t.pulling?"none":"auto",n=0;n<o.length;n++)o[n].style.pointerEvents=s}})}},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 o=!1,s=!1,n=0;n<e.length;n++){var r=e[n];if("attributes"!==r.type){o=!0;break}if(r.target!==t.scroller){s=!0;break}}o?t.refresh():s&&(clearTimeout(i),i=setTimeout(function(){t._shouldNotRefresh()||t.refresh()},60))}}),o={attributes:!0,childList:!0,subtree:!0};e.observe(this.scroller,o),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;o===t&&s===n||this.refresh(),o=t,s=n,i.call(this)}}function i(){var i=this;setTimeout(function(){t.call(i)},1e3)}var e=u(this.scroller),o=e.width,s=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&&(d(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 o=this.options.wheel;o?(this.items=this.scroller.children,this.options.itemHeight=this.itemHeight=this.items.length?this.scrollerHeight/this.items.length:0,void 0===this.selectedIndex&&(this.selectedIndex=o.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=c(this.wrapper),this.trigger("refresh"),!this.scaled&&this.resetPosition()},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1}}(X),function(t){t.prototype._start=function(t){var i=U[t.type];if((i===N||0===t.button)&&!(!this.enabled||this.destroyed||this.initiated&&this.initiated!==i)){this.initiated=i,this.options.preventDefault&&!d(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&&U[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),h=o();if(!(h-this.endTime>this.options.momentumLimitTime&&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?K:e<0?J:0,this.movingDirectionY=s>0?Z:s<0?G:0;var a=this.x+e,l=this.y+s,c=!1,p=!1,u=!1,d=!1,f=this.options.bounce;!1!==f&&(c=void 0===f.top||f.top,p=void 0===f.bottom||f.bottom,u=void 0===f.left||f.left,d=void 0===f.right||f.right),(a>this.minScrollX||a<this.maxScrollX)&&(a=a>this.minScrollX&&u||a<this.maxScrollX&&d?this.x+e/3:a>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(a,l),h-this.startTime>this.options.momentumLimitTime&&(this.startTime=h,this.startX=this.x,this.startY=this.y,this.options.probeType===Q&&this.trigger("scroll",{x:this.x,y:this.y})),this.options.probeType>Q&&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&&U[t.type]===this.initiated){this.initiated=!1,this.options.preventDefault&&!d(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?K:s<0?J:0,this.directionY=n>0?Z:n<0?G:0,!this.options.pullDownRefresh||!this._checkPullDown()){if(this._checkClick(t))return void this.trigger("scrollCancel");if(!this.resetPosition(this.options.bounceTime,V.bounce)){this._translate(i,e),this.endTime=o();var r=this.endTime-this.startTime,h=Math.abs(i-this.startX),a=Math.abs(e-this.startY);if(this._events.flick&&r<this.options.flickLimitTime&&h<this.options.flickLimitDistance&&a<this.options.flickLimitDistance)return void this.trigger("flick");var l=0;if(this.options.momentum&&r<this.options.momentumLimitTime&&(a>this.options.momentumLimitDistance||h>this.options.momentumLimitDistance)){var c=!1,p=!1,u=!1,f=!1,m=this.options.bounce;!1!==m&&(c=void 0===m.top||m.top,p=void 0===m.bottom||m.bottom,u=void 0===m.left||m.left,f=void 0===m.right||m.right);var g=this.directionX===K&&u||this.directionX===J&&f?this.wrapperWidth:0,v=this.directionY===Z&&c||this.directionY===G&&p?this.wrapperHeight:0,y=this.hasHorizontalScroll?_(this.x,this.startX,r,this.maxScrollX,this.minScrollX,g,this.options):{destination:i,duration:0},x=this.hasVerticalScroll?_(this.y,this.startY,r,this.maxScrollY,this.minScrollY,v,this