1import{k as $,d as q,z as F,q as a,s as k,w as j,o as H,ah as K,t as P,i as z,e as U,j as W,f as J,h as r,y as Q,T as X,ac as Z,ae as G,l as A,Y as ee,ai as te,B as ae,aB as se,g}from"./BUUzORYw.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new n.Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="94b3df71-d484-4c2e-bcb9-aa206847ac0e",n._sentryDebugIdIdentifier="sentry-dbid-94b3df71-d484-4c2e-bcb9-aa206847ac0e")}catch{}})();{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};l._sentryModuleMetadata=l._sentryModuleMetadata||{},l._sentryModuleMetadata[new l.Error().stack]=Object.assign({},l._sentryModuleMetadata[new l.Error().stack],{"_sentryBundlerPluginAppKey:movelle-fitness":!0})}const oe={__name:"Drawer",emits:["update:modelValue","drawer-open","drawer-close","close"],setup(n,{emit:i}){const s=q(),{$busListen:_,$busOff:E}=F(),M=i,N=a(!0),x=a(0),w=a(null),t=a(0),o=a(!1),u=a(!1),c=a(!1),B=k(()=>s.isDrawerOpen),p=k(()=>s.isAppFullscreen),R=k(()=>({transform:p.value?"":`translate3d(0, ${t.value}px, 0)`,transition:o.value||p.value?"none":"transform 0.3s ease-out"})),m=()=>{o.value=!1,t.value=window.innerHeight,s.isDrawerOpen=!1,M("close"),setTimeout(()=>{u.value=!1,t.value=0},300)},S=()=>{u.value=!0,t.value=window.innerHeight,s.isDrawerOpen=!0,requestAnimationFrame(()=>{setTimeout(()=>{t.value=0},50)})};let d,f,v=null;const T=()=>v&&v.isConnected?v.scrollTop:0,L=()=>{c.value=!0,o.value=!1,t.value=0},O=()=>{c.value=!1},y=e=>{c.value||(d=e.touches?e.touches[0].clientY:e.clientY,x.value=d,o.value=!0,v=D.value?.querySelector("._itemTemplate")||null)},h=e=>{if(!o.value||c.value)return;if(f=e.touches?e.touches[0].clientY:e.clientY,D.value&&T()===0){const I=f-x.value;I>0&&(t.value=I,e.cancelable&&e.preventDefault())}},b=()=>{o.value=!1,!c.value&&T()===0&&f-d>150?m():t.value=0,d=null,f=null},C=e=>{e?document.body.classList.add("scaleBody","drawerOpen"):document.body.classList.remove("scaleBody","drawerOpen")};j(()=>s.isDrawerOpen,e=>{C(e),e?S():m()});const D=a(null),Y=()=>{const e=s.isDrawerOpen;C(e),e&&!u.value&&S()};return H(()=>{Y(),K(Y);const e=w.value;e&&(e.addEventListener("touchstart",y,{passive:!0}),e.addEventListener("touchmove",h,{passive:!1}),e.addEventListener("touchend",b,{passive:!0})),_("lockDrawer",L),_("unlockDrawer",O)}),P(()=>{const e=w.value;e&&(e.removeEventListener("touchstart",y),e.removeEventListener("touchmove",h),e.removeEventListener("touchend",b)),E("lockDrawer",L),E("unlockDrawer",O),document.body.classList.remove("scaleBody","drawerOpen")}),(e,V)=>(g(),z("div",null,[(g(),U(se,{to:"body"},[W(X,{"enter-from-class":"opacity-0","enter-leave-class":"opacity-100","leave-from-class":"opacity-100","enter-to-class":"opacity-0","leave-to-class":"opacity-0","enter-active-class":"transition-opacity duration-500","leave-active-class":"transition-opacity duration-500 delay-100"},{default:J(()=>[r(B)&&r(N)?(g(),z("div",{key:0,class:"fixed inset-0 bg-black/10 md:bg-black/10 backdrop-blur-lg z-70",onClick:m})):Q("",!0)]),_:1}),Z(A("div",{ref_key:"drawerRef",ref:w,class:ae(["fixed rounded-t-2xl overflow-hidden top-[max(1.25rem,env(safe-area-inset-top))] left-0 right-0 mx-auto bottom-0 w-full max-w-3xl z-80 drawer",{"drawer-open":r(B)&&!r(o),"drawer-fullscreen":r(p)}]),style:te(r(R)),onMousedown:y,onMouseup:b,onMousemove:h},[A("div",{ref_key:"drawerContentRef",ref:D,class:"h-full"},[ee(e.$slots,"default",{},void 0,!0)],512)],38),[[G,r(u)]])]))]))}},ne=$(oe,[["__scopeId","data-v-34c48616"]]);export{ne as D};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.