@nuxt/devtools 1.0.3 → 1.0.5
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/README.md +5 -7
- package/dist/chunks/module-main.mjs +97 -84
- package/dist/chunks/plugin-metrics.mjs +1 -1
- package/dist/chunks/vscode.mjs +2 -2
- package/dist/chunks/vue-inspector.mjs +1 -1
- package/dist/client/200.html +21 -21
- package/dist/client/404.html +21 -21
- package/dist/client/_nuxt/{CodeDiff.vue.0700b533.js → CodeDiff.vue.470b870b.js} +2 -2
- package/dist/client/_nuxt/{ComposableItem.vue.869f4305.js → ComposableItem.vue.4be0b467.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.72b202db.js → DataSchemaButton.vue.7acec8bd.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.3aeebd14.js → DataSchemaDrawer.6f0305ae.js} +2 -2
- package/dist/client/_nuxt/{DurationDisplay.vue.37c54f2c.js → DurationDisplay.vue.d5eecd01.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.ca308ea2.js → FilepathItem.vue.0f604f99.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.6bf23ece.js → HelpFab.vue.308adf61.js} +1 -1
- package/dist/client/_nuxt/{LaunchPage.vue.c8e4a567.js → LaunchPage.vue.ffcbcacd.js} +1 -1
- package/dist/client/_nuxt/NBadge.1af19adc.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.c0c515c4.js +1 -0
- package/dist/client/_nuxt/NCodeBlock.a117b19b.css +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.c80c8282.js → NCodeBlock.vue.55894991.js} +2 -2
- package/dist/client/_nuxt/{NDrawer.vue.e2617b9c.js → NDrawer.vue.99f5580b.js} +1 -1
- package/dist/client/_nuxt/NDropdown.vue.82a0f7a6.js +1 -0
- package/dist/client/_nuxt/{NIconTitle.vue.83cd82be.js → NIconTitle.vue.a9777fd3.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.92e49c8b.js → NLink.vue.090d2b6e.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.07fe8875.js → NMarkdown.vue.4a9638b7.js} +1 -1
- package/dist/client/_nuxt/{NNavbar.vue.823096f1.js → NNavbar.vue.329d273e.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.3af235cd.css +1 -0
- package/dist/client/_nuxt/NSectionBlock.bc36f09f.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.73b358c9.js +1 -0
- package/dist/client/_nuxt/NSelectTabs.vue.c879b497.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.8e26c951.js +1 -0
- package/dist/client/_nuxt/StacktraceList.vue.8012c829.js +1 -0
- package/dist/client/_nuxt/StateEditor.vue.de9e5fb0.js +1 -0
- package/dist/client/_nuxt/{__blank.aff34a18.js → __blank.b424e04d.js} +1 -1
- package/dist/client/_nuxt/analyze-build.0a92832b.js +1 -0
- package/dist/client/_nuxt/assets.b1bb5a8b.js +16 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/136dbdb0-d4da-4a06-b141-83ca2e534bfd.json +1 -0
- package/dist/client/_nuxt/{client.b8ca1554.js → client.5139b740.js} +1 -1
- package/dist/client/_nuxt/{components.f8fde87c.js → components.ec2bc2e0.js} +27 -27
- package/dist/client/_nuxt/{custom-_name_.779ca3e5.js → custom-_name_.22b5de51.js} +1 -1
- package/dist/client/_nuxt/{default.50175b13.js → default.a830102b.js} +1 -1
- package/dist/client/_nuxt/entry.56a3d1dd.css +1 -0
- package/dist/client/_nuxt/entry.7025a867.js +27 -0
- package/dist/client/_nuxt/{error-404.0dae1ccf.js → error-404.08d4b3ab.js} +1 -1
- package/dist/client/_nuxt/{error-500.0a479375.js → error-500.2884d8fb.js} +1 -1
- package/dist/client/_nuxt/error.480298a9.js +9 -0
- package/dist/client/_nuxt/full.7cf1e42e.js +1 -0
- package/dist/client/_nuxt/{hooks.08bf14b9.js → hooks.09b6efe0.js} +1 -1
- package/dist/client/_nuxt/{imports.10f1634a.js → imports.9dbeba31.js} +1 -1
- package/dist/client/_nuxt/{index.b567c37e.js → index.3ee0584e.js} +1 -1
- package/dist/client/_nuxt/{index.06e4cc9c.js → index.cc851671.js} +1 -1
- package/dist/client/_nuxt/json-editor-vue.e51c968b.js +99 -0
- package/dist/client/_nuxt/modules.451e38d7.js +2 -0
- package/dist/client/_nuxt/{none.7a39bbba.js → none.67be85f3.js} +1 -1
- package/dist/client/_nuxt/{open-graph.484b1a77.css → open-graph.058fa32c.css} +1 -1
- package/dist/client/_nuxt/{open-graph.7c382b87.js → open-graph.9eed2b01.js} +2 -2
- package/dist/client/_nuxt/overview.d4940d4b.js +1 -0
- package/dist/client/_nuxt/{pages.e4e22a03.js → pages.e7892d8a.js} +1 -1
- package/dist/client/_nuxt/{payload.d7e93a46.js → payload.734d0b5c.js} +1 -1
- package/dist/client/_nuxt/{plugins.b2f10668.js → plugins.4ae6abad.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.9fe5125f.js → runtime-configs.be989942.js} +1 -1
- package/dist/client/_nuxt/server-routes.e1a8e445.js +9 -0
- package/dist/client/_nuxt/{settings.78f334a8.js → settings.a91f8ddb.js} +1 -1
- package/dist/client/_nuxt/state-components.558caa8f.js +1 -0
- package/dist/client/_nuxt/state-modules.59c565a3.js +1 -0
- package/dist/client/_nuxt/{storage-options.2b389201.js → storage-options.1c93b6a2.js} +1 -1
- package/dist/client/_nuxt/{storage.44a95fac.js → storage.d115f7c4.js} +1 -1
- package/dist/client/_nuxt/{terminals.539d48eb.js → terminals.8201c148.js} +1 -1
- package/dist/client/_nuxt/timeline.58bc6682.css +1 -0
- package/dist/client/_nuxt/timeline.ca0d67c3.js +30 -0
- package/dist/client/_nuxt/unocss-runtime.43e5d503.js +2 -0
- package/dist/client/_nuxt/vanilla-picker-NKbIFE8h.23409a58.js +8 -0
- package/dist/client/_nuxt/virtual-files.19e5fb95.js +1 -0
- package/dist/client/_nuxt/vue-html.ded4875c.js +1 -0
- package/dist/client/_nuxt/vue.421a3560.js +5603 -0
- package/dist/client/index.html +21 -21
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/auth/index.html +65 -50
- package/dist/runtime/plugins/devtools.client.mjs +2 -2
- package/dist/runtime/plugins/view/FrameBox.vue +2 -2
- package/dist/runtime/plugins/view/Main.vue +9 -2
- package/dist/runtime/plugins/view/client.mjs +2 -0
- package/dist/shared/{devtools.6f6e0f47.mjs → devtools.371fa152.mjs} +2 -2
- package/package.json +33 -33
- package/dist/client/_nuxt/NBadge.0b42c7f8.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.6b5ce38f.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.6994516c.css +0 -1
- package/dist/client/_nuxt/NDropdown.vue.ff9a8df2.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.0d0061ef.css +0 -1
- package/dist/client/_nuxt/NSectionBlock.c3646235.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.c8c511ae.js +0 -1
- package/dist/client/_nuxt/NSelectTabs.vue.ec21a846.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.1cea2bc6.js +0 -1
- package/dist/client/_nuxt/NTip.vue.ca2f8e8a.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.2abb9bb3.js +0 -1
- package/dist/client/_nuxt/analyze-build.76d0de73.js +0 -1
- package/dist/client/_nuxt/assets.2cb4325d.js +0 -16
- package/dist/client/_nuxt/builds/meta/c6495541-4f21-430a-9b71-cda3f41cbf03.json +0 -1
- package/dist/client/_nuxt/entry.9a5af3dc.js +0 -27
- package/dist/client/_nuxt/entry.aa8c94e8.css +0 -1
- package/dist/client/_nuxt/full.f21cfe4d.js +0 -1
- package/dist/client/_nuxt/json-editor-vue.c3cbb111.js +0 -129
- package/dist/client/_nuxt/modules.63cf2a03.js +0 -2
- package/dist/client/_nuxt/overview.ea00b3f6.js +0 -1
- package/dist/client/_nuxt/server-routes.95c3caa5.js +0 -9
- package/dist/client/_nuxt/state-components.d81178a3.js +0 -1
- package/dist/client/_nuxt/state-modules.b9e84f85.js +0 -1
- package/dist/client/_nuxt/timeline.1ad3a70f.css +0 -1
- package/dist/client/_nuxt/timeline.5deddf7e.js +0 -29
- package/dist/client/_nuxt/unocss-runtime.dfaa24d0.js +0 -2
- package/dist/client/_nuxt/virtual-files.46ad04c9.js +0 -1
- package/dist/client/_nuxt/vue-html.88dda4a8.js +0 -1
- package/dist/client/_nuxt/vue.7ad3b25a.js +0 -1844
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as Ce}from"./FilepathItem.vue.ca308ea2.js";import{d as U,a as B,aa as _e,o as u,h as T,j as g,k as s,a9 as E,f as c,v as z,t as C,m as w,G as F,p as S,i as _,F as L,n as H,x as ie,a5 as ve,an as ge,R as ye,aL as Te,L as ce,M as de,V as Oe,aM as be,aN as xe,_ as X,y as Ne,z as Ve,ax as $e,aO as Ae,aP as Pe,aQ as Be,ao as Le,a1 as je,I as Re,au as ue,as as Ee,aR as De,a8 as He,r as K,ag as Fe,l as Ue,ab as qe,Y as We,S as Ke,aS as me}from"./entry.9a5af3dc.js";import{_ as Ye,u as we,a as Ge}from"./state-modules.b9e84f85.js";import{_ as Xe}from"./NSectionBlock.c3646235.js";import{_ as Qe}from"./NIconTitle.vue.83cd82be.js";import{_ as ke}from"./NDropdown.vue.ff9a8df2.js";import{_ as Je}from"./NNavbar.vue.823096f1.js";import{_ as Ze}from"./NBadge.0b42c7f8.js";import{_ as et}from"./NCodeBlock.vue.c80c8282.js";import{_ as tt}from"./NLink.vue.92e49c8b.js";import{_ as nt}from"./CodeDiff.vue.0700b533.js";import{_ as it}from"./NTip.vue.ca2f8e8a.js";import{_ as ot}from"./HelpFab.vue.6bf23ece.js";import"./NCheckbox.vue.6b5ce38f.js";import"./client.b8ca1554.js";const st={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},rt={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},lt={key:2},at=s("div",{"flex-auto":""},null,-1),ct={key:1,flex:"~ gap-2",title:"Documentation"},dt=s("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),ut={key:2,flex:"~ gap-2"},mt=s("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),ft={key:0,flex:"~ gap-4 items-center"},pt={flex:"~ gap-1 items-center",op50:""},ht={flex:"~ gap-1 items-center",op50:""},_t={flex:"~ col","items-end":""},vt={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},gt=["src","alt"],yt=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),bt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},xt=["src"],$t=s("div",{"flex-auto":""},null,-1),wt={flex:"","justify-end":""},kt="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",It="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",St="https://github.com/",zt="https://www.npmjs.com/package/",oe=U({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(e){const t=e,n=B(()=>({...t.mod?.meta,...t.mod,...t.info})),o=_e();return(i,r)=>{const l=ie,d=ve,a=ge;return u(),T(a,{p4:"",flex:"~ gap2"},{default:g(()=>[s("div",st,[E(i.$slots,"main",{},()=>[s("div",rt,[i.mod.isPackageModule?(u(),T(l,{key:0,to:zt+(c(n).npm||c(n).name),target:"_blank",hover:"underline text-primary"},{default:g(()=>[z(C(c(n).name),1)]),_:1},8,["to"])):i.mod.entryPath?(u(),w("button",{key:1,role:"button",hover:"underline text-primary",onClick:r[0]||(r[0]=m=>c(o)(i.mod.entryPath))},C(c(n).name),1)):(u(),w("span",lt,C(c(n).name),1)),E(i.$slots,"badge")]),c(n).description?(u(),w("div",{key:0,class:F(i.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},C(c(n).description),3)):S("",!0),at,c(n).website?(u(),w("div",ct,[dt,_(l,{to:c(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:g(()=>[z(C(c(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):S("",!0),c(n).github?(u(),w("div",ut,[mt,_(l,{to:c(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:g(()=>[z(C(c(n).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):S("",!0)]),E(i.$slots,"items"),c(n).stats?(u(),w("div",ft,[s("div",pt,[_(d,{icon:"carbon-star","text-lg":""}),s("span",null,C(c(n).stats.stars),1)]),s("div",ht,[_(d,{icon:"carbon-download","text-lg":""}),s("span",null,C(c(n).stats.downloads),1)])])):S("",!0)]),s("div",_t,[c(n).icon||i.mod.isPackageModule?(u(),w("div",vt,[c(n).icon?(u(),w("img",{key:0,src:kt+c(n).icon,alt:i.mod.name,ma:""},null,8,gt)):S("",!0),yt])):S("",!0),c(n).maintainers?.length&&i.maintainers?(u(),w("div",bt,[(u(!0),w(L,null,H(c(n).maintainers,m=>(u(),T(l,{key:m.name,target:"_blank",to:St+m.github,title:m.name},{default:g(()=>[s("img",{src:It+m.github,"h-6":"","w-6":"","rounded-full":""},null,8,xt)]),_:2},1032,["to","title"]))),128))])):S("",!0),i.$slots.actions?(u(),w(L,{key:2},[$t,s("div",wt,[E(i.$slots,"actions")])],64)):S("",!0)])]),_:3})}}}),Mt={key:0,flex:"~ gap-2",title:"Open on filesystem"},Ct=s("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Tt=s("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Ot=s("code",{"text-sm":"",op50:""},"Upgrading...",-1),Nt={key:1,"mx--2":""},Vt=["onClick"],At=s("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Pt=s("code",{"text-xs":""},"Update installed, click to restart",-1),Bt=[At,Pt],Lt={key:2,"mx--2":""},jt=["onClick"],Rt=s("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Et={op50:""},Dt=s("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Ht={"text-green":""},Ft={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ut=s("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),qt={"text-sm":"",op50:""},Wt=U({__name:"ModuleItem",props:{mod:{}},setup(e){const t=e,n=B(()=>t.mod.info),o=B(()=>({...t.mod?.meta,...t.mod,...n.value})),i=ye();return(r,l)=>{const d=Ce,a=ie,m=Ye,h=oe;return u(),T(h,{mod:r.mod,info:c(n)},{items:g(()=>[r.mod.entryPath?(u(),w("div",Mt,[Ct,_(d,{filepath:r.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):S("",!0),c(o).npm?(u(),T(m,{key:c(o).npm,"package-name":c(o).npm,options:{dev:!0}},{default:g(({info:v,update:b,state:p,id:I,restart:$})=>[p==="running"?(u(),T(a,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:I?"/modules/terminals":void 0,onClick:x=>I?i.value=I:void 0},{default:g(()=>[Tt,Ot]),_:2},1032,["to","onClick"])):p==="updated"?(u(),w("div",Nt,[s("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:$},Bt,8,Vt)])):v?.needsUpdate?(u(),w("div",Lt,[s("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:x=>b()},[Rt,s("code",Et,"v"+C(v.current),1),Dt,s("code",Ht,"v"+C(v.latest),1)],8,jt)])):v?.latest?(u(),w("div",Ft,[Ut,s("code",qt,"v"+C(v.current),1)])):S("",!0)]),_:1},8,["package-name"])):S("",!0)]),_:1},8,["mod","info"])}}}),Kt=U({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(e,{emit:t}){const n=e,o=t,i=we(),r=B(()=>i.value.find(h=>h.name===n.item.npm)),l=B(()=>r.value&&r.value.isPackageModule),d=B(()=>r.value&&r.value.isPackageModule&&r.value.isUninstallable);async function a(h,v){const b=v==="install"?ce.installNuxtModule:ce.uninstallNuxtModule,p=await b(await de(),h.npm,!0);Oe(`modules:${v}`,{moduleName:h.npm}),p.commands&&await be.start(h,p,v)&&(xe.value.push({name:h.npm,info:h,processId:p.processId}),o("start"),await b(await de(),h.npm,!1))}const m={};return(h,v)=>{const b=Ze,p=X,I=ke,$=oe;return u(),T($,{mod:m,role:c(l)?"":"button",info:h.item,mb2:"","h-full":"",class:F(c(l)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:v[1]||(v[1]=x=>c(l)?null:a(h.item,"install"))},Te({_:2},[c(l)?{name:"badge",fn:g(()=>[_(b,{n:"green",textContent:"Installed"}),c(d)?(u(),T(I,{key:0,n:"sm green"},{trigger:g(({click:x})=>[_(p,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:k=>x()},null,8,["onClick"])]),default:g(()=>[_(p,{icon:"carbon-trash-can",n:"red",onClick:v[0]||(v[0]=x=>a(h.item,"uninstall"))},{default:g(()=>[z(" Uninstall ")]),_:1})]),_:1})):S("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Yt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Y;function Z(){Z.init||(Z.init=!0,Y=Yt()!==-1)}var Q={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Z(),$e(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Y&&this.$el.appendChild(e),e.data="about:blank",Y||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Y&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Gt=Ae();Ne("data-v-b329ee4c");const Xt={class:"resize-observer",tabindex:"-1"};Ve();const Qt=Gt((e,t,n,o,i,r)=>(u(),T("div",Xt)));Q.render=Qt;Q.__scopeId="data-v-b329ee4c";Q.__file="src/components/ResizeObserver.vue";function G(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?G=function(t){return typeof t}:G=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function Jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Zt(e,t,n){return t&&fe(e.prototype,t),n&&fe(e,n),e}function pe(e){return en(e)||tn(e)||nn(e)||on()}function en(e){if(Array.isArray(e))return ee(e)}function tn(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function nn(e,t){if(e){if(typeof e=="string")return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(e,t)}}function ee(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function on(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sn(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function rn(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,r,l=function(a){for(var m=arguments.length,h=new Array(m>1?m-1:0),v=1;v<m;v++)h[v-1]=arguments[v];if(r=h,!(o&&a===i)){var b=n.leading;typeof b=="function"&&(b=b(a,i)),(!o||a!==i)&&b&&e.apply(void 0,[a].concat(pe(r))),i=a,clearTimeout(o),o=setTimeout(function(){e.apply(void 0,[a].concat(pe(r))),o=0},t)}};return l._clear=function(){clearTimeout(o),o=null},l}function Ie(e,t){if(e===t)return!0;if(G(e)==="object"){for(var n in e)if(!Ie(e[n],t[n]))return!1;return!0}return!1}var ln=function(){function e(t,n,o){Jt(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return Zt(e,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=sn(n),this.callback=function(d,a){i.options.callback(d,a),d&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var r=this.options.throttleOptions||{},l=r.leading;this.callback=rn(this.callback,this.options.throttle,{leading:function(a){return l==="both"||l==="visible"&&a||l==="hidden"&&!a}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(d){var a=d[0];if(d.length>1){var m=d.find(function(v){return v.isIntersecting});m&&(a=m)}if(i.callback){var h=a.isIntersecting&&a.intersectionRatio>=i.threshold;if(h===i.oldResult)return;i.oldResult=h,i.callback(h,a)}},this.options.intersection),$e(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function Se(e,t,n){var o=t.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new ln(e,o,n);e._vue_visibilityState=i}}function an(e,t,n){var o=t.value,i=t.oldValue;if(!Ie(o,i)){var r=e._vue_visibilityState;if(!o){ze(e);return}r?r.createObserver(o,n):Se(e,{value:o},n)}}function ze(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var cn={beforeMount:Se,updated:an,unmounted:ze},dn={itemsLimit:1e3},un=/(auto|scroll)/;function Me(e,t){return e.parentNode===null?t:Me(e.parentNode,t.concat([e]))}var J=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},mn=function(t){return J(t,"overflow")+J(t,"overflow-y")+J(t,"overflow-x")},fn=function(t){return un.test(mn(t))};function he(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=Me(e.parentNode,[]),n=0;n<t.length;n+=1)if(fn(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function te(e){"@babel/helpers - typeof";return te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te(e)}var pn={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function hn(){return this.items.length&&te(this.items[0])!=="object"}var ne=!1;if(typeof window<"u"){ne=!1;try{var _n=Object.defineProperty({},"passive",{get:function(){ne=!0}});window.addEventListener("test",null,_n)}catch{}}let vn=0;var se={name:"RecycleScroller",components:{ResizeObserver:Q},directives:{ObserveVisibility:cn},props:{...pn,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,r=0,l;for(let d=0,a=t.length;d<a;d++)l=t[d][n]||o,l<i&&(i=l),r+=l,e[d]={accumulator:r,size:l};return this.$_computedMinItemSize=i,e}return[]},simpleArray:hn,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let o=0,i=t.length;o<i;o++)n[t[o][e]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,o,i){const r=Pe({id:vn++,index:t,used:!0,key:o,type:i}),l=Be({item:n,position:0,nr:r});return e.push(l),l},unuseView(e,t=!1){const n=this.$_unusedViews,o=e.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,r=this.$_computedMinItemSize,l=this.typeField,d=this.simpleArray?null:this.keyField,a=this.items,m=a.length,h=this.sizes,v=this.$_views,b=this.$_unusedViews,p=this.pool,I=this.itemIndexByKey;let $,x,k,N,V;if(!m)$=x=N=V=k=0;else if(this.$_prerender)$=N=0,x=V=Math.min(this.prerender,a.length),k=null;else{const y=this.getScroll();if(t){let O=y.start-this.$_lastUpdateScrollPosition;if(O<0&&(O=-O),n===null&&O<r||O<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=y.start;const A=this.buffer;y.start-=A,y.end+=A;let M=0;if(this.$refs.before&&(M=this.$refs.before.scrollHeight,y.start-=M),this.$refs.after){const O=this.$refs.after.scrollHeight;y.end+=O}if(n===null){let O,q=0,le=m-1,P=~~(m/2),ae;do ae=P,O=h[P].accumulator,O<y.start?q=P:P<m-1&&h[P+1].accumulator>y.start&&(le=P),P=~~((q+le)/2);while(P!==ae);for(P<0&&(P=0),$=P,k=h[m-1].accumulator,x=P;x<m&&h[x].accumulator<y.end;x++);for(x===-1?x=a.length-1:(x++,x>m&&(x=m)),N=$;N<m&&M+h[N].accumulator<y.start;N++);for(V=N;V<m&&M+h[V].accumulator<y.end;V++);}else{$=~~(y.start/n*o);const O=$%o;$-=O,x=Math.ceil(y.end/n*o),N=Math.max(0,Math.floor((y.start-M)/n*o)),V=Math.floor((y.end-M)/n*o),$<0&&($=0),x>m&&(x=m),N<0&&(N=0),V>m&&(V=m),k=Math.ceil(m/o)*n}}x-$>dn.itemsLimit&&this.itemsLimitError(),this.totalSize=k;let f;const j=$<=this.$_endIndex&&x>=this.$_startIndex;if(j)for(let y=0,A=p.length;y<A;y++)f=p[y],f.nr.used&&(e&&(f.nr.index=I[f.item[d]]),(f.nr.index==null||f.nr.index<$||f.nr.index>=x)&&this.unuseView(f));const re=j?null:new Map;let D,R,W;for(let y=$;y<x;y++){D=a[y];const A=d?D[d]:D;if(A==null)throw new Error(`Key is ${A} on item (keyField is '${d}')`);if(f=v.get(A),!n&&!h[y].size){f&&this.unuseView(f);continue}R=D[l];let M=b.get(R),O=!1;if(!f)j?M&&M.length?f=M.pop():f=this.addView(p,y,D,A,R):(W=re.get(R)||0,(!M||W>=M.length)&&(f=this.addView(p,y,D,A,R),this.unuseView(f,!0),M=b.get(R)),f=M[W],re.set(R,W+1)),v.delete(f.nr.key),f.nr.used=!0,f.nr.index=y,f.nr.key=A,f.nr.type=R,v.set(A,f),O=!0;else if(!f.nr.used&&(f.nr.used=!0,O=!0,M)){const q=M.indexOf(f);q!==-1&&M.splice(q,1)}f.item=D,O&&(y===a.length-1&&this.$emit("scroll-end"),y===0&&this.$emit("scroll-start")),n===null?(f.position=h[y-1].accumulator,f.offset=0):(f.position=Math.floor(y/o)*n,f.offset=y%o*i)}return this.$_startIndex=$,this.$_endIndex=x,this.emitUpdate&&this.$emit("update",$,x,N,V),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:j}},getListenerTarget(){let e=he(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let o;if(this.pageMode){const i=e.getBoundingClientRect(),r=n?i.height:i.width;let l=-(n?i.top:i.left),d=n?window.innerHeight:window.innerWidth;l<0&&(d+=l,l=0),l+d>r&&(d=r-l),o={start:l,end:l+d}}else n?o={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:o={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,ne?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const r=he(this.$el),l=r.tagName==="HTML"?0:r[t.scroll],d=r.getBoundingClientRect(),m=this.$el.getBoundingClientRect()[t.start]-d[t.start];n=r,o=t.scroll,i=e+l+m}else n=this.$el,o=t.scroll,i=e;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const gn={key:0,ref:"before",class:"vue-recycle-scroller__slot"},yn={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function bn(e,t,n,o,i,r){const l=Le("ResizeObserver"),d=je("observe-visibility");return Re((u(),w("div",{class:F(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...a)=>r.handleScroll&&r.handleScroll(...a))},[e.$slots.before?(u(),w("div",gn,[E(e.$slots,"before")],512)):S("v-if",!0),(u(),T(ue(n.listTag),{ref:"wrapper",style:He({[e.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:F(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:g(()=>[(u(!0),w(L,null,H(i.pool,a=>(u(),T(ue(n.itemTag),Ee({key:a.nr.id,style:i.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${a.position}px) translate${e.direction==="vertical"?"X":"Y"}(${a.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===a.nr.key}]]},De(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=a.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:g(()=>[E(e.$slots,"default",{item:a.item,index:a.nr.index,active:a.nr.used})]),_:2},1040,["style","class"]))),128)),E(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(u(),w("div",yn,[E(e.$slots,"after")],512)):S("v-if",!0),_(l,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[d,r.handleVisibilityChange]])}se.render=bn;se.__file="src/components/RecycleScroller.vue";const xn={"h-full":"",flex:"~ col gap-4"},$n={flex:"~ items-center"},wn={flex:"~ col","w-30":"","of-auto":""},kn={flex:"~ justify-between","w-full":"","text-xs":"",capitalize:"",op75:""},In={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},Sn=U({__name:"ModuleInstallList",emits:["close"],setup(e,{emit:t}){const n=t,o=Ge(),i=["downloads","stars","updated","created"],r=K(!1),l=K(i[0]),d={downloads:(b,p)=>b.stats.downloads-p.stats.downloads,stars:(b,p)=>b.stats.stars-p.stats.stars,created:(b,p)=>b.stats.createdAt-p.stats.createdAt,updated:(b,p)=>b.stats.publishedAt-p.stats.publishedAt},a=B(()=>o.value?.slice().sort((b,p)=>d[l.value](b,p)*(r.value?1:-1))),m=K(""),h=B(()=>new Fe(a.value||[],{keys:["name","description","npm","category"]})),v=B(()=>m.value?h.value.search(m.value).map(b=>b.item):a.value);return(b,p)=>{const I=Qe,$=X,x=ve,k=ke,N=Je,V=Kt;return u(),w("div",xn,[_(I,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),_(N,{search:c(m),"onUpdate:search":p[1]||(p[1]=f=>Ue(m)?m.value=f:null),"no-padding":"","px-6":"","pb-5":"","pt-2":""},{actions:g(()=>[_(k,{direction:"end",n:"sm primary"},{trigger:g(({click:f})=>[s("div",$n,[_($,{icon:c(r)?"tabler:sort-ascending":"tabler:sort-descending","h-full":"","rounded-r-none":"",onClick:p[0]||(p[0]=j=>r.value=!c(r))},null,8,["icon"]),_($,{flex:"~ justify-between","min-w-30":"","border-l-0":"","rounded-l-none":"","px-2":"",capitalize:"",hover:"border-l-1",onClick:j=>f()},{default:g(()=>[z(C(c(l))+" ",1),_(x,{icon:"carbon:chevron-down"})]),_:2},1032,["onClick"])])]),default:g(()=>[s("div",wn,[(u(),w(L,null,H(i,f=>_($,{key:f,border:!1,p2:"",hover:"n-checkbox-hover text-green",onClick:j=>l.value=f},{default:g(()=>[s("span",kn,[z(C(f)+" ",1),c(l)===f?(u(),T(x,{key:0,icon:"carbon:checkmark"})):S("",!0)])]),_:2},1032,["onClick"])),64))])]),_:1})]),_:1},8,["search"]),s("div",In,[_(c(se),{class:"scroller",items:c(v),"item-size":200,"key-field":"name"},{default:g(({item:f})=>[_(V,{item:f,onStart:p[2]||(p[2]=j=>n("close"))},null,8,["item"])]),_:1},8,["items"])])])}}}),zn={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Mn={capitalize:""},Cn=s("p",{op50:""}," Following command will be executed in your terminal: ",-1),Tn={op50:""},On=s("p",null,[s("span",{op50:""},"After that, Nuxt will "),s("span",{"text-orange":""},"restart automatically"),z(". ")],-1),Nn={flex:"~ gap-3",mt2:"","justify-end":""},Vn=U({__name:"ModuleActionDialog",setup(e){const t=qe(),n=_e(),o={};return(i,r)=>{const l=oe,d=et,a=tt,m=nt,h=it,v=X,b=We;return u(),T(c(be),null,{default:g(({resolve:p,args:I})=>[_(b,{"model-value":!0,onClose:$=>p(!1)},{default:g(()=>[_(l,{mod:o,info:I[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),s("div",zn,[s("h2",{"text-xl":"",class:F(I[2]==="install"?"text-primary":"text-red")},[s("span",Mn,C(I[2]),1),z(),s("code",null,C(I[0].name),1),z("? ")],2),Cn,_(d,{code:I[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s("p",Tn,[z(" Then your "),_(a,{role:"button",n:"primary",underline:"",onClick:r[0]||(r[0]=$=>c(n)(c(t)?._nuxtConfigFile)),textContent:"Nuxt config"}),z(" will be updated as: ")]),_(m,{from:I[1].configOriginal,to:I[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),On,s("div",Nn,[_(h,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:g(()=>[z(" Please make sure to backup your project first. ")]),_:1}),_(v,{onClick:$=>p(!1)},{default:g(()=>[z(" Cancel ")]),_:2},1032,["onClick"]),_(v,{n:"solid",capitalize:"",class:F(I[2]==="install"?"n-primary":"n-red"),onClick:$=>p(!0)},{default:g(()=>[z(C(I[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),An={class:"markdown-body"},Pn=s("h1",null,"Modules",-1),Bn=s("p",null,[z("Nuxt provides a module system to extend the framework core and simplify integrations. You don’t need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using "),s("code",null,"nuxt.config"),z(".")],-1),Ln=s("p",null,[z("You can explore the list of modules on "),s("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),z(" or install them directly inside the DevTools.")],-1),jn=s("p",null,[s("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Rn=[Pn,Bn,Ln,jn],En={__name:"modules",setup(e,{expose:t}){return t({frontmatter:{}}),(o,i)=>(u(),w("div",An,Rn))}},Dn={"h-full":"","w-full":"","of-auto":""},Hn={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},Fn=["src","alt"],Un=s("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),qn={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},Wn=s("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1),Kn={op75:""},Yn=s("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),Gn=s("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1),Xn={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},Qn="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",fi=U({__name:"modules",setup(e){const t=K(!1),n=we(),o=ye(),i=B(()=>n.value.filter(l=>l.isPackageModule)),r=B(()=>n.value.filter(l=>!l.isPackageModule));return Ke(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{t.value=!0}}]),(l,d)=>{const a=Wt,m=ge,h=ie,v=Xe,b=X,p=Sn,I=Vn,$=En,x=ot;return u(),w(L,null,[s("div",Dn,[_(v,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${c(i).length}`},{default:g(()=>[(u(!0),w(L,null,H(c(i),k=>(u(),T(a,{key:k.name,mod:k},null,8,["mod"]))),128)),(u(!0),w(L,null,H("processInstallingModules"in l?l.processInstallingModules:c(xe),k=>(u(),T(h,{key:k.processId,block:"","min-h-30":"",to:"/modules/terminals",onClick:N=>o.value=k.processId},{default:g(()=>[_(m,{border:"1.5 dashed","h-full":"","animate-pulse":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-1 items-center justify-center",role:"button",class:"group"},{default:g(()=>[s("div",Hn,[s("img",{src:Qn+k.info.icon,alt:k.info.name,ma:""},null,8,Fn),Un]),s("div",qn,[Wn,s("span",Kn,"Installing "+C(k.name)+"...",1)])]),_:2},1024)]),_:2},1032,["onClick"]))),128)),_(m,{border:"1.5 dashed","min-h-30":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-2 items-center justify-center",role:"button",class:"group",onClick:d[0]||(d[0]=k=>t.value=!0)},{default:g(()=>[Yn,Gn]),_:1})]),_:1},8,["description"]),c(r).length?(u(),T(v,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${c(r).length}`},{default:g(()=>[(u(!0),w(L,null,H(c(r),k=>(u(),w(L,{key:k.meta?.name||k.entryPath},[k.meta?.name||k.entryPath?(u(),T(a,{key:0,mod:k},null,8,["mod"])):S("",!0)],64))),128))]),_:1},8,["description"])):S("",!0),_(me,{name:"fade-in"},{default:g(()=>[c(t)?(u(),w("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:d[1]||(d[1]=k=>t.value=!1)})):S("",!0)]),_:1}),_(me,{name:"slide-in"},{default:g(()=>[c(t)?(u(),w("div",Xn,[_(b,{icon:"carbon-close",pos:"absolute top-3 right-3 z-10","rounded-full":"","text-xl":"",border:!1,onClick:d[2]||(d[2]=k=>t.value=!1)}),_(p,{onClose:d[3]||(d[3]=k=>t.value=!1)})])):S("",!0)]),_:1}),_(I)]),_(x,null,{default:g(()=>[_($)]),_:1})],64)}}});export{fi as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as V,at as L,ab as M,aI as R,b4 as T,b5 as P,P as E,a as w,h as m,j as n,A as O,o as s,f as e,m as c,k as t,i as a,t as r,p as l,F as h,b6 as f,b7 as x,b8 as $,v as i,aD as F,D as W,M as G,E as H,x as K,_ as U}from"./entry.9a5af3dc.js";import{u as q,_ as J}from"./state-modules.b9e84f85.js";import{_ as Q}from"./NTip.vue.ca2f8e8a.js";import{u as X}from"./state-components.d81178a3.js";import"./NBadge.0b42c7f8.js";import"./NCodeBlock.vue.c80c8282.js";import"./client.b8ca1554.js";import"./NCheckbox.vue.6b5ce38f.js";const Y="1.0.3",Z={key:0},tt={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},et=t("div",{"flex-auto":""},null,-1),ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt=t("span",{op40:""}," Nuxt DevTools ",-1),st={op40:""},it={flex:"~ gap2 wrap"},at=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),lt=t("div",{"logos-vue":"","text-3xl":""},null,-1),ut=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),rt=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),dt=t("div",{"carbon-function":"","text-3xl":""},null,-1),ct=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),pt=t("div",{"carbon-plug":"","text-3xl":""},null,-1),_t={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},mt=t("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1),ht={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ft=t("div",{"text-sm":""}," SSR to full load ",-1),xt={"text-right":""},vt=t("div",{"text-sm":""}," Page load ",-1),gt={"text-right":""},bt=t("div",{"text-sm":""}," Navigation ",-1),kt={"text-right":""},yt=t("div",{"text-sm":""}," HMR ",-1),Ct={"text-right":""},wt={flex:"~ col gap2"},Dt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},Bt=t("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[t("div",{"i-carbon-star":""}),i(" Star on GitHub ")],-1),St=t("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[t("div",{"i-carbon-data-enrichment":""}),i(" Ideas & Suggestions ")],-1),zt=t("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[t("div",{"i-carbon-plan":""}),i(" Project Roadmap ")],-1),Nt=t("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[t("div",{"i-carbon-debug":""}),i(" Bug Reports ")],-1),At=t("div",{"i-carbon-settings-adjust":""},null,-1),jt=t("div",{"flex-auto":""},null,-1),It={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},Vt={flex:"~ gap-1","items-center":""},Lt=t("span",null,"+",-1),Mt=t("span",null,"+",-1),Rt=t("div",{"flex-auto":""},null,-1),Tt={flex:"~ gap-1","items-center":""},Pt=t("span",null,"+",-1),Et=t("span",null,"+",-1),Ot=t("span",null,"+",-1),$t=t("span",null,"+",-1),Ft=t("div",{"flex-auto":""},null,-1),Wt=t("div",null,"Toggle DevTools",-1),te=V({__name:"overview",setup(Gt){const v=L(),p=M(),D=X(),g=R(),B=q(),S=T(),b=P(),z=E();function N(){W.value=!0,z.push("/")}const k=w(()=>v.value?.nuxt.vueApp.version),u=w(()=>v.value?.metrics.loading());function A(){G()}return(o,Ht)=>{const j=H,_=K,y=J,C=Q,d=U,I=O;return s(),m(I,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[e(p)?(s(),c("div",tt,[et,t("div",ot,[a(_,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[a(j,{"h-10":""})]),_:1}),t("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:N},[nt,t("code",st,"v"+r(e(Y)),1),a(y,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",it,[a(_,{to:"https://nuxt.com",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[at,a(y,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),e(k)?(s(),m(_,{key:0,to:"https://vuejs.org",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[lt,t("code",null,"v"+r(e(k)),1)]),_:1})):l("",!0),e(p)?(s(),c(h,{key:1},[e(p)&&e(p).pages&&e(v)?(s(),m(_,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[ut,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(S).length,"page")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[rt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(D).length,"component")),1)]),_:1})):l("",!0),e(p)&&e(g)?(s(),m(_,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[dt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(g).imports.length,"import")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[ct,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(B).length,"module")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[pt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(p).plugins.length,"plugin")),1)]),_:1})):l("",!0),e(u)?(s(),c("div",_t,[mt,t("div",ht,[e(u).ssrStart?(s(),c(h,{key:0},[ft,t("div",xt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).ssrStart)),1)],64)):l("",!0),vt,t("div",gt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).appInit)),1),bt,t("div",kt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).pageEnd-e(u).pageStart)),1),e(u).hmrStart?(s(),c(h,{key:1},[yt,t("div",Ct,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).hmrEnd-e(u).hmrStart)),1)],64)):l("",!0)])])):l("",!0)],64)):l("",!0)]),t("div",wt,[("showConnectionWarning"in o?o.showConnectionWarning:e($))?(s(),m(C,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>[i(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):l("",!0),t("button",{title:"Authorize",onClick:A},[("isDevAuthed"in o?o.isDevAuthed:e(F))?l("",!0):(s(),m(C,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>[i(" Access from an untrusted browser, some features are limited. Click to authorize now. ")]),_:1}))])]),t("div",Dt,[Bt,St,zt,Nt,a(_,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>[At,i(" Settings ")]),_:1})]),jt,t("div",It,[t("div",Vt,[e(b)?(s(),c(h,{key:0},[a(d,{n:"xs",class:"px2"},{default:n(()=>[i(" ⌘ Cmd ")]),_:1}),Lt,a(d,{n:"xs",class:"px2"},{default:n(()=>[i(" K ")]),_:1})],64)):(s(),c(h,{key:1},[a(d,{n:"xs",class:"px2"},{default:n(()=>[i(" Ctrl ")]),_:1}),Mt,a(d,{n:"xs",class:"px2"},{default:n(()=>[i(" K ")]),_:1})],64)),Rt,i(" Open Command Palette ")]),t("div",Tt,[e(b)?(s(),c(h,{key:0},[a(d,{n:"xs",class:"px2"},{default:n(()=>[i(" ⇧ Shift ")]),_:1}),Pt,a(d,{n:"xs",class:"px2"},{default:n(()=>[i(" ⌥ Option ")]),_:1}),Et,a(d,{n:"xs",class:"px2"},{default:n(()=>[i(" D ")]),_:1})],64)):(s(),c(h,{key:1},[a(d,{n:"xs",class:"px2"},{default:n(()=>[i(" Shift ")]),_:1}),Ot,a(d,{n:"xs",class:"px2"},{default:n(()=>[i(" Alt ")]),_:1}),$t,a(d,{n:"xs",class:"px2"},{default:n(()=>[i(" D ")]),_:1})],64)),Ft,Wt])])])):(s(),c("div",Z," Loading... "))]),_:1})}}});export{te as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{d as ae,r as A,bl as we,o as t,m as h,k as u,G as L,h as w,f as e,bm as se,t as O,p as N,v as W,a8 as He,a9 as Y,F as D,n as B,a5 as fe,Z as Ge,a as V,w as $e,i as v,j as $,X as Se,_ as me,bn as We,bo as Ve,ax as Je,bp as Ke,bq as Qe,br as Xe,ab as Ze,at as Ye,av as pe,aa as et,ay as tt,e as ot,a1 as Te,l as Z,I as le,as as nt,V as st,A as Re,bs as lt,bt as at,ag as rt,U as it,bu as ut,an as dt}from"./entry.9a5af3dc.js";import{_ as ct}from"./NNavbar.vue.823096f1.js";import{_ as Ue}from"./NBadge.0b42c7f8.js";import{_ as Ne}from"./NSelect.vue.c8c511ae.js";import{_ as pt}from"./NCheckbox.vue.6b5ce38f.js";import{u as De,_ as ft}from"./storage-options.2b389201.js";import{_ as mt}from"./DataSchemaButton.vue.72b202db.js";import{_ as vt}from"./NCodeBlock.vue.c80c8282.js";import{C as xe,S as Ie}from"./constants.2cc6e981.js";import{t as ht}from"./json-editor-vue.c3cbb111.js";import{_ as yt}from"./NSectionBlock.c3646235.js";import{_ as gt}from"./NDrawer.vue.e2617b9c.js";import"./client.b8ca1554.js";import"./NIconTitle.vue.83cd82be.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function _t(s,g){if(typeof s!="string")throw new TypeError("argument str must be a string");const d={},_=(g||{}).decode||xt;let k=0;for(;k<s.length;){const f=s.indexOf("=",k);if(f===-1)break;let b=s.indexOf(";",k);if(b===-1)b=s.length;else if(b<f){k=s.lastIndexOf(";",f-1)+1;continue}const a=s.slice(k,f).trim();if(d[a]===void 0){let c=s.slice(f+1,b).trim();c.codePointAt(0)===34&&(c=c.slice(1,-1)),d[a]=kt(c,_)}k=b+1}return d}function Ce(s,g,d){const n=d||{},_=n.encode||Ct;if(typeof _!="function")throw new TypeError("option encode is invalid");if(!ne.test(s))throw new TypeError("argument name is invalid");const k=_(g);if(k&&!ne.test(k))throw new TypeError("argument val is invalid");let f=s+"="+k;if(n.maxAge!==void 0&&n.maxAge!==null){const b=n.maxAge-0;if(Number.isNaN(b)||!Number.isFinite(b))throw new TypeError("option maxAge is invalid");f+="; Max-Age="+Math.floor(b)}if(n.domain){if(!ne.test(n.domain))throw new TypeError("option domain is invalid");f+="; Domain="+n.domain}if(n.path){if(!ne.test(n.path))throw new TypeError("option path is invalid");f+="; Path="+n.path}if(n.expires){if(!bt(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");f+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(f+="; HttpOnly"),n.secure&&(f+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":f+="; Priority=Low";break;case"medium":f+="; Priority=Medium";break;case"high":f+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"strict":f+="; SameSite=Strict";break;case"none":f+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return f}function bt(s){return Object.prototype.toString.call(s)==="[object Date]"||s instanceof Date}function kt(s,g){try{return g(s)}catch{return s}}function xt(s){return s.includes("%")?decodeURIComponent(s):s}function Ct(s){return encodeURIComponent(s)}const wt=u("div",{"x-divider":""},null,-1),Ee=ae({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(s){const g=A(!0),d=we();return(n,_)=>{const k=fe,f=Ue,b=Ee;return t(),h("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:L([{"bg-active":e(d)===n.item.filepath}]),style:He({paddingLeft:`calc(0.5rem + ${n.index*1.5}em)`}),onClick:_[0]||(_[0]=a=>{g.value=!e(g),d.value=n.item.filepath})},[u("div",{class:L({"w-12":!n.item.routes}),"flex-none":"","text-left":""},[n.item.type==="collection"?(t(),w(k,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(g)?90:0,transition:""},null,8,["transform-rotate"])):(t(),w(f,{key:1,class:L(("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(n.item.method||"*")),textContent:O((n.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:L({"flex items-center":n.item.routes}),"text-sm":"","font-mono":""},[n.item.type==="collection"?(t(),w(k,{key:0,title:`${n.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),W(" "+O(n.item.route),1)],2)],6),wt,e(g)?Y(n.$slots,"default",{key:0},()=>[(t(!0),h(D,null,B(n.item.routes,a=>(t(),w(b,{key:a.filepath,item:a,index:n.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}}),$t={p4:"",flex:"~ col gap-4"},St={key:1,ml2:"",flex:""},Vt=["value"],Tt={key:0,flex:"","gap-4":""},Rt=u("div",{"flex-auto":""},null,-1),je=ae({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(s,{emit:g}){const d=s,_=Ge(d,"modelValue",g,{passive:!0}),k=V(()=>[...d.keys,"active","key","value","type"]),f=V(()=>{const c={};for(const l of k.value)c[l]=d.default[l]||"";return c}),b=["string","number","boolean","file","date","time","datetime-local"];function a(c,l){const I=l.target;if(I.files&&I.files[0]){const M=I.files[0],H=new FileReader;H.readAsDataURL(M),H.onload=()=>{_.value[c].value=H.result}}}return $e(()=>_,c=>{c.value.forEach(l=>{if(l.type==="number"&&typeof l.value!="number"){const I=Number.parseFloat(l.value);l.value=Number.isNaN(I)?0:I}else l.type==="boolean"&&typeof l.value!="boolean"?l.value=!0:l.type==="file"&&typeof l.value!="object"?l.value="":l.type==="date"&&typeof l.value=="string"&&!l.value.match(/^\d{4}-\d{2}-\d{2}$/)?l.value=new Date().toISOString().slice(0,10):l.type==="time"&&typeof l.value=="string"&&!l.value.match(/^\d{2}:\d{2}$/)?l.value=new Date().toISOString().slice(11,16):l.type==="datetime-local"&&typeof l.value=="string"&&!l.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?l.value=new Date().toISOString().slice(0,16):l.type==="string"&&(l.value=l.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(c,l)=>{const I=pt,M=Se,H=Ne,S=fe,C=me;return t(),h("div",$t,[(t(!0),h(D,null,B(e(_),(i,P)=>(t(),h("div",{key:P,flex:"~ gap-2","justify-around":""},[Y(c.$slots,"input",{item:i}),(t(!0),h(D,null,B(e(k),x=>(t(),h(D,{key:x},[i.type!==null&&x==="active"?(t(),w(I,{key:0,modelValue:i[x],"onUpdate:modelValue":y=>i[x]=y,n:"sm primary",disabled:c.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):N("",!0),i.type!==null&&x==="key"?(t(),w(M,{key:1,modelValue:i[x],"onUpdate:modelValue":y=>i[x]=y,placeholder:x,"flex-1":"","font-mono":"",n:"sm primary",disabled:c.disabled,class:L(c.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):x==="value"?(t(),h(D,{key:2},[i.type==="file"?(t(),w(M,{key:0,type:"file",disabled:c.disabled,class:L(c.disabled?"op75":""),onChange:y=>a(P,y)},null,8,["disabled","class","onChange"])):i.type==="boolean"?(t(),h("div",St,[v(I,{modelValue:i.value,"onUpdate:modelValue":y=>i.value=y,placeholder:"Value",n:"green lg",disabled:c.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(t(),w(M,{key:2,modelValue:i.value,"onUpdate:modelValue":y=>i.value=y,type:i.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:c.disabled,class:L(c.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):x==="type"?(t(),w(H,{key:3,modelValue:i.type,"onUpdate:modelValue":y=>i.type=y,n:"sm green",class:L(c.disabled?"op75":""),disabled:c.disabled},{default:$(()=>[(t(),h(D,null,B(b,y=>u("option",{key:y,value:y},O(y),9,Vt)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):N("",!0)],64))),128)),Y(c.$slots,"input-actions",{},()=>[v(C,{n:"red",disabled:c.disabled,class:L(c.disabled?"op0!":""),onClick:x=>e(_).splice(P,1)},{default:$(()=>[v(S,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),c.disabled?N("",!0):(t(),h("div",Tt,[Y(c.$slots,"actions",{params:e(_)},()=>[v(C,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:l[0]||(l[0]=i=>e(_).push({...e(f)}))},{default:$(()=>[W(" Add ")]),_:1}),Rt,e(_).length?(t(),w(C,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:l[1]||(l[1]=i=>_.value=[])},{default:$(()=>[W(" Remove All ")]),_:1})):N("",!0)])])),Y(c.$slots,"default")])}}}),Ut={path:"/",watch:!0,decode:s=>Qe(decodeURIComponent(s)),encode:s=>encodeURIComponent(typeof s=="string"?s:JSON.stringify(s))};function Nt(s,g){const d={...Ut,...g},n=Dt(d)||{};let _;d.maxAge!==void 0?_=d.maxAge*1e3:d.expires&&(_=d.expires.getTime()-Date.now());const k=_!==void 0&&_<=0,f=k?void 0:n[s]??d.default?.(),b=_&&!k?jt(f,_):A(f);{const a=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${s}`),c=()=>{Et(s,b.value,d),a?.postMessage(d.encode(b.value))};let l=!1;We()&&Ve(()=>{l=!0,c(),a?.close()}),a&&(a.onmessage=I=>{l=!0,b.value=d.decode(I.data),Je(()=>{l=!1})}),d.watch?$e(b,()=>{l||c()},{deep:d.watch!=="shallow"}):c()}return b}function Dt(s={}){return _t(document.cookie,s)}function It(s,g,d={}){return g==null?Ce(s,g,{...d,maxAge:-1}):Ce(s,g,d)}function Et(s,g,d={}){document.cookie=It(s,g,d)}function jt(s,g){let d;return Ve(()=>{clearTimeout(d)}),Ke((n,_)=>({get(){return n(),s},set(k){clearTimeout(d),d=setTimeout(()=>{s=void 0,_()},g),s=k,_()}}))}const Ot={"h-full":"","w-full":"",flex:"~ col"},Lt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Pt={flex:"~ gap2 items-center"},qt={relative:"","w-full":""},At={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Bt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Mt=u("div",{"flex-auto":""},null,-1),Ft=u("div",{"text-xs":"",op50:""}," Send from ",-1),zt=u("option",{value:"app"}," App ",-1),Ht=u("option",{value:"devtools"}," DevTools ",-1),Gt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Wt={"text-right":"","font-mono":""},Jt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Kt={flex:"~ gap-4"},Qt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Xt=u("div",{"w-5":"","x-divider":""},null,-1),Zt=u("div",{"flex-none":""}," Default Inputs ",-1),Yt=u("div",{"x-divider":""},null,-1),eo={key:2},to={key:3,border:"b base",relative:"","n-code-block":""},oo={flex:"~ wrap","w-full":""},no=["onClick"],so=u("div",{border:"b base","flex-auto":""},null,-1),lo={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},ao=u("div",null,"Response",-1),ro={key:1,"text-xs":"",op50:""},io=u("div",{"flex-auto":""},null,-1),uo=u("div",{op50:""}," Request finished in ",-1),co={key:0,"flex-auto":"","overflow-auto":""},po={border:"~ base","h-full":"","w-full":"",rounded:""},fo=["data"],mo={key:2,"flex-auto":"","overflow-auto":"",p4:""},vo={border:"~ base",rounded:""},ho=["src"],yo={key:1,controls:"",rounded:""},go=["src"],_o=ae({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(s,{emit:g}){const d=s,n=g,[_,k]=Xe(),f=Ze(),b=Ye(),a=pe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),c=V(()=>a.contentType.includes("application/json")?"json":a.contentType.includes("text/html")?"html":a.contentType.includes("text/css")?"css":a.contentType.includes("text/javascript")?"javascript":a.contentType.includes("image")||a.contentType.includes("video")?"media":a.contentType.includes("text/xml")||a.contentType.includes("application/xml")?"xml":a.contentType.includes("application/pdf")?"pdf":"text"),l=V(()=>{if(c.value==="json")return JSON.stringify(a.data,null,2);if(c.value==="media"||c.value==="pdf"){const o=new Blob([a.data],{type:a.contentType});return URL.createObjectURL(o)}return a.data}),I=A(!1),M=A(!1),H=et(),S=V(()=>d.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),C=V(()=>S.value?.filter(o=>o.startsWith(":")||o.startsWith("**:"))||[]),i=A(d.route.method||"GET"),P=A({}),x=pe({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),y=A({}),{inputDefaults:R,sendFrom:F}=De("serverRoutes"),j=V(()=>b?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=V(()=>ie.includes(i.value.toUpperCase())),q=A(C.value.length?"params":"query"),T=["input","json"],G=A(T[0]),te=V({get:()=>x[q.value],set:o=>{x[q.value]=o}}),ve=V(()=>({...K(R.value.query),...K(x.query)})),he=V(()=>({...K(R.value.headers),...K(x.headers)})),ue=V(()=>ee.value?G.value==="json"?{...K(R.value.body),...y.value}:{...K(R.value.body),...K(x.body)}:void 0),Oe=V(()=>{let o=window?.location.origin;return o.charAt(o.length-1)==="/"&&(o=o.slice(0,-1)),o}),oe=V(()=>{let o=new URLSearchParams(ve.value).toString();o&&(o=`?${o}`);const p=(S.value?.map(E=>(E.startsWith(":")||E.startsWith("**:"))&&P.value[E]||E).join("")||"")+o;let m=f.value?.app.baseURL||"";return(m==="./"||m===".")&&(m=""),m.endsWith("/")&&(m=m.slice(0,-1)),m+p}),ye=V(()=>Oe.value+oe.value);function K(o){const p=Object.fromEntries(o.filter(({active:m,key:E,value:U})=>m&&E&&U!==void 0).map(({key:m,value:E})=>[m,E]));return Object.entries(p).length?p:void 0}async function ge(){M.value=!0,I.value=!0;const o=Date.now(),p=j.value==="app"?b.value.app.$fetch:$fetch;st("server-routes:fetch",{method:i.value,sendFrom:j.value});try{a.data=await p(ye.value,{method:i.value.toUpperCase(),headers:he.value,query:ve.value,body:ue.value,onResponse({response:m}){a.contentType=(m.headers.get("content-type")||"").toString().toLowerCase().trim(),a.statusCode=m.status,a.error=void 0},onResponseError(m){a.error=m.response._data,a.data=m.response._data}})}catch{}I.value=!1,a.fetchTime=Date.now()-o}const _e=V(()=>{const o=[],p=[],m=Object.entries(he.value).filter(([U,z])=>U&&z&&!(U==="Content-Type"&&z==="application/json")).map(([U,z])=>` '${U}': '${z}'`).join(`,
|
|
2
|
-
`);i.value.toUpperCase()!=="GET"&&p.push(`method: '${i.value.toUpperCase()}'`),m&&p.push(`headers: {
|
|
3
|
-
${m}
|
|
4
|
-
}`),ue.value&&p.push(`body: ${JSON.stringify(ue.value,null,2)}`);const E=p.length?`, {
|
|
5
|
-
${p.join(`,
|
|
6
|
-
`).split(`
|
|
7
|
-
`).map(U=>` ${U}`).join(`
|
|
8
|
-
`)}
|
|
9
|
-
}`:"";return o.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${E})`}),o.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${oe.value}'${E})`}),o}),Q=A(Pe()),J=pe({key:"",value:""}),Le=V(()=>{const o=[];return C.value.length&&o.push({name:"Params",slug:"params",length:C.value.length}),o.push({name:"Query",slug:"query",length:x.query.length}),ee.value&&o.push({name:"Body",slug:"body",length:x.body.length}),o.push({name:"Headers",slug:"headers",length:x.headers.length}),o.push({name:"Cookies",slug:"cookies",length:Q.value.length}),o.push({name:"Snippets",slug:"snippet"}),o});function Pe(){return document.cookie.split("; ").map(o=>{const[p,m]=o.split("=");return{key:p,value:m}}).filter(o=>o.key)}function de(o,p){if(!o)return;const m=Q.value.find(U=>U.key===o),E=Nt(o);m!==void 0?p===void 0&&(Q.value=Q.value.filter(U=>U.key!==o)):(Q.value.push({key:o,value:p}),J.key="",J.value=""),E.value=p}tt(()=>{G.value==="json"&&typeof y.value=="string"&&(y.value=JSON.parse(y.value))});const qe=ot();return(o,p)=>{const m=me,E=Ne,U=Se,z=fe,be=je,Ae=ft,Be=Re,Me=lt,ce=Ue,Fe=mt,ze=vt,ke=Te("tooltip");return t(),h("div",Ot,[u("div",Lt,[u("div",Pt,[o.route.method?(t(),w(m,{key:0,class:L(["n-badge-base n-sm",("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(e(i))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:$(()=>[W(O(e(i).toUpperCase()),1)]),_:1},8,["class"])):(t(),w(E,{key:1,modelValue:e(i),"onUpdate:modelValue":p[0]||(p[0]=r=>Z(i)?i.value=r:null),class:L(["n-badge-base n-sm",("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(e(i))])},{default:$(()=>[(t(),h(D,null,B(re,r=>u("option",{key:r,class:L(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(r))},O(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),u("div",qt,[v(U,{"model-value":e(oe),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),u("div",At,[le(v(m,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:p[1]||(p[1]=r=>e(qe)(e(ye),"server-route-url"))},null,512),[[ke,"Copy URL"]]),le(v(m,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:p[2]||(p[2]=r=>e(H)(o.route.filepath))},null,512),[[ke,"Open in Editor"]])])]),v(m,{"h-full":"",n:"primary solid",onClick:ge},{default:$(()=>[v(z,{icon:"carbon:send"})]),_:1})])]),u("div",Bt,[(t(!0),h(D,null,B(e(Le),r=>(t(),w(m,{key:r.slug,class:L(e(q)===r.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:X=>q.value=r.slug},{default:$(()=>[v(z,{icon:("ServerRouteTabIcons"in o?o.ServerRouteTabIcons:e(Ie))[r.slug]},null,8,["icon"]),W(" "+O(r.name)+" "+O(r?.length?`(${r.length})`:"")+" ",1),u("span",null,O(e(R)[r.slug]?.length?`(${e(R)[r.slug].length})`:""),1)]),_:2},1032,["class","onClick"]))),128)),Mt,Ft,v(E,{modelValue:e(j),"onUpdate:modelValue":p[3]||(p[3]=r=>Z(j)?j.value=r:null),class:"n-xs",disabled:!e(b)?.app?.$fetch},{default:$(()=>[zt,Ht]),_:1},8,["modelValue","disabled"])]),e(q)==="params"?(t(),h("div",Gt,[(t(!0),h(D,null,B(e(C),r=>(t(),h(D,{key:r},[u("div",Wt,O(r),1),v(U,{modelValue:e(P)[r],"onUpdate:modelValue":X=>e(P)[r]=X,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):N("",!0),e(q)==="cookies"?(t(),h("div",Jt,[(t(!0),h(D,null,B(e(Q),r=>(t(),h("div",{key:r.key,flex:"~ gap-4 items-center"},[v(U,{placeholder:"Key...","model-value":r.key,disabled:"","op-70":""},null,8,["model-value"]),v(U,{placeholder:"Value...","model-value":r.value,"flex-1":"",n:"primary",onInput:X=>de(r.key,X.target?.value)},null,8,["model-value","onInput"]),v(m,{title:"Delete",n:"red",onClick:X=>de(r.key,void 0)},{default:$(()=>[v(z,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),u("div",Kt,[v(U,{modelValue:e(J).key,"onUpdate:modelValue":p[4]||(p[4]=r=>e(J).key=r),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),v(U,{modelValue:e(J).value,"onUpdate:modelValue":p[5]||(p[5]=r=>e(J).value=r),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),v(m,{title:"Add",n:"primary",onClick:p[6]||(p[6]=r=>de(e(J).key,e(J).value))},{default:$(()=>[v(z,{icon:"i-carbon-save"})]),_:1})])])):N("",!0),v(e(_),null,{default:$(()=>[v(be,{modelValue:e(te),"onUpdate:modelValue":p[9]||(p[9]=r=>Z(te)?te.value=r:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:$(()=>[e(R)[e(q)]?.length?(t(),h(D,{key:0},[u("div",Qt,[Xt,Zt,v(m,{icon:"i-carbon-edit",border:!1,onClick:p[7]||(p[7]=r=>n("open-default-input"))}),Yt]),v(be,{modelValue:e(R)[e(q)],"onUpdate:modelValue":p[8]||(p[8]=r=>e(R)[e(q)]=r),disabled:"",p0:""},null,8,["modelValue"])],64)):N("",!0)]),_:1},8,["modelValue"])]),_:1}),e(q)==="snippet"?(t(),h("div",eo,[e(_e).length?(t(),w(Ae,{key:0,"code-snippets":e(_e)},null,8,["code-snippets"])):N("",!0)])):e(te)?(t(),h("div",to,[e(q)==="body"?(t(),h(D,{key:0},[u("div",oo,[(t(),h(D,null,B(T,r=>u("button",{key:r,px4:"",py2:"",border:"r base",hover:"bg-active",class:L({"border-b":r!==e(G)}),onClick:X=>G.value=r},[u("div",{class:L({op30:r!==e(G)}),"font-mono":""},O(r),3)],10,no)),64)),so]),e(G)==="input"?(t(),w(e(k),{key:0})):e(G)==="json"?(t(),w(e(ht),nt({key:1,modelValue:e(y),"onUpdate:modelValue":p[10]||(p[10]=r=>Z(y)?y.value=r:null),class:[[o.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},o.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):N("",!0)],64)):(t(),w(e(k),{key:1}))])):N("",!0),e(M)?e(I)?(t(),w(Me,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:$(()=>[W(" Fetching... ")]),_:1})):(t(),h(D,{key:6},[u("div",lo,[ao,e(a).error?(t(),w(ce,{key:0,n:"red"},{default:$(()=>[W(" Error ")]),_:1})):N("",!0),v(ce,{n:e(a).error?"orange":"green",textContent:O(e(a).statusCode)},null,8,["n","textContent"]),e(a).contentType?(t(),h("code",ro,O(e(a).contentType),1)):N("",!0),e(a).contentType==="application/json"?(t(),w(Fe,{key:2,getter:()=>({input:e(l)})},null,8,["getter"])):N("",!0),io,uo,v(ce,{n:"green"},{default:$(()=>[W(O(e(a).fetchTime)+" ms ",1)]),_:1})]),e(c)==="pdf"?(t(),h("div",co,[u("div",po,[u("object",{data:e(l),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,fo)])])):e(c)!=="media"?(t(),w(ze,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(l),lang:e(c)},null,8,["code","lang"])):(t(),h("div",mo,[u("div",vo,[e(a).contentType.includes("image")?(t(),h("img",{key:0,rounded:"",src:e(l)},null,8,ho)):(t(),h("video",yo,[u("source",{src:e(l),type:"video/mp4"},null,8,go)]))])]))],64)):(t(),w(Be,{key:4},{default:$(()=>[v(m,{n:"primary",onClick:ge},{default:$(()=>[v(z,{icon:"carbon:send"}),W(" Send request ")]),_:1})]),_:1}))])}}}),bo={flex:"~ gap1","text-sm":""},ko={key:0,op50:""},xo={op50:""},Co=u("span",{op75:""},"Select a route to start",-1),wo=u("div",{p4:"",border:"b base"},[u("span",{"text-lg":""},"Default Inputs"),u("br"),u("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1),qo=ae({__name:"server-routes",setup(s){const g=A(!1),d=at(),n=we(),{selectedRoute:_,view:k,inputDefaults:f}=De("serverRoutes"),b=V(()=>{!n.value&&_.value&&(n.value=_.value.filepath);const S=d.value?.find(C=>C.filepath===n.value);return n.value!==_.value?.filepath&&S&&(_.value=S),S}),a=A(""),c=V(()=>new rt(d.value||[],{keys:["method","route"],shouldSort:!0})),l=V(()=>d.value?a.value?c.value.search(a.value).map(C=>C.item):d.value:[]),I=V(()=>{const S=[],C=(i,P)=>{i.routes=i.routes||[],i.routes.push(P)};return l.value.forEach(i=>{const P=i.filepath.split("/"),x=P.slice(P.indexOf("server")+1);x.length>0&&x[x.length-1].includes(".")&&x.pop();let y=null;if(x.forEach(R=>{const F=y?y.routes?.find(j=>j.route===R):S.find(j=>j.route===R);if(F)y=F;else{const j={route:R,filepath:R.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};y?C(y,j):S.push(j),y=j}}),i.type==="runtime"){const R=S.find(F=>F.route==="runtime");if(R)C(R,i);else{const F={route:"runtime",filepath:"runtime",type:"collection",routes:[i]};S.push(F)}}else y?C(y,i):S.push(i)}),S});function M(){k.value=k.value==="tree"?"list":"tree"}function H(S){return S.charAt(0).toUpperCase()+S.slice(1)}return(S,C)=>{const i=me,P=ct,x=Ee,y=_o,R=dt,F=Re,j=it,re=je,ie=yt,ee=gt,q=Te("tooltip");return t(),h(D,null,[v(j,{"storage-key":"tab-server-routes"},{left:$(()=>[v(P,{search:e(a),"onUpdate:search":C[1]||(C[1]=T=>Z(a)?a.value=T:null),pb2:""},{actions:$(()=>[le(v(i,{"text-lg":"",icon:e(k)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:M},null,8,["icon"]),[[q,"Toggle View"]]),le(v(i,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:C[0]||(C[0]=T=>g.value=!e(g))},null,512),[[q,"Default Inputs"]])]),default:$(()=>[u("div",bo,[e(a)?(t(),h("span",ko,O(e(l).length)+" matched · ",1)):N("",!0),u("span",xo,O(e(d)?.length)+" routes in total",1)])]),_:1},8,["search"]),(t(!0),h(D,null,B(e(k)==="tree"?e(I):e(l),T=>(t(),w(x,{key:T.filepath,item:T},null,8,["item"]))),128))]),right:$(()=>[(t(),w(ut,{max:10},[e(b)?(t(),w(y,{key:e(b).filepath,route:e(b),onOpenDefaultInput:C[2]||(C[2]=T=>g.value=!0)},null,8,["route"])):N("",!0)],1024)),e(b)?N("",!0):(t(),w(F,{key:0},{default:$(()=>[v(R,{px6:"",py2:""},{default:$(()=>[Co]),_:1})]),_:1}))]),_:1}),v(ee,{modelValue:e(g),"onUpdate:modelValue":C[3]||(C[3]=T=>Z(g)?g.value=T:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:C[4]||(C[4]=T=>g.value=!1)},{default:$(()=>[u("div",null,[wo,(t(!0),h(D,null,B(Object.keys(e(f)),T=>(t(),w(ie,{key:T,text:`${H(T)} ${e(f)[T].length?`(${e(f)[T].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in S?S.ServerRouteTabIcons:e(Ie))[T]},{default:$(()=>[v(re,{modelValue:e(f)[T],"onUpdate:modelValue":G=>e(f)[T]=G,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{qo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{at as m,b9 as n,a as s,L as o}from"./entry.9a5af3dc.js";function u(){const p=m(),a=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(a.value||[]).find(t=>t.pascalName===e.pascalName)));return s(()=>[...l.value,...a.value||[]].sort((e,t)=>e.pascalName.localeCompare(t.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{r as a,u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as F}from"./NBadge.0b42c7f8.js";import{_ as L}from"./NCodeBlock.vue.c80c8282.js";import{_ as q}from"./NCheckbox.vue.6b5ce38f.js";import{_ as A}from"./NTip.vue.ca2f8e8a.js";import{d as E,P as G,ba as W,r as V,bb as Y,N as z,R as H,o as m,m as g,a9 as J,f as a,t as $,p as w,F as B,i as s,h as K,j as u,k as h,l as M,v as p,V as O,_ as Q,Y as X,bc as Z,ab as ee,a as te,aq as ae,ar as ne,bd as se,b9 as oe}from"./entry.9a5af3dc.js";const le={key:0},re={p4:"",flex:"~ col gap-1"},ue={class:"text-lg font-medium leading-6"},ie=h("p",{op50:""}," The following command will be executed in your terminal: ",-1),ce={flex:"~ gap-3",mt2:"","justify-end":""},ge=E({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const t=l,e=G(),{info:n,update:i,state:y,processId:k,restart:d}=W(t.packageName,t.options),f=V(!0),_=V(!0),R=Y(),b=z(),U=H();async function N(){const r=await i(async o=>b.start(o));O("npm:update",{packageName:t.packageName,oldVersion:n.value?.current}),r&&_.value&&R.value.push({id:r,message:`${t.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&f.value&&(U.value=r,e.push("/modules/terminals"))}return(r,o)=>{const C=F,S=L,x=q,T=A,P=Q,I=X;return m(),g(B,null,[J(r.$slots,"default",{id:a(k),info:a(n),update:N,state:a(y),restart:a(d)},()=>[a(n)&&r.showVersion?(m(),g("code",le,$(`v${a(n).current}`),1)):w("",!0),a(n)?.latest?(m(),g(B,{key:1},[a(n).needsUpdate?(m(),g("button",{key:0,onClick:o[0]||(o[0]=v=>N())},[s(C,{n:"green",title:"updates available",textContent:"updates available"})])):(m(),K(C,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(a(b),null,{default:u(({resolve:v,args:j})=>[s(I,{"model-value":!0,onClose:c=>v(!1)},{default:u(()=>[h("div",re,[h("h3",ue," Update "+$(t.packageName)+"? ",1),ie,s(S,{code:j[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(x,{modelValue:a(f),"onUpdate:modelValue":o[1]||(o[1]=c=>M(f)?f.value=c:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(x,{modelValue:a(_),"onUpdate:modelValue":o[2]||(o[2]=c=>M(_)?_.value=c:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",ce,[s(T,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>[p(" Please make sure to backup your project first. ")]),_:1}),s(P,{onClick:c=>v(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:c=>v(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),D=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function de(){return oe("getModulesList",async()=>(await $fetch("https://api.nuxt.com/modules?version=3")).modules.filter(t=>!D.includes(t.npm)&&t.compatibility.nuxt.includes("^3")))}function he(){return Z("installed-modules",()=>{const l=ee(),t=de();return te(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=e.entryPath&&ae(e.entryPath),i=e.meta?.name?e.meta?.name:e.entryPath?n?ne(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=l.value?.modules?.includes(i),k=t.value?.find(d=>d.npm===i)||t.value?.find(d=>d.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!D.includes(e.name))))})}export{ge as _,de as a,he as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.timeline-scroller[data-v-a2c475c0]::-webkit-scrollbar{height:100px;width:.1px}.timeline-scroller[data-v-a2c475c0]::-webkit-scrollbar-track{background-color:transparent}.timeline-scroller[data-v-a2c475c0]::-webkit-scrollbar-thumb{background-color:#8881;height:100px}.timeline-scroller[data-v-a2c475c0]:hover::-webkit-scrollbar-thumb{background-color:#8882}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{d as w,a as T,aG as V,o as t,m as c,k as e,a8 as N,f as l,t as k,ac as O,F as f,n as I,h as b,r as B,w as U,ax as q,a0 as j,bC as K,p as x,i as m,G as z,q as X,e as Z,ao as P,j as g,as as Q,v as E,_ as G,ab as H,aI as ee,at as se,a_ as te,bD as ne,N as oe,aa as ae,A as le,L as R,a4 as ie,Y as re}from"./entry.9a5af3dc.js";import{_ as M}from"./DurationDisplay.vue.37c54f2c.js";import{_ as J}from"./NBadge.0b42c7f8.js";import{_ as ce}from"./ComposableItem.vue.869f4305.js";import{t as pe}from"./json-editor-vue.c3cbb111.js";import{_ as de}from"./FilepathItem.vue.ca308ea2.js";import{_ as ue}from"./NDrawer.vue.e2617b9c.js";import{_ as me}from"./LaunchPage.vue.c8e4a567.js";import{_ as ke}from"./NLink.vue.92e49c8b.js";import{_ as _e}from"./CodeDiff.vue.0700b533.js";import{_ as he}from"./HelpFab.vue.6bf23ece.js";import"./NMarkdown.vue.07fe8875.js";import"./client.b8ca1554.js";import"./constants.2cc6e981.js";import"./NCodeBlock.vue.c80c8282.js";const fe=w({__name:"TimelineItemFunction",props:{item:{}},setup(h){const u=h,p=T(()=>V(u.item.name,50,60,"_op_")),s=T(()=>p.value.replace(/_op_/,"1")),o=T(()=>V(u.item.name,50,40)),i=T(()=>p.value.replace(/_op_/,"0.2"));return(r,a)=>(t(),c("button",{class:"group",style:N({color:l(s),borderLeft:`2px solid ${l(s)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[e("div",{style:N({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),e("div",{style:N({color:l(o),"--c":l(s)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(r.item.name),5)],4))}}),ye={relative:"","h-full":""},ve={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},be=w({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(h,{emit:u}){const p=h,s=u,o=O(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,messages:{justNow:"",past:i=>i,future:i=>i,invalid:"-",second:i=>i?`${i}s`:"",minute:i=>`${i}m`,hour:i=>`${i}h`,week:i=>`${i}w`,day:i=>`${i}d`,month:i=>`${i}mo`,year:i=>`${i}y`}});return(i,r)=>{const a=fe;return t(),c("div",ye,[e("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","font-mono":"","text-green6":"",onClick:r[0]||(r[0]=n=>i.segment.route?s("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),e("div",ve,k(l(o))+" ago ",1),e("div",null,[(t(!0),c(f,null,I(i.segment.functions,(n,d)=>(t(),b(a,{key:d,item:n.event,style:N({position:"absolute",minWidth:`${n.relativeWidth*100}%`,maxWidth:`${n.relativeWidth*100}%`,top:`${4+n.layer*1.6}em`,left:`${n.relativeStart*100}%`}),onClick:_=>s("select",n)},null,8,["item","style","onClick"]))),128))])])}}}),ge=3e3,xe=50;function $e(h){const u=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const s of h){const o=s.end||s.start;(s.start-p.end>ge||s.type==="route")&&(p={start:s.start,end:o,events:[],functions:[],duration:0},u.push(p)),p.events.push(s),p.end=o+xe}return u.forEach((s,o)=>{const i=s.end-s.start,r=[];s.duration=i,s.previousGap=o>0?s.start-u[o-1].end:0,s.events.forEach(a=>{const n=a.end||a.start;let d=0;a.type!=="route"&&(d=r.findIndex(D=>D<=a.start),d===-1?(d=r.length,r.push(n+1e3)):r[d]=n+1e3);const _={event:a,segment:s,relativeStart:(a.start-s.start)/i,relativeWidth:(n-a.start)/i,layer:d};a.type==="function"?s.functions.push(_):s.route=_})}),u}const Ae={relative:""},De={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},Ce=w({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(h,{emit:u}){const p=h,s=u,o=B(),i=B(),r=B(),a=B(),n=B(!0),d=B(1.5),_=T(()=>$e(p.data.events)),D=T(()=>(p.data.events.length,o.value?.scrollWidth||window.innerWidth));function C(){a.value&&(a.value.style.width=`${D.value}px`)}function S(){n.value&&o.value&&(o.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}),r.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}))}return U(()=>p.data.events.length,async()=>{await q(),C(),S()},{flush:"post"}),j(o,"scroll",()=>{r.value.scrollLeft!==o.value.scrollLeft&&(C(),r.value.scrollLeft=o.value.scrollLeft,n.value=o.value.scrollLeft>=o.value.scrollWidth-o.value.clientWidth)}),j(r,"scroll",()=>{r.value.scrollLeft!==o.value.scrollLeft&&(C(),o.value.scrollLeft=r.value.scrollLeft)}),j(o,"wheel",A=>{A.altKey?(d.value=K(d.value+A.deltaY/200,.5,3),C()):o.value.scrollLeft+=A.deltaY}),(A,v)=>{const y=M,W=be;return t(),c(f,null,[e("div",Ae,[e("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(t(!0),c(f,null,I(l(_),($,F)=>(t(),c("div",{key:F,relative:"","h-full":"","flex-inline":"",style:N({width:`${Math.max(100,$.duration/10)/l(D)*100}%`})},[(t(!0),c(f,null,I($.functions,(L,Y)=>(t(),c("div",{key:Y,"h-3px":"",rounded:"",style:N({width:`max(${L.relativeWidth*100}%, 10px)`,position:"absolute",top:`${L.layer*4}px`,left:`${L.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in A?A.getHashColorFromString:l(V))(L.event.name,50,60)})},null,4))),128)),$.route?(t(),c("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:N({left:`${$.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),e("div",{ref_key:"minimapScroller",ref:r,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[e("div",{ref_key:"minimapScrollerInner",ref:a,"h-1px":""},null,512)],512)]),e("div",{ref_key:"scroller",ref:o,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(t(!0),c(f,null,I(l(_),($,F)=>(t(),c(f,{key:F},[$.previousGap&&$.previousGap>=200?(t(),c("div",De,[m(y,{op50:"",duration:$.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(W,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(F===l(_).length-1?"border-r border-base":""),segment:$,style:N({width:`${Math.max(50,$.duration/10)*l(d)}px`}),onSelect:v[0]||(v[0]=L=>s("select",L))},null,8,["class","segment","style"])],64))),128))],512)],64)}}});const Be=X(Ce,[["__scopeId","data-v-a2c475c0"]]),we={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Te=["onClick"],Ne=e("div",{"i-carbon-function":"",op50:""},null,-1),Se={flex:"~","ml--1":"","font-mono":""},Fe=e("div",{op30:""}," ( ",-1),Ee={key:0,mr2:"",op30:""},Ie={op75:""},Le=e("div",{op30:""}," ) ",-1),We=e("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[e("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),Ve={flex:"~ col items-start"},Me={"text-xs":"","font-mono":"",op30:""},je={"font-bold":"","font-mono":"","text-green":""},Oe=e("div",{"flex-auto":""},null,-1),ze=e("div",{"min-h-100":""},null,-1),Ge=w({__name:"TimelineList",props:{data:{}},emits:["select"],setup(h,{emit:u}){const p=u;return(s,o)=>{const i=M;return t(),c("div",we,[(t(!0),c(f,null,I(s.data.events,(r,a)=>(t(),c("button",{key:a,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:n=>p("select",r)},[r.type==="function"?(t(),c(f,{key:0},[Ne,e("div",{"font-mono":"",style:N({color:r.type==="function"?("getHashColorFromString"in s?s.getHashColorFromString:l(V))(r.name,50,60):""})},k(r.name),5),e("div",Se,[Fe,(t(!0),c(f,null,I(r.args,(n,d)=>(t(),c(f,{key:d},[d?(t(),c("div",Ee," , ")):x("",!0),e("div",Ie,k(n===null?"null":n===void 0?"undefined":typeof n=="function"?"[function]":Array.isArray(n)?"[Array]":typeof n=="object"?"[object]":JSON.stringify(n)),1)],64))),128)),Le])],64)):(t(),c(f,{key:1},[We,e("div",Ve,[e("div",Me,k(r.from),1),e("div",je,k(r.to),1)])],64)),Oe,r.end?(t(),b(i,{key:2,duration:r.end-r.start,color:r.type==="function"},null,8,["duration","color"])):x("",!0)],8,Te))),128)),ze])}}}),Re={key:0,"text-blue":""},Pe={key:1,"text-purple":""},He={key:2,"text-green":""},Je={key:3,"text-gray":""},Ye={key:4,"text-gray":""},Ue={key:5,"text-gray":""},qe={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ke={key:1},Xe={p2:"","text-sm":"",border:"t base"},Ze=w({__name:"TimelineArgumentView",props:{value:{}},setup(h){const u=h,p=B(),s=B();function o(){try{p.value=JSON.parse(JSON.stringify(u.value))}catch(a){console.error(a),s.value=a}}const i=w({emits:["setup"],setup(a,{emit:n}){return n("setup"),()=>null}}),r=Z();return(a,n)=>{const d=G,_=P("VMenu");return typeof a.value=="string"?(t(),c("div",Re,k(JSON.stringify(a.value)),1)):typeof a.value=="number"?(t(),c("div",Pe,k(a.value),1)):typeof a.value=="boolean"?(t(),c("div",He,k(a.value),1)):typeof a.value>"u"?(t(),c("div",Je," undefined ")):typeof a.value=="function"?(t(),c("div",Ye," [Function"+k(a.value.name?`: ${a.value.name}`:"")+"] ",1)):a.value===null?(t(),c("div",Ue," null ")):(t(),b(_,{key:6,placement:"top"},{popper:g(()=>[m(l(i),{onSetup:o}),l(s)?(t(),c("div",qe," Failed to display object: "+k(l(s)),1)):l(p)?(t(),c("div",Ke,[m(l(pe),Q({"model-value":l(p)},a.$attrs,{class:["json-editor-vue",[a.$colorMode.value==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),e("div",Xe,[m(d,{title:"Copy to clipboard",icon:"carbon-copy",onClick:n[0]||(n[0]=D=>l(r)(JSON.stringify(l(p),null,2),"timeline-argument"))},{default:g(()=>[E(" Copy ")]),_:1})])])):x("",!0)]),default:g(()=>[e("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(a.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(a.value)?`[Array(${a.value.length})]`:"[Object]"),3)]),_:1}))}}}),Qe={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},es={"mx--1":""},ss={flex:"~ gap-1","font-mono":""},ts={key:1},ns=e("span",{ml1:"",op30:""},"(",-1),os={key:0,op30:""},as=e("span",{op30:""},")",-1),ls={flex:"~ gap-1","text-sm":""},is=e("span",{mx1:"",op50:""},"·",-1),rs={class:"text-sm text-gray-400"},cs={key:0,class:"text-xs text-gray-400",mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},ps={"text-right":""},ds={"ws-nowrap":""},us=w({__name:"TimelineDetailsFunction",props:{record:{}},setup(h){const u=h,p=H(),s=O(()=>u.record.start,{showSecond:!0});function o(n){let d=new URL(n).pathname;return d.startsWith("/_nuxt/")&&(d=d.slice(6)),d.startsWith("/@id/virtual:nuxt:")?`#build/${d.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):d.includes("/@fs/")?`/${d.split("/@fs/")[1]}`:(p.value?.rootDir||"")+d}const i=ee(),r=T(()=>i.value?.metadata),a=T(()=>i.value?.imports.find(n=>n.as===u.record.name));return(n,d)=>{const _=J,D=ce,C=Ze,S=M,A=de;return n.record?(t(),c("div",Qe,[e("div",es,[m(_,{n:"yellow",textContent:"Function call"})]),e("div",ss,[l(a)?(t(),b(D,{key:0,item:l(a),metadata:l(r),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(t(),c("span",ts,k(n.record.name),1)),ns,(t(!0),c(f,null,I(n.record.args,(v,y)=>(t(),c(f,{key:y},[y?(t(),c("span",os,", ")):x("",!0),m(C,{value:v},null,8,["value"])],64))),128)),as]),e("div",ls,[n.record.end?(t(),b(S,{key:0,duration:n.record.end-n.record.start},null,8,["duration"])):x("",!0),is,e("div",rs,k(l(s)),1)]),n.record.stacktrace?(t(),c("div",cs,[(t(!0),c(f,null,I(n.record.stacktrace,(v,y)=>(t(),c(f,{key:y},[e("div",ps,k(v.functionName||"(anonymous)"),1),e("div",ds,[v.fileName?(t(),b(A,{key:0,filepath:`${o(v.fileName)}:${v.lineNumber}:${v.columnNumber}`,subpath:""},null,8,["filepath"])):x("",!0)])],64))),128))])):x("",!0)])):x("",!0)}}}),ms={key:0,"p-4":"",flex:"~ col gap-2"},ks={"mx--1":""},_s={flex:"~ gap-1 items-center","font-mono":""},hs={op50:""},fs=e("span",{"i-carbon-arrow-right":"",op50:""},null,-1),ys={flex:"~ gap-1","text-sm":""},vs=e("span",{mx1:"",op50:""},"·",-1),bs={class:"text-sm text-gray-400"},gs=w({__name:"TimelineDetailsRoute",props:{record:{}},setup(h){const u=h,p=O(()=>u.record.start,{showSecond:!0});return(s,o)=>{const i=J,r=M;return s.record?(t(),c("div",ms,[e("div",ks,[m(i,{n:"green",textContent:"Route Change"})]),e("div",_s,[e("span",hs,k(s.record.from),1),fs,e("span",null,k(s.record.to),1)]),e("div",ys,[s.record.end?(t(),b(r,{key:0,duration:s.record.end-s.record.start},null,8,["duration"])):x("",!0),vs,e("div",bs,k(l(p)),1)])])):x("",!0)}}}),xs={key:0,"h-screen":"","of-hidden":""},$s={"h-screen":"","w-full":"",flex:"","flex-col":""},As={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},Ds={"text-sm":""},Cs=e("div",{"flex-auto":""},null,-1),Bs={"min-h-50":"",px3:"",py2:""},ws=w({__name:"TimelineView",setup(h){const u=se(),p=B("table"),s=B(),o=T(()=>u.value?.metrics.clientTimeline());function i(){o.value&&(o.value.events=[])}function r(){p.value=p.value==="table"?"list":"table"}return(a,n)=>{const d=P("VTooltip"),_=G,D=Be,C=Ge,S=us,A=gs,v=ue;return l(o)?(t(),c("div",xs,[e("div",$s,[e("div",As,[m(d,{flex:""},{popper:g(()=>[e("div",Ds,k(l(o).options.enabled?"Recording...":"Paused"),1)]),default:g(()=>[e("div",{"text-lg":"",class:z(l(o).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(o).options.enabled?(t(),b(_,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:n[1]||(n[1]=y=>l(o).options.enabled=!1)},{default:g(()=>[E(" Stop Tracking ")]),_:1})):(t(),b(_,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:n[0]||(n[0]=y=>l(o).options.enabled=!0)},{default:g(()=>[E(" Start Tracking ")]),_:1})),Cs,m(_,{icon:l(p)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:r},null,8,["icon"]),m(_,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(p)==="table"?(t(),b(D,{key:0,data:{...l(o)},onSelect:n[2]||(n[2]=y=>s.value=y.event)},null,8,["data"])):(t(),b(C,{key:1,data:{...l(o)},onSelect:n[3]||(n[3]=y=>s.value=y)},null,8,["data"]))]),m(v,{"model-value":!!l(s),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:n[4]||(n[4]=y=>s.value=void 0)},{default:g(()=>[e("div",Bs,[l(s)?.type==="function"?(t(),b(S,{key:0,record:l(s)},null,8,["record"])):l(s)?.type==="route"?(t(),b(A,{key:1,record:l(s)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Ts={class:"markdown-body"},Ns=e("h1",null,"Timeline",-1),Ss=e("p",null,[e("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Fs=te(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from '#imports'</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;"><</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">></span></span>
|
|
2
|
-
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
3
|
-
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
4
|
-
<span class="line"></span>
|
|
5
|
-
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> route</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
6
|
-
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> app</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
7
|
-
<span class="line"></span>
|
|
8
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it's directly imported</span></span>
|
|
9
|
-
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> mouse</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#393A34;--shiki-dark:#DBD7CAEE;"> </span></span>
|
|
10
|
-
<span class="line"></span></code></pre><p>By default, it tracks Nuxt provided composables as well as user defined functions. You can include/exclude functions by using the <code>include</code> and <code>exclude</code> options in the <code>nuxt.config.js</code> file.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">export</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> default</span><span style="color:#59873A;--shiki-dark:#80A665;"> defineNuxtConfig</span><span style="color:#999999;--shiki-dark:#666666;">({</span></span>
|
|
11
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> devtools</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
12
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> timeline</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
13
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> functions</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
14
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> include</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
15
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span>
|
|
16
|
-
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useMouse</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
17
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span>
|
|
18
|
-
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> /</span><span style="color:#1E754F;--shiki-dark:#4D9375;">^</span><span style="color:#AB5E3F;--shiki-dark:#C4704F;">use</span><span style="color:#999999;--shiki-dark:#666666;">[</span><span style="color:#A65E2B;--shiki-dark:#C99076;">A-Z</span><span style="color:#999999;--shiki-dark:#666666;">]</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">/</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
19
|
-
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span>
|
|
20
|
-
<span class="line"><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;"> =></span><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;">.</span><span style="color:#B07D48;--shiki-dark:#BD976A;">from</span><span style="color:#AB5959;--shiki-dark:#CB7676;"> ===</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
21
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span>
|
|
22
|
-
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> exclude</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
23
|
-
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useRouter</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
24
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</span></span>
|
|
25
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
26
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
27
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
28
|
-
<span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span>
|
|
29
|
-
<span class="line"></span></code></pre>`,6),Es=[Ns,Ss,Fs],Is={__name:"timeline",setup(h,{expose:u}){return u({frontmatter:{}}),(s,o)=>(t(),c("div",Ts,Es))}},Ls={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Ws=e("h2",{"text-xl":""},[e("span",{capitalize:""},"Enable Timeline?")],-1),Vs={op50:""},Ms=e("p",null,[e("span",{op50:""},"Then Nuxt will "),e("span",{"text-orange":""},"restart automatically"),E(". ")],-1),js={flex:"~ gap-3",mt2:"","justify-end":""},st=w({__name:"timeline",setup(h){const u=ne(),p=H(),s=oe(),o=ae();async function i(){try{const[r,a]=await R.enableTimeline(!0);if(!await s.start(r,a))return;await R.enableTimeline(!1)}catch{ie({message:"Failed to enable timeline automatically. Check the terminal for more details.",icon:"i-carbon-warning",classes:"text-red"})}}return(r,a)=>{const n=ws,d=me,_=le,D=ke,C=_e,S=G,A=re,v=Is,y=he;return t(),c(f,null,[l(u)?.timeline?.enabled?(t(),b(n,{key:0})):(t(),c(f,{key:1},[m(_,null,{default:g(()=>[m(d,{icon:"i-carbon-roadmap",name:"feature-timeline",title:"Timeline",description:"Timeline enables the inspection of when composable being executed and the route changes.",actions:[{label:"Enable"}],onAction:i})]),_:1}),m(l(s),null,{default:g(({resolve:W,args:$})=>[m(A,{"model-value":!0,onClose:F=>W(!1)},{default:g(()=>[e("div",Ls,[Ws,e("p",Vs,[E(" Your "),m(D,{role:"button",n:"primary",underline:"",onClick:a[0]||(a[0]=F=>l(o)(l(p)?._nuxtConfigFile)),textContent:"Nuxt config"}),E(" will be updated as: ")]),m(C,{from:$[0],to:$[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Ms,e("div",js,[m(S,{onClick:F=>W(!1)},{default:g(()=>[E(" Cancel ")]),_:2},1032,["onClick"]),m(S,{n:"solid primary",capitalize:"",onClick:F=>W(!0)},{default:g(()=>[E(" Enable ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),m(y,null,{default:g(()=>[m(v)]),_:1})],64)}}});export{st as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$ as xe}from"./entry.9a5af3dc.js";function $e(t){const e=t.length;let n=-1,s,r="";const i=t.charCodeAt(0);for(;++n<e;){if(s=t.charCodeAt(n),s===0){r+="�";continue}if(s===37){r+="\\%";continue}if(s===44){r+="\\,";continue}if(s>=1&&s<=31||s===127||n===0&&s>=48&&s<=57||n===1&&s>=48&&s<=57&&i===45){r+=`\\${s.toString(16)} `;continue}if(n===0&&e===1&&s===45){r+=`\\${t.charAt(n)}`;continue}if(s>=128||s===45||s===95||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122){r+=t.charAt(n);continue}r+=`\\${t.charAt(n)}`}return r}const G=$e;function P(t=[]){return Array.isArray(t)?t:[t]}function U(t){return Array.from(new Set(t))}function _e(t,e){return t.reduce((n,s)=>(n.findIndex(i=>e(s,i))===-1&&n.push(s),n),[])}function O(t){return typeof t=="string"}function R(t){return O(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Ce(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>R(e)):[t]:[R(t)]}function Ae(t){return t.filter(([e,n],s)=>{if(e.startsWith("$$"))return!1;for(let r=s-1;r>=0;r--)if(t[r][0]===e&&t[r][1]===n)return!1;return!0})}function W(t){return t==null?"":Ae(t).map(([e,n])=>n!=null?`${e}:${n};`:void 0).filter(Boolean).join("")}function D(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ue(t,e,n=!1){const s=t,r=e;if(Array.isArray(r))return n&&Array.isArray(r)?[...s,...r]:[...r];const i={...s};return D(s)&&D(r)&&Object.keys(r).forEach(o=>{D(s[o])&&D(r[o])||Array.isArray(s[o])&&Array.isArray(r[o])?i[o]=ue(s[o],r[o],n):Object.assign(i,{[o]:r[o]})}),i}function B(t){let e,n,s;if(Array.isArray(t)){for(n=Array(e=t.length);e--;)n[e]=(s=t[e])&&typeof s=="object"?B(s):s;return n}if(Object.prototype.toString.call(t)==="[object Object]"){n={};for(e in t)e==="__proto__"?Object.defineProperty(n,e,{value:B(t[e]),configurable:!0,enumerable:!0,writable:!0}):n[e]=(s=t[e])&&typeof s=="object"?B(s):s;return n}return t}function Oe(t){return O(t[0])}function Me(t){return O(t[0])}const J="$$shortcut-no-merge";function Ee(t){return typeof t=="function"?{match:t}:t}function Q(t){return t.length===3}function je(t){return t!=null}function ke(){}var Pe=Object.defineProperty,Le=(t,e,n)=>e in t?Pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ze=(t,e,n)=>(Le(t,typeof e!="symbol"?e+"":e,n),n);class Te{constructor(){ze(this,"_map",new Map)}get(e,n){const s=this._map.get(e);if(s)return s.get(n)}getFallback(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.has(n)||r.set(n,s),r.get(n)}set(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.set(n,s),this}has(e,n){return this._map.get(e)?.has(n)}delete(e,n){return this._map.get(e)?.delete(n)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([n,s])=>Array.from(s.entries()).map(([r,i])=>e(i,n,r)))}}var Fe=Object.defineProperty,Ie=(t,e,n)=>e in t?Fe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Re=(t,e,n)=>(Ie(t,typeof e!="symbol"?e+"":e,n),n);class he extends Set{constructor(e){super(e),Re(this,"_map"),this._map??(this._map=new Map)}add(e){return this._map??(this._map=new Map),this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,n){return this._map.set(e,n),super.add(e)}}function Y(t){return t instanceof he}const V={};function Ne(t=["-",":"]){const e=t.join("|");return V[e]||(V[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),V[e].lastIndex=0,V[e]}function De(t,e=["-",":"],n=5){const s=Ne(e);let r,i=t.toString();const o=new Set,a=new Map;do r=!1,i=i.replace(s,(u,c,h,g,y)=>{if(!e.includes(h))return u;r=!0,o.add(c+h);const x=y+c.length+h.length+1,m={length:u.length,items:[]};a.set(y,m);for(const d of[...g.matchAll(/\S+/g)]){const $=x+d.index;let w=a.get($)?.items;w?a.delete($):w=[{offset:$,length:d[0].length,className:d[0]}];for(const b of w)b.className=b.className==="~"?c:b.className.replace(/^(!?)(.*)/,`$1${c}${h}$2`),m.items.push(b)}return"$".repeat(u.length)}),n-=1;while(r&&n);let f;if(typeof t=="string"){f="";let u=0;for(const[c,h]of a)f+=t.slice(u,c),f+=h.items.map(g=>g.className).join(" "),u=c+h.length;f+=t.slice(u)}else{f=t;for(const[u,c]of a)f.overwrite(u,u+c.length,c.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:r,groupsByOffset:a,get expanded(){return f.toString()}}}function Ve(t,e=["-",":"],n=5){const s=De(t,e,n);return typeof t=="string"?s.expanded:t}const ee=new Set;function de(t){ee.has(t)||(console.warn("[unocss]",t),ee.add(t))}const Be=/[\\:]?[\s'"`;{}]+/g;function Ue(t){return t.split(Be)}const He={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Ue(t)}};function Ge(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}}}const K="default",X="preflights",We="shortcuts",Ye="imports",qe={[Ye]:-200,[X]:-100,[We]:-10,[K]:0};function pe(t){return P(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const te="_uno_resolved";function Ke(t){let e=typeof t=="function"?t():t;if(te in e)return e;e={...e},Object.defineProperty(e,te,{value:!0,enumerable:!1});const n=e.shortcuts?pe(e.shortcuts):void 0;if(e.shortcuts=n,e.prefix||e.layer){const s=r=>{r[2]||(r[2]={});const i=r[2];i.prefix==null&&e.prefix&&(i.prefix=P(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};n?.forEach(s),e.rules?.forEach(s)}return e}function me(t){const e=Ke(t);if(!e.presets)return[e];const n=(e.presets||[]).flatMap(P).flatMap(me);return[e,...n]}function ne(t={},e={}){const n=Object.assign({},e,t),s=_e((n.presets||[]).flatMap(P).flatMap(me),(l,v)=>l.name===v.name),r=[...s.filter(l=>l.enforce==="pre"),...s.filter(l=>!l.enforce),...s.filter(l=>l.enforce==="post")],i=[...r,n],o=[...i].reverse(),a=Object.assign({},qe,...i.map(l=>l.layers));function f(l){return U(i.flatMap(v=>P(v[l]||[])))}const u=f("extractors");let c=o.find(l=>l.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=He),c&&!u.includes(c)&&u.unshift(c),u.sort((l,v)=>(l.order||0)-(v.order||0));const h=f("rules"),g={},y=h.length,x=h.map((l,v)=>{if(Oe(l)){P(l[2]?.prefix||"").forEach(A=>{g[A+l[0]]=[v,l[1],l[2],l]});return}return[v,...l]}).filter(Boolean).reverse();let m=Xe(i.map(l=>l.theme));const d=f("extendTheme");for(const l of d)m=l(m)||m;const $={templates:U(i.flatMap(l=>P(l.autocomplete?.templates))),extractors:i.flatMap(l=>P(l.autocomplete?.extractors)).sort((l,v)=>(l.order||0)-(v.order||0)),shorthands:Ze(i.map(l=>l.autocomplete?.shorthands||{}))};let w=f("separators");w.length||(w=[":","-"]);const b={mergeSelectors:!0,warn:!0,blocklist:[],sortLayers:l=>l,...n,presets:r,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:a,theme:m,rulesSize:y,rulesDynamic:x,rulesStaticMap:g,preprocess:f("preprocess"),postprocess:f("postprocess"),preflights:f("preflights"),autocomplete:$,variants:f("variants").map(Ee).sort((l,v)=>(l.order||0)-(v.order||0)),shortcuts:pe(f("shortcuts")).reverse(),extractors:u,safelist:f("safelist"),separators:w,details:n.details??n.envMode==="dev"};for(const l of i)l?.configResolved?.(b);return b}function Xe(t){return t.map(e=>e?B(e):{}).reduce((e,n)=>ue(e,n),{})}function Ze(t){return t.reduce((e,n)=>{const s={};for(const r in n){const i=n[r];Array.isArray(i)?s[r]=`(${i.join("|")})`:s[r]=i}return{...e,...s}},{})}const Je="0.57.6";var Qe=Object.defineProperty,et=(t,e,n)=>e in t?Qe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,F=(t,e,n)=>(et(t,typeof e!="symbol"?e+"":e,n),n);class tt{constructor(e={},n={}){this.userConfig=e,this.defaults=n,F(this,"version",Je),F(this,"_cache",new Map),F(this,"config"),F(this,"blocked",new Set),F(this,"parentOrders",new Map),F(this,"events",Ge()),this.config=ne(e,n),this.events.emit("config",this.config)}setConfig(e,n){e&&(n&&(this.defaults=n),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=ne(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,n,s=new Set){const r={original:e,code:e,id:n,extracted:s,envMode:this.config.envMode};for(const i of this.config.extractors){const o=await i.extract?.(r);if(o)if(Y(o)&&Y(s))for(const a of o)s.setCount(a,s.getCount(a)+o.getCount(a));else for(const a of o)s.add(a)}return s}makeContext(e,n){const s={rawSelector:e,currentSelector:n[1],theme:this.config.theme,generator:this,variantHandlers:n[2],constructCSS:(...r)=>this.constructCustomCSS(s,...r),variantMatch:n};return s}async parseToken(e,n){if(this.blocked.has(e))return;const s=`${e}${n?` ${n}`:""}`;if(this._cache.has(s))return this._cache.get(s);let r=e;for(const u of this.config.preprocess)r=u(e);if(this.isBlocked(r)){this.blocked.add(e),this._cache.set(s,null);return}const i=await this.matchVariants(e,r);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(s,null);return}const o=this.makeContext(e,[n||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);const a=await this.expandShortcut(o.currentSelector,o),f=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(u=>this.stringifyUtil(u,o)).filter(je);if(f?.length)return this._cache.set(s,f),f;this._cache.set(s,null)}async generate(e,n={}){const{id:s,scope:r,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:f=!1}=n,u=O(e)?await this.applyExtractors(e,s,f?new he:new Set):Array.isArray(e)?new Set(e):e;o&&this.config.safelist.forEach(l=>{u.has(l)||u.add(l)});const c=a?"":`
|
|
2
|
-
`,h=new Set([K]),g=f?new Map:new Set,y=new Map;let x={};const m=Array.from(u).map(async l=>{if(g.has(l))return;const v=await this.parseToken(l);if(v!=null){g instanceof Map?g.set(l,{data:v,count:Y(u)?u.getCount(l):-1}):g.add(l);for(const C of v){const A=C[3]||"",M=C[4]?.layer;y.has(A)||y.set(A,[]),y.get(A).push(C),M&&h.add(M)}}});await Promise.all(m),await(async()=>{if(!i)return;const l={generator:this,theme:this.config.theme},v=new Set([]);this.config.preflights.forEach(({layer:C=X})=>{h.add(C),v.add(C)}),x=Object.fromEntries(await Promise.all(Array.from(v).map(async C=>{const M=(await Promise.all(this.config.preflights.filter(z=>(z.layer||X)===C).map(async z=>await z.getCSS(l)))).filter(Boolean).join(c);return[C,M]})))})();const d=this.config.sortLayers(Array.from(h).sort((l,v)=>(this.config.layers[l]??0)-(this.config.layers[v]??0)||l.localeCompare(v))),$={},w=l=>{if($[l])return $[l];let v=Array.from(y).sort((A,M)=>(this.parentOrders.get(A[0])??0)-(this.parentOrders.get(M[0])??0)||A[0]?.localeCompare(M[0]||"")||0).map(([A,M])=>{const z=M.length,T=M.filter(p=>(p[4]?.layer||K)===l).sort((p,S)=>p[0]-S[0]||(p[4]?.sort||0)-(S[4]?.sort||0)||p[5]?.currentSelector?.localeCompare(S[5]?.currentSelector??"")||p[1]?.localeCompare(S[1]||"")||p[2]?.localeCompare(S[2]||"")||0).map(([,p,S,,_,,E])=>[[[(p&&it(p,r))??"",_?.sort??0]],S,!!(E??_?.noMerge)]);if(!T.length)return;const I=T.reverse().map(([p,S,_],E)=>{if(!_&&this.config.mergeSelectors)for(let j=E+1;j<z;j++){const L=T[j];if(L&&!L[2]&&(p&&L[0]||p==null&&L[0]==null)&&L[1]===S)return p&&L[0]&&L[0].push(...p),null}const k=p?U(p.sort((j,L)=>j[1]-L[1]||j[0]?.localeCompare(L[0]||"")||0).map(j=>j[0]).filter(Boolean)):[];return k.length?`${k.join(`,${c}`)}{${S}}`:S}).filter(Boolean).reverse().join(c);if(!A)return I;const N=A.split(" $$ ");return`${N.join("{")}{${c}${I}${c}${"}".repeat(N.length)}`}).filter(Boolean).join(c);i&&(v=[x[l],v].filter(Boolean).join(c));const C=a?"":`/* layer: ${l} */${c}`;return $[l]=v?C+v:""},b=(l=d,v)=>l.filter(C=>!v?.includes(C)).map(C=>w(C)||"").filter(Boolean).join(c);return{get css(){return b()},layers:d,matched:g,getLayers:b,getLayer:w}}async matchVariants(e,n){const s=new Set,r=[];let i=n||e,o=!0;const a={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(const f of this.config.variants){if(!f.multiPass&&s.has(f))continue;let u=await f.match(i,a);if(u){if(O(u)){if(u===i)continue;u={matcher:u}}i=u.matcher,r.unshift(u),s.add(f),o=!0;break}}if(!o)break;if(r.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,r,s]}applyVariants(e,n=e[4],s=e[1]){const i=n.slice().sort((u,c)=>(u.order||0)-(c.order||0)).reduceRight((u,c)=>h=>{const g=c.body?.(h.entries)||h.entries,y=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??at)({...h,entries:g,selector:c.selector?.(h.selector,g)||h.selector,parent:y[0]||h.parent,parentOrder:y[1]||h.parentOrder,layer:c.layer||h.layer,sort:c.sort||h.sort},u)},u=>u)({prefix:"",selector:ot(s),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);const f={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(const u of this.config.postprocess)u(f);return f}constructCustomCSS(e,n,s){const r=R(n);if(O(r))return r;const{selector:i,entries:o,parent:a}=this.applyVariants([0,s||e.rawSelector,r,void 0,e.variantHandlers]),f=`${i}{${W(o)}}`;return a?`${a}{${f}}`:f}async parseUtil(e,n,s=!1,r){const[i,o,a]=O(e)?await this.matchVariants(e):e;this.config.details&&(n.rules=n.rules??[]);const f=this.config.rulesStaticMap[o];if(f&&f[1]&&(s||!f[2]?.internal)){this.config.details&&n.rules.push(f[3]);const c=f[0],h=R(f[1]),g=f[2];return O(h)?[[c,h,g]]:[[c,i,h,g,a]]}n.variantHandlers=a;const{rulesDynamic:u}=this.config;for(const[c,h,g,y]of u){if(y?.internal&&!s)continue;let x=o;if(y?.prefix){const w=P(y.prefix);if(r){const b=P(r);if(!w.some(l=>b.includes(l)))continue}else{const b=w.find(l=>o.startsWith(l));if(b==null)continue;x=o.slice(b.length)}}const m=x.match(h);if(!m)continue;const d=await g(m,n);if(!d)continue;this.config.details&&n.rules.push([h,g,y]);const $=Ce(d).filter(w=>w.length);if($.length)return $.map(w=>O(w)?[c,w,y]:[c,i,w,y,a])}}stringifyUtil(e,n){if(!e)return;if(Q(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?n:void 0,void 0];const{selector:s,entries:r,parent:i,layer:o,sort:a,noMerge:f}=this.applyVariants(e),u=W(r);if(!u)return;const{layer:c,sort:h,...g}=e[3]??{},y={...g,layer:o??c,sort:a??h};return[e[0],s,u,i,y,this.config.details?n:void 0,f]}async expandShortcut(e,n,s=5){if(s===0)return;const r=this.config.details?a=>{n.shortcuts=n.shortcuts??[],n.shortcuts.push(a)}:ke;let i,o;for(const a of this.config.shortcuts){let f=e;if(a[2]?.prefix){const c=P(a[2].prefix).find(h=>e.startsWith(h));if(c==null)continue;f=e.slice(c.length)}if(Me(a)){if(a[0]===f){i=i||a[2],o=a[1],r(a);break}}else{const u=f.match(a[0]);if(u&&(o=a[1](u,n)),o){i=i||a[2],r(a);break}}}if(O(o)&&(o=Ve(o.trim()).split(/\s+/g)),!o){const[a,f]=O(e)?await this.matchVariants(e):e;if(a!==f){const u=await this.expandShortcut(f,n,s-1);u&&(o=u[0].map(c=>O(c)?a.replace(f,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(O(a)?(await this.expandShortcut(a,n,s-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,n,s,r={layer:this.config.shortcutsLayer}){const i=new Te,o=(await Promise.all(U(s).map(async c=>{const h=O(c)?await this.parseUtil(c,n,!0,r.prefix):[[Number.POSITIVE_INFINITY,"{inline}",R(c),void 0,[]]];return!h&&this.config.warn&&de(`unmatched utility "${c}" in shortcut "${e[1]}"`),h||[]}))).flat(1).filter(Boolean).sort((c,h)=>c[0]-h[0]),[a,,f]=e,u=[];for(const c of o){if(Q(c)){u.push([c[0],void 0,c[1],void 0,c[2],n,void 0]);continue}const{selector:h,entries:g,parent:y,sort:x,noMerge:m}=this.applyVariants(c,[...c[4],...f],a);i.getFallback(h,y,[[],c[0]])[0].push([g,!!(m??c[3]?.noMerge),x??0])}return u.concat(i.map(([c,h],g,y)=>{const x=(d,$,w)=>{const b=Math.max(...w.map(v=>v[1])),l=w.map(v=>v[0]);return(d?[l.flat(1)]:l).map(v=>{const C=W(v);if(C)return[h,g,C,y,{...r,noMerge:$,sort:b},n,void 0]})};return[[c.filter(([,d])=>d).map(([d,,$])=>[d,$]),!0],[c.filter(([,d])=>!d).map(([d,,$])=>[d,$]),!1]].map(([d,$])=>[...x(!1,$,d.filter(([w])=>w.some(b=>b[0]===J))),...x(!0,$,d.filter(([w])=>w.every(b=>b[0]!==J)))])}).flat(2).filter(Boolean))}isBlocked(e){return!e||this.config.blocklist.some(n=>typeof n=="function"?n(e):O(n)?n===e:n.test(e))}}function nt(t,e){return new tt(t,e)}const rt=/\s\$\$\s+/g;function st(t){return t.match(/\s\$\$\s/)}function it(t,e){return st(t)?t.replace(rt,e?` ${e} `:" "):e?`${e} ${t}`:t}const re=/^\[(.+?)(~?=)"(.*)"\]$/;function ot(t){return re.test(t)?t.replace(re,(e,n,s,r)=>`[${G(n)}${s}"${G(r)}"]`):`.${G(t)}`}function at(t,e){return e(t)}const ct=Object.freeze({left:0,top:0,width:16,height:16}),H=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ge=Object.freeze({...ct,...H}),lt=Object.freeze({...ge,body:"",hidden:!1}),ft=Object.freeze({width:null,height:null}),ye=Object.freeze({...ft,...H});function ut(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(n.rotate=s),n}function se(t,e){const n=ut(t,e);for(const s in lt)s in H?s in t&&!(s in n)&&(n[s]=H[s]):s in e?n[s]=e[s]:s in t&&(n[s]=t[s]);return n}function ht(t,e){const n=t.icons,s=t.aliases||Object.create(null),r=Object.create(null);function i(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const a=s[o]&&s[o].parent,f=a&&i(a);f&&(r[o]=[a].concat(f))}return r[o]}return(e||Object.keys(n).concat(Object.keys(s))).forEach(i),r}function ie(t,e,n){const s=t.icons,r=t.aliases||Object.create(null);let i={};function o(a){i=se(s[a]||r[a],i)}return o(e),n.forEach(o),se(t,i)}function dt(t,e){if(t.icons[e])return ie(t,e,[]);const n=ht(t,[e])[e];return n?ie(t,e,n):null}const pt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function oe(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const s=t.split(pt);if(s===null||!s.length)return t;const r=[];let i=s.shift(),o=mt.test(i);for(;;){if(o){const a=parseFloat(i);isNaN(a)?r.push(i):r.push(Math.ceil(a*e*n)/n)}else r.push(i);if(i=s.shift(),i===void 0)return r.join("");o=!o}}function gt(t){let e="";const n=t.indexOf("<defs");for(;n>=0;){const s=t.indexOf(">",n),r=t.indexOf("</defs");if(s===-1||r===-1)break;const i=t.indexOf(">",r);if(i===-1)break;e+=t.slice(s+1,r).trim(),t=t.slice(0,n).trim()+t.slice(i+1)}return{defs:e,content:t}}function yt(t,e){return t?"<defs>"+t+"</defs>"+e:e}function wt(t,e,n){const s=gt(t);return yt(s.defs,e+s.content+n)}const Z=t=>t==="unset"||t==="undefined"||t==="none";function vt(t,e){const n={...ge,...t},s={...ye,...e},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,s].forEach(m=>{const d=[],$=m.hFlip,w=m.vFlip;let b=m.rotate;$?w?b+=2:(d.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),d.push("scale(-1 1)"),r.top=r.left=0):w&&(d.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),d.push("scale(1 -1)"),r.top=r.left=0);let l;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:l=r.height/2+r.top,d.unshift("rotate(90 "+l.toString()+" "+l.toString()+")");break;case 2:d.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:l=r.width/2+r.left,d.unshift("rotate(-90 "+l.toString()+" "+l.toString()+")");break}b%2===1&&(r.left!==r.top&&(l=r.left,r.left=r.top,r.top=l),r.width!==r.height&&(l=r.width,r.width=r.height,r.height=l)),d.length&&(i=wt(i,'<g transform="'+d.join(" ")+'">',"</g>"))});const o=s.width,a=s.height,f=r.width,u=r.height;let c,h;o===null?(h=a===null?"1em":a==="auto"?u:a,c=oe(h,f/u)):(c=o==="auto"?f:o,h=a===null?oe(c,u/f):a==="auto"?u:a);const g={},y=(m,d)=>{Z(d)||(g[m]=d.toString())};y("width",c),y("height",h);const x=[r.left,r.top,f,u];return g.viewBox=x.join(" "),{attributes:g,viewBox:x,body:i}}function bt(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function St(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" ')),bt(e)}function xt(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()}const $t=/\swidth\s*=\s*["'](\w+)["']/,_t=/\sheight\s*=\s*["'](\w+)["']/,q=/<svg\s+/;function Ct(t,e,n){const s=t.slice(0,t.indexOf(">")),r=(i,o)=>{const a=o.exec(s),f=a!=null,u=e[i];return!u&&!Z(u)&&(typeof n=="number"?n>0&&(e[i]=`${n}em`):a&&(e[i]=a[1])),f};return[r("width",$t),r("height",_t)]}async function we(t,e,n,s,r,i){const{scale:o,addXmlNs:a=!1}=s??{},{additionalProps:f={},iconCustomizer:u}=s?.customizations??{},c=await r?.()??{};await u?.(e,n,c),Object.keys(f).forEach(m=>{const d=f[m];d!=null&&(c[m]=d)}),i?.(c);const[h,g]=Ct(t,c,o);a&&(!t.includes("xmlns=")&&!c.xmlns&&(c.xmlns="http://www.w3.org/2000/svg"),!t.includes("xmlns:xlink=")&&t.includes("xlink:")&&!c["xmlns:xlink"]&&(c["xmlns:xlink"]="http://www.w3.org/1999/xlink"));const y=Object.keys(c).map(m=>m==="width"&&h||m==="height"&&g?null:`${m}="${c[m]}"`).filter(m=>m!=null);if(y.length&&(t=t.replace(q,`<svg ${y.join(" ")} `)),s){const{defaultStyle:m,defaultClass:d}=s;d&&!t.includes("class=")&&(t=t.replace(q,`<svg class="${d}" `)),m&&!t.includes("style=")&&(t=t.replace(q,`<svg style="${m}" `))}const x=s?.usedProps;return x&&(Object.keys(f).forEach(m=>{const d=c[m];d!=null&&(x[m]=d)}),typeof c.width<"u"&&c.width!==null&&(x.width=c.width),typeof c.height<"u"&&c.height!==null&&(x.height=c.height)),t}async function ae(t,e,n,s){let r;try{if(typeof t=="function")r=await t(n);else{const i=t[n];r=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${n}" in "${e}":`,i);return}if(r){const i=r.indexOf("<svg");i>0&&(r=r.slice(i));const{transform:o}=s?.customizations??{};return r=typeof o=="function"?await o(r,e,n):r,r.startsWith("<svg")?await we(s?.customizations?.trimCustomSvg===!0?xt(r):r,e,n,s,void 0):(console.warn(`Custom icon "${n}" in "${e}" is not a valid SVG`),r)}}async function ve(t,e,n,s){let r;const{customize:i}=s?.customizations??{};for(const o of n)if(r=dt(t,o),r){let a={...ye};typeof i=="function"&&(a=i(a));const{attributes:{width:f,height:u,...c},body:h}=vt(r,a),g=s?.scale;return await we(`<svg >${h}</svg>`,e,o,s,()=>({...c}),y=>{const x=(m,d)=>{const $=y[m];let w;if(!Z($)){if($)return;typeof g=="number"?g&&(w=`${g}em`):w=d}w?y[m]=w:delete y[m]};x("width",f),x("height",u)})}}const be=async(t,e,n)=>{const s=n?.customCollections?.[t];if(s)if(typeof s=="function"){let r;try{r=await s(e)}catch(i){console.warn(`Failed to load custom icon "${e}" in "${t}":`,i);return}if(r){if(typeof r=="string")return await ae(()=>r,t,e,n);if("icons"in r){const i=[e,e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.replace(/([a-z])(\d+)/g,"$1-$2")];return await ve(r,t,i,n)}}}else return await ae(s,t,e,n)};function At(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ot=["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","covid","cryptocurrency-color","cryptocurrency","dashicons","devicon-line","devicon-original","devicon-plain","devicon","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","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconamoon","iconoir","icons8","il","ion","iwwa","jam","la","lets-icons","line-md","logos","ls","lucide","majesticons","maki","map","material-symbols-light","material-symbols","mdi-light","mdi","medical-icon","memory","meteocons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","pajamas","pepicons-pencil","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-emojis","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","vaadin","vs","vscode-icons","websymbol","whh","wi","wpf","zmdi","zondicons"];const Mt=At(Ot),Et=3;function jt(t){return(e={})=>{const{scale:n=1,mode:s="auto",prefix:r="i-",warn:i=!1,collections:o,extraProperties:a={},customizations:f={},autoInstall:u=!1,layer:c="icons",unit:h}=e,g={addXmlNs:!0,scale:n,customCollections:o,autoInstall:u,warn:void 0,customizations:{...f,additionalProps:{...a},trimCustomSvg:!0,async iconCustomizer(x,m,d){await f.iconCustomizer?.(x,m,d),h&&(d.width||(d.width=`${n}${h}`),d.height||(d.height=`${n}${h}`))}}};let y;return{name:"@unocss/preset-icons",enforce:"pre",options:e,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async([x,m,d=s])=>{let $="",w="",b;y=y||await t(e);const l={};if(m.includes(":"))[$,w]=m.split(":"),b=await y($,w,{...g,usedProps:l});else{const C=m.split(/-/g);for(let A=Et;A>=1&&($=C.slice(0,A).join("-"),w=C.slice(A).join("-"),b=await y($,w,{...g,usedProps:l}),!b);A--);}if(!b){i&&de(`failed to load icon "${x}"`);return}const v=`url("data:image/svg+xml;utf8,${St(b)}")`;return d==="auto"&&(d=b.includes("currentColor")?"mask":"bg"),d==="mask"?{"--un-icon":v,"-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",...l}:{background:`${v} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...l}},{layer:c,prefix:r}]]}}}function Se(t,e){const n=new Map;function s(r){if(Mt.includes(r))return n.has(r)||n.set(r,t(`${e}@iconify-json/${r}/icons.json`)),n.get(r)}return async(r,i,o)=>{let a=await be(r,i,o);if(a)return a;const f=await s(r);if(f){const u=[i,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.replace(/([a-z])(\d+)/g,"$1-$2")];a=await ve(f,r,u,o)}return a}}function kt(t){return Se(xe,t)}const Pt=jt(async t=>{const e=t?.customFetch,n=t?.cdn;return e&&n?Se(e,n):n?kt(n):be});function Lt(t){return t.replace(/-(\w)/g,(e,n)=>n?n.toUpperCase():"")}function ce(t){return t.charAt(0).toUpperCase()+t.slice(1)}function le(t){return t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var fe=["Webkit","Moz","ms"];function zt(t){const e={};function n(s){const r=e[s];if(r)return r;let i=Lt(s);if(i!=="filter"&&i in t)return e[s]=le(i);i=ce(i);for(let o=0;o<fe.length;o++){const a=`${fe[o]}${i}`;if(a in t)return e[s]=le(ce(a))}return s}return({entries:s})=>s.forEach(r=>{r[0].startsWith("--")||(r[0]=n(r[0]))})}function Tt(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function Ft(t={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}const e=window,n=window.document,s=()=>n.documentElement,r=e.__unocss||{},i=Object.assign({},t,r.runtime),o=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=P(o.postprocess)).unshift(zt(n.createElement("div").style)),i.configResolved?.(r,o);const f=nt(r,o),u=p=>i.inject?i.inject(p):s().prepend(p),c=()=>i.rootElement?i.rootElement():n.body,h=new Map;let g=!0,y=new Set,x,m,d=[];const $=()=>new Promise(p=>{d.push(p),m!=null&&clearTimeout(m),m=setTimeout(()=>l().then(()=>{const S=d;d=[],S.forEach(_=>_())}),0)});function w(p){if(p.nodeType!==1)return;const S=p;S.hasAttribute(a)&&S.removeAttribute(a),S.querySelectorAll(`[${a}]`).forEach(_=>{_.removeAttribute(a)})}function b(p,S){let _=h.get(p);if(!_)if(_=n.createElement("style"),_.setAttribute("data-unocss-runtime-layer",p),h.set(p,_),S==null)u(_);else{const E=b(S),k=E.parentNode;k?k.insertBefore(_,E.nextSibling):u(_)}return _}async function l(){const p=await f.generate(y);return p.layers.reduce((S,_)=>(b(_,S).innerHTML=p.getLayer(_)??"",_),void 0),y=p.matched,{...p,getStyleElement:S=>h.get(S),getStyleElements:()=>h}}async function v(p){const S=y.size;await f.applyExtractors(p,void 0,y),S!==y.size&&await $()}async function C(p=c()){const S=p&&p.outerHTML;S&&(await v(`${S} ${Tt(S)}`),w(s()),w(p))}const A=new MutationObserver(p=>{g||p.forEach(async S=>{if(S.target.nodeType!==1)return;const _=S.target;for(const E of h)if(_===E[1])return;if(S.type==="childList")S.addedNodes.forEach(async E=>{if(E.nodeType!==1)return;const k=E;x&&!x(k)||(await v(k.outerHTML),w(k))});else{if(x&&!x(_))return;if(S.attributeName!==a){const E=Array.from(_.attributes).map(j=>j.value?`${j.name}="${j.value}"`:j.name).join(" "),k=`<${_.tagName.toLowerCase()} ${E}>`;await v(k)}_.hasAttribute(a)&&_.removeAttribute(a)}})});let M=!1;function z(){if(M)return;const p=i.observer?.target?i.observer.target():c();p&&(A.observe(p,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),M=!0)}function T(){i.bypassDefined&&It(f.blocked),C(),z()}function I(){n.readyState==="loading"?e.addEventListener("DOMContentLoaded",T):T()}const N=e.__unocss_runtime=e.__unocss_runtime={version:f.version,uno:f,async extract(p){O(p)||(p.forEach(S=>y.add(S)),p=""),await v(p)},extractAll:C,inspect(p){x=p},toggleObserver(p){p===void 0?g=!g:g=!!p,!M&&!g&&I()},update:l,presets:e.__unocss_runtime?.presets??{}};i.ready?.(N)!==!1&&(g=!1,I())}function It(t=new Set){for(let e=0;e<document.styleSheets.length;e++){const n=document.styleSheets[e];let s;try{if(s=n.cssRules||n.rules,!s)continue;Array.from(s).flatMap(r=>r.selectorText?.split(/,/g)||[]).forEach(r=>{r&&(r=r.trim(),r.startsWith(".")&&(r=r.slice(1)),t.add(r))})}catch{continue}}return t}Ft({defaults:{presets:[Pt({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as D}from"./NNavbar.vue.823096f1.js";import{_ as B}from"./NCodeBlock.vue.c80c8282.js";import{o as c,m as _,k as s,d as S,r as v,bJ as j,bK as P,ay as U,a as p,ag as E,i as l,j as u,F as f,U as G,f as i,l as I,n as R,t as h,G as W,h as z,an as A,A as H}from"./entry.9a5af3dc.js";import{_ as J}from"./HelpFab.vue.6bf23ece.js";import"./client.b8ca1554.js";const K={class:"markdown-body"},L=s("h1",null,"Virtual Files",-1),q=s("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1),M=[L,q],O={__name:"virtual-files",setup(x,{expose:n}){return n({frontmatter:{}}),(d,a)=>(c(),_("div",K,M))}},Q=["onClick"],T=s("div",{"x-divider":""},null,-1),X={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Y={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},Z=s("span",{op75:""},"Select a file to start",-1),re=S({__name:"virtual-files",setup(x){const n=v(""),o=j(),d=P(),a=v();U(()=>{if(!d.value)return;const e=`/_vfs.json/${encodeURIComponent(d.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>a.value=t.current)});function y(e){if(o.value?.rootDir)return e.startsWith(o.value?.rootDir)?e.slice(o.value.rootDir.length):e}const m=p(()=>o.value?o.value.entries.filter(e=>!e.id.startsWith(`${o.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),k=p(()=>new E(m.value,{keys:["id","path"]})),b=p(()=>n.value?k.value.search(n.value).map(e=>e.item):m.value);return(e,t)=>{const g=D,$=B,C=A,F=H,N=G,V=O,w=J;return c(),_(f,null,[l(N,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l(g,{search:i(n),"onUpdate:search":t[0]||(t[0]=r=>I(n)?n.value=r:null),"no-padding":"",p3:""},null,8,["search"]),(c(!0),_(f,null,R(i(b),r=>(c(),_(f,{key:r.id},[s("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:W(r.id===i(a)?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:ee=>d.value=r.id},h(y(r.id)),11,Q),T],64))),128))]),right:u(()=>[i(a)?.content?(c(),_("div",X,[s("div",Y,[s("code",null,h(i(a).id),1)]),l($,{"h-full":"","of-auto":"","text-sm":"",code:i(a).content,lang:"typescript"},null,8,["code"])])):(c(),z(F,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>[Z]),_:1})]),_:1}))]),_:1}),l(w,null,{default:u(()=>[l(V)]),_:1})],64)}}});export{re as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"./vue.7ad3b25a.js";import e from"./javascript.b7d6d348.js";import"./html.14085b69.js";import"./css.f61fd02b.js";import"./typescript.24e7badf.js";import"./json.709f1c4d.js";import"./yaml.b29e536f.js";const n=Object.freeze({name:"vue-html",scopeName:"text.html.vue-html",fileTypes:[],uuid:"ca2e4260-5d62-45bf-8cf1-d8b5cc19c8f8",patterns:[{include:"source.vue#vue-interpolations"},{name:"meta.tag.any.html",begin:"(<)([A-Z][a-zA-Z0-9:-]*)(?=[^>]*></\\2>)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"support.class.component.html"}},end:"(>)(<)(/)(\\2)(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"},2:{name:"punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html"},3:{name:"punctuation.definition.tag.begin.html"},4:{name:"support.class.component.html"},5:{name:"punctuation.definition.tag.end.html"}},patterns:[{include:"#tag-stuff"}]},{name:"meta.tag.any.html",begin:"(<)([a-z][a-zA-Z0-9:-]*)(?=[^>]*></\\2>)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.html"}},end:"(>)(<)(/)(\\2)(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"},2:{name:"punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html"},3:{name:"punctuation.definition.tag.begin.html"},4:{name:"entity.name.tag.html"},5:{name:"punctuation.definition.tag.end.html"}},patterns:[{include:"#tag-stuff"}]},{name:"meta.tag.preprocessor.xml.html",begin:"(<\\?)(xml)",end:"(\\?>)",captures:{1:{name:"punctuation.definition.tag.html"},2:{name:"entity.name.tag.xml.html"}},patterns:[{include:"#tag-generic-attribute"},{include:"#string-double-quoted"},{include:"#string-single-quoted"}]},{name:"comment.block.html",begin:"<!--",end:"-->",captures:{0:{name:"punctuation.definition.comment.html"}}},{name:"meta.tag.sgml.html",begin:"<!",end:">",captures:{0:{name:"punctuation.definition.tag.html"}},patterns:[{name:"meta.tag.sgml.doctype.html",begin:"(?i:DOCTYPE)",end:"(?=>)",captures:{1:{name:"entity.name.tag.doctype.html"}},patterns:[{name:"string.quoted.double.doctype.identifiers-and-DTDs.html",match:'"[^">]*"'}]},{name:"constant.other.inline-data.html",begin:"\\[CDATA\\[",end:"]](?=>)"},{name:"invalid.illegal.bad-comments-or-CDATA.html",match:"(\\s*)(?!--|>)\\S(\\s*)"}]},{name:"meta.tag.block.any.html",begin:"(</?)([A-Z][a-zA-Z0-9:-]*\\b)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"support.class.component.html"}},end:"(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},patterns:[{include:"#tag-stuff"}]},{name:"meta.tag.block.any.html",begin:"(</?)([a-z][a-zA-Z0-9:-]*\\b)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.block.any.html"}},end:"(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},patterns:[{include:"#tag-stuff"}]},{name:"meta.tag.structure.any.html",begin:"(</?)((?i:body|head|html)\\b)",end:"(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},captures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.structure.any.html"}},patterns:[{include:"#tag-stuff"}]},{name:"meta.tag.block.any.html",begin:"(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)(?!-)\\b)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.block.any.html"}},end:"(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},patterns:[{include:"#tag-stuff"}]},{name:"meta.tag.inline.any.html",begin:"(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)(?!-)\\b)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.inline.any.html"}},end:"(/?>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},patterns:[{include:"#tag-stuff"}]},{name:"meta.tag.other.html",begin:"(</?)([a-zA-Z0-9:-]+)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.other.html"}},end:"(/?>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},patterns:[{include:"#tag-stuff"}]},{include:"#entities"},{name:"invalid.illegal.incomplete.html",match:"<>"},{name:"invalid.illegal.bad-angle-bracket.html",match:"<"}],repository:{entities:{patterns:[{name:"constant.character.entity.html",match:"(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",captures:{1:{name:"punctuation.definition.entity.html"},3:{name:"punctuation.definition.entity.html"}}},{name:"invalid.illegal.bad-ampersand.html",match:"&"}]},"string-double-quoted":{name:"string.quoted.double.html",begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.html"}},patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},"string-single-quoted":{name:"string.quoted.single.html",begin:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},"tag-generic-attribute":{name:"entity.other.attribute-name.html",match:"(?<=[^=])\\b([a-zA-Z0-9:\\-_]+)"},"tag-id-attribute":{name:"meta.attribute-with-value.id.html",begin:"\\b(id)\\b\\s*(=)",end:`(?!\\G)(?<='|"|[^\\s<>/])`,captures:{1:{name:"entity.other.attribute-name.id.html"},2:{name:"punctuation.separator.key-value.html"}},patterns:[{name:"string.quoted.double.html",contentName:"meta.toc-list.id.html",begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.html"}},patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},{name:"string.quoted.single.html",contentName:"meta.toc-list.id.html",begin:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},{name:"string.unquoted.html",match:`(?<==)(?:[^\\s<>/'"]|/(?!>))+`,captures:{0:{name:"meta.toc-list.id.html"}}}]},"tag-stuff":{patterns:[{include:"#vue-directives"},{include:"#tag-id-attribute"},{include:"#tag-generic-attribute"},{include:"#string-double-quoted"},{include:"#string-single-quoted"},{include:"#unquoted-attribute"}]},"unquoted-attribute":{name:"string.unquoted.html",match:`(?<==)(?:[^\\s<>/'"]|/(?!>))+`},"vue-directives":{name:"meta.directive.vue",begin:"(?:\\b(v-)|(:|@|#))([a-zA-Z0-9\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",end:"(?<='|\")|(?=[\\s<>`])",captures:{1:{name:"entity.other.attribute-name.html"},2:{name:"punctuation.separator.key-value.html"},3:{name:"entity.other.attribute-name.html"},4:{name:"entity.other.attribute-name.html"},5:{name:"entity.other.attribute-name.html"},6:{name:"punctuation.separator.key-value.html"}},patterns:[{name:"source.directive.vue",begin:"`",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:"`",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},patterns:[{include:"source.js#expression"}]},{name:"source.directive.vue",begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.html"}},patterns:[{include:"source.js#expression"}]},{name:"source.directive.vue",begin:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},patterns:[{include:"source.js#expression"}]}]}},displayName:"Vue HTML",embeddedLangs:["vue","javascript"]});var r=[...t,...e,n];export{r as default};
|