@nuxt/devtools-nightly 2.3.0-29030700.4e9da7f → 2.3.1-29049449.84e96a6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +34 -25
- package/dist/chunks/vue-devtools.mjs +1 -0
- package/dist/client/200.html +21 -21
- package/dist/client/404.html +21 -21
- package/dist/client/_nuxt/__blank-mlfs714t.js +1 -0
- package/dist/client/_nuxt/analyze-build-l4u9vngr.js +1 -0
- package/dist/client/_nuxt/{assets-bol0psb8.js → assets-cya9ut8s.js} +3 -3
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/972fd647-8b28-4590-b53f-e511b82a966b.json +1 -0
- package/dist/client/_nuxt/{client-depgvswg.js → client-bqg1k5yt.js} +1 -1
- package/dist/client/_nuxt/{code-diff.vue-c2k4tt95.js → code-diff.vue-l37hbopl.js} +1 -1
- package/dist/client/_nuxt/{code-snippets.vue-ffujbfa1.js → code-snippets.vue-kphwmbok.js} +1 -1
- package/dist/client/_nuxt/components-f9g35efg.js +1 -0
- package/dist/client/_nuxt/composable-item.vue-fa4o8i1w.js +1 -0
- package/dist/client/_nuxt/custom-_name_-kud935h1.js +1 -0
- package/dist/client/_nuxt/{data-schema-button.vue-dndx7s2b.js → data-schema-button.vue-owkxziqe.js} +1 -1
- package/dist/client/_nuxt/{data-schema-drawer-cki7ange.js → data-schema-drawer-fxe24vza.js} +1 -1
- package/dist/client/_nuxt/debug-dwci872u.js +1 -0
- package/dist/client/_nuxt/{default-or8uzb2q.js → default-gyp6xcrp.js} +1 -1
- package/dist/client/_nuxt/{duration-display.vue-nwmxglh9.js → duration-display.vue-lb5nc1xj.js} +1 -1
- package/dist/client/_nuxt/{error-404-g23y711d.js → error-404-ivdr62t0.js} +1 -1
- package/dist/client/_nuxt/error-404.css-lr4x8rvs.css +1 -0
- package/dist/client/_nuxt/{error-500-h3hold74.js → error-500-cilmhs3z.js} +1 -1
- package/dist/client/_nuxt/error-500.css-k7guqst3.css +1 -0
- package/dist/client/_nuxt/{error-dmn8eenl.js → error-dhp600iy.js} +3 -3
- package/dist/client/_nuxt/{filepath-item.vue-e3mw6ihu.js → filepath-item.vue-k4a0mond.js} +1 -1
- package/dist/client/_nuxt/full-uvupzezn.js +1 -0
- package/dist/client/_nuxt/{help-fab.vue-ih4klrti.js → help-fab.vue-i4cbi170.js} +1 -1
- package/dist/client/_nuxt/hooks-o4a5f76f.js +1 -0
- package/dist/client/_nuxt/imports-bqpfk3t7.js +1 -0
- package/dist/client/_nuxt/{index-fogrfcrv.js → index-fc3ln0cj.js} +1 -1
- package/dist/client/_nuxt/{g6w16mwm.js → iqvenqyt.js} +7 -7
- package/dist/client/_nuxt/launch-page.vue-mko9c0yg.js +1 -0
- package/dist/client/_nuxt/modules-oseb196y.js +1 -0
- package/dist/client/_nuxt/nbadge-d2jfne2x.js +1 -0
- package/dist/client/_nuxt/{ncheckbox.vue-g46xga2z.js → ncheckbox.vue-c1ajbv0t.js} +1 -1
- package/dist/client/_nuxt/{ncode-block.vue-b8i8bs30.js → ncode-block.vue-h2q9yyre.js} +1 -1
- package/dist/client/_nuxt/{ndrawer.vue-necxfx94.js → ndrawer.vue-fxx19iyw.js} +1 -1
- package/dist/client/_nuxt/{ndropdown.vue-dfk99om4.js → ndropdown.vue-44hzetpc.js} +1 -1
- package/dist/client/_nuxt/{nicon-title.vue-j53icbz7.js → nicon-title.vue-oyhtd7jm.js} +1 -1
- package/dist/client/_nuxt/{nlink.vue-kmsl6pb2.js → nlink.vue-ngoq980d.js} +1 -1
- package/dist/client/_nuxt/{nmarkdown.vue-du6y1w8i.js → nmarkdown.vue-io3ubke7.js} +1 -1
- package/dist/client/_nuxt/{nnavbar.vue-jvh7fbv3.js → nnavbar.vue-bwg2euf2.js} +1 -1
- package/dist/client/_nuxt/none-b2nry902.js +1 -0
- package/dist/client/_nuxt/nsection-block-gfrcu8rt.js +1 -0
- package/dist/client/_nuxt/{nselect-tabs.vue-jfaeh8pr.js → nselect-tabs.vue-d8ehppwi.js} +1 -1
- package/dist/client/_nuxt/{nselect.vue-opjqwijx.js → nselect.vue-pfvee7y8.js} +1 -1
- package/dist/client/_nuxt/{nswitch.vue-b6shko7o.js → nswitch.vue-fl7pkx4a.js} +1 -1
- package/dist/client/_nuxt/{open-graph-pa9pq1qr.js → open-graph-ikmd0ho7.js} +2 -2
- package/dist/client/_nuxt/{overview-jhyvbe3c.js → overview-hohfrpf6.js} +1 -1
- package/dist/client/_nuxt/pages-ixkelo3v.js +1 -0
- package/dist/client/_nuxt/{payload-c3chiawh.js → payload-khtf05ho.js} +1 -1
- package/dist/client/_nuxt/pinia-cb8gug6o.js +1 -0
- package/dist/client/_nuxt/plugins-l6v6mk5w.js +1 -0
- package/dist/client/_nuxt/render-tree-oi5zjyn8.js +1 -0
- package/dist/client/_nuxt/{runtime-configs-cltz42gv.js → runtime-configs-eztdtakc.js} +1 -1
- package/dist/client/_nuxt/server-discovery-hc3olej4.js +1 -0
- package/dist/client/_nuxt/{server-route-inputs.vue-ji6lf974.js → server-route-inputs.vue-hr8dty3m.js} +1 -1
- package/dist/client/_nuxt/server-routes-kv3oef8u.js +9 -0
- package/dist/client/_nuxt/server-tasks-ib29kkg7.js +1 -0
- package/dist/client/_nuxt/settings-exw11d0g.js +1 -0
- package/dist/client/_nuxt/{stacktrace-list.vue-bjfe0xq3.js → stacktrace-list.vue-cwat1djs.js} +1 -1
- package/dist/client/_nuxt/{state-components-c3s0t274.js → state-components-d05ai5jc.js} +1 -1
- package/dist/client/_nuxt/state-editor.vue-lfrj58p2.js +1 -0
- package/dist/client/_nuxt/state-modules-n04tp7bp.js +1 -0
- package/dist/client/_nuxt/storage-b83iamtk.js +1 -0
- package/dist/client/_nuxt/{terminals-if5ocl8m.js → terminals-hirtnjgz.js} +1 -1
- package/dist/client/_nuxt/timeline-jrssow4w.js +31 -0
- package/dist/client/_nuxt/{unocss-runtime-ovsm21fl.js → unocss-runtime-bag0aauk.js} +1 -1
- package/dist/client/_nuxt/vendor/{json-editor-vue-j95m40pi.js → json-editor-vue-huf8dypo.js} +25 -25
- package/dist/client/_nuxt/vendor/{quicktype-core-eilmqyuc.js → quicktype-core-klbd9u2j.js} +1 -1
- package/dist/client/_nuxt/vendor/{unocss-k3376dad.js → unocss-e7oqigho.js} +2 -2
- package/dist/client/_nuxt/virtual-files-cppbk82w.js +1 -0
- package/dist/client/_nuxt/vue-devtools-c1ih9dap.js +2 -0
- package/dist/client/_nuxt/{vue-virtual-scroller.esm-hp3a40lw.js → vue-virtual-scroller.esm-bjuzk3oj.js} +1 -1
- package/dist/client/discovery/index.html +2 -2
- package/dist/client/index.html +21 -21
- package/dist/module.json +1 -1
- package/package.json +15 -15
- package/dist/client/_nuxt/__blank-gnbkcaj6.js +0 -1
- package/dist/client/_nuxt/analyze-build-disuv9nz.js +0 -1
- package/dist/client/_nuxt/builds/meta/93e96002-53ee-435d-a786-291071f13d10.json +0 -1
- package/dist/client/_nuxt/components-j46hsiw6.js +0 -1
- package/dist/client/_nuxt/composable-item.vue-cuunc6tb.js +0 -1
- package/dist/client/_nuxt/custom-_name_-m8tbyr3m.js +0 -1
- package/dist/client/_nuxt/debug-lynjvm10.js +0 -1
- package/dist/client/_nuxt/error-404.css-gqth5ww7.css +0 -1
- package/dist/client/_nuxt/error-500.css-n3cvcfas.css +0 -1
- package/dist/client/_nuxt/full-ec5mvazg.js +0 -1
- package/dist/client/_nuxt/hooks-hwn6jk4a.js +0 -1
- package/dist/client/_nuxt/imports-efj7xgz0.js +0 -1
- package/dist/client/_nuxt/launch-page.vue-f6hj2bc3.js +0 -1
- package/dist/client/_nuxt/modules-hftfxvci.js +0 -1
- package/dist/client/_nuxt/nbadge-i5wffxg9.js +0 -1
- package/dist/client/_nuxt/none-ntgsy5tv.js +0 -1
- package/dist/client/_nuxt/nsection-block-bhn7y6bo.js +0 -1
- package/dist/client/_nuxt/pages-fxnclk3t.js +0 -1
- package/dist/client/_nuxt/pinia-kmdpc7ln.js +0 -1
- package/dist/client/_nuxt/plugins-lb7qytta.js +0 -1
- package/dist/client/_nuxt/render-tree-wziqd59x.js +0 -1
- package/dist/client/_nuxt/server-discovery-o0ldqsnp.js +0 -1
- package/dist/client/_nuxt/server-routes-fehe38cs.js +0 -9
- package/dist/client/_nuxt/server-tasks-kncc9k4m.js +0 -1
- package/dist/client/_nuxt/settings-o6lsd2bc.js +0 -1
- package/dist/client/_nuxt/state-editor.vue-cq4ztvym.js +0 -1
- package/dist/client/_nuxt/state-modules-lthv67yt.js +0 -1
- package/dist/client/_nuxt/storage-fwtb7h5r.js +0 -1
- package/dist/client/_nuxt/timeline-jdllc5o8.js +0 -31
- package/dist/client/_nuxt/virtual-files-nqyqxb02.js +0 -1
- package/dist/client/_nuxt/vue-devtools-g0ipgwgp.js +0 -2
|
@@ -42,7 +42,7 @@ import __cjs_mod__ from 'module';
|
|
|
42
42
|
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
43
43
|
const __dirname = __cjs_path__.dirname(__filename);
|
|
44
44
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
45
|
-
const version$1 = "2.3.
|
|
45
|
+
const version$1 = "2.3.1-29049449.84e96a6";
|
|
46
46
|
|
|
47
47
|
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
48
48
|
function randomStr(size = 16, dict = urlAlphabet) {
|
|
@@ -971,6 +971,7 @@ var
|
|
|
971
971
|
SCOPE_SUPER = 64,
|
|
972
972
|
SCOPE_DIRECT_SUPER = 128,
|
|
973
973
|
SCOPE_CLASS_STATIC_BLOCK = 256,
|
|
974
|
+
SCOPE_CLASS_FIELD_INIT = 512,
|
|
974
975
|
SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
|
|
975
976
|
|
|
976
977
|
function functionFlags(async, generator) {
|
|
@@ -1081,15 +1082,16 @@ Parser.prototype.parse = function parse () {
|
|
|
1081
1082
|
|
|
1082
1083
|
prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 };
|
|
1083
1084
|
|
|
1084
|
-
prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0
|
|
1085
|
+
prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 };
|
|
1085
1086
|
|
|
1086
|
-
prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0
|
|
1087
|
+
prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 };
|
|
1087
1088
|
|
|
1088
1089
|
prototypeAccessors.canAwait.get = function () {
|
|
1089
1090
|
for (var i = this.scopeStack.length - 1; i >= 0; i--) {
|
|
1090
|
-
var
|
|
1091
|
-
|
|
1092
|
-
if (
|
|
1091
|
+
var ref = this.scopeStack[i];
|
|
1092
|
+
var flags = ref.flags;
|
|
1093
|
+
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT)) { return false }
|
|
1094
|
+
if (flags & SCOPE_FUNCTION) { return (flags & SCOPE_ASYNC) > 0 }
|
|
1093
1095
|
}
|
|
1094
1096
|
return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction
|
|
1095
1097
|
};
|
|
@@ -1097,8 +1099,7 @@ prototypeAccessors.canAwait.get = function () {
|
|
|
1097
1099
|
prototypeAccessors.allowSuper.get = function () {
|
|
1098
1100
|
var ref = this.currentThisScope();
|
|
1099
1101
|
var flags = ref.flags;
|
|
1100
|
-
|
|
1101
|
-
return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod
|
|
1102
|
+
return (flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod
|
|
1102
1103
|
};
|
|
1103
1104
|
|
|
1104
1105
|
prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 };
|
|
@@ -1106,10 +1107,13 @@ prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThis
|
|
|
1106
1107
|
prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) };
|
|
1107
1108
|
|
|
1108
1109
|
prototypeAccessors.allowNewDotTarget.get = function () {
|
|
1109
|
-
var
|
|
1110
|
-
var
|
|
1111
|
-
|
|
1112
|
-
|
|
1110
|
+
for (var i = this.scopeStack.length - 1; i >= 0; i--) {
|
|
1111
|
+
var ref = this.scopeStack[i];
|
|
1112
|
+
var flags = ref.flags;
|
|
1113
|
+
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT) ||
|
|
1114
|
+
((flags & SCOPE_FUNCTION) && !(flags & SCOPE_ARROW))) { return true }
|
|
1115
|
+
}
|
|
1116
|
+
return false
|
|
1113
1117
|
};
|
|
1114
1118
|
|
|
1115
1119
|
prototypeAccessors.inClassStaticBlock.get = function () {
|
|
@@ -2036,11 +2040,9 @@ pp$8.parseClassField = function(field) {
|
|
|
2036
2040
|
|
|
2037
2041
|
if (this.eat(types$1.eq)) {
|
|
2038
2042
|
// To raise SyntaxError if 'arguments' exists in the initializer.
|
|
2039
|
-
|
|
2040
|
-
var inClassFieldInit = scope.inClassFieldInit;
|
|
2041
|
-
scope.inClassFieldInit = true;
|
|
2043
|
+
this.enterScope(SCOPE_CLASS_FIELD_INIT | SCOPE_SUPER);
|
|
2042
2044
|
field.value = this.parseMaybeAssign();
|
|
2043
|
-
|
|
2045
|
+
this.exitScope();
|
|
2044
2046
|
} else {
|
|
2045
2047
|
field.value = null;
|
|
2046
2048
|
}
|
|
@@ -2182,6 +2184,8 @@ pp$8.parseExport = function(node, exports) {
|
|
|
2182
2184
|
{ this.checkExport(exports, node.declaration.id, node.declaration.id.start); }
|
|
2183
2185
|
node.specifiers = [];
|
|
2184
2186
|
node.source = null;
|
|
2187
|
+
if (this.options.ecmaVersion >= 16)
|
|
2188
|
+
{ node.attributes = []; }
|
|
2185
2189
|
} else { // export { x, y as z } [from '...']
|
|
2186
2190
|
node.declaration = null;
|
|
2187
2191
|
node.specifiers = this.parseExportSpecifiers(exports);
|
|
@@ -2205,6 +2209,8 @@ pp$8.parseExport = function(node, exports) {
|
|
|
2205
2209
|
}
|
|
2206
2210
|
|
|
2207
2211
|
node.source = null;
|
|
2212
|
+
if (this.options.ecmaVersion >= 16)
|
|
2213
|
+
{ node.attributes = []; }
|
|
2208
2214
|
}
|
|
2209
2215
|
this.semicolon();
|
|
2210
2216
|
}
|
|
@@ -3784,9 +3790,10 @@ pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
|
|
|
3784
3790
|
};
|
|
3785
3791
|
|
|
3786
3792
|
pp$5.parseGetterSetter = function(prop) {
|
|
3787
|
-
|
|
3793
|
+
var kind = prop.key.name;
|
|
3788
3794
|
this.parsePropertyName(prop);
|
|
3789
3795
|
prop.value = this.parseMethod(false);
|
|
3796
|
+
prop.kind = kind;
|
|
3790
3797
|
var paramCount = prop.kind === "get" ? 0 : 1;
|
|
3791
3798
|
if (prop.value.params.length !== paramCount) {
|
|
3792
3799
|
var start = prop.value.start;
|
|
@@ -3809,9 +3816,9 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
|
3809
3816
|
prop.kind = "init";
|
|
3810
3817
|
} else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) {
|
|
3811
3818
|
if (isPattern) { this.unexpected(); }
|
|
3812
|
-
prop.kind = "init";
|
|
3813
3819
|
prop.method = true;
|
|
3814
3820
|
prop.value = this.parseMethod(isGenerator, isAsync);
|
|
3821
|
+
prop.kind = "init";
|
|
3815
3822
|
} else if (!isPattern && !containsEsc &&
|
|
3816
3823
|
this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
|
|
3817
3824
|
(prop.key.name === "get" || prop.key.name === "set") &&
|
|
@@ -3823,7 +3830,6 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
|
3823
3830
|
this.checkUnreserved(prop.key);
|
|
3824
3831
|
if (prop.key.name === "await" && !this.awaitIdentPos)
|
|
3825
3832
|
{ this.awaitIdentPos = startPos; }
|
|
3826
|
-
prop.kind = "init";
|
|
3827
3833
|
if (isPattern) {
|
|
3828
3834
|
prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
|
|
3829
3835
|
} else if (this.type === types$1.eq && refDestructuringErrors) {
|
|
@@ -3833,6 +3839,7 @@ pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startP
|
|
|
3833
3839
|
} else {
|
|
3834
3840
|
prop.value = this.copyNode(prop.key);
|
|
3835
3841
|
}
|
|
3842
|
+
prop.kind = "init";
|
|
3836
3843
|
prop.shorthand = true;
|
|
3837
3844
|
} else { this.unexpected(); }
|
|
3838
3845
|
};
|
|
@@ -4008,7 +4015,7 @@ pp$5.checkUnreserved = function(ref) {
|
|
|
4008
4015
|
{ this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); }
|
|
4009
4016
|
if (this.inAsync && name === "await")
|
|
4010
4017
|
{ this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); }
|
|
4011
|
-
if (this.currentThisScope().
|
|
4018
|
+
if (!(this.currentThisScope().flags & SCOPE_VAR) && name === "arguments")
|
|
4012
4019
|
{ this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); }
|
|
4013
4020
|
if (this.inClassStaticBlock && (name === "arguments" || name === "await"))
|
|
4014
4021
|
{ this.raise(start, ("Cannot use " + name + " in class static initialization block")); }
|
|
@@ -4121,6 +4128,9 @@ var pp$4 = Parser.prototype;
|
|
|
4121
4128
|
pp$4.raise = function(pos, message) {
|
|
4122
4129
|
var loc = getLineInfo(this.input, pos);
|
|
4123
4130
|
message += " (" + loc.line + ":" + loc.column + ")";
|
|
4131
|
+
if (this.sourceFile) {
|
|
4132
|
+
message += " in " + this.sourceFile;
|
|
4133
|
+
}
|
|
4124
4134
|
var err = new SyntaxError(message);
|
|
4125
4135
|
err.pos = pos; err.loc = loc; err.raisedAt = this.pos;
|
|
4126
4136
|
throw err
|
|
@@ -4144,8 +4154,6 @@ var Scope = function Scope(flags) {
|
|
|
4144
4154
|
this.lexical = [];
|
|
4145
4155
|
// A list of lexically-declared FunctionDeclaration names in the current lexical scope
|
|
4146
4156
|
this.functions = [];
|
|
4147
|
-
// A switch to disallow the identifier reference 'arguments'
|
|
4148
|
-
this.inClassFieldInit = false;
|
|
4149
4157
|
};
|
|
4150
4158
|
|
|
4151
4159
|
// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.
|
|
@@ -4215,7 +4223,7 @@ pp$3.currentScope = function() {
|
|
|
4215
4223
|
pp$3.currentVarScope = function() {
|
|
4216
4224
|
for (var i = this.scopeStack.length - 1;; i--) {
|
|
4217
4225
|
var scope = this.scopeStack[i];
|
|
4218
|
-
if (scope.flags & SCOPE_VAR) { return scope }
|
|
4226
|
+
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK)) { return scope }
|
|
4219
4227
|
}
|
|
4220
4228
|
};
|
|
4221
4229
|
|
|
@@ -4223,7 +4231,8 @@ pp$3.currentVarScope = function() {
|
|
|
4223
4231
|
pp$3.currentThisScope = function() {
|
|
4224
4232
|
for (var i = this.scopeStack.length - 1;; i--) {
|
|
4225
4233
|
var scope = this.scopeStack[i];
|
|
4226
|
-
if (scope.flags & SCOPE_VAR
|
|
4234
|
+
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK) &&
|
|
4235
|
+
!(scope.flags & SCOPE_ARROW)) { return scope }
|
|
4227
4236
|
}
|
|
4228
4237
|
};
|
|
4229
4238
|
|
|
@@ -6577,7 +6586,7 @@ pp.readWord = function() {
|
|
|
6577
6586
|
// [walk]: util/walk.js
|
|
6578
6587
|
|
|
6579
6588
|
|
|
6580
|
-
var version = "8.14.
|
|
6589
|
+
var version = "8.14.1";
|
|
6581
6590
|
|
|
6582
6591
|
Parser.acorn = {
|
|
6583
6592
|
Parser: Parser,
|
package/dist/client/200.html
CHANGED
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-n6hiodwz.css" crossorigin>
|
|
4
4
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css" crossorigin>
|
|
5
5
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-mhvipxpl.css" crossorigin>
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
7
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-
|
|
8
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/iqvenqyt.js">
|
|
7
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-huf8dypo.js">
|
|
8
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-e7oqigho.js">
|
|
9
9
|
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-jv02kgzv.js">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-fvu08dbs.js">
|
|
11
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-
|
|
12
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-
|
|
13
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-
|
|
11
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-gyp6xcrp.js">
|
|
12
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-uvupzezn.js">
|
|
13
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-b2nry902.js">
|
|
14
14
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-lvdc77tw.css">
|
|
15
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-
|
|
16
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-
|
|
17
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-
|
|
18
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-
|
|
19
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-
|
|
20
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-
|
|
21
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-
|
|
22
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-
|
|
23
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-
|
|
24
|
-
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-
|
|
25
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-
|
|
26
|
-
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-
|
|
27
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-
|
|
28
|
-
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
29
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"
|
|
15
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-fxe24vza.js">
|
|
16
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-pfvee7y8.js">
|
|
17
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-fl7pkx4a.js">
|
|
18
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-44hzetpc.js">
|
|
19
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-h2q9yyre.js">
|
|
20
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-bqg1k5yt.js">
|
|
21
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-fxx19iyw.js">
|
|
22
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-klbd9u2j.js">
|
|
23
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-bag0aauk.js">
|
|
24
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-lr4x8rvs.css">
|
|
25
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-ivdr62t0.js">
|
|
26
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-k7guqst3.css">
|
|
27
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-cilmhs3z.js">
|
|
28
|
+
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/iqvenqyt.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1742966973370,false]</script>
|
|
29
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"972fd647-8b28-4590-b53f-e511b82a966b",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-n6hiodwz.css" crossorigin>
|
|
4
4
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css" crossorigin>
|
|
5
5
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-mhvipxpl.css" crossorigin>
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
7
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-
|
|
8
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/iqvenqyt.js">
|
|
7
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-huf8dypo.js">
|
|
8
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-e7oqigho.js">
|
|
9
9
|
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-jv02kgzv.js">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-fvu08dbs.js">
|
|
11
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-
|
|
12
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-
|
|
13
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-
|
|
11
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-gyp6xcrp.js">
|
|
12
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-uvupzezn.js">
|
|
13
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-b2nry902.js">
|
|
14
14
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-lvdc77tw.css">
|
|
15
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-
|
|
16
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-
|
|
17
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-
|
|
18
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-
|
|
19
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-
|
|
20
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-
|
|
21
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-
|
|
22
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-
|
|
23
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-
|
|
24
|
-
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-
|
|
25
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-
|
|
26
|
-
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-
|
|
27
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-
|
|
28
|
-
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
29
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"
|
|
15
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-fxe24vza.js">
|
|
16
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-pfvee7y8.js">
|
|
17
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-fl7pkx4a.js">
|
|
18
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-44hzetpc.js">
|
|
19
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-h2q9yyre.js">
|
|
20
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-bqg1k5yt.js">
|
|
21
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-fxx19iyw.js">
|
|
22
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-klbd9u2j.js">
|
|
23
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-bag0aauk.js">
|
|
24
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-lr4x8rvs.css">
|
|
25
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-ivdr62t0.js">
|
|
26
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-k7guqst3.css">
|
|
27
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-cilmhs3z.js">
|
|
28
|
+
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/iqvenqyt.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1742966973370,false]</script>
|
|
29
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"972fd647-8b28-4590-b53f-e511b82a966b",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q as e,O as n,a0 as t}from"./vendor/json-editor-vue-huf8dypo.js";const a={"h-screen":"","w-screen":"","bg-black":""},r=e({__name:"__blank",setup(c){return(o,s)=>(t(),n("div",a))}});export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b9 as J,ba as P,_ as R,r as S,E as j,aj as X,bb as h,a6 as ee,a7 as ne,Z as te,a1 as le,i as ie,bc as k,a8 as oe,Q as re,v as ue,q as se,M as ae}from"./iqvenqyt.js";import{_ as de}from"./filepath-item.vue-k4a0mond.js";import{q as L,u as V,k as F,O as u,a0 as i,P as e,Q as g,F as p,ad as U,a2 as d,a7 as v,v as b,a1 as a,a8 as f,a9 as D,aa as I,W as E,R as B}from"./vendor/json-editor-vue-huf8dypo.js";import{_ as me}from"./ncode-block.vue-h2q9yyre.js";import{_ as pe}from"./ncheckbox.vue-c1ajbv0t.js";import{_ as ve}from"./help-fab.vue-i4cbi170.js";import"./vendor/unocss-e7oqigho.js";import"./vendor/shiki-jv02kgzv.js";import"./client-bqg1k5yt.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ce={flex:"~ wrap","w-full":""},ye=["onClick"],be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},xe={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},ge="/__nuxt_devtools__/client",_e=L({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(N){const c=N,w=`${J().app.baseURL.replace(ge,"/")}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),y=V(()=>{const l=[{name:"Overview",id:"overview"}];return c.current.features.bundleClient&&l.push({name:"Client Bundle",id:"bundle-client"}),c.current.features.bundleNitro&&l.push({name:"Nitro Bundle",id:"bundle-nitro"}),c.current.features.viteInspect&&l.push({name:"Vite Inspect",id:"vite-inspect"}),l}),o=F(y.value[0]);function $(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}function m(l){return l<1024?`${l}B`:l<1024*1024?`${(l/1024).toFixed(1)}KB`:l<1024*1024*1024?`${(l/1024/1024).toFixed(1)}MB`:`${(l/1024/1024/1024).toFixed(1)}GB`}async function T(l){return S.clearAnalyzeBuilds(await j(),[l])}return(l,n)=>{const A=de,C=R;return i(),u("div",fe,[e("div",ce,[(i(!0),u(p,null,U(y.value,(r,t)=>(i(),u("button",{key:t,px4:"",py2:"",border:"r base",hover:"bg-active",class:E(r.id===o.value?.id?"":"border-b"),onClick:z=>o.value=r},[e("div",{class:E(r.id===o.value?.id?"":"op30")},v(r.name),3)],10,ye))),128)),n[1]||(n[1]=e("div",{border:"b base","flex-auto":""},null,-1))]),o.value?.id==="overview"?(i(),u("div",be,[n[15]||(n[15]=e("div",{"flex-auto":""},null,-1)),e("div",xe,[n[10]||(n[10]=e("div",{"i-carbon-commit":"","text-xl":""},null,-1)),e("div",null,[n[2]||(n[2]=e("div",{"text-sm":"",op50:""}," Name ",-1)),e("div",null,v(l.current.name),1)]),n[11]||(n[11]=e("div",{"i-carbon-time":"","text-xl":""},null,-1)),e("div",null,[n[3]||(n[3]=e("div",{"text-sm":"",op50:""}," Build duration ",-1)),e("div",null,v($(l.current)),1)]),l.current.size?.clientBundle?(i(),u(p,{key:0},[n[5]||(n[5]=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1)),e("div",null,[n[4]||(n[4]=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1)),e("div",null,v(m(l.current.size.clientBundle)),1)])],64)):g("",!0),l.current.size?.nitroBundle?(i(),u(p,{key:1},[n[7]||(n[7]=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1)),e("div",null,[n[6]||(n[6]=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1)),e("div",null,v(m(l.current.size.nitroBundle)),1)])],64)):g("",!0),n[12]||(n[12]=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1)),e("div",null,[n[8]||(n[8]=e("div",{"text-sm":"",op50:""}," Built ",-1)),e("div",null,v(b(P)(new Date(l.current.endTime))),1)]),n[13]||(n[13]=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1)),e("div",null,[n[9]||(n[9]=e("div",{"text-sm":"",op50:""}," Report Path ",-1)),d(A,{filepath:l.current.analyzeDir},null,8,["filepath"])])]),n[16]||(n[16]=e("div",{"flex-auto":""},null,-1)),d(C,{n:"rose",icon:"carbon-delete",onClick:n[0]||(n[0]=r=>T(l.current.name))},{default:a(()=>n[14]||(n[14]=[f(" Delete this report ")])),_:1})])):g("",!0),n._lazyshow1||o.value?.id==="bundle-client"?(n._lazyshow1=!0,i(),u(p,null,[D(e("iframe",{src:`${b(w)}${l.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="bundle-client"]])],64)):g("v-show-if",!0),n._lazyshow2||o.value?.id==="bundle-nitro"?(n._lazyshow2=!0,i(),u(p,null,[D(e("iframe",{src:`${b(w)}${l.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="bundle-nitro"]])],64)):g("v-show-if",!0),n._lazyshow3||o.value?.id==="vite-inspect"?(n._lazyshow3=!0,i(),u(p,null,[D(e("iframe",{src:`${b(w)}${l.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value?.id==="vite-inspect"]])],64)):g("v-show-if",!0)])}}}),we={class:"markdown-body"},$e={__name:"analyze-build",setup(N,{expose:c}){return c({frontmatter:{}}),(w,y)=>(i(),u("div",we,y[0]||(y[0]=[e("h1",null,"Build Analyze",-1),e("p",null,[f("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1)])))}},ze={flex:"~ col"},Be=["onClick"],Ce={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},ke={flex:"~ items-center justify-center wrap",p4:""},Ne={flex:"~ col gap-1","w-250":"",p4:""},Te={flex:"~ gap-3",mt2:"","justify-end":""},je=L({__name:"analyze-build",setup(N){const c=X(),_=h(),w=ee(),y=ne("analyze-build:slug",""),o=V(()=>_.value?.builds.find(r=>r.slug===y.value)??_.value?.builds[0]),$=F(!1),m=F(""),T=V(()=>_.value?.builds.some(r=>r.name===m.value.trim()));async function l(){m.value=await S.generateAnalyzeBuildName(),await c.start()&&(ae("analyze-build:start"),k.value={name:m.value,processId:await S.startAnalyzeBuild(await j(),m.value)},$.value&&C())}const n=te();function A(r){return`${((r.endTime-r.startTime)/1e3).toFixed(1)}s`}function C(){k.value?.processId&&(n.value=k.value.processId,w.push("/modules/terminals"))}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:l}]),(r,t)=>{const z=R,G=_e,O=ie,q=oe,M=ue,Q=se,W=me,Z=pe,H=re,K=$e,Y=ve;return i(),u(p,null,[d(q,{"left-size":30},{left:a(()=>[e("div",ze,[(i(!0),u(p,null,U(b(_)?.builds,s=>(i(),u(p,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:E(s.slug===o.value?.slug?"text-primary bg-active":""),onClick:x=>y.value=s.slug},[e("code",null,v(s.name),1),e("div",Ce,[t[4]||(t[4]=e("div",{"i-carbon-time":""},null,-1)),e("span",null,v(A(s)),1),t[5]||(t[5]=e("div",{"flex-auto":""},null,-1)),e("span",null,v(b(P)(new Date(s.endTime))),1)])],10,Be),t[6]||(t[6]=e("div",{"x-divider":""},null,-1))],64))),128)),e("div",ke,[b(k)?(i(),B(z,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:t[1]||(t[1]=s=>C())},{default:a(()=>t[8]||(t[8]=[f(" Building... ")])),_:1})):(i(),B(z,{key:0,n:"primary",icon:"carbon-edge-node",onClick:t[0]||(t[0]=s=>l())},{default:a(()=>t[7]||(t[7]=[f(" Start a new build ")])),_:1}))])])]),right:a(()=>[o.value?(i(),B(G,{key:0,current:o.value},null,8,["current"])):(i(),B(O,{key:1}))]),_:1}),d(b(c),null,{default:a(({resolve:s})=>[d(H,{"model-value":!0,onClose:x=>s(!1)},{default:a(()=>[e("div",Ne,[t[13]||(t[13]=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1)),t[14]||(t[14]=e("p",{op50:""}," Enter the name of the build: ",-1)),d(M,{modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=x=>m.value=x),placeholder:"Build name"},null,8,["modelValue"]),T.value?(i(),B(Q,{key:0,"n-orange":""},{default:a(()=>t[9]||(t[9]=[f(" A build with the same name already exists, continue would overrides the previous build result. ")])),_:1})):g("",!0),t[15]||(t[15]=e("div",{my3:"","x-divider":""},null,-1)),t[16]||(t[16]=e("p",{op50:""}," The following command will be executed in your terminal: ",-1)),d(W,{code:`npx nuxi analyze --no-serve --name=${m.value}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),d(Z,{modelValue:$.value,"onUpdate:modelValue":t[3]||(t[3]=x=>$.value=x),mt2:"",n:"primary"},{default:a(()=>t[10]||(t[10]=[f(" Navigate to terminal ")])),_:1},8,["modelValue"]),e("div",Te,[d(z,{onClick:x=>s(!1)},{default:a(()=>t[11]||(t[11]=[f(" Cancel ")])),_:2},1032,["onClick"]),d(z,{n:"solid primary",onClick:x=>s(!0)},{default:a(()=>t[12]||(t[12]=[f(" Start ")])),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),d(Y,null,{default:a(()=>[d(K)]),_:1})],64)}}});export{je as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{G as ee,H,_ as te,I as ne,J as R,K as ce,L as pe,M as me,r as W,E as Z,v as se,N as ve,O as fe,c as le,A as ge,a as he,w as xe,P as be,Q as we,R as _e,S as ye,T as $e,g as ke,U as Ce}from"./iqvenqyt.js";import{_ as Ve}from"./ncheckbox.vue-c1ajbv0t.js";import{_ as Pe}from"./ndropdown.vue-44hzetpc.js";import{_ as Ae}from"./nnavbar.vue-bwg2euf2.js";import{q as Q,k as T,af as oe,O as i,a0 as o,W as J,v as m,a9 as K,a2 as d,P as t,a8 as D,F as z,ad as G,R as V,Q as S,a1 as h,u as U,U as ae,a7 as N,S as De,j as Ne,aq as Fe,V as Se}from"./vendor/json-editor-vue-huf8dypo.js";import{_ as Ue}from"./nsection-block-gfrcu8rt.js";import{_ as Ie}from"./filepath-item.vue-k4a0mond.js";import{_ as Te}from"./code-snippets.vue-kphwmbok.js";import{_ as je}from"./ndrawer.vue-fxx19iyw.js";import{D as Ee}from"./constants-b32h69zq.js";import"./vendor/unocss-e7oqigho.js";import"./vendor/shiki-jv02kgzv.js";import"./nicon-title.vue-oyhtd7jm.js";import"./ncode-block.vue-h2q9yyre.js";import"./client-bqg1k5yt.js";const Be={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Le={for:"drop-zone-input","text-3xl":"",hover:"text-green cursor-pointer","transition-all":""},ze={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Oe={grid:"~ cols-minmax-8rem gap-8","overflow-auto":"",p6:""},Re={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],Ke={flex:"~ gap1","items-center":""},qe={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ge=Q({__name:"AssetDropZone",props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(L){const l=L,f=ee(l,"modelValue"),C=T(),n=T([]);function v(s){C.value=s.target,f.value=!0}function b(s){s.target===C.value&&(f.value=!1)}function j(s){s.preventDefault()}function P(s){s.preventDefault(),x(s.dataTransfer.files)}function x(s){const c=Array.from(s||[]);if(c.length){const g=[],_=n.value.map(u=>u.name);for(const u of c)if(_.includes(u.name)){let A=1;const[y,B]=u.name.split(".");for(;_.includes(`${y} (${A}).${B}`);)A++;const M=`${y}-${A}.${B}`,a=new Blob([u],{type:u.type}),e=new File([a],M,{lastModified:Date.now()});g.push(e),_.push(M)}else u.type===""&&R({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}),g.push(u);n.value=[...n.value,...g]}}async function E(){if(ce.value||pe.value)return;me("assets:upload");const s=[];for(const c of n.value){const g=new FileReader;g.readAsDataURL(c);const u=(await new Promise(A=>{g.onload=()=>A(g.result)})).split(";base64,").pop();s.push({path:c.name,encoding:"base64",content:u})}await W.writeStaticAssets(await Z(),[...s],l.folder).then(()=>{p(),R({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(c=>{p(),R({message:`Error uploading files: ${c?.message??"unknown"}`,icon:"i-carbon-warning",classes:"text-red"})}),f.value=!1}function q(s){n.value?.splice(s,1)}function O(s){return URL.createObjectURL(s)}function w(s,c){const[g,_]=s.name.split("."),u=c.replace(/\.\w+$/,""),A=`${u}.${_}`;return u.length===0?(alert("File name must be at least 1 characters long"),g):(Object.defineProperty(s,"name",{value:A,writable:!1}),n.value.splice(n.value.indexOf(s),1,s),s)}function r(){n.value=[]}function p(){f.value=!1,r()}return H("dragenter",v),H("dragleave",b),H("dragover",j),H("drop",P),(s,c)=>{const g=te,_=ne,u=se,A=oe("tooltip");return o(),i("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:J(m(f)?"opacity-100 visible":"opacity-0 invisible")},[K(d(g,{icon:"carbon-close",title:"Close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:p},null,512),[[A,"Close",void 0,{"bottom-end":!0}]]),n.value?.length?(o(),i("div",ze,[c[4]||(c[4]=t("div",{px6:"",py6:""},[t("h1",{"text-2xl":""}," Upload "),t("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1)),t("div",Oe,[(o(!0),i(z,null,G(n.value,(y,B)=>(o(),i("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[t("div",Re,[t("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:O(y)},null,8,Me)]),t("div",Ke,[d(u,{n:"xs","h-full":"","flex-auto":"","model-value":y.name,"onUpdate:modelValue":M=>w(y,M.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(g,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:M=>q(B)},null,8,["onClick"])])]))),128))]),t("div",qe,[n.value.length?(o(),V(g,{key:0,n:"red",onClick:r},{default:h(()=>[d(_,{icon:"carbon-clean"}),c[2]||(c[2]=D(" Clear "))]),_:1})):S("",!0),d(g,{disabled:!n.value.length,n:"primary solid",onClick:E},{default:h(()=>[d(_,{icon:"carbon-cloud-upload"}),c[3]||(c[3]=D(" Upload "))]),_:1},8,["disabled"])])])):(o(),i("div",Be,[t("label",Le,[d(_,{icon:"carbon-cloud-upload","mr-2":""}),c[1]||(c[1]=D(" Drop files here or click to select "))]),t("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:c[0]||(c[0]=y=>x(y.target.files))},null,32)]))],2)}}}),Qe=Q({__name:"AssetFontPreview",props:{asset:{}},setup(L){const l=L,f=U(()=>`devtools-assets-${ve(l.asset)}`);return fe(U(()=>`
|
|
2
2
|
@font-face {
|
|
3
3
|
font-family: '${f.value}';
|
|
4
4
|
src: url('${l.asset.publicPath}');
|
|
5
5
|
}
|
|
6
|
-
`)),(C,n)=>(o(),i("div",{"of-hidden":"",style:ae({fontFamily:`'${f.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))}}),We={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ze=["src"],He={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Je={key:3,"w-full":"","self-start":"",p4:""},Xe=["textContent"],Ye={key:4},et=["src","autoplay","controls"],tt={key:5},nt={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},ot=["src"],lt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ie=Q({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(
|
|
6
|
+
`)),(C,n)=>(o(),i("div",{"of-hidden":"",style:ae({fontFamily:`'${f.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))}}),We={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ze=["src"],He={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Je={key:3,"w-full":"","self-start":"",p4:""},Xe=["textContent"],Ye={key:4},et=["src","autoplay","controls"],tt={key:5},nt={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},ot=["src"],lt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ie=Q({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(L){return(l,f)=>{const C=Qe;return o(),i("div",We,[l.asset.type==="image"?(o(),i("img",{key:0,src:l.asset.publicPath},null,8,Ze)):l.asset.type==="font"?(o(),V(C,{key:l.asset.publicPath,asset:l.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):l.asset.type==="text"&&!l.textContent?(o(),i("div",He)):l.asset.type==="text"&&l.textContent?(o(),i("div",Je,[t("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:N(l.textContent)},null,8,Xe)])):l.asset.type==="video"?(o(),i("div",Ye,[t("video",{src:l.asset.publicPath,autoplay:l.detail,controls:l.detail},null,8,et)])):l.asset.type==="audio"?(o(),i("div",tt,[l.detail?(o(),i("audio",{key:1,src:l.asset.publicPath,controls:""},null,8,ot)):(o(),i("div",nt))])):(o(),i("div",lt))])}}}),st={relative:"",flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},at={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},it=Q({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(L){const l=L,f=U(()=>l.folder&&l.asset.path.startsWith(l.folder)?l.asset.path.slice(l.folder.length):l.asset.path);return(C,n)=>{const v=ne,b=ie;return o(),i("button",st,[C.asset.layer?(o(),V(v,{key:0,icon:"i-carbon-layers",absolute:"","right-4":"","top-4":"","bg-primary":""})):S("",!0),d(b,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:C.asset},null,8,["asset"]),t("div",at,N(f.value),1)])}}}),re=Q({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(L,{emit:l}){const f=L,n=ee(f,"modelValue",l,{passive:!0}),v=U(()=>f.item?.children?.length),b=T(!0),j=U(()=>v.value?"i-carbon-folder":f.item.type==="image"?"i-carbon-image":f.item.type==="video"?"i-carbon-video":f.item.type==="audio"?"i-carbon-volume-up":f.item.type==="font"?"i-carbon-text-small-caps":f.item.type==="text"?"i-carbon-document":f.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(P,x)=>{const E=ne,q=re;return o(),i("div",null,[t("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:ae({paddingLeft:`calc(1rem + ${P.index*1.5}em)`}),class:J({"bg-active":!v.value&&m(n)?.filePath===P.item?.filePath}),border:"b base",onClick:x[0]||(x[0]=O=>v.value?b.value=!b.value:n.value=P.item)},[t("div",{class:J(j.value)},null,2),t("span",{class:J({"flex items-center":v.value}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},[D(N(P.item.path)+" ",1),P.item.layer?(o(),V(E,{key:0,icon:"i-carbon-layers","bg-primary":""})):S("",!0)],2),v.value?(o(),V(E,{key:0,icon:"carbon:chevron-right","transform-rotate":b.value?90:0,transition:""},null,8,["transform-rotate"])):S("",!0)],6),b.value?De(P.$slots,"default",{key:0},()=>[(o(!0),i(z,null,G(P.item?.children,O=>(o(),V(q,{key:O.filepath,modelValue:m(n),"onUpdate:modelValue":x[1]||(x[1]=w=>Ne(n)?n.value=w:null),item:O,index:P.index+1},null,8,["modelValue","item","index"]))),128))]):S("",!0)])}}}),rt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},ut={flex:"~","items-center":"","justify-center":""},dt={"max-w-full":"","w-full":"","table-fixed":""},ct={flex:"~ gap-1","w-full":"","items-center":""},pt={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},mt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},vt={capitalize:""},ft={key:0},gt={op70:""},ht={flex:"~ gap2 wrap"},xt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},bt={flex:"~ gap2 wrap justify-center"},wt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},_t={flex:"~ gap2 wrap justify-center"},yt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},$t={flex:"","justify-end":"","gap-4":""},kt=Q({__name:"AssetDetails",props:{modelValue:{}},setup(L,{emit:l}){const n=ee(L,"modelValue",l,{passive:!0}),v=le(async()=>{if(n.value.type==="image")return W.getImageMeta(await Z(),n.value.filePath)}),b=T(!1),j=T(),P=T(0),x=le(async()=>{if(n.value.type!=="text")return;P.value;const a=await W.getTextAssetContent(await Z(),n.value.filePath);return j.value=a,a});async function E(){if(x.value!==j.value)try{await W.writeStaticAssets(await Z(),[{path:n.value.path,content:j.value,override:!0}],""),b.value=!1,P.value++,R({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch(a){console.error(a),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const q=ge(),O=U(()=>(q.value?._installedModules||[]).some(e=>e.meta?.name==="@nuxt/image"||e.meta?.name==="@nuxt/image-edge"||e.meta?.name==="@nuxt/image-nightly")),w=U(()=>{const a=[];if(n.value.type==="image"){const e=v.value?.width?`
|
|
7
7
|
width="${v.value.width}"
|
|
8
8
|
height="${v.value.height}" `:" ";return a.push({lang:"vue-html",code:`<img${e}
|
|
9
9
|
src="${n.value.publicPath}"
|
|
@@ -13,4 +13,4 @@ import{C as ee,D as H,_ as te,E as ne,F as R,G as ce,H as pe,B as me,r as W,m as
|
|
|
13
13
|
src="${n.value.publicPath}"
|
|
14
14
|
/>`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),a}return a.push({lang:"html",code:`<a download href="${n.value.publicPath}">
|
|
15
15
|
Download ${n.value.path.split("/").slice(-1)[0]}
|
|
16
|
-
</a>`,name:"Download link"}),a}),r=he(),p=xe(),s=be(()=>n.value.mtime),c=U(()=>{const a=n.value.size;return a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(2)} KB`:`${(a/1024/1024).toFixed(2)} MB`}),g=U(()=>{if(!v.value?.width||!v.value?.height)return"";const a=($,I)=>I?a(I,$%I):$,e=a(v.value.width,v.value.height);return e>3?`${v.value.width/e}:${v.value.height/e}`:""}),_=U(()=>["image","text","video","audio","font"].includes(n.value.type)),u=j(!1);async function D(){try{await W.deleteStaticAsset(await Z(),n.value.filePath),n.value=void 0,u.value=!1,R({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch(a){console.error(a),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const y=j(!1),E=j("");async function M(){const a=n.value.filePath.split("/"),e=a.slice(-1)[0].split(".").slice(0,-1).join(".");if(!E.value||E.value===e)return R({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const $=a.slice(-1)[0].split(".").slice(-1)[0],I=`${a.slice(0,-1).join("/")}/${E.value}.${$}`;await W.renameStaticAsset(await Z(),n.value.filePath,I),n.value=void 0,y.value=!1,R({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch($){console.error($),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(a,e)=>{const $=ie,I=Ie,N=te,ue=je,X=we,de=se,Y=oe("tooltip");return o(),i(L,null,[t("div",rt,[_.value?(o(),i(L,{key:0},[e[13]||(e[13]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Preview "),t("div",{"x-divider":""})],-1)),t("div",ut,[d($,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:m(n),"text-content":m(x)},null,8,["asset","text-content"])])],64)):S("",!0),e[25]||(e[25]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Details "),t("div",{"x-divider":""})],-1)),t("table",dt,[t("tbody",null,[t("tr",null,[e[14]||(e[14]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1)),t("td",null,[t("div",ct,[d(I,{filepath:m(n).filePath,"text-left":""},null,8,["filepath"]),K(d(N,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",border:!1,onClick:e[0]||(e[0]=k=>m(p)(m(n).filePath))},null,512),[[Y,"Open in Editor"]])])])]),t("tr",null,[e[15]||(e[15]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1)),t("td",null,[t("div",pt,[t("div",mt,F(m(n).publicPath),1),K(d(N,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",border:!1,onClick:e[1]||(e[1]=k=>m(r)(m(n).publicPath,"assets-public-path"))},null,512),[[Y,"Copy public path"]]),K(d(N,{"flex-none":"",to:m(n).publicPath,icon:"carbon-launch",target:"_blank",border:!1,title:"Open in browser"},null,8,["to"]),[[Y,"Open in browser"]])])])]),t("tr",null,[e[16]||(e[16]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1)),t("td",vt,F(m(n).type),1)]),m(v)?.width?(o(),i(L,{key:0},[t("tr",null,[e[17]||(e[17]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1)),t("td",null,F(m(v).width)+" x "+F(m(v).height),1)]),g.value?(o(),i("tr",ft,[e[18]||(e[18]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1)),t("td",null,F(g.value),1)])):S("",!0)],64)):S("",!0),t("tr",null,[e[19]||(e[19]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1)),t("td",null,F(c.value),1)]),t("tr",null,[e[20]||(e[20]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1)),t("td",null,[A(F(new Date(m(n).mtime).toLocaleString())+" ",1),t("span",gt,"("+F(m(s))+")",1)])])])]),e[26]||(e[26]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Actions "),t("div",{"x-divider":""})],-1)),t("div",ht,[d(N,{to:m(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:h(()=>e[21]||(e[21]=[A(" Download ")])),_:1},8,["to"]),m(n).type==="text"?(o(),V(N,{key:0,icon:"carbon-edit",n:"cyan",onClick:e[2]||(e[2]=k=>b.value=!b.value)},{default:h(()=>e[22]||(e[22]=[A(" Edit ")])),_:1})):S("",!0),d(N,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:e[3]||(e[3]=k=>y.value=!y.value)},{default:h(()=>e[23]||(e[23]=[A(" Rename ")])),_:1}),d(N,{icon:"carbon-delete",n:"red",onClick:e[4]||(e[4]=k=>u.value=!u.value)},{default:h(()=>e[24]||(e[24]=[A(" Delete ")])),_:1})]),e[27]||(e[27]=t("div",{"flex-auto":""},null,-1)),w.value.length?(o(),V(ue,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":w.value},null,8,["code-snippets"])):S("",!0)]),d(X,{modelValue:u.value,"onUpdate:modelValue":e[6]||(e[6]=k=>u.value=k)},{default:h(()=>[t("div",xt,[e[30]||(e[30]=t("span",null," Are you sure you want to delete this asset? ",-1)),t("div",bt,[d(N,{icon:"carbon-close",onClick:e[5]||(e[5]=k=>u.value=!1)},{default:h(()=>e[28]||(e[28]=[A(" Cancel ")])),_:1}),d(N,{icon:"carbon-delete",n:"red",onClick:D},{default:h(()=>e[29]||(e[29]=[A(" Delete ")])),_:1})])])]),_:1},8,["modelValue"]),d(X,{modelValue:y.value,"onUpdate:modelValue":e[9]||(e[9]=k=>y.value=k)},{default:h(()=>[t("div",wt,[d(de,{modelValue:E.value,"onUpdate:modelValue":e[7]||(e[7]=k=>E.value=k),placeholder:"New name",n:"blue"},null,8,["modelValue"]),t("div",_t,[d(N,{icon:"carbon-close",onClick:e[8]||(e[8]=k=>y.value=!1)},{default:h(()=>e[31]||(e[31]=[A(" Cancel ")])),_:1}),d(N,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:M},{default:h(()=>e[32]||(e[32]=[A(" Rename ")])),_:1})])])]),_:1},8,["modelValue"]),m(n).type==="text"?(o(),V(X,{key:0,modelValue:b.value,"onUpdate:modelValue":e[12]||(e[12]=k=>b.value=k)},{default:h(()=>[t("div",yt,[K(t("textarea",{"onUpdate:modelValue":e[10]||(e[10]=k=>T.value=k),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:Se(B,["enter"])},null,544),[[Ne,T.value]]),t("div",$t,[d(N,{icon:"carbon-close",onClick:e[11]||(e[11]=k=>b.value=!1)},{default:h(()=>e[33]||(e[33]=[A(" Cancel ")])),_:1}),d(N,{icon:"carbon:save",n:"primary",onClick:B},{default:h(()=>e[34]||(e[34]=[A(" save ")])),_:1})])])]),_:1},8,["modelValue"])):S("",!0)],64)}}}),Ct={"h-full":"","of-auto":""},Vt={"flex-none":"",flex:"~ gap2 items-center","text-lg":""},Pt={flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--1":"","h-4":"","w-4":"","rounded-full":"","bg-primary:30":"","text-8px":""},Dt={flex:"~ col","w-30":"","of-auto":""},At={"text-xs":"",op75:""},Ft={op50:""},Nt={key:0},St={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Ut={key:1,p2:"",grid:"~ cols-minmax-8rem"},It={key:1},Ht=Q({__name:"assets",setup(z){const l=_e(),f=j(!1),C=j(""),n=U(()=>new ye(l.value||[],{keys:["path"]})),v=$e(()=>{const w=[];for(const r of l.value||[]){const p=r.path.split(".").pop();p&&!w.find(s=>s.name===p)&&w.push({name:p,value:!0})}return w}),b=U(()=>(C.value?n.value.search(C.value).map(r=>r.item):l.value||[]).filter(r=>{const p=r.path.split(".").pop();return!p||v.some(s=>s.name===p&&s.value)})),T=U(()=>{const w={};for(const r of b.value){const p=`${r.path.split("/").slice(0,-1).join("/")}/`;w[p]||(w[p]=[]),w[p].push(r)}return Object.entries(w).sort(([r],[p])=>r.localeCompare(p))}),P=U(()=>{const w={children:[]},r=(p,s,c)=>{const[g,..._]=s;let u=p.children.find(D=>D.path===g);u||(u={...c,path:g,children:[]},p.children.push(u)),_.length>1?r(u,_,c):_.length===1&&u.children.push({...c,path:_[0]})};return b.value.forEach(p=>{const s=p.path.split("/").filter(c=>c!=="");r(w,s,p)}),w.children}),x=j(),{view:B}=ke("assets");function q(){B.value=B.value==="list"?"grid":"list"}Ce("Escape",()=>{x.value=void 0});const O=j();return(w,r)=>{const p=te,s=Ve,c=Pe,g=De,_=Ge,u=it,D=Ue,y=re,E=kt,M=Te,a=oe("tooltip");return o(),i("div",Ct,[d(g,{ref_key:"navbar",ref:O,search:C.value,"onUpdate:search":r[1]||(r[1]=e=>C.value=e),pb2:""},{actions:h(()=>[t("div",Vt,[K(d(p,{icon:"carbon:cloud-upload",title:"File Upload",border:!1,onClick:r[0]||(r[0]=e=>f.value=!f.value)},null,512),[[a,"File Upload",void 0,{"bottom-end":!0}]]),m(v).length?(o(),V(c,{key:0,direction:"end",n:"sm primary"},{trigger:h(({click:e})=>[K(d(p,{icon:"carbon-filter",border:!1,title:"Filter",p3:"","text-lg":"",onClick:$=>e()},null,8,["onClick"]),[[a,"Filter",void 0,{"bottom-end":!0}]]),t("span",Pt,F(m(v).length),1)]),default:h(()=>[t("div",Dt,[(o(!0),i(L,null,G(m(v),e=>(o(),V(s,{key:e.name,modelValue:e.value,"onUpdate:modelValue":$=>e.value=$,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:h(()=>[t("span",At,F(e.name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):S("",!0),K(d(p,{"text-lg":"",border:!1,icon:m(B)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:q},null,8,["icon"]),[[a,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:h(()=>[t("div",Ft,[C.value?(o(),i("span",Nt,F(b.value.length)+" matched · ",1)):S("",!0),t("span",null,F(m(l)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(_,{modelValue:f.value,"onUpdate:modelValue":r[2]||(r[2]=e=>f.value=e),folder:"/"},null,8,["modelValue"]),m(B)==="grid"?(o(),i(L,{key:0},[T.value.length>1?(o(!0),i(L,{key:0},G(T.value,([e,$])=>(o(),V(D,{key:e,text:e,description:`${$.length} items`,open:$.length<=m(Be),padding:!1},{default:h(()=>[t("div",St,[(o(!0),i(L,null,G($,I=>(o(),V(u,{key:I.path,asset:I,folder:e,onClick:N=>x.value=I},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(o(),i("div",Ut,[(o(!0),i(L,null,G(b.value,e=>(o(),V(u,{key:e.path,asset:e,onClick:$=>x.value=e},null,8,["asset","onClick"]))),128))]))],64)):(o(),i("div",It,[(o(!0),i(L,null,G(P.value,(e,$)=>(o(),V(y,{key:$,modelValue:x.value,"onUpdate:modelValue":r[3]||(r[3]=I=>x.value=I),item:e},null,8,["modelValue","item"]))),128))])),d(M,{"model-value":!!x.value,"auto-close":"","w-120":"",top:O.value,onClose:r[5]||(r[5]=e=>x.value=void 0)},{default:h(()=>[x.value?(o(),V(E,{key:0,modelValue:x.value,"onUpdate:modelValue":r[4]||(r[4]=e=>x.value=e)},null,8,["modelValue"])):S("",!0)]),_:1},8,["model-value","top"])])}}});export{Ht as default};
|
|
16
|
+
</a>`,name:"Download link"}),a}),r=he(),p=xe(),s=be(()=>n.value.mtime),c=U(()=>{const a=n.value.size;return a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(2)} KB`:`${(a/1024/1024).toFixed(2)} MB`}),g=U(()=>{if(!v.value?.width||!v.value?.height)return"";const a=($,I)=>I?a(I,$%I):$,e=a(v.value.width,v.value.height);return e>3?`${v.value.width/e}:${v.value.height/e}`:""}),_=U(()=>["image","text","video","audio","font"].includes(n.value.type)),u=T(!1);async function A(){try{await W.deleteStaticAsset(await Z(),n.value.filePath),n.value=void 0,u.value=!1,R({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch(a){console.error(a),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const y=T(!1),B=T("");async function M(){const a=n.value.filePath.split("/"),e=a.slice(-1)[0].split(".").slice(0,-1).join(".");if(!B.value||B.value===e)return R({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const $=a.slice(-1)[0].split(".").slice(-1)[0],I=`${a.slice(0,-1).join("/")}/${B.value}.${$}`;await W.renameStaticAsset(await Z(),n.value.filePath,I),n.value=void 0,y.value=!1,R({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch($){console.error($),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(a,e)=>{const $=ie,I=Ie,F=te,ue=Te,X=we,de=se,Y=oe("tooltip");return o(),i(z,null,[t("div",rt,[_.value?(o(),i(z,{key:0},[e[13]||(e[13]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Preview "),t("div",{"x-divider":""})],-1)),t("div",ut,[d($,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:m(n),"text-content":m(x)},null,8,["asset","text-content"])])],64)):S("",!0),e[25]||(e[25]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Details "),t("div",{"x-divider":""})],-1)),t("table",dt,[t("tbody",null,[t("tr",null,[e[14]||(e[14]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1)),t("td",null,[t("div",ct,[d(I,{filepath:m(n).filePath,"text-left":""},null,8,["filepath"]),K(d(F,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",border:!1,onClick:e[0]||(e[0]=k=>m(p)(m(n).filePath))},null,512),[[Y,"Open in Editor"]])])])]),t("tr",null,[e[15]||(e[15]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1)),t("td",null,[t("div",pt,[t("div",mt,N(m(n).publicPath),1),K(d(F,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",border:!1,onClick:e[1]||(e[1]=k=>m(r)(m(n).publicPath,"assets-public-path"))},null,512),[[Y,"Copy public path"]]),K(d(F,{"flex-none":"",to:m(n).publicPath,icon:"carbon-launch",target:"_blank",border:!1,title:"Open in browser"},null,8,["to"]),[[Y,"Open in browser"]])])])]),t("tr",null,[e[16]||(e[16]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1)),t("td",vt,N(m(n).type),1)]),m(v)?.width?(o(),i(z,{key:0},[t("tr",null,[e[17]||(e[17]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1)),t("td",null,N(m(v).width)+" x "+N(m(v).height),1)]),g.value?(o(),i("tr",ft,[e[18]||(e[18]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1)),t("td",null,N(g.value),1)])):S("",!0)],64)):S("",!0),t("tr",null,[e[19]||(e[19]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1)),t("td",null,N(c.value),1)]),t("tr",null,[e[20]||(e[20]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1)),t("td",null,[D(N(new Date(m(n).mtime).toLocaleString())+" ",1),t("span",gt,"("+N(m(s))+")",1)])])])]),e[26]||(e[26]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Actions "),t("div",{"x-divider":""})],-1)),t("div",ht,[d(F,{to:m(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:h(()=>e[21]||(e[21]=[D(" Download ")])),_:1},8,["to"]),m(n).type==="text"?(o(),V(F,{key:0,icon:"carbon-edit",n:"cyan",onClick:e[2]||(e[2]=k=>b.value=!b.value)},{default:h(()=>e[22]||(e[22]=[D(" Edit ")])),_:1})):S("",!0),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:e[3]||(e[3]=k=>y.value=!y.value)},{default:h(()=>e[23]||(e[23]=[D(" Rename ")])),_:1}),d(F,{icon:"carbon-delete",n:"red",onClick:e[4]||(e[4]=k=>u.value=!u.value)},{default:h(()=>e[24]||(e[24]=[D(" Delete ")])),_:1})]),e[27]||(e[27]=t("div",{"flex-auto":""},null,-1)),w.value.length?(o(),V(ue,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":w.value},null,8,["code-snippets"])):S("",!0)]),d(X,{modelValue:u.value,"onUpdate:modelValue":e[6]||(e[6]=k=>u.value=k)},{default:h(()=>[t("div",xt,[e[30]||(e[30]=t("span",null," Are you sure you want to delete this asset? ",-1)),t("div",bt,[d(F,{icon:"carbon-close",onClick:e[5]||(e[5]=k=>u.value=!1)},{default:h(()=>e[28]||(e[28]=[D(" Cancel ")])),_:1}),d(F,{icon:"carbon-delete",n:"red",onClick:A},{default:h(()=>e[29]||(e[29]=[D(" Delete ")])),_:1})])])]),_:1},8,["modelValue"]),d(X,{modelValue:y.value,"onUpdate:modelValue":e[9]||(e[9]=k=>y.value=k)},{default:h(()=>[t("div",wt,[d(de,{modelValue:B.value,"onUpdate:modelValue":e[7]||(e[7]=k=>B.value=k),placeholder:"New name",n:"blue"},null,8,["modelValue"]),t("div",_t,[d(F,{icon:"carbon-close",onClick:e[8]||(e[8]=k=>y.value=!1)},{default:h(()=>e[31]||(e[31]=[D(" Cancel ")])),_:1}),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:M},{default:h(()=>e[32]||(e[32]=[D(" Rename ")])),_:1})])])]),_:1},8,["modelValue"]),m(n).type==="text"?(o(),V(X,{key:0,modelValue:b.value,"onUpdate:modelValue":e[12]||(e[12]=k=>b.value=k)},{default:h(()=>[t("div",yt,[K(t("textarea",{"onUpdate:modelValue":e[10]||(e[10]=k=>j.value=k),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:Se(E,["enter"])},null,544),[[Fe,j.value]]),t("div",$t,[d(F,{icon:"carbon-close",onClick:e[11]||(e[11]=k=>b.value=!1)},{default:h(()=>e[33]||(e[33]=[D(" Cancel ")])),_:1}),d(F,{icon:"carbon:save",n:"primary",onClick:E},{default:h(()=>e[34]||(e[34]=[D(" save ")])),_:1})])])]),_:1},8,["modelValue"])):S("",!0)],64)}}}),Ct={"h-full":"","of-auto":""},Vt={"flex-none":"",flex:"~ gap2 items-center","text-lg":""},Pt={flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--1":"","h-4":"","w-4":"","rounded-full":"","bg-primary:30":"","text-8px":""},At={flex:"~ col","w-30":"","of-auto":""},Dt={"text-xs":"",op75:""},Nt={op50:""},Ft={key:0},St={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Ut={key:1,p2:"",grid:"~ cols-minmax-8rem"},It={key:1},Ht=Q({__name:"assets",setup(L){const l=_e(),f=T(!1),C=T(""),n=U(()=>new ye(l.value||[],{keys:["path"]})),v=$e(()=>{const w=[];for(const r of l.value||[]){const p=r.path.split(".").pop();p&&!w.find(s=>s.name===p)&&w.push({name:p,value:!0})}return w}),b=U(()=>(C.value?n.value.search(C.value).map(r=>r.item):l.value||[]).filter(r=>{const p=r.path.split(".").pop();return!p||v.some(s=>s.name===p&&s.value)})),j=U(()=>{const w={};for(const r of b.value){const p=`${r.path.split("/").slice(0,-1).join("/")}/`;w[p]||(w[p]=[]),w[p].push(r)}return Object.entries(w).sort(([r],[p])=>r.localeCompare(p))}),P=U(()=>{const w={children:[]},r=(p,s,c)=>{const[g,..._]=s;let u=p.children.find(A=>A.path===g);u||(u={...c,path:g,children:[]},p.children.push(u)),_.length>1?r(u,_,c):_.length===1&&u.children.push({...c,path:_[0]})};return b.value.forEach(p=>{const s=p.path.split("/").filter(c=>c!=="");r(w,s,p)}),w.children}),x=T(),{view:E}=ke("assets");function q(){E.value=E.value==="list"?"grid":"list"}Ce("Escape",()=>{x.value=void 0});const O=T();return(w,r)=>{const p=te,s=Ve,c=Pe,g=Ae,_=Ge,u=it,A=Ue,y=re,B=kt,M=je,a=oe("tooltip");return o(),i("div",Ct,[d(g,{ref_key:"navbar",ref:O,search:C.value,"onUpdate:search":r[1]||(r[1]=e=>C.value=e),pb2:""},{actions:h(()=>[t("div",Vt,[K(d(p,{icon:"carbon:cloud-upload",title:"File Upload",border:!1,onClick:r[0]||(r[0]=e=>f.value=!f.value)},null,512),[[a,"File Upload",void 0,{"bottom-end":!0}]]),m(v).length?(o(),V(c,{key:0,direction:"end",n:"sm primary"},{trigger:h(({click:e})=>[K(d(p,{icon:"carbon-filter",border:!1,title:"Filter",p3:"","text-lg":"",onClick:$=>e()},null,8,["onClick"]),[[a,"Filter",void 0,{"bottom-end":!0}]]),t("span",Pt,N(m(v).length),1)]),default:h(()=>[t("div",At,[(o(!0),i(z,null,G(m(v),e=>(o(),V(s,{key:e.name,modelValue:e.value,"onUpdate:modelValue":$=>e.value=$,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:h(()=>[t("span",Dt,N(e.name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):S("",!0),K(d(p,{"text-lg":"",border:!1,icon:m(E)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:q},null,8,["icon"]),[[a,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:h(()=>[t("div",Nt,[C.value?(o(),i("span",Ft,N(b.value.length)+" matched · ",1)):S("",!0),t("span",null,N(m(l)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(_,{modelValue:f.value,"onUpdate:modelValue":r[2]||(r[2]=e=>f.value=e),folder:"/"},null,8,["modelValue"]),m(E)==="grid"?(o(),i(z,{key:0},[j.value.length>1?(o(!0),i(z,{key:0},G(j.value,([e,$])=>(o(),V(A,{key:e,text:e,description:`${$.length} items`,open:$.length<=m(Ee),padding:!1},{default:h(()=>[t("div",St,[(o(!0),i(z,null,G($,I=>(o(),V(u,{key:I.path,asset:I,folder:e,onClick:F=>x.value=I},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(o(),i("div",Ut,[(o(!0),i(z,null,G(b.value,e=>(o(),V(u,{key:e.path,asset:e,onClick:$=>x.value=e},null,8,["asset","onClick"]))),128))]))],64)):(o(),i("div",It,[(o(!0),i(z,null,G(P.value,(e,$)=>(o(),V(y,{key:$,modelValue:x.value,"onUpdate:modelValue":r[3]||(r[3]=I=>x.value=I),item:e},null,8,["modelValue","item"]))),128))])),d(M,{"model-value":!!x.value,"auto-close":"","w-120":"",top:O.value,onClose:r[5]||(r[5]=e=>x.value=void 0)},{default:h(()=>[x.value?(o(),V(B,{key:0,modelValue:x.value,"onUpdate:modelValue":r[4]||(r[4]=e=>x.value=e)},null,8,["modelValue"])):S("",!0)]),_:1},8,["model-value","top"])])}}});export{Ht as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"972fd647-8b28-4590-b53f-e511b82a966b","timestamp":1742966936012}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"972fd647-8b28-4590-b53f-e511b82a966b","timestamp":1742966936012,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as f,I as r}from"./vendor/json-editor-vue-
|
|
1
|
+
import{n as f,I as r}from"./vendor/json-editor-vue-huf8dypo.js";let e;const n=[];function s(i){if(n.push(i),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&n.forEach(o=>o(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(o){o&&n.forEach(t=>t(o))},get(){return e.value},configurable:!0}),()=>{n.splice(n.indexOf(i),1)}}function u(){e||(e=f(),s(o));function i(){e&&r(e)}function o(t){e.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",i)}return e}const c=u();export{c as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as P}from"./ncode-block.vue-
|
|
1
|
+
import{_ as P}from"./ncode-block.vue-h2q9yyre.js";import{ao as Q}from"./iqvenqyt.js";import{q as U,u as X,k as Y,D as j,R as W,a0 as S}from"./vendor/json-editor-vue-huf8dypo.js";function g(){}g.prototype={diff:function(e,r){var t,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=u.callback;typeof u=="function"&&(o=u,u={});var i=this;function f(v){return v=i.postProcess(v,u),o?(setTimeout(function(){o(v)},0),!0):v}e=this.castInput(e,u),r=this.castInput(r,u),e=this.removeEmpty(this.tokenize(e,u)),r=this.removeEmpty(this.tokenize(r,u));var l=r.length,s=e.length,a=1,c=l+s;u.maxEditLength!=null&&(c=Math.min(c,u.maxEditLength));var p=(t=u.timeout)!==null&&t!==void 0?t:1/0,d=Date.now()+p,m=[{oldPos:-1,lastComponent:void 0}],h=this.extractCommon(m[0],r,e,0,u);if(m[0].oldPos+1>=s&&h+1>=l)return f(F(i,m[0].lastComponent,r,e,i.useLongestToken));var y=-1/0,T=1/0;function z(){for(var v=Math.max(y,-a);v<=Math.min(T,a);v+=2){var C=void 0,w=m[v-1],E=m[v+1];w&&(m[v-1]=void 0);var q=!1;if(E){var M=E.oldPos-v;q=E&&0<=M&&M<l}var B=w&&w.oldPos+1<s;if(!q&&!B){m[v]=void 0;continue}if(!B||q&&w.oldPos<E.oldPos?C=i.addToPath(E,!0,!1,0,u):C=i.addToPath(w,!1,!0,1,u),h=i.extractCommon(C,r,e,v,u),C.oldPos+1>=s&&h+1>=l)return f(F(i,C.lastComponent,r,e,i.useLongestToken));m[v]=C,C.oldPos+1>=s&&(T=Math.min(T,v-1)),h+1>=l&&(y=Math.max(y,v+1))}a++}if(o)(function v(){setTimeout(function(){if(a>c||Date.now()>d)return o();z()||v()},0)})();else for(;a<=c&&Date.now()<=d;){var x=z();if(x)return x}},addToPath:function(e,r,t,u,o){var i=e.lastComponent;return i&&!o.oneChangePerToken&&i.added===r&&i.removed===t?{oldPos:e.oldPos+u,lastComponent:{count:i.count+1,added:r,removed:t,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+u,lastComponent:{count:1,added:r,removed:t,previousComponent:i}}},extractCommon:function(e,r,t,u,o){for(var i=r.length,f=t.length,l=e.oldPos,s=l-u,a=0;s+1<i&&l+1<f&&this.equals(t[l+1],r[s+1],o);)s++,l++,a++,o.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return a&&!o.oneChangePerToken&&(e.lastComponent={count:a,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,s},equals:function(e,r,t){return t.comparator?t.comparator(e,r):e===r||t.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],t=0;t<e.length;t++)e[t]&&r.push(e[t]);return r},castInput:function(e){return e},tokenize:function(e){return Array.from(e)},join:function(e){return e.join("")},postProcess:function(e){return e}};function F(n,e,r,t,u){for(var o=[],i;e;)o.push(e),i=e.previousComponent,delete e.previousComponent,e=i;o.reverse();for(var f=0,l=o.length,s=0,a=0;f<l;f++){var c=o[f];if(c.removed)c.value=n.join(t.slice(a,a+c.count)),a+=c.count;else{if(!c.added&&u){var p=r.slice(s,s+c.count);p=p.map(function(d,m){var h=t[a+m];return h.length>d.length?h:d}),c.value=n.join(p)}else c.value=n.join(r.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}return o}function V(n,e){var r;for(r=0;r<n.length&&r<e.length;r++)if(n[r]!=e[r])return n.slice(0,r);return n.slice(0,r)}function Z(n,e){var r;if(!n||!e||n[n.length-1]!=e[e.length-1])return"";for(r=0;r<n.length&&r<e.length;r++)if(n[n.length-(r+1)]!=e[e.length-(r+1)])return n.slice(-r);return n.slice(-r)}function R(n,e,r){if(n.slice(0,e.length)!=e)throw Error("string ".concat(JSON.stringify(n)," doesn't start with prefix ").concat(JSON.stringify(e),"; this is a bug"));return r+n.slice(e.length)}function _(n,e,r){if(!e)return n+r;if(n.slice(-e.length)!=e)throw Error("string ".concat(JSON.stringify(n)," doesn't end with suffix ").concat(JSON.stringify(e),"; this is a bug"));return n.slice(0,-e.length)+r}function L(n,e){return R(n,e,"")}function I(n,e){return _(n,e,"")}function G(n,e){return e.slice(0,b(n,e))}function b(n,e){var r=0;n.length>e.length&&(r=n.length-e.length);var t=e.length;n.length<e.length&&(t=n.length);var u=Array(t),o=0;u[0]=0;for(var i=1;i<t;i++){for(e[i]==e[o]?u[i]=u[o]:u[i]=o;o>0&&e[i]!=e[o];)o=u[o];e[i]==e[o]&&o++}o=0;for(var f=r;f<n.length;f++){for(;o>0&&n[f]!=e[o];)o=u[o];n[f]==e[o]&&o++}return o}var O="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",K=new RegExp("[".concat(O,"]+|\\s+|[^").concat(O,"]"),"ug"),k=new g;k.equals=function(n,e,r){return r.ignoreCase&&(n=n.toLowerCase(),e=e.toLowerCase()),n.trim()===e.trim()};k.tokenize=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;if(e.intlSegmenter){if(e.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Array.from(e.intlSegmenter.segment(n),function(o){return o.segment})}else r=n.match(K)||[];var t=[],u=null;return r.forEach(function(o){/\s/.test(o)?u==null?t.push(o):t.push(t.pop()+o):/\s/.test(u)?t[t.length-1]==u?t.push(t.pop()+o):t.push(u+o):t.push(o),u=o}),t};k.join=function(n){return n.map(function(e,r){return r==0?e:e.replace(/^\s+/,"")}).join("")};k.postProcess=function(n,e){if(!n||e.oneChangePerToken)return n;var r=null,t=null,u=null;return n.forEach(function(o){o.added?t=o:o.removed?u=o:((t||u)&&H(r,u,t,o),r=o,t=null,u=null)}),(t||u)&&H(r,u,t,null),n};function H(n,e,r,t){if(e&&r){var u=e.value.match(/^\s*/)[0],o=e.value.match(/\s*$/)[0],i=r.value.match(/^\s*/)[0],f=r.value.match(/\s*$/)[0];if(n){var l=V(u,i);n.value=_(n.value,i,l),e.value=L(e.value,l),r.value=L(r.value,l)}if(t){var s=Z(o,f);t.value=R(t.value,f,s),e.value=I(e.value,s),r.value=I(r.value,s)}}else if(r)n&&(r.value=r.value.replace(/^\s*/,"")),t&&(t.value=t.value.replace(/^\s*/,""));else if(n&&t){var a=t.value.match(/^\s*/)[0],c=e.value.match(/^\s*/)[0],p=e.value.match(/\s*$/)[0],d=V(a,c);e.value=L(e.value,d);var m=Z(L(a,d),p);e.value=I(e.value,m),t.value=R(t.value,a,m),n.value=_(n.value,a,a.slice(0,a.length-m.length))}else if(t){var h=t.value.match(/^\s*/)[0],y=e.value.match(/\s*$/)[0],T=G(y,h);e.value=I(e.value,T)}else if(n){var z=n.value.match(/\s*$/)[0],x=e.value.match(/^\s*/)[0],v=G(z,x);e.value=L(e.value,v)}}var ee=new g;ee.tokenize=function(n){var e=new RegExp("(\\r?\\n)|[".concat(O,"]+|[^\\S\\n\\r]+|[^").concat(O,"]"),"ug");return n.match(e)||[]};var $=new g;$.tokenize=function(n,e){e.stripTrailingCr&&(n=n.replace(/\r\n/g,`
|
|
2
2
|
`));var r=[],t=n.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var u=0;u<t.length;u++){var o=t[u];u%2&&!e.newlineIsToken?r[r.length-1]+=o:r.push(o)}return r};$.equals=function(n,e,r){return r.ignoreWhitespace?((!r.newlineIsToken||!n.includes(`
|
|
3
3
|
`))&&(n=n.trim()),(!r.newlineIsToken||!e.includes(`
|
|
4
4
|
`))&&(e=e.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(n.endsWith(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as g}from"./ncode-block.vue-
|
|
1
|
+
import{_ as g}from"./ncode-block.vue-h2q9yyre.js";import{a as C,_ as x}from"./iqvenqyt.js";import{q as S,n as w,u as B,w as N,O as n,Q as r,a0 as a,P as s,F as d,ad as V,a2 as i,R as $,v as T,a1 as u,a8 as v,W as m,a7 as h}from"./vendor/json-editor-vue-huf8dypo.js";const D={key:0,relative:"","n-code-block":""},E={flex:"~ wrap","w-full":""},F=["onClick"],L={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},P=S({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(f){const l=f,e=w(l.codeSnippets[0]),_=C(),b=B(()=>e.value?.lang||"text");return N(()=>{l.codeSnippets.includes(e.value)||(e.value=l.codeSnippets[0])}),(p,o)=>{const k=g,c=x;return p.codeSnippets.length?(a(),n("div",D,[s("div",E,[(a(!0),n(d,null,V(p.codeSnippets,(t,y)=>(a(),n("button",{key:y,px4:"",py2:"",border:"r base",hover:"bg-active",class:m(t===e.value?"":"border-b"),onClick:R=>e.value=t},[s("div",{class:m(t===e.value?"":"op30"),"font-mono":""},h(t.name),3)],10,F))),128)),o[1]||(o[1]=s("div",{border:"b base","flex-auto":""},null,-1))]),e.value?(a(),n(d,{key:0},[i(k,{code:e.value.code,lang:b.value,lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),s("div",L,[i(c,{icon:"carbon-copy",onClick:o[0]||(o[0]=t=>T(_)(e.value.code,p.eventType||`code-snippet-${e.value.name}`))},{default:u(()=>o[2]||(o[2]=[v(" Copy ")])),_:1}),e.value?.docs?(a(),$(c,{key:0,to:e.value.docs,target:"_blank",icon:"carbon-catalog"},{default:u(()=>o[3]||(o[3]=[v(" Docs ")])),_:1},8,["to"])):r("",!0)])],64)):r("",!0)])):r("",!0)}}});export{P as _};
|