Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vueuse/components

Package Overview
Dependencies
Maintainers
4
Versions
162
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 10.8.0 to 10.9.0

2

index.iife.min.js

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

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

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

"dependencies": {
"@vueuse/core": "10.8.0",
"@vueuse/shared": "10.8.0",
"@vueuse/core": "10.9.0",
"@vueuse/shared": "10.9.0",
"vue-demi": ">=0.14.7"
}
}

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc