@nuxt/devtools 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +30 -4
- package/dist/chunks/plugin-metrics.mjs +2 -0
- package/dist/chunks/vite-inspect.mjs +1 -0
- package/dist/chunks/vscode.mjs +4 -2
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__inspecting/index.html +2 -2
- package/dist/client/_nuxt/Badge.cd3914e8.js +1 -0
- package/dist/client/_nuxt/CodeSnippets.vue.632ecac5.js +1 -0
- package/dist/client/_nuxt/ContentDoc.3c736737.js +1 -0
- package/dist/client/_nuxt/ContentList.5cf63827.js +1 -0
- package/dist/client/_nuxt/ContentNavigation.d3330b12.js +1 -0
- package/dist/client/_nuxt/ContentQuery.c351de6d.js +1 -0
- package/dist/client/_nuxt/ContentRenderer.84f6a8ba.js +1 -0
- package/dist/client/_nuxt/ContentRendererMarkdown.9627ed5f.js +1 -0
- package/dist/client/_nuxt/ContentSlot.e5309aa2.js +1 -0
- package/dist/client/_nuxt/DocumentDrivenEmpty.3a7246d4.js +1 -0
- package/dist/client/_nuxt/DocumentDrivenNotFound.4003c1dc.js +1 -0
- package/dist/client/_nuxt/DrawerRight.vue.87ef0065.js +1 -0
- package/dist/client/_nuxt/DurationDisplay.vue.d82ba06a.js +1 -0
- package/dist/client/_nuxt/FilepathItem.vue.c910f268.js +1 -0
- package/dist/client/_nuxt/HelpFab.vue.f1360997.js +1 -0
- package/dist/client/_nuxt/HelpImportsDirs.d2f2fbd4.js +1 -0
- package/dist/client/_nuxt/HelpImportsModules.cb999704.js +1 -0
- package/dist/client/_nuxt/HelpTip.66944fd5.js +1 -0
- package/dist/client/_nuxt/HelpTip.vue.66567591.js +1 -0
- package/dist/client/_nuxt/HelpTipPerformance.d870bc22.js +1 -0
- package/dist/client/_nuxt/LaunchPage.vue.7af6375c.js +1 -0
- package/dist/client/_nuxt/Markdown.9c3fd89e.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.556df786.js +1 -0
- package/dist/client/_nuxt/NCodeBlock.vue.0cfd6eb2.js +2 -0
- package/dist/client/_nuxt/NIconButton.vue.3972e12f.js +1 -0
- package/dist/client/_nuxt/{NIconTitle.vue.20baf9ca.js → NIconTitle.vue.c904da9d.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.04a4db38.js → NMarkdown.vue.141eb8e5.js} +1 -1
- package/dist/client/_nuxt/NPanelGrids.e798da22.js +1 -0
- package/dist/client/_nuxt/NSectionBlock.3f4396b3.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.6f8626a9.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.b4a00fa1.js +1 -0
- package/dist/client/_nuxt/NTextInput.vue.3ee9e6a6.js +1 -0
- package/dist/client/_nuxt/NpmVersionCheck.vue.ff1c08a5.js +1 -0
- package/dist/client/_nuxt/NuxtLogo.49ed4c34.js +1 -0
- package/dist/client/_nuxt/{PanelLeftRight.vue.9f476475.js → PanelLeftRight.vue.6f7c90d0.js} +1 -1
- package/dist/client/_nuxt/ProseA.723ab41b.js +1 -0
- package/dist/client/_nuxt/ProseBlockquote.31111395.js +1 -0
- package/dist/client/_nuxt/ProseCode.91764405.js +1 -0
- package/dist/client/_nuxt/ProseCodeInline.95391ff4.js +1 -0
- package/dist/client/_nuxt/ProseEm.7e9bacf8.js +1 -0
- package/dist/client/_nuxt/ProseH1.f4be965c.js +1 -0
- package/dist/client/_nuxt/ProseH2.3323da15.js +1 -0
- package/dist/client/_nuxt/ProseH3.97aadf2d.js +1 -0
- package/dist/client/_nuxt/ProseH4.77f0d76e.js +1 -0
- package/dist/client/_nuxt/ProseH5.a1e9a524.js +1 -0
- package/dist/client/_nuxt/ProseH6.badb2182.js +1 -0
- package/dist/client/_nuxt/ProseHr.1f3f8a19.js +1 -0
- package/dist/client/_nuxt/ProseImg.addee287.js +1 -0
- package/dist/client/_nuxt/ProseLi.c0a4081c.js +1 -0
- package/dist/client/_nuxt/ProseOl.f409cff0.js +1 -0
- package/dist/client/_nuxt/ProseP.90fa930a.js +1 -0
- package/dist/client/_nuxt/ProseStrong.ef82c4c4.js +1 -0
- package/dist/client/_nuxt/ProseTable.559935a7.js +1 -0
- package/dist/client/_nuxt/ProseTbody.bea00982.js +1 -0
- package/dist/client/_nuxt/ProseTd.5c53f1ad.js +1 -0
- package/dist/client/_nuxt/ProseTh.da6bf596.js +1 -0
- package/dist/client/_nuxt/ProseThead.ab101e90.js +1 -0
- package/dist/client/_nuxt/ProseTr.10b22f69.js +1 -0
- package/dist/client/_nuxt/ProseUl.92d3161d.js +1 -0
- package/dist/client/_nuxt/StateEditor.vue.a8ab5450.js +1 -0
- package/dist/client/_nuxt/__inspecting.a8b39e37.js +1 -0
- package/dist/client/_nuxt/_commonjsHelpers.87174ba5.js +1 -0
- package/dist/client/_nuxt/assets.7855a15c.js +16 -0
- package/dist/client/_nuxt/client-db.340d7fc8.js +1 -0
- package/dist/client/_nuxt/components.51a27467.js +1 -0
- package/dist/client/_nuxt/custom-_name_.397eb835.js +1 -0
- package/dist/client/_nuxt/default.5983d3fb.js +1 -0
- package/dist/client/_nuxt/editor.ec5a160f.js +1 -0
- package/dist/client/_nuxt/{entry.573eb475.js → entry.af9b874e.js} +111 -109
- package/dist/client/_nuxt/entry.c396e258.css +32 -0
- package/dist/client/_nuxt/error-404.ef05cd7d.js +1 -0
- package/dist/client/_nuxt/error-500.b994b6de.js +1 -0
- package/dist/client/_nuxt/{error-component.9b2b9ea0.js → error-component.93dcf272.js} +2 -2
- package/dist/client/_nuxt/full.3c77498c.js +1 -0
- package/dist/client/_nuxt/{fuse.esm.dd081c31.js → fuse.esm.6cb10448.js} +1 -1
- package/dist/client/_nuxt/hooks.8df155de.js +1 -0
- package/dist/client/_nuxt/imports.25b1c719.js +1 -0
- package/dist/client/_nuxt/index.38611814.js +1 -0
- package/dist/client/_nuxt/{index.ce8efa93.js → index.840dc95c.js} +6 -6
- package/dist/client/_nuxt/index.a6ef77ff.js +1 -0
- package/dist/client/_nuxt/{middleware.8446ef05.js → middleware.dacaa23f.js} +1 -1
- package/dist/client/_nuxt/modules.f91472de.js +1 -0
- package/dist/client/_nuxt/none.bb3f80b9.js +1 -0
- package/dist/client/_nuxt/overview.e0d22c39.js +1 -0
- package/dist/client/_nuxt/pages.12d35349.js +1 -0
- package/dist/client/_nuxt/payload.81558f87.js +1 -0
- package/dist/client/_nuxt/plugins.f5f45f1f.js +1 -0
- package/dist/client/_nuxt/preview.f5b42a41.js +1 -0
- package/dist/client/_nuxt/query.1a3ba2be.js +1 -0
- package/dist/client/_nuxt/runtime-configs.67372add.js +1 -0
- package/dist/client/_nuxt/server-routes.204b3d28.js +9 -0
- package/dist/client/_nuxt/settings.953b561c.js +1 -0
- package/dist/client/_nuxt/storage.857d8900.js +1 -0
- package/dist/client/_nuxt/terminals.961240f9.js +1 -0
- package/dist/client/_nuxt/unocss-runtime.c139499c.js +2 -0
- package/dist/client/_nuxt/utils.f4f8ef5c.js +1 -0
- package/dist/client/_nuxt/virtual-files.2e221c7c.js +1 -0
- package/dist/client/api/_content/cache.1682797615036.json +1 -0
- package/dist/client/index.html +2 -2
- package/dist/client/modules/assets/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/storage/index.html +2 -2
- package/dist/client/modules/terminals/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/client/settings/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/devtools.client.mjs +34 -31
- package/dist/runtime/plugins/view/Frame.vue +1 -1
- package/dist/shared/{devtools.95cf6023.mjs → devtools.23768dcf.mjs} +2 -0
- package/dist/types.d.ts +2 -0
- package/package.json +25 -21
- package/dist/client/_nuxt/Badge.18a1faa1.js +0 -1
- package/dist/client/_nuxt/CodeSnippets.vue.93d86055.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.753ffedf.js +0 -1
- package/dist/client/_nuxt/DurationDisplay.vue.2e10a9ab.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.17a1ef3b.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.d669f6a6.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.e9f99715.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.bac56013.js +0 -2
- package/dist/client/_nuxt/NIconButton.vue.dc045a77.js +0 -1
- package/dist/client/_nuxt/NPanelGrids.02a70c97.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.a11f230b.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.ee701084.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.57428898.js +0 -1
- package/dist/client/_nuxt/NTextInput.vue.321edbfc.js +0 -1
- package/dist/client/_nuxt/NTip.vue.6b28ea49.js +0 -1
- package/dist/client/_nuxt/NpmVersionCheck.vue.cf2f92dc.js +0 -1
- package/dist/client/_nuxt/NuxtLogo.9393be93.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.780bea4b.js +0 -1
- package/dist/client/_nuxt/__inspecting.dca08c99.js +0 -1
- package/dist/client/_nuxt/assets.32f43d91.js +0 -16
- package/dist/client/_nuxt/components.cf2ad6d8.js +0 -1
- package/dist/client/_nuxt/custom-_name_.02a0e7a4.js +0 -1
- package/dist/client/_nuxt/default.15ad6f94.js +0 -1
- package/dist/client/_nuxt/editor.21c0f631.js +0 -1
- package/dist/client/_nuxt/entry.7a4bae62.css +0 -32
- package/dist/client/_nuxt/error-404.362e6f4b.js +0 -1
- package/dist/client/_nuxt/error-500.333947d6.js +0 -1
- package/dist/client/_nuxt/full.11c5f922.js +0 -1
- package/dist/client/_nuxt/hooks.5ac5215b.js +0 -1
- package/dist/client/_nuxt/imports.a42ed4e0.js +0 -1
- package/dist/client/_nuxt/index.207404a1.js +0 -1
- package/dist/client/_nuxt/index.c769634a.js +0 -3
- package/dist/client/_nuxt/modules.7af01df4.js +0 -1
- package/dist/client/_nuxt/none.a6f40eb7.js +0 -1
- package/dist/client/_nuxt/overview.57469504.js +0 -1
- package/dist/client/_nuxt/pages.e7c45d03.js +0 -1
- package/dist/client/_nuxt/payload.45880f90.js +0 -1
- package/dist/client/_nuxt/plugins.c2b464a0.js +0 -1
- package/dist/client/_nuxt/runtime-configs.c3bb5842.js +0 -1
- package/dist/client/_nuxt/server-routes.39ca7aaf.js +0 -9
- package/dist/client/_nuxt/settings.63e9273e.js +0 -1
- package/dist/client/_nuxt/storage.997cf777.js +0 -1
- package/dist/client/_nuxt/terminals.c017f557.js +0 -1
- package/dist/client/_nuxt/unocss-runtime.32a65eb2.js +0 -2
- package/dist/client/_nuxt/virtual-files.554fde6c.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as C}from"./NTip.vue.6b28ea49.js";import{_ as k}from"./FilepathItem.vue.17a1ef3b.js";import{_ as P}from"./Badge.18a1faa1.js";import{_ as $}from"./DurationDisplay.vue.2e10a9ab.js";import{a as y,s as b,m as v,af as B,o as e,h as _,f as g,t as N,i as d,u as c,c as i,x as a,b as w,w as h,l as D,C as V,z as F,F as I}from"./entry.573eb475.js";import{_ as S}from"./NSectionBlock.a11f230b.js";import"./editor.21c0f631.js";import"./NIconTitle.vue.20baf9ca.js";const T={flex:"~ gap2","items-center":""},W={w8:"","text-right":"","text-sm":"",op25:""},z={key:0,"flex-auto":"","text-right":""},E=y({__name:"PluginItem",props:{plugin:null,index:null},setup(n){const s=n,u=b(),l=v(()=>B(s.plugin.src,u.value?.rootDir||"").path);return(m,p)=>{const o=k,t=P,r=$;return e(),_("div",T,[g("div",W,N(n.index),1),d(o,{filepath:s.plugin.src,subpath:!0},null,8,["filepath"]),g("div",null,[c(l).startsWith("#")?(e(),i(t,{key:0,"bg-rose-400:10":"","text-rose":"",textContent:"virtual"})):c(l).startsWith(".")?a("",!0):(e(),i(t,{key:1,"bg-gray-400:10":"","text-gray":"",textContent:"module"})),n.plugin.mode==="server"?(e(),i(t,{key:2,"bg-teal-400:10":"","text-teal-400":"",textContent:"server"})):a("",!0),n.plugin.mode==="client"?(e(),i(t,{key:3,"bg-orange-400:10":"","text-orange-400":"",textContent:"client"})):a("",!0)]),n.plugin.metric?.duration!=null?(e(),_("div",z,[d(r,{duration:n.plugin.metric?.duration,factor:10},null,8,["duration"])])):a("",!0)])}}}),L={pt4:""},K=y({__name:"plugins",setup(n){const s=b(),u=w(),l=v(()=>{const m=s.value?.plugins||[],p=u.value.getClientPluginMetrics();return m.map(o=>{const t=typeof o=="string"?{src:o}:o;return{...t,metric:p.find(r=>r.src===t.src||r.src.startsWith(t.src))}})});return(m,p)=>{const o=C,t=E,r=S;return c(s)?(e(),i(r,{key:0,icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${c(s).plugins.length}`},{default:h(()=>[d(o,{n:"green6",icon:"carbon-meter"},{default:h(()=>[D(" Plugins runs before your application at runtime, the time plugins cost will directly affect your application's initial loading time. ")]),_:1}),g("div",L,[(e(!0),_(I,null,V(c(l),(f,x)=>(e(),i(t,{key:f.src,plugin:f,index:x+1,"ml--4":"","border-base":"",py2:"",class:F(x?"border-t":"")},null,8,["plugin","index","class"]))),128))])]),_:1},8,["description"])):a("",!0)}}});export{K as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as u}from"./StateEditor.vue.780bea4b.js";import{_ as d}from"./NSectionBlock.a11f230b.js";import{a as f,b as _,s as m,m as c,u as n,o as g,h as C,i as e,w as i,x as v}from"./entry.573eb475.js";import"./NIconButton.vue.dc045a77.js";import"./NIconTitle.vue.20baf9ca.js";const x={key:0},S=f({__name:"runtime-configs",setup(b){const o=_(),r=m(),l=c(()=>o.value?.nuxt.payload),p=c(()=>{const t={...r.value?.runtimeConfig};return delete t.public,delete t.app,t});return(t,h)=>{const a=u,s=d;return n(o)?(g(),C("div",x,[e(s,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:i(()=>[e(a,{state:n(o).appConfig},null,8,["state"])]),_:1}),e(s,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:i(()=>[e(a,{state:n(l).config?.public},null,8,["state"])]),_:1}),e(s,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:i(()=>[e(a,{state:n(p),readonly:""},null,8,["state"])]),_:1})])):v("",!0)}}});export{S as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{F as ue,_ as ie}from"./fuse.esm.dd081c31.js";import{_ as X}from"./Badge.18a1faa1.js";import{a as Y,s as ce,a3 as de,m as p,B as k,o as a,h as m,f as i,c as g,w as l,l as v,t as h,u as e,z as b,aI as I,F as q,C as A,J as Z,i as s,x as $,k as pe,G as me,aJ as fe,a9 as _e,aK as ve,aL as he,ai as ye,ab as ge}from"./entry.573eb475.js";import{_ as xe}from"./NSelect.vue.ee701084.js";import{_ as be}from"./NTextInput.vue.321edbfc.js";import{_ as Ce}from"./CodeSnippets.vue.93d86055.js";import{_ as ee}from"./NPanelGrids.02a70c97.js";import{_ as ke}from"./NCodeBlock.vue.bac56013.js";import{C as Q}from"./constants.126da185.js";import{o as $e}from"./editor.21c0f631.js";import{_ as Re}from"./PanelLeftRight.vue.9f476475.js";const Te={"h-full":"","w-full":"",flex:"~ col"},je={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},qe={flex:"~ gap2"},Se={flex:"~ gap2","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ve=i("div",{"flex-auto":""},null,-1),we={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ee={"text-right":"","font-mono":""},Ne={key:1,relative:""},Ue={key:2,px4:"",py2:"",flex:"~ col gap-2",border:"b base"},Pe={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Be=i("div",null,"Response",-1),Le={key:1,"text-xs":"",op50:""},Me=i("div",{"flex-auto":""},null,-1),Oe=i("div",{op50:""}," Request finished in ",-1),De=Y({__name:"ServerRouteDetails",props:{route:{type:Object,required:!0}},setup(B){const L=B,R=ce(),u=de({contentType:"text/plain",data:"",statusCode:200,error:void 0}),T=p(()=>u.contentType.includes("application/json")?"json":u.contentType.includes("text/html")?"html":u.contentType.includes("text/css")?"css":u.contentType.includes("text/javascript")?"javascript":u.contentType.includes("text/xml")||u.contentType.includes("application/xml")?"xml":"text"),j=p(()=>T.value==="json"?JSON.stringify(u.data,null,2):u.data),E=k(0),C=k(!1),N=k(!1),M=p(()=>L.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),S=p(()=>M.value?.filter(n=>n.startsWith(":")||n.startsWith("**:"))||[]),y=k(L.route.method||"GET"),U=k({}),P=k([{key:"",value:""}]),V=k([{key:"",value:""}]),w=k([{key:"Content-Type",value:"application/json"}]),x=p(()=>V.value.filter(({key:n})=>n).length),J=p(()=>w.value.filter(({key:n})=>n).length),W=p(()=>{const n={};for(let t=0;t<P.value.length;t++){const{key:o,value:c}=P.value[t];n[o]=c}return Object.keys(n)[0]?n:null}),te=p(()=>{let n=R.value?.devServer.url||"http://localhost";n.charAt(n.length-1)==="/"&&(n=n.slice(0,-1));const t=R.value?.devServer.port||3e3;return n.includes(`:${t}`)?n:`${n}:${t}`}),O=p(()=>{let n=new URLSearchParams(Object.fromEntries(V.value.filter(({key:c})=>c).map(({key:c,value:f})=>[c,f]))).toString();n&&(n=`?${n}`);const t=(M.value?.map(c=>(c.startsWith(":")||c.startsWith("**:"))&&U.value[c]||c).join("")||"")+n;let o=R.value?.app.baseURL||"";return(o==="./"||o===".")&&(o=""),o.endsWith("/")&&(o=o.slice(0,-1)),o+t}),ne=p(()=>te.value+O.value);async function z(){N.value=!0,C.value=!0,Object.assign(u,{lang:"text",contentType:"",data:"",content:"",error:void 0});const n=Date.now();try{u.data=await $fetch(ne.value,{method:y.value.toUpperCase(),headers:Object.fromEntries(w.value.filter(({key:t,value:o})=>t&&o).map(({key:t,value:o})=>[t,o])),query:Object.fromEntries(V.value.filter(({key:t,value:o})=>t&&o).map(({key:t,value:o})=>[t,o])),body:W.value,onResponse({response:t}){u.contentType=(t.headers.get("content-type")||"").toString().toLowerCase().trim(),u.statusCode=t.status},onResponseError(t){u.error=t.response._data,u.data=t.response._data}})}catch{}C.value=!1,E.value=Date.now()-n}const K=p(()=>{const n=[],t=[],o=w.value.filter(({key:f,value:_})=>f&&_&&!(f==="Content-Type"&&_==="application/json")).map(({key:f,value:_})=>` '${f}': '${_}'`).join(`,
|
|
2
|
-
`);y.value.toUpperCase()!=="GET"&&t.push(`method: '${y.value.toUpperCase()}'`),o&&t.push(`headers: {
|
|
3
|
-
${o}
|
|
4
|
-
}`),W.value&&t.push(`body: ${JSON.stringify(W.value,null,2)}`);const c=t.length?`, {
|
|
5
|
-
${t.join(`,
|
|
6
|
-
`).split(`
|
|
7
|
-
`).map(f=>` ${f}`).join(`
|
|
8
|
-
`)}
|
|
9
|
-
}`:"";return n.push({name:"useFetch",lang:"javascript",docs:Q.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${O.value}'${c})`}),n.push({name:"$fetch",lang:"javascript",docs:Q.nuxt.$fetch,code:`await $fetch('${O.value}'${c})`}),n}),d=k(S.value.length?"params":"query"),D=p(()=>{if(d.value==="query")return V.value;if(d.value==="body")return P.value;if(d.value==="headers")return w.value}),oe=["GET","POST","PUT","PATCH","DELETE","HEAD"];return(n,t)=>{const o=pe,c=xe,f=be,_=me,se=Ce,ae=ee,re=fe,H=X,le=ke;return a(),m("div",Te,[i("div",je,[i("div",qe,[B.route.method?(a(),g(o,{key:0,class:b(("getRequestMethodClass"in n?n.getRequestMethodClass:e(I))(e(y))),"pointer-events-none":"",tabindex:"-1"},{default:l(()=>[v(h(e(y).toUpperCase()),1)]),_:1},8,["class"])):(a(),g(c,{key:1,modelValue:e(y),"onUpdate:modelValue":t[0]||(t[0]=r=>Z(y)?y.value=r:null),class:b(("getRequestMethodClass"in n?n.getRequestMethodClass:e(I))(e(y)))},{default:l(()=>[(a(),m(q,null,A(oe,r=>i("option",{key:r,class:b(("getRequestMethodClass"in n?n.getRequestMethodClass:e(I))(r))},h(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),s(f,{"model-value":e(O),disabled:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"primary xs"},null,8,["model-value"]),s(o,{n:"primary solid",onClick:z},{default:l(()=>[s(_,{icon:"carbon:send"})]),_:1})])]),i("div",Se,[e(S).length?(a(),g(o,{key:0,class:b(e(d)==="params"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[1]||(t[1]=r=>d.value="params")},{default:l(()=>[s(_,{icon:"i-carbon-text-selection"}),v(" Params ("+h(e(S).length)+") ",1)]),_:1},8,["class"])):$("",!0),s(o,{class:b(e(d)==="query"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[2]||(t[2]=r=>d.value="query")},{default:l(()=>[s(_,{icon:"i-carbon-help"}),v(" Query "+h(e(x)?`(${e(x)})`:""),1)]),_:1},8,["class"]),e(y)!=="GET"?(a(),g(o,{key:1,class:b(e(d)==="body"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[3]||(t[3]=r=>d.value="body")},{default:l(()=>[s(_,{icon:"i-carbon-document"}),v(" Body ")]),_:1},8,["class"])):$("",!0),s(o,{class:b(e(d)==="headers"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[4]||(t[4]=r=>d.value="headers")},{default:l(()=>[s(_,{icon:"i-carbon-html-reference"}),v(" Headers "+h(e(J)?`(${e(J)})`:""),1)]),_:1},8,["class"]),s(o,{class:b(e(d)==="snippet"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[5]||(t[5]=r=>d.value="snippet")},{default:l(()=>[s(_,{icon:"carbon:code"}),v(" Snippets ")]),_:1},8,["class"]),Ve,s(o,{icon:"carbon-launch",onClick:t[6]||(t[6]=r=>("openInEditor"in n?n.openInEditor:e($e))(B.route.filepath))},{default:l(()=>[v(" Open in Editor ")]),_:1})]),e(d)==="params"?(a(),m("div",we,[(a(!0),m(q,null,A(e(S),r=>(a(),m(q,{key:r},[i("div",Ee,h(r),1),s(f,{modelValue:e(U)[r],"onUpdate:modelValue":F=>e(U)[r]=F,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):$("",!0),e(d)==="snippet"?(a(),m("div",Ne,[e(K).length?(a(),g(se,{key:0,border:"b base","code-snippets":e(K)},null,8,["code-snippets"])):$("",!0)])):e(D)?(a(),m("div",Ue,[(a(!0),m(q,null,A(e(D),(r,F)=>(a(),m("div",{key:F,flex:"~ gap-2","justify-around":""},[s(f,{modelValue:r.key,"onUpdate:modelValue":G=>r.key=G,placeholder:"Key","flex-1":"","font-mono":"",n:"sm"},null,8,["modelValue","onUpdate:modelValue"]),s(f,{modelValue:r.value,"onUpdate:modelValue":G=>r.value=G,placeholder:"Value","flex-1":"","font-mono":"",n:"sm"},null,8,["modelValue","onUpdate:modelValue"]),s(o,{n:"red",onClick:G=>e(D).splice(F,1)},{default:l(()=>[s(_,{icon:"carbon:delete"})]),_:2},1032,["onClick"])]))),128)),i("div",null,[s(o,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:t[7]||(t[7]=r=>e(D).push({key:"",value:""}))},{default:l(()=>[v(" Add ")]),_:1})])])):$("",!0),e(N)?e(C)?(a(),g(re,{key:4,"z-10":"","flex-auto":"","backdrop-blur":""},{default:l(()=>[v(" Fetching... ")]),_:1})):(a(),m(q,{key:5},[i("div",Pe,[Be,e(u).error?(a(),g(H,{key:0,"bg-red-400:10":"","text-red-400":""},{default:l(()=>[v(" Error ")]),_:1})):$("",!0),s(H,{class:b({"bg-orange-400:10 text-orange-400":e(u).error,"bg-green-400:10 text-green-400":!e(u).error})},{default:l(()=>[v(h(e(u).statusCode),1)]),_:1},8,["class"]),e(u).contentType?(a(),m("code",Le,h(e(u).contentType),1)):$("",!0),Me,Oe,s(H,{"bg-green-400:10":"","text-green-400":""},{default:l(()=>[v(h(e(E))+" ms ",1)]),_:1})]),s(le,{"flex-auto":"","overflow-auto":"","py-2":"",code:e(j),lang:e(T)},null,8,["code","lang"])],64)):(a(),g(ae,{key:3},{default:l(()=>[s(o,{n:"primary",onClick:z},{default:l(()=>[s(_,{icon:"carbon:send"}),v(" Send request ")]),_:1})]),_:1}))])}}}),Fe={flex:"~ gap1","text-sm":"",op50:""},Ge={key:0},Ie={"w-12":"","flex-none":"","text-right":""},Ae={"font-mono":"","text-sm":""},We=i("div",{"x-divider":""},null,-1),He=i("span",{op75:""},"Select a route to start",-1),st=Y({__name:"server-routes",setup(B){const L=_e(),R=ve(),u=p(()=>new ue(R.value||[],{keys:["method","route"],shouldSort:!0})),T=p(()=>R.value?.find(C=>C.path===L.query?.path)),j=k(""),E=p(()=>R.value?j.value?u.value.search(j.value).map(C=>C.item):R.value:[]);return(C,N)=>{const M=ie,S=X,y=ye,U=De,P=ge,V=ee,w=Re;return a(),g(w,null,{left:l(()=>[s(M,{search:e(j),"onUpdate:search":N[0]||(N[0]=x=>Z(j)?j.value=x:null),pb2:""},{default:l(()=>[i("div",Fe,[e(j)?(a(),m("span",Ge,h(e(E).length)+" matched · ",1)):$("",!0),i("span",null,h(e(R)?.length)+" routes in total",1)])]),_:1},8,["search"]),(a(!0),m(q,null,A(e(E),x=>(a(),m(q,{key:x.id},[s(y,{flex:"~ gap-2","items-center":"","hover-bg-active":"",px2:"",py1:"",class:b([{"bg-active":e(T)?.path===x.path}]),to:{query:{path:x.path}}},{default:l(()=>[i("div",Ie,[s(S,{class:b(("getRequestMethodClass"in C?C.getRequestMethodClass:e(I))(x.method||"*")),title:"updates available",textContent:h((x.method||"*").toUpperCase())},null,8,["class","textContent"])]),i("span",Ae,h(x.route),1)]),_:2},1032,["class","to"]),We],64))),128))]),right:l(()=>[(a(),g(he,{max:10},[e(T)?(a(),g(U,{key:e(T).path,route:e(T)},null,8,["route"])):$("",!0)],1024)),e(T)?$("",!0):(a(),g(V,{key:0},{default:l(()=>[s(P,{px6:"",py2:""},{default:l(()=>[He]),_:1})]),_:1}))]),_:1})}}});export{st as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as C}from"./NIconTitle.vue.20baf9ca.js";import{_ as S}from"./NSelect.vue.ee701084.js";import{_ as N}from"./NCheckbox.vue.e9f99715.js";import{a as U,aa as $,o as n,h as _,i as a,f as o,w as i,u as l,J as p,F as x,C as v,T as B,t as g,c as D,z as F,az as z}from"./entry.573eb475.js";import{_ as I}from"./NSwitch.vue.57428898.js";const O={"max-w-100":"",px6:"",py8:""},E={py3:"",flex:"~ col gap-1",border:"b base"},L=o("h3",{mb1:"","text-lg":""}," UI Scale ",-1),j=["value"],H={py3:"",flex:"~ col gap-1",border:"b base"},J=o("h3",{mb1:"","text-lg":""}," Features ",-1),R=o("span",null,"Close DevTools when clicking outside",-1),q=o("span",null,"Show experimental features",-1),A={py3:"",flex:"~ col gap-1"},G=o("h3",{mb1:"","text-lg":""}," Tabs ",-1),Y=U({__name:"settings",setup(K){const{interactionCloseOnOutsideClick:r,showExperimentalFeatures:u,scale:c,hiddenTabs:s}=B(),h=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],y=$();function V(m,t){t?s.value=s.value.filter(d=>d!==m):s.value.push(m)}return(m,t)=>{const d=C,T=S,f=N,b=z,k=I;return n(),_("div",O,[a(d,{class:"text-xl op75",icon:"i-carbon-settings",text:"DevTools Settings"}),o("div",E,[L,a(T,{modelValue:l(c),"onUpdate:modelValue":t[0]||(t[0]=e=>p(c)?c.value=e:null),n:"primary"},{default:i(()=>[(n(),_(x,null,v(h,e=>o("option",{key:e[0],value:e[1]},g(e[0]),9,j)),64))]),_:1},8,["modelValue"])]),o("div",H,[J,a(f,{modelValue:l(r),"onUpdate:modelValue":t[1]||(t[1]=e=>p(r)?r.value=e:null),"n-primary":""},{default:i(()=>[R]),_:1},8,["modelValue"]),a(f,{modelValue:l(u),"onUpdate:modelValue":t[2]||(t[2]=e=>p(u)?u.value=e:null),"n-primary":""},{default:i(()=>[q]),_:1},8,["modelValue"])]),o("div",A,[G,(n(!0),_(x,null,v(l(y).all.value,e=>(n(),D(k,{key:e.name,flex:"~ row-reverse",py1:"","n-primary":"","model-value":!l(s).includes(e.name),"onUpdate:modelValue":w=>V(e.name,w)},{default:i(()=>[o("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"",class:F(l(s).includes(e.name)?"op25":"")},[a(b,{"text-xl":"",icon:e.icon,title:e.title},null,8,["icon","title"]),o("span",null,g(e.title),1)],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))])])}}});export{Y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as re}from"./NIconButton.vue.dc045a77.js";import{_ as le}from"./NSelect.vue.ee701084.js";import{_ as ue}from"./NTextInput.vue.321edbfc.js";import{a as G,o as r,c as p,w as l,K as ie,a2 as W,Y as de,u as t,ai as J,an as ce,W as me,B as I,m as j,a9 as R,ag as z,a7 as pe,S as _e,a6 as fe,e as ye,y as _,ao as F,f as u,i as c,h as m,C as L,t as g,F as x,J as q,l as d,z as P,ay as B,x as T,aD as ve,aE as ge,aN as he,at as ke,G as be,k as xe,ab as we}from"./entry.573eb475.js";import{_ as Ce}from"./NPanelGrids.02a70c97.js";import{_ as Ke}from"./PanelLeftRight.vue.9f476475.js";import{_ as Ne}from"./FilepathItem.vue.17a1ef3b.js";import"./editor.21c0f631.js";const Ve=G({__name:"NLink",props:{to:null,href:null,target:null},setup(w){return(i,v)=>(r(),p(de(w.href||w.target?"a":t(J)),W(i.$props,{class:"n-link hover:n-link-hover n-transition n-link-base"}),{default:l(()=>[ie(i.$slots,"default")]),_:3},16))}}),$e={class:"h-[48px] flex items-center justify-between gap1 px-3"},Se={class:"w-full text-sm"},Ie=["value"],je=u("div",{"x-divider":""},null,-1),Le={key:0,"h-full":"","of-hidden":"",flex:"~ col"},qe={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},Be={class:"flex items-center gap-4"},De={key:1},Ue=["onKeyup"],Me=u("br",null,null,-1),Ae={key:0,op50:""},Ee={key:1},Re=u("code",null,"nitro.storage",-1),ze=u("br",null,null,-1),Fe={"font-bold":""},Pe=u("br",null,null,-1),Te={"text-sm":""},Ge=u("br",null,null,-1),tt=G({__name:"storage",async setup(w){let i,v;const O=ce(),h=me(),k=I(""),y=I(""),a=j({get(){return R().query?.storage},set(n){h.replace({query:{storage:n}})}}),e=I(),b=j(()=>R().query?.key),{data:C}=([i,v]=z(()=>F("storageMounts",()=>_.getStorageMounts())),i=await i,v(),i),{data:K,refresh:D}=([i,v]=z(async()=>F("storageKeys",async()=>a.value?await _.getStorageKeys(a.value):[])),i=await i,v(),i),Y=O.hook("storage:key:update",async(n,s)=>{if(!(!a.value||n.split(":")[0]!==a.value)&&(await D(),b.value===n)){if(s==="remove")return h.replace({query:{storage:a.value}});await V(b.value)}});pe(Y),_e(a,D),fe(async()=>{if(!b.value){e.value=null;return}V(b.value)}),ye("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&($(),n.preventDefault())});function N(n){return n.replace(`${a.value}:`,"")}const H=j(()=>K.value?K.value.filter(n=>n.includes(k.value)):[]);async function V(n){const s=await _.getStorageItem(n);e.value={key:n,updatedKey:N(n),editingKey:!1,content:s,updatedContent:s}}async function Q(){if(!y.value||!a.value)return;const n=`${a.value}:${y.value}`;K.value?.includes(n)||await _.setStorageItem(n,""),h.replace({query:{storage:a.value,key:n}}),y.value=""}async function $(){e.value&&(await _.setStorageItem(e.value.key,e.value.updatedContent),await V(e.value.key))}async function X(){!e.value||!a.value||(await _.removeStorageItem(e.value.key),e.value=null)}async function Z(){if(!e.value||!a.value)return;const n=`${a.value}:${e.value.updatedKey}`;await _.setStorageItem(n,e.value.updatedContent),await _.removeStorageItem(e.value.key),h.replace({query:{storage:a.value,key:n}})}return(n,s)=>{const ee=re,te=le,S=ue,ne=J,oe=be,U=xe,M=Ve,A=we,E=Ce,ae=Ke,se=Ne;return t(a)?(r(),p(ae,{key:0,"storage-key":"tab-storage"},{left:l(()=>[u("div",$e,[c(ee,{icon:"carbon-chevron-left","ml--1":"",onClick:s[0]||(s[0]=o=>a.value="")}),u("div",Se,[c(te,{modelValue:t(a),"onUpdate:modelValue":s[1]||(s[1]=o=>q(a)?a.value=o:null),n:"primary",icon:"carbon-data-base"},{default:l(()=>[(r(!0),m(x,null,L(t(C),(o,f)=>(r(),m("option",{key:f,value:f},g(f),9,Ie))),128))]),_:1},8,["modelValue"])])]),c(S,{modelValue:t(k),"onUpdate:modelValue":s[2]||(s[2]=o=>q(k)?k.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(r(!0),m(x,null,L(t(H),o=>(r(),m(x,{key:o},[c(ne,{block:"",truncate:"",px2:"",py1:"","font-mono":"","text-sm":"",to:{query:{key:o,storage:t(a)}},class:P(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover")},{default:l(()=>[d(g(N(o)),1)]),_:2},1032,["to","class"]),je],64))),128)),c(S,{modelValue:t(y),"onUpdate:modelValue":s[3]||(s[3]=o=>q(y)?y.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:B(Q,["enter"])},null,8,["modelValue","onKeyup"])]),right:l(()=>[t(e)?.key?(r(),m("div",Le,[u("div",qe,[u("div",Be,[t(e).editingKey?(r(),p(S,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":s[4]||(s[4]=o=>t(e).updatedKey=o),onKeyup:B(Z,["enter"])},null,8,["modelValue","onKeyup"])):(r(),m("code",De,[d(g(N(t(e).key))+" ",1),c(oe,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:s[5]||(s[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?T("",!0):(r(),p(U,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:P({"border-green":t(e).content!==t(e).updatedContent}),onClick:$},{default:l(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),u("div",null,[c(U,{n:"red xs",onClick:X},{default:l(()=>[d(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(r(),p(t(ve),W({key:0,modelValue:t(e).updatedContent,"onUpdate:modelValue":s[6]||(s[6]=o=>t(e).updatedContent=o),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):ge((r(),m("textarea",{key:1,"onUpdate:modelValue":s[7]||(s[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 font-mono text-sm outline-none",onKeyup:B(ke($,["ctrl"]),["enter"])},null,40,Ue)),[[he,t(e).updatedContent]])])):(r(),p(E,{key:1},{default:l(()=>[c(A,{px6:"",py4:""},{default:l(()=>[d(" Select one key to start."),Me,d("Learn more about "),c(M,{href:"https://nitro.unjs.io/guide/introduction/storage",n:"orange",target:"_blank"},{default:l(()=>[d(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(r(),p(E,{key:1},{default:l(()=>[Object.keys(t(C)).length?(r(),m("p",Ae," Select one storage to start: ")):(r(),m("p",Ee,[d(" No custom storage defined in "),Re,d("."),ze,d(" Learn more about "),c(M,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:l(()=>[d(" Nitro storage ")]),_:1})])),(r(!0),m(x,null,L(t(C),(o,f)=>(r(),p(A,{key:f,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:We=>a.value=f},{default:l(()=>[u("span",Fe,g(f),1),Pe,u("span",Te,g(o.driver)+" driver",1),Ge,o.base?(r(),p(se,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):T("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}});export{tt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as T,B as b,an as N,Q as A,aP as B,aQ as R,e as E,y as f,o,h as _,f as c,i as V,u as e,c as m,x as y,t as x,F as C,aR as I,a9 as F,W as q,m as z,a6 as L,C as M,l as w,w as D,z as h,at as Q,G as U,ai as j}from"./entry.573eb475.js";import{_ as g}from"./NIconButton.vue.dc045a77.js";const G={border:"t base",flex:"~ gap-2","items-center":"",p2:""},P={"text-sm":"",op50:""},S=T({__name:"TerminalView",props:{id:null},setup(p){const r=p,d=b(),v=N(),n=b();let s;A(async()=>{s=new B.Terminal({convertEol:!0,cols:80,screenReaderMode:!0});const t=new R.FitAddon;s.loadAddon(t),s.open(d.value),t.fit(),E(window,"resize",()=>{t.fit()}),n.value=await f.getTerminalDetail(r.id),n.value?.buffer&&s.write(n.value.buffer),v.hook("devtools:terminal:data",({id:i,data:l})=>{i===r.id&&s.write(l)})});function u(){f.runTerminalAction(r.id,"clear"),s?.clear()}return(t,i)=>{const l=g;return o(),_(C,null,[c("div",{ref_key:"container",ref:d,"h-full":"","w-full":"","of-auto":"","bg-black":""},null,512),c("div",G,[V(l,{title:"Clear",icon:"i-carbon-clean",onClick:i[0]||(i[0]=k=>u())}),e(n)?.restartable?(o(),m(l,{key:0,title:"Restart",icon:"carbon-renew",onClick:i[1]||(i[1]=k=>("rpc"in t?t.rpc:e(f)).runTerminalAction(p.id,"restart"))})):y("",!0),e(n)?.terminatable?(o(),m(l,{key:1,title:"Terminate",icon:"carbon-delete",onClick:i[2]||(i[2]=k=>("rpc"in t?t.rpc:e(f)).runTerminalAction(p.id,"terminate"))})):y("",!0),c("span",P,x(e(n)?.description),1)])],64)}}}),W={key:0,"h-full":"","w-full":"","of-hidden":"",grid:"~ rows-[max-content_1fr_max-content]"},H={flex:"~",border:"b base","flex-1":"","items-center":"","navbar-glass":""},J={key:1,p10:""},K={key:1,"h-full":"",flex:"","items-center":"","justify-center":""},O=c("em",{op50:""},"No terminal attached",-1),X=[O],ne=T({__name:"terminals",setup(p){const r=I(),d=F(),v=q(),n=z(()=>{const u=d.query.id;return r.value?.find(t=>t.id===u)});function s(u){f.runTerminalAction(u,"remove"),v.replace("/modules/terminals")}return L(()=>{!d.query.id&&r.value?.length&&v.replace(`/modules/terminals?id=${encodeURIComponent(r.value[0].id)}`)}),(u,t)=>{const i=U,l=g,k=j,$=S;return e(r)?.length?(o(),_("div",W,[c("div",H,[(o(!0),_(C,null,M(e(r),a=>(o(),m(k,{key:a.id,border:"r base",flex:"~ gap-2","items-center":"",px3:"",py2:"",class:h(a.id===e(n)?.id?"bg-active":""),to:`/modules/terminals?id=${encodeURIComponent(a.id)}`},{default:D(()=>[a.icon?(o(),m(i,{key:0,icon:a.icon},null,8,["icon"])):y("",!0),c("span",{class:h(a.id===e(n)?.id?"":"op50")},x(a.name)+x(a.isTerminated?" (terminated)":""),3),a.isTerminated?(o(),m(l,{key:1,icon:"carbon-close","mx--2":"",onClick:Q(Y=>s(a.id),["stop"])},null,8,["onClick"])):y("",!0)]),_:2},1032,["class","to"]))),128))]),e(n)?(o(),m($,{id:e(n).id,key:e(n).id},null,8,["id"])):(o(),_("div",J,[w(" Terminal "),c("code",null,x(e(d).query.id),1),w(" not found ")]))])):(o(),_("div",K,X))}}});export{ne as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$ as be}from"./entry.573eb475.js";const K=Object.freeze({left:0,top:0,width:16,height:16}),H=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ue=Object.freeze({...K,...H}),ve=Object.freeze({...ue,body:"",hidden:!1}),Se=Object.freeze({width:null,height:null}),fe=Object.freeze({...Se,...H});function xe(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}function Z(t,e){const r=xe(t,e);for(const i in ve)i in H?i in t&&!(i in r)&&(r[i]=H[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function ke(t,e){const r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);function o(a){if(r[a])return n[a]=[];if(!(a in n)){n[a]=null;const c=i[a]&&i[a].parent,u=c&&o(c);u&&(n[a]=[c].concat(u))}return n[a]}return(e||Object.keys(r).concat(Object.keys(i))).forEach(o),n}function J(t,e,r){const i=t.icons,n=t.aliases||Object.create(null);let o={};function a(c){o=Z(i[c]||n[c],o)}return a(e),r.forEach(a),Z(t,o)}function $e(t,e){if(t.icons[e])return J(t,e,[]);const r=ke(t,[e])[e];return r?J(t,e,r):null}({...K});Object.keys(K).concat(["provider"]);const Ae=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ce=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Q(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;const i=t.split(Ae);if(i===null||!i.length)return t;const n=[];let o=i.shift(),a=Ce.test(o);for(;;){if(a){const c=parseFloat(o);isNaN(c)?n.push(o):n.push(Math.ceil(c*e*r)/r)}else n.push(o);if(o=i.shift(),o===void 0)return n.join("");a=!a}}const X=t=>t==="unset"||t==="undefined"||t==="none";function Oe(t,e){const r={...ue,...t},i={...fe,...e},n={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach($=>{const g=[],m=$.hFlip,k=$.vFlip;let b=$.rotate;m?k?b+=2:(g.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),g.push("scale(-1 1)"),n.top=n.left=0):k&&(g.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),g.push("scale(1 -1)"),n.top=n.left=0);let p;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:p=n.height/2+n.top,g.unshift("rotate(90 "+p.toString()+" "+p.toString()+")");break;case 2:g.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:p=n.width/2+n.left,g.unshift("rotate(-90 "+p.toString()+" "+p.toString()+")");break}b%2===1&&(n.left!==n.top&&(p=n.left,n.left=n.top,n.top=p),n.width!==n.height&&(p=n.width,n.width=n.height,n.height=p)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=i.width,c=i.height,u=n.width,f=n.height;let l,d;a===null?(d=c===null?"1em":c==="auto"?f:c,l=Q(d,u/f)):(l=a==="auto"?u:a,d=c===null?Q(l,f/u):c==="auto"?f:c);const w={},S=($,g)=>{X(g)||(w[$]=g.toString())};return S("width",l),S("height",d),w.viewBox=n.left.toString()+" "+n.top.toString()+" "+u.toString()+" "+f.toString(),{attributes:w,body:o}}""+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);function je(t){return t.replace(/(['"])\s*\n\s*([^>\\/\s])/g,"$1 $2").replace(/(["';{}><])\s*\n\s*/g,"$1").replace(/\s*\n\s*/g," ").replace(/\s+"/g,'"').replace(/="\s+/g,'="').trim()}function s(t,e){const r="rgb",i=e[0],n=e.length;n>1&&e[1],n>2&&e[2],n>3&&e[3]}s("silver",[192]);s("gray",[128]);s("white",[255]);s("maroon",[128,0,0]);s("red",[255,0,0]);s("purple",[128,0]);s("fuchsia",[255,0]);s("green",[0,128]);s("lime",[0,255]);s("olive",[128,128,0]);s("yellow",[255,255,0]);s("navy",[0,0,128]);s("blue",[0,0,255]);s("teal",[0,128,128]);s("aqua",[0,255,255]);s("aliceblue",[240,248,255]);s("antiquewhite",[250,235,215]);s("aqua",[0,255,255]);s("aquamarine",[127,255,212]);s("azure",[240,255,255]);s("beige",[245,245,220]);s("bisque",[255,228,196]);s("black",[0]);s("blanchedalmond",[255,235,205]);s("blue",[0,0,255]);s("blueviolet",[138,43,226]);s("brown",[165,42,42]);s("burlywood",[222,184,135]);s("cadetblue",[95,158,160]);s("chartreuse",[127,255,0]);s("chocolate",[210,105,30]);s("coral",[255,127,80]);s("cornflowerblue",[100,149,237]);s("cornsilk",[255,248,220]);s("crimson",[220,20,60]);s("cyan",[0,255,255]);s("darkblue",[0,0,139]);s("darkcyan",[0,139,139]);s("darkgoldenrod",[184,134,11]);s("darkgray",[169]);s("darkgreen",[0,100]);s("darkgrey",[169]);s("darkkhaki",[189,183,107]);s("darkmagenta",[139,0]);s("darkolivegreen",[85,107,47]);s("darkorange",[255,140,0]);s("darkorchid",[153,50,204]);s("darkred",[139,0,0]);s("darksalmon",[233,150,122]);s("darkseagreen",[143,188]);s("darkslateblue",[72,61,139]);s("darkslategray",[47,79,79]);s("darkslategrey",[47,79,79]);s("darkturquoise",[0,206,209]);s("darkviolet",[148,0,211]);s("deeppink",[255,20,147]);s("deepskyblue",[0,191,255]);s("dimgray",[105]);s("dimgrey",[105]);s("dodgerblue",[30,144,255]);s("firebrick",[178,34,34]);s("floralwhite",[255,250,240]);s("forestgreen",[34,139]);s("fuchsia",[255,0]);s("gainsboro",[220]);s("ghostwhite",[248,248,255]);s("gold",[255,215,0]);s("goldenrod",[218,165,32]);s("gray",[128]);s("green",[0,128]);s("greenyellow",[173,255,47]);s("grey",[128]);s("honeydew",[240,255]);s("hotpink",[255,105,180]);s("indianred",[205,92,92]);s("indigo",[75,0,130]);s("ivory",[255,255,240]);s("khaki",[240,230,140]);s("lavender",[230,230,250]);s("lavenderblush",[255,240,245]);s("lawngreen",[124,252,0]);s("lemonchiffon",[255,250,205]);s("lightblue",[173,216,230]);s("lightcoral",[240,128,128]);s("lightcyan",[224,255,255]);s("lightgoldenrodyellow",[250,250,210]);s("lightgray",[211]);s("lightgreen",[144,238]);s("lightgrey",[211]);s("lightpink",[255,182,193]);s("lightsalmon",[255,160,122]);s("lightseagreen",[32,178,170]);s("lightskyblue",[135,206,250]);s("lightslategray",[119,136,153]);s("lightslategrey",[119,136,153]);s("lightsteelblue",[176,196,222]);s("lightyellow",[255,255,224]);s("lime",[0,255]);s("limegreen",[50,205]);s("linen",[250,240,230]);s("magenta",[255,0]);s("maroon",[128,0,0]);s("mediumaquamarine",[102,205,170]);s("mediumblue",[0,0,205]);s("mediumorchid",[186,85,211]);s("mediumpurple",[147,112,219]);s("mediumseagreen",[60,179,113]);s("mediumslateblue",[123,104,238]);s("mediumspringgreen",[0,250,154]);s("mediumturquoise",[72,209,204]);s("mediumvioletred",[199,21,133]);s("midnightblue",[25,25,112]);s("mintcream",[245,255,250]);s("mistyrose",[255,228,225]);s("moccasin",[255,228,181]);s("navajowhite",[255,222,173]);s("navy",[0,0,128]);s("oldlace",[253,245,230]);s("olive",[128,128,0]);s("olivedrab",[107,142,35]);s("orange",[255,165,0]);s("orangered",[255,69,0]);s("orchid",[218,112,214]);s("palegoldenrod",[238,232,170]);s("palegreen",[152,251]);s("paleturquoise",[175,238,238]);s("palevioletred",[219,112,147]);s("papayawhip",[255,239,213]);s("peachpuff",[255,218,185]);s("peru",[205,133,63]);s("pink",[255,192,203]);s("plum",[221,160]);s("powderblue",[176,224,230]);s("purple",[128,0]);s("rebeccapurple",[102,51,153]);s("red",[255,0,0]);s("rosybrown",[188,143,143]);s("royalblue",[65,105,225]);s("saddlebrown",[139,69,19]);s("salmon",[250,128,114]);s("sandybrown",[244,164,96]);s("seagreen",[46,139,87]);s("seashell",[255,245,238]);s("sienna",[160,82,45]);s("silver",[192]);s("skyblue",[135,206,235]);s("slateblue",[106,90,205]);s("slategray",[112,128,144]);s("slategrey",[112,128,144]);s("snow",[255,250,250]);s("springgreen",[0,255,127]);s("steelblue",[70,130,180]);s("tan",[210,180,140]);s("teal",[0,128,128]);s("thistle",[216,191]);s("tomato",[255,99,71]);s("turquoise",[64,224,208]);s("violet",[238,130]);s("wheat",[245,222,179]);s("white",[255]);s("whitesmoke",[245]);s("yellow",[255,255,0]);s("yellowgreen",[154,205,50]);const Ee=/\swidth\s*=\s*["'](\w+)["']/,Me=/\sheight\s*=\s*["'](\w+)["']/,N=/<svg\s+/;function _e(t,e,r){const i=t.slice(0,t.indexOf(">")),n=(o,a)=>{const c=a.exec(i),u=c!=null,f=e[o];return!f&&!X(f)&&(typeof r=="number"?r>0&&(e[o]=`${r}em`):c&&(e[o]=c[1])),u};return[n("width",Ee),n("height",Me)]}async function he(t,e,r,i,n,o){const{scale:a,addXmlNs:c=!1}=i??{},{additionalProps:u={},iconCustomizer:f}=i?.customizations??{},l=await n?.()??{};await f?.(e,r,l),Object.keys(u).forEach(g=>{const m=u[g];m!=null&&(l[g]=m)}),o?.(l);const[d,w]=_e(t,l,a);c&&(!t.includes("xmlns=")&&!l.xmlns&&(l.xmlns="http://www.w3.org/2000/svg"),!t.includes("xmlns:xlink=")&&t.includes("xlink:")&&!l["xmlns:xlink"]&&(l["xmlns:xlink"]="http://www.w3.org/1999/xlink"));const S=Object.keys(l).map(g=>g==="width"&&d||g==="height"&&w?null:`${g}="${l[g]}"`).filter(g=>g!=null);if(S.length&&(t=t.replace(N,`<svg ${S.join(" ")} `)),i){const{defaultStyle:g,defaultClass:m}=i;m&&!t.includes("class=")&&(t=t.replace(N,`<svg class="${m}" `)),g&&!t.includes("style=")&&(t=t.replace(N,`<svg style="${g}" `))}const $=i?.usedProps;return $&&(Object.keys(u).forEach(g=>{const m=l[g];m!=null&&($[g]=m)}),typeof l.width<"u"&&l.width!==null&&($.width=l.width),typeof l.height<"u"&&l.height!==null&&($.height=l.height)),t}async function ee(t,e,r,i){let n;if(typeof t=="function")n=await t(r);else{const o=t[r];n=typeof o=="function"?await o():o}if(n){const o=n.indexOf("<svg");o>0&&(n=n.slice(o));const{transform:a}=i?.customizations??{};return n=typeof a=="function"?await a(n,e,r):n,n.startsWith("<svg")?await he(i?.customizations?.trimCustomSvg===!0?je(n):n,e,r,i,void 0):(console.warn(`Custom icon "${r}" in "${e}" is not a valid SVG`),n)}}async function de(t,e,r,i){let n;const{customize:o}=i?.customizations??{};for(const a of r)if(n=$e(t,a),n){let c={...fe};typeof o=="function"&&(c=o(c));const{attributes:{width:u,height:f,...l},body:d}=Oe(n,c),w=i?.scale;return await he(`<svg >${d}</svg>`,e,a,i,()=>({...l}),S=>{const $=(g,m)=>{const k=S[g];let b;if(!X(k)){if(k)return;typeof w=="number"?w&&(b=`${w}em`):b=m}b?S[g]=b:delete S[g]};$("width",u),$("height",f)})}}const pe=async(t,e,r)=>{const i=r?.customCollections?.[t];if(i)if(typeof i=="function"){const n=await i(e);if(n){if(typeof n=="string")return await ee(()=>n,t,e,r);if("icons"in n){const o=[e,e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.replace(/([a-z])(\d+)/g,"$1-$2")];return await de(n,t,o,r)}}}else return await ee(i,t,e,r)};var ze=["academicons","akar-icons","ant-design","arcticons","basil","bi","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codicon","cryptocurrency-color","cryptocurrency","dashicons","ei","el","emblemicons","emojione-monotone","emojione-v1","emojione","entypo-social","entypo","eos-icons","ep","et","eva","fa-brands","fa-regular","fa-solid","fa","fa6-brands","fa6-regular","fa6-solid","fad","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","foundation","fxemoji","gala","game-icons","geo","gg","gis","gridicons","grommet-icons","healthicons","heroicons-outline","heroicons-solid","heroicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconoir","icons8","il","ion","iwwa","jam","la","line-md","logos","ls","lucide","majesticons","maki","map","material-symbols","mdi-light","mdi","medical-icon","memory","mi","mingcute","mono-icons","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","pajamas","pepicons-pop","pepicons-print","pepicons","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline","subway","svg-spinners","system-uicons","tabler","teenyicons","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","vaadin","vs","vscode-icons","websymbol","whh","wi","wpf","zmdi","zondicons"];function Le(t){const e=new Map;function r(i){if(ze.includes(i))return e.has(i)||e.set(i,be(`${t}@iconify-json/${i}/icons.json`)),e.get(i)}return async(i,n,o)=>{let a=await pe(i,n,o);if(a)return a;const c=await r(i);if(c){const u=[n,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),n.replace(/([a-z])(\d+)/g,"$1-$2")];a=await de(c,i,u,o)}return a}}function Te(t){const e=t.length;let r=-1,i,n="";const o=t.charCodeAt(0);for(;++r<e;){if(i=t.charCodeAt(r),i===0){n+="�";continue}if(i===44){n+="\\,";continue}if(i>=1&&i<=31||i===127||r===0&&i>=48&&i<=57||r===1&&i>=48&&i<=57&&o===45){n+=`\\${i.toString(16)} `;continue}if(r===0&&e===1&&i===45){n+=`\\${t.charAt(r)}`;continue}if(i>=128||i===45||i===95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122){n+=t.charAt(r);continue}n+=`\\${t.charAt(r)}`}return n}const q=Te;function z(t=[]){return Array.isArray(t)?t:[t]}function R(t){return Array.from(new Set(t))}function j(t){return typeof t=="string"}function F(t){return j(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Ie(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>F(e)):[t]:[F(t)]}function Pe(t){return t.filter(([e,r],i)=>{if(e.startsWith("$$"))return!1;for(let n=i-1;n>=0;n--)if(t[n][0]===e&&t[n][1]===r)return!1;return!0})}function G(t){return t==null?"":Pe(t).map(([e,r])=>r!=null?`${e}:${r};`:void 0).filter(Boolean).join("")}function B(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ge(t,e,r=!1){const i=t,n=e;if(Array.isArray(n))return r&&Array.isArray(n)?[...i,...n]:[...n];const o={...i};return B(i)&&B(n)&&Object.keys(n).forEach(a=>{B(i[a])&&B(n[a])||Array.isArray(i[a])&&Array.isArray(n[a])?o[a]=ge(i[a],n[a],r):Object.assign(o,{[a]:n[a]})}),o}function U(t){let e,r,i;if(Array.isArray(t)){for(r=Array(e=t.length);e--;)r[e]=(i=t[e])&&typeof i=="object"?U(i):i;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:U(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(i=t[e])&&typeof i=="object"?U(i):i;return r}return t}function Re(t){return j(t[0])}function Fe(t){return j(t[0])}const te="$$shortcut-no-merge";function Ve(t){return typeof t=="function"?{match:t}:t}function re(t){return t.length===3}function Be(t){return t!=null}function De(){}class Ue{constructor(){this._map=new Map}get(e,r){const i=this._map.get(e);if(i)return i.get(r)}getFallback(e,r,i){let n=this._map.get(e);return n||(n=new Map,this._map.set(e,n)),n.has(r)||n.set(r,i),n.get(r)}set(e,r,i){let n=this._map.get(e);return n||(n=new Map,this._map.set(e,n)),n.set(r,i),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,i])=>Array.from(i.entries()).map(([n,o])=>e(o,r,n)))}}const D={};function He(t=["-",":"]){const e=t.join("|");return D[e]||(D[e]=new RegExp(`((?:[!@\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),D[e].lastIndex=0,D[e]}function Ne(t,e=["-",":"],r=5){const i=He(e);let n=!1,o=t.toString();const a=new Set;do{const c=o;o=o.replace(i,(u,f,l,d)=>e.includes(l)?(a.add(f+l),d.split(/\s/g).filter(Boolean).map(w=>w==="~"?f:w.replace(/^(!?)(.*)/,`$1${f}${l}$2`)).join(" ")):u),n=o!==c,r-=1}while(n&&r);return{prefixes:Array.from(a),expanded:o,hasChanged:n}}function qe(t,e=["-",":"],r=5){const{expanded:i}=Ne(t.toString(),e,r);return typeof t=="string"?i:t.length()?t.overwrite(0,t.length(),i):t}const ne=new Set;function me(t){ne.has(t)||(console.warn("[unocss]",t),ne.add(t))}const Ge=/[\\:]?[\s'"`;{}]+/g;function We(t){return[...new Set(t.split(Ge))]}const Ye={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return We(t)}};function Ke(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(r=>r(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(r=>r!==e)}}}const W="default",Y="preflights",Xe="shortcuts",Ze={[Y]:-100,[Xe]:-10,[W]:0};function ye(t){return z(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const ie="_uno_resolved";function Je(t){if(ie in t)return t;t={...t},Object.defineProperty(t,ie,{value:!0,enumerable:!1});const e=t.shortcuts?ye(t.shortcuts):void 0;if(t.shortcuts=e,t.prefix||t.layer){const r=i=>{i[2]||(i[2]={});const n=i[2];n.prefix==null&&t.prefix&&(n.prefix=z(t.prefix)),n.layer==null&&t.layer&&(n.layer=t.layer)};e?.forEach(r),t.rules?.forEach(r)}return t}function we(t){const e=Je(t);if(!e.presets)return[e];const r=(e.presets||[]).flatMap(z).flatMap(we);return[e,...r]}function se(t={},e={}){const r=Object.assign({},e,t),i=R((r.presets||[]).flatMap(z).flatMap(we)),n=[...i.filter(h=>h.enforce==="pre"),...i.filter(h=>!h.enforce),...i.filter(h=>h.enforce==="post")],o=[...n,r],a=[...o].reverse(),c=Object.assign({},Ze,...o.map(h=>h.layers));function u(h){return R(o.flatMap(v=>z(v[h]||[])))}const f=u("extractors");let l=a.find(h=>h.extractorDefault!==void 0)?.extractorDefault;l===void 0&&(l=Ye),l&&!f.includes(l)&&f.unshift(l),f.sort((h,v)=>(h.order||0)-(v.order||0));const d=u("rules"),w={},S=d.length,$=d.map((h,v)=>{if(Re(h)){z(h[2]?.prefix||"").forEach(O=>{w[O+h[0]]=[v,h[1],h[2],h]});return}return[v,...h]}).filter(Boolean).reverse();let g=o.map(h=>h.theme?U(h.theme):{}).reduce((h,v)=>ge(h,v),{});const m=u("extendTheme");for(const h of m)g=h(g)||g;const k={templates:R(o.flatMap(h=>z(h.autocomplete?.templates))),extractors:o.flatMap(h=>z(h.autocomplete?.extractors)).sort((h,v)=>(h.order||0)-(v.order||0))};let b=u("separators");b.length||(b=[":","-"]);const p={mergeSelectors:!0,warn:!0,blocklist:[],sortLayers:h=>h,...r,presets:n,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:c,theme:g,rulesSize:S,rulesDynamic:$,rulesStaticMap:w,preprocess:u("preprocess"),postprocess:u("postprocess"),preflights:u("preflights"),autocomplete:k,variants:u("variants").map(Ve).sort((h,v)=>(h.order||0)-(v.order||0)),shortcuts:ye(u("shortcuts")).reverse(),extractors:f,safelist:u("safelist"),separators:b};for(const h of o)h?.configResolved?.(p);return p}const Qe="0.51.4";class et{constructor(e={},r={}){this.userConfig=e,this.defaults=r,this.version=Qe,this._cache=new Map,this.blocked=new Set,this.parentOrders=new Map,this.events=Ke(),this.config=se(e,r),this.events.emit("config",this.config)}setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=se(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,i=new Set){const n={original:e,code:e,id:r,extracted:i};for(const o of this.config.extractors){const a=await o.extract?.(n);if(a)for(const c of a)i.add(c)}return i}makeContext(e,r){const i={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...n)=>this.constructCustomCSS(i,...n),variantMatch:r};return i}async parseToken(e,r){if(this.blocked.has(e))return;const i=`${e}${r?` ${r}`:""}`;if(this._cache.has(i))return this._cache.get(i);let n=e;for(const f of this.config.preprocess)n=f(e);if(this.isBlocked(n)){this.blocked.add(e),this._cache.set(i,null);return}const o=await this.matchVariants(e,n);if(!o||this.isBlocked(o[1])){this.blocked.add(e),this._cache.set(i,null);return}const a=this.makeContext(e,[r||o[0],o[1],o[2],o[3]]);this.config.details&&(a.variants=[...o[3]]);const c=await this.expandShortcut(a.currentSelector,a),u=c?await this.stringifyShortcuts(a.variantMatch,a,c[0],c[1]):(await this.parseUtil(a.variantMatch,a))?.map(f=>this.stringifyUtil(f,a)).filter(Be);if(u?.length)return this._cache.set(i,u),u;this._cache.set(i,null)}async generate(e,r={}){const{id:i,scope:n,preflights:o=!0,safelist:a=!0,minify:c=!1}=r,u=j(e)?await this.applyExtractors(e,i):Array.isArray(e)?new Set(e):e;a&&this.config.safelist.forEach(p=>u.add(p));const f=c?"":`
|
|
2
|
-
`,l=new Set([W]),d=new Set,w=new Map;let S={};const $=Array.from(u).map(async p=>{if(d.has(p))return;const h=await this.parseToken(p);if(h!=null){d.add(p);for(const v of h){const C=v[3]||"",O=v[4]?.layer;w.has(C)||w.set(C,[]),w.get(C).push(v),O&&l.add(O)}}});await Promise.all($),await(async()=>{if(!o)return;const p={generator:this,theme:this.config.theme},h=new Set([]);this.config.preflights.forEach(({layer:v=Y})=>{l.add(v),h.add(v)}),S=Object.fromEntries(await Promise.all(Array.from(h).map(async v=>{const O=(await Promise.all(this.config.preflights.filter(M=>(M.layer||Y)===v).map(async M=>await M.getCSS(p)))).filter(Boolean).join(f);return[v,O]})))})();const g=this.config.sortLayers(Array.from(l).sort((p,h)=>(this.config.layers[p]??0)-(this.config.layers[h]??0)||p.localeCompare(h))),m={},k=p=>{if(m[p])return m[p];let h=Array.from(w).sort((C,O)=>(this.parentOrders.get(C[0])??0)-(this.parentOrders.get(O[0])??0)||C[0]?.localeCompare(O[0]||"")||0).map(([C,O])=>{const M=O.length,P=O.filter(y=>(y[4]?.layer||W)===p).sort((y,A)=>y[0]-A[0]||(y[4]?.sort||0)-(A[4]?.sort||0)||y[5]?.currentSelector?.localeCompare(A[5]?.currentSelector??"")||y[1]?.localeCompare(A[1]||"")||y[2]?.localeCompare(A[2]||"")||0).map(([,y,A,,E,,_])=>[[[(y&&it(y,n))??"",E?.sort??0]],A,!!(_??E?.noMerge)]);if(!P.length)return;const V=P.reverse().map(([y,A,E],_)=>{if(!E&&this.config.mergeSelectors)for(let I=_+1;I<M;I++){const L=P[I];if(L&&!L[2]&&(y&&L[0]||y==null&&L[0]==null)&&L[1]===A)return y&&L[0]&&L[0].push(...y),null}const T=y?R(y.sort((I,L)=>I[1]-L[1]||I[0]?.localeCompare(L[0]||"")||0).map(I=>I[0]).filter(Boolean)):[];return T.length?`${T.join(`,${f}`)}{${A}}`:A}).filter(Boolean).reverse().join(f);if(!C)return V;const x=C.split(" $$ ");return`${x.join("{")}{${f}${V}${f}}${x.map(y=>"").join("}")}`}).filter(Boolean).join(f);o&&(h=[S[p],h].filter(Boolean).join(f));const v=c?"":`/* layer: ${p} */${f}`;return m[p]=h?v+h:""},b=(p=g,h)=>p.filter(v=>!h?.includes(v)).map(v=>k(v)||"").filter(Boolean).join(f);return{get css(){return b()},layers:g,matched:d,getLayers:b,getLayer:k}}async matchVariants(e,r){const i=new Set,n=[];let o=r||e,a=!1;const c={rawSelector:e,theme:this.config.theme,generator:this};for(;;){a=!1;for(const u of this.config.variants){if(!u.multiPass&&i.has(u))continue;let f=await u.match(o,c);if(f){j(f)&&(f={matcher:f}),o=f.matcher,n.unshift(f),i.add(u),a=!0;break}}if(!a)break;if(n.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,o,n,i]}applyVariants(e,r=e[4],i=e[1]){const o=r.slice().sort((f,l)=>(f.order||0)-(l.order||0)).reduceRight((f,l)=>d=>{const w=l.body?.(d.entries)||d.entries,S=Array.isArray(l.parent)?l.parent:[l.parent,void 0];return(l.handle??ot)({...d,entries:w,selector:l.selector?.(d.selector,w)||d.selector,parent:S[0]||d.parent,parentOrder:S[1]||d.parentOrder,layer:l.layer||d.layer,sort:l.sort||d.sort},f)},f=>f)({prefix:"",selector:st(i),pseudo:"",entries:e[2]}),{parent:a,parentOrder:c}=o;a!=null&&c!=null&&this.parentOrders.set(a,c);const u={selector:[o.prefix,o.selector,o.pseudo].join(""),entries:o.entries,parent:a,layer:o.layer,sort:o.sort,noMerge:o.noMerge};for(const f of this.config.postprocess)f(u);return u}constructCustomCSS(e,r,i){const n=F(r);if(j(n))return n;const{selector:o,entries:a,parent:c}=this.applyVariants([0,i||e.rawSelector,n,void 0,e.variantHandlers]),u=`${o}{${G(a)}}`;return c?`${c}{${u}}`:u}async parseUtil(e,r,i=!1,n){const[o,a,c]=j(e)?await this.matchVariants(e):e;this.config.details&&(r.rules=r.rules??[]);const u=this.config.rulesStaticMap[a];if(u&&u[1]&&(i||!u[2]?.internal)){this.config.details&&r.rules.push(u[3]);const l=u[0],d=F(u[1]),w=u[2];return j(d)?[[l,d,w]]:[[l,o,d,w,c]]}r.variantHandlers=c;const{rulesDynamic:f}=this.config;for(const[l,d,w,S]of f){if(S?.internal&&!i)continue;let $=a;if(S?.prefix){const b=z(S.prefix);if(n){const p=z(n);if(!b.some(h=>p.includes(h)))continue}else{const p=b.find(h=>a.startsWith(h));if(p==null)continue;$=a.slice(p.length)}}const g=$.match(d);if(!g)continue;const m=await w(g,r);if(!m)continue;this.config.details&&r.rules.push([d,w,S]);const k=Ie(m).filter(b=>b.length);if(k.length)return k.map(b=>j(b)?[l,b,S]:[l,o,b,S,c])}}stringifyUtil(e,r){if(!e)return;if(re(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0];const{selector:i,entries:n,parent:o,layer:a,sort:c,noMerge:u}=this.applyVariants(e),f=G(n);if(!f)return;const{layer:l,sort:d,...w}=e[3]??{},S={...w,layer:a??l,sort:c??d};return[e[0],i,f,o,S,this.config.details?r:void 0,u]}async expandShortcut(e,r,i=5){if(i===0)return;const n=this.config.details?c=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(c)}:De;let o,a;for(const c of this.config.shortcuts){let u=e;if(c[2]?.prefix){const l=z(c[2].prefix).find(d=>e.startsWith(d));if(l==null)continue;u=e.slice(l.length)}if(Fe(c)){if(c[0]===u){o=o||c[2],a=c[1],n(c);break}}else{const f=u.match(c[0]);if(f&&(a=c[1](f,r)),a){o=o||c[2],n(c);break}}}if(j(a)&&(a=qe(a.trim()).split(/\s+/g)),!a){const[c,u]=j(e)?await this.matchVariants(e):e;if(c!==u){const f=await this.expandShortcut(u,r,i-1);f&&(a=f[0].map(l=>j(l)?c.replace(u,l):l))}}if(a)return[(await Promise.all(a.map(async c=>(j(c)?(await this.expandShortcut(c,r,i-1))?.[0]:void 0)||[c]))).flat(1).filter(Boolean),o]}async stringifyShortcuts(e,r,i,n={layer:this.config.shortcutsLayer}){const o=new Ue,a=(await Promise.all(R(i).map(async l=>{const d=j(l)?await this.parseUtil(l,r,!0,n.prefix):[[1/0,"{inline}",F(l),void 0,[]]];return d||me(`unmatched utility "${l}" in shortcut "${e[1]}"`),d||[]}))).flat(1).filter(Boolean).sort((l,d)=>l[0]-d[0]),[c,,u]=e,f=[];for(const l of a){if(re(l)){f.push([l[0],void 0,l[1],void 0,l[2],r,void 0]);continue}const{selector:d,entries:w,parent:S,sort:$,noMerge:g}=this.applyVariants(l,[...l[4],...u],c);o.getFallback(d,S,[[],l[0]])[0].push([w,!!(g??l[3]?.noMerge),$??0])}return f.concat(o.map(([l,d],w,S)=>{const $=(m,k,b)=>{const p=Math.max(...b.map(v=>v[1])),h=b.map(v=>v[0]);return(m?[h.flat(1)]:h).map(v=>{const C=G(v);if(C)return[d,w,C,S,{...n,noMerge:k,sort:p},r,void 0]})};return[[l.filter(([,m])=>m).map(([m,,k])=>[m,k]),!0],[l.filter(([,m])=>!m).map(([m,,k])=>[m,k]),!1]].map(([m,k])=>[...$(!1,k,m.filter(([b])=>b.some(p=>p[0]===te))),...$(!0,k,m.filter(([b])=>b.every(p=>p[0]!==te)))])}).flat(2).filter(Boolean))}isBlocked(e){return!e||this.config.blocklist.some(r=>j(r)?r===e:r.test(e))}}function tt(t,e){return new et(t,e)}const rt=/\s\$\$\s+/g;function nt(t){return t.match(/\s\$\$\s/)}function it(t,e){return nt(t)?t.replace(rt,e?` ${e} `:" "):e?`${e} ${t}`:t}const oe=/^\[(.+?)(~?=)"(.*)"\]$/;function st(t){return oe.test(t)?t.replace(oe,(e,r,i,n)=>`[${q(r)}${i}"${q(n)}"]`):`.${q(t)}`}function ot(t,e){return e(t)}function at(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ct(t){let e=t.startsWith("<svg>")?t.replace("<svg>","<svg >"):t;return!e.includes(" xmlns:xlink=")&&e.includes(" xlink:")&&(e=e.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),e.includes(" xmlns=")||(e=e.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),at(e)}const lt=3;function ut(t){return function(r={}){const{scale:i=1,mode:n="auto",prefix:o="i-",warn:a=!1,collections:c,extraProperties:u={},customizations:f={},autoInstall:l=!1,layer:d="icons",unit:w}=r,S={addXmlNs:!0,scale:i,customCollections:c,autoInstall:l,warn:void 0,customizations:{...f,additionalProps:{...u},trimCustomSvg:!0,async iconCustomizer(g,m,k){await f.iconCustomizer?.(g,m,k),w&&(k.width||(k.width=`${i}${w}`),k.height||(k.height=`${i}${w}`))}}};let $;return{name:"@unocss/preset-icons",enforce:"pre",options:r,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async([g,m,k=n])=>{let b="",p="",h;$=$||await t(r);const v={};if(m.includes(":"))[b,p]=m.split(":"),h=await $(b,p,{...S,usedProps:v});else{const O=m.split(/-/g);for(let M=lt;M>=1&&(b=O.slice(0,M).join("-"),p=O.slice(M).join("-"),h=await $(b,p,{...S,usedProps:v}),!h);M--);}if(!h){a&&me(`failed to load icon "${g}"`);return}const C=`url("data:image/svg+xml;utf8,${ct(h)}")`;return k==="auto"&&(k=h.includes("currentColor")?"mask":"bg"),k==="mask"?{"--un-icon":C,"-webkit-mask":"var(--un-icon) no-repeat",mask:"var(--un-icon) no-repeat","-webkit-mask-size":"100% 100%","mask-size":"100% 100%","background-color":"currentColor",color:"inherit",...v}:{background:`${C} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...v}},{layer:d,prefix:o}]]}}}const ft=ut(async t=>{const{cdn:e}=t;return e?Le(e):pe});function ht(t){return t.replace(/-(\w)/g,(e,r)=>r?r.toUpperCase():"")}function ae(t){return t.charAt(0).toUpperCase()+t.slice(1)}function ce(t){return t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var le=["Webkit","Moz","ms"];function dt(t){const e={};function r(i){const n=e[i];if(n)return n;let o=ht(i);if(o!=="filter"&&o in t)return e[i]=ce(o);o=ae(o);for(let a=0;a<le.length;a++){const c=`${le[a]}${o}`;if(c in t)return e[i]=ce(ae(c))}return i}return({entries:i})=>i.forEach(n=>{n[0].startsWith("--")||(n[0]=r(n[0]))})}function pt(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function gt(t={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}const e=window,r=window.document,i=()=>r.documentElement,n=e.__unocss||{},o=Object.assign({},t,n.runtime),a=o.defaults||{},c=o.cloakAttribute??"un-cloak";o.autoPrefix&&(a.postprocess=z(a.postprocess)).unshift(dt(r.createElement("div").style)),o.configResolved?.(n,a);const u=tt(n,a),f=new Map;let l=!0,d=new Set,w,S,$=[];const g=()=>new Promise(x=>{$.push(x),S!=null&&clearTimeout(S),S=setTimeout(()=>b().then(()=>{const y=$;$=[],y.forEach(A=>A())}),0)});function m(x){if(x.nodeType!==1)return;const y=x;y.hasAttribute(c)&&y.removeAttribute(c),y.querySelectorAll(`[${c}]`).forEach(A=>{A.removeAttribute(c)})}function k(x,y){let A=f.get(x);if(!A)if(A=r.createElement("style"),f.set(x,A),y==null)i().prepend(A);else{const E=k(y),_=E.parentNode;_?_.insertBefore(A,E.nextSibling):i().prepend(A)}return A}async function b(){const x=await u.generate(d);return x.layers.reduce((y,A)=>(k(A,y).innerHTML=x.getLayer(A)??"",A),void 0),d=x.matched,{...x,getStyleElement:y=>f.get(y),getStyleElements:()=>f}}async function p(x){const y=d.size;await u.applyExtractors(x,void 0,d),y!==d.size&&await g()}async function h(){const x=r.body,y=x&&x.outerHTML;y&&(await p(`${y} ${pt(y)}`),m(i()),m(x))}const v=new MutationObserver(x=>{l||x.forEach(async y=>{if(y.target.nodeType!==1)return;const A=y.target;for(const E of f)if(A===E[1])return;if(y.type==="childList")y.addedNodes.forEach(async E=>{if(E.nodeType!==1)return;const _=E;w&&!w(_)||(await p(_.outerHTML),m(_))});else{if(w&&!w(A))return;if(y.attributeName!==c){const E=Array.from(A.attributes).map(T=>T.value?`${T.name}="${T.value}"`:T.name).join(" "),_=`<${A.tagName.toLowerCase()} ${E}>`;await p(_)}A.hasAttribute(c)&&A.removeAttribute(c)}})});let C=!1;function O(){if(C)return;const x=i()||r.body;x&&(v.observe(x,{childList:!0,subtree:!0,attributes:!0}),C=!0)}function M(){h(),O()}function P(){r.readyState==="loading"?e.addEventListener("DOMContentLoaded",M):M()}const V=e.__unocss_runtime=e.__unocss_runtime={version:u.version,uno:u,async extract(x){j(x)||(x.forEach(y=>d.add(y)),x=""),await p(x)},extractAll:h,inspect(x){w=x},toggleObserver(x){x===void 0?l=!l:l=!!x,!C&&!l&&P()},update:b};o.ready?.(V)!==!1&&(l=!1,P())}gt({defaults:{presets:[ft({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as B,_ as E}from"./fuse.esm.dd081c31.js";import{u as a,m as h,a3 as S,ao as j,a as z,B as R,ag as A,a9 as T,a6 as W,o as p,c as N,w as d,i as g,J as I,h as D,C as O,F as L,l as P,t as U,z as V,f as b,ai as q,ab as G}from"./entry.573eb475.js";import{_ as J}from"./NCodeBlock.vue.bac56013.js";import{_ as K}from"./NPanelGrids.02a70c97.js";import{_ as X}from"./PanelLeftRight.vue.9f476475.js";import{h as H}from"./index.c769634a.js";import"./NTextInput.vue.321edbfc.js";function M(u,r,m){const[t={},n]=typeof r=="string"?[{},r]:[r,m],s=t.key||H([n,a(t.baseURL),typeof u=="string"?u:"",a(t.params||t.query)]);if(!s||typeof s!="string")throw new TypeError("[nuxt] [useFetch] key must be a string: "+s);if(!u)throw new Error("[nuxt] [useFetch] request is missing.");const c=s===n?"$f"+s:s,i=h(()=>{let _=u;return typeof _=="function"&&(_=_()),a(_)});if(!t.baseURL&&typeof i.value=="string"&&i.value.startsWith("//"))throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const{server:v,lazy:k,default:w,transform:e,pick:o,watch:y,immediate:C,...F}=t,x=S({...F,cache:typeof t.cache=="boolean"?void 0:t.cache}),$={server:v,lazy:k,default:w,transform:e,pick:o,immediate:C,watch:y===!1?[]:[x,i,...y||[]]};let f;return j(c,()=>(f?.abort?.(),f=typeof AbortController<"u"?new AbortController:{},typeof i.value=="string"&&i.value.startsWith("/"),(t.$fetch||globalThis.$fetch)(i.value,{signal:f.signal,...x})),$)}const Q=b("div",{"x-divider":""},null,-1),Y={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Z={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},tt=b("span",{op75:""},"Select a file to start",-1),ct=z({__name:"virtual-files",async setup(u){let r,m;const t=R(""),{data:n}=([r,m]=A(()=>M("/_vfs.json",{key:"vfs-list",baseURL:"/",responseType:"json"},"$3wSzD6RdXF")),r=await r,m(),r),s=h(()=>T().query?.id),c=R();W(()=>{if(!s.value)return;const e=`/_vfs.json/${encodeURIComponent(s.value)}`;fetch(e).then(o=>o.json()).then(o=>c.value=o.current)});function i(e){if(n.value?.rootDir)return e.startsWith(n.value?.rootDir)?e.slice(n.value.rootDir.length):e}const v=h(()=>n.value?n.value.entries.filter(e=>!e.id.startsWith(`${n.value?.rootDir||""}/.nuxt/`)).sort((e,o)=>e.id.localeCompare(o.id)):[]),k=h(()=>new B(v.value,{keys:["id","path"]})),w=h(()=>t.value?k.value.search(t.value).map(e=>e.item):v.value);return(e,o)=>{const y=E,C=q,F=J,x=G,$=K,f=X;return p(),N(f,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:d(()=>[g(y,{search:a(t),"onUpdate:search":o[0]||(o[0]=l=>I(t)?t.value=l:null),"no-padding":"",p3:""},null,8,["search"]),(p(!0),D(L,null,O(a(w),l=>(p(),D(L,{key:l.id},[g(C,{block:"","select-none":"",truncate:"",px2:"",py1:"","font-mono":"","text-sm":"",to:`/modules/virtual-files?id=${encodeURIComponent(l.id)}`,class:V(l.id===a(c)?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover")},{default:d(()=>[P(U(i(l.id)),1)]),_:2},1032,["to","class"]),Q],64))),128))]),right:d(()=>[a(c)?.content?(p(),D("div",Y,[b("div",Z,[b("code",null,U(a(c).id),1)]),g(F,{"h-full":"","of-auto":"","text-sm":"",code:a(c).content,lang:"typescript"},null,8,["code"])])):(p(),N($,{key:1},{default:d(()=>[g(x,{px6:"",py2:""},{default:d(()=>[tt]),_:1})]),_:1}))]),_:1})}}});export{ct as default};
|