1import{Q as m,d as $,az as k,q as C,aA as h,M as y,aB as q,aC as F,aD as T,aE as V,aF as E,aj as _,V as j,aG as z,aH as B,f as I,Z as O}from"#entry";function N(e={}){const{inheritAttrs:t=!0}=e,u=m(),n=$({setup(o,{slots:r}){return()=>{u.value=r.default}}}),a=$({inheritAttrs:t,props:e.props,setup(o,{attrs:r,slots:f}){return()=>{var v;if(!u.value)throw new Error("[VueUse] Failed to find the definition of reusable template");const s=(v=u.value)===null||v===void 0?void 0:v.call(u,{...e.props==null?W(r):o,$slots:f});return t&&s?.length===1?s[0]:s}}});return k({define:n,reuse:a},[n,a])}function W(e){const t={};for(const u in e)t[V(u)]=e[u];return t}const D=E?window:void 0,M=E?window.navigator:void 0;function G(e){var t;const u=y(e);return(t=u?.$el)!==null&&t!==void 0?t:u}function w(...e){const t=(n,a,o,r)=>(n.addEventListener(a,o,r),()=>n.removeEventListener(a,o,r)),u=C(()=>{const n=h(y(e[0])).filter(a=>a!=null);return n.every(a=>typeof a!="string")?n:void 0});return q(()=>{var n,a;return[(n=(a=u.value)===null||a===void 0?void 0:a.map(o=>G(o)))!==null&&n!==void 0?n:[D].filter(o=>o!=null),h(y(u.value?e[1]:e[0])),h(I(u.value?e[2]:e[1])),y(u.value?e[3]:e[2])]},([n,a,o,r],f,v)=>{if(!n?.length||!a?.length||!o?.length)return;const s=B(r)?{...r}:r,c=n.flatMap(d=>a.flatMap(g=>o.map(b=>t(d,g,b,s))));v(()=>{c.forEach(d=>d())})},{flush:"post"})}function H(){const e=m(!1),t=j();return t&&_(()=>{e.value=!0},t),e}function A(e){const t=H();return C(()=>(t.value,!!e()))}function x(e,t={}){const{controls:u=!1,navigator:n=M}=t,a=A(()=>n&&"permissions"in n),o=m(),r=typeof e=="string"?{name:e}:e,f=m(),v=()=>{var c,d;f.value=(c=(d=o.value)===null||d===void 0?void 0:d.state)!==null&&c!==void 0?c:"prompt"};w(o,"change",v,{passive:!0});const s=z(async()=>{if(a.value){if(!o.value)try{o.value=await n.permissions.query(r)}catch{o.value=void 0}finally{v()}if(u)return O(o.value)}});return s(),u?{state:f,isSupported:a,query:s}:f}function Q(e={}){const{navigator:t=M,read:u=!1,source:n,copiedDuring:a=1500,legacy:o=!1}=e,r=A(()=>t&&"clipboard"in t),f=x("clipboard-read"),v=x("clipboard-write"),s=C(()=>r.value||o),c=m(""),d=m(!1),g=F(()=>d.value=!1,a,{immediate:!1});async function b(){let i=!(r.value&&S(f.value));if(!i)try{c.value=await t.clipboard.readText()}catch{i=!0}i&&(c.value=R())}s.value&&u&&w(["copy","cut"],b,{passive:!0});async function L(i=y(n)){if(s.value&&i!=null){let l=!(r.value&&S(v.value));if(!l)try{await t.clipboard.writeText(i)}catch{l=!0}l&&P(i),c.value=i,d.value=!0,g.start()}}function P(i){const l=document.createElement("textarea");l.value=i,l.style.position="absolute",l.style.opacity="0",l.setAttribute("readonly",""),document.body.appendChild(l),l.select(),document.execCommand("copy"),l.remove()}function R(){var i,l,p;return(i=(l=document)===null||l===void 0||(p=l.getSelection)===null||p===void 0||(p=p.call(l))===null||p===void 0?void 0:p.toString())!==null&&i!==void 0?i:""}function S(i){return i==="granted"||i==="prompt"}return{isSupported:s,text:T(c),copied:T(d),copy:L}}export{Q as a,N as c,w as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.