@nowline/embed 0.2.5 → 0.4.1

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.
@@ -1,3 +1,4 @@
1
+ /*! @nowline/embed 0.4.1 sha=b28a065 built=2026-05-27T23:49:38.587Z env=prod */
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -786,8 +787,8 @@ var init_main = __esm({
786
787
  TextDocumentIdentifier2.is = is;
787
788
  })(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
788
789
  (function(VersionedTextDocumentIdentifier2) {
789
- function create(uri, version) {
790
- return { uri, version };
790
+ function create(uri, version2) {
791
+ return { uri, version: version2 };
791
792
  }
792
793
  VersionedTextDocumentIdentifier2.create = create;
793
794
  function is(value) {
@@ -797,8 +798,8 @@ var init_main = __esm({
797
798
  VersionedTextDocumentIdentifier2.is = is;
798
799
  })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
799
800
  (function(OptionalVersionedTextDocumentIdentifier2) {
800
- function create(uri, version) {
801
- return { uri, version };
801
+ function create(uri, version2) {
802
+ return { uri, version: version2 };
802
803
  }
803
804
  OptionalVersionedTextDocumentIdentifier2.create = create;
804
805
  function is(value) {
@@ -808,8 +809,8 @@ var init_main = __esm({
808
809
  OptionalVersionedTextDocumentIdentifier2.is = is;
809
810
  })(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));
810
811
  (function(TextDocumentItem2) {
811
- function create(uri, languageId, version, text) {
812
- return { uri, languageId, version, text };
812
+ function create(uri, languageId, version2, text) {
813
+ return { uri, languageId, version: version2, text };
813
814
  }
814
815
  TextDocumentItem2.create = create;
815
816
  function is(value) {
@@ -1298,8 +1299,8 @@ var init_main = __esm({
1298
1299
  })(WorkspaceFolder || (WorkspaceFolder = {}));
1299
1300
  EOL = ["\n", "\r\n", "\r"];
1300
1301
  (function(TextDocument3) {
1301
- function create(uri, languageId, version, content) {
1302
- return new FullTextDocument(uri, languageId, version, content);
1302
+ function create(uri, languageId, version2, content) {
1303
+ return new FullTextDocument(uri, languageId, version2, content);
1303
1304
  }
1304
1305
  TextDocument3.create = create;
1305
1306
  function is(value) {
@@ -1361,10 +1362,10 @@ var init_main = __esm({
1361
1362
  }
1362
1363
  })(TextDocument || (TextDocument = {}));
1363
1364
  FullTextDocument = class {
1364
- constructor(uri, languageId, version, content) {
1365
+ constructor(uri, languageId, version2, content) {
1365
1366
  this._uri = uri;
1366
1367
  this._languageId = languageId;
1367
- this._version = version;
1368
+ this._version = version2;
1368
1369
  this._content = content;
1369
1370
  this._lineOffsets = void 0;
1370
1371
  }
@@ -1385,9 +1386,9 @@ var init_main = __esm({
1385
1386
  }
1386
1387
  return this._content;
1387
1388
  }
1388
- update(event, version) {
1389
+ update(event, version2) {
1389
1390
  this._content = event.text;
1390
- this._version = version;
1391
+ this._version = version2;
1391
1392
  this._lineOffsets = void 0;
1392
1393
  }
1393
1394
  getLineOffsets() {
@@ -1496,9 +1497,9 @@ var init_main = __esm({
1496
1497
  }
1497
1498
  });
1498
1499
 
1499
- // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js
1500
+ // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.1/node_modules/vscode-jsonrpc/lib/common/ral.js
1500
1501
  var require_ral = __commonJS({
1501
- "../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(exports2) {
1502
+ "../../node_modules/.pnpm/vscode-jsonrpc@8.2.1/node_modules/vscode-jsonrpc/lib/common/ral.js"(exports2) {
1502
1503
  "use strict";
1503
1504
  Object.defineProperty(exports2, "__esModule", { value: true });
1504
1505
  var _ral;
@@ -1521,9 +1522,9 @@ var require_ral = __commonJS({
1521
1522
  }
1522
1523
  });
1523
1524
 
1524
- // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js
1525
+ // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.1/node_modules/vscode-jsonrpc/lib/common/is.js
1525
1526
  var require_is = __commonJS({
1526
- "../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(exports2) {
1527
+ "../../node_modules/.pnpm/vscode-jsonrpc@8.2.1/node_modules/vscode-jsonrpc/lib/common/is.js"(exports2) {
1527
1528
  "use strict";
1528
1529
  Object.defineProperty(exports2, "__esModule", { value: true });
1529
1530
  exports2.stringArray = exports2.array = exports2.func = exports2.error = exports2.number = exports2.string = exports2.boolean = void 0;
@@ -1558,9 +1559,9 @@ var require_is = __commonJS({
1558
1559
  }
1559
1560
  });
1560
1561
 
1561
- // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js
1562
+ // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.1/node_modules/vscode-jsonrpc/lib/common/events.js
1562
1563
  var require_events = __commonJS({
1563
- "../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(exports2) {
1564
+ "../../node_modules/.pnpm/vscode-jsonrpc@8.2.1/node_modules/vscode-jsonrpc/lib/common/events.js"(exports2) {
1564
1565
  "use strict";
1565
1566
  Object.defineProperty(exports2, "__esModule", { value: true });
1566
1567
  exports2.Emitter = exports2.Event = void 0;
@@ -1687,9 +1688,9 @@ var require_events = __commonJS({
1687
1688
  }
1688
1689
  });
1689
1690
 
1690
- // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js
1691
+ // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.1/node_modules/vscode-jsonrpc/lib/common/cancellation.js
1691
1692
  var require_cancellation = __commonJS({
1692
- "../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(exports2) {
1693
+ "../../node_modules/.pnpm/vscode-jsonrpc@8.2.1/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(exports2) {
1693
1694
  "use strict";
1694
1695
  Object.defineProperty(exports2, "__esModule", { value: true });
1695
1696
  exports2.CancellationTokenSource = exports2.CancellationToken = void 0;
@@ -1776,13 +1777,50 @@ var require_cancellation = __commonJS({
1776
1777
  }
1777
1778
  });
1778
1779
 
1780
+ // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js
1781
+ var require_is2 = __commonJS({
1782
+ "../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(exports2) {
1783
+ "use strict";
1784
+ Object.defineProperty(exports2, "__esModule", { value: true });
1785
+ exports2.stringArray = exports2.array = exports2.func = exports2.error = exports2.number = exports2.string = exports2.boolean = void 0;
1786
+ function boolean(value) {
1787
+ return value === true || value === false;
1788
+ }
1789
+ exports2.boolean = boolean;
1790
+ function string(value) {
1791
+ return typeof value === "string" || value instanceof String;
1792
+ }
1793
+ exports2.string = string;
1794
+ function number4(value) {
1795
+ return typeof value === "number" || value instanceof Number;
1796
+ }
1797
+ exports2.number = number4;
1798
+ function error(value) {
1799
+ return value instanceof Error;
1800
+ }
1801
+ exports2.error = error;
1802
+ function func(value) {
1803
+ return typeof value === "function";
1804
+ }
1805
+ exports2.func = func;
1806
+ function array(value) {
1807
+ return Array.isArray(value);
1808
+ }
1809
+ exports2.array = array;
1810
+ function stringArray(value) {
1811
+ return array(value) && value.every((elem) => string(elem));
1812
+ }
1813
+ exports2.stringArray = stringArray;
1814
+ }
1815
+ });
1816
+
1779
1817
  // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js
1780
1818
  var require_messages = __commonJS({
1781
1819
  "../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(exports2) {
1782
1820
  "use strict";
1783
1821
  Object.defineProperty(exports2, "__esModule", { value: true });
1784
1822
  exports2.Message = exports2.NotificationType9 = exports2.NotificationType8 = exports2.NotificationType7 = exports2.NotificationType6 = exports2.NotificationType5 = exports2.NotificationType4 = exports2.NotificationType3 = exports2.NotificationType2 = exports2.NotificationType1 = exports2.NotificationType0 = exports2.NotificationType = exports2.RequestType9 = exports2.RequestType8 = exports2.RequestType7 = exports2.RequestType6 = exports2.RequestType5 = exports2.RequestType4 = exports2.RequestType3 = exports2.RequestType2 = exports2.RequestType1 = exports2.RequestType = exports2.RequestType0 = exports2.AbstractMessageSignature = exports2.ParameterStructures = exports2.ResponseError = exports2.ErrorCodes = void 0;
1785
- var is = require_is();
1823
+ var is = require_is2();
1786
1824
  var ErrorCodes;
1787
1825
  (function(ErrorCodes2) {
1788
1826
  ErrorCodes2.ParseError = -32700;
@@ -2402,13 +2440,256 @@ var require_disposable = __commonJS({
2402
2440
  }
2403
2441
  });
2404
2442
 
2443
+ // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js
2444
+ var require_ral2 = __commonJS({
2445
+ "../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(exports2) {
2446
+ "use strict";
2447
+ Object.defineProperty(exports2, "__esModule", { value: true });
2448
+ var _ral;
2449
+ function RAL() {
2450
+ if (_ral === void 0) {
2451
+ throw new Error(`No runtime abstraction layer installed`);
2452
+ }
2453
+ return _ral;
2454
+ }
2455
+ (function(RAL2) {
2456
+ function install(ral) {
2457
+ if (ral === void 0) {
2458
+ throw new Error(`No runtime abstraction layer provided`);
2459
+ }
2460
+ _ral = ral;
2461
+ }
2462
+ RAL2.install = install;
2463
+ })(RAL || (RAL = {}));
2464
+ exports2.default = RAL;
2465
+ }
2466
+ });
2467
+
2468
+ // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js
2469
+ var require_events2 = __commonJS({
2470
+ "../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(exports2) {
2471
+ "use strict";
2472
+ Object.defineProperty(exports2, "__esModule", { value: true });
2473
+ exports2.Emitter = exports2.Event = void 0;
2474
+ var ral_1 = require_ral2();
2475
+ var Event;
2476
+ (function(Event2) {
2477
+ const _disposable = { dispose() {
2478
+ } };
2479
+ Event2.None = function() {
2480
+ return _disposable;
2481
+ };
2482
+ })(Event || (exports2.Event = Event = {}));
2483
+ var CallbackList = class {
2484
+ add(callback, context = null, bucket) {
2485
+ if (!this._callbacks) {
2486
+ this._callbacks = [];
2487
+ this._contexts = [];
2488
+ }
2489
+ this._callbacks.push(callback);
2490
+ this._contexts.push(context);
2491
+ if (Array.isArray(bucket)) {
2492
+ bucket.push({ dispose: () => this.remove(callback, context) });
2493
+ }
2494
+ }
2495
+ remove(callback, context = null) {
2496
+ if (!this._callbacks) {
2497
+ return;
2498
+ }
2499
+ let foundCallbackWithDifferentContext = false;
2500
+ for (let i = 0, len = this._callbacks.length; i < len; i++) {
2501
+ if (this._callbacks[i] === callback) {
2502
+ if (this._contexts[i] === context) {
2503
+ this._callbacks.splice(i, 1);
2504
+ this._contexts.splice(i, 1);
2505
+ return;
2506
+ } else {
2507
+ foundCallbackWithDifferentContext = true;
2508
+ }
2509
+ }
2510
+ }
2511
+ if (foundCallbackWithDifferentContext) {
2512
+ throw new Error("When adding a listener with a context, you should remove it with the same context");
2513
+ }
2514
+ }
2515
+ invoke(...args) {
2516
+ if (!this._callbacks) {
2517
+ return [];
2518
+ }
2519
+ const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
2520
+ for (let i = 0, len = callbacks.length; i < len; i++) {
2521
+ try {
2522
+ ret.push(callbacks[i].apply(contexts[i], args));
2523
+ } catch (e) {
2524
+ (0, ral_1.default)().console.error(e);
2525
+ }
2526
+ }
2527
+ return ret;
2528
+ }
2529
+ isEmpty() {
2530
+ return !this._callbacks || this._callbacks.length === 0;
2531
+ }
2532
+ dispose() {
2533
+ this._callbacks = void 0;
2534
+ this._contexts = void 0;
2535
+ }
2536
+ };
2537
+ var Emitter3 = class _Emitter {
2538
+ constructor(_options) {
2539
+ this._options = _options;
2540
+ }
2541
+ /**
2542
+ * For the public to allow to subscribe
2543
+ * to events from this Emitter
2544
+ */
2545
+ get event() {
2546
+ if (!this._event) {
2547
+ this._event = (listener, thisArgs, disposables) => {
2548
+ if (!this._callbacks) {
2549
+ this._callbacks = new CallbackList();
2550
+ }
2551
+ if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
2552
+ this._options.onFirstListenerAdd(this);
2553
+ }
2554
+ this._callbacks.add(listener, thisArgs);
2555
+ const result = {
2556
+ dispose: () => {
2557
+ if (!this._callbacks) {
2558
+ return;
2559
+ }
2560
+ this._callbacks.remove(listener, thisArgs);
2561
+ result.dispose = _Emitter._noop;
2562
+ if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
2563
+ this._options.onLastListenerRemove(this);
2564
+ }
2565
+ }
2566
+ };
2567
+ if (Array.isArray(disposables)) {
2568
+ disposables.push(result);
2569
+ }
2570
+ return result;
2571
+ };
2572
+ }
2573
+ return this._event;
2574
+ }
2575
+ /**
2576
+ * To be kept private to fire an event to
2577
+ * subscribers
2578
+ */
2579
+ fire(event) {
2580
+ if (this._callbacks) {
2581
+ this._callbacks.invoke.call(this._callbacks, event);
2582
+ }
2583
+ }
2584
+ dispose() {
2585
+ if (this._callbacks) {
2586
+ this._callbacks.dispose();
2587
+ this._callbacks = void 0;
2588
+ }
2589
+ }
2590
+ };
2591
+ exports2.Emitter = Emitter3;
2592
+ Emitter3._noop = function() {
2593
+ };
2594
+ }
2595
+ });
2596
+
2597
+ // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js
2598
+ var require_cancellation2 = __commonJS({
2599
+ "../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(exports2) {
2600
+ "use strict";
2601
+ Object.defineProperty(exports2, "__esModule", { value: true });
2602
+ exports2.CancellationTokenSource = exports2.CancellationToken = void 0;
2603
+ var ral_1 = require_ral2();
2604
+ var Is2 = require_is2();
2605
+ var events_1 = require_events2();
2606
+ var CancellationToken11;
2607
+ (function(CancellationToken12) {
2608
+ CancellationToken12.None = Object.freeze({
2609
+ isCancellationRequested: false,
2610
+ onCancellationRequested: events_1.Event.None
2611
+ });
2612
+ CancellationToken12.Cancelled = Object.freeze({
2613
+ isCancellationRequested: true,
2614
+ onCancellationRequested: events_1.Event.None
2615
+ });
2616
+ function is(value) {
2617
+ const candidate = value;
2618
+ return candidate && (candidate === CancellationToken12.None || candidate === CancellationToken12.Cancelled || Is2.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested);
2619
+ }
2620
+ CancellationToken12.is = is;
2621
+ })(CancellationToken11 || (exports2.CancellationToken = CancellationToken11 = {}));
2622
+ var shortcutEvent = Object.freeze(function(callback, context) {
2623
+ const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0);
2624
+ return { dispose() {
2625
+ handle.dispose();
2626
+ } };
2627
+ });
2628
+ var MutableToken = class {
2629
+ constructor() {
2630
+ this._isCancelled = false;
2631
+ }
2632
+ cancel() {
2633
+ if (!this._isCancelled) {
2634
+ this._isCancelled = true;
2635
+ if (this._emitter) {
2636
+ this._emitter.fire(void 0);
2637
+ this.dispose();
2638
+ }
2639
+ }
2640
+ }
2641
+ get isCancellationRequested() {
2642
+ return this._isCancelled;
2643
+ }
2644
+ get onCancellationRequested() {
2645
+ if (this._isCancelled) {
2646
+ return shortcutEvent;
2647
+ }
2648
+ if (!this._emitter) {
2649
+ this._emitter = new events_1.Emitter();
2650
+ }
2651
+ return this._emitter.event;
2652
+ }
2653
+ dispose() {
2654
+ if (this._emitter) {
2655
+ this._emitter.dispose();
2656
+ this._emitter = void 0;
2657
+ }
2658
+ }
2659
+ };
2660
+ var CancellationTokenSource3 = class {
2661
+ get token() {
2662
+ if (!this._token) {
2663
+ this._token = new MutableToken();
2664
+ }
2665
+ return this._token;
2666
+ }
2667
+ cancel() {
2668
+ if (!this._token) {
2669
+ this._token = CancellationToken11.Cancelled;
2670
+ } else {
2671
+ this._token.cancel();
2672
+ }
2673
+ }
2674
+ dispose() {
2675
+ if (!this._token) {
2676
+ this._token = CancellationToken11.None;
2677
+ } else if (this._token instanceof MutableToken) {
2678
+ this._token.dispose();
2679
+ }
2680
+ }
2681
+ };
2682
+ exports2.CancellationTokenSource = CancellationTokenSource3;
2683
+ }
2684
+ });
2685
+
2405
2686
  // ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js
2406
2687
  var require_sharedArrayCancellation = __commonJS({
2407
2688
  "../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(exports2) {
2408
2689
  "use strict";
2409
2690
  Object.defineProperty(exports2, "__esModule", { value: true });
2410
2691
  exports2.SharedArrayReceiverStrategy = exports2.SharedArraySenderStrategy = void 0;
2411
- var cancellation_1 = require_cancellation();
2692
+ var cancellation_1 = require_cancellation2();
2412
2693
  var CancellationState;
2413
2694
  (function(CancellationState2) {
2414
2695
  CancellationState2.Continue = 0;
@@ -2486,7 +2767,7 @@ var require_semaphore = __commonJS({
2486
2767
  "use strict";
2487
2768
  Object.defineProperty(exports2, "__esModule", { value: true });
2488
2769
  exports2.Semaphore = void 0;
2489
- var ral_1 = require_ral();
2770
+ var ral_1 = require_ral2();
2490
2771
  var Semaphore = class {
2491
2772
  constructor(capacity = 1) {
2492
2773
  if (capacity <= 0) {
@@ -2554,9 +2835,9 @@ var require_messageReader = __commonJS({
2554
2835
  "use strict";
2555
2836
  Object.defineProperty(exports2, "__esModule", { value: true });
2556
2837
  exports2.ReadableStreamMessageReader = exports2.AbstractMessageReader = exports2.MessageReader = void 0;
2557
- var ral_1 = require_ral();
2558
- var Is2 = require_is();
2559
- var events_1 = require_events();
2838
+ var ral_1 = require_ral2();
2839
+ var Is2 = require_is2();
2840
+ var events_1 = require_events2();
2560
2841
  var semaphore_1 = require_semaphore();
2561
2842
  var MessageReader;
2562
2843
  (function(MessageReader2) {
@@ -2743,10 +3024,10 @@ var require_messageWriter = __commonJS({
2743
3024
  "use strict";
2744
3025
  Object.defineProperty(exports2, "__esModule", { value: true });
2745
3026
  exports2.WriteableStreamMessageWriter = exports2.AbstractMessageWriter = exports2.MessageWriter = void 0;
2746
- var ral_1 = require_ral();
2747
- var Is2 = require_is();
3027
+ var ral_1 = require_ral2();
3028
+ var Is2 = require_is2();
2748
3029
  var semaphore_1 = require_semaphore();
2749
- var events_1 = require_events();
3030
+ var events_1 = require_events2();
2750
3031
  var ContentLength = "Content-Length: ";
2751
3032
  var CRLF = "\r\n";
2752
3033
  var MessageWriter;
@@ -3003,12 +3284,12 @@ var require_connection = __commonJS({
3003
3284
  "use strict";
3004
3285
  Object.defineProperty(exports2, "__esModule", { value: true });
3005
3286
  exports2.createMessageConnection = exports2.ConnectionOptions = exports2.MessageStrategy = exports2.CancellationStrategy = exports2.CancellationSenderStrategy = exports2.CancellationReceiverStrategy = exports2.RequestCancellationReceiverStrategy = exports2.IdCancellationReceiverStrategy = exports2.ConnectionStrategy = exports2.ConnectionError = exports2.ConnectionErrors = exports2.LogTraceNotification = exports2.SetTraceNotification = exports2.TraceFormat = exports2.TraceValues = exports2.Trace = exports2.NullLogger = exports2.ProgressType = exports2.ProgressToken = void 0;
3006
- var ral_1 = require_ral();
3007
- var Is2 = require_is();
3287
+ var ral_1 = require_ral2();
3288
+ var Is2 = require_is2();
3008
3289
  var messages_1 = require_messages();
3009
3290
  var linkedMap_1 = require_linkedMap();
3010
- var events_1 = require_events();
3011
- var cancellation_1 = require_cancellation();
3291
+ var events_1 = require_events2();
3292
+ var cancellation_1 = require_cancellation2();
3012
3293
  var CancelNotification;
3013
3294
  (function(CancelNotification2) {
3014
3295
  CancelNotification2.type = new messages_1.NotificationType("$/cancelRequest");
@@ -3228,7 +3509,7 @@ var require_connection = __commonJS({
3228
3509
  let sequenceNumber = 0;
3229
3510
  let notificationSequenceNumber = 0;
3230
3511
  let unknownResponseSequenceNumber = 0;
3231
- const version = "2.0";
3512
+ const version2 = "2.0";
3232
3513
  let starRequestHandler = void 0;
3233
3514
  const requestHandlers = /* @__PURE__ */ new Map();
3234
3515
  let starNotificationHandler = void 0;
@@ -3376,7 +3657,7 @@ var require_connection = __commonJS({
3376
3657
  }
3377
3658
  function reply(resultOrError, method, startTime2) {
3378
3659
  const message = {
3379
- jsonrpc: version,
3660
+ jsonrpc: version2,
3380
3661
  id: requestMessage.id
3381
3662
  };
3382
3663
  if (resultOrError instanceof messages_1.ResponseError) {
@@ -3389,7 +3670,7 @@ var require_connection = __commonJS({
3389
3670
  }
3390
3671
  function replyError(error, method, startTime2) {
3391
3672
  const message = {
3392
- jsonrpc: version,
3673
+ jsonrpc: version2,
3393
3674
  id: requestMessage.id,
3394
3675
  error: error.toJson()
3395
3676
  };
@@ -3401,7 +3682,7 @@ var require_connection = __commonJS({
3401
3682
  result = null;
3402
3683
  }
3403
3684
  const message = {
3404
- jsonrpc: version,
3685
+ jsonrpc: version2,
3405
3686
  id: requestMessage.id,
3406
3687
  result
3407
3688
  };
@@ -3871,7 +4152,7 @@ ${JSON.stringify(message, null, 4)}`);
3871
4152
  messageParams = computeMessageParams(type, params);
3872
4153
  }
3873
4154
  const notificationMessage = {
3874
- jsonrpc: version,
4155
+ jsonrpc: version2,
3875
4156
  method,
3876
4157
  params: messageParams
3877
4158
  };
@@ -3979,7 +4260,7 @@ ${JSON.stringify(message, null, 4)}`);
3979
4260
  });
3980
4261
  }
3981
4262
  const requestMessage = {
3982
- jsonrpc: version,
4263
+ jsonrpc: version2,
3983
4264
  id,
3984
4265
  method,
3985
4266
  params: messageParams
@@ -4225,14 +4506,14 @@ var require_api = __commonJS({
4225
4506
  Object.defineProperty(exports2, "Disposable", { enumerable: true, get: function() {
4226
4507
  return disposable_1.Disposable;
4227
4508
  } });
4228
- var events_1 = require_events();
4509
+ var events_1 = require_events2();
4229
4510
  Object.defineProperty(exports2, "Event", { enumerable: true, get: function() {
4230
4511
  return events_1.Event;
4231
4512
  } });
4232
4513
  Object.defineProperty(exports2, "Emitter", { enumerable: true, get: function() {
4233
4514
  return events_1.Emitter;
4234
4515
  } });
4235
- var cancellation_1 = require_cancellation();
4516
+ var cancellation_1 = require_cancellation2();
4236
4517
  Object.defineProperty(exports2, "CancellationTokenSource", { enumerable: true, get: function() {
4237
4518
  return cancellation_1.CancellationTokenSource;
4238
4519
  } });
@@ -4322,7 +4603,7 @@ var require_api = __commonJS({
4322
4603
  Object.defineProperty(exports2, "MessageStrategy", { enumerable: true, get: function() {
4323
4604
  return connection_1.MessageStrategy;
4324
4605
  } });
4325
- var ral_1 = require_ral();
4606
+ var ral_1 = require_ral2();
4326
4607
  exports2.RAL = ral_1.default;
4327
4608
  }
4328
4609
  });
@@ -4615,7 +4896,7 @@ var require_messages2 = __commonJS({
4615
4896
  });
4616
4897
 
4617
4898
  // ../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js
4618
- var require_is2 = __commonJS({
4899
+ var require_is3 = __commonJS({
4619
4900
  "../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(exports2) {
4620
4901
  "use strict";
4621
4902
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -5108,7 +5389,7 @@ var require_protocol_diagnostic = __commonJS({
5108
5389
  Object.defineProperty(exports2, "__esModule", { value: true });
5109
5390
  exports2.DiagnosticRefreshRequest = exports2.WorkspaceDiagnosticRequest = exports2.DocumentDiagnosticRequest = exports2.DocumentDiagnosticReportKind = exports2.DiagnosticServerCancellationData = void 0;
5110
5391
  var vscode_jsonrpc_1 = require_main();
5111
- var Is2 = require_is2();
5392
+ var Is2 = require_is3();
5112
5393
  var messages_1 = require_messages2();
5113
5394
  var DiagnosticServerCancellationData;
5114
5395
  (function(DiagnosticServerCancellationData2) {
@@ -5153,7 +5434,7 @@ var require_protocol_notebook = __commonJS({
5153
5434
  Object.defineProperty(exports2, "__esModule", { value: true });
5154
5435
  exports2.DidCloseNotebookDocumentNotification = exports2.DidSaveNotebookDocumentNotification = exports2.DidChangeNotebookDocumentNotification = exports2.NotebookCellArrayChange = exports2.DidOpenNotebookDocumentNotification = exports2.NotebookDocumentSyncRegistrationType = exports2.NotebookDocument = exports2.NotebookCell = exports2.ExecutionSummary = exports2.NotebookCellKind = void 0;
5155
5436
  var vscode_languageserver_types_1 = (init_main(), __toCommonJS(main_exports));
5156
- var Is2 = require_is2();
5437
+ var Is2 = require_is3();
5157
5438
  var messages_1 = require_messages2();
5158
5439
  var NotebookCellKind;
5159
5440
  (function(NotebookCellKind2) {
@@ -5272,8 +5553,8 @@ var require_protocol_notebook = __commonJS({
5272
5553
  })(NotebookCell || (exports2.NotebookCell = NotebookCell = {}));
5273
5554
  var NotebookDocument;
5274
5555
  (function(NotebookDocument2) {
5275
- function create(uri, notebookType, version, cells) {
5276
- return { uri, notebookType, version, cells };
5556
+ function create(uri, notebookType, version2, cells) {
5557
+ return { uri, notebookType, version: version2, cells };
5277
5558
  }
5278
5559
  NotebookDocument2.create = create;
5279
5560
  function is(value) {
@@ -5361,7 +5642,7 @@ var require_protocol = __commonJS({
5361
5642
  exports2.InlineCompletionRequest = exports2.DidCloseNotebookDocumentNotification = exports2.DidSaveNotebookDocumentNotification = exports2.DidChangeNotebookDocumentNotification = exports2.NotebookCellArrayChange = exports2.DidOpenNotebookDocumentNotification = exports2.NotebookDocumentSyncRegistrationType = exports2.NotebookDocument = exports2.NotebookCell = exports2.ExecutionSummary = exports2.NotebookCellKind = exports2.DiagnosticRefreshRequest = exports2.WorkspaceDiagnosticRequest = exports2.DocumentDiagnosticRequest = exports2.DocumentDiagnosticReportKind = exports2.DiagnosticServerCancellationData = exports2.InlayHintRefreshRequest = exports2.InlayHintResolveRequest = exports2.InlayHintRequest = exports2.InlineValueRefreshRequest = exports2.InlineValueRequest = exports2.TypeHierarchySupertypesRequest = exports2.TypeHierarchySubtypesRequest = exports2.TypeHierarchyPrepareRequest = void 0;
5362
5643
  var messages_1 = require_messages2();
5363
5644
  var vscode_languageserver_types_1 = (init_main(), __toCommonJS(main_exports));
5364
- var Is2 = require_is2();
5645
+ var Is2 = require_is3();
5365
5646
  var protocol_implementation_1 = require_protocol_implementation();
5366
5647
  Object.defineProperty(exports2, "ImplementationRequest", { enumerable: true, get: function() {
5367
5648
  return protocol_implementation_1.ImplementationRequest;
@@ -6091,7 +6372,103 @@ var init_node_read_file = __esm({
6091
6372
  }
6092
6373
  });
6093
6374
 
6094
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/index.js
6375
+ // src/auth/env.ts
6376
+ var EMBED_VERSION = true ? "0.4.1" : "0.0.0";
6377
+ var EMBED_SHA = true ? "b28a065" : "unknown";
6378
+
6379
+ // ../browser/dist/diagnostic-row.js
6380
+ var DID_YOU_MEAN_RE = /did you mean ['"]?([^'"?]+)['"]?\??/i;
6381
+ function fromLangiumDiagnostic(diag, file) {
6382
+ return {
6383
+ severity: diag.severity === 2 ? "warning" : "error",
6384
+ code: diagnosticCode(diag),
6385
+ message: diag.message,
6386
+ suggestion: extractSuggestion(diag.message),
6387
+ file,
6388
+ line: (diag.range?.start.line ?? 0) + 1,
6389
+ column: (diag.range?.start.character ?? 0) + 1
6390
+ };
6391
+ }
6392
+ function fromParserError(err, file) {
6393
+ return {
6394
+ severity: "error",
6395
+ code: "parse-error",
6396
+ message: err.message,
6397
+ file,
6398
+ line: err.token?.startLine ?? 1,
6399
+ column: err.token?.startColumn ?? 1
6400
+ };
6401
+ }
6402
+ function fromLexerError(err, file) {
6403
+ return {
6404
+ severity: "error",
6405
+ code: "lex-error",
6406
+ message: err.message,
6407
+ file,
6408
+ line: err.line ?? 1,
6409
+ column: err.column ?? 1
6410
+ };
6411
+ }
6412
+ function fromResolveDiagnostic(diag) {
6413
+ return {
6414
+ severity: diag.severity,
6415
+ code: "include",
6416
+ message: diag.message,
6417
+ file: diag.sourcePath,
6418
+ line: diag.line !== void 0 ? diag.line + 1 : 1,
6419
+ column: 1
6420
+ };
6421
+ }
6422
+ function fromRenderWarning(message, file, severity = "warning") {
6423
+ return {
6424
+ severity,
6425
+ code: "render.warning",
6426
+ message,
6427
+ file,
6428
+ line: 1,
6429
+ column: 1
6430
+ };
6431
+ }
6432
+ function diagnosticCode(diag) {
6433
+ if (typeof diag.code === "string" && diag.code !== "")
6434
+ return diag.code;
6435
+ if (typeof diag.code === "number")
6436
+ return String(diag.code);
6437
+ return inferCodeFromMessage(diag.message);
6438
+ }
6439
+ function inferCodeFromMessage(message) {
6440
+ const lower = message.toLowerCase();
6441
+ if (lower.includes("duplicate identifier"))
6442
+ return "duplicate-identifier";
6443
+ if (lower.includes("unknown reference") || lower.includes("did you mean"))
6444
+ return "unknown-reference";
6445
+ if (lower.includes("circular"))
6446
+ return "circular-dependency";
6447
+ if (lower.includes("requires") && lower.includes("date:"))
6448
+ return "missing-date";
6449
+ if (lower.includes("duration"))
6450
+ return "duration";
6451
+ if (lower.includes("include"))
6452
+ return "include";
6453
+ if (lower.includes("indent"))
6454
+ return "indentation";
6455
+ return "validation";
6456
+ }
6457
+ function extractSuggestion(message) {
6458
+ const match = message.match(DID_YOU_MEAN_RE);
6459
+ return match ? match[1].trim() : void 0;
6460
+ }
6461
+
6462
+ // ../browser/dist/no-op-include-resolver.js
6463
+ var NOWLINE_BROWSER_NOOP_INCLUDE_TAG = "__nowline_browser_noop_include__";
6464
+ async function noOpIncludeReadFile(absPath) {
6465
+ throw new Error(`${NOWLINE_BROWSER_NOOP_INCLUDE_TAG}: include "${absPath}" was skipped \u2014 running in single-file mode.`);
6466
+ }
6467
+ function isNoOpIncludeDiagnosticMessage(message) {
6468
+ return message.includes(NOWLINE_BROWSER_NOOP_INCLUDE_TAG);
6469
+ }
6470
+
6471
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/index.js
6095
6472
  var lib_exports = {};
6096
6473
  __export(lib_exports, {
6097
6474
  AbstractAstReflection: () => AbstractAstReflection,
@@ -6220,7 +6597,7 @@ __export(lib_exports, {
6220
6597
  toDiagnosticSeverity: () => toDiagnosticSeverity
6221
6598
  });
6222
6599
 
6223
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/cst-utils.js
6600
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/cst-utils.js
6224
6601
  var cst_utils_exports = {};
6225
6602
  __export(cst_utils_exports, {
6226
6603
  DefaultNameRegexp: () => DefaultNameRegexp,
@@ -6244,7 +6621,7 @@ __export(cst_utils_exports, {
6244
6621
  tokenToRange: () => tokenToRange
6245
6622
  });
6246
6623
 
6247
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/syntax-tree.js
6624
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/syntax-tree.js
6248
6625
  function isAstNode(obj) {
6249
6626
  return typeof obj === "object" && obj !== null && typeof obj.$type === "string";
6250
6627
  }
@@ -6338,7 +6715,7 @@ function isRootCstNode(node) {
6338
6715
  return isCompositeCstNode(node) && typeof node.fullText === "string";
6339
6716
  }
6340
6717
 
6341
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/stream.js
6718
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/stream.js
6342
6719
  var StreamImpl = class _StreamImpl {
6343
6720
  constructor(startFn, nextFn) {
6344
6721
  this.startFn = startFn;
@@ -6798,7 +7175,7 @@ var Reduction;
6798
7175
  Reduction2.max = max;
6799
7176
  })(Reduction || (Reduction = {}));
6800
7177
 
6801
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/ast-utils.js
7178
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/ast-utils.js
6802
7179
  var ast_utils_exports = {};
6803
7180
  __export(ast_utils_exports, {
6804
7181
  assignMandatoryProperties: () => assignMandatoryProperties,
@@ -7017,7 +7394,7 @@ function copyAstNode(node, buildReference, trace) {
7017
7394
  return copy2;
7018
7395
  }
7019
7396
 
7020
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/languages/generated/ast.js
7397
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/languages/generated/ast.js
7021
7398
  var ast_exports = {};
7022
7399
  __export(ast_exports, {
7023
7400
  AbstractElement: () => AbstractElement,
@@ -8314,7 +8691,7 @@ var LangiumGrammarAstReflection = class extends AbstractAstReflection {
8314
8691
  };
8315
8692
  var reflection = new LangiumGrammarAstReflection();
8316
8693
 
8317
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/cst-utils.js
8694
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/cst-utils.js
8318
8695
  function getDatatypeNode(cstNode) {
8319
8696
  let current = cstNode;
8320
8697
  let found = false;
@@ -8579,7 +8956,7 @@ function getParentChain(node) {
8579
8956
  return chain.reverse();
8580
8957
  }
8581
8958
 
8582
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/grammar-utils.js
8959
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/grammar-utils.js
8583
8960
  var grammar_utils_exports = {};
8584
8961
  __export(grammar_utils_exports, {
8585
8962
  findAssignment: () => findAssignment,
@@ -8609,7 +8986,7 @@ __export(grammar_utils_exports, {
8609
8986
  terminalRegex: () => terminalRegex
8610
8987
  });
8611
8988
 
8612
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/errors.js
8989
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/errors.js
8613
8990
  var ErrorWithLocation = class extends Error {
8614
8991
  constructor(node, message) {
8615
8992
  super(node ? `${message} at ${node.range.start.line}:${node.range.start.character}` : message);
@@ -8624,7 +9001,7 @@ function assertCondition(condition, message = "Error: Condition is violated.") {
8624
9001
  }
8625
9002
  }
8626
9003
 
8627
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/regexp-utils.js
9004
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/regexp-utils.js
8628
9005
  var regexp_utils_exports = {};
8629
9006
  __export(regexp_utils_exports, {
8630
9007
  NEWLINE_REGEXP: () => NEWLINE_REGEXP,
@@ -9524,7 +9901,7 @@ var BaseRegExpVisitor = class {
9524
9901
  }
9525
9902
  };
9526
9903
 
9527
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/regexp-utils.js
9904
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/regexp-utils.js
9528
9905
  var NEWLINE_REGEXP = /\r?\n/gm;
9529
9906
  var regexpParser = new RegExpParser();
9530
9907
  var TerminalRegExpVisitor = class extends BaseRegExpVisitor {
@@ -9771,7 +10148,7 @@ function partialRegExp(regex) {
9771
10148
  return new RegExp(process2(), regex.flags);
9772
10149
  }
9773
10150
 
9774
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/grammar-utils.js
10151
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/grammar-utils.js
9775
10152
  function getEntryRule(grammar) {
9776
10153
  return grammar.rules.find((e) => isParserRule(e) && e.entry);
9777
10154
  }
@@ -10228,7 +10605,7 @@ function withCardinality(regex, options) {
10228
10605
  return regex;
10229
10606
  }
10230
10607
 
10231
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/languages/grammar-config.js
10608
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/languages/grammar-config.js
10232
10609
  function createGrammarConfig(services) {
10233
10610
  const rules = [];
10234
10611
  const grammar = services.Grammar;
@@ -17384,7 +17761,7 @@ function filter(collection, predicate) {
17384
17761
  }
17385
17762
  var filter_default = filter;
17386
17763
 
17387
- // ../../node_modules/.pnpm/chevrotain-allstar@0.4.1_chevrotain@12.0.0/node_modules/chevrotain-allstar/lib/atn.js
17764
+ // ../../node_modules/.pnpm/chevrotain-allstar@0.4.3_chevrotain@12.0.0/node_modules/chevrotain-allstar/lib/atn.js
17388
17765
  function buildATNKey(rule, type, occurrence) {
17389
17766
  return `${rule.name}_${type}_${occurrence}`;
17390
17767
  }
@@ -17751,7 +18128,7 @@ function removeState(atn, state) {
17751
18128
  atn.states.splice(atn.states.indexOf(state), 1);
17752
18129
  }
17753
18130
 
17754
- // ../../node_modules/.pnpm/chevrotain-allstar@0.4.1_chevrotain@12.0.0/node_modules/chevrotain-allstar/lib/dfa.js
18131
+ // ../../node_modules/.pnpm/chevrotain-allstar@0.4.3_chevrotain@12.0.0/node_modules/chevrotain-allstar/lib/dfa.js
17755
18132
  var DFA_ERROR = {};
17756
18133
  var ATNConfigSet = class {
17757
18134
  constructor() {
@@ -18054,7 +18431,7 @@ function reduce(collection, iteratee, accumulator) {
18054
18431
  }
18055
18432
  var reduce_default = reduce;
18056
18433
 
18057
- // ../../node_modules/.pnpm/chevrotain-allstar@0.4.1_chevrotain@12.0.0/node_modules/chevrotain-allstar/lib/all-star-lookahead.js
18434
+ // ../../node_modules/.pnpm/chevrotain-allstar@0.4.3_chevrotain@12.0.0/node_modules/chevrotain-allstar/lib/all-star-lookahead.js
18058
18435
  function createDFACache(startState, decision) {
18059
18436
  const map2 = {};
18060
18437
  return (predicateSet) => {
@@ -18095,9 +18472,10 @@ var PredicateSet = class {
18095
18472
  var EMPTY_PREDICATES = new PredicateSet();
18096
18473
  var LLStarLookaheadStrategy = class extends LLkLookaheadStrategy {
18097
18474
  constructor(options) {
18098
- var _a;
18475
+ var _a, _b;
18099
18476
  super();
18100
18477
  this.logging = (_a = options === null || options === void 0 ? void 0 : options.logging) !== null && _a !== void 0 ? _a : ((message) => console.log(message));
18478
+ this.incomplete = (_b = options === null || options === void 0 ? void 0 : options.incomplete) !== null && _b !== void 0 ? _b : false;
18101
18479
  }
18102
18480
  initialize(options) {
18103
18481
  this.atn = createATN(options.rules);
@@ -18113,6 +18491,7 @@ var LLStarLookaheadStrategy = class extends LLkLookaheadStrategy {
18113
18491
  const { prodOccurrence, rule, hasPredicates, dynamicTokensEnabled } = options;
18114
18492
  const dfas = this.dfas;
18115
18493
  const logging = this.logging;
18494
+ const incomplete = this.incomplete;
18116
18495
  const key = buildATNKey(rule, "Alternation", prodOccurrence);
18117
18496
  const decisionState = this.atn.decisionMap[key];
18118
18497
  const decisionIndex = decisionState.decision;
@@ -18161,12 +18540,12 @@ var LLStarLookaheadStrategy = class extends LLkLookaheadStrategy {
18161
18540
  const gate = orAlts === null || orAlts === void 0 ? void 0 : orAlts[i].GATE;
18162
18541
  predicates.set(i, gate === void 0 || gate.call(this));
18163
18542
  }
18164
- const result = adaptivePredict.call(this, dfas, decisionIndex, predicates, logging);
18543
+ const result = adaptivePredict.call(this, dfas, decisionIndex, predicates, logging, incomplete);
18165
18544
  return typeof result === "number" ? result : void 0;
18166
18545
  };
18167
18546
  } else {
18168
18547
  return function() {
18169
- const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging);
18548
+ const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging, incomplete);
18170
18549
  return typeof result === "number" ? result : void 0;
18171
18550
  };
18172
18551
  }
@@ -18175,6 +18554,7 @@ var LLStarLookaheadStrategy = class extends LLkLookaheadStrategy {
18175
18554
  const { prodOccurrence, rule, prodType, dynamicTokensEnabled } = options;
18176
18555
  const dfas = this.dfas;
18177
18556
  const logging = this.logging;
18557
+ const incomplete = this.incomplete;
18178
18558
  const key = buildATNKey(rule, prodType, prodOccurrence);
18179
18559
  const decisionState = this.atn.decisionMap[key];
18180
18560
  const decisionIndex = decisionState.decision;
@@ -18212,7 +18592,7 @@ var LLStarLookaheadStrategy = class extends LLkLookaheadStrategy {
18212
18592
  }
18213
18593
  }
18214
18594
  return function() {
18215
- const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging);
18595
+ const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging, incomplete);
18216
18596
  return typeof result === "object" ? false : result === 0;
18217
18597
  };
18218
18598
  }
@@ -18252,7 +18632,7 @@ function initATNSimulator(atn) {
18252
18632
  }
18253
18633
  return decisionToDFA;
18254
18634
  }
18255
- function adaptivePredict(dfaCaches, decision, predicateSet, logging) {
18635
+ function adaptivePredict(dfaCaches, decision, predicateSet, logging, incomplete) {
18256
18636
  const dfa = dfaCaches[decision](predicateSet);
18257
18637
  let start = dfa.start;
18258
18638
  if (start === void 0) {
@@ -18260,10 +18640,10 @@ function adaptivePredict(dfaCaches, decision, predicateSet, logging) {
18260
18640
  start = addDFAState(dfa, newDFAState(closure2));
18261
18641
  dfa.start = start;
18262
18642
  }
18263
- const alt = performLookahead.apply(this, [dfa, start, predicateSet, logging]);
18643
+ const alt = performLookahead.apply(this, [dfa, start, predicateSet, logging, incomplete]);
18264
18644
  return alt;
18265
18645
  }
18266
- function performLookahead(dfa, s0, predicateSet, logging) {
18646
+ function performLookahead(dfa, s0, predicateSet, logging, incomplete) {
18267
18647
  let previousD = s0;
18268
18648
  let i = 1;
18269
18649
  const path = [];
@@ -18277,6 +18657,12 @@ function performLookahead(dfa, s0, predicateSet, logging) {
18277
18657
  return buildAdaptivePredictError(path, previousD, t);
18278
18658
  }
18279
18659
  if (d.isAcceptState === true) {
18660
+ if (incomplete === true && tokenMatcher(t, EOF)) {
18661
+ const bestGuess = getBestGuess(previousD, predicateSet);
18662
+ if (bestGuess !== void 0) {
18663
+ return bestGuess;
18664
+ }
18665
+ }
18280
18666
  return d.prediction;
18281
18667
  }
18282
18668
  previousD = d;
@@ -18564,8 +18950,22 @@ function hasStateAssociatedWithOneAlt(altSets) {
18564
18950
  }
18565
18951
  return false;
18566
18952
  }
18953
+ function getBestGuess(state, predicateSet) {
18954
+ let bestAlt = void 0;
18955
+ for (const c of state.configs.elements) {
18956
+ if (predicateSet.is(c.alt) === false || c.state.type === ATN_RULE_STOP) {
18957
+ continue;
18958
+ }
18959
+ if (bestAlt === void 0) {
18960
+ bestAlt = c.alt;
18961
+ } else if (bestAlt !== c.alt) {
18962
+ return void 0;
18963
+ }
18964
+ }
18965
+ return bestAlt;
18966
+ }
18567
18967
 
18568
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/parser/cst-node-builder.js
18968
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/parser/cst-node-builder.js
18569
18969
  init_main();
18570
18970
  var CstNodeBuilder = class {
18571
18971
  constructor() {
@@ -18772,7 +19172,7 @@ var RootCstNodeImpl = class extends CompositeCstNodeImpl {
18772
19172
  }
18773
19173
  };
18774
19174
 
18775
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/parser/langium-parser.js
19175
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/parser/langium-parser.js
18776
19176
  var DatatypeSymbol = /* @__PURE__ */ Symbol("Datatype");
18777
19177
  function isDataTypeNode(node) {
18778
19178
  return node.$type === DatatypeSymbol;
@@ -18780,7 +19180,7 @@ function isDataTypeNode(node) {
18780
19180
  var ruleSuffix = "\u200B";
18781
19181
  var withRuleSuffix = (name) => name.endsWith(ruleSuffix) ? name : name + ruleSuffix;
18782
19182
  var AbstractLangiumParser = class {
18783
- constructor(services) {
19183
+ constructor(services, incomplete) {
18784
19184
  this._unorderedGroups = /* @__PURE__ */ new Map();
18785
19185
  this.allRules = /* @__PURE__ */ new Map();
18786
19186
  this.lexer = services.parser.Lexer;
@@ -18791,13 +19191,13 @@ var AbstractLangiumParser = class {
18791
19191
  ...services.parser.ParserConfig,
18792
19192
  skipValidations: production,
18793
19193
  errorMessageProvider: services.parser.ParserErrorMessageProvider
18794
- }, services.shared.profilers.LangiumProfiler.createTask("parsing", services.LanguageMetaData.languageId));
19194
+ }, incomplete, services.shared.profilers.LangiumProfiler.createTask("parsing", services.LanguageMetaData.languageId));
18795
19195
  } else {
18796
19196
  this.wrapper = new ChevrotainWrapper(tokens, {
18797
19197
  ...services.parser.ParserConfig,
18798
19198
  skipValidations: production,
18799
19199
  errorMessageProvider: services.parser.ParserErrorMessageProvider
18800
- });
19200
+ }, incomplete);
18801
19201
  }
18802
19202
  }
18803
19203
  alternatives(idx, choices) {
@@ -18833,7 +19233,7 @@ var LangiumParser = class extends AbstractLangiumParser {
18833
19233
  return this.stack[this.stack.length - 1];
18834
19234
  }
18835
19235
  constructor(services) {
18836
- super(services);
19236
+ super(services, false);
18837
19237
  this.nodeBuilder = new CstNodeBuilder();
18838
19238
  this.stack = [];
18839
19239
  this.assignmentMap = /* @__PURE__ */ new Map();
@@ -19174,8 +19574,8 @@ var LangiumParserErrorMessageProvider = class extends AbstractParserErrorMessage
19174
19574
  }
19175
19575
  };
19176
19576
  var LangiumCompletionParser = class extends AbstractLangiumParser {
19177
- constructor() {
19178
- super(...arguments);
19577
+ constructor(services) {
19578
+ super(services, true);
19179
19579
  this.tokens = [];
19180
19580
  this.elementStack = [];
19181
19581
  this.lastElementStack = [];
@@ -19272,14 +19672,15 @@ var defaultConfig = {
19272
19672
  errorMessageProvider: new LangiumParserErrorMessageProvider()
19273
19673
  };
19274
19674
  var ChevrotainWrapper = class extends EmbeddedActionsParser {
19275
- constructor(tokens, config2) {
19675
+ constructor(tokens, config2, incomplete) {
19276
19676
  const useDefaultLookahead = config2 && "maxLookahead" in config2;
19277
19677
  super(tokens, {
19278
19678
  ...defaultConfig,
19279
19679
  lookaheadStrategy: useDefaultLookahead ? new LLkLookaheadStrategy({ maxLookahead: config2.maxLookahead }) : new LLStarLookaheadStrategy({
19280
19680
  // If validations are skipped, don't log the lookahead warnings
19281
19681
  logging: config2.skipValidations ? () => {
19282
- } : void 0
19682
+ } : void 0,
19683
+ incomplete
19283
19684
  }),
19284
19685
  ...config2
19285
19686
  });
@@ -19318,8 +19719,8 @@ var ChevrotainWrapper = class extends EmbeddedActionsParser {
19318
19719
  }
19319
19720
  };
19320
19721
  var ProfilerWrapper = class extends ChevrotainWrapper {
19321
- constructor(tokens, config2, task) {
19322
- super(tokens, config2);
19722
+ constructor(tokens, config2, incomplete, task) {
19723
+ super(tokens, config2, incomplete);
19323
19724
  this.task = task;
19324
19725
  }
19325
19726
  rule(rule) {
@@ -19345,7 +19746,7 @@ var ProfilerWrapper = class extends ChevrotainWrapper {
19345
19746
  }
19346
19747
  };
19347
19748
 
19348
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/parser/parser-builder-base.js
19749
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/parser/parser-builder-base.js
19349
19750
  function createParser(grammar, parser, tokens) {
19350
19751
  const parserContext = {
19351
19752
  parser,
@@ -19766,7 +20167,7 @@ function getToken(ctx, name) {
19766
20167
  return token;
19767
20168
  }
19768
20169
 
19769
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/parser/completion-parser-builder.js
20170
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/parser/completion-parser-builder.js
19770
20171
  function createCompletionParser(services) {
19771
20172
  const grammar = services.Grammar;
19772
20173
  const lexer = services.parser.Lexer;
@@ -19776,7 +20177,7 @@ function createCompletionParser(services) {
19776
20177
  return parser;
19777
20178
  }
19778
20179
 
19779
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/parser/langium-parser-builder.js
20180
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/parser/langium-parser-builder.js
19780
20181
  function createLangiumParser(services) {
19781
20182
  const parser = prepareLangiumParser(services);
19782
20183
  parser.finalize();
@@ -19789,7 +20190,7 @@ function prepareLangiumParser(services) {
19789
20190
  return createParser(grammar, parser, lexer.definition);
19790
20191
  }
19791
20192
 
19792
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/parser/token-builder.js
20193
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/parser/token-builder.js
19793
20194
  var DefaultTokenBuilder = class {
19794
20195
  constructor() {
19795
20196
  this.diagnostics = [];
@@ -19872,7 +20273,7 @@ var DefaultTokenBuilder = class {
19872
20273
  }
19873
20274
  };
19874
20275
 
19875
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/parser/value-converter.js
20276
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/parser/value-converter.js
19876
20277
  var DefaultValueConverter = class {
19877
20278
  convert(input, cstNode) {
19878
20279
  let feature = cstNode.grammarSource;
@@ -19978,11 +20379,11 @@ var ValueConverter;
19978
20379
  ValueConverter2.convertBoolean = convertBoolean;
19979
20380
  })(ValueConverter || (ValueConverter = {}));
19980
20381
 
19981
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/cancellation.js
20382
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/cancellation.js
19982
20383
  var cancellation_exports = {};
19983
20384
  __reExport(cancellation_exports, __toESM(require_cancellation(), 1));
19984
20385
 
19985
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/promise-utils.js
20386
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/promise-utils.js
19986
20387
  function delayNextTick() {
19987
20388
  return new Promise((resolve2) => {
19988
20389
  if (typeof setImmediate === "undefined") {
@@ -20036,10 +20437,10 @@ var Deferred = class {
20036
20437
 
20037
20438
  // ../../node_modules/.pnpm/vscode-languageserver-textdocument@1.0.12/node_modules/vscode-languageserver-textdocument/lib/esm/main.js
20038
20439
  var FullTextDocument2 = class _FullTextDocument {
20039
- constructor(uri, languageId, version, content) {
20440
+ constructor(uri, languageId, version2, content) {
20040
20441
  this._uri = uri;
20041
20442
  this._languageId = languageId;
20042
- this._version = version;
20443
+ this._version = version2;
20043
20444
  this._content = content;
20044
20445
  this._lineOffsets = void 0;
20045
20446
  }
@@ -20060,7 +20461,7 @@ var FullTextDocument2 = class _FullTextDocument {
20060
20461
  }
20061
20462
  return this._content;
20062
20463
  }
20063
- update(changes, version) {
20464
+ update(changes, version2) {
20064
20465
  for (const change of changes) {
20065
20466
  if (_FullTextDocument.isIncremental(change)) {
20066
20467
  const range2 = getWellformedRange(change.range);
@@ -20095,7 +20496,7 @@ var FullTextDocument2 = class _FullTextDocument {
20095
20496
  throw new Error("Unknown change event received");
20096
20497
  }
20097
20498
  }
20098
- this._version = version;
20499
+ this._version = version2;
20099
20500
  }
20100
20501
  getLineOffsets() {
20101
20502
  if (this._lineOffsets === void 0) {
@@ -20157,13 +20558,13 @@ var FullTextDocument2 = class _FullTextDocument {
20157
20558
  };
20158
20559
  var TextDocument2;
20159
20560
  (function(TextDocument3) {
20160
- function create(uri, languageId, version, content) {
20161
- return new FullTextDocument2(uri, languageId, version, content);
20561
+ function create(uri, languageId, version2, content) {
20562
+ return new FullTextDocument2(uri, languageId, version2, content);
20162
20563
  }
20163
20564
  TextDocument3.create = create;
20164
- function update(document2, changes, version) {
20565
+ function update(document2, changes, version2) {
20165
20566
  if (document2 instanceof FullTextDocument2) {
20166
- document2.update(changes, version);
20567
+ document2.update(changes, version2);
20167
20568
  return document2;
20168
20569
  } else {
20169
20570
  throw new Error("TextDocument.update: document must be created by TextDocument.create");
@@ -20596,7 +20997,7 @@ var LIB;
20596
20997
  })();
20597
20998
  var { URI: URI2, Utils } = LIB;
20598
20999
 
20599
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/uri-utils.js
21000
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/uri-utils.js
20600
21001
  var UriUtils;
20601
21002
  (function(UriUtils2) {
20602
21003
  UriUtils2.basename = Utils.basename;
@@ -20762,7 +21163,7 @@ var UriTrie = class {
20762
21163
  }
20763
21164
  };
20764
21165
 
20765
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/workspace/documents.js
21166
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/workspace/documents.js
20766
21167
  var DocumentState;
20767
21168
  (function(DocumentState2) {
20768
21169
  DocumentState2[DocumentState2["Changed"] = 0] = "Changed";
@@ -20976,7 +21377,7 @@ var DefaultLangiumDocuments = class {
20976
21377
  }
20977
21378
  };
20978
21379
 
20979
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/references/linker.js
21380
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/references/linker.js
20980
21381
  var RefResolving = /* @__PURE__ */ Symbol("RefResolving");
20981
21382
  var DefaultLinker = class {
20982
21383
  constructor(services) {
@@ -21222,7 +21623,7 @@ var DefaultLinker = class {
21222
21623
  }
21223
21624
  };
21224
21625
 
21225
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/references/name-provider.js
21626
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/references/name-provider.js
21226
21627
  function isNamed(node) {
21227
21628
  return typeof node.name === "string";
21228
21629
  }
@@ -21238,7 +21639,7 @@ var DefaultNameProvider = class {
21238
21639
  }
21239
21640
  };
21240
21641
 
21241
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/references/references.js
21642
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/references/references.js
21242
21643
  var DefaultReferences = class {
21243
21644
  constructor(services) {
21244
21645
  this.nameProvider = services.references.NameProvider;
@@ -21347,7 +21748,7 @@ var DefaultReferences = class {
21347
21748
  }
21348
21749
  };
21349
21750
 
21350
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/collections.js
21751
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/collections.js
21351
21752
  var MultiMap = class {
21352
21753
  constructor(elements) {
21353
21754
  this.map = /* @__PURE__ */ new Map();
@@ -21528,7 +21929,7 @@ var BiMap = class {
21528
21929
  }
21529
21930
  };
21530
21931
 
21531
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/references/scope-computation.js
21932
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/references/scope-computation.js
21532
21933
  var DefaultScopeComputation = class {
21533
21934
  constructor(services) {
21534
21935
  this.nameProvider = services.references.NameProvider;
@@ -21594,7 +21995,7 @@ var DefaultScopeComputation = class {
21594
21995
  }
21595
21996
  };
21596
21997
 
21597
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/references/scope.js
21998
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/references/scope.js
21598
21999
  var StreamScope = class {
21599
22000
  constructor(elements, outerScope, options) {
21600
22001
  this.elements = elements;
@@ -21721,7 +22122,7 @@ var EMPTY_SCOPE = {
21721
22122
  }
21722
22123
  };
21723
22124
 
21724
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/caching.js
22125
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/caching.js
21725
22126
  var DisposableCache = class {
21726
22127
  constructor() {
21727
22128
  this.toDispose = [];
@@ -21888,7 +22289,7 @@ var WorkspaceCache = class extends SimpleCache {
21888
22289
  }
21889
22290
  };
21890
22291
 
21891
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/references/scope-provider.js
22292
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/references/scope-provider.js
21892
22293
  var DefaultScopeProvider = class {
21893
22294
  constructor(services) {
21894
22295
  this.reflection = services.shared.AstReflection;
@@ -21944,7 +22345,7 @@ var DefaultScopeProvider = class {
21944
22345
  }
21945
22346
  };
21946
22347
 
21947
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/serializer/json-serializer.js
22348
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/serializer/json-serializer.js
21948
22349
  function isAstNodeWithComment(node) {
21949
22350
  return typeof node.$comment === "string";
21950
22351
  }
@@ -22184,7 +22585,7 @@ var DefaultJsonSerializer = class {
22184
22585
  }
22185
22586
  };
22186
22587
 
22187
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/service-registry.js
22588
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/service-registry.js
22188
22589
  var DefaultServiceRegistry = class {
22189
22590
  /**
22190
22591
  * @deprecated Since 3.1.0. Use the new `fileExtensionMap` (or `languageIdMap`) property instead.
@@ -22252,7 +22653,7 @@ var DefaultServiceRegistry = class {
22252
22653
  }
22253
22654
  };
22254
22655
 
22255
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/validation/validation-registry.js
22656
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/validation/validation-registry.js
22256
22657
  function diagnosticData(code) {
22257
22658
  return { code };
22258
22659
  }
@@ -22393,7 +22794,7 @@ var ValidationRegistry = class {
22393
22794
  }
22394
22795
  };
22395
22796
 
22396
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/validation/document-validator.js
22797
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/validation/document-validator.js
22397
22798
  var VALIDATE_EACH_NODE = Object.freeze({
22398
22799
  validateNode: true,
22399
22800
  validateChildren: true
@@ -22650,7 +23051,7 @@ var DocumentValidator;
22650
23051
  DocumentValidator2.LinkingError = "linking-error";
22651
23052
  })(DocumentValidator || (DocumentValidator = {}));
22652
23053
 
22653
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/workspace/ast-descriptions.js
23054
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/workspace/ast-descriptions.js
22654
23055
  var DefaultAstNodeDescriptionProvider = class {
22655
23056
  constructor(services) {
22656
23057
  this.astNodeLocator = services.workspace.AstNodeLocator;
@@ -22724,7 +23125,7 @@ var DefaultReferenceDescriptionProvider = class {
22724
23125
  }
22725
23126
  };
22726
23127
 
22727
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/workspace/ast-node-locator.js
23128
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/workspace/ast-node-locator.js
22728
23129
  var DefaultAstNodeLocator = class {
22729
23130
  constructor() {
22730
23131
  this.segmentSeparator = "/";
@@ -22766,11 +23167,11 @@ var DefaultAstNodeLocator = class {
22766
23167
  }
22767
23168
  };
22768
23169
 
22769
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/event.js
23170
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/event.js
22770
23171
  var event_exports = {};
22771
23172
  __reExport(event_exports, __toESM(require_events(), 1));
22772
23173
 
22773
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/workspace/configuration.js
23174
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/workspace/configuration.js
22774
23175
  var DefaultConfigurationProvider = class {
22775
23176
  constructor(services) {
22776
23177
  this._ready = new Deferred();
@@ -22846,10 +23247,10 @@ var DefaultConfigurationProvider = class {
22846
23247
  }
22847
23248
  };
22848
23249
 
22849
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/workspace/document-builder.js
23250
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/workspace/document-builder.js
22850
23251
  var import_vscode_languageserver_protocol = __toESM(require_main2(), 1);
22851
23252
 
22852
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/disposable.js
23253
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/disposable.js
22853
23254
  var Disposable;
22854
23255
  (function(Disposable2) {
22855
23256
  function create(callback) {
@@ -22860,7 +23261,7 @@ var Disposable;
22860
23261
  Disposable2.create = create;
22861
23262
  })(Disposable || (Disposable = {}));
22862
23263
 
22863
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/workspace/document-builder.js
23264
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/workspace/document-builder.js
22864
23265
  var DefaultDocumentBuilder = class {
22865
23266
  constructor(services) {
22866
23267
  this.updateBuildOptions = {
@@ -23276,7 +23677,7 @@ var DefaultDocumentBuilder = class {
23276
23677
  }
23277
23678
  };
23278
23679
 
23279
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/workspace/index-manager.js
23680
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/workspace/index-manager.js
23280
23681
  var DefaultIndexManager = class {
23281
23682
  constructor(services) {
23282
23683
  this.symbolIndex = /* @__PURE__ */ new Map();
@@ -23349,7 +23750,7 @@ var DefaultIndexManager = class {
23349
23750
  }
23350
23751
  };
23351
23752
 
23352
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/workspace/workspace-manager.js
23753
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/workspace/workspace-manager.js
23353
23754
  var DefaultWorkspaceManager = class {
23354
23755
  constructor(services) {
23355
23756
  this.initialBuildOptions = {};
@@ -23461,7 +23862,7 @@ var DefaultWorkspaceManager = class {
23461
23862
  }
23462
23863
  };
23463
23864
 
23464
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/parser/lexer.js
23865
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/parser/lexer.js
23465
23866
  var DefaultLexerErrorMessageProvider = class {
23466
23867
  buildUnexpectedCharactersMessage(fullText, startOffset, length, line, column) {
23467
23868
  return defaultLexerErrorProvider.buildUnexpectedCharactersMessage(fullText, startOffset, length, line, column);
@@ -23518,7 +23919,7 @@ function isTokenTypeDictionary(tokenVocabulary) {
23518
23919
  return !isTokenTypeArray(tokenVocabulary) && !isIMultiModeLexerDefinition(tokenVocabulary);
23519
23920
  }
23520
23921
 
23521
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/documentation/jsdoc.js
23922
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/documentation/jsdoc.js
23522
23923
  init_main();
23523
23924
  function parseJSDoc(node, start, options) {
23524
23925
  let opts;
@@ -23987,7 +24388,7 @@ function fillNewlines(text) {
23987
24388
  }
23988
24389
  }
23989
24390
 
23990
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/documentation/documentation-provider.js
24391
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/documentation/documentation-provider.js
23991
24392
  var JSDocDocumentationProvider = class {
23992
24393
  constructor(services) {
23993
24394
  this.indexManager = services.shared.workspace.IndexManager;
@@ -24045,7 +24446,7 @@ var JSDocDocumentationProvider = class {
24045
24446
  }
24046
24447
  };
24047
24448
 
24048
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/documentation/comment-provider.js
24449
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/documentation/comment-provider.js
24049
24450
  var DefaultCommentProvider = class {
24050
24451
  constructor(services) {
24051
24452
  this.grammarConfig = () => services.parser.GrammarConfig;
@@ -24058,7 +24459,7 @@ var DefaultCommentProvider = class {
24058
24459
  }
24059
24460
  };
24060
24461
 
24061
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/parser/async-parser.js
24462
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/parser/async-parser.js
24062
24463
  var DefaultAsyncParser = class {
24063
24464
  constructor(services) {
24064
24465
  this.syncParser = services.parser.LangiumParser;
@@ -24184,7 +24585,7 @@ var ParserWorker = class {
24184
24585
  }
24185
24586
  };
24186
24587
 
24187
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/workspace/workspace-lock.js
24588
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/workspace/workspace-lock.js
24188
24589
  var DefaultWorkspaceLock = class {
24189
24590
  constructor() {
24190
24591
  this.previousTokenSource = new cancellation_exports.CancellationTokenSource();
@@ -24245,7 +24646,7 @@ var DefaultWorkspaceLock = class {
24245
24646
  }
24246
24647
  };
24247
24648
 
24248
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/serializer/hydrator.js
24649
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/serializer/hydrator.js
24249
24650
  var DefaultHydrator = class {
24250
24651
  constructor(services) {
24251
24652
  this.grammarElementIdMap = new BiMap();
@@ -24494,7 +24895,7 @@ var DefaultHydrator = class {
24494
24895
  }
24495
24896
  };
24496
24897
 
24497
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/default-module.js
24898
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/default-module.js
24498
24899
  function createDefaultCoreModule(context) {
24499
24900
  return {
24500
24901
  documentation: {
@@ -24552,7 +24953,7 @@ function createDefaultSharedCoreModule(context) {
24552
24953
  };
24553
24954
  }
24554
24955
 
24555
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/dependency-injection.js
24956
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/dependency-injection.js
24556
24957
  var Module;
24557
24958
  (function(Module2) {
24558
24959
  Module2.merge = (m1, m2) => _merge(_merge({}, m1), m2);
@@ -24636,7 +25037,7 @@ function _merge(target, source) {
24636
25037
  return target;
24637
25038
  }
24638
25039
 
24639
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/parser/indentation-aware.js
25040
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/parser/indentation-aware.js
24640
25041
  var indentationBuilderDefaultOptions = {
24641
25042
  indentTokenName: "INDENT",
24642
25043
  dedentTokenName: "DEDENT",
@@ -24903,7 +25304,7 @@ var IndentationAwareLexer = class extends DefaultLexer {
24903
25304
  }
24904
25305
  };
24905
25306
 
24906
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/index.js
25307
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/index.js
24907
25308
  var utils_exports = {};
24908
25309
  __export(utils_exports, {
24909
25310
  AstUtils: () => ast_utils_exports,
@@ -24942,7 +25343,7 @@ __export(utils_exports, {
24942
25343
  });
24943
25344
  __reExport(utils_exports, event_exports);
24944
25345
 
24945
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/workspace/file-system-provider.js
25346
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/workspace/file-system-provider.js
24946
25347
  var EmptyFileSystemProvider = class {
24947
25348
  stat(_uri) {
24948
25349
  throw new Error("No file system is available.");
@@ -24979,7 +25380,7 @@ var EmptyFileSystem = {
24979
25380
  fileSystemProvider: () => new EmptyFileSystemProvider()
24980
25381
  };
24981
25382
 
24982
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/utils/grammar-loader.js
25383
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/utils/grammar-loader.js
24983
25384
  var minimalGrammarModule = {
24984
25385
  Grammar: () => void 0,
24985
25386
  LanguageMetaData: () => ({
@@ -25004,10 +25405,10 @@ function loadGrammarFromJson(json) {
25004
25405
  return astNode;
25005
25406
  }
25006
25407
 
25007
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/index.js
25408
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/index.js
25008
25409
  __reExport(lib_exports, utils_exports);
25009
25410
 
25010
- // ../../node_modules/.pnpm/langium@4.2.2/node_modules/langium/lib/workspace/profiler.js
25411
+ // ../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/workspace/profiler.js
25011
25412
  var DefaultLangiumProfiler = class {
25012
25413
  constructor(activeCategories) {
25013
25414
  this.activeCategories = /* @__PURE__ */ new Set();
@@ -28386,6 +28787,10 @@ var messages = {
28386
28787
  "NL.E0406": (a) => `Invalid scale "${a.value}". Use a raw duration literal like 1w, 2w, 1q (no name lookup).`,
28387
28788
  "NL.E0407": (a) => `Invalid calendar "${a.value}". Must be business, full, or custom.`,
28388
28789
  "NL.E0408": (a) => `Property "${a.key}" requires at least one reference.`,
28790
+ "NL.E0410": (a) => `"${a.key}:" accepts at most one inline date per direction; collapse the multiple dates to a single binding date or use a declared anchor.`,
28791
+ "NL.E0411": (a) => `Inline date in "${a.key}:" is not allowed on ${a.type}. Allowed only on item, parallel, and group; for a milestone use "date:" instead.`,
28792
+ "NL.E0412": (a) => `Inline date "${a.date}" in "${a.key}:" requires the roadmap to declare "start:". Add start:YYYY-MM-DD to the roadmap.`,
28793
+ "NL.E0413": (a) => `Inline date "${a.date}" in "${a.key}:" is before roadmap start ${a.start}.`,
28389
28794
  // Anchor / milestone / footnote
28390
28795
  "NL.E0500": (a) => `Anchor "${a.name}" requires a "date:" property.`,
28391
28796
  "NL.E0501": (a) => `Anchor "${a.name}" has a date but the roadmap is missing "start:". Add start:YYYY-MM-DD to the roadmap.`,
@@ -28429,6 +28834,10 @@ var messages2 = {
28429
28834
  "NL.E0406": (a) => `\xC9chelle invalide \xAB\xA0${a.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 1w, 2w, 1q (pas de recherche par nom).`,
28430
28835
  "NL.E0407": (a) => `Calendrier invalide \xAB\xA0${a.value}\xA0\xBB. Doit \xEAtre business, full ou custom.`,
28431
28836
  "NL.E0408": (a) => `La propri\xE9t\xE9 \xAB\xA0${a.key}\xA0\xBB exige au moins une r\xE9f\xE9rence.`,
28837
+ "NL.E0410": (a) => `\xAB\xA0${a.key}:\xA0\xBB n'accepte qu'une seule date inline par direction\xA0; regroupez les dates en une seule date contraignante ou utilisez une ancre d\xE9clar\xE9e.`,
28838
+ "NL.E0411": (a) => `Une date inline dans \xAB\xA0${a.key}:\xA0\xBB n'est pas autoris\xE9e sur ${a.type}. Autoris\xE9e seulement sur item, parallel et group\xA0; pour un milestone utilisez \xAB\xA0date:\xA0\xBB \xE0 la place.`,
28839
+ "NL.E0412": (a) => `La date inline \xAB\xA0${a.date}\xA0\xBB dans \xAB\xA0${a.key}:\xA0\xBB exige que la roadmap d\xE9clare \xAB\xA0start:\xA0\xBB. Ajoutez start:AAAA-MM-JJ \xE0 la roadmap.`,
28840
+ "NL.E0413": (a) => `La date inline \xAB\xA0${a.date}\xA0\xBB dans \xAB\xA0${a.key}:\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${a.start}).`,
28432
28841
  // Ancre / jalon / note de bas de page
28433
28842
  "NL.E0500": (a) => `L'ancre \xAB\xA0${a.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0date:\xA0\xBB.`,
28434
28843
  "NL.E0501": (a) => `L'ancre \xAB\xA0${a.name}\xA0\xBB a une date, mais \xAB\xA0start:\xA0\xBB manque sur la roadmap. Ajoutez start:AAAA-MM-JJ \xE0 la roadmap.`,
@@ -28894,7 +29303,13 @@ var BUILTIN_CAPACITY_ICONS = /* @__PURE__ */ new Set([
28894
29303
  "points",
28895
29304
  "time"
28896
29305
  ]);
28897
- var BUILTIN_ICON_NAMES = /* @__PURE__ */ new Set([...BUILTIN_CAPACITY_ICONS, "shield", "warning", "lock"]);
29306
+ var BUILTIN_ICON_NAMES = /* @__PURE__ */ new Set([
29307
+ ...BUILTIN_CAPACITY_ICONS,
29308
+ "shield",
29309
+ "warning",
29310
+ "lock",
29311
+ "calendar"
29312
+ ]);
28898
29313
  var UTILIZATION_NONE = "none";
28899
29314
  var STYLE_PROP_ENUMS = {
28900
29315
  border: /* @__PURE__ */ new Set(["solid", "dashed", "dotted"]),
@@ -29099,6 +29514,9 @@ function resolveLocalStart(file) {
29099
29514
  function displayName(node) {
29100
29515
  return node.name ?? node.title ?? "<unnamed>";
29101
29516
  }
29517
+ function entityTypeLabel(node) {
29518
+ return node.$type.replace(/Declaration$|Block$/, "").toLowerCase();
29519
+ }
29102
29520
  function acceptTr(accept, severity, info, code, ...args) {
29103
29521
  accept(severity, tr("en-US", code, ...args), {
29104
29522
  ...info,
@@ -29117,6 +29535,7 @@ function registerValidationChecks(services) {
29117
29535
  validator.checkRoadmapOnlyKeywordsPosition,
29118
29536
  validator.checkForwardReferences,
29119
29537
  validator.checkReferenceResolution,
29538
+ validator.checkInlineDatePins,
29120
29539
  validator.checkCircularDependencies,
29121
29540
  validator.checkDuplicateSizeIds,
29122
29541
  validator.checkCalendarBlockConsistency,
@@ -29967,6 +30386,12 @@ var NowlineValidator = class {
29967
30386
  // exists — it renders as the bare id. Sequencing properties (`after`,
29968
30387
  // `before`, `on`) stay strict because a phantom dependency silently breaks
29969
30388
  // the timeline / footnote target.
30389
+ //
30390
+ // Inline date literals in `after:` / `before:` (e.g. `after:2026-03-15`)
30391
+ // are intentionally NOT id references — they pin the entity directly to a
30392
+ // calendar date without a named anchor. The DATE_RE check below skips them
30393
+ // here; their own validation (entity-type allowlist, multi-date-per-direction,
30394
+ // roadmap-start: requirements) lives in `checkInlineDatePins` below.
29970
30395
  checkReferenceResolution(file, accept) {
29971
30396
  const declaredIds = collectReferenceableIds(file);
29972
30397
  const visit = (entry) => {
@@ -29978,6 +30403,8 @@ var NowlineValidator = class {
29978
30403
  for (const v of vals) {
29979
30404
  if (!v)
29980
30405
  continue;
30406
+ if ((key === "after" || key === "before") && DATE_RE2.test(v))
30407
+ continue;
29981
30408
  if (!declaredIds.has(v)) {
29982
30409
  accept("error", `${key}: reference "${v}" does not resolve to any declared entity in this file.`, { node: prop });
29983
30410
  }
@@ -29988,6 +30415,79 @@ var NowlineValidator = class {
29988
30415
  visit(entry);
29989
30416
  }
29990
30417
  }
30418
+ // --- Rules 24a/24b/27/28 (inline-date pins on after:/before:) ---
30419
+ // An inline ISO date literal in `after:` or `before:` pins the entity
30420
+ // directly to a calendar position without a named `anchor` declaration
30421
+ // (see specs/dsl.md "Inline date pins"). This check enforces:
30422
+ // - 24a: inline date allowed only on item / parallel / group
30423
+ // - 24b: at most one inline date per direction (per `after:` / `before:`)
30424
+ // - 27: file with any inline date requires roadmap `start:`
30425
+ // - 28: every inline date must be on or after roadmap `start:`
30426
+ //
30427
+ // Cycle detection (`checkCircularDependencies`) skips dates entirely —
30428
+ // they are not graph nodes — so this is the only validator that touches
30429
+ // their date semantics. The grammar's DATE_LITERAL terminal already
30430
+ // enforces the YYYY-MM-DD shape; we only need to verify calendar validity
30431
+ // for the start: comparison.
30432
+ checkInlineDatePins(file, accept) {
30433
+ const start = resolveLocalStart(file);
30434
+ const visit = (entry) => {
30435
+ const props = entry.properties ?? [];
30436
+ const allowed = isItemDeclaration(entry) || isParallelBlock(entry) || isGroupBlock(entry);
30437
+ for (const prop of props) {
30438
+ const key = propKey(prop);
30439
+ if (key !== "after" && key !== "before")
30440
+ continue;
30441
+ const vals = prop.value ? [prop.value] : prop.values;
30442
+ const dateVals = vals.filter((v) => !!v && DATE_RE2.test(v));
30443
+ if (dateVals.length === 0)
30444
+ continue;
30445
+ if (!allowed) {
30446
+ acceptTr(accept, "error", { node: prop }, "NL.E0411", {
30447
+ key,
30448
+ type: entityTypeLabel(entry)
30449
+ });
30450
+ continue;
30451
+ }
30452
+ if (dateVals.length > 1) {
30453
+ acceptTr(accept, "error", { node: prop }, "NL.E0410", { key });
30454
+ }
30455
+ for (const dateVal of dateVals) {
30456
+ switch (start.kind) {
30457
+ case "invalid":
30458
+ continue;
30459
+ case "missing":
30460
+ acceptTr(accept, "error", { node: prop }, "NL.E0412", {
30461
+ key,
30462
+ date: dateVal
30463
+ });
30464
+ continue;
30465
+ case "valid": {
30466
+ const d = new Date(dateVal);
30467
+ if (Number.isNaN(d.getTime()))
30468
+ continue;
30469
+ if (d < start.date) {
30470
+ acceptTr(accept, "error", { node: prop }, "NL.E0413", {
30471
+ key,
30472
+ date: dateVal,
30473
+ start: start.iso
30474
+ });
30475
+ }
30476
+ }
30477
+ }
30478
+ }
30479
+ }
30480
+ if (isSwimlaneDeclaration(entry)) {
30481
+ for (const c of entry.content)
30482
+ visit(c);
30483
+ } else if (isParallelBlock(entry) || isGroupBlock(entry)) {
30484
+ for (const c of entry.content)
30485
+ visit(c);
30486
+ }
30487
+ };
30488
+ for (const entry of file.roadmapEntries)
30489
+ visit(entry);
30490
+ }
29991
30491
  // --- Rule 25: circular dependencies in after/before graph ---
29992
30492
  checkCircularDependencies(file, accept) {
29993
30493
  const deps = /* @__PURE__ */ new Map();
@@ -30003,14 +30503,22 @@ var NowlineValidator = class {
30003
30503
  const key = propKey(prop);
30004
30504
  if (key === "after") {
30005
30505
  const refs = prop.value ? [prop.value] : prop.values;
30006
- for (const r of refs)
30007
- if (r)
30008
- addDep(idName, r);
30506
+ for (const r of refs) {
30507
+ if (!r)
30508
+ continue;
30509
+ if (DATE_RE2.test(r))
30510
+ continue;
30511
+ addDep(idName, r);
30512
+ }
30009
30513
  } else if (key === "before") {
30010
30514
  const refs = prop.value ? [prop.value] : prop.values;
30011
- for (const r of refs)
30012
- if (r)
30013
- addDep(r, idName);
30515
+ for (const r of refs) {
30516
+ if (!r)
30517
+ continue;
30518
+ if (DATE_RE2.test(r))
30519
+ continue;
30520
+ addDep(r, idName);
30521
+ }
30014
30522
  }
30015
30523
  }
30016
30524
  void file2;
@@ -30590,6 +31098,12 @@ var ITEM_DECORATION_SPILL_GAP_PX = 4;
30590
31098
  var MIN_BAR_WIDTH_FOR_DOT_PX = ITEM_STATUS_DOT_INSET_RIGHT_PX + ITEM_STATUS_DOT_RADIUS_PX;
30591
31099
  var MIN_BAR_WIDTH_FOR_LINK_AND_DOT_PX = ITEM_LINK_ICON_INSET_PX + ITEM_LINK_ICON_TILE_SIZE_PX + ITEM_DECORATION_SPILL_GAP_PX + ITEM_STATUS_DOT_INSET_RIGHT_PX + ITEM_STATUS_DOT_RADIUS_PX;
30592
31100
  var MIN_BAR_WIDTH_FOR_FOOTNOTE_PX = ITEM_FOOTNOTE_INDICATOR_INSET_RIGHT_PX + 1;
31101
+ var INLINE_DATE_GLYPH_TILE_SIZE_PX = 12;
31102
+ var INLINE_DATE_GLYPH_INSET_LEFT_PX = 6;
31103
+ var INLINE_DATE_GLYPH_INSET_RIGHT_PX = 6;
31104
+ var INLINE_DATE_GLYPH_INSET_TOP_PX = 5;
31105
+ var INLINE_DATE_GLYPH_GAP_PX = ITEM_DECORATION_SPILL_GAP_PX;
31106
+ var MIN_BAR_WIDTH_FOR_INLINE_DATE_PX = INLINE_DATE_GLYPH_INSET_LEFT_PX + INLINE_DATE_GLYPH_TILE_SIZE_PX + INLINE_DATE_GLYPH_GAP_PX + INLINE_DATE_GLYPH_TILE_SIZE_PX + INLINE_DATE_GLYPH_INSET_RIGHT_PX;
30593
31107
  var LABEL_CHIP_HEIGHT_PX = 13;
30594
31108
  var LABEL_CHIP_GAP_ABOVE_PROGRESS_STRIP_PX = 3;
30595
31109
  var LABEL_CHIP_GAP_BETWEEN_PX = 4;
@@ -31113,6 +31627,92 @@ function normalizeTag(locale2) {
31113
31627
  }).join("-");
31114
31628
  }
31115
31629
 
31630
+ // ../layout/dist/inline-date-pin-geometry.js
31631
+ function computeItemInlineDatePins(opts) {
31632
+ const { box, afterDate, beforeDate, hasLinkIcon, footnoteCount } = opts;
31633
+ if (!afterDate && !beforeDate)
31634
+ return [];
31635
+ const pins = [];
31636
+ const tileSize = INLINE_DATE_GLYPH_TILE_SIZE_PX;
31637
+ const topY = box.y + INLINE_DATE_GLYPH_INSET_TOP_PX;
31638
+ const spilled = box.width < MIN_BAR_WIDTH_FOR_INLINE_DATE_PX;
31639
+ if (afterDate) {
31640
+ const insideLeftX = hasLinkIcon ? box.x + ITEM_LINK_ICON_INSET_PX + ITEM_LINK_ICON_TILE_SIZE_PX + INLINE_DATE_GLYPH_GAP_PX : box.x + INLINE_DATE_GLYPH_INSET_LEFT_PX;
31641
+ const glyphLeft = spilled ? {
31642
+ x: box.x - ITEM_CAPTION_SPILL_GAP_PX - tileSize,
31643
+ y: topY
31644
+ } : { x: insideLeftX, y: topY };
31645
+ pins.push({
31646
+ side: "after",
31647
+ isoDate: afterDate,
31648
+ glyphTopLeft: glyphLeft,
31649
+ glyphSize: tileSize,
31650
+ spilled
31651
+ });
31652
+ }
31653
+ if (beforeDate) {
31654
+ const rightEdge = box.x + box.width;
31655
+ let anchorRightX;
31656
+ if (footnoteCount > 0) {
31657
+ const leftmostFootnoteCenter = rightEdge - ITEM_FOOTNOTE_INDICATOR_INSET_RIGHT_PX - (footnoteCount - 1) * ITEM_FOOTNOTE_INDICATOR_STEP_PX;
31658
+ anchorRightX = leftmostFootnoteCenter - INLINE_DATE_GLYPH_GAP_PX;
31659
+ } else {
31660
+ const dotLeftEdge = rightEdge - ITEM_STATUS_DOT_INSET_RIGHT_PX - ITEM_STATUS_DOT_RADIUS_PX;
31661
+ anchorRightX = dotLeftEdge - INLINE_DATE_GLYPH_GAP_PX;
31662
+ }
31663
+ const insideRightX = anchorRightX - tileSize;
31664
+ const glyphLeft = spilled ? {
31665
+ x: rightEdge + ITEM_CAPTION_SPILL_GAP_PX,
31666
+ y: topY
31667
+ } : { x: insideRightX, y: topY };
31668
+ pins.push({
31669
+ side: "before",
31670
+ isoDate: beforeDate,
31671
+ glyphTopLeft: glyphLeft,
31672
+ glyphSize: tileSize,
31673
+ spilled
31674
+ });
31675
+ }
31676
+ return pins;
31677
+ }
31678
+ function computeContainerInlineDatePins(opts) {
31679
+ const { box, afterDate, beforeDate } = opts;
31680
+ if (!afterDate && !beforeDate)
31681
+ return [];
31682
+ const pins = [];
31683
+ const tileSize = INLINE_DATE_GLYPH_TILE_SIZE_PX;
31684
+ const topY = box.y + INLINE_DATE_GLYPH_INSET_TOP_PX;
31685
+ if (afterDate) {
31686
+ pins.push({
31687
+ side: "after",
31688
+ isoDate: afterDate,
31689
+ glyphTopLeft: { x: box.x + INLINE_DATE_GLYPH_INSET_LEFT_PX, y: topY },
31690
+ glyphSize: tileSize,
31691
+ spilled: false
31692
+ });
31693
+ }
31694
+ if (beforeDate) {
31695
+ pins.push({
31696
+ side: "before",
31697
+ isoDate: beforeDate,
31698
+ glyphTopLeft: {
31699
+ x: box.x + box.width - INLINE_DATE_GLYPH_INSET_RIGHT_PX - tileSize,
31700
+ y: topY
31701
+ },
31702
+ glyphSize: tileSize,
31703
+ spilled: false
31704
+ });
31705
+ }
31706
+ return pins;
31707
+ }
31708
+ function pickInlineDate(values) {
31709
+ for (const v of values) {
31710
+ if (/^\d{4}-\d{2}-\d{2}$/.test(v))
31711
+ return v;
31712
+ }
31713
+ return void 0;
31714
+ }
31715
+
31116
31716
  // ../layout/dist/layout-context.js
31117
31717
  function newCursor(x, y) {
31118
31718
  return { x, y, height: 0, maxX: x };
@@ -32148,13 +32748,19 @@ var GroupNode = class {
32148
32748
  ctx.entityRightEdges.set(id, box.x + box.width);
32149
32749
  }
32150
32750
  ctx.currentFlowKey = previousFlowKey;
32751
+ const inlineDatePins = computeContainerInlineDatePins({
32752
+ box,
32753
+ afterDate: pickInlineDate(propValues(node.properties, "after")),
32754
+ beforeDate: pickInlineDate(propValues(node.properties, "before"))
32755
+ });
32151
32756
  return {
32152
32757
  kind: "group",
32153
32758
  id,
32154
32759
  title,
32155
32760
  box,
32156
32761
  children,
32157
- style
32762
+ style,
32763
+ inlineDatePins: inlineDatePins.length > 0 ? inlineDatePins : void 0
32158
32764
  };
32159
32765
  }
32160
32766
  };
@@ -32268,13 +32874,19 @@ var ParallelNode = class {
32268
32874
  ctx.entityLeftEdges.set(id, box.x);
32269
32875
  ctx.entityRightEdges.set(id, box.x + box.width);
32270
32876
  }
32877
+ const inlineDatePins = computeContainerInlineDatePins({
32878
+ box,
32879
+ afterDate: pickInlineDate(propValues(node.properties, "after")),
32880
+ beforeDate: pickInlineDate(propValues(node.properties, "before"))
32881
+ });
32271
32882
  return {
32272
32883
  kind: "parallel",
32273
32884
  id,
32274
32885
  title: node.title ?? node.name,
32275
32886
  box,
32276
32887
  children,
32277
- style
32888
+ style,
32889
+ inlineDatePins: inlineDatePins.length > 0 ? inlineDatePins : void 0
32278
32890
  };
32279
32891
  }
32280
32892
  };
@@ -35609,7 +36221,7 @@ function sequenceItem(node, cursor, ctx, ownerOverride) {
35609
36221
  const durationDays = deriveItemDurationDays(props, ctx.sizes, ctx.cal);
35610
36222
  const totalEffortDays = deriveTotalEffortDays(props, ctx.sizes, ctx.cal);
35611
36223
  const afterRaw = propValues(props, "after");
35612
- const beforeRaw = propValue(props, "before");
36224
+ const beforeRaw = propValues(props, "before");
35613
36225
  const dateRaw = propValue(props, "date");
35614
36226
  const remainingDays = resolveDuration(propValue(props, "remaining"), ctx.sizes, ctx.cal);
35615
36227
  let startX = cursor.x;
@@ -35621,6 +36233,13 @@ function sequenceItem(node, cursor, ctx, ownerOverride) {
35621
36233
  } else if (afterRaw.length > 0) {
35622
36234
  let maxEnd = cursor.x;
35623
36235
  for (const ref of afterRaw) {
36236
+ const inlineDate = parseDate(ref);
36237
+ if (inlineDate) {
36238
+ const xd = ctx.scale.forwardWithinDomain(inlineDate);
36239
+ if (xd !== null)
36240
+ maxEnd = Math.max(maxEnd, xd);
36241
+ continue;
36242
+ }
35624
36243
  const endX = ctx.entityRightEdges.get(ref);
35625
36244
  if (endX !== void 0)
35626
36245
  maxEnd = Math.max(maxEnd, endX);
@@ -35654,19 +36273,28 @@ function sequenceItem(node, cursor, ctx, ownerOverride) {
35654
36273
  let hasOverflow = false;
35655
36274
  let overflowBox;
35656
36275
  let overflowAnchorId;
35657
- if (beforeRaw) {
35658
- const beforeX = ctx.entityLeftEdges.get(beforeRaw);
35659
- if (beforeX !== void 0) {
35660
- if (logicalRight > beforeX) {
35661
- hasOverflow = true;
35662
- overflowBox = {
35663
- x: beforeX,
35664
- y: cursor.y,
35665
- width: logicalRight - beforeX,
35666
- height: ctx.bandScale.bandwidth()
35667
- };
35668
- overflowAnchorId = beforeRaw;
35669
- }
36276
+ if (beforeRaw.length > 0) {
36277
+ let earliestCapX;
36278
+ let earliestCapRef;
36279
+ for (const ref of beforeRaw) {
36280
+ const inlineDate = parseDate(ref);
36281
+ const capX = inlineDate ? ctx.scale.forwardWithinDomain(inlineDate) ?? void 0 : ctx.entityLeftEdges.get(ref);
36282
+ if (capX === void 0)
36283
+ continue;
36284
+ if (earliestCapX === void 0 || capX < earliestCapX) {
36285
+ earliestCapX = capX;
36286
+ earliestCapRef = ref;
36287
+ }
36288
+ }
36289
+ if (earliestCapX !== void 0 && logicalRight > earliestCapX) {
36290
+ hasOverflow = true;
36291
+ overflowBox = {
36292
+ x: earliestCapX,
36293
+ y: cursor.y,
36294
+ width: logicalRight - earliestCapX,
36295
+ height: ctx.bandScale.bandwidth()
36296
+ };
36297
+ overflowAnchorId = earliestCapRef;
35670
36298
  }
35671
36299
  }
35672
36300
  const statusRaw = propValue(props, "status");
@@ -35878,6 +36506,13 @@ function sequenceItem(node, cursor, ctx, ownerOverride) {
35878
36506
  cursor.x = logicalRight;
35879
36507
  cursor.maxX = Math.max(cursor.maxX, cursor.x);
35880
36508
  cursor.height = Math.max(cursor.height, ctx.bandScale.step() + chipBarExtra);
36509
+ const inlineDatePins = computeItemInlineDatePins({
36510
+ box: itemBox,
36511
+ afterDate: pickInlineDate(afterRaw),
36512
+ beforeDate: pickInlineDate(beforeRaw),
36513
+ hasLinkIcon,
36514
+ footnoteCount: footnoteIndicators.length
36515
+ });
35881
36516
  const result = {
35882
36517
  kind: "item",
35883
36518
  id,
@@ -35907,7 +36542,8 @@ function sequenceItem(node, cursor, ctx, ownerOverride) {
35907
36542
  decorationsRightX,
35908
36543
  capacity,
35909
36544
  size: sizeResolved,
35910
- style
36545
+ style,
36546
+ inlineDatePins: inlineDatePins.length > 0 ? inlineDatePins : void 0
35911
36547
  };
35912
36548
  return result;
35913
36549
  }
@@ -35998,6 +36634,13 @@ function resolveChildStart(props, seqDefault, laneLeftX, ctx) {
35998
36634
  if (afterRefs.length > 0) {
35999
36635
  let maxEnd = laneLeftX;
36000
36636
  for (const ref of afterRefs) {
36637
+ const inlineDate = parseDate(ref);
36638
+ if (inlineDate) {
36639
+ const xd = ctx.scale.forwardWithinDomain(inlineDate);
36640
+ if (xd !== null)
36641
+ maxEnd = Math.max(maxEnd, xd);
36642
+ continue;
36643
+ }
36001
36644
  const endX = ctx.entityRightEdges.get(ref);
36002
36645
  if (endX !== void 0)
36003
36646
  maxEnd = Math.max(maxEnd, endX);
@@ -36091,7 +36734,10 @@ function computeContentEndDay(resolved, ctx, startDate, today) {
36091
36734
  const anchorEnd = /* @__PURE__ */ new Map();
36092
36735
  const milestoneEnd = /* @__PURE__ */ new Map();
36093
36736
  let maxDay = 0;
36094
- const refEndDay = (ref) => {
36737
+ const resolveAfterDay = (ref) => {
36738
+ const inlineDate = parseDate(ref);
36739
+ if (inlineDate)
36740
+ return daysBetween(startDate, inlineDate);
36095
36741
  if (itemEnd.has(ref))
36096
36742
  return itemEnd.get(ref);
36097
36743
  if (anchorEnd.has(ref))
@@ -36130,7 +36776,7 @@ function computeContentEndDay(resolved, ctx, startDate, today) {
36130
36776
  } else if (startProp) {
36131
36777
  start = daysBetween(startDate, startProp);
36132
36778
  } else if (afterRefs.length > 0) {
36133
- start = Math.max(prevEnd, ...afterRefs.map(refEndDay));
36779
+ start = Math.max(prevEnd, ...afterRefs.map(resolveAfterDay));
36134
36780
  }
36135
36781
  const end = start + dur;
36136
36782
  if (node.name)
@@ -36138,17 +36784,21 @@ function computeContentEndDay(resolved, ctx, startDate, today) {
36138
36784
  return end;
36139
36785
  }
36140
36786
  if (isParallelBlock(node)) {
36141
- let parallelEnd = prevEnd;
36787
+ const afterRefs = propValues(node.properties, "after");
36788
+ const containerStart = afterRefs.length > 0 ? Math.max(prevEnd, ...afterRefs.map(resolveAfterDay)) : prevEnd;
36789
+ let parallelEnd = containerStart;
36142
36790
  for (const child of node.content) {
36143
36791
  if (child.$type === "DescriptionDirective")
36144
36792
  continue;
36145
- const childEnd = walkNode(child, prevEnd);
36793
+ const childEnd = walkNode(child, containerStart);
36146
36794
  parallelEnd = Math.max(parallelEnd, childEnd);
36147
36795
  }
36148
36796
  return parallelEnd;
36149
36797
  }
36150
36798
  if (isGroupBlock(node)) {
36151
- return walkLane(node.content, prevEnd);
36799
+ const afterRefs = propValues(node.properties, "after");
36800
+ const containerStart = afterRefs.length > 0 ? Math.max(prevEnd, ...afterRefs.map(resolveAfterDay)) : prevEnd;
36801
+ return walkLane(node.content, containerStart);
36152
36802
  }
36153
36803
  return prevEnd;
36154
36804
  };
@@ -36166,7 +36816,7 @@ function computeContentEndDay(resolved, ctx, startDate, today) {
36166
36816
  }
36167
36817
  const after = propValues(ms.properties, "after");
36168
36818
  if (after.length > 0) {
36169
- const day = Math.max(0, ...after.map(refEndDay));
36819
+ const day = Math.max(0, ...after.map(resolveAfterDay));
36170
36820
  if (ms.name)
36171
36821
  milestoneEnd.set(ms.name, day);
36172
36822
  maxDay = Math.max(maxDay, day);
@@ -36350,6 +37000,19 @@ var CAPACITY_ICON_SVG = {
36350
37000
  ascii: "t"
36351
37001
  }
36352
37002
  };
37003
+ var RENDERER_BUILTIN_ICON_SVG = {
37004
+ // Lucide `calendar` — month grid (rounded rectangle body, two top tabs
37005
+ // for hanger pegs, a horizontal divider for the day-row separator).
37006
+ calendar: {
37007
+ viewBox: "0 0 24 24",
37008
+ body: '<rect x="3" y="4" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="16" x2="16" y1="2" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="8" x2="8" y1="2" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="3" x2="21" y1="10" y2="10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',
37009
+ ascii: "d"
37010
+ }
37011
+ };
37012
+ var BUILTIN_ICON_SVG = {
37013
+ ...CAPACITY_ICON_SVG,
37014
+ ...RENDERER_BUILTIN_ICON_SVG
37015
+ };
36353
37016
  var CAPACITY_ICON_ASCII = {
36354
37017
  none: "",
36355
37018
  multiplier: "x",
@@ -36919,6 +37582,22 @@ function renderItemMetaLine(opts) {
36919
37582
  const iconPart = `<svg x="${num(iconX)}" y="${num(iconY)}" width="${num(iconSize)}" height="${num(iconSize)}" viewBox="${def.viewBox}" style="color:${escAttr(color2)}" aria-hidden="true">${def.body}</svg>`;
36920
37583
  return textPart + iconPart;
36921
37584
  }
37585
+ function renderInlineDatePin(pin, color2) {
37586
+ const def = BUILTIN_ICON_SVG.calendar;
37587
+ const inner = `<svg x="${num(pin.glyphTopLeft.x)}" y="${num(pin.glyphTopLeft.y)}" width="${num(pin.glyphSize)}" height="${num(pin.glyphSize)}" viewBox="${def.viewBox}" style="color:${escAttr(color2)}" aria-hidden="true">${def.body}</svg>`;
37588
+ const titleEl = `<title>${escText(pin.isoDate)}</title>`;
37589
+ return tag("g", {
37590
+ "data-layer": "inline-date-pin",
37591
+ "data-side": pin.side,
37592
+ "data-date": pin.isoDate,
37593
+ "data-spilled": pin.spilled ? "true" : null
37594
+ }, titleEl + inner);
37595
+ }
37596
+ function renderInlineDatePins(pins, color2) {
37597
+ if (!pins || pins.length === 0)
37598
+ return "";
37599
+ return pins.map((pin) => renderInlineDatePin(pin, color2)).join("");
37600
+ }
36922
37601
  function rectFrame(x, y, w, h, style, extra = {}) {
36923
37602
  const rx = Math.min(CORNER_RADIUS_PX[style.cornerRadius] ?? 4, h / 2);
36924
37603
  return tag("rect", {
@@ -37223,6 +37902,7 @@ function renderItem(i, options, idPrefix, palette) {
37223
37902
  r: ITEM_STATUS_DOT_RADIUS_PX,
37224
37903
  fill: dotColor
37225
37904
  }));
37905
+ parts.push(renderInlineDatePins(i.inlineDatePins, i.style.fg));
37226
37906
  let captionX;
37227
37907
  if (i.textSpills) {
37228
37908
  captionX = i.box.x + i.box.width + ITEM_CAPTION_SPILL_GAP_PX;
@@ -37432,6 +38112,7 @@ function renderGroup(g, options, idPrefix, palette) {
37432
38112
  }, g.title));
37433
38113
  }
37434
38114
  }
38115
+ parts.push(renderInlineDatePins(g.inlineDatePins, g.style.fg));
37435
38116
  for (const c of g.children) {
37436
38117
  parts.push(renderTrackChild(c, options, idPrefix, palette));
37437
38118
  }
@@ -37473,6 +38154,7 @@ function renderParallel(p, options, idPrefix, palette) {
37473
38154
  "fill-opacity": 0.7
37474
38155
  }, p.title));
37475
38156
  }
38157
+ parts.push(renderInlineDatePins(p.inlineDatePins, p.style.fg));
37476
38158
  for (const c of p.children) {
37477
38159
  parts.push(renderTrackChild(c, options, idPrefix, palette));
37478
38160
  }
@@ -38041,85 +38723,123 @@ async function renderSvg(model, options = {}) {
38041
38723
  return `<svg${svgAttrs}>${parts.join("")}</svg>`;
38042
38724
  }
38043
38725
 
38044
- // src/no-op-include-resolver.ts
38045
- var NOWLINE_EMBED_NOOP_INCLUDE_TAG = "__nowline_embed_noop_include__";
38046
- async function noOpIncludeReadFile(absPath) {
38047
- throw new Error(
38048
- `${NOWLINE_EMBED_NOOP_INCLUDE_TAG}: include "${absPath}" was skipped \u2014 the embed runs in single-file mode.`
38049
- );
38050
- }
38051
- function isNoOpIncludeDiagnosticMessage(message) {
38052
- return message.includes(NOWLINE_EMBED_NOOP_INCLUDE_TAG);
38053
- }
38054
-
38055
- // src/pipeline.ts
38726
+ // ../browser/dist/pipeline.js
38727
+ var DEFAULT_SYNTHETIC_PATH = "/browser-source.nowline";
38056
38728
  var cachedServices;
38057
38729
  var docCounter = 0;
38058
- var includeWarningEmitted = false;
38059
38730
  function getServices() {
38060
- if (!cachedServices) cachedServices = createNowlineServices();
38731
+ if (!cachedServices)
38732
+ cachedServices = createNowlineServices();
38061
38733
  return cachedServices;
38062
38734
  }
38063
38735
  function freshUri() {
38064
- return URI2.parse(`memory:///nowline-embed-${++docCounter}.nowline`);
38736
+ return URI2.parse(`memory:///nowline-browser-${++docCounter}.nowline`);
38065
38737
  }
38066
- async function parseSource(source) {
38738
+ async function parseSource(source, options = {}) {
38739
+ const filePath = options.filePath ?? DEFAULT_SYNTHETIC_PATH;
38067
38740
  const services = getServices();
38068
38741
  const docFactory = services.shared.workspace.LangiumDocumentFactory;
38069
38742
  const doc = docFactory.fromString(source, freshUri());
38070
38743
  await services.shared.workspace.DocumentBuilder.build([doc], { validation: true });
38071
- const errors = [];
38072
- for (const e of doc.parseResult.lexerErrors) errors.push(e.message);
38073
- for (const e of doc.parseResult.parserErrors) errors.push(e.message);
38074
- for (const d of doc.diagnostics ?? []) {
38075
- if (d.severity === 1) errors.push(d.message);
38744
+ const diagnostics = [];
38745
+ for (const err of doc.parseResult.lexerErrors) {
38746
+ diagnostics.push(fromLexerError(err, filePath));
38747
+ }
38748
+ for (const err of doc.parseResult.parserErrors) {
38749
+ diagnostics.push(fromParserError(err, filePath));
38076
38750
  }
38077
- return { ast: doc.parseResult.value, errors };
38751
+ for (const diag of doc.diagnostics ?? []) {
38752
+ diagnostics.push(fromLangiumDiagnostic(diag, filePath));
38753
+ }
38754
+ return { ast: doc.parseResult.value, diagnostics };
38078
38755
  }
38079
38756
  async function renderSource(source, options = {}) {
38080
- const parsed = await parseSource(source);
38081
- if (parsed.errors.length > 0) {
38082
- throw new EmbedRenderError(
38083
- `Failed to parse Nowline source: ${parsed.errors.join("; ")}`,
38084
- parsed.errors
38085
- );
38757
+ const filePath = options.filePath ?? DEFAULT_SYNTHETIC_PATH;
38758
+ const parsed = await parseSource(source, { filePath });
38759
+ if (parsed.diagnostics.some((d) => d.severity === "error")) {
38760
+ return { kind: "diagnostics", diagnostics: parsed.diagnostics };
38086
38761
  }
38087
38762
  const services = getServices();
38088
- const resolved = await resolveIncludes(parsed.ast, "/embed.nowline", {
38763
+ const readFile = options.readFile ?? noOpIncludeReadFile;
38764
+ const resolved = await resolveIncludes(parsed.ast, filePath, {
38089
38765
  services: services.Nowline,
38090
- readFile: noOpIncludeReadFile
38766
+ readFile
38091
38767
  });
38092
- let sawIncludeWarning = false;
38093
- const blockingErrors = [];
38768
+ const rows = [...parsed.diagnostics];
38094
38769
  for (const diag of resolved.diagnostics) {
38095
- if (diag.severity !== "error") continue;
38096
- if (isNoOpIncludeDiagnosticMessage(diag.message)) {
38097
- sawIncludeWarning = true;
38770
+ if (diag.severity === "error" && isNoOpIncludeDiagnosticMessage(diag.message)) {
38771
+ options.onSkippedInclude?.({
38772
+ sourcePath: diag.sourcePath,
38773
+ message: diag.message
38774
+ });
38098
38775
  continue;
38099
38776
  }
38100
- blockingErrors.push(diag.message);
38101
- }
38102
- if (blockingErrors.length > 0) {
38103
- throw new EmbedRenderError(
38104
- `Failed to resolve Nowline source: ${blockingErrors.join("; ")}`,
38105
- blockingErrors
38106
- );
38777
+ rows.push(fromResolveDiagnostic(diag));
38107
38778
  }
38108
- if (sawIncludeWarning && !includeWarningEmitted) {
38109
- includeWarningEmitted = true;
38110
- console.warn(
38111
- "nowline: `include` directives are skipped in the browser embed (single-file mode). Render multi-file roadmaps with the CLI or the GitHub Action."
38112
- );
38779
+ if (rows.some((r) => r.severity === "error")) {
38780
+ return { kind: "diagnostics", diagnostics: rows };
38113
38781
  }
38782
+ const today = options.today === null ? void 0 : options.today;
38114
38783
  const model = layoutRoadmap(parsed.ast, resolved, {
38115
38784
  theme: options.theme,
38116
- today: options.today,
38785
+ today,
38117
38786
  locale: options.locale,
38118
38787
  width: options.width
38119
38788
  });
38120
- return renderSvg(model, {
38121
- idPrefix: options.idPrefix
38789
+ const showLinks = options.showLinks !== false;
38790
+ const strict = options.strict === true;
38791
+ const warnMessages = [];
38792
+ const svg = await renderSvg(model, {
38793
+ idPrefix: options.idPrefix,
38794
+ assetResolver: options.assetResolver,
38795
+ noLinks: !showLinks,
38796
+ strict,
38797
+ warn: (msg) => warnMessages.push(msg)
38798
+ });
38799
+ const warnings = warnMessages.map((m) => fromRenderWarning(m, filePath, strict ? "error" : "warning"));
38800
+ if (strict && warnings.length > 0) {
38801
+ return { kind: "diagnostics", diagnostics: [...rows, ...warnings] };
38802
+ }
38803
+ return { kind: "svg", svg, warnings };
38804
+ }
38805
+ function __resetBrowserPipelineForTests() {
38806
+ cachedServices = void 0;
38807
+ docCounter = 0;
38808
+ }
38809
+
38810
+ // src/pipeline.ts
38811
+ var EMBED_SOURCE_PATH = "/embed.nowline";
38812
+ var includeWarningEmitted = false;
38813
+ async function parseSource2(source) {
38814
+ const { ast, diagnostics } = await parseSource(source, {
38815
+ filePath: EMBED_SOURCE_PATH
38122
38816
  });
38817
+ return {
38818
+ ast,
38819
+ errors: diagnostics.filter((d) => d.severity === "error").map((d) => d.message)
38820
+ };
38821
+ }
38822
+ async function renderSource2(source, options = {}) {
38823
+ const browserOptions = {
38824
+ filePath: EMBED_SOURCE_PATH,
38825
+ theme: options.theme,
38826
+ today: options.today,
38827
+ locale: options.locale,
38828
+ width: options.width,
38829
+ idPrefix: options.idPrefix,
38830
+ onSkippedInclude: () => {
38831
+ if (!includeWarningEmitted) {
38832
+ includeWarningEmitted = true;
38833
+ console.warn(
38834
+ "nowline: `include` directives are skipped in the browser embed (single-file mode). Render multi-file roadmaps with the CLI or the GitHub Action."
38835
+ );
38836
+ }
38837
+ }
38838
+ };
38839
+ const result = await renderSource(source, browserOptions);
38840
+ if (result.kind === "svg") return result.svg;
38841
+ const messages5 = result.diagnostics.filter((d) => d.severity === "error").map((d) => d.message);
38842
+ throw new EmbedRenderError(`Failed to render Nowline source: ${messages5.join("; ")}`, messages5);
38123
38843
  }
38124
38844
  var EmbedRenderError = class extends Error {
38125
38845
  constructor(message, details) {
@@ -38130,8 +38850,7 @@ var EmbedRenderError = class extends Error {
38130
38850
  };
38131
38851
  function __resetEmbedPipelineForTests() {
38132
38852
  includeWarningEmitted = false;
38133
- cachedServices = void 0;
38134
- docCounter = 0;
38853
+ __resetBrowserPipelineForTests();
38135
38854
  }
38136
38855
 
38137
38856
  // src/auto-scan.ts
@@ -38162,7 +38881,7 @@ async function runAutoScan(inputs) {
38162
38881
  idPrefix
38163
38882
  };
38164
38883
  tasks.push(
38165
- renderSource(source, opts).then(
38884
+ renderSource2(source, opts).then(
38166
38885
  (svg) => {
38167
38886
  replaceWithSvg(target, svg);
38168
38887
  rendered++;
@@ -38211,6 +38930,8 @@ function effectiveTheme(theme, systemTheme) {
38211
38930
  }
38212
38931
 
38213
38932
  // src/index.ts
38933
+ var version = EMBED_VERSION;
38934
+ var sha = EMBED_SHA;
38214
38935
  var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
38215
38936
  var initialConfig = {
38216
38937
  theme: "auto",
@@ -38248,10 +38969,10 @@ async function render(source, options = {}) {
38248
38969
  ...renderOptionsFromConfig(),
38249
38970
  ...options
38250
38971
  };
38251
- return renderSource(source, merged);
38972
+ return renderSource2(source, merged);
38252
38973
  }
38253
38974
  async function parse(source) {
38254
- return parseSource(source);
38975
+ return parseSource2(source);
38255
38976
  }
38256
38977
  async function init(overrides) {
38257
38978
  const inputs = {
@@ -38267,6 +38988,13 @@ async function init(overrides) {
38267
38988
  var run = init;
38268
38989
  if (typeof document !== "undefined" && !autoStartScheduled) {
38269
38990
  autoStartScheduled = true;
38991
+ if (false) {
38992
+ void null.then(({ startDevAuthGate }) => {
38993
+ startDevAuthGate();
38994
+ }).catch((err) => {
38995
+ console.error("[nowline] dev auth gate failed to load:", err);
38996
+ });
38997
+ }
38270
38998
  const start = () => {
38271
38999
  if (!config.startOnLoad) return;
38272
39000
  void init();
@@ -38290,6 +39018,8 @@ export {
38290
39018
  initialize,
38291
39019
  parse,
38292
39020
  render,
38293
- run
39021
+ run,
39022
+ sha,
39023
+ version
38294
39024
  };
38295
39025
  //# sourceMappingURL=nowline.esm.js.map