@vueuse/components
Advanced tools
Comparing version 10.0.0-beta.2 to 10.0.0-beta.3
@@ -1,1 +0,1 @@ | ||
var VueDemi=function(s,n,_){if(s.install)return s;if(!n)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),s;if(n.version.slice(0,4)==="2.7."){let P=function(w,b){var M,R={},k={config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),provide:function(N,T){return R[N]=T,this},directive:function(N,T){return T?(n.directive(N,T),k):n.directive(N)},mount:function(N,T){return M||(M=new n(Object.assign({propsData:b},w,{provide:Object.assign(R,w.provide)})),M.$mount(N,T),M)},unmount:function(){M&&(M.$destroy(),M=void 0)}};return k};var Ve=P;for(var u in n)s[u]=n[u];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version,s.warn=n.util.warn,s.createApp=P}else if(n.version.slice(0,2)==="2.")if(_){for(var u in _)s[u]=_[u];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var u in n)s[u]=n[u];s.isVue2=!1,s.isVue3=!0,s.install=function(){},s.Vue=n,s.Vue2=void 0,s.version=n.version,s.set=function(P,w,b){return Array.isArray(P)?(P.length=Math.max(P.length,w),P.splice(w,1,b),b):(P[w]=b,b)},s.del=function(P,w){if(Array.isArray(P)){P.splice(w,1);return}delete P[w]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");return s}(this.VueDemi=this.VueDemi||(typeof VueDemi!="undefined"?VueDemi:{}),this.Vue||(typeof Vue!="undefined"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI!="undefined"?VueCompositionAPI:void 0));(function(s,n,_,u){"use strict";const Ve=n.defineComponent({name:"OnClickOutside",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return _.onClickOutside(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}});function P(t){var e;const r=u.resolveUnref(t);return(e=r==null?void 0:r.$el)!=null?e:r}const w=u.isClient?window:void 0;function b(...t){let e,r,o,a;if(u.isString(t[0])||Array.isArray(t[0])?([r,o,a]=t,e=w):[e,r,o,a]=t,!e)return u.noop;Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]);const l=[],i=()=>{l.forEach(d=>d()),l.length=0},c=(d,g,p,m)=>(d.addEventListener(g,p,m),()=>d.removeEventListener(g,p,m)),f=n.watch(()=>[P(e),u.resolveUnref(a)],([d,g])=>{i(),!!d&&l.push(...r.flatMap(p=>o.map(m=>c(d,p,m,g))))},{immediate:!0,flush:"post"}),v=()=>{f(),i()};return u.tryOnScopeDispose(v),v}let M=!1;function R(t,e,r={}){const{window:o=w,ignore:a=[],capture:l=!0,detectIframe:i=!1}=r;if(!o)return;u.isIOS&&!M&&(M=!0,Array.from(o.document.body.children).forEach(p=>p.addEventListener("click",u.noop)));let c=!0;const f=p=>a.some(m=>{if(typeof m=="string")return Array.from(o.document.querySelectorAll(m)).some(y=>y===p.target||p.composedPath().includes(y));{const y=P(m);return y&&(p.target===y||p.composedPath().includes(y))}}),d=[b(o,"click",p=>{const m=P(t);if(!(!m||m===p.target||p.composedPath().includes(m))){if(p.detail===0&&(c=!f(p)),!c){c=!0;return}e(p)}},{passive:!0,capture:l}),b(o,"pointerdown",p=>{const m=P(t);m&&(c=!p.composedPath().includes(m)&&!f(p))},{passive:!0}),i&&b(o,"blur",p=>{var m;const y=P(t);((m=o.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(y==null?void 0:y.contains(o.document.activeElement))&&e(p)})].filter(Boolean);return()=>d.forEach(p=>p())}const k={[u.directiveHooks.mounted](t,e){const r=!e.modifiers.bubble;if(typeof e.value=="function")t.__onClickOutside_stop=R(t,e.value,{capture:r});else{const[o,a]=e.value;t.__onClickOutside_stop=R(t,o,Object.assign({capture:r},a))}},[u.directiveHooks.unmounted](t){t.__onClickOutside_stop()}},N=t=>typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0;function T(...t){let e,r,o={};t.length===3?(e=t[0],r=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],o=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:a=w,eventName:l="keydown",passive:i=!1,dedupe:c=!1}=o,f=N(e);return b(a,l,d=>{d.repeat&&u.resolveUnref(c)||f(d)&&r(d)},i)}var Re=Object.defineProperty,Y=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,X=(t,e,r)=>e in t?Re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,He=(t,e)=>{for(var r in e||(e={}))ke.call(e,r)&&X(t,r,e[r]);if(Y)for(var r of Y(e))ze.call(e,r)&&X(t,r,e[r]);return t};const Be={[u.directiveHooks.mounted](t,e){var r,o;const a=(o=(r=e.arg)==null?void 0:r.split(","))!=null?o:!0;if(typeof e.value=="function")T(a,e.value,{target:t});else{const[l,i]=e.value;T(a,l,He({target:t},i))}}},We=500;function B(t,e,r){var o,a;const l=n.computed(()=>P(t));let i;function c(){i&&(clearTimeout(i),i=void 0)}function f(d){var g,p,m,y;((g=r==null?void 0:r.modifiers)==null?void 0:g.self)&&d.target!==l.value||(c(),((p=r==null?void 0:r.modifiers)==null?void 0:p.prevent)&&d.preventDefault(),((m=r==null?void 0:r.modifiers)==null?void 0:m.stop)&&d.stopPropagation(),i=setTimeout(()=>e(d),(y=r==null?void 0:r.delay)!=null?y:We))}const v={capture:(o=r==null?void 0:r.modifiers)==null?void 0:o.capture,once:(a=r==null?void 0:r.modifiers)==null?void 0:a.once};b(l,"pointerdown",f,v),b(l,"pointerup",c,v),b(l,"pointerleave",c,v)}const Fe=n.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return B(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}}),q={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?B(t,e.value,{modifiers:e.modifiers}):B(t,...e.value)}},Ke=n.defineComponent({name:"UseActiveElement",setup(t,{slots:e}){const r=n.reactive({element:_.useActiveElement()});return()=>{if(e.default)return e.default(r)}}}),Ge=n.defineComponent({name:"UseBattery",setup(t,{slots:e}){const r=n.reactive(_.useBattery(t));return()=>{if(e.default)return e.default(r)}}}),Je=n.defineComponent({name:"UseBrowserLocation",setup(t,{slots:e}){const r=n.reactive(_.useBrowserLocation());return()=>{if(e.default)return e.default(r)}}}),W=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},F="__vueuse_ssr_handlers__";W[F]=W[F]||{};const Ye=W[F];function Q(t,e){return Ye[t]||e}function Xe(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}var qe=Object.defineProperty,Z=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,x=(t,e,r)=>e in t?qe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D=(t,e)=>{for(var r in e||(e={}))Qe.call(e,r)&&x(t,r,e[r]);if(Z)for(var r of Z(e))Ze.call(e,r)&&x(t,r,e[r]);return t};const xe={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},ee="vueuse-storage";function De(t,e,r,o={}){var a;const{flush:l="pre",deep:i=!0,listenToStorageChanges:c=!0,writeDefaults:f=!0,mergeDefaults:v=!1,shallow:d,window:g=w,eventFilter:p,onError:m=O=>{console.error(O)}}=o,y=(d?n.shallowRef:n.ref)(e);if(!r)try{r=Q("getDefaultStorage",()=>{var O;return(O=w)==null?void 0:O.localStorage})()}catch(O){m(O)}if(!r)return y;const S=u.resolveUnref(e),C=Xe(S),A=(a=o.serializer)!=null?a:xe[C],{pause:I,resume:j}=u.pausableWatch(y,()=>U(y.value),{flush:l,deep:i,eventFilter:p});return g&&c&&(b(g,"storage",$),b(g,ee,L)),$(),y;function U(O){try{if(O==null)r.removeItem(t);else{const h=A.write(O),V=r.getItem(t);V!==h&&(r.setItem(t,h),g&&g.dispatchEvent(new CustomEvent(ee,{detail:{key:t,oldValue:V,newValue:h,storageArea:r}})))}}catch(h){m(h)}}function E(O){const h=O?O.newValue:r.getItem(t);if(h==null)return f&&S!==null&&r.setItem(t,A.write(S)),S;if(!O&&v){const V=A.read(h);return u.isFunction(v)?v(V,S):C==="object"&&!Array.isArray(V)?D(D({},S),V):V}else return typeof h!="string"?h:A.read(h)}function L(O){$(O.detail)}function $(O){if(!(O&&O.storageArea!==r)){if(O&&O.key==null){y.value=S;return}if(!(O&&O.key!==t)){I();try{y.value=E(O)}catch(h){m(h)}finally{O?n.nextTick(j):j()}}}}}function et(){const t=n.ref(!1);return n.onMounted(()=>{t.value=!0}),t}function K(t){const e=et();return n.computed(()=>(e.value,Boolean(t())))}function tt(t,e={}){const{window:r=w}=e,o=K(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let a;const l=n.ref(!1),i=()=>{!a||("removeEventListener"in a?a.removeEventListener("change",c):a.removeListener(c))},c=()=>{!o.value||(i(),a=r.matchMedia(u.resolveRef(t).value),l.value=a.matches,"addEventListener"in a?a.addEventListener("change",c):a.addListener(c))};return n.watchEffect(c),u.tryOnScopeDispose(()=>i()),l}function rt(t){return tt("(prefers-color-scheme: dark)",t)}var nt=Object.defineProperty,te=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,re=(t,e,r)=>e in t?nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,st=(t,e)=>{for(var r in e||(e={}))ot.call(e,r)&&re(t,r,e[r]);if(te)for(var r of te(e))at.call(e,r)&&re(t,r,e[r]);return t};function lt(t={}){const{selector:e="html",attribute:r="class",initialValue:o="auto",window:a=w,storage:l,storageKey:i="vueuse-color-scheme",listenToStorageChanges:c=!0,storageRef:f,emitAuto:v,disableTransition:d=!1}=t,g=st({auto:"",light:"light",dark:"dark"},t.modes||{}),p=rt({window:a}),m=n.computed(()=>p.value?"dark":"light"),y=f||(i==null?n.ref(o):De(i,o,l,{window:a,listenToStorageChanges:c})),S=n.computed({get(){return y.value==="auto"&&!v?m.value:y.value},set(j){y.value=j}}),C=Q("updateHTMLAttrs",(j,U,E)=>{const L=a==null?void 0:a.document.querySelector(j);if(!L)return;let $;if(d&&($=a.document.createElement("style"),$.type="text/css",$.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),a.document.head.appendChild($)),U==="class"){const O=E.split(/\s/g);Object.values(g).flatMap(h=>(h||"").split(/\s/g)).filter(Boolean).forEach(h=>{O.includes(h)?L.classList.add(h):L.classList.remove(h)})}else L.setAttribute(U,E);d&&(a.getComputedStyle($).opacity,document.head.removeChild($))});function A(j){var U;const E=j==="auto"?m.value:j;C(e,r,(U=g[E])!=null?U:E)}function I(j){t.onChanged?t.onChanged(j,A):A(j)}return n.watch(S,I,{flush:"post",immediate:!0}),v&&n.watch(m,()=>I(S.value),{flush:"post"}),u.tryOnMounted(()=>I(S.value)),S}const it=n.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(t,{slots:e}){const r=lt(t),o=n.reactive({mode:r});return()=>{if(e.default)return e.default(o)}}}),ct=n.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(t,{slots:e}){const r=_.useDark(t),o=n.reactive({isDark:r,toggleDark:u.useToggle(r)});return()=>{if(e.default)return e.default(o)}}}),ut=n.defineComponent({name:"UseDeviceMotion",setup(t,{slots:e}){const r=n.reactive(_.useDeviceMotion());return()=>{if(e.default)return e.default(r)}}}),ft=n.defineComponent({name:"UseDeviceOrientation",setup(t,{slots:e}){const r=n.reactive(_.useDeviceOrientation());return()=>{if(e.default)return e.default(r)}}}),dt=n.defineComponent({name:"UseDevicePixelRatio",setup(t,{slots:e}){const r=n.reactive({pixelRatio:_.useDevicePixelRatio()});return()=>{if(e.default)return e.default(r)}}}),pt=n.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(t,{slots:e}){const r=n.reactive(_.useDevicesList(t));return()=>{if(e.default)return e.default(r)}}}),vt=n.defineComponent({name:"UseDocumentVisibility",setup(t,{slots:e}){const r=n.reactive({visibility:_.useDocumentVisibility()});return()=>{if(e.default)return e.default(r)}}});var _t=Object.defineProperty,gt=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,oe=(t,e,r)=>e in t?_t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pt=(t,e)=>{for(var r in e||(e={}))yt.call(e,r)&&oe(t,r,e[r]);if(ne)for(var r of ne(e))Ot.call(e,r)&&oe(t,r,e[r]);return t},wt=(t,e)=>gt(t,mt(e));const ht=n.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle"],setup(t,{slots:e}){const r=n.ref(),o=n.computed(()=>{var f;return(f=t.handle)!=null?f:r.value}),a=t.storageKey&&_.useStorage(t.storageKey,u.resolveUnref(t.initialValue)||{x:0,y:0},_.isClient?t.storageType==="session"?sessionStorage:localStorage:void 0),l=a||t.initialValue||{x:0,y:0},i=f=>{!a||(a.value.x=f.x,a.value.y=f.y)},c=n.reactive(_.useDraggable(r,wt(Pt({},t),{handle:o,initialValue:l,onEnd:i})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r,style:`touch-action:none;${c.style}`},e.default(c))}}}),bt=n.defineComponent({name:"UseElementBounding",props:["box","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.useElementBounding(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function Ut(t,e={}){const{delayEnter:r=0,delayLeave:o=0,window:a=w}=e,l=n.ref(!1);let i;const c=f=>{const v=f?r:o;i&&(clearTimeout(i),i=void 0),v?i=setTimeout(()=>l.value=f,v):l.value=f};return a&&(b(t,"mouseenter",()=>c(!0),{passive:!0}),b(t,"mouseleave",()=>c(!1),{passive:!0})),l}const St={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=Ut(t);n.watch(r,o=>e.value(o))}}},$t=n.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.useElementSize(r,{width:t.width,height:t.height},{box:t.box}));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var ae=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,jt=(t,e)=>{var r={};for(var o in t)Ct.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&ae)for(var o of ae(t))e.indexOf(o)<0&&Et.call(t,o)&&(r[o]=t[o]);return r};function Lt(t,e,r={}){const o=r,{window:a=w}=o,l=jt(o,["window"]);let i;const c=K(()=>a&&"ResizeObserver"in a),f=()=>{i&&(i.disconnect(),i=void 0)},v=n.computed(()=>Array.isArray(t)?t.map(p=>P(p)):[P(t)]),d=n.watch(v,p=>{if(f(),c.value&&a){i=new ResizeObserver(e);for(const m of p)m&&i.observe(m,l)}},{immediate:!0,flush:"post",deep:!0}),g=()=>{f(),d()};return u.tryOnScopeDispose(g),{isSupported:c,stop:g}}function It(t,e={width:0,height:0},r={}){const{window:o=w,box:a="content-box"}=r,l=n.computed(()=>{var f,v;return(v=(f=P(t))==null?void 0:f.namespaceURI)==null?void 0:v.includes("svg")}),i=n.ref(e.width),c=n.ref(e.height);return Lt(t,([f])=>{const v=a==="border-box"?f.borderBoxSize:a==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(o&&l.value){const d=P(t);if(d){const g=o.getComputedStyle(d);i.value=parseFloat(g.width),c.value=parseFloat(g.height)}}else if(v){const d=Array.isArray(v)?v:[v];i.value=d.reduce((g,{inlineSize:p})=>g+p,0),c.value=d.reduce((g,{blockSize:p})=>g+p,0)}else i.value=f.contentRect.width,c.value=f.contentRect.height},r),n.watch(()=>P(t),f=>{i.value=f?e.width:0,c.value=f?e.height:0}),{width:i,height:c}}const At={[u.directiveHooks.mounted](t,e){var r;const o=typeof e.value=="function"?e.value:(r=e.value)==null?void 0:r[0],a=typeof e.value=="function"?[]:e.value.slice(1),{width:l,height:i}=It(t,...a);n.watch([l,i],([c,f])=>o({width:c,height:f}))}},Mt=n.defineComponent({name:"UseElementVisibility",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive({isVisible:_.useElementVisibility(r)});return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function G(t,e,r={}){const{root:o,rootMargin:a="0px",threshold:l=.1,window:i=w}=r,c=K(()=>i&&"IntersectionObserver"in i);let f=u.noop;const v=c.value?n.watch(()=>({el:P(t),root:P(o)}),({el:g,root:p})=>{if(f(),!g)return;const m=new IntersectionObserver(e,{root:p,rootMargin:a,threshold:l});m.observe(g),f=()=>{m.disconnect(),f=u.noop}},{immediate:!0,flush:"post"}):u.noop,d=()=>{f(),v()};return u.tryOnScopeDispose(d),{isSupported:c,stop:d}}function se(t,{window:e=w,scrollTarget:r}={}){const o=n.ref(!1);return G(t,([{isIntersecting:a}])=>{o.value=a},{root:r,window:e}),o}const Tt={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=se(t);n.watch(o,a=>r(a),{immediate:!0})}else{const[r,o]=e.value,a=se(t,o);n.watch(a,l=>r(l),{immediate:!0})}}},Nt=n.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(t,{slots:e}){const r=n.reactive(_.useEyeDropper());return()=>{if(e.default)return e.default(r)}}}),Vt=n.defineComponent({name:"UseFullscreen",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.useFullscreen(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),Rt=n.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(t,{slots:e}){const r=n.reactive(_.useGeolocation(t));return()=>{if(e.default)return e.default(r)}}}),kt=n.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(t,{slots:e}){const r=n.reactive(_.useIdle(t.timeout,t));return()=>{if(e.default)return e.default(r)}}});function zt(t,e,r){const{immediate:o=!0,delay:a=0,onError:l=u.noop,onSuccess:i=u.noop,resetOnExecute:c=!0,shallow:f=!0,throwError:v}=r??{},d=f?n.shallowRef(e):n.ref(e),g=n.ref(!1),p=n.ref(!1),m=n.shallowRef(void 0);async function y(S=0,...C){c&&(d.value=e),m.value=void 0,g.value=!1,p.value=!0,S>0&&await u.promiseTimeout(S);const A=typeof t=="function"?t(...C):t;try{const I=await A;d.value=I,g.value=!0,i(I)}catch(I){if(m.value=I,l(I),v)throw I}finally{p.value=!1}return d.value}return o&&y(a),{state:d,isReady:g,isLoading:p,error:m,execute:y}}var Ht=Object.defineProperty,le=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,Wt=Object.prototype.propertyIsEnumerable,ie=(t,e,r)=>e in t?Ht(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ft=(t,e)=>{for(var r in e||(e={}))Bt.call(e,r)&&ie(t,r,e[r]);if(le)for(var r of le(e))Wt.call(e,r)&&ie(t,r,e[r]);return t};async function Kt(t){return new Promise((e,r)=>{const o=new Image,{src:a,srcset:l,sizes:i}=t;o.src=a,l&&(o.srcset=l),i&&(o.sizes=i),o.onload=()=>e(o),o.onerror=r})}const Gt=(t,e={})=>{const r=zt(()=>Kt(u.resolveUnref(t)),void 0,Ft({resetOnExecute:!0},e));return n.watch(()=>u.resolveUnref(t),()=>r.execute(e.delay),{deep:!0}),r},Jt=n.defineComponent({name:"UseImage",props:["src","srcset","sizes","as"],setup(t,{slots:e}){const r=n.reactive(Gt(t));return()=>r.isLoading&&e.loading?e.loading(r):r.error&&e.error?e.error(r.error):e.default?e.default(r):n.h(t.as||"img",t)}}),ce=1;function J(t,e={}){const{throttle:r=0,idle:o=200,onStop:a=u.noop,onScroll:l=u.noop,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:c={capture:!1,passive:!0},behavior:f="auto"}=e,v=n.ref(0),d=n.ref(0),g=n.computed({get(){return v.value},set(U){m(U,void 0)}}),p=n.computed({get(){return d.value},set(U){m(void 0,U)}});function m(U,E){var L,$,O;const h=u.resolveUnref(t);!h||(O=h instanceof Document?document.body:h)==null||O.scrollTo({top:(L=u.resolveUnref(E))!=null?L:p.value,left:($=u.resolveUnref(U))!=null?$:g.value,behavior:u.resolveUnref(f)})}const y=n.ref(!1),S=n.reactive({left:!0,right:!1,top:!0,bottom:!1}),C=n.reactive({left:!1,right:!1,top:!1,bottom:!1}),A=U=>{!y.value||(y.value=!1,C.left=!1,C.right=!1,C.top=!1,C.bottom=!1,a(U))},I=u.useDebounceFn(A,r+o),j=U=>{const E=U.target===document?U.target.documentElement:U.target,L=E.scrollLeft;C.left=L<v.value,C.right=L>d.value,S.left=L<=0+(i.left||0),S.right=L+E.clientWidth>=E.scrollWidth-(i.right||0)-ce,v.value=L;let $=E.scrollTop;U.target===document&&!$&&($=document.body.scrollTop),C.top=$<d.value,C.bottom=$>d.value,S.top=$<=0+(i.top||0),S.bottom=$+E.clientHeight>=E.scrollHeight-(i.bottom||0)-ce,d.value=$,y.value=!0,I(U),l(U)};return b(t,"scroll",r?u.useThrottleFn(j,r,!0,!1):j,c),b(t,"scrollend",A,c),{x:g,y:p,isScrolling:y,arrivedState:S,directions:C}}var Yt=Object.defineProperty,Xt=Object.defineProperties,qt=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,Zt=Object.prototype.propertyIsEnumerable,fe=(t,e,r)=>e in t?Yt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,de=(t,e)=>{for(var r in e||(e={}))Qt.call(e,r)&&fe(t,r,e[r]);if(ue)for(var r of ue(e))Zt.call(e,r)&&fe(t,r,e[r]);return t},xt=(t,e)=>Xt(t,qt(e));function pe(t,e,r={}){var o,a;const l=(o=r.direction)!=null?o:"bottom",i=n.reactive(J(t,xt(de({},r),{offset:de({[l]:(a=r.distance)!=null?a:0},r.offset)})));n.watch(()=>i.arrivedState[l],async c=>{var f,v;if(c){const d=u.resolveUnref(t),g={height:(f=d==null?void 0:d.scrollHeight)!=null?f:0,width:(v=d==null?void 0:d.scrollWidth)!=null?v:0};await e(i),r.preserveScrollPosition&&d&&n.nextTick(()=>{d.scrollTo({top:d.scrollHeight-g.height,left:d.scrollWidth-g.width})})}})}const Dt={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?pe(t,e.value):pe(t,...e.value)}},er={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?G(t,e.value):G(t,...e.value)}},tr=n.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(t,{slots:e}){const r=n.reactive(_.useMouse(t));return()=>{if(e.default)return e.default(r)}}}),rr=n.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.useMouseInElement(r,t));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var nr=Object.defineProperty,or=Object.defineProperties,ar=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,sr=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,_e=(t,e,r)=>e in t?nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ir=(t,e)=>{for(var r in e||(e={}))sr.call(e,r)&&_e(t,r,e[r]);if(ve)for(var r of ve(e))lr.call(e,r)&&_e(t,r,e[r]);return t},cr=(t,e)=>or(t,ar(e));const ur=n.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.useMousePressed(cr(ir({},t),{target:r})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),fr=n.defineComponent({name:"UseNetwork",setup(t,{slots:e}){const r=n.reactive(_.useNetwork());return()=>{if(e.default)return e.default(r)}}});var dr=Object.defineProperty,pr=Object.defineProperties,vr=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,_r=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable,me=(t,e,r)=>e in t?dr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mr=(t,e)=>{for(var r in e||(e={}))_r.call(e,r)&&me(t,r,e[r]);if(ge)for(var r of ge(e))gr.call(e,r)&&me(t,r,e[r]);return t},yr=(t,e)=>pr(t,vr(e));const Or=n.defineComponent({name:"UseNow",props:["interval"],setup(t,{slots:e}){const r=n.reactive(_.useNow(yr(mr({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}}),Pr=n.defineComponent({name:"UseObjectUrl",props:["object"],setup(t,{slots:e}){const r=n.toRef(t,"object"),o=_.useObjectUrl(r);return()=>{if(e.default&&o.value)return e.default(o)}}});var wr=Object.defineProperty,hr=Object.defineProperties,br=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,Ur=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable,Oe=(t,e,r)=>e in t?wr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$r=(t,e)=>{for(var r in e||(e={}))Ur.call(e,r)&&Oe(t,r,e[r]);if(ye)for(var r of ye(e))Sr.call(e,r)&&Oe(t,r,e[r]);return t},Cr=(t,e)=>hr(t,br(e));const Er=n.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(t,{slots:e,emit:r}){const o=n.reactive(_.useOffsetPagination(Cr($r({},t),{onPageChange(...a){var l;(l=t.onPageChange)==null||l.call(t,...a),r("page-change",...a)},onPageSizeChange(...a){var l;(l=t.onPageSizeChange)==null||l.call(t,...a),r("page-size-change",...a)},onPageCountChange(...a){var l;(l=t.onPageCountChange)==null||l.call(t,...a),r("page-count-change",...a)}})));return()=>{if(e.default)return e.default(o)}}}),jr=n.defineComponent({name:"UseOnline",setup(t,{slots:e}){const r=n.reactive({isOnline:_.useOnline()});return()=>{if(e.default)return e.default(r)}}}),Lr=n.defineComponent({name:"UsePageLeave",setup(t,{slots:e}){const r=n.reactive({isLeft:_.usePageLeave()});return()=>{if(e.default)return e.default(r)}}});var Ir=Object.defineProperty,Ar=Object.defineProperties,Mr=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,Nr=Object.prototype.propertyIsEnumerable,we=(t,e,r)=>e in t?Ir(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Vr=(t,e)=>{for(var r in e||(e={}))Tr.call(e,r)&&we(t,r,e[r]);if(Pe)for(var r of Pe(e))Nr.call(e,r)&&we(t,r,e[r]);return t},Rr=(t,e)=>Ar(t,Mr(e));const kr=n.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(t,{slots:e}){const r=n.ref(null),o=n.reactive(_.usePointer(Rr(Vr({},t),{target:t.target==="self"?r:w})));return()=>{if(e.default)return e.default(o,{ref:r})}}}),zr=n.defineComponent({name:"UsePointerLock",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.usePointerLock(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),Hr=n.defineComponent({name:"UsePreferredColorScheme",setup(t,{slots:e}){const r=n.reactive({colorScheme:_.usePreferredColorScheme()});return()=>{if(e.default)return e.default(r)}}}),Br=n.defineComponent({name:"UsePreferredContrast",setup(t,{slots:e}){const r=n.reactive({contrast:_.usePreferredContrast()});return()=>{if(e.default)return e.default(r)}}}),Wr=n.defineComponent({name:"UsePreferredDark",setup(t,{slots:e}){const r=n.reactive({prefersDark:_.usePreferredDark()});return()=>{if(e.default)return e.default(r)}}}),Fr=n.defineComponent({name:"UsePreferredLanguages",setup(t,{slots:e}){const r=n.reactive({languages:_.usePreferredLanguages()});return()=>{if(e.default)return e.default(r)}}}),Kr=n.defineComponent({name:"UsePreferredReducedMotion",setup(t,{slots:e}){const r=n.reactive({motion:_.usePreferredReducedMotion()});return()=>{if(e.default)return e.default(r)}}});function z(t,e,r={}){const{window:o=w,initialValue:a="",observe:l=!1}=r,i=n.ref(a),c=n.computed(()=>{var v;return P(e)||((v=o==null?void 0:o.document)==null?void 0:v.documentElement)});function f(){var v;const d=u.resolveUnref(t),g=u.resolveUnref(c);if(g&&o){const p=(v=o.getComputedStyle(g).getPropertyValue(d))==null?void 0:v.trim();i.value=p||a}}return l&&_.useMutationObserver(c,f,{attributes:!0,window:o}),n.watch([c,()=>u.resolveUnref(t)],f,{immediate:!0}),n.watch(i,v=>{var d;((d=c.value)==null?void 0:d.style)&&c.value.style.setProperty(u.resolveUnref(t),v)}),i}const he="--vueuse-safe-area-top",be="--vueuse-safe-area-right",Ue="--vueuse-safe-area-bottom",Se="--vueuse-safe-area-left";function Gr(){const t=n.ref(""),e=n.ref(""),r=n.ref(""),o=n.ref("");if(u.isClient){const l=z(he),i=z(be),c=z(Ue),f=z(Se);l.value="env(safe-area-inset-top, 0px)",i.value="env(safe-area-inset-right, 0px)",c.value="env(safe-area-inset-bottom, 0px)",f.value="env(safe-area-inset-left, 0px)",a(),b("resize",u.useDebounceFn(a))}function a(){t.value=H(he),e.value=H(be),r.value=H(Ue),o.value=H(Se)}return{top:t,right:e,bottom:r,left:o,update:a}}function H(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}const Jr=n.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(t,{slots:e}){const{top:r,right:o,bottom:a,left:l}=Gr();return()=>{if(e.default)return n.h("div",{style:{paddingTop:t.top?r.value:"",paddingRight:t.right?o.value:"",paddingBottom:t.bottom?a.value:"",paddingLeft:t.left?l.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},e.default())}}});var Yr=Object.defineProperty,Xr=Object.defineProperties,qr=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,Qr=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,Ce=(t,e,r)=>e in t?Yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,xr=(t,e)=>{for(var r in e||(e={}))Qr.call(e,r)&&Ce(t,r,e[r]);if($e)for(var r of $e(e))Zr.call(e,r)&&Ce(t,r,e[r]);return t},Dr=(t,e)=>Xr(t,qr(e));const en={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=J(t,{onScroll(){r(o)},onStop(){r(o)}})}else{const[r,o]=e.value,a=J(t,Dr(xr({},o),{onScroll(l){var i;(i=o.onScroll)==null||i.call(o,l),r(a)},onStop(l){var i;(i=o.onStop)==null||i.call(o,l),r(a)}}))}}};function Ee(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientHeight<t.scrollHeight||e.overflowY==="auto"&&t.clientWidth<t.scrollWidth)return!0;{const r=t.parentNode;return!r||r.tagName==="BODY"?!1:Ee(r)}}function tn(t){const e=t||window.event,r=e.target;return Ee(r)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}function rn(t,e=!1){const r=n.ref(e);let o=null,a;n.watch(u.resolveRef(t),c=>{if(c){const f=c;a=f.style.overflow,r.value&&(f.style.overflow="hidden")}},{immediate:!0});const l=()=>{const c=u.resolveUnref(t);!c||r.value||(u.isIOS&&(o=b(c,"touchmove",f=>{tn(f)},{passive:!1})),c.style.overflow="hidden",r.value=!0)},i=()=>{const c=u.resolveUnref(t);!c||!r.value||(u.isIOS&&(o==null||o()),c.style.overflow=a,r.value=!1)};return u.tryOnScopeDispose(i),n.computed({get(){return r.value},set(c){c?l():i()}})}const nn=(()=>{let t=!1;const e=n.ref(!1);return(r,o)=>{if(e.value=o.value,t)return;t=!0;const a=rn(r,o.value);n.watch(e,l=>a.value=l)}})();var on=Object.defineProperty,an=Object.defineProperties,sn=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable,Le=(t,e,r)=>e in t?on(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,un=(t,e)=>{for(var r in e||(e={}))ln.call(e,r)&&Le(t,r,e[r]);if(je)for(var r of je(e))cn.call(e,r)&&Le(t,r,e[r]);return t},fn=(t,e)=>an(t,sn(e));const dn=n.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages","showSecond"],setup(t,{slots:e}){const r=n.reactive(_.useTimeAgo(()=>t.time,fn(un({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var pn=Object.defineProperty,vn=Object.defineProperties,_n=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable,Ae=(t,e,r)=>e in t?pn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,yn=(t,e)=>{for(var r in e||(e={}))gn.call(e,r)&&Ae(t,r,e[r]);if(Ie)for(var r of Ie(e))mn.call(e,r)&&Ae(t,r,e[r]);return t},On=(t,e)=>vn(t,_n(e));const Pn=n.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(t,{slots:e}){const r=n.reactive(_.useTimestamp(On(yn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var wn=Object.defineProperty,Me=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,Te=(t,e,r)=>e in t?wn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ne=(t,e)=>{for(var r in e||(e={}))hn.call(e,r)&&Te(t,r,e[r]);if(Me)for(var r of Me(e))bn.call(e,r)&&Te(t,r,e[r]);return t};const Un=n.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(t,{slots:e,expose:r}){const{list:o}=n.toRefs(t),{list:a,containerProps:l,wrapperProps:i,scrollTo:c}=_.useVirtualList(o,t.options);return r({scrollTo:c}),typeof l.style=="object"&&!Array.isArray(l.style)&&(l.style.height=t.height||"300px"),()=>n.h("div",Ne({},l),[n.h("div",Ne({},i.value),a.value.map(f=>n.h("div",{style:{overFlow:"hidden",height:f.height}},e.default?e.default(f):"Please set content!")))])}}),Sn=n.defineComponent({name:"UseWindowFocus",setup(t,{slots:e}){const r=n.reactive({focused:_.useWindowFocus()});return()=>{if(e.default)return e.default(r)}}}),$n=n.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(t,{slots:e}){const r=n.reactive(_.useWindowSize(t));return()=>{if(e.default)return e.default(r)}}});s.OnClickOutside=Ve,s.OnLongPress=Fe,s.UseActiveElement=Ke,s.UseBattery=Ge,s.UseBrowserLocation=Je,s.UseColorMode=it,s.UseDark=ct,s.UseDeviceMotion=ut,s.UseDeviceOrientation=ft,s.UseDevicePixelRatio=dt,s.UseDevicesList=pt,s.UseDocumentVisibility=vt,s.UseDraggable=ht,s.UseElementBounding=bt,s.UseElementSize=$t,s.UseElementVisibility=Mt,s.UseEyeDropper=Nt,s.UseFullscreen=Vt,s.UseGeolocation=Rt,s.UseIdle=kt,s.UseImage=Jt,s.UseMouse=tr,s.UseMouseInElement=rr,s.UseMousePressed=ur,s.UseNetwork=fr,s.UseNow=Or,s.UseObjectUrl=Pr,s.UseOffsetPagination=Er,s.UseOnline=jr,s.UsePageLeave=Lr,s.UsePointer=kr,s.UsePointerLock=zr,s.UsePreferredColorScheme=Hr,s.UsePreferredContrast=Br,s.UsePreferredDark=Wr,s.UsePreferredLanguages=Fr,s.UsePreferredReducedMotion=Kr,s.UseScreenSafeArea=Jr,s.UseTimeAgo=dn,s.UseTimestamp=Pn,s.UseVirtualList=Un,s.UseWindowFocus=Sn,s.UseWindowSize=$n,s.VOnClickOutside=k,s.VOnLongPress=q,s.vElementHover=St,s.vElementSize=At,s.vElementVisibility=Tt,s.vInfiniteScroll=Dt,s.vIntersectionObserver=er,s.vOnClickOutside=k,s.vOnKeyStroke=Be,s.vOnLongPress=q,s.vScroll=en,s.vScrollLock=nn})(this.VueUse=this.VueUse||{},VueDemi,VueUse,VueUse); | ||
var VueDemi=function(s,n,_){if(s.install)return s;if(!n)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),s;if(n.version.slice(0,4)==="2.7."){let P=function(w,b){var M,R={},z={config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),provide:function(N,T){return R[N]=T,this},directive:function(N,T){return T?(n.directive(N,T),z):n.directive(N)},mount:function(N,T){return M||(M=new n(Object.assign({propsData:b},w,{provide:Object.assign(R,w.provide)})),M.$mount(N,T),M)},unmount:function(){M&&(M.$destroy(),M=void 0)}};return z};var Ve=P;for(var c in n)s[c]=n[c];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version,s.warn=n.util.warn,s.createApp=P}else if(n.version.slice(0,2)==="2.")if(_){for(var c in _)s[c]=_[c];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var c in n)s[c]=n[c];s.isVue2=!1,s.isVue3=!0,s.install=function(){},s.Vue=n,s.Vue2=void 0,s.version=n.version,s.set=function(P,w,b){return Array.isArray(P)?(P.length=Math.max(P.length,w),P.splice(w,1,b),b):(P[w]=b,b)},s.del=function(P,w){if(Array.isArray(P)){P.splice(w,1);return}delete P[w]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");return s}(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(s,n,_,c){"use strict";const Ve=n.defineComponent({name:"OnClickOutside",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return _.onClickOutside(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}});function P(t){var e;const r=c.resolveUnref(t);return(e=r?.$el)!=null?e:r}const w=c.isClient?window:void 0;function b(...t){let e,r,o,a;if(c.isString(t[0])||Array.isArray(t[0])?([r,o,a]=t,e=w):[e,r,o,a]=t,!e)return c.noop;Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]);const l=[],i=()=>{l.forEach(d=>d()),l.length=0},u=(d,g,p,m)=>(d.addEventListener(g,p,m),()=>d.removeEventListener(g,p,m)),f=n.watch(()=>[P(e),c.resolveUnref(a)],([d,g])=>{i(),d&&l.push(...r.flatMap(p=>o.map(m=>u(d,p,m,g))))},{immediate:!0,flush:"post"}),v=()=>{f(),i()};return c.tryOnScopeDispose(v),v}let M=!1;function R(t,e,r={}){const{window:o=w,ignore:a=[],capture:l=!0,detectIframe:i=!1}=r;if(!o)return;c.isIOS&&!M&&(M=!0,Array.from(o.document.body.children).forEach(p=>p.addEventListener("click",c.noop)));let u=!0;const f=p=>a.some(m=>{if(typeof m=="string")return Array.from(o.document.querySelectorAll(m)).some(y=>y===p.target||p.composedPath().includes(y));{const y=P(m);return y&&(p.target===y||p.composedPath().includes(y))}}),d=[b(o,"click",p=>{const m=P(t);if(!(!m||m===p.target||p.composedPath().includes(m))){if(p.detail===0&&(u=!f(p)),!u){u=!0;return}e(p)}},{passive:!0,capture:l}),b(o,"pointerdown",p=>{const m=P(t);m&&(u=!p.composedPath().includes(m)&&!f(p))},{passive:!0}),i&&b(o,"blur",p=>{var m;const y=P(t);((m=o.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!y?.contains(o.document.activeElement)&&e(p)})].filter(Boolean);return()=>d.forEach(p=>p())}const z={[c.directiveHooks.mounted](t,e){const r=!e.modifiers.bubble;if(typeof e.value=="function")t.__onClickOutside_stop=R(t,e.value,{capture:r});else{const[o,a]=e.value;t.__onClickOutside_stop=R(t,o,Object.assign({capture:r},a))}},[c.directiveHooks.unmounted](t){t.__onClickOutside_stop()}};function N(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function T(...t){let e,r,o={};t.length===3?(e=t[0],r=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],o=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:a=w,eventName:l="keydown",passive:i=!1,dedupe:u=!1}=o,f=N(e);return b(a,l,d=>{d.repeat&&c.resolveUnref(u)||f(d)&&r(d)},i)}var Re=Object.defineProperty,Y=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,X=(t,e,r)=>e in t?Re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,He=(t,e)=>{for(var r in e||(e={}))ze.call(e,r)&&X(t,r,e[r]);if(Y)for(var r of Y(e))ke.call(e,r)&&X(t,r,e[r]);return t};const Be={[c.directiveHooks.mounted](t,e){var r,o;const a=(o=(r=e.arg)==null?void 0:r.split(","))!=null?o:!0;if(typeof e.value=="function")T(a,e.value,{target:t});else{const[l,i]=e.value;T(a,l,He({target:t},i))}}},We=500;function B(t,e,r){var o,a;const l=n.computed(()=>P(t));let i;function u(){i&&(clearTimeout(i),i=void 0)}function f(d){var g,p,m,y;(g=r?.modifiers)!=null&&g.self&&d.target!==l.value||(u(),(p=r?.modifiers)!=null&&p.prevent&&d.preventDefault(),(m=r?.modifiers)!=null&&m.stop&&d.stopPropagation(),i=setTimeout(()=>e(d),(y=r?.delay)!=null?y:We))}const v={capture:(o=r?.modifiers)==null?void 0:o.capture,once:(a=r?.modifiers)==null?void 0:a.once};b(l,"pointerdown",f,v),b(l,"pointerup",u,v),b(l,"pointerleave",u,v)}const Fe=n.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return B(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}}),q={[c.directiveHooks.mounted](t,e){typeof e.value=="function"?B(t,e.value,{modifiers:e.modifiers}):B(t,...e.value)}},Ke=n.defineComponent({name:"UseActiveElement",setup(t,{slots:e}){const r=n.reactive({element:_.useActiveElement()});return()=>{if(e.default)return e.default(r)}}}),Ge=n.defineComponent({name:"UseBattery",setup(t,{slots:e}){const r=n.reactive(_.useBattery(t));return()=>{if(e.default)return e.default(r)}}}),Je=n.defineComponent({name:"UseBrowserLocation",setup(t,{slots:e}){const r=n.reactive(_.useBrowserLocation());return()=>{if(e.default)return e.default(r)}}}),W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},F="__vueuse_ssr_handlers__";W[F]=W[F]||{};const Ye=W[F];function Q(t,e){return Ye[t]||e}function Xe(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}var qe=Object.defineProperty,Z=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,x=(t,e,r)=>e in t?qe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D=(t,e)=>{for(var r in e||(e={}))Qe.call(e,r)&&x(t,r,e[r]);if(Z)for(var r of Z(e))Ze.call(e,r)&&x(t,r,e[r]);return t};const xe={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},ee="vueuse-storage";function De(t,e,r,o={}){var a;const{flush:l="pre",deep:i=!0,listenToStorageChanges:u=!0,writeDefaults:f=!0,mergeDefaults:v=!1,shallow:d,window:g=w,eventFilter:p,onError:m=O=>{console.error(O)}}=o,y=(d?n.shallowRef:n.ref)(e);if(!r)try{r=Q("getDefaultStorage",()=>{var O;return(O=w)==null?void 0:O.localStorage})()}catch(O){m(O)}if(!r)return y;const S=c.resolveUnref(e),C=Xe(S),A=(a=o.serializer)!=null?a:xe[C],{pause:I,resume:j}=c.pausableWatch(y,()=>U(y.value),{flush:l,deep:i,eventFilter:p});return g&&u&&(b(g,"storage",$),b(g,ee,L)),$(),y;function U(O){try{if(O==null)r.removeItem(t);else{const h=A.write(O),V=r.getItem(t);V!==h&&(r.setItem(t,h),g&&g.dispatchEvent(new CustomEvent(ee,{detail:{key:t,oldValue:V,newValue:h,storageArea:r}})))}}catch(h){m(h)}}function E(O){const h=O?O.newValue:r.getItem(t);if(h==null)return f&&S!==null&&r.setItem(t,A.write(S)),S;if(!O&&v){const V=A.read(h);return c.isFunction(v)?v(V,S):C==="object"&&!Array.isArray(V)?D(D({},S),V):V}else return typeof h!="string"?h:A.read(h)}function L(O){$(O.detail)}function $(O){if(!(O&&O.storageArea!==r)){if(O&&O.key==null){y.value=S;return}if(!(O&&O.key!==t)){I();try{y.value=E(O)}catch(h){m(h)}finally{O?n.nextTick(j):j()}}}}}function et(){const t=n.ref(!1);return n.getCurrentInstance()&&n.onMounted(()=>{t.value=!0}),t}function K(t){const e=et();return n.computed(()=>(e.value,!!t()))}function tt(t,e={}){const{window:r=w}=e,o=K(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let a;const l=n.ref(!1),i=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",u):a.removeListener(u))},u=()=>{o.value&&(i(),a=r.matchMedia(c.resolveRef(t).value),l.value=!!a?.matches,a&&("addEventListener"in a?a.addEventListener("change",u):a.addListener(u)))};return n.watchEffect(u),c.tryOnScopeDispose(()=>i()),l}function rt(t){return tt("(prefers-color-scheme: dark)",t)}var nt=Object.defineProperty,te=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,re=(t,e,r)=>e in t?nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,st=(t,e)=>{for(var r in e||(e={}))ot.call(e,r)&&re(t,r,e[r]);if(te)for(var r of te(e))at.call(e,r)&&re(t,r,e[r]);return t};function lt(t={}){const{selector:e="html",attribute:r="class",initialValue:o="auto",window:a=w,storage:l,storageKey:i="vueuse-color-scheme",listenToStorageChanges:u=!0,storageRef:f,emitAuto:v,disableTransition:d=!1}=t,g=st({auto:"",light:"light",dark:"dark"},t.modes||{}),p=rt({window:a}),m=n.computed(()=>p.value?"dark":"light"),y=f||(i==null?n.ref(o):De(i,o,l,{window:a,listenToStorageChanges:u})),S=n.computed({get(){return y.value==="auto"&&!v?m.value:y.value},set(j){y.value=j}}),C=Q("updateHTMLAttrs",(j,U,E)=>{const L=a?.document.querySelector(j);if(!L)return;let $;if(d&&($=a.document.createElement("style"),$.type="text/css",$.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),a.document.head.appendChild($)),U==="class"){const O=E.split(/\s/g);Object.values(g).flatMap(h=>(h||"").split(/\s/g)).filter(Boolean).forEach(h=>{O.includes(h)?L.classList.add(h):L.classList.remove(h)})}else L.setAttribute(U,E);d&&(a.getComputedStyle($).opacity,document.head.removeChild($))});function A(j){var U;const E=j==="auto"?m.value:j;C(e,r,(U=g[E])!=null?U:E)}function I(j){t.onChanged?t.onChanged(j,A):A(j)}return n.watch(S,I,{flush:"post",immediate:!0}),v&&n.watch(m,()=>I(S.value),{flush:"post"}),c.tryOnMounted(()=>I(S.value)),S}const it=n.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(t,{slots:e}){const r=lt(t),o=n.reactive({mode:r});return()=>{if(e.default)return e.default(o)}}}),ut=n.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(t,{slots:e}){const r=_.useDark(t),o=n.reactive({isDark:r,toggleDark:c.useToggle(r)});return()=>{if(e.default)return e.default(o)}}}),ct=n.defineComponent({name:"UseDeviceMotion",setup(t,{slots:e}){const r=n.reactive(_.useDeviceMotion());return()=>{if(e.default)return e.default(r)}}}),ft=n.defineComponent({name:"UseDeviceOrientation",setup(t,{slots:e}){const r=n.reactive(_.useDeviceOrientation());return()=>{if(e.default)return e.default(r)}}}),dt=n.defineComponent({name:"UseDevicePixelRatio",setup(t,{slots:e}){const r=n.reactive({pixelRatio:_.useDevicePixelRatio()});return()=>{if(e.default)return e.default(r)}}}),pt=n.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(t,{slots:e}){const r=n.reactive(_.useDevicesList(t));return()=>{if(e.default)return e.default(r)}}}),vt=n.defineComponent({name:"UseDocumentVisibility",setup(t,{slots:e}){const r=n.reactive({visibility:_.useDocumentVisibility()});return()=>{if(e.default)return e.default(r)}}});var _t=Object.defineProperty,gt=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,oe=(t,e,r)=>e in t?_t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pt=(t,e)=>{for(var r in e||(e={}))yt.call(e,r)&&oe(t,r,e[r]);if(ne)for(var r of ne(e))Ot.call(e,r)&&oe(t,r,e[r]);return t},wt=(t,e)=>gt(t,mt(e));const ht=n.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle","axis"],setup(t,{slots:e}){const r=n.ref(),o=n.computed(()=>{var f;return(f=t.handle)!=null?f:r.value}),a=t.storageKey&&_.useStorage(t.storageKey,c.resolveUnref(t.initialValue)||{x:0,y:0},_.isClient?t.storageType==="session"?sessionStorage:localStorage:void 0),l=a||t.initialValue||{x:0,y:0},i=f=>{a&&(a.value.x=f.x,a.value.y=f.y)},u=n.reactive(_.useDraggable(r,wt(Pt({},t),{handle:o,initialValue:l,onEnd:i})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r,style:`touch-action:none;${u.style}`},e.default(u))}}}),bt=n.defineComponent({name:"UseElementBounding",props:["box","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.useElementBounding(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function Ut(t,e={}){const{delayEnter:r=0,delayLeave:o=0,window:a=w}=e,l=n.ref(!1);let i;const u=f=>{const v=f?r:o;i&&(clearTimeout(i),i=void 0),v?i=setTimeout(()=>l.value=f,v):l.value=f};return a&&(b(t,"mouseenter",()=>u(!0),{passive:!0}),b(t,"mouseleave",()=>u(!1),{passive:!0})),l}const St={[c.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=Ut(t);n.watch(r,o=>e.value(o))}}},$t=n.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.useElementSize(r,{width:t.width,height:t.height},{box:t.box}));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var ae=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,jt=(t,e)=>{var r={};for(var o in t)Ct.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&ae)for(var o of ae(t))e.indexOf(o)<0&&Et.call(t,o)&&(r[o]=t[o]);return r};function Lt(t,e,r={}){const o=r,{window:a=w}=o,l=jt(o,["window"]);let i;const u=K(()=>a&&"ResizeObserver"in a),f=()=>{i&&(i.disconnect(),i=void 0)},v=n.computed(()=>Array.isArray(t)?t.map(p=>P(p)):[P(t)]),d=n.watch(v,p=>{if(f(),u.value&&a){i=new ResizeObserver(e);for(const m of p)m&&i.observe(m,l)}},{immediate:!0,flush:"post",deep:!0}),g=()=>{f(),d()};return c.tryOnScopeDispose(g),{isSupported:u,stop:g}}function It(t,e={width:0,height:0},r={}){const{window:o=w,box:a="content-box"}=r,l=n.computed(()=>{var f,v;return(v=(f=P(t))==null?void 0:f.namespaceURI)==null?void 0:v.includes("svg")}),i=n.ref(e.width),u=n.ref(e.height);return Lt(t,([f])=>{const v=a==="border-box"?f.borderBoxSize:a==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(o&&l.value){const d=P(t);if(d){const g=o.getComputedStyle(d);i.value=parseFloat(g.width),u.value=parseFloat(g.height)}}else if(v){const d=Array.isArray(v)?v:[v];i.value=d.reduce((g,{inlineSize:p})=>g+p,0),u.value=d.reduce((g,{blockSize:p})=>g+p,0)}else i.value=f.contentRect.width,u.value=f.contentRect.height},r),n.watch(()=>P(t),f=>{i.value=f?e.width:0,u.value=f?e.height:0}),{width:i,height:u}}const At={[c.directiveHooks.mounted](t,e){var r;const o=typeof e.value=="function"?e.value:(r=e.value)==null?void 0:r[0],a=typeof e.value=="function"?[]:e.value.slice(1),{width:l,height:i}=It(t,...a);n.watch([l,i],([u,f])=>o({width:u,height:f}))}},Mt=n.defineComponent({name:"UseElementVisibility",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive({isVisible:_.useElementVisibility(r)});return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function G(t,e,r={}){const{root:o,rootMargin:a="0px",threshold:l=.1,window:i=w}=r,u=K(()=>i&&"IntersectionObserver"in i);let f=c.noop;const v=u.value?n.watch(()=>({el:P(t),root:P(o)}),({el:g,root:p})=>{if(f(),!g)return;const m=new IntersectionObserver(e,{root:p,rootMargin:a,threshold:l});m.observe(g),f=()=>{m.disconnect(),f=c.noop}},{immediate:!0,flush:"post"}):c.noop,d=()=>{f(),v()};return c.tryOnScopeDispose(d),{isSupported:u,stop:d}}function se(t,{window:e=w,scrollTarget:r}={}){const o=n.ref(!1);return G(t,([{isIntersecting:a}])=>{o.value=a},{root:r,window:e}),o}const Tt={[c.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=se(t);n.watch(o,a=>r(a),{immediate:!0})}else{const[r,o]=e.value,a=se(t,o);n.watch(a,l=>r(l),{immediate:!0})}}},Nt=n.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(t,{slots:e}){const r=n.reactive(_.useEyeDropper());return()=>{if(e.default)return e.default(r)}}}),Vt=n.defineComponent({name:"UseFullscreen",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.useFullscreen(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),Rt=n.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(t,{slots:e}){const r=n.reactive(_.useGeolocation(t));return()=>{if(e.default)return e.default(r)}}}),zt=n.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(t,{slots:e}){const r=n.reactive(_.useIdle(t.timeout,t));return()=>{if(e.default)return e.default(r)}}});function kt(t,e,r){const{immediate:o=!0,delay:a=0,onError:l=c.noop,onSuccess:i=c.noop,resetOnExecute:u=!0,shallow:f=!0,throwError:v}=r??{},d=f?n.shallowRef(e):n.ref(e),g=n.ref(!1),p=n.ref(!1),m=n.shallowRef(void 0);async function y(S=0,...C){u&&(d.value=e),m.value=void 0,g.value=!1,p.value=!0,S>0&&await c.promiseTimeout(S);const A=typeof t=="function"?t(...C):t;try{const I=await A;d.value=I,g.value=!0,i(I)}catch(I){if(m.value=I,l(I),v)throw I}finally{p.value=!1}return d.value}return o&&y(a),{state:d,isReady:g,isLoading:p,error:m,execute:y}}var Ht=Object.defineProperty,le=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,Wt=Object.prototype.propertyIsEnumerable,ie=(t,e,r)=>e in t?Ht(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ft=(t,e)=>{for(var r in e||(e={}))Bt.call(e,r)&&ie(t,r,e[r]);if(le)for(var r of le(e))Wt.call(e,r)&&ie(t,r,e[r]);return t};async function Kt(t){return new Promise((e,r)=>{const o=new Image,{src:a,srcset:l,sizes:i}=t;o.src=a,l&&(o.srcset=l),i&&(o.sizes=i),o.onload=()=>e(o),o.onerror=r})}function Gt(t,e={}){const r=kt(()=>Kt(c.resolveUnref(t)),void 0,Ft({resetOnExecute:!0},e));return n.watch(()=>c.resolveUnref(t),()=>r.execute(e.delay),{deep:!0}),r}const Jt=n.defineComponent({name:"UseImage",props:["src","srcset","sizes","as"],setup(t,{slots:e}){const r=n.reactive(Gt(t));return()=>r.isLoading&&e.loading?e.loading(r):r.error&&e.error?e.error(r.error):e.default?e.default(r):n.h(t.as||"img",t)}}),ue=1;function J(t,e={}){const{throttle:r=0,idle:o=200,onStop:a=c.noop,onScroll:l=c.noop,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:u={capture:!1,passive:!0},behavior:f="auto"}=e,v=n.ref(0),d=n.ref(0),g=n.computed({get(){return v.value},set(U){m(U,void 0)}}),p=n.computed({get(){return d.value},set(U){m(void 0,U)}});function m(U,E){var L,$,O;const h=c.resolveUnref(t);h&&((O=h instanceof Document?document.body:h)==null||O.scrollTo({top:(L=c.resolveUnref(E))!=null?L:p.value,left:($=c.resolveUnref(U))!=null?$:g.value,behavior:c.resolveUnref(f)}))}const y=n.ref(!1),S=n.reactive({left:!0,right:!1,top:!0,bottom:!1}),C=n.reactive({left:!1,right:!1,top:!1,bottom:!1}),A=U=>{y.value&&(y.value=!1,C.left=!1,C.right=!1,C.top=!1,C.bottom=!1,a(U))},I=c.useDebounceFn(A,r+o),j=U=>{const E=U.target===document?U.target.documentElement:U.target,L=E.scrollLeft;C.left=L<v.value,C.right=L>d.value,S.left=L<=0+(i.left||0),S.right=L+E.clientWidth>=E.scrollWidth-(i.right||0)-ue,v.value=L;let $=E.scrollTop;U.target===document&&!$&&($=document.body.scrollTop),C.top=$<d.value,C.bottom=$>d.value,S.top=$<=0+(i.top||0),S.bottom=$+E.clientHeight>=E.scrollHeight-(i.bottom||0)-ue,d.value=$,y.value=!0,I(U),l(U)};return b(t,"scroll",r?c.useThrottleFn(j,r,!0,!1):j,u),b(t,"scrollend",A,u),{x:g,y:p,isScrolling:y,arrivedState:S,directions:C}}var Yt=Object.defineProperty,Xt=Object.defineProperties,qt=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,Zt=Object.prototype.propertyIsEnumerable,fe=(t,e,r)=>e in t?Yt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,de=(t,e)=>{for(var r in e||(e={}))Qt.call(e,r)&&fe(t,r,e[r]);if(ce)for(var r of ce(e))Zt.call(e,r)&&fe(t,r,e[r]);return t},xt=(t,e)=>Xt(t,qt(e));function pe(t,e,r={}){var o,a;const l=(o=r.direction)!=null?o:"bottom",i=n.reactive(J(t,xt(de({},r),{offset:de({[l]:(a=r.distance)!=null?a:0},r.offset)})));n.watch(()=>i.arrivedState[l],async u=>{var f,v;if(u){const d=c.resolveUnref(t),g={height:(f=d?.scrollHeight)!=null?f:0,width:(v=d?.scrollWidth)!=null?v:0};await e(i),r.preserveScrollPosition&&d&&n.nextTick(()=>{d.scrollTo({top:d.scrollHeight-g.height,left:d.scrollWidth-g.width})})}})}const Dt={[c.directiveHooks.mounted](t,e){typeof e.value=="function"?pe(t,e.value):pe(t,...e.value)}},er={[c.directiveHooks.mounted](t,e){typeof e.value=="function"?G(t,e.value):G(t,...e.value)}},tr=n.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(t,{slots:e}){const r=n.reactive(_.useMouse(t));return()=>{if(e.default)return e.default(r)}}}),rr=n.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.useMouseInElement(r,t));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var nr=Object.defineProperty,or=Object.defineProperties,ar=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,sr=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,_e=(t,e,r)=>e in t?nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ir=(t,e)=>{for(var r in e||(e={}))sr.call(e,r)&&_e(t,r,e[r]);if(ve)for(var r of ve(e))lr.call(e,r)&&_e(t,r,e[r]);return t},ur=(t,e)=>or(t,ar(e));const cr=n.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.useMousePressed(ur(ir({},t),{target:r})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),fr=n.defineComponent({name:"UseNetwork",setup(t,{slots:e}){const r=n.reactive(_.useNetwork());return()=>{if(e.default)return e.default(r)}}});var dr=Object.defineProperty,pr=Object.defineProperties,vr=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,_r=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable,me=(t,e,r)=>e in t?dr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mr=(t,e)=>{for(var r in e||(e={}))_r.call(e,r)&&me(t,r,e[r]);if(ge)for(var r of ge(e))gr.call(e,r)&&me(t,r,e[r]);return t},yr=(t,e)=>pr(t,vr(e));const Or=n.defineComponent({name:"UseNow",props:["interval"],setup(t,{slots:e}){const r=n.reactive(_.useNow(yr(mr({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}}),Pr=n.defineComponent({name:"UseObjectUrl",props:["object"],setup(t,{slots:e}){const r=n.toRef(t,"object"),o=_.useObjectUrl(r);return()=>{if(e.default&&o.value)return e.default(o)}}});var wr=Object.defineProperty,hr=Object.defineProperties,br=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,Ur=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable,Oe=(t,e,r)=>e in t?wr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$r=(t,e)=>{for(var r in e||(e={}))Ur.call(e,r)&&Oe(t,r,e[r]);if(ye)for(var r of ye(e))Sr.call(e,r)&&Oe(t,r,e[r]);return t},Cr=(t,e)=>hr(t,br(e));const Er=n.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(t,{slots:e,emit:r}){const o=n.reactive(_.useOffsetPagination(Cr($r({},t),{onPageChange(...a){var l;(l=t.onPageChange)==null||l.call(t,...a),r("page-change",...a)},onPageSizeChange(...a){var l;(l=t.onPageSizeChange)==null||l.call(t,...a),r("page-size-change",...a)},onPageCountChange(...a){var l;(l=t.onPageCountChange)==null||l.call(t,...a),r("page-count-change",...a)}})));return()=>{if(e.default)return e.default(o)}}}),jr=n.defineComponent({name:"UseOnline",setup(t,{slots:e}){const r=n.reactive({isOnline:_.useOnline()});return()=>{if(e.default)return e.default(r)}}}),Lr=n.defineComponent({name:"UsePageLeave",setup(t,{slots:e}){const r=n.reactive({isLeft:_.usePageLeave()});return()=>{if(e.default)return e.default(r)}}});var Ir=Object.defineProperty,Ar=Object.defineProperties,Mr=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,Nr=Object.prototype.propertyIsEnumerable,we=(t,e,r)=>e in t?Ir(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Vr=(t,e)=>{for(var r in e||(e={}))Tr.call(e,r)&&we(t,r,e[r]);if(Pe)for(var r of Pe(e))Nr.call(e,r)&&we(t,r,e[r]);return t},Rr=(t,e)=>Ar(t,Mr(e));const zr=n.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(t,{slots:e}){const r=n.ref(null),o=n.reactive(_.usePointer(Rr(Vr({},t),{target:t.target==="self"?r:w})));return()=>{if(e.default)return e.default(o,{ref:r})}}}),kr=n.defineComponent({name:"UsePointerLock",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(_.usePointerLock(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),Hr=n.defineComponent({name:"UsePreferredColorScheme",setup(t,{slots:e}){const r=n.reactive({colorScheme:_.usePreferredColorScheme()});return()=>{if(e.default)return e.default(r)}}}),Br=n.defineComponent({name:"UsePreferredContrast",setup(t,{slots:e}){const r=n.reactive({contrast:_.usePreferredContrast()});return()=>{if(e.default)return e.default(r)}}}),Wr=n.defineComponent({name:"UsePreferredDark",setup(t,{slots:e}){const r=n.reactive({prefersDark:_.usePreferredDark()});return()=>{if(e.default)return e.default(r)}}}),Fr=n.defineComponent({name:"UsePreferredLanguages",setup(t,{slots:e}){const r=n.reactive({languages:_.usePreferredLanguages()});return()=>{if(e.default)return e.default(r)}}}),Kr=n.defineComponent({name:"UsePreferredReducedMotion",setup(t,{slots:e}){const r=n.reactive({motion:_.usePreferredReducedMotion()});return()=>{if(e.default)return e.default(r)}}});function k(t,e,r={}){const{window:o=w,initialValue:a="",observe:l=!1}=r,i=n.ref(a),u=n.computed(()=>{var v;return P(e)||((v=o?.document)==null?void 0:v.documentElement)});function f(){var v;const d=c.resolveUnref(t),g=c.resolveUnref(u);if(g&&o){const p=(v=o.getComputedStyle(g).getPropertyValue(d))==null?void 0:v.trim();i.value=p||a}}return l&&_.useMutationObserver(u,f,{attributes:!0,window:o}),n.watch([u,()=>c.resolveUnref(t)],f,{immediate:!0}),n.watch(i,v=>{var d;(d=u.value)!=null&&d.style&&u.value.style.setProperty(c.resolveUnref(t),v)}),i}const he="--vueuse-safe-area-top",be="--vueuse-safe-area-right",Ue="--vueuse-safe-area-bottom",Se="--vueuse-safe-area-left";function Gr(){const t=n.ref(""),e=n.ref(""),r=n.ref(""),o=n.ref("");if(c.isClient){const l=k(he),i=k(be),u=k(Ue),f=k(Se);l.value="env(safe-area-inset-top, 0px)",i.value="env(safe-area-inset-right, 0px)",u.value="env(safe-area-inset-bottom, 0px)",f.value="env(safe-area-inset-left, 0px)",a(),b("resize",c.useDebounceFn(a))}function a(){t.value=H(he),e.value=H(be),r.value=H(Ue),o.value=H(Se)}return{top:t,right:e,bottom:r,left:o,update:a}}function H(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}const Jr=n.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(t,{slots:e}){const{top:r,right:o,bottom:a,left:l}=Gr();return()=>{if(e.default)return n.h("div",{style:{paddingTop:t.top?r.value:"",paddingRight:t.right?o.value:"",paddingBottom:t.bottom?a.value:"",paddingLeft:t.left?l.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},e.default())}}});var Yr=Object.defineProperty,Xr=Object.defineProperties,qr=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,Qr=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,Ce=(t,e,r)=>e in t?Yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,xr=(t,e)=>{for(var r in e||(e={}))Qr.call(e,r)&&Ce(t,r,e[r]);if($e)for(var r of $e(e))Zr.call(e,r)&&Ce(t,r,e[r]);return t},Dr=(t,e)=>Xr(t,qr(e));const en={[c.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=J(t,{onScroll(){r(o)},onStop(){r(o)}})}else{const[r,o]=e.value,a=J(t,Dr(xr({},o),{onScroll(l){var i;(i=o.onScroll)==null||i.call(o,l),r(a)},onStop(l){var i;(i=o.onStop)==null||i.call(o,l),r(a)}}))}}};function Ee(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientHeight<t.scrollHeight||e.overflowY==="auto"&&t.clientWidth<t.scrollWidth)return!0;{const r=t.parentNode;return!r||r.tagName==="BODY"?!1:Ee(r)}}function tn(t){const e=t||window.event,r=e.target;return Ee(r)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}function rn(t,e=!1){const r=n.ref(e);let o=null,a;n.watch(c.resolveRef(t),u=>{if(u){const f=u;a=f.style.overflow,r.value&&(f.style.overflow="hidden")}},{immediate:!0});const l=()=>{const u=c.resolveUnref(t);!u||r.value||(c.isIOS&&(o=b(u,"touchmove",f=>{tn(f)},{passive:!1})),u.style.overflow="hidden",r.value=!0)},i=()=>{const u=c.resolveUnref(t);!u||!r.value||(c.isIOS&&o?.(),u.style.overflow=a,r.value=!1)};return c.tryOnScopeDispose(i),n.computed({get(){return r.value},set(u){u?l():i()}})}function nn(){let t=!1;const e=n.ref(!1);return(r,o)=>{if(e.value=o.value,t)return;t=!0;const a=rn(r,o.value);n.watch(e,l=>a.value=l)}}const on=nn();var an=Object.defineProperty,sn=Object.defineProperties,ln=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable,Le=(t,e,r)=>e in t?an(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,fn=(t,e)=>{for(var r in e||(e={}))un.call(e,r)&&Le(t,r,e[r]);if(je)for(var r of je(e))cn.call(e,r)&&Le(t,r,e[r]);return t},dn=(t,e)=>sn(t,ln(e));const pn=n.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages","showSecond"],setup(t,{slots:e}){const r=n.reactive(_.useTimeAgo(()=>t.time,dn(fn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var vn=Object.defineProperty,_n=Object.defineProperties,gn=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,mn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable,Ae=(t,e,r)=>e in t?vn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,On=(t,e)=>{for(var r in e||(e={}))mn.call(e,r)&&Ae(t,r,e[r]);if(Ie)for(var r of Ie(e))yn.call(e,r)&&Ae(t,r,e[r]);return t},Pn=(t,e)=>_n(t,gn(e));const wn=n.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(t,{slots:e}){const r=n.reactive(_.useTimestamp(Pn(On({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var hn=Object.defineProperty,Me=Object.getOwnPropertySymbols,bn=Object.prototype.hasOwnProperty,Un=Object.prototype.propertyIsEnumerable,Te=(t,e,r)=>e in t?hn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ne=(t,e)=>{for(var r in e||(e={}))bn.call(e,r)&&Te(t,r,e[r]);if(Me)for(var r of Me(e))Un.call(e,r)&&Te(t,r,e[r]);return t};const Sn=n.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(t,{slots:e,expose:r}){const{list:o}=n.toRefs(t),{list:a,containerProps:l,wrapperProps:i,scrollTo:u}=_.useVirtualList(o,t.options);return r({scrollTo:u}),typeof l.style=="object"&&!Array.isArray(l.style)&&(l.style.height=t.height||"300px"),()=>n.h("div",Ne({},l),[n.h("div",Ne({},i.value),a.value.map(f=>n.h("div",{style:{overFlow:"hidden",height:f.height}},e.default?e.default(f):"Please set content!")))])}}),$n=n.defineComponent({name:"UseWindowFocus",setup(t,{slots:e}){const r=n.reactive({focused:_.useWindowFocus()});return()=>{if(e.default)return e.default(r)}}}),Cn=n.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(t,{slots:e}){const r=n.reactive(_.useWindowSize(t));return()=>{if(e.default)return e.default(r)}}});s.OnClickOutside=Ve,s.OnLongPress=Fe,s.UseActiveElement=Ke,s.UseBattery=Ge,s.UseBrowserLocation=Je,s.UseColorMode=it,s.UseDark=ut,s.UseDeviceMotion=ct,s.UseDeviceOrientation=ft,s.UseDevicePixelRatio=dt,s.UseDevicesList=pt,s.UseDocumentVisibility=vt,s.UseDraggable=ht,s.UseElementBounding=bt,s.UseElementSize=$t,s.UseElementVisibility=Mt,s.UseEyeDropper=Nt,s.UseFullscreen=Vt,s.UseGeolocation=Rt,s.UseIdle=zt,s.UseImage=Jt,s.UseMouse=tr,s.UseMouseInElement=rr,s.UseMousePressed=cr,s.UseNetwork=fr,s.UseNow=Or,s.UseObjectUrl=Pr,s.UseOffsetPagination=Er,s.UseOnline=jr,s.UsePageLeave=Lr,s.UsePointer=zr,s.UsePointerLock=kr,s.UsePreferredColorScheme=Hr,s.UsePreferredContrast=Br,s.UsePreferredDark=Wr,s.UsePreferredLanguages=Fr,s.UsePreferredReducedMotion=Kr,s.UseScreenSafeArea=Jr,s.UseTimeAgo=pn,s.UseTimestamp=wn,s.UseVirtualList=Sn,s.UseWindowFocus=$n,s.UseWindowSize=Cn,s.VOnClickOutside=z,s.VOnLongPress=q,s.vElementHover=St,s.vElementSize=At,s.vElementVisibility=Tt,s.vInfiniteScroll=Dt,s.vIntersectionObserver=er,s.vOnClickOutside=z,s.vOnKeyStroke=Be,s.vOnLongPress=q,s.vScroll=en,s.vScrollLock=on})(this.VueUse=this.VueUse||{},VueDemi,VueUse,VueUse); |
{ | ||
"name": "@vueuse/components", | ||
"version": "10.0.0-beta.2", | ||
"version": "10.0.0-beta.3", | ||
"description": "Renderless components for VueUse", | ||
@@ -36,6 +36,6 @@ "author": "Jacob Clevenger<https://github.com/wheatjs>", | ||
"dependencies": { | ||
"@vueuse/core": "10.0.0-beta.2", | ||
"@vueuse/shared": "10.0.0-beta.2", | ||
"@vueuse/core": "10.0.0-beta.3", | ||
"@vueuse/shared": "10.0.0-beta.3", | ||
"vue-demi": "*" | ||
} | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
273101
7001
+ Added@vueuse/core@10.0.0-beta.3(transitive)
+ Added@vueuse/metadata@10.0.0-beta.3(transitive)
+ Added@vueuse/shared@10.0.0-beta.3(transitive)
- Removed@vueuse/core@10.0.0-beta.2(transitive)
- Removed@vueuse/metadata@10.0.0-beta.2(transitive)
- Removed@vueuse/shared@10.0.0-beta.2(transitive)
Updated@vueuse/core@10.0.0-beta.3
Updated@vueuse/shared@10.0.0-beta.3