@nuxt/devtools 1.0.0-beta.3 → 1.0.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.
Files changed (84) hide show
  1. package/README.md +6 -28
  2. package/dist/chunks/module-main.mjs +1 -1
  3. package/dist/client/200.html +16 -16
  4. package/dist/client/404.html +16 -16
  5. package/dist/client/__blank/index.html +16 -16
  6. package/dist/client/_nuxt/{CodeDiff.vue.4fcef1e4.js → CodeDiff.vue.436985c7.js} +1 -1
  7. package/dist/client/_nuxt/{ComposableItem.vue.b4d03c6d.js → ComposableItem.vue.2d6f2884.js} +1 -1
  8. package/dist/client/_nuxt/{DataSchemaButton.vue.18fef0d4.js → DataSchemaButton.vue.42a3718a.js} +1 -1
  9. package/dist/client/_nuxt/{DataSchemaDrawer.714650a4.js → DataSchemaDrawer.edc189c2.js} +1 -1
  10. package/dist/client/_nuxt/{DurationDisplay.vue.dd0f91f1.js → DurationDisplay.vue.719ab95f.js} +1 -1
  11. package/dist/client/_nuxt/{FilepathItem.vue.a1b71b8d.js → FilepathItem.vue.7fdda51b.js} +1 -1
  12. package/dist/client/_nuxt/{HelpFab.vue.f0924b60.js → HelpFab.vue.891b009b.js} +1 -1
  13. package/dist/client/_nuxt/{LaunchPage.vue.c617b6d5.js → LaunchPage.vue.289a5cb3.js} +1 -1
  14. package/dist/client/_nuxt/{NBadge.ff27dca2.js → NBadge.83bd8b90.js} +1 -1
  15. package/dist/client/_nuxt/{NCheckbox.vue.b56304c9.js → NCheckbox.vue.5a0973a7.js} +1 -1
  16. package/dist/client/_nuxt/{NCodeBlock.vue.9ce69690.js → NCodeBlock.vue.2de294a4.js} +1 -1
  17. package/dist/client/_nuxt/{NDrawer.vue.2b176b54.js → NDrawer.vue.9614b581.js} +1 -1
  18. package/dist/client/_nuxt/{NDropdown.vue.e90fcd0b.js → NDropdown.vue.26dc3926.js} +1 -1
  19. package/dist/client/_nuxt/{NIconTitle.vue.7b846ffe.js → NIconTitle.vue.eb974cf8.js} +1 -1
  20. package/dist/client/_nuxt/{NLink.vue.9859bf11.js → NLink.vue.31c2cbc4.js} +1 -1
  21. package/dist/client/_nuxt/{NMarkdown.vue.79860402.js → NMarkdown.vue.4b221360.js} +1 -1
  22. package/dist/client/_nuxt/{NNavbar.vue.737ef1b1.js → NNavbar.vue.5fed0fd7.js} +1 -1
  23. package/dist/client/_nuxt/{NSectionBlock.acf7c6ed.js → NSectionBlock.d6290e19.js} +1 -1
  24. package/dist/client/_nuxt/{NSelect.vue.04805728.js → NSelect.vue.08628a3f.js} +1 -1
  25. package/dist/client/_nuxt/{NSelectTabs.vue.626ecbdd.js → NSelectTabs.vue.30a856a4.js} +1 -1
  26. package/dist/client/_nuxt/{NSwitch.vue.ff927669.js → NSwitch.vue.1b79756d.js} +1 -1
  27. package/dist/client/_nuxt/{NTip.vue.c98a31a2.js → NTip.vue.1a1ff991.js} +1 -1
  28. package/dist/client/_nuxt/{StateEditor.vue.1c34496c.js → StateEditor.vue.9646c347.js} +1 -1
  29. package/dist/client/_nuxt/{__blank.eaeade3a.js → __blank.176c8119.js} +1 -1
  30. package/dist/client/_nuxt/{analyze-build.92ac65df.js → analyze-build.d636dfd0.js} +1 -1
  31. package/dist/client/_nuxt/{assets.c6f47fab.js → assets.29a152c5.js} +1 -1
  32. package/dist/client/_nuxt/{client.17f79a3c.js → client.f2b385ce.js} +1 -1
  33. package/dist/client/_nuxt/{components.80a04311.js → components.7bfa06b8.js} +1 -1
  34. package/dist/client/_nuxt/{custom-_name_.b17c1362.js → custom-_name_.3fb62165.js} +1 -1
  35. package/dist/client/_nuxt/{default.201686e7.js → default.2a08c996.js} +1 -1
  36. package/dist/client/_nuxt/{entry.909ad6c7.js → entry.12ac938b.js} +4 -4
  37. package/dist/client/_nuxt/{error-404.18967c67.js → error-404.a171614a.js} +1 -1
  38. package/dist/client/_nuxt/{error-500.dcd91098.js → error-500.3ea59bbe.js} +1 -1
  39. package/dist/client/_nuxt/{full.a9db422e.js → full.76f6dd31.js} +1 -1
  40. package/dist/client/_nuxt/{hooks.ad5f725f.js → hooks.a236b60f.js} +1 -1
  41. package/dist/client/_nuxt/{imports.468b0281.js → imports.67d68271.js} +1 -1
  42. package/dist/client/_nuxt/{index.dacd63c3.js → index.64ca7e84.js} +1 -1
  43. package/dist/client/_nuxt/{index.86b321d0.js → index.dbe03c05.js} +1 -1
  44. package/dist/client/_nuxt/{json-editor-vue.8a771ed0.js → json-editor-vue.cf7b17c9.js} +1 -1
  45. package/dist/client/_nuxt/{modules.dc1dbdef.js → modules.798949c3.js} +1 -1
  46. package/dist/client/_nuxt/{none.37b64ac4.js → none.cad56a7a.js} +1 -1
  47. package/dist/client/_nuxt/{open-graph.03011848.js → open-graph.8ebd5e58.js} +1 -1
  48. package/dist/client/_nuxt/overview.0d62f8aa.js +1 -0
  49. package/dist/client/_nuxt/{pages.061895e9.js → pages.1e1baa5d.js} +1 -1
  50. package/dist/client/_nuxt/{payload.b7f38f74.js → payload.83b598a3.js} +1 -1
  51. package/dist/client/_nuxt/{plugins.59bd86e7.js → plugins.0e90c1cf.js} +1 -1
  52. package/dist/client/_nuxt/{runtime-configs.aaa20729.js → runtime-configs.ae0bd008.js} +1 -1
  53. package/dist/client/_nuxt/{server-routes.c8d34f99.js → server-routes.6a4e23d0.js} +1 -1
  54. package/dist/client/_nuxt/{settings.12ae4ad7.js → settings.82aae3ea.js} +1 -1
  55. package/dist/client/_nuxt/{state-components.a78445e5.js → state-components.c06dd56d.js} +1 -1
  56. package/dist/client/_nuxt/{state-modules.199ca5da.js → state-modules.7616c62e.js} +1 -1
  57. package/dist/client/_nuxt/{storage-options.aeaf572e.js → storage-options.2141006e.js} +1 -1
  58. package/dist/client/_nuxt/{storage.f2e2d671.js → storage.fe3db05a.js} +1 -1
  59. package/dist/client/_nuxt/{terminals.091a556d.js → terminals.f6a3d365.js} +1 -1
  60. package/dist/client/_nuxt/{timeline.1210bb98.js → timeline.ba2f1a0c.js} +1 -1
  61. package/dist/client/_nuxt/{unocss-runtime.c55f86fd.js → unocss-runtime.0346eeb6.js} +1 -1
  62. package/dist/client/_nuxt/{virtual-files.7767a81f.js → virtual-files.3a2a25a2.js} +1 -1
  63. package/dist/client/index.html +16 -16
  64. package/dist/client/modules/analyze-build/index.html +16 -16
  65. package/dist/client/modules/assets/index.html +16 -16
  66. package/dist/client/modules/components/index.html +16 -16
  67. package/dist/client/modules/hooks/index.html +16 -16
  68. package/dist/client/modules/imports/index.html +16 -16
  69. package/dist/client/modules/modules/index.html +16 -16
  70. package/dist/client/modules/open-graph/index.html +16 -16
  71. package/dist/client/modules/overview/index.html +16 -16
  72. package/dist/client/modules/pages/index.html +16 -16
  73. package/dist/client/modules/payload/index.html +16 -16
  74. package/dist/client/modules/plugins/index.html +16 -16
  75. package/dist/client/modules/runtime-configs/index.html +16 -16
  76. package/dist/client/modules/server-routes/index.html +16 -16
  77. package/dist/client/modules/storage/index.html +16 -16
  78. package/dist/client/modules/terminals/index.html +16 -16
  79. package/dist/client/modules/timeline/index.html +16 -16
  80. package/dist/client/modules/virtual-files/index.html +16 -16
  81. package/dist/client/settings/index.html +16 -16
  82. package/dist/module.json +1 -1
  83. package/package.json +4 -4
  84. package/dist/client/_nuxt/overview.acf4105d.js +0 -1
@@ -1,3 +1,3 @@
1
- import{d as N,a as C,aT as oe,e as ae,a9 as G,r as A,f as t,h as I,j as _,p as x,o,k as e,m as n,n as B,G as O,t as p,F as S,i as d,v as $,am as H,_ as U,a7 as R,aU as J,aV as ne,aW as se,aX as re,y as ie,z as ce,q as le,aY as de,aZ as pe,a_ as me,b as ue,a$ as ge,b0 as he,b1 as _e,b2 as E,aw as fe,a0 as ve,l as be,ac as we,I as z,W as xe}from"./entry.909ad6c7.js";import{_ as ye}from"./NNavbar.vue.737ef1b1.js";import{_ as P}from"./NLink.vue.9859bf11.js";import{_ as q}from"./NSectionBlock.acf7c6ed.js";import{_ as ke}from"./NCodeBlock.vue.9ce69690.js";import{_ as $e}from"./HelpFab.vue.f0924b60.js";import"./NIconTitle.vue.7b846ffe.js";import"./client.17f79a3c.js";const K=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"recommended",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"recommended",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"recommended",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"recommended",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],Te={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},Se=["onClick"],Ce=e("div",{border:"b base","flex-auto":""},null,-1),Ne={key:0,"x-divider":""},Me={key:1,"x-divider":""},Oe={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Ie=e("div",{"i-carbon-warning":"","text-orange":""},null,-1),Ae={"w-full":"",p2:"",op75:""},Be={key:1,m4:"",flex:"~ col gap-2"},Re={flex:"~ gap-1 wrap items-center"},Le={key:1},je={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Fe=N({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(h){const s=h,l=C(()=>K.filter(r=>!s.tags?.some(g=>g.name===r.name))),a=C(()=>{let r={};const g={};l.value.forEach(u=>{u.seoMeta?Object.assign(g,u.seoMeta):r=oe(r,u.head)});const b=[];if(Object.keys(g).length){const u=JSON.stringify(g,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useSeoMeta(${u})`)}if(Object.keys(r).length){const u=JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useHead(${u})`)}return b.join(`
1
+ import{d as N,a as C,aT as oe,e as ae,a9 as G,r as A,f as t,h as I,j as _,p as x,o,k as e,m as n,n as B,G as O,t as p,F as S,i as d,v as $,am as H,_ as U,a7 as R,aU as J,aV as ne,aW as se,aX as re,y as ie,z as ce,q as le,aY as de,aZ as pe,a_ as me,b as ue,a$ as ge,b0 as he,b1 as _e,b2 as E,aw as fe,a0 as ve,l as be,ac as we,I as z,W as xe}from"./entry.12ac938b.js";import{_ as ye}from"./NNavbar.vue.5fed0fd7.js";import{_ as P}from"./NLink.vue.31c2cbc4.js";import{_ as q}from"./NSectionBlock.d6290e19.js";import{_ as ke}from"./NCodeBlock.vue.2de294a4.js";import{_ as $e}from"./HelpFab.vue.891b009b.js";import"./NIconTitle.vue.eb974cf8.js";import"./client.f2b385ce.js";const K=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"recommended",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"recommended",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"recommended",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"recommended",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],Te={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},Se=["onClick"],Ce=e("div",{border:"b base","flex-auto":""},null,-1),Ne={key:0,"x-divider":""},Me={key:1,"x-divider":""},Oe={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Ie=e("div",{"i-carbon-warning":"","text-orange":""},null,-1),Ae={"w-full":"",p2:"",op75:""},Be={key:1,m4:"",flex:"~ col gap-2"},Re={flex:"~ gap-1 wrap items-center"},Le={key:1},je={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Fe=N({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(h){const s=h,l=C(()=>K.filter(r=>!s.tags?.some(g=>g.name===r.name))),a=C(()=>{let r={};const g={};l.value.forEach(u=>{u.seoMeta?Object.assign(g,u.seoMeta):r=oe(r,u.head)});const b=[];if(Object.keys(g).length){const u=JSON.stringify(g,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useSeoMeta(${u})`)}if(Object.keys(r).length){const u=JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useHead(${u})`)}return b.join(`
2
2
 
3
3
  `)}),m=ae(),y=G(),k=["Missing Tags","Code Snippet"],f=A(k[0]);return(r,g)=>{const b=P,u=H,T=U,M=ke,L=q;return t(l).length?(o(),I(L,{key:0,text:"Missing Tags",description:`${t(l).length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:_(()=>[e("div",Te,[(o(),n(S,null,B(k,(i,c)=>e("button",{key:c,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(i===t(f)?"":"border-b"),onClick:v=>f.value=i},[e("div",{class:O(i===t(f)?"":"op30"),capitalize:""},p(i),3)],10,Se)),64)),Ce]),t(f)===k[0]?(o(),I(u,{key:0,grid:"~ cols-[1fr] lg:cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),n(S,null,B(t(l),(i,c)=>(o(),n(S,{key:c},[c?(o(),n("div",Ne)):x("",!0),c?(o(),n("div",Me)):x("",!0),e("div",Oe,[Ie,d(b,{"op-50":"",href:i.docs,target:"_blank",n:"orange"},{default:_(()=>[$(p(i.name),1)]),_:2},1032,["href"])]),e("div",Ae,p(i.description),1)],64))),128))]),_:1})):(o(),n("div",Be,[e("p",Re,[d(T,{icon:"carbon-copy",n:"xs","px-2":"",onClick:g[0]||(g[0]=i=>t(m)(t(a),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1}),$(" the following code snippet and paste it into your "),r.matchedRouteFilepath?(o(),I(T,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:g[1]||(g[1]=i=>t(y)(r.matchedRouteFilepath))},{default:_(()=>[$(" page component ")]),_:1})):(o(),n("span",Le,"page component")),$(" to full fill the missing tags. ")]),d(u,{relative:"","n-code-block":""},{default:_(()=>[d(M,{code:t(a),lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",je,[d(T,{icon:"carbon-copy",onClick:g[2]||(g[2]=i=>t(m)(t(a),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1})])]),_:1})]))]),_:1},8,["description"])):x("",!0)}}}),De={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},ze={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Ve={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Ee={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Ge={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},He={class:"mt-[3px] block h-[18px] max-h-[80px] border-separate select-none overflow-hidden truncate whitespace-nowrap break-words text-left text-[14px] leading-[20px] op50",style:{"-webkit-line-clamp":"1","border-spacing":"0px","-webkit-box-orient":"vertical"}},Ue=N({__name:"SocialFacebook",props:{card:{}},setup(h){return(s,l)=>(o(),n("div",De,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",ze,[e("div",Ve,p(s.card.url),1),e("div",Ee,[e("div",Ge,p(s.card.title),1),e("div",He,p(s.card.description),1)])])]))}}),Je={class:"max-w-[438px] min-w-[438px] of-hidden border border-base rounded-[16px] bg-base -outline-offset-1",style:{"font-family":"TwitterChirp, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"}},Pe={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},qe={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Ke={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},We={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Ye=N({__name:"SocialTwitter",props:{tags:{}},setup(h){const s=h,l=C(()=>J(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),a=C(()=>l.value.image?s.tags.find(m=>m.tag==="meta"&&m.name==="twitter:card")?.value||"summary_large_image":"summary");return(m,y)=>(o(),n("div",Je,[e("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",t(a)==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[t(a)==="summary_large_image"?(o(),n("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)):(o(),n("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)),e("div",Pe,[e("div",qe,p(t(l).url),1),e("div",Ke,p(t(l).title),1),e("div",We,p(t(l).description),1)])],2)]))}}),Xe={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},Ze={class:"break-words p-[10px] antialiased"},Qe={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},et={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},tt={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},ot=N({__name:"SocialLinkedin",props:{card:{}},setup(h){return(s,l)=>(o(),n("div",Xe,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",Ze,[e("div",Qe,[e("div",et,p(s.card.title),1),e("div",tt,p(s.card.url),1)])])]))}}),at=h=>(ie("data-v-829ad8ca"),h=h(),ce(),h),nt={class:"relative max-w-[420px] min-w-[420px] rounded-[16px] rounded-bl-0 py-[6px] leading-[18px] drop-shadow-sm drop-shadow-color-[#10232f26] bg-base"},st={class:"pl-[10px] pr-[8px]"},rt={class:"leading-normal text-[#3390ec] underline"},it={class:"quote w-full flex"},ct={class:"flex flex-col gap-1"},lt={key:0,class:"my-[3px] overflow-hidden rounded"},dt=["src"],pt={class:"cursor-pointer text-sm text-[#3390ec]"},mt={class:"cursor-pointer text-sm"},ut={class:"cursor-pointer text-sm"},gt={class:"flex justify-end text-xs text-[#707579]"},ht=at(()=>e("svg",{width:"11",height:"20",viewBox:"0 0 11 20",xmlns:"http://www.w3.org/2000/svg",class:"absolute bottom-0 ml-[-8.4px] translate-y-px text-white"},[e("g",{transform:"translate(9 -14)","fill-rule":"evenodd"},[e("path",{id:"corner-fill",d:"M-6 16h6v17c-.193-2.84-.876-5.767-2.05-8.782-.904-2.325-2.446-4.485-4.625-6.48A1 1 0 01-6 16z",transform:"matrix(1 0 0 -1 0 49)",fill:"currentColor"})])],-1)),_t=N({__name:"SocialTelegram",props:{card:{}},setup(h){const s=ne(),l=se(re(),"HH:mm");return(a,m)=>(o(),n("div",nt,[e("div",st,[e("div",rt,p(a.card.url),1),e("div",it,[e("div",ct,[a.card.image?(o(),n("div",lt,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:a.card.image},null,8,dt)])):x("",!0),e("div",pt,[e("strong",null,p(t(s).hostname),1)]),e("div",mt,[e("strong",null,p(a.card.title),1)]),e("div",ut,p(a.card.description),1)])]),e("div",gt,[e("span",null,p(t(l)),1)])]),ht]))}});const ft=le(_t,[["__scopeId","data-v-829ad8ca"]]),vt={flex:"~ col"},bt={flex:"~ wrap","w-full":"","flex-none":""},wt=["onClick"],xt=e("div",{border:"b base","flex-auto":""},null,-1),yt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},kt={key:0},$t={key:1},Tt={key:2},St={key:3},Ct=N({__name:"SocialPreviewGroup",props:{tags:{}},setup(h){const s=h,l=["twitter","facebook","linkedin","telegram"],a=de("nuxt-devtools-social-preview-tab",l[0]),m=C(()=>J(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return(y,k)=>{const f=Ue,r=Ye,g=ot,b=ft;return o(),n("div",vt,[e("div",bt,[(o(),n(S,null,B(l,(u,T)=>e("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(u===t(a)?"":"border-b"),onClick:M=>a.value=u},[e("div",{class:O(u===t(a)?"":"op30"),capitalize:""},p(u),3)],10,wt)),64)),xt]),e("div",yt,[t(a)==="facebook"?(o(),n("div",kt,[d(f,{card:t(m)},null,8,["card"])])):t(a)==="twitter"?(o(),n("div",$t,[d(r,{tags:y.tags},null,8,["tags"])])):t(a)==="linkedin"?(o(),n("div",Tt,[d(g,{card:t(m)},null,8,["card"])])):t(a)==="telegram"?(o(),n("div",St,[d(b,{card:t(m)},null,8,["card"])])):x("",!0)])])}}}),Nt={class:"markdown-body"},Mt=pe('<h1>Open Graph</h1><p>Nuxt provides several different ways to manage your meta tags using <a href="https://unhead.harlanzw.com/" target="_blank" rel="noopener"><code>unhead</code></a>. Improve your Nuxt app’s SEO with powerful head config, composables and components.</p><p><a href="https://nuxt.com/docs/getting-started/seo-meta" target="_blank" rel="noopener">Learn more on the documentation</a></p><hr><p>You can also find how open graph specs are defined in:</p><ul><li><a href="https://ogp.me/" target="_blank" rel="noopener">The Open Graph protocol</a></li><li><a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" target="_blank" rel="noopener">Twitter Cards</a></li></ul>',6),Ot=[Mt],It={__name:"open-graph",setup(h,{expose:s}){return s({frontmatter:{}}),(a,m)=>(o(),n("div",Nt,Ot))}},At={flex:"~ col lg:row","h-full":"","w-full":"","of-hidden":""},Bt={"flex-auto":"","of-auto":""},Rt={"flex-none":"",flex:"~ gap2 items-center"},Lt={flex:"~ col"},jt={key:0,"x-divider":""},Ft={key:1,"x-divider":""},Dt={mr2:"",px4:"",py2:""},qt=N({__name:"open-graph",setup(h){const s=A(0),l=me(),a=ue(async()=>(s.value,(await l.value?.resolveTags()).map(c=>{const v=c.props||{};return c.tag==="htmlAttrs"&&v.lang?{tag:"html",name:"lang",value:v.lang}:v.charset?{tag:"meta",name:"charset",value:v.charset}:{tag:c.tag,name:v.property??v.name??v.rel??c.tag,value:v.content??v.href??c.textContent??JSON.stringify(v)}})),[]),m=A(!0);function y(){s.value+=1}const k=ge(),f=he(),r=A(""),g=_e(),b=G();async function u(){r.value!==f.value.path&&k.value.push(r.value||"/")}const T=C(()=>r.value===f.value.path?[]:k.value.resolve(r.value||"/").matched),M=C(()=>{const i=g.value.find(c=>c.path===f.value?.matched?.[0]?.path);return i?.file||i?.meta?.file});function L(i){return K.find(c=>c.name===i.name)?.docs}return E(f).toBeTruthy().then(i=>{r.value=i.path}),E(k).toBeTruthy().then(i=>{i.afterEach(()=>{fe(()=>{r.value=f.value.path,setTimeout(y,200),setTimeout(y,800)})})}),(i,c)=>{const v=xe,j=U,W=ye,V=P,Y=H,X=q,Z=Fe,Q=Ct,ee=It,te=$e,F=ve("tooltip");return o(),n(S,null,[e("div",At,[e("div",Bt,[d(W,null,{search:_(()=>[d(v,{modelValue:t(r),"onUpdate:modelValue":c[0]||(c[0]=w=>be(r)?r.value=w:null),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:O(["px-5 py-2",t(f)?.path===t(r)?"":t(T).length?"text-green":"text-orange"]),onKeydown:we(u,["enter"])},null,8,["modelValue","class","onKeydown"])]),actions:_(()=>[e("div",Rt,[t(M)?z((o(),I(j,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:c[1]||(c[1]=w=>t(b)(t(M)))},null,512)),[[F,"Open file in editor"]]):x("",!0),z(d(j,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:y},null,512),[[F,"Refresh Data"]]),z(d(j,{"text-lg":"",border:!1,icon:t(m)?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:c[2]||(c[2]=w=>m.value=!t(m))},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",Lt,[d(X,{text:"Tags",icon:"carbon:tag-group"},{default:_(()=>[d(Y,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),n(S,null,B(t(a),(w,D)=>(o(),n(S,{key:D},[D?(o(),n("div",jt)):x("",!0),D?(o(),n("div",Ft)):x("",!0),e("div",Dt,[d(V,{op50:"",href:L(w),target:"_blank",n:"primary"},{default:_(()=>[$(p(w.name),1)]),_:2},1032,["href"])]),d(V,{href:w.value.match(/^https?:\/\//)?w.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:_(()=>[$(p(w.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),d(Z,{tags:t(a),"matched-route-filepath":t(M)},null,8,["tags","matched-route-filepath"])])]),t(m)&&t(a)?.length?(o(),I(Q,{key:0,tags:t(a),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):x("",!0)]),d(te,null,{default:_(()=>[d(ee)]),_:1})],64)}}});export{qt as default};
@@ -0,0 +1 @@
1
+ import{d as L,as as V,aa as R,aH as T,b3 as M,b4 as O,O as E,a as w,h as m,j as n,A as P,o as s,f as e,m as c,k as t,i,t as r,p as l,F as h,b5 as f,b6 as x,b7 as $,v as a,aC as F,D as H,L as W,E as G,x as K,_ as U}from"./entry.12ac938b.js";import{u as q,_ as J}from"./state-modules.7616c62e.js";import{_ as Q}from"./NTip.vue.1a1ff991.js";import{u as X}from"./state-components.c06dd56d.js";import"./NBadge.83bd8b90.js";import"./NCodeBlock.vue.2de294a4.js";import"./client.f2b385ce.js";import"./NCheckbox.vue.5a0973a7.js";const Y="1.0.0",Z={key:0},tt={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},et=t("div",{"flex-auto":""},null,-1),ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt=t("span",{op40:""}," Nuxt DevTools ",-1),st={op40:""},at={flex:"~ gap2 wrap"},it=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),lt=t("div",{"logos-vue":"","text-3xl":""},null,-1),ut=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),rt=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),dt=t("div",{"carbon-function":"","text-3xl":""},null,-1),ct=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),pt=t("div",{"carbon-plug":"","text-3xl":""},null,-1),_t={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},mt=t("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1),ht={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ft=t("div",{"text-sm":""}," SSR to full load ",-1),xt={"text-right":""},vt=t("div",{"text-sm":""}," Page load ",-1),gt={"text-right":""},kt=t("div",{"text-sm":""}," Navigation ",-1),bt={"text-right":""},yt=t("div",{"text-sm":""}," HMR ",-1),Ct={"text-right":""},wt={flex:"~ col gap2"},Dt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},Bt=t("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[t("div",{"i-carbon-star":""}),a(" Star on GitHub ")],-1),St=t("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[t("div",{"i-carbon-data-enrichment":""}),a(" Ideas & Suggestions ")],-1),zt=t("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[t("div",{"i-carbon-plan":""}),a(" Project Roadmap ")],-1),Nt=t("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[t("div",{"i-carbon-debug":""}),a(" Bug Reports ")],-1),At=t("div",{"i-carbon-settings-adjust":""},null,-1),jt=t("div",{"flex-auto":""},null,-1),It={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},Lt={flex:"~ gap-1","items-center":""},Vt=t("span",null,"+",-1),Rt=t("span",null,"+",-1),Tt=t("div",{"flex-auto":""},null,-1),Mt={flex:"~ gap-1","items-center":""},Ot=t("span",null,"+",-1),Et=t("span",null,"+",-1),Pt=t("span",null,"+",-1),$t=t("span",null,"+",-1),Ft=t("div",{"flex-auto":""},null,-1),Ht=t("div",null,"Toggle DevTools",-1),te=L({__name:"overview",setup(Wt){const v=V(),p=R(),D=X(),g=T(),B=q(),S=M(),k=O(),z=E();function N(){H.value=!0,z.push("/")}const b=w(()=>v.value?.nuxt.vueApp.version),u=w(()=>v.value?.metrics.loading());function A(){W()}return(o,Gt)=>{const j=G,_=K,y=J,C=Q,d=U,I=P;return s(),m(I,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[e(p)?(s(),c("div",tt,[et,t("div",ot,[i(_,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(j,{"h-10":""})]),_:1}),t("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:N},[nt,t("code",st,"v"+r(e(Y)),1),i(y,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",at,[i(_,{to:"https://nuxt.com",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[it,i(y,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),e(b)?(s(),m(_,{key:0,to:"https://vuejs.org",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[lt,t("code",null,"v"+r(e(b)),1)]),_:1})):l("",!0),e(p)?(s(),c(h,{key:1},[e(p)&&e(p).pages&&e(v)?(s(),m(_,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[ut,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(S).length,"page")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[rt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(D).length,"component")),1)]),_:1})):l("",!0),e(p)&&e(g)?(s(),m(_,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[dt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(g).imports.length,"import")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[ct,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(B).length,"module")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[pt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(p).plugins.length,"plugin")),1)]),_:1})):l("",!0),e(u)?(s(),c("div",_t,[mt,t("div",ht,[e(u).ssrStart?(s(),c(h,{key:0},[ft,t("div",xt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).ssrStart)),1)],64)):l("",!0),vt,t("div",gt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).appInit)),1),kt,t("div",bt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).pageEnd-e(u).pageStart)),1),e(u).hmrStart?(s(),c(h,{key:1},[yt,t("div",Ct,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).hmrEnd-e(u).hmrStart)),1)],64)):l("",!0)])])):l("",!0)],64)):l("",!0)]),t("div",wt,[("showConnectionWarning"in o?o.showConnectionWarning:e($))?(s(),m(C,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>[a(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):l("",!0),t("button",{title:"Authorize",onClick:A},[("isDevAuthed"in o?o.isDevAuthed:e(F))?l("",!0):(s(),m(C,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>[a(" Access from an untrusted browser, some features are limited. Click to authorize now. ")]),_:1}))])]),t("div",Dt,[Bt,St,zt,Nt,i(_,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>[At,a(" Settings ")]),_:1})]),jt,t("div",It,[t("div",Lt,[e(k)?(s(),c(h,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⌘ Cmd ")]),_:1}),Vt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" K ")]),_:1})],64)):(s(),c(h,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Ctrl ")]),_:1}),Rt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" K ")]),_:1})],64)),Tt,a(" Open Command Palette ")]),t("div",Mt,[e(k)?(s(),c(h,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⇧ Shift ")]),_:1}),Ot,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⌥ Option ")]),_:1}),Et,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" D ")]),_:1})],64)):(s(),c(h,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Shift ")]),_:1}),Pt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Alt ")]),_:1}),$t,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" D ")]),_:1})],64)),Ft,Ht])])])):(s(),c("div",Z," Loading... "))]),_:1})}}});export{te as default};
@@ -1 +1 @@
1
- import{d as E,r as B,a as x,an as O,f as t,o,m as s,k as e,t as k,h as y,j as b,bd as G,F as m,n as L,p as N,i as _,v as V,G as M,W as A,_ as H,a9 as q,be as D,a$ as J,b0 as Q,aa as X,ak as Y,b1 as Z,al as ee,l as te,ac as oe,K as ne,L as ae}from"./entry.909ad6c7.js";import{_ as j}from"./NBadge.ff27dca2.js";import{_ as F}from"./FilepathItem.vue.a1b71b8d.js";import{_ as se}from"./NSectionBlock.acf7c6ed.js";import{_ as re}from"./LaunchPage.vue.c617b6d5.js";import{_ as le}from"./HelpFab.vue.f0924b60.js";import"./NIconTitle.vue.7b846ffe.js";import"./NMarkdown.vue.79860402.js";import"./client.17f79a3c.js";const ie={block:"","cursor-pointer":""},ue={p2:""},ce=["onSubmit"],de=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),pe={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},_e={key:1},he=E({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(R,{emit:u}){const p=R,h=B([]),f=x(()=>{const c=g(p.route.path);return h.value=Array.from({length:c.length},()=>""),c});function g(c){return c.split(/(:\w+[\?\*]?(?:\(\))?)/).filter(Boolean).map(d=>d[0]===":"?d.replace(/\(\)$/,"?"):d)}const $=x(()=>f.value.map((c,d)=>c[0]===":"?h.value[d]:c).join("").replace(/\/+/g,"/")),r=x(()=>p.route.path.includes(":"));function n(){u("navigate",$.value)}return(c,d)=>{const C=A,a=H,i=O("VDropdown");return t(r)?(o(),y(i,{key:1},{popper:b(({hide:l})=>[e("div",ue,[e("form",{flex:"~ col",onSubmit:G(()=>{n(),l()},["prevent"])},[t(r)?(o(),s(m,{key:0},[de,e("div",pe,[(o(!0),s(m,null,L(t(f),(v,P)=>(o(),s(m,{key:P},[v[0]===":"?(o(),y(C,{key:0,modelValue:t(h)[P],"onUpdate:modelValue":I=>t(h)[P]=I,"w-20":"","n-sm":"",placeholder:v.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",_e,k(v),1))],64))),128))])],64)):N("",!0),_(a,{block:"",n:"primary"},{default:b(()=>[V(" Navigate ")]),_:1})],40,ce)])]),default:b(()=>[e("code",ie,[(o(!0),s(m,null,L(t(f),(l,v)=>(o(),s("span",{key:v,class:M(l[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},k(l[0]===":"?l.slice(1):l),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:n},[e("code",null,k(c.route.path),1)]))}}}),me={"w-full":""},fe=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1),ge={"w-20":"","pr-1":""},ve={flex:"","items-center":"","justify-end":""},ye={"text-sm":""},be={flex:"inline gap3","items-center":""},xe={op0:"","group-hover:op100":"",flex:"~ gap1"},ke=["onClick"],$e=e("div",{"i-carbon-script-reference":""},null,-1),we=[$e],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ce={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Pe={key:0},Ve=["onClick"],Ie=E({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(R){const u=R,p=q(),h=D(),f=x(()=>[...u.pages].sort((r,n)=>r.path.localeCompare(n.path)));function g(r){const n=u.layouts.find(c=>c.name===r);n&&p(n.file)}function $(r){if(typeof r=="string")return h.value?.middleware.find(n=>n.name===r)?.path}return(r,n)=>{const c=j,d=he,C=F;return o(),s("div",null,[e("table",me,[fe,e("tbody",null,[(o(!0),s(m,null,L(t(f),a=>(o(),s("tr",{key:a.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ge,[e("div",ve,[r.matched.find(i=>i.name===a.name)?(o(),y(c,{key:0,n:"green",title:"active",textContent:"active"})):r.matchedPending.find(i=>i.name===a.name)?(o(),y(c,{key:1,n:"teal",title:"next",textContent:"next"})):N("",!0)])]),e("td",ye,[e("div",be,[_(d,{route:a,class:M(r.matched.find(i=>i.name===a.name)?"text-primary":r.matchedPending.find(i=>i.name===a.name)?"text-teal":""),onNavigate:n[0]||(n[0]=i=>r.$emit("navigate",i))},null,8,["route","class"]),e("div",xe,[a.file||a.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:i=>t(p)(a.file||a.meta?.file)},we,8,ke)):N("",!0)])])]),e("td",Ne,k(a.name),1),e("td",Re,[_(C,{filepath:$(a.meta.middleware),override:`${a.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ce,[a.meta.layout===!1?(o(),s("span",Pe,"-")):a.meta.layout?(o(),s("button",{key:1,onClick:i=>g(a.meta.layout)},k(a.meta.layout),9,Ve)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:n[1]||(n[1]=i=>g("default"))}," (default) "))])]))),128))])])])}}}),Le={class:"markdown-body"},Te=e("h1",null,"Pages",-1),Be=e("p",null,[V("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",null,"~/pages/"),V(" directory.")],-1),Ee=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Me=e("hr",null,null,-1),Ae=e("h1",null,"Middlewares",-1),De=e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route.",-1),je=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Fe=[Te,Be,Ee,Me,Ae,De,je],Se={__name:"pages",setup(R,{expose:u}){return u({frontmatter:{}}),(h,f)=>(o(),s("div",Le,Fe))}},ze={key:0,"h-full":"","of-auto":""},Ke={border:"b base",flex:"~ col gap1",px4:"",py3:"","n-navbar-glass":""},Ue=e("span",{op50:""},"Navigate from ",-1),We={"font-mono":""},Oe=e("span",{op50:""}," to ",-1),Ge={key:1,op50:""},He=e("span",null,[V("Press "),e("b",{"font-bold":""},"Enter"),V(" to navigate")],-1),qe={key:0,"text-orange":"",op75:""},Je={key:1,op50:""},Qe={"min-h-14":""},Xe={key:1,class:"py-4 text-center"},Ye=e("span",{op50:""},"No routes matched",-1),Ze=[Ye],et={"w-full":""},tt=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),ot={mr1:""},pt=E({__name:"pages",setup(R){const u=J(),p=Q(),h=X(),f=D(),g=Y(),$=Z(),r=x(()=>f.value?.middleware||[]),n=B(""),c=B(0),d=x(()=>(r.value,n.value,g.value,c.value,u.value?.currentRoute?.value?.path));ee(()=>{p.value&&(n.value=u.value?.currentRoute?.value?.path),u.value?.beforeEach(l=>{n.value=l.fullPath}),u.value?.afterEach(l=>{n.value=l.fullPath})});async function C(){n.value!==u.value?.currentRoute?.value?.path&&u.value.push(n.value||"/")}const a=x(()=>u.value.resolve(n.value||"/").matched);function i(l){u.value.push(l),n.value=l}return(l,v)=>{const P=A,I=Ie,T=se,S=j,z=F,K=re,U=Se,W=le;return o(),s(m,null,[t(h)?.pages&&t(u)?(o(),s("div",ze,[e("div",Ke,[e("div",null,[t(d)!==t(n)?(o(),s(m,{key:0},[Ue,e("span",We,k(t(d)),1),Oe],64)):(o(),s("span",Ge,"Current route"))]),_(P,{modelValue:t(n),"onUpdate:modelValue":v[0]||(v[0]=w=>te(n)?n.value=w:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:M(t(d)===t(n)?"":t(a).length?"text-green":"text-orange"),onKeydown:oe(C,["enter"])},null,8,["modelValue","class","onKeydown"]),e("div",null,[t(d)!==t(n)?(o(),s(m,{key:0},[He,t(a).length?N("",!0):(o(),s("span",qe," (no match)"))],64)):(o(),s("span",Je,"Edit path above to navigate"))])]),_(T,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:b(()=>[e("div",Qe,[t(a).length?(o(),y(I,{key:0,pages:t(a),layouts:t(g)||[],matched:t(p).matched,"matched-pending":t(a),onNavigate:i},null,8,["pages","layouts","matched","matched-pending"])):(o(),s("div",Xe,Ze))])]),_:1}),_(T,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t($).length} routes registered in your application`,padding:"pr5"},{default:b(()=>[_(I,{pages:t($),layouts:t(g)||[],matched:t(p).matched,"matched-pending":t(a),onNavigate:i},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(r).length?(o(),y(T,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(r).length} middleware registered in your application`,padding:"px13"},{default:b(()=>[e("table",et,[tt,(o(!0),s(m,null,L(t(r),w=>(o(),s("tr",{key:w.path,"h-7":""},[e("td",null,[e("span",ot,k(w.name),1),w.global?(o(),y(S,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):N("",!0)]),e("td",null,[_(z,{filepath:w.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):N("",!0)])):(o(),y(K,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",title:"Nuxt Routing",description:"Create `./pages/index.vue` to enable routing",actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in l?l.rpc:t(ne)).runWizard(await("ensureDevAuthToken"in l?l.ensureDevAuthToken:t(ae))(),"enablePages")}}]},null,8,["actions"])),_(W,null,{default:b(()=>[_(U)]),_:1})],64)}}});export{pt as default};
1
+ import{d as E,r as B,a as x,an as O,f as t,o,m as s,k as e,t as k,h as y,j as b,bd as G,F as m,n as L,p as N,i as _,v as V,G as M,W as A,_ as H,a9 as q,be as D,a$ as J,b0 as Q,aa as X,ak as Y,b1 as Z,al as ee,l as te,ac as oe,K as ne,L as ae}from"./entry.12ac938b.js";import{_ as j}from"./NBadge.83bd8b90.js";import{_ as F}from"./FilepathItem.vue.7fdda51b.js";import{_ as se}from"./NSectionBlock.d6290e19.js";import{_ as re}from"./LaunchPage.vue.289a5cb3.js";import{_ as le}from"./HelpFab.vue.891b009b.js";import"./NIconTitle.vue.eb974cf8.js";import"./NMarkdown.vue.4b221360.js";import"./client.f2b385ce.js";const ie={block:"","cursor-pointer":""},ue={p2:""},ce=["onSubmit"],de=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),pe={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},_e={key:1},he=E({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(R,{emit:u}){const p=R,h=B([]),f=x(()=>{const c=g(p.route.path);return h.value=Array.from({length:c.length},()=>""),c});function g(c){return c.split(/(:\w+[\?\*]?(?:\(\))?)/).filter(Boolean).map(d=>d[0]===":"?d.replace(/\(\)$/,"?"):d)}const $=x(()=>f.value.map((c,d)=>c[0]===":"?h.value[d]:c).join("").replace(/\/+/g,"/")),r=x(()=>p.route.path.includes(":"));function n(){u("navigate",$.value)}return(c,d)=>{const C=A,a=H,i=O("VDropdown");return t(r)?(o(),y(i,{key:1},{popper:b(({hide:l})=>[e("div",ue,[e("form",{flex:"~ col",onSubmit:G(()=>{n(),l()},["prevent"])},[t(r)?(o(),s(m,{key:0},[de,e("div",pe,[(o(!0),s(m,null,L(t(f),(v,P)=>(o(),s(m,{key:P},[v[0]===":"?(o(),y(C,{key:0,modelValue:t(h)[P],"onUpdate:modelValue":I=>t(h)[P]=I,"w-20":"","n-sm":"",placeholder:v.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",_e,k(v),1))],64))),128))])],64)):N("",!0),_(a,{block:"",n:"primary"},{default:b(()=>[V(" Navigate ")]),_:1})],40,ce)])]),default:b(()=>[e("code",ie,[(o(!0),s(m,null,L(t(f),(l,v)=>(o(),s("span",{key:v,class:M(l[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},k(l[0]===":"?l.slice(1):l),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:n},[e("code",null,k(c.route.path),1)]))}}}),me={"w-full":""},fe=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1),ge={"w-20":"","pr-1":""},ve={flex:"","items-center":"","justify-end":""},ye={"text-sm":""},be={flex:"inline gap3","items-center":""},xe={op0:"","group-hover:op100":"",flex:"~ gap1"},ke=["onClick"],$e=e("div",{"i-carbon-script-reference":""},null,-1),we=[$e],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ce={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Pe={key:0},Ve=["onClick"],Ie=E({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(R){const u=R,p=q(),h=D(),f=x(()=>[...u.pages].sort((r,n)=>r.path.localeCompare(n.path)));function g(r){const n=u.layouts.find(c=>c.name===r);n&&p(n.file)}function $(r){if(typeof r=="string")return h.value?.middleware.find(n=>n.name===r)?.path}return(r,n)=>{const c=j,d=he,C=F;return o(),s("div",null,[e("table",me,[fe,e("tbody",null,[(o(!0),s(m,null,L(t(f),a=>(o(),s("tr",{key:a.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ge,[e("div",ve,[r.matched.find(i=>i.name===a.name)?(o(),y(c,{key:0,n:"green",title:"active",textContent:"active"})):r.matchedPending.find(i=>i.name===a.name)?(o(),y(c,{key:1,n:"teal",title:"next",textContent:"next"})):N("",!0)])]),e("td",ye,[e("div",be,[_(d,{route:a,class:M(r.matched.find(i=>i.name===a.name)?"text-primary":r.matchedPending.find(i=>i.name===a.name)?"text-teal":""),onNavigate:n[0]||(n[0]=i=>r.$emit("navigate",i))},null,8,["route","class"]),e("div",xe,[a.file||a.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:i=>t(p)(a.file||a.meta?.file)},we,8,ke)):N("",!0)])])]),e("td",Ne,k(a.name),1),e("td",Re,[_(C,{filepath:$(a.meta.middleware),override:`${a.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ce,[a.meta.layout===!1?(o(),s("span",Pe,"-")):a.meta.layout?(o(),s("button",{key:1,onClick:i=>g(a.meta.layout)},k(a.meta.layout),9,Ve)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:n[1]||(n[1]=i=>g("default"))}," (default) "))])]))),128))])])])}}}),Le={class:"markdown-body"},Te=e("h1",null,"Pages",-1),Be=e("p",null,[V("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",null,"~/pages/"),V(" directory.")],-1),Ee=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Me=e("hr",null,null,-1),Ae=e("h1",null,"Middlewares",-1),De=e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route.",-1),je=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),Fe=[Te,Be,Ee,Me,Ae,De,je],Se={__name:"pages",setup(R,{expose:u}){return u({frontmatter:{}}),(h,f)=>(o(),s("div",Le,Fe))}},ze={key:0,"h-full":"","of-auto":""},Ke={border:"b base",flex:"~ col gap1",px4:"",py3:"","n-navbar-glass":""},Ue=e("span",{op50:""},"Navigate from ",-1),We={"font-mono":""},Oe=e("span",{op50:""}," to ",-1),Ge={key:1,op50:""},He=e("span",null,[V("Press "),e("b",{"font-bold":""},"Enter"),V(" to navigate")],-1),qe={key:0,"text-orange":"",op75:""},Je={key:1,op50:""},Qe={"min-h-14":""},Xe={key:1,class:"py-4 text-center"},Ye=e("span",{op50:""},"No routes matched",-1),Ze=[Ye],et={"w-full":""},tt=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),ot={mr1:""},pt=E({__name:"pages",setup(R){const u=J(),p=Q(),h=X(),f=D(),g=Y(),$=Z(),r=x(()=>f.value?.middleware||[]),n=B(""),c=B(0),d=x(()=>(r.value,n.value,g.value,c.value,u.value?.currentRoute?.value?.path));ee(()=>{p.value&&(n.value=u.value?.currentRoute?.value?.path),u.value?.beforeEach(l=>{n.value=l.fullPath}),u.value?.afterEach(l=>{n.value=l.fullPath})});async function C(){n.value!==u.value?.currentRoute?.value?.path&&u.value.push(n.value||"/")}const a=x(()=>u.value.resolve(n.value||"/").matched);function i(l){u.value.push(l),n.value=l}return(l,v)=>{const P=A,I=Ie,T=se,S=j,z=F,K=re,U=Se,W=le;return o(),s(m,null,[t(h)?.pages&&t(u)?(o(),s("div",ze,[e("div",Ke,[e("div",null,[t(d)!==t(n)?(o(),s(m,{key:0},[Ue,e("span",We,k(t(d)),1),Oe],64)):(o(),s("span",Ge,"Current route"))]),_(P,{modelValue:t(n),"onUpdate:modelValue":v[0]||(v[0]=w=>te(n)?n.value=w:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:M(t(d)===t(n)?"":t(a).length?"text-green":"text-orange"),onKeydown:oe(C,["enter"])},null,8,["modelValue","class","onKeydown"]),e("div",null,[t(d)!==t(n)?(o(),s(m,{key:0},[He,t(a).length?N("",!0):(o(),s("span",qe," (no match)"))],64)):(o(),s("span",Je,"Edit path above to navigate"))])]),_(T,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:b(()=>[e("div",Qe,[t(a).length?(o(),y(I,{key:0,pages:t(a),layouts:t(g)||[],matched:t(p).matched,"matched-pending":t(a),onNavigate:i},null,8,["pages","layouts","matched","matched-pending"])):(o(),s("div",Xe,Ze))])]),_:1}),_(T,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t($).length} routes registered in your application`,padding:"pr5"},{default:b(()=>[_(I,{pages:t($),layouts:t(g)||[],matched:t(p).matched,"matched-pending":t(a),onNavigate:i},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(r).length?(o(),y(T,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(r).length} middleware registered in your application`,padding:"px13"},{default:b(()=>[e("table",et,[tt,(o(!0),s(m,null,L(t(r),w=>(o(),s("tr",{key:w.path,"h-7":""},[e("td",null,[e("span",ot,k(w.name),1),w.global?(o(),y(S,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):N("",!0)]),e("td",null,[_(z,{filepath:w.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):N("",!0)])):(o(),y(K,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",title:"Nuxt Routing",description:"Create `./pages/index.vue` to enable routing",actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in l?l.rpc:t(ne)).runWizard(await("ensureDevAuthToken"in l?l.ensureDevAuthToken:t(ae))(),"enablePages")}}]},null,8,["actions"])),_(W,null,{default:b(()=>[_(U)]),_:1})],64)}}});export{pt as default};
@@ -1 +1 @@
1
- import{_ as v}from"./StateEditor.vue.1c34496c.js";import{d as b,o as e,m as c,F as k,n as C,h as f,j as a,a8 as N,bf as B,bg as w,k as x,as as F,a as O,a0 as P,f as r,i as o,p as u,v as R,I as V,_ as j}from"./entry.909ad6c7.js";import{_ as E}from"./NSectionBlock.acf7c6ed.js";import{_ as A}from"./HelpFab.vue.f0924b60.js";import"./DataSchemaButton.vue.18fef0d4.js";import"./json-editor-vue.8a771ed0.js";import"./NIconTitle.vue.7b846ffe.js";const G={key:0,flex:"~ col gap-1"},H={key:1,mt2:"",px4:"",italic:"",op35:""},K=b({__name:"StateGroup",props:{state:{},prefix:{default:""}},setup(m){return(t,n)=>{const i=v;return e(),c("div",null,[t.state&&Object.keys(t.state).length>0?(e(),c("div",G,[(e(!0),c(k,null,C(t.state,(l,s)=>(e(),f(i,{key:s,state:l,name:s.startsWith(t.prefix)?s.slice(t.prefix.length):s},{actions:a(_=>[N(t.$slots,"actions",B(w(_)))]),_:2},1032,["state","name"]))),128))])):(e(),c("div",H," No data "))])}}}),T={class:"markdown-body"},z=x("h1",null,"State & Async Data",-1),I=x("p",null,"// TODO",-1),L=[z,I],W={__name:"payload",setup(m,{expose:t}){return t({frontmatter:{}}),(i,l)=>(e(),c("div",T,L))}},q={key:0},et=b({__name:"payload",setup(m){const t=F(),n=O(()=>t.value?.nuxt.payload);async function i(l){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",l)}return(l,s)=>{const _=K,d=E,h=j,$=v,S=W,g=A,D=P("tooltip");return e(),c(k,null,[r(t)?(e(),c("div",q,[o(d,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(_,{state:r(n).state,prefix:"$s"},null,8,["state"])]),_:1}),o(d,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o(h,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:s[0]||(s[0]=y=>i())},{default:a(()=>[R(" Re-fetch all data ")]),_:1})]),default:a(()=>[o(_,{state:r(n).data},{actions:a(({isOpen:y,name:p})=>[y&&p?V((e(),f(h,{key:0,title:`Re-fetch '${p}'`,icon:"carbon-recycle",border:!1,onClick:J=>i([p])},null,8,["title","onClick"])),[[D,`Re-fetch '${p}'`,void 0,{bottom:!0}]]):u("",!0)]),_:1},8,["state"])]),_:1}),r(n).functions&&Object.keys(r(n).functions).length?(e(),f(d,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[o($,{"ml--6":"",state:r(n).functions},null,8,["state"])]),_:1})):u("",!0)])):u("",!0),o(g,null,{default:a(()=>[o(S)]),_:1})],64)}}});export{et as default};
1
+ import{_ as v}from"./StateEditor.vue.9646c347.js";import{d as b,o as e,m as c,F as k,n as C,h as f,j as a,a8 as N,bf as B,bg as w,k as x,as as F,a as O,a0 as P,f as r,i as o,p as u,v as R,I as V,_ as j}from"./entry.12ac938b.js";import{_ as E}from"./NSectionBlock.d6290e19.js";import{_ as A}from"./HelpFab.vue.891b009b.js";import"./DataSchemaButton.vue.42a3718a.js";import"./json-editor-vue.cf7b17c9.js";import"./NIconTitle.vue.eb974cf8.js";const G={key:0,flex:"~ col gap-1"},H={key:1,mt2:"",px4:"",italic:"",op35:""},K=b({__name:"StateGroup",props:{state:{},prefix:{default:""}},setup(m){return(t,n)=>{const i=v;return e(),c("div",null,[t.state&&Object.keys(t.state).length>0?(e(),c("div",G,[(e(!0),c(k,null,C(t.state,(l,s)=>(e(),f(i,{key:s,state:l,name:s.startsWith(t.prefix)?s.slice(t.prefix.length):s},{actions:a(_=>[N(t.$slots,"actions",B(w(_)))]),_:2},1032,["state","name"]))),128))])):(e(),c("div",H," No data "))])}}}),T={class:"markdown-body"},z=x("h1",null,"State & Async Data",-1),I=x("p",null,"// TODO",-1),L=[z,I],W={__name:"payload",setup(m,{expose:t}){return t({frontmatter:{}}),(i,l)=>(e(),c("div",T,L))}},q={key:0},et=b({__name:"payload",setup(m){const t=F(),n=O(()=>t.value?.nuxt.payload);async function i(l){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",l)}return(l,s)=>{const _=K,d=E,h=j,$=v,S=W,g=A,D=P("tooltip");return e(),c(k,null,[r(t)?(e(),c("div",q,[o(d,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(_,{state:r(n).state,prefix:"$s"},null,8,["state"])]),_:1}),o(d,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o(h,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:s[0]||(s[0]=y=>i())},{default:a(()=>[R(" Re-fetch all data ")]),_:1})]),default:a(()=>[o(_,{state:r(n).data},{actions:a(({isOpen:y,name:p})=>[y&&p?V((e(),f(h,{key:0,title:`Re-fetch '${p}'`,icon:"carbon-recycle",border:!1,onClick:J=>i([p])},null,8,["title","onClick"])),[[D,`Re-fetch '${p}'`,void 0,{bottom:!0}]]):u("",!0)]),_:1},8,["state"])]),_:1}),r(n).functions&&Object.keys(r(n).functions).length?(e(),f(d,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[o($,{"ml--6":"",state:r(n).functions},null,8,["state"])]),_:1})):u("",!0)])):u("",!0),o(g,null,{default:a(()=>[o(S)]),_:1})],64)}}});export{et as default};
@@ -1 +1 @@
1
- import{_ as S}from"./FilepathItem.vue.a1b71b8d.js";import{_ as D}from"./NBadge.ff27dca2.js";import{_ as C}from"./DurationDisplay.vue.dd0f91f1.js";import{d as v,aa as B,a as x,bc as V,o as n,m,k as t,t as P,i as l,f,h as u,p as d,an as F,a8 as N,a4 as H,q as I,j as g,v as y,be as E,as as W,F as k,n as j,G as L}from"./entry.909ad6c7.js";import{_ as M}from"./NSectionBlock.acf7c6ed.js";import{_ as q}from"./HelpFab.vue.f0924b60.js";import"./NIconTitle.vue.7b846ffe.js";const z={flex:"~ gap2","items-center":""},A={w8:"","text-right":"","text-sm":"",op25:""},G={key:0,"flex-auto":"","text-right":""},R=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(p){const e=p,a=B(),r=x(()=>V(e.plugin.src,a.value?.rootDir||"").path);return(i,c)=>{const _=S,o=D,s=C;return n(),m("div",z,[t("div",A,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,n:"rose",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,n:"gray",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,n:"teal",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,n:"orange",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",G,[l(s,{duration:i.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),Y={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},J={flex:"~ items-center gap-1","font-bold":""},K=v({__name:"HelpTip",props:{title:{},icon:{}},setup(p){return(e,a)=>{const r=H,i=F("ContentSlot");return n(),m("div",Y,[t("div",J,[e.icon?(n(),u(r,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),t("div",null,P(e.title),1)]),t("div",null,[N(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),O={};function Q(p,e){const a=K;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:g(()=>[N(p.$slots,"default")]),_:3})}const U=I(O,[["render",Q]]),X={class:"markdown-body"},Z=t("h1",null,"Plugins",-1),tt=t("p",null,[y("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),t("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),nt={__name:"plugins",setup(p,{expose:e}){return e({frontmatter:{}}),(r,i)=>{const c=U;return n(),m("div",X,[Z,tt,l(c,null,{default:g(()=>[y(" Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},it=t("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=t("span",{op50:""},"Total execution time:",-1),dt=v({__name:"plugins",setup(p){const e=E(),a=W(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.metrics.clientPlugins()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(h=>h.src===s.src||h.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.metrics.clientPlugins()||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=R,s=C,h=M,T=nt,w=q;return n(),m(k,null,[l(h,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:g(()=>[t("div",ot,[(n(!0),m(k,null,j(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:L(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),t("div",st,[it,at,l(s,{duration:f(i),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(w,null,{default:g(()=>[l(T)]),_:1})],64)}}});export{dt as default};
1
+ import{_ as S}from"./FilepathItem.vue.7fdda51b.js";import{_ as D}from"./NBadge.83bd8b90.js";import{_ as C}from"./DurationDisplay.vue.719ab95f.js";import{d as v,aa as B,a as x,bc as V,o as n,m,k as t,t as P,i as l,f,h as u,p as d,an as F,a8 as N,a4 as H,q as I,j as g,v as y,be as E,as as W,F as k,n as j,G as L}from"./entry.12ac938b.js";import{_ as M}from"./NSectionBlock.d6290e19.js";import{_ as q}from"./HelpFab.vue.891b009b.js";import"./NIconTitle.vue.eb974cf8.js";const z={flex:"~ gap2","items-center":""},A={w8:"","text-right":"","text-sm":"",op25:""},G={key:0,"flex-auto":"","text-right":""},R=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(p){const e=p,a=B(),r=x(()=>V(e.plugin.src,a.value?.rootDir||"").path);return(i,c)=>{const _=S,o=D,s=C;return n(),m("div",z,[t("div",A,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,n:"rose",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,n:"gray",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,n:"teal",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,n:"orange",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",G,[l(s,{duration:i.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),Y={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},J={flex:"~ items-center gap-1","font-bold":""},K=v({__name:"HelpTip",props:{title:{},icon:{}},setup(p){return(e,a)=>{const r=H,i=F("ContentSlot");return n(),m("div",Y,[t("div",J,[e.icon?(n(),u(r,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),t("div",null,P(e.title),1)]),t("div",null,[N(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),O={};function Q(p,e){const a=K;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:g(()=>[N(p.$slots,"default")]),_:3})}const U=I(O,[["render",Q]]),X={class:"markdown-body"},Z=t("h1",null,"Plugins",-1),tt=t("p",null,[y("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),t("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),nt={__name:"plugins",setup(p,{expose:e}){return e({frontmatter:{}}),(r,i)=>{const c=U;return n(),m("div",X,[Z,tt,l(c,null,{default:g(()=>[y(" Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},it=t("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=t("span",{op50:""},"Total execution time:",-1),dt=v({__name:"plugins",setup(p){const e=E(),a=W(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.metrics.clientPlugins()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(h=>h.src===s.src||h.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.metrics.clientPlugins()||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=R,s=C,h=M,T=nt,w=q;return n(),m(k,null,[l(h,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:g(()=>[t("div",ot,[(n(!0),m(k,null,j(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:L(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),t("div",st,[it,at,l(s,{duration:f(i),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(w,null,{default:g(()=>[l(T)]),_:1})],64)}}});export{dt as default};
@@ -1 +1 @@
1
- import{_ as v}from"./StateEditor.vue.1c34496c.js";import{_ as x}from"./NSectionBlock.acf7c6ed.js";import{o as r,m as u,k as e,v as m,d as y,as as b,bh as C,a as d,f as i,i as t,j as a,p as k,F as w}from"./entry.909ad6c7.js";import{_ as N}from"./HelpFab.vue.f0924b60.js";import"./DataSchemaButton.vue.18fef0d4.js";import"./json-editor-vue.8a771ed0.js";import"./NIconTitle.vue.7b846ffe.js";const R={class:"markdown-body"},T=e("h1",null,"Runtime Configs",-1),B=e("p",null,"Nuxt provides a runtime config API to expose configuration within your application and server routes, with the ability to update it at runtime by setting environment variables.",-1),V=e("p",null,[m("In Nuxt DevTools, the editor allows you to edit the runtime config temporarily to see how the changes affect your application. To update them, you might want to update your "),e("code",null,"nuxt.config.js"),m(" file, or check more details in the documentation.")],-1),$=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),D=[T,B,V,$],F={__name:"runtime-configs",setup(f,{expose:o}){return o({frontmatter:{}}),(p,_)=>(r(),u("div",R,D))}},P={key:0},z=y({__name:"runtime-configs",setup(f){const o=b(),l=C(),p=d(()=>o.value?.nuxt.payload),_=d(()=>{const n={...l.value};return delete n.public,delete n.app,n});return(n,S)=>{const s=v,c=x,g=F,h=N;return r(),u(w,null,[i(o)?(r(),u("div",P,[t(c,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:a(()=>[t(s,{state:i(o).app.appConfig},null,8,["state"])]),_:1}),t(c,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:a(()=>[t(s,{state:i(p).config?.public},null,8,["state"])]),_:1}),t(c,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:a(()=>[t(s,{state:i(_),readonly:""},null,8,["state"])]),_:1})])):k("",!0),t(h,null,{default:a(()=>[t(g)]),_:1})],64)}}});export{z as default};
1
+ import{_ as v}from"./StateEditor.vue.9646c347.js";import{_ as x}from"./NSectionBlock.d6290e19.js";import{o as r,m as u,k as e,v as m,d as y,as as b,bh as C,a as d,f as i,i as t,j as a,p as k,F as w}from"./entry.12ac938b.js";import{_ as N}from"./HelpFab.vue.891b009b.js";import"./DataSchemaButton.vue.42a3718a.js";import"./json-editor-vue.cf7b17c9.js";import"./NIconTitle.vue.eb974cf8.js";const R={class:"markdown-body"},T=e("h1",null,"Runtime Configs",-1),B=e("p",null,"Nuxt provides a runtime config API to expose configuration within your application and server routes, with the ability to update it at runtime by setting environment variables.",-1),V=e("p",null,[m("In Nuxt DevTools, the editor allows you to edit the runtime config temporarily to see how the changes affect your application. To update them, you might want to update your "),e("code",null,"nuxt.config.js"),m(" file, or check more details in the documentation.")],-1),$=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),D=[T,B,V,$],F={__name:"runtime-configs",setup(f,{expose:o}){return o({frontmatter:{}}),(p,_)=>(r(),u("div",R,D))}},P={key:0},z=y({__name:"runtime-configs",setup(f){const o=b(),l=C(),p=d(()=>o.value?.nuxt.payload),_=d(()=>{const n={...l.value};return delete n.public,delete n.app,n});return(n,S)=>{const s=v,c=x,g=F,h=N;return r(),u(w,null,[i(o)?(r(),u("div",P,[t(c,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:a(()=>[t(s,{state:i(o).app.appConfig},null,8,["state"])]),_:1}),t(c,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:a(()=>[t(s,{state:i(p).config?.public},null,8,["state"])]),_:1}),t(c,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:a(()=>[t(s,{state:i(_),readonly:""},null,8,["state"])]),_:1})])):k("",!0),t(h,null,{default:a(()=>[t(g)]),_:1})],64)}}});export{z as default};
@@ -1,4 +1,4 @@
1
- import{r as P,bk as Fe,ay as ze,aw as He,w as xe,bl as We,bm as Ge,d as ae,bn as we,o as t,m as v,k as d,G as j,h as k,f as e,bo as se,t as E,p as U,v as H,a7 as Je,a8 as ee,F as N,n as A,a4 as ce,Y as Ke,a as V,i as m,j as x,W as $e,_ as fe,bp as Qe,aa as Ye,as as Xe,au as pe,a9 as Ze,ax as et,e as tt,a0 as Se,l as X,I as le,ar as ot,U as nt,A as Ve,bq as st,br as lt,af as at,S as rt,bs as it,am as ut}from"./entry.909ad6c7.js";import{_ as dt}from"./NNavbar.vue.737ef1b1.js";import{_ as Te}from"./NBadge.ff27dca2.js";import{_ as Re}from"./NSelect.vue.04805728.js";import{_ as pt}from"./NCheckbox.vue.b56304c9.js";import{u as Ue,_ as ct}from"./storage-options.aeaf572e.js";import{_ as ft}from"./DataSchemaButton.vue.18fef0d4.js";import{_ as mt}from"./NCodeBlock.vue.9ce69690.js";import{C as ke,S as Ne}from"./constants.2cc6e981.js";import{U as vt}from"./json-editor-vue.8a771ed0.js";import{_ as ht}from"./NSectionBlock.acf7c6ed.js";import{_ as yt}from"./NDrawer.vue.2b176b54.js";import"./client.17f79a3c.js";import"./NIconTitle.vue.7b846ffe.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function _t(u,y){if(typeof u!="string")throw new TypeError("argument str must be a string");const h={},$=(y||{}).decode||kt;let g=0;for(;g<u.length;){const c=u.indexOf("=",g);if(c===-1)break;let s=u.indexOf(";",g);if(s===-1)s=u.length;else if(s<c){g=u.lastIndexOf(";",c-1)+1;continue}const i=u.slice(g,c).trim();if(h[i]===void 0){let r=u.slice(c+1,s).trim();r.codePointAt(0)===34&&(r=r.slice(1,-1)),h[i]=bt(r,$)}g=s+1}return h}function Ce(u,y,h){const o=h||{},$=o.encode||Ct;if(typeof $!="function")throw new TypeError("option encode is invalid");if(!ne.test(u))throw new TypeError("argument name is invalid");const g=$(y);if(g&&!ne.test(g))throw new TypeError("argument val is invalid");let c=u+"="+g;if(o.maxAge!==void 0&&o.maxAge!==null){const s=o.maxAge-0;if(Number.isNaN(s)||!Number.isFinite(s))throw new TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(s)}if(o.domain){if(!ne.test(o.domain))throw new TypeError("option domain is invalid");c+="; Domain="+o.domain}if(o.path){if(!ne.test(o.path))throw new TypeError("option path is invalid");c+="; Path="+o.path}if(o.expires){if(!gt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");c+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(c+="; HttpOnly"),o.secure&&(c+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":c+="; Priority=Low";break;case"medium":c+="; Priority=Medium";break;case"high":c+="; 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:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return c}function gt(u){return Object.prototype.toString.call(u)==="[object Date]"||u instanceof Date}function bt(u,y){try{return y(u)}catch{return u}}function kt(u){return u.includes("%")?decodeURIComponent(u):u}function Ct(u){return encodeURIComponent(u)}const xt={path:"/",watch:!0,decode:u=>We(decodeURIComponent(u)),encode:u=>encodeURIComponent(typeof u=="string"?u:JSON.stringify(u))};function wt(u,y){const h={...xt,...y},o=$t(h)||{},$=P(o[u]??h.default?.());{const g=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${u}`);Fe()&&ze(()=>{g?.close()});const c=()=>{Vt(u,$.value,h),g?.postMessage(Ge($.value))};let s=!1;g&&(g.onmessage=i=>{s=!0,$.value=i.data,He(()=>{s=!1})}),h.watch?xe($,()=>{s||c()},{deep:h.watch!=="shallow"}):c()}return $}function $t(u={}){return _t(document.cookie,u)}function St(u,y,h={}){return y==null?Ce(u,y,{...h,maxAge:-1}):Ce(u,y,h)}function Vt(u,y,h={}){document.cookie=St(u,y,h)}const Tt=d("div",{"x-divider":""},null,-1),Ie=ae({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(u){const y=P(!0),h=we();return(o,$)=>{const g=ce,c=Te,s=Ie;return t(),v("div",null,[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:j([{"bg-active":e(h)===o.item.filepath}]),style:Je({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:$[0]||($[0]=i=>{y.value=!e(y),h.value=o.item.filepath})},[d("div",{class:j({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(t(),k(g,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(y)?90:0,transition:""},null,8,["transform-rotate"])):(t(),k(c,{key:1,class:j(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(o.item.method||"*")),textContent:E((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),d("span",{class:j({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(t(),k(g,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):U("",!0),H(" "+E(o.item.route),1)],2)],6),Tt,e(y)?ee(o.$slots,"default",{key:0},()=>[(t(!0),v(N,null,A(o.item.routes,i=>(t(),k(s,{key:i.filepath,item:i,index:o.index+1},null,8,["item","index"]))),128))]):U("",!0)])}}}),Rt={p4:"",flex:"~ col gap-4"},Ut={key:1,ml2:"",flex:""},Nt=["value"],It={key:0,flex:"","gap-4":""},Dt=d("div",{"flex-auto":""},null,-1),De=ae({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(u,{emit:y}){const h=u,o=Ke(h,"modelValue",y,{passive:!0}),$=V(()=>[...h.keys,"active","key","value","type"]),g=V(()=>{const i={};for(const r of $.value)i[r]=h.default[r]||"";return i}),c=["string","number","boolean","file","date","time","datetime-local"];function s(i,r){const I=r.target;if(I.files&&I.files[0]){const M=I.files[0],z=new FileReader;z.readAsDataURL(M),z.onload=()=>{o.value[i].value=z.result}}}return xe(()=>o,i=>{i.value.forEach(r=>{if(r.type==="number"&&typeof r.value!="number"){const I=Number.parseFloat(r.value);r.value=Number.isNaN(I)?0:I}else r.type==="boolean"&&typeof r.value!="boolean"?r.value=!0:r.type==="file"&&typeof r.value!="object"?r.value="":r.type==="date"&&typeof r.value=="string"&&!r.value.match(/^\d{4}-\d{2}-\d{2}$/)?r.value=new Date().toISOString().slice(0,10):r.type==="time"&&typeof r.value=="string"&&!r.value.match(/^\d{2}:\d{2}$/)?r.value=new Date().toISOString().slice(11,16):r.type==="datetime-local"&&typeof r.value=="string"&&!r.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?r.value=new Date().toISOString().slice(0,16):r.type==="string"&&(r.value=r.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(i,r)=>{const I=pt,M=$e,z=Re,J=ce,C=fe;return t(),v("div",Rt,[(t(!0),v(N,null,A(e(o),(l,S)=>(t(),v("div",{key:S,flex:"~ gap-2","justify-around":""},[ee(i.$slots,"input",{item:l}),(t(!0),v(N,null,A(e($),b=>(t(),v(N,{key:b},[l.type!==null&&b==="active"?(t(),k(I,{key:0,modelValue:l[b],"onUpdate:modelValue":_=>l[b]=_,n:"sm primary",disabled:i.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):U("",!0),l.type!==null&&b==="key"?(t(),k(M,{key:1,modelValue:l[b],"onUpdate:modelValue":_=>l[b]=_,placeholder:b,"flex-1":"","font-mono":"",n:"sm primary",disabled:i.disabled,class:j(i.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):b==="value"?(t(),v(N,{key:2},[l.type==="file"?(t(),k(M,{key:0,type:"file",disabled:i.disabled,class:j(i.disabled?"op75":""),onChange:_=>s(S,_)},null,8,["disabled","class","onChange"])):l.type==="boolean"?(t(),v("div",Ut,[m(I,{modelValue:l.value,"onUpdate:modelValue":_=>l.value=_,placeholder:"Value",n:"green lg",disabled:i.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(t(),k(M,{key:2,modelValue:l.value,"onUpdate:modelValue":_=>l.value=_,type:l.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:i.disabled,class:j(i.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):b==="type"?(t(),k(z,{key:3,modelValue:l.type,"onUpdate:modelValue":_=>l.type=_,n:"sm green",class:j(i.disabled?"op75":""),disabled:i.disabled},{default:x(()=>[(t(),v(N,null,A(c,_=>d("option",{key:_,value:_},E(_),9,Nt)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):U("",!0)],64))),128)),ee(i.$slots,"input-actions",{},()=>[m(C,{n:"red",disabled:i.disabled,class:j(i.disabled?"op0!":""),onClick:b=>e(o).splice(S,1)},{default:x(()=>[m(J,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),i.disabled?U("",!0):(t(),v("div",It,[ee(i.$slots,"actions",{params:e(o)},()=>[m(C,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:r[0]||(r[0]=l=>e(o).push({...e(g)}))},{default:x(()=>[H(" Add ")]),_:1}),Dt,e(o).length?(t(),k(C,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:r[1]||(r[1]=l=>o.value=[])},{default:x(()=>[H(" Remove All ")]),_:1})):U("",!0)])])),ee(i.$slots,"default")])}}}),Et={"h-full":"","w-full":"",flex:"~ col"},jt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Ot={flex:"~ gap2 items-center"},Lt={relative:"","w-full":""},Pt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},qt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Bt=d("div",{"flex-auto":""},null,-1),At=d("div",{"text-xs":"",op50:""}," Send from ",-1),Mt=d("option",{value:"app"}," App ",-1),Ft=d("option",{value:"devtools"}," DevTools ",-1),zt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ht={"text-right":"","font-mono":""},Wt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Gt={flex:"~ gap-4"},Jt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Kt=d("div",{"w-5":"","x-divider":""},null,-1),Qt=d("div",{"flex-none":""}," Default Inputs ",-1),Yt=d("div",{"x-divider":""},null,-1),Xt={key:2},Zt={key:3,border:"b base",relative:"","n-code-block":""},eo={flex:"~ wrap","w-full":""},to=["onClick"],oo=d("div",{border:"b base","flex-auto":""},null,-1),no={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},so=d("div",null,"Response",-1),lo={key:1,"text-xs":"",op50:""},ao=d("div",{"flex-auto":""},null,-1),ro=d("div",{op50:""}," Request finished in ",-1),io={key:0,"flex-auto":"","overflow-auto":""},uo={border:"~ base","h-full":"","w-full":"",rounded:""},po=["data"],co={key:2,"flex-auto":"","overflow-auto":"",p4:""},fo={border:"~ base",rounded:""},mo=["src"],vo={key:1,controls:"",rounded:""},ho=["src"],yo=ae({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(u,{emit:y}){const h=u,[o,$]=Qe(),g=Ye(),c=Xe(),s=pe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),i=V(()=>s.contentType.includes("application/json")?"json":s.contentType.includes("text/html")?"html":s.contentType.includes("text/css")?"css":s.contentType.includes("text/javascript")?"javascript":s.contentType.includes("image")||s.contentType.includes("video")?"media":s.contentType.includes("text/xml")||s.contentType.includes("application/xml")?"xml":s.contentType.includes("application/pdf")?"pdf":"text"),r=V(()=>{if(i.value==="json")return JSON.stringify(s.data,null,2);if(i.value==="media"||i.value==="pdf"){const n=new Blob([s.data],{type:s.contentType});return URL.createObjectURL(n)}return s.data}),I=P(!1),M=P(!1),z=Ze(),J=V(()=>h.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),C=V(()=>J.value?.filter(n=>n.startsWith(":")||n.startsWith("**:"))||[]),l=P(h.route.method||"GET"),S=P({}),b=pe({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),_=P({}),{inputDefaults:T,sendFrom:q}=Ue("serverRoutes"),O=V(()=>c?.value?.app?.$fetch?q.value:"devtools"),B=["GET","POST","PUT","PATCH","DELETE","HEAD"],re=["PATCH","POST","PUT","DELETE"],te=V(()=>re.includes(l.value.toUpperCase())),L=P(C.value.length?"params":"query"),Z=["input","json"],w=P(Z[0]),K=V({get:()=>b[L.value],set:n=>{b[L.value]=n}}),me=V(()=>({...G(T.value.query),...G(b.query)})),ve=V(()=>({...G(T.value.headers),...G(b.headers)})),ie=V(()=>te.value?w.value==="json"?{...G(T.value.body),..._.value}:{...G(T.value.body),...G(b.body)}:void 0),Ee=V(()=>{let n=window?.location.origin;return n.charAt(n.length-1)==="/"&&(n=n.slice(0,-1)),n}),oe=V(()=>{let n=new URLSearchParams(me.value).toString();n&&(n=`?${n}`);const p=(J.value?.map(D=>(D.startsWith(":")||D.startsWith("**:"))&&S.value[D]||D).join("")||"")+n;let f=g.value?.app.baseURL||"";return(f==="./"||f===".")&&(f=""),f.endsWith("/")&&(f=f.slice(0,-1)),f+p}),he=V(()=>Ee.value+oe.value);function G(n){const p=Object.fromEntries(n.filter(({active:f,key:D,value:R})=>f&&D&&R!==void 0).map(({key:f,value:D})=>[f,D]));return Object.entries(p).length?p:void 0}async function ye(){M.value=!0,I.value=!0;const n=Date.now(),p=O.value==="app"?c.value.app.$fetch:$fetch;nt("server-routes:fetch",{method:l.value,sendFrom:O.value});try{s.data=await p(he.value,{method:l.value.toUpperCase(),headers:ve.value,query:me.value,body:ie.value,onResponse({response:f}){s.contentType=(f.headers.get("content-type")||"").toString().toLowerCase().trim(),s.statusCode=f.status,s.error=void 0},onResponseError(f){s.error=f.response._data,s.data=f.response._data}})}catch{}I.value=!1,s.fetchTime=Date.now()-n}const _e=V(()=>{const n=[],p=[],f=Object.entries(ve.value).filter(([R,F])=>R&&F&&!(R==="Content-Type"&&F==="application/json")).map(([R,F])=>` '${R}': '${F}'`).join(`,
1
+ import{r as P,bk as Fe,ay as ze,aw as He,w as xe,bl as We,bm as Ge,d as ae,bn as we,o as t,m as v,k as d,G as j,h as k,f as e,bo as se,t as E,p as U,v as H,a7 as Je,a8 as ee,F as N,n as A,a4 as ce,Y as Ke,a as V,i as m,j as x,W as $e,_ as fe,bp as Qe,aa as Ye,as as Xe,au as pe,a9 as Ze,ax as et,e as tt,a0 as Se,l as X,I as le,ar as ot,U as nt,A as Ve,bq as st,br as lt,af as at,S as rt,bs as it,am as ut}from"./entry.12ac938b.js";import{_ as dt}from"./NNavbar.vue.5fed0fd7.js";import{_ as Te}from"./NBadge.83bd8b90.js";import{_ as Re}from"./NSelect.vue.08628a3f.js";import{_ as pt}from"./NCheckbox.vue.5a0973a7.js";import{u as Ue,_ as ct}from"./storage-options.2141006e.js";import{_ as ft}from"./DataSchemaButton.vue.42a3718a.js";import{_ as mt}from"./NCodeBlock.vue.2de294a4.js";import{C as ke,S as Ne}from"./constants.2cc6e981.js";import{U as vt}from"./json-editor-vue.cf7b17c9.js";import{_ as ht}from"./NSectionBlock.d6290e19.js";import{_ as yt}from"./NDrawer.vue.9614b581.js";import"./client.f2b385ce.js";import"./NIconTitle.vue.eb974cf8.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function _t(u,y){if(typeof u!="string")throw new TypeError("argument str must be a string");const h={},$=(y||{}).decode||kt;let g=0;for(;g<u.length;){const c=u.indexOf("=",g);if(c===-1)break;let s=u.indexOf(";",g);if(s===-1)s=u.length;else if(s<c){g=u.lastIndexOf(";",c-1)+1;continue}const i=u.slice(g,c).trim();if(h[i]===void 0){let r=u.slice(c+1,s).trim();r.codePointAt(0)===34&&(r=r.slice(1,-1)),h[i]=bt(r,$)}g=s+1}return h}function Ce(u,y,h){const o=h||{},$=o.encode||Ct;if(typeof $!="function")throw new TypeError("option encode is invalid");if(!ne.test(u))throw new TypeError("argument name is invalid");const g=$(y);if(g&&!ne.test(g))throw new TypeError("argument val is invalid");let c=u+"="+g;if(o.maxAge!==void 0&&o.maxAge!==null){const s=o.maxAge-0;if(Number.isNaN(s)||!Number.isFinite(s))throw new TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(s)}if(o.domain){if(!ne.test(o.domain))throw new TypeError("option domain is invalid");c+="; Domain="+o.domain}if(o.path){if(!ne.test(o.path))throw new TypeError("option path is invalid");c+="; Path="+o.path}if(o.expires){if(!gt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");c+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(c+="; HttpOnly"),o.secure&&(c+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":c+="; Priority=Low";break;case"medium":c+="; Priority=Medium";break;case"high":c+="; 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:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return c}function gt(u){return Object.prototype.toString.call(u)==="[object Date]"||u instanceof Date}function bt(u,y){try{return y(u)}catch{return u}}function kt(u){return u.includes("%")?decodeURIComponent(u):u}function Ct(u){return encodeURIComponent(u)}const xt={path:"/",watch:!0,decode:u=>We(decodeURIComponent(u)),encode:u=>encodeURIComponent(typeof u=="string"?u:JSON.stringify(u))};function wt(u,y){const h={...xt,...y},o=$t(h)||{},$=P(o[u]??h.default?.());{const g=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${u}`);Fe()&&ze(()=>{g?.close()});const c=()=>{Vt(u,$.value,h),g?.postMessage(Ge($.value))};let s=!1;g&&(g.onmessage=i=>{s=!0,$.value=i.data,He(()=>{s=!1})}),h.watch?xe($,()=>{s||c()},{deep:h.watch!=="shallow"}):c()}return $}function $t(u={}){return _t(document.cookie,u)}function St(u,y,h={}){return y==null?Ce(u,y,{...h,maxAge:-1}):Ce(u,y,h)}function Vt(u,y,h={}){document.cookie=St(u,y,h)}const Tt=d("div",{"x-divider":""},null,-1),Ie=ae({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(u){const y=P(!0),h=we();return(o,$)=>{const g=ce,c=Te,s=Ie;return t(),v("div",null,[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:j([{"bg-active":e(h)===o.item.filepath}]),style:Je({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:$[0]||($[0]=i=>{y.value=!e(y),h.value=o.item.filepath})},[d("div",{class:j({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(t(),k(g,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(y)?90:0,transition:""},null,8,["transform-rotate"])):(t(),k(c,{key:1,class:j(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(o.item.method||"*")),textContent:E((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),d("span",{class:j({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(t(),k(g,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):U("",!0),H(" "+E(o.item.route),1)],2)],6),Tt,e(y)?ee(o.$slots,"default",{key:0},()=>[(t(!0),v(N,null,A(o.item.routes,i=>(t(),k(s,{key:i.filepath,item:i,index:o.index+1},null,8,["item","index"]))),128))]):U("",!0)])}}}),Rt={p4:"",flex:"~ col gap-4"},Ut={key:1,ml2:"",flex:""},Nt=["value"],It={key:0,flex:"","gap-4":""},Dt=d("div",{"flex-auto":""},null,-1),De=ae({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(u,{emit:y}){const h=u,o=Ke(h,"modelValue",y,{passive:!0}),$=V(()=>[...h.keys,"active","key","value","type"]),g=V(()=>{const i={};for(const r of $.value)i[r]=h.default[r]||"";return i}),c=["string","number","boolean","file","date","time","datetime-local"];function s(i,r){const I=r.target;if(I.files&&I.files[0]){const M=I.files[0],z=new FileReader;z.readAsDataURL(M),z.onload=()=>{o.value[i].value=z.result}}}return xe(()=>o,i=>{i.value.forEach(r=>{if(r.type==="number"&&typeof r.value!="number"){const I=Number.parseFloat(r.value);r.value=Number.isNaN(I)?0:I}else r.type==="boolean"&&typeof r.value!="boolean"?r.value=!0:r.type==="file"&&typeof r.value!="object"?r.value="":r.type==="date"&&typeof r.value=="string"&&!r.value.match(/^\d{4}-\d{2}-\d{2}$/)?r.value=new Date().toISOString().slice(0,10):r.type==="time"&&typeof r.value=="string"&&!r.value.match(/^\d{2}:\d{2}$/)?r.value=new Date().toISOString().slice(11,16):r.type==="datetime-local"&&typeof r.value=="string"&&!r.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?r.value=new Date().toISOString().slice(0,16):r.type==="string"&&(r.value=r.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(i,r)=>{const I=pt,M=$e,z=Re,J=ce,C=fe;return t(),v("div",Rt,[(t(!0),v(N,null,A(e(o),(l,S)=>(t(),v("div",{key:S,flex:"~ gap-2","justify-around":""},[ee(i.$slots,"input",{item:l}),(t(!0),v(N,null,A(e($),b=>(t(),v(N,{key:b},[l.type!==null&&b==="active"?(t(),k(I,{key:0,modelValue:l[b],"onUpdate:modelValue":_=>l[b]=_,n:"sm primary",disabled:i.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):U("",!0),l.type!==null&&b==="key"?(t(),k(M,{key:1,modelValue:l[b],"onUpdate:modelValue":_=>l[b]=_,placeholder:b,"flex-1":"","font-mono":"",n:"sm primary",disabled:i.disabled,class:j(i.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):b==="value"?(t(),v(N,{key:2},[l.type==="file"?(t(),k(M,{key:0,type:"file",disabled:i.disabled,class:j(i.disabled?"op75":""),onChange:_=>s(S,_)},null,8,["disabled","class","onChange"])):l.type==="boolean"?(t(),v("div",Ut,[m(I,{modelValue:l.value,"onUpdate:modelValue":_=>l.value=_,placeholder:"Value",n:"green lg",disabled:i.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(t(),k(M,{key:2,modelValue:l.value,"onUpdate:modelValue":_=>l.value=_,type:l.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:i.disabled,class:j(i.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):b==="type"?(t(),k(z,{key:3,modelValue:l.type,"onUpdate:modelValue":_=>l.type=_,n:"sm green",class:j(i.disabled?"op75":""),disabled:i.disabled},{default:x(()=>[(t(),v(N,null,A(c,_=>d("option",{key:_,value:_},E(_),9,Nt)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):U("",!0)],64))),128)),ee(i.$slots,"input-actions",{},()=>[m(C,{n:"red",disabled:i.disabled,class:j(i.disabled?"op0!":""),onClick:b=>e(o).splice(S,1)},{default:x(()=>[m(J,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),i.disabled?U("",!0):(t(),v("div",It,[ee(i.$slots,"actions",{params:e(o)},()=>[m(C,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:r[0]||(r[0]=l=>e(o).push({...e(g)}))},{default:x(()=>[H(" Add ")]),_:1}),Dt,e(o).length?(t(),k(C,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:r[1]||(r[1]=l=>o.value=[])},{default:x(()=>[H(" Remove All ")]),_:1})):U("",!0)])])),ee(i.$slots,"default")])}}}),Et={"h-full":"","w-full":"",flex:"~ col"},jt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Ot={flex:"~ gap2 items-center"},Lt={relative:"","w-full":""},Pt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},qt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Bt=d("div",{"flex-auto":""},null,-1),At=d("div",{"text-xs":"",op50:""}," Send from ",-1),Mt=d("option",{value:"app"}," App ",-1),Ft=d("option",{value:"devtools"}," DevTools ",-1),zt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ht={"text-right":"","font-mono":""},Wt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Gt={flex:"~ gap-4"},Jt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Kt=d("div",{"w-5":"","x-divider":""},null,-1),Qt=d("div",{"flex-none":""}," Default Inputs ",-1),Yt=d("div",{"x-divider":""},null,-1),Xt={key:2},Zt={key:3,border:"b base",relative:"","n-code-block":""},eo={flex:"~ wrap","w-full":""},to=["onClick"],oo=d("div",{border:"b base","flex-auto":""},null,-1),no={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},so=d("div",null,"Response",-1),lo={key:1,"text-xs":"",op50:""},ao=d("div",{"flex-auto":""},null,-1),ro=d("div",{op50:""}," Request finished in ",-1),io={key:0,"flex-auto":"","overflow-auto":""},uo={border:"~ base","h-full":"","w-full":"",rounded:""},po=["data"],co={key:2,"flex-auto":"","overflow-auto":"",p4:""},fo={border:"~ base",rounded:""},mo=["src"],vo={key:1,controls:"",rounded:""},ho=["src"],yo=ae({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(u,{emit:y}){const h=u,[o,$]=Qe(),g=Ye(),c=Xe(),s=pe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),i=V(()=>s.contentType.includes("application/json")?"json":s.contentType.includes("text/html")?"html":s.contentType.includes("text/css")?"css":s.contentType.includes("text/javascript")?"javascript":s.contentType.includes("image")||s.contentType.includes("video")?"media":s.contentType.includes("text/xml")||s.contentType.includes("application/xml")?"xml":s.contentType.includes("application/pdf")?"pdf":"text"),r=V(()=>{if(i.value==="json")return JSON.stringify(s.data,null,2);if(i.value==="media"||i.value==="pdf"){const n=new Blob([s.data],{type:s.contentType});return URL.createObjectURL(n)}return s.data}),I=P(!1),M=P(!1),z=Ze(),J=V(()=>h.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),C=V(()=>J.value?.filter(n=>n.startsWith(":")||n.startsWith("**:"))||[]),l=P(h.route.method||"GET"),S=P({}),b=pe({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),_=P({}),{inputDefaults:T,sendFrom:q}=Ue("serverRoutes"),O=V(()=>c?.value?.app?.$fetch?q.value:"devtools"),B=["GET","POST","PUT","PATCH","DELETE","HEAD"],re=["PATCH","POST","PUT","DELETE"],te=V(()=>re.includes(l.value.toUpperCase())),L=P(C.value.length?"params":"query"),Z=["input","json"],w=P(Z[0]),K=V({get:()=>b[L.value],set:n=>{b[L.value]=n}}),me=V(()=>({...G(T.value.query),...G(b.query)})),ve=V(()=>({...G(T.value.headers),...G(b.headers)})),ie=V(()=>te.value?w.value==="json"?{...G(T.value.body),..._.value}:{...G(T.value.body),...G(b.body)}:void 0),Ee=V(()=>{let n=window?.location.origin;return n.charAt(n.length-1)==="/"&&(n=n.slice(0,-1)),n}),oe=V(()=>{let n=new URLSearchParams(me.value).toString();n&&(n=`?${n}`);const p=(J.value?.map(D=>(D.startsWith(":")||D.startsWith("**:"))&&S.value[D]||D).join("")||"")+n;let f=g.value?.app.baseURL||"";return(f==="./"||f===".")&&(f=""),f.endsWith("/")&&(f=f.slice(0,-1)),f+p}),he=V(()=>Ee.value+oe.value);function G(n){const p=Object.fromEntries(n.filter(({active:f,key:D,value:R})=>f&&D&&R!==void 0).map(({key:f,value:D})=>[f,D]));return Object.entries(p).length?p:void 0}async function ye(){M.value=!0,I.value=!0;const n=Date.now(),p=O.value==="app"?c.value.app.$fetch:$fetch;nt("server-routes:fetch",{method:l.value,sendFrom:O.value});try{s.data=await p(he.value,{method:l.value.toUpperCase(),headers:ve.value,query:me.value,body:ie.value,onResponse({response:f}){s.contentType=(f.headers.get("content-type")||"").toString().toLowerCase().trim(),s.statusCode=f.status,s.error=void 0},onResponseError(f){s.error=f.response._data,s.data=f.response._data}})}catch{}I.value=!1,s.fetchTime=Date.now()-n}const _e=V(()=>{const n=[],p=[],f=Object.entries(ve.value).filter(([R,F])=>R&&F&&!(R==="Content-Type"&&F==="application/json")).map(([R,F])=>` '${R}': '${F}'`).join(`,
2
2
  `);l.value.toUpperCase()!=="GET"&&p.push(`method: '${l.value.toUpperCase()}'`),f&&p.push(`headers: {
3
3
  ${f}
4
4
  }`),ie.value&&p.push(`body: ${JSON.stringify(ie.value,null,2)}`);const D=p.length?`, {
@@ -1 +1 @@
1
- import{_ as Q}from"./NIconTitle.vue.7b846ffe.js";import{_ as X}from"./NSwitch.vue.ff927669.js";import{d as Y,as as Z,bJ as ee,aB as le,ax as L,m,i as n,k as e,F as v,n as N,f as t,j as a,K as oe,_ as ne,am as te,o as r,h as j,t as y,G as A,p as P,v as U,l as c,C as D,B as ae,bD as se,bK as ie}from"./entry.909ad6c7.js";import{_ as ue}from"./NSelect.vue.04805728.js";import{_ as de}from"./NCheckbox.vue.b56304c9.js";import{_ as re}from"./NLink.vue.9859bf11.js";const ce={px8:"",py6:""},pe={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},me={flex:"~ col gap-2"},_e=e("h3",{"text-lg":""}," Tabs ",-1),fe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},ve={capitalize:"",op75:""},ge=e("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),he=e("div",{"flex-auto":""},null,-1),xe={flex:"~ col gap-2"},be=e("h3",{"text-lg":""}," Appearance ",-1),ye=e("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1),ke=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Ve=e("p",null,"UI Scale",-1),Ce=["value"],we=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Te=e("span",null," Expand Sidebar ",-1),Se=e("span",null," Scrollable Sidebar ",-1),Ne=e("h3",{mt2:"","text-lg":""}," Features ",-1),Ue=e("span",null,"Close DevTools when clicking outside",-1),Oe=e("span",null,"Show help buttons",-1),$e=e("span",null,"Always show the floating panel",-1),Ie=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Be=e("p",null,"Minimize floating panel on inactive",-1),De=["value"],ze=e("h3",{mt2:"","text-lg":""}," Feedback ",-1),Ee=e("span",null,"Send anonymous statistics, help us improving DevTools",-1),Le=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),je={flex:"~ gap-2"},Ae=e("div",{"i-carbon-data-enrichment":""},null,-1),Pe=e("div",{"i-carbon-debug":""},null,-1),Fe=e("h3",{mt2:"","text-lg":""}," Debug ",-1),Me={flex:"~ gap-2"},Re=e("div",{"i-carbon-breaking-change":""},null,-1),Xe=Y({__name:"settings",setup(He){const{interactionCloseOnOutsideClick:k,showPanel:O,showHelpButtons:$,scale:I,hiddenTabs:g,pinnedTabs:u,hiddenTabCategories:h,minimizePanelInactive:V,sidebarExpanded:C,sidebarScrollable:B}=ae(),x=Z(),F=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],M=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],R=ee(le());function H(s,o){o?g.value=g.value.filter(d=>d!==s):g.value.push(s)}function K(s,o){o?h.value=h.value.filter(d=>d!==s):h.value.push(s)}function G(s){u.value.includes(s)?u.value=u.value.filter(o=>o!==s):u.value.push(s)}function z(s,o){const d=u.value.indexOf(s);if(d===-1)return;const _=d+o;if(_<0||_>=u.value.length)return;const b=[...u.value];b.splice(d,1),b.splice(_,0,s),u.value=b}async function J(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await oe.clearOptions(),x.value?.app?.reload?.(),window.location.reload())}return L(()=>{x.value&&(x.value.app.frameState.value.closeOnOutsideClick=k.value)}),L(()=>{x.value&&(x.value.app.frameState.value.minimizePanelInactive=V.value)}),(s,o)=>{const d=Q,_=X,b=se,p=ne,w=te,W=ie,E=ue,f=de,q=re;return r(),m("div",ce,[n(d,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",pe,[e("div",me,[_e,(r(!0),m(v,null,N(t(R),([l,T])=>(r(),m(v,{key:l},[T.length?(r(),j(w,{key:0,p3:"",flex:"~ col gap-1",class:A(t(h).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(_,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(h).includes(l),"onUpdate:modelValue":i=>K(l,i)},{default:a(()=>[e("div",fe,[e("span",ve,y(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),ge,(r(!0),m(v,null,N(T,i=>(r(),j(_,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(g).includes(i.name),"onUpdate:modelValue":S=>H(i.name,S)},{default:a(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:A(t(g).includes(i.name)?"op25":"")},[n(b,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),e("span",null,y(i.title),1),he,t(u).includes(i.name)?(r(),m(v,{key:0},[n(p,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:S=>z(i.name,-1)},null,8,["disabled","onClick"]),n(p,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:S=>z(i.name,1)},null,8,["disabled","onClick"])],64)):P("",!0),n(p,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:S=>G(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):P("",!0)],64))),128))]),e("div",xe,[be,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[e("div",null,[n(W,null,{default:a(({toggle:l,isDark:T})=>[n(p,{n:"primary",onClick:l},{default:a(()=>[ye,U(" "+y(T.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),ke,Ve,n(E,{modelValue:t(I),"onUpdate:modelValue":o[0]||(o[0]=l=>c(I)?I.value=l:null),n:"primary"},{default:a(()=>[(r(),m(v,null,N(F,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,Ce)),64))]),_:1},8,["modelValue"]),we,n(f,{modelValue:t(C),"onUpdate:modelValue":o[1]||(o[1]=l=>c(C)?C.value=l:null),"n-primary":""},{default:a(()=>[Te]),_:1},8,["modelValue"]),n(f,{modelValue:t(B),"onUpdate:modelValue":o[2]||(o[2]=l=>c(B)?B.value=l:null),disabled:t(C),"n-primary":""},{default:a(()=>[Se]),_:1},8,["modelValue","disabled"])]),_:1}),Ne,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(k),"onUpdate:modelValue":o[3]||(o[3]=l=>c(k)?k.value=l:null),"n-primary":""},{default:a(()=>[Ue]),_:1},8,["modelValue"]),n(f,{modelValue:t($),"onUpdate:modelValue":o[4]||(o[4]=l=>c($)?$.value=l:null),"n-primary":""},{default:a(()=>[Oe]),_:1},8,["modelValue"]),n(f,{modelValue:t(O),"onUpdate:modelValue":o[5]||(o[5]=l=>c(O)?O.value=l:null),"n-primary":""},{default:a(()=>[$e]),_:1},8,["modelValue"]),Ie,Be,n(E,{modelValue:t(V),"onUpdate:modelValue":o[6]||(o[6]=l=>c(V)?V.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(r(),m(v,null,N(M,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,De)),64))]),_:1},8,["modelValue"])]),_:1}),ze,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(D),"onUpdate:modelValue":o[7]||(o[7]=l=>c(D)?D.value=l:null),"n-primary":""},{default:a(()=>[Ee,n(q,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),Le,e("div",je,[n(p,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>[Ae,U(" Ideas & Suggestions ")]),_:1}),n(p,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>[Pe,U(" Bug Reports ")]),_:1})])]),_:1}),Fe,e("div",Me,[n(p,{n:"orange",onClick:J},{default:a(()=>[Re,U(" Reset Local Settings & State ")]),_:1})])])])])}}});export{Xe as default};
1
+ import{_ as Q}from"./NIconTitle.vue.eb974cf8.js";import{_ as X}from"./NSwitch.vue.1b79756d.js";import{d as Y,as as Z,bJ as ee,aB as le,ax as L,m,i as n,k as e,F as v,n as N,f as t,j as a,K as oe,_ as ne,am as te,o as r,h as j,t as y,G as A,p as P,v as U,l as c,C as D,B as ae,bD as se,bK as ie}from"./entry.12ac938b.js";import{_ as ue}from"./NSelect.vue.08628a3f.js";import{_ as de}from"./NCheckbox.vue.5a0973a7.js";import{_ as re}from"./NLink.vue.31c2cbc4.js";const ce={px8:"",py6:""},pe={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},me={flex:"~ col gap-2"},_e=e("h3",{"text-lg":""}," Tabs ",-1),fe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},ve={capitalize:"",op75:""},ge=e("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),he=e("div",{"flex-auto":""},null,-1),xe={flex:"~ col gap-2"},be=e("h3",{"text-lg":""}," Appearance ",-1),ye=e("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1),ke=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Ve=e("p",null,"UI Scale",-1),Ce=["value"],we=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Te=e("span",null," Expand Sidebar ",-1),Se=e("span",null," Scrollable Sidebar ",-1),Ne=e("h3",{mt2:"","text-lg":""}," Features ",-1),Ue=e("span",null,"Close DevTools when clicking outside",-1),Oe=e("span",null,"Show help buttons",-1),$e=e("span",null,"Always show the floating panel",-1),Ie=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Be=e("p",null,"Minimize floating panel on inactive",-1),De=["value"],ze=e("h3",{mt2:"","text-lg":""}," Feedback ",-1),Ee=e("span",null,"Send anonymous statistics, help us improving DevTools",-1),Le=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),je={flex:"~ gap-2"},Ae=e("div",{"i-carbon-data-enrichment":""},null,-1),Pe=e("div",{"i-carbon-debug":""},null,-1),Fe=e("h3",{mt2:"","text-lg":""}," Debug ",-1),Me={flex:"~ gap-2"},Re=e("div",{"i-carbon-breaking-change":""},null,-1),Xe=Y({__name:"settings",setup(He){const{interactionCloseOnOutsideClick:k,showPanel:O,showHelpButtons:$,scale:I,hiddenTabs:g,pinnedTabs:u,hiddenTabCategories:h,minimizePanelInactive:V,sidebarExpanded:C,sidebarScrollable:B}=ae(),x=Z(),F=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],M=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],R=ee(le());function H(s,o){o?g.value=g.value.filter(d=>d!==s):g.value.push(s)}function K(s,o){o?h.value=h.value.filter(d=>d!==s):h.value.push(s)}function G(s){u.value.includes(s)?u.value=u.value.filter(o=>o!==s):u.value.push(s)}function z(s,o){const d=u.value.indexOf(s);if(d===-1)return;const _=d+o;if(_<0||_>=u.value.length)return;const b=[...u.value];b.splice(d,1),b.splice(_,0,s),u.value=b}async function J(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await oe.clearOptions(),x.value?.app?.reload?.(),window.location.reload())}return L(()=>{x.value&&(x.value.app.frameState.value.closeOnOutsideClick=k.value)}),L(()=>{x.value&&(x.value.app.frameState.value.minimizePanelInactive=V.value)}),(s,o)=>{const d=Q,_=X,b=se,p=ne,w=te,W=ie,E=ue,f=de,q=re;return r(),m("div",ce,[n(d,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",pe,[e("div",me,[_e,(r(!0),m(v,null,N(t(R),([l,T])=>(r(),m(v,{key:l},[T.length?(r(),j(w,{key:0,p3:"",flex:"~ col gap-1",class:A(t(h).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(_,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(h).includes(l),"onUpdate:modelValue":i=>K(l,i)},{default:a(()=>[e("div",fe,[e("span",ve,y(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),ge,(r(!0),m(v,null,N(T,i=>(r(),j(_,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(g).includes(i.name),"onUpdate:modelValue":S=>H(i.name,S)},{default:a(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:A(t(g).includes(i.name)?"op25":"")},[n(b,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),e("span",null,y(i.title),1),he,t(u).includes(i.name)?(r(),m(v,{key:0},[n(p,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:S=>z(i.name,-1)},null,8,["disabled","onClick"]),n(p,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:S=>z(i.name,1)},null,8,["disabled","onClick"])],64)):P("",!0),n(p,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:S=>G(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):P("",!0)],64))),128))]),e("div",xe,[be,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[e("div",null,[n(W,null,{default:a(({toggle:l,isDark:T})=>[n(p,{n:"primary",onClick:l},{default:a(()=>[ye,U(" "+y(T.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),ke,Ve,n(E,{modelValue:t(I),"onUpdate:modelValue":o[0]||(o[0]=l=>c(I)?I.value=l:null),n:"primary"},{default:a(()=>[(r(),m(v,null,N(F,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,Ce)),64))]),_:1},8,["modelValue"]),we,n(f,{modelValue:t(C),"onUpdate:modelValue":o[1]||(o[1]=l=>c(C)?C.value=l:null),"n-primary":""},{default:a(()=>[Te]),_:1},8,["modelValue"]),n(f,{modelValue:t(B),"onUpdate:modelValue":o[2]||(o[2]=l=>c(B)?B.value=l:null),disabled:t(C),"n-primary":""},{default:a(()=>[Se]),_:1},8,["modelValue","disabled"])]),_:1}),Ne,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(k),"onUpdate:modelValue":o[3]||(o[3]=l=>c(k)?k.value=l:null),"n-primary":""},{default:a(()=>[Ue]),_:1},8,["modelValue"]),n(f,{modelValue:t($),"onUpdate:modelValue":o[4]||(o[4]=l=>c($)?$.value=l:null),"n-primary":""},{default:a(()=>[Oe]),_:1},8,["modelValue"]),n(f,{modelValue:t(O),"onUpdate:modelValue":o[5]||(o[5]=l=>c(O)?O.value=l:null),"n-primary":""},{default:a(()=>[$e]),_:1},8,["modelValue"]),Ie,Be,n(E,{modelValue:t(V),"onUpdate:modelValue":o[6]||(o[6]=l=>c(V)?V.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(r(),m(v,null,N(M,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,De)),64))]),_:1},8,["modelValue"])]),_:1}),ze,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(D),"onUpdate:modelValue":o[7]||(o[7]=l=>c(D)?D.value=l:null),"n-primary":""},{default:a(()=>[Ee,n(q,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),Le,e("div",je,[n(p,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>[Ae,U(" Ideas & Suggestions ")]),_:1}),n(p,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>[Pe,U(" Bug Reports ")]),_:1})])]),_:1}),Fe,e("div",Me,[n(p,{n:"orange",onClick:J},{default:a(()=>[Re,U(" Reset Local Settings & State ")]),_:1})])])])])}}});export{Xe as default};
@@ -1 +1 @@
1
- import{as as m,b8 as n,a as s,K as o}from"./entry.909ad6c7.js";function u(){const p=m(),t=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(t.value||[]).find(a=>a.pascalName===e.pascalName)));return s(()=>[...l.value,...t.value||[]].sort((e,a)=>e.pascalName.localeCompare(a.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{r as a,u};
1
+ import{as as m,b8 as n,a as s,K as o}from"./entry.12ac938b.js";function u(){const p=m(),t=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(t.value||[]).find(a=>a.pascalName===e.pascalName)));return s(()=>[...l.value,...t.value||[]].sort((e,a)=>e.pascalName.localeCompare(a.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{r as a,u};
@@ -1 +1 @@
1
- import{_ as F}from"./NBadge.ff27dca2.js";import{_ as L}from"./NCodeBlock.vue.9ce69690.js";import{_ as q}from"./NCheckbox.vue.b56304c9.js";import{_ as A}from"./NTip.vue.c98a31a2.js";import{d as E,O as G,b9 as O,r as V,ba as Q,M as W,Q as X,o as m,m as g,a8 as z,f as a,t as $,p as w,F as M,i as s,h as H,j as u,k as h,l as B,v as p,U as J,_ as K,X as Y,bb as Z,aa as ee,a as te,ap as ae,aq as ne,bc as se,b8 as oe}from"./entry.909ad6c7.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}=O(t.packageName,t.options),f=V(!0),_=V(!0),D=Q(),b=W(),R=X();async function N(){const r=await i(async o=>b.start(o));J("npm:update",{packageName:t.packageName,oldVersion:n.value?.current}),r&&_.value&&D.value.push({id:r,message:`${t.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&f.value&&(R.value=r,e.push("/modules/terminals"))}return(r,o)=>{const C=F,S=L,x=q,T=A,P=K,I=Y;return m(),g(M,null,[z(r.$slots,"default",{id:a(k),info:a(n),update:N,state:a(y),restart:a(d)},()=>[a(n)&&r.showVersion?(m(),g("code",le,$(`v${a(n).current}`),1)):w("",!0),a(n)?.latest?(m(),g(M,{key:1},[a(n).needsUpdate?(m(),g("button",{key:0,onClick:o[0]||(o[0]=v=>N())},[s(C,{n:"green",title:"updates available",textContent:"updates available"})])):(m(),H(C,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(a(b),null,{default:u(({resolve:v,args:j})=>[s(I,{"model-value":!0,onClose:c=>v(!1)},{default:u(()=>[h("div",re,[h("h3",ue," Update "+$(t.packageName)+"? ",1),ie,s(S,{code:j[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(x,{modelValue:a(f),"onUpdate:modelValue":o[1]||(o[1]=c=>B(f)?f.value=c:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(x,{modelValue:a(_),"onUpdate:modelValue":o[2]||(o[2]=c=>B(_)?_.value=c:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",ce,[s(T,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>[p(" Please make sure to backup your project first. ")]),_:1}),s(P,{onClick:c=>v(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:c=>v(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),U=["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=>!U.includes(t.npm)&&t.compatibility.nuxt.includes("^3")))}function he(){return Z("installed-modules",()=>{const l=ee(),t=de();return te(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=e.entryPath&&ae(e.entryPath),i=e.meta?.name?e.meta?.name:e.entryPath?n?ne(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=l.value?.modules?.includes(i),k=t.value?.find(d=>d.npm===i)||t.value?.find(d=>d.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!U.includes(e.name))))})}export{ge as _,de as a,he as u};
1
+ import{_ as F}from"./NBadge.83bd8b90.js";import{_ as L}from"./NCodeBlock.vue.2de294a4.js";import{_ as q}from"./NCheckbox.vue.5a0973a7.js";import{_ as A}from"./NTip.vue.1a1ff991.js";import{d as E,O as G,b9 as O,r as V,ba as Q,M as W,Q as X,o as m,m as g,a8 as z,f as a,t as $,p as w,F as M,i as s,h as H,j as u,k as h,l as B,v as p,U as J,_ as K,X as Y,bb as Z,aa as ee,a as te,ap as ae,aq as ne,bc as se,b8 as oe}from"./entry.12ac938b.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}=O(t.packageName,t.options),f=V(!0),_=V(!0),D=Q(),b=W(),R=X();async function N(){const r=await i(async o=>b.start(o));J("npm:update",{packageName:t.packageName,oldVersion:n.value?.current}),r&&_.value&&D.value.push({id:r,message:`${t.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&f.value&&(R.value=r,e.push("/modules/terminals"))}return(r,o)=>{const C=F,S=L,x=q,T=A,P=K,I=Y;return m(),g(M,null,[z(r.$slots,"default",{id:a(k),info:a(n),update:N,state:a(y),restart:a(d)},()=>[a(n)&&r.showVersion?(m(),g("code",le,$(`v${a(n).current}`),1)):w("",!0),a(n)?.latest?(m(),g(M,{key:1},[a(n).needsUpdate?(m(),g("button",{key:0,onClick:o[0]||(o[0]=v=>N())},[s(C,{n:"green",title:"updates available",textContent:"updates available"})])):(m(),H(C,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(a(b),null,{default:u(({resolve:v,args:j})=>[s(I,{"model-value":!0,onClose:c=>v(!1)},{default:u(()=>[h("div",re,[h("h3",ue," Update "+$(t.packageName)+"? ",1),ie,s(S,{code:j[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(x,{modelValue:a(f),"onUpdate:modelValue":o[1]||(o[1]=c=>B(f)?f.value=c:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(x,{modelValue:a(_),"onUpdate:modelValue":o[2]||(o[2]=c=>B(_)?_.value=c:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",ce,[s(T,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>[p(" Please make sure to backup your project first. ")]),_:1}),s(P,{onClick:c=>v(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:c=>v(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),U=["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=>!U.includes(t.npm)&&t.compatibility.nuxt.includes("^3")))}function he(){return Z("installed-modules",()=>{const l=ee(),t=de();return te(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=e.entryPath&&ae(e.entryPath),i=e.meta?.name?e.meta?.name:e.entryPath?n?ne(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=l.value?.modules?.includes(i),k=t.value?.find(d=>d.npm===i)||t.value?.find(d=>d.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!U.includes(e.name))))})}export{ge as _,de as a,he as u};
@@ -1 +1 @@
1
- import{_ as B}from"./NCodeBlock.vue.9ce69690.js";import{d as N,bt as R,e as $,a as D,ax as T,o as n,m as a,k as c,F as f,n as V,G as m,f as t,t as E,i as _,j as v,v as b,h as F,p as l,_ as L,r as y,K as p,bu as k,bv as g}from"./entry.909ad6c7.js";const W={key:0,relative:"","n-code-block":""},j={flex:"~ wrap","w-full":""},z=["onClick"],G=c("div",{border:"b base","flex-auto":""},null,-1),K={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},P=N({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(s){const r=s,e=R(r.codeSnippets[0]),x=$(),w=D(()=>e.value?.lang||"text");return T(()=>{r.codeSnippets.includes(e.value)||(e.value=r.codeSnippets[0])}),(i,d)=>{const S=B,u=L;return i.codeSnippets.length?(n(),a("div",W,[c("div",j,[(n(!0),a(f,null,V(i.codeSnippets,(o,O)=>(n(),a("button",{key:O,px4:"",py2:"",border:"r base",hover:"bg-active",class:m(o===t(e)?"":"border-b"),onClick:I=>e.value=o},[c("div",{class:m(o===t(e)?"":"op30"),"font-mono":""},E(o.name),3)],10,z))),128)),G]),t(e)?(n(),a(f,{key:0},[_(S,{code:t(e).code,lang:t(w),lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),c("div",K,[_(u,{icon:"carbon-copy",onClick:d[0]||(d[0]=o=>t(x)(t(e).code,i.eventType||`code-snippet-${t(e).name}`))},{default:v(()=>[b(" Copy ")]),_:1}),t(e)?.docs?(n(),F(u,{key:0,to:t(e).docs,target:"_blank",icon:"carbon-catalog"},{default:v(()=>[b(" Docs ")]),_:1},8,["to"])):l("",!0)])],64)):l("",!0)])):l("",!0)}}}),h=y(await p.getOptions("assets")),q=k(h);g(h,async s=>{p.updateOptions("assets",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const C=y(await p.getOptions("serverRoutes")),A=k(C);g(C,async s=>{p.updateOptions("serverRoutes",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const H={serverRoutes:A,assets:q};function Q(s){return H[s]}export{P as _,Q as u};
1
+ import{_ as B}from"./NCodeBlock.vue.2de294a4.js";import{d as N,bt as R,e as $,a as D,ax as T,o as n,m as a,k as c,F as f,n as V,G as m,f as t,t as E,i as _,j as v,v as b,h as F,p as l,_ as L,r as y,K as p,bu as k,bv as g}from"./entry.12ac938b.js";const W={key:0,relative:"","n-code-block":""},j={flex:"~ wrap","w-full":""},z=["onClick"],G=c("div",{border:"b base","flex-auto":""},null,-1),K={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},P=N({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(s){const r=s,e=R(r.codeSnippets[0]),x=$(),w=D(()=>e.value?.lang||"text");return T(()=>{r.codeSnippets.includes(e.value)||(e.value=r.codeSnippets[0])}),(i,d)=>{const S=B,u=L;return i.codeSnippets.length?(n(),a("div",W,[c("div",j,[(n(!0),a(f,null,V(i.codeSnippets,(o,O)=>(n(),a("button",{key:O,px4:"",py2:"",border:"r base",hover:"bg-active",class:m(o===t(e)?"":"border-b"),onClick:I=>e.value=o},[c("div",{class:m(o===t(e)?"":"op30"),"font-mono":""},E(o.name),3)],10,z))),128)),G]),t(e)?(n(),a(f,{key:0},[_(S,{code:t(e).code,lang:t(w),lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),c("div",K,[_(u,{icon:"carbon-copy",onClick:d[0]||(d[0]=o=>t(x)(t(e).code,i.eventType||`code-snippet-${t(e).name}`))},{default:v(()=>[b(" Copy ")]),_:1}),t(e)?.docs?(n(),F(u,{key:0,to:t(e).docs,target:"_blank",icon:"carbon-catalog"},{default:v(()=>[b(" Docs ")]),_:1},8,["to"])):l("",!0)])],64)):l("",!0)])):l("",!0)}}}),h=y(await p.getOptions("assets")),q=k(h);g(h,async s=>{p.updateOptions("assets",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const C=y(await p.getOptions("serverRoutes")),A=k(C);g(C,async s=>{p.updateOptions("serverRoutes",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const H={serverRoutes:A,assets:q};function Q(s){return H[s]}export{P as _,Q as u};
@@ -1 +1 @@
1
- import{d as G,O as ne,r as U,P as E,bw as T,ay as ae,w as oe,ax as se,Z as le,a as re,K as f,L as k,f as t,o as l,h as m,j as u,k as r,i as c,l as D,m as i,F as w,n as A,t as b,G as F,ac as L,v as d,p as R,ar as ue,I as ie,bd as de,ad as ce,bx as pe,by as z,_ as me,W as _e,a4 as fe,am as ve,A as ye,S as ge,aE as he}from"./entry.909ad6c7.js";import{_ as ke}from"./NSelect.vue.04805728.js";import{_ as be}from"./NLink.vue.9859bf11.js";import{_ as xe}from"./FilepathItem.vue.a1b71b8d.js";import{U as we}from"./json-editor-vue.8a771ed0.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ke={class:"w-full text-sm"},Se=["value"],Ve=["onClick"],$e=r("div",{"x-divider":""},null,-1),Ne={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ie={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},je={class:"flex items-center gap-4"},Ue={key:1},De=["onKeyup"],Ae=r("br",null,null,-1),Le={key:0,op50:""},Me={key:1},Be=r("code",null,"nitro.storage",-1),Pe=r("br",null,null,-1),qe={"font-bold":""},Ee=r("br",null,null,-1),Te={"text-sm":""},Fe=r("br",null,null,-1),Re=G({__name:"StorageDetails",async setup(O){let p,g;const C=pe(),h=ne(),x=U(""),v=U(""),s=E("storage:current",""),e=U(),y=E("storage:file:state",""),{data:K}=([p,g]=T(()=>z("storageMounts",()=>f.getStorageMounts())),p=await p,g(),p),{data:S,refresh:M}=([p,g]=T(async()=>z("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),p=await p,g(),p),W=C.hook("storage:key:update",async(n,a)=>{if(!(!s.value||n.split(":")[0]!==s.value)&&(await M(),y.value===n)){if(a==="remove")return h.replace({query:{storage:s.value}});await $(y.value)}});ae(W),oe(s,()=>{M(),y.value=""}),se(async()=>{if(!y.value){e.value=null;return}$(y.value)}),le("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(N(),n.preventDefault())});function V(n){return n.replace(`${s.value}:`,"")}const Z=re(()=>S.value?S.value.filter(n=>n.includes(x.value)):[]);async function $(n){const a=await f.getStorageItem(await k(),n);e.value={key:n,updatedKey:V(n),editingKey:!1,content:a,updatedContent:a}}async function H(){if(!v.value||!s.value)return;const n=`${s.value}:${v.value}`;S.value?.includes(n)||await f.setStorageItem(await k(),n,""),h.replace({query:{storage:s.value,key:n}}),v.value=""}async function N(){e.value&&(await f.setStorageItem(await k(),e.value.key,e.value.updatedContent),await $(e.value.key))}async function J(){!e.value||!s.value||(await f.removeStorageItem(await k(),e.value.key),e.value=null)}async function Q(){if(!e.value||!s.value)return;const n=`${s.value}:${e.value.updatedKey}`,a=await k();await f.setStorageItem(a,n,e.value.updatedContent),await f.removeStorageItem(a,e.value.key),h.replace({query:{storage:s.value,key:n}})}return(n,a)=>{const I=me,X=ke,j=_e,Y=fe,B=be,P=ve,q=ye,ee=ge,te=xe;return t(s)?(l(),m(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[r("div",Ce,[c(I,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:a[0]||(a[0]=o=>s.value="")}),r("div",Ke,[c(X,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=o=>D(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(l(!0),i(w,null,A(t(K),(o,_)=>(l(),i("option",{key:_,value:_},b(_),9,Se))),128))]),_:1},8,["modelValue"])])]),c(j,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>D(x)?x.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(l(!0),i(w,null,A(t(Z),o=>(l(),i(w,{key:o},[r("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:F(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:_=>y.value=o},b(V(o)),11,Ve),$e],64))),128)),c(j,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>D(v)?v.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:L(H,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[t(e)?.key?(l(),i("div",Ne,[r("div",Ie,[r("div",je,[t(e).editingKey?(l(),m(j,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":a[4]||(a[4]=o=>t(e).updatedKey=o),onKeyup:L(Q,["enter"])},null,8,["modelValue","onKeyup"])):(l(),i("code",Ue,[d(b(V(t(e).key))+" ",1),c(Y,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:a[5]||(a[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?R("",!0):(l(),m(I,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:F({"border-green":t(e).content!==t(e).updatedContent}),onClick:N},{default:u(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),r("div",null,[c(I,{n:"red xs",onClick:J},{default:u(()=>[d(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(l(),m(t(we),ue({key:0,modelValue:t(e).updatedContent,"onUpdate:modelValue":a[6]||(a[6]=o=>t(e).updatedContent=o),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):ie((l(),i("textarea",{key:1,"onUpdate:modelValue":a[7]||(a[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:L(de(N,["ctrl"]),["enter"])},null,40,De)),[[ce,t(e).updatedContent]])])):(l(),m(q,{key:1},{default:u(()=>[c(P,{px6:"",py4:""},{default:u(()=>[d(" Select one key to start."),Ae,d("Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(l(),m(q,{key:1},{default:u(()=>[Object.keys(t(K)).length?(l(),i("p",Le," Select one storage to start: ")):(l(),i("p",Me,[d(" No custom storage defined in "),Be,d("."),Pe,d(" Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})])),(l(!0),i(w,null,A(t(K),(o,_)=>(l(),m(P,{key:_,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:ze=>s.value=_},{default:u(()=>[r("span",qe,b(_),1),Ee,r("span",Te,b(o.driver)+" driver",1),Fe,o.base?(l(),m(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):R("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),Je=G({__name:"storage",setup(O){return(p,g)=>{const C=Re,h=he;return l(),m(h,null,{default:u(()=>[c(C)]),_:1})}}});export{Je as default};
1
+ import{d as G,O as ne,r as U,P as E,bw as T,ay as ae,w as oe,ax as se,Z as le,a as re,K as f,L as k,f as t,o as l,h as m,j as u,k as r,i as c,l as D,m as i,F as w,n as A,t as b,G as F,ac as L,v as d,p as R,ar as ue,I as ie,bd as de,ad as ce,bx as pe,by as z,_ as me,W as _e,a4 as fe,am as ve,A as ye,S as ge,aE as he}from"./entry.12ac938b.js";import{_ as ke}from"./NSelect.vue.08628a3f.js";import{_ as be}from"./NLink.vue.31c2cbc4.js";import{_ as xe}from"./FilepathItem.vue.7fdda51b.js";import{U as we}from"./json-editor-vue.cf7b17c9.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ke={class:"w-full text-sm"},Se=["value"],Ve=["onClick"],$e=r("div",{"x-divider":""},null,-1),Ne={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ie={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},je={class:"flex items-center gap-4"},Ue={key:1},De=["onKeyup"],Ae=r("br",null,null,-1),Le={key:0,op50:""},Me={key:1},Be=r("code",null,"nitro.storage",-1),Pe=r("br",null,null,-1),qe={"font-bold":""},Ee=r("br",null,null,-1),Te={"text-sm":""},Fe=r("br",null,null,-1),Re=G({__name:"StorageDetails",async setup(O){let p,g;const C=pe(),h=ne(),x=U(""),v=U(""),s=E("storage:current",""),e=U(),y=E("storage:file:state",""),{data:K}=([p,g]=T(()=>z("storageMounts",()=>f.getStorageMounts())),p=await p,g(),p),{data:S,refresh:M}=([p,g]=T(async()=>z("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),p=await p,g(),p),W=C.hook("storage:key:update",async(n,a)=>{if(!(!s.value||n.split(":")[0]!==s.value)&&(await M(),y.value===n)){if(a==="remove")return h.replace({query:{storage:s.value}});await $(y.value)}});ae(W),oe(s,()=>{M(),y.value=""}),se(async()=>{if(!y.value){e.value=null;return}$(y.value)}),le("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(N(),n.preventDefault())});function V(n){return n.replace(`${s.value}:`,"")}const Z=re(()=>S.value?S.value.filter(n=>n.includes(x.value)):[]);async function $(n){const a=await f.getStorageItem(await k(),n);e.value={key:n,updatedKey:V(n),editingKey:!1,content:a,updatedContent:a}}async function H(){if(!v.value||!s.value)return;const n=`${s.value}:${v.value}`;S.value?.includes(n)||await f.setStorageItem(await k(),n,""),h.replace({query:{storage:s.value,key:n}}),v.value=""}async function N(){e.value&&(await f.setStorageItem(await k(),e.value.key,e.value.updatedContent),await $(e.value.key))}async function J(){!e.value||!s.value||(await f.removeStorageItem(await k(),e.value.key),e.value=null)}async function Q(){if(!e.value||!s.value)return;const n=`${s.value}:${e.value.updatedKey}`,a=await k();await f.setStorageItem(a,n,e.value.updatedContent),await f.removeStorageItem(a,e.value.key),h.replace({query:{storage:s.value,key:n}})}return(n,a)=>{const I=me,X=ke,j=_e,Y=fe,B=be,P=ve,q=ye,ee=ge,te=xe;return t(s)?(l(),m(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[r("div",Ce,[c(I,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:a[0]||(a[0]=o=>s.value="")}),r("div",Ke,[c(X,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=o=>D(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(l(!0),i(w,null,A(t(K),(o,_)=>(l(),i("option",{key:_,value:_},b(_),9,Se))),128))]),_:1},8,["modelValue"])])]),c(j,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>D(x)?x.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(l(!0),i(w,null,A(t(Z),o=>(l(),i(w,{key:o},[r("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:F(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:_=>y.value=o},b(V(o)),11,Ve),$e],64))),128)),c(j,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>D(v)?v.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:L(H,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[t(e)?.key?(l(),i("div",Ne,[r("div",Ie,[r("div",je,[t(e).editingKey?(l(),m(j,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":a[4]||(a[4]=o=>t(e).updatedKey=o),onKeyup:L(Q,["enter"])},null,8,["modelValue","onKeyup"])):(l(),i("code",Ue,[d(b(V(t(e).key))+" ",1),c(Y,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:a[5]||(a[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?R("",!0):(l(),m(I,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:F({"border-green":t(e).content!==t(e).updatedContent}),onClick:N},{default:u(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),r("div",null,[c(I,{n:"red xs",onClick:J},{default:u(()=>[d(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(l(),m(t(we),ue({key:0,modelValue:t(e).updatedContent,"onUpdate:modelValue":a[6]||(a[6]=o=>t(e).updatedContent=o),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):ie((l(),i("textarea",{key:1,"onUpdate:modelValue":a[7]||(a[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:L(de(N,["ctrl"]),["enter"])},null,40,De)),[[ce,t(e).updatedContent]])])):(l(),m(q,{key:1},{default:u(()=>[c(P,{px6:"",py4:""},{default:u(()=>[d(" Select one key to start."),Ae,d("Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(l(),m(q,{key:1},{default:u(()=>[Object.keys(t(K)).length?(l(),i("p",Le," Select one storage to start: ")):(l(),i("p",Me,[d(" No custom storage defined in "),Be,d("."),Pe,d(" Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})])),(l(!0),i(w,null,A(t(K),(o,_)=>(l(),m(P,{key:_,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:ze=>s.value=_},{default:u(()=>[r("span",qe,b(_),1),Ee,r("span",Te,b(o.driver)+" driver",1),Fe,o.base?(l(),m(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):R("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),Je=G({__name:"storage",setup(O){return(p,g)=>{const C=Re,h=he;return l(),m(h,null,{default:u(()=>[c(C)]),_:1})}}});export{Je as default};
@@ -1,4 +1,4 @@
1
- import{d as Ee,r as ke,al as Pe,Z as Ie,K as fe,L as ve,o as ee,m as he,k as oe,i as Re,f as te,h as ce,p as me,t as ge,F as xe,bx as He,_ as Ae,bz as Fe,Q as We,a as Ue,ax as Ne,n as $e,G as Le,bd as je,v as De,a4 as ze,j as Ke,aE as qe}from"./entry.909ad6c7.js";var Be={exports:{}};(function(ne,Y){(function(J,G){ne.exports=G()})(self,()=>(()=>{var J={4567:function(P,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,p=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(a,l,p):m(a,l))||p);return h>3&&p&&Object.defineProperty(a,l,p),p},u=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),f=o(9924),g=o(844),_=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,a){super(),this._terminal=i,this._renderService=a,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);if(this._topBoundaryFocusListener=l=>this._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,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=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.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(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
1
+ import{d as Ee,r as ke,al as Pe,Z as Ie,K as fe,L as ve,o as ee,m as he,k as oe,i as Re,f as te,h as ce,p as me,t as ge,F as xe,bx as He,_ as Ae,bz as Fe,Q as We,a as Ue,ax as Ne,n as $e,G as Le,bd as je,v as De,a4 as ze,j as Ke,aE as qe}from"./entry.12ac938b.js";var Be={exports:{}};(function(ne,Y){(function(J,G){ne.exports=G()})(self,()=>(()=>{var J={4567:function(P,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,p=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(a,l,p):m(a,l))||p);return h>3&&p&&Object.defineProperty(a,l,p),p},u=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),f=o(9924),g=o(844),_=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,a){super(),this._terminal=i,this._renderService=a,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);if(this._topBoundaryFocusListener=l=>this._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,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=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.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(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
2
2
  `))),this.register(this._terminal.onA11yTab(l=>this._handleTab(l))),this.register(this._terminal.onKey(l=>this._handleKey(l.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new _.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,s.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let a=0;a<i;a++)this._handleChar(" ")}_handleChar(i){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===`
3
3
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),/\p{Control}/u.test(i)||this._charsToConsume.push(i)}_refreshRows(i,a){this._liveRegionDebouncer.refresh(i,a,this._terminal.rows)}_renderRows(i,a){const l=this._terminal.buffer,v=l.lines.length.toString();for(let m=i;m<=a;m++){const h=l.translateBufferLineToString(l.ydisp+m,!0),p=(l.ydisp+m+1).toString(),b=this._rowElements[m];b&&(h.length===0?b.innerText=" ":b.textContent=h,b.setAttribute("aria-posinset",p),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,a){const l=i.target,v=this._rowElements[a===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")===(a===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==v)return;let m,h;if(a===0?(m=l,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(m=this._rowElements.shift(),h=l,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let a=this._rowContainer.children.length;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);for(;this._rowElements.length>i;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_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 i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}}_refreshRowDimensions(i){i.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=t=c([u(1,e.IRenderService)],t)},3614:(P,r)=>{function o(d){return d.replace(/\r?\n/g,"\r")}function c(d,f){return f?"\x1B[200~"+d+"\x1B[201~":d}function u(d,f,g,_){d=c(d=o(d),g.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),f.value=""}function n(d,f,g){const _=g.getBoundingClientRect(),e=d.clientX-_.left-10,s=d.clientY-_.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${s}px`,f.style.zIndex="1000",f.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=c,r.copyHandler=function(d,f){d.clipboardData&&d.clipboardData.setData("text/plain",f.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,f,g,_){d.stopPropagation(),d.clipboardData&&u(d.clipboardData.getData("text/plain"),f,g,_)},r.paste=u,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,f,g,_,e){n(d,f,g),e&&_.rightClickSelect(d),f.value=_.selectionText,f.select()}},7239:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const c=o(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(u,n,d){this._css.set(u,n,d)}getCss(u,n){return this._css.get(u,n)}setColor(u,n,d){this._color.set(u,n,d)}getColor(u,n){return this._color.get(u,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,c,u,n){o.addEventListener(c,u,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(c,u,n))}}}},6465:function(P,r,o){var c=this&&this.__decorate||function(e,s,t,i){var a,l=arguments.length,v=l<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(a=e[m])&&(v=(l<3?a(v):l>3?a(s,t,v):a(s,t))||v);return l>3&&v&&Object.defineProperty(s,t,v),v},u=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier2=void 0;const n=o(3656),d=o(8460),f=o(844),g=o(2585);let _=r.Linkifier2=class extends f.Disposable{get currentLink(){return this._currentLink}constructor(e){super(),this._bufferService=e,this._linkProviders=[],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,f.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,f.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,t){this._element=e,this._mouseService=s,this._renderService=t,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(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const t=e.composedPath();for(let i=0;i<t.length;i++){const a=t[i];if(a.classList.contains("xterm"))break;if(a.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(e,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,s){var t,i;this._activeProviderReplies&&s||((t=this._activeProviderReplies)===null||t===void 0||t.forEach(l=>{l?.forEach(v=>{v.link.dispose&&v.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let a=!1;for(const[l,v]of this._linkProviders.entries())s?!((i=this._activeProviderReplies)===null||i===void 0)&&i.get(l)&&(a=this._checkLinkProviderResult(l,e,a)):v.provideLinks(e.y,m=>{var h,p;if(this._isMouseOut)return;const b=m?.map(L=>({link:L}));(h=this._activeProviderReplies)===null||h===void 0||h.set(l,b),a=this._checkLinkProviderResult(l,e,a),((p=this._activeProviderReplies)===null||p===void 0?void 0:p.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,s){const t=new Set;for(let i=0;i<s.size;i++){const a=s.get(i);if(a)for(let l=0;l<a.length;l++){const v=a[l],m=v.link.range.start.y<e?0:v.link.range.start.x,h=v.link.range.end.y>e?this._bufferService.cols:v.link.range.end.x;for(let p=m;p<=h;p++){if(t.has(p)){a.splice(l--,1);break}t.add(p)}}}}_checkLinkProviderResult(e,s,t){var i;if(!this._activeProviderReplies)return t;const a=this._activeProviderReplies.get(e);let l=!1;for(let v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(l=!0);if(!l&&a){const v=a.find(m=>this._linkAtPosition(m.link,s));v&&(t=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!t)for(let v=0;v<this._activeProviderReplies.size;v++){const m=(i=this._activeProviderReplies.get(v))===null||i===void 0?void 0:i.find(h=>this._linkAtPosition(h.link,s));if(m){t=!0,this._handleNewLink(m);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,s){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!s||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,f.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.pointerCursor},set:t=>{var i,a;!((i=this._currentLink)===null||i===void 0)&&i.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&((a=this._element)===null||a===void 0||a.classList.toggle("xterm-cursor-pointer",t)))}},underline:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.underline},set:t=>{var i,a,l;!((i=this._currentLink)===null||i===void 0)&&i.state&&((l=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const i=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,a=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=a&&(this._clearCurrentLink(i,a),this._lastMouseEvent&&this._element)){const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._askForLink(l,!1)}})))}_linkHover(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(t,s.text)}_fireUnderlineEvent(e,s){const t=e.range,i=this._bufferService.buffer.ydisp,a=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-i-1,t.end.x,t.end.y-i-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(a)}_linkLeave(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(t,s.text)}_linkAtPosition(e,s){const t=e.range.start.y*this._bufferService.cols+e.range.start.x,i=e.range.end.y*this._bufferService.cols+e.range.end.x,a=s.y*this._bufferService.cols+s.x;return t<=a&&a<=i}_positionFromMouseEvent(e,s,t){const i=t.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,t,i,a){return{x1:e,y1:s,x2:t,y2:i,cols:this._bufferService.cols,fg:a}}};r.Linkifier2=_=c([u(0,g.IBufferService)],_)},9042:(P,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(P,r,o){var c=this&&this.__decorate||function(_,e,s,t){var i,a=arguments.length,l=a<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(_,e,s,t);else for(var v=_.length-1;v>=0;v--)(i=_[v])&&(l=(a<3?i(l):a>3?i(e,s,l):i(e,s))||l);return a>3&&l&&Object.defineProperty(e,s,l),l},u=this&&this.__param||function(_,e){return function(s,t){e(s,t,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=o(511),d=o(2585);let f=r.OscLinkProvider=class{constructor(_,e,s){this._bufferService=_,this._optionsService=e,this._oscLinkService=s}provideLinks(_,e){var s;const t=this._bufferService.buffer.lines.get(_-1);if(!t)return void e(void 0);const i=[],a=this._optionsService.rawOptions.linkHandler,l=new n.CellData,v=t.getTrimmedLength();let m=-1,h=-1,p=!1;for(let b=0;b<v;b++)if(h!==-1||t.hasContent(b)){if(t.loadCell(b,l),l.hasExtendedAttrs()&&l.extended.urlId){if(h===-1){h=b,m=l.extended.urlId;continue}p=l.extended.urlId!==m}else h!==-1&&(p=!0);if(p||h!==-1&&b===v-1){const L=(s=this._oscLinkService.getLinkData(m))===null||s===void 0?void 0:s.uri;if(L){const y={start:{x:h+1,y:_},end:{x:b+(p||b!==v-1?0:1),y:_}};let k=!1;if(!a?.allowNonHttpProtocols)try{const x=new URL(L);["http:","https:"].includes(x.protocol)||(k=!0)}catch{k=!0}k||i.push({text:L,range:y,activate:(x,T)=>a?a.activate(x,T,y):g(0,T),hover:(x,T)=>{var O;return(O=a?.hover)===null||O===void 0?void 0:O.call(a,x,T,y)},leave:(x,T)=>{var O;return(O=a?.leave)===null||O===void 0?void 0:O.call(a,x,T,y)}})}p=!1,l.hasExtendedAttrs()&&l.extended.urlId?(h=b,m=l.extended.urlId):(h=-1,m=-1)}}e(i)}};function g(_,e){if(confirm(`Do you want to navigate to ${e}?
4
4