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

@vueuse/components

Package Overview
Dependencies
Maintainers
1
Versions
161
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 11.2.0 to 11.3.0

2

index.iife.min.js

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

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

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

"dependencies": {
"@vueuse/core": "11.2.0",
"@vueuse/shared": "11.2.0",
"@vueuse/core": "11.3.0",
"@vueuse/shared": "11.3.0",
"vue-demi": ">=0.14.10"
}
}

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