import{r as t,c as s,h as i,H as e}from"./p-78e3ebb9.js";import{c as h}from"./p-2fad2a65.js";const o="taro-cover-view-core{display:block}";const r=class{constructor(i){t(this,i);this.onLongPress=s(this,"longpress",7);this.startTime=0;this.animation=undefined;this.hoverClass=undefined;this.hoverStartTime=50;this.hoverStayTime=400;this.hover=false;this.touch=false}onTouchStart(){if(this.hoverClass){this.touch=true;setTimeout((()=>{if(this.touch){this.hover=true}}),this.hoverStartTime)}this.timeoutEvent=setTimeout((()=>{this.onLongPress.emit()}),350);this.startTime=Date.now()}onTouchMove(){clearTimeout(this.timeoutEvent)}onTouchEnd(){const t=Date.now()-this.startTime;if(t<350){clearTimeout(this.timeoutEvent)}if(this.hoverClass){this.touch=false;setTimeout((()=>{if(!this.touch){this.hover=false}}),this.hoverStayTime)}}render(){const t=h({[`${this.hoverClass}`]:this.hover});let s={};if(!!this.animation){s["animation"]=this.animation;s["data-animation"]=this.animation}return i(e,Object.assign({class:t},s),i("slot",null))}};r.style=o;export{r as taro_cover_view_core};
//# sourceMappingURL=p-d1ee2779.entry.js.map