agentic-mermaid 0.3.0 → 0.3.2

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 (72) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/agent-core.d.ts +8 -3
  3. package/dist/agent-core.js +2 -2
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +4 -4
  6. package/dist/agentic-mermaid-mcp.js +5 -5
  7. package/dist/am.js +6 -6
  8. package/dist/browser-lazy/chunks/architecture-WMSX5L4P.js +31 -0
  9. package/dist/browser-lazy/chunks/chunk-32FWKUUV.js +1 -0
  10. package/dist/browser-lazy/chunks/chunk-5Q4S74UO.js +1 -0
  11. package/dist/browser-lazy/chunks/chunk-A7L4WWVW.js +143 -0
  12. package/dist/browser-lazy/chunks/chunk-ANTNEVJC.js +1 -0
  13. package/dist/browser-lazy/chunks/chunk-AOCFMYYH.js +4 -0
  14. package/dist/browser-lazy/chunks/chunk-CCTZFX43.js +4 -0
  15. package/dist/browser-lazy/chunks/chunk-EBPTM2RP.js +1 -0
  16. package/dist/browser-lazy/chunks/chunk-EPFMQPXX.js +1 -0
  17. package/dist/browser-lazy/chunks/chunk-EX6TP7QM.js +46 -0
  18. package/dist/browser-lazy/chunks/chunk-FFOHLPDA.js +2 -0
  19. package/dist/browser-lazy/chunks/chunk-FLD63DXE.js +2 -0
  20. package/dist/browser-lazy/chunks/chunk-GRXCKTHX.js +0 -0
  21. package/dist/browser-lazy/chunks/chunk-I6VE56S7.js +1 -0
  22. package/dist/browser-lazy/chunks/chunk-KJVNXJ5Y.js +1 -0
  23. package/dist/browser-lazy/chunks/chunk-M6BT2HIP.js +1 -0
  24. package/dist/browser-lazy/chunks/chunk-OFRMKQA6.js +1 -0
  25. package/dist/browser-lazy/chunks/chunk-P7HMSKHJ.js +1 -0
  26. package/dist/browser-lazy/chunks/chunk-PZEWZT35.js +1 -0
  27. package/dist/browser-lazy/chunks/chunk-QMZ4Y6I7.js +1 -0
  28. package/dist/browser-lazy/chunks/chunk-QYJMRNS3.js +11 -0
  29. package/dist/browser-lazy/chunks/chunk-RLS545DI.js +1 -0
  30. package/dist/browser-lazy/chunks/chunk-STQRDZ67.js +1 -0
  31. package/dist/browser-lazy/chunks/chunk-T7IJ6V4B.js +3 -0
  32. package/dist/browser-lazy/chunks/chunk-TBZAU7KC.js +7 -0
  33. package/dist/browser-lazy/chunks/chunk-TDGTBGV3.js +1 -0
  34. package/dist/browser-lazy/chunks/chunk-TEH2PRKN.js +1 -0
  35. package/dist/browser-lazy/chunks/chunk-W6Q4PHPC.js +24 -0
  36. package/dist/browser-lazy/chunks/chunk-WEUWIFG3.js +1 -0
  37. package/dist/browser-lazy/chunks/chunk-WN7SFUCZ.js +1 -0
  38. package/dist/browser-lazy/chunks/chunk-ZZECLXC3.js +1 -0
  39. package/dist/browser-lazy/chunks/class-7JRALQIM.js +9 -0
  40. package/dist/browser-lazy/chunks/er-UDCGHKBX.js +9 -0
  41. package/dist/browser-lazy/chunks/flowchart-5FP7RRIK.js +4 -0
  42. package/dist/browser-lazy/chunks/gantt-NTOIC5CW.js +28 -0
  43. package/dist/browser-lazy/chunks/gitgraph-JYAPXUIJ.js +8 -0
  44. package/dist/browser-lazy/chunks/journey-646EFIB6.js +40 -0
  45. package/dist/browser-lazy/chunks/mindmap-2SBTQHQO.js +9 -0
  46. package/dist/browser-lazy/chunks/pie-7FDXZ24K.js +19 -0
  47. package/dist/browser-lazy/chunks/quadrant-72UT4XAW.js +24 -0
  48. package/dist/browser-lazy/chunks/radar-SU7BO56J.js +32 -0
  49. package/dist/browser-lazy/chunks/render-core-Q2JWXDDL.js +12 -0
  50. package/dist/browser-lazy/chunks/sequence-5O5ET264.js +12 -0
  51. package/dist/browser-lazy/chunks/state-IWPLFQ6R.js +4 -0
  52. package/dist/browser-lazy/chunks/timeline-WJWYHH5Y.js +20 -0
  53. package/dist/browser-lazy/chunks/xychart-HHQVQA5O.js +36 -0
  54. package/dist/browser-lazy/index.d.ts +1012 -0
  55. package/dist/browser-lazy/index.js +1 -0
  56. package/dist/browser.global.js +322 -321
  57. package/dist/{chunk-WHYJLDYG.js → chunk-3D4EHVQ4.js} +47784 -47711
  58. package/dist/{chunk-AVCWKYII.js → chunk-GX7UT56Q.js} +18 -5
  59. package/dist/{chunk-UJNY65QS.js → chunk-IVN6KP3W.js} +2 -2
  60. package/dist/{chunk-HFD4MALA.js → chunk-NE6JBHSE.js} +682 -44
  61. package/dist/{chunk-3QCXO4V6.js → chunk-R5U67OIW.js} +4 -4
  62. package/dist/{chunk-GILQUGFK.js → chunk-YWKCUBQN.js} +2 -2
  63. package/dist/{index-CLwYn6Im.d.ts → index-BFg_LoZS.d.ts} +5409 -5391
  64. package/dist/index.d.ts +1 -1
  65. package/dist/index.js +1 -1
  66. package/dist/mcp-cli-XGZP6CMW.js +17 -0
  67. package/docs/README.md +1 -1
  68. package/docs/browser.md +355 -47
  69. package/docs/mcp-http-transport.md +2 -0
  70. package/package.json +17 -6
  71. package/server.json +2 -2
  72. package/dist/mcp-cli-SJVOGRA6.js +0 -17
package/CHANGELOG.md CHANGED
@@ -4,6 +4,37 @@ This changelog tracks user-facing changes for **Agentic Mermaid**, a fork of `lu
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.3.2 — 2026-07-27
8
+
9
+ ### Added
10
+ - Added MCP protocol revision `2025-11-25` — the *current* revision — to the hosted endpoint's supported list. It was previously rejected with HTTP 400, so any client pinning the current revision was locked out.
11
+ - Added dual-era support for the `2026-07-28` stateless revision alongside the existing handshake-based clients: `server/discover`, per-request `_meta`, the `-32020`/`-32022` error codes, HTTP 404 for unknown modern methods, and `Mcp-Method`/`Mcp-Name` header validation.
12
+ - Added `resultType: "complete"` and the required `ttlMs`/`cacheScope` caching hints to `server/discover` and `tools/list` results on the modern path. Legacy responses are unchanged, since an absent `resultType` is how a client identifies an older server.
13
+
14
+ ### Changed
15
+ - The local MCP server now reports protocol versions **per transport**. Its stdio transport advertises every revision the dispatcher implements (through `2026-07-28`); its HTTP+SSE transport advertises only `2024-11-05`, which is the revision that transport actually is. A client declaring a revision a transport does not serve is now refused with `-32022` and the list to retry from, rather than being silently served a different era.
16
+ - Transport-level rejections from the hosted endpoint (bad origin, wrong method, wrong content-type, oversized body) no longer carry a JSON-RPC error envelope. All four refuse before a JSON-RPC request is parsed, so they answer `{"error": "<reason>"}` with the HTTP status — 403, 405, 415, 413 — as the signal. The `-32000` code they used to carry came from a range the spec says receivers "MUST NOT assume any specific meaning for", so it conveyed nothing.
17
+
18
+ ### Fixed
19
+ - Fixed the modern MCP boundary end to end: hosted compute-cache entries are protocol-neutral and partitioned by era/revision, stateless metadata and known capability shapes fail with correlated HTTP 400 responses, every successful modern result carries the final server identity stamp, invalid-origin preflights fail closed, and stdio retains the revision selected by `initialize` for later requests.
20
+ - Hardened the release and review gates around that protocol work: the live deploy smoke test waits for the exact workflow SHA, golden approval is bound to each golden-changing commit, browser CORS coverage is portable and skips without starting servers when Chromium is absent, source scanning removes comments lexically, and equivalent named/record Style inputs are canonical before every family hook.
21
+ - Fixed the local MCP server downgrading clients that offer a newer protocol revision. `initialize` now echoes the newest revision the client and the transport share; the reference MCP SDK client offers `2025-11-25` and was being answered `2024-11-05`.
22
+ - Fixed the hosted endpoint rejecting conforming `2026-07-28` clients that omit `io.modelcontextprotocol/clientInfo`. The spec marks that field optional — clients "**SHOULD** include [it] … unless specifically configured not to do so" — and a client configured to withhold it received HTTP 400. It is still validated when present.
23
+
24
+ ## 0.3.1 — 2026-07-27
25
+
26
+ ### Added
27
+ - Added the framework-neutral `agentic-mermaid/browser/lazy` ESM entry with async, per-built-in-family SVG loading, shared on-demand ELK, exact all-family parity tests, and raw/gzip/Brotli/request-count build budgets.
28
+
29
+ ### Changed
30
+ - Migrated the live `/demo/` page from the classic all-family bundle to the published lazy module graph. Its Timeline renderer path drops from 895,155 to 162,026 gzip bytes while retaining the classic compatibility artifact for synchronous script-tag consumers.
31
+
32
+ ### Fixed
33
+ - Kept direct Flowchart/State compatibility-parser imports independent of complete family-registry initialization after the lazy-browser split. The registry and compatibility parser now share one lightweight header authority whose generated browser detectors remain self-contained, and a fresh-process regression prevents aggregate test import order from hiding an uninstalled resolver.
34
+ - Made the Firefox/WebKit compatibility-bundle smoke contract load the shipped artifact through a real loopback `<script src>` request. This exercises the documented consumer path and avoids hanging WebKit by transferring the multi-megabyte bundle through Playwright's script-injection control channel.
35
+ - Made parsed wrapper and family-body ownership disjoint and byte-exact, including empty, CRLF, and standalone-BOM wrappers, so replacing an extension descriptor cannot duplicate leading comments, frontmatter, init directives, or blank lines. Structured built-in and extension serializers now also retain universal init config authored after the family header, while the shared envelope reads serializer output through the same directive grammar and avoids duplicating config it already owns — including when a source-preserving serializer re-indents, re-spaces, or reorders object keys in the directive it preserved. Canonical serialization folds every parseable directive into the final effective config in authored order, so partial nested overrides and whole-object replacements cannot reinstate stale values or make output non-idempotent. Mutation refreshes wrapper metadata and spans from the rebuilt artifact while retaining prior dropped-comment loss receipts, whose `line` continues to index the artifact the loss happened in.
36
+ - Made MCP Registry publication retry-safe after an ambiguous publish result. The release workflow now checks the immutable exact-version endpoint, accepts an existing version only when its publisher-owned server metadata is structurally identical to the verified artifact and the Registry's mutable official status is `active`, and fails closed on mismatches, inactive records, and malformed responses. A Registry that is unreachable or answering unexpectedly is retried over a bounded backoff before failing closed, so a transient outage cannot block an otherwise-publishable release.
37
+
7
38
  ## 0.3.0 — 2026-07-25
8
39
 
9
40
  ### Added
@@ -1,5 +1,5 @@
1
- import { P as ParsedDiagram, d7 as Result, cl as ParseError, es as ValidDiagramPayload, eq as ValidDiagram, aP as ExtensionDiagramBody, c5 as MutationError, fV as Direction, bv as FlowchartMutationOp, bw as FlowchartValidDiagram, dP as StateMutationOp, dS as StateValidDiagram, dE as SequenceMutationOp, dG as SequenceValidDiagram, ee as TimelineMutationOp, eh as TimelineValidDiagram, a7 as ClassMutationOp, ac as ClassValidDiagram, aL as ErMutationOp, aN as ErValidDiagram, bM as JourneyMutationOp, bP as JourneyValidDiagram, n as ArchitectureMutationOp, q as ArchitectureValidDiagram, eD as XyChartMutationOp, eF as XyChartValidDiagram, co as PieMutationOp, cq as PieValidDiagram, cJ as QuadrantMutationOp, cL as QuadrantValidDiagram, bB as GanttMutationOp, bE as GanttValidDiagram, c2 as MindmapMutationOp, c3 as MindmapValidDiagram, bG as GitGraphMutationOp, bH as GitGraphValidDiagram, cV as RadarMutationOp, cW as RadarValidDiagram, aA as DiagramKind, f as AnyMutationOp, c4 as MutableValidDiagram, fW as MermaidEdge, eu as VerifyResult, et as VerifyOptions, d0 as RenderedLayout, bQ as LayoutRouteCertificate, bd as FamilyConformanceReport, bf as FamilyDescriptor, bi as FamilyId, fX as PositionedDiagram, bm as FamilyPositionedProjectionOptions, bn as FamilyPositionedView, d4 as RenderedRegionKind, fY as TerminalProjectionDiagnosticCode, D as DiagramActionRecord, A as AsciiRenderOptions, ay as DiagramAnalysis, R as RenderOptions, b as RenderRequestReceipt, fZ as renderMermaidASCII$1, c$ as RenderedAscii, f_ as renderMermaidSVG$1, f$ as RenderedSvg } from './index-CLwYn6Im.js';
2
- export { e as Accessibility, g as AnyPort, h as ArchitectureBody, i as ArchitectureEdge, j as ArchitectureEndpoint, k as ArchitectureEndpointBoundary, l as ArchitectureGroup, m as ArchitectureJunction, o as ArchitectureService, p as ArchitectureSide, r as ArchitectureVisualOverrides, s as AsciiRenderColorMode, t as AsciiWidthError, u as AsciiWidthErrorReason, B as BACKEND_CONFORMANCE_CHECK_IDS, v as BACKEND_CONFORMANCE_FIXTURE_ID, w as BACKEND_CONFORMANCE_VERSION, x as BINDABLE_ROLE_STYLE_PROPERTIES, y as BINDABLE_SCENE_ROLES, z as BRAND_CONSTRAINT_DESCRIPTORS, C as BRAND_CONSTRAINT_KINDS, E as BUILTIN_FAMILY_METADATA, F as BUILTIN_FAMILY_METADATA_COVERS_DIAGRAM_KIND, G as BUILTIN_SCENE_ROLE_TRAITS, I as BackendCapabilityConformanceResult, J as BackendCapabilityConformanceStatus, K as BackendConformanceCheck, L as BackendConformanceCheckId, M as BackendConformanceReport, N as BackendDescriptor, O as BackendRegistrationOptions, Q as BindableSceneRole, S as BrandConstraint, T as BrandConstraintAction, U as BrandConstraintKind, V as BuiltinFamilyId, W as BuiltinFamilyMetadata, X as CAPABILITY_NEGOTIATION_VERSION, Y as CORE_CAPABILITY_OFFERS, Z as CORE_SCENE_FEATURES, _ as CORE_SCENE_OPERATIONS, $ as CORE_SCENE_PRIMITIVES, a0 as CapabilityDecision, a1 as CapabilityId, a2 as CapabilityOffer, a3 as CapabilityRequirement, a4 as CapabilityRequirementLevel, a5 as CapabilityResolution, a6 as ClassBody, a8 as ClassNode, a9 as ClassNote, aa as ClassRelation, ab as ClassRelationKind, ad as CliRenderTransport, ae as CodeModeRenderTransport, af as ConnectorContourSemantics, ag as ConnectorEndpoints, ah as ConnectorGeometry, ai as ConnectorHitGeometry, aj as ConnectorLabelDescriptor, ak as ConnectorMark, al as ConnectorRelationship, am as ConnectorRoute, an as ConnectorStroke, ao as ConnectorSubpath, ap as ConnectorTerminalLabelProjection, aq as ConnectorTerminalMarkerPlacement, ar as ConnectorTerminalMarkerProjection, as as ConnectorTerminalProjection, at as ConnectorTerminalStrokeLoss, au as DEFAULT_LABEL_CHAR_CAP, av as DefaultBackend, aw as DiagramActionKind, ax as DiagramActionSecurity, az as DiagramBody, aB as DiamondFacet, aC as EXACT_ROLE_STYLE_CONTRACT, aD as EXACT_STYLE_SCENE_ROLES, aE as EXTERNAL_SCENE_API_VERSION, aF as EdgeId, aG as EdgeRouteCertificate, aH as ErAttribute, aI as ErBody, aJ as ErCardinality, aK as ErEntity, aM as ErRelation, aO as ExactStyleSceneRole, aQ as ExtensionIdentity, aR as ExtensionValidDiagram, aS as ExternalFamilyId, aT as ExternalSceneConnector, aU as ExternalSceneConnectorGeometry, aV as ExternalSceneConnectorLabel, aW as ExternalSceneContainer, aX as ExternalSceneDataMark, aY as ExternalSceneDocument, aZ as ExternalSceneGeometry, a_ as ExternalSceneInput, a$ as ExternalSceneMarker, b0 as ExternalSceneNode, b1 as ExternalSceneNodeBase, b2 as ExternalSceneShape, b3 as ExternalSceneText, b4 as ExtractedLabel, b5 as FAMILY_CAPABILITY_COLUMNS, b6 as FAMILY_CONFORMANCE_MAX_EXAMPLE_BYTES, b7 as FAMILY_CONFORMANCE_VERSION, b8 as FAMILY_DESCRIPTOR_CONTRACT_VERSION, b9 as FamilyCapability, ba as FamilyCapabilityConformanceResult, bb as FamilyCapabilityEvidence, bc as FamilyCapabilityState, be as FamilyConformanceStatus, bg as FamilyDetectionDiagnostic, bh as FamilyEdgeRouteCertificate, bj as FamilyOperations, bk as FamilyParsedBody, bl as FamilyPositionedProjectionContext, bo as FamilyRouteCertificate, bp as FamilyScenePositivePrimitive, bq as FamilyScenePrimitiveApplicability, br as FamilyScenePrimitiveEvidence, bs as FamilySceneRolePrimitiveDeclaration, bt as FeedbackEdgeAnalysis, bu as Finite, bx as GanttBody, by as GanttBodySection, bz as GanttBodyTask, bA as GanttBodyTaskTag, bC as GanttScheduleAnalysisSummary, bD as GanttStatement, bF as GitGraphBody, bI as GroupId, bJ as HOSTED_FONT_RESOURCES, H as HostBackendPolicy, bK as InitDirective, bL as JourneyBody, bN as JourneySection, bO as JourneyTask, bR as LayoutRouteClass, bS as LayoutWarning, bT as LibraryRenderTransport, bU as MAX_HOSTED_PNG_BYTES, bV as MAX_HOSTED_PNG_PIXELS, bW as MAX_PNG_FONT_DIRECTORIES, bX as MAX_PNG_FONT_DIRECTORY_LENGTH, bY as MAX_PNG_PIXELS, bZ as MAX_PNG_RASTER_DIMENSION, b_ as MarkerDescriptor, b$ as MermaidFamilyClassification, c0 as MermaidFamilyDetectionError, c1 as MindmapBody, c6 as NATIVE_PNG_HOST_ONLY_OPTION_FIELDS, c7 as NATIVE_PNG_OUTPUT_POLICY_FIELDS, c8 as NativePngHostOnlyOptionField, c9 as NativePngOutputPolicyField, ca as NodeId, cb as PNG_DEFAULT_FONT_FAMILY, cc as PNG_DEFAULT_SCALE, cd as PNG_FONT_SOURCES, ce as PNG_NAPI_RUNTIME, cf as PNG_OUTPUT_OPTION_FIELDS, cg as PNG_OUTPUT_OPTION_FIELD_DESCRIPTORS, ch as PNG_OUTPUT_POLICY_VERSION, ci as PNG_WASM_RUNTIME, cj as PORTABLE_PNG_OUTPUT_OPTION_FIELDS, ck as PRIMITIVE_REALIZATIONS, cm as ParticipantId, cn as PieBody, cp as PieSlice, cr as PngFitTo, cs as PngFontSource, ct as PngOutputOptionField, cu as PngOutputOptionFieldDescriptor, cv as PngOutputOptionInputKind, cw as PngOutputOptionPolicyState, cx as PngOutputOptionReceiptState, cy as PngOutputOptionScope, a as PngOutputPolicyInput, cz as PngRasterDimensions, c as PngRuntimeProvenance, cA as PortSemanticRole, cB as PortSide, cC as PortablePngOutputOptionField, cD as PortablePngOutputOptions, cE as PreservedDiagramBody, cF as PreservedSourceSpans, cG as PreservedValidDiagram, cH as QuadrantAxis, cI as QuadrantBody, cK as QuadrantPoint, cM as RENDER_CONTRACT_VERSION, cN as RENDER_OUTPUTS, cO as RENDER_OUTPUT_DESCRIPTORS, cP as RESOURCE_MANIFEST, cQ as RESOURCE_MANIFEST_VERSION, cR as ROLE_STYLE_PROPERTY_DESCRIPTORS, cS as RadarBody, cT as RadarBodyAxis, cU as RadarBodyCurve, cX as RegionContainmentCertificate, cY as RenderCapabilityError, cZ as RenderOutputDescriptor, c_ as RenderOutputTransports, d1 as RenderedLayoutEdge, d2 as RenderedLayoutGroup, d3 as RenderedLayoutNode, d as RenderedRegion, d5 as ResolvedPngOutputPolicy, d6 as ResolvedTerminalOutputPolicy, d8 as RoleStyleFor, d9 as RoleStyleSpec, da as RoleStyles, db as RouteBlocker, dc as RouteCertificate, dd as RouteClass, de as RoutePortAssignment, df as SCENE_CONTRACT_VERSION, dg as SCENE_ROLE_DESCRIPTORS, dh as SCENE_VALIDATION_LIMITS, di as SCENE_VALIDATION_VERSION, dj as SEMANTIC_BINDING_CHANNELS, dk as SHARED_RENDER_OPTION_FIELDS, dl as STYLE_COLOR_TOKEN_DESCRIPTORS, dm as STYLE_SPEC_FIELD_DESCRIPTORS, dn as STYLE_SPEC_FORMAT_VERSION, dp as SceneDoc, dq as SceneNode, dr as SceneRole, ds as SceneValidationDiagnostic, dt as SceneValidationDiagnosticCode, du as SceneValidationError, dv as SceneValidationOptions, dw as SceneValidationResult, dx as SemanticBinding, dy as SemanticBindingChannel, dz as SemanticChannels, dA as SemanticSlots, dB as SequenceBody, dC as SequenceMessage, dD as SequenceMessageStyle, dF as SequenceParticipant, dH as SerializedFlowchartGraph, dI as SourceComment, dJ as SourceMap, dK as SourceMapSpans, dL as SourcePreservationReceipt, dM as SourceSpan, dN as SourceSpanPoint, dO as StateBody, dQ as StateNode, dR as StateTransition, dT as StyleBackend, dU as StyleBackendContext, dV as StyleColors, dW as StyleDescriptor, dX as StyleInput, dY as StyleReferenceResolution, dZ as StyleRegistrationOptions, d_ as StyleSpec, d$ as TERMINAL_BOUNDED_PADDING_X, e0 as TERMINAL_DEFAULT_BOX_BORDER_PADDING, e1 as TERMINAL_DEFAULT_PADDING_X, e2 as TERMINAL_DEFAULT_PADDING_Y, e3 as TERMINAL_OUTPUT_POLICY_VERSION, e4 as TEXT_MEASUREMENT_CONTRACT, e5 as TerminalOutputPolicyError, e6 as TerminalOutputPolicyInput, e7 as TextMeasurementContract, e8 as TextMeasurementInput, e9 as TextMeasurementResult, ea as Tier1WarningCode, eb as Tier2WarningCode, ec as TimelineBody, ed as TimelineEvent, ef as TimelinePeriod, eg as TimelineSection, ei as UNREGISTERED_FAMILY_CAPABILITY_STATES, ej as UPSTREAM_MERMAID_FAMILY_INDEX, ek as UpstreamFamilyDescriptor, el as UpstreamHeaderDescriptor, em as UpstreamHeaderMatch, en as UpstreamManifestDiff, eo as UpstreamMermaidFamilyIndex, ep as UpstreamMermaidManifest, er as ValidDiagramMeta, ev as WARNING_SEVERITY, ew as WARNING_TIER, ex as WarningCode, ey as WarningSeverity, ez as WarningTier, eA as XyChartAxis, eB as XyChartAxisSpec, eC as XyChartBody, eE as XyChartSeries, eG as asArchitecture, eH as asClass, eI as asEr, eJ as asFlowchart, eK as asGantt, eL as asGitGraph, eM as asJourney, eN as asMindmap, eO as asPie, eP as asQuadrant, eQ as asRadar, eR as asSequence, eS as asState, eT as asTimeline, eU as asXyChart, eV as assertHostedPngRasterBudget, eW as assertPngRasterBudget, eX as assertValidSceneDoc, eY as buildExternalScene, eZ as builtinFamilyMetadata, e_ as classifyMermaidFamilyFromFirstLine, e$ as createExtensionIdentity, f0 as declareFamilyScenePrimitiveEvidence, f1 as detectRegisteredFamilyFromFirstLine, f2 as effectiveFamilyCapabilityState, f3 as err, f4 as findUpstreamFamilyByHeader, f5 as getBackend, f6 as getFamily, f7 as getFamilyConformanceReport, f8 as getStyle, f9 as hostedFontResource, fa as inferBackend, fb as isBuiltinFamilyId, fc as isExternalFamilyId, fd as knownBackendDescriptors, fe as knownBuiltinFamilies, ff as knownFamilies, fg as knownStyleDescriptors, fh as knownStyles, fi as measureText, fj as measureTextWidth, fk as negotiateCapabilities, fl as negotiateRenderCapabilities, fm as normalizePortablePngBackground, fn as ok, fo as omitPngOutputOptions, fp as parseRegisteredMermaid, fq as parseSemVer, fr as pngNapiRuntimeProvenance, fs as pngOutputOptionsJsonSchema, ft as pngRasterDimensions, fu as prepareSvgForPngRasterization, fv as projectNativePngOutputPolicyInput, fw as projectPortablePngOutputOptions, fx as registerBackend, fy as registerStyle, fz as resolvePngOutputPolicy, fA as resolvePortablePngOutputPolicy, fB as resolveSceneRoleTraits, fC as resolveStyleReference, fD as resolveStyleStack, fE as resolveTerminalOutputPolicy, fF as runBackendConformance, fG as sceneRoleTraits, fH as semVerSatisfies, fI as sharedRenderOptionsJsonSchema, fJ as styleInputJsonSchema, fK as styleSpecJsonSchema, fL as svgIntrinsicDimensions, fM as terminalConnectorCapabilityClaims, fN as toFinite, fO as validatePrimitiveCapabilities, fP as validateResourceManifest, fQ as validateSceneDoc, fR as validateSerializableRenderOptions, fS as validateStyleSpec, fT as verifyNoExternalRefs, fU as verifyResourceBytes } from './index-CLwYn6Im.js';
1
+ import { P as ParsedDiagram, d7 as Result, cl as ParseError, es as ValidDiagramPayload, eq as ValidDiagram, aP as ExtensionDiagramBody, c5 as MutationError, fV as Direction, bv as FlowchartMutationOp, bw as FlowchartValidDiagram, dP as StateMutationOp, dS as StateValidDiagram, dE as SequenceMutationOp, dG as SequenceValidDiagram, ee as TimelineMutationOp, eh as TimelineValidDiagram, a7 as ClassMutationOp, ac as ClassValidDiagram, aL as ErMutationOp, aN as ErValidDiagram, bM as JourneyMutationOp, bP as JourneyValidDiagram, n as ArchitectureMutationOp, q as ArchitectureValidDiagram, eD as XyChartMutationOp, eF as XyChartValidDiagram, co as PieMutationOp, cq as PieValidDiagram, cJ as QuadrantMutationOp, cL as QuadrantValidDiagram, bB as GanttMutationOp, bE as GanttValidDiagram, c2 as MindmapMutationOp, c3 as MindmapValidDiagram, bG as GitGraphMutationOp, bH as GitGraphValidDiagram, cV as RadarMutationOp, cW as RadarValidDiagram, aA as DiagramKind, f as AnyMutationOp, c4 as MutableValidDiagram, fW as MermaidEdge, eu as VerifyResult, et as VerifyOptions, d0 as RenderedLayout, bQ as LayoutRouteCertificate, bd as FamilyConformanceReport, bf as FamilyDescriptor, bi as FamilyId, fX as PositionedDiagram, bm as FamilyPositionedProjectionOptions, bn as FamilyPositionedView, d4 as RenderedRegionKind, fY as TerminalProjectionDiagnosticCode, D as DiagramActionRecord, A as AsciiRenderOptions, ay as DiagramAnalysis, R as RenderOptions, b as RenderRequestReceipt, fZ as renderMermaidASCII$1, c$ as RenderedAscii, f_ as renderMermaidSVG$1, f$ as RenderedSvg } from './index-BFg_LoZS.js';
2
+ export { e as Accessibility, g as AnyPort, h as ArchitectureBody, i as ArchitectureEdge, j as ArchitectureEndpoint, k as ArchitectureEndpointBoundary, l as ArchitectureGroup, m as ArchitectureJunction, o as ArchitectureService, p as ArchitectureSide, r as ArchitectureVisualOverrides, s as AsciiRenderColorMode, t as AsciiWidthError, u as AsciiWidthErrorReason, B as BACKEND_CONFORMANCE_CHECK_IDS, v as BACKEND_CONFORMANCE_FIXTURE_ID, w as BACKEND_CONFORMANCE_VERSION, x as BINDABLE_ROLE_STYLE_PROPERTIES, y as BINDABLE_SCENE_ROLES, z as BRAND_CONSTRAINT_DESCRIPTORS, C as BRAND_CONSTRAINT_KINDS, E as BUILTIN_FAMILY_METADATA, F as BUILTIN_FAMILY_METADATA_COVERS_DIAGRAM_KIND, G as BUILTIN_SCENE_ROLE_TRAITS, I as BackendCapabilityConformanceResult, J as BackendCapabilityConformanceStatus, K as BackendConformanceCheck, L as BackendConformanceCheckId, M as BackendConformanceReport, N as BackendDescriptor, O as BackendRegistrationOptions, Q as BindableSceneRole, S as BrandConstraint, T as BrandConstraintAction, U as BrandConstraintKind, V as BuiltinFamilyId, W as BuiltinFamilyMetadata, X as CAPABILITY_NEGOTIATION_VERSION, Y as CORE_CAPABILITY_OFFERS, Z as CORE_SCENE_FEATURES, _ as CORE_SCENE_OPERATIONS, $ as CORE_SCENE_PRIMITIVES, a0 as CapabilityDecision, a1 as CapabilityId, a2 as CapabilityOffer, a3 as CapabilityRequirement, a4 as CapabilityRequirementLevel, a5 as CapabilityResolution, a6 as ClassBody, a8 as ClassNode, a9 as ClassNote, aa as ClassRelation, ab as ClassRelationKind, ad as CliRenderTransport, ae as CodeModeRenderTransport, af as ConnectorContourSemantics, ag as ConnectorEndpoints, ah as ConnectorGeometry, ai as ConnectorHitGeometry, aj as ConnectorLabelDescriptor, ak as ConnectorMark, al as ConnectorRelationship, am as ConnectorRoute, an as ConnectorStroke, ao as ConnectorSubpath, ap as ConnectorTerminalLabelProjection, aq as ConnectorTerminalMarkerPlacement, ar as ConnectorTerminalMarkerProjection, as as ConnectorTerminalProjection, at as ConnectorTerminalStrokeLoss, au as DEFAULT_LABEL_CHAR_CAP, av as DefaultBackend, aw as DiagramActionKind, ax as DiagramActionSecurity, az as DiagramBody, aB as DiamondFacet, aC as EXACT_ROLE_STYLE_CONTRACT, aD as EXACT_STYLE_SCENE_ROLES, aE as EXTERNAL_SCENE_API_VERSION, aF as EdgeId, aG as EdgeRouteCertificate, aH as ErAttribute, aI as ErBody, aJ as ErCardinality, aK as ErEntity, aM as ErRelation, aO as ExactStyleSceneRole, aQ as ExtensionIdentity, aR as ExtensionValidDiagram, aS as ExternalFamilyId, aT as ExternalSceneConnector, aU as ExternalSceneConnectorGeometry, aV as ExternalSceneConnectorLabel, aW as ExternalSceneContainer, aX as ExternalSceneDataMark, aY as ExternalSceneDocument, aZ as ExternalSceneGeometry, a_ as ExternalSceneInput, a$ as ExternalSceneMarker, b0 as ExternalSceneNode, b1 as ExternalSceneNodeBase, b2 as ExternalSceneShape, b3 as ExternalSceneText, b4 as ExtractedLabel, b5 as FAMILY_CAPABILITY_COLUMNS, b6 as FAMILY_CONFORMANCE_MAX_EXAMPLE_BYTES, b7 as FAMILY_CONFORMANCE_VERSION, b8 as FAMILY_DESCRIPTOR_CONTRACT_VERSION, b9 as FamilyCapability, ba as FamilyCapabilityConformanceResult, bb as FamilyCapabilityEvidence, bc as FamilyCapabilityState, be as FamilyConformanceStatus, bg as FamilyDetectionDiagnostic, bh as FamilyEdgeRouteCertificate, bj as FamilyOperations, bk as FamilyParsedBody, bl as FamilyPositionedProjectionContext, bo as FamilyRouteCertificate, bp as FamilyScenePositivePrimitive, bq as FamilyScenePrimitiveApplicability, br as FamilyScenePrimitiveEvidence, bs as FamilySceneRolePrimitiveDeclaration, bt as FeedbackEdgeAnalysis, bu as Finite, bx as GanttBody, by as GanttBodySection, bz as GanttBodyTask, bA as GanttBodyTaskTag, bC as GanttScheduleAnalysisSummary, bD as GanttStatement, bF as GitGraphBody, bI as GroupId, bJ as HOSTED_FONT_RESOURCES, H as HostBackendPolicy, bK as InitDirective, bL as JourneyBody, bN as JourneySection, bO as JourneyTask, bR as LayoutRouteClass, bS as LayoutWarning, bT as LibraryRenderTransport, bU as MAX_HOSTED_PNG_BYTES, bV as MAX_HOSTED_PNG_PIXELS, bW as MAX_PNG_FONT_DIRECTORIES, bX as MAX_PNG_FONT_DIRECTORY_LENGTH, bY as MAX_PNG_PIXELS, bZ as MAX_PNG_RASTER_DIMENSION, b_ as MarkerDescriptor, b$ as MermaidFamilyClassification, c0 as MermaidFamilyDetectionError, c1 as MindmapBody, c6 as NATIVE_PNG_HOST_ONLY_OPTION_FIELDS, c7 as NATIVE_PNG_OUTPUT_POLICY_FIELDS, c8 as NativePngHostOnlyOptionField, c9 as NativePngOutputPolicyField, ca as NodeId, cb as PNG_DEFAULT_FONT_FAMILY, cc as PNG_DEFAULT_SCALE, cd as PNG_FONT_SOURCES, ce as PNG_NAPI_RUNTIME, cf as PNG_OUTPUT_OPTION_FIELDS, cg as PNG_OUTPUT_OPTION_FIELD_DESCRIPTORS, ch as PNG_OUTPUT_POLICY_VERSION, ci as PNG_WASM_RUNTIME, cj as PORTABLE_PNG_OUTPUT_OPTION_FIELDS, ck as PRIMITIVE_REALIZATIONS, cm as ParticipantId, cn as PieBody, cp as PieSlice, cr as PngFitTo, cs as PngFontSource, ct as PngOutputOptionField, cu as PngOutputOptionFieldDescriptor, cv as PngOutputOptionInputKind, cw as PngOutputOptionPolicyState, cx as PngOutputOptionReceiptState, cy as PngOutputOptionScope, a as PngOutputPolicyInput, cz as PngRasterDimensions, c as PngRuntimeProvenance, cA as PortSemanticRole, cB as PortSide, cC as PortablePngOutputOptionField, cD as PortablePngOutputOptions, cE as PreservedDiagramBody, cF as PreservedSourceSpans, cG as PreservedValidDiagram, cH as QuadrantAxis, cI as QuadrantBody, cK as QuadrantPoint, cM as RENDER_CONTRACT_VERSION, cN as RENDER_OUTPUTS, cO as RENDER_OUTPUT_DESCRIPTORS, cP as RESOURCE_MANIFEST, cQ as RESOURCE_MANIFEST_VERSION, cR as ROLE_STYLE_PROPERTY_DESCRIPTORS, cS as RadarBody, cT as RadarBodyAxis, cU as RadarBodyCurve, cX as RegionContainmentCertificate, cY as RenderCapabilityError, cZ as RenderOutputDescriptor, c_ as RenderOutputTransports, d1 as RenderedLayoutEdge, d2 as RenderedLayoutGroup, d3 as RenderedLayoutNode, d as RenderedRegion, d5 as ResolvedPngOutputPolicy, d6 as ResolvedTerminalOutputPolicy, d8 as RoleStyleFor, d9 as RoleStyleSpec, da as RoleStyles, db as RouteBlocker, dc as RouteCertificate, dd as RouteClass, de as RoutePortAssignment, df as SCENE_CONTRACT_VERSION, dg as SCENE_ROLE_DESCRIPTORS, dh as SCENE_VALIDATION_LIMITS, di as SCENE_VALIDATION_VERSION, dj as SEMANTIC_BINDING_CHANNELS, dk as SHARED_RENDER_OPTION_FIELDS, dl as STYLE_COLOR_TOKEN_DESCRIPTORS, dm as STYLE_SPEC_FIELD_DESCRIPTORS, dn as STYLE_SPEC_FORMAT_VERSION, dp as SceneDoc, dq as SceneNode, dr as SceneRole, ds as SceneValidationDiagnostic, dt as SceneValidationDiagnosticCode, du as SceneValidationError, dv as SceneValidationOptions, dw as SceneValidationResult, dx as SemanticBinding, dy as SemanticBindingChannel, dz as SemanticChannels, dA as SemanticSlots, dB as SequenceBody, dC as SequenceMessage, dD as SequenceMessageStyle, dF as SequenceParticipant, dH as SerializedFlowchartGraph, dI as SourceComment, dJ as SourceMap, dK as SourceMapSpans, dL as SourcePreservationReceipt, dM as SourceSpan, dN as SourceSpanPoint, dO as StateBody, dQ as StateNode, dR as StateTransition, dT as StyleBackend, dU as StyleBackendContext, dV as StyleColors, dW as StyleDescriptor, dX as StyleInput, dY as StyleReferenceResolution, dZ as StyleRegistrationOptions, d_ as StyleSpec, d$ as TERMINAL_BOUNDED_PADDING_X, e0 as TERMINAL_DEFAULT_BOX_BORDER_PADDING, e1 as TERMINAL_DEFAULT_PADDING_X, e2 as TERMINAL_DEFAULT_PADDING_Y, e3 as TERMINAL_OUTPUT_POLICY_VERSION, e4 as TEXT_MEASUREMENT_CONTRACT, e5 as TerminalOutputPolicyError, e6 as TerminalOutputPolicyInput, e7 as TextMeasurementContract, e8 as TextMeasurementInput, e9 as TextMeasurementResult, ea as Tier1WarningCode, eb as Tier2WarningCode, ec as TimelineBody, ed as TimelineEvent, ef as TimelinePeriod, eg as TimelineSection, ei as UNREGISTERED_FAMILY_CAPABILITY_STATES, ej as UPSTREAM_MERMAID_FAMILY_INDEX, ek as UpstreamFamilyDescriptor, el as UpstreamHeaderDescriptor, em as UpstreamHeaderMatch, en as UpstreamManifestDiff, eo as UpstreamMermaidFamilyIndex, ep as UpstreamMermaidManifest, er as ValidDiagramMeta, ev as WARNING_SEVERITY, ew as WARNING_TIER, ex as WarningCode, ey as WarningSeverity, ez as WarningTier, eA as XyChartAxis, eB as XyChartAxisSpec, eC as XyChartBody, eE as XyChartSeries, eG as asArchitecture, eH as asClass, eI as asEr, eJ as asFlowchart, eK as asGantt, eL as asGitGraph, eM as asJourney, eN as asMindmap, eO as asPie, eP as asQuadrant, eQ as asRadar, eR as asSequence, eS as asState, eT as asTimeline, eU as asXyChart, eV as assertHostedPngRasterBudget, eW as assertPngRasterBudget, eX as assertValidSceneDoc, eY as buildExternalScene, eZ as builtinFamilyMetadata, e_ as classifyMermaidFamilyFromFirstLine, e$ as createExtensionIdentity, f0 as declareFamilyScenePrimitiveEvidence, f1 as detectRegisteredFamilyFromFirstLine, f2 as effectiveFamilyCapabilityState, f3 as err, f4 as findUpstreamFamilyByHeader, f5 as getBackend, f6 as getFamily, f7 as getFamilyConformanceReport, f8 as getStyle, f9 as hostedFontResource, fa as inferBackend, fb as isBuiltinFamilyId, fc as isExternalFamilyId, fd as knownBackendDescriptors, fe as knownBuiltinFamilies, ff as knownFamilies, fg as knownStyleDescriptors, fh as knownStyles, fi as measureText, fj as measureTextWidth, fk as negotiateCapabilities, fl as negotiateRenderCapabilities, fm as normalizePortablePngBackground, fn as ok, fo as omitPngOutputOptions, fp as parseRegisteredMermaid, fq as parseSemVer, fr as pngNapiRuntimeProvenance, fs as pngOutputOptionsJsonSchema, ft as pngRasterDimensions, fu as prepareSvgForPngRasterization, fv as projectNativePngOutputPolicyInput, fw as projectPortablePngOutputOptions, fx as registerBackend, fy as registerStyle, fz as resolvePngOutputPolicy, fA as resolvePortablePngOutputPolicy, fB as resolveSceneRoleTraits, fC as resolveStyleReference, fD as resolveStyleStack, fE as resolveTerminalOutputPolicy, fF as runBackendConformance, fG as sceneRoleTraits, fH as semVerSatisfies, fI as sharedRenderOptionsJsonSchema, fJ as styleInputJsonSchema, fK as styleSpecJsonSchema, fL as svgIntrinsicDimensions, fM as terminalConnectorCapabilityClaims, fN as toFinite, fO as validatePrimitiveCapabilities, fP as validateResourceManifest, fQ as validateSceneDoc, fR as validateSerializableRenderOptions, fS as validateStyleSpec, fT as verifyNoExternalRefs, fU as verifyResourceBytes } from './index-BFg_LoZS.js';
3
3
 
4
4
  type MermaidFact = string;
5
5
  interface CheckMermaidObjectSpec {
@@ -39,7 +39,12 @@ interface SerializeOptions {
39
39
  /**
40
40
  * Wrapper emission policy. 'verbatim' (default) re-emits the leading source
41
41
  * wrapper (frontmatter, init directives, comments) byte-identically from
42
- * `meta.wrapperSource`. 'canonical' synthesizes Mermaid's documented shape
42
+ * `meta.wrapperSource`, then re-emits any init directive authored *after*
43
+ * the family header that the serialized body does not already own — a
44
+ * structured serializer receives directive-free grammar, so without this the
45
+ * config would be lost. Such a directive therefore moves ahead of the
46
+ * header; source-preserving bodies keep theirs in place and are unaffected.
47
+ * 'canonical' synthesizes Mermaid's documented shape
43
48
  * instead: one frontmatter block with `title`/`displayMode` at the top
44
49
  * level and everything else nested under `config:`, init directives folded
45
50
  * in (re-emitted raw only when their payload could not be folded), and
@@ -38,7 +38,7 @@ import {
38
38
  validateOp,
39
39
  verifyMermaid,
40
40
  verifySummary
41
- } from "./chunk-AVCWKYII.js";
41
+ } from "./chunk-GX7UT56Q.js";
42
42
  import {
43
43
  AsciiWidthError,
44
44
  BACKEND_CONFORMANCE_CHECK_IDS,
@@ -196,7 +196,7 @@ import {
196
196
  validateStyleSpec,
197
197
  verifyNoExternalRefs,
198
198
  verifyResourceBytes
199
- } from "./chunk-WHYJLDYG.js";
199
+ } from "./chunk-3D4EHVQ4.js";
200
200
  export {
201
201
  ASCII_ROUTE_PARITY_CONTRACT,
202
202
  AsciiWidthError,
package/dist/agent.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AsciiWarning } from './agent-core.js';
2
2
  export { ASCII_ROUTE_PARITY_CONTRACT, ApplyOpsInput, AsciiRegion, AsciiWarningCode, AsciiWithMeta, BOUND_PROVENANCE, BoundBasis, BoundProvenance, BuildError, CheckMermaidObjectSpec, CheckMermaidResult, CheckMermaidSpec, CheckedBuildError, CreateMermaidOptions, DEFAULT_BOUNDS, DescribeOptions, DescribeTree, FamilyConformanceError, LayoutCertificateProof, LayoutMermaidOptions, LayoutRenderOptions, MermaidFact, OpEnvelope, OpFamily, OpFieldDoc, OpValidationError, QualityBounds, QualityMeasurementOptions, QualityMetrics, QualityVerdict, RankedViolation, RegionKind, RenderedLayoutArtifact, VerifySummary, ViolationSeverity, analyzeMermaid, analyzeMermaidSource, applyOps, asciiToMermaid, buildChecked, buildMermaid, checkMermaid, checkMermaidSource, checkQuality, collectActionRecords, createMermaid, describeMermaid, describeMermaidFacts, describeMermaidFactsSource, describeMermaidSource, describeMermaidTree, describeOps, edgeIdOf, hasOpSchema, layoutCertificateProof, layoutMermaid, layoutMermaidWithReceipt, measureQuality, mutate, mutateChecked, opMenu, opSignatures, projectPositionedView, registerFamily, renderMermaidASCII, renderMermaidASCIIWithMeta, renderMermaidASCIIWithReceipt, renderMermaidSVG, renderMermaidSVGWithReceipt, serializeMermaid, synthesizeFromGraph, validateOp, verifyMermaid, verifySummary } from './agent-core.js';
3
- import { P as ParsedDiagram, R as RenderOptions, a as PngOutputPolicyInput, b as RenderRequestReceipt, c as PngRuntimeProvenance, H as HostBackendPolicy, A as AsciiRenderOptions, d as RenderedRegion, D as DiagramActionRecord } from './index-CLwYn6Im.js';
4
- export { e as Accessibility, f as AnyMutationOp, g as AnyPort, h as ArchitectureBody, i as ArchitectureEdge, j as ArchitectureEndpoint, k as ArchitectureEndpointBoundary, l as ArchitectureGroup, m as ArchitectureJunction, n as ArchitectureMutationOp, o as ArchitectureService, p as ArchitectureSide, q as ArchitectureValidDiagram, r as ArchitectureVisualOverrides, s as AsciiRenderColorMode, t as AsciiWidthError, u as AsciiWidthErrorReason, B as BACKEND_CONFORMANCE_CHECK_IDS, v as BACKEND_CONFORMANCE_FIXTURE_ID, w as BACKEND_CONFORMANCE_VERSION, x as BINDABLE_ROLE_STYLE_PROPERTIES, y as BINDABLE_SCENE_ROLES, z as BRAND_CONSTRAINT_DESCRIPTORS, C as BRAND_CONSTRAINT_KINDS, E as BUILTIN_FAMILY_METADATA, F as BUILTIN_FAMILY_METADATA_COVERS_DIAGRAM_KIND, G as BUILTIN_SCENE_ROLE_TRAITS, I as BackendCapabilityConformanceResult, J as BackendCapabilityConformanceStatus, K as BackendConformanceCheck, L as BackendConformanceCheckId, M as BackendConformanceReport, N as BackendDescriptor, O as BackendRegistrationOptions, Q as BindableSceneRole, S as BrandConstraint, T as BrandConstraintAction, U as BrandConstraintKind, V as BuiltinFamilyId, W as BuiltinFamilyMetadata, X as CAPABILITY_NEGOTIATION_VERSION, Y as CORE_CAPABILITY_OFFERS, Z as CORE_SCENE_FEATURES, _ as CORE_SCENE_OPERATIONS, $ as CORE_SCENE_PRIMITIVES, a0 as CapabilityDecision, a1 as CapabilityId, a2 as CapabilityOffer, a3 as CapabilityRequirement, a4 as CapabilityRequirementLevel, a5 as CapabilityResolution, a6 as ClassBody, a7 as ClassMutationOp, a8 as ClassNode, a9 as ClassNote, aa as ClassRelation, ab as ClassRelationKind, ac as ClassValidDiagram, ad as CliRenderTransport, ae as CodeModeRenderTransport, af as ConnectorContourSemantics, ag as ConnectorEndpoints, ah as ConnectorGeometry, ai as ConnectorHitGeometry, aj as ConnectorLabelDescriptor, ak as ConnectorMark, al as ConnectorRelationship, am as ConnectorRoute, an as ConnectorStroke, ao as ConnectorSubpath, ap as ConnectorTerminalLabelProjection, aq as ConnectorTerminalMarkerPlacement, ar as ConnectorTerminalMarkerProjection, as as ConnectorTerminalProjection, at as ConnectorTerminalStrokeLoss, au as DEFAULT_LABEL_CHAR_CAP, av as DefaultBackend, aw as DiagramActionKind, ax as DiagramActionSecurity, ay as DiagramAnalysis, az as DiagramBody, aA as DiagramKind, aB as DiamondFacet, aC as EXACT_ROLE_STYLE_CONTRACT, aD as EXACT_STYLE_SCENE_ROLES, aE as EXTERNAL_SCENE_API_VERSION, aF as EdgeId, aG as EdgeRouteCertificate, aH as ErAttribute, aI as ErBody, aJ as ErCardinality, aK as ErEntity, aL as ErMutationOp, aM as ErRelation, aN as ErValidDiagram, aO as ExactStyleSceneRole, aP as ExtensionDiagramBody, aQ as ExtensionIdentity, aR as ExtensionValidDiagram, aS as ExternalFamilyId, aT as ExternalSceneConnector, aU as ExternalSceneConnectorGeometry, aV as ExternalSceneConnectorLabel, aW as ExternalSceneContainer, aX as ExternalSceneDataMark, aY as ExternalSceneDocument, aZ as ExternalSceneGeometry, a_ as ExternalSceneInput, a$ as ExternalSceneMarker, b0 as ExternalSceneNode, b1 as ExternalSceneNodeBase, b2 as ExternalSceneShape, b3 as ExternalSceneText, b4 as ExtractedLabel, b5 as FAMILY_CAPABILITY_COLUMNS, b6 as FAMILY_CONFORMANCE_MAX_EXAMPLE_BYTES, b7 as FAMILY_CONFORMANCE_VERSION, b8 as FAMILY_DESCRIPTOR_CONTRACT_VERSION, b9 as FamilyCapability, ba as FamilyCapabilityConformanceResult, bb as FamilyCapabilityEvidence, bc as FamilyCapabilityState, bd as FamilyConformanceReport, be as FamilyConformanceStatus, bf as FamilyDescriptor, bg as FamilyDetectionDiagnostic, bh as FamilyEdgeRouteCertificate, bi as FamilyId, bj as FamilyOperations, bk as FamilyParsedBody, bl as FamilyPositionedProjectionContext, bm as FamilyPositionedProjectionOptions, bn as FamilyPositionedView, bo as FamilyRouteCertificate, bp as FamilyScenePositivePrimitive, bq as FamilyScenePrimitiveApplicability, br as FamilyScenePrimitiveEvidence, bs as FamilySceneRolePrimitiveDeclaration, bt as FeedbackEdgeAnalysis, bu as Finite, bv as FlowchartMutationOp, bw as FlowchartValidDiagram, bx as GanttBody, by as GanttBodySection, bz as GanttBodyTask, bA as GanttBodyTaskTag, bB as GanttMutationOp, bC as GanttScheduleAnalysisSummary, bD as GanttStatement, bE as GanttValidDiagram, bF as GitGraphBody, bG as GitGraphMutationOp, bH as GitGraphValidDiagram, bI as GroupId, bJ as HOSTED_FONT_RESOURCES, bK as InitDirective, bL as JourneyBody, bM as JourneyMutationOp, bN as JourneySection, bO as JourneyTask, bP as JourneyValidDiagram, bQ as LayoutRouteCertificate, bR as LayoutRouteClass, bS as LayoutWarning, bT as LibraryRenderTransport, bU as MAX_HOSTED_PNG_BYTES, bV as MAX_HOSTED_PNG_PIXELS, bW as MAX_PNG_FONT_DIRECTORIES, bX as MAX_PNG_FONT_DIRECTORY_LENGTH, bY as MAX_PNG_PIXELS, bZ as MAX_PNG_RASTER_DIMENSION, b_ as MarkerDescriptor, b$ as MermaidFamilyClassification, c0 as MermaidFamilyDetectionError, c1 as MindmapBody, c2 as MindmapMutationOp, c3 as MindmapValidDiagram, c4 as MutableValidDiagram, c5 as MutationError, c6 as NATIVE_PNG_HOST_ONLY_OPTION_FIELDS, c7 as NATIVE_PNG_OUTPUT_POLICY_FIELDS, c8 as NativePngHostOnlyOptionField, c9 as NativePngOutputPolicyField, ca as NodeId, cb as PNG_DEFAULT_FONT_FAMILY, cc as PNG_DEFAULT_SCALE, cd as PNG_FONT_SOURCES, ce as PNG_NAPI_RUNTIME, cf as PNG_OUTPUT_OPTION_FIELDS, cg as PNG_OUTPUT_OPTION_FIELD_DESCRIPTORS, ch as PNG_OUTPUT_POLICY_VERSION, ci as PNG_WASM_RUNTIME, cj as PORTABLE_PNG_OUTPUT_OPTION_FIELDS, ck as PRIMITIVE_REALIZATIONS, cl as ParseError, cm as ParticipantId, cn as PieBody, co as PieMutationOp, cp as PieSlice, cq as PieValidDiagram, cr as PngFitTo, cs as PngFontSource, ct as PngOutputOptionField, cu as PngOutputOptionFieldDescriptor, cv as PngOutputOptionInputKind, cw as PngOutputOptionPolicyState, cx as PngOutputOptionReceiptState, cy as PngOutputOptionScope, cz as PngRasterDimensions, cA as PortSemanticRole, cB as PortSide, cC as PortablePngOutputOptionField, cD as PortablePngOutputOptions, cE as PreservedDiagramBody, cF as PreservedSourceSpans, cG as PreservedValidDiagram, cH as QuadrantAxis, cI as QuadrantBody, cJ as QuadrantMutationOp, cK as QuadrantPoint, cL as QuadrantValidDiagram, cM as RENDER_CONTRACT_VERSION, cN as RENDER_OUTPUTS, cO as RENDER_OUTPUT_DESCRIPTORS, cP as RESOURCE_MANIFEST, cQ as RESOURCE_MANIFEST_VERSION, cR as ROLE_STYLE_PROPERTY_DESCRIPTORS, cS as RadarBody, cT as RadarBodyAxis, cU as RadarBodyCurve, cV as RadarMutationOp, cW as RadarValidDiagram, cX as RegionContainmentCertificate, cY as RenderCapabilityError, cZ as RenderOutputDescriptor, c_ as RenderOutputTransports, c$ as RenderedAscii, d0 as RenderedLayout, d1 as RenderedLayoutEdge, d2 as RenderedLayoutGroup, d3 as RenderedLayoutNode, d4 as RenderedRegionKind, d5 as ResolvedPngOutputPolicy, d6 as ResolvedTerminalOutputPolicy, d7 as Result, d8 as RoleStyleFor, d9 as RoleStyleSpec, da as RoleStyles, db as RouteBlocker, dc as RouteCertificate, dd as RouteClass, de as RoutePortAssignment, df as SCENE_CONTRACT_VERSION, dg as SCENE_ROLE_DESCRIPTORS, dh as SCENE_VALIDATION_LIMITS, di as SCENE_VALIDATION_VERSION, dj as SEMANTIC_BINDING_CHANNELS, dk as SHARED_RENDER_OPTION_FIELDS, dl as STYLE_COLOR_TOKEN_DESCRIPTORS, dm as STYLE_SPEC_FIELD_DESCRIPTORS, dn as STYLE_SPEC_FORMAT_VERSION, dp as SceneDoc, dq as SceneNode, dr as SceneRole, ds as SceneValidationDiagnostic, dt as SceneValidationDiagnosticCode, du as SceneValidationError, dv as SceneValidationOptions, dw as SceneValidationResult, dx as SemanticBinding, dy as SemanticBindingChannel, dz as SemanticChannels, dA as SemanticSlots, dB as SequenceBody, dC as SequenceMessage, dD as SequenceMessageStyle, dE as SequenceMutationOp, dF as SequenceParticipant, dG as SequenceValidDiagram, dH as SerializedFlowchartGraph, dI as SourceComment, dJ as SourceMap, dK as SourceMapSpans, dL as SourcePreservationReceipt, dM as SourceSpan, dN as SourceSpanPoint, dO as StateBody, dP as StateMutationOp, dQ as StateNode, dR as StateTransition, dS as StateValidDiagram, dT as StyleBackend, dU as StyleBackendContext, dV as StyleColors, dW as StyleDescriptor, dX as StyleInput, dY as StyleReferenceResolution, dZ as StyleRegistrationOptions, d_ as StyleSpec, d$ as TERMINAL_BOUNDED_PADDING_X, e0 as TERMINAL_DEFAULT_BOX_BORDER_PADDING, e1 as TERMINAL_DEFAULT_PADDING_X, e2 as TERMINAL_DEFAULT_PADDING_Y, e3 as TERMINAL_OUTPUT_POLICY_VERSION, e4 as TEXT_MEASUREMENT_CONTRACT, e5 as TerminalOutputPolicyError, e6 as TerminalOutputPolicyInput, e7 as TextMeasurementContract, e8 as TextMeasurementInput, e9 as TextMeasurementResult, ea as Tier1WarningCode, eb as Tier2WarningCode, ec as TimelineBody, ed as TimelineEvent, ee as TimelineMutationOp, ef as TimelinePeriod, eg as TimelineSection, eh as TimelineValidDiagram, ei as UNREGISTERED_FAMILY_CAPABILITY_STATES, ej as UPSTREAM_MERMAID_FAMILY_INDEX, ek as UpstreamFamilyDescriptor, el as UpstreamHeaderDescriptor, em as UpstreamHeaderMatch, en as UpstreamManifestDiff, eo as UpstreamMermaidFamilyIndex, ep as UpstreamMermaidManifest, eq as ValidDiagram, er as ValidDiagramMeta, es as ValidDiagramPayload, et as VerifyOptions, eu as VerifyResult, ev as WARNING_SEVERITY, ew as WARNING_TIER, ex as WarningCode, ey as WarningSeverity, ez as WarningTier, eA as XyChartAxis, eB as XyChartAxisSpec, eC as XyChartBody, eD as XyChartMutationOp, eE as XyChartSeries, eF as XyChartValidDiagram, eG as asArchitecture, eH as asClass, eI as asEr, eJ as asFlowchart, eK as asGantt, eL as asGitGraph, eM as asJourney, eN as asMindmap, eO as asPie, eP as asQuadrant, eQ as asRadar, eR as asSequence, eS as asState, eT as asTimeline, eU as asXyChart, eV as assertHostedPngRasterBudget, eW as assertPngRasterBudget, eX as assertValidSceneDoc, eY as buildExternalScene, eZ as builtinFamilyMetadata, e_ as classifyMermaidFamilyFromFirstLine, e$ as createExtensionIdentity, f0 as declareFamilyScenePrimitiveEvidence, f1 as detectRegisteredFamilyFromFirstLine, f2 as effectiveFamilyCapabilityState, f3 as err, f4 as findUpstreamFamilyByHeader, f5 as getBackend, f6 as getFamily, f7 as getFamilyConformanceReport, f8 as getStyle, f9 as hostedFontResource, fa as inferBackend, fb as isBuiltinFamilyId, fc as isExternalFamilyId, fd as knownBackendDescriptors, fe as knownBuiltinFamilies, ff as knownFamilies, fg as knownStyleDescriptors, fh as knownStyles, fi as measureText, fj as measureTextWidth, fk as negotiateCapabilities, fl as negotiateRenderCapabilities, fm as normalizePortablePngBackground, fn as ok, fo as omitPngOutputOptions, fp as parseRegisteredMermaid, fq as parseSemVer, fr as pngNapiRuntimeProvenance, fs as pngOutputOptionsJsonSchema, ft as pngRasterDimensions, fu as prepareSvgForPngRasterization, fv as projectNativePngOutputPolicyInput, fw as projectPortablePngOutputOptions, fx as registerBackend, fy as registerStyle, fz as resolvePngOutputPolicy, fA as resolvePortablePngOutputPolicy, fB as resolveSceneRoleTraits, fC as resolveStyleReference, fD as resolveStyleStack, fE as resolveTerminalOutputPolicy, fF as runBackendConformance, fG as sceneRoleTraits, fH as semVerSatisfies, fI as sharedRenderOptionsJsonSchema, fJ as styleInputJsonSchema, fK as styleSpecJsonSchema, fL as svgIntrinsicDimensions, fM as terminalConnectorCapabilityClaims, fN as toFinite, fO as validatePrimitiveCapabilities, fP as validateResourceManifest, fQ as validateSceneDoc, fR as validateSerializableRenderOptions, fS as validateStyleSpec, fT as verifyNoExternalRefs, fU as verifyResourceBytes } from './index-CLwYn6Im.js';
3
+ import { P as ParsedDiagram, R as RenderOptions, a as PngOutputPolicyInput, b as RenderRequestReceipt, c as PngRuntimeProvenance, H as HostBackendPolicy, A as AsciiRenderOptions, d as RenderedRegion, D as DiagramActionRecord } from './index-BFg_LoZS.js';
4
+ export { e as Accessibility, f as AnyMutationOp, g as AnyPort, h as ArchitectureBody, i as ArchitectureEdge, j as ArchitectureEndpoint, k as ArchitectureEndpointBoundary, l as ArchitectureGroup, m as ArchitectureJunction, n as ArchitectureMutationOp, o as ArchitectureService, p as ArchitectureSide, q as ArchitectureValidDiagram, r as ArchitectureVisualOverrides, s as AsciiRenderColorMode, t as AsciiWidthError, u as AsciiWidthErrorReason, B as BACKEND_CONFORMANCE_CHECK_IDS, v as BACKEND_CONFORMANCE_FIXTURE_ID, w as BACKEND_CONFORMANCE_VERSION, x as BINDABLE_ROLE_STYLE_PROPERTIES, y as BINDABLE_SCENE_ROLES, z as BRAND_CONSTRAINT_DESCRIPTORS, C as BRAND_CONSTRAINT_KINDS, E as BUILTIN_FAMILY_METADATA, F as BUILTIN_FAMILY_METADATA_COVERS_DIAGRAM_KIND, G as BUILTIN_SCENE_ROLE_TRAITS, I as BackendCapabilityConformanceResult, J as BackendCapabilityConformanceStatus, K as BackendConformanceCheck, L as BackendConformanceCheckId, M as BackendConformanceReport, N as BackendDescriptor, O as BackendRegistrationOptions, Q as BindableSceneRole, S as BrandConstraint, T as BrandConstraintAction, U as BrandConstraintKind, V as BuiltinFamilyId, W as BuiltinFamilyMetadata, X as CAPABILITY_NEGOTIATION_VERSION, Y as CORE_CAPABILITY_OFFERS, Z as CORE_SCENE_FEATURES, _ as CORE_SCENE_OPERATIONS, $ as CORE_SCENE_PRIMITIVES, a0 as CapabilityDecision, a1 as CapabilityId, a2 as CapabilityOffer, a3 as CapabilityRequirement, a4 as CapabilityRequirementLevel, a5 as CapabilityResolution, a6 as ClassBody, a7 as ClassMutationOp, a8 as ClassNode, a9 as ClassNote, aa as ClassRelation, ab as ClassRelationKind, ac as ClassValidDiagram, ad as CliRenderTransport, ae as CodeModeRenderTransport, af as ConnectorContourSemantics, ag as ConnectorEndpoints, ah as ConnectorGeometry, ai as ConnectorHitGeometry, aj as ConnectorLabelDescriptor, ak as ConnectorMark, al as ConnectorRelationship, am as ConnectorRoute, an as ConnectorStroke, ao as ConnectorSubpath, ap as ConnectorTerminalLabelProjection, aq as ConnectorTerminalMarkerPlacement, ar as ConnectorTerminalMarkerProjection, as as ConnectorTerminalProjection, at as ConnectorTerminalStrokeLoss, au as DEFAULT_LABEL_CHAR_CAP, av as DefaultBackend, aw as DiagramActionKind, ax as DiagramActionSecurity, ay as DiagramAnalysis, az as DiagramBody, aA as DiagramKind, aB as DiamondFacet, aC as EXACT_ROLE_STYLE_CONTRACT, aD as EXACT_STYLE_SCENE_ROLES, aE as EXTERNAL_SCENE_API_VERSION, aF as EdgeId, aG as EdgeRouteCertificate, aH as ErAttribute, aI as ErBody, aJ as ErCardinality, aK as ErEntity, aL as ErMutationOp, aM as ErRelation, aN as ErValidDiagram, aO as ExactStyleSceneRole, aP as ExtensionDiagramBody, aQ as ExtensionIdentity, aR as ExtensionValidDiagram, aS as ExternalFamilyId, aT as ExternalSceneConnector, aU as ExternalSceneConnectorGeometry, aV as ExternalSceneConnectorLabel, aW as ExternalSceneContainer, aX as ExternalSceneDataMark, aY as ExternalSceneDocument, aZ as ExternalSceneGeometry, a_ as ExternalSceneInput, a$ as ExternalSceneMarker, b0 as ExternalSceneNode, b1 as ExternalSceneNodeBase, b2 as ExternalSceneShape, b3 as ExternalSceneText, b4 as ExtractedLabel, b5 as FAMILY_CAPABILITY_COLUMNS, b6 as FAMILY_CONFORMANCE_MAX_EXAMPLE_BYTES, b7 as FAMILY_CONFORMANCE_VERSION, b8 as FAMILY_DESCRIPTOR_CONTRACT_VERSION, b9 as FamilyCapability, ba as FamilyCapabilityConformanceResult, bb as FamilyCapabilityEvidence, bc as FamilyCapabilityState, bd as FamilyConformanceReport, be as FamilyConformanceStatus, bf as FamilyDescriptor, bg as FamilyDetectionDiagnostic, bh as FamilyEdgeRouteCertificate, bi as FamilyId, bj as FamilyOperations, bk as FamilyParsedBody, bl as FamilyPositionedProjectionContext, bm as FamilyPositionedProjectionOptions, bn as FamilyPositionedView, bo as FamilyRouteCertificate, bp as FamilyScenePositivePrimitive, bq as FamilyScenePrimitiveApplicability, br as FamilyScenePrimitiveEvidence, bs as FamilySceneRolePrimitiveDeclaration, bt as FeedbackEdgeAnalysis, bu as Finite, bv as FlowchartMutationOp, bw as FlowchartValidDiagram, bx as GanttBody, by as GanttBodySection, bz as GanttBodyTask, bA as GanttBodyTaskTag, bB as GanttMutationOp, bC as GanttScheduleAnalysisSummary, bD as GanttStatement, bE as GanttValidDiagram, bF as GitGraphBody, bG as GitGraphMutationOp, bH as GitGraphValidDiagram, bI as GroupId, bJ as HOSTED_FONT_RESOURCES, bK as InitDirective, bL as JourneyBody, bM as JourneyMutationOp, bN as JourneySection, bO as JourneyTask, bP as JourneyValidDiagram, bQ as LayoutRouteCertificate, bR as LayoutRouteClass, bS as LayoutWarning, bT as LibraryRenderTransport, bU as MAX_HOSTED_PNG_BYTES, bV as MAX_HOSTED_PNG_PIXELS, bW as MAX_PNG_FONT_DIRECTORIES, bX as MAX_PNG_FONT_DIRECTORY_LENGTH, bY as MAX_PNG_PIXELS, bZ as MAX_PNG_RASTER_DIMENSION, b_ as MarkerDescriptor, b$ as MermaidFamilyClassification, c0 as MermaidFamilyDetectionError, c1 as MindmapBody, c2 as MindmapMutationOp, c3 as MindmapValidDiagram, c4 as MutableValidDiagram, c5 as MutationError, c6 as NATIVE_PNG_HOST_ONLY_OPTION_FIELDS, c7 as NATIVE_PNG_OUTPUT_POLICY_FIELDS, c8 as NativePngHostOnlyOptionField, c9 as NativePngOutputPolicyField, ca as NodeId, cb as PNG_DEFAULT_FONT_FAMILY, cc as PNG_DEFAULT_SCALE, cd as PNG_FONT_SOURCES, ce as PNG_NAPI_RUNTIME, cf as PNG_OUTPUT_OPTION_FIELDS, cg as PNG_OUTPUT_OPTION_FIELD_DESCRIPTORS, ch as PNG_OUTPUT_POLICY_VERSION, ci as PNG_WASM_RUNTIME, cj as PORTABLE_PNG_OUTPUT_OPTION_FIELDS, ck as PRIMITIVE_REALIZATIONS, cl as ParseError, cm as ParticipantId, cn as PieBody, co as PieMutationOp, cp as PieSlice, cq as PieValidDiagram, cr as PngFitTo, cs as PngFontSource, ct as PngOutputOptionField, cu as PngOutputOptionFieldDescriptor, cv as PngOutputOptionInputKind, cw as PngOutputOptionPolicyState, cx as PngOutputOptionReceiptState, cy as PngOutputOptionScope, cz as PngRasterDimensions, cA as PortSemanticRole, cB as PortSide, cC as PortablePngOutputOptionField, cD as PortablePngOutputOptions, cE as PreservedDiagramBody, cF as PreservedSourceSpans, cG as PreservedValidDiagram, cH as QuadrantAxis, cI as QuadrantBody, cJ as QuadrantMutationOp, cK as QuadrantPoint, cL as QuadrantValidDiagram, cM as RENDER_CONTRACT_VERSION, cN as RENDER_OUTPUTS, cO as RENDER_OUTPUT_DESCRIPTORS, cP as RESOURCE_MANIFEST, cQ as RESOURCE_MANIFEST_VERSION, cR as ROLE_STYLE_PROPERTY_DESCRIPTORS, cS as RadarBody, cT as RadarBodyAxis, cU as RadarBodyCurve, cV as RadarMutationOp, cW as RadarValidDiagram, cX as RegionContainmentCertificate, cY as RenderCapabilityError, cZ as RenderOutputDescriptor, c_ as RenderOutputTransports, c$ as RenderedAscii, d0 as RenderedLayout, d1 as RenderedLayoutEdge, d2 as RenderedLayoutGroup, d3 as RenderedLayoutNode, d4 as RenderedRegionKind, d5 as ResolvedPngOutputPolicy, d6 as ResolvedTerminalOutputPolicy, d7 as Result, d8 as RoleStyleFor, d9 as RoleStyleSpec, da as RoleStyles, db as RouteBlocker, dc as RouteCertificate, dd as RouteClass, de as RoutePortAssignment, df as SCENE_CONTRACT_VERSION, dg as SCENE_ROLE_DESCRIPTORS, dh as SCENE_VALIDATION_LIMITS, di as SCENE_VALIDATION_VERSION, dj as SEMANTIC_BINDING_CHANNELS, dk as SHARED_RENDER_OPTION_FIELDS, dl as STYLE_COLOR_TOKEN_DESCRIPTORS, dm as STYLE_SPEC_FIELD_DESCRIPTORS, dn as STYLE_SPEC_FORMAT_VERSION, dp as SceneDoc, dq as SceneNode, dr as SceneRole, ds as SceneValidationDiagnostic, dt as SceneValidationDiagnosticCode, du as SceneValidationError, dv as SceneValidationOptions, dw as SceneValidationResult, dx as SemanticBinding, dy as SemanticBindingChannel, dz as SemanticChannels, dA as SemanticSlots, dB as SequenceBody, dC as SequenceMessage, dD as SequenceMessageStyle, dE as SequenceMutationOp, dF as SequenceParticipant, dG as SequenceValidDiagram, dH as SerializedFlowchartGraph, dI as SourceComment, dJ as SourceMap, dK as SourceMapSpans, dL as SourcePreservationReceipt, dM as SourceSpan, dN as SourceSpanPoint, dO as StateBody, dP as StateMutationOp, dQ as StateNode, dR as StateTransition, dS as StateValidDiagram, dT as StyleBackend, dU as StyleBackendContext, dV as StyleColors, dW as StyleDescriptor, dX as StyleInput, dY as StyleReferenceResolution, dZ as StyleRegistrationOptions, d_ as StyleSpec, d$ as TERMINAL_BOUNDED_PADDING_X, e0 as TERMINAL_DEFAULT_BOX_BORDER_PADDING, e1 as TERMINAL_DEFAULT_PADDING_X, e2 as TERMINAL_DEFAULT_PADDING_Y, e3 as TERMINAL_OUTPUT_POLICY_VERSION, e4 as TEXT_MEASUREMENT_CONTRACT, e5 as TerminalOutputPolicyError, e6 as TerminalOutputPolicyInput, e7 as TextMeasurementContract, e8 as TextMeasurementInput, e9 as TextMeasurementResult, ea as Tier1WarningCode, eb as Tier2WarningCode, ec as TimelineBody, ed as TimelineEvent, ee as TimelineMutationOp, ef as TimelinePeriod, eg as TimelineSection, eh as TimelineValidDiagram, ei as UNREGISTERED_FAMILY_CAPABILITY_STATES, ej as UPSTREAM_MERMAID_FAMILY_INDEX, ek as UpstreamFamilyDescriptor, el as UpstreamHeaderDescriptor, em as UpstreamHeaderMatch, en as UpstreamManifestDiff, eo as UpstreamMermaidFamilyIndex, ep as UpstreamMermaidManifest, eq as ValidDiagram, er as ValidDiagramMeta, es as ValidDiagramPayload, et as VerifyOptions, eu as VerifyResult, ev as WARNING_SEVERITY, ew as WARNING_TIER, ex as WarningCode, ey as WarningSeverity, ez as WarningTier, eA as XyChartAxis, eB as XyChartAxisSpec, eC as XyChartBody, eD as XyChartMutationOp, eE as XyChartSeries, eF as XyChartValidDiagram, eG as asArchitecture, eH as asClass, eI as asEr, eJ as asFlowchart, eK as asGantt, eL as asGitGraph, eM as asJourney, eN as asMindmap, eO as asPie, eP as asQuadrant, eQ as asRadar, eR as asSequence, eS as asState, eT as asTimeline, eU as asXyChart, eV as assertHostedPngRasterBudget, eW as assertPngRasterBudget, eX as assertValidSceneDoc, eY as buildExternalScene, eZ as builtinFamilyMetadata, e_ as classifyMermaidFamilyFromFirstLine, e$ as createExtensionIdentity, f0 as declareFamilyScenePrimitiveEvidence, f1 as detectRegisteredFamilyFromFirstLine, f2 as effectiveFamilyCapabilityState, f3 as err, f4 as findUpstreamFamilyByHeader, f5 as getBackend, f6 as getFamily, f7 as getFamilyConformanceReport, f8 as getStyle, f9 as hostedFontResource, fa as inferBackend, fb as isBuiltinFamilyId, fc as isExternalFamilyId, fd as knownBackendDescriptors, fe as knownBuiltinFamilies, ff as knownFamilies, fg as knownStyleDescriptors, fh as knownStyles, fi as measureText, fj as measureTextWidth, fk as negotiateCapabilities, fl as negotiateRenderCapabilities, fm as normalizePortablePngBackground, fn as ok, fo as omitPngOutputOptions, fp as parseRegisteredMermaid, fq as parseSemVer, fr as pngNapiRuntimeProvenance, fs as pngOutputOptionsJsonSchema, ft as pngRasterDimensions, fu as prepareSvgForPngRasterization, fv as projectNativePngOutputPolicyInput, fw as projectPortablePngOutputOptions, fx as registerBackend, fy as registerStyle, fz as resolvePngOutputPolicy, fA as resolvePortablePngOutputPolicy, fB as resolveSceneRoleTraits, fC as resolveStyleReference, fD as resolveStyleStack, fE as resolveTerminalOutputPolicy, fF as runBackendConformance, fG as sceneRoleTraits, fH as semVerSatisfies, fI as sharedRenderOptionsJsonSchema, fJ as styleInputJsonSchema, fK as styleSpecJsonSchema, fL as svgIntrinsicDimensions, fM as terminalConnectorCapabilityClaims, fN as toFinite, fO as validatePrimitiveCapabilities, fP as validateResourceManifest, fQ as validateSceneDoc, fR as validateSerializableRenderOptions, fS as validateStyleSpec, fT as verifyNoExternalRefs, fU as verifyResourceBytes } from './index-BFg_LoZS.js';
5
5
 
6
6
  interface PngFontWarning {
7
7
  code: 'PNG_FONT_COVERAGE';
package/dist/agent.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  renderMermaidWithActions
3
- } from "./chunk-3QCXO4V6.js";
3
+ } from "./chunk-R5U67OIW.js";
4
4
  import {
5
5
  createMermaidPNGRenderer,
6
6
  renderMermaidPNG,
7
7
  renderMermaidPNGWithReceipt
8
- } from "./chunk-GILQUGFK.js";
8
+ } from "./chunk-YWKCUBQN.js";
9
9
  import {
10
10
  ASCII_ROUTE_PARITY_CONTRACT,
11
11
  BOUND_PROVENANCE,
@@ -46,7 +46,7 @@ import {
46
46
  validateOp,
47
47
  verifyMermaid,
48
48
  verifySummary
49
- } from "./chunk-AVCWKYII.js";
49
+ } from "./chunk-GX7UT56Q.js";
50
50
  import {
51
51
  AsciiWidthError,
52
52
  BACKEND_CONFORMANCE_CHECK_IDS,
@@ -204,7 +204,7 @@ import {
204
204
  validateStyleSpec,
205
205
  verifyNoExternalRefs,
206
206
  verifyResourceBytes
207
- } from "./chunk-WHYJLDYG.js";
207
+ } from "./chunk-3D4EHVQ4.js";
208
208
  export {
209
209
  ASCII_ROUTE_PARITY_CONTRACT,
210
210
  AsciiWidthError,
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runMcpCli
4
- } from "./chunk-HFD4MALA.js";
5
- import "./chunk-UJNY65QS.js";
6
- import "./chunk-GILQUGFK.js";
7
- import "./chunk-AVCWKYII.js";
8
- import "./chunk-WHYJLDYG.js";
4
+ } from "./chunk-NE6JBHSE.js";
5
+ import "./chunk-IVN6KP3W.js";
6
+ import "./chunk-YWKCUBQN.js";
7
+ import "./chunk-GX7UT56Q.js";
8
+ import "./chunk-3D4EHVQ4.js";
9
9
 
10
10
  // src/mcp/mcp-bin.ts
11
11
  var code = await runMcpCli(process.argv.slice(2));
package/dist/am.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-3QCXO4V6.js";
2
+ import "./chunk-R5U67OIW.js";
3
3
  import {
4
4
  projectRenderErrorDiagnostic
5
- } from "./chunk-UJNY65QS.js";
5
+ } from "./chunk-IVN6KP3W.js";
6
6
  import {
7
7
  renderMermaidPNGWithReceipt
8
- } from "./chunk-GILQUGFK.js";
8
+ } from "./chunk-YWKCUBQN.js";
9
9
  import {
10
10
  configWarningsForMermaid,
11
11
  describeMermaid,
@@ -19,7 +19,7 @@ import {
19
19
  renderMermaidSVG,
20
20
  renderMermaidSVGWithReceipt,
21
21
  verifyMermaid
22
- } from "./chunk-AVCWKYII.js";
22
+ } from "./chunk-GX7UT56Q.js";
23
23
  import {
24
24
  BACKEND_CONFORMANCE_VERSION,
25
25
  BUILTIN_FAMILY_METADATA,
@@ -82,7 +82,7 @@ import {
82
82
  synthesizeFromGraph,
83
83
  validateSerializableRenderOptions,
84
84
  validateStyleSpec
85
- } from "./chunk-WHYJLDYG.js";
85
+ } from "./chunk-3D4EHVQ4.js";
86
86
 
87
87
  // src/cli/index.ts
88
88
  import { readFileSync as readFileSync2, existsSync as existsSync2, writeFileSync as writeFileSync2, mkdtempSync, statSync, watch } from "fs";
@@ -34552,7 +34552,7 @@ function toJsonSafe(d) {
34552
34552
  // src/cli/run-entrypoint.ts
34553
34553
  async function runAmCli(argv) {
34554
34554
  if (argv[0] === "mcp") {
34555
- const { runMcpCli } = await import("./mcp-cli-SJVOGRA6.js");
34555
+ const { runMcpCli } = await import("./mcp-cli-XGZP6CMW.js");
34556
34556
  return runMcpCli(argv.slice(1));
34557
34557
  }
34558
34558
  return runCli(argv);
@@ -0,0 +1,31 @@
1
+ import{a as Ye}from"./chunk-STQRDZ67.js";import"./chunk-GRXCKTHX.js";import{c as De}from"./chunk-W6Q4PHPC.js";import"./chunk-EBPTM2RP.js";import{a as Oe}from"./chunk-M6BT2HIP.js";import{a as K}from"./chunk-PZEWZT35.js";import{a as Ue}from"./chunk-I6VE56S7.js";import{b as Te,c as Ee,e as Ce}from"./chunk-FLD63DXE.js";import{a as fe,j as te,k as ze}from"./chunk-32FWKUUV.js";import{a as Le,b as _e,c as Fe}from"./chunk-EPFMQPXX.js";import{H as Be,I as We,L as re,N as me,O as H,P as ie,Q as je,fa as Ge,i as Ie,ia as U,ja as xe,ka as oe,la as ye,na as Ne,oa as Xe,pa as ce,qa as He,xa as Ve}from"./chunk-EX6TP7QM.js";import{f as ne}from"./chunk-P7HMSKHJ.js";var St=Object.freeze({id:"architecture",upstreamId:"architecture",maturity:"stable",label:"Architecture",headers:["architecture","architecture-beta"],aliases:[],config:{section:"architecture",keys:["padding","iconSize","fontSize","nodeSeparation","idealEdgeLengthMultiplier","edgeElasticity","numIter","seed","randomize"],noopKeys:["edgeElasticity","numIter","randomize","seed"]},identity:{id:"family:architecture",kind:"family",version:"1.0.0",compatibility:{core:"^0.3.0"},provenance:{owner:"agentic-mermaid",source:"built-in"}},collisionPriority:100,semanticChannels:[],semanticRoles:["prelude","defs","chrome","title","group","group-header","icon","label","service","junction","edge"],scenePrimitiveEvidence:[{role:"prelude",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"marker",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"title",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group-header",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"icon",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"label",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"service",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"service",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"junction",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"junction",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"edge",primitive:"connector",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]}],example:`architecture-beta
2
+ group backend(cloud)[Backend]
3
+ service api(server)[API] in backend
4
+ service db(database)[Database] in backend
5
+ service cache(disk)[Cache] in backend
6
+ api:R --> L:db
7
+ api:B -[reads]-> T:cache`,detect:e=>/^architecture(?:-beta)?\s*$/.test(e),detectLoose:e=>/^architecture(?:-beta)?(?:\s|$)/.test(e)}),Je=St;var de=36,be=56,$t=1.5,W={groupHeaderHeight:28,groupFontSize:12,groupFontWeight:600,groupLetterSpacing:0,groupPaddingX:16,groupPaddingY:16,groupLabelPaddingX:12,groupCornerRadius:0,groupLineWidth:1,serviceFontSize:13,serviceFontWeight:500,serviceLetterSpacing:0,servicePaddingX:20,servicePaddingY:10,serviceCornerRadius:0,serviceLineWidth:1,edgeFontSize:11,edgeFontWeight:400,edgeLetterSpacing:0,edgeLineWidth:1,edgeBendRadius:0,iconSize:16,serviceIconSize:18,junctionOuterRadius:8,junctionInnerRadius:4.5};function Qe(e,t,r={},n){let o=Ke(e,"themeVariables"),a=Ke(e,"architecture"),l=Q(ae(a,"fontSize")??ae(e,"fontSize")??ae(o,"fontSize")??W.serviceFontSize,10,24),s=Q(ae(a,"iconSize")??W.serviceIconSize,12,40),d=Q(Math.round(s*(W.iconSize/W.serviceIconSize)),10,36),c=Q(Math.round(l*.92),10,22),v=Q(Math.round(l*.85),10,20),m=Math.max(W.groupHeaderHeight,Math.round(Math.max(c,d)+12)),A=Q(Math.round(s*.44),8,18),p=Number((A*.56).toFixed(1)),f={nodeLabelFontSize:l,edgeLabelFontSize:v,groupHeaderFontSize:c,nodeLabelFontWeight:W.serviceFontWeight,edgeLabelFontWeight:W.edgeFontWeight,groupHeaderFontWeight:W.groupFontWeight,nodePaddingX:W.servicePaddingX,nodePaddingY:W.servicePaddingY,nodeCornerRadius:W.serviceCornerRadius,nodeLineWidth:W.serviceLineWidth,edgeLineWidth:W.edgeLineWidth,edgeBendRadius:W.edgeBendRadius,groupCornerRadius:W.groupCornerRadius,groupPaddingX:W.groupPaddingX,groupPaddingY:W.groupPaddingY,groupLabelPaddingX:W.groupLabelPaddingX,groupLineWidth:W.groupLineWidth},u=ze(r,f,n),b={...{groupHeaderHeight:Math.max(m,u.groupHeaderFontSize+12),groupFontSize:u.groupHeaderFontSize,groupFontWeight:u.groupHeaderFontWeight,groupLetterSpacing:u.groupLetterSpacing,groupFont:u.groupFont,groupTextTransform:u.groupTextTransform,groupPaddingX:u.groupPaddingX,groupPaddingY:u.groupPaddingY,groupLabelPaddingX:u.groupLabelPaddingX,groupCornerRadius:u.groupCornerRadius,groupLineWidth:u.groupLineWidth,serviceFontSize:u.nodeLabelFontSize,serviceFontWeight:u.nodeLabelFontWeight,serviceLetterSpacing:u.nodeLetterSpacing,serviceTextTransform:u.nodeTextTransform,servicePaddingX:u.nodePaddingX,servicePaddingY:u.nodePaddingY,serviceCornerRadius:u.cornerRadius??0,serviceLineWidth:u.nodeLineWidth,edgeFontSize:u.edgeLabelFontSize,edgeFontWeight:u.edgeLabelFontWeight,edgeLetterSpacing:u.edgeLetterSpacing,edgeTextTransform:u.edgeTextTransform,edgeLineWidth:u.lineWidth,edgeBendRadius:u.edgeBendRadius,iconSize:d,serviceIconSize:s,junctionOuterRadius:A,junctionInnerRadius:p,groupSurface:u.groupFillColor??se(o,"clusterBkg")??t.surface,groupHeaderSurface:u.groupHeaderFillColor,groupBorder:u.groupBorderColor??se(o,"clusterBorder")??t.border,groupText:u.groupTextColor,serviceSurface:u.nodeFillColor??se(o,"mainBkg","secondaryColor")??t.surface,serviceBorder:u.nodeBorderColor??se(o,"primaryBorderColor")??t.border,serviceText:u.nodeTextColor,edgeStroke:u.edgeStrokeColor,edgeText:u.edgeTextColor},...r.architecture?.visual};if(b.junctionInnerRadius>b.junctionOuterRadius)throw new RangeError("architecture.visual.junctionInnerRadius must not exceed junctionOuterRadius");return{visual:b,layout:Rt(b),padding:Tt(a,"padding"),nodeSpacing:Mt(a),layerSpacing:kt(a)}}function Mt(e){let t=ue(e,"nodeSeparation");if(!(t===void 0||!Number.isFinite(t)||t<0))return Q(Math.round(t),0,512)}function kt(e){let t=ue(e,"idealEdgeLengthMultiplier");if(!(t===void 0||!Number.isFinite(t)||t<=0))return Q(Math.round(be*t/$t),8,512)}function Rt(e){return{groupFontSize:e.groupFontSize,groupFontWeight:e.groupFontWeight,groupLetterSpacing:e.groupLetterSpacing,groupFont:e.groupFont,groupTextTransform:e.groupTextTransform,groupPaddingX:e.groupPaddingX,groupPaddingY:e.groupPaddingY,groupCornerRadius:e.groupCornerRadius,groupLineWidth:e.groupLineWidth,serviceFontSize:e.serviceFontSize,serviceFontWeight:e.serviceFontWeight,serviceLetterSpacing:e.serviceLetterSpacing,serviceTextTransform:e.serviceTextTransform,servicePaddingX:e.servicePaddingX,servicePaddingY:e.servicePaddingY,serviceCornerRadius:e.serviceCornerRadius,serviceLineWidth:e.serviceLineWidth,edgeFontSize:e.edgeFontSize,edgeFontWeight:e.edgeFontWeight,edgeLetterSpacing:e.edgeLetterSpacing,edgeTextTransform:e.edgeTextTransform,edgeLineWidth:e.edgeLineWidth,edgeBendRadius:e.edgeBendRadius}}function se(e,...t){for(let r of t){let n=Pt(e,r);if(n)return n}}function Pt(e,t){let r=e?.[t];return typeof r=="string"?r:void 0}function ue(e,t){return Et(e?.[t])}function ae(e,t){let r=ue(e,t);return r!==void 0&&r>0?r:void 0}function Tt(e,t){let r=ue(e,t);return r!==void 0&&r>=0?r:void 0}function Ke(e,t){let r=e?.[t];return Ct(r)?r:void 0}function Et(e){if(typeof e=="number")return e;if(typeof e!="string")return;let t=e.trim();return t.match(/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:px)?$/i)?Number.parseFloat(t):void 0}function Q(e,t,r){return Math.min(r,Math.max(t,e))}function Ct(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}var qe=/^align(?:\s|$)/,Lt=/^[\w-]+$/;function Ze(e){let t=e.trim().split(/\s+/),r=t[1];if(r!=="row"&&r!=="column")return{ok:!1,reason:`expected "align row" or "align column", got "${r??""}"`};let n=t.slice(2);if(n.length<2)return{ok:!1,reason:"an align directive needs at least two members"};let o=new Set;for(let a of n){if(!Lt.test(a))return{ok:!1,reason:`align member "${a}" must match [A-Za-z0-9_-]+`};if(o.has(a))return{ok:!1,reason:`align member "${a}" is listed twice`};o.add(a)}return{ok:!0,alignment:{axis:r,members:n}}}var q="[\\w-]+",tt="\\(([^)]+)\\)",rt="\\[(.+)\\]",_t=new RegExp(`^group\\s+(${q})(?:${tt})?(?:${rt})?(?:\\s+in\\s+(${q}))?\\s*$`),Ft=new RegExp(`^service\\s+(${q})(?:${tt})?(?:${rt})?(?:\\s+in\\s+(${q}))?\\s*$`),It=new RegExp(`^junction\\s+(${q})(?:\\s+in\\s+(${q}))?\\s*$`),zt=new RegExp(`^(${q})(\\{group\\})?:(L|R|T|B)$`),Bt=new RegExp(`^(L|R|T|B):(${q})(\\{group\\})?$`);function nt(e){let t=Te(e);if(Ee(t),e=t.familyLines,e.length===0)throw new Error("Empty mermaid diagram");if(!/^architecture(?:-beta)?\s*$/i.test(e[0]))throw new Error(`Invalid mermaid header: "${e[0]}". Expected "architecture" or "architecture-beta".`);let r=new Map,n=new Map,o=new Map,a=[],l=[],s=[],d,c=t.accessibility.title===void 0?void 0:re(t.accessibility.title),v=t.accessibility.descr===void 0?void 0:re(t.accessibility.descr);for(let m=1;m<e.length;m++){let A=e[m],p=A.match(/^title\s+(.+)$/i);if(p){d=re(p[1].trim());continue}let f=A.match(_t);if(f){let b=f[1],S=f[2]?.trim()||void 0,L=re(f[3]??b),g=f[4]??void 0;ve(b,r,n,o);let i={id:b,label:L,icon:S,parentId:g,children:[]};Ae(g,r,A),r.set(b,i),we({kind:"group",id:b},g,r,a);continue}let u=A.match(Ft);if(u){let b=u[1],S=u[2]?.trim()||void 0,L=re(Dt(u[3],b)),g=u[4]??void 0;ve(b,r,n,o);let i={id:b,label:L,icon:S,parentId:g};Ae(g,r,A),n.set(b,i),we({kind:"service",id:b},g,r,a);continue}let w=A.match(It);if(w){let b=w[1],S=w[2]??void 0;ve(b,r,n,o);let L={id:b,parentId:S};Ae(S,r,A),o.set(b,L),we({kind:"junction",id:b},S,r,a);continue}if(qe.test(A)){s.push(Wt(A,r,n,o));continue}l.push(jt(A,n,o))}return{title:d,groups:[...r.values()],services:[...n.values()],junctions:[...o.values()],edges:l,alignments:s,rootChildren:a,accessibilityTitle:c,accessibilityDescription:v}}function Wt(e,t,r,n){let o=Ze(e);if(!o.ok)throw K({what:`Invalid architecture align directive "${e}" \u2014 ${o.reason}`,expectedForm:"align row|column memberA memberB ..., listing at least two distinct services or junctions",example:"align row db1 db2 db3"});for(let a of o.alignment.members)if(!(r.has(a)||n.has(a)))throw t.has(a)?new Error(`Architecture align members must be services or junctions; "${a}" is a group in line "${e}"`):K({what:`Unknown architecture align member "${a}" in line "${e}"`,expectedForm:"a service or junction declared earlier",example:`service ${a}(server)[${a}]`,known:[...r.keys(),...n.keys()]});return o.alignment}function Dt(e,t){return e??t}function ve(e,t,r,n){if(t.has(e)||r.has(e)||n.has(e))throw K({what:`Duplicate architecture identifier "${e}"`,expectedForm:"a unique id for each service, group, and junction",example:`${e}2`,known:[...t.keys(),...r.keys(),...n.keys()]})}function Ae(e,t,r){if(e&&!t.has(e))throw K({what:`Unknown architecture group "${e}" in line "${r}"`,expectedForm:"a group declared earlier with group id(icon)[Label]",example:`group ${e}(cloud)[${e}]`,known:[...t.keys()]})}function we(e,t,r,n){t?r.get(t).children.push(e):n.push(e)}function jt(e,t,r){let n=e.match(/^(\S+)\s+(.+)\s+(\S+)$/);if(!n)throw K({what:`Invalid architecture edge: "${e}"`,expectedForm:"source:SIDE <op> SIDE:target, where SIDE is L, R, T, or B",example:"api:R --> L:db"});let o=Ot(n[1]),a=Gt(n[3]),{label:l,hasArrowStart:s,hasArrowEnd:d}=Nt(n[2]);return et(o,t,r,e),et(a,t,r,e),{source:o,target:a,label:l,hasArrowStart:s,hasArrowEnd:d}}function Ot(e){let t=e.trim().match(zt);if(!t)throw new Error(`Invalid architecture edge source "${e}" \u2014 expected id then side, e.g. "api:R" in "api:R -- L:db"`);return{id:t[1],boundary:t[2]?"group":"item",side:t[3]}}function Gt(e){let t=e.trim().match(Bt);if(!t)throw new Error(`Invalid architecture edge target "${e}" \u2014 expected side then id, e.g. "L:db" in "api:R -- L:db"`);return{id:t[2],boundary:t[3]?"group":"item",side:t[1]}}function Nt(e){let t=e.trim();if(t==="<-->")return{hasArrowStart:!0,hasArrowEnd:!0};if(t==="-->")return{hasArrowStart:!1,hasArrowEnd:!0};if(t==="<--")return{hasArrowStart:!0,hasArrowEnd:!1};if(t==="--")return{hasArrowStart:!1,hasArrowEnd:!1};let r=t.match(/^(<)?-\[(.*)\]-(>)?$/);if(!r)throw K({what:`Invalid architecture edge operator "${e}"`,expectedForm:"one of --, -->, <--, <-->, or -[label]-",example:"api:R --> L:db"});return{label:re(r[2]??"").trim()||void 0,hasArrowStart:!!r[1],hasArrowEnd:!!r[3]}}function et(e,t,r,n){let o=t.get(e.id),a=r.get(e.id);if(!o&&!a)throw K({what:`Unknown architecture item "${e.id}" in line "${n}"`,expectedForm:"a service or junction declared earlier",example:`service ${e.id}(server)[${e.id}]`,known:[...t.keys(),...r.keys()]});if(e.boundary==="group"){if(!o)throw new Error(`Architecture group boundary modifier only applies to services: "${n}"`);if(!o.parentId)throw new Error(`Service "${o.id}" is not inside a group, so "{group}" is invalid in line "${n}"`)}}function it(e){let t=new Map;for(let n of e.services)t.set(n.id,{id:n.id,label:n.label,shape:n.icon?"service":"rectangle"});for(let n of e.junctions)t.set(n.id,{id:n.id,label:"",shape:"state-start"});return{direction:Ht(e.edges),nodes:t,edges:e.edges.map(n=>({source:n.source.id,target:n.target.id,label:n.label,style:"solid",hasArrowStart:n.hasArrowStart,hasArrowEnd:n.hasArrowEnd})),subgraphs:Xt(e.groups),classDefs:new Map,classAssignments:new Map,nodeStyles:new Map,linkStyles:new Map}}function Xt(e){let t=new Map(e.map(n=>[n.id,n]));function r(n){let o=[],a=[];for(let l of n.children)if(l.kind==="group"){let s=t.get(l.id);s&&a.push(r(s))}else o.push(l.id);return{id:n.id,label:n.label,nodeIds:o,children:a}}return e.filter(n=>!n.parentId).map(r)}function Ht(e){let t=0,r=0;for(let n of e)n.source.side==="L"||n.source.side==="R"?t++:r++,n.target.side==="L"||n.target.side==="R"?t++:r++;return t>=r?"LR":"TD"}var Se=16,N=18,ot=18,Vt=600,ct=20,Yt=40;function lt(e,t={},r){let n=it(e),o=De(n,{padding:t.padding??40,nodeSpacing:t.nodeSpacing??de,layerSpacing:t.layerSpacing??be,preserveSubgraphChildOrder:!0,styleFace:r?{node:{fontSize:r.serviceFontSize,fontWeight:r.serviceFontWeight,letterSpacing:r.serviceLetterSpacing,textTransform:r.serviceTextTransform,paddingX:r.servicePaddingX,paddingY:r.servicePaddingY,cornerRadius:r.serviceCornerRadius,lineWidth:r.serviceLineWidth},edge:{fontSize:r.edgeFontSize,fontWeight:r.edgeFontWeight,letterSpacing:r.edgeLetterSpacing,textTransform:r.edgeTextTransform,lineWidth:r.edgeLineWidth,bendRadius:r.edgeBendRadius},group:{fontSize:r.groupFontSize,fontWeight:r.groupFontWeight,letterSpacing:r.groupLetterSpacing,fontFamily:r.groupFont,textTransform:r.groupTextTransform,paddingX:r.groupPaddingX,paddingY:r.groupPaddingY,cornerRadius:r.groupCornerRadius,lineWidth:r.groupLineWidth}}:void 0}),a=new Map(e.services.map(i=>[i.id,i])),l=new Map(e.groups.map(i=>[i.id,i])),s=new Set(e.junctions.map(i=>i.id)),d=[],c=[],v=new Map,m=new Map;for(let i of o.nodes){let x={x:i.x,y:i.y,width:i.width,height:i.height};if(a.has(i.id)){let P=a.get(i.id);d.push({...x,id:P.id,label:P.label,icon:P.icon,parentId:P.parentId}),v.set(i.id,x)}else if(s.has(i.id)){let P=e.junctions.find(h=>h.id===i.id);c.push({...x,id:P.id,parentId:P.parentId}),m.set(i.id,x)}}let A=new Map(e.services.map((i,x)=>[i.id,x]));d.sort((i,x)=>+!!i.parentId-+!!x.parentId||(A.get(i.id)??0)-(A.get(x.id)??0)),Ut(e,d,c,t.nodeSpacing??de);for(let i of d)v.set(i.id,i);for(let i of c)m.set(i.id,i);let p=new Map,f=o.groups.map(i=>gt(i,l,p));ge(f,d,c,e.alignments.length>0);let u=Jt(e,d,c,p,t.nodeSpacing??de);if(u){ge(f,d,c,!0);for(let i of d)v.set(i.id,i);for(let i of c)m.set(i.id,i)}let w=new Map(c.map(i=>[i.id,i])),b=e.edges.map(i=>Kt(i,a,v,m,p,d,w));Zt(b,d,r);let S=e.title?te(e.title,r?.groupTextTransform):void 0,L=o.width,g=o.height;(e.alignments.length>0||u)&&(L=Math.max(80,...d.map(i=>i.x+i.width+40),...c.map(i=>i.x+i.width+40),...f.map(i=>i.x+i.width+40)),g=Math.max(80,...d.map(i=>i.y+i.height+40),...c.map(i=>i.y+i.height+40),...f.map(i=>i.y+i.height+40))),S&&(L=Math.max(L,fe(S,r?.groupFontSize??ot,r?.groupFontWeight??Vt)+Yt*2),g=Math.max(g,ct+ot+20));for(let i of b){for(let x of i.points)L=Math.max(L,x.x+40),g=Math.max(g,x.y+40);i.labelPosition&&(L=Math.max(L,i.labelPosition.x+72),g=Math.max(g,i.labelPosition.y+28))}return{width:L,height:g,...S?{title:{text:S,x:L/2,y:ct}}:{},groups:f,services:d,junctions:c,edges:b,accessibilityTitle:e.accessibilityTitle,accessibilityDescription:e.accessibilityDescription}}function Ut(e,t,r,n){let o=new Map;for(let p of t)o.set(p.id,p);for(let p of r)o.set(p.id,p);let a=new Set(e.alignments.filter(p=>p.axis==="row").flatMap(p=>p.members)),l=[...e.alignments.filter(p=>p.axis==="row"),...e.alignments.filter(p=>p.axis==="column")];for(let p of l){let f=p.members.map(u=>o.get(u)).filter(u=>u!==void 0);if(!(f.length<2))if(p.axis==="row"){let u=Math.min(...f.map(b=>b.y+b.height/2)),w=Math.min(...f.map(b=>b.x));for(let b of f)b.x=w,b.y=u-b.height/2,w+=b.width+n}else{let u=Math.min(...f.map(S=>S.x+S.width/2)),w=f.every(S=>!a.has(S.id)),b=Math.min(...f.map(S=>S.y));for(let S of f)S.x=u-S.width/2,w&&(S.y=b,b+=S.height+n)}}let s=new Map,d=p=>{let f=s.get(p)??p;if(f===p)return s.set(p,p),p;let u=d(f);return s.set(p,u),u},c=(p,f)=>{let u=d(p),w=d(f);u!==w&&s.set(w,u)};for(let p of e.alignments)if(p.axis==="column")for(let f=1;f<p.members.length;f++)c(p.members[0],p.members[f]);for(let p of e.alignments){if(p.axis!=="row")continue;let f=p.members.map(w=>o.get(w)).filter(w=>w!==void 0),u=-1/0;for(let w of f){if(w.x<u){let b=u-w.x,S=d(w.id);for(let L of o.values())d(L.id)===S&&(L.x+=b)}u=w.x+w.width+n}}let v=new Map,m=p=>{let f=v.get(p)??p;if(f===p)return v.set(p,p),p;let u=m(f);return v.set(p,u),u},A=(p,f)=>{let u=m(p),w=m(f);u!==w&&v.set(w,u)};for(let p of e.alignments)if(p.axis==="row")for(let f=1;f<p.members.length;f++)A(p.members[0],p.members[f]);for(let p=0;p<2;p++)for(let f of e.alignments){if(f.axis!=="row")continue;let u=f.members.map(i=>o.get(i)).filter(i=>i!==void 0);if(u.length<2)continue;let w=m(u[0].id),b=Math.min(...u.map(i=>i.x)),S=Math.max(...u.map(i=>i.x+i.width)),L=Math.min(...u.map(i=>i.y)),g=Math.max(...u.map(i=>i.y+i.height));for(let i of o.values()){if(m(i.id)===w||!(i.x<S&&i.x+i.width>b&&i.y<g&&i.y+i.height>L))continue;let P=m(i.id),h=[...o.values()].filter(T=>m(T.id)===P),y=Math.min(...h.map(T=>T.y)),$=g+n-y;for(let T of h)T.y+=$}}}function Jt(e,t,r,n,o){let a=!1,l=new Map(e.groups.map(h=>[h.id,h])),s=new Map(e.services.map(h=>[h.id,h])),d=new Map(e.junctions.map(h=>[h.id,h])),c=new Map(t.map(h=>[h.id,h])),v=new Map(r.map(h=>[h.id,h])),m=(h,y)=>`${h}:${y}`,A=h=>{let y=h.indexOf(":");return{kind:h.slice(0,y),id:h.slice(y+1)}},p=h=>{let y=[],$=h;for(;$;)y.push(m("group",$)),$=l.get($)?.parentId;return y.reverse()},f=(h,y="item")=>{let $=s.get(h);if($){let O=p($.parentId);return y==="group"?O:[...O,m("service",h)]}let T=d.get(h);return T?[...p(T.parentId),m("junction",h)]:null},u=[];for(let h of e.edges){let y=f(h.source.id,h.source.boundary),$=f(h.target.id,h.target.boundary);if(!y||!$)continue;let T=0;for(;T<y.length&&T<$.length&&y[T]===$[T];)T++;if(T>=y.length||T>=$.length)continue;let O=T===0?void 0:A(y[T-1]).id,D=y[T],j=$[T],V=(G,R,C)=>{let _=C==="L"||C==="R"?"x":"y",F=C==="R"||C==="B";u.push({axis:_,parentId:O,before:F?G:R,after:F?R:G,depth:T})};V(D,j,h.source.side),V(j,D,h.target.side)}let w=h=>h?l.get(h)?.children??[]:e.rootChildren,b=h=>{let{kind:y,id:$}=A(h);return y==="group"?n.get($):y==="service"?c.get($):v.get($)},S=(h,y,$)=>{if(Math.abs($)<=I)return;let{kind:T,id:O}=A(h);if(T==="service"){let j=c.get(O);j&&(j[y]+=$);return}if(T==="junction"){let j=v.get(O);j&&(j[y]+=$);return}let D=j=>{let V=n.get(j);V&&(V[y]+=$);for(let G of l.get(j)?.children??[])G.kind==="group"?D(G.id):S(m(G.kind,G.id),y,$)};D(O)},L=[...n.values()].filter(h=>!h.parentId),g=new Map;for(let h of u){let y=`${h.depth}:${h.parentId??""}:${h.axis}`,$=g.get(y)??[];$.push(h),g.set(y,$)}let i=[...g.values()].sort((h,y)=>y[0].depth-h[0].depth||ne(h[0].parentId??"",y[0].parentId??"")||ne(h[0].axis,y[0].axis));for(let h of i){let{axis:y,parentId:$}=h[0],T=w($).map(M=>m(M.kind,M.id)).filter(M=>b(M)!==void 0);if(T.length<2)continue;let O=new Map(T.map(M=>[M,M])),D=M=>{let E=O.get(M)??M;if(E===M)return E;let k=D(E);return O.set(M,k),k},j=(M,E)=>{let k=D(M),B=D(E);k!==B&&O.set(B,k<B?k:B)},V=y==="x"?"column":"row";for(let M of e.alignments){if(M.axis!==V)continue;let E=M.members.map(k=>{let B=f(k);if(!B)return;if(!$)return B[0];let J=m("group",$),ee=B.indexOf(J);return ee>=0?B[ee+1]:void 0}).filter(k=>k!==void 0&&O.has(k));for(let k=1;k<E.length;k++)j(E[0],E[k])}let G=new Map;for(let M of T){let E=D(M),k=G.get(E)??[];k.push(M),G.set(E,k)}let R=M=>{let E=G.get(M).map(X=>b(X)),k=Math.min(...E.map(X=>X.x)),B=Math.min(...E.map(X=>X.y)),J=Math.max(...E.map(X=>X.x+X.width)),ee=Math.max(...E.map(X=>X.y+X.height));return{x:k,y:B,width:J-k,height:ee-B}},C=new Map,_=!1;for(let M of h){let E=D(M.before),k=D(M.after);if(E===k){_=!0;break}let B=C.get(E)??new Set;B.add(k),C.set(E,B)}if(_)continue;let F=[...G.keys()],Z=(M,E)=>{let k=R(M),B=R(E);return y==="x"?k.x+k.width+o<=B.x+I:k.y+k.height+o<=B.y+I};if([...C].every(([M,E])=>[...E].every(k=>Z(M,k))))continue;let Y=new Map(F.map(M=>[M,0]));for(let M of C.values())for(let E of M)Y.set(E,(Y.get(E)??0)+1);let z=[];for(;z.length<F.length;){let M=F.filter(k=>!z.includes(k)&&Y.get(k)===0).sort((k,B)=>{let J=R(k),ee=R(B);return(y==="x"?J.x-ee.x:J.y-ee.y)||ne(k,B)});if(M.length===0)break;let E=M[0];z.push(E);for(let k of C.get(E)??[])Y.set(k,Y.get(k)-1)}if(z.length!==F.length)continue;let wt=F.map(R),Pe=Math.min(...wt.map(M=>y==="x"?M.x:M.y));for(let M of z){let E=R(M),k=y==="x"?E.x:E.y,B=Pe-k;Math.abs(B)>I&&(a=!0);for(let J of G.get(M))S(J,y,B);Pe+=(y==="x"?E.width:E.height)+o}ge(L,t,r,!0)}let x=[...e.groups.map(h=>({parentId:h.id,depth:p(h.id).length})),{parentId:void 0,depth:0}].sort((h,y)=>y.depth-h.depth||ne(h.parentId??"",y.parentId??"")),P=(h,y)=>h.x<y.x+y.width-I&&y.x<h.x+h.width-I&&h.y<y.y+y.height-I&&y.y<h.y+h.height-I;for(let h of x){let y=w(h.parentId).map(R=>m(R.kind,R.id)).filter(R=>b(R)!==void 0);if(y.length<2)continue;let $=new Map(y.map(R=>[R,R])),T=R=>{let C=$.get(R)??R;if(C===R)return C;let _=T(C);return $.set(R,_),_},O=(R,C)=>{let _=T(R),F=T(C);_!==F&&$.set(F,_<F?_:F)};for(let R of e.alignments){if(R.axis!=="row")continue;let C=R.members.map(_=>{let F=f(_);if(!F)return;if(!h.parentId)return F[0];let Z=F.indexOf(m("group",h.parentId));return Z>=0?F[Z+1]:void 0}).filter(_=>_!==void 0&&$.has(_));for(let _=1;_<C.length;_++)O(C[0],C[_])}let D=new Map;for(let R of y){let C=T(R),_=D.get(C)??[];_.push(R),D.set(C,_)}let j=R=>{let C=D.get(R).map(z=>b(z)),_=Math.min(...C.map(z=>z.x)),F=Math.min(...C.map(z=>z.y)),Z=Math.max(...C.map(z=>z.x+z.width)),Y=Math.max(...C.map(z=>z.y+z.height));return{x:_,y:F,width:Z-_,height:Y-F}},V=[...D.keys()].sort((R,C)=>{let _=j(R),F=j(C);return _.y-F.y||_.x-F.x||ne(R,C)}),G=[];for(let R of V){for(let C=0;C<=G.length;C++){let _=j(R),F=G.map(j).filter(z=>P(_,z));if(F.length===0)break;let Y=Math.max(...F.map(z=>z.y+z.height+o))-_.y;for(let z of D.get(R))S(z,"y",Y);a=!0}G.push(R)}ge(L,t,r,!0)}return a}function gt(e,t,r){let n=t.get(e.id),o={id:e.id,label:n?.label??e.id,icon:n?.icon,parentId:n?.parentId,x:e.x,y:e.y,width:e.width,height:e.height,children:e.children.map(a=>gt(a,t,r))};return r.set(o.id,o),o}function ge(e,t,r,n){for(let o of e)pt(o,t,r,n)}function pt(e,t,r,n){let o=[];for(let c of e.children)o.push(pt(c,t,r,n));for(let c of t)c.parentId===e.id&&o.push(c);for(let c of r)c.parentId===e.id&&o.push(c);if(o.length===0)return e;let a=Math.min(e.x,...o.map(c=>c.x-N)),l=Math.min(e.y,...o.map(c=>c.y-N)),s=Math.max(e.x+e.width,...o.map(c=>c.x+c.width+N)),d=n?Math.max(e.y+48,...o.map(c=>c.y+c.height+N)):Math.max(e.y+e.height,...o.map(c=>c.y+c.height+N));return e.x=a,e.y=l,e.width=s-a,e.height=d-l,e}function Kt(e,t,r,n,o,a,l){let s=dt(e.source,t,r,n,o),d=dt(e.target,t,r,n,o),c=Qt(e,t,o,a,l),v=ke([s.exit,...nr(s.exit,d.exit,e.source.side,e.target.side),d.exit]),m=at(v,c)?v:qt(s.exit,d.exit,c)??v,A=ke([s.anchor,...m,d.anchor]),p=st(s.anchor,e.source.side,d.anchor),f=st(d.anchor,e.target.side,s.anchor);return{source:e.source,target:e.target,label:e.label,hasArrowStart:e.hasArrowStart,hasArrowEnd:e.hasArrowEnd,points:A,labelPosition:e.label?ir(A):void 0,placement:p&&f?"satisfied":"conflicted",sourceFacesTarget:p,targetFacesSource:f,obstacleFree:at(A,c)}}var he=6,I=.001;function Qt(e,t,r,n,o){let a=new Set,l=c=>{let v=c;for(;v&&!a.has(v);)a.add(v),v=r.get(v)?.parentId};l(t.get(e.source.id)?.parentId??o.get(e.source.id)?.parentId),l(t.get(e.target.id)?.parentId??o.get(e.target.id)?.parentId);let s=(c,v,m)=>({id:c,kind:v,x:m.x-he,y:m.y-he,width:m.width+he*2,height:m.height+he*2}),d=[];for(let c of n)c.id===e.source.id||c.id===e.target.id||d.push(s(c.id,"service",c));for(let c of o.values())c.id===e.source.id||c.id===e.target.id||d.push(s(c.id,"junction",c));for(let c of r.values())a.has(c.id)||d.push(s(c.id,"group",c));return d}function st(e,t,r){switch(t){case"L":return r.x<e.x-I;case"R":return r.x>e.x+I;case"T":return r.y<e.y-I;case"B":return r.y>e.y+I}}function at(e,t){for(let r=1;r<e.length;r++)if(t.some(n=>ft(e[r-1],e[r],n)))return!1;return!0}function ft(e,t,r){return Math.abs(e.y-t.y)<=I?e.y>r.y+I&&e.y<r.y+r.height-I&&Math.min(e.x,t.x)<r.x+r.width-I&&Math.max(e.x,t.x)>r.x+I:Math.abs(e.x-t.x)<=I?e.x>r.x+I&&e.x<r.x+r.width-I&&Math.min(e.y,t.y)<r.y+r.height-I&&Math.max(e.y,t.y)>r.y+I:!0}var Me=class{entries=[];push(t){this.entries.push(t);let r=this.entries.length-1;for(;r>0;){let n=Math.floor((r-1)/2);if(!this.before(t,this.entries[n]))break;this.entries[r]=this.entries[n],r=n}this.entries[r]=t}pop(){let t=this.entries[0],r=this.entries.pop();if(!t||!r||this.entries.length===0)return t;let n=0;for(this.entries[0]=r;;){let o=n*2+1,a=o+1;if(o>=this.entries.length)break;let l=o;if(a<this.entries.length&&this.before(this.entries[a],this.entries[o])&&(l=a),!this.before(this.entries[l],this.entries[n]))break;let s=this.entries[n];this.entries[n]=this.entries[l],this.entries[l]=s,n=l}return t}before(t,r){return t.cost<r.cost||t.cost===r.cost&&t.state<r.state}};function qt(e,t,r){let n=[...new Set([e.x,t.x,...r.flatMap(g=>[g.x,g.x+g.width])])].sort((g,i)=>g-i),o=[...new Set([e.y,t.y,...r.flatMap(g=>[g.y,g.y+g.height])])].sort((g,i)=>g-i),a=[],l=new Map,s=(g,i)=>`${g}\0${i}`,d=(g,i)=>r.some(x=>g>x.x+I&&g<x.x+x.width-I&&i>x.y+I&&i<x.y+x.height-I);for(let g of o)for(let i of n)d(i,g)&&!(i===e.x&&g===e.y)&&!(i===t.x&&g===t.y)||(l.set(s(i,g),a.length),a.push({x:i,y:g}));let c=l.get(s(e.x,e.y)),v=l.get(s(t.x,t.y));if(c===void 0||v===void 0)return null;let m=a.map(()=>[]),A=(g,i)=>{for(let x=1;x<g.length;x++){let P=g[x-1],h=g[x],y=a[P],$=a[h];if(r.some(O=>ft(y,$,O)))continue;let T=Math.abs(y.x-$.x)+Math.abs(y.y-$.y);m[P].push({point:h,direction:i,length:T}),m[h].push({point:P,direction:i,length:T})}};for(let g of o){let i=a.map((x,P)=>({point:x,index:P})).filter(x=>x.point.y===g).sort((x,P)=>x.point.x-P.point.x).map(x=>x.index);A(i,1)}for(let g of n){let i=a.map((x,P)=>({point:x,index:P})).filter(x=>x.point.x===g).sort((x,P)=>x.point.y-P.point.y).map(x=>x.index);A(i,2)}let p=a.length*3,f=new Array(p).fill(1/0),u=new Array(p).fill(-1),w=c*3;f[w]=0;let b=new Me;b.push({state:w,cost:0});let S=-1;for(;;){let g=b.pop();if(!g)break;if(g.cost!==f[g.state])continue;let i=Math.floor(g.state/3),x=g.state%3;if(i===v){S=g.state;break}for(let P of m[i]){let h=P.point*3+P.direction,y=x!==0&&x!==P.direction?8:0,$=g.cost+P.length+y;$>=f[h]||(f[h]=$,u[h]=g.state,b.push({state:h,cost:$}))}}if(S<0)return null;let L=[];for(let g=S;g>=0&&(L.push(a[Math.floor(g/3)]),g!==w);g=u[g]);return ke(L.reverse())}function Zt(e,t,r){let n=r?.edgeFontSize??11,o=r?.edgeFontWeight??400,a=6,l=(m,A,p)=>{let f=te(m,r?.edgeTextTransform),u=fe(f,n,o)+a*2,w=n+a*2;return{x0:A-u/2,y0:p-w/2,x1:A+u/2,y1:p+w/2}},s=(m,A)=>Math.min(m.x1,A.x1)-Math.max(m.x0,A.x0)>.5&&Math.min(m.y1,A.y1)-Math.max(m.y0,A.y0)>.5,d=t.map(m=>({x0:m.x,y0:m.y,x1:m.x+m.width,y1:m.y+m.height})),c=e.filter(m=>m.label&&m.labelPosition&&m.points.length>=2),v=[];for(let m of c){let A=l(m.label,m.labelPosition.x,m.labelPosition.y),p=g=>v.some(i=>s(g,i))||d.some(i=>s(g,i));if(!p(A)){v.push(A);continue}let f=m.points,u=[],w=0;for(let g=1;g<f.length;g++){let i=Math.hypot(f[g].x-f[g-1].x,f[g].y-f[g-1].y);u.push(i),w+=i}let b=g=>{let i=g;for(let x=0;x<u.length;x++){if(i<=u[x]||x===u.length-1){let P=u[x]===0?0:Math.max(0,Math.min(1,i/u[x]));return{x:f[x].x+(f[x+1].x-f[x].x)*P,y:f[x].y+(f[x+1].y-f[x].y)*P}}i-=u[x]}return f[f.length-1]},S=[.5,.4,.6,.3,.7,.25,.75,.2,.8,.15,.85],L=A;for(let g of S){let i=b(w*g),x=l(m.label,i.x,i.y);if(!p(x)){m.labelPosition={x:i.x,y:i.y},L=x;break}}v.push(L)}}function dt(e,t,r,n,o){if(e.boundary==="group"){let d=t.get(e.id),c=r.get(e.id),v=o.get(d.parentId),m=rr(v,c,e.side);return{anchor:m,exit:$e(m,e.side,Se)}}let a=r.get(e.id);if(a){let d=er(a,e.side);return{anchor:d,exit:$e(d,e.side,Se)}}let l=n.get(e.id);if(!l)throw new Error(`Unknown architecture endpoint "${e.id}"`);let s=tr(l,e.side);return{anchor:s,exit:$e(s,e.side,Se*.75)}}function er(e,t){switch(t){case"L":return{x:e.x,y:e.y+e.height/2};case"R":return{x:e.x+e.width,y:e.y+e.height/2};case"T":return{x:e.x+e.width/2,y:e.y};case"B":return{x:e.x+e.width/2,y:e.y+e.height}}}function tr(e,t){let r=e.x+e.width/2,n=e.y+e.height/2,o=Math.min(e.width,e.height)/2;switch(t){case"L":return{x:r-o,y:n};case"R":return{x:r+o,y:n};case"T":return{x:r,y:n-o};case"B":return{x:r,y:n+o}}}function rr(e,t,r){let n=t.x+t.width/2,o=t.y+t.height/2;switch(r){case"L":return{x:e.x,y:le(o,e.y+N,e.y+e.height-N)};case"R":return{x:e.x+e.width,y:le(o,e.y+N,e.y+e.height-N)};case"T":return{x:le(n,e.x+N,e.x+e.width-N),y:e.y};case"B":return{x:le(n,e.x+N,e.x+e.width-N),y:e.y+e.height}}}function nr(e,t,r,n){if(e.x===t.x||e.y===t.y)return[];let o=ut(r),a=ut(n);if(o!==a)return o==="horizontal"?[{x:t.x,y:e.y}]:[{x:e.x,y:t.y}];if(o==="horizontal"){let s=(e.x+t.x)/2;return[{x:s,y:e.y},{x:s,y:t.y}]}let l=(e.y+t.y)/2;return[{x:e.x,y:l},{x:t.x,y:l}]}function ut(e){return e==="L"||e==="R"?"horizontal":"vertical"}function $e(e,t,r){switch(t){case"L":return{x:e.x-r,y:e.y};case"R":return{x:e.x+r,y:e.y};case"T":return{x:e.x,y:e.y-r};case"B":return{x:e.x,y:e.y+r}}}function ke(e){let t=[];for(let n of e){let o=t[t.length-1];o&&o.x===n.x&&o.y===n.y||t.push(n)}let r=!0;for(;r;){r=!1;for(let n=1;n<t.length-1;n++){let o=t[n-1],a=t[n],l=t[n+1],s=o.x===a.x&&a.x===l.x,d=o.y===a.y&&a.y===l.y;if(s||d){t.splice(n,1),r=!0;break}}}return t}function ir(e){if(e.length===0)return{x:0,y:0};if(e.length===1)return e[0];let t=0;for(let n=1;n<e.length;n++)t+=ht(e[n-1],e[n]);let r=t/2;for(let n=1;n<e.length;n++){let o=e[n-1],a=e[n],l=ht(o,a);if(r<=l){let s=l===0?0:r/l;return{x:o.x+(a.x-o.x)*s,y:o.y+(a.y-o.y)*s}}r-=l}return e[e.length-1]}function ht(e,t){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)}function le(e,t,r){return Math.max(t,Math.min(r,e))}function yt(e){let{positioned:t,colors:r,resolved:n}=e,o=n.renderOptions,a=r.font??"Inter",l=o.transparent??!1,s={...W,...n.familyAppearance?.visual??o.architecture?.visual},d=[],c=[s.groupSurface?`--arch-group-fill:${s.groupSurface}`:"",s.groupHeaderSurface?`--arch-group-band:${s.groupHeaderSurface}`:"",s.groupBorder?`--arch-group-stroke:${s.groupBorder}`:"",s.groupText?`--arch-group-label:${s.groupText}`:"",s.serviceSurface?`--arch-service-fill:${s.serviceSurface}`:"",s.serviceBorder?`--arch-service-stroke:${s.serviceBorder}`:"",s.serviceText?`--arch-service-label:${s.serviceText}`:"",s.edgeStroke?`--arch-edge-stroke:${s.edgeStroke}`:"",s.edgeText?`--arch-edge-label:${s.edgeText}`:""].filter(Boolean).join(";"),v=t.accessibilityTitle??t.title?.text,m=!!v,A=!!t.accessibilityDescription,p=`arch-${Ue(t.width,t.height,t.title?.text??"",t.services.map(i=>i.id).join(","),t.groups.map(i=>i.id).join(","))}`,f=`${p}-title`,u=`${p}-desc`,w={};(m||A)&&(w.role="img",w["aria-roledescription"]="architecture"),m&&(w["aria-labelledby"]=f),A&&(w["aria-describedby"]=u);let b=or(s),S=[];S.push(We(t.width,t.height,r,l,{style:c,attrs:w})),m&&S.push(`<title id="${f}">${me(v)}</title>`),A&&S.push(`<desc id="${u}">${me(t.accessibilityDescription)}</desc>`),S.push(Be(a,!1,void 0,r.embedFontImport)),S.push(b),d.push(He({id:"prelude",width:t.width,height:t.height,colors:r,transparent:l,font:a,hasMonoFont:!1,extraCss:b},S.join(`
8
+ `))),d.push(Ne({id:"defs",markerResources:pe},["<defs>",Ve(pe),"</defs>"].join(`
9
+ `))),t.title&&d.push(oe({id:"title",role:"title",text:t.title.text,x:t.title.x,y:t.title.y,fontSize:18,anchor:"middle",paint:{fill:"var(--arch-service-label, var(--_text))"}},ie(t.title.text,t.title.x,t.title.y,18,'class="architecture-title" text-anchor="middle" font-size="18" font-weight="600" fill="var(--arch-service-label, var(--_text))"')));for(let i of t.groups)d.push(bt(i,s));let L=new Map;for(let i of t.edges){let x=`${i.source.id}->${i.target.id}`,P=L.get(x)??0;L.set(x,P+1),d.push(ar(i,s,`edge:${x}#${P}`))}let g=new Map;for(let i of t.edges){if(!i.label)continue;let x=`${i.source.id}->${i.target.id}`,P=g.get(x)??0;g.set(x,P+1);for(let h of dr(i,s,`edge-label:${x}#${P}`))d.push(h)}for(let i of t.junctions)d.push(sr(i,s));for(let i of t.services)d.push(cr(i,s));return d.push(Xe()),{family:"architecture",width:t.width,height:t.height,colors:r,transparent:l,parts:d}}function or(e){return`<style>
10
+ .architecture-group-frame { fill: var(--arch-group-fill, color-mix(in srgb, var(--_node-fill) 82%, var(--bg))); stroke: none; }
11
+ .architecture-group-band { fill: var(--arch-group-band, color-mix(in srgb, var(--arch-edge-stroke, var(--_arrow)) 5%, var(--arch-group-fill, var(--bg)))); stroke: none; }
12
+ .architecture-group-outline { fill: none; stroke: var(--arch-group-stroke, var(--_node-stroke)); stroke-width: ${e.groupLineWidth}; }
13
+ .architecture-group-label { fill: var(--arch-group-label, var(--_text-sec)); }
14
+ .architecture-service-card { fill: var(--arch-service-fill, color-mix(in srgb, var(--_node-fill) 92%, var(--bg))); stroke: none; }
15
+ .architecture-service-outline { fill: none; stroke: var(--arch-service-stroke, var(--_node-stroke)); stroke-width: ${e.serviceLineWidth}; }
16
+ .architecture-service-label { fill: var(--arch-service-label, var(--_text)); }
17
+ .architecture-edge { fill: none; stroke: var(--arch-edge-stroke, var(--_line)); stroke-width: ${e.edgeLineWidth}; stroke-linejoin: round; }
18
+ .architecture-edge-label-bg { fill: color-mix(in srgb, var(--bg) 90%, var(--_group-hdr)); stroke: color-mix(in srgb, var(--arch-edge-stroke, var(--_line)) 18%, var(--bg)); stroke-width: 0.75; }
19
+ .architecture-edge-label-text { fill: var(--arch-edge-label, var(--_text-muted)); }
20
+ .architecture-junction-ring { fill: var(--bg); stroke: var(--arch-edge-stroke, var(--_arrow)); stroke-width: 1.25; }
21
+ .architecture-junction-core { fill: color-mix(in srgb, var(--arch-edge-stroke, var(--_arrow)) 24%, var(--bg)); stroke: var(--arch-edge-stroke, var(--_arrow)); stroke-width: 0.75; }
22
+ .architecture-icon-mark { fill: none; stroke: var(--arch-edge-stroke, var(--_arrow)); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
23
+ .architecture-icon-glyph { fill: var(--arch-edge-stroke, var(--_arrow)); }
24
+ </style>`}function bt(e,t){let r=[],n=`<g class="architecture-group" data-id="${H(e.id)}" data-label="${H(e.label)}">`;r.push({indent:2,node:U({id:`group-frame:${e.id}`,role:"group",geometry:{kind:"rect",x:e.x,y:e.y,width:e.width,height:e.height,rx:t.groupCornerRadius,ry:t.groupCornerRadius},paint:{fill:"var(--arch-group-fill, color-mix(in srgb, var(--_node-fill) 82%, var(--bg)))",stroke:"none"}},`<rect class="architecture-group-frame" x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" rx="${t.groupCornerRadius}" ry="${t.groupCornerRadius}" />`)});let o=Oe(e.x,e.y,e.width,t.groupHeaderHeight,t.groupCornerRadius);r.push({indent:2,node:U({id:`group-band:${e.id}`,role:"group-header",geometry:{kind:"path",d:o},paint:{fill:"var(--arch-group-band, color-mix(in srgb, var(--arch-edge-stroke, var(--_arrow)) 5%, var(--arch-group-fill, var(--bg))))",stroke:"none"}},`<path class="architecture-group-band" d="${o}" />`)}),r.push({indent:2,node:U({id:`group-outline:${e.id}`,role:"group",geometry:{kind:"rect",x:e.x,y:e.y,width:e.width,height:e.height,rx:t.groupCornerRadius,ry:t.groupCornerRadius},paint:{fill:"none",stroke:"var(--arch-group-stroke, var(--_node-stroke))",strokeWidth:String(t.groupLineWidth)}},`<rect class="architecture-group-outline" x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" rx="${t.groupCornerRadius}" ry="${t.groupCornerRadius}" />`)}),e.icon&&r.push({indent:0,node:ye({id:`icon:${e.id}`,role:"icon"},` ${vt(e.x+10,e.y+6,t.iconSize,e.icon,!0)}`)});let a=te(e.label,t.groupTextTransform),l=e.x+(e.icon?36:t.groupLabelPaddingX),s=e.y+t.groupHeaderHeight/2;r.push({indent:2,node:oe({id:`group-label:${e.id}`,role:"label",text:a,x:l,y:s,fontSize:t.groupFontSize,anchor:"start",paint:{fill:"var(--arch-group-label, var(--_text-sec))"}},ie(a,l,s,t.groupFontSize,`class="architecture-group-label" text-anchor="start" font-size="${t.groupFontSize}" font-weight="${t.groupFontWeight}"${t.groupFont?` font-family="${H(t.groupFont)}"`:""}${Re(t.groupLetterSpacing)}`))});for(let d of e.children)r.push({indent:0,node:bt(d,t)});return ce({id:`group:${e.id}`,role:"group",open:n,close:"</g>",children:r})}function cr(e,t){let r=[],n=!!e.icon,o=e.x+t.servicePaddingX,a=e.y+e.height/2-t.serviceIconSize/2,l=n?o+t.serviceIconSize+Math.max(10,t.servicePaddingX*.7):e.x+t.servicePaddingX,s=`<g class="architecture-service" data-id="${H(e.id)}" data-label="${H(e.label)}">`;r.push({indent:2,node:U({id:`service-card:${e.id}`,role:"service",geometry:{kind:"rect",x:e.x,y:e.y,width:e.width,height:e.height,rx:t.serviceCornerRadius,ry:t.serviceCornerRadius},paint:{fill:"var(--arch-service-fill, color-mix(in srgb, var(--_node-fill) 92%, var(--bg)))",stroke:"none"}},`<rect class="architecture-service-card" x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" rx="${t.serviceCornerRadius}" ry="${t.serviceCornerRadius}" />`)}),r.push({indent:2,node:U({id:`service-outline:${e.id}`,role:"service",geometry:{kind:"rect",x:e.x,y:e.y,width:e.width,height:e.height,rx:t.serviceCornerRadius,ry:t.serviceCornerRadius},paint:{fill:"none",stroke:"var(--arch-service-stroke, var(--_node-stroke))",strokeWidth:String(t.serviceLineWidth)}},`<rect class="architecture-service-outline" x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" rx="${t.serviceCornerRadius}" ry="${t.serviceCornerRadius}" />`)}),e.icon&&r.push({indent:0,node:ye({id:`icon:${e.id}`,role:"icon"},` ${vt(o,a,t.serviceIconSize,e.icon,!1)}`)});let d=e.y+e.height/2,c=te(e.label,t.serviceTextTransform);return r.push({indent:2,node:oe({id:`service-label:${e.id}`,role:"label",text:c,x:l,y:d,fontSize:t.serviceFontSize,anchor:"start",paint:{fill:"var(--arch-service-label, var(--_text))"}},ie(c,l,d,t.serviceFontSize,`class="architecture-service-label" text-anchor="start" font-size="${t.serviceFontSize}" font-weight="${t.serviceFontWeight}"${Re(t.serviceLetterSpacing)}`))}),ce({id:`service:${e.id}`,role:"service",open:s,close:"</g>",children:r})}function sr(e,t){let r=e.x+e.width/2,n=e.y+e.height/2,o=U({id:`junction-ring:${e.id}`,role:"junction",geometry:{kind:"circle",cx:r,cy:n,r:t.junctionOuterRadius},paint:{fill:"var(--bg)",stroke:"var(--arch-edge-stroke, var(--_arrow))",strokeWidth:"1.25"}},`<circle class="architecture-junction-ring" cx="${r}" cy="${n}" r="${t.junctionOuterRadius}" />`),a=U({id:`junction-core:${e.id}`,role:"junction",geometry:{kind:"circle",cx:r,cy:n,r:t.junctionInnerRadius},paint:{fill:"color-mix(in srgb, var(--arch-edge-stroke, var(--_arrow)) 24%, var(--bg))",stroke:"var(--arch-edge-stroke, var(--_arrow))",strokeWidth:"0.75"}},`<circle class="architecture-junction-core" cx="${r}" cy="${n}" r="${t.junctionInnerRadius}" />`);return ce({id:`junction:${e.id}`,role:"junction",open:`<g class="architecture-junction" data-id="${H(e.id)}">`,close:"</g>",children:[{indent:2,node:o},{indent:2,node:a}]})}function ar(e,t,r){let n=e.points.map(v=>`${v.x},${v.y}`).join(" "),o="",a,l;e.hasArrowStart&&(a=pe[1],o+=' marker-start="url(#architecture-arrow-start)"'),e.hasArrowEnd&&(l=pe[0],o+=' marker-end="url(#architecture-arrow-end)"');let s=['class="architecture-edge"',`data-from="${H(e.source.id)}"`,`data-to="${H(e.target.id)}"`,`data-from-side="${e.source.side}"`,`data-to-side="${e.target.side}"`,`data-from-boundary="${e.source.boundary}"`,`data-to-boundary="${e.target.boundary}"`];e.label&&s.push(`data-label="${H(e.label)}"`);let d={stroke:"var(--arch-edge-stroke, var(--_line))",strokeWidth:String(t.edgeLineWidth)},c={endpoints:{from:e.source.id,to:e.target.id},relationship:{kind:"architecture-edge"},route:{ownership:"layout",bendRadius:t.edgeBendRadius,labelAnchors:e.labelPosition?[e.labelPosition]:[]},labels:e.label?[{text:e.label,...e.labelPosition?{anchor:e.labelPosition}:{}}]:[]};if(t.edgeBendRadius>0&&e.points.length>2){let v=Ge(e.points,t.edgeBendRadius,{metric:"manhattan",precision:3});return xe({id:r,role:"edge",geometry:v.geometry,lineStyle:"solid",paint:d,markers:{...a?{start:a}:{},mid:[],...l?{end:l}:{}},...c,route:{...c.route,contours:v.contours}},`<path ${s.join(" ")} d="${v.geometry.d}"${o} />`)}return xe({id:r,role:"edge",geometry:{kind:"polyline",points:e.points},lineStyle:"solid",paint:d,markers:{...a?{start:a}:{},mid:[],...l?{end:l}:{}},...c},`<polyline ${s.join(" ")} points="${n}"${o} />`)}function dr(e,t,r){let n=te(e.label,t.edgeTextTransform),o=e.labelPosition??lr(e.points),a=Ie(n,t.edgeFontSize,t.edgeFontWeight),l=7,s=je(n,o.x,o.y,a.width,a.height,t.edgeFontSize,l,`class="architecture-edge-label-text" text-anchor="middle" font-size="${t.edgeFontSize}" font-weight="${t.edgeFontWeight}"${Re(t.edgeLetterSpacing)}`,'class="architecture-edge-label-bg" rx="0" ry="0"'),d=s.indexOf(`
25
+ `),c=s.slice(0,d),v=s.slice(d+1),m=a.width+l*2,A=a.height+l*2;return[U({id:`${r}:bg`,role:"chrome",geometry:{kind:"rect",x:o.x-m/2,y:o.y-A/2,width:m,height:A,rx:0,ry:0},paint:{fill:"color-mix(in srgb, var(--bg) 90%, var(--_group-hdr))",stroke:"color-mix(in srgb, var(--arch-edge-stroke, var(--_line)) 18%, var(--bg))",strokeWidth:"0.75"}},c),oe({id:r,role:"label",text:n,x:o.x,y:o.y,fontSize:t.edgeFontSize,anchor:"middle",paint:{fill:"var(--arch-edge-label, var(--_text-muted))"}},v)]}function vt(e,t,r,n,o){let a=[],l=n.trim().toLowerCase(),d=!l.includes(":")&&!l.includes("/")&&["cloud","database","disk","internet","server"].includes(l)?null:Ye(n),c=d?` data-icon-source="${d.source}" data-icon-license="${d.license}"`:"";return a.push(`<g class="architecture-icon" data-icon="${H(n)}"${c}>`),a.push(` ${ur(e,t,r,n,o,d)}`),a.push("</g>"),a.join(`
26
+ `)}function ur(e,t,r,n,o,a){let l=At(n),s=e+r/2,d=t+r/2,c=o?r*.92:r;if(a){let v=(r-c)/2,m=c/24;return`<path class="architecture-icon-glyph" d="${a.path}" transform="translate(${e+v} ${t+v}) scale(${m})" />`}switch(l){case"cloud":return[`<circle class="architecture-icon-mark" cx="${s-c*.18}" cy="${d+c*.02}" r="${c*.16}" />`,`<circle class="architecture-icon-mark" cx="${s+c*.02}" cy="${d-c*.08}" r="${c*.2}" />`,`<circle class="architecture-icon-mark" cx="${s+c*.2}" cy="${d+c*.02}" r="${c*.15}" />`,`<path class="architecture-icon-mark" d="M ${s-c*.34} ${d+c*.16} H ${s+c*.33}" />`].join(`
27
+ `);case"database":return[`<ellipse class="architecture-icon-mark" cx="${s}" cy="${d-c*.16}" rx="${c*.24}" ry="${c*.1}" />`,`<path class="architecture-icon-mark" d="M ${s-c*.24} ${d-c*.16} V ${d+c*.2}" />`,`<path class="architecture-icon-mark" d="M ${s+c*.24} ${d-c*.16} V ${d+c*.2}" />`,`<ellipse class="architecture-icon-mark" cx="${s}" cy="${d+c*.02}" rx="${c*.24}" ry="${c*.1}" />`,`<ellipse class="architecture-icon-mark" cx="${s}" cy="${d+c*.2}" rx="${c*.24}" ry="${c*.1}" />`].join(`
28
+ `);case"disk":return[`<circle class="architecture-icon-mark" cx="${s}" cy="${d}" r="${c*.26}" />`,`<circle class="architecture-icon-mark" cx="${s}" cy="${d}" r="${c*.09}" />`].join(`
29
+ `);case"internet":return[`<circle class="architecture-icon-mark" cx="${s}" cy="${d}" r="${c*.26}" />`,`<path class="architecture-icon-mark" d="M ${s-c*.26} ${d} H ${s+c*.26}" />`,`<path class="architecture-icon-mark" d="M ${s} ${d-c*.26} V ${d+c*.26}" />`,`<path class="architecture-icon-mark" d="M ${s-c*.14} ${d-c*.22} Q ${s} ${d} ${s-c*.14} ${d+c*.22}" />`,`<path class="architecture-icon-mark" d="M ${s+c*.14} ${d-c*.22} Q ${s} ${d} ${s+c*.14} ${d+c*.22}" />`].join(`
30
+ `);case"server":return[`<rect class="architecture-icon-mark" x="${s-c*.22}" y="${d-c*.24}" width="${c*.44}" height="${c*.48}" rx="0" ry="0" />`,`<path class="architecture-icon-mark" d="M ${s-c*.16} ${d-c*.08} H ${s+c*.16}" />`,`<path class="architecture-icon-mark" d="M ${s-c*.16} ${d+c*.06} H ${s+c*.16}" />`].join(`
31
+ `);default:{let v=hr(n);return ie(v,s,d,Math.max(10,r*.56),`class="architecture-icon-glyph architecture-icon-fallback" data-fallback="true" text-anchor="middle" font-size="${Math.max(10,r*.56)}" font-weight="700"`)}}}function At(e){return e.trim().toLowerCase().split(/[:/]/).pop()??e.trim().toLowerCase()}function hr(e){return(At(e).replace(/[^a-z0-9]/g,"")[0]??"?").toUpperCase()}var mt={fill:"var(--arch-edge-stroke, var(--_arrow))",stroke:"var(--arch-edge-stroke, var(--_arrow))",strokeWidth:"0.75",strokeLinejoin:"round"},pe=[{id:"architecture-arrow-end",shape:"arrow",size:{width:8,height:5},ref:{x:7,y:2.5},orient:"auto",geometry:{kind:"polygon",points:[{x:0,y:0},{x:8,y:2.5},{x:0,y:5}]},paint:mt},{id:"architecture-arrow-start",shape:"arrow",size:{width:8,height:5},ref:{x:1,y:2.5},orient:"auto-start-reverse",geometry:{kind:"polygon",points:[{x:8,y:0},{x:0,y:2.5},{x:8,y:5}]},paint:mt}];function lr(e){if(e.length===0)return{x:0,y:0};if(e.length===1)return e[0];let t=0;for(let n=1;n<e.length;n++)t+=xt(e[n-1],e[n]);let r=t/2;for(let n=1;n<e.length;n++){let o=e[n-1],a=e[n],l=xt(o,a);if(r<=l){let s=l===0?0:r/l;return{x:o.x+(a.x-o.x)*s,y:o.y+(a.y-o.y)*s}}r-=l}return e[e.length-1]}function xt(e,t){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)}function Re(e){return e!==0?` letter-spacing="${e}"`:""}var Qr=Fe(Je,{normalizeRequest:e=>{let t=Qe(e.source.frontmatter,e.colors,e.renderOptions,e.styleFace);return{renderOptions:{...e.renderOptions,padding:e.renderOptions.padding??t.padding,nodeSpacing:e.renderOptions.nodeSpacing??t.nodeSpacing,layerSpacing:e.renderOptions.layerSpacing??t.layerSpacing},familyConfig:{layout:t.layout},appearance:{family:{visual:t.visual}}}},layout:e=>{let t=e.familyConfig,r=Ce(nt(e.source.familyLines),e.source.accessibility);return _e(lt(r,e.renderOptions,t?.layout),{injectAccessibility:!1})},lowerScene:Le(yt)});export{Qr as default};
@@ -0,0 +1 @@
1
+ import{e as f,g as S}from"./chunk-EX6TP7QM.js";function R(n,e,t){return f(n,e,t)}function P(n,e){return S(n,e)}var C="'JetBrains Mono'",y=`${C}, 'SF Mono', 'Fira Code', ui-monospace, monospace`,b={nodeLabel:13,edgeLabel:11,groupHeader:12},c={nodeLabel:500,edgeLabel:400,groupHeader:600};var s={horizontal:20,vertical:10,diamondExtra:24},m={outerBox:1,innerBox:.75,connector:1},z="0.35em",H={width:8,height:5},E={dash:4,gap:4},F={nodeLabelFontSize:b.nodeLabel,edgeLabelFontSize:b.edgeLabel,groupHeaderFontSize:b.groupHeader,nodeLabelFontWeight:c.nodeLabel,edgeLabelFontWeight:c.edgeLabel,groupHeaderFontWeight:c.groupHeader,nodePaddingX:s.horizontal,nodePaddingY:s.vertical,diamondExtraPadding:s.diamondExtra,edgeLineWidth:m.connector,groupCornerRadius:0,groupPaddingX:16,groupPaddingY:16,groupLabelPaddingX:12,groupLineWidth:m.outerBox};function p(n){return typeof n=="number"&&Number.isFinite(n)?n:void 0}function a(n,...e){for(let t of e){let r=p(t);if(r!=null&&r>0)return r}return n}function l(n,...e){for(let t of e){let r=p(t);if(r!=null&&r>=0)return r}return n}function g(...n){for(let e of n)if(typeof e=="string"&&e.trim().length>0)return e}function T(...n){for(let e of n){let t=g(e)?.toLowerCase();if(t==="uppercase"||t==="lowercase"||t==="capitalize")return t}}var h=/(<\/?(?:b|strong|i|em|u|s|del)\s*>)/gi;function N(n,e){if(!e)return n;let t=r=>{switch(e){case"uppercase":return r.toUpperCase();case"lowercase":return r.toLowerCase();case"capitalize":return r.replace(/\b\p{L}/gu,o=>o.toUpperCase())}};return n.split(h).map(r=>/^<\/?(?:b|strong|i|em|u|s|del)\s*>$/i.test(r)?r:t(r)).join("")}function X(n={},e=F,t){let r=t??n.styleFace,o=r?.text,d=r?.node,u=r?.edge,i=r?.group,x=l(void 0,i?.paddingX),L=e.nodeCornerRadius==null?l(void 0,d?.cornerRadius):l(e.nodeCornerRadius,d?.cornerRadius);return{nodeLabelFontSize:a(e.nodeLabelFontSize,d?.fontSize,o?.fontSize),edgeLabelFontSize:a(e.edgeLabelFontSize,u?.fontSize,o?.fontSize),groupHeaderFontSize:a(e.groupHeaderFontSize,i?.fontSize,o?.fontSize),nodeLabelFontWeight:a(e.nodeLabelFontWeight,d?.fontWeight,o?.fontWeight),edgeLabelFontWeight:a(e.edgeLabelFontWeight,u?.fontWeight,o?.fontWeight),groupHeaderFontWeight:a(e.groupHeaderFontWeight,i?.fontWeight,o?.fontWeight),nodeTextTransform:T(d?.textTransform,o?.textTransform,e.nodeTextTransform),edgeTextTransform:T(u?.textTransform,o?.textTransform,e.edgeTextTransform),nodeLetterSpacing:p(d?.letterSpacing)??p(o?.letterSpacing)??e.nodeLetterSpacing??0,edgeLetterSpacing:p(u?.letterSpacing)??p(o?.letterSpacing)??e.edgeLetterSpacing??0,groupLetterSpacing:p(i?.letterSpacing)??p(o?.letterSpacing)??e.groupLetterSpacing??0,nodePaddingX:l(e.nodePaddingX,d?.paddingX),nodePaddingY:l(e.nodePaddingY,d?.paddingY),diamondExtraPadding:e.diamondExtraPadding??s.diamondExtra,cornerRadius:L,nodeLineWidth:a(e.nodeLineWidth??m.innerBox,d?.lineWidth),nodeFillColor:g(d?.fillColor,e.nodeFillColor),nodeBorderColor:g(d?.borderColor,e.nodeBorderColor),nodeTextColor:g(d?.textColor,o?.textColor,e.nodeTextColor),lineWidth:a(e.edgeLineWidth,u?.lineWidth),edgeBendRadius:l(e.edgeBendRadius??0,u?.bendRadius),edgeStrokeColor:g(u?.strokeColor,e.edgeStrokeColor),edgeTextColor:g(u?.textColor,o?.textColor,e.edgeTextColor),groupFont:g(i?.fontFamily,e.groupFont),groupTextTransform:T(i?.textTransform,o?.textTransform,e.groupTextTransform),groupCornerRadius:l(e.groupCornerRadius,i?.cornerRadius),groupBorderColor:g(i?.borderColor,e.groupBorderColor),groupFillColor:g(i?.fillColor,e.groupFillColor),groupHeaderFillColor:g(i?.headerFillColor,e.groupHeaderFillColor),groupTextColor:g(i?.textColor,o?.textColor,e.groupTextColor),groupPaddingX:x??e.groupPaddingX,groupPaddingY:l(e.groupPaddingY,i?.paddingY),groupLabelPaddingX:x??e.groupLabelPaddingX??e.groupPaddingX,groupLineWidth:a(e.groupLineWidth??m.outerBox,i?.lineWidth)}}export{R as a,P as b,b as c,c as d,m as e,z as f,H as g,E as h,F as i,N as j,X as k};
@@ -0,0 +1 @@
1
+ import{a as n}from"./chunk-STQRDZ67.js";var r=Object.freeze({book:Object.freeze(["M3 5.5C6 4.5 9 4.8 12 6V20C9 18.8 6 18.5 3 19.5Z","M21 5.5C18 4.5 15 4.8 12 6V20C15 18.8 18 18.5 21 19.5Z"]),skull:Object.freeze(["M5 11A7 7 0 1 1 19 11C19 15 17 17 15 18V21H9V18C7 17 5 15 5 11Z","M8 11A1.5 1.5 0 1 0 11 11A1.5 1.5 0 1 0 8 11ZM13 11A1.5 1.5 0 1 0 16 11A1.5 1.5 0 1 0 13 11Z","M10 17V20M12 17V20M14 17V20"])});function d(t){let e=(t.trim().toLowerCase().split(/\s+/).filter(Boolean).findLast(s=>!["fa","fas","far","fab","mdi"].includes(s))??"").replace(/^(?:fa-|mdi-)/,""),l=r[e==="book-open"?"book":e==="skull-outline"?"skull":e];if(l)return{viewBox:"0 0 24 24",paths:l,source:"bundled-symbol"};let o=n(t)??n(`mdi:${e}`);return o?{viewBox:o.viewBox,paths:[o.path],source:o.source}:null}export{d as a};