@belonguniverseai/react-sdk 0.6.2 → 0.6.4

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 (81) hide show
  1. package/dist/api/agent-grants.d.ts +23 -8
  2. package/dist/api/client.d.ts +53 -4
  3. package/dist/api/queries.d.ts +2 -0
  4. package/dist/app/call-summary.d.ts +30 -0
  5. package/dist/component/abnfDiagram-N423BO3Z-DR3fMT7g.js +90 -0
  6. package/dist/component/arc-DJkYOSuJ.js +86 -0
  7. package/dist/component/{architectureDiagram-3BPJPVTR-DYcaPx2M.js → architectureDiagram-T3A2C74G-BIp4IBPk.js} +1872 -1785
  8. package/dist/component/{blockDiagram-GPEHLZMM-BdjruLO5.js → blockDiagram-VBNYF7ZC-BqryGqC6.js} +895 -894
  9. package/dist/component/{c4Diagram-AAUBKEIU-Bd2ebSgB.js → c4Diagram-5PPSVZJV-GktlF-Di.js} +3 -3
  10. package/dist/component/{channel-CYFijF_t.js → channel-3CusDaXb.js} +2 -2
  11. package/dist/component/{chunk-ND2GUHAM-OX1-DIU1.js → chunk-2GRJ4B5K-DMTs6j_c.js} +5 -5
  12. package/dist/component/{chunk-QZHKN3VN-DLQ8oUCc.js → chunk-2Q5K7J3B-CIU34hPH.js} +2 -2
  13. package/dist/component/{chunk-AQP2D5EJ-D4G4syYu.js → chunk-5RXB4S5H-Ds3vF1Mv.js} +399 -378
  14. package/dist/component/{chunk-FMBD7UC4-CbRxWx_A.js → chunk-5VM5RSS4-DGxDkIm6.js} +2 -2
  15. package/dist/component/chunk-6Q2QTUOP-BI8oZt98.js +673 -0
  16. package/dist/component/{chunk-727SXJPM-A5r5oL1_.js → chunk-GF5L2VYU-D-36xUd5.js} +244 -239
  17. package/dist/component/{chunk-4BX2VUAB-DVpS0I_p.js → chunk-JWPE2WC7-8N_wQ762.js} +2 -2
  18. package/dist/component/{chunk-2J33WTMH-B06Y_xVy.js → chunk-KBJHAD2P-ChxxpkWc.js} +2 -2
  19. package/dist/component/chunk-RYQCIY6F-CSY-95OP.js +316 -0
  20. package/dist/component/{chunk-55IACEB6-DmZctFkK.js → chunk-XXDRQBXY-BQd9yyE1.js} +2 -2
  21. package/dist/component/{classDiagram-4FO5ZUOK-4S9mdFC1.js → classDiagram-JCYQIIEL-BOq63iUL.js} +3 -3
  22. package/dist/component/{classDiagram-v2-Q7XG4LA2-4S9mdFC1.js → classDiagram-v2-OCEON4UE-BOq63iUL.js} +3 -3
  23. package/dist/component/{cose-bilkent-S5V4N54A-BIrVaakt.js → cose-bilkent-JH36ORCC-B9x8cp5w.js} +2 -2
  24. package/dist/component/{wardley-L42UT6IY-HA1eSIS_.js → cynefin-VYW2F7L2-DAyxamLw.js} +9199 -7918
  25. package/dist/component/cynefinDiagram-MW4NZA55-OF6l99SS.js +302 -0
  26. package/dist/component/dagre-VZM6K2ZE-CELO1hFb.js +343 -0
  27. package/dist/component/diagram-7IWD3JNH-COzvm6E2.js +353 -0
  28. package/dist/component/{diagram-KO2AKTUF-Da1E68Eo.js → diagram-B4RE2ZJO-DR9KMRGw.js} +24 -24
  29. package/dist/component/{diagram-LMA3HP47-dRbk5sBa.js → diagram-LBJQPF4R-D47Zqm-k.js} +23 -23
  30. package/dist/component/{diagram-OG6HWLK6-CcKT8mhn.js → diagram-Q27KOJAE-Key1bw_Y.js} +197 -197
  31. package/dist/component/diagram-UB23O5K3-Cxf-sZnK.js +222 -0
  32. package/dist/component/ebnfDiagram-BXEA7PRR-C8uURt_x.js +112 -0
  33. package/dist/component/{erDiagram-TEJ5UH35-3ATYT9J-.js → erDiagram-JOGREHBK-CpCxe8Ib.js} +142 -131
  34. package/dist/component/{flowDiagram-I6XJVG4X-D9PLm9Od.js → flowDiagram-UKHOOZJN-urFG2I71.js} +268 -258
  35. package/dist/component/ganttDiagram-PKOTCBZU-8nA9faYf.js +2714 -0
  36. package/dist/component/{gitGraphDiagram-PVQCEYII-13gVhAGc.js → gitGraphDiagram-DS77QQ5N-u4cbNW8o.js} +33 -33
  37. package/dist/component/{graph-BZLHvygk.js → graph-CWpEkm4G.js} +35 -35
  38. package/dist/component/{highlighted-body-OFNGDK62-DCxRI4UV.js → highlighted-body-OFNGDK62-Bo-15uvJ.js} +2 -2
  39. package/dist/component/index.js +2 -2
  40. package/dist/component/{infoDiagram-5YYISTIA-DymxA7AN.js → infoDiagram-6WML65LV-ZAv4gZpA.js} +4 -4
  41. package/dist/component/{ishikawaDiagram-YF4QCWOH-C3sTn76C.js → ishikawaDiagram-WSZJBQD7-CvB6evSz.js} +27 -27
  42. package/dist/component/{journeyDiagram-JHISSGLW-Cq0hOAfJ.js → journeyDiagram-NVQOT4AX-M5BRYuPr.js} +5 -5
  43. package/dist/component/{kanban-definition-UN3LZRKU-5tBWjkp7.js → kanban-definition-27J2QSJJ-LL6GkmVe.js} +35 -35
  44. package/dist/component/layout-Br2UjHRU.js +1522 -0
  45. package/dist/component/{linear-BT4blD8s.js → linear-DVg61V66.js} +13 -13
  46. package/dist/component/map-CdwokNh2.js +227 -0
  47. package/dist/component/{mermaid-GHXKKRXX-DXPXjnb7.js → mermaid-GHXKKRXX-C2L7fCIM.js} +29577 -29128
  48. package/dist/component/{mindmap-definition-RKZ34NQL-DO-OuAQQ.js → mindmap-definition-FAOFIHXS-BBZzsLh7.js} +26 -26
  49. package/dist/component/pegDiagram-VL7TDLO6-BEG86cY8.js +98 -0
  50. package/dist/component/pieDiagram-7S7Q4E2Y-BTkrNjAi.js +210 -0
  51. package/dist/component/{quadrantDiagram-W4KKPZXB-CaJWg9ep.js → quadrantDiagram-CIZ2JOQS-BsjBAd4w.js} +14 -15
  52. package/dist/component/railroadDiagram-AXF67PYL-DuE0ZFxj.js +80 -0
  53. package/dist/component/{requirementDiagram-4Y6WPE33-CmZrtZqe.js → requirementDiagram-LRYGKXZP-CcshEEMy.js} +15 -15
  54. package/dist/component/{sankeyDiagram-5OEKKPKP-Cp95M1aj.js → sankeyDiagram-W5VNT64P-CFn011ig.js} +2 -2
  55. package/dist/component/{sequenceDiagram-3UESZ5HK-C0x0WvhR.js → sequenceDiagram-SI44F4Z6-DmMZNJDw.js} +960 -963
  56. package/dist/component/sizeCapture-X5ZJPWSS-Ce4PhIAO.js +49 -0
  57. package/dist/component/{stateDiagram-AJRCARHV-H10vaGL3.js → stateDiagram-OKZ733FA-DDVzQKaO.js} +5 -5
  58. package/dist/component/{stateDiagram-v2-BHNVJYJU-rj7ljkc-.js → stateDiagram-v2-UEYNNEHI-DeeW8PDA.js} +3 -3
  59. package/dist/component/swimlanes-SLNWSIFB-CZh2_vzg.js +5335 -0
  60. package/dist/component/swimlanesDiagram-ULZ7WXOC-Wb0Ri7qR.js +16 -0
  61. package/dist/component/{timeline-definition-PNZ67QCA-Cil1QaqZ.js → timeline-definition-Z64GVDOM-rfiLwdTR.js} +15 -15
  62. package/dist/component/vennDiagram-T6HMQDX7-D8l7hqNb.js +1581 -0
  63. package/dist/component/{wardleyDiagram-YWT4CUSO-Xq5Hnmio.js → wardleyDiagram-T6FBY63Y-7YqmpmtC.js} +15 -15
  64. package/dist/component/{xychartDiagram-2RQKCTM6-dinwR4Zm.js → xychartDiagram-ELKLHX3M-Dx2ECqt8.js} +464 -418
  65. package/dist/embed/voice/line-slots.d.ts +37 -2
  66. package/dist/embed/voice-call.d.ts +12 -0
  67. package/dist/i18n/messages/en.d.ts +1 -2
  68. package/dist/lib/web-storage.d.ts +8 -0
  69. package/dist/stream/belong-chat-transport.d.ts +1 -0
  70. package/dist/stream/belong-data-parts.d.ts +2 -0
  71. package/dist/stream/stream-state-store.d.ts +13 -0
  72. package/dist/types/public.d.ts +3 -0
  73. package/package.json +1 -1
  74. package/dist/component/arc-TLcl3N8_.js +0 -86
  75. package/dist/component/dagre-BM42HDAG-BoPUzTvD.js +0 -448
  76. package/dist/component/diagram-2AECGRRQ-PIXCGxIt.js +0 -220
  77. package/dist/component/diagram-5GNKFQAL-CbJxbGBh.js +0 -126
  78. package/dist/component/ganttDiagram-6RSMTGT7-F_XUzD1p.js +0 -2709
  79. package/dist/component/layout-Bu6nRdWm.js +0 -1731
  80. package/dist/component/pieDiagram-4H26LBE5-BkEktPwZ.js +0 -166
  81. package/dist/component/vennDiagram-CIIHVFJN-Dk8PKmfb.js +0 -1560
@@ -9,6 +9,15 @@ export type AgentGrantStatusView = {
9
9
  readonly grantedAt: string | null;
10
10
  readonly expiresAt: string | null;
11
11
  };
12
+ export type AgentGrantSourceTrigger = "auto_connect" | "preemptive_refresh" | "reactive_reconnect";
13
+ export type CreateAgentGrantRequestInput = {
14
+ readonly provider: string;
15
+ readonly scopeExternalId: string;
16
+ /** Optional while an older dock or restored stream part is in use. */
17
+ readonly sourceTrigger?: AgentGrantSourceTrigger;
18
+ /** The `reconnect_cli` tool-call id for a reactive reconnect. */
19
+ readonly reconnectId?: string;
20
+ };
12
21
  export declare const useAgentGrantStatus: (input: {
13
22
  readonly provider: string;
14
23
  readonly scopeExternalId: string;
@@ -45,6 +54,18 @@ export type GrantRetryOptions = {
45
54
  * into a limiter that is, by then, demonstrably saturated.
46
55
  */
47
56
  export declare const isRateLimitedGrantError: (error: unknown) => boolean;
57
+ /**
58
+ * A scope-cap error reaches callers only after the inner recovery attempt has
59
+ * either remained unconfirmed or retried once and still failed. Outer retry
60
+ * ladders must stop instead of repeating the whole mint + revoke pipeline.
61
+ */
62
+ export declare const isSessionLimitedGrantError: (error: unknown) => boolean;
63
+ /**
64
+ * True when a grant failed after the provider session was already minted.
65
+ * Outer auto-connect retries must stop here as well as the inner retry loop,
66
+ * otherwise one React retry chain can still create multiple orphan sessions.
67
+ */
68
+ export declare const isPostMintGrantError: (error: unknown) => boolean;
48
69
  /**
49
70
  * POST a grant create with two layers of self-heal:
50
71
  * 1. Per attempt — the 409/429 anti-replay / session-cap force-mint retry
@@ -65,10 +86,7 @@ export declare const isRateLimitedGrantError: (error: unknown) => boolean;
65
86
  * something we can't fix by asking again.
66
87
  * Injectable timing/randomness so the whole loop is unit-testable.
67
88
  */
68
- export declare const createAgentGrantRequest: (api: ApiClient, input: {
69
- readonly provider: string;
70
- readonly scopeExternalId: string;
71
- }, opts?: GrantRetryOptions) => Promise<unknown>;
89
+ export declare const createAgentGrantRequest: (api: ApiClient, input: CreateAgentGrantRequestInput, opts?: GrantRetryOptions) => Promise<unknown>;
72
90
  /**
73
91
  * BEL-79 fail-fast beacon: tell the backend a reactive reconnect has FAILED for
74
92
  * good (after `createAgentGrantRequest`'s own forceRotate+retry), so the worker's
@@ -83,7 +101,4 @@ export declare const signalReconnectFailedRequest: (api: ApiClient, input: {
83
101
  readonly scopeExternalId: string;
84
102
  readonly reconnectId: string;
85
103
  }) => Promise<void>;
86
- export declare const useCreateAgentGrant: () => import('@tanstack/react-query').UseMutationResult<unknown, Error, {
87
- readonly provider: string;
88
- readonly scopeExternalId: string;
89
- }, unknown>;
104
+ export declare const useCreateAgentGrant: () => import('@tanstack/react-query').UseMutationResult<unknown, Error, CreateAgentGrantRequestInput, unknown>;
@@ -617,7 +617,7 @@ export declare const createApiClient: (baseUrl: string) => {
617
617
  };
618
618
  };
619
619
  outputFormat: "json";
620
- status: 403 | 404 | 409;
620
+ status: 404 | 403 | 409;
621
621
  } | {
622
622
  input: {
623
623
  param: {
@@ -677,7 +677,7 @@ export declare const createApiClient: (baseUrl: string) => {
677
677
  };
678
678
  };
679
679
  outputFormat: "json";
680
- status: 403 | 404 | 409;
680
+ status: 404 | 403 | 409;
681
681
  };
682
682
  }>;
683
683
  };
@@ -866,6 +866,8 @@ export declare const createApiClient: (baseUrl: string) => {
866
866
  readonly totalInputTokens: number;
867
867
  readonly totalOutputTokens: number;
868
868
  readonly totalTokens: number;
869
+ readonly totalCacheReadInputTokens: number;
870
+ readonly totalCacheWriteInputTokens: number;
869
871
  readonly turns: number;
870
872
  readonly runningMs: number;
871
873
  readonly toolCalls: number;
@@ -908,6 +910,8 @@ export declare const createApiClient: (baseUrl: string) => {
908
910
  readonly totalInputTokens: number;
909
911
  readonly totalOutputTokens: number;
910
912
  readonly totalTokens: number;
913
+ readonly totalCacheReadInputTokens: number;
914
+ readonly totalCacheWriteInputTokens: number;
911
915
  readonly turns: number;
912
916
  readonly runningMs: number;
913
917
  readonly toolCalls: number;
@@ -1204,7 +1208,7 @@ export declare const createApiClient: (baseUrl: string) => {
1204
1208
  output: {
1205
1209
  error: {
1206
1210
  type: string;
1207
- reason: import('node_modules/@belong/cloud/src/features/files/file.schemas').UploadTypeRefusal;
1211
+ reason: import('../../../../apps/belong-cloud/src/features/files/file.schemas').UploadTypeRefusal;
1208
1212
  filename: string;
1209
1213
  declaredMimeType: string;
1210
1214
  message: string;
@@ -3200,6 +3204,8 @@ export declare const createApiClient: (baseUrl: string) => {
3200
3204
  json: {
3201
3205
  provider: string;
3202
3206
  scopeExternalId: string;
3207
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3208
+ reconnectId?: string | undefined;
3203
3209
  };
3204
3210
  };
3205
3211
  output: {
@@ -3213,6 +3219,8 @@ export declare const createApiClient: (baseUrl: string) => {
3213
3219
  json: {
3214
3220
  provider: string;
3215
3221
  scopeExternalId: string;
3222
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3223
+ reconnectId?: string | undefined;
3216
3224
  };
3217
3225
  };
3218
3226
  output: {
@@ -3227,6 +3235,8 @@ export declare const createApiClient: (baseUrl: string) => {
3227
3235
  json: {
3228
3236
  provider: string;
3229
3237
  scopeExternalId: string;
3238
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3239
+ reconnectId?: string | undefined;
3230
3240
  };
3231
3241
  };
3232
3242
  output: {
@@ -3241,6 +3251,8 @@ export declare const createApiClient: (baseUrl: string) => {
3241
3251
  json: {
3242
3252
  provider: string;
3243
3253
  scopeExternalId: string;
3254
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3255
+ reconnectId?: string | undefined;
3244
3256
  };
3245
3257
  };
3246
3258
  output: {
@@ -3255,6 +3267,8 @@ export declare const createApiClient: (baseUrl: string) => {
3255
3267
  json: {
3256
3268
  provider: string;
3257
3269
  scopeExternalId: string;
3270
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3271
+ reconnectId?: string | undefined;
3258
3272
  };
3259
3273
  };
3260
3274
  output: {
@@ -3269,11 +3283,31 @@ export declare const createApiClient: (baseUrl: string) => {
3269
3283
  json: {
3270
3284
  provider: string;
3271
3285
  scopeExternalId: string;
3286
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3287
+ reconnectId?: string | undefined;
3272
3288
  };
3273
3289
  };
3274
3290
  output: {
3275
3291
  error: {
3276
- type: string;
3292
+ type: "scope_session_limit";
3293
+ recovery: "provider_sessions_revoked" | "unconfirmed";
3294
+ };
3295
+ };
3296
+ outputFormat: "json";
3297
+ status: 429;
3298
+ } | {
3299
+ input: {
3300
+ json: {
3301
+ provider: string;
3302
+ scopeExternalId: string;
3303
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3304
+ reconnectId?: string | undefined;
3305
+ };
3306
+ };
3307
+ output: {
3308
+ error: {
3309
+ type: "rate_limited";
3310
+ retryAfterMs: number;
3277
3311
  };
3278
3312
  };
3279
3313
  outputFormat: "json";
@@ -3283,6 +3317,8 @@ export declare const createApiClient: (baseUrl: string) => {
3283
3317
  json: {
3284
3318
  provider: string;
3285
3319
  scopeExternalId: string;
3320
+ sourceTrigger?: "reactive_reconnect" | "auto_connect" | "preemptive_refresh" | undefined;
3321
+ reconnectId?: string | undefined;
3286
3322
  };
3287
3323
  };
3288
3324
  output: {
@@ -3382,6 +3418,19 @@ export declare const createApiClient: (baseUrl: string) => {
3382
3418
  };
3383
3419
  outputFormat: "json";
3384
3420
  status: 404;
3421
+ } | {
3422
+ input: {
3423
+ param: {
3424
+ grantId: string;
3425
+ };
3426
+ };
3427
+ output: {
3428
+ error: {
3429
+ type: string;
3430
+ };
3431
+ };
3432
+ outputFormat: "json";
3433
+ status: 503;
3385
3434
  };
3386
3435
  }>;
3387
3436
  };
@@ -23,6 +23,8 @@ export declare const useSessionStats: (sessionId: string | null) => import('@tan
23
23
  readonly totalInputTokens: number;
24
24
  readonly totalOutputTokens: number;
25
25
  readonly totalTokens: number;
26
+ readonly totalCacheReadInputTokens: number;
27
+ readonly totalCacheWriteInputTokens: number;
26
28
  readonly turns: number;
27
29
  readonly runningMs: number;
28
30
  readonly toolCalls: number;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * What the call screen says the agent is DOING — one sentence, resolved from
3
+ * data already on the wire. No new tool, no model round-trip.
4
+ *
5
+ * The cascade degrades in the right direction: the more the agent told us
6
+ * about its own work, the better the line reads, and it never asserts
7
+ * something the run cannot support.
8
+ *
9
+ * Deliberately NOT `planStepLabel()` from stream/plan-progress.ts: that helper
10
+ * renders hardcoded English scaffolding ("Step 2 of 5 — <title>"), which would
11
+ * ship untranslated prose onto a localized surface. The step's own title is the
12
+ * agent's words; the count belongs in the rollup, where it is a number inside a
13
+ * translated string.
14
+ */
15
+ export type CallSummaryRollup = {
16
+ readonly key: string;
17
+ readonly params: Readonly<Record<string, number>>;
18
+ };
19
+ export type CallSummary = {
20
+ /** The sentence under the collapsed header, or null when there is nothing
21
+ * truthful to say. */
22
+ readonly headline: string | null;
23
+ /** i18n key + params for the rollup, or null before any action has run. */
24
+ readonly rollup: CallSummaryRollup | null;
25
+ };
26
+ export declare const callSummary: (input: {
27
+ readonly planStepTitle: string | null;
28
+ readonly dispatchedRequest: string | null;
29
+ readonly actionCount: number;
30
+ }) => CallSummary;
@@ -0,0 +1,90 @@
1
+ import { g as p, r as u, d as n } from "./chunk-6Q2QTUOP-BI8oZt98.js";
2
+ import { p as f } from "./chunk-JWPE2WC7-8N_wQ762.js";
3
+ import { _ as a, l as o } from "./mermaid-GHXKKRXX-C2L7fCIM.js";
4
+ import { M as c, b as g } from "./cynefin-VYW2F7L2-DAyxamLw.js";
5
+ globalThis.process = globalThis.process || { env: {} };
6
+ globalThis.global = globalThis.global || globalThis;
7
+ var b = g().RailroadAbnf.parser.LangiumParser, l = /* @__PURE__ */ a((e) => {
8
+ const r = e.alternatives.map(d);
9
+ return r.length === 1 ? r[0] : {
10
+ type: "choice",
11
+ alternatives: r
12
+ };
13
+ }, "transformAlternation"), d = /* @__PURE__ */ a((e) => {
14
+ const r = e.elements.map(h);
15
+ return r.length === 1 ? r[0] : {
16
+ type: "sequence",
17
+ elements: r
18
+ };
19
+ }, "transformConcatenation"), v = /* @__PURE__ */ a((e) => {
20
+ if (e.includes("*")) {
21
+ const [t, s] = e.split("*"), i = t ? parseInt(t, 10) : 0, m = s ? parseInt(s, 10) : 1 / 0;
22
+ return { min: i, max: m };
23
+ }
24
+ const r = parseInt(e, 10);
25
+ return { min: r, max: r };
26
+ }, "parseRepeat"), h = /* @__PURE__ */ a((e) => {
27
+ const r = y(e.primary);
28
+ if (!e.repeat)
29
+ return r;
30
+ const { min: t, max: s } = v(e.repeat);
31
+ return t === 0 && s === 1 ? { type: "optional", element: r } : {
32
+ type: "repetition",
33
+ element: r,
34
+ min: t,
35
+ max: s
36
+ };
37
+ }, "transformElement"), y = /* @__PURE__ */ a((e) => {
38
+ switch (e.$type) {
39
+ case "AbnfStringLiteral":
40
+ return {
41
+ type: "terminal",
42
+ value: e.value
43
+ };
44
+ case "AbnfNumVal":
45
+ return {
46
+ type: "terminal",
47
+ value: e.value
48
+ };
49
+ case "AbnfRuleName":
50
+ return {
51
+ type: "nonterminal",
52
+ name: e.name
53
+ };
54
+ case "AbnfGroup":
55
+ return l(e.element);
56
+ case "AbnfOptionalGroup":
57
+ return {
58
+ type: "optional",
59
+ element: l(e.element)
60
+ };
61
+ default:
62
+ throw new Error(`Unsupported ABNF primary node: ${e.$type}`);
63
+ }
64
+ }, "transformPrimary"), A = /* @__PURE__ */ a((e) => ({
65
+ name: e.name,
66
+ definition: l(e.definition)
67
+ }), "transformRule"), P = /* @__PURE__ */ a((e) => {
68
+ f(e, n), e.title && n.setTitle(e.title), e.rules.map((r) => n.addRule(A(r)));
69
+ }, "populateDb"), R = {
70
+ parse: /* @__PURE__ */ a((e) => {
71
+ n.clear(), o.debug("[ABNF Parser] Starting Langium parse");
72
+ const r = b.parse(e);
73
+ if (r.lexerErrors.length > 0 || r.parserErrors.length > 0)
74
+ throw new c(r);
75
+ const t = r.value;
76
+ o.debug("[ABNF Parser] Parsed rules:", t.rules.length), P(t), o.debug("[ABNF Parser] Parse complete");
77
+ }, "parse"),
78
+ parser: {
79
+ yy: n
80
+ }
81
+ }, T = {
82
+ parser: R,
83
+ db: n,
84
+ renderer: u,
85
+ styles: p
86
+ };
87
+ export {
88
+ T as diagram
89
+ };
90
+ //# sourceMappingURL=abnfDiagram-N423BO3Z-DR3fMT7g.js.map
@@ -0,0 +1,86 @@
1
+ import { H as ln, I as an, J as g, K as on, M as Q, N as w, O as _, P as sn, Q as rn, S as X, T as t, V as J, W as un, X as tn, Y as fn } from "./mermaid-GHXKKRXX-C2L7fCIM.js";
2
+ globalThis.process = globalThis.process || { env: {} };
3
+ globalThis.global = globalThis.global || globalThis;
4
+ function cn(l) {
5
+ return l.innerRadius;
6
+ }
7
+ function gn(l) {
8
+ return l.outerRadius;
9
+ }
10
+ function yn(l) {
11
+ return l.startAngle;
12
+ }
13
+ function pn(l) {
14
+ return l.endAngle;
15
+ }
16
+ function dn(l) {
17
+ return l && l.padAngle;
18
+ }
19
+ function hn(l, x, S, I, v, T, K, a) {
20
+ var q = S - l, u = I - x, n = K - v, p = a - T, s = p * q - n * u;
21
+ if (!(s * s < g))
22
+ return s = (n * (x - T) - p * (l - v)) / s, [l + s * q, x + s * u];
23
+ }
24
+ function F(l, x, S, I, v, T, K) {
25
+ var a = l - S, q = x - I, u = (K ? T : -T) / X(a * a + q * q), n = u * q, p = -u * a, s = l + n, i = x + p, f = S + n, c = I + p, M = (s + f) / 2, o = (i + c) / 2, d = f - s, y = c - i, A = d * d + y * y, R = v - T, b = s * c - f * i, D = (y < 0 ? -1 : 1) * X(fn(0, R * R * A - b * b)), E = (b * y - d * D) / A, H = (-b * d - y * D) / A, P = (b * y + d * D) / A, h = (-b * d + y * D) / A, m = E - M, e = H - o, r = P - M, N = h - o;
26
+ return m * m + e * e > r * r + N * N && (E = P, H = h), {
27
+ cx: E,
28
+ cy: H,
29
+ x01: -n,
30
+ y01: -p,
31
+ x11: E * (v / R - 1),
32
+ y11: H * (v / R - 1)
33
+ };
34
+ }
35
+ function xn() {
36
+ var l = cn, x = gn, S = J(0), I = null, v = yn, T = pn, K = dn, a = null, q = ln(u);
37
+ function u() {
38
+ var n, p, s = +l.apply(this, arguments), i = +x.apply(this, arguments), f = v.apply(this, arguments) - an, c = T.apply(this, arguments) - an, M = sn(c - f), o = c > f;
39
+ if (a || (a = n = q()), i < s && (p = i, i = s, s = p), !(i > g)) a.moveTo(0, 0);
40
+ else if (M > on - g)
41
+ a.moveTo(i * Q(f), i * w(f)), a.arc(0, 0, i, f, c, !o), s > g && (a.moveTo(s * Q(c), s * w(c)), a.arc(0, 0, s, c, f, o));
42
+ else {
43
+ var d = f, y = c, A = f, R = c, b = M, D = M, E = K.apply(this, arguments) / 2, H = E > g && (I ? +I.apply(this, arguments) : X(s * s + i * i)), P = _(sn(i - s) / 2, +S.apply(this, arguments)), h = P, m = P, e, r;
44
+ if (H > g) {
45
+ var N = un(H / s * w(E)), Y = un(H / i * w(E));
46
+ (b -= N * 2) > g ? (N *= o ? 1 : -1, A += N, R -= N) : (b = 0, A = R = (f + c) / 2), (D -= Y * 2) > g ? (Y *= o ? 1 : -1, d += Y, y -= Y) : (D = 0, d = y = (f + c) / 2);
47
+ }
48
+ var V = i * Q(d), W = i * w(d), j = s * Q(R), z = s * w(R);
49
+ if (P > g) {
50
+ var B = i * Q(y), C = i * w(y), G = s * Q(A), L = s * w(A), O;
51
+ if (M < rn)
52
+ if (O = hn(V, W, G, L, B, C, j, z)) {
53
+ var U = V - O[0], Z = W - O[1], $ = B - O[0], k = C - O[1], nn = 1 / w(tn((U * $ + Z * k) / (X(U * U + Z * Z) * X($ * $ + k * k))) / 2), en = X(O[0] * O[0] + O[1] * O[1]);
54
+ h = _(P, (s - en) / (nn - 1)), m = _(P, (i - en) / (nn + 1));
55
+ } else
56
+ h = m = 0;
57
+ }
58
+ D > g ? m > g ? (e = F(G, L, V, W, i, m, o), r = F(B, C, j, z, i, m, o), a.moveTo(e.cx + e.x01, e.cy + e.y01), m < P ? a.arc(e.cx, e.cy, m, t(e.y01, e.x01), t(r.y01, r.x01), !o) : (a.arc(e.cx, e.cy, m, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, i, t(e.cy + e.y11, e.cx + e.x11), t(r.cy + r.y11, r.cx + r.x11), !o), a.arc(r.cx, r.cy, m, t(r.y11, r.x11), t(r.y01, r.x01), !o))) : (a.moveTo(V, W), a.arc(0, 0, i, d, y, !o)) : a.moveTo(V, W), !(s > g) || !(b > g) ? a.lineTo(j, z) : h > g ? (e = F(j, z, B, C, s, -h, o), r = F(V, W, G, L, s, -h, o), a.lineTo(e.cx + e.x01, e.cy + e.y01), h < P ? a.arc(e.cx, e.cy, h, t(e.y01, e.x01), t(r.y01, r.x01), !o) : (a.arc(e.cx, e.cy, h, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, s, t(e.cy + e.y11, e.cx + e.x11), t(r.cy + r.y11, r.cx + r.x11), o), a.arc(r.cx, r.cy, h, t(r.y11, r.x11), t(r.y01, r.x01), !o))) : a.arc(0, 0, s, R, A, o);
59
+ }
60
+ if (a.closePath(), n) return a = null, n + "" || null;
61
+ }
62
+ return u.centroid = function() {
63
+ var n = (+l.apply(this, arguments) + +x.apply(this, arguments)) / 2, p = (+v.apply(this, arguments) + +T.apply(this, arguments)) / 2 - rn / 2;
64
+ return [Q(p) * n, w(p) * n];
65
+ }, u.innerRadius = function(n) {
66
+ return arguments.length ? (l = typeof n == "function" ? n : J(+n), u) : l;
67
+ }, u.outerRadius = function(n) {
68
+ return arguments.length ? (x = typeof n == "function" ? n : J(+n), u) : x;
69
+ }, u.cornerRadius = function(n) {
70
+ return arguments.length ? (S = typeof n == "function" ? n : J(+n), u) : S;
71
+ }, u.padRadius = function(n) {
72
+ return arguments.length ? (I = n == null ? null : typeof n == "function" ? n : J(+n), u) : I;
73
+ }, u.startAngle = function(n) {
74
+ return arguments.length ? (v = typeof n == "function" ? n : J(+n), u) : v;
75
+ }, u.endAngle = function(n) {
76
+ return arguments.length ? (T = typeof n == "function" ? n : J(+n), u) : T;
77
+ }, u.padAngle = function(n) {
78
+ return arguments.length ? (K = typeof n == "function" ? n : J(+n), u) : K;
79
+ }, u.context = function(n) {
80
+ return arguments.length ? (a = n ?? null, u) : a;
81
+ }, u;
82
+ }
83
+ export {
84
+ xn as d
85
+ };
86
+ //# sourceMappingURL=arc-DJkYOSuJ.js.map