1import{B as e,L as t,N as n,Q as r,S as i,W as a,_t as o,dt as s,it as c,l,lt as u,p as d,pt as f,x as p}from"./Bc3rMwVm.js";function m(e,t){return c()?(u(e,t),!0):!1}var h=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var g=e=>e!=null,_=()=>{};function v(e){return Array.isArray(e)?e:[e]}var y=h?window:void 0;h&&window.document,h&&window.navigator,h&&window.location;function b(e){let t=o(e);return t?.$el??t}function x(){let e=f(!1),n=i();return n&&t(()=>{e.value=!0},n),e}function S(e){let t=x();return l(()=>(t.value,!!e()))}function C(e,t,n={}){let{root:i,rootMargin:a,threshold:s=0,window:c=y,immediate:u=!0}=n,d=S(()=>c&&`IntersectionObserver`in c),p=l(()=>v(o(e)).map(b).filter(g)),h=_,x=f(u),C=d.value?r(()=>[p.value,b(i),o(a),x.value],([e,n,r])=>{if(h(),!x.value||!e.length)return;let i=new IntersectionObserver(t,{root:b(n),rootMargin:r,threshold:s});e.forEach(e=>e&&i.observe(e)),h=()=>{i.disconnect(),h=_}},{immediate:u,flush:`post`}):_,w=()=>{h(),C(),x.value=!1};return m(w),{isSupported:d,isActive:x,pause(){h(),x.value=!1},resume(){x.value=!0},stop:w}}var w=2e3;function T(){return!0}function E(e){return e<=0||e>=1?[e]:[0,e,1]}function D(e,r){let i=r.once??!0,a=r.dwellMs!==void 0,o=r.dwellMs??2e3,c=r.dwellVisibilityRatio??.5,l=r.dwellOnce??!0,u=s(!1),d=s(!1),f=s(!1),p=s(null),m=()=>{p.value!==null&&(clearTimeout(p.value),p.value=null)},h=e=>{if(!(!i&&!(a&&l))){if(!a&&u.value){e();return}a&&u.value&&(!l||d.value)&&e()}},g=()=>!(!T()||document.visibilityState!==`visible`||!f.value||l&&d.value),_=e=>{m(),g()&&(p.value=setTimeout(()=>{p.value=null,g()&&(d.value=!0,r.onDwell?.(),h(e))},o))},v=(e,t)=>{let n=e[0];if(n){if(n.isIntersecting){if(!u.value&&(r.onEnter?.(),u.value=!0,!a&&i)){t();return}if(a){let e=n.intersectionRatio>=c;f.value=e,e?_(t):m()}return}r.onLeave?.(),f.value=!1,m()}},{stop:y}=C(e,e=>{v(e,y)},{threshold:a?E(c):0}),b=()=>{if(document.visibilityState===`hidden`){m();return}f.value&&_(y)};t(()=>{!T()||!a||document.addEventListener(`visibilitychange`,b)}),n(()=>{m(),T()&&document.removeEventListener(`visibilitychange`,b),y()})}var O=Object.assign(p({__name:`InView`,props:{once:{type:Boolean,default:!0},dwellMs:{type:Number,default:void 0},dwellVisibilityRatio:{type:Number,default:void 0},dwellOnce:{type:Boolean,default:!0}},emits:[`enter`,`leave`,`dwell`],setup(t,{emit:n}){let r=t,i=n,o=s(null);return D(o,{once:r.once,onEnter:()=>{i(`enter`)},onLeave:()=>{i(`leave`)},dwellMs:r.dwellMs,dwellVisibilityRatio:r.dwellVisibilityRatio,dwellOnce:r.dwellOnce,onDwell:r.dwellMs===void 0?void 0:()=>{i(`dwell`)}}),(t,n)=>(e(),d(`div`,{ref_key:`target`,ref:o},[a(t.$slots,`default`)],512))}}),{__name:`InView`});export{w as n,C as r,O as t};
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.