@nuxt/devtools 0.5.3 → 0.5.4

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 (105) hide show
  1. package/dist/chunks/module-main.mjs +90 -32
  2. package/dist/chunks/vscode.mjs +4 -5
  3. package/dist/client/200.html +2 -2
  4. package/dist/client/404.html +2 -2
  5. package/dist/client/__inspecting/index.html +2 -2
  6. package/dist/client/_nuxt/{Badge.0ce662e4.js → Badge.ade65c69.js} +1 -1
  7. package/dist/client/_nuxt/CodeSnippets.vue.0933ada7.js +1 -0
  8. package/dist/client/_nuxt/{DrawerRight.vue.eb026405.js → DrawerRight.vue.7bc0ac9b.js} +1 -1
  9. package/dist/client/_nuxt/{DurationDisplay.vue.9fa7b27d.js → DurationDisplay.vue.d2a5c09b.js} +1 -1
  10. package/dist/client/_nuxt/{FilepathItem.vue.7eb51d4e.js → FilepathItem.vue.a3a55bfd.js} +1 -1
  11. package/dist/client/_nuxt/{HelpFab.vue.ebcc1356.js → HelpFab.vue.1ab4e4f1.js} +1 -1
  12. package/dist/client/_nuxt/{LaunchPage.vue.63709998.js → LaunchPage.vue.dff3dd39.js} +1 -1
  13. package/dist/client/_nuxt/{NCheckbox.vue.a470be6e.js → NCheckbox.vue.cd1637b2.js} +1 -1
  14. package/dist/client/_nuxt/{NCodeBlock.vue.3fea7f9d.js → NCodeBlock.vue.d5b2e85d.js} +1 -1
  15. package/dist/client/_nuxt/{NIconButton.vue.13275ce3.js → NIconButton.vue.3defcade.js} +1 -1
  16. package/dist/client/_nuxt/{NIconTitle.vue.811968a5.js → NIconTitle.vue.62b2ff0a.js} +1 -1
  17. package/dist/client/_nuxt/NLink.vue.be635eca.js +1 -0
  18. package/dist/client/_nuxt/{NMarkdown.vue.f8a61172.js → NMarkdown.vue.00fc3014.js} +1 -1
  19. package/dist/client/_nuxt/{NPanelGrids.afa6e237.js → NPanelGrids.24e40025.js} +1 -1
  20. package/dist/client/_nuxt/{NSectionBlock.4824dc31.js → NSectionBlock.eb96beb4.js} +1 -1
  21. package/dist/client/_nuxt/{NSelect.vue.2f75a7b4.js → NSelect.vue.7652516b.js} +1 -1
  22. package/dist/client/_nuxt/{NSwitch.vue.ae05571e.js → NSwitch.vue.c07ff0b7.js} +1 -1
  23. package/dist/client/_nuxt/{NTip.vue.6c00393e.js → NTip.vue.3fd9b115.js} +1 -1
  24. package/dist/client/_nuxt/Navbar.vue.12ff05d9.js +1 -0
  25. package/dist/client/_nuxt/NpmVersionCheck.vue.7bc4775a.js +1 -0
  26. package/dist/client/_nuxt/{PanelLeftRight.vue.9e8aa6b8.js → PanelLeftRight.vue.0d3c5a22.js} +1 -1
  27. package/dist/client/_nuxt/StateEditor.vue.6e8c107a.js +1 -0
  28. package/dist/client/_nuxt/{__inspecting.689fc045.js → __inspecting.137e909d.js} +1 -1
  29. package/dist/client/_nuxt/analyze-build.790e4c36.js +1 -0
  30. package/dist/client/_nuxt/assets.1c0d54b4.js +16 -0
  31. package/dist/client/_nuxt/{client.ce74bb6b.js → client.d93a636c.js} +1 -1
  32. package/dist/client/_nuxt/{components.212338f5.js → components.060d9fd5.js} +3 -3
  33. package/dist/client/_nuxt/custom-_name_.e88f914e.js +1 -0
  34. package/dist/client/_nuxt/{default.b5c163f2.js → default.6eda7699.js} +1 -1
  35. package/dist/client/_nuxt/{editor.6dcc09c7.js → editor.4380b623.js} +1 -1
  36. package/dist/client/_nuxt/entry.34446c1f.js +19 -0
  37. package/dist/client/_nuxt/{entry.5cc961cc.css → entry.bf8a0e33.css} +1 -1
  38. package/dist/client/_nuxt/{error-404.67a51e0c.js → error-404.7bcf1a44.js} +1 -1
  39. package/dist/client/_nuxt/{error-500.811aab1a.js → error-500.b67f8091.js} +1 -1
  40. package/dist/client/_nuxt/{error-component.74964985.js → error-component.5479d89e.js} +2 -2
  41. package/dist/client/_nuxt/{full.1ccd4009.js → full.89a525fd.js} +1 -1
  42. package/dist/client/_nuxt/{hooks.310738c8.js → hooks.99ea2107.js} +1 -1
  43. package/dist/client/_nuxt/imports.29e62250.js +1 -0
  44. package/dist/client/_nuxt/{index.5d80161c.js → index.a348e979.js} +1 -1
  45. package/dist/client/_nuxt/{index.a86d9a7f.js → index.b8d7fad0.js} +1 -1
  46. package/dist/client/_nuxt/{json-editor-vue.cb8f6785.js → json-editor-vue.62f947e8.js} +1 -1
  47. package/dist/client/_nuxt/{middleware.c10051f6.js → middleware.61ccc755.js} +1 -1
  48. package/dist/client/_nuxt/modules.f8953fab.js +4 -0
  49. package/dist/client/_nuxt/{none.1d054cdf.js → none.566b9a55.js} +1 -1
  50. package/dist/client/_nuxt/open-graph.26d327ec.js +3 -0
  51. package/dist/client/_nuxt/overview.4326006b.js +1 -0
  52. package/dist/client/_nuxt/pages.b234eacb.js +1 -0
  53. package/dist/client/_nuxt/{payload.4878fb79.js → payload.fbf9b90d.js} +1 -1
  54. package/dist/client/_nuxt/{plugins.92e36c4c.js → plugins.9c9f9450.js} +1 -1
  55. package/dist/client/_nuxt/{runtime-configs.c13ac314.js → runtime-configs.cf5a4a0c.js} +1 -1
  56. package/dist/client/_nuxt/server-routes.7185e439.js +9 -0
  57. package/dist/client/_nuxt/{settings.fcb97906.js → settings.8603972f.js} +1 -1
  58. package/dist/client/_nuxt/state-components.f564bfa7.js +1 -0
  59. package/dist/client/_nuxt/storage.4b5872ff.js +1 -0
  60. package/dist/client/_nuxt/{terminals.dcdca739.js → terminals.d263a781.js} +1 -1
  61. package/dist/client/_nuxt/{unocss-runtime.cfd98600.js → unocss-runtime.a821baa9.js} +1 -1
  62. package/dist/client/_nuxt/virtual-files.2fc42163.js +1 -0
  63. package/dist/client/index.html +2 -2
  64. package/dist/client/modules/analyze-build/index.html +2 -2
  65. package/dist/client/modules/assets/index.html +2 -2
  66. package/dist/client/modules/components/index.html +2 -2
  67. package/dist/client/modules/hooks/index.html +2 -2
  68. package/dist/client/modules/imports/index.html +2 -2
  69. package/dist/client/modules/middleware/index.html +2 -2
  70. package/dist/client/modules/modules/index.html +2 -2
  71. package/dist/client/modules/open-graph/index.html +2 -2
  72. package/dist/client/modules/overview/index.html +2 -2
  73. package/dist/client/modules/pages/index.html +2 -2
  74. package/dist/client/modules/payload/index.html +2 -2
  75. package/dist/client/modules/plugins/index.html +2 -2
  76. package/dist/client/modules/runtime-configs/index.html +2 -2
  77. package/dist/client/modules/server-routes/index.html +2 -2
  78. package/dist/client/modules/storage/index.html +2 -2
  79. package/dist/client/modules/terminals/index.html +2 -2
  80. package/dist/client/modules/virtual-files/index.html +2 -2
  81. package/dist/client/settings/index.html +2 -2
  82. package/dist/module.json +1 -1
  83. package/dist/module.mjs +1 -1
  84. package/dist/shared/{devtools.a2798b81.mjs → devtools.345c630c.mjs} +2 -2
  85. package/dist/types.d.ts +12 -1
  86. package/package.json +8 -9
  87. package/dist/client/_nuxt/CodeSnippets.vue.63e1babe.js +0 -1
  88. package/dist/client/_nuxt/NLink.vue.8becbaf2.js +0 -1
  89. package/dist/client/_nuxt/NTextInput.vue.efd43a47.js +0 -1
  90. package/dist/client/_nuxt/Navbar.vue.76f856f0.js +0 -1
  91. package/dist/client/_nuxt/NpmVersionCheck.vue.9ff03721.js +0 -1
  92. package/dist/client/_nuxt/StateEditor.vue.b9b04885.js +0 -1
  93. package/dist/client/_nuxt/analyze-build.8d6d1198.js +0 -1
  94. package/dist/client/_nuxt/assets.b6f9866b.js +0 -16
  95. package/dist/client/_nuxt/custom-_name_.87eb6297.js +0 -1
  96. package/dist/client/_nuxt/entry.3c854225.js +0 -19
  97. package/dist/client/_nuxt/fuse.esm.88e2763d.js +0 -1
  98. package/dist/client/_nuxt/imports.ccc44d22.js +0 -1
  99. package/dist/client/_nuxt/modules.9cc1fa1d.js +0 -4
  100. package/dist/client/_nuxt/open-graph.4ea7bb24.js +0 -3
  101. package/dist/client/_nuxt/overview.9f34e07f.js +0 -1
  102. package/dist/client/_nuxt/pages.a55d4866.js +0 -1
  103. package/dist/client/_nuxt/server-routes.dae9cba0.js +0 -9
  104. package/dist/client/_nuxt/storage.d543849f.js +0 -1
  105. package/dist/client/_nuxt/virtual-files.3a24df07.js +0 -1
@@ -1 +0,0 @@
1
- function I(e){return Array.isArray?Array.isArray(e):et(e)==="[object Array]"}const at=1/0;function lt(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-at?"-0":t}function ut(e){return e==null?"":lt(e)}function _(e){return typeof e=="string"}function q(e){return typeof e=="number"}function ft(e){return e===!0||e===!1||dt(e)&&et(e)=="[object Boolean]"}function tt(e){return typeof e=="object"}function dt(e){return tt(e)&&e!==null}function M(e){return e!=null}function j(e){return!e.trim().length}function et(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const gt="Incorrect 'index' type",pt=e=>`Invalid value for key ${e}`,Mt=e=>`Pattern length exceeds max of ${e}.`,mt=e=>`Missing ${e} property in key`,xt=e=>`Property 'weight' in key '${e}' must be a positive integer`,U=Object.prototype.hasOwnProperty;class Et{constructor(t){this._keys=[],this._keyMap={};let s=0;t.forEach(n=>{let r=st(n);s+=r.weight,this._keys.push(r),this._keyMap[r.id]=r,s+=r.weight}),this._keys.forEach(n=>{n.weight/=s})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function st(e){let t=null,s=null,n=null,r=1,i=null;if(_(e)||I(e))n=e,t=Q(e),s=K(e);else{if(!U.call(e,"name"))throw new Error(mt("name"));const c=e.name;if(n=c,U.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(xt(c));t=Q(c),s=K(c),i=e.getFn}return{path:t,id:s,weight:r,src:n,getFn:i}}function Q(e){return I(e)?e:e.split(".")}function K(e){return I(e)?e.join("."):e}function _t(e,t){let s=[],n=!1;const r=(i,c,o)=>{if(M(i))if(!c[o])s.push(i);else{let h=c[o];const a=i[h];if(!M(a))return;if(o===c.length-1&&(_(a)||q(a)||ft(a)))s.push(ut(a));else if(I(a)){n=!0;for(let l=0,f=a.length;l<f;l+=1)r(a[l],c,o+1)}else c.length&&r(a,c,o+1)}};return r(e,_(t)?t.split("."):t,0),n?s:s[0]}const yt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},It={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},St={location:0,threshold:.6,distance:100},At={useExtendedSearch:!1,getFn:_t,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var u={...It,...yt,...St,...At};const wt=/[^ ]+/g;function Lt(e=1,t=3){const s=new Map,n=Math.pow(10,t);return{get(r){const i=r.match(wt).length;if(s.has(i))return s.get(i);const c=1/Math.pow(i,.5*e),o=parseFloat(Math.round(c*n)/n);return s.set(i,o),o},clear(){s.clear()}}}class V{constructor({getFn:t=u.getFn,fieldNormWeight:s=u.fieldNormWeight}={}){this.norm=Lt(s,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((s,n)=>{this._keysMap[s.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,_(this.docs[0])?this.docs.forEach((t,s)=>{this._addString(t,s)}):this.docs.forEach((t,s)=>{this._addObject(t,s)}),this.norm.clear())}add(t){const s=this.size();_(t)?this._addString(t,s):this._addObject(t,s)}removeAt(t){this.records.splice(t,1);for(let s=t,n=this.size();s<n;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(t,s){return t[this._keysMap[s]]}size(){return this.records.length}_addString(t,s){if(!M(t)||j(t))return;let n={v:t,i:s,n:this.norm.get(t)};this.records.push(n)}_addObject(t,s){let n={i:s,$:{}};this.keys.forEach((r,i)=>{let c=r.getFn?r.getFn(t):this.getFn(t,r.path);if(M(c)){if(I(c)){let o=[];const h=[{nestedArrIndex:-1,value:c}];for(;h.length;){const{nestedArrIndex:a,value:l}=h.pop();if(M(l))if(_(l)&&!j(l)){let f={v:l,i:a,n:this.norm.get(l)};o.push(f)}else I(l)&&l.forEach((f,d)=>{h.push({nestedArrIndex:d,value:f})})}n.$[i]=o}else if(_(c)&&!j(c)){let o={v:c,n:this.norm.get(c)};n.$[i]=o}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function nt(e,t,{getFn:s=u.getFn,fieldNormWeight:n=u.fieldNormWeight}={}){const r=new V({getFn:s,fieldNormWeight:n});return r.setKeys(e.map(st)),r.setSources(t),r.create(),r}function Rt(e,{getFn:t=u.getFn,fieldNormWeight:s=u.fieldNormWeight}={}){const{keys:n,records:r}=e,i=new V({getFn:t,fieldNormWeight:s});return i.setKeys(n),i.setIndexRecords(r),i}function v(e,{errors:t=0,currentLocation:s=0,expectedLocation:n=0,distance:r=u.distance,ignoreLocation:i=u.ignoreLocation}={}){const c=t/e.length;if(i)return c;const o=Math.abs(n-s);return r?c+o/r:o?1:c}function bt(e=[],t=u.minMatchCharLength){let s=[],n=-1,r=-1,i=0;for(let c=e.length;i<c;i+=1){let o=e[i];o&&n===-1?n=i:!o&&n!==-1&&(r=i-1,r-n+1>=t&&s.push([n,r]),n=-1)}return e[i-1]&&i-n>=t&&s.push([n,i-1]),s}const b=32;function Nt(e,t,s,{location:n=u.location,distance:r=u.distance,threshold:i=u.threshold,findAllMatches:c=u.findAllMatches,minMatchCharLength:o=u.minMatchCharLength,includeMatches:h=u.includeMatches,ignoreLocation:a=u.ignoreLocation}={}){if(t.length>b)throw new Error(Mt(b));const l=t.length,f=e.length,d=Math.max(0,Math.min(n,f));let g=i,p=d;const m=o>1||h,L=m?Array(f):[];let y;for(;(y=e.indexOf(t,p))>-1;){let x=v(t,{currentLocation:y,expectedLocation:d,distance:r,ignoreLocation:a});if(g=Math.min(x,g),p=y+l,m){let S=0;for(;S<l;)L[y+S]=1,S+=1}}p=-1;let N=[],R=1,k=l+f;const ht=1<<l-1;for(let x=0;x<l;x+=1){let S=0,A=k;for(;S<A;)v(t,{errors:x,currentLocation:d+A,expectedLocation:d,distance:r,ignoreLocation:a})<=g?S=A:k=A,A=Math.floor((k-S)/2+S);k=A;let Y=Math.max(1,d-A+1),P=c?f:Math.min(d+A,f)+l,O=Array(P+2);O[P+1]=(1<<x)-1;for(let E=P;E>=Y;E-=1){let C=E-1,G=s[e.charAt(C)];if(m&&(L[C]=+!!G),O[E]=(O[E+1]<<1|1)&G,x&&(O[E]|=(N[E+1]|N[E])<<1|1|N[E+1]),O[E]&ht&&(R=v(t,{errors:x,currentLocation:C,expectedLocation:d,distance:r,ignoreLocation:a}),R<=g)){if(g=R,p=C,p<=d)break;Y=Math.max(1,2*d-p)}}if(v(t,{errors:x+1,currentLocation:d,expectedLocation:d,distance:r,ignoreLocation:a})>g)break;N=O}const T={isMatch:p>=0,score:Math.max(.001,R)};if(m){const x=bt(L,o);x.length?h&&(T.indices=x):T.isMatch=!1}return T}function Ot(e){let t={};for(let s=0,n=e.length;s<n;s+=1){const r=e.charAt(s);t[r]=(t[r]||0)|1<<n-s-1}return t}class rt{constructor(t,{location:s=u.location,threshold:n=u.threshold,distance:r=u.distance,includeMatches:i=u.includeMatches,findAllMatches:c=u.findAllMatches,minMatchCharLength:o=u.minMatchCharLength,isCaseSensitive:h=u.isCaseSensitive,ignoreLocation:a=u.ignoreLocation}={}){if(this.options={location:s,threshold:n,distance:r,includeMatches:i,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:h,ignoreLocation:a},this.pattern=h?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const l=(d,g)=>{this.chunks.push({pattern:d,alphabet:Ot(d),startIndex:g})},f=this.pattern.length;if(f>b){let d=0;const g=f%b,p=f-g;for(;d<p;)l(this.pattern.substr(d,b),d),d+=b;if(g){const m=f-b;l(this.pattern.substr(m),m)}}else l(this.pattern,0)}searchIn(t){const{isCaseSensitive:s,includeMatches:n}=this.options;if(s||(t=t.toLowerCase()),this.pattern===t){let p={isMatch:!0,score:0};return n&&(p.indices=[[0,t.length-1]]),p}const{location:r,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:h,ignoreLocation:a}=this.options;let l=[],f=0,d=!1;this.chunks.forEach(({pattern:p,alphabet:m,startIndex:L})=>{const{isMatch:y,score:N,indices:R}=Nt(t,p,m,{location:r+L,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:h,includeMatches:n,ignoreLocation:a});y&&(d=!0),f+=N,y&&R&&(l=[...l,...R])});let g={isMatch:d,score:d?f/this.chunks.length:1};return d&&n&&(g.indices=l),g}}class w{constructor(t){this.pattern=t}static isMultiMatch(t){return X(t,this.multiRegex)}static isSingleMatch(t){return X(t,this.singleRegex)}search(){}}function X(e,t){const s=e.match(t);return s?s[1]:null}class $t extends w{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const s=t===this.pattern;return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class kt extends w{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const n=t.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Ct extends w{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const s=t.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class vt extends w{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const s=!t.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class Ft extends w{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const s=t.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Tt extends w{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const s=!t.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class it extends w{constructor(t,{location:s=u.location,threshold:n=u.threshold,distance:r=u.distance,includeMatches:i=u.includeMatches,findAllMatches:c=u.findAllMatches,minMatchCharLength:o=u.minMatchCharLength,isCaseSensitive:h=u.isCaseSensitive,ignoreLocation:a=u.ignoreLocation}={}){super(t),this._bitapSearch=new rt(t,{location:s,threshold:n,distance:r,includeMatches:i,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:h,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class ct extends w{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let s=0,n;const r=[],i=this.pattern.length;for(;(n=t.indexOf(this.pattern,s))>-1;)s=n+i,r.push([n,s-1]);const c=!!r.length;return{isMatch:c,score:c?0:1,indices:r}}}const D=[$t,ct,Ct,vt,Tt,Ft,kt,it],J=D.length,Pt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,jt="|";function Kt(e,t={}){return e.split(jt).map(s=>{let n=s.trim().split(Pt).filter(i=>i&&!!i.trim()),r=[];for(let i=0,c=n.length;i<c;i+=1){const o=n[i];let h=!1,a=-1;for(;!h&&++a<J;){const l=D[a];let f=l.isMultiMatch(o);f&&(r.push(new l(f,t)),h=!0)}if(!h)for(a=-1;++a<J;){const l=D[a];let f=l.isSingleMatch(o);if(f){r.push(new l(f,t));break}}}return r})}const Dt=new Set([it.type,ct.type]);class Wt{constructor(t,{isCaseSensitive:s=u.isCaseSensitive,includeMatches:n=u.includeMatches,minMatchCharLength:r=u.minMatchCharLength,ignoreLocation:i=u.ignoreLocation,findAllMatches:c=u.findAllMatches,location:o=u.location,threshold:h=u.threshold,distance:a=u.distance}={}){this.query=null,this.options={isCaseSensitive:s,includeMatches:n,minMatchCharLength:r,findAllMatches:c,ignoreLocation:i,location:o,threshold:h,distance:a},this.pattern=s?t:t.toLowerCase(),this.query=Kt(this.pattern,this.options)}static condition(t,s){return s.useExtendedSearch}searchIn(t){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r}=this.options;t=r?t:t.toLowerCase();let i=0,c=[],o=0;for(let h=0,a=s.length;h<a;h+=1){const l=s[h];c.length=0,i=0;for(let f=0,d=l.length;f<d;f+=1){const g=l[f],{isMatch:p,indices:m,score:L}=g.search(t);if(p){if(i+=1,o+=L,n){const y=g.constructor.type;Dt.has(y)?c=[...c,...m]:c.push(m)}}else{o=0,i=0,c.length=0;break}}if(i){let f={isMatch:!0,score:o/i};return n&&(f.indices=c),f}}return{isMatch:!1,score:1}}}const W=[];function Bt(...e){W.push(...e)}function B(e,t){for(let s=0,n=W.length;s<n;s+=1){let r=W[s];if(r.condition(e,t))return new r(e,t)}return new rt(e,t)}const F={AND:"$and",OR:"$or"},z={PATH:"$path",PATTERN:"$val"},H=e=>!!(e[F.AND]||e[F.OR]),zt=e=>!!e[z.PATH],Ht=e=>!I(e)&&tt(e)&&!H(e),Z=e=>({[F.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function ot(e,t,{auto:s=!0}={}){const n=r=>{let i=Object.keys(r);const c=zt(r);if(!c&&i.length>1&&!H(r))return n(Z(r));if(Ht(r)){const h=c?r[z.PATH]:i[0],a=c?r[z.PATTERN]:r[h];if(!_(a))throw new Error(pt(h));const l={keyId:K(h),pattern:a};return s&&(l.searcher=B(a,t)),l}let o={children:[],operator:i[0]};return i.forEach(h=>{const a=r[h];I(a)&&a.forEach(l=>{o.children.push(n(l))})}),o};return H(e)||(e=Z(e)),n(e)}function Vt(e,{ignoreFieldNorm:t=u.ignoreFieldNorm}){e.forEach(s=>{let n=1;s.matches.forEach(({key:r,norm:i,score:c})=>{const o=r?r.weight:null;n*=Math.pow(c===0&&o?Number.EPSILON:c,(o||1)*(t?1:i))}),s.score=n})}function Yt(e,t){const s=e.matches;t.matches=[],M(s)&&s.forEach(n=>{if(!M(n.indices)||!n.indices.length)return;const{indices:r,value:i}=n;let c={indices:r,value:i};n.key&&(c.key=n.key.src),n.idx>-1&&(c.refIndex=n.idx),t.matches.push(c)})}function Gt(e,t){t.score=e.score}function Ut(e,t,{includeMatches:s=u.includeMatches,includeScore:n=u.includeScore}={}){const r=[];return s&&r.push(Yt),n&&r.push(Gt),e.map(i=>{const{idx:c}=i,o={item:t[c],refIndex:c};return r.length&&r.forEach(h=>{h(i,o)}),o})}class ${constructor(t,s={},n){this.options={...u,...s},this.options.useExtendedSearch,this._keyStore=new Et(this.options.keys),this.setCollection(t,n)}setCollection(t,s){if(this._docs=t,s&&!(s instanceof V))throw new Error(gt);this._myIndex=s||nt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){M(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const s=[];for(let n=0,r=this._docs.length;n<r;n+=1){const i=this._docs[n];t(i,n)&&(this.removeAt(n),n-=1,r-=1,s.push(i))}return s}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:s=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:i,sortFn:c,ignoreFieldNorm:o}=this.options;let h=_(t)?_(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return Vt(h,{ignoreFieldNorm:o}),i&&h.sort(c),q(s)&&s>-1&&(h=h.slice(0,s)),Ut(h,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(t){const s=B(t,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:i,i:c,n:o})=>{if(!M(i))return;const{isMatch:h,score:a,indices:l}=s.searchIn(i);h&&r.push({item:i,idx:c,matches:[{score:a,value:i,norm:o,indices:l}]})}),r}_searchLogical(t){const s=ot(t,this.options),n=(o,h,a)=>{if(!o.children){const{keyId:f,searcher:d}=o,g=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(h,f),searcher:d});return g&&g.length?[{idx:a,item:h,matches:g}]:[]}const l=[];for(let f=0,d=o.children.length;f<d;f+=1){const g=o.children[f],p=n(g,h,a);if(p.length)l.push(...p);else if(o.operator===F.AND)return[]}return l},r=this._myIndex.records,i={},c=[];return r.forEach(({$:o,i:h})=>{if(M(o)){let a=n(s,o,h);a.length&&(i[h]||(i[h]={idx:h,item:o,matches:[]},c.push(i[h])),a.forEach(({matches:l})=>{i[h].matches.push(...l)}))}}),c}_searchObjectList(t){const s=B(t,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:c,i:o})=>{if(!M(c))return;let h=[];n.forEach((a,l)=>{h.push(...this._findMatches({key:a,value:c[l],searcher:s}))}),h.length&&i.push({idx:o,item:c,matches:h})}),i}_findMatches({key:t,value:s,searcher:n}){if(!M(s))return[];let r=[];if(I(s))s.forEach(({v:i,i:c,n:o})=>{if(!M(i))return;const{isMatch:h,score:a,indices:l}=n.searchIn(i);h&&r.push({score:a,key:t,value:i,idx:c,norm:o,indices:l})});else{const{v:i,n:c}=s,{isMatch:o,score:h,indices:a}=n.searchIn(i);o&&r.push({score:h,key:t,value:i,norm:c,indices:a})}return r}}$.version="6.6.2";$.createIndex=nt;$.parseIndex=Rt;$.config=u;$.parseQuery=ot;Bt(Wt);export{$ as F};
@@ -1 +0,0 @@
1
- import{_ as z}from"./NSwitch.vue.ae05571e.js";import{_ as H}from"./Navbar.vue.76f856f0.js";import{_ as T}from"./FilepathItem.vue.7eb51d4e.js";import{_ as j}from"./NMarkdown.vue.f8a61172.js";import{a as C,p as v,a4 as P,o as e,c as h,w as f,f as r,v as b,i as _,u as t,l as M,h as l,F as w,t as D,q as S,s as R,k as q,al as N,a6 as F,am as L,R as G,r as B,a5 as O,G as U}from"./entry.3c854225.js";import{a as Y,u as J}from"./editor.6dcc09c7.js";import{C as V,D as E}from"./constants.d7bcda3c.js";import{_ as K}from"./NSectionBlock.4824dc31.js";import{_ as Q}from"./HelpFab.vue.ebcc1356.js";import{F as W}from"./fuse.esm.88e2763d.js";import"./NTextInput.vue.efd43a47.js";import"./client.ce74bb6b.js";import"./NIconTitle.vue.811968a5.js";import"./NIconButton.vue.13275ce3.js";const Z={"hover:text-primary":""},tt={key:0,"text-primary":""},et={"max-w-100":""},ot={px4:"",py3:"","text-sm":""},nt={flex:"~ gap2",n:"primary xs"},st={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},at={"text-sm":""},rt=r("span",{op50:""},"It has been referenced ",-1),it={"text-primary":""},lt=r("span",{op50:""}," times by:",-1),mt={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":""},ut={key:1,"text-sm":"",op50:""},pt=C({__name:"ComposableItem",props:{item:null,metadata:null,filepath:null},setup(u){const n=u,d=Y(),i=J(),p=v(()=>n.item.as||n.item.name),o=v(()=>n.metadata?.injectionUsage?.[p.value]?.count||0),y=v(()=>n.metadata?.injectionUsage?.[p.value]?.moduleIds||[]),I=v(()=>{if(n.item.meta?.docsUrl)return n.item.meta.docsUrl;if(["nuxt","#app","nuxt3"].includes(n.item.from))return V.nuxt[n.item.name];if(n.item.from==="vue")return V.vue[n.item.name]});return(m,s)=>{const c=j,x=q,$=T,g=P("VDropdown");return e(),h(g,{disabled:!n.metadata},{popper:f(()=>[r("div",et,[r("div",ot,[u.item.meta?.description?(e(),h(c,{key:0,tag:"div",pb3:"","text-sm":"",markdown:u.item.meta.description},null,8,["markdown"])):b("",!0),r("div",nt,[_(x,{icon:"carbon-copy",onClick:s[0]||(s[0]=a=>t(d)(t(p)))},{default:f(()=>[M(" Copy ")]),_:1}),u.filepath?(e(),h(x,{key:0,icon:"carbon-code",onClick:s[1]||(s[1]=a=>u.filepath&&t(i)(u.filepath))},{default:f(()=>[M(" Source ")]),_:1})):b("",!0),t(I)?(e(),h(x,{key:1,icon:"carbon-catalog",to:t(I),target:"_blank"},{default:f(()=>[M(" Docs ")]),_:1},8,["to"])):b("",!0)])]),r("div",st,[t(o)?(e(),l(w,{key:0},[r("div",at,[rt,r("strong",it,D(t(o)),1),lt]),r("div",mt,[(e(!0),l(w,null,S(t(y),a=>(e(),h($,{key:a,filepath:a},null,8,["filepath"]))),128))])],64)):(e(),l("div",ut," Not in use via auto import. "))])])]),default:f(()=>[r("button",Z,[r("code",{rounded:"","bg-gray:5":"",px2:"",py1:"","font-mono":"","text-sm":"",class:R(u.metadata&&!t(o)?"op30 hover:op100":"")},[M(D(t(p))+" ",1),t(o)?(e(),l("sup",tt,"x"+D(t(o)),1)):b("",!0)],2)])]),_:1},8,["disabled"])}}}),ct={flex:"~ wrap gap2",p2:"",pl4:""},dt=C({__name:"ComposableTree",props:{map:null,root:null,metadata:null},setup(u){return(n,d)=>{const i=T,p=pt;return e(),l("div",null,[(e(!0),l(w,null,S(u.map.entries(),([o,y])=>(e(),l("div",{key:o},[_(i,{filepath:o,op50:"","hover:underline":""},null,8,["filepath"]),r("div",ct,[(e(!0),l(w,null,S(y,I=>(e(),h(p,{key:I.as,item:I,metadata:u.metadata,filepath:o.match(/^[\w@]/)?void 0:o},null,8,["item","metadata","filepath"]))),128))])]))),128))])}}}),_t={key:0,flex:"~ col gap-2 items-start"},ft=C({__name:"HelpImportsDirs",setup(u){const n=N();return(d,i)=>{const p=T;return t(n)?.dirs?(e(),l("div",_t,[(e(!0),l(w,null,S(t(n).dirs,o=>(e(),h(p,{key:o,filepath:o,"text-primary":""},null,8,["filepath"]))),128))])):b("",!0)}}}),ht={flex:"~ gap-2 wrap",mb6:""},bt=C({__name:"HelpImportsModules",setup(u){const n=N(),d=v(()=>[...new Set(n.value?.imports.map(i=>F(i.from)).filter(i=>!!i&&!L(i)))]);return(i,p)=>(e(),l("div",ht,[(e(!0),l(w,null,S(t(d),o=>(e(),l("code",{key:o,rounded:"","bg-primary:5":"",p:"x2 y0.5","text-primary":""},D(o),1))),128))]))}}),vt={class:"markdown-body"},yt=r("h1",null,"Auto imports",-1),xt=r("p",null,"Nuxt auto-imports helper functions, composables and Vue APIs to use across your application without explicitly importing them. Based on the directory structure, every Nuxt application can also use auto-imports for its own components, composables and plugins. Components, composables or plugins can use these functions.",-1),gt=r("hr",null,null,-1),It=r("p",null,"According to your config, exports of files under the following folders will be registed as auto-imports entry:",-1),$t=r("p",null,"Meanwhile, modules could also provide auto-imports for their own components. You have auto-imports from the following modules as well:",-1),kt=r("hr",null,null,-1),wt=r("p",null,[r("a",{href:"https://nuxt.com/docs/guide/concepts/auto-imports",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Mt={__name:"imports",setup(u,{expose:n}){return n({frontmatter:{}}),(i,p)=>{const o=ft,y=bt;return e(),l("div",vt,[yt,xt,gt,It,_(o),$t,_(y),kt,wt])}}},St={key:0,relative:"","h-full":"","of-auto":""},Ct={key:0},Pt=C({__name:"imports",setup(u){const n=G(),d=B(!1),i=B(""),p=N(),o=v(()=>p.value?.metadata),y=v(()=>p.value?.imports.filter(s=>s.as||s.name).sort((s,c)=>(s.as||s.name).localeCompare(c.as||c.name))||[]),I=v(()=>new W(y.value,{keys:["from","as","name"]})),m=v(()=>{const s=new Map,c=new Map,x=new Map;let $=i.value?I.value.search(i.value).map(a=>a.item):y.value;d.value&&o.value&&($=$.filter(a=>(a.as||a.name)in o.value.injectionUsage));const g={user:0,lib:0,builtin:0};return $.forEach(a=>{const k=O(a.from)?L(F(a.from))?x:c:s;k.has(a.from)||k.set(a.from,[]),k.get(a.from).push(a),g[k===s?"user":k===c?"lib":"builtin"]++}),{user:s,lib:c,builtin:x,count:g}});return(s,c)=>{const x=z,$=H,g=dt,a=K,k=Mt,X=Q;return e(),l(w,null,[t(n)?(e(),l("div",St,[_($,{search:t(i),"onUpdate:search":c[1]||(c[1]=A=>U(i)?i.value=A:null),pb2:""},{default:f(()=>[t(o)?(e(),l("div",Ct,[_(x,{modelValue:t(d),"onUpdate:modelValue":c[0]||(c[0]=A=>U(d)?d.value=A:null),n:"primary sm"},{default:f(()=>[M(" Show used only ")]),_:1},8,["modelValue"])])):b("",!0)]),_:1},8,["search"]),t(m).user.size?(e(),h(a,{key:0,open:t(m).count.user<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:t(E)),icon:"carbon-function",text:"User composables",description:`${t(m).count.user} composables from ${t(m).user.size} modules`},{default:f(()=>[_(g,{map:t(m).user,root:t(n).rootDir,metadata:t(o)},null,8,["map","root","metadata"])]),_:1},8,["open","description"])):b("",!0),t(m).builtin.size?(e(),h(a,{key:1,open:t(m).count.builtin<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:t(E)),icon:"simple-icons-nuxtdotjs",text:"Built-in composables",description:`${t(m).count.builtin} composables`},{default:f(()=>[_(g,{map:t(m).builtin,root:t(n).rootDir,metadata:t(o)},null,8,["map","root","metadata"])]),_:1},8,["open","description"])):b("",!0),t(m).lib.size?(e(),h(a,{key:2,open:t(m).count.lib<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:t(E)),icon:"carbon-3d-mpr-toggle",text:"Composables from libraries",description:`${t(m).count.lib} composables from ${t(m).lib.size} packages`},{default:f(()=>[_(g,{map:t(m).lib,root:t(n).rootDir,metadata:t(o)},null,8,["map","root","metadata"])]),_:1},8,["open","description"])):b("",!0)])):b("",!0),_(X,null,{default:f(()=>[_(k)]),_:1})],64)}}});export{Pt as default};
@@ -1,4 +0,0 @@
1
- import{_ as Be}from"./FilepathItem.vue.7eb51d4e.js";import{a as P,p as B,o as h,c as M,w as x,f as d,V as A,u as m,l as I,t as N,h as $,s as U,v as C,i as b,F as R,q as W,H as le,a3 as we,an as Ae,r as Z,aa as De,k as ae,ao as ke,ap as Re,y as he,aq as Ie,ar as ze,as as Pe,at as Fe,af as Se,au as je,av as He,aw as Ue,a4 as qe,ax as We,z as Ke,a8 as _e,ac as Ye,ay as Ge,P as Je,az as Xe,G as Ze,a0 as Qe,aA as et,R as tt,I as nt,ab as ve}from"./entry.3c854225.js";import{_ as it}from"./NpmVersionCheck.vue.9ff03721.js";import{u as Ce}from"./editor.6dcc09c7.js";import{_ as ot}from"./NSectionBlock.4824dc31.js";import{_ as Me}from"./NIconButton.vue.13275ce3.js";import{_ as st}from"./NIconTitle.vue.811968a5.js";import{_ as rt}from"./NTextInput.vue.efd43a47.js";import{_ as lt}from"./Badge.0ce662e4.js";import{F as at}from"./fuse.esm.88e2763d.js";import{_ as Te}from"./NCodeBlock.vue.3fea7f9d.js";import{_ as ut}from"./NLink.vue.8becbaf2.js";import{_ as ct}from"./NTip.vue.6c00393e.js";import{_ as dt}from"./HelpFab.vue.ebcc1356.js";import"./NCheckbox.vue.a470be6e.js";import"./client.ce74bb6b.js";const ft={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},mt={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},pt={key:2},ht=d("div",{"flex-auto":""},null,-1),_t={key:1,flex:"~ gap-2",title:"Documentation"},vt=d("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),yt={key:2,flex:"~ gap-2"},gt=d("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),bt={flex:"~ col","items-end":""},xt={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},$t=["src","alt"],wt=d("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),kt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},It=["src"],zt=d("div",{"flex-auto":""},null,-1),St={flex:"","justify-end":""},Ct="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",Mt="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",Tt="https://github.com/",Ot="https://www.npmjs.com/package/",ue=P({__name:"ModuleItemBase",props:{mod:null,info:null,compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(e){const t=e,n=B(()=>({...t.mod?.meta,...t.mod,...t.info})),i=Ce();return(o,s)=>{const l=le,a=we;return h(),M(a,{p4:"",flex:"~ gap2"},{default:x(()=>[d("div",ft,[A(o.$slots,"main",{},()=>[d("div",mt,[e.mod.isPackageModule?(h(),M(l,{key:0,to:Ot+(m(n).npm||m(n).name),target:"_blank",hover:"underline text-primary"},{default:x(()=>[I(N(m(n).name),1)]),_:1},8,["to"])):e.mod.entryPath?(h(),$("button",{key:1,role:"button",hover:"underline text-primary",onClick:s[0]||(s[0]=r=>m(i)(e.mod.entryPath))},N(m(n).name),1)):(h(),$("span",pt,N(m(n).name),1)),A(o.$slots,"badge")]),m(n).description?(h(),$("div",{key:0,class:U(e.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},N(m(n).description),3)):C("",!0),ht,m(n).website?(h(),$("div",_t,[vt,b(l,{to:m(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:x(()=>[I(N(m(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):C("",!0),m(n).github?(h(),$("div",yt,[gt,b(l,{to:m(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:x(()=>[I(N(m(n).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):C("",!0)]),A(o.$slots,"items")]),d("div",bt,[m(n).icon||e.mod.isPackageModule?(h(),$("div",xt,[m(n).icon?(h(),$("img",{key:0,src:Ct+m(n).icon,alt:e.mod.name,ma:""},null,8,$t)):C("",!0),wt])):C("",!0),m(n).maintainers?.length&&e.maintainers?(h(),$("div",kt,[(h(!0),$(R,null,W(m(n).maintainers,r=>(h(),M(l,{key:r.name,target:"_blank",to:Tt+r.github,title:r.name},{default:x(()=>[d("img",{src:Mt+r.github,"h-6":"","w-6":"","rounded-full":""},null,8,It)]),_:2},1032,["to","title"]))),128))])):C("",!0),o.$slots.actions?(h(),$(R,{key:2},[zt,d("div",St,[A(o.$slots,"actions")])],64)):C("",!0)])]),_:3})}}}),Nt={key:0,flex:"~ gap-2",title:"Open on filesystem"},Vt=d("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Lt=d("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Et=d("code",{"text-sm":"",op50:""},"Upgrading...",-1),Bt={key:1,"mx--2":""},At=["onClick"],Dt=d("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Rt=d("code",{"text-xs":""},"Update installed, click to restart",-1),Pt=[Dt,Rt],Ft={key:2,"mx--2":""},jt=["onClick"],Ht=d("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Ut={op50:""},qt=d("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Wt={"text-green":""},Kt={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Yt=d("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),Gt={"text-sm":"",op50:""},Jt=P({__name:"ModuleItem",props:{mod:null},setup(e){const t=e,n=B(()=>t.mod.info),i=B(()=>({...t.mod?.meta,...t.mod,...n.value}));return(o,s)=>{const l=Be,a=le,r=it,u=ue;return h(),M(u,{mod:e.mod,info:m(n)},{items:x(()=>[e.mod.entryPath?(h(),$("div",Nt,[Vt,b(l,{filepath:e.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):C("",!0),m(i).npm?(h(),M(r,{key:m(i).npm,"package-name":m(i).npm,options:{dev:!0}},{default:x(({info:f,update:_,state:v,id:w,restart:k})=>[v==="running"?(h(),M(a,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:w?`/modules/terminals?id=${encodeURIComponent(w)}`:void 0},{default:x(()=>[Lt,Et]),_:2},1032,["to"])):v==="updated"?(h(),$("div",Bt,[d("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:k},Pt,8,At)])):f?.needsUpdate?(h(),$("div",Ft,[d("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:p=>_()},[Ht,d("code",Ut,"v"+N(f.current),1),qt,d("code",Wt,"v"+N(f.latest),1)],8,jt)])):f?.latest?(h(),$("div",Kt,[Yt,d("code",Gt,"v"+N(f.current),1)])):C("",!0)]),_:1},8,["package-name"])):C("",!0)]),_:1},8,["mod","info"])}}}),Xt=P({__name:"NDropdown",props:{modelValue:{type:Boolean}},emits:[],setup(e,{emit:t}){const i=Ae(e,"modelValue",t,{passive:!0}),o=Z();return De(o,()=>{i.value=!1}),(s,l)=>{const a=ae;return h(),$("div",{ref_key:"el",ref:o,class:"relative"},[A(s.$slots,"trigger",{enabled:m(i),click:()=>i.value=!m(i)},()=>[b(a,{onClick:l[0]||(l[0]=r=>i.value=!m(i))},{default:x(()=>[I(" Dropdown ")]),_:1})]),d("div",{class:U(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[m(i)?"op-100":"op0 pointer-events-none -translate-y-1"]])},[A(s.$slots,"default")],2)],512)}}}),Zt=P({__name:"ModuleItemInstall",props:{item:null},emits:["start"],setup(e,{emit:t}){const n=e,i=ke(),o=B(()=>i.value.find(u=>u.name===n.item.npm)),s=B(()=>o.value&&o.value.isPackageModule),l=B(()=>o.value&&o.value.isPackageModule&&o.value.isUninstallable);async function a(u,f){const _=f==="install"?he.installNuxtModule:he.uninstallNuxtModule,v=await _(u.npm,!0);v.commands&&await Ie.start(u,v,f)&&(ze.value.push({name:u.npm,info:u,processId:v.processId}),t("start"),await _(u.npm,!1))}const r={};return(u,f)=>{const _=lt,v=Me,w=ae,k=Xt,p=ue;return h(),M(p,{mod:r,role:m(s)?"":"button",info:e.item,mb2:"","h-full":"",class:U(m(s)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:f[1]||(f[1]=c=>m(s)?null:a(e.item,"install"))},Re({_:2},[m(s)?{name:"badge",fn:x(()=>[b(_,{"bg-green-400:10":"","text-green-400":""},{default:x(()=>[I(" Installed ")]),_:1}),m(l)?(h(),M(k,{key:0,n:"sm green"},{trigger:x(({click:c})=>[b(v,{icon:"carbon-overflow-menu-vertical",onClick:V=>c()},null,8,["onClick"])]),default:x(()=>[b(w,{icon:"carbon-trash-can",n:"red",onClick:f[0]||(f[0]=c=>a(e.item,"uninstall"))},{default:x(()=>[I(" Uninstall ")]),_:1})]),_:1})):C("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Qt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var o=e.indexOf("Edge/");return o>0?parseInt(e.substring(o+5,e.indexOf(".",o)),10):-1}let G;function te(){te.init||(te.init=!0,G=Qt()!==-1)}var Q={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){te(),Se(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",G&&this.$el.appendChild(e),e.data="about:blank",G||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!G&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const en=je();Pe("data-v-b329ee4c");const tn={class:"resize-observer",tabindex:"-1"};Fe();const nn=en((e,t,n,i,o,s)=>(h(),M("div",tn)));Q.render=nn;Q.__scopeId="data-v-b329ee4c";Q.__file="src/components/ResizeObserver.vue";function J(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?J=function(t){return typeof t}:J=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J(e)}function on(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ye(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function sn(e,t,n){return t&&ye(e.prototype,t),n&&ye(e,n),e}function ge(e){return rn(e)||ln(e)||an(e)||un()}function rn(e){if(Array.isArray(e))return ne(e)}function ln(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function an(e,t){if(e){if(typeof e=="string")return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ne(e,t)}}function ne(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function un(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cn(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function dn(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s,l=function(r){for(var u=arguments.length,f=new Array(u>1?u-1:0),_=1;_<u;_++)f[_-1]=arguments[_];if(s=f,!(i&&r===o)){var v=n.leading;typeof v=="function"&&(v=v(r,o)),(!i||r!==o)&&v&&e.apply(void 0,[r].concat(ge(s))),o=r,clearTimeout(i),i=setTimeout(function(){e.apply(void 0,[r].concat(ge(s))),i=0},t)}};return l._clear=function(){clearTimeout(i),i=null},l}function Oe(e,t){if(e===t)return!0;if(J(e)==="object"){for(var n in e)if(!Oe(e[n],t[n]))return!1;return!0}return!1}var fn=function(){function e(t,n,i){on(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,i)}return sn(e,[{key:"createObserver",value:function(n,i){var o=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=cn(n),this.callback=function(a,r){o.options.callback(a,r),a&&o.options.once&&(o.frozen=!0,o.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},l=s.leading;this.callback=dn(this.callback,this.options.throttle,{leading:function(r){return l==="both"||l==="visible"&&r||l==="hidden"&&!r}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(a){var r=a[0];if(a.length>1){var u=a.find(function(_){return _.isIntersecting});u&&(r=u)}if(o.callback){var f=r.isIntersecting&&r.intersectionRatio>=o.threshold;if(f===o.oldResult)return;o.oldResult=f,o.callback(f,r)}},this.options.intersection),Se(function(){o.observer&&o.observer.observe(o.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function Ne(e,t,n){var i=t.value;if(i)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new fn(e,i,n);e._vue_visibilityState=o}}function mn(e,t,n){var i=t.value,o=t.oldValue;if(!Oe(i,o)){var s=e._vue_visibilityState;if(!i){Ve(e);return}s?s.createObserver(i,n):Ne(e,{value:i},n)}}function Ve(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var pn={beforeMount:Ne,updated:mn,unmounted:Ve},hn={itemsLimit:1e3},_n=/(auto|scroll)/;function Le(e,t){return e.parentNode===null?t:Le(e.parentNode,t.concat([e]))}var ee=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},vn=function(t){return ee(t,"overflow")+ee(t,"overflow-y")+ee(t,"overflow-x")},yn=function(t){return _n.test(vn(t))};function be(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=Le(e.parentNode,[]),n=0;n<t.length;n+=1)if(yn(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function ie(e){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(e)}var gn={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function bn(){return this.items.length&&ie(this.items[0])!=="object"}var oe=!1;if(typeof window<"u"){oe=!1;try{var xn=Object.defineProperty({},"passive",{get:function(){oe=!0}});window.addEventListener("test",null,xn)}catch{}}let $n=0;var ce={name:"RecycleScroller",components:{ResizeObserver:Q},directives:{ObserveVisibility:pn},props:{...gn,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,i=this.minItemSize;let o=1e4,s=0,l;for(let a=0,r=t.length;a<r;a++)l=t[a][n]||i,l<o&&(o=l),s+=l,e[a]={accumulator:s,size:l};return this.$_computedMinItemSize=o,e}return[]},simpleArray:bn,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let i=0,o=t.length;i<o;i++)n[t[i][e]]=i;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,i,o){const s=He({id:$n++,index:t,used:!0,key:i,type:o}),l=Ue({item:n,position:0,nr:s});return e.push(l),l},unuseView(e,t=!1){const n=this.$_unusedViews,i=e.nr.type;let o=n.get(i);o||(o=[],n.set(i,o)),o.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,i=this.gridItems||1,o=this.itemSecondarySize||n,s=this.$_computedMinItemSize,l=this.typeField,a=this.simpleArray?null:this.keyField,r=this.items,u=r.length,f=this.sizes,_=this.$_views,v=this.$_unusedViews,w=this.pool,k=this.itemIndexByKey;let p,c,V,z,O;if(!u)p=c=z=O=V=0;else if(this.$_prerender)p=z=0,c=O=Math.min(this.prerender,r.length),V=null;else{const g=this.getScroll();if(t){let T=g.start-this.$_lastUpdateScrollPosition;if(T<0&&(T=-T),n===null&&T<s||T<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=g.start;const L=this.buffer;g.start-=L,g.end+=L;let S=0;if(this.$refs.before&&(S=this.$refs.before.scrollHeight,g.start-=S),this.$refs.after){const T=this.$refs.after.scrollHeight;g.end+=T}if(n===null){let T,q=0,me=u-1,E=~~(u/2),pe;do pe=E,T=f[E].accumulator,T<g.start?q=E:E<u-1&&f[E+1].accumulator>g.start&&(me=E),E=~~((q+me)/2);while(E!==pe);for(E<0&&(E=0),p=E,V=f[u-1].accumulator,c=E;c<u&&f[c].accumulator<g.end;c++);for(c===-1?c=r.length-1:(c++,c>u&&(c=u)),z=p;z<u&&S+f[z].accumulator<g.start;z++);for(O=z;O<u&&S+f[O].accumulator<g.end;O++);}else{p=~~(g.start/n*i);const T=p%i;p-=T,c=Math.ceil(g.end/n*i),z=Math.max(0,Math.floor((g.start-S)/n*i)),O=Math.floor((g.end-S)/n*i),p<0&&(p=0),c>u&&(c=u),z<0&&(z=0),O>u&&(O=u),V=Math.ceil(u/i)*n}}c-p>hn.itemsLimit&&this.itemsLimitError(),this.totalSize=V;let y;const j=p<=this.$_endIndex&&c>=this.$_startIndex;if(j)for(let g=0,L=w.length;g<L;g++)y=w[g],y.nr.used&&(e&&(y.nr.index=k[y.item[a]]),(y.nr.index==null||y.nr.index<p||y.nr.index>=c)&&this.unuseView(y));const fe=j?null:new Map;let H,D,Y;for(let g=p;g<c;g++){H=r[g];const L=a?H[a]:H;if(L==null)throw new Error(`Key is ${L} on item (keyField is '${a}')`);if(y=_.get(L),!n&&!f[g].size){y&&this.unuseView(y);continue}D=H[l];let S=v.get(D),T=!1;if(!y)j?S&&S.length?y=S.pop():y=this.addView(w,g,H,L,D):(Y=fe.get(D)||0,(!S||Y>=S.length)&&(y=this.addView(w,g,H,L,D),this.unuseView(y,!0),S=v.get(D)),y=S[Y],fe.set(D,Y+1)),_.delete(y.nr.key),y.nr.used=!0,y.nr.index=g,y.nr.key=L,y.nr.type=D,_.set(L,y),T=!0;else if(!y.nr.used&&(y.nr.used=!0,T=!0,S)){const q=S.indexOf(y);q!==-1&&S.splice(q,1)}y.item=H,T&&(g===r.length-1&&this.$emit("scroll-end"),g===0&&this.$emit("scroll-start")),n===null?(y.position=f[g-1].accumulator,y.offset=0):(y.position=Math.floor(g/i)*n,y.offset=g%i*o)}return this.$_startIndex=p,this.$_endIndex=c,this.emitUpdate&&this.$emit("update",p,c,z,O),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:j}},getListenerTarget(){let e=be(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let i;if(this.pageMode){const o=e.getBoundingClientRect(),s=n?o.height:o.width;let l=-(n?o.top:o.left),a=n?window.innerHeight:window.innerWidth;l<0&&(a+=l,l=0),l+a>s&&(a=s-l),i={start:l,end:l+a}}else n?i={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:i={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return i},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,oe?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,i,o;if(this.pageMode){const s=be(this.$el),l=s.tagName==="HTML"?0:s[t.scroll],a=s.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[t.start]-a[t.start];n=s,i=t.scroll,o=e+l+u}else n=this.$el,i=t.scroll,o=e;n[i]=o},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const wn={key:0,ref:"before",class:"vue-recycle-scroller__slot"},kn={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function In(e,t,n,i,o,s){const l=qe("ResizeObserver"),a=We("observe-visibility");return Ke((h(),$("div",{class:U(["vue-recycle-scroller",{ready:o.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...r)=>s.handleScroll&&s.handleScroll(...r))},[e.$slots.before?(h(),$("div",wn,[A(e.$slots,"before")],512)):C("v-if",!0),(h(),M(_e(n.listTag),{ref:"wrapper",style:Je({[e.direction==="vertical"?"minHeight":"minWidth"]:o.totalSize+"px"}),class:U(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:x(()=>[(h(!0),$(R,null,W(o.pool,r=>(h(),M(_e(n.itemTag),Ye({key:r.nr.id,style:o.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${r.position}px) translate${e.direction==="vertical"?"X":"Y"}(${r.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&o.hoverKey===r.nr.key}]]},Ge(n.skipHover?{}:{mouseenter:()=>{o.hoverKey=r.nr.key},mouseleave:()=>{o.hoverKey=null}})),{default:x(()=>[A(e.$slots,"default",{item:r.item,index:r.nr.index,active:r.nr.used})]),_:2},1040,["style","class"]))),128)),A(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(h(),$("div",kn,[A(e.$slots,"after")],512)):C("v-if",!0),b(l,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[a,s.handleVisibilityChange]])}ce.render=In;ce.__file="src/components/RecycleScroller.vue";const zn={"h-full":"",flex:"~ col gap-4"},Sn={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},Cn=P({__name:"ModuleInstallList",emits:["close"],setup(e,{emit:t}){const n=Xe(),i=Z(""),o=B(()=>new at(n.value||[],{keys:["name","description","npm","category"]})),s=B(()=>i.value?o.value.search(i.value).map(l=>l.item):n.value);return(l,a)=>{const r=st,u=rt,f=Zt;return h(),$("div",zn,[b(r,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),b(u,{modelValue:m(i),"onUpdate:modelValue":a[0]||(a[0]=_=>Ze(i)?i.value=_:null),placeholder:"Search...",icon:"carbon-search",n:"primary",mx6:"","px-5":"","py-2":""},null,8,["modelValue"]),d("div",Sn,[b(m(ce),{class:"scroller",items:m(s),"item-size":160,"key-field":"name"},{default:x(({item:_})=>[b(f,{item:_,onStart:a[1]||(a[1]=v=>t("close"))},null,8,["item"])]),_:1},8,["items"])])])}}});function F(){}F.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.callback;typeof i=="function"&&(o=i,i={}),this.options=i;var s=this;function l(p){return o?(setTimeout(function(){o(void 0,p)},0),!0):p}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,r=t.length,u=1,f=a+r;i.maxEditLength&&(f=Math.min(f,i.maxEditLength));var _=[{newPos:-1,components:[]}],v=this.extractCommon(_[0],n,t,0);if(_[0].newPos+1>=a&&v+1>=r)return l([{value:this.join(n),count:n.length}]);function w(){for(var p=-1*u;p<=u;p+=2){var c=void 0,V=_[p-1],z=_[p+1],O=(z?z.newPos:0)-p;V&&(_[p-1]=void 0);var y=V&&V.newPos+1<a,j=z&&0<=O&&O<r;if(!y&&!j){_[p]=void 0;continue}if(!y||j&&V.newPos<z.newPos?(c=Tn(z),s.pushComponent(c.components,void 0,!0)):(c=V,c.newPos++,s.pushComponent(c.components,!0,void 0)),O=s.extractCommon(c,n,t,p),c.newPos+1>=a&&O+1>=r)return l(Mn(s,c.components,n,t,s.useLongestToken));_[p]=c}u++}if(o)(function p(){setTimeout(function(){if(u>f)return o();w()||p()},0)})();else for(;u<=f;){var k=w();if(k)return k}},pushComponent:function(t,n,i){var o=t[t.length-1];o&&o.added===n&&o.removed===i?t[t.length-1]={count:o.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,o){for(var s=n.length,l=i.length,a=t.newPos,r=a-o,u=0;a+1<s&&r+1<l&&this.equals(n[a+1],i[r+1]);)a++,r++,u++;return u&&t.components.push({count:u}),t.newPos=a,r},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function Mn(e,t,n,i,o){for(var s=0,l=t.length,a=0,r=0;s<l;s++){var u=t[s];if(u.removed){if(u.value=e.join(i.slice(r,r+u.count)),r+=u.count,s&&t[s-1].added){var _=t[s-1];t[s-1]=t[s],t[s]=_}}else{if(!u.added&&o){var f=n.slice(a,a+u.count);f=f.map(function(w,k){var p=i[r+k];return p.length>w.length?p:w}),u.value=e.join(f)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(r+=u.count)}}var v=t[l-1];return l>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(t[l-2].value+=v.value,t.pop()),t}function Tn(e){return{newPos:e.newPos,components:e.components.slice(0)}}var xe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,$e=/\S/,Ee=new F;Ee.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!$e.test(e)&&!$e.test(t)};Ee.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&xe.test(t[n])&&xe.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var de=new F;de.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var o=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};function On(e,t,n){return de.diff(e,t,n)}var Nn=new F;Nn.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Vn=new F;Vn.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function X(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?X=function(t){return typeof t}:X=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X(e)}var Ln=Object.prototype.toString,K=new F;K.useLongestToken=!0;K.tokenize=de.tokenize;K.castInput=function(e){var t=this.options,n=t.undefinedReplacement,i=t.stringifyReplacer,o=i===void 0?function(s,l){return typeof l>"u"?n:l}:i;return typeof e=="string"?e:JSON.stringify(se(e,null,null,o),o," ")};K.equals=function(e,t){return F.prototype.equals.call(K,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function se(e,t,n,i,o){t=t||[],n=n||[],i&&(e=i(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var l;if(Ln.call(e)==="[object Array]"){for(t.push(e),l=new Array(e.length),n.push(l),s=0;s<e.length;s+=1)l[s]=se(e[s],t,n,i,o);return t.pop(),n.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),X(e)==="object"&&e!==null){t.push(e),l={},n.push(l);var a=[],r;for(r in e)e.hasOwnProperty(r)&&a.push(r);for(a.sort(),s=0;s<a.length;s+=1)r=a[s],l[r]=se(e[r],t,n,i,r);t.pop(),n.pop()}else l=e;return l}var re=new F;re.tokenize=function(e){return e.slice()};re.join=re.removeEmpty=function(e){return e};const En=P({__name:"CodeDiff",props:{from:null,to:null,lang:null},setup(e){const t=e;function n(a,r){const u=On(a.trim(),r.trim()),f=[],_=[],v=[];for(const w of u){const k=w.value.trimEnd().split(`
3
- `);for(const p of k)w.added?(f.push(v.length),v.push(p)):(w.removed&&_.push(v.length),v.push(p))}return{added:f,removed:_,result:v.join(`
4
- `)}}const i=B(()=>n(t.from,t.to));function o(a){let r=0;return a.replace(/class="shiki/,'class="shiki diff').replace(/class="line"/g,u=>(r++,i.value.added.includes(r-1)?'class="line line-added"':i.value.removed.includes(r-1)?'class="line line-removed"':u))}const s=Z();Qe(l);function l(){const a=et(s);a&&a.querySelector(".line-added,.line-removed")?.scrollIntoView()}return(a,r)=>{const u=Te;return h(),M(u,{ref_key:"elRef",ref:s,code:m(i).result,lang:e.lang,"transform-rendered":o,onLoaded:l},null,8,["code","lang"])}}}),Bn={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},An={capitalize:""},Dn=d("p",{op50:""}," Following command will be executed in your terminal: ",-1),Rn={op50:""},Pn=d("p",null,[d("span",{op50:""},"After that, Nuxt will "),d("span",{"text-orange":""},"restart automatically"),I(". ")],-1),Fn={flex:"~ gap-3",mt2:"","justify-end":""},jn=P({__name:"ModuleActionDialog",setup(e){const t=tt(),n=Ce(),i={};return(o,s)=>{const l=ue,a=Te,r=ut,u=En,f=ct,_=ae,v=nt;return h(),M(m(Ie),null,{default:x(({resolve:w,args:k})=>[b(v,{"model-value":!0,onClose:p=>w(!1)},{default:x(()=>[b(l,{mod:i,info:k[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),d("div",Bn,[d("h2",{"text-xl":"",class:U(k[2]==="install"?"text-primary":"text-red")},[d("span",An,N(k[2]),1),I(),d("code",null,N(k[0].name),1),I("? ")],2),Dn,b(a,{code:k[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),d("p",Rn,[I(" Then your "),b(r,{role:"button",n:"primary",onClick:s[0]||(s[0]=p=>m(n)(m(t)?._nuxtConfigFile)),textContent:"Nuxt config"}),I(" will be updated as: ")]),b(u,{from:k[1].configOriginal,to:k[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Pn,d("div",Fn,[b(f,{n:"sm purple","flex-auto":"",icon:"carbon-chemistry"},{default:x(()=>[I(" Experimental. Backup your project first. ")]),_:1}),b(_,{onClick:p=>w(!1)},{default:x(()=>[I(" Cancel ")]),_:2},1032,["onClick"]),b(_,{n:"solid",capitalize:"",class:U(k[2]==="install"?"n-primary":"n-red"),onClick:p=>w(!0)},{default:x(()=>[I(N(k[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),Hn={class:"markdown-body"},Un=d("h1",null,"Modules",-1),qn=d("p",null,[I("Nuxt provides a module system to extend the framework core and simplify integrations. You don’t need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using "),d("code",null,"nuxt.config"),I(".")],-1),Wn=d("p",null,[I("You can explore the list of modules on "),d("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),I(" or install them directly inside the DevTools.")],-1),Kn=d("p",null,[d("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Yn=[Un,qn,Wn,Kn],Gn={__name:"modules",setup(e,{expose:t}){return t({frontmatter:{}}),(i,o)=>(h(),$("div",Hn,Yn))}},Jn={"h-full":"","w-full":"","of-auto":""},Xn={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},Zn=["src","alt"],Qn=d("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),ei={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},ti=d("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1),ni={op75:""},ii=d("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),oi=d("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1),si={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},ri="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",wi=P({__name:"modules",setup(e){const t=Z(!1),n=ke(),i=B(()=>n.value.filter(s=>s.isPackageModule)),o=B(()=>n.value.filter(s=>!s.isPackageModule));return(s,l)=>{const a=Jt,r=we,u=le,f=ot,_=Me,v=Cn,w=jn,k=Gn,p=dt;return h(),$(R,null,[d("div",Jn,[b(f,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${m(i).length}`},{default:x(()=>[(h(!0),$(R,null,W(m(i),c=>(h(),M(a,{key:c.name,mod:c},null,8,["mod"]))),128)),(h(!0),$(R,null,W("installingModules"in s?s.installingModules:m(ze),c=>(h(),M(u,{key:c.processId,block:"","min-h-30":"",to:`/modules/terminals?id=${encodeURIComponent(c.processId)}`},{default:x(()=>[b(r,{border:"1.5 dashed","h-full":"","animate-pulse":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-1 items-center justify-center",role:"button",class:"group"},{default:x(()=>[d("div",Xn,[d("img",{src:ri+c.info.icon,alt:c.info.name,ma:""},null,8,Zn),Qn]),d("div",ei,[ti,d("span",ni,"Installing "+N(c.name)+"...",1)])]),_:2},1024)]),_:2},1032,["to"]))),128)),b(r,{border:"1.5 dashed","min-h-30":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-2 items-center justify-center",role:"button",class:"group",onClick:l[0]||(l[0]=c=>t.value=!0)},{default:x(()=>[ii,oi]),_:1})]),_:1},8,["description"]),m(o).length?(h(),M(f,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${m(o).length}`},{default:x(()=>[(h(!0),$(R,null,W(m(o),c=>(h(),$(R,{key:c.meta?.name||c.entryPath},[c.meta?.name||c.entryPath?(h(),M(a,{key:0,mod:c},null,8,["mod"])):C("",!0)],64))),128))]),_:1},8,["description"])):C("",!0),b(ve,{name:"fade-in"},{default:x(()=>[m(t)?(h(),$("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:l[1]||(l[1]=c=>t.value=!1)})):C("",!0)]),_:1}),b(ve,{name:"slide-in"},{default:x(()=>[m(t)?(h(),$("div",si,[b(_,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",onClick:l[2]||(l[2]=c=>t.value=!1)}),b(v,{onClose:l[3]||(l[3]=c=>t.value=!1)})])):C("",!0)]),_:1}),b(w)]),b(p,null,{default:x(()=>[b(k)]),_:1})],64)}}});export{wi as default};
@@ -1,3 +0,0 @@
1
- import{_ as Z}from"./NTextInput.vue.efd43a47.js";import{_ as ee}from"./NIconButton.vue.13275ce3.js";import{_ as te}from"./Navbar.vue.76f856f0.js";import{_ as oe}from"./NLink.vue.8becbaf2.js";import{a as C,o,c as N,w as g,V as ne,h as a,v as x,n as ae,g as se,a8 as re,p as T,aB as ie,r as I,u as e,f as t,q as R,s as M,t as _,F as $,i as d,l as k,a3 as V,k as ce,P as B,aC as j,aD as le,aE as de,Q as pe,aF as me,aG as ue,aH as ge,aI as P,af as he,G as _e,aJ as fe}from"./entry.3c854225.js";import{_ as z}from"./NSectionBlock.4824dc31.js";import{_ as ve}from"./NCodeBlock.vue.3fea7f9d.js";import{a as be,u as D}from"./editor.6dcc09c7.js";import{_ as we}from"./HelpFab.vue.ebcc1356.js";import"./NIconTitle.vue.811968a5.js";import"./client.ce74bb6b.js";const xe={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},J=C({__name:"NTextExternalLink",props:{link:null},setup(n){return(m,i)=>(o(),N(re(n.link?oe:"div"),ae(se(n.link?{href:n.link,target:"_blank",rel:"noopener noreferrer"}:{})),{default:g(()=>[ne(m.$slots,"default"),n.link?(o(),a("div",xe)):x("",!0)]),_:3},16))}}),H=[{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."}],ye={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},ke=["onClick"],$e=t("div",{border:"b base","flex-auto":""},null,-1),Te={key:0,"x-divider":""},Ce={key:1,"x-divider":""},Se={flex:"~ gap-1 items-center",px4:"",py2:""},Ne=t("div",{"i-carbon-warning":"","text-orange":""},null,-1),Me={"w-full":"",p2:"",op75:""},Oe={key:1,m4:"",flex:"~ col gap-2"},Ae={flex:"~ gap-1 wrap items-center"},Ie={key:1},Re={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Be=C({__name:"OpenGraphMissingTabs",props:{tags:null,matchedRouteFilepath:null},setup(n){const m=n,i=T(()=>H.filter(c=>!m.tags?.some(p=>p.name===c.name))),l=T(()=>{let c={};const p={};i.value.forEach(h=>{h.seoMeta?Object.assign(p,h.seoMeta):c=ie(c,h.head)});const b=[];if(Object.keys(p).length){const h=JSON.stringify(p,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useSeoMeta(${h})`)}if(Object.keys(c).length){const h=JSON.stringify(c,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useHead(${h})`)}return b.join(`
2
-
3
- `)}),u=be(),O=D(),y=["Missing Tags","Code Snippet"],f=I(y[0]);return(c,p)=>{const b=J,h=V,S=ce,A=ve,E=z;return e(i).length?(o(),N(E,{key:0,text:"Missing Tags",description:`${e(i).length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:g(()=>[t("div",ye,[(o(),a($,null,R(y,(s,r)=>t("button",{key:r,px4:"",py2:"",border:"r t base",hover:"bg-active",class:M(s===e(f)?"":"border-b"),onClick:v=>f.value=s},[t("div",{class:M(s===e(f)?"":"op30"),capitalize:""},_(s),3)],10,ke)),64)),$e]),e(f)===y[0]?(o(),N(h,{key:0,grid:"~ cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:g(()=>[(o(!0),a($,null,R(e(i),(s,r)=>(o(),a($,{key:r},[r?(o(),a("div",Te)):x("",!0),r?(o(),a("div",Ce)):x("",!0),t("div",Se,[Ne,d(b,{op50:"",link:s.docs,n:"orange"},{default:g(()=>[k(_(s.name),1)]),_:2},1032,["link"])]),t("div",Me,_(s.description),1)],64))),128))]),_:1})):(o(),a("div",Oe,[t("p",Ae,[d(S,{icon:"carbon-copy",n:"xs","px-2":"",onClick:p[0]||(p[0]=s=>e(u)(e(l)))},{default:g(()=>[k(" Copy ")]),_:1}),k(" the following code snippet and paste it into your "),n.matchedRouteFilepath?(o(),N(S,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:p[1]||(p[1]=s=>e(O)(n.matchedRouteFilepath))},{default:g(()=>[k(" page component ")]),_:1})):(o(),a("span",Ie,"page component")),k(" to full fill the missing tags. ")]),d(h,{relative:"","n-code-block":""},{default:g(()=>[d(A,{code:e(l),lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),t("div",Re,[d(S,{icon:"carbon-copy",onClick:p[2]||(p[2]=s=>e(u)(e(l)))},{default:g(()=>[k(" Copy ")]),_:1})])]),_:1})]))]),_:1},8,["description"])):x("",!0)}}}),Ee={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},Le={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Fe={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Ge={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Pe={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},Ve={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"}},je=C({__name:"SocialFacebook",props:{card:null},setup(n){return(m,i)=>(o(),a("div",Ee,[t("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",Le,[t("div",Fe,_(n.card.url),1),t("div",Ge,[t("div",Pe,_(n.card.title),1),t("div",Ve,_(n.card.description),1)])])]))}}),ze={class:"max-w-[438px] min-w-[438px] border border-base rounded-[0.85714em] bg-base -outline-offset-1"},De={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-1"},Je={class:"mt-[0.32333em] overflow-hidden truncate whitespace-nowrap text-[14px] leading-[18px] lowercase op50"},He={class:"m-0 truncate text-[14px] font-semibold leading-[19px]"},Ue={class:"line-clamp-2 block select-none overflow-hidden break-words text-left text-[14px] leading-[18px] op50"},qe=C({__name:"SocialTwitter",props:{tags:null},setup(n){const m=n,i=T(()=>j(m.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"}]})),l=T(()=>i.value.image?m.tags.find(u=>u.tag==="meta"&&u.name==="twitter:card")?.value||"summary_large_image":"summary");return(u,O)=>(o(),a("div",ze,[t("div",{class:M(["cursor-pointer overflow-hidden leading-[1.3em]",e(l)==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[e(l)==="summary_large_image"?(o(),a("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(e(i).image)})`})},null,4)):(o(),a("div",{key:1,class:"h-[122px] w-[122px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(e(i).image)})`})},null,4)),t("div",De,[t("div",Je,_(e(i).url),1),t("div",He,_(e(i).title),1),t("div",Ue,_(e(i).description),1)])],2)]))}}),Ke={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},Qe={class:"break-words p-[10px] antialiased"},We={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},Ye={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},Xe={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},Ze=C({__name:"SocialLinkedin",props:{card:null},setup(n){return(m,i)=>(o(),a("div",Ke,[t("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",Qe,[t("div",We,[t("div",Ye,_(n.card.title),1),t("div",Xe,_(n.card.url),1)])])]))}}),et={"h-full":"","w-520":"",flex:"~ col"},tt={flex:"~ wrap","w-full":"","flex-none":""},ot=["onClick"],nt=t("div",{border:"b base","flex-auto":""},null,-1),at={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},st={key:0},rt={key:1},it={key:2},ct=C({__name:"SocialPreviewGroup",props:{tags:null},setup(n){const m=n,i=["twitter","facebook","linkedin"],l=I(i[0]),u=T(()=>j(m.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(O,y)=>{const f=je,c=qe,p=Ze;return o(),a("div",et,[t("div",tt,[(o(),a($,null,R(i,(b,h)=>t("button",{key:h,px4:"",py2:"",border:"r base",hover:"bg-active",class:M(b===e(l)?"":"border-b"),onClick:S=>l.value=b},[t("div",{class:M(b===e(l)?"":"op30"),capitalize:""},_(b),3)],10,ot)),64)),nt]),t("div",at,[e(l)==="facebook"?(o(),a("div",st,[d(f,{card:e(u)},null,8,["card"])])):e(l)==="twitter"?(o(),a("div",rt,[d(c,{tags:n.tags},null,8,["tags"])])):e(l)==="linkedin"?(o(),a("div",it,[d(p,{card:e(u)},null,8,["card"])])):x("",!0)])])}}}),lt={class:"markdown-body"},dt=le('<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),pt=[dt],mt={__name:"open-graph",setup(n,{expose:m}){return m({frontmatter:{}}),(l,u)=>(o(),a("div",lt,pt))}},ut={flex:"~","h-full":"","w-full":"","of-hidden":""},gt={"h-full":"","flex-auto":"","of-auto":""},ht={"flex-none":"",flex:"~ gap2 items-center"},_t={flex:"~ col"},ft={key:0,"x-divider":""},vt={key:1,"x-divider":""},bt={mr2:"",px4:"",py2:""},At=C({__name:"open-graph",setup(n){const m=I(0),i=de(),l=pe(async()=>(m.value,(await i.value?.resolveTags()).map(r=>{const v=r.props||{};return r.tag==="htmlAttrs"&&v.lang?{tag:"html",name:"lang",value:v.lang}:v.charset?{tag:"meta",name:"charset",value:v.charset}:{tag:r.tag,name:v.property??v.name??v.rel??r.tag,value:v.content??v.href??r.textContent??JSON.stringify(v)}})),[]),u=I(!0);function O(){m.value+=1}const y=me(),f=ue(),c=I(""),p=ge(),b=D();async function h(){c.value!==f.value.path&&y.value.push(c.value||"/")}const S=T(()=>c.value===f.value.path?[]:y.value.resolve(c.value||"/").matched),A=T(()=>{const s=p.value.find(r=>r.path===f.value?.matched?.[0]?.path);return s?.file||s?.meta?.file});function E(s){return H.find(r=>r.name===s.name)?.docs}return P(f).toBeTruthy().then(s=>{c.value=s.path}),P(y).toBeTruthy().then(s=>{s.afterEach(()=>{he(()=>{c.value=f.value.path})})}),(s,r)=>{const v=Z,L=ee,U=te,G=J,q=V,K=z,Q=Be,W=ct,Y=mt,X=we;return o(),a($,null,[t("div",ut,[t("div",gt,[d(U,null,{search:g(()=>[d(v,{modelValue:e(c),"onUpdate:modelValue":r[0]||(r[0]=w=>_e(c)?c.value=w:null),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:M(["px-5 py-2",e(f).path===e(c)?"":e(S).length?"text-green":"text-orange"]),onKeydown:fe(h,["enter"])},null,8,["modelValue","class","onKeydown"])]),actions:g(()=>[t("div",ht,[e(A)?(o(),N(L,{key:0,"text-lg":"",icon:"carbon:launch",title:"Open file in editor",onClick:r[1]||(r[1]=w=>e(b)(e(A)))})):x("",!0),d(L,{"text-lg":"",icon:"carbon:reset",title:"Refresh Data",onClick:O}),d(L,{"text-lg":"",icon:e(u)?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:r[2]||(r[2]=w=>u.value=!e(u))},null,8,["icon"])])]),_:1}),t("div",_t,[d(K,{text:"Tags",icon:"carbon:tag-group"},{default:g(()=>[d(q,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:g(()=>[(o(!0),a($,null,R(e(l),(w,F)=>(o(),a($,{key:F},[F?(o(),a("div",ft)):x("",!0),F?(o(),a("div",vt)):x("",!0),t("div",bt,[d(G,{op50:"",link:E(w),n:"primary"},{default:g(()=>[k(_(w.name),1)]),_:2},1032,["link"])]),d(G,{link:w.value.match(/^https?:\/\//)?w.value:void 0,"w-full":"",p2:"","font-mono":"",n:"primary"},{default:g(()=>[k(_(w.value),1)]),_:2},1032,["link"])],64))),128))]),_:1})]),_:1}),d(Q,{tags:e(l),"matched-route-filepath":e(A)},null,8,["tags","matched-route-filepath"])])]),e(u)&&e(l)?.length?(o(),N(W,{key:0,tags:e(l),border:"l base","w-540px":"","flex-none":""},null,8,["tags"])):x("",!0)]),d(X,null,{default:g(()=>[d(Y)]),_:1})],64)}}});export{At as default};
@@ -1 +0,0 @@
1
- import{a as V,b as j,R as D,a7 as I,al as R,aK as A,aL as L,D as M,p as T,c,w as o,o as s,u as e,h as d,f as t,i as l,t as r,v as a,F as p,aM as $,l as n,j as F,m as O,H as P,k as W}from"./entry.3c854225.js";import{_ as G}from"./Badge.0ce662e4.js";import{_ as H}from"./NpmVersionCheck.vue.9ff03721.js";import{_ as E}from"./NTip.vue.6c00393e.js";import{_ as K}from"./NPanelGrids.afa6e237.js";import"./NCodeBlock.vue.3fea7f9d.js";import"./client.ce74bb6b.js";import"./NCheckbox.vue.a470be6e.js";const U="0.5.3",q={key:0},z={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p8:"",px20:""},J=t("div",{"flex-auto":""},null,-1),Q={flex:"~ col","mt-20":"","items-center":""},X={flex:"~","mt--10":"","items-center":"","justify-center":""},Y={mb6:"","mt--1":"","text-center":"","text-sm":"",flex:"~ gap-1"},Z=t("span",{op40:""}," Nuxt DevTools ",-1),tt={op40:""},et={flex:"~ gap2 wrap"},ot={p4:"","theme-card-green":"",flex:"~ col auto"},nt=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),st={key:0,p4:"","theme-card-green":"",flex:"~ col auto"},lt=t("div",{"logos-vue":"","text-3xl":""},null,-1),it=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),at=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),ct=t("div",{"carbon-function":"","text-3xl":""},null,-1),rt=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),ut=t("div",{"carbon-plug":"","text-3xl":""},null,-1),_t={flex:"~ col gap2"},dt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},pt=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":""}),n(" Star on GitHub ")],-1),mt=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":""}),n(" Ideas & Suggestions ")],-1),ht=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":""}),n(" Project Roadmap ")],-1),xt=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":""}),n(" Bug Reports ")],-1),ft=t("div",{"i-carbon-settings":""},null,-1),gt=t("div",{"flex-auto":""},null,-1),vt={flex:"~ gap-1","items-center":"","justify-center":"","text-sm":"",op40:""},bt=t("span",null,"+",-1),kt=t("span",null,"+",-1),wt=t("span",null,"+",-1),yt=t("span",null,"+",-1),Lt=V({__name:"overview",setup(Ct){const m=j(),i=D(),v=I(),h=R(),b=A(),k=L(),w=M();function y(){F.value=!0,w.push("/")}const x=T(()=>m.value?.nuxt.vueApp.version);return(f,Nt)=>{const C=O,N=G,g=H,u=P,S=E,_=W,B=K;return s(),c(B,{"h-screen":"","w-full":"",flex:""},{default:o(()=>[e(i)?(s(),d("div",z,[J,t("div",Q,[t("div",X,[l(C,{"h-18":""}),t("button",{"mr--16":"","mt--6":"",onClick:y},[l(N,{"bg-green-400:10":"","text-green-400":"",title:"preview",textContent:"preview"})])]),t("div",Y,[Z,t("code",tt,"v"+r(e(U)),1),l(g,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",et,[t("div",ot,[nt,l(g,{"package-name":"nuxt",options:{dev:!0}})]),e(x)?(s(),d("div",st,[lt,t("code",null,"v"+r(e(x)),1)])):a("",!0),e(i)?(s(),d(p,{key:1},[e(i)&&e(i).pages&&e(m)?(s(),c(u,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:o(()=>[it,t("div",null,r(e(b).length)+" pages",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:o(()=>[at,t("div",null,r(e(v).length)+" components",1)]),_:1})):a("",!0),e(i)&&e(h)?(s(),c(u,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:o(()=>[ct,t("div",null,r(e(h).imports.length)+" imports",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:o(()=>[rt,t("div",null,r(e(i)._installedModules.length)+" modules",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:o(()=>[ut,t("div",null,r(e(i).plugins.length)+" plugins",1)]),_:1})):a("",!0)],64)):a("",!0)]),t("div",_t,[("showConnectionWarning"in f?f.showConnectionWarning:e($))?(s(),c(S,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:o(()=>[n(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):a("",!0)]),t("div",dt,[pt,mt,ht,xt,l(u,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:o(()=>[ft,n(" Settings ")]),_:1})]),gt,t("div",vt,[n(" Press "),e(k)?(s(),d(p,{key:0},[l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" ⇧ Shift ")]),_:1}),bt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" ⌥ Option ")]),_:1}),kt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)):(s(),d(p,{key:1},[l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" Shift ")]),_:1}),wt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" Alt ")]),_:1}),yt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)),n(" to toggle DevTools ")])])):(s(),d("div",q," Loading... "))]),_:1})}}});export{Lt as default};
@@ -1 +0,0 @@
1
- import{_ as T}from"./NTextInput.vue.efd43a47.js";import{_ as M}from"./Badge.0ce662e4.js";import{a as B,r as F,p as R,aP as j,a4 as q,u as t,o,h as s,f as e,t as $,c as g,w as k,aQ as G,F as h,q as I,v,i as p,l as V,s as L,k as H,aR as S,aF as J,aG as W,R as Q,Y,aH as X,aI as E,af as Z,G as ee,aJ as te,y as oe}from"./entry.3c854225.js";import{_ as A}from"./FilepathItem.vue.7eb51d4e.js";import{u as ne}from"./editor.6dcc09c7.js";import{_ as ae}from"./NSectionBlock.4824dc31.js";import{_ as se}from"./LaunchPage.vue.63709998.js";import{_ as re}from"./HelpFab.vue.ebcc1356.js";import"./NIconTitle.vue.811968a5.js";import"./NMarkdown.vue.f8a61172.js";import"./client.ce74bb6b.js";import"./NPanelGrids.afa6e237.js";import"./NIconButton.vue.13275ce3.js";const le={block:"","cursor-pointer":""},ie={p2:""},ue=["onSubmit"],ce=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),de={flex:"~","items-center":"",p2:"","font-mono":"","text-sm":""},pe={key:1},_e=B({__name:"RoutePathItem",props:{route:null},emits:["navigate"],setup(c,{emit:u}){const l=c,_=F([]),f=R(()=>{const n=j(l.route.path);return _.value=Array.from({length:n.length},()=>""),n}),y=R(()=>f.value.map((n,m)=>n[0]===":"?_.value[m]:n).join("").replace(/\/+/g,"/")),x=R(()=>l.route.path.includes(":"));function i(){u("navigate",y.value)}return(n,m)=>{const d=T,w=H,a=q("VDropdown");return t(x)?(o(),g(a,{key:1},{popper:k(({hide:r})=>[e("div",ie,[e("form",{flex:"~ col",onSubmit:G(()=>{i(),r()},["prevent"])},[t(x)?(o(),s(h,{key:0},[ce,e("div",de,[(o(!0),s(h,null,I(t(f),(b,C)=>(o(),s(h,{key:C},[b[0]===":"?(o(),g(d,{key:0,modelValue:t(_)[C],"onUpdate:modelValue":P=>t(_)[C]=P,"w-20":"","n-sm":"",placeholder:b.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",pe,$(b),1))],64))),128))])],64)):v("",!0),p(w,{block:"",n:"primary"},{default:k(()=>[V(" Navigate ")]),_:1})],40,ue)])]),default:k(()=>[e("code",le,[(o(!0),s(h,null,I(t(f),(r,b)=>(o(),s("span",{key:b,class:L(r[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},$(r[0]===":"?r.slice(1):r),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:i},[e("code",null,$(c.route.path),1)]))}}}),me={"w-full":""},he=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),fe={"w-20":"","pr-1":""},ge={flex:"","items-center":"","justify-end":""},ve={"text-sm":""},ye={flex:"inline gap3","items-center":""},xe={op0:"","group-hover:op100":"",flex:"~ gap1"},be=["onClick"],ke=e("div",{"i-carbon-script-reference":""},null,-1),$e=[ke],we={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","font-mono":"","text-sm":"",op50:""},Ce={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","font-mono":"","text-sm":"",op50:""},Ne={"w-0":"","ws-nowrap":"","text-center":"","font-mono":"","text-sm":""},Re={key:0},Pe=["onClick"],Ve=B({__name:"RoutesTable",props:{pages:null,layouts:null,matched:null,matchedPending:null},emits:["navigate"],setup(c){const u=c,l=ne(),_=S(),f=R(()=>[...u.pages].sort((i,n)=>i.path.localeCompare(n.path)));function y(i){const n=u.layouts.find(m=>m.name===i);n&&l(n.file)}function x(i){if(typeof i=="string")return _.value?.middleware.find(n=>n.name===i)?.path}return(i,n)=>{const m=M,d=_e,w=A;return o(),s("div",null,[e("table",me,[he,e("tbody",null,[(o(!0),s(h,null,I(t(f),a=>(o(),s("tr",{key:a.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",fe,[e("div",ge,[c.matched.find(r=>r.name===a.name)?(o(),g(m,{key:0,"bg-green-400:10":"","text-green-400":"",title:"active",textContent:"active"})):v("",!0),c.matchedPending.find(r=>r.name===a.name)?(o(),g(m,{key:1,"bg-teal-400:10":"","text-teal-400":"",title:"next",textContent:"next"})):v("",!0)])]),e("td",ve,[e("div",ye,[p(d,{route:a,class:L(c.matched.find(r=>r.name===a.name)?"text-primary":c.matchedPending.find(r=>r.name===a.name)?"text-teal":""),onNavigate:n[0]||(n[0]=r=>i.$emit("navigate",r))},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:r=>t(l)(a.file||a.meta?.file)},$e,8,be)):v("",!0)])])]),e("td",we,$(a.name),1),e("td",Ce,[p(w,{filepath:x(a.meta.middleware),override:`${a.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ne,[a.meta.layout===!1?(o(),s("span",Re,"-")):a.meta.layout?(o(),s("button",{key:1,onClick:r=>y(a.meta.layout)},$(a.meta.layout),9,Pe)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:n[1]||(n[1]=r=>y("default"))}," (default) "))])]))),128))])])])}}}),Ie={class:"markdown-body"},Be=e("h1",null,"Pages",-1),Le=e("p",null,[V("One core feature of Nuxt is the file system router. Every Vue file inside the "),e("code",null,"pages/"),V(" directory creates a corresponding URL (or route) that displays the contents of the file. By using dynamic imports for each page, Nuxt leverages code-splitting to ship the minimum amount of JavaScript for the requested route.")],-1),Ee=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Te=e("hr",null,null,-1),Me=e("h1",null,"Middlewares",-1),Fe=e("p",null,"Nuxt provides a customizable route middleware framework you can use throughout your application, ideal for extracting code that you want to run before navigating to a particular route.",-1),Se=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Ae=[Be,Le,Ee,Te,Me,Fe,Se],De={__name:"pages",setup(c,{expose:u}){return u({frontmatter:{}}),(_,f)=>(o(),s("div",Ie,Ae))}},Ue={key:0,"h-full":"","of-auto":""},ze={border:"b base",flex:"~ col gap1",px4:"",py3:"","navbar-glass":""},Ke=e("span",{op50:""},"Navigate from ",-1),Oe={"font-mono":""},je=e("span",{op50:""}," to ",-1),qe={key:1,op50:""},Ge=e("span",null,[V("Press "),e("b",{"font-bold":""},"Enter"),V(" to navigate")],-1),He={key:0,"text-orange":"",op75:""},Je={key:1,op50:""},We={"w-full":""},Qe=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),Ye={mr1:""},dt=B({__name:"pages",setup(c){const u=J(),l=W(),_=Q(),f=S(),y=Y(),x=X(),i=R(()=>f.value?.middleware||[]),n=F("");E(l).toBeTruthy().then(a=>{n.value=a.path}),E(u).toBeTruthy().then(a=>{a.afterEach(()=>{Z(()=>{n.value=l.value.path})})});async function m(){n.value!==l.value.path&&u.value.push(n.value||"/")}const d=R(()=>n.value===l.value.path?[]:u.value.resolve(n.value||"/").matched);function w(a){u.value.push(a)}return(a,r)=>{const b=T,C=Ve,P=ae,D=M,U=A,z=se,K=De,O=re;return o(),s(h,null,[t(_)?.pages&&t(u)?(o(),s("div",Ue,[e("div",ze,[e("div",null,[t(l).path!==t(n)?(o(),s(h,{key:0},[Ke,e("span",Oe,$(t(l).path),1),je],64)):(o(),s("span",qe,"Current route"))]),p(b,{modelValue:t(n),"onUpdate:modelValue":r[0]||(r[0]=N=>ee(n)?n.value=N:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:L(t(l).path===t(n)?"":t(d).length?"text-green":"text-orange"),onKeydown:te(m,["enter"])},null,8,["modelValue","class","onKeydown"]),e("div",null,[t(l).path!==t(n)?(o(),s(h,{key:0},[Ge,t(d).length?v("",!0):(o(),s("span",He," (no match)"))],64)):(o(),s("span",Je,"Edit path above to navigate"))])]),t(d).length?(o(),g(P,{key:0,icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:k(()=>[p(C,{pages:t(d),layouts:t(y)||[],matched:[],"matched-pending":t(d),onNavigate:w},null,8,["pages","layouts","matched-pending"])]),_:1})):v("",!0),p(P,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t(x).length} routes registered in your application`,padding:"pr5"},{default:k(()=>[p(C,{pages:t(x),layouts:t(y)||[],matched:t(l).matched,"matched-pending":t(d),onNavigate:w},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(i).length?(o(),g(P,{key:1,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(i).length} middleware registered in your application`,padding:"px13"},{default:k(()=>[e("table",We,[Qe,(o(!0),s(h,null,I(t(i),N=>(o(),s("tr",{key:N.path,"h-7":""},[e("td",null,[e("span",Ye,$(N.name),1),N.global?(o(),g(D,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"global"})):v("",!0)]),e("td",null,[p(U,{filepath:N.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):v("",!0)])):(o(),g(z,{key:1,icon:"carbon-tree-view-alt",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",handle(){return("rpc"in a?a.rpc:t(oe)).runWizard("enablePages")}}]},null,8,["actions"])),p(O,null,{default:k(()=>[p(K)]),_:1})],64)}}});export{dt as default};
@@ -1,9 +0,0 @@
1
- import{_ as ie}from"./Navbar.vue.76f856f0.js";import{_ as Y}from"./Badge.0ce662e4.js";import{a as Z,R as ce,ad as de,p,r as k,o as a,h as m,f as i,c as x,w as l,l as h,t as y,u as e,s as b,aW as G,F as j,q as W,G as ee,i as s,v as $,k as pe,M as me,aX as fe,E as _e,aY as ve,aZ as he,H as ye,a3 as ge}from"./entry.3c854225.js";import{_ as xe}from"./NSelect.vue.2f75a7b4.js";import{_ as be}from"./NTextInput.vue.efd43a47.js";import{_ as Ce}from"./CodeSnippets.vue.63e1babe.js";import{_ as te}from"./NPanelGrids.afa6e237.js";import{_ as ke}from"./NCodeBlock.vue.3fea7f9d.js";import{u as $e}from"./editor.6dcc09c7.js";import{C as X}from"./constants.d7bcda3c.js";import{_ as Re}from"./PanelLeftRight.vue.9e8aa6b8.js";import{F as Te}from"./fuse.esm.88e2763d.js";import"./client.ce74bb6b.js";const qe={"h-full":"","w-full":"",flex:"~ col"},je={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Se={flex:"~ gap2"},Ve={flex:"~ gap2","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},we=i("div",{"flex-auto":""},null,-1),Ee={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ne={"text-right":"","font-mono":""},Ue={key:1,relative:""},Pe={key:2,px4:"",py2:"",flex:"~ col gap-2",border:"b base"},Be={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Me=i("div",null,"Response",-1),Oe={key:1,"text-xs":"",op50:""},Le=i("div",{"flex-auto":""},null,-1),De=i("div",{op50:""}," Request finished in ",-1),Fe=Z({__name:"ServerRouteDetails",props:{route:{type:Object,required:!0}},setup(P){const B=P,R=ce(),u=de({contentType:"text/plain",data:"",statusCode:200,error:void 0}),T=p(()=>u.contentType.includes("application/json")?"json":u.contentType.includes("text/html")?"html":u.contentType.includes("text/css")?"css":u.contentType.includes("text/javascript")?"javascript":u.contentType.includes("text/xml")||u.contentType.includes("application/xml")?"xml":"text"),q=p(()=>T.value==="json"?JSON.stringify(u.data,null,2):u.data),w=k(0),C=k(!1),E=k(!1),A=$e(),M=p(()=>B.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),S=p(()=>M.value?.filter(o=>o.startsWith(":")||o.startsWith("**:"))||[]),g=k(B.route.method||"GET"),N=k({}),U=k([{key:"",value:""}]),V=k([{key:"",value:""}]),f=k([{key:"Content-Type",value:"application/json"}]),z=p(()=>V.value.filter(({key:o})=>o).length),J=p(()=>f.value.filter(({key:o})=>o).length),H=p(()=>{const o={};for(let t=0;t<U.value.length;t++){const{key:n,value:c}=U.value[t];o[n]=c}return Object.keys(o)[0]?o:null}),oe=p(()=>{let o=R.value?.devServer.url||"http://localhost";o.charAt(o.length-1)==="/"&&(o=o.slice(0,-1));const t=R.value?.devServer.port||3e3;return o.includes(`:${t}`)?o:`${o}:${t}`}),O=p(()=>{let o=new URLSearchParams(Object.fromEntries(V.value.filter(({key:c})=>c).map(({key:c,value:_})=>[c,_]))).toString();o&&(o=`?${o}`);const t=(M.value?.map(c=>(c.startsWith(":")||c.startsWith("**:"))&&N.value[c]||c).join("")||"")+o;let n=R.value?.app.baseURL||"";return(n==="./"||n===".")&&(n=""),n.endsWith("/")&&(n=n.slice(0,-1)),n+t}),ne=p(()=>oe.value+O.value);async function K(){E.value=!0,C.value=!0,Object.assign(u,{lang:"text",contentType:"",data:"",content:"",error:void 0});const o=Date.now();try{u.data=await $fetch(ne.value,{method:g.value.toUpperCase(),headers:Object.fromEntries(f.value.filter(({key:t,value:n})=>t&&n).map(({key:t,value:n})=>[t,n])),query:Object.fromEntries(V.value.filter(({key:t,value:n})=>t&&n).map(({key:t,value:n})=>[t,n])),body:H.value,onResponse({response:t}){u.contentType=(t.headers.get("content-type")||"").toString().toLowerCase().trim(),u.statusCode=t.status},onResponseError(t){u.error=t.response._data,u.data=t.response._data}})}catch{}C.value=!1,w.value=Date.now()-o}const Q=p(()=>{const o=[],t=[],n=f.value.filter(({key:_,value:v})=>_&&v&&!(_==="Content-Type"&&v==="application/json")).map(({key:_,value:v})=>` '${_}': '${v}'`).join(`,
2
- `);g.value.toUpperCase()!=="GET"&&t.push(`method: '${g.value.toUpperCase()}'`),n&&t.push(`headers: {
3
- ${n}
4
- }`),H.value&&t.push(`body: ${JSON.stringify(H.value,null,2)}`);const c=t.length?`, {
5
- ${t.join(`,
6
- `).split(`
7
- `).map(_=>` ${_}`).join(`
8
- `)}
9
- }`:"";return o.push({name:"useFetch",lang:"javascript",docs:X.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${O.value}'${c})`}),o.push({name:"$fetch",lang:"javascript",docs:X.nuxt.$fetch,code:`await $fetch('${O.value}'${c})`}),o}),d=k(S.value.length?"params":"query"),L=p(()=>{if(d.value==="query")return V.value;if(d.value==="body")return U.value;if(d.value==="headers")return f.value}),se=["GET","POST","PUT","PATCH","DELETE","HEAD"];return(o,t)=>{const n=pe,c=xe,_=be,v=me,ae=Ce,re=te,le=fe,I=Y,ue=ke;return a(),m("div",qe,[i("div",je,[i("div",Se,[P.route.method?(a(),x(n,{key:0,class:b(("getRequestMethodClass"in o?o.getRequestMethodClass:e(G))(e(g))),"pointer-events-none":"",tabindex:"-1"},{default:l(()=>[h(y(e(g).toUpperCase()),1)]),_:1},8,["class"])):(a(),x(c,{key:1,modelValue:e(g),"onUpdate:modelValue":t[0]||(t[0]=r=>ee(g)?g.value=r:null),class:b(("getRequestMethodClass"in o?o.getRequestMethodClass:e(G))(e(g)))},{default:l(()=>[(a(),m(j,null,W(se,r=>i("option",{key:r,class:b(("getRequestMethodClass"in o?o.getRequestMethodClass:e(G))(r))},y(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),s(_,{"model-value":e(O),disabled:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"primary xs"},null,8,["model-value"]),s(n,{n:"primary solid",onClick:K},{default:l(()=>[s(v,{icon:"carbon:send"})]),_:1})])]),i("div",Ve,[e(S).length?(a(),x(n,{key:0,class:b(e(d)==="params"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[1]||(t[1]=r=>d.value="params")},{default:l(()=>[s(v,{icon:"i-carbon-text-selection"}),h(" Params ("+y(e(S).length)+") ",1)]),_:1},8,["class"])):$("",!0),s(n,{class:b(e(d)==="query"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[2]||(t[2]=r=>d.value="query")},{default:l(()=>[s(v,{icon:"i-carbon-help"}),h(" Query "+y(e(z)?`(${e(z)})`:""),1)]),_:1},8,["class"]),e(g)!=="GET"?(a(),x(n,{key:1,class:b(e(d)==="body"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[3]||(t[3]=r=>d.value="body")},{default:l(()=>[s(v,{icon:"i-carbon-document"}),h(" Body ")]),_:1},8,["class"])):$("",!0),s(n,{class:b(e(d)==="headers"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[4]||(t[4]=r=>d.value="headers")},{default:l(()=>[s(v,{icon:"i-carbon-html-reference"}),h(" Headers "+y(e(J)?`(${e(J)})`:""),1)]),_:1},8,["class"]),s(n,{class:b(e(d)==="snippet"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[5]||(t[5]=r=>d.value="snippet")},{default:l(()=>[s(v,{icon:"carbon:code"}),h(" Snippets ")]),_:1},8,["class"]),we,s(n,{icon:"carbon-launch",onClick:t[6]||(t[6]=r=>e(A)(P.route.filepath))},{default:l(()=>[h(" Open in Editor ")]),_:1})]),e(d)==="params"?(a(),m("div",Ee,[(a(!0),m(j,null,W(e(S),r=>(a(),m(j,{key:r},[i("div",Ne,y(r),1),s(_,{modelValue:e(N)[r],"onUpdate:modelValue":D=>e(N)[r]=D,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):$("",!0),e(d)==="snippet"?(a(),m("div",Ue,[e(Q).length?(a(),x(ae,{key:0,border:"b base","code-snippets":e(Q)},null,8,["code-snippets"])):$("",!0)])):e(L)?(a(),m("div",Pe,[(a(!0),m(j,null,W(e(L),(r,D)=>(a(),m("div",{key:D,flex:"~ gap-2","justify-around":""},[s(_,{modelValue:r.key,"onUpdate:modelValue":F=>r.key=F,placeholder:"Key","flex-1":"","font-mono":"",n:"sm"},null,8,["modelValue","onUpdate:modelValue"]),s(_,{modelValue:r.value,"onUpdate:modelValue":F=>r.value=F,placeholder:"Value","flex-1":"","font-mono":"",n:"sm"},null,8,["modelValue","onUpdate:modelValue"]),s(n,{n:"red",onClick:F=>e(L).splice(D,1)},{default:l(()=>[s(v,{icon:"carbon:delete"})]),_:2},1032,["onClick"])]))),128)),i("div",null,[s(n,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:t[7]||(t[7]=r=>e(L).push({key:"",value:""}))},{default:l(()=>[h(" Add ")]),_:1})])])):$("",!0),e(E)?e(C)?(a(),x(le,{key:4,"z-10":"","flex-auto":"","backdrop-blur":""},{default:l(()=>[h(" Fetching... ")]),_:1})):(a(),m(j,{key:5},[i("div",Be,[Me,e(u).error?(a(),x(I,{key:0,"bg-red-400:10":"","text-red-400":""},{default:l(()=>[h(" Error ")]),_:1})):$("",!0),s(I,{class:b({"bg-orange-400:10 text-orange-400":e(u).error,"bg-green-400:10 text-green-400":!e(u).error})},{default:l(()=>[h(y(e(u).statusCode),1)]),_:1},8,["class"]),e(u).contentType?(a(),m("code",Oe,y(e(u).contentType),1)):$("",!0),Le,De,s(I,{"bg-green-400:10":"","text-green-400":""},{default:l(()=>[h(y(e(w))+" ms ",1)]),_:1})]),s(ue,{"flex-auto":"","overflow-auto":"","py-2":"",code:e(q),lang:e(T)},null,8,["code","lang"])],64)):(a(),x(re,{key:3},{default:l(()=>[s(n,{n:"primary",onClick:K},{default:l(()=>[s(v,{icon:"carbon:send"}),h(" Send request ")]),_:1})]),_:1}))])}}}),Ge={flex:"~ gap1","text-sm":"",op50:""},We={key:0},Ae={"w-12":"","flex-none":"","text-right":""},He={"font-mono":"","text-sm":""},Ie=i("div",{"x-divider":""},null,-1),ze=i("span",{op75:""},"Select a route to start",-1),lt=Z({__name:"server-routes",setup(P){const B=_e(),R=ve(),u=p(()=>new Te(R.value||[],{keys:["method","route"],shouldSort:!0})),T=p(()=>R.value?.find(C=>C.path===B.query?.path)),q=k(""),w=p(()=>R.value?q.value?u.value.search(q.value).map(C=>C.item):R.value:[]);return(C,E)=>{const A=ie,M=Y,S=ye,g=Fe,N=ge,U=te,V=Re;return a(),x(V,null,{left:l(()=>[s(A,{search:e(q),"onUpdate:search":E[0]||(E[0]=f=>ee(q)?q.value=f:null),pb2:""},{default:l(()=>[i("div",Ge,[e(q)?(a(),m("span",We,y(e(w).length)+" matched · ",1)):$("",!0),i("span",null,y(e(R)?.length)+" routes in total",1)])]),_:1},8,["search"]),(a(!0),m(j,null,W(e(w),f=>(a(),m(j,{key:f.id},[s(S,{flex:"~ gap-2","items-center":"","hover-bg-active":"",px2:"",py1:"",class:b([{"bg-active":e(T)?.path===f.path}]),to:{query:{path:f.path}}},{default:l(()=>[i("div",Ae,[s(M,{class:b(("getRequestMethodClass"in C?C.getRequestMethodClass:e(G))(f.method||"*")),title:"updates available",textContent:y((f.method||"*").toUpperCase())},null,8,["class","textContent"])]),i("span",He,y(f.route),1)]),_:2},1032,["class","to"]),Ie],64))),128))]),right:l(()=>[(a(),x(he,{max:10},[e(T)?(a(),x(g,{key:e(T).path,route:e(T)},null,8,["route"])):$("",!0)],1024)),e(T)?$("",!0):(a(),x(U,{key:0},{default:l(()=>[s(N,{px6:"",py2:""},{default:l(()=>[ze]),_:1})]),_:1}))]),_:1})}}});export{lt as default};
@@ -1 +0,0 @@
1
- import{_ as ne}from"./NIconButton.vue.13275ce3.js";import{_ as oe}from"./NSelect.vue.2f75a7b4.js";import{_ as ae}from"./NTextInput.vue.efd43a47.js";import{a as se,a$ as re,D as le,r as I,p as S,E,b0 as R,ah as ue,a1 as ie,ag as de,e as ce,y as p,u as n,c as _,w as u,b1 as z,o as r,f as l,i as d,h as c,q as U,t as v,F as x,G as j,l as i,s as F,aJ as q,v as P,ac as me,z as pe,b2 as _e,aQ as fe,H as ye,M as ve,k as ge,a3 as he}from"./entry.3c854225.js";import{_ as ke}from"./NLink.vue.8becbaf2.js";import{_ as be}from"./NPanelGrids.afa6e237.js";import{_ as xe}from"./PanelLeftRight.vue.9e8aa6b8.js";import{_ as we}from"./FilepathItem.vue.7eb51d4e.js";import{U as Ke}from"./json-editor-vue.cb8f6785.js";import"./editor.6dcc09c7.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ve={class:"w-full text-sm"},Ne=["value"],$e=l("div",{"x-divider":""},null,-1),Ie={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Se={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},Ue={class:"flex items-center gap-4"},je={key:1},qe=["onKeyup"],Le=l("br",null,null,-1),Me={key:0,op50:""},Be={key:1},De=l("code",null,"nitro.storage",-1),Ae=l("br",null,null,-1),Ee={"font-bold":""},Re=l("br",null,null,-1),ze={"text-sm":""},Fe=l("br",null,null,-1),tt=se({__name:"storage",async setup(Pe){let m,g;const T=re(),h=le(),k=I(""),y=I(""),a=S({get(){return E().query?.storage},set(t){h.replace({query:{storage:t}})}}),e=I(),b=S(()=>E().query?.key),{data:w}=([m,g]=R(()=>z("storageMounts",()=>p.getStorageMounts())),m=await m,g(),m),{data:K,refresh:L}=([m,g]=R(async()=>z("storageKeys",async()=>a.value?await p.getStorageKeys(a.value):[])),m=await m,g(),m),G=T.hook("storage:key:update",async(t,s)=>{if(!(!a.value||t.split(":")[0]!==a.value)&&(await L(),b.value===t)){if(s==="remove")return h.replace({query:{storage:a.value}});await V(b.value)}});ue(G),ie(a,L),de(async()=>{if(!b.value){e.value=null;return}V(b.value)}),ce("keydown",t=>{t.key==="s"&&(t.ctrlKey||t.metaKey)&&(N(),t.preventDefault())});function C(t){return t.replace(`${a.value}:`,"")}const H=S(()=>K.value?K.value.filter(t=>t.includes(k.value)):[]);async function V(t){const s=await p.getStorageItem(t);e.value={key:t,updatedKey:C(t),editingKey:!1,content:s,updatedContent:s}}async function J(){if(!y.value||!a.value)return;const t=`${a.value}:${y.value}`;K.value?.includes(t)||await p.setStorageItem(t,""),h.replace({query:{storage:a.value,key:t}}),y.value=""}async function N(){e.value&&(await p.setStorageItem(e.value.key,e.value.updatedContent),await V(e.value.key))}async function O(){!e.value||!a.value||(await p.removeStorageItem(e.value.key),e.value=null)}async function Q(){if(!e.value||!a.value)return;const t=`${a.value}:${e.value.updatedKey}`;await p.setStorageItem(t,e.value.updatedContent),await p.removeStorageItem(e.value.key),h.replace({query:{storage:a.value,key:t}})}return(t,s)=>{const W=ne,X=oe,$=ae,Y=ye,Z=ve,M=ge,B=ke,D=he,A=be,ee=xe,te=we;return n(a)?(r(),_(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[l("div",Ce,[d(W,{icon:"carbon-chevron-left","ml--1":"",onClick:s[0]||(s[0]=o=>a.value="")}),l("div",Ve,[d(X,{modelValue:n(a),"onUpdate:modelValue":s[1]||(s[1]=o=>j(a)?a.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(r(!0),c(x,null,U(n(w),(o,f)=>(r(),c("option",{key:f,value:f},v(f),9,Ne))),128))]),_:1},8,["modelValue"])])]),d($,{modelValue:n(k),"onUpdate:modelValue":s[2]||(s[2]=o=>j(k)?k.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(r(!0),c(x,null,U(n(H),o=>(r(),c(x,{key:o},[d(Y,{block:"",truncate:"",px2:"",py1:"","font-mono":"","text-sm":"",to:{query:{key:o,storage:n(a)}},class:F(o===n(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover")},{default:u(()=>[i(v(C(o)),1)]),_:2},1032,["to","class"]),$e],64))),128)),d($,{modelValue:n(y),"onUpdate:modelValue":s[3]||(s[3]=o=>j(y)?y.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:q(J,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[n(e)?.key?(r(),c("div",Ie,[l("div",Se,[l("div",Ue,[n(e).editingKey?(r(),_($,{key:0,modelValue:n(e).updatedKey,"onUpdate:modelValue":s[4]||(s[4]=o=>n(e).updatedKey=o),onKeyup:q(Q,["enter"])},null,8,["modelValue","onKeyup"])):(r(),c("code",je,[i(v(C(n(e).key))+" ",1),d(Z,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:s[5]||(s[5]=o=>n(e).editingKey=!0)})])),n(e).editingKey?P("",!0):(r(),_(M,{key:2,n:"green xs",disabled:n(e).content===n(e).updatedContent,class:F({"border-green":n(e).content!==n(e).updatedContent}),onClick:N},{default:u(()=>[i(" Save ")]),_:1},8,["disabled","class"]))]),l("div",null,[d(M,{n:"red xs",onClick:O},{default:u(()=>[i(" Delete ")]),_:1})])]),typeof n(e).content=="object"?(r(),_(n(Ke),me({key:0,modelValue:n(e).updatedContent,"onUpdate:modelValue":s[6]||(s[6]=o=>n(e).updatedContent=o),class:[[t.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},t.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):pe((r(),c("textarea",{key:1,"onUpdate:modelValue":s[7]||(s[7]=o=>n(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 font-mono text-sm outline-none",onKeyup:q(fe(N,["ctrl"]),["enter"])},null,40,qe)),[[_e,n(e).updatedContent]])])):(r(),_(A,{key:1},{default:u(()=>[d(D,{px6:"",py4:""},{default:u(()=>[i(" Select one key to start."),Le,i("Learn more about "),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[i(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(r(),_(A,{key:1},{default:u(()=>[Object.keys(n(w)).length?(r(),c("p",Me," Select one storage to start: ")):(r(),c("p",Be,[i(" No custom storage defined in "),De,i("."),Ae,i(" Learn more about "),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[i(" Nitro storage ")]),_:1})])),(r(!0),c(x,null,U(n(w),(o,f)=>(r(),_(D,{key:f,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Te=>a.value=f},{default:u(()=>[l("span",Ee,v(f),1),Re,l("span",ze,v(o.driver)+" driver",1),Fe,o.base?(r(),_(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):P("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}});export{tt as default};
@@ -1 +0,0 @@
1
- import{_ as B}from"./Navbar.vue.76f856f0.js";import{o as c,h as u,f as _,a as R,r as v,b5 as S,p as d,E,ag as I,i as s,w as i,F as m,u as l,G as L,q as P,s as U,l as j,t as h,c as q,H as G,a3 as H}from"./entry.3c854225.js";import{_ as W}from"./NCodeBlock.vue.3fea7f9d.js";import{_ as z}from"./NPanelGrids.afa6e237.js";import{_ as T}from"./PanelLeftRight.vue.9e8aa6b8.js";import{_ as A}from"./HelpFab.vue.ebcc1356.js";import{F as J}from"./fuse.esm.88e2763d.js";import"./NTextInput.vue.efd43a47.js";import"./client.ce74bb6b.js";import"./NIconButton.vue.13275ce3.js";const K={class:"markdown-body"},M=_("h1",null,"Virtual Files",-1),O=_("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1),Q=[M,O],X={__name:"virtual-files",setup(x,{expose:o}){return o({frontmatter:{}}),(p,r)=>(c(),u("div",K,Q))}},Y=_("div",{"x-divider":""},null,-1),Z={key:0,"h-full":"","of-hidden":"",flex:"~ col"},ee={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},te=_("span",{op75:""},"Select a file to start",-1),de=R({__name:"virtual-files",setup(x){const o=v(""),n=S(),p=d(()=>E().query?.id),r=v();I(()=>{if(!p.value)return;const e=`/_vfs.json/${encodeURIComponent(p.value)}`;fetch(e).then(t=>t.json()).then(t=>r.value=t.current)});function y(e){if(n.value?.rootDir)return e.startsWith(n.value?.rootDir)?e.slice(n.value.rootDir.length):e}const f=d(()=>n.value?n.value.entries.filter(e=>!e.id.startsWith(`${n.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),g=d(()=>new J(f.value,{keys:["id","path"]})),k=d(()=>o.value?g.value.search(o.value).map(e=>e.item):f.value);return(e,t)=>{const b=B,$=G,F=W,C=H,N=z,V=T,w=X,D=A;return c(),u(m,null,[s(V,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:i(()=>[s(b,{search:l(o),"onUpdate:search":t[0]||(t[0]=a=>L(o)?o.value=a:null),"no-padding":"",p3:""},null,8,["search"]),(c(!0),u(m,null,P(l(k),a=>(c(),u(m,{key:a.id},[s($,{block:"","select-none":"",truncate:"",px2:"",py1:"","font-mono":"","text-sm":"",to:`/modules/virtual-files?id=${encodeURIComponent(a.id)}`,class:U(a.id===l(r)?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover")},{default:i(()=>[j(h(y(a.id)),1)]),_:2},1032,["to","class"]),Y],64))),128))]),right:i(()=>[l(r)?.content?(c(),u("div",Z,[_("div",ee,[_("code",null,h(l(r).id),1)]),s(F,{"h-full":"","of-auto":"","text-sm":"",code:l(r).content,lang:"typescript"},null,8,["code"])])):(c(),q(N,{key:1},{default:i(()=>[s(C,{px6:"",py2:""},{default:i(()=>[te]),_:1})]),_:1}))]),_:1}),s(D,null,{default:i(()=>[s(w)]),_:1})],64)}}});export{de as default};