2025-03-20 10:25:32 +08:00

2 lines
15 KiB
JavaScript

import{g as ce,e as he,n as fe,i as be,r as O,u as Pe,f as Se,j as Ee,w as $,s as de,k as pe,l as W,b as M}from"./@vue.821a47ec.js";var $e=Object.defineProperty,Fe=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,q=(e,t,r)=>t in e?$e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Te=(e,t)=>{for(var r in t||(t={}))je.call(t,r)&&q(e,r,t[r]);if(J)for(var r of J(t))Ne.call(t,r)&&q(e,r,t[r]);return e},De=(e,t)=>Fe(e,Ie(t));function Dt(e,t){var r;const n=de();return pe(()=>{n.value=e()},De(Te({},t),{flush:(r=t==null?void 0:t.flush)!=null?r:"sync"})),W(n)}var H;const C=typeof window<"u",Ce=e=>typeof e<"u",ve=e=>typeof e=="function",Ae=e=>typeof e=="string",D=()=>{},Me=C&&((H=window==null?void 0:window.navigator)==null?void 0:H.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function F(e){return typeof e=="function"?e():Pe(e)}function z(e,t){function r(...n){return new Promise((a,o)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(a).catch(o)})}return r}const me=e=>e();function Re(e,t={}){let r,n,a=D;const o=s=>{clearTimeout(s),a(),a=D};return s=>{const u=F(e),f=F(t.maxWait);return r&&o(r),u<=0||f!==void 0&&f<=0?(n&&(o(n),n=null),Promise.resolve(s())):new Promise((d,v)=>{a=t.rejectOnCancel?v:d,f&&!n&&(n=setTimeout(()=>{r&&o(r),n=null,d(s())},f)),r=setTimeout(()=>{n&&o(n),n=null,d(s())},u)})}}function xe(e,t=!0,r=!0,n=!1){let a=0,o,l=!0,s=D,u;const f=()=>{o&&(clearTimeout(o),o=void 0,s(),s=D)};return v=>{const i=F(e),c=Date.now()-a,p=()=>u=v();return f(),i<=0?(a=Date.now(),p()):(c>i&&(r||!l)?(a=Date.now(),p()):t&&(u=new Promise((_,S)=>{s=n?S:_,o=setTimeout(()=>{a=Date.now(),l=!0,_(p()),f()},Math.max(0,i-c))})),!r&&!o&&(o=setTimeout(()=>l=!0,i)),l=!1,u)}}function ke(e=me){const t=O(!0);function r(){t.value=!1}function n(){t.value=!0}const a=(...o)=>{t.value&&e(...o)};return{isActive:W(t),pause:r,resume:n,eventFilter:a}}function Le(e){return e}function A(e){return Se()?(Ee(e),!0):!1}function Ve(e,t=200,r={}){return z(Re(t,r),e)}function Ct(e,t=200,r={}){const n=O(e.value),a=Ve(()=>{n.value=e.value},t,r);return $(e,()=>a()),n}function At(e,t=200,r=!1,n=!0,a=!1){return z(xe(t,r,n,a),e)}function We(e){return typeof e=="function"?M(e):O(e)}function Q(e,t=!0){ce()?he(e):t?e():fe(e)}function Mt(e,t,r={}){const{immediate:n=!0}=r,a=O(!1);let o=null;function l(){o&&(clearTimeout(o),o=null)}function s(){a.value=!1,l()}function u(...f){l(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=null,e(...f)},F(t))}return n&&(a.value=!0,C&&u()),A(s),{isPending:W(a),start:u,stop:s}}function Rt(e=!1,t={}){const{truthyValue:r=!0,falsyValue:n=!1}=t,a=be(e),o=O(e);function l(s){if(arguments.length)return o.value=s,o.value;{const u=F(r);return o.value=o.value===u?F(n):u,o.value}}return a?l:[o,l]}var B=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,Je=(e,t)=>{var r={};for(var n in e)ze.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&B)for(var n of B(e))t.indexOf(n)<0&&Qe.call(e,n)&&(r[n]=e[n]);return r};function qe(e,t,r={}){const n=r,{eventFilter:a=me}=n,o=Je(n,["eventFilter"]);return $(e,z(a,t),o)}var He=Object.defineProperty,Be=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,U=(e,t,r)=>t in e?He(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ge=(e,t)=>{for(var r in t||(t={}))_e.call(t,r)&&U(e,r,t[r]);if(R)for(var r of R(t))Oe.call(t,r)&&U(e,r,t[r]);return e},Ke=(e,t)=>Be(e,Ue(t)),Xe=(e,t)=>{var r={};for(var n in e)_e.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&R)for(var n of R(e))t.indexOf(n)<0&&Oe.call(e,n)&&(r[n]=e[n]);return r};function Ye(e,t,r={}){const n=r,{eventFilter:a}=n,o=Xe(n,["eventFilter"]),{eventFilter:l,pause:s,resume:u,isActive:f}=ke(a);return{stop:qe(e,t,Ke(Ge({},o),{eventFilter:l})),pause:s,resume:u,isActive:f}}function I(e){var t;const r=F(e);return(t=r==null?void 0:r.$el)!=null?t:r}const P=C?window:void 0,we=C?window.document:void 0;C&&window.navigator;C&&window.location;function b(...e){let t,r,n,a;if(Ae(e[0])||Array.isArray(e[0])?([r,n,a]=e,t=P):[t,r,n,a]=e,!t)return D;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const o=[],l=()=>{o.forEach(d=>d()),o.length=0},s=(d,v,i,c)=>(d.addEventListener(v,i,c),()=>d.removeEventListener(v,i,c)),u=$(()=>[I(t),F(a)],([d,v])=>{l(),d&&o.push(...r.flatMap(i=>n.map(c=>s(d,i,c,v))))},{immediate:!0,flush:"post"}),f=()=>{u(),l()};return A(f),f}let G=!1;function xt(e,t,r={}){const{window:n=P,ignore:a=[],capture:o=!0,detectIframe:l=!1}=r;if(!n)return;Me&&!G&&(G=!0,Array.from(n.document.body.children).forEach(i=>i.addEventListener("click",D)));let s=!0;const u=i=>a.some(c=>{if(typeof c=="string")return Array.from(n.document.querySelectorAll(c)).some(p=>p===i.target||i.composedPath().includes(p));{const p=I(c);return p&&(i.target===p||i.composedPath().includes(p))}}),d=[b(n,"click",i=>{const c=I(e);if(!(!c||c===i.target||i.composedPath().includes(c))){if(i.detail===0&&(s=!u(i)),!s){s=!0;return}t(i)}},{passive:!0,capture:o}),b(n,"pointerdown",i=>{const c=I(e);c&&(s=!i.composedPath().includes(c)&&!u(i))},{passive:!0}),l&&b(n,"blur",i=>{var c;const p=I(e);((c=n.document.activeElement)==null?void 0:c.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(i)})].filter(Boolean);return()=>d.forEach(i=>i())}function x(e,t=!1){const r=O(),n=()=>r.value=Boolean(e());return n(),Q(n,t),r}function Ze(e,t={}){const{window:r=P}=t,n=x(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let a;const o=O(!1),l=()=>{!a||("removeEventListener"in a?a.removeEventListener("change",s):a.removeListener(s))},s=()=>{!n.value||(l(),a=r.matchMedia(We(e).value),o.value=a.matches,"addEventListener"in a?a.addEventListener("change",s):a.addListener(s))};return pe(s),A(()=>l()),o}function et(e){return JSON.parse(JSON.stringify(e))}const L=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},V="__vueuse_ssr_handlers__";L[V]=L[V]||{};const tt=L[V];function ge(e,t){return tt[e]||t}function rt(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"}var nt=Object.defineProperty,K=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,X=(e,t,r)=>t in e?nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Y=(e,t)=>{for(var r in t||(t={}))at.call(t,r)&&X(e,r,t[r]);if(K)for(var r of K(t))ot.call(t,r)&&X(e,r,t[r]);return e};const st={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()}},Z="vueuse-storage";function it(e,t,r,n={}){var a;const{flush:o="pre",deep:l=!0,listenToStorageChanges:s=!0,writeDefaults:u=!0,mergeDefaults:f=!1,shallow:d,window:v=P,eventFilter:i,onError:c=m=>{console.error(m)}}=n,p=(d?de:O)(t);if(!r)try{r=ge("getDefaultStorage",()=>{var m;return(m=P)==null?void 0:m.localStorage})()}catch(m){c(m)}if(!r)return p;const _=F(t),S=rt(_),w=(a=n.serializer)!=null?a:st[S],{pause:g,resume:y}=Ye(p,()=>j(p.value),{flush:o,deep:l,eventFilter:i});return v&&s&&(b(v,"storage",E),b(v,Z,k)),E(),p;function j(m){try{if(m==null)r.removeItem(e);else{const h=w.write(m),N=r.getItem(e);N!==h&&(r.setItem(e,h),v&&v.dispatchEvent(new CustomEvent(Z,{detail:{key:e,oldValue:N,newValue:h,storageArea:r}})))}}catch(h){c(h)}}function T(m){const h=m?m.newValue:r.getItem(e);if(h==null)return u&&_!==null&&r.setItem(e,w.write(_)),_;if(!m&&f){const N=w.read(h);return ve(f)?f(N,_):S==="object"&&!Array.isArray(N)?Y(Y({},_),N):N}else return typeof h!="string"?h:w.read(h)}function k(m){E(m.detail)}function E(m){if(!(m&&m.storageArea!==r)){if(m&&m.key==null){p.value=_;return}if(!(m&&m.key!==e)){g();try{p.value=T(m)}catch(h){c(h)}finally{m?fe(y):y()}}}}}function ye(e){return Ze("(prefers-color-scheme: dark)",e)}var lt=Object.defineProperty,ee=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,te=(e,t,r)=>t in e?lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ft=(e,t)=>{for(var r in t||(t={}))ut.call(t,r)&&te(e,r,t[r]);if(ee)for(var r of ee(t))ct.call(t,r)&&te(e,r,t[r]);return e};function dt(e={}){const{selector:t="html",attribute:r="class",initialValue:n="auto",window:a=P,storage:o,storageKey:l="vueuse-color-scheme",listenToStorageChanges:s=!0,storageRef:u,emitAuto:f}=e,d=ft({auto:"",light:"light",dark:"dark"},e.modes||{}),v=ye({window:a}),i=M(()=>v.value?"dark":"light"),c=u||(l==null?O(n):it(l,n,o,{window:a,listenToStorageChanges:s})),p=M({get(){return c.value==="auto"&&!f?i.value:c.value},set(g){c.value=g}}),_=ge("updateHTMLAttrs",(g,y,j)=>{const T=a==null?void 0:a.document.querySelector(g);if(!!T)if(y==="class"){const k=j.split(/\s/g);Object.values(d).flatMap(E=>(E||"").split(/\s/g)).filter(Boolean).forEach(E=>{k.includes(E)?T.classList.add(E):T.classList.remove(E)})}else T.setAttribute(y,j)});function S(g){var y;const j=g==="auto"?i.value:g;_(t,r,(y=d[j])!=null?y:j)}function w(g){e.onChanged?e.onChanged(g,S):S(g)}return $(p,w,{flush:"post",immediate:!0}),f&&$(i,()=>w(p.value),{flush:"post"}),Q(()=>w(p.value)),p}var pt=Object.defineProperty,vt=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,ne=(e,t,r)=>t in e?pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wt=(e,t)=>{for(var r in t||(t={}))_t.call(t,r)&&ne(e,r,t[r]);if(re)for(var r of re(t))Ot.call(t,r)&&ne(e,r,t[r]);return e},gt=(e,t)=>vt(e,mt(t));function kt(e={}){const{valueDark:t="dark",valueLight:r="",window:n=P}=e,a=dt(gt(wt({},e),{onChanged:(s,u)=>{var f;e.onChanged?(f=e.onChanged)==null||f.call(e,s==="dark"):u(s)},modes:{dark:t,light:r}})),o=ye({window:n});return M({get(){return a.value==="dark"},set(s){s===o.value?a.value="auto":a.value=s?"dark":"light"}})}function Lt({document:e=we}={}){if(!e)return O("visible");const t=O(e.visibilityState);return b(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var ae=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,bt=(e,t)=>{var r={};for(var n in e)yt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ae)for(var n of ae(e))t.indexOf(n)<0&&ht.call(e,n)&&(r[n]=e[n]);return r};function Vt(e,t,r={}){const n=r,{window:a=P}=n,o=bt(n,["window"]);let l;const s=x(()=>a&&"ResizeObserver"in a),u=()=>{l&&(l.disconnect(),l=void 0)},f=$(()=>I(e),v=>{u(),s.value&&a&&v&&(l=new ResizeObserver(t),l.observe(v,o))},{immediate:!0,flush:"post"}),d=()=>{u(),f()};return A(d),{isSupported:s,stop:d}}const oe=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];function Wt(e,t={}){const{document:r=we,autoExit:n=!1}=t,a=e||(r==null?void 0:r.querySelector("html")),o=O(!1);let l=oe[0];const s=x(()=>{if(r){for(const _ of oe)if(_[1]in r)return l=_,!0}else return!1;return!1}),[u,f,d,,v]=l;async function i(){!s.value||(r!=null&&r[d]&&await r[f](),o.value=!1)}async function c(){if(!s.value)return;await i();const _=I(a);_&&(await _[u](),o.value=!0)}async function p(){o.value?await i():await c()}return r&&b(r,v,()=>{o.value=!!(r!=null&&r[d])},!1),n&&A(i),{isSupported:s,isFullscreen:o,enter:c,exit:i,toggle:p}}var se=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,Et=(e,t)=>{var r={};for(var n in e)Pt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&se)for(var n of se(e))t.indexOf(n)<0&&St.call(e,n)&&(r[n]=e[n]);return r};function zt(e,t,r={}){const n=r,{window:a=P}=n,o=Et(n,["window"]);let l;const s=x(()=>a&&"MutationObserver"in a),u=()=>{l&&(l.disconnect(),l=void 0)},f=$(()=>I(e),v=>{u(),s.value&&a&&v&&(l=new MutationObserver(t),l.observe(v,o))},{immediate:!0}),d=()=>{u(),f()};return A(d),{isSupported:s,stop:d}}var ie;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(ie||(ie={}));var $t=Object.defineProperty,le=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,ue=(e,t,r)=>t in e?$t(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jt=(e,t)=>{for(var r in t||(t={}))Ft.call(t,r)&&ue(e,r,t[r]);if(le)for(var r of le(t))It.call(t,r)&&ue(e,r,t[r]);return e};const Nt={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};jt({linear:Le},Nt);function Qt(e,t,r,n={}){var a,o,l;const{clone:s=!1,passive:u=!1,eventName:f,deep:d=!1,defaultValue:v}=n,i=ce(),c=r||(i==null?void 0:i.emit)||((a=i==null?void 0:i.$emit)==null?void 0:a.bind(i))||((l=(o=i==null?void 0:i.proxy)==null?void 0:o.$emit)==null?void 0:l.bind(i==null?void 0:i.proxy));let p=f;t||(t="modelValue"),p=f||p||`update:${t.toString()}`;const _=w=>s?ve(s)?s(w):et(w):w,S=()=>Ce(e[t])?_(e[t]):v;if(u){const w=S(),g=O(w);return $(()=>e[t],y=>g.value=_(y)),$(g,y=>{(y!==e[t]||d)&&c(p,y)},{deep:d}),g}else return M({get(){return S()},set(w){c(p,w)}})}function Jt({window:e=P}={}){if(!e)return O(!1);const t=O(e.document.hasFocus());return b(e,"blur",()=>{t.value=!1}),b(e,"focus",()=>{t.value=!0}),t}function qt(e={}){const{window:t=P,initialWidth:r=1/0,initialHeight:n=1/0,listenOrientation:a=!0,includeScrollbar:o=!0}=e,l=O(r),s=O(n),u=()=>{t&&(o?(l.value=t.innerWidth,s.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,s.value=t.document.documentElement.clientHeight))};return u(),Q(u),b("resize",u,{passive:!0}),a&&b("orientationchange",u,{passive:!0}),{width:l,height:s}}export{Vt as a,I as b,Mt as c,At as d,zt as e,Lt as f,Jt as g,Dt as h,C as i,Qt as j,Wt as k,kt as l,Rt as m,qt as n,xt as o,Ct as r,A as t,b as u};