@websublime/vite-plugin-open-api-devtools 0.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.
@@ -0,0 +1,665 @@
1
+ import { ref as $, computed as C, defineComponent as B, createElementBlock as l, openBlock as a, createVNode as p, createElementVNode as e, unref as i, normalizeClass as H, toDisplayString as _, createCommentVNode as m, createTextVNode as T, Fragment as w, renderList as M, withDirectives as de, createBlock as Y, resolveDynamicComponent as ee, vShow as re, onMounted as ue, onUnmounted as ce, watch as pe } from "vue";
2
+ import { g as te, C as se, a as _e, S as X, X as Z, F as he, b as fe } from "./format-CE7KDbll.js";
3
+ import { c as E, _ as P, u as ge, R as me } from "./main-AUiFaD93.js";
4
+ import { defineStore as ve } from "pinia";
5
+ const U = E("code", [
6
+ ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
7
+ ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
8
+ ]);
9
+ const O = E("file-json", [
10
+ ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
11
+ ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
12
+ [
13
+ "path",
14
+ { d: "M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1", key: "1oajmo" }
15
+ ],
16
+ [
17
+ "path",
18
+ { d: "M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1", key: "mpwhp6" }
19
+ ]
20
+ ]);
21
+ const ye = E("lock", [
22
+ ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
23
+ ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
24
+ ]);
25
+ const ke = E("shield", [
26
+ [
27
+ "path",
28
+ {
29
+ d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
30
+ key: "oel41y"
31
+ }
32
+ ]
33
+ ]);
34
+ const J = E("sprout", [
35
+ ["path", { d: "M7 20h10", key: "e6iznv" }],
36
+ ["path", { d: "M10 20c5.5-2.5.8-6.4 3-10", key: "161w41" }],
37
+ [
38
+ "path",
39
+ {
40
+ d: "M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z",
41
+ key: "9gtqwd"
42
+ }
43
+ ],
44
+ [
45
+ "path",
46
+ {
47
+ d: "M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z",
48
+ key: "bkxnd2"
49
+ }
50
+ ]
51
+ ]);
52
+ const Se = E("tag", [
53
+ [
54
+ "path",
55
+ {
56
+ d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",
57
+ key: "vktsd0"
58
+ }
59
+ ],
60
+ ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }]
61
+ ]), be = ve("registry", () => {
62
+ const d = $([]), n = $({
63
+ totalEndpoints: 0,
64
+ withCustomHandler: 0,
65
+ totalSchemas: 0,
66
+ withCustomSeed: 0,
67
+ autoGenerated: 0
68
+ }), S = $(!1), k = $(null), h = $(""), s = $({
69
+ methods: [],
70
+ hasHandler: null,
71
+ hasSeed: null,
72
+ tags: []
73
+ }), f = $(null), g = $(/* @__PURE__ */ new Set()), b = C(() => {
74
+ const t = /* @__PURE__ */ new Set();
75
+ for (const o of d.value)
76
+ for (const u of o.tags)
77
+ t.add(u);
78
+ return Array.from(t).sort();
79
+ }), v = C(() => {
80
+ const t = /* @__PURE__ */ new Set();
81
+ for (const o of d.value)
82
+ o.responseSchema && t.add(o.responseSchema);
83
+ return Array.from(t).sort();
84
+ }), y = C(() => {
85
+ let t = d.value;
86
+ if (h.value.trim()) {
87
+ const o = h.value.toLowerCase().trim();
88
+ t = t.filter((u) => u.path.toLowerCase().includes(o) || u.operationId.toLowerCase().includes(o) || u.summary?.toLowerCase().includes(o) || u.tags.some((D) => D.toLowerCase().includes(o)));
89
+ }
90
+ return s.value.methods.length > 0 && (t = t.filter((o) => s.value.methods.includes(o.method))), s.value.hasHandler !== null && (t = t.filter((o) => o.hasHandler === s.value.hasHandler)), s.value.hasSeed !== null && (t = t.filter((o) => o.hasSeed === s.value.hasSeed)), s.value.tags.length > 0 && (t = t.filter(
91
+ (o) => o.tags.some((u) => s.value.tags.includes(u))
92
+ )), t;
93
+ }), F = C(() => {
94
+ const t = /* @__PURE__ */ new Map();
95
+ for (const o of y.value) {
96
+ let u;
97
+ o.tags.length > 0 ? u = o.tags[0] : o.responseSchema ? u = o.responseSchema : u = o.path.split("/").filter(Boolean)[0] || "Other", t.has(u) || t.set(u, []), t.get(u)?.push(o);
98
+ }
99
+ return Array.from(t.entries()).map(([o, u]) => ({
100
+ tag: o,
101
+ endpoints: u.sort((D, le) => D.path.localeCompare(le.path)),
102
+ isExpanded: g.value.has(o)
103
+ })).sort((o, u) => o.tag.localeCompare(u.tag));
104
+ }), N = C(() => f.value ? d.value.find((t) => t.key === f.value) ?? null : null), G = C(() => d.value.filter((t) => t.hasHandler).length), V = C(() => d.value.filter((t) => t.hasSeed).length);
105
+ function q(t) {
106
+ d.value = t.endpoints, n.value = t.stats, k.value = null;
107
+ for (const o of t.endpoints)
108
+ o.tags.length > 0 && g.value.add(o.tags[0]);
109
+ }
110
+ function Q(t) {
111
+ S.value = t;
112
+ }
113
+ function j(t) {
114
+ k.value = t, S.value = !1;
115
+ }
116
+ function L() {
117
+ k.value = null;
118
+ }
119
+ function K(t) {
120
+ h.value = t;
121
+ }
122
+ function z(t) {
123
+ const o = s.value.methods.indexOf(t);
124
+ o === -1 ? s.value.methods.push(t) : s.value.methods.splice(o, 1);
125
+ }
126
+ function R(t) {
127
+ s.value.hasHandler = t;
128
+ }
129
+ function A(t) {
130
+ s.value.hasSeed = t;
131
+ }
132
+ function I(t) {
133
+ const o = s.value.tags.indexOf(t);
134
+ o === -1 ? s.value.tags.push(t) : s.value.tags.splice(o, 1);
135
+ }
136
+ function c() {
137
+ s.value = {
138
+ methods: [],
139
+ hasHandler: null,
140
+ hasSeed: null,
141
+ tags: []
142
+ }, h.value = "";
143
+ }
144
+ function r() {
145
+ return h.value.trim() !== "" || s.value.methods.length > 0 || s.value.hasHandler !== null || s.value.hasSeed !== null || s.value.tags.length > 0;
146
+ }
147
+ function x(t) {
148
+ f.value = t;
149
+ }
150
+ function W(t) {
151
+ g.value.has(t) ? g.value.delete(t) : g.value.add(t);
152
+ }
153
+ function ne() {
154
+ for (const t of F.value)
155
+ g.value.add(t.tag);
156
+ }
157
+ function oe() {
158
+ g.value.clear();
159
+ }
160
+ function ie(t) {
161
+ const o = new Set(t);
162
+ for (const u of d.value)
163
+ u.hasHandler = o.has(u.operationId);
164
+ }
165
+ function ae(t) {
166
+ const o = new Set(t);
167
+ for (const u of d.value)
168
+ u.hasSeed = u.responseSchema ? o.has(u.responseSchema) : !1;
169
+ }
170
+ return {
171
+ // State
172
+ endpoints: d,
173
+ stats: n,
174
+ isLoading: S,
175
+ error: k,
176
+ searchQuery: h,
177
+ filter: s,
178
+ selectedEndpointKey: f,
179
+ expandedTags: g,
180
+ // Getters
181
+ allTags: b,
182
+ allSchemas: v,
183
+ filteredEndpoints: y,
184
+ groupedEndpoints: F,
185
+ selectedEndpoint: N,
186
+ handlerCount: G,
187
+ seedCount: V,
188
+ // Actions
189
+ setRegistryData: q,
190
+ setLoading: Q,
191
+ setError: j,
192
+ clearError: L,
193
+ setSearchQuery: K,
194
+ toggleMethodFilter: z,
195
+ setHandlerFilter: R,
196
+ setSeedFilter: A,
197
+ toggleTagFilter: I,
198
+ clearFilters: c,
199
+ hasActiveFilters: r,
200
+ selectEndpoint: x,
201
+ toggleGroup: W,
202
+ expandAllGroups: ne,
203
+ collapseAllGroups: oe,
204
+ updateHandlerStatus: ie,
205
+ updateSeedStatus: ae
206
+ };
207
+ }), $e = { class: "endpoint-detail" }, Ce = {
208
+ key: 0,
209
+ class: "endpoint-detail__empty"
210
+ }, xe = {
211
+ key: 1,
212
+ class: "endpoint-detail__content"
213
+ }, He = { class: "endpoint-detail__header" }, ze = { class: "endpoint-detail__path font-mono" }, we = { class: "endpoint-detail__status" }, Ee = {
214
+ key: 0,
215
+ class: "endpoint-detail__status-item endpoint-detail__status-item--handler"
216
+ }, Fe = {
217
+ key: 1,
218
+ class: "endpoint-detail__status-item endpoint-detail__status-item--seed"
219
+ }, Me = {
220
+ key: 2,
221
+ class: "endpoint-detail__status-item endpoint-detail__status-item--security"
222
+ }, Le = {
223
+ key: 3,
224
+ class: "endpoint-detail__status-item endpoint-detail__status-item--auto"
225
+ }, Re = { class: "endpoint-detail__sections" }, Ae = { class: "endpoint-detail__section" }, Ie = { class: "endpoint-detail__section-content font-mono" }, De = {
226
+ key: 0,
227
+ class: "endpoint-detail__section"
228
+ }, Te = { class: "endpoint-detail__section-title" }, Ne = { class: "endpoint-detail__tags" }, Ge = {
229
+ key: 1,
230
+ class: "endpoint-detail__section"
231
+ }, Ve = { class: "endpoint-detail__section-content" }, qe = {
232
+ key: 2,
233
+ class: "endpoint-detail__section"
234
+ }, Qe = { class: "endpoint-detail__section-content endpoint-detail__description" }, je = {
235
+ key: 3,
236
+ class: "endpoint-detail__section"
237
+ }, Ke = { class: "endpoint-detail__section-title" }, Oe = { class: "endpoint-detail__section-content font-mono" }, Be = {
238
+ key: 4,
239
+ class: "endpoint-detail__section"
240
+ }, Pe = { class: "endpoint-detail__section-title" }, Ue = { class: "endpoint-detail__security" }, Je = { class: "endpoint-detail__security-name font-mono" }, We = { class: "endpoint-detail__security-scopes text-muted" }, Xe = /* @__PURE__ */ B({
241
+ __name: "EndpointDetail",
242
+ props: {
243
+ endpoint: {}
244
+ },
245
+ setup(d) {
246
+ const n = d, S = C(() => n.endpoint?.security && n.endpoint.security.length > 0), k = C(() => n.endpoint?.security ? n.endpoint.security.map((h) => ({
247
+ name: h.name,
248
+ scopes: h.scopes.length > 0 ? h.scopes.join(", ") : "No scopes"
249
+ })) : []);
250
+ return (h, s) => (a(), l("div", $e, [
251
+ d.endpoint ? (a(), l("div", xe, [
252
+ e("header", He, [
253
+ e("span", {
254
+ class: H([
255
+ "method-badge",
256
+ "method-badge--large",
257
+ `method-badge--${d.endpoint.method}`
258
+ ])
259
+ }, _(i(te)(d.endpoint.method)), 3),
260
+ e("h2", ze, _(d.endpoint.path), 1)
261
+ ]),
262
+ e("div", we, [
263
+ d.endpoint.hasHandler ? (a(), l("div", Ee, [
264
+ p(i(U), { size: 14 }),
265
+ s[2] || (s[2] = e("span", null, "Has custom handler", -1))
266
+ ])) : m("", !0),
267
+ d.endpoint.hasSeed ? (a(), l("div", Fe, [
268
+ p(i(J), { size: 14 }),
269
+ s[3] || (s[3] = e("span", null, "Has seed data", -1))
270
+ ])) : m("", !0),
271
+ S.value ? (a(), l("div", Me, [
272
+ p(i(ye), { size: 14 }),
273
+ s[4] || (s[4] = e("span", null, "Requires authentication", -1))
274
+ ])) : m("", !0),
275
+ !d.endpoint.hasHandler && !d.endpoint.hasSeed ? (a(), l("div", Le, [
276
+ p(i(O), { size: 14 }),
277
+ s[5] || (s[5] = e("span", null, "Auto-generated response", -1))
278
+ ])) : m("", !0)
279
+ ]),
280
+ e("div", Re, [
281
+ e("section", Ae, [
282
+ s[6] || (s[6] = e("h3", { class: "endpoint-detail__section-title" }, "Operation", -1)),
283
+ e("p", Ie, _(d.endpoint.operationId), 1)
284
+ ]),
285
+ d.endpoint.tags.length > 0 ? (a(), l("section", De, [
286
+ e("h3", Te, [
287
+ p(i(Se), { size: 14 }),
288
+ s[7] || (s[7] = T(" Tags ", -1))
289
+ ]),
290
+ e("div", Ne, [
291
+ (a(!0), l(w, null, M(d.endpoint.tags, (f) => (a(), l("span", {
292
+ key: f,
293
+ class: "endpoint-detail__tag"
294
+ }, _(f), 1))), 128))
295
+ ])
296
+ ])) : m("", !0),
297
+ d.endpoint.summary ? (a(), l("section", Ge, [
298
+ s[8] || (s[8] = e("h3", { class: "endpoint-detail__section-title" }, "Summary", -1)),
299
+ e("p", Ve, _(d.endpoint.summary), 1)
300
+ ])) : m("", !0),
301
+ d.endpoint.description ? (a(), l("section", qe, [
302
+ s[9] || (s[9] = e("h3", { class: "endpoint-detail__section-title" }, "Description", -1)),
303
+ e("p", Qe, _(d.endpoint.description), 1)
304
+ ])) : m("", !0),
305
+ d.endpoint.responseSchema ? (a(), l("section", je, [
306
+ e("h3", Ke, [
307
+ p(i(O), { size: 14 }),
308
+ s[10] || (s[10] = T(" Response Schema ", -1))
309
+ ]),
310
+ e("p", Oe, _(d.endpoint.responseSchema), 1)
311
+ ])) : m("", !0),
312
+ S.value ? (a(), l("section", Be, [
313
+ e("h3", Pe, [
314
+ p(i(ke), { size: 14 }),
315
+ s[11] || (s[11] = T(" Security ", -1))
316
+ ]),
317
+ e("div", Ue, [
318
+ (a(!0), l(w, null, M(k.value, (f) => (a(), l("div", {
319
+ key: f.name,
320
+ class: "endpoint-detail__security-item"
321
+ }, [
322
+ e("span", Je, _(f.name), 1),
323
+ e("span", We, _(f.scopes), 1)
324
+ ]))), 128))
325
+ ])
326
+ ])) : m("", !0)
327
+ ])
328
+ ])) : (a(), l("div", Ce, [
329
+ p(i(O), {
330
+ size: 48,
331
+ class: "endpoint-detail__empty-icon"
332
+ }),
333
+ s[0] || (s[0] = e("h3", { class: "endpoint-detail__empty-title" }, "No endpoint selected", -1)),
334
+ s[1] || (s[1] = e("p", { class: "endpoint-detail__empty-text text-muted" }, " Select an endpoint from the list to view its details ", -1))
335
+ ]))
336
+ ]));
337
+ }
338
+ }), Ze = /* @__PURE__ */ P(Xe, [["__scopeId", "data-v-c66a0f52"]]), Ye = { class: "endpoint-list" }, et = {
339
+ key: 0,
340
+ class: "endpoint-list__empty"
341
+ }, tt = {
342
+ key: 1,
343
+ class: "endpoint-list__groups"
344
+ }, st = ["aria-expanded", "aria-controls", "onClick"], nt = { class: "endpoint-group__tag" }, ot = { class: "endpoint-group__count text-muted" }, it = ["id", "aria-label"], at = ["aria-selected", "onClick"], lt = { class: "endpoint-item__path font-mono" }, dt = { class: "endpoint-item__indicators" }, rt = {
345
+ key: 0,
346
+ class: "endpoint-item__indicator endpoint-item__indicator--handler",
347
+ title: "Has custom handler"
348
+ }, ut = {
349
+ key: 1,
350
+ class: "endpoint-item__indicator endpoint-item__indicator--seed",
351
+ title: "Has seed data"
352
+ }, ct = /* @__PURE__ */ B({
353
+ __name: "EndpointList",
354
+ props: {
355
+ groups: {},
356
+ selectedKey: {}
357
+ },
358
+ emits: ["select", "toggle-group"],
359
+ setup(d, { emit: n }) {
360
+ const S = d, k = n;
361
+ function h(g) {
362
+ k("select", g.key);
363
+ }
364
+ function s(g) {
365
+ k("toggle-group", g);
366
+ }
367
+ function f(g) {
368
+ return S.selectedKey === g.key;
369
+ }
370
+ return (g, b) => (a(), l("div", Ye, [
371
+ d.groups.length === 0 ? (a(), l("div", et, [...b[0] || (b[0] = [
372
+ e("p", { class: "text-muted" }, "No endpoints found", -1)
373
+ ])])) : (a(), l("div", tt, [
374
+ (a(!0), l(w, null, M(d.groups, (v) => (a(), l("div", {
375
+ key: v.tag,
376
+ class: "endpoint-group"
377
+ }, [
378
+ e("button", {
379
+ type: "button",
380
+ class: "endpoint-group__header",
381
+ "aria-expanded": v.isExpanded,
382
+ "aria-controls": `group-${v.tag}`,
383
+ onClick: (y) => s(v.tag)
384
+ }, [
385
+ (a(), Y(ee(v.isExpanded ? i(se) : i(_e)), {
386
+ size: 16,
387
+ class: "endpoint-group__chevron"
388
+ })),
389
+ e("span", nt, _(v.tag), 1),
390
+ e("span", ot, " (" + _(v.endpoints.length) + ") ", 1)
391
+ ], 8, st),
392
+ de(e("div", {
393
+ id: `group-${v.tag}`,
394
+ class: "endpoint-group__items",
395
+ role: "group",
396
+ "aria-label": `${v.tag} endpoints`
397
+ }, [
398
+ (a(!0), l(w, null, M(v.endpoints, (y) => (a(), l("button", {
399
+ key: y.key,
400
+ type: "button",
401
+ class: H([
402
+ "endpoint-item",
403
+ { "endpoint-item--selected": f(y) }
404
+ ]),
405
+ "aria-selected": f(y),
406
+ onClick: (F) => h(y)
407
+ }, [
408
+ e("span", {
409
+ class: H([
410
+ "method-badge",
411
+ `method-badge--${y.method}`
412
+ ])
413
+ }, _(i(te)(y.method)), 3),
414
+ e("span", lt, _(y.path), 1),
415
+ e("div", dt, [
416
+ y.hasHandler ? (a(), l("span", rt, [
417
+ p(i(U), { size: 12 })
418
+ ])) : m("", !0),
419
+ y.hasSeed ? (a(), l("span", ut, [
420
+ p(i(J), { size: 12 })
421
+ ])) : m("", !0)
422
+ ])
423
+ ], 10, at))), 128))
424
+ ], 8, it), [
425
+ [re, v.isExpanded]
426
+ ])
427
+ ]))), 128))
428
+ ]))
429
+ ]));
430
+ }
431
+ }), pt = /* @__PURE__ */ P(ct, [["__scopeId", "data-v-554ffe63"]]), _t = { class: "routes-page" }, ht = { class: "routes-toolbar" }, ft = { class: "routes-search" }, gt = ["value"], mt = ["aria-expanded"], vt = {
432
+ key: 0,
433
+ class: "routes-filter-toggle__badge"
434
+ }, yt = { class: "routes-stats" }, kt = { class: "routes-stats__item" }, St = { class: "routes-stats__item" }, bt = {
435
+ key: 0,
436
+ class: "routes-filters"
437
+ }, $t = { class: "routes-filters__section" }, Ct = { class: "routes-filters__methods" }, xt = ["onClick"], Ht = { class: "routes-filters__section" }, zt = { class: "routes-filters__status" }, wt = {
438
+ key: 0,
439
+ class: "routes-filters__actions"
440
+ }, Et = { class: "routes-content" }, Ft = {
441
+ key: 0,
442
+ class: "routes-loading"
443
+ }, Mt = {
444
+ key: 1,
445
+ class: "routes-error"
446
+ }, Lt = { class: "routes-error__message" }, Rt = {
447
+ key: 2,
448
+ class: "routes-empty empty-state"
449
+ }, At = {
450
+ key: 3,
451
+ class: "routes-empty empty-state"
452
+ }, It = { class: "routes-list-panel" }, Dt = { class: "routes-detail-panel" }, Tt = /* @__PURE__ */ B({
453
+ __name: "RoutesPage",
454
+ setup(d) {
455
+ const n = be(), { send: S, on: k, connected: h } = ge(), s = $(!1), f = $(null), g = [
456
+ "get",
457
+ "post",
458
+ "put",
459
+ "patch",
460
+ "delete",
461
+ "options",
462
+ "head",
463
+ "trace"
464
+ ];
465
+ function b() {
466
+ h.value && (n.setLoading(!0), S({ type: "get:registry" }));
467
+ }
468
+ function v(c) {
469
+ n.setRegistryData(c), n.setLoading(!1);
470
+ }
471
+ function y(c) {
472
+ n.selectEndpoint(c);
473
+ }
474
+ function F(c) {
475
+ n.toggleGroup(c);
476
+ }
477
+ function N(c) {
478
+ const r = c.target;
479
+ n.setSearchQuery(r.value);
480
+ }
481
+ function G() {
482
+ n.setSearchQuery(""), f.value?.focus();
483
+ }
484
+ function V(c) {
485
+ n.toggleMethodFilter(c);
486
+ }
487
+ function q(c) {
488
+ return n.filter.methods.includes(c);
489
+ }
490
+ function Q() {
491
+ const c = n.filter.hasHandler;
492
+ n.setHandlerFilter(c === !0 ? null : !0);
493
+ }
494
+ function j() {
495
+ const c = n.filter.hasSeed;
496
+ n.setSeedFilter(c === !0 ? null : !0);
497
+ }
498
+ function L() {
499
+ n.clearFilters();
500
+ }
501
+ function K() {
502
+ s.value = !s.value;
503
+ }
504
+ const z = C(() => n.hasActiveFilters());
505
+ let R = null, A = null, I = null;
506
+ return ue(() => {
507
+ R = k("registry", v), A = k("handlers:updated", () => b()), I = k("seeds:updated", () => b()), h.value && b();
508
+ }), ce(() => {
509
+ R?.(), A?.(), I?.();
510
+ }), pe(h, (c) => {
511
+ c && b();
512
+ }), (c, r) => (a(), l("div", _t, [
513
+ e("div", ht, [
514
+ e("div", ft, [
515
+ p(i(X), {
516
+ size: 16,
517
+ class: "routes-search__icon"
518
+ }),
519
+ e("input", {
520
+ ref_key: "searchInputRef",
521
+ ref: f,
522
+ type: "text",
523
+ class: "routes-search__input input",
524
+ placeholder: "Search endpoints...",
525
+ value: i(n).searchQuery,
526
+ onInput: N
527
+ }, null, 40, gt),
528
+ i(n).searchQuery ? (a(), l("button", {
529
+ key: 0,
530
+ type: "button",
531
+ class: "routes-search__clear btn btn--ghost btn--icon",
532
+ title: "Clear search",
533
+ onClick: G
534
+ }, [
535
+ p(i(Z), { size: 14 })
536
+ ])) : m("", !0)
537
+ ]),
538
+ e("button", {
539
+ type: "button",
540
+ class: H([
541
+ "routes-filter-toggle btn btn--secondary",
542
+ { "routes-filter-toggle--active": z.value }
543
+ ]),
544
+ "aria-expanded": s.value,
545
+ onClick: K
546
+ }, [
547
+ p(i(he), { size: 16 }),
548
+ r[0] || (r[0] = e("span", null, "Filters", -1)),
549
+ z.value ? (a(), l("span", vt, _(i(n).filter.methods.length + (i(n).filter.hasHandler ? 1 : 0) + (i(n).filter.hasSeed ? 1 : 0)), 1)) : m("", !0),
550
+ (a(), Y(ee(s.value ? i(fe) : i(se)), { size: 14 }))
551
+ ], 10, mt),
552
+ e("div", yt, [
553
+ e("span", kt, _(i(n).filteredEndpoints.length) + " endpoints ", 1),
554
+ r[1] || (r[1] = e("span", { class: "routes-stats__separator" }, "|", -1)),
555
+ e("span", St, _(i(n).allTags.length) + " tags ", 1)
556
+ ])
557
+ ]),
558
+ s.value ? (a(), l("div", bt, [
559
+ e("div", $t, [
560
+ r[2] || (r[2] = e("h4", { class: "routes-filters__title" }, "Methods", -1)),
561
+ e("div", Ct, [
562
+ (a(), l(w, null, M(g, (x) => e("button", {
563
+ key: x,
564
+ type: "button",
565
+ class: H([
566
+ "method-badge",
567
+ `method-badge--${x}`,
568
+ { "method-badge--inactive": !q(x) && i(n).filter.methods.length > 0 }
569
+ ]),
570
+ onClick: (W) => V(x)
571
+ }, _(x.toUpperCase()), 11, xt)), 64))
572
+ ])
573
+ ]),
574
+ e("div", Ht, [
575
+ r[5] || (r[5] = e("h4", { class: "routes-filters__title" }, "Status", -1)),
576
+ e("div", zt, [
577
+ e("button", {
578
+ type: "button",
579
+ class: H([
580
+ "routes-filters__status-btn",
581
+ { "routes-filters__status-btn--active": i(n).filter.hasHandler }
582
+ ]),
583
+ onClick: Q
584
+ }, [
585
+ p(i(U), { size: 14 }),
586
+ r[3] || (r[3] = e("span", null, "Has Handler", -1))
587
+ ], 2),
588
+ e("button", {
589
+ type: "button",
590
+ class: H([
591
+ "routes-filters__status-btn",
592
+ { "routes-filters__status-btn--active": i(n).filter.hasSeed }
593
+ ]),
594
+ onClick: j
595
+ }, [
596
+ p(i(J), { size: 14 }),
597
+ r[4] || (r[4] = e("span", null, "Has Seed", -1))
598
+ ], 2)
599
+ ])
600
+ ]),
601
+ z.value ? (a(), l("div", wt, [
602
+ e("button", {
603
+ type: "button",
604
+ class: "btn btn--ghost",
605
+ onClick: L
606
+ }, [
607
+ p(i(Z), { size: 14 }),
608
+ r[6] || (r[6] = T(" Clear all filters ", -1))
609
+ ])
610
+ ])) : m("", !0)
611
+ ])) : m("", !0),
612
+ e("div", Et, [
613
+ i(n).isLoading ? (a(), l("div", Ft, [...r[7] || (r[7] = [
614
+ e("div", { class: "routes-loading__spinner" }, null, -1),
615
+ e("span", { class: "text-muted" }, "Loading endpoints...", -1)
616
+ ])])) : i(n).error ? (a(), l("div", Mt, [
617
+ e("p", Lt, _(i(n).error), 1),
618
+ e("button", {
619
+ type: "button",
620
+ class: "btn btn--primary",
621
+ onClick: b
622
+ }, " Retry ")
623
+ ])) : i(n).endpoints.length === 0 ? (a(), l("div", Rt, [
624
+ p(i(me), {
625
+ size: 48,
626
+ class: "empty-state__icon"
627
+ }),
628
+ r[8] || (r[8] = e("h3", { class: "empty-state__title" }, "No endpoints found", -1)),
629
+ r[9] || (r[9] = e("p", { class: "empty-state__description" }, " No API endpoints are available. Make sure your OpenAPI spec is loaded. ", -1))
630
+ ])) : i(n).filteredEndpoints.length === 0 ? (a(), l("div", At, [
631
+ p(i(X), {
632
+ size: 48,
633
+ class: "empty-state__icon"
634
+ }),
635
+ r[10] || (r[10] = e("h3", { class: "empty-state__title" }, "No matching endpoints", -1)),
636
+ r[11] || (r[11] = e("p", { class: "empty-state__description" }, " Try adjusting your search or filters. ", -1)),
637
+ z.value ? (a(), l("button", {
638
+ key: 0,
639
+ type: "button",
640
+ class: "btn btn--secondary",
641
+ onClick: L
642
+ }, " Clear filters ")) : m("", !0)
643
+ ])) : (a(), l(w, { key: 4 }, [
644
+ e("div", It, [
645
+ p(pt, {
646
+ groups: i(n).groupedEndpoints,
647
+ "selected-key": i(n).selectedEndpointKey,
648
+ onSelect: y,
649
+ onToggleGroup: F
650
+ }, null, 8, ["groups", "selected-key"])
651
+ ]),
652
+ e("div", Dt, [
653
+ p(Ze, {
654
+ endpoint: i(n).selectedEndpoint
655
+ }, null, 8, ["endpoint"])
656
+ ])
657
+ ], 64))
658
+ ])
659
+ ]));
660
+ }
661
+ }), Qt = /* @__PURE__ */ P(Tt, [["__scopeId", "data-v-bdd419e3"]]);
662
+ export {
663
+ Qt as default
664
+ };
665
+ //# sourceMappingURL=RoutesPage-D7H_CupP.js.map