@bluelibs/runner-dev 4.4.3 → 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.
Files changed (77) hide show
  1. package/dist/cli/generators/artifact.js +28 -20
  2. package/dist/cli/generators/artifact.js.map +1 -1
  3. package/dist/cli/generators/common.d.ts +1 -1
  4. package/dist/cli/generators/common.js.map +1 -1
  5. package/dist/cli/generators/templates.d.ts +1 -0
  6. package/dist/cli/generators/templates.js +52 -5
  7. package/dist/cli/generators/templates.js.map +1 -1
  8. package/dist/cli/init.js +4 -0
  9. package/dist/cli/init.js.map +1 -1
  10. package/dist/cli.js +2 -1
  11. package/dist/cli.js.map +1 -1
  12. package/dist/index.d.ts +104 -50
  13. package/dist/mcp/z3.d.ts +1 -0
  14. package/dist/mcp/z3.js +9 -0
  15. package/dist/mcp/z3.js.map +1 -0
  16. package/dist/resources/cli.config.resource.d.ts +5 -2
  17. package/dist/resources/cli.config.resource.js +4 -0
  18. package/dist/resources/cli.config.resource.js.map +1 -1
  19. package/dist/resources/coverage.resource.d.ts +6 -3
  20. package/dist/resources/coverage.resource.js +4 -0
  21. package/dist/resources/coverage.resource.js.map +1 -1
  22. package/dist/resources/dev.resource.d.ts +7 -1
  23. package/dist/resources/dev.resource.js +12 -0
  24. package/dist/resources/dev.resource.js.map +1 -1
  25. package/dist/resources/docs.generator.resource.d.ts +11 -5
  26. package/dist/resources/docs.generator.resource.js +4 -0
  27. package/dist/resources/docs.generator.resource.js.map +1 -1
  28. package/dist/resources/graphql-accumulator.resource.d.ts +10 -4
  29. package/dist/resources/graphql-accumulator.resource.js +4 -0
  30. package/dist/resources/graphql-accumulator.resource.js.map +1 -1
  31. package/dist/resources/graphql.cli.resource.d.ts +5 -2
  32. package/dist/resources/graphql.cli.resource.js +4 -0
  33. package/dist/resources/graphql.cli.resource.js.map +1 -1
  34. package/dist/resources/graphql.query.cli.task.d.ts +55 -25
  35. package/dist/resources/graphql.query.cli.task.js +1 -1
  36. package/dist/resources/graphql.query.cli.task.js.map +1 -1
  37. package/dist/resources/graphql.query.task.d.ts +41 -23
  38. package/dist/resources/graphql.query.task.js +1 -1
  39. package/dist/resources/graphql.query.task.js.map +1 -1
  40. package/dist/resources/http.tag.d.ts +1 -1
  41. package/dist/resources/introspector.cli.resource.d.ts +10 -4
  42. package/dist/resources/introspector.cli.resource.js +4 -0
  43. package/dist/resources/introspector.cli.resource.js.map +1 -1
  44. package/dist/resources/introspector.resource.d.ts +6 -3
  45. package/dist/resources/introspector.resource.js +4 -0
  46. package/dist/resources/introspector.resource.js.map +1 -1
  47. package/dist/resources/live.resource.d.ts +12 -6
  48. package/dist/resources/live.resource.js +8 -0
  49. package/dist/resources/live.resource.js.map +1 -1
  50. package/dist/resources/models/initializeFromStore.utils.js +3 -6
  51. package/dist/resources/models/initializeFromStore.utils.js.map +1 -1
  52. package/dist/resources/routeHandlers/registerHttpRoutes.hook.d.ts +59 -32
  53. package/dist/resources/routeHandlers/registerHttpRoutes.hook.js +4 -0
  54. package/dist/resources/routeHandlers/registerHttpRoutes.hook.js.map +1 -1
  55. package/dist/resources/server.resource.d.ts +50 -26
  56. package/dist/resources/server.resource.js +4 -0
  57. package/dist/resources/server.resource.js.map +1 -1
  58. package/dist/resources/swap.cli.resource.d.ts +20 -8
  59. package/dist/resources/swap.cli.resource.js +4 -0
  60. package/dist/resources/swap.cli.resource.js.map +1 -1
  61. package/dist/resources/swap.resource.d.ts +14 -8
  62. package/dist/resources/swap.resource.js +4 -0
  63. package/dist/resources/swap.resource.js.map +1 -1
  64. package/dist/resources/swap.tools.d.ts +2 -2
  65. package/dist/resources/telemetry.resource.d.ts +4 -1
  66. package/dist/resources/telemetry.resource.js +12 -0
  67. package/dist/resources/telemetry.resource.js.map +1 -1
  68. package/dist/ui/.vite/manifest.json +2 -2
  69. package/dist/ui/assets/{docs-BaaEkHLq.js → docs-Cw0Dreql.js} +3 -3
  70. package/dist/ui/assets/docs-Cw0Dreql.js.map +1 -0
  71. package/dist/ui/assets/{docs-B2-n0kaX.css → docs-D7c0I3Vs.css} +1 -1
  72. package/dist/utils/zod.js +15 -3
  73. package/dist/utils/zod.js.map +1 -1
  74. package/dist/version.d.ts +1 -1
  75. package/dist/version.js +1 -1
  76. package/package.json +11 -11
  77. package/dist/ui/assets/docs-BaaEkHLq.js.map +0 -1
@@ -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,SAAS,CAAC,KAAK;QAC9B,UAAU,EAAE,gBAAO,CAAC,SAAS,CAAC,UAAU;QACxC,YAAY,EAAZ,oCAAY;QACZ,YAAY,EAAE,gBAAO,CAAC,SAAS,CAAC,YAAY;KAC7C;IACD,KAAK,CAAC,IAAI,CACR,CAAC,EACD,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE;QAEjD,iDAAiD;QACjD,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAoB,CAAC;QACzD,MAAM,YAAY,GAAG,IAAI,GAAG,EAAuB,CAAC;QAEpD,MAAM,GAAG,GAAiB;YACxB,KAAK,CAAC,IAAI,CAAC,MAAc,EAAE,OAAe;gBACxC,IAAI,CAAC;oBACH,uBAAuB;oBACvB,MAAM,IAAI,GAAG,IAAA,6BAAgB,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;oBAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,OAAO;4BACL,OAAO,EAAE,KAAK;4BACd,KAAK,EAAE,SAAS,MAAM,aAAa;4BACnC,MAAM;yBACP,CAAC;oBACJ,CAAC;oBAED,+BAA+B;oBAC/B,MAAM,aAAa,GAAG,IA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,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"}
@@ -12,11 +12,11 @@ export declare function compileRunFunction(code: string): {
12
12
  /**
13
13
  * Get task from store by ID
14
14
  */
15
- export declare function getTaskFromStore(store: Store, taskId: string): import("@bluelibs/runner/dist/defs").ITask<any, any, any, any, import("@bluelibs/runner/dist/defs").TagType[], import("@bluelibs/runner/dist/defs").TaskMiddlewareAttachmentType[]> | undefined;
15
+ export declare function getTaskFromStore(store: Store, taskId: string): import("@bluelibs/runner").ITask<any, any, any, any, import("@bluelibs/runner").TagType[], import("@bluelibs/runner").TaskMiddlewareAttachmentType[]> | undefined;
16
16
  /**
17
17
  * Get task from store by ID
18
18
  */
19
- export declare function getEventFromStore(store: Store, eventId: string): import("@bluelibs/runner/dist/defs").IEvent<any> | undefined;
19
+ export declare function getEventFromStore(store: Store, eventId: string): import("@bluelibs/runner").IEvent<any> | undefined;
20
20
  /**
21
21
  * Get computed dependencies for a task from store
22
22
  */
@@ -1 +1,4 @@
1
- export declare const telemetry: import("@bluelibs/runner/dist/defs").IResource<void, Promise<void>, {}, any, any, import("@bluelibs/runner/dist/defs").TagType[], import("@bluelibs/runner/dist/defs").ResourceMiddlewareAttachmentType[]>;
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,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,EACT,kGAAkG;KACrG;IACD,YAAY,EAAE,EAAE,YAAY,EAAE,gBAAO,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAJ,oBAAI,EAAE;IACpE,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;QAClC,YAAY,CAAC,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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,IAAI,EAAE;QACJ,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,mHAAmH;KACjI;IACD,QAAQ,EAAE;QACR,mBAAmB;QACnB,2BAA2B;QAC3B,gBAAgB;KACjB;IACD,KAAK,CAAC,IAAI;QACR,QAAQ;IACV,CAAC;CACF,CAAC,CAAC"}
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "src/hydrate-docs.tsx": {
3
- "file": "assets/docs-BaaEkHLq.js",
3
+ "file": "assets/docs-Cw0Dreql.js",
4
4
  "name": "docs",
5
5
  "src": "src/hydrate-docs.tsx",
6
6
  "isEntry": true,
7
7
  "css": [
8
- "assets/docs-B2-n0kaX.css"
8
+ "assets/docs-D7c0I3Vs.css"
9
9
  ]
10
10
  }
11
11
  }
@@ -37,7 +37,7 @@ Error generating stack: `+y.message+`
37
37
  *
38
38
  * This source code is licensed under the MIT license found in the
39
39
  * LICENSE file in the root directory of this source tree.
40
- */var v0;function Jb(){if(v0)return Wl;v0=1;var n=$p(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,r={key:!0,ref:!0,__self:!0,__source:!0};function o(c,u,f){var p,g={},O=null,x=null;f!==void 0&&(O=""+f),u.key!==void 0&&(O=""+u.key),u.ref!==void 0&&(x=u.ref);for(p in u)i.call(u,p)&&!r.hasOwnProperty(p)&&(g[p]=u[p]);if(c&&c.defaultProps)for(p in u=c.defaultProps,u)g[p]===void 0&&(g[p]=u[p]);return{$$typeof:e,type:c,key:O,ref:x,props:g,_owner:s.current}}return Wl.Fragment=t,Wl.jsx=o,Wl.jsxs=o,Wl}var y0;function e_(){return y0||(y0=1,Ad.exports=Jb()),Ad.exports}var d=e_();const t_=({mode:n,nodes:e=[],sections:t=[],onNodeClick:i,onSectionClick:s,onToggleExpansion:r,searchTerm:o="",className:c=""})=>{const[u,f]=B.useState(null),p=B.useRef(null);B.useEffect(()=>{const x=w=>{!u||!p.current?.contains(document.activeElement)||(n==="tree"?k(w):S(w))},k=w=>{const P=i_(e),_=P.findIndex(E=>E.id===u);switch(w.key){case"ArrowDown":w.preventDefault(),_<P.length-1&&f(P[_+1].id);break;case"ArrowUp":w.preventDefault(),_>0&&f(P[_-1].id);break;case"ArrowRight":w.preventDefault();const E=P[_];E.type==="folder"&&!E.isExpanded&&E.children.length>0&&r?.(E.id,!0);break;case"ArrowLeft":w.preventDefault();const C=P[_];C.type==="folder"&&C.isExpanded&&r?.(C.id,!1);break;case"Enter":case" ":w.preventDefault();const $=P[_];$.type==="folder"?r?.($.id):i&&i($);break}},S=w=>{const P=["home",...t.map(E=>E.id)],_=P.findIndex(E=>E===u);switch(w.key){case"ArrowDown":w.preventDefault(),_<P.length-1&&f(P[_+1]);break;case"ArrowUp":w.preventDefault(),_>0&&f(P[_-1]);break;case"Enter":case" ":w.preventDefault(),u&&s&&s(u==="home"?"top":u);break}};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[u,e,t,n,r,i,s]);const g=()=>{const x=(k,S=0)=>{const w=k.children.length>0,P=k.type==="folder",_=u===k.id,E=$=>{$.stopPropagation(),f(k.id),P?r?.(k.id):i&&i(k)},C=$=>{$.stopPropagation(),r?.(k.id)};return d.jsxs("div",{className:"nav-node-container",children:[d.jsxs("div",{className:`nav-node ${_?"nav-node--focused":""} ${P?"":"nav-node--leaf"}`,style:{paddingLeft:`${S*20+8}px`},onClick:E,tabIndex:0,role:"treeitem","aria-expanded":P?k.isExpanded:void 0,"aria-level":S+1,onFocus:()=>f(k.id),children:[P&&w&&d.jsx("button",{className:`nav-expander ${k.isExpanded?"nav-expander--expanded":""}`,onClick:C,"aria-label":k.isExpanded?"Collapse":"Expand",children:d.jsx("span",{className:"nav-expander-icon",children:"▶"})}),(!P||!w)&&d.jsx("span",{className:"nav-expander nav-expander--placeholder"}),d.jsx("span",{className:"nav-node-icon",children:k.icon}),d.jsxs("span",{className:"nav-node-label",children:[n_(k.label,o),k.element?.tags?.includes("globals.tags.system")&&d.jsx("span",{className:"system-label",children:"SYS"})]}),k.count!==void 0&&d.jsx("span",{className:"nav-node-count",children:k.count})]}),P&&k.isExpanded&&w&&d.jsx("div",{className:"nav-children",role:"group",children:k.children.map($=>x($,S+1))})]},k.id)};return d.jsx("div",{className:"nav-tree-container",role:"tree","aria-label":"Documentation tree",children:e.map(k=>x(k))})},O=()=>{const x=(k,S)=>{S.preventDefault(),S.stopPropagation(),f(k),s&&s(k==="home"?"top":k)};return d.jsxs("ul",{className:"nav-list",role:"list",children:[d.jsx("li",{children:d.jsx("a",{href:"#top",className:`nav-link nav-link--home ${u==="home"?"nav-link--focused":""}`,onClick:k=>x("home",k),onFocus:()=>f("home"),tabIndex:0,role:"listitem",children:d.jsxs("div",{className:"nav-content",children:[d.jsx("span",{className:"icon",children:"🏠"}),d.jsx("span",{className:"text",children:"Home"})]})})}),t.map(k=>d.jsx("li",{children:d.jsxs("a",{href:`#${k.id}`,className:`nav-link ${u===k.id?"nav-link--focused":""}`,onClick:S=>x(k.id,S),onFocus:()=>f(k.id),tabIndex:0,role:"listitem",children:[d.jsxs("div",{className:"nav-content",children:[d.jsx("span",{className:"icon",children:k.icon}),d.jsx("span",{className:"text",children:k.label})]}),k.count!==null&&d.jsx("span",{className:"nav-badge",children:k.count})]})},k.id))]})};return d.jsx("div",{ref:p,className:`navigation-view navigation-view--${n} ${c}`,role:n==="tree"?"tree":"navigation",children:n==="tree"?g():O()})};function n_(n,e){if(!e.trim())return n;const t=e.toLowerCase(),s=n.toLowerCase().indexOf(t);return s===-1?n:d.jsxs(d.Fragment,{children:[n.substring(0,s),d.jsx("mark",{className:"nav-search-highlight",children:n.substring(s,s+t.length)}),n.substring(s+t.length)]})}function i_(n){const e=[],t=i=>{for(const s of i)e.push(s),s.isExpanded&&s.children.length>0&&t(s.children)};return t(n),e}const tx=({icon:n,title:e,description:t,status:i,actions:s,className:r=""})=>d.jsxs("div",{className:`sidebar-header ${r}`,children:[d.jsxs("div",{className:"sidebar-header__content",children:[d.jsxs("div",{className:"sidebar-header__title-section",children:[d.jsx("h2",{className:"sidebar-header__title",children:e}),i&&d.jsx("div",{className:"sidebar-header__status",children:i})]}),s&&d.jsx("div",{className:"sidebar-header__actions",children:s})]}),t&&d.jsx("p",{className:"sidebar-header__description",children:t})]}),s_=({sidebarWidth:n,sidebarRef:e,isChatOpen:t,onToggleChat:i,leftOffset:s=0,isDarkMode:r=!0,onToggleDarkMode:o,viewMode:c,treeType:u,localNamespaceSearch:f,showSystem:p,treeNodes:g,sections:O,totalComponents:x,onViewModeChange:k,onTreeTypeChange:S,onNamespaceSearchChange:w,onShowSystemChange:P,onTreeNodeClick:_,onToggleExpansion:E,onSectionClick:C})=>d.jsxs("nav",{ref:e,className:"docs-sidebar",style:{width:`${n}px`,left:`${s}px`},children:[d.jsx(tx,{icon:"📚",title:"Documentation",className:"sidebar-header--docs",actions:d.jsx("div",{style:{display:"flex",gap:"8px"},children:d.jsx("button",{className:`sidebar-header__action-btn ${t?"active":""}`,title:t?"Hide Chat":"Show Chat",onClick:i,children:"AI"})})}),d.jsx("div",{className:"docs-main-filters",children:d.jsxs("div",{className:"docs-namespace-input",children:[d.jsx("label",{htmlFor:"namespace-input",children:"Filter by ID"}),d.jsx("input",{id:"namespace-input",type:"text",placeholder:"Filter by ID...",value:f,onChange:$=>w($.target.value),onKeyDown:$=>$.stopPropagation(),autoComplete:"off",autoCorrect:"off",spellCheck:!1})]})}),d.jsx("div",{className:"docs-system-toggle-container",title:"Toggle visibility of system-tagged elements",children:d.jsxs("label",{className:"docs-switch",htmlFor:"show-system-toggle",children:[d.jsx("input",{id:"show-system-toggle",className:"docs-switch-input",type:"checkbox",checked:p,onChange:$=>P($.target.checked)}),d.jsx("span",{className:"docs-switch-track",children:d.jsx("span",{className:"docs-switch-thumb"})}),d.jsx("span",{className:"docs-switch-text",children:d.jsx("span",{className:"system-label",children:"SYSTEM"})})]})}),d.jsxs("div",{className:"docs-view-controls",children:[d.jsxs("div",{className:"docs-view-toggle",children:[d.jsxs("button",{className:`docs-view-button ${c==="list"?"active":""}`,onClick:()=>k("list"),title:"List View",children:[d.jsx("span",{className:"icon",children:"📄"}),d.jsx("span",{className:"label",children:"List"})]}),d.jsxs("button",{className:`docs-view-button ${c==="tree"?"active":""}`,onClick:()=>k("tree"),title:"Tree View",children:[d.jsx("span",{className:"icon",children:"🌳"}),d.jsx("span",{className:"label",children:"Tree"})]})]}),c==="tree"&&d.jsxs("div",{className:"docs-view-toggle",children:[d.jsxs("button",{className:`docs-view-button ${u==="namespace"?"active":""}`,onClick:()=>S("namespace"),title:"By Namespace",children:[d.jsx("span",{className:"icon",children:"📁"}),d.jsx("span",{className:"label",children:"Namespace"})]}),d.jsxs("button",{className:`docs-view-button ${u==="type"?"active":""}`,onClick:()=>S("type"),title:"By Type",children:[d.jsx("span",{className:"icon",children:"🏷️"}),d.jsx("span",{className:"label",children:"Type"})]})]})]}),d.jsx("div",{className:"docs-nav-container",children:d.jsx(t_,{mode:c,nodes:g,sections:O,onNodeClick:_,onSectionClick:C,onToggleExpansion:E,searchTerm:f,className:"docs-navigation"})}),d.jsxs("div",{className:"docs-nav-stats",children:[d.jsx("div",{className:"label",children:"Quick Stats"}),d.jsx("div",{className:"value",children:x}),d.jsx("div",{className:"description",children:"Total Components"})]})]}),r_=n=>{if(!n)return"No schema defined";try{const e=JSON.parse(n);return JSON.stringify(e,null,2)}catch{return n}},l_=n=>{if(!n)return"No configuration";try{const e=JSON.parse(n);return JSON.stringify(e,null,2)}catch{return n}},Jn=n=>{if(!n)return"Unknown location";const e=["workspace","node_modules","home"],t=n.indexOf(":"),i=r=>r.split(/[\\/]+/).filter(Boolean);if(t>0){const r=n.slice(0,t),o=n.slice(t+1);if(e.includes(r)){const c=i(o);if(r==="node_modules"&&c[0]?.startsWith("@"))return c.length<=4?`${r}:${c.join("/")}`:`${r}:/.../${c.slice(-3).join("/")}`;{if(c.length>3)return`${r}:/.../${c.slice(-3).join("/")}`;const u=c.join("/");return`${r}:${u||"."}`}}}const s=i(n);return s.length>3?".../"+s.slice(-3).join("/"):s.join("/")},o_=n=>{switch(n.toLowerCase()){case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️";default:return"📝"}},Te=n=>n.replace(/\./g," › "),a_=n=>!n||n.length===0?"None":n.length===1?n[0]:n.length<=3?n.join(", "):`${n.slice(0,3).join(", ")} and ${n.length-3} more`;var Fc=ex();function xf(){return xf=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},xf.apply(null,arguments)}function c_(n,e){if(n==null)return{};var t={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.indexOf(i)!==-1)continue;t[i]=n[i]}return t}let kf=[],nx=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,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,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?nx:kf).push(t=t+n[e])})();function u_(n){if(n<768)return!1;for(let e=0,t=kf.length;;){let i=e+t>>1;if(n<kf[i])t=i;else if(n>=nx[i])e=i+1;else return!0;if(e==t)return!1}}function x0(n){return n>=127462&&n<=127487}const k0=8205;function h_(n,e,t=!0,i=!0){return(t?ix:d_)(n,e,i)}function ix(n,e,t){if(e==n.length)return e;e&&sx(n.charCodeAt(e))&&rx(n.charCodeAt(e-1))&&e--;let i=Rd(n,e);for(e+=S0(i);e<n.length;){let s=Rd(n,e);if(i==k0||s==k0||t&&u_(s))e+=S0(s),i=s;else if(x0(s)){let r=0,o=e-2;for(;o>=0&&x0(Rd(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function d_(n,e,t){for(;e>0;){let i=ix(n,e-2,t);if(i<e)return i;e--}return 0}function Rd(n,e){let t=n.charCodeAt(e);if(!rx(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return sx(i)?(t-55296<<10)+(i-56320)+65536:t}function sx(n){return n>=56320&&n<57344}function rx(n){return n>=55296&&n<56320}function S0(n){return n<65536?1:2}class Ve{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Gr(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),mi.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Gr(this,e,t);let i=[];return this.decompose(e,t,i,0),mi.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new ho(this),r=new ho(e);for(let o=t,c=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(c+=s.value.length,s.done||c>=i)return!0}}iter(e=1){return new ho(this,e)}iterRange(e,t=this.length){return new lx(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new ox(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ve.empty:e.length<=32?new mt(e):mi.from(mt.split(e,[]))}}class mt extends Ve{constructor(e,t=f_(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],c=s+o.length;if((t?i:c)>=e)return new p_(s,c,i,o);s=c+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new mt(w0(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),c=Nc(r.text,o.text.slice(),0,r.length);if(c.length<=32)i.push(new mt(c,o.length+r.length));else{let u=c.length>>1;i.push(new mt(c.slice(0,u)),new mt(c.slice(u)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof mt))return super.replace(e,t,i);[e,t]=Gr(this,e,t);let s=Nc(this.text,Nc(i.text,w0(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new mt(s,r):mi.from(mt.split(s,[]),r)}sliceString(e,t=this.length,i=`
40
+ */var v0;function Jb(){if(v0)return Wl;v0=1;var n=$p(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,r={key:!0,ref:!0,__self:!0,__source:!0};function o(c,u,f){var p,g={},O=null,x=null;f!==void 0&&(O=""+f),u.key!==void 0&&(O=""+u.key),u.ref!==void 0&&(x=u.ref);for(p in u)i.call(u,p)&&!r.hasOwnProperty(p)&&(g[p]=u[p]);if(c&&c.defaultProps)for(p in u=c.defaultProps,u)g[p]===void 0&&(g[p]=u[p]);return{$$typeof:e,type:c,key:O,ref:x,props:g,_owner:s.current}}return Wl.Fragment=t,Wl.jsx=o,Wl.jsxs=o,Wl}var y0;function e_(){return y0||(y0=1,Ad.exports=Jb()),Ad.exports}var d=e_();const t_=({mode:n,nodes:e=[],sections:t=[],onNodeClick:i,onSectionClick:s,onToggleExpansion:r,searchTerm:o="",className:c=""})=>{const[u,f]=B.useState(null),p=B.useRef(null);B.useEffect(()=>{const x=w=>{!u||!p.current?.contains(document.activeElement)||(n==="tree"?k(w):S(w))},k=w=>{const P=i_(e),_=P.findIndex(E=>E.id===u);switch(w.key){case"ArrowDown":w.preventDefault(),_<P.length-1&&f(P[_+1].id);break;case"ArrowUp":w.preventDefault(),_>0&&f(P[_-1].id);break;case"ArrowRight":w.preventDefault();const E=P[_];E.type==="folder"&&!E.isExpanded&&E.children.length>0&&r?.(E.id,!0);break;case"ArrowLeft":w.preventDefault();const C=P[_];C.type==="folder"&&C.isExpanded&&r?.(C.id,!1);break;case"Enter":case" ":w.preventDefault();const $=P[_];$.type==="folder"?r?.($.id):i&&i($);break}},S=w=>{const P=["home",...t.map(E=>E.id)],_=P.findIndex(E=>E===u);switch(w.key){case"ArrowDown":w.preventDefault(),_<P.length-1&&f(P[_+1]);break;case"ArrowUp":w.preventDefault(),_>0&&f(P[_-1]);break;case"Enter":case" ":w.preventDefault(),u&&s&&s(u==="home"?"top":u);break}};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[u,e,t,n,r,i,s]);const g=()=>{const x=(k,S=0)=>{const w=k.children.length>0,P=k.type==="folder",_=u===k.id,E=$=>{$.stopPropagation(),f(k.id),P?r?.(k.id):i&&i(k)},C=$=>{$.stopPropagation(),r?.(k.id)};return d.jsxs("div",{className:"nav-node-container",children:[d.jsxs("div",{className:`nav-node ${_?"nav-node--focused":""} ${P?"":"nav-node--leaf"}`,style:{paddingLeft:`${S*10+8}px`},onClick:E,tabIndex:0,role:"treeitem","aria-expanded":P?k.isExpanded:void 0,"aria-level":S+1,onFocus:()=>f(k.id),children:[P&&w&&d.jsx("button",{className:`nav-expander ${k.isExpanded?"nav-expander--expanded":""}`,onClick:C,"aria-label":k.isExpanded?"Collapse":"Expand",children:d.jsx("span",{className:"nav-expander-icon",children:"▶"})}),(!P||!w)&&d.jsx("span",{className:"nav-expander nav-expander--placeholder"}),d.jsx("span",{className:"nav-node-icon",children:k.icon}),d.jsxs("span",{className:"nav-node-label",children:[n_(k.label,o),k.element?.tags?.includes("globals.tags.system")&&d.jsx("span",{className:"system-label",children:"SYS"})]}),k.count!==void 0&&d.jsx("span",{className:"nav-node-count",children:k.count})]}),P&&k.isExpanded&&w&&d.jsx("div",{className:"nav-children",role:"group",children:k.children.map($=>x($,S+1))})]},k.id)};return d.jsx("div",{className:"nav-tree-container",role:"tree","aria-label":"Documentation tree",children:e.map(k=>x(k))})},O=()=>{const x=(k,S)=>{S.preventDefault(),S.stopPropagation(),f(k),s&&s(k==="home"?"top":k)};return d.jsxs("ul",{className:"nav-list",role:"list",children:[d.jsx("li",{children:d.jsx("a",{href:"#top",className:`nav-link nav-link--home ${u==="home"?"nav-link--focused":""}`,onClick:k=>x("home",k),onFocus:()=>f("home"),tabIndex:0,role:"listitem",children:d.jsxs("div",{className:"nav-content",children:[d.jsx("span",{className:"icon",children:"🏠"}),d.jsx("span",{className:"text",children:"Home"})]})})}),t.map(k=>d.jsx("li",{children:d.jsxs("a",{href:`#${k.id}`,className:`nav-link ${u===k.id?"nav-link--focused":""}`,onClick:S=>x(k.id,S),onFocus:()=>f(k.id),tabIndex:0,role:"listitem",children:[d.jsxs("div",{className:"nav-content",children:[d.jsx("span",{className:"icon",children:k.icon}),d.jsx("span",{className:"text",children:k.label})]}),k.count!==null&&d.jsx("span",{className:"nav-badge",children:k.count})]})},k.id))]})};return d.jsx("div",{ref:p,className:`navigation-view navigation-view--${n} ${c}`,role:n==="tree"?"tree":"navigation",children:n==="tree"?g():O()})};function n_(n,e){if(!e.trim())return n;const t=e.toLowerCase(),s=n.toLowerCase().indexOf(t);return s===-1?n:d.jsxs(d.Fragment,{children:[n.substring(0,s),d.jsx("mark",{className:"nav-search-highlight",children:n.substring(s,s+t.length)}),n.substring(s+t.length)]})}function i_(n){const e=[],t=i=>{for(const s of i)e.push(s),s.isExpanded&&s.children.length>0&&t(s.children)};return t(n),e}const tx=({icon:n,title:e,description:t,status:i,actions:s,className:r=""})=>d.jsxs("div",{className:`sidebar-header ${r}`,children:[d.jsxs("div",{className:"sidebar-header__content",children:[d.jsxs("div",{className:"sidebar-header__title-section",children:[d.jsx("h2",{className:"sidebar-header__title",children:e}),i&&d.jsx("div",{className:"sidebar-header__status",children:i})]}),s&&d.jsx("div",{className:"sidebar-header__actions",children:s})]}),t&&d.jsx("p",{className:"sidebar-header__description",children:t})]}),s_=({sidebarWidth:n,sidebarRef:e,isChatOpen:t,onToggleChat:i,leftOffset:s=0,isDarkMode:r=!0,onToggleDarkMode:o,viewMode:c,treeType:u,localNamespaceSearch:f,showSystem:p,treeNodes:g,sections:O,totalComponents:x,onViewModeChange:k,onTreeTypeChange:S,onNamespaceSearchChange:w,onShowSystemChange:P,onTreeNodeClick:_,onToggleExpansion:E,onSectionClick:C})=>d.jsxs("nav",{ref:e,className:"docs-sidebar",style:{width:`${n}px`,left:`${s}px`},children:[d.jsx(tx,{icon:"📚",title:"Runner Dev",className:"sidebar-header--docs",actions:d.jsx("div",{style:{display:"flex",gap:"8px"},children:d.jsx("button",{className:`sidebar-header__action-btn ${t?"active":""}`,title:t?"Hide Chat":"Show Chat",onClick:i,children:"AI"})})}),d.jsx("div",{className:"docs-main-filters",children:d.jsxs("div",{className:"docs-namespace-input",children:[d.jsx("label",{htmlFor:"namespace-input",children:"Filter by ID"}),d.jsx("input",{id:"namespace-input",type:"text",placeholder:"Filter by ID...",value:f,onChange:$=>w($.target.value),onKeyDown:$=>$.stopPropagation(),autoComplete:"off",autoCorrect:"off",spellCheck:!1})]})}),d.jsx("div",{className:"docs-system-toggle-container",title:"Toggle visibility of system-tagged elements",children:d.jsxs("label",{className:"docs-switch",htmlFor:"show-system-toggle",children:[d.jsx("input",{id:"show-system-toggle",className:"docs-switch-input",type:"checkbox",checked:p,onChange:$=>P($.target.checked)}),d.jsx("span",{className:"docs-switch-track",children:d.jsx("span",{className:"docs-switch-thumb"})}),d.jsx("span",{className:"docs-switch-text",children:d.jsx("span",{className:"system-label",children:"SYSTEM"})})]})}),d.jsxs("div",{className:"docs-view-controls",children:[d.jsxs("div",{className:"docs-view-toggle",children:[d.jsxs("button",{className:`docs-view-button ${c==="list"?"active":""}`,onClick:()=>k("list"),title:"List View",children:[d.jsx("span",{className:"icon",children:"📄"}),d.jsx("span",{className:"label",children:"List"})]}),d.jsxs("button",{className:`docs-view-button ${c==="tree"?"active":""}`,onClick:()=>k("tree"),title:"Tree View",children:[d.jsx("span",{className:"icon",children:"🌳"}),d.jsx("span",{className:"label",children:"Tree"})]})]}),c==="tree"&&d.jsxs("div",{className:"docs-view-toggle",children:[d.jsxs("button",{className:`docs-view-button ${u==="namespace"?"active":""}`,onClick:()=>S("namespace"),title:"By Namespace",children:[d.jsx("span",{className:"icon",children:"📁"}),d.jsx("span",{className:"label",children:"Namespace"})]}),d.jsxs("button",{className:`docs-view-button ${u==="type"?"active":""}`,onClick:()=>S("type"),title:"By Type",children:[d.jsx("span",{className:"icon",children:"🏷️"}),d.jsx("span",{className:"label",children:"Type"})]})]})]}),d.jsx("div",{className:"docs-nav-container",children:d.jsx(t_,{mode:c,nodes:g,sections:O,onNodeClick:_,onSectionClick:C,onToggleExpansion:E,searchTerm:f,className:"docs-navigation"})}),d.jsxs("div",{className:"docs-nav-stats",children:[d.jsx("div",{className:"label",children:"Quick Stats"}),d.jsx("div",{className:"value",children:x}),d.jsx("div",{className:"description",children:"Total Components"})]})]}),r_=n=>{if(!n)return"No schema defined";try{const e=JSON.parse(n);return JSON.stringify(e,null,2)}catch{return n}},l_=n=>{if(!n)return"No configuration";try{const e=JSON.parse(n);return JSON.stringify(e,null,2)}catch{return n}},Jn=n=>{if(!n)return"Unknown location";const e=["workspace","node_modules","home"],t=n.indexOf(":"),i=r=>r.split(/[\\/]+/).filter(Boolean);if(t>0){const r=n.slice(0,t),o=n.slice(t+1);if(e.includes(r)){const c=i(o);if(r==="node_modules"&&c[0]?.startsWith("@"))return c.length<=4?`${r}:${c.join("/")}`:`${r}:/.../${c.slice(-3).join("/")}`;{if(c.length>3)return`${r}:/.../${c.slice(-3).join("/")}`;const u=c.join("/");return`${r}:${u||"."}`}}}const s=i(n);return s.length>3?".../"+s.slice(-3).join("/"):s.join("/")},o_=n=>{switch(n.toLowerCase()){case"error":return"❌";case"warning":return"⚠️";case"info":return"ℹ️";default:return"📝"}},Te=n=>n.replace(/\./g," › "),a_=n=>!n||n.length===0?"None":n.length===1?n[0]:n.length<=3?n.join(", "):`${n.slice(0,3).join(", ")} and ${n.length-3} more`;var Fc=ex();function xf(){return xf=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},xf.apply(null,arguments)}function c_(n,e){if(n==null)return{};var t={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.indexOf(i)!==-1)continue;t[i]=n[i]}return t}let kf=[],nx=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l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29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?nx:kf).push(t=t+n[e])})();function u_(n){if(n<768)return!1;for(let e=0,t=kf.length;;){let i=e+t>>1;if(n<kf[i])t=i;else if(n>=nx[i])e=i+1;else return!0;if(e==t)return!1}}function x0(n){return n>=127462&&n<=127487}const k0=8205;function h_(n,e,t=!0,i=!0){return(t?ix:d_)(n,e,i)}function ix(n,e,t){if(e==n.length)return e;e&&sx(n.charCodeAt(e))&&rx(n.charCodeAt(e-1))&&e--;let i=Rd(n,e);for(e+=S0(i);e<n.length;){let s=Rd(n,e);if(i==k0||s==k0||t&&u_(s))e+=S0(s),i=s;else if(x0(s)){let r=0,o=e-2;for(;o>=0&&x0(Rd(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function d_(n,e,t){for(;e>0;){let i=ix(n,e-2,t);if(i<e)return i;e--}return 0}function Rd(n,e){let t=n.charCodeAt(e);if(!rx(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return sx(i)?(t-55296<<10)+(i-56320)+65536:t}function sx(n){return n>=56320&&n<57344}function rx(n){return n>=55296&&n<56320}function S0(n){return n<65536?1:2}class Ve{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Gr(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),mi.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Gr(this,e,t);let i=[];return this.decompose(e,t,i,0),mi.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new ho(this),r=new ho(e);for(let o=t,c=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(c+=s.value.length,s.done||c>=i)return!0}}iter(e=1){return new ho(this,e)}iterRange(e,t=this.length){return new lx(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new ox(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ve.empty:e.length<=32?new mt(e):mi.from(mt.split(e,[]))}}class mt extends Ve{constructor(e,t=f_(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],c=s+o.length;if((t?i:c)>=e)return new p_(s,c,i,o);s=c+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new mt(w0(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),c=Nc(r.text,o.text.slice(),0,r.length);if(c.length<=32)i.push(new mt(c,o.length+r.length));else{let u=c.length>>1;i.push(new mt(c.slice(0,u)),new mt(c.slice(u)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof mt))return super.replace(e,t,i);[e,t]=Gr(this,e,t);let s=Nc(this.text,Nc(i.text,w0(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new mt(s,r):mi.from(mt.split(s,[]),r)}sliceString(e,t=this.length,i=`
41
41
  `){[e,t]=Gr(this,e,t);let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let c=this.text[o],u=r+c.length;r>e&&o&&(s+=i),e<u&&t>r&&(s+=c.slice(Math.max(0,e-r),t-r)),r=u+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new mt(i,s)),i=[],s=-1);return s>-1&&t.push(new mt(i,s)),t}}class mi extends Ve{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],c=s+o.length,u=i+o.lines-1;if((t?u:c)>=e)return o.lineInner(e,t,i,s);s=c+1,i=u+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let c=this.children[r],u=o+c.length;if(e<=u&&t>=o){let f=s&((o<=e?1:0)|(u>=t?2:0));o>=e&&u<=t&&!f?i.push(c):c.decompose(e-o,t-o,i,f)}o=u+1}}replace(e,t,i){if([e,t]=Gr(this,e,t),i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],c=r+o.length;if(e>=r&&t<=c){let u=o.replace(e-r,t-r,i),f=this.lines-o.lines+u.lines;if(u.lines<f>>4&&u.lines>f>>6){let p=this.children.slice();return p[s]=u,new mi(p,this.length-(t-e)+i.length)}return super.replace(r,c,u)}r=c+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
42
42
  `){[e,t]=Gr(this,e,t);let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let c=this.children[r],u=o+c.length;o>e&&r&&(s+=i),e<u&&t>o&&(s+=c.sliceString(e-o,t-o,i)),o=u+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof mi))return 0;let i=0,[s,r,o,c]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==c)return i;let u=this.children[s],f=e.children[r];if(u!=f)return i+u.scanIdentical(f,t);i+=u.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let x of e)i+=x.lines;if(i<32){let x=[];for(let k of e)k.flatten(x);return new mt(x,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,c=[],u=0,f=-1,p=[];function g(x){let k;if(x.lines>r&&x instanceof mi)for(let S of x.children)g(S);else x.lines>o&&(u>o||!u)?(O(),c.push(x)):x instanceof mt&&u&&(k=p[p.length-1])instanceof mt&&x.lines+k.lines<=32?(u+=x.lines,f+=x.length+1,p[p.length-1]=new mt(k.text.concat(x.text),k.length+1+x.length)):(u+x.lines>s&&O(),u+=x.lines,f+=x.length+1,p.push(x))}function O(){u!=0&&(c.push(p.length==1?p[0]:mi.from(p,f)),f=-1,u=p.length=0)}for(let x of e)g(x);return O(),c.length==1?c[0]:new mi(c,t)}}Ve.empty=new mt([""],0);function f_(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Nc(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let c=n[r],u=s+c.length;u>=t&&(u>i&&(c=c.slice(0,i-s)),s<t&&(c=c.slice(t-s)),o?(e[e.length-1]+=c,o=!1):e.push(c)),s=u+1}return e}function w0(n,e,t){return Nc(n,[""],e,t)}class ho{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof mt?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,c=s instanceof mt?s.text.length:s.children.length;if(o==(t>0?c:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
43
43
  `,this;e--}else if(s instanceof mt){let u=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,u.length>Math.max(0,e))return this.value=e==0?u:t>0?u.slice(e):u.slice(0,u.length-e),this;e-=u.length}else{let u=s.children[o+(t<0?-1:0)];e>u.length?(e-=u.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(u),this.offsets.push(t>0?1:(u instanceof mt?u.text.length:u.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class lx{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new ho(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ox{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ve.prototype[Symbol.iterator]=function(){return this.iter()},ho.prototype[Symbol.iterator]=lx.prototype[Symbol.iterator]=ox.prototype[Symbol.iterator]=function(){return this});class p_{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}function Gr(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function zt(n,e,t=!0,i=!0){return h_(n,e,t,i)}function m_(n){return n>=56320&&n<57344}function g_(n){return n>=55296&&n<56320}function mn(n,e){let t=n.charCodeAt(e);if(!g_(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return m_(i)?(t-55296<<10)+(i-56320)+65536:t}function Qp(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function gi(n){return n<65536?1:2}const Sf=/\r\n?|\n/;var Vt=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(Vt||(Vt={}));class Si{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){wf(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s,i)}return new Si(e)}composeDesc(e){return this.empty?e:e.empty?this:ax(this,e)}mapDesc(e,t=!1){return e.empty?this:bf(this,e,t)}mapPos(e,t=-1,i=Vt.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let c=this.sections[o++],u=this.sections[o++],f=s+c;if(u<0){if(f>e)return r+(e-s);r+=c}else{if(i!=Vt.Simple&&f>=e&&(i==Vt.TrackDel&&s<e&&f>e||i==Vt.TrackBefore&&s<e||i==Vt.TrackAfter&&f>e))return null;if(f>e||f==e&&t<0&&!c)return e==s||t<0?r:r+u;r+=u}s=f}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i<this.sections.length&&s<=t;){let r=this.sections[i++],o=this.sections[i++],c=s+r;if(o>=0&&s<=t&&c>=e)return s<e&&c>t?"cover":!0;s=c}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+i+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Si(e)}static create(e){return new Si(e)}}class $t extends Si{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return wf(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return bf(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],c=t[s+1];if(c>=0){t[s]=c,t[s+1]=o;let u=s>>1;for(;i.length<u;)i.push(Ve.empty);i.push(o?e.slice(r,r+o):Ve.empty)}r+=o}return new $t(t,i)}compose(e){return this.empty?e:e.empty?this:ax(this,e,!0)}map(e,t=!1){return e.empty?this:bf(this,e,t,!0)}iterChanges(e,t=!1){wf(this,e,t)}get desc(){return Si.create(this.sections)}filter(e){let t=[],i=[],s=[],r=new ko(this);e:for(let o=0,c=0;;){let u=o==e.length?1e9:e[o++];for(;c<u||c==u&&r.len==0;){if(r.done)break e;let p=Math.min(r.len,u-c);Ft(s,p,-1);let g=r.ins==-1?-1:r.off==0?r.ins:0;Ft(t,p,g),g>0&&Os(i,t,r.text),r.forward(p),c+=p}let f=e[o++];for(;c<f;){if(r.done)break e;let p=Math.min(r.len,f-c);Ft(t,p,-1),Ft(s,p,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(p),c+=p}}return{changes:new $t(t,i),filtered:Si.create(s)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],s=this.sections[t+1];s<0?e.push(i):s==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,c=null;function u(p=!1){if(!p&&!s.length)return;o<t&&Ft(s,t-o,-1);let g=new $t(s,r);c=c?c.compose(g.map(c)):g,s=[],r=[],o=0}function f(p){if(Array.isArray(p))for(let g of p)f(g);else if(p instanceof $t){if(p.length!=t)throw new RangeError(`Mismatched change set length (got ${p.length}, expected ${t})`);u(),c=c?c.compose(p.map(c)):p}else{let{from:g,to:O=g,insert:x}=p;if(g>O||g<0||O>t)throw new RangeError(`Invalid change range ${g} to ${O} (in doc of length ${t})`);let k=x?typeof x=="string"?Ve.of(x.split(i||Sf)):x:Ve.empty,S=k.length;if(g==O&&S==0)return;g<o&&u(),g>o&&Ft(s,g-o,-1),Ft(s,O-g,S),Os(r,s,k),o=O}}return f(e),u(!c),c}static empty(e){return new $t(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;s<e.length;s++){let r=e[s];if(typeof r=="number")t.push(r,-1);else{if(!Array.isArray(r)||typeof r[0]!="number"||r.some((o,c)=>c&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length<s;)i.push(Ve.empty);i[s]=Ve.of(r.slice(1)),t.push(r[0],i[s].length)}}}return new $t(t,i)}static createSet(e,t){return new $t(e,t)}}function Ft(n,e,t,i=!1){if(e==0&&t<=0)return;let s=n.length-2;s>=0&&t<=0&&t==n[s+1]?n[s]+=e:s>=0&&e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function Os(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(Ve.empty);n.push(t)}}function wf(n,e,t){let i=n.inserted;for(let s=0,r=0,o=0;o<n.sections.length;){let c=n.sections[o++],u=n.sections[o++];if(u<0)s+=c,r+=c;else{let f=s,p=r,g=Ve.empty;for(;f+=c,p+=u,u&&i&&(g=g.append(i[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)c=n.sections[o++],u=n.sections[o++];e(s,f,r,p,g),s=f,r=p}}}function bf(n,e,t,i=!1){let s=[],r=i?[]:null,o=new ko(n),c=new ko(e);for(let u=-1;;){if(o.done&&c.len||c.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&c.ins==-1){let f=Math.min(o.len,c.len);Ft(s,f,-1),o.forward(f),c.forward(f)}else if(c.ins>=0&&(o.ins<0||u==o.i||o.off==0&&(c.len<o.len||c.len==o.len&&!t))){let f=c.len;for(Ft(s,c.ins,-1);f;){let p=Math.min(o.len,f);o.ins>=0&&u<o.i&&o.len<=p&&(Ft(s,0,o.ins),r&&Os(r,s,o.text),u=o.i),o.forward(p),f-=p}c.next()}else if(o.ins>=0){let f=0,p=o.len;for(;p;)if(c.ins==-1){let g=Math.min(p,c.len);f+=g,p-=g,c.forward(g)}else if(c.ins==0&&c.len<p)p-=c.len,c.next();else break;Ft(s,f,u<o.i?o.ins:0),r&&u<o.i&&Os(r,s,o.text),u=o.i,o.forward(o.len-p)}else{if(o.done&&c.done)return r?$t.createSet(s,r):Si.create(s);throw new Error("Mismatched change set lengths")}}}function ax(n,e,t=!1){let i=[],s=t?[]:null,r=new ko(n),o=new ko(e);for(let c=!1;;){if(r.done&&o.done)return s?$t.createSet(i,s):Si.create(i);if(r.ins==0)Ft(i,r.len,0,c),r.next();else if(o.len==0&&!o.done)Ft(i,0,o.ins,c),s&&Os(s,i,o.text),o.next();else{if(r.done||o.done)throw new Error("Mismatched change set lengths");{let u=Math.min(r.len2,o.len),f=i.length;if(r.ins==-1){let p=o.ins==-1?-1:o.off?0:o.ins;Ft(i,u,p,c),s&&p&&Os(s,i,o.text)}else o.ins==-1?(Ft(i,r.off?0:r.len,u,c),s&&Os(s,i,r.textBit(u))):(Ft(i,r.off?0:r.len,o.off?0:o.ins,c),s&&!o.off&&Os(s,i,o.text));c=(r.ins>u||o.ins>=0&&o.len>u)&&(c||i.length>f),r.forward2(u),o.forward(u)}}}}class ko{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Ve.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?Ve.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Bs{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new Bs(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return te.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return te.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return te.range(e.anchor,e.head)}static create(e,t,i){return new Bs(e,t,i)}}class te{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:te.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new te([this.main],0)}addRange(e,t=!0){return te.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,te.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new te(e.ranges.map(t=>Bs.fromJSON(t)),e.main)}static single(e,t=e){return new te([te.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;s<e.length;s++){let r=e[s];if(r.empty?r.from<=i:r.from<i)return te.normalized(e.slice(),t);i=r.to}return new te(e,t)}static cursor(e,t=0,i,s){return Bs.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i))|(s??16777215)<<6)}static range(e,t,i,s){let r=(i??16777215)<<6|(s==null?7:Math.min(6,s));return t<e?Bs.create(t,e,48|r):Bs.create(e,t,(t>e?8:0)|r)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;s<e.length;s++){let r=e[s],o=e[s-1];if(r.empty?r.from<=o.to:r.from<o.to){let c=o.from,u=Math.max(r.to,o.to);s<=t&&t--,e.splice(--s,2,r.anchor>r.head?te.range(u,c):te.range(c,u))}}return new te(e,t)}}function cx(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Pp=0;class Se{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=Pp++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new Se(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Cp),!!e.static,e.enables)}of(e){return new Ec([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ec(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ec(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Cp(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Ec{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=Pp++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,c=this.type==2,u=!1,f=!1,p=[];for(let g of this.dependencies)g=="doc"?u=!0:g=="selection"?f=!0:(((t=e[g.id])!==null&&t!==void 0?t:1)&1)==0&&p.push(e[g.id]);return{create(g){return g.values[o]=i(g),1},update(g,O){if(u&&O.docChanged||f&&(O.docChanged||O.selection)||_f(g,p)){let x=i(g);if(c?!b0(x,g.values[o],s):!s(x,g.values[o]))return g.values[o]=x,1}return 0},reconfigure:(g,O)=>{let x,k=O.config.address[r];if(k!=null){let S=Gc(O,k);if(this.dependencies.every(w=>w instanceof Se?O.facet(w)===g.facet(w):w instanceof Rt?O.field(w,!1)==g.field(w,!1):!0)||(c?b0(x=i(g),S,s):s(x=i(g),S)))return g.values[o]=S,0}else x=i(g);return g.values[o]=x,1}}}}function b0(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function _f(n,e){let t=!1;for(let i of e)fo(n,i)&1&&(t=!0);return t}function O_(n,e,t){let i=t.map(u=>n[u.id]),s=t.map(u=>u.type),r=i.filter(u=>!(u&1)),o=n[e.id]>>1;function c(u){let f=[];for(let p=0;p<i.length;p++){let g=Gc(u,i[p]);if(s[p]==2)for(let O of g)f.push(O);else f.push(g)}return e.combine(f)}return{create(u){for(let f of i)fo(u,f);return u.values[o]=c(u),1},update(u,f){if(!_f(u,r))return 0;let p=c(u);return e.compare(p,u.values[o])?0:(u.values[o]=p,1)},reconfigure(u,f){let p=_f(u,i),g=f.config.facets[e.id],O=f.facet(e);if(g&&!p&&Cp(t,g))return u.values[o]=O,0;let x=c(u);return e.compare(x,O)?(u.values[o]=O,0):(u.values[o]=x,1)}}}const lc=Se.define({static:!0});class Rt{constructor(e,t,i,s,r){this.id=e,this.createF=t,this.updateF=i,this.compareF=s,this.spec=r,this.provides=void 0}static define(e){let t=new Rt(Pp++,e.create,e.update,e.compare||((i,s)=>i===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(lc).find(i=>i.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>{let r=i.facet(lc),o=s.facet(lc),c;return(c=r.find(u=>u.field==this))&&c!=o.find(u=>u.field==this)?(i.values[t]=c.create(i),1):s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}}init(e){return[this,lc.of({field:this,create:e})]}get extension(){return this}}const Vs={lowest:4,low:3,default:2,high:1,highest:0};function Fl(n){return e=>new ux(e,n)}const $s={highest:Fl(Vs.highest),high:Fl(Vs.high),default:Fl(Vs.default),low:Fl(Vs.low),lowest:Fl(Vs.lowest)};class ux{constructor(e,t){this.inner=e,this.prec=t}}class Pu{of(e){return new $f(this,e)}reconfigure(e){return Pu.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class $f{constructor(e,t){this.compartment=e,this.inner=t}}class Uc{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let O of v_(e,t,o))O instanceof Rt?s.push(O):(r[O.facet.id]||(r[O.facet.id]=[])).push(O);let c=Object.create(null),u=[],f=[];for(let O of s)c[O.id]=f.length<<1,f.push(x=>O.slot(x));let p=i?.config.facets;for(let O in r){let x=r[O],k=x[0].facet,S=p&&p[O]||[];if(x.every(w=>w.type==0))if(c[k.id]=u.length<<1|1,Cp(S,x))u.push(i.facet(k));else{let w=k.combine(x.map(P=>P.value));u.push(i&&k.compare(w,i.facet(k))?i.facet(k):w)}else{for(let w of x)w.type==0?(c[w.id]=u.length<<1|1,u.push(w.value)):(c[w.id]=f.length<<1,f.push(P=>w.dynamicSlot(P)));c[k.id]=f.length<<1,f.push(w=>O_(w,k,x))}}let g=f.map(O=>O(c));return new Uc(e,o,g,c,u,r)}}function v_(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,c){let u=s.get(o);if(u!=null){if(u<=c)return;let f=i[u].indexOf(o);f>-1&&i[u].splice(f,1),o instanceof $f&&t.delete(o.compartment)}if(s.set(o,c),Array.isArray(o))for(let f of o)r(f,c);else if(o instanceof $f){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let f=e.get(o.compartment)||o.inner;t.set(o.compartment,f),r(f,c)}else if(o instanceof ux)r(o.inner,o.prec);else if(o instanceof Rt)i[c].push(o),o.provides&&r(o.provides,c);else if(o instanceof Ec)i[c].push(o),o.facet.extensions&&r(o.facet.extensions,Vs.default);else{let f=o.extension;if(!f)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(f,c)}}return r(n,Vs.default),i.reduce((o,c)=>o.concat(c))}function fo(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Gc(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const hx=Se.define(),Qf=Se.define({combine:n=>n.some(e=>e),static:!0}),dx=Se.define({combine:n=>n.length?n[0]:void 0,static:!0}),fx=Se.define(),px=Se.define(),mx=Se.define(),gx=Se.define({combine:n=>n.length?n[0]:!1});class bi{constructor(e,t){this.type=e,this.value=t}static define(){return new y_}}class y_{of(e){return new bi(this,e)}}class x_{constructor(e){this.map=e}of(e){return new Ae(this,e)}}class Ae{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new Ae(this.type,t)}is(e){return this.type==e}static define(e={}){return new x_(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}Ae.reconfigure=Ae.define();Ae.appendConfig=Ae.define();class St{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&cx(i,t.newLength),r.some(c=>c.type==St.time)||(this.annotations=r.concat(St.time.of(Date.now())))}static create(e,t,i,s,r,o){return new St(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(St.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}St.time=bi.define();St.userEvent=bi.define();St.addToHistory=bi.define();St.remote=bi.define();function k_(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i<n.length&&(s==e.length||e[s]>=n[i]))r=n[i++],o=n[i++];else if(s<e.length)r=e[s++],o=e[s++];else return t;!t.length||t[t.length-1]<r?t.push(r,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Ox(n,e,t){var i;let s,r,o;return t?(s=e.changes,r=$t.empty(e.changes.length),o=n.changes.compose(e.changes)):(s=e.changes.map(n.changes),r=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(s)),{changes:o,selection:e.selection?e.selection.map(r):(i=n.selection)===null||i===void 0?void 0:i.map(s),effects:Ae.mapEffects(n.effects,s).concat(Ae.mapEffects(e.effects,r)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function Pf(n,e,t){let i=e.selection,s=Br(e.annotations);return e.userEvent&&(s=s.concat(St.userEvent.of(e.userEvent))),{changes:e.changes instanceof $t?e.changes:$t.of(e.changes||[],t,n.facet(dx)),selection:i&&(i instanceof te?i:te.single(i.anchor,i.head)),effects:Br(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function vx(n,e,t){let i=Pf(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let r=1;r<e.length;r++){e[r].filter===!1&&(t=!1);let o=!!e[r].sequential;i=Ox(i,Pf(n,e[r],o?i.changes.newLength:n.doc.length),o)}let s=St.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return w_(t?S_(s):s)}function S_(n){let e=n.startState,t=!0;for(let s of e.facet(fx)){let r=s(n);if(r===!1){t=!1;break}Array.isArray(r)&&(t=t===!0?r:k_(t,r))}if(t!==!0){let s,r;if(t===!1)r=n.changes.invertedDesc,s=$t.empty(e.doc.length);else{let o=n.changes.filter(t);s=o.changes,r=o.filtered.mapDesc(o.changes).invertedDesc}n=St.create(e,s,n.selection&&n.selection.map(r),Ae.mapEffects(n.effects,r),n.annotations,n.scrollIntoView)}let i=e.facet(px);for(let s=i.length-1;s>=0;s--){let r=i[s](n);r instanceof St?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof St?n=r[0]:n=vx(e,Br(r),!1)}return n}function w_(n){let e=n.startState,t=e.facet(mx),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=Ox(i,Pf(e,r,n.changes.newLength),!0))}return i==n?n:St.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const b_=[];function Br(n){return n==null?b_:Array.isArray(n)?n:[n]}var ct=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(ct||(ct={}));const __=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Cf;try{Cf=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function $_(n){if(Cf)return Cf.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||__.test(t)))return!0}return!1}function Q_(n){return e=>{if(!/\S/.test(e))return ct.Space;if($_(e))return ct.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return ct.Word;return ct.Other}}class Ze{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let c=0;c<this.config.dynamicSlots.length;c++)fo(this,c<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return fo(this,i),Gc(this,i)}update(...e){return vx(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:s}=t;for(let c of e.effects)c.is(Pu.reconfigure)?(t&&(s=new Map,t.compartments.forEach((u,f)=>s.set(f,u)),t=null),s.set(c.value.compartment,c.value.extension)):c.is(Ae.reconfigure)?(t=null,i=c.value):c.is(Ae.appendConfig)&&(t=null,i=Br(i).concat(c.value));let r;t?r=e.startState.values.slice():(t=Uc.resolve(i,s,this),r=new Ze(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(u,f)=>f.reconfigure(u,this),null).values);let o=e.startState.facet(Qf)?e.newSelection:e.newSelection.asSingle();new Ze(t,e.newDoc,o,r,(c,u)=>u.update(c,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:te.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=Br(i.effects);for(let c=1;c<t.ranges.length;c++){let u=e(t.ranges[c]),f=this.changes(u.changes),p=f.map(s);for(let O=0;O<c;O++)r[O]=r[O].map(p);let g=s.mapDesc(f,!0);r.push(u.range.map(g)),s=s.compose(p),o=Ae.mapEffects(o,p).concat(Ae.mapEffects(Br(u.effects),g))}return{changes:s,selection:te.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof $t?e:$t.of(e,this.doc.length,this.facet(Ze.lineSeparator))}toText(e){return Ve.of(e.split(this.facet(Ze.lineSeparator)||Sf))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(fo(this,t),Gc(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let s=e[i];s instanceof Rt&&this.config.address[s.id]!=null&&(t[i]=s.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(i){for(let r in i)if(Object.prototype.hasOwnProperty.call(e,r)){let o=i[r],c=e[r];s.push(o.init(u=>o.spec.fromJSON(c,u)))}}return Ze.create({doc:e.doc,selection:te.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Uc.resolve(e.extensions||[],new Map),i=e.doc instanceof Ve?e.doc:Ve.of((e.doc||"").split(t.staticFacet(Ze.lineSeparator)||Sf)),s=e.selection?e.selection instanceof te?e.selection:te.single(e.selection.anchor,e.selection.head):te.single(0);return cx(s,i.length),t.staticFacet(Qf)||(s=s.asSingle()),new Ze(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(Ze.tabSize)}get lineBreak(){return this.facet(Ze.lineSeparator)||`
@@ -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-BaaEkHLq.js.map
400
+ //# sourceMappingURL=docs-Cw0Dreql.js.map