termbeam 1.23.3 → 1.24.0
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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/public/assets/{_basePickBy-DazNkHMb.js → _basePickBy-DdmMqnCR.js} +1 -1
- package/public/assets/{_baseUniq-C-0Gob3W.js → _baseUniq-FSheTm_9.js} +1 -1
- package/public/assets/{arc-C73_SMw2.js → arc-DVBcqPhl.js} +1 -1
- package/public/assets/{architectureDiagram-Q4EWVU46-BdMF-aWn.js → architectureDiagram-Q4EWVU46-C9kGjnQo.js} +1 -1
- package/public/assets/{blockDiagram-DXYQGD6D-8UKvfcQG.js → blockDiagram-DXYQGD6D-CYqJqHUT.js} +1 -1
- package/public/assets/{c4Diagram-AHTNJAMY-DlSGPeHw.js → c4Diagram-AHTNJAMY-DawJ7HAb.js} +1 -1
- package/public/assets/channel-BIq-STgt.js +1 -0
- package/public/assets/{chunk-4BX2VUAB-fSZ3Gik1.js → chunk-4BX2VUAB-DumEf-uE.js} +1 -1
- package/public/assets/{chunk-4TB4RGXK-S1S7C0um.js → chunk-4TB4RGXK-dLtH5sji.js} +1 -1
- package/public/assets/{chunk-55IACEB6-DW7VK2iC.js → chunk-55IACEB6-BMWMbw5D.js} +1 -1
- package/public/assets/{chunk-EDXVE4YY-txE3i2M_.js → chunk-EDXVE4YY-DF6JVZ_7.js} +1 -1
- package/public/assets/{chunk-FMBD7UC4-BV7glcOB.js → chunk-FMBD7UC4-Dwy9NsB4.js} +1 -1
- package/public/assets/{chunk-OYMX7WX6-r2iRpVku.js → chunk-OYMX7WX6-CcNDMNgJ.js} +1 -1
- package/public/assets/{chunk-QZHKN3VN-BWS3ZcC1.js → chunk-QZHKN3VN-OA3mvyRi.js} +1 -1
- package/public/assets/{chunk-YZCP3GAM-CMyl_uae.js → chunk-YZCP3GAM-DfX5LUxN.js} +1 -1
- package/public/assets/classDiagram-6PBFFD2Q-CNeA_i0e.js +1 -0
- package/public/assets/classDiagram-v2-HSJHXN6E-CNeA_i0e.js +1 -0
- package/public/assets/clone-B_J3fPs2.js +1 -0
- package/public/assets/{cose-bilkent-S5V4N54A-Brdf5tI1.js → cose-bilkent-S5V4N54A-CYElDRm3.js} +1 -1
- package/public/assets/{dagre-KV5264BT-DDwuYNcQ.js → dagre-KV5264BT-BPUa4qeA.js} +1 -1
- package/public/assets/{diagram-5BDNPKRD-CPj9cRX5.js → diagram-5BDNPKRD-5C2f8LBD.js} +1 -1
- package/public/assets/{diagram-G4DWMVQ6-CefRrWbu.js → diagram-G4DWMVQ6-CvVBlOfn.js} +1 -1
- package/public/assets/{diagram-MMDJMWI5-D0XPadqe.js → diagram-MMDJMWI5-59J8hPvi.js} +1 -1
- package/public/assets/{diagram-TYMM5635-CD2jbK6X.js → diagram-TYMM5635-4gl2-c09.js} +1 -1
- package/public/assets/{erDiagram-SMLLAGMA-DytHaKjx.js → erDiagram-SMLLAGMA-CuqF1L_0.js} +1 -1
- package/public/assets/{flowDiagram-DWJPFMVM-C4g8FQW4.js → flowDiagram-DWJPFMVM-oPJgH5q1.js} +1 -1
- package/public/assets/{ganttDiagram-T4ZO3ILL-DbX7S0AQ.js → ganttDiagram-T4ZO3ILL-ePqCgG4h.js} +1 -1
- package/public/assets/{gitGraphDiagram-UUTBAWPF-BisIolZx.js → gitGraphDiagram-UUTBAWPF-DLld8QxY.js} +1 -1
- package/public/assets/{graph-dGIe4MSr.js → graph-qnDbEiz4.js} +1 -1
- package/public/assets/{index-DEew9lff.js → index-K6fCB-_E.js} +110 -110
- package/public/assets/{index-CZ1i0LJy.css → index-Yv6qAvmh.css} +1 -1
- package/public/assets/{infoDiagram-42DDH7IO-GBNAyw2U.js → infoDiagram-42DDH7IO-CDKYiPV9.js} +1 -1
- package/public/assets/{ishikawaDiagram-UXIWVN3A-D4MxAxgO.js → ishikawaDiagram-UXIWVN3A-C8HEgm3q.js} +1 -1
- package/public/assets/{journeyDiagram-VCZTEJTY-QzOzScr3.js → journeyDiagram-VCZTEJTY-CEG6oumr.js} +1 -1
- package/public/assets/{kanban-definition-6JOO6SKY-CZ_GkxNf.js → kanban-definition-6JOO6SKY-BsydOKqL.js} +1 -1
- package/public/assets/{layout-C-KK0FKP.js → layout-5M-TkCZa.js} +1 -1
- package/public/assets/{linear-6-8pYpbX.js → linear--trpUrpH.js} +1 -1
- package/public/assets/{mindmap-definition-QFDTVHPH-ChEg3YKs.js → mindmap-definition-QFDTVHPH-BVoyE8ro.js} +1 -1
- package/public/assets/{pieDiagram-DEJITSTG-oiJlPmub.js → pieDiagram-DEJITSTG-B4POfTKf.js} +1 -1
- package/public/assets/{quadrantDiagram-34T5L4WZ-BV52YtTZ.js → quadrantDiagram-34T5L4WZ-B9icGLjS.js} +1 -1
- package/public/assets/{requirementDiagram-MS252O5E-BPg-Suqi.js → requirementDiagram-MS252O5E-D5dY9VOu.js} +1 -1
- package/public/assets/{sankeyDiagram-XADWPNL6-C0IIgurO.js → sankeyDiagram-XADWPNL6-BH83O3Re.js} +1 -1
- package/public/assets/{sequenceDiagram-FGHM5R23-CwB0Pi_y.js → sequenceDiagram-FGHM5R23-DKr3OEWD.js} +1 -1
- package/public/assets/{stateDiagram-FHFEXIEX-ehT_0YRj.js → stateDiagram-FHFEXIEX-BSr0F5j7.js} +1 -1
- package/public/assets/stateDiagram-v2-QKLJ7IA2-CjzD61n3.js +1 -0
- package/public/assets/{timeline-definition-GMOUNBTQ-DhlsEVL8.js → timeline-definition-GMOUNBTQ-TbCB8xC6.js} +1 -1
- package/public/assets/{vennDiagram-DHZGUBPP-7ZU4in7V.js → vennDiagram-DHZGUBPP-D-E_RyQj.js} +1 -1
- package/public/assets/{wardley-RL74JXVD-4YdFfGjA.js → wardley-RL74JXVD-CTz1AIQ7.js} +1 -1
- package/public/assets/{wardleyDiagram-NUSXRM2D-zijkrMrR.js → wardleyDiagram-NUSXRM2D-BMN1lmwc.js} +1 -1
- package/public/assets/{xychartDiagram-5P7HB3ND-CGfq74uo.js → xychartDiagram-5P7HB3ND-FWnFa4As.js} +1 -1
- package/public/index.html +2 -2
- package/public/sw.js +1 -1
- package/src/server/preferences.js +2 -0
- package/src/server/routes.js +4 -3
- package/src/utils/version.js +20 -2
- package/public/assets/channel-CteFCEJC.js +0 -1
- package/public/assets/classDiagram-6PBFFD2Q-DOTPcFJf.js +0 -1
- package/public/assets/classDiagram-v2-HSJHXN6E-DOTPcFJf.js +0 -1
- package/public/assets/clone-BIzgFkUs.js +0 -1
- package/public/assets/stateDiagram-v2-QKLJ7IA2-xin8mQ-3.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var fp=Object.defineProperty;var dp=(t,e,r)=>e in t?fp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var gr=(t,e,r)=>dp(t,typeof e!="symbol"?e+"":e,r);import{bE as hp,bF as pp,aY as rd,bo as mp,b0 as gp,aZ as Be,at as yp,au as Ju,be as Tp,bh as nd,bi as id,bf as Rp,bt as Zu,aw as en,ax as se,a_ as vp,aU as Ep,bG as $p,bH as jt}from"./index-DEew9lff.js";import{k as Hn,j as Cu,g as ti,S as Ap,w as Cp,x as Sp,c as ad,v as Le,y as sd,l as kp,z as wp,A as Np,B as bp,C as _p,a as od,d as U,i as sr,r as Ze,f as pt,D as ze}from"./_baseUniq-C-0Gob3W.js";import{j as Su,m as M,d as Ip,f as Tt,g as Yn,h as j,i as ku,l as Kr,e as Pp}from"./_basePickBy-DazNkHMb.js";import{c as Ve}from"./clone-BIzgFkUs.js";var Lp=Object.prototype,Op=Lp.hasOwnProperty,ht=hp(function(t,e){if(pp(e)||rd(e)){mp(e,Hn(e),t);return}for(var r in e)Op.call(e,r)&&gp(t,r,e[r])});function ld(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a}function ha(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e<r;){var a=t[e];a&&(i[n++]=a)}return i}function xp(t,e,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;){var s=t[i];e(n,s,r(s),t)}return n}function Dp(t,e,r,n){return Cu(t,function(i,a,s){e(n,i,r(i),s)}),n}function Mp(t,e){return function(r,n){var i=Be(r)?xp:Dp,a=e?e():{};return i(r,t,ti(n),a)}}var Gp=200;function Fp(t,e,r,n){var i=-1,a=Cp,s=!0,o=t.length,l=[],u=e.length;if(!o)return l;e.length>=Gp&&(a=Sp,s=!1,e=new Ap(e));e:for(;++i<o;){var c=t[i],d=c;if(c=c!==0?c:0,s&&d===d){for(var g=u;g--;)if(e[g]===d)continue e;l.push(c)}else a(e,d,n)||l.push(c)}return l}var Vs=yp(function(t,e){return Ju(t)?Fp(t,ad(e,1,Ju,!0)):[]});function Ue(t,e,r){var n=t==null?0:t.length;return n?(e=e===void 0?1:Su(e),ld(t,e<0?0:e,n)):[]}function ea(t,e,r){var n=t==null?0:t.length;return n?(e=e===void 0?1:Su(e),e=n-e,ld(t,0,e<0?0:e)):[]}function zp(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Up(t,e){var r=!0;return Cu(t,function(n,i,a){return r=!!e(n,i,a),r}),r}function wt(t,e,r){var n=Be(t)?zp:Up;return n(t,ti(e))}function bt(t){return t&&t.length?t[0]:void 0}function dt(t,e){return ad(M(t,e))}var qp=Object.prototype,jp=qp.hasOwnProperty,Bp=Mp(function(t,e,r){jp.call(t,r)?t[r].push(e):Tp(t,r,[e])}),Wp="[object String]";function nt(t){return typeof t=="string"||!Be(t)&&nd(t)&&id(t)==Wp}var Vp=Math.max;function tt(t,e,r,n){t=rd(t)?t:Le(t),r=r?Su(r):0;var i=t.length;return r<0&&(r=Vp(i+r,0)),nt(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&sd(t,e,r)>-1}function Qu(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=0;return sd(t,e,i)}var Kp="[object RegExp]";function Hp(t){return nd(t)&&id(t)==Kp}var ec=Zu&&Zu.isRegExp,or=ec?Rp(ec):Hp,Yp="Expected a function";function Xp(t){if(typeof t!="function")throw new TypeError(Yp);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function _t(t,e){if(t==null)return{};var r=kp(wp(t),function(n){return[n]});return e=ti(e),Ip(t,r,function(n,i){return e(n,i[0])})}function Ks(t,e){var r=Be(t)?Np:bp;return r(t,Xp(ti(e)))}function Jp(t,e){var r;return Cu(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}function ud(t,e,r){var n=Be(t)?_p:Jp;return n(t,ti(e))}function wu(t){return t&&t.length?od(t):[]}function Zp(t,e){return t&&t.length?od(t,ti(e)):[]}function Ke(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function kt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function Tr(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Qp(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function vi(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class cd{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(i=r.properties[e.property])==null?void 0:i.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return Ke(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const i=n[r];if(i!==void 0)return i;{const a=this.types[e],s=a?a.superTypes.some(o=>this.isSubtype(o,r)):!1;return n[r]=s,s}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),i=[];for(const a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}function ta(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function fd(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function dd(t){return ta(t)&&typeof t.fullText=="string"}class qe{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new qe(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return ct})}join(e=","){const r=this.iterator();let n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=em(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){const n=this.iterator();let i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new qe(this.startFn,r=>{const{done:n,value:i}=this.nextFn(r);return n?ct:{done:!1,value:e(i)}})}filter(e){return new qe(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return ct})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const i=e.next();if(i.done)return n;const a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new qe(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:n,value:i}=this.nextFn(r.this);if(!n){const a=e(i);if(As(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return ct})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new qe(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:i,value:a}=r.nextFn(n.this);if(!i)if(As(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return ct})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new qe(()=>{const r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new qe(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?ct:this.nextFn(r.state)))}distinct(e){return new qe(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return ct})}exclude(e,r){const n=new Set;for(const i of e){const a=r?r(i):i;n.add(a)}return this.filter(i=>{const a=r?r(i):i;return!n.has(a)})}}function em(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function As(t){return!!t&&typeof t[Symbol.iterator]=="function"}const hd=new qe(()=>{},()=>ct),ct=Object.freeze({done:!0,value:void 0});function ge(...t){if(t.length===1){const e=t[0];if(e instanceof qe)return e;if(As(e))return new qe(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new qe(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:ct)}return t.length>1?new qe(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];As(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return ct}):hd}class Nu extends qe{constructor(e,r,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return ct})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Fo;(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(Fo||(Fo={}));function zo(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((i,a)=>{Ke(i)&&(i.$container=t,i.$containerProperty=r,i.$containerIndex=a,e.deep&&zo(i,e))}):Ke(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&zo(n,e)))}function Hs(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function nr(t){const r=ls(t).$document;if(!r)throw new Error("AST node has no document.");return r}function ls(t){for(;t.$container;)t=t.$container;return t}function tc(t){return kt(t)?t.ref?[t.ref]:[]:Tr(t)?t.items.map(e=>e.ref):[]}function bu(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new qe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const i=n.keys[n.keyIndex];if(!i.startsWith("$")){const a=t[i];if(Ke(a)){if(n.keyIndex++,rc(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;n.arrayIndex<a.length;){const s=n.arrayIndex++,o=a[s];if(Ke(o)&&rc(o,r))return{done:!1,value:o}}n.arrayIndex=0}}n.keyIndex++}return ct})}function pa(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Nu(t,r=>bu(r,e))}function ir(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Nu(t,r=>bu(r,e),{includeRoot:!0})}function rc(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?Am(r,e):!1}function Cs(t){return new qe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(kt(n)||Tr(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const i=e.arrayIndex++,a=n[i];if(kt(a)||Tr(n))return{done:!1,value:{reference:a,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return ct})}function tm(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const i of Object.values(r.properties))i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=pd(i.defaultValue))}function pd(t){return Array.isArray(t)?[...t.map(pd)]:t}const ut={$type:"AbstractElement",cardinality:"cardinality"};function rm(t){return ee.isInstance(t,ut.$type)}const us={$type:"AbstractParserRule"};function ma(t){return ee.isInstance(t,us.$type)}const Ua={$type:"AbstractRule"},At={$type:"AbstractType"},Fr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Ys(t){return ee.isInstance(t,Fr.$type)}const cs={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function md(t){return ee.isInstance(t,cs.$type)}const nc={$type:"ArrayLiteral",elements:"elements"},ic={$type:"ArrayType",elementType:"elementType"},zr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Hr(t){return ee.isInstance(t,zr.$type)}const Uo={$type:"BooleanLiteral",true:"true"};function nm(t){return ee.isInstance(t,Uo.$type)}const Ur={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function im(t){return ee.isInstance(t,Ur.$type)}const sn={$type:"Condition"},fs={$type:"Conjunction",left:"left",right:"right"};function am(t){return ee.isInstance(t,fs.$type)}const qr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Xs(t){return ee.isInstance(t,qr.$type)}const ds={$type:"Disjunction",left:"left",right:"right"};function sm(t){return ee.isInstance(t,ds.$type)}const qo={$type:"EndOfFile",cardinality:"cardinality"};function om(t){return ee.isInstance(t,qo.$type)}const Sr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},ac={$type:"GrammarImport",path:"path"},dn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function _u(t){return ee.isInstance(t,dn.$type)}const jo={$type:"InferredType",name:"name"};function gd(t){return ee.isInstance(t,jo.$type)}const Zt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function Ss(t){return ee.isInstance(t,Zt.$type)}const uo={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},sc={$type:"InfixRuleOperators",precedences:"precedences"},Bi={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function lm(t){return ee.isInstance(t,Bi.$type)}const Wi={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Yr(t){return ee.isInstance(t,Wi.$type)}const qa={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},hn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function um(t){return ee.isInstance(t,hn.$type)}const Bo={$type:"Negation",value:"value"};function cm(t){return ee.isInstance(t,Bo.$type)}const oc={$type:"NumberLiteral",value:"value"},ja={$type:"Parameter",name:"name"},Wo={$type:"ParameterReference",parameter:"parameter"};function fm(t){return ee.isInstance(t,Wo.$type)}const Lt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function ur(t){return ee.isInstance(t,Lt.$type)}const co={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},pn={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function dm(t){return ee.isInstance(t,pn.$type)}const Vo={$type:"ReturnType",name:"name"};function hm(t){return ee.isInstance(t,Vo.$type)}const mn={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Xr(t){return ee.isInstance(t,mn.$type)}const Vi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function pm(t){return ee.isInstance(t,Vi.$type)}const lc={$type:"StringLiteral",value:"value"},gn={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function mm(t){return ee.isInstance(t,gn.$type)}const yt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},yn={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function gm(t){return ee.isInstance(t,yn.$type)}const yr={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function cr(t){return ee.isInstance(t,yr.$type)}const Tn={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function ym(t){return ee.isInstance(t,Tn.$type)}const hs={$type:"Type",name:"name",type:"type"};function Tm(t){return ee.isInstance(t,hs.$type)}const Ei={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},$i={$type:"TypeDefinition"},uc={$type:"UnionType",types:"types"},ps={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function yd(t){return ee.isInstance(t,ps.$type)}const Rn={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Rm(t){return ee.isInstance(t,Rn.$type)}const Ai={$type:"ValueLiteral"},Ki={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function vm(t){return ee.isInstance(t,Ki.$type)}class Td extends cd{constructor(){super(...arguments),this.types={AbstractElement:{name:ut.$type,properties:{cardinality:{name:ut.cardinality}},superTypes:[]},AbstractParserRule:{name:us.$type,properties:{},superTypes:[Ua.$type,At.$type]},AbstractRule:{name:Ua.$type,properties:{},superTypes:[]},AbstractType:{name:At.$type,properties:{},superTypes:[]},Action:{name:Fr.$type,properties:{cardinality:{name:Fr.cardinality},feature:{name:Fr.feature},inferredType:{name:Fr.inferredType},operator:{name:Fr.operator},type:{name:Fr.type,referenceType:At.$type}},superTypes:[ut.$type]},Alternatives:{name:cs.$type,properties:{cardinality:{name:cs.cardinality},elements:{name:cs.elements,defaultValue:[]}},superTypes:[ut.$type]},ArrayLiteral:{name:nc.$type,properties:{elements:{name:nc.elements,defaultValue:[]}},superTypes:[Ai.$type]},ArrayType:{name:ic.$type,properties:{elementType:{name:ic.elementType}},superTypes:[$i.$type]},Assignment:{name:zr.$type,properties:{cardinality:{name:zr.cardinality},feature:{name:zr.feature},operator:{name:zr.operator},predicate:{name:zr.predicate},terminal:{name:zr.terminal}},superTypes:[ut.$type]},BooleanLiteral:{name:Uo.$type,properties:{true:{name:Uo.true,defaultValue:!1}},superTypes:[sn.$type,Ai.$type]},CharacterRange:{name:Ur.$type,properties:{cardinality:{name:Ur.cardinality},left:{name:Ur.left},lookahead:{name:Ur.lookahead},parenthesized:{name:Ur.parenthesized,defaultValue:!1},right:{name:Ur.right}},superTypes:[yt.$type]},Condition:{name:sn.$type,properties:{},superTypes:[]},Conjunction:{name:fs.$type,properties:{left:{name:fs.left},right:{name:fs.right}},superTypes:[sn.$type]},CrossReference:{name:qr.$type,properties:{cardinality:{name:qr.cardinality},deprecatedSyntax:{name:qr.deprecatedSyntax,defaultValue:!1},isMulti:{name:qr.isMulti,defaultValue:!1},terminal:{name:qr.terminal},type:{name:qr.type,referenceType:At.$type}},superTypes:[ut.$type]},Disjunction:{name:ds.$type,properties:{left:{name:ds.left},right:{name:ds.right}},superTypes:[sn.$type]},EndOfFile:{name:qo.$type,properties:{cardinality:{name:qo.cardinality}},superTypes:[ut.$type]},Grammar:{name:Sr.$type,properties:{imports:{name:Sr.imports,defaultValue:[]},interfaces:{name:Sr.interfaces,defaultValue:[]},isDeclared:{name:Sr.isDeclared,defaultValue:!1},name:{name:Sr.name},rules:{name:Sr.rules,defaultValue:[]},types:{name:Sr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:ac.$type,properties:{path:{name:ac.path}},superTypes:[]},Group:{name:dn.$type,properties:{cardinality:{name:dn.cardinality},elements:{name:dn.elements,defaultValue:[]},guardCondition:{name:dn.guardCondition},predicate:{name:dn.predicate}},superTypes:[ut.$type]},InferredType:{name:jo.$type,properties:{name:{name:jo.name}},superTypes:[At.$type]},InfixRule:{name:Zt.$type,properties:{call:{name:Zt.call},dataType:{name:Zt.dataType},inferredType:{name:Zt.inferredType},name:{name:Zt.name},operators:{name:Zt.operators},parameters:{name:Zt.parameters,defaultValue:[]},returnType:{name:Zt.returnType,referenceType:At.$type}},superTypes:[us.$type]},InfixRuleOperatorList:{name:uo.$type,properties:{associativity:{name:uo.associativity},operators:{name:uo.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:sc.$type,properties:{precedences:{name:sc.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Bi.$type,properties:{attributes:{name:Bi.attributes,defaultValue:[]},name:{name:Bi.name},superTypes:{name:Bi.superTypes,defaultValue:[],referenceType:At.$type}},superTypes:[At.$type]},Keyword:{name:Wi.$type,properties:{cardinality:{name:Wi.cardinality},predicate:{name:Wi.predicate},value:{name:Wi.value}},superTypes:[ut.$type]},NamedArgument:{name:qa.$type,properties:{calledByName:{name:qa.calledByName,defaultValue:!1},parameter:{name:qa.parameter,referenceType:ja.$type},value:{name:qa.value}},superTypes:[]},NegatedToken:{name:hn.$type,properties:{cardinality:{name:hn.cardinality},lookahead:{name:hn.lookahead},parenthesized:{name:hn.parenthesized,defaultValue:!1},terminal:{name:hn.terminal}},superTypes:[yt.$type]},Negation:{name:Bo.$type,properties:{value:{name:Bo.value}},superTypes:[sn.$type]},NumberLiteral:{name:oc.$type,properties:{value:{name:oc.value}},superTypes:[Ai.$type]},Parameter:{name:ja.$type,properties:{name:{name:ja.name}},superTypes:[]},ParameterReference:{name:Wo.$type,properties:{parameter:{name:Wo.parameter,referenceType:ja.$type}},superTypes:[sn.$type]},ParserRule:{name:Lt.$type,properties:{dataType:{name:Lt.dataType},definition:{name:Lt.definition},entry:{name:Lt.entry,defaultValue:!1},fragment:{name:Lt.fragment,defaultValue:!1},inferredType:{name:Lt.inferredType},name:{name:Lt.name},parameters:{name:Lt.parameters,defaultValue:[]},returnType:{name:Lt.returnType,referenceType:At.$type}},superTypes:[us.$type]},ReferenceType:{name:co.$type,properties:{isMulti:{name:co.isMulti,defaultValue:!1},referenceType:{name:co.referenceType}},superTypes:[$i.$type]},RegexToken:{name:pn.$type,properties:{cardinality:{name:pn.cardinality},lookahead:{name:pn.lookahead},parenthesized:{name:pn.parenthesized,defaultValue:!1},regex:{name:pn.regex}},superTypes:[yt.$type]},ReturnType:{name:Vo.$type,properties:{name:{name:Vo.name}},superTypes:[]},RuleCall:{name:mn.$type,properties:{arguments:{name:mn.arguments,defaultValue:[]},cardinality:{name:mn.cardinality},predicate:{name:mn.predicate},rule:{name:mn.rule,referenceType:Ua.$type}},superTypes:[ut.$type]},SimpleType:{name:Vi.$type,properties:{primitiveType:{name:Vi.primitiveType},stringType:{name:Vi.stringType},typeRef:{name:Vi.typeRef,referenceType:At.$type}},superTypes:[$i.$type]},StringLiteral:{name:lc.$type,properties:{value:{name:lc.value}},superTypes:[Ai.$type]},TerminalAlternatives:{name:gn.$type,properties:{cardinality:{name:gn.cardinality},elements:{name:gn.elements,defaultValue:[]},lookahead:{name:gn.lookahead},parenthesized:{name:gn.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalElement:{name:yt.$type,properties:{cardinality:{name:yt.cardinality},lookahead:{name:yt.lookahead},parenthesized:{name:yt.parenthesized,defaultValue:!1}},superTypes:[ut.$type]},TerminalGroup:{name:yn.$type,properties:{cardinality:{name:yn.cardinality},elements:{name:yn.elements,defaultValue:[]},lookahead:{name:yn.lookahead},parenthesized:{name:yn.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalRule:{name:yr.$type,properties:{definition:{name:yr.definition},fragment:{name:yr.fragment,defaultValue:!1},hidden:{name:yr.hidden,defaultValue:!1},name:{name:yr.name},type:{name:yr.type}},superTypes:[Ua.$type]},TerminalRuleCall:{name:Tn.$type,properties:{cardinality:{name:Tn.cardinality},lookahead:{name:Tn.lookahead},parenthesized:{name:Tn.parenthesized,defaultValue:!1},rule:{name:Tn.rule,referenceType:yr.$type}},superTypes:[yt.$type]},Type:{name:hs.$type,properties:{name:{name:hs.name},type:{name:hs.type}},superTypes:[At.$type]},TypeAttribute:{name:Ei.$type,properties:{defaultValue:{name:Ei.defaultValue},isOptional:{name:Ei.isOptional,defaultValue:!1},name:{name:Ei.name},type:{name:Ei.type}},superTypes:[]},TypeDefinition:{name:$i.$type,properties:{},superTypes:[]},UnionType:{name:uc.$type,properties:{types:{name:uc.types,defaultValue:[]}},superTypes:[$i.$type]},UnorderedGroup:{name:ps.$type,properties:{cardinality:{name:ps.cardinality},elements:{name:ps.elements,defaultValue:[]}},superTypes:[ut.$type]},UntilToken:{name:Rn.$type,properties:{cardinality:{name:Rn.cardinality},lookahead:{name:Rn.lookahead},parenthesized:{name:Rn.parenthesized,defaultValue:!1},terminal:{name:Rn.terminal}},superTypes:[yt.$type]},ValueLiteral:{name:Ai.$type,properties:{},superTypes:[]},Wildcard:{name:Ki.$type,properties:{cardinality:{name:Ki.cardinality},lookahead:{name:Ki.lookahead},parenthesized:{name:Ki.parenthesized,defaultValue:!1}},superTypes:[yt.$type]}}}}const ee=new Td;function Ko(t){return new Nu(t,e=>ta(e)?e.content:[],{includeRoot:!0})}function Em(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Ho(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function ks(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}var tr;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(tr||(tr={}));function $m(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return tr.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return tr.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?tr.Inside:r?tr.OverlapBack:n?tr.OverlapFront:tr.Outside}function Am(t,e){return $m(t,e)>tr.After}const Cm=/^[\w\p{L}]$/u;function Sm(t,e){if(t){const r=km(t,!0);if(r&&cc(r,e))return r;if(dd(t)){const n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){const a=t.content[i];if(cc(a,e))return a}}}}function cc(t,e){return fd(t)&&e.includes(t.tokenType.name)}function km(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const i=r.content[n];if(e||!i.hidden)return i}t=r}}class Rd extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}function ga(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function fo(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function Ci(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function on(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function wm(){throw Error("Internal Error - Should never get here!")}function fc(t){return t.type==="Character"}const ws=[];for(let t=W("0");t<=W("9");t++)ws.push(t);const Ns=[W("_")].concat(ws);for(let t=W("a");t<=W("z");t++)Ns.push(t);for(let t=W("A");t<=W("Z");t++)Ns.push(t);const dc=[W(" "),W("\f"),W(`
|
|
1
|
+
var fp=Object.defineProperty;var dp=(t,e,r)=>e in t?fp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var gr=(t,e,r)=>dp(t,typeof e!="symbol"?e+"":e,r);import{bE as hp,bF as pp,aY as rd,bo as mp,b0 as gp,aZ as Be,at as yp,au as Ju,be as Tp,bh as nd,bi as id,bf as Rp,bt as Zu,aw as en,ax as se,a_ as vp,aU as Ep,bG as $p,bH as jt}from"./index-K6fCB-_E.js";import{k as Hn,j as Cu,g as ti,S as Ap,w as Cp,x as Sp,c as ad,v as Le,y as sd,l as kp,z as wp,A as Np,B as bp,C as _p,a as od,d as U,i as sr,r as Ze,f as pt,D as ze}from"./_baseUniq-FSheTm_9.js";import{j as Su,m as M,d as Ip,f as Tt,g as Yn,h as j,i as ku,l as Kr,e as Pp}from"./_basePickBy-DdmMqnCR.js";import{c as Ve}from"./clone-B_J3fPs2.js";var Lp=Object.prototype,Op=Lp.hasOwnProperty,ht=hp(function(t,e){if(pp(e)||rd(e)){mp(e,Hn(e),t);return}for(var r in e)Op.call(e,r)&&gp(t,r,e[r])});function ld(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a}function ha(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e<r;){var a=t[e];a&&(i[n++]=a)}return i}function xp(t,e,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;){var s=t[i];e(n,s,r(s),t)}return n}function Dp(t,e,r,n){return Cu(t,function(i,a,s){e(n,i,r(i),s)}),n}function Mp(t,e){return function(r,n){var i=Be(r)?xp:Dp,a=e?e():{};return i(r,t,ti(n),a)}}var Gp=200;function Fp(t,e,r,n){var i=-1,a=Cp,s=!0,o=t.length,l=[],u=e.length;if(!o)return l;e.length>=Gp&&(a=Sp,s=!1,e=new Ap(e));e:for(;++i<o;){var c=t[i],d=c;if(c=c!==0?c:0,s&&d===d){for(var g=u;g--;)if(e[g]===d)continue e;l.push(c)}else a(e,d,n)||l.push(c)}return l}var Vs=yp(function(t,e){return Ju(t)?Fp(t,ad(e,1,Ju,!0)):[]});function Ue(t,e,r){var n=t==null?0:t.length;return n?(e=e===void 0?1:Su(e),ld(t,e<0?0:e,n)):[]}function ea(t,e,r){var n=t==null?0:t.length;return n?(e=e===void 0?1:Su(e),e=n-e,ld(t,0,e<0?0:e)):[]}function zp(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Up(t,e){var r=!0;return Cu(t,function(n,i,a){return r=!!e(n,i,a),r}),r}function wt(t,e,r){var n=Be(t)?zp:Up;return n(t,ti(e))}function bt(t){return t&&t.length?t[0]:void 0}function dt(t,e){return ad(M(t,e))}var qp=Object.prototype,jp=qp.hasOwnProperty,Bp=Mp(function(t,e,r){jp.call(t,r)?t[r].push(e):Tp(t,r,[e])}),Wp="[object String]";function nt(t){return typeof t=="string"||!Be(t)&&nd(t)&&id(t)==Wp}var Vp=Math.max;function tt(t,e,r,n){t=rd(t)?t:Le(t),r=r?Su(r):0;var i=t.length;return r<0&&(r=Vp(i+r,0)),nt(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&sd(t,e,r)>-1}function Qu(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=0;return sd(t,e,i)}var Kp="[object RegExp]";function Hp(t){return nd(t)&&id(t)==Kp}var ec=Zu&&Zu.isRegExp,or=ec?Rp(ec):Hp,Yp="Expected a function";function Xp(t){if(typeof t!="function")throw new TypeError(Yp);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function _t(t,e){if(t==null)return{};var r=kp(wp(t),function(n){return[n]});return e=ti(e),Ip(t,r,function(n,i){return e(n,i[0])})}function Ks(t,e){var r=Be(t)?Np:bp;return r(t,Xp(ti(e)))}function Jp(t,e){var r;return Cu(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}function ud(t,e,r){var n=Be(t)?_p:Jp;return n(t,ti(e))}function wu(t){return t&&t.length?od(t):[]}function Zp(t,e){return t&&t.length?od(t,ti(e)):[]}function Ke(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function kt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function Tr(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Qp(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function vi(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class cd{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(i=r.properties[e.property])==null?void 0:i.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return Ke(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const i=n[r];if(i!==void 0)return i;{const a=this.types[e],s=a?a.superTypes.some(o=>this.isSubtype(o,r)):!1;return n[r]=s,s}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),i=[];for(const a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}function ta(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function fd(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function dd(t){return ta(t)&&typeof t.fullText=="string"}class qe{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new qe(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return ct})}join(e=","){const r=this.iterator();let n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=em(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){const n=this.iterator();let i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new qe(this.startFn,r=>{const{done:n,value:i}=this.nextFn(r);return n?ct:{done:!1,value:e(i)}})}filter(e){return new qe(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return ct})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const i=e.next();if(i.done)return n;const a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new qe(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:n,value:i}=this.nextFn(r.this);if(!n){const a=e(i);if(As(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return ct})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new qe(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:i,value:a}=r.nextFn(n.this);if(!i)if(As(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return ct})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new qe(()=>{const r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new qe(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?ct:this.nextFn(r.state)))}distinct(e){return new qe(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return ct})}exclude(e,r){const n=new Set;for(const i of e){const a=r?r(i):i;n.add(a)}return this.filter(i=>{const a=r?r(i):i;return!n.has(a)})}}function em(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function As(t){return!!t&&typeof t[Symbol.iterator]=="function"}const hd=new qe(()=>{},()=>ct),ct=Object.freeze({done:!0,value:void 0});function ge(...t){if(t.length===1){const e=t[0];if(e instanceof qe)return e;if(As(e))return new qe(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new qe(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:ct)}return t.length>1?new qe(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];As(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return ct}):hd}class Nu extends qe{constructor(e,r,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return ct})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Fo;(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(Fo||(Fo={}));function zo(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((i,a)=>{Ke(i)&&(i.$container=t,i.$containerProperty=r,i.$containerIndex=a,e.deep&&zo(i,e))}):Ke(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&zo(n,e)))}function Hs(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function nr(t){const r=ls(t).$document;if(!r)throw new Error("AST node has no document.");return r}function ls(t){for(;t.$container;)t=t.$container;return t}function tc(t){return kt(t)?t.ref?[t.ref]:[]:Tr(t)?t.items.map(e=>e.ref):[]}function bu(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new qe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const i=n.keys[n.keyIndex];if(!i.startsWith("$")){const a=t[i];if(Ke(a)){if(n.keyIndex++,rc(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;n.arrayIndex<a.length;){const s=n.arrayIndex++,o=a[s];if(Ke(o)&&rc(o,r))return{done:!1,value:o}}n.arrayIndex=0}}n.keyIndex++}return ct})}function pa(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Nu(t,r=>bu(r,e))}function ir(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Nu(t,r=>bu(r,e),{includeRoot:!0})}function rc(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?Am(r,e):!1}function Cs(t){return new qe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(kt(n)||Tr(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const i=e.arrayIndex++,a=n[i];if(kt(a)||Tr(n))return{done:!1,value:{reference:a,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return ct})}function tm(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const i of Object.values(r.properties))i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=pd(i.defaultValue))}function pd(t){return Array.isArray(t)?[...t.map(pd)]:t}const ut={$type:"AbstractElement",cardinality:"cardinality"};function rm(t){return ee.isInstance(t,ut.$type)}const us={$type:"AbstractParserRule"};function ma(t){return ee.isInstance(t,us.$type)}const Ua={$type:"AbstractRule"},At={$type:"AbstractType"},Fr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Ys(t){return ee.isInstance(t,Fr.$type)}const cs={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function md(t){return ee.isInstance(t,cs.$type)}const nc={$type:"ArrayLiteral",elements:"elements"},ic={$type:"ArrayType",elementType:"elementType"},zr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Hr(t){return ee.isInstance(t,zr.$type)}const Uo={$type:"BooleanLiteral",true:"true"};function nm(t){return ee.isInstance(t,Uo.$type)}const Ur={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function im(t){return ee.isInstance(t,Ur.$type)}const sn={$type:"Condition"},fs={$type:"Conjunction",left:"left",right:"right"};function am(t){return ee.isInstance(t,fs.$type)}const qr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Xs(t){return ee.isInstance(t,qr.$type)}const ds={$type:"Disjunction",left:"left",right:"right"};function sm(t){return ee.isInstance(t,ds.$type)}const qo={$type:"EndOfFile",cardinality:"cardinality"};function om(t){return ee.isInstance(t,qo.$type)}const Sr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},ac={$type:"GrammarImport",path:"path"},dn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function _u(t){return ee.isInstance(t,dn.$type)}const jo={$type:"InferredType",name:"name"};function gd(t){return ee.isInstance(t,jo.$type)}const Zt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function Ss(t){return ee.isInstance(t,Zt.$type)}const uo={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},sc={$type:"InfixRuleOperators",precedences:"precedences"},Bi={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function lm(t){return ee.isInstance(t,Bi.$type)}const Wi={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Yr(t){return ee.isInstance(t,Wi.$type)}const qa={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},hn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function um(t){return ee.isInstance(t,hn.$type)}const Bo={$type:"Negation",value:"value"};function cm(t){return ee.isInstance(t,Bo.$type)}const oc={$type:"NumberLiteral",value:"value"},ja={$type:"Parameter",name:"name"},Wo={$type:"ParameterReference",parameter:"parameter"};function fm(t){return ee.isInstance(t,Wo.$type)}const Lt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function ur(t){return ee.isInstance(t,Lt.$type)}const co={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},pn={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function dm(t){return ee.isInstance(t,pn.$type)}const Vo={$type:"ReturnType",name:"name"};function hm(t){return ee.isInstance(t,Vo.$type)}const mn={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Xr(t){return ee.isInstance(t,mn.$type)}const Vi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function pm(t){return ee.isInstance(t,Vi.$type)}const lc={$type:"StringLiteral",value:"value"},gn={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function mm(t){return ee.isInstance(t,gn.$type)}const yt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},yn={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function gm(t){return ee.isInstance(t,yn.$type)}const yr={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function cr(t){return ee.isInstance(t,yr.$type)}const Tn={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function ym(t){return ee.isInstance(t,Tn.$type)}const hs={$type:"Type",name:"name",type:"type"};function Tm(t){return ee.isInstance(t,hs.$type)}const Ei={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},$i={$type:"TypeDefinition"},uc={$type:"UnionType",types:"types"},ps={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function yd(t){return ee.isInstance(t,ps.$type)}const Rn={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Rm(t){return ee.isInstance(t,Rn.$type)}const Ai={$type:"ValueLiteral"},Ki={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function vm(t){return ee.isInstance(t,Ki.$type)}class Td extends cd{constructor(){super(...arguments),this.types={AbstractElement:{name:ut.$type,properties:{cardinality:{name:ut.cardinality}},superTypes:[]},AbstractParserRule:{name:us.$type,properties:{},superTypes:[Ua.$type,At.$type]},AbstractRule:{name:Ua.$type,properties:{},superTypes:[]},AbstractType:{name:At.$type,properties:{},superTypes:[]},Action:{name:Fr.$type,properties:{cardinality:{name:Fr.cardinality},feature:{name:Fr.feature},inferredType:{name:Fr.inferredType},operator:{name:Fr.operator},type:{name:Fr.type,referenceType:At.$type}},superTypes:[ut.$type]},Alternatives:{name:cs.$type,properties:{cardinality:{name:cs.cardinality},elements:{name:cs.elements,defaultValue:[]}},superTypes:[ut.$type]},ArrayLiteral:{name:nc.$type,properties:{elements:{name:nc.elements,defaultValue:[]}},superTypes:[Ai.$type]},ArrayType:{name:ic.$type,properties:{elementType:{name:ic.elementType}},superTypes:[$i.$type]},Assignment:{name:zr.$type,properties:{cardinality:{name:zr.cardinality},feature:{name:zr.feature},operator:{name:zr.operator},predicate:{name:zr.predicate},terminal:{name:zr.terminal}},superTypes:[ut.$type]},BooleanLiteral:{name:Uo.$type,properties:{true:{name:Uo.true,defaultValue:!1}},superTypes:[sn.$type,Ai.$type]},CharacterRange:{name:Ur.$type,properties:{cardinality:{name:Ur.cardinality},left:{name:Ur.left},lookahead:{name:Ur.lookahead},parenthesized:{name:Ur.parenthesized,defaultValue:!1},right:{name:Ur.right}},superTypes:[yt.$type]},Condition:{name:sn.$type,properties:{},superTypes:[]},Conjunction:{name:fs.$type,properties:{left:{name:fs.left},right:{name:fs.right}},superTypes:[sn.$type]},CrossReference:{name:qr.$type,properties:{cardinality:{name:qr.cardinality},deprecatedSyntax:{name:qr.deprecatedSyntax,defaultValue:!1},isMulti:{name:qr.isMulti,defaultValue:!1},terminal:{name:qr.terminal},type:{name:qr.type,referenceType:At.$type}},superTypes:[ut.$type]},Disjunction:{name:ds.$type,properties:{left:{name:ds.left},right:{name:ds.right}},superTypes:[sn.$type]},EndOfFile:{name:qo.$type,properties:{cardinality:{name:qo.cardinality}},superTypes:[ut.$type]},Grammar:{name:Sr.$type,properties:{imports:{name:Sr.imports,defaultValue:[]},interfaces:{name:Sr.interfaces,defaultValue:[]},isDeclared:{name:Sr.isDeclared,defaultValue:!1},name:{name:Sr.name},rules:{name:Sr.rules,defaultValue:[]},types:{name:Sr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:ac.$type,properties:{path:{name:ac.path}},superTypes:[]},Group:{name:dn.$type,properties:{cardinality:{name:dn.cardinality},elements:{name:dn.elements,defaultValue:[]},guardCondition:{name:dn.guardCondition},predicate:{name:dn.predicate}},superTypes:[ut.$type]},InferredType:{name:jo.$type,properties:{name:{name:jo.name}},superTypes:[At.$type]},InfixRule:{name:Zt.$type,properties:{call:{name:Zt.call},dataType:{name:Zt.dataType},inferredType:{name:Zt.inferredType},name:{name:Zt.name},operators:{name:Zt.operators},parameters:{name:Zt.parameters,defaultValue:[]},returnType:{name:Zt.returnType,referenceType:At.$type}},superTypes:[us.$type]},InfixRuleOperatorList:{name:uo.$type,properties:{associativity:{name:uo.associativity},operators:{name:uo.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:sc.$type,properties:{precedences:{name:sc.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Bi.$type,properties:{attributes:{name:Bi.attributes,defaultValue:[]},name:{name:Bi.name},superTypes:{name:Bi.superTypes,defaultValue:[],referenceType:At.$type}},superTypes:[At.$type]},Keyword:{name:Wi.$type,properties:{cardinality:{name:Wi.cardinality},predicate:{name:Wi.predicate},value:{name:Wi.value}},superTypes:[ut.$type]},NamedArgument:{name:qa.$type,properties:{calledByName:{name:qa.calledByName,defaultValue:!1},parameter:{name:qa.parameter,referenceType:ja.$type},value:{name:qa.value}},superTypes:[]},NegatedToken:{name:hn.$type,properties:{cardinality:{name:hn.cardinality},lookahead:{name:hn.lookahead},parenthesized:{name:hn.parenthesized,defaultValue:!1},terminal:{name:hn.terminal}},superTypes:[yt.$type]},Negation:{name:Bo.$type,properties:{value:{name:Bo.value}},superTypes:[sn.$type]},NumberLiteral:{name:oc.$type,properties:{value:{name:oc.value}},superTypes:[Ai.$type]},Parameter:{name:ja.$type,properties:{name:{name:ja.name}},superTypes:[]},ParameterReference:{name:Wo.$type,properties:{parameter:{name:Wo.parameter,referenceType:ja.$type}},superTypes:[sn.$type]},ParserRule:{name:Lt.$type,properties:{dataType:{name:Lt.dataType},definition:{name:Lt.definition},entry:{name:Lt.entry,defaultValue:!1},fragment:{name:Lt.fragment,defaultValue:!1},inferredType:{name:Lt.inferredType},name:{name:Lt.name},parameters:{name:Lt.parameters,defaultValue:[]},returnType:{name:Lt.returnType,referenceType:At.$type}},superTypes:[us.$type]},ReferenceType:{name:co.$type,properties:{isMulti:{name:co.isMulti,defaultValue:!1},referenceType:{name:co.referenceType}},superTypes:[$i.$type]},RegexToken:{name:pn.$type,properties:{cardinality:{name:pn.cardinality},lookahead:{name:pn.lookahead},parenthesized:{name:pn.parenthesized,defaultValue:!1},regex:{name:pn.regex}},superTypes:[yt.$type]},ReturnType:{name:Vo.$type,properties:{name:{name:Vo.name}},superTypes:[]},RuleCall:{name:mn.$type,properties:{arguments:{name:mn.arguments,defaultValue:[]},cardinality:{name:mn.cardinality},predicate:{name:mn.predicate},rule:{name:mn.rule,referenceType:Ua.$type}},superTypes:[ut.$type]},SimpleType:{name:Vi.$type,properties:{primitiveType:{name:Vi.primitiveType},stringType:{name:Vi.stringType},typeRef:{name:Vi.typeRef,referenceType:At.$type}},superTypes:[$i.$type]},StringLiteral:{name:lc.$type,properties:{value:{name:lc.value}},superTypes:[Ai.$type]},TerminalAlternatives:{name:gn.$type,properties:{cardinality:{name:gn.cardinality},elements:{name:gn.elements,defaultValue:[]},lookahead:{name:gn.lookahead},parenthesized:{name:gn.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalElement:{name:yt.$type,properties:{cardinality:{name:yt.cardinality},lookahead:{name:yt.lookahead},parenthesized:{name:yt.parenthesized,defaultValue:!1}},superTypes:[ut.$type]},TerminalGroup:{name:yn.$type,properties:{cardinality:{name:yn.cardinality},elements:{name:yn.elements,defaultValue:[]},lookahead:{name:yn.lookahead},parenthesized:{name:yn.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalRule:{name:yr.$type,properties:{definition:{name:yr.definition},fragment:{name:yr.fragment,defaultValue:!1},hidden:{name:yr.hidden,defaultValue:!1},name:{name:yr.name},type:{name:yr.type}},superTypes:[Ua.$type]},TerminalRuleCall:{name:Tn.$type,properties:{cardinality:{name:Tn.cardinality},lookahead:{name:Tn.lookahead},parenthesized:{name:Tn.parenthesized,defaultValue:!1},rule:{name:Tn.rule,referenceType:yr.$type}},superTypes:[yt.$type]},Type:{name:hs.$type,properties:{name:{name:hs.name},type:{name:hs.type}},superTypes:[At.$type]},TypeAttribute:{name:Ei.$type,properties:{defaultValue:{name:Ei.defaultValue},isOptional:{name:Ei.isOptional,defaultValue:!1},name:{name:Ei.name},type:{name:Ei.type}},superTypes:[]},TypeDefinition:{name:$i.$type,properties:{},superTypes:[]},UnionType:{name:uc.$type,properties:{types:{name:uc.types,defaultValue:[]}},superTypes:[$i.$type]},UnorderedGroup:{name:ps.$type,properties:{cardinality:{name:ps.cardinality},elements:{name:ps.elements,defaultValue:[]}},superTypes:[ut.$type]},UntilToken:{name:Rn.$type,properties:{cardinality:{name:Rn.cardinality},lookahead:{name:Rn.lookahead},parenthesized:{name:Rn.parenthesized,defaultValue:!1},terminal:{name:Rn.terminal}},superTypes:[yt.$type]},ValueLiteral:{name:Ai.$type,properties:{},superTypes:[]},Wildcard:{name:Ki.$type,properties:{cardinality:{name:Ki.cardinality},lookahead:{name:Ki.lookahead},parenthesized:{name:Ki.parenthesized,defaultValue:!1}},superTypes:[yt.$type]}}}}const ee=new Td;function Ko(t){return new Nu(t,e=>ta(e)?e.content:[],{includeRoot:!0})}function Em(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Ho(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function ks(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}var tr;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(tr||(tr={}));function $m(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return tr.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return tr.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?tr.Inside:r?tr.OverlapBack:n?tr.OverlapFront:tr.Outside}function Am(t,e){return $m(t,e)>tr.After}const Cm=/^[\w\p{L}]$/u;function Sm(t,e){if(t){const r=km(t,!0);if(r&&cc(r,e))return r;if(dd(t)){const n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){const a=t.content[i];if(cc(a,e))return a}}}}function cc(t,e){return fd(t)&&e.includes(t.tokenType.name)}function km(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const i=r.content[n];if(e||!i.hidden)return i}t=r}}class Rd extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}function ga(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function fo(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function Ci(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function on(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function wm(){throw Error("Internal Error - Should never get here!")}function fc(t){return t.type==="Character"}const ws=[];for(let t=W("0");t<=W("9");t++)ws.push(t);const Ns=[W("_")].concat(ws);for(let t=W("a");t<=W("z");t++)Ns.push(t);for(let t=W("A");t<=W("Z");t++)Ns.push(t);const dc=[W(" "),W("\f"),W(`
|
|
2
2
|
`),W("\r"),W(" "),W("\v"),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W("\u2028"),W("\u2029"),W(" "),W(" "),W(" "),W("\uFEFF")],Nm=/[0-9a-fA-F]/,Ba=/[0-9]/,bm=/[1-9]/;class vd{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const r=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Ci(n,"global");break;case"i":Ci(n,"ignoreCase");break;case"m":Ci(n,"multiLine");break;case"u":Ci(n,"unicode");break;case"y":Ci(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){const e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){const e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":r="Lookbehind";break;case"!":r="NegativeLookbehind"}break}}on(r);const n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return wm()}quantifier(e=!1){let r;const n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:i,atMost:a}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;on(r);break}if(!(e===!0&&r===void 0)&&on(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e;const r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),on(e))return e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[W(`
|
|
3
3
|
`),W("\r"),W("\u2028"),W("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=ws;break;case"D":e=ws,r=!0;break;case"s":e=dc;break;case"S":e=dc,r=!0;break;case"w":e=Ns;break;case"W":e=Ns,r=!0;break}if(on(e))return{type:"Set",value:e,complement:r}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=W("\f");break;case"n":e=W(`
|
|
4
4
|
`);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(on(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:W("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:W(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
package/public/assets/{wardleyDiagram-NUSXRM2D-zijkrMrR.js → wardleyDiagram-NUSXRM2D-BMN1lmwc.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as zt,g as Lt,q as Xt,p as At,a as Ct,b as Et,_ as y,l as et,I as Tt,e as Yt,z as Bt,c as H,i as Rt}from"./index-
|
|
1
|
+
import{s as zt,g as Lt,q as Xt,p as At,a as Ct,b as Et,_ as y,l as et,I as Tt,e as Yt,z as Bt,c as H,i as Rt}from"./index-K6fCB-_E.js";import{p as Ft}from"./chunk-4BX2VUAB-DumEf-uE.js";import{p as It}from"./wardley-RL74JXVD-CTz1AIQ7.js";import"./_baseUniq-FSheTm_9.js";import"./_basePickBy-DdmMqnCR.js";import"./clone-B_J3fPs2.js";var q=y((a,r)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),Y=y((a,r,e)=>({x:q(r,`${e} evolution`),y:q(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Ot=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const r=/^\+'([^']*)'/.exec(a),e=r==null?void 0:r[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=y((a,r)=>{if(Ft(a,r),a.size&&r.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(o=>o.secondName?`${o.name.trim()} / ${o.secondName.trim()}`:o.name.trim()),h=a.evolution.stages.filter(o=>o.boundary!==void 0).map(o=>o.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(a.anchors.forEach(e=>{const h=Y(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),a.components.forEach(e=>{var v;const h=Y(e.visibility,e.evolution,`Component "${e.name}"`),o=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",o,d,e.inertia,m)}),a.notes.forEach(e=>{const h=Y(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),a.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const o=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,A=q(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,A,o,"pipeline-component",v,g),r.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let o=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Ot(e.arrow);!o&&d&&(o=d);const v=e.linkLabel,g=m??v;r.addLink(e.from,e.to,h,g,o)}),a.evolves.forEach(e=>{const h=r.getNode(e.component);if((h==null?void 0:h.y)!==void 0){const o=q(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,o,h.y)}}),a.annotations.length>0){const e=a.annotations[0],h=Y(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}a.annotation.forEach(e=>{const h=Y(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),a.accelerators.forEach(e=>{const h=Y(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),a.deaccelerators.forEach(e=>{const h=Y(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var h;const r=await It("wardley",a);et.debug(r);const e=(h=at.parser)==null?void 0:h.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},R,Dt=(R=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const o=this.nodes.get(e);o&&(o.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(R,"WardleyBuilder"),R),P=new Dt;function N(a){const r=H();return Rt(a.trim(),r)}y(N,"textSanitizer");function rt(){return H()["wardley-beta"]}y(rt,"getConfig");function ot(a,r,e,h,o,d,m,v,g){P.addNode({id:a,label:N(r),x:e,y:h,className:o,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,r,e=!1,h,o){P.addLink({source:a,target:r,dashed:e,label:h,flow:o})}y(st,"addLink");function nt(a,r,e){P.addTrend({nodeId:a,targetX:r,targetY:e})}y(nt,"addTrend");function it(a,r,e){P.addAnnotation({number:a,coordinates:r,text:e?N(e):void 0})}y(it,"addAnnotation");function dt(a,r,e){P.addNote({text:N(a),x:r,y:e})}y(dt,"addNote");function lt(a,r,e){P.addAccelerator({name:N(a),x:r,y:e})}y(lt,"addAccelerator");function ct(a,r,e){P.addDeaccelerator({name:N(a),x:r,y:e})}y(ct,"addDeaccelerator");function pt(a,r){P.setAnnotationsBox(a,r)}y(pt,"setAnnotationsBox");function ht(a,r){P.setSize(a,r)}y(ht,"setSize");function xt(a){P.startPipeline(a)}y(xt,"startPipeline");function ft(a,r){P.addPipelineComponent(a,r)}y(ft,"addPipelineComponent");function gt(a){const r={};a.xLabel&&(r.xLabel=N(a.xLabel)),a.yLabel&&(r.yLabel=N(a.yLabel)),a.stages&&(r.stages=a.stages.map(e=>N(e))),a.stageBoundaries&&(r.stageBoundaries=a.stageBoundaries),P.setAxes(r)}y(gt,"updateAxes");function ut(a){return P.getNode(a)}y(ut,"getNode");function yt(){return P.build()}y(yt,"getWardleyData");function mt(){P.clear(),Bt()}y(mt,"clear");var Gt={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,getWardleyData:yt,clear:mt,setAccTitle:Et,getAccTitle:Ct,setDiagramTitle:At,getDiagramTitle:Xt,getAccDescription:Lt,setAccDescription:zt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=y(()=>{var r,e,h,o,d,m,v,g,A,M,b,z;const{themeVariables:a}=H();return{backgroundColor:((r=a.wardley)==null?void 0:r.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((h=a.wardley)==null?void 0:h.axisTextColor)??a.primaryTextColor??"#222",gridColor:((o=a.wardley)==null?void 0:o.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((A=a.wardley)==null?void 0:A.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((b=a.wardley)==null?void 0:b.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((z=a.wardley)==null?void 0:z.annotationFill)??a.background??"#fff"}},"getTheme"),jt=y(()=>{const a=H()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),_t=y((a,r,e,h)=>{var K,Q;et.debug(`Rendering Wardley map
|
|
2
2
|
`+a);const o=jt(),d=Ht(),m=o.nodeRadius*1.6,v=h.db,g=v.getWardleyData(),A=v.getDiagramTitle(),M=((K=g.size)==null?void 0:K.width)??o.width,b=((Q=g.size)==null?void 0:Q.height)??o.height,z=Tt(r);z.selectAll("*").remove(),Yt(z,b,M,o.useMaxWidth),z.attr("viewBox",`0 0 ${M} ${b}`);const S=z.append("g").attr("class","wardley-map"),j=z.append("defs");j.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),S.append("rect").attr("class","wardley-background").attr("width",M).attr("height",b).attr("fill",d.backgroundColor);const F=M-o.padding*2,I=b-o.padding*2;A&&S.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(A);const C=y(t=>o.padding+t/100*F,"projectX"),E=y(t=>b-o.padding-t/100*I,"projectY"),W=S.append("g").attr("class","wardley-axes");W.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),W.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";W.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+F/2).attr("y",b-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),W.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+I/2})`).text(bt);const O=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(O.length>0){const t=S.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===O.length){let i=0;n.forEach(p=>{s.push({start:i,end:p}),i=p})}else{const i=1/O.length;O.forEach((p,l)=>{s.push({start:l*i,end:(l+1)*i})})}O.forEach((i,p)=>{const l=s[p],x=o.padding+l.start*F,f=o.padding+l.end*F,u=(x+f)/2;p>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",b-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(o.showGrid){const t=S.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=o.padding+F*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding-I*s).attr("y2",b-o.padding-I*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:C(t.x),y:E(t.y),node:t})}),g.pipelines.length>0){const t=S.append("g").attr("class","wardley-pipelines"),n=S.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(p=Math.min(p,u.x),l=Math.max(l,u.x),x=u.y)}),p!==1/0&&l!==-1/0){const u=o.nodeRadius*4,w=x-u/2,$=c.get(s.nodeId);if($){const X=(p+l)/2;$.x=X,$.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+30).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const Z=S.append("g").attr("class","wardley-links"),U=new Map;g.pipelines.forEach(t=>{U.set(t.nodeId,new Set(t.componentIds))});const J=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=U.get(t.target);return!(n!=null&&n.has(t.source))});Z.selectAll("line").data(J).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*p}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*p}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*p}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),Z.selectAll("text").data(J.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+p*p),f=8,u=p/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,p=s.x-n.x,l=s.y-n.y,x=Math.sqrt(p*p+l*l),f=8,u=-p/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,$=-l/f,X=i+w*u,D=p+$*u;let B=Math.atan2(x,l)*180/Math.PI;return(B>90||B<-90)&&(B+=180),`rotate(${B} ${X} ${D})`}).text(t=>t.label);const kt=S.append("g").attr("class","wardley-trends"),Pt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=C(t.targetX),i=E(t.targetY),p=s-n.x,l=i-n.y,x=Math.sqrt(p*p+l*l),f=o.nodeRadius+2,u=x>f?s-p/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);kt.selectAll("line").data(Pt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const L=S.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));L.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),L.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),L.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=L.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),L.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const _=o.nodeRadius*.7,k=o.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-k).attr("x2",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-k).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-k).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),L.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),L.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),L.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",o.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=S.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:C(i.x),y:E(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=C(g.annotationsBox.x),s=E(g.annotationsBox.y);const i=10,p=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,$)=>w.number-$.number),u=[];if(f.forEach((w,$)=>{const X=x.append("text").attr("x",n+i).attr("y",s+i+($+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(X)}),u.length>0){let w=0,$=0;u.forEach(V=>{const G=V.node(),Mt=G.getComputedTextLength();w=Math.max(w,Mt);const Nt=G.getBBox();$=Math.max($,Nt.height)});const X=w+i*2+105,D=f.length*p+i*2+$/2,B=o.padding,vt=M-o.padding-X,St=o.padding,$t=b-o.padding-D;n=Math.max(B,Math.min(n,vt)),s=Math.max(St,Math.min(s,$t)),u.forEach((V,G)=>{V.attr("x",n+i).attr("y",s+i+(G+1)*p)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",X).attr("height",D).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=S.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=C(n.x),i=E(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=S.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=C(n.x),i=E(n.y),p=60,l=30,x=20,f=`
|
|
3
3
|
M ${s} ${i-l/2}
|
|
4
4
|
L ${s+p-x} ${i-l/2}
|
package/public/assets/{xychartDiagram-5P7HB3ND-CGfq74uo.js → xychartDiagram-5P7HB3ND-FWnFa4As.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,aH as Si,R as Wt}from"./index-
|
|
1
|
+
import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,aH as Si,R as Wt}from"./index-K6fCB-_E.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear--trpUrpH.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=(function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&>.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+gt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:pt,expected:gt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+M);switch(z[0]){case 1:g.push(M),C.push(D.yytext),r.push(D.yylloc),g.push(z[1]),M=null,It=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=C[C.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ci&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(G,[d,It,ct,$.yy,z[1],C,r].concat(li)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},k=(function(){var F={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
package/public/index.html
CHANGED
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
const t = localStorage.getItem('termbeam-theme');
|
|
28
28
|
if (t) document.documentElement.setAttribute('data-theme', t);
|
|
29
29
|
</script>
|
|
30
|
-
<script type="module" crossorigin src="/assets/index-
|
|
31
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
30
|
+
<script type="module" crossorigin src="/assets/index-K6fCB-_E.js"></script>
|
|
31
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Yv6qAvmh.css">
|
|
32
32
|
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
|
33
33
|
<body>
|
|
34
34
|
<div id="root"></div>
|
package/public/sw.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
try{self["workbox:core:7.3.0"]&&_()}catch{}const G=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},Q=G;class h extends Error{constructor(e,t){const n=Q(e,t);super(n),this.name=e,this.details=t}}const d={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},E=s=>[d.prefix,s,d.suffix].filter(e=>e&&e.length>0).join("-"),z=s=>{for(const e of Object.keys(d))s(e)},b={updateDetails:s=>{z(e=>{typeof s[e]=="string"&&(d[e]=s[e])})},getGoogleAnalyticsName:s=>s||E(d.googleAnalytics),getPrecacheName:s=>s||E(d.precache),getPrefix:()=>d.prefix,getRuntimeName:s=>s||E(d.runtime),getSuffix:()=>d.suffix};function v(s,e){const t=e();return s.waitUntil(t),t}try{self["workbox:precaching:7.3.0"]&&_()}catch{}const J="__WB_REVISION__";function X(s){if(!s)throw new h("add-to-cache-list-unexpected-type",{entry:s});if(typeof s=="string"){const i=new URL(s,location.href);return{cacheKey:i.href,url:i.href}}const{revision:e,url:t}=s;if(!t)throw new h("add-to-cache-list-unexpected-type",{entry:s});if(!e){const i=new URL(t,location.href);return{cacheKey:i.href,url:i.href}}const n=new URL(t,location.href),a=new URL(t,location.href);return n.searchParams.set(J,e),{cacheKey:n.href,url:a.href}}class Y{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type==="install"&&t&&t.originalRequest&&t.originalRequest instanceof Request){const a=t.originalRequest.url;n?this.notUpdatedURLs.push(a):this.updatedURLs.push(a)}return n}}}class Z{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:n})=>{const a=(n==null?void 0:n.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return a?new Request(a,{headers:t.headers}):t},this._precacheController=e}}let m;function ee(){if(m===void 0){const s=new Response("");if("body"in s)try{new Response(s.body),m=!0}catch{m=!1}m=!1}return m}async function te(s,e){let t=null;if(s.url&&(t=new URL(s.url).origin),t!==self.location.origin)throw new h("cross-origin-copy-response",{origin:t});const n=s.clone(),i={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},r=ee()?n.body:await n.blob();return new Response(r,i)}const se=s=>new URL(String(s),location.href).href.replace(new RegExp(`^${location.origin}`),"");function M(s,e){const t=new URL(s);for(const n of e)t.searchParams.delete(n);return t.href}async function ne(s,e,t,n){const a=M(e.url,t);if(e.url===a)return s.match(e,n);const i=Object.assign(Object.assign({},n),{ignoreSearch:!0}),r=await s.keys(e,i);for(const c of r){const o=M(c.url,t);if(a===o)return s.match(c,n)}}class ae{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const B=new Set;async function ie(){for(const s of B)await s()}function re(s){return new Promise(e=>setTimeout(e,s))}try{self["workbox:strategies:7.3.0"]&&_()}catch{}function C(s){return typeof s=="string"?new Request(s):s}class ce{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new ae,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=C(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const r=await t.preloadResponse;if(r)return r}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const r of this.iterateCallbacks("requestWillFetch"))n=await r({request:n.clone(),event:t})}catch(r){if(r instanceof Error)throw new h("plugin-error-request-will-fetch",{thrownErrorMessage:r.message})}const i=n.clone();try{let r;r=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))r=await c({event:t,request:i,response:r});return r}catch(r){throw a&&await this.runCallbacks("fetchDidFail",{error:r,event:t,originalRequest:a.clone(),request:i.clone()}),r}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=C(e);let n;const{cacheName:a,matchOptions:i}=this._strategy,r=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},i),{cacheName:a});n=await caches.match(r,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:a,matchOptions:i,cachedResponse:n,request:r,event:this.event})||void 0;return n}async cachePut(e,t){const n=C(e);await re(0);const a=await this.getCacheKey(n,"write");if(!t)throw new h("cache-put-with-no-response",{url:se(a.url)});const i=await this._ensureResponseSafeToCache(t);if(!i)return!1;const{cacheName:r,matchOptions:c}=this._strategy,o=await self.caches.open(r),l=this.hasCallback("cacheDidUpdate"),g=l?await ne(o,a.clone(),["__WB_REVISION__"],c):null;try{await o.put(a,l?i.clone():i)}catch(u){if(u instanceof Error)throw u.name==="QuotaExceededError"&&await ie(),u}for(const u of this.iterateCallbacks("cacheDidUpdate"))await u({cacheName:r,oldResponse:g,newResponse:i.clone(),request:a,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let a=e;for(const i of this.iterateCallbacks("cacheKeyWillBeUsed"))a=C(await i({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[n]=a}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const n=this._pluginStateMap.get(t);yield i=>{const r=Object.assign(Object.assign({},i),{state:n});return t[e](r)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){for(;this._extendLifetimePromises.length;){const e=this._extendLifetimePromises.splice(0),n=(await Promise.allSettled(e)).find(a=>a.status==="rejected");if(n)throw n.reason}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(const a of this.iterateCallbacks("cacheWillUpdate"))if(t=await a({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}}class W{constructor(e={}){this.cacheName=b.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,n=typeof e.request=="string"?new Request(e.request):e.request,a="params"in e?e.params:void 0,i=new ce(this,{event:t,request:n,params:a}),r=this._getResponse(i,n,t),c=this._awaitComplete(r,i,n,t);return[r,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let a;try{if(a=await this._handle(t,e),!a||a.type==="error")throw new h("no-response",{url:t.url})}catch(i){if(i instanceof Error){for(const r of e.iterateCallbacks("handlerDidError"))if(a=await r({error:i,event:n,request:t}),a)break}if(!a)throw i}for(const i of e.iterateCallbacks("handlerWillRespond"))a=await i({event:n,request:t,response:a});return a}async _awaitComplete(e,t,n,a){let i,r;try{i=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:a,request:n,response:i}),await t.doneWaiting()}catch(c){c instanceof Error&&(r=c)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:n,response:i,error:r}),t.destroy(),r)throw r}}class p extends W{constructor(e={}){e.cacheName=b.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(p.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const n=await t.cacheMatch(e);return n||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let n;const a=t.params||{};if(this._fallbackToNetwork){const i=a.integrity,r=e.integrity,c=!r||r===i;n=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?r||i:void 0})),i&&c&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,n.clone()))}else throw new h("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return n}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const n=await t.fetch(e);if(!await t.cachePut(e,n.clone()))throw new h("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[n,a]of this.plugins.entries())a!==p.copyRedirectedCacheableResponsesPlugin&&(a===p.defaultPrecacheCacheabilityPlugin&&(e=n),a.cacheWillUpdate&&t++);t===0?this.plugins.push(p.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}}p.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:s}){return!s||s.status>=400?null:s}};p.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:s}){return s.redirected?await te(s):s}};class oe{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new p({cacheName:b.getPrecacheName(e),plugins:[...t,new Z({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const n of e){typeof n=="string"?t.push(n):n&&n.revision===void 0&&t.push(n.url);const{cacheKey:a,url:i}=X(n),r=typeof n!="string"&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(i)&&this._urlsToCacheKeys.get(i)!==a)throw new h("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(i),secondEntry:a});if(typeof n!="string"&&n.integrity){if(this._cacheKeysToIntegrities.has(a)&&this._cacheKeysToIntegrities.get(a)!==n.integrity)throw new h("add-to-cache-list-conflicting-integrities",{url:i});this._cacheKeysToIntegrities.set(a,n.integrity)}if(this._urlsToCacheKeys.set(i,a),this._urlsToCacheModes.set(i,r),t.length>0){const c=`Workbox is precaching URLs without revision info: ${t.join(", ")}
|
|
2
|
-
This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return v(e,async()=>{const t=new Y;this.strategy.plugins.push(t);for(const[i,r]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(r),o=this._urlsToCacheModes.get(i),l=new Request(i,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return v(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),i=[];for(const r of n)a.has(r.url)||(await t.delete(r),i.push(r.url));return{deletedURLs:i}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new h("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let D;const j=()=>(D||(D=new oe),D);try{self["workbox:routing:7.3.0"]&&_()}catch{}const F="GET",x=s=>s&&typeof s=="object"?s:{handle:s};class R{constructor(e,t,n=F){this.handler=x(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=x(e)}}class le extends R{constructor(e,t,n){const a=({url:i})=>{const r=e.exec(i.href);if(r&&!(i.origin!==location.origin&&r.index!==0))return r.slice(1)};super(a,t,n)}}class he{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const i=new Request(...a);return this.handleRequest({request:i,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}}))}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=r&&r.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:i})}catch(u){l=Promise.reject(u)}const g=r&&r.catchHandler;return l instanceof Promise&&(this._catchHandler||g)&&(l=l.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:i})}catch(N){N instanceof Error&&(u=N)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const i=this._routes.get(n.method)||[];for(const r of i){let c;const o=r.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:r,params:c}}return{}}setDefaultHandler(e,t=F){this._defaultHandlerMap.set(t,x(e))}setCatchHandler(e){this._catchHandler=x(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new h("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new h("unregister-route-route-not-registered")}}let y;const ue=()=>(y||(y=new he,y.addFetchListener(),y.addCacheListener()),y);function q(s,e,t){let n;if(typeof s=="string"){const i=new URL(s,location.href),r=({url:c})=>c.href===i.href;n=new R(r,e,t)}else if(s instanceof RegExp)n=new le(s,e,t);else if(typeof s=="function")n=new R(s,e,t);else if(s instanceof R)n=s;else throw new h("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return ue().registerRoute(n),n}function de(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*fe(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const i=new URL(s,location.href);i.hash="",yield i.href;const r=de(i,e);if(yield r.href,t&&r.pathname.endsWith("/")){const c=new URL(r.href);c.pathname+=t,yield c.href}if(n){const c=new URL(r.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:i});for(const o of c)yield o.href}}class pe extends R{constructor(e,t){const n=({request:a})=>{const i=e.getURLsToCacheKeys();for(const r of fe(a.url,t)){const c=i.get(r);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function ge(s){const e=j(),t=new pe(e,s);q(t)}const me="-precache-",ye=async(s,e=me)=>{const n=(await self.caches.keys()).filter(a=>a.includes(e)&&a.includes(self.registration.scope)&&a!==s);return await Promise.all(n.map(a=>self.caches.delete(a))),n};function we(){self.addEventListener("activate",(s=>{const e=b.getPrecacheName();s.waitUntil(ye(e).then(t=>{}))}))}function _e(s){j().precache(s)}function Re(s,e){_e(s),ge(e)}class be extends W{async _handle(e,t){let n=await t.cacheMatch(e),a;if(!n)try{n=await t.fetchAndCachePut(e)}catch(i){i instanceof Error&&(a=i)}if(!n)throw new h("no-response",{url:e.url,error:a});return n}}function H(s){s.then(()=>{})}const Ce=(s,e)=>e.some(t=>s instanceof t);let A,K;function xe(){return A||(A=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Ee(){return K||(K=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const V=new WeakMap,k=new WeakMap,$=new WeakMap,L=new WeakMap,P=new WeakMap;function De(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",i),s.removeEventListener("error",r)},i=()=>{t(f(s.result)),a()},r=()=>{n(s.error),a()};s.addEventListener("success",i),s.addEventListener("error",r)});return e.then(t=>{t instanceof IDBCursor&&V.set(t,s)}).catch(()=>{}),P.set(e,s),e}function Le(s){if(k.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",i),s.removeEventListener("error",r),s.removeEventListener("abort",r)},i=()=>{t(),a()},r=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",i),s.addEventListener("error",r),s.addEventListener("abort",r)});k.set(s,e)}let I={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return k.get(s);if(e==="objectStoreNames")return s.objectStoreNames||$.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function Ue(s){I=s(I)}function Te(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(U(this),e,...t);return $.set(n,e.sort?e.sort():[e]),f(n)}:Ee().includes(s)?function(...e){return s.apply(U(this),e),f(V.get(this))}:function(...e){return f(s.apply(U(this),e))}}function ke(s){return typeof s=="function"?Te(s):(s instanceof IDBTransaction&&Le(s),Ce(s,xe())?new Proxy(s,I):s)}function f(s){if(s instanceof IDBRequest)return De(s);if(L.has(s))return L.get(s);const e=ke(s);return e!==s&&(L.set(s,e),P.set(e,s)),e}const U=s=>P.get(s);function Ie(s,e,{blocked:t,upgrade:n,blocking:a,terminated:i}={}){const r=indexedDB.open(s,e),c=f(r);return n&&r.addEventListener("upgradeneeded",o=>{n(f(r.result),o.oldVersion,o.newVersion,f(r.transaction),o)}),t&&r.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{i&&o.addEventListener("close",()=>i()),a&&o.addEventListener("versionchange",l=>a(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}function Pe(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const Ne=["get","getKey","getAll","getAllKeys","count"],ve=["put","add","delete","clear"],T=new Map;function O(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(T.get(e))return T.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=ve.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||Ne.includes(t)))return;const i=async function(r,...c){const o=this.transaction(r,a?"readwrite":"readonly");let l=o.store;return n&&(l=l.index(c.shift())),(await Promise.all([l[t](...c),a&&o.done]))[0]};return T.set(e,i),i}Ue(s=>({...s,get:(e,t,n)=>O(e,t)||s.get(e,t,n),has:(e,t)=>!!O(e,t)||s.has(e,t)}));try{self["workbox:expiration:7.3.0"]&&_()}catch{}const Me="workbox-expiration",w="cache-entries",S=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class Ae{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(w,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&Pe(this._cacheName)}async setTimestamp(e,t){e=S(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},i=(await this.getDb()).transaction(w,"readwrite",{durability:"relaxed"});await i.store.put(n),await i.done}async getTimestamp(e){const n=await(await this.getDb()).get(w,this._getId(e));return n==null?void 0:n.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(w).store.index("timestamp").openCursor(null,"prev");const i=[];let r=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp<e||t&&r>=t?i.push(a.value):r++),a=await a.continue()}const c=[];for(const o of i)await n.delete(w,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await Ie(Me,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class Ke{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Ae(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const a of t)await n.delete(a,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,H(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t<n:!0}else return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}function Oe(s){B.add(s)}class Se{constructor(e={}){this.cachedResponseWillBeUsed=async({event:t,request:n,cacheName:a,cachedResponse:i})=>{if(!i)return null;const r=this._isResponseDateFresh(i),c=this._getCacheExpiration(a);H(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return r?i:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&Oe(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===b.getRuntimeName())throw new h("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new Ke(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),a=new Date(t).getTime();return isNaN(a)?null:a}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}Re([{"revision":"1872c500de691dce40960bb85481de07","url":"registerSW.js"},{"revision":"0f93805414c783a30b72e0ce88f2c7c4","url":"icons/icon.svg"},{"revision":"5dee5ddcd8e8533edb348118334d9756","url":"icons/icon-512.png"},{"revision":"75734e6b38a556148f51b9e10eeb01c8","url":"icons/icon-192.png"},{"revision":"0362e0eb00358646fd4c97674945adba","url":"icons/icon-180.png"},{"revision":null,"url":"assets/xychartDiagram-5P7HB3ND-CGfq74uo.js"},{"revision":null,"url":"assets/wardleyDiagram-NUSXRM2D-zijkrMrR.js"},{"revision":null,"url":"assets/wardley-RL74JXVD-4YdFfGjA.js"},{"revision":null,"url":"assets/vennDiagram-DHZGUBPP-7ZU4in7V.js"},{"revision":null,"url":"assets/timeline-definition-GMOUNBTQ-DhlsEVL8.js"},{"revision":null,"url":"assets/stateDiagram-v2-QKLJ7IA2-xin8mQ-3.js"},{"revision":null,"url":"assets/stateDiagram-FHFEXIEX-ehT_0YRj.js"},{"revision":null,"url":"assets/sequenceDiagram-FGHM5R23-CwB0Pi_y.js"},{"revision":null,"url":"assets/sankeyDiagram-XADWPNL6-C0IIgurO.js"},{"revision":null,"url":"assets/requirementDiagram-MS252O5E-BPg-Suqi.js"},{"revision":null,"url":"assets/quadrantDiagram-34T5L4WZ-BV52YtTZ.js"},{"revision":null,"url":"assets/pieDiagram-DEJITSTG-oiJlPmub.js"},{"revision":null,"url":"assets/ordinal-Cboi1Yqb.js"},{"revision":null,"url":"assets/montserrat-vietnamese-wght-normal-k7S-YeeD.woff2"},{"revision":null,"url":"assets/montserrat-latin-wght-normal-l_AIctKy.woff2"},{"revision":null,"url":"assets/montserrat-latin-ext-wght-normal-BsZE-iaG.woff2"},{"revision":null,"url":"assets/montserrat-cyrillic-wght-normal-EAA9jha_.woff2"},{"revision":null,"url":"assets/montserrat-cyrillic-ext-wght-normal-CO5hGrJv.woff2"},{"revision":null,"url":"assets/mindmap-definition-QFDTVHPH-ChEg3YKs.js"},{"revision":null,"url":"assets/linear-6-8pYpbX.js"},{"revision":null,"url":"assets/layout-C-KK0FKP.js"},{"revision":null,"url":"assets/katex-B1X10hvy.js"},{"revision":null,"url":"assets/kanban-definition-6JOO6SKY-CZ_GkxNf.js"},{"revision":null,"url":"assets/journeyDiagram-VCZTEJTY-QzOzScr3.js"},{"revision":null,"url":"assets/ishikawaDiagram-UXIWVN3A-D4MxAxgO.js"},{"revision":null,"url":"assets/init-Gi6I4Gst.js"},{"revision":null,"url":"assets/infoDiagram-42DDH7IO-GBNAyw2U.js"},{"revision":null,"url":"assets/index-DEew9lff.js"},{"revision":null,"url":"assets/index-CZ1i0LJy.css"},{"revision":null,"url":"assets/graph-dGIe4MSr.js"},{"revision":null,"url":"assets/gitGraphDiagram-UUTBAWPF-BisIolZx.js"},{"revision":null,"url":"assets/ganttDiagram-T4ZO3ILL-DbX7S0AQ.js"},{"revision":null,"url":"assets/flowDiagram-DWJPFMVM-C4g8FQW4.js"},{"revision":null,"url":"assets/erDiagram-SMLLAGMA-DytHaKjx.js"},{"revision":null,"url":"assets/diagram-TYMM5635-CD2jbK6X.js"},{"revision":null,"url":"assets/diagram-MMDJMWI5-D0XPadqe.js"},{"revision":null,"url":"assets/diagram-G4DWMVQ6-CefRrWbu.js"},{"revision":null,"url":"assets/diagram-5BDNPKRD-CPj9cRX5.js"},{"revision":null,"url":"assets/defaultLocale-DX6XiGOO.js"},{"revision":null,"url":"assets/dagre-KV5264BT-DDwuYNcQ.js"},{"revision":null,"url":"assets/cytoscape.esm-BQaXIfA_.js"},{"revision":null,"url":"assets/cose-bilkent-S5V4N54A-Brdf5tI1.js"},{"revision":null,"url":"assets/clone-BIzgFkUs.js"},{"revision":null,"url":"assets/classDiagram-v2-HSJHXN6E-DOTPcFJf.js"},{"revision":null,"url":"assets/classDiagram-6PBFFD2Q-DOTPcFJf.js"},{"revision":null,"url":"assets/chunk-YZCP3GAM-CMyl_uae.js"},{"revision":null,"url":"assets/chunk-QZHKN3VN-BWS3ZcC1.js"},{"revision":null,"url":"assets/chunk-OYMX7WX6-r2iRpVku.js"},{"revision":null,"url":"assets/chunk-FMBD7UC4-BV7glcOB.js"},{"revision":null,"url":"assets/chunk-EDXVE4YY-txE3i2M_.js"},{"revision":null,"url":"assets/chunk-55IACEB6-DW7VK2iC.js"},{"revision":null,"url":"assets/chunk-4TB4RGXK-S1S7C0um.js"},{"revision":null,"url":"assets/chunk-4BX2VUAB-fSZ3Gik1.js"},{"revision":null,"url":"assets/channel-CteFCEJC.js"},{"revision":null,"url":"assets/c4Diagram-AHTNJAMY-DlSGPeHw.js"},{"revision":null,"url":"assets/blockDiagram-DXYQGD6D-8UKvfcQG.js"},{"revision":null,"url":"assets/architectureDiagram-Q4EWVU46-BdMF-aWn.js"},{"revision":null,"url":"assets/arc-C73_SMw2.js"},{"revision":null,"url":"assets/_baseUniq-C-0Gob3W.js"},{"revision":null,"url":"assets/_basePickBy-DazNkHMb.js"},{"revision":"0362e0eb00358646fd4c97674945adba","url":"icons/icon-180.png"},{"revision":"75734e6b38a556148f51b9e10eeb01c8","url":"icons/icon-192.png"},{"revision":"5dee5ddcd8e8533edb348118334d9756","url":"icons/icon-512.png"},{"revision":"b0747e8d6cde0d45e05be8e5c731729e","url":"manifest.webmanifest"}]);we();q(({url:s})=>s.hostname==="cdn.jsdelivr.net"&&s.pathname.endsWith(".ttf"),new be({cacheName:"termbeam-fonts",plugins:[new Se({maxEntries:5,maxAgeSeconds:365*24*60*60})]}));self.addEventListener("message",s=>{var e;((e=s.data)==null?void 0:e.type)==="CLEAR_CACHES"&&caches.keys().then(t=>{for(const n of t)n!=="workbox-precache-v2"&&caches.delete(n)})});self.addEventListener("install",()=>{self.skipWaiting()});self.addEventListener("activate",s=>{s.waitUntil(caches.delete("termbeam-navigation").then(()=>self.clients.claim()))});self.addEventListener("push",s=>{let e={title:"Command finished",body:"TermBeam"};if(s.data)try{e=s.data.json()}catch{}s.waitUntil(self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(async t=>{if(t.some(i=>i.url.includes(self.location.origin)&&i.focused))return;const a={body:e.body||"A command has completed",icon:"/icons/icon-192.png",badge:"/icons/icon-192.png",tag:e.tag||"termbeam-cmd",renotify:!0,data:{url:e.url||"/",type:e.type||"command-complete",sessionId:e.sessionId},vibrate:[200,100,200]};try{await self.navigator.setAppBadge(1)}catch{}return self.registration.showNotification(e.title||"Command finished",a)}))});self.addEventListener("notificationclick",s=>{s.notification.close();try{self.navigator.clearAppBadge()}catch{}const e=s.notification.data||{},t=e.url||"/",n=e.type||"";s.waitUntil(self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(a=>{for(const i of a)if(i.url.includes(self.location.origin)&&"focus"in i)return n&&i.postMessage({type:"NOTIFICATION_CLICKED",notificationType:n,sessionId:e.sessionId}),i.focus();return self.clients.openWindow(t)}))});
|
|
2
|
+
This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return v(e,async()=>{const t=new Y;this.strategy.plugins.push(t);for(const[i,r]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(r),o=this._urlsToCacheModes.get(i),l=new Request(i,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return v(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),i=[];for(const r of n)a.has(r.url)||(await t.delete(r),i.push(r.url));return{deletedURLs:i}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new h("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let D;const j=()=>(D||(D=new oe),D);try{self["workbox:routing:7.3.0"]&&_()}catch{}const F="GET",x=s=>s&&typeof s=="object"?s:{handle:s};class R{constructor(e,t,n=F){this.handler=x(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=x(e)}}class le extends R{constructor(e,t,n){const a=({url:i})=>{const r=e.exec(i.href);if(r&&!(i.origin!==location.origin&&r.index!==0))return r.slice(1)};super(a,t,n)}}class he{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const i=new Request(...a);return this.handleRequest({request:i,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}}))}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=r&&r.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:i})}catch(u){l=Promise.reject(u)}const g=r&&r.catchHandler;return l instanceof Promise&&(this._catchHandler||g)&&(l=l.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:i})}catch(N){N instanceof Error&&(u=N)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const i=this._routes.get(n.method)||[];for(const r of i){let c;const o=r.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:r,params:c}}return{}}setDefaultHandler(e,t=F){this._defaultHandlerMap.set(t,x(e))}setCatchHandler(e){this._catchHandler=x(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new h("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new h("unregister-route-route-not-registered")}}let y;const ue=()=>(y||(y=new he,y.addFetchListener(),y.addCacheListener()),y);function q(s,e,t){let n;if(typeof s=="string"){const i=new URL(s,location.href),r=({url:c})=>c.href===i.href;n=new R(r,e,t)}else if(s instanceof RegExp)n=new le(s,e,t);else if(typeof s=="function")n=new R(s,e,t);else if(s instanceof R)n=s;else throw new h("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return ue().registerRoute(n),n}function de(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*fe(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const i=new URL(s,location.href);i.hash="",yield i.href;const r=de(i,e);if(yield r.href,t&&r.pathname.endsWith("/")){const c=new URL(r.href);c.pathname+=t,yield c.href}if(n){const c=new URL(r.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:i});for(const o of c)yield o.href}}class pe extends R{constructor(e,t){const n=({request:a})=>{const i=e.getURLsToCacheKeys();for(const r of fe(a.url,t)){const c=i.get(r);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function ge(s){const e=j(),t=new pe(e,s);q(t)}const me="-precache-",ye=async(s,e=me)=>{const n=(await self.caches.keys()).filter(a=>a.includes(e)&&a.includes(self.registration.scope)&&a!==s);return await Promise.all(n.map(a=>self.caches.delete(a))),n};function we(){self.addEventListener("activate",(s=>{const e=b.getPrecacheName();s.waitUntil(ye(e).then(t=>{}))}))}function _e(s){j().precache(s)}function Re(s,e){_e(s),ge(e)}class be extends W{async _handle(e,t){let n=await t.cacheMatch(e),a;if(!n)try{n=await t.fetchAndCachePut(e)}catch(i){i instanceof Error&&(a=i)}if(!n)throw new h("no-response",{url:e.url,error:a});return n}}function H(s){s.then(()=>{})}const Ce=(s,e)=>e.some(t=>s instanceof t);let A,K;function xe(){return A||(A=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Ee(){return K||(K=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const V=new WeakMap,k=new WeakMap,$=new WeakMap,L=new WeakMap,P=new WeakMap;function De(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",i),s.removeEventListener("error",r)},i=()=>{t(f(s.result)),a()},r=()=>{n(s.error),a()};s.addEventListener("success",i),s.addEventListener("error",r)});return e.then(t=>{t instanceof IDBCursor&&V.set(t,s)}).catch(()=>{}),P.set(e,s),e}function Le(s){if(k.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",i),s.removeEventListener("error",r),s.removeEventListener("abort",r)},i=()=>{t(),a()},r=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",i),s.addEventListener("error",r),s.addEventListener("abort",r)});k.set(s,e)}let I={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return k.get(s);if(e==="objectStoreNames")return s.objectStoreNames||$.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function Ue(s){I=s(I)}function Te(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(U(this),e,...t);return $.set(n,e.sort?e.sort():[e]),f(n)}:Ee().includes(s)?function(...e){return s.apply(U(this),e),f(V.get(this))}:function(...e){return f(s.apply(U(this),e))}}function ke(s){return typeof s=="function"?Te(s):(s instanceof IDBTransaction&&Le(s),Ce(s,xe())?new Proxy(s,I):s)}function f(s){if(s instanceof IDBRequest)return De(s);if(L.has(s))return L.get(s);const e=ke(s);return e!==s&&(L.set(s,e),P.set(e,s)),e}const U=s=>P.get(s);function Ie(s,e,{blocked:t,upgrade:n,blocking:a,terminated:i}={}){const r=indexedDB.open(s,e),c=f(r);return n&&r.addEventListener("upgradeneeded",o=>{n(f(r.result),o.oldVersion,o.newVersion,f(r.transaction),o)}),t&&r.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{i&&o.addEventListener("close",()=>i()),a&&o.addEventListener("versionchange",l=>a(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}function Pe(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const Ne=["get","getKey","getAll","getAllKeys","count"],ve=["put","add","delete","clear"],T=new Map;function O(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(T.get(e))return T.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=ve.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||Ne.includes(t)))return;const i=async function(r,...c){const o=this.transaction(r,a?"readwrite":"readonly");let l=o.store;return n&&(l=l.index(c.shift())),(await Promise.all([l[t](...c),a&&o.done]))[0]};return T.set(e,i),i}Ue(s=>({...s,get:(e,t,n)=>O(e,t)||s.get(e,t,n),has:(e,t)=>!!O(e,t)||s.has(e,t)}));try{self["workbox:expiration:7.3.0"]&&_()}catch{}const Me="workbox-expiration",w="cache-entries",S=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class Ae{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(w,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&Pe(this._cacheName)}async setTimestamp(e,t){e=S(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},i=(await this.getDb()).transaction(w,"readwrite",{durability:"relaxed"});await i.store.put(n),await i.done}async getTimestamp(e){const n=await(await this.getDb()).get(w,this._getId(e));return n==null?void 0:n.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(w).store.index("timestamp").openCursor(null,"prev");const i=[];let r=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp<e||t&&r>=t?i.push(a.value):r++),a=await a.continue()}const c=[];for(const o of i)await n.delete(w,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await Ie(Me,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class Ke{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Ae(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const a of t)await n.delete(a,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,H(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t<n:!0}else return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}function Oe(s){B.add(s)}class Se{constructor(e={}){this.cachedResponseWillBeUsed=async({event:t,request:n,cacheName:a,cachedResponse:i})=>{if(!i)return null;const r=this._isResponseDateFresh(i),c=this._getCacheExpiration(a);H(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return r?i:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&Oe(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===b.getRuntimeName())throw new h("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new Ke(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),a=new Date(t).getTime();return isNaN(a)?null:a}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}Re([{"revision":"1872c500de691dce40960bb85481de07","url":"registerSW.js"},{"revision":"0f93805414c783a30b72e0ce88f2c7c4","url":"icons/icon.svg"},{"revision":"5dee5ddcd8e8533edb348118334d9756","url":"icons/icon-512.png"},{"revision":"75734e6b38a556148f51b9e10eeb01c8","url":"icons/icon-192.png"},{"revision":"0362e0eb00358646fd4c97674945adba","url":"icons/icon-180.png"},{"revision":null,"url":"assets/xychartDiagram-5P7HB3ND-FWnFa4As.js"},{"revision":null,"url":"assets/wardleyDiagram-NUSXRM2D-BMN1lmwc.js"},{"revision":null,"url":"assets/wardley-RL74JXVD-CTz1AIQ7.js"},{"revision":null,"url":"assets/vennDiagram-DHZGUBPP-D-E_RyQj.js"},{"revision":null,"url":"assets/timeline-definition-GMOUNBTQ-TbCB8xC6.js"},{"revision":null,"url":"assets/stateDiagram-v2-QKLJ7IA2-CjzD61n3.js"},{"revision":null,"url":"assets/stateDiagram-FHFEXIEX-BSr0F5j7.js"},{"revision":null,"url":"assets/sequenceDiagram-FGHM5R23-DKr3OEWD.js"},{"revision":null,"url":"assets/sankeyDiagram-XADWPNL6-BH83O3Re.js"},{"revision":null,"url":"assets/requirementDiagram-MS252O5E-D5dY9VOu.js"},{"revision":null,"url":"assets/quadrantDiagram-34T5L4WZ-B9icGLjS.js"},{"revision":null,"url":"assets/pieDiagram-DEJITSTG-B4POfTKf.js"},{"revision":null,"url":"assets/ordinal-Cboi1Yqb.js"},{"revision":null,"url":"assets/montserrat-vietnamese-wght-normal-k7S-YeeD.woff2"},{"revision":null,"url":"assets/montserrat-latin-wght-normal-l_AIctKy.woff2"},{"revision":null,"url":"assets/montserrat-latin-ext-wght-normal-BsZE-iaG.woff2"},{"revision":null,"url":"assets/montserrat-cyrillic-wght-normal-EAA9jha_.woff2"},{"revision":null,"url":"assets/montserrat-cyrillic-ext-wght-normal-CO5hGrJv.woff2"},{"revision":null,"url":"assets/mindmap-definition-QFDTVHPH-BVoyE8ro.js"},{"revision":null,"url":"assets/linear--trpUrpH.js"},{"revision":null,"url":"assets/layout-5M-TkCZa.js"},{"revision":null,"url":"assets/katex-B1X10hvy.js"},{"revision":null,"url":"assets/kanban-definition-6JOO6SKY-BsydOKqL.js"},{"revision":null,"url":"assets/journeyDiagram-VCZTEJTY-CEG6oumr.js"},{"revision":null,"url":"assets/ishikawaDiagram-UXIWVN3A-C8HEgm3q.js"},{"revision":null,"url":"assets/init-Gi6I4Gst.js"},{"revision":null,"url":"assets/infoDiagram-42DDH7IO-CDKYiPV9.js"},{"revision":null,"url":"assets/index-Yv6qAvmh.css"},{"revision":null,"url":"assets/index-K6fCB-_E.js"},{"revision":null,"url":"assets/graph-qnDbEiz4.js"},{"revision":null,"url":"assets/gitGraphDiagram-UUTBAWPF-DLld8QxY.js"},{"revision":null,"url":"assets/ganttDiagram-T4ZO3ILL-ePqCgG4h.js"},{"revision":null,"url":"assets/flowDiagram-DWJPFMVM-oPJgH5q1.js"},{"revision":null,"url":"assets/erDiagram-SMLLAGMA-CuqF1L_0.js"},{"revision":null,"url":"assets/diagram-TYMM5635-4gl2-c09.js"},{"revision":null,"url":"assets/diagram-MMDJMWI5-59J8hPvi.js"},{"revision":null,"url":"assets/diagram-G4DWMVQ6-CvVBlOfn.js"},{"revision":null,"url":"assets/diagram-5BDNPKRD-5C2f8LBD.js"},{"revision":null,"url":"assets/defaultLocale-DX6XiGOO.js"},{"revision":null,"url":"assets/dagre-KV5264BT-BPUa4qeA.js"},{"revision":null,"url":"assets/cytoscape.esm-BQaXIfA_.js"},{"revision":null,"url":"assets/cose-bilkent-S5V4N54A-CYElDRm3.js"},{"revision":null,"url":"assets/clone-B_J3fPs2.js"},{"revision":null,"url":"assets/classDiagram-v2-HSJHXN6E-CNeA_i0e.js"},{"revision":null,"url":"assets/classDiagram-6PBFFD2Q-CNeA_i0e.js"},{"revision":null,"url":"assets/chunk-YZCP3GAM-DfX5LUxN.js"},{"revision":null,"url":"assets/chunk-QZHKN3VN-OA3mvyRi.js"},{"revision":null,"url":"assets/chunk-OYMX7WX6-CcNDMNgJ.js"},{"revision":null,"url":"assets/chunk-FMBD7UC4-Dwy9NsB4.js"},{"revision":null,"url":"assets/chunk-EDXVE4YY-DF6JVZ_7.js"},{"revision":null,"url":"assets/chunk-55IACEB6-BMWMbw5D.js"},{"revision":null,"url":"assets/chunk-4TB4RGXK-dLtH5sji.js"},{"revision":null,"url":"assets/chunk-4BX2VUAB-DumEf-uE.js"},{"revision":null,"url":"assets/channel-BIq-STgt.js"},{"revision":null,"url":"assets/c4Diagram-AHTNJAMY-DawJ7HAb.js"},{"revision":null,"url":"assets/blockDiagram-DXYQGD6D-CYqJqHUT.js"},{"revision":null,"url":"assets/architectureDiagram-Q4EWVU46-C9kGjnQo.js"},{"revision":null,"url":"assets/arc-DVBcqPhl.js"},{"revision":null,"url":"assets/_baseUniq-FSheTm_9.js"},{"revision":null,"url":"assets/_basePickBy-DdmMqnCR.js"},{"revision":"0362e0eb00358646fd4c97674945adba","url":"icons/icon-180.png"},{"revision":"75734e6b38a556148f51b9e10eeb01c8","url":"icons/icon-192.png"},{"revision":"5dee5ddcd8e8533edb348118334d9756","url":"icons/icon-512.png"},{"revision":"b0747e8d6cde0d45e05be8e5c731729e","url":"manifest.webmanifest"}]);we();q(({url:s})=>s.hostname==="cdn.jsdelivr.net"&&s.pathname.endsWith(".ttf"),new be({cacheName:"termbeam-fonts",plugins:[new Se({maxEntries:5,maxAgeSeconds:365*24*60*60})]}));self.addEventListener("message",s=>{var e;((e=s.data)==null?void 0:e.type)==="CLEAR_CACHES"&&caches.keys().then(t=>{for(const n of t)n!=="workbox-precache-v2"&&caches.delete(n)})});self.addEventListener("install",()=>{self.skipWaiting()});self.addEventListener("activate",s=>{s.waitUntil(caches.delete("termbeam-navigation").then(()=>self.clients.claim()))});self.addEventListener("push",s=>{let e={title:"Command finished",body:"TermBeam"};if(s.data)try{e=s.data.json()}catch{}s.waitUntil(self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(async t=>{if(t.some(i=>i.url.includes(self.location.origin)&&i.focused))return;const a={body:e.body||"A command has completed",icon:"/icons/icon-192.png",badge:"/icons/icon-192.png",tag:e.tag||"termbeam-cmd",renotify:!0,data:{url:e.url||"/",type:e.type||"command-complete",sessionId:e.sessionId},vibrate:[200,100,200]};try{await self.navigator.setAppBadge(1)}catch{}return self.registration.showNotification(e.title||"Command finished",a)}))});self.addEventListener("notificationclick",s=>{s.notification.close();try{self.navigator.clearAppBadge()}catch{}const e=s.notification.data||{},t=e.url||"/",n=e.type||"";s.waitUntil(self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(a=>{for(const i of a)if(i.url.includes(self.location.origin)&&"focus"in i)return n&&i.postMessage({type:"NOTIFICATION_CLICKED",notificationType:n,sessionId:e.sessionId}),i.focus();return self.clients.openWindow(t)}))});
|
|
@@ -16,6 +16,7 @@ const DEFAULTS = Object.freeze({
|
|
|
16
16
|
fontSize: 14,
|
|
17
17
|
notifications: false,
|
|
18
18
|
haptics: true,
|
|
19
|
+
showSplash: true,
|
|
19
20
|
defaultFolder: '',
|
|
20
21
|
defaultInitialCommand: '',
|
|
21
22
|
touchBarCollapsed: false,
|
|
@@ -188,6 +189,7 @@ function sanitize(prefs) {
|
|
|
188
189
|
fontSize: clampNumber(src.fontSize, FONT_MIN, FONT_MAX, DEFAULTS.fontSize),
|
|
189
190
|
notifications: asBool(src.notifications, DEFAULTS.notifications),
|
|
190
191
|
haptics: asBool(src.haptics, DEFAULTS.haptics),
|
|
192
|
+
showSplash: asBool(src.showSplash, DEFAULTS.showSplash),
|
|
191
193
|
defaultFolder: asString(src.defaultFolder, DEFAULTS.defaultFolder, 1024),
|
|
192
194
|
defaultInitialCommand: asString(
|
|
193
195
|
src.defaultInitialCommand,
|
package/src/server/routes.js
CHANGED
|
@@ -163,11 +163,12 @@ function setupRoutes(
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
-
// Version API
|
|
166
|
+
// Version API — uses the version captured at server startup so dev/prod
|
|
167
|
+
// builds stay stable for the lifetime of the process. Restart the service
|
|
168
|
+
// to pick up a new git tag or dirty-state change.
|
|
167
169
|
app.get('/api/version', (_req, res) => {
|
|
168
170
|
log.debug('Version requested');
|
|
169
|
-
|
|
170
|
-
res.json({ version: getVersion() });
|
|
171
|
+
res.json({ version: config.version });
|
|
171
172
|
});
|
|
172
173
|
|
|
173
174
|
// Changelog — served from repo CHANGELOG.md (bundled with the npm package).
|
package/src/utils/version.js
CHANGED
|
@@ -18,9 +18,10 @@ function getVersion() {
|
|
|
18
18
|
|
|
19
19
|
// Running from source — git tags are the version source of truth.
|
|
20
20
|
// This avoids drift between package.json and tagged releases.
|
|
21
|
+
const repoRoot = path.join(__dirname, '..', '..');
|
|
21
22
|
try {
|
|
22
23
|
const gitDesc = execSync('git describe --tags --always --dirty', {
|
|
23
|
-
cwd:
|
|
24
|
+
cwd: repoRoot,
|
|
24
25
|
encoding: 'utf-8',
|
|
25
26
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
26
27
|
windowsHide: true,
|
|
@@ -31,7 +32,10 @@ function getVersion() {
|
|
|
31
32
|
const gitVersion = tagMatch[1];
|
|
32
33
|
const commits = tagMatch[2];
|
|
33
34
|
const hash = tagMatch[3];
|
|
34
|
-
|
|
35
|
+
// `git describe --dirty` only flags tracked-file modifications. Treat any
|
|
36
|
+
// untracked files (e.g. a fresh `hi.txt`) as dirty too so dev builds are
|
|
37
|
+
// always visibly distinct from the tagged release.
|
|
38
|
+
const dirty = tagMatch[4] || (hasUntrackedChanges(repoRoot) ? '-dirty' : '');
|
|
35
39
|
|
|
36
40
|
// Exactly on a clean tag — return the tag version
|
|
37
41
|
if (!commits && !dirty) {
|
|
@@ -69,4 +73,18 @@ function isInstalledGlobally() {
|
|
|
69
73
|
return __dirname.includes('node_modules');
|
|
70
74
|
}
|
|
71
75
|
|
|
76
|
+
function hasUntrackedChanges(cwd) {
|
|
77
|
+
try {
|
|
78
|
+
const status = execSync('git status --porcelain', {
|
|
79
|
+
cwd,
|
|
80
|
+
encoding: 'utf-8',
|
|
81
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
82
|
+
windowsHide: true,
|
|
83
|
+
});
|
|
84
|
+
return status.trim().length > 0;
|
|
85
|
+
} catch {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
72
90
|
module.exports = { getVersion };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aq as o,ar as n}from"./index-DEew9lff.js";const t=(r,a)=>o.lang.round(n.parse(r)[a]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-S1S7C0um.js";import{_ as i}from"./index-DEew9lff.js";import"./chunk-FMBD7UC4-BV7glcOB.js";import"./chunk-YZCP3GAM-CMyl_uae.js";import"./chunk-55IACEB6-DW7VK2iC.js";import"./chunk-EDXVE4YY-txE3i2M_.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-S1S7C0um.js";import{_ as i}from"./index-DEew9lff.js";import"./chunk-FMBD7UC4-BV7glcOB.js";import"./chunk-YZCP3GAM-CMyl_uae.js";import"./chunk-55IACEB6-DW7VK2iC.js";import"./chunk-EDXVE4YY-txE3i2M_.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./_baseUniq-C-0Gob3W.js";var e=4;function a(o){return r(o,e)}export{a as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as t,b as r,a,S as s}from"./chunk-OYMX7WX6-r2iRpVku.js";import{_ as i}from"./index-DEew9lff.js";import"./chunk-55IACEB6-DW7VK2iC.js";import"./chunk-EDXVE4YY-txE3i2M_.js";var l={parser:a,get db(){return new s(2)},renderer:r,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{l as diagram};
|