import{Ct as e,E as t,Mt as n,W as r,Y as i,_ as a,c as o,dt as s,g as c,h as l,m as u,tn as d,v as f,w as p}from"./vendor/json-editor-vue-eojr4v24.js";import"./ready-dadbdj5i.js";import{c as m,i as h,s as g,v as _,w as v}from"./utils-jupbrzo6.js";import"./client-nwyjxodt.js";import"./dev-auth-he0eye7r.js";import"./vendor/shiki-lqo1hg2n.js";import"./storage-options-nzog3hhp.js";import"./nuxt-link-bumooa9d.js";import{t as y}from"./_plugin-vue_export-helper-n58akrbk.js";import{t as b}from"./nicon-m1crov2l.js";import"./nbutton-gygn07c2.js";import"./state-routes-jownks2o.js";import"./telemetry-c77tnag3.js";import"./ntext-input-e8iut2en.js";import{s as x}from"#entry";import"./client-im47u3kz.js";import{t as S}from"./composables-b2ccklz4.js";import{t as C}from"./filepath-item-h3i1tz3s.js";import{t as w}from"./help-fab-oeo4c53s.js";import{t as T}from"./nnavbar-n7gfocyu.js";import"./nicon-title-kbrt9te7.js";import{t as E}from"./nsection-block-ibsk9arc.js";import{t as D}from"./nselect-tabs-fslk8qg5.js";import"./nmarkdown-ciogo2e3.js";import{t as O}from"./composable-item-m56sdpbk.js";var k={flex:`~ wrap gap2`,p2:``,pl4:``},A=t({__name:`ComposableTree`,props:{map:{},root:{},metadata:{}},setup(e){return(t,n)=>{let a=C,s=O;return r(),f(`div`,null,[(r(!0),f(o,null,i(e.map.entries(),([t,n])=>(r(),f(`div`,{key:t},[p(a,{filepath:t,op50:``,"hover:underline":``},null,8,[`filepath`]),l(`div`,k,[(r(!0),f(o,null,i(n,n=>(r(),c(s,{key:n.as,item:n,metadata:e.metadata,"is-directive":n.meta?.vueDirective===!0,filepath:t.match(/^[\w@]/)?void 0:t},null,8,[`item`,`metadata`,`is-directive`,`filepath`]))),128))])]))),128))])}}}),j=Object.assign(A,{__name:`ComposableTree`}),M={key:0,flex:`~ col gap-2 items-start`},N=t({__name:`HelpImportsDirs`,setup(e){let t=_();return(e,s)=>{let l=C;return n(t)?.dirs?(r(),f(`div`,M,[(r(!0),f(o,null,i(n(t).dirs,e=>(r(),c(l,{key:e,filepath:e,"text-primary":``},null,8,[`filepath`]))),128))])):a(``,!0)}}}),P=Object.assign(N,{__name:`HelpImportsDirs`}),F={flex:`~ gap-2 wrap`,mb6:``},I=t({__name:`HelpImportsModules`,setup(e){let t=_(),n=u(()=>[...new Set(t.value?.imports.map(e=>h(e.from)).filter(e=>!!e&&!g(e)))]);return(e,t)=>(r(),f(`div`,F,[(r(!0),f(o,null,i(n.value,e=>(r(),f(`code`,{key:e,rounded:``,"bg-primary:5":``,p:`x2 y0.5`,"text-primary":``},d(e),1))),128))]))}}),L=Object.assign(I,{__name:`HelpImportsModules`}),R={},z={class:`markdown-body`},B={class:`markdown-body`};function V(e,t){let n=P,i=L;return r(),f(`div`,z,[l(`template`,null,[l(`div`,B,[t[0]||=l(`h1`,null,`Auto imports`,-1),t[1]||=l(`p`,null,`Nuxt auto-imports helper functions, composables and Vue APIs to be used across your application without explicitly importing them. Based on the directory structure, every Nuxt application can also use auto-imports for its own components, composables and plugins. Components, composables or plugins can use these functions.`,-1),t[2]||=l(`hr`,null,null,-1),t[3]||=l(`p`,null,`According to your config, exports of files under the following folders will be registed as auto-imports entry:`,-1),p(n),t[4]||=l(`p`,null,`Meanwhile, modules could also provide auto-imports for their own components. You have auto-imports from the following modules as well:`,-1),p(i),t[5]||=l(`hr`,null,null,-1),t[6]||=l(`p`,null,[l(`a`,{href:`https://nuxt.com/docs/guide/concepts/auto-imports`,target:`_blank`,rel:`noopener`},`Learn more in the documentation`)],-1),t[7]||=l(`h2`,null,`Directives`,-1),t[8]||=l(`p`,null,`Directives placed in the directives/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.`,-1),t[9]||=l(`p`,null,[l(`a`,{href:`https://nuxt.com/docs/guide/directory-structure/directives`,target:`_blank`,rel:`noopener`},`Learn more in the documentation`)],-1)])])])}var H=y(R,[[`render`,V]]),U={key:0,relative:``,"h-full":``,"of-auto":``},W={key:0,flex:`~ gap-2 items-center lt-sm:col lt-sm:items-start`},G=t({__name:`imports`,setup(t){S({icon:`carbon-function`,title:`Imports`,order:4});let i=v(),l=e(`all`),d=e(`all`),y=e(``),C=_(),O=u(()=>C.value?.metadata),k=u(()=>C.value?.imports.filter(e=>e.as||e.name).sort((e,t)=>(e.as||e.name).localeCompare(t.as||t.name))||[]),A=u(()=>new x(k.value,{keys:[`from`,`as`,`name`]})),M=u(()=>{let e=new Map,t=new Map,n=new Map,r=y.value?A.value.search(y.value).map(e=>e.item):k.value,i=d.value;i===`composables`?r=r.filter(e=>e.meta?.vueDirective!==!0):i===`directives`&&(r=r.filter(e=>e.meta?.vueDirective===!0)),l.value===`using`&&O.value?r=r.filter(e=>(e.as||e.name)in O.value.injectionsUsageMap):l.value===`not-used`&&O.value&&(r=r.filter(e=>!((e.as||e.name)in O.value.injectionsUsageMap)));let a={user:0,lib:0,builtin:0};return r.forEach(r=>{let i=m(r.from)?g(h(r.from))?n:t:e;i.has(r.from)||i.set(r.from,[]),i.get(r.from).push(r),a[i===e?`user`:i===t?`lib`:`builtin`]++}),{user:e,lib:t,builtin:n,count:a}}),N=u(()=>d.value===`directives`?`${M.value.count.user} directives from ${M.value.user.size} modules`:`${M.value.count.user} composables from ${M.value.user.size} modules`),P=u(()=>d.value===`directives`?`${M.value.count.builtin} directives`:`${M.value.count.builtin} composables`),F=u(()=>d.value===`directives`?`${M.value.count.lib} directives from ${M.value.lib.size} packages`:`${M.value.count.lib} composables from ${M.value.lib.size} packages`);return(e,t)=>{let u=b,m=D,h=T,g=j,_=E,v=H,x=w;return r(),f(o,null,[n(i)?(r(),f(`div`,U,[p(h,{search:y.value,"onUpdate:search":t[2]||=e=>y.value=e,pb3:``},{default:s(()=>[O.value?(r(),f(`div`,W,[p(u,{icon:`carbon-filter`,op50:``}),p(m,{modelValue:l.value,"onUpdate:modelValue":t[0]||=e=>l.value=e,n:`primary sm`,options:[{label:`All`,value:`all`},{label:`Using`,value:`using`},{label:`Not used`,value:`not-used`}]},null,8,[`modelValue`]),p(m,{modelValue:d.value,"onUpdate:modelValue":t[1]||=e=>d.value=e,n:`primary sm`,options:[{label:`All`,value:`all`},{label:`Composables`,value:`composables`},{label:`Directives`,value:`directives`}]},null,8,[`modelValue`])])):a(``,!0)]),_:1},8,[`search`]),M.value.user.size?(r(),c(_,{key:0,open:M.value.count.user<=n(50),icon:d.value===`directives`?`tabler:hexagon-letter-d`:`carbon-function`,text:`User ${d.value===`directives`?`directives`:`composables`}`,description:N.value},{default:s(()=>[p(g,{map:M.value.user,root:n(i).rootDir,metadata:O.value},null,8,[`map`,`root`,`metadata`])]),_:1},8,[`open`,`icon`,`text`,`description`])):a(``,!0),M.value.builtin.size?(r(),c(_,{key:1,open:M.value.count.builtin<=n(50),icon:`simple-icons-nuxtdotjs`,text:`Built-in ${d.value===`directives`?`directives`:`composables`}`,description:P.value},{default:s(()=>[p(g,{map:M.value.builtin,root:n(i).rootDir,metadata:O.value},null,8,[`map`,`root`,`metadata`])]),_:1},8,[`open`,`text`,`description`])):a(``,!0),M.value.lib.size?(r(),c(_,{key:2,open:M.value.count.lib<=n(50),icon:`carbon-3d-mpr-toggle`,text:`${d.value===`directives`?`Directives`:`Composables`} from libraries`,description:F.value},{default:s(()=>[p(g,{map:M.value.lib,root:n(i).rootDir,metadata:O.value},null,8,[`map`,`root`,`metadata`])]),_:1},8,[`open`,`text`,`description`])):a(``,!0)])):a(``,!0),p(x,null,{default:s(()=>[p(v)]),_:1})],64)}}});export{G as default};