index.bb9b9e58.js 1.6 KB

1
  1. import{i as u,a as E,n as p,t as y}from"./index.5c31d467.js";import{Z as g,aJ as R,R as f}from"./index.f2940478.js";function w(e){var o;const t=R(e);return(o=t==null?void 0:t.$el)!=null?o:t}const c=u?window:void 0;u&&window.document;u&&window.navigator;u&&window.location;function N(...e){let o,t,n,s;if(E(e[0])?([t,n,s]=e,o=c):[o,t,n,s]=e,!o)return p;let a=p;const r=g(()=>w(o),i=>{a(),i&&(i.addEventListener(t,n,s),a=()=>{i.removeEventListener(t,n,s),a=p})},{immediate:!0,flush:"post"}),l=()=>{r(),a()};return y(l),l}const v=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},d="__vueuse_ssr_handlers__";v[d]=v[d]||{};v[d];var _=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,W=(e,o)=>{var t={};for(var n in e)P.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&_)for(var n of _(e))o.indexOf(n)<0&&T.call(e,n)&&(t[n]=e[n]);return t};function j(e,o,t={}){const n=t,{window:s=c}=n,a=W(n,["window"]);let r;const l=s&&"ResizeObserver"in s,i=()=>{r&&(r.disconnect(),r=void 0)},h=g(()=>w(e),b=>{i(),l&&s&&b&&(r=new ResizeObserver(o),r.observe(b,a))},{immediate:!0,flush:"post"}),O=()=>{i(),h()};return y(O),{isSupported:l,stop:O}}var m;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(m||(m={}));function x({window:e=c}={}){if(!e)return{x:f(0),y:f(0)};const o=f(e.pageXOffset),t=f(e.pageYOffset);return N("scroll",()=>{o.value=e.pageXOffset,t.value=e.pageYOffset},{capture:!1,passive:!0}),{x:o,y:t}}export{N as a,x as b,j as u};