🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@vueuse/components

Package Overview
Dependencies
Maintainers
1
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vueuse/components - npm Package Compare versions

Comparing version

to
13.3.0

2

index.iife.min.js

@@ -1,1 +0,1 @@

(function(y,C,o,S){"use strict";const ge=o.defineComponent({name:"OnClickOutside",props:["as","options"],emits:["trigger"],setup(e,{slots:t,emit:n}){const a=o.shallowRef();return C.onClickOutside(a,s=>{n("trigger",s)},e.options),()=>{if(t.default)return o.h(e.as||"div",{ref:a},t.default())}}}),L=S.isClient?window:void 0;function V(e){var t;const n=o.toValue(e);return(t=n?.$el)!=null?t:n}function M(...e){const t=[],n=()=>{t.forEach(r=>r()),t.length=0},a=(r,c,f,u)=>(r.addEventListener(c,f,u),()=>r.removeEventListener(c,f,u)),s=o.computed(()=>{const r=S.toArray(o.toValue(e[0])).filter(c=>c!=null);return r.every(c=>typeof c!="string")?r:void 0}),l=S.watchImmediate(()=>{var r,c;return[(c=(r=s.value)==null?void 0:r.map(f=>V(f)))!=null?c:[L].filter(f=>f!=null),S.toArray(o.toValue(s.value?e[1]:e[0])),S.toArray(o.unref(s.value?e[2]:e[1])),o.toValue(s.value?e[3]:e[2])]},([r,c,f,u])=>{if(n(),!r?.length||!c?.length||!f?.length)return;const d=S.isObject(u)?{...u}:u;t.push(...r.flatMap(p=>c.flatMap(U=>f.map(g=>a(p,U,g,d)))))},{flush:"post"}),i=()=>{l(),n()};return S.tryOnScopeDispose(n),i}let ee=!1;function te(e,t,n={}){const{window:a=L,ignore:s=[],capture:l=!0,detectIframe:i=!1,controls:r=!1}=n;if(!a)return r?{stop:S.noop,cancel:S.noop,trigger:S.noop}:S.noop;if(S.isIOS&&!ee){ee=!0;const h={passive:!0};Array.from(a.document.body.children).forEach(m=>m.addEventListener("click",S.noop,h)),a.document.documentElement.addEventListener("click",S.noop,h)}let c=!0;const f=h=>o.toValue(s).some(m=>{if(typeof m=="string")return Array.from(a.document.querySelectorAll(m)).some(w=>w===h.target||h.composedPath().includes(w));{const w=V(m);return w&&(h.target===w||h.composedPath().includes(w))}});function u(h){const m=o.toValue(h);return m&&m.$.subTree.shapeFlag===16}function d(h,m){const w=o.toValue(h),R=w.$.subTree&&w.$.subTree.children;return R==null||!Array.isArray(R)?!1:R.some(O=>O.el===m.target||m.composedPath().includes(O.el))}const p=h=>{const m=V(e);if(h.target!=null&&!(!(m instanceof Element)&&u(e)&&d(e,h))&&!(!m||m===h.target||h.composedPath().includes(m))){if("detail"in h&&h.detail===0&&(c=!f(h)),!c){c=!0;return}t(h)}};let U=!1;const g=[M(a,"click",h=>{U||(U=!0,setTimeout(()=>{U=!1},0),p(h))},{passive:!0,capture:l}),M(a,"pointerdown",h=>{const m=V(e);c=!f(h)&&!!(m&&!h.composedPath().includes(m))},{passive:!0}),i&&M(a,"blur",h=>{setTimeout(()=>{var m;const w=V(e);((m=a.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!w?.contains(a.document.activeElement)&&t(h)},0)},{passive:!0})].filter(Boolean),b=()=>g.forEach(h=>h());return r?{stop:b,cancel:()=>{c=!1},trigger:h=>{c=!0,p(h),c=!1}}:b}const ne={mounted(e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=te(e,t.value,{capture:n});else{const[a,s]=t.value;e.__onClickOutside_stop=te(e,a,Object.assign({capture:n},s))}},unmounted(e){e.__onClickOutside_stop()}};function ye(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function oe(...e){let t,n,a={};e.length===3?(t=e[0],n=e[1],a=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],a=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=L,eventName:l="keydown",passive:i=!1,dedupe:r=!1}=a,c=ye(t);return M(s,l,u=>{u.repeat&&o.toValue(r)||c(u)&&n(u)},i)}const we={mounted(e,t){var n,a;const s=(a=(n=t.arg)==null?void 0:n.split(","))!=null?a:!0;if(typeof t.value=="function")oe(s,t.value,{target:e});else{const[l,i]=t.value;oe(s,l,{target:e,...i})}}},Ue=500,Se=10;function G(e,t,n){var a,s;const l=o.computed(()=>V(e));let i,r,c,f=!1;function u(){i&&(clearTimeout(i),i=void 0),r=void 0,c=void 0,f=!1}function d(m){var w,R,O;const[P,_,v]=[c,r,f];if(u(),!n?.onMouseUp||!_||!P||(w=n?.modifiers)!=null&&w.self&&m.target!==l.value)return;(R=n?.modifiers)!=null&&R.prevent&&m.preventDefault(),(O=n?.modifiers)!=null&&O.stop&&m.stopPropagation();const D=m.x-_.x,T=m.y-_.y,z=Math.sqrt(D*D+T*T);n.onMouseUp(m.timeStamp-P,z,v)}function p(m){var w,R,O,P;(w=n?.modifiers)!=null&&w.self&&m.target!==l.value||(u(),(R=n?.modifiers)!=null&&R.prevent&&m.preventDefault(),(O=n?.modifiers)!=null&&O.stop&&m.stopPropagation(),r={x:m.x,y:m.y},c=m.timeStamp,i=setTimeout(()=>{f=!0,t(m)},(P=n?.delay)!=null?P:Ue))}function U(m){var w,R,O,P;if((w=n?.modifiers)!=null&&w.self&&m.target!==l.value||!r||n?.distanceThreshold===!1)return;(R=n?.modifiers)!=null&&R.prevent&&m.preventDefault(),(O=n?.modifiers)!=null&&O.stop&&m.stopPropagation();const _=m.x-r.x,v=m.y-r.y;Math.sqrt(_*_+v*v)>=((P=n?.distanceThreshold)!=null?P:Se)&&u()}const g={capture:(a=n?.modifiers)==null?void 0:a.capture,once:(s=n?.modifiers)==null?void 0:s.once},b=[M(l,"pointerdown",p,g),M(l,"pointermove",U,g),M(l,["pointerup","pointerleave"],d,g)];return()=>b.forEach(m=>m())}const be=o.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(e,{slots:t,emit:n}){const a=o.shallowRef();return G(a,s=>{n("trigger",s)},e.options),()=>{if(t.default)return o.h(e.as||"div",{ref:a},t.default())}}}),ae={mounted(e,t){typeof t.value=="function"?G(e,t.value,{modifiers:t.modifiers}):G(e,...t.value)}},Ce=o.defineComponent({name:"UseActiveElement",setup(e,{slots:t}){const n=o.reactive({element:C.useActiveElement()});return()=>{if(t.default)return t.default(n)}}}),Ee=o.defineComponent({name:"UseBattery",setup(e,{slots:t}){const n=o.reactive(C.useBattery(e));return()=>{if(t.default)return t.default(n)}}}),Oe=o.defineComponent({name:"UseBrowserLocation",setup(e,{slots:t}){const n=o.reactive(C.useBrowserLocation());return()=>{if(t.default)return t.default(n)}}}),Re=o.defineComponent({name:"UseClipboard",props:["source","read","navigator","copiedDuring","legacy"],setup(e,{slots:t}){const n=o.reactive(C.useClipboard(e));return()=>{var a;return(a=t.default)==null?void 0:a.call(t,n)}}}),N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},F="__vueuse_ssr_handlers__",Pe=Ve();function Ve(){return F in N||(N[F]=N[F]||{}),N[F]}function se(e,t){return Pe[e]||t}const Me=Symbol("vueuse-ssr-width");function De(){const e=o.hasInjectionContext()?S.injectLocal(Me,null):null;return typeof e=="number"?e:void 0}function _e(){const e=o.shallowRef(!1),t=o.getCurrentInstance();return t&&o.onMounted(()=>{e.value=!0},t),e}function j(e){const t=_e();return o.computed(()=>(t.value,!!e()))}function Te(e,t={}){const{window:n=L,ssrWidth:a=De()}=t,s=j(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),l=o.shallowRef(typeof a=="number"),i=o.shallowRef(),r=o.shallowRef(!1),c=f=>{r.value=f.matches};return o.watchEffect(()=>{if(l.value){l.value=!s.value;const f=o.toValue(e).split(",");r.value=f.some(u=>{const d=u.includes("not all"),p=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),U=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(p||U);return p&&g&&(g=a>=S.pxValue(p[1])),U&&g&&(g=a<=S.pxValue(U[1])),d?!g:g});return}s.value&&(i.value=n.matchMedia(o.toValue(e)),r.value=i.value.matches)}),M(i,"change",c,{passive:!0}),o.computed(()=>r.value)}function Le(e){return Te("(prefers-color-scheme: dark)",e)}function ke(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ae={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},le="vueuse-storage";function Ie(e,t,n,a={}){var s;const{flush:l="pre",deep:i=!0,listenToStorageChanges:r=!0,writeDefaults:c=!0,mergeDefaults:f=!1,shallow:u,window:d=L,eventFilter:p,onError:U=E=>{console.error(E)},initOnMounted:g}=a,b=(u?o.shallowRef:o.ref)(typeof t=="function"?t():t),h=o.computed(()=>o.toValue(e));if(!n)try{n=se("getDefaultStorage",()=>{var E;return(E=L)==null?void 0:E.localStorage})()}catch(E){U(E)}if(!n)return b;const m=o.toValue(t),w=ke(m),R=(s=a.serializer)!=null?s:Ae[w],{pause:O,resume:P}=S.pausableWatch(b,()=>z(b.value),{flush:l,deep:i,eventFilter:p});o.watch(h,()=>I(),{flush:l});let _=!1;const v=E=>{g&&!_||I(E)},D=E=>{g&&!_||k(E)};d&&r&&(n instanceof Storage?M(d,"storage",v,{passive:!0}):M(d,le,D)),g?S.tryOnMounted(()=>{_=!0,I()}):I();function T(E,A){if(d){const W={key:h.value,oldValue:E,newValue:A,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",W):new CustomEvent(le,{detail:W}))}}function z(E){try{const A=n.getItem(h.value);if(E==null)T(A,null),n.removeItem(h.value);else{const W=R.write(E);A!==W&&(n.setItem(h.value,W),T(A,W))}}catch(A){U(A)}}function B(E){const A=E?E.newValue:n.getItem(h.value);if(A==null)return c&&m!=null&&n.setItem(h.value,R.write(m)),m;if(!E&&f){const W=R.read(A);return typeof f=="function"?f(W,m):w==="object"&&!Array.isArray(W)?{...m,...W}:W}else return typeof A!="string"?A:R.read(A)}function I(E){if(!(E&&E.storageArea!==n)){if(E&&E.key==null){b.value=m;return}if(!(E&&E.key!==h.value)){O();try{E?.newValue!==R.write(b.value)&&(b.value=B(E))}catch(A){U(A)}finally{E?o.nextTick(P):P()}}}}function k(E){I(E.detail)}return b}const ze="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function We(e={}){const{selector:t="html",attribute:n="class",initialValue:a="auto",window:s=L,storage:l,storageKey:i="vueuse-color-scheme",listenToStorageChanges:r=!0,storageRef:c,emitAuto:f,disableTransition:u=!0}=e,d={auto:"",light:"light",dark:"dark",...e.modes||{}},p=Le({window:s}),U=o.computed(()=>p.value?"dark":"light"),g=c||(i==null?S.toRef(a):Ie(i,a,l,{window:s,listenToStorageChanges:r})),b=o.computed(()=>g.value==="auto"?U.value:g.value),h=se("updateHTMLAttrs",(O,P,_)=>{const v=typeof O=="string"?s?.document.querySelector(O):V(O);if(!v)return;const D=new Set,T=new Set;let z=null;if(P==="class"){const I=_.split(/\s/g);Object.values(d).flatMap(k=>(k||"").split(/\s/g)).filter(Boolean).forEach(k=>{I.includes(k)?D.add(k):T.add(k)})}else z={key:P,value:_};if(D.size===0&&T.size===0&&z===null)return;let B;u&&(B=s.document.createElement("style"),B.appendChild(document.createTextNode(ze)),s.document.head.appendChild(B));for(const I of D)v.classList.add(I);for(const I of T)v.classList.remove(I);z&&v.setAttribute(z.key,z.value),u&&(s.getComputedStyle(B).opacity,document.head.removeChild(B))});function m(O){var P;h(t,n,(P=d[O])!=null?P:O)}function w(O){e.onChanged?e.onChanged(O,m):m(O)}o.watch(b,w,{flush:"post",immediate:!0}),S.tryOnMounted(()=>w(b.value));const R=o.computed({get(){return f?g.value:b.value},set(O){g.value=O}});return Object.assign(R,{store:g,system:U,state:b})}const Be=o.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(e,{slots:t}){const n=We(e),a=o.reactive({mode:n,system:n.system,store:n.store});return()=>{if(t.default)return t.default(a)}}}),He=o.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(e,{slots:t}){const n=C.useDark(e),a=o.reactive({isDark:n,toggleDark:S.useToggle(n)});return()=>{if(t.default)return t.default(a)}}}),Ne=o.defineComponent({name:"UseDeviceMotion",setup(e,{slots:t}){const n=C.useDeviceMotion();return()=>{if(t.default)return t.default(n)}}}),Fe=o.defineComponent({name:"UseDeviceOrientation",setup(e,{slots:t}){const n=o.reactive(C.useDeviceOrientation());return()=>{if(t.default)return t.default(n)}}}),je=o.defineComponent({name:"UseDevicePixelRatio",setup(e,{slots:t}){const n=o.reactive({pixelRatio:C.useDevicePixelRatio()});return()=>{if(t.default)return t.default(n)}}}),Ye=o.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(e,{slots:t}){const n=o.reactive(C.useDevicesList(e));return()=>{if(t.default)return t.default(n)}}}),xe=o.defineComponent({name:"UseDocumentVisibility",setup(e,{slots:t}){const n=o.reactive({visibility:C.useDocumentVisibility()});return()=>{if(t.default)return t.default(n)}}}),Xe=o.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle","axis","onStart","onMove","onEnd","disabled","buttons","containerElement"],setup(e,{slots:t}){const n=o.shallowRef(),a=o.computed(()=>{var u;return(u=e.handle)!=null?u:n.value}),s=o.computed(()=>{var u;return(u=e.containerElement)!=null?u:void 0}),l=o.computed(()=>!!e.disabled),i=e.storageKey&&C.useStorage(e.storageKey,o.toValue(e.initialValue)||{x:0,y:0},C.isClient?e.storageType==="session"?sessionStorage:localStorage:void 0),r=i||e.initialValue||{x:0,y:0},c=(u,d)=>{var p;(p=e.onEnd)==null||p.call(e,u,d),i&&(i.value.x=u.x,i.value.y=u.y)},f=o.reactive(C.useDraggable(n,{...e,handle:a,initialValue:r,onEnd:c,disabled:l,containerElement:s}));return()=>{if(t.default)return o.h(e.as||"div",{ref:n,style:`touch-action:none;${f.style}`},t.default(f))}}}),Ke=o.defineComponent({name:"UseElementBounding",props:["box","as"],setup(e,{slots:t}){const n=o.shallowRef(),a=o.reactive(C.useElementBounding(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}});function J(e,t,n={}){const{window:a=L,...s}=n;let l;const i=j(()=>a&&"MutationObserver"in a),r=()=>{l&&(l.disconnect(),l=void 0)},c=o.computed(()=>{const p=o.toValue(e),U=S.toArray(p).map(V).filter(S.notNullish);return new Set(U)}),f=o.watch(()=>c.value,p=>{r(),i.value&&p.size&&(l=new MutationObserver(t),p.forEach(U=>l.observe(U,s)))},{immediate:!0,flush:"post"}),u=()=>l?.takeRecords(),d=()=>{f(),r()};return S.tryOnScopeDispose(d),{isSupported:i,stop:d,takeRecords:u}}function Y(e,t,n={}){const{window:a=L,...s}=n;let l;const i=j(()=>a&&"ResizeObserver"in a),r=()=>{l&&(l.disconnect(),l=void 0)},c=o.computed(()=>{const d=o.toValue(e);return Array.isArray(d)?d.map(p=>V(p)):[V(d)]}),f=o.watch(c,d=>{if(r(),i.value&&a){l=new ResizeObserver(t);for(const p of d)p&&l.observe(p,s)}},{immediate:!0,flush:"post"}),u=()=>{r(),f()};return S.tryOnScopeDispose(u),{isSupported:i,stop:u}}function Ge(e,t={}){const{reset:n=!0,windowResize:a=!0,windowScroll:s=!0,immediate:l=!0,updateTiming:i="sync"}=t,r=o.shallowRef(0),c=o.shallowRef(0),f=o.shallowRef(0),u=o.shallowRef(0),d=o.shallowRef(0),p=o.shallowRef(0),U=o.shallowRef(0),g=o.shallowRef(0);function b(){const m=V(e);if(!m){n&&(r.value=0,c.value=0,f.value=0,u.value=0,d.value=0,p.value=0,U.value=0,g.value=0);return}const w=m.getBoundingClientRect();r.value=w.height,c.value=w.bottom,f.value=w.left,u.value=w.right,d.value=w.top,p.value=w.width,U.value=w.x,g.value=w.y}function h(){i==="sync"?b():i==="next-frame"&&requestAnimationFrame(()=>b())}return Y(e,h),o.watch(()=>V(e),m=>!m&&h()),J(e,h,{attributeFilter:["style","class"]}),s&&M("scroll",h,{capture:!0,passive:!0}),a&&M("resize",h,{passive:!0}),S.tryOnMounted(()=>{l&&h()}),{height:r,bottom:c,left:f,right:u,top:d,width:p,x:U,y:g,update:h}}const Je={mounted(e,t){const[n,a]=typeof t.value=="function"?[t.value,{}]:t.value,{height:s,bottom:l,left:i,right:r,top:c,width:f,x:u,y:d}=Ge(e,a);o.watch([s,l,i,r,c,f,u,d],()=>n({height:s,bottom:l,left:i,right:r,top:c,width:f,x:u,y:d}))}};function $e(e,t,n={}){const{window:a=L,document:s=a?.document,flush:l="sync"}=n;if(!a||!s)return S.noop;let i;const r=u=>{i?.(),i=u},c=o.watchEffect(()=>{const u=V(e);if(u){const{stop:d}=J(s,p=>{p.map(g=>[...g.removedNodes]).flat().some(g=>g===u||g.contains(u))&&t(p)},{window:a,childList:!0,subtree:!0});r(d)}},{flush:l}),f=()=>{c(),r()};return S.tryOnScopeDispose(f),f}function re(e,t={}){const{delayEnter:n=0,delayLeave:a=0,triggerOnRemoval:s=!1,window:l=L}=t,i=o.shallowRef(!1);let r;const c=f=>{const u=f?n:a;r&&(clearTimeout(r),r=void 0),u?r=setTimeout(()=>i.value=f,u):i.value=f};return l&&(M(e,"mouseenter",()=>c(!0),{passive:!0}),M(e,"mouseleave",()=>c(!1),{passive:!0}),s&&$e(o.computed(()=>V(e)),()=>c(!1))),i}const qe={mounted(e,t){const n=t.value;if(typeof n=="function"){const a=re(e);o.watch(a,s=>n(s))}else{const[a,s]=n,l=re(e,s);o.watch(l,i=>a(i))}}},Qe=o.defineComponent({name:"UseElementSize",props:["width","height","box","as"],setup(e,{slots:t}){var n,a;const s=o.ref(),l=o.reactive(C.useElementSize(s,{width:(n=e.width)!=null?n:0,height:(a=e.height)!=null?a:0},{box:e.box}));return()=>{if(t.default)return o.h(e.as||"div",{ref:s},t.default(l))}}});function Ze(e,t={width:0,height:0},n={}){const{window:a=L,box:s="content-box"}=n,l=o.computed(()=>{var d,p;return(p=(d=V(e))==null?void 0:d.namespaceURI)==null?void 0:p.includes("svg")}),i=o.shallowRef(t.width),r=o.shallowRef(t.height),{stop:c}=Y(e,([d])=>{const p=s==="border-box"?d.borderBoxSize:s==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(a&&l.value){const U=V(e);if(U){const g=U.getBoundingClientRect();i.value=g.width,r.value=g.height}}else if(p){const U=S.toArray(p);i.value=U.reduce((g,{inlineSize:b})=>g+b,0),r.value=U.reduce((g,{blockSize:b})=>g+b,0)}else i.value=d.contentRect.width,r.value=d.contentRect.height},n);S.tryOnMounted(()=>{const d=V(e);d&&(i.value="offsetWidth"in d?d.offsetWidth:t.width,r.value="offsetHeight"in d?d.offsetHeight:t.height)});const f=o.watch(()=>V(e),d=>{i.value=d?t.width:0,r.value=d?t.height:0});function u(){c(),f()}return{width:i,height:r,stop:u}}const et={mounted(e,t){var n;const a=typeof t.value=="function"?t.value:(n=t.value)==null?void 0:n[0],s=typeof t.value=="function"?[]:t.value.slice(1),{width:l,height:i}=Ze(e,...s);o.watch([l,i],([r,c])=>a({width:r,height:c}))}},tt=o.defineComponent({name:"UseElementVisibility",props:["as"],setup(e,{slots:t}){const n=o.ref(),a=o.reactive({isVisible:C.useElementVisibility(n)});return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}});function $(e,t,n={}){const{root:a,rootMargin:s="0px",threshold:l=0,window:i=L,immediate:r=!0}=n,c=j(()=>i&&"IntersectionObserver"in i),f=o.computed(()=>{const g=o.toValue(e);return S.toArray(g).map(V).filter(S.notNullish)});let u=S.noop;const d=o.shallowRef(r),p=c.value?o.watch(()=>[f.value,V(a),d.value],([g,b])=>{if(u(),!d.value||!g.length)return;const h=new IntersectionObserver(t,{root:V(b),rootMargin:s,threshold:l});g.forEach(m=>m&&h.observe(m)),u=()=>{h.disconnect(),u=S.noop}},{immediate:r,flush:"post"}):S.noop,U=()=>{u(),p(),d.value=!1};return S.tryOnScopeDispose(U),{isSupported:c,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:U}}function q(e,t={}){const{window:n=L,scrollTarget:a,threshold:s=0,rootMargin:l,once:i=!1}=t,r=o.shallowRef(!1),{stop:c}=$(e,f=>{let u=r.value,d=0;for(const p of f)p.time>=d&&(d=p.time,u=p.isIntersecting);r.value=u,i&&S.watchOnce(r,()=>{c()})},{root:a,window:n,threshold:s,rootMargin:o.toValue(l)});return r}const nt={mounted(e,t){if(typeof t.value=="function"){const n=t.value,a=q(e);o.watch(a,s=>n(s),{immediate:!0})}else{const[n,a]=t.value,s=q(e,a);o.watch(s,l=>n(l),{immediate:!0})}}},ot=o.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(e,{slots:t}){const n=o.reactive(C.useEyeDropper());return()=>{if(t.default)return t.default(n)}}}),at=o.defineComponent({name:"UseFullscreen",props:["as"],setup(e,{slots:t}){const n=o.ref(),a=o.reactive(C.useFullscreen(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}}),st=o.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(e,{slots:t}){const n=o.reactive(C.useGeolocation(e));return()=>{if(t.default)return t.default(n)}}}),lt=o.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(e,{slots:t}){const n=o.reactive(C.useIdle(e.timeout,e));return()=>{if(t.default)return t.default(n)}}});function rt(e,t,n){const{immediate:a=!0,delay:s=0,onError:l=S.noop,onSuccess:i=S.noop,resetOnExecute:r=!0,shallow:c=!0,throwError:f}=n??{},u=c?o.shallowRef(t):o.ref(t),d=o.shallowRef(!1),p=o.shallowRef(!1),U=o.shallowRef(void 0);async function g(m=0,...w){r&&(u.value=t),U.value=void 0,d.value=!1,p.value=!0,m>0&&await S.promiseTimeout(m);const R=typeof e=="function"?e(...w):e;try{const O=await R;u.value=O,d.value=!0,i(O)}catch(O){if(U.value=O,l(O),f)throw O}finally{p.value=!1}return u.value}a&&g(s);const b={state:u,isReady:d,isLoading:p,error:U,execute:g};function h(){return new Promise((m,w)=>{S.until(p).toBe(!1).then(()=>m(b)).catch(w)})}return{...b,then(m,w){return h().then(m,w)}}}async function it(e){return new Promise((t,n)=>{const a=new Image,{src:s,srcset:l,sizes:i,class:r,loading:c,crossorigin:f,referrerPolicy:u,width:d,height:p,decoding:U,fetchPriority:g,ismap:b,usemap:h}=e;a.src=s,l!=null&&(a.srcset=l),i!=null&&(a.sizes=i),r!=null&&(a.className=r),c!=null&&(a.loading=c),f!=null&&(a.crossOrigin=f),u!=null&&(a.referrerPolicy=u),d!=null&&(a.width=d),p!=null&&(a.height=p),U!=null&&(a.decoding=U),g!=null&&(a.fetchPriority=g),b!=null&&(a.isMap=b),h!=null&&(a.useMap=h),a.onload=()=>t(a),a.onerror=n})}function ut(e,t={}){const n=rt(()=>it(o.toValue(e)),void 0,{resetOnExecute:!0,...t});return o.watch(()=>o.toValue(e),()=>n.execute(t.delay),{deep:!0}),n}const ct=o.defineComponent({name:"UseImage",props:["src","srcset","sizes","as","alt","class","loading","crossorigin","referrerPolicy","width","height","decoding","fetchPriority","ismap","usemap"],setup(e,{slots:t}){const n=o.reactive(ut(e));return()=>n.isLoading&&t.loading?t.loading(n):n.error&&t.error?t.error(n.error):t.default?t.default(n):o.h(e.as||"img",e)}});function x(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}const ie=1;function Q(e,t={}){const{throttle:n=0,idle:a=200,onStop:s=S.noop,onScroll:l=S.noop,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:r={capture:!1,passive:!0},behavior:c="auto",window:f=L,onError:u=v=>{console.error(v)}}=t,d=o.shallowRef(0),p=o.shallowRef(0),U=o.computed({get(){return d.value},set(v){b(v,void 0)}}),g=o.computed({get(){return p.value},set(v){b(void 0,v)}});function b(v,D){var T,z,B,I;if(!f)return;const k=o.toValue(e);if(!k)return;(B=k instanceof Document?f.document.body:k)==null||B.scrollTo({top:(T=o.toValue(D))!=null?T:g.value,left:(z=o.toValue(v))!=null?z:U.value,behavior:o.toValue(c)});const E=((I=k?.document)==null?void 0:I.documentElement)||k?.documentElement||k;U!=null&&(d.value=E.scrollLeft),g!=null&&(p.value=E.scrollTop)}const h=o.shallowRef(!1),m=o.reactive({left:!0,right:!1,top:!0,bottom:!1}),w=o.reactive({left:!1,right:!1,top:!1,bottom:!1}),R=v=>{h.value&&(h.value=!1,w.left=!1,w.right=!1,w.top=!1,w.bottom=!1,s(v))},O=S.useDebounceFn(R,n+a),P=v=>{var D;if(!f)return;const T=((D=v?.document)==null?void 0:D.documentElement)||v?.documentElement||V(v),{display:z,flexDirection:B,direction:I}=getComputedStyle(T),k=I==="rtl"?-1:1,E=T.scrollLeft;w.left=E<d.value,w.right=E>d.value;const A=Math.abs(E*k)<=(i.left||0),W=Math.abs(E*k)+T.clientWidth>=T.scrollWidth-(i.right||0)-ie;z==="flex"&&B==="row-reverse"?(m.left=W,m.right=A):(m.left=A,m.right=W),d.value=E;let H=T.scrollTop;v===f.document&&!H&&(H=f.document.body.scrollTop),w.top=H<p.value,w.bottom=H>p.value;const he=Math.abs(H)<=(i.top||0),ve=Math.abs(H)+T.clientHeight>=T.scrollHeight-(i.bottom||0)-ie;z==="flex"&&B==="column-reverse"?(m.top=ve,m.bottom=he):(m.top=he,m.bottom=ve),p.value=H},_=v=>{var D;if(!f)return;const T=(D=v.target.documentElement)!=null?D:v.target;P(T),h.value=!0,O(v),l(v)};return M(e,"scroll",n?S.useThrottleFn(_,n,!0,!1):_,r),S.tryOnMounted(()=>{try{const v=o.toValue(e);if(!v)return;P(v)}catch(v){u(v)}}),M(e,"scrollend",R,r),{x:U,y:g,isScrolling:h,arrivedState:m,directions:w,measure(){const v=o.toValue(e);f&&v&&P(v)}}}function ue(e,t,n={}){var a;const{direction:s="bottom",interval:l=100,canLoadMore:i=()=>!0}=n,r=o.reactive(Q(e,{...n,offset:{[s]:(a=n.distance)!=null?a:0,...n.offset}})),c=o.ref(),f=o.computed(()=>!!c.value),u=o.computed(()=>x(o.toValue(e))),d=q(u);function p(){if(r.measure(),!u.value||!d.value||!i(u.value))return;const{scrollHeight:g,clientHeight:b,scrollWidth:h,clientWidth:m}=u.value,w=s==="bottom"||s==="top"?g<=b:h<=m;(r.arrivedState[s]||w)&&(c.value||(c.value=Promise.all([t(r),new Promise(R=>setTimeout(R,l))]).finally(()=>{c.value=null,o.nextTick(()=>p())})))}const U=o.watch(()=>[r.arrivedState[s],d.value],p,{immediate:!0});return S.tryOnUnmounted(U),{isLoading:f,reset(){o.nextTick(()=>p())}}}const ft={mounted(e,t){typeof t.value=="function"?ue(e,t.value):ue(e,...t.value)}},dt={mounted(e,t){typeof t.value=="function"?$(e,t.value):$(e,...t.value)}},mt=o.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(e,{slots:t}){const n=o.reactive(C.useMouse(e));return()=>{if(t.default)return t.default(n)}}}),pt=o.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(e,{slots:t}){const n=o.ref(),a=o.reactive(C.useMouseInElement(n,e));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}}),ht={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof MouseEvent?[e.movementX,e.movementY]:null};function vt(e={}){const{type:t="page",touch:n=!0,resetOnTouchEnds:a=!1,initialValue:s={x:0,y:0},window:l=L,target:i=l,scroll:r=!0,eventFilter:c}=e;let f=null,u=0,d=0;const p=o.shallowRef(s.x),U=o.shallowRef(s.y),g=o.shallowRef(null),b=typeof t=="function"?t:ht[t],h=v=>{const D=b(v);f=v,D&&([p.value,U.value]=D,g.value="mouse"),l&&(u=l.scrollX,d=l.scrollY)},m=v=>{if(v.touches.length>0){const D=b(v.touches[0]);D&&([p.value,U.value]=D,g.value="touch")}},w=()=>{if(!f||!l)return;const v=b(f);f instanceof MouseEvent&&v&&(p.value=v[0]+l.scrollX-u,U.value=v[1]+l.scrollY-d)},R=()=>{p.value=s.x,U.value=s.y},O=c?v=>c(()=>h(v),{}):v=>h(v),P=c?v=>c(()=>m(v),{}):v=>m(v),_=c?()=>c(()=>w(),{}):()=>w();if(i){const v={passive:!0};M(i,["mousemove","dragover"],O,v),n&&t!=="movement"&&(M(i,["touchstart","touchmove"],P,v),a&&M(i,"touchend",R,v)),r&&t==="page"&&M(l,"scroll",_,v)}return{x:p,y:U,sourceType:g}}function gt(e,t={}){const{handleOutside:n=!0,window:a=L}=t,s=t.type||"page",{x:l,y:i,sourceType:r}=vt(t),c=o.shallowRef(e??a?.document.body),f=o.shallowRef(0),u=o.shallowRef(0),d=o.shallowRef(0),p=o.shallowRef(0),U=o.shallowRef(0),g=o.shallowRef(0),b=o.shallowRef(!0);let h=()=>{};return a&&(h=o.watch([c,l,i],()=>{const m=V(c);if(!m||!(m instanceof Element))return;const{left:w,top:R,width:O,height:P}=m.getBoundingClientRect();d.value=w+(s==="page"?a.pageXOffset:0),p.value=R+(s==="page"?a.pageYOffset:0),U.value=P,g.value=O;const _=l.value-d.value,v=i.value-p.value;b.value=O===0||P===0||_<0||v<0||_>O||v>P,(n||!b.value)&&(f.value=_,u.value=v)},{immediate:!0}),M(document,"mouseleave",()=>b.value=!0,{passive:!0})),{x:l,y:i,sourceType:r,elementX:f,elementY:u,elementPositionX:d,elementPositionY:p,elementHeight:U,elementWidth:g,isOutside:b,stop:h}}const yt={mounted(e,t){const[n,a]=typeof t.value=="function"?[t.value,{}]:t.value,s=S.reactiveOmit(o.reactive(gt(e,a)),"stop");o.watch(s,l=>n(l))}},wt=o.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(e,{slots:t}){const n=o.ref(),a=o.reactive(C.useMousePressed({...e,target:n}));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}}),Ut=o.defineComponent({name:"UseNetwork",setup(e,{slots:t}){const n=o.reactive(C.useNetwork());return()=>{if(t.default)return t.default(n)}}}),St=o.defineComponent({name:"UseNow",props:["interval"],setup(e,{slots:t}){const n=o.reactive(C.useNow({...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),bt=o.defineComponent({name:"UseObjectUrl",props:["object"],setup(e,{slots:t}){const n=S.toRef(e,"object"),a=C.useObjectUrl(n);return()=>{if(t.default&&a.value)return t.default(a)}}}),Ct=o.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(e,{slots:t,emit:n}){const a=o.reactive(C.useOffsetPagination({...e,onPageChange(...s){var l;(l=e.onPageChange)==null||l.call(e,...s),n("page-change",...s)},onPageSizeChange(...s){var l;(l=e.onPageSizeChange)==null||l.call(e,...s),n("page-size-change",...s)},onPageCountChange(...s){var l;(l=e.onPageCountChange)==null||l.call(e,...s),n("page-count-change",...s)}}));return()=>{if(t.default)return t.default(a)}}}),Et=o.defineComponent({name:"UseOnline",setup(e,{slots:t}){const n=o.reactive({isOnline:C.useOnline()});return()=>{if(t.default)return t.default(n)}}}),Ot=o.defineComponent({name:"UsePageLeave",setup(e,{slots:t}){const n=o.reactive({isLeft:C.usePageLeave()});return()=>{if(t.default)return t.default(n)}}}),Rt=o.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(e,{slots:t}){const n=o.shallowRef(null),a=o.reactive(C.usePointer({...e,target:e.target==="self"?n:L}));return()=>{if(t.default)return t.default(a,{ref:n})}}}),Pt=o.defineComponent({name:"UsePointerLock",props:["as"],setup(e,{slots:t}){const n=o.ref(),a=o.reactive(C.usePointerLock(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}}),Vt=o.defineComponent({name:"UsePreferredColorScheme",setup(e,{slots:t}){const n=o.reactive({colorScheme:C.usePreferredColorScheme()});return()=>{if(t.default)return t.default(n)}}}),Mt=o.defineComponent({name:"UsePreferredContrast",setup(e,{slots:t}){const n=o.reactive({contrast:C.usePreferredContrast()});return()=>{if(t.default)return t.default(n)}}}),Dt=o.defineComponent({name:"UsePreferredDark",setup(e,{slots:t}){const n=o.reactive({prefersDark:C.usePreferredDark()});return()=>{if(t.default)return t.default(n)}}}),_t=o.defineComponent({name:"UsePreferredLanguages",setup(e,{slots:t}){const n=o.reactive({languages:C.usePreferredLanguages()});return()=>{if(t.default)return t.default(n)}}}),Tt=o.defineComponent({name:"UsePreferredReducedMotion",setup(e,{slots:t}){const n=o.reactive({motion:C.usePreferredReducedMotion()});return()=>{if(t.default)return t.default(n)}}}),Lt=o.defineComponent({name:"UsePreferredReducedTransparency",setup(e,{slots:t}){const n=o.reactive({transparency:C.usePreferredReducedTransparency()});return()=>{if(t.default)return t.default(n)}}}),kt={mounted(e,t){typeof t.value=="function"?Y(e,t.value):Y(e,...t.value)}};function X(e,t,n={}){const{window:a=L,initialValue:s,observe:l=!1}=n,i=o.shallowRef(s),r=o.computed(()=>{var f;return V(t)||((f=a?.document)==null?void 0:f.documentElement)});function c(){var f;const u=o.toValue(e),d=o.toValue(r);if(d&&a&&u){const p=(f=a.getComputedStyle(d).getPropertyValue(u))==null?void 0:f.trim();i.value=p||i.value||s}}return l&&J(r,c,{attributeFilter:["style","class"],window:a}),o.watch([r,()=>o.toValue(e)],(f,u)=>{u[0]&&u[1]&&u[0].style.removeProperty(u[1]),c()},{immediate:!0}),o.watch([i,r],([f,u])=>{const d=o.toValue(e);u?.style&&d&&(f==null?u.style.removeProperty(d):u.style.setProperty(d,f))},{immediate:!0}),i}const ce="--vueuse-safe-area-top",fe="--vueuse-safe-area-right",de="--vueuse-safe-area-bottom",me="--vueuse-safe-area-left";function At(){const e=o.shallowRef(""),t=o.shallowRef(""),n=o.shallowRef(""),a=o.shallowRef("");if(S.isClient){const l=X(ce),i=X(fe),r=X(de),c=X(me);l.value="env(safe-area-inset-top, 0px)",i.value="env(safe-area-inset-right, 0px)",r.value="env(safe-area-inset-bottom, 0px)",c.value="env(safe-area-inset-left, 0px)",s(),M("resize",S.useDebounceFn(s),{passive:!0})}function s(){e.value=K(ce),t.value=K(fe),n.value=K(de),a.value=K(me)}return{top:e,right:t,bottom:n,left:a,update:s}}function K(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}const It=o.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(e,{slots:t}){const{top:n,right:a,bottom:s,left:l}=At();return()=>{if(t.default)return o.h("div",{style:{paddingTop:e.top?n.value:"",paddingRight:e.right?a.value:"",paddingBottom:e.bottom?s.value:"",paddingLeft:e.left?l.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},t.default())}}}),zt={mounted(e,t){if(typeof t.value=="function"){const n=t.value,a=Q(e,{onScroll(){n(a)},onStop(){n(a)}})}else{const[n,a]=t.value,s=Q(e,{...a,onScroll(l){var i;(i=a.onScroll)==null||i.call(a,l),n(s)},onStop(l){var i;(i=a.onStop)==null||i.call(a,l),n(s)}})}}};function pe(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:pe(n)}}function Wt(e){const t=e||window.event,n=t.target;return pe(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Z=new WeakMap;function Bt(e,t=!1){const n=o.shallowRef(t);let a=null,s="";o.watch(S.toRef(e),r=>{const c=x(o.toValue(r));if(c){const f=c;if(Z.get(f)||Z.set(f,f.style.overflow),f.style.overflow!=="hidden"&&(s=f.style.overflow),f.style.overflow==="hidden")return n.value=!0;if(n.value)return f.style.overflow="hidden"}},{immediate:!0});const l=()=>{const r=x(o.toValue(e));!r||n.value||(S.isIOS&&(a=M(r,"touchmove",c=>{Wt(c)},{passive:!1})),r.style.overflow="hidden",n.value=!0)},i=()=>{const r=x(o.toValue(e));!r||!n.value||(S.isIOS&&a?.(),r.style.overflow=s,Z.delete(r),n.value=!1)};return S.tryOnScopeDispose(i),o.computed({get(){return n.value},set(r){r?l():i()}})}function Ht(){let e=!1;const t=o.shallowRef(!1);return(n,a)=>{if(t.value=a.value,e)return;e=!0;const s=Bt(n,a.value);o.watch(t,l=>s.value=l)}}const Nt=Ht(),Ft=o.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages","showSecond"],setup(e,{slots:t}){const n=o.reactive(C.useTimeAgo(()=>e.time,{...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),jt=o.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(e,{slots:t}){const n=o.reactive(C.useTimestamp({...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),Yt=o.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(e,{slots:t,expose:n}){const{list:a}=o.toRefs(e),{list:s,containerProps:l,wrapperProps:i,scrollTo:r}=C.useVirtualList(a,e.options);return n({scrollTo:r}),l.style&&typeof l.style=="object"&&!Array.isArray(l.style)&&(l.style.height=e.height||"300px"),()=>o.h("div",{...l},[o.h("div",{...i.value},s.value.map(c=>o.h("div",{style:{overflow:"hidden",height:c.height}},t.default?t.default(c):"Please set content!")))])}}),xt=o.defineComponent({name:"UseWindowFocus",setup(e,{slots:t}){const n=o.reactive({focused:C.useWindowFocus()});return()=>{if(t.default)return t.default(n)}}}),Xt=o.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(e,{slots:t}){const n=o.reactive(C.useWindowSize(e));return()=>{if(t.default)return t.default(n)}}});y.OnClickOutside=ge,y.OnLongPress=be,y.UseActiveElement=Ce,y.UseBattery=Ee,y.UseBrowserLocation=Oe,y.UseClipboard=Re,y.UseColorMode=Be,y.UseDark=He,y.UseDeviceMotion=Ne,y.UseDeviceOrientation=Fe,y.UseDevicePixelRatio=je,y.UseDevicesList=Ye,y.UseDocumentVisibility=xe,y.UseDraggable=Xe,y.UseElementBounding=Ke,y.UseElementSize=Qe,y.UseElementVisibility=tt,y.UseEyeDropper=ot,y.UseFullscreen=at,y.UseGeolocation=st,y.UseIdle=lt,y.UseImage=ct,y.UseMouse=mt,y.UseMouseInElement=pt,y.UseMousePressed=wt,y.UseNetwork=Ut,y.UseNow=St,y.UseObjectUrl=bt,y.UseOffsetPagination=Ct,y.UseOnline=Et,y.UsePageLeave=Ot,y.UsePointer=Rt,y.UsePointerLock=Pt,y.UsePreferredColorScheme=Vt,y.UsePreferredContrast=Mt,y.UsePreferredDark=Dt,y.UsePreferredLanguages=_t,y.UsePreferredReducedMotion=Tt,y.UsePreferredReducedTransparency=Lt,y.UseScreenSafeArea=It,y.UseTimeAgo=Ft,y.UseTimestamp=jt,y.UseVirtualList=Yt,y.UseWindowFocus=xt,y.UseWindowSize=Xt,y.VOnClickOutside=ne,y.VOnLongPress=ae,y.vElementBounding=Je,y.vElementHover=qe,y.vElementSize=et,y.vElementVisibility=nt,y.vInfiniteScroll=ft,y.vIntersectionObserver=dt,y.vMouseInElement=yt,y.vOnClickOutside=ne,y.vOnKeyStroke=we,y.vOnLongPress=ae,y.vResizeObserver=kt,y.vScroll=zt,y.vScrollLock=Nt})(this.VueUse=this.VueUse||{},VueUse,Vue,VueUse);
(function(y,C,o,S){"use strict";const ye=o.defineComponent({name:"OnClickOutside",props:["as","options"],emits:["trigger"],setup(e,{slots:t,emit:n}){const a=o.shallowRef();return C.onClickOutside(a,l=>{n("trigger",l)},e.options),()=>{if(t.default)return o.h(e.as||"div",{ref:a},t.default())}}}),k=S.isClient?window:void 0;function V(e){var t;const n=o.toValue(e);return(t=n?.$el)!=null?t:n}function M(...e){const t=[],n=()=>{t.forEach(r=>r()),t.length=0},a=(r,c,f,u)=>(r.addEventListener(c,f,u),()=>r.removeEventListener(c,f,u)),l=o.computed(()=>{const r=S.toArray(o.toValue(e[0])).filter(c=>c!=null);return r.every(c=>typeof c!="string")?r:void 0}),s=S.watchImmediate(()=>{var r,c;return[(c=(r=l.value)==null?void 0:r.map(f=>V(f)))!=null?c:[k].filter(f=>f!=null),S.toArray(o.toValue(l.value?e[1]:e[0])),S.toArray(o.unref(l.value?e[2]:e[1])),o.toValue(l.value?e[3]:e[2])]},([r,c,f,u])=>{if(n(),!r?.length||!c?.length||!f?.length)return;const d=S.isObject(u)?{...u}:u;t.push(...r.flatMap(p=>c.flatMap(U=>f.map(g=>a(p,U,g,d)))))},{flush:"post"}),i=()=>{s(),n()};return S.tryOnScopeDispose(n),i}let te=!1;function ne(e,t,n={}){const{window:a=k,ignore:l=[],capture:s=!0,detectIframe:i=!1,controls:r=!1}=n;if(!a)return r?{stop:S.noop,cancel:S.noop,trigger:S.noop}:S.noop;if(S.isIOS&&!te){te=!0;const h={passive:!0};Array.from(a.document.body.children).forEach(m=>m.addEventListener("click",S.noop,h)),a.document.documentElement.addEventListener("click",S.noop,h)}let c=!0;const f=h=>o.toValue(l).some(m=>{if(typeof m=="string")return Array.from(a.document.querySelectorAll(m)).some(w=>w===h.target||h.composedPath().includes(w));{const w=V(m);return w&&(h.target===w||h.composedPath().includes(w))}});function u(h){const m=o.toValue(h);return m&&m.$.subTree.shapeFlag===16}function d(h,m){const w=o.toValue(h),O=w.$.subTree&&w.$.subTree.children;return O==null||!Array.isArray(O)?!1:O.some(R=>R.el===m.target||m.composedPath().includes(R.el))}const p=h=>{const m=V(e);if(h.target!=null&&!(!(m instanceof Element)&&u(e)&&d(e,h))&&!(!m||m===h.target||h.composedPath().includes(m))){if("detail"in h&&h.detail===0&&(c=!f(h)),!c){c=!0;return}t(h)}};let U=!1;const g=[M(a,"click",h=>{U||(U=!0,setTimeout(()=>{U=!1},0),p(h))},{passive:!0,capture:s}),M(a,"pointerdown",h=>{const m=V(e);c=!f(h)&&!!(m&&!h.composedPath().includes(m))},{passive:!0}),i&&M(a,"blur",h=>{setTimeout(()=>{var m;const w=V(e);((m=a.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!w?.contains(a.document.activeElement)&&t(h)},0)},{passive:!0})].filter(Boolean),b=()=>g.forEach(h=>h());return r?{stop:b,cancel:()=>{c=!1},trigger:h=>{c=!0,p(h),c=!1}}:b}const G=new WeakMap,oe={mounted(e,t){const n=!t.modifiers.bubble;let a;if(typeof t.value=="function")a=ne(e,t.value,{capture:n});else{const[l,s]=t.value;a=ne(e,l,Object.assign({capture:n},s))}G.set(e,a)},unmounted(e){const t=G.get(e);t&&typeof t=="function"?t():t?.stop(),G.delete(e)}};function we(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ae(...e){let t,n,a={};e.length===3?(t=e[0],n=e[1],a=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],a=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:l=k,eventName:s="keydown",passive:i=!1,dedupe:r=!1}=a,c=we(t);return M(l,s,u=>{u.repeat&&o.toValue(r)||c(u)&&n(u)},i)}const Ue={mounted(e,t){var n,a;const l=(a=(n=t.arg)==null?void 0:n.split(","))!=null?a:!0;if(typeof t.value=="function")ae(l,t.value,{target:e});else{const[s,i]=t.value;ae(l,s,{target:e,...i})}}},Se=500,be=10;function J(e,t,n){var a,l;const s=o.computed(()=>V(e));let i,r,c,f=!1;function u(){i&&(clearTimeout(i),i=void 0),r=void 0,c=void 0,f=!1}function d(m){var w,O,R;const[P,T,v]=[c,r,f];if(u(),!n?.onMouseUp||!T||!P||(w=n?.modifiers)!=null&&w.self&&m.target!==s.value)return;(O=n?.modifiers)!=null&&O.prevent&&m.preventDefault(),(R=n?.modifiers)!=null&&R.stop&&m.stopPropagation();const D=m.x-T.x,L=m.y-T.y,W=Math.sqrt(D*D+L*L);n.onMouseUp(m.timeStamp-P,W,v)}function p(m){var w,O,R,P;(w=n?.modifiers)!=null&&w.self&&m.target!==s.value||(u(),(O=n?.modifiers)!=null&&O.prevent&&m.preventDefault(),(R=n?.modifiers)!=null&&R.stop&&m.stopPropagation(),r={x:m.x,y:m.y},c=m.timeStamp,i=setTimeout(()=>{f=!0,t(m)},(P=n?.delay)!=null?P:Se))}function U(m){var w,O,R,P;if((w=n?.modifiers)!=null&&w.self&&m.target!==s.value||!r||n?.distanceThreshold===!1)return;(O=n?.modifiers)!=null&&O.prevent&&m.preventDefault(),(R=n?.modifiers)!=null&&R.stop&&m.stopPropagation();const T=m.x-r.x,v=m.y-r.y;Math.sqrt(T*T+v*v)>=((P=n?.distanceThreshold)!=null?P:be)&&u()}const g={capture:(a=n?.modifiers)==null?void 0:a.capture,once:(l=n?.modifiers)==null?void 0:l.once},b=[M(s,"pointerdown",p,g),M(s,"pointermove",U,g),M(s,["pointerup","pointerleave"],d,g)];return()=>b.forEach(m=>m())}const Ce=o.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(e,{slots:t,emit:n}){const a=o.shallowRef();return J(a,l=>{n("trigger",l)},e.options),()=>{if(t.default)return o.h(e.as||"div",{ref:a},t.default())}}}),le={mounted(e,t){typeof t.value=="function"?J(e,t.value,{modifiers:t.modifiers}):J(e,...t.value)}},Ee=o.defineComponent({name:"UseActiveElement",setup(e,{slots:t}){const n=o.reactive({element:C.useActiveElement()});return()=>{if(t.default)return t.default(n)}}}),Re=o.defineComponent({name:"UseBattery",setup(e,{slots:t}){const n=o.reactive(C.useBattery(e));return()=>{if(t.default)return t.default(n)}}}),Oe=o.defineComponent({name:"UseBrowserLocation",setup(e,{slots:t}){const n=o.reactive(C.useBrowserLocation());return()=>{if(t.default)return t.default(n)}}}),Pe=o.defineComponent({name:"UseClipboard",props:["source","read","navigator","copiedDuring","legacy"],setup(e,{slots:t}){const n=o.reactive(C.useClipboard(e));return()=>{var a;return(a=t.default)==null?void 0:a.call(t,n)}}}),N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},F="__vueuse_ssr_handlers__",Ve=Me();function Me(){return F in N||(N[F]=N[F]||{}),N[F]}function se(e,t){return Ve[e]||t}const De=Symbol("vueuse-ssr-width");function Te(){const e=o.hasInjectionContext()?S.injectLocal(De,null):null;return typeof e=="number"?e:void 0}function Le(){const e=o.shallowRef(!1),t=o.getCurrentInstance();return t&&o.onMounted(()=>{e.value=!0},t),e}function j(e){const t=Le();return o.computed(()=>(t.value,!!e()))}function ke(e,t={}){const{window:n=k,ssrWidth:a=Te()}=t,l=j(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),s=o.shallowRef(typeof a=="number"),i=o.shallowRef(),r=o.shallowRef(!1),c=f=>{r.value=f.matches};return o.watchEffect(()=>{if(s.value){s.value=!l.value;const f=o.toValue(e).split(",");r.value=f.some(u=>{const d=u.includes("not all"),p=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),U=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(p||U);return p&&g&&(g=a>=S.pxValue(p[1])),U&&g&&(g=a<=S.pxValue(U[1])),d?!g:g});return}l.value&&(i.value=n.matchMedia(o.toValue(e)),r.value=i.value.matches)}),M(i,"change",c,{passive:!0}),o.computed(()=>r.value)}function _e(e){return ke("(prefers-color-scheme: dark)",e)}function Ae(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ie={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},re="vueuse-storage";function We(e,t,n,a={}){var l;const{flush:s="pre",deep:i=!0,listenToStorageChanges:r=!0,writeDefaults:c=!0,mergeDefaults:f=!1,shallow:u,window:d=k,eventFilter:p,onError:U=E=>{console.error(E)},initOnMounted:g}=a,b=(u?o.shallowRef:o.ref)(typeof t=="function"?t():t),h=o.computed(()=>o.toValue(e));if(!n)try{n=se("getDefaultStorage",()=>{var E;return(E=k)==null?void 0:E.localStorage})()}catch(E){U(E)}if(!n)return b;const m=o.toValue(t),w=Ae(m),O=(l=a.serializer)!=null?l:Ie[w],{pause:R,resume:P}=S.pausableWatch(b,()=>W(b.value),{flush:s,deep:i,eventFilter:p});o.watch(h,()=>I(),{flush:s});let T=!1;const v=E=>{g&&!T||I(E)},D=E=>{g&&!T||_(E)};d&&r&&(n instanceof Storage?M(d,"storage",v,{passive:!0}):M(d,re,D)),g?S.tryOnMounted(()=>{T=!0,I()}):I();function L(E,A){if(d){const z={key:h.value,oldValue:E,newValue:A,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",z):new CustomEvent(re,{detail:z}))}}function W(E){try{const A=n.getItem(h.value);if(E==null)L(A,null),n.removeItem(h.value);else{const z=O.write(E);A!==z&&(n.setItem(h.value,z),L(A,z))}}catch(A){U(A)}}function B(E){const A=E?E.newValue:n.getItem(h.value);if(A==null)return c&&m!=null&&n.setItem(h.value,O.write(m)),m;if(!E&&f){const z=O.read(A);return typeof f=="function"?f(z,m):w==="object"&&!Array.isArray(z)?{...m,...z}:z}else return typeof A!="string"?A:O.read(A)}function I(E){if(!(E&&E.storageArea!==n)){if(E&&E.key==null){b.value=m;return}if(!(E&&E.key!==h.value)){R();try{E?.newValue!==O.write(b.value)&&(b.value=B(E))}catch(A){U(A)}finally{E?o.nextTick(P):P()}}}}function _(E){I(E.detail)}return b}const ze="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Be(e={}){const{selector:t="html",attribute:n="class",initialValue:a="auto",window:l=k,storage:s,storageKey:i="vueuse-color-scheme",listenToStorageChanges:r=!0,storageRef:c,emitAuto:f,disableTransition:u=!0}=e,d={auto:"",light:"light",dark:"dark",...e.modes||{}},p=_e({window:l}),U=o.computed(()=>p.value?"dark":"light"),g=c||(i==null?S.toRef(a):We(i,a,s,{window:l,listenToStorageChanges:r})),b=o.computed(()=>g.value==="auto"?U.value:g.value),h=se("updateHTMLAttrs",(R,P,T)=>{const v=typeof R=="string"?l?.document.querySelector(R):V(R);if(!v)return;const D=new Set,L=new Set;let W=null;if(P==="class"){const I=T.split(/\s/g);Object.values(d).flatMap(_=>(_||"").split(/\s/g)).filter(Boolean).forEach(_=>{I.includes(_)?D.add(_):L.add(_)})}else W={key:P,value:T};if(D.size===0&&L.size===0&&W===null)return;let B;u&&(B=l.document.createElement("style"),B.appendChild(document.createTextNode(ze)),l.document.head.appendChild(B));for(const I of D)v.classList.add(I);for(const I of L)v.classList.remove(I);W&&v.setAttribute(W.key,W.value),u&&(l.getComputedStyle(B).opacity,document.head.removeChild(B))});function m(R){var P;h(t,n,(P=d[R])!=null?P:R)}function w(R){e.onChanged?e.onChanged(R,m):m(R)}o.watch(b,w,{flush:"post",immediate:!0}),S.tryOnMounted(()=>w(b.value));const O=o.computed({get(){return f?g.value:b.value},set(R){g.value=R}});return Object.assign(O,{store:g,system:U,state:b})}const He=o.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(e,{slots:t}){const n=Be(e),a=o.reactive({mode:n,system:n.system,store:n.store});return()=>{if(t.default)return t.default(a)}}}),Ne=o.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(e,{slots:t}){const n=C.useDark(e),a=o.reactive({isDark:n,toggleDark:S.useToggle(n)});return()=>{if(t.default)return t.default(a)}}}),Fe=o.defineComponent({name:"UseDeviceMotion",setup(e,{slots:t}){const n=C.useDeviceMotion();return()=>{if(t.default)return t.default(n)}}}),je=o.defineComponent({name:"UseDeviceOrientation",setup(e,{slots:t}){const n=o.reactive(C.useDeviceOrientation());return()=>{if(t.default)return t.default(n)}}}),Ye=o.defineComponent({name:"UseDevicePixelRatio",setup(e,{slots:t}){const n=o.reactive({pixelRatio:C.useDevicePixelRatio()});return()=>{if(t.default)return t.default(n)}}}),xe=o.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(e,{slots:t}){const n=o.reactive(C.useDevicesList(e));return()=>{if(t.default)return t.default(n)}}}),Xe=o.defineComponent({name:"UseDocumentVisibility",setup(e,{slots:t}){const n=o.reactive({visibility:C.useDocumentVisibility()});return()=>{if(t.default)return t.default(n)}}}),Ke=o.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle","axis","onStart","onMove","onEnd","disabled","buttons","containerElement"],setup(e,{slots:t}){const n=o.shallowRef(),a=o.computed(()=>{var u;return(u=o.toValue(e.handle))!=null?u:n.value}),l=o.computed(()=>{var u;return(u=e.containerElement)!=null?u:void 0}),s=o.computed(()=>!!e.disabled),i=e.storageKey&&C.useStorage(e.storageKey,o.toValue(e.initialValue)||{x:0,y:0},C.isClient?e.storageType==="session"?sessionStorage:localStorage:void 0),r=i||e.initialValue||{x:0,y:0},c=(u,d)=>{var p;(p=e.onEnd)==null||p.call(e,u,d),i&&(i.value.x=u.x,i.value.y=u.y)},f=o.reactive(C.useDraggable(n,{...e,handle:a,initialValue:r,onEnd:c,disabled:s,containerElement:l}));return()=>{if(t.default)return o.h(e.as||"div",{ref:n,style:`touch-action:none;${f.style}`},t.default(f))}}}),Ge=o.defineComponent({name:"UseElementBounding",props:["box","as"],setup(e,{slots:t}){const n=o.shallowRef(),a=o.reactive(C.useElementBounding(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}});function $(e,t,n={}){const{window:a=k,...l}=n;let s;const i=j(()=>a&&"MutationObserver"in a),r=()=>{s&&(s.disconnect(),s=void 0)},c=o.computed(()=>{const p=o.toValue(e),U=S.toArray(p).map(V).filter(S.notNullish);return new Set(U)}),f=o.watch(()=>c.value,p=>{r(),i.value&&p.size&&(s=new MutationObserver(t),p.forEach(U=>s.observe(U,l)))},{immediate:!0,flush:"post"}),u=()=>s?.takeRecords(),d=()=>{f(),r()};return S.tryOnScopeDispose(d),{isSupported:i,stop:d,takeRecords:u}}function Y(e,t,n={}){const{window:a=k,...l}=n;let s;const i=j(()=>a&&"ResizeObserver"in a),r=()=>{s&&(s.disconnect(),s=void 0)},c=o.computed(()=>{const d=o.toValue(e);return Array.isArray(d)?d.map(p=>V(p)):[V(d)]}),f=o.watch(c,d=>{if(r(),i.value&&a){s=new ResizeObserver(t);for(const p of d)p&&s.observe(p,l)}},{immediate:!0,flush:"post"}),u=()=>{r(),f()};return S.tryOnScopeDispose(u),{isSupported:i,stop:u}}function Je(e,t={}){const{reset:n=!0,windowResize:a=!0,windowScroll:l=!0,immediate:s=!0,updateTiming:i="sync"}=t,r=o.shallowRef(0),c=o.shallowRef(0),f=o.shallowRef(0),u=o.shallowRef(0),d=o.shallowRef(0),p=o.shallowRef(0),U=o.shallowRef(0),g=o.shallowRef(0);function b(){const m=V(e);if(!m){n&&(r.value=0,c.value=0,f.value=0,u.value=0,d.value=0,p.value=0,U.value=0,g.value=0);return}const w=m.getBoundingClientRect();r.value=w.height,c.value=w.bottom,f.value=w.left,u.value=w.right,d.value=w.top,p.value=w.width,U.value=w.x,g.value=w.y}function h(){i==="sync"?b():i==="next-frame"&&requestAnimationFrame(()=>b())}return Y(e,h),o.watch(()=>V(e),m=>!m&&h()),$(e,h,{attributeFilter:["style","class"]}),l&&M("scroll",h,{capture:!0,passive:!0}),a&&M("resize",h,{passive:!0}),S.tryOnMounted(()=>{s&&h()}),{height:r,bottom:c,left:f,right:u,top:d,width:p,x:U,y:g,update:h}}const $e={mounted(e,t){const[n,a]=typeof t.value=="function"?[t.value,{}]:t.value,{height:l,bottom:s,left:i,right:r,top:c,width:f,x:u,y:d}=Je(e,a);o.watch([l,s,i,r,c,f,u,d],()=>n({height:l,bottom:s,left:i,right:r,top:c,width:f,x:u,y:d}))}};function qe(e,t,n={}){const{window:a=k,document:l=a?.document,flush:s="sync"}=n;if(!a||!l)return S.noop;let i;const r=u=>{i?.(),i=u},c=o.watchEffect(()=>{const u=V(e);if(u){const{stop:d}=$(l,p=>{p.map(g=>[...g.removedNodes]).flat().some(g=>g===u||g.contains(u))&&t(p)},{window:a,childList:!0,subtree:!0});r(d)}},{flush:s}),f=()=>{c(),r()};return S.tryOnScopeDispose(f),f}function ie(e,t={}){const{delayEnter:n=0,delayLeave:a=0,triggerOnRemoval:l=!1,window:s=k}=t,i=o.shallowRef(!1);let r;const c=f=>{const u=f?n:a;r&&(clearTimeout(r),r=void 0),u?r=setTimeout(()=>i.value=f,u):i.value=f};return s&&(M(e,"mouseenter",()=>c(!0),{passive:!0}),M(e,"mouseleave",()=>c(!1),{passive:!0}),l&&qe(o.computed(()=>V(e)),()=>c(!1))),i}const Qe={mounted(e,t){const n=t.value;if(typeof n=="function"){const a=ie(e);o.watch(a,l=>n(l))}else{const[a,l]=n,s=ie(e,l);o.watch(s,i=>a(i))}}},Ze=o.defineComponent({name:"UseElementSize",props:["width","height","box","as"],setup(e,{slots:t}){var n,a;const l=o.shallowRef(),s=o.reactive(C.useElementSize(l,{width:(n=e.width)!=null?n:0,height:(a=e.height)!=null?a:0},{box:e.box}));return()=>{if(t.default)return o.h(e.as||"div",{ref:l},t.default(s))}}});function et(e,t={width:0,height:0},n={}){const{window:a=k,box:l="content-box"}=n,s=o.computed(()=>{var d,p;return(p=(d=V(e))==null?void 0:d.namespaceURI)==null?void 0:p.includes("svg")}),i=o.shallowRef(t.width),r=o.shallowRef(t.height),{stop:c}=Y(e,([d])=>{const p=l==="border-box"?d.borderBoxSize:l==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(a&&s.value){const U=V(e);if(U){const g=U.getBoundingClientRect();i.value=g.width,r.value=g.height}}else if(p){const U=S.toArray(p);i.value=U.reduce((g,{inlineSize:b})=>g+b,0),r.value=U.reduce((g,{blockSize:b})=>g+b,0)}else i.value=d.contentRect.width,r.value=d.contentRect.height},n);S.tryOnMounted(()=>{const d=V(e);d&&(i.value="offsetWidth"in d?d.offsetWidth:t.width,r.value="offsetHeight"in d?d.offsetHeight:t.height)});const f=o.watch(()=>V(e),d=>{i.value=d?t.width:0,r.value=d?t.height:0});function u(){c(),f()}return{width:i,height:r,stop:u}}const tt={mounted(e,t){var n;const a=typeof t.value=="function"?t.value:(n=t.value)==null?void 0:n[0],l=typeof t.value=="function"?[]:t.value.slice(1),{width:s,height:i}=et(e,...l);o.watch([s,i],([r,c])=>a({width:r,height:c}))}},nt=o.defineComponent({name:"UseElementVisibility",props:["as"],setup(e,{slots:t}){const n=o.shallowRef(),a=o.reactive({isVisible:C.useElementVisibility(n)});return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}});function q(e,t,n={}){const{root:a,rootMargin:l="0px",threshold:s=0,window:i=k,immediate:r=!0}=n,c=j(()=>i&&"IntersectionObserver"in i),f=o.computed(()=>{const g=o.toValue(e);return S.toArray(g).map(V).filter(S.notNullish)});let u=S.noop;const d=o.shallowRef(r),p=c.value?o.watch(()=>[f.value,V(a),d.value],([g,b])=>{if(u(),!d.value||!g.length)return;const h=new IntersectionObserver(t,{root:V(b),rootMargin:l,threshold:s});g.forEach(m=>m&&h.observe(m)),u=()=>{h.disconnect(),u=S.noop}},{immediate:r,flush:"post"}):S.noop,U=()=>{u(),p(),d.value=!1};return S.tryOnScopeDispose(U),{isSupported:c,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:U}}function Q(e,t={}){const{window:n=k,scrollTarget:a,threshold:l=0,rootMargin:s,once:i=!1}=t,r=o.shallowRef(!1),{stop:c}=q(e,f=>{let u=r.value,d=0;for(const p of f)p.time>=d&&(d=p.time,u=p.isIntersecting);r.value=u,i&&S.watchOnce(r,()=>{c()})},{root:a,window:n,threshold:l,rootMargin:o.toValue(s)});return r}const ot={mounted(e,t){if(typeof t.value=="function"){const n=t.value,a=Q(e);o.watch(a,l=>n(l),{immediate:!0})}else{const[n,a]=t.value,l=Q(e,a);o.watch(l,s=>n(s),{immediate:!0})}}},at=o.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(e,{slots:t}){const n=o.reactive(C.useEyeDropper());return()=>{if(t.default)return t.default(n)}}}),lt=o.defineComponent({name:"UseFullscreen",props:["as"],setup(e,{slots:t}){const n=o.shallowRef(),a=o.reactive(C.useFullscreen(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}}),st=o.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(e,{slots:t}){const n=o.reactive(C.useGeolocation(e));return()=>{if(t.default)return t.default(n)}}}),rt=o.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(e,{slots:t}){const n=o.reactive(C.useIdle(e.timeout,e));return()=>{if(t.default)return t.default(n)}}});function it(e,t,n){const{immediate:a=!0,delay:l=0,onError:s=S.noop,onSuccess:i=S.noop,resetOnExecute:r=!0,shallow:c=!0,throwError:f}=n??{},u=c?o.shallowRef(t):o.ref(t),d=o.shallowRef(!1),p=o.shallowRef(!1),U=o.shallowRef(void 0);async function g(m=0,...w){r&&(u.value=t),U.value=void 0,d.value=!1,p.value=!0,m>0&&await S.promiseTimeout(m);const O=typeof e=="function"?e(...w):e;try{const R=await O;u.value=R,d.value=!0,i(R)}catch(R){if(U.value=R,s(R),f)throw R}finally{p.value=!1}return u.value}a&&g(l);const b={state:u,isReady:d,isLoading:p,error:U,execute:g};function h(){return new Promise((m,w)=>{S.until(p).toBe(!1).then(()=>m(b)).catch(w)})}return{...b,then(m,w){return h().then(m,w)}}}async function ut(e){return new Promise((t,n)=>{const a=new Image,{src:l,srcset:s,sizes:i,class:r,loading:c,crossorigin:f,referrerPolicy:u,width:d,height:p,decoding:U,fetchPriority:g,ismap:b,usemap:h}=e;a.src=l,s!=null&&(a.srcset=s),i!=null&&(a.sizes=i),r!=null&&(a.className=r),c!=null&&(a.loading=c),f!=null&&(a.crossOrigin=f),u!=null&&(a.referrerPolicy=u),d!=null&&(a.width=d),p!=null&&(a.height=p),U!=null&&(a.decoding=U),g!=null&&(a.fetchPriority=g),b!=null&&(a.isMap=b),h!=null&&(a.useMap=h),a.onload=()=>t(a),a.onerror=n})}function ct(e,t={}){const n=it(()=>ut(o.toValue(e)),void 0,{resetOnExecute:!0,...t});return o.watch(()=>o.toValue(e),()=>n.execute(t.delay),{deep:!0}),n}const ft=o.defineComponent({name:"UseImage",props:["src","srcset","sizes","as","alt","class","loading","crossorigin","referrerPolicy","width","height","decoding","fetchPriority","ismap","usemap"],setup(e,{slots:t}){const n=o.reactive(ct(e));return()=>n.isLoading&&t.loading?t.loading(n):n.error&&t.error?t.error(n.error):t.default?t.default(n):o.h(e.as||"img",e)}});function x(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}const ue=1;function Z(e,t={}){const{throttle:n=0,idle:a=200,onStop:l=S.noop,onScroll:s=S.noop,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:r={capture:!1,passive:!0},behavior:c="auto",window:f=k,onError:u=v=>{console.error(v)}}=t,d=o.shallowRef(0),p=o.shallowRef(0),U=o.computed({get(){return d.value},set(v){b(v,void 0)}}),g=o.computed({get(){return p.value},set(v){b(void 0,v)}});function b(v,D){var L,W,B,I;if(!f)return;const _=o.toValue(e);if(!_)return;(B=_ instanceof Document?f.document.body:_)==null||B.scrollTo({top:(L=o.toValue(D))!=null?L:g.value,left:(W=o.toValue(v))!=null?W:U.value,behavior:o.toValue(c)});const E=((I=_?.document)==null?void 0:I.documentElement)||_?.documentElement||_;U!=null&&(d.value=E.scrollLeft),g!=null&&(p.value=E.scrollTop)}const h=o.shallowRef(!1),m=o.reactive({left:!0,right:!1,top:!0,bottom:!1}),w=o.reactive({left:!1,right:!1,top:!1,bottom:!1}),O=v=>{h.value&&(h.value=!1,w.left=!1,w.right=!1,w.top=!1,w.bottom=!1,l(v))},R=S.useDebounceFn(O,n+a),P=v=>{var D;if(!f)return;const L=((D=v?.document)==null?void 0:D.documentElement)||v?.documentElement||V(v),{display:W,flexDirection:B,direction:I}=getComputedStyle(L),_=I==="rtl"?-1:1,E=L.scrollLeft;w.left=E<d.value,w.right=E>d.value;const A=Math.abs(E*_)<=(i.left||0),z=Math.abs(E*_)+L.clientWidth>=L.scrollWidth-(i.right||0)-ue;W==="flex"&&B==="row-reverse"?(m.left=z,m.right=A):(m.left=A,m.right=z),d.value=E;let H=L.scrollTop;v===f.document&&!H&&(H=f.document.body.scrollTop),w.top=H<p.value,w.bottom=H>p.value;const ve=Math.abs(H)<=(i.top||0),ge=Math.abs(H)+L.clientHeight>=L.scrollHeight-(i.bottom||0)-ue;W==="flex"&&B==="column-reverse"?(m.top=ge,m.bottom=ve):(m.top=ve,m.bottom=ge),p.value=H},T=v=>{var D;if(!f)return;const L=(D=v.target.documentElement)!=null?D:v.target;P(L),h.value=!0,R(v),s(v)};return M(e,"scroll",n?S.useThrottleFn(T,n,!0,!1):T,r),S.tryOnMounted(()=>{try{const v=o.toValue(e);if(!v)return;P(v)}catch(v){u(v)}}),M(e,"scrollend",O,r),{x:U,y:g,isScrolling:h,arrivedState:m,directions:w,measure(){const v=o.toValue(e);f&&v&&P(v)}}}function ce(e,t,n={}){var a;const{direction:l="bottom",interval:s=100,canLoadMore:i=()=>!0}=n,r=o.reactive(Z(e,{...n,offset:{[l]:(a=n.distance)!=null?a:0,...n.offset}})),c=o.ref(),f=o.computed(()=>!!c.value),u=o.computed(()=>x(o.toValue(e))),d=Q(u);function p(){if(r.measure(),!u.value||!d.value||!i(u.value))return;const{scrollHeight:g,clientHeight:b,scrollWidth:h,clientWidth:m}=u.value,w=l==="bottom"||l==="top"?g<=b:h<=m;(r.arrivedState[l]||w)&&(c.value||(c.value=Promise.all([t(r),new Promise(O=>setTimeout(O,s))]).finally(()=>{c.value=null,o.nextTick(()=>p())})))}const U=o.watch(()=>[r.arrivedState[l],d.value],p,{immediate:!0});return S.tryOnUnmounted(U),{isLoading:f,reset(){o.nextTick(()=>p())}}}const dt={mounted(e,t){typeof t.value=="function"?ce(e,t.value):ce(e,...t.value)}},mt={mounted(e,t){typeof t.value=="function"?q(e,t.value):q(e,...t.value)}},pt=o.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(e,{slots:t}){const n=o.reactive(C.useMouse(e));return()=>{if(t.default)return t.default(n)}}}),ht=o.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(e,{slots:t}){const n=o.shallowRef(),a=o.reactive(C.useMouseInElement(n,e));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}}),vt={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof MouseEvent?[e.movementX,e.movementY]:null};function gt(e={}){const{type:t="page",touch:n=!0,resetOnTouchEnds:a=!1,initialValue:l={x:0,y:0},window:s=k,target:i=s,scroll:r=!0,eventFilter:c}=e;let f=null,u=0,d=0;const p=o.shallowRef(l.x),U=o.shallowRef(l.y),g=o.shallowRef(null),b=typeof t=="function"?t:vt[t],h=v=>{const D=b(v);f=v,D&&([p.value,U.value]=D,g.value="mouse"),s&&(u=s.scrollX,d=s.scrollY)},m=v=>{if(v.touches.length>0){const D=b(v.touches[0]);D&&([p.value,U.value]=D,g.value="touch")}},w=()=>{if(!f||!s)return;const v=b(f);f instanceof MouseEvent&&v&&(p.value=v[0]+s.scrollX-u,U.value=v[1]+s.scrollY-d)},O=()=>{p.value=l.x,U.value=l.y},R=c?v=>c(()=>h(v),{}):v=>h(v),P=c?v=>c(()=>m(v),{}):v=>m(v),T=c?()=>c(()=>w(),{}):()=>w();if(i){const v={passive:!0};M(i,["mousemove","dragover"],R,v),n&&t!=="movement"&&(M(i,["touchstart","touchmove"],P,v),a&&M(i,"touchend",O,v)),r&&t==="page"&&M(s,"scroll",T,v)}return{x:p,y:U,sourceType:g}}function yt(e,t={}){const{handleOutside:n=!0,window:a=k}=t,l=t.type||"page",{x:s,y:i,sourceType:r}=gt(t),c=o.shallowRef(e??a?.document.body),f=o.shallowRef(0),u=o.shallowRef(0),d=o.shallowRef(0),p=o.shallowRef(0),U=o.shallowRef(0),g=o.shallowRef(0),b=o.shallowRef(!0);let h=()=>{};return a&&(h=o.watch([c,s,i],()=>{const m=V(c);if(!m||!(m instanceof Element))return;const{left:w,top:O,width:R,height:P}=m.getBoundingClientRect();d.value=w+(l==="page"?a.pageXOffset:0),p.value=O+(l==="page"?a.pageYOffset:0),U.value=P,g.value=R;const T=s.value-d.value,v=i.value-p.value;b.value=R===0||P===0||T<0||v<0||T>R||v>P,(n||!b.value)&&(f.value=T,u.value=v)},{immediate:!0}),M(document,"mouseleave",()=>b.value=!0,{passive:!0})),{x:s,y:i,sourceType:r,elementX:f,elementY:u,elementPositionX:d,elementPositionY:p,elementHeight:U,elementWidth:g,isOutside:b,stop:h}}const wt={mounted(e,t){const[n,a]=typeof t.value=="function"?[t.value,{}]:t.value,l=S.reactiveOmit(o.reactive(yt(e,a)),"stop");o.watch(l,s=>n(s))}},Ut=o.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(e,{slots:t}){const n=o.shallowRef(),a=o.reactive(C.useMousePressed({...e,target:n}));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}}),St=o.defineComponent({name:"UseNetwork",setup(e,{slots:t}){const n=o.reactive(C.useNetwork());return()=>{if(t.default)return t.default(n)}}}),bt=o.defineComponent({name:"UseNow",props:["interval"],setup(e,{slots:t}){const n=o.reactive(C.useNow({...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),Ct=o.defineComponent({name:"UseObjectUrl",props:["object"],setup(e,{slots:t}){const n=S.toRef(e,"object"),a=C.useObjectUrl(n);return()=>{if(t.default&&a.value)return t.default(a)}}}),Et=o.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(e,{slots:t,emit:n}){const a=o.reactive(C.useOffsetPagination({...e,onPageChange(...l){var s;(s=e.onPageChange)==null||s.call(e,...l),n("page-change",...l)},onPageSizeChange(...l){var s;(s=e.onPageSizeChange)==null||s.call(e,...l),n("page-size-change",...l)},onPageCountChange(...l){var s;(s=e.onPageCountChange)==null||s.call(e,...l),n("page-count-change",...l)}}));return()=>{if(t.default)return t.default(a)}}}),Rt=o.defineComponent({name:"UseOnline",setup(e,{slots:t}){const n=o.reactive({isOnline:C.useOnline()});return()=>{if(t.default)return t.default(n)}}}),Ot=o.defineComponent({name:"UsePageLeave",setup(e,{slots:t}){const n=o.reactive({isLeft:C.usePageLeave()});return()=>{if(t.default)return t.default(n)}}}),Pt=o.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(e,{slots:t}){const n=o.shallowRef(null),a=o.reactive(C.usePointer({...e,target:e.target==="self"?n:k}));return()=>{if(t.default)return t.default(a,{ref:n})}}}),Vt=o.defineComponent({name:"UsePointerLock",props:["as"],setup(e,{slots:t}){const n=o.shallowRef(),a=o.reactive(C.usePointerLock(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(a))}}}),Mt=o.defineComponent({name:"UsePreferredColorScheme",setup(e,{slots:t}){const n=o.reactive({colorScheme:C.usePreferredColorScheme()});return()=>{if(t.default)return t.default(n)}}}),Dt=o.defineComponent({name:"UsePreferredContrast",setup(e,{slots:t}){const n=o.reactive({contrast:C.usePreferredContrast()});return()=>{if(t.default)return t.default(n)}}}),Tt=o.defineComponent({name:"UsePreferredDark",setup(e,{slots:t}){const n=o.reactive({prefersDark:C.usePreferredDark()});return()=>{if(t.default)return t.default(n)}}}),Lt=o.defineComponent({name:"UsePreferredLanguages",setup(e,{slots:t}){const n=o.reactive({languages:C.usePreferredLanguages()});return()=>{if(t.default)return t.default(n)}}}),kt=o.defineComponent({name:"UsePreferredReducedMotion",setup(e,{slots:t}){const n=o.reactive({motion:C.usePreferredReducedMotion()});return()=>{if(t.default)return t.default(n)}}}),_t=o.defineComponent({name:"UsePreferredReducedTransparency",setup(e,{slots:t}){const n=o.reactive({transparency:C.usePreferredReducedTransparency()});return()=>{if(t.default)return t.default(n)}}}),At={mounted(e,t){typeof t.value=="function"?Y(e,t.value):Y(e,...t.value)}};function X(e,t,n={}){const{window:a=k,initialValue:l,observe:s=!1}=n,i=o.shallowRef(l),r=o.computed(()=>{var f;return V(t)||((f=a?.document)==null?void 0:f.documentElement)});function c(){var f;const u=o.toValue(e),d=o.toValue(r);if(d&&a&&u){const p=(f=a.getComputedStyle(d).getPropertyValue(u))==null?void 0:f.trim();i.value=p||i.value||l}}return s&&$(r,c,{attributeFilter:["style","class"],window:a}),o.watch([r,()=>o.toValue(e)],(f,u)=>{u[0]&&u[1]&&u[0].style.removeProperty(u[1]),c()},{immediate:!0}),o.watch([i,r],([f,u])=>{const d=o.toValue(e);u?.style&&d&&(f==null?u.style.removeProperty(d):u.style.setProperty(d,f))},{immediate:!0}),i}const fe="--vueuse-safe-area-top",de="--vueuse-safe-area-right",me="--vueuse-safe-area-bottom",pe="--vueuse-safe-area-left";function It(){const e=o.shallowRef(""),t=o.shallowRef(""),n=o.shallowRef(""),a=o.shallowRef("");if(S.isClient){const s=X(fe),i=X(de),r=X(me),c=X(pe);s.value="env(safe-area-inset-top, 0px)",i.value="env(safe-area-inset-right, 0px)",r.value="env(safe-area-inset-bottom, 0px)",c.value="env(safe-area-inset-left, 0px)",l(),M("resize",S.useDebounceFn(l),{passive:!0})}function l(){e.value=K(fe),t.value=K(de),n.value=K(me),a.value=K(pe)}return{top:e,right:t,bottom:n,left:a,update:l}}function K(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}const Wt=o.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(e,{slots:t}){const{top:n,right:a,bottom:l,left:s}=It();return()=>{if(t.default)return o.h("div",{style:{paddingTop:e.top?n.value:"",paddingRight:e.right?a.value:"",paddingBottom:e.bottom?l.value:"",paddingLeft:e.left?s.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},t.default())}}}),zt={mounted(e,t){if(typeof t.value=="function"){const n=t.value,a=Z(e,{onScroll(){n(a)},onStop(){n(a)}})}else{const[n,a]=t.value,l=Z(e,{...a,onScroll(s){var i;(i=a.onScroll)==null||i.call(a,s),n(l)},onStop(s){var i;(i=a.onStop)==null||i.call(a,s),n(l)}})}}};function he(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:he(n)}}function Bt(e){const t=e||window.event,n=t.target;return he(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const ee=new WeakMap;function Ht(e,t=!1){const n=o.shallowRef(t);let a=null,l="";o.watch(S.toRef(e),r=>{const c=x(o.toValue(r));if(c){const f=c;if(ee.get(f)||ee.set(f,f.style.overflow),f.style.overflow!=="hidden"&&(l=f.style.overflow),f.style.overflow==="hidden")return n.value=!0;if(n.value)return f.style.overflow="hidden"}},{immediate:!0});const s=()=>{const r=x(o.toValue(e));!r||n.value||(S.isIOS&&(a=M(r,"touchmove",c=>{Bt(c)},{passive:!1})),r.style.overflow="hidden",n.value=!0)},i=()=>{const r=x(o.toValue(e));!r||!n.value||(S.isIOS&&a?.(),r.style.overflow=l,ee.delete(r),n.value=!1)};return S.tryOnScopeDispose(i),o.computed({get(){return n.value},set(r){r?s():i()}})}function Nt(){let e=!1;const t=o.shallowRef(!1);return(n,a)=>{if(t.value=a.value,e)return;e=!0;const l=Ht(n,a.value);o.watch(t,s=>l.value=s)}}const Ft=Nt(),jt=o.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages","showSecond"],setup(e,{slots:t}){const n=o.reactive(C.useTimeAgo(()=>e.time,{...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),Yt=o.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(e,{slots:t}){const n=o.reactive(C.useTimestamp({...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),xt=o.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(e,{slots:t,expose:n}){const{list:a}=o.toRefs(e),{list:l,containerProps:s,wrapperProps:i,scrollTo:r}=C.useVirtualList(a,e.options);return n({scrollTo:r}),s.style&&typeof s.style=="object"&&!Array.isArray(s.style)&&(s.style.height=e.height||"300px"),()=>o.h("div",{...s},[o.h("div",{...i.value},l.value.map(c=>o.h("div",{style:{overflow:"hidden",height:c.height}},t.default?t.default(c):"Please set content!")))])}}),Xt=o.defineComponent({name:"UseWindowFocus",setup(e,{slots:t}){const n=o.reactive({focused:C.useWindowFocus()});return()=>{if(t.default)return t.default(n)}}}),Kt=o.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(e,{slots:t}){const n=o.reactive(C.useWindowSize(e));return()=>{if(t.default)return t.default(n)}}});y.OnClickOutside=ye,y.OnLongPress=Ce,y.UseActiveElement=Ee,y.UseBattery=Re,y.UseBrowserLocation=Oe,y.UseClipboard=Pe,y.UseColorMode=He,y.UseDark=Ne,y.UseDeviceMotion=Fe,y.UseDeviceOrientation=je,y.UseDevicePixelRatio=Ye,y.UseDevicesList=xe,y.UseDocumentVisibility=Xe,y.UseDraggable=Ke,y.UseElementBounding=Ge,y.UseElementSize=Ze,y.UseElementVisibility=nt,y.UseEyeDropper=at,y.UseFullscreen=lt,y.UseGeolocation=st,y.UseIdle=rt,y.UseImage=ft,y.UseMouse=pt,y.UseMouseInElement=ht,y.UseMousePressed=Ut,y.UseNetwork=St,y.UseNow=bt,y.UseObjectUrl=Ct,y.UseOffsetPagination=Et,y.UseOnline=Rt,y.UsePageLeave=Ot,y.UsePointer=Pt,y.UsePointerLock=Vt,y.UsePreferredColorScheme=Mt,y.UsePreferredContrast=Dt,y.UsePreferredDark=Tt,y.UsePreferredLanguages=Lt,y.UsePreferredReducedMotion=kt,y.UsePreferredReducedTransparency=_t,y.UseScreenSafeArea=Wt,y.UseTimeAgo=jt,y.UseTimestamp=Yt,y.UseVirtualList=xt,y.UseWindowFocus=Xt,y.UseWindowSize=Kt,y.VOnClickOutside=oe,y.VOnLongPress=le,y.vElementBounding=$e,y.vElementHover=Qe,y.vElementSize=tt,y.vElementVisibility=ot,y.vInfiniteScroll=dt,y.vIntersectionObserver=mt,y.vMouseInElement=wt,y.vOnClickOutside=oe,y.vOnKeyStroke=Ue,y.vOnLongPress=le,y.vResizeObserver=At,y.vScroll=zt,y.vScrollLock=Ft})(this.VueUse=this.VueUse||{},VueUse,Vue,VueUse);
{
"name": "@vueuse/components",
"type": "module",
"version": "13.2.0",
"version": "13.3.0",
"description": "Renderless components for VueUse",

@@ -41,4 +41,4 @@ "author": "Jacob Clevenger<https://github.com/wheatjs>",

"dependencies": {
"@vueuse/core": "13.2.0",
"@vueuse/shared": "13.2.0"
"@vueuse/shared": "13.3.0",
"@vueuse/core": "13.3.0"
},

@@ -45,0 +45,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet