@nuxt/devtools 3.2.4 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/dist/chunks/module-main.mjs +73 -18
  2. package/dist/chunks/vscode.mjs +1 -1
  3. package/dist/client/200.html +1 -1
  4. package/dist/client/404.html +1 -1
  5. package/dist/client/_nuxt/__blank-o2muls23.js +1 -0
  6. package/dist/client/_nuxt/analyze-build-kjyk398o.js +1 -0
  7. package/dist/client/_nuxt/assets-ecwtrmuk.js +6 -0
  8. package/dist/client/_nuxt/builds/latest.json +1 -1
  9. package/dist/client/_nuxt/builds/meta/04180599-af74-454c-91e0-3d5527eae2fc.json +1 -0
  10. package/dist/client/_nuxt/{client-im47u3kz.js → client-eh4ejzq8.js} +1 -1
  11. package/dist/client/_nuxt/code-diff-el8puwy4.js +8 -0
  12. package/dist/client/_nuxt/code-snippets-i5i2u9zz.js +1 -0
  13. package/dist/client/_nuxt/components-iwfpkbz3.js +1 -0
  14. package/dist/client/_nuxt/composable-item-e8kv7080.js +1 -0
  15. package/dist/client/_nuxt/custom-_name_-ft6dg0e3.js +1 -0
  16. package/dist/client/_nuxt/data-schema-button-hx1dia1u.js +1 -0
  17. package/dist/client/_nuxt/data-schema-drawer-iw791a0n.js +2 -0
  18. package/dist/client/_nuxt/debug-f1y4ok7e.js +1 -0
  19. package/dist/client/_nuxt/{default-jvhm51ri.js → default-i5dr248x.js} +1 -1
  20. package/dist/client/_nuxt/{dist-mnod32r1.js → dist-hjee3mrt.js} +1 -1
  21. package/dist/client/_nuxt/dist-ibflnriz.js +1 -0
  22. package/dist/client/_nuxt/duration-display-ce789vbq.js +1 -0
  23. package/dist/client/_nuxt/entry.css-ceee1hqk.css +1 -0
  24. package/dist/client/_nuxt/{error-404-mzw240fb.js → error-404-hwu9ougr.js} +1 -1
  25. package/dist/client/_nuxt/error-404.css-cwq14vxz.css +1 -0
  26. package/dist/client/_nuxt/error-500-gbqjpcce.js +1 -0
  27. package/dist/client/_nuxt/error-500.css-hftlqubg.css +1 -0
  28. package/dist/client/_nuxt/error-g08v33x2.js +9 -0
  29. package/dist/client/_nuxt/filepath-item-cfknf7u4.js +1 -0
  30. package/dist/client/_nuxt/full-fv9atfrx.js +1 -0
  31. package/dist/client/_nuxt/help-fab-kzusjvzh.js +1 -0
  32. package/dist/client/_nuxt/hooks-m7w83qkt.js +1 -0
  33. package/dist/client/_nuxt/imports-m5e06d1m.js +1 -0
  34. package/dist/client/_nuxt/launch-page-k1jy2olz.js +1 -0
  35. package/dist/client/_nuxt/modules-ocni0pmc.js +1 -0
  36. package/dist/client/_nuxt/nbadge-dq091bml.js +1 -0
  37. package/dist/client/_nuxt/ncheckbox-oaojay1f.js +1 -0
  38. package/dist/client/_nuxt/ncode-block-jmq04laj.js +2 -0
  39. package/dist/client/_nuxt/ndrawer-iq9tsfcb.js +1 -0
  40. package/dist/client/_nuxt/ndropdown-bzq1eo9l.js +1 -0
  41. package/dist/client/_nuxt/nicon-title-kclz18f2.js +1 -0
  42. package/dist/client/_nuxt/nlink-oovljifl.js +1 -0
  43. package/dist/client/_nuxt/nmarkdown-mnforar7.js +1 -0
  44. package/dist/client/_nuxt/nnavbar-dy6zssbb.js +1 -0
  45. package/dist/client/_nuxt/none-hmdczuga.js +1 -0
  46. package/dist/client/_nuxt/nsection-block-mm2ln8au.js +1 -0
  47. package/dist/client/_nuxt/nselect-cvj6vn8t.js +1 -0
  48. package/dist/client/_nuxt/nselect-tabs-bnxyj6c3.js +1 -0
  49. package/dist/client/_nuxt/nswitch-nii7reuz.js +1 -0
  50. package/dist/client/_nuxt/open-graph-e5ujlf0w.js +3 -0
  51. package/dist/client/_nuxt/overview-k1lqhpdx.js +1 -0
  52. package/dist/client/_nuxt/owz5kq17.js +4 -0
  53. package/dist/client/_nuxt/pages-e8109ruk.js +1 -0
  54. package/dist/client/_nuxt/pages-ja4oy9os.js +1 -0
  55. package/dist/client/_nuxt/payload-evlvpptz.js +1 -0
  56. package/dist/client/_nuxt/pinia-eb8q0lb7.js +1 -0
  57. package/dist/client/_nuxt/plugins-n65vqkm5.js +1 -0
  58. package/dist/client/_nuxt/render-tree-lcd73hdy.js +1 -0
  59. package/dist/client/_nuxt/rolldown-runtime-ga5ujxqr.js +1 -0
  60. package/dist/client/_nuxt/runtime-configs-novpfnwf.js +1 -0
  61. package/dist/client/_nuxt/server-discovery-e129227e.js +1 -0
  62. package/dist/client/_nuxt/server-route-inputs-jyu03h3d.js +1 -0
  63. package/dist/client/_nuxt/server-routes-cuzpq3e6.js +7 -0
  64. package/dist/client/_nuxt/server-tasks-k13zuqrk.js +1 -0
  65. package/dist/client/_nuxt/settings-e3yeoaaw.js +1 -0
  66. package/dist/client/_nuxt/stacktrace-list-n2oy2o29.js +1 -0
  67. package/dist/client/_nuxt/state-components-kbt6b53p.js +1 -0
  68. package/dist/client/_nuxt/state-editor-d3ywfwuf.js +1 -0
  69. package/dist/client/_nuxt/state-modules-g1xroclg.js +1 -0
  70. package/dist/client/_nuxt/storage-bsevx2m8.js +1 -0
  71. package/dist/client/_nuxt/terminals-om2sdbvh.js +1 -0
  72. package/dist/client/_nuxt/timeline-fl3dqhun.js +31 -0
  73. package/dist/client/_nuxt/unocss-runtime-hldtyz3c.js +1 -0
  74. package/dist/client/_nuxt/vendor/json-editor-vue-k2rpz34q.js +3869 -0
  75. package/dist/client/_nuxt/vendor/{json-editor-vue.css-lkbe0qhh.css → json-editor-vue.css-lb1ewor6.css} +1 -1
  76. package/dist/client/_nuxt/vendor/{markdown-it-ckeo8pwp.js → markdown-it-ic0av7un.js} +2 -2
  77. package/dist/client/_nuxt/vendor/{quicktype-core-k4qx3809.js → quicktype-core-781ta3pq.js} +13 -13
  78. package/dist/client/_nuxt/vendor/{shiki-lqo1hg2n.js → shiki-nsxcfb7q.js} +5 -5
  79. package/dist/client/_nuxt/vendor/{unocss-k727ub0h.js → unocss-c4v2jnrn.js} +3 -3
  80. package/dist/client/_nuxt/vendor/vis-fsrg25ku.js +26 -0
  81. package/dist/client/_nuxt/vendor/{xterm-k45lhqgb.js → xterm-cys6o1g8.js} +4 -4
  82. package/dist/client/_nuxt/virtual-files-irp1xg65.js +1 -0
  83. package/dist/client/_nuxt/vue-devtools-ixjb5uzw.js +4 -0
  84. package/dist/client/index.html +1 -1
  85. package/dist/module.json +1 -1
  86. package/dist/module.mjs +1 -1
  87. package/dist/runtime/plugins/devtools.client.js +1 -1
  88. package/dist/runtime/plugins/view/client.js +1 -1
  89. package/dist/shared/{devtools.CT6XRG-F.mjs → devtools.Soe0SAC8.mjs} +1 -1
  90. package/package.json +42 -39
  91. package/dist/client/_nuxt/__blank-cpzbm3dn.js +0 -1
  92. package/dist/client/_nuxt/analyze-build-isc8qyt9.js +0 -1
  93. package/dist/client/_nuxt/assets-k3ya1y6b.js +0 -6
  94. package/dist/client/_nuxt/builds/meta/c954ff6d-891d-44ef-873b-bed085186c32.json +0 -1
  95. package/dist/client/_nuxt/client-nwyjxodt.js +0 -2
  96. package/dist/client/_nuxt/code-diff-hjtd937u.js +0 -8
  97. package/dist/client/_nuxt/code-snippets-cptms1t1.js +0 -1
  98. package/dist/client/_nuxt/components-h8jl0r8x.js +0 -1
  99. package/dist/client/_nuxt/composable-item-m56sdpbk.js +0 -1
  100. package/dist/client/_nuxt/custom-_name_-oczf7kge.js +0 -1
  101. package/dist/client/_nuxt/d479ufk9.js +0 -4
  102. package/dist/client/_nuxt/data-schema-button-n0xmsouw.js +0 -1
  103. package/dist/client/_nuxt/data-schema-drawer-le08obah.js +0 -2
  104. package/dist/client/_nuxt/debug-hbdh85ek.js +0 -1
  105. package/dist/client/_nuxt/dev-auth-he0eye7r.js +0 -1
  106. package/dist/client/_nuxt/dist-duc3zu0y.js +0 -1
  107. package/dist/client/_nuxt/dist-og16nf4d.js +0 -1
  108. package/dist/client/_nuxt/duration-display-h5sffkps.js +0 -1
  109. package/dist/client/_nuxt/entry.css-hn1q325i.css +0 -1
  110. package/dist/client/_nuxt/error-404.css-b4qk08da.css +0 -1
  111. package/dist/client/_nuxt/error-500-l89qfgc9.js +0 -1
  112. package/dist/client/_nuxt/error-500.css-awwhwbzo.css +0 -1
  113. package/dist/client/_nuxt/error-owd7hxtu.js +0 -9
  114. package/dist/client/_nuxt/filepath-item-h3i1tz3s.js +0 -1
  115. package/dist/client/_nuxt/full-et0weok9.js +0 -1
  116. package/dist/client/_nuxt/help-fab-oeo4c53s.js +0 -1
  117. package/dist/client/_nuxt/hooks-lapcgs2a.js +0 -1
  118. package/dist/client/_nuxt/imports-lb64tt5j.js +0 -1
  119. package/dist/client/_nuxt/launch-page-h3hu9uqw.js +0 -1
  120. package/dist/client/_nuxt/modules-isjfof47.js +0 -1
  121. package/dist/client/_nuxt/nbadge-f1bvtlf5.js +0 -1
  122. package/dist/client/_nuxt/nbutton-gygn07c2.js +0 -1
  123. package/dist/client/_nuxt/ncard-ludmyw2u.js +0 -1
  124. package/dist/client/_nuxt/ncheckbox-ep01n5y1.js +0 -1
  125. package/dist/client/_nuxt/ncode-block-figzf35k.js +0 -2
  126. package/dist/client/_nuxt/ndrawer-hos2o4rf.js +0 -1
  127. package/dist/client/_nuxt/ndropdown-knvt4ccq.js +0 -1
  128. package/dist/client/_nuxt/nicon-m1crov2l.js +0 -1
  129. package/dist/client/_nuxt/nicon-title-kbrt9te7.js +0 -1
  130. package/dist/client/_nuxt/nlink-od4lllbl.js +0 -1
  131. package/dist/client/_nuxt/nmarkdown-ciogo2e3.js +0 -1
  132. package/dist/client/_nuxt/nnavbar-n7gfocyu.js +0 -1
  133. package/dist/client/_nuxt/none-bdxkqeml.js +0 -1
  134. package/dist/client/_nuxt/npanel-grids-onrho735.js +0 -1
  135. package/dist/client/_nuxt/nsection-block-ibsk9arc.js +0 -1
  136. package/dist/client/_nuxt/nselect-gyaplrph.js +0 -1
  137. package/dist/client/_nuxt/nselect-tabs-fslk8qg5.js +0 -1
  138. package/dist/client/_nuxt/nswitch-ke379yjx.js +0 -1
  139. package/dist/client/_nuxt/ntext-input-e8iut2en.js +0 -1
  140. package/dist/client/_nuxt/nuxt-link-bumooa9d.js +0 -1
  141. package/dist/client/_nuxt/nuxt-otp6bp04.js +0 -1
  142. package/dist/client/_nuxt/open-graph-iihpwnih.js +0 -3
  143. package/dist/client/_nuxt/overview-hir7dg5h.js +0 -1
  144. package/dist/client/_nuxt/pages-etzxihfh.js +0 -1
  145. package/dist/client/_nuxt/pages-okkqwdpu.js +0 -1
  146. package/dist/client/_nuxt/payload-hmxfri1t.js +0 -1
  147. package/dist/client/_nuxt/pinia-bfcvuvfi.js +0 -1
  148. package/dist/client/_nuxt/plugins-ehtddhxd.js +0 -1
  149. package/dist/client/_nuxt/ready-dadbdj5i.js +0 -1
  150. package/dist/client/_nuxt/render-tree-ke02si46.js +0 -1
  151. package/dist/client/_nuxt/rolldown-runtime-oipoa1or.js +0 -1
  152. package/dist/client/_nuxt/runtime-configs-ft5vi88d.js +0 -1
  153. package/dist/client/_nuxt/server-discovery-k9u6ss6f.js +0 -1
  154. package/dist/client/_nuxt/server-route-inputs-fhqv0c7q.js +0 -1
  155. package/dist/client/_nuxt/server-routes-dy0m6wq4.js +0 -7
  156. package/dist/client/_nuxt/server-tasks-naz2m1n0.js +0 -1
  157. package/dist/client/_nuxt/settings-io1tvmdq.js +0 -1
  158. package/dist/client/_nuxt/splitpanes.es-gcsn48te.js +0 -1
  159. package/dist/client/_nuxt/stacktrace-list-ir6dwfsw.js +0 -1
  160. package/dist/client/_nuxt/state-components-ii0yssci.js +0 -1
  161. package/dist/client/_nuxt/state-editor-m7poh4fc.js +0 -1
  162. package/dist/client/_nuxt/state-modules-m990wfjb.js +0 -1
  163. package/dist/client/_nuxt/state-routes-jownks2o.js +0 -1
  164. package/dist/client/_nuxt/state-tabs-mtxv3h6t.js +0 -1
  165. package/dist/client/_nuxt/storage-nebfhfwp.js +0 -1
  166. package/dist/client/_nuxt/storage-options-nzog3hhp.js +0 -1
  167. package/dist/client/_nuxt/telemetry-c77tnag3.js +0 -1
  168. package/dist/client/_nuxt/terminals-j3f24tml.js +0 -1
  169. package/dist/client/_nuxt/timeline-cg7nhorz.js +0 -31
  170. package/dist/client/_nuxt/unocss-runtime-g9wlule9.js +0 -1
  171. package/dist/client/_nuxt/utils-jupbrzo6.js +0 -1
  172. package/dist/client/_nuxt/vendor/json-editor-vue-eojr4v24.js +0 -3869
  173. package/dist/client/_nuxt/vendor/vis-gf06uk37.js +0 -26
  174. package/dist/client/_nuxt/virtual-files-bkiu19oo.js +0 -1
  175. package/dist/client/_nuxt/vue-devtools-fdei7bct.js +0 -4
  176. package/dist/client/_nuxt/vue-router-jbnxw7nb.js +0 -1
  177. /package/dist/client/_nuxt/{_plugin-vue_export-helper-n58akrbk.js → _plugin-vue_export-helper-e0bby96w.js} +0 -0
  178. /package/dist/client/_nuxt/{color-l56csnpd.js → color-nuuzg844.js} +0 -0
  179. /package/dist/client/_nuxt/{composables-b2ccklz4.js → composables-dhks1pao.js} +0 -0
  180. /package/dist/client/_nuxt/{constants-mq2c9hze.js → constants-dict8wns.js} +0 -0
  181. /package/dist/client/_nuxt/{mitt.es-ey5n86su.js → mitt.es-is6qb9uo.js} +0 -0
@@ -6,7 +6,7 @@ import { colors } from 'consola/utils';
6
6
  import { join, dirname as dirname$1, resolve, isAbsolute } from 'pathe';
7
7
  import sirv from 'sirv';
8
8
  import { searchForWorkspaceRoot } from 'vite';
9
- import { d as defaultAllowedExtensions, a as defaultTabOptions, W as WS_EVENT_NAME } from '../shared/devtools.CT6XRG-F.mjs';
9
+ import { d as defaultAllowedExtensions, a as defaultTabOptions, W as WS_EVENT_NAME } from '../shared/devtools.Soe0SAC8.mjs';
10
10
  import path, { dirname, join as join$1, relative, parse } from 'node:path';
11
11
  import { hash } from 'ohash';
12
12
  import { runtimeDir, clientDir, packageDir, isGlobalInstall } from '../dirs.mjs';
@@ -34,7 +34,7 @@ import { detectPackageManager } from 'nypm';
34
34
  import semver from 'semver';
35
35
  import { normalizeBaseKey, normalizeKey } from 'unstorage';
36
36
 
37
- const version$1 = "3.2.4";
37
+ const version$1 = "3.4.0";
38
38
 
39
39
  const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
40
40
  function randomStr(size = 16, dict = urlAlphabet) {
@@ -119,6 +119,18 @@ async function getDevAuthToken() {
119
119
  return token;
120
120
  }
121
121
 
122
+ function isAllowedRpcOrigin(origin, host) {
123
+ if (!origin)
124
+ return true;
125
+ let originHost;
126
+ try {
127
+ originHost = new URL(origin).host;
128
+ } catch {
129
+ return false;
130
+ }
131
+ return !!host && originHost === host;
132
+ }
133
+
122
134
  const COLON_RE = /:/g;
123
135
  function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
124
136
  let builds = [];
@@ -374,7 +386,7 @@ function guessType(path) {
374
386
  return "other";
375
387
  }
376
388
 
377
- function setupCustomTabRPC({ nuxt, options, refresh }) {
389
+ function setupCustomTabRPC({ nuxt, options, refresh, ensureDevAuthToken }) {
378
390
  const iframeTabs = [];
379
391
  const customTabs = [];
380
392
  if (options.customTabs?.length)
@@ -403,7 +415,8 @@ function setupCustomTabRPC({ nuxt, options, refresh }) {
403
415
  return i;
404
416
  });
405
417
  },
406
- async customTabAction(name, actionIndex) {
418
+ async customTabAction(token, name, actionIndex) {
419
+ await ensureDevAuthToken(token);
407
420
  const tab = customTabs.find((i) => i.name === name);
408
421
  if (!tab)
409
422
  return false;
@@ -9067,7 +9080,11 @@ function _extractExtraNames(extraNamesStr) {
9067
9080
  angleDepth++;
9068
9081
  continue;
9069
9082
  }
9070
- if (inTypeAnnotation && char === ">" && angleDepth > 0) {
9083
+ if (!inTypeAnnotation && char === "<" && depth === 0 && i > 0 && _isIdentifierBeforeAngleBracket(extraNamesStr, i)) {
9084
+ angleDepth++;
9085
+ continue;
9086
+ }
9087
+ if (char === ">" && angleDepth > 0 && extraNamesStr[i - 1] !== "=") {
9071
9088
  angleDepth--;
9072
9089
  continue;
9073
9090
  }
@@ -9232,6 +9249,14 @@ function _getLocations(code, label) {
9232
9249
  }
9233
9250
  return locations;
9234
9251
  }
9252
+ function _isIdentifierBeforeAngleBracket(str, i) {
9253
+ let j = i - 1;
9254
+ while (j >= 0 && /[A-Za-z0-9_$]/.test(str[j])) {
9255
+ j--;
9256
+ }
9257
+ const wordStart = j + 1;
9258
+ return wordStart < i && /[A-Za-z_$]/.test(str[wordStart]);
9259
+ }
9235
9260
 
9236
9261
  function defineUnimportPreset(preset) {
9237
9262
  return preset;
@@ -10259,7 +10284,7 @@ let options;
10259
10284
  function getOptions() {
10260
10285
  return options;
10261
10286
  }
10262
- function setupOptionsRPC({ nuxt }) {
10287
+ function setupOptionsRPC({ nuxt, ensureDevAuthToken }) {
10263
10288
  async function getOptions2(tab) {
10264
10289
  if (!options || options[tab]) {
10265
10290
  options = defaultTabOptions;
@@ -10275,14 +10300,16 @@ function setupOptionsRPC({ nuxt }) {
10275
10300
  return options;
10276
10301
  }
10277
10302
  getOptions2("ui");
10278
- async function clearOptions() {
10303
+ async function clearOptions(token) {
10304
+ await ensureDevAuthToken(token);
10279
10305
  options = void 0;
10280
10306
  await clearLocalOptions({
10281
10307
  root: nuxt.options.rootDir
10282
10308
  });
10283
10309
  }
10284
10310
  return {
10285
- async updateOptions(tab, _settings) {
10311
+ async updateOptions(token, tab, _settings) {
10312
+ await ensureDevAuthToken(token);
10286
10313
  const settings = await getOptions2(tab);
10287
10314
  Object.assign(settings, _settings);
10288
10315
  await writeLocalOptions(
@@ -10366,7 +10393,14 @@ function setupGeneralRPC({
10366
10393
  });
10367
10394
  return {
10368
10395
  getServerConfig() {
10369
- return nuxt.options;
10396
+ const { runtimeConfig, ...rest } = nuxt.options;
10397
+ return {
10398
+ ...rest,
10399
+ runtimeConfig: {
10400
+ app: runtimeConfig?.app,
10401
+ public: runtimeConfig?.public
10402
+ }
10403
+ };
10370
10404
  },
10371
10405
  async getServerDebugContext() {
10372
10406
  if (!nuxt._debug)
@@ -10400,7 +10434,8 @@ function setupGeneralRPC({
10400
10434
  )
10401
10435
  };
10402
10436
  },
10403
- getServerRuntimeConfig() {
10437
+ async getServerRuntimeConfig(token) {
10438
+ await ensureDevAuthToken(token);
10404
10439
  const ENV_PREFIX = "NITRO_";
10405
10440
  const ENV_PREFIX_ALT = "NUXT_";
10406
10441
  function _getEnv(key) {
@@ -10459,7 +10494,8 @@ function setupGeneralRPC({
10459
10494
  getServerHooks() {
10460
10495
  return Object.values(serverHooks);
10461
10496
  },
10462
- async openInEditor(input) {
10497
+ async openInEditor(token, input) {
10498
+ await ensureDevAuthToken(token);
10463
10499
  if (input.startsWith("./") || !ABSOLUTE_PATH_RE.test(input))
10464
10500
  input = resolve(process.cwd(), input);
10465
10501
  const match = input.match(FILE_LINE_COL_RE);
@@ -10499,11 +10535,11 @@ function setupGeneralRPC({
10499
10535
  logger.info("Restarting Nuxt...");
10500
10536
  return nuxt.callHook("restart", { hard });
10501
10537
  },
10502
- async requestForAuth(info, origin) {
10538
+ async requestForAuth(info) {
10503
10539
  if (options.disableAuthorization)
10504
10540
  return;
10505
10541
  const token = await getDevAuthToken();
10506
- origin ||= `${nuxt.options.devServer.https ? "https" : "http"}://${nuxt.options.devServer.host === "::" ? "localhost" : nuxt.options.devServer.host || "localhost"}:${nuxt.options.devServer.port}`;
10542
+ const origin = `${nuxt.options.devServer.https ? "https" : "http"}://${nuxt.options.devServer.host === "::" ? "localhost" : nuxt.options.devServer.host || "localhost"}:${nuxt.options.devServer.port}`;
10507
10543
  const ROUTE_AUTH = `${nuxt.options.app.baseURL || "/"}/__nuxt_devtools__/auth`.replace(MULTIPLE_SLASHES_RE$1, "/");
10508
10544
  const message = [
10509
10545
  `A browser is requesting permissions of ${colors.bold(colors.yellow("writing files and running commands"))} from the DevTools UI.`,
@@ -11496,9 +11532,10 @@ function setupTerminalRPC({ nuxt, rpc, refresh, ensureDevAuthToken }) {
11496
11532
  };
11497
11533
  }
11498
11534
 
11499
- function setupTimelineRPC({ nuxt }) {
11535
+ function setupTimelineRPC({ nuxt, ensureDevAuthToken }) {
11500
11536
  return {
11501
- async enableTimeline(dry) {
11537
+ async enableTimeline(token, dry) {
11538
+ await ensureDevAuthToken(token);
11502
11539
  const filepath = nuxt.options._nuxtConfigFile;
11503
11540
  const source = await fsp.readFile(filepath, "utf-8");
11504
11541
  const generated = await magicastGuard(async () => {
@@ -11586,6 +11623,15 @@ function setupRPC(nuxt, options) {
11586
11623
  `) + colors.red(error?.message || "")
11587
11624
  );
11588
11625
  },
11626
+ // A malformed or hostile frame over the (unauthenticated) HMR socket can
11627
+ // make deserialization throw. Swallow it here so a bad frame is dropped
11628
+ // rather than surfacing as an unhandled rejection that crashes dev.
11629
+ onGeneralError(error) {
11630
+ logger.error(
11631
+ colors.yellow("[nuxt-devtools] RPC channel error:\n") + colors.red(error?.message || String(error))
11632
+ );
11633
+ return true;
11634
+ },
11589
11635
  timeout: 12e4
11590
11636
  }
11591
11637
  );
@@ -11639,7 +11685,13 @@ function setupRPC(nuxt, options) {
11639
11685
  const vitePlugin = {
11640
11686
  name: "nuxt:devtools:rpc",
11641
11687
  configureServer(server) {
11642
- server.ws.on("connection", (ws) => {
11688
+ server.ws.on("connection", (ws, request) => {
11689
+ if (!isAllowedRpcOrigin(request?.headers?.origin, request?.headers?.host)) {
11690
+ logger.warn(
11691
+ colors.yellow(`[nuxt-devtools] Ignored a cross-origin RPC connection from origin "${request?.headers?.origin}".`)
11692
+ );
11693
+ return;
11694
+ }
11643
11695
  wsClients.add(ws);
11644
11696
  const channel = {
11645
11697
  post: (d) => ws.send(JSON.stringify({
@@ -11714,7 +11766,7 @@ async function enableModule(options, nuxt) {
11714
11766
  logger.info("[nuxt-devtools] Enabling experimental Vite DevTools integration");
11715
11767
  const DevTools = await import('@vitejs/devtools').then((r) => r.DevTools());
11716
11768
  addVitePlugin(DevTools);
11717
- addVitePlugin({
11769
+ addVitePlugin(defineViteDevToolsPlugin({
11718
11770
  name: "nuxt:devtools",
11719
11771
  devtools: {
11720
11772
  setup(ctx2) {
@@ -11727,7 +11779,7 @@ async function enableModule(options, nuxt) {
11727
11779
  });
11728
11780
  }
11729
11781
  }
11730
- });
11782
+ }));
11731
11783
  addPlugin({
11732
11784
  src: join(runtimeDir, "plugins/vite-devtools.client"),
11733
11785
  mode: "client"
@@ -11873,6 +11925,9 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
11873
11925
  "\n"
11874
11926
  ].join(""));
11875
11927
  }
11928
+ function defineViteDevToolsPlugin(plugin) {
11929
+ return plugin;
11930
+ }
11876
11931
 
11877
11932
  const moduleMain = {
11878
11933
  __proto__: null,
@@ -12,7 +12,7 @@ import 'consola/utils';
12
12
  import 'pathe';
13
13
  import 'sirv';
14
14
  import 'vite';
15
- import '../shared/devtools.CT6XRG-F.mjs';
15
+ import '../shared/devtools.Soe0SAC8.mjs';
16
16
  import '../dirs.mjs';
17
17
  import 'node:url';
18
18
  import 'is-installed-globally';
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/d479ufk9.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-hn1q325i.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lkbe0qhh.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-3gd0e2sv.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/d479ufk9.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-n58akrbk.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-oipoa1or.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-eojr4v24.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/utils-jupbrzo6.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ready-dadbdj5i.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-mnod32r1.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-otp6bp04.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-router-jbnxw7nb.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-nwyjxodt.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-lqo1hg2n.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-k727ub0h.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-link-bumooa9d.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-duc3zu0y.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/splitpanes.es-gcsn48te.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dev-auth-he0eye7r.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nbutton-gygn07c2.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nicon-m1crov2l.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncard-ludmyw2u.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/npanel-grids-onrho735.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ntext-input-e8iut2en.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-routes-jownks2o.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-tabs-mtxv3h6t.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-options-nzog3hhp.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/telemetry-c77tnag3.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/d479ufk9.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"c954ff6d-891d-44ef-873b-bed085186c32",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1773713005117,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/owz5kq17.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-ceee1hqk.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lb1ewor6.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-3gd0e2sv.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/owz5kq17.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-e0bby96w.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-ga5ujxqr.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-k2rpz34q.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-c4v2jnrn.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-nsxcfb7q.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-hjee3mrt.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-ibflnriz.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/owz5kq17.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"04180599-af74-454c-91e0-3d5527eae2fc",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1785316623945,false]</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/d479ufk9.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-hn1q325i.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lkbe0qhh.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-3gd0e2sv.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/d479ufk9.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-n58akrbk.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-oipoa1or.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-eojr4v24.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/utils-jupbrzo6.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ready-dadbdj5i.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-mnod32r1.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-otp6bp04.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-router-jbnxw7nb.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-nwyjxodt.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-lqo1hg2n.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-k727ub0h.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-link-bumooa9d.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-duc3zu0y.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/splitpanes.es-gcsn48te.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dev-auth-he0eye7r.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nbutton-gygn07c2.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nicon-m1crov2l.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncard-ludmyw2u.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/npanel-grids-onrho735.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ntext-input-e8iut2en.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-routes-jownks2o.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/state-tabs-mtxv3h6t.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-options-nzog3hhp.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/telemetry-c77tnag3.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/d479ufk9.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"c954ff6d-891d-44ef-873b-bed085186c32",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1773713005121,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/owz5kq17.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-ceee1hqk.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lb1ewor6.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-3gd0e2sv.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/owz5kq17.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-e0bby96w.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-ga5ujxqr.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-k2rpz34q.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-c4v2jnrn.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-nsxcfb7q.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-hjee3mrt.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-ibflnriz.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/owz5kq17.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"04180599-af74-454c-91e0-3d5527eae2fc",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1785316623948,false]</script></body></html>
@@ -0,0 +1 @@
1
+ import{E as e,W as t,v as n}from"./vendor/json-editor-vue-k2rpz34q.js";import"./composables-dhks1pao.js";var r={"h-screen":``,"w-screen":``,"bg-black":``},i=e({__name:`__blank`,setup(e){return(e,i)=>(t(),n(`div`,r))}});export{i as default};
@@ -0,0 +1 @@
1
+ import{C as e,Ct as t,E as n,Mt as r,Qt as i,W as a,Y as o,_ as s,c,dt as l,ft as u,g as d,h as f,m as p,tn as m,v as h,w as g}from"./vendor/json-editor-vue-k2rpz34q.js";import{t as _}from"./_plugin-vue_export-helper-e0bby96w.js";import{Bt as v,C as y,D as b,It as x,Jt as S,Ln as C,Pn as w,T,Wn as E,Yt as D,c as O,f as k,k as A,l as j,o as M,ot as N,st as P,t as F,y as I}from"#entry";import{t as L}from"./ncode-block-jmq04laj.js";import"./composables-dhks1pao.js";import{t as R}from"./ncheckbox-oaojay1f.js";import{t as z}from"./filepath-item-cfknf7u4.js";import{t as B}from"./help-fab-kzusjvzh.js";var V={"h-full":``,grid:`~ rows-[max-content_1fr]`},H={flex:`~ wrap`,"w-full":``},U=[`onClick`],W={key:0,flex:`~ col gap-4 items-center justify-center`,p4:``},G={grid:`~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center`,"w-100":``},K=`/__nuxt_devtools__/client`,q=Object.assign(n({__name:`BuildAnalyzeDetails`,props:{current:{},prev:{}},setup(n){let d=n,_=`${C().app.baseURL.replace(K,`/`)}/__nuxt_devtools__/analyze/`.replace(/\/+/g,`/`),y=p(()=>{let e=[{name:`Overview`,id:`overview`}];return d.current.features.bundleClient&&e.push({name:`Client Bundle`,id:`bundle-client`}),d.current.features.bundleNitro&&e.push({name:`Nitro Bundle`,id:`bundle-nitro`}),d.current.features.viteInspect&&e.push({name:`Vite Inspect`,id:`vite-inspect`}),e}),b=t(y.value[0]);function S(e){return`${((e.endTime-e.startTime)/1e3).toFixed(1)}s`}function w(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:e<1024*1024*1024?`${(e/1024/1024).toFixed(1)}MB`:`${(e/1024/1024/1024).toFixed(1)}GB`}async function T(e){return v.clearAnalyzeBuilds(await x(),[e])}return(t,d)=>{let p=z,v=A;return a(),h(`div`,V,[f(`div`,H,[(a(!0),h(c,null,o(y.value,(e,t)=>(a(),h(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:i(e.id===b.value?.id?``:`border-b`),onClick:t=>b.value=e},[f(`div`,{class:i(e.id===b.value?.id?``:`op30`)},m(e.name),3)],10,U))),128)),d[1]||=f(`div`,{border:`b base`,"flex-auto":``},null,-1)]),b.value?.id===`overview`?(a(),h(`div`,W,[d[15]||=f(`div`,{"flex-auto":``},null,-1),f(`div`,G,[d[10]||=f(`div`,{"i-carbon-commit":``,"text-xl":``},null,-1),f(`div`,null,[d[2]||=f(`div`,{"text-sm":``,op50:``},` Name `,-1),f(`div`,null,m(n.current.name),1)]),d[11]||=f(`div`,{"i-carbon-time":``,"text-xl":``},null,-1),f(`div`,null,[d[3]||=f(`div`,{"text-sm":``,op50:``},` Build duration `,-1),f(`div`,null,m(S(n.current)),1)]),n.current.size?.clientBundle?(a(),h(c,{key:0},[d[5]||=f(`div`,{"i-carbon-cics-program":``,"text-xl":``},null,-1),f(`div`,null,[d[4]||=f(`div`,{"text-sm":``,op50:``},` Client bundle size `,-1),f(`div`,null,m(w(n.current.size.clientBundle)),1)])],64)):s(``,!0),n.current.size?.nitroBundle?(a(),h(c,{key:1},[d[7]||=f(`div`,{"i-carbon-bare-metal-server":``,"text-xl":``},null,-1),f(`div`,null,[d[6]||=f(`div`,{"text-sm":``,op50:``},` Nitro bundle size `,-1),f(`div`,null,m(w(n.current.size.nitroBundle)),1)])],64)):s(``,!0),d[12]||=f(`div`,{"i-carbon-edge-node":``,"text-xl":``},null,-1),f(`div`,null,[d[8]||=f(`div`,{"text-sm":``,op50:``},` Built `,-1),f(`div`,null,m(r(D)(new Date(n.current.endTime))),1)]),d[13]||=f(`div`,{"i-carbon:folder-parent":``,"text-xl":``},null,-1),f(`div`,null,[d[9]||=f(`div`,{"text-sm":``,op50:``},` Report Path `,-1),g(p,{filepath:n.current.analyzeDir},null,8,[`filepath`])])]),d[16]||=f(`div`,{"flex-auto":``},null,-1),g(v,{n:`rose`,icon:`carbon-delete`,onClick:d[0]||=e=>T(n.current.name)},{default:l(()=>[...d[14]||=[e(` Delete this report `,-1)]]),_:1})])):s(``,!0),d._lazyshow1||b.value?.id===`bundle-client`?(d._lazyshow1=!0,a(),h(c,null,[u(f(`iframe`,{src:`${r(_)}${n.current.slug}/client.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[E,b.value?.id===`bundle-client`]])],64)):s(`v-show-if`,!0),d._lazyshow2||b.value?.id===`bundle-nitro`?(d._lazyshow2=!0,a(),h(c,null,[u(f(`iframe`,{src:`${r(_)}${n.current.slug}/nitro.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[E,b.value?.id===`bundle-nitro`]])],64)):s(`v-show-if`,!0),d._lazyshow3||b.value?.id===`vite-inspect`?(d._lazyshow3=!0,a(),h(c,null,[u(f(`iframe`,{src:`${r(_)}${n.current.slug}/.vite-inspect/`,"h-full":``,"w-full":``},null,8,[`src`]),[[E,b.value?.id===`vite-inspect`]])],64)):s(`v-show-if`,!0)])}}}),{__name:`BuildAnalyzeDetails`}),J={},Y={class:`markdown-body`};function X(t,n){return a(),h(`div`,Y,[...n[0]||=[f(`template`,null,[f(`div`,{class:`markdown-body`},[f(`h1`,null,`Build Analyze`),f(`p`,null,[e(`DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command `),f(`code`,{"v-pre":``},`nuxt build --analyze`),e(` and present the output data directly in DevTools for easy browsing and comparing.`)])])],-1)]])}var Z=_(J,[[`render`,X]]),Q={flex:`~ col`},$=[`onClick`],ee={flex:`~ gap-1 items-center wrap`,"w-full":``,"text-sm":``,op60:``},te={flex:`~ items-center justify-center wrap`,p4:``},ne={flex:`~ col gap-1`,"w-250":``,p4:``},re={flex:`~ gap-3`,mt2:``,"justify-end":``},ie=n({__name:`analyze-build`,setup(n){let u=S(),_=P(),C=w(),E=N(`analyze-build:slug`,``),z=p(()=>_.value?.builds.find(e=>e.slug===E.value)??_.value?.builds[0]),V=t(!1),H=t(``),U=p(()=>_.value?.builds.some(e=>e.name===H.value.trim()));async function W(){H.value=await v.generateAnalyzeBuildName(),await u.start()&&(I(`analyze-build:start`),F.value={name:H.value,processId:await v.startAnalyzeBuild(await x(),H.value)},V.value&&J())}let G=y();function K(e){return`${((e.endTime-e.startTime)/1e3).toFixed(1)}s`}function J(){F.value?.processId&&(G.value=F.value.processId,C.push(`/modules/terminals`))}return M(()=>[{id:`action:analyze-build: start`,title:`Start a new analyze build`,icon:`i-carbon-edge-node`,action:W}]),(t,n)=>{let p=A,v=q,y=k,x=j,S=O,C=b,w=L,M=R,N=T,P=Z,I=B;return a(),h(c,null,[g(x,{"left-size":30},{left:l(()=>[f(`div`,Q,[(a(!0),h(c,null,o(r(_)?.builds,e=>(a(),h(c,{key:e.slug},[f(`button`,{flex:`~ col gap1`,p3:``,"hover:bg-active":``,class:i(e.slug===z.value?.slug?`text-primary bg-active`:``),onClick:t=>E.value=e.slug},[f(`code`,null,m(e.name),1),f(`div`,ee,[n[4]||=f(`div`,{"i-carbon-time":``},null,-1),f(`span`,null,m(K(e)),1),n[5]||=f(`div`,{"flex-auto":``},null,-1),f(`span`,null,m(r(D)(new Date(e.endTime))),1)])],10,$),n[6]||=f(`div`,{"x-divider":``},null,-1)],64))),128)),f(`div`,te,[r(F)?(a(),d(p,{key:1,n:`primary`,icon:`carbon-circle-dash animate-spin`,onClick:n[1]||=e=>J()},{default:l(()=>[...n[8]||=[e(` Building... `,-1)]]),_:1})):(a(),d(p,{key:0,n:`primary`,icon:`carbon-edge-node`,onClick:n[0]||=e=>W()},{default:l(()=>[...n[7]||=[e(` Start a new build `,-1)]]),_:1}))])])]),right:l(()=>[z.value?(a(),d(v,{key:0,current:z.value},null,8,[`current`])):(a(),d(y,{key:1}))]),_:1}),g(r(u),null,{default:l(({resolve:t})=>[g(N,{"model-value":!0,onClose:e=>t(!1)},{default:l(()=>[f(`div`,ne,[n[13]||=f(`h3`,{class:`text-lg font-medium leading-6`,mb2:``},` Start analyze build? `,-1),n[14]||=f(`p`,{op50:``},` Enter the name of the build: `,-1),g(S,{modelValue:H.value,"onUpdate:modelValue":n[2]||=e=>H.value=e,placeholder:`Build name`},null,8,[`modelValue`]),U.value?(a(),d(C,{key:0,"n-orange":``},{default:l(()=>[...n[9]||=[e(` A build with the same name already exists, continue would overrides the previous build result. `,-1)]]),_:1})):s(``,!0),n[15]||=f(`div`,{my3:``,"x-divider":``},null,-1),n[16]||=f(`p`,{op50:``},` The following command will be executed in your terminal: `,-1),g(w,{code:`npx nuxi analyze --no-serve --name=${H.value}`,lang:`bash`,px4:``,py2:``,border:`~ base rounded`,lines:!1},null,8,[`code`]),g(M,{modelValue:V.value,"onUpdate:modelValue":n[3]||=e=>V.value=e,mt2:``,n:`primary`},{default:l(()=>[...n[10]||=[e(` Navigate to terminal `,-1)]]),_:1},8,[`modelValue`]),f(`div`,re,[g(p,{onClick:e=>t(!1)},{default:l(()=>[...n[11]||=[e(` Cancel `,-1)]]),_:1},8,[`onClick`]),g(p,{n:`solid primary`,onClick:e=>t(!0)},{default:l(()=>[...n[12]||=[e(` Start `,-1)]]),_:1},8,[`onClick`])])])]),_:2},1032,[`onClose`])]),_:1}),g(I,null,{default:l(()=>[g(P)]),_:1})],64)}}});export{ie as default};
@@ -0,0 +1,6 @@
1
+ import{C as e,Ct as t,E as n,Mt as r,Q as i,Qt as a,W as o,X as s,Y as c,_ as l,c as u,dt as d,en as f,ft as p,g as m,h,m as g,tn as _,v,vt as y,w as b}from"./vendor/json-editor-vue-k2rpz34q.js";import{Bt as x,Gn as S,Ht as C,It as w,Kt as T,Pt as E,T as D,Un as O,Vt as k,W as A,Zt as j,_ as M,an as N,bt as P,c as F,cn as I,j as L,k as R,nn as z,on as ee,pt as te,s as B,sn as V,v as ne,y as H,zt as U}from"#entry";import{t as W}from"./ndropdown-bzq1eo9l.js";import{t as G}from"./ndrawer-iq9tsfcb.js";import"./composables-dhks1pao.js";import{t as K}from"./ncheckbox-oaojay1f.js";import{t as re}from"./filepath-item-cfknf7u4.js";import{t as q}from"./nnavbar-dy6zssbb.js";import{t as J}from"./nsection-block-mm2ln8au.js";import{t as Y}from"./code-snippets-i5i2u9zz.js";var X={key:0,"h-full":``,"w-full":``,flex:``,"items-center":``,"justify-center":``},ie={for:`drop-zone-input`,"text-3xl":``,hover:`text-green cursor-pointer`,"transition-all":``},ae={key:1,relative:``,"h-full":``,"w-full":``,grid:`~ rows-[max-content_1fr_max-content]`},oe={grid:`~ cols-minmax-8rem gap-8`,"overflow-auto":``,p6:``},se={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,rounded:``,"rounded-t-lg":``,"bg-active":``,"object-cover":``,class:`aspect-1/1`,border:`~ base`},ce=[`src`],le={flex:`~ gap1`,"items-center":``},ue={flex:`~ gap-2`,"items-center":``,"justify-center":``,p8:``},de=Object.assign(n({__name:`AssetDropZone`,props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(n){let s=n,f=/\.\w+$/,g=V(s,`modelValue`),_=t(),y=t([]);function S(e){_.value=e.target,g.value=!0}function T(e){e.target===_.value&&(g.value=!1)}function E(e){e.preventDefault()}function D(e){e.preventDefault(),O(e.dataTransfer.files)}function O(e){let t=[...e||[]];if(t.length){let e=[],n=y.value.map(e=>e.name);for(let r of t)if(n.includes(r.name)){let t=1,[i,a]=r.name.split(`.`);for(;n.includes(`${i} (${t}).${a}`);)t++;let o=`${i}-${t}.${a}`,s=new Blob([r],{type:r.type}),c=new File([s],o,{lastModified:Date.now()});e.push(c),n.push(o)}else r.type===``&&U({message:`Folders are not supported yet`,icon:`carbon:face-dissatisfied`,classes:`text-orange`}),e.push(r);y.value=[...y.value,...e]}}async function A(){if(k.value||C.value)return;H(`assets:upload`);let e=[];for(let t of y.value){let n=new FileReader;n.readAsDataURL(t);let r=(await new Promise(e=>{n.onload=()=>e(n.result)})).split(`;base64,`).pop();e.push({path:t.name,encoding:`base64`,content:r})}await x.writeStaticAssets(await w(),[...e],s.folder).then(()=>{I(),U({message:`Files uploaded successfully!`,icon:`i-carbon:checkmark`})}).catch(e=>{I(),U({message:`Error uploading files: ${e?.message??`unknown`}`,icon:`i-carbon-warning`,classes:`text-red`})}),g.value=!1}function j(e){y.value?.splice(e,1)}function M(e){return URL.createObjectURL(e)}function N(e,t){let[n,r]=e.name.split(`.`),i=t.replace(f,``),a=`${i}.${r}`;return i.length===0?(alert(`File name must be at least 1 characters long`),n):(Object.defineProperty(e,`name`,{value:a,writable:!1}),y.value.splice(y.value.indexOf(e),1,e),e)}function P(){y.value=[]}function I(){g.value=!1,P()}return z(`dragenter`,S),z(`dragleave`,T),z(`dragover`,E),z(`drop`,D),(t,n)=>{let s=R,f=L,_=F,x=i(`tooltip`);return o(),v(`div`,{fixed:``,"bottom-0":``,"left-13":``,"right-0":``,"top-0":``,"z-10":``,"backdrop-blur-20":``,"transition-all":``,class:a(r(g)?`opacity-100 visible`:`opacity-0 invisible`)},[p(b(s,{icon:`carbon-close`,title:`Close`,absolute:``,"right-5":``,"top-5":``,"z-20":``,"text-xl":``,border:!1,onClick:I},null,512),[[x,`Close`,void 0,{"bottom-end":!0}]]),y.value?.length?(o(),v(`div`,ae,[n[4]||=h(`div`,{px6:``,py6:``},[h(`h1`,{"text-2xl":``},` Upload `),h(`p`,{"text-sm":``,op50:``},` Drag and drop files to upload `)],-1),h(`div`,oe,[(o(!0),v(u,null,c(y.value,(e,t)=>(o(),v(`div`,{key:e.name,flex:`~ col gap-2`,relative:``,"h-50":``,"w-40":``,"items-center":``},[h(`div`,se,[h(`img`,{"h-full":``,"w-full":``,"rounded-t-lg":``,"object-cover":``,src:M(e)},null,8,ce)]),h(`div`,le,[b(_,{n:`xs`,"h-full":``,"flex-auto":``,"model-value":e.name,"onUpdate:modelValue":t=>N(e,t.target.value)},null,8,[`model-value`,`onUpdate:modelValue`]),b(s,{n:`red`,icon:`carbon-trash-can`,"h-full":``,"flex-none":``,title:`Remove file`,onClick:e=>j(t)},null,8,[`onClick`])])]))),128))]),h(`div`,ue,[y.value.length?(o(),m(s,{key:0,n:`red`,onClick:P},{default:d(()=>[b(f,{icon:`carbon-clean`}),n[2]||=e(` Clear `,-1)]),_:1})):l(``,!0),b(s,{disabled:!y.value.length,n:`primary solid`,onClick:A},{default:d(()=>[b(f,{icon:`carbon-cloud-upload`}),n[3]||=e(` Upload `,-1)]),_:1},8,[`disabled`])])])):(o(),v(`div`,X,[h(`label`,ie,[b(f,{icon:`carbon-cloud-upload`,"mr-2":``}),n[1]||=e(` Drop files here or click to select `,-1)]),h(`input`,{id:`drop-zone-input`,type:`file`,multiple:``,hidden:``,onChange:n[0]||=e=>O(e.target.files)},null,32)]))],2)}}}),{__name:`AssetDropZone`}),fe=Object.assign(n({__name:`AssetFontPreview`,props:{asset:{}},setup(e){let t=e,n=g(()=>`devtools-assets-${E(t.asset)}`);return N(g(()=>`
2
+ @font-face {
3
+ font-family: '${n.value}';
4
+ src: url('${t.asset.publicPath}');
5
+ }
6
+ `)),(e,t)=>(o(),v(`div`,{"of-hidden":``,style:f({fontFamily:`'${n.value}'`})},` Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz `,4))}}),{__name:`AssetFontPreview`}),pe={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,"bg-active":``,"object-cover":``,p1:``},me=[`src`],he={key:2,"i-carbon-document":``,"text-3xl":``,op20:``},ge={key:3,"w-full":``,"self-start":``,p4:``},_e=[`textContent`],ve={key:4},ye=[`src`,`autoplay`,`controls`],be={key:5},xe={key:0,"i-carbon-volume-up":``,"text-3xl":``,op20:``},Se=[`src`],Ce={key:6,"i-carbon-help":``,"text-3xl":``,op20:``},Z=Object.assign(n({__name:`AssetPreview`,props:{asset:{},textContent:{},detail:{type:Boolean}},setup(e){return(t,n)=>{let r=fe;return o(),v(`div`,pe,[e.asset.type===`image`?(o(),v(`img`,{key:0,src:e.asset.publicPath},null,8,me)):e.asset.type===`font`?(o(),m(r,{key:e.asset.publicPath,asset:e.asset,"self-stretch":``,p2:``,"text-2xl":``},null,8,[`asset`])):e.asset.type===`text`&&!e.textContent?(o(),v(`div`,he)):e.asset.type===`text`&&e.textContent?(o(),v(`div`,ge,[h(`pre`,{"max-h-10rem":``,"of-hidden":``,"text-xs":``,"font-mono":``,textContent:_(e.textContent)},null,8,_e)])):e.asset.type===`video`?(o(),v(`div`,ve,[h(`video`,{src:e.asset.publicPath,autoplay:e.detail,controls:e.detail},null,8,ye)])):e.asset.type===`audio`?(o(),v(`div`,be,[e.detail?(o(),v(`audio`,{key:1,src:e.asset.publicPath,controls:``},null,8,Se)):(o(),v(`div`,xe))])):(o(),v(`div`,Ce))])}}}),{__name:`AssetPreview`}),we={relative:``,flex:`~ col gap-1`,hover:`bg-active`,"items-center":``,"of-hidden":``,rounded:``,p2:``},Te={"w-full":``,"of-hidden":``,truncate:``,"ws-nowrap":``,"text-center":``,"text-xs":``},Ee=Object.assign(n({__name:`AssetGridItem`,props:{asset:{},folder:{}},setup(e){let t=e,n=g(()=>t.folder&&t.asset.path.startsWith(t.folder)?t.asset.path.slice(t.folder.length):t.asset.path);return(t,r)=>{let i=L,a=Z;return o(),v(`button`,we,[e.asset.layer?(o(),m(i,{key:0,icon:`i-carbon-layers`,absolute:``,"right-4":``,"top-4":``,"bg-primary":``})):l(``,!0),b(a,{"h-30":``,"w-30":``,rounded:``,border:`~ base`,asset:e.asset},null,8,[`asset`]),h(`div`,Te,_(n.value),1)])}}}),{__name:`AssetGridItem`}),Q=Object.assign(n({__name:`AssetListItem`,props:{item:{},index:{default:0},modelValue:{}},setup(n,{emit:i}){let d=n,p=V(d,`modelValue`,i,{passive:!0}),b=g(()=>d.item?.children?.length),x=t(!0),S=g(()=>b.value?`i-carbon-folder`:d.item.type===`image`?`i-carbon-image`:d.item.type===`video`?`i-carbon-video`:d.item.type===`audio`?`i-carbon-volume-up`:d.item.type===`font`?`i-carbon-text-small-caps`:d.item.type===`text`?`i-carbon-document`:d.item.type===`json`?`i-carbon-json`:`i-carbon-document-blank`);return(t,i)=>{let d=L,g=Q;return o(),v(`div`,null,[h(`button`,{flex:`~ gap-2`,"w-full":``,"items-center":``,hover:`bg-active`,px4:``,py1:``,style:f({paddingLeft:`calc(1rem + ${n.index*1.5}em)`}),class:a({"bg-active":!b.value&&r(p)?.filePath===n.item?.filePath}),border:`b base`,onClick:i[0]||=e=>b.value?x.value=!x.value:p.value=n.item},[h(`div`,{class:a(S.value)},null,2),h(`span`,{class:a({"flex items-center":b.value}),"flex-auto":``,"text-start":``,"text-sm":``,"font-mono":``},[e(_(n.item.path)+` `,1),n.item.layer?(o(),m(d,{key:0,icon:`i-carbon-layers`,"bg-primary":``})):l(``,!0)],2),b.value?(o(),m(d,{key:0,icon:`carbon:chevron-right`,"transform-rotate":x.value?90:0,transition:``},null,8,[`transform-rotate`])):l(``,!0)],6),x.value?s(t.$slots,`default`,{},()=>[(o(!0),v(u,null,c(n.item?.children,e=>(o(),m(g,{key:e.filepath,modelValue:r(p),"onUpdate:modelValue":i[1]||=e=>y(p)?p.value=e:null,item:e,index:n.index+1},null,8,[`modelValue`,`item`,`index`]))),128))],void 0,0):l(``,!0)])}}}),{__name:`AssetListItem`}),De={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},Oe={flex:`~`,"items-center":``,"justify-center":``},ke={"max-w-full":``,"w-full":``,"table-fixed":``},Ae={flex:`~ gap-1`,"w-full":``,"items-center":``},je={flex:`~ gap-1`,"w-full":``,"items-center":``,"of-hidden":``},Me={"flex-auto":``,"of-hidden":``,truncate:``,"ws-pre":``,"font-mono":``},Ne={capitalize:``},Pe={key:0},Fe={op70:``},Ie={flex:`~ gap2 wrap`},Le={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},Re={flex:`~ gap2 wrap justify-center`},ze={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},Be={flex:`~ gap2 wrap justify-center`},Ve={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},$={flex:``,"justify-end":``,"gap-4":``},He=Object.assign(n({__name:`AssetDetails`,props:{modelValue:{}},setup(n,{emit:a}){let s=V(n,`modelValue`,a,{passive:!0}),c=T(async()=>{if(s.value.type===`image`)return x.getImageMeta(await w(),s.value.filePath)}),f=t(!1),y=t(),C=t(0),E=T(async()=>{if(s.value.type!==`text`)return;C.value;let e=await x.getTextAssetContent(await w(),s.value.filePath);return y.value=e,e});async function k(){if(E.value!==y.value)try{await x.writeStaticAssets(await w(),[{path:s.value.path,content:y.value,override:!0}],``),f.value=!1,C.value++,U({message:`Updated`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),U({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}let A=te(),j=g(()=>(A.value?._installedModules||[]).some(e=>e.meta?.name===`@nuxt/image`||e.meta?.name===`@nuxt/image-edge`||e.meta?.name===`@nuxt/image-nightly`)),N=g(()=>{let e=[];if(s.value.type===`image`){let t=c.value?.width?`\n width="${c.value.width}"\n height="${c.value.height}" `:` `;return e.push({lang:`vue-html`,code:`<img${t}\n src="${s.value.publicPath}"\n/>`,name:`Plain Image`}),j.value&&e.push({lang:`vue-html`,code:`<NuxtImg${t}\n src="${s.value.publicPath}"\n/>`,name:`Nuxt Img`,docs:`https://image.nuxt.com/usage/nuxt-img`},{lang:`vue-html`,code:`<NuxtPicture${t}\n src="${s.value.publicPath}"\n/>`,name:`Nuxt Picture`,docs:`https://image.nuxt.com/usage/nuxt-picture`}),e}return e.push({lang:`html`,code:`<a download href="${s.value.publicPath}">\n Download ${s.value.path.split(`/`).slice(-1)[0]}\n</a>`,name:`Download link`}),e}),P=M(),I=ne(),L=ee(()=>s.value.mtime),z=g(()=>{let e=s.value.size;return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:`${(e/1024/1024).toFixed(2)} MB`}),B=g(()=>{if(!c.value?.width||!c.value?.height)return``;let e=(t,n)=>n?e(n,t%n):t,t=e(c.value.width,c.value.height);return t>3?`${c.value.width/t}:${c.value.height/t}`:``}),H=g(()=>[`image`,`text`,`video`,`audio`,`font`].includes(s.value.type)),W=t(!1);async function G(){try{await x.deleteStaticAsset(await w(),s.value.filePath),s.value=void 0,W.value=!1,U({message:`Asset deleted`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),U({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}let K=t(!1),q=t(``);async function J(){let e=s.value.filePath.split(`/`),t=e.slice(-1)[0]?.split(`.`).slice(0,-1).join(`.`);if(!q.value||q.value===t)return U({message:`Please enter a new name`,icon:`i-carbon-warning`,classes:`text-orange`});try{let t=e.slice(-1)[0]?.split(`.`).slice(-1)[0],n=`${e.slice(0,-1).join(`/`)}/${q.value}.${t}`;await x.renameStaticAsset(await w(),s.value.filePath,n),s.value=void 0,K.value=!1,U({message:`Asset renamed`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),U({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}return(t,n)=>{let a=Z,g=re,x=R,C=Y,w=D,T=F,A=i(`tooltip`);return o(),v(u,null,[h(`div`,De,[H.value?(o(),v(u,{key:0},[n[13]||=h(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[h(`div`,{"x-divider":``}),h(`div`,{"flex-none":``},` Preview `),h(`div`,{"x-divider":``})],-1),h(`div`,Oe,[b(a,{detail:``,"max-h-80":``,"min-h-20":``,"min-w-20":``,"w-auto":``,rounded:``,border:`~ base`,asset:r(s),"text-content":r(E)},null,8,[`asset`,`text-content`])])],64)):l(``,!0),n[25]||=h(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[h(`div`,{"x-divider":``}),h(`div`,{"flex-none":``},` Details `),h(`div`,{"x-divider":``})],-1),h(`table`,ke,[h(`tbody`,null,[h(`tr`,null,[n[14]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Filepath `,-1),h(`td`,null,[h(`div`,Ae,[b(g,{filepath:r(s).filePath,"text-left":``},null,8,[`filepath`]),p(b(x,{"flex-none":``,title:`Open in Editor`,icon:`carbon-launch`,border:!1,onClick:n[0]||=e=>r(I)(r(s).filePath)},null,512),[[A,`Open in Editor`]])])])]),h(`tr`,null,[n[15]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Public Path `,-1),h(`td`,null,[h(`div`,je,[h(`div`,Me,_(r(s).publicPath),1),p(b(x,{"flex-none":``,title:`Copy public path`,icon:`carbon-copy`,border:!1,onClick:n[1]||=e=>r(P)(r(s).publicPath,`assets-public-path`)},null,512),[[A,`Copy public path`]]),p(b(x,{"flex-none":``,to:r(s).publicPath,icon:`carbon-launch`,target:`_blank`,border:!1,title:`Open in browser`},null,8,[`to`]),[[A,`Open in browser`]])])])]),h(`tr`,null,[n[16]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Type `,-1),h(`td`,Ne,_(r(s).type),1)]),r(c)?.width?(o(),v(u,{key:0},[h(`tr`,null,[n[17]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Image Size `,-1),h(`td`,null,_(r(c).width)+` x `+_(r(c).height),1)]),B.value?(o(),v(`tr`,Pe,[n[18]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Aspect Ratio `,-1),h(`td`,null,_(B.value),1)])):l(``,!0)],64)):l(``,!0),h(`tr`,null,[n[19]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` File size `,-1),h(`td`,null,_(z.value),1)]),h(`tr`,null,[n[20]||=h(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Last modified `,-1),h(`td`,null,[e(_(new Date(r(s).mtime).toLocaleString())+` `,1),h(`span`,Fe,`(`+_(r(L))+`)`,1)])])])]),n[26]||=h(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[h(`div`,{"x-divider":``}),h(`div`,{"flex-none":``},` Actions `),h(`div`,{"x-divider":``})],-1),h(`div`,Ie,[b(x,{to:r(s).publicPath,download:``,target:`_blank`,icon:`carbon-download`,n:`green`},{default:d(()=>[...n[21]||=[e(` Download `,-1)]]),_:1},8,[`to`]),r(s).type===`text`?(o(),m(x,{key:0,icon:`carbon-edit`,n:`cyan`,onClick:n[2]||=e=>f.value=!f.value},{default:d(()=>[...n[22]||=[e(` Edit `,-1)]]),_:1})):l(``,!0),b(x,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:n[3]||=e=>K.value=!K.value},{default:d(()=>[...n[23]||=[e(` Rename `,-1)]]),_:1}),b(x,{icon:`carbon-delete`,n:`red`,onClick:n[4]||=e=>W.value=!W.value},{default:d(()=>[...n[24]||=[e(` Delete `,-1)]]),_:1})]),n[27]||=h(`div`,{"flex-auto":``},null,-1),N.value.length?(o(),m(C,{key:1,border:`t base`,"mx--4":``,"mb--4":``,"code-snippets":N.value},null,8,[`code-snippets`])):l(``,!0)]),b(w,{modelValue:W.value,"onUpdate:modelValue":n[6]||=e=>W.value=e},{default:d(()=>[h(`div`,Le,[n[30]||=h(`span`,null,` Are you sure you want to delete this asset? `,-1),h(`div`,Re,[b(x,{icon:`carbon-close`,onClick:n[5]||=e=>W.value=!1},{default:d(()=>[...n[28]||=[e(` Cancel `,-1)]]),_:1}),b(x,{icon:`carbon-delete`,n:`red`,onClick:G},{default:d(()=>[...n[29]||=[e(` Delete `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),b(w,{modelValue:K.value,"onUpdate:modelValue":n[9]||=e=>K.value=e},{default:d(()=>[h(`div`,ze,[b(T,{modelValue:q.value,"onUpdate:modelValue":n[7]||=e=>q.value=e,placeholder:`New name`,n:`blue`},null,8,[`modelValue`]),h(`div`,Be,[b(x,{icon:`carbon-close`,onClick:n[8]||=e=>K.value=!1},{default:d(()=>[...n[31]||=[e(` Cancel `,-1)]]),_:1}),b(x,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:J},{default:d(()=>[...n[32]||=[e(` Rename `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),r(s).type===`text`?(o(),m(w,{key:0,modelValue:f.value,"onUpdate:modelValue":n[12]||=e=>f.value=e},{default:d(()=>[h(`div`,Ve,[p(h(`textarea`,{"onUpdate:modelValue":n[10]||=e=>y.value=e,placeholder:`Item value...`,class:`h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none`,onKeydown:S(k,[`enter`])},null,544),[[O,y.value]]),h(`div`,$,[b(x,{icon:`carbon-close`,onClick:n[11]||=e=>f.value=!1},{default:d(()=>[...n[33]||=[e(` Cancel `,-1)]]),_:1}),b(x,{icon:`carbon:save`,n:`primary`,onClick:k},{default:d(()=>[...n[34]||=[e(` save `,-1)]]),_:1})])])]),_:1},8,[`modelValue`])):l(``,!0)],64)}}}),{__name:`AssetDetails`}),Ue={"h-full":``,"of-auto":``},We={"flex-none":``,flex:`~ gap2 items-center`,"text-lg":``},Ge={flex:`~ items-center justify-center`,absolute:``,"bottom--1":``,"right--1":``,"h-4":``,"w-4":``,"rounded-full":``,"bg-primary:30":``,"text-8px":``},Ke={flex:`~ col`,"w-30":``,"of-auto":``},qe={"text-xs":``,op75:``},Je={op50:``},Ye={key:0},Xe={"mt--4":``,px2:``,grid:`~ cols-minmax-8rem`},Ze={key:1,p2:``,grid:`~ cols-minmax-8rem`},Qe={key:1},$e=n({__name:`assets`,setup(e){let n=P(),a=t(!1),s=t(``),f=g(()=>new B(n.value||[],{keys:[`path`]})),y=I(()=>{let e=[];for(let t of n.value||[]){let n=t.path.split(`.`).pop();n&&!e.some(e=>e.name===n)&&e.push({name:n,value:!0})}return e}),x=g(()=>(s.value?f.value.search(s.value).map(e=>e.item):n.value||[]).filter(e=>{let t=e.path.split(`.`).pop();return!t||y.some(e=>e.name===t&&e.value)})),S=g(()=>{let e={};for(let t of x.value){let n=`${t.path.split(`/`).slice(0,-1).join(`/`)}/`;e[n]||(e[n]=[]),e[n].push(t)}return Object.entries(e).sort(([e],[t])=>e.localeCompare(t))}),C=g(()=>{let e={path:`public`,children:[]},t=(e,n,r)=>{let[i,...a]=n,o=e.children.find(e=>e.path===i);o||(o={...r,path:i,children:[]},e.children.push(o)),a.length>1?t(o,a,r):a.length===1&&o.children.push({...r,path:a[0]})};return x.value.forEach(n=>{t(e,n.path.split(`/`).filter(e=>e!==``),n)}),e.children}),w=t(),{view:T}=A(`assets`);function E(){T.value=T.value===`list`?`grid`:`list`}j(`Escape`,()=>{w.value=void 0});let D=t();return(e,t)=>{let f=R,g=K,O=W,k=q,A=de,j=Ee,M=J,N=Q,P=He,F=G,I=i(`tooltip`);return o(),v(`div`,Ue,[b(k,{ref_key:`navbar`,ref:D,search:s.value,"onUpdate:search":t[1]||=e=>s.value=e,pb2:``},{actions:d(()=>[h(`div`,We,[p(b(f,{icon:`carbon:cloud-upload`,title:`File Upload`,border:!1,onClick:t[0]||=e=>a.value=!a.value},null,512),[[I,`File Upload`,void 0,{"bottom-end":!0}]]),r(y).length?(o(),m(O,{key:0,direction:`end`,n:`sm primary`},{trigger:d(({click:e})=>[p(b(f,{icon:`carbon-filter`,border:!1,title:`Filter`,p3:``,"text-lg":``,onClick:t=>e()},null,8,[`onClick`]),[[I,`Filter`,void 0,{"bottom-end":!0}]]),h(`span`,Ge,_(r(y).length),1)]),default:d(()=>[h(`div`,Ke,[(o(!0),v(u,null,c(r(y),e=>(o(),m(g,{key:e.name,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,flex:`~ gap-2`,rounded:``,px2:``,py2:``},{default:d(()=>[h(`span`,qe,_(e.name),1)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`]))),128))])]),_:1})):l(``,!0),p(b(f,{"text-lg":``,border:!1,icon:r(T)===`grid`?`i-carbon-list`:`i-carbon-grid`,title:`Toggle view`,onClick:E},null,8,[`icon`]),[[I,`Toggle View`,void 0,{"bottom-end":!0}]])])]),default:d(()=>[h(`div`,Je,[s.value?(o(),v(`span`,Ye,_(x.value.length)+` matched · `,1)):l(``,!0),h(`span`,null,_(r(n)?.length)+` assets in total`,1)])]),_:1},8,[`search`]),b(A,{modelValue:a.value,"onUpdate:modelValue":t[2]||=e=>a.value=e,folder:`/`},null,8,[`modelValue`]),r(T)===`grid`?(o(),v(u,{key:0},[S.value.length>1?(o(!0),v(u,{key:0},c(S.value,([e,t])=>(o(),m(M,{key:e,text:e,description:`${t.length} items`,open:t.length<=r(50),padding:!1},{default:d(()=>[h(`div`,Xe,[(o(!0),v(u,null,c(t,t=>(o(),m(j,{key:t.path,asset:t,folder:e,onClick:e=>w.value=t},null,8,[`asset`,`folder`,`onClick`]))),128))])]),_:2},1032,[`text`,`description`,`open`]))),128)):(o(),v(`div`,Ze,[(o(!0),v(u,null,c(x.value,e=>(o(),m(j,{key:e.path,asset:e,onClick:t=>w.value=e},null,8,[`asset`,`onClick`]))),128))]))],64)):(o(),v(`div`,Qe,[(o(!0),v(u,null,c(C.value,(e,n)=>(o(),m(N,{key:n,modelValue:w.value,"onUpdate:modelValue":t[3]||=e=>w.value=e,item:e},null,8,[`modelValue`,`item`]))),128))])),b(F,{"model-value":!!w.value,"auto-close":``,"w-120":``,top:D.value,onClose:t[5]||=e=>w.value=void 0},{default:d(()=>[w.value?(o(),m(P,{key:0,modelValue:w.value,"onUpdate:modelValue":t[4]||=e=>w.value=e},null,8,[`modelValue`])):l(``,!0)]),_:1},8,[`model-value`,`top`])])}}});export{$e as default};
@@ -1 +1 @@
1
- {"id":"c954ff6d-891d-44ef-873b-bed085186c32","timestamp":1773712968583}
1
+ {"id":"04180599-af74-454c-91e0-3d5527eae2fc","timestamp":1785316586530}
@@ -0,0 +1 @@
1
+ {"id":"04180599-af74-454c-91e0-3d5527eae2fc","timestamp":1785316586530,"prerendered":[]}
@@ -1 +1 @@
1
- import{Et as e,jt as t}from"./vendor/json-editor-vue-eojr4v24.js";var n,r=[];function i(e){if(r.push(e),!(typeof window>`u`))return window.__NUXT_DEVTOOLS__&&r.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,`__NUXT_DEVTOOLS__`,{set(e){e&&r.forEach(t=>t(e))},get(){return n.value},configurable:!0}),()=>{r.splice(r.indexOf(e),1)}}function a(){n||(n=e(),i(a));function r(){n&&t(n)}function a(e){n.value=e,e.host&&e.host.hooks.hook(`host:update:reactivity`,r)}return n}var o=a();export{o as t};
1
+ import{Et as e,jt as t}from"./vendor/json-editor-vue-k2rpz34q.js";var n,r=[];function i(e){if(r.push(e),!(typeof window>`u`))return window.__NUXT_DEVTOOLS__&&r.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,`__NUXT_DEVTOOLS__`,{set(e){e&&r.forEach(t=>t(e))},get(){return n.value},configurable:!0}),()=>{r.splice(r.indexOf(e),1)}}function a(){n||(n=e(),i(a));function r(){n&&t(n)}function a(e){n.value=e,e.host&&e.host.hooks.hook(`host:update:reactivity`,r)}return n}var o=a();export{o as t};
@@ -0,0 +1,8 @@
1
+ import{Ct as e,E as t,V as n,W as r,g as i,m as a}from"./vendor/json-editor-vue-k2rpz34q.js";import{Qt as o}from"#entry";import{t as s}from"./ncode-block-jmq04laj.js";var c=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends c{};function l(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function u(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function d(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function f(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function p(e,t){return d(e,t,``)}function m(e,t){return f(e,t,``)}function h(e,t){return t.slice(0,g(e,t))}function g(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function _(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function v(e,t){if(t)return b(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function y(e,t){if(t)return b(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function b(e,t){if(!t)return[y(e),v(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=_(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var x=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,S=RegExp(`[${x}]+|\\s+|[^${x}]`,`ug`);new class extends c{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=_(e,r)}else n=e.match(S)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&C(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&C(n,i,r,null,t.intlSegmenter),e}};function C(e,t,n,r,i){if(t&&n){let[a,o]=b(t.value,i),[s,c]=b(n.value,i);if(e){let r=l(a,s);e.value=f(e.value,s,r),t.value=p(t.value,r),n.value=p(n.value,r)}if(r){let e=u(o,c);r.value=d(r.value,c,e),t.value=m(t.value,e),n.value=m(n.value,e)}}else if(n){if(e){let e=y(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=y(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=y(r.value,i),[a,o]=b(t.value,i),s=l(n,a);t.value=p(t.value,s);let c=u(p(n,s),o);t.value=m(t.value,c),r.value=d(r.value,n,c),e.value=f(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=y(r.value,i),n=h(v(t.value,i),e);t.value=m(t.value,n)}else if(e){let n=h(v(e.value,i),y(t.value,i));t.value=p(t.value,n)}}new class extends c{tokenize(e){let t=RegExp(`(\\r?\\n)|[${x}]+|[^\\S\\n\\r]+|[^${x}]`,`ug`);return e.match(t)||[]}};var w=new class extends c{constructor(){super(...arguments),this.tokenize=E}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
2
+ `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
3
+ `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
4
+ `)&&(e=e.slice(0,-1)),t.endsWith(`
5
+ `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function T(e,t,n){return w.diff(e,t,n)}function E(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
6
+ `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function D(e){return e==`.`||e==`!`||e==`?`}new class extends c{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(D(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends c{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends c{constructor(){super(...arguments),this.tokenize=E}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(O(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function O(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=O(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=O(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends c{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var k=Object.assign(t({__name:`CodeDiff`,props:{from:{},to:{},lang:{}},setup(t){let c=t,l=/class="shiki/,u=/class="line"/g;function d(e,t){let n=T(e.trim(),t.trim()),r=[],i=[],a=[];for(let e of n){let t=e.value.trimEnd().split(`
7
+ `);for(let n of t)e.added?(r.push(a.length),a.push(n)):(e.removed&&i.push(a.length),a.push(n))}return{added:r,removed:i,result:a.join(`
8
+ `)}}let f=a(()=>d(c.from,c.to));function p(e){let t=0;return e.replace(l,`class="shiki diff`).replace(u,e=>(t++,f.value.added.includes(t-1)?`class="line line-added"`:f.value.removed.includes(t-1)?`class="line line-removed"`:e))}let m=e();n(h);function h(){let e=o(m);e&&e.querySelector(`.line-added,.line-removed`)?.scrollIntoView()}return(e,n)=>{let a=s;return r(),i(a,{ref_key:`elRef`,ref:m,code:f.value.result,lang:t.lang,"transform-rendered":p,onLoaded:h},null,8,[`code`,`lang`])}}}),{__name:`CodeDiff`});export{k as t};
@@ -0,0 +1 @@
1
+ import{C as e,E as t,Et as n,Mt as r,Qt as i,W as a,Y as o,_ as s,c,dt as l,g as u,h as d,lt as f,m as p,tn as m,v as h,w as g}from"./vendor/json-editor-vue-k2rpz34q.js";import{_,k as v}from"#entry";import{t as y}from"./ncode-block-jmq04laj.js";var b={key:0,relative:``,"n-code-block":``},x={flex:`~ wrap`,"w-full":``},S=[`onClick`],C={flex:`~ gap-2`,px3:``,pb3:``,n:`sm primary`},w=Object.assign(t({__name:`CodeSnippets`,props:{codeSnippets:{},eventType:{}},setup(t){let w=t,T=n(w.codeSnippets[0]),E=_(),D=p(()=>T.value?.lang||`text`);return f(()=>{w.codeSnippets.includes(T.value)||(T.value=w.codeSnippets[0])}),(n,f)=>{let p=y,_=v;return t.codeSnippets.length?(a(),h(`div`,b,[d(`div`,x,[(a(!0),h(c,null,o(t.codeSnippets,(e,t)=>(a(),h(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:i(e===T.value?``:`border-b`),onClick:t=>T.value=e},[d(`div`,{class:i(e===T.value?``:`op30`),"font-mono":``},m(e.name),3)],10,S))),128)),f[1]||=d(`div`,{border:`b base`,"flex-auto":``},null,-1)]),T.value?(a(),h(c,{key:0},[g(p,{code:T.value.code,lang:D.value,lines:!1,"w-full":``,"of-auto":``,p3:``},null,8,[`code`,`lang`]),d(`div`,C,[g(_,{icon:`carbon-copy`,onClick:f[0]||=e=>r(E)(T.value.code,t.eventType||`code-snippet-${T.value.name}`)},{default:l(()=>[...f[2]||=[e(` Copy `,-1)]]),_:1}),T.value?.docs?(a(),u(_,{key:0,to:T.value.docs,target:`_blank`,icon:`carbon-catalog`},{default:l(()=>[...f[3]||=[e(` Docs `,-1)]]),_:1},8,[`to`])):s(``,!0)])],64)):s(``,!0)])):s(``,!0)}}}),{__name:`CodeSnippets`});export{w as t};
@@ -0,0 +1 @@
1
+ import{$ as e,C as t,Ct as n,E as r,Et as i,Mt as a,P as o,Q as s,Qt as c,V as l,W as u,X as d,Y as f,Z as p,_ as m,c as h,ct as g,dt as _,ft as v,g as y,h as b,m as x,tn as S,v as C,vt as w,w as T}from"./vendor/json-editor-vue-k2rpz34q.js";import{t as E}from"./_plugin-vue_export-helper-e0bby96w.js";import{E as ee,Et as D,J as O,Nt as k,W as A,X as j,_ as M,dn as te,et as N,gt as ne,j as P,k as F,lt as re,pt as ie,s as I,wt as L}from"#entry";import{t as R}from"./ndrawer-iq9tsfcb.js";import"./composables-dhks1pao.js";import{t as z}from"./ncheckbox-oaojay1f.js";import{t as B}from"./filepath-item-cfknf7u4.js";import{t as V}from"./help-fab-kzusjvzh.js";import{t as H}from"./nnavbar-dy6zssbb.js";import{t as U}from"./nicon-title-kclz18f2.js";import{t as W}from"./nsection-block-mm2ln8au.js";import{t as G}from"./nbadge-dq091bml.js";import{n as K,t as q}from"./vendor/vis-fsrg25ku.js";import{t as J}from"./nselect-tabs-bnxyj6c3.js";import{n as Y,t as X}from"./state-components-kbt6b53p.js";var ae={},oe={class:`markdown-body`};function se(e,t){return u(),C(`div`,oe,[...t[0]||=[b(`template`,null,[b(`div`,{class:`markdown-body`},[b(`h1`,null,`Components`),b(`p`,null,`Vue Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. This is very similar to how we nest native HTML elements, but Vue implements its own component model that allow us to encapsulate custom content and logic in each component.`),b(`p`,null,`Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.`),b(`p`,null,[b(`a`,{href:`https://nuxt.com/docs/guide/directory-structure/components`,target:`_blank`,rel:`noopener`},`Learn more in the documentation`)])])],-1)]])}var ce=E(ae,[[`render`,se]]),le={"text-sm":``,"font-mono":``},Z=Object.assign(r({__name:`ComponentName`,props:{component:{}},setup(e){let n=e,r=x(()=>n.component.pascalName||k(n.component.name||n.component.__name||n.component.kebabName||``));return(e,n)=>(u(),C(`code`,le,[n[0]||=b(`span`,{mr1:``,op20:``},`<`,-1),t(S(r.value),1),n[1]||=b(`span`,{ml1:``,op20:``},`/>`,-1)]))}}),{__name:`ComponentName`}),ue={flex:`~ col gap1`,"items-start":``,"of-hidden":``},de={flex:`~ gap2 items-center`,px3:``},fe={px3:``,pb2:``},pe={key:0,border:`t base`,"max-h-60":``,"w-full":``,"of-auto":``,px3:``,py3:``},me={"text-sm":``},he={"text-primary":``},ge={key:0,flex:`~ col gap-2`,"items-start":``,pt3:``,"text-sm":``,op75:``},_e={key:1,border:`t base`,"max-h-60":``,"w-full":``,"of-auto":``,px3:``,py3:``},ve={"text-sm":``},ye={"text-primary":``},be={key:0,flex:`~ col gap-2`,"items-start":``,pt3:``,"text-sm":``,op75:``},Q=Object.assign(r({__name:`ComponentDetails`,props:{component:{},dependencies:{},dependents:{}},setup(e){let n=e,r=x(()=>n.component.pascalName||k(n.component.name||n.component.__name||n.component.kebabName||``)),i=x(()=>n.component.filePath||n.component.file||n.component.__file||``),o=M();return(n,s)=>{let c=Z,l=F,p=G,g=B;return u(),C(`div`,ue,[b(`div`,de,[T(c,{component:e.component},null,8,[`component`]),e.component.meta?.docs&&typeof e.component.meta.docs==`string`?(u(),y(l,{key:0,title:`Open docs`,"flex-none":``,n:`xs`,to:e.component.meta.docs,target:`_blank`,icon:`carbon-catalog`},{default:_(()=>[...s[1]||=[t(` Docs `,-1)]]),_:1},8,[`to`])):m(``,!0),T(l,{title:`Copy name`,"flex-none":``,n:`xs`,icon:`carbon-copy`,onClick:s[0]||=e=>a(o)(`<${r.value}></${r.value}>`,`component-name`)},{default:_(()=>[...s[2]||=[t(` Copy `,-1)]]),_:1}),e.component.global?(u(),y(p,{key:1,n:`green`,title:`Registered at runtime as a global component`,textContent:`runtime`})):m(``,!0)]),b(`div`,fe,[i.value?(u(),y(g,{key:0,filepath:i.value,"w-full":``,"text-sm":``,op40:``,"group-hover:op75":``},null,8,[`filepath`])):m(``,!0)]),e.dependents?(u(),C(`div`,pe,[b(`div`,me,[b(`strong`,he,S(e.dependents.length),1),s[3]||=b(`span`,{op50:``},` references`,-1)]),e.dependents.length?(u(),C(`div`,ge,[(u(!0),C(h,null,f(e.dependents,e=>(u(),y(g,{key:e,filepath:e},null,8,[`filepath`]))),128))])):m(``,!0)])):m(``,!0),e.dependencies?(u(),C(`div`,_e,[b(`div`,ve,[b(`strong`,ye,S(e.dependencies.length),1),s[4]||=b(`span`,{op50:``},` dependencies`,-1)]),e.dependencies.length?(u(),C(`div`,be,[(u(!0),C(h,null,f(e.dependencies,e=>(u(),y(g,{key:e,filepath:e},null,8,[`filepath`]))),128))])):m(``,!0)])):m(``,!0),d(n.$slots,`default`)])}}}),{__name:`ComponentDetails`}),xe={flex:`~ gap-x-3 gap-y-1 wrap`,"w-full":``},Se={relative:``,"h-full":``,"w-full":``},Ce={key:0,py4:``,pt3:``,flex:`~ col`},we={border:`t base`,p4:``},Te=Object.assign(r({__name:`ComponentsGraph`,props:{components:{},relationships:{}},setup(e){let r=e,o=n(),s=n(),c=L(),f=i(),p=ne(),v=ie(),y=re(),{componentsGraphShowNodeModules:S,componentsGraphShowGlobalComponents:E,componentsGraphShowPages:D,componentsGraphShowLayouts:O,componentsGraphShowWorkspace:k}=A(`ui`),j=n(),M=n(``),N=te(M,300),P=x(()=>{let e=r.relationships||[];if(j.value){let t=new Set;function n(r){!r||t.has(r)||(t.add(r),r.deps.forEach(t=>{n(e.find(e=>e.id===t))}))}return n(j.value),[...t]}return e}),I=x(()=>{let e=P.value.map(e=>{let t=r.components.find(t=>t.filePath===e.id),n=p.value?.find(t=>t.file===e.id),i=y.value?.find(t=>t.file===e.id),a=e.id.includes(`/node_modules/`)?`lib`:t?t.global?`global`:`user`:i?`layout`:n?`page`:`unknown`;if(!S.value&&a===`lib`||!D.value&&a===`page`||!O.value&&a===`layout`||!k.value&&a===`user`&&v.value&&!e.id.startsWith(v.value.rootDir)||!E.value&&a===`global`)return null;let o=a===`layout`?`hexagon`:a===`page`?`square`:`dot`,s=N.value&&!e.id.toLowerCase().includes(N.value.toLowerCase());return{id:e.id,label:Y(e.id),group:a,shape:o,size:15+Math.min(e.deps.length/2,8),font:{color:s?`#8885`:c.value===`dark`?`white`:`black`},color:s?`#8885`:j.value?.id===e.id?`#82c742`:void 0,extra:{id:e.id,component:t,page:n,layout:i,relationship:e}}}).filter(e=>!!e),t=P.value.flatMap(e=>e.deps.map(t=>({from:e.id,to:t,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:new K(e),edges:t}}),B=x(()=>f.value?.component?(r.relationships?.find(e=>e.id===f.value?.component?.filePath)?.deps)?.map(e=>r.relationships?.find(t=>t.id===e)?.id).filter(Boolean):[]),V=x(()=>f.value?.component?(r.relationships?.filter(e=>e.deps.includes(f.value.component.filePath)))?.map(e=>r.relationships?.find(t=>t.id===e.id)?.id).filter(Boolean):[]);l(()=>{let e=new q(o.value,I.value,{nodes:{shape:`dot`,size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:`forceAtlas2Based`,timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:`#42b883`},unknown:{color:`#b86542`},lib:{color:`#b4b842`},page:{color:`#42b2b8`},layout:{color:`#4256b8`}}});e.on(`click`,e=>{let t=e.nodes?.[0];f.value=I.value.nodes.get(t).extra}),g(I,()=>{e.setData(I.value)})});function U(){f.value=void 0}let W=/.*\/components\//,G=/\.vue$/,J=/\/index$/;function Y(e){let t=r.components.find(t=>t.filePath===e);return t?t.pascalName:e.replace(W,``).replace(G,``).replace(J,``).split(`/`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``)}function X(){j.value=f.value?.relationship,f.value=void 0}return(e,n)=>{let r=z,i=H,c=ee,l=Q,p=F,g=R;return u(),C(h,null,[T(i,{ref_key:`navbar`,ref:s,search:M.value,"onUpdate:search":n[6]||=e=>M.value=e,absolute:``,"left-0":``,"right-0":``,"top-0":``},{actions:_(()=>[b(`div`,xe,[T(r,{modelValue:a(D),"onUpdate:modelValue":n[0]||=e=>w(D)?D.value=e:null,n:`primary sm`},{default:_(()=>[...n[8]||=[b(`span`,{op75:``},`Show pages`,-1)]]),_:1},8,[`modelValue`]),T(r,{modelValue:a(O),"onUpdate:modelValue":n[1]||=e=>w(O)?O.value=e:null,n:`primary sm`},{default:_(()=>[...n[9]||=[b(`span`,{op75:``},`Show layouts`,-1)]]),_:1},8,[`modelValue`]),T(r,{modelValue:a(k),"onUpdate:modelValue":n[2]||=e=>w(k)?k.value=e:null,n:`primary sm`},{default:_(()=>[...n[10]||=[b(`span`,{op75:``},`Show workspace`,-1)]]),_:1},8,[`modelValue`]),T(r,{modelValue:a(S),"onUpdate:modelValue":n[3]||=e=>w(S)?S.value=e:null,n:`primary sm`},{default:_(()=>[...n[11]||=[b(`span`,{op75:``},`Show node_modules`,-1)]]),_:1},8,[`modelValue`]),T(r,{modelValue:a(E),"onUpdate:modelValue":n[4]||=e=>w(E)?E.value=e:null,n:`primary sm`},{default:_(()=>[...n[12]||=[b(`span`,{op75:``},`Show global components`,-1)]]),_:1},8,[`modelValue`])]),j.value?(u(),C(`button`,{key:0,flex:`~ gap-1`,"flex-none":``,"items-center":``,"rounded-full":``,"bg-gray:20":``,py1:``,pl3:``,pr2:``,"text-xs":``,op50:``,"hover:op100":``,onClick:n[5]||=e=>j.value=void 0},[...n[13]||=[t(` Clear filter `,-1),b(`div`,{"i-carbon-close":``},null,-1)]])):m(``,!0),n[14]||=b(`div`,{"flex-auto":``},null,-1),d(e.$slots,`default`)]),_:3},8,[`search`]),b(`div`,Se,[b(`div`,{ref_key:`container`,ref:o,"h-full":``,"w-full":``},null,512),T(c,{absolute:``,"bottom-3":``,"left-3":``,"border-0":``,"n-glass-effect":``,p2:``,px3:``,"text-sm":``},{default:_(()=>[...n[15]||=[b(`div`,{grid:`~ cols-[20px_1fr] items-center gap-y-1`},[b(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-42b883":``}),b(`div`,{op50:``},` Component `),b(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-97c2fc":``}),b(`div`,{op50:``},` Global Component `),b(`div`,{"h-3":``,"w-3":``,"bg-hex-42b2b8":``}),b(`div`,{op50:``},` Page `),b(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 726 628`,"ml--1px":``,"h-3":``},[b(`path`,{fill:`#4256b8`,"stroke-width":`4`,d:`M723 314 543 625.8H183L3 314 183 2.2h360L723 314z`})]),b(`div`,{op50:``},` Layout `),b(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-b4b842":``}),b(`div`,{op50:``},` Library Component `),b(`div`,{"h-3":``,"w-3":``,"rounded-full":``,"bg-hex-b86542":``}),b(`div`,{op50:``},` Unknown `)],-1)]]),_:1}),T(g,{"model-value":!!(f.value&&f.value.component),top:s.value,border:`t l base`,"w-80":``,onClose:U},{default:_(()=>[f.value&&f.value.component?(u(),C(`div`,Ce,[T(l,{component:f.value.component,dependencies:B.value,dependents:V.value},null,8,[`component`,`dependencies`,`dependents`]),b(`div`,we,[T(p,{n:`primary solid`,onClick:n[7]||=e=>X()},{default:_(()=>[...n[16]||=[t(` Filter to this component `,-1)]]),_:1})])])):m(``,!0)]),_:1},8,[`model-value`,`top`])])],64)}}}),{__name:`ComponentsGraph`}),Ee={hover:`bg-active`,class:`group`,flex:`~ gap2`,"w-full":``,"items-center":``,rounded:``,px2:``,py1:``},De={key:0,"ml--1":``,"text-primary":``},$=Object.assign(r({__name:`ComponentItem`,props:{component:{},dependencies:{},dependents:{}},setup(e){let t=e,n=x(()=>t.component.filePath||t.component.file||t.component.__file||``);return(t,r)=>{let i=Z,a=Q,o=p(`VDropdown`),s=G,l=B;return u(),C(`div`,Ee,[T(o,null,{popper:_(()=>[T(a,{component:e.component,dependencies:e.dependencies,dependents:e.dependents,"w-100":``,pt3:``},null,8,[`component`,`dependencies`,`dependents`])]),default:_(()=>[b(`button`,{"hover:text-primary":``,class:c(e.dependents&&e.dependents.length===0?`op50`:``)},[T(i,{component:e.component},null,8,[`component`])],2)]),_:1}),e.dependents?.length?(u(),C(`sup`,De,` x`+S(e.dependents?.length),1)):m(``,!0),e.component.global?(u(),y(s,{key:1,n:`green`,title:`Registered at runtime as a global component`,textContent:`runtime`})):m(``,!0),d(t.$slots,`default`),n.value?(u(),y(l,{key:2,filepath:n.value,"text-sm":``,op25:``,"group-hover:op75":``},null,8,[`filepath`])):m(``,!0)])}}}),{__name:`ComponentItem`}),Oe={flex:`~ gap-2 items-center`},ke={pl4:``},Ae=Object.assign(r({__name:`ComponentsList`,props:{components:{},relationships:{}},setup(e){let t=e,r=n(``),i=n(`all`),s=x(()=>{let e=t.components.map(e=>O(e,t.relationships));return i.value===`using`?e.filter(e=>e.dependents?.length):i.value===`not-used`?e.filter(e=>!e.dependents?.length):e}),c={ClientOnly:`https://nuxt.com/docs/api/components/client-only`,DevOnly:`https://nuxt.com/docs/api/components/dev-only`,NuxtClientFallback:`https://nuxt.com/docs/api/components/nuxt-client-fallback`,NuxtPicture:`https://nuxt.com/docs/api/components/nuxt-picture`,NuxtRouteAnnouncer:`https://nuxt.com/docs/api/components/nuxt-route-announcer`,NuxtTime:`https://nuxt.com/docs/api/components/nuxt-time`,NuxtPage:`https://nuxt.com/docs/api/components/nuxt-page`,NuxtLayout:`https://nuxt.com/docs/api/components/nuxt-layout`,NuxtLink:`https://nuxt.com/docs/api/components/nuxt-link`,NuxtLoadingIndicator:`https://nuxt.com/docs/api/components/nuxt-loading-indicator`,NuxtErrorBoundary:`https://nuxt.com/docs/api/components/nuxt-error-boundary`,NuxtWelcome:`https://nuxt.com/docs/api/components/nuxt-welcome`,NuxtIsland:`https://nuxt.com/docs/api/components/nuxt-island`,NuxtImg:`https://nuxt.com/docs/api/components/nuxt-img`},l=x(()=>new I(s.value,{keys:[`component.pascalName`,`component.filePath`,`component.kebabName`]})),p=x(()=>{let e=[],t=new Map,n=[],i=[],a={user:0,lib:0,builtin:0,runtime:0};return(r.value?l.value.search(r.value).map(e=>e.item):s.value).forEach(r=>{let o=r.component;if(o.filePath&&N(o.filePath)){let e=j(o.filePath);if(!e)return;e===`nuxt`?(o.meta??={},o.meta.docs??=c?.[o.pascalName],n.push(r),a.builtin++):(t.has(e)||t.set(e,[]),t.get(e).push(r),a.lib++)}else o.global&&!o.filePath?(i.push(r),a.runtime++):(e.push(r),a.user++)}),{count:a,user:e,builtin:n,lib:t,runtime:i}});return(e,t)=>{let n=P,s=J,c=H,l=$,g=W,v=U;return u(),C(h,null,[T(c,{search:r.value,"onUpdate:search":t[1]||=e=>r.value=e,pb3:``},{actions:_(()=>[d(e.$slots,`default`)]),default:_(()=>[b(`div`,Oe,[T(n,{icon:`carbon-filter`,op50:``}),T(s,{modelValue:i.value,"onUpdate:modelValue":t[0]||=e=>i.value=e,n:`primary sm`,options:[{label:`All`,value:`all`},{label:`Using`,value:`using`},{label:`Not used`,value:`not-used`}]},null,8,[`modelValue`])])]),_:3},8,[`search`]),p.value.user.length?(u(),y(g,{key:0,icon:`carbon-nominal`,text:`User components`,open:p.value.user.length<=a(50),description:`Total components: ${p.value.count.user}`},{default:_(()=>[(u(!0),C(h,null,f(p.value.user,e=>(u(),y(l,o({key:e.component.filePath},{ref_for:!0},e),null,16))),128))]),_:1},8,[`open`,`description`])):m(``,!0),p.value.runtime.length?(u(),y(g,{key:1,icon:`carbon-load-balancer-global`,open:p.value.runtime.length<=a(50),text:`Runtime components`,description:`Total components: ${p.value.count.runtime}`},{default:_(()=>[(u(!0),C(h,null,f(p.value.runtime,e=>(u(),y(l,o({key:e.component.filePath},{ref_for:!0},e),null,16))),128))]),_:1},8,[`open`,`description`])):m(``,!0),p.value.builtin.length?(u(),y(g,{key:2,icon:`simple-icons-nuxtdotjs`,text:`Built-in components`,description:`Total components: ${p.value.count.builtin}`},{default:_(()=>[(u(!0),C(h,null,f(p.value.builtin,e=>(u(),y(l,o({key:e.component.filePath},{ref_for:!0},e),null,16))),128))]),_:1},8,[`description`])):m(``,!0),p.value.lib.size?(u(),y(g,{key:3,open:p.value.count.lib<=a(50),icon:`carbon-3d-mpr-toggle`,text:`Components from libraries`,description:`${p.value.count.lib} components from ${p.value.lib.size} packages`},{default:_(()=>[(u(!0),C(h,null,f(p.value.lib.entries(),([e,t])=>(u(),C(`div`,{key:e,"ml-2":``},[T(v,{text:`${e} (${t.length})`,py1:``,op50:``},null,8,[`text`]),b(`div`,ke,[(u(!0),C(h,null,f(t,e=>(u(),y(l,o({key:e.component.filePath},{ref_for:!0},e),null,16))),128))])]))),128))]),_:1},8,[`open`,`description`])):m(``,!0)],64)}}}),{__name:`ComponentsList`}),je={relative:``,"h-full":``,"of-auto":``},Me={"flex-none":``,flex:`~ gap3`},Ne=r({__name:`components`,setup(t){let n=D(),r=X(),i=Y(),{componentsView:o}=A(`ui`);function c(){n.value?.inspector?.enable()}function l(){o.value=o.value===`list`?`graph`:`list`}return(t,d)=>{let f=F,p=ce,g=V,x=s(`tooltip`);return u(),C(h,null,[b(`div`,je,[(u(),y(e(a(o)===`list`?Ae:Te),{components:a(r),relationships:a(i)},{default:_(()=>[b(`div`,Me,[v(T(f,{"text-lg":``,border:!1,icon:a(o)===`graph`?`i-carbon-list`:`i-carbon-network-4`,title:`Toggle view`,onClick:l},null,8,[`icon`]),[[x,`Toggle View`,void 0,{"bottom-end":!0}]]),a(n)?.inspector?.isAvailable?v((u(),y(f,{key:0,"text-lg":``,border:!1,icon:`i-tabler-focus-2`,title:`Inspect Vue components`,onClick:c},null,512)),[[x,`Inspect Vue components`,void 0,{"bottom-end":!0}]]):m(``,!0)])]),_:1},8,[`components`,`relationships`]))]),T(g,null,{default:_(()=>[T(p)]),_:1})],64)}}});export{Ne as default};
@@ -0,0 +1 @@
1
+ import{C as e,E as t,Mt as n,Qt as r,W as i,Y as a,Z as o,_ as s,c,dt as l,g as u,h as d,m as f,tn as p,v as m,w as h}from"./vendor/json-editor-vue-k2rpz34q.js";import{Mt as g,_,j as v,k as y,v as b}from"#entry";import{t as x}from"./filepath-item-cfknf7u4.js";import{t as S}from"./constants-dict8wns.js";import{t as C}from"./nmarkdown-mnforar7.js";var w={rounded:``,"font-mono":``},T={key:0,"text-primary":``},E={key:0},D={title:`Vue Directive`},O={"max-w-100":``},k={px4:``,py3:``,"text-sm":``},A={flex:`~ gap2`,n:`primary xs`},j={border:`t base`,"max-h-60":``,"of-auto":``,px4:``,py3:``},M={"text-sm":``},N={"text-primary":``},P={flex:`~ col gap-2`,"items-start":``,pt3:``,"text-sm":``,op75:``},F={key:1,"text-sm":``,op50:``},I=Object.assign(t({__name:`ComposableItem`,props:{item:{},isDirective:{type:Boolean,default:!1},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:`px2 py1 text-sm bg-gray:5 `}},setup(t){let I=t,L=_(),R=b(),z=f(()=>I.item.as||I.item.name),B=f(()=>{let e=z.value;return I.isDirective&&(e[0]!==`v`&&(e=`v${e}`),e=g(e)),e}),V=f(()=>I.metadata?.injectionsUsageMap?.get(z.value)?.count||0),H=f(()=>(I.metadata?.injectionsUsageMap?.get(z.value)?.moduleIds||[]).filter(e=>!e.endsWith(`?macro=true`))),U=f(()=>I.item.meta?.docsUrl?I.item.meta.docsUrl:[`nuxt`,`#app`,`nuxt3`].includes(I.item.from)?S.nuxt[I.item.name]:I.item.from===`vue`?S.vue[I.item.name]:null);return(f,g)=>{let _=v,b=C,S=y,W=x,G=o(`VDropdown`);return i(),u(G,{disabled:!I.metadata},{popper:l(()=>[d(`div`,O,[d(`div`,k,[t.item.meta?.description?(i(),u(b,{key:0,tag:`div`,pb3:``,"text-sm":``,markdown:t.item.meta.description},null,8,[`markdown`])):s(``,!0),d(`div`,A,[h(S,{icon:`carbon-copy`,onClick:g[0]||=e=>n(L)(B.value,`imports-name`)},{default:l(()=>[...g[2]||=[e(` Copy `,-1)]]),_:1}),t.filepath?(i(),u(S,{key:0,icon:`carbon-code`,onClick:g[1]||=e=>t.filepath&&n(R)(t.filepath)},{default:l(()=>[...g[3]||=[e(` Source `,-1)]]),_:1})):s(``,!0),U.value?(i(),u(S,{key:1,icon:`carbon-catalog`,to:U.value,target:`_blank`},{default:l(()=>[...g[4]||=[e(` Docs `,-1)]]),_:1},8,[`to`])):s(``,!0)])]),d(`div`,j,[V.value?(i(),m(c,{key:0},[d(`div`,M,[g[5]||=d(`span`,{op50:``},`It has been referenced `,-1),d(`strong`,N,p(V.value),1),g[6]||=d(`span`,{op50:``},` times by:`,-1)]),d(`div`,P,[(i(!0),m(c,null,a(H.value,e=>(i(),u(W,{key:e,filepath:e},null,8,[`filepath`]))),128))])],64)):(i(),m(`div`,F,` Not in use via auto import. `))])])]),default:l(()=>[d(`button`,{"hover:text-primary":``,class:r([t.metadata&&!V.value?`op30 hover:op100`:``,t.classes])},[d(`code`,w,[e(p(z.value)+` `,1),V.value&&t.counter?(i(),m(`sup`,T,`x`+p(V.value),1)):s(``,!0)]),t.isDirective?(i(),m(`sup`,E,[d(`abbr`,D,[h(_,{icon:`tabler:hexagon-letter-d`})])])):s(``,!0)],2)]),_:1},8,[`disabled`])}}}),{__name:`ComposableItem`});export{I as t};
@@ -0,0 +1 @@
1
+ import{$ as e,C as t,Ct as n,E as r,F as i,H as a,Mt as o,V as s,W as c,dt as l,g as u,h as d,lt as f,m as p,tn as m,v as h,w as g,xt as _}from"./vendor/json-editor-vue-k2rpz34q.js";import{At as v,Bt as y,E as b,It as x,Lt as S,Nn as C,Pn as w,Rt as T,a as E,en as D,f as O,h as k,wt as A}from"#entry";import"./composables-dhks1pao.js";import{t as j}from"./launch-page-k1jy2olz.js";var M=new Map,N=Object.assign(r({__name:`IframeView`,props:{tab:{}},setup(e){let t=e,r=A(),o=n(),l=p(()=>t.tab.name),u=n(),d=_(D(o));s(()=>{let e=t.tab.view,n=e.persistent!==!1,r=[`clipboard-write`,`clipboard-read`,...e.permissions||[]];if(M.get(l.value)&&n)u.value=M.get(l.value),u.value.style.visibility=`visible`;else{u.value=document.createElement(`iframe`),u.value.setAttribute(`allow`,r.join(`; `)),u.value.setAttribute(`aria-label`,`Nuxt Devtools`),n&&M.set(l.value,u.value),u.value.src=e.src;try{u.value.style.opacity=`0.01`,u.value.onload=()=>{y(),m(),u.value.style.opacity=`1`}}catch{u.value.style.opacity=`1`}document.body.appendChild(u.value),i(b)}setTimeout(m,100)}),f(b),f(m),f(y),a(()=>{u.value&&(u.value.style.visibility=`hidden`)});function m(){if(!(!u.value||!u.value.contentWindow))try{let e=u.value.contentWindow.document.querySelector(`html`);e?.classList.toggle(`dark`,r.value===`dark`),e?.classList.toggle(`light`,r.value===`dark`),new MutationObserver(()=>{r.value=u.value?.contentWindow?.document.querySelector(`html`)?.classList.contains(`dark`)?`dark`:`light`}).observe(e,{attributes:!0,attributeFilter:[`class`]})}catch{}}let g=v();function y(){if(!(!u.value||!u.value.contentWindow))try{u.value.contentWindow.__NUXT_DEVTOOLS__=g.value}catch{}}function b(){u.value&&Object.assign(u.value.style,{position:`fixed`,left:`${d.left}px`,top:`${d.top}px`,width:`${d.width}px`,height:`${d.height}px`,outline:`none`})}return(e,t)=>(c(),h(`div`,{ref_key:`anchor`,ref:o,"h-full":``,"w-full":``},null,512))}}),{__name:`IframeView`}),P={flex:`~ col gap2`,mxa:``,"items-center":``},F={"text-xl":``},I={"text-rose":``},L=r({__name:`custom-[name]`,props:{name:{}},setup(n){let r=n,i=C(),a=w(),f=p(()=>r.name??i.params.name),h=k(),_=p(()=>h.value.find(e=>e.name===f.value));return s(()=>{_.value?_.value.requireAuth&&!S.value&&T():setTimeout(()=>{_.value||a.push(`/modules/overview`)},2e3)}),(n,r)=>{let i=O,a=E,s=N,p=j,h=b;return _.value?_.value.requireAuth&&!o(S)?(c(),u(a,{key:1})):_.value.view.type===`iframe`?(c(),u(s,{key:2,tab:_.value},null,8,[`tab`])):_.value.view.type===`vnode`?(c(),u(e(_.value.view.vnode),{key:3})):_.value.view.type===`launch`?(c(),u(p,{key:4,name:`custom-${_.value.name}`,icon:_.value.view.icon||_.value.icon,title:_.value.view.title||_.value.title,description:_.value.view.description,actions:_.value.view.actions,onAction:r[0]||=async e=>o(y).customTabAction(await o(x)(),_.value.name,e)},null,8,[`name`,`icon`,`title`,`description`,`actions`])):(c(),u(i,{key:5},{default:l(()=>[g(h,{flex:`~ col`,"h-full":``,"items-center":``,"justify-center":``},{default:l(()=>[t(` Unknown tab type `+m(_.value.view),1)]),_:1})]),_:1})):(c(),u(i,{key:0},{default:l(()=>[d(`div`,P,[r[3]||=d(`div`,{"i-carbon-queued":``,mb2:``,"text-5xl":``,op50:``},null,-1),d(`p`,F,[r[1]||=t(` Tab `,-1),d(`code`,I,m(f.value),1),r[2]||=t(` not found `,-1)]),r[4]||=d(`p`,{op50:``},` It might because the module contributing this tab is not installed or enabled `,-1),r[5]||=d(`p`,{mt8:``,"animate-pulse":``},` Redirecting to overview page... `,-1)])]),_:1}))}}});export{L as default};
@@ -0,0 +1 @@
1
+ import{E as e,Q as t,W as n,ft as r,g as i}from"./vendor/json-editor-vue-k2rpz34q.js";import{k as a,r as o}from"#entry";var s=Object.assign(e({__name:`DataSchemaButton`,props:{getter:{type:Function}},setup(e){let s=o();return(o,c)=>{let l=a,u=t(`tooltip`);return r((n(),i(l,{title:`Generate Data Schema`,icon:`carbon:container-services`,border:!1,onClick:c[0]||=t=>s.value=e.getter()},null,512)),[[u,`Generate Data Schema`]])}}}),{__name:`DataSchemaButton`});export{s as t};
@@ -0,0 +1,2 @@
1
+ import{Ct as e,E as t,Mt as n,W as r,Y as i,_ as a,c as o,ct as s,d as c,dt as l,g as u,h as d,m as f,tn as p,v as m,w as h}from"./vendor/json-editor-vue-k2rpz34q.js";import{Kt as g,_,k as v,r as y}from"#entry";import{t as b}from"./nselect-cvj6vn8t.js";import{t as x}from"./nswitch-nii7reuz.js";import{t as S}from"./ndropdown-bzq1eo9l.js";import{t as C}from"./ncode-block-jmq04laj.js";import{t as w}from"./ndrawer-iq9tsfcb.js";import{n as T,t as E}from"./vendor/quicktype-core-781ta3pq.js";var D=E(),O=T(),k={border:`b base`,flex:`~ items-center gap-2`,sticky:``,"left-0":``,"right-0":``,"top-0":``,"z-1":``,"bg-base":``,p3:``},A={key:0,flex:`~ items-center justify-center`,absolute:``,"bottom--1":``,"right--2":``,"h-4":``,"w-4":``,"rounded-full":``,"bg-lime:30":``,"text-8px":``},j={flex:`~ col`,"w-100":``,"of-auto":``,py2:``},M={"text-xs":``,capitalize:``,op75:``},N=Object.assign(t({__name:`DataSchemaDrawer`,setup(t){let T=y(),E=e(0),N=e(`TypeScript`),P=f(()=>O.all.find(e=>e.displayName===N.value)),F=e(P.value?.optionDefinitions.filter(e=>typeof e.defaultValue==`boolean`)),I=g(async()=>{if(E.value,!T.value)return``;let e=(0,D.jsonInputForTargetLanguage)(N.value);await e.addSource({name:T.value.name??`Data`,samples:[T.value.input]});let t=new D.InputData;return t.addInput(e),(await(0,D.quicktype)({inputData:t,lang:N.value,rendererOptions:F.value?.reduce((e,t)=>(e[t.name]=t.defaultValue,e),{})})).lines.join(`
2
+ `)}),L=f(()=>{let e=N.value.toLocaleLowerCase();return e.startsWith(`javascript`)?`javascript`:e.startsWith(`json`)?`json`:e.startsWith(`typescript`)?`typescript`:e});s(F,()=>{E.value++},{deep:!0}),s(N,()=>{F.value=P.value?.optionDefinitions.filter(e=>typeof e.defaultValue==`boolean`)});let R=_();function z(){R(I.value||``)}return(e,t)=>{let s=b,f=v,g=x,_=S,y=C,E=w;return P.value?(r(),u(c,{key:0,to:`body`},[h(E,{"model-value":!!n(T)?.input,"auto-close":``,"max-w-screen":``,"w-2xl":``,"n-code-block":``,onClose:t[2]||=e=>T.value=null},{default:l(()=>[d(`div`,k,[t[3]||=d(`p`,{"mr-2":``},` Schema `,-1),h(s,{modelValue:N.value,"onUpdate:modelValue":t[0]||=e=>N.value=e,n:`xs primary`},{default:l(()=>[(r(!0),m(o,null,i(n(O.all),e=>(r(),m(`option`,{key:e.displayName},p(e.displayName),1))),128))]),_:1},8,[`modelValue`]),F.value?.length?(r(),u(_,{key:0,n:`sm lime`},{trigger:l(({click:e})=>[h(f,{icon:`carbon-settings`,"h-full":``,onClick:t=>e()},null,8,[`onClick`]),F.value?(r(),m(`span`,A,p(F.value.length),1)):a(``,!0)]),default:l(()=>[d(`div`,j,[(r(!0),m(o,null,i(F.value,(e,t)=>(r(),u(g,{key:e.name,modelValue:F.value[t].defaultValue,"onUpdate:modelValue":e=>F.value[t].defaultValue=e,flex:`~ gap-2`,rounded:``,px2:``,py2:``},{default:l(()=>[d(`span`,M,p(e.description),1)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`]))),128))])]),_:1})):a(``,!0),t[4]||=d(`div`,{"flex-auto":``},null,-1),h(f,{icon:`carbon-copy`,"mr-6":``,"h-full":``,onClick:t[1]||=e=>z()})]),n(I)?(r(),u(y,{key:0,lang:L.value,code:n(I)},null,8,[`lang`,`code`])):a(``,!0)]),_:1},8,[`model-value`])])):a(``,!0)}}}),{__name:`DataSchemaDrawer`});export{N as default};
@@ -0,0 +1 @@
1
+ import{C as e,Ct as t,E as n,Mt as r,Qt as i,W as a,X as o,Y as s,_ as c,c as l,dt as u,en as d,g as f,h as p,m,tn as h,v as g,w as _}from"./vendor/json-editor-vue-k2rpz34q.js";import{k as v,mt as y}from"#entry";import{t as b}from"./ncode-block-jmq04laj.js";import"./composables-dhks1pao.js";import{t as x}from"./ncheckbox-oaojay1f.js";import{t as S}from"./filepath-item-cfknf7u4.js";import{t as C}from"./nsection-block-mm2ln8au.js";import{t as w}from"./nbadge-dq091bml.js";import{t as T}from"./color-nuuzg844.js";var E=Object.assign(n({__name:`NBadgeHashed`,props:{text:{}},setup(t){let n=t,r=m(()=>({color:T(n.text,50,60),background:T(n.text,50,60,.05)}));return(n,i)=>(a(),f(w,{style:d(r.value)},{default:u(()=>[e(h(t.text),1),o(n.$slots,`default`)]),_:3},8,[`style`]))}}),{__name:`NBadgeHashed`}),D={flex:`~ gap-2 col`,mb4:``},O={flex:`~ gap-3 items-center`},k={key:0,flex:`~ gap-1`,"items-center":``,p1:``,border:`~ base rounded`},A={"max-w-full":``,"of-auto":``},j={"text-center":``,op50:``},M={flex:`~`,px4:``},N={key:0,op50:``},P={px2:``,"text-center":``},F={"of-auto":``},I=Object.assign(n({__name:`DebugModuleMutationRecords`,props:{moduleMutationRecords:{}},setup(e){let n=e,r=/^[a-z]:[\\/]/i;function o(e){return e.startsWith(`/`)||e.match(r)}let d=t(!1),y=t(!1),C=t(!1),w=t(!1),T=t(!1),I=t(``),L=m(()=>{let e=n.moduleMutationRecords;return d.value||(e=e.filter(e=>!e.name.startsWith(`nuxt:`)&&e.name!==`@nuxt/devtools`)),y.value||(e=e.filter(e=>e.keys.join(`.`)!==`build.templates`)),C.value||(e=e.filter(e=>e.keys.join(`.`)!==`build.transpile`)),w.value||(e=e.filter(e=>e.keys.join(`.`)!==`plugins`)),T.value||(e=e.filter(e=>e.method||e.value!==`[]`&&e.value!==`{}`)),I.value&&(e=e.filter(e=>e.name===I.value)),e});return(t,n)=>{let r=x,m=E,R=v,z=S,B=b;return a(),g(l,null,[p(`div`,D,[p(`div`,O,[_(r,{modelValue:d.value,"onUpdate:modelValue":n[0]||=e=>d.value=e,n:`primary`},{default:u(()=>[...n[6]||=[p(`span`,{"ws-nowrap":``,op75:``},`Builtin Modules`,-1)]]),_:1},8,[`modelValue`]),_(r,{modelValue:y.value,"onUpdate:modelValue":n[1]||=e=>y.value=e,n:`primary`},{default:u(()=>[...n[7]||=[p(`span`,{"ws-nowrap":``,op75:``},`Templates`,-1)]]),_:1},8,[`modelValue`]),_(r,{modelValue:C.value,"onUpdate:modelValue":n[2]||=e=>C.value=e,n:`primary`},{default:u(()=>[...n[8]||=[p(`span`,{"ws-nowrap":``,op75:``},`Transpile`,-1)]]),_:1},8,[`modelValue`]),_(r,{modelValue:w.value,"onUpdate:modelValue":n[3]||=e=>w.value=e,n:`primary`},{default:u(()=>[...n[9]||=[p(`span`,{"ws-nowrap":``,op75:``},`Plugins`,-1)]]),_:1},8,[`modelValue`]),_(r,{modelValue:T.value,"onUpdate:modelValue":n[4]||=e=>T.value=e,n:`primary`},{default:u(()=>[...n[10]||=[p(`span`,{"ws-nowrap":``,op75:``},`Empty Initial`,-1)]]),_:1},8,[`modelValue`]),I.value?(a(),g(`div`,k,[_(m,{"font-mono":``,text:I.value},null,8,[`text`]),_(R,{icon:`carbon-close`,border:!1,onClick:n[5]||=e=>I.value=``})])):c(``,!0)])]),p(`table`,A,[n[11]||=p(`thead`,{border:`b base`},[p(`tr`,null,[p(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Index `),p(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Module `),p(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Key Path `),p(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Method `),p(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Value `)])],-1),p(`tbody`,null,[(a(!0),g(l,null,s(L.value,t=>(a(),g(`tr`,{key:e.moduleMutationRecords.indexOf(t),border:`b dashed transparent hover:base`},[p(`td`,j,[p(`div`,null,h(e.moduleMutationRecords.indexOf(t)+1),1)]),p(`td`,null,[t.name&&o(t.name)?(a(),f(z,{key:0,filepath:t.name},null,8,[`filepath`])):(a(),f(m,{key:1,role:`button`,"font-mono":``,text:t.name,onClick:e=>I.value=t.name},null,8,[`text`,`onClick`]))]),p(`td`,null,[p(`code`,M,[(a(!0),g(l,null,s(t.keys,(e,n)=>(a(),g(l,{key:n},[p(`span`,null,h(e),1),n<t.keys.length-1?(a(),g(`span`,N,` . `)):c(``,!0)],64))),128))])]),p(`td`,P,[_(m,{"font-mono":``,text:t.method||`=`,class:i(t.method?``:`saturate-0`)},null,8,[`text`,`class`])]),p(`td`,F,[_(B,{code:String(t.value),lang:`ts`,"grammar-context-code":`let a = `,"ws-normal":``,"break-all":``,py1:``,lines:!1,inline:!0},null,8,[`code`])])]))),128))])])],64)}}}),{__name:`DebugModuleMutationRecords`}),L={key:0,p6:``},R={key:1},z=n({__name:`debug`,setup(e){let t=y();return(e,n)=>{let i=C;return r(t)?(a(),g(`div`,R,[_(i,{icon:`carbon-container-image-push-pull`,text:`Module Mutation Records`,description:`Records of module mutations to nuxt options`},{default:u(()=>[_(I,{"module-mutation-records":r(t).moduleMutationRecords||[]},null,8,[`module-mutation-records`])]),_:1})])):(a(),g(`div`,L,[...n[0]||=[p(`div`,null,`No Debug Context Found`,-1),p(`div`,null,"Set `debug: true` in your nuxt.config.ts to enable this panel",-1)]]))}}});export{z as default};
@@ -1 +1 @@
1
- import{W as e,X as t,h as n,v as r}from"./vendor/json-editor-vue-eojr4v24.js";import{t as i}from"./_plugin-vue_export-helper-n58akrbk.js";var a={},o={"h-full":``,"of-auto":``,"n-panel-grids":``},s={"h-full":``,"bg-base":``};function c(i,a){return e(),r(`div`,o,[n(`div`,s,[t(i.$slots,`default`)])])}var l=i(a,[[`render`,c]]);export{l as default};
1
+ import{W as e,X as t,h as n,v as r}from"./vendor/json-editor-vue-k2rpz34q.js";import{t as i}from"./_plugin-vue_export-helper-e0bby96w.js";var a={},o={"h-full":``,"of-auto":``,"n-panel-grids":``},s={"h-full":``,"bg-base":``};function c(i,a){return e(),r(`div`,o,[n(`div`,s,[t(i.$slots,`default`)])])}var l=i(a,[[`render`,c]]);export{l as default};
@@ -1 +1 @@
1
- var e=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,t=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,n=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function r(e,t){if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){i(e);return}return t}function i(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function a(i,a={}){if(typeof i!=`string`)return i;if(i[0]===`"`&&i[i.length-1]===`"`&&i.indexOf(`\\`)===-1)return i.slice(1,-1);let o=i.trim();if(o.length<=9)switch(o.toLowerCase()){case`true`:return!0;case`false`:return!1;case`undefined`:return;case`null`:return null;case`nan`:return NaN;case`infinity`:return 1/0;case`-infinity`:return-1/0}if(!n.test(i)){if(a.strict)throw SyntaxError(`[destr] Invalid JSON`);return i}try{if(e.test(i)||t.test(i)){if(a.strict)throw Error(`[destr] Possible prototype pollution`);return JSON.parse(i,r)}return JSON.parse(i)}catch(e){if(a.strict)throw e;return i}}String.fromCharCode;var o=/#/g,s=/&/g,c=/\//g,l=/=/g,u=/\?/g,d=/\+/g,f=/%5e/gi,p=/%60/gi,m=/%7c/gi,h=/%20/gi,g=/%2f/gi,_=/%252f/gi;function v(e){return encodeURI(``+e).replace(m,`|`)}function y(e){return v(typeof e==`string`?e:JSON.stringify(e)).replace(d,`%2B`).replace(h,`+`).replace(o,`%23`).replace(s,`%26`).replace(p,"`").replace(f,`^`).replace(c,`%2F`)}function b(e){return y(e).replace(l,`%3D`)}function x(e){return v(e).replace(o,`%23`).replace(u,`%3F`).replace(_,`%2F`).replace(s,`%26`).replace(d,`%2B`)}function S(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function C(e){return S(e.replace(g,`%252F`))}function w(e){return S(e.replace(d,` `))}function T(e){return S(e.replace(d,` `))}function E(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=w(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=T(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function D(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${b(e)}=${y(t)}`).join(`&`):`${b(e)}=${y(t)}`:b(e)}function O(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>D(t,e[t])).filter(Boolean).join(`&`)}var k=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,A=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,j=/^([/\\]\s*){2,}[^/\\]/,M=/^[\s\0]*(blob|data|javascript|vbscript):$/i,N=/\/$|\/\?|\/#/,P=/^\.?\//;function F(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?k.test(e):A.test(e)||(t.acceptRelative?j.test(e):!1)}function I(e){return!!e&&M.test(e)}function L(e=``,t){return t?N.test(e):e.endsWith(`/`)}function R(e=``,t){if(!t)return(L(e)?e.slice(0,-1):e)||`/`;if(!L(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function z(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(L(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function B(e,t){if(U(t)||F(e))return e;let n=R(t);if(e.startsWith(n)){let t=e[n.length];if(!t||t===`/`||t===`?`)return e}return G(n,e)}function V(e,t){if(U(t))return e;let n=R(t);if(!e.startsWith(n))return e;let r=e[n.length];if(r&&r!==`/`&&r!==`?`)return e;let i=e.slice(n.length);return i[0]===`/`?i:`/`+i}function H(e,t){let n=Y(e);return n.search=O({...E(n.search),...t}),Z(n)}function U(e){return!e||e===`/`}function W(e){return e&&e!==`/`}function G(e,...t){let n=e||``;for(let e of t.filter(e=>W(e)))if(n){let t=e.replace(P,``);n=z(n)+t}else n=e;return n}function K(...e){let t=/\/(?!\/)/,n=e.filter(Boolean),r=[],i=0;for(let e of n)if(!(!e||e===`/`)){for(let[n,a]of e.split(t).entries())if(!(!a||a===`.`)){if(a===`..`){if(r.length===1&&F(r[0]))continue;r.pop(),i--;continue}if(n===1&&r[r.length-1]?.endsWith(`:/`)){r[r.length-1]+=`/`+a;continue}r.push(a),i++}}let a=r.join(`/`);return i>=0?n[0]?.startsWith(`/`)&&!a.startsWith(`/`)?a=`/`+a:n[0]?.startsWith(`./`)&&!a.startsWith(`./`)&&(a=`./`+a):a=`../`.repeat(-1*i)+a,n[n.length-1]?.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`),a}function q(e,t){return S(R(e))===S(R(t))}var J=Symbol.for(`ufo:protocolRelative`);function Y(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!F(e,{acceptRelative:!0}))return t?Y(t+e):X(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=X(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[J]:!r}}function X(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function Z(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[J]?(e.protocol||``)+`//`:``)+i+a+t+n+r}export{I as a,E as c,H as d,z as f,a as h,q as i,Y as l,R as m,x as n,K as o,V as p,F as r,G as s,C as t,B as u};
1
+ var e=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,t=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,n=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function r(e,t){if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){i(e);return}return t}function i(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function a(i,a={}){if(typeof i!=`string`)return i;if(i[0]===`"`&&i[i.length-1]===`"`&&i.indexOf(`\\`)===-1)return i.slice(1,-1);let o=i.trim();if(o.length<=9)switch(o.toLowerCase()){case`true`:return!0;case`false`:return!1;case`undefined`:return;case`null`:return null;case`nan`:return NaN;case`infinity`:return 1/0;case`-infinity`:return-1/0}if(!n.test(i)){if(a.strict)throw SyntaxError(`[destr] Invalid JSON`);return i}try{if(e.test(i)||t.test(i)){if(a.strict)throw Error(`[destr] Possible prototype pollution`);return JSON.parse(i,r)}return JSON.parse(i)}catch(e){if(a.strict)throw e;return i}}String.fromCharCode;var o=/#/g,s=/&/g,c=/\//g,l=/=/g,u=/\?/g,d=/\+/g,f=/%5e/gi,p=/%60/gi,m=/%7c/gi,h=/%20/gi,g=/%2f/gi,_=/%252f/gi;function v(e){return encodeURI(``+e).replace(m,`|`)}function y(e){return v(typeof e==`string`?e:JSON.stringify(e)).replace(d,`%2B`).replace(h,`+`).replace(o,`%23`).replace(s,`%26`).replace(p,"`").replace(f,`^`).replace(c,`%2F`)}function b(e){return y(e).replace(l,`%3D`)}function x(e){return v(e).replace(o,`%23`).replace(u,`%3F`).replace(_,`%2F`).replace(s,`%26`).replace(d,`%2B`)}function S(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function C(e){return S(e.replace(g,`%252F`))}function w(e){return S(e.replace(d,` `))}function T(e){return S(e.replace(d,` `))}function E(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=w(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=T(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function D(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${b(e)}=${y(t)}`).join(`&`):`${b(e)}=${y(t)}`:b(e)}function O(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>D(t,e[t])).filter(Boolean).join(`&`)}var k=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,A=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,j=/^([/\\]\s*){2,}[^/\\]/,M=/^[\s\0]*(blob|data|javascript|vbscript):$/i,N=/\/$|\/\?|\/#/,P=/^\.?\//;function F(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?k.test(e):A.test(e)||(t.acceptRelative?j.test(e):!1)}function I(e){return!!e&&M.test(e)}function L(e=``,t){return t?N.test(e):e.endsWith(`/`)}function R(e=``,t){if(!t)return(L(e)?e.slice(0,-1):e)||`/`;if(!L(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function z(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(L(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function B(e,t){if(U(t)||F(e))return e;let n=R(t);if(e.startsWith(n)){let t=e[n.length];if(!t||t===`/`||t===`?`)return e}return G(n,e)}function V(e,t){if(U(t))return e;let n=R(t);if(!e.startsWith(n))return e;let r=e[n.length];return r&&r!==`/`&&r!==`?`?e:`/`+e.slice(n.length).replace(/^\/+/,``)}function H(e,t){let n=Y(e);return n.search=O({...E(n.search),...t}),Z(n)}function U(e){return!e||e===`/`}function W(e){return e&&e!==`/`}function G(e,...t){let n=e||``;for(let e of t.filter(e=>W(e)))if(n){let t=e.replace(P,``);n=z(n)+t}else n=e;return n}function K(...e){let t=/\/(?!\/)/,n=e.filter(Boolean),r=[],i=0;for(let e of n)if(!(!e||e===`/`)){for(let[n,a]of e.split(t).entries())if(!(!a||a===`.`)){if(a===`..`){if(r.length===1&&F(r[0]))continue;r.pop(),i--;continue}if(n===1&&r[r.length-1]?.endsWith(`:/`)){r[r.length-1]+=`/`+a;continue}r.push(a),i++}}let a=r.join(`/`);return i>=0?n[0]?.startsWith(`/`)&&!a.startsWith(`/`)?a=`/`+a:n[0]?.startsWith(`./`)&&!a.startsWith(`./`)&&(a=`./`+a):a=`../`.repeat(-1*i)+a,n[n.length-1]?.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`),a}function q(e,t){return S(R(e))===S(R(t))}var J=Symbol.for(`ufo:protocolRelative`);function Y(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!F(e,{acceptRelative:!0}))return t?Y(t+e):X(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=X(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[J]:!r}}function X(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function Z(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[J]?(e.protocol||``)+`//`:``)+i+a+t+n+r}export{I as a,E as c,H as d,z as f,a as h,q as i,Y as l,R as m,x as n,K as o,V as p,F as r,G as s,C as t,B as u};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-ga5ujxqr.js";import{d as t,h as n,u as r}from"./dist-hjee3mrt.js";var i=class extends Error{constructor(e,t){super(e,t),this.name=`FetchError`,t?.cause&&!this.cause&&(this.cause=t.cause)}};function a(e){let t=e.error?.message||e.error?.toString()||``,n=e.request?.method||e.options?.method||`GET`,r=e.request?.url||String(e.request)||`/`,a=new i(`${`[${n}] ${JSON.stringify(r)}`}: ${e.response?`${e.response.status} ${e.response.statusText}`:`<no response>`}${t?` ${t}`:``}`,e.error?{cause:e.error}:void 0);for(let t of[`request`,`options`,`response`])Object.defineProperty(a,t,{get(){return e[t]}});for(let[t,n]of[[`data`,`_data`],[`status`,`status`],[`statusCode`,`status`],[`statusText`,`statusText`],[`statusMessage`,`statusText`]])Object.defineProperty(a,t,{get(){return e.response&&e.response[n]}});return a}var o=new Set(Object.freeze([`PATCH`,`POST`,`PUT`,`DELETE`]));function s(e=`GET`){return o.has(e.toUpperCase())}function c(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer||e instanceof FormData||e instanceof URLSearchParams?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}var l=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]),u=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function d(e=``){if(!e)return`json`;let t=e.split(`;`).shift()||``;return u.test(t)?`json`:t===`text/event-stream`?`stream`:l.has(t)||t.startsWith(`text/`)?`text`:`blob`}function f(e,t,n,r){let i=p(t?.headers??e?.headers,n?.headers,r),a;return(n?.query||n?.params||t?.params||t?.query)&&(a={...n?.params,...n?.query,...t?.params,...t?.query}),{...n,...t,query:a,params:a,headers:i}}function p(e,t,n){if(!t)return new n(e);let r=new n(t);if(e)for(let[t,i]of Symbol.iterator in e||Array.isArray(e)?e:new n(e))r.set(t,i);return r}async function m(e,t){if(t)if(Array.isArray(t))for(let n of t)await n(e);else await t(e)}var h=new Set([408,409,425,429,500,502,503,504]),g=new Set([101,204,205,304]);function _(e={}){let{fetch:i=globalThis.fetch,Headers:o=globalThis.Headers,AbortController:l=globalThis.AbortController}=e;async function u(e){let t=e.error&&e.error.name===`AbortError`&&!e.options.timeout||!1;if(e.options.retry!==!1&&!t){let t;t=typeof e.options.retry==`number`?e.options.retry:+!s(e.options.method);let n=e.response&&e.response.status||500;if(t>0&&(Array.isArray(e.options.retryStatusCodes)?e.options.retryStatusCodes.includes(n):h.has(n))){let n=typeof e.options.retryDelay==`function`?e.options.retryDelay(e):e.options.retryDelay||0;return n>0&&await new Promise(e=>setTimeout(e,n)),p(e.request,{...e.options,retry:t-1})}}let n=a(e);throw Error.captureStackTrace&&Error.captureStackTrace(n,p),n}let p=async function(a,p={}){let h={request:a,options:f(a,p,e.defaults,o),response:void 0,error:void 0};if(h.options.method&&(h.options.method=h.options.method.toUpperCase()),h.options.onRequest&&(await m(h,h.options.onRequest),h.options.headers instanceof o||(h.options.headers=new o(h.options.headers||{}))),typeof h.request==`string`&&(h.options.baseURL&&(h.request=r(h.request,h.options.baseURL)),h.options.query&&(h.request=t(h.request,h.options.query),delete h.options.query),`query`in h.options&&delete h.options.query,`params`in h.options&&delete h.options.params),h.options.body&&s(h.options.method))if(c(h.options.body)){let e=h.options.headers.get(`content-type`);typeof h.options.body!=`string`&&(h.options.body=e===`application/x-www-form-urlencoded`?new URLSearchParams(h.options.body).toString():JSON.stringify(h.options.body)),e||h.options.headers.set(`content-type`,`application/json`),h.options.headers.has(`accept`)||h.options.headers.set(`accept`,`application/json`)}else (`pipeTo`in h.options.body&&typeof h.options.body.pipeTo==`function`||typeof h.options.body.pipe==`function`)&&(`duplex`in h.options||(h.options.duplex=`half`));let _;if(!h.options.signal&&h.options.timeout){let e=new l;_=setTimeout(()=>{let t=Error(`[TimeoutError]: The operation was aborted due to timeout`);t.name=`TimeoutError`,t.code=23,e.abort(t)},h.options.timeout),h.options.signal=e.signal}try{h.response=await i(h.request,h.options)}catch(e){return h.error=e,h.options.onRequestError&&await m(h,h.options.onRequestError),await u(h)}finally{_&&clearTimeout(_)}if((h.response.body||h.response._bodyInit)&&!g.has(h.response.status)&&h.options.method!==`HEAD`){let e=(h.options.parseResponse?`json`:h.options.responseType)||d(h.response.headers.get(`content-type`)||``);switch(e){case`json`:{let e=await h.response.text(),t=h.options.parseResponse||n;h.response._data=t(e);break}case`stream`:h.response._data=h.response.body||h.response._bodyInit;break;default:h.response._data=await h.response[e]()}}return h.options.onResponse&&await m(h,h.options.onResponse),!h.options.ignoreResponseError&&h.response.status>=400&&h.response.status<600?(h.options.onResponseError&&await m(h,h.options.onResponseError),await u(h)):h.response},v=async function(e,t){return(await p(e,t))._data};return v.raw=p,v.native=(...e)=>i(...e),v.create=(t={},n={})=>_({...e,...n,defaults:{...e.defaults,...n.defaults,...t}}),v}var v=e({$fetch:()=>w,AbortController:()=>S,Headers:()=>x,createFetch:()=>_,fetch:()=>b,ofetch:()=>C}),y=(function(){if(typeof globalThis<`u`)return globalThis;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`unable to locate global object`)})(),b=y.fetch?(...e)=>y.fetch(...e):()=>Promise.reject(Error(`[ofetch] global.fetch is not supported!`)),x=y.Headers,S=y.AbortController,C=_({fetch:b,Headers:x,AbortController:S}),w=C;export{v as n,w as t};
@@ -0,0 +1 @@
1
+ import{C as e,E as t,Qt as n,W as r,X as i,h as a,m as o,tn as s,v as c}from"./vendor/json-editor-vue-k2rpz34q.js";var l={"ml-1":``,"text-xs":``,op50:``},u=Object.assign(t({__name:`DurationDisplay`,props:{duration:{},factor:{default:1},color:{type:Boolean,default:!0}},setup(t){let u=t;function d(e){return u.color?e?(e*=u.factor,e<.5?`text-gray:50`:e>1e3?`text-red-400`:e>500?`text-orange-400`:e>200?`text-yellow-400`:``):`text-gray-400`:``}let f=o(()=>!u.duration||u.duration<1?[`<1`,`ms`]:u.duration<1e3?[u.duration.toFixed(0),`ms`]:u.duration<1e3*60?[(u.duration/1e3).toFixed(1),`s`]:[(u.duration/1e3/60).toFixed(1),`min`]);return(o,u)=>(r(),c(`div`,{class:n(d(t.duration))},[i(o.$slots,`before`),e(` `+s(f.value[0]),1),a(`span`,l,s(f.value[1]),1),i(o.$slots,`after`)],2))}}),{__name:`DurationDisplay`});export{u as t};