@@ -18,3 +18,4 @@ let path = require('path'); | ||
| contentBase: './dist', | ||
| host: 'localhost', | ||
| // host: 'localhost', | ||
| host: '0.0.0.0', | ||
| port: 3000, | ||
@@ -21,0 +22,0 @@ open: true, |
+19
-3
@@ -21,4 +21,4 @@ <!DOCTYPE html> | ||
| <h4>支持格式:</h4> | ||
| YYYY-MM、YYYY-MM-DD、YYYY-MM-DD hh:mm、YYYY-MM-DD hh:mm:ss、YYYY、MM、DD、hh:mm、hh:mm:ss、YYYY-MM-DD hh | ||
| <h4>支持格式:(13种)</h4> | ||
| YYYY-MM、YYYY-MM-DD、YYYY-MM-DD hh:mm、YYYY-MM-DD hh:mm:ss、YYYY、MM、DD、hh:mm、hh:mm:ss、YYYY-MM-DD hh、hh、mm、ss | ||
| <br> | ||
@@ -34,2 +34,6 @@ <input readonly type="text" id="date" placeholder="YYYY-MM"><input readonly type="text" id="date2" placeholder="YYYY-MM-DD"> | ||
| <input readonly type="text" id="date20" placeholder="hh:mm:ss"><input readonly type="text" id="date26" placeholder="YYYY-MM-DD hh"> | ||
| <br> | ||
| <input readonly type="text" id="date27" placeholder="hh"><input readonly type="text" id="date28" placeholder="mm"> | ||
| <br> | ||
| <input readonly type="text" id="date29" placeholder="ss"> | ||
| <hr> | ||
@@ -114,6 +118,18 @@ | ||
| }) | ||
| new rolldate.Date({ | ||
| new rolldate.Date({ | ||
| el:'#date26', | ||
| format:'YYYY-MM-DD hh' | ||
| }) | ||
| new rolldate.Date({ | ||
| el:'#date27', | ||
| format:'hh' | ||
| }) | ||
| new rolldate.Date({ | ||
| el:'#date28', | ||
| format:'mm' | ||
| }) | ||
| new rolldate.Date({ | ||
| el:'#date29', | ||
| format:'ss' | ||
| }) | ||
| // 回调 | ||
@@ -120,0 +136,0 @@ new rolldate.Date({ |
| /*! | ||
| * Rolldate 2.1.2 | ||
| * Rolldate 2.1.3 | ||
| * Copyright 2019 雾空 | ||
@@ -8,2 +8,2 @@ * https://github.com/weijhfly/rolldate | ||
| */ | ||
| !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rolldate=e():t.rolldate=e()}(window,function(){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return 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,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.Date=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}();i(1);var s,r=i(6),a=(s=r)&&s.__esModule?s:{default:s};var l=i(7);e.Date=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e&&e.el){var i=this,o=i.$(e.el);if(o&&!o.rolldate&&(o.rolldate=!0,i.extend(e),o.addEventListener("click",function(){if(!i.$(".rolldate-container")){if("INPUT"==o.nodeName&&o.blur(),i.config.tapBefore&&!1===i.config.tapBefore.call(i,o))return!1;i.createUi()}}),e.value)){"INPUT"==o.nodeName?o.value=e.value:o.innerText=e.value;var n=e.value.replace(/-/g,"/").replace(/[^\d\/:\s]/g,""),s=new window.Date(n);"Invalid Date"==s?console.error("无效的日期:"+n):o.date=s}}}return n(t,[{key:"baseData",value:function(){return{date:new window.Date,dateFormat:["YYYY-MM","YYYY-MM-DD","YYYY-MM-DD hh:mm","YYYY-MM-DD hh:mm:ss","YYYY","MM","DD","hh:mm","hh:mm:ss","YYYY-MM-DD hh"],domClass:["rolldate-year","rolldate-month","rolldate-day","rolldate-hour","rolldate-min","rolldate-sec"],opts:{el:"",format:"YYYY-MM-DD",beginYear:2e3,endYear:2100,tapBefore:null,moveEnd:null,confirmBefore:null,confirmEnd:null,minStep:1,lang:{title:"选择日期",cancel:"取消",confirm:"确认",year:"年",month:"月",day:"日",hour:"时",min:"分",sec:"秒"}}}}},{key:"extend",value:function(t){var e=this.baseData().opts;for(var i in e)if(e[i]&&"object"==o(e[i]))for(var n in t[i])e[i][n]=null==t[i][n]?e[i][n]:t[i][n];else e[i]=0===t[i]?0:t[i]||e[i];this.config=e}},{key:"createUi",value:function(){for(var t=this,e=t.baseData(),i=e.dateFormat.indexOf(t.config.format),o=5==(i=i>1?i+1:i)?[e.domClass[0]]:6==i?[e.domClass[1]]:7==i?[e.domClass[2]]:8==i?e.domClass.slice(3,5):9==i?e.domClass.slice(3):10==i?e.domClass.slice(0,4):e.domClass.slice(0,i+2),n=o.length,s="",r=t.$(t.config.el),l=r.date?r.date:e.date,h=t.config.lang,c=0;c<n;c++){s+='<div id="'+o[c]+'"><ul class="wheel-scroll">';var p=0;if(0==c&&(i<6||10==i))for(var d=t.config.beginYear;d<=t.config.endYear;d++)s+='<li class="wheel-item '+(d==l.getFullYear()?"active":"")+'" data-index="'+p+'">'+d+h.year+"</li>",p++;else if(1!=c&&6!=i||!(i<7||10==i))if(2!=c&&7!=i||!(i<=7||10==i)){if(3==c||i>7&&0==c)for(var u=0;u<=23;u++)s+='<li class="wheel-item '+(u==l.getHours()?"active":"")+'" data-index="'+p+'">'+(u<10?"0"+u:u)+h.hour+"</li>",p++;else if(4==c||i>7&&1==c)for(var f=0;f<=59;f+=t.config.minStep)s+='<li class="wheel-item '+(f==l.getMinutes()?"active":"")+'" data-index="'+p+'">'+(f<10?"0"+f:f)+h.min+"</li>",p++;else if(5==c||i>7&&2==c)for(var m=0;m<=59;m++)s+='<li class="wheel-item '+(m==l.getSeconds()?"active":"")+'" data-index="'+p+'">'+(m<10?"0"+m:m)+h.sec+"</li>",p++}else for(var v=t.bissextile(l.getFullYear(),l.getMonth()+1),g=1;g<=v;g++)s+='<li class="wheel-item '+(g==l.getDate()?"active":"")+'" data-index="'+p+'">'+(g<10?"0"+g:g)+h.day+"</li>",p++;else for(var y=1;y<=12;y++)s+='<li class="wheel-item '+(y==l.getMonth()+1?"active":"")+'" data-index="'+p+'">'+(y<10?"0"+y:y)+h.month+"</li>",p++;s+="</ul></div>"}var b='<div class="rolldate-mask"></div>\n <div class="rolldate-panel fadeIn">\n <header>\n <span class="rolldate-btn rolldate-cancel">'+h.cancel+"</span>\n "+h.title+'\n <span class="rolldate-btn rolldate-confirm">'+h.confirm+'</span>\n </header>\n <section class="rolldate-content">\n <div class="rolldate-dim mask-top"></div>\n <div class="rolldate-dim mask-bottom"></div>\n <div class="rolldate-wrapper">\n '+s+"\n </div>\n </section>\n </div>",w=document.createElement("div");w.className="rolldate-container",w.innerHTML=b,document.body.appendChild(w),t.scroll=[];for(var x=function(i){t.scroll[i]=new a.default("#"+o[i],{wheel:{selectedIndex:0,wheelWrapperClass:"wheel-scroll",wheelItemClass:"wheel-item"},probeType:1});var n=t.scroll[i],s=t.$("#"+o[i]+" .active"),r=s?s.getAttribute("data-index"):Math.round(l.getMinutes()/5);n.wheelTo(r),n.on("scrollEnd",function(){if(t.config.moveEnd&&t.config.moveEnd.call(t,t.$(t.config.el),n),-1!=e.domClass.slice(0,2).indexOf(n.wrapper.id)&&t.scroll[2]){t.getscrollDay(t.scroll[2]);var i=t.bissextile(t.getscrollDay(t.scroll[0]),t.getscrollDay(t.scroll[1])),o="";if(i!=t.$("#"+e.domClass[2]+" li","all").length){for(var s=1;s<=i;s++)o+='<li class="wheel-item">'+(s<10?"0"+s:s)+"日</li>";t.$("#"+e.domClass[2]+" ul").innerHTML=o,t.scroll[2].refresh()}}})},T=0;T<n;T++)x(T);t.event()}},{key:"$",value:function(t,e){return"string"!=typeof t&&t.nodeType?t:e?document.querySelectorAll(t):document.querySelector(t)}},{key:"event",value:function(){var t=this,e=t.$(".rolldate-mask"),i=t.$(".rolldate-cancel"),o=t.$(".rolldate-confirm");e.addEventListener("click",function(){t.destroy()}),i.addEventListener("click",function(){t.destroy()}),o.addEventListener("click",function(){var e=t.$(t.config.el),i=t.baseData(),o=t.config.format,n=new window.Date,s=i.dateFormat.indexOf(o);if(t.scroll.forEach(function(e,i){var r=t.getscrollDay(e),a=void 0;s<=4||9==s?a=0==i?"YYYY":1==i?"MM":2==i?"DD":3==i?"hh":4==i?"mm":"ss":5==s?a="MM":6==s?a="DD":7==s?a=0==i?"hh":1==i?"mm":"":8==s&&(a=0==i?"hh":1==i?"mm":"ss"),o=o.replace(a,r),"YYYY"==a?n.setFullYear(r):"MM"==a?n.setMonth(r-1):"DD"==a?n.setDate(r):"hh"==a?n.setHours(r):"mm"==a?n.setMinutes(r):"ss"==a&&n.setSeconds(r)}),t.config.confirmBefore){var r=t.config.confirmBefore.call(t,e,o);if(!1===r)return t.config.confirmEnd&&t.config.confirmEnd.call(t,e,o),!1;r&&(o=r)}"INPUT"==e.nodeName?e.value=o:e.innerText=o,t.destroy(),e.date=n})}},{key:"bissextile",value:function(t,e){var i=void 0;return 1==e||3==e||5==e||7==e||8==e||10==e||12==e?i=31:4==e||6==e||11==e||9==e?i=30:2==e&&(i=t%4!=0||t%100==0&&t%400!=0?28:29),i}},{key:"destroy",value:function(){var t=this;if(t.scroll.forEach(function(t,e){t.destroy()}),t.config.confirmEnd){var e=t.$(t.config.el);t.config.confirmEnd.call(t,e)}t.$(".rolldate-panel").className="rolldate-panel fadeOut",setTimeout(function(){document.body.removeChild(t.$(".rolldate-container"))},300)}},{key:"getscrollDay",value:function(t){return this.$("#"+t.wrapper.id+" li","all")[t.getSelectedIndex()].innerText.replace(/\D/g,"")}}]),t}(),e.version=l.version},function(t,e,i){var o=i(2);"string"==typeof o&&(o=[[t.i,o,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i(4)(o,n);o.locals&&(t.exports=o.locals)},function(t,e,i){(t.exports=i(3)(!1)).push([t.i,"ul {\n margin: 0;\n padding: 0;\n}\nli {\n list-style-type: none;\n}\n.rolldate-container {\n font-size: 20px;\n color: #333;\n text-align: center;\n}\n.rolldate-container header {\n position: relative;\n line-height: 60px;\n font-size: 18px;\n border-bottom: 1px solid #e0e0e0;\n}\n.rolldate-container .rolldate-mask {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #000;\n opacity: 0.5;\n z-index: 100;\n}\n.rolldate-container .rolldate-panel {\n position: fixed;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 273px;\n z-index: 101;\n background: #fff;\n -webkit-animation-duration: 300ms;\n animation-duration: 300ms;\n -webkit-animation-delay: 0s;\n animation-delay: 0s;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n}\n.rolldate-container .rolldate-btn {\n position: absolute;\n left: 0;\n top: 0;\n height: 150%;\n padding: 0 15px;\n color: #666;\n font-size: 16px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n}\n.rolldate-container .rolldate-confirm {\n left: auto;\n right: 0;\n color: #007bff;\n}\n.rolldate-container .rolldate-content {\n position: relative;\n top: 20px;\n}\n.rolldate-container .rolldate-wrapper {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n.rolldate-container .rolldate-wrapper > div {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n height: 173px;\n line-height: 36px;\n overflow: hidden;\n -webkit-flex-basis: -8e;\n -ms-flex-preferred-size: -8e;\n flex-basis: -8e;\n width: 1%;\n}\n.rolldate-container .rolldate-wrapper ul {\n margin-top: 68px;\n}\n.rolldate-container .rolldate-wrapper li {\n height: 36px;\n}\n.rolldate-container .rolldate-dim {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 68px;\n background: -webkit-gradient(linear, left bottom, left top, from(hsla(0, 0%, 100%, 0.4)), to(hsla(0, 0%, 100%, 0.8)));\n background: -webkit-linear-gradient(bottom, hsla(0, 0%, 100%, 0.4), hsla(0, 0%, 100%, 0.8));\n background: -o-linear-gradient(bottom, hsla(0, 0%, 100%, 0.4), hsla(0, 0%, 100%, 0.8));\n background: linear-gradient(0deg, hsla(0, 0%, 100%, 0.4), hsla(0, 0%, 100%, 0.8));\n pointer-events: none;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n z-index: 10;\n}\n.rolldate-container .mask-top {\n border-bottom: 1px solid #ebebeb;\n}\n.rolldate-container .mask-bottom {\n top: auto;\n bottom: 1px;\n border-top: 1px solid #ebebeb;\n}\n.rolldate-container .fadeIn {\n -webkit-animation-name: fadeIn;\n animation-name: fadeIn;\n}\n.rolldate-container .fadeOut {\n -webkit-animation-name: fadeOut;\n animation-name: fadeOut;\n}\n@-webkit-keyframes fadeIn {\n from {\n bottom: -273px;\n }\n to {\n bottom: 0;\n }\n}\n@keyframes fadeIn {\n from {\n bottom: -273px;\n }\n to {\n bottom: 0;\n }\n}\n@-webkit-keyframes fadeOut {\n from {\n bottom: 0;\n }\n to {\n bottom: -273px;\n display: none;\n }\n}\n@keyframes fadeOut {\n from {\n bottom: 0;\n }\n to {\n bottom: -273px;\n display: none;\n }\n}\n@media screen and (max-width: 414px) {\n .rolldate-container {\n font-size: 18px;\n }\n}\n@media screen and (max-width: 320px) {\n .rolldate-container {\n font-size: 15px;\n }\n}\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i=function(t,e){var i=t[1]||"",o=t[3];if(!o)return i;if(e&&"function"==typeof btoa){var n=(r=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),s=o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"});return[i].concat(s).concat([n]).join("\n")}var r;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i}).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},n=0;n<this.length;n++){var s=this[n][0];"number"==typeof s&&(o[s]=!0)}for(n=0;n<t.length;n++){var r=t[n];"number"==typeof r[0]&&o[r[0]]||(i&&!r[2]?r[2]=i:i&&(r[2]="("+r[2]+") and ("+i+")"),e.push(r))}},e}},function(t,e,i){var o,n,s={},r=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===n&&(n=o.apply(this,arguments)),n}),a=function(t){var e={};return function(t){if("function"==typeof t)return t();if(void 0===e[t]){var i=function(t){return document.querySelector(t)}.call(this,t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}}(),l=null,h=0,c=[],p=i(5);function d(t,e){for(var i=0;i<t.length;i++){var o=t[i],n=s[o.id];if(n){n.refs++;for(var r=0;r<n.parts.length;r++)n.parts[r](o.parts[r]);for(;r<o.parts.length;r++)n.parts.push(y(o.parts[r],e))}else{var a=[];for(r=0;r<o.parts.length;r++)a.push(y(o.parts[r],e));s[o.id]={id:o.id,refs:1,parts:a}}}}function u(t,e){for(var i=[],o={},n=0;n<t.length;n++){var s=t[n],r=e.base?s[0]+e.base:s[0],a={css:s[1],media:s[2],sourceMap:s[3]};o[r]?o[r].parts.push(a):i.push(o[r]={id:r,parts:[a]})}return i}function f(t,e){var i=a(t.insertInto);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=c[c.length-1];if("top"===t.insertAt)o?o.nextSibling?i.insertBefore(e,o.nextSibling):i.appendChild(e):i.insertBefore(e,i.firstChild),c.push(e);else if("bottom"===t.insertAt)i.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var n=a(t.insertInto+" "+t.insertAt.before);i.insertBefore(e,n)}}function m(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=c.indexOf(t);e>=0&&c.splice(e,1)}function v(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),g(e,t.attrs),f(t,e),e}function g(t,e){Object.keys(e).forEach(function(i){t.setAttribute(i,e[i])})}function y(t,e){var i,o,n,s;if(e.transform&&t.css){if(!(s=e.transform(t.css)))return function(){};t.css=s}if(e.singleton){var r=h++;i=l||(l=v(e)),o=x.bind(null,i,r,!1),n=x.bind(null,i,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),f(t,e),e}(e),o=function(t,e,i){var o=i.css,n=i.sourceMap,s=void 0===e.convertToAbsoluteUrls&&n;(e.convertToAbsoluteUrls||s)&&(o=p(o));n&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var r=new Blob([o],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(r),a&&URL.revokeObjectURL(a)}.bind(null,i,e),n=function(){m(i),i.href&&URL.revokeObjectURL(i.href)}):(i=v(e),o=function(t,e){var i=e.css,o=e.media;o&&t.setAttribute("media",o);if(t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}.bind(null,i),n=function(){m(i)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else n()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var i=u(t,e);return d(i,e),function(t){for(var o=[],n=0;n<i.length;n++){var r=i[n];(a=s[r.id]).refs--,o.push(a)}t&&d(u(t,e),e);for(n=0;n<o.length;n++){var a;if(0===(a=o[n]).refs){for(var l=0;l<a.parts.length;l++)a.parts[l]();delete s[a.id]}}}};var b,w=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function x(t,e,i,o){var n=i?"":o.css;if(t.styleSheet)t.styleSheet.cssText=w(e,n);else{var s=document.createTextNode(n),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(s,r[e]):t.appendChild(s)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var i=e.protocol+"//"+e.host,o=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var n,s=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(s)?t:(n=0===s.indexOf("//")?s:0===s.indexOf("/")?i+s:o+s.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")})}},function(t,e,i){"use strict";var o,n,s,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};s=function(){function t(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}var e=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){n=!0,s=t}finally{try{!o&&a.return&&a.return()}finally{if(n)throw s}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i="undefined"!=typeof window,o=i&&navigator.userAgent.toLowerCase(),n=o&&/wechatdevtools/.test(o),s=o&&0<o.indexOf("android");function r(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function a(t){for(var e=arguments.length,i=Array(1<e?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];for(var n=0;n<i.length;n++){var s=i[n];for(var r in s)t[r]=s[r]}return t}function l(t){return null==t}var h=i&&document.createElement("div").style,c=function(){if(!i)return!1;var t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(var e in t)if(void 0!==h[t[e]])return e;return!1}();function p(t){return!1!==c&&("standard"===c?"transitionEnd"===t?"transitionend":t:c+t.charAt(0).toUpperCase()+t.substr(1))}function d(t,e,i,o){t.addEventListener(e,i,{passive:!1,capture:!!o})}function u(t,e,i,o){t.removeEventListener(e,i,{passive:!1,capture:!!o})}function f(t){for(var e=0,i=0;t;)e-=t.offsetLeft,i-=t.offsetTop,t=t.offsetParent;return{left:e,top:i}}c&&"standard"!==c&&c.toLowerCase();var m=p("transform"),v=p("transition"),g=i&&p("perspective")in h,y=i&&("ontouchstart"in window||n),b=!1!==m,w=i&&v in h,x={transform:m,transition:v,transitionTimingFunction:p("transitionTimingFunction"),transitionDuration:p("transitionDuration"),transitionDelay:p("transitionDelay"),transformOrigin:p("transformOrigin"),transitionEnd:p("transitionEnd")},T={touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2};function S(t){if(t instanceof window.SVGElement){var e=t.getBoundingClientRect();return{top:e.top,left:e.left,width:e.width,height:e.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}function Y(t,e){for(var i in e)if(e[i].test(t[i]))return!0;return!1}function M(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"click",i=void 0;"mouseup"===t.type||"mousecancel"===t.type?i=t:"touchend"!==t.type&&"touchcancel"!==t.type||(i=t.changedTouches[0]);var o={};i&&(o.screenX=i.screenX||0,o.screenY=i.screenY||0,o.clientX=i.clientX||0,o.clientY=i.clientY||0);var n=void 0,s=!0,r=!0;if("undefined"!=typeof MouseEvent)try{n=new MouseEvent(e,a({bubbles:s,cancelable:r},o))}catch(t){l()}else l();function l(){(n=document.createEvent("Event")).initEvent(e,s,r),a(n,o)}n.forwardedTouchEvent=!0,n._constructed=!0,t.target.dispatchEvent(n)}var k={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:y,disableTouch:!y,observeDOM:!0,autoBlur:!0,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1,mouseWheel:!1,stopPropagation:!1,zoom:!1,infinity:!1,dblclick:!1},D={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 E(t,e,i,o,n,s,r){var a=t-e,l=Math.abs(a)/i,h=r.deceleration,c=r.itemHeight,p=r.swipeBounceTime,d=r.wheel,u=r.swipeTime,f=d?4:15,m=t+l/h*(a<0?-1:1);return d&&c&&(m=Math.round(m/c)*c),m<o?(m=s?Math.max(o-s/4,o-s/f*l):o,u=p):n<m&&(m=s?Math.min(n+s/4,n+s/f*l):n,u=p),{destination:Math.round(m),duration:u}}function _(){}var X,O,L,C,I,P=i?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}:_,A=i?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:_;function H(t){console.error("[BScroll warn]: "+t)}function j(t,e){this.wrapper="string"==typeof t?document.querySelector(t):t,this.wrapper||H("Can not resolve the wrapper DOM."),this.scroller=this.wrapper.children[0],this.scroller||H("The wrapper need at least one child element to be scroller."),this.scrollerStyle=this.scroller.style,this._init(e)}return(X=j).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()},X.prototype.setScale=function(t){this.lastScale=l(this.scale)?t:this.scale,this.scale=t},X.prototype._handleOptions=function(t){this.options=a({},k,t),this.translateZ=this.options.HWCompositing&&g?" translateZ(0)":"",this.options.useTransition=this.options.useTransition&&w,this.options.useTransform=this.options.useTransform&&b,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")},X.prototype._addDOMEvents=function(){var t=d;this._handleDOMEvents(t)},X.prototype._removeDOMEvents=function(){var t=u;this._handleDOMEvents(t)},X.prototype._handleDOMEvents=function(t){var e=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(e,"mousemove",this),t(e,"mousecancel",this),t(e,"mouseup",this)),y&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(e,"touchmove",this),t(e,"touchcancel",this),t(e,"touchend",this)),t(this.scroller,x.transitionEnd,this)},X.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()},X.prototype._watchTransition=function(){if("function"==typeof Object.defineProperty){var t=this,e=!1,i=this.options.useTransition?"isInTransition":"isAnimating";Object.defineProperty(this,i,{get:function(){return e},set:function(i){e=i;for(var o=t.scroller.children.length?t.scroller.children:[t.scroller],n=e&&!t.pulling?"none":"auto",s=0;s<o.length;s++)o[s].style.pointerEvents=n}})}},X.prototype._handleAutoBlur=function(){this.on("scrollStart",function(){var t=document.activeElement;!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName||t.blur()})},X.prototype._initDOMObserver=function(){var t=this;if("undefined"!=typeof MutationObserver){var e=void 0,i=new MutationObserver(function(i){if(!t._shouldNotRefresh()){for(var o=!1,n=!1,s=0;s<i.length;s++){var r=i[s];if("attributes"!==r.type){o=!0;break}if(r.target!==t.scroller){n=!0;break}}o?t.refresh():n&&(clearTimeout(e),e=setTimeout(function(){t._shouldNotRefresh()||t.refresh()},60))}});i.observe(this.scroller,{attributes:!0,childList:!0,subtree:!0}),this.on("destroy",function(){i.disconnect()})}else this._checkDOMUpdate()},X.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},X.prototype._checkDOMUpdate=function(){var t=S(this.scroller),e=t.width,i=t.height;(function o(){var n=this;setTimeout(function(){(function(){if(!this.destroyed){var n=(t=S(this.scroller)).width,s=t.height;e===n&&i===s||this.refresh(),e=n,i=s,o.call(this)}}).call(n)},1e3)}).call(this)},X.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t),this.options.zoom&&t.touches&&1<t.touches.length&&this._zoomStart(t);break;case"touchmove":case"mousemove":this.options.zoom&&t.touches&&1<t.touches.length?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&&(Y(t.target,this.options.preventDefaultException)||(t.preventDefault(),t.stopPropagation()));break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._onMouseWheel(t)}},X.prototype.refresh=function(){var t="static"===window.getComputedStyle(this.wrapper,null).position,e=S(this.wrapper);this.wrapperWidth=e.width,this.wrapperHeight=e.height;var i=S(this.scroller);this.scrollerWidth=Math.round(i.width*this.scale),this.scrollerHeight=Math.round(i.height*this.scale),this.relativeX=i.left,this.relativeY=i.top,t&&(this.relativeX-=e.left,this.relativeY-=e.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):1<this.scale&&(this.maxScrollX=this.maxScrollX/2-this.relativeX,this.minScrollX=this.maxScrollX),this.maxScrollY<0?(this.maxScrollY-=this.relativeY,this.minScrollY=-this.relativeY):1<this.scale&&(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=f(this.wrapper),this.trigger("refresh"),!this.scaled&&this.resetPosition()},X.prototype.enable=function(){this.enabled=!0},X.prototype.disable=function(){this.enabled=!1},(O=j).prototype._start=function(t){var e=T[t.type];if((1===e||0===t.button)&&!(!this.enabled||this.destroyed||this.initiated&&this.initiated!==e)){this.initiated=e,this.options.preventDefault&&!Y(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=r(),this.options.wheel&&(this.target=t.target),this.stop();var i=t.touches?t.touches[0]:t;this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=i.pageX,this.pointY=i.pageY,this.trigger("beforeScrollStart")}},O.prototype._move=function(t){if(this.enabled&&!this.destroyed&&T[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation();var e=t.touches?t.touches[0]:t,i=e.pageX-this.pointX,o=e.pageY-this.pointY;this.pointX=e.pageX,this.pointY=e.pageY,this.distX+=i,this.distY+=o;var n=Math.abs(this.distX),s=Math.abs(this.distY),a=r();if(!(a-this.endTime>this.options.momentumLimitTime&&s<this.options.momentumLimitDistance&&n<this.options.momentumLimitDistance)){if(this.directionLocked||this.options.freeScroll||(n>s+this.options.directionLockThreshold?this.directionLocked="h":s>=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);o=0}else if("v"===this.directionLocked){if("horizontal"===this.options.eventPassthrough)t.preventDefault();else if("vertical"===this.options.eventPassthrough)return void(this.initiated=!1);i=0}i=this.hasHorizontalScroll?i:0,o=this.hasVerticalScroll?o:0,this.movingDirectionX=0<i?-1:i<0?1:0,this.movingDirectionY=0<o?-1:o<0?1:0;var l=this.x+i,h=this.y+o,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),(l>this.minScrollX||l<this.maxScrollX)&&(l=l>this.minScrollX&&d||l<this.maxScrollX&&u?this.x+i/3:l>this.minScrollX?this.minScrollX:this.maxScrollX),(h>this.minScrollY||h<this.maxScrollY)&&(h=h>this.minScrollY&&c||h<this.maxScrollY&&p?this.y+o/3:h>this.minScrollY?this.minScrollY:this.maxScrollY),this.moved||(this.moved=!0,this.trigger("scrollStart")),this._translate(l,h),a-this.startTime>this.options.momentumLimitTime&&(this.startTime=a,this.startX=this.x,this.startY=this.y,1===this.options.probeType&&this.trigger("scroll",{x:this.x,y:this.y})),1<this.options.probeType&&this.trigger("scroll",{x:this.x,y:this.y});var m=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,v=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,g=this.pointX-m,y=this.pointY-v;(g>document.documentElement.clientWidth-this.options.momentumLimitDistance||g<this.options.momentumLimitDistance||y<this.options.momentumLimitDistance||y>document.documentElement.clientHeight-this.options.momentumLimitDistance)&&this._end(t)}}},O.prototype._end=function(t){if(this.enabled&&!this.destroyed&&T[t.type]===this.initiated){this.initiated=!1,this.options.preventDefault&&!Y(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 e=Math.round(this.x),i=Math.round(this.y),o=e-this.absStartX,n=i-this.absStartY;if(this.directionX=0<o?-1:o<0?1:0,this.directionY=0<n?-1:n<0?1:0,!this.options.pullDownRefresh||!this._checkPullDown())if(this._checkClick(t))this.trigger("scrollCancel");else if(!this.resetPosition(this.options.bounceTime,D.bounce)){this._translate(e,i),this.endTime=r();var s=this.endTime-this.startTime,a=Math.abs(e-this.startX),l=Math.abs(i-this.startY);if(this._events.flick&&s<this.options.flickLimitTime&&a<this.options.flickLimitDistance&&l<this.options.flickLimitDistance)this.trigger("flick");else{var h=0;if(this.options.momentum&&s<this.options.momentumLimitTime&&(l>this.options.momentumLimitDistance||a>this.options.momentumLimitDistance)){var 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);var m=-1===this.directionX&&d||1===this.directionX&&u?this.wrapperWidth:0,v=-1===this.directionY&&c||1===this.directionY&&p?this.wrapperHeight:0,g=this.hasHorizontalScroll?E(this.x,this.startX,s,this.maxScrollX,this.minScrollX,m,this.options):{destination:e,duration:0},y=this.hasVerticalScroll?E(this.y,this.startY,s,this.maxScrollY,this.minScrollY,v,this.options):{destination:i,duration:0};e=g.destination,i=y.destination,h=Math.max(g.duration,y.duration),this.isInTransition=!0}else this.options.wheel&&(i=Math.round(i/this.itemHeight)*this.itemHeight,h=this.options.wheel.adjustTime||400);var b=D.swipe;if(this.options.snap){var w=this._nearestSnap(e,i);this.currentPage=w,h=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(e-w.x),1e3),Math.min(Math.abs(i-w.y),1e3)),300),e=w.x,i=w.y,this.directionX=0,this.directionY=0,b=this.options.snap.easing||D.bounce}if(e!==this.x||i!==this.y)return(e>this.minScrollX||e<this.maxScrollX||i>this.minScrollY||i<this.maxScrollY)&&(b=D.swipeBounce),void this.scrollTo(e,i,h,b);this.options.wheel&&(this.selectedIndex=Math.round(Math.abs(this.y/this.itemHeight))),this.trigger("scrollEnd",{x:this.x,y:this.y})}}}},O.prototype._checkClick=function(t){var e,i,o,n,s,a=this.stopFromTransition&&!this.pulling;if(this.stopFromTransition=!1,this.moved)return!1;if(this.options.wheel){if(this.target&&this.target.classList.contains(this.options.wheel.wheelWrapperClass)){var l=Math.abs(Math.round(this.y/this.itemHeight)),h=Math.round((this.pointY+(n=this.wrapper,s=n.getBoundingClientRect(),{left:-(s.left+window.pageXOffset),top:-(s.top+window.pageYOffset)}).top-this.wrapperHeight/2)/this.itemHeight);this.target=this.items[l+h]}return this.scrollToElement(this.target,this.options.wheel.adjustTime||400,!0,!0,D.swipe),!0}if(a)return!1;var c=this.options.dblclick,p=!1;if(c&&this.lastClickTime){var d=c.delay,u=void 0===d?300:d;r()-this.lastClickTime<u&&(p=!0,M(t,"dblclick"))}return this.options.tap&&(e=t,i=this.options.tap,(o=document.createEvent("Event")).initEvent(i,!0,!0),o.pageX=e.pageX,o.pageY=e.pageY,e.target.dispatchEvent(o)),this.options.click&&!Y(t.target,this.options.preventDefaultException)&&M(t),this.lastClickTime=p?null:r(),!0},O.prototype._resize=function(){var t=this;this.enabled&&(s&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling))},O.prototype._startProbe=function(){A(this.probeTimer),this.probeTimer=P(function e(){var i=t.getComputedPosition();t.trigger("scroll",i),t.isInTransition?t.probeTimer=P(e):t.trigger("scrollEnd",i)});var t=this},O.prototype._transitionTime=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;if(this.scrollerStyle[x.transitionDuration]=t+"ms",this.options.wheel)for(var e=0;e<this.items.length;e++)this.items[e].style[x.transitionDuration]=t+"ms";if(this.indicators)for(var i=0;i<this.indicators.length;i++)this.indicators[i].transitionTime(t)},O.prototype._transitionTimingFunction=function(t){if(this.scrollerStyle[x.transitionTimingFunction]=t,this.options.wheel)for(var e=0;e<this.items.length;e++)this.items[e].style[x.transitionTimingFunction]=t;if(this.indicators)for(var i=0;i<this.indicators.length;i++)this.indicators[i].transitionTimingFunction(t)},O.prototype._transitionEnd=function(t){t.target===this.scroller&&this.isInTransition&&(this._transitionTime(),(!this.pulling||1===this.movingDirectionY)&&!this.resetPosition(this.options.bounceTime,D.bounce)&&(this.isInTransition=!1,3!==this.options.probeType&&this.trigger("scrollEnd",{x:this.x,y:this.y})))},O.prototype._translate=function(t,e,i){if(function(t,e){if(!t)throw new Error("[BScroll] Translate x or y is null or undefined.")}(!l(t)&&!l(e)),l(i)&&(i=this.scale),this.options.useTransform?this.scrollerStyle[x.transform]="translate("+t+"px,"+e+"px) scale("+i+")"+this.translateZ:(t=Math.round(t),e=Math.round(e),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=e+"px"),this.options.wheel)for(var o=this.options.wheel.rotate,n=void 0===o?25:o,s=0;s<this.items.length;s++){var r=n*(e/this.itemHeight+s);this.items[s].style[x.transform]="rotateX("+r+"deg)"}if(this.x=t,this.y=e,this.setScale(i),this.indicators)for(var a=0;a<this.indicators.length;a++)this.indicators[a].updatePosition()},O.prototype._animate=function(t,e,i,o){var n=this,s=this.x,a=this.y,l=this.lastScale,h=this.scale,c=r(),p=c+i;this.isAnimating=!0,A(this.animateTimer),function d(){var u=r();if(p<=u)return n.isAnimating=!1,n._translate(t,e,h),n.trigger("scroll",{x:n.x,y:n.y}),void(n.pulling||n.resetPosition(n.options.bounceTime)||n.trigger("scrollEnd",{x:n.x,y:n.y}));var f=o(u=(u-c)/i),m=(t-s)*f+s,v=(e-a)*f+a,g=(h-l)*f+l;n._translate(m,v,g),n.isAnimating&&(n.animateTimer=P(d)),3===n.options.probeType&&n.trigger("scroll",{x:n.x,y:n.y})}()},O.prototype.scrollBy=function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:D.bounce;t=this.x+t,e=this.y+e,this.scrollTo(t,e,i,o)},O.prototype.scrollTo=function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:D.bounce;(this.x!==t||this.y!==e)&&(this.isInTransition=this.options.useTransition&&0<i&&(t!==this.x||e!==this.y),!i||this.options.useTransition?(this._transitionTimingFunction(o.style),this._transitionTime(i),this._translate(t,e),i&&3===this.options.probeType&&this._startProbe(),i||(this.trigger("scroll",{x:t,y:e}),this._reflow=document.body.offsetHeight,this.resetPosition(this.options.bounceTime,D.bounce)||this.trigger("scrollEnd",{x:t,y:e})),this.options.wheel&&(e>this.minScrollY?this.selectedIndex=0:e<this.maxScrollY?this.selectedIndex=this.items.length-1:this.selectedIndex=Math.round(Math.abs(e/this.itemHeight)))):this._animate(t,e,i,o.fn))},O.prototype.scrollToElement=function(t,e,i,o,n){if(t&&(t=t.nodeType?t:this.scroller.querySelector(t),!this.options.wheel||t.classList.contains(this.options.wheel.wheelItemClass))){var s=f(t);s.left-=this.wrapperOffset.left,s.top-=this.wrapperOffset.top,!0===i&&(i=Math.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===o&&(o=Math.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),s.left-=i||0,s.top-=o||0,s.left=s.left>this.minScrollX?this.minScrollX:s.left<this.maxScrollX?this.maxScrollX:s.left,s.top=s.top>this.minScrollY?this.minScrollY:s.top<this.maxScrollY?this.maxScrollY:s.top,this.options.wheel&&(s.top=Math.round(s.top/this.itemHeight)*this.itemHeight),this.scrollTo(s.left,s.top,e,n)}},O.prototype.resetPosition=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:D.bounce,i=this.x,o=Math.round(i);!this.hasHorizontalScroll||o>this.minScrollX?i=this.minScrollX:o<this.maxScrollX&&(i=this.maxScrollX);var n=this.y,s=Math.round(n);return!this.hasVerticalScroll||s>this.minScrollY?n=this.minScrollY:s<this.maxScrollY&&(n=this.maxScrollY),(i!==this.x||n!==this.y)&&(this.scrollTo(i,n,t,e),!0)},O.prototype.getComputedPosition=function(){var t,e=window.getComputedStyle(this.scroller,null),i=void 0;return t=this.options.useTransform?(i=+((e=e[x.transform].split(")")[0].split(", "))[12]||e[4]),+(e[13]||e[5])):(i=+e.left.replace(/[^-\d.]/g,""),+e.top.replace(/[^-\d.]/g,"")),{x:i,y:t}},O.prototype.stop=function(){if(this.options.useTransition&&this.isInTransition){this.isInTransition=!1,A(this.probeTimer);var t=this.getComputedPosition();this._translate(t.x,t.y),this.options.wheel?this.target=this.items[Math.round(-t.y/this.itemHeight)]:this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0}else!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,A(this.animateTimer),this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0)},O.prototype.destroy=function(){this.destroyed=!0,this.trigger("destroy"),this.options.useTransition?A(this.probeTimer):A(this.animateTimer),this._removeDOMEvents(),this._events={}},(L=j).prototype.on=function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this;this._events[t]||(this._events[t]=[]),this._events[t].push([e,i])},L.prototype.once=function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this;function o(){this.off(t,o),e.apply(i,arguments)}o.fn=e,this.on(t,o)},L.prototype.off=function(e,i){var o=this._events[e];if(o)for(var n=o.length;n--;)(o[n][0]===i||o[n][0]&&o[n][0].fn===i)&&t(o,n)},L.prototype.trigger=function(t){var i=this._events[t];if(i)for(var o=i.length,n=[].concat(function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}(i)),s=0;s<o;s++){var r=n[s],a=e(r,2),l=a[0],h=a[1];l&&l.apply(h,[].slice.call(arguments,1))}},(C=j).prototype.wheelTo=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;if(this.options.wheel){var e=-t*this.itemHeight;this.scrollTo(0,e)}},C.prototype.getSelectedIndex=function(){return this.options.wheel&&this.selectedIndex},C.prototype._initWheel=function(){var t=this.options.wheel;t.wheelWrapperClass||(t.wheelWrapperClass="wheel-scroll"),t.wheelItemClass||(t.wheelItemClass="wheel-item"),void 0===t.selectedIndex&&(t.selectedIndex=0,H("wheel option selectedIndex is required!"))},(I=j).prototype._initMouseWheel=function(){var t=this;this._handleMouseWheelEvent(d),this.on("destroy",function(){clearTimeout(t.mouseWheelTimer),clearTimeout(t.mouseWheelEndTimer),t._handleMouseWheelEvent(u)}),this.firstWheelOpreation=!0},I.prototype._handleMouseWheelEvent=function(t){t(this.wrapper,"wheel",this),t(this.wrapper,"mousewheel",this),t(this.wrapper,"DOMMouseScroll",this)},I.prototype._onMouseWheel=function(t){var e=this;if(this.enabled){t.preventDefault(),this.options.stopPropagation&&t.stopPropagation(),this.firstWheelOpreation&&this.trigger("scrollStart"),this.firstWheelOpreation=!1;var i=this.options.mouseWheel,o=i.speed,n=void 0===o?20:o,s=i.invert,r=void 0!==s&&s,a=i.easeTime,l=void 0===a?300:a;clearTimeout(this.mouseWheelTimer),this.mouseWheelTimer=setTimeout(function(){e.options.snap||l||e.trigger("scrollEnd",{x:e.x,y:e.y}),e.firstWheelOpreation=!0},400);var h=void 0,c=void 0;switch(!0){case"deltaX"in t:c=1===t.deltaMode?(h=-t.deltaX*n,-t.deltaY*n):(h=-t.deltaX,-t.deltaY);break;case"wheelDeltaX"in t:h=t.wheelDeltaX/120*n,c=t.wheelDeltaY/120*n;break;case"wheelDelta"in t:h=c=t.wheelDelta/120*n;break;case"detail"in t:h=c=-t.detail/3*n;break;default:return}var p=r?-1:1;h*=p,c*=p,this.hasVerticalScroll||(h=c,c=0);var d=void 0,u=void 0;if(this.options.snap)return d=this.currentPage.pageX,u=this.currentPage.pageY,0<h?d--:h<0&&d++,0<c?u--:c<0&&u++,void this._goToPage(d,u);d=this.x+Math.round(this.hasHorizontalScroll?h:0),u=this.y+Math.round(this.hasVerticalScroll?c:0),this.movingDirectionX=this.directionX=0<h?-1:h<0?1:0,this.movingDirectionY=this.directionY=0<c?-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,l,D.swipe),this.trigger("scroll",{x:this.x,y:this.y}),clearTimeout(this.mouseWheelEndTimer),f&&(this.mouseWheelEndTimer=setTimeout(function(){e.trigger("scrollEnd",{x:e.x,y:e.y})},l))}},j.Version="1.14.1",j},"object"==r(e)&&void 0!==t?t.exports=s():void 0===(n="function"==typeof(o=s)?o.call(e,i,e,t):o)||(t.exports=n)},function(t){t.exports={name:"rolldate",version:"2.1.2",description:"rolldate 移动端日期选择插件",main:"dist/rolldate.min.js",scripts:{build:"cross-env NODE_ENV=production webpack --config config/rolldate.config.js --mode production","build-common":"cross-env NODE_ENV=production webpack --config config/common.config.js --mode production",dev:"cross-env NODE_ENV=development webpack-dev-server --config config/rolldate.config.js --mode development",start:"npm run build-common && npm run build"},keywords:["date","js-date"],repository:{type:"git",url:"https://github.com/weijhfly/rolldate"},author:"雾空",license:"MIT",dependencies:{},devDependencies:{autoprefixer:"^9.0.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-preset-es2015":"^6.24.1","clean-webpack-plugin":"^0.1.19","cross-env":"^5.2.0","css-loader":"^1.0.0","extract-text-webpack-plugin":"^4.0.0-beta.0","html-webpack-plugin":"^3.2.0",less:"^3.8.0","less-loader":"^4.1.0","postcss-loader":"^2.1.6","style-loader":"^0.21.0",webpack:"^4.16.2","webpack-cli":"^3.1.0","webpack-dev-server":"^3.1.5"}}}])}); | ||
| !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rolldate=e():t.rolldate=e()}(window,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},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,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.Date=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();i(1);var s,r=i(6),a=(s=r)&&s.__esModule?s:{default:s};var l=i(7);e.Date=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e&&e.el){var i=this,n=i.$(e.el);if(n&&!n.rolldate&&(n.rolldate=!0,i.extend(e),n.addEventListener("click",function(){if(!i.$(".rolldate-container")){if("INPUT"==n.nodeName&&n.blur(),i.config.tapBefore&&!1===i.config.tapBefore.call(i,n))return!1;i.createUi()}}),e.value)){"INPUT"==n.nodeName?n.value=e.value:n.innerText=e.value;var o=e.value.replace(/-/g,"/").replace(/[^\d\/:\s]/g,""),s=new window.Date(o);"Invalid Date"==s?console.error("无效的日期:"+o):n.date=s}}}return o(t,[{key:"baseData",value:function(){return{date:new window.Date,dateFormat:["YYYY-MM","YYYY-MM-DD","YYYY-MM-DD hh:mm","YYYY-MM-DD hh:mm:ss","YYYY","MM","DD","hh:mm","hh:mm:ss","YYYY-MM-DD hh","hh","mm","ss"],domClass:["rolldate-year","rolldate-month","rolldate-day","rolldate-hour","rolldate-min","rolldate-sec"],opts:{el:"",format:"YYYY-MM-DD",beginYear:2e3,endYear:2100,tapBefore:null,moveEnd:null,confirmBefore:null,confirmEnd:null,minStep:1,lang:{title:"选择日期",cancel:"取消",confirm:"确认",year:"年",month:"月",day:"日",hour:"时",min:"分",sec:"秒"}}}}},{key:"extend",value:function(t){var e=this.baseData().opts;for(var i in e)if(e[i]&&"object"==n(e[i]))for(var o in t[i])e[i][o]=null==t[i][o]?e[i][o]:t[i][o];else e[i]=0===t[i]?0:t[i]||e[i];this.config=e}},{key:"createUi",value:function(){for(var t=this,e=t.baseData(),i=e.dateFormat.indexOf(t.config.format),n=5==(i=i>1?i+1:i)?[e.domClass[0]]:6==i?[e.domClass[1]]:7==i?[e.domClass[2]]:8==i?e.domClass.slice(3,5):9==i?e.domClass.slice(3):10==i?e.domClass.slice(0,4):11==i?e.domClass.slice(3,4):12==i?e.domClass.slice(4,5):13==i?e.domClass.slice(5,6):e.domClass.slice(0,i+2),o=n.length,s="",r=t.$(t.config.el),l=r.date?r.date:e.date,h=t.config.lang,c=0;c<o;c++){s+='<div id="'+n[c]+'"><ul class="wheel-scroll">';var p=0;if(0==c&&(i<6||10==i))for(var d=t.config.beginYear;d<=t.config.endYear;d++)s+='<li class="wheel-item '+(d==l.getFullYear()?"active":"")+'" data-index="'+p+'">'+d+h.year+"</li>",p++;else if(1!=c&&6!=i||!(i<7||10==i))if(2!=c&&7!=i||!(i<=7||10==i)){if(3==c||i>7&&i<12&&0==c)for(var u=0;u<=23;u++)s+='<li class="wheel-item '+(u==l.getHours()?"active":"")+'" data-index="'+p+'">'+(u<10?"0"+u:u)+h.hour+"</li>",p++;else if(4==c||i>7&&1==c||12==i)for(var f=0;f<=59;f+=t.config.minStep)s+='<li class="wheel-item '+(f==l.getMinutes()?"active":"")+'" data-index="'+p+'">'+(f<10?"0"+f:f)+h.min+"</li>",p++;else if(5==c||i>7&&2==c||13==i)for(var m=0;m<=59;m++)s+='<li class="wheel-item '+(m==l.getSeconds()?"active":"")+'" data-index="'+p+'">'+(m<10?"0"+m:m)+h.sec+"</li>",p++}else for(var v=t.bissextile(l.getFullYear(),l.getMonth()+1),g=1;g<=v;g++)s+='<li class="wheel-item '+(g==l.getDate()?"active":"")+'" data-index="'+p+'">'+(g<10?"0"+g:g)+h.day+"</li>",p++;else for(var y=1;y<=12;y++)s+='<li class="wheel-item '+(y==l.getMonth()+1?"active":"")+'" data-index="'+p+'">'+(y<10?"0"+y:y)+h.month+"</li>",p++;s+="</ul></div>"}var b='<div class="rolldate-mask"></div>\n <div class="rolldate-panel fadeIn">\n <header>\n <span class="rolldate-btn rolldate-cancel">'+h.cancel+"</span>\n "+h.title+'\n <span class="rolldate-btn rolldate-confirm">'+h.confirm+'</span>\n </header>\n <section class="rolldate-content">\n <div class="rolldate-dim mask-top"></div>\n <div class="rolldate-dim mask-bottom"></div>\n <div class="rolldate-wrapper">\n '+s+"\n </div>\n </section>\n </div>",w=document.createElement("div");w.className="rolldate-container"+(navigator.userAgent.match(/MicroMessenger/i)?" wx":""),w.innerHTML=b,document.body.appendChild(w),t.scroll=[];for(var x=function(i){t.scroll[i]=new a.default("#"+n[i],{wheel:{selectedIndex:0,wheelWrapperClass:"wheel-scroll",wheelItemClass:"wheel-item"},probeType:1});var o=t.scroll[i],s=t.$("#"+n[i]+" .active"),r=s?s.getAttribute("data-index"):Math.round(l.getMinutes()/5);o.wheelTo(r),o.on("scrollEnd",function(){if(t.config.moveEnd&&t.config.moveEnd.call(t,t.$(t.config.el),o),-1!=e.domClass.slice(0,2).indexOf(o.wrapper.id)&&t.scroll[2]){t.getscrollDay(t.scroll[2]);var i=t.bissextile(t.getscrollDay(t.scroll[0]),t.getscrollDay(t.scroll[1])),n="";if(i!=t.$("#"+e.domClass[2]+" li","all").length){for(var s=1;s<=i;s++)n+='<li class="wheel-item">'+(s<10?"0"+s:s)+"日</li>";t.$("#"+e.domClass[2]+" ul").innerHTML=n,t.scroll[2].refresh()}}})},T=0;T<o;T++)x(T);t.event()}},{key:"$",value:function(t,e){return"string"!=typeof t&&t.nodeType?t:e?document.querySelectorAll(t):document.querySelector(t)}},{key:"event",value:function(){var t=this,e=t.$(".rolldate-mask"),i=t.$(".rolldate-cancel"),n=t.$(".rolldate-confirm");e.addEventListener("click",function(){t.destroy()}),i.addEventListener("click",function(){t.destroy()}),n.addEventListener("click",function(){var e=t.$(t.config.el),i=t.baseData(),n=t.config.format,o=new window.Date,s=i.dateFormat.indexOf(n);if(t.scroll.forEach(function(e,i){var r=t.getscrollDay(e),a=void 0;s<=4||9==s?a=0==i?"YYYY":1==i?"MM":2==i?"DD":3==i?"hh":4==i?"mm":"ss":5==s?a="MM":6==s?a="DD":7==s?a=0==i?"hh":1==i?"mm":"":8==s?a=0==i?"hh":1==i?"mm":"ss":10==s?a="hh":11==s?a="mm":12==s&&(a="ss"),n=n.replace(a,r),"YYYY"==a?o.setFullYear(r):"MM"==a?o.setMonth(r-1):"DD"==a?o.setDate(r):"hh"==a?o.setHours(r):"mm"==a?o.setMinutes(r):"ss"==a&&o.setSeconds(r)}),t.config.confirmBefore){var r=t.config.confirmBefore.call(t,e,n);if(!1===r)return t.config.confirmEnd&&t.config.confirmEnd.call(t,e,n),!1;r&&(n=r)}"INPUT"==e.nodeName?e.value=n:e.innerText=n,t.destroy(),e.date=o})}},{key:"bissextile",value:function(t,e){var i=void 0;return 1==e||3==e||5==e||7==e||8==e||10==e||12==e?i=31:4==e||6==e||11==e||9==e?i=30:2==e&&(i=t%4!=0||t%100==0&&t%400!=0?28:29),i}},{key:"destroy",value:function(){var t=this;if(t.scroll.forEach(function(t,e){t.destroy()}),t.config.confirmEnd){var e=t.$(t.config.el);t.config.confirmEnd.call(t,e)}t.$(".rolldate-panel").className="rolldate-panel fadeOut",setTimeout(function(){document.body.removeChild(t.$(".rolldate-container"))},300)}},{key:"getscrollDay",value:function(t){return this.$("#"+t.wrapper.id+" li","all")[t.getSelectedIndex()].innerText.replace(/\D/g,"")}}]),t}(),e.version=l.version},function(t,e,i){var n=i(2);"string"==typeof n&&(n=[[t.i,n,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};i(4)(n,o);n.locals&&(t.exports=n.locals)},function(t,e,i){(t.exports=i(3)(!1)).push([t.i,"ul {\n margin: 0;\n padding: 0;\n}\nli {\n list-style-type: none;\n}\n.rolldate-container {\n font-size: 20px;\n color: #333;\n text-align: center;\n}\n.rolldate-container header {\n position: relative;\n line-height: 60px;\n font-size: 18px;\n border-bottom: 1px solid #e0e0e0;\n}\n.rolldate-container .rolldate-mask {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #000;\n opacity: 0.5;\n z-index: 100;\n}\n.rolldate-container .rolldate-panel {\n position: fixed;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 273px;\n z-index: 101;\n background: #fff;\n -webkit-animation-duration: 300ms;\n animation-duration: 300ms;\n -webkit-animation-delay: 0s;\n animation-delay: 0s;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n}\n.rolldate-container .rolldate-btn {\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n padding: 0 15px;\n color: #666;\n font-size: 16px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n}\n.rolldate-container.wx .rolldate-btn {\n height: 150%;\n}\n.rolldate-container .rolldate-confirm {\n left: auto;\n right: 0;\n color: #007bff;\n}\n.rolldate-container .rolldate-content {\n position: relative;\n top: 20px;\n}\n.rolldate-container .rolldate-wrapper {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n.rolldate-container .rolldate-wrapper > div {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n height: 173px;\n line-height: 36px;\n overflow: hidden;\n -webkit-flex-basis: -8e;\n -ms-flex-preferred-size: -8e;\n flex-basis: -8e;\n width: 1%;\n}\n.rolldate-container .rolldate-wrapper ul {\n margin-top: 68px;\n}\n.rolldate-container .rolldate-wrapper li {\n height: 36px;\n}\n.rolldate-container .rolldate-dim {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 68px;\n background: -webkit-gradient(linear, left bottom, left top, from(hsla(0, 0%, 100%, 0.4)), to(hsla(0, 0%, 100%, 0.8)));\n background: -webkit-linear-gradient(bottom, hsla(0, 0%, 100%, 0.4), hsla(0, 0%, 100%, 0.8));\n background: -o-linear-gradient(bottom, hsla(0, 0%, 100%, 0.4), hsla(0, 0%, 100%, 0.8));\n background: linear-gradient(0deg, hsla(0, 0%, 100%, 0.4), hsla(0, 0%, 100%, 0.8));\n pointer-events: none;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n z-index: 10;\n}\n.rolldate-container .mask-top {\n border-bottom: 1px solid #ebebeb;\n}\n.rolldate-container .mask-bottom {\n top: auto;\n bottom: 1px;\n border-top: 1px solid #ebebeb;\n}\n.rolldate-container .fadeIn {\n -webkit-animation-name: fadeIn;\n animation-name: fadeIn;\n}\n.rolldate-container .fadeOut {\n -webkit-animation-name: fadeOut;\n animation-name: fadeOut;\n}\n@-webkit-keyframes fadeIn {\n from {\n bottom: -273px;\n }\n to {\n bottom: 0;\n }\n}\n@keyframes fadeIn {\n from {\n bottom: -273px;\n }\n to {\n bottom: 0;\n }\n}\n@-webkit-keyframes fadeOut {\n from {\n bottom: 0;\n }\n to {\n bottom: -273px;\n display: none;\n }\n}\n@keyframes fadeOut {\n from {\n bottom: 0;\n }\n to {\n bottom: -273px;\n display: none;\n }\n}\n@media screen and (max-width: 414px) {\n .rolldate-container {\n font-size: 18px;\n }\n}\n@media screen and (max-width: 320px) {\n .rolldate-container {\n font-size: 15px;\n }\n}\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var o=(r=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),s=n.sources.map(function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"});return[i].concat(s).concat([o]).join("\n")}var r;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i}).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},o=0;o<this.length;o++){var s=this[o][0];"number"==typeof s&&(n[s]=!0)}for(o=0;o<t.length;o++){var r=t[o];"number"==typeof r[0]&&n[r[0]]||(i&&!r[2]?r[2]=i:i&&(r[2]="("+r[2]+") and ("+i+")"),e.push(r))}},e}},function(t,e,i){var n,o,s={},r=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=n.apply(this,arguments)),o}),a=function(t){var e={};return function(t){if("function"==typeof t)return t();if(void 0===e[t]){var i=function(t){return document.querySelector(t)}.call(this,t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}}(),l=null,h=0,c=[],p=i(5);function d(t,e){for(var i=0;i<t.length;i++){var n=t[i],o=s[n.id];if(o){o.refs++;for(var r=0;r<o.parts.length;r++)o.parts[r](n.parts[r]);for(;r<n.parts.length;r++)o.parts.push(y(n.parts[r],e))}else{var a=[];for(r=0;r<n.parts.length;r++)a.push(y(n.parts[r],e));s[n.id]={id:n.id,refs:1,parts:a}}}}function u(t,e){for(var i=[],n={},o=0;o<t.length;o++){var s=t[o],r=e.base?s[0]+e.base:s[0],a={css:s[1],media:s[2],sourceMap:s[3]};n[r]?n[r].parts.push(a):i.push(n[r]={id:r,parts:[a]})}return i}function f(t,e){var i=a(t.insertInto);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=c[c.length-1];if("top"===t.insertAt)n?n.nextSibling?i.insertBefore(e,n.nextSibling):i.appendChild(e):i.insertBefore(e,i.firstChild),c.push(e);else if("bottom"===t.insertAt)i.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=a(t.insertInto+" "+t.insertAt.before);i.insertBefore(e,o)}}function m(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=c.indexOf(t);e>=0&&c.splice(e,1)}function v(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),g(e,t.attrs),f(t,e),e}function g(t,e){Object.keys(e).forEach(function(i){t.setAttribute(i,e[i])})}function y(t,e){var i,n,o,s;if(e.transform&&t.css){if(!(s=e.transform(t.css)))return function(){};t.css=s}if(e.singleton){var r=h++;i=l||(l=v(e)),n=x.bind(null,i,r,!1),o=x.bind(null,i,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),f(t,e),e}(e),n=function(t,e,i){var n=i.css,o=i.sourceMap,s=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||s)&&(n=p(n));o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var r=new Blob([n],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(r),a&&URL.revokeObjectURL(a)}.bind(null,i,e),o=function(){m(i),i.href&&URL.revokeObjectURL(i.href)}):(i=v(e),n=function(t,e){var i=e.css,n=e.media;n&&t.setAttribute("media",n);if(t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}.bind(null,i),o=function(){m(i)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var i=u(t,e);return d(i,e),function(t){for(var n=[],o=0;o<i.length;o++){var r=i[o];(a=s[r.id]).refs--,n.push(a)}t&&d(u(t,e),e);for(o=0;o<n.length;o++){var a;if(0===(a=n[o]).refs){for(var l=0;l<a.parts.length;l++)a.parts[l]();delete s[a.id]}}}};var b,w=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function x(t,e,i,n){var o=i?"":n.css;if(t.styleSheet)t.styleSheet.cssText=w(e,o);else{var s=document.createTextNode(o),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(s,r[e]):t.appendChild(s)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var i=e.protocol+"//"+e.host,n=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var o,s=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(s)?t:(o=0===s.indexOf("//")?s:0===s.indexOf("/")?i+s:n+s.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(t,e,i){"use strict";var n,o,s,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};s=function(){function t(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}var e=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,o=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(n=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(t){o=!0,s=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw s}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i="undefined"!=typeof window,n=i&&navigator.userAgent.toLowerCase(),o=n&&/wechatdevtools/.test(n),s=n&&0<n.indexOf("android");function r(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function a(t){for(var e=arguments.length,i=Array(1<e?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];for(var o=0;o<i.length;o++){var s=i[o];for(var r in s)t[r]=s[r]}return t}function l(t){return null==t}var h=i&&document.createElement("div").style,c=function(){if(!i)return!1;var t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(var e in t)if(void 0!==h[t[e]])return e;return!1}();function p(t){return!1!==c&&("standard"===c?"transitionEnd"===t?"transitionend":t:c+t.charAt(0).toUpperCase()+t.substr(1))}function d(t,e,i,n){t.addEventListener(e,i,{passive:!1,capture:!!n})}function u(t,e,i,n){t.removeEventListener(e,i,{passive:!1,capture:!!n})}function f(t){for(var e=0,i=0;t;)e-=t.offsetLeft,i-=t.offsetTop,t=t.offsetParent;return{left:e,top:i}}c&&"standard"!==c&&c.toLowerCase();var m=p("transform"),v=p("transition"),g=i&&p("perspective")in h,y=i&&("ontouchstart"in window||o),b=!1!==m,w=i&&v in h,x={transform:m,transition:v,transitionTimingFunction:p("transitionTimingFunction"),transitionDuration:p("transitionDuration"),transitionDelay:p("transitionDelay"),transformOrigin:p("transformOrigin"),transitionEnd:p("transitionEnd")},T={touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2};function S(t){if(t instanceof window.SVGElement){var e=t.getBoundingClientRect();return{top:e.top,left:e.left,width:e.width,height:e.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}function Y(t,e){for(var i in e)if(e[i].test(t[i]))return!0;return!1}function k(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"click",i=void 0;"mouseup"===t.type||"mousecancel"===t.type?i=t:"touchend"!==t.type&&"touchcancel"!==t.type||(i=t.changedTouches[0]);var n={};i&&(n.screenX=i.screenX||0,n.screenY=i.screenY||0,n.clientX=i.clientX||0,n.clientY=i.clientY||0);var o=void 0,s=!0,r=!0;if("undefined"!=typeof MouseEvent)try{o=new MouseEvent(e,a({bubbles:s,cancelable:r},n))}catch(t){l()}else l();function l(){(o=document.createEvent("Event")).initEvent(e,s,r),a(o,n)}o.forwardedTouchEvent=!0,o._constructed=!0,t.target.dispatchEvent(o)}var M={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:y,disableTouch:!y,observeDOM:!0,autoBlur:!0,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1,mouseWheel:!1,stopPropagation:!1,zoom:!1,infinity:!1,dblclick:!1},D={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 E(t,e,i,n,o,s,r){var a=t-e,l=Math.abs(a)/i,h=r.deceleration,c=r.itemHeight,p=r.swipeBounceTime,d=r.wheel,u=r.swipeTime,f=d?4:15,m=t+l/h*(a<0?-1:1);return d&&c&&(m=Math.round(m/c)*c),m<n?(m=s?Math.max(n-s/4,n-s/f*l):n,u=p):o<m&&(m=s?Math.min(o+s/4,o+s/f*l):o,u=p),{destination:Math.round(m),duration:u}}function _(){}var X,O,L,C,I=i?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}:_,P=i?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:_;function A(t){console.error("[BScroll warn]: "+t)}function H(t,e){this.wrapper="string"==typeof t?document.querySelector(t):t,this.wrapper||A("Can not resolve the wrapper DOM."),this.scroller=this.wrapper.children[0],this.scroller||A("The wrapper need at least one child element to be scroller."),this.scrollerStyle=this.scroller.style,this._init(e)}return(X=H).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()},X.prototype.setScale=function(t){this.lastScale=l(this.scale)?t:this.scale,this.scale=t},X.prototype._handleOptions=function(t){this.options=a({},M,t),this.translateZ=this.options.HWCompositing&&g?" translateZ(0)":"",this.options.useTransition=this.options.useTransition&&w,this.options.useTransform=this.options.useTransform&&b,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")},X.prototype._addDOMEvents=function(){var t=d;this._handleDOMEvents(t)},X.prototype._removeDOMEvents=function(){var t=u;this._handleDOMEvents(t)},X.prototype._handleDOMEvents=function(t){var e=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(e,"mousemove",this),t(e,"mousecancel",this),t(e,"mouseup",this)),y&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(e,"touchmove",this),t(e,"touchcancel",this),t(e,"touchend",this)),t(this.scroller,x.transitionEnd,this)},X.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()},X.prototype._watchTransition=function(){if("function"==typeof Object.defineProperty){var t=this,e=!1,i=this.options.useTransition?"isInTransition":"isAnimating";Object.defineProperty(this,i,{get:function(){return e},set:function(i){e=i;for(var n=t.scroller.children.length?t.scroller.children:[t.scroller],o=e&&!t.pulling?"none":"auto",s=0;s<n.length;s++)n[s].style.pointerEvents=o}})}},X.prototype._handleAutoBlur=function(){this.on("scrollStart",function(){var t=document.activeElement;!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName||t.blur()})},X.prototype._initDOMObserver=function(){var t=this;if("undefined"!=typeof MutationObserver){var e=void 0,i=new MutationObserver(function(i){if(!t._shouldNotRefresh()){for(var n=!1,o=!1,s=0;s<i.length;s++){var r=i[s];if("attributes"!==r.type){n=!0;break}if(r.target!==t.scroller){o=!0;break}}n?t.refresh():o&&(clearTimeout(e),e=setTimeout(function(){t._shouldNotRefresh()||t.refresh()},60))}});i.observe(this.scroller,{attributes:!0,childList:!0,subtree:!0}),this.on("destroy",function(){i.disconnect()})}else this._checkDOMUpdate()},X.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},X.prototype._checkDOMUpdate=function(){var t=S(this.scroller),e=t.width,i=t.height;(function n(){var o=this;setTimeout(function(){(function(){if(!this.destroyed){var o=(t=S(this.scroller)).width,s=t.height;e===o&&i===s||this.refresh(),e=o,i=s,n.call(this)}}).call(o)},1e3)}).call(this)},X.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t),this.options.zoom&&t.touches&&1<t.touches.length&&this._zoomStart(t);break;case"touchmove":case"mousemove":this.options.zoom&&t.touches&&1<t.touches.length?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&&(Y(t.target,this.options.preventDefaultException)||(t.preventDefault(),t.stopPropagation()));break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._onMouseWheel(t)}},X.prototype.refresh=function(){var t="static"===window.getComputedStyle(this.wrapper,null).position,e=S(this.wrapper);this.wrapperWidth=e.width,this.wrapperHeight=e.height;var i=S(this.scroller);this.scrollerWidth=Math.round(i.width*this.scale),this.scrollerHeight=Math.round(i.height*this.scale),this.relativeX=i.left,this.relativeY=i.top,t&&(this.relativeX-=e.left,this.relativeY-=e.top),this.minScrollX=0,this.minScrollY=0;var n=this.options.wheel;n?(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=n.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):1<this.scale&&(this.maxScrollX=this.maxScrollX/2-this.relativeX,this.minScrollX=this.maxScrollX),this.maxScrollY<0?(this.maxScrollY-=this.relativeY,this.minScrollY=-this.relativeY):1<this.scale&&(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=f(this.wrapper),this.trigger("refresh"),!this.scaled&&this.resetPosition()},X.prototype.enable=function(){this.enabled=!0},X.prototype.disable=function(){this.enabled=!1},(O=H).prototype._start=function(t){var e=T[t.type];if((1===e||0===t.button)&&!(!this.enabled||this.destroyed||this.initiated&&this.initiated!==e)){this.initiated=e,this.options.preventDefault&&!Y(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=r(),this.options.wheel&&(this.target=t.target),this.stop();var i=t.touches?t.touches[0]:t;this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=i.pageX,this.pointY=i.pageY,this.trigger("beforeScrollStart")}},O.prototype._move=function(t){if(this.enabled&&!this.destroyed&&T[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation();var e=t.touches?t.touches[0]:t,i=e.pageX-this.pointX,n=e.pageY-this.pointY;this.pointX=e.pageX,this.pointY=e.pageY,this.distX+=i,this.distY+=n;var o=Math.abs(this.distX),s=Math.abs(this.distY),a=r();if(!(a-this.endTime>this.options.momentumLimitTime&&s<this.options.momentumLimitDistance&&o<this.options.momentumLimitDistance)){if(this.directionLocked||this.options.freeScroll||(o>s+this.options.directionLockThreshold?this.directionLocked="h":s>=o+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);n=0}else if("v"===this.directionLocked){if("horizontal"===this.options.eventPassthrough)t.preventDefault();else if("vertical"===this.options.eventPassthrough)return void(this.initiated=!1);i=0}i=this.hasHorizontalScroll?i:0,n=this.hasVerticalScroll?n:0,this.movingDirectionX=0<i?-1:i<0?1:0,this.movingDirectionY=0<n?-1:n<0?1:0;var l=this.x+i,h=this.y+n,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),(l>this.minScrollX||l<this.maxScrollX)&&(l=l>this.minScrollX&&d||l<this.maxScrollX&&u?this.x+i/3:l>this.minScrollX?this.minScrollX:this.maxScrollX),(h>this.minScrollY||h<this.maxScrollY)&&(h=h>this.minScrollY&&c||h<this.maxScrollY&&p?this.y+n/3:h>this.minScrollY?this.minScrollY:this.maxScrollY),this.moved||(this.moved=!0,this.trigger("scrollStart")),this._translate(l,h),a-this.startTime>this.options.momentumLimitTime&&(this.startTime=a,this.startX=this.x,this.startY=this.y,1===this.options.probeType&&this.trigger("scroll",{x:this.x,y:this.y})),1<this.options.probeType&&this.trigger("scroll",{x:this.x,y:this.y});var m=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,v=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,g=this.pointX-m,y=this.pointY-v;(g>document.documentElement.clientWidth-this.options.momentumLimitDistance||g<this.options.momentumLimitDistance||y<this.options.momentumLimitDistance||y>document.documentElement.clientHeight-this.options.momentumLimitDistance)&&this._end(t)}}},O.prototype._end=function(t){if(this.enabled&&!this.destroyed&&T[t.type]===this.initiated){this.initiated=!1,this.options.preventDefault&&!Y(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 e=Math.round(this.x),i=Math.round(this.y),n=e-this.absStartX,o=i-this.absStartY;if(this.directionX=0<n?-1:n<0?1:0,this.directionY=0<o?-1:o<0?1:0,!this.options.pullDownRefresh||!this._checkPullDown())if(this._checkClick(t))this.trigger("scrollCancel");else if(!this.resetPosition(this.options.bounceTime,D.bounce)){this._translate(e,i),this.endTime=r();var s=this.endTime-this.startTime,a=Math.abs(e-this.startX),l=Math.abs(i-this.startY);if(this._events.flick&&s<this.options.flickLimitTime&&a<this.options.flickLimitDistance&&l<this.options.flickLimitDistance)this.trigger("flick");else{var h=0;if(this.options.momentum&&s<this.options.momentumLimitTime&&(l>this.options.momentumLimitDistance||a>this.options.momentumLimitDistance)){var 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);var m=-1===this.directionX&&d||1===this.directionX&&u?this.wrapperWidth:0,v=-1===this.directionY&&c||1===this.directionY&&p?this.wrapperHeight:0,g=this.hasHorizontalScroll?E(this.x,this.startX,s,this.maxScrollX,this.minScrollX,m,this.options):{destination:e,duration:0},y=this.hasVerticalScroll?E(this.y,this.startY,s,this.maxScrollY,this.minScrollY,v,this.options):{destination:i,duration:0};e=g.destination,i=y.destination,h=Math.max(g.duration,y.duration),this.isInTransition=!0}else this.options.wheel&&(i=Math.round(i/this.itemHeight)*this.itemHeight,h=this.options.wheel.adjustTime||400);var b=D.swipe;if(this.options.snap){var w=this._nearestSnap(e,i);this.currentPage=w,h=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(e-w.x),1e3),Math.min(Math.abs(i-w.y),1e3)),300),e=w.x,i=w.y,this.directionX=0,this.directionY=0,b=this.options.snap.easing||D.bounce}if(e!==this.x||i!==this.y)return(e>this.minScrollX||e<this.maxScrollX||i>this.minScrollY||i<this.maxScrollY)&&(b=D.swipeBounce),void this.scrollTo(e,i,h,b);this.options.wheel&&(this.selectedIndex=Math.round(Math.abs(this.y/this.itemHeight))),this.trigger("scrollEnd",{x:this.x,y:this.y})}}}},O.prototype._checkClick=function(t){var e,i,n,o,s,a=this.stopFromTransition&&!this.pulling;if(this.stopFromTransition=!1,this.moved)return!1;if(this.options.wheel){if(this.target&&this.target.classList.contains(this.options.wheel.wheelWrapperClass)){var l=Math.abs(Math.round(this.y/this.itemHeight)),h=Math.round((this.pointY+(o=this.wrapper,s=o.getBoundingClientRect(),{left:-(s.left+window.pageXOffset),top:-(s.top+window.pageYOffset)}).top-this.wrapperHeight/2)/this.itemHeight);this.target=this.items[l+h]}return this.scrollToElement(this.target,this.options.wheel.adjustTime||400,!0,!0,D.swipe),!0}if(a)return!1;var c=this.options.dblclick,p=!1;if(c&&this.lastClickTime){var d=c.delay,u=void 0===d?300:d;r()-this.lastClickTime<u&&(p=!0,k(t,"dblclick"))}return this.options.tap&&(e=t,i=this.options.tap,(n=document.createEvent("Event")).initEvent(i,!0,!0),n.pageX=e.pageX,n.pageY=e.pageY,e.target.dispatchEvent(n)),this.options.click&&!Y(t.target,this.options.preventDefaultException)&&k(t),this.lastClickTime=p?null:r(),!0},O.prototype._resize=function(){var t=this;this.enabled&&(s&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling))},O.prototype._startProbe=function(){P(this.probeTimer),this.probeTimer=I(function e(){var i=t.getComputedPosition();t.trigger("scroll",i),t.isInTransition?t.probeTimer=I(e):t.trigger("scrollEnd",i)});var t=this},O.prototype._transitionTime=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;if(this.scrollerStyle[x.transitionDuration]=t+"ms",this.options.wheel)for(var e=0;e<this.items.length;e++)this.items[e].style[x.transitionDuration]=t+"ms";if(this.indicators)for(var i=0;i<this.indicators.length;i++)this.indicators[i].transitionTime(t)},O.prototype._transitionTimingFunction=function(t){if(this.scrollerStyle[x.transitionTimingFunction]=t,this.options.wheel)for(var e=0;e<this.items.length;e++)this.items[e].style[x.transitionTimingFunction]=t;if(this.indicators)for(var i=0;i<this.indicators.length;i++)this.indicators[i].transitionTimingFunction(t)},O.prototype._transitionEnd=function(t){t.target===this.scroller&&this.isInTransition&&(this._transitionTime(),(!this.pulling||1===this.movingDirectionY)&&!this.resetPosition(this.options.bounceTime,D.bounce)&&(this.isInTransition=!1,3!==this.options.probeType&&this.trigger("scrollEnd",{x:this.x,y:this.y})))},O.prototype._translate=function(t,e,i){if(function(t,e){if(!t)throw new Error("[BScroll] Translate x or y is null or undefined.")}(!l(t)&&!l(e)),l(i)&&(i=this.scale),this.options.useTransform?this.scrollerStyle[x.transform]="translate("+t+"px,"+e+"px) scale("+i+")"+this.translateZ:(t=Math.round(t),e=Math.round(e),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=e+"px"),this.options.wheel)for(var n=this.options.wheel.rotate,o=void 0===n?25:n,s=0;s<this.items.length;s++){var r=o*(e/this.itemHeight+s);this.items[s].style[x.transform]="rotateX("+r+"deg)"}if(this.x=t,this.y=e,this.setScale(i),this.indicators)for(var a=0;a<this.indicators.length;a++)this.indicators[a].updatePosition()},O.prototype._animate=function(t,e,i,n){var o=this,s=this.x,a=this.y,l=this.lastScale,h=this.scale,c=r(),p=c+i;this.isAnimating=!0,P(this.animateTimer),function d(){var u=r();if(p<=u)return o.isAnimating=!1,o._translate(t,e,h),o.trigger("scroll",{x:o.x,y:o.y}),void(o.pulling||o.resetPosition(o.options.bounceTime)||o.trigger("scrollEnd",{x:o.x,y:o.y}));var f=n(u=(u-c)/i),m=(t-s)*f+s,v=(e-a)*f+a,g=(h-l)*f+l;o._translate(m,v,g),o.isAnimating&&(o.animateTimer=I(d)),3===o.options.probeType&&o.trigger("scroll",{x:o.x,y:o.y})}()},O.prototype.scrollBy=function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:D.bounce;t=this.x+t,e=this.y+e,this.scrollTo(t,e,i,n)},O.prototype.scrollTo=function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:D.bounce;(this.x!==t||this.y!==e)&&(this.isInTransition=this.options.useTransition&&0<i&&(t!==this.x||e!==this.y),!i||this.options.useTransition?(this._transitionTimingFunction(n.style),this._transitionTime(i),this._translate(t,e),i&&3===this.options.probeType&&this._startProbe(),i||(this.trigger("scroll",{x:t,y:e}),this._reflow=document.body.offsetHeight,this.resetPosition(this.options.bounceTime,D.bounce)||this.trigger("scrollEnd",{x:t,y:e})),this.options.wheel&&(e>this.minScrollY?this.selectedIndex=0:e<this.maxScrollY?this.selectedIndex=this.items.length-1:this.selectedIndex=Math.round(Math.abs(e/this.itemHeight)))):this._animate(t,e,i,n.fn))},O.prototype.scrollToElement=function(t,e,i,n,o){if(t&&(t=t.nodeType?t:this.scroller.querySelector(t),!this.options.wheel||t.classList.contains(this.options.wheel.wheelItemClass))){var s=f(t);s.left-=this.wrapperOffset.left,s.top-=this.wrapperOffset.top,!0===i&&(i=Math.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===n&&(n=Math.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),s.left-=i||0,s.top-=n||0,s.left=s.left>this.minScrollX?this.minScrollX:s.left<this.maxScrollX?this.maxScrollX:s.left,s.top=s.top>this.minScrollY?this.minScrollY:s.top<this.maxScrollY?this.maxScrollY:s.top,this.options.wheel&&(s.top=Math.round(s.top/this.itemHeight)*this.itemHeight),this.scrollTo(s.left,s.top,e,o)}},O.prototype.resetPosition=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:D.bounce,i=this.x,n=Math.round(i);!this.hasHorizontalScroll||n>this.minScrollX?i=this.minScrollX:n<this.maxScrollX&&(i=this.maxScrollX);var o=this.y,s=Math.round(o);return!this.hasVerticalScroll||s>this.minScrollY?o=this.minScrollY:s<this.maxScrollY&&(o=this.maxScrollY),(i!==this.x||o!==this.y)&&(this.scrollTo(i,o,t,e),!0)},O.prototype.getComputedPosition=function(){var t,e=window.getComputedStyle(this.scroller,null),i=void 0;return t=this.options.useTransform?(i=+((e=e[x.transform].split(")")[0].split(", "))[12]||e[4]),+(e[13]||e[5])):(i=+e.left.replace(/[^-\d.]/g,""),+e.top.replace(/[^-\d.]/g,"")),{x:i,y:t}},O.prototype.stop=function(){if(this.options.useTransition&&this.isInTransition){this.isInTransition=!1,P(this.probeTimer);var t=this.getComputedPosition();this._translate(t.x,t.y),this.options.wheel?this.target=this.items[Math.round(-t.y/this.itemHeight)]:this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0}else!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,P(this.animateTimer),this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0)},O.prototype.destroy=function(){this.destroyed=!0,this.trigger("destroy"),this.options.useTransition?P(this.probeTimer):P(this.animateTimer),this._removeDOMEvents(),this._events={}},(L=H).prototype.on=function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this;this._events[t]||(this._events[t]=[]),this._events[t].push([e,i])},L.prototype.once=function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this;function n(){this.off(t,n),e.apply(i,arguments)}n.fn=e,this.on(t,n)},L.prototype.off=function(e,i){var n=this._events[e];if(n)for(var o=n.length;o--;)(n[o][0]===i||n[o][0]&&n[o][0].fn===i)&&t(n,o)},L.prototype.trigger=function(t){var i=this._events[t];if(i)for(var n=i.length,o=[].concat(function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}(i)),s=0;s<n;s++){var r=o[s],a=e(r,2),l=a[0],h=a[1];l&&l.apply(h,[].slice.call(arguments,1))}},(C=H).prototype.wheelTo=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;if(this.options.wheel){var e=-t*this.itemHeight;this.scrollTo(0,e)}},C.prototype.getSelectedIndex=function(){return this.options.wheel&&this.selectedIndex},C.prototype._initWheel=function(){var t=this.options.wheel;t.wheelWrapperClass||(t.wheelWrapperClass="wheel-scroll"),t.wheelItemClass||(t.wheelItemClass="wheel-item"),void 0===t.selectedIndex&&(t.selectedIndex=0,A("wheel option selectedIndex is required!"))},H.Version="1.14.1",H},"object"==r(e)&&void 0!==t?t.exports=s():void 0===(o="function"==typeof(n=s)?n.call(e,i,e,t):n)||(t.exports=o)},function(t){t.exports={name:"rolldate",version:"2.1.3",description:"rolldate 移动端日期选择插件",main:"dist/rolldate.min.js",scripts:{build:"cross-env NODE_ENV=production webpack --config config/rolldate.config.js --mode production","build-common":"cross-env NODE_ENV=production webpack --config config/common.config.js --mode production",dev:"cross-env NODE_ENV=development webpack-dev-server --config config/rolldate.config.js --mode development",start:"npm run build-common && npm run build"},keywords:["date","js-date"],repository:{type:"git",url:"https://github.com/weijhfly/rolldate"},author:"雾空",license:"MIT",dependencies:{},devDependencies:{autoprefixer:"^9.0.1","babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-preset-es2015":"^6.24.1","clean-webpack-plugin":"^0.1.19","cross-env":"^5.2.0","css-loader":"^1.0.0","extract-text-webpack-plugin":"^4.0.0-beta.0","html-webpack-plugin":"^3.2.0",less:"^3.8.0","less-loader":"^4.1.0","postcss-loader":"^2.1.6","style-loader":"^0.21.0",webpack:"^4.16.2","webpack-cli":"^3.1.0","webpack-dev-server":"^3.1.5"}}}])}); |
+1
-1
| { | ||
| "name": "rolldate", | ||
| "version": "2.1.2", | ||
| "version": "2.1.3", | ||
| "description": "rolldate 移动端日期选择插件", | ||
@@ -5,0 +5,0 @@ "main": "dist/rolldate.min.js", |
@@ -6,2 +6,2 @@ /*! | ||
| */ | ||
| !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):t.BScroll=i()}(this,function(){"use strict";function o(t,i){for(;i+1<t.length;i++)t[i]=t[i+1];t.pop()}var l=function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,i){var e=[],s=!0,o=!1,n=void 0;try{for(var r,h=t[Symbol.iterator]();!(s=(r=h.next()).done)&&(e.push(r.value),!i||e.length!==i);s=!0);}catch(t){o=!0,n=t}finally{try{!s&&h.return&&h.return()}finally{if(o)throw n}}return e}(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")};var e="undefined"!=typeof window,t=e&&navigator.userAgent.toLowerCase(),i=t&&/wechatdevtools/.test(t),s=t&&0<t.indexOf("android");function T(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function a(t){for(var i=arguments.length,e=Array(1<i?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 c(t){return null==t}var n=e&&document.createElement("div").style,r=function(){if(!e)return!1;var t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(var i in t)if(void 0!==n[t[i]])return i;return!1}();function h(t){return!1!==r&&("standard"===r?"transitionEnd"===t?"transitionend":t:r+t.charAt(0).toUpperCase()+t.substr(1))}function p(t,i,e,s){t.addEventListener(i,e,{passive:!1,capture:!!s})}function u(t,i,e,s){t.removeEventListener(i,e,{passive:!1,capture:!!s})}function m(t){for(var i=0,e=0;t;)i-=t.offsetLeft,e-=t.offsetTop,t=t.offsetParent;return{left:i,top:e}}r&&"standard"!==r&&r.toLowerCase();var d=h("transform"),f=h("transition"),v=e&&h("perspective")in n,g=e&&("ontouchstart"in window||i),y=!1!==d,w=e&&f in n,S={transform:d,transition:f,transitionTimingFunction:h("transitionTimingFunction"),transitionDuration:h("transitionDuration"),transitionDelay:h("transitionDelay"),transformOrigin:h("transformOrigin"),transitionEnd:h("transitionEnd")},x={touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2};function b(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 X(t,i){for(var e in i)if(i[e].test(t[e]))return!0;return!1}function Y(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"click",e=void 0;"mouseup"===t.type||"mousecancel"===t.type?e=t:"touchend"!==t.type&&"touchcancel"!==t.type||(e=t.changedTouches[0]);var s={};e&&(s.screenX=e.screenX||0,s.screenY=e.screenY||0,s.clientX=e.clientX||0,s.clientY=e.clientY||0);var o=void 0,n=!0,r=!0;if("undefined"!=typeof MouseEvent)try{o=new MouseEvent(i,a({bubbles:n,cancelable:r},s))}catch(t){h()}else h();function h(){(o=document.createEvent("Event")).initEvent(i,n,r),a(o,s)}o.forwardedTouchEvent=!0,o._constructed=!0,t.target.dispatchEvent(o)}var _={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:g,disableTouch:!g,observeDOM:!0,autoBlur:!0,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1,mouseWheel:!1,stopPropagation:!1,zoom:!1,infinity:!1,dblclick:!1};var M={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 E(t,i,e,s,o,n,r){var h=t-i,a=Math.abs(h)/e,l=r.deceleration,c=r.itemHeight,p=r.swipeBounceTime,u=r.wheel,m=r.swipeTime,d=u?4:15,f=t+a/l*(h<0?-1:1);return u&&c&&(f=Math.round(f/c)*c),f<s?(f=n?Math.max(s-n/4,s-n/d*a):s,m=p):o<f&&(f=n?Math.min(o+n/4,o+n/d*a):o,m=p),{destination:Math.round(f),duration:m}}function D(){}var k,P,L,O,W,H=e?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}:D,z=e?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:D;function I(t){console.error("[BScroll warn]: "+t)}function A(t,i){this.wrapper="string"==typeof t?document.querySelector(t):t,this.wrapper||I("Can not resolve the wrapper DOM."),this.scroller=this.wrapper.children[0],this.scroller||I("The wrapper need at least one child element to be scroller."),this.scrollerStyle=this.scroller.style,this._init(i)}return(k=A).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()},k.prototype.setScale=function(t){this.lastScale=c(this.scale)?t:this.scale,this.scale=t},k.prototype._handleOptions=function(t){this.options=a({},_,t),this.translateZ=this.options.HWCompositing&&v?" translateZ(0)":"",this.options.useTransition=this.options.useTransition&&w,this.options.useTransform=this.options.useTransform&&y,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")},k.prototype._addDOMEvents=function(){var t=p;this._handleDOMEvents(t)},k.prototype._removeDOMEvents=function(){var t=u;this._handleDOMEvents(t)},k.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)),g&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(i,"touchmove",this),t(i,"touchcancel",this),t(i,"touchend",this)),t(this.scroller,S.transitionEnd,this)},k.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()},k.prototype._watchTransition=function(){if("function"==typeof Object.defineProperty){var o=this,n=!1,t=this.options.useTransition?"isInTransition":"isAnimating";Object.defineProperty(this,t,{get:function(){return n},set:function(t){n=t;for(var i=o.scroller.children.length?o.scroller.children:[o.scroller],e=n&&!o.pulling?"none":"auto",s=0;s<i.length;s++)i[s].style.pointerEvents=e}})}},k.prototype._handleAutoBlur=function(){this.on("scrollStart",function(){var t=document.activeElement;!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName||t.blur()})},k.prototype._initDOMObserver=function(){var n=this;if("undefined"!=typeof MutationObserver){var r=void 0,t=new MutationObserver(function(t){if(!n._shouldNotRefresh()){for(var i=!1,e=!1,s=0;s<t.length;s++){var o=t[s];if("attributes"!==o.type){i=!0;break}if(o.target!==n.scroller){e=!0;break}}i?n.refresh():e&&(clearTimeout(r),r=setTimeout(function(){n._shouldNotRefresh()||n.refresh()},60))}});t.observe(this.scroller,{attributes:!0,childList:!0,subtree:!0}),this.on("destroy",function(){t.disconnect()})}else this._checkDOMUpdate()},k.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},k.prototype._checkDOMUpdate=function(){var e=b(this.scroller),s=e.width,o=e.height;function n(){var t=this;setTimeout(function(){(function(){if(!this.destroyed){var t=(e=b(this.scroller)).width,i=e.height;s===t&&o===i||this.refresh(),s=t,o=i,n.call(this)}}).call(t)},1e3)}n.call(this)},k.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t),this.options.zoom&&t.touches&&1<t.touches.length&&this._zoomStart(t);break;case"touchmove":case"mousemove":this.options.zoom&&t.touches&&1<t.touches.length?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&&(X(t.target,this.options.preventDefaultException)||(t.preventDefault(),t.stopPropagation()));break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._onMouseWheel(t)}},k.prototype.refresh=function(){var t="static"===window.getComputedStyle(this.wrapper,null).position,i=b(this.wrapper);this.wrapperWidth=i.width,this.wrapperHeight=i.height;var e=b(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.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):1<this.scale&&(this.maxScrollX=this.maxScrollX/2-this.relativeX,this.minScrollX=this.maxScrollX),this.maxScrollY<0?(this.maxScrollY-=this.relativeY,this.minScrollY=-this.relativeY):1<this.scale&&(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=m(this.wrapper),this.trigger("refresh"),!this.scaled&&this.resetPosition()},k.prototype.enable=function(){this.enabled=!0},k.prototype.disable=function(){this.enabled=!1},(P=A).prototype._start=function(t){var i=x[t.type];if((1===i||0===t.button)&&!(!this.enabled||this.destroyed||this.initiated&&this.initiated!==i)){this.initiated=i,this.options.preventDefault&&!X(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=T(),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")}},P.prototype._move=function(t){if(this.enabled&&!this.destroyed&&x[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 o=Math.abs(this.distX),n=Math.abs(this.distY),r=T();if(!(r-this.endTime>this.options.momentumLimitTime&&n<this.options.momentumLimitDistance&&o<this.options.momentumLimitDistance)){if(this.directionLocked||this.options.freeScroll||(o>n+this.options.directionLockThreshold?this.directionLocked="h":n>=o+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=0<e?-1:e<0?1:0,this.movingDirectionY=0<s?-1:s<0?1:0;var h=this.x+e,a=this.y+s,l=!1,c=!1,p=!1,u=!1,m=this.options.bounce;!1!==m&&(l=void 0===m.top||m.top,c=void 0===m.bottom||m.bottom,p=void 0===m.left||m.left,u=void 0===m.right||m.right),(h>this.minScrollX||h<this.maxScrollX)&&(h=h>this.minScrollX&&p||h<this.maxScrollX&&u?this.x+e/3:h>this.minScrollX?this.minScrollX:this.maxScrollX),(a>this.minScrollY||a<this.maxScrollY)&&(a=a>this.minScrollY&&l||a<this.maxScrollY&&c?this.y+s/3:a>this.minScrollY?this.minScrollY:this.maxScrollY),this.moved||(this.moved=!0,this.trigger("scrollStart")),this._translate(h,a),r-this.startTime>this.options.momentumLimitTime&&(this.startTime=r,this.startX=this.x,this.startY=this.y,1===this.options.probeType&&this.trigger("scroll",{x:this.x,y:this.y})),1<this.options.probeType&&this.trigger("scroll",{x:this.x,y:this.y});var d=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,f=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,v=this.pointX-d,g=this.pointY-f;(v>document.documentElement.clientWidth-this.options.momentumLimitDistance||v<this.options.momentumLimitDistance||g<this.options.momentumLimitDistance||g>document.documentElement.clientHeight-this.options.momentumLimitDistance)&&this._end(t)}}},P.prototype._end=function(t){if(this.enabled&&!this.destroyed&&x[t.type]===this.initiated){this.initiated=!1,this.options.preventDefault&&!X(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,o=e-this.absStartY;if(this.directionX=0<s?-1:s<0?1:0,this.directionY=0<o?-1:o<0?1:0,!this.options.pullDownRefresh||!this._checkPullDown())if(this._checkClick(t))this.trigger("scrollCancel");else if(!this.resetPosition(this.options.bounceTime,M.bounce)){this._translate(i,e),this.endTime=T();var n=this.endTime-this.startTime,r=Math.abs(i-this.startX),h=Math.abs(e-this.startY);if(this._events.flick&&n<this.options.flickLimitTime&&r<this.options.flickLimitDistance&&h<this.options.flickLimitDistance)this.trigger("flick");else{var a=0;if(this.options.momentum&&n<this.options.momentumLimitTime&&(h>this.options.momentumLimitDistance||r>this.options.momentumLimitDistance)){var l=!1,c=!1,p=!1,u=!1,m=this.options.bounce;!1!==m&&(l=void 0===m.top||m.top,c=void 0===m.bottom||m.bottom,p=void 0===m.left||m.left,u=void 0===m.right||m.right);var d=-1===this.directionX&&p||1===this.directionX&&u?this.wrapperWidth:0,f=-1===this.directionY&&l||1===this.directionY&&c?this.wrapperHeight:0,v=this.hasHorizontalScroll?E(this.x,this.startX,n,this.maxScrollX,this.minScrollX,d,this.options):{destination:i,duration:0},g=this.hasVerticalScroll?E(this.y,this.startY,n,this.maxScrollY,this.minScrollY,f,this.options):{destination:e,duration:0};i=v.destination,e=g.destination,a=Math.max(v.duration,g.duration),this.isInTransition=!0}else this.options.wheel&&(e=Math.round(e/this.itemHeight)*this.itemHeight,a=this.options.wheel.adjustTime||400);var y=M.swipe;if(this.options.snap){var w=this._nearestSnap(i,e);this.currentPage=w,a=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(i-w.x),1e3),Math.min(Math.abs(e-w.y),1e3)),300),i=w.x,e=w.y,this.directionX=0,this.directionY=0,y=this.options.snap.easing||M.bounce}if(i!==this.x||e!==this.y)return(i>this.minScrollX||i<this.maxScrollX||e>this.minScrollY||e<this.maxScrollY)&&(y=M.swipeBounce),void this.scrollTo(i,e,a,y);this.options.wheel&&(this.selectedIndex=Math.round(Math.abs(this.y/this.itemHeight))),this.trigger("scrollEnd",{x:this.x,y:this.y})}}}},P.prototype._checkClick=function(t){var i,e,s,o,n,r=this.stopFromTransition&&!this.pulling;if(this.stopFromTransition=!1,this.moved)return!1;if(this.options.wheel){if(this.target&&this.target.classList.contains(this.options.wheel.wheelWrapperClass)){var h=Math.abs(Math.round(this.y/this.itemHeight)),a=Math.round((this.pointY+(o=this.wrapper,n=o.getBoundingClientRect(),{left:-(n.left+window.pageXOffset),top:-(n.top+window.pageYOffset)}).top-this.wrapperHeight/2)/this.itemHeight);this.target=this.items[h+a]}return this.scrollToElement(this.target,this.options.wheel.adjustTime||400,!0,!0,M.swipe),!0}if(r)return!1;var l=this.options.dblclick,c=!1;if(l&&this.lastClickTime){var p=l.delay,u=void 0===p?300:p;T()-this.lastClickTime<u&&(c=!0,Y(t,"dblclick"))}return this.options.tap&&(i=t,e=this.options.tap,(s=document.createEvent("Event")).initEvent(e,!0,!0),s.pageX=i.pageX,s.pageY=i.pageY,i.target.dispatchEvent(s)),this.options.click&&!X(t.target,this.options.preventDefaultException)&&Y(t),this.lastClickTime=c?null:T(),!0},P.prototype._resize=function(){var t=this;this.enabled&&(s&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling))},P.prototype._startProbe=function(){z(this.probeTimer),this.probeTimer=H(function t(){var i=e.getComputedPosition();e.trigger("scroll",i),e.isInTransition?e.probeTimer=H(t):e.trigger("scrollEnd",i)});var e=this},P.prototype._transitionTime=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;if(this.scrollerStyle[S.transitionDuration]=t+"ms",this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[S.transitionDuration]=t+"ms";if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTime(t)},P.prototype._transitionTimingFunction=function(t){if(this.scrollerStyle[S.transitionTimingFunction]=t,this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[S.transitionTimingFunction]=t;if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTimingFunction(t)},P.prototype._transitionEnd=function(t){t.target===this.scroller&&this.isInTransition&&(this._transitionTime(),(!this.pulling||1===this.movingDirectionY)&&!this.resetPosition(this.options.bounceTime,M.bounce)&&(this.isInTransition=!1,3!==this.options.probeType&&this.trigger("scrollEnd",{x:this.x,y:this.y})))},P.prototype._translate=function(t,i,e){if(function(t,i){if(!t)throw new Error("[BScroll] "+i)}(!c(t)&&!c(i),"Translate x or y is null or undefined."),c(e)&&(e=this.scale),this.options.useTransform?this.scrollerStyle[S.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 r=o*(i/this.itemHeight+n);this.items[n].style[S.transform]="rotateX("+r+"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()},P.prototype._animate=function(r,h,a,l){var c=this,p=this.x,u=this.y,m=this.lastScale,d=this.scale,f=T(),v=f+a;this.isAnimating=!0,z(this.animateTimer),function t(){var i=T();if(v<=i)return c.isAnimating=!1,c._translate(r,h,d),c.trigger("scroll",{x:c.x,y:c.y}),void(c.pulling||c.resetPosition(c.options.bounceTime)||c.trigger("scrollEnd",{x:c.x,y:c.y}));var e=l(i=(i-f)/a),s=(r-p)*e+p,o=(h-u)*e+u,n=(d-m)*e+m;c._translate(s,o,n),c.isAnimating&&(c.animateTimer=H(t)),3===c.options.probeType&&c.trigger("scroll",{x:c.x,y:c.y})}()},P.prototype.scrollBy=function(t,i){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:M.bounce;t=this.x+t,i=this.y+i,this.scrollTo(t,i,e,s)},P.prototype.scrollTo=function(t,i){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:M.bounce;(this.x!==t||this.y!==i)&&(this.isInTransition=this.options.useTransition&&0<e&&(t!==this.x||i!==this.y),!e||this.options.useTransition?(this._transitionTimingFunction(s.style),this._transitionTime(e),this._translate(t,i),e&&3===this.options.probeType&&this._startProbe(),e||(this.trigger("scroll",{x:t,y:i}),this._reflow=document.body.offsetHeight,this.resetPosition(this.options.bounceTime,M.bounce)||this.trigger("scrollEnd",{x:t,y:i})),this.options.wheel&&(i>this.minScrollY?this.selectedIndex=0:i<this.maxScrollY?this.selectedIndex=this.items.length-1:this.selectedIndex=Math.round(Math.abs(i/this.itemHeight)))):this._animate(t,i,e,s.fn))},P.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=m(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=Math.round(n.top/this.itemHeight)*this.itemHeight),this.scrollTo(n.left,n.top,i,o)}},P.prototype.resetPosition=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:M.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)},P.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.scroller,null),i=void 0,e=void 0;return e=this.options.useTransform?(i=+((t=t[S.transform].split(")")[0].split(", "))[12]||t[4]),+(t[13]||t[5])):(i=+t.left.replace(/[^-\d.]/g,""),+t.top.replace(/[^-\d.]/g,"")),{x:i,y:e}},P.prototype.stop=function(){if(this.options.useTransition&&this.isInTransition){this.isInTransition=!1,z(this.probeTimer);var t=this.getComputedPosition();this._translate(t.x,t.y),this.options.wheel?this.target=this.items[Math.round(-t.y/this.itemHeight)]:this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0}else!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,z(this.animateTimer),this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0)},P.prototype.destroy=function(){this.destroyed=!0,this.trigger("destroy"),this.options.useTransition?z(this.probeTimer):z(this.animateTimer),this._removeDOMEvents(),this._events={}},(L=A).prototype.on=function(t,i){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this;this._events[t]||(this._events[t]=[]),this._events[t].push([i,e])},L.prototype.once=function(t,i){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this;function s(){this.off(t,s),i.apply(e,arguments)}s.fn=i,this.on(t,s)},L.prototype.off=function(t,i){var e=this._events[t];if(e)for(var s=e.length;s--;)(e[s][0]===i||e[s][0]&&e[s][0].fn===i)&&o(e,s)},L.prototype.trigger=function(t){var i=this._events[t];if(i)for(var e=i.length,s=[].concat(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)}(i)),o=0;o<e;o++){var n=s[o],r=l(n,2),h=r[0],a=r[1];h&&h.apply(a,[].slice.call(arguments,1))}},(O=A).prototype.wheelTo=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;if(this.options.wheel){var i=-t*this.itemHeight;this.scrollTo(0,i)}},O.prototype.getSelectedIndex=function(){return this.options.wheel&&this.selectedIndex},O.prototype._initWheel=function(){var t=this.options.wheel;t.wheelWrapperClass||(t.wheelWrapperClass="wheel-scroll"),t.wheelItemClass||(t.wheelItemClass="wheel-item"),void 0===t.selectedIndex&&(t.selectedIndex=0,I("wheel option selectedIndex is required!"))},(W=A).prototype._initMouseWheel=function(){var t=this;this._handleMouseWheelEvent(p),this.on("destroy",function(){clearTimeout(t.mouseWheelTimer),clearTimeout(t.mouseWheelEndTimer),t._handleMouseWheelEvent(u)}),this.firstWheelOpreation=!0},W.prototype._handleMouseWheelEvent=function(t){t(this.wrapper,"wheel",this),t(this.wrapper,"mousewheel",this),t(this.wrapper,"DOMMouseScroll",this)},W.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,h=e.easeTime,a=void 0===h?300:h;clearTimeout(this.mouseWheelTimer),this.mouseWheelTimer=setTimeout(function(){i.options.snap||a||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:c=1===t.deltaMode?(l=-t.deltaX*o,-t.deltaY*o):(l=-t.deltaX,-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 u=void 0,m=void 0;if(this.options.snap)return u=this.currentPage.pageX,m=this.currentPage.pageY,0<l?u--:l<0&&u++,0<c?m--:c<0&&m++,void this._goToPage(u,m);u=this.x+Math.round(this.hasHorizontalScroll?l:0),m=this.y+Math.round(this.hasVerticalScroll?c:0),this.movingDirectionX=this.directionX=0<l?-1:l<0?1:0,this.movingDirectionY=this.directionY=0<c?-1:c<0?1:0,u>this.minScrollX?u=this.minScrollX:u<this.maxScrollX&&(u=this.maxScrollX),m>this.minScrollY?m=this.minScrollY:m<this.maxScrollY&&(m=this.maxScrollY);var d=this.y===m;this.scrollTo(u,m,a,M.swipe),this.trigger("scroll",{x:this.x,y:this.y}),clearTimeout(this.mouseWheelEndTimer),d&&(this.mouseWheelEndTimer=setTimeout(function(){i.trigger("scrollEnd",{x:i.x,y:i.y})},a))}},A.Version="1.14.1",A}); | ||
| !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):t.BScroll=i()}(this,function(){"use strict";function o(t,i){for(;i+1<t.length;i++)t[i]=t[i+1];t.pop()}var l=function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,i){var e=[],s=!0,o=!1,n=void 0;try{for(var r,h=t[Symbol.iterator]();!(s=(r=h.next()).done)&&(e.push(r.value),!i||e.length!==i);s=!0);}catch(t){o=!0,n=t}finally{try{!s&&h.return&&h.return()}finally{if(o)throw n}}return e}(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")};var e="undefined"!=typeof window,t=e&&navigator.userAgent.toLowerCase(),i=t&&/wechatdevtools/.test(t),s=t&&0<t.indexOf("android");function T(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function a(t){for(var i=arguments.length,e=Array(1<i?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 c(t){return null==t}var n=e&&document.createElement("div").style,r=function(){if(!e)return!1;var t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(var i in t)if(void 0!==n[t[i]])return i;return!1}();function h(t){return!1!==r&&("standard"===r?"transitionEnd"===t?"transitionend":t:r+t.charAt(0).toUpperCase()+t.substr(1))}function p(t,i,e,s){t.addEventListener(i,e,{passive:!1,capture:!!s})}function u(t,i,e,s){t.removeEventListener(i,e,{passive:!1,capture:!!s})}function m(t){for(var i=0,e=0;t;)i-=t.offsetLeft,e-=t.offsetTop,t=t.offsetParent;return{left:i,top:e}}r&&"standard"!==r&&r.toLowerCase();var d=h("transform"),f=h("transition"),v=e&&h("perspective")in n,g=e&&("ontouchstart"in window||i),y=!1!==d,w=e&&f in n,S={transform:d,transition:f,transitionTimingFunction:h("transitionTimingFunction"),transitionDuration:h("transitionDuration"),transitionDelay:h("transitionDelay"),transformOrigin:h("transformOrigin"),transitionEnd:h("transitionEnd")},b={touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2};function x(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 Y(t,i){for(var e in i)if(i[e].test(t[e]))return!0;return!1}function X(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"click",e=void 0;"mouseup"===t.type||"mousecancel"===t.type?e=t:"touchend"!==t.type&&"touchcancel"!==t.type||(e=t.changedTouches[0]);var s={};e&&(s.screenX=e.screenX||0,s.screenY=e.screenY||0,s.clientX=e.clientX||0,s.clientY=e.clientY||0);var o=void 0,n=!0,r=!0;if("undefined"!=typeof MouseEvent)try{o=new MouseEvent(i,a({bubbles:n,cancelable:r},s))}catch(t){h()}else h();function h(){(o=document.createEvent("Event")).initEvent(i,n,r),a(o,s)}o.forwardedTouchEvent=!0,o._constructed=!0,t.target.dispatchEvent(o)}var _={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:g,disableTouch:!g,observeDOM:!0,autoBlur:!0,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1,mouseWheel:!1,stopPropagation:!1,zoom:!1,infinity:!1,dblclick:!1};var E={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 M(t,i,e,s,o,n,r){var h=t-i,a=Math.abs(h)/e,l=r.deceleration,c=r.itemHeight,p=r.swipeBounceTime,u=r.wheel,m=r.swipeTime,d=u?4:15,f=t+a/l*(h<0?-1:1);return u&&c&&(f=Math.round(f/c)*c),f<s?(f=n?Math.max(s-n/4,s-n/d*a):s,m=p):o<f&&(f=n?Math.min(o+n/4,o+n/d*a):o,m=p),{destination:Math.round(f),duration:m}}function D(){}var k,L,P,O,H=e?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}:D,I=e?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:D;function z(t){console.error("[BScroll warn]: "+t)}function A(t,i){this.wrapper="string"==typeof t?document.querySelector(t):t,this.wrapper||z("Can not resolve the wrapper DOM."),this.scroller=this.wrapper.children[0],this.scroller||z("The wrapper need at least one child element to be scroller."),this.scrollerStyle=this.scroller.style,this._init(i)}return(k=A).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()},k.prototype.setScale=function(t){this.lastScale=c(this.scale)?t:this.scale,this.scale=t},k.prototype._handleOptions=function(t){this.options=a({},_,t),this.translateZ=this.options.HWCompositing&&v?" translateZ(0)":"",this.options.useTransition=this.options.useTransition&&w,this.options.useTransform=this.options.useTransform&&y,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")},k.prototype._addDOMEvents=function(){var t=p;this._handleDOMEvents(t)},k.prototype._removeDOMEvents=function(){var t=u;this._handleDOMEvents(t)},k.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)),g&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(i,"touchmove",this),t(i,"touchcancel",this),t(i,"touchend",this)),t(this.scroller,S.transitionEnd,this)},k.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()},k.prototype._watchTransition=function(){if("function"==typeof Object.defineProperty){var o=this,n=!1,t=this.options.useTransition?"isInTransition":"isAnimating";Object.defineProperty(this,t,{get:function(){return n},set:function(t){n=t;for(var i=o.scroller.children.length?o.scroller.children:[o.scroller],e=n&&!o.pulling?"none":"auto",s=0;s<i.length;s++)i[s].style.pointerEvents=e}})}},k.prototype._handleAutoBlur=function(){this.on("scrollStart",function(){var t=document.activeElement;!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName||t.blur()})},k.prototype._initDOMObserver=function(){var n=this;if("undefined"!=typeof MutationObserver){var r=void 0,t=new MutationObserver(function(t){if(!n._shouldNotRefresh()){for(var i=!1,e=!1,s=0;s<t.length;s++){var o=t[s];if("attributes"!==o.type){i=!0;break}if(o.target!==n.scroller){e=!0;break}}i?n.refresh():e&&(clearTimeout(r),r=setTimeout(function(){n._shouldNotRefresh()||n.refresh()},60))}});t.observe(this.scroller,{attributes:!0,childList:!0,subtree:!0}),this.on("destroy",function(){t.disconnect()})}else this._checkDOMUpdate()},k.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},k.prototype._checkDOMUpdate=function(){var e=x(this.scroller),s=e.width,o=e.height;function n(){var t=this;setTimeout(function(){(function(){if(!this.destroyed){var t=(e=x(this.scroller)).width,i=e.height;s===t&&o===i||this.refresh(),s=t,o=i,n.call(this)}}).call(t)},1e3)}n.call(this)},k.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t),this.options.zoom&&t.touches&&1<t.touches.length&&this._zoomStart(t);break;case"touchmove":case"mousemove":this.options.zoom&&t.touches&&1<t.touches.length?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&&(Y(t.target,this.options.preventDefaultException)||(t.preventDefault(),t.stopPropagation()));break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._onMouseWheel(t)}},k.prototype.refresh=function(){var t="static"===window.getComputedStyle(this.wrapper,null).position,i=x(this.wrapper);this.wrapperWidth=i.width,this.wrapperHeight=i.height;var e=x(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.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):1<this.scale&&(this.maxScrollX=this.maxScrollX/2-this.relativeX,this.minScrollX=this.maxScrollX),this.maxScrollY<0?(this.maxScrollY-=this.relativeY,this.minScrollY=-this.relativeY):1<this.scale&&(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=m(this.wrapper),this.trigger("refresh"),!this.scaled&&this.resetPosition()},k.prototype.enable=function(){this.enabled=!0},k.prototype.disable=function(){this.enabled=!1},(L=A).prototype._start=function(t){var i=b[t.type];if((1===i||0===t.button)&&!(!this.enabled||this.destroyed||this.initiated&&this.initiated!==i)){this.initiated=i,this.options.preventDefault&&!Y(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=T(),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")}},L.prototype._move=function(t){if(this.enabled&&!this.destroyed&&b[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 o=Math.abs(this.distX),n=Math.abs(this.distY),r=T();if(!(r-this.endTime>this.options.momentumLimitTime&&n<this.options.momentumLimitDistance&&o<this.options.momentumLimitDistance)){if(this.directionLocked||this.options.freeScroll||(o>n+this.options.directionLockThreshold?this.directionLocked="h":n>=o+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=0<e?-1:e<0?1:0,this.movingDirectionY=0<s?-1:s<0?1:0;var h=this.x+e,a=this.y+s,l=!1,c=!1,p=!1,u=!1,m=this.options.bounce;!1!==m&&(l=void 0===m.top||m.top,c=void 0===m.bottom||m.bottom,p=void 0===m.left||m.left,u=void 0===m.right||m.right),(h>this.minScrollX||h<this.maxScrollX)&&(h=h>this.minScrollX&&p||h<this.maxScrollX&&u?this.x+e/3:h>this.minScrollX?this.minScrollX:this.maxScrollX),(a>this.minScrollY||a<this.maxScrollY)&&(a=a>this.minScrollY&&l||a<this.maxScrollY&&c?this.y+s/3:a>this.minScrollY?this.minScrollY:this.maxScrollY),this.moved||(this.moved=!0,this.trigger("scrollStart")),this._translate(h,a),r-this.startTime>this.options.momentumLimitTime&&(this.startTime=r,this.startX=this.x,this.startY=this.y,1===this.options.probeType&&this.trigger("scroll",{x:this.x,y:this.y})),1<this.options.probeType&&this.trigger("scroll",{x:this.x,y:this.y});var d=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,f=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,v=this.pointX-d,g=this.pointY-f;(v>document.documentElement.clientWidth-this.options.momentumLimitDistance||v<this.options.momentumLimitDistance||g<this.options.momentumLimitDistance||g>document.documentElement.clientHeight-this.options.momentumLimitDistance)&&this._end(t)}}},L.prototype._end=function(t){if(this.enabled&&!this.destroyed&&b[t.type]===this.initiated){this.initiated=!1,this.options.preventDefault&&!Y(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,o=e-this.absStartY;if(this.directionX=0<s?-1:s<0?1:0,this.directionY=0<o?-1:o<0?1:0,!this.options.pullDownRefresh||!this._checkPullDown())if(this._checkClick(t))this.trigger("scrollCancel");else if(!this.resetPosition(this.options.bounceTime,E.bounce)){this._translate(i,e),this.endTime=T();var n=this.endTime-this.startTime,r=Math.abs(i-this.startX),h=Math.abs(e-this.startY);if(this._events.flick&&n<this.options.flickLimitTime&&r<this.options.flickLimitDistance&&h<this.options.flickLimitDistance)this.trigger("flick");else{var a=0;if(this.options.momentum&&n<this.options.momentumLimitTime&&(h>this.options.momentumLimitDistance||r>this.options.momentumLimitDistance)){var l=!1,c=!1,p=!1,u=!1,m=this.options.bounce;!1!==m&&(l=void 0===m.top||m.top,c=void 0===m.bottom||m.bottom,p=void 0===m.left||m.left,u=void 0===m.right||m.right);var d=-1===this.directionX&&p||1===this.directionX&&u?this.wrapperWidth:0,f=-1===this.directionY&&l||1===this.directionY&&c?this.wrapperHeight:0,v=this.hasHorizontalScroll?M(this.x,this.startX,n,this.maxScrollX,this.minScrollX,d,this.options):{destination:i,duration:0},g=this.hasVerticalScroll?M(this.y,this.startY,n,this.maxScrollY,this.minScrollY,f,this.options):{destination:e,duration:0};i=v.destination,e=g.destination,a=Math.max(v.duration,g.duration),this.isInTransition=!0}else this.options.wheel&&(e=Math.round(e/this.itemHeight)*this.itemHeight,a=this.options.wheel.adjustTime||400);var y=E.swipe;if(this.options.snap){var w=this._nearestSnap(i,e);this.currentPage=w,a=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(i-w.x),1e3),Math.min(Math.abs(e-w.y),1e3)),300),i=w.x,e=w.y,this.directionX=0,this.directionY=0,y=this.options.snap.easing||E.bounce}if(i!==this.x||e!==this.y)return(i>this.minScrollX||i<this.maxScrollX||e>this.minScrollY||e<this.maxScrollY)&&(y=E.swipeBounce),void this.scrollTo(i,e,a,y);this.options.wheel&&(this.selectedIndex=Math.round(Math.abs(this.y/this.itemHeight))),this.trigger("scrollEnd",{x:this.x,y:this.y})}}}},L.prototype._checkClick=function(t){var i,e,s,o,n,r=this.stopFromTransition&&!this.pulling;if(this.stopFromTransition=!1,this.moved)return!1;if(this.options.wheel){if(this.target&&this.target.classList.contains(this.options.wheel.wheelWrapperClass)){var h=Math.abs(Math.round(this.y/this.itemHeight)),a=Math.round((this.pointY+(o=this.wrapper,n=o.getBoundingClientRect(),{left:-(n.left+window.pageXOffset),top:-(n.top+window.pageYOffset)}).top-this.wrapperHeight/2)/this.itemHeight);this.target=this.items[h+a]}return this.scrollToElement(this.target,this.options.wheel.adjustTime||400,!0,!0,E.swipe),!0}if(r)return!1;var l=this.options.dblclick,c=!1;if(l&&this.lastClickTime){var p=l.delay,u=void 0===p?300:p;T()-this.lastClickTime<u&&(c=!0,X(t,"dblclick"))}return this.options.tap&&(i=t,e=this.options.tap,(s=document.createEvent("Event")).initEvent(e,!0,!0),s.pageX=i.pageX,s.pageY=i.pageY,i.target.dispatchEvent(s)),this.options.click&&!Y(t.target,this.options.preventDefaultException)&&X(t),this.lastClickTime=c?null:T(),!0},L.prototype._resize=function(){var t=this;this.enabled&&(s&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){t.refresh()},this.options.resizePolling))},L.prototype._startProbe=function(){I(this.probeTimer),this.probeTimer=H(function t(){var i=e.getComputedPosition();e.trigger("scroll",i),e.isInTransition?e.probeTimer=H(t):e.trigger("scrollEnd",i)});var e=this},L.prototype._transitionTime=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;if(this.scrollerStyle[S.transitionDuration]=t+"ms",this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[S.transitionDuration]=t+"ms";if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTime(t)},L.prototype._transitionTimingFunction=function(t){if(this.scrollerStyle[S.transitionTimingFunction]=t,this.options.wheel)for(var i=0;i<this.items.length;i++)this.items[i].style[S.transitionTimingFunction]=t;if(this.indicators)for(var e=0;e<this.indicators.length;e++)this.indicators[e].transitionTimingFunction(t)},L.prototype._transitionEnd=function(t){t.target===this.scroller&&this.isInTransition&&(this._transitionTime(),(!this.pulling||1===this.movingDirectionY)&&!this.resetPosition(this.options.bounceTime,E.bounce)&&(this.isInTransition=!1,3!==this.options.probeType&&this.trigger("scrollEnd",{x:this.x,y:this.y})))},L.prototype._translate=function(t,i,e){if(function(t,i){if(!t)throw new Error("[BScroll] "+i)}(!c(t)&&!c(i),"Translate x or y is null or undefined."),c(e)&&(e=this.scale),this.options.useTransform?this.scrollerStyle[S.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 r=o*(i/this.itemHeight+n);this.items[n].style[S.transform]="rotateX("+r+"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()},L.prototype._animate=function(r,h,a,l){var c=this,p=this.x,u=this.y,m=this.lastScale,d=this.scale,f=T(),v=f+a;this.isAnimating=!0,I(this.animateTimer),function t(){var i=T();if(v<=i)return c.isAnimating=!1,c._translate(r,h,d),c.trigger("scroll",{x:c.x,y:c.y}),void(c.pulling||c.resetPosition(c.options.bounceTime)||c.trigger("scrollEnd",{x:c.x,y:c.y}));var e=l(i=(i-f)/a),s=(r-p)*e+p,o=(h-u)*e+u,n=(d-m)*e+m;c._translate(s,o,n),c.isAnimating&&(c.animateTimer=H(t)),3===c.options.probeType&&c.trigger("scroll",{x:c.x,y:c.y})}()},L.prototype.scrollBy=function(t,i){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:E.bounce;t=this.x+t,i=this.y+i,this.scrollTo(t,i,e,s)},L.prototype.scrollTo=function(t,i){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:E.bounce;(this.x!==t||this.y!==i)&&(this.isInTransition=this.options.useTransition&&0<e&&(t!==this.x||i!==this.y),!e||this.options.useTransition?(this._transitionTimingFunction(s.style),this._transitionTime(e),this._translate(t,i),e&&3===this.options.probeType&&this._startProbe(),e||(this.trigger("scroll",{x:t,y:i}),this._reflow=document.body.offsetHeight,this.resetPosition(this.options.bounceTime,E.bounce)||this.trigger("scrollEnd",{x:t,y:i})),this.options.wheel&&(i>this.minScrollY?this.selectedIndex=0:i<this.maxScrollY?this.selectedIndex=this.items.length-1:this.selectedIndex=Math.round(Math.abs(i/this.itemHeight)))):this._animate(t,i,e,s.fn))},L.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=m(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=Math.round(n.top/this.itemHeight)*this.itemHeight),this.scrollTo(n.left,n.top,i,o)}},L.prototype.resetPosition=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:E.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)},L.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.scroller,null),i=void 0,e=void 0;return e=this.options.useTransform?(i=+((t=t[S.transform].split(")")[0].split(", "))[12]||t[4]),+(t[13]||t[5])):(i=+t.left.replace(/[^-\d.]/g,""),+t.top.replace(/[^-\d.]/g,"")),{x:i,y:e}},L.prototype.stop=function(){if(this.options.useTransition&&this.isInTransition){this.isInTransition=!1,I(this.probeTimer);var t=this.getComputedPosition();this._translate(t.x,t.y),this.options.wheel?this.target=this.items[Math.round(-t.y/this.itemHeight)]:this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0}else!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,I(this.animateTimer),this.trigger("scrollEnd",{x:this.x,y:this.y}),this.stopFromTransition=!0)},L.prototype.destroy=function(){this.destroyed=!0,this.trigger("destroy"),this.options.useTransition?I(this.probeTimer):I(this.animateTimer),this._removeDOMEvents(),this._events={}},(P=A).prototype.on=function(t,i){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this;this._events[t]||(this._events[t]=[]),this._events[t].push([i,e])},P.prototype.once=function(t,i){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this;function s(){this.off(t,s),i.apply(e,arguments)}s.fn=i,this.on(t,s)},P.prototype.off=function(t,i){var e=this._events[t];if(e)for(var s=e.length;s--;)(e[s][0]===i||e[s][0]&&e[s][0].fn===i)&&o(e,s)},P.prototype.trigger=function(t){var i=this._events[t];if(i)for(var e=i.length,s=[].concat(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)}(i)),o=0;o<e;o++){var n=s[o],r=l(n,2),h=r[0],a=r[1];h&&h.apply(a,[].slice.call(arguments,1))}},(O=A).prototype.wheelTo=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;if(this.options.wheel){var i=-t*this.itemHeight;this.scrollTo(0,i)}},O.prototype.getSelectedIndex=function(){return this.options.wheel&&this.selectedIndex},O.prototype._initWheel=function(){var t=this.options.wheel;t.wheelWrapperClass||(t.wheelWrapperClass="wheel-scroll"),t.wheelItemClass||(t.wheelItemClass="wheel-item"),void 0===t.selectedIndex&&(t.selectedIndex=0,z("wheel option selectedIndex is required!"))},A.Version="1.14.1",A}); |
+19
-3
@@ -21,4 +21,4 @@ <!DOCTYPE html> | ||
| <h4>支持格式:</h4> | ||
| YYYY-MM、YYYY-MM-DD、YYYY-MM-DD hh:mm、YYYY-MM-DD hh:mm:ss、YYYY、MM、DD、hh:mm、hh:mm:ss、YYYY-MM-DD hh | ||
| <h4>支持格式:(13种)</h4> | ||
| YYYY-MM、YYYY-MM-DD、YYYY-MM-DD hh:mm、YYYY-MM-DD hh:mm:ss、YYYY、MM、DD、hh:mm、hh:mm:ss、YYYY-MM-DD hh、hh、mm、ss | ||
| <br> | ||
@@ -34,2 +34,6 @@ <input readonly type="text" id="date" placeholder="YYYY-MM"><input readonly type="text" id="date2" placeholder="YYYY-MM-DD"> | ||
| <input readonly type="text" id="date20" placeholder="hh:mm:ss"><input readonly type="text" id="date26" placeholder="YYYY-MM-DD hh"> | ||
| <br> | ||
| <input readonly type="text" id="date27" placeholder="hh"><input readonly type="text" id="date28" placeholder="mm"> | ||
| <br> | ||
| <input readonly type="text" id="date29" placeholder="ss"> | ||
| <hr> | ||
@@ -114,6 +118,18 @@ | ||
| }) | ||
| new rolldate.Date({ | ||
| new rolldate.Date({ | ||
| el:'#date26', | ||
| format:'YYYY-MM-DD hh' | ||
| }) | ||
| new rolldate.Date({ | ||
| el:'#date27', | ||
| format:'hh' | ||
| }) | ||
| new rolldate.Date({ | ||
| el:'#date28', | ||
| format:'mm' | ||
| }) | ||
| new rolldate.Date({ | ||
| el:'#date29', | ||
| format:'ss' | ||
| }) | ||
| // 回调 | ||
@@ -120,0 +136,0 @@ new rolldate.Date({ |
+13
-6
@@ -43,3 +43,3 @@ import './rolldate.less'; | ||
| date:new window.Date(), | ||
| dateFormat:['YYYY-MM','YYYY-MM-DD','YYYY-MM-DD hh:mm','YYYY-MM-DD hh:mm:ss','YYYY','MM','DD','hh:mm','hh:mm:ss','YYYY-MM-DD hh'],//支持的日期格式 | ||
| dateFormat:['YYYY-MM','YYYY-MM-DD','YYYY-MM-DD hh:mm','YYYY-MM-DD hh:mm:ss','YYYY','MM','DD','hh:mm','hh:mm:ss','YYYY-MM-DD hh','hh','mm','ss'],//支持的日期格式 | ||
| domClass:['rolldate-year','rolldate-month','rolldate-day','rolldate-hour','rolldate-min','rolldate-sec'], | ||
@@ -81,3 +81,3 @@ opts:{//插件默认配置 | ||
| index = index > 1? index+1 : index; | ||
| let $class = index == 5? [data.domClass[0]]: index ==6? [data.domClass[1]]: index ==7? [data.domClass[2]]: index ==8? data.domClass.slice(3,5): index ==9? data.domClass.slice(3):index ==10? data.domClass.slice(0,4):data.domClass.slice(0,index + 2), | ||
| let $class = index == 5? [data.domClass[0]]: index ==6? [data.domClass[1]]: index ==7? [data.domClass[2]]: index ==8? data.domClass.slice(3,5): index ==9? data.domClass.slice(3):index ==10? data.domClass.slice(0,4):index ==11? data.domClass.slice(3,4):index ==12? data.domClass.slice(4,5):index ==13? data.domClass.slice(5,6):data.domClass.slice(0,index + 2), | ||
| len = $class.length, | ||
@@ -116,3 +116,3 @@ ul = '', | ||
| } | ||
| }else if(i == 3 || (index > 7 && i == 0)){ | ||
| }else if(i == 3 || (index > 7 && index < 12 && i == 0)){ | ||
| for(let m=0; m<=23; m++){ | ||
@@ -124,3 +124,3 @@ itemClass = m == date.getHours()? 'active':''; | ||
| } | ||
| }else if(i == 4 || (index > 7 && i == 1)){ | ||
| }else if(i == 4 || (index > 7 && i == 1) || index == 12){ | ||
| for(let n=0; n<=59; n+=_this.config.minStep){ | ||
@@ -132,3 +132,3 @@ itemClass = n == date.getMinutes()? 'active':''; | ||
| } | ||
| }else if(i == 5 || (index > 7 && i == 2)){ | ||
| }else if(i == 5 || (index > 7 && i == 2) || index == 13){ | ||
| for(let o=0; o<=59; o++){ | ||
@@ -160,3 +160,4 @@ itemClass = o == date.getSeconds()? 'active':''; | ||
| box.className = 'rolldate-container'; | ||
| // 在微信中输入框在底部时,偶现按钮点击范围被挤压,暂定增加按钮高度 | ||
| box.className = `rolldate-container${!!navigator.userAgent.match(/MicroMessenger/i)?' wx':''}`; | ||
| box.innerHTML = $html; | ||
@@ -243,2 +244,8 @@ document.body.appendChild(box); | ||
| str = i == 0? 'hh':i == 1? 'mm':'ss'; | ||
| }else if(index == 10){ | ||
| str = 'hh'; | ||
| }else if(index == 11){ | ||
| str = 'mm'; | ||
| }else if(index == 12){ | ||
| str = 'ss'; | ||
| } | ||
@@ -245,0 +252,0 @@ |
@@ -44,3 +44,3 @@ ul{ | ||
| top: 0; | ||
| height: 150%; | ||
| height: 100%; | ||
| padding:0 15px; | ||
@@ -52,2 +52,5 @@ color: #666; | ||
| } | ||
| &.wx{ | ||
| .rolldate-btn{height: 150%;} | ||
| } | ||
| .rolldate-confirm{ | ||
@@ -54,0 +57,0 @@ left: auto; |
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
475550
-0.87%10074
-0.13%