var __wxsModules={};
__wxsModules["199dc8ed"]=(()=>{var f=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var w=f((m,c)=>{var t={};t.onMoving=function(o,e,n){o.requestAnimationFrame(function(){o.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"transform",transform:"translateY("+n+"px)",transition:""});var r=o.selectComponent(".mescroll-wxs-progress");r&&r.setStyle({transform:"rotate("+360*e+"deg)"})})};t.showLoading=function(o){t.downHight=t.optDown.offset,o.requestAnimationFrame(function(){o.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"auto",transform:"translateY("+t.downHight+"px)",transition:"transform 300ms"})})};t.endDownScroll=function(o){t.downHight=0,t.isDownScrolling=!1,o.requestAnimationFrame(function(){o.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"auto",transform:"translateY(0)",transition:"transform 300ms"})})};t.clearTransform=function(o){o.requestAnimationFrame(function(){o.selectComponent(".mescroll-wxs-content").setStyle({"will-change":"",transform:"",transition:""})})};function h(o){t.optDown=o.optDown,t.scrollTop=o.scrollTop,t.bodyHeight=o.bodyHeight,t.isDownScrolling=o.isDownScrolling,t.isUpScrolling=o.isUpScrolling,t.isUpBoth=o.isUpBoth,t.isScrollBody=o.isScrollBody,t.startTop=o.scrollTop}function u(o,e,n){t.disabled()||o.callType&&(o.callType==="showLoading"?t.showLoading(n):o.callType==="endDownScroll"?t.endDownScroll(n):o.callType==="clearTransform"&&t.clearTransform(n))}function p(o,e){t.downHight=0,t.startPoint=t.getPoint(o),t.startTop=t.getScrollTop(),t.startAngle=0,t.lastPoint=t.startPoint,t.maxTouchmoveY=t.getBodyHeight()-t.optDown.bottomOffset,t.inTouchend=!1,t.callMethod(e,{type:"setWxsProp"})}function d(o,e){var n=!0;if(t.disabled())return n;var r=t.getScrollTop(),l=t.getPoint(o),i=l.y-t.startPoint.y;if(i>0&&(t.isScrollBody&&r<=0||!t.isScrollBody&&(r<=0||r<=t.optDown.startTop&&r===t.startTop))&&!t.inTouchend&&!t.isDownScrolling&&!t.optDown.isLock&&(!t.isUpScrolling||t.isUpScrolling&&t.isUpBoth)){if(t.startAngle||(t.startAngle=t.getAngle(t.lastPoint,l)),t.startAngle<t.optDown.minAngle)return n;if(t.maxTouchmoveY>0&&l.y>=t.maxTouchmoveY)return t.inTouchend=!0,s(o,e),n;n=!1;var a=l.y-t.lastPoint.y;t.downHight<t.optDown.offset?(t.movetype!==1&&(t.movetype=1,t.callMethod(e,{type:"setLoadType",downLoadType:1}),t.isMoveDown=!0),t.downHight+=a*t.optDown.inOffsetRate):(t.movetype!==2&&(t.movetype=2,t.callMethod(e,{type:"setLoadType",downLoadType:2}),t.isMoveDown=!0),a>0?t.downHight+=a*t.optDown.outOffsetRate:t.downHight+=a),t.downHight=Math.round(t.downHight);var g=t.downHight/t.optDown.offset;t.onMoving(e,g,t.downHight)}return t.lastPoint=l,n}function s(o,e){if(t.isMoveDown)t.downHight>=t.optDown.offset?(t.downHight=t.optDown.offset,t.callMethod(e,{type:"triggerDownScroll"})):(t.downHight=0,t.callMethod(e,{type:"endDownScroll"})),t.movetype=0,t.isMoveDown=!1;else if(!t.isScrollBody&&t.getScrollTop()===t.startTop){var n=t.getPoint(o).y-t.startPoint.y<0;if(n){var r=t.getAngle(t.getPoint(o),t.startPoint);r>80&&t.callMethod(e,{type:"triggerUpScroll"})}}t.callMethod(e,{type:"setWxsProp"})}t.disabled=function(){return!t.optDown||!t.optDown.use||t.optDown.native};t.getPoint=function(o){return o?o.touches&&o.touches[0]?{x:o.touches[0].pageX,y:o.touches[0].pageY}:o.changedTouches&&o.changedTouches[0]?{x:o.changedTouches[0].pageX,y:o.changedTouches[0].pageY}:{x:o.clientX,y:o.clientY}:{x:0,y:0}};t.getAngle=function(o,e){var n=Math.abs(o.x-e.x),r=Math.abs(o.y-e.y),l=Math.sqrt(n*n+r*r),i=0;return l!==0&&(i=Math.asin(r/l)/Math.PI*180),i};t.getScrollTop=function(){return t.scrollTop||0};t.getBodyHeight=function(){return t.bodyHeight||0};t.callMethod=function(o,e){o&&o.callMethod("wxsCall",e)};c.exports={propObserver:h,callObserver:u,touchstartEvent:p,touchmoveEvent:d,touchendEvent:s}});return w();})();
