var __wxsModules={};
__wxsModules.afd46426=(()=>{var X=(e,a)=>()=>(a||e((a={exports:{}}).exports,a),a.exports);var k=X((y,W)=>{var c=10,f=!1;typeof window=="object"&&(f=!0);function D(e,a,r,t){var i=t.getState();if(S(t,r),e&&e!=="none"){s(e,t,r);return}i.left&&s("none",t,r),b(t)}function v(e,a){var r=e.instance,t=r.getDataset().disabled,i=r.getState();S(r,a),t=(typeof t=="string"?JSON.parse(t):t)||!1,!t&&(r.requestAnimationFrame(function(){r.removeClass("ani"),a.callMethod("closeSwipe")}),i.x=i.left||0,C(e,a))}function g(e,a){var r=e.instance,t=r.getDataset().disabled,i=r.getState();t=(typeof t=="string"?JSON.parse(t):t)||!1,!t&&(x(e),i.direction==="horizontal"&&(e.preventDefault&&e.preventDefault(),p(i.x+i.deltaX,r,a)))}function m(e,a){var r=e.instance,t=r.getDataset().disabled,i=r.getState();t=(typeof t=="string"?JSON.parse(t):t)||!1,!t&&M(i.left,r,a)}function p(e,a,r){e=e||0;var t=a.getState(),i=t.leftWidth,n=t.rightWidth;t.left=Y(e,-n,i),a.requestAnimationFrame(function(){a.setStyle({transform:"translateX("+t.left+"px)","-webkit-transform":"translateX("+t.left+"px)"})})}function S(e,a){var r=e.getState(),t=a.selectComponent(".button-group--left"),i=a.selectComponent(".button-group--right"),n={width:0},o={width:0};t&&(n=t.getBoundingClientRect()),i&&(o=i.getBoundingClientRect()),r.leftWidth=n.width||0,r.rightWidth=o.width||0,r.threshold=e.getDataset().threshold}function Y(e,a,r){return Math.min(Math.max(e,a),r)}function M(e,a,r){var t=a.getState(),i=t.threshold,n=t.position,o=t.isopen||"none",h=t.leftWidth,d=t.rightWidth;if(t.deltaX===0){s("none",a,r);return}o==="none"&&d>0&&-e>i||o!=="none"&&d>0&&d+e<i?s("right",a,r):o==="none"&&h>0&&e>i||o!=="none"&&h>0&&h-e<i?s("left",a,r):s("none",a,r)}function s(e,a,r){var t=a.getState(),i=t.leftWidth,n=t.rightWidth,o="";switch(t.isopen=t.isopen?t.isopen:"none",e){case"left":o=i;break;case"right":o=-n;break;default:o=0}t.isopen!==e&&(t.throttle=!0,r.callMethod("change",{open:e})),t.isopen=e,a.requestAnimationFrame(function(){a.addClass("ani"),p(o,a,r)})}function A(e,a){return e>a&&e>c?"horizontal":a>e&&a>c?"vertical":""}function b(e){var a=e.getState();a.direction="",a.deltaX=0,a.deltaY=0,a.offsetX=0,a.offsetY=0}function C(e){var a=e.instance,r=a.getState();b(a);var t=e.touches[0];f&&u()&&(t=e),r.startX=t.clientX,r.startY=t.clientY}function x(e){var a=e.instance,r=a.getState(),t=e.touches[0];f&&u()&&(t=e),r.deltaX=t.clientX-r.startX,r.deltaY=t.clientY-r.startY,r.offsetY=Math.abs(r.deltaY),r.offsetX=Math.abs(r.deltaX),r.direction=r.direction||A(r.offsetX,r.offsetY)}function u(){for(var e=navigator.userAgent,a=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],r=!0,t=0;t<a.length-1;t++)if(e.indexOf(a[t])>0){r=!1;break}return e.indexOf("Phone")>0&&e.indexOf("Harmony")>0&&(r=!1),r}var l=!1;function O(e,a){f&&u()&&(v(e,a),l=!0)}function P(e,a){f&&u()&&l&&g(e,a)}function N(e,a){f&&u()&&(m(e,a),l=!1)}function T(e,a){f&&u()&&(l=!1)}W.exports={showWatch:D,touchstart:v,touchmove:g,touchend:m,mousedown:O,mousemove:P,mouseup:N,mouseleave:T}});return k();})();
