@bluelibs/runner-dev 4.4.5 → 4.4.6
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/cli/generators/templates.js +28 -0
- package/dist/cli/generators/templates.js.map +1 -1
- package/dist/index.d.ts +71 -17
- package/dist/mcp/z3.d.ts +1 -0
- package/dist/mcp/z3.js +9 -0
- package/dist/mcp/z3.js.map +1 -0
- package/dist/resources/cli.config.resource.d.ts +4 -1
- package/dist/resources/cli.config.resource.js +4 -0
- package/dist/resources/cli.config.resource.js.map +1 -1
- package/dist/resources/coverage.resource.d.ts +4 -1
- package/dist/resources/coverage.resource.js +4 -0
- package/dist/resources/coverage.resource.js.map +1 -1
- package/dist/resources/dev.resource.d.ts +7 -1
- package/dist/resources/dev.resource.js +12 -0
- package/dist/resources/dev.resource.js.map +1 -1
- package/dist/resources/docs.generator.resource.d.ts +8 -2
- package/dist/resources/docs.generator.resource.js +4 -0
- package/dist/resources/docs.generator.resource.js.map +1 -1
- package/dist/resources/graphql-accumulator.resource.d.ts +8 -2
- package/dist/resources/graphql-accumulator.resource.js +4 -0
- package/dist/resources/graphql-accumulator.resource.js.map +1 -1
- package/dist/resources/graphql.cli.resource.d.ts +4 -1
- package/dist/resources/graphql.cli.resource.js +4 -0
- package/dist/resources/graphql.cli.resource.js.map +1 -1
- package/dist/resources/graphql.query.cli.task.d.ts +40 -10
- package/dist/resources/graphql.query.cli.task.js +1 -1
- package/dist/resources/graphql.query.cli.task.js.map +1 -1
- package/dist/resources/graphql.query.task.d.ts +24 -6
- package/dist/resources/graphql.query.task.js +1 -1
- package/dist/resources/graphql.query.task.js.map +1 -1
- package/dist/resources/introspector.cli.resource.d.ts +8 -2
- package/dist/resources/introspector.cli.resource.js +4 -0
- package/dist/resources/introspector.cli.resource.js.map +1 -1
- package/dist/resources/introspector.resource.d.ts +4 -1
- package/dist/resources/introspector.resource.js +4 -0
- package/dist/resources/introspector.resource.js.map +1 -1
- package/dist/resources/live.resource.d.ts +8 -2
- package/dist/resources/live.resource.js +8 -0
- package/dist/resources/live.resource.js.map +1 -1
- package/dist/resources/models/initializeFromStore.utils.js +3 -6
- package/dist/resources/models/initializeFromStore.utils.js.map +1 -1
- package/dist/resources/routeHandlers/registerHttpRoutes.hook.d.ts +36 -9
- package/dist/resources/routeHandlers/registerHttpRoutes.hook.js +4 -0
- package/dist/resources/routeHandlers/registerHttpRoutes.hook.js.map +1 -1
- package/dist/resources/server.resource.d.ts +32 -8
- package/dist/resources/server.resource.js +4 -0
- package/dist/resources/server.resource.js.map +1 -1
- package/dist/resources/swap.cli.resource.d.ts +16 -4
- package/dist/resources/swap.cli.resource.js +4 -0
- package/dist/resources/swap.cli.resource.js.map +1 -1
- package/dist/resources/swap.resource.d.ts +8 -2
- package/dist/resources/swap.resource.js +4 -0
- package/dist/resources/swap.resource.js.map +1 -1
- package/dist/resources/telemetry.resource.d.ts +4 -1
- package/dist/resources/telemetry.resource.js +12 -0
- package/dist/resources/telemetry.resource.js.map +1 -1
- package/dist/ui/.vite/manifest.json +2 -2
- package/dist/ui/assets/{docs-CFcESx-1.js → docs-Cw0Dreql.js} +2 -2
- package/dist/ui/assets/{docs-CFcESx-1.js.map → docs-Cw0Dreql.js.map} +1 -1
- package/dist/ui/assets/{docs-B2-n0kaX.css → docs-D7c0I3Vs.css} +1 -1
- package/dist/utils/zod.js +15 -3
- package/dist/utils/zod.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap.resource.js","sourceRoot":"","sources":["../../src/resources/swap.resource.ts"],"names":[],"mappings":";;;AAAA,6CAAqD;AACrD,mEAAuD;AAEvD,6CAMsB;AACtB,mCAAoC;AA0DvB,QAAA,WAAW,GAAG,IAAA,iBAAQ,EAAC;IAClC,EAAE,EAAE,mCAAmC;IACvC,YAAY,EAAE;QACZ,KAAK,EAAE,gBAAO,CAAC,S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AAC;wBACnB,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;wBAC/C,OAAO;4BACL,OAAO,EAAE,KAAK;4BACd,KAAK,EAAE,gCACL,SAAS,YAAY,KAAK;gCACxB,CAAC,CAAC,SAAS,CAAC,OAAO;gCACnB,CAAC,CAAC,MAAM,CAAC,SAAS,CACtB,EAAE;4BACF,eAAe;4BACf,YAAY;yBACb,CAAC;oBACJ,CAAC;oBAED,mBAAmB;oBACnB,MAAM,gBAAgB,GAAG,IAAA,4BAAe,EAAC,MAAM,CAAC,CAAC;oBACjD,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;oBAE/C,OAAO;wBACL,OAAO,EAAE,IAAI;wBACb,MAAM,EAAE,gBAAgB;wBACxB,eAAe;wBACf,YAAY;qBACb,CAAC;gBACJ,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;oBAC/C,OAAO;wBACL,OAAO,EAAE,KAAK;wBACd,KAAK,EAAE,sBACL,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE;wBACF,eAAe;wBACf,YAAY;qBACb,CAAC;gBACJ,CAAC;YACH,CAAC;SACF,CAAC;QAEF,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"swap.resource.js","sourceRoot":"","sources":["../../src/resources/swap.resource.ts"],"names":[],"mappings":";;;AAAA,6CAAqD;AACrD,mEAAuD;AAEvD,6CAMsB;AACtB,mCAAoC;AA0DvB,QAAA,WAAW,GAAG,IAAA,iBAAQ,EAAC;IAClC,EAAE,EAAE,mCAAmC;IACvC,IAAI,EAAE;QACJ,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,kHAAkH;KACh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CAAC,CAAC;oBAClD,CAAC;oBAAC,OAAO,SAAS,EAAE,CAAC;wBACnB,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;wBAC/C,OAAO;4BACL,OAAO,EAAE,KAAK;4BACd,KAAK,EAAE,gCACL,SAAS,YAAY,KAAK;gCACxB,CAAC,CAAC,SAAS,CAAC,OAAO;gCACnB,CAAC,CAAC,MAAM,CAAC,SAAS,CACtB,EAAE;4BACF,eAAe;4BACf,YAAY;yBACb,CAAC;oBACJ,CAAC;oBAED,mBAAmB;oBACnB,MAAM,gBAAgB,GAAG,IAAA,4BAAe,EAAC,MAAM,CAAC,CAAC;oBACjD,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;oBAE/C,OAAO;wBACL,OAAO,EAAE,IAAI;wBACb,MAAM,EAAE,gBAAgB;wBACxB,eAAe;wBACf,YAAY;qBACb,CAAC;gBACJ,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;oBAC/C,OAAO;wBACL,OAAO,EAAE,KAAK;wBACd,KAAK,EAAE,sBACL,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE;wBACF,eAAe;wBACf,YAAY;qBACb,CAAC;gBACJ,CAAC;YACH,CAAC;SACF,CAAC;QAEF,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export declare const telemetry: import("@bluelibs/runner").IResource<void, Promise<void>, {}, any,
|
|
1
|
+
export declare const telemetry: import("@bluelibs/runner").IResource<void, Promise<void>, {}, any, {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
}, import("@bluelibs/runner").TagType[], import("@bluelibs/runner").ResourceMiddlewareAttachmentType[]>;
|
|
@@ -22,6 +22,10 @@ const overrideEventManagerEmittor = (0, runner_1.resource)({
|
|
|
22
22
|
});
|
|
23
23
|
const hookInterceptors = (0, runner_1.resource)({
|
|
24
24
|
id: "runner-dev.telemetry.resources.hookInterceptors",
|
|
25
|
+
meta: {
|
|
26
|
+
title: "Hook Interceptors",
|
|
27
|
+
description: "Intercepts hook execution to record telemetry data including execution time, success/failure status, and correlation",
|
|
28
|
+
},
|
|
25
29
|
dependencies: { live: live_resource_1.live, eventManager: runner_1.globals.resources.eventManager },
|
|
26
30
|
async init(_, { live, eventManager }) {
|
|
27
31
|
eventManager.interceptHook(async (next, hook, emission) => {
|
|
@@ -45,6 +49,10 @@ const hookInterceptors = (0, runner_1.resource)({
|
|
|
45
49
|
const telemetryMiddleware = (0, runner_1.taskMiddleware)({
|
|
46
50
|
everywhere: true,
|
|
47
51
|
id: "runner-dev.telemetry.middleware",
|
|
52
|
+
meta: {
|
|
53
|
+
title: "Telemetry Task Middleware",
|
|
54
|
+
description: "Global middleware that tracks task execution metrics including duration, success/failure, and correlation data",
|
|
55
|
+
},
|
|
48
56
|
dependencies: { live: live_resource_1.live },
|
|
49
57
|
async run({ task, next }, { live }) {
|
|
50
58
|
const id = String(task.definition.id);
|
|
@@ -78,6 +86,10 @@ const telemetryMiddleware = (0, runner_1.taskMiddleware)({
|
|
|
78
86
|
});
|
|
79
87
|
exports.telemetry = (0, runner_1.resource)({
|
|
80
88
|
id: "runner-dev.telemetry",
|
|
89
|
+
meta: {
|
|
90
|
+
title: "Telemetry System",
|
|
91
|
+
description: "Comprehensive telemetry system that intercepts tasks, hooks, and events to collect performance and execution data",
|
|
92
|
+
},
|
|
81
93
|
register: [
|
|
82
94
|
telemetryMiddleware,
|
|
83
95
|
overrideEventManagerEmittor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.resource.js","sourceRoot":"","sources":["../../src/resources/telemetry.resource.ts"],"names":[],"mappings":";;;AAAA,6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C;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACtC,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;gBAC1C,IAAI,CAAC,SAAS,CACZ,EAAE,EACF,MAAM,EACN,UAAU,EACV,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,MAAM,CACP,CAAC;gBACF,OAAO,MAAa,CAAC;YACvB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;gBAC1C,qDAAqD;gBACrD,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;gBAEpC,IAAI,CAAC;oBACH,IAAI,CAAC,SAAS,CACZ,EAAE,EACF,MAAM,EACN,UAAU,EACV,KAAK,EACL,KAAK,EACL,QAAQ,EACR,MAAM,CACP,CAAC;gBACJ,CAAC;gBAAC,MAAM,CAAC;oBACP,iCAAiC;gBACnC,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEU,QAAA,SAAS,GAAG,IAAA,iBAAQ,EAAC;IAChC,EAAE,EAAE,sBAAsB;IAC1B,QAAQ,EAAE;QACR,mBAAmB;QACnB,2BAA2B;QAC3B,gBAAgB;KACjB;IACD,KAAK,CAAC,IAAI;QACR,QAAQ;IACV,CAAC;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"telemetry.resource.js","sourceRoot":"","sources":["../../src/resources/telemetry.resource.ts"],"names":[],"mappings":";;;AAAA,6CAA2E;AAC3E,mDAAuC;AACvC,uDAA4E;AAE5E,MAAM,2BAA2B,GAAG,IAAA,iBAAQ,EAAC;IAC3C,EAAE,EAAE,kDAAkD;IACtD,IAAI,EAAE;QACJ,KAAK,EAAE,gCAAgC;QACvC,WAAW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
"isEntry": true,
|
|
7
7
|
"css": [
|
|
8
|
-
"assets/docs-
|
|
8
|
+
"assets/docs-D7c0I3Vs.css"
|
|
9
9
|
]
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -205,7 +205,7 @@ ${$.details??"N/A"}`:"No coverage details.";P(A),S(!0)}catch(C){P(`Error loading
|
|
|
205
205
|
invocationId
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
`;try{const C=await rn(E,{eventId:n.id,inputJson:_?.trim()||void 0,evalInput:!1});return{output:C.invokeEvent.success?"Event invoked successfully":C.invokeEvent.error??void 0,error:C.invokeEvent.error??void 0}}catch(C){return{error:C?.message??String(C)}}}})]})},j2=({hook:n,emittedEventsCount:e,isGlobal:t})=>d.jsx("div",{className:"hook-card__header",children:d.jsxs("div",{className:"hook-card__header-content",children:[d.jsxs("div",{className:"main",children:[d.jsxs("h3",{className:"hook-card__title",children:[t?"🌐":"🪝"," ",n.meta?.title||Te(n.id),t&&d.jsx("span",{className:"hook-card__global-badge",children:"GLOBAL"})]}),d.jsx("div",{className:"hook-card__id",children:n.id}),n.meta?.description&&d.jsx("p",{className:"hook-card__description",children:n.meta.description})]}),d.jsxs("div",{className:"hook-card__stats",children:[n.hookOrder!==null&&n.hookOrder!==void 0&&d.jsxs("div",{className:"hook-card__order-badge",children:["#",n.hookOrder]}),d.jsxs("div",{className:"hook-card__stat-badge",children:[d.jsx("span",{className:"icon",children:"📤"}),d.jsx("span",{className:"count",children:e})]})]})]})}),T2=({hook:n,targetEvents:e,isGlobal:t,introspector:i})=>{const s=()=>n.hookOrder===null||n.hookOrder===void 0?"Default":n.hookOrder.toString(),[r,o]=le.useState(!1),[c,u]=le.useState(null),[f,p]=le.useState(!1),[g,O]=le.useState(null);async function x(){if(n?.id){o(!0),p(!0),O(null);try{const k=await rn(DE,{id:n.id});u(k?.hook?.fileContents??null)}catch(k){O(k?.message??"Failed to load file"),u(null)}finally{p(!1)}}}return d.jsxs("div",{className:"hook-card__section",children:[d.jsx("h4",{className:"hook-card__section__title",children:"📋 Overview"}),d.jsxs("div",{className:"hook-card__section__content",children:[d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"File Path:"}),d.jsx("div",{className:"value",children:d.jsx("a",{onClick:x,children:Jn(n.filePath)})})]}),n.registeredBy&&d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"Registered By:"}),d.jsx("div",{className:"value",children:d.jsx("a",{href:`#element-${n.registeredBy}`,className:"hook-card__registrar-link",children:n.registeredBy})})]}),d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"Target Events:"}),d.jsx("div",{className:"value",children:t?d.jsxs("div",{className:"hook-card__global-event",children:[d.jsx("span",{className:"global-indicator",children:"🌐 ALL EVENTS"}),d.jsx("div",{className:"global-description",children:"This hook listens to every event in the system"})]}):d.jsx(d.Fragment,{children:e.map(k=>d.jsxs("div",{children:[d.jsx("a",{href:`#element-${k.id}`,className:"hook-card__event-link",children:Te(k.id)}),k.meta?.title&&d.jsxs("div",{children:["(",k.meta.title,")"]})]},k.id))})})]}),d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"Execution Order:"}),d.jsxs("div",{className:"value value--order",children:[s(),d.jsx("div",{className:"order-description",children:n.hookOrder===null||n.hookOrder===void 0?"Uses default ordering":`Priority level ${n.hookOrder}`})]})]}),d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"Emits Events:"}),d.jsx("div",{className:"value",children:a_(n.emits)})]}),n.tags&&n.tags.length>0&&d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"Tags:"}),d.jsx("div",{className:"value",children:d.jsx("div",{className:"hook-card__tags",children:i.getTagsByIds(n.tags).map(k=>d.jsx("a",{href:`#element-${k.id}`,className:"clean-button",children:Te(k.id)},k.id))})})]}),n.overriddenBy&&d.jsxs("div",{className:"hook-card__alert hook-card__alert--warning",children:[d.jsx("div",{className:"title",children:"⚠️ Overridden By:"}),d.jsx("div",{className:"content",children:n.overriddenBy})]})]}),d.jsx(jn,{title:n.meta?.title||Te(n.id),subtitle:n.filePath||void 0,isOpen:r,onClose:()=>o(!1),code:f?"Loading...":g?`Error: ${g}`:c,enableEdit:!!n.filePath,saveOnFile:n.filePath||null})]})},N2=({isGlobal:n,targetEvents:e,introspector:t})=>n?d.jsxs("div",{className:"hook-card__section",children:[d.jsx("h4",{className:"hook-card__section__title",children:"🌐 Global Hook Details"}),d.jsxs("div",{className:"hook-card__global-info",children:[d.jsxs("div",{className:"hook-card__global-message",children:[d.jsxs("div",{className:"hook-card__global-message__header",children:[d.jsx("span",{className:"icon",children:"🌐"}),d.jsx("h5",{className:"title",children:"Universal Event Listener"})]}),d.jsxs("div",{className:"hook-card__global-message__content",children:["This hook is triggered by ",d.jsx("strong",{children:"every event"})," that occurs in the system. It acts as a universal listener that can respond to any event type."]})]}),d.jsxs("div",{className:"hook-card__schema-block",children:[d.jsx("div",{className:"title",children:"Global Hook Benefits"}),d.jsxs("div",{className:"hook-card__global-benefits",children:[d.jsxs("div",{className:"benefit",children:[d.jsx("span",{className:"icon",children:"🔍"}),d.jsx("span",{className:"text",children:"Monitor all system activity"})]}),d.jsxs("div",{className:"benefit",children:[d.jsx("span",{className:"icon",children:"📊"}),d.jsx("span",{className:"text",children:"Collect comprehensive metrics"})]}),d.jsxs("div",{className:"benefit",children:[d.jsx("span",{className:"icon",children:"🛡️"}),d.jsx("span",{className:"text",children:"Implement cross-cutting concerns"})]})]})]})]})]}):!e||e.length===0?d.jsxs("div",{className:"hook-card__section",children:[d.jsx("h4",{className:"hook-card__section__title",children:"📡 Target Event Details"}),d.jsxs("div",{className:"hook-card__not-found",children:[d.jsx("div",{className:"icon",children:"❌"}),d.jsx("h5",{className:"title",children:"Event Not Found"}),d.jsx("p",{className:"message",children:"No target events found for this hook."})]})]}):d.jsxs("div",{className:"hook-card__section",children:[d.jsx("h4",{className:"hook-card__section__title",children:"📡 Target Event Details"}),e.map(i=>d.jsxs("div",{children:[d.jsx("a",{href:`#element-${i.id}`,children:d.jsxs("div",{className:"hook-card__target-event",children:[d.jsxs("div",{className:"hook-card__target-event__header",children:[d.jsx("span",{className:"icon",children:"📡"}),d.jsx("h5",{className:"title",children:i.meta?.title||Te(i.id)})]}),d.jsx("div",{className:"hook-card__target-event__id",children:i.id}),i.meta?.description&&d.jsx("div",{className:"hook-card__target-event__description",children:i.meta.description})]})}),d.jsxs("div",{className:"hook-card__section__content",children:[d.jsxs("div",{className:"hook-card__schema-block",children:[d.jsx("div",{className:"title",children:"Payload Schema"}),d.jsx(al,{schemaString:i.payloadSchema})]}),d.jsxs("div",{className:"hook-card__schema-block",children:[d.jsx("div",{className:"title",children:"Event Statistics"}),d.jsxs("div",{className:"hook-card__event-stats",children:[d.jsxs("div",{className:"hook-card__event-stats__stat",children:[d.jsx("div",{className:"value value--emitters",children:t.getEmittersOfEvent(i.id).length}),d.jsx("div",{className:"label",children:"Emitters"})]}),d.jsxs("div",{className:"hook-card__event-stats__stat",children:[d.jsx("div",{className:"value value--hooks",children:t.getHooksOfEvent(i.id).length}),d.jsx("div",{className:"label",children:"Hooks"})]})]})]})]})]},i.id))]}),E2=({dependencies:n,emittedEvents:e})=>n.tasks.length===0&&n.resources.length===0&&e.length===0?null:d.jsxs("div",{className:"hook-card__dependencies",children:[d.jsx("h4",{className:"hook-card__dependencies__title",children:"🔗 Dependencies & Relations"}),d.jsxs("div",{className:"hook-card__dependencies__grid",children:[n.tasks.length>0&&d.jsxs("div",{className:"hook-card__dependencies__category",children:[d.jsx("h5",{children:"Task Dependencies"}),d.jsx("div",{className:"hook-card__dependencies__items",children:n.tasks.map(t=>d.jsxs("a",{href:`#element-${t.id}`,className:"hook-card__dependency-item hook-card__dependency-item--task hook-card__dependency-link",children:[d.jsx("div",{className:"title title--task",children:t.meta?.title||Te(t.id)}),d.jsx("div",{className:"id",children:t.id})]},t.id))})]}),n.resources.length>0&&d.jsxs("div",{className:"hook-card__dependencies__category",children:[d.jsx("h5",{children:"Resource Dependencies"}),d.jsx("div",{className:"hook-card__dependencies__items",children:n.resources.map(t=>d.jsxs("a",{href:`#element-${t.id}`,className:"hook-card__dependency-item hook-card__dependency-item--resource hook-card__dependency-link",children:[d.jsx("div",{className:"title title--resource",children:t.meta?.title||Te(t.id)}),d.jsx("div",{className:"id",children:t.id})]},t.id))})]}),e.length>0&&d.jsxs("div",{className:"hook-card__dependencies__category",children:[d.jsx("h5",{children:"Emitted Events"}),d.jsx("div",{className:"hook-card__dependencies__items",children:e.map(t=>d.jsxs("a",{href:`#element-${t.id}`,className:"hook-card__dependency-item hook-card__dependency-item--event hook-card__dependency-link",children:[d.jsx("div",{className:"title title--event",children:t.meta?.title||Te(t.id)}),d.jsx("div",{className:"id",children:t.id})]},t.id))})]})]})]}),M2=({hook:n,introspector:e})=>{const t=e.getDependencies(n),i=e.getEmittedEvents(n),s=e.getEventsByIds(n.events),r=n.events.includes("*");return d.jsxs("div",{id:`element-${n.id}`,className:"hook-card",children:[d.jsx(j2,{hook:n,emittedEventsCount:i.length,isGlobal:r}),d.jsxs("div",{className:"hook-card__content",children:[d.jsxs("div",{className:"hook-card__grid",children:[d.jsx("div",{children:d.jsx(T2,{hook:n,targetEvents:s,isGlobal:r,introspector:e})}),d.jsx("div",{children:d.jsx(N2,{isGlobal:r,targetEvents:s,introspector:e})})]}),d.jsx(E2,{dependencies:t,emittedEvents:i}),d.jsx(Uo,{element:n,introspector:e,className:"hook-card__tags-section"})]})]})},A2=({tag:n,introspector:e})=>[...n.tasks,...n.resources,...n.middlewares,...n.events,...n.hooks].length===0?null:d.jsxs("div",{className:"tag-card__relations",children:[d.jsx("h4",{className:"tag-card__relations__title",children:"🔗 Tagged Elements"}),d.jsxs("div",{className:"tag-card__relations__grid",children:[n.tasks.length>0&&d.jsxs("div",{className:"tag-card__relations__category",children:[d.jsx("h5",{children:"Tasks"}),d.jsx("div",{className:"tag-card__relations__items",children:n.tasks.map(i=>d.jsx("div",{className:"tag-card__relation-item tag-card__relation-item--task",children:d.jsxs("a",{href:`#element-${i.id}`,className:"tag-card__relation-link",children:[d.jsx("div",{className:"title title--task",children:i.meta?.title||Te(i.id)}),d.jsx("div",{className:"id",children:i.id})]})},i.id))})]}),n.resources.length>0&&d.jsxs("div",{className:"tag-card__relations__category",children:[d.jsx("h5",{children:"Resources"}),d.jsx("div",{className:"tag-card__relations__items",children:n.resources.map(i=>d.jsx("div",{className:"tag-card__relation-item tag-card__relation-item--resource",children:d.jsxs("a",{href:`#element-${i.id}`,className:"tag-card__relation-link",children:[d.jsx("div",{className:"title title--resource",children:i.meta?.title||Te(i.id)}),d.jsx("div",{className:"id",children:i.id})]})},i.id))})]}),n.middlewares.length>0&&d.jsxs("div",{className:"tag-card__relations__category",children:[d.jsx("h5",{children:"Middlewares"}),d.jsx("div",{className:"tag-card__relations__items",children:n.middlewares.map(i=>d.jsx("div",{className:"tag-card__relation-item tag-card__relation-item--middleware",children:d.jsxs("a",{href:`#element-${i.id}`,className:"tag-card__relation-link",children:[d.jsx("div",{className:"title title--middleware",children:i.meta?.title||Te(i.id)}),d.jsx("div",{className:"id",children:i.id})]})},i.id))})]}),n.events.length>0&&d.jsxs("div",{className:"tag-card__relations__category",children:[d.jsx("h5",{children:"Events"}),d.jsx("div",{className:"tag-card__relations__items",children:n.events.map(i=>d.jsx("div",{className:"tag-card__relation-item tag-card__relation-item--event",children:d.jsxs("a",{href:`#element-${i.id}`,className:"tag-card__relation-link",children:[d.jsx("div",{className:"title title--event",children:i.meta?.title||Te(i.id)}),d.jsx("div",{className:"id",children:i.id})]})},i.id))})]}),n.hooks.length>0&&d.jsxs("div",{className:"tag-card__relations__category",children:[d.jsx("h5",{children:"Hooks"}),d.jsx("div",{className:"tag-card__relations__items",children:n.hooks.map(i=>d.jsxs("a",{href:`#element-${i.id}`,className:"tag-card__relation-item tag-card__relation-item--hook tag-card__relation-link",children:[d.jsx("div",{className:"title title--hook",children:i.meta?.title||Te(i.id)}),d.jsx("div",{className:"id",children:i.id})]},i.id))})]})]})]}),R2=({tag:n,introspector:e})=>{const t=[...n.tasks,...n.resources,...n.middlewares,...n.events,...n.hooks],[i,s]=le.useState(!1),[r,o]=le.useState(""),[c,u]=le.useState(void 0),[f,p]=le.useState(null),[g,O]=le.useState(!1),[x,k]=le.useState(null),[S,w]=le.useState(null);async function P(){if(n?.id){s(!0),O(!0),k(null),o(n.meta?.title||Te(n.id)),u(n.filePath||void 0),w(n.filePath||null);try{const _=await rn(LE,{id:n.id});p(_?.tag?.fileContents??null)}catch(_){k(_?.message??"Failed to load file"),p(null)}finally{O(!1)}}}return d.jsxs("div",{id:`element-${n.id}`,className:"tag-card",children:[d.jsx("div",{className:"tag-card__header",children:d.jsx("div",{className:"tag-card__header-content",children:d.jsxs("div",{className:"main",children:[d.jsx("h3",{className:"tag-card__title",children:Te(n.id)}),d.jsx("div",{className:"tag-card__id",children:n.meta?.title||n.id})]})})}),d.jsxs("div",{className:"tag-card__content",children:[d.jsxs("div",{className:"tag-card__grid",children:[d.jsx("div",{children:d.jsxs("div",{className:"tag-card__section",children:[d.jsx("h4",{className:"tag-card__section__title",children:"Overview"}),d.jsxs("div",{className:"tag-card__section__content",children:[d.jsx("div",{className:"tag-card__summary",children:d.jsxs("div",{className:"tag-card__total",children:[d.jsx("span",{className:"value",children:t.length}),d.jsx("span",{className:"label",children:"Total Tagged Elements"})]})}),d.jsxs("div",{className:"tag-card__stats",children:[d.jsxs("div",{className:"tag-card__stat tag-card__stat--tasks",children:[d.jsx("div",{className:"tag-card__stat__value",children:n.tasks.length}),d.jsx("div",{className:"tag-card__stat__label",children:"Tasks"})]}),d.jsxs("div",{className:"tag-card__stat tag-card__stat--resources",children:[d.jsx("div",{className:"tag-card__stat__value",children:n.resources.length}),d.jsx("div",{className:"tag-card__stat__label",children:"Resources"})]}),d.jsxs("div",{className:"tag-card__stat tag-card__stat--events",children:[d.jsx("div",{className:"tag-card__stat__value",children:n.events.length}),d.jsx("div",{className:"tag-card__stat__label",children:"Events"})]}),d.jsxs("div",{className:"tag-card__stat tag-card__stat--middlewares",children:[d.jsx("div",{className:"tag-card__stat__value",children:n.middlewares.length}),d.jsx("div",{className:"tag-card__stat__label",children:"Middlewares"})]}),d.jsxs("div",{className:"tag-card__stat tag-card__stat--hooks",children:[d.jsx("div",{className:"tag-card__stat__value",children:n.hooks.length}),d.jsx("div",{className:"tag-card__stat__label",children:"Hooks"})]})]}),d.jsxs("div",{className:"tag-card__info-block",children:[d.jsx("div",{className:"label",children:"File Path:"}),d.jsx("div",{className:"value",children:n.filePath?d.jsx("a",{type:"button",onClick:P,title:"View file contents",children:Jn(n.filePath)}):Jn(n.filePath)})]})]})]})}),d.jsx("div",{children:d.jsxs("div",{className:"tag-card__section",children:[d.jsx("h4",{className:"tag-card__section__title",children:"Configuration Schema"}),d.jsx("div",{className:"tag-card__config",children:d.jsx(al,{schemaString:n.configSchema})})]})})]}),d.jsx(A2,{tag:n,introspector:e})]}),d.jsx(jn,{title:r,subtitle:c,isOpen:i,onClose:()=>s(!1),code:g?"Loading...":x?`Error: ${x}`:f,enableEdit:!!S,saveOnFile:S})]})},D2=({introspector:n,detailed:e=!1})=>{const[t,i]=B.useState("summary");le.useEffect(()=>{const w=setTimeout(()=>{window.dispatchEvent(new CustomEvent("docs:diagnostic-change"))},0);return()=>clearTimeout(w)},[]);const s=n.getDiagnostics(),r=n.getOrphanEvents(),o=n.getUnemittedEvents(),c=n.getUnusedMiddleware(),u=n.getOverrideConflicts(),f=s.filter(w=>w.severity==="error").length,p=s.filter(w=>w.severity==="warning").length,g=s.filter(w=>w.severity==="info").length,O=[{id:"summary",label:"Summary",count:s.length},{id:"errors",label:"Errors",count:f},{id:"warnings",label:"Warnings",count:p},{id:"orphans",label:"Orphan Events",count:r.length},{id:"unemitted",label:"Unemitted Events",count:o.length},{id:"unused",label:"Unused Middleware",count:c.length},{id:"conflicts",label:"Override Conflicts",count:u.length}],x=(w,P,_,E,C,$)=>d.jsxs("div",{className:`diagnostics-panel__summary-card ${$||""}`,children:[d.jsxs("div",{className:"diagnostics-panel__summary-card__header",children:[d.jsx("span",{className:"icon",children:E}),d.jsx("h4",{children:w})]}),d.jsx("div",{className:"diagnostics-panel__summary-card__value",children:P}),d.jsx("div",{className:"diagnostics-panel__summary-card__description",children:C})]}),k=w=>{const P=w.nodeId?"a":"div",_=w.nodeId?{href:`#element-${w.nodeId}`,className:`diagnostics-panel__item diagnostics-panel__item--${w.severity} diagnostics-panel__item--clickable`}:{className:`diagnostics-panel__item diagnostics-panel__item--${w.severity}`};return d.jsx(P,{..._,children:d.jsxs("div",{className:"diagnostics-panel__item-content",children:[d.jsx("span",{className:"icon",children:o_(w.severity)}),d.jsxs("div",{className:"main",children:[d.jsxs("div",{className:"diagnostics-panel__item-header",children:[d.jsx("span",{className:`diagnostics-panel__severity-badge diagnostics-panel__severity-badge--${w.severity}`,children:w.severity}),d.jsx("span",{className:"diagnostics-panel__code-badge",children:w.code})]}),d.jsx("div",{className:"diagnostics-panel__message",children:w.message}),w.nodeId&&d.jsxs("div",{className:"diagnostics-panel__node-info",children:[d.jsxs("div",{children:[d.jsx("strong",{children:"Node:"})," ",Te(w.nodeId)]}),w.nodeKind&&d.jsxs("div",{children:[d.jsx("strong",{children:"Type:"})," ",w.nodeKind]})]})]}),w.nodeId&&d.jsx("div",{className:"diagnostics-panel__click-indicator",children:"🔗"})]})},`${w.code}-${w.nodeId||"global"}`)},S=(w,P,_,E,C,$,A)=>d.jsxs("div",{className:"diagnostics-panel__special-section",children:[d.jsxs("h4",{children:[d.jsx("span",{className:"icon",children:_}),P," (",w.length,")"]}),w.length===0?d.jsxs("div",{className:"diagnostics-panel__empty-state",children:[d.jsx("div",{className:"celebration",children:"🎉"}),"No ",P.toLowerCase()," found. Great job!"]}):d.jsx("div",{className:"diagnostics-panel__special-section__items",children:w.map((Z,oe)=>{const ee=C(Z),J=!!(ee&&String(ee).trim()),K=J?String(ee):"(unknown)",R=J?"a":"div",H=J?{href:`#element-${K}`,className:`diagnostics-panel__special-section__item diagnostics-panel__special-section__item--clickable ${A||""}`}:{className:`diagnostics-panel__special-section__item ${A||""}`};return d.jsxs(R,{...H,children:[d.jsx("div",{className:"title",children:$?$(Z):Te(K)}),d.jsx("div",{className:"id",children:K}),J&&d.jsx("div",{className:"diagnostics-panel__click-indicator",children:"🔗"})]},oe)})})]});return e?d.jsxs("div",{className:"diagnostics-panel",children:[d.jsx("div",{className:"diagnostics-panel__tabs",children:O.map(w=>d.jsxs("button",{onClick:()=>i(w.id),className:`diagnostics-panel__tab ${t===w.id?"diagnostics-panel__tab--active":""}`,children:[w.label,w.count>0&&d.jsx("span",{className:"diagnostics-panel__tab-count",children:w.count})]},w.id))}),d.jsxs("div",{className:"diagnostics-panel__content",children:[t==="summary"&&d.jsxs("div",{children:[d.jsxs("div",{className:"diagnostics-panel__detailed-grid",children:[x("Total Issues",s.length,"#6c757d","📊","All diagnostic items","diagnostics-panel__summary-card--total"),x("Errors",f,"#dc3545","❌","Critical issues requiring attention","diagnostics-panel__summary-card--errors"),x("Warnings",p,"#ffc107","⚠️","Potential problems to review","diagnostics-panel__summary-card--warnings"),x("Information",g,"#17a2b8","ℹ️","Informational messages","diagnostics-panel__summary-card--info")]}),s.length>0&&d.jsxs("div",{children:[d.jsx("h4",{children:"Recent Diagnostics"}),d.jsx("div",{className:"diagnostics-panel__items",children:s.slice(0,5).map(k)})]})]}),t==="errors"&&d.jsx("div",{children:d.jsxs("div",{className:"diagnostics-panel__items",children:[s.filter(w=>w.severity==="error").map(k),f===0&&d.jsxs("div",{className:"diagnostics-panel__success-state",children:[d.jsx("div",{className:"icon",children:"✅"}),d.jsx("h4",{children:"No Errors Found!"}),d.jsx("p",{children:"Your application has no critical errors."})]})]})}),t==="warnings"&&d.jsx("div",{children:d.jsxs("div",{className:"diagnostics-panel__items",children:[s.filter(w=>w.severity==="warning").map(k),p===0&&d.jsxs("div",{className:"diagnostics-panel__success-state",children:[d.jsx("div",{className:"icon",children:"👍"}),d.jsx("h4",{children:"No Warnings!"}),d.jsx("p",{children:"No potential issues detected."})]})]})}),t==="orphans"&&S(r,"Orphan Events","👻","#6f42c1",w=>w.id,w=>`${Te(w.id)} (No listeners)`,"diagnostics-panel__special-section__item--orphan"),t==="unemitted"&&S(o,"Unemitted Events","📤","#fd7e14",w=>w.id,w=>`${Te(w.id)} (No emitters)`,"diagnostics-panel__special-section__item--unused"),t==="unused"&&S(c,"Unused Middleware","🔗","#6c757d",w=>w.id,w=>`${Te(w.id)} (Not used)`,"diagnostics-panel__special-section__item--unused"),t==="conflicts"&&d.jsxs("div",{className:"diagnostics-panel__special-section",children:[d.jsxs("h4",{children:[d.jsx("span",{className:"icon",children:"⚔️"}),"Override Conflicts (",u.length,")"]}),u.length===0?d.jsxs("div",{className:"diagnostics-panel__empty-state",children:[d.jsx("div",{className:"celebration",children:"🎉"}),"No override conflicts found. Great job!"]}):d.jsx("div",{className:"diagnostics-panel__special-section__items",children:u.map((w,P)=>d.jsxs("div",{className:"diagnostics-panel__special-section__item diagnostics-panel__special-section__item--conflict diagnostics-panel__conflict-item",children:[d.jsxs("div",{className:"title",children:[d.jsx("a",{href:`#element-${w.targetId}`,className:"diagnostics-panel__conflict-link",children:Te(w.targetId)})," ← overridden by → ",d.jsx("a",{href:`#element-${w.by}`,className:"diagnostics-panel__conflict-link",children:Te(w.by)})]}),d.jsxs("div",{className:"id",children:["Target: ",w.targetId]})]},P))})]})]})]}):d.jsxs("div",{className:"diagnostics-panel__summary-grid",children:[x("Errors",f,"#dc3545","❌","Critical issues","diagnostics-panel__summary-card--errors"),x("Warnings",p,"#ffc107","⚠️","Potential problems","diagnostics-panel__summary-card--warnings"),x("Orphan Events",r.length,"#6f42c1","👻","Events with no listeners","diagnostics-panel__summary-card--orphans"),x("Unused Middleware",c.length,"#fd7e14","🔗","Middleware not in use","diagnostics-panel__summary-card--unused"),x("Override Conflicts",u.length,"#dc3545","⚔️","Resource override issues","diagnostics-panel__summary-card--conflicts")]})},L2=({data:n})=>{const[e,t]=B.useState(()=>{const u=[],f=(p,g,O)=>{O>=4||typeof p!="object"||p===null||(u.push(g),Object.keys(p).forEach(x=>{f(p[x],`${g}.${x}`,O+1)}))};return f(n,"root",0),u}),[i,s]=B.useState([]),r=u=>{t(f=>f.includes(u)?f.filter(p=>p!==u):[...f,u])},o=u=>{s(f=>f.includes(u)?f.filter(p=>p!==u):[...f,u])},c=(u,f)=>{if(typeof u=="object"&&u!==null){const p=Array.isArray(u),g=Object.keys(u),O=e.includes(f);return d.jsxs("div",{className:`json-node ${O?"expanded":""}`,children:[d.jsx("span",{className:"json-toggle",onClick:()=>r(f),children:O?"▼":"▶"}),d.jsx("span",{className:"json-bracket",children:p?"[":"{"}),O&&d.jsx("div",{className:"json-children",children:g.map((x,k)=>d.jsxs("div",{className:"json-key-value",children:[!p&&d.jsxs("span",{className:"json-key",children:['"',x,'":']}),c(u[x],`${f}.${x}`),k<g.length-1&&d.jsx("span",{children:","})]},k))}),!O&&d.jsx("span",{className:"json-ellipsis",children:"..."}),d.jsx("span",{className:"json-bracket",children:p?"]":"}"})]})}else{const p=JSON.stringify(u),g=100;if(typeof u=="string"&&p.length>g){const O=i.includes(f),x=O?p:p.substring(0,g);return d.jsxs("span",{className:`json-value json-value--${typeof u}`,children:[x,!O&&d.jsx("span",{className:"json-expand-text",onClick:()=>o(f),style:{cursor:"pointer",color:"#0066cc",marginLeft:"4px"},children:"..."}),O&&p.length>g&&d.jsx("span",{className:"json-collapse-text",onClick:()=>o(f),style:{cursor:"pointer",color:"#0066cc",marginLeft:"4px"},children:"[collapse]"})]})}else return d.jsx("span",{className:`json-value json-value--${typeof u}`,children:p})}};return!n||typeof n=="object"&&Object.keys(n).length===0?null:d.jsx("div",{className:"json-viewer",children:c(n,"root")})},vf=n=>{const e=n.toLowerCase();return e==="fatal"||e==="error"?"error":e==="warn"||e==="warning"?"warn":e==="info"?"info":e==="debug"?"debug":e==="trace"?"trace":"default"},Ly=(n,e=6)=>n?n.length>e?n.slice(-e):n:"",I2=({logs:n})=>{const[e,t]=B.useState(!1),[i,s]=B.useState(null),r=f=>{const p=new Date(f);return`${p.toLocaleDateString()} ${p.toLocaleTimeString()}`},o=f=>{try{const p=JSON.parse(f);return typeof p=="object"&&p!==null?p:null}catch{return null}},c=B.useMemo(()=>[...e?n:n.slice(-50)].reverse(),[n,e]),u=B.useMemo(()=>i===null?null:c[i]??null,[i,c]);return B.useEffect(()=>{const f=p=>{p.key==="Escape"&&(i!==null?s(null):e&&t(!1))};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[e,i]),d.jsxs("div",{className:"recent-logs live-section",children:[d.jsxs("div",{className:"recent-logs__header",children:[d.jsxs("h4",{className:"recent-logs__title",children:["Recent Logs (",n.length,")"]}),d.jsx("button",{type:"button",className:"recent-logs__toggle","aria-label":e?"Exit full screen":"Enter full screen",title:e?"Exit full screen":"Enter full screen",onClick:()=>t(f=>!f),children:d.jsx("span",{children:e?"Exit":"Expand"})})]}),d.jsx("div",{className:`recent-logs__list ${e?"recent-logs__list--expanded":""}`,children:c.map((f,p)=>d.jsxs("div",{className:"recent-logs__row recent-logs__row--compact",onClick:()=>s(p),children:[d.jsx("span",{className:"recent-logs__time",children:new Date(f.timestampMs).toLocaleTimeString()}),d.jsx("span",{className:`recent-logs__level recent-logs__level--${vf(f.level)}`,children:f.level}),d.jsx("span",{className:"recent-logs__message",children:f.message}),f.correlationId&&d.jsx("span",{className:"recent-logs__corr",title:f.correlationId,children:Ly(f.correlationId)}),f.sourceId&&d.jsxs("a",{href:`#element-${f.sourceId}`,onClick:g=>g.stopPropagation(),title:`Go to source #${f.sourceId}`,className:"recent-logs__source",children:["#",f.sourceId]}),d.jsx("button",{type:"button",className:"recent-logs__action",onClick:g=>{g.stopPropagation(),s(p)},title:"View details",children:"View"})]},`${f.timestampMs}-${p}`))}),e&&Fc.createPortal(d.jsx("div",{role:"dialog","aria-modal":"true",className:"recent-logs-fs__overlay",onClick:()=>t(!1),children:d.jsxs("div",{className:"recent-logs-fs__panel",onClick:f=>f.stopPropagation(),children:[d.jsxs("div",{className:"recent-logs-fs__header",children:[d.jsx("h3",{className:"recent-logs-fs__title",children:"Recent Logs - Full Screen"}),d.jsx("button",{className:"recent-logs-fs__close",onClick:()=>t(!1),children:"Close"})]}),d.jsx("div",{className:"recent-logs-fs__content",children:c.map((f,p)=>d.jsxs("div",{className:"recent-logs__row recent-logs__row--fullscreen",onClick:()=>s(p),children:[d.jsx("span",{className:"recent-logs-fs__time",children:r(f.timestampMs)}),d.jsx("span",{className:`recent-logs-fs__level recent-logs-fs__level--${vf(f.level)}`,children:f.level}),d.jsx("span",{className:"recent-logs-fs__message",children:f.message}),f.correlationId&&d.jsx("span",{className:"recent-logs-fs__corr",title:`Correlation ID: ${f.correlationId}`,children:Ly(f.correlationId)}),f.sourceId&&d.jsxs("a",{href:`#element-${f.sourceId}`,onClick:g=>g.stopPropagation(),title:`Go to source #${f.sourceId}`,className:"recent-logs-fs__source",children:["#",f.sourceId]}),d.jsx("button",{className:"recent-logs-fs__action",onClick:g=>{g.stopPropagation(),s(p)},children:"Details"})]},`fs-${f.timestampMs}-${p}`))})]})}),document.body),u&&Fc.createPortal(d.jsx("div",{role:"dialog","aria-modal":"true",className:"recent-logs-modal__overlay",onClick:()=>s(null),children:d.jsxs("div",{className:"recent-logs-modal__panel",onClick:f=>f.stopPropagation(),children:[d.jsxs("div",{className:"recent-logs-modal__header",children:[d.jsx("h3",{className:"recent-logs-modal__title",children:"Log Details"}),d.jsx("button",{className:"recent-logs-modal__close",onClick:()=>s(null),children:"Close"})]}),d.jsx("div",{className:"recent-logs-modal__content",children:d.jsxs("div",{className:"recent-logs-modal__grid",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"recent-logs-modal__field",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Timestamp"}),d.jsx("div",{className:"recent-logs-modal__value recent-logs-modal__value--mono",children:r(u.timestampMs)})]}),d.jsxs("div",{className:"recent-logs-modal__field",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Level"}),d.jsx("span",{className:`recent-logs-modal__level recent-logs-modal__level--${vf(u.level)}`,children:u.level})]}),u.correlationId&&d.jsxs("div",{className:"recent-logs-modal__field",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Correlation ID"}),d.jsx("div",{className:"recent-logs-modal__value recent-logs-modal__value--mono recent-logs-modal__value--break",children:u.correlationId})]}),u.sourceId&&d.jsxs("div",{className:"recent-logs-modal__field",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Source"}),d.jsxs("a",{href:`#element-${u.sourceId}`,className:"recent-logs-modal__source",children:["#",u.sourceId]})]})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"recent-logs-modal__field",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Message"}),d.jsx("div",{className:"recent-logs-modal__message",children:u.message})]}),u.data&&u.data!=="{}"&&d.jsxs("div",{children:[d.jsxs("div",{className:"recent-logs-modal__data-header",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Data"}),d.jsx("button",{className:"recent-logs-modal__copy",onClick:()=>{const f=u.data??"";navigator.clipboard.writeText(f).catch(()=>{})},children:"Copy"})]}),d.jsx("div",{className:"recent-logs-modal__data",children:(()=>{const f=o(u.data);return f?d.jsx(L2,{data:f}):d.jsx("pre",{className:"recent-logs-modal__pre",children:u.data})})()})]})]})]})})]})}),document.body)]})},Z2=({emissions:n,detailed:e=!1})=>{const[t,i]=B.useState(null),[s,r]=B.useState(null),[o,c]=B.useState(!1),u=(g,O)=>{i(g),r(O),c(!0)},f=()=>{c(!1),i(null),r(null)},p=g=>new Date(g).toLocaleTimeString();return d.jsxs("div",{className:"recent-events",children:[d.jsxs("h4",{children:["Recent Event Emissions (",n.length,")"]}),d.jsx("div",{className:"live-entries",children:n.length===0?d.jsx("div",{className:"live-entry",children:d.jsx("span",{children:"No recent event emissions"})}):d.jsx(d.Fragment,{children:n.slice(-10).reverse().map((g,O)=>d.jsxs("div",{className:"live-entry live-entry--emission",children:[d.jsx("span",{className:"entry-time",children:p(g.timestampMs)}),d.jsx("a",{href:`#element-${g.eventId}`,className:"entry-event",children:g.eventId}),g.emitterId&&d.jsxs("span",{className:"entry-emitter",children:["from"," ",d.jsx("a",{href:`#element-${g.emitterId}`,className:"entry-emitter--link",children:g.emitterId})]}),g.payload&&d.jsx("button",{className:"clean-button",onClick:()=>u(JSON.stringify(JSON.parse(g.payload),null,2),g.eventId),children:"View Payload"})]},`${g.timestampMs}-${O}`))})}),d.jsx(jn,{title:"Event Payload",subtitle:s||void 0,isOpen:o,onClose:f,code:t})]})},X2=({runs:n,errors:e,detailed:t=!1})=>{const[i,s]=B.useState(null),[r,o]=B.useState(null),[c,u]=B.useState(!1),f=(O,x)=>{s(O),o(x),u(!0)},p=()=>{u(!1),s(null),o(null)},g=O=>new Date(O).toLocaleTimeString();return d.jsxs("div",{className:"recent-runs",children:[e.length>0&&d.jsxs("div",{className:"errors-section",children:[d.jsxs("h4",{children:["Recent Errors (",e.length,")"]}),d.jsx("div",{className:"live-entries",children:e.slice(-10).reverse().map((O,x)=>d.jsxs("div",{className:"live-entry live-entry--error",children:[d.jsx("span",{className:"entry-time",children:g(O.timestampMs)}),d.jsxs("a",{href:`#element-${O.sourceId}`,className:"entry-source",children:[O.sourceKind,":",O.sourceId]}),O.stack&&d.jsxs("div",{className:"entry-actions",children:[d.jsx("button",{className:"clean-button",onClick:()=>f(O.stack,O.sourceId),children:"View Stack Trace"}),d.jsx("button",{className:"clean-button",title:"Add to AI",onClick:()=>{const S=`I have the following error on @${O.sourceResolved&&O.sourceResolved.id||O.sourceId}: ${O.message} with stack:
|
|
208
|
+
`;try{const C=await rn(E,{eventId:n.id,inputJson:_?.trim()||void 0,evalInput:!1});return{output:C.invokeEvent.success?"Event invoked successfully":C.invokeEvent.error??void 0,error:C.invokeEvent.error??void 0}}catch(C){return{error:C?.message??String(C)}}}})]})},j2=({hook:n,emittedEventsCount:e,isGlobal:t})=>d.jsx("div",{className:"hook-card__header",children:d.jsxs("div",{className:"hook-card__header-content",children:[d.jsxs("div",{className:"main",children:[d.jsxs("h3",{className:"hook-card__title",children:[t?"🌐":"🪝"," ",n.meta?.title||Te(n.id),t&&d.jsx("span",{className:"hook-card__global-badge",children:"GLOBAL"})]}),d.jsx("div",{className:"hook-card__id",children:n.id}),n.meta?.description&&d.jsx("p",{className:"hook-card__description",children:n.meta.description})]}),d.jsxs("div",{className:"hook-card__stats",children:[n.hookOrder!==null&&n.hookOrder!==void 0&&d.jsxs("div",{className:"hook-card__order-badge",children:["#",n.hookOrder]}),d.jsxs("div",{className:"hook-card__stat-badge",children:[d.jsx("span",{className:"icon",children:"📤"}),d.jsx("span",{className:"count",children:e})]})]})]})}),T2=({hook:n,targetEvents:e,isGlobal:t,introspector:i})=>{const s=()=>n.hookOrder===null||n.hookOrder===void 0?"Default":n.hookOrder.toString(),[r,o]=le.useState(!1),[c,u]=le.useState(null),[f,p]=le.useState(!1),[g,O]=le.useState(null);async function x(){if(n?.id){o(!0),p(!0),O(null);try{const k=await rn(DE,{id:n.id});u(k?.hook?.fileContents??null)}catch(k){O(k?.message??"Failed to load file"),u(null)}finally{p(!1)}}}return d.jsxs("div",{className:"hook-card__section",children:[d.jsx("h4",{className:"hook-card__section__title",children:"📋 Overview"}),d.jsxs("div",{className:"hook-card__section__content",children:[d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"File Path:"}),d.jsx("div",{className:"value",children:d.jsx("a",{onClick:x,children:Jn(n.filePath)})})]}),n.registeredBy&&d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"Registered By:"}),d.jsx("div",{className:"value",children:d.jsx("a",{href:`#element-${n.registeredBy}`,className:"hook-card__registrar-link",children:n.registeredBy})})]}),d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"Target Events:"}),d.jsx("div",{className:"value",children:t?d.jsxs("div",{className:"hook-card__global-event",children:[d.jsx("span",{className:"global-indicator",children:"🌐 ALL EVENTS"}),d.jsx("div",{className:"global-description",children:"This hook listens to every event in the system"})]}):d.jsx(d.Fragment,{children:e.map(k=>d.jsxs("div",{children:[d.jsx("a",{href:`#element-${k.id}`,className:"hook-card__event-link",children:Te(k.id)}),k.meta?.title&&d.jsxs("div",{children:["(",k.meta.title,")"]})]},k.id))})})]}),d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"Execution Order:"}),d.jsxs("div",{className:"value value--order",children:[s(),d.jsx("div",{className:"order-description",children:n.hookOrder===null||n.hookOrder===void 0?"Uses default ordering":`Priority level ${n.hookOrder}`})]})]}),d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"Emits Events:"}),d.jsx("div",{className:"value",children:a_(n.emits)})]}),n.tags&&n.tags.length>0&&d.jsxs("div",{className:"hook-card__info-block",children:[d.jsx("div",{className:"label",children:"Tags:"}),d.jsx("div",{className:"value",children:d.jsx("div",{className:"hook-card__tags",children:i.getTagsByIds(n.tags).map(k=>d.jsx("a",{href:`#element-${k.id}`,className:"clean-button",children:Te(k.id)},k.id))})})]}),n.overriddenBy&&d.jsxs("div",{className:"hook-card__alert hook-card__alert--warning",children:[d.jsx("div",{className:"title",children:"⚠️ Overridden By:"}),d.jsx("div",{className:"content",children:n.overriddenBy})]})]}),d.jsx(jn,{title:n.meta?.title||Te(n.id),subtitle:n.filePath||void 0,isOpen:r,onClose:()=>o(!1),code:f?"Loading...":g?`Error: ${g}`:c,enableEdit:!!n.filePath,saveOnFile:n.filePath||null})]})},N2=({isGlobal:n,targetEvents:e,introspector:t})=>n?d.jsxs("div",{className:"hook-card__section",children:[d.jsx("h4",{className:"hook-card__section__title",children:"🌐 Global Hook Details"}),d.jsxs("div",{className:"hook-card__global-info",children:[d.jsxs("div",{className:"hook-card__global-message",children:[d.jsxs("div",{className:"hook-card__global-message__header",children:[d.jsx("span",{className:"icon",children:"🌐"}),d.jsx("h5",{className:"title",children:"Universal Event Listener"})]}),d.jsxs("div",{className:"hook-card__global-message__content",children:["This hook is triggered by ",d.jsx("strong",{children:"every event"})," that occurs in the system. It acts as a universal listener that can respond to any event type."]})]}),d.jsxs("div",{className:"hook-card__schema-block",children:[d.jsx("div",{className:"title",children:"Global Hook Benefits"}),d.jsxs("div",{className:"hook-card__global-benefits",children:[d.jsxs("div",{className:"benefit",children:[d.jsx("span",{className:"icon",children:"🔍"}),d.jsx("span",{className:"text",children:"Monitor all system activity"})]}),d.jsxs("div",{className:"benefit",children:[d.jsx("span",{className:"icon",children:"📊"}),d.jsx("span",{className:"text",children:"Collect comprehensive metrics"})]}),d.jsxs("div",{className:"benefit",children:[d.jsx("span",{className:"icon",children:"🛡️"}),d.jsx("span",{className:"text",children:"Implement cross-cutting concerns"})]})]})]})]})]}):!e||e.length===0?d.jsxs("div",{className:"hook-card__section",children:[d.jsx("h4",{className:"hook-card__section__title",children:"📡 Target Event Details"}),d.jsxs("div",{className:"hook-card__not-found",children:[d.jsx("div",{className:"icon",children:"❌"}),d.jsx("h5",{className:"title",children:"Event Not Found"}),d.jsx("p",{className:"message",children:"No target events found for this hook."})]})]}):d.jsxs("div",{className:"hook-card__section",children:[d.jsx("h4",{className:"hook-card__section__title",children:"📡 Target Event Details"}),e.map(i=>d.jsxs("div",{children:[d.jsx("a",{href:`#element-${i.id}`,children:d.jsxs("div",{className:"hook-card__target-event",children:[d.jsxs("div",{className:"hook-card__target-event__header",children:[d.jsx("span",{className:"icon",children:"📡"}),d.jsx("h5",{className:"title",children:i.meta?.title||Te(i.id)})]}),d.jsx("div",{className:"hook-card__target-event__id",children:i.id}),i.meta?.description&&d.jsx("div",{className:"hook-card__target-event__description",children:i.meta.description})]})}),d.jsxs("div",{className:"hook-card__section__content",children:[d.jsxs("div",{className:"hook-card__schema-block",children:[d.jsx("div",{className:"title",children:"Payload Schema"}),d.jsx(al,{schemaString:i.payloadSchema})]}),d.jsxs("div",{className:"hook-card__schema-block",children:[d.jsx("div",{className:"title",children:"Event Statistics"}),d.jsxs("div",{className:"hook-card__event-stats",children:[d.jsxs("div",{className:"hook-card__event-stats__stat",children:[d.jsx("div",{className:"value value--emitters",children:t.getEmittersOfEvent(i.id).length}),d.jsx("div",{className:"label",children:"Emitters"})]}),d.jsxs("div",{className:"hook-card__event-stats__stat",children:[d.jsx("div",{className:"value value--hooks",children:t.getHooksOfEvent(i.id).length}),d.jsx("div",{className:"label",children:"Hooks"})]})]})]})]})]},i.id))]}),E2=({dependencies:n,emittedEvents:e})=>n.tasks.length===0&&n.resources.length===0&&e.length===0?null:d.jsxs("div",{className:"hook-card__dependencies",children:[d.jsx("h4",{className:"hook-card__dependencies__title",children:"🔗 Dependencies & Relations"}),d.jsxs("div",{className:"hook-card__dependencies__grid",children:[n.tasks.length>0&&d.jsxs("div",{className:"hook-card__dependencies__category",children:[d.jsx("h5",{children:"Task Dependencies"}),d.jsx("div",{className:"hook-card__dependencies__items",children:n.tasks.map(t=>d.jsxs("a",{href:`#element-${t.id}`,className:"hook-card__dependency-item hook-card__dependency-item--task hook-card__dependency-link",children:[d.jsx("div",{className:"title title--task",children:t.meta?.title||Te(t.id)}),d.jsx("div",{className:"id",children:t.id})]},t.id))})]}),n.resources.length>0&&d.jsxs("div",{className:"hook-card__dependencies__category",children:[d.jsx("h5",{children:"Resource Dependencies"}),d.jsx("div",{className:"hook-card__dependencies__items",children:n.resources.map(t=>d.jsxs("a",{href:`#element-${t.id}`,className:"hook-card__dependency-item hook-card__dependency-item--resource hook-card__dependency-link",children:[d.jsx("div",{className:"title title--resource",children:t.meta?.title||Te(t.id)}),d.jsx("div",{className:"id",children:t.id})]},t.id))})]}),e.length>0&&d.jsxs("div",{className:"hook-card__dependencies__category",children:[d.jsx("h5",{children:"Emitted Events"}),d.jsx("div",{className:"hook-card__dependencies__items",children:e.map(t=>d.jsxs("a",{href:`#element-${t.id}`,className:"hook-card__dependency-item hook-card__dependency-item--event hook-card__dependency-link",children:[d.jsx("div",{className:"title title--event",children:t.meta?.title||Te(t.id)}),d.jsx("div",{className:"id",children:t.id})]},t.id))})]})]})]}),M2=({hook:n,introspector:e})=>{const t=e.getDependencies(n),i=e.getEmittedEvents(n),s=e.getEventsByIds(n.events),r=n.events.includes("*");return d.jsxs("div",{id:`element-${n.id}`,className:"hook-card",children:[d.jsx(j2,{hook:n,emittedEventsCount:i.length,isGlobal:r}),d.jsxs("div",{className:"hook-card__content",children:[d.jsxs("div",{className:"hook-card__grid",children:[d.jsx("div",{children:d.jsx(T2,{hook:n,targetEvents:s,isGlobal:r,introspector:e})}),d.jsx("div",{children:d.jsx(N2,{isGlobal:r,targetEvents:s,introspector:e})})]}),d.jsx(E2,{dependencies:t,emittedEvents:i}),d.jsx(Uo,{element:n,introspector:e,className:"hook-card__tags-section"})]})]})},A2=({tag:n,introspector:e})=>[...n.tasks,...n.resources,...n.middlewares,...n.events,...n.hooks].length===0?null:d.jsxs("div",{className:"tag-card__relations",children:[d.jsx("h4",{className:"tag-card__relations__title",children:"🔗 Tagged Elements"}),d.jsxs("div",{className:"tag-card__relations__grid",children:[n.tasks.length>0&&d.jsxs("div",{className:"tag-card__relations__category",children:[d.jsx("h5",{children:"Tasks"}),d.jsx("div",{className:"tag-card__relations__items",children:n.tasks.map(i=>{const s=i.tagsDetailed?.find(r=>r.id===n.id)?.config;return d.jsxs("div",{className:"tag-card__relation-item tag-card__relation-item--task",children:[d.jsxs("a",{href:`#element-${i.id}`,className:"tag-card__relation-link",children:[d.jsx("div",{className:"title title--task",children:i.meta?.title||Te(i.id)}),d.jsx("div",{className:"id",children:i.id})]}),s&&d.jsxs("div",{className:"tag-card__relation-config",children:[d.jsx("div",{className:"config-title",children:"Configuration:"}),d.jsx("pre",{className:"config-block",children:s})]})]},i.id)})})]}),n.resources.length>0&&d.jsxs("div",{className:"tag-card__relations__category",children:[d.jsx("h5",{children:"Resources"}),d.jsx("div",{className:"tag-card__relations__items",children:n.resources.map(i=>{const s=i.tagsDetailed?.find(r=>r.id===n.id)?.config;return d.jsxs("div",{className:"tag-card__relation-item tag-card__relation-item--resource",children:[d.jsxs("a",{href:`#element-${i.id}`,className:"tag-card__relation-link",children:[d.jsx("div",{className:"title title--resource",children:i.meta?.title||Te(i.id)}),d.jsx("div",{className:"id",children:i.id})]}),s&&d.jsxs("div",{className:"tag-card__relation-config",children:[d.jsx("div",{className:"config-title",children:"Configuration:"}),d.jsx("pre",{className:"config-block",children:s})]})]},i.id)})})]}),n.middlewares.length>0&&d.jsxs("div",{className:"tag-card__relations__category",children:[d.jsx("h5",{children:"Middlewares"}),d.jsx("div",{className:"tag-card__relations__items",children:n.middlewares.map(i=>{const s=i.tagsDetailed?.find(r=>r.id===n.id)?.config;return d.jsxs("div",{className:"tag-card__relation-item tag-card__relation-item--middleware",children:[d.jsxs("a",{href:`#element-${i.id}`,className:"tag-card__relation-link",children:[d.jsx("div",{className:"title title--middleware",children:i.meta?.title||Te(i.id)}),d.jsx("div",{className:"id",children:i.id})]}),s&&d.jsxs("div",{className:"tag-card__relation-config",children:[d.jsx("div",{className:"config-title",children:"Configuration:"}),d.jsx("pre",{className:"config-block",children:s})]})]},i.id)})})]}),n.events.length>0&&d.jsxs("div",{className:"tag-card__relations__category",children:[d.jsx("h5",{children:"Events"}),d.jsx("div",{className:"tag-card__relations__items",children:n.events.map(i=>{const s=i.tagsDetailed?.find(r=>r.id===n.id)?.config;return d.jsxs("div",{className:"tag-card__relation-item tag-card__relation-item--event",children:[d.jsxs("a",{href:`#element-${i.id}`,className:"tag-card__relation-link",children:[d.jsx("div",{className:"title title--event",children:i.meta?.title||Te(i.id)}),d.jsx("div",{className:"id",children:i.id})]}),s&&d.jsxs("div",{className:"tag-card__relation-config",children:[d.jsx("div",{className:"config-title",children:"Configuration:"}),d.jsx("pre",{className:"config-block",children:s})]})]},i.id)})})]}),n.hooks.length>0&&d.jsxs("div",{className:"tag-card__relations__category",children:[d.jsx("h5",{children:"Hooks"}),d.jsx("div",{className:"tag-card__relations__items",children:n.hooks.map(i=>{const s=i.tagsDetailed?.find(r=>r.id===n.id)?.config;return d.jsxs("div",{className:"tag-card__relation-item tag-card__relation-item--hook",children:[d.jsxs("a",{href:`#element-${i.id}`,className:"tag-card__relation-link",children:[d.jsx("div",{className:"title title--hook",children:i.meta?.title||Te(i.id)}),d.jsx("div",{className:"id",children:i.id})]}),s&&d.jsxs("div",{className:"tag-card__relation-config",children:[d.jsx("div",{className:"config-title",children:"Configuration:"}),d.jsx("pre",{className:"config-block",children:s})]})]},i.id)})})]})]})]}),R2=({tag:n,introspector:e})=>{const t=[...n.tasks,...n.resources,...n.middlewares,...n.events,...n.hooks],[i,s]=le.useState(!1),[r,o]=le.useState(""),[c,u]=le.useState(void 0),[f,p]=le.useState(null),[g,O]=le.useState(!1),[x,k]=le.useState(null),[S,w]=le.useState(null);async function P(){if(n?.id){s(!0),O(!0),k(null),o(n.meta?.title||Te(n.id)),u(n.filePath||void 0),w(n.filePath||null);try{const _=await rn(LE,{id:n.id});p(_?.tag?.fileContents??null)}catch(_){k(_?.message??"Failed to load file"),p(null)}finally{O(!1)}}}return d.jsxs("div",{id:`element-${n.id}`,className:"tag-card",children:[d.jsx("div",{className:"tag-card__header",children:d.jsx("div",{className:"tag-card__header-content",children:d.jsxs("div",{className:"main",children:[d.jsx("h3",{className:"tag-card__title",children:n.meta?.title||Te(n.id)}),d.jsx("div",{className:"tag-card__id",children:n.id}),n.meta?.description&&d.jsx("p",{className:"tag-card__description",children:n.meta.description})]})})}),d.jsxs("div",{className:"tag-card__content",children:[d.jsxs("div",{className:"tag-card__grid",children:[d.jsx("div",{children:d.jsxs("div",{className:"tag-card__section",children:[d.jsx("h4",{className:"tag-card__section__title",children:"Overview"}),d.jsxs("div",{className:"tag-card__section__content",children:[d.jsx("div",{className:"tag-card__summary",children:d.jsxs("div",{className:"tag-card__total",children:[d.jsx("span",{className:"value",children:t.length}),d.jsx("span",{className:"label",children:"Total Tagged Elements"})]})}),d.jsxs("div",{className:"tag-card__stats",children:[d.jsxs("div",{className:"tag-card__stat tag-card__stat--tasks",children:[d.jsx("div",{className:"tag-card__stat__value",children:n.tasks.length}),d.jsx("div",{className:"tag-card__stat__label",children:"Tasks"})]}),d.jsxs("div",{className:"tag-card__stat tag-card__stat--resources",children:[d.jsx("div",{className:"tag-card__stat__value",children:n.resources.length}),d.jsx("div",{className:"tag-card__stat__label",children:"Resources"})]}),d.jsxs("div",{className:"tag-card__stat tag-card__stat--events",children:[d.jsx("div",{className:"tag-card__stat__value",children:n.events.length}),d.jsx("div",{className:"tag-card__stat__label",children:"Events"})]}),d.jsxs("div",{className:"tag-card__stat tag-card__stat--middlewares",children:[d.jsx("div",{className:"tag-card__stat__value",children:n.middlewares.length}),d.jsx("div",{className:"tag-card__stat__label",children:"Middlewares"})]}),d.jsxs("div",{className:"tag-card__stat tag-card__stat--hooks",children:[d.jsx("div",{className:"tag-card__stat__value",children:n.hooks.length}),d.jsx("div",{className:"tag-card__stat__label",children:"Hooks"})]})]}),d.jsxs("div",{className:"tag-card__info-block",children:[d.jsx("div",{className:"label",children:"File Path:"}),d.jsx("div",{className:"value",children:n.filePath?d.jsx("a",{type:"button",onClick:P,title:"View file contents",children:Jn(n.filePath)}):Jn(n.filePath)})]})]})]})}),d.jsx("div",{children:d.jsxs("div",{className:"tag-card__section",children:[d.jsx("h4",{className:"tag-card__section__title",children:"Configuration Schema"}),d.jsx("div",{className:"tag-card__config",children:d.jsx(al,{schemaString:n.configSchema})})]})})]}),d.jsx(A2,{tag:n,introspector:e})]}),d.jsx(jn,{title:r,subtitle:c,isOpen:i,onClose:()=>s(!1),code:g?"Loading...":x?`Error: ${x}`:f,enableEdit:!!S,saveOnFile:S})]})},D2=({introspector:n,detailed:e=!1})=>{const[t,i]=B.useState("summary");le.useEffect(()=>{const w=setTimeout(()=>{window.dispatchEvent(new CustomEvent("docs:diagnostic-change"))},0);return()=>clearTimeout(w)},[]);const s=n.getDiagnostics(),r=n.getOrphanEvents(),o=n.getUnemittedEvents(),c=n.getUnusedMiddleware(),u=n.getOverrideConflicts(),f=s.filter(w=>w.severity==="error").length,p=s.filter(w=>w.severity==="warning").length,g=s.filter(w=>w.severity==="info").length,O=[{id:"summary",label:"Summary",count:s.length},{id:"errors",label:"Errors",count:f},{id:"warnings",label:"Warnings",count:p},{id:"orphans",label:"Orphan Events",count:r.length},{id:"unemitted",label:"Unemitted Events",count:o.length},{id:"unused",label:"Unused Middleware",count:c.length},{id:"conflicts",label:"Override Conflicts",count:u.length}],x=(w,P,_,E,C,$)=>d.jsxs("div",{className:`diagnostics-panel__summary-card ${$||""}`,children:[d.jsxs("div",{className:"diagnostics-panel__summary-card__header",children:[d.jsx("span",{className:"icon",children:E}),d.jsx("h4",{children:w})]}),d.jsx("div",{className:"diagnostics-panel__summary-card__value",children:P}),d.jsx("div",{className:"diagnostics-panel__summary-card__description",children:C})]}),k=w=>{const P=w.nodeId?"a":"div",_=w.nodeId?{href:`#element-${w.nodeId}`,className:`diagnostics-panel__item diagnostics-panel__item--${w.severity} diagnostics-panel__item--clickable`}:{className:`diagnostics-panel__item diagnostics-panel__item--${w.severity}`};return d.jsx(P,{..._,children:d.jsxs("div",{className:"diagnostics-panel__item-content",children:[d.jsx("span",{className:"icon",children:o_(w.severity)}),d.jsxs("div",{className:"main",children:[d.jsxs("div",{className:"diagnostics-panel__item-header",children:[d.jsx("span",{className:`diagnostics-panel__severity-badge diagnostics-panel__severity-badge--${w.severity}`,children:w.severity}),d.jsx("span",{className:"diagnostics-panel__code-badge",children:w.code})]}),d.jsx("div",{className:"diagnostics-panel__message",children:w.message}),w.nodeId&&d.jsxs("div",{className:"diagnostics-panel__node-info",children:[d.jsxs("div",{children:[d.jsx("strong",{children:"Node:"})," ",Te(w.nodeId)]}),w.nodeKind&&d.jsxs("div",{children:[d.jsx("strong",{children:"Type:"})," ",w.nodeKind]})]})]}),w.nodeId&&d.jsx("div",{className:"diagnostics-panel__click-indicator",children:"🔗"})]})},`${w.code}-${w.nodeId||"global"}`)},S=(w,P,_,E,C,$,A)=>d.jsxs("div",{className:"diagnostics-panel__special-section",children:[d.jsxs("h4",{children:[d.jsx("span",{className:"icon",children:_}),P," (",w.length,")"]}),w.length===0?d.jsxs("div",{className:"diagnostics-panel__empty-state",children:[d.jsx("div",{className:"celebration",children:"🎉"}),"No ",P.toLowerCase()," found. Great job!"]}):d.jsx("div",{className:"diagnostics-panel__special-section__items",children:w.map((Z,oe)=>{const ee=C(Z),J=!!(ee&&String(ee).trim()),K=J?String(ee):"(unknown)",R=J?"a":"div",H=J?{href:`#element-${K}`,className:`diagnostics-panel__special-section__item diagnostics-panel__special-section__item--clickable ${A||""}`}:{className:`diagnostics-panel__special-section__item ${A||""}`};return d.jsxs(R,{...H,children:[d.jsx("div",{className:"title",children:$?$(Z):Te(K)}),d.jsx("div",{className:"id",children:K}),J&&d.jsx("div",{className:"diagnostics-panel__click-indicator",children:"🔗"})]},oe)})})]});return e?d.jsxs("div",{className:"diagnostics-panel",children:[d.jsx("div",{className:"diagnostics-panel__tabs",children:O.map(w=>d.jsxs("button",{onClick:()=>i(w.id),className:`diagnostics-panel__tab ${t===w.id?"diagnostics-panel__tab--active":""}`,children:[w.label,w.count>0&&d.jsx("span",{className:"diagnostics-panel__tab-count",children:w.count})]},w.id))}),d.jsxs("div",{className:"diagnostics-panel__content",children:[t==="summary"&&d.jsxs("div",{children:[d.jsxs("div",{className:"diagnostics-panel__detailed-grid",children:[x("Total Issues",s.length,"#6c757d","📊","All diagnostic items","diagnostics-panel__summary-card--total"),x("Errors",f,"#dc3545","❌","Critical issues requiring attention","diagnostics-panel__summary-card--errors"),x("Warnings",p,"#ffc107","⚠️","Potential problems to review","diagnostics-panel__summary-card--warnings"),x("Information",g,"#17a2b8","ℹ️","Informational messages","diagnostics-panel__summary-card--info")]}),s.length>0&&d.jsxs("div",{children:[d.jsx("h4",{children:"Recent Diagnostics"}),d.jsx("div",{className:"diagnostics-panel__items",children:s.slice(0,5).map(k)})]})]}),t==="errors"&&d.jsx("div",{children:d.jsxs("div",{className:"diagnostics-panel__items",children:[s.filter(w=>w.severity==="error").map(k),f===0&&d.jsxs("div",{className:"diagnostics-panel__success-state",children:[d.jsx("div",{className:"icon",children:"✅"}),d.jsx("h4",{children:"No Errors Found!"}),d.jsx("p",{children:"Your application has no critical errors."})]})]})}),t==="warnings"&&d.jsx("div",{children:d.jsxs("div",{className:"diagnostics-panel__items",children:[s.filter(w=>w.severity==="warning").map(k),p===0&&d.jsxs("div",{className:"diagnostics-panel__success-state",children:[d.jsx("div",{className:"icon",children:"👍"}),d.jsx("h4",{children:"No Warnings!"}),d.jsx("p",{children:"No potential issues detected."})]})]})}),t==="orphans"&&S(r,"Orphan Events","👻","#6f42c1",w=>w.id,w=>`${Te(w.id)} (No listeners)`,"diagnostics-panel__special-section__item--orphan"),t==="unemitted"&&S(o,"Unemitted Events","📤","#fd7e14",w=>w.id,w=>`${Te(w.id)} (No emitters)`,"diagnostics-panel__special-section__item--unused"),t==="unused"&&S(c,"Unused Middleware","🔗","#6c757d",w=>w.id,w=>`${Te(w.id)} (Not used)`,"diagnostics-panel__special-section__item--unused"),t==="conflicts"&&d.jsxs("div",{className:"diagnostics-panel__special-section",children:[d.jsxs("h4",{children:[d.jsx("span",{className:"icon",children:"⚔️"}),"Override Conflicts (",u.length,")"]}),u.length===0?d.jsxs("div",{className:"diagnostics-panel__empty-state",children:[d.jsx("div",{className:"celebration",children:"🎉"}),"No override conflicts found. Great job!"]}):d.jsx("div",{className:"diagnostics-panel__special-section__items",children:u.map((w,P)=>d.jsxs("div",{className:"diagnostics-panel__special-section__item diagnostics-panel__special-section__item--conflict diagnostics-panel__conflict-item",children:[d.jsxs("div",{className:"title",children:[d.jsx("a",{href:`#element-${w.targetId}`,className:"diagnostics-panel__conflict-link",children:Te(w.targetId)})," ← overridden by → ",d.jsx("a",{href:`#element-${w.by}`,className:"diagnostics-panel__conflict-link",children:Te(w.by)})]}),d.jsxs("div",{className:"id",children:["Target: ",w.targetId]})]},P))})]})]})]}):d.jsxs("div",{className:"diagnostics-panel__summary-grid",children:[x("Errors",f,"#dc3545","❌","Critical issues","diagnostics-panel__summary-card--errors"),x("Warnings",p,"#ffc107","⚠️","Potential problems","diagnostics-panel__summary-card--warnings"),x("Orphan Events",r.length,"#6f42c1","👻","Events with no listeners","diagnostics-panel__summary-card--orphans"),x("Unused Middleware",c.length,"#fd7e14","🔗","Middleware not in use","diagnostics-panel__summary-card--unused"),x("Override Conflicts",u.length,"#dc3545","⚔️","Resource override issues","diagnostics-panel__summary-card--conflicts")]})},L2=({data:n})=>{const[e,t]=B.useState(()=>{const u=[],f=(p,g,O)=>{O>=4||typeof p!="object"||p===null||(u.push(g),Object.keys(p).forEach(x=>{f(p[x],`${g}.${x}`,O+1)}))};return f(n,"root",0),u}),[i,s]=B.useState([]),r=u=>{t(f=>f.includes(u)?f.filter(p=>p!==u):[...f,u])},o=u=>{s(f=>f.includes(u)?f.filter(p=>p!==u):[...f,u])},c=(u,f)=>{if(typeof u=="object"&&u!==null){const p=Array.isArray(u),g=Object.keys(u),O=e.includes(f);return d.jsxs("div",{className:`json-node ${O?"expanded":""}`,children:[d.jsx("span",{className:"json-toggle",onClick:()=>r(f),children:O?"▼":"▶"}),d.jsx("span",{className:"json-bracket",children:p?"[":"{"}),O&&d.jsx("div",{className:"json-children",children:g.map((x,k)=>d.jsxs("div",{className:"json-key-value",children:[!p&&d.jsxs("span",{className:"json-key",children:['"',x,'":']}),c(u[x],`${f}.${x}`),k<g.length-1&&d.jsx("span",{children:","})]},k))}),!O&&d.jsx("span",{className:"json-ellipsis",children:"..."}),d.jsx("span",{className:"json-bracket",children:p?"]":"}"})]})}else{const p=JSON.stringify(u),g=100;if(typeof u=="string"&&p.length>g){const O=i.includes(f),x=O?p:p.substring(0,g);return d.jsxs("span",{className:`json-value json-value--${typeof u}`,children:[x,!O&&d.jsx("span",{className:"json-expand-text",onClick:()=>o(f),style:{cursor:"pointer",color:"#0066cc",marginLeft:"4px"},children:"..."}),O&&p.length>g&&d.jsx("span",{className:"json-collapse-text",onClick:()=>o(f),style:{cursor:"pointer",color:"#0066cc",marginLeft:"4px"},children:"[collapse]"})]})}else return d.jsx("span",{className:`json-value json-value--${typeof u}`,children:p})}};return!n||typeof n=="object"&&Object.keys(n).length===0?null:d.jsx("div",{className:"json-viewer",children:c(n,"root")})},vf=n=>{const e=n.toLowerCase();return e==="fatal"||e==="error"?"error":e==="warn"||e==="warning"?"warn":e==="info"?"info":e==="debug"?"debug":e==="trace"?"trace":"default"},Ly=(n,e=6)=>n?n.length>e?n.slice(-e):n:"",I2=({logs:n})=>{const[e,t]=B.useState(!1),[i,s]=B.useState(null),r=f=>{const p=new Date(f);return`${p.toLocaleDateString()} ${p.toLocaleTimeString()}`},o=f=>{try{const p=JSON.parse(f);return typeof p=="object"&&p!==null?p:null}catch{return null}},c=B.useMemo(()=>[...e?n:n.slice(-50)].reverse(),[n,e]),u=B.useMemo(()=>i===null?null:c[i]??null,[i,c]);return B.useEffect(()=>{const f=p=>{p.key==="Escape"&&(i!==null?s(null):e&&t(!1))};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[e,i]),d.jsxs("div",{className:"recent-logs live-section",children:[d.jsxs("div",{className:"recent-logs__header",children:[d.jsxs("h4",{className:"recent-logs__title",children:["Recent Logs (",n.length,")"]}),d.jsx("button",{type:"button",className:"recent-logs__toggle","aria-label":e?"Exit full screen":"Enter full screen",title:e?"Exit full screen":"Enter full screen",onClick:()=>t(f=>!f),children:d.jsx("span",{children:e?"Exit":"Expand"})})]}),d.jsx("div",{className:`recent-logs__list ${e?"recent-logs__list--expanded":""}`,children:c.map((f,p)=>d.jsxs("div",{className:"recent-logs__row recent-logs__row--compact",onClick:()=>s(p),children:[d.jsx("span",{className:"recent-logs__time",children:new Date(f.timestampMs).toLocaleTimeString()}),d.jsx("span",{className:`recent-logs__level recent-logs__level--${vf(f.level)}`,children:f.level}),d.jsx("span",{className:"recent-logs__message",children:f.message}),f.correlationId&&d.jsx("span",{className:"recent-logs__corr",title:f.correlationId,children:Ly(f.correlationId)}),f.sourceId&&d.jsxs("a",{href:`#element-${f.sourceId}`,onClick:g=>g.stopPropagation(),title:`Go to source #${f.sourceId}`,className:"recent-logs__source",children:["#",f.sourceId]}),d.jsx("button",{type:"button",className:"recent-logs__action",onClick:g=>{g.stopPropagation(),s(p)},title:"View details",children:"View"})]},`${f.timestampMs}-${p}`))}),e&&Fc.createPortal(d.jsx("div",{role:"dialog","aria-modal":"true",className:"recent-logs-fs__overlay",onClick:()=>t(!1),children:d.jsxs("div",{className:"recent-logs-fs__panel",onClick:f=>f.stopPropagation(),children:[d.jsxs("div",{className:"recent-logs-fs__header",children:[d.jsx("h3",{className:"recent-logs-fs__title",children:"Recent Logs - Full Screen"}),d.jsx("button",{className:"recent-logs-fs__close",onClick:()=>t(!1),children:"Close"})]}),d.jsx("div",{className:"recent-logs-fs__content",children:c.map((f,p)=>d.jsxs("div",{className:"recent-logs__row recent-logs__row--fullscreen",onClick:()=>s(p),children:[d.jsx("span",{className:"recent-logs-fs__time",children:r(f.timestampMs)}),d.jsx("span",{className:`recent-logs-fs__level recent-logs-fs__level--${vf(f.level)}`,children:f.level}),d.jsx("span",{className:"recent-logs-fs__message",children:f.message}),f.correlationId&&d.jsx("span",{className:"recent-logs-fs__corr",title:`Correlation ID: ${f.correlationId}`,children:Ly(f.correlationId)}),f.sourceId&&d.jsxs("a",{href:`#element-${f.sourceId}`,onClick:g=>g.stopPropagation(),title:`Go to source #${f.sourceId}`,className:"recent-logs-fs__source",children:["#",f.sourceId]}),d.jsx("button",{className:"recent-logs-fs__action",onClick:g=>{g.stopPropagation(),s(p)},children:"Details"})]},`fs-${f.timestampMs}-${p}`))})]})}),document.body),u&&Fc.createPortal(d.jsx("div",{role:"dialog","aria-modal":"true",className:"recent-logs-modal__overlay",onClick:()=>s(null),children:d.jsxs("div",{className:"recent-logs-modal__panel",onClick:f=>f.stopPropagation(),children:[d.jsxs("div",{className:"recent-logs-modal__header",children:[d.jsx("h3",{className:"recent-logs-modal__title",children:"Log Details"}),d.jsx("button",{className:"recent-logs-modal__close",onClick:()=>s(null),children:"Close"})]}),d.jsx("div",{className:"recent-logs-modal__content",children:d.jsxs("div",{className:"recent-logs-modal__grid",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"recent-logs-modal__field",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Timestamp"}),d.jsx("div",{className:"recent-logs-modal__value recent-logs-modal__value--mono",children:r(u.timestampMs)})]}),d.jsxs("div",{className:"recent-logs-modal__field",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Level"}),d.jsx("span",{className:`recent-logs-modal__level recent-logs-modal__level--${vf(u.level)}`,children:u.level})]}),u.correlationId&&d.jsxs("div",{className:"recent-logs-modal__field",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Correlation ID"}),d.jsx("div",{className:"recent-logs-modal__value recent-logs-modal__value--mono recent-logs-modal__value--break",children:u.correlationId})]}),u.sourceId&&d.jsxs("div",{className:"recent-logs-modal__field",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Source"}),d.jsxs("a",{href:`#element-${u.sourceId}`,className:"recent-logs-modal__source",children:["#",u.sourceId]})]})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"recent-logs-modal__field",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Message"}),d.jsx("div",{className:"recent-logs-modal__message",children:u.message})]}),u.data&&u.data!=="{}"&&d.jsxs("div",{children:[d.jsxs("div",{className:"recent-logs-modal__data-header",children:[d.jsx("div",{className:"recent-logs-modal__label",children:"Data"}),d.jsx("button",{className:"recent-logs-modal__copy",onClick:()=>{const f=u.data??"";navigator.clipboard.writeText(f).catch(()=>{})},children:"Copy"})]}),d.jsx("div",{className:"recent-logs-modal__data",children:(()=>{const f=o(u.data);return f?d.jsx(L2,{data:f}):d.jsx("pre",{className:"recent-logs-modal__pre",children:u.data})})()})]})]})]})})]})}),document.body)]})},Z2=({emissions:n,detailed:e=!1})=>{const[t,i]=B.useState(null),[s,r]=B.useState(null),[o,c]=B.useState(!1),u=(g,O)=>{i(g),r(O),c(!0)},f=()=>{c(!1),i(null),r(null)},p=g=>new Date(g).toLocaleTimeString();return d.jsxs("div",{className:"recent-events",children:[d.jsxs("h4",{children:["Recent Event Emissions (",n.length,")"]}),d.jsx("div",{className:"live-entries",children:n.length===0?d.jsx("div",{className:"live-entry",children:d.jsx("span",{children:"No recent event emissions"})}):d.jsx(d.Fragment,{children:n.slice(-10).reverse().map((g,O)=>d.jsxs("div",{className:"live-entry live-entry--emission",children:[d.jsx("span",{className:"entry-time",children:p(g.timestampMs)}),d.jsx("a",{href:`#element-${g.eventId}`,className:"entry-event",children:g.eventId}),g.emitterId&&d.jsxs("span",{className:"entry-emitter",children:["from"," ",d.jsx("a",{href:`#element-${g.emitterId}`,className:"entry-emitter--link",children:g.emitterId})]}),g.payload&&d.jsx("button",{className:"clean-button",onClick:()=>u(JSON.stringify(JSON.parse(g.payload),null,2),g.eventId),children:"View Payload"})]},`${g.timestampMs}-${O}`))})}),d.jsx(jn,{title:"Event Payload",subtitle:s||void 0,isOpen:o,onClose:f,code:t})]})},X2=({runs:n,errors:e,detailed:t=!1})=>{const[i,s]=B.useState(null),[r,o]=B.useState(null),[c,u]=B.useState(!1),f=(O,x)=>{s(O),o(x),u(!0)},p=()=>{u(!1),s(null),o(null)},g=O=>new Date(O).toLocaleTimeString();return d.jsxs("div",{className:"recent-runs",children:[e.length>0&&d.jsxs("div",{className:"errors-section",children:[d.jsxs("h4",{children:["Recent Errors (",e.length,")"]}),d.jsx("div",{className:"live-entries",children:e.slice(-10).reverse().map((O,x)=>d.jsxs("div",{className:"live-entry live-entry--error",children:[d.jsx("span",{className:"entry-time",children:g(O.timestampMs)}),d.jsxs("a",{href:`#element-${O.sourceId}`,className:"entry-source",children:[O.sourceKind,":",O.sourceId]}),O.stack&&d.jsxs("div",{className:"entry-actions",children:[d.jsx("button",{className:"clean-button",onClick:()=>f(O.stack,O.sourceId),children:"View Stack Trace"}),d.jsx("button",{className:"clean-button",title:"Add to AI",onClick:()=>{const S=`I have the following error on @${O.sourceResolved&&O.sourceResolved.id||O.sourceId}: ${O.message} with stack:
|
|
209
209
|
${O.stack||""}`,w=S;window.dispatchEvent(new CustomEvent("docs:add-to-ai",{detail:{messageText:S,displayText:w}}))},children:"✦"})]})]},`${O.timestampMs}-${x}`))})]}),n.length>0&&d.jsxs("div",{className:"runs-section",children:[d.jsxs("h4",{children:["Recent Runs (",n.length,")"]}),d.jsx("div",{className:"live-entries",children:n.slice(-10).reverse().map((O,x)=>d.jsxs("div",{className:`live-entry live-entry--run ${O.ok?"live-entry--success":"live-entry--failure"}`,children:[d.jsx("span",{className:"entry-time",children:g(O.timestampMs)}),d.jsx("span",{className:"entry-status",children:O.ok?"✅":"❌"}),d.jsxs("a",{href:`#element-${O.nodeId}`,className:"entry-node",children:[O.nodeKind,":",O.nodeId]}),O.durationMs&&d.jsxs("span",{className:"entry-duration",children:[O.durationMs.toFixed(1),"ms"]}),d.jsx("div",{className:"entry-actions",children:O.error&&d.jsx("button",{className:"clean-button",onClick:()=>f(O.error,O.nodeId),children:"View Error"})})]},`${O.timestampMs}-${x}`))})]}),d.jsx(jn,{title:"Error Stack Trace",subtitle:r||void 0,isOpen:c,onClose:p,code:i})]})},V2=`
|
|
210
210
|
query LiveData($afterTimestamp: Float, $last: Int) {
|
|
211
211
|
live {
|
|
@@ -397,4 +397,4 @@ Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error
|
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
`;async function O(k){e(!0);try{const S=await rn(g,{last:200,afterTimestamp:k});if(p)return;const w=Date.now(),P=30,_=6e4,E=w-P*_,C={};for(let J=0;J<P;J++){const K=E+J*_;C[K]={success:0,error:0,canceled:0,durations:[]}}for(const J of S.live.runs||[]){if(J.timestampMs<E)continue;const K=Math.floor((J.timestampMs-E)/_)*_+E,R=C[K];R&&(J.ok?R.success+=1:R.error+=1,typeof J.durationMs=="number"&&R.durations.push(J.durationMs))}const $=[],A=[];Object.keys(C).map(J=>Number(J)).sort((J,K)=>J-K).forEach(J=>{const K=C[J];if($.push({t:J,success:K.success,error:K.error,canceled:K.canceled}),K.durations.length>0){const R=[...K.durations].sort((W,ue)=>W-ue),H=W=>R[Math.min(R.length-1,Math.floor(W*(R.length-1)))];A.push({t:J,p50:H(.5),p95:H(.95),p99:H(.99)})}else A.push({t:J,p50:0,p95:0,p99:0})});const Z={};for(const J of S.live.errors||[]){const K=J.sourceId||"unknown";Z[K]=(Z[K]||0)+1}const oe=Object.entries(Z).map(([J,K])=>({taskId:J,errors:K})).sort((J,K)=>K.errors-J.errors).slice(0,10),ee=Array.from({length:7},()=>Array.from({length:24},()=>0));for(const J of S.live.logs||[]){const K=new Date(J.timestampMs),R=K.getDay(),H=K.getHours();ee[R][H]+=1}i($),r(A),c(oe),f(ee)}finally{p||e(!1)}}O();const x=window.setInterval(()=>O(Date.now()-5e3),5e3);return()=>{p=!0,window.clearInterval(x)}},[]),{throughput:t,latency:s,errorByTask:o,heatmap:u,isLoading:n}}const GM=({onClose:n,overlay:e=!1})=>{const{throughput:t,latency:i,errorByTask:s,heatmap:r,isLoading:o}=UM();B.useEffect(()=>{const p=g=>{(g.key==="Escape"||g.key==="Esc")&&n()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[n]);const c=B.useMemo(()=>{if(t.length===0)return"";const p=800,g=160,O=Math.max(1,...t.map(w=>w.success+w.error+w.canceled)),x=w=>w/Math.max(1,t.length-1)*p,k=w=>g-w/O*g,S=t.map((w,P)=>`${x(P)},${k(w.success+w.error)}`);return`M0,${g} L${S.join(" L")} L${p},${g} Z`},[t]),u=B.useMemo(()=>{if(i.length===0)return{p50:"",p95:"",p99:""};const p=800,g=160,O=Math.max(1,...i.flatMap(w=>[w.p50,w.p95,w.p99])),x=w=>w/Math.max(1,i.length-1)*p,k=w=>g-w/O*g,S=w=>i.map((P,_)=>`${_===0?"M":"L"}${x(_)},${k(w(P))}`).join(" ");return{p50:S(w=>w.p50),p95:S(w=>w.p95),p99:S(w=>w.p99)}},[i]),f=d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"overview-stats-panel__header",children:[d.jsx("h3",{children:"Performance Stats"}),d.jsx("button",{onClick:n,className:"clear-button",children:"Close"})]}),d.jsxs("div",{className:"overview-stats-panel__grid",children:[d.jsxs("section",{className:"overview-stats-panel__section",children:[d.jsx("h4",{children:"Throughput over time"}),d.jsx("div",{className:"overview-stats-panel__chart",children:o?d.jsx("div",{className:"overview-stats-panel__loading",children:"Loading…"}):d.jsxs("svg",{width:"100%",height:160,viewBox:"0 0 800 160",children:[d.jsx("defs",{children:d.jsxs("linearGradient",{id:"tp",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"0%",stopColor:"#60a5fa",stopOpacity:"0.7"}),d.jsx("stop",{offset:"100%",stopColor:"#60a5fa",stopOpacity:"0.1"})]})}),d.jsx("path",{d:c,fill:"url(#tp)",stroke:"#3b82f6",strokeWidth:1})]})})]}),d.jsxs("section",{className:"overview-stats-panel__section",children:[d.jsx("h4",{children:"Latency percentiles"}),d.jsx("div",{className:"overview-stats-panel__chart",children:o?d.jsx("div",{className:"overview-stats-panel__loading",children:"Loading…"}):d.jsxs("svg",{width:"100%",height:160,viewBox:"0 0 800 160",children:[d.jsx("path",{d:u.p50,fill:"none",stroke:"#22c55e",strokeWidth:2}),d.jsx("path",{d:u.p95,fill:"none",stroke:"#eab308",strokeWidth:2}),d.jsx("path",{d:u.p99,fill:"none",stroke:"#ef4444",strokeWidth:2})]})})]}),d.jsxs("section",{className:"overview-stats-panel__section",children:[d.jsx("h4",{children:"Error rate"}),d.jsx("div",{className:"overview-stats-panel__list",children:o?d.jsx("div",{className:"overview-stats-panel__loading",children:"Loading…"}):s.length===0?d.jsx("div",{className:"overview-stats-panel__empty",children:"No errors"}):d.jsx("ul",{children:s.map(p=>d.jsxs("li",{children:[p.taskId," — ",p.errors]},p.taskId))})})]}),d.jsxs("section",{className:"overview-stats-panel__section",children:[d.jsx("h4",{children:"Activity heatmap"}),d.jsx("div",{className:"overview-stats-panel__chart",children:!o&&d.jsx("svg",{width:"100%",height:160,viewBox:"0 0 800 160",children:r.map((p,g)=>p.map((O,x)=>{const k=x/24*800,S=g/7*160,P=`rgba(99,102,241,${.15+Math.min(1,O/10)*.75})`;return d.jsx("rect",{x:k,y:S,width:800/24-1,height:160/7-1,fill:P},`${x}-${g}`)}))})})]})]})]});return e?d.jsx("div",{className:"overview-stats-panel overview-stats-panel--overlay",onClick:n,children:d.jsx("div",{role:"dialog","aria-modal":"true",className:"overview-stats-panel__content",onClick:p=>p.stopPropagation(),children:f})}):d.jsx("div",{className:"overview-stats-panel overview-stats-panel--inline",children:d.jsx("div",{role:"region","aria-label":"Performance stats",className:"overview-stats-panel__content",children:f})})},Gy=({introspector:n,namespacePrefix:e,runnerFrameworkMd:t,runnerDevMd:i,projectOverviewMd:s,graphqlSdl:r})=>{const o=B.useRef(!1),[c,u]=B.useState(()=>{try{return localStorage.getItem(Xe.STORAGE_KEYS.CHAT_OPEN)==="true"}catch{return Xe.DEFAULTS.CHAT_OPEN}}),[f,p]=B.useState(()=>{try{const W=localStorage.getItem("docs-dark-mode");return W?JSON.parse(W):!0}catch{return!0}});B.useEffect(()=>{document.documentElement.setAttribute("data-theme",f?"dark":"light");try{localStorage.setItem("docs-dark-mode",JSON.stringify(f))}catch(W){console.warn("Failed to save dark mode preference:",W)}},[f]);const g=()=>{p(!f)},O=QM(n,e),x=PM(),k=jM(40),S=CM(c?k.chatWidth+40:0),w=qy(S.sidebarWidth,180),P=qy(k.chatWidth,180),[_,E]=B.useState(!1),C=()=>{u(W=>{const ue=!W;try{localStorage.setItem(Xe.STORAGE_KEYS.CHAT_OPEN,String(ue))}catch{}return E(!0),window.setTimeout(()=>E(!1),260),ue})},[$,A]=B.useState(()=>{try{return window.location.hash==="#overview-stats"}catch{return!1}});B.useEffect(()=>{const W=()=>{try{A(window.location.hash==="#overview-stats")}catch{}};return window.addEventListener("hashchange",W),W(),()=>window.removeEventListener("hashchange",W)},[]);const Z=()=>{try{window.location.hash="#overview-stats"}catch{}},oe=()=>{try{window.location.hash==="#overview-stats"&&(window.location.hash="#overview")}catch{}},ee=EM(O.allElements,x.treeType,O.localNamespaceSearch,n,{tasks:O.tasks,resources:O.resources,events:O.events,hooks:O.hooks,middlewares:O.middlewares,tags:O.tags}),J=MM({tasks:O.tasks.length,resources:O.resources.length,events:O.events.length,hooks:O.hooks.length,middlewares:O.middlewares.length,tags:O.tags.length}),K=O.tasks.length+O.resources.length+O.events.length+O.hooks.length+O.middlewares.length,R=W=>{window.location.hash=`#${W}`,document.getElementById(W)?.scrollIntoView({behavior:"instant",block:"start"})};B.useEffect(()=>{const W=()=>{const V=window.location.hash;if(V&&V.length>1){const I=V.slice(1);document.getElementById(I)?.scrollIntoView({behavior:"instant",block:"start"})}},ue=()=>{const V=window.location.hash;if(V.startsWith("#element-")&&O.localNamespaceSearch){const I=V.substring(9),T=n.getAll(),Q=O.allElements,X=T.some(U=>U.id===I),ie=Q.some(U=>U.id===I);X&&!ie&&O.resetFilters()}W()},ve=()=>{setTimeout(W,100)},de=()=>{ve()};return window.addEventListener("hashchange",ue),window.addEventListener("docs:layout-change",ve),window.addEventListener("docs:diagnostic-change",de),o.current||(ue(),o.current=!0),()=>{window.removeEventListener("hashchange",ue),window.removeEventListener("docs:layout-change",ve),window.removeEventListener("docs:diagnostic-change",de)}},[O.localNamespaceSearch,O.allElements,O.setLocalNamespaceSearch,n]),window!==void 0&&console.log(n.serialize());const H=S.isResizing||k.isResizing||_||w!==S.sidebarWidth||P!==k.chatWidth;return d.jsxs("div",{className:"docs-app",children:[d.jsx(s_,{sidebarWidth:S.sidebarWidth,sidebarRef:S.sidebarRef,isChatOpen:c,onToggleChat:C,leftOffset:c?k.chatWidth+40:0,isDarkMode:f,onToggleDarkMode:g,viewMode:x.viewMode,treeType:x.treeType,localNamespaceSearch:O.localNamespaceSearch,showSystem:O.showSystem,treeNodes:ee.treeNodes,sections:J,totalComponents:K,onViewModeChange:x.handleViewModeChange,onTreeTypeChange:x.handleTreeTypeChange,onNamespaceSearchChange:O.setLocalNamespaceSearch,onShowSystemChange:O.handleShowSystemChange,onTreeNodeClick:ee.handleTreeNodeClick,onToggleExpansion:ee.handleToggleExpansion,onSectionClick:R}),d.jsx("div",{ref:S.resizerRef,className:`docs-sidebar-resizer ${S.isResizing?"docs-sidebar-resizer--active":""}`,style:{left:`${(c?k.chatWidth+40:0)+S.sidebarWidth+40}px`},onMouseDown:S.handleMouseDown}),d.jsx($M,{introspector:n,sidebarWidth:w,chatWidth:P,isChatOpen:c,openStats:Z,isStatsOpen:$,closeStats:oe,chatPushesLeft:!0,suspendRendering:H,tasks:O.tasks,resources:O.resources,events:O.events,hooks:O.hooks,middlewares:O.middlewares,tags:O.tags}),c&&d.jsxs(d.Fragment,{children:[d.jsx("div",{ref:k.resizerRef,className:`docs-sidebar-resizer ${k.isResizing?"docs-sidebar-resizer--active":""}`,style:{left:`${k.chatWidth+40}px`},onMouseDown:k.handleMouseDown}),d.jsx(FM,{width:k.chatWidth,sidebarRef:k.sidebarRef,onToggleChat:C,isChatOpen:c,runnerAiMd:t,runnerDevMd:i,projectOverviewMd:s,graphqlSdl:r,availableElements:{tasks:O.tasks.map(W=>({id:W.id,name:W.id,title:W.meta?.title||void 0,description:W.meta?.description||void 0})),resources:O.resources.map(W=>({id:W.id,name:W.id,title:W.meta?.title||void 0,description:W.meta?.description||void 0})),events:O.events.map(W=>({id:W.id,name:W.id,title:W.meta?.title||void 0,description:W.meta?.description||void 0})),hooks:O.hooks.map(W=>({id:W.id,name:W.id,title:W.meta?.title||void 0,description:W.meta?.description||void 0})),middlewares:O.middlewares.map(W=>({id:W.id,name:W.id,title:W.meta?.title||void 0,description:W.meta?.description||void 0})),tags:O.tags.map(W=>({id:W.id,name:W.id,title:W.meta?.title||void 0,description:W.meta?.description||void 0}))}})]}),$&&d.jsx(GM,{overlay:!0,onClose:oe})]})},HM=Symbol("runner-dev.elementKind");function ro(n){return new Map(n.map(e=>[e.id,e]))}function Et(n){return n?Array.isArray(n)?n.map(e=>typeof e=="string"?e:KM(e)).filter(Boolean):typeof n=="string"?[n]:[]:[]}function KM(n){return n?typeof n.id=="string"?n.id:String(n):""}function Uw(n){return n.getEvents().filter(t=>n.getHooksOfEvent(t.id).length===0).map(t=>({id:t.id}))}function Gw(n){return n.getEvents().filter(t=>n.getEmittersOfEvent(t.id).length===0).filter(t=>t.id!=="globals.events.ready").filter(t=>t.id!=="*").map(t=>({id:t.id}))}function Hw(n){return n.getMiddlewares().filter(t=>{const i=(t.usedByTasks?.length??0)>0||(t.usedByResources?.length??0)>0,s=!!t.global?.enabled;return!i&&!s}).map(t=>({id:t.id}))}function Kw(n){const e=n.getResources(),t=new Map;for(const s of e)for(const r of s.overrides??[])t.has(r)||t.set(r,new Set),t.get(r).add(s.id);const i=[];for(const[s,r]of t)if(r.size>1)for(const o of r)i.push({targetId:s,by:o});return i.sort((s,r)=>s.targetId===r.targetId?s.by.localeCompare(r.by):s.targetId.localeCompare(r.targetId)),i}function JM(n){const e=[];n.getResources(),n.getTasks(),n.getHooks(),n.getEvents(),n.getMiddlewares();for(const t of Uw(n))yf(t.id)||e.push({severity:"warning",code:"ORPHAN_EVENT",message:`Event has no hooks: ${t.id}`,nodeId:t.id,nodeKind:"EVENT"});for(const t of Gw(n))yf(t.id)||e.push({severity:"warning",code:"UNEMITTED_EVENT",message:`Event has no emitters: ${t.id}`,nodeId:t.id,nodeKind:"EVENT"});for(const t of Hw(n))yf(t.id)||e.push({severity:"info",code:"UNUSED_MIDDLEWARE",message:`Middleware is defined but not used: ${t.id}`,nodeId:t.id,nodeKind:"MIDDLEWARE"});for(const t of Kw(n))e.push({severity:"error",code:"OVERRIDE_CONFLICT",message:`Override conflict on ${t.targetId} by ${t.by}`,nodeId:t.targetId});return e.sort((t,i)=>{if(t.code!==i.code)return t.code.localeCompare(i.code);const s=t.nodeId??"",r=i.nodeId??"";return s!==r?s.localeCompare(r):t.message.localeCompare(i.message)}),e}function yf(n){const e=String(n).toLowerCase();return e.startsWith("globals.")||e==="*"}function eA(n,e){try{Object.defineProperty(n,HM,{value:e,enumerable:!1,configurable:!1,writable:!1})}catch{}return n}class $m{tasks=[];hooks=[];resources=[];events=[];taskMiddlewares=[];resourceMiddlewares=[];middlewares=[];tags=[];store=null;rootId=null;taskMap=new Map;hookMap=new Map;resourceMap=new Map;eventMap=new Map;middlewareMap=new Map;tagMap=new Map;constructor(e){"store"in e||(this.store=null,this.initializeFromData(e.data))}initializeFromData(e){this.tasks=Array.isArray(e.tasks)?e.tasks:[],this.hooks=Array.isArray(e.hooks)?e.hooks:[],this.resources=Array.isArray(e.resources)?e.resources:[],this.events=Array.isArray(e.events)?e.events:[],this.taskMiddlewares=[],this.resourceMiddlewares=[],this.middlewares=Array.isArray(e.middlewares)?e.middlewares:[],this.rootId=e.rootId??null,this.taskMap=ro(this.tasks),this.hookMap=ro(this.hooks),this.resourceMap=ro(this.resources),this.eventMap=ro(this.events),this.middlewareMap=ro(this.middlewares),this.tags=e.tags,this.tagMap=new Map;for(const t of this.tags)this.tagMap.set(t.id,t)}buildRunsOptions(e,t){const i={};typeof t?.afterTimestamp=="number"&&(i.afterTimestamp=t.afterTimestamp),typeof t?.last=="number"&&(i.last=t.last);const s=t?.filter??{};return i.nodeIds=[String(e)],Array.isArray(s.nodeKinds)&&(i.nodeKinds=s.nodeKinds),typeof s.ok=="boolean"&&(i.ok=s.ok),Array.isArray(s.parentIds)&&(i.parentIds=s.parentIds),Array.isArray(s.rootIds)&&(i.rootIds=s.rootIds),Array.isArray(s.correlationIds)&&(i.correlationIds=s.correlationIds),i}getRoot(){const e=this.store,i=(e?.root?.resource?.id?String(e.root.resource.id):null)??this.rootId??this.resources[0]?.id;return eA(this.resourceMap.get(String(i)),"RESOURCE")}getAll(){return[...this.tasks,...this.hooks,...this.resources,...this.events,...this.middlewares]}getEvents(){return this.events}getTasks(){return this.tasks}getHooks(){return this.hooks}getMiddlewares(){return this.middlewares}getTaskMiddlewares(){return this.taskMiddlewares}getResourceMiddlewares(){return this.resourceMiddlewares}getResources(){return this.resources}getEvent(e){return this.eventMap.get(e)??null}getTask(e){return this.taskMap.get(e)??null}getHook(e){return this.hookMap.get(e)??null}getMiddleware(e){return this.middlewareMap.get(e)??null}getResource(e){return this.resourceMap.get(e)??null}getDependencies(e){const t=Et(e.dependsOn),i=this.tasks.filter(u=>t.includes(u.id)),s=this.hooks.filter(u=>t.includes(u.id)),r=this.resources.filter(u=>t.includes(u.id)),o=Et(e.emits),c=this.events.filter(u=>o.includes(u.id));return{tasks:i,hooks:s,resources:r,emitters:c}}getEmittedEvents(e){const t=Et(e.emits);return this.events.filter(i=>t.includes(i.id))}getMiddlewaresByIds(e){const t=new Set(Et(e));return this.middlewares.filter(i=>t.has(i.id))}getResourcesByIds(e){const t=new Set(Et(e));return this.resources.filter(i=>t.has(i.id))}getTasksByIds(e){const t=new Set(Et(e));return this.tasks.filter(i=>t.has(i.id))}getHooksByIds(e){const t=new Set(Et(e));return this.hooks.filter(i=>t.has(i.id))}getEventsByIds(e){const t=new Set(Et(e));return this.events.filter(i=>t.has(i.id))}getTasksUsingResource(e){return[...this.tasks,...this.hooks].filter(t=>Et(t.dependsOn).includes(e))}getTasksUsingMiddleware(e){return this.tasks.filter(t=>Et(t.middleware).includes(e))}getTaskLikesUsingMiddleware(e){return this.getTasksUsingMiddleware(e)}getEmittersOfEvent(e){return[...this.tasks,...this.hooks,...this.resources].filter(t=>Et(t.emits).includes(e))}getHooksOfEvent(e){return this.hooks.filter(t=>t.events.includes(e))}getMiddlewareEmittedEvents(e){const t=this.getTasksUsingMiddleware(e),i=new Set;for(const s of t)for(const r of Et(s.emits))i.add(r);return this.events.filter(s=>i.has(s.id))}getMiddlewareUsagesForTask(e){const t=this.taskMap.get(e);return t?(t.middlewareDetailed??[]).map(s=>({id:s.id,config:s.config??null,node:this.middlewareMap.get(s.id)})).filter(s=>!!s.node):[]}getMiddlewareUsagesForResource(e){const t=this.resourceMap.get(e);return t?(t.middlewareDetailed??[]).map(s=>({id:s.id,config:s.config??null,node:this.middlewareMap.get(s.id)})).filter(s=>!!s.node):[]}getTasksUsingMiddlewareDetailed(e){const t=[];return(s=>{for(const r of s)if((r.middleware||[]).includes(e)){const o=(r.middlewareDetailed||[]).find(c=>c.id===e)?.config??null;t.push({id:r.id,config:o??null,node:r})}})(this.tasks),t}getResourcesUsingMiddlewareDetailed(e){const t=[];for(const i of this.resources)if((i.middleware||[]).includes(e)){const s=(i.middlewareDetailed||[]).find(r=>r.id===e)?.config??null;t.push({id:i.id,config:s??null,node:i})}return t}getEmittedEventsForResource(e){const t=this.getTasksUsingResource(e),i=new Set;for(const s of t)for(const r of Et(s.emits))i.add(r);return this.getEventsByIds(Array.from(i))}getTasksWithTag(e){return this.tasks.filter(t=>Et(t.tags).includes(e))}getHooksWithTag(e){return this.hooks.filter(t=>Et(t.tags).includes(e))}getResourcesWithTag(e){return this.resources.filter(t=>Et(t.tags).includes(e))}getMiddlewaresWithTag(e){return this.middlewares.filter(t=>Et(t.tags).includes(e))}getEventsWithTag(e){return this.events.filter(t=>Et(t.tags).includes(e))}getAllTags(){return this.tags}getTag(e){return this.tagMap.get(e)??null}getTagsByIds(e){return e.map(t=>this.getTag(t)).filter(t=>t!==null)}getOrphanEvents(){return Uw(this)}getUnemittedEvents(){return Gw(this)}getUnusedMiddleware(){return Hw(this)}getOverrideConflicts(){return Kw(this)}getDiagnostics(){return JM(this)}buildRunOptionsForTask(e,t){return this.buildRunsOptions(e,t)}buildRunOptionsForHook(e,t){return this.buildRunsOptions(e,t)}serialize(){return{tasks:this.tasks,hooks:this.hooks,resources:this.resources,events:this.events,middlewares:this.middlewares,tags:this.tags,diagnostics:this.getDiagnostics(),orphanEvents:this.getOrphanEvents(),unemittedEvents:this.getUnemittedEvents(),unusedMiddleware:this.getUnusedMiddleware(),overrideConflicts:this.getOverrideConflicts(),rootId:this.store?.root?.resource?.id!=null?String(this.store.root.resource.id):this.rootId}}static deserialize(e){return new $m({data:e})}}function Hy(n){return $m.deserialize(n)}function tA(){const n=window.location.hash;if(!n)return null;const e=decodeURIComponent(n.slice(1));return e?e.startsWith("element-")?e.slice(8):e:null}function nA(){try{return localStorage.getItem(Xe.STORAGE_KEYS.SHOW_SYSTEM)==="1"}catch{return Xe.DEFAULTS.SHOW_SYSTEM}}function iA(n){try{localStorage.setItem(Xe.STORAGE_KEYS.SHOW_SYSTEM,n?"1":"0")}catch{}}function sA(n,e){const t=Xe.SYSTEM_TAG_ID;if(e===t)return!0;const i=[n.getTask(e),n.getHook(e),n.getResource(e),n.getMiddleware(e),n.getEvent(e)];for(const s of i)if(s&&Array.isArray(s.tags)&&s.tags.includes(t))return!0;return!1}function Ky(n){const e=tA();if(!e)return;!nA()&&sA(n,e)&&iA(!0)}function Jy(){const n=window.location.hash;if(!n)return;const e=decodeURIComponent(n.slice(1));requestAnimationFrame(()=>{setTimeout(()=>{const t=document.getElementById(e);t&&t.scrollIntoView({block:"start"})},0)})}async function rA(){const n=document.getElementById("root"),e=window.__DOCS_PROPS__;if(e&&e.introspectorData){const c=Hy(e.introspectorData);Ky(c),O0.hydrateRoot(n,le.createElement(Gy,{introspector:c,namespacePrefix:e.namespacePrefix,runnerFrameworkMd:e.runnerFrameworkMd,runnerDevMd:e.runnerDevMd,projectOverviewMd:e.projectOverviewMd,graphqlSdl:e.graphqlSdl})),Jy();return}const t=__API_URL__||"",i=new URL("/docs/data",t||window.location.origin),r=await(await fetch(i.toString())).json(),o=Hy(r.introspectorData);Ky(o),O0.createRoot(n).render(le.createElement(Gy,{introspector:o,namespacePrefix:r.namespacePrefix,runnerFrameworkMd:r.runnerFrameworkMd,runnerDevMd:r.runnerDevMd,projectOverviewMd:r.projectOverviewMd,graphqlSdl:r.graphqlSdl})),Jy()}rA();
|
|
400
|
-
//# sourceMappingURL=docs-
|
|
400
|
+
//# sourceMappingURL=docs-Cw0Dreql.js.map
|