@nowline/embed 0.0.0-dev.20261007205200.g9919f48 → 0.0.0-dev.20261007205714.g1dd148a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nowline.esm.js +3 -3
- package/dist/nowline.min.js +2 -2
- package/package.json +6 -6
package/dist/nowline.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @nowline/embed 0.0.0-dev.
|
|
1
|
+
/*! @nowline/embed 0.0.0-dev.20261007205714.g1dd148a sha=1dd148a built=2026-10-07T13:56:51-07:00 */
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -42851,8 +42851,8 @@ function effectiveTheme(theme, systemTheme) {
|
|
|
42851
42851
|
}
|
|
42852
42852
|
|
|
42853
42853
|
// src/index.ts
|
|
42854
|
-
var version = true ? "0.0.0-dev.
|
|
42855
|
-
var sha = true ? "
|
|
42854
|
+
var version = true ? "0.0.0-dev.20261007205714.g1dd148a" : "0.0.0";
|
|
42855
|
+
var sha = true ? "1dd148a" : "unknown";
|
|
42856
42856
|
var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
|
|
42857
42857
|
var initialConfig = {
|
|
42858
42858
|
theme: "auto",
|
package/dist/nowline.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @nowline/embed 0.0.0-dev.
|
|
1
|
+
/*! @nowline/embed 0.0.0-dev.20261007205714.g1dd148a sha=1dd148a built=2026-10-07T13:56:51-07:00 */
|
|
2
2
|
"use strict";var nowline=(()=>{var XO=Object.create;var dl=Object.defineProperty;var GO=Object.getOwnPropertyDescriptor;var jO=Object.getOwnPropertyNames;var HO=Object.getPrototypeOf,zO=Object.prototype.hasOwnProperty;var qO=(e,t,n)=>t in e?dl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var c_=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var we=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Eu=(e,t)=>{for(var n in t)dl(e,n,{get:t[n],enumerable:!0})},u_=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jO(t))!zO.call(e,i)&&i!==n&&dl(e,i,{get:()=>t[i],enumerable:!(r=GO(t,i))||r.enumerable});return e};var gm=(e,t,n)=>(n=e!=null?XO(HO(e)):{},u_(t||!e||!e.__esModule?dl(n,"default",{value:e,enumerable:!0}):n,e)),bu=e=>u_(dl({},"__esModule",{value:!0}),e);var I=(e,t,n)=>qO(e,typeof t!="symbol"?t+"":t,n);var ra=we(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.boolean=IB;Xr.string=fR;Xr.number=SB;Xr.error=NB;Xr.func=PB;Xr.array=dR;Xr.stringArray=CB;function IB(e){return e===!0||e===!1}function fR(e){return typeof e=="string"||e instanceof String}function SB(e){return typeof e=="number"||e instanceof Number}function NB(e){return e instanceof Error}function PB(e){return typeof e=="function"}function dR(e){return Array.isArray(e)}function CB(e){return dR(e)&&e.every(t=>fR(t))}});var Qy=we(ce=>{"use strict";var OB=ce&&ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),LB=ce&&ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$B=ce&&ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&OB(n,t,r[i]);return LB(n,t),n}})();Object.defineProperty(ce,"__esModule",{value:!0});ce.Message=ce.NotificationType9=ce.NotificationType8=ce.NotificationType7=ce.NotificationType6=ce.NotificationType5=ce.NotificationType4=ce.NotificationType3=ce.NotificationType2=ce.NotificationType1=ce.NotificationType0=ce.NotificationType=ce.RequestType9=ce.RequestType8=ce.RequestType7=ce.RequestType6=ce.RequestType5=ce.RequestType4=ce.RequestType3=ce.RequestType2=ce.RequestType1=ce.RequestType=ce.RequestType0=ce.AbstractMessageSignature=ce.ParameterStructures=ce.ResponseError=ce.ErrorCodes=void 0;var Mo=$B(ra()),Sy;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(Sy||(ce.ErrorCodes=Sy={}));var Ny=class e extends Error{constructor(n,r,i){super(r);I(this,"code");I(this,"data");this.code=Mo.number(n)?n:Sy.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,e.prototype)}toJson(){let n={code:this.code,message:this.message};return this.data!==void 0&&(n.data=this.data),n}};ce.ResponseError=Ny;var Gn=class Gn{constructor(t){I(this,"kind");this.kind=t}static is(t){return t===Gn.auto||t===Gn.byName||t===Gn.byPosition}toString(){return this.kind}};I(Gn,"auto",new Gn("auto")),I(Gn,"byPosition",new Gn("byPosition")),I(Gn,"byName",new Gn("byName"));var $i=Gn;ce.ParameterStructures=$i;var at=class{constructor(t,n){I(this,"method");I(this,"numberOfParams");this.method=t,this.numberOfParams=n}get parameterStructures(){return $i.auto}};ce.AbstractMessageSignature=at;var Py=class extends at{constructor(n){super(n,0);I(this,"_")}};ce.RequestType0=Py;var Cy=class extends at{constructor(n,r=$i.auto){super(n,1);I(this,"_parameterStructures");I(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ce.RequestType=Cy;var Oy=class extends at{constructor(n,r=$i.auto){super(n,1);I(this,"_parameterStructures");I(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ce.RequestType1=Oy;var Ly=class extends at{constructor(n){super(n,2);I(this,"_")}};ce.RequestType2=Ly;var $y=class extends at{constructor(n){super(n,3);I(this,"_")}};ce.RequestType3=$y;var Dy=class extends at{constructor(n){super(n,4);I(this,"_")}};ce.RequestType4=Dy;var My=class extends at{constructor(n){super(n,5);I(this,"_")}};ce.RequestType5=My;var Fy=class extends at{constructor(n){super(n,6);I(this,"_")}};ce.RequestType6=Fy;var By=class extends at{constructor(n){super(n,7);I(this,"_")}};ce.RequestType7=By;var Uy=class extends at{constructor(n){super(n,8);I(this,"_")}};ce.RequestType8=Uy;var Wy=class extends at{constructor(n){super(n,9);I(this,"_")}};ce.RequestType9=Wy;var Xy=class extends at{constructor(n,r=$i.auto){super(n,1);I(this,"_parameterStructures");I(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ce.NotificationType=Xy;var Gy=class extends at{constructor(n){super(n,0);I(this,"_")}};ce.NotificationType0=Gy;var jy=class extends at{constructor(n,r=$i.auto){super(n,1);I(this,"_parameterStructures");I(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ce.NotificationType1=jy;var Hy=class extends at{constructor(n){super(n,2);I(this,"_")}};ce.NotificationType2=Hy;var zy=class extends at{constructor(n){super(n,3);I(this,"_")}};ce.NotificationType3=zy;var qy=class extends at{constructor(n){super(n,4);I(this,"_")}};ce.NotificationType4=qy;var Vy=class extends at{constructor(n){super(n,5);I(this,"_")}};ce.NotificationType5=Vy;var Yy=class extends at{constructor(n){super(n,6);I(this,"_")}};ce.NotificationType6=Yy;var Ky=class extends at{constructor(n){super(n,7);I(this,"_")}};ce.NotificationType7=Ky;var Zy=class extends at{constructor(n){super(n,8);I(this,"_")}};ce.NotificationType8=Zy;var Jy=class extends at{constructor(n){super(n,9);I(this,"_")}};ce.NotificationType9=Jy;var pR;(function(e){function t(i){let o=i;return o&&Mo.string(o.method)&&(Mo.string(o.id)||Mo.number(o.id))}e.isRequest=t;function n(i){let o=i;return o&&Mo.string(o.method)&&i.id===void 0}e.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(Mo.string(o.id)||Mo.number(o.id)||o.id===null)}e.isResponse=r})(pR||(ce.Message=pR={}))});var tx=we(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.LRUCache=Di.LinkedMap=Di.Touch=void 0;var Xt;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(Xt||(Di.Touch=Xt={}));var hR,Fd=class{constructor(){I(this,hR,"LinkedMap");I(this,"_map");I(this,"_head");I(this,"_tail");I(this,"_size");I(this,"_state");this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=Xt.None){let r=this._map.get(t);if(r)return n!==Xt.None&&this.touch(r,n),r.value}set(t,n,r=Xt.None){let i=this._map.get(t);if(i)i.value=n,r!==Xt.None&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case Xt.None:this.addItemLast(i);break;case Xt.First:this.addItemFirst(i);break;case Xt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(hR=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==Xt.First&&n!==Xt.Last)){if(n===Xt.First){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===Xt.Last){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};Di.LinkedMap=Fd;var ex=class extends Fd{constructor(n,r=1){super();I(this,"_limit");I(this,"_ratio");this._limit=n,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(n){this._limit=n,this.checkTrim()}get ratio(){return this._ratio}set ratio(n){this._ratio=Math.min(Math.max(0,n),1),this.checkTrim()}get(n,r=Xt.AsNew){return super.get(n,r)}peek(n){return super.get(n,Xt.None)}set(n,r){return super.set(n,r,Xt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Di.LRUCache=ex});var gR=we(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.Disposable=void 0;var mR;(function(e){function t(n){return{dispose:n}}e.create=t})(mR||(Bd.Disposable=mR={}))});var Mi=we(ix=>{"use strict";Object.defineProperty(ix,"__esModule",{value:!0});var nx;function rx(){if(nx===void 0)throw new Error("No runtime abstraction layer installed");return nx}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");nx=n}e.install=t})(rx||(rx={}));ix.default=rx});var ia=we(Fi=>{"use strict";var DB=Fi&&Fi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fi,"__esModule",{value:!0});Fi.Emitter=Fi.Event=void 0;var MB=DB(Mi()),yR;(function(e){let t={dispose(){}};e.None=function(){return t}})(yR||(Fi.Event=yR={}));var ox=class{constructor(){I(this,"_callbacks");I(this,"_contexts")}add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===t)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{n.push(r[o].apply(i[o],t))}catch(a){(0,MB.default)().console.error(a)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ud=class Ud{constructor(t){I(this,"_options");I(this,"_event");I(this,"_callbacks");this._options=t}get event(){return this._event||(this._event=(t,n,r)=>{this._callbacks||(this._callbacks=new ox),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),i.dispose=Ud._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};I(Ud,"_noop",function(){});var sx=Ud;Fi.Emitter=sx});var Gd=we(dn=>{"use strict";var FB=dn&&dn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),BB=dn&&dn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),UB=dn&&dn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&FB(n,t,r[i]);return BB(n,t),n}})(),WB=dn&&dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dn,"__esModule",{value:!0});dn.CancellationTokenSource=dn.CancellationToken=void 0;var XB=WB(Mi()),GB=UB(ra()),ax=ia(),Wd;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ax.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ax.Event.None});function t(n){let r=n;return r&&(r===e.None||r===e.Cancelled||GB.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(Wd||(dn.CancellationToken=Wd={}));var jB=Object.freeze(function(e,t){let n=(0,XB.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),Xd=class{constructor(){I(this,"_isCancelled",!1);I(this,"_emitter")}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?jB:(this._emitter||(this._emitter=new ax.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},lx=class{constructor(){I(this,"_token")}get token(){return this._token||(this._token=new Xd),this._token}cancel(){this._token?this._token.cancel():this._token=Wd.Cancelled}dispose(){this._token?this._token instanceof Xd&&this._token.dispose():this._token=Wd.None}};dn.CancellationTokenSource=lx});var xR=we(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.SharedArrayReceiverStrategy=oa.SharedArraySenderStrategy=void 0;var HB=Gd(),Ic;(function(e){e.Continue=0,e.Cancelled=1})(Ic||(Ic={}));var cx=class{constructor(){I(this,"buffers");this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Ic.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,Ic.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};oa.SharedArraySenderStrategy=cx;var ux=class{constructor(t){I(this,"data");this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Ic.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},fx=class{constructor(t){I(this,"token");this.token=new ux(t)}cancel(){}dispose(){}},dx=class{constructor(){I(this,"kind","request")}createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new HB.CancellationTokenSource:new fx(n)}};oa.SharedArrayReceiverStrategy=dx});var hx=we(sa=>{"use strict";var zB=sa&&sa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sa,"__esModule",{value:!0});sa.Semaphore=void 0;var qB=zB(Mi()),px=class{constructor(t=1){I(this,"_capacity");I(this,"_active");I(this,"_waiting");if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,qB.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};sa.Semaphore=px});var vR=we(Gt=>{"use strict";var VB=Gt&&Gt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),YB=Gt&&Gt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),KB=Gt&&Gt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&VB(n,t,r[i]);return YB(n,t),n}})(),ZB=Gt&&Gt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.ReadableStreamMessageReader=Gt.AbstractMessageReader=Gt.MessageReader=void 0;var gx=ZB(Mi()),aa=KB(ra()),mx=ia(),JB=hx(),TR;(function(e){function t(n){let r=n;return r&&aa.func(r.listen)&&aa.func(r.dispose)&&aa.func(r.onError)&&aa.func(r.onClose)&&aa.func(r.onPartialMessage)}e.is=t})(TR||(Gt.MessageReader=TR={}));var jd=class{constructor(){I(this,"errorEmitter");I(this,"closeEmitter");I(this,"partialMessageEmitter");this.errorEmitter=new mx.Emitter,this.closeEmitter=new mx.Emitter,this.partialMessageEmitter=new mx.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${aa.string(t.message)?t.message:"unknown"}`)}};Gt.AbstractMessageReader=jd;var yx;(function(e){function t(n){let r,i,o,s=new Map,a,c=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(o=n.contentDecoder,s.set(o.name,o)),n.contentDecoders!==void 0)for(let l of n.contentDecoders)s.set(l.name,l);if(n.contentTypeDecoder!==void 0&&(a=n.contentTypeDecoder,c.set(a.name,a)),n.contentTypeDecoders!==void 0)for(let l of n.contentTypeDecoders)c.set(l.name,l)}return a===void 0&&(a=(0,gx.default)().applicationJson.decoder,c.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:c}}e.fromOptions=t})(yx||(yx={}));var xx=class extends jd{constructor(n,r){super();I(this,"readable");I(this,"options");I(this,"callback");I(this,"nextMessageLength");I(this,"messageToken");I(this,"buffer");I(this,"partialMessageTimer");I(this,"_partialMessageTimeout");I(this,"readSemaphore");this.readable=n,this.options=yx.fromOptions(r),this.buffer=(0,gx.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new JB.Semaphore(1)}set partialMessageTimeout(n){this._partialMessageTimeout=n}get partialMessageTimeout(){return this._partialMessageTimeout}listen(n){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=n;let r=this.readable.onData(i=>{this.onData(i)});return this.readable.onError(i=>this.fireError(i)),this.readable.onClose(()=>this.fireClose()),r}onData(n){try{for(this.buffer.append(n);;){if(this.nextMessageLength===-1){let i=this.buffer.tryReadHeaders(!0);if(!i)return;let o=i.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property.
|
|
3
3
|
${JSON.stringify(Object.fromEntries(i))}`));return}let s=parseInt(o);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=s}let r=this.buffer.tryReadBody(this.nextMessageLength);if(r===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let i=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(r):r,o=await this.options.contentTypeDecoder.decode(i,this.options);this.callback(o)}).catch(i=>{this.fireError(i)})}}catch(r){this.fireError(r)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,gx.default)().timer.setTimeout((n,r)=>{this.partialMessageTimer=void 0,n===this.messageToken&&(this.firePartialMessage({messageToken:n,waitingTime:r}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Gt.ReadableStreamMessageReader=xx});var AR=we(jt=>{"use strict";var QB=jt&&jt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),eU=jt&&jt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tU=jt&&jt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&QB(n,t,r[i]);return eU(n,t),n}})(),nU=jt&&jt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jt,"__esModule",{value:!0});jt.WriteableStreamMessageWriter=jt.AbstractMessageWriter=jt.MessageWriter=void 0;var wR=nU(Mi()),Sc=tU(ra()),rU=hx(),_R=ia(),iU="Content-Length: ",ER=`\r
|
|
4
4
|
`,bR;(function(e){function t(n){let r=n;return r&&Sc.func(r.dispose)&&Sc.func(r.onClose)&&Sc.func(r.onError)&&Sc.func(r.write)}e.is=t})(bR||(jt.MessageWriter=bR={}));var Hd=class{constructor(){I(this,"errorEmitter");I(this,"closeEmitter");this.errorEmitter=new _R.Emitter,this.closeEmitter=new _R.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,n,r){this.errorEmitter.fire([this.asError(t),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${Sc.string(t.message)?t.message:"unknown"}`)}};jt.AbstractMessageWriter=Hd;var Tx;(function(e){function t(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,wR.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,wR.default)().applicationJson.encoder}}e.fromOptions=t})(Tx||(Tx={}));var vx=class extends Hd{constructor(n,r){super();I(this,"writable");I(this,"options");I(this,"errorCount");I(this,"writeSemaphore");this.writable=n,this.options=Tx.fromOptions(r),this.errorCount=0,this.writeSemaphore=new rU.Semaphore(1),this.writable.onError(i=>this.fireError(i)),this.writable.onClose(()=>this.fireClose())}async write(n){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(n,this.options).then(i=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(i):i).then(i=>{let o=[];return o.push(iU,i.byteLength.toString(),ER),o.push(ER),this.doWrite(n,o,i)},i=>{throw this.fireError(i),i}))}async doWrite(n,r,i){try{return await this.writable.write(r.join(""),"ascii"),this.writable.write(i)}catch(o){return this.handleError(o,n),Promise.reject(o)}}handleError(n,r){this.errorCount++,this.fireError(n,r,this.errorCount)}end(){this.writable.end()}};jt.WriteableStreamMessageWriter=vx});var RR=we(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.AbstractMessageBuffer=void 0;var oU=13,sU=10,aU=`\r
|
|
@@ -2768,5 +2768,5 @@ ${n}`),this.inline?`{${i}}`:i}};function uW(e,t,n){if(e==="linkplain"||e==="link
|
|
|
2768
2768
|
}`));var gW={languageId:"nowline",fileExtensions:[".nowline"],caseInsensitive:!1,mode:"development"},QS={AstReflection:()=>new ru},eN={Grammar:()=>JS(),LanguageMetaData:()=>gW,parser:{}};var tN={item:"an item",group:"a group",parallel:"a parallel block",swimlane:"a swimlane",anchor:"an anchor",milestone:"a milestone","floating-milestone":"a milestone without a date",wave:"a wave",label:"a label",size:"a size",status:"a status",person:"a person",team:"a team",footnote:"a footnote",roadmap:"the roadmap",style:"a style",symbol:"a symbol"},yW={item:"item",group:"group",parallel:"parallel block",swimlane:"swimlane",anchor:"anchor",milestone:"milestone","floating-milestone":"milestone",wave:"wave",label:"label",size:"size",status:"status",person:"person",team:"team",footnote:"footnote",roadmap:"roadmap",style:"style",symbol:"symbol"},Ov=e=>e.charAt(0).toUpperCase()+e.slice(1);function Za(e){return e.kind==="parallel-block"?`the parallel block on line ${e.line}`:e.kind==="group-block"?`the group on line ${e.line}`:`${e.kind} "${e.name}"`}function nN(e){return e.name||e.line===void 0?`"${e.name}"`:Za({kind:e.kind==="parallel"?"parallel-block":"group-block",line:e.line})}function Lv(e,t=!0){if(e.name)return`${e.kind} "${e.name}"`;let n=e.kind==="parallel"?"parallel block":e.kind,r=t?"the ":"";return e.line===void 0?`${r}${n}`:`${r}${n} on line ${e.line}`}function rN(e){return e.name?`${Ov(e.kind)} "${e.name}"`:Ov(Lv(e))}function iN(e){return e===null?"has no start floor":`opens no earlier than ${e}`}function oN(e){return e?e.title===void 0?` Did you mean wave:${e.id}?`:` Did you mean wave:${e.id} ("${e.title}")?`:""}function sN(e){let t=e.slice(0,5).map(r=>`"${r}"`),n=e.length-t.length;return n>0?`${t.join(", ")} and ${n} more`:t.join(", ")}function dh(e){return`[${e.join(", ")}]`}var aN={"NL.E0001":()=>"Config section must appear before roadmap.","NL.E0002":()=>"Include declarations must appear before the config section.","NL.E0003":()=>"Include declarations must appear before the roadmap section.","NL.E0004":()=>"At least one swimlane is required.","NL.E0005":e=>`Line ${e.line}: mixed tabs and spaces in indentation. Use either tabs or spaces consistently.`,"NL.E0100":e=>`Invalid version format "${e.version}". Expected format: v1, v2, etc.`,"NL.E0101":e=>`This file requires Nowline ${e.version}, but the parser only supports up to ${e.supported}.`,"NL.E0102":e=>`Unknown directive property "${e.key}". Allowed: ${e.allowed}.`,"NL.E0103":e=>`Duplicate directive property "${e.key}".`,"NL.E0104":e=>`Invalid locale "${e.value}". Use a BCP-47 tag like "en-US", "fr", or "fr-CA".`,"NL.E0200":e=>`Invalid include mode "${e.value}". Must be merge, ignore, or isolate.`,"NL.E0201":e=>`Duplicate "${e.key}" option on include.`,"NL.E0202":e=>{switch(e.reason){case"mismatch":return`Included "${e.path}" declares waves ${dh(e.child)}, but this file's waves are ${dh(e.parent)}. Every included roadmap must declare the same waves in the same order: copy this file's wave lines into "${e.path}".`;case"child-none":return`Included "${e.path}" declares no waves, but this file's waves are ${dh(e.parent)}. Copy this file's wave lines into "${e.path}" so its work joins the waves.`;case"parent-none":return`Included "${e.path}" declares waves ${dh(e.child)}, but this file declares none. Declare the same waves here so the barriers apply to the whole roadmap.`;case"floor":return`Wave "${e.id}" in "${e.path}" ${iN(e.childFloor)}, but this file's wave "${e.id}" ${iN(e.parentFloor)}. A wave must have the same start floor in every included roadmap.`}},"NL.E0300":e=>`Duplicate identifier "${e.name}". First declared at ${e.location}.`,"NL.E0301":e=>`${e.type} must have an identifier, a title, or both.`,"NL.E0400":e=>`Invalid duration "${e.value}". Use a raw duration literal like 0.5d, 2w, 1m, 2q. Use "size:NAME" to reference a declared size.`,"NL.E0401":e=>`Invalid size "${e.value}". Use the id of a declared size (e.g. xs, m, lg).`,"NL.E0402":e=>`Invalid effort "${e.value}". Use a raw duration literal like 0.5d, 2w, 1m, 2q.`,"NL.E0403":e=>`Invalid remaining value "${e.value}". Use a percentage like 30% or a duration literal like 1w, 0.5d.`,"NL.E0404":e=>`Remaining must be between 0% and 100%, got ${e.value}.`,"NL.E0405":e=>`Invalid ${e.key} "${e.value}". Use ISO 8601 format: YYYY-MM-DD.`,"NL.E0406":e=>`Invalid scale "${e.value}". Use a raw duration literal like 1w, 2w, 1q (no name lookup).`,"NL.E0407":e=>`Invalid calendar "${e.value}". Must be business, full, or custom.`,"NL.E0408":e=>`Property "${e.key}" requires at least one reference.`,"NL.E0410":e=>`"${e.key}:" accepts at most one inline date per direction; collapse the multiple dates to a single binding date or use a declared anchor.`,"NL.E0411":e=>`Inline date in "${e.key}:" is not allowed on ${e.type}. Allowed only on item, parallel, and group, and on a wave's after:; for a milestone use "date:" instead.`,"NL.E0412":e=>`Inline date "${e.date}" in "${e.key}:" requires the roadmap to declare "start:". Add start:YYYY-MM-DD to the roadmap.`,"NL.E0413":e=>`Inline date "${e.date}" in "${e.key}:" is before roadmap start ${e.start}.`,"NL.E0500":e=>`Anchor "${e.name}" requires a "date:" property.`,"NL.E0501":e=>`Anchor "${e.name}" has a date but the roadmap is missing "start:". Add start:YYYY-MM-DD to the roadmap.`,"NL.E0502":e=>`Anchor "${e.name}" date ${e.date} is before roadmap start ${e.start}.`,"NL.E0503":e=>`Milestone "${e.name}" requires at least one of "date:" or "after:".`,"NL.E0504":e=>`Milestone "${e.name}" date ${e.date} is before roadmap start ${e.start}.`,"NL.E0505":()=>'Footnote requires an "on:" property referencing one or more entities.',"NL.E0600":e=>`Item "${e.name}" requires a "size:" or "duration:" property.`,"NL.E0800":e=>`Invalid non-working value "${e.value}". Use hide or show.`,"NL.E0801":e=>`Invalid color "${e.value}" for "${e.key}". Use a named color, hex value, or "none".`,"NL.E0802":e=>`Invalid value "${e.value}" for "${e.key}". Allowed: ${e.allowed}.`,"NL.E0803":e=>`Unknown style property "${e.key}".`,"NL.E0804":e=>`Raw style property "${e.key}" is not allowed on ${e.entity}. Declare a named style in config and reference it via "style:id".`,"NL.E0805":e=>`Symbol id "${e.name}" collides with a built-in icon name. Reserved built-ins: ${e.builtins}.`,"NL.E0806":e=>`Symbol "${e.name}" requires a "unicode:" property (e.g. unicode:"\u{1F4B0}" or unicode:"\\u{1F464}").`,"NL.E0807":e=>`Symbol "${e.name}" unicode: must be a non-empty value.`,"NL.E0808":e=>`Symbol "${e.name}" ascii: must be 1-3 ASCII characters (got ${e.length} character${e.length===1?"":"s"}).`,"NL.E0809":e=>`Unknown symbol property "${e.key}". Allowed: unicode, ascii, link, description.`,"NL.E0810":e=>`Duplicate symbol id "${e.name}". First declared at ${e.location}.`,"NL.E0811":e=>`${e.key}: "${e.value}" is neither a built-in (${e.builtins}) nor a declared symbol. Add "symbol ${e.value} unicode:..." earlier in config or use a quoted Unicode literal.`,"NL.E0812":e=>`${e.key}: symbol "${e.value}" is referenced before its declaration. Move "symbol ${e.value}" above this entry.`,"NL.W0700":e=>`Unknown property "${e.key}" on ${e.entity}. The renderer ignores it.${e.suggested?` Did you mean "${e.suggested}"?`:""}`,"NL.W0701":e=>`Wave "${e.id}" in "${e.path}" differs from this file's definition (${e.fields.map(t=>`${t.field} ${t.there===""?"none":`"${t.there}"`} there, ${t.here===""?"none":`"${t.here}"`} here`).join("; ")}); this file's definition is used.`,"NL.W0702":e=>`"wave:" on ${e.target.kind==="default"?`"default ${e.target.entityType}"`:!e.target.name&&e.target.line!==void 0?`the ${e.target.kind==="parallel"?"parallel block":e.target.kind} on line ${e.target.line}`:`${e.target.kind} "${e.target.name}"`} is ignored: this roadmap declares no waves. Declare waves with "wave <id>" to use it, or remove the property.`,"NL.W0703":e=>`"${e.key}" on "default ${e.entityType}" is ignored: it is a roadmap-only style key. Set it on "default roadmap" instead.`,"NL.E1100":e=>`Wave ${e.title===void 0?`on line ${e.line}`:`"${e.title}"`} needs an explicit identifier so work can reference it with wave:<id>, e.g. wave build "Build".`,"NL.E1101":e=>{switch(e.reason){case"list":return`"wave:" takes exactly one wave id; an item belongs to at most one wave. Got "${e.value}".`;case"unknown":return`Wave "${e.value}" is not declared. Declared waves: ${e.declared.length>0?e.declared.join(", "):"none"}. Add "wave ${e.value}" above the first swimlane that uses it.${oN(e.suggestion)}`;case"forward":return`Wave "${e.value}" is used before its declaration on line ${e.line}. Declare waves above the swimlanes that use them.`;case"not-a-wave":return`"wave:" must name a wave, but "${e.value}" is ${tN[e.kind]}.${oN(e.suggestion)}`}},"NL.E1102":e=>`${Ov(Lv(e.entity))} has wave:${e.wave}, but its enclosing ${Lv(e.container,!1)} has wave:${e.containerWave}. A container's wave applies to everything inside it; remove one of the two wave: properties.`,"NL.E1103":e=>{switch(e.reason){case"sequence":{let t=e.items.length>1,n=`${t?"Items":"Item"} ${e.items.map(i=>`"${i}"`).join(", ")} (wave "${e.itemWave}")`,r=typeof e.ref=="string"?`"${e.ref}"`:Za(e.ref);return`${n} ${t?"come":"comes"} after ${r} (wave "${e.refWave}") in ${Za(e.flow)}. Work in a lane or group runs in order, so it must also be ordered by wave: move ${r} below "${e.last}", or change their waves.`}case"join":return`Item "${e.name}" (wave "${e.wave}") comes after ${Za(e.block)} in ${Za(e.flow)}, and that block cannot end before its track "${e.track}" (wave "${e.trackWave}") does. Move "${e.name}" above the block or into a track of its own, or change one of their waves.`;case"after-item":return e.container?`${rN(e.container)} has after:${e.refId}, but "${e.ref}" is in later wave "${e.refWave}". Wave "${e.refWave}" cannot start until wave "${e.wave}" ends, so "${e.name}" (wave "${e.wave}") inside it could never start: move "${e.name}" to wave "${e.refWave}" or later, or remove the after:.`:`Item "${e.name}" (wave "${e.wave}") has after:${e.refId}, but "${e.ref}" is in later wave "${e.refWave}". Wave "${e.refWave}" cannot start until wave "${e.wave}" ends, so "${e.name}" could never start: move it to wave "${e.refWave}" or later, or remove the after:.`;case"after-wave":return e.container?`${rN(e.container)} (wave "${e.wave}") has after:${e.refId}, but work cannot wait for the end of its own wave or a later one. Use an earlier wave, or move the ${e.container.kind} to a later wave.`:`Item "${e.name}" (wave "${e.wave}") has after:${e.refId}, but work cannot wait for the end of its own wave or a later one. Use an earlier wave, or move "${e.name}" to a later wave.`;case"chain":return`Item "${e.name}" (wave "${e.wave}") could never start: through ${e.chain.join(" \u2192 ")}, it waits for work that cannot start until wave "${e.wave}" has ended. Move "${e.name}" to a later wave, or break the chain.`}},"NL.E1104":e=>{switch(e.reason){case"swimlane":return`"wave:" is not allowed on swimlane "${e.name}": a swimlane spans every wave. Put wave: on its items, or wrap them in "group wave:${e.value}".`;case"milestone":return`"wave:" is not allowed on milestone "${e.name}". To place a milestone at the end of a wave, use after:${e.value}.`;case"other":return`"wave:" is not allowed on ${yW[e.type]} "${e.name}"; only item, group, and parallel can belong to a wave.`}},"NL.E1105":e=>e.reason==="before"?`"before:" is not allowed on wave "${e.name}". A wave's end comes from its items; to give a wave a deadline, add a dated milestone: milestone ${e.name}-due date:<YYYY-MM-DD> after:${e.name}.`:`"${e.key}:" is not allowed on wave "${e.name}". A wave's span comes from its items; only after: (an anchor, a dated milestone, or one ISO date) can hold back a wave's start.`,"NL.E1106":e=>`Wave "${e.name}" has after:${e.ref}, but "${e.ref}" is ${tN[e.kind]}. A wave's after: accepts only anchors, dated milestones, or one ISO date; to make a wave wait for work, put that work in an earlier wave.`,"NL.W1000":e=>`Now-line date ${e.date} is outside the roadmap window (${e.start} \u2013 ${e.end}); it will not be drawn.`,"NL.W1001":e=>`Item "${e.name}" is pinned to ${e.pin} (${e.key}:), but wave "${e.wave}" cannot start until ${e.start}; the item starts at the wave start.`,"NL.W1002":e=>`Wave barriers did not settle after ${e.passes} layout passes, so the drawn schedule may not respect the wave order. The roadmap probably has an ordering conflict that validation did not catch.`,"NL.W1100":e=>{let t=nN(e);return e.reason==="item"?`before:${e.ref} on ${t} can never be met: ${t} is in wave "${e.wave}", which cannot start until "${e.ref}" (wave "${e.refWave}") has finished. The overrun will be painted.`:`before:${e.ref} on ${t} can never be met: ${t} is in wave "${e.wave}", which cannot finish before wave "${e.ref}" starts. The overrun will be painted.`},"NL.W1101":e=>{let t=nN(e);switch(e.reason){case"forward-lane":return`${e.key}:${e.ref} on ${t} refers to "${e.ref}", which is in a later swimlane ("${e.lane}"). Layout places swimlanes in order and ignores references to work it has not placed yet, so it ignores this ${e.key}:. Move swimlane "${e.lane}" above swimlane "${e.ownLane}", or remove the ${e.key}:.`;case"forward-flow":return`${e.key}:${e.ref} on ${t} refers to "${e.ref}", which comes later in ${Za(e.flow)}. Layout ignores references to work it has not placed yet, so it ignores this ${e.key}:. Move "${e.ref}" above ${t}, or remove the ${e.key}:.`;case"ancestor":return`${e.key}:${e.ref} on ${t} refers to "${e.ref}", which contains it. Layout ignores references to an enclosing group or parallel, so it ignores this ${e.key}:. Remove the ${e.key}:.`;case"floating-milestone":return`${e.key}:${e.ref} on ${t} refers to milestone "${e.ref}", which has no date. Floating milestones are placed after all work, so layout ignores this ${e.key}:. Reference the milestone's predecessors or a wave instead.`}},"NL.I1000":e=>`Title on item "${e.name}" is wider than its bar at this scale; it rendered to the right of the bar.`,"NL.I1001":e=>`Label chips on item "${e.name}" did not fit inside the bar; they rendered in a spill column to the right.`,"NL.I1002":e=>`Item "${e.name}" is too narrow to show its marker at this scale; decorations spilled beside the bar.`,"NL.I1003":e=>e.anchor?`Item "${e.name}" extends past its "before:" anchor "${e.anchor}".`:`Item "${e.name}" extends past its "before:" anchor.`,"NL.I1004":e=>`Swimlane "${e.lane}" packed into ${e.rows} rows to avoid overlap.`,"NL.I1005":e=>`Swimlane "${e.lane}" is over capacity in one or more periods (red utilization band).`,"NL.I1006":e=>{switch(e.reason){case"one":return`Wave "${e.name}" has no items, so it spans no time; it is drawn as a marker in the wave strip and listed in the wave legend.`;case"many":return`Waves ${sN(e.names)} have no items, so they span no time; they are drawn as markers in the wave strip and listed in the wave legend.`;case"all":return`None of the declared waves (${sN(e.names)}) has items yet. The wave strip shows a placeholder until work is assigned with wave:<id>.`}},"NL.I1007":e=>`Milestone "${e.name}" (${e.date}) is overrun: wave "${e.wave}" ends ${e.end}.`,"NL.I1008":e=>`Item "${e.name}" is pinned to ${e.pin} (${e.key}:), a non-working day; it starts on ${e.start}.`};var Q=e=>`\xAB\xA0${e}\xA0\xBB`,lN={item:"un \xE9l\xE9ment",group:"un groupe",parallel:"un bloc parall\xE8le",swimlane:"une swimlane",anchor:"une ancre",milestone:"un jalon","floating-milestone":"un jalon sans date",wave:"une vague",label:"une \xE9tiquette",size:"une taille",status:"un statut",person:"une personne",team:"une \xE9quipe",footnote:"une note de bas de page",roadmap:"la roadmap",style:"un style",symbol:"un symbole"},xW={item:"l'\xE9l\xE9ment",group:"le groupe",parallel:"le bloc parall\xE8le",swimlane:"la swimlane",anchor:"l'ancre",milestone:"le jalon","floating-milestone":"le jalon",wave:"la vague",label:"l'\xE9tiquette",size:"la taille",status:"le statut",person:"la personne",team:"l'\xE9quipe",footnote:"la note de bas de page",roadmap:"la roadmap",style:"le style",symbol:"le symbole"},$v=e=>e.charAt(0).toUpperCase()+e.slice(1);function Ja(e){return e.kind==="parallel-block"?`le bloc parall\xE8le \xE0 la ligne ${e.line}`:e.kind==="group-block"?`le groupe \xE0 la ligne ${e.line}`:`${e.kind==="group"?"le groupe":e.kind==="parallel"?"le bloc parall\xE8le":"la swimlane"} ${Q(e.name)}`}function Dv(e,t=!1){if(e.name||e.line===void 0)return t?`de ${Q(e.name)}`:Q(e.name);let n=Ja({kind:e.kind==="parallel"?"parallel-block":"group-block",line:e.line});return t?`du ${n.slice(3)}`:n}function Mv(e){let t=e.kind==="item"?"\xE9l\xE9ment":e.kind==="group"?"groupe":"bloc parall\xE8le",n=e.kind==="item"?"l'":"le ";return e.name?`${n}${t} ${Q(e.name)}`:e.line===void 0?`${n}${t}`:`${n}${t} \xE0 la ligne ${e.line}`}function cN(e){let t=e.kind==="parallel"?"le bloc parall\xE8le":"le groupe";return e.name?`${t} ${Q(e.name)}`:e.line===void 0?t:`${t} \xE0 la ligne ${e.line}`}function uN(e){return e?e.title===void 0?` Vouliez-vous dire wave:${e.id}\xA0?`:` Vouliez-vous dire wave:${e.id} (${Q(e.title)})\xA0?`:""}function fN(e){let t=e.slice(0,5).map(Q),n=e.length-t.length;return n>0?`${t.join(", ")} et ${n} autre${n>1?"s":""}`:t.join(", ")}function ph(e){return`[${e.join(", ")}]`}function dN(e){return e===null?"n'a pas de borne de d\xE9part":`ne s'ouvre pas avant ${e}`}function pN(e){return e===""?"aucun":Q(e)}var TW={title:"titre",style:"style",labels:"\xE9tiquettes",link:"lien",description:"description"},hN={"NL.E0001":()=>"La section config doit pr\xE9c\xE9der la section roadmap.","NL.E0002":()=>"Les d\xE9clarations include doivent pr\xE9c\xE9der la section config.","NL.E0003":()=>"Les d\xE9clarations include doivent pr\xE9c\xE9der la section roadmap.","NL.E0004":()=>"Au moins une swimlane est requise.","NL.E0005":e=>`Ligne ${e.line}\xA0: tabulations et espaces m\xE9lang\xE9s dans l'indentation. Utilisez l'un ou l'autre, mais pas les deux.`,"NL.E0100":e=>`Format de version invalide \xAB\xA0${e.version}\xA0\xBB. Format attendu\xA0: v1, v2, etc.`,"NL.E0101":e=>`Ce fichier requiert Nowline ${e.version}, mais l'analyseur ne prend en charge que jusqu'\xE0 ${e.supported}.`,"NL.E0102":e=>`Propri\xE9t\xE9 de directive inconnue \xAB\xA0${e.key}\xA0\xBB. Valeurs admises\xA0: ${e.allowed}.`,"NL.E0103":e=>`Propri\xE9t\xE9 de directive \xAB\xA0${e.key}\xA0\xBB en double.`,"NL.E0104":e=>`Locale invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez une \xE9tiquette BCP-47 telle que \xAB\xA0en-US\xA0\xBB, \xAB\xA0fr\xA0\xBB ou \xAB\xA0fr-CA\xA0\xBB.`,"NL.E0200":e=>`Mode d'include invalide \xAB\xA0${e.value}\xA0\xBB. Doit \xEAtre merge, ignore ou isolate.`,"NL.E0201":e=>`Option \xAB\xA0${e.key}\xA0\xBB en double sur include.`,"NL.E0202":e=>{switch(e.reason){case"mismatch":return`L'include ${Q(e.path)} d\xE9clare les vagues ${ph(e.child)}, mais celles de ce fichier sont ${ph(e.parent)}. Chaque roadmap incluse doit d\xE9clarer les m\xEAmes vagues dans le m\xEAme ordre\xA0: copiez les lignes wave de ce fichier dans ${Q(e.path)}.`;case"child-none":return`L'include ${Q(e.path)} ne d\xE9clare aucune vague, mais celles de ce fichier sont ${ph(e.parent)}. Copiez les lignes wave de ce fichier dans ${Q(e.path)} pour que son travail rejoigne les vagues.`;case"parent-none":return`L'include ${Q(e.path)} d\xE9clare les vagues ${ph(e.child)}, mais ce fichier n'en d\xE9clare aucune. D\xE9clarez les m\xEAmes vagues ici pour que les barri\xE8res s'appliquent \xE0 toute la roadmap.`;case"floor":return`La vague ${Q(e.id)} dans ${Q(e.path)} ${dN(e.childFloor)}, mais la vague ${Q(e.id)} de ce fichier ${dN(e.parentFloor)}. Une vague doit avoir la m\xEAme borne de d\xE9part dans chaque roadmap incluse.`}},"NL.E0300":e=>`Identifiant en double \xAB\xA0${e.name}\xA0\xBB. Premi\xE8re d\xE9claration \xE0 ${e.location}.`,"NL.E0301":e=>`${e.type} doit comporter un identifiant, un titre, ou les deux.`,"NL.E0400":e=>`Dur\xE9e invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 0.5d, 2w, 1m, 2q. Utilisez \xAB\xA0size:NOM\xA0\xBB pour r\xE9f\xE9rencer une taille d\xE9clar\xE9e.`,"NL.E0401":e=>`Taille invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez l'identifiant d'une taille d\xE9clar\xE9e (p.\xA0ex. xs, m, lg).`,"NL.E0402":e=>`Effort invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 0.5d, 2w, 1m, 2q.`,"NL.E0403":e=>`Valeur restante invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez un pourcentage tel que 30% ou un litt\xE9ral de dur\xE9e comme 1w, 0.5d.`,"NL.E0404":e=>`La valeur restante doit \xEAtre comprise entre 0 % et 100 %, re\xE7u ${e.value}.`,"NL.E0405":e=>`${e.key} invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez le format ISO 8601\xA0: AAAA-MM-JJ.`,"NL.E0406":e=>`\xC9chelle invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 1w, 2w, 1q (pas de recherche par nom).`,"NL.E0407":e=>`Calendrier invalide \xAB\xA0${e.value}\xA0\xBB. Doit \xEAtre business, full ou custom.`,"NL.E0408":e=>`La propri\xE9t\xE9 \xAB\xA0${e.key}\xA0\xBB exige au moins une r\xE9f\xE9rence.`,"NL.E0410":e=>`\xAB\xA0${e.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.`,"NL.E0411":e=>`Une date inline dans \xAB\xA0${e.key}:\xA0\xBB n'est pas autoris\xE9e sur ${e.type}. Autoris\xE9e seulement sur item, parallel et group, et sur le \xAB\xA0after:\xA0\xBB d'une vague\xA0; pour un milestone utilisez \xAB\xA0date:\xA0\xBB \xE0 la place.`,"NL.E0412":e=>`La date inline \xAB\xA0${e.date}\xA0\xBB dans \xAB\xA0${e.key}:\xA0\xBB exige que la roadmap d\xE9clare \xAB\xA0start:\xA0\xBB. Ajoutez start:AAAA-MM-JJ \xE0 la roadmap.`,"NL.E0413":e=>`La date inline \xAB\xA0${e.date}\xA0\xBB dans \xAB\xA0${e.key}:\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${e.start}).`,"NL.E0500":e=>`L'ancre \xAB\xA0${e.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0date:\xA0\xBB.`,"NL.E0501":e=>`L'ancre \xAB\xA0${e.name}\xA0\xBB a une date, mais \xAB\xA0start:\xA0\xBB manque sur la roadmap. Ajoutez start:AAAA-MM-JJ \xE0 la roadmap.`,"NL.E0502":e=>`La date ${e.date} de l'ancre \xAB\xA0${e.name}\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${e.start}).`,"NL.E0503":e=>`Le jalon \xAB\xA0${e.name}\xA0\xBB exige au moins l'une des propri\xE9t\xE9s \xAB\xA0date:\xA0\xBB ou \xAB\xA0after:\xA0\xBB.`,"NL.E0504":e=>`La date ${e.date} du jalon \xAB\xA0${e.name}\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${e.start}).`,"NL.E0505":()=>"Une note de bas de page exige une propri\xE9t\xE9 \xAB\xA0on:\xA0\xBB r\xE9f\xE9ren\xE7ant au moins une entit\xE9.","NL.E0600":e=>`L'\xE9l\xE9ment \xAB\xA0${e.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0size:\xA0\xBB ou \xAB\xA0duration:\xA0\xBB.`,"NL.E0800":e=>`Valeur non-working invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez hide ou show.`,"NL.E0801":e=>`Couleur invalide \xAB\xA0${e.value}\xA0\xBB pour \xAB\xA0${e.key}\xA0\xBB. Utilisez une couleur nomm\xE9e, une valeur hexad\xE9cimale ou \xAB\xA0none\xA0\xBB.`,"NL.E0802":e=>`Valeur invalide \xAB\xA0${e.value}\xA0\xBB pour \xAB\xA0${e.key}\xA0\xBB. Valeurs admises\xA0: ${e.allowed}.`,"NL.E0803":e=>`Propri\xE9t\xE9 de style inconnue \xAB\xA0${e.key}\xA0\xBB.`,"NL.E0804":e=>`La propri\xE9t\xE9 de style brute \xAB\xA0${e.key}\xA0\xBB n'est pas permise sur ${e.entity}. D\xE9clarez un style nomm\xE9 dans la config et r\xE9f\xE9rencez-le avec \xAB\xA0style:id\xA0\xBB.`,"NL.E0805":e=>`L'identifiant de symbole \xAB\xA0${e.name}\xA0\xBB entre en conflit avec le nom d'une ic\xF4ne int\xE9gr\xE9e. Noms r\xE9serv\xE9s\xA0: ${e.builtins}.`,"NL.E0806":e=>`Le symbole \xAB\xA0${e.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0unicode:\xA0\xBB (p.\xA0ex. unicode:"\u{1F4B0}" ou unicode:"\\u{1F464}").`,"NL.E0807":e=>`La propri\xE9t\xE9 \xAB\xA0unicode:\xA0\xBB du symbole \xAB\xA0${e.name}\xA0\xBB doit avoir une valeur non vide.`,"NL.E0808":e=>`La propri\xE9t\xE9 \xAB\xA0ascii:\xA0\xBB du symbole \xAB\xA0${e.name}\xA0\xBB doit compter de 1 \xE0 3 caract\xE8res ASCII (re\xE7u\xA0: ${e.length} caract\xE8re${e.length>1?"s":""}).`,"NL.E0809":e=>`Propri\xE9t\xE9 de symbole inconnue \xAB\xA0${e.key}\xA0\xBB. Valeurs admises\xA0: unicode, ascii, link, description.`,"NL.E0810":e=>`Identifiant de symbole en double \xAB\xA0${e.name}\xA0\xBB. Premi\xE8re d\xE9claration \xE0 ${e.location}.`,"NL.E0811":e=>`${e.key}: \xAB\xA0${e.value}\xA0\xBB n'est ni une ic\xF4ne int\xE9gr\xE9e (${e.builtins}) ni un symbole d\xE9clar\xE9. Ajoutez \xAB\xA0symbol ${e.value} unicode:...\xA0\xBB plus haut dans la config ou utilisez un litt\xE9ral Unicode entre guillemets.`,"NL.E0812":e=>`${e.key}: le symbole \xAB\xA0${e.value}\xA0\xBB est r\xE9f\xE9renc\xE9 avant sa d\xE9claration. D\xE9placez \xAB\xA0symbol ${e.value}\xA0\xBB au-dessus de cette entr\xE9e.`,"NL.W0700":e=>`Propri\xE9t\xE9 inconnue \xAB\xA0${e.key}\xA0\xBB sur ${e.entity}. Le moteur de rendu l'ignore.${e.suggested?` Vouliez-vous dire \xAB\xA0${e.suggested}\xA0\xBB\xA0?`:""}`,"NL.W0701":e=>`La vague ${Q(e.id)} dans ${Q(e.path)} diff\xE8re de la d\xE9finition de ce fichier (${e.fields.map(t=>`${TW[t.field]} ${pN(t.there)} l\xE0-bas, ${pN(t.here)} ici`).join("\xA0; ")})\xA0; la d\xE9finition de ce fichier est utilis\xE9e.`,"NL.W0702":e=>`\xAB\xA0wave:\xA0\xBB sur ${e.target.kind==="default"?Q(`default ${e.target.entityType}`):!e.target.name&&e.target.line!==void 0?e.target.kind==="item"||e.target.kind==="group"||e.target.kind==="parallel"?Mv({kind:e.target.kind,name:"",line:e.target.line}):`${e.target.kind} \xE0 la ligne ${e.target.line}`:`${e.target.kind} ${Q(e.target.name)}`} est ignor\xE9\xA0: cette roadmap ne d\xE9clare aucune vague. D\xE9clarez des vagues avec \xAB\xA0wave <id>\xA0\xBB pour l'utiliser, ou retirez la propri\xE9t\xE9.`,"NL.W0703":e=>`${Q(e.key)} sur ${Q(`default ${e.entityType}`)} est ignor\xE9\xA0: c'est une cl\xE9 de style propre \xE0 la roadmap. D\xE9finissez-la plut\xF4t sur \xAB\xA0default roadmap\xA0\xBB.`,"NL.E1100":e=>`La vague ${e.title===void 0?`\xE0 la ligne ${e.line}`:Q(e.title)} exige un identifiant explicite pour que le travail puisse la r\xE9f\xE9rencer avec wave:<id>, p.\xA0ex. wave build "Build".`,"NL.E1101":e=>{switch(e.reason){case"list":return`\xAB\xA0wave:\xA0\xBB accepte exactement un identifiant de vague\xA0; un \xE9l\xE9ment appartient \xE0 une seule vague au plus. Re\xE7u ${Q(e.value)}.`;case"unknown":return`La vague ${Q(e.value)} n'est pas d\xE9clar\xE9e. Vagues d\xE9clar\xE9es\xA0: ${e.declared.length>0?e.declared.join(", "):"aucune"}. Ajoutez \xAB\xA0wave ${e.value}\xA0\xBB au-dessus de la premi\xE8re swimlane qui l'utilise.${uN(e.suggestion)}`;case"forward":return`La vague ${Q(e.value)} est utilis\xE9e avant sa d\xE9claration \xE0 la ligne ${e.line}. D\xE9clarez les vagues au-dessus des swimlanes qui les utilisent.`;case"not-a-wave":return`\xAB\xA0wave:\xA0\xBB doit nommer une vague, mais ${Q(e.value)} est ${lN[e.kind]}.${uN(e.suggestion)}`}},"NL.E1102":e=>`${$v(Mv(e.entity))} a wave:${e.wave}, mais ${Mv(e.container)} qui le contient a wave:${e.containerWave}. La vague d'un conteneur s'applique \xE0 tout ce qu'il contient\xA0; retirez l'une des deux propri\xE9t\xE9s wave:.`,"NL.E1103":e=>{switch(e.reason){case"sequence":{let t=e.items.length>1,n=`${t?"Les \xE9l\xE9ments":"L'\xE9l\xE9ment"} ${e.items.map(Q).join(", ")} (vague ${Q(e.itemWave)})`,r=typeof e.ref=="string"?Q(e.ref):Ja(e.ref);return`${n} ${t?"viennent":"vient"} apr\xE8s ${r} (vague ${Q(e.refWave)}) dans ${Ja(e.flow)}. Le travail d'une swimlane ou d'un groupe s'ex\xE9cute dans l'ordre, il doit donc aussi \xEAtre ordonn\xE9 par vague\xA0: d\xE9placez ${r} sous ${Q(e.last)}, ou changez leurs vagues.`}case"join":return`L'\xE9l\xE9ment ${Q(e.name)} (vague ${Q(e.wave)}) vient apr\xE8s ${Ja(e.block)} dans ${Ja(e.flow)}, et ce bloc ne peut pas se terminer avant sa piste ${Q(e.track)} (vague ${Q(e.trackWave)}). D\xE9placez ${Q(e.name)} au-dessus du bloc ou dans une piste distincte, ou changez l'une de leurs vagues.`;case"after-item":return e.container?`${$v(cN(e.container))} a after:${e.refId}, mais ${Q(e.ref)} est dans la vague ult\xE9rieure ${Q(e.refWave)}. La vague ${Q(e.refWave)} ne peut pas d\xE9marrer avant la fin de la vague ${Q(e.wave)}, donc ${Q(e.name)} (vague ${Q(e.wave)}) \xE0 l'int\xE9rieur ne pourrait jamais d\xE9marrer\xA0: d\xE9placez ${Q(e.name)} dans la vague ${Q(e.refWave)} ou une vague ult\xE9rieure, ou retirez le after:.`:`L'\xE9l\xE9ment ${Q(e.name)} (vague ${Q(e.wave)}) a after:${e.refId}, mais ${Q(e.ref)} est dans la vague ult\xE9rieure ${Q(e.refWave)}. La vague ${Q(e.refWave)} ne peut pas d\xE9marrer avant la fin de la vague ${Q(e.wave)}, donc ${Q(e.name)} ne pourrait jamais d\xE9marrer\xA0: d\xE9placez-le dans la vague ${Q(e.refWave)} ou une vague ult\xE9rieure, ou retirez le after:.`;case"after-wave":{let t=e.container?.kind==="parallel"?"bloc parall\xE8le":"groupe";return e.container?`${$v(cN(e.container))} (vague ${Q(e.wave)}) a after:${e.refId}, mais le travail ne peut pas attendre la fin de sa propre vague ni d'une vague ult\xE9rieure. Utilisez une vague ant\xE9rieure, ou d\xE9placez le ${t} dans une vague ult\xE9rieure.`:`L'\xE9l\xE9ment ${Q(e.name)} (vague ${Q(e.wave)}) a after:${e.refId}, mais le travail ne peut pas attendre la fin de sa propre vague ni d'une vague ult\xE9rieure. Utilisez une vague ant\xE9rieure, ou d\xE9placez ${Q(e.name)} dans une vague ult\xE9rieure.`}case"chain":return`L'\xE9l\xE9ment ${Q(e.name)} (vague ${Q(e.wave)}) ne pourrait jamais d\xE9marrer\xA0: via ${e.chain.join(" \u2192 ")}, il attend du travail qui ne peut pas d\xE9marrer avant la fin de la vague ${Q(e.wave)}. D\xE9placez ${Q(e.name)} dans une vague ult\xE9rieure, ou rompez la cha\xEEne.`}},"NL.E1104":e=>{switch(e.reason){case"swimlane":return`\xAB\xA0wave:\xA0\xBB n'est pas autoris\xE9 sur la swimlane ${Q(e.name)}\xA0: une swimlane couvre toutes les vagues. Placez wave: sur ses \xE9l\xE9ments, ou regroupez-les dans \xAB\xA0group wave:${e.value}\xA0\xBB.`;case"milestone":return`\xAB\xA0wave:\xA0\xBB n'est pas autoris\xE9 sur le jalon ${Q(e.name)}. Pour placer un jalon \xE0 la fin d'une vague, utilisez after:${e.value}.`;case"other":return`\xAB\xA0wave:\xA0\xBB n'est pas autoris\xE9 sur ${xW[e.type]} ${Q(e.name)}\xA0; seuls item, group et parallel peuvent appartenir \xE0 une vague.`}},"NL.E1105":e=>e.reason==="before"?`\xAB\xA0before:\xA0\xBB n'est pas autoris\xE9 sur la vague ${Q(e.name)}. La fin d'une vague d\xE9coule de ses \xE9l\xE9ments\xA0; pour donner une \xE9ch\xE9ance \xE0 une vague, ajoutez un jalon dat\xE9\xA0: milestone ${e.name}-due date:<AAAA-MM-JJ> after:${e.name}.`:`\xAB\xA0${e.key}:\xA0\xBB n'est pas autoris\xE9 sur la vague ${Q(e.name)}. L'\xE9tendue d'une vague d\xE9coule de ses \xE9l\xE9ments\xA0; seul after: (une ancre, un jalon dat\xE9 ou une date ISO) peut retarder le d\xE9but d'une vague.`,"NL.E1106":e=>`La vague ${Q(e.name)} a after:${e.ref}, mais ${Q(e.ref)} est ${lN[e.kind]}. Le after: d'une vague accepte seulement des ancres, des jalons dat\xE9s ou une date ISO\xA0; pour qu'une vague attende du travail, placez ce travail dans une vague ant\xE9rieure.`,"NL.W1001":e=>`L'\xE9l\xE9ment ${Q(e.name)} est \xE9pingl\xE9 \xE0 ${e.pin} (${e.key}:), mais la vague ${Q(e.wave)} ne peut pas d\xE9marrer avant le ${e.start}\xA0; l'\xE9l\xE9ment d\xE9marre au d\xE9but de la vague.`,"NL.W1002":e=>`Les barri\xE8res de vagues ne se sont pas stabilis\xE9es apr\xE8s ${e.passes} passes de mise en page\xA0; le calendrier dessin\xE9 pourrait donc ne pas respecter l'ordre des vagues. La roadmap comporte probablement un conflit d'ordre que la validation n'a pas d\xE9tect\xE9.`,"NL.W1100":e=>{let t=Dv(e);return e.reason==="item"?`before:${e.ref} sur ${t} ne peut jamais \xEAtre respect\xE9\xA0: ${t} est dans la vague ${Q(e.wave)}, qui ne peut pas d\xE9marrer avant la fin de ${Q(e.ref)} (vague ${Q(e.refWave)}). Le d\xE9passement sera peint.`:`before:${e.ref} sur ${t} ne peut jamais \xEAtre respect\xE9\xA0: ${t} est dans la vague ${Q(e.wave)}, qui ne peut pas se terminer avant le d\xE9but de la vague ${Q(e.ref)}. Le d\xE9passement sera peint.`},"NL.W1101":e=>{let t=Dv(e);switch(e.reason){case"forward-lane":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence ${Q(e.ref)}, qui se trouve dans une swimlane ult\xE9rieure (${Q(e.lane)}). La mise en page place les swimlanes dans l'ordre et ignore les r\xE9f\xE9rences \xE0 du travail qu'elle n'a pas encore plac\xE9, elle ignore donc ce ${e.key}:. D\xE9placez la swimlane ${Q(e.lane)} au-dessus de la swimlane ${Q(e.ownLane)}, ou retirez le ${e.key}:.`;case"forward-flow":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence ${Q(e.ref)}, qui vient plus tard dans ${Ja(e.flow)}. La mise en page ignore les r\xE9f\xE9rences \xE0 du travail qu'elle n'a pas encore plac\xE9, elle ignore donc ce ${e.key}:. D\xE9placez ${Q(e.ref)} au-dessus ${Dv(e,!0)}, ou retirez le ${e.key}:.`;case"ancestor":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence ${Q(e.ref)}, qui le contient. La mise en page ignore les r\xE9f\xE9rences \xE0 un groupe ou un bloc parall\xE8le englobant, elle ignore donc ce ${e.key}:. Retirez le ${e.key}:.`;case"floating-milestone":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence le jalon ${Q(e.ref)}, qui n'a pas de date. Les jalons sans date sont plac\xE9s apr\xE8s tout le travail, la mise en page ignore donc ce ${e.key}:. R\xE9f\xE9rencez plut\xF4t les pr\xE9d\xE9cesseurs du jalon ou une vague.`}},"NL.I1006":e=>{switch(e.reason){case"one":return`La vague ${Q(e.name)} n'a aucun \xE9l\xE9ment, elle ne couvre donc aucune dur\xE9e\xA0; elle est dessin\xE9e comme un rep\xE8re dans la bande des vagues et list\xE9e dans la l\xE9gende des vagues.`;case"many":return`Les vagues ${fN(e.names)} n'ont aucun \xE9l\xE9ment, elles ne couvrent donc aucune dur\xE9e\xA0; elles sont dessin\xE9es comme des rep\xE8res dans la bande des vagues et list\xE9es dans la l\xE9gende des vagues.`;case"all":return`Aucune des vagues d\xE9clar\xE9es (${fN(e.names)}) n'a encore d'\xE9l\xE9ment. La bande des vagues affiche un espace r\xE9serv\xE9 jusqu'\xE0 ce que du travail soit affect\xE9 avec wave:<id>.`}},"NL.I1007":e=>`Le jalon ${Q(e.name)} (${e.date}) est d\xE9pass\xE9\xA0: la vague ${Q(e.wave)} se termine le ${e.end}.`,"NL.I1008":e=>`L'\xE9l\xE9ment ${Q(e.name)} est \xE9pingl\xE9 \xE0 ${e.pin} (${e.key}:), un jour non ouvr\xE9\xA0; il d\xE9marre le ${e.start}.`};var mN={};var gN={};var vW=new Map([["en-US",aN],["fr",hN],["fr-CA",mN],["fr-FR",gN]]);function Vr(e,t,...n){for(let r of wW(e)){let o=vW.get(r)?.[t];if(o)return o(...n)}return t}var yN="en-US";function wW(e){let t=[],n=_W(e);for(;n.length>0;){t.includes(n)||t.push(n);let r=n.lastIndexOf("-");if(r<=0)break;n=n.slice(0,r)}return t.includes(yN)||t.push(yN),t}function _W(e){return e.split("-").map((n,r)=>r===0?n.toLowerCase():/^[a-zA-Z]{2}$/.test(n)?n.toUpperCase():n).join("-")}var EW=/[\\/]/;function vN(e){for(let t=e.length-1;t>=0;t--){let n=e.charCodeAt(t);if(n===47||n===92)return t}return-1}function xN(...e){for(let t of e)if(t){if(t.includes("\\")&&!t.includes("/"))return"\\";if(t.includes("/"))return"/"}return"/"}function bW(e){return e?e[0]==="/"||e[0]==="\\"?!0:e.length>=3&&/^[A-Za-z]:[\\/]/.test(e):!1}function wN(e){let t=vN(e);return t<0?".":t===0?e[0]:t===2&&/^[A-Za-z]:[\\/]/.test(e)?e.slice(0,3):e.slice(0,t)}function Qa(e){let t=vN(e);return t<0?e:e.slice(t+1)}function Fv(e,t){if(bW(t))return TN(t,xN(t));let n=xN(e,t);return TN(`${e}${n}${t}`,n)}function TN(e,t){let n="",r=e,i=/^([A-Za-z]:)([\\/])?/.exec(r);i?(n=i[1]+(i[2]?t:""),r=r.slice(i[0].length)):(r[0]==="/"||r[0]==="\\")&&(n=t,r=r.replace(/^[\\/]+/,""));let o=[];for(let s of r.split(EW))if(!(s===""||s===".")){if(s===".."){o.length>0&&o[o.length-1]!==".."?o.pop():n||o.push("..");continue}o.push(s)}return n+o.join(t)}function mn(e){return/[\r\n]/.test(e)?e.replace(/\s*[\r\n]+\s*/g," ").trim():e}var Dt=/^\d{4}-\d{2}-\d{2}$/;function ge(e){return e.key.endsWith(":")?e.key.slice(0,-1):e.key}function _N(e,t,n){if(e===t)return 0;let r=e.length,i=t.length;if(Math.abs(r-i)>n)return n+1;if(r===0)return i;if(i===0)return r;let o=new Array(i+1),s=new Array(i+1);for(let a=0;a<=i;a++)o[a]=a;for(let a=1;a<=r;a++){s[0]=a;let c=a;for(let u=1;u<=i;u++){let f=e.charCodeAt(a-1)===t.charCodeAt(u-1)?0:1;s[u]=Math.min(o[u]+1,s[u-1]+1,o[u-1]+f),s[u]<c&&(c=s[u])}if(c>n)return n+1;let l=o;o=s,s=l}return o[i]}function EN(e,t,n=2){let r,i=n+1;for(let o of t){let s=_N(e,o,n);if(s<i&&(r=o,i=s,s===0))break}return r}function bN(e,t,n=2){let r,i=n+1,o=!1;for(let s of t){let a=_N(e,s,n);a<i?(r=s,i=a,o=!1):a===i&&a<=n&&s!==r&&(o=!0)}return o?void 0:r}function rt(e){return e.name??(e.title===void 0?"<unnamed>":mn(e.title))}function su(e){return e.$type.replace(/Declaration$|Block$/,"").toLowerCase()}function hh(e){let t=su(e),n=e.name??(e.title===void 0?void 0:mn(e.title));return n?`${t} "${n}"`:t}function yr(e){let t=e.$cstNode;return t?t.range.start.line+1:0}function mh(e,t){return`"${e}" cannot be set on "default ${t}". Identity-defining, sizing, sequencing, reference, and prose properties must be explicit on each entity.`}function Kn(e){let t=new Set,n=[];for(let r of e.roadmapEntries)!rn(r)||!r.name||t.has(r.name)||(t.add(r.name),n.push(r));return n}function AW(e){let t=new Map;return Kn(e).forEach((n,r)=>{t.set(n.name,r+1)}),t}function RN(e){return(e.properties??[]).filter(n=>ge(n)==="wave")}function kN(e){return RN(e)[0]}function Bv(e){return e.value!==void 0?e.value:e.values.length===1?e.values[0]:`[${e.values.join(", ")}]`}function RW(e){let t=e;for(;t?.$container&&!Ya(t.$container);)t=t.$container;let n=t?.$container;if(!(!t||!n||!Ya(n)))return{file:n,index:n.roadmapEntries.indexOf(t),waveDecls:IN(n)}}function IN(e){let t=new Map;return e.roadmapEntries.forEach((n,r)=>{rn(n)&&n.name&&!t.has(n.name)&&t.set(n.name,r)}),t}function Uv(e,t,n,r=RW(t)){let i=Bv(e);if(e.value===void 0&&e.values.length!==1)return{status:"list",value:i};let o=n.get(i);if(o===void 0)return{status:"missing",value:i};if(r){let s=r.waveDecls.get(i);if(s!==void 0&&(r.index<0||s>r.index))return{status:"forward",value:i,line:yr(r.file.roadmapEntries[s])}}return{status:"valid",id:i,index:o}}function kW(e){return je(e)||Tt(e)}function IW(e,t,n,r){let i=kN(e);if(!i)return t;let o=Uv(i,e,n,r);if(o.status==="valid")return t??o.index}function gh(e,t){let n=new Map,r=new Map,i=new Map,o=(s,a,c)=>{let l=IW(s,a,t,c);l!==void 0&&n.set(s,l);let u=l;if(je(s)||Tt(s)){let f=[];for(let d of s.content)gr(d)||f.push(o(d,l,c));l===void 0&&(je(s)?u=f[0]:f.length>0&&!f.includes(void 0)&&(u=Math.min(...f)))}return u!==void 0&&r.set(s,u),u};for(let s of e){let a,c=s.$container;if(Ya(c)){let l=i.get(c);l||(l=IN(c),i.set(c,l)),a={file:c,index:c.roadmapEntries.indexOf(s),waveDecls:l}}for(let l of s.content)gr(l)||o(l,void 0,a)}return{waveOf:n,leadOf:r}}function SW(e){return Dt.test(e)&&!Number.isNaN(new Date(e).getTime())}function SN(e){return(e.properties??[]).find(n=>ge(n)==="date")?.value}function NW(e){let t=new Map,n=r=>{let i=r.name;if(i&&!t.has(i)&&t.set(i,r),vt(r)||Tt(r)||je(r))for(let o of r.content)n(o);else if(Bt(r))for(let o of r.content)(Bt(o)||Cn(o))&&n(o)};e.roadmapDecl&&n(e.roadmapDecl);for(let r of e.roadmapEntries)n(r);return t}function el(e){let t=NW(e);return n=>t.get(n)}function lu(e,t){let n=null;for(let r of e.properties){if(ge(r)!=="after")continue;let i=r.value!==void 0?[r.value]:r.values;for(let o of i){if(!o)continue;let s;if(Dt.test(o))s=o;else{let a=t(o);(Yi(a)||Pn(a))&&(s=SN(a))}s===void 0||!SW(s)||(n===null||s>n.date)&&(n={date:s,ref:o})}}return n}var NN=new Set(["before","date","start","length","duration","size","capacity","remaining","wave"]);function cu(e){return rn(e.$container)&&NN.has(ge(e))}var PW={ItemDeclaration:"item",GroupBlock:"group",ParallelBlock:"parallel",SwimlaneDeclaration:"swimlane",AnchorDeclaration:"anchor",MilestoneDeclaration:"milestone",WaveDeclaration:"wave",LabelDeclaration:"label",SizeDeclaration:"size",StatusDeclaration:"status",PersonDeclaration:"person",TeamDeclaration:"team",FootnoteDeclaration:"footnote",RoadmapDeclaration:"roadmap",StyleDeclaration:"style",SymbolDeclaration:"symbol"};function au(e){return PW[e.$type]??su(e)}function CW(e,t){let n=[],r=rt(e),i=!e.name&&e.title===void 0;if(e.name||n.push({severity:"error",code:"NL.E1100",args:{...e.title===void 0?{}:{title:mn(e.title)},line:yr(e)},node:e}),i)return n;for(let o of e.properties){let s=ge(o);if(NN.has(s)){n.push({severity:"error",code:"NL.E1105",args:s==="before"?{reason:"before",name:r}:{reason:"other",key:s,name:r},node:o,property:"key"});continue}if(s!=="after")continue;let a=o.value!==void 0?[o.value]:o.values;for(let c of a){if(!c||Dt.test(c))continue;let l=t(c);if(!(!l||Yi(l))){if(Pn(l)){if(SN(l)!==void 0)continue;n.push({severity:"error",code:"NL.E1106",args:{name:r,ref:c,kind:"floating-milestone"},node:o});continue}n.push({severity:"error",code:"NL.E1106",args:{name:r,ref:c,kind:au(l)},node:o})}}}return n}function yh(e){let t=el(e);return e.roadmapEntries.filter(rn).flatMap(n=>CW(n,t))}function OW(e){let t=[],n=r=>{if(!rn(r)){if(t.push(r),vt(r)||Tt(r)||je(r))for(let i of r.content)gr(i)||n(i);else if(Bt(r))for(let i of r.content)(Bt(i)||Cn(i))&&n(i)}};for(let r of e.configEntries)wn(r)&&t.push(r);e.roadmapDecl&&n(e.roadmapDecl);for(let r of e.roadmapEntries)n(r);return t}function LW(e,t){let n=e.toLowerCase(),r=t.filter(o=>o.title!==void 0&&mn(o.title).toLowerCase()===n),i;if(r.length===1)i=r[0];else{let o=bN(e,t.map(s=>s.name));i=o===void 0?void 0:t.find(s=>s.name===o)}if(i)return i.title===void 0?{id:i.name}:{id:i.name,title:mn(i.title)}}function $W(e,t,n){let r=n(t);if(r)return au(r);for(let i of e.configEntries)if((qr(i)||Go(i))&&i.name===t)return au(i)}function DW(e,t){let n=e.$container;for(;kW(n);){let r=kN(n);if(r)return Uv(r,n,t).status==="valid"?{container:n,prop:r}:void 0;n=n?.$container}}function AN(e,t){let n=t.name??(t.title===void 0?"":mn(t.title));return n?{kind:e,name:n}:{kind:e,name:n,line:yr(t)}}function MW(e){if(wn(e))return{kind:"default",entityType:e.entityType};let t=e,n=t.name??(t.title===void 0?"":mn(t.title)),r=au(e);return n?{kind:r,name:n}:{kind:r,name:n,line:yr(e)}}function FW(e,t,n,r,i,o){let s=Uv(n,t,i);switch(s.status){case"list":return{severity:"error",code:"NL.E1101",args:{reason:"list",value:s.value},node:n};case"forward":return{severity:"error",code:"NL.E1101",args:{reason:"forward",value:s.value,line:s.line},node:n};case"missing":{let u=$W(e,s.value,o),f=LW(s.value,r);return{severity:"error",code:"NL.E1101",args:u===void 0?{reason:"unknown",value:s.value,declared:r.map(d=>d.name),...f?{suggestion:f}:{}}:{reason:"not-a-wave",value:s.value,kind:u,...f?{suggestion:f}:{}},node:n}}case"valid":break}let a=DW(t,i);if(!a)return;let c=Bv(a.prop);if(c===s.id)return;let l=$t(t)?"item":je(t)?"group":"parallel";return{severity:"error",code:"NL.E1102",args:{entity:AN(l,t),wave:s.id,container:AN(je(a.container)?"group":"parallel",a.container),containerWave:c},node:n}}function xh(e){let t=Kn(e),n=t.length>0,r=AW(e),i=el(e),o=[];for(let s of OW(e)){let a=RN(s);if(a.length===0)continue;if(!n){for(let m of a)o.push({severity:"warning",code:"NL.W0702",args:{target:MW(s)},node:m,property:"key"});continue}if(wn(s)){for(let m of a)o.push({severity:"error",message:mh("wave",s.entityType),node:m});continue}let c=s,l=rt(c);if(!c.name&&c.title===void 0&&!$t(s)&&!je(s)&&!Tt(s))continue;if(vt(s)||Pn(s)){for(let m of a)o.push({severity:"error",code:"NL.E1104",args:{reason:vt(s)?"swimlane":"milestone",name:l,value:Bv(m)},node:m});continue}if(!$t(s)&&!je(s)&&!Tt(s)){for(let m of a)o.push({severity:"error",code:"NL.E1104",args:{reason:"other",type:au(s),name:l},node:m});continue}let[f,...d]=a,p=FW(e,s,f,t,r,i);if(p&&o.push(p),d.length>0){let m=a.flatMap(g=>g.value!==void 0?[g.value]:g.values);for(let g of d)o.push({severity:"error",code:"NL.E1101",args:{reason:"list",value:`[${m.join(", ")}]`},node:g})}}return o}var BW=["after-wave","after-item","sequence","join"];function jo(e){return e.name??(e.title===void 0?void 0:mn(e.title))}function Th(e){let t=jo(e);if(vt(e))return{kind:"swimlane",name:rt(e)};let n=je(e);return t?{kind:n?"group":"parallel",name:t}:{kind:n?"group-block":"parallel-block",line:yr(e)}}function PN(e){let t=jo(e);return t!==void 0||e.$type==="ItemDeclaration"?t:{kind:je(e)?"group-block":"parallel-block",line:yr(e)}}function CN(e){return e.$type==="ItemDeclaration"||jo(e)!==void 0?{name:rt(e)}:{name:"",kind:je(e)?"group":"parallel",line:yr(e)}}function UW(e){let t=je(e)?"group":"parallel",n=jo(e);return n?{kind:t,name:n}:{kind:t,name:"",line:yr(e)}}function Wv(e){return(e.value!==void 0?[e.value]:e.values).filter(t=>!!t)}function WW(e){return Pn(e)&&!e.properties.some(t=>ge(t)==="date")}function XW(e){return e.$type!=="ItemDeclaration"?!1:e.properties.some(t=>{let n=ge(t);return(n==="date"||n==="start")&&!!t.value&&Dt.test(t.value)})}function tl(e,t,n={}){if(t.length===0)return[];let r=new Map;t.forEach((A,O)=>{A.name&&r.set(A.name,O+1)});let i=A=>t[A-1]?.name??"",{lanes:o,lookup:s}=e,{waveOf:a,leadOf:c}=gh(o,r),l=[],u=new Map,f=0,d=(A,O,U,H)=>{let Z=l.length,V={node:A,lane:O,parent:U,children:[],prev:H,start:f++,reg:-1,ew:a.get(A),lw:c.get(A),pinned:XW(A),after:[],afterWaves:[]};if(l.push(V),je(A)||Tt(A)){let oe=-1;for(let le of A.content)gr(le)||(oe=d(le,O,Z,je(A)?oe:-1),V.children.push(oe));V.reg=f++}else V.reg=V.start;if(A.name){let oe=u.get(A.name)??[];oe.push(Z),u.set(A.name,oe)}return Z};o.forEach((A,O)=>{let U=-1;for(let H of A.content)gr(H)||(U=d(H,O,-1,U))});let p=(A,O)=>{let U=u.get(A);if(U){for(let H=U.length-1;H>=0;H--)if(l[U[H]].reg<l[O].start)return U[H]}},m=[],g=n.suppressCycleRefs??!0?jW(l,o,s):()=>!1;for(let A=0;A<l.length;A++){let O=l[A],U=CN(O.node);for(let H of O.node.properties){let Z=ge(H);if(!(Z!=="after"&&Z!=="before"))for(let V of Wv(H)){if(Dt.test(V))continue;let oe=p(V,A),le=oe===void 0?r.get(V):void 0;if(Z==="after"&&!O.pinned&&(oe!==void 0?O.after.push({from:oe,prop:H,ref:V}):le!==void 0&&O.afterWaves.push({prop:H,ref:V,j:le})),oe!==void 0||le!==void 0)continue;let xe=u.get(V)?.[0];if(xe===void 0&&!WW(s(V))||g(O.node.name,Z,V))continue;let ve=!1;for(let pe=O.parent;pe>=0&&!ve;pe=l[pe].parent)ve=l[pe].node.name===V;m.push({severity:"warning",code:"NL.W1101",args:xe===void 0?{reason:"floating-milestone",key:Z,ref:V,...U}:ve?{reason:"ancestor",key:Z,ref:V,...U}:l[xe].lane!==O.lane?{reason:"forward-lane",key:Z,ref:V,...U,lane:rt(o[l[xe].lane]),ownLane:rt(o[O.lane])}:{reason:"forward-flow",key:Z,ref:V,...U,flow:Th(GW(l,o,A,xe))},node:H})}}}let _=new Array(l.length),x=new Array(l.length);for(let A=l.length-1;A>=0;A--){let O=l[A];if(O.node.$type==="ItemDeclaration"){_[A]=O.ew,x[A]=O.ew;continue}for(let U of O.children){let H=_[U],Z=x[U];H!==void 0&&(_[A]=Math.max(_[A]??H,H)),Z!==void 0&&(x[A]=Math.min(x[A]??Z,Z))}}for(let A=0;A<l.length;A++){let O=_[A];if(O===void 0)continue;let U=CN(l[A].node);for(let H of l[A].node.properties)if(ge(H)==="before")for(let Z of Wv(H)){if(Dt.test(Z))continue;let V=p(Z,A);if(V!==void 0){let le=x[V];if(le===void 0||O<=le)continue;m.push({severity:"warning",code:"NL.W1100",args:{reason:"item",ref:Z,...U,wave:i(O),refWave:i(le)},node:H});continue}let oe=r.get(Z);oe===void 0||O<oe||m.push({severity:"warning",code:"NL.W1100",args:{reason:"wave",ref:Z,...U,wave:i(O)},node:H})}}let y=A=>l[A].node.$type!=="ItemDeclaration",w=A=>{let{parent:O,pinned:U}=l[A];return U||O<0?!1:Tt(l[O].node)||l[O].children[0]===A},v=new Array(l.length).fill(0),b=new Array(l.length).fill(0),$=A=>{let O=l[A],U=[];O.lw!==void 0&&U.push({term:{kind:O.ew!==void 0?"wave":"lead"},value:O.lw-1});for(let H of O.afterWaves)U.push({term:{kind:"after-wave",prop:H.prop,ref:H.ref},value:H.j});w(A)&&U.push({term:{kind:"parent",from:O.parent},value:v[O.parent]}),!O.pinned&&O.prev>=0&&U.push({term:{kind:"seq",from:O.prev},value:b[O.prev]});for(let H of O.after)U.push({term:{kind:"after",from:H.from,prop:H.prop,ref:H.ref},value:b[H.from]});return U},N=A=>{let O=v[A];for(let U of l[A].children)O=Math.max(O,b[U]);return O},L=l.map((A,O)=>[2*O+1]),G=l.map(()=>[]);for(let A=0;A<l.length;A++){let O=l[A];w(A)&&L[O.parent].push(2*A),O.prev>=0&&G[O.prev].push(2*A);for(let U of O.after)G[U.from].push(2*A);O.parent>=0&&G[A].push(2*O.parent+1)}let Y=[],M=new Array(2*l.length).fill(!0);for(let A=0;A<l.length;A++)Y.push(2*A,2*A+1);for(let A=0;A<Y.length;A++){let O=Y[A];M[O]=!1;let U=O>>1,H=(O&1)===1,Z=H?N(U):Math.max(0,...$(U).map(V=>V.value));if(!(Z<=(H?b[U]:v[U]))){H?b[U]=Z:v[U]=Z;for(let V of H?G[U]:L[U])M[V]||(M[V]=!0,Y.push(V))}}let S=(A,O)=>$(A).filter(U=>U.value===O).map(U=>U.term),F=(A,O)=>{if(!y(A))return[{kind:"start"}];let U=l[A].children.filter(H=>b[H]===O).map(H=>({kind:"child",from:H}));return U.length>0?je(l[A].node)?U.reverse():U:v[A]===O?[{kind:"start"}]:[]},X=(A,O)=>{let U=[{i:A,via:A}];for(;U.length>0;){let{i:H,via:Z}=U.pop(),V=F(H,O);for(let oe=V.length-1;oe>=0;oe--){let le=V[oe];if(le.kind==="start"){let xe=l[H].ew;if(xe!==void 0&&xe-1===O)return{origin:H,via:Z}}else le.kind==="child"&&U.push({i:le.from,via:H===A?le.from:Z})}}},R=(A,O)=>{let U=l[A].ew;return U!==void 0&&U-1===O},P=(A,O)=>{for(let U=A;!l[U].pinned;){let H=l[U].prev;if(H<0){if(!w(U))return;U=l[U].parent;continue}let Z=l[H].ew;if(Z!==void 0&&Z>O)return H;U=H}},C=new Map,j=[],z=new Map,q=(A,O,U)=>`${A}:${l[A].node.properties.indexOf(O)}:${U}`,re=(A,O)=>{let U=[],H=A;for(;;){let Z=S(H,O);for(let oe of Z)if(oe.kind==="after-wave")U.push({variant:"after-wave",owner:H,prop:oe.prop,ref:oe.ref});else if(oe.kind==="after")R(oe.from,O)&&U.push({variant:"after-item",owner:H,prop:oe.prop,ref:oe.ref});else if(oe.kind==="seq"){let le=oe.from,xe=l[le].node;if(Tt(xe)&&l[le].ew===void 0){let ve=X(le,O),pe=ve&&(jo(l[ve.via].node)??jo(l[ve.origin].node));pe&&U.push({variant:"join",owner:H,block:le,track:pe})}else if(R(le,O)){let ve=PN(xe);ve&&U.push({variant:"sequence",owner:H,pred:le,ref:ve})}}let V=Z.find(oe=>oe.kind==="parent");if(!V)break;H=V.from}for(let Z of BW){let V=U.find(oe=>oe.variant===Z);if(V)return V}},ie=(A,O)=>{let U=[{key:2*A,from:-1}],H=new Set([2*A]),Z,V=(oe,le)=>{H.has(oe)||(H.add(oe),U.push({key:oe,from:le}))};for(let oe=0;oe<U.length;oe++){let le=U[oe].key>>1;if(le!==A&&C.has(le)){Z??(Z=le);continue}if((U[oe].key&1)===1){for(let pe of F(le,O))pe.kind==="start"?V(2*le,oe):pe.kind==="child"&&V(2*pe.from+1,oe);continue}let xe=S(le,O),ve=xe.find(pe=>pe.kind==="wave"||pe.kind==="lead")??xe.find(pe=>pe.kind==="after-wave");if(ve){let pe=[];for(let Je=oe;Je>=0;Je=U[Je].from){let it=U[Je].key>>1;pe[pe.length-1]!==it&&pe.push(it)}let Me=rt(l[le].node);return{path:pe,origin:ve.kind==="after-wave"?`${Me} (after:${ve.ref})`:`${Me} (wave "${i(O+1)}")`}}for(let pe of xe)pe.kind==="parent"?V(2*pe.from,oe):(pe.kind==="seq"||pe.kind==="after")&&V(2*pe.from+1,oe)}return{hit:Z}},ye=(A,O,U,H)=>{let Z=rt(l[O].node),V=i(U),oe=i(H+1),le=l[A.owner].node,xe=A.owner===O?void 0:UW(le);switch(A.variant){case"after-wave":{let ve=l[A.owner].ew===void 0?void 0:xe;return{node:A.prop,run:[O],build:()=>({reason:"after-wave",name:Z,wave:V,refId:A.ref,...ve?{container:ve}:{}})}}case"after-item":return{node:A.prop,run:[O],build:()=>({reason:"after-item",name:Z,wave:V,refId:A.ref,ref:A.ref,refWave:oe,...xe?{container:xe}:{}})};case"join":{let ve=l[A.block];return{node:l[O].node,run:[O],build:()=>({reason:"join",name:Z,wave:V,block:Th(ve.node),flow:Th(ON(l,o,A.block)),track:A.track,trackWave:oe})}}case"sequence":{let ve=A.pred,pe=l[ve].parent,Me=Je=>{if(pe<0)return l[Je].lane===l[ve].lane;for(let it=l[Je].parent;it>=0;it=l[it].parent)if(it===pe)return!0;return!1};return{node:l[O].node,run:[O],build:Je=>{let it=Je.filter(Me);return{reason:"sequence",items:it.map(ct=>rt(l[ct].node)),itemWave:V,ref:A.ref,refWave:i(l[ve].ew??H+1),flow:Th(ON(l,o,ve)),last:rt(l[it[it.length-1]].node)}},seq:{pred:ve,ref:A.ref,inFlow:Me}}}}},ne=(A,O)=>(j.push(O),A!==void 0&&z.set(A,O),O),ae=(A,O,U,H)=>{let Z=A.variant==="sequence"?`sequence:${A.pred}:${U}`:A.variant==="join"?`join:${A.block}:${U}`:`${A.variant}:${q(A.owner,A.prop,A.ref)}`,V=z.get(Z);return V?(V.run.push(O),V):ne(Z,ye(A,O,U,H))};for(let A=0;A<l.length;A++){let O=l[A],U=O.ew;if(O.node.$type!=="ItemDeclaration"||U===void 0||v[A]<U)continue;let H=v[A],Z=re(A,H),V;if(Z)V=ae(Z,A,U,H);else{let oe=ie(A,H);if("path"in oe){let le=oe.path.slice(1).filter(Me=>!y(Me)||jo(l[Me].node)!==void 0).map(Me=>rt(l[Me].node)),xe=[oe.origin,...le.filter((Me,Je)=>le[Je-1]!==Me)],ve=rt(O.node),pe=i(U);V=ne(void 0,{node:O.node,run:[A],build:()=>({reason:"chain",name:ve,wave:pe,chain:xe})})}else{let le=oe.hit===void 0?void 0:C.get(oe.hit),xe=le?.seq;if(xe?.inFlow(A)){let ve=P(A,U),pe=ve===void 0?void 0:PN(l[ve].node),Me=ve!==void 0&&pe!==void 0?{variant:"sequence",owner:A,pred:ve,ref:pe}:{variant:"sequence",owner:A,pred:xe.pred,ref:xe.ref};V=ae(Me,A,U,H)}else V=le,V?.run.push(A)}}V&&C.set(A,V)}for(let A of j)m.push({severity:"error",code:"NL.E1103",args:A.build(A.run),node:A.node});return m}function ON(e,t,n){let r=e[n].parent;return r<0?t[e[n].lane]:e[r].node}function GW(e,t,n,r){let i=new Set;for(let o=e[r].parent;o>=0;o=e[o].parent)i.add(o);for(let o=e[n].parent;o>=0;o=e[o].parent)if(i.has(o))return e[o].node;return t[e[n].lane]}function jW(e,t,n){let r=new Map,i=(l,u)=>{let f=r.get(l)??new Set;f.add(u),r.set(l,f)},o=[],s=(l,u)=>{if(l)for(let f of u){let d=ge(f);if(!(d!=="after"&&d!=="before"))for(let p of Wv(f))Dt.test(p)||(d==="after"?i(l,p):i(p,l),o.push(p))}};for(let l of t)s(l.name,l.properties);for(let l of e)s(l.node.name,l.node.properties);let a=new Set;for(;o.length>0;){let l=o.pop();if(a.has(l))continue;a.add(l);let u=n(l);Pn(u)&&s(u.name,u.properties)}let c=(l,u)=>{let f=new Set([l]),d=[l];for(;d.length>0;){let p=d.pop();if(p===u)return!0;for(let m of r.get(p)??[])f.has(m)||(f.add(m),d.push(m))}return!1};return(l,u,f)=>l?u==="after"?c(f,l):c(l,f):!1}var LN="v1",Xv=new Set(["planned","in-progress","active","done","completed","at-risk","blocked"]),vh=new Set(["bg","fg","text","border","icon","shadow","font","weight","italic","text-size","padding","spacing","header-height","corner-radius","bracket","header-position","capacity-icon","timeline-position","minor-grid","non-working"]),HW=new Set(["hide","show"]),zW=new Set(["header-height","timeline-position","minor-grid","non-working"]),zv=new Set(["none","multiplier","person","people","points","time"]),wh=new Set([...zv,"shield","warning","lock","calendar"]),zN="none",_h={border:new Set(["solid","dashed","dotted"]),shadow:new Set(["none","subtle","soft","hard"]),font:new Set(["sans","serif","mono"]),weight:new Set(["thin","light","normal","bold"]),italic:new Set(["true","false"]),"text-size":new Set(["none","xs","sm","md","lg","xl"]),padding:new Set(["none","xs","sm","md","lg","xl"]),spacing:new Set(["none","xs","sm","md","lg","xl"]),"header-height":new Set(["none","xs","sm","md","lg","xl"]),"corner-radius":new Set(["none","xs","sm","md","lg","xl","full"]),bracket:new Set(["none","solid","dashed"]),"header-position":new Set(["beside","above"]),"timeline-position":new Set(["top","bottom","both"]),"minor-grid":new Set(["true","false"])},qW=new Set(["red","blue","yellow","green","orange","purple","violet","gray","grey","navy","white","none"]),VW=new Set(["business","full","custom"]),Gv=new Set(["days-per-week","days-per-month","days-per-quarter","days-per-year"]),$N=new Set(["name","label-every","label"]),DN=new Set(["item","label","swimlane","roadmap","milestone","footnote","anchor","parallel","group"]),YW={item:new Set(["size","duration","after","before","remaining","link","description","owner"]),milestone:new Set(["date","after","link","description"]),anchor:new Set(["date","link","description"]),footnote:new Set(["on","link","description"]),label:new Set(["link","description"]),swimlane:new Set(["capacity"]),roadmap:new Set,parallel:new Set,group:new Set},MN=new Set(["labels","link","style","description"]),KW={RoadmapDeclaration:new Set(["author","start","length","scale","calendar","logo","logo-size"]),AnchorDeclaration:new Set(["date"]),SwimlaneDeclaration:new Set(["owner","capacity","utilization-warn-at","utilization-over-at","status","after","before"]),ItemDeclaration:new Set(["size","duration","status","owner","after","before","remaining","capacity","date","start"]),ParallelBlock:new Set(["owner","after","before","status"]),GroupBlock:new Set(["owner","after","before","status"]),MilestoneDeclaration:new Set(["date","after"]),FootnoteDeclaration:new Set(["on"]),PersonDeclaration:new Set,TeamDeclaration:new Set,LabelDeclaration:new Set,SizeDeclaration:new Set(["effort"]),StatusDeclaration:new Set,WaveDeclaration:new Set(["after"])},ZW=[{keys:new Set(["progress","percent","percentage","pct","complete","completion"]),requires:"remaining",suggest:"status: + remaining:"}];function JW(e,t){let n=e.toLowerCase();for(let r of ZW)if(r.keys.has(n)&&t.has(r.requires))return r.suggest}var uu=/^\d+(?:\.\d+)?[dwmqy]$/,QW=/^\d+%$/,eX=/^#[0-9a-fA-F]{3,8}$/,tX=/^v\d+$/,FN=/^\d+$/,nX=/^[dwmqy]$/,BN=/^\d+(\.\d+)?$/,qv=/^\d+(\.\d+)?%$/,qN=/^\d+\.\d+$/,rX=/^\d+$/,iX=/^[\x20-\x7E]{1,3}$/,oX=/^[a-zA-Z]{2,3}(-[a-zA-Z]{2}|-\d{3})?$/,sX=new Set(["merge","ignore","isolate"]),UN=new Set(["locale"]);function jv(e){let t=e?.roadmapDecl?.properties.find(i=>ge(i)==="start");if(!t)return{kind:"missing"};let n=t.value;if(!n||!Dt.test(n))return{kind:"invalid"};let r=new Date(n);return Number.isNaN(r.getTime())?{kind:"invalid"}:{kind:"valid",iso:n,date:r}}function de(e,t,n,r,...i){e(t,Vr("en-US",r,...i),{...n,data:{code:r,args:i}})}function Hv(e,t){let n={node:t.node,...t.property===void 0?{}:{property:t.property}};if("message"in t){e(t.severity,t.message,n);return}de(e,t.severity,n,t.code,t.args)}function VN(e){let t=e.validation.ValidationRegistry,n=e.validation.NowlineValidator,r={NowlineFile:[n.checkFileStructure,n.checkUniqueIdentifiers,n.checkSwimlaneRequired,n.checkIndentationConsistency,n.checkRoadmapOnlyKeywordsPosition,n.checkForwardReferences,n.checkReferenceResolution,n.checkInlineDatePins,n.checkCircularDependencies,n.checkWaves,n.checkDuplicateSizeIds,n.checkCalendarBlockConsistency,n.checkPersonDeclarations,n.checkDuplicateSymbolIds,n.checkSymbolReferences],NowlineDirective:[n.checkDirectiveVersion,n.checkDirectiveProperties],IncludeOption:[n.checkIncludeMode],IncludeDeclaration:[n.checkIncludeDuplicateOptions],EntityProperty:[n.checkPropertyValues],RoadmapDeclaration:[n.checkEntityIdOrTitle,n.checkRoadmapProperties,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],AnchorDeclaration:[n.checkEntityIdOrTitle,n.checkAnchorRequiredDate,n.checkAnchorAgainstStart,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],SwimlaneDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkUtilizationOrdering,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],ItemDeclaration:[n.checkEntityIdOrTitle,n.checkItemRequiredDuration,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],ParallelBlock:[n.checkParallelMinChildren,n.checkNoComputedProperties,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],GroupBlock:[n.checkGroupMinChildren,n.checkNoComputedProperties,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],MilestoneDeclaration:[n.checkEntityIdOrTitle,n.checkMilestoneRequirement,n.checkMilestoneAgainstStart,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],FootnoteDeclaration:[n.checkEntityIdOrTitle,n.checkFootnoteOn,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],PersonDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],TeamDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],StyleDeclaration:[n.checkEntityIdOrTitle],StyleProperty:[n.checkStylePropertyEnum],SymbolDeclaration:[n.checkEntityIdOrTitle,n.checkSymbolDeclaration],LabelDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],SizeDeclaration:[n.checkEntityIdOrTitle,n.checkSizeDeclaration,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],StatusDeclaration:[n.checkEntityIdOrTitle,n.checkStatusDeclaration,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],WaveDeclaration:[n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],DefaultDeclaration:[n.checkDefaultDeclaration,n.checkUtilizationOrdering],CalendarBlock:[n.checkCalendarBlock],ScaleBlock:[n.checkScaleBlock]};t.register(r,n)}var bh=class{checkFileStructure(t,n){let r=t.hasConfig?Ef.findNodeForKeyword(t.$cstNode,"config")?.offset:void 0,i=t.roadmapDecl?.$cstNode?.offset;r!==void 0&&i!==void 0&&r>i&&de(n,"error",{node:t,property:"hasConfig"},"NL.E0001");for(let o of t.includes){let s=o.$cstNode?.offset??0;r!==void 0&&s>r&&de(n,"error",{node:o},"NL.E0002"),i!==void 0&&s>i&&de(n,"error",{node:o},"NL.E0003")}}checkRoadmapOnlyKeywordsPosition(t,n){}checkDirectiveVersion(t,n){if(!tX.test(t.version)){de(n,"error",{node:t,property:"version"},"NL.E0100",{version:t.version});return}let r=parseInt(t.version.slice(1),10),i=parseInt(LN.slice(1),10);r>i&&de(n,"error",{node:t,property:"version"},"NL.E0101",{version:t.version,supported:LN})}checkDirectiveProperties(t,n){let r=new Set;for(let i of t.properties){let o=ge(i);if(!UN.has(o)){de(n,"error",{node:i,property:"key"},"NL.E0102",{key:o,allowed:[...UN].join(", ")});continue}if(r.has(o)&&de(n,"error",{node:i,property:"key"},"NL.E0103",{key:o}),r.add(o),o==="locale"){let s=i.value;oX.test(s)||de(n,"error",{node:i,property:"value"},"NL.E0104",{value:s})}}}checkEntityIdOrTitle(t,n){!t.name&&!t.title&&de(n,"error",{node:t},"NL.E0301",{type:t.$type})}checkUniqueIdentifiers(t,n){let r=new Map,i=(o,s)=>{if(!o)return;let a=r.get(o);a?de(n,"error",{node:s},"NL.E0300",{name:o,location:Eh(a)}):r.set(o,s)};t.roadmapDecl?.name&&i(t.roadmapDecl.name,t.roadmapDecl);for(let o of t.roadmapEntries)Yv(o,i);for(let o of t.configEntries)qr(o)&&o.name&&i(o.name,o)}checkIndentationConsistency(t,n){let r=t.$document?.textDocument.getText()??t.$cstNode?.text;if(!r)return;let i=r.split(/\r?\n/);for(let o=0;o<i.length;o++){let s=i[o];if(s.length===0)continue;let a=s.match(/^([\t ]+)/);if(!a)continue;let c=a[1];if(c.includes(" ")&&c.includes(" ")){de(n,"error",{node:t},"NL.E0005",{line:o+1});return}}}checkSwimlaneRequired(t,n){let r=t.roadmapEntries.some(vt);t.roadmapDecl&&!r&&de(n,"error",{node:t.roadmapDecl},"NL.E0004")}checkIncludeMode(t,n){sX.has(t.value)||de(n,"error",{node:t,property:"value"},"NL.E0200",{value:t.value})}checkIncludeDuplicateOptions(t,n){let r=new Set;for(let i of t.options){let o=i.key.replace(/:$/,"");r.has(o)&&de(n,"error",{node:i},"NL.E0201",{key:o}),r.add(o)}}checkPropertyValues(t,n){if(cu(t))return;let r=ge(t),i=t.value,o=t.values,s=i?[i]:o;switch(r){case"status":break;case"duration":i&&!uu.test(i)&&de(n,"error",{node:t,property:"value"},"NL.E0400",{value:i});break;case"size":i&&!GN(i)&&de(n,"error",{node:t,property:"value"},"NL.E0401",{value:i});break;case"effort":i&&!uu.test(i)&&de(n,"error",{node:t,property:"value"},"NL.E0402",{value:i});break;case"remaining":{if(i)if(QW.test(i)){let a=parseFloat(i);(a<0||a>100)&&de(n,"error",{node:t,property:"value"},"NL.E0404",{value:i})}else uu.test(i)||de(n,"error",{node:t,property:"value"},"NL.E0403",{value:i});break}case"date":case"start":i&&(!Dt.test(i)||Number.isNaN(new Date(i).getTime()))&&de(n,"error",{node:t,property:"value"},"NL.E0405",{key:r,value:i});break;case"scale":i&&!uu.test(i)&&de(n,"error",{node:t,property:"value"},"NL.E0406",{value:i});break;case"calendar":i&&!VW.has(i)&&de(n,"error",{node:t,property:"value"},"NL.E0407",{value:i});break;case"on":case"after":case"before":s.length===0&&de(n,"error",{node:t},"NL.E0408",{key:r});break;case"capacity":{if(!i)break;let a=t.$container,c=aX(a);if(c==="invalid")break;c==="lane"?(!BN.test(i)||parseFloat(i)<=0)&&n("error",`Invalid swimlane capacity "${i}". Use a positive integer (e.g. capacity:5) or decimal (e.g. capacity:1.5). Percent literals are not allowed on swimlanes.`,{node:t,property:"value"}):qv.test(i)?parseFloat(i)<=0&&n("error",`Item capacity "${i}" must be positive.`,{node:t,property:"value"}):BN.test(i)?parseFloat(i)<=0&&n("error",`Item capacity "${i}" must be positive.`,{node:t,property:"value"}):n("error",`Invalid item capacity "${i}". Use a positive integer (capacity:2), decimal (capacity:0.5), or percent literal (capacity:50%).`,{node:t,property:"value"});break}case"overcapacity":{n("error",'"overcapacity:" was removed. Use "utilization-over-at:none" (and/or "utilization-warn-at:none") to suppress the lane utilization underline.',{node:t});break}case"utilization-warn-at":case"utilization-over-at":{if(!i)break;if(!lX(t.$container)){n("error",`"${r}:" is only valid on "swimlane" or "default swimlane".`,{node:t});break}if(i===zN)break;if(qv.test(i)){parseFloat(i)<=0&&n("error",`${r} value "${i}" must be positive.`,{node:t,property:"value"});break}if(qN.test(i)){parseFloat(i)<=0&&n("error",`${r} value "${i}" must be positive.`,{node:t,property:"value"});break}if(rX.test(i)){n("error",`Ambiguous ${r} value "${i}". Use the percent form ("${i}%") or the decimal-fraction form ("0.${i}") to make the intent explicit.`,{node:t,property:"value"});break}n("error",`Invalid ${r} value "${i}". Use a positive percent (e.g. 80%), a positive decimal fraction (e.g. 0.8), or "none" to opt out.`,{node:t,property:"value"});break}case"capacity-icon":break;case"icon":break;case"non-working":wn(t.$container)&&XN(i,t,n);break;default:if(vh.has(r)){if(r==="bg"||r==="fg"||r==="text")i&&!WN(i)&&de(n,"error",{node:t,property:"value"},"NL.E0801",{value:i,key:r});else if(r in _h){let a=_h[r];i&&!a.has(i)&&de(n,"error",{node:t,property:"value"},"NL.E0802",{value:i,key:r,allowed:[...a].join(", ")})}}break}}checkAnchorRequiredDate(t,n){t.properties.find(i=>ge(i)==="date")||de(n,"error",{node:t},"NL.E0500",{name:rt(t)})}checkAnchorAgainstStart(t,n){let r=t.properties.find(a=>ge(a)==="date");if(!r?.value)return;let i=r.value;if(!Dt.test(i))return;let o=new Date(i);if(Number.isNaN(o.getTime()))return;let s=jv(t.$container);switch(s.kind){case"invalid":return;case"missing":de(n,"error",{node:r,property:"value"},"NL.E0501",{name:rt(t)});return;case"valid":o<s.date&&de(n,"error",{node:r,property:"value"},"NL.E0502",{name:rt(t),date:i,start:s.iso});return}}checkMilestoneRequirement(t,n){let r=t.properties.some(o=>ge(o)==="date"),i=t.properties.some(o=>ge(o)==="after");!r&&!i&&de(n,"error",{node:t},"NL.E0503",{name:rt(t)})}checkMilestoneAgainstStart(t,n){let r=t.properties.find(a=>ge(a)==="date");if(!r?.value)return;let i=r.value;if(!Dt.test(i))return;let o=new Date(i);if(Number.isNaN(o.getTime()))return;let s=jv(t.$container);switch(s.kind){case"invalid":return;case"missing":n("error",`Milestone "${rt(t)}" has a date but the roadmap is missing "start:". Add start:YYYY-MM-DD to the roadmap.`,{node:r,property:"value"});return;case"valid":o<s.date&&de(n,"error",{node:r,property:"value"},"NL.E0504",{name:rt(t),date:i,start:s.iso});return}}checkFootnoteOn(t,n){t.properties.some(i=>ge(i)==="on")||de(n,"error",{node:t},"NL.E0505")}checkNoFootnoteProperty(t,n){for(let r of t.properties)ge(r)==="footnote"&&n("error",`Property "footnote:" is not valid on ${hh(t)}. Footnotes attach via "on:" on the footnote declaration \u2014 declare \`footnote <id> on:<target-id>\` instead.`,{node:r})}checkItemRequiredDuration(t,n){let r=t.properties.some(o=>ge(o)==="duration"),i=t.properties.some(o=>ge(o)==="size");!r&&!i&&de(n,"error",{node:t},"NL.E0600",{name:rt(t)})}checkNoComputedProperties(t,n){for(let r of t.properties){let i=ge(r);(i==="size"||i==="duration"||i==="remaining"||i==="capacity")&&n("error",`"${i}" is not valid on ${t.$type==="ParallelBlock"?"parallel":"group"} (computed from children).`,{node:r})}}checkParallelMinChildren(t,n){let r=t.content.filter(i=>!gr(i));r.length===0?n("error","Parallel block must contain at least 2 children.",{node:t}):r.length===1&&n("warning","Parallel block has only 1 child. Use at least 2 for parallel execution.",{node:t})}checkGroupMinChildren(t,n){t.content.filter(i=>!gr(i)).length===0&&n("error","Group must contain at least 1 child.",{node:t})}checkNoRawStyleProperties(t,n){for(let r of t.properties){let i=ge(r);vh.has(i)&&de(n,"error",{node:r},"NL.E0804",{key:i,entity:hh(t)})}}checkUnknownEntityProperties(t,n){let r=KW[t.$type];if(!r)return;let i=t.$type==="ParallelBlock"||t.$type==="GroupBlock"?new Set(["size","duration","remaining","capacity"]):null;for(let o of t.properties){let s=ge(o);if(r.has(s)||MN.has(s)||vh.has(s)||s==="footnote"||i?.has(s)||s==="wave"||cu(o))continue;let a=[...r,...MN],c=JW(s,r)??EN(s,a)??"";de(n,"warning",{node:o,property:"key"},"NL.W0700",{key:s,entity:hh(t),suggested:c})}}checkRoadmapProperties(t,n){}checkStylePropertyEnum(t,n){let r=ge(t),i=t.value;if(r==="bg"||r==="fg"||r==="text")WN(i)||de(n,"error",{node:t,property:"value"},"NL.E0801",{value:i,key:r});else if(r==="non-working")XN(i,t,n);else if(r in _h){let o=_h[r];o.has(i)||de(n,"error",{node:t,property:"value"},"NL.E0802",{value:i,key:r,allowed:[...o].join(", ")})}else vh.has(r)||de(n,"error",{node:t,property:"key"},"NL.E0803",{key:r})}checkSizeDeclaration(t,n){t.properties.find(i=>ge(i)==="effort")||n("error",`Size "${rt(t)}" requires an "effort:" property.`,{node:t}),t.name&&(uu.test(t.name)||nX.test(t.name))&&n("error",`Size id "${t.name}" collides with the raw duration pattern. Choose a different name (e.g. "xs", "small", "quarter").`,{node:t,property:"name"})}checkStatusDeclaration(t,n){t.name&&Xv.has(t.name)&&n("error",`Status id "${t.name}" collides with the built-in status value. Built-ins: ${[...Xv].join(", ")}.`,{node:t,property:"name"})}checkWaves(t,n){for(let o of yh(t))Hv(n,o);for(let o of xh(t))Hv(n,o);let r=Kn(t);if(r.length===0)return;let i={lanes:t.roadmapEntries.filter(vt),lookup:el(t)};for(let o of tl(i,r))Hv(n,o)}checkDuplicateSizeIds(t,n){let r=new Map;for(let i of t.roadmapEntries)if(Xo(i)&&i.name){let o=r.get(i.name);o?n("error",`Duplicate size id "${i.name}". First declared at ${Eh(o)}.`,{node:i,property:"name"}):r.set(i.name,i)}}checkUtilizationOrdering(t,n){if(wn(t)&&t.entityType!=="swimlane")return;let r=t.properties.find(a=>ge(a)==="utilization-warn-at"),i=t.properties.find(a=>ge(a)==="utilization-over-at");if(!r||!i)return;let o=jN(r.value),s=jN(i.value);o===null||s===null||o>s&&n("error",`utilization-warn-at (${r.value}) must be \u2264 utilization-over-at (${i.value}). Warn fires below over; if both fire at the same point, the warn band collapses to zero.`,{node:r,property:"value"})}checkDefaultDeclaration(t,n){if(!DN.has(t.entityType)){n("error",`"${t.entityType}" is not a supported entity type for default. Allowed: ${[...DN].join(", ")}.`,{node:t,property:"entityType"});return}let r=t.$container,i=-1;for(let s=0;s<r.configEntries.length;s++){let a=r.configEntries[s];if(wn(a)&&a.entityType===t.entityType){if(i<0)i=s;else if(a===t){n("error",`Duplicate "default ${t.entityType}" declaration. Only one is allowed per entity type per file.`,{node:t});break}}}let o=YW[t.entityType];if(o)for(let s of t.properties){let a=ge(s);o.has(a)&&n("error",mh(a,t.entityType),{node:s})}if(t.entityType!=="roadmap")for(let s of t.properties){let a=ge(s);zW.has(a)&&de(n,"warning",{node:s,property:"key"},"NL.W0703",{key:a,entityType:t.entityType})}}checkCalendarBlockConsistency(t,n){let r=t.configEntries.filter(fh),o=t.roadmapDecl?.properties.find(s=>ge(s)==="calendar")?.value;if(r.length>0&&o!=="custom")for(let s of r)n("error",'A "calendar" config block is only valid when the roadmap declares calendar:custom.',{node:s});if(o==="custom"&&r.length===0&&n("error",'calendar:custom requires a "calendar" config block with days-per-week, days-per-month, days-per-quarter, and days-per-year.',{node:t.roadmapDecl,property:"properties"}),o==="custom"&&r.length>0)for(let s of r){let a=new Set(s.properties.map(c=>ge(c)));for(let c of Gv)a.has(c)||n("error",`calendar:custom requires "${c}" in the calendar config block.`,{node:s})}}checkCalendarBlock(t,n){let r=new Set;for(let i of t.properties){let o=ge(i);if(!Gv.has(o)){n("error",`Unknown calendar property "${o}". Allowed: ${[...Gv].join(", ")}.`,{node:i,property:"key"});continue}r.has(o)&&n("error",`Duplicate calendar property "${o}".`,{node:i,property:"key"}),r.add(o),(!FN.test(i.value)||parseInt(i.value,10)<=0)&&n("error",`"${o}" must be a positive integer, got "${i.value}".`,{node:i,property:"value"})}}checkScaleBlock(t,n){let r=new Set;for(let i of t.properties){let o=ge(i);if(!$N.has(o)){n("error",`Unknown scale property "${o}". Allowed: ${[...$N].join(", ")}.`,{node:i,property:"key"});continue}r.has(o)&&n("error",`Duplicate scale property "${o}".`,{node:i,property:"key"}),r.add(o),o==="label-every"&&(!FN.test(i.value)||parseInt(i.value,10)<=0)&&n("error",`"label-every" must be a positive integer, got "${i.value}".`,{node:i,property:"value"})}}checkForwardReferences(t,n){let r=new Map,i=new Map;for(let o=0;o<t.roadmapEntries.length;o++){let s=t.roadmapEntries[o];Xo(s)&&s.name?r.has(s.name)||r.set(s.name,o):Ka(s)&&s.name&&(i.has(s.name)||i.set(s.name,o))}for(let o=0;o<t.roadmapEntries.length;o++){let s=t.roadmapEntries[o];HN(s,a=>{if(cu(a))return;let c=ge(a);if(c==="size"&&a.value){let l=a.value,u=r.get(l);u===void 0?n("error",`Size "${l}" is not declared. Add "size ${l} effort:<literal>" earlier in the roadmap section.`,{node:a,property:"value"}):u>=o&&n("error",`Size "${l}" is referenced before its declaration. Move "size ${l}" above this entity.`,{node:a,property:"value"})}else if(c==="status"&&a.value){let l=a.value;if(Xv.has(l))return;let u=i.get(l);u===void 0?n("error",`Status "${l}" is not a built-in and has no declaration. Add "status ${l}" earlier in the roadmap section.`,{node:a,property:"value"}):u>=o&&n("error",`Status "${l}" is referenced before its declaration. Move "status ${l}" above this entity.`,{node:a,property:"value"})}})}}checkReferenceResolution(t,n){let r=cX(t),i=o=>{HN(o,s=>{let a=ge(s);if(a!=="after"&&a!=="before"&&a!=="on"||cu(s))return;let c=s.value?[s.value]:s.values;for(let l of c)l&&((a==="after"||a==="before")&&Dt.test(l)||r.has(l)||n("error",`${a}: reference "${l}" does not resolve to any declared entity in this file.`,{node:s}))})};for(let o of t.roadmapEntries)i(o)}checkInlineDatePins(t,n){let r=jv(t),i=o=>{let s=o.properties??[],a=rn(o),c=$t(o)||Tt(o)||je(o)||a;for(let l of s){let u=ge(l);if(u!=="after"&&u!=="before"||a&&u==="before")continue;let d=(l.value?[l.value]:l.values).filter(p=>!!p&&Dt.test(p));if(d.length!==0){if(!c){de(n,"error",{node:l},"NL.E0411",{key:u,type:su(o)});continue}d.length>1&&de(n,"error",{node:l},"NL.E0410",{key:u});for(let p of d)switch(r.kind){case"invalid":continue;case"missing":de(n,"error",{node:l},"NL.E0412",{key:u,date:p});continue;case"valid":{let m=new Date(p);if(Number.isNaN(m.getTime()))continue;m<r.date&&de(n,"error",{node:l},"NL.E0413",{key:u,date:p,start:r.iso})}}}}if(vt(o))for(let l of o.content)i(l);else if(Tt(o)||je(o))for(let l of o.content)i(l)};for(let o of t.roadmapEntries)i(o)}checkCircularDependencies(t,n){let r=new Map,i=(p,m)=>{r.has(p)||r.set(p,new Set),r.get(p).add(m)},o=(p,m,g)=>{if(p)for(let _ of m){let x=ge(_);if(x==="after"){let y=_.value?[_.value]:_.values;for(let w of y)w&&(Dt.test(w)||i(p,w))}else if(x==="before"){let y=_.value?[_.value]:_.values;for(let w of y)w&&(Dt.test(w)||i(w,p))}}},s=p=>{if(rn(p))return;let m=p.name,g=p.properties??[];if(o(m,g,t),vt(p))for(let _ of p.content)s(_);else if(Tt(p)||je(p))for(let _ of p.content)s(_)};for(let p of t.roadmapEntries)s(p);let a=0,c=1,l=2,u=new Map;for(let p of r.keys())u.set(p,a);let f=new Set,d=(p,m)=>{u.set(p,c),m.push(p);for(let g of r.get(p)??[]){let _=u.get(g)??a;if(_===c){let x=m.indexOf(g),y=m.slice(x).concat(g),w=[...y].sort().join("\u2192");f.has(w)||(f.add(w),n("error",`Circular dependency detected: ${y.join(" \u2192 ")}.`,{node:t.roadmapDecl??t}))}else _===a&&d(g,m)}m.pop(),u.set(p,l)};for(let p of r.keys())(u.get(p)??a)===a&&d(p,[])}checkPersonDeclarations(t,n){let r=new Map,i=a=>!!a.title||a.properties.length>0||a.description!==void 0,o=a=>{if(!a.name)return;let c=i(a);r.has(a.name)||r.set(a.name,[]),r.get(a.name).push({node:a,isDeclaration:c}),!c&&a.$container.$type==="NowlineFile"&&n("warning",`Bare "person ${a.name}" at roadmap top level has no declaration. Either add properties (title, link, etc.) or remove the line.`,{node:a})},s=a=>{for(let c of a.content)Cn(c)?o(c):Bt(c)&&s(c)};for(let a of t.roadmapEntries)Cn(a)?o(a):Bt(a)&&s(a);for(let[a,c]of r){let l=c.filter(u=>u.isDeclaration);if(l.length>1)for(let u=1;u<l.length;u++)n("error",`Person "${a}" is declared more than once. First declaration at ${Eh(l[0].node)}.`,{node:l[u].node})}}checkSymbolDeclaration(t,n){t.name&&wh.has(t.name)&&de(n,"error",{node:t,property:"name"},"NL.E0805",{name:t.name,builtins:[...wh].sort().join(", ")});let r=t.properties.find(o=>ge(o)==="unicode");r?(!r.value||r.value.length===0)&&de(n,"error",{node:r,property:"value"},"NL.E0807",{name:rt(t)}):de(n,"error",{node:t},"NL.E0806",{name:rt(t)});let i=t.properties.find(o=>ge(o)==="ascii");if(i){let o=i.value??"";iX.test(o)||de(n,"error",{node:i,property:"value"},"NL.E0808",{name:rt(t),length:o.length})}for(let o of t.properties){let s=ge(o);s!=="unicode"&&s!=="ascii"&&s!=="link"&&s!=="description"&&de(n,"error",{node:o,property:"key"},"NL.E0809",{key:s})}}checkDuplicateSymbolIds(t,n){let r=new Map;for(let i of t.configEntries)if(Go(i)&&i.name){let o=r.get(i.name);o?de(n,"error",{node:i,property:"name"},"NL.E0810",{name:i.name,location:Eh(o)}):r.set(i.name,i)}}checkSymbolReferences(t,n){let r=new Map;for(let o=0;o<t.configEntries.length;o++){let s=t.configEntries[o];Go(s)&&s.name&&(r.has(s.name)||r.set(s.name,o))}let i=(o,s,a,c)=>{if(s!=="icon"&&s!=="capacity-icon"||!a||!GN(a)||s==="capacity-icon"&&zv.has(a)||s==="icon"&&wh.has(a))return;let l=r.get(a);if(l===void 0){let u=s==="capacity-icon"?[...zv].sort().join(", "):[...wh].sort().join(", ");de(n,"error",{node:c,property:"value"},"NL.E0811",{key:s,value:a,builtins:u})}else l>=o&&de(n,"error",{node:c,property:"value"},"NL.E0812",{key:s,value:a})};for(let o=0;o<t.configEntries.length;o++){let s=t.configEntries[o];if(qr(s))for(let a of s.properties)i(o,ge(a),a.value,a);else if(wn(s))for(let a of s.properties)i(o,ge(a),a.value,a)}}};function WN(e){return qW.has(e)||eX.test(e)}function XN(e,t,n){e===void 0||HW.has(e)||de(n,"error",{node:t,property:"value"},"NL.E0800",{value:e})}function GN(e){return/^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(e)}function aX(e){return e?vt(e)?"lane":$t(e)?"item":wn(e)?e.entityType==="swimlane"?"lane":"item":"invalid":"invalid"}function lX(e){return e?!!(vt(e)||wn(e)&&e.entityType==="swimlane"):!1}function jN(e){if(!e||e===zN)return null;if(qv.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?t/100:null}if(qN.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?t:null}return null}function Eh(e){let t=e.$cstNode;return t?`line ${t.range.start.line+1}`:"unknown location"}function Yv(e,t){if(vt(e)){t(e.name,e);for(let n of e.content)Vv(n,t)}else Cn(e)?t(e.name,e):Bt(e)?YN(e,t):(Yi(e)||Pn(e)||iu(e)||ou(e)||Xo(e)||Ka(e)||rn(e))&&t(e.name,e)}function YN(e,t){t(e.name,e);for(let n of e.content)Bt(n)&&YN(n,t)}function Vv(e,t){if($t(e))t(e.name,e);else if(Tt(e)){t(e.name,e);for(let n of e.content)Vv(n,t)}else if(je(e)){t(e.name,e);for(let n of e.content)Vv(n,t)}}function HN(e,t){let n=r=>{let i=r.properties;if(Array.isArray(i))for(let o of i)t(o);if(vt(r))for(let o of r.content)n(o);else if(Tt(r)||je(r))for(let o of r.content)n(o);else if(Bt(r))for(let o of r.content)(Bt(o)||Cn(o))&&n(o)};n(e)}function cX(e){let t=new Set;e.roadmapDecl?.name&&t.add(e.roadmapDecl.name);let n=r=>{let i=r.name;if(i&&t.add(i),vt(r))for(let o of r.content)n(o);else if(Tt(r)||je(r))for(let o of r.content)n(o);else if(Bt(r))for(let o of r.content)Bt(o)||Cn(o)?n(o):YS(o)};for(let r of e.roadmapEntries)n(r);return t}function nl(e){return t=>e.anchors.get(t)??e.milestones.get(t)??e.waves?.get(t)}function uX(e){let t=e.$document?.parseResult;return!!t&&(t.lexerErrors.length>0||t.parserErrors.length>0)}function ZN(e,t,n){return n||uX(e)?!1:!!e.roadmapDecl||t.swimlanes.size>0||Kn(e).length>0}function Ho(e,t,n,r,...i){return{severity:e,message:Vr("en-US",r,...i),sourcePath:t,...n===void 0?{}:{line:n},code:r,args:i,rule:"wave"}}function Ah(e){return e.map(t=>t.name)}function KN(e){let t=n=>{let r=e.properties.find(i=>ge(i)===n);return r?r.value??r.values.join(", "):""};return{title:e.title===void 0?"":mn(e.title),style:t("style"),labels:t("labels"),link:t("link"),description:e.description?mn(e.description.text):""}}var fX=["title","style","labels","link","description"];function JN(e,t,n){let r={diagnostics:[],failed:!1};if(n.mode==="ignore"||!n.participates||n.childFile.roadmapEntries.some(p=>rn(p)&&!p.name))return r;let i=n.parentAbs,o=n.inc.$cstNode?.range.start.line,s=n.childRelPath,a=Kn(e),c=Kn(n.childFile),l=p=>({diagnostics:[p],failed:!0});if(a.length===0&&c.length===0)return r;if(c.length===0)return l(Ho("error",i,o,"NL.E0202",{reason:"child-none",path:s,parent:Ah(a)}));if(a.length===0)return l(Ho("error",i,o,"NL.E0202",{reason:"parent-none",path:s,child:Ah(c)}));if(a.length!==c.length||a.some((p,m)=>p.name!==c[m].name))return l(Ho("error",i,o,"NL.E0202",{reason:"mismatch",path:s,child:Ah(c),parent:Ah(a)}));let u=nl(t),f=nl(n.childContent);for(let p=0;p<a.length;p++){let m=lu(a[p],u)?.date??null,g=lu(c[p],f)?.date??null;if(m!==g)return l(Ho("error",i,o,"NL.E0202",{reason:"floor",id:a[p].name,path:s,childFloor:g,parentFloor:m}))}let d=[];for(let p=0;p<a.length;p++){let m=KN(a[p]),g=KN(c[p]),_=fX.filter(x=>m[x]!==g[x]).map(x=>({field:x,there:g[x],here:m[x]}));_.length!==0&&d.push(Ho("warning",i,o,"NL.W0701",{id:a[p].name,path:s,fields:_}))}return{diagnostics:d,failed:!1}}function dX(e){let t=e;for(;t&&!Ya(t);)t=t.$container;return t}function QN(e){let{rootFile:t,rootAbs:n,rootContent:r,files:i,edges:o,failed:s}=e,a=[],c=new Set,l=b=>{let $=JSON.stringify([b.sourcePath,b.line,b.code,b.args,b.message]);c.has($)||(c.add($),a.push(b))},u=b=>{let $=dX(b);return $?i.get($):void 0},f=(b,$)=>{let N=b.node.$cstNode?.range.start.line;return"message"in b?{severity:b.severity,message:b.message,sourcePath:$,...N===void 0?{}:{line:N},rule:"wave"}:Ho(b.severity,$,N,b.code,b.args)},d=[],p=new Set([n]),m=b=>{for(let $ of o.get(b)??[])$.mode==="ignore"||!$.participates||p.has($.childAbs)||(p.add($.childAbs),s.has($.childAbs)||d.push({file:$.childFile,abs:$.childAbs}),m($.childAbs))};m(n);let g=Kn(t),_=new Map(g.map(b=>[b.name,b]));for(let{file:b,abs:$}of d){for(let L of yh(b))l(f(L,$));for(let L of xh(b))l(f(L,$));if(_.size===0)continue;let N=(L,G)=>{let Y=L===void 0?void 0:_.get(L);if(!Y||rn(G))return;let M=Y.$cstNode?Y.$cstNode.range.start.line+1:0;l(Ho("error",$,G.$cstNode?.range.start.line,"NL.E0300",{name:L,location:`${Qa(n)}:${M}`}))};b.roadmapDecl&&N(b.roadmapDecl.name,b.roadmapDecl);for(let L of b.roadmapEntries)Yv(L,N);for(let L of b.configEntries)qr(L)&&N(L.name,L)}if(g.length===0)return a;let x=b=>"message"in b?b.message:`${b.code}\0${JSON.stringify(b.args)}`,y=new Map,w={lanes:t.roadmapEntries.filter(vt),lookup:el(t)};for(let b of tl(w,g,{suppressCycleRefs:!1})){let $=y.get(b.node)??new Set;$.add(x(b)),y.set(b.node,$)}let v=b=>{for(let $ of b){if(y.get($.node)?.has(x($)))continue;let N=u($.node);N===void 0||s.has(N)||l(f($,N))}};v(tl({lanes:[...r.swimlanes.values()],lookup:nl(r)},g,{suppressCycleRefs:!1}));for(let b of r.isolatedRegions){let $=b.content.roadmap?u(b.content.roadmap):void 0;if($!==void 0&&s.has($))continue;let N=[...b.content.waves?.values()??[]];N.length!==0&&v(tl({lanes:[...b.content.swimlanes.values()],lookup:nl(b.content)},N,{suppressCycleRefs:!1}))}return a}var hX=/^\d{4}-\d{2}-\d{2}$/;function nP(e){let t=e?.properties.find(n=>n.key==="start");if(t?.value&&hX.test(t.value)&&!Number.isNaN(new Date(t.value).getTime()))return t.value}function mX(e,t,n){return t&&n?`Included "${e}" declares start:${n}, which doesn't match this file's start:${t}. Both files must declare the same start date, or neither should.`:t?`Included "${e}" has no start:, but this file declares start:${t}. Both files must declare the same start date, or neither should.`:`Included "${e}" declares start:${n}, but this file has no start:. Both files must declare the same start date, or neither should.`}function rl(e){return e.code!==void 0||e.rule==="wave"}function rP(){return{styles:new Map,defaults:new Map,symbols:new Map}}function iP(){return{persons:new Map,teams:new Map,anchors:new Map,labels:new Map,sizes:new Map,statuses:new Map,swimlanes:new Map,milestones:new Map,footnotes:new Map,isolatedRegions:[]}}async function Zv(e,t,n){let r=n.readFile??(async c=>{let{nodeReadFile:l}=await Promise.resolve().then(()=>(tP(),eP));return l(c)}),i={services:n.services,diagnostics:[],resolving:[],processed:new Map,readFile:r,files:new Map,edges:new Map,stubs:new Set,failedWaves:new Set},o=Fv("",t),{config:s,content:a}=await sP(e,o,i);return i.diagnostics.push(...QN({rootFile:e,rootAbs:o,rootContent:a,files:i.files,edges:i.edges,failed:i.failedWaves})),{config:s,content:a,diagnostics:i.diagnostics,processedFiles:new Set(i.processed.keys())}}async function sP(e,t,n){if(n.processed.has(t))return n.processed.get(t);if(n.resolving.includes(t)){n.diagnostics.push({severity:"error",message:`Circular include detected: ${[...n.resolving,t].join(" \u2192 ")}`,sourcePath:t});let l={config:rP(),content:iP()};return n.stubs.add(l.content),n.processed.set(t,l),l}n.resolving.push(t),n.files.set(e,t);let r=rP(),i=iP();TX(r,e),EX(i,e);let o=Kn(e);o.length>0&&(i.waves=new Map(o.map(l=>[l.name,l])));let s=[];n.edges.set(t,s);let a=new Set;for(let l of e.includes){let u=l.path,f=Fv(wN(t),u);if(a.has(f)){n.diagnostics.push({severity:"error",message:`Duplicate include "${u}" in ${Qa(t)}.`,sourcePath:t,line:l.$cstNode?.range.start.line});continue}a.add(f);let d=oP(l,"config")??"merge",p=oP(l,"roadmap")??"merge",m;try{let x=await n.readFile(f);m=await gX(n.services,x,f)}catch(x){n.diagnostics.push({severity:"error",message:`Could not read include "${u}": ${x.message}`,sourcePath:t,line:l.$cstNode?.range.start.line});continue}let{config:g,content:_}=await sP(m,f,n);if(s.push({parentAbs:t,inc:l,childRelPath:u,childAbs:f,mode:p,childFile:m,childContent:_,participates:ZN(m,_,n.stubs.has(_))}),yX(r,g,d,f,n.diagnostics),xX(i,_,g,p,f,u,n.diagnostics),p==="isolate"&&!_.roadmap&&n.diagnostics.push({severity:"error",message:`Cannot isolate "${u}": it has no roadmap declaration.`,sourcePath:t,line:l.$cstNode?.range.start.line}),p!=="ignore"&&m.roadmapDecl){let x=nP(e.roadmapDecl),y=nP(m.roadmapDecl);x!==y&&n.diagnostics.push({severity:"error",message:mX(u,x,y),sourcePath:t,line:l.$cstNode?.range.start.line})}}i.waves&&_X(i,i.waves);for(let l of s){let{diagnostics:u,failed:f}=JN(e,i,l);n.diagnostics.push(...u),f&&n.failedWaves.add(l.childAbs)}n.resolving.pop();let c={config:r,content:i};return n.processed.set(t,c),c}function oP(e,t){let n=e.options.find(r=>r.key===t);if(n&&(n.value==="merge"||n.value==="ignore"||n.value==="isolate"))return n.value}async function gX(e,t,n){let r=yt.file(n),o=e.shared.workspace.LangiumDocumentFactory.fromString(t,r);return await e.shared.workspace.DocumentBuilder.build([o],{validation:!1}),o.parseResult.value}function yX(e,t,n,r,i){if(n==="ignore"||n==="isolate")return;let o=(s,a)=>i.push({severity:"warning",message:`${a} "${s}" from ${Qa(r)} is shadowed by the parent's definition.`,sourcePath:r});Kv(e.styles,t.styles,s=>o(s,"Style")),Kv(e.defaults,t.defaults,s=>o(s,"Default")),Kv(e.symbols,t.symbols,s=>o(s,"Symbol")),t.scale&&!e.scale&&(e.scale=t.scale),t.calendar&&!e.calendar&&(e.calendar=t.calendar)}function xX(e,t,n,r,i,o,s){if(r==="ignore")return;if(r==="isolate"){t.roadmap&&e.isolatedRegions.push({sourcePath:o,config:n,content:t});return}let a=(c,l)=>s.push({severity:"warning",message:`${l} "${c}" from ${Qa(i)} is shadowed by the parent's definition.`,sourcePath:i});Yr(e.persons,t.persons,c=>a(c,"Person")),Yr(e.teams,t.teams,c=>a(c,"Team")),Yr(e.anchors,t.anchors,c=>a(c,"Anchor")),Yr(e.labels,t.labels,c=>a(c,"Label")),Yr(e.sizes,t.sizes,c=>a(c,"Size")),Yr(e.statuses,t.statuses,c=>a(c,"Status")),Yr(e.swimlanes,t.swimlanes,c=>a(c,"Swimlane")),Yr(e.milestones,t.milestones,c=>a(c,"Milestone")),Yr(e.footnotes,t.footnotes,c=>a(c,"Footnote")),t.roadmap&&!e.roadmap&&(e.roadmap=t.roadmap)}function Kv(e,t,n){for(let[r,i]of t){if(e.has(r)){e.get(r)!==i&&n(r);continue}e.set(r,i)}}function Yr(e,t,n){let r=new Set(e.values());for(let[i,o]of t)if(!r.has(o)){if(!o.name&&o.title){e.set(Jv(e,aP(o.title)),o);continue}if(e.has(i)){n(i);continue}e.set(i,o)}}function TX(e,t){for(let n of t.configEntries)vX(e,n)}function vX(e,t){KS(t)?e.scale||(e.scale=t):fh(t)?e.calendar||(e.calendar=t):qr(t)?t.name&&!e.styles.has(t.name)&&e.styles.set(t.name,t):Go(t)?t.name&&!e.symbols.has(t.name)&&e.symbols.set(t.name,t):wn(t)&&(e.defaults.has(t.entityType)||e.defaults.set(t.entityType,t))}function wX(e){let t={swimlanes:new Set,persons:new Set,teams:new Set,anchors:new Set,labels:new Set,sizes:new Set,statuses:new Set,milestones:new Set,footnotes:new Set};for(let n of e){let r=n.name;if(r){if(vt(n))t.swimlanes.add(r);else if(Cn(n))t.persons.add(r);else if(Bt(n))t.teams.add(r);else if(Yi(n))t.anchors.add(r);else if(ou(n))t.labels.add(r);else if(Xo(n))t.sizes.add(r);else if(Ka(n))t.statuses.add(r);else if(Pn(n))t.milestones.add(r);else if(iu(n))t.footnotes.add(r);else if(rn(n))for(let i of Object.values(t))i.add(r)}}return t}function _X(e,t){let n=[e.persons,e.teams,e.anchors,e.labels,e.sizes,e.statuses,e.swimlanes,e.milestones,e.footnotes],r=(i,o)=>t.has(i)&&!o.name&&!!o.title;for(let i of n){let o=[...i];if(!o.some(([a,c])=>r(a,c)))continue;let s=new Set([...i.keys(),...t.keys()]);i.clear();for(let[a,c]of o){let l=r(a,c)?Jv(i,a,s):a;s.add(l),i.set(l,c)}}}function EX(e,t){t.roadmapDecl&&!e.roadmap&&(e.roadmap=t.roadmapDecl);let n=wX(t.roadmapEntries);for(let r of t.roadmapEntries)bX(e,r,n)}function aP(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"entity"}function Jv(e,t,n){let r=o=>e.has(o)||(n?.has(o)??!1);if(!r(t))return t;let i=2;for(;r(`${t}-${i}`);)i++;return`${t}-${i}`}function Kr(e,t,n){t.name?e.has(t.name)||e.set(t.name,t):t.title&&e.set(Jv(e,aP(t.title),n),t)}function bX(e,t,n){vt(t)?Kr(e.swimlanes,t,n.swimlanes):Cn(t)?Kr(e.persons,t,n.persons):Bt(t)?Kr(e.teams,t,n.teams):Yi(t)?Kr(e.anchors,t,n.anchors):ou(t)?Kr(e.labels,t,n.labels):Xo(t)?Kr(e.sizes,t,n.sizes):Ka(t)?Kr(e.statuses,t,n.statuses):Pn(t)?Kr(e.milestones,t,n.milestones):iu(t)&&Kr(e.footnotes,t,n.footnotes)}var Qv=class extends na{runConverter(t,n,r){return t.name==="PROPERTY_KEY_WITH_COLON"||t.name==="INCLUDE_OPTION_KEY"?n.endsWith(":")?n.slice(0,-1):n:super.runConverter(t,n,r)}},ew=class extends Qc{isStartOfLine(t,n){if(!super.isStartOfLine(t,n))return!1;let r=n-1;for(;r>=0&&(t[r]===" "||t[r]===" ");)r--;for(;r>=0&&(t[r]==="\r"||t[r]===`
|
|
2769
2769
|
`);)r--;for(;r>=0&&(t[r]===" "||t[r]===" ");)r--;return r<0||t[r]!=="\\"}},lP={parser:{TokenBuilder:()=>new ew({indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[["[","]"]]}),Lexer:e=>new ih(e),ParserConfig:()=>({maxLookahead:4}),ValueConverter:()=>new Qv},validation:{NowlineValidator:()=>new bh}};function tw(e={}){let t=e.shared??Ca(rh(oh),QS),n=Ca(nh({shared:t}),eN,lP);return t.ServiceRegistry.register(n),VN(n),{shared:t,Nowline:n}}function nw(e,t){return t.code===void 0?t.message:Vr(e,t.code,...t.args??[])}function rw(e){let{content:t}=e,n=[...t.waves?.values()??[]];if(n.length===0)return;let r=new Map;n.forEach((u,f)=>{r.set(u.name,f+1)});let i=nl(t),o=n.map(u=>lu(u,i)),s=new WeakMap,a=new WeakMap,c=u=>{let f=gh(u,r);for(let[d,p]of f.waveOf)s.set(d,p);for(let[d,p]of f.leadOf)a.set(d,p)};c([...t.swimlanes.values()]);for(let u of t.isolatedRegions)c([...u.content.swimlanes.values()]);let l=u=>$t(u)?s.get(u):void 0;return{waves:n,index:r,floors:o,waveOf:s,leadOf:a,memberWave:l,isMember:(u,f)=>{let d=l(u);return d!==void 0&&(f===void 0||d===f)}}}var Rh=class{constructor(t){I(this,"items");I(this,"brackets");this.items=t.itemBars,this.brackets=t.brackets}hasObstacle(t,n,r){let i=Math.min(n,r),o=Math.max(n,r);for(let s of this.items)if(!(t<=s.x||t>=s.x+s.width)&&!(s.y+s.height<=i||s.y>=o))return!0;return!1}bracketsNear(t,n,r,i){let o=Math.min(n,r),s=Math.max(n,r),a=[];for(let c of this.brackets)Math.abs(c.x-t)>i||c.yBottom<=o||c.yTop>=s||a.push(c);return a}};function cP(e,t){let n=[],r=[],i=s=>{if(s.kind==="item"){n.push(s.box);return}if(s.kind==="parallel"){if(s.style.bracket==="solid"||s.style.bracket==="dashed"){let l=s.box.y-12,u=s.box.y+s.box.height+12,f=s.box.x,d=s.box.x+s.box.width;r.push({x:f,yTop:l,yBottom:u}),r.push({x:d,yTop:l,yBottom:u}),r.push({x:f+4,yTop:l-1,yBottom:l+1}),r.push({x:f+4,yTop:u-1,yBottom:u+1}),r.push({x:d-4,yTop:l-1,yBottom:l+1}),r.push({x:d-4,yTop:u-1,yBottom:u+1})}for(let a of s.children)i(a);return}if(s.kind==="group"){!(s.style.bg!=="none"&&s.style.bg!=="#ffffff")&&s.style.bracket&&s.style.bracket!=="none"&&r.push({x:s.box.x,yTop:s.box.y,yBottom:s.box.y+s.box.height});for(let c of s.children)i(c);return}},o=s=>{for(let a of s.children)i(a);for(let a of s.nested)o(a)};for(let s of e)o(s);for(let s of t)for(let a of s.nestedSwimlanes)o(a);return{itemBars:n,brackets:r}}function AX(e,t){let{from:n,to:r}=e;if(Math.abs(n.y-r.y)<.5)return{x:(n.x+r.x)/2,underBar:!1,range:null};let i=Math.min(n.y,r.y),o=Math.max(n.y,r.y);if(n.x<=r.x){let a=n.x+6,c=r.x-6;if(a>c)return{x:r.x-6,underBar:!0,range:null};let l={minX:a,maxX:c},u=(n.x+r.x)/2,f=Math.max(a,Math.min(c,u));if(!t.hasObstacle(f,i,o))return{x:f,underBar:!1,range:l};let d=c-a;for(let p=1;p<=d;p++){let m=f-p;if(m>=a&&!t.hasObstacle(m,i,o))return{x:m,underBar:!1,range:l};let g=f+p;if(g<=c&&!t.hasObstacle(g,i,o))return{x:g,underBar:!1,range:l}}return{x:f,underBar:!0,range:l}}let s=[n.x+10,r.x-10];for(let a of s)if(a>0&&!t.hasObstacle(a,i,o))return{x:a,underBar:!1,range:null};return{x:n.x+10,underBar:!0,range:null}}function RX(e,t,n,r){let i=Math.min(n.from.y,n.to.y),o=Math.max(n.from.y,n.to.y),s=r.bracketsNear(e,i,o,4);if(s.length===0)return{x:e,forceUnderBar:!1};let a=s[0],c=Math.abs(s[0].x-e);for(let d=1;d<s.length;d++){let p=Math.abs(s[d].x-e);p<c&&(a=s[d],c=p)}let l=[a.x+4,a.x-4],u=4-.01;for(let d of l){if(t&&(d<t.minX||d>t.maxX))continue;let p=t?d:Math.max(Math.min(n.from.x,n.to.x)+1,Math.min(Math.max(n.from.x,n.to.x)-1,d));if(r.bracketsNear(p,i,o,u).length===0)return{x:p,forceUnderBar:!1}}return{x:t?Math.min(Math.max(e,t.minX),t.maxX):e,forceUnderBar:!0}}function kX(e){let t=[...e].sort((i,o)=>Math.abs(i.channelX-o.channelX)>=1?i.channelX-o.channelX:i.orderIndex-o.orderIndex),n=new Map,r=0;for(;r<t.length;){let i=r+1;for(;i<t.length&&Math.abs(t[i].channelX-t[r].channelX)<1;)i++;let s=[...t.slice(r,i)].sort((c,l)=>{let u=Math.min(c.req.from.y,c.req.to.y),f=Math.min(l.req.from.y,l.req.to.y);return Math.abs(u-f)>.5?u-f:c.orderIndex-l.orderIndex}),a=[];for(let c of s){let l=Math.min(c.req.from.y,c.req.to.y),u=Math.max(c.req.from.y,c.req.to.y),f=-1;for(let d=0;d<a.length;d++)if(a[d]<=l){f=d,a[d]=u;break}f===-1&&(f=a.length,a.push(u)),n.set(c.orderIndex,f)}r=i}return n}function IX(e){if(e===0||e>4)return 0;let t=Math.ceil(e/2);return(e%2===1?1:-1)*t*3}function SX(e){let t=e.from.x>=e.to.x?{x:e.to.x-1,y:e.from.y}:e.from;return{fromId:e.fromId,toId:e.toId,waypoints:[t,e.to],underBar:!1}}function uP(e,t){let n=new Array(e.length),r=[];for(let o=0;o<e.length;o++){let s=e[o];if(s.isMarkerSource){n[o]=SX(s);continue}if(Math.abs(s.from.y-s.to.y)<.5&&s.to.x-s.from.x<20){n[o]={fromId:s.fromId,toId:s.toId,waypoints:[s.from,s.to],underBar:!1};continue}let{x:a,underBar:c,range:l}=AX(s,t),{x:u,forceUnderBar:f}=RX(a,l,s,t),d=c||f;r.push({req:s,channelX:u,underBar:d,orderIndex:o})}let i=kX(r);for(let o of r){let s=IX(i.get(o.orderIndex)??0),a=o.channelX+s;n[o.orderIndex]={fromId:o.req.fromId,toId:o.req.toId,waypoints:NX(o.req.from,o.req.to,a),underBar:o.underBar}}return n}function NX(e,t,n){return Math.abs(e.y-t.y)<.5?[e,t]:[e,{x:n,y:e.y},{x:n,y:t.y},t]}var fu="en-US",PX={"en-US":{nowLabel:"now",quarterPrefix:"Q",waveHeldBy:"held by",waveNoItems:"no items",waveBackgroundItem:"Background (no wave)",waveLegendBackground:"Background work (not in a wave)",waveLegendBoundary:"Wave boundary",waveLegendPrefix:"Waves:",wavesDeclaredPlaceholder:"Waves declared: {names} \u2014 no items assigned yet"},fr:{nowLabel:"maint.",quarterPrefix:"T",waveHeldBy:"retenue par",waveNoItems:"aucun \xE9l\xE9ment",waveBackgroundItem:"Travail de fond (hors vague)",waveLegendBackground:"Travail de fond (dans aucune vague)",waveLegendBoundary:"Limite de vague",waveLegendPrefix:"Vagues\xA0:",wavesDeclaredPlaceholder:"Vagues d\xE9clar\xE9es\xA0: {names} \u2014 aucun \xE9l\xE9ment affect\xE9 pour l\u2019instant"}};function fP(e,t){return t??e??fu}function il(e){let t={};for(let n of CX(e)){let r=PX[n];if(r)for(let i of Object.keys(r))t[i]===void 0&&r[i]!==void 0&&(t[i]=r[i])}return t}function dP(e,t){return e.wavesDeclaredPlaceholder.replace("{names}",()=>t.join(", "))}function CX(e){let t=[],n=OX(e);for(;n.length>0;){t.includes(n)||t.push(n);let r=n.lastIndexOf("-");if(r<=0)break;n=n.slice(0,r)}return t.includes(fu)||t.push(fu),t}function OX(e){return e.split("-").map((n,r)=>r===0?n.toLowerCase():/^[a-zA-Z]{2}$/.test(n)?n.toUpperCase():n).join("-")}function pP(e){let{box:t,afterDate:n,beforeDate:r,hasLinkIcon:i,footnoteCount:o}=e;if(!n&&!r)return[];let s=[],a=Er,c=t.y+$_,l=Qm(t.width);if(n){let u=eg(t.x,i),f=l?{x:t.x-Ar-a,y:c}:{x:u,y:c};s.push({side:"after",isoDate:n,glyphTopLeft:f,glyphSize:a,spilled:l})}if(r){let u=t.x+t.width,f=tg(u,o),d=l?{x:u+Ar,y:c}:{x:f,y:c};s.push({side:"before",isoDate:r,glyphTopLeft:d,glyphSize:a,spilled:l})}return s}function kh(e){let{box:t,afterDate:n,beforeDate:r,row:i}=e;if(!n&&!r)return[];let o=[],s=Er,a,c,l;if(i.kind==="title-tab-row"){a=t.y+(io-s)/2;let u=i.titleTabWidth!==void 0?t.x+i.titleTabWidth:void 0;c=u!==void 0?u+br:t.x+co,l=u??t.x}else a=t.y-as+(as-s)/2,c=t.x+co,l=i.title?fo(t.x,i.titleInsetX,!!n)+ig(i.title):t.x;if(n&&(l=Math.max(l,c+s),o.push({side:"after",isoDate:n,glyphTopLeft:{x:c,y:a},glyphSize:s,spilled:!1})),r){let u=t.x+t.width-Jm-s;o.push({side:"before",isoDate:r,glyphTopLeft:{x:Math.max(u,l+br),y:a},glyphSize:s,spilled:!1})}return o}function On(e){for(let t of e)if(/^\d{4}-\d{2}-\d{2}$/.test(t))return t}function hP(e){return e.box.y+e.box.height-er/2}function mP(e,t){let{box:n}=e;return{x:n.x,y:n.y+t/2}}function gP(e,t){let{box:n}=e;return{x:n.x+n.width,y:e.textSpills?hP(e):n.y+t/2}}function yP(e,t){return e.textSpills?hP(e):e.box.y+t/2}function Ih(e,t){return{x:e,y:t,height:0,maxX:e}}function Sh(e,t){e.box.y+=t;for(let n of e.inlineDatePins??[])n.glyphTopLeft.y+=t;if(e.kind==="item"){for(let n of e.labelChips)n.box.y+=t;e.overflowBox&&(e.overflowBox.y+=t);return}for(let n of e.children)Sh(n,t)}function Nh(e,t){e.box.y+=t;for(let n of e.children)Sh(n,t);for(let n of e.nested)Nh(n,t)}function xP(e,t){e.box.y+=t;for(let n of e.nestedSwimlanes)Nh(n,t)}var ol=class{constructor(t){I(this,"rows");I(this,"opts");this.opts=t,this.rows=[{y:t.originY,height:t.minRowHeight,rightEdge:t.laneLeftX,spillX:t.laneLeftX,placedChildren:[]}]}placeItem(t){for(let r=0;r<this.rows.length;r+=1){let i=this.rows[r];if(!(t.desiredStart<i.rightEdge)&&!(t.desiredStart<i.spillX)&&!this.rowIntersectsCorridor(i,t))return{rowIndex:r,y:i.y}}let n=this.appendRow(Math.max(this.opts.minRowHeight,t.predictedHeight));return{rowIndex:this.rows.length-1,y:n.y}}placeBlock(){let t=this.rows[this.rows.length-1];if(t.rightEdge>this.opts.laneLeftX){let n=this.appendRow(this.opts.minRowHeight);return{rowIndex:this.rows.length-1,y:n.y}}return{rowIndex:this.rows.length-1,y:t.y}}commitItem(t){let n=this.rows[t.rowIndex],r=Math.max(t.placed.box.height,t.rowHeight??0);this.growRowHeight(t.rowIndex,r),n.rightEdge=t.logicalEnd,n.spillX=t.spillReservation??this.opts.laneLeftX,n.placedChildren.push(t.placed)}commitBlock(t){let n=this.rows[t.rowIndex];this.growRowHeight(t.rowIndex,t.blockHeight),n.rightEdge=t.blockEnd,n.spillX=t.spillReservation??this.opts.laneLeftX,n.placedChildren.push(t.placed)}usedHeight(){let t=this.rows[this.rows.length-1];return t.y+t.height-this.opts.originY}usedRightX(){let t=this.opts.laneLeftX;for(let n of this.rows)n.rightEdge>t&&(t=n.rightEdge),n.spillX>t&&(t=n.spillX);return t}rowIntersectsCorridor(t,n){return this.opts.slackCorridors.some(r=>r.y>=t.y&&r.y<t.y+t.height&&n.desiredStart<r.xEnd&&n.desiredEnd>r.xStart&&r.slackPredId!==n.childId)}appendRow(t){let n=this.rows[this.rows.length-1],r={y:n.y+n.height,height:t,rightEdge:this.opts.laneLeftX,spillX:this.opts.laneLeftX,placedChildren:[]};return this.rows.push(r),r}growRowHeight(t,n){let r=this.rows[t],i=n-r.height;if(!(i<=0)){r.height=n;for(let o=t+1;o<this.rows.length;o+=1){let s=this.rows[o];s.y+=i;for(let a of s.placedChildren)Sh(a,i)}}}};function Ph(e){return e==="hide"||e==="show"}var TP={red:"#f87171",blue:"#60a5fa",yellow:"#facc15",green:"#34d399",orange:"#fb923c",purple:"#a78bfa",gray:"#94a3b8",navy:"#818cf8",white:"#e2e8f0"},Zr={bg:"none",fg:"#e2e8f0",text:"#e2e8f0",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},iw={name:"dark",surface:{page:"#0b1220",chart:"#111827",headerBox:"#1e293b"},entities:{roadmap:{...Zr,headerHeight:"md",padding:"md"},swimlane:{...Zr,fg:"#e2e8f0",text:"#e2e8f0",padding:"sm",spacing:"none",textSize:"sm"},item:{...Zr,bg:"#0f172a",fg:"#94a3b8",text:"#e2e8f0",shadow:"subtle",cornerRadius:"sm"},parallel:{...Zr,bracket:"none",padding:"xs"},group:{...Zr,bracket:"solid",padding:"xs",fg:"#94a3b8"},anchor:{...Zr,bg:"#0b1220",fg:"#cbd5e1",text:"#cbd5e1",cornerRadius:"sm"},milestone:{...Zr,bg:"#e2e8f0",fg:"#e2e8f0",text:"#0b1220",border:"solid"},footnote:{...Zr,bg:"none",fg:"#94a3b8",text:"#e2e8f0",textSize:"sm"},label:{...Zr,bg:"#1e293b",fg:"#94a3b8",text:"#e2e8f0",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#111827",bandOdd:"#0f172a",separator:"#1f2937",frameTabText:"#e2e8f0",frameTabMuted:"#94a3b8",border:"#334155",tabFill:"#1e293b",tabStroke:"#475569",tabText:"#e2e8f0",ownerText:"#94a3b8",footnoteIndicator:"#f87171",rowTintEven:"#0f172a",rowTintOdd:"#1e293b",utilizationOk:"#34d399",utilizationWarn:"#fbbf24",utilizationOver:"#f87171"},timeline:{gridLine:"#475569",minorGridLine:"#334155",nonWorkingSeam:"#6b7a90",nonWorkingFill:"#94a3b8",tickMark:"#334155",labelText:"#cbd5e1",panelFill:"#0f172a",border:"#334155"},header:{cardBorder:"#475569",author:"#94a3b8"},item:{overflowX:"#f87171",linkIconFg:"#94a3b8",overflowTailFill:"#7f1d1d",overflowTailStroke:"#f87171",overflowCaption:"#fecaca"},parallel:{bracketStroke:"#cbd5e1"},anchorDiamond:{fill:"#0f172a",stroke:"#cbd5e1",label:"#cbd5e1",cutLine:"#94a3b8"},milestoneDiamond:{fill:"#e2e8f0",label:"#e2e8f0",cutLineNormal:"#a5b4fc",cutLineOverrun:"#ef4444",slack:"#cbd5e1"},footnotePanel:{fill:"#0f172a",border:"#334155",header:"#e2e8f0",title:"#e2e8f0",description:"#94a3b8",number:"#f87171"},nowline:{stroke:"#f87171",labelText:"#0b1220",labelBg:"#f87171"},milestone:{dashedInk:"#a5b4fc",overrun:"#ef4444"},anchor:{predecessorLine:"#94a3b8"},dependency:{edgeStroke:"#cbd5e1",overflowStroke:"#ef5350"},footnote:{indicatorText:"#f87171",descriptionMuted:"#94a3b8"},includeRegion:{border:"#475569",label:"#cbd5e1",badge:"#94a3b8",fill:"#0b1220",tabFill:"#111827",tabStroke:"#475569",tabText:"#e2e8f0",badgeFill:"#1e293b",badgeStroke:"#475569",badgeText:"#94a3b8"},wave:{stripFill:"#042f2e",stripFillAlt:"#134e4a",labelText:"#99f6e4",labelMuted:"#5eead4",boundary:"#2dd4bf",hatch:"#0f172a",hatchOnDark:"#ffffff"},arrowhead:{neutral:"#94a3b8",light:"#64748b",dark:"#e2e8f0"},status:{done:"#34d399",inProgress:"#60a5fa",atRisk:"#facc15",blocked:"#ef4444",planned:"#94a3b8",neutral:"#94a3b8"},statusDot:{onLight:{done:"#065f46",inProgress:"#1e3a8a",atRisk:"#92400e",blocked:"#991b1b",planned:"#334155",neutral:"#334155"},onDark:{done:"#d1fae5",inProgress:"#dbeafe",atRisk:"#fef3c7",blocked:"#fee2e2",planned:"#e2e8f0",neutral:"#e2e8f0"}},attribution:{mark:"#cbd5e1",link:"#f87171"},diagnostic:{overlayBg:"#7f1d1d",errorText:"#fecaca"}};var vP={red:"#4a4a4a",blue:"#6b6b6b",green:"#8a8a8a",yellow:"#c8c8c8",orange:"#5c5c5c",purple:"#3a3a3a",gray:"#9e9e9e",navy:"#2a2a2a",white:"#ffffff"},Jr={bg:"none",fg:"#1a1a1a",text:"#1a1a1a",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},ow={name:"grayscale",surface:{page:"#f5f5f5",chart:"#ffffff",headerBox:"#ffffff"},entities:{roadmap:{...Jr,headerHeight:"md",padding:"md"},swimlane:{...Jr,fg:"#3a3a3a",text:"#3a3a3a",padding:"sm",spacing:"none",textSize:"sm"},item:{...Jr,bg:"#ffffff",fg:"#9e9e9e",text:"#1a1a1a",shadow:"subtle",cornerRadius:"sm"},parallel:{...Jr,bracket:"none",padding:"xs"},group:{...Jr,bracket:"solid",padding:"xs",fg:"#595959"},anchor:{...Jr,bg:"#1a1a1a",fg:"#1a1a1a",text:"#1a1a1a",cornerRadius:"sm"},milestone:{...Jr,bg:"#2a2a2a",fg:"#2a2a2a",text:"#ffffff",border:"solid"},footnote:{...Jr,bg:"none",fg:"#595959",text:"#595959",textSize:"sm"},label:{...Jr,bg:"#e8e8e8",fg:"#595959",text:"#595959",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#ffffff",bandOdd:"#f5f5f5",separator:"#d4d4d4",frameTabText:"#3a3a3a",frameTabMuted:"#737373",border:"#d4d4d4",tabFill:"#e8e8e8",tabStroke:"#bdbdbd",tabText:"#3a3a3a",ownerText:"#737373",footnoteIndicator:"#4a4a4a",rowTintEven:"#ffffff",rowTintOdd:"#f5f5f5",utilizationOk:"#8a8a8a",utilizationWarn:"#595959",utilizationOver:"#1a1a1a"},timeline:{gridLine:"#bdbdbd",minorGridLine:"#d4d4d4",nonWorkingSeam:"#9a9a9a",nonWorkingFill:"#737373",tickMark:"#bdbdbd",labelText:"#737373",panelFill:"#ffffff",border:"#d4d4d4"},header:{cardBorder:"#d4d4d4",author:"#737373"},item:{overflowX:"#1a1a1a",linkIconFg:"#1a1a1a",overflowTailFill:"#e8e8e8",overflowTailStroke:"#4a4a4a",overflowCaption:"#3a3a3a"},parallel:{bracketStroke:"#3a3a3a"},anchorDiamond:{fill:"#ffffff",stroke:"#3a3a3a",label:"#3a3a3a",cutLine:"#737373"},milestoneDiamond:{fill:"#1a1a1a",label:"#1a1a1a",cutLineNormal:"#2a2a2a",cutLineOverrun:"#4a4a4a",slack:"#1a1a1a"},footnotePanel:{fill:"#ffffff",border:"#d4d4d4",header:"#1a1a1a",title:"#1a1a1a",description:"#737373",number:"#4a4a4a"},nowline:{stroke:"#1a1a1a",labelText:"#ffffff",labelBg:"#1a1a1a"},milestone:{dashedInk:"#9e9e9e",overrun:"#4a4a4a"},anchor:{predecessorLine:"#9e9e9e"},dependency:{edgeStroke:"#595959",overflowStroke:"#1a1a1a"},footnote:{indicatorText:"#4a4a4a",descriptionMuted:"#737373"},includeRegion:{border:"#9e9e9e",label:"#3a3a3a",badge:"#737373",fill:"#f5f5f5",tabFill:"#ffffff",tabStroke:"#bdbdbd",tabText:"#1a1a1a",badgeFill:"#e8e8e8",badgeStroke:"#bdbdbd",badgeText:"#595959"},wave:{stripFill:"#fafafa",stripFillAlt:"#e0e0e0",labelText:"#212121",labelMuted:"#616161",boundary:"#616161",hatch:"#000000",hatchOnDark:"#ffffff"},arrowhead:{neutral:"#595959",light:"#9e9e9e",dark:"#1a1a1a"},status:{done:"#8a8a8a",inProgress:"#595959",atRisk:"#737373",blocked:"#3a3a3a",planned:"#bdbdbd",neutral:"#bdbdbd"},statusDot:{onLight:{done:"#3a3a3a",inProgress:"#2a2a2a",atRisk:"#4a4a4a",blocked:"#1a1a1a",planned:"#595959",neutral:"#595959"},onDark:{done:"#d4d4d4",inProgress:"#e8e8e8",atRisk:"#c8c8c8",blocked:"#f0f0f0",planned:"#d4d4d4",neutral:"#d4d4d4"}},attribution:{mark:"#9e9e9e",link:"#1a1a1a"},diagnostic:{overlayBg:"#e8e8e8",errorText:"#1a1a1a"}};var wP={red:"#e53935",blue:"#1e88e5",yellow:"#fdd835",green:"#43a047",orange:"#fb8c00",purple:"#8e24aa",gray:"#9e9e9e",navy:"#0d47a1",white:"#ffffff"},Qr={bg:"none",fg:"#0f172a",text:"#0f172a",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},sw={name:"light",surface:{page:"#f8fafc",chart:"#ffffff",headerBox:"#ffffff"},entities:{roadmap:{...Qr,headerHeight:"md",padding:"md"},swimlane:{...Qr,fg:"#334155",text:"#334155",padding:"sm",spacing:"none",textSize:"sm"},item:{...Qr,bg:"#ffffff",fg:"#94a3b8",text:"#0f172a",shadow:"subtle",cornerRadius:"sm"},parallel:{...Qr,bracket:"none",padding:"xs"},group:{...Qr,bracket:"solid",padding:"xs",fg:"#475569"},anchor:{...Qr,bg:"#0f172a",fg:"#0f172a",text:"#0f172a",cornerRadius:"sm"},milestone:{...Qr,bg:"#312e81",fg:"#312e81",text:"#ffffff",border:"solid"},footnote:{...Qr,bg:"none",fg:"#475569",text:"#475569",textSize:"sm"},label:{...Qr,bg:"#f1f5f9",fg:"#475569",text:"#475569",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#ffffff",bandOdd:"#f8fafc",separator:"#e2e8f0",frameTabText:"#334155",frameTabMuted:"#64748b",border:"#e2e8f0",tabFill:"#f1f5f9",tabStroke:"#cbd5e1",tabText:"#334155",ownerText:"#64748b",footnoteIndicator:"#dc2626",rowTintEven:"#ffffff",rowTintOdd:"#f8fafc",utilizationOk:"#10b981",utilizationWarn:"#f59e0b",utilizationOver:"#ef4444"},timeline:{gridLine:"#cbd5e1",minorGridLine:"#e2e8f0",nonWorkingSeam:"#a0aec0",nonWorkingFill:"#64748b",tickMark:"#cbd5e1",labelText:"#64748b",panelFill:"#ffffff",border:"#e2e8f0"},header:{cardBorder:"#e2e8f0",author:"#64748b"},item:{overflowX:"#dc2626",linkIconFg:"#0f172a",overflowTailFill:"#fee2e2",overflowTailStroke:"#ef4444",overflowCaption:"#b91c1c"},parallel:{bracketStroke:"#334155"},anchorDiamond:{fill:"#ffffff",stroke:"#334155",label:"#334155",cutLine:"#64748b"},milestoneDiamond:{fill:"#0f172a",label:"#0f172a",cutLineNormal:"#1e1b4b",cutLineOverrun:"#b91c1c",slack:"#0f172a"},footnotePanel:{fill:"#ffffff",border:"#e2e8f0",header:"#0f172a",title:"#0f172a",description:"#64748b",number:"#dc2626"},nowline:{stroke:"#e53e3e",labelText:"#ffffff",labelBg:"#e53e3e"},milestone:{dashedInk:"#94a3b8",overrun:"#ef4444"},anchor:{predecessorLine:"#94a3b8"},dependency:{edgeStroke:"#475569",overflowStroke:"#d32f2f"},footnote:{indicatorText:"#e53e3e",descriptionMuted:"#64748b"},includeRegion:{border:"#94a3b8",label:"#334155",badge:"#64748b",fill:"#f8fafc",tabFill:"#ffffff",tabStroke:"#cbd5e1",tabText:"#0f172a",badgeFill:"#e2e8f0",badgeStroke:"#cbd5e1",badgeText:"#475569"},wave:{stripFill:"#f0fdfa",stripFillAlt:"#ccfbf1",labelText:"#134e4a",labelMuted:"#0f766e",boundary:"#0d9488",hatch:"#0f172a",hatchOnDark:"#ffffff"},arrowhead:{neutral:"#475569",light:"#94a3b8",dark:"#0f172a"},status:{done:"#10b981",inProgress:"#3b82f6",atRisk:"#f59e0b",blocked:"#ef4444",planned:"#94a3b8",neutral:"#94a3b8"},statusDot:{onLight:{done:"#065f46",inProgress:"#1e3a8a",atRisk:"#92400e",blocked:"#991b1b",planned:"#334155",neutral:"#334155"},onDark:{done:"#d1fae5",inProgress:"#dbeafe",atRisk:"#fef3c7",blocked:"#fee2e2",planned:"#e2e8f0",neutral:"#e2e8f0"}},attribution:{mark:"#94a3b8",link:"#e53e3e"},diagnostic:{overlayBg:"#fee2e2",errorText:"#991b1b"}};var _P=["light","dark","grayscale"],aw={light:sw,dark:iw,grayscale:ow};var LX={greyscale:"grayscale"};function lw(e){let t=e.toLowerCase(),n=LX[t]??t;return _P.find(r=>r===n)}var $X={grey:"gray",violet:"purple"};function ei(e,t){if(e==="none")return"none";if(e.startsWith("#"))return e;let n=t.name==="dark"?TP:t.name==="grayscale"?vP:wP,r=$X[e]??e,i=n[r];return typeof i=="string"?i:e}function sl(e){return e.key.endsWith(":")?e.key.slice(0,-1):e.key}function DX(e,t){return{bg:ei(e.bg,t),fg:ei(e.fg,t),text:ei(e.text,t),border:e.border,icon:e.icon,shadow:e.shadow,font:e.font,weight:e.weight,italic:e.italic,textSize:e.textSize,padding:e.padding,spacing:e.spacing,headerHeight:e.headerHeight,cornerRadius:e.cornerRadius,bracket:e.bracket,headerPosition:"beside",capacityIcon:e.capacityIcon,timelinePosition:"top",minorGrid:!1,nonWorking:"hide"}}function cw(e,t,n,r){switch(t){case"bg":e.bg=ei(n,r);break;case"fg":e.fg=ei(n,r);break;case"text":e.text=ei(n,r);break;case"border":(n==="solid"||n==="dashed"||n==="dotted")&&(e.border=n);break;case"icon":e.icon=n;break;case"shadow":(n==="none"||n==="subtle"||n==="soft"||n==="hard")&&(e.shadow=n);break;case"font":(n==="sans"||n==="serif"||n==="mono")&&(e.font=n);break;case"weight":(n==="thin"||n==="light"||n==="normal"||n==="bold")&&(e.weight=n);break;case"italic":e.italic=n==="true";break;case"text-size":e.textSize=du(n,"xl");break;case"padding":e.padding=du(n,"xl");break;case"spacing":e.spacing=du(n,"xl");break;case"header-height":e.headerHeight=du(n,"xl");break;case"corner-radius":e.cornerRadius=du(n,"full");break;case"bracket":(n==="none"||n==="solid"||n==="dashed")&&(e.bracket=n);break;case"header-position":(n==="beside"||n==="above")&&(e.headerPosition=n);break;case"capacity-icon":e.capacityIcon=n;break;case"timeline-position":(n==="top"||n==="bottom"||n==="both")&&(e.timelinePosition=n);break;case"minor-grid":e.minorGrid=n==="true";break;case"non-working":Ph(n)&&(e.nonWorking=n);break;default:break}}function du(e,t){let n=["none","xs","sm","md","lg","xl","full"],r=n.indexOf(t),i=n.indexOf(e);return i<0?"md":i>r?n[r]:n[i]}function EP(e,t,n){if(t)for(let r of t.properties)cw(e,sl(r),r.value,n)}function MX(e,t,n){for(let r of t){let i=sl(r);r.value!==void 0&&cw(e,i,r.value,n)}}function FX(e,t,n){let r=t.find(o=>sl(o)==="labels");if(!r)return;let i=r.value?[r.value]:r.values;for(let o of i){let s=n.labels.get(o);if(!s)continue;let a=s.properties.find(c=>sl(c)==="style");a?.value&&EP(e,n.styles.get(a.value),n.theme)}}function BX(e,t,n){let r=t.find(i=>sl(i)==="style");r?.value&&EP(e,n.styles.get(r.value),n.theme)}function ht(e,t,n){let r=n.theme.entities[e],i=DX(r,n.theme),o=n.defaults.get(e);if(o)for(let s of o.properties)s.value!==void 0&&cw(i,sl(s),s.value,n.theme);return FX(i,t,n),BX(i,t,n),MX(i,t,n.theme),i}function bP(e,t){return ht("label",e.properties,t)}function Ch(e,t,n,r,i=0){let o=n.map(c=>c??-1/0),s=[];for(let c=0;c<e;c++)s.push(AP(c===0?t:s[c-1],o[c],i));let a=[...s];for(let c=1;c<=e+1;c++){let l=r(s,a).memberEnd,u=[],f=[];for(let d=0;d<e;d++)u.push(d===0?s[0]:AP(f[d-1],o[d],i)),f.push(Math.max(u[d],l[d]??-1/0));if(RP(s,u)&&RP(a,f))return{S:s,E:a,passes:c,capped:!1};s=u,a=f}return r(s,a),{S:s,E:a,passes:e+1,capped:!0}}function AP(e,t,n){return t-e>n?t:e}function RP(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function kP(e,t,n){return e.floors.map(r=>{let i=r?Ye(r.date):null;return i?n.workingIndexOf(t,i):null})}var zo=class{constructor(t,n){I(this,"plan");I(this,"S");I(this,"memberEnd");I(this,"binding");I(this,"memberCount");this.plan=t,this.S=n;let r=t.waves.length;this.memberEnd=new Array(r).fill(-1/0),this.binding=new Array(r).fill(void 0),this.memberCount=new Array(r).fill(0)}floor(t){let n=this.plan.waveOf.get(t),r=t.$type==="ItemDeclaration"?void 0:this.plan.leadOf.get(t),i;return n!==void 0&&(i=this.S[n-1]),r!==void 0&&(i=Math.max(i??-1/0,this.S[r-1])),i}apply(t,n){let r=this.floor(t);return r===void 0?n:Math.max(n,r)}accumulate(t,n){let r=this.plan.memberWave(t);r!==void 0&&(this.memberCount[r-1]++,n>this.memberEnd[r-1]&&(this.memberEnd[r-1]=n,this.binding[r-1]=t))}};function IP(e,t,n,r,i,o=0){return e.waves.map((s,a)=>{let c={id:s.name,index:a+1,start:t.S[a],end:t.E[a],memberCount:n.memberCount[a]},l=n.binding[a];if(l!==void 0&&n.memberEnd[a]===t.E[a]&&t.E[a]>t.S[a]){let p=l.name??l.title;p!==void 0&&(c.heldBy=p)}let u=i[a],f=e.floors[a]?.ref,d=a===0?r:t.E[a-1];return u!=null&&f!==void 0&&u-d>o&&(c.floorRef=f),c})}var qt=.5;function SP(e,t,n){let r=e.waves.map(()=>n);return{plan:e,ids:e.waves.map(i=>i.name),origin:n,floors:e.floors.map(i=>{let o=i?Ye(i.date):null;return o?t.forward(o):null}),S:r,E:r,pass:new zo(e,r),frozen:!1}}function NP(e,t,n){e.S=t,e.E=n,e.pass=new zo(e.plan,t)}function PP(e,t){e.S=t.S,e.E=t.E,e.frozen=!0,e.solve=t}function Oh(e,t,n){e.ids.forEach((r,i)=>{t.set(r,e.S[i]),n.set(r,e.E[i])})}function qo(e,t,n){return n.waves?n.waves.pass.apply(e,t):t}function CP(e,t,n){n.waves&&!n.waves.frozen&&n.waves.pass.accumulate(e,t)}function OP(e,t){if(t.waves)return t.waves.plan.memberWave(e)!==void 0?"member":"background"}function LP(e,t,n){let r=n.waves?.plan.waveOf.get(e);if(!n.waves||r===void 0)return;let i=ue(e.properties,"date"),o=Ye(i)?"date":"start",s=o==="date"?i:ue(e.properties,"start"),a=Ye(s);if(s===void 0||!a)return;let c=n.scale.forwardWithinDomain(a),l=n.waves.pass.floor(e);if(!(c===null||l===void 0||l-c<qt)&&!(t-l>qt))return{wave:n.waves.ids[r-1],key:o,pin:s,start:pu(l,n).toISOString().slice(0,10)}}function $P(e,t){for(let n of[...e.S,...e.E])if(!(Math.abs(n-e.origin)<qt)&&Math.abs(t-n)<qt)return!0;return!1}function uw(e,t){let n=Math.round((e-t.timeline.originX)/t.timeline.pixelsPerDay);if(!t.scale.showsNonWorking)return n;let r=t.timeline.startDate;return t.calendar.workingIndexOf(r,wt(r,n))}function pu(e,t){return t.calendar.dateAtWorkingIndex(t.timeline.startDate,uw(e,t))}function DP(e,t,n){return x_(n.calendar,n.timeline.startDate,uw(e,n),uw(t,n))}function Vo(e,t,n){return e.scale.showsNonWorking?e.scale.advanceX(t,n)-t:n*e.timeline.pixelsPerDay}var Lh=class{constructor(t,n){I(this,"node");I(this,"deps");this.node=t,this.deps=n}get id(){return this.node.name??""}place(t,n){let{node:r}=this,{deps:i}=this,o=ht("group",r.properties,n.styleCtx),s=qo(r,t.x,n),a=n.waves!==void 0&&r.title===void 0&&ue(r.properties,"wave")!==void 0&&ue(r.properties,"style")===void 0&&Ve(r.properties,"labels").length===0,c=a?void 0:r.title??r.name,l=n.currentFlowKey;n.nextGroupId+=1,n.currentFlowKey=`${l}/group:${r.name??`group-${n.nextGroupId}`}`;let u=On(Ve(r.properties,"after")),f=On(Ve(r.properties,"before")),d=!!(u||f),p=oo(o.bg),g=p&&!!c||p&&d,_=g?io+wm:0,x=g?Am:0,y=Ll(p,!!c,d),w=t.y+y,v=n.bandScale.step(),b=s,$=new ol({laneLeftX:b,originY:w+_,minRowHeight:v,slackCorridors:n.slackCorridors}),N=b,L=[];for(let C of r.content){if(C.$type==="DescriptionDirective")continue;if(!$t(C)){let xe=i.resolveChildStart(C,N,b,n),{rowIndex:ve,y:pe}=$.placeBlock(),Me=i.newCursor(xe,pe),Je=i.sequenceOne(C,Me,n);L.push(Je);let it=Je.box.x+Je.box.width,ct=Math.max(v,Me.height);$.commitBlock({rowIndex:ve,placed:Je,blockHeight:ct,blockEnd:it,spillReservation:Yu(Je)}),N=Math.max(N,it);continue}let j=C.properties,z=i.resolveChildStart(C,N,b,n),q=ai(j,n.sizes,n.cal),re=n.scale.startX(z),ie=Math.max(An,Vo(n,re,q)),ye=re+ie,ne=C.name??"",ae=i.predictItemBarExtraHeight(C,re,n),A=v+ae,{rowIndex:O,y:U}=$.placeItem({childId:ne,desiredStart:re,desiredEnd:ye,predictedHeight:A}),H=i.newCursor(z,U),Z=i.sequenceItem(C,H,n);L.push(Z);let V=Z.box.x+Z.box.width+sn;N=Math.max(N,V);let oe=null;(Z.textSpills||Z.chipsOutside||Z.dotSpills||Z.iconSpills||Z.footnoteSpills)&&(oe=Math.max(Z.decorationsRightX,Z.chipsOutside?Z.chipsRightX:0)+6),$.commitItem({rowIndex:O,placed:Z,logicalEnd:V,spillReservation:oe,rowHeight:Math.max(A,v+(Z.box.height-n.bandScale.bandwidth()))})}let G=Math.max(v,$.usedHeight()),Y=Math.max(N,$.usedRightX()),M=n.scale.showsNonWorking?n.scale.startX(s):s,S=n.scale.showsNonWorking?Math.max(M,Y):Y,F={x:M,y:w,width:S-M,height:_+G+x};t.x=N+xl,t.maxX=Math.max(t.maxX,t.x);let X=n.bandScale.step()-n.bandScale.bandwidth();t.height=Math.max(t.height,y+F.height+X);let R=r.name;R&&(n.entityLeftEdges.set(R,F.x),n.entityRightEdges.set(R,F.x+F.width)),n.currentFlowKey=l;let P=kh({box:F,afterDate:u,beforeDate:f,row:p?{kind:"title-tab-row",titleTabWidth:c?so(c):void 0}:{kind:"header-band",title:c,titleInsetX:ls}});return{kind:"group",id:R,title:c,box:F,children:L,style:o,inlineDatePins:P.length>0?P:void 0,...a?{waveOnly:!0}:{}}}};var UX=12,WX=4,$h=13,XX=11;function fw(e,t){return(e?ut(e,XX):0)+t}function MP(e){if(!/[\r\n]/.test(e))return;let t=e.replace(/\r\n?/g,`
|
|
2770
2770
|
`).split(`
|
|
2771
|
-
`).map(i=>i.trim()),n=0,r=t.length;for(;n<r&&t[n]==="";)n+=1;for(;r>n&&t[r-1]==="";)r-=1;return t.slice(n,r)}function dw(e,t,n,r=t){let i=e,o=MP(e);if(o){if(o.length>=2)return{textSpills:!(n<=t&&o.every((l,u)=>ut(l,$h)<=(u===0?r:t))),titleLines:o};i=o[0]??""}let s=i.length>0&&ut(i,$h)>r,a=n>t;if(!s&&!a)return{textSpills:!1,titleLines:[i]};if(s&&!a){let c=kl(i,t,$h,r);if(c.length>=2&&c.length<=Ym&&c.every((l,u)=>ut(l,$h)<=(u===0?r:t)))return{textSpills:!1,titleLines:c}}return{textSpills:!0,titleLines:[i]}}function pw(e,t,n){let r=MP(e);return r&&r.length>=2?r:!t.textSpills&&!n&&t.titleLines.length>=2?t.titleLines:[r?r[0]??"":e]}var Dh=class{constructor(t){I(this,"input");this.input=t}get id(){return this.input.id}measure(t){return{width:Math.max(An,this.input.logicalRightX-this.input.logicalLeftX),height:t.bands.bandwidth()}}place(t,n){let r=this.measure(n),i=Math.max(An,r.width-2*sn),o=t.x+sn,s={x:o,y:t.y,width:i,height:r.height},a=ui(!!this.input.hasLinkIcon,this.input.hasAfterGlyph?{barWidth:i}:void 0),c=Math.max(0,i-a-UX),l=this.input.title,u=fw(this.input.metaText,this.input.metaTrailingWidth??0),f=Math.max(0,i-a-(this.input.titleFirstLineRightReservePx??Cl({barWidth:i,footnoteLabels:[],hasBeforeGlyph:!1}))),{textSpills:d,titleLines:p}=dw(l,c,u,f),m=d?o+i+WX:o+a;return{id:this.input.id,box:s,textX:m,textSpills:d,titleLines:p}}};var Mh=class{constructor(t,n){I(this,"node");I(this,"deps");this.node=t,this.deps=n}get id(){return this.node.name??""}place(t,n){let{node:r}=this,{deps:i}=this,o=ht("parallel",r.properties,n.styleCtx),s=qo(r,t.x,n),a=On(Ve(r.properties,"after")),c=On(Ve(r.properties,"before")),l=r.title??r.name,u=M_(!!(a||c)),f=t.y+u,d=n.scale.showsNonWorking?n.scale.startX(s):s,p=[],m=d,g=0,_=n.currentFlowKey;n.nextParallelId+=1;let x=r.name??`parallel-${n.nextParallelId}`,y=0;for(let $ of r.content){if($.$type==="DescriptionDirective")continue;n.currentFlowKey=`${_}/par:${x}#${y}`;let N=i.newCursor(s,f+g),L=i.sequenceOne($,N,n);p.push(L),g+=Math.max(n.bandScale.step(),N.height),m=Math.max(m,N.maxX),y++}n.currentFlowKey=_;let w={x:d,y:f,width:m-d,height:g};t.x=m+xl,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,u+g);let v=r.name;v&&(n.entityLeftEdges.set(v,w.x),n.entityRightEdges.set(v,w.x+w.width));let b=kh({box:w,afterDate:a,beforeDate:c,row:{kind:"header-band",title:l,titleInsetX:cs}});return{kind:"parallel",id:v,title:l,box:w,children:p,style:o,inlineDatePins:b.length>0?b:void 0}}};var al=class extends Map{constructor(t,n=HX){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(let[r,i]of t)this.set(r,i)}get(t){return super.get(FP(this,t))}has(t){return super.has(FP(this,t))}set(t,n){return super.set(GX(this,t),n)}delete(t){return super.delete(jX(this,t))}};function FP({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function GX({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function jX({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function HX(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Fh(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Bh(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var BP=Symbol("implicit");function Uh(){var e=new al,t=[],n=[],r=BP;function i(o){let s=e.get(o);if(s===void 0){if(r!==BP)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new al;for(let s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Uh(t,n).unknown(r)},Bh.apply(i,arguments),i}function hu(){var e=Uh().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,s,a=!1,c=0,l=0,u=.5;delete e.unknown;function f(){var d=t().length,p=i<r,m=p?i:r,g=p?r:i;o=(g-m)/Math.max(1,d-c+l*2),a&&(o=Math.floor(o)),m+=(g-m-o*(d-c))*u,s=o*(1-c),a&&(m=Math.round(m),s=Math.round(s));var _=Fh(d).map(function(x){return m+o*x});return n(p?_.reverse():_)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([r,i]=d,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(d){return[r,i]=d,r=+r,i=+i,a=!0,f()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(d){return arguments.length?(a=!!d,f()):a},e.padding=function(d){return arguments.length?(c=Math.min(1,l=+d),f()):c},e.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),f()):c},e.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},e.copy=function(){return hu(t(),[r,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},Bh.apply(f(),arguments)}var hw=class e{constructor(t,n,r){I(this,"bandwidthPx");I(this,"stepPx");I(this,"d3");this.bandwidthPx=t,this.stepPx=n,this.d3=r}static fixedRow(t){return new e(t.bandwidth,t.step)}static forRows(t){let n=Array.from({length:t.count},(i,o)=>String(o)),r=hu().domain(n).range(t.range).paddingInner(t.paddingInner??0).paddingOuter(t.paddingOuter??0);return new e(r.bandwidth(),r.step(),r)}bandwidth(){return this.bandwidthPx}step(){return this.stepPx}forward(t){if(!this.d3)throw new Error("BandScale.forward is only available on closed-domain bands (BandScale.forRows)");let n=this.d3(t);if(n===void 0)throw new Error(`BandScale: unknown band id "${t}"`);return n}},zX={bandwidth:56,step:64};function UP(){return hw.fixedRow(zX)}var WP=1e-6,mu=class{constructor(t){I(this,"domain");I(this,"range");I(this,"pixelsPerDay");I(this,"calendar");I(this,"nonWorking");this.domain=t.domain,this.range=t.range,this.calendar=t.calendar,this.nonWorking=t.nonWorking??"hide";let n=Math.max(1,this.showsNonWorking?bn(t.domain[0],t.domain[1]):this.indexOf(t.domain[1]));this.pixelsPerDay=(t.range[1]-t.range[0])/n}get showsNonWorking(){return this.nonWorking==="show"&&this.calendar?.hasNonWorkingDays===!0}indexOf(t){return this.calendar?this.calendar.workingIndexOf(this.domain[0],t):bn(this.domain[0],t)}dayAt(t){let n=(t-this.range[0])/this.pixelsPerDay;return{days:n,day:Math.floor(n+WP)}}forward(t){return this.showsNonWorking?this.range[0]+bn(this.domain[0],t)*this.pixelsPerDay:this.range[0]+this.indexOf(t)*this.pixelsPerDay}forwardWithinDomain(t){return t<this.domain[0]||t>this.domain[1]?null:this.forward(t)}invert(t){let n=Math.round((t-this.range[0])/this.pixelsPerDay);return this.showsNonWorking?wt(this.domain[0],n):this.calendar?this.calendar.dateAtWorkingIndex(this.domain[0],n):wt(this.domain[0],n)}indexAtX(t){let{days:n,day:r}=this.dayAt(t);if(!this.showsNonWorking||!this.calendar)return n;let i=wt(this.domain[0],r),o=this.calendar.workingIndexOf(this.domain[0],i);return this.calendar.isWorkingDay(i)?o+Math.max(0,n-r):o}startX(t){if(!this.showsNonWorking||!this.calendar)return t;let n=wt(this.domain[0],this.dayAt(t).day);if(this.calendar.isWorkingDay(n))return t;let r=this.calendar.workingIndexOf(this.domain[0],n);return this.forward(this.calendar.dateAtWorkingIndex(this.domain[0],r))}advanceX(t,n){if(!this.showsNonWorking||!this.calendar)return t+n*this.pixelsPerDay;let r=this.startX(t);if(n<=0)return r;let i=this.indexAtX(r)+n,o=Math.ceil(i-WP)-1,s=i-o,a=this.calendar.dateAtWorkingIndex(this.domain[0],o);return this.forward(a)+s*this.pixelsPerDay}get originX(){return this.range[0]}get widthPx(){return this.range[1]-this.range[0]}};function Wh(e){return e.endsWith(":")?e.slice(0,-1):e}function GP(e,t){let r=e.roadmapDecl?.properties.find(l=>Wh(l.key)==="scale")?.value,i="weeks",o,s;if(r)if(r==="days"||r==="weeks"||r==="months"||r==="quarters"||r==="years")i=r;else{let l=/^(\d+)([dwmqy])$/.exec(r);if(l){let u=Math.max(1,parseInt(l[1],10));switch(l[2]){case"d":i="days";break;case"w":i="weeks";break;case"m":i="months";break;case"q":i="quarters";break;case"y":i="years";break}o=Xh(i)*u,s=1}}let a=s??O_[i]??4,c=l=>s===void 0&&!l?{labelEveryDefault:!0}:{};if(t){let u=t.properties.find(_=>Wh(_.key)==="unit")?.value??i,f=t.properties.find(_=>Wh(_.key)==="label-every"),d=t.properties.find(_=>Wh(_.key)==="pixels-per-unit"),p=f&&parseInt(f.value,10)||0,m=p!==0?Math.max(1,p):a,g=d?Math.max(1,parseInt(d.value,10)||Xh(u)):o??Xh(u);return{unit:u,labelEvery:m,pixelsPerUnit:g,...c(p!==0)}}return{unit:i,labelEvery:a,pixelsPerUnit:o??Xh(i),...c(!1)}}function Xh(e){switch(e){case"days":return S_;case"weeks":return 40;case"months":return 80;case"quarters":return 160;case"years":return 320}}var qX=.5,mw=.5,gw=7;function Yo(e){return e==="months"||e==="quarters"||e==="years"}function Gh(e,t){let n=e.getUTCFullYear(),r=e.getUTCMonth();switch(t){case"months":return new Date(Date.UTC(n,r+1,1));case"quarters":return new Date(Date.UTC(n,r-r%3+3,1));case"years":return new Date(Date.UTC(n+1,0,1))}}function VX(e,t){if(e.getUTCDate()!==1)return!1;let n=e.getUTCMonth();switch(t){case"months":return!0;case"quarters":return n%3===0;case"years":return n===0}}function jh(e,t,n,r,i){let o=Math.ceil(t-1e-6);if(i?.hasNonWorkingDays){if(!Yo(n)&&o<=0)return 0;let a=o<=0?e:wt(i.dateAtWorkingIndex(e,o-1),1),c=Yo(n)?XP(a,n):n==="weeks"?jP(a,e,i.weekStart):a;return i.workingIndexOf(e,c)}if(!Yo(n))return Math.ceil(t/r)*r;let s=wt(e,o);return bn(e,XP(s,n))}function XP(e,t){return VX(e,t)?e:Gh(e,t)}function jP(e,t,n){let r=n===void 0?-bn(t,e):n-e.getUTCDay();return wt(e,(r%gw+gw)%gw)}function YX(e,t,n){return jP(wt(e,1),t,n)}function yw(e,t,n,r=fu){if(e.calendar?.hasNonWorkingDays)return KX(e,t,e.calendar,r);if(Yo(t.unit))return QX(e,t,t.unit,r);let i=n.daysPerUnit(t.unit),o=i*e.pixelsPerDay,s=Math.max(1,Math.round(e.widthPx/e.pixelsPerDay)),a=Math.floor(s/i)+1,c=[];for(let l=0;l<a;l++){let u=l*i,f=e.originX+u*e.pixelsPerDay,d=l%t.labelEvery===0,p=l===a-1;c.push({x:f,labelX:p?void 0:f+o/2,major:d,label:d&&!p?xw(t.unit,wt(e.domain[0],u),l,r):void 0})}return c}function KX(e,t,n,r){let{unit:i}=t,[o,s]=e.domain,a=_=>Yo(i)?Gh(_,i):i==="weeks"?YX(_,o,n.weekStart):wt(_,1),c=[o];for(let _=a(o);_<s;_=a(_))c.push(_);let l=e.forward(s),u=[];c.forEach((_,x)=>{let y=e.forward(_);(x+1<c.length?e.forward(c[x+1]):l)>y&&!ZX(e,i,c,x)&&u.push({date:_,x:y})});let f=i==="days"&&t.labelEveryDefault===!0&&n.weekStart!==void 0,d=(_,x)=>f?_.getUTCDay()===n.weekStart:x%t.labelEvery===0,m=(e.showsNonWorking?w_(i):n.daysPerUnit(i))*e.pixelsPerDay,g=u.map(({date:_,x},y)=>{let w=(y+1<u.length?u[y+1].x:l)-x,v=d(_,y),b=v?xw(i,_,y,r):void 0;if(b!==void 0){let $=ut(b,ro)>w,N=Yo(i)?y===0||y===u.length-1:w<m-qX;$&&N&&(b=void 0)}return{x,labelX:x+w/2,major:v,label:b}});return s>o&&g.push({x:l,labelX:void 0,major:d(s,u.length),label:void 0}),g}function ZX(e,t,n,r){let i=e.calendar;if(!e.showsNonWorking||!i||!Yo(t)||r===0||r!==n.length-1)return!1;let[o,s]=e.domain;return i.workingIndexOf(o,n[r])>=i.workingIndexOf(o,s)}function HP(e,t,n,r){let i=e.calendar;if(!i?.hasNonWorkingDays)return;let o=i.nonWorkingRuns(e.domain[0],e.domain[1]);if(o.length===0)return;let[s,a]=e.range;if(e.showsNonWorking)return o.map(l=>JX(e,l,n));let c=l=>t.some(u=>Math.abs(u.x-l)<mw&&(u.major||r));return o.map(l=>{let u=e.forward(l.from),f={x:u,width:e.forward(wt(l.through,1))-u,from:l.from,through:l.through};l.titles.length>0&&(f.titles=l.titles);let d=u-s>mw&&a-u>mw;return n==="days"&&d&&!c(u)&&(f.seam=!0),f})}function JX(e,t,n){let[r,i]=e.range,o=Math.max(r,e.forward(t.from)),s=Math.min(i,e.forward(wt(t.through,1))),a={x:o,width:s-o,from:t.from,through:t.through};return t.titles.length>0&&(a.titles=t.titles),(n==="days"||n==="weeks"||t.titles.length>0)&&(a.band=!0),a}function QX(e,t,n,r){let[i,o]=e.domain,s=[i];for(let l=Gh(i,n);l<o;l=Gh(l,n))s.push(l);o>i&&s.push(o);let a=s.map(l=>e.forward(l)),c=s.length-1;return s.map((l,u)=>{let f=a[u],d=u%t.labelEvery===0;if(u===c)return{x:f,labelX:void 0,major:d,label:void 0};let p=a[u+1]-f,m=d?xw(n,l,u,r):void 0,g=u===0||u===c-1;return m!==void 0&&g&&ut(m,ro)>p&&(m=void 0),{x:f,labelX:f+p/2,major:d,label:m}})}function xw(e,t,n,r){switch(e){case"days":return`${t.getUTCMonth()+1}/${t.getUTCDate()}`;case"weeks":{let i=t.toLocaleString(r,{month:"short",timeZone:"UTC"}),o=t.getUTCDate().toString().padStart(2,"0");return`${i} ${o}`}case"months":return t.toLocaleString(r,{month:"short",timeZone:"UTC"});case"quarters":{let i=Math.floor(t.getUTCMonth()/3)+1;return`${il(r).quarterPrefix}${i} ${t.getUTCFullYear()}`}case"years":return`${t.getUTCFullYear()}`}}var Tw=class{constructor(t,n){I(this,"id");I(this,"anchor");this.id=t,this.anchor=n}place(t,n){let r=ue(this.anchor.properties,"date"),i=Ye(r);if(!i)return null;let o=t.scale.forwardWithinDomain(i);if(o===null)return null;let s=ht("anchor",this.anchor.properties,t.styleCtx),a=t.markerRowPlacements.get(this.id),c=a?.centerY??t.timeline.markerRow.y,l={x:o,y:c},u=a?.labelBox??{x:o+6+6,y:c-4,width:0,height:12},f=a?.labelSide??"right";t.entityLeftEdges.set(this.id,o),t.entityRightEdges.set(this.id,o),t.entityMidpoints.set(this.id,l);let d={id:this.id,title:this.anchor.title??this.id,center:l,radius:6,style:s,predecessorPoints:[],cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,bumpedUp:(a?.rowIndex??0)>0,labelBox:u,labelSide:f};return!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(i)&&(d.hiddenDate=no(i)),d}};function qP(e,t,n){let r=[];for(let[i,o]of e){let s=new Tw(i,o).place(t,n);s&&r.push(s)}return r}function ll(e){let t=0;for(let n of e)t=Math.max(t,VP(n.children)),n.nested.length>0&&(t=Math.max(t,ll(n.nested)));return t}function VP(e){let t=0;for(let n of e)n.kind==="item"?t=Math.max(t,n.box.x+n.box.width):t=Math.max(t,VP(n.children));return t}function vw(e,t,n){let r=[],i=new Map,o=new Map;return[...e.entries()].sort(([c],[l])=>c.localeCompare(l)).forEach(([c,l],u)=>{let f=u+1;i.set(c,f),o.set(c,Ve(l.properties,"on")),r.push({number:f,title:l.title??c,description:l.description?.text,style:ht("footnote",l.properties,t.styleCtx)})}),{area:{box:{x:Dn,y:n+Dn,width:t.chartRightX-2*Dn,height:r.length===0?0:wl+r.length*_l+Dn},entries:r},index:i,hosts:o}}var eG=.8,tG=1;function nG(e){let t=[];return KP(e,t),t}function KP(e,t){for(let n of e)if(n.kind==="item"){let r=rG(n);r>0&&n.box.width>0&&t.push({startX:n.box.x,endX:n.box.x+n.box.width,load:r})}else(n.kind==="parallel"||n.kind==="group")&&KP(n.children,t)}function rG(e){return e.capacity?e.capacity.value:e.size?1:0}function ZP(e){if(e.capacityValue<=0||e.warnFraction===null&&e.overFraction===null)return null;let t=nG(e.children);if(t.length===0)return null;let n=new Set;for(let s of t)n.add(s.startX),n.add(s.endX);let r=Array.from(n).sort((s,a)=>s-a);if(r.length<2)return null;let i=[];for(let s=0;s<r.length-1;s++){let a=r[s],c=r[s+1],l=(a+c)/2,u=0;for(let f of t)f.startX<=l&&l<f.endX&&(u+=f.load);i.push({startX:a,endX:c,load:u,classification:iG(u,e.capacityValue,e.warnFraction,e.overFraction)})}let o=[];for(let s of i){let a=o[o.length-1];a&&a.classification===s.classification&&a.endX===s.startX?a.endX=s.endX:o.push({...s})}return{segments:o,capacityValue:e.capacityValue,warnFraction:e.warnFraction,overFraction:e.overFraction}}function iG(e,t,n,r){let i=e/t;return r!==null&&i>=r?"red":n!==null&&i>=n?"yellow":"green"}function JP(e,t){let n=t.get("swimlane"),r=YP(ue(e.properties,"utilization-warn-at"),n?ue(n.properties,"utilization-warn-at"):void 0,eG),i=YP(ue(e.properties,"utilization-over-at"),n?ue(n.properties,"utilization-over-at"):void 0,tG);return{warn:r,over:i}}function YP(e,t,n){let i=aG(e??t);return i.kind==="unset"?n:i.kind==="none"?null:i.value}var oG=/^\d+(?:\.\d+)?%$/,sG=/^\d+\.\d+$/;function aG(e){if(e===void 0)return{kind:"unset"};if(e==="none")return{kind:"none"};if(oG.test(e)){let t=parseFloat(e)/100;return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}if(sG.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}return{kind:"unset"}}var QP=10;function lG(e,t,n){let r=ue(e.properties,"capacity"),i=si(r);if(i===null)return{capacity:null,badgeWidthPx:0};let o=pl(i),s=hl(t.capacityIcon,n),a=to(o,s,QP);return{capacity:{value:i,text:o,icon:s},badgeWidthPx:a}}var cG=10,uG=38,fG=8;function dG(e,t,n){let r=e.title??e.name??"";if(!r)return 0;let i=ue(e.properties,"owner");return $l(0,r,i??void 0,t,n).rightX}function pG(e,t){if(!e.name)return[];let n=[];for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e.name)){let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i),n}function hG(e,t,n,r){for(let i of e.content)if(i.$type!=="DescriptionDirective")return n.scale.startX(r.resolveChildStart(i,t,t,n))}var cl=class{constructor(t,n){I(this,"input");I(this,"deps");this.input=t,this.deps=n}get id(){return this.input.lane.name??""}place(t,n){let{lane:r,bandIndex:i}=this.input,{deps:o}=this,s=ht("swimlane",r.properties,n.styleCtx),a=t.x,c=n.bandScale.step(),l=n.currentFlowKey;n.currentFlowKey=`lane:${r.name??i}`;let{capacity:u,badgeWidthPx:f}=lG(r,s,n.symbols),d=pG(r,n),p=d.length>0?o.estimateTextWidth(d.join(","),QP):0,m=dG(r,f,p),g=hG(r,a,n,o),_=!r.title||g===void 0||g>=m+fG,x=t.y+(_?cG:uG),y=new ol({laneLeftX:a,originY:x,minRowHeight:c,slackCorridors:n.slackCorridors}),w=a,v=[];for(let S of r.content){if(S.$type==="DescriptionDirective")continue;if(!$t(S)){let H=o.resolveChildStart(S,w,a,n),{rowIndex:Z,y:V}=y.placeBlock(),oe=o.newCursor(H,V),le=o.sequenceOne(S,oe,n);v.push(le);let xe=le.box.x+le.box.width,ve=Math.max(c,oe.height);y.commitBlock({rowIndex:Z,placed:le,blockHeight:ve,blockEnd:xe,spillReservation:Yu(le)}),w=Math.max(w,xe);continue}let F=S.properties,X=o.resolveChildStart(S,w,a,n),R=ai(F,n.sizes,n.cal),P=n.scale.startX(X),C=Math.max(An,Vo(n,P,R)),j=P+C,z=S.name??"",q=o.predictItemBarExtraHeight(S,P,n),re=c+q,{rowIndex:ie,y:ye}=y.placeItem({childId:z,desiredStart:P,desiredEnd:j,predictedHeight:re}),ne=o.newCursor(X,ye),ae=o.sequenceItem(S,ne,n);v.push(ae);let A=ae.box.x+ae.box.width+sn;w=Math.max(w,A);let O=null;(ae.textSpills||ae.chipsOutside||ae.dotSpills||ae.iconSpills||ae.footnoteSpills)&&(O=Math.max(ae.decorationsRightX,ae.chipsOutside?ae.chipsRightX:0)+6),y.commitItem({rowIndex:ie,placed:ae,logicalEnd:A,spillReservation:O,rowHeight:Math.max(re,c+(ae.box.height-n.bandScale.bandwidth()))})}let b=x-t.y,$=Math.max(c+32,b+y.usedHeight()+16),N=Math.max(y.usedRightX(),m),L={x:0,y:t.y,width:n.chartRightX,height:$},G=ue(r.properties,"owner"),Y;if(G){let S=n.teams.get(G),F=n.persons.get(G);Y=S?.title??F?.title??G}let M=u?(()=>{let{warn:S,over:F}=JP(r,n.styleCtx.defaults);return ZP({children:v,capacityValue:u.value,warnFraction:S,overFraction:F})})():null;return n.currentFlowKey=l,{positioned:{id:r.name,title:r.title??r.name??"",box:L,bandIndex:i,children:v,nested:[],style:s,owner:Y,footnoteIndicators:d,capacity:u,utilization:M},usedHeight:$,usedRightX:N}}};var mG=18,gG=14,yG=14,xG=16,TG=32;function ww(e,t,n,r){let i=n+mG,o=[],s=!0;for(let a of e){s||(i+=xG),s=!1;let c=a.content.roadmap?.title??a.sourcePath,l=i+gG,u={cal:t.cal,styleCtx:{theme:t.styleCtx.theme,styles:a.config.styles,defaults:a.config.defaults,labels:a.content.labels},sizes:ts(a.content.sizes,t.cal),labels:a.content.labels,teams:a.content.teams,persons:a.content.persons,symbols:a.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:t.timeline,scale:t.scale,calendar:t.calendar,bandScale:t.bandScale,entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:new Map,chartTopY:l,chartBottomY:l,swimlaneBottomY:l,chartRightX:t.chartRightX,nextParallelId:0,nextGroupId:0,...t.waves?{waves:t.waves}:{}};t.waves&&Oh(t.waves,u.entityLeftEdges,u.entityRightEdges);let f=[],d=l,p=0;for(let y of a.content.swimlanes.values()){u.nextParallelId=0,u.nextGroupId=0;let{positioned:w,usedHeight:v}=new cl({lane:y,bandIndex:p},r).place({x:u.timeline.originX,y:d},u);f.push(w),d+=v,p++}let m=d,g=Math.max(t.bandScale.bandwidth(),m-i+yG),_={x:0,y:i,width:0,height:g},x={sourcePath:a.sourcePath,label:c,box:_,nestedSwimlanes:f,style:ht("swimlane",[],t.styleCtx)};_w(x,t.chartRightX),o.push(x),i+=g}return{regions:o,endY:i}}function _w(e,t){let n=e.box.x,{chromeRightX:r}=Dl(n,e.label,e.sourcePath),i=ll(e.nestedSwimlanes),o=Math.max(r,i)+TG,s=Math.min(t-n,o-n);e.box.width=s;for(let a of e.nestedSwimlanes)a.box.width=s}function qh(e,t){let n=[];for(let r of e){let i=t.placedItems.get(r),o=i?i.box.x+i.box.width:t.entityRightEdges.get(r);if(o===void 0)continue;let s=i?yP(i,t.bandScale.bandwidth()):t.entityMidpoints.get(r)?.y??0;if(!i&&t.waves?.plan.index.has(r)){n.push({ref:r,x:o,y:s,flowKey:`wave:${r}`,wave:r});continue}let a=t.itemFlowKey.get(r)??`marker:${r}`;n.push({ref:r,x:o,y:s,flowKey:a})}return n}function Vh(e){let t=new Map;for(let n of e){let r=t.get(n.flowKey);(!r||n.x>r.x)&&t.set(n.flowKey,n)}return Array.from(t.values())}function bw(e){let t=null;for(let n of e)n.wave===void 0&&(!t||n.x>t.x)&&(t=n);return t}function vG(e,t){let n;for(let r of e)r.wave===void 0||r.x-t<qt||(!n||r.x>n.x)&&(n=r);return n?.wave}function eC(e,t,n,r,i,o,s,a){let c=r.length*i*.58*(o?1.05:1),l=e+n+6,u=e-n-6-c,f=l+c<=a,d=u>=s,p=f?"right":d?"left":"right";return{box:{x:p==="right"?l:u,y:t-4,width:c,height:12},side:p}}var Ew=class{constructor(t,n){I(this,"id");I(this,"milestone");this.id=t,this.milestone=n}place(t){let n=this.milestone,r=ht("milestone",n.properties,t.styleCtx),i=ue(n.properties,"date"),o=Ve(n.properties,"after"),s=Ye(i),a=t.timeline.markerRow.y,c=6,l=n.title??this.id,u=null,f=a,d=null,p="right",m=!1,g,_=!1,x;if(s){let v=t.scale.forwardWithinDomain(s);if(v===null)return null;u=v,m=!0;let b=t.markerRowPlacements.get(this.id);b&&(f=b.centerY,d=b.labelBox,p=b.labelSide);let $=qh(o,t),N=Vh($),L=bw(N);L&&L.x>v&&(_=!0,g=[{x:L.x,y:L.y>0?L.y:f}]),x=vG(N,v),x!==void 0&&(_=!0)}else if(o.length>0){let v=qh(o,t),b=Vh(v);b.sort((G,Y)=>Y.x-G.x);let $=b[0]?.x??t.timeline.originX;u=$,m=!1;let N=eC(u,a,c,l,10,!0,t.timeline.box.x,t.chartRightX);f=a,d=N.box,p=N.side,t.markerRowPlacements.set(this.id,{rowIndex:0,centerY:f,labelBox:d,labelSide:p});let L=[];for(let G=1;G<b.length;G++){let Y=b[G];Y.x<$&&Y.y>0&&Y.wave===void 0&&L.push({x:Y.x,y:Y.y})}L.length>0&&(g=L)}if(u===null)return null;if(!d){let v=eC(u,f,c,l,10,!0,t.timeline.box.x,t.chartRightX);d=v.box,p=v.side}let y={x:u,y:f};t.entityLeftEdges.set(this.id,y.x),t.entityRightEdges.set(this.id,y.x),t.entityMidpoints.set(this.id,y);let w={id:this.id,title:l,center:y,radius:c,fixed:m,slackArrows:g,isOverrun:_,style:r,cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,labelBox:d,labelSide:p};return t.waves&&!_&&$P(t.waves,y.x)&&(w.onWaveBoundary=!0),x!==void 0&&s&&(w.overrunByWave=x,w.overrunDate=no(s)),s&&!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(s)&&(w.hiddenDate=no(s)),w}};function tC(e,t){let n=[];for(let[r,i]of e){let o=new Ew(r,i).place(t);o&&n.push(o)}return n}function Kh(e){let t=e.trim().replace(/^#/,"");if(t.length===3&&(t=t.split("").map(n=>n+n).join("")),!/^[0-9a-fA-F]{6}$/.test(t))throw new Error(`Unsupported hex colour: ${e}`);return[Number.parseInt(t.slice(0,2),16),Number.parseInt(t.slice(2,4),16),Number.parseInt(t.slice(4,6),16)]}function nC(e){let[t,n,r]=Kh(e).map(i=>{let o=i/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r}function Zh(e,t){let n=nC(e),r=nC(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}var wG=4.5;function oC(e,t,n,r,i){if(!e.frozen||!e.solve)throw new Error("buildWaves: the wave barrier has not settled");let o=t.timeline.waveStrip;if(!o)throw new Error("buildWaves: the timeline has no wave strip");let s=IP(e.plan,e.solve,e.pass,e.origin,e.floors,qt),a=s.every(y=>y.memberCount===0),c=t.timeline.box.x,l=c+t.timeline.box.width,u=o.y+o.height/2,f=[],d=0,p=s.map((y,w)=>{let v=e.plan.waves[w],b=v.title??y.id,$=y.memberCount===0,N=pu(y.start,t),L=DP(y.start,y.end,t),G=$?void 0:d++,Y=_G(y.id,t),M=EG(v.properties,G,t),S=Math.max(y.start,c),F=Math.min(y.end,l),X=Math.max(0,F-S),R,P=!1;if(!$){if(Y.length>0){let ye=Y.length*Rn;R=rC(b,y.id,w+1,X,ye),P=R!==void 0}R??(R=rC(b,y.id,w+1,X,0))}let C=(S+F)/2,j;if($&&(C=y.start,!a)){let ye=f.filter(ne=>Math.abs(ne-y.start)<qt).length;f.push(y.start),C=y.start+ye*zm,j={x:C,y:u}}let z=$?Aw(N):`${Aw(N)} \u2013 ${Aw(L)}`,q=[b,z];$?q.push(n.waveNoItems):y.heldBy!==void 0&&q.push(`${n.waveHeldBy} ${y.heldBy}`);let re,ie=s[w-1];if(!a&&ie!==void 0&&y.floorRef!==void 0&&y.start-ie.end>qt){let ye=Math.max(ie.end,c),ne=Math.min(y.start,l);ut(y.floorRef,tr)+2*_r<=ne-ye&&(re={text:y.floorRef,x:(ye+ne)/2})}return{id:y.id,title:b,index:w,...G!==void 0?{visibleOrdinal:G}:{},startX:y.start,endX:y.end,startDate:N,endDate:L,memberCount:y.memberCount,empty:$,...y.heldBy!==void 0?{heldBy:y.heldBy}:{},...y.floorRef!==void 0?{floorRef:y.floorRef}:{},columnBox:{x:y.start,y:t.chartTopY,width:y.end-y.start,height:t.swimlaneBottomY-t.chartTopY},strip:{box:{x:y.start,y:o.y,width:y.end-y.start,height:o.height},...R?{label:R.label}:{},labelKind:R?.kind??"none",labelX:C,tooltip:q.join(" \xB7 "),footnotesShown:P,...j?{marker:j}:{},...re?{gapLabel:re}:{}},style:M,footnoteIndicators:Y}}),m=a?[]:RG(p,e.origin,o.y,t),g=Rw(r),_=i.map(y=>Rw(y.nestedSwimlanes));for(let y of[...g,..._.flat()])y.waveTooltip=n.waveBackgroundItem;let x={waves:p,boundaries:m,crossings:iC(g,m),regionCrossings:_.map(y=>iC(y,m)),hasBackground:g.length+_.flat().length>0};return a&&(x.placeholder=dP(n,p.map(y=>y.title))),x}function rC(e,t,n,r,i){let o=a=>ut(a,tr)*1.05+i+2*_r<=r;if(o(e))return{kind:"title",label:e};if(t!==e&&o(t))return{kind:"id",label:t};for(let a=e.length-1;a>=3;a--){let c=e.slice(0,a).trimEnd();if(c.length<3)break;let l=`${c}\u2026`;if(o(l))return{kind:"ellipsis",label:l}}let s=`#${n}`;if(o(s))return{kind:"ordinal",label:s}}function _G(e,t){let n=[];for(let[r,i]of t.footnoteHosts.entries()){if(!i.includes(e))continue;let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i)}function EG(e,t,n){let r=n.styleCtx.theme,i=new Map,o=ue(e,"style"),s=o?n.styleCtx.styles.get(o):void 0;for(let d of s?.properties??[]){let p=d.key.endsWith(":")?d.key.slice(0,-1):d.key;i.set(p,d.value)}let a=d=>{let p=i.get(d);if(p===void 0)return;let m=ei(p,r);return m==="none"?void 0:m},c=a("bg"),l=t!==void 0&&t%2===1?r.wave.stripFillAlt:r.wave.stripFill,u=c?bG(l,c,Al)??l:l,f=i.get("border");return{...c?{tint:c}:{},stripFill:l,text:a("text")??AG(r.wave,u),boundary:a("fg")??r.wave.boundary,boundaryDash:f==="dashed"?"4 2":f==="dotted"?"1 2":null}}var Jh=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function bG(e,t,n){if(!Jh.test(e)||!Jh.test(t))return;let r=Kh(e),i=Kh(t);return`#${r.map((o,s)=>Math.round(o*(1-n)+i[s]*n).toString(16).padStart(2,"0")).join("")}`}function AG(e,t){let n=e.labelText;return!Jh.test(n)||!Jh.test(t)||Zh(n,t)>=wG?n:Zh(e.hatch,t)>=Zh(e.hatchOnDark,t)?e.hatch:e.hatchOnDark}function RG(e,t,n,r){let i=[];for(let a of e)a.empty||(i.push({x:a.startX,wave:a,opening:!0}),i.push({x:a.endX,wave:a,opening:!1}));i.sort((a,c)=>a.x-c.x);let o=[],s=0;for(;s<i.length;){let a=s;for(;a<i.length&&i[a].x-i[s].x<qt;)a++;let c=i.slice(s,a);s=a;let l=c[0].x;if(Math.abs(l-t)<qt)continue;let u=(c.find(f=>f.opening)??c[0]).wave;o.push({x:l,topY:n,bottomY:r.swimlaneBottomY,stroke:u.style.boundary,dash:u.style.boundaryDash})}return o}function Rw(e){let t=[],n=r=>{for(let i of r)i.kind==="item"?i.waveRole==="background"&&t.push(i):n(i.children)};for(let r of e)n(r.children),t.push(...Rw(r.nested));return t}function iC(e,t){let n=[];for(let r of e){let i=r.box.x,o=r.box.x+r.box.width;for(let s of t)i<s.x&&s.x<o&&n.push({x:s.x,topY:r.box.y,bottomY:r.box.y+r.box.height,stroke:s.stroke})}return n}var kG="\u2070\xB9\xB2\xB3\u2074\u2075\u2076\u2077\u2078\u2079";function IG(e){return String(e).replace(/[0-9]/g,t=>kG[Number(t)])}function sC(e,t,n,r){let{waves:i}=e,o=i.some(v=>!v.empty&&v.strip.labelKind!=="title"),s=i.some(v=>v.empty),a=i.some(v=>v.footnoteIndicators.length>0&&!v.strip.footnotesShown);if(!e.hasBackground&&!o&&!s&&!a)return;let c=tr,l=v=>ut(v,c),u=t.timeline.originX,f=Math.max(u,t.chartRightX-an),d=0,p=u,m=!1,g=0,_=v=>r+v*Rl+Xu,x=v=>{m&&p+Wu+v>f&&(d++,p=u,m=!1);let b=m?p+Wu:p;return p=b+v,m=!0,g=Math.max(g,p-u),b},y=[],w=(v,b)=>{let $=Bu+qm,N=x($+l(b)),L=_(d);y.push({kind:v,text:b,swatch:{x:N,y:L-Xu+(Rl-Uu)/2,width:Bu,height:Uu},runs:[{text:b,x:N+$,y:L}]})};if(e.hasBackground&&w("background",n.waveLegendBackground),e.boundaries.length>0&&w("boundary",n.waveLegendBoundary),o||s||a){let v=i.map(L=>{let G=`#${L.index+1} ${L.title}`;return L.footnoteIndicators.length>0&&!L.strip.footnotesShown&&(G+=` ${L.footnoteIndicators.map(IG).join(",")}`),L.empty&&(G+=` (${n.waveNoItems})`),G}),b=" \xB7 ",$=`${n.waveLegendPrefix} ${v[0]}`,N=[{text:$,x:x(l($)),y:_(d)}];for(let L of v.slice(1)){let G=N[N.length-1];p+l(b+L)<=f?(G.text+=b+L,p+=l(b+L),g=Math.max(g,p-u)):(d++,p=u,m=!1,N.push({text:L,x:x(l(L)),y:_(d)}))}y.push({kind:"waves",text:`${n.waveLegendPrefix} ${v.join(b)}`,runs:N})}return{box:{x:u,y:r,width:g,height:(d+1)*Rl},entries:y}}function Aw(e){return e.toISOString().slice(0,10)}var SG=4;function lC(e,t){t>e.chartRightX&&(e.chartRightX=t)}function cC(e,t,n){let r=HP(t,e.ticks,n,e.minorGrid);r&&(e.nonWorkingDisplay=t.showsNonWorking?"show":"hide",e.nonWorking=r)}var em=class{place(t,n,r,i,o){let s=r.theme??"light",a=aw[s],c=r.width??1280,l=fP(r.locale,PG(t)),{config:u,working:f}=R_(t,n),d=GP(t,n.config.scale),p=ts(n.content.sizes,u),m={theme:a,styles:n.config.styles,defaults:n.config.defaults,labels:n.content.labels},{startDate:g,endDate:_}=o.computeDateWindow(t,{cal:u,sizes:p,calendar:f},n,r.today,d,i),x=ht("roadmap",t.roadmapDecl?.properties??[],m),y=x.headerPosition==="beside",w=x.timelinePosition!=="bottom",v=x.timelinePosition==="bottom"||x.timelinePosition==="both",b=Ph(r.nonWorking)?r.nonWorking:x.nonWorking,$=b==="show"&&f.hasNonWorkingDays,N=t.roadmapDecl?.title??t.roadmapDecl?.name??"",L=ue(t.roadmapDecl?.properties??[],"author"),G=o.sizeBesideHeader(N,L),Y=y?{x:0,y:0,width:G.boxWidth,height:0}:{x:0,y:0,width:0,height:Ou},M=y?G.boxWidth:0,S=y?8:Ou+8,F=d.pixelsPerUnit/f.daysPerUnit(d.unit),X=Math.max(1,f.workingIndexOf(g,_)),R=$?Math.max(1,bn(g,_))*F:X*F,P=M+an,C=R,j=M+an+C+an,z=Math.min(c,j),q=r.today!==void 0&&r.today>=g&&r.today<=_,re=n.content.anchors.size+n.content.milestones.size>0,ie=q?li:0,ye=w?yl:0,ne=i?Bm:0,ae=new mu({domain:[g,_],range:[P,P+R],calendar:f,nonWorking:b}),A=Math.max(z,P+C+an),O=[];for(let[te,he]of n.content.anchors){let ot=Ye(ue(he.properties,"date"));if(!ot)continue;let $n=ae.forwardWithinDomain(ot);$n!==null&&O.push({id:te,centerX:$n,radius:6,title:he.title??te,fontSize:10,bold:!1,date:ot,isMilestone:!1})}for(let[te,he]of n.content.milestones){let ot=Ye(ue(he.properties,"date"));if(!ot)continue;let $n=ae.forwardWithinDomain(ot);$n!==null&&O.push({id:te,centerX:$n,radius:6,title:he.title??te,fontSize:10,bold:!0,date:ot,isMilestone:!0})}let U=uC(O,M,A,o.estimateTextWidth),H=re?Math.max(1,U.rowCount):0,Z=H*26,V=ie+ye+ne+Z,oe=V+8,le=y?G.cardHeight+SG:0,xe=Math.max(S,le-V),ve=xe+ie,pe=ve+ye,Me=pe+ne,Je=Me+Z,it=yw(ae,d,f,l),ct={box:{x:P,y:xe,width:R,height:0},ticks:it,pixelsPerDay:F,originX:P,startDate:g,endDate:_,labelStyle:ht("roadmap",[],m),pillRowHeight:ie,tickPanelY:ve,tickPanelHeight:ye,markerRow:{y:Me+13,height:Z,collisionY:Me-8},minorGrid:x.minorGrid,...i?{waveStrip:{y:pe,height:ne}}:{}};cC(ct,ae,d.unit);let En=new Map;for(let[te,he]of U.placements){let ot=Me+13+he.rowIndex*26;En.set(te,{rowIndex:he.rowIndex,centerY:ot,labelBox:{...he.labelBox,y:ot-4},labelSide:he.labelSide})}let J={cal:u,styleCtx:m,sizes:p,labels:n.content.labels,teams:n.content.teams,persons:n.content.persons,symbols:n.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:ct,scale:ae,calendar:f,bandScale:UP(),entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:En,chartTopY:xe+oe,chartBottomY:0,swimlaneBottomY:0,chartRightX:A,nextParallelId:0,nextGroupId:0,...i?{waves:SP(i,ae,P)}:{}};for(let te of O){let he=En.get(te.id);he&&(J.entityLeftEdges.set(te.id,te.centerX),J.entityRightEdges.set(te.id,te.centerX),J.entityMidpoints.set(te.id,{x:te.centerX,y:he.centerY}))}let Jo=vw(n.content.footnotes,J,0);J.footnoteIndex=Jo.index,J.footnoteHosts=Jo.hosts;let xr=new Map(J.entityLeftEdges),ii=new Map(J.entityRightEdges),oi=new Map(J.entityMidpoints),Tr=()=>{J.entityLeftEdges=new Map(xr),J.entityRightEdges=new Map(ii),J.entityMidpoints=new Map(oi),J.placedItems=new Map,J.itemFlowKey=new Map,J.currentFlowKey="",J.waves&&Oh(J.waves,J.entityLeftEdges,J.entityRightEdges)},Zi=[...n.content.swimlanes.values()],Jn=ht("swimlane",[],m),E=k_[Jn.spacing]??0,B=()=>{J.nextParallelId=0,J.nextGroupId=0;let te=[],he=J.chartTopY,ot=0,$n=J.timeline.originX;for(let BO of Zi){ot>0&&(he+=E);let{positioned:UO,usedHeight:WO,usedRightX:l_}=new cl({lane:BO,bandIndex:ot},o).place({x:J.timeline.originX,y:he},J);te.push(UO),he+=WO,l_>$n&&($n=l_),ot++}return{swimlanes:te,nextY:he,maxRightX:$n}},K=n.content.isolatedRegions,se,Ee,Le=J.waves;if(Le){let te,he=Ch(Le.ids.length,Le.origin,Le.floors,(ot,$n)=>(NP(Le,ot,$n),Tr(),te=B(),K.length>0&&ww(K,J,te.nextY+8,o),Le.pass),qt);PP(Le,he),Ee={passes:he.passes,capped:he.capped},se=te}else se=B();let Re=se.swimlanes,ke=se.nextY,He=NG(n.content.milestones,J);He.length>0&&(Tr(),J.slackCorridors=He,se=B(),Re=se.swimlanes,ke=se.nextY),lC(J,se.maxRightX+an);let Pe=[];if(K.length>0){let te=ww(K,J,ke+8,o);Pe=te.regions,ke=te.endY}J.chartBottomY=ke,J.swimlaneBottomY=ke,ct.box.height=J.chartBottomY-ct.box.y;let De=tC(n.content.milestones,J),mt=ll(Re);for(let te of Pe)mt=Math.max(mt,ll(te.nestedSwimlanes));for(let te of O)mt=Math.max(mt,te.centerX+te.radius);for(let te of De)mt=Math.max(mt,te.center.x+te.radius);let Vt=f.daysPerUnit(d.unit),Qn=J.scale.showsNonWorking?J.scale.indexAtX(mt):(mt-P)/F,Ft=Qn>0?jh(g,Qn,d.unit,Vt,f):0;if(Ft>X){let te=f.dateAtWorkingIndex(g,Ft),he=J.scale.showsNonWorking?bn(g,te)*F:Ft*F,ot=new mu({domain:[g,te],range:[P,P+he],calendar:f,nonWorking:b});J.scale=ot,ct.endDate=te,ct.box.width=he,ct.ticks=yw(ot,d,f,l),cC(ct,ot,d.unit),lC(J,P+he+an)}for(let te of Re)te.box.width=J.chartRightX;for(let te of Pe)_w(te,J.chartRightX);let Yt=O.map(te=>({id:te.id,centerX:te.centerX,radius:te.radius,title:te.title,fontSize:te.fontSize,bold:te.bold}));for(let te of De)te.fixed||Yt.push({id:te.id??"",centerX:te.center.x,radius:te.radius,title:te.title,fontSize:10,bold:!0});let Ji=uC(Yt,M,J.chartRightX,o.estimateTextWidth);J.markerRowPlacements.clear();for(let[te,he]of Ji.placements){let ot=Me+13+he.rowIndex*26;J.markerRowPlacements.set(te,{rowIndex:he.rowIndex,centerY:ot,labelBox:{...he.labelBox,y:ot-4},labelSide:he.labelSide})}for(let te of De){let he=J.markerRowPlacements.get(te.id??"");he&&(te.center={x:te.center.x,y:he.centerY},te.labelBox=he.labelBox,te.labelSide=he.labelSide)}for(let te of O){let he=J.markerRowPlacements.get(te.id);he&&J.entityMidpoints.set(te.id,{x:te.centerX,y:he.centerY})}for(let te of De)te.fixed||J.entityMidpoints.set(te.id??"",{x:te.center.x,y:te.center.y});let vr=re?Math.max(1,Ji.rowCount):0;if(vr>H){let te=(vr-H)*26;J.timeline.markerRow.height=vr*26,J.timeline.box.height+=te,J.chartTopY+=te,J.chartBottomY+=te,J.swimlaneBottomY+=te;for(let he of Re)Nh(he,te);for(let he of Pe)xP(he,te);for(let he of De)if(he.cutTopY=J.chartTopY,he.cutBottomY=J.swimlaneBottomY,he.slackArrows)for(let ot of he.slackArrows)ot.y+=te}v&&(J.timeline.bottomTickPanelY=J.chartBottomY+8,J.timeline.bottomTickPanelHeight=yl,J.chartBottomY+=8+yl);let fl=il(l),_e=J.waves?oC(J.waves,J,fl,Re,Pe):void 0;_e&&(_e.regionCrossings.forEach((te,he)=>{te.length>0&&(Pe[he].waveCrossings=te)}),_e.placeholder!==void 0&&ct.waveStrip&&(ct.waveStrip.placeholder=_e.placeholder));let on=new Set(De.map(te=>te.center.x)),Ut=qP(n.content.anchors,J,on),Qi=o.collectItems(Zi),eo=o.buildDependencies(Qi,Re,Pe,J),wu=o.buildNowline(r.today,J,l),_u=_e?sC(_e,J,fl,J.chartBottomY+Fu):void 0;_u&&(J.chartBottomY+=Fu+_u.box.height);let Qo=vw(n.content.footnotes,J,J.chartBottomY);J.footnoteIndex=Qo.index,J.footnoteHosts=Qo.hosts,Y.height=Y.height||J.chartBottomY,y||(Y.width=J.chartRightX);let $O=y?{x:6,y:Je-G.cardHeight,width:G.cardWidth,height:G.cardHeight}:{x:0,y:0,width:J.chartRightX,height:Ou},DO=Qo.area.entries.length>0?Qo.area.box.y+Qo.area.box.height:J.chartBottomY,mm={x:J.chartRightX-an-$m,y:DO+an,width:$m,height:C_},MO=mm.y+mm.height+an,FO={box:Y,position:x.headerPosition,title:N,author:L,titleLines:G.titleLines,authorLines:G.authorLines,cardBox:$O,logo:void 0,style:x,attributionBox:mm};return{width:J.chartRightX,height:MO,theme:s,palette:a,backgroundColor:a.surface.page,header:FO,timeline:ct,nowline:wu,swimlanes:Re,anchors:Ut,milestones:De,edges:eo,footnotes:Qo.area,includes:Pe,chartBox:{x:M,y:J.chartTopY,width:J.chartRightX-M,height:J.chartBottomY-J.chartTopY},...Ee?{waveSolve:Ee}:{},..._e?{waves:_e.waves}:{},..._e&&_e.boundaries.length>0?{waveBoundaries:_e.boundaries}:{},..._e&&_e.crossings.length>0?{waveCrossings:_e.crossings}:{},..._u?{waveLegend:_u}:{}}}};function NG(e,t){let n=[];for(let[r,i]of e){let o=ue(i.properties,"date"),s=Ve(i.properties,"after"),a=Ye(o),c=qh(s,t),l=Vh(c);if(a){let f=t.scale.forwardWithinDomain(a);if(f===null)continue;let d=bw(l);d&&d.x>f&&d.y>0&&n.push({xStart:Math.min(d.x,f),xEnd:Math.max(d.x,f),y:d.y,slackPredId:d.ref,milestoneId:r});continue}if(l.length===0)continue;l.sort((f,d)=>d.x-f.x);let u=l[0].x;for(let f=1;f<l.length;f++){let d=l[f];d.x<u&&d.y>0&&d.wave===void 0&&n.push({xStart:d.x,xEnd:u,y:d.y,slackPredId:d.ref,milestoneId:r})}}return n}function uC(e,t,n,r){let i=[...e].sort((a,c)=>a.centerX-c.centerX),o=new Map,s=[];for(let a of i){let c=r(a.title,a.fontSize)*(a.bold?1.05:1),l=a.centerX+a.radius+6,u=a.centerX-a.radius-6-c,f=l+c<=n,d=u>=t,p=a.centerX-a.radius,m=a.centerX+a.radius,g=N=>N==="right"?l:u,_=N=>N==="right"?f:d,x=(N,L)=>{let G=Math.min(p,N),Y=Math.max(m,N+c);return s[L].some(M=>M.left<Y&&M.right>G)},y=-1,w="right",v=l;e:for(let N=s.length-1;N>=0;N--)for(let L of["right","left"]){if(!_(L))continue;let G=g(L);if(!x(G,N)){y=N,w=L,v=G;break e}}if(y===-1){for(let[N,L]of o)o.set(N,{...L,rowIndex:L.rowIndex+1});s=[[],...s],y=0,w=f?"right":"left",v=g(w)}let b=Math.min(p,v),$=Math.max(m,v+c);s[y].push({left:b,right:$}),o.set(a.id,{rowIndex:y,labelBox:{x:v,y:0,width:c,height:12},labelSide:w})}return{placements:o,rowCount:s.length}}function PG(e){return e.directive?.properties.find(n=>CG(n.key)==="locale")?.value}function CG(e){return e.endsWith(":")?e.slice(0,-1):e}function OG(e){switch(e){case"done":case"completed":return"done";case"in-progress":case"active":return"in-progress";case"at-risk":case"blocked":case"planned":return e;case void 0:return"planned";default:return"neutral"}}function LG(e){if(!e)return 0;let t=/^(\d{1,3})%$/.exec(e);return t?Math.max(0,Math.min(100,parseInt(t[1],10)))/100:0}function $G(e,t){if(e)return/^\d+(?:\.\d+)?[dwmqy]$/.test(e)||/^\d+%$/.test(e)?e:t.sizes.get(e)?.effortLiteral??e}function DG(e,t){if(e)return t.teams.get(e)?.title??t.persons.get(e)?.title??e}function MG(e){if(!e)return{icon:"none"};let t=e.toLowerCase();return t.includes("linear.app")?{icon:"linear",href:e}:t.includes("github.com")?{icon:"github",href:e}:t.includes("atlassian.net")||t.includes("jira.")?{icon:"jira",href:e}:{icon:"generic",href:e}}function tm(e,t,n,r,i){let o=bP(e,t),s=e.name??e.title??"",a=o.padding==="none"?"xs":o.padding,c=I_[a],l=Math.max(20,Math.round(s.length*5.5+c*2));return i!==void 0&&(l=Math.min(l,i)),{text:s,style:o,box:{x:n,y:r,width:l,height:uo}}}function pC(e,t){let n=h_(e,t.sizes,t.cal),r=p_(ue(e,"remaining"),t.sizes,t.cal),i=ue(e,"status"),o=OG(i),s=LG(i);s===0&&o==="done"&&(s=1);let a=/^(\d{1,3})%$/.exec(ue(e,"remaining")??"");return s===0&&o==="in-progress"&&a&&(s=1-Math.max(0,Math.min(100,parseInt(a[1],10)))/100),s===0&&o==="in-progress"&&r>0&&n>0&&(s=Math.max(0,Math.min(1,1-r/n))),{status:o,progress:s}}function hC(e,t,n,r,i,o,s){let a=ue(e,"duration"),c=!!a&&/^\d+(?:\.\d+)?[dwmqy]$/.test(a),l=r?r.title??r.name:"",u=c?a:l||void 0,f=ue(e,"remaining"),d=$G(f,t),p=DG(n??ue(e,"owner"),t),m=()=>[u,p].filter(Boolean).join(" "),g;if(i==="in-progress"&&d){let v=m();g=v?`${v} \u2014 ${d} remaining`:`${d} remaining`}else if(i==="in-progress"&&o>0&&o<1){let v=Math.round((1-o)*100),b=m();g=b?`${b} \u2014 ${v}% remaining`:`${v}% remaining`}else(p||u)&&(g=m()||void 0);let _=ue(e,"capacity"),x=si(_),y=null,w=0;if(x!==null){let v=pl(x),b=hl(s,t.symbols);y={value:x,text:v,icon:b};let $=11;w=(g?ut(" ",$):0)+to(v,b,$)}return{metaText:g,ownerDisplay:p,capacity:y,capacityTrailingWidth:w}}function mC(e,t){let n=new Set;if(e){for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e)){let o=t.footnoteIndex.get(r);o!==void 0&&n.add(o)}}return[...n].sort((r,i)=>r-i)}function gC(e,t,n){return Cl({barWidth:e,footnoteLabels:t.map(String),hasBeforeGlyph:On(n)!==void 0})}function Cw(e,t,n,r){let i=e.properties,o=ht("item",i,n.styleCtx),s=ue(i,"size"),a=s?n.sizes.get(s)??null:null,c=ai(i,n.sizes,n.cal),l=Ve(i,"after"),u=Ve(i,"before"),f=wC(i,t.x,t.x,n),d;n.waves&&(f=qo(e,f,n),d=LP(e,f,n));let p=d===void 0?UG(i,f,n):void 0,m=n.scale.startX(f),g=Math.max(An,Vo(n,m,c)),_=m,x=m+g,y=ue(i,"link"),w=MG(y),v=w.icon!=="none",b=Math.max(An,g-2*sn),$=Ve(i,"labels"),N=[];for(let _e of $){let on=n.labels.get(_e);if(!on)continue;let Ut=tm(on,n.styleCtx,0,0);N.push({id:on,width:Ut.box.width})}let L=0;for(let _e=0;_e<N.length;_e+=1)_e>0&&(L+=kr),L+=N[_e].width;let G=Math.max(0,b-2*nr),Y=N.length>0&&L>G,M=!1,S,F;if(u.length>0){let _e,on;for(let Ut of u){let Qi=Ye(Ut),eo=Qi?n.scale.forwardWithinDomain(Qi)??void 0:n.entityLeftEdges.get(Ut);eo!==void 0&&(_e===void 0||eo<_e)&&(_e=eo,on=Ut)}_e!==void 0&&x>_e&&(M=!0,S={x:_e,y:t.y,width:x-_e,height:n.bandScale.bandwidth()},F=on)}let{status:X,progress:R}=pC(i,n),P={done:"#ecfdf5","in-progress":"#eff6ff","at-risk":"#fffbeb",blocked:"#fee2e2",planned:"#f8fafc",neutral:"#f8fafc"},C={done:"#052e16","in-progress":"#172554","at-risk":"#422006",blocked:"#7f1d1d",planned:"#1e293b",neutral:"#1e293b"},j={done:"#ebebeb","in-progress":"#e4e4e4","at-risk":"#eeeeee",blocked:"#dcdcdc",planned:"#f5f5f5",neutral:"#f5f5f5"},z={done:n.styleCtx.theme.status.done,"in-progress":n.styleCtx.theme.status.inProgress,"at-risk":n.styleCtx.theme.status.atRisk,blocked:n.styleCtx.theme.status.blocked,planned:n.styleCtx.theme.status.planned,neutral:n.styleCtx.theme.status.neutral},q=n.styleCtx.theme.name,re=q==="dark",ie=re?"#0f172a":"#ffffff",ye=q==="grayscale"?"#9e9e9e":"#94a3b8";o.bg===ie&&(o.bg=q==="grayscale"?j[X]:re?C[X]:P[X]),o.fg===ye&&(o.fg=z[X]);let{metaText:ne,ownerDisplay:ae,capacity:A,capacityTrailingWidth:O}=hC(i,n,r,a,X,R,o.capacityIcon),U=e.title??e.name??"",H=mC(e.name,n),Z=new Dh({id:e.name??"",title:U,logicalLeftX:_,logicalRightX:x,metaText:ne,metaTrailingWidth:O,hasLinkIcon:v,hasAfterGlyph:On(l)!==void 0,titleFirstLineRightReservePx:gC(b,H,u)}).place({x:_,y:t.y},{time:n.scale,bands:n.bandScale,style:o}),V=Z.box,oe=n.bandScale.bandwidth(),le=V.width<ss,xe=v&&V.width<zu,ve=V.width<qu,pe=Z.textSpills||xe,Me=pw(U,Z,xe),Je=Me.length,it=null;Y&&(it=rg(N,V.width));let ct=it?it.rows.length:N.length>0?1:0,En=ne!==void 0||A!==null,J=Nl(Je,En),Jo=Hu(Je,En),xr=xC(Y,pe,ct,oe,J),ii=Math.max(Jo,xr);ii>0&&(V.height=oe+ii);let oi=[],Tr=V.y+oe-er-uo-fi,Zi=V.y+(Y&&pe?Math.max(is,J):J)+fi,E=Y&&pe||!Y&&N.length>0?Math.max(Tr,Zi):Tr,B=Y?V.x+V.width+Ar:V.x+nr,K=B;if(it)for(let _e=0;_e<it.rows.length;_e+=1){let on=E+_e*ng,Ut=B;for(let eo of it.rows[_e]){let wu=tm(eo.id,n.styleCtx,Ut,on);oi.push(wu),Ut+=wu.box.width+kr}let Qi=Ut-kr;Qi>K&&(K=Qi)}else{let _e=B;for(let on of N){let Ut=tm(on.id,n.styleCtx,_e,E);oi.push(Ut),_e+=Ut.box.width+kr}K=N.length>0?_e-kr:B}let se=ae??r??ue(i,"owner"),Ee=e.description?.text,Le=H.length>0&&ve,ke=V.x+V.width+Ar,He=!1,Pe=null;xe&&(He&&(ke+=kn),Pe=ke,ke=Pe+Rr,He=!0);let De=0;if(pe){He&&(ke+=kn);let _e=Math.max(...Me.map(Ut=>ut(Ut,Il))),on=(ne?ut(ne,11):0)+O;De=Math.max(_e,on),ke+=De,He=!0}let mt=null;Le&&(He&&(ke+=kn),mt=ke,ke+=H.length*Rn,He=!0);let Vt=null;le&&(He&&(ke+=kn),Vt=ke+rr,ke=Vt+rr,He=!0);let Qn=Math.max(V.x+V.width,ke),Ft=e.name;Ft&&(n.entityLeftEdges.set(Ft,_),n.entityRightEdges.set(Ft,x)),CP(e,V.x+V.width+sn,n);let Yt=Ft??yC(e);n.itemFlowKey.set(Yt,n.currentFlowKey),t.x=x,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,n.bandScale.step()+ii);let Ji=pP({box:V,afterDate:On(l),beforeDate:On(u),hasLinkIcon:v,footnoteCount:H.length}),vr={kind:"item",id:Ft,title:U,...Me.length>=2||Me[0]!==U?{titleLines:Me}:{},box:V,status:X,progressFraction:R,footnoteIndicators:H,labelChips:oi,chipsOutside:Y,chipsRightX:K,linkIcon:w.icon,linkHref:w.href,hasOverflow:M,overflowBox:S,overflowAnchorId:F,owner:se,description:Ee,metaText:ne,textSpills:pe,dotSpills:le,iconSpills:xe,footnoteSpills:Le,dotSpillCx:Vt,iconSpillX:Pe,footnoteSpillStartX:mt,decorationsRightX:Qn,capacity:A,size:a,style:o,inlineDatePins:Ji.length>0?Ji:void 0},fl=OP(e,n);return fl!==void 0&&(vr.waveRole=fl),d!==void 0&&(vr.wavePinOverride=d),p!==void 0&&(vr.nonWorkingPin=p),n.placedItems.set(Yt,vr),vr}function FG(e,t,n){return new Mh(e,{sequenceOne:Ow,newCursor:Ih}).place(t,n)}function BG(e,t,n){return new Lh(e,{sequenceItem:Cw,sequenceOne:Ow,resolveChildStart:vC,newCursor:Ih,estimateTextWidth:ut,predictItemBarExtraHeight:TC}).place(t,n)}function Ow(e,t,n){if($t(e))return Cw(e,t,n);if(Tt(e))return FG(e,t,n);if(je(e))return BG(e,t,n);throw new Error(`Unknown swimlane child type: ${e.$type??"unknown"}`)}function yC(e){let t=e.$cstNode?.range.start;return`#item@${t?t.line+1:0}:${t?t.character+1:0}`}function xC(e,t,n,r,i){if(n===0)return 0;let o=r-er-uo-fi,s;e&&t?s=Math.max(is,i)+fi:e?s=o:s=Math.max(o,i+fi);let c=s+(n-1)*ng+uo+fi+er;return Math.max(0,c-r)}function TC(e,t,n){let r=e.properties,i=n.bandScale.bandwidth(),o=ai(r,n.sizes,n.cal),s=Math.max(An,Vo(n,t,o)),a=Math.max(An,s-2*sn),c=ue(r,"size"),l=c?n.sizes.get(c)??null:null,{status:u,progress:f}=pC(r,n),{metaText:d,capacity:p,capacityTrailingWidth:m}=hC(r,n,void 0,l,u,f,ht("item",r,n.styleCtx).capacityIcon),g=d!==void 0||p!==null,_=!!ue(r,"link"),x=e.title??e.name??"",y=On(Ve(r,"after"))!==void 0,w=ui(_,y?{barWidth:a}:void 0),v=Math.max(0,a-w-nr),b=Math.max(0,a-w-gC(a,mC(e.name,n),Ve(r,"before"))),$=dw(x,v,fw(d,m),b),N=_&&a<zu,L=$.textSpills||N,G=pw(x,$,N).length,Y=Hu(G,g),M=Ve(r,"labels"),S=[];for(let z of M){let q=n.labels.get(z);if(!q)continue;let re=tm(q,n.styleCtx,0,0);S.push({id:q,width:re.box.width})}if(S.length===0)return Y;let F=0;for(let z=0;z<S.length;z+=1)z>0&&(F+=kr),F+=S[z].width;let X=Math.max(0,a-2*nr),R=F>X,P=R?rg(S,a):null,C=P?P.rows.length:1,j=xC(R,L,C,i,Nl(G,g));return Math.max(Y,j)}function vC(e,t,n,r){return qo(e,wC(e.properties,t,n,r),r)}function wC(e,t,n,r){let i=Ye(ue(e,"date"))??Ye(ue(e,"start"));if(i){let s=r.scale.forwardWithinDomain(i);if(s!==null)return s}let o=Ve(e,"after");if(o.length>0){let s=n;for(let a of o){let c=Ye(a);if(c){let u=r.scale.forwardWithinDomain(c);u!==null&&(s=Math.max(s,u));continue}let l=r.entityRightEdges.get(a);l!==void 0&&(s=Math.max(s,l))}return Math.max(n,s)}return t}function UG(e,t,n){if(!n.calendar.hasNonWorkingDays)return;let r=WG(e);if(!r||n.calendar.isWorkingDay(r.date))return;let i=n.scale.forwardWithinDomain(r.date);if(!(i===null||Math.abs(t-i)>=qt))return{key:r.key,pin:r.raw,start:no(pu(t,n))}}function WG(e){for(let t of["date","start"]){let n=ue(e,t),r=Ye(n);if(n!==void 0&&r)return{key:t,raw:n,date:r}}for(let t of Ve(e,"after")){let n=Ye(t);if(n)return{key:"after",raw:t,date:n}}}var kw=6;function XG(e,t){let n=Nm-32,r=kl(e,n,16),i=kl(t??"",n,11),o=0;for(let d of r)o=Math.max(o,ut(d,16));for(let d of i)o=Math.max(o,ut(d,11));let s=o+32,a=Math.max(N_-kw,Math.min(Nm-kw,s)),c=r.length>0?(r.length-1)*20:0,l=i.length>0?18+(i.length-1)*14:0,u=26+c+l+14,f=a+kw;return{titleLines:r,authorLines:i,cardWidth:a,cardHeight:u,boxWidth:f}}function GG(e,t,n,r,i,o){let a=e.roadmapDecl?.properties??[],c=ue(a,"start"),l=Ye(c)??jG(r),u=ue(a,"length"),f=0;if(u){let x=HG(u,t.cal);x>0&&(f=x)}let d=t.calendar??ku(t.cal),p=_C(n,{cal:t.cal,sizes:t.sizes,calendar:d},l,f>0?void 0:r,o),m=T_(i.unit,t.cal),g=jh(l,p>0?p:4*t.cal.daysPerWeek,i.unit,m,d),_=Math.max(f,g);return{startDate:l,endDate:d.dateAtWorkingIndex(l,Math.max(1,_))}}function jG(e){let t=e??new Date;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))}function HG(e,t){let n=/^(\d+(?:\.\d+)?)([dwmqy])$/.exec(e);if(!n)return 0;let r=parseFloat(n[1]);switch(n[2]){case"d":return r;case"w":return r*t.daysPerWeek;case"m":return r*t.daysPerMonth;case"q":return r*t.daysPerQuarter;case"y":return r*t.daysPerYear;default:return 0}}function _C(e,t,n,r,i){let o=m=>t.calendar.workingIndexOf(n,m),s=new Map,a=new Map,c=new Map,l=0;for(let m of e.content.anchors.values()){let g=Ye(ue(m.properties,"date"));if(g&&m.name){let _=o(g);a.set(m.name,_),l=Math.max(l,_)}}let u=()=>({itemEnd:s,anchorEnd:a,milestoneEnd:c,sizes:t.sizes}),f=(m,g,_)=>{let x=v=>{let b=Ye(v);return b?o(b):m.itemEnd.has(v)?m.itemEnd.get(v):m.anchorEnd.has(v)?m.anchorEnd.get(v):m.milestoneEnd.has(v)?m.milestoneEnd.get(v):0},y=(v,b)=>{let $=b;for(let N of v)N.$type!=="DescriptionDirective"&&($=w(N,$),_($));return $},w=(v,b)=>{if($t(v)){let $=ai(v.properties,m.sizes,t.cal),N=Ye(ue(v.properties,"date")),L=Ye(ue(v.properties,"start")),G=Ve(v.properties,"after"),Y=b;N?Y=o(N):L?Y=o(L):G.length>0&&(Y=Math.max(b,...G.map(x))),g&&(Y=g.apply(v,Y));let M=Y+$;return v.name&&m.itemEnd.set(v.name,M),g?.accumulate(v,M),M}if(Tt(v)){let $=Ve(v.properties,"after"),N=$.length>0?Math.max(b,...$.map(x)):b;g&&(N=g.apply(v,N));let L=N;for(let G of v.content){if(G.$type==="DescriptionDirective")continue;let Y=w(G,N);L=Math.max(L,Y)}return L}if(je(v)){let $=Ve(v.properties,"after"),N=$.length>0?Math.max(b,...$.map(x)):b;return g&&(N=g.apply(v,N)),y(v.content,N)}return b};return{walkLane:y,resolveAfterDay:x}},d=m=>{l=Math.max(l,m)};if(i){let m=i.waves.map(y=>y.name),g=0,_=y=>{g=Math.max(g,y)},x=Ch(m.length,0,kP(i,n,t.calendar),(y,w)=>{let v=m.map((N,L)=>[N,w[L]]);s=new Map(v),g=0;let b=new zo(i,y),{walkLane:$}=f(u(),b,_);for(let N of e.content.swimlanes.values())$(N.content,0);for(let N of e.content.isolatedRegions){let L=f({itemEnd:new Map(v),anchorEnd:new Map,milestoneEnd:new Map,sizes:ts(N.content.sizes,t.cal)},b,_);for(let G of N.content.swimlanes.values())L.walkLane(G.content,0)}return b});l=Math.max(l,g,...x.S,...x.E.slice(-1))}else{let{walkLane:m}=f(u(),void 0,d);for(let g of e.content.swimlanes.values())m(g.content,0)}let{resolveAfterDay:p}=f(u(),void 0,d);for(let m of e.content.milestones.values()){let g=Ye(ue(m.properties,"date"));if(g){let x=o(g);m.name&&c.set(m.name,x),l=Math.max(l,x);continue}let _=Ve(m.properties,"after");if(_.length>0){let x=Math.max(0,..._.map(p));m.name&&c.set(m.name,x),l=Math.max(l,x)}}if(!i)for(let m of e.content.isolatedRegions){let g=_C({config:m.config,content:m.content,diagnostics:[],processedFiles:new Set},t,n,void 0);l=Math.max(l,g)}if(r){let m=o(r);m>0&&(l=Math.max(l,m))}return l}function zG(e,t,n,r){let i=new Rh(cP(t,n)),o=[],s=[],a=r.bandScale.bandwidth();for(let[u,f]of e){let d=Ve(f.properties,"after"),p=r.placedItems.get(u);if(!p)continue;let m=mP(p,a);for(let g of d){let _=r.placedItems.get(g),x,y=_===void 0;if(_)x=gP(_,a);else{let w=r.entityMidpoints.get(g);if(!w)continue;x={x:w.x,y:m.y}}!y&&Math.abs(x.y-m.y)<.5&&m.x-x.x<20||(o.push({fromId:g,toId:u,from:x,to:m,isMarkerSource:y}),s.push({fromId:g,toId:u}))}}let c=uP(o,i),l=[];for(let u=0;u<c.length;u++){let f=c[u];l.push({fromId:s[u].fromId,toId:s[u].toId,waypoints:f.waypoints,kind:f.underBar?"underBar":"normal",style:ht("item",[],r.styleCtx)})}return l}function qG(e,t,n){if(!e)return null;let r=t.scale.forwardWithinDomain(e);if(r===null)return null;let i=t.timeline.box.y,o=t.timeline.tickPanelY,s=il(n).nowLabel,a=ut(s,vl),c=Math.max(km,Math.ceil(a+2*rs)),l=t.timeline.originX-an,u=c/2,f;r-u<l?f="flag-right":r+u>t.chartRightX?f="flag-left":f="center";let d=t.timeline.bottomTickPanelY,p=t.timeline.bottomTickPanelHeight??0,m=d!==void 0&&p>0?d+p:t.swimlaneBottomY;return{x:r,topY:o,bottomY:m,pillTopY:i,pillMode:f,label:s,pillWidth:c,style:ht("item",[],t.styleCtx)}}function VG(e){let t=new Map,n=r=>{if($t(r)){t.set(r.name??yC(r),r);return}if(Tt(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}if(je(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}};for(let r of e)for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return t}function Lw(e,t,n={}){let r=rw(t);return new em().place(e,t,n,r,{sequenceItem:Cw,sequenceOne:Ow,resolveChildStart:vC,newCursor:Ih,estimateTextWidth:ut,predictItemBarExtraHeight:TC,computeDateWindow:GG,sizeBesideHeader:XG,collectItems:VG,buildDependencies:zG,buildNowline:qG})}function rm(e){return e.toISOString().slice(0,10)}function $w(e){return e.id!==void 0?e.id:/[\r\n]/.test(e.title)?e.title.replace(/\s*[\r\n]+\s*/g," ").trim():e.title}function Dw(e,t){for(let n of e)n.kind==="item"?t(n):Dw(n.children,t)}function YG(e,t,n){let r=$w(e);e.textSpills&&n.push(Ln(t,"NL.I1000","info",{name:r},r)),e.chipsOutside&&n.push(Ln(t,"NL.I1001","info",{name:r},r)),(e.box.width<ss||e.dotSpills||e.iconSpills||e.footnoteSpills)&&n.push(Ln(t,"NL.I1002","info",{name:r},r)),e.hasOverflow&&n.push(Ln(t,"NL.I1003","info",{name:r,anchor:e.overflowAnchorId},r)),EC(e,t,n),bC(e,t,n)}function EC(e,t,n){let r=e.wavePinOverride;if(!r)return;let i=$w(e);n.push(Ln(t,"NL.W1001","warning",{name:i,pin:r.pin,key:r.key,wave:r.wave,start:r.start},i))}function bC(e,t,n){let r=e.nonWorkingPin;if(!r)return;let i=$w(e);n.push(Ln(t,"NL.I1008","info",{name:i,pin:r.pin,key:r.key,start:r.start},i))}function Ln(e,t,n,r,i){return{message:Vr(e,t,r),severity:n,code:t,entityId:i,lspSeverity:n==="warning"?2:3,data:{code:t,args:r}}}function AC(e,t,n){let r=e.id??e.title,i=[];Dw(e.children,a=>i.push(a));for(let a of i)YG(a,t,n);let o=new Set(i.map(a=>a.box.y));o.size>1&&n.push(Ln(t,"NL.I1004","info",{lane:r,rows:o.size},r)),(e.utilization?.segments.some(a=>a.classification==="red")??!1)&&n.push(Ln(t,"NL.I1005","info",{lane:r},r));for(let a of e.nested)AC(a,t,n)}function RC(e,t,n){Dw(e.children,r=>{EC(r,t,n),bC(r,t,n)});for(let r of e.nested)RC(r,t,n)}function KG(e,t,n){e.waveSolve?.capped&&n.push(Ln(t,"NL.W1002","warning",{passes:e.waveSolve.passes}));let r=e.waves??[],i=r.filter(o=>o.empty).map(o=>o.id);if(i.length>0){let o=i.length===r.length?{reason:"all",names:i}:i.length===1?{reason:"one",name:i[0]}:{reason:"many",names:i};n.push(Ln(t,"NL.I1006","info",o,o.reason==="one"?o.name:void 0))}for(let o of e.milestones){if(o.overrunByWave===void 0||o.overrunDate===void 0)continue;let s=r.find(c=>c.id===o.overrunByWave);if(!s)continue;let a=o.id??o.title;n.push(Ln(t,"NL.I1007","info",{name:a,date:o.overrunDate,wave:s.id,end:rm(s.endDate)},a))}}function Mw(e,t={}){let n=t.locale??"en-US",r=[];for(let i of e.swimlanes)AC(i,n,r);for(let i of e.includes)for(let o of i.nestedSwimlanes)RC(o,n,r);if(KG(e,n,r),t.today){let i=t.today,o=e.timeline.startDate,s=e.timeline.endDate;(i<o||i>s)&&r.push(Ln(n,"NL.W1000","warning",{date:rm(i),start:rm(o),end:rm(s)}))}return r}var Ko=class extends Error{constructor(t){super(t),this.name="TimezoneError"}};function Fw(e){if(!e||e.toLowerCase()==="local")return{kind:"local"};if(e.toUpperCase()==="UTC")return{kind:"utc"};if(e==="Z")return{kind:"offset",ms:0};let t=/^([+-])(\d{2})(?::?(\d{2}))?$/.exec(e);if(t){let n=t[1]==="+"?1:-1,r=parseInt(t[2],10),i=t[3]!==void 0?parseInt(t[3],10):0;if(r>23||i>59)throw new Ko(`nowline: invalid timezone offset "${e}". Hours must be 0\u201323 and minutes 0\u201359.`);return{kind:"offset",ms:n*(r*60+i)*6e4}}try{return{kind:"iana",name:Intl.DateTimeFormat(void 0,{timeZone:e}).resolvedOptions().timeZone}}catch{throw new Ko(`nowline: unrecognised timezone "${e}". Use "local", "UTC", an ISO 8601 offset (e.g. "+05:30", "-07:00", "Z"), or an IANA timezone name (e.g. "America/Los_Angeles", "Asia/Kolkata").`)}}function im(e,t){switch(t.kind){case"local":return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));case"utc":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));case"offset":{let n=new Date(e.getTime()+t.ms);return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))}case"iana":{let n=new Intl.DateTimeFormat("en-CA",{timeZone:t.name,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(e),r=0,i=0,o=0;for(let s of n)s.type==="year"?r=parseInt(s.value,10):s.type==="month"?i=parseInt(s.value,10)-1:s.type==="day"&&(o=parseInt(s.value,10));return new Date(Date.UTC(r,i,o))}}}var ZG=/^(\d{4})-(\d{2})-(\d{2})$/,JG=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?)(Z|([+-])(\d{2})(?::?(\d{2}))?)$/,QG=/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}:\d{2}(?:\.\d+)?$/;function Bw(e={}){let t=e.zone??{kind:"local"},n=e.clock??(()=>new Date),r=e.now;if(!(r==="-"||r===null)){if(r instanceof Date)return r;if(r!==void 0){let i=ZG.exec(r);if(i)return new Date(Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10)));let o=JG.exec(r);if(o){let a=new Date(r);if(!Number.isNaN(a.getTime())){if(o[2]==="Z")return im(a,{kind:"utc"});let l=o[3]==="+"?1:-1,u=parseInt(o[4],10),f=o[5]!==void 0?parseInt(o[5],10):0,d=l*(u*60+f)*6e4;return im(a,{kind:"offset",ms:d})}}let s=QG.exec(r);return s?new Date(Date.UTC(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10))):void 0}return im(n(),t)}}function ej(e){return e===2?"warning":e===3?"info":"error"}function kC(e,t){return{severity:ej(e.severity),code:sg(e),message:e.message,suggestion:Ku(e.message),file:t,line:(e.range?.start.line??0)+1,column:(e.range?.start.character??0)+1}}function IC(e,t){return{severity:"error",code:"parse-error",message:e.message,file:t,line:e.token?.startLine??1,column:e.token?.startColumn??1}}function SC(e,t){return{severity:"error",code:"lex-error",message:e.message,file:t,line:e.line??1,column:e.column??1}}function NC(e,t){let n=e.line!==void 0?e.line+1:1;if(!rl(e))return{severity:e.severity,code:"include",message:e.message,file:e.sourcePath,line:n,column:1};let r=t?nw(t,e):e.message,i=Ku(r);return{severity:e.severity,code:e.code??Zu(e.message),message:r,...i===void 0?{}:{suggestion:i},file:e.sourcePath,line:n,column:1}}function PC(e,t,n="warning"){return{severity:n,code:"render.warning",message:e,file:t,line:1,column:1}}function CC(e,t){return{severity:e.severity,code:e.code,message:e.message,file:t,line:1,column:1}}var OC="__nowline_browser_noop_include__";async function LC(e){throw new Error(`${OC}: include "${e}" was skipped \u2014 running in single-file mode.`)}function Uw(e){return e.includes(OC)}var Ki={person:{viewBox:"0 0 24 24",body:'<circle cx="12" cy="8" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 21a8 8 0 0 1 16 0" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"p"},people:{viewBox:"0 0 24 24",body:'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="9" cy="7" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M22 21v-2a4 4 0 0 0-3-3.87" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 3.13a4 4 0 0 1 0 7.75" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"P"},points:{viewBox:"0 0 24 24",body:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" fill="currentColor" stroke="currentColor" stroke-width="1" stroke-linejoin="round"/>',ascii:"*"},time:{viewBox:"0 0 24 24",body:'<line x1="10" x2="14" y1="2" y2="2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="12" x2="15" y1="14" y2="11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="12" cy="14" r="8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"t"}},tj={calendar:{viewBox:"0 0 24 24",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"/>',ascii:"d"}},$C={...Ki,...tj};var Lse={none:"",multiplier:"x",person:Ki.person.ascii,people:Ki.people.ascii,points:Ki.points.ascii,time:Ki.time.ascii};var om=class{constructor(t="nl"){I(this,"prefix");I(this,"counter",0);this.prefix=t}next(t){let n=`${this.prefix}-${this.counter++}`;return t?`${n}-${t}`:n}};var nj=new Set(["svg","g","defs","symbol","use","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","linearGradient","radialGradient","stop","clipPath","mask","pattern","filter","feGaussianBlur","feColorMatrix","feOffset","feMerge","feMergeNode","feFlood","feComposite","feBlend","feDropShadow","image"]),rj=new Set(["d","x","y","x1","y1","x2","y2","cx","cy","r","rx","ry","width","height","viewBox","preserveAspectRatio","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-dasharray","stroke-dashoffset","opacity","transform","points","id","class","clip-path","mask","filter","font-family","font-size","font-weight","font-style","text-anchor","dx","dy","rotate","letter-spacing","word-spacing","style","xmlns","href","xlink:href","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","maskUnits","maskContentUnits","stdDeviation","values","in","in2","mode","type","result","flood-color","flood-opacity","patternUnits","patternContentUnits","role","aria-label"]);function ij(e){let t=[],n=0,r=e.length;for(;n<r;){if(e[n]!=="<"){let u=n;for(;n<r&&e[n]!=="<";)n++;let f=e.slice(u,n);f.trim().length>0?t.push({kind:"text",text:f}):f.length>0&&t.push({kind:"text",text:f});continue}if(e.startsWith("<!--",n)){let u=e.indexOf("-->",n+4);if(u<0)break;t.push({kind:"comment",text:e.slice(n+4,u)}),n=u+3;continue}if(e.startsWith("<![CDATA[",n)){let u=e.indexOf("]]>",n+9);if(u<0)break;t.push({kind:"cdata",text:e.slice(n+9,u)}),n=u+3;continue}if(e.startsWith("<?",n)){let u=e.indexOf("?>",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+2;continue}if(e.startsWith("<!",n)){let u=e.indexOf(">",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+1;continue}if(e[n+1]==="/"){let u=e.indexOf(">",n+2);if(u<0)break;let f=e.slice(n+2,u).trim();t.push({kind:"close",name:f}),n=u+1;continue}let i=oj(e,n);if(i<0)break;let o=e.slice(n+1,i).trim(),s=o.endsWith("/"),a=s?o.slice(0,-1).trim():o,{name:c,attrs:l}=sj(a);t.push({kind:s?"self":"open",name:c,attrs:l}),n=i+1}return t}function oj(e,t){let n=t+1,r=null;for(;n<e.length;){let i=e[n];if(r)i===r&&(r=null);else if(i==='"'||i==="'")r=i;else if(i===">")return n;n++}return-1}function sj(e){let t=0;for(;t<e.length&&/\s/.test(e[t]);)t++;let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.slice(n,t),i={};for(;t<e.length;){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t>=e.length)break;let o=t;for(;t<e.length&&e[t]!=="="&&!/\s/.test(e[t]);)t++;let s=e.slice(o,t);if(t>=e.length||e[t]!=="="){s&&(i[s]="");continue}if(t++,t>=e.length)break;let a=e[t];if(a!=='"'&&a!=="'"){let l=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;i[s]=e.slice(l,t);continue}t++;let c=t;for(;t<e.length&&e[t]!==a;)t++;i[s]=e.slice(c,t),t<e.length&&t++}return{name:r,attrs:i}}function gu(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function aj(e,t){if(e.startsWith("#")){let n=t.get(e.slice(1));return n?`#${n}`:null}if(/^url\(#[^)]+\)$/.test(e)){let n=e.slice(5,-1),r=t.get(n);return r?`url(#${r})`:null}return null}function DC(e,t={}){let n=t.idPrefix??"nl-logo",r=t.onWarn??(()=>{}),i=ij(e),o=new Map,s=0;for(let l of i)if((l.kind==="open"||l.kind==="self")&&l.attrs&&"id"in l.attrs){let u=l.attrs.id;u&&!o.has(u)&&o.set(u,`${n}-${s++}`)}let a=[],c=[];for(let l of i)if(l.kind!=="comment"&&l.kind!=="decl"){if(l.kind==="cdata"){c[c.length-1]&&a.push(gu(l.text??""));continue}if(l.kind==="text"){if(c.length===0||c[c.length-1]){let u=(l.text??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");a.push(u)}continue}if(l.kind==="open"||l.kind==="self"){let u=l.name??"";if(u==="script"||u==="foreignObject"||u==="animate"||u==="animateTransform"||u==="animateMotion"||u==="set"){r(`sanitizer: dropping <${u}>`),l.kind==="open"&&c.push(!1);continue}if(!nj.has(u)){r(`sanitizer: dropping unknown element <${u}>`),l.kind==="open"&&c.push(!1);continue}let f=[`<${u}`],d=Object.keys(l.attrs??{}).sort();for(let p of d){let m=l.attrs[p];if(/^on/i.test(p)){r(`sanitizer: dropping event handler ${p}`);continue}if(!rj.has(p)){r(`sanitizer: dropping attribute ${p}`);continue}if(p==="href"||p==="xlink:href"){let g=aj(m,o);if(g===null){r(`sanitizer: dropping external href ${m}`);continue}f.push(` ${p}="${gu(g)}"`);continue}if(p==="style"){r("sanitizer: dropping inline style");continue}if(p==="id"){let g=o.get(m);g&&f.push(` id="${gu(g)}"`);continue}if(/\burl\(#/i.test(m)){let g=m.replace(/url\(#([^)]+)\)/gi,(_,x)=>{let y=o.get(x);return y?`url(#${y})`:"none"});f.push(` ${p}="${gu(g)}"`);continue}if(/data:|javascript:|vbscript:/i.test(m)){r(`sanitizer: dropping suspicious value at ${p}`);continue}f.push(` ${p}="${gu(m)}"`)}f.push(l.kind==="self"?"/>":">"),a.push(f.join("")),l.kind==="open"&&c.push(!0);continue}l.kind==="close"&&c.pop()&&a.push(`</${l.name}>`)}return a.join("")}var MC=/&/g,FC=/</g,BC=/>/g,lj=/"/g,cj=/'/g;function Mt(e){return e.replace(MC,"&").replace(FC,"<").replace(BC,">")}function ti(e){return e.replace(MC,"&").replace(FC,"<").replace(BC,">").replace(lj,""").replace(cj,"'")}function ul(e){let t=Object.keys(e).sort(),n=[];for(let r of t){let i=e[r];i==null||i===!1||(i===!0?n.push(r):n.push(`${r}="${ti(String(i))}"`))}return n.length?` ${n.join(" ")}`:""}function ee(e,t,n){return n===void 0||n===""?`<${e}${ul(t)}/>`:`<${e}${ul(t)}>${n}</${e}>`}function Ne(e,t){return`<text${ul(e)}>${Mt(t)}</text>`}function h(e){return Number.isFinite(e)?Number.isInteger(e)?e.toString():(Math.round(e*100)/100).toString():"0"}var uj={none:{dx:0,dy:0,stdDeviation:0,opacity:0},subtle:{dx:0,dy:1,stdDeviation:1.5,opacity:.2},soft:{dx:0,dy:3,stdDeviation:5,opacity:.3},hard:{dx:2,dy:2,stdDeviation:0,opacity:.45}};function fj(e,t){let n=`${e}-shadow-${t}`,r=uj[t],i=`<feGaussianBlur in="SourceAlpha" stdDeviation="${r.stdDeviation}"/><feOffset dx="${r.dx}" dy="${r.dy}" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="${r.opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>`;return ee("filter",{id:n,x:"-50%",y:"-50%",width:"200%",height:"200%"},i)}function UC(e,t){return t==="none"?null:`url(#${e}-shadow-${t})`}function WC(e){return["subtle","soft","hard"].map(t=>fj(e,t)).join("")}var dj={thin:100,light:300,normal:400,bold:700};function pj(e){return ns[e]??14}function Gw(e,t,n){return{"font-family":t[e.font],"font-size":n??pj(e.textSize),"font-weight":dj[e.weight]??400,"font-style":e.italic?"italic":"normal",fill:e.text}}function hj(e){if(e.border==="dashed")return"4 3";if(e.border==="dotted")return"1 3"}function qC(e){if(!e||e==="none"||e==="transparent")return 1;let t=e.startsWith("#")?e.slice(1):e;if(t.length===3&&(t=t.split("").map(s=>s+s).join("")),t.length!==6)return 1;let n=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(r)+.0722*o(i)}function mj(e,t){return qC(e)>=.24?t.statusDot.onLight:t.statusDot.onDark}function lm(e,t){return e.length*t*.58}function VC(e,t,n,r,i,o,s){let a=i*.58,c=t?lm(t,i):0,l=t?a:0,u=n+c+l,{text:f,icon:d}=e,p=lm(f,i),m={"font-family":o,"font-size":i,fill:s};if(!d)return Ne({x:h(u),y:h(r),...m},f);if(d.kind==="builtin"&&d.name==="multiplier")return Ne({x:h(u),y:h(r),...m},`${f}\xD7`);if(d.kind==="builtin"){let _=Ki[d.name],x=Ne({x:h(u),y:h(r),...m},f),y=i*.1,w=i,v=u+p+y,b=r-i*.85,$=`<svg x="${h(v)}" y="${h(b)}" width="${h(w)}" height="${h(w)}" viewBox="${_.viewBox}" style="color:${ti(s)}" aria-hidden="true">${_.body}</svg>`;return x+$}let g=h(i*.1);return`<text x="${h(u)}" y="${h(r)}" font-family="${ti(o)}" font-size="${i}" fill="${ti(s)}">${Mt(f)}<tspan dx="${g}">${Mt(d.text)}</tspan></text>`}var XC=.6,gj=.5;function yj(e){let{metaText:t,capacity:n,x:r,baselineY:i,fontSize:o,fontFamily:s,color:a}=e;if(!t&&!n)return"";let c={"font-family":s,"font-size":o,fill:a};if(!n)return Ne({x:h(r),y:h(i),...c},t);if(!t)return VC(n,void 0,r,i,o,s,a);let l=h(o*XC),u=`<text x="${h(r)}" y="${h(i)}" font-family="${ti(s)}" font-size="${o}" fill="${ti(a)}">`,{text:f,icon:d}=n;if(!d)return u+Mt(t)+`<tspan dx="${l}">${Mt(f)}</tspan></text>`;if(d.kind==="builtin"&&d.name==="multiplier")return u+Mt(t)+`<tspan dx="${l}">${Mt(f)}\xD7</tspan></text>`;if(d.kind==="literal"){let $=h(o*.1);return u+Mt(t)+`<tspan dx="${l}">${Mt(f)}</tspan><tspan dx="${$}">${Mt(d.text)}</tspan></text>`}let p=Ki[d.name],m=$=>$.length*o*gj,g=r+m(t)+o*XC,_=o*.1,x=o,y=g+m(f)+_,w=i-o*.85,v=u+Mt(t)+`<tspan dx="${l}">${Mt(f)}</tspan></text>`,b=`<svg x="${h(y)}" y="${h(w)}" width="${h(x)}" height="${h(x)}" viewBox="${p.viewBox}" style="color:${ti(a)}" aria-hidden="true">${p.body}</svg>`;return v+b}function xj(e,t){let n=$C.calendar,r=`<svg x="${h(e.glyphTopLeft.x)}" y="${h(e.glyphTopLeft.y)}" width="${h(e.glyphSize)}" height="${h(e.glyphSize)}" viewBox="${n.viewBox}" style="color:${ti(t)}" aria-hidden="true">${n.body}</svg>`,i=`<title>${Mt(e.isoDate)}</title>`;return ee("g",{"data-layer":"inline-date-pin","data-side":e.side,"data-date":e.isoDate,"data-spilled":e.spilled?"true":null},i+r)}function jw(e,t){return!e||e.length===0?"":e.map(n=>xj(n,t)).join("")}function Tj(e){return(e?.length??0)>0}function YC(e){return e?.some(t=>t.side==="after")??!1}function vj(e,t,n,r,i,o={}){let s=Math.min(gl[i.cornerRadius]??4,r/2);return ee("rect",{x:h(e),y:h(t),width:h(n),height:h(r),rx:h(s),ry:h(s),fill:i.bg==="none"?"transparent":i.bg,stroke:i.fg,"stroke-width":1,"stroke-dasharray":hj(i)??null,...o})}function wj(e,t,n,r){let i=e.box.x+e.cardBox.x,o=e.box.y+e.cardBox.y,s=e.cardBox.width,a=e.cardBox.height,c=e.style.bg==="none"?n.surface.headerBox:e.style.bg,l=n.header.cardBorder,u=ee("rect",{x:h(i),y:h(o),width:h(s),height:h(a),rx:6,ry:6,fill:c,stroke:l,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`}),f=[];e.titleLines.forEach((x,y)=>{f.push(Ne({x:h(i+16),y:h(o+26+y*20),"font-family":r[e.style.font],"font-size":16,"font-weight":600,fill:e.style.text},x))});let d=f.join(""),p=o+26+Math.max(0,e.titleLines.length-1)*20,m=n.header.author,g=[];e.authorLines.forEach((x,y)=>{g.push(Ne({x:h(i+16),y:h(p+18+y*14),"font-family":r[e.style.font],"font-size":11,fill:m},x))});let _=g.join("");return ee("g",{"data-layer":"header","data-id":`${t}-header`},u+d+_)}function _j(e,t,n){let r=n.timeline.gridLine,i=n.timeline.minorGridLine,o=e.bottomTickPanelHeight??0,s=e.bottomTickPanelY!==void 0&&o>0,a=e.tickPanelY,c=s?e.bottomTickPanelY+o:e.box.y+e.box.height,l=t,u=e.box.y+e.box.height,f=[];for(let d of e.ticks)if(d.major)f.push(ee("line",{x1:h(d.x),y1:h(a),x2:h(d.x),y2:h(c),stroke:r,"stroke-width":1}));else if(e.minorGrid){if(d.labelX===void 0)continue;f.push(ee("line",{x1:h(d.x),y1:h(l),x2:h(d.x),y2:h(u),stroke:i,"stroke-width":1}))}for(let d of e.nonWorking??[])d.seam&&f.push(ee("line",{x1:h(d.x),y1:h(l),x2:h(d.x),y2:h(u),stroke:n.timeline.nonWorkingSeam,"stroke-width":1,"stroke-dasharray":"1 3"}));return ee("g",{"data-layer":"grid"},f.join(""))}function KC(e,t,n,r){let i=e.box.y+e.box.height,o=[];for(let s of e.nonWorking??[]){if(!s.band)continue;let a={x:s.x,y:t,width:s.width,height:i-t},c=r?zw(a,r):a;!c||c.width<=0||c.height<=0||o.push(ee("rect",{x:h(c.x),y:h(c.y),width:h(c.width),height:h(c.height),fill:n.timeline.nonWorkingFill,"fill-opacity":Fm}))}return o.length===0?"":ee("g",{"data-layer":"non-working"},o.join(""))}function Ej(e,t,n){let r=t.timeline.panelFill,i=t.timeline.border,o=t.timeline.labelText,s=[],a=e.tickPanelY,c=e.tickPanelHeight,l=c>0,u=e.markerRow.height>0,f=e.waveStrip?e.waveStrip.y+e.waveStrip.height:a+c,d=e.markerRow.height,p=e.bottomTickPanelY,m=e.bottomTickPanelHeight??0,g=p!==void 0&&m>0;l&&s.push(ee("rect",{x:h(e.box.x),y:h(a),width:h(e.box.width),height:h(c),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),u&&s.push(ee("rect",{x:h(e.box.x),y:h(f),width:h(e.box.width),height:h(d),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),g&&s.push(ee("rect",{x:h(e.box.x),y:h(p),width:h(e.box.width),height:h(m),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1}));for(let _ of e.ticks)_.major&&(!_.label||_.labelX===void 0||(l&&s.push(Ne({x:h(_.labelX),y:h(a+Iu),"font-family":n.sans,"font-size":ro,fill:o,"text-anchor":"middle"},_.label)),g&&s.push(Ne({x:h(_.labelX),y:h(p+Iu),"font-family":n.sans,"font-size":ro,fill:o,"text-anchor":"middle"},_.label))));return ee("g",{"data-layer":"timeline"},s.join(""))}function bj(e,t,n){if(!e)return"";let r=t.nowline.stroke,i=t.nowline.labelText,o=ee("line",{x1:h(e.x),y1:h(e.topY),x2:h(e.x),y2:h(e.bottomY),stroke:r,"stroke-width":Cu}),s=Aj(e,r),a=Rj(e,i,n);return ee("g",{"data-layer":"nowline"},o+s+a)}function ZC(e){let t=Cu/2;return e.pillMode==="flag-right"?e.x-t:e.pillMode==="flag-left"?e.x+t:e.x}function Aj(e,t){let n=e.pillTopY,r=e.pillTopY+li,i=Im,o=e.pillWidth;if(e.pillMode==="center")return ee("rect",{x:h(e.x-o/2),y:h(n),width:h(o),height:h(li),rx:i,ry:i,fill:t});let s=ZC(e);if(e.pillMode==="flag-right"){let l=s+o,u=[`M ${h(s)} ${h(n)}`,`L ${h(l-i)} ${h(n)}`,`A ${i} ${i} 0 0 1 ${h(l)} ${h(n+i)}`,`L ${h(l)} ${h(r-i)}`,`A ${i} ${i} 0 0 1 ${h(l-i)} ${h(r)}`,`L ${h(s)} ${h(r)}`,"Z"].join(" ");return ee("path",{d:u,fill:t})}let a=s-o,c=[`M ${h(s)} ${h(n)}`,`L ${h(a+i)} ${h(n)}`,`A ${i} ${i} 0 0 0 ${h(a)} ${h(n+i)}`,`L ${h(a)} ${h(r-i)}`,`A ${i} ${i} 0 0 0 ${h(a+i)} ${h(r)}`,`L ${h(s)} ${h(r)}`,"Z"].join(" ");return ee("path",{d:c,fill:t})}function Rj(e,t,n){let r=e.pillTopY+Sm,i=ZC(e),o,s;return e.pillMode==="center"?(o=e.x,s="middle"):e.pillMode==="flag-right"?(o=i+rs,s="start"):(o=i-rs,s="end"),Ne({x:h(o),y:h(r),"font-family":n.sans,"font-size":vl,"font-weight":700,fill:t,"text-anchor":s},e.label)}function kj(e,t,n,r,i){let o=[];e.waveTooltip!==void 0&&o.push(`<title>${Mt(e.waveTooltip)}</title>`);let s=UC(n,e.style.shadow);o.push(vj(e.box.x,e.box.y,e.box.width,e.box.height,e.style,{filter:s??null})),e.waveRole==="background"&&o.push(Yj(e.box,e.style,n));let a=mj(e.style.bg,r),c={done:a.done,"in-progress":a.inProgress,"at-risk":a.atRisk,blocked:a.blocked,planned:a.planned,neutral:a.neutral},l=c[e.status]??c.neutral;if(e.progressFraction>0){let x=Math.max(0,Math.min(e.box.width,e.box.width*e.progressFraction));o.push(ee("rect",{x:h(e.box.x),y:h(e.box.y+e.box.height-er),width:h(x),height:er,fill:e.style.fg,opacity:.55}))}let u=e.dotSpills&&e.dotSpillCx!==null?e.dotSpillCx:e.box.x+e.box.width-ao;o.push(ee("circle",{cx:h(u),cy:h(e.box.y+Km),r:rr,fill:l})),o.push(jw(e.inlineDatePins,e.style.fg));let f;if(e.textSpills)f=e.box.x+e.box.width+Ar,e.iconSpills&&(f+=Rr+kn);else{let x=!!e.linkIcon&&e.linkIcon!=="none",w=e.inlineDatePins?.find(v=>v.side==="after"&&!v.spilled)?ui(x,{barWidth:e.box.width}):ui(!t.noLinks&&x&&!e.iconSpills);f=e.box.x+w}let d=e.style.text,p=r.entities.item.text,m=e.textSpills?p:d,g=e.textSpills?p:e.style.fg,_=e.titleLines??(e.title?[e.title]:[]);if(_.forEach((x,y)=>{x!==""&&o.push(Ne({x:h(f),y:h(e.box.y+Gu+y*Sl),"font-family":i[e.style.font],"font-size":Il,"font-weight":600,fill:m},x))}),(e.metaText||e.capacity)&&o.push(yj({metaText:e.metaText,capacity:e.capacity,x:f,baselineY:e.box.y+ju(_.length),fontSize:Vm,fontFamily:i[e.style.font],color:g})),e.footnoteIndicators.length>0){let x=e.box.y+Zm;if(e.footnoteSpills&&e.footnoteSpillStartX!==null){let y=e.footnoteSpillStartX;for(let w=0;w<e.footnoteIndicators.length;w++){let v=e.footnoteIndicators[w];o.push(Ne({x:h(y),y:h(x),"font-family":i.sans,"font-size":Pl,"font-weight":700,fill:p},String(v))),y+=Rn}}else{let y=e.box.x+e.box.width-os;for(let w=e.footnoteIndicators.length-1;w>=0;w--){let v=e.footnoteIndicators[w];o.push(Ne({x:h(y),y:h(x),"font-family":i.sans,"font-size":Pl,"font-weight":700,fill:e.style.text,"text-anchor":"end"},String(v))),y-=Rn}}}if(!t.noLinks&&e.linkIcon&&e.linkIcon!=="none"){let x={linear:"#5e6ad2",github:"#0f172a",jira:"#0052cc",generic:r.item.linkIconFg},y=x[e.linkIcon]??x.generic,w=Rr,v=e.iconSpills&&e.iconSpillX!==null?e.iconSpillX:e.box.x+lo,b=e.box.y+lo,$=ee("rect",{x:h(v),y:h(b),width:w,height:w,rx:2,ry:2,fill:y}),N=v,L=b,G=ee("path",{d:`M${h(N+4)} ${h(L+10)} L${h(N+10)} ${h(L+4)} M${h(N+6)} ${h(L+4)} H${h(N+10)} V${h(L+8)}`,stroke:"#ffffff",fill:"none","stroke-width":1.1,"stroke-linecap":"round","stroke-linejoin":"round"}),Y=$+G,M=e.linkHref?ee("a",{href:e.linkHref,target:"_blank",rel:"noopener"},Y):Y;o.push(M)}if(e.hasOverflow&&e.overflowBox){let x=r.item.overflowTailFill,y=r.item.overflowTailStroke,w=r.item.overflowCaption;o.push(ee("rect",{x:h(e.overflowBox.x),y:h(e.overflowBox.y),width:h(e.overflowBox.width),height:h(e.overflowBox.height),fill:x,stroke:y,"stroke-width":1})),e.overflowAnchorId&&e.overflowBox.width>60&&o.push(Ne({x:h(e.overflowBox.x+e.overflowBox.width/2),y:h(e.overflowBox.y+e.overflowBox.height/2+3),"font-family":i.sans,"font-size":9,"font-weight":700,fill:w,"text-anchor":"middle"},`past ${e.overflowAnchorId}`))}for(let x of e.labelChips){let y=Math.min(gl[x.style.cornerRadius]??8,x.box.height/2);o.push(ee("rect",{x:h(x.box.x),y:h(x.box.y),width:h(x.box.width),height:h(x.box.height),rx:h(y),ry:h(y),fill:x.style.bg==="none"?"transparent":x.style.bg,stroke:x.style.fg,"stroke-width":.5})),o.push(Ne({x:h(x.box.x+x.box.width/2),y:h(x.box.y+x.box.height/2+3),...Gw(x.style,i,ns.xs),"text-anchor":"middle"},x.text))}return ee("g",{"data-layer":"item","data-id":e.id??null},o.join(""))}function Ij(e,t,n,r,i){let o=[],s=oo(e.style.bg);if(s){if(o.push(ee("rect",{x:h(e.box.x),y:h(e.box.y),width:h(e.box.width),height:h(e.box.height),rx:6,ry:6,fill:e.style.bg,stroke:e.style.fg,"stroke-width":1,"fill-opacity":.18,filter:`url(#${n}-shadow-subtle)`})),e.title){let a=so(e.title),c=e.box.x,l=e.box.y,u=io,f=6,d=`M${h(c+f)} ${h(l)}H${h(c+a)}V${h(l+u-f)}A${f} ${f} 0 0 1 ${h(c+a-f)} ${h(l+u)}H${h(c)}V${h(l+f)}A${f} ${f} 0 0 1 ${h(c+f)} ${h(l)}Z`;o.push(ee("path",{d,fill:e.style.fg})),o.push(Ne({x:h(c+Tl),y:h(l+_m),"font-family":i[e.style.font],"font-size":Em,"font-weight":600,fill:"#ffffff"},e.title))}}else{let a=e.style.fg,c=Ll(s,!!e.title,Tj(e.inlineDatePins));if(e.style.bracket!=="none"&&!e.waveOnly){let u=e.box.y+e.box.height,f=e.style.bracket==="dashed"?"3 2":null,d=c>0?`M${h(e.box.x+4)} ${h(e.box.y-c)} L${h(e.box.x)} ${h(e.box.y-c)} L${h(e.box.x)} ${h(u)} L${h(e.box.x+4)} ${h(u)}`:`M${h(e.box.x)} ${h(e.box.y)} L${h(e.box.x)} ${h(u)} L${h(e.box.x+4)} ${h(u)}`;o.push(ee("path",{d,fill:"none",stroke:a,"stroke-width":1,"stroke-dasharray":f}))}e.title&&o.push(Ne({x:h(fo(e.box.x,ls,YC(e.inlineDatePins))),y:h(e.box.y-Vu),...Gw(e.style,i,Ol),"fill-opacity":.7},e.title))}o.push(jw(e.inlineDatePins,e.style.fg));for(let a of e.children)o.push(Hw(a,t,n,r,i));return ee("g",{"data-layer":"group","data-id":e.id??null},o.join(""))}function Sj(e,t,n,r,i){let o=[];if(e.style.bracket==="solid"||e.style.bracket==="dashed"){let c=e.box.y-12,l=e.box.y+e.box.height+12,u=e.box.x,f=e.box.x+e.box.width,d=r.parallel.bracketStroke;o.push(ee("path",{d:`M${h(u+4)} ${h(c)} H${h(u)} V${h(l)} H${h(u+4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"})),o.push(ee("path",{d:`M${h(f-4)} ${h(c)} H${h(f)} V${h(l)} H${h(f-4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"}))}e.title&&o.push(Ne({x:h(fo(e.box.x,cs,YC(e.inlineDatePins))),y:h(e.box.y-Vu),...Gw(e.style,i,Ol),"fill-opacity":.7},e.title)),o.push(jw(e.inlineDatePins,e.style.fg));for(let s of e.children)o.push(Hw(s,t,n,r,i));return ee("g",{"data-layer":"parallel","data-id":e.id??null},o.join(""))}function Hw(e,t,n,r,i){return e.kind==="item"?kj(e,t,n,r,i):e.kind==="group"?Ij(e,t,n,r,i):Sj(e,t,n,r,i)}var GC=2;function Nj(e,t){switch(e){case"green":return t.swimlane.utilizationOk;case"yellow":return t.swimlane.utilizationWarn;case"red":return t.swimlane.utilizationOver}}function Pj(e,t){if(!e.utilization||e.utilization.segments.length===0)return"";let n=e.box.y+e.box.height-GC,r=e.utilization.segments.map(i=>{let o=i.endX-i.startX;return o<=0?"":ee("rect",{x:h(i.startX),y:h(n),width:h(o),height:GC,fill:Nj(i.classification,t),"data-utilization":i.classification,"data-load":h(i.load)})});return ee("g",{"data-layer":"lane-utilization","data-id":e.id??null},r.join(""))}function Cj(e,t){let n=e.bandIndex%2===0?t.swimlane.rowTintEven:t.swimlane.rowTintOdd,r=t.swimlane.border;return ee("g",{"data-layer":"swimlane-bg","data-id":e.id??null},ee("rect",{x:h(e.box.x),y:h(e.box.y),width:h(e.box.width),height:h(e.box.height),fill:n,stroke:r,"stroke-width":1}))}function JC(e,t,n,r,i){let o=r.swimlane.tabFill,s=r.swimlane.tabStroke,a=r.swimlane.tabText,c=r.swimlane.ownerText,l=r.swimlane.footnoteIndicator,u=[];if(e.title){let d=e.capacity?to(e.capacity.text,e.capacity.icon,10):0,p=e.footnoteIndicators.length>0?e.footnoteIndicators.join(","):"",m=p?lm(p,10):0,g=$l(e.box.x,e.title,e.owner,d,m),_=Su,x=e.box.y+10,y=x+Nu;u.push(ee("rect",{x:h(g.tabX),y:h(x),width:h(g.tabW),height:h(_),rx:4,ry:4,fill:o,stroke:s,"stroke-width":1})),u.push(Ne({x:h(g.titleX),y:h(y),"font-family":i[e.style.font],"font-size":12,"font-weight":600,fill:a},e.title)),e.owner&&u.push(Ne({x:h(g.ownerX),y:h(y),"font-family":i[e.style.font],"font-size":10,fill:c},`owner: ${e.owner}`)),e.capacity&&u.push(VC(e.capacity,void 0,g.badgeX,y,10,i[e.style.font],c)),p&&u.push(Ne({x:h(g.footnoteRightX),y:h(x+14),"font-family":i.sans,"font-size":10,"font-weight":700,fill:l,"text-anchor":"end"},p))}for(let f of e.children)u.push(Hw(f,t,n,r,i));return u.push(Pj(e,r)),ee("g",{"data-layer":"swimlane","data-id":e.id??null},u.join(""))}function Oj(e,t,n){let r=e.radius,i=e.center.x,o=e.center.y,s=t.anchorDiamond.fill,a=t.anchorDiamond.stroke,c=ee("path",{d:`M${h(i)} ${h(o-r)} L${h(i+r)} ${h(o)} L${h(i)} ${h(o+r)} L${h(i-r)} ${h(o)} Z`,fill:s,stroke:a,"stroke-width":1.25}),l=t.anchorDiamond.label,u=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,f={x:h(u),y:h(o+4),"font-family":n.sans,"font-size":10,fill:l};e.labelSide==="left"&&(f["text-anchor"]="end");let d=e.title?Ne(f,e.title):"";return ee("g",{"data-layer":"anchor","data-id":e.id??null},QC(e.hiddenDate)+c+d)}function Lj(e,t){let n=t.anchorDiamond.cutLine;return ee("line",{x1:h(e.center.x),y1:h(e.center.y+e.radius+1),x2:h(e.center.x),y2:h(e.cutBottomY),stroke:n,"stroke-width":1,"stroke-dasharray":"1 3"})}function $j(e,t,n){let r=e.center.x,i=e.center.y,o=e.radius,s=t.milestoneDiamond.fill,a=ee("path",{d:`M${h(r)} ${h(i-o)} L${h(r+o)} ${h(i)} L${h(r)} ${h(i+o)} L${h(r-o)} ${h(i)} Z`,fill:s,stroke:s,"stroke-width":1}),c=t.milestoneDiamond.label,l=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,u={x:h(l),y:h(i+4),"font-family":n.sans,"font-size":10,"font-weight":600,fill:c};e.labelSide==="left"&&(u["text-anchor"]="end");let f=e.title?Ne(u,e.title):"";return ee("g",{"data-layer":"milestone","data-id":e.id??null},QC(e.hiddenDate)+a+f)}function QC(e){return e===void 0?"":`<title>${Mt(e)}</title>`}function Dj(e,t,n){let r=e.isOverrun?n.milestoneDiamond.cutLineOverrun:n.milestoneDiamond.cutLineNormal,i=[];if(e.onWaveBoundary||i.push(ee("line",{x1:h(e.center.x),y1:h(e.center.y+e.radius+1),x2:h(e.center.x),y2:h(e.cutBottomY),stroke:r,"stroke-width":2,"stroke-dasharray":Pu,"stroke-linecap":"round"})),e.slackArrows&&e.slackArrows.length>0){let o=n.milestoneDiamond.slack;for(let s of e.slackArrows)i.push(ee("path",{d:`M${h(s.x)} ${h(s.y)} H${h(e.center.x-6)}`,fill:"none",stroke:o,"stroke-width":1.1,"stroke-dasharray":"3 3","stroke-linecap":"round","marker-end":`url(#${t}-arrow-dark)`}))}return i.join("")}function jC(e,t,n){let r=e.kind==="overflow"?n.dependency.overflowStroke:n.dependency.edgeStroke,i=e.waypoints;if(i.length<2)return"";let o=e.kind==="underBar"?.8:1.1;return ee("path",{d:Mj(i,Dm),fill:"none",stroke:r,"stroke-width":o,"stroke-dasharray":e.kind==="overflow"?"4 2":null,"stroke-linejoin":"round","marker-end":`url(#${t}-arrow)`})}function Mj(e,t){if(e.length<2)return"";let n=[`M${h(e[0].x)} ${h(e[0].y)}`];for(let r=1;r<e.length;r++){let i=e[r-1],o=e[r];if(r===e.length-1){n.push(`L${h(o.x)} ${h(o.y)}`);continue}let s=e[r+1],a=Math.sign(o.x-i.x),c=Math.sign(o.y-i.y),l=Math.sign(s.x-o.x),u=Math.sign(s.y-o.y),f=Math.hypot(o.x-i.x,o.y-i.y),d=Math.hypot(s.x-o.x,s.y-o.y),p=Math.min(t,f/2,d/2);if(p<=0||a!==0&&l!==0||c!==0&&u!==0){n.push(`L${h(o.x)} ${h(o.y)}`);continue}let m={x:o.x-a*p,y:o.y-c*p},g={x:o.x+l*p,y:o.y+u*p};n.push(`L${h(m.x)} ${h(m.y)}`),n.push(`Q${h(o.x)} ${h(o.y)} ${h(g.x)} ${h(g.y)}`)}return n.join(" ")}function Fj(e,t,n,r){if(e.entries.length===0)return"";let i=n.footnotePanel.fill,o=n.footnotePanel.border,s=n.footnotePanel.header,a=n.footnotePanel.title,c=n.footnotePanel.description,l=n.footnotePanel.number,u=[];u.push(ee("rect",{x:h(e.box.x),y:h(e.box.y),width:h(e.box.width),height:h(e.box.height),rx:6,ry:6,fill:i,stroke:o,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`})),u.push(Ne({x:h(e.box.x+Dn),y:h(e.box.y+Pm),"font-family":r.sans,"font-size":12,"font-weight":700,fill:s},"Footnotes"));let f=e.box.y+wl+Dn,d=e.box.x+Dn,p=d+Dn;return e.entries.forEach((m,g)=>{let _=f+g*_l;u.push(Ne({x:h(d),y:h(_),"font-family":r.sans,"font-size":10,"font-weight":700,fill:l},String(m.number))),u.push(Ne({x:h(p),y:h(_),"font-family":r.sans,"font-size":11,"font-weight":600,fill:a},m.title)),m.description&&u.push(Ne({x:h(p+Math.max(120,m.title.length*6)),y:h(_),"font-family":r.sans,"font-size":11,fill:c},`\u2014 ${m.description}`))}),ee("g",{"data-layer":"footnotes"},u.join(""))}function Bj(e,t,n,r,i,o){let s=r.includeRegion.border,a=r.includeRegion.fill,c=r.includeRegion.tabFill,l=r.includeRegion.tabStroke,u=r.includeRegion.tabText,f=r.includeRegion.badgeFill,d=r.includeRegion.badgeStroke,p=r.includeRegion.badgeText,m=e.box.x+8,g=e.box.y,_=e.box.width-16,x=e.box.height,y=ee("rect",{x:h(m),y:h(g),width:h(_),height:h(x),rx:8,ry:8,fill:a,stroke:s,"stroke-width":1,"stroke-dasharray":Pu}),w=Su,v=Dl(e.box.x,e.label,e.sourcePath),b=g-w/2,$=ee("rect",{x:h(v.tabX),y:h(b),width:h(v.tabWidth),height:w,rx:4,ry:4,fill:c,stroke:l,"stroke-width":1}),N=Ne({x:h(v.tabLabelX),y:h(b+Nu),"font-family":i.sans,"font-size":11,"font-weight":600,fill:u},e.label),L=v.badgeX,G=v.badgeSize,Y=g-G/2,M=ee("rect",{x:h(L),y:h(Y),width:G,height:G,rx:4,ry:4,fill:f,stroke:d,"stroke-width":1}),S=ee("path",{d:`M${h(L+7)} ${h(Y+4)} H${h(L+14)} V${h(Y+11)} M${h(L+4)} ${h(Y+7)} H${h(L+11)} V${h(Y+14)} H${h(L+4)} Z`,stroke:p,"stroke-width":1.4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}),F=9,X=g+4,R=ee("rect",{x:h(v.sourceHaloX),y:h(X-F),width:h(v.sourceHaloWidth),height:F+6,fill:a}),P=Ne({x:h(v.sourceTextX),y:h(X),"font-family":i.mono,"font-size":F,fill:p},e.sourcePath),C={x:m,y:g,width:_,height:x},j=o?KC(o.timeline,o.chartBox.y,r,C):"",z=o?.waves?rO(o.waves,C)+iO(o.waveBoundaries,C):"",q=o?.waves?oO(e.waveCrossings):"",re=e.nestedSwimlanes.map(ie=>JC(ie,t,n,r,i)).join("");return ee("g",{"data-layer":"include"},y+j+z+re+q+$+N+M+S+R+P)}function Uj(e,t){let n=e.palette.attribution.mark,r=e.palette.attribution.link;if(e.swimlanes.length===0)return"";let i=e.header.attributionBox.x,o=e.header.attributionBox.y,s=ci,a=Ne({x:"0",y:s,"font-family":t.sans,"font-size":$u,"font-weight":400,fill:n},Lu)+Ne({x:bl,y:s,"font-family":t.sans,"font-size":ci,"font-weight":700,fill:n},"now")+ee("rect",{x:Om,y:12,width:Lm,height:ci,fill:r})+Ne({x:Du,y:s,"font-family":t.sans,"font-size":ci,"font-weight":400,fill:n},"ine"),c=ee("g",{transform:`translate(${h(i)} ${h(o)}) scale(${h(El)})`},a);return ee("a",{href:Cm,target:"_blank",rel:"noopener","aria-label":"Powered by nowline"},ee("g",{"data-layer":"attribution"},c))}async function Wj(e,t,n,r,i,o,s){if(!t)return"";let a;try{a=await t(e)}catch(u){let f=`logo: failed to load ${e}: ${u instanceof Error?u.message:String(u)}`;if(r.strict)throw u;return r.warn?.(f),""}let c=(a.mime??"").toLowerCase();if(c==="image/svg+xml"){let u=new TextDecoder().decode(a.bytes),f=DC(u,{idPrefix:`${n}-logo`,onWarn:r.warn});return ee("g",{transform:`translate(${h(i)} ${h(o)})`},f)}if(c==="image/png"||c==="image/jpeg"||c==="image/jpg"||c==="image/webp"){let u=Xj(a.bytes);return ee("image",{href:`data:${c};base64,${u}`,x:h(i),y:h(o),width:h(s),height:h(s),preserveAspectRatio:"xMidYMid meet"})}let l=`logo: unsupported mime ${c} for ${e}`;if(r.strict)throw new Error(l);return r.warn?.(l),""}function Xj(e){if(typeof btoa<"u"){let n="";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return btoa(n)}let t=globalThis;if(t.Buffer)return t.Buffer.from(e).toString("base64");throw new Error("renderer: no base64 encoder available")}var Gj=.24,sm=2,HC=3,jj=4,Hj=8,zj=10;function eO(e){return e.bg==="none"?"transparent":e.bg}function cm(e){return qC(e)>=Gj?"dark":"light"}function tO(e,t){return`url(#${e}-wave-hatch-${t})`}function qj(e,t,n){let r=Xm;return ee("pattern",{id:`${e}-wave-hatch-${t}`,width:r,height:r,patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)"},ee("line",{x1:h(r/2),y1:0,x2:h(r/2),y2:r,stroke:t==="dark"?n.wave.hatch:n.wave.hatchOnDark,"stroke-width":Gm,opacity:Wm}))}function Vj(e){if(!e.waves)return[];let t=new Set,n=i=>{for(let o of i)o.kind==="item"?o.waveRole==="background"&&t.add(cm(eO(o.style))):n(o.children)},r=i=>{for(let o of i)n(o.children),r(o.nested)};r(e.swimlanes);for(let i of e.includes)r(i.nestedSwimlanes);return e.waveLegend?.entries.some(i=>i.kind==="background")&&t.add(cm(sO(e.palette))),["dark","light"].filter(i=>t.has(i))}function Yj(e,t,n){let i=Math.min(gl[t.cornerRadius]??4,e.height/2);return ee("rect",{x:h(e.x+.5),y:h(e.y+.5),width:h(Math.max(0,e.width-2*.5)),height:h(Math.max(0,e.height-2*.5)),rx:h(i),ry:h(i),fill:tO(n,cm(eO(t)))})}function zw(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),i=Math.min(e.x+e.width,t.x+t.width),o=Math.min(e.y+e.height,t.y+t.height);if(!(i<=n||o<=r))return{x:n,y:r,width:i-n,height:o-r}}var Ww=4,am=.5;function nO(e,t){if(e.empty)return;let n=am;return zw({x:e.strip.box.x,y:e.strip.box.y+n,width:e.strip.box.width,height:e.strip.box.height-2*n},{x:t.box.x+n,y:e.strip.box.y,width:t.box.width-2*n,height:e.strip.box.height})}function Kj(e,t){let n=Math.min(Ww-am,e.width/2,e.height/2),r=1e-6;return{left:e.x<=t.box.x+am+r?n:0,right:e.x+e.width>=t.box.x+t.box.width-am-r?n:0}}function Zj(e,t){let{x:n,y:r,width:i,height:o}=e,s=(a,c,l)=>a>0?` A${h(a)} ${h(a)} 0 0 1 ${h(c)} ${h(l)}`:"";return`M${h(n+t.left)} ${h(r)} H${h(n+i-t.right)}`+s(t.right,n+i,r+t.right)+` V${h(r+o-t.right)}`+s(t.right,n+i-t.right,r+o)+` H${h(n+t.left)}`+s(t.left,n,r+o-t.left)+` V${h(r+t.left)}`+s(t.left,n+t.left,r)+" Z"}function Xw(e,t,n){let r=o=>n&&(n.left>0||n.right>0)?ee("path",{d:Zj(t,n),...o}):ee("rect",{x:h(t.x),y:h(t.y),width:h(t.width),height:h(t.height),...o}),i=r({fill:e.style.stripFill});return e.style.tint?i+r({fill:e.style.tint,"fill-opacity":Al}):i}function Jj(e,t){let n=e.timeline,r=n.waveStrip;if(!e.waves||!r)return"";let i=[ee("rect",{x:h(n.box.x),y:h(r.y),width:h(n.box.width),height:h(r.height),rx:Ww,ry:Ww,fill:t.timeline.panelFill,stroke:t.timeline.border,"stroke-width":1})];for(let o of e.waves){let s=nO(o,n);s&&i.push(ee("g",{"data-id":o.id},`<title>${Mt(o.strip.tooltip)}</title>${Xw(o,s,Kj(s,n))}`))}return ee("g",{"data-layer":"wave-strip"},i.join(""))}function rO(e,t){let n=[];for(let r of e){if(!r.style.tint||r.empty)continue;let i=t?zw(r.columnBox,t):r.columnBox;!i||i.width<=0||i.height<=0||n.push(ee("rect",{x:h(i.x),y:h(i.y),width:h(i.width),height:h(i.height),fill:r.style.tint,"fill-opacity":jm}))}return n.length===0?"":ee("g",{"data-layer":"wave-bg"},n.join(""))}function iO(e,t){let n=[];for(let r of e??[]){let i=r.topY,o=r.bottomY;t&&(r.x<=t.x||r.x>=t.x+t.width||(i=Math.max(i,t.y),o=Math.min(o,t.y+t.height),o<=i))||n.push(ee("line",{x1:h(r.x),y1:h(i),x2:h(r.x),y2:h(o),stroke:r.stroke,"stroke-width":Mu,"stroke-dasharray":r.dash}))}return n.length===0?"":ee("g",{"data-layer":"wave-boundary"},n.join(""))}function zC(e,t){let n=lm(e,tr);return t?n*1.05:n}function Qj(e,t,n){let r=e.timeline,i=r.waveStrip;if(!e.waves||!i)return"";let o=i.y+i.height/2+jj,s=i.y+HC,a=i.height-2*HC,c=[],l=(u,f)=>{let d=zC(f,!1)+2*sm;return ee("rect",{x:h(u-d/2),y:h(s),width:h(d),height:h(a),fill:t.timeline.panelFill})+Ne({x:h(u),y:h(o),"font-family":n.sans,"font-size":tr,"font-style":"italic",fill:t.wave.labelMuted,"text-anchor":"middle"},f)};i.placeholder!==void 0&&c.push(l(r.box.x+r.box.width/2,i.placeholder));for(let u of e.waves){if(u.strip.gapLabel){let{text:m,x:g}=u.strip.gapLabel;c.push(l(g,m))}if(u.strip.marker){let{x:m,y:g}=u.strip.marker,_=Hm/2;c.push(ee("path",{d:`M${h(m)} ${h(g-_)} L${h(m+_)} ${h(g)} L${h(m)} ${h(g+_)} L${h(m-_)} ${h(g)} Z`,fill:t.timeline.panelFill,stroke:t.wave.boundary,"stroke-width":1.5},`<title>${Mt(u.strip.tooltip)}</title>`))}let f=nO(u,r);if(!f)continue;let d=f.x+f.width,p=u.strip.footnotesShown?u.footnoteIndicators.length*Rn:0;if(p){let m=d-_r+sm,g=d-_r-p-sm;c.push(Xw(u,{x:g,y:s,width:m-g,height:a}))}if(u.strip.label!==void 0){let m=zC(u.strip.label,!0),g=p?Math.min(u.strip.labelX,d-_r-p-m/2):u.strip.labelX,_=m+2*sm;c.push(Xw(u,{x:g-_/2,y:s,width:_,height:a})),c.push(Ne({x:h(g),y:h(o),"font-family":n.sans,"font-size":tr,"font-weight":600,fill:u.style.text,"text-anchor":"middle"},u.strip.label))}if(u.strip.footnotesShown){let m=d-_r;for(let g=u.footnoteIndicators.length-1;g>=0;g--)c.push(Ne({x:h(m),y:h(i.y+zj),"font-family":n.sans,"font-size":Hj,"font-weight":700,fill:u.style.text,"text-anchor":"end"},String(u.footnoteIndicators[g]))),m-=Rn}}return c.length===0?"":ee("g",{"data-layer":"wave-labels"},c.join(""))}function oO(e){if(!e||e.length===0)return"";let t=e.map(n=>ee("line",{x1:h(n.x),y1:h(n.topY),x2:h(n.x),y2:h(n.bottomY),stroke:n.stroke,"stroke-width":1,"stroke-dasharray":Um}));return ee("g",{"data-layer":"wave-cross"},t.join(""))}function sO(e){let t=e.entities.item.bg;return t==="none"?"transparent":t}function e4(e,t,n,r){if(!e)return"";let i=[];for(let o of e.entries){let s=o.swatch;if(s&&o.kind==="background"){let a=sO(n),c={x:h(s.x),y:h(s.y),width:h(s.width),height:h(s.height)};i.push(ee("rect",{...c,rx:2,ry:2,fill:a,stroke:n.entities.item.fg,"stroke-width":1})),i.push(ee("rect",{x:h(s.x+.5),y:h(s.y+.5),width:h(s.width-1),height:h(s.height-1),rx:2,ry:2,fill:tO(t,cm(a))}))}else if(s&&o.kind==="boundary"){let a=s.x+s.width/2;i.push(ee("line",{x1:h(a),y1:h(s.y),x2:h(a),y2:h(s.y+s.height),stroke:n.wave.boundary,"stroke-width":Mu}))}for(let a of o.runs)i.push(Ne({x:h(a.x),y:h(a.y),"font-family":r.sans,"font-size":tr,fill:n.wave.labelText},a.text))}return ee("g",{"data-layer":"wave-legend"},i.join(""))}async function qw(e,t={}){let r=new om(t.idPrefix??"nl").next("root"),i=e.palette,o=t.fontFamilies??Mm,s=[],a=i.arrowhead.neutral,c=i.arrowhead.light,l=i.arrowhead.dark,u=(p,m)=>`<marker id="${p}" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="${m}"/></marker>`,f=`<defs>${WC(r)}`+u(`${r}-arrow`,a)+u(`${r}-arrow-light`,c)+u(`${r}-arrow-dark`,l)+Vj(e).map(p=>qj(r,p,i)).join("")+"</defs>";s.push(f),s.push(ee("rect",{x:0,y:0,width:h(e.width),height:h(e.height),fill:e.backgroundColor})),s.push(Ej(e.timeline,i,o)),s.push(Jj(e,i));for(let p of e.swimlanes)s.push(Cj(p,i));s.push(KC(e.timeline,e.chartBox.y,i)),e.waves&&s.push(rO(e.waves)),s.push(_j(e.timeline,e.chartBox.y,i)),s.push(iO(e.waveBoundaries)),s.push(Qj(e,i,o));for(let p of e.edges)p.kind==="underBar"&&s.push(jC(p,r,i));for(let p of e.swimlanes)s.push(JC(p,t,r,i,o));for(let p of e.includes)s.push(Bj(p,t,r,i,o,e));s.push(oO(e.waveCrossings));for(let p of e.edges)p.kind!=="underBar"&&s.push(jC(p,r,i));for(let p of e.anchors)s.push(Lj(p,i));for(let p of e.milestones)s.push(Dj(p,r,i));for(let p of e.anchors)s.push(Oj(p,i,o));for(let p of e.milestones)s.push($j(p,i,o));if(s.push(bj(e.nowline,i,o)),s.push(Fj(e.footnotes,r,i,o)),s.push(e4(e.waveLegend,r,i,o)),s.push(wj(e.header,r,i,o)),s.push(Uj(e,o)),e.header.logo&&t.assetResolver){let p=await Wj(e.header.logo.assetRef??"",t.assetResolver,r,t,e.header.logo.box.x,e.header.logo.box.y,Math.max(e.header.logo.box.width,e.header.logo.box.height));p&&s.push(p)}return`<svg${ul({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${h(e.width)} ${h(e.height)}`,width:h(e.width),height:h(e.height),"data-theme":e.theme,"data-generator":"nowline"})}>${s.join("")}</svg>`}var Vw="/browser-source.nowline",t4={error:3,warning:2,info:1},n4={error:3,warning:2,info:1};function aO(e,t){return t4[e]>=n4[t]}var um,lO=0;function cO(){return um||(um=tw()),um}function r4(){return yt.parse(`memory:///nowline-browser-${++lO}.nowline`)}async function fm(e,t={}){let n=t.filePath??Vw,r=cO(),o=r.shared.workspace.LangiumDocumentFactory.fromString(e,r4());await r.shared.workspace.DocumentBuilder.build([o],{validation:!0});let s=[];for(let a of og(o))a.origin==="lexer"?s.push(SC(a.error,n)):a.origin==="parser"?s.push(IC(a.error,n)):s.push(kC(a.diagnostic,n));return{ast:o.parseResult.value,diagnostics:s}}async function Yw(e,t={}){let n=t.filePath??Vw,r=await fm(e,{filePath:n});if(r.diagnostics.some(w=>w.severity==="error"))return{kind:"diagnostics",diagnostics:r.diagnostics};let i=cO(),o=t.readFile??LC,s=await Zv(r.ast,n,{services:i.Nowline,readFile:o}),a=s.diagnostics.some(w=>w.severity==="error"&&!rl(w)&&!Uw(w.message)),c=[...r.diagnostics];for(let w of s.diagnostics){if(w.severity==="error"&&Uw(w.message)){t.onSkippedInclude?.({sourcePath:w.sourcePath,message:w.message});continue}a&&rl(w)||c.push(NC(w))}if(c.some(w=>w.severity==="error"))return{kind:"diagnostics",diagnostics:c};let l;if(t.timezone)try{l=Fw(t.timezone)}catch(w){if(w instanceof Ko)return{kind:"diagnostics",diagnostics:[{severity:"error",code:"invalid-timezone",message:w.message,file:n,line:1,column:1}]};throw w}let u=Bw({now:t.today,zone:l}),f=Lw(r.ast,s,{theme:t.theme,today:u,locale:t.locale,width:t.width,nonWorking:t.nonWorking}),d=t.diagnosticLevel??"error",p=Mw(f,{today:u??void 0,locale:t.locale??"en-US"}).map(w=>CC(w,n)),m=t.showLinks!==!1,g=t.strict===!0,_=[],x=await qw(f,{idPrefix:t.idPrefix,assetResolver:t.assetResolver,noLinks:!m,strict:g,warn:w=>_.push(w),fontFamilies:t.fontFamilies}),y=[...p,..._.map(w=>PC(w,n,g?"error":"warning"))].filter(w=>aO(w.severity,d));return g&&y.length>0?{kind:"diagnostics",diagnostics:[...c,...y]}:{kind:"svg",svg:x,warnings:y}}function Kw(){um=void 0,lO=0}var uO="/embed.nowline",Zw=!1;async function fO(e){let{ast:t,diagnostics:n}=await fm(e,{filePath:uO});return{ast:t,errors:n.filter(r=>r.severity==="error").map(r=>r.message)}}async function dm(e,t={}){let n={filePath:uO,theme:t.theme,today:t.today,timezone:t.timezone,locale:t.locale,width:t.width,nonWorking:t.nonWorking,idPrefix:t.idPrefix,onSkippedInclude:()=>{Zw||(Zw=!0,console.warn("nowline: `include` directives are skipped in the browser embed (single-file mode). Render multi-file roadmaps with the CLI or the GitHub Action."))}},r=await Yw(e,n);if(r.kind==="svg")return r.svg;let i=r.diagnostics.filter(o=>o.severity==="error").map(o=>o.message);throw new yu(`Failed to render Nowline source: ${i.join("; ")}`,i)}var yu=class extends Error{constructor(n,r){super(n);I(this,"details",r);this.name="EmbedRenderError"}};function dO(){Zw=!1,Kw()}var Zn=Uint8Array,_n=Uint16Array,n_=Int32Array,r_=new Zn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i_=new Zn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),pO=new Zn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yO=function(e,t){for(var n=new _n(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new n_(n[30]),r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return{b:n,r:i}},xO=yO(r_,2),i4=xO.b,Qw=xO.r;i4[28]=258,Qw[258]=28;var TO=yO(i_,0),cae=TO.b,hO=TO.r,e_=new _n(32768);for(Be=0;Be<32768;++Be)ni=(Be&43690)>>1|(Be&21845)<<1,ni=(ni&52428)>>2|(ni&13107)<<2,ni=(ni&61680)>>4|(ni&3855)<<4,e_[Be]=((ni&65280)>>8|(ni&255)<<8)>>1;var ni,Be,vu=(function(e,t,n){for(var r=e.length,i=0,o=new _n(t);i<r;++i)e[i]&&++o[e[i]-1];var s=new _n(t);for(i=1;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;var a;if(n){a=new _n(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],f=s[e[i]-1]++<<u,d=f|(1<<u)-1;f<=d;++f)a[e_[f]>>c]=l}else for(a=new _n(r),i=0;i<r;++i)e[i]&&(a[i]=e_[s[e[i]-1]++]>>15-e[i]);return a}),Zo=new Zn(288);for(Be=0;Be<144;++Be)Zo[Be]=8;var Be;for(Be=144;Be<256;++Be)Zo[Be]=9;var Be;for(Be=256;Be<280;++Be)Zo[Be]=7;var Be;for(Be=280;Be<288;++Be)Zo[Be]=8;var Be,pm=new Zn(32);for(Be=0;Be<32;++Be)pm[Be]=5;var Be,o4=vu(Zo,9,0);var s4=vu(pm,5,0);var vO=function(e){return(e+7)/8|0},a4=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Zn(e.subarray(t,n))};var ri=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},xu=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},Jw=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return{t:_O,l:0};if(i==1){var s=new Zn(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(b,$){return b.f-$.f}),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,f=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=i-1;)a=n[n[l].f<n[f].f?l++:f++],c=n[l!=u&&n[l].f<n[f].f?l++:f++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};for(var d=o[0].s,r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new _n(d+1),m=t_(n[u-1],p,0);if(m>t){var r=0,g=0,_=m-t,x=1<<_;for(o.sort(function($,N){return p[N.s]-p[$.s]||$.f-N.f});r<i;++r){var y=o[r].s;if(p[y]>t)g+=x-(1<<m-p[y]),p[y]=t;else break}for(g>>=_;g>0;){var w=o[r].s;p[w]<t?g-=1<<t-p[w]++-1:++r}for(;r>=0&&g;--r){var v=o[r].s;p[v]==t&&(--p[v],++g)}m=t}return{t:new Zn(p),l:m}},t_=function(e,t,n){return e.s==-1?Math.max(t_(e.l,t,n+1),t_(e.r,t,n+1)):t[e.s]=n},mO=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new _n(++t),r=0,i=e[0],o=1,s=function(c){n[r++]=c},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return{c:n.subarray(0,r),n:t}},Tu=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},wO=function(e,t,n){var r=n.length,i=vO(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var o=0;o<r;++o)e[i+o+4]=n[o];return(i+4+r)*8},gO=function(e,t,n,r,i,o,s,a,c,l,u){ri(t,u++,n),++i[256];for(var f=Jw(i,15),d=f.t,p=f.l,m=Jw(o,15),g=m.t,_=m.l,x=mO(d),y=x.c,w=x.n,v=mO(g),b=v.c,$=v.n,N=new _n(19),L=0;L<y.length;++L)++N[y[L]&31];for(var L=0;L<b.length;++L)++N[b[L]&31];for(var G=Jw(N,7),Y=G.t,M=G.l,S=19;S>4&&!Y[pO[S-1]];--S);var F=l+5<<3,X=Tu(i,Zo)+Tu(o,pm)+s,R=Tu(i,d)+Tu(o,g)+s+14+3*S+Tu(N,Y)+2*N[16]+3*N[17]+7*N[18];if(c>=0&&F<=X&&F<=R)return wO(t,u,e.subarray(c,c+l));var P,C,j,z;if(ri(t,u,1+(R<X)),u+=2,R<X){P=vu(d,p,0),C=d,j=vu(g,_,0),z=g;var q=vu(Y,M,0);ri(t,u,w-257),ri(t,u+5,$-1),ri(t,u+10,S-4),u+=14;for(var L=0;L<S;++L)ri(t,u+3*L,Y[pO[L]]);u+=3*S;for(var re=[y,b],ie=0;ie<2;++ie)for(var ye=re[ie],L=0;L<ye.length;++L){var ne=ye[L]&31;ri(t,u,q[ne]),u+=Y[ne],ne>15&&(ri(t,u,ye[L]>>5&127),u+=ye[L]>>12)}}else P=o4,C=Zo,j=s4,z=pm;for(var L=0;L<a;++L){var ae=r[L];if(ae>255){var ne=ae>>18&31;xu(t,u,P[ne+257]),u+=C[ne+257],ne>7&&(ri(t,u,ae>>23&31),u+=r_[ne]);var A=ae&31;xu(t,u,j[A]),u+=z[A],A>3&&(xu(t,u,ae>>5&8191),u+=i_[A])}else xu(t,u,P[ae]),u+=C[ae]}return xu(t,u,P[256]),u+C[256]},l4=new n_([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_O=new Zn(0),c4=function(e,t,n,r,i,o){var s=o.z||e.length,a=new Zn(r+s+5*(1+Math.ceil(s/7e3))+i),c=a.subarray(r,a.length-i),l=o.l,u=(o.r||0)&7;if(t){u&&(c[0]=o.r>>3);for(var f=l4[t-1],d=f>>13,p=f&8191,m=(1<<n)-1,g=o.p||new _n(32768),_=o.h||new _n(m+1),x=Math.ceil(n/3),y=2*x,w=function(xe){return(e[xe]^e[xe+1]<<x^e[xe+2]<<y)&m},v=new n_(25e3),b=new _n(288),$=new _n(32),N=0,L=0,G=o.i||0,Y=0,M=o.w||0,S=0;G+2<s;++G){var F=w(G),X=G&32767,R=_[F];if(g[X]=R,_[F]=X,M<=G){var P=s-G;if((N>7e3||Y>24576)&&(P>423||!l)){u=gO(e,c,0,v,b,$,L,Y,S,G-S,u),Y=N=L=0,S=G;for(var C=0;C<286;++C)b[C]=0;for(var C=0;C<30;++C)$[C]=0}var j=2,z=0,q=p,re=X-R&32767;if(P>2&&F==w(G-re))for(var ie=Math.min(d,P)-1,ye=Math.min(32767,G),ne=Math.min(258,P);re<=ye&&--q&&X!=R;){if(e[G+j]==e[G+j-re]){for(var ae=0;ae<ne&&e[G+ae]==e[G+ae-re];++ae);if(ae>j){if(j=ae,z=re,ae>ie)break;for(var A=Math.min(re,ae-2),O=0,C=0;C<A;++C){var U=G-re+C&32767,H=g[U],Z=U-H&32767;Z>O&&(O=Z,R=U)}}}X=R,R=g[X],re+=X-R&32767}if(z){v[Y++]=268435456|Qw[j]<<18|hO[z];var V=Qw[j]&31,oe=hO[z]&31;L+=r_[V]+i_[oe],++b[257+V],++$[oe],M=G+j,++N}else v[Y++]=e[G],++b[e[G]]}}for(G=Math.max(G,M);G<s;++G)v[Y++]=e[G],++b[e[G]];u=gO(e,c,l,v,b,$,L,Y,S,G-S,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=_,o.p=g,o.i=G,o.w=M)}else{for(var G=o.w||0;G<s+l;G+=65535){var le=G+65535;le>=s&&(c[u/8|0]=l,le=s),u=wO(c,u+1,e.subarray(G,le))}o.i=s}return a4(a,0,r+vO(u)+i)};var EO=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=n.length|0,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},u4=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new Zn(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return c4(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)};var bO=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var f4=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=EO();i.p(t.dictionary),bO(e,2,i.d())}};function AO(e,t){t||(t={});var n=EO();n.p(e);var r=u4(e,t,t.dictionary?6:2,4);return f4(r,t),bO(r,r.length-4,n.d()),r}var d4=typeof TextDecoder<"u"&&new TextDecoder,p4=0;try{d4.decode(_O,{stream:!0}),p4=1}catch{}var IO="https://free.nowline.io/open";function RO(e){let t=new TextEncoder().encode(e),n=AO(t),r=32768,i="";for(let o=0;o<n.length;o+=r)i+=String.fromCharCode(...n.subarray(o,o+r));return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function o_({source:e,sourceUrl:t,share:n}){if(n===!1||n==="none")return null;if(typeof n=="object")return t!==void 0&&kO(t)?n.remoteUrl.replace("{url}",encodeURIComponent(t)):n.textUrl.replace("{text}",RO(e));let r=n===!0?IO:n,i=new URL(r);return t!==void 0&&kO(t)?i.hash=`url=${encodeURIComponent(t)}`:i.hash=`text=${RO(e)}`,i.toString()}function kO(e){try{return new URL(e).protocol==="https:"}catch{return!1}}var SO=0;async function NO(e){let t=e.document??globalThis.document;if(!t)return{rendered:0,failed:0};let n=t.querySelectorAll(e.selector),r=0,i=0,o=++SO,s=e.share??!0,a=[],c=0;for(let l of Array.from(n)){let u=h4(l);if(!u)continue;let f=m4(l),d=`nl-r${o}-${c++}`,p={theme:e.theme,locale:e.locale,width:e.width,nonWorking:e.nonWorking,today:e.today,timezone:e.timezone,idPrefix:d},m=u.parentElement,g=u.nextSibling,x=l.getAttribute("data-nowline-source-url")??void 0??e.sourceUrl;a.push(dm(f,p).then(y=>{if(g4(u,y),r++,m!==null){let w=o_({source:f,sourceUrl:x,share:s});if(w!==null){let v=t.createElement("a");v.className="nowline-share",v.href=w,v.target="_blank",v.rel="noopener noreferrer",v.textContent="Share on Nowline",m.insertBefore(v,g)}}},y=>{i++,console.error("nowline: render failed",y)}))}return await Promise.all(a),{rendered:r,failed:i}}function h4(e){let t=e.parentElement;return t&&t.tagName.toUpperCase()==="PRE"?t:e}function m4(e){return e.textContent??""}function g4(e,t){e.outerHTML=t}function PO(){SO=0}function hm(){if(typeof globalThis>"u")return"light";let e=globalThis.matchMedia;if(typeof e!="function")return"light";try{return e("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}function CO(e,t){return e&&e!=="auto"?lw(e)??t:t}var y4="0.0.0-dev.20261007205200.g9919f48",x4="9919f48",T4="pre code.language-nowline, code.language-nowline",OO={theme:"auto",startOnLoad:!0,selector:T4,systemTheme:hm(),share:!0},qe={...OO},s_=!1;function v4(e={}){qe={theme:e.theme??qe.theme,startOnLoad:e.startOnLoad??qe.startOnLoad,selector:e.selector??qe.selector,locale:e.locale??qe.locale,width:e.width??qe.width,nonWorking:e.nonWorking??qe.nonWorking,today:e.today!==void 0?e.today:qe.today,timezone:e.timezone??qe.timezone,share:e.share??qe.share,sourceUrl:e.sourceUrl??qe.sourceUrl,systemTheme:hm()}}function LO(){return{theme:CO(qe.theme,qe.systemTheme),locale:qe.locale,width:qe.width,nonWorking:qe.nonWorking,today:qe.today,timezone:qe.timezone}}async function w4(e,t={}){let n={...LO(),...t};return dm(e,n)}async function _4(e){return fO(e)}async function a_(e){let t={selector:e?.selector??qe.selector,theme:e?.theme??LO().theme,locale:e?.locale??qe.locale,width:e?.width??qe.width,nonWorking:e?.nonWorking??qe.nonWorking,today:e?.today!==void 0?e.today:qe.today,timezone:e?.timezone??qe.timezone,share:e?.share??qe.share,sourceUrl:e?.sourceUrl??qe.sourceUrl,document:e?.document};return NO(t)}var E4=a_;if(typeof document<"u"&&!s_){s_=!0;let e=()=>{qe.startOnLoad&&a_()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):queueMicrotask(e)}function b4(){qe={...OO,systemTheme:hm()},s_=!1,dO(),PO()}return bu(A4);})();
|
|
2771
|
+
`).map(i=>i.trim()),n=0,r=t.length;for(;n<r&&t[n]==="";)n+=1;for(;r>n&&t[r-1]==="";)r-=1;return t.slice(n,r)}function dw(e,t,n,r=t){let i=e,o=MP(e);if(o){if(o.length>=2)return{textSpills:!(n<=t&&o.every((l,u)=>ut(l,$h)<=(u===0?r:t))),titleLines:o};i=o[0]??""}let s=i.length>0&&ut(i,$h)>r,a=n>t;if(!s&&!a)return{textSpills:!1,titleLines:[i]};if(s&&!a){let c=kl(i,t,$h,r);if(c.length>=2&&c.length<=Ym&&c.every((l,u)=>ut(l,$h)<=(u===0?r:t)))return{textSpills:!1,titleLines:c}}return{textSpills:!0,titleLines:[i]}}function pw(e,t,n){let r=MP(e);return r&&r.length>=2?r:!t.textSpills&&!n&&t.titleLines.length>=2?t.titleLines:[r?r[0]??"":e]}var Dh=class{constructor(t){I(this,"input");this.input=t}get id(){return this.input.id}measure(t){return{width:Math.max(An,this.input.logicalRightX-this.input.logicalLeftX),height:t.bands.bandwidth()}}place(t,n){let r=this.measure(n),i=Math.max(An,r.width-2*sn),o=t.x+sn,s={x:o,y:t.y,width:i,height:r.height},a=ui(!!this.input.hasLinkIcon,this.input.hasAfterGlyph?{barWidth:i}:void 0),c=Math.max(0,i-a-UX),l=this.input.title,u=fw(this.input.metaText,this.input.metaTrailingWidth??0),f=Math.max(0,i-a-(this.input.titleFirstLineRightReservePx??Cl({barWidth:i,footnoteLabels:[],hasBeforeGlyph:!1}))),{textSpills:d,titleLines:p}=dw(l,c,u,f),m=d?o+i+WX:o+a;return{id:this.input.id,box:s,textX:m,textSpills:d,titleLines:p}}};var Mh=class{constructor(t,n){I(this,"node");I(this,"deps");this.node=t,this.deps=n}get id(){return this.node.name??""}place(t,n){let{node:r}=this,{deps:i}=this,o=ht("parallel",r.properties,n.styleCtx),s=qo(r,t.x,n),a=On(Ve(r.properties,"after")),c=On(Ve(r.properties,"before")),l=r.title??r.name,u=M_(!!(a||c)),f=t.y+u,d=n.scale.showsNonWorking?n.scale.startX(s):s,p=[],m=d,g=0,_=n.currentFlowKey;n.nextParallelId+=1;let x=r.name??`parallel-${n.nextParallelId}`,y=0;for(let $ of r.content){if($.$type==="DescriptionDirective")continue;n.currentFlowKey=`${_}/par:${x}#${y}`;let N=i.newCursor(s,f+g),L=i.sequenceOne($,N,n);p.push(L),g+=Math.max(n.bandScale.step(),N.height),m=Math.max(m,N.maxX),y++}n.currentFlowKey=_;let w={x:d,y:f,width:m-d,height:g};t.x=m+xl,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,u+g);let v=r.name;v&&(n.entityLeftEdges.set(v,w.x),n.entityRightEdges.set(v,w.x+w.width));let b=kh({box:w,afterDate:a,beforeDate:c,row:{kind:"header-band",title:l,titleInsetX:cs}});return{kind:"parallel",id:v,title:l,box:w,children:p,style:o,inlineDatePins:b.length>0?b:void 0}}};var al=class extends Map{constructor(t,n=HX){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(let[r,i]of t)this.set(r,i)}get(t){return super.get(FP(this,t))}has(t){return super.has(FP(this,t))}set(t,n){return super.set(GX(this,t),n)}delete(t){return super.delete(jX(this,t))}};function FP({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function GX({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function jX({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function HX(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Fh(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Bh(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var BP=Symbol("implicit");function Uh(){var e=new al,t=[],n=[],r=BP;function i(o){let s=e.get(o);if(s===void 0){if(r!==BP)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new al;for(let s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Uh(t,n).unknown(r)},Bh.apply(i,arguments),i}function hu(){var e=Uh().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,s,a=!1,c=0,l=0,u=.5;delete e.unknown;function f(){var d=t().length,p=i<r,m=p?i:r,g=p?r:i;o=(g-m)/Math.max(1,d-c+l*2),a&&(o=Math.floor(o)),m+=(g-m-o*(d-c))*u,s=o*(1-c),a&&(m=Math.round(m),s=Math.round(s));var _=Fh(d).map(function(x){return m+o*x});return n(p?_.reverse():_)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([r,i]=d,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(d){return[r,i]=d,r=+r,i=+i,a=!0,f()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(d){return arguments.length?(a=!!d,f()):a},e.padding=function(d){return arguments.length?(c=Math.min(1,l=+d),f()):c},e.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),f()):c},e.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},e.copy=function(){return hu(t(),[r,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},Bh.apply(f(),arguments)}var hw=class e{constructor(t,n,r){I(this,"bandwidthPx");I(this,"stepPx");I(this,"d3");this.bandwidthPx=t,this.stepPx=n,this.d3=r}static fixedRow(t){return new e(t.bandwidth,t.step)}static forRows(t){let n=Array.from({length:t.count},(i,o)=>String(o)),r=hu().domain(n).range(t.range).paddingInner(t.paddingInner??0).paddingOuter(t.paddingOuter??0);return new e(r.bandwidth(),r.step(),r)}bandwidth(){return this.bandwidthPx}step(){return this.stepPx}forward(t){if(!this.d3)throw new Error("BandScale.forward is only available on closed-domain bands (BandScale.forRows)");let n=this.d3(t);if(n===void 0)throw new Error(`BandScale: unknown band id "${t}"`);return n}},zX={bandwidth:56,step:64};function UP(){return hw.fixedRow(zX)}var WP=1e-6,mu=class{constructor(t){I(this,"domain");I(this,"range");I(this,"pixelsPerDay");I(this,"calendar");I(this,"nonWorking");this.domain=t.domain,this.range=t.range,this.calendar=t.calendar,this.nonWorking=t.nonWorking??"hide";let n=Math.max(1,this.showsNonWorking?bn(t.domain[0],t.domain[1]):this.indexOf(t.domain[1]));this.pixelsPerDay=(t.range[1]-t.range[0])/n}get showsNonWorking(){return this.nonWorking==="show"&&this.calendar?.hasNonWorkingDays===!0}indexOf(t){return this.calendar?this.calendar.workingIndexOf(this.domain[0],t):bn(this.domain[0],t)}dayAt(t){let n=(t-this.range[0])/this.pixelsPerDay;return{days:n,day:Math.floor(n+WP)}}forward(t){return this.showsNonWorking?this.range[0]+bn(this.domain[0],t)*this.pixelsPerDay:this.range[0]+this.indexOf(t)*this.pixelsPerDay}forwardWithinDomain(t){return t<this.domain[0]||t>this.domain[1]?null:this.forward(t)}invert(t){let n=Math.round((t-this.range[0])/this.pixelsPerDay);return this.showsNonWorking?wt(this.domain[0],n):this.calendar?this.calendar.dateAtWorkingIndex(this.domain[0],n):wt(this.domain[0],n)}indexAtX(t){let{days:n,day:r}=this.dayAt(t);if(!this.showsNonWorking||!this.calendar)return n;let i=wt(this.domain[0],r),o=this.calendar.workingIndexOf(this.domain[0],i);return this.calendar.isWorkingDay(i)?o+Math.max(0,n-r):o}startX(t){if(!this.showsNonWorking||!this.calendar)return t;let n=wt(this.domain[0],this.dayAt(t).day);if(this.calendar.isWorkingDay(n))return t;let r=this.calendar.workingIndexOf(this.domain[0],n);return this.forward(this.calendar.dateAtWorkingIndex(this.domain[0],r))}advanceX(t,n){if(!this.showsNonWorking||!this.calendar)return t+n*this.pixelsPerDay;let r=this.startX(t);if(n<=0)return r;let i=this.indexAtX(r)+n,o=Math.ceil(i-WP)-1,s=i-o,a=this.calendar.dateAtWorkingIndex(this.domain[0],o);return this.forward(a)+s*this.pixelsPerDay}get originX(){return this.range[0]}get widthPx(){return this.range[1]-this.range[0]}};function Wh(e){return e.endsWith(":")?e.slice(0,-1):e}function GP(e,t){let r=e.roadmapDecl?.properties.find(l=>Wh(l.key)==="scale")?.value,i="weeks",o,s;if(r)if(r==="days"||r==="weeks"||r==="months"||r==="quarters"||r==="years")i=r;else{let l=/^(\d+)([dwmqy])$/.exec(r);if(l){let u=Math.max(1,parseInt(l[1],10));switch(l[2]){case"d":i="days";break;case"w":i="weeks";break;case"m":i="months";break;case"q":i="quarters";break;case"y":i="years";break}o=Xh(i)*u,s=1}}let a=s??O_[i]??4,c=l=>s===void 0&&!l?{labelEveryDefault:!0}:{};if(t){let u=t.properties.find(_=>Wh(_.key)==="unit")?.value??i,f=t.properties.find(_=>Wh(_.key)==="label-every"),d=t.properties.find(_=>Wh(_.key)==="pixels-per-unit"),p=f&&parseInt(f.value,10)||0,m=p!==0?Math.max(1,p):a,g=d?Math.max(1,parseInt(d.value,10)||Xh(u)):o??Xh(u);return{unit:u,labelEvery:m,pixelsPerUnit:g,...c(p!==0)}}return{unit:i,labelEvery:a,pixelsPerUnit:o??Xh(i),...c(!1)}}function Xh(e){switch(e){case"days":return S_;case"weeks":return 40;case"months":return 80;case"quarters":return 160;case"years":return 320}}var qX=.5,mw=.5,gw=7;function Yo(e){return e==="months"||e==="quarters"||e==="years"}function Gh(e,t){let n=e.getUTCFullYear(),r=e.getUTCMonth();switch(t){case"months":return new Date(Date.UTC(n,r+1,1));case"quarters":return new Date(Date.UTC(n,r-r%3+3,1));case"years":return new Date(Date.UTC(n+1,0,1))}}function VX(e,t){if(e.getUTCDate()!==1)return!1;let n=e.getUTCMonth();switch(t){case"months":return!0;case"quarters":return n%3===0;case"years":return n===0}}function jh(e,t,n,r,i){let o=Math.ceil(t-1e-6);if(i?.hasNonWorkingDays){if(!Yo(n)&&o<=0)return 0;let a=o<=0?e:wt(i.dateAtWorkingIndex(e,o-1),1),c=Yo(n)?XP(a,n):n==="weeks"?jP(a,e,i.weekStart):a;return i.workingIndexOf(e,c)}if(!Yo(n))return Math.ceil(t/r)*r;let s=wt(e,o);return bn(e,XP(s,n))}function XP(e,t){return VX(e,t)?e:Gh(e,t)}function jP(e,t,n){let r=n===void 0?-bn(t,e):n-e.getUTCDay();return wt(e,(r%gw+gw)%gw)}function YX(e,t,n){return jP(wt(e,1),t,n)}function yw(e,t,n,r=fu){if(e.calendar?.hasNonWorkingDays)return KX(e,t,e.calendar,r);if(Yo(t.unit))return QX(e,t,t.unit,r);let i=n.daysPerUnit(t.unit),o=i*e.pixelsPerDay,s=Math.max(1,Math.round(e.widthPx/e.pixelsPerDay)),a=Math.floor(s/i)+1,c=[];for(let l=0;l<a;l++){let u=l*i,f=e.originX+u*e.pixelsPerDay,d=l%t.labelEvery===0,p=l===a-1;c.push({x:f,labelX:p?void 0:f+o/2,major:d,label:d&&!p?xw(t.unit,wt(e.domain[0],u),l,r):void 0})}return c}function KX(e,t,n,r){let{unit:i}=t,[o,s]=e.domain,a=_=>Yo(i)?Gh(_,i):i==="weeks"?YX(_,o,n.weekStart):wt(_,1),c=[o];for(let _=a(o);_<s;_=a(_))c.push(_);let l=e.forward(s),u=[];c.forEach((_,x)=>{let y=e.forward(_);(x+1<c.length?e.forward(c[x+1]):l)>y&&!ZX(e,i,c,x)&&u.push({date:_,x:y})});let f=i==="days"&&t.labelEveryDefault===!0&&n.weekStart!==void 0,d=(_,x)=>f?_.getUTCDay()===n.weekStart:x%t.labelEvery===0,m=(e.showsNonWorking?w_(i):n.daysPerUnit(i))*e.pixelsPerDay,g=u.map(({date:_,x},y)=>{let w=(y+1<u.length?u[y+1].x:l)-x,v=d(_,y),b=v?xw(i,_,y,r):void 0;if(b!==void 0){let $=ut(b,ro)>w,N=Yo(i)?y===0||y===u.length-1:w<m-qX;$&&N&&(b=void 0)}return{x,labelX:x+w/2,major:v,label:b}});return s>o&&g.push({x:l,labelX:void 0,major:d(s,u.length),label:void 0}),g}function ZX(e,t,n,r){let i=e.calendar;if(!e.showsNonWorking||!i||!Yo(t)||r===0||r!==n.length-1)return!1;let[o,s]=e.domain;return i.workingIndexOf(o,n[r])>=i.workingIndexOf(o,s)}function HP(e,t,n,r){let i=e.calendar;if(!i?.hasNonWorkingDays)return;let o=i.nonWorkingRuns(e.domain[0],e.domain[1]);if(o.length===0)return;let[s,a]=e.range;if(e.showsNonWorking)return o.map(l=>JX(e,l,n));let c=l=>t.some(u=>Math.abs(u.x-l)<mw&&(u.major||r));return o.map(l=>{let u=e.forward(l.from),f={x:u,width:e.forward(wt(l.through,1))-u,from:l.from,through:l.through};l.titles.length>0&&(f.titles=l.titles);let d=u-s>mw&&a-u>mw;return n==="days"&&d&&!c(u)&&(f.seam=!0),f})}function JX(e,t,n){let[r,i]=e.range,o=Math.max(r,e.forward(t.from)),s=Math.min(i,e.forward(wt(t.through,1))),a={x:o,width:s-o,from:t.from,through:t.through};return t.titles.length>0&&(a.titles=t.titles),(n==="days"||n==="weeks"||t.titles.length>0)&&(a.band=!0),a}function QX(e,t,n,r){let[i,o]=e.domain,s=[i];for(let l=Gh(i,n);l<o;l=Gh(l,n))s.push(l);o>i&&s.push(o);let a=s.map(l=>e.forward(l)),c=s.length-1;return s.map((l,u)=>{let f=a[u],d=u%t.labelEvery===0;if(u===c)return{x:f,labelX:void 0,major:d,label:void 0};let p=a[u+1]-f,m=d?xw(n,l,u,r):void 0,g=u===0||u===c-1;return m!==void 0&&g&&ut(m,ro)>p&&(m=void 0),{x:f,labelX:f+p/2,major:d,label:m}})}function xw(e,t,n,r){switch(e){case"days":return`${t.getUTCMonth()+1}/${t.getUTCDate()}`;case"weeks":{let i=t.toLocaleString(r,{month:"short",timeZone:"UTC"}),o=t.getUTCDate().toString().padStart(2,"0");return`${i} ${o}`}case"months":return t.toLocaleString(r,{month:"short",timeZone:"UTC"});case"quarters":{let i=Math.floor(t.getUTCMonth()/3)+1;return`${il(r).quarterPrefix}${i} ${t.getUTCFullYear()}`}case"years":return`${t.getUTCFullYear()}`}}var Tw=class{constructor(t,n){I(this,"id");I(this,"anchor");this.id=t,this.anchor=n}place(t,n){let r=ue(this.anchor.properties,"date"),i=Ye(r);if(!i)return null;let o=t.scale.forwardWithinDomain(i);if(o===null)return null;let s=ht("anchor",this.anchor.properties,t.styleCtx),a=t.markerRowPlacements.get(this.id),c=a?.centerY??t.timeline.markerRow.y,l={x:o,y:c},u=a?.labelBox??{x:o+6+6,y:c-4,width:0,height:12},f=a?.labelSide??"right";t.entityLeftEdges.set(this.id,o),t.entityRightEdges.set(this.id,o),t.entityMidpoints.set(this.id,l);let d={id:this.id,title:this.anchor.title??this.id,center:l,radius:6,style:s,predecessorPoints:[],cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,bumpedUp:(a?.rowIndex??0)>0,labelBox:u,labelSide:f};return!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(i)&&(d.hiddenDate=no(i)),d}};function qP(e,t,n){let r=[];for(let[i,o]of e){let s=new Tw(i,o).place(t,n);s&&r.push(s)}return r}function ll(e){let t=0;for(let n of e)t=Math.max(t,VP(n.children)),n.nested.length>0&&(t=Math.max(t,ll(n.nested)));return t}function VP(e){let t=0;for(let n of e)n.kind==="item"?t=Math.max(t,n.box.x+n.box.width):t=Math.max(t,VP(n.children));return t}function vw(e,t,n){let r=[],i=new Map,o=new Map;return[...e.entries()].sort(([c],[l])=>c.localeCompare(l)).forEach(([c,l],u)=>{let f=u+1;i.set(c,f),o.set(c,Ve(l.properties,"on")),r.push({number:f,title:l.title??c,description:l.description?.text,style:ht("footnote",l.properties,t.styleCtx)})}),{area:{box:{x:Dn,y:n+Dn,width:t.chartRightX-2*Dn,height:r.length===0?0:wl+r.length*_l+Dn},entries:r},index:i,hosts:o}}var eG=.8,tG=1;function nG(e){let t=[];return KP(e,t),t}function KP(e,t){for(let n of e)if(n.kind==="item"){let r=rG(n);r>0&&n.box.width>0&&t.push({startX:n.box.x,endX:n.box.x+n.box.width,load:r})}else(n.kind==="parallel"||n.kind==="group")&&KP(n.children,t)}function rG(e){return e.capacity?e.capacity.value:e.size?1:0}function ZP(e){if(e.capacityValue<=0||e.warnFraction===null&&e.overFraction===null)return null;let t=nG(e.children);if(t.length===0)return null;let n=new Set;for(let s of t)n.add(s.startX),n.add(s.endX);let r=Array.from(n).sort((s,a)=>s-a);if(r.length<2)return null;let i=[];for(let s=0;s<r.length-1;s++){let a=r[s],c=r[s+1],l=(a+c)/2,u=0;for(let f of t)f.startX<=l&&l<f.endX&&(u+=f.load);i.push({startX:a,endX:c,load:u,classification:iG(u,e.capacityValue,e.warnFraction,e.overFraction)})}let o=[];for(let s of i){let a=o[o.length-1];a&&a.classification===s.classification&&a.endX===s.startX?a.endX=s.endX:o.push({...s})}return{segments:o,capacityValue:e.capacityValue,warnFraction:e.warnFraction,overFraction:e.overFraction}}function iG(e,t,n,r){let i=e/t;return r!==null&&i>=r?"red":n!==null&&i>=n?"yellow":"green"}function JP(e,t){let n=t.get("swimlane"),r=YP(ue(e.properties,"utilization-warn-at"),n?ue(n.properties,"utilization-warn-at"):void 0,eG),i=YP(ue(e.properties,"utilization-over-at"),n?ue(n.properties,"utilization-over-at"):void 0,tG);return{warn:r,over:i}}function YP(e,t,n){let i=aG(e??t);return i.kind==="unset"?n:i.kind==="none"?null:i.value}var oG=/^\d+(?:\.\d+)?%$/,sG=/^\d+\.\d+$/;function aG(e){if(e===void 0)return{kind:"unset"};if(e==="none")return{kind:"none"};if(oG.test(e)){let t=parseFloat(e)/100;return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}if(sG.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}return{kind:"unset"}}var QP=10;function lG(e,t,n){let r=ue(e.properties,"capacity"),i=si(r);if(i===null)return{capacity:null,badgeWidthPx:0};let o=pl(i),s=hl(t.capacityIcon,n),a=to(o,s,QP);return{capacity:{value:i,text:o,icon:s},badgeWidthPx:a}}var cG=10,uG=38,fG=8;function dG(e,t,n){let r=e.title??e.name??"";if(!r)return 0;let i=ue(e.properties,"owner");return $l(0,r,i??void 0,t,n).rightX}function pG(e,t){if(!e.name)return[];let n=[];for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e.name)){let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i),n}function hG(e,t,n,r){for(let i of e.content)if(i.$type!=="DescriptionDirective")return n.scale.startX(r.resolveChildStart(i,t,t,n))}var cl=class{constructor(t,n){I(this,"input");I(this,"deps");this.input=t,this.deps=n}get id(){return this.input.lane.name??""}place(t,n){let{lane:r,bandIndex:i}=this.input,{deps:o}=this,s=ht("swimlane",r.properties,n.styleCtx),a=t.x,c=n.bandScale.step(),l=n.currentFlowKey;n.currentFlowKey=`lane:${r.name??i}`;let{capacity:u,badgeWidthPx:f}=lG(r,s,n.symbols),d=pG(r,n),p=d.length>0?o.estimateTextWidth(d.join(","),QP):0,m=dG(r,f,p),g=hG(r,a,n,o),_=!r.title||g===void 0||g>=m+fG,x=t.y+(_?cG:uG),y=new ol({laneLeftX:a,originY:x,minRowHeight:c,slackCorridors:n.slackCorridors}),w=a,v=[];for(let S of r.content){if(S.$type==="DescriptionDirective")continue;if(!$t(S)){let H=o.resolveChildStart(S,w,a,n),{rowIndex:Z,y:V}=y.placeBlock(),oe=o.newCursor(H,V),le=o.sequenceOne(S,oe,n);v.push(le);let xe=le.box.x+le.box.width,ve=Math.max(c,oe.height);y.commitBlock({rowIndex:Z,placed:le,blockHeight:ve,blockEnd:xe,spillReservation:Yu(le)}),w=Math.max(w,xe);continue}let F=S.properties,X=o.resolveChildStart(S,w,a,n),R=ai(F,n.sizes,n.cal),P=n.scale.startX(X),C=Math.max(An,Vo(n,P,R)),j=P+C,z=S.name??"",q=o.predictItemBarExtraHeight(S,P,n),re=c+q,{rowIndex:ie,y:ye}=y.placeItem({childId:z,desiredStart:P,desiredEnd:j,predictedHeight:re}),ne=o.newCursor(X,ye),ae=o.sequenceItem(S,ne,n);v.push(ae);let A=ae.box.x+ae.box.width+sn;w=Math.max(w,A);let O=null;(ae.textSpills||ae.chipsOutside||ae.dotSpills||ae.iconSpills||ae.footnoteSpills)&&(O=Math.max(ae.decorationsRightX,ae.chipsOutside?ae.chipsRightX:0)+6),y.commitItem({rowIndex:ie,placed:ae,logicalEnd:A,spillReservation:O,rowHeight:Math.max(re,c+(ae.box.height-n.bandScale.bandwidth()))})}let b=x-t.y,$=Math.max(c+32,b+y.usedHeight()+16),N=Math.max(y.usedRightX(),m),L={x:0,y:t.y,width:n.chartRightX,height:$},G=ue(r.properties,"owner"),Y;if(G){let S=n.teams.get(G),F=n.persons.get(G);Y=S?.title??F?.title??G}let M=u?(()=>{let{warn:S,over:F}=JP(r,n.styleCtx.defaults);return ZP({children:v,capacityValue:u.value,warnFraction:S,overFraction:F})})():null;return n.currentFlowKey=l,{positioned:{id:r.name,title:r.title??r.name??"",box:L,bandIndex:i,children:v,nested:[],style:s,owner:Y,footnoteIndicators:d,capacity:u,utilization:M},usedHeight:$,usedRightX:N}}};var mG=18,gG=14,yG=14,xG=16,TG=32;function ww(e,t,n,r){let i=n+mG,o=[],s=!0;for(let a of e){s||(i+=xG),s=!1;let c=a.content.roadmap?.title??a.sourcePath,l=i+gG,u={cal:t.cal,styleCtx:{theme:t.styleCtx.theme,styles:a.config.styles,defaults:a.config.defaults,labels:a.content.labels},sizes:ts(a.content.sizes,t.cal),labels:a.content.labels,teams:a.content.teams,persons:a.content.persons,symbols:a.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:t.timeline,scale:t.scale,calendar:t.calendar,bandScale:t.bandScale,entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:new Map,chartTopY:l,chartBottomY:l,swimlaneBottomY:l,chartRightX:t.chartRightX,nextParallelId:0,nextGroupId:0,...t.waves?{waves:t.waves}:{}};t.waves&&Oh(t.waves,u.entityLeftEdges,u.entityRightEdges);let f=[],d=l,p=0;for(let y of a.content.swimlanes.values()){u.nextParallelId=0,u.nextGroupId=0;let{positioned:w,usedHeight:v}=new cl({lane:y,bandIndex:p},r).place({x:u.timeline.originX,y:d},u);f.push(w),d+=v,p++}let m=d,g=Math.max(t.bandScale.bandwidth(),m-i+yG),_={x:0,y:i,width:0,height:g},x={sourcePath:a.sourcePath,label:c,box:_,nestedSwimlanes:f,style:ht("swimlane",[],t.styleCtx)};_w(x,t.chartRightX),o.push(x),i+=g}return{regions:o,endY:i}}function _w(e,t){let n=e.box.x,{chromeRightX:r}=Dl(n,e.label,e.sourcePath),i=ll(e.nestedSwimlanes),o=Math.max(r,i)+TG,s=Math.min(t-n,o-n);e.box.width=s;for(let a of e.nestedSwimlanes)a.box.width=s}function qh(e,t){let n=[];for(let r of e){let i=t.placedItems.get(r),o=i?i.box.x+i.box.width:t.entityRightEdges.get(r);if(o===void 0)continue;let s=i?yP(i,t.bandScale.bandwidth()):t.entityMidpoints.get(r)?.y??0;if(!i&&t.waves?.plan.index.has(r)){n.push({ref:r,x:o,y:s,flowKey:`wave:${r}`,wave:r});continue}let a=t.itemFlowKey.get(r)??`marker:${r}`;n.push({ref:r,x:o,y:s,flowKey:a})}return n}function Vh(e){let t=new Map;for(let n of e){let r=t.get(n.flowKey);(!r||n.x>r.x)&&t.set(n.flowKey,n)}return Array.from(t.values())}function bw(e){let t=null;for(let n of e)n.wave===void 0&&(!t||n.x>t.x)&&(t=n);return t}function vG(e,t){let n;for(let r of e)r.wave===void 0||r.x-t<qt||(!n||r.x>n.x)&&(n=r);return n?.wave}function eC(e,t,n,r,i,o,s,a){let c=r.length*i*.58*(o?1.05:1),l=e+n+6,u=e-n-6-c,f=l+c<=a,d=u>=s,p=f?"right":d?"left":"right";return{box:{x:p==="right"?l:u,y:t-4,width:c,height:12},side:p}}var Ew=class{constructor(t,n){I(this,"id");I(this,"milestone");this.id=t,this.milestone=n}place(t){let n=this.milestone,r=ht("milestone",n.properties,t.styleCtx),i=ue(n.properties,"date"),o=Ve(n.properties,"after"),s=Ye(i),a=t.timeline.markerRow.y,c=6,l=n.title??this.id,u=null,f=a,d=null,p="right",m=!1,g,_=!1,x;if(s){let v=t.scale.forwardWithinDomain(s);if(v===null)return null;u=v,m=!0;let b=t.markerRowPlacements.get(this.id);b&&(f=b.centerY,d=b.labelBox,p=b.labelSide);let $=qh(o,t),N=Vh($),L=bw(N);L&&L.x>v&&(_=!0,g=[{x:L.x,y:L.y>0?L.y:f}]),x=vG(N,v),x!==void 0&&(_=!0)}else if(o.length>0){let v=qh(o,t),b=Vh(v);b.sort((G,Y)=>Y.x-G.x);let $=b[0]?.x??t.timeline.originX;u=$,m=!1;let N=eC(u,a,c,l,10,!0,t.timeline.box.x,t.chartRightX);f=a,d=N.box,p=N.side,t.markerRowPlacements.set(this.id,{rowIndex:0,centerY:f,labelBox:d,labelSide:p});let L=[];for(let G=1;G<b.length;G++){let Y=b[G];Y.x<$&&Y.y>0&&Y.wave===void 0&&L.push({x:Y.x,y:Y.y})}L.length>0&&(g=L)}if(u===null)return null;if(!d){let v=eC(u,f,c,l,10,!0,t.timeline.box.x,t.chartRightX);d=v.box,p=v.side}let y={x:u,y:f};t.entityLeftEdges.set(this.id,y.x),t.entityRightEdges.set(this.id,y.x),t.entityMidpoints.set(this.id,y);let w={id:this.id,title:l,center:y,radius:c,fixed:m,slackArrows:g,isOverrun:_,style:r,cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,labelBox:d,labelSide:p};return t.waves&&!_&&$P(t.waves,y.x)&&(w.onWaveBoundary=!0),x!==void 0&&s&&(w.overrunByWave=x,w.overrunDate=no(s)),s&&!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(s)&&(w.hiddenDate=no(s)),w}};function tC(e,t){let n=[];for(let[r,i]of e){let o=new Ew(r,i).place(t);o&&n.push(o)}return n}function Kh(e){let t=e.trim().replace(/^#/,"");if(t.length===3&&(t=t.split("").map(n=>n+n).join("")),!/^[0-9a-fA-F]{6}$/.test(t))throw new Error(`Unsupported hex colour: ${e}`);return[Number.parseInt(t.slice(0,2),16),Number.parseInt(t.slice(2,4),16),Number.parseInt(t.slice(4,6),16)]}function nC(e){let[t,n,r]=Kh(e).map(i=>{let o=i/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r}function Zh(e,t){let n=nC(e),r=nC(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}var wG=4.5;function oC(e,t,n,r,i){if(!e.frozen||!e.solve)throw new Error("buildWaves: the wave barrier has not settled");let o=t.timeline.waveStrip;if(!o)throw new Error("buildWaves: the timeline has no wave strip");let s=IP(e.plan,e.solve,e.pass,e.origin,e.floors,qt),a=s.every(y=>y.memberCount===0),c=t.timeline.box.x,l=c+t.timeline.box.width,u=o.y+o.height/2,f=[],d=0,p=s.map((y,w)=>{let v=e.plan.waves[w],b=v.title??y.id,$=y.memberCount===0,N=pu(y.start,t),L=DP(y.start,y.end,t),G=$?void 0:d++,Y=_G(y.id,t),M=EG(v.properties,G,t),S=Math.max(y.start,c),F=Math.min(y.end,l),X=Math.max(0,F-S),R,P=!1;if(!$){if(Y.length>0){let ye=Y.length*Rn;R=rC(b,y.id,w+1,X,ye),P=R!==void 0}R??(R=rC(b,y.id,w+1,X,0))}let C=(S+F)/2,j;if($&&(C=y.start,!a)){let ye=f.filter(ne=>Math.abs(ne-y.start)<qt).length;f.push(y.start),C=y.start+ye*zm,j={x:C,y:u}}let z=$?Aw(N):`${Aw(N)} \u2013 ${Aw(L)}`,q=[b,z];$?q.push(n.waveNoItems):y.heldBy!==void 0&&q.push(`${n.waveHeldBy} ${y.heldBy}`);let re,ie=s[w-1];if(!a&&ie!==void 0&&y.floorRef!==void 0&&y.start-ie.end>qt){let ye=Math.max(ie.end,c),ne=Math.min(y.start,l);ut(y.floorRef,tr)+2*_r<=ne-ye&&(re={text:y.floorRef,x:(ye+ne)/2})}return{id:y.id,title:b,index:w,...G!==void 0?{visibleOrdinal:G}:{},startX:y.start,endX:y.end,startDate:N,endDate:L,memberCount:y.memberCount,empty:$,...y.heldBy!==void 0?{heldBy:y.heldBy}:{},...y.floorRef!==void 0?{floorRef:y.floorRef}:{},columnBox:{x:y.start,y:t.chartTopY,width:y.end-y.start,height:t.swimlaneBottomY-t.chartTopY},strip:{box:{x:y.start,y:o.y,width:y.end-y.start,height:o.height},...R?{label:R.label}:{},labelKind:R?.kind??"none",labelX:C,tooltip:q.join(" \xB7 "),footnotesShown:P,...j?{marker:j}:{},...re?{gapLabel:re}:{}},style:M,footnoteIndicators:Y}}),m=a?[]:RG(p,e.origin,o.y,t),g=Rw(r),_=i.map(y=>Rw(y.nestedSwimlanes));for(let y of[...g,..._.flat()])y.waveTooltip=n.waveBackgroundItem;let x={waves:p,boundaries:m,crossings:iC(g,m),regionCrossings:_.map(y=>iC(y,m)),hasBackground:g.length+_.flat().length>0};return a&&(x.placeholder=dP(n,p.map(y=>y.title))),x}function rC(e,t,n,r,i){let o=a=>ut(a,tr)*1.05+i+2*_r<=r;if(o(e))return{kind:"title",label:e};if(t!==e&&o(t))return{kind:"id",label:t};for(let a=e.length-1;a>=3;a--){let c=e.slice(0,a).trimEnd();if(c.length<3)break;let l=`${c}\u2026`;if(o(l))return{kind:"ellipsis",label:l}}let s=`#${n}`;if(o(s))return{kind:"ordinal",label:s}}function _G(e,t){let n=[];for(let[r,i]of t.footnoteHosts.entries()){if(!i.includes(e))continue;let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i)}function EG(e,t,n){let r=n.styleCtx.theme,i=new Map,o=ue(e,"style"),s=o?n.styleCtx.styles.get(o):void 0;for(let d of s?.properties??[]){let p=d.key.endsWith(":")?d.key.slice(0,-1):d.key;i.set(p,d.value)}let a=d=>{let p=i.get(d);if(p===void 0)return;let m=ei(p,r);return m==="none"?void 0:m},c=a("bg"),l=t!==void 0&&t%2===1?r.wave.stripFillAlt:r.wave.stripFill,u=c?bG(l,c,Al)??l:l,f=i.get("border");return{...c?{tint:c}:{},stripFill:l,text:a("text")??AG(r.wave,u),boundary:a("fg")??r.wave.boundary,boundaryDash:f==="dashed"?"4 2":f==="dotted"?"1 2":null}}var Jh=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function bG(e,t,n){if(!Jh.test(e)||!Jh.test(t))return;let r=Kh(e),i=Kh(t);return`#${r.map((o,s)=>Math.round(o*(1-n)+i[s]*n).toString(16).padStart(2,"0")).join("")}`}function AG(e,t){let n=e.labelText;return!Jh.test(n)||!Jh.test(t)||Zh(n,t)>=wG?n:Zh(e.hatch,t)>=Zh(e.hatchOnDark,t)?e.hatch:e.hatchOnDark}function RG(e,t,n,r){let i=[];for(let a of e)a.empty||(i.push({x:a.startX,wave:a,opening:!0}),i.push({x:a.endX,wave:a,opening:!1}));i.sort((a,c)=>a.x-c.x);let o=[],s=0;for(;s<i.length;){let a=s;for(;a<i.length&&i[a].x-i[s].x<qt;)a++;let c=i.slice(s,a);s=a;let l=c[0].x;if(Math.abs(l-t)<qt)continue;let u=(c.find(f=>f.opening)??c[0]).wave;o.push({x:l,topY:n,bottomY:r.swimlaneBottomY,stroke:u.style.boundary,dash:u.style.boundaryDash})}return o}function Rw(e){let t=[],n=r=>{for(let i of r)i.kind==="item"?i.waveRole==="background"&&t.push(i):n(i.children)};for(let r of e)n(r.children),t.push(...Rw(r.nested));return t}function iC(e,t){let n=[];for(let r of e){let i=r.box.x,o=r.box.x+r.box.width;for(let s of t)i<s.x&&s.x<o&&n.push({x:s.x,topY:r.box.y,bottomY:r.box.y+r.box.height,stroke:s.stroke})}return n}var kG="\u2070\xB9\xB2\xB3\u2074\u2075\u2076\u2077\u2078\u2079";function IG(e){return String(e).replace(/[0-9]/g,t=>kG[Number(t)])}function sC(e,t,n,r){let{waves:i}=e,o=i.some(v=>!v.empty&&v.strip.labelKind!=="title"),s=i.some(v=>v.empty),a=i.some(v=>v.footnoteIndicators.length>0&&!v.strip.footnotesShown);if(!e.hasBackground&&!o&&!s&&!a)return;let c=tr,l=v=>ut(v,c),u=t.timeline.originX,f=Math.max(u,t.chartRightX-an),d=0,p=u,m=!1,g=0,_=v=>r+v*Rl+Xu,x=v=>{m&&p+Wu+v>f&&(d++,p=u,m=!1);let b=m?p+Wu:p;return p=b+v,m=!0,g=Math.max(g,p-u),b},y=[],w=(v,b)=>{let $=Bu+qm,N=x($+l(b)),L=_(d);y.push({kind:v,text:b,swatch:{x:N,y:L-Xu+(Rl-Uu)/2,width:Bu,height:Uu},runs:[{text:b,x:N+$,y:L}]})};if(e.hasBackground&&w("background",n.waveLegendBackground),e.boundaries.length>0&&w("boundary",n.waveLegendBoundary),o||s||a){let v=i.map(L=>{let G=`#${L.index+1} ${L.title}`;return L.footnoteIndicators.length>0&&!L.strip.footnotesShown&&(G+=` ${L.footnoteIndicators.map(IG).join(",")}`),L.empty&&(G+=` (${n.waveNoItems})`),G}),b=" \xB7 ",$=`${n.waveLegendPrefix} ${v[0]}`,N=[{text:$,x:x(l($)),y:_(d)}];for(let L of v.slice(1)){let G=N[N.length-1];p+l(b+L)<=f?(G.text+=b+L,p+=l(b+L),g=Math.max(g,p-u)):(d++,p=u,m=!1,N.push({text:L,x:x(l(L)),y:_(d)}))}y.push({kind:"waves",text:`${n.waveLegendPrefix} ${v.join(b)}`,runs:N})}return{box:{x:u,y:r,width:g,height:(d+1)*Rl},entries:y}}function Aw(e){return e.toISOString().slice(0,10)}var SG=4;function lC(e,t){t>e.chartRightX&&(e.chartRightX=t)}function cC(e,t,n){let r=HP(t,e.ticks,n,e.minorGrid);r&&(e.nonWorkingDisplay=t.showsNonWorking?"show":"hide",e.nonWorking=r)}var em=class{place(t,n,r,i,o){let s=r.theme??"light",a=aw[s],c=r.width??1280,l=fP(r.locale,PG(t)),{config:u,working:f}=R_(t,n),d=GP(t,n.config.scale),p=ts(n.content.sizes,u),m={theme:a,styles:n.config.styles,defaults:n.config.defaults,labels:n.content.labels},{startDate:g,endDate:_}=o.computeDateWindow(t,{cal:u,sizes:p,calendar:f},n,r.today,d,i),x=ht("roadmap",t.roadmapDecl?.properties??[],m),y=x.headerPosition==="beside",w=x.timelinePosition!=="bottom",v=x.timelinePosition==="bottom"||x.timelinePosition==="both",b=Ph(r.nonWorking)?r.nonWorking:x.nonWorking,$=b==="show"&&f.hasNonWorkingDays,N=t.roadmapDecl?.title??t.roadmapDecl?.name??"",L=ue(t.roadmapDecl?.properties??[],"author"),G=o.sizeBesideHeader(N,L),Y=y?{x:0,y:0,width:G.boxWidth,height:0}:{x:0,y:0,width:0,height:Ou},M=y?G.boxWidth:0,S=y?8:Ou+8,F=d.pixelsPerUnit/f.daysPerUnit(d.unit),X=Math.max(1,f.workingIndexOf(g,_)),R=$?Math.max(1,bn(g,_))*F:X*F,P=M+an,C=R,j=M+an+C+an,z=Math.min(c,j),q=r.today!==void 0&&r.today>=g&&r.today<=_,re=n.content.anchors.size+n.content.milestones.size>0,ie=q?li:0,ye=w?yl:0,ne=i?Bm:0,ae=new mu({domain:[g,_],range:[P,P+R],calendar:f,nonWorking:b}),A=Math.max(z,P+C+an),O=[];for(let[te,he]of n.content.anchors){let ot=Ye(ue(he.properties,"date"));if(!ot)continue;let $n=ae.forwardWithinDomain(ot);$n!==null&&O.push({id:te,centerX:$n,radius:6,title:he.title??te,fontSize:10,bold:!1,date:ot,isMilestone:!1})}for(let[te,he]of n.content.milestones){let ot=Ye(ue(he.properties,"date"));if(!ot)continue;let $n=ae.forwardWithinDomain(ot);$n!==null&&O.push({id:te,centerX:$n,radius:6,title:he.title??te,fontSize:10,bold:!0,date:ot,isMilestone:!0})}let U=uC(O,M,A,o.estimateTextWidth),H=re?Math.max(1,U.rowCount):0,Z=H*26,V=ie+ye+ne+Z,oe=V+8,le=y?G.cardHeight+SG:0,xe=Math.max(S,le-V),ve=xe+ie,pe=ve+ye,Me=pe+ne,Je=Me+Z,it=yw(ae,d,f,l),ct={box:{x:P,y:xe,width:R,height:0},ticks:it,pixelsPerDay:F,originX:P,startDate:g,endDate:_,labelStyle:ht("roadmap",[],m),pillRowHeight:ie,tickPanelY:ve,tickPanelHeight:ye,markerRow:{y:Me+13,height:Z,collisionY:Me-8},minorGrid:x.minorGrid,...i?{waveStrip:{y:pe,height:ne}}:{}};cC(ct,ae,d.unit);let En=new Map;for(let[te,he]of U.placements){let ot=Me+13+he.rowIndex*26;En.set(te,{rowIndex:he.rowIndex,centerY:ot,labelBox:{...he.labelBox,y:ot-4},labelSide:he.labelSide})}let J={cal:u,styleCtx:m,sizes:p,labels:n.content.labels,teams:n.content.teams,persons:n.content.persons,symbols:n.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:ct,scale:ae,calendar:f,bandScale:UP(),entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:En,chartTopY:xe+oe,chartBottomY:0,swimlaneBottomY:0,chartRightX:A,nextParallelId:0,nextGroupId:0,...i?{waves:SP(i,ae,P)}:{}};for(let te of O){let he=En.get(te.id);he&&(J.entityLeftEdges.set(te.id,te.centerX),J.entityRightEdges.set(te.id,te.centerX),J.entityMidpoints.set(te.id,{x:te.centerX,y:he.centerY}))}let Jo=vw(n.content.footnotes,J,0);J.footnoteIndex=Jo.index,J.footnoteHosts=Jo.hosts;let xr=new Map(J.entityLeftEdges),ii=new Map(J.entityRightEdges),oi=new Map(J.entityMidpoints),Tr=()=>{J.entityLeftEdges=new Map(xr),J.entityRightEdges=new Map(ii),J.entityMidpoints=new Map(oi),J.placedItems=new Map,J.itemFlowKey=new Map,J.currentFlowKey="",J.waves&&Oh(J.waves,J.entityLeftEdges,J.entityRightEdges)},Zi=[...n.content.swimlanes.values()],Jn=ht("swimlane",[],m),E=k_[Jn.spacing]??0,B=()=>{J.nextParallelId=0,J.nextGroupId=0;let te=[],he=J.chartTopY,ot=0,$n=J.timeline.originX;for(let BO of Zi){ot>0&&(he+=E);let{positioned:UO,usedHeight:WO,usedRightX:l_}=new cl({lane:BO,bandIndex:ot},o).place({x:J.timeline.originX,y:he},J);te.push(UO),he+=WO,l_>$n&&($n=l_),ot++}return{swimlanes:te,nextY:he,maxRightX:$n}},K=n.content.isolatedRegions,se,Ee,Le=J.waves;if(Le){let te,he=Ch(Le.ids.length,Le.origin,Le.floors,(ot,$n)=>(NP(Le,ot,$n),Tr(),te=B(),K.length>0&&ww(K,J,te.nextY+8,o),Le.pass),qt);PP(Le,he),Ee={passes:he.passes,capped:he.capped},se=te}else se=B();let Re=se.swimlanes,ke=se.nextY,He=NG(n.content.milestones,J);He.length>0&&(Tr(),J.slackCorridors=He,se=B(),Re=se.swimlanes,ke=se.nextY),lC(J,se.maxRightX+an);let Pe=[];if(K.length>0){let te=ww(K,J,ke+8,o);Pe=te.regions,ke=te.endY}J.chartBottomY=ke,J.swimlaneBottomY=ke,ct.box.height=J.chartBottomY-ct.box.y;let De=tC(n.content.milestones,J),mt=ll(Re);for(let te of Pe)mt=Math.max(mt,ll(te.nestedSwimlanes));for(let te of O)mt=Math.max(mt,te.centerX+te.radius);for(let te of De)mt=Math.max(mt,te.center.x+te.radius);let Vt=f.daysPerUnit(d.unit),Qn=J.scale.showsNonWorking?J.scale.indexAtX(mt):(mt-P)/F,Ft=Qn>0?jh(g,Qn,d.unit,Vt,f):0;if(Ft>X){let te=f.dateAtWorkingIndex(g,Ft),he=J.scale.showsNonWorking?bn(g,te)*F:Ft*F,ot=new mu({domain:[g,te],range:[P,P+he],calendar:f,nonWorking:b});J.scale=ot,ct.endDate=te,ct.box.width=he,ct.ticks=yw(ot,d,f,l),cC(ct,ot,d.unit),lC(J,P+he+an)}for(let te of Re)te.box.width=J.chartRightX;for(let te of Pe)_w(te,J.chartRightX);let Yt=O.map(te=>({id:te.id,centerX:te.centerX,radius:te.radius,title:te.title,fontSize:te.fontSize,bold:te.bold}));for(let te of De)te.fixed||Yt.push({id:te.id??"",centerX:te.center.x,radius:te.radius,title:te.title,fontSize:10,bold:!0});let Ji=uC(Yt,M,J.chartRightX,o.estimateTextWidth);J.markerRowPlacements.clear();for(let[te,he]of Ji.placements){let ot=Me+13+he.rowIndex*26;J.markerRowPlacements.set(te,{rowIndex:he.rowIndex,centerY:ot,labelBox:{...he.labelBox,y:ot-4},labelSide:he.labelSide})}for(let te of De){let he=J.markerRowPlacements.get(te.id??"");he&&(te.center={x:te.center.x,y:he.centerY},te.labelBox=he.labelBox,te.labelSide=he.labelSide)}for(let te of O){let he=J.markerRowPlacements.get(te.id);he&&J.entityMidpoints.set(te.id,{x:te.centerX,y:he.centerY})}for(let te of De)te.fixed||J.entityMidpoints.set(te.id??"",{x:te.center.x,y:te.center.y});let vr=re?Math.max(1,Ji.rowCount):0;if(vr>H){let te=(vr-H)*26;J.timeline.markerRow.height=vr*26,J.timeline.box.height+=te,J.chartTopY+=te,J.chartBottomY+=te,J.swimlaneBottomY+=te;for(let he of Re)Nh(he,te);for(let he of Pe)xP(he,te);for(let he of De)if(he.cutTopY=J.chartTopY,he.cutBottomY=J.swimlaneBottomY,he.slackArrows)for(let ot of he.slackArrows)ot.y+=te}v&&(J.timeline.bottomTickPanelY=J.chartBottomY+8,J.timeline.bottomTickPanelHeight=yl,J.chartBottomY+=8+yl);let fl=il(l),_e=J.waves?oC(J.waves,J,fl,Re,Pe):void 0;_e&&(_e.regionCrossings.forEach((te,he)=>{te.length>0&&(Pe[he].waveCrossings=te)}),_e.placeholder!==void 0&&ct.waveStrip&&(ct.waveStrip.placeholder=_e.placeholder));let on=new Set(De.map(te=>te.center.x)),Ut=qP(n.content.anchors,J,on),Qi=o.collectItems(Zi),eo=o.buildDependencies(Qi,Re,Pe,J),wu=o.buildNowline(r.today,J,l),_u=_e?sC(_e,J,fl,J.chartBottomY+Fu):void 0;_u&&(J.chartBottomY+=Fu+_u.box.height);let Qo=vw(n.content.footnotes,J,J.chartBottomY);J.footnoteIndex=Qo.index,J.footnoteHosts=Qo.hosts,Y.height=Y.height||J.chartBottomY,y||(Y.width=J.chartRightX);let $O=y?{x:6,y:Je-G.cardHeight,width:G.cardWidth,height:G.cardHeight}:{x:0,y:0,width:J.chartRightX,height:Ou},DO=Qo.area.entries.length>0?Qo.area.box.y+Qo.area.box.height:J.chartBottomY,mm={x:J.chartRightX-an-$m,y:DO+an,width:$m,height:C_},MO=mm.y+mm.height+an,FO={box:Y,position:x.headerPosition,title:N,author:L,titleLines:G.titleLines,authorLines:G.authorLines,cardBox:$O,logo:void 0,style:x,attributionBox:mm};return{width:J.chartRightX,height:MO,theme:s,palette:a,backgroundColor:a.surface.page,header:FO,timeline:ct,nowline:wu,swimlanes:Re,anchors:Ut,milestones:De,edges:eo,footnotes:Qo.area,includes:Pe,chartBox:{x:M,y:J.chartTopY,width:J.chartRightX-M,height:J.chartBottomY-J.chartTopY},...Ee?{waveSolve:Ee}:{},..._e?{waves:_e.waves}:{},..._e&&_e.boundaries.length>0?{waveBoundaries:_e.boundaries}:{},..._e&&_e.crossings.length>0?{waveCrossings:_e.crossings}:{},..._u?{waveLegend:_u}:{}}}};function NG(e,t){let n=[];for(let[r,i]of e){let o=ue(i.properties,"date"),s=Ve(i.properties,"after"),a=Ye(o),c=qh(s,t),l=Vh(c);if(a){let f=t.scale.forwardWithinDomain(a);if(f===null)continue;let d=bw(l);d&&d.x>f&&d.y>0&&n.push({xStart:Math.min(d.x,f),xEnd:Math.max(d.x,f),y:d.y,slackPredId:d.ref,milestoneId:r});continue}if(l.length===0)continue;l.sort((f,d)=>d.x-f.x);let u=l[0].x;for(let f=1;f<l.length;f++){let d=l[f];d.x<u&&d.y>0&&d.wave===void 0&&n.push({xStart:d.x,xEnd:u,y:d.y,slackPredId:d.ref,milestoneId:r})}}return n}function uC(e,t,n,r){let i=[...e].sort((a,c)=>a.centerX-c.centerX),o=new Map,s=[];for(let a of i){let c=r(a.title,a.fontSize)*(a.bold?1.05:1),l=a.centerX+a.radius+6,u=a.centerX-a.radius-6-c,f=l+c<=n,d=u>=t,p=a.centerX-a.radius,m=a.centerX+a.radius,g=N=>N==="right"?l:u,_=N=>N==="right"?f:d,x=(N,L)=>{let G=Math.min(p,N),Y=Math.max(m,N+c);return s[L].some(M=>M.left<Y&&M.right>G)},y=-1,w="right",v=l;e:for(let N=s.length-1;N>=0;N--)for(let L of["right","left"]){if(!_(L))continue;let G=g(L);if(!x(G,N)){y=N,w=L,v=G;break e}}if(y===-1){for(let[N,L]of o)o.set(N,{...L,rowIndex:L.rowIndex+1});s=[[],...s],y=0,w=f?"right":"left",v=g(w)}let b=Math.min(p,v),$=Math.max(m,v+c);s[y].push({left:b,right:$}),o.set(a.id,{rowIndex:y,labelBox:{x:v,y:0,width:c,height:12},labelSide:w})}return{placements:o,rowCount:s.length}}function PG(e){return e.directive?.properties.find(n=>CG(n.key)==="locale")?.value}function CG(e){return e.endsWith(":")?e.slice(0,-1):e}function OG(e){switch(e){case"done":case"completed":return"done";case"in-progress":case"active":return"in-progress";case"at-risk":case"blocked":case"planned":return e;case void 0:return"planned";default:return"neutral"}}function LG(e){if(!e)return 0;let t=/^(\d{1,3})%$/.exec(e);return t?Math.max(0,Math.min(100,parseInt(t[1],10)))/100:0}function $G(e,t){if(e)return/^\d+(?:\.\d+)?[dwmqy]$/.test(e)||/^\d+%$/.test(e)?e:t.sizes.get(e)?.effortLiteral??e}function DG(e,t){if(e)return t.teams.get(e)?.title??t.persons.get(e)?.title??e}function MG(e){if(!e)return{icon:"none"};let t=e.toLowerCase();return t.includes("linear.app")?{icon:"linear",href:e}:t.includes("github.com")?{icon:"github",href:e}:t.includes("atlassian.net")||t.includes("jira.")?{icon:"jira",href:e}:{icon:"generic",href:e}}function tm(e,t,n,r,i){let o=bP(e,t),s=e.name??e.title??"",a=o.padding==="none"?"xs":o.padding,c=I_[a],l=Math.max(20,Math.round(s.length*5.5+c*2));return i!==void 0&&(l=Math.min(l,i)),{text:s,style:o,box:{x:n,y:r,width:l,height:uo}}}function pC(e,t){let n=h_(e,t.sizes,t.cal),r=p_(ue(e,"remaining"),t.sizes,t.cal),i=ue(e,"status"),o=OG(i),s=LG(i);s===0&&o==="done"&&(s=1);let a=/^(\d{1,3})%$/.exec(ue(e,"remaining")??"");return s===0&&o==="in-progress"&&a&&(s=1-Math.max(0,Math.min(100,parseInt(a[1],10)))/100),s===0&&o==="in-progress"&&r>0&&n>0&&(s=Math.max(0,Math.min(1,1-r/n))),{status:o,progress:s}}function hC(e,t,n,r,i,o,s){let a=ue(e,"duration"),c=!!a&&/^\d+(?:\.\d+)?[dwmqy]$/.test(a),l=r?r.title??r.name:"",u=c?a:l||void 0,f=ue(e,"remaining"),d=$G(f,t),p=DG(n??ue(e,"owner"),t),m=()=>[u,p].filter(Boolean).join(" "),g;if(i==="in-progress"&&d){let v=m();g=v?`${v} \u2014 ${d} remaining`:`${d} remaining`}else if(i==="in-progress"&&o>0&&o<1){let v=Math.round((1-o)*100),b=m();g=b?`${b} \u2014 ${v}% remaining`:`${v}% remaining`}else(p||u)&&(g=m()||void 0);let _=ue(e,"capacity"),x=si(_),y=null,w=0;if(x!==null){let v=pl(x),b=hl(s,t.symbols);y={value:x,text:v,icon:b};let $=11;w=(g?ut(" ",$):0)+to(v,b,$)}return{metaText:g,ownerDisplay:p,capacity:y,capacityTrailingWidth:w}}function mC(e,t){let n=new Set;if(e){for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e)){let o=t.footnoteIndex.get(r);o!==void 0&&n.add(o)}}return[...n].sort((r,i)=>r-i)}function gC(e,t,n){return Cl({barWidth:e,footnoteLabels:t.map(String),hasBeforeGlyph:On(n)!==void 0})}function Cw(e,t,n,r){let i=e.properties,o=ht("item",i,n.styleCtx),s=ue(i,"size"),a=s?n.sizes.get(s)??null:null,c=ai(i,n.sizes,n.cal),l=Ve(i,"after"),u=Ve(i,"before"),f=wC(i,t.x,t.x,n),d;n.waves&&(f=qo(e,f,n),d=LP(e,f,n));let p=d===void 0?UG(i,f,n):void 0,m=n.scale.startX(f),g=Math.max(An,Vo(n,m,c)),_=m,x=m+g,y=ue(i,"link"),w=MG(y),v=w.icon!=="none",b=Math.max(An,g-2*sn),$=Ve(i,"labels"),N=[];for(let _e of $){let on=n.labels.get(_e);if(!on)continue;let Ut=tm(on,n.styleCtx,0,0);N.push({id:on,width:Ut.box.width})}let L=0;for(let _e=0;_e<N.length;_e+=1)_e>0&&(L+=kr),L+=N[_e].width;let G=Math.max(0,b-2*nr),Y=N.length>0&&L>G,M=!1,S,F;if(u.length>0){let _e,on;for(let Ut of u){let Qi=Ye(Ut),eo=Qi?n.scale.forwardWithinDomain(Qi)??void 0:n.entityLeftEdges.get(Ut);eo!==void 0&&(_e===void 0||eo<_e)&&(_e=eo,on=Ut)}_e!==void 0&&x>_e&&(M=!0,S={x:_e,y:t.y,width:x-_e,height:n.bandScale.bandwidth()},F=on)}let{status:X,progress:R}=pC(i,n),P={done:"#ecfdf5","in-progress":"#eff6ff","at-risk":"#fffbeb",blocked:"#fee2e2",planned:"#f8fafc",neutral:"#f8fafc"},C={done:"#052e16","in-progress":"#172554","at-risk":"#422006",blocked:"#7f1d1d",planned:"#1e293b",neutral:"#1e293b"},j={done:"#ebebeb","in-progress":"#e4e4e4","at-risk":"#eeeeee",blocked:"#dcdcdc",planned:"#f5f5f5",neutral:"#f5f5f5"},z={done:n.styleCtx.theme.status.done,"in-progress":n.styleCtx.theme.status.inProgress,"at-risk":n.styleCtx.theme.status.atRisk,blocked:n.styleCtx.theme.status.blocked,planned:n.styleCtx.theme.status.planned,neutral:n.styleCtx.theme.status.neutral},q=n.styleCtx.theme.name,re=q==="dark",ie=re?"#0f172a":"#ffffff",ye=q==="grayscale"?"#9e9e9e":"#94a3b8";o.bg===ie&&(o.bg=q==="grayscale"?j[X]:re?C[X]:P[X]),o.fg===ye&&(o.fg=z[X]);let{metaText:ne,ownerDisplay:ae,capacity:A,capacityTrailingWidth:O}=hC(i,n,r,a,X,R,o.capacityIcon),U=e.title??e.name??"",H=mC(e.name,n),Z=new Dh({id:e.name??"",title:U,logicalLeftX:_,logicalRightX:x,metaText:ne,metaTrailingWidth:O,hasLinkIcon:v,hasAfterGlyph:On(l)!==void 0,titleFirstLineRightReservePx:gC(b,H,u)}).place({x:_,y:t.y},{time:n.scale,bands:n.bandScale,style:o}),V=Z.box,oe=n.bandScale.bandwidth(),le=V.width<ss,xe=v&&V.width<zu,ve=V.width<qu,pe=Z.textSpills||xe,Me=pw(U,Z,xe),Je=Me.length,it=null;Y&&(it=rg(N,V.width));let ct=it?it.rows.length:N.length>0?1:0,En=ne!==void 0||A!==null,J=Nl(Je,En),Jo=Hu(Je,En),xr=xC(Y,pe,ct,oe,J),ii=Math.max(Jo,xr);ii>0&&(V.height=oe+ii);let oi=[],Tr=V.y+oe-er-uo-fi,Zi=V.y+(Y&&pe?Math.max(is,J):J)+fi,E=Y&&pe||!Y&&N.length>0?Math.max(Tr,Zi):Tr,B=Y?V.x+V.width+Ar:V.x+nr,K=B;if(it)for(let _e=0;_e<it.rows.length;_e+=1){let on=E+_e*ng,Ut=B;for(let eo of it.rows[_e]){let wu=tm(eo.id,n.styleCtx,Ut,on);oi.push(wu),Ut+=wu.box.width+kr}let Qi=Ut-kr;Qi>K&&(K=Qi)}else{let _e=B;for(let on of N){let Ut=tm(on.id,n.styleCtx,_e,E);oi.push(Ut),_e+=Ut.box.width+kr}K=N.length>0?_e-kr:B}let se=ae??r??ue(i,"owner"),Ee=e.description?.text,Le=H.length>0&&ve,ke=V.x+V.width+Ar,He=!1,Pe=null;xe&&(He&&(ke+=kn),Pe=ke,ke=Pe+Rr,He=!0);let De=0;if(pe){He&&(ke+=kn);let _e=Math.max(...Me.map(Ut=>ut(Ut,Il))),on=(ne?ut(ne,11):0)+O;De=Math.max(_e,on),ke+=De,He=!0}let mt=null;Le&&(He&&(ke+=kn),mt=ke,ke+=H.length*Rn,He=!0);let Vt=null;le&&(He&&(ke+=kn),Vt=ke+rr,ke=Vt+rr,He=!0);let Qn=Math.max(V.x+V.width,ke),Ft=e.name;Ft&&(n.entityLeftEdges.set(Ft,_),n.entityRightEdges.set(Ft,x)),CP(e,V.x+V.width+sn,n);let Yt=Ft??yC(e);n.itemFlowKey.set(Yt,n.currentFlowKey),t.x=x,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,n.bandScale.step()+ii);let Ji=pP({box:V,afterDate:On(l),beforeDate:On(u),hasLinkIcon:v,footnoteCount:H.length}),vr={kind:"item",id:Ft,title:U,...Me.length>=2||Me[0]!==U?{titleLines:Me}:{},box:V,status:X,progressFraction:R,footnoteIndicators:H,labelChips:oi,chipsOutside:Y,chipsRightX:K,linkIcon:w.icon,linkHref:w.href,hasOverflow:M,overflowBox:S,overflowAnchorId:F,owner:se,description:Ee,metaText:ne,textSpills:pe,dotSpills:le,iconSpills:xe,footnoteSpills:Le,dotSpillCx:Vt,iconSpillX:Pe,footnoteSpillStartX:mt,decorationsRightX:Qn,capacity:A,size:a,style:o,inlineDatePins:Ji.length>0?Ji:void 0},fl=OP(e,n);return fl!==void 0&&(vr.waveRole=fl),d!==void 0&&(vr.wavePinOverride=d),p!==void 0&&(vr.nonWorkingPin=p),n.placedItems.set(Yt,vr),vr}function FG(e,t,n){return new Mh(e,{sequenceOne:Ow,newCursor:Ih}).place(t,n)}function BG(e,t,n){return new Lh(e,{sequenceItem:Cw,sequenceOne:Ow,resolveChildStart:vC,newCursor:Ih,estimateTextWidth:ut,predictItemBarExtraHeight:TC}).place(t,n)}function Ow(e,t,n){if($t(e))return Cw(e,t,n);if(Tt(e))return FG(e,t,n);if(je(e))return BG(e,t,n);throw new Error(`Unknown swimlane child type: ${e.$type??"unknown"}`)}function yC(e){let t=e.$cstNode?.range.start;return`#item@${t?t.line+1:0}:${t?t.character+1:0}`}function xC(e,t,n,r,i){if(n===0)return 0;let o=r-er-uo-fi,s;e&&t?s=Math.max(is,i)+fi:e?s=o:s=Math.max(o,i+fi);let c=s+(n-1)*ng+uo+fi+er;return Math.max(0,c-r)}function TC(e,t,n){let r=e.properties,i=n.bandScale.bandwidth(),o=ai(r,n.sizes,n.cal),s=Math.max(An,Vo(n,t,o)),a=Math.max(An,s-2*sn),c=ue(r,"size"),l=c?n.sizes.get(c)??null:null,{status:u,progress:f}=pC(r,n),{metaText:d,capacity:p,capacityTrailingWidth:m}=hC(r,n,void 0,l,u,f,ht("item",r,n.styleCtx).capacityIcon),g=d!==void 0||p!==null,_=!!ue(r,"link"),x=e.title??e.name??"",y=On(Ve(r,"after"))!==void 0,w=ui(_,y?{barWidth:a}:void 0),v=Math.max(0,a-w-nr),b=Math.max(0,a-w-gC(a,mC(e.name,n),Ve(r,"before"))),$=dw(x,v,fw(d,m),b),N=_&&a<zu,L=$.textSpills||N,G=pw(x,$,N).length,Y=Hu(G,g),M=Ve(r,"labels"),S=[];for(let z of M){let q=n.labels.get(z);if(!q)continue;let re=tm(q,n.styleCtx,0,0);S.push({id:q,width:re.box.width})}if(S.length===0)return Y;let F=0;for(let z=0;z<S.length;z+=1)z>0&&(F+=kr),F+=S[z].width;let X=Math.max(0,a-2*nr),R=F>X,P=R?rg(S,a):null,C=P?P.rows.length:1,j=xC(R,L,C,i,Nl(G,g));return Math.max(Y,j)}function vC(e,t,n,r){return qo(e,wC(e.properties,t,n,r),r)}function wC(e,t,n,r){let i=Ye(ue(e,"date"))??Ye(ue(e,"start"));if(i){let s=r.scale.forwardWithinDomain(i);if(s!==null)return s}let o=Ve(e,"after");if(o.length>0){let s=n;for(let a of o){let c=Ye(a);if(c){let u=r.scale.forwardWithinDomain(c);u!==null&&(s=Math.max(s,u));continue}let l=r.entityRightEdges.get(a);l!==void 0&&(s=Math.max(s,l))}return Math.max(n,s)}return t}function UG(e,t,n){if(!n.calendar.hasNonWorkingDays)return;let r=WG(e);if(!r||n.calendar.isWorkingDay(r.date))return;let i=n.scale.forwardWithinDomain(r.date);if(!(i===null||Math.abs(t-i)>=qt))return{key:r.key,pin:r.raw,start:no(pu(t,n))}}function WG(e){for(let t of["date","start"]){let n=ue(e,t),r=Ye(n);if(n!==void 0&&r)return{key:t,raw:n,date:r}}for(let t of Ve(e,"after")){let n=Ye(t);if(n)return{key:"after",raw:t,date:n}}}var kw=6;function XG(e,t){let n=Nm-32,r=kl(e,n,16),i=kl(t??"",n,11),o=0;for(let d of r)o=Math.max(o,ut(d,16));for(let d of i)o=Math.max(o,ut(d,11));let s=o+32,a=Math.max(N_-kw,Math.min(Nm-kw,s)),c=r.length>0?(r.length-1)*20:0,l=i.length>0?18+(i.length-1)*14:0,u=26+c+l+14,f=a+kw;return{titleLines:r,authorLines:i,cardWidth:a,cardHeight:u,boxWidth:f}}function GG(e,t,n,r,i,o){let a=e.roadmapDecl?.properties??[],c=ue(a,"start"),l=Ye(c)??jG(r),u=ue(a,"length"),f=0;if(u){let x=HG(u,t.cal);x>0&&(f=x)}let d=t.calendar??ku(t.cal),p=_C(n,{cal:t.cal,sizes:t.sizes,calendar:d},l,f>0?void 0:r,o),m=T_(i.unit,t.cal),g=jh(l,p>0?p:4*t.cal.daysPerWeek,i.unit,m,d),_=Math.max(f,g);return{startDate:l,endDate:d.dateAtWorkingIndex(l,Math.max(1,_))}}function jG(e){let t=e??new Date;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))}function HG(e,t){let n=/^(\d+(?:\.\d+)?)([dwmqy])$/.exec(e);if(!n)return 0;let r=parseFloat(n[1]);switch(n[2]){case"d":return r;case"w":return r*t.daysPerWeek;case"m":return r*t.daysPerMonth;case"q":return r*t.daysPerQuarter;case"y":return r*t.daysPerYear;default:return 0}}function _C(e,t,n,r,i){let o=m=>t.calendar.workingIndexOf(n,m),s=new Map,a=new Map,c=new Map,l=0;for(let m of e.content.anchors.values()){let g=Ye(ue(m.properties,"date"));if(g&&m.name){let _=o(g);a.set(m.name,_),l=Math.max(l,_)}}let u=()=>({itemEnd:s,anchorEnd:a,milestoneEnd:c,sizes:t.sizes}),f=(m,g,_)=>{let x=v=>{let b=Ye(v);return b?o(b):m.itemEnd.has(v)?m.itemEnd.get(v):m.anchorEnd.has(v)?m.anchorEnd.get(v):m.milestoneEnd.has(v)?m.milestoneEnd.get(v):0},y=(v,b)=>{let $=b;for(let N of v)N.$type!=="DescriptionDirective"&&($=w(N,$),_($));return $},w=(v,b)=>{if($t(v)){let $=ai(v.properties,m.sizes,t.cal),N=Ye(ue(v.properties,"date")),L=Ye(ue(v.properties,"start")),G=Ve(v.properties,"after"),Y=b;N?Y=o(N):L?Y=o(L):G.length>0&&(Y=Math.max(b,...G.map(x))),g&&(Y=g.apply(v,Y));let M=Y+$;return v.name&&m.itemEnd.set(v.name,M),g?.accumulate(v,M),M}if(Tt(v)){let $=Ve(v.properties,"after"),N=$.length>0?Math.max(b,...$.map(x)):b;g&&(N=g.apply(v,N));let L=N;for(let G of v.content){if(G.$type==="DescriptionDirective")continue;let Y=w(G,N);L=Math.max(L,Y)}return L}if(je(v)){let $=Ve(v.properties,"after"),N=$.length>0?Math.max(b,...$.map(x)):b;return g&&(N=g.apply(v,N)),y(v.content,N)}return b};return{walkLane:y,resolveAfterDay:x}},d=m=>{l=Math.max(l,m)};if(i){let m=i.waves.map(y=>y.name),g=0,_=y=>{g=Math.max(g,y)},x=Ch(m.length,0,kP(i,n,t.calendar),(y,w)=>{let v=m.map((N,L)=>[N,w[L]]);s=new Map(v),g=0;let b=new zo(i,y),{walkLane:$}=f(u(),b,_);for(let N of e.content.swimlanes.values())$(N.content,0);for(let N of e.content.isolatedRegions){let L=f({itemEnd:new Map(v),anchorEnd:new Map,milestoneEnd:new Map,sizes:ts(N.content.sizes,t.cal)},b,_);for(let G of N.content.swimlanes.values())L.walkLane(G.content,0)}return b});l=Math.max(l,g,...x.S,...x.E.slice(-1))}else{let{walkLane:m}=f(u(),void 0,d);for(let g of e.content.swimlanes.values())m(g.content,0)}let{resolveAfterDay:p}=f(u(),void 0,d);for(let m of e.content.milestones.values()){let g=Ye(ue(m.properties,"date"));if(g){let x=o(g);m.name&&c.set(m.name,x),l=Math.max(l,x);continue}let _=Ve(m.properties,"after");if(_.length>0){let x=Math.max(0,..._.map(p));m.name&&c.set(m.name,x),l=Math.max(l,x)}}if(!i)for(let m of e.content.isolatedRegions){let g=_C({config:m.config,content:m.content,diagnostics:[],processedFiles:new Set},t,n,void 0);l=Math.max(l,g)}if(r){let m=o(r);m>0&&(l=Math.max(l,m))}return l}function zG(e,t,n,r){let i=new Rh(cP(t,n)),o=[],s=[],a=r.bandScale.bandwidth();for(let[u,f]of e){let d=Ve(f.properties,"after"),p=r.placedItems.get(u);if(!p)continue;let m=mP(p,a);for(let g of d){let _=r.placedItems.get(g),x,y=_===void 0;if(_)x=gP(_,a);else{let w=r.entityMidpoints.get(g);if(!w)continue;x={x:w.x,y:m.y}}!y&&Math.abs(x.y-m.y)<.5&&m.x-x.x<20||(o.push({fromId:g,toId:u,from:x,to:m,isMarkerSource:y}),s.push({fromId:g,toId:u}))}}let c=uP(o,i),l=[];for(let u=0;u<c.length;u++){let f=c[u];l.push({fromId:s[u].fromId,toId:s[u].toId,waypoints:f.waypoints,kind:f.underBar?"underBar":"normal",style:ht("item",[],r.styleCtx)})}return l}function qG(e,t,n){if(!e)return null;let r=t.scale.forwardWithinDomain(e);if(r===null)return null;let i=t.timeline.box.y,o=t.timeline.tickPanelY,s=il(n).nowLabel,a=ut(s,vl),c=Math.max(km,Math.ceil(a+2*rs)),l=t.timeline.originX-an,u=c/2,f;r-u<l?f="flag-right":r+u>t.chartRightX?f="flag-left":f="center";let d=t.timeline.bottomTickPanelY,p=t.timeline.bottomTickPanelHeight??0,m=d!==void 0&&p>0?d+p:t.swimlaneBottomY;return{x:r,topY:o,bottomY:m,pillTopY:i,pillMode:f,label:s,pillWidth:c,style:ht("item",[],t.styleCtx)}}function VG(e){let t=new Map,n=r=>{if($t(r)){t.set(r.name??yC(r),r);return}if(Tt(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}if(je(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}};for(let r of e)for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return t}function Lw(e,t,n={}){let r=rw(t);return new em().place(e,t,n,r,{sequenceItem:Cw,sequenceOne:Ow,resolveChildStart:vC,newCursor:Ih,estimateTextWidth:ut,predictItemBarExtraHeight:TC,computeDateWindow:GG,sizeBesideHeader:XG,collectItems:VG,buildDependencies:zG,buildNowline:qG})}function rm(e){return e.toISOString().slice(0,10)}function $w(e){return e.id!==void 0?e.id:/[\r\n]/.test(e.title)?e.title.replace(/\s*[\r\n]+\s*/g," ").trim():e.title}function Dw(e,t){for(let n of e)n.kind==="item"?t(n):Dw(n.children,t)}function YG(e,t,n){let r=$w(e);e.textSpills&&n.push(Ln(t,"NL.I1000","info",{name:r},r)),e.chipsOutside&&n.push(Ln(t,"NL.I1001","info",{name:r},r)),(e.box.width<ss||e.dotSpills||e.iconSpills||e.footnoteSpills)&&n.push(Ln(t,"NL.I1002","info",{name:r},r)),e.hasOverflow&&n.push(Ln(t,"NL.I1003","info",{name:r,anchor:e.overflowAnchorId},r)),EC(e,t,n),bC(e,t,n)}function EC(e,t,n){let r=e.wavePinOverride;if(!r)return;let i=$w(e);n.push(Ln(t,"NL.W1001","warning",{name:i,pin:r.pin,key:r.key,wave:r.wave,start:r.start},i))}function bC(e,t,n){let r=e.nonWorkingPin;if(!r)return;let i=$w(e);n.push(Ln(t,"NL.I1008","info",{name:i,pin:r.pin,key:r.key,start:r.start},i))}function Ln(e,t,n,r,i){return{message:Vr(e,t,r),severity:n,code:t,entityId:i,lspSeverity:n==="warning"?2:3,data:{code:t,args:r}}}function AC(e,t,n){let r=e.id??e.title,i=[];Dw(e.children,a=>i.push(a));for(let a of i)YG(a,t,n);let o=new Set(i.map(a=>a.box.y));o.size>1&&n.push(Ln(t,"NL.I1004","info",{lane:r,rows:o.size},r)),(e.utilization?.segments.some(a=>a.classification==="red")??!1)&&n.push(Ln(t,"NL.I1005","info",{lane:r},r));for(let a of e.nested)AC(a,t,n)}function RC(e,t,n){Dw(e.children,r=>{EC(r,t,n),bC(r,t,n)});for(let r of e.nested)RC(r,t,n)}function KG(e,t,n){e.waveSolve?.capped&&n.push(Ln(t,"NL.W1002","warning",{passes:e.waveSolve.passes}));let r=e.waves??[],i=r.filter(o=>o.empty).map(o=>o.id);if(i.length>0){let o=i.length===r.length?{reason:"all",names:i}:i.length===1?{reason:"one",name:i[0]}:{reason:"many",names:i};n.push(Ln(t,"NL.I1006","info",o,o.reason==="one"?o.name:void 0))}for(let o of e.milestones){if(o.overrunByWave===void 0||o.overrunDate===void 0)continue;let s=r.find(c=>c.id===o.overrunByWave);if(!s)continue;let a=o.id??o.title;n.push(Ln(t,"NL.I1007","info",{name:a,date:o.overrunDate,wave:s.id,end:rm(s.endDate)},a))}}function Mw(e,t={}){let n=t.locale??"en-US",r=[];for(let i of e.swimlanes)AC(i,n,r);for(let i of e.includes)for(let o of i.nestedSwimlanes)RC(o,n,r);if(KG(e,n,r),t.today){let i=t.today,o=e.timeline.startDate,s=e.timeline.endDate;(i<o||i>s)&&r.push(Ln(n,"NL.W1000","warning",{date:rm(i),start:rm(o),end:rm(s)}))}return r}var Ko=class extends Error{constructor(t){super(t),this.name="TimezoneError"}};function Fw(e){if(!e||e.toLowerCase()==="local")return{kind:"local"};if(e.toUpperCase()==="UTC")return{kind:"utc"};if(e==="Z")return{kind:"offset",ms:0};let t=/^([+-])(\d{2})(?::?(\d{2}))?$/.exec(e);if(t){let n=t[1]==="+"?1:-1,r=parseInt(t[2],10),i=t[3]!==void 0?parseInt(t[3],10):0;if(r>23||i>59)throw new Ko(`nowline: invalid timezone offset "${e}". Hours must be 0\u201323 and minutes 0\u201359.`);return{kind:"offset",ms:n*(r*60+i)*6e4}}try{return{kind:"iana",name:Intl.DateTimeFormat(void 0,{timeZone:e}).resolvedOptions().timeZone}}catch{throw new Ko(`nowline: unrecognised timezone "${e}". Use "local", "UTC", an ISO 8601 offset (e.g. "+05:30", "-07:00", "Z"), or an IANA timezone name (e.g. "America/Los_Angeles", "Asia/Kolkata").`)}}function im(e,t){switch(t.kind){case"local":return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));case"utc":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));case"offset":{let n=new Date(e.getTime()+t.ms);return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))}case"iana":{let n=new Intl.DateTimeFormat("en-CA",{timeZone:t.name,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(e),r=0,i=0,o=0;for(let s of n)s.type==="year"?r=parseInt(s.value,10):s.type==="month"?i=parseInt(s.value,10)-1:s.type==="day"&&(o=parseInt(s.value,10));return new Date(Date.UTC(r,i,o))}}}var ZG=/^(\d{4})-(\d{2})-(\d{2})$/,JG=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?)(Z|([+-])(\d{2})(?::?(\d{2}))?)$/,QG=/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}:\d{2}(?:\.\d+)?$/;function Bw(e={}){let t=e.zone??{kind:"local"},n=e.clock??(()=>new Date),r=e.now;if(!(r==="-"||r===null)){if(r instanceof Date)return r;if(r!==void 0){let i=ZG.exec(r);if(i)return new Date(Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10)));let o=JG.exec(r);if(o){let a=new Date(r);if(!Number.isNaN(a.getTime())){if(o[2]==="Z")return im(a,{kind:"utc"});let l=o[3]==="+"?1:-1,u=parseInt(o[4],10),f=o[5]!==void 0?parseInt(o[5],10):0,d=l*(u*60+f)*6e4;return im(a,{kind:"offset",ms:d})}}let s=QG.exec(r);return s?new Date(Date.UTC(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10))):void 0}return im(n(),t)}}function ej(e){return e===2?"warning":e===3?"info":"error"}function kC(e,t){return{severity:ej(e.severity),code:sg(e),message:e.message,suggestion:Ku(e.message),file:t,line:(e.range?.start.line??0)+1,column:(e.range?.start.character??0)+1}}function IC(e,t){return{severity:"error",code:"parse-error",message:e.message,file:t,line:e.token?.startLine??1,column:e.token?.startColumn??1}}function SC(e,t){return{severity:"error",code:"lex-error",message:e.message,file:t,line:e.line??1,column:e.column??1}}function NC(e,t){let n=e.line!==void 0?e.line+1:1;if(!rl(e))return{severity:e.severity,code:"include",message:e.message,file:e.sourcePath,line:n,column:1};let r=t?nw(t,e):e.message,i=Ku(r);return{severity:e.severity,code:e.code??Zu(e.message),message:r,...i===void 0?{}:{suggestion:i},file:e.sourcePath,line:n,column:1}}function PC(e,t,n="warning"){return{severity:n,code:"render.warning",message:e,file:t,line:1,column:1}}function CC(e,t){return{severity:e.severity,code:e.code,message:e.message,file:t,line:1,column:1}}var OC="__nowline_browser_noop_include__";async function LC(e){throw new Error(`${OC}: include "${e}" was skipped \u2014 running in single-file mode.`)}function Uw(e){return e.includes(OC)}var Ki={person:{viewBox:"0 0 24 24",body:'<circle cx="12" cy="8" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 21a8 8 0 0 1 16 0" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"p"},people:{viewBox:"0 0 24 24",body:'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="9" cy="7" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M22 21v-2a4 4 0 0 0-3-3.87" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 3.13a4 4 0 0 1 0 7.75" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"P"},points:{viewBox:"0 0 24 24",body:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" fill="currentColor" stroke="currentColor" stroke-width="1" stroke-linejoin="round"/>',ascii:"*"},time:{viewBox:"0 0 24 24",body:'<line x1="10" x2="14" y1="2" y2="2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="12" x2="15" y1="14" y2="11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="12" cy="14" r="8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"t"}},tj={calendar:{viewBox:"0 0 24 24",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"/>',ascii:"d"}},$C={...Ki,...tj};var Lse={none:"",multiplier:"x",person:Ki.person.ascii,people:Ki.people.ascii,points:Ki.points.ascii,time:Ki.time.ascii};var om=class{constructor(t="nl"){I(this,"prefix");I(this,"counter",0);this.prefix=t}next(t){let n=`${this.prefix}-${this.counter++}`;return t?`${n}-${t}`:n}};var nj=new Set(["svg","g","defs","symbol","use","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","linearGradient","radialGradient","stop","clipPath","mask","pattern","filter","feGaussianBlur","feColorMatrix","feOffset","feMerge","feMergeNode","feFlood","feComposite","feBlend","feDropShadow","image"]),rj=new Set(["d","x","y","x1","y1","x2","y2","cx","cy","r","rx","ry","width","height","viewBox","preserveAspectRatio","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-dasharray","stroke-dashoffset","opacity","transform","points","id","class","clip-path","mask","filter","font-family","font-size","font-weight","font-style","text-anchor","dx","dy","rotate","letter-spacing","word-spacing","style","xmlns","href","xlink:href","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","maskUnits","maskContentUnits","stdDeviation","values","in","in2","mode","type","result","flood-color","flood-opacity","patternUnits","patternContentUnits","role","aria-label"]);function ij(e){let t=[],n=0,r=e.length;for(;n<r;){if(e[n]!=="<"){let u=n;for(;n<r&&e[n]!=="<";)n++;let f=e.slice(u,n);f.trim().length>0?t.push({kind:"text",text:f}):f.length>0&&t.push({kind:"text",text:f});continue}if(e.startsWith("<!--",n)){let u=e.indexOf("-->",n+4);if(u<0)break;t.push({kind:"comment",text:e.slice(n+4,u)}),n=u+3;continue}if(e.startsWith("<![CDATA[",n)){let u=e.indexOf("]]>",n+9);if(u<0)break;t.push({kind:"cdata",text:e.slice(n+9,u)}),n=u+3;continue}if(e.startsWith("<?",n)){let u=e.indexOf("?>",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+2;continue}if(e.startsWith("<!",n)){let u=e.indexOf(">",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+1;continue}if(e[n+1]==="/"){let u=e.indexOf(">",n+2);if(u<0)break;let f=e.slice(n+2,u).trim();t.push({kind:"close",name:f}),n=u+1;continue}let i=oj(e,n);if(i<0)break;let o=e.slice(n+1,i).trim(),s=o.endsWith("/"),a=s?o.slice(0,-1).trim():o,{name:c,attrs:l}=sj(a);t.push({kind:s?"self":"open",name:c,attrs:l}),n=i+1}return t}function oj(e,t){let n=t+1,r=null;for(;n<e.length;){let i=e[n];if(r)i===r&&(r=null);else if(i==='"'||i==="'")r=i;else if(i===">")return n;n++}return-1}function sj(e){let t=0;for(;t<e.length&&/\s/.test(e[t]);)t++;let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.slice(n,t),i={};for(;t<e.length;){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t>=e.length)break;let o=t;for(;t<e.length&&e[t]!=="="&&!/\s/.test(e[t]);)t++;let s=e.slice(o,t);if(t>=e.length||e[t]!=="="){s&&(i[s]="");continue}if(t++,t>=e.length)break;let a=e[t];if(a!=='"'&&a!=="'"){let l=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;i[s]=e.slice(l,t);continue}t++;let c=t;for(;t<e.length&&e[t]!==a;)t++;i[s]=e.slice(c,t),t<e.length&&t++}return{name:r,attrs:i}}function gu(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function aj(e,t){if(e.startsWith("#")){let n=t.get(e.slice(1));return n?`#${n}`:null}if(/^url\(#[^)]+\)$/.test(e)){let n=e.slice(5,-1),r=t.get(n);return r?`url(#${r})`:null}return null}function DC(e,t={}){let n=t.idPrefix??"nl-logo",r=t.onWarn??(()=>{}),i=ij(e),o=new Map,s=0;for(let l of i)if((l.kind==="open"||l.kind==="self")&&l.attrs&&"id"in l.attrs){let u=l.attrs.id;u&&!o.has(u)&&o.set(u,`${n}-${s++}`)}let a=[],c=[];for(let l of i)if(l.kind!=="comment"&&l.kind!=="decl"){if(l.kind==="cdata"){c[c.length-1]&&a.push(gu(l.text??""));continue}if(l.kind==="text"){if(c.length===0||c[c.length-1]){let u=(l.text??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");a.push(u)}continue}if(l.kind==="open"||l.kind==="self"){let u=l.name??"";if(u==="script"||u==="foreignObject"||u==="animate"||u==="animateTransform"||u==="animateMotion"||u==="set"){r(`sanitizer: dropping <${u}>`),l.kind==="open"&&c.push(!1);continue}if(!nj.has(u)){r(`sanitizer: dropping unknown element <${u}>`),l.kind==="open"&&c.push(!1);continue}let f=[`<${u}`],d=Object.keys(l.attrs??{}).sort();for(let p of d){let m=l.attrs[p];if(/^on/i.test(p)){r(`sanitizer: dropping event handler ${p}`);continue}if(!rj.has(p)){r(`sanitizer: dropping attribute ${p}`);continue}if(p==="href"||p==="xlink:href"){let g=aj(m,o);if(g===null){r(`sanitizer: dropping external href ${m}`);continue}f.push(` ${p}="${gu(g)}"`);continue}if(p==="style"){r("sanitizer: dropping inline style");continue}if(p==="id"){let g=o.get(m);g&&f.push(` id="${gu(g)}"`);continue}if(/\burl\(#/i.test(m)){let g=m.replace(/url\(#([^)]+)\)/gi,(_,x)=>{let y=o.get(x);return y?`url(#${y})`:"none"});f.push(` ${p}="${gu(g)}"`);continue}if(/data:|javascript:|vbscript:/i.test(m)){r(`sanitizer: dropping suspicious value at ${p}`);continue}f.push(` ${p}="${gu(m)}"`)}f.push(l.kind==="self"?"/>":">"),a.push(f.join("")),l.kind==="open"&&c.push(!0);continue}l.kind==="close"&&c.pop()&&a.push(`</${l.name}>`)}return a.join("")}var MC=/&/g,FC=/</g,BC=/>/g,lj=/"/g,cj=/'/g;function Mt(e){return e.replace(MC,"&").replace(FC,"<").replace(BC,">")}function ti(e){return e.replace(MC,"&").replace(FC,"<").replace(BC,">").replace(lj,""").replace(cj,"'")}function ul(e){let t=Object.keys(e).sort(),n=[];for(let r of t){let i=e[r];i==null||i===!1||(i===!0?n.push(r):n.push(`${r}="${ti(String(i))}"`))}return n.length?` ${n.join(" ")}`:""}function ee(e,t,n){return n===void 0||n===""?`<${e}${ul(t)}/>`:`<${e}${ul(t)}>${n}</${e}>`}function Ne(e,t){return`<text${ul(e)}>${Mt(t)}</text>`}function h(e){return Number.isFinite(e)?Number.isInteger(e)?e.toString():(Math.round(e*100)/100).toString():"0"}var uj={none:{dx:0,dy:0,stdDeviation:0,opacity:0},subtle:{dx:0,dy:1,stdDeviation:1.5,opacity:.2},soft:{dx:0,dy:3,stdDeviation:5,opacity:.3},hard:{dx:2,dy:2,stdDeviation:0,opacity:.45}};function fj(e,t){let n=`${e}-shadow-${t}`,r=uj[t],i=`<feGaussianBlur in="SourceAlpha" stdDeviation="${r.stdDeviation}"/><feOffset dx="${r.dx}" dy="${r.dy}" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="${r.opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>`;return ee("filter",{id:n,x:"-50%",y:"-50%",width:"200%",height:"200%"},i)}function UC(e,t){return t==="none"?null:`url(#${e}-shadow-${t})`}function WC(e){return["subtle","soft","hard"].map(t=>fj(e,t)).join("")}var dj={thin:100,light:300,normal:400,bold:700};function pj(e){return ns[e]??14}function Gw(e,t,n){return{"font-family":t[e.font],"font-size":n??pj(e.textSize),"font-weight":dj[e.weight]??400,"font-style":e.italic?"italic":"normal",fill:e.text}}function hj(e){if(e.border==="dashed")return"4 3";if(e.border==="dotted")return"1 3"}function qC(e){if(!e||e==="none"||e==="transparent")return 1;let t=e.startsWith("#")?e.slice(1):e;if(t.length===3&&(t=t.split("").map(s=>s+s).join("")),t.length!==6)return 1;let n=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(r)+.0722*o(i)}function mj(e,t){return qC(e)>=.24?t.statusDot.onLight:t.statusDot.onDark}function lm(e,t){return e.length*t*.58}function VC(e,t,n,r,i,o,s){let a=i*.58,c=t?lm(t,i):0,l=t?a:0,u=n+c+l,{text:f,icon:d}=e,p=lm(f,i),m={"font-family":o,"font-size":i,fill:s};if(!d)return Ne({x:h(u),y:h(r),...m},f);if(d.kind==="builtin"&&d.name==="multiplier")return Ne({x:h(u),y:h(r),...m},`${f}\xD7`);if(d.kind==="builtin"){let _=Ki[d.name],x=Ne({x:h(u),y:h(r),...m},f),y=i*.1,w=i,v=u+p+y,b=r-i*.85,$=`<svg x="${h(v)}" y="${h(b)}" width="${h(w)}" height="${h(w)}" viewBox="${_.viewBox}" style="color:${ti(s)}" aria-hidden="true">${_.body}</svg>`;return x+$}let g=h(i*.1);return`<text x="${h(u)}" y="${h(r)}" font-family="${ti(o)}" font-size="${i}" fill="${ti(s)}">${Mt(f)}<tspan dx="${g}">${Mt(d.text)}</tspan></text>`}var XC=.6,gj=.5;function yj(e){let{metaText:t,capacity:n,x:r,baselineY:i,fontSize:o,fontFamily:s,color:a}=e;if(!t&&!n)return"";let c={"font-family":s,"font-size":o,fill:a};if(!n)return Ne({x:h(r),y:h(i),...c},t);if(!t)return VC(n,void 0,r,i,o,s,a);let l=h(o*XC),u=`<text x="${h(r)}" y="${h(i)}" font-family="${ti(s)}" font-size="${o}" fill="${ti(a)}">`,{text:f,icon:d}=n;if(!d)return u+Mt(t)+`<tspan dx="${l}">${Mt(f)}</tspan></text>`;if(d.kind==="builtin"&&d.name==="multiplier")return u+Mt(t)+`<tspan dx="${l}">${Mt(f)}\xD7</tspan></text>`;if(d.kind==="literal"){let $=h(o*.1);return u+Mt(t)+`<tspan dx="${l}">${Mt(f)}</tspan><tspan dx="${$}">${Mt(d.text)}</tspan></text>`}let p=Ki[d.name],m=$=>$.length*o*gj,g=r+m(t)+o*XC,_=o*.1,x=o,y=g+m(f)+_,w=i-o*.85,v=u+Mt(t)+`<tspan dx="${l}">${Mt(f)}</tspan></text>`,b=`<svg x="${h(y)}" y="${h(w)}" width="${h(x)}" height="${h(x)}" viewBox="${p.viewBox}" style="color:${ti(a)}" aria-hidden="true">${p.body}</svg>`;return v+b}function xj(e,t){let n=$C.calendar,r=`<svg x="${h(e.glyphTopLeft.x)}" y="${h(e.glyphTopLeft.y)}" width="${h(e.glyphSize)}" height="${h(e.glyphSize)}" viewBox="${n.viewBox}" style="color:${ti(t)}" aria-hidden="true">${n.body}</svg>`,i=`<title>${Mt(e.isoDate)}</title>`;return ee("g",{"data-layer":"inline-date-pin","data-side":e.side,"data-date":e.isoDate,"data-spilled":e.spilled?"true":null},i+r)}function jw(e,t){return!e||e.length===0?"":e.map(n=>xj(n,t)).join("")}function Tj(e){return(e?.length??0)>0}function YC(e){return e?.some(t=>t.side==="after")??!1}function vj(e,t,n,r,i,o={}){let s=Math.min(gl[i.cornerRadius]??4,r/2);return ee("rect",{x:h(e),y:h(t),width:h(n),height:h(r),rx:h(s),ry:h(s),fill:i.bg==="none"?"transparent":i.bg,stroke:i.fg,"stroke-width":1,"stroke-dasharray":hj(i)??null,...o})}function wj(e,t,n,r){let i=e.box.x+e.cardBox.x,o=e.box.y+e.cardBox.y,s=e.cardBox.width,a=e.cardBox.height,c=e.style.bg==="none"?n.surface.headerBox:e.style.bg,l=n.header.cardBorder,u=ee("rect",{x:h(i),y:h(o),width:h(s),height:h(a),rx:6,ry:6,fill:c,stroke:l,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`}),f=[];e.titleLines.forEach((x,y)=>{f.push(Ne({x:h(i+16),y:h(o+26+y*20),"font-family":r[e.style.font],"font-size":16,"font-weight":600,fill:e.style.text},x))});let d=f.join(""),p=o+26+Math.max(0,e.titleLines.length-1)*20,m=n.header.author,g=[];e.authorLines.forEach((x,y)=>{g.push(Ne({x:h(i+16),y:h(p+18+y*14),"font-family":r[e.style.font],"font-size":11,fill:m},x))});let _=g.join("");return ee("g",{"data-layer":"header","data-id":`${t}-header`},u+d+_)}function _j(e,t,n){let r=n.timeline.gridLine,i=n.timeline.minorGridLine,o=e.bottomTickPanelHeight??0,s=e.bottomTickPanelY!==void 0&&o>0,a=e.tickPanelY,c=s?e.bottomTickPanelY+o:e.box.y+e.box.height,l=t,u=e.box.y+e.box.height,f=[];for(let d of e.ticks)if(d.major)f.push(ee("line",{x1:h(d.x),y1:h(a),x2:h(d.x),y2:h(c),stroke:r,"stroke-width":1}));else if(e.minorGrid){if(d.labelX===void 0)continue;f.push(ee("line",{x1:h(d.x),y1:h(l),x2:h(d.x),y2:h(u),stroke:i,"stroke-width":1}))}for(let d of e.nonWorking??[])d.seam&&f.push(ee("line",{x1:h(d.x),y1:h(l),x2:h(d.x),y2:h(u),stroke:n.timeline.nonWorkingSeam,"stroke-width":1,"stroke-dasharray":"1 3"}));return ee("g",{"data-layer":"grid"},f.join(""))}function KC(e,t,n,r){let i=e.box.y+e.box.height,o=[];for(let s of e.nonWorking??[]){if(!s.band)continue;let a={x:s.x,y:t,width:s.width,height:i-t},c=r?zw(a,r):a;!c||c.width<=0||c.height<=0||o.push(ee("rect",{x:h(c.x),y:h(c.y),width:h(c.width),height:h(c.height),fill:n.timeline.nonWorkingFill,"fill-opacity":Fm}))}return o.length===0?"":ee("g",{"data-layer":"non-working"},o.join(""))}function Ej(e,t,n){let r=t.timeline.panelFill,i=t.timeline.border,o=t.timeline.labelText,s=[],a=e.tickPanelY,c=e.tickPanelHeight,l=c>0,u=e.markerRow.height>0,f=e.waveStrip?e.waveStrip.y+e.waveStrip.height:a+c,d=e.markerRow.height,p=e.bottomTickPanelY,m=e.bottomTickPanelHeight??0,g=p!==void 0&&m>0;l&&s.push(ee("rect",{x:h(e.box.x),y:h(a),width:h(e.box.width),height:h(c),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),u&&s.push(ee("rect",{x:h(e.box.x),y:h(f),width:h(e.box.width),height:h(d),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),g&&s.push(ee("rect",{x:h(e.box.x),y:h(p),width:h(e.box.width),height:h(m),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1}));for(let _ of e.ticks)_.major&&(!_.label||_.labelX===void 0||(l&&s.push(Ne({x:h(_.labelX),y:h(a+Iu),"font-family":n.sans,"font-size":ro,fill:o,"text-anchor":"middle"},_.label)),g&&s.push(Ne({x:h(_.labelX),y:h(p+Iu),"font-family":n.sans,"font-size":ro,fill:o,"text-anchor":"middle"},_.label))));return ee("g",{"data-layer":"timeline"},s.join(""))}function bj(e,t,n){if(!e)return"";let r=t.nowline.stroke,i=t.nowline.labelText,o=ee("line",{x1:h(e.x),y1:h(e.topY),x2:h(e.x),y2:h(e.bottomY),stroke:r,"stroke-width":Cu}),s=Aj(e,r),a=Rj(e,i,n);return ee("g",{"data-layer":"nowline"},o+s+a)}function ZC(e){let t=Cu/2;return e.pillMode==="flag-right"?e.x-t:e.pillMode==="flag-left"?e.x+t:e.x}function Aj(e,t){let n=e.pillTopY,r=e.pillTopY+li,i=Im,o=e.pillWidth;if(e.pillMode==="center")return ee("rect",{x:h(e.x-o/2),y:h(n),width:h(o),height:h(li),rx:i,ry:i,fill:t});let s=ZC(e);if(e.pillMode==="flag-right"){let l=s+o,u=[`M ${h(s)} ${h(n)}`,`L ${h(l-i)} ${h(n)}`,`A ${i} ${i} 0 0 1 ${h(l)} ${h(n+i)}`,`L ${h(l)} ${h(r-i)}`,`A ${i} ${i} 0 0 1 ${h(l-i)} ${h(r)}`,`L ${h(s)} ${h(r)}`,"Z"].join(" ");return ee("path",{d:u,fill:t})}let a=s-o,c=[`M ${h(s)} ${h(n)}`,`L ${h(a+i)} ${h(n)}`,`A ${i} ${i} 0 0 0 ${h(a)} ${h(n+i)}`,`L ${h(a)} ${h(r-i)}`,`A ${i} ${i} 0 0 0 ${h(a+i)} ${h(r)}`,`L ${h(s)} ${h(r)}`,"Z"].join(" ");return ee("path",{d:c,fill:t})}function Rj(e,t,n){let r=e.pillTopY+Sm,i=ZC(e),o,s;return e.pillMode==="center"?(o=e.x,s="middle"):e.pillMode==="flag-right"?(o=i+rs,s="start"):(o=i-rs,s="end"),Ne({x:h(o),y:h(r),"font-family":n.sans,"font-size":vl,"font-weight":700,fill:t,"text-anchor":s},e.label)}function kj(e,t,n,r,i){let o=[];e.waveTooltip!==void 0&&o.push(`<title>${Mt(e.waveTooltip)}</title>`);let s=UC(n,e.style.shadow);o.push(vj(e.box.x,e.box.y,e.box.width,e.box.height,e.style,{filter:s??null})),e.waveRole==="background"&&o.push(Yj(e.box,e.style,n));let a=mj(e.style.bg,r),c={done:a.done,"in-progress":a.inProgress,"at-risk":a.atRisk,blocked:a.blocked,planned:a.planned,neutral:a.neutral},l=c[e.status]??c.neutral;if(e.progressFraction>0){let x=Math.max(0,Math.min(e.box.width,e.box.width*e.progressFraction));o.push(ee("rect",{x:h(e.box.x),y:h(e.box.y+e.box.height-er),width:h(x),height:er,fill:e.style.fg,opacity:.55}))}let u=e.dotSpills&&e.dotSpillCx!==null?e.dotSpillCx:e.box.x+e.box.width-ao;o.push(ee("circle",{cx:h(u),cy:h(e.box.y+Km),r:rr,fill:l})),o.push(jw(e.inlineDatePins,e.style.fg));let f;if(e.textSpills)f=e.box.x+e.box.width+Ar,e.iconSpills&&(f+=Rr+kn);else{let x=!!e.linkIcon&&e.linkIcon!=="none",w=e.inlineDatePins?.find(v=>v.side==="after"&&!v.spilled)?ui(x,{barWidth:e.box.width}):ui(!t.noLinks&&x&&!e.iconSpills);f=e.box.x+w}let d=e.style.text,p=r.entities.item.text,m=e.textSpills?p:d,g=e.textSpills?p:e.style.fg,_=e.titleLines??(e.title?[e.title]:[]);if(_.forEach((x,y)=>{x!==""&&o.push(Ne({x:h(f),y:h(e.box.y+Gu+y*Sl),"font-family":i[e.style.font],"font-size":Il,"font-weight":600,fill:m},x))}),(e.metaText||e.capacity)&&o.push(yj({metaText:e.metaText,capacity:e.capacity,x:f,baselineY:e.box.y+ju(_.length),fontSize:Vm,fontFamily:i[e.style.font],color:g})),e.footnoteIndicators.length>0){let x=e.box.y+Zm;if(e.footnoteSpills&&e.footnoteSpillStartX!==null){let y=e.footnoteSpillStartX;for(let w=0;w<e.footnoteIndicators.length;w++){let v=e.footnoteIndicators[w];o.push(Ne({x:h(y),y:h(x),"font-family":i.sans,"font-size":Pl,"font-weight":700,fill:p},String(v))),y+=Rn}}else{let y=e.box.x+e.box.width-os;for(let w=e.footnoteIndicators.length-1;w>=0;w--){let v=e.footnoteIndicators[w];o.push(Ne({x:h(y),y:h(x),"font-family":i.sans,"font-size":Pl,"font-weight":700,fill:e.style.text,"text-anchor":"end"},String(v))),y-=Rn}}}if(!t.noLinks&&e.linkIcon&&e.linkIcon!=="none"){let x={linear:"#5e6ad2",github:"#0f172a",jira:"#0052cc",generic:r.item.linkIconFg},y=x[e.linkIcon]??x.generic,w=Rr,v=e.iconSpills&&e.iconSpillX!==null?e.iconSpillX:e.box.x+lo,b=e.box.y+lo,$=ee("rect",{x:h(v),y:h(b),width:w,height:w,rx:2,ry:2,fill:y}),N=v,L=b,G=ee("path",{d:`M${h(N+4)} ${h(L+10)} L${h(N+10)} ${h(L+4)} M${h(N+6)} ${h(L+4)} H${h(N+10)} V${h(L+8)}`,stroke:"#ffffff",fill:"none","stroke-width":1.1,"stroke-linecap":"round","stroke-linejoin":"round"}),Y=$+G,M=e.linkHref?ee("a",{href:e.linkHref,target:"_blank",rel:"noopener"},Y):Y;o.push(M)}if(e.hasOverflow&&e.overflowBox){let x=r.item.overflowTailFill,y=r.item.overflowTailStroke,w=r.item.overflowCaption;o.push(ee("rect",{x:h(e.overflowBox.x),y:h(e.overflowBox.y),width:h(e.overflowBox.width),height:h(e.overflowBox.height),fill:x,stroke:y,"stroke-width":1})),e.overflowAnchorId&&e.overflowBox.width>60&&o.push(Ne({x:h(e.overflowBox.x+e.overflowBox.width/2),y:h(e.overflowBox.y+e.overflowBox.height/2+3),"font-family":i.sans,"font-size":9,"font-weight":700,fill:w,"text-anchor":"middle"},`past ${e.overflowAnchorId}`))}for(let x of e.labelChips){let y=Math.min(gl[x.style.cornerRadius]??8,x.box.height/2);o.push(ee("rect",{x:h(x.box.x),y:h(x.box.y),width:h(x.box.width),height:h(x.box.height),rx:h(y),ry:h(y),fill:x.style.bg==="none"?"transparent":x.style.bg,stroke:x.style.fg,"stroke-width":.5})),o.push(Ne({x:h(x.box.x+x.box.width/2),y:h(x.box.y+x.box.height/2+3),...Gw(x.style,i,ns.xs),"text-anchor":"middle"},x.text))}return ee("g",{"data-layer":"item","data-id":e.id??null},o.join(""))}function Ij(e,t,n,r,i){let o=[],s=oo(e.style.bg);if(s){if(o.push(ee("rect",{x:h(e.box.x),y:h(e.box.y),width:h(e.box.width),height:h(e.box.height),rx:6,ry:6,fill:e.style.bg,stroke:e.style.fg,"stroke-width":1,"fill-opacity":.18,filter:`url(#${n}-shadow-subtle)`})),e.title){let a=so(e.title),c=e.box.x,l=e.box.y,u=io,f=6,d=`M${h(c+f)} ${h(l)}H${h(c+a)}V${h(l+u-f)}A${f} ${f} 0 0 1 ${h(c+a-f)} ${h(l+u)}H${h(c)}V${h(l+f)}A${f} ${f} 0 0 1 ${h(c+f)} ${h(l)}Z`;o.push(ee("path",{d,fill:e.style.fg})),o.push(Ne({x:h(c+Tl),y:h(l+_m),"font-family":i[e.style.font],"font-size":Em,"font-weight":600,fill:"#ffffff"},e.title))}}else{let a=e.style.fg,c=Ll(s,!!e.title,Tj(e.inlineDatePins));if(e.style.bracket!=="none"&&!e.waveOnly){let u=e.box.y+e.box.height,f=e.style.bracket==="dashed"?"3 2":null,d=c>0?`M${h(e.box.x+4)} ${h(e.box.y-c)} L${h(e.box.x)} ${h(e.box.y-c)} L${h(e.box.x)} ${h(u)} L${h(e.box.x+4)} ${h(u)}`:`M${h(e.box.x)} ${h(e.box.y)} L${h(e.box.x)} ${h(u)} L${h(e.box.x+4)} ${h(u)}`;o.push(ee("path",{d,fill:"none",stroke:a,"stroke-width":1,"stroke-dasharray":f}))}e.title&&o.push(Ne({x:h(fo(e.box.x,ls,YC(e.inlineDatePins))),y:h(e.box.y-Vu),...Gw(e.style,i,Ol),"fill-opacity":.7},e.title))}o.push(jw(e.inlineDatePins,e.style.fg));for(let a of e.children)o.push(Hw(a,t,n,r,i));return ee("g",{"data-layer":"group","data-id":e.id??null},o.join(""))}function Sj(e,t,n,r,i){let o=[];if(e.style.bracket==="solid"||e.style.bracket==="dashed"){let c=e.box.y-12,l=e.box.y+e.box.height+12,u=e.box.x,f=e.box.x+e.box.width,d=r.parallel.bracketStroke;o.push(ee("path",{d:`M${h(u+4)} ${h(c)} H${h(u)} V${h(l)} H${h(u+4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"})),o.push(ee("path",{d:`M${h(f-4)} ${h(c)} H${h(f)} V${h(l)} H${h(f-4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"}))}e.title&&o.push(Ne({x:h(fo(e.box.x,cs,YC(e.inlineDatePins))),y:h(e.box.y-Vu),...Gw(e.style,i,Ol),"fill-opacity":.7},e.title)),o.push(jw(e.inlineDatePins,e.style.fg));for(let s of e.children)o.push(Hw(s,t,n,r,i));return ee("g",{"data-layer":"parallel","data-id":e.id??null},o.join(""))}function Hw(e,t,n,r,i){return e.kind==="item"?kj(e,t,n,r,i):e.kind==="group"?Ij(e,t,n,r,i):Sj(e,t,n,r,i)}var GC=2;function Nj(e,t){switch(e){case"green":return t.swimlane.utilizationOk;case"yellow":return t.swimlane.utilizationWarn;case"red":return t.swimlane.utilizationOver}}function Pj(e,t){if(!e.utilization||e.utilization.segments.length===0)return"";let n=e.box.y+e.box.height-GC,r=e.utilization.segments.map(i=>{let o=i.endX-i.startX;return o<=0?"":ee("rect",{x:h(i.startX),y:h(n),width:h(o),height:GC,fill:Nj(i.classification,t),"data-utilization":i.classification,"data-load":h(i.load)})});return ee("g",{"data-layer":"lane-utilization","data-id":e.id??null},r.join(""))}function Cj(e,t){let n=e.bandIndex%2===0?t.swimlane.rowTintEven:t.swimlane.rowTintOdd,r=t.swimlane.border;return ee("g",{"data-layer":"swimlane-bg","data-id":e.id??null},ee("rect",{x:h(e.box.x),y:h(e.box.y),width:h(e.box.width),height:h(e.box.height),fill:n,stroke:r,"stroke-width":1}))}function JC(e,t,n,r,i){let o=r.swimlane.tabFill,s=r.swimlane.tabStroke,a=r.swimlane.tabText,c=r.swimlane.ownerText,l=r.swimlane.footnoteIndicator,u=[];if(e.title){let d=e.capacity?to(e.capacity.text,e.capacity.icon,10):0,p=e.footnoteIndicators.length>0?e.footnoteIndicators.join(","):"",m=p?lm(p,10):0,g=$l(e.box.x,e.title,e.owner,d,m),_=Su,x=e.box.y+10,y=x+Nu;u.push(ee("rect",{x:h(g.tabX),y:h(x),width:h(g.tabW),height:h(_),rx:4,ry:4,fill:o,stroke:s,"stroke-width":1})),u.push(Ne({x:h(g.titleX),y:h(y),"font-family":i[e.style.font],"font-size":12,"font-weight":600,fill:a},e.title)),e.owner&&u.push(Ne({x:h(g.ownerX),y:h(y),"font-family":i[e.style.font],"font-size":10,fill:c},`owner: ${e.owner}`)),e.capacity&&u.push(VC(e.capacity,void 0,g.badgeX,y,10,i[e.style.font],c)),p&&u.push(Ne({x:h(g.footnoteRightX),y:h(x+14),"font-family":i.sans,"font-size":10,"font-weight":700,fill:l,"text-anchor":"end"},p))}for(let f of e.children)u.push(Hw(f,t,n,r,i));return u.push(Pj(e,r)),ee("g",{"data-layer":"swimlane","data-id":e.id??null},u.join(""))}function Oj(e,t,n){let r=e.radius,i=e.center.x,o=e.center.y,s=t.anchorDiamond.fill,a=t.anchorDiamond.stroke,c=ee("path",{d:`M${h(i)} ${h(o-r)} L${h(i+r)} ${h(o)} L${h(i)} ${h(o+r)} L${h(i-r)} ${h(o)} Z`,fill:s,stroke:a,"stroke-width":1.25}),l=t.anchorDiamond.label,u=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,f={x:h(u),y:h(o+4),"font-family":n.sans,"font-size":10,fill:l};e.labelSide==="left"&&(f["text-anchor"]="end");let d=e.title?Ne(f,e.title):"";return ee("g",{"data-layer":"anchor","data-id":e.id??null},QC(e.hiddenDate)+c+d)}function Lj(e,t){let n=t.anchorDiamond.cutLine;return ee("line",{x1:h(e.center.x),y1:h(e.center.y+e.radius+1),x2:h(e.center.x),y2:h(e.cutBottomY),stroke:n,"stroke-width":1,"stroke-dasharray":"1 3"})}function $j(e,t,n){let r=e.center.x,i=e.center.y,o=e.radius,s=t.milestoneDiamond.fill,a=ee("path",{d:`M${h(r)} ${h(i-o)} L${h(r+o)} ${h(i)} L${h(r)} ${h(i+o)} L${h(r-o)} ${h(i)} Z`,fill:s,stroke:s,"stroke-width":1}),c=t.milestoneDiamond.label,l=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,u={x:h(l),y:h(i+4),"font-family":n.sans,"font-size":10,"font-weight":600,fill:c};e.labelSide==="left"&&(u["text-anchor"]="end");let f=e.title?Ne(u,e.title):"";return ee("g",{"data-layer":"milestone","data-id":e.id??null},QC(e.hiddenDate)+a+f)}function QC(e){return e===void 0?"":`<title>${Mt(e)}</title>`}function Dj(e,t,n){let r=e.isOverrun?n.milestoneDiamond.cutLineOverrun:n.milestoneDiamond.cutLineNormal,i=[];if(e.onWaveBoundary||i.push(ee("line",{x1:h(e.center.x),y1:h(e.center.y+e.radius+1),x2:h(e.center.x),y2:h(e.cutBottomY),stroke:r,"stroke-width":2,"stroke-dasharray":Pu,"stroke-linecap":"round"})),e.slackArrows&&e.slackArrows.length>0){let o=n.milestoneDiamond.slack;for(let s of e.slackArrows)i.push(ee("path",{d:`M${h(s.x)} ${h(s.y)} H${h(e.center.x-6)}`,fill:"none",stroke:o,"stroke-width":1.1,"stroke-dasharray":"3 3","stroke-linecap":"round","marker-end":`url(#${t}-arrow-dark)`}))}return i.join("")}function jC(e,t,n){let r=e.kind==="overflow"?n.dependency.overflowStroke:n.dependency.edgeStroke,i=e.waypoints;if(i.length<2)return"";let o=e.kind==="underBar"?.8:1.1;return ee("path",{d:Mj(i,Dm),fill:"none",stroke:r,"stroke-width":o,"stroke-dasharray":e.kind==="overflow"?"4 2":null,"stroke-linejoin":"round","marker-end":`url(#${t}-arrow)`})}function Mj(e,t){if(e.length<2)return"";let n=[`M${h(e[0].x)} ${h(e[0].y)}`];for(let r=1;r<e.length;r++){let i=e[r-1],o=e[r];if(r===e.length-1){n.push(`L${h(o.x)} ${h(o.y)}`);continue}let s=e[r+1],a=Math.sign(o.x-i.x),c=Math.sign(o.y-i.y),l=Math.sign(s.x-o.x),u=Math.sign(s.y-o.y),f=Math.hypot(o.x-i.x,o.y-i.y),d=Math.hypot(s.x-o.x,s.y-o.y),p=Math.min(t,f/2,d/2);if(p<=0||a!==0&&l!==0||c!==0&&u!==0){n.push(`L${h(o.x)} ${h(o.y)}`);continue}let m={x:o.x-a*p,y:o.y-c*p},g={x:o.x+l*p,y:o.y+u*p};n.push(`L${h(m.x)} ${h(m.y)}`),n.push(`Q${h(o.x)} ${h(o.y)} ${h(g.x)} ${h(g.y)}`)}return n.join(" ")}function Fj(e,t,n,r){if(e.entries.length===0)return"";let i=n.footnotePanel.fill,o=n.footnotePanel.border,s=n.footnotePanel.header,a=n.footnotePanel.title,c=n.footnotePanel.description,l=n.footnotePanel.number,u=[];u.push(ee("rect",{x:h(e.box.x),y:h(e.box.y),width:h(e.box.width),height:h(e.box.height),rx:6,ry:6,fill:i,stroke:o,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`})),u.push(Ne({x:h(e.box.x+Dn),y:h(e.box.y+Pm),"font-family":r.sans,"font-size":12,"font-weight":700,fill:s},"Footnotes"));let f=e.box.y+wl+Dn,d=e.box.x+Dn,p=d+Dn;return e.entries.forEach((m,g)=>{let _=f+g*_l;u.push(Ne({x:h(d),y:h(_),"font-family":r.sans,"font-size":10,"font-weight":700,fill:l},String(m.number))),u.push(Ne({x:h(p),y:h(_),"font-family":r.sans,"font-size":11,"font-weight":600,fill:a},m.title)),m.description&&u.push(Ne({x:h(p+Math.max(120,m.title.length*6)),y:h(_),"font-family":r.sans,"font-size":11,fill:c},`\u2014 ${m.description}`))}),ee("g",{"data-layer":"footnotes"},u.join(""))}function Bj(e,t,n,r,i,o){let s=r.includeRegion.border,a=r.includeRegion.fill,c=r.includeRegion.tabFill,l=r.includeRegion.tabStroke,u=r.includeRegion.tabText,f=r.includeRegion.badgeFill,d=r.includeRegion.badgeStroke,p=r.includeRegion.badgeText,m=e.box.x+8,g=e.box.y,_=e.box.width-16,x=e.box.height,y=ee("rect",{x:h(m),y:h(g),width:h(_),height:h(x),rx:8,ry:8,fill:a,stroke:s,"stroke-width":1,"stroke-dasharray":Pu}),w=Su,v=Dl(e.box.x,e.label,e.sourcePath),b=g-w/2,$=ee("rect",{x:h(v.tabX),y:h(b),width:h(v.tabWidth),height:w,rx:4,ry:4,fill:c,stroke:l,"stroke-width":1}),N=Ne({x:h(v.tabLabelX),y:h(b+Nu),"font-family":i.sans,"font-size":11,"font-weight":600,fill:u},e.label),L=v.badgeX,G=v.badgeSize,Y=g-G/2,M=ee("rect",{x:h(L),y:h(Y),width:G,height:G,rx:4,ry:4,fill:f,stroke:d,"stroke-width":1}),S=ee("path",{d:`M${h(L+7)} ${h(Y+4)} H${h(L+14)} V${h(Y+11)} M${h(L+4)} ${h(Y+7)} H${h(L+11)} V${h(Y+14)} H${h(L+4)} Z`,stroke:p,"stroke-width":1.4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}),F=9,X=g+4,R=ee("rect",{x:h(v.sourceHaloX),y:h(X-F),width:h(v.sourceHaloWidth),height:F+6,fill:a}),P=Ne({x:h(v.sourceTextX),y:h(X),"font-family":i.mono,"font-size":F,fill:p},e.sourcePath),C={x:m,y:g,width:_,height:x},j=o?KC(o.timeline,o.chartBox.y,r,C):"",z=o?.waves?rO(o.waves,C)+iO(o.waveBoundaries,C):"",q=o?.waves?oO(e.waveCrossings):"",re=e.nestedSwimlanes.map(ie=>JC(ie,t,n,r,i)).join("");return ee("g",{"data-layer":"include"},y+j+z+re+q+$+N+M+S+R+P)}function Uj(e,t){let n=e.palette.attribution.mark,r=e.palette.attribution.link;if(e.swimlanes.length===0)return"";let i=e.header.attributionBox.x,o=e.header.attributionBox.y,s=ci,a=Ne({x:"0",y:s,"font-family":t.sans,"font-size":$u,"font-weight":400,fill:n},Lu)+Ne({x:bl,y:s,"font-family":t.sans,"font-size":ci,"font-weight":700,fill:n},"now")+ee("rect",{x:Om,y:12,width:Lm,height:ci,fill:r})+Ne({x:Du,y:s,"font-family":t.sans,"font-size":ci,"font-weight":400,fill:n},"ine"),c=ee("g",{transform:`translate(${h(i)} ${h(o)}) scale(${h(El)})`},a);return ee("a",{href:Cm,target:"_blank",rel:"noopener","aria-label":"Powered by nowline"},ee("g",{"data-layer":"attribution"},c))}async function Wj(e,t,n,r,i,o,s){if(!t)return"";let a;try{a=await t(e)}catch(u){let f=`logo: failed to load ${e}: ${u instanceof Error?u.message:String(u)}`;if(r.strict)throw u;return r.warn?.(f),""}let c=(a.mime??"").toLowerCase();if(c==="image/svg+xml"){let u=new TextDecoder().decode(a.bytes),f=DC(u,{idPrefix:`${n}-logo`,onWarn:r.warn});return ee("g",{transform:`translate(${h(i)} ${h(o)})`},f)}if(c==="image/png"||c==="image/jpeg"||c==="image/jpg"||c==="image/webp"){let u=Xj(a.bytes);return ee("image",{href:`data:${c};base64,${u}`,x:h(i),y:h(o),width:h(s),height:h(s),preserveAspectRatio:"xMidYMid meet"})}let l=`logo: unsupported mime ${c} for ${e}`;if(r.strict)throw new Error(l);return r.warn?.(l),""}function Xj(e){if(typeof btoa<"u"){let n="";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return btoa(n)}let t=globalThis;if(t.Buffer)return t.Buffer.from(e).toString("base64");throw new Error("renderer: no base64 encoder available")}var Gj=.24,sm=2,HC=3,jj=4,Hj=8,zj=10;function eO(e){return e.bg==="none"?"transparent":e.bg}function cm(e){return qC(e)>=Gj?"dark":"light"}function tO(e,t){return`url(#${e}-wave-hatch-${t})`}function qj(e,t,n){let r=Xm;return ee("pattern",{id:`${e}-wave-hatch-${t}`,width:r,height:r,patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)"},ee("line",{x1:h(r/2),y1:0,x2:h(r/2),y2:r,stroke:t==="dark"?n.wave.hatch:n.wave.hatchOnDark,"stroke-width":Gm,opacity:Wm}))}function Vj(e){if(!e.waves)return[];let t=new Set,n=i=>{for(let o of i)o.kind==="item"?o.waveRole==="background"&&t.add(cm(eO(o.style))):n(o.children)},r=i=>{for(let o of i)n(o.children),r(o.nested)};r(e.swimlanes);for(let i of e.includes)r(i.nestedSwimlanes);return e.waveLegend?.entries.some(i=>i.kind==="background")&&t.add(cm(sO(e.palette))),["dark","light"].filter(i=>t.has(i))}function Yj(e,t,n){let i=Math.min(gl[t.cornerRadius]??4,e.height/2);return ee("rect",{x:h(e.x+.5),y:h(e.y+.5),width:h(Math.max(0,e.width-2*.5)),height:h(Math.max(0,e.height-2*.5)),rx:h(i),ry:h(i),fill:tO(n,cm(eO(t)))})}function zw(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),i=Math.min(e.x+e.width,t.x+t.width),o=Math.min(e.y+e.height,t.y+t.height);if(!(i<=n||o<=r))return{x:n,y:r,width:i-n,height:o-r}}var Ww=4,am=.5;function nO(e,t){if(e.empty)return;let n=am;return zw({x:e.strip.box.x,y:e.strip.box.y+n,width:e.strip.box.width,height:e.strip.box.height-2*n},{x:t.box.x+n,y:e.strip.box.y,width:t.box.width-2*n,height:e.strip.box.height})}function Kj(e,t){let n=Math.min(Ww-am,e.width/2,e.height/2),r=1e-6;return{left:e.x<=t.box.x+am+r?n:0,right:e.x+e.width>=t.box.x+t.box.width-am-r?n:0}}function Zj(e,t){let{x:n,y:r,width:i,height:o}=e,s=(a,c,l)=>a>0?` A${h(a)} ${h(a)} 0 0 1 ${h(c)} ${h(l)}`:"";return`M${h(n+t.left)} ${h(r)} H${h(n+i-t.right)}`+s(t.right,n+i,r+t.right)+` V${h(r+o-t.right)}`+s(t.right,n+i-t.right,r+o)+` H${h(n+t.left)}`+s(t.left,n,r+o-t.left)+` V${h(r+t.left)}`+s(t.left,n+t.left,r)+" Z"}function Xw(e,t,n){let r=o=>n&&(n.left>0||n.right>0)?ee("path",{d:Zj(t,n),...o}):ee("rect",{x:h(t.x),y:h(t.y),width:h(t.width),height:h(t.height),...o}),i=r({fill:e.style.stripFill});return e.style.tint?i+r({fill:e.style.tint,"fill-opacity":Al}):i}function Jj(e,t){let n=e.timeline,r=n.waveStrip;if(!e.waves||!r)return"";let i=[ee("rect",{x:h(n.box.x),y:h(r.y),width:h(n.box.width),height:h(r.height),rx:Ww,ry:Ww,fill:t.timeline.panelFill,stroke:t.timeline.border,"stroke-width":1})];for(let o of e.waves){let s=nO(o,n);s&&i.push(ee("g",{"data-id":o.id},`<title>${Mt(o.strip.tooltip)}</title>${Xw(o,s,Kj(s,n))}`))}return ee("g",{"data-layer":"wave-strip"},i.join(""))}function rO(e,t){let n=[];for(let r of e){if(!r.style.tint||r.empty)continue;let i=t?zw(r.columnBox,t):r.columnBox;!i||i.width<=0||i.height<=0||n.push(ee("rect",{x:h(i.x),y:h(i.y),width:h(i.width),height:h(i.height),fill:r.style.tint,"fill-opacity":jm}))}return n.length===0?"":ee("g",{"data-layer":"wave-bg"},n.join(""))}function iO(e,t){let n=[];for(let r of e??[]){let i=r.topY,o=r.bottomY;t&&(r.x<=t.x||r.x>=t.x+t.width||(i=Math.max(i,t.y),o=Math.min(o,t.y+t.height),o<=i))||n.push(ee("line",{x1:h(r.x),y1:h(i),x2:h(r.x),y2:h(o),stroke:r.stroke,"stroke-width":Mu,"stroke-dasharray":r.dash}))}return n.length===0?"":ee("g",{"data-layer":"wave-boundary"},n.join(""))}function zC(e,t){let n=lm(e,tr);return t?n*1.05:n}function Qj(e,t,n){let r=e.timeline,i=r.waveStrip;if(!e.waves||!i)return"";let o=i.y+i.height/2+jj,s=i.y+HC,a=i.height-2*HC,c=[],l=(u,f)=>{let d=zC(f,!1)+2*sm;return ee("rect",{x:h(u-d/2),y:h(s),width:h(d),height:h(a),fill:t.timeline.panelFill})+Ne({x:h(u),y:h(o),"font-family":n.sans,"font-size":tr,"font-style":"italic",fill:t.wave.labelMuted,"text-anchor":"middle"},f)};i.placeholder!==void 0&&c.push(l(r.box.x+r.box.width/2,i.placeholder));for(let u of e.waves){if(u.strip.gapLabel){let{text:m,x:g}=u.strip.gapLabel;c.push(l(g,m))}if(u.strip.marker){let{x:m,y:g}=u.strip.marker,_=Hm/2;c.push(ee("path",{d:`M${h(m)} ${h(g-_)} L${h(m+_)} ${h(g)} L${h(m)} ${h(g+_)} L${h(m-_)} ${h(g)} Z`,fill:t.timeline.panelFill,stroke:t.wave.boundary,"stroke-width":1.5},`<title>${Mt(u.strip.tooltip)}</title>`))}let f=nO(u,r);if(!f)continue;let d=f.x+f.width,p=u.strip.footnotesShown?u.footnoteIndicators.length*Rn:0;if(p){let m=d-_r+sm,g=d-_r-p-sm;c.push(Xw(u,{x:g,y:s,width:m-g,height:a}))}if(u.strip.label!==void 0){let m=zC(u.strip.label,!0),g=p?Math.min(u.strip.labelX,d-_r-p-m/2):u.strip.labelX,_=m+2*sm;c.push(Xw(u,{x:g-_/2,y:s,width:_,height:a})),c.push(Ne({x:h(g),y:h(o),"font-family":n.sans,"font-size":tr,"font-weight":600,fill:u.style.text,"text-anchor":"middle"},u.strip.label))}if(u.strip.footnotesShown){let m=d-_r;for(let g=u.footnoteIndicators.length-1;g>=0;g--)c.push(Ne({x:h(m),y:h(i.y+zj),"font-family":n.sans,"font-size":Hj,"font-weight":700,fill:u.style.text,"text-anchor":"end"},String(u.footnoteIndicators[g]))),m-=Rn}}return c.length===0?"":ee("g",{"data-layer":"wave-labels"},c.join(""))}function oO(e){if(!e||e.length===0)return"";let t=e.map(n=>ee("line",{x1:h(n.x),y1:h(n.topY),x2:h(n.x),y2:h(n.bottomY),stroke:n.stroke,"stroke-width":1,"stroke-dasharray":Um}));return ee("g",{"data-layer":"wave-cross"},t.join(""))}function sO(e){let t=e.entities.item.bg;return t==="none"?"transparent":t}function e4(e,t,n,r){if(!e)return"";let i=[];for(let o of e.entries){let s=o.swatch;if(s&&o.kind==="background"){let a=sO(n),c={x:h(s.x),y:h(s.y),width:h(s.width),height:h(s.height)};i.push(ee("rect",{...c,rx:2,ry:2,fill:a,stroke:n.entities.item.fg,"stroke-width":1})),i.push(ee("rect",{x:h(s.x+.5),y:h(s.y+.5),width:h(s.width-1),height:h(s.height-1),rx:2,ry:2,fill:tO(t,cm(a))}))}else if(s&&o.kind==="boundary"){let a=s.x+s.width/2;i.push(ee("line",{x1:h(a),y1:h(s.y),x2:h(a),y2:h(s.y+s.height),stroke:n.wave.boundary,"stroke-width":Mu}))}for(let a of o.runs)i.push(Ne({x:h(a.x),y:h(a.y),"font-family":r.sans,"font-size":tr,fill:n.wave.labelText},a.text))}return ee("g",{"data-layer":"wave-legend"},i.join(""))}async function qw(e,t={}){let r=new om(t.idPrefix??"nl").next("root"),i=e.palette,o=t.fontFamilies??Mm,s=[],a=i.arrowhead.neutral,c=i.arrowhead.light,l=i.arrowhead.dark,u=(p,m)=>`<marker id="${p}" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="${m}"/></marker>`,f=`<defs>${WC(r)}`+u(`${r}-arrow`,a)+u(`${r}-arrow-light`,c)+u(`${r}-arrow-dark`,l)+Vj(e).map(p=>qj(r,p,i)).join("")+"</defs>";s.push(f),s.push(ee("rect",{x:0,y:0,width:h(e.width),height:h(e.height),fill:e.backgroundColor})),s.push(Ej(e.timeline,i,o)),s.push(Jj(e,i));for(let p of e.swimlanes)s.push(Cj(p,i));s.push(KC(e.timeline,e.chartBox.y,i)),e.waves&&s.push(rO(e.waves)),s.push(_j(e.timeline,e.chartBox.y,i)),s.push(iO(e.waveBoundaries)),s.push(Qj(e,i,o));for(let p of e.edges)p.kind==="underBar"&&s.push(jC(p,r,i));for(let p of e.swimlanes)s.push(JC(p,t,r,i,o));for(let p of e.includes)s.push(Bj(p,t,r,i,o,e));s.push(oO(e.waveCrossings));for(let p of e.edges)p.kind!=="underBar"&&s.push(jC(p,r,i));for(let p of e.anchors)s.push(Lj(p,i));for(let p of e.milestones)s.push(Dj(p,r,i));for(let p of e.anchors)s.push(Oj(p,i,o));for(let p of e.milestones)s.push($j(p,i,o));if(s.push(bj(e.nowline,i,o)),s.push(Fj(e.footnotes,r,i,o)),s.push(e4(e.waveLegend,r,i,o)),s.push(wj(e.header,r,i,o)),s.push(Uj(e,o)),e.header.logo&&t.assetResolver){let p=await Wj(e.header.logo.assetRef??"",t.assetResolver,r,t,e.header.logo.box.x,e.header.logo.box.y,Math.max(e.header.logo.box.width,e.header.logo.box.height));p&&s.push(p)}return`<svg${ul({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${h(e.width)} ${h(e.height)}`,width:h(e.width),height:h(e.height),"data-theme":e.theme,"data-generator":"nowline"})}>${s.join("")}</svg>`}var Vw="/browser-source.nowline",t4={error:3,warning:2,info:1},n4={error:3,warning:2,info:1};function aO(e,t){return t4[e]>=n4[t]}var um,lO=0;function cO(){return um||(um=tw()),um}function r4(){return yt.parse(`memory:///nowline-browser-${++lO}.nowline`)}async function fm(e,t={}){let n=t.filePath??Vw,r=cO(),o=r.shared.workspace.LangiumDocumentFactory.fromString(e,r4());await r.shared.workspace.DocumentBuilder.build([o],{validation:!0});let s=[];for(let a of og(o))a.origin==="lexer"?s.push(SC(a.error,n)):a.origin==="parser"?s.push(IC(a.error,n)):s.push(kC(a.diagnostic,n));return{ast:o.parseResult.value,diagnostics:s}}async function Yw(e,t={}){let n=t.filePath??Vw,r=await fm(e,{filePath:n});if(r.diagnostics.some(w=>w.severity==="error"))return{kind:"diagnostics",diagnostics:r.diagnostics};let i=cO(),o=t.readFile??LC,s=await Zv(r.ast,n,{services:i.Nowline,readFile:o}),a=s.diagnostics.some(w=>w.severity==="error"&&!rl(w)&&!Uw(w.message)),c=[...r.diagnostics];for(let w of s.diagnostics){if(w.severity==="error"&&Uw(w.message)){t.onSkippedInclude?.({sourcePath:w.sourcePath,message:w.message});continue}a&&rl(w)||c.push(NC(w))}if(c.some(w=>w.severity==="error"))return{kind:"diagnostics",diagnostics:c};let l;if(t.timezone)try{l=Fw(t.timezone)}catch(w){if(w instanceof Ko)return{kind:"diagnostics",diagnostics:[{severity:"error",code:"invalid-timezone",message:w.message,file:n,line:1,column:1}]};throw w}let u=Bw({now:t.today,zone:l}),f=Lw(r.ast,s,{theme:t.theme,today:u,locale:t.locale,width:t.width,nonWorking:t.nonWorking}),d=t.diagnosticLevel??"error",p=Mw(f,{today:u??void 0,locale:t.locale??"en-US"}).map(w=>CC(w,n)),m=t.showLinks!==!1,g=t.strict===!0,_=[],x=await qw(f,{idPrefix:t.idPrefix,assetResolver:t.assetResolver,noLinks:!m,strict:g,warn:w=>_.push(w),fontFamilies:t.fontFamilies}),y=[...p,..._.map(w=>PC(w,n,g?"error":"warning"))].filter(w=>aO(w.severity,d));return g&&y.length>0?{kind:"diagnostics",diagnostics:[...c,...y]}:{kind:"svg",svg:x,warnings:y}}function Kw(){um=void 0,lO=0}var uO="/embed.nowline",Zw=!1;async function fO(e){let{ast:t,diagnostics:n}=await fm(e,{filePath:uO});return{ast:t,errors:n.filter(r=>r.severity==="error").map(r=>r.message)}}async function dm(e,t={}){let n={filePath:uO,theme:t.theme,today:t.today,timezone:t.timezone,locale:t.locale,width:t.width,nonWorking:t.nonWorking,idPrefix:t.idPrefix,onSkippedInclude:()=>{Zw||(Zw=!0,console.warn("nowline: `include` directives are skipped in the browser embed (single-file mode). Render multi-file roadmaps with the CLI or the GitHub Action."))}},r=await Yw(e,n);if(r.kind==="svg")return r.svg;let i=r.diagnostics.filter(o=>o.severity==="error").map(o=>o.message);throw new yu(`Failed to render Nowline source: ${i.join("; ")}`,i)}var yu=class extends Error{constructor(n,r){super(n);I(this,"details",r);this.name="EmbedRenderError"}};function dO(){Zw=!1,Kw()}var Zn=Uint8Array,_n=Uint16Array,n_=Int32Array,r_=new Zn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i_=new Zn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),pO=new Zn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yO=function(e,t){for(var n=new _n(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new n_(n[30]),r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return{b:n,r:i}},xO=yO(r_,2),i4=xO.b,Qw=xO.r;i4[28]=258,Qw[258]=28;var TO=yO(i_,0),cae=TO.b,hO=TO.r,e_=new _n(32768);for(Be=0;Be<32768;++Be)ni=(Be&43690)>>1|(Be&21845)<<1,ni=(ni&52428)>>2|(ni&13107)<<2,ni=(ni&61680)>>4|(ni&3855)<<4,e_[Be]=((ni&65280)>>8|(ni&255)<<8)>>1;var ni,Be,vu=(function(e,t,n){for(var r=e.length,i=0,o=new _n(t);i<r;++i)e[i]&&++o[e[i]-1];var s=new _n(t);for(i=1;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;var a;if(n){a=new _n(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],f=s[e[i]-1]++<<u,d=f|(1<<u)-1;f<=d;++f)a[e_[f]>>c]=l}else for(a=new _n(r),i=0;i<r;++i)e[i]&&(a[i]=e_[s[e[i]-1]++]>>15-e[i]);return a}),Zo=new Zn(288);for(Be=0;Be<144;++Be)Zo[Be]=8;var Be;for(Be=144;Be<256;++Be)Zo[Be]=9;var Be;for(Be=256;Be<280;++Be)Zo[Be]=7;var Be;for(Be=280;Be<288;++Be)Zo[Be]=8;var Be,pm=new Zn(32);for(Be=0;Be<32;++Be)pm[Be]=5;var Be,o4=vu(Zo,9,0);var s4=vu(pm,5,0);var vO=function(e){return(e+7)/8|0},a4=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Zn(e.subarray(t,n))};var ri=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},xu=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},Jw=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return{t:_O,l:0};if(i==1){var s=new Zn(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(b,$){return b.f-$.f}),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,f=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=i-1;)a=n[n[l].f<n[f].f?l++:f++],c=n[l!=u&&n[l].f<n[f].f?l++:f++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};for(var d=o[0].s,r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new _n(d+1),m=t_(n[u-1],p,0);if(m>t){var r=0,g=0,_=m-t,x=1<<_;for(o.sort(function($,N){return p[N.s]-p[$.s]||$.f-N.f});r<i;++r){var y=o[r].s;if(p[y]>t)g+=x-(1<<m-p[y]),p[y]=t;else break}for(g>>=_;g>0;){var w=o[r].s;p[w]<t?g-=1<<t-p[w]++-1:++r}for(;r>=0&&g;--r){var v=o[r].s;p[v]==t&&(--p[v],++g)}m=t}return{t:new Zn(p),l:m}},t_=function(e,t,n){return e.s==-1?Math.max(t_(e.l,t,n+1),t_(e.r,t,n+1)):t[e.s]=n},mO=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new _n(++t),r=0,i=e[0],o=1,s=function(c){n[r++]=c},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return{c:n.subarray(0,r),n:t}},Tu=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},wO=function(e,t,n){var r=n.length,i=vO(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var o=0;o<r;++o)e[i+o+4]=n[o];return(i+4+r)*8},gO=function(e,t,n,r,i,o,s,a,c,l,u){ri(t,u++,n),++i[256];for(var f=Jw(i,15),d=f.t,p=f.l,m=Jw(o,15),g=m.t,_=m.l,x=mO(d),y=x.c,w=x.n,v=mO(g),b=v.c,$=v.n,N=new _n(19),L=0;L<y.length;++L)++N[y[L]&31];for(var L=0;L<b.length;++L)++N[b[L]&31];for(var G=Jw(N,7),Y=G.t,M=G.l,S=19;S>4&&!Y[pO[S-1]];--S);var F=l+5<<3,X=Tu(i,Zo)+Tu(o,pm)+s,R=Tu(i,d)+Tu(o,g)+s+14+3*S+Tu(N,Y)+2*N[16]+3*N[17]+7*N[18];if(c>=0&&F<=X&&F<=R)return wO(t,u,e.subarray(c,c+l));var P,C,j,z;if(ri(t,u,1+(R<X)),u+=2,R<X){P=vu(d,p,0),C=d,j=vu(g,_,0),z=g;var q=vu(Y,M,0);ri(t,u,w-257),ri(t,u+5,$-1),ri(t,u+10,S-4),u+=14;for(var L=0;L<S;++L)ri(t,u+3*L,Y[pO[L]]);u+=3*S;for(var re=[y,b],ie=0;ie<2;++ie)for(var ye=re[ie],L=0;L<ye.length;++L){var ne=ye[L]&31;ri(t,u,q[ne]),u+=Y[ne],ne>15&&(ri(t,u,ye[L]>>5&127),u+=ye[L]>>12)}}else P=o4,C=Zo,j=s4,z=pm;for(var L=0;L<a;++L){var ae=r[L];if(ae>255){var ne=ae>>18&31;xu(t,u,P[ne+257]),u+=C[ne+257],ne>7&&(ri(t,u,ae>>23&31),u+=r_[ne]);var A=ae&31;xu(t,u,j[A]),u+=z[A],A>3&&(xu(t,u,ae>>5&8191),u+=i_[A])}else xu(t,u,P[ae]),u+=C[ae]}return xu(t,u,P[256]),u+C[256]},l4=new n_([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_O=new Zn(0),c4=function(e,t,n,r,i,o){var s=o.z||e.length,a=new Zn(r+s+5*(1+Math.ceil(s/7e3))+i),c=a.subarray(r,a.length-i),l=o.l,u=(o.r||0)&7;if(t){u&&(c[0]=o.r>>3);for(var f=l4[t-1],d=f>>13,p=f&8191,m=(1<<n)-1,g=o.p||new _n(32768),_=o.h||new _n(m+1),x=Math.ceil(n/3),y=2*x,w=function(xe){return(e[xe]^e[xe+1]<<x^e[xe+2]<<y)&m},v=new n_(25e3),b=new _n(288),$=new _n(32),N=0,L=0,G=o.i||0,Y=0,M=o.w||0,S=0;G+2<s;++G){var F=w(G),X=G&32767,R=_[F];if(g[X]=R,_[F]=X,M<=G){var P=s-G;if((N>7e3||Y>24576)&&(P>423||!l)){u=gO(e,c,0,v,b,$,L,Y,S,G-S,u),Y=N=L=0,S=G;for(var C=0;C<286;++C)b[C]=0;for(var C=0;C<30;++C)$[C]=0}var j=2,z=0,q=p,re=X-R&32767;if(P>2&&F==w(G-re))for(var ie=Math.min(d,P)-1,ye=Math.min(32767,G),ne=Math.min(258,P);re<=ye&&--q&&X!=R;){if(e[G+j]==e[G+j-re]){for(var ae=0;ae<ne&&e[G+ae]==e[G+ae-re];++ae);if(ae>j){if(j=ae,z=re,ae>ie)break;for(var A=Math.min(re,ae-2),O=0,C=0;C<A;++C){var U=G-re+C&32767,H=g[U],Z=U-H&32767;Z>O&&(O=Z,R=U)}}}X=R,R=g[X],re+=X-R&32767}if(z){v[Y++]=268435456|Qw[j]<<18|hO[z];var V=Qw[j]&31,oe=hO[z]&31;L+=r_[V]+i_[oe],++b[257+V],++$[oe],M=G+j,++N}else v[Y++]=e[G],++b[e[G]]}}for(G=Math.max(G,M);G<s;++G)v[Y++]=e[G],++b[e[G]];u=gO(e,c,l,v,b,$,L,Y,S,G-S,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=_,o.p=g,o.i=G,o.w=M)}else{for(var G=o.w||0;G<s+l;G+=65535){var le=G+65535;le>=s&&(c[u/8|0]=l,le=s),u=wO(c,u+1,e.subarray(G,le))}o.i=s}return a4(a,0,r+vO(u)+i)};var EO=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=n.length|0,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},u4=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new Zn(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return c4(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)};var bO=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var f4=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=EO();i.p(t.dictionary),bO(e,2,i.d())}};function AO(e,t){t||(t={});var n=EO();n.p(e);var r=u4(e,t,t.dictionary?6:2,4);return f4(r,t),bO(r,r.length-4,n.d()),r}var d4=typeof TextDecoder<"u"&&new TextDecoder,p4=0;try{d4.decode(_O,{stream:!0}),p4=1}catch{}var IO="https://free.nowline.io/open";function RO(e){let t=new TextEncoder().encode(e),n=AO(t),r=32768,i="";for(let o=0;o<n.length;o+=r)i+=String.fromCharCode(...n.subarray(o,o+r));return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function o_({source:e,sourceUrl:t,share:n}){if(n===!1||n==="none")return null;if(typeof n=="object")return t!==void 0&&kO(t)?n.remoteUrl.replace("{url}",encodeURIComponent(t)):n.textUrl.replace("{text}",RO(e));let r=n===!0?IO:n,i=new URL(r);return t!==void 0&&kO(t)?i.hash=`url=${encodeURIComponent(t)}`:i.hash=`text=${RO(e)}`,i.toString()}function kO(e){try{return new URL(e).protocol==="https:"}catch{return!1}}var SO=0;async function NO(e){let t=e.document??globalThis.document;if(!t)return{rendered:0,failed:0};let n=t.querySelectorAll(e.selector),r=0,i=0,o=++SO,s=e.share??!0,a=[],c=0;for(let l of Array.from(n)){let u=h4(l);if(!u)continue;let f=m4(l),d=`nl-r${o}-${c++}`,p={theme:e.theme,locale:e.locale,width:e.width,nonWorking:e.nonWorking,today:e.today,timezone:e.timezone,idPrefix:d},m=u.parentElement,g=u.nextSibling,x=l.getAttribute("data-nowline-source-url")??void 0??e.sourceUrl;a.push(dm(f,p).then(y=>{if(g4(u,y),r++,m!==null){let w=o_({source:f,sourceUrl:x,share:s});if(w!==null){let v=t.createElement("a");v.className="nowline-share",v.href=w,v.target="_blank",v.rel="noopener noreferrer",v.textContent="Share on Nowline",m.insertBefore(v,g)}}},y=>{i++,console.error("nowline: render failed",y)}))}return await Promise.all(a),{rendered:r,failed:i}}function h4(e){let t=e.parentElement;return t&&t.tagName.toUpperCase()==="PRE"?t:e}function m4(e){return e.textContent??""}function g4(e,t){e.outerHTML=t}function PO(){SO=0}function hm(){if(typeof globalThis>"u")return"light";let e=globalThis.matchMedia;if(typeof e!="function")return"light";try{return e("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}function CO(e,t){return e&&e!=="auto"?lw(e)??t:t}var y4="0.0.0-dev.20261007205714.g1dd148a",x4="1dd148a",T4="pre code.language-nowline, code.language-nowline",OO={theme:"auto",startOnLoad:!0,selector:T4,systemTheme:hm(),share:!0},qe={...OO},s_=!1;function v4(e={}){qe={theme:e.theme??qe.theme,startOnLoad:e.startOnLoad??qe.startOnLoad,selector:e.selector??qe.selector,locale:e.locale??qe.locale,width:e.width??qe.width,nonWorking:e.nonWorking??qe.nonWorking,today:e.today!==void 0?e.today:qe.today,timezone:e.timezone??qe.timezone,share:e.share??qe.share,sourceUrl:e.sourceUrl??qe.sourceUrl,systemTheme:hm()}}function LO(){return{theme:CO(qe.theme,qe.systemTheme),locale:qe.locale,width:qe.width,nonWorking:qe.nonWorking,today:qe.today,timezone:qe.timezone}}async function w4(e,t={}){let n={...LO(),...t};return dm(e,n)}async function _4(e){return fO(e)}async function a_(e){let t={selector:e?.selector??qe.selector,theme:e?.theme??LO().theme,locale:e?.locale??qe.locale,width:e?.width??qe.width,nonWorking:e?.nonWorking??qe.nonWorking,today:e?.today!==void 0?e.today:qe.today,timezone:e?.timezone??qe.timezone,share:e?.share??qe.share,sourceUrl:e?.sourceUrl??qe.sourceUrl,document:e?.document};return NO(t)}var E4=a_;if(typeof document<"u"&&!s_){s_=!0;let e=()=>{qe.startOnLoad&&a_()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):queueMicrotask(e)}function b4(){qe={...OO,systemTheme:hm()},s_=!1,dO(),PO()}return bu(A4);})();
|
|
2772
2772
|
//# sourceMappingURL=nowline.min.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nowline/embed",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.20261007205714.g1dd148a",
|
|
4
4
|
"description": "Browser embed bundle for Nowline. Drop a <script> tag and ```nowline``` blocks render in place.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"engines": {
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"cdn"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@nowline/browser": "0.0.0-dev.
|
|
43
|
-
"@nowline/core": "0.0.0-dev.
|
|
44
|
-
"@nowline/layout": "0.0.0-dev.
|
|
45
|
-
"@nowline/renderer": "0.0.0-dev.
|
|
46
|
-
"@nowline/share-link": "0.0.0-dev.
|
|
42
|
+
"@nowline/browser": "0.0.0-dev.20261007205714.g1dd148a",
|
|
43
|
+
"@nowline/core": "0.0.0-dev.20261007205714.g1dd148a",
|
|
44
|
+
"@nowline/layout": "0.0.0-dev.20261007205714.g1dd148a",
|
|
45
|
+
"@nowline/renderer": "0.0.0-dev.20261007205714.g1dd148a",
|
|
46
|
+
"@nowline/share-link": "0.0.0-dev.20261007205714.g1dd148a",
|
|
47
47
|
"langium": "~4.4.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|