@nuxt/devtools 1.3.14 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +6 -6
- package/dist/chunks/vscode.mjs +2 -2
- package/dist/chunks/vue-devtools.mjs +1 -1
- package/dist/client/200.html +20 -20
- package/dist/client/404.html +20 -20
- package/dist/client/_nuxt/{D4Ks82zD.js → 2WsLw058.js} +1 -1
- package/dist/client/_nuxt/{B-wfK0SS.js → A56qLMdk.js} +1 -1
- package/dist/client/_nuxt/{rLudNEh9.js → AIZ3trgN.js} +1 -1
- package/dist/client/_nuxt/{BZvh3yot.js → B2aNs1qV.js} +1 -1
- package/dist/client/_nuxt/{JMx2uAI6.js → B6H_wowy.js} +1 -1
- package/dist/client/_nuxt/{BHBvn5Xs.js → BAJXKRnU.js} +1 -1
- package/dist/client/_nuxt/{CE84j0J9.js → BD_-z3C6.js} +1 -1
- package/dist/client/_nuxt/{CxLTb5RC.js → BF2Zv_ac.js} +1 -1
- package/dist/client/_nuxt/{zjxoDR5L.js → BFisL5PK.js} +1 -1
- package/dist/client/_nuxt/BMbUeBqv.js +1 -1
- package/dist/client/_nuxt/{CPr4CZHz.js → BNFg_2hU.js} +1 -1
- package/dist/client/_nuxt/{Dv0NFAnW.js → BQnF4QpF.js} +1 -1
- package/dist/client/_nuxt/{DwVKZd3-.js → BRmBiXYU.js} +1 -1
- package/dist/client/_nuxt/BTojbgVV.js +1 -0
- package/dist/client/_nuxt/BZflAdyk.js +43 -0
- package/dist/client/_nuxt/{CPWqrNrA.js → Bb8Qkg2j.js} +1 -1
- package/dist/client/_nuxt/{Cb_ad2sg.js → BcmtLNjB.js} +1 -1
- package/dist/client/_nuxt/{DwdKwQHN.js → BgwfQLiC.js} +1 -1
- package/dist/client/_nuxt/BhPGnnSc.js +1 -0
- package/dist/client/_nuxt/{CVW-sDYN.js → Bn9bQn_0.js} +1 -1
- package/dist/client/_nuxt/{ewAh1ZiX.js → BtVX2hui.js} +1 -1
- package/dist/client/_nuxt/{DKlNNSWk.js → BwlD2UKZ.js} +1 -1
- package/dist/client/_nuxt/{DoQHeYxB.js → By8bKr-N.js} +3 -3
- package/dist/client/_nuxt/C8RrL2-P.js +1 -1
- package/dist/client/_nuxt/{C4OO6w_e.js → CD1NqIIM.js} +1 -1
- package/dist/client/_nuxt/{B2TuRHFi.js → CGrOFGU2.js} +1 -1
- package/dist/client/_nuxt/{BMUgLter.js → CHRohc05.js} +1 -1
- package/dist/client/_nuxt/{CyS6YlEb.js → CKMxd-JB.js} +1 -1
- package/dist/client/_nuxt/{BO314c-_.js → CROnmYq8.js} +1 -1
- package/dist/client/_nuxt/{CcKfWHXB.js → CSdo01uo.js} +1 -1
- package/dist/client/_nuxt/CTKqK4eG.js +1 -1
- package/dist/client/_nuxt/{yFeWtr-M.js → CTgwY-nX.js} +1 -1
- package/dist/client/_nuxt/{2tJW9cKr.js → C_QixTwI.js} +1 -1
- package/dist/client/_nuxt/CbViG2Xw.js +1 -1
- package/dist/client/_nuxt/{CA5wVMK1.js → CbWJw1kk.js} +1 -1
- package/dist/client/_nuxt/{CnW1WPg6.js → CmukqgDs.js} +1 -1
- package/dist/client/_nuxt/{DVZAdofw.js → CqEMLpLr.js} +1 -1
- package/dist/client/_nuxt/{BkmSFWMo.js → D43mkQK_.js} +1 -1
- package/dist/client/_nuxt/DDMtKJxh.js +1 -1
- package/dist/client/_nuxt/{CsgBhI1g.js → DEF_vpGm.js} +1 -1
- package/dist/client/_nuxt/{BF_UD7ZT.js → DKNVc3Pf.js} +1 -1
- package/dist/client/_nuxt/{DN0HCnq5.js → DLUNO0Xm.js} +1 -1
- package/dist/client/_nuxt/{viHXAOJs.js → DLu2RzFt.js} +1 -1
- package/dist/client/_nuxt/{Bi99gj7u.js → DO36ltOt.js} +1 -1
- package/dist/client/_nuxt/{CWyKSuRn.js → DQZBaF2J.js} +1 -1
- package/dist/client/_nuxt/{Cic6Ln_D.js → DTOtwcdp.js} +1 -1
- package/dist/client/_nuxt/{BEKXAodE.js → DWfDPvkq.js} +1 -1
- package/dist/client/_nuxt/{BcJweaq3.js → Das97jHp.js} +1 -1
- package/dist/client/_nuxt/{CyvuMq07.js → DeV-19Y9.js} +1 -1
- package/dist/client/_nuxt/{BZZpaKJQ.js → DjP2QASF.js} +1 -1
- package/dist/client/_nuxt/{Di9lD2rK.js → DnvoyAD8.js} +1 -1
- package/dist/client/_nuxt/DpYuRYxj.js +1 -1
- package/dist/client/_nuxt/{BrzmMRQX.js → Dru2Tyw8.js} +1 -1
- package/dist/client/_nuxt/{Bl8OBrwH.js → DwafjdGG.js} +1 -1
- package/dist/client/_nuxt/DxBIjTmI.js +9 -0
- package/dist/client/_nuxt/{CfVBzxeB.js → DyhAO93-.js} +1 -1
- package/dist/client/_nuxt/{gXK6hV6W.js → GjTC5NxA.js} +1 -1
- package/dist/client/_nuxt/{zLQhdF7m.js → L-yiqDbL.js} +1 -1
- package/dist/client/_nuxt/{VNvxalkE.js → SOK9_XgA.js} +1 -1
- package/dist/client/_nuxt/{DYx1ZwvQ.js → Sexyi49-.js} +1 -1
- package/dist/client/_nuxt/{CLVHkiJk.js → T04KvlgM.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/4dfa6860-b8c0-4ad3-a283-0de7e742bb5a.json +1 -0
- package/dist/client/_nuxt/{D8XE2BC8.js → dYpGFgFL.js} +1 -1
- package/dist/client/_nuxt/{D-a-w6CR.js → dnEdyJOX.js} +1 -1
- package/dist/client/_nuxt/error-404.4OGL5unG.css +1 -0
- package/dist/client/_nuxt/error-500.CVlaxm9G.css +1 -0
- package/dist/client/_nuxt/{CmbkPMjd.js → lc4WPc7a.js} +1 -1
- package/dist/client/_nuxt/{awWHqjli.js → sdlgwPR1.js} +1 -1
- package/dist/client/_nuxt/{CjFkCrIW.js → vukXLwum.js} +1 -1
- package/dist/client/_nuxt/{pl_4MfI2.js → wDknflE0.js} +1 -1
- package/dist/client/_nuxt/{BWPbreBU.js → x4RoSwOc.js} +1 -1
- package/dist/client/index.html +20 -20
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +2 -2
- package/dist/runtime/function-metrics-helpers.d.ts +1 -1
- package/dist/runtime/{function-metrics-helpers.mjs → function-metrics-helpers.js} +1 -1
- package/dist/runtime/plugins/{devtools.client.mjs → devtools.client.js} +2 -2
- package/dist/runtime/plugins/view/FrameBox.vue +5 -49
- package/dist/runtime/plugins/view/Main.vue +1 -147
- package/dist/runtime/plugins/view/client.d.ts +1 -1
- package/dist/runtime/plugins/view/{client.mjs → client.js} +2 -2
- package/dist/runtime/plugins/view/state.d.ts +1 -1
- package/dist/runtime/plugins/view/{state.mjs → state.js} +1 -1
- package/dist/runtime/settings.d.ts +1 -1
- package/dist/runtime/shared/hooks.d.ts +1 -1
- package/dist/runtime/use-nuxt-devtools.d.ts +1 -1
- package/package.json +10 -10
- package/dist/client/_nuxt/Cvo3JE8Q.js +0 -1
- package/dist/client/_nuxt/W2Tyz6z1.js +0 -9
- package/dist/client/_nuxt/builds/meta/a69820c2-31c2-48f6-8161-842a62467079.json +0 -1
- package/dist/client/_nuxt/ciodjZaS.js +0 -43
- package/dist/client/_nuxt/error-404.Bssqox27.css +0 -1
- package/dist/client/_nuxt/error-500.D3oXMFZl.css +0 -1
- package/dist/client/_nuxt/z0xAc3RC.js +0 -1
- /package/dist/runtime/nitro/{inline.mjs → inline.js} +0 -0
- /package/dist/runtime/plugins/{devtools.server.mjs → devtools.server.js} +0 -0
- /package/dist/runtime/plugins/view/{utils.mjs → utils.js} +0 -0
- /package/dist/runtime/{settings.mjs → settings.js} +0 -0
- /package/dist/runtime/shared/{hooks.mjs → hooks.js} +0 -0
- /package/dist/runtime/{use-nuxt-devtools.mjs → use-nuxt-devtools.js} +0 -0
- /package/dist/runtime/vue-devtools/{overlay.d.mts → overlay.d.ts} +0 -0
- /package/dist/runtime/vue-devtools/{overlay.mjs → overlay.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as C}from"./
|
|
1
|
+
import{_ as C}from"./B2aNs1qV.js";import{d as h,bl as S,e as x,a as w,aD as B,o as n,m as s,k as a,F as i,n as N,G as u,f as o,t as $,i as _,j as m,v as f,h as V,p,_ as D}from"./BZflAdyk.js";const T={key:0,relative:"","n-code-block":""},E={flex:"~ wrap","w-full":""},F=["onClick"],L=a("div",{border:"b base","flex-auto":""},null,-1),j={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},q=h({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(v){const c=v,e=S(c.codeSnippets[0]),b=x(),k=w(()=>e.value?.lang||"text");return B(()=>{c.codeSnippets.includes(e.value)||(e.value=c.codeSnippets[0])}),(l,r)=>{const y=C,d=D;return l.codeSnippets.length?(n(),s("div",T,[a("div",E,[(n(!0),s(i,null,N(l.codeSnippets,(t,g)=>(n(),s("button",{key:g,px4:"",py2:"",border:"r base",hover:"bg-active",class:u(t===o(e)?"":"border-b"),onClick:z=>e.value=t},[a("div",{class:u(t===o(e)?"":"op30"),"font-mono":""},$(t.name),3)],10,F))),128)),L]),o(e)?(n(),s(i,{key:0},[_(y,{code:o(e).code,lang:o(k),lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),a("div",j,[_(d,{icon:"carbon-copy",onClick:r[0]||(r[0]=t=>o(b)(o(e).code,l.eventType||`code-snippet-${o(e).name}`))},{default:m(()=>[f(" Copy ")]),_:1}),o(e)?.docs?(n(),V(d,{key:0,to:o(e).docs,target:"_blank",icon:"carbon-catalog"},{default:m(()=>[f(" Docs ")]),_:1},8,["to"])):p("",!0)])],64)):p("",!0)])):p("",!0)}}});export{q as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,a0 as c,o as r,m as u,I as h,c4 as p,f as t,k as l,l as b,ae as m,aa as f}from"./
|
|
1
|
+
import{d as i,a0 as c,o as r,m as u,I as h,c4 as p,f as t,k as l,l as b,ae as m,aa as f}from"./BZflAdyk.js";const v=["checked","disabled"],k=["disabled"],w=l("div",{class:"n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},[l("div",{class:"n-checked:n-switch-thumb-checked n-switch-thumb n-transition"})],-1),V=i({__name:"NSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(o,{emit:d}){const e=c(o,"modelValue",d,{passive:!0});return(a,s)=>(r(),u("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:t(e)||null,disabled:a.disabled||null},[h(l("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>b(e)?e.value=n:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=m(n=>e.value=!t(e),["enter"]))},null,40,k),[[p,t(e)]]),w,f(a.$slots,"default")],8,v))}});export{V as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as n,o,m as s,aa as t}from"./
|
|
1
|
+
import{q as n,o,m as s,aa as t}from"./BZflAdyk.js";const a={},c={class:"n-badge"};function _(e,r){return o(),s("span",c,[t(e.$slots,"default")])}const d=n(a,[["render",_]]);export{d as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as x,o as n,m as i,F as M,n as S,i as p,k as _,h as I,aN as k,f as e,p as b,a as g,ax as C,aO as B,t as X,ab as U,r as D,ah as z,aw as H,j as v,l as N,a6 as j}from"./
|
|
1
|
+
import{d as x,o as n,m as i,F as M,n as S,i as p,k as _,h as I,aN as k,f as e,p as b,a as g,ax as C,aO as B,t as X,ab as U,r as D,ah as z,aw as H,j as v,l as N,a6 as j}from"./BZflAdyk.js";import{_ as P}from"./dYpGFgFL.js";import{_ as O}from"./2WsLw058.js";import{_ as L}from"./BFisL5PK.js";import{_ as R}from"./AIZ3trgN.js";import{_ as Y}from"./BgwfQLiC.js";import{_ as q}from"./T04KvlgM.js";import{D as E}from"./BcJws1i5.js";import"./BRmBiXYU.js";import"./CTgwY-nX.js";import"./L-yiqDbL.js";const G={flex:"~ wrap gap2",p2:"",pl4:""},J=x({__name:"ComposableTree",props:{map:{},root:{},metadata:{}},setup(y){return(r,m)=>{const a=L,d=R;return n(),i("div",null,[(n(!0),i(M,null,S(r.map.entries(),([o,h])=>(n(),i("div",{key:o},[p(a,{filepath:o,op50:"","hover:underline":""},null,8,["filepath"]),_("div",G,[(n(!0),i(M,null,S(h,$=>(n(),I(d,{key:$.as,item:$,metadata:r.metadata,filepath:o.match(/^[\w@]/)?void 0:o},null,8,["item","metadata","filepath"]))),128))])]))),128))])}}}),K={key:0,flex:"~ col gap-2 items-start"},Q=x({__name:"HelpImportsDirs",setup(y){const r=k();return(m,a)=>{const d=L;return e(r)?.dirs?(n(),i("div",K,[(n(!0),i(M,null,S(e(r).dirs,o=>(n(),I(d,{key:o,filepath:o,"text-primary":""},null,8,["filepath"]))),128))])):b("",!0)}}}),W={flex:"~ gap-2 wrap",mb6:""},Z=x({__name:"HelpImportsModules",setup(y){const r=k(),m=g(()=>[...new Set(r.value?.imports.map(a=>C(a.from)).filter(a=>!!a&&!B(a)))]);return(a,d)=>(n(),i("div",W,[(n(!0),i(M,null,S(e(m),o=>(n(),i("code",{key:o,rounded:"","bg-primary:5":"",p:"x2 y0.5","text-primary":""},X(o),1))),128))]))}}),ee={class:"markdown-body"},oe=_("h1",null,"Auto imports",-1),te=_("p",null,"Nuxt auto-imports helper functions, composables and Vue APIs to be used across your application without explicitly importing them. Based on the directory structure, every Nuxt application can also use auto-imports for its own components, composables and plugins. Components, composables or plugins can use these functions.",-1),ne=_("hr",null,null,-1),se=_("p",null,"According to your config, exports of files under the following folders will be registed as auto-imports entry:",-1),ae=_("p",null,"Meanwhile, modules could also provide auto-imports for their own components. You have auto-imports from the following modules as well:",-1),re=_("hr",null,null,-1),le=_("p",null,[_("a",{href:"https://nuxt.com/docs/guide/concepts/auto-imports",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),ie={__name:"imports",setup(y,{expose:r}){return r({frontmatter:{}}),(a,d)=>{const o=Q,h=Z;return n(),i("div",ee,[oe,te,ne,se,p(o),ae,p(h),re,le])}}},ue=ie,pe={key:0,relative:"","h-full":"","of-auto":""},me={key:0,flex:"~ gap-2 items-center"},$e=x({__name:"imports",setup(y){const r=U(),m=D("all"),a=D(""),d=k(),o=g(()=>d.value?.metadata),h=g(()=>d.value?.imports.filter(s=>s.as||s.name).sort((s,u)=>(s.as||s.name).localeCompare(u.as||u.name))||[]),$=g(()=>new z(h.value,{keys:["from","as","name"]})),l=g(()=>{const s=new Map,u=new Map,w=new Map;let f=a.value?$.value.search(a.value).map(t=>t.item):h.value;m.value==="using"&&o.value?f=f.filter(t=>(t.as||t.name)in o.value.injectionUsage):m.value==="not-used"&&o.value&&(f=f.filter(t=>!((t.as||t.name)in o.value.injectionUsage)));const A={user:0,lib:0,builtin:0};return f.forEach(t=>{const c=H(t.from)?B(C(t.from))?w:u:s;c.has(t.from)||c.set(t.from,[]),c.get(t.from).push(t),A[c===s?"user":c===u?"lib":"builtin"]++}),{user:s,lib:u,builtin:w,count:A}});return(s,u)=>{const w=j,f=P,A=O,t=J,c=Y,F=ue,V=q;return n(),i(M,null,[e(r)?(n(),i("div",pe,[p(A,{search:e(a),"onUpdate:search":u[1]||(u[1]=T=>N(a)?a.value=T:null),pb3:""},{default:v(()=>[e(o)?(n(),i("div",me,[p(w,{icon:"carbon-filter",op50:""}),p(f,{modelValue:e(m),"onUpdate:modelValue":u[0]||(u[0]=T=>N(m)?m.value=T:null),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"])])):b("",!0)]),_:1},8,["search"]),e(l).user.size?(n(),I(c,{key:0,open:e(l).count.user<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:e(E)),icon:"carbon-function",text:"User composables",description:`${e(l).count.user} composables from ${e(l).user.size} modules`},{default:v(()=>[p(t,{map:e(l).user,root:e(r).rootDir,metadata:e(o)},null,8,["map","root","metadata"])]),_:1},8,["open","description"])):b("",!0),e(l).builtin.size?(n(),I(c,{key:1,open:e(l).count.builtin<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:e(E)),icon:"simple-icons-nuxtdotjs",text:"Built-in composables",description:`${e(l).count.builtin} composables`},{default:v(()=>[p(t,{map:e(l).builtin,root:e(r).rootDir,metadata:e(o)},null,8,["map","root","metadata"])]),_:1},8,["open","description"])):b("",!0),e(l).lib.size?(n(),I(c,{key:2,open:e(l).count.lib<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:e(E)),icon:"carbon-3d-mpr-toggle",text:"Composables from libraries",description:`${e(l).count.lib} composables from ${e(l).lib.size} packages`},{default:v(()=>[p(t,{map:e(l).lib,root:e(r).rootDir,metadata:e(o)},null,8,["map","root","metadata"])]),_:1},8,["open","description"])):b("",!0)])):b("",!0),p(V,null,{default:v(()=>[p(F)]),_:1})],64)}}});export{$e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as te,m as Se,k as X,d as Yi,a as rr,v as Qc,t as al,f as K,e as mT,i as _e,h as st,p as lt,F as dr,n as wn,aa as Al,_ as ff,r as _n,ao as bT,ap as $T,ab as wT,aq as _T,ar as ET,as as ST,w as OT,j as He,l as Ur,B as l1,at as TT,au as IT,G as PT,av as kT,ah as CT,aw as xT,ax as AT,ay as ts,a6 as RT,am as DT,a2 as MT,az as NT,I as Gv}from"./
|
|
1
|
+
import{o as te,m as Se,k as X,d as Yi,a as rr,v as Qc,t as al,f as K,e as mT,i as _e,h as st,p as lt,F as dr,n as wn,aa as Al,_ as ff,r as _n,ao as bT,ap as $T,ab as wT,aq as _T,ar as ET,as as ST,w as OT,j as He,l as Ur,B as l1,at as TT,au as IT,G as PT,av as kT,ah as CT,aw as xT,ax as AT,ay as ts,a6 as RT,am as DT,a2 as MT,az as NT,I as Gv}from"./BZflAdyk.js";import{_ as FT}from"./T04KvlgM.js";import{u as BT,a as LT}from"./Bb8Qkg2j.js";import{_ as jT}from"./x4RoSwOc.js";import{_ as u1}from"./2WsLw058.js";import{_ as d1}from"./DO36ltOt.js";import{_ as c1}from"./BFisL5PK.js";import{_ as zT}from"./BwlD2UKZ.js";import{_ as HT}from"./dYpGFgFL.js";import{_ as WT}from"./BgwfQLiC.js";import{_ as VT}from"./L-yiqDbL.js";import{D as Nu}from"./BcJws1i5.js";const UT={class:"markdown-body"},GT=X("h1",null,"Components",-1),KT=X("p",null,"Vue Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. This is very similar to how we nest native HTML elements, but Vue implements its own component model that allow us to encapsulate custom content and logic in each component.",-1),qT=X("p",null,"Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1),YT=X("p",null,[X("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),XT=[GT,KT,qT,YT],QT={__name:"components",setup(r,{expose:i}){return i({frontmatter:{}}),(t,n)=>(te(),Se("div",UT,XT))}},JT=QT,ZT=/\d/,eI=["-","_","/","."];function tI(r=""){if(!ZT.test(r))return r!==r.toLowerCase()}function rI(r,i){const e=eI,t=[];if(!r||typeof r!="string")return t;let n="",a,o;for(const s of r){const l=e.includes(s);if(l===!0){t.push(n),n="",a=void 0;continue}const u=tI(s);if(o===!1){if(a===!1&&u===!0){t.push(n),n=s,a=u;continue}if(a===!0&&u===!1&&n.length>1){const d=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=d+s,a=u;continue}}n+=s,a=u,o=l}return t.push(n),t}function nI(r){return r?r[0].toUpperCase()+r.slice(1):""}function h1(r,i){return r?(Array.isArray(r)?r:rI(r)).map(e=>nI(e)).join(""):""}const iI={"text-sm":"","font-mono":""},aI=X("span",{mr1:"",op20:""},"<",-1),oI=X("span",{ml1:"",op20:""},"/>",-1),f1=Yi({__name:"ComponentName",props:{component:{}},setup(r){const i=r,e=rr(()=>i.component.pascalName||h1(i.component.name||i.component.__name||i.component.kebabName||""));return(t,n)=>(te(),Se("code",iI,[aI,Qc(al(K(e)),1),oI]))}}),sI={flex:"~ col gap1","items-start":"","of-hidden":""},lI={flex:"~ gap2",px3:""},uI={px3:"",pb2:""},dI={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},cI={"text-sm":""},hI={"text-primary":""},fI=X("span",{op50:""}," references",-1),vI={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},pI={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},gI={"text-sm":""},yI={"text-primary":""},mI=X("span",{op50:""}," dependencies",-1),bI={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},v1=Yi({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(r){const i=r,e=rr(()=>i.component.pascalName||h1(i.component.name||i.component.__name||i.component.kebabName||"")),t=rr(()=>i.component.filePath||i.component.file||i.component.__file||""),n=mT();return(a,o)=>{const s=f1,l=ff,u=d1,d=c1;return te(),Se("div",sI,[X("div",lI,[_e(s,{component:a.component},null,8,["component"]),_e(l,{title:"Copy name","flex-none":"",icon:"carbon-copy",border:!1,onClick:o[0]||(o[0]=c=>K(n)(`<${K(e)}></${K(e)}>`,"component-name"))}),a.component.global?(te(),st(u,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):lt("",!0)]),X("div",uI,[K(t)?(te(),st(d,{key:0,filepath:K(t),"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):lt("",!0)]),a.dependents?(te(),Se("div",dI,[X("div",cI,[X("strong",hI,al(a.dependents.length),1),fI]),a.dependents.length?(te(),Se("div",vI,[(te(!0),Se(dr,null,wn(a.dependents,c=>(te(),st(d,{key:c,filepath:c},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),a.dependencies?(te(),Se("div",pI,[X("div",gI,[X("strong",yI,al(a.dependencies.length),1),mI]),a.dependencies.length?(te(),Se("div",bI,[(te(!0),Se(dr,null,wn(a.dependencies,c=>(te(),st(d,{key:c,filepath:c},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),Al(a.$slots,"default")])}}});/**
|
|
2
2
|
* vis-data
|
|
3
3
|
* http://visjs.org/
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as X,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,Z as ue,A as de}from"./
|
|
1
|
+
import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as X,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,Z as ue,A as de}from"./BZflAdyk.js";import{_ as ce}from"./BFisL5PK.js";import{_ as me}from"./B2aNs1qV.js";import{_ as _e}from"./x4RoSwOc.js";import{_ as pe}from"./T04KvlgM.js";import"./CTgwY-nX.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ve={flex:"~ wrap","w-full":""},he=["onClick"],ye=e("div",{border:"b base","flex-auto":""},null,-1),be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},$e=e("div",{"flex-auto":""},null,-1),xe={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},ge=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),we=e("div",{"text-sm":"",op50:""}," Name ",-1),ze=e("div",{"i-carbon-time":"","text-xl":""},null,-1),Be=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Ce=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ne=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Te=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Ae=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),De=e("div",{"text-sm":"",op50:""}," Built ",-1),Ie=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ve=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Se=e("div",{"flex-auto":""},null,-1),Fe=P({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(k){const v=k,x=`${X().app.baseURL}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),g=I(()=>{const n=[{name:"Overview",id:"overview"}];return v.current.features.bundleClient&&n.push({name:"Client Bundle",id:"bundle-client"}),v.current.features.bundleNitro&&n.push({name:"Nitro Bundle",id:"bundle-nitro"}),v.current.features.viteInspect&&n.push({name:"Vite Inspect",id:"vite-inspect"}),n}),i=V(g.value[0]);function h(n){return n<1024?`${n}B`:n<1024*1024?`${(n/1024).toFixed(1)}KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)}MB`:`${(n/1024/1024/1024).toFixed(1)}GB`}function d(n){return`${((n.endTime-n.startTime)/1e3).toFixed(1)}s`}async function N(n){return F.clearAnalyzeBuilds(await E(),[n])}return(n,c)=>{const B=ce,T=G;return o(),s("div",fe,[e("div",ve,[(o(!0),s(_,null,j(t(g),(l,m)=>(o(),s("button",{key:m,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(l.id===t(i).id?"":"border-b"),onClick:w=>i.value=l},[e("div",{class:S(l.id===t(i).id?"":"op30")},p(l.name),3)],10,he))),128)),ye]),t(i).id==="overview"?(o(),s("div",be,[$e,e("div",xe,[ge,e("div",null,[we,e("div",null,p(n.current.name),1)]),ze,e("div",null,[Be,e("div",null,p(d(n.current)),1)]),n.current.size?.clientBundle?(o(),s(_,{key:0},[Ce,e("div",null,[ke,e("div",null,p(h(n.current.size.clientBundle)),1)])],64)):b("",!0),n.current.size.nitroBundle?(o(),s(_,{key:1},[Ne,e("div",null,[Te,e("div",null,p(h(n.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,p(t(U)(new Date(n.current.endTime))),1)]),Ie,e("div",null,[Ve,u(B,{filepath:n.current.analyzeDir},null,8,["filepath"])])]),Se,u(T,{n:"rose",icon:"carbon-delete",onClick:c[0]||(c[0]=l=>N(n.current.name))},{default:r(()=>[f(" Delete this report ")]),_:1})])):b("",!0),c._lazyshow1||t(i).id==="bundle-client"?(c._lazyshow1=!0,o(),s(_,null,[A(e("iframe",{src:`${t(x)}${n.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-client"]])],64)):b("v-show-if",!0),c._lazyshow2||t(i).id==="bundle-nitro"?(c._lazyshow2=!0,o(),s(_,null,[A(e("iframe",{src:`${t(x)}${n.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-nitro"]])],64)):b("v-show-if",!0),c._lazyshow3||t(i).id==="vite-inspect"?(c._lazyshow3=!0,o(),s(_,null,[A(e("iframe",{src:`${t(x)}${n.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Re={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),je=e("p",null,[f("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Ue=[Pe,je],Ee={__name:"analyze-build",setup(k,{expose:v}){return v({frontmatter:{}}),(x,g)=>(o(),s("div",Re,Ue))}},Ge=Ee,Le={flex:"~ col"},Oe=["onClick"],He={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},Ke=e("div",{"i-carbon-time":""},null,-1),Me=e("div",{"flex-auto":""},null,-1),We=e("div",{"x-divider":""},null,-1),Ye={flex:"~ items-center justify-center wrap",p4:""},Ze={flex:"~ col gap-1","w-250":"",p4:""},Je=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Qe=e("p",{op50:""}," Enter the name of the build: ",-1),Xe=e("div",{my3:"","x-divider":""},null,-1),qe=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),en={flex:"~ gap-3",mt2:"","justify-end":""},rn=P({__name:"analyze-build",setup(k){const v=q(),$=ee(),x=ne(),g=te("analyze-build:slug",""),i=I(()=>$.value?.builds.find(l=>l.slug===g.value)??$.value?.builds[0]),h=V(!1),d=V(""),N=I(()=>$.value?.builds.some(l=>l.name===d.value.trim()));async function n(){d.value=await F.generateAnalyzeBuildName(),await v.start()&&(se("analyze-build:start"),C.value={name:d.value,processId:await F.startAnalyzeBuild(await E(),d.value)},h.value&&B())}const c=oe();function B(){C.value?.processId&&(c.value=C.value.processId,x.push("/modules/terminals"))}function T(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:n}]),(l,m)=>{const w=G,L=Fe,O=de,H=ie,K=ae,M=re,W=me,Y=_e,Z=ue,J=Ge,Q=pe;return o(),s(_,null,[u(H,{"left-size":30},{left:r(()=>[e("div",Le,[(o(!0),s(_,null,j(t($)?.builds,a=>(o(),s(_,{key:a.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(a.slug===t(i)?.slug?"text-primary bg-active":""),onClick:y=>g.value=a.slug},[e("code",null,p(a.name),1),e("div",He,[Ke,e("span",null,p(T(a)),1),Me,e("span",null,p(t(U)(new Date(a.endTime))),1)])],10,Oe),We],64))),128)),e("div",Ye,[("processAnalyzeBuildInfo"in l?l.processAnalyzeBuildInfo:t(C))?(o(),z(w,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:m[1]||(m[1]=a=>B())},{default:r(()=>[f(" Building... ")]),_:1})):(o(),z(w,{key:0,n:"primary",icon:"carbon-edge-node",onClick:m[0]||(m[0]=a=>n())},{default:r(()=>[f(" Start a new build ")]),_:1}))])])]),right:r(()=>[t(i)?(o(),z(L,{key:0,current:t(i)},null,8,["current"])):(o(),z(O,{key:1}))]),_:1}),u(t(v),null,{default:r(({resolve:a})=>[u(Z,{"model-value":!0,onClose:y=>a(!1)},{default:r(()=>[e("div",Ze,[Je,Qe,u(K,{modelValue:t(d),"onUpdate:modelValue":m[2]||(m[2]=y=>R(d)?d.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),t(N)?(o(),z(M,{key:0,"n-orange":""},{default:r(()=>[f(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Xe,qe,u(W,{code:`npx nuxi analyze --no-serve --name=${t(d)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),u(Y,{modelValue:t(h),"onUpdate:modelValue":m[3]||(m[3]=y=>R(h)?h.value=y:null),mt2:"",n:"primary"},{default:r(()=>[f(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",en,[u(w,{onClick:y=>a(!1)},{default:r(()=>[f(" Cancel ")]),_:2},1032,["onClick"]),u(w,{n:"solid primary",onClick:y=>a(!0)},{default:r(()=>[f(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),u(Q,null,{default:r(()=>[u(J)]),_:1})],64)}}});export{rn as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as Ee,r as ke,bS as Pe,as as Ie,a1 as He,L as fe,M as ve,o as te,m as he,k as ae,i as Re,f as ie,h as ce,p as Se,t as me,F as xe,_ as Ae,bV as Fe,R as We,a as Ne,aD as Ue,n as $e,G as Le,bj as je,v as De,a6 as ze,j as Ke,aK as qe}from"./
|
|
1
|
+
import{d as Ee,r as ke,bS as Pe,as as Ie,a1 as He,L as fe,M as ve,o as te,m as he,k as ae,i as Re,f as ie,h as ce,p as Se,t as me,F as xe,_ as Ae,bV as Fe,R as We,a as Ne,aD as Ue,n as $e,G as Le,bj as je,v as De,a6 as ze,j as Ke,aK as qe}from"./BZflAdyk.js";var Be={exports:{}};(function(oe,Z){(function(Y,J){oe.exports=J()})(globalThis,()=>(()=>{var Y={4567:function(B,r,o){var l=this&&this.__decorate||function(e,t,a,f){var u,p=arguments.length,c=p<3?t:f===null?f=Object.getOwnPropertyDescriptor(t,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(e,t,a,f);else for(var m=e.length-1;m>=0;m--)(u=e[m])&&(c=(p<3?u(c):p>3?u(t,a,c):u(t,a))||c);return p>3&&c&&Object.defineProperty(t,a,c),c},_=this&&this.__param||function(e,t){return function(a,f){t(a,f,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(9924),v=o(844),g=o(4725),h=o(2585),i=o(3656);let s=r.AccessibilityManager=class extends v.Disposable{constructor(e,t,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let u=0;u<this._terminal.rows;u++)this._rowElements[u]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[u]);if(this._topBoundaryFocusListener=u=>this._handleBoundaryFocus(u,0),this._bottomBoundaryFocusListener=u=>this._handleBoundaryFocus(u,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(u=>this._handleResize(u.rows))),this.register(this._terminal.onRender(u=>this._refreshRows(u.start,u.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(u=>this._handleChar(u))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
2
2
|
`))),this.register(this._terminal.onA11yTab(u=>this._handleTab(u))),this.register(this._terminal.onKey(u=>this._handleKey(u.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,i.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,v.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){const a=this._terminal.buffer,f=a.lines.length.toString();for(let u=e;u<=t;u++){const p=a.lines.get(a.ydisp+u),c=[],m=p?.translateToString(!0,void 0,void 0,c)||"",E=(a.ydisp+u+1).toString(),k=this._rowElements[u];k&&(m.length===0?(k.innerText=" ",this._rowColumns.set(k,[0,1])):(k.textContent=m,this._rowColumns.set(k,c)),k.setAttribute("aria-posinset",E),k.setAttribute("aria-setsize",f))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){const a=e.target,f=this._rowElements[t===0?1:this._rowElements.length-2];if(a.getAttribute("aria-posinset")===(t===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==f)return;let u,p;if(t===0?(u=a,p=this._rowElements.pop(),this._rowContainer.removeChild(p)):(u=this._rowElements.shift(),p=a,this._rowContainer.removeChild(u)),u.removeEventListener("focus",this._topBoundaryFocusListener),p.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){const c=this._createAccessibilityTreeNode();this._rowElements.unshift(c),this._rowContainer.insertAdjacentElement("afterbegin",c)}else{const c=this._createAccessibilityTreeNode();this._rowElements.push(c),this._rowContainer.appendChild(c)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let t={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===a.node&&t.offset>a.offset)&&([t,a]=[a,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;const f=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(f)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:f,offset:f.textContent?.length??0}),!this._rowContainer.contains(a.node))return;const u=({node:m,offset:E})=>{const k=m instanceof Text?m.parentNode:m;let D=parseInt(k?.getAttribute("aria-posinset"),10)-1;if(isNaN(D))return console.warn("row is invalid. Race condition?"),null;const b=this._rowColumns.get(k);if(!b)return console.warn("columns is null. Race condition?"),null;let x=E<b.length?b[E]:b.slice(-1)[0]+1;return x>=this._terminal.cols&&(++D,x=0),{row:D,column:x}},p=u(t),c=u(a);if(p&&c){if(p.row>c.row||p.row===c.row&&p.column>=c.column)throw new Error("invalid range");this._terminal.select(p.column,p.row,(c.row-p.row)*this._terminal.cols-p.column+c.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=s=l([_(1,h.IInstantiationService),_(2,g.ICoreBrowserService),_(3,g.IRenderService)],s)},3614:(B,r)=>{function o(d){return d.replace(/\r?\n/g,"\r")}function l(d,v){return v?"\x1B[200~"+d+"\x1B[201~":d}function _(d,v,g,h){d=l(d=o(d),g.decPrivateModes.bracketedPasteMode&&h.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),v.value=""}function n(d,v,g){const h=g.getBoundingClientRect(),i=d.clientX-h.left-10,s=d.clientY-h.top-10;v.style.width="20px",v.style.height="20px",v.style.left=`${i}px`,v.style.top=`${s}px`,v.style.zIndex="1000",v.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=l,r.copyHandler=function(d,v){d.clipboardData&&d.clipboardData.setData("text/plain",v.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,v,g,h){d.stopPropagation(),d.clipboardData&&_(d.clipboardData.getData("text/plain"),v,g,h)},r.paste=_,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,v,g,h,i){n(d,v,g),i&&h.rightClickSelect(d),v.value=h.selectionText,v.select()}},7239:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const l=o(1505);r.ColorContrastCache=class{constructor(){this._color=new l.TwoKeyMap,this._css=new l.TwoKeyMap}setCss(_,n,d){this._css.set(_,n,d)}getCss(_,n){return this._css.get(_,n)}setColor(_,n,d){this._color.set(_,n,d)}getColor(_,n){return this._color.get(_,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,l,_,n){o.addEventListener(l,_,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(l,_,n))}}}},3551:function(B,r,o){var l=this&&this.__decorate||function(s,e,t,a){var f,u=arguments.length,p=u<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,t):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(s,e,t,a);else for(var c=s.length-1;c>=0;c--)(f=s[c])&&(p=(u<3?f(p):u>3?f(e,t,p):f(e,t))||p);return u>3&&p&&Object.defineProperty(e,t,p),p},_=this&&this.__param||function(s,e){return function(t,a){e(t,a,s)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;const n=o(3656),d=o(8460),v=o(844),g=o(2585),h=o(4725);let i=r.Linkifier=class extends v.Disposable{get currentLink(){return this._currentLink}constructor(s,e,t,a,f){super(),this._element=s,this._mouseService=e,this._renderService=t,this._bufferService=a,this._linkProviderService=f,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,v.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,v.toDisposable)(()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(s){this._lastMouseEvent=s;const e=this._positionFromMouseEvent(s,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;const t=s.composedPath();for(let a=0;a<t.length;a++){const f=t[a];if(f.classList.contains("xterm"))break;if(f.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(s){if(this._activeLine!==s.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(s,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,s)||(this._clearCurrentLink(),this._askForLink(s,!0))}_askForLink(s,e){this._activeProviderReplies&&e||(this._activeProviderReplies?.forEach(a=>{a?.forEach(f=>{f.link.dispose&&f.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=s.y);let t=!1;for(const[a,f]of this._linkProviderService.linkProviders.entries())e?this._activeProviderReplies?.get(a)&&(t=this._checkLinkProviderResult(a,s,t)):f.provideLinks(s.y,u=>{if(this._isMouseOut)return;const p=u?.map(c=>({link:c}));this._activeProviderReplies?.set(a,p),t=this._checkLinkProviderResult(a,s,t),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(s.y,this._activeProviderReplies)})}_removeIntersectingLinks(s,e){const t=new Set;for(let a=0;a<e.size;a++){const f=e.get(a);if(f)for(let u=0;u<f.length;u++){const p=f[u],c=p.link.range.start.y<s?0:p.link.range.start.x,m=p.link.range.end.y>s?this._bufferService.cols:p.link.range.end.x;for(let E=c;E<=m;E++){if(t.has(E)){f.splice(u--,1);break}t.add(E)}}}}_checkLinkProviderResult(s,e,t){if(!this._activeProviderReplies)return t;const a=this._activeProviderReplies.get(s);let f=!1;for(let u=0;u<s;u++)this._activeProviderReplies.has(u)&&!this._activeProviderReplies.get(u)||(f=!0);if(!f&&a){const u=a.find(p=>this._linkAtPosition(p.link,e));u&&(t=!0,this._handleNewLink(u))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!t)for(let u=0;u<this._activeProviderReplies.size;u++){const p=this._activeProviderReplies.get(u)?.find(c=>this._linkAtPosition(c.link,e));if(p){t=!0,this._handleNewLink(p);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(s){if(!this._currentLink)return;const e=this._positionFromMouseEvent(s,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(s,this._currentLink.link.text)}_clearCurrentLink(s,e){this._currentLink&&this._lastMouseEvent&&(!s||!e||this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,v.disposeArray)(this._linkCacheDisposables))}_handleNewLink(s){if(!this._lastMouseEvent)return;const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(s.link,e)&&(this._currentLink=s,this._currentLink.state={decorations:{underline:s.link.decorations===void 0||s.link.decorations.underline,pointerCursor:s.link.decorations===void 0||s.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,s.link,this._lastMouseEvent),s.link.decorations={},Object.defineProperties(s.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:t=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",t))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:t=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(s.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const a=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,f=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=f&&(this._clearCurrentLink(a,f),this._lastMouseEvent)){const u=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);u&&this._askForLink(u,!1)}})))}_linkHover(s,e,t){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&s.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(t,e.text)}_fireUnderlineEvent(s,e){const t=s.range,a=this._bufferService.buffer.ydisp,f=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-a-1,t.end.x,t.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(f)}_linkLeave(s,e,t){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&s.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(t,e.text)}_linkAtPosition(s,e){const t=s.range.start.y*this._bufferService.cols+s.range.start.x,a=s.range.end.y*this._bufferService.cols+s.range.end.x,f=e.y*this._bufferService.cols+e.x;return t<=f&&f<=a}_positionFromMouseEvent(s,e,t){const a=t.getCoords(s,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(s,e,t,a,f){return{x1:s,y1:e,x2:t,y2:a,cols:this._bufferService.cols,fg:f}}};r.Linkifier=i=l([_(1,h.IMouseService),_(2,h.IRenderService),_(3,g.IBufferService),_(4,h.ILinkProviderService)],i)},9042:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(B,r,o){var l=this&&this.__decorate||function(h,i,s,e){var t,a=arguments.length,f=a<3?i:e===null?e=Object.getOwnPropertyDescriptor(i,s):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(h,i,s,e);else for(var u=h.length-1;u>=0;u--)(t=h[u])&&(f=(a<3?t(f):a>3?t(i,s,f):t(i,s))||f);return a>3&&f&&Object.defineProperty(i,s,f),f},_=this&&this.__param||function(h,i){return function(s,e){i(s,e,h)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=o(511),d=o(2585);let v=r.OscLinkProvider=class{constructor(h,i,s){this._bufferService=h,this._optionsService=i,this._oscLinkService=s}provideLinks(h,i){const s=this._bufferService.buffer.lines.get(h-1);if(!s)return void i(void 0);const e=[],t=this._optionsService.rawOptions.linkHandler,a=new n.CellData,f=s.getTrimmedLength();let u=-1,p=-1,c=!1;for(let m=0;m<f;m++)if(p!==-1||s.hasContent(m)){if(s.loadCell(m,a),a.hasExtendedAttrs()&&a.extended.urlId){if(p===-1){p=m,u=a.extended.urlId;continue}c=a.extended.urlId!==u}else p!==-1&&(c=!0);if(c||p!==-1&&m===f-1){const E=this._oscLinkService.getLinkData(u)?.uri;if(E){const k={start:{x:p+1,y:h},end:{x:m+(c||m!==f-1?0:1),y:h}};let D=!1;if(!t?.allowNonHttpProtocols)try{const b=new URL(E);["http:","https:"].includes(b.protocol)||(D=!0)}catch{D=!0}D||e.push({text:E,range:k,activate:(b,x)=>t?t.activate(b,x,k):g(0,x),hover:(b,x)=>t?.hover?.(b,x,k),leave:(b,x)=>t?.leave?.(b,x,k)})}c=!1,a.hasExtendedAttrs()&&a.extended.urlId?(p=m,u=a.extended.urlId):(p=-1,u=-1)}}i(e)}};function g(h,i){if(confirm(`Do you want to navigate to ${i}?
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,m as n,o}from"./
|
|
1
|
+
import{d as e,m as n,o}from"./BZflAdyk.js";const t={"h-screen":"","w-screen":"","bg-black":""},r=e({__name:"__blank",setup(c){return(s,_)=>(o(),n("div",t))}});export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as r,aa as n}from"./
|
|
1
|
+
import{q as r,aa as n}from"./BZflAdyk.js";const t={};function o(e,s){return n(e.$slots,"default")}const c=r(t,[["render",o]]);export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as F}from"./
|
|
1
|
+
import{_ as F}from"./DO36ltOt.js";import{_ as L}from"./B2aNs1qV.js";import{_ as A}from"./x4RoSwOc.js";import{d as E,P as G,bf as W,r as V,bg as Y,N as Z,R as q,o as m,m as v,aa as z,f as a,t as $,p as w,F as B,i as s,h as H,j as u,k as h,l as M,v as p,V as J,Y as K,_ as O,Z as Q,bh as X,ab as ee,a as te,aw as ae,ax as ne,bi as se,be as oe}from"./BZflAdyk.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(),N=Z(),U=q();async function b(){const r=await i(async o=>N.start(o));J("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 x=F,S=L,C=A,T=K,P=O,I=Q;return m(),v(B,null,[z(r.$slots,"default",{id:a(k),info:a(n),update:b,state:a(y),restart:a(d)},()=>[a(n)&&r.showVersion?(m(),v("code",le,$(`v${a(n).current}`),1)):w("",!0),a(n)?.latest?(m(),v(B,{key:1},[a(n).needsUpdate?(m(),v("button",{key:0,onClick:o[0]||(o[0]=g=>b())},[s(x,{n:"green",title:"updates available",textContent:"updates available"})])):(m(),H(x,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(a(N),null,{default:u(({resolve:g,args:j})=>[s(I,{"model-value":!0,onClose:c=>g(!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(C,{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(C,{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=>g(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:c=>g(!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 ve(){return X("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,ve as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import n from"./CbViG2Xw.js";import e from"./
|
|
1
|
+
import n from"./CbViG2Xw.js";import e from"./Dch3xQiY.js";import t from"./CbYhyuC0.js";import a from"./DC8MraHL.js";import u from"./CupVZNk8.js";import m from"./DK4oFTHQ.js";const p=Object.freeze({displayName:"Markdown",name:"markdown",patterns:[{include:"#frontMatter"},{include:"#block"}],repository:{ampersand:{comment:"Markdown will convert this for us. We match it so that the HTML grammar will not mark it up as invalid.",match:"&(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);)",name:"meta.other.valid-ampersand.markdown"},block:{patterns:[{include:"#separator"},{include:"#heading"},{include:"#blockquote"},{include:"#lists"},{include:"#fenced_code_block"},{include:"#raw_block"},{include:"#link-def"},{include:"#html"},{include:"#table"},{include:"#paragraph"}]},blockquote:{begin:"(^|\\G)[ ]{0,3}(>) ?",captures:{2:{name:"punctuation.definition.quote.begin.markdown"}},name:"markup.quote.markdown",patterns:[{include:"#block"}],while:"(^|\\G)\\s*(>) ?"},bold:{begin:`(?x) (?<open>(\\*\\*(?=\\w)|(?<!\\w)\\*\\*|(?<!\\w)\\b__))(?=\\S) (?=
|
|
2
2
|
(
|
|
3
3
|
<[^>]*+>
|
|
4
4
|
| (?<raw>\`+)([^\`]|(?!(?<!\`)\\k<raw>(?!\`))\`)*+\\k<raw>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as Oe}from"./ciodjZaS.js";function Ee(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 K=Ee;function L(t=[]){return Array.isArray(t)?t:[t]}function I(t){return Array.from(new Set(t))}function te(t,e){return t.reduce((n,s)=>(n.findIndex(i=>e(s,i))===-1&&n.push(s),n),[])}function k(t){return typeof t=="string"}function B(t){return k(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function ke(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>B(e)):[t]:[B(t)]}function je(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 X(t){return t==null?"":je(t).map(([e,n])=>n!=null&&typeof n!="function"?`${e}:${n};`:void 0).filter(Boolean).join("")}function U(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ge(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 U(s)&&U(r)&&Object.keys(r).forEach(o=>{U(s[o])&&U(r[o])||Array.isArray(s[o])&&Array.isArray(r[o])?i[o]=ge(s[o],r[o],n):Object.assign(i,{[o]:r[o]})}),i}function G(t){let e,n,s;if(Array.isArray(t)){for(n=Array(e=t.length);e--;)n[e]=(s=t[e])&&typeof s=="object"?G(s):s;return n}if(Object.prototype.toString.call(t)==="[object Object]"){n={};for(e in t)e==="__proto__"?Object.defineProperty(n,e,{value:G(t[e]),configurable:!0,enumerable:!0,writable:!0}):n[e]=(s=t[e])&&typeof s=="object"?G(s):s;return n}return t}function Le(t){return k(t[0])}function Pe(t){return k(t[0])}function Fe(t){return typeof t=="function"?{match:t}:t}function ne(t){return t.length===3}function re(t){return t!=null}function Te(){}var ze=Object.defineProperty,Ie=(t,e,n)=>e in t?ze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ne=(t,e,n)=>(Ie(t,e+"",n),n);class De{constructor(){Ne(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)))}}class Re extends Map{getFallback(e,n){const s=this.get(e);return s===void 0?(this.set(e,n),n):s}map(e){const n=[];return this.forEach((s,r)=>{n.push(e(s,r))}),n}flatMap(e){const n=[];return this.forEach((s,r)=>{n.push(...e(s,r))}),n}}var Ve=Object.defineProperty,Be=(t,e,n)=>e in t?Ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ue=(t,e,n)=>(Be(t,e+"",n),n);class ye extends Set{constructor(e){super(e),Ue(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 Z(t){return t instanceof ye}const H={};function He(t=["-",":"]){const e=t.join("|");return H[e]||(H[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),H[e].lastIndex=0,H[e]}function Ge(t,e=["-",":"],n=5){const s=He(e);let r,i=t.toString();const o=new Set,a=new Map;do r=!1,i=i.replace(s,(u,c,h,y,v)=>{if(!e.includes(h))return u;r=!0,o.add(c+h);const _=v+c.length+h.length+1,g={length:u.length,items:[]};a.set(v,g);for(const p of[...y.matchAll(/\S+/g)]){const M=_+p.index;let m=a.get(M)?.items;m?a.delete(M):m=[{offset:M,length:p[0].length,className:p[0]}];for(const d of m)d.className=d.className==="~"?c:d.className.replace(/^(!?)(.*)/,`$1${c}${h}$2`),g.items.push(d)}return"$".repeat(u.length)}),n-=1;while(r&&n);let l;if(typeof t=="string"){l="";let u=0;for(const[c,h]of a)l+=t.slice(u,c),l+=h.items.map(y=>y.className).join(" "),u=c+h.length;l+=t.slice(u)}else{l=t;for(const[u,c]of a)l.overwrite(u,u+c.length,c.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:r,groupsByOffset:a,get expanded(){return l.toString()}}}function We(t,e=["-",":"],n=5){const s=Ge(t,e,n);return typeof t=="string"?s.expanded:t}const se=new Set;function we(t){se.has(t)||(console.warn("[unocss]",t),se.add(t))}const Ye=/[\\:]?[\s'"`;{}]+/g;function qe(t){return t.split(Ye)}const Ke={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return qe(t)}};function Xe(){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 W="default",Q="preflights",Ze="shortcuts",Je="imports",Qe={[Je]:-200,[Q]:-100,[Ze]:-10,[W]:0};function ve(t){return L(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const ie="_uno_resolved";function et(t){let e=typeof t=="function"?t():t;if(ie in e)return e;e={...e},Object.defineProperty(e,ie,{value:!0,enumerable:!1});const n=e.shortcuts?ve(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=L(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};n?.forEach(s),e.rules?.forEach(s)}return e}function be(t){const e=et(t);if(!e.presets)return[e];const n=(e.presets||[]).flatMap(L).flatMap(be);return[e,...n]}function tt(t){if(t.length===0)return{};const e=[],n=[];let s=!1;for(const r of t)r.pipeline===!1?s=!0:(e.push(r.pipeline?.include??[]),n.push(r.pipeline?.exclude??[]));return{filesystem:I(t.flatMap(r=>r.filesystem??[])),inline:I(t.flatMap(r=>r.inline??[])),plain:I(t.flatMap(r=>r.plain??[])),pipeline:s?!1:{include:I(ae(...e)),exclude:I(ae(...n))}}}function oe(t={},e={}){const n=Object.assign({},e,t),s=te((n.presets||[]).flatMap(L).flatMap(be),(f,w)=>f.name===w.name),r=[...s.filter(f=>f.enforce==="pre"),...s.filter(f=>!f.enforce),...s.filter(f=>f.enforce==="post")],i=[...r,n],o=[...i].reverse(),a=Object.assign({},Qe,...i.map(f=>f.layers));function l(f){return I(i.flatMap(w=>L(w[f]||[])))}const u=l("extractors");let c=o.find(f=>f.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=Ke),c&&!u.includes(c)&&u.unshift(c),u.sort((f,w)=>(f.order||0)-(w.order||0));const h=l("rules"),y={},v=h.length,_=h.map((f,w)=>{if(Le(f)){L(f[2]?.prefix||"").forEach(E=>{y[E+f[0]]=[w,f[1],f[2],f]});return}return[w,...f]}).filter(Boolean).reverse();let g=nt(i.map(f=>f.theme));const p=l("extendTheme");for(const f of p)g=f(g)||g;const M={templates:I(i.flatMap(f=>L(f.autocomplete?.templates))),extractors:i.flatMap(f=>L(f.autocomplete?.extractors)).sort((f,w)=>(f.order||0)-(w.order||0)),shorthands:rt(i.map(f=>f.autocomplete?.shorthands||{}))};let m=l("separators");m.length||(m=[":","-"]);const d=l("content"),x=tt(d),S={mergeSelectors:!0,warn:!0,sortLayers:f=>f,...n,blocklist:l("blocklist"),presets:r,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:a,theme:g,rulesSize:v,rulesDynamic:_,rulesStaticMap:y,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:M,variants:l("variants").map(Fe).sort((f,w)=>(f.order||0)-(w.order||0)),shortcuts:ve(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:m,details:n.details??n.envMode==="dev",content:x,transformers:te(l("transformers"),(f,w)=>f.name===w.name)};for(const f of i)f?.configResolved?.(S);return S}function nt(t){return t.map(e=>e?G(e):{}).reduce((e,n)=>ge(e,n),{})}function rt(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}},{})}function ae(...t){return t.flatMap(st)}function st(t){return Array.isArray(t)?t:t?[t]:[]}const it="0.62.2";var ot=Object.defineProperty,at=(t,e,n)=>e in t?ot(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R=(t,e,n)=>(at(t,typeof e!="symbol"?e+"":e,n),n);const V={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector"};class ct{constructor(e={},n={}){this.userConfig=e,this.defaults=n,R(this,"version",it),R(this,"_cache",new Map),R(this,"config"),R(this,"blocked",new Set),R(this,"parentOrders",new Map),R(this,"events",Xe()),this.config=oe(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=oe(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(Z(o)&&Z(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,symbols:V,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),l=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(u=>this.stringifyUtil(u,o)).filter(re);if(l?.length)return this._cache.set(s,l),l;this._cache.set(s,null)}async generate(e,n={}){const{id:s,scope:r,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:l=!1}=n,u=this.config.outputToCssLayers,c=k(e)?await this.applyExtractors(e,s,l?new ye:new Set):Array.isArray(e)?new Set(e):e;if(o){const S={generator:this,theme:this.config.theme};this.config.safelist.flatMap(f=>typeof f=="function"?f(S):f).forEach(f=>{c.has(f)||c.add(f)})}const h=a?"":`
|
|
1
|
+
import{$ as Oe}from"./BZflAdyk.js";function Ee(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 K=Ee;function L(t=[]){return Array.isArray(t)?t:[t]}function I(t){return Array.from(new Set(t))}function te(t,e){return t.reduce((n,s)=>(n.findIndex(i=>e(s,i))===-1&&n.push(s),n),[])}function k(t){return typeof t=="string"}function B(t){return k(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function ke(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>B(e)):[t]:[B(t)]}function je(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 X(t){return t==null?"":je(t).map(([e,n])=>n!=null&&typeof n!="function"?`${e}:${n};`:void 0).filter(Boolean).join("")}function U(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ge(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 U(s)&&U(r)&&Object.keys(r).forEach(o=>{U(s[o])&&U(r[o])||Array.isArray(s[o])&&Array.isArray(r[o])?i[o]=ge(s[o],r[o],n):Object.assign(i,{[o]:r[o]})}),i}function G(t){let e,n,s;if(Array.isArray(t)){for(n=Array(e=t.length);e--;)n[e]=(s=t[e])&&typeof s=="object"?G(s):s;return n}if(Object.prototype.toString.call(t)==="[object Object]"){n={};for(e in t)e==="__proto__"?Object.defineProperty(n,e,{value:G(t[e]),configurable:!0,enumerable:!0,writable:!0}):n[e]=(s=t[e])&&typeof s=="object"?G(s):s;return n}return t}function Le(t){return k(t[0])}function Pe(t){return k(t[0])}function Fe(t){return typeof t=="function"?{match:t}:t}function ne(t){return t.length===3}function re(t){return t!=null}function Te(){}var ze=Object.defineProperty,Ie=(t,e,n)=>e in t?ze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ne=(t,e,n)=>(Ie(t,e+"",n),n);class De{constructor(){Ne(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)))}}class Re extends Map{getFallback(e,n){const s=this.get(e);return s===void 0?(this.set(e,n),n):s}map(e){const n=[];return this.forEach((s,r)=>{n.push(e(s,r))}),n}flatMap(e){const n=[];return this.forEach((s,r)=>{n.push(...e(s,r))}),n}}var Ve=Object.defineProperty,Be=(t,e,n)=>e in t?Ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ue=(t,e,n)=>(Be(t,e+"",n),n);class ye extends Set{constructor(e){super(e),Ue(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 Z(t){return t instanceof ye}const H={};function He(t=["-",":"]){const e=t.join("|");return H[e]||(H[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),H[e].lastIndex=0,H[e]}function Ge(t,e=["-",":"],n=5){const s=He(e);let r,i=t.toString();const o=new Set,a=new Map;do r=!1,i=i.replace(s,(u,c,h,y,v)=>{if(!e.includes(h))return u;r=!0,o.add(c+h);const _=v+c.length+h.length+1,g={length:u.length,items:[]};a.set(v,g);for(const p of[...y.matchAll(/\S+/g)]){const M=_+p.index;let m=a.get(M)?.items;m?a.delete(M):m=[{offset:M,length:p[0].length,className:p[0]}];for(const d of m)d.className=d.className==="~"?c:d.className.replace(/^(!?)(.*)/,`$1${c}${h}$2`),g.items.push(d)}return"$".repeat(u.length)}),n-=1;while(r&&n);let l;if(typeof t=="string"){l="";let u=0;for(const[c,h]of a)l+=t.slice(u,c),l+=h.items.map(y=>y.className).join(" "),u=c+h.length;l+=t.slice(u)}else{l=t;for(const[u,c]of a)l.overwrite(u,u+c.length,c.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:r,groupsByOffset:a,get expanded(){return l.toString()}}}function We(t,e=["-",":"],n=5){const s=Ge(t,e,n);return typeof t=="string"?s.expanded:t}const se=new Set;function we(t){se.has(t)||(console.warn("[unocss]",t),se.add(t))}const Ye=/[\\:]?[\s'"`;{}]+/g;function qe(t){return t.split(Ye)}const Ke={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return qe(t)}};function Xe(){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 W="default",Q="preflights",Ze="shortcuts",Je="imports",Qe={[Je]:-200,[Q]:-100,[Ze]:-10,[W]:0};function ve(t){return L(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const ie="_uno_resolved";function et(t){let e=typeof t=="function"?t():t;if(ie in e)return e;e={...e},Object.defineProperty(e,ie,{value:!0,enumerable:!1});const n=e.shortcuts?ve(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=L(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};n?.forEach(s),e.rules?.forEach(s)}return e}function be(t){const e=et(t);if(!e.presets)return[e];const n=(e.presets||[]).flatMap(L).flatMap(be);return[e,...n]}function tt(t){if(t.length===0)return{};const e=[],n=[];let s=!1;for(const r of t)r.pipeline===!1?s=!0:(e.push(r.pipeline?.include??[]),n.push(r.pipeline?.exclude??[]));return{filesystem:I(t.flatMap(r=>r.filesystem??[])),inline:I(t.flatMap(r=>r.inline??[])),plain:I(t.flatMap(r=>r.plain??[])),pipeline:s?!1:{include:I(ae(...e)),exclude:I(ae(...n))}}}function oe(t={},e={}){const n=Object.assign({},e,t),s=te((n.presets||[]).flatMap(L).flatMap(be),(f,w)=>f.name===w.name),r=[...s.filter(f=>f.enforce==="pre"),...s.filter(f=>!f.enforce),...s.filter(f=>f.enforce==="post")],i=[...r,n],o=[...i].reverse(),a=Object.assign({},Qe,...i.map(f=>f.layers));function l(f){return I(i.flatMap(w=>L(w[f]||[])))}const u=l("extractors");let c=o.find(f=>f.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=Ke),c&&!u.includes(c)&&u.unshift(c),u.sort((f,w)=>(f.order||0)-(w.order||0));const h=l("rules"),y={},v=h.length,_=h.map((f,w)=>{if(Le(f)){L(f[2]?.prefix||"").forEach(E=>{y[E+f[0]]=[w,f[1],f[2],f]});return}return[w,...f]}).filter(Boolean).reverse();let g=nt(i.map(f=>f.theme));const p=l("extendTheme");for(const f of p)g=f(g)||g;const M={templates:I(i.flatMap(f=>L(f.autocomplete?.templates))),extractors:i.flatMap(f=>L(f.autocomplete?.extractors)).sort((f,w)=>(f.order||0)-(w.order||0)),shorthands:rt(i.map(f=>f.autocomplete?.shorthands||{}))};let m=l("separators");m.length||(m=[":","-"]);const d=l("content"),x=tt(d),S={mergeSelectors:!0,warn:!0,sortLayers:f=>f,...n,blocklist:l("blocklist"),presets:r,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:a,theme:g,rulesSize:v,rulesDynamic:_,rulesStaticMap:y,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:M,variants:l("variants").map(Fe).sort((f,w)=>(f.order||0)-(w.order||0)),shortcuts:ve(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:m,details:n.details??n.envMode==="dev",content:x,transformers:te(l("transformers"),(f,w)=>f.name===w.name)};for(const f of i)f?.configResolved?.(S);return S}function nt(t){return t.map(e=>e?G(e):{}).reduce((e,n)=>ge(e,n),{})}function rt(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}},{})}function ae(...t){return t.flatMap(st)}function st(t){return Array.isArray(t)?t:t?[t]:[]}const it="0.62.2";var ot=Object.defineProperty,at=(t,e,n)=>e in t?ot(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R=(t,e,n)=>(at(t,typeof e!="symbol"?e+"":e,n),n);const V={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector"};class ct{constructor(e={},n={}){this.userConfig=e,this.defaults=n,R(this,"version",it),R(this,"_cache",new Map),R(this,"config"),R(this,"blocked",new Set),R(this,"parentOrders",new Map),R(this,"events",Xe()),this.config=oe(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=oe(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(Z(o)&&Z(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,symbols:V,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),l=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(u=>this.stringifyUtil(u,o)).filter(re);if(l?.length)return this._cache.set(s,l),l;this._cache.set(s,null)}async generate(e,n={}){const{id:s,scope:r,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:l=!1}=n,u=this.config.outputToCssLayers,c=k(e)?await this.applyExtractors(e,s,l?new ye:new Set):Array.isArray(e)?new Set(e):e;if(o){const S={generator:this,theme:this.config.theme};this.config.safelist.flatMap(f=>typeof f=="function"?f(S):f).forEach(f=>{c.has(f)||c.add(f)})}const h=a?"":`
|
|
2
2
|
`,y=new Set([W]),v=l?new Map:new Set,_=new Map;let g={};const p=Array.from(c).map(async S=>{if(v.has(S))return;const f=await this.parseToken(S);if(f!=null){v instanceof Map?v.set(S,{data:f,count:Z(c)?c.getCount(S):-1}):v.add(S);for(const w of f){const A=w[3]||"",E=w[4]?.layer;_.has(A)||_.set(A,[]),_.get(A).push(w),E&&y.add(E)}}});await Promise.all(p),await(async()=>{if(!i)return;const S={generator:this,theme:this.config.theme},f=new Set([]);this.config.preflights.forEach(({layer:w=Q})=>{y.add(w),f.add(w)}),g=Object.fromEntries(await Promise.all(Array.from(f).map(async w=>{const E=(await Promise.all(this.config.preflights.filter(P=>(P.layer||Q)===w).map(async P=>await P.getCSS(S)))).filter(Boolean).join(h);return[w,E]})))})();const M=this.config.sortLayers(Array.from(y).sort((S,f)=>(this.config.layers[S]??0)-(this.config.layers[f]??0)||S.localeCompare(f))),m={},d=(S=W)=>{if(m[S])return m[S];let f=Array.from(_).sort((A,E)=>(this.parentOrders.get(A[0])??0)-(this.parentOrders.get(E[0])??0)||A[0]?.localeCompare(E[0]||"")||0).map(([A,E])=>{const P=E.length,T=E.filter(b=>(b[4]?.layer||W)===S).sort((b,C)=>b[0]-C[0]||(b[4]?.sort||0)-(C[4]?.sort||0)||b[5]?.currentSelector?.localeCompare(C[5]?.currentSelector??"")||b[1]?.localeCompare(C[1]||"")||b[2]?.localeCompare(C[2]||"")||0).map(([,b,C,,O,,j])=>[[[(b&&ut(b,r))??"",O?.sort??0]],C,!!(j??O?.noMerge)]);if(!T.length)return;const z=T.reverse().map(([b,C,O],j)=>{if(!O&&this.config.mergeSelectors)for(let D=j+1;D<P;D++){const F=T[D];if(F&&!F[2]&&(b&&F[0]||b==null&&F[0]==null)&&F[1]===C)return b&&F[0]&&F[0].push(...b),null}const N=b?I(b.sort((D,F)=>D[1]-F[1]||D[0]?.localeCompare(F[0]||"")||0).map(D=>D[0]).filter(Boolean)):[];return N.length?`${N.join(`,${h}`)}{${C}}`:C}).filter(Boolean).reverse().join(h);if(!A)return z;const $=A.split(" $$ ");return`${$.join("{")}{${h}${z}${h}${"}".repeat($.length)}`}).filter(Boolean).join(h);if(i&&(f=[g[S],f].filter(Boolean).join(h)),u&&f){let A=typeof u=="object"?u.cssLayerName?.(S):void 0;A!==null&&(A||(A=S),f=`@layer ${A}{${h}${f}${h}}`)}const w=a?"":`/* layer: ${S} */${h}`;return m[S]=f?w+f:""},x=(S=M,f)=>S.filter(w=>!f?.includes(w)).map(w=>d(w)||"").filter(Boolean).join(h);return{get css(){return x()},layers:M,matched:v,getLayers:x,getLayer:d}}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 l of this.config.variants){if(!l.multiPass&&s.has(l))continue;let u=await l.match(i,a);if(u){if(k(u)){if(u===i)continue;u={matcher:u}}i=u.matcher??i,r.unshift(u),s.add(l),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 y=c.body?.(h.entries)||h.entries,v=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??pt)({...h,entries:y,selector:c.selector?.(h.selector,y)||h.selector,parent:v[0]||h.parent,parentOrder:v[1]||h.parentOrder,layer:c.layer||h.layer,sort:c.sort||h.sort},u)},u=>u)({prefix:"",selector:ht(s),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);const l={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(l);return l}constructCustomCSS(e,n,s){const r=B(n);if(k(r))return r;const{selector:i,entries:o,parent:a}=this.applyVariants([0,s||e.rawSelector,r,void 0,e.variantHandlers]),l=`${i}{${X(o)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,n,s=!1,r){const[i,o,a]=k(e)?await this.matchVariants(e):e;this.config.details&&(n.rules=n.rules??[]);const l=this.config.rulesStaticMap[o];if(l&&l[1]&&(s||!l[2]?.internal)){this.config.details&&n.rules.push(l[3]);const c=l[0],h=B(l[1]),y=l[2];return k(h)?[[c,h,y]]:[[c,i,h,y,a]]}n.variantHandlers=a;const{rulesDynamic:u}=this.config;for(const[c,h,y,v]of u){if(v?.internal&&!s)continue;let _=o;if(v?.prefix){const m=L(v.prefix);if(r){const d=L(r);if(!m.some(x=>d.includes(x)))continue}else{const d=m.find(x=>o.startsWith(x));if(d==null)continue;_=o.slice(d.length)}}const g=_.match(h);if(!g)continue;let p=await y(g,n);if(!p)continue;if(this.config.details&&n.rules.push([h,y,v]),typeof p!="string")if(Symbol.asyncIterator in p){const m=[];for await(const d of p)d&&m.push(d);p=m}else Symbol.iterator in p&&!Array.isArray(p)&&(p=Array.from(p).filter(re));const M=ke(p).filter(m=>m.length);if(M.length)return M.map(m=>{if(k(m))return[c,m,v];let d=a;for(const x of m)x[0]===V.variants?d=[...L(x[1]),...d]:x[0]===V.parent?d=[{parent:x[1]},...d]:x[0]===V.selector&&(d=[{selector:x[1]},...d]);return[c,i,m,v,d]})}}stringifyUtil(e,n){if(!e)return;if(ne(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:l}=this.applyVariants(e),u=X(r);if(!u)return;const{layer:c,sort:h,...y}=e[3]??{},v={...y,layer:o??c,sort:a??h};return[e[0],s,u,i,v,this.config.details?n:void 0,l]}async expandShortcut(e,n,s=5){if(s===0)return;const r=this.config.details?a=>{n.shortcuts=n.shortcuts??[],n.shortcuts.push(a)}:Te;let i,o;for(const a of this.config.shortcuts){let l=e;if(a[2]?.prefix){const c=L(a[2].prefix).find(h=>e.startsWith(h));if(c==null)continue;l=e.slice(c.length)}if(Pe(a)){if(a[0]===l){i=i||a[2],o=a[1],r(a);break}}else{const u=l.match(a[0]);if(u&&(o=a[1](u,n)),o){i=i||a[2],r(a);break}}}if(o&&(o=L(o).map(a=>k(a)?We(a.trim()).split(/\s+/g):a).flat()),!o){const[a,l]=k(e)?await this.matchVariants(e):e;if(a!==l){const u=await this.expandShortcut(l,n,s-1);u&&(o=u[0].map(c=>k(c)?a.replace(l,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(k(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 Re,o=(await Promise.all(I(s).map(async c=>{const h=k(c)?await this.parseUtil(c,n,!0,r.prefix):[[Number.POSITIVE_INFINITY,"{inline}",B(c),void 0,[]]];return!h&&this.config.warn&&we(`unmatched utility "${c}" in shortcut "${e[1]}"`),h||[]}))).flat(1).filter(Boolean).sort((c,h)=>c[0]-h[0]),[a,,l]=e,u=[];for(const c of o){if(ne(c)){u.push([c[0],void 0,c[1],void 0,c[2],n,void 0]);continue}const{selector:h,entries:y,parent:v,sort:_,noMerge:g,layer:p}=this.applyVariants(c,[...c[4],...l],a);i.getFallback(p??r.layer,new De).getFallback(h,v,[[],c[0]])[0].push([y,!!(g??c[3]?.noMerge),_??0])}return u.concat(i.flatMap((c,h)=>c.map(([y,v],_,g)=>{const p=(m,d,x)=>{const S=Math.max(...x.map(w=>w[1])),f=x.map(w=>w[0]);return(m?[f.flat(1)]:f).map(w=>{const A=X(w);if(A)return[v,_,A,g,{...r,noMerge:d,sort:S,layer:h},n,void 0]})};return[[y.filter(([,m])=>m).map(([m,,d])=>[m,d]),!0],[y.filter(([,m])=>!m).map(([m,,d])=>[m,d]),!1]].map(([m,d])=>[...p(!1,d,m.filter(([x])=>x.some(S=>S[0]===V.shortcutsNoMerge))),...p(!0,d,m.filter(([x])=>x.every(S=>S[0]!==V.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(n=>Array.isArray(n)?n[0]:n).some(n=>typeof n=="function"?n(e):k(n)?n===e:n.test(e))}getBlocked(e){const n=this.config.blocklist.find(s=>{const r=Array.isArray(s)?s[0]:s;return typeof r=="function"?r(e):k(r)?r===e:r.test(e)});return n?Array.isArray(n)?n:[n,void 0]:void 0}}function lt(t,e){return new ct(t,e)}const Se=/\s\$\$\s+/g;function ft(t){return Se.test(t)}function ut(t,e){return ft(t)?t.replace(Se,e?` ${e} `:" "):e?`${e} ${t}`:t}const ce=/^\[(.+?)(~?=)"(.*)"\]$/;function ht(t){return ce.test(t)?t.replace(ce,(e,n,s,r)=>`[${K(n)}${s}"${K(r)}"]`):`.${K(t)}`}function pt(t,e){return e(t)}var le={};const dt=Object.freeze({left:0,top:0,width:16,height:16}),Y=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xe=Object.freeze({...dt,...Y}),mt=Object.freeze({...xe,body:"",hidden:!1}),gt=Object.freeze({width:null,height:null}),$e=Object.freeze({...gt,...Y});function yt(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 fe(t,e){const n=yt(t,e);for(const s in mt)s in Y?s in t&&!(s in n)&&(n[s]=Y[s]):s in e?n[s]=e[s]:s in t&&(n[s]=t[s]);return n}function wt(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,l=a&&i(a);l&&(r[o]=[a].concat(l))}return r[o]}return(e||Object.keys(n).concat(Object.keys(s))).forEach(i),r}function ue(t,e,n){const s=t.icons,r=t.aliases||Object.create(null);let i={};function o(a){i=fe(s[a]||r[a],i)}return o(e),n.forEach(o),fe(t,i)}function vt(t,e){if(t.icons[e])return ue(t,e,[]);const n=wt(t,[e])[e];return n?ue(t,e,n):null}const bt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,St=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function q(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(bt);if(s===null||!s.length)return t;const r=[];let i=s.shift(),o=St.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 xt(t,e="defs"){let n="";const s=t.indexOf("<"+e);for(;s>=0;){const r=t.indexOf(">",s),i=t.indexOf("</"+e);if(r===-1||i===-1)break;const o=t.indexOf(">",i);if(o===-1)break;n+=t.slice(r+1,i).trim(),t=t.slice(0,s).trim()+t.slice(o+1)}return{defs:n,content:t}}function $t(t,e){return t?"<defs>"+t+"</defs>"+e:e}function _t(t,e,n){const s=xt(t);return $t(s.defs,e+s.content+n)}const ee=t=>t==="unset"||t==="undefined"||t==="none";function Ct(t,e){const n={...xe,...t},s={...$e,...e},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,s].forEach(g=>{const p=[],M=g.hFlip,m=g.vFlip;let d=g.rotate;M?m?d+=2:(p.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),p.push("scale(-1 1)"),r.top=r.left=0):m&&(p.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),p.push("scale(1 -1)"),r.top=r.left=0);let x;switch(d<0&&(d-=Math.floor(d/4)*4),d=d%4,d){case 1:x=r.height/2+r.top,p.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:p.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:x=r.width/2+r.left,p.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}d%2===1&&(r.left!==r.top&&(x=r.left,r.left=r.top,r.top=x),r.width!==r.height&&(x=r.width,r.width=r.height,r.height=x)),p.length&&(i=_t(i,'<g transform="'+p.join(" ")+'">',"</g>"))});const o=s.width,a=s.height,l=r.width,u=r.height;let c,h;o===null?(h=a===null?"1em":a==="auto"?u:a,c=q(h,l/u)):(c=o==="auto"?l:o,h=a===null?q(c,u/l):a==="auto"?u:a);const y={},v=(g,p)=>{ee(p)||(y[g]=p.toString())};v("width",c),v("height",h);const _=[r.left,r.top,l,u];return y.viewBox=_.join(" "),{attributes:y,viewBox:_,body:i}}function At(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Mt(t){let e=t.startsWith("<svg>")?t.replace("<svg>","<svg >"):t;return!e.includes(" xmlns:xlink=")&&e.includes(" xlink:")&&(e=e.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),e.includes(" xmlns=")||(e=e.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),At(e)}function Ot(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,'="').replace(/(\s)+\/>/g,"/>").trim()}const Et=/\swidth\s*=\s*["']([\w.]+)["']/,kt=/\sheight\s*=\s*["']([\w.]+)["']/,J=/<svg\s+/;function jt(t,e,n){const s=t.slice(0,t.indexOf(">")),r=(i,o)=>{const a=o.exec(s),l=a!=null,u=e[i];return!u&&!ee(u)&&(typeof n=="number"?n>0&&(e[i]=q(a?.[1]??"1em",n)):a&&(e[i]=a[1])),l};return[r("width",Et),r("height",kt)]}async function _e(t,e,n,s,r,i){const{scale:o,addXmlNs:a=!1}=s??{},{additionalProps:l={},iconCustomizer:u}=s?.customizations??{},c=await r?.()??{};await u?.(e,n,c),Object.keys(l).forEach(g=>{const p=l[g];p!=null&&(c[g]=p)}),i?.(c);const[h,y]=jt(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 v=Object.keys(c).map(g=>g==="width"&&h||g==="height"&&y?null:`${g}="${c[g]}"`).filter(g=>g!=null);if(v.length&&(t=t.replace(J,`<svg ${v.join(" ")} `)),s){const{defaultStyle:g,defaultClass:p}=s;p&&!t.includes("class=")&&(t=t.replace(J,`<svg class="${p}" `)),g&&!t.includes("style=")&&(t=t.replace(J,`<svg style="${g}" `))}const _=s?.usedProps;return _&&(Object.keys(l).forEach(g=>{const p=c[g];p!=null&&(_[g]=p)}),typeof c.width<"u"&&c.width!==null&&(_.width=c.width),typeof c.height<"u"&&c.height!==null&&(_.height=c.height)),t}async function he(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 _e(s?.customizations?.trimCustomSvg===!0?Ot(r):r,e,n,s,void 0):(console.warn(`Custom icon "${n}" in "${e}" is not a valid SVG`),r)}}async function Ce(t,e,n,s){let r;const{customize:i}=s?.customizations??{};for(const o of n)if(r=vt(t,o),r){let a={...$e};typeof i=="function"&&(r=Object.assign({},r),a=i(a,r,`${e}:${o}`)??a);const{attributes:{width:l,height:u,...c},body:h}=Ct(r,a),y=s?.scale;return await _e(`<svg >${h}</svg>`,e,o,s,()=>({...c}),v=>{const _=(g,p)=>{const M=v[g];let m;if(!ee(M)){if(M)return;typeof y=="number"?y&&(m=q(p??"1em",y)):m=p}m?v[g]=m:delete v[g]};_("width",l),_("height",u)})}}const Ae=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 he(()=>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 Ce(r,t,i,n)}}}else return await he(s,t,e,n)};function Lt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Pt=["academicons","akar-icons","ant-design","arcticons","basil","bi","bitcoin-icons","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","catppuccin","cbi","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","f7","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","flowbite","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gravity-ui","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","hugeicons","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","mage","majesticons","maki","map","marketeq","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","oui","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","rivet-icons","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline-emojis","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","token-branded","token","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","unjs","vaadin","vs","vscode-icons","websymbol","weui","whh","wi","wpf","zmdi","zondicons"];const Ft=Lt(Pt),Tt=3;function zt(t){return(e={})=>{const{scale:n=1,mode:s="auto",prefix:r="i-",warn:i=!1,collections:o,extraProperties:a={},customizations:l={},autoInstall:u=!1,collectionsNodeResolvePath:c,layer:h="icons",unit:y,processor:v}=e,_=It(),g={addXmlNs:!0,scale:n,customCollections:o,autoInstall:u,cwd:c,warn:void 0,customizations:{...l,additionalProps:{...a},trimCustomSvg:!0,async iconCustomizer(M,m,d){await l.iconCustomizer?.(M,m,d),y&&(d.width||(d.width=`${n}${y}`),d.height||(d.height=`${n}${y}`))}}};let p;return{name:"@unocss/preset-icons",enforce:"pre",options:e,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async M=>{let[m,d,x=s]=M,S="",f="",w;p=p||await t(e);const A={};if(d.includes(":"))[S,f]=d.split(":"),w=await p(S,f,{...g,usedProps:A});else{const T=d.split(/-/g);for(let z=Tt;z>=1&&(S=T.slice(0,z).join("-"),f=T.slice(z).join("-"),w=await p(S,f,{...g,usedProps:A}),!w);z--);}if(!w){i&&!_.isESLint&&we(`failed to load icon "${m}"`);return}let E;const P=`url("data:image/svg+xml;utf8,${Mt(w)}")`;return x==="auto"&&(x=w.includes("currentColor")?"mask":"bg"),x==="mask"?E={"--un-icon":P,"-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",...A}:E={background:`${P} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...A},v?.(E,{collection:S,icon:f,svg:w,mode:x}),E},{layer:h,prefix:r}]]}}}function Me(t,e){const n=new Map;function s(r){if(Ft.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 Ae(r,i,o);if(a)return a;const l=await s(r);if(l){const u=[i,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.replace(/([a-z])(\d+)/g,"$1-$2")];a=await Ce(l,r,u,o)}return a}}function It(){const t=typeof process<"u"&&process.stdout&&!process.versions.deno,e=t&&!!le.VSCODE_CWD,n=t&&!!le.ESLINT;return{isNode:t,isVSCode:e,isESLint:n}}function Nt(t){return Me(Oe,t)}const Dt=zt(async t=>{const e=t?.customFetch,n=t?.cdn;return e&&n?Me(e,n):n?Nt(n):Ae});function Rt(t){return t.replace(/-(\w)/g,(e,n)=>n?n.toUpperCase():"")}function pe(t){return t.charAt(0).toUpperCase()+t.slice(1)}function de(t){return t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var me=["Webkit","Moz","ms"];function Vt(t){const e={};function n(s){const r=e[s];if(r)return r;let i=Rt(s);if(i!=="filter"&&i in t)return e[s]=de(i);i=pe(i);for(let o=0;o<me.length;o++){const a=`${me[o]}${i}`;if(a in t)return e[s]=de(pe(a))}return s}return({entries:s})=>s.forEach(r=>{r[0].startsWith("--")||(r[0]=n(r[0]))})}function Bt(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function Ut(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=L(o.postprocess)).unshift(Vt(n.createElement("div").style)),i.configResolved?.(r,o);const l=lt(r,o),u=$=>i.inject?i.inject($):s().prepend($),c=()=>i.rootElement?i.rootElement():n.body,h=new Map;let y=!0;const v=new Set;let _,g,p=[];const M=()=>new Promise($=>{p.push($),g!=null&&clearTimeout(g),g=setTimeout(()=>x().then(()=>{const b=p;p=[],b.forEach(C=>C())}),0)});function m($,b=!1){if($.nodeType!==1)return;const C=$;C.hasAttribute(a)&&C.removeAttribute(a),b&&C.querySelectorAll(`[${a}]`).forEach(O=>{O.removeAttribute(a)})}function d($,b){let C=h.get($);if(!C)if(C=n.createElement("style"),C.setAttribute("data-unocss-runtime-layer",$),h.set($,C),b==null)u(C);else{const O=d(b),j=O.parentNode;j?j.insertBefore(C,O.nextSibling):u(C)}return C}async function x(){const $=[...v],b=await l.generate($);return b.layers.reduce((O,j)=>(d(j,O).innerHTML=b.getLayer(j)??"",j),void 0),$.filter(O=>!b.matched.has(O)).forEach(O=>v.delete(O)),{...b,getStyleElement:O=>h.get(O),getStyleElements:()=>h}}async function S($){const b=v.size;await l.applyExtractors($,void 0,v),b!==v.size&&await M()}async function f($=c()){const b=$&&$.outerHTML;b&&(await S(`${b} ${Bt(b)}`),m(s()),m($,!0))}const w=new MutationObserver($=>{y||$.forEach(async b=>{if(b.target.nodeType!==1)return;const C=b.target;for(const O of h)if(C===O[1])return;if(b.type==="childList")b.addedNodes.forEach(async O=>{if(O.nodeType!==1)return;const j=O;_&&!_(j)||(await S(j.outerHTML),m(j))});else{if(_&&!_(C))return;if(b.attributeName!==a){const O=Array.from(C.attributes).map(N=>N.value?`${N.name}="${N.value}"`:N.name).join(" "),j=`<${C.tagName.toLowerCase()} ${O}>`;await S(j)}m(C)}})});let A=!1;function E(){if(A)return;const $=i.observer?.target?i.observer.target():c();$&&(w.observe($,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),A=!0)}function P(){i.bypassDefined&&Ht(l.blocked),f(),E()}function T(){n.readyState==="loading"?e.addEventListener("DOMContentLoaded",P):P()}const z=e.__unocss_runtime=e.__unocss_runtime={version:l.version,uno:l,async extract($){k($)||($.forEach(b=>v.add(b)),$=""),await S($)},extractAll:f,inspect($){_=$},toggleObserver($){$===void 0?y=!y:y=!!$,!A&&!y&&T()},update:x,presets:e.__unocss_runtime?.presets??{}};i.ready?.(z)!==!1&&(y=!1,T())}function Ht(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}Ut({defaults:{presets:[Dt({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as g,r as c,h as p,j as t,A as N,o as d,k as e,i as o,v as i,f as u,l as f,p as b,B as k,C as V,D as w,E as C,_ as B}from"./
|
|
1
|
+
import{d as g,r as c,h as p,j as t,A as N,o as d,k as e,i as o,v as i,f as u,l as f,p as b,B as k,C as V,D as w,E as C,_ as B}from"./BZflAdyk.js";import{_ as D}from"./BD_-z3C6.js";import{_ as L}from"./x4RoSwOc.js";const T={flex:"~ auto col gap3","items-center":"","justify-center":"","text-center":""},j=e("p",{my2:"","text-3em":"","text-primary":"","font-bold":"","font-stylish":""}," 👋 Hi there, welcome to Nuxt DevTools! ",-1),E={"max-w-190":"","text-lg":""},P=e("br",null,null,-1),S={mb6:"",op50:""},U=e("span",null,"Get Started",-1),$={p4:""},F={flex:"~ col gap-2",mxa:""},G=e("span",{op50:""},"Show floating panel from now on",-1),A=e("span",{op50:""},"Send anonymous statistics, help us improving DevTools",-1),z=g({__name:"index",setup(H){const n=c(!0),s=c(!0),{showPanel:l}=k();function h(){V.value=n.value,l.value==null&&s.value&&(l.value=!0),w.value=!1}return(I,a)=>{const x=C,_=D,v=B,m=L,y=N;return d(),p(y,{flex:"~ col",relative:"","h-screen":"","w-full":""},{default:t(()=>[e("div",T,[j,e("p",E,[o(x,{"mr-0.5":"","inline-block":"","h-5":"","translate-y--1.1":"","align-mid":""}),i(" is a set of visual tools that help you to know your Nuxt app better, and enhance your development experience with Nuxt. Enjoy!"),P]),e("p",S,[i(" Learn more at "),o(_,{href:"https://devtools.nuxt.com/",target:"_blank",rel:"noopener noreferrer",n:"primary"},{default:t(()=>[i(" devtools.nuxt.com ")]),_:1})]),o(v,{to:"/modules/overview",n:"lg primary",onClick:h},{default:t(()=>[U]),_:1})]),e("div",$,[e("div",F,[u(l)==null?(d(),p(m,{key:0,modelValue:u(s),"onUpdate:modelValue":a[0]||(a[0]=r=>f(s)?s.value=r:null),n:"green6"},{default:t(()=>[G]),_:1},8,["modelValue"])):b("",!0),o(m,{modelValue:u(n),"onUpdate:modelValue":a[1]||(a[1]=r=>f(n)?n.value=r:null),n:"green6"},{default:t(()=>[A,o(_,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op35:"",textContent:"Learn more"})]),_:1},8,["modelValue"])])])]),_:1})}}});export{z as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{d as ye,r as A,bH as Re,o as i,m as b,k as c,G as B,h as $,f as e,bI as ie,t as U,p as O,v as Q,a9 as Qe,aa as Xe,F as L,n as G,a6 as Ee,bz as he,w as De,by as je,bx as Ye,bJ as Ze,bK as et,aC as tt,bL as ot,ao as nt,ab as st,am as at,aA as ve,a as D,ac as rt,ak as Ve,aD as lt,b2 as it,bM as ut,e as ct,a2 as Ie,j as S,l as Z,i as v,I as ee,ay as dt,V as pt,_ as Ue,X as ft,A as Oe,an as mt,bN as vt,ah as ht,U as yt,bO as _t,at as gt}from"./BZflAdyk.js";import{_ as bt}from"./2WsLw058.js";import{_ as Ne}from"./DO36ltOt.js";import{_ as kt}from"./vukXLwum.js";import{_ as Le}from"./BAJXKRnU.js";import{_ as wt}from"./DLUNO0Xm.js";import{_ as Ct}from"./A56qLMdk.js";import{_ as xt}from"./B2aNs1qV.js";import{C as xe,S as Ae}from"./BcJws1i5.js";import{e as St}from"./CHRohc05.js";import{_ as Tt}from"./BgwfQLiC.js";import{_ as $t}from"./BwlD2UKZ.js";import"./x4RoSwOc.js";import"./CTgwY-nX.js";import"./L-yiqDbL.js";function Rt(t,a){if(typeof t!="string")throw new TypeError("argument str must be a string");const n={},o=a||{},_=o.decode||Et;let m=0;for(;m<t.length;){const d=t.indexOf("=",m);if(d===-1)break;let h=t.indexOf(";",m);if(h===-1)h=t.length;else if(h<d){m=t.lastIndexOf(";",d-1)+1;continue}const y=t.slice(m,d).trim();if(o?.filter&&!o?.filter(y)){m=h+1;continue}if(n[y]===void 0){let u=t.slice(d+1,h).trim();u.codePointAt(0)===34&&(u=u.slice(1,-1)),n[y]=Dt(u,_)}m=h+1}return n}function Et(t){return t.includes("%")?decodeURIComponent(t):t}function Dt(t,a){try{return a(t)}catch{return t}}const re=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Se(t,a,n){const o=n||{},_=o.encode||encodeURIComponent;if(typeof _!="function")throw new TypeError("option encode is invalid");if(!re.test(t))throw new TypeError("argument name is invalid");const m=_(a);if(m&&!re.test(m))throw new TypeError("argument val is invalid");let d=t+"="+m;if(o.maxAge!==void 0&&o.maxAge!==null){const h=o.maxAge-0;if(Number.isNaN(h)||!Number.isFinite(h))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(h)}if(o.domain){if(!re.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!re.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!jt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}function jt(t){return Object.prototype.toString.call(t)==="[object Date]"||t instanceof Date}const Vt=c("div",{"x-divider":""},null,-1),Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(t){const a=A(!0),n=Re();return(o,_)=>{const m=Ee,d=Ne,h=Pe;return i(),b("div",null,[c("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:B([{"bg-active":e(n)===o.item.filepath}]),style:Qe({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:_[0]||(_[0]=y=>{a.value=!e(a),n.value=o.item.filepath})},[c("div",{class:B({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(i(),$(m,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(a)?90:0,transition:""},null,8,["transform-rotate"])):(i(),$(d,{key:1,class:B(("getRequestMethodClass"in o?o.getRequestMethodClass:e(ie))(o.item.method||"*")),textContent:U((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),c("span",{class:B({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(i(),$(m,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):O("",!0),Q(" "+U(o.item.route),1)],2)],6),Vt,e(a)?Xe(o.$slots,"default",{key:0},()=>[(i(!0),b(L,null,G(o.item.routes,y=>(i(),$(h,{key:y.filepath,item:y,index:o.index+1},null,8,["item","index"]))),128))]):O("",!0)])}}});function q(t){if(typeof t!="object")return t;var a,n,o=Object.prototype.toString.call(t);if(o==="[object Object]"){if(t.constructor!==Object&&typeof t.constructor=="function"){n=new t.constructor;for(a in t)t.hasOwnProperty(a)&&n[a]!==t[a]&&(n[a]=q(t[a]))}else{n={};for(a in t)a==="__proto__"?Object.defineProperty(n,a,{value:q(t[a]),configurable:!0,enumerable:!0,writable:!0}):n[a]=q(t[a])}return n}if(o==="[object Array]"){for(a=t.length,n=Array(a);a--;)n[a]=q(t[a]);return n}return o==="[object Set]"?(n=new Set,t.forEach(function(_){n.add(q(_))}),n):o==="[object Map]"?(n=new Map,t.forEach(function(_,m){n.set(q(m),q(_))}),n):o==="[object Date]"?new Date(+t):o==="[object RegExp]"?(n=new RegExp(t.source,t.flags),n.lastIndex=t.lastIndex,n):o==="[object DataView]"?new t.constructor(q(t.buffer)):o==="[object ArrayBuffer]"?t.slice(0):o.slice(-6)==="Array]"?new t.constructor(t):t}const It={path:"/",watch:!0,decode:t=>Ze(decodeURIComponent(t)),encode:t=>encodeURIComponent(typeof t=="string"?t:JSON.stringify(t))},le=window.cookieStore;function Ut(t,a){const n={...It,...a};n.filter??=y=>y===t;const o=Te(n)||{};let _;n.maxAge!==void 0?_=n.maxAge*1e3:n.expires&&(_=n.expires.getTime()-Date.now());const m=_!==void 0&&_<=0,d=q(m?void 0:o[t]??n.default?.()),h=_&&!m?Lt(d,_,n.watch&&n.watch!=="shallow"):A(d);{let y=null;try{!le&&typeof BroadcastChannel<"u"&&(y=new BroadcastChannel(`nuxt:cookies:${t}`))}catch{}const u=()=>{n.readonly||et(h.value,o[t])||(Nt(t,h.value,n),o[t]=q(h.value),y?.postMessage({value:n.encode(h.value)}))},j=P=>{const x=P.refresh?Te(n)?.[t]:n.decode(P.value);I=!0,h.value=x,o[t]=q(x),tt(()=>{I=!1})};let I=!1;const F=!!je();if(F&&he(()=>{I=!0,u(),y?.close()}),le){const P=x=>{const w=x.changed.find(N=>N.name===t);w&&j({value:w.value})};le.addEventListener("change",P),F&&he(()=>le.removeEventListener("change",P))}else y&&(y.onmessage=({data:P})=>j(P));n.watch?De(h,()=>{I||u()},{deep:n.watch!=="shallow"}):u()}return h}function Te(t={}){return Rt(document.cookie,t)}function Ot(t,a,n={}){return a==null?Se(t,a,{...n,maxAge:-1}):Se(t,a,n)}function Nt(t,a,n={}){document.cookie=Ot(t,a,n)}const $e=2147483647;function Lt(t,a,n){let o,_,m=0;const d=n?A(t):{value:t};return je()&&he(()=>{_?.(),clearTimeout(o)}),Ye((h,y)=>{n&&(_=De(d,y));function u(){m=0,clearTimeout(o);const j=a-m,I=j<$e?j:$e;o=setTimeout(()=>{if(m+=I,m<a)return u();d.value=void 0,y()},I)}return{get(){return h(),d.value},set(j){u(),d.value=j,y()}}})}const At={"h-full":"","w-full":"",flex:"~ col"},Pt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},qt={flex:"~ gap2 items-center"},Mt={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Ft={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ht={class:"hidden md:block"},zt=c("div",{"flex-auto":""},null,-1),Gt=c("div",{"text-xs":"",op50:""}," Send from ",-1),Jt=c("option",{value:"app"}," App ",-1),Wt=c("option",{value:"devtools"}," DevTools ",-1),Kt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Qt={"text-right":"","font-mono":""},Xt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Yt={flex:"~ gap-4"},Zt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},eo=c("div",{"w-5":"","x-divider":""},null,-1),to=c("div",{"flex-none":""}," Default Inputs ",-1),oo=c("div",{"x-divider":""},null,-1),no={key:2},so={key:3,border:"b base",relative:"","n-code-block":""},ao={flex:"~ wrap","w-full":""},ro=["onClick"],lo=c("div",{border:"b base","flex-auto":""},null,-1),io={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},uo=c("div",null,"Response",-1),co={key:1,"text-xs":"",op50:""},po=c("div",{"flex-auto":""},null,-1),fo=c("div",{op50:""}," Request finished in ",-1),mo={key:0,"flex-auto":"","overflow-auto":""},vo={border:"~ base","h-full":"","w-full":"",rounded:""},ho=["data"],yo={key:2,"flex-auto":"","overflow-auto":"",p4:""},_o={border:"~ base",rounded:""},go=["src"],bo={key:1,controls:"",rounded:""},ko=["src"],wo=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(t,{emit:a}){const n=t,o=a,[_,m]=ot(),d=nt(),h=st(),y=at(),u=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),j=D(()=>u.contentType.includes("application/json")?"json":u.contentType.includes("text/html")?"html":u.contentType.includes("text/css")?"css":u.contentType.includes("text/javascript")?"javascript":u.contentType.includes("image")||u.contentType.includes("video")?"media":u.contentType.includes("text/xml")||u.contentType.includes("application/xml")?"xml":u.contentType.includes("application/pdf")?"pdf":"text"),I=D(()=>{if(j.value==="json")return JSON.stringify(u.data,null,2);if(j.value==="media"||j.value==="pdf"){const s=new Blob([u.data],{type:u.contentType});return URL.createObjectURL(s)}return u.data}),F=A(!1),P=A(!1),x=rt(),w=D(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),N=D(()=>w.value?.filter(s=>s.startsWith(":")||s.startsWith("**:"))||[]),g=A(n.route.method||"GET"),R=A({}),k=ve({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"}]}),V=A({}),{inputDefaults:C,sendFrom:H}=Ve("serverRoutes"),J=D(()=>y?.value?.app?.$fetch?H.value:"devtools"),ue=["GET","POST","PUT","PATCH","DELETE","HEAD"],ce=["PATCH","POST","PUT","DELETE"],te=D(()=>ce.includes(g.value.toUpperCase())),p=A(),oe=["input","json"],W=A(oe[0]),ne=D({get:()=>k[p.value],set:s=>{k[p.value]=s}}),_e=D(()=>({...K(C.value.query),...K(k.query)})),ge=D(()=>({...K(C.value.headers),...K(k.headers)})),de=D(()=>te.value?W.value==="json"?{...K(C.value.body),...V.value}:{...K(C.value.body),...K(k.body)}:void 0),qe=D(()=>{let s=window?.location.origin;return s.charAt(s.length-1)==="/"&&(s=s.slice(0,-1)),s}),se=D(()=>{let s=new URLSearchParams(_e.value).toString();s&&(s=`?${s}`);const l=(w.value?.map(E=>(E.startsWith(":")||E.startsWith("**:"))&&R.value[E]||E).join("")||"")+s;let f=h.value?.app.baseURL||"";return(f==="./"||f===".")&&(f=""),f.endsWith("/")&&(f=f.slice(0,-1)),f+l}),be=D(()=>qe.value+se.value);function K(s){const l=Object.fromEntries(s.filter(({active:f,key:E,value:T})=>f&&E&&T!==void 0).map(({key:f,value:E})=>[f,E]));return Object.entries(l).length?l:void 0}async function ke(){P.value=!0,F.value=!0;const s=Date.now(),l=J.value==="app"?y.value.app.$fetch:$fetch;pt("server-routes:fetch",{method:g.value,sendFrom:J.value});try{u.data=await l(be.value,{method:g.value.toUpperCase(),headers:ge.value,query:_e.value,body:de.value,onResponse({response:f}){u.contentType=(f.headers.get("content-type")||"").toString().toLowerCase().trim(),u.statusCode=f.status,u.error=void 0},onResponseError(f){u.error=f.response._data,u.data=f.response._data}})}catch{}F.value=!1,u.fetchTime=Date.now()-s}const we=D(()=>{const s=[],l=[],f=Object.entries(ge.value).filter(([T,M])=>T&&M&&!(T==="Content-Type"&&M==="application/json")).map(([T,M])=>` '${T}': '${M}'`).join(`,
|
|
2
|
+
`);g.value.toUpperCase()!=="GET"&&l.push(`method: '${g.value.toUpperCase()}'`),f&&l.push(`headers: {
|
|
3
|
+
${f}
|
|
4
|
+
}`),de.value&&l.push(`body: ${JSON.stringify(de.value,null,2)}`);const E=l.length?`, {
|
|
5
|
+
${l.join(`,
|
|
6
|
+
`).split(`
|
|
7
|
+
`).map(T=>` ${T}`).join(`
|
|
8
|
+
`)}
|
|
9
|
+
}`:"";return s.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${se.value}'${E})`}),s.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${se.value}'${E})`}),s}),X=A(Be()),z=ve({key:"",value:""}),Me=D(()=>{const s=[];return N.value.length&&s.push({name:"Params",slug:"params",length:N.value.length}),s.push({name:"Query",slug:"query",length:k.query.length}),te.value&&s.push({name:"Body",slug:"body",length:k.body.length}),s.push({name:"Headers",slug:"headers",length:k.headers.length}),s.push({name:"Cookies",slug:"cookies",length:X.value.length}),s.push({name:"Snippets",slug:"snippet"}),s});function Be(){return document.cookie.split("; ").map(s=>{const[l,f]=s.split("=");return{key:l,value:f}}).filter(s=>s.key)}function pe(s,l){if(!s)return;const f=X.value.find(T=>T.key===s),E=Ut(s);f!==void 0?l===void 0&&(X.value=X.value.filter(T=>T.key!==s)):(X.value.push({key:s,value:l}),z.key="",z.value=""),E.value=l}lt(()=>{W.value==="json"&&typeof V.value=="string"&&(V.value=JSON.parse(V.value))});const fe=it("nuxt-devtools:server-routes:inputs",()=>[],{window:window.parent});ut([k,p],()=>{const s=fe.value?.find(l=>l.path===n.route.filepath);if(s){p.value||(p.value=s.tab),s.tab!==p.value&&(s.tab=p.value);const{body:l,query:f,headers:E,params:T}=s.inputs;Object.assign(k,{body:l,query:f,headers:E}),R.value=T}else{const l={path:n.route.filepath,tab:N.value.length?"params":"query",inputs:{...k,...N.value.length?{params:R.value}:{}}};fe.value.push(l),p.value||(p.value=l.tab)}},{immediate:!0,deep:!0,debounce:500});function Fe(){fe.value=[],k.body=[],k.query=[],k.headers=[],R.value={},p.value=N.value.length?"params":"query"}const He=ct();return(s,l)=>{const f=Ue,E=kt,T=ft,M=Ee,Ce=Le,ze=wt,Ge=Oe,Je=mt,me=Ne,We=Ct,Ke=xt,ae=Ie("tooltip");return i(),b("div",At,[c("div",Pt,[c("div",qt,[s.route.method?(i(),$(f,{key:0,class:B(["n-badge-base n-sm",("getRequestMethodClass"in s?s.getRequestMethodClass:e(ie))(e(g))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:S(()=>[Q(U(e(g).toUpperCase()),1)]),_:1},8,["class"])):(i(),$(E,{key:1,modelValue:e(g),"onUpdate:modelValue":l[0]||(l[0]=r=>Z(g)?g.value=r:null),class:B(["n-badge-base n-sm",("getRequestMethodClass"in s?s.getRequestMethodClass:e(ie))(e(g))])},{default:S(()=>[(i(),b(L,null,G(ue,r=>c("option",{key:r,class:B(("getRequestMethodClass"in s?s.getRequestMethodClass:e(ie))(r))},U(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),c("div",Mt,[v(T,{"model-value":e(se),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),c("div",Bt,[ee(v(f,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:l[1]||(l[1]=r=>e(He)(e(be),"server-route-url"))},null,512),[[ae,"Copy URL"]]),ee(v(f,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:l[2]||(l[2]=r=>e(x)(s.route.filepath))},null,512),[[ae,"Open in Editor"]])])]),v(f,{"h-full":"",n:"primary solid",onClick:ke},{default:S(()=>[v(M,{icon:"carbon:send"})]),_:1})])]),c("div",Ft,[(i(!0),b(L,null,G(e(Me),r=>ee((i(),$(f,{key:r.slug,class:B(e(p)===r.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Y=>p.value=r.slug},{default:S(()=>[v(M,{icon:("ServerRouteTabIcons"in s?s.ServerRouteTabIcons:e(Ae))[r.slug]},null,8,["icon"]),c("div",Ht,[Q(U(r.name)+" "+U(r?.length?`(${r.length})`:"")+" ",1),c("span",null,U(e(C)[r.slug]?.length?`(${e(C)[r.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[ae,r.name]])),128)),zt,Gt,v(E,{modelValue:e(J),"onUpdate:modelValue":l[3]||(l[3]=r=>Z(J)?J.value=r:null),class:"n-xs",disabled:!e(y)?.app?.$fetch},{default:S(()=>[Jt,Wt]),_:1},8,["modelValue","disabled"]),ee(v(f,{n:"orange",class:"p-3",icon:"i-carbon-clean",onClick:Fe},null,512),[[ae,"Clear Inputs Saved Cache"]])]),e(p)==="params"?(i(),b("div",Kt,[(i(!0),b(L,null,G(e(N),r=>(i(),b(L,{key:r},[c("div",Qt,U(r),1),v(T,{modelValue:e(R)[r],"onUpdate:modelValue":Y=>e(R)[r]=Y,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):O("",!0),e(p)==="cookies"?(i(),b("div",Xt,[(i(!0),b(L,null,G(e(X),r=>(i(),b("div",{key:r.key,flex:"~ gap-4 items-center"},[v(T,{placeholder:"Key...","model-value":r.key,disabled:"","op-70":""},null,8,["model-value"]),v(T,{placeholder:"Value...","model-value":r.value,"flex-1":"",n:"primary",onInput:Y=>pe(r.key,Y.target?.value)},null,8,["model-value","onInput"]),v(f,{title:"Delete",n:"red",onClick:Y=>pe(r.key,void 0)},{default:S(()=>[v(M,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),c("div",Yt,[v(T,{modelValue:e(z).key,"onUpdate:modelValue":l[4]||(l[4]=r=>e(z).key=r),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),v(T,{modelValue:e(z).value,"onUpdate:modelValue":l[5]||(l[5]=r=>e(z).value=r),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),v(f,{title:"Add",n:"primary",onClick:l[6]||(l[6]=r=>pe(e(z).key,e(z).value))},{default:S(()=>[v(M,{icon:"i-carbon-save"})]),_:1})])])):O("",!0),v(e(_),null,{default:S(()=>[v(Ce,{modelValue:e(ne),"onUpdate:modelValue":l[9]||(l[9]=r=>Z(ne)?ne.value=r:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:S(()=>[e(C)[e(p)]?.length?(i(),b(L,{key:0},[c("div",Zt,[eo,to,v(f,{icon:"i-carbon-edit",border:!1,onClick:l[7]||(l[7]=r=>o("open-default-input"))}),oo]),v(Ce,{modelValue:e(C)[e(p)],"onUpdate:modelValue":l[8]||(l[8]=r=>e(C)[e(p)]=r),disabled:"",p0:""},null,8,["modelValue"])],64)):O("",!0)]),_:1},8,["modelValue"])]),_:1}),e(p)==="snippet"?(i(),b("div",no,[e(we).length?(i(),$(ze,{key:0,"code-snippets":e(we)},null,8,["code-snippets"])):O("",!0)])):e(ne)?(i(),b("div",so,[e(p)==="body"?(i(),b(L,{key:0},[c("div",ao,[(i(),b(L,null,G(oe,r=>c("button",{key:r,px4:"",py2:"",border:"r base",hover:"bg-active",class:B({"border-b":r!==e(W)}),onClick:Y=>W.value=r},[c("div",{class:B({op30:r!==e(W)}),"font-mono":""},U(r),3)],10,ro)),64)),lo]),e(W)==="input"?(i(),$(e(m),{key:0})):e(W)==="json"?(i(),$(e(St),dt({key:1,modelValue:e(V),"onUpdate:modelValue":l[10]||(l[10]=r=>Z(V)?V.value=r:null),class:[e(d)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},s.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):O("",!0)],64)):(i(),$(e(m),{key:1}))])):O("",!0),e(P)?e(F)?(i(),$(Je,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:S(()=>[Q(" Fetching... ")]),_:1})):(i(),b(L,{key:6},[c("div",io,[uo,e(u).error?(i(),$(me,{key:0,n:"red"},{default:S(()=>[Q(" Error ")]),_:1})):O("",!0),v(me,{n:e(u).error?"orange":"green",textContent:U(e(u).statusCode)},null,8,["n","textContent"]),e(u).contentType?(i(),b("code",co,U(e(u).contentType),1)):O("",!0),e(u).contentType==="application/json"?(i(),$(We,{key:2,getter:()=>({input:e(I)})},null,8,["getter"])):O("",!0),po,fo,v(me,{n:"green"},{default:S(()=>[Q(U(e(u).fetchTime)+" ms ",1)]),_:1})]),e(j)==="pdf"?(i(),b("div",mo,[c("div",vo,[c("object",{data:e(I),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,ho)])])):e(j)!=="media"?(i(),$(Ke,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(I),lang:e(j)},null,8,["code","lang"])):(i(),b("div",yo,[c("div",_o,[e(u).contentType.includes("image")?(i(),b("img",{key:0,rounded:"",src:e(I)},null,8,go)):(i(),b("video",bo,[c("source",{src:e(I),type:"video/mp4"},null,8,ko)]))])]))],64)):(i(),$(Ge,{key:4},{default:S(()=>[v(f,{n:"primary",onClick:ke},{default:S(()=>[v(M,{icon:"carbon:send"}),Q(" Send request ")]),_:1})]),_:1}))])}}}),Co={flex:"~ gap1","text-sm":""},xo={key:0,op50:""},So={op50:""},To=c("span",{op75:""},"Select a route to start",-1),$o=c("div",{p4:"",border:"b base"},[c("span",{"text-lg":""},"Default Inputs"),c("br"),c("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1),Fo=ye({__name:"server-routes",setup(t){const a=A(!1),n=vt(),o=Re(),{selectedRoute:_,view:m,inputDefaults:d}=Ve("serverRoutes"),h=D(()=>{!o.value&&_.value&&(o.value=_.value.filepath);const x=n.value?.find(w=>w.filepath===o.value);return o.value!==_.value?.filepath&&x&&(_.value=x),x}),y=A(""),u=D(()=>new ht(n.value||[],{keys:["method","route"],shouldSort:!0})),j=D(()=>n.value?y.value?u.value.search(y.value).map(w=>w.item):n.value:[]),I=D(()=>{const x=[],w=(g,R)=>{g.routes=g.routes||[],g.routes.push(R)},N=(g,R)=>{const k=R?R.routes?.find(C=>C.route===g):x.find(C=>C.route===g);if(k)return k;const V={route:g,filepath:g.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return R?w(R,V):x.push(V),V};return j.value.forEach(g=>{let R,k;const V=g.filepath.split("/"),C=V.slice(V.indexOf("server")+1);if(g.type==="runtime"){C[0]="runtime";const H=V.indexOf("dist");H!==-1&&(R=V[H-1],R&&C.splice(1,0,R))}C.length>0&&C[C.length-1].includes(".")&&C.pop(),C.forEach(H=>{k=N(H,k)}),k?w(k,g):x.push(g)}),x});function F(){m.value=m.value==="tree"?"list":"tree"}function P(x){return x.charAt(0).toUpperCase()+x.slice(1)}return(x,w)=>{const N=Ue,g=bt,R=Pe,k=wo,V=gt,C=Oe,H=yt,J=Le,ue=Tt,ce=$t,te=Ie("tooltip");return i(),b(L,null,[v(H,{"storage-key":"tab-server-routes"},{left:S(()=>[v(g,{search:e(y),"onUpdate:search":w[1]||(w[1]=p=>Z(y)?y.value=p:null),pb2:""},{actions:S(()=>[ee(v(N,{"text-lg":"",icon:e(m)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:F},null,8,["icon"]),[[te,"Toggle View"]]),ee(v(N,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:w[0]||(w[0]=p=>a.value=!e(a))},null,512),[[te,"Default Inputs"]])]),default:S(()=>[c("div",Co,[e(y)?(i(),b("span",xo,U(e(j).length)+" matched · ",1)):O("",!0),c("span",So,U(e(n)?.length)+" routes in total",1)])]),_:1},8,["search"]),(i(!0),b(L,null,G(e(m)==="tree"?e(I):e(j),p=>(i(),$(R,{key:p.filepath,item:p},null,8,["item"]))),128))]),right:S(()=>[(i(),$(_t,{max:10},[e(h)?(i(),$(k,{key:e(h).filepath,route:e(h),onOpenDefaultInput:w[2]||(w[2]=p=>a.value=!0)},null,8,["route"])):O("",!0)],1024)),e(h)?O("",!0):(i(),$(C,{key:0},{default:S(()=>[v(V,{px6:"",py2:""},{default:S(()=>[To]),_:1})]),_:1}))]),_:1}),v(ce,{modelValue:e(a),"onUpdate:modelValue":w[3]||(w[3]=p=>Z(a)?a.value=p:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:w[4]||(w[4]=p=>a.value=!1)},{default:S(()=>[c("div",null,[$o,(i(!0),b(L,null,G(Object.keys(e(d)),p=>(i(),$(ue,{key:p,text:`${P(p)} ${e(d)[p].length?`(${e(d)[p].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in x?x.ServerRouteTabIcons:e(Ae))[p]},{default:S(()=>[v(J,{modelValue:e(d)[p],"onUpdate:modelValue":oe=>e(d)[p]=oe,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Fo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as s,al as c,m as _,f as t,h as o,j as l,an as r,o as e,v as f}from"./
|
|
1
|
+
import{d as s,al as c,m as _,f as t,h as o,j as l,an as r,o as e,v as f}from"./BZflAdyk.js";import{l as i}from"./By8bKr-N.js";const m={class:"h-full w-full"},x=s({__name:"pinia",setup(p){const{connected:n}=c();return(u,d)=>{const a=r;return e(),_("div",m,[t(n)?(e(),o(t(i),{key:0})):(e(),o(a,{key:1},{default:l(()=>[f(" Connecting.... ")]),_:1}))])}}});export{x as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as B,a as w,aL as M,o as n,m as r,k as t,a9 as T,f as l,t as k,ad as O,F as f,n as E,h as y,r as C,w as Y,aC as q,a1 as j,bW as U,p as x,i as m,G as z,q as X,ao as Z,e as K,au as P,j as v,ay as Q,v as F,_ as G,aN as ee,am as se,b3 as te,bX as ne,ab as oe,N as ae,ac as le,A as ie,L as R,a5 as re,Z as ce}from"./ciodjZaS.js";import{_ as V}from"./CxLTb5RC.js";import{_ as H}from"./Bi99gj7u.js";import{_ as pe}from"./rLudNEh9.js";import{e as de}from"./BMUgLter.js";import{_ as ue}from"./2tJW9cKr.js";import{_ as me}from"./DKlNNSWk.js";import{_ as ke}from"./CnW1WPg6.js";import{_ as he}from"./CE84j0J9.js";import{_ as _e}from"./DYx1ZwvQ.js";import{_ as fe}from"./CLVHkiJk.js";import"./DwVKZd3-.js";import"./yFeWtr-M.js";import"./zjxoDR5L.js";import"./BcJws1i5.js";import"./BZvh3yot.js";const ye=B({__name:"TimelineItemFunction",props:{item:{}},setup(_){const p=_,c=w(()=>M(p.item.name,50,60,"_op_")),e=w(()=>c.value.replace(/_op_/,"1")),a=w(()=>M(p.item.name,50,40)),i=w(()=>c.value.replace(/_op_/,"0.2"));return(o,d)=>(n(),r("button",{class:"group",style:T({color:l(e),borderLeft:`2px solid ${l(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[t("div",{style:T({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),t("div",{style:T({color:l(a),"--c":l(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(o.item.name),5)],4))}}),ve={relative:"","h-full":""},be={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ge=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=O(()=>c.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,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,o)=>{const d=ye;return n(),r("div",ve,[t("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:o[0]||(o[0]=s=>i.segment.route?e("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),t("div",be,k(l(a))+" ago ",1),t("div",null,[(n(!0),r(f,null,E(i.segment.functions,(s,u)=>(n(),y(d,{key:u,item:s.event,style:T({position:"absolute",minWidth:`${s.relativeWidth*100}%`,maxWidth:`${s.relativeWidth*100}%`,top:`${4+s.layer*1.6}em`,left:`${s.relativeStart*100}%`}),onClick:h=>e("select",s)},null,8,["item","style","onClick"]))),128))])])}}}),xe=3e3,$e=50;function Ae(_){const p=[];let c={start:0,end:0,events:[],functions:[],duration:0};for(const e of _){const a=e.end||e.start;(e.start-c.end>xe||e.type==="route")&&(c={start:e.start,end:a,events:[],functions:[],duration:0},p.push(c)),c.events.push(e),c.end=a+$e}return p.forEach((e,a)=>{const i=e.end-e.start,o=[];e.duration=i,e.previousGap=a>0?e.start-p[a-1].end:0,e.events.forEach(d=>{const s=d.end||d.start;let u=0;d.type!=="route"&&(u=o.findIndex($=>$<=d.start),u===-1?(u=o.length,o.push(s+1e3)):o[u]=s+1e3);const h={event:d,segment:e,relativeStart:(d.start-e.start)/i,relativeWidth:(s-d.start)/i,layer:u};d.type==="function"?e.functions.push(h):e.route=h})}),p}const De={relative:""},Ce={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":""},Be=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=C(),i=C(),o=C(),d=C(),s=C(!0),u=C(1.5),h=w(()=>Ae(c.data.events)),$=w(()=>(c.data.events.length,a.value?.scrollWidth||window.innerWidth));function A(){d.value&&(d.value.style.width=`${$.value}px`)}function S(){s.value&&a.value&&(a.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}),o.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}))}return Y(()=>c.data.events.length,async()=>{await q(),A(),S()},{flush:"post"}),j(a,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),o.value.scrollLeft=a.value.scrollLeft,s.value=a.value.scrollLeft>=a.value.scrollWidth-a.value.clientWidth)}),j(o,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),a.value.scrollLeft=o.value.scrollLeft)}),j(a,"wheel",b=>{b.altKey?(u.value=U(u.value+b.deltaY/200,.5,3),A()):a.value.scrollLeft+=b.deltaY}),(b,L)=>{const D=V,W=ge;return n(),r(f,null,[t("div",De,[t("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,g.duration/10)/l($)*100}%`})},[(n(!0),r(f,null,E(g.functions,(I,J)=>(n(),r("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in b?b.getHashColorFromString:l(M))(I.event.name,50,60)})},null,4))),128)),g.route?(n(),r("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${g.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),t("div",{ref_key:"minimapScroller",ref:o,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[t("div",{ref_key:"minimapScrollerInner",ref:d,"h-1px":""},null,512)],512)]),t("div",{ref_key:"scroller",ref:a,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r(f,{key:N},[g.previousGap&&g.previousGap>=200?(n(),r("div",Ce,[m(D,{op50:"",duration:g.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(W,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(N===l(h).length-1?"border-r border-base":""),segment:g,style:T({width:`${Math.max(50,g.duration/10)*l(u)}px`}),onSelect:L[0]||(L[0]=I=>e("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),we=X(Be,[["__scopeId","data-v-357f5ced"]]),Te={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Se=["onClick"],Ne=t("div",{"i-carbon-function":"",op50:""},null,-1),Fe={flex:"~","ml--1":"","font-mono":""},Ee=t("div",{op30:""}," ( ",-1),Le={key:0,mr2:"",op30:""},Ie={op75:""},We=t("div",{op30:""}," ) ",-1),Me=t("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[t("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),Ve={flex:"~ col items-start"},je={"text-xs":"","font-mono":"",op30:""},Oe={"text-green":"","font-bold":"","font-mono":""},ze=t("div",{"flex-auto":""},null,-1),Ge=t("div",{"min-h-100":""},null,-1),Re=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=p;return(e,a)=>{const i=V;return n(),r("div",Te,[(n(!0),r(f,null,E(e.data.events,(o,d)=>(n(),r("button",{key:d,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:s=>c("select",o)},[o.type==="function"?(n(),r(f,{key:0},[Ne,t("div",{"font-mono":"",style:T({color:o.type==="function"?("getHashColorFromString"in e?e.getHashColorFromString:l(M))(o.name,50,60):""})},k(o.name),5),t("div",Fe,[Ee,(n(!0),r(f,null,E(o.args,(s,u)=>(n(),r(f,{key:u},[u?(n(),r("div",Le," , ")):x("",!0),t("div",Ie,k(s===null?"null":s===void 0?"undefined":typeof s=="function"?"[function]":Array.isArray(s)?"[Array]":typeof s=="object"?"[object]":JSON.stringify(s)),1)],64))),128)),We])],64)):(n(),r(f,{key:1},[Me,t("div",Ve,[t("div",je,k(o.from),1),t("div",Oe,k(o.to),1)])],64)),ze,o.end?(n(),y(i,{key:2,duration:o.end-o.start,color:o.type==="function"},null,8,["duration","color"])):x("",!0)],8,Se))),128)),Ge])}}}),Pe={key:0,"text-blue":""},He={key:1,"text-purple":""},Je={key:2,"text-green":""},Ye={key:3,"text-gray":""},qe={key:4,"text-gray":""},Ue={key:5,"text-gray":""},Xe={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ze={key:1},Ke={p2:"","text-sm":"",border:"t base"},Qe=B({__name:"TimelineArgumentView",props:{value:{}},setup(_){const p=_,c=C(),e=C();function a(){try{c.value=JSON.parse(JSON.stringify(p.value))}catch(s){console.error(s),e.value=s}}const i=B({emits:["setup"],setup(s,{emit:u}){return u("setup"),()=>null}}),o=Z(),d=K();return(s,u)=>{const h=G,$=P("VMenu");return typeof s.value=="string"?(n(),r("div",Pe,k(JSON.stringify(s.value)),1)):typeof s.value=="number"?(n(),r("div",He,k(s.value),1)):typeof s.value=="boolean"?(n(),r("div",Je,k(s.value),1)):typeof s.value>"u"?(n(),r("div",Ye," undefined ")):typeof s.value=="function"?(n(),r("div",qe," [Function"+k(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(n(),r("div",Ue," null ")):(n(),y($,{key:6,placement:"top"},{popper:v(()=>[m(l(i),{onSetup:a}),l(e)?(n(),r("div",Xe," Failed to display object: "+k(l(e)),1)):l(c)?(n(),r("div",Ze,[m(l(de),Q({"model-value":l(c)},s.$attrs,{class:["json-editor-vue",[l(o)==="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"]),t("div",Ke,[m(h,{title:"Copy to clipboard",icon:"carbon-copy",onClick:u[0]||(u[0]=A=>l(d)(JSON.stringify(l(c),null,2),"timeline-argument"))},{default:v(()=>[F(" Copy ")]),_:1})])])):x("",!0)]),default:v(()=>[t("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(s.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(s.value)?`[Array(${s.value.length})]`:"[Object]"),3)]),_:1}))}}}),es={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},ss={"mx--1":""},ts={flex:"~ gap-1","font-mono":""},ns={key:1},os=t("span",{ml1:"",op30:""},"(",-1),as={key:0,op30:""},ls=t("span",{op30:""},")",-1),is={flex:"~ gap-1","text-sm":""},rs=t("span",{mx1:"",op50:""},"·",-1),cs={class:"text-sm text-gray-400"},ps=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0}),e=ee(),a=w(()=>e.value?.metadata),i=w(()=>e.value?.imports.find(o=>o.as===p.record.name));return(o,d)=>{const s=H,u=pe,h=Qe,$=V,A=ue;return o.record?(n(),r("div",es,[t("div",ss,[m(s,{n:"yellow",textContent:"Function call"})]),t("div",ts,[l(i)?(n(),y(u,{key:0,item:l(i),metadata:l(a),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(n(),r("span",ns,k(o.record.name),1)),os,(n(!0),r(f,null,E(o.record.args,(S,b)=>(n(),r(f,{key:b},[b?(n(),r("span",as,", ")):x("",!0),m(h,{value:S},null,8,["value"])],64))),128)),ls]),t("div",is,[o.record.end?(n(),y($,{key:0,duration:o.record.end-o.record.start},null,8,["duration"])):x("",!0),rs,t("div",cs,k(l(c)),1)]),o.record.stacktrace?(n(),y(A,{key:0,stacktrace:o.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ds={key:0,"p-4":"",flex:"~ col gap-2"},us={"mx--1":""},ms={flex:"~ gap-1 items-center","font-mono":""},ks={op50:""},hs=t("span",{"i-carbon-arrow-right":"",op50:""},null,-1),_s={flex:"~ gap-1","text-sm":""},fs=t("span",{mx1:"",op50:""},"·",-1),ys={class:"text-sm text-gray-400"},vs=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0});return(e,a)=>{const i=H,o=V;return e.record?(n(),r("div",ds,[t("div",us,[m(i,{n:"green",textContent:"Route Change"})]),t("div",ms,[t("span",ks,k(e.record.from),1),hs,t("span",null,k(e.record.to),1)]),t("div",_s,[e.record.end?(n(),y(o,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),fs,t("div",ys,k(l(c)),1)])])):x("",!0)}}}),bs={key:0,"h-screen":"","of-hidden":""},gs={"h-screen":"","w-full":"",flex:"","flex-col":""},xs={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},$s={"text-sm":""},As=t("div",{"flex-auto":""},null,-1),Ds={"min-h-50":"",px3:"",py2:""},Cs=B({__name:"TimelineView",setup(_){const p=se(),c=C("table"),e=C(),a=w(()=>p.value?.metrics.clientTimeline());function i(){a.value&&(a.value.events=[])}function o(){c.value=c.value==="table"?"list":"table"}return(d,s)=>{const u=P("VTooltip"),h=G,$=we,A=Re,S=ps,b=vs,L=me;return l(a)?(n(),r("div",bs,[t("div",gs,[t("div",xs,[m(u,{flex:""},{popper:v(()=>[t("div",$s,k(l(a).options.enabled?"Recording...":"Paused"),1)]),default:v(()=>[t("div",{"text-lg":"",class:z(l(a).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(a).options.enabled?(n(),y(h,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:s[1]||(s[1]=D=>l(a).options.enabled=!1)},{default:v(()=>[F(" Stop Tracking ")]),_:1})):(n(),y(h,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:s[0]||(s[0]=D=>l(a).options.enabled=!0)},{default:v(()=>[F(" Start Tracking ")]),_:1})),As,m(h,{icon:l(c)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:o},null,8,["icon"]),m(h,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(c)==="table"?(n(),y($,{key:0,data:{...l(a)},onSelect:s[2]||(s[2]=D=>e.value=D.event)},null,8,["data"])):(n(),y(A,{key:1,data:{...l(a)},onSelect:s[3]||(s[3]=D=>e.value=D)},null,8,["data"]))]),m(L,{"model-value":!!l(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:s[4]||(s[4]=D=>e.value=void 0)},{default:v(()=>[t("div",Ds,[l(e)?.type==="function"?(n(),y(S,{key:0,record:l(e)},null,8,["record"])):l(e)?.type==="route"?(n(),y(b,{key:1,record:l(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Bs={class:"markdown-body"},ws=t("h1",null,"Timeline",-1),Ts=t("p",null,[t("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ss=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>
|
|
1
|
+
import{d as B,a as w,aL as M,o as n,m as r,k as t,a9 as T,f as l,t as k,ad as O,F as f,n as E,h as y,r as C,w as Y,aC as q,a1 as j,bW as U,p as x,i as m,G as z,q as X,ao as Z,e as K,au as P,j as v,ay as Q,v as F,_ as G,aN as ee,am as se,b3 as te,bX as ne,ab as oe,N as ae,ac as le,A as ie,L as R,a5 as re,Z as ce}from"./BZflAdyk.js";import{_ as V}from"./BF2Zv_ac.js";import{_ as H}from"./DO36ltOt.js";import{_ as pe}from"./AIZ3trgN.js";import{e as de}from"./CHRohc05.js";import{_ as ue}from"./C_QixTwI.js";import{_ as me}from"./BwlD2UKZ.js";import{_ as ke}from"./CmukqgDs.js";import{_ as he}from"./BD_-z3C6.js";import{_ as _e}from"./Sexyi49-.js";import{_ as fe}from"./T04KvlgM.js";import"./BRmBiXYU.js";import"./CTgwY-nX.js";import"./BFisL5PK.js";import"./BcJws1i5.js";import"./B2aNs1qV.js";const ye=B({__name:"TimelineItemFunction",props:{item:{}},setup(_){const p=_,c=w(()=>M(p.item.name,50,60,"_op_")),e=w(()=>c.value.replace(/_op_/,"1")),a=w(()=>M(p.item.name,50,40)),i=w(()=>c.value.replace(/_op_/,"0.2"));return(o,d)=>(n(),r("button",{class:"group",style:T({color:l(e),borderLeft:`2px solid ${l(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[t("div",{style:T({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),t("div",{style:T({color:l(a),"--c":l(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(o.item.name),5)],4))}}),ve={relative:"","h-full":""},be={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ge=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=O(()=>c.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,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,o)=>{const d=ye;return n(),r("div",ve,[t("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:o[0]||(o[0]=s=>i.segment.route?e("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),t("div",be,k(l(a))+" ago ",1),t("div",null,[(n(!0),r(f,null,E(i.segment.functions,(s,u)=>(n(),y(d,{key:u,item:s.event,style:T({position:"absolute",minWidth:`${s.relativeWidth*100}%`,maxWidth:`${s.relativeWidth*100}%`,top:`${4+s.layer*1.6}em`,left:`${s.relativeStart*100}%`}),onClick:h=>e("select",s)},null,8,["item","style","onClick"]))),128))])])}}}),xe=3e3,$e=50;function Ae(_){const p=[];let c={start:0,end:0,events:[],functions:[],duration:0};for(const e of _){const a=e.end||e.start;(e.start-c.end>xe||e.type==="route")&&(c={start:e.start,end:a,events:[],functions:[],duration:0},p.push(c)),c.events.push(e),c.end=a+$e}return p.forEach((e,a)=>{const i=e.end-e.start,o=[];e.duration=i,e.previousGap=a>0?e.start-p[a-1].end:0,e.events.forEach(d=>{const s=d.end||d.start;let u=0;d.type!=="route"&&(u=o.findIndex($=>$<=d.start),u===-1?(u=o.length,o.push(s+1e3)):o[u]=s+1e3);const h={event:d,segment:e,relativeStart:(d.start-e.start)/i,relativeWidth:(s-d.start)/i,layer:u};d.type==="function"?e.functions.push(h):e.route=h})}),p}const De={relative:""},Ce={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":""},Be=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=C(),i=C(),o=C(),d=C(),s=C(!0),u=C(1.5),h=w(()=>Ae(c.data.events)),$=w(()=>(c.data.events.length,a.value?.scrollWidth||window.innerWidth));function A(){d.value&&(d.value.style.width=`${$.value}px`)}function S(){s.value&&a.value&&(a.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}),o.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}))}return Y(()=>c.data.events.length,async()=>{await q(),A(),S()},{flush:"post"}),j(a,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),o.value.scrollLeft=a.value.scrollLeft,s.value=a.value.scrollLeft>=a.value.scrollWidth-a.value.clientWidth)}),j(o,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),a.value.scrollLeft=o.value.scrollLeft)}),j(a,"wheel",b=>{b.altKey?(u.value=U(u.value+b.deltaY/200,.5,3),A()):a.value.scrollLeft+=b.deltaY}),(b,L)=>{const D=V,W=ge;return n(),r(f,null,[t("div",De,[t("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,g.duration/10)/l($)*100}%`})},[(n(!0),r(f,null,E(g.functions,(I,J)=>(n(),r("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in b?b.getHashColorFromString:l(M))(I.event.name,50,60)})},null,4))),128)),g.route?(n(),r("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${g.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),t("div",{ref_key:"minimapScroller",ref:o,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[t("div",{ref_key:"minimapScrollerInner",ref:d,"h-1px":""},null,512)],512)]),t("div",{ref_key:"scroller",ref:a,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r(f,{key:N},[g.previousGap&&g.previousGap>=200?(n(),r("div",Ce,[m(D,{op50:"",duration:g.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(W,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(N===l(h).length-1?"border-r border-base":""),segment:g,style:T({width:`${Math.max(50,g.duration/10)*l(u)}px`}),onSelect:L[0]||(L[0]=I=>e("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),we=X(Be,[["__scopeId","data-v-357f5ced"]]),Te={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Se=["onClick"],Ne=t("div",{"i-carbon-function":"",op50:""},null,-1),Fe={flex:"~","ml--1":"","font-mono":""},Ee=t("div",{op30:""}," ( ",-1),Le={key:0,mr2:"",op30:""},Ie={op75:""},We=t("div",{op30:""}," ) ",-1),Me=t("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[t("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),Ve={flex:"~ col items-start"},je={"text-xs":"","font-mono":"",op30:""},Oe={"text-green":"","font-bold":"","font-mono":""},ze=t("div",{"flex-auto":""},null,-1),Ge=t("div",{"min-h-100":""},null,-1),Re=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=p;return(e,a)=>{const i=V;return n(),r("div",Te,[(n(!0),r(f,null,E(e.data.events,(o,d)=>(n(),r("button",{key:d,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:s=>c("select",o)},[o.type==="function"?(n(),r(f,{key:0},[Ne,t("div",{"font-mono":"",style:T({color:o.type==="function"?("getHashColorFromString"in e?e.getHashColorFromString:l(M))(o.name,50,60):""})},k(o.name),5),t("div",Fe,[Ee,(n(!0),r(f,null,E(o.args,(s,u)=>(n(),r(f,{key:u},[u?(n(),r("div",Le," , ")):x("",!0),t("div",Ie,k(s===null?"null":s===void 0?"undefined":typeof s=="function"?"[function]":Array.isArray(s)?"[Array]":typeof s=="object"?"[object]":JSON.stringify(s)),1)],64))),128)),We])],64)):(n(),r(f,{key:1},[Me,t("div",Ve,[t("div",je,k(o.from),1),t("div",Oe,k(o.to),1)])],64)),ze,o.end?(n(),y(i,{key:2,duration:o.end-o.start,color:o.type==="function"},null,8,["duration","color"])):x("",!0)],8,Se))),128)),Ge])}}}),Pe={key:0,"text-blue":""},He={key:1,"text-purple":""},Je={key:2,"text-green":""},Ye={key:3,"text-gray":""},qe={key:4,"text-gray":""},Ue={key:5,"text-gray":""},Xe={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ze={key:1},Ke={p2:"","text-sm":"",border:"t base"},Qe=B({__name:"TimelineArgumentView",props:{value:{}},setup(_){const p=_,c=C(),e=C();function a(){try{c.value=JSON.parse(JSON.stringify(p.value))}catch(s){console.error(s),e.value=s}}const i=B({emits:["setup"],setup(s,{emit:u}){return u("setup"),()=>null}}),o=Z(),d=K();return(s,u)=>{const h=G,$=P("VMenu");return typeof s.value=="string"?(n(),r("div",Pe,k(JSON.stringify(s.value)),1)):typeof s.value=="number"?(n(),r("div",He,k(s.value),1)):typeof s.value=="boolean"?(n(),r("div",Je,k(s.value),1)):typeof s.value>"u"?(n(),r("div",Ye," undefined ")):typeof s.value=="function"?(n(),r("div",qe," [Function"+k(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(n(),r("div",Ue," null ")):(n(),y($,{key:6,placement:"top"},{popper:v(()=>[m(l(i),{onSetup:a}),l(e)?(n(),r("div",Xe," Failed to display object: "+k(l(e)),1)):l(c)?(n(),r("div",Ze,[m(l(de),Q({"model-value":l(c)},s.$attrs,{class:["json-editor-vue",[l(o)==="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"]),t("div",Ke,[m(h,{title:"Copy to clipboard",icon:"carbon-copy",onClick:u[0]||(u[0]=A=>l(d)(JSON.stringify(l(c),null,2),"timeline-argument"))},{default:v(()=>[F(" Copy ")]),_:1})])])):x("",!0)]),default:v(()=>[t("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(s.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(s.value)?`[Array(${s.value.length})]`:"[Object]"),3)]),_:1}))}}}),es={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},ss={"mx--1":""},ts={flex:"~ gap-1","font-mono":""},ns={key:1},os=t("span",{ml1:"",op30:""},"(",-1),as={key:0,op30:""},ls=t("span",{op30:""},")",-1),is={flex:"~ gap-1","text-sm":""},rs=t("span",{mx1:"",op50:""},"·",-1),cs={class:"text-sm text-gray-400"},ps=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0}),e=ee(),a=w(()=>e.value?.metadata),i=w(()=>e.value?.imports.find(o=>o.as===p.record.name));return(o,d)=>{const s=H,u=pe,h=Qe,$=V,A=ue;return o.record?(n(),r("div",es,[t("div",ss,[m(s,{n:"yellow",textContent:"Function call"})]),t("div",ts,[l(i)?(n(),y(u,{key:0,item:l(i),metadata:l(a),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(n(),r("span",ns,k(o.record.name),1)),os,(n(!0),r(f,null,E(o.record.args,(S,b)=>(n(),r(f,{key:b},[b?(n(),r("span",as,", ")):x("",!0),m(h,{value:S},null,8,["value"])],64))),128)),ls]),t("div",is,[o.record.end?(n(),y($,{key:0,duration:o.record.end-o.record.start},null,8,["duration"])):x("",!0),rs,t("div",cs,k(l(c)),1)]),o.record.stacktrace?(n(),y(A,{key:0,stacktrace:o.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ds={key:0,"p-4":"",flex:"~ col gap-2"},us={"mx--1":""},ms={flex:"~ gap-1 items-center","font-mono":""},ks={op50:""},hs=t("span",{"i-carbon-arrow-right":"",op50:""},null,-1),_s={flex:"~ gap-1","text-sm":""},fs=t("span",{mx1:"",op50:""},"·",-1),ys={class:"text-sm text-gray-400"},vs=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0});return(e,a)=>{const i=H,o=V;return e.record?(n(),r("div",ds,[t("div",us,[m(i,{n:"green",textContent:"Route Change"})]),t("div",ms,[t("span",ks,k(e.record.from),1),hs,t("span",null,k(e.record.to),1)]),t("div",_s,[e.record.end?(n(),y(o,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),fs,t("div",ys,k(l(c)),1)])])):x("",!0)}}}),bs={key:0,"h-screen":"","of-hidden":""},gs={"h-screen":"","w-full":"",flex:"","flex-col":""},xs={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},$s={"text-sm":""},As=t("div",{"flex-auto":""},null,-1),Ds={"min-h-50":"",px3:"",py2:""},Cs=B({__name:"TimelineView",setup(_){const p=se(),c=C("table"),e=C(),a=w(()=>p.value?.metrics.clientTimeline());function i(){a.value&&(a.value.events=[])}function o(){c.value=c.value==="table"?"list":"table"}return(d,s)=>{const u=P("VTooltip"),h=G,$=we,A=Re,S=ps,b=vs,L=me;return l(a)?(n(),r("div",bs,[t("div",gs,[t("div",xs,[m(u,{flex:""},{popper:v(()=>[t("div",$s,k(l(a).options.enabled?"Recording...":"Paused"),1)]),default:v(()=>[t("div",{"text-lg":"",class:z(l(a).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(a).options.enabled?(n(),y(h,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:s[1]||(s[1]=D=>l(a).options.enabled=!1)},{default:v(()=>[F(" Stop Tracking ")]),_:1})):(n(),y(h,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:s[0]||(s[0]=D=>l(a).options.enabled=!0)},{default:v(()=>[F(" Start Tracking ")]),_:1})),As,m(h,{icon:l(c)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:o},null,8,["icon"]),m(h,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(c)==="table"?(n(),y($,{key:0,data:{...l(a)},onSelect:s[2]||(s[2]=D=>e.value=D.event)},null,8,["data"])):(n(),y(A,{key:1,data:{...l(a)},onSelect:s[3]||(s[3]=D=>e.value=D)},null,8,["data"]))]),m(L,{"model-value":!!l(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:s[4]||(s[4]=D=>e.value=void 0)},{default:v(()=>[t("div",Ds,[l(e)?.type==="function"?(n(),y(S,{key:0,record:l(e)},null,8,["record"])):l(e)?.type==="route"?(n(),y(b,{key:1,record:l(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Bs={class:"markdown-body"},ws=t("h1",null,"Timeline",-1),Ts=t("p",null,[t("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ss=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
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;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span>
|
|
3
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;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">'</span></span>
|
|
4
4
|
<span class="line"></span>
|